import{r as u,m as oo,j as s,n as qo,z as Fe}from"./index-BVAJPyoi.js";import{c as X}from"./clsx-B-dksMZM.js";import{i as ut,j as ft,F as ie,k as yt,C as ct,s as j,I as oe,n as $,o as vt,X as ro,p as Q,q as ae,K as Go,J as qe,N as be,aj as Xo,z as Bo,A as Oe,ak as _o,a4 as Do,al as ye,am as ge,an as so,ao as Ge,t as Eo,v as Yo,T as Et,ap as Zo,L as lo,y as No,r as Jo,H as Qo,aq as Fo,ar as Wo,R as Ho,U as Ve,u as tr,O as er,B as bt,Y as or,h as Me,f as He,S as rr,D as ao,b as io,d as co,e as Xe,g as po}from"./TextField-Co2uoZNe.js";import{S as _e}from"./help-D8Hbl_G7.js";const uo=t=>u.createElement("svg",{className:"size-6       ",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},u.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.04289 16.5418C5.65237 16.9323 5.65237 17.5655 6.04289 17.956C6.43342 18.3465 7.06658 18.3465 7.45711 17.956L11.9987 13.4144L16.5408 17.9565C16.9313 18.347 17.5645 18.347 17.955 17.9565C18.3455 17.566 18.3455 16.9328 17.955 16.5423L13.4129 12.0002L17.955 7.45808C18.3455 7.06756 18.3455 6.43439 17.955 6.04387C17.5645 5.65335 16.9313 5.65335 16.5408 6.04387L11.9987 10.586L7.45711 6.04439C7.06658 5.65386 6.43342 5.65386 6.04289 6.04439C5.65237 6.43491 5.65237 7.06808 6.04289 7.4586L10.5845 12.0002L6.04289 16.5418Z",fill:"currentColor"}));/**
 * @license lucide-react v0.544.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const nr=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]],vs=oo("layout-grid",nr);/**
 * @license lucide-react v0.544.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const sr=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],Ss=oo("rotate-ccw",sr);/**
 * @license lucide-react v0.544.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const lr=[["path",{d:"M12 3v18",key:"108xh3"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}]],Cs=oo("table",lr);function ar(t){return ft("MuiAlert",t)}const fo=ut("MuiAlert",["root","action","icon","message","filled","colorSuccess","colorInfo","colorWarning","colorError","filledSuccess","filledInfo","filledWarning","filledError","outlined","outlinedSuccess","outlinedInfo","outlinedWarning","outlinedError","standard","standardSuccess","standardInfo","standardWarning","standardError"]),ir=ie(s.jsx("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"})),cr=ie(s.jsx("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"})),dr=ie(s.jsx("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"})),pr=ie(s.jsx("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"})),Vo=ie(s.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})),ur=t=>{const{variant:e,color:o,severity:r,classes:n}=t,a={root:["root",`color${$(o||r)}`,`${e}${$(o||r)}`,`${e}`],icon:["icon"],message:["message"],action:["action"]};return vt(a,ar,n)},fr=j(ro,{name:"MuiAlert",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:o}=t;return[e.root,e[o.variant],e[`${o.variant}${$(o.color||o.severity)}`]]}})(Q(({theme:t})=>{const e=t.palette.mode==="light"?t.darken:t.lighten,o=t.palette.mode==="light"?t.lighten:t.darken;return{...t.typography.body2,backgroundColor:"transparent",display:"flex",padding:"6px 16px",variants:[...Object.entries(t.palette).filter(ae(["light"])).map(([r])=>({props:{colorSeverity:r,variant:"standard"},style:{color:t.vars?t.vars.palette.Alert[`${r}Color`]:e(t.palette[r].light,.6),backgroundColor:t.vars?t.vars.palette.Alert[`${r}StandardBg`]:o(t.palette[r].light,.9),[`& .${fo.icon}`]:t.vars?{color:t.vars.palette.Alert[`${r}IconColor`]}:{color:t.palette[r].main}}})),...Object.entries(t.palette).filter(ae(["light"])).map(([r])=>({props:{colorSeverity:r,variant:"outlined"},style:{color:t.vars?t.vars.palette.Alert[`${r}Color`]:e(t.palette[r].light,.6),border:`1px solid ${(t.vars||t).palette[r].light}`,[`& .${fo.icon}`]:t.vars?{color:t.vars.palette.Alert[`${r}IconColor`]}:{color:t.palette[r].main}}})),...Object.entries(t.palette).filter(ae(["dark"])).map(([r])=>({props:{colorSeverity:r,variant:"filled"},style:{fontWeight:t.typography.fontWeightMedium,...t.vars?{color:t.vars.palette.Alert[`${r}FilledColor`],backgroundColor:t.vars.palette.Alert[`${r}FilledBg`]}:{backgroundColor:t.palette.mode==="dark"?t.palette[r].dark:t.palette[r].main,color:t.palette.getContrastText(t.palette[r].main)}}}))]}})),gr=j("div",{name:"MuiAlert",slot:"Icon"})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),br=j("div",{name:"MuiAlert",slot:"Message"})({padding:"8px 0",minWidth:0,overflow:"auto"}),hr=j("div",{name:"MuiAlert",slot:"Action"})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),go={success:s.jsx(ir,{fontSize:"inherit"}),warning:s.jsx(cr,{fontSize:"inherit"}),error:s.jsx(dr,{fontSize:"inherit"}),info:s.jsx(pr,{fontSize:"inherit"})},ws=u.forwardRef(function(e,o){const r=yt({props:e,name:"MuiAlert"}),{action:n,children:a,className:l,closeText:d="Close",color:p,components:g={},componentsProps:f={},icon:b,iconMapping:h=go,onClose:y,role:I="alert",severity:P="success",slotProps:B={},slots:C={},variant:A="standard",...T}=r,z={...r,color:p,severity:P,variant:A,colorSeverity:p||P},Y=ur(z),_={slots:{closeButton:g.CloseButton,closeIcon:g.CloseIcon,...C},slotProps:{...f,...B}},[ht,Ct]=ct("root",{ref:o,shouldForwardComponentProp:!0,className:X(Y.root,l),elementType:fr,externalForwardedProps:{..._,...T},ownerState:z,additionalProps:{role:I,elevation:0}}),[et,q]=ct("icon",{className:Y.icon,elementType:gr,externalForwardedProps:_,ownerState:z}),[nt,L]=ct("message",{className:Y.message,elementType:br,externalForwardedProps:_,ownerState:z}),[k,U]=ct("action",{className:Y.action,elementType:hr,externalForwardedProps:_,ownerState:z}),[st,V]=ct("closeButton",{elementType:oe,externalForwardedProps:_,ownerState:z}),[wt,At]=ct("closeIcon",{elementType:Vo,externalForwardedProps:_,ownerState:z});return s.jsxs(ht,{...Ct,children:[b!==!1?s.jsx(et,{...q,children:b||h[P]||go[P]}):null,s.jsx(nt,{...L,children:a}),n!=null?s.jsx(k,{...U,children:n}):null,n==null&&y?s.jsx(k,{...U,children:s.jsx(st,{size:"small","aria-label":d,title:d,color:"inherit",onClick:y,...V,children:s.jsx(wt,{fontSize:"small",...At})})}):null]})});function xr(t){const e=u.useRef({});return u.useEffect(()=>{e.current=t}),e.current}function bo({array1:t,array2:e,parser:o=r=>r}){return t&&e&&t.length===e.length&&t.every((r,n)=>o(r)===o(e[n]))}function ho(t){return t.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function mr(t={}){const{ignoreAccents:e=!0,ignoreCase:o=!0,limit:r,matchFrom:n="any",stringify:a,trim:l=!1}=t;return(d,{inputValue:p,getOptionLabel:g})=>{let f=l?p.trim():p;o&&(f=f.toLowerCase()),e&&(f=ho(f));const b=f?d.filter(h=>{let y=(a||g)(h);return o&&(y=y.toLowerCase()),e&&(y=ho(y)),n==="start"?y.startsWith(f):y.includes(f)}):d;return typeof r=="number"?b.slice(0,r):b}}const yr=mr(),xo=5,vr=t=>{var e;return t.current!==null&&((e=t.current.parentElement)==null?void 0:e.contains(document.activeElement))},Sr=[];function mo(t,e,o,r){if(e||t==null||r)return"";const n=o(t);return typeof n=="string"?n:""}function Cr(t){const{unstable_isActiveElementInListbox:e=vr,unstable_classNamePrefix:o="Mui",autoComplete:r=!1,autoHighlight:n=!1,autoSelect:a=!1,blurOnSelect:l=!1,clearOnBlur:d=!t.freeSolo,clearOnEscape:p=!1,componentName:g="useAutocomplete",defaultValue:f=t.multiple?Sr:null,disableClearable:b=!1,disableCloseOnSelect:h=!1,disabled:y,disabledItemsFocusable:I=!1,disableListWrap:P=!1,filterOptions:B=yr,filterSelectedOptions:C=!1,freeSolo:A=!1,getOptionDisabled:T,getOptionKey:z,getOptionLabel:Y=c=>{var i;return(i=c.label)!=null?i:c},groupBy:_,handleHomeEndKeys:ht=!t.freeSolo,id:Ct,includeInputInList:et=!1,inputValue:q,isOptionEqualToValue:nt=(c,i)=>c===i,multiple:L=!1,onChange:k,onClose:U,onHighlightChange:st,onInputChange:V,onOpen:wt,open:At,openOnFocus:Mt=!1,options:St,readOnly:ot=!1,renderValue:dt,selectOnFocus:E=!t.freeSolo,value:N}=t,O=Go(Ct);let v=Y;v=c=>{const i=Y(c);return typeof i!="string"?String(i):i};const tt=u.useRef(!1),rt=u.useRef(!0),lt=u.useRef(null),$t=u.useRef(null),[ce,$e]=u.useState(null),[It,de]=u.useState(-1),Ie=n?0:-1,pt=u.useRef(Ie),jt=u.useRef(mo(f!=null?f:N,L,v)).current,[w,Bt]=qe({controlled:N,default:f,name:g}),[G,Lt]=qe({controlled:q,default:jt,name:g,state:"inputValue"}),[Gt,pe]=u.useState(!1),Yt=u.useCallback((c,i,m)=>{if(!(L?w.length<i.length:i!==null)&&!d)return;const M=mo(i,L,v,dt);G!==M&&(Lt(M),V&&V(c,M,m))},[v,G,L,V,Lt,d,w,dt]),[Nt,Zt]=qe({controlled:At,default:!1,name:g,state:"open"}),[je,Ft]=u.useState(!0),he=!L&&w!=null&&G===v(w),xt=Nt&&!ot,J=xt?B(St.filter(c=>!(C&&(L?w:[w]).some(i=>i!==null&&nt(c,i)))),{inputValue:he&&je?"":G,getOptionLabel:v}):[],Pt=xr({filteredOptions:J,value:w,inputValue:G});u.useEffect(()=>{const c=w!==Pt.value;Gt&&!c||A&&!c||Yt(null,w,"reset")},[w,Yt,Gt,Pt.value,A]);const xe=Nt&&J.length>0&&!ot,Tt=be(c=>{if(c===-1)lt.current.focus();else{const i=dt?"data-item-index":"data-tag-index";ce.querySelector(`[${i}="${c}"]`).focus()}});u.useEffect(()=>{L&&It>w.length-1&&(de(-1),Tt(-1))},[w,L,It,Tt]);function re(c,i){if(!$t.current||c<0||c>=J.length)return-1;let m=c;for(;;){const R=$t.current.querySelector(`[data-option-index="${m}"]`),M=I?!1:!R||R.disabled||R.getAttribute("aria-disabled")==="true";if(R&&R.hasAttribute("tabindex")&&!M)return m;if(i==="next"?m=(m+1)%J.length:m=(m-1+J.length)%J.length,m===c)return-1}}const Wt=be(({event:c,index:i,reason:m})=>{if(pt.current=i,i===-1?lt.current.removeAttribute("aria-activedescendant"):lt.current.setAttribute("aria-activedescendant",`${O}-option-${i}`),st&&["mouse","keyboard","touch"].includes(m)&&st(c,i===-1?null:J[i],m),!$t.current)return;const R=$t.current.querySelector(`[role="option"].${o}-focused`);R&&(R.classList.remove(`${o}-focused`),R.classList.remove(`${o}-focusVisible`));let M=$t.current;if($t.current.getAttribute("role")!=="listbox"&&(M=$t.current.parentElement.querySelector('[role="listbox"]')),!M)return;if(i===-1){M.scrollTop=0;return}const at=$t.current.querySelector(`[data-option-index="${i}"]`);if(at&&(at.classList.add(`${o}-focused`),m==="keyboard"&&at.classList.add(`${o}-focusVisible`),M.scrollHeight>M.clientHeight&&m!=="mouse"&&m!=="touch")){const it=at,Kt=M.clientHeight+M.scrollTop,De=it.offsetTop+it.offsetHeight;De>Kt?M.scrollTop=De-M.clientHeight:it.offsetTop-it.offsetHeight*(_?1.3:0)<M.scrollTop&&(M.scrollTop=it.offsetTop-it.offsetHeight*(_?1.3:0))}}),Ot=be(({event:c,diff:i,direction:m="next",reason:R})=>{if(!xt)return;const at=re((()=>{const it=J.length-1;if(i==="reset")return Ie;if(i==="start")return 0;if(i==="end")return it;const Kt=pt.current+i;return Kt<0?Kt===-1&&et?-1:P&&pt.current!==-1||Math.abs(i)>1?0:it:Kt>it?Kt===it+1&&et?-1:P||Math.abs(i)>1?it:0:Kt})(),m);if(Wt({index:at,reason:R,event:c}),r&&i!=="reset")if(at===-1)lt.current.value=G;else{const it=v(J[at]);lt.current.value=it,it.toLowerCase().indexOf(G.toLowerCase())===0&&G.length>0&&lt.current.setSelectionRange(G.length,it.length)}}),ue=!bo({array1:Pt.filteredOptions,array2:J,parser:v}),ne=()=>{const c=(i,m)=>{const R=i?v(i):"",M=m?v(m):"";return R===M};if(pt.current!==-1&&!bo({array1:Pt.filteredOptions,array2:J,parser:v})&&Pt.inputValue===G&&(L?w.length===Pt.value.length&&Pt.value.every((i,m)=>v(w[m])===v(i)):c(Pt.value,w))){const i=Pt.filteredOptions[pt.current];if(i)return J.findIndex(m=>v(m)===v(i))}return-1},fe=u.useCallback(()=>{if(!xt)return;const c=ne();if(c!==-1){pt.current=c;return}const i=L?w[0]:w;if(J.length===0||i==null){Ot({diff:"reset"});return}if($t.current){if(i!=null){const m=J[pt.current];if(L&&m&&w.findIndex(M=>nt(m,M))!==-1)return;const R=J.findIndex(M=>nt(M,i));R===-1?Ot({diff:"reset"}):Wt({index:R});return}if(pt.current>=J.length-1){Wt({index:J.length-1});return}Wt({index:pt.current})}},[J.length,L?!1:w,C,Ot,Wt,xt,G,L]),Xt=be(c=>{Xo($t,c),c&&fe()});u.useEffect(()=>{(ue||xt)&&fe()},[fe,ue,xt]);const zt=c=>{Nt||(Zt(!0),Ft(!0),wt&&wt(c))},Jt=(c,i)=>{Nt&&(Zt(!1),U&&U(c,i))},Ht=(c,i,m,R)=>{if(L){if(w.length===i.length&&w.every((M,at)=>M===i[at]))return}else if(w===i)return;k&&k(c,i,m,R),Bt(i)},Vt=u.useRef(!1),_t=(c,i,m="selectOption",R="options")=>{let M=m,at=i;if(L){at=Array.isArray(w)?w.slice():[];const it=at.findIndex(Kt=>nt(i,Kt));it===-1?at.push(i):R!=="freeSolo"&&(at.splice(it,1),M="removeOption")}Yt(c,at,M),Ht(c,at,M,{option:i}),!h&&(!c||!c.ctrlKey&&!c.metaKey)&&Jt(c,M),(l===!0||l==="touch"&&Vt.current||l==="mouse"&&!Vt.current)&&lt.current.blur()};function ke(c,i){if(c===-1)return-1;let m=c;for(;;){if(i==="next"&&m===w.length||i==="previous"&&m===-1)return-1;const R=dt?"data-item-index":"data-tag-index",M=ce.querySelector(`[${R}="${m}"]`);if(!M||!M.hasAttribute("tabindex")||M.disabled||M.getAttribute("aria-disabled")==="true")m+=i==="next"?1:-1;else return m}}const Qt=(c,i)=>{if(!L)return;G===""&&Jt(c,"toggleInput");let m=It;It===-1?G===""&&i==="previous"&&(m=w.length-1):(m+=i==="next"?1:-1,m<0&&(m=0),m===w.length&&(m=-1)),m=ke(m,i),de(m),Tt(m)},x=c=>{tt.current=!0,Lt(""),V&&V(c,"","clear"),Ht(c,L?[]:null,"clear")},S=c=>i=>{if(c.onKeyDown&&c.onKeyDown(i),!i.defaultMuiPrevented&&(It!==-1&&!["ArrowLeft","ArrowRight"].includes(i.key)&&(de(-1),Tt(-1)),i.which!==229))switch(i.key){case"Home":xt&&ht&&(i.preventDefault(),Ot({diff:"start",direction:"next",reason:"keyboard",event:i}));break;case"End":xt&&ht&&(i.preventDefault(),Ot({diff:"end",direction:"previous",reason:"keyboard",event:i}));break;case"PageUp":i.preventDefault(),Ot({diff:-xo,direction:"previous",reason:"keyboard",event:i}),zt(i);break;case"PageDown":i.preventDefault(),Ot({diff:xo,direction:"next",reason:"keyboard",event:i}),zt(i);break;case"ArrowDown":i.preventDefault(),Ot({diff:1,direction:"next",reason:"keyboard",event:i}),zt(i);break;case"ArrowUp":i.preventDefault(),Ot({diff:-1,direction:"previous",reason:"keyboard",event:i}),zt(i);break;case"ArrowLeft":!L&&dt?Tt(0):Qt(i,"previous");break;case"ArrowRight":!L&&dt?Tt(-1):Qt(i,"next");break;case"Enter":if(pt.current!==-1&&xt){const m=J[pt.current],R=T?T(m):!1;if(i.preventDefault(),R)return;_t(i,m,"selectOption"),r&&lt.current.setSelectionRange(lt.current.value.length,lt.current.value.length)}else A&&G!==""&&he===!1&&(L&&i.preventDefault(),_t(i,G,"createOption","freeSolo"));break;case"Escape":xt?(i.preventDefault(),i.stopPropagation(),Jt(i,"escape")):p&&(G!==""||L&&w.length>0||dt)&&(i.preventDefault(),i.stopPropagation(),x(i));break;case"Backspace":if(L&&!ot&&G===""&&w.length>0){const m=It===-1?w.length-1:It,R=w.slice();R.splice(m,1),Ht(i,R,"removeOption",{option:w[m]})}!L&&dt&&!ot&&(Bt(null),Tt(-1));break;case"Delete":if(L&&!ot&&G===""&&w.length>0&&It!==-1){const m=It,R=w.slice();R.splice(m,1),Ht(i,R,"removeOption",{option:w[m]})}!L&&dt&&!ot&&(Bt(null),Tt(-1));break}},F=c=>{pe(!0),Mt&&!tt.current&&zt(c)},W=c=>{if(e($t)){lt.current.focus();return}pe(!1),rt.current=!0,tt.current=!1,a&&pt.current!==-1&&xt?_t(c,J[pt.current],"blur"):a&&A&&G!==""?_t(c,G,"blur","freeSolo"):d&&Yt(c,w,"blur"),Jt(c,"blur")},Z=c=>{const i=c.target.value;G!==i&&(Lt(i),Ft(!1),V&&V(c,i,"input")),i===""?!b&&!L&&Ht(c,null,"clear"):zt(c)},Rt=c=>{const i=Number(c.currentTarget.getAttribute("data-option-index"));pt.current!==i&&Wt({event:c,index:i,reason:"mouse"})},Ut=c=>{Wt({event:c,index:Number(c.currentTarget.getAttribute("data-option-index")),reason:"touch"}),Vt.current=!0},te=c=>{const i=Number(c.currentTarget.getAttribute("data-option-index"));_t(c,J[i],"selectOption"),Vt.current=!1},me=c=>i=>{const m=w.slice();m.splice(c,1),Ht(i,m,"removeOption",{option:w[c]})},ee=c=>{Ht(c,null,"removeOption",{option:w})},gt=c=>{Nt?Jt(c,"toggleInput"):zt(c)},mt=c=>{c.currentTarget.contains(c.target)&&c.target.getAttribute("id")!==O&&c.preventDefault()},se=c=>{c.currentTarget.contains(c.target)&&(lt.current.focus(),E&&rt.current&&lt.current.selectionEnd-lt.current.selectionStart===0&&lt.current.select(),rt.current=!1)},Ke=c=>{!y&&(G===""||!Nt)&&gt(c)};let Pe=A&&G.length>0;Pe=Pe||(L?w.length>0:w!==null);let Be=J;return _&&(Be=J.reduce((c,i,m)=>{const R=_(i);return c.length>0&&c[c.length-1].group===R?c[c.length-1].options.push(i):c.push({key:m,index:m,group:R,options:[i]}),c},[])),y&&Gt&&W(),{getRootProps:(c={})=>({...c,onKeyDown:S(c),onMouseDown:mt,onClick:se}),getInputLabelProps:()=>({id:`${O}-label`,htmlFor:O}),getInputProps:()=>({id:O,value:G,onBlur:W,onFocus:F,onChange:Z,onMouseDown:Ke,"aria-activedescendant":xt?"":null,"aria-autocomplete":r?"both":"list","aria-controls":xe?`${O}-listbox`:void 0,"aria-expanded":xe,autoComplete:"off",ref:lt,autoCapitalize:"none",spellCheck:"false",role:"combobox",disabled:y}),getClearProps:()=>({tabIndex:-1,type:"button",onClick:x}),getItemProps:({index:c=0}={})=>({...L&&{key:c},...dt?{"data-item-index":c}:{"data-tag-index":c},tabIndex:-1,...!ot&&{onDelete:L?me(c):ee}}),getPopupIndicatorProps:()=>({tabIndex:-1,type:"button",onClick:gt}),getTagProps:({index:c})=>({key:c,"data-tag-index":c,tabIndex:-1,...!ot&&{onDelete:me(c)}}),getListboxProps:()=>({role:"listbox",id:`${O}-listbox`,"aria-labelledby":`${O}-label`,ref:Xt,onMouseDown:c=>{c.preventDefault()}}),getOptionProps:({index:c,option:i})=>{var M;const m=(L?w:[w]).some(at=>at!=null&&nt(i,at)),R=T?T(i):!1;return{key:(M=z==null?void 0:z(i))!=null?M:v(i),tabIndex:-1,role:"option",id:`${O}-option-${c}`,onMouseMove:Rt,onClick:te,onTouchStart:Ut,"data-option-index":c,"aria-disabled":R,"aria-selected":m}},id:O,inputValue:G,value:w,dirty:Pe,expanded:xt&&ce,popupOpen:xt,focused:Gt||It!==-1,anchorEl:ce,setAnchorEl:$e,focusedItem:It,focusedTag:It,groupedOptions:Be}}function wr(t){return ft("MuiListSubheader",t)}ut("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);const $r=t=>{const{classes:e,color:o,disableGutters:r,inset:n,disableSticky:a}=t,l={root:["root",o!=="default"&&`color${$(o)}`,!r&&"gutters",n&&"inset",!a&&"sticky"]};return vt(l,wr,e)},Ir=j("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:o}=t;return[e.root,o.color!=="default"&&e[`color${$(o.color)}`],!o.disableGutters&&e.gutters,o.inset&&e.inset,!o.disableSticky&&e.sticky]}})(Q(({theme:t})=>({boxSizing:"border-box",lineHeight:"48px",listStyle:"none",color:(t.vars||t).palette.text.secondary,fontFamily:t.typography.fontFamily,fontWeight:t.typography.fontWeightMedium,fontSize:t.typography.pxToRem(14),variants:[{props:{color:"primary"},style:{color:(t.vars||t).palette.primary.main}},{props:{color:"inherit"},style:{color:"inherit"}},{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>e.inset,style:{paddingLeft:72}},{props:({ownerState:e})=>!e.disableSticky,style:{position:"sticky",top:0,zIndex:1,backgroundColor:(t.vars||t).palette.background.paper}}]}))),Je=u.forwardRef(function(e,o){const r=yt({props:e,name:"MuiListSubheader"}),{className:n,color:a="default",component:l="li",disableGutters:d=!1,disableSticky:p=!1,inset:g=!1,...f}=r,b={...r,color:a,component:l,disableGutters:d,disableSticky:p,inset:g},h=$r(b);return s.jsx(Ir,{as:l,className:X(h.root,n),ref:o,ownerState:b,...f})});Je&&(Je.muiSkipListHighlight=!0);const kr=ie(s.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"}));function Pr(t){return ft("MuiChip",t)}const H=ut("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"]),Tr=t=>{const{classes:e,disabled:o,size:r,color:n,iconColor:a,onDelete:l,clickable:d,variant:p}=t,g={root:["root",p,o&&"disabled",`size${$(r)}`,`color${$(n)}`,d&&"clickable",d&&`clickableColor${$(n)}`,l&&"deletable",l&&`deletableColor${$(n)}`,`${p}${$(n)}`],label:["label",`label${$(r)}`],avatar:["avatar",`avatar${$(r)}`,`avatarColor${$(n)}`],icon:["icon",`icon${$(r)}`,`iconColor${$(a)}`],deleteIcon:["deleteIcon",`deleteIcon${$(r)}`,`deleteIconColor${$(n)}`,`deleteIcon${$(p)}Color${$(n)}`]};return vt(g,Pr,e)},Rr=j("div",{name:"MuiChip",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:o}=t,{color:r,iconColor:n,clickable:a,onDelete:l,size:d,variant:p}=o;return[{[`& .${H.avatar}`]:e.avatar},{[`& .${H.avatar}`]:e[`avatar${$(d)}`]},{[`& .${H.avatar}`]:e[`avatarColor${$(r)}`]},{[`& .${H.icon}`]:e.icon},{[`& .${H.icon}`]:e[`icon${$(d)}`]},{[`& .${H.icon}`]:e[`iconColor${$(n)}`]},{[`& .${H.deleteIcon}`]:e.deleteIcon},{[`& .${H.deleteIcon}`]:e[`deleteIcon${$(d)}`]},{[`& .${H.deleteIcon}`]:e[`deleteIconColor${$(r)}`]},{[`& .${H.deleteIcon}`]:e[`deleteIcon${$(p)}Color${$(r)}`]},e.root,e[`size${$(d)}`],e[`color${$(r)}`],a&&e.clickable,a&&r!=="default"&&e[`clickableColor${$(r)})`],l&&e.deletable,l&&r!=="default"&&e[`deletableColor${$(r)}`],e[p],e[`${p}${$(r)}`]]}})(Q(({theme:t})=>{const e=t.palette.mode==="light"?t.palette.grey[700]:t.palette.grey[300];return{maxWidth:"100%",fontFamily:t.typography.fontFamily,fontSize:t.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,lineHeight:1.5,color:(t.vars||t).palette.text.primary,backgroundColor:(t.vars||t).palette.action.selected,borderRadius:32/2,whiteSpace:"nowrap",transition:t.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${H.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${H.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:t.vars?t.vars.palette.Chip.defaultAvatarColor:e,fontSize:t.typography.pxToRem(12)},[`& .${H.avatarColorPrimary}`]:{color:(t.vars||t).palette.primary.contrastText,backgroundColor:(t.vars||t).palette.primary.dark},[`& .${H.avatarColorSecondary}`]:{color:(t.vars||t).palette.secondary.contrastText,backgroundColor:(t.vars||t).palette.secondary.dark},[`& .${H.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:t.typography.pxToRem(10)},[`& .${H.icon}`]:{marginLeft:5,marginRight:-6},[`& .${H.deleteIcon}`]:{WebkitTapHighlightColor:"transparent",color:t.alpha((t.vars||t).palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:t.alpha((t.vars||t).palette.text.primary,.4)}},variants:[{props:{size:"small"},style:{height:24,[`& .${H.icon}`]:{fontSize:18,marginLeft:4,marginRight:-4},[`& .${H.deleteIcon}`]:{fontSize:16,marginRight:4,marginLeft:-4}}},...Object.entries(t.palette).filter(ae(["contrastText"])).map(([o])=>({props:{color:o},style:{backgroundColor:(t.vars||t).palette[o].main,color:(t.vars||t).palette[o].contrastText,[`& .${H.deleteIcon}`]:{color:t.alpha((t.vars||t).palette[o].contrastText,.7),"&:hover, &:active":{color:(t.vars||t).palette[o].contrastText}}}})),{props:o=>o.iconColor===o.color,style:{[`& .${H.icon}`]:{color:t.vars?t.vars.palette.Chip.defaultIconColor:e}}},{props:o=>o.iconColor===o.color&&o.color!=="default",style:{[`& .${H.icon}`]:{color:"inherit"}}},{props:{onDelete:!0},style:{[`&.${H.focusVisible}`]:{backgroundColor:t.alpha((t.vars||t).palette.action.selected,`${(t.vars||t).palette.action.selectedOpacity} + ${(t.vars||t).palette.action.focusOpacity}`)}}},...Object.entries(t.palette).filter(ae(["dark"])).map(([o])=>({props:{color:o,onDelete:!0},style:{[`&.${H.focusVisible}`]:{background:(t.vars||t).palette[o].dark}}})),{props:{clickable:!0},style:{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:t.alpha((t.vars||t).palette.action.selected,`${(t.vars||t).palette.action.selectedOpacity} + ${(t.vars||t).palette.action.hoverOpacity}`)},[`&.${H.focusVisible}`]:{backgroundColor:t.alpha((t.vars||t).palette.action.selected,`${(t.vars||t).palette.action.selectedOpacity} + ${(t.vars||t).palette.action.focusOpacity}`)},"&:active":{boxShadow:(t.vars||t).shadows[1]}}},...Object.entries(t.palette).filter(ae(["dark"])).map(([o])=>({props:{color:o,clickable:!0},style:{[`&:hover, &.${H.focusVisible}`]:{backgroundColor:(t.vars||t).palette[o].dark}}})),{props:{variant:"outlined"},style:{backgroundColor:"transparent",border:t.vars?`1px solid ${t.vars.palette.Chip.defaultBorder}`:`1px solid ${t.palette.mode==="light"?t.palette.grey[400]:t.palette.grey[700]}`,[`&.${H.clickable}:hover`]:{backgroundColor:(t.vars||t).palette.action.hover},[`&.${H.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`& .${H.avatar}`]:{marginLeft:4},[`& .${H.avatarSmall}`]:{marginLeft:2},[`& .${H.icon}`]:{marginLeft:4},[`& .${H.iconSmall}`]:{marginLeft:2},[`& .${H.deleteIcon}`]:{marginRight:5},[`& .${H.deleteIconSmall}`]:{marginRight:3}}},...Object.entries(t.palette).filter(ae()).map(([o])=>({props:{variant:"outlined",color:o},style:{color:(t.vars||t).palette[o].main,border:`1px solid ${t.alpha((t.vars||t).palette[o].main,.7)}`,[`&.${H.clickable}:hover`]:{backgroundColor:t.alpha((t.vars||t).palette[o].main,(t.vars||t).palette.action.hoverOpacity)},[`&.${H.focusVisible}`]:{backgroundColor:t.alpha((t.vars||t).palette[o].main,(t.vars||t).palette.action.focusOpacity)},[`& .${H.deleteIcon}`]:{color:t.alpha((t.vars||t).palette[o].main,.7),"&:hover, &:active":{color:(t.vars||t).palette[o].main}}}}))]}})),Ar=j("span",{name:"MuiChip",slot:"Label",overridesResolver:(t,e)=>{const{ownerState:o}=t,{size:r}=o;return[e.label,e[`label${$(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 yo(t){return t.key==="Backspace"||t.key==="Delete"}const Mr=u.forwardRef(function(e,o){const r=yt({props:e,name:"MuiChip"}),{avatar:n,className:a,clickable:l,color:d="default",component:p,deleteIcon:g,disabled:f=!1,icon:b,label:h,onClick:y,onDelete:I,onKeyDown:P,onKeyUp:B,size:C="medium",variant:A="filled",tabIndex:T,skipFocusWhenDisabled:z=!1,slots:Y={},slotProps:_={},...ht}=r,Ct=u.useRef(null),et=Bo(Ct,o),q=v=>{v.stopPropagation(),I&&I(v)},nt=v=>{v.currentTarget===v.target&&yo(v)&&v.preventDefault(),P&&P(v)},L=v=>{v.currentTarget===v.target&&I&&yo(v)&&I(v),B&&B(v)},k=l!==!1&&y?!0:l,U=k||I?Oe:p||"div",st={...r,component:U,disabled:f,size:C,color:d,iconColor:u.isValidElement(b)&&b.props.color||d,onDelete:!!I,clickable:k,variant:A},V=Tr(st),wt=U===Oe?{component:p||"div",focusVisibleClassName:V.focusVisible,...I&&{disableRipple:!0}}:{};let At=null;I&&(At=g&&u.isValidElement(g)?u.cloneElement(g,{className:X(g.props.className,V.deleteIcon),onClick:q}):s.jsx(kr,{className:V.deleteIcon,onClick:q}));let Mt=null;n&&u.isValidElement(n)&&(Mt=u.cloneElement(n,{className:X(V.avatar,n.props.className)}));let St=null;b&&u.isValidElement(b)&&(St=u.cloneElement(b,{className:X(V.icon,b.props.className)}));const ot={slots:Y,slotProps:_},[dt,E]=ct("root",{elementType:Rr,externalForwardedProps:{...ot,...ht},ownerState:st,shouldForwardComponentProp:!0,ref:et,className:X(V.root,a),additionalProps:{disabled:k&&f?!0:void 0,tabIndex:z&&f?-1:T,...wt},getSlotProps:v=>({...v,onClick:tt=>{var rt;(rt=v.onClick)==null||rt.call(v,tt),y==null||y(tt)},onKeyDown:tt=>{var rt;(rt=v.onKeyDown)==null||rt.call(v,tt),nt(tt)},onKeyUp:tt=>{var rt;(rt=v.onKeyUp)==null||rt.call(v,tt),L(tt)}})}),[N,O]=ct("label",{elementType:Ar,externalForwardedProps:ot,ownerState:st,className:V.label});return s.jsxs(dt,{as:U,...E,children:[Mt||St,s.jsx(N,{...O,children:h}),At]})});function Lr(t){return ft("MuiAutocomplete",t)}const D=ut("MuiAutocomplete",["root","expanded","fullWidth","focused","focusVisible","tag","tagSizeSmall","tagSizeMedium","hasPopupIcon","hasClearIcon","inputRoot","input","inputFocused","endAdornment","clearIndicator","popupIndicator","popupIndicatorOpen","popper","popperDisablePortal","paper","listbox","loading","noOptions","option","groupLabel","groupUl"]);var vo,So;const Or=t=>{const{classes:e,disablePortal:o,expanded:r,focused:n,fullWidth:a,hasClearIcon:l,hasPopupIcon:d,inputFocused:p,popupOpen:g,size:f}=t,b={root:["root",r&&"expanded",n&&"focused",a&&"fullWidth",l&&"hasClearIcon",d&&"hasPopupIcon"],inputRoot:["inputRoot"],input:["input",p&&"inputFocused"],tag:["tag",`tagSize${$(f)}`],endAdornment:["endAdornment"],clearIndicator:["clearIndicator"],popupIndicator:["popupIndicator",g&&"popupIndicatorOpen"],popper:["popper",o&&"popperDisablePortal"],paper:["paper"],listbox:["listbox"],loading:["loading"],noOptions:["noOptions"],option:["option"],groupLabel:["groupLabel"],groupUl:["groupUl"]};return vt(b,Lr,e)},zr=j("div",{name:"MuiAutocomplete",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:o}=t,{fullWidth:r,hasClearIcon:n,hasPopupIcon:a,inputFocused:l,size:d}=o;return[{[`& .${D.tag}`]:e.tag},{[`& .${D.tag}`]:e[`tagSize${$(d)}`]},{[`& .${D.inputRoot}`]:e.inputRoot},{[`& .${D.input}`]:e.input},{[`& .${D.input}`]:l&&e.inputFocused},e.root,r&&e.fullWidth,a&&e.hasPopupIcon,n&&e.hasClearIcon]}})({[`&.${D.focused} .${D.clearIndicator}`]:{visibility:"visible"},"@media (pointer: fine)":{[`&:hover .${D.clearIndicator}`]:{visibility:"visible"}},[`& .${D.tag}`]:{margin:3,maxWidth:"calc(100% - 6px)"},[`& .${D.inputRoot}`]:{[`.${D.hasPopupIcon}&, .${D.hasClearIcon}&`]:{paddingRight:30},[`.${D.hasPopupIcon}.${D.hasClearIcon}&`]:{paddingRight:56},[`& .${D.input}`]:{width:0,minWidth:30}},[`& .${Ge.root}`]:{paddingBottom:1,"& .MuiInput-input":{padding:"4px 4px 4px 0px"}},[`& .${Ge.root}.${ge.sizeSmall}`]:{[`& .${Ge.input}`]:{padding:"2px 4px 3px 0"}},[`& .${so.root}`]:{padding:9,[`.${D.hasPopupIcon}&, .${D.hasClearIcon}&`]:{paddingRight:39},[`.${D.hasPopupIcon}.${D.hasClearIcon}&`]:{paddingRight:65},[`& .${D.input}`]:{padding:"7.5px 4px 7.5px 5px"},[`& .${D.endAdornment}`]:{right:9}},[`& .${so.root}.${ge.sizeSmall}`]:{paddingTop:6,paddingBottom:6,paddingLeft:6,[`& .${D.input}`]:{padding:"2.5px 4px 2.5px 8px"}},[`& .${ye.root}`]:{paddingTop:19,paddingLeft:8,[`.${D.hasPopupIcon}&, .${D.hasClearIcon}&`]:{paddingRight:39},[`.${D.hasPopupIcon}.${D.hasClearIcon}&`]:{paddingRight:65},[`& .${ye.input}`]:{padding:"7px 4px"},[`& .${D.endAdornment}`]:{right:9}},[`& .${ye.root}.${ge.sizeSmall}`]:{paddingBottom:1,[`& .${ye.input}`]:{padding:"2.5px 4px"}},[`& .${ge.hiddenLabel}`]:{paddingTop:8},[`& .${ye.root}.${ge.hiddenLabel}`]:{paddingTop:0,paddingBottom:0,[`& .${D.input}`]:{paddingTop:16,paddingBottom:17}},[`& .${ye.root}.${ge.hiddenLabel}.${ge.sizeSmall}`]:{[`& .${D.input}`]:{paddingTop:8,paddingBottom:9}},[`& .${D.input}`]:{flexGrow:1,textOverflow:"ellipsis",opacity:0},variants:[{props:{fullWidth:!0},style:{width:"100%"}},{props:{size:"small"},style:{[`& .${D.tag}`]:{margin:2,maxWidth:"calc(100% - 4px)"}}},{props:{inputFocused:!0},style:{[`& .${D.input}`]:{opacity:1}}},{props:{multiple:!0},style:{[`& .${D.inputRoot}`]:{flexWrap:"wrap"}}}]}),jr=j("div",{name:"MuiAutocomplete",slot:"EndAdornment"})({position:"absolute",right:0,top:"50%",transform:"translate(0, -50%)"}),Br=j(oe,{name:"MuiAutocomplete",slot:"ClearIndicator"})({marginRight:-2,padding:4,visibility:"hidden"}),Dr=j(oe,{name:"MuiAutocomplete",slot:"PopupIndicator",overridesResolver:(t,e)=>{const{ownerState:o}=t;return[e.popupIndicator,o.popupOpen&&e.popupIndicatorOpen]}})({padding:2,marginRight:-2,variants:[{props:{popupOpen:!0},style:{transform:"rotate(180deg)"}}]}),Er=j(Do,{name:"MuiAutocomplete",slot:"Popper",overridesResolver:(t,e)=>{const{ownerState:o}=t;return[{[`& .${D.option}`]:e.option},e.popper,o.disablePortal&&e.popperDisablePortal]}})(Q(({theme:t})=>({zIndex:(t.vars||t).zIndex.modal,variants:[{props:{disablePortal:!0},style:{position:"absolute"}}]}))),Nr=j(ro,{name:"MuiAutocomplete",slot:"Paper"})(Q(({theme:t})=>({...t.typography.body1,overflow:"auto"}))),Fr=j("div",{name:"MuiAutocomplete",slot:"Loading"})(Q(({theme:t})=>({color:(t.vars||t).palette.text.secondary,padding:"14px 16px"}))),Wr=j("div",{name:"MuiAutocomplete",slot:"NoOptions"})(Q(({theme:t})=>({color:(t.vars||t).palette.text.secondary,padding:"14px 16px"}))),Hr=j("ul",{name:"MuiAutocomplete",slot:"Listbox"})(Q(({theme:t})=>({listStyle:"none",margin:0,padding:"8px 0",maxHeight:"40vh",overflow:"auto",position:"relative",[`& .${D.option}`]:{minHeight:48,display:"flex",overflow:"hidden",justifyContent:"flex-start",alignItems:"center",cursor:"pointer",paddingTop:6,boxSizing:"border-box",outline:"0",WebkitTapHighlightColor:"transparent",paddingBottom:6,paddingLeft:16,paddingRight:16,[t.breakpoints.up("sm")]:{minHeight:"auto"},[`&.${D.focused}`]:{backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},'&[aria-disabled="true"]':{opacity:(t.vars||t).palette.action.disabledOpacity,pointerEvents:"none"},[`&.${D.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},'&[aria-selected="true"]':{backgroundColor:t.alpha((t.vars||t).palette.primary.main,(t.vars||t).palette.action.selectedOpacity),[`&.${D.focused}`]:{backgroundColor:t.alpha((t.vars||t).palette.primary.main,`${(t.vars||t).palette.action.selectedOpacity} + ${(t.vars||t).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:(t.vars||t).palette.action.selected}},[`&.${D.focusVisible}`]:{backgroundColor:t.alpha((t.vars||t).palette.primary.main,`${(t.vars||t).palette.action.selectedOpacity} + ${(t.vars||t).palette.action.focusOpacity}`)}}}}))),Vr=j(Je,{name:"MuiAutocomplete",slot:"GroupLabel"})(Q(({theme:t})=>({backgroundColor:(t.vars||t).palette.background.paper,top:-8}))),Ur=j("ul",{name:"MuiAutocomplete",slot:"GroupUl"})({padding:0,[`& .${D.option}`]:{paddingLeft:24}}),$s=u.forwardRef(function(e,o){const r=yt({props:e,name:"MuiAutocomplete"}),{autoComplete:n=!1,autoHighlight:a=!1,autoSelect:l=!1,blurOnSelect:d=!1,ChipProps:p,className:g,clearIcon:f=vo||(vo=s.jsx(Vo,{fontSize:"small"})),clearOnBlur:b=!r.freeSolo,clearOnEscape:h=!1,clearText:y="Clear",closeText:I="Close",componentsProps:P,defaultValue:B=r.multiple?[]:null,disableClearable:C=!1,disableCloseOnSelect:A=!1,disabled:T=!1,disabledItemsFocusable:z=!1,disableListWrap:Y=!1,disablePortal:_=!1,filterOptions:ht,filterSelectedOptions:Ct=!1,forcePopupIcon:et="auto",freeSolo:q=!1,fullWidth:nt=!1,getLimitTagsText:L=K=>`+${K}`,getOptionDisabled:k,getOptionKey:U,getOptionLabel:st,isOptionEqualToValue:V,groupBy:wt,handleHomeEndKeys:At=!r.freeSolo,id:Mt,includeInputInList:St=!1,inputValue:ot,limitTags:dt=-1,ListboxComponent:E,ListboxProps:N,loading:O=!1,loadingText:v="Loading…",multiple:tt=!1,noOptionsText:rt="No options",onChange:lt,onClose:$t,onHighlightChange:ce,onInputChange:$e,onOpen:It,open:de,openOnFocus:Ie=!1,openText:pt="Open",options:jt,PaperComponent:w,PopperComponent:Bt,popupIcon:G=So||(So=s.jsx(_o,{})),readOnly:Lt=!1,renderGroup:Gt,renderInput:pe,renderOption:Yt,renderTags:Nt,renderValue:Zt,selectOnFocus:je=!r.freeSolo,size:Ft="medium",slots:he={},slotProps:xt={},value:J,...Pt}=r,{getRootProps:xe,getInputProps:Tt,getInputLabelProps:re,getPopupIndicatorProps:Wt,getClearProps:Ot,getItemProps:ue,getListboxProps:ne,getOptionProps:fe,value:Xt,dirty:zt,expanded:Jt,id:Ht,popupOpen:Vt,focused:_t,focusedItem:ke,anchorEl:Qt,setAnchorEl:x,inputValue:S,groupedOptions:F}=Cr({...r,componentName:"Autocomplete"}),W=!C&&!T&&zt&&!Lt,Z=(!q||et===!0)&&et!==!1,{onMouseDown:Rt}=Tt(),{ref:Ut,...te}=ne(),ee=st||(K=>{var qt;return(qt=K.label)!=null?qt:K}),gt={...r,disablePortal:_,expanded:Jt,focused:_t,fullWidth:nt,getOptionLabel:ee,hasClearIcon:W,hasPopupIcon:Z,inputFocused:ke===-1,popupOpen:Vt,size:Ft},mt=Or(gt),se={slots:{paper:w,popper:Bt,...he},slotProps:{chip:p,listbox:N,...P,...xt}},[Ke,Pe]=ct("listbox",{elementType:Hr,externalForwardedProps:se,ownerState:gt,className:mt.listbox,additionalProps:te,ref:Ut}),[Be,c]=ct("paper",{elementType:ro,externalForwardedProps:se,ownerState:gt,className:mt.paper}),[i,m]=ct("popper",{elementType:Do,externalForwardedProps:se,ownerState:gt,className:mt.popper,additionalProps:{disablePortal:_,style:{width:Qt?Qt.clientWidth:null},role:"presentation",anchorEl:Qt,open:Vt}});let R;const M=K=>({className:mt.tag,disabled:T,...ue(K)});if(tt?Xt.length>0&&(Nt?R=Nt(Xt,M,gt):Zt?R=Zt(Xt,M,gt):R=Xt.map((K,qt)=>{const{key:le,...Te}=M({index:qt});return s.jsx(Mr,{label:ee(K),size:Ft,...Te,...se.slotProps.chip},le)})):Zt&&Xt!=null&&(R=Zt(Xt,M,gt)),dt>-1&&Array.isArray(R)){const K=R.length-dt;!_t&&K>0&&(R=R.splice(0,dt),R.push(s.jsx("span",{className:mt.tag,children:L(K)},R.length)))}const it=Gt||(K=>s.jsxs("li",{children:[s.jsx(Vr,{className:mt.groupLabel,ownerState:gt,component:"div",children:K.group}),s.jsx(Ur,{className:mt.groupUl,ownerState:gt,children:K.children})]},K.key)),De=Yt||((K,qt)=>{const{key:le,...Te}=K;return s.jsx("li",{...Te,children:ee(qt)},le)}),no=(K,qt)=>{const le=fe({option:K,index:qt});return De({...le,className:mt.option},K,{selected:le["aria-selected"],index:qt,inputValue:S},gt)},Ee=se.slotProps.clearIndicator,Ne=se.slotProps.popupIndicator;return s.jsxs(u.Fragment,{children:[s.jsx(zr,{ref:o,className:X(mt.root,g),ownerState:gt,...xe(Pt),children:pe({id:Ht,disabled:T,fullWidth:!0,size:Ft==="small"?"small":void 0,InputLabelProps:re(),InputProps:{ref:x,className:mt.inputRoot,startAdornment:R,onMouseDown:K=>{K.target===K.currentTarget&&Rt(K)},...(W||Z)&&{endAdornment:s.jsxs(jr,{className:mt.endAdornment,ownerState:gt,children:[W?s.jsx(Br,{...Ot(),"aria-label":y,title:y,ownerState:gt,...Ee,className:X(mt.clearIndicator,Ee==null?void 0:Ee.className),children:f}):null,Z?s.jsx(Dr,{...Wt(),disabled:T,"aria-label":Vt?I:pt,title:Vt?I:pt,ownerState:gt,...Ne,className:X(mt.popupIndicator,Ne==null?void 0:Ne.className),children:G}):null]})}},inputProps:{className:mt.input,disabled:T,readOnly:Lt,...Tt()}})}),Qt?s.jsx(Er,{as:i,...m,children:s.jsxs(Nr,{as:Be,...c,children:[O&&F.length===0?s.jsx(Fr,{className:mt.loading,ownerState:gt,children:v}):null,F.length===0&&!q&&!O?s.jsx(Wr,{className:mt.noOptions,ownerState:gt,role:"presentation",onMouseDown:K=>{K.preventDefault()},children:rt}):null,F.length>0?s.jsx(Ke,{as:E,...Pe,children:F.map((K,qt)=>wt?it({key:K.key,group:K.group,children:K.options.map((le,Te)=>no(le,K.index+Te))}):no(K,qt))}):null]})}):null]})});function Kr(t){return ft("MuiDivider",t)}const Co=ut("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),qr=t=>{const{absolute:e,children:o,classes:r,flexItem:n,light:a,orientation:l,textAlign:d,variant:p}=t;return vt({root:["root",e&&"absolute",p,a&&"light",l==="vertical"&&"vertical",n&&"flexItem",o&&"withChildren",o&&l==="vertical"&&"withChildrenVertical",d==="right"&&l!=="vertical"&&"textAlignRight",d==="left"&&l!=="vertical"&&"textAlignLeft"],wrapper:["wrapper",l==="vertical"&&"wrapperVertical"]},Kr,r)},Gr=j("div",{name:"MuiDivider",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:o}=t;return[e.root,o.absolute&&e.absolute,e[o.variant],o.light&&e.light,o.orientation==="vertical"&&e.vertical,o.flexItem&&e.flexItem,o.children&&e.withChildren,o.children&&o.orientation==="vertical"&&e.withChildrenVertical,o.textAlign==="right"&&o.orientation!=="vertical"&&e.textAlignRight,o.textAlign==="left"&&o.orientation!=="vertical"&&e.textAlignLeft]}})(Q(({theme:t})=>({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(t.vars||t).palette.divider,borderBottomWidth:"thin",variants:[{props:{absolute:!0},style:{position:"absolute",bottom:0,left:0,width:"100%"}},{props:{light:!0},style:{borderColor:t.alpha((t.vars||t).palette.divider,.08)}},{props:{variant:"inset"},style:{marginLeft:72}},{props:{variant:"middle",orientation:"horizontal"},style:{marginLeft:t.spacing(2),marginRight:t.spacing(2)}},{props:{variant:"middle",orientation:"vertical"},style:{marginTop:t.spacing(1),marginBottom:t.spacing(1)}},{props:{orientation:"vertical"},style:{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"}},{props:{flexItem:!0},style:{alignSelf:"stretch",height:"auto"}},{props:({ownerState:e})=>!!e.children,style:{display:"flex",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}}},{props:({ownerState:e})=>e.children&&e.orientation!=="vertical",style:{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(t.vars||t).palette.divider}`,borderTopStyle:"inherit"}}},{props:({ownerState:e})=>e.orientation==="vertical"&&e.children,style:{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(t.vars||t).palette.divider}`,borderLeftStyle:"inherit"}}},{props:({ownerState:e})=>e.textAlign==="right"&&e.orientation!=="vertical",style:{"&::before":{width:"90%"},"&::after":{width:"10%"}}},{props:({ownerState:e})=>e.textAlign==="left"&&e.orientation!=="vertical",style:{"&::before":{width:"10%"},"&::after":{width:"90%"}}}]}))),Xr=j("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(t,e)=>{const{ownerState:o}=t;return[e.wrapper,o.orientation==="vertical"&&e.wrapperVertical]}})(Q(({theme:t})=>({display:"inline-block",paddingLeft:`calc(${t.spacing(1)} * 1.2)`,paddingRight:`calc(${t.spacing(1)} * 1.2)`,whiteSpace:"nowrap",variants:[{props:{orientation:"vertical"},style:{paddingTop:`calc(${t.spacing(1)} * 1.2)`,paddingBottom:`calc(${t.spacing(1)} * 1.2)`}}]}))),Qe=u.forwardRef(function(e,o){const r=yt({props:e,name:"MuiDivider"}),{absolute:n=!1,children:a,className:l,orientation:d="horizontal",component:p=a||d==="vertical"?"div":"hr",flexItem:g=!1,light:f=!1,role:b=p!=="hr"?"separator":void 0,textAlign:h="center",variant:y="fullWidth",...I}=r,P={...r,absolute:n,component:p,flexItem:g,light:f,orientation:d,role:b,textAlign:h,variant:y},B=qr(P);return s.jsx(Gr,{as:p,className:X(B.root,l),role:b,ref:o,ownerState:P,"aria-orientation":b==="separator"&&(p!=="hr"||d==="vertical")?d:void 0,...I,children:a?s.jsx(Xr,{className:B.wrapper,ownerState:P,children:a}):null})});Qe&&(Qe.muiSkipListHighlight=!0);function _r(t){return ft("MuiFormControlLabel",t)}const Ae=ut("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]),Yr=t=>{const{classes:e,disabled:o,labelPlacement:r,error:n,required:a}=t,l={root:["root",o&&"disabled",`labelPlacement${$(r)}`,n&&"error",a&&"required"],label:["label",o&&"disabled"],asterisk:["asterisk",n&&"error"]};return vt(l,_r,e)},Zr=j("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:o}=t;return[{[`& .${Ae.label}`]:e.label},e.root,e[`labelPlacement${$(o.labelPlacement)}`]]}})(Q(({theme:t})=>({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${Ae.disabled}`]:{cursor:"default"},[`& .${Ae.label}`]:{[`&.${Ae.disabled}`]:{color:(t.vars||t).palette.text.disabled}},variants:[{props:{labelPlacement:"start"},style:{flexDirection:"row-reverse",marginRight:-11}},{props:{labelPlacement:"top"},style:{flexDirection:"column-reverse"}},{props:{labelPlacement:"bottom"},style:{flexDirection:"column"}},{props:({labelPlacement:e})=>e==="start"||e==="top"||e==="bottom",style:{marginLeft:16}}]}))),Jr=j("span",{name:"MuiFormControlLabel",slot:"Asterisk"})(Q(({theme:t})=>({[`&.${Ae.error}`]:{color:(t.vars||t).palette.error.main}}))),Is=u.forwardRef(function(e,o){var st;const r=yt({props:e,name:"MuiFormControlLabel"}),{checked:n,className:a,componentsProps:l={},control:d,disabled:p,disableTypography:g,inputRef:f,label:b,labelPlacement:h="end",name:y,onChange:I,required:P,slots:B={},slotProps:C={},value:A,...T}=r,z=Eo(),Y=(st=p!=null?p:d.props.disabled)!=null?st:z==null?void 0:z.disabled,_=P!=null?P:d.props.required,ht={disabled:Y,required:_};["checked","name","onChange","value","inputRef"].forEach(V=>{typeof d.props[V]=="undefined"&&typeof r[V]!="undefined"&&(ht[V]=r[V])});const Ct=Yo({props:r,muiFormControl:z,states:["error"]}),et={...r,disabled:Y,labelPlacement:h,required:_,error:Ct.error},q=Yr(et),nt={slots:B,slotProps:{...l,...C}},[L,k]=ct("typography",{elementType:Et,externalForwardedProps:nt,ownerState:et});let U=b;return U!=null&&U.type!==Et&&!g&&(U=s.jsx(L,{component:"span",...k,className:X(q.label,k==null?void 0:k.className),children:U})),s.jsxs(Zr,{className:X(q.root,a),ownerState:et,ref:o,...T,children:[u.cloneElement(d,ht),_?s.jsxs("div",{children:[U,s.jsxs(Jr,{ownerState:et,"aria-hidden":!0,className:q.asterisk,children:[" ","*"]})]}):U]})});function Qr(t){return ft("MuiInputAdornment",t)}const wo=ut("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var $o;const tn=(t,e)=>{const{ownerState:o}=t;return[e.root,e[`position${$(o.position)}`],o.disablePointerEvents===!0&&e.disablePointerEvents,e[o.variant]]},en=t=>{const{classes:e,disablePointerEvents:o,hiddenLabel:r,position:n,size:a,variant:l}=t,d={root:["root",o&&"disablePointerEvents",n&&`position${$(n)}`,l,r&&"hiddenLabel",a&&`size${$(a)}`]};return vt(d,Qr,e)},on=j("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:tn})(Q(({theme:t})=>({display:"flex",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(t.vars||t).palette.action.active,variants:[{props:{variant:"filled"},style:{[`&.${wo.positionStart}&:not(.${wo.hiddenLabel})`]:{marginTop:16}}},{props:{position:"start"},style:{marginRight:8}},{props:{position:"end"},style:{marginLeft:8}},{props:{disablePointerEvents:!0},style:{pointerEvents:"none"}}]}))),ks=u.forwardRef(function(e,o){const r=yt({props:e,name:"MuiInputAdornment"}),{children:n,className:a,component:l="div",disablePointerEvents:d=!1,disableTypography:p=!1,position:g,variant:f,...b}=r,h=Eo()||{};let y=f;f&&h.variant,h&&!y&&(y=h.variant);const I={...r,hiddenLabel:h.hiddenLabel,size:h.size,disablePointerEvents:d,position:g,variant:y},P=en(I);return s.jsx(Zo.Provider,{value:null,children:s.jsx(on,{as:l,ownerState:I,className:X(P.root,a),ref:o,...b,children:typeof n=="string"&&!p?s.jsx(Et,{color:"textSecondary",children:n}):s.jsxs(u.Fragment,{children:[g==="start"?$o||($o=s.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"})):null,n]})})})});function Ps(t){return ft("MuiListItemIcon",t)}const Io=ut("MuiListItemIcon",["root","alignItemsFlexStart"]);function Ts(t){return ft("MuiListItemText",t)}const ko=ut("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]);function rn(t){return ft("MuiMenuItem",t)}const Re=ut("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),nn=(t,e)=>{const{ownerState:o}=t;return[e.root,o.dense&&e.dense,o.divider&&e.divider,!o.disableGutters&&e.gutters]},sn=t=>{const{disabled:e,dense:o,divider:r,disableGutters:n,selected:a,classes:l}=t,p=vt({root:["root",o&&"dense",e&&"disabled",!n&&"gutters",r&&"divider",a&&"selected"]},rn,l);return{...l,...p}},ln=j(Oe,{shouldForwardProp:t=>Jo(t)||t==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:nn})(Q(({theme:t})=>({...t.typography.body1,display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap","&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Re.selected}`]:{backgroundColor:t.alpha((t.vars||t).palette.primary.main,(t.vars||t).palette.action.selectedOpacity),[`&.${Re.focusVisible}`]:{backgroundColor:t.alpha((t.vars||t).palette.primary.main,`${(t.vars||t).palette.action.selectedOpacity} + ${(t.vars||t).palette.action.focusOpacity}`)}},[`&.${Re.selected}:hover`]:{backgroundColor:t.alpha((t.vars||t).palette.primary.main,`${(t.vars||t).palette.action.selectedOpacity} + ${(t.vars||t).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:t.alpha((t.vars||t).palette.primary.main,(t.vars||t).palette.action.selectedOpacity)}},[`&.${Re.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${Re.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity},[`& + .${Co.root}`]:{marginTop:t.spacing(1),marginBottom:t.spacing(1)},[`& + .${Co.inset}`]:{marginLeft:52},[`& .${ko.root}`]:{marginTop:0,marginBottom:0},[`& .${ko.inset}`]:{paddingLeft:36},[`& .${Io.root}`]:{minWidth:36},variants:[{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:e})=>!e.dense,style:{[t.breakpoints.up("sm")]:{minHeight:"auto"}}},{props:({ownerState:e})=>e.dense,style:{minHeight:32,paddingTop:4,paddingBottom:4,...t.typography.body2,[`& .${Io.root} svg`]:{fontSize:"1.25rem"}}}]}))),Rs=u.forwardRef(function(e,o){const r=yt({props:e,name:"MuiMenuItem"}),{autoFocus:n=!1,component:a="li",dense:l=!1,divider:d=!1,disableGutters:p=!1,focusVisibleClassName:g,role:f="menuitem",tabIndex:b,className:h,...y}=r,I=u.useContext(lo),P=u.useMemo(()=>({dense:l||I.dense||!1,disableGutters:p}),[I.dense,l,p]),B=u.useRef(null);No(()=>{n&&B.current&&B.current.focus()},[n]);const C={...r,dense:P.dense,divider:d,disableGutters:p},A=sn(r),T=Bo(B,o);let z;return r.disabled||(z=b!==void 0?b:-1),s.jsx(lo.Provider,{value:P,children:s.jsx(ln,{ref:T,role:f,tabIndex:z,component:a,focusVisibleClassName:X(A.focusVisible,g),className:X(A.root,h),...y,ownerState:C,classes:A})})});function an(t){return ft("MuiSwitch",t)}const kt=ut("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),cn=t=>{const{classes:e,edge:o,size:r,color:n,checked:a,disabled:l}=t,d={root:["root",o&&`edge${$(o)}`,`size${$(r)}`],switchBase:["switchBase",`color${$(n)}`,a&&"checked",l&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},p=vt(d,an,e);return{...e,...p}},dn=j("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:o}=t;return[e.root,o.edge&&e[`edge${$(o.edge)}`],e[`size${$(o.size)}`]]}})({display:"inline-flex",width:58,height:38,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"},variants:[{props:{edge:"start"},style:{marginLeft:-8}},{props:{edge:"end"},style:{marginRight:-8}},{props:{size:"small"},style:{width:40,height:24,padding:7,[`& .${kt.thumb}`]:{width:16,height:16},[`& .${kt.switchBase}`]:{padding:4,[`&.${kt.checked}`]:{transform:"translateX(16px)"}}}}]}),pn=j(Qo,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(t,e)=>{const{ownerState:o}=t;return[e.switchBase,{[`& .${kt.input}`]:e.input},o.color!=="default"&&e[`color${$(o.color)}`]]}})(Q(({theme:t})=>({position:"absolute",top:0,left:0,zIndex:1,color:t.vars?t.vars.palette.Switch.defaultColor:`${t.palette.mode==="light"?t.palette.common.white:t.palette.grey[300]}`,transition:t.transitions.create(["left","transform"],{duration:t.transitions.duration.shortest}),[`&.${kt.checked}`]:{transform:"translateX(20px)"},[`&.${kt.disabled}`]:{color:t.vars?t.vars.palette.Switch.defaultDisabledColor:`${t.palette.mode==="light"?t.palette.grey[100]:t.palette.grey[600]}`},[`&.${kt.checked} + .${kt.track}`]:{opacity:.5},[`&.${kt.disabled} + .${kt.track}`]:{opacity:t.vars?t.vars.opacity.switchTrackDisabled:`${t.palette.mode==="light"?.12:.2}`},[`& .${kt.input}`]:{left:"-100%",width:"300%"}})),Q(({theme:t})=>({"&:hover":{backgroundColor:t.alpha((t.vars||t).palette.action.active,(t.vars||t).palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[...Object.entries(t.palette).filter(ae(["light"])).map(([e])=>({props:{color:e},style:{[`&.${kt.checked}`]:{color:(t.vars||t).palette[e].main,"&:hover":{backgroundColor:t.alpha((t.vars||t).palette[e].main,(t.vars||t).palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${kt.disabled}`]:{color:t.vars?t.vars.palette.Switch[`${e}DisabledColor`]:`${t.palette.mode==="light"?t.lighten(t.palette[e].main,.62):t.darken(t.palette[e].main,.55)}`}},[`&.${kt.checked} + .${kt.track}`]:{backgroundColor:(t.vars||t).palette[e].main}}}))]}))),un=j("span",{name:"MuiSwitch",slot:"Track"})(Q(({theme:t})=>({height:"100%",width:"100%",borderRadius:14/2,zIndex:-1,transition:t.transitions.create(["opacity","background-color"],{duration:t.transitions.duration.shortest}),backgroundColor:t.vars?t.vars.palette.common.onBackground:`${t.palette.mode==="light"?t.palette.common.black:t.palette.common.white}`,opacity:t.vars?t.vars.opacity.switchTrack:`${t.palette.mode==="light"?.38:.3}`}))),fn=j("span",{name:"MuiSwitch",slot:"Thumb"})(Q(({theme:t})=>({boxShadow:(t.vars||t).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"}))),As=u.forwardRef(function(e,o){const r=yt({props:e,name:"MuiSwitch"}),{className:n,color:a="primary",edge:l=!1,size:d="medium",sx:p,slots:g={},slotProps:f={},...b}=r,h={...r,color:a,edge:l,size:d},y=cn(h),I={slots:g,slotProps:f},[P,B]=ct("root",{className:X(y.root,n),elementType:dn,externalForwardedProps:I,ownerState:h,additionalProps:{sx:p}}),[C,A]=ct("thumb",{className:y.thumb,elementType:fn,externalForwardedProps:I,ownerState:h}),T=s.jsx(C,{...A}),[z,Y]=ct("track",{className:y.track,elementType:un,externalForwardedProps:I,ownerState:h});return s.jsxs(P,{...B,children:[s.jsx(pn,{type:"checkbox",icon:T,checkedIcon:T,ref:o,ownerState:h,...b,classes:{...y,root:y.switchBase},slots:{...g.switchBase&&{root:g.switchBase},...g.input&&{input:g.input}},slotProps:{...f.switchBase&&{root:typeof f.switchBase=="function"?f.switchBase(h):f.switchBase},input:{role:"switch"},...f.input&&{input:typeof f.input=="function"?f.input(h):f.input}}}),s.jsx(z,{...Y})]})});function gn(t){return ft("MuiTab",t)}const Dt=ut("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper","icon"]),bn=t=>{const{classes:e,textColor:o,fullWidth:r,wrapped:n,icon:a,label:l,selected:d,disabled:p}=t,g={root:["root",a&&l&&"labelIcon",`textColor${$(o)}`,r&&"fullWidth",n&&"wrapped",d&&"selected",p&&"disabled"],icon:["iconWrapper","icon"]};return vt(g,gn,e)},hn=j(Oe,{name:"MuiTab",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:o}=t;return[e.root,o.label&&o.icon&&e.labelIcon,e[`textColor${$(o.textColor)}`],o.fullWidth&&e.fullWidth,o.wrapped&&e.wrapped,{[`& .${Dt.iconWrapper}`]:e.iconWrapper},{[`& .${Dt.icon}`]:e.icon}]}})(Q(({theme:t})=>({...t.typography.button,maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center",lineHeight:1.25,variants:[{props:({ownerState:e})=>e.label&&(e.iconPosition==="top"||e.iconPosition==="bottom"),style:{flexDirection:"column"}},{props:({ownerState:e})=>e.label&&e.iconPosition!=="top"&&e.iconPosition!=="bottom",style:{flexDirection:"row"}},{props:({ownerState:e})=>e.icon&&e.label,style:{minHeight:72,paddingTop:9,paddingBottom:9}},{props:({ownerState:e,iconPosition:o})=>e.icon&&e.label&&o==="top",style:{[`& > .${Dt.icon}`]:{marginBottom:6}}},{props:({ownerState:e,iconPosition:o})=>e.icon&&e.label&&o==="bottom",style:{[`& > .${Dt.icon}`]:{marginTop:6}}},{props:({ownerState:e,iconPosition:o})=>e.icon&&e.label&&o==="start",style:{[`& > .${Dt.icon}`]:{marginRight:t.spacing(1)}}},{props:({ownerState:e,iconPosition:o})=>e.icon&&e.label&&o==="end",style:{[`& > .${Dt.icon}`]:{marginLeft:t.spacing(1)}}},{props:{textColor:"inherit"},style:{color:"inherit",opacity:.6,[`&.${Dt.selected}`]:{opacity:1},[`&.${Dt.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity}}},{props:{textColor:"primary"},style:{color:(t.vars||t).palette.text.secondary,[`&.${Dt.selected}`]:{color:(t.vars||t).palette.primary.main},[`&.${Dt.disabled}`]:{color:(t.vars||t).palette.text.disabled}}},{props:{textColor:"secondary"},style:{color:(t.vars||t).palette.text.secondary,[`&.${Dt.selected}`]:{color:(t.vars||t).palette.secondary.main},[`&.${Dt.disabled}`]:{color:(t.vars||t).palette.text.disabled}}},{props:({ownerState:e})=>e.fullWidth,style:{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"}},{props:({ownerState:e})=>e.wrapped,style:{fontSize:t.typography.pxToRem(12)}}]}))),Ms=u.forwardRef(function(e,o){const r=yt({props:e,name:"MuiTab"}),{className:n,disabled:a=!1,disableFocusRipple:l=!1,fullWidth:d,icon:p,iconPosition:g="top",indicator:f,label:b,onChange:h,onClick:y,onFocus:I,selected:P,selectionFollowsFocus:B,textColor:C="inherit",value:A,wrapped:T=!1,...z}=r,Y={...r,disabled:a,disableFocusRipple:l,selected:P,icon:!!p,iconPosition:g,label:!!b,fullWidth:d,textColor:C,wrapped:T},_=bn(Y),ht=p&&b&&u.isValidElement(p)?u.cloneElement(p,{className:X(_.icon,p.props.className)}):p,Ct=q=>{!P&&h&&h(q,A),y&&y(q)},et=q=>{B&&!P&&h&&h(q,A),I&&I(q)};return s.jsxs(hn,{focusRipple:!l,className:X(_.root,n),ref:o,role:"tab","aria-selected":P,disabled:a,onClick:Ct,onFocus:et,ownerState:Y,tabIndex:P?0:-1,...z,children:[g==="top"||g==="start"?s.jsxs(u.Fragment,{children:[ht,b]}):s.jsxs(u.Fragment,{children:[b,ht]}),f]})}),Uo=u.createContext();function xn(t){return ft("MuiTable",t)}ut("MuiTable",["root","stickyHeader"]);const mn=t=>{const{classes:e,stickyHeader:o}=t;return vt({root:["root",o&&"stickyHeader"]},xn,e)},yn=j("table",{name:"MuiTable",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:o}=t;return[e.root,o.stickyHeader&&e.stickyHeader]}})(Q(({theme:t})=>({display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":{...t.typography.body2,padding:t.spacing(2),color:(t.vars||t).palette.text.secondary,textAlign:"left",captionSide:"bottom"},variants:[{props:({ownerState:e})=>e.stickyHeader,style:{borderCollapse:"separate"}}]}))),Po="table",Ls=u.forwardRef(function(e,o){const r=yt({props:e,name:"MuiTable"}),{className:n,component:a=Po,padding:l="normal",size:d="medium",stickyHeader:p=!1,...g}=r,f={...r,component:a,padding:l,size:d,stickyHeader:p},b=mn(f),h=u.useMemo(()=>({padding:l,size:d,stickyHeader:p}),[l,d,p]);return s.jsx(Uo.Provider,{value:h,children:s.jsx(yn,{as:a,role:a===Po?null:"table",ref:o,className:X(b.root,n),ownerState:f,...g})})}),Ue=u.createContext();function vn(t){return ft("MuiTableBody",t)}ut("MuiTableBody",["root"]);const Sn=t=>{const{classes:e}=t;return vt({root:["root"]},vn,e)},Cn=j("tbody",{name:"MuiTableBody",slot:"Root"})({display:"table-row-group"}),wn={variant:"body"},To="tbody",Os=u.forwardRef(function(e,o){const r=yt({props:e,name:"MuiTableBody"}),{className:n,component:a=To,...l}=r,d={...r,component:a},p=Sn(d);return s.jsx(Ue.Provider,{value:wn,children:s.jsx(Cn,{className:X(p.root,n),as:a,ref:o,role:a===To?null:"rowgroup",ownerState:d,...l})})});function $n(t){return ft("MuiTableCell",t)}const In=ut("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]),kn=t=>{const{classes:e,variant:o,align:r,padding:n,size:a,stickyHeader:l}=t,d={root:["root",o,l&&"stickyHeader",r!=="inherit"&&`align${$(r)}`,n!=="normal"&&`padding${$(n)}`,`size${$(a)}`]};return vt(d,$n,e)},Pn=j("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:o}=t;return[e.root,e[o.variant],e[`size${$(o.size)}`],o.padding!=="normal"&&e[`padding${$(o.padding)}`],o.align!=="inherit"&&e[`align${$(o.align)}`],o.stickyHeader&&e.stickyHeader]}})(Q(({theme:t})=>({...t.typography.body2,display:"table-cell",verticalAlign:"inherit",borderBottom:t.vars?`1px solid ${t.vars.palette.TableCell.border}`:`1px solid
    ${t.palette.mode==="light"?t.lighten(t.alpha(t.palette.divider,1),.88):t.darken(t.alpha(t.palette.divider,1),.68)}`,textAlign:"left",padding:16,variants:[{props:{variant:"head"},style:{color:(t.vars||t).palette.text.primary,lineHeight:t.typography.pxToRem(24),fontWeight:t.typography.fontWeightMedium}},{props:{variant:"body"},style:{color:(t.vars||t).palette.text.primary}},{props:{variant:"footer"},style:{color:(t.vars||t).palette.text.secondary,lineHeight:t.typography.pxToRem(21),fontSize:t.typography.pxToRem(12)}},{props:{size:"small"},style:{padding:"6px 16px",[`&.${In.paddingCheckbox}`]:{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}}},{props:{padding:"checkbox"},style:{width:48,padding:"0 0 0 4px"}},{props:{padding:"none"},style:{padding:0}},{props:{align:"left"},style:{textAlign:"left"}},{props:{align:"center"},style:{textAlign:"center"}},{props:{align:"right"},style:{textAlign:"right",flexDirection:"row-reverse"}},{props:{align:"justify"},style:{textAlign:"justify"}},{props:({ownerState:e})=>e.stickyHeader,style:{position:"sticky",top:0,zIndex:2,backgroundColor:(t.vars||t).palette.background.default}}]}))),zs=u.forwardRef(function(e,o){const r=yt({props:e,name:"MuiTableCell"}),{align:n="inherit",className:a,component:l,padding:d,scope:p,size:g,sortDirection:f,variant:b,...h}=r,y=u.useContext(Uo),I=u.useContext(Ue),P=I&&I.variant==="head";let B;l?B=l:B=P?"th":"td";let C=p;B==="td"?C=void 0:!C&&P&&(C="col");const A=b||I&&I.variant,T={...r,align:n,component:B,padding:d||(y&&y.padding?y.padding:"normal"),size:g||(y&&y.size?y.size:"medium"),sortDirection:f,stickyHeader:A==="head"&&y&&y.stickyHeader,variant:A},z=kn(T);let Y=null;return f&&(Y=f==="asc"?"ascending":"descending"),s.jsx(Pn,{as:B,ref:o,className:X(z.root,a),"aria-sort":Y,scope:C,ownerState:T,...h})});function Tn(t){return ft("MuiTableContainer",t)}ut("MuiTableContainer",["root"]);const Rn=t=>{const{classes:e}=t;return vt({root:["root"]},Tn,e)},An=j("div",{name:"MuiTableContainer",slot:"Root"})({width:"100%",overflowX:"auto"}),js=u.forwardRef(function(e,o){const r=yt({props:e,name:"MuiTableContainer"}),{className:n,component:a="div",...l}=r,d={...r,component:a},p=Rn(d);return s.jsx(An,{ref:o,as:a,className:X(p.root,n),ownerState:d,...l})});function Mn(t){return ft("MuiTableHead",t)}ut("MuiTableHead",["root"]);const Ln=t=>{const{classes:e}=t;return vt({root:["root"]},Mn,e)},On=j("thead",{name:"MuiTableHead",slot:"Root"})({display:"table-header-group"}),zn={variant:"head"},Ro="thead",Bs=u.forwardRef(function(e,o){const r=yt({props:e,name:"MuiTableHead"}),{className:n,component:a=Ro,...l}=r,d={...r,component:a},p=Ln(d);return s.jsx(Ue.Provider,{value:zn,children:s.jsx(On,{as:a,className:X(p.root,n),ref:o,role:a===Ro?null:"rowgroup",ownerState:d,...l})})}),jn=ie(s.jsx("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"})),Bn=ie(s.jsx("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}));function Dn(t){return ft("MuiTableRow",t)}const Ao=ut("MuiTableRow",["root","selected","hover","head","footer"]),En=t=>{const{classes:e,selected:o,hover:r,head:n,footer:a}=t;return vt({root:["root",o&&"selected",r&&"hover",n&&"head",a&&"footer"]},Dn,e)},Nn=j("tr",{name:"MuiTableRow",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:o}=t;return[e.root,o.head&&e.head,o.footer&&e.footer]}})(Q(({theme:t})=>({color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,[`&.${Ao.hover}:hover`]:{backgroundColor:(t.vars||t).palette.action.hover},[`&.${Ao.selected}`]:{backgroundColor:t.alpha((t.vars||t).palette.primary.main,(t.vars||t).palette.action.selectedOpacity),"&:hover":{backgroundColor:t.alpha((t.vars||t).palette.primary.main,`${(t.vars||t).palette.action.selectedOpacity} + ${(t.vars||t).palette.action.hoverOpacity}`)}}}))),Mo="tr",Ds=u.forwardRef(function(e,o){const r=yt({props:e,name:"MuiTableRow"}),{className:n,component:a=Mo,hover:l=!1,selected:d=!1,...p}=r,g=u.useContext(Ue),f={...r,component:a,hover:l,selected:d,head:g&&g.variant==="head",footer:g&&g.variant==="footer"},b=En(f);return s.jsx(Nn,{as:a,ref:o,className:X(b.root,n),role:a===Mo?null:"row",ownerState:f,...p})});function Fn(t){return(1+Math.sin(Math.PI*t-Math.PI/2))/2}function Wn(t,e,o,r={},n=()=>{}){const{ease:a=Fn,duration:l=300}=r;let d=null;const p=e[t];let g=!1;const f=()=>{g=!0},b=h=>{if(g){n(new Error("Animation cancelled"));return}d===null&&(d=h);const y=Math.min(1,(h-d)/l);if(e[t]=a(y)*(o-p)+p,y>=1){requestAnimationFrame(()=>{n(null)});return}requestAnimationFrame(b)};return p===o?(n(new Error("Element already at target position")),f):(requestAnimationFrame(b),f)}const Hn={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function Vn(t){const{onChange:e,...o}=t,r=u.useRef(),n=u.useRef(null),a=()=>{r.current=n.current.offsetHeight-n.current.clientHeight};return No(()=>{const l=Fo(()=>{const p=r.current;a(),p!==r.current&&e(r.current)}),d=Wo(n.current);return d.addEventListener("resize",l),()=>{l.clear(),d.removeEventListener("resize",l)}},[e]),u.useEffect(()=>{a(),e(r.current)},[e]),s.jsx("div",{style:Hn,...o,ref:n})}function Un(t){return ft("MuiTabScrollButton",t)}const Kn=ut("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),qn=t=>{const{classes:e,orientation:o,disabled:r}=t;return vt({root:["root",o,r&&"disabled"]},Un,e)},Gn=j(Oe,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:o}=t;return[e.root,o.orientation&&e[o.orientation]]}})({width:40,flexShrink:0,opacity:.8,[`&.${Kn.disabled}`]:{opacity:0},variants:[{props:{orientation:"vertical"},style:{width:"100%",height:40,"& svg":{transform:"var(--TabScrollButton-svgRotate)"}}}]}),Xn=u.forwardRef(function(e,o){var A,T;const r=yt({props:e,name:"MuiTabScrollButton"}),{className:n,slots:a={},slotProps:l={},direction:d,orientation:p,disabled:g,...f}=r,b=Ho(),h={isRtl:b,...r},y=qn(h),I=(A=a.StartScrollButtonIcon)!=null?A:jn,P=(T=a.EndScrollButtonIcon)!=null?T:Bn,B=Ve({elementType:I,externalSlotProps:l.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:h}),C=Ve({elementType:P,externalSlotProps:l.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:h});return s.jsx(Gn,{component:"div",className:X(y.root,n),ref:o,role:null,ownerState:h,tabIndex:null,...f,style:{...f.style,...p==="vertical"&&{"--TabScrollButton-svgRotate":`rotate(${b?-90:90}deg)`}},children:d==="left"?s.jsx(I,{...B}):s.jsx(P,{...C})})});function _n(t){return ft("MuiTabs",t)}const Ye=ut("MuiTabs",["root","vertical","list","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),Lo=(t,e)=>t===e?t.firstChild:e&&e.nextElementSibling?e.nextElementSibling:t.firstChild,Oo=(t,e)=>t===e?t.lastChild:e&&e.previousElementSibling?e.previousElementSibling:t.lastChild,We=(t,e,o)=>{let r=!1,n=o(t,e);for(;n;){if(n===t.firstChild){if(r)return;r=!0}const a=n.disabled||n.getAttribute("aria-disabled")==="true";if(!n.hasAttribute("tabindex")||a)n=o(t,n);else{n.focus();return}}},Yn=t=>{const{vertical:e,fixed:o,hideScrollbar:r,scrollableX:n,scrollableY:a,centered:l,scrollButtonsHideMobile:d,classes:p}=t;return vt({root:["root",e&&"vertical"],scroller:["scroller",o&&"fixed",r&&"hideScrollbar",n&&"scrollableX",a&&"scrollableY"],list:["list","flexContainer",e&&"flexContainerVertical",e&&"vertical",l&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",d&&"scrollButtonsHideMobile"],scrollableX:[n&&"scrollableX"],hideScrollbar:[r&&"hideScrollbar"]},_n,p)},Zn=j("div",{name:"MuiTabs",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:o}=t;return[{[`& .${Ye.scrollButtons}`]:e.scrollButtons},{[`& .${Ye.scrollButtons}`]:o.scrollButtonsHideMobile&&e.scrollButtonsHideMobile},e.root,o.vertical&&e.vertical]}})(Q(({theme:t})=>({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex",variants:[{props:({ownerState:e})=>e.vertical,style:{flexDirection:"column"}},{props:({ownerState:e})=>e.scrollButtonsHideMobile,style:{[`& .${Ye.scrollButtons}`]:{[t.breakpoints.down("sm")]:{display:"none"}}}}]}))),Jn=j("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(t,e)=>{const{ownerState:o}=t;return[e.scroller,o.fixed&&e.fixed,o.hideScrollbar&&e.hideScrollbar,o.scrollableX&&e.scrollableX,o.scrollableY&&e.scrollableY]}})({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap",variants:[{props:({ownerState:t})=>t.fixed,style:{overflowX:"hidden",width:"100%"}},{props:({ownerState:t})=>t.hideScrollbar,style:{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}},{props:({ownerState:t})=>t.scrollableX,style:{overflowX:"auto",overflowY:"hidden"}},{props:({ownerState:t})=>t.scrollableY,style:{overflowY:"auto",overflowX:"hidden"}}]}),Qn=j("div",{name:"MuiTabs",slot:"List",overridesResolver:(t,e)=>{const{ownerState:o}=t;return[e.list,e.flexContainer,o.vertical&&e.flexContainerVertical,o.centered&&e.centered]}})({display:"flex",variants:[{props:({ownerState:t})=>t.vertical,style:{flexDirection:"column"}},{props:({ownerState:t})=>t.centered,style:{justifyContent:"center"}}]}),ts=j("span",{name:"MuiTabs",slot:"Indicator"})(Q(({theme:t})=>({position:"absolute",height:2,bottom:0,width:"100%",transition:t.transitions.create(),variants:[{props:{indicatorColor:"primary"},style:{backgroundColor:(t.vars||t).palette.primary.main}},{props:{indicatorColor:"secondary"},style:{backgroundColor:(t.vars||t).palette.secondary.main}},{props:({ownerState:e})=>e.vertical,style:{height:"100%",width:2,right:0}}]}))),es=j(Vn)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),zo={},Es=u.forwardRef(function(e,o){const r=yt({props:e,name:"MuiTabs"}),n=tr(),a=Ho(),{"aria-label":l,"aria-labelledby":d,action:p,centered:g=!1,children:f,className:b,component:h="div",allowScrollButtonsMobile:y=!1,indicatorColor:I="primary",onChange:P,orientation:B="horizontal",ScrollButtonComponent:C,scrollButtons:A="auto",selectionFollowsFocus:T,slots:z={},slotProps:Y={},TabIndicatorProps:_={},TabScrollButtonProps:ht={},textColor:Ct="primary",value:et,variant:q="standard",visibleScrollbar:nt=!1,...L}=r,k=q==="scrollable",U=B==="vertical",st=U?"scrollTop":"scrollLeft",V=U?"top":"left",wt=U?"bottom":"right",At=U?"clientHeight":"clientWidth",Mt=U?"height":"width",St={...r,component:h,allowScrollButtonsMobile:y,indicatorColor:I,orientation:B,vertical:U,scrollButtons:A,textColor:Ct,variant:q,visibleScrollbar:nt,fixed:!k,hideScrollbar:k&&!nt,scrollableX:k&&!U,scrollableY:k&&U,centered:g&&!k,scrollButtonsHideMobile:!y},ot=Yn(St),dt=Ve({elementType:z.StartScrollButtonIcon,externalSlotProps:Y.startScrollButtonIcon,ownerState:St}),E=Ve({elementType:z.EndScrollButtonIcon,externalSlotProps:Y.endScrollButtonIcon,ownerState:St}),[N,O]=u.useState(!1),[v,tt]=u.useState(zo),[rt,lt]=u.useState(!1),[$t,ce]=u.useState(!1),[$e,It]=u.useState(!1),[de,Ie]=u.useState({overflow:"hidden",scrollbarWidth:0}),pt=new Map,jt=u.useRef(null),w=u.useRef(null),Bt={slots:z,slotProps:{indicator:_,scrollButton:ht,...Y}},G=()=>{const x=jt.current;let S;if(x){const W=x.getBoundingClientRect();S={clientWidth:x.clientWidth,scrollLeft:x.scrollLeft,scrollTop:x.scrollTop,scrollWidth:x.scrollWidth,top:W.top,bottom:W.bottom,left:W.left,right:W.right}}let F;if(x&&et!==!1){const W=w.current.children;if(W.length>0){const Z=W[pt.get(et)];F=Z?Z.getBoundingClientRect():null}}return{tabsMeta:S,tabMeta:F}},Lt=be(()=>{const{tabsMeta:x,tabMeta:S}=G();let F=0,W;U?(W="top",S&&x&&(F=S.top-x.top+x.scrollTop)):(W=a?"right":"left",S&&x&&(F=(a?-1:1)*(S[W]-x[W]+x.scrollLeft)));const Z={[W]:F,[Mt]:S?S[Mt]:0};if(typeof v[W]!="number"||typeof v[Mt]!="number")tt(Z);else{const Rt=Math.abs(v[W]-Z[W]),Ut=Math.abs(v[Mt]-Z[Mt]);(Rt>=1||Ut>=1)&&tt(Z)}}),Gt=(x,{animation:S=!0}={})=>{S?Wn(st,jt.current,x,{duration:n.transitions.duration.standard}):jt.current[st]=x},pe=x=>{let S=jt.current[st];U?S+=x:S+=x*(a?-1:1),Gt(S)},Yt=()=>{const x=jt.current[At];let S=0;const F=Array.from(w.current.children);for(let W=0;W<F.length;W+=1){const Z=F[W];if(S+Z[At]>x){W===0&&(S=x);break}S+=Z[At]}return S},Nt=()=>{pe(-1*Yt())},Zt=()=>{pe(Yt())},[je,{onChange:Ft,...he}]=ct("scrollbar",{className:X(ot.scrollableX,ot.hideScrollbar),elementType:es,shouldForwardComponentProp:!0,externalForwardedProps:Bt,ownerState:St}),xt=u.useCallback(x=>{Ft==null||Ft(x),Ie({overflow:null,scrollbarWidth:x})},[Ft]),[J,Pt]=ct("scrollButtons",{className:X(ot.scrollButtons,ht.className),elementType:Xn,externalForwardedProps:Bt,ownerState:St,additionalProps:{orientation:B,slots:{StartScrollButtonIcon:z.startScrollButtonIcon||z.StartScrollButtonIcon,EndScrollButtonIcon:z.endScrollButtonIcon||z.EndScrollButtonIcon},slotProps:{startScrollButtonIcon:dt,endScrollButtonIcon:E}}}),xe=()=>{const x={};x.scrollbarSizeListener=k?s.jsx(je,{...he,onChange:xt}):null;const F=k&&(A==="auto"&&(rt||$t)||A===!0);return x.scrollButtonStart=F?s.jsx(J,{direction:a?"right":"left",onClick:Nt,disabled:!rt,...Pt}):null,x.scrollButtonEnd=F?s.jsx(J,{direction:a?"left":"right",onClick:Zt,disabled:!$t,...Pt}):null,x},Tt=be(x=>{const{tabsMeta:S,tabMeta:F}=G();if(!(!F||!S)){if(F[V]<S[V]){const W=S[st]+(F[V]-S[V]);Gt(W,{animation:x})}else if(F[wt]>S[wt]){const W=S[st]+(F[wt]-S[wt]);Gt(W,{animation:x})}}}),re=be(()=>{k&&A!==!1&&It(!$e)});u.useEffect(()=>{const x=Fo(()=>{jt.current&&Lt()});let S;const F=Rt=>{Rt.forEach(Ut=>{Ut.removedNodes.forEach(te=>{S==null||S.unobserve(te)}),Ut.addedNodes.forEach(te=>{S==null||S.observe(te)})}),x(),re()},W=Wo(jt.current);W.addEventListener("resize",x);let Z;return typeof ResizeObserver!="undefined"&&(S=new ResizeObserver(x),Array.from(w.current.children).forEach(Rt=>{S.observe(Rt)})),typeof MutationObserver!="undefined"&&(Z=new MutationObserver(F),Z.observe(w.current,{childList:!0})),()=>{x.clear(),W.removeEventListener("resize",x),Z==null||Z.disconnect(),S==null||S.disconnect()}},[Lt,re]),u.useEffect(()=>{const x=Array.from(w.current.children),S=x.length;if(typeof IntersectionObserver!="undefined"&&S>0&&k&&A!==!1){const F=x[0],W=x[S-1],Z={root:jt.current,threshold:.99},Rt=ee=>{lt(!ee[0].isIntersecting)},Ut=new IntersectionObserver(Rt,Z);Ut.observe(F);const te=ee=>{ce(!ee[0].isIntersecting)},me=new IntersectionObserver(te,Z);return me.observe(W),()=>{Ut.disconnect(),me.disconnect()}}},[k,A,$e,f==null?void 0:f.length]),u.useEffect(()=>{O(!0)},[]),u.useEffect(()=>{Lt()}),u.useEffect(()=>{Tt(zo!==v)},[Tt,v]),u.useImperativeHandle(p,()=>({updateIndicator:Lt,updateScrollButtons:re}),[Lt,re]);const[Wt,Ot]=ct("indicator",{className:X(ot.indicator,_.className),elementType:ts,externalForwardedProps:Bt,ownerState:St,additionalProps:{style:v}}),ue=s.jsx(Wt,{...Ot});let ne=0;const fe=u.Children.map(f,x=>{if(!u.isValidElement(x))return null;const S=x.props.value===void 0?ne:x.props.value;pt.set(S,ne);const F=S===et;return ne+=1,u.cloneElement(x,{fullWidth:q==="fullWidth",indicator:F&&!N&&ue,selected:F,selectionFollowsFocus:T,onChange:P,textColor:Ct,value:S,...ne===1&&et===!1&&!x.props.tabIndex?{tabIndex:0}:{}})}),Xt=x=>{if(x.altKey||x.shiftKey||x.ctrlKey||x.metaKey)return;const S=w.current,F=er(S).activeElement;if(F.getAttribute("role")!=="tab")return;let Z=B==="horizontal"?"ArrowLeft":"ArrowUp",Rt=B==="horizontal"?"ArrowRight":"ArrowDown";switch(B==="horizontal"&&a&&(Z="ArrowRight",Rt="ArrowLeft"),x.key){case Z:x.preventDefault(),We(S,F,Oo);break;case Rt:x.preventDefault(),We(S,F,Lo);break;case"Home":x.preventDefault(),We(S,null,Lo);break;case"End":x.preventDefault(),We(S,null,Oo);break}},zt=xe(),[Jt,Ht]=ct("root",{ref:o,className:X(ot.root,b),elementType:Zn,externalForwardedProps:{...Bt,...L,component:h},ownerState:St}),[Vt,_t]=ct("scroller",{ref:jt,className:ot.scroller,elementType:Jn,externalForwardedProps:Bt,ownerState:St,additionalProps:{style:{overflow:de.overflow,[U?`margin${a?"Left":"Right"}`:"marginBottom"]:nt?void 0:-de.scrollbarWidth}}}),[ke,Qt]=ct("list",{ref:w,className:X(ot.list,ot.flexContainer),elementType:Qn,externalForwardedProps:Bt,ownerState:St,getSlotProps:x=>({...x,onKeyDown:S=>{var F;Xt(S),(F=x.onKeyDown)==null||F.call(x,S)}})});return s.jsxs(Jt,{...Ht,children:[zt.scrollButtonStart,zt.scrollbarSizeListener,s.jsxs(Vt,{..._t,children:[s.jsx(ke,{"aria-label":l,"aria-labelledby":d,"aria-orientation":B==="vertical"?"vertical":null,role:"tablist",...Qt,children:fe}),N&&ue]}),zt.scrollButtonEnd]})});function Se(t){const e=[],o=new Set;for(const r of t!=null?t:[]){const n=String(r!=null?r:"").trim();n&&(o.has(n)||(o.add(n),e.push(n)))}return e}function Ce(t){return new Map((t!=null?t:[]).map(e=>[String(e.id),e]))}function ze(t,e){const o=Ce(t),r={};for(const[n,a]of Object.entries(e!=null?e:{})){const l={};for(const[d,p]of Object.entries(a!=null?a:{})){const g=Se(p).filter(f=>o.has(String(f)));g.length>0&&(l[d]=g)}Object.keys(l).length>0&&(r[n]=l)}return r}let ve={version:2,updatedAt:0,tags:[],assignments:{}};const to=new Set;function os(){for(const t of to)t();typeof window!="undefined"&&window.dispatchEvent(new Event("scipionTagsChanged"))}function we(t){const e=t(ve);e!==ve&&(ve=e,os())}function jo(){return ve}function rs(t){return to.add(t),()=>{to.delete(t)}}function ns(t){we(e=>{var d,p;const o=Array.isArray(t)?t:[],r=((d=e.tags)!=null?d:[]).length===0,n=o.length===0,a=Object.keys((p=e.assignments)!=null?p:{}).length===0;if(n&&r&&a)return e;const l=ze(o,e.assignments);return{...e,updatedAt:Date.now(),tags:o,assignments:l}})}function ss(t){const e=String(t);we(o=>{var a;const r=((a=o.tags)!=null?a:[]).filter(l=>String(l.id)!==e),n=ze(r,o.assignments);return{...o,updatedAt:Date.now(),tags:r,assignments:n}})}function Ko(t,e,o){const r=String(t!=null?t:"global"),n=String(e!=null?e:"");n&&we(a=>{var f,b;const l=Ce(a.tags),d=Se(o).filter(h=>l.has(String(h))),p={...(f=a.assignments)!=null?f:{}},g={...(b=p[r])!=null?b:{}};return d.length===0?delete g[n]:g[n]=d,Object.keys(g).length===0?delete p[r]:p[r]=g,{...a,updatedAt:Date.now(),assignments:p}})}function ls(t,e){var l,d,p;const o=String(t!=null?t:"global"),r=String(e!=null?e:"");if(!r)return[];const n=(p=(d=(l=ve.assignments)==null?void 0:l[o])==null?void 0:d[r])!=null?p:[],a=Ce(ve.tags);return Se(n).filter(g=>a.has(String(g)))}function as(t,e){const o=String(t!=null?t:"");!o||o==="null"||o==="undefined"||we(r=>{var p;const n=Ce(r.tags),a={};for(const[g,f]of Object.entries(e!=null?e:{})){const b=String(g!=null?g:"").trim();if(!b)continue;const h=Se(f!=null?f:[]).filter(y=>n.has(String(y)));h.length>0&&(a[b]=h)}const l={...(p=r.assignments)!=null?p:{}};Object.keys(a).length===0?delete l[o]:l[o]=a;const d=ze(r.tags,l);return{...r,updatedAt:Date.now(),assignments:d}})}function is(t,e){const o=String(t!=null?t:"");!o||o==="null"||o==="undefined"||we(r=>{var g,f;const n=Ce(r.tags),a=(g=r.assignments)!=null?g:{},l={...(f=a[o])!=null?f:{}};for(const[b,h]of Object.entries(e!=null?e:{})){const y=String(b!=null?b:"").trim();if(!y)continue;const I=Se(h!=null?h:[]).filter(P=>n.has(String(P)));I.length===0?delete l[y]:l[y]=I}const d={...a};Object.keys(l).length===0?delete d[o]:d[o]=l;const p=ze(r.tags,d);return{...r,updatedAt:Date.now(),assignments:p}})}function cs(t){const e=String(t!=null?t:"");!e||e==="null"||e==="undefined"||we(o=>{var a;const r={...(a=o.assignments)!=null?a:{}};delete r[e];const n=ze(o.tags,r);return{...o,updatedAt:Date.now(),assignments:n}})}function ds(t,e,o){const r=ls(t,e),n=String(o),l=r.some(d=>String(d)===n)?r.filter(d=>String(d)!==n):[n,...r];return Ko(t,e,l),l}function ps(){const t=u.useSyncExternalStore(rs,jo,jo);return u.useMemo(()=>{const e=Ce(t.tags),o=(r,n)=>{var p,g,f;const a=String(r!=null?r:"global"),l=String(n!=null?n:"");if(!l)return[];const d=(f=(g=(p=t.assignments)==null?void 0:p[a])==null?void 0:g[l])!=null?f:[];return Se(d).filter(b=>e.has(String(b)))};return{tags:t.tags,assignments:t.assignments,tagsById:e,setTags:ns,deleteTag:ss,getAssignedTagIds:o,setAssignedTagIds:Ko,setProjectAssignments:as,mergeProjectAssignments:is,clearProjectAssignments:cs,toggleAssignedTagId:ds}},[t.tags,t.assignments])}const us=["#ef4444","#f97316","#f59e0b","#84cc16","#22c55e","#06b6d4","#3b82f6","#6366f1","#a855f7","#ec4899","#64748b","#111827"];function fs(){return typeof crypto!="undefined"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():`tag_${Date.now()}_${Math.random().toString(16).slice(2)}`}function Le(t){return typeof t=="string"&&t.trim().length>0}function Ze(t,e){var r,n,a;const o=typeof((r=t==null?void 0:t.data)==null?void 0:r.detail)=="string"&&t.data.detail||typeof((a=(n=t==null?void 0:t.response)==null?void 0:n.data)==null?void 0:a.detail)=="string"&&t.response.data.detail||typeof(t==null?void 0:t.message)=="string"&&t.message||String(t!=null?t:"");return o.trim()?o:e}function eo(t){var o,r;const e=typeof(t==null?void 0:t.description)=="string"&&t.description.trim()?t.description:void 0;return{id:String((o=t==null?void 0:t.id)!=null?o:""),title:String((r=t==null?void 0:t.title)!=null?r:""),description:e,color:typeof(t==null?void 0:t.color)=="string"&&t.color.trim()?t.color:"#3b82f6"}}function gs(t){return Array.isArray(t)?t.map(e=>eo(e)).filter(e=>typeof e.title=="string"&&e.title.trim().length>0):[]}function bs({open:t,mode:e,draft:o,onChange:r,onClose:n,onSave:a,isSaving:l,titleHelpText:d,descriptionHelpText:p,colorHelpText:g,validationError:f}){const[b,h]=u.useState(null),y=e==="create"?"Create tag":"Edit tag",I=u.useMemo(()=>b==="title"?d!=null?d:"":b==="description"?p!=null?p:"":b==="color"&&g!=null?g:"",[b,d,p,g]),P=Le(d),B=Le(p),C=Le(g),A={borderRadius:4,overflow:"hidden",border:"1px solid",borderColor:"divider",boxShadow:"0 18px 50px rgba(0,0,0,0.35)"};return s.jsxs(s.Fragment,{children:[s.jsxs(ao,{open:t,onClose:l?void 0:n,maxWidth:"sm",fullWidth:!0,slotProps:{backdrop:{sx:{backgroundColor:"transparent"}}},PaperProps:{sx:A},children:[s.jsxs(io,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",backgroundColor:"#333d49",color:"white",px:2,py:1.5,boxSizing:"border-box",m:0},children:[s.jsx(bt,{sx:{minWidth:0,pr:1},children:s.jsx(Et,{sx:{fontWeight:700,fontSize:16,lineHeight:1.2},children:y})}),s.jsx(oe,{onClick:n,"aria-label":"Close",size:"small",disabled:!!l,sx:{color:"white",borderRadius:"50%",backgroundColor:"rgba(206, 170, 170, 0.1)",width:32,height:32,"&:hover":{backgroundColor:"rgba(253, 253, 253, 0.1)"},"&:focus-visible":{outline:"2px solid rgba(255,255,255,0.55)",outlineOffset:2}},children:s.jsx(uo,{fontSize:"small"})})]}),s.jsx(co,{sx:{px:2,py:1.5,overflow:"visible"},children:s.jsxs(bt,{sx:{display:"flex",flexDirection:"column",gap:2,pt:.5},children:[s.jsxs(bt,{sx:{display:"flex",alignItems:"flex-start",gap:1},children:[s.jsx(Xe,{label:"Title",value:o.title,onChange:T=>r({title:T.target.value}),fullWidth:!0,size:"small",required:!0,margin:"dense",disabled:!!l}),P?s.jsx(He,{title:"Help",children:s.jsx(oe,{size:"small",onClick:()=>h("title"),sx:{mt:.75},disabled:!!l,children:s.jsx(_e,{fontSize:"1.1rem"})})}):null]}),s.jsxs(bt,{sx:{display:"flex",alignItems:"flex-start",gap:1},children:[s.jsx(Xe,{label:"Description (optional)",value:o.description,onChange:T=>r({description:T.target.value}),fullWidth:!0,size:"small",multiline:!0,minRows:3,margin:"dense",disabled:!!l}),B?s.jsx(He,{title:"Help",children:s.jsx(oe,{size:"small",onClick:()=>h("description"),sx:{mt:.75},disabled:!!l,children:s.jsx(_e,{fontSize:"1.1rem"})})}):null]}),s.jsxs(bt,{sx:{display:"flex",alignItems:"flex-start",gap:1},children:[s.jsxs(bt,{sx:{flex:1,minWidth:0},children:[s.jsx(Et,{sx:{fontSize:12,fontWeight:600,mb:.75},children:"Color"}),s.jsxs(bt,{sx:{display:"flex",alignItems:"center",gap:1,flexWrap:"wrap"},children:[us.map(T=>{const z=T.toLowerCase()===String(o.color).toLowerCase();return s.jsx("button",{type:"button",onClick:()=>r({color:T}),disabled:!!l,style:{width:22,height:22,borderRadius:"50%",border:z?"2px solid #111827":"1px solid rgba(0,0,0,0.2)",background:T,cursor:l?"default":"pointer",opacity:l?.65:1},"aria-label":`Pick color ${T}`},T)}),s.jsxs(bt,{sx:{display:"flex",alignItems:"center",gap:1},children:[s.jsx(Xe,{size:"small",value:o.color,onChange:T=>r({color:T.target.value}),sx:{width:140},inputProps:{"aria-label":"Custom color"},margin:"dense",disabled:!!l}),s.jsx("input",{type:"color",value:o.color,onChange:T=>r({color:T.target.value}),disabled:!!l,style:{width:34,height:34,border:"1px solid rgba(0,0,0,0.25)",background:"transparent",padding:0,cursor:l?"default":"pointer",opacity:l?.65:1},"aria-label":"Pick custom color"})]})]})]}),C?s.jsx(He,{title:"Help",children:s.jsx(oe,{size:"small",onClick:()=>h("color"),sx:{mt:.75},disabled:!!l,children:s.jsx(_e,{fontSize:"1.1rem"})})}):null]}),f?s.jsx(Et,{sx:{color:"#dc2626",fontSize:12,whiteSpace:"pre-wrap"},children:f}):null]})}),s.jsxs(po,{sx:{justifyContent:"center",px:2,py:1.5,borderTop:"1px solid",borderColor:"divider",backgroundColor:"background.paper"},children:[s.jsx(Me,{variant:"outlined",onClick:n,disabled:!!l,sx:{textTransform:"none",minWidth:112,borderRadius:2},children:"Cancel"}),s.jsx(Me,{variant:"contained",onClick:()=>void a(),disabled:!!l,sx:{textTransform:"none",minWidth:112,borderRadius:2},children:l?"Saving...":"Save"})]})]}),s.jsxs(ao,{open:b!==null,onClose:()=>h(null),maxWidth:"sm",fullWidth:!0,slotProps:{backdrop:{sx:{backgroundColor:"transparent"}}},PaperProps:{sx:A},children:[s.jsxs(io,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",backgroundColor:"#333d49",color:"white",px:2,py:1.5,boxSizing:"border-box",m:0},children:[s.jsx(Et,{sx:{fontWeight:700,fontSize:16,lineHeight:1.2},children:"Help"}),s.jsx(oe,{onClick:()=>h(null),"aria-label":"Close",size:"small",sx:{color:"white",borderRadius:"50%",backgroundColor:"rgba(206, 170, 170, 0.1)",width:32,height:32,"&:hover":{backgroundColor:"rgba(253, 253, 253, 0.1)"},"&:focus-visible":{outline:"2px solid rgba(255,255,255,0.55)",outlineOffset:2}},children:s.jsx(uo,{fontSize:"small"})})]}),s.jsx(co,{sx:{px:2,py:1.5,marginTop:2.25},children:s.jsx(bt,{sx:{maxHeight:"60vh",overflow:"auto",pr:.5},children:s.jsx(Et,{sx:{fontSize:13,lineHeight:1.6,whiteSpace:"pre-wrap"},children:I||"No help available."})})}),s.jsx(po,{sx:{justifyContent:"center",px:2,py:1.5,borderTop:"1px solid",borderColor:"divider",backgroundColor:"background.paper"},children:s.jsx(Me,{variant:"outlined",onClick:()=>h(null),sx:{textTransform:"none",minWidth:112},children:"Close"})})]})]})}const Ns=u.memo(function({title:e,projectId:o,open:r=!0,tags:n,onTagsChange:a,initialTags:l}){const d=qo(),p=u.useRef(d);u.useEffect(()=>{p.current=d},[d]);const g=u.useMemo(()=>{const E=String(o!=null?o:"").trim();return!E||E==="null"||E==="undefined"?null:o},[o]),f=g!=null,b=!f&&Array.isArray(n)&&typeof a=="function",[h,y]=u.useState([]),{tags:I,setTags:P,deleteTag:B}=ps(),C=u.useMemo(()=>f?Array.isArray(h)?h:[]:b?Array.isArray(n)?n:[]:Array.isArray(I)?I:[],[f,h,b,n,I]),A=u.useCallback(E=>{const N=Array.isArray(E)?E:[];f&&y(N),P(N),a==null||a(N)},[f,a,P]),[T,z]=u.useState(!1),[Y,_]=u.useState(!1),[ht,Ct]=u.useState({});u.useEffect(()=>{o!=null&&console.debug("TagManager projectId:",o)},[o]),u.useEffect(()=>{f||Array.isArray(n)&&P(n)},[f,n,P]),u.useEffect(()=>{},[g]),u.useEffect(()=>{f||b||!Array.isArray(l)||l.length===0||Array.isArray(I)&&I.length>0||P(l)},[f,b,l,P,I]),u.useEffect(()=>{if(!f||!r||!String(g!=null?g:"").trim())return;let N=!1;return z(!0),(async()=>{try{const v=await p.current.listProjectTags(g);if(N)return;const tt=gs(v);A(tt)}catch(v){if(N)return;Fe.error(Ze(v,"Failed to load tags"))}finally{if(N)return;z(!1)}})(),()=>{N=!0}},[f,g,r,A]);const[et,q]=u.useState(!1),[nt,L]=u.useState("create"),[k,U]=u.useState({title:"",description:"",color:"#3b82f6"}),[st,V]=u.useState(null),wt=()=>{V(null),L("create"),U({title:"",description:"",color:"#3b82f6"}),q(!0)},At=E=>{var N,O;V(null),L("edit"),U({id:E.id,title:E.title,description:(N=E.description)!=null?N:"",color:(O=E.color)!=null?O:"#3b82f6"}),q(!0)},Mt=()=>{Y||q(!1)},St=()=>{if(!Le(k.title))return"Title is required.";const E=k.title.trim().toLowerCase();return(C!=null?C:[]).some(O=>nt==="edit"&&k.id&&String(O.id)===String(k.id)?!1:String(O.title).trim().toLowerCase()===E)?"A tag with the same title already exists.":Le(k.color)?null:"Color is required."},ot=async()=>{const E=St();if(E){V(E);return}_(!0),V(null);try{if(nt==="create"){if(f){const v=await p.current.createProjectTag(g,{title:k.title.trim(),description:k.description.trim()?k.description.trim():null,color:k.color}),tt=eo(v),rt=(C!=null?C:[]).filter(lt=>String(lt.id)!==String(tt.id));A([tt,...rt]),q(!1);return}const O={id:fs(),title:k.title.trim(),description:k.description.trim()?k.description.trim():void 0,color:k.color};A([O,...C!=null?C:[]]),q(!1);return}if(!k.id){V("Missing tag id.");return}if(f){const O=await p.current.updateProjectTag(g,String(k.id),{title:k.title.trim(),description:k.description.trim()?k.description.trim():null,color:k.color}),v=eo(O),tt=(C!=null?C:[]).map(rt=>String(rt.id)===String(k.id)?v:rt);A(tt),q(!1);return}const N=(C!=null?C:[]).map(O=>String(O.id)!==String(k.id)?O:{...O,title:k.title.trim(),description:k.description.trim()?k.description.trim():void 0,color:k.color});A(N),q(!1)}catch(N){Fe.error(Ze(N,"Failed to save tag"))}finally{_(!1)}},dt=async E=>{const N=String(E);if(!f){b?A((C!=null?C:[]).filter(O=>String(O.id)!==N)):B(N);return}Ct(O=>({...O,[N]:!0}));try{const O=await p.current.deleteProjectTag(g,N);if(O&&O.success===!1){Fe.error("Delete failed");return}A((C!=null?C:[]).filter(v=>String(v.id)!==N))}catch(O){Fe.error(Ze(O,"Failed to delete tag"))}finally{Ct(O=>{const v={...O};return delete v[N],v})}};return s.jsxs(bt,{sx:{border:"1px solid #e5e7eb",borderRadius:2,backgroundColor:"#fff",overflow:"hidden"},children:[s.jsxs(bt,{sx:{px:1.5,py:1.25,backgroundColor:"#333d49",color:"white",display:"flex",alignItems:"center",justifyContent:"space-between",gap:1},children:[s.jsxs(bt,{sx:{display:"inline-flex",alignItems:"center",gap:1},children:[s.jsx(Et,{sx:{fontWeight:700,fontSize:14},children:e!=null?e:"Tags"}),T?s.jsx(or,{size:14}):null]}),s.jsx(Me,{variant:"contained",onClick:wt,disabled:T,sx:{textTransform:"none",backgroundColor:"#25991a",borderRadius:2,"&:hover":{backgroundColor:"#176d0f"}},children:"New tag"})]}),s.jsx(bt,{sx:{p:1.5},children:(C!=null?C:[]).length===0?s.jsx(Et,{sx:{fontSize:12,color:"#6b7280"},children:"No tags yet."}):s.jsx(bt,{sx:{display:"flex",flexDirection:"column",gap:1},children:(C!=null?C:[]).map(E=>{const N=!!ht[String(E.id)];return s.jsxs(bt,{sx:{display:"grid",gridTemplateColumns:"minmax(0,1fr) auto",alignItems:"center",gap:1,border:"1px solid #e5e7eb",borderRadius:2,px:1.25,py:1,opacity:N?.65:1},children:[s.jsxs(bt,{sx:{minWidth:0},children:[s.jsxs(bt,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[s.jsx(bt,{sx:{width:10,height:10,borderRadius:"50%",backgroundColor:E.color,border:"1px solid rgba(0,0,0,0.15)",flex:"0 0 auto"}}),s.jsx(Et,{sx:{fontWeight:700,fontSize:13,color:"#111827",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:E.title,children:E.title})]}),E.description?s.jsx(Et,{sx:{fontSize:12,color:"#4b5563",mt:.25,whiteSpace:"pre-wrap",wordBreak:"break-word"},children:E.description}):null]}),s.jsxs(bt,{sx:{display:"inline-flex",alignItems:"center",gap:.25},children:[s.jsx(Me,{size:"small",variant:"outlined",onClick:()=>At(E),disabled:N||T,sx:{textTransform:"none",borderRadius:2,backgroundColor:"#2b5ac0",color:"white","&:hover":{backgroundColor:"#1a43b3"}},children:"Edit"}),s.jsx(He,{title:"Delete",children:s.jsx("span",{children:s.jsx(oe,{size:"small",onClick:()=>void dt(String(E.id)),disabled:N||T,children:s.jsx(rr,{fontSize:"1.2rem"})})})})]})]},E.id)})})}),s.jsx(Qe,{}),s.jsx(bs,{open:et,mode:nt,draft:k,onChange:E=>U(N=>({...N,...E})),onClose:Mt,onSave:ot,isSaving:Y,validationError:st,titleHelpText:"Tag title used to identify and filter protocols.",descriptionHelpText:"Optional. You can add a short explanation for the tag.",colorHelpText:"Pick a color to quickly recognize the tag in chips and lists."})]})});export{ws as A,Mr as C,Qe as D,Is as F,ks as I,vs as L,Rs as M,Ss as R,uo as S,js as T,Ts as a,Ls as b,Bs as c,Ds as d,zs as e,Os as f,Ps as g,Es as h,Ms as i,Cs as j,As as k,ko as l,$s as m,Ns as n,ps as u};
