@ehfuse/mui-virtual-data-table 1.1.9 → 1.1.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";var Ge=Object.defineProperty;var tt=Object.getOwnPropertyDescriptor;var rt=Object.getOwnPropertyNames;var nt=Object.prototype.hasOwnProperty;var ot=(a,p)=>{for(var g in p)Ge(a,g,{get:p[g],enumerable:!0})},it=(a,p,g,b)=>{if(p&&typeof p=="object"||typeof p=="function")for(let y of rt(p))!nt.call(a,y)&&y!==g&&Ge(a,y,{get:()=>p[y],enumerable:!(b=tt(p,y))||b.enumerable});return a};var lt=a=>it(Ge({},"__esModule",{value:!0}),a);var bt={};ot(bt,{VirtualDataTable:()=>Ze});module.exports=lt(bt);var c=require("react"),f=require("@mui/material"),Je=require("react-virtuoso");var je=require("react/jsx-runtime"),Ce=require("react"),ze=require("@mui/material"),Oe=function(){return Oe=Object.assign||function(p){for(var g,b=1,y=arguments.length;b<y;b++){g=arguments[b];for(var k in g)Object.prototype.hasOwnProperty.call(g,k)&&(p[k]=g[k])}return p},Oe.apply(this,arguments)};function Ue(a){var p=a.visible,g=a.onComplete,b=a.fadeoutDuration,y=b===void 0?200:b,k=a.exitDelay,w=k===void 0?0:k,P=a.size,L=P===void 0?40:P,Y=a.className,Z=a.style,z=a.sx,q=a.indicator,D=a.background,W=D===void 0?{show:!0,color:"255, 255, 255",opacity:.9}:D,de=(0,Ce.useRef)(void 0),u=(0,Ce.useRef)(null),V=(0,Ce.useState)(p),pe=V[0],be=V[1],I=W.show,ye=I===void 0?!0:I,T=W.color,E=T===void 0?"255, 255, 255":T,fe=W.opacity,Q=fe===void 0?.9:fe;if((0,Ce.useEffect)(function(){var He=de.current;if(He===!0&&p===!1&&u.current){var oe=u.current;oe.style.opacity="0",setTimeout(function(){be(!1),g?.()},y+w)}else p===!0&&(be(!0),u.current&&(u.current.style.opacity="1"));de.current=p},[p,g,y,w]),!pe)return null;var ke=function(){return typeof q=="string"?(0,je.jsx)("img",{src:q,alt:"Loading",style:{width:L,height:L}}):q||(0,je.jsx)(ze.CircularProgress,{size:L})},me=function(){return ye?E.startsWith("rgba")?{backgroundColor:E}:/^\d+,\s*\d+,\s*\d+$/.test(E)?{backgroundColor:"rgba(".concat(E,", ").concat(Q,")")}:Q!==1?{backgroundColor:E,"&::before":{content:'""',position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:E,opacity:Q,zIndex:-1}}:{backgroundColor:E}:{backgroundColor:"transparent"}};return(0,je.jsx)(ze.Box,{ref:u,className:Y,style:Oe({},Z),sx:Oe(Oe({position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3,opacity:p?1:0,transition:"opacity ".concat(y,"ms ease-out")},me()),z),children:ke()})}var r=require("react"),ne=require("react/jsx-runtime"),at=["editor","textarea","input","select","textfield","form-control","contenteditable","MuiInputBase-input","MuiSelect-select","MuiOutlinedInput-input","MuiFilledInput-input","MuiInput-input","MuiFormControl-root","MuiTextField-root","MuiSelect-root","MuiOutlinedInput-root","MuiFilledInput-root","MuiInput-root","MuiAutocomplete-input","MuiDatePicker-input","MuiSlider-thumb","MuiSlider-rail","MuiSlider-track","MuiSlider-mark","MuiSlider-markLabel","MuiSlider-root","MuiSlider-colorPrimary","MuiSlider-sizeMedium","MuiIconButton-root","MuiButton-root","MuiButtonBase-root","MuiTouchRipple-root","MuiCheckbox-root","MuiRadio-root","MuiSwitch-root","PrivateSwitchBase-root","ant-input","ant-input-affix-wrapper","ant-input-group-addon","ant-input-number","ant-input-number-handler","ant-select","ant-select-selector","ant-select-selection-search","ant-select-dropdown","ant-cascader","ant-cascader-input","ant-picker","ant-picker-input","ant-time-picker","ant-calendar-picker","ant-slider","ant-slider-track","ant-slider-handle","ant-switch","ant-checkbox","ant-checkbox-wrapper","ant-radio","ant-radio-wrapper","ant-rate","ant-upload","ant-upload-drag","ant-form-item","ant-form-item-control","ant-btn","ant-dropdown","ant-dropdown-trigger","ant-menu","ant-menu-item","ant-tooltip","ant-popover","ant-modal","ant-drawer","ant-tree-select","ant-auto-complete","ant-mentions","ant-transfer","ui-input","ui-textarea","ui-select","ui-select-trigger","ui-select-content","ui-select-item","ui-button","ui-checkbox","ui-radio-group","ui-switch","ui-slider","ui-range-slider","ui-calendar","ui-date-picker","ui-combobox","ui-command","ui-command-input","ui-popover","ui-dialog","ui-sheet","ui-dropdown-menu","ui-context-menu","ui-menubar","ui-navigation-menu","ui-form","ui-form-control","ui-form-item","ui-form-field","ui-label","radix-ui","radix-select","radix-dropdown","radix-dialog","radix-popover","radix-accordion","radix-tabs","radix-slider","radix-switch","radix-checkbox","radix-radio","ql-editor","ql-container","ql-toolbar","ql-picker","ql-picker-label","ql-picker-options","ql-formats","ql-snow","ql-bubble","quill","quilleditor","monaco-editor","monaco-editor-background","view-lines","decorationsOverviewRuler","monaco-scrollable-element","CodeMirror","CodeMirror-code","CodeMirror-lines","CodeMirror-scroll","CodeMirror-sizer","cm-editor","cm-focused","cm-content","tox-editor-container","tox-editor-header","tox-edit-area","tox-tinymce","mce-content-body","ck-editor","ck-content","ck-toolbar","ck-editor__editable","ck-widget","slate-editor","slate-content","DraftEditor-root","DraftEditor-editorContainer","public-DraftEditor-content","ehfuse-editor","ehfuse-editor-wrapper","ehfuse-editor-content","ehfuse-toolbar","ehfuse-toolbar-group","ehfuse-cursor","text-editor","rich-text-editor","wysiwyg","ace_editor","ace_content"],Xe=(a,p)=>{let g=a.tagName.toLowerCase(),b=["text","password","email","number","search","tel","url","checkbox","radio"];if(g==="input"){let y=a.type;return b.includes(y)}if(["textarea","select","button"].includes(g)||["svg","path","circle","rect","line","polygon","polyline"].includes(g)||a.getAttribute("contenteditable")==="true")return!0;if(p?.excludeSelectors){for(let y of p.excludeSelectors)if(a.matches(y))return!0}return st(a,p)},st=(a,p)=>{let g=[...at,...p?.excludeClasses||[]],b=a,y=0,k=5;for(;b&&y<=k;){if(g.some(w=>b.classList.contains(w)))return!0;if(b.classList.contains("MuiDialogContent-root"))break;b=b.parentElement,y++}return!1},ct={},ut={},dt={},pt={},ft={},mt=(0,r.forwardRef)(({className:a="",style:p={},containerStyle:g={},contentStyle:b={},children:y,onScroll:k,thumb:w=ct,track:P=ut,arrows:L=dt,dragScroll:Y=pt,autoHide:Z=ft,showScrollbar:z=!0,detectInnerScroll:q=!1},D)=>{let W=(0,r.useRef)({});(0,r.useEffect)(()=>{W.current={children:y,onScroll:k,showScrollbar:z,thumb:w,track:P,arrows:L,dragScroll:Y,autoHide:Z}});let de=(0,r.useRef)(null),u=(0,r.useRef)(null),V=(0,r.useRef)(null),pe=(0,r.useRef)(null),be=(0,r.useRef)(null),I=(0,r.useRef)(null),[ye,T]=(0,r.useState)(!1),[E,fe]=(0,r.useState)(!1),[Q,ke]=(0,r.useState)(!1),[me,He]=(0,r.useState)({y:0,scrollTop:0}),[oe,Ne]=(0,r.useState)(0),[Ae,Ye]=(0,r.useState)(0),[ve,Le]=(0,r.useState)(!1),[R,ie]=(0,r.useState)(!1),[xe,Pe]=(0,r.useState)({x:0,y:0,scrollTop:0,scrollLeft:0}),[qe,Ie]=(0,r.useState)(null),[le,he]=(0,r.useState)(null),[Qe,We]=(0,r.useState)(!1),ae=(0,r.useRef)(null),[De,we]=(0,r.useState)(!1),Me=(0,r.useRef)(null),se=(0,r.useRef)(null),ce=(0,r.useRef)(null),$=(0,r.useMemo)(()=>{let e=w.color??"#606060";return{width:w.width??8,minHeight:w.minHeight??50,radius:w.radius??(w.width??8)/2,color:e,opacity:w.opacity??.6,hoverColor:w.hoverColor??e,hoverOpacity:w.hoverOpacity??1}},[w]),x=(0,r.useMemo)(()=>({width:P.width??16,color:P.color??"rgba(128, 128, 128, 0.1)",visible:P.visible??!0,alignment:P.alignment??"center",radius:P.radius??$.radius??4,margin:P.margin??4}),[P,$.radius]),A=(0,r.useMemo)(()=>{let e=L.color??"#808080";return{visible:L.visible??!1,step:L.step??50,color:e,opacity:L.opacity??.6,hoverColor:L.hoverColor??e,hoverOpacity:L.hoverOpacity??1}},[L]),l=(0,r.useMemo)(()=>({enabled:Y.enabled??!0,excludeClasses:Y.excludeClasses??[],excludeSelectors:Y.excludeSelectors??[]}),[Y]),n=(0,r.useMemo)(()=>({enabled:Z.enabled??!0,delay:Z.delay??1500,delayOnWheel:Z.delayOnWheel??700}),[Z]),m=$.width,B=x.width,_=$.minHeight,t=A.visible,j=A.step,G=(0,r.useCallback)(()=>{if(!u.current)return;let e=document.activeElement;e&&u.current.contains(e)&&e!==u.current||u.current.focus()},[]);(0,r.useImperativeHandle)(D,()=>({getScrollContainer:()=>u.current,scrollTo:e=>{u.current&&u.current.scrollTo(e)},get scrollTop(){return u.current?.scrollTop||0},get scrollHeight(){return u.current?.scrollHeight||0},get clientHeight(){return u.current?.clientHeight||0}}),[]);let S=(0,r.useCallback)(()=>{if(I.current){let i=I.current;if(document.contains(i)&&i.scrollHeight>i.clientHeight+2)return i;I.current=null}if(!u.current)return null;if(V.current&&V.current.scrollHeight>u.current.clientHeight+2)return I.current=u.current,u.current;if(!q)return null;let e=u.current.querySelectorAll('[data-virtuoso-scroller], [style*="overflow"], .virtuoso-scroller, [style*="overflow: auto"], [style*="overflow:auto"]');for(let i of e){let o=i;if(o!==u.current&&o.classList.contains("overlay-scrollbar-container"))continue;let d=o.parentElement,h=!1;for(;d&&d!==u.current;){if(d.classList.contains("overlay-scrollbar-container")&&d!==u.current){h=!0;break}d=d.parentElement}if(!h&&o.scrollHeight>o.clientHeight+2)return I.current=o,o}return null},[]),ee=(0,r.useCallback)(()=>S()!==null,[S]),H=(0,r.useCallback)(()=>{Me.current&&(clearTimeout(Me.current),Me.current=null)},[]),Ve=(0,r.useCallback)(()=>{se.current&&(clearTimeout(se.current),se.current=null)},[]),F=(0,r.useCallback)(()=>{ce.current&&(clearTimeout(ce.current),ce.current=null)},[]),C=(0,r.useCallback)(e=>{n.enabled&&(H(),Me.current=setTimeout(()=>{T(!1),Me.current=null},e))},[H,n.enabled]),v=(0,r.useCallback)(()=>{let e=S();if(!e){T(!1),Le(!1),H();return}if(Le(!0),!pe.current)return;n.enabled||(T(!0),H());let i=e.clientHeight,o=e.scrollHeight,d=e.scrollTop,h=0;if(de.current){let Be=window.getComputedStyle(de.current),_e=parseFloat(Be.paddingTop)||0,et=parseFloat(Be.paddingBottom)||0;h=_e+et}let M=t?m*2+x.margin*4:x.margin*2,O=i-M+h,N=i/o,Se=Math.max(O*N,_),$e=o-i,J=O-Se,Fe=$e>0?d/$e*J:0;Ne(Se),Ye(Fe)},[S,H,t,m,_,n.enabled]),Ee=(0,r.useCallback)(e=>{e.preventDefault(),e.stopPropagation();let i=S();i&&(fe(!0),He({y:e.clientY,scrollTop:i.scrollTop}),H(),T(!0),G())},[S,H,G]),Re=(0,r.useCallback)(e=>{if(!E)return;let i=S();if(!i)return;let o=i.clientHeight,d=i.scrollHeight-o,h=e.clientY-me.y,M=o-oe,O=h/M*d,N=Math.max(0,Math.min(d,me.scrollTop+O));i.scrollTop=N,v()},[E,me,oe,v,S]),Te=(0,r.useCallback)(()=>{fe(!1),ee()&&C(n.delay)},[ee,C,n.delay]),te=(0,r.useCallback)(e=>{if(!pe.current)return;let i=pe.current.getBoundingClientRect(),o=e.clientY-i.top,d=S();if(!d)return;let h=d.clientHeight,M=d.scrollHeight,O=o/h*(M-h);d.scrollTop=Math.max(0,Math.min(M-h,O)),v(),T(!0),C(n.delay),G()},[v,C,n.delay,S,G]),U=(0,r.useCallback)(e=>{if(e.preventDefault(),e.stopPropagation(),!u.current)return;let i=Math.max(0,u.current.scrollTop-j);u.current.scrollTop=i,v(),T(!0),C(n.delay),G()},[v,C,j,n.delay,G]),X=(0,r.useCallback)(e=>{if(e.preventDefault(),e.stopPropagation(),!u.current||!V.current)return;let i=u.current,o=V.current.scrollHeight-i.clientHeight,d=Math.min(o,i.scrollTop+j);i.scrollTop=d,v(),T(!0),C(n.delay),G()},[v,C,j,n.delay,G]),ge=(0,r.useCallback)(e=>{if(!l.enabled)return;let i=e.target;if(Xe(i,l)||e.button!==0)return;let o=S();o&&(o.scrollHeight<=o.clientHeight||(e.preventDefault(),ie(!0),Pe({x:e.clientX,y:e.clientY,scrollTop:o.scrollTop,scrollLeft:o.scrollLeft||0}),H()))},[l,Xe,S,H]),ue=(0,r.useCallback)(e=>{if(!R)return;let i=S();if(!i)return;let o=xe.x-e.clientX,d=xe.y-e.clientY;if(Math.abs(d)<3&&Math.abs(o)<3)return;T(!0);let h=Math.max(0,Math.min(i.scrollHeight-i.clientHeight,xe.scrollTop+d));i.scrollTop=h,v()},[R,xe,S,v]),re=(0,r.useCallback)(()=>{ie(!1),ee()&&C(n.delay)},[ee,C,n.delay]);(0,r.useEffect)(()=>{let e=M=>{v(),H(),T(!0);let O=De?n.delayOnWheel:n.delay;C(O),k&&k(M)},i=()=>{we(!0),ae.current&&clearTimeout(ae.current),ae.current=setTimeout(()=>{we(!1)},300),H(),F(),ce.current=setTimeout(()=>{T(!0),ce.current=null},50)},o=[],d=S();d&&o.push(d);let h=u.current;return h&&!d&&(o.push(h),h.querySelectorAll('[data-virtuoso-scroller], [style*="overflow"], .virtuoso-scroller, [style*="overflow: auto"], [style*="overflow:auto"]').forEach(M=>{let O=M;if(O!==h&&O.classList.contains("overlay-scrollbar-container"))return;let N=O.parentElement;for(;N&&N!==h;){if(N.classList.contains("overlay-scrollbar-container")&&N!==h)return;N=N.parentElement}o.push(O)})),o.forEach(M=>{M.addEventListener("scroll",e,{passive:!0}),M.addEventListener("wheel",i,{passive:!0})}),()=>{o.forEach(M=>{M.removeEventListener("scroll",e),M.removeEventListener("wheel",i)}),ae.current&&clearTimeout(ae.current),ce.current&&clearTimeout(ce.current)}},[S,v,k,H,C,n,De]),(0,r.useEffect)(()=>{let e=o=>{let d=S();if(!d)return;let{key:h}=o,{scrollTop:M,scrollHeight:O,clientHeight:N}=d,Se=O-N,$e=50,J=null;switch(h){case"ArrowUp":o.preventDefault(),J=Math.max(0,M-$e);break;case"ArrowDown":o.preventDefault(),J=Math.min(Se,M+$e);break;case"PageUp":o.preventDefault(),J=Math.max(0,M-N);break;case"PageDown":o.preventDefault(),J=Math.min(Se,M+N);break;case"Home":o.preventDefault(),J=0;break;case"End":o.preventDefault(),J=Se;break;default:return}if(J!==null){let Fe=J/Se,Be=t?m*2+x.margin*4:x.margin*2,_e=(N-Be-oe)*Fe;Ye(_e),d.scrollTop=J,H(),T(!0),C(n.delay)}},i=u.current;if(i)return i.addEventListener("keydown",e),()=>{i.removeEventListener("keydown",e)}},[S,t,m,x.margin,oe,H,C,n.delay]),(0,r.useEffect)(()=>{if(R)return document.addEventListener("mousemove",ue),document.addEventListener("mouseup",re),()=>{document.removeEventListener("mousemove",ue),document.removeEventListener("mouseup",re)}},[R,ue,re]),(0,r.useEffect)(()=>{if(E)return document.addEventListener("mousemove",Re),document.addEventListener("mouseup",Te),()=>{document.removeEventListener("mousemove",Re),document.removeEventListener("mouseup",Te)}},[E,Re,Te]),(0,r.useEffect)(()=>{v();let e=setTimeout(()=>{v()},100);return()=>clearTimeout(e)},[v]),(0,r.useLayoutEffect)(()=>{We(!0),v(),!n.enabled&&ee()&&T(!0)},[ee,v,n.enabled]),(0,r.useEffect)(()=>{let e=new ResizeObserver(()=>{v()}),i=[];return u.current&&i.push(u.current),V.current&&i.push(V.current),I.current&&document.contains(I.current)&&i.push(I.current),i.forEach(o=>{e.observe(o)}),()=>e.disconnect()},[v]),(0,r.useEffect)(()=>{if(!u.current)return;let e=new MutationObserver(()=>{I.current=null,v()});return e.observe(u.current,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["style"]}),()=>e.disconnect()},[v]);let K=Math.max(B,m);return(0,r.useEffect)(()=>{let e="overlay-scrollbar-webkit-hide",i=document.getElementById(e);i&&i.remove();let o=document.createElement("style");return o.id=e,o.textContent=`
1
+ "use strict";var Ue=Object.defineProperty;var tt=Object.getOwnPropertyDescriptor;var rt=Object.getOwnPropertyNames;var nt=Object.prototype.hasOwnProperty;var ot=(a,p)=>{for(var g in p)Ue(a,g,{get:p[g],enumerable:!0})},it=(a,p,g,x)=>{if(p&&typeof p=="object"||typeof p=="function")for(let M of rt(p))!nt.call(a,M)&&M!==g&&Ue(a,M,{get:()=>p[M],enumerable:!(x=tt(p,M))||x.enumerable});return a};var at=a=>it(Ue({},"__esModule",{value:!0}),a);var bt={};ot(bt,{VirtualDataTable:()=>et});module.exports=at(bt);var s=require("react"),f=require("@mui/material"),Qe=require("react-virtuoso");var ze=require("react/jsx-runtime"),xe=require("react"),Ae=require("@mui/material"),Ne=function(){return Ne=Object.assign||function(p){for(var g,x=1,M=arguments.length;x<M;x++){g=arguments[x];for(var O in g)Object.prototype.hasOwnProperty.call(g,O)&&(p[O]=g[O])}return p},Ne.apply(this,arguments)};function Ke(a){var p=a.visible,g=a.onComplete,x=a.fadeoutDuration,M=x===void 0?200:x,O=a.exitDelay,S=O===void 0?0:O,I=a.size,$=I===void 0?40:I,F=a.className,J=a.style,q=a.sx,_=a.indicator,N=a.background,G=N===void 0?{show:!0,color:"255, 255, 255",opacity:.9}:N,ue=(0,xe.useRef)(void 0),d=(0,xe.useRef)(null),U=(0,xe.useState)(p),de=U[0],he=U[1],j=G.show,X=j===void 0?!0:j,C=G.color,B=C===void 0?"255, 255, 255":C,oe=G.opacity,ie=oe===void 0?.9:oe;if((0,xe.useEffect)(function(){var ke=ue.current;if(ke===!0&&p===!1&&d.current){var ae=d.current;ae.style.opacity="0",setTimeout(function(){he(!1),g?.()},M+S)}else p===!0&&(he(!0),d.current&&(d.current.style.opacity="1"));ue.current=p},[p,g,M,S]),!de)return null;var Me=function(){return typeof _=="string"?(0,ze.jsx)("img",{src:_,alt:"Loading",style:{width:$,height:$}}):_||(0,ze.jsx)(Ae.CircularProgress,{size:$})},ge=function(){return X?B.startsWith("rgba")?{backgroundColor:B}:/^\d+,\s*\d+,\s*\d+$/.test(B)?{backgroundColor:"rgba(".concat(B,", ").concat(ie,")")}:ie!==1?{backgroundColor:B,"&::before":{content:'""',position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:B,opacity:ie,zIndex:-1}}:{backgroundColor:B}:{backgroundColor:"transparent"}};return(0,ze.jsx)(Ae.Box,{ref:d,className:F,style:Ne({},J),sx:Ne(Ne({position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3,opacity:p?1:0,transition:"opacity ".concat(M,"ms ease-out")},ge()),q),children:Me()})}var t=require("react"),ne=require("react/jsx-runtime"),lt=["editor","textarea","input","select","textfield","form-control","contenteditable","MuiInputBase-input","MuiSelect-select","MuiOutlinedInput-input","MuiFilledInput-input","MuiInput-input","MuiFormControl-root","MuiTextField-root","MuiSelect-root","MuiOutlinedInput-root","MuiFilledInput-root","MuiInput-root","MuiAutocomplete-input","MuiDatePicker-input","MuiSlider-thumb","MuiSlider-rail","MuiSlider-track","MuiSlider-mark","MuiSlider-markLabel","MuiSlider-root","MuiSlider-colorPrimary","MuiSlider-sizeMedium","MuiIconButton-root","MuiButton-root","MuiButtonBase-root","MuiTouchRipple-root","MuiCheckbox-root","MuiRadio-root","MuiSwitch-root","PrivateSwitchBase-root","ant-input","ant-input-affix-wrapper","ant-input-group-addon","ant-input-number","ant-input-number-handler","ant-select","ant-select-selector","ant-select-selection-search","ant-select-dropdown","ant-cascader","ant-cascader-input","ant-picker","ant-picker-input","ant-time-picker","ant-calendar-picker","ant-slider","ant-slider-track","ant-slider-handle","ant-switch","ant-checkbox","ant-checkbox-wrapper","ant-radio","ant-radio-wrapper","ant-rate","ant-upload","ant-upload-drag","ant-form-item","ant-form-item-control","ant-btn","ant-dropdown","ant-dropdown-trigger","ant-menu","ant-menu-item","ant-tooltip","ant-popover","ant-modal","ant-drawer","ant-tree-select","ant-auto-complete","ant-mentions","ant-transfer","ui-input","ui-textarea","ui-select","ui-select-trigger","ui-select-content","ui-select-item","ui-button","ui-checkbox","ui-radio-group","ui-switch","ui-slider","ui-range-slider","ui-calendar","ui-date-picker","ui-combobox","ui-command","ui-command-input","ui-popover","ui-dialog","ui-sheet","ui-dropdown-menu","ui-context-menu","ui-menubar","ui-navigation-menu","ui-form","ui-form-control","ui-form-item","ui-form-field","ui-label","radix-ui","radix-select","radix-dropdown","radix-dialog","radix-popover","radix-accordion","radix-tabs","radix-slider","radix-switch","radix-checkbox","radix-radio","ql-editor","ql-container","ql-toolbar","ql-picker","ql-picker-label","ql-picker-options","ql-formats","ql-snow","ql-bubble","quill","quilleditor","monaco-editor","monaco-editor-background","view-lines","decorationsOverviewRuler","monaco-scrollable-element","CodeMirror","CodeMirror-code","CodeMirror-lines","CodeMirror-scroll","CodeMirror-sizer","cm-editor","cm-focused","cm-content","tox-editor-container","tox-editor-header","tox-edit-area","tox-tinymce","mce-content-body","ck-editor","ck-content","ck-toolbar","ck-editor__editable","ck-widget","slate-editor","slate-content","DraftEditor-root","DraftEditor-editorContainer","public-DraftEditor-content","ehfuse-editor","ehfuse-editor-wrapper","ehfuse-editor-content","ehfuse-toolbar","ehfuse-toolbar-group","ehfuse-cursor","text-editor","rich-text-editor","wysiwyg","ace_editor","ace_content"],Je=(a,p)=>{let g=a.tagName.toLowerCase(),x=["text","password","email","number","search","tel","url","checkbox","radio"];if(g==="input"){let M=a.type;return x.includes(M)}if(["textarea","select","button"].includes(g)||["svg","path","circle","rect","line","polygon","polyline"].includes(g)||a.getAttribute("contenteditable")==="true")return!0;if(p?.excludeSelectors){for(let M of p.excludeSelectors)if(a.matches(M))return!0}return st(a,p)},st=(a,p)=>{let g=[...lt,...p?.excludeClasses||[]],x=a,M=0,O=5;for(;x&&M<=O;){if(g.some(S=>x.classList.contains(S)))return!0;if(x.classList.contains("MuiDialogContent-root"))break;x=x.parentElement,M++}return!1},ct={},ut={},dt={},pt={},ft={},mt=(0,t.forwardRef)(({className:a="",style:p={},containerStyle:g={},contentStyle:x={},children:M,onScroll:O,thumb:S=ct,track:I=ut,arrows:$=dt,dragScroll:F=pt,autoHide:J=ft,showScrollbar:q=!0,detectInnerScroll:_=!1},N)=>{let G=(0,t.useRef)({});(0,t.useEffect)(()=>{G.current={children:M,onScroll:O,showScrollbar:q,thumb:S,track:I,arrows:$,dragScroll:F,autoHide:J}});let ue=(0,t.useRef)(null),d=(0,t.useRef)(null),U=(0,t.useRef)(null),de=(0,t.useRef)(null),he=(0,t.useRef)(null),j=(0,t.useRef)(null),[X,C]=(0,t.useState)(!1),[B,oe]=(0,t.useState)(!1),[ie,Me]=(0,t.useState)(!1),[ge,ke]=(0,t.useState)({y:0,scrollTop:0}),[ae,Ye]=(0,t.useState)(0),[qe,Pe]=(0,t.useState)(0),[Le,De]=(0,t.useState)(!1),[le,Be]=(0,t.useState)(!1),[be,Ve]=(0,t.useState)({x:0,y:0,scrollTop:0,scrollLeft:0}),[Xe,We]=(0,t.useState)(null),[we,Ee]=(0,t.useState)(null),[je,He]=(0,t.useState)(!1),z=(0,t.useRef)(null),[se,Ie]=(0,t.useState)(!1),pe=(0,t.useRef)(null),fe=(0,t.useRef)(null),K=(0,t.useRef)(null),P=(0,t.useMemo)(()=>{let e=S.color??"#606060";return{width:S.width??8,minHeight:S.minHeight??50,radius:S.radius??(S.width??8)/2,color:e,opacity:S.opacity??.6,hoverColor:S.hoverColor??e,hoverOpacity:S.hoverOpacity??1}},[S]),w=(0,t.useMemo)(()=>({width:I.width??16,color:I.color??"rgba(128, 128, 128, 0.1)",visible:I.visible??!0,alignment:I.alignment??"center",radius:I.radius??P.radius??4,margin:I.margin??4}),[I,P.radius]),Z=(0,t.useMemo)(()=>{let e=$.color??"#808080";return{visible:$.visible??!1,step:$.step??50,color:e,opacity:$.opacity??.6,hoverColor:$.hoverColor??e,hoverOpacity:$.hoverOpacity??1}},[$]),Re=(0,t.useMemo)(()=>({enabled:F.enabled??!0,excludeClasses:F.excludeClasses??[],excludeSelectors:F.excludeSelectors??[]}),[F]),v=(0,t.useMemo)(()=>({enabled:J.enabled??!0,delay:J.delay??1500,delayOnWheel:J.delayOnWheel??700}),[J]),E=P.width,Te=w.width,Oe=P.minHeight,V=Z.visible,Se=Z.step,re=(0,t.useCallback)(()=>{if(!d.current)return;let e=document.activeElement;e&&d.current.contains(e)&&e!==d.current||d.current.focus()},[]);(0,t.useImperativeHandle)(N,()=>({getScrollContainer:()=>d.current,scrollTo:e=>{d.current&&d.current.scrollTo(e)},get scrollTop(){return d.current?.scrollTop||0},get scrollHeight(){return d.current?.scrollHeight||0},get clientHeight(){return d.current?.clientHeight||0}}),[]);let H=(0,t.useCallback)(()=>{if(j.current){let o=j.current;if(document.contains(o)&&o.scrollHeight>o.clientHeight+2)return o;j.current=null}if(!d.current)return null;if(U.current&&U.current.scrollHeight>d.current.clientHeight+2)return j.current=d.current,d.current;if(!_)return null;let e=d.current.querySelectorAll('[data-virtuoso-scroller], [style*="overflow"], .virtuoso-scroller, [style*="overflow: auto"], [style*="overflow:auto"]');for(let o of e){let i=o;if(i!==d.current&&i.classList.contains("overlay-scrollbar-container"))continue;let u=i.parentElement,m=!1;for(;u&&u!==d.current;){if(u.classList.contains("overlay-scrollbar-container")&&u!==d.current){m=!0;break}u=u.parentElement}if(!m&&i.scrollHeight>i.clientHeight+2)return j.current=i,i}return null},[]),ce=(0,t.useCallback)(()=>H()!==null,[H]),n=(0,t.useCallback)(()=>{pe.current&&(clearTimeout(pe.current),pe.current=null)},[]),c=(0,t.useCallback)(()=>{fe.current&&(clearTimeout(fe.current),fe.current=null)},[]),R=(0,t.useCallback)(()=>{K.current&&(clearTimeout(K.current),K.current=null)},[]),y=(0,t.useCallback)(e=>{v.enabled&&(n(),pe.current=setTimeout(()=>{C(!1),pe.current=null},e))},[n,v.enabled]),b=(0,t.useCallback)(()=>{let e=H();if(!e){C(!1),De(!1),n();return}if(De(!0),!de.current)return;v.enabled||(C(!0),n());let o=e.clientHeight,i=e.scrollHeight,u=e.scrollTop,m=0;if(ue.current){let D=window.getComputedStyle(ue.current),ee=parseFloat(D.paddingTop)||0,te=parseFloat(D.paddingBottom)||0;m=ee+te}let h=V?E*2+w.margin*4:w.margin*2,T=o-h+m,k=o/i,Y=Math.max(T*k,Oe),Q=i-o,L=T-Y,ve=Q>0?u/Q*L:0;Ye(Y),Pe(ve)},[H,n,V,E,Oe,v.enabled]),r=(0,t.useCallback)(e=>{e.preventDefault(),e.stopPropagation();let o=H();o&&(oe(!0),ke({y:e.clientY,scrollTop:o.scrollTop}),n(),C(!0),re())},[H,n,re]),W=(0,t.useCallback)(e=>{if(!B)return;let o=H();if(!o)return;let i=o.clientHeight,u=o.scrollHeight-i,m=e.clientY-ge.y,h=i-ae,T=m/h*u,k=Math.max(0,Math.min(u,ge.scrollTop+T));o.scrollTop=k,b()},[B,ge,ae,b,H]),Ce=(0,t.useCallback)(()=>{oe(!1),ce()&&y(v.delay)},[ce,y,v.delay]),Fe=(0,t.useCallback)(e=>{if(!de.current)return;let o=de.current.getBoundingClientRect(),i=e.clientY-o.top,u=H();if(!u)return;let m=u.clientHeight,h=u.scrollHeight,T=i/m*(h-m);u.scrollTop=Math.max(0,Math.min(h-m,T)),b(),C(!0),y(v.delay),re()},[b,y,v.delay,H,re]),$e=(0,t.useCallback)(e=>{if(e.preventDefault(),e.stopPropagation(),!d.current)return;let o=Math.max(0,d.current.scrollTop-Se);d.current.scrollTop=o,b(),C(!0),y(v.delay),re()},[b,y,Se,v.delay,re]),_e=(0,t.useCallback)(e=>{if(e.preventDefault(),e.stopPropagation(),!d.current||!U.current)return;let o=d.current,i=U.current.scrollHeight-o.clientHeight,u=Math.min(i,o.scrollTop+Se);o.scrollTop=u,b(),C(!0),y(v.delay),re()},[b,y,Se,v.delay,re]),Ge=(0,t.useCallback)(e=>{if(!Re.enabled)return;let o=e.target;if(Je(o,Re)||e.button!==0)return;let i=H();i&&(i.scrollHeight<=i.clientHeight||(e.preventDefault(),Be(!0),Ve({x:e.clientX,y:e.clientY,scrollTop:i.scrollTop,scrollLeft:i.scrollLeft||0}),n()))},[Re,Je,H,n]),A=(0,t.useCallback)(e=>{if(!le)return;let o=H();if(!o)return;let i=be.x-e.clientX,u=be.y-e.clientY;if(Math.abs(u)<3&&Math.abs(i)<3)return;C(!0);let m=Math.max(0,Math.min(o.scrollHeight-o.clientHeight,be.scrollTop+u));o.scrollTop=m,b()},[le,be,H,b]),ye=(0,t.useCallback)(()=>{Be(!1),ce()&&y(v.delay)},[ce,y,v.delay]);(0,t.useEffect)(()=>{let e=h=>{b(),n(),C(!0);let T=se?v.delayOnWheel:v.delay;y(T),O&&O(h)},o=()=>{Ie(!0),z.current&&clearTimeout(z.current),z.current=setTimeout(()=>{Ie(!1)},300),n(),R(),K.current=setTimeout(()=>{C(!0),K.current=null},50)},i=[],u=H();u&&i.push(u);let m=d.current;return m&&!u&&(i.push(m),m.querySelectorAll('[data-virtuoso-scroller], [style*="overflow"], .virtuoso-scroller, [style*="overflow: auto"], [style*="overflow:auto"]').forEach(h=>{let T=h;if(T!==m&&T.classList.contains("overlay-scrollbar-container"))return;let k=T.parentElement;for(;k&&k!==m;){if(k.classList.contains("overlay-scrollbar-container")&&k!==m)return;k=k.parentElement}i.push(T)})),i.forEach(h=>{h.addEventListener("scroll",e,{passive:!0}),h.addEventListener("wheel",o,{passive:!0})}),()=>{i.forEach(h=>{h.removeEventListener("scroll",e),h.removeEventListener("wheel",o)}),z.current&&clearTimeout(z.current),K.current&&clearTimeout(K.current)}},[H,b,O,n,y,v,se]),(0,t.useEffect)(()=>{let e=i=>{let u=H();if(!u)return;let{key:m}=i,{scrollTop:h,scrollHeight:T,clientHeight:k}=u,Y=T-k,Q=50,L=null;switch(m){case"ArrowUp":i.preventDefault(),L=Math.max(0,h-Q);break;case"ArrowDown":i.preventDefault(),L=Math.min(Y,h+Q);break;case"PageUp":i.preventDefault(),L=Math.max(0,h-k);break;case"PageDown":i.preventDefault(),L=Math.min(Y,h+k);break;case"Home":i.preventDefault(),L=0;break;case"End":i.preventDefault(),L=Y;break;default:return}if(L!==null){let ve=L/Y,D=V?E*2+w.margin*4:w.margin*2,ee=(k-D-ae)*ve;Pe(ee),u.scrollTop=L,n(),C(!0),y(v.delay)}},o=d.current;if(o)return o.addEventListener("keydown",e),()=>{o.removeEventListener("keydown",e)}},[H,V,E,w.margin,ae,n,y,v.delay]),(0,t.useEffect)(()=>{if(le)return document.addEventListener("mousemove",A),document.addEventListener("mouseup",ye),()=>{document.removeEventListener("mousemove",A),document.removeEventListener("mouseup",ye)}},[le,A,ye]),(0,t.useEffect)(()=>{if(B)return document.addEventListener("mousemove",W),document.addEventListener("mouseup",Ce),()=>{document.removeEventListener("mousemove",W),document.removeEventListener("mouseup",Ce)}},[B,W,Ce]),(0,t.useEffect)(()=>{b();let e=setTimeout(()=>{b()},100);return()=>clearTimeout(e)},[b]),(0,t.useLayoutEffect)(()=>{He(!0),b(),!v.enabled&&ce()&&C(!0)},[ce,b,v.enabled]),(0,t.useEffect)(()=>{let e=new ResizeObserver(()=>{b()}),o=[];return d.current&&o.push(d.current),U.current&&o.push(U.current),j.current&&document.contains(j.current)&&o.push(j.current),o.forEach(i=>{e.observe(i)}),()=>e.disconnect()},[b]),(0,t.useEffect)(()=>{if(!d.current)return;let e=new MutationObserver(()=>{j.current=null,b()});return e.observe(d.current,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["style"]}),()=>e.disconnect()},[b]);let me=Math.max(Te,E);return(0,t.useEffect)(()=>{let e="overlay-scrollbar-webkit-hide",o=document.getElementById(e);o&&o.remove();let i=document.createElement("style");return i.id=e,i.textContent=`
2
2
  .overlay-scrollbar-container::-webkit-scrollbar {
3
3
  display: none !important;
4
4
  width: 0 !important;
@@ -18,7 +18,7 @@
18
18
  outline: 2px solid rgba(0, 123, 255, 0.5);
19
19
  outline-offset: -2px;
20
20
  }
21
- `,document.head.appendChild(o),()=>{let d=document.getElementById(e);d&&d.remove()}},[]),(0,ne.jsxs)("div",{ref:de,className:`overlay-scrollbar-wrapper ${a}`,style:{display:"flex",flexDirection:"column",position:"relative",minHeight:0,height:"100%",flex:"1 1 0%",...p},children:[(0,ne.jsx)("div",{ref:u,className:"overlay-scrollbar-container",tabIndex:-1,onMouseDown:ge,style:{display:"flex",width:"100%",flex:"1 1 auto",minHeight:0,overflow:"auto",scrollbarWidth:"none",msOverflowStyle:"none",outline:"none",userSelect:R?"none":"auto",...g},children:(0,ne.jsx)("div",{ref:V,className:"overlay-scrollbar-content",style:{flex:"1 1 0%",minHeight:0,display:"flex",flexDirection:"column",...b},children:y})}),z&&ve&&(0,ne.jsxs)("div",{ref:pe,className:"overlay-scrollbar-track",onMouseEnter:()=>{H(),se.current=setTimeout(()=>{T(!0),se.current=null},100)},onMouseLeave:()=>{Ve(),E||C(n.delay)},style:{position:"absolute",top:0,right:0,width:`${K}px`,height:"100%",opacity:ye?1:0,transition:"opacity 0.2s ease-in-out",cursor:"pointer",zIndex:1e3,pointerEvents:"auto"},children:[x.visible&&(0,ne.jsx)("div",{className:"overlay-scrollbar-track-background",onClick:e=>{e.preventDefault(),e.stopPropagation(),te(e)},style:{position:"absolute",top:t?`${$.width+x.margin*2}px`:`${x.margin}px`,right:x.alignment==="right"?"0px":`${(K-$.width)/2}px`,width:`${$.width}px`,height:t?`calc(100% - ${$.width*2+x.margin*4}px)`:`calc(100% - ${x.margin*2}px)`,backgroundColor:x.color,borderRadius:`${x.radius}px`,cursor:"pointer"}}),(0,ne.jsx)("div",{ref:be,className:"overlay-scrollbar-thumb",onMouseDown:Ee,onMouseEnter:()=>ke(!0),onMouseLeave:()=>ke(!1),style:{position:"absolute",top:`${(t?m+x.margin*2:x.margin)+Ae}px`,right:x.alignment==="right"?"0px":`${(K-m)/2}px`,width:`${m}px`,height:`${Math.max(oe,_)}px`,backgroundColor:Q||E?$.hoverColor:$.color,opacity:Q||E?$.hoverOpacity:$.opacity,borderRadius:`${$.radius}px`,cursor:"pointer",transition:"background-color 0.2s ease-in-out, opacity 0.2s ease-in-out"}})]}),z&&ve&&t&&(0,ne.jsx)("div",{className:"overlay-scrollbar-up-arrow",onClick:U,onMouseEnter:()=>he("up"),onMouseLeave:()=>he(null),style:{position:"absolute",top:`${x.margin}px`,right:x.alignment==="right"?"0px":`${(K-m)/2}px`,width:`${m}px`,height:`${m}px`,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",fontSize:`${Math.max(m*.75,8)}px`,color:le==="up"?A.hoverColor:A.color,userSelect:"none",zIndex:1001,opacity:ye?le==="up"?A.hoverOpacity:A.opacity:0,transition:"opacity 0.2s ease-in-out, color 0.15s ease-in-out"},children:"\u25B2"}),z&&ve&&t&&(0,ne.jsx)("div",{className:"overlay-scrollbar-down-arrow",onClick:X,onMouseEnter:()=>he("down"),onMouseLeave:()=>he(null),style:{position:"absolute",bottom:`${x.margin}px`,right:x.alignment==="right"?"0px":`${(K-m)/2}px`,width:`${m}px`,height:`${m}px`,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",fontSize:`${Math.max(m*.75,8)}px`,color:le==="down"?A.hoverColor:A.color,userSelect:"none",zIndex:1001,opacity:ye?le==="down"?A.hoverOpacity:A.opacity:0,transition:"opacity 0.2s ease-in-out, color 0.15s ease-in-out"},children:"\u25BC"})]})}),Ke=mt;var s=require("react/jsx-runtime"),ht={alignment:"right",margin:0,radius:0};function gt({data:a,loading:p=!1,columns:g,onRowClick:b,getRowId:y,selectedRowId:k,selectedRowSx:w,rowHeight:P=50,columnHeight:L=56,striped:Y,rowDivider:Z=!0,onSort:z,onLoadMore:q,sortBy:D,sortDirection:W,showPaper:de=!0,paddingX:u="1rem",paddingTop:V=0,paddingBottom:pe=0,rowHoverColor:be,rowHoverOpacity:I,scrollbars:ye,emptyMessage:T="NO DATA",LoadingComponent:E}){let fe=(0,c.useMemo)(()=>(0,c.forwardRef)((l,n)=>{let m=(0,c.useRef)(null);return(0,s.jsx)(Ke,{detectInnerScroll:!0,track:ht,...ye,children:(0,s.jsx)(f.TableContainer,{component:f.Box,...l,ref:B=>{m.current=B,typeof n=="function"?n(B):n&&(n.current=B)},sx:{userSelect:"auto",WebkitUserSelect:"auto",position:"relative",width:"100%",height:"100%",overflow:"auto",display:"flex",flexDirection:"column",scrollbarWidth:"none",msOverflowStyle:"none",transform:"translateZ(0)",backfaceVisibility:"hidden",willChange:"scroll-position","&::-webkit-scrollbar":{display:"none"},"& .MuiTable-root":{paddingRight:u,paddingTop:V,paddingBottom:pe}}})})}),[]),Q=(0,c.useMemo)(()=>{if(Y===!0)return"#f5f5f5";if(typeof Y=="string")return Y},[Y]),[ke,me]=(0,c.useState)(p),[He,oe]=(0,c.useState)(0);(0,c.useEffect)(()=>{p&&me(!0)},[p]);let Ne=(0,c.useCallback)(()=>{me(!1)},[]),Ae=ke,Ye=p&&a.length>0,ve=(0,c.useRef)(!1),Le=(0,c.useRef)(null),R=(0,c.useRef)(null),ie=(0,c.useRef)(!1),xe=(0,c.useRef)({x:0,y:0,scrollTop:0}),Pe=(0,c.useRef)(!1),qe=(0,c.useRef)(0),Ie=(0,c.useRef)(0),le=(0,c.useRef)(!1),he=(0,c.useRef)({x:0,y:0}),Qe=(0,c.useRef)(null),We=(0,c.useCallback)(l=>{},[]),ae=(0,c.useCallback)(l=>{if(!Pe.current||!R.current)return;let n=l.clientY-xe.current.y;if(!ie.current&&Math.abs(n)>5&&(ie.current=!0,R.current&&(R.current.style.userSelect="none")),ie.current){let B=n*2;Ie.current+=-B;let _=R.current,t=Math.max(0,qe.current+Ie.current);_.scrollTop=t,xe.current.y=l.clientY,l.preventDefault()}},[]),De=(0,c.useCallback)(()=>{if(Pe.current=!1,ie.current&&R.current){let l=Math.max(0,qe.current+Ie.current),n=()=>{R.current&&(R.current.scrollTop=l)};n(),setTimeout(n,1),setTimeout(n,5),setTimeout(n,10)}ie.current=!1,Ie.current=0,R.current&&(R.current.style.userSelect="auto")},[]);(0,c.useEffect)(()=>{let l=document.querySelector('[data-testid="virtuoso-scroller"]');l&&l.querySelectorAll(".MuiTableSortLabel-root").forEach(m=>{let B=new MouseEvent("mouseleave",{bubbles:!0,cancelable:!0});m.dispatchEvent(B)})},[D]);let we=(0,c.useCallback)(l=>{if(!z)return;z(l,D===l&&W==="asc"?"desc":"asc")},[z,D,W]),Me=(0,c.useCallback)(l=>{if(!q||p&&a.length===0)return;let n=Date.now(),m=window.lastRangeChangeTime||0;if(n-m<100)return;window.lastRangeChangeTime=n;let B=Math.max(10,Math.floor(a.length*.1)),_=l.endIndex>=a.length-B,t=a.length>=30;if(_&&t&&q&&!ve.current){ve.current=!0;let j=a.length;q(j,50)}},[a.length,p,q]);(0,c.useEffect)(()=>{p||(ve.current=!1)},[p]),(0,c.useEffect)(()=>{a.length===0&&oe(l=>l+1)},[a.length]);let se=(0,c.useRef)(a.length);(0,c.useEffect)(()=>{let l=se.current,n=a.length;if(n>l&&l>0){se.current=n;return}Le.current&&n>0&&n<=l&&Le.current.scrollToIndex({index:0,align:"start",behavior:"auto"}),se.current=n},[a]),(0,c.useEffect)(()=>(document.addEventListener("mousemove",ae),document.addEventListener("mouseup",De),()=>{document.removeEventListener("mousemove",ae),document.removeEventListener("mouseup",De)}),[ae,De]);let ce=(0,c.useCallback)(()=>{let l={},n=[];if(g.forEach(t=>{t.group?(l[t.group]||(l[t.group]=[]),l[t.group].push(t)):n.push(t)}),!(Object.keys(l).length>0))return(0,s.jsx)(f.TableRow,{children:g.map(t=>(0,s.jsx)(f.TableCell,{align:t.align||"left",style:{width:t.width,minWidth:t.width,...t.style,fontWeight:"bold",position:"sticky",top:0,zIndex:2,padding:"16px"},children:t.sortable?(0,s.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:t.align==="center"?"center":t.align==="right"?"flex-end":"flex-start",position:"relative",width:"100%"},children:(0,s.jsxs)(f.Box,{sx:{position:"relative",cursor:"default","&:hover .MuiTableSortLabel-root":{opacity:"1 !important","& .MuiSvgIcon-root":{color:"#000",opacity:"1 !important"}}},onClick:()=>we(String(t.id)),children:[t.text,(0,s.jsx)(f.TableSortLabel,{active:D===t.id,direction:D===t.id?W:"desc",sx:{position:"absolute",left:"100%",top:"50%",transform:"translateY(-50%)",marginLeft:"4px",minWidth:"auto",width:"16px",height:"16px",cursor:"default",opacity:D===t.id?1:0,transition:"opacity 0.2s ease","& .MuiTableSortLabel-icon":{position:"relative",marginLeft:0,marginRight:0,opacity:1,transition:"color 0.2s ease"},"& .MuiTableSortLabel-iconDirectionAsc":{transform:"rotate(180deg)"},"& .MuiTableSortLabel-iconDirectionDesc":{transform:"rotate(0deg)"}}})]})}):t.text},String(t.id)))});let B=[...n.map(t=>(0,s.jsx)(f.TableCell,{rowSpan:2,align:t.align||"left",style:{width:t.width,minWidth:t.width,...t.style,fontWeight:"bold",position:"sticky",top:0,zIndex:2,padding:"16px"},children:t.sortable&&z?(0,s.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:t.align==="center"?"center":t.align==="right"?"flex-end":"flex-start",position:"relative",width:"100%"},children:(0,s.jsxs)(f.Box,{sx:{position:"relative",cursor:"default","&:hover .MuiTableSortLabel-root":{opacity:"1 !important","& .MuiSvgIcon-root":{color:"#000",opacity:"1 !important"}}},onClick:()=>we(String(t.id)),children:[t.text,(0,s.jsx)(f.TableSortLabel,{active:D===t.id,direction:D===t.id?W:"desc",sx:{position:"absolute",left:"100%",top:"50%",transform:"translateY(-50%)",marginLeft:"4px",minWidth:"auto",width:"16px",height:"16px",cursor:"default",opacity:D===t.id?1:0,transition:"opacity 0.2s ease","&:hover":{opacity:"1 !important","& .MuiSvgIcon-root":{color:"#000",opacity:"1 !important"}},"& .MuiTableSortLabel-icon":{position:"relative",marginLeft:0,marginRight:0,opacity:1,transition:"color 0.2s ease"},"& .MuiTableSortLabel-iconDirectionAsc":{transform:"rotate(180deg)"},"& .MuiTableSortLabel-iconDirectionDesc":{transform:"rotate(0deg)"}}})]})}):t.text},String(t.id))),...Object.entries(l).map(([t,j])=>(0,s.jsx)(f.TableCell,{align:"center",colSpan:j.length,style:{fontWeight:"bold",position:"sticky",top:0,zIndex:2,padding:"16px"},children:t},t))],_=[...Object.values(l).flat().map(t=>(0,s.jsx)(f.TableCell,{align:t.align||"left",style:{width:t.width,minWidth:t.width,...t.style,fontWeight:"bold",position:"sticky",top:0,zIndex:2,padding:"16px"},children:t.sortable&&z?(0,s.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:t.align==="center"?"center":t.align==="right"?"flex-end":"flex-start",position:"relative",width:"100%"},children:(0,s.jsxs)(f.Box,{sx:{position:"relative",cursor:"default","&:hover .MuiTableSortLabel-root":{opacity:"1 !important","& .MuiSvgIcon-root":{color:"#000",opacity:"1 !important"}}},onClick:()=>we(String(t.id)),children:[t.text,(0,s.jsx)(f.TableSortLabel,{active:D===t.id,direction:D===t.id?W:"desc",sx:{position:"absolute",left:"100%",top:"50%",transform:"translateY(-50%)",marginLeft:"4px",minWidth:"auto",width:"16px",height:"16px",cursor:"default",opacity:D===t.id?1:0,transition:"opacity 0.2s ease","&:hover":{opacity:"1 !important","& .MuiSvgIcon-root":{color:"#000",opacity:"1 !important"}},"& .MuiTableSortLabel-icon":{position:"relative",marginLeft:0,marginRight:0,opacity:1,transition:"color 0.2s ease"},"& .MuiTableSortLabel-iconDirectionAsc":{transform:"rotate(0deg)"},"& .MuiTableSortLabel-iconDirectionDesc":{transform:"rotate(180deg)"}}})]})}):t.text},String(t.id)))];return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(f.TableRow,{children:B}),(0,s.jsx)(f.TableRow,{children:_})]})},[g,D,W,we,z,L]),$=(0,c.useCallback)((l,n)=>n?(0,s.jsx)(s.Fragment,{children:g.map(m=>(0,s.jsx)(f.TableCell,{align:m.align||"left",style:{width:m.width,minWidth:m.width,...m.style,padding:"8px 16px"},children:m.render?m.render(n,l):String(n[m.id]||"")},String(m.id)))}):(console.log("rowContent - \uC544\uC774\uD15C \uC5C6\uC74C, \uC778\uB371\uC2A4:",l),null),[g]),x=(0,c.useMemo)(()=>({Scroller:fe,Table:l=>(0,s.jsx)(f.Table,{...l,sx:{borderCollapse:"separate",tableLayout:"fixed",marginRight:"16px"}}),TableHead:(0,c.forwardRef)((l,n)=>(0,s.jsx)(f.TableHead,{...l,ref:n,sx:{userSelect:"none","& tr":{height:L,"& th":{padding:"16px",position:"sticky",top:0,zIndex:2,fontWeight:"bold"}}}})),TableRow:l=>{let{item:n,selected:m,"aria-selected":B,className:_,...t}=l,j=t["data-index"]??0,G=j%2===1,S=n&&y?y(n,j):j,ee=k!=null&&S===k,H=ee&&w?typeof w=="function"?w(n,j):w:void 0,Ve=String(_??"").split(/\s+/).filter(F=>F!=="Mui-selected"&&F!=="Mui-focusVisible").join(" ");return(0,s.jsx)(f.TableRow,{...t,className:Ve||void 0,selected:ee,onMouseDown:F=>{le.current=!1,he.current={x:F.clientX,y:F.clientY}},onMouseMove:F=>{let C=Math.abs(F.clientX-he.current.x),v=Math.abs(F.clientY-he.current.y),Ee=5;(C>Ee||v>Ee)&&(le.current=!0)},onClick:()=>{!le.current&&!ie.current&&n&&b&&b(n,j),le.current=!1},sx:[{userSelect:"none",height:P,backgroundColor:G&&Q?Q:"transparent","& td":{padding:"8px 16px",borderBottom:Z?"1px solid rgba(224, 224, 224, 1)":"none"},"& th":{padding:"8px 16px",borderBottom:"none"},"&:hover":b&&!ee?{backgroundColor:F=>{let C=F.palette.mode==="dark",Ee=be??"#000000",Re=I??.06,Te=Ee.replace("#",""),te=parseInt(Te.substring(0,2),16)/255,U=parseInt(Te.substring(2,4),16)/255,X=parseInt(Te.substring(4,6),16)/255;if(C){let ge=Math.max(te,U,X),ue=Math.min(te,U,X),re=0,K=0,e=(ge+ue)/2;if(ge!==ue){let o=ge-ue;switch(K=e>.5?o/(2-ge-ue):o/(ge+ue),ge){case te:re=((U-X)/o+(U<X?6:0))/6;break;case U:re=((X-te)/o+2)/6;break;case X:re=((te-U)/o+4)/6;break}}e=1-e;let i=(o,d,h)=>(h<0&&(h+=1),h>1&&(h-=1),h<1/6?o+(d-o)*6*h:h<1/2?d:h<2/3?o+(d-o)*(2/3-h)*6:o);if(K===0)te=U=X=e;else{let o=e<.5?e*(1+K):e+K-e*K,d=2*e-o;te=i(d,o,re+1/3),U=i(d,o,re),X=i(d,o,re-1/3)}}return`rgba(${Math.round(te*255)}, ${Math.round(U*255)}, ${Math.round(X*255)}, ${Re})`}}:void 0,cursor:b?"pointer":void 0},H]})},TableBody:(0,c.forwardRef)((l,n)=>(0,s.jsx)(f.TableBody,{...l,ref:n}))}),[b,y,k,w,P,We,Q,Z,L,be,I,fe]),A=(0,s.jsxs)(f.Box,{sx:{position:"relative",height:"100%",width:"100%","& .MuiTableHead-root":{backgroundColor:l=>l.palette.mode==="dark"?"#1e1e1e !important":"#ffffff !important"}},children:[(0,s.jsx)(Je.TableVirtuoso,{ref:Le,data:a,totalCount:q?a.length+1:a.length,fixedHeaderContent:ce,itemContent:$,rangeChanged:Me,components:x,style:{height:"100%"},increaseViewportBy:{top:100,bottom:300},overscan:5,followOutput:!1},He),a.length===0&&!p&&(0,s.jsx)(f.Box,{sx:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:2},children:typeof T=="string"?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(f.Box,{sx:{width:48,height:48,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"50%",backgroundColor:"#f5f5f5",color:"#999"},children:"\u{1F4C4}"}),(0,s.jsx)(f.Typography,{variant:"body1",sx:{color:"text.secondary"},children:T})]}):T}),Ae&&(0,s.jsx)(s.Fragment,{children:E?(0,s.jsx)(E,{visible:p,onComplete:Ne}):(0,s.jsx)(Ue,{visible:p,onComplete:Ne,size:40,sx:{top:`${g.some(l=>l.group)?L*2:L}px`},background:{show:a.length===0,opacity:.8}})})]});return de?(0,s.jsx)(f.Paper,{className:"grow",elevation:1,sx:{padding:0,paddingLeft:u,height:"100%",minHeight:0,flex:1,display:"flex",flexDirection:"column"},children:A}):(0,s.jsx)(f.Box,{className:"grow",style:{padding:0,paddingLeft:u,height:"100%",minHeight:0,flex:1,display:"flex",flexDirection:"column"},children:A})}var Ze=(0,c.memo)(gt);
21
+ `,document.head.appendChild(i),()=>{let u=document.getElementById(e);u&&u.remove()}},[]),(0,ne.jsxs)("div",{ref:ue,className:`overlay-scrollbar-wrapper ${a}`,style:{display:"flex",flexDirection:"column",position:"relative",minHeight:0,height:"100%",flex:"1 1 0%",...p},children:[(0,ne.jsx)("div",{ref:d,className:"overlay-scrollbar-container",tabIndex:-1,onMouseDown:Ge,style:{display:"flex",width:"100%",flex:"1 1 auto",minHeight:0,overflow:"auto",scrollbarWidth:"none",msOverflowStyle:"none",outline:"none",userSelect:le?"none":"auto",...g},children:(0,ne.jsx)("div",{ref:U,className:"overlay-scrollbar-content",style:{flex:"1 1 0%",minHeight:0,display:"flex",flexDirection:"column",...x},children:M})}),q&&Le&&(0,ne.jsxs)("div",{ref:de,className:"overlay-scrollbar-track",onMouseEnter:()=>{n(),fe.current=setTimeout(()=>{C(!0),fe.current=null},100)},onMouseLeave:()=>{c(),B||y(v.delay)},style:{position:"absolute",top:0,right:0,width:`${me}px`,height:"100%",opacity:X?1:0,transition:"opacity 0.2s ease-in-out",cursor:"pointer",zIndex:1e3,pointerEvents:"auto"},children:[w.visible&&(0,ne.jsx)("div",{className:"overlay-scrollbar-track-background",onClick:e=>{e.preventDefault(),e.stopPropagation(),Fe(e)},style:{position:"absolute",top:V?`${P.width+w.margin*2}px`:`${w.margin}px`,right:w.alignment==="right"?"0px":`${(me-P.width)/2}px`,width:`${P.width}px`,height:V?`calc(100% - ${P.width*2+w.margin*4}px)`:`calc(100% - ${w.margin*2}px)`,backgroundColor:w.color,borderRadius:`${w.radius}px`,cursor:"pointer"}}),(0,ne.jsx)("div",{ref:he,className:"overlay-scrollbar-thumb",onMouseDown:r,onMouseEnter:()=>Me(!0),onMouseLeave:()=>Me(!1),style:{position:"absolute",top:`${(V?E+w.margin*2:w.margin)+qe}px`,right:w.alignment==="right"?"0px":`${(me-E)/2}px`,width:`${E}px`,height:`${Math.max(ae,Oe)}px`,backgroundColor:ie||B?P.hoverColor:P.color,opacity:ie||B?P.hoverOpacity:P.opacity,borderRadius:`${P.radius}px`,cursor:"pointer",transition:"background-color 0.2s ease-in-out, opacity 0.2s ease-in-out"}})]}),q&&Le&&V&&(0,ne.jsx)("div",{className:"overlay-scrollbar-up-arrow",onClick:$e,onMouseEnter:()=>Ee("up"),onMouseLeave:()=>Ee(null),style:{position:"absolute",top:`${w.margin}px`,right:w.alignment==="right"?"0px":`${(me-E)/2}px`,width:`${E}px`,height:`${E}px`,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",fontSize:`${Math.max(E*.75,8)}px`,color:we==="up"?Z.hoverColor:Z.color,userSelect:"none",zIndex:1001,opacity:X?we==="up"?Z.hoverOpacity:Z.opacity:0,transition:"opacity 0.2s ease-in-out, color 0.15s ease-in-out"},children:"\u25B2"}),q&&Le&&V&&(0,ne.jsx)("div",{className:"overlay-scrollbar-down-arrow",onClick:_e,onMouseEnter:()=>Ee("down"),onMouseLeave:()=>Ee(null),style:{position:"absolute",bottom:`${w.margin}px`,right:w.alignment==="right"?"0px":`${(me-E)/2}px`,width:`${E}px`,height:`${E}px`,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",fontSize:`${Math.max(E*.75,8)}px`,color:we==="down"?Z.hoverColor:Z.color,userSelect:"none",zIndex:1001,opacity:X?we==="down"?Z.hoverOpacity:Z.opacity:0,transition:"opacity 0.2s ease-in-out, color 0.15s ease-in-out"},children:"\u25BC"})]})}),Ze=mt;var l=require("react/jsx-runtime"),ht={alignment:"right",margin:0,radius:0};function gt({data:a,loading:p=!1,columns:g,onRowClick:x,getRowId:M,selectedRowId:O,selectedRowSx:S,rowHeight:I=50,columnHeight:$=56,striped:F,rowDivider:J=!0,onSort:q,onLoadMore:_,sortBy:N,sortDirection:G,showPaper:ue=!0,paddingX:d="1rem",paddingTop:U=0,paddingBottom:de=0,rowHoverColor:he,rowHoverOpacity:j,viewportBuffer:X,overscan:C,scrollbars:B,emptyMessage:oe="NO DATA",LoadingComponent:ie}){let Me=Math.max(I*20,900),ge=Math.max(I*20,900),ke=typeof X=="number"?X:X?.top??Me,ae=typeof X=="number"?X:X?.bottom??ge,Ye=Math.max(I*15,800),qe=Math.max(I*20,1e3),Pe=typeof C=="number"?C:{main:C?.main??Ye,reverse:C?.reverse??qe},Le=I+(J?1:0),De=(0,s.useMemo)(()=>(0,s.forwardRef)((n,c)=>{let R=(0,s.useRef)(null);return(0,l.jsx)(Ze,{detectInnerScroll:!0,track:ht,...B,children:(0,l.jsx)(f.TableContainer,{component:f.Box,...n,ref:y=>{R.current=y,typeof c=="function"?c(y):c&&(c.current=y)},sx:{userSelect:"auto",WebkitUserSelect:"auto",position:"relative",width:"100%",height:"100%",overflow:"auto",display:"flex",flexDirection:"column",scrollbarWidth:"none",msOverflowStyle:"none",transform:"translateZ(0)",backfaceVisibility:"hidden",willChange:"scroll-position","&::-webkit-scrollbar":{display:"none"},"& .MuiTable-root":{paddingRight:d,paddingTop:U,paddingBottom:de}}})})}),[]),le=(0,s.useMemo)(()=>{if(F===!0)return"#f5f5f5";if(typeof F=="string")return F},[F]),[Be,be]=(0,s.useState)(p),[Ve,Xe]=(0,s.useState)(0);(0,s.useEffect)(()=>{p&&be(!0)},[p]);let We=(0,s.useCallback)(()=>{be(!1)},[]),we=Be,Ee=p&&a.length>0,je=(0,s.useRef)(!1),He=(0,s.useRef)(null),z=(0,s.useRef)(null),se=(0,s.useRef)(!1),Ie=(0,s.useRef)({x:0,y:0,scrollTop:0}),pe=(0,s.useRef)(!1),fe=(0,s.useRef)(0),K=(0,s.useRef)(0),P=(0,s.useRef)(!1),w=(0,s.useRef)({x:0,y:0}),Z=(0,s.useRef)(null),Re=(0,s.useCallback)(n=>{},[]),v=(0,s.useCallback)(n=>{if(!pe.current||!z.current)return;let c=n.clientY-Ie.current.y;if(!se.current&&Math.abs(c)>5&&(se.current=!0,z.current&&(z.current.style.userSelect="none")),se.current){let y=c*2;K.current+=-y;let b=z.current,r=Math.max(0,fe.current+K.current);b.scrollTop=r,Ie.current.y=n.clientY,n.preventDefault()}},[]),E=(0,s.useCallback)(()=>{if(pe.current=!1,se.current&&z.current){let n=Math.max(0,fe.current+K.current),c=()=>{z.current&&(z.current.scrollTop=n)};c(),setTimeout(c,1),setTimeout(c,5),setTimeout(c,10)}se.current=!1,K.current=0,z.current&&(z.current.style.userSelect="auto")},[]);(0,s.useEffect)(()=>{let n=document.querySelector('[data-testid="virtuoso-scroller"]');n&&n.querySelectorAll(".MuiTableSortLabel-root").forEach(R=>{let y=new MouseEvent("mouseleave",{bubbles:!0,cancelable:!0});R.dispatchEvent(y)})},[N]);let Te=(0,s.useCallback)(n=>{if(!q)return;q(n,N===n&&G==="asc"?"desc":"asc")},[q,N,G]),Oe=(0,s.useCallback)(n=>{if(!_||p&&a.length===0)return;let c=Date.now(),R=window.lastRangeChangeTime||0;if(c-R<100)return;window.lastRangeChangeTime=c;let y=Math.max(10,Math.floor(a.length*.1)),b=n.endIndex>=a.length-y,r=a.length>=30;if(b&&r&&_&&!je.current){je.current=!0;let W=a.length;_(W,50)}},[a.length,p,_]);(0,s.useEffect)(()=>{p||(je.current=!1)},[p]),(0,s.useEffect)(()=>{a.length===0&&Xe(n=>n+1)},[a.length]);let V=(0,s.useRef)(a.length);(0,s.useEffect)(()=>{let n=V.current,c=a.length;if(c>n&&n>0){V.current=c;return}He.current&&c>0&&c<=n&&He.current.scrollToIndex({index:0,align:"start",behavior:"auto"}),V.current=c},[a]),(0,s.useEffect)(()=>(document.addEventListener("mousemove",v),document.addEventListener("mouseup",E),()=>{document.removeEventListener("mousemove",v),document.removeEventListener("mouseup",E)}),[v,E]);let Se=(0,s.useCallback)(()=>{let n={},c=[];if(g.forEach(r=>{r.group?(n[r.group]||(n[r.group]=[]),n[r.group].push(r)):c.push(r)}),!(Object.keys(n).length>0))return(0,l.jsx)(f.TableRow,{children:g.map(r=>(0,l.jsx)(f.TableCell,{align:r.align||"left",style:{width:r.width,minWidth:r.width,...r.style,fontWeight:"bold",position:"sticky",top:0,zIndex:2,padding:"16px"},children:r.sortable?(0,l.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:r.align==="center"?"center":r.align==="right"?"flex-end":"flex-start",position:"relative",width:"100%"},children:(0,l.jsxs)(f.Box,{sx:{position:"relative",cursor:"default","&:hover .MuiTableSortLabel-root":{opacity:"1 !important","& .MuiSvgIcon-root":{color:"#000",opacity:"1 !important"}}},onClick:()=>Te(String(r.id)),children:[r.text,(0,l.jsx)(f.TableSortLabel,{active:N===r.id,direction:N===r.id?G:"desc",sx:{position:"absolute",left:"100%",top:"50%",transform:"translateY(-50%)",marginLeft:"4px",minWidth:"auto",width:"16px",height:"16px",cursor:"default",opacity:N===r.id?1:0,transition:"opacity 0.2s ease","& .MuiTableSortLabel-icon":{position:"relative",marginLeft:0,marginRight:0,opacity:1,transition:"color 0.2s ease"},"& .MuiTableSortLabel-iconDirectionAsc":{transform:"rotate(180deg)"},"& .MuiTableSortLabel-iconDirectionDesc":{transform:"rotate(0deg)"}}})]})}):r.text},String(r.id)))});let y=[...c.map(r=>(0,l.jsx)(f.TableCell,{rowSpan:2,align:r.align||"left",style:{width:r.width,minWidth:r.width,...r.style,fontWeight:"bold",position:"sticky",top:0,zIndex:2,padding:"16px"},children:r.sortable&&q?(0,l.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:r.align==="center"?"center":r.align==="right"?"flex-end":"flex-start",position:"relative",width:"100%"},children:(0,l.jsxs)(f.Box,{sx:{position:"relative",cursor:"default","&:hover .MuiTableSortLabel-root":{opacity:"1 !important","& .MuiSvgIcon-root":{color:"#000",opacity:"1 !important"}}},onClick:()=>Te(String(r.id)),children:[r.text,(0,l.jsx)(f.TableSortLabel,{active:N===r.id,direction:N===r.id?G:"desc",sx:{position:"absolute",left:"100%",top:"50%",transform:"translateY(-50%)",marginLeft:"4px",minWidth:"auto",width:"16px",height:"16px",cursor:"default",opacity:N===r.id?1:0,transition:"opacity 0.2s ease","&:hover":{opacity:"1 !important","& .MuiSvgIcon-root":{color:"#000",opacity:"1 !important"}},"& .MuiTableSortLabel-icon":{position:"relative",marginLeft:0,marginRight:0,opacity:1,transition:"color 0.2s ease"},"& .MuiTableSortLabel-iconDirectionAsc":{transform:"rotate(180deg)"},"& .MuiTableSortLabel-iconDirectionDesc":{transform:"rotate(0deg)"}}})]})}):r.text},String(r.id))),...Object.entries(n).map(([r,W])=>(0,l.jsx)(f.TableCell,{align:"center",colSpan:W.length,style:{fontWeight:"bold",position:"sticky",top:0,zIndex:2,padding:"16px"},children:r},r))],b=[...Object.values(n).flat().map(r=>(0,l.jsx)(f.TableCell,{align:r.align||"left",style:{width:r.width,minWidth:r.width,...r.style,fontWeight:"bold",position:"sticky",top:0,zIndex:2,padding:"16px"},children:r.sortable&&q?(0,l.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:r.align==="center"?"center":r.align==="right"?"flex-end":"flex-start",position:"relative",width:"100%"},children:(0,l.jsxs)(f.Box,{sx:{position:"relative",cursor:"default","&:hover .MuiTableSortLabel-root":{opacity:"1 !important","& .MuiSvgIcon-root":{color:"#000",opacity:"1 !important"}}},onClick:()=>Te(String(r.id)),children:[r.text,(0,l.jsx)(f.TableSortLabel,{active:N===r.id,direction:N===r.id?G:"desc",sx:{position:"absolute",left:"100%",top:"50%",transform:"translateY(-50%)",marginLeft:"4px",minWidth:"auto",width:"16px",height:"16px",cursor:"default",opacity:N===r.id?1:0,transition:"opacity 0.2s ease","&:hover":{opacity:"1 !important","& .MuiSvgIcon-root":{color:"#000",opacity:"1 !important"}},"& .MuiTableSortLabel-icon":{position:"relative",marginLeft:0,marginRight:0,opacity:1,transition:"color 0.2s ease"},"& .MuiTableSortLabel-iconDirectionAsc":{transform:"rotate(0deg)"},"& .MuiTableSortLabel-iconDirectionDesc":{transform:"rotate(180deg)"}}})]})}):r.text},String(r.id)))];return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(f.TableRow,{children:y}),(0,l.jsx)(f.TableRow,{children:b})]})},[g,N,G,Te,q,$]),re=(0,s.useCallback)((n,c)=>c?(0,l.jsx)(l.Fragment,{children:g.map(R=>(0,l.jsx)(f.TableCell,{align:R.align||"left",style:{width:R.width,minWidth:R.width,...R.style,padding:"8px 16px"},children:R.render?R.render(c,n):String(c[R.id]||"")},String(R.id)))}):(console.log("rowContent - \uC544\uC774\uD15C \uC5C6\uC74C, \uC778\uB371\uC2A4:",n),null),[g]),H=(0,s.useMemo)(()=>({Scroller:De,Table:n=>(0,l.jsx)(f.Table,{...n,sx:{borderCollapse:"separate",tableLayout:"fixed",marginRight:"16px"}}),TableHead:(0,s.forwardRef)((n,c)=>(0,l.jsx)(f.TableHead,{...n,ref:c,sx:{userSelect:"none","& tr":{height:$,"& th":{padding:"16px",position:"sticky",top:0,zIndex:2,fontWeight:"bold"}}}})),TableRow:n=>{let{item:c,selected:R,"aria-selected":y,className:b,...r}=n,W=r["data-index"]??0,Ce=W%2===1,Fe=c&&M?M(c,W):W,$e=O!=null&&Fe===O,_e=$e&&S?typeof S=="function"?S(c,W):S:void 0,Ge=String(b??"").split(/\s+/).filter(A=>A!=="Mui-selected"&&A!=="Mui-focusVisible").join(" ");return(0,l.jsx)(f.TableRow,{...r,className:Ge||void 0,selected:$e,onMouseDown:A=>{P.current=!1,w.current={x:A.clientX,y:A.clientY}},onMouseMove:A=>{let ye=Math.abs(A.clientX-w.current.x),me=Math.abs(A.clientY-w.current.y),e=5;(ye>e||me>e)&&(P.current=!0)},onClick:()=>{!P.current&&!se.current&&c&&x&&x(c,W),P.current=!1},sx:[{userSelect:"none",height:I,backgroundColor:Ce&&le?le:"transparent","& td":{padding:"8px 16px",borderBottom:J?"1px solid rgba(224, 224, 224, 1)":"none"},"& th":{padding:"8px 16px",borderBottom:"none"},"&:hover":x&&!$e?{backgroundColor:A=>{let ye=A.palette.mode==="dark",e=he??"#000000",o=j??.06,i=e.replace("#",""),u=parseInt(i.substring(0,2),16)/255,m=parseInt(i.substring(2,4),16)/255,h=parseInt(i.substring(4,6),16)/255;if(ye){let T=Math.max(u,m,h),k=Math.min(u,m,h),Y=0,Q=0,L=(T+k)/2;if(T!==k){let D=T-k;switch(Q=L>.5?D/(2-T-k):D/(T+k),T){case u:Y=((m-h)/D+(m<h?6:0))/6;break;case m:Y=((h-u)/D+2)/6;break;case h:Y=((u-m)/D+4)/6;break}}L=1-L;let ve=(D,ee,te)=>(te<0&&(te+=1),te>1&&(te-=1),te<1/6?D+(ee-D)*6*te:te<1/2?ee:te<2/3?D+(ee-D)*(2/3-te)*6:D);if(Q===0)u=m=h=L;else{let D=L<.5?L*(1+Q):L+Q-L*Q,ee=2*L-D;u=ve(ee,D,Y+1/3),m=ve(ee,D,Y),h=ve(ee,D,Y-1/3)}}return`rgba(${Math.round(u*255)}, ${Math.round(m*255)}, ${Math.round(h*255)}, ${o})`}}:void 0,cursor:x?"pointer":void 0},_e]})},TableBody:(0,s.forwardRef)((n,c)=>(0,l.jsx)(f.TableBody,{...n,ref:c}))}),[x,M,O,S,I,Re,le,J,$,he,j,De]),ce=(0,l.jsxs)(f.Box,{sx:{position:"relative",height:"100%",width:"100%","& .MuiTableHead-root":{backgroundColor:n=>n.palette.mode==="dark"?"#1e1e1e !important":"#ffffff !important"}},children:[(0,l.jsx)(Qe.TableVirtuoso,{ref:He,data:a,totalCount:_?a.length+1:a.length,defaultItemHeight:Le,fixedHeaderContent:Se,itemContent:re,rangeChanged:Oe,components:H,style:{height:"100%"},increaseViewportBy:{top:ke,bottom:ae},overscan:Pe,followOutput:!1},Ve),a.length===0&&!p&&(0,l.jsx)(f.Box,{sx:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:2},children:typeof oe=="string"?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(f.Box,{sx:{width:48,height:48,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"50%",backgroundColor:"#f5f5f5",color:"#999"},children:"\u{1F4C4}"}),(0,l.jsx)(f.Typography,{variant:"body1",sx:{color:"text.secondary"},children:oe})]}):oe}),we&&(0,l.jsx)(l.Fragment,{children:ie?(0,l.jsx)(ie,{visible:p,onComplete:We}):(0,l.jsx)(Ke,{visible:p,onComplete:We,size:40,sx:{top:`${g.some(n=>n.group)?$*2:$}px`},background:{show:a.length===0,opacity:.8}})})]});return ue?(0,l.jsx)(f.Paper,{className:"grow",elevation:1,sx:{padding:0,paddingLeft:d,height:"100%",minHeight:0,flex:1,display:"flex",flexDirection:"column"},children:ce}):(0,l.jsx)(f.Box,{className:"grow",style:{padding:0,paddingLeft:d,height:"100%",minHeight:0,flex:1,display:"flex",flexDirection:"column"},children:ce})}var et=(0,s.memo)(gt);
22
22
  /**
23
23
  * Virtual Data Table - A high-performance virtual data table component for React
24
24
  *