fone-design-system_v2 1.0.54 → 1.0.56
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.
|
@@ -48515,7 +48515,7 @@ const Xle = () => {
|
|
|
48515
48515
|
je = re.getRowModel().rows.findIndex((Qe) => Qe.id === et.id);
|
|
48516
48516
|
}
|
|
48517
48517
|
o(Ce, je);
|
|
48518
|
-
}, [o, re]);
|
|
48518
|
+
}, [o, re, j]);
|
|
48519
48519
|
function Le(ke, Ce) {
|
|
48520
48520
|
const We = /* @__PURE__ */ new Map();
|
|
48521
48521
|
ke.forEach((je, et) => {
|
|
@@ -572,7 +572,7 @@ html body {
|
|
|
572
572
|
background-color: #EBEBEB;
|
|
573
573
|
}
|
|
574
574
|
`}
|
|
575
|
-
`,K3=Y.forwardRef(({table:e,setTableData:t,setRowSelection:n,isLoading:r,onRowClick:o,onRowDoubleClick:i,scrollTo:a,clickedRowIndex:l,setCurrentEditingCell:c,radio:u,rowSelection:A,isClickedCheckbox:f,pagination:p,triggerIndex:h},y)=>{const m=Y.useRef([]),v=e.getRowModel().rows.length;return Y.useEffect(()=>{if(p&&typeof p.page=="number"&&y&&typeof y!="function"&&y.current){const w=y.current.querySelector("[data-radix-scroll-area-viewport]");w&&w.scrollTo({top:0,behavior:"auto"})}},[p==null?void 0:p.page,y]),Y.useEffect(()=>{if(a){if(!(a>0))return;let b=0;const w=8,S=()=>{if(b+=1,y&&typeof y!="function"&&y.current){const E=a-1,I=m.current[E];if(I){const T=y.current.querySelector(`[data-index="${E}"]`);if(T){I.offsetTop,T.scrollIntoView({block:"nearest",behavior:"smooth"});return}}}b<w&&requestAnimationFrame(S)};requestAnimationFrame(S)}},[a,v,y]),r?P.jsx("div",{style:{display:"flex",height:"100%",width:"100%",alignItems:"center",justifyContent:"center",backgroundColor:"white",paddingBottom:"2rem"},children:P.jsx(Nd,{color:"inherit",style:{opacity:.4},disableShrink:!0})}):P.jsxs(Ld,{ref:y,style:{height:"100%",width:"100%",backgroundColor:"white"},children:[v===0?P.jsx(IZ,{}):P.jsx("div",{style:{width:"100%",boxSizing:"border-box"},children:e.getRowModel().rows.map((b,w)=>b?P.jsx("div",{"data-index":w,ref:S=>{m.current[w]=S},style:{width:"100%",boxSizing:"border-box",minHeight:"3rem",height:"fit-content",borderBottom:"1px solid var(--ds-table-body-border-bottom-color)"},children:P.jsx(X3,{row:b,setTableData:t,setRowSelection:n,onRowClick:o,onRowDoubleClick:i,setCurrentEditingCell:c,isScrollHighlighted:Number(a)>0&&w===Number(a)-1,radio:u,isClicked:a!==void 0?a-1===w:w===l,isTriggerHighlight:l===-1?w===h:!1,rowSelection:A,isClickedCheckbox:f,pagination:p})},b.id??w):null)}),P.jsx(cl,{})]})});K3.displayName="Rows";const qZ=({setTableData:e,setRowSelection:t,table:n,isPlusButton:r,onAddFn:o,isAddRowActive:i,clickedRowIndex:a,setClickedRowIndex:l,radio:c,scrollAreaRef:u})=>{const[A,f]=Y.useState(0),p=()=>{if(u&&u.current){const v=u.current.querySelector("[data-radix-scroll-area-viewport]");v&&v.scrollTo({top:0})}if(o&&(o(),!i))return;const h=v=>{let b=[];return v.forEach(w=>{w.columns?b=b.concat(h(w.columns)):w.accessorKey&&b.push(w)}),b},y=h(n.options.columns),m={crud:"C",id:String(A)+"_new"};f(v=>v+1),y.forEach(v=>{const b=v.id||v.accessorKey;v.isOnly?m[b]="N":v.type==="checkbox"?typeof v.defaultChecked=="boolean"?m[b]=v.defaultChecked?"Y":"N":m[b]="Y":m[b]=""}),e(v=>(t(c?{0:!0}:b=>{const w={};return Object.entries(b).forEach(([S,E])=>{w[(Number(S)+1).toString()]=E}),{0:!0,...w}}),l(a+1),[m,...v]))};return P.jsx(P.Fragment,{children:r&&P.jsx(Vn,{onClick:p,variant:"outlined",size:"xsmall",iconOnly:!0,children:P.jsx(zA,{style:{fontSize:"1.9rem"}})})})},GZ=({rowSelection:e,table:t,setTableData:n,onDelete:r,setRowSelection:o,setIsWarning:i,setWarningText:a,onDelFn:l,deleteAllData:c,setClickedRowIndex:u})=>{const[A,f]=Y.useState(!1),p=t.getRowModel().rows.map(y=>y.original),h=()=>{if(l&&l(p),r){const y=t.getSelectedRowModel().rows.map(v=>v.original).filter(v=>v.crud==="C"),m=t.getSelectedRowModel().rows.map(v=>v.original).filter(v=>v.crud!=="C");c?r(p):(n(v=>v.filter(b=>!y.includes(b))),r(m))}o({}),u(-1),f(!1)};return P.jsxs(P.Fragment,{children:[r&&P.jsx(Vn,{variant:"outlined",size:"xsmall",iconOnly:!0,onClick:()=>{if(Object.keys(e).length===0){a("선택된 행이 없습니다. 행을 선택해주세요"),i(!0);return}f(!0)},children:P.jsx(im,{style:{fontSize:"1.9rem"}})}),P.jsx(us,{open:A,onClose:()=>f(!1),type:"confirm",dialogContent:"삭제하시겠습니까?",onOk:h})]})},XZ=({rowSelection:e,onSave:t,table:n,setIsWarning:r,setWarningText:o,setRowSelection:i})=>{const[a,l]=Y.useState(!1),c=()=>{let u=n.getSelectedRowModel().rows.map(f=>f.original);u=u.map(f=>{const{id:p,...h}=f;return h});const A=n.getRowModel().rows.map(f=>f.original);t&&t(u,A),i({}),l(!1)};return P.jsxs(P.Fragment,{children:[t&&P.jsx(Vn,{variant:"contained",size:"xsmall",startIcon:P.jsx(vw,{style:{fontSize:"2rem"}}),onClick:()=>{if(Object.keys(e).length===0){o("선택된 행이 없습니다. 행을 선택해주세요"),r(!0);return}const u=n.getSelectedRowModel().rows.map(h=>h.original),f=n.getAllColumns().filter(h=>h.columnDef.required).map(h=>h.id);if(u.some(h=>f.some(y=>!h[y]&&h[y]!==0))){o("모든 필수 항목을 입력해주세요"),r(!0);return}l(!0)},children:P.jsx("span",{children:"저장"})}),P.jsx(us,{open:a,onClose:()=>l(!1),type:"confirm",dialogContent:"저장하시겠습니까?",onOk:c})]})},KZ=({setTableData:e,rowSelection:t,tableData:n,onDelete:r,setRowSelection:o,table:i,onSave:a,buttons:l,isPlusButton:c,onAddFn:u,isAddRowActive:A,clickedRowIndex:f,setClickedRowIndex:p,onDelFn:h,deleteAllData:y,radio:m,scrollAreaRef:v})=>{const[b,w]=Y.useState(!1),[S,E]=Y.useState("");return P.jsxs("div",{style:{display:"flex",height:"100%",alignItems:"center",gap:"0.5rem"},children:[b&&P.jsx(us,{open:b,type:"error",onClose:()=>w(!1),dialogContent:S}),l,P.jsx(qZ,{setTableData:e,setRowSelection:o,table:i,isPlusButton:c,onAddFn:u,isAddRowActive:A,clickedRowIndex:f,setClickedRowIndex:p,radio:m,scrollAreaRef:v}),P.jsx(GZ,{setTableData:e,rowSelection:t,table:i,onDelete:r,setRowSelection:o,setIsWarning:w,setWarningText:E,onDelFn:h,deleteAllData:y,setClickedRowIndex:p}),P.jsx(XZ,{rowSelection:t,onSave:a,table:i,setIsWarning:w,setWarningText:E,setRowSelection:o})]})},JZ=({title:e,isTableTitleIcon:t})=>P.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"0.5rem"},children:[t&&P.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[P.jsx("path",{d:"M6.17576 21.8775L0.884971 19.3548C0.345741 19.0955 0 18.548 0 17.9462V7.2375C0 6.3219 0.945237 5.71683 1.7636 6.1106L7.05439 8.6333C7.59362 8.89262 7.93936 9.44006 7.93936 10.0419V20.7506C7.93936 21.6662 6.99412 22.2713 6.17576 21.8775Z",fill:"#F83A3A",fillOpacity:"0.6"}),P.jsx("path",{d:"M11.7969 18.8846L6.50606 16.3619C5.96684 16.1026 5.62109 15.5551 5.62109 14.9533V4.2414C5.62109 3.3258 6.56633 2.72074 7.38469 3.11451L12.6755 5.63721C13.2147 5.89652 13.5605 6.44396 13.5605 7.04583V17.7545C13.5605 18.6701 12.6152 19.2752 11.7969 18.8814V18.8846Z",fill:"#4A6DFD"}),P.jsx("path",{d:"M17.4209 15.8924L12.1301 13.3697C11.5909 13.1104 11.2451 12.563 11.2451 11.9611V1.24921C11.2451 0.333616 12.1904 -0.271448 13.0087 0.122323L18.2995 2.64502C18.8387 2.90434 19.1845 3.45178 19.1845 4.05364V14.7623C19.1845 15.6779 18.2392 16.283 17.4209 15.8892V15.8924Z",fill:"#1D3475",fillOpacity:"0.8"}),P.jsx("path",{d:"M7.05457 8.62916L5.62402 7.94727V14.9487C5.62402 15.5506 5.96976 16.1012 6.50899 16.3573L7.93954 17.0392V10.041C7.93954 9.43912 7.5938 8.88848 7.05457 8.63236V8.62916Z",fill:"#5652FF"}),P.jsx("path",{d:"M12.6757 5.63698L11.2451 4.95508V11.9565C11.2451 12.5584 11.5909 13.109 12.1301 13.3651L13.5606 14.047V7.04879C13.5606 6.44693 13.2149 5.89629 12.6757 5.64018V5.63698Z",fill:"#365DEA"})]}),P.jsx("h2",{style:{fontWeight:600,fontSize:"var(--ds-table-title-font-size)",lineHeight:1},children:e})]}),ZZ=({total:e})=>P.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"0.3rem",fontSize:"var(--ds-table-subtitle-font-size)"},children:[P.jsx("span",{children:"총"}),P.jsx("span",{style:{color:"var(--ds-table-text-highlight)"},children:e||0}),P.jsx("span",{children:"건"})]}),eee=({setTableData:e,rowSelection:t,tableData:n,onDelete:r,setRowSelection:o,table:i,onSave:a,title:l,isTotal:c,total:u,buttons:A,isPlusButton:f,titleRef:p,onAddFn:h,isAddRowActive:y,clickedRowIndex:m,setClickedRowIndex:v,onDelFn:b,deleteAllData:w,radio:S,scrollAreaRef:E,isTableTitleIcon:I})=>P.jsxs("div",{ref:p,style:{marginBottom:"1rem",display:"flex",minHeight:"2.7rem",width:"100%",alignItems:"flex-end",justifyContent:"space-between"},children:[P.jsxs("div",{style:{display:"flex",height:"100%",alignItems:"center",gap:"1rem"},children:[l?P.jsx(JZ,{title:l,isTableTitleIcon:I}):null,l&&c?P.jsx("div",{style:{height:"1.2rem",width:"0.1rem",background:"#C6C6C6"}}):null,c?P.jsx(ZZ,{total:u}):null]}),P.jsx(KZ,{setTableData:e,rowSelection:t,table:i,tableData:n,onDelete:r,setRowSelection:o,onSave:a,buttons:A,isPlusButton:f,onAddFn:h,isAddRowActive:y,clickedRowIndex:m,setClickedRowIndex:v,onDelFn:b,deleteAllData:w,radio:S,scrollAreaRef:E})]});var tee=typeof global=="object"&&global&&global.Object===Object&&global,nee=typeof self=="object"&&self&&self.Object===Object&&self,J3=tee||nee||Function("return this")(),Eg=J3.Symbol,Z3=Object.prototype,ree=Z3.hasOwnProperty,oee=Z3.toString,$d=Eg?Eg.toStringTag:void 0;function iee(e){var t=ree.call(e,$d),n=e[$d];try{e[$d]=void 0;var r=!0}catch{}var o=oee.call(e);return r&&(t?e[$d]=n:delete e[$d]),o}var aee=Object.prototype,see=aee.toString;function lee(e){return see.call(e)}var cee="[object Null]",uee="[object Undefined]",eM=Eg?Eg.toStringTag:void 0;function dee(e){return e==null?e===void 0?uee:cee:eM&&eM in Object(e)?iee(e):lee(e)}function Aee(e){return e!=null&&typeof e=="object"}var fee="[object Symbol]";function pee(e){return typeof e=="symbol"||Aee(e)&&dee(e)==fee}var gee=/\s/;function hee(e){for(var t=e.length;t--&&gee.test(e.charAt(t)););return t}var mee=/^\s+/;function vee(e){return e&&e.slice(0,hee(e)+1).replace(mee,"")}function Wb(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var tM=NaN,yee=/^[-+]0x[0-9a-f]+$/i,bee=/^0b[01]+$/i,Cee=/^0o[0-7]+$/i,wee=parseInt;function nM(e){if(typeof e=="number")return e;if(pee(e))return tM;if(Wb(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Wb(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=vee(e);var n=bee.test(e);return n||Cee.test(e)?wee(e.slice(2),n?2:8):yee.test(e)?tM:+e}var Qb=function(){return J3.Date.now()},xee="Expected a function",See=Math.max,Eee=Math.min;function Iee(e,t,n){var r,o,i,a,l,c,u=0,A=!1,f=!1,p=!0;if(typeof e!="function")throw new TypeError(xee);t=nM(t)||0,Wb(n)&&(A=!!n.leading,f="maxWait"in n,i=f?See(nM(n.maxWait)||0,t):i,p="trailing"in n?!!n.trailing:p);function h(O){var T=r,M=o;return r=o=void 0,u=O,a=e.apply(M,T),a}function y(O){return u=O,l=setTimeout(b,t),A?h(O):a}function m(O){var T=O-c,M=O-u,R=t-T;return f?Eee(R,i-M):R}function v(O){var T=O-c,M=O-u;return c===void 0||T>=t||T<0||f&&M>=i}function b(){var O=Qb();if(v(O))return w(O);l=setTimeout(b,m(O))}function w(O){return l=void 0,p&&r?h(O):(r=o=void 0,a)}function S(){l!==void 0&&clearTimeout(l),u=0,r=c=o=l=void 0}function E(){return l===void 0?a:w(Qb())}function I(){var O=Qb(),T=v(O);if(r=arguments,o=this,c=O,T){if(l===void 0)return y(c);if(f)return clearTimeout(l),l=setTimeout(b,t),h(c)}return l===void 0&&(l=setTimeout(b,t)),a}return I.cancel=S,I.flush=E,I}const Oee=()=>{const e=Y.useRef(null),[t,n]=Y.useState(0);return Y.useEffect(()=>{if(!e.current)return;const r=new ResizeObserver(Iee(o=>{const i=o[0].contentRect.height;n(i)},100));return r.observe(e.current),()=>r.disconnect()},[]),[e,t]},Tee=e=>{const t=Y.useRef(null);return Y.useEffect(()=>{const n=r=>{t.current&&!t.current.contains(r.target)&&e()};return document.addEventListener("mousedown",n),()=>{document.removeEventListener("mousedown",n)}},[e]),t},Pee=({data:e,columns:t=[],checkbox:n=!1,radio:r=!1,onChecked:o,onDelete:i,deleteAllData:a,onSave:l,onRowClick:c,onRowDoubleClick:u,title:A="목록",isTotal:f=!0,buttons:p,isLoading:h=!1,isPlusButton:y=!0,scrollTo:m,modalData:v,onAddFn:b,pagination:w,isAddRowActive:S,onModalApplied:E,rowClickTriggerIdx:I,onDelFn:O,isClickedCheckbox:T=!1,onTableDataChange:M,checkboxCheckedIdx:R,No:k=!0,selectedItems:B,setSelectedItems:$,isTableTitleIcon:V,isEditMode:N=!1})=>{const F=Y.useRef(null),L=Y.useMemo(()=>e??[],[e]),[_,W]=Y.useState(L),[j,H]=Y.useState({}),[U,Q]=Y.useState(-1),X=Y.useRef(!1),J=Y.useCallback(Me=>{X.current=!0,H(Me)},[]),ee=Y.useMemo(()=>_,[_]),Z=Tee(()=>{(!j||Object.keys(j).length===0)&&Q(-1)}),ae=Y.useMemo(()=>({id:"select",header:({table:Me})=>P.jsx(va,{checked:Me.getIsAllRowsSelected(),onChange:Me.getToggleAllRowsSelectedHandler()}),cell:({row:Me})=>P.jsx(va,{checked:Me.getIsSelected(),disabled:!Me.getCanSelect(),onChange:Me.getToggleSelectedHandler()}),width:"40px",align:"center"}),[]),se=Y.useMemo(()=>({id:"No",header:()=>P.jsx("span",{children:"No"}),cell:({row:Me})=>Me,width:"4rem",align:"center"}),[]),ne=Y.useMemo(()=>({id:"edit",header:()=>{},cell:({row:Me})=>Me,width:"4rem",align:"center"}),[]),re=Y.useMemo(()=>{const Me=t.filter(Qe=>Qe.visible!==!1),Ce=[];return(N||y)&&Ce.push(ne),(n||r)&&Ce.push(ae),k&&Ce.push(se),Ce.push(...Me),Ce},[n,r,k,ae,se,t,ne,y,N]),oe=SZ({data:ee,columns:re,getCoreRowModel:bZ(),enableRowSelection:!0,onRowSelectionChange:J,state:{rowSelection:j}}),[K,ge]=Y.useState({rowIndex:-1,columnId:"",isActive:!1}),[ce,Ee]=Y.useState(!1),me=Y.useMemo(()=>typeof I=="number"?I:-1,[I]);Y.useEffect(()=>{Ee(!1),Q(-1)},[me,_]),Y.useEffect(()=>{if(!ce&&oe.getRowModel().rows.length>me){const Me=oe.getRowModel().rows[me];Me&&c&&c(Me.original,me),Ee(!0)}},[ce,me,c,oe,_]),Y.useEffect(()=>{M&&M(_)},[_,M]),Y.useEffect(()=>{var Ce;const Me=typeof v=="object"&&v&&!Array.isArray(v)&&Object.values(v).every(Qe=>!Qe);K.isActive&&v&&!Me&&(W(Qe=>Qe.map((Xe,_e)=>_e!==K.rowIndex?Xe:typeof v=="object"&&!Array.isArray(v)?{...Xe,...v}:{...Xe,[K.columnId]:v})),H(r?{[(Ce=oe.getRowModel().rows[K.rowIndex])==null?void 0:Ce.id]:!0}:Qe=>{var Xe;return{...Qe,[(Xe=oe.getRowModel().rows[K.rowIndex])==null?void 0:Xe.id]:!0}}),ge({rowIndex:-1,columnId:"",isActive:!1}),E&&E())},[v,K,E,oe,r]);const Re=Y.useRef([]),Ie=Y.useRef(!1),ze=Y.useRef(!1);Y.useEffect(()=>{if(ze.current){ze.current=!1;return}if(!o)return;const Me=oe.getSelectedRowModel().rows,Ce=Me.map(nt=>nt.original),Qe=Re.current;if(Qe.length===Ce.length&&Qe.every((nt,qe)=>nt===Ce[qe]))return;Re.current=Ce;let _e=-1;if(Me.length>0){const nt=Me[Me.length-1];_e=oe.getRowModel().rows.findIndex(qe=>qe.id===nt.id)}o(Ce,_e)},[o,oe]);function Ve(Me,Ce){const Qe=new Map;Me.forEach((_e,nt)=>{const qe=_e&&_e.id;qe!=null&&qe!==""&&Qe.set(String(qe),nt)});function Xe(_e,nt){return _e===nt?!0:typeof _e!="object"||typeof nt!="object"||_e===null||nt===null?!1:Object.keys(nt).every(je=>Xe(_e[je],nt[je]))}return Ce.map(_e=>{const nt=_e&&_e.id;if(nt!=null&&nt!==""){const qe=Qe.get(String(nt));if(qe!==void 0)return qe}return Me.findIndex(qe=>Xe(qe,_e))})}Y.useEffect(()=>{if(!B)return;if(X.current){X.current=!1;return}const Me=Ve(_,B||[]),Ce={};Me.forEach(Qe=>{if(Qe<0)return;const Xe=oe.getRowModel().rows[Qe],_e=Xe?Xe.id:`${Qe}`;Ce[_e]=!0}),Ie.current=!0,H(Ce)},[_,B,oe]),Y.useEffect(()=>{if(!$||!B)return;if(Ie.current){Ie.current=!1;return}const Me=oe.getSelectedRowModel().rows.map(nt=>nt.original),Ce=nt=>(nt||[]).map(qe=>qe&&qe.id).sort(),Qe=Ce(Me),Xe=Ce(B);Qe.length===Xe.length&&Qe.every((nt,qe)=>nt===Xe[qe])||$(Me)},[oe,B,$]),Y.useEffect(()=>{const Me=L.map((Ce,Qe)=>Ce&&Object.prototype.hasOwnProperty.call(Ce,"id")&&Ce.id!==void 0&&Ce.id!==null&&Ce.id!==""?Ce:{...Ce,id:String(Qe)});W(Me),H(me===-1?{}:{triggerIndex:!0})},[h,L,me]),Y.useEffect(()=>{(!j||Object.keys(j).length===0)&&Q(-1)},[j]),Y.useEffect(()=>{var Qe;if(R===void 0||typeof R!="number"||R<0)return;const Me=oe.getRowModel().rows;if(!Me||Me.length===0||R>=Me.length)return;Ie.current=!0;const Ce=(Qe=Me[R])==null?void 0:Qe.id;Ce&&(H({[Ce]:!0}),Q(R))},[R,_,oe]);const Oe=(Me,Ce)=>{Q(Ce),c==null||c(Me,Ce)},we=(Me,Ce)=>{u==null||u(Me,Ce)},[at,We]=Oee();return P.jsxs("div",{style:{position:"relative",height:"100%",width:"100%",color:"var(--ds-table-text-color)"},children:[(f||A||y||O||b||p)&&P.jsx(eee,{setTableData:W,rowSelection:j,table:oe,tableData:_,onDelete:i,deleteAllData:a,setRowSelection:J,onSave:l,title:A,isTotal:f,total:w?w.totalElements:_.length,buttons:p,isPlusButton:y,titleRef:at,onAddFn:b,isAddRowActive:S,clickedRowIndex:U,setClickedRowIndex:Q,onDelFn:Me=>{ze.current=!0,O&&O(Me)},radio:r,scrollAreaRef:F,isTableTitleIcon:V}),P.jsxs("div",{style:{width:"100%",height:`calc(100% - ${We/10+1}rem)`,borderTop:"1px solid var(--ds-table-header-border-top-color)"},ref:Z,children:[P.jsx(Q3,{table:oe,headerGroupsLength:oe.getHeaderGroups().length,clickedRowIndex:U}),P.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"1.2rem",height:"calc(100% - 3rem)"},children:[P.jsx(K3,{table:oe,setTableData:W,setRowSelection:J,isLoading:h,onRowClick:Oe,onRowDoubleClick:we,scrollTo:m,clickedRowIndex:U,setCurrentEditingCell:ge,radio:r,rowSelection:j,isClickedCheckbox:T,ref:F,pagination:w,triggerIndex:me}),!h&&w&&P.jsx("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%"},children:P.jsx(T3,{page:w.page,count:w.totalPages,size:"medium",onChange:(Me,Ce)=>w.onPageChange(Ce),shape:"rounded",color:"standard",variant:"outlined",showFirstButton:!0,showLastButton:!0})})]})]})]})};function kee(e){const{children:t,value:n,index:r,...o}=e;return P.jsx("div",{role:"tabpanel",hidden:n!==r,id:`tabs-tabpanel-${r}`,"aria-labelledby":`tabs-tab-${r}`,...o,children:n===r&&P.jsx("div",{children:t})})}function Mee(e){return{id:`tabs-tab-${e}`,"aria-controls":`tabs-tabpanel-${e}`}}const Dee=Y.forwardRef(function({value:t,onChange:n,orientation:r="horizontal",variant:o="standard",items:i,sx:a,textColor:l,indicatorColor:c,selectionFollowsFocus:u=!1,...A},f){return P.jsxs(Le.Box,{sx:{width:"100%",display:r==="vertical"?"flex":"block",...a},children:[P.jsx(Le.Tabs,{ref:f,value:t,onChange:n,orientation:r,variant:o,textColor:l,indicatorColor:c,selectionFollowsFocus:u,...A,children:i==null?void 0:i.map((p,h)=>P.jsx(Le.Tab,{label:p.label,icon:p.icon,iconPosition:p.iconPosition??"top",disabled:p.disabled,...Mee(h)},p.key))}),i.map((p,h)=>P.jsx(kee,{value:t,index:h,children:p.content},p.key))]})}),Ree=Yt(P.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 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 12 17 15.59z"}),"Cancel");function Bee(e){return Ft("MuiChip",e)}const $t=Ht("MuiChip",["root","sizeSmall","sizeMedium","colorDefault","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]),Nee=e=>{const{classes:t,disabled:n,size:r,color:o,iconColor:i,onDelete:a,clickable:l,variant:c}=e,u={root:["root",c,n&&"disabled",`size${$e(r)}`,`color${$e(o)}`,l&&"clickable",l&&`clickableColor${$e(o)}`,a&&"deletable",a&&`deletableColor${$e(o)}`,`${c}${$e(o)}`],label:["label",`label${$e(r)}`],avatar:["avatar",`avatar${$e(r)}`,`avatarColor${$e(o)}`],icon:["icon",`icon${$e(r)}`,`iconColor${$e(i)}`],deleteIcon:["deleteIcon",`deleteIcon${$e(r)}`,`deleteIconColor${$e(o)}`,`deleteIcon${$e(c)}Color${$e(o)}`]};return Vt(u,Bee,t)},Fee=ke("div",{name:"MuiChip",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{color:r,iconColor:o,clickable:i,onDelete:a,size:l,variant:c}=n;return[{[`& .${$t.avatar}`]:t.avatar},{[`& .${$t.avatar}`]:t[`avatar${$e(l)}`]},{[`& .${$t.avatar}`]:t[`avatarColor${$e(r)}`]},{[`& .${$t.icon}`]:t.icon},{[`& .${$t.icon}`]:t[`icon${$e(l)}`]},{[`& .${$t.icon}`]:t[`iconColor${$e(o)}`]},{[`& .${$t.deleteIcon}`]:t.deleteIcon},{[`& .${$t.deleteIcon}`]:t[`deleteIcon${$e(l)}`]},{[`& .${$t.deleteIcon}`]:t[`deleteIconColor${$e(r)}`]},{[`& .${$t.deleteIcon}`]:t[`deleteIcon${$e(c)}Color${$e(r)}`]},t.root,t[`size${$e(l)}`],t[`color${$e(r)}`],i&&t.clickable,i&&r!=="default"&&t[`clickableColor${$e(r)})`],a&&t.deletable,a&&r!=="default"&&t[`deletableColor${$e(r)}`],t[c],t[`${c}${$e(r)}`]]}})(Sn(({theme:e})=>{const t=e.palette.mode==="light"?e.palette.grey[700]:e.palette.grey[300];return{maxWidth:"100%",fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:(e.vars||e).palette.text.primary,backgroundColor:(e.vars||e).palette.action.selected,borderRadius:32/2,whiteSpace:"nowrap",transition:e.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${$t.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${$t.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:t,fontSize:e.typography.pxToRem(12)},[`& .${$t.avatarColorPrimary}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark},[`& .${$t.avatarColorSecondary}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark},[`& .${$t.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${$t.icon}`]:{marginLeft:5,marginRight:-6},[`& .${$t.deleteIcon}`]:{WebkitTapHighlightColor:"transparent",color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.26)`:vn(e.palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.4)`:vn(e.palette.text.primary,.4)}},variants:[{props:{size:"small"},style:{height:24,[`& .${$t.icon}`]:{fontSize:18,marginLeft:4,marginRight:-4},[`& .${$t.deleteIcon}`]:{fontSize:16,marginRight:4,marginLeft:-4}}},...Object.entries(e.palette).filter(yr(["contrastText"])).map(([n])=>({props:{color:n},style:{backgroundColor:(e.vars||e).palette[n].main,color:(e.vars||e).palette[n].contrastText,[`& .${$t.deleteIcon}`]:{color:e.vars?`rgba(${e.vars.palette[n].contrastTextChannel} / 0.7)`:vn(e.palette[n].contrastText,.7),"&:hover, &:active":{color:(e.vars||e).palette[n].contrastText}}}})),{props:n=>n.iconColor===n.color,style:{[`& .${$t.icon}`]:{color:e.vars?e.vars.palette.Chip.defaultIconColor:t}}},{props:n=>n.iconColor===n.color&&n.color!=="default",style:{[`& .${$t.icon}`]:{color:"inherit"}}},{props:{onDelete:!0},style:{[`&.${$t.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:vn(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}}},...Object.entries(e.palette).filter(yr(["dark"])).map(([n])=>({props:{color:n,onDelete:!0},style:{[`&.${$t.focusVisible}`]:{background:(e.vars||e).palette[n].dark}}})),{props:{clickable:!0},style:{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:vn(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)},[`&.${$t.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:vn(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)},"&:active":{boxShadow:(e.vars||e).shadows[1]}}},...Object.entries(e.palette).filter(yr(["dark"])).map(([n])=>({props:{color:n,clickable:!0},style:{[`&:hover, &.${$t.focusVisible}`]:{backgroundColor:(e.vars||e).palette[n].dark}}})),{props:{variant:"outlined"},style:{backgroundColor:"transparent",border:e.vars?`1px solid ${e.vars.palette.Chip.defaultBorder}`:`1px solid ${e.palette.mode==="light"?e.palette.grey[400]:e.palette.grey[700]}`,[`&.${$t.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${$t.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`& .${$t.avatar}`]:{marginLeft:4},[`& .${$t.avatarSmall}`]:{marginLeft:2},[`& .${$t.icon}`]:{marginLeft:4},[`& .${$t.iconSmall}`]:{marginLeft:2},[`& .${$t.deleteIcon}`]:{marginRight:5},[`& .${$t.deleteIconSmall}`]:{marginRight:3}}},...Object.entries(e.palette).filter(yr()).map(([n])=>({props:{variant:"outlined",color:n},style:{color:(e.vars||e).palette[n].main,border:`1px solid ${e.vars?`rgba(${e.vars.palette[n].mainChannel} / 0.7)`:vn(e.palette[n].main,.7)}`,[`&.${$t.clickable}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[n].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:vn(e.palette[n].main,e.palette.action.hoverOpacity)},[`&.${$t.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[n].mainChannel} / ${e.vars.palette.action.focusOpacity})`:vn(e.palette[n].main,e.palette.action.focusOpacity)},[`& .${$t.deleteIcon}`]:{color:e.vars?`rgba(${e.vars.palette[n].mainChannel} / 0.7)`:vn(e.palette[n].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[n].main}}}}))]}})),Lee=ke("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,t)=>{const{ownerState:n}=e,{size:r}=n;return[t.label,t[`label${$e(r)}`]]}})({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap",variants:[{props:{variant:"outlined"},style:{paddingLeft:11,paddingRight:11}},{props:{size:"small"},style:{paddingLeft:8,paddingRight:8}},{props:{size:"small",variant:"outlined"},style:{paddingLeft:7,paddingRight:7}}]});function rM(e){return e.key==="Backspace"||e.key==="Delete"}const oM=C.forwardRef(function(t,n){const r=En({props:t,name:"MuiChip"}),{avatar:o,className:i,clickable:a,color:l="default",component:c,deleteIcon:u,disabled:A=!1,icon:f,label:p,onClick:h,onDelete:y,onKeyDown:m,onKeyUp:v,size:b="medium",variant:w="filled",tabIndex:S,skipFocusWhenDisabled:E=!1,...I}=r,O=C.useRef(null),T=tr(O,n),M=j=>{j.stopPropagation(),y&&y(j)},R=j=>{j.currentTarget===j.target&&rM(j)&&j.preventDefault(),m&&m(j)},k=j=>{j.currentTarget===j.target&&y&&rM(j)&&y(j),v&&v(j)},B=a!==!1&&h?!0:a,$=B||y?Tc:c||"div",V={...r,component:$,disabled:A,size:b,color:l,iconColor:C.isValidElement(f)&&f.props.color||l,onDelete:!!y,clickable:B,variant:w},N=Nee(V),F=$===Tc?{component:c||"div",focusVisibleClassName:N.focusVisible,...y&&{disableRipple:!0}}:{};let L=null;y&&(L=u&&C.isValidElement(u)?C.cloneElement(u,{className:st(u.props.className,N.deleteIcon),onClick:M}):P.jsx(Ree,{className:st(N.deleteIcon),onClick:M}));let _=null;o&&C.isValidElement(o)&&(_=C.cloneElement(o,{className:st(N.avatar,o.props.className)}));let W=null;return f&&C.isValidElement(f)&&(W=C.cloneElement(f,{className:st(N.icon,f.props.className)})),process.env.NODE_ENV!=="production"&&_&&W&&console.error("MUI: The Chip component can not handle the avatar and the icon prop at the same time. Pick one."),P.jsxs(Fee,{as:$,className:st(N.root,i),disabled:B&&A?!0:void 0,onClick:h,onKeyDown:R,onKeyUp:k,ref:T,tabIndex:E&&A?-1:S,ownerState:V,...F,...I,children:[_||W,P.jsx(Lee,{className:st(N.label),ownerState:V,children:p}),L]})});process.env.NODE_ENV!=="production"&&(oM.propTypes={avatar:s.element,children:QC,classes:s.object,className:s.string,clickable:s.bool,color:s.oneOfType([s.oneOf(["default","primary","secondary","error","info","success","warning"]),s.string]),component:s.elementType,deleteIcon:s.element,disabled:s.bool,icon:s.element,label:s.node,onClick:s.func,onDelete:s.func,onKeyDown:s.func,onKeyUp:s.func,size:s.oneOfType([s.oneOf(["medium","small"]),s.string]),skipFocusWhenDisabled:s.bool,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),tabIndex:s.number,variant:s.oneOfType([s.oneOf(["filled","outlined"]),s.string])});const Vee=({className:e,label:t,...n})=>P.jsx(oM,{className:e,label:t,...n});function Hee(e){return Ft("MuiTooltip",e)}const Rn=Ht("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]);function $ee(e){return Math.round(e*1e5)/1e5}const zee=e=>{const{classes:t,disableInteractive:n,arrow:r,touch:o,placement:i}=e,a={popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",o&&"touch",`tooltipPlacement${$e(i.split("-")[0])}`],arrow:["arrow"]};return Vt(a,Hee,t)},jee=ke(If,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.popper,!n.disableInteractive&&t.popperInteractive,n.arrow&&t.popperArrow,!n.open&&t.popperClose]}})(Sn(({theme:e})=>({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none",variants:[{props:({ownerState:t})=>!t.disableInteractive,style:{pointerEvents:"auto"}},{props:({open:t})=>!t,style:{pointerEvents:"none"}},{props:({ownerState:t})=>t.arrow,style:{[`&[data-popper-placement*="bottom"] .${Rn.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${Rn.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${Rn.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}},[`&[data-popper-placement*="left"] .${Rn.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}}}},{props:({ownerState:t})=>t.arrow&&!t.isRtl,style:{[`&[data-popper-placement*="right"] .${Rn.arrow}`]:{left:0,marginLeft:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!!t.isRtl,style:{[`&[data-popper-placement*="right"] .${Rn.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!t.isRtl,style:{[`&[data-popper-placement*="left"] .${Rn.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!!t.isRtl,style:{[`&[data-popper-placement*="left"] .${Rn.arrow}`]:{left:0,marginLeft:"-0.71em"}}}]}))),_ee=ke("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.tooltip,n.touch&&t.touch,n.arrow&&t.tooltipArrow,t[`tooltipPlacement${$e(n.placement.split("-")[0])}`]]}})(Sn(({theme:e})=>({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:vn(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium,[`.${Rn.popper}[data-popper-placement*="left"] &`]:{transformOrigin:"right center"},[`.${Rn.popper}[data-popper-placement*="right"] &`]:{transformOrigin:"left center"},[`.${Rn.popper}[data-popper-placement*="top"] &`]:{transformOrigin:"center bottom",marginBottom:"14px"},[`.${Rn.popper}[data-popper-placement*="bottom"] &`]:{transformOrigin:"center top",marginTop:"14px"},variants:[{props:({ownerState:t})=>t.arrow,style:{position:"relative",margin:0}},{props:({ownerState:t})=>t.touch,style:{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:`${$ee(16/14)}em`,fontWeight:e.typography.fontWeightRegular}},{props:({ownerState:t})=>!t.isRtl,style:{[`.${Rn.popper}[data-popper-placement*="left"] &`]:{marginRight:"14px"},[`.${Rn.popper}[data-popper-placement*="right"] &`]:{marginLeft:"14px"}}},{props:({ownerState:t})=>!t.isRtl&&t.touch,style:{[`.${Rn.popper}[data-popper-placement*="left"] &`]:{marginRight:"24px"},[`.${Rn.popper}[data-popper-placement*="right"] &`]:{marginLeft:"24px"}}},{props:({ownerState:t})=>!!t.isRtl,style:{[`.${Rn.popper}[data-popper-placement*="left"] &`]:{marginLeft:"14px"},[`.${Rn.popper}[data-popper-placement*="right"] &`]:{marginRight:"14px"}}},{props:({ownerState:t})=>!!t.isRtl&&t.touch,style:{[`.${Rn.popper}[data-popper-placement*="left"] &`]:{marginLeft:"24px"},[`.${Rn.popper}[data-popper-placement*="right"] &`]:{marginRight:"24px"}}},{props:({ownerState:t})=>t.touch,style:{[`.${Rn.popper}[data-popper-placement*="top"] &`]:{marginBottom:"24px"}}},{props:({ownerState:t})=>t.touch,style:{[`.${Rn.popper}[data-popper-placement*="bottom"] &`]:{marginTop:"24px"}}}]}))),Uee=ke("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(e,t)=>t.arrow})(Sn(({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:vn(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}})));let Ig=!1;const iM=new PA;let zd={x:0,y:0};function Og(e,t){return(n,...r)=>{t&&t(n,...r),e(n,...r)}}const aM=C.forwardRef(function(t,n){const r=En({props:t,name:"MuiTooltip"}),{arrow:o=!1,children:i,classes:a,components:l={},componentsProps:c={},describeChild:u=!1,disableFocusListener:A=!1,disableHoverListener:f=!1,disableInteractive:p=!1,disableTouchListener:h=!1,enterDelay:y=100,enterNextDelay:m=0,enterTouchDelay:v=700,followCursor:b=!1,id:w,leaveDelay:S=0,leaveTouchDelay:E=1500,onClose:I,onOpen:O,open:T,placement:M="bottom",PopperComponent:R,PopperProps:k={},slotProps:B={},slots:$={},title:V,TransitionComponent:N,TransitionProps:F,...L}=r,_=C.isValidElement(i)?i:P.jsx("span",{children:i}),W=Vi(),j=RA(),[H,U]=C.useState(),[Q,X]=C.useState(null),J=C.useRef(!1),ee=p||b,Z=Ps(),ae=Ps(),se=Ps(),ne=Ps(),[re,oe]=TA({controlled:T,default:!1,name:"Tooltip",state:"open"});let K=re;if(process.env.NODE_ENV!=="production"){const{current:Pe}=C.useRef(T!==void 0);C.useEffect(()=>{H&&H.disabled&&!Pe&&V!==""&&H.tagName.toLowerCase()==="button"&&console.warn(["MUI: You are providing a disabled `button` child to the Tooltip component.","A disabled element does not fire events.","Tooltip needs to listen to the child element's events to display the title.","","Add a simple wrapper element, such as a `span`."].join(`
|
|
575
|
+
`,K3=Y.forwardRef(({table:e,setTableData:t,setRowSelection:n,isLoading:r,onRowClick:o,onRowDoubleClick:i,scrollTo:a,clickedRowIndex:l,setCurrentEditingCell:c,radio:u,rowSelection:A,isClickedCheckbox:f,pagination:p,triggerIndex:h},y)=>{const m=Y.useRef([]),v=e.getRowModel().rows.length;return Y.useEffect(()=>{if(p&&typeof p.page=="number"&&y&&typeof y!="function"&&y.current){const w=y.current.querySelector("[data-radix-scroll-area-viewport]");w&&w.scrollTo({top:0,behavior:"auto"})}},[p==null?void 0:p.page,y]),Y.useEffect(()=>{if(a){if(!(a>0))return;let b=0;const w=8,S=()=>{if(b+=1,y&&typeof y!="function"&&y.current){const E=a-1,I=m.current[E];if(I){const T=y.current.querySelector(`[data-index="${E}"]`);if(T){I.offsetTop,T.scrollIntoView({block:"nearest",behavior:"smooth"});return}}}b<w&&requestAnimationFrame(S)};requestAnimationFrame(S)}},[a,v,y]),r?P.jsx("div",{style:{display:"flex",height:"100%",width:"100%",alignItems:"center",justifyContent:"center",backgroundColor:"white",paddingBottom:"2rem"},children:P.jsx(Nd,{color:"inherit",style:{opacity:.4},disableShrink:!0})}):P.jsxs(Ld,{ref:y,style:{height:"100%",width:"100%",backgroundColor:"white"},children:[v===0?P.jsx(IZ,{}):P.jsx("div",{style:{width:"100%",boxSizing:"border-box"},children:e.getRowModel().rows.map((b,w)=>b?P.jsx("div",{"data-index":w,ref:S=>{m.current[w]=S},style:{width:"100%",boxSizing:"border-box",minHeight:"3rem",height:"fit-content",borderBottom:"1px solid var(--ds-table-body-border-bottom-color)"},children:P.jsx(X3,{row:b,setTableData:t,setRowSelection:n,onRowClick:o,onRowDoubleClick:i,setCurrentEditingCell:c,isScrollHighlighted:Number(a)>0&&w===Number(a)-1,radio:u,isClicked:a!==void 0?a-1===w:w===l,isTriggerHighlight:l===-1?w===h:!1,rowSelection:A,isClickedCheckbox:f,pagination:p})},b.id??w):null)}),P.jsx(cl,{})]})});K3.displayName="Rows";const qZ=({setTableData:e,setRowSelection:t,table:n,isPlusButton:r,onAddFn:o,isAddRowActive:i,clickedRowIndex:a,setClickedRowIndex:l,radio:c,scrollAreaRef:u})=>{const[A,f]=Y.useState(0),p=()=>{if(u&&u.current){const v=u.current.querySelector("[data-radix-scroll-area-viewport]");v&&v.scrollTo({top:0})}if(o&&(o(),!i))return;const h=v=>{let b=[];return v.forEach(w=>{w.columns?b=b.concat(h(w.columns)):w.accessorKey&&b.push(w)}),b},y=h(n.options.columns),m={crud:"C",id:String(A)+"_new"};f(v=>v+1),y.forEach(v=>{const b=v.id||v.accessorKey;v.isOnly?m[b]="N":v.type==="checkbox"?typeof v.defaultChecked=="boolean"?m[b]=v.defaultChecked?"Y":"N":m[b]="Y":m[b]=""}),e(v=>(t(c?{0:!0}:b=>{const w={};return Object.entries(b).forEach(([S,E])=>{w[(Number(S)+1).toString()]=E}),{0:!0,...w}}),l(a+1),[m,...v]))};return P.jsx(P.Fragment,{children:r&&P.jsx(Vn,{onClick:p,variant:"outlined",size:"xsmall",iconOnly:!0,children:P.jsx(zA,{style:{fontSize:"1.9rem"}})})})},GZ=({rowSelection:e,table:t,setTableData:n,onDelete:r,setRowSelection:o,setIsWarning:i,setWarningText:a,onDelFn:l,deleteAllData:c,setClickedRowIndex:u})=>{const[A,f]=Y.useState(!1),p=t.getRowModel().rows.map(y=>y.original),h=()=>{if(l&&l(p),r){const y=t.getSelectedRowModel().rows.map(v=>v.original).filter(v=>v.crud==="C"),m=t.getSelectedRowModel().rows.map(v=>v.original).filter(v=>v.crud!=="C");c?r(p):(n(v=>v.filter(b=>!y.includes(b))),r(m))}o({}),u(-1),f(!1)};return P.jsxs(P.Fragment,{children:[r&&P.jsx(Vn,{variant:"outlined",size:"xsmall",iconOnly:!0,onClick:()=>{if(Object.keys(e).length===0){a("선택된 행이 없습니다. 행을 선택해주세요"),i(!0);return}f(!0)},children:P.jsx(im,{style:{fontSize:"1.9rem"}})}),P.jsx(us,{open:A,onClose:()=>f(!1),type:"confirm",dialogContent:"삭제하시겠습니까?",onOk:h})]})},XZ=({rowSelection:e,onSave:t,table:n,setIsWarning:r,setWarningText:o,setRowSelection:i})=>{const[a,l]=Y.useState(!1),c=()=>{let u=n.getSelectedRowModel().rows.map(f=>f.original);u=u.map(f=>{const{id:p,...h}=f;return h});const A=n.getRowModel().rows.map(f=>f.original);t&&t(u,A),i({}),l(!1)};return P.jsxs(P.Fragment,{children:[t&&P.jsx(Vn,{variant:"contained",size:"xsmall",startIcon:P.jsx(vw,{style:{fontSize:"2rem"}}),onClick:()=>{if(Object.keys(e).length===0){o("선택된 행이 없습니다. 행을 선택해주세요"),r(!0);return}const u=n.getSelectedRowModel().rows.map(h=>h.original),f=n.getAllColumns().filter(h=>h.columnDef.required).map(h=>h.id);if(u.some(h=>f.some(y=>!h[y]&&h[y]!==0))){o("모든 필수 항목을 입력해주세요"),r(!0);return}l(!0)},children:P.jsx("span",{children:"저장"})}),P.jsx(us,{open:a,onClose:()=>l(!1),type:"confirm",dialogContent:"저장하시겠습니까?",onOk:c})]})},KZ=({setTableData:e,rowSelection:t,tableData:n,onDelete:r,setRowSelection:o,table:i,onSave:a,buttons:l,isPlusButton:c,onAddFn:u,isAddRowActive:A,clickedRowIndex:f,setClickedRowIndex:p,onDelFn:h,deleteAllData:y,radio:m,scrollAreaRef:v})=>{const[b,w]=Y.useState(!1),[S,E]=Y.useState("");return P.jsxs("div",{style:{display:"flex",height:"100%",alignItems:"center",gap:"0.5rem"},children:[b&&P.jsx(us,{open:b,type:"error",onClose:()=>w(!1),dialogContent:S}),l,P.jsx(qZ,{setTableData:e,setRowSelection:o,table:i,isPlusButton:c,onAddFn:u,isAddRowActive:A,clickedRowIndex:f,setClickedRowIndex:p,radio:m,scrollAreaRef:v}),P.jsx(GZ,{setTableData:e,rowSelection:t,table:i,onDelete:r,setRowSelection:o,setIsWarning:w,setWarningText:E,onDelFn:h,deleteAllData:y,setClickedRowIndex:p}),P.jsx(XZ,{rowSelection:t,onSave:a,table:i,setIsWarning:w,setWarningText:E,setRowSelection:o})]})},JZ=({title:e,isTableTitleIcon:t})=>P.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"0.5rem"},children:[t&&P.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[P.jsx("path",{d:"M6.17576 21.8775L0.884971 19.3548C0.345741 19.0955 0 18.548 0 17.9462V7.2375C0 6.3219 0.945237 5.71683 1.7636 6.1106L7.05439 8.6333C7.59362 8.89262 7.93936 9.44006 7.93936 10.0419V20.7506C7.93936 21.6662 6.99412 22.2713 6.17576 21.8775Z",fill:"#F83A3A",fillOpacity:"0.6"}),P.jsx("path",{d:"M11.7969 18.8846L6.50606 16.3619C5.96684 16.1026 5.62109 15.5551 5.62109 14.9533V4.2414C5.62109 3.3258 6.56633 2.72074 7.38469 3.11451L12.6755 5.63721C13.2147 5.89652 13.5605 6.44396 13.5605 7.04583V17.7545C13.5605 18.6701 12.6152 19.2752 11.7969 18.8814V18.8846Z",fill:"#4A6DFD"}),P.jsx("path",{d:"M17.4209 15.8924L12.1301 13.3697C11.5909 13.1104 11.2451 12.563 11.2451 11.9611V1.24921C11.2451 0.333616 12.1904 -0.271448 13.0087 0.122323L18.2995 2.64502C18.8387 2.90434 19.1845 3.45178 19.1845 4.05364V14.7623C19.1845 15.6779 18.2392 16.283 17.4209 15.8892V15.8924Z",fill:"#1D3475",fillOpacity:"0.8"}),P.jsx("path",{d:"M7.05457 8.62916L5.62402 7.94727V14.9487C5.62402 15.5506 5.96976 16.1012 6.50899 16.3573L7.93954 17.0392V10.041C7.93954 9.43912 7.5938 8.88848 7.05457 8.63236V8.62916Z",fill:"#5652FF"}),P.jsx("path",{d:"M12.6757 5.63698L11.2451 4.95508V11.9565C11.2451 12.5584 11.5909 13.109 12.1301 13.3651L13.5606 14.047V7.04879C13.5606 6.44693 13.2149 5.89629 12.6757 5.64018V5.63698Z",fill:"#365DEA"})]}),P.jsx("h2",{style:{fontWeight:600,fontSize:"var(--ds-table-title-font-size)",lineHeight:1},children:e})]}),ZZ=({total:e})=>P.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"0.3rem",fontSize:"var(--ds-table-subtitle-font-size)"},children:[P.jsx("span",{children:"총"}),P.jsx("span",{style:{color:"var(--ds-table-text-highlight)"},children:e||0}),P.jsx("span",{children:"건"})]}),eee=({setTableData:e,rowSelection:t,tableData:n,onDelete:r,setRowSelection:o,table:i,onSave:a,title:l,isTotal:c,total:u,buttons:A,isPlusButton:f,titleRef:p,onAddFn:h,isAddRowActive:y,clickedRowIndex:m,setClickedRowIndex:v,onDelFn:b,deleteAllData:w,radio:S,scrollAreaRef:E,isTableTitleIcon:I})=>P.jsxs("div",{ref:p,style:{marginBottom:"1rem",display:"flex",minHeight:"2.7rem",width:"100%",alignItems:"flex-end",justifyContent:"space-between"},children:[P.jsxs("div",{style:{display:"flex",height:"100%",alignItems:"center",gap:"1rem"},children:[l?P.jsx(JZ,{title:l,isTableTitleIcon:I}):null,l&&c?P.jsx("div",{style:{height:"1.2rem",width:"0.1rem",background:"#C6C6C6"}}):null,c?P.jsx(ZZ,{total:u}):null]}),P.jsx(KZ,{setTableData:e,rowSelection:t,table:i,tableData:n,onDelete:r,setRowSelection:o,onSave:a,buttons:A,isPlusButton:f,onAddFn:h,isAddRowActive:y,clickedRowIndex:m,setClickedRowIndex:v,onDelFn:b,deleteAllData:w,radio:S,scrollAreaRef:E})]});var tee=typeof global=="object"&&global&&global.Object===Object&&global,nee=typeof self=="object"&&self&&self.Object===Object&&self,J3=tee||nee||Function("return this")(),Eg=J3.Symbol,Z3=Object.prototype,ree=Z3.hasOwnProperty,oee=Z3.toString,$d=Eg?Eg.toStringTag:void 0;function iee(e){var t=ree.call(e,$d),n=e[$d];try{e[$d]=void 0;var r=!0}catch{}var o=oee.call(e);return r&&(t?e[$d]=n:delete e[$d]),o}var aee=Object.prototype,see=aee.toString;function lee(e){return see.call(e)}var cee="[object Null]",uee="[object Undefined]",eM=Eg?Eg.toStringTag:void 0;function dee(e){return e==null?e===void 0?uee:cee:eM&&eM in Object(e)?iee(e):lee(e)}function Aee(e){return e!=null&&typeof e=="object"}var fee="[object Symbol]";function pee(e){return typeof e=="symbol"||Aee(e)&&dee(e)==fee}var gee=/\s/;function hee(e){for(var t=e.length;t--&&gee.test(e.charAt(t)););return t}var mee=/^\s+/;function vee(e){return e&&e.slice(0,hee(e)+1).replace(mee,"")}function Wb(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var tM=NaN,yee=/^[-+]0x[0-9a-f]+$/i,bee=/^0b[01]+$/i,Cee=/^0o[0-7]+$/i,wee=parseInt;function nM(e){if(typeof e=="number")return e;if(pee(e))return tM;if(Wb(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Wb(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=vee(e);var n=bee.test(e);return n||Cee.test(e)?wee(e.slice(2),n?2:8):yee.test(e)?tM:+e}var Qb=function(){return J3.Date.now()},xee="Expected a function",See=Math.max,Eee=Math.min;function Iee(e,t,n){var r,o,i,a,l,c,u=0,A=!1,f=!1,p=!0;if(typeof e!="function")throw new TypeError(xee);t=nM(t)||0,Wb(n)&&(A=!!n.leading,f="maxWait"in n,i=f?See(nM(n.maxWait)||0,t):i,p="trailing"in n?!!n.trailing:p);function h(O){var T=r,M=o;return r=o=void 0,u=O,a=e.apply(M,T),a}function y(O){return u=O,l=setTimeout(b,t),A?h(O):a}function m(O){var T=O-c,M=O-u,R=t-T;return f?Eee(R,i-M):R}function v(O){var T=O-c,M=O-u;return c===void 0||T>=t||T<0||f&&M>=i}function b(){var O=Qb();if(v(O))return w(O);l=setTimeout(b,m(O))}function w(O){return l=void 0,p&&r?h(O):(r=o=void 0,a)}function S(){l!==void 0&&clearTimeout(l),u=0,r=c=o=l=void 0}function E(){return l===void 0?a:w(Qb())}function I(){var O=Qb(),T=v(O);if(r=arguments,o=this,c=O,T){if(l===void 0)return y(c);if(f)return clearTimeout(l),l=setTimeout(b,t),h(c)}return l===void 0&&(l=setTimeout(b,t)),a}return I.cancel=S,I.flush=E,I}const Oee=()=>{const e=Y.useRef(null),[t,n]=Y.useState(0);return Y.useEffect(()=>{if(!e.current)return;const r=new ResizeObserver(Iee(o=>{const i=o[0].contentRect.height;n(i)},100));return r.observe(e.current),()=>r.disconnect()},[]),[e,t]},Tee=e=>{const t=Y.useRef(null);return Y.useEffect(()=>{const n=r=>{t.current&&!t.current.contains(r.target)&&e()};return document.addEventListener("mousedown",n),()=>{document.removeEventListener("mousedown",n)}},[e]),t},Pee=({data:e,columns:t=[],checkbox:n=!1,radio:r=!1,onChecked:o,onDelete:i,deleteAllData:a,onSave:l,onRowClick:c,onRowDoubleClick:u,title:A="목록",isTotal:f=!0,buttons:p,isLoading:h=!1,isPlusButton:y=!0,scrollTo:m,modalData:v,onAddFn:b,pagination:w,isAddRowActive:S,onModalApplied:E,rowClickTriggerIdx:I,onDelFn:O,isClickedCheckbox:T=!1,onTableDataChange:M,checkboxCheckedIdx:R,No:k=!0,selectedItems:B,setSelectedItems:$,isTableTitleIcon:V,isEditMode:N=!1})=>{const F=Y.useRef(null),L=Y.useMemo(()=>e??[],[e]),[_,W]=Y.useState(L),[j,H]=Y.useState({}),[U,Q]=Y.useState(-1),X=Y.useRef(!1),J=Y.useCallback(Me=>{X.current=!0,H(Me)},[]),ee=Y.useMemo(()=>_,[_]),Z=Tee(()=>{(!j||Object.keys(j).length===0)&&Q(-1)}),ae=Y.useMemo(()=>({id:"select",header:({table:Me})=>P.jsx(va,{checked:Me.getIsAllRowsSelected(),onChange:Me.getToggleAllRowsSelectedHandler()}),cell:({row:Me})=>P.jsx(va,{checked:Me.getIsSelected(),disabled:!Me.getCanSelect(),onChange:Me.getToggleSelectedHandler()}),width:"40px",align:"center"}),[]),se=Y.useMemo(()=>({id:"No",header:()=>P.jsx("span",{children:"No"}),cell:({row:Me})=>Me,width:"4rem",align:"center"}),[]),ne=Y.useMemo(()=>({id:"edit",header:()=>{},cell:({row:Me})=>Me,width:"4rem",align:"center"}),[]),re=Y.useMemo(()=>{const Me=t.filter(Qe=>Qe.visible!==!1),Ce=[];return(N||y)&&Ce.push(ne),(n||r)&&Ce.push(ae),k&&Ce.push(se),Ce.push(...Me),Ce},[n,r,k,ae,se,t,ne,y,N]),oe=SZ({data:ee,columns:re,getCoreRowModel:bZ(),enableRowSelection:!0,onRowSelectionChange:J,state:{rowSelection:j}}),[K,ge]=Y.useState({rowIndex:-1,columnId:"",isActive:!1}),[ce,Ee]=Y.useState(!1),me=Y.useMemo(()=>typeof I=="number"?I:-1,[I]);Y.useEffect(()=>{Ee(!1),Q(-1)},[me,_]),Y.useEffect(()=>{if(!ce&&oe.getRowModel().rows.length>me){const Me=oe.getRowModel().rows[me];Me&&c&&c(Me.original,me),Ee(!0)}},[ce,me,c,oe,_]),Y.useEffect(()=>{M&&M(_)},[_,M]),Y.useEffect(()=>{var Ce;const Me=typeof v=="object"&&v&&!Array.isArray(v)&&Object.values(v).every(Qe=>!Qe);K.isActive&&v&&!Me&&(W(Qe=>Qe.map((Xe,_e)=>_e!==K.rowIndex?Xe:typeof v=="object"&&!Array.isArray(v)?{...Xe,...v}:{...Xe,[K.columnId]:v})),H(r?{[(Ce=oe.getRowModel().rows[K.rowIndex])==null?void 0:Ce.id]:!0}:Qe=>{var Xe;return{...Qe,[(Xe=oe.getRowModel().rows[K.rowIndex])==null?void 0:Xe.id]:!0}}),ge({rowIndex:-1,columnId:"",isActive:!1}),E&&E())},[v,K,E,oe,r]);const Re=Y.useRef([]),Ie=Y.useRef(!1),ze=Y.useRef(!1);Y.useEffect(()=>{if(ze.current){ze.current=!1;return}if(!o)return;const Me=oe.getSelectedRowModel().rows,Ce=Me.map(nt=>nt.original),Qe=Re.current;if(Qe.length===Ce.length&&Qe.every((nt,qe)=>nt===Ce[qe]))return;Re.current=Ce;let _e=-1;if(Me.length>0){const nt=Me[Me.length-1];_e=oe.getRowModel().rows.findIndex(qe=>qe.id===nt.id)}o(Ce,_e)},[o,oe,j]);function Ve(Me,Ce){const Qe=new Map;Me.forEach((_e,nt)=>{const qe=_e&&_e.id;qe!=null&&qe!==""&&Qe.set(String(qe),nt)});function Xe(_e,nt){return _e===nt?!0:typeof _e!="object"||typeof nt!="object"||_e===null||nt===null?!1:Object.keys(nt).every(je=>Xe(_e[je],nt[je]))}return Ce.map(_e=>{const nt=_e&&_e.id;if(nt!=null&&nt!==""){const qe=Qe.get(String(nt));if(qe!==void 0)return qe}return Me.findIndex(qe=>Xe(qe,_e))})}Y.useEffect(()=>{if(!B)return;if(X.current){X.current=!1;return}const Me=Ve(_,B||[]),Ce={};Me.forEach(Qe=>{if(Qe<0)return;const Xe=oe.getRowModel().rows[Qe],_e=Xe?Xe.id:`${Qe}`;Ce[_e]=!0}),Ie.current=!0,H(Ce)},[_,B,oe]),Y.useEffect(()=>{if(!$||!B)return;if(Ie.current){Ie.current=!1;return}const Me=oe.getSelectedRowModel().rows.map(nt=>nt.original),Ce=nt=>(nt||[]).map(qe=>qe&&qe.id).sort(),Qe=Ce(Me),Xe=Ce(B);Qe.length===Xe.length&&Qe.every((nt,qe)=>nt===Xe[qe])||$(Me)},[oe,B,$]),Y.useEffect(()=>{const Me=L.map((Ce,Qe)=>Ce&&Object.prototype.hasOwnProperty.call(Ce,"id")&&Ce.id!==void 0&&Ce.id!==null&&Ce.id!==""?Ce:{...Ce,id:String(Qe)});W(Me),H(me===-1?{}:{triggerIndex:!0})},[h,L,me]),Y.useEffect(()=>{(!j||Object.keys(j).length===0)&&Q(-1)},[j]),Y.useEffect(()=>{var Qe;if(R===void 0||typeof R!="number"||R<0)return;const Me=oe.getRowModel().rows;if(!Me||Me.length===0||R>=Me.length)return;Ie.current=!0;const Ce=(Qe=Me[R])==null?void 0:Qe.id;Ce&&(H({[Ce]:!0}),Q(R))},[R,_,oe]);const Oe=(Me,Ce)=>{Q(Ce),c==null||c(Me,Ce)},we=(Me,Ce)=>{u==null||u(Me,Ce)},[at,We]=Oee();return P.jsxs("div",{style:{position:"relative",height:"100%",width:"100%",color:"var(--ds-table-text-color)"},children:[(f||A||y||O||b||p)&&P.jsx(eee,{setTableData:W,rowSelection:j,table:oe,tableData:_,onDelete:i,deleteAllData:a,setRowSelection:J,onSave:l,title:A,isTotal:f,total:w?w.totalElements:_.length,buttons:p,isPlusButton:y,titleRef:at,onAddFn:b,isAddRowActive:S,clickedRowIndex:U,setClickedRowIndex:Q,onDelFn:Me=>{ze.current=!0,O&&O(Me)},radio:r,scrollAreaRef:F,isTableTitleIcon:V}),P.jsxs("div",{style:{width:"100%",height:`calc(100% - ${We/10+1}rem)`,borderTop:"1px solid var(--ds-table-header-border-top-color)"},ref:Z,children:[P.jsx(Q3,{table:oe,headerGroupsLength:oe.getHeaderGroups().length,clickedRowIndex:U}),P.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"1.2rem",height:"calc(100% - 3rem)"},children:[P.jsx(K3,{table:oe,setTableData:W,setRowSelection:J,isLoading:h,onRowClick:Oe,onRowDoubleClick:we,scrollTo:m,clickedRowIndex:U,setCurrentEditingCell:ge,radio:r,rowSelection:j,isClickedCheckbox:T,ref:F,pagination:w,triggerIndex:me}),!h&&w&&P.jsx("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%"},children:P.jsx(T3,{page:w.page,count:w.totalPages,size:"medium",onChange:(Me,Ce)=>w.onPageChange(Ce),shape:"rounded",color:"standard",variant:"outlined",showFirstButton:!0,showLastButton:!0})})]})]})]})};function kee(e){const{children:t,value:n,index:r,...o}=e;return P.jsx("div",{role:"tabpanel",hidden:n!==r,id:`tabs-tabpanel-${r}`,"aria-labelledby":`tabs-tab-${r}`,...o,children:n===r&&P.jsx("div",{children:t})})}function Mee(e){return{id:`tabs-tab-${e}`,"aria-controls":`tabs-tabpanel-${e}`}}const Dee=Y.forwardRef(function({value:t,onChange:n,orientation:r="horizontal",variant:o="standard",items:i,sx:a,textColor:l,indicatorColor:c,selectionFollowsFocus:u=!1,...A},f){return P.jsxs(Le.Box,{sx:{width:"100%",display:r==="vertical"?"flex":"block",...a},children:[P.jsx(Le.Tabs,{ref:f,value:t,onChange:n,orientation:r,variant:o,textColor:l,indicatorColor:c,selectionFollowsFocus:u,...A,children:i==null?void 0:i.map((p,h)=>P.jsx(Le.Tab,{label:p.label,icon:p.icon,iconPosition:p.iconPosition??"top",disabled:p.disabled,...Mee(h)},p.key))}),i.map((p,h)=>P.jsx(kee,{value:t,index:h,children:p.content},p.key))]})}),Ree=Yt(P.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 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 12 17 15.59z"}),"Cancel");function Bee(e){return Ft("MuiChip",e)}const $t=Ht("MuiChip",["root","sizeSmall","sizeMedium","colorDefault","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]),Nee=e=>{const{classes:t,disabled:n,size:r,color:o,iconColor:i,onDelete:a,clickable:l,variant:c}=e,u={root:["root",c,n&&"disabled",`size${$e(r)}`,`color${$e(o)}`,l&&"clickable",l&&`clickableColor${$e(o)}`,a&&"deletable",a&&`deletableColor${$e(o)}`,`${c}${$e(o)}`],label:["label",`label${$e(r)}`],avatar:["avatar",`avatar${$e(r)}`,`avatarColor${$e(o)}`],icon:["icon",`icon${$e(r)}`,`iconColor${$e(i)}`],deleteIcon:["deleteIcon",`deleteIcon${$e(r)}`,`deleteIconColor${$e(o)}`,`deleteIcon${$e(c)}Color${$e(o)}`]};return Vt(u,Bee,t)},Fee=ke("div",{name:"MuiChip",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{color:r,iconColor:o,clickable:i,onDelete:a,size:l,variant:c}=n;return[{[`& .${$t.avatar}`]:t.avatar},{[`& .${$t.avatar}`]:t[`avatar${$e(l)}`]},{[`& .${$t.avatar}`]:t[`avatarColor${$e(r)}`]},{[`& .${$t.icon}`]:t.icon},{[`& .${$t.icon}`]:t[`icon${$e(l)}`]},{[`& .${$t.icon}`]:t[`iconColor${$e(o)}`]},{[`& .${$t.deleteIcon}`]:t.deleteIcon},{[`& .${$t.deleteIcon}`]:t[`deleteIcon${$e(l)}`]},{[`& .${$t.deleteIcon}`]:t[`deleteIconColor${$e(r)}`]},{[`& .${$t.deleteIcon}`]:t[`deleteIcon${$e(c)}Color${$e(r)}`]},t.root,t[`size${$e(l)}`],t[`color${$e(r)}`],i&&t.clickable,i&&r!=="default"&&t[`clickableColor${$e(r)})`],a&&t.deletable,a&&r!=="default"&&t[`deletableColor${$e(r)}`],t[c],t[`${c}${$e(r)}`]]}})(Sn(({theme:e})=>{const t=e.palette.mode==="light"?e.palette.grey[700]:e.palette.grey[300];return{maxWidth:"100%",fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:(e.vars||e).palette.text.primary,backgroundColor:(e.vars||e).palette.action.selected,borderRadius:32/2,whiteSpace:"nowrap",transition:e.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${$t.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${$t.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:t,fontSize:e.typography.pxToRem(12)},[`& .${$t.avatarColorPrimary}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark},[`& .${$t.avatarColorSecondary}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark},[`& .${$t.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${$t.icon}`]:{marginLeft:5,marginRight:-6},[`& .${$t.deleteIcon}`]:{WebkitTapHighlightColor:"transparent",color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.26)`:vn(e.palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.4)`:vn(e.palette.text.primary,.4)}},variants:[{props:{size:"small"},style:{height:24,[`& .${$t.icon}`]:{fontSize:18,marginLeft:4,marginRight:-4},[`& .${$t.deleteIcon}`]:{fontSize:16,marginRight:4,marginLeft:-4}}},...Object.entries(e.palette).filter(yr(["contrastText"])).map(([n])=>({props:{color:n},style:{backgroundColor:(e.vars||e).palette[n].main,color:(e.vars||e).palette[n].contrastText,[`& .${$t.deleteIcon}`]:{color:e.vars?`rgba(${e.vars.palette[n].contrastTextChannel} / 0.7)`:vn(e.palette[n].contrastText,.7),"&:hover, &:active":{color:(e.vars||e).palette[n].contrastText}}}})),{props:n=>n.iconColor===n.color,style:{[`& .${$t.icon}`]:{color:e.vars?e.vars.palette.Chip.defaultIconColor:t}}},{props:n=>n.iconColor===n.color&&n.color!=="default",style:{[`& .${$t.icon}`]:{color:"inherit"}}},{props:{onDelete:!0},style:{[`&.${$t.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:vn(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}}},...Object.entries(e.palette).filter(yr(["dark"])).map(([n])=>({props:{color:n,onDelete:!0},style:{[`&.${$t.focusVisible}`]:{background:(e.vars||e).palette[n].dark}}})),{props:{clickable:!0},style:{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:vn(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)},[`&.${$t.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:vn(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)},"&:active":{boxShadow:(e.vars||e).shadows[1]}}},...Object.entries(e.palette).filter(yr(["dark"])).map(([n])=>({props:{color:n,clickable:!0},style:{[`&:hover, &.${$t.focusVisible}`]:{backgroundColor:(e.vars||e).palette[n].dark}}})),{props:{variant:"outlined"},style:{backgroundColor:"transparent",border:e.vars?`1px solid ${e.vars.palette.Chip.defaultBorder}`:`1px solid ${e.palette.mode==="light"?e.palette.grey[400]:e.palette.grey[700]}`,[`&.${$t.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${$t.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`& .${$t.avatar}`]:{marginLeft:4},[`& .${$t.avatarSmall}`]:{marginLeft:2},[`& .${$t.icon}`]:{marginLeft:4},[`& .${$t.iconSmall}`]:{marginLeft:2},[`& .${$t.deleteIcon}`]:{marginRight:5},[`& .${$t.deleteIconSmall}`]:{marginRight:3}}},...Object.entries(e.palette).filter(yr()).map(([n])=>({props:{variant:"outlined",color:n},style:{color:(e.vars||e).palette[n].main,border:`1px solid ${e.vars?`rgba(${e.vars.palette[n].mainChannel} / 0.7)`:vn(e.palette[n].main,.7)}`,[`&.${$t.clickable}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[n].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:vn(e.palette[n].main,e.palette.action.hoverOpacity)},[`&.${$t.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[n].mainChannel} / ${e.vars.palette.action.focusOpacity})`:vn(e.palette[n].main,e.palette.action.focusOpacity)},[`& .${$t.deleteIcon}`]:{color:e.vars?`rgba(${e.vars.palette[n].mainChannel} / 0.7)`:vn(e.palette[n].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[n].main}}}}))]}})),Lee=ke("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,t)=>{const{ownerState:n}=e,{size:r}=n;return[t.label,t[`label${$e(r)}`]]}})({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap",variants:[{props:{variant:"outlined"},style:{paddingLeft:11,paddingRight:11}},{props:{size:"small"},style:{paddingLeft:8,paddingRight:8}},{props:{size:"small",variant:"outlined"},style:{paddingLeft:7,paddingRight:7}}]});function rM(e){return e.key==="Backspace"||e.key==="Delete"}const oM=C.forwardRef(function(t,n){const r=En({props:t,name:"MuiChip"}),{avatar:o,className:i,clickable:a,color:l="default",component:c,deleteIcon:u,disabled:A=!1,icon:f,label:p,onClick:h,onDelete:y,onKeyDown:m,onKeyUp:v,size:b="medium",variant:w="filled",tabIndex:S,skipFocusWhenDisabled:E=!1,...I}=r,O=C.useRef(null),T=tr(O,n),M=j=>{j.stopPropagation(),y&&y(j)},R=j=>{j.currentTarget===j.target&&rM(j)&&j.preventDefault(),m&&m(j)},k=j=>{j.currentTarget===j.target&&y&&rM(j)&&y(j),v&&v(j)},B=a!==!1&&h?!0:a,$=B||y?Tc:c||"div",V={...r,component:$,disabled:A,size:b,color:l,iconColor:C.isValidElement(f)&&f.props.color||l,onDelete:!!y,clickable:B,variant:w},N=Nee(V),F=$===Tc?{component:c||"div",focusVisibleClassName:N.focusVisible,...y&&{disableRipple:!0}}:{};let L=null;y&&(L=u&&C.isValidElement(u)?C.cloneElement(u,{className:st(u.props.className,N.deleteIcon),onClick:M}):P.jsx(Ree,{className:st(N.deleteIcon),onClick:M}));let _=null;o&&C.isValidElement(o)&&(_=C.cloneElement(o,{className:st(N.avatar,o.props.className)}));let W=null;return f&&C.isValidElement(f)&&(W=C.cloneElement(f,{className:st(N.icon,f.props.className)})),process.env.NODE_ENV!=="production"&&_&&W&&console.error("MUI: The Chip component can not handle the avatar and the icon prop at the same time. Pick one."),P.jsxs(Fee,{as:$,className:st(N.root,i),disabled:B&&A?!0:void 0,onClick:h,onKeyDown:R,onKeyUp:k,ref:T,tabIndex:E&&A?-1:S,ownerState:V,...F,...I,children:[_||W,P.jsx(Lee,{className:st(N.label),ownerState:V,children:p}),L]})});process.env.NODE_ENV!=="production"&&(oM.propTypes={avatar:s.element,children:QC,classes:s.object,className:s.string,clickable:s.bool,color:s.oneOfType([s.oneOf(["default","primary","secondary","error","info","success","warning"]),s.string]),component:s.elementType,deleteIcon:s.element,disabled:s.bool,icon:s.element,label:s.node,onClick:s.func,onDelete:s.func,onKeyDown:s.func,onKeyUp:s.func,size:s.oneOfType([s.oneOf(["medium","small"]),s.string]),skipFocusWhenDisabled:s.bool,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),tabIndex:s.number,variant:s.oneOfType([s.oneOf(["filled","outlined"]),s.string])});const Vee=({className:e,label:t,...n})=>P.jsx(oM,{className:e,label:t,...n});function Hee(e){return Ft("MuiTooltip",e)}const Rn=Ht("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]);function $ee(e){return Math.round(e*1e5)/1e5}const zee=e=>{const{classes:t,disableInteractive:n,arrow:r,touch:o,placement:i}=e,a={popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",o&&"touch",`tooltipPlacement${$e(i.split("-")[0])}`],arrow:["arrow"]};return Vt(a,Hee,t)},jee=ke(If,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.popper,!n.disableInteractive&&t.popperInteractive,n.arrow&&t.popperArrow,!n.open&&t.popperClose]}})(Sn(({theme:e})=>({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none",variants:[{props:({ownerState:t})=>!t.disableInteractive,style:{pointerEvents:"auto"}},{props:({open:t})=>!t,style:{pointerEvents:"none"}},{props:({ownerState:t})=>t.arrow,style:{[`&[data-popper-placement*="bottom"] .${Rn.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${Rn.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${Rn.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}},[`&[data-popper-placement*="left"] .${Rn.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}}}},{props:({ownerState:t})=>t.arrow&&!t.isRtl,style:{[`&[data-popper-placement*="right"] .${Rn.arrow}`]:{left:0,marginLeft:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!!t.isRtl,style:{[`&[data-popper-placement*="right"] .${Rn.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!t.isRtl,style:{[`&[data-popper-placement*="left"] .${Rn.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!!t.isRtl,style:{[`&[data-popper-placement*="left"] .${Rn.arrow}`]:{left:0,marginLeft:"-0.71em"}}}]}))),_ee=ke("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.tooltip,n.touch&&t.touch,n.arrow&&t.tooltipArrow,t[`tooltipPlacement${$e(n.placement.split("-")[0])}`]]}})(Sn(({theme:e})=>({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:vn(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium,[`.${Rn.popper}[data-popper-placement*="left"] &`]:{transformOrigin:"right center"},[`.${Rn.popper}[data-popper-placement*="right"] &`]:{transformOrigin:"left center"},[`.${Rn.popper}[data-popper-placement*="top"] &`]:{transformOrigin:"center bottom",marginBottom:"14px"},[`.${Rn.popper}[data-popper-placement*="bottom"] &`]:{transformOrigin:"center top",marginTop:"14px"},variants:[{props:({ownerState:t})=>t.arrow,style:{position:"relative",margin:0}},{props:({ownerState:t})=>t.touch,style:{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:`${$ee(16/14)}em`,fontWeight:e.typography.fontWeightRegular}},{props:({ownerState:t})=>!t.isRtl,style:{[`.${Rn.popper}[data-popper-placement*="left"] &`]:{marginRight:"14px"},[`.${Rn.popper}[data-popper-placement*="right"] &`]:{marginLeft:"14px"}}},{props:({ownerState:t})=>!t.isRtl&&t.touch,style:{[`.${Rn.popper}[data-popper-placement*="left"] &`]:{marginRight:"24px"},[`.${Rn.popper}[data-popper-placement*="right"] &`]:{marginLeft:"24px"}}},{props:({ownerState:t})=>!!t.isRtl,style:{[`.${Rn.popper}[data-popper-placement*="left"] &`]:{marginLeft:"14px"},[`.${Rn.popper}[data-popper-placement*="right"] &`]:{marginRight:"14px"}}},{props:({ownerState:t})=>!!t.isRtl&&t.touch,style:{[`.${Rn.popper}[data-popper-placement*="left"] &`]:{marginLeft:"24px"},[`.${Rn.popper}[data-popper-placement*="right"] &`]:{marginRight:"24px"}}},{props:({ownerState:t})=>t.touch,style:{[`.${Rn.popper}[data-popper-placement*="top"] &`]:{marginBottom:"24px"}}},{props:({ownerState:t})=>t.touch,style:{[`.${Rn.popper}[data-popper-placement*="bottom"] &`]:{marginTop:"24px"}}}]}))),Uee=ke("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(e,t)=>t.arrow})(Sn(({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:vn(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}})));let Ig=!1;const iM=new PA;let zd={x:0,y:0};function Og(e,t){return(n,...r)=>{t&&t(n,...r),e(n,...r)}}const aM=C.forwardRef(function(t,n){const r=En({props:t,name:"MuiTooltip"}),{arrow:o=!1,children:i,classes:a,components:l={},componentsProps:c={},describeChild:u=!1,disableFocusListener:A=!1,disableHoverListener:f=!1,disableInteractive:p=!1,disableTouchListener:h=!1,enterDelay:y=100,enterNextDelay:m=0,enterTouchDelay:v=700,followCursor:b=!1,id:w,leaveDelay:S=0,leaveTouchDelay:E=1500,onClose:I,onOpen:O,open:T,placement:M="bottom",PopperComponent:R,PopperProps:k={},slotProps:B={},slots:$={},title:V,TransitionComponent:N,TransitionProps:F,...L}=r,_=C.isValidElement(i)?i:P.jsx("span",{children:i}),W=Vi(),j=RA(),[H,U]=C.useState(),[Q,X]=C.useState(null),J=C.useRef(!1),ee=p||b,Z=Ps(),ae=Ps(),se=Ps(),ne=Ps(),[re,oe]=TA({controlled:T,default:!1,name:"Tooltip",state:"open"});let K=re;if(process.env.NODE_ENV!=="production"){const{current:Pe}=C.useRef(T!==void 0);C.useEffect(()=>{H&&H.disabled&&!Pe&&V!==""&&H.tagName.toLowerCase()==="button"&&console.warn(["MUI: You are providing a disabled `button` child to the Tooltip component.","A disabled element does not fire events.","Tooltip needs to listen to the child element's events to display the title.","","Add a simple wrapper element, such as a `span`."].join(`
|
|
576
576
|
`))},[V,H,Pe])}const ge=OA(w),ce=C.useRef(),Ee=Qr(()=>{ce.current!==void 0&&(document.body.style.WebkitUserSelect=ce.current,ce.current=void 0),ne.clear()});C.useEffect(()=>Ee,[Ee]);const me=Pe=>{iM.clear(),Ig=!0,oe(!0),O&&!K&&O(Pe)},Re=Qr(Pe=>{iM.start(800+S,()=>{Ig=!1}),oe(!1),I&&K&&I(Pe),Z.start(W.transitions.duration.shortest,()=>{J.current=!1})}),Ie=Pe=>{J.current&&Pe.type!=="touchstart"||(H&&H.removeAttribute("title"),ae.clear(),se.clear(),y||Ig&&m?ae.start(Ig?m:y,()=>{me(Pe)}):me(Pe))},ze=Pe=>{ae.clear(),se.start(S,()=>{Re(Pe)})},[,Ve]=C.useState(!1),Oe=Pe=>{kA(Pe.target)||(Ve(!1),ze(Pe))},we=Pe=>{H||U(Pe.currentTarget),kA(Pe.target)&&(Ve(!0),Ie(Pe))},at=Pe=>{J.current=!0;const Je=_.props;Je.onTouchStart&&Je.onTouchStart(Pe)},We=Pe=>{at(Pe),se.clear(),Z.clear(),Ee(),ce.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",ne.start(v,()=>{document.body.style.WebkitUserSelect=ce.current,Ie(Pe)})},Me=Pe=>{_.props.onTouchEnd&&_.props.onTouchEnd(Pe),Ee(),se.start(E,()=>{Re(Pe)})};C.useEffect(()=>{if(!K)return;function Pe(Je){Je.key==="Escape"&&Re(Je)}return document.addEventListener("keydown",Pe),()=>{document.removeEventListener("keydown",Pe)}},[Re,K]);const Ce=tr(eu(_),U,n);!V&&V!==0&&(K=!1);const Qe=C.useRef(),Xe=Pe=>{const Je=_.props;Je.onMouseMove&&Je.onMouseMove(Pe),zd={x:Pe.clientX,y:Pe.clientY},Qe.current&&Qe.current.update()},_e={},nt=typeof V=="string";u?(_e.title=!K&&nt&&!f?V:null,_e["aria-describedby"]=K?ge:null):(_e["aria-label"]=nt?V:null,_e["aria-labelledby"]=K&&!nt?ge:null);const qe={..._e,...L,..._.props,className:st(L.className,_.props.className),onTouchStart:at,ref:Ce,...b?{onMouseMove:Xe}:{}};process.env.NODE_ENV!=="production"&&(qe["data-mui-internal-clone-element"]=!0,C.useEffect(()=>{H&&!H.getAttribute("data-mui-internal-clone-element")&&console.error(["MUI: The `children` component of the Tooltip is not forwarding its props correctly.","Please make sure that props are spread on the same element that the ref is applied to."].join(`
|
|
577
577
|
`))},[H]));const je={};h||(qe.onTouchStart=We,qe.onTouchEnd=Me),f||(qe.onMouseOver=Og(Ie,qe.onMouseOver),qe.onMouseLeave=Og(ze,qe.onMouseLeave),ee||(je.onMouseOver=Ie,je.onMouseLeave=ze)),A||(qe.onFocus=Og(we,qe.onFocus),qe.onBlur=Og(Oe,qe.onBlur),ee||(je.onFocus=we,je.onBlur=Oe)),process.env.NODE_ENV!=="production"&&_.props.title&&console.error(["MUI: You have provided a `title` prop to the child of <Tooltip />.",`Remove this title prop \`${_.props.title}\` or the Tooltip component.`].join(`
|
|
578
578
|
`));const lt={...r,isRtl:j,arrow:o,disableInteractive:ee,placement:M,PopperComponentProp:R,touch:J.current},Te=typeof B.popper=="function"?B.popper(lt):B.popper,He=C.useMemo(()=>{var Je,rt;let Pe=[{name:"arrow",enabled:!!Q,options:{element:Q,padding:4}}];return(Je=k.popperOptions)!=null&&Je.modifiers&&(Pe=Pe.concat(k.popperOptions.modifiers)),(rt=Te==null?void 0:Te.popperOptions)!=null&&rt.modifiers&&(Pe=Pe.concat(Te.popperOptions.modifiers)),{...k.popperOptions,...Te==null?void 0:Te.popperOptions,modifiers:Pe}},[Q,k.popperOptions,Te==null?void 0:Te.popperOptions]),Ye=zee(lt),ye=typeof B.transition=="function"?B.transition(lt):B.transition,Be={slots:{popper:l.Popper,transition:l.Transition??N,tooltip:l.Tooltip,arrow:l.Arrow,...$},slotProps:{arrow:B.arrow??c.arrow,popper:{...k,...Te??c.popper},tooltip:B.tooltip??c.tooltip,transition:{...F,...ye??c.transition}}},[Ct,Ot]=ln("popper",{elementType:jee,externalForwardedProps:Be,ownerState:lt,className:st(Ye.popper,k==null?void 0:k.className)}),[Ge,tn]=ln("transition",{elementType:Md,externalForwardedProps:Be,ownerState:lt}),[Qt,Gt]=ln("tooltip",{elementType:_ee,className:Ye.tooltip,externalForwardedProps:Be,ownerState:lt}),[Rt,wt]=ln("arrow",{elementType:Uee,className:Ye.arrow,externalForwardedProps:Be,ownerState:lt,ref:X});return P.jsxs(C.Fragment,{children:[C.cloneElement(_,qe),P.jsx(Ct,{as:R??If,placement:M,anchorEl:b?{getBoundingClientRect:()=>({top:zd.y,left:zd.x,right:zd.x,bottom:zd.y,width:0,height:0})}:H,popperRef:Qe,open:H?K:!1,id:ge,transition:!0,...je,...Ot,popperOptions:He,children:({TransitionProps:Pe})=>P.jsx(Ge,{timeout:W.transitions.duration.shorter,...Pe,...tn,children:P.jsxs(Qt,{...Gt,children:[V,o?P.jsx(Rt,{...wt}):null]})})})]})});process.env.NODE_ENV!=="production"&&(aM.propTypes={arrow:s.bool,children:Ol.isRequired,classes:s.object,className:s.string,components:s.shape({Arrow:s.elementType,Popper:s.elementType,Tooltip:s.elementType,Transition:s.elementType}),componentsProps:s.shape({arrow:s.object,popper:s.object,tooltip:s.object,transition:s.object}),describeChild:s.bool,disableFocusListener:s.bool,disableHoverListener:s.bool,disableInteractive:s.bool,disableTouchListener:s.bool,enterDelay:s.number,enterNextDelay:s.number,enterTouchDelay:s.number,followCursor:s.bool,id:s.string,leaveDelay:s.number,leaveTouchDelay:s.number,onClose:s.func,onOpen:s.func,open:s.bool,placement:s.oneOf(["auto-end","auto-start","auto","bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),PopperComponent:s.elementType,PopperProps:s.object,slotProps:s.shape({arrow:s.oneOfType([s.func,s.object]),popper:s.oneOfType([s.func,s.object]),tooltip:s.oneOfType([s.func,s.object]),transition:s.oneOfType([s.func,s.object])}),slots:s.shape({arrow:s.elementType,popper:s.elementType,tooltip:s.elementType,transition:s.elementType}),sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),title:s.node,TransitionComponent:s.elementType,TransitionProps:s.object});const Yee=({className:e,title:t,children:n,arrow:r,placement:o,followCursor:i,open:a,setOpen:l,closeButton:c,style:u,componentsProps:A,...f})=>{var y,m,v,b,w,S;const p=P.jsxs("div",{className:"flex items-center",children:[t,P.jsx(Le.IconButton,{size:"small",sx:{marginLeft:"auto",marginRight:-.5},onClick:()=>l&&l(!1),children:P.jsx(om,{sx:{fontSize:12,color:"white"}})})]}),h=Le.styled(({className:E,...I})=>P.jsx(aM,{...I,classes:{popper:E}}))({[`& .${Rn.tooltip}`]:{display:"flex",alignItems:"center",fontSize:"var(--ds-font-size-sm)",...u}});return P.jsx(h,{className:e,title:c?p:t,arrow:r,placement:o,followCursor:i,open:a,onOpen:()=>l&&l(!0),onClose:()=>l&&!c&&l(!1),slotProps:{tooltip:{sx:{display:"flex",alignItems:"center",...(y=A==null?void 0:A.tooltip)==null?void 0:y.sx},className:(m=A==null?void 0:A.tooltip)==null?void 0:m.className,style:(v=A==null?void 0:A.tooltip)==null?void 0:v.style},arrow:{sx:{...(b=A==null?void 0:A.arrow)==null?void 0:b.sx},className:(w=A==null?void 0:A.arrow)==null?void 0:w.className,style:(S=A==null?void 0:A.arrow)==null?void 0:S.style}},...f,children:n})};function Tg(e,t){return e.filter(n=>!t.includes(n))}function sM(e,t){return e.filter(n=>t.includes(n))}const Wee=({left:e,right:t,setLeft:n,setRight:r,width:o=200,height:i=230})=>{const[a,l]=Y.useState([]),c=sM(a,e),u=sM(a,t),A=v=>()=>{const b=a.indexOf(v),w=[...a];b===-1?w.push(v):w.splice(b,1),l(w)},f=()=>{r(t.concat(c)),n(Tg(e,c)),l(Tg(a,c))},p=()=>{n(e.concat(u)),r(Tg(t,u)),l(Tg(a,u))},h=()=>{r(t.concat(e)),n([])},y=()=>{n(e.concat(t)),r([])},m=v=>P.jsx(Le.Paper,{sx:{width:o,height:i,overflow:"auto"},children:P.jsx(Le.List,{dense:!0,component:"div",role:"list",children:v==null?void 0:v.map(b=>{const w=`transfer-list-item-${b}-label`;return P.jsxs(Le.ListItemButton,{role:"listitem",onClick:A(b),children:[P.jsx(Le.ListItemIcon,{children:P.jsx(Le.Checkbox,{checked:a.includes(b),tabIndex:-1,disableRipple:!0})}),P.jsx(Le.ListItemText,{id:w,primary:`List item ${b+1}`})]},b)})})});return P.jsxs(ll,{container:!0,spacing:2,sx:{justifyContent:"center",alignItems:"center"},children:[P.jsx(ll,{children:m(e)}),P.jsx(ll,{children:P.jsxs(ll,{container:!0,direction:"column",sx:{aligns:"center"},children:[P.jsx(Vn,{sx:{my:.5},variant:"outlined",size:"small",onClick:h,disabled:(e==null?void 0:e.length)===0,"aria-label":"move all right",children:"≫"}),P.jsx(Vn,{sx:{my:.5},variant:"outlined",size:"small",onClick:f,disabled:c.length===0,"aria-label":"move selected right",children:">"}),P.jsx(Vn,{sx:{my:.5},variant:"outlined",size:"small",onClick:p,disabled:u.length===0,"aria-label":"move selected left",children:"<"}),P.jsx(Vn,{sx:{my:.5},variant:"outlined",size:"small",onClick:y,disabled:(t==null?void 0:t.length)===0,"aria-label":"move all left",children:"≪"})]})}),P.jsx(ll,{children:m(t)})]})};function lM(e){return Hi}const Qee=(e,t)=>{const n=C.useRef({}),[r,o]=C.useState(()=>{const a={};return e.forEach(l=>{l.models&&Object.entries(l.models).forEach(([c,u])=>{n.current[c]={isControlled:t[c]!==void 0,getDefaultValue:u.getDefaultValue},a[c]=u.getDefaultValue(t)})}),a}),i=Object.fromEntries(Object.entries(n.current).map(([a,l])=>{const c=t[a]??r[a];return[a,{value:c,setControlledValue:u=>{l.isControlled||o(A=>te({},A,{[a]:u}))}}]}));return process.env.NODE_ENV!=="production"&&Object.entries(n.current).forEach(([a,l])=>{const c=t[a],u=l.getDefaultValue(t);C.useEffect(()=>{l.isControlled!==(c!==void 0)&&console.error([`MUI X: A component is changing the ${l.isControlled?"":"un"}controlled ${a} state of TreeView to be ${l.isControlled?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${a} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
|
package/package.json
CHANGED