@sistent/sistent 0.14.204 → 0.14.205
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +2 -2
- package/dist/index.mjs +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -76,7 +76,7 @@ Valid keys: `+JSON.stringify(Object.keys(H),null," "));var ze=Pe(y,O,M,F,V+"."+
|
|
|
76
76
|
overflow: hidden;
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
|
-
`,Fge=(0,Qo.styled)(nd)(({theme:e})=>({height:"2.25rem",width:"2.25rem",fill:e.palette.common.white,cursor:"pointer"})),Nge=(0,Qo.styled)(q2)(({theme:e})=>({height:"2.25rem",width:"2.25rem",fill:e.palette.common.white,cursor:"pointer"})),Mm=(0,Qo.styled)("div")(({theme:e})=>({background:e.palette.mode==="light"?Si.header:Ti.header,color:"#eee",display:"flex",justifyContent:"space-between",alignItems:"center",padding:"1rem",textAlign:"center"})),QW=({headerIcon:e})=>{let[t,r]=(0,Ru.useState)(!1),[o,a]=(0,Ru.useState)(""),n=(0,Ru.useRef)(null),[i,l]=(0,Ru.useState)(null);return{isOpen:t,open:t,openModal:({title:f,reactNode:d=null,onClose:p})=>{f&&a(f),p&&(n.current=p),r(!0),d&&l(d)},reactNode:i,title:o,headerIcon:e,closeModal:()=>{r(!1),n.current&&n.current(),l(null),a(""),n.current=null}}},Mr=(0,Qo.styled)(An)(({theme:e})=>({padding:"1rem",backgroundColor:e.palette.background.surfaces,overflowY:"auto",height:"100%",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"},"-ms-overflow-style":"none"})),Bge=(0,Qo.styled)("div",{shouldForwardProp:e=>e!=="variant"})(({theme:e,variant:t,hasHelpText:r})=>({background:t==="filled"?e.palette.mode==="light"?Si.fotter:Ti.fotter:"transparent",display:"flex",alignItems:"center",justifyContent:r?"space-between":"end",padding:"1rem",gap:"1rem","&& .InfoCircleIcon":{color:t==="filled"?e.palette.common.white:e.palette.background.info?.default}})),Lr=({open:e,closeModal:t,title:r,headerIcon:o,reactNode:a,children:n,maxWidth:i="xs",isFullScreenModeAllowed:l,...s})=>{let[u,f]=(0,Ru.useState)(!1),d=()=>{f(p=>!p)};return(0,kr.jsxs)(Dge,{maxWidth:i,open:e,onClose:t,"aria-labelledby":"alert-dialog-slide-title","aria-describedby":"alert-dialog-slide-description",fullScreen:u,fullWidth:!u,...s,children:[r&&(0,kr.jsxs)(Mm,{children:[o&&o,(0,kr.jsx)(z,{component:"div",variant:"h6",children:r}),(0,kr.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"1rem"},children:[l&&(0,kr.jsx)(xe,{title:u?"Exit Fullscreen":"Enter Fullscreen",children:u?(0,kr.jsx)(Nge,{onClick:d}):(0,kr.jsx)(Fge,{onClick:d})}),(0,kr.jsx)(Ou,{onClick:t,children:(0,kr.jsx)(Ft,{..._d,fill:"#fff"})})]})]}),a&&a,n&&n]})},io=({helpText:e,children:t,variant:r})=>(0,kr.jsxs)(Bge,{variant:r,hasHelpText:!!e,children:[e&&(0,kr.jsx)(xe,{title:e,variant:"standard",placement:"top",children:(0,kr.jsx)(tt,{children:(0,kr.jsx)(G2,{...Jr,className:"InfoCircleIcon"})})}),t]}),un=(0,Qo.styled)(CT)(({theme:e})=>({backgroundColor:e.palette.background.brand?.default,color:e.palette.text.constant?.white,"&:hover":{background:e.palette.background.brand?.hover},"&.MuiButton-contained.Mui-disabled":{color:e.palette.text.constant?.disabled,backgroundColor:e.palette.background.constant?.disabled}})),fn=(0,Qo.styled)(vA)(({theme:e})=>({"&.MuiButton-outlined":{border:`1px solid ${e.palette.background.constant?.white}`,color:e.palette.text.constant?.white,backgroundColor:"transparent","&:hover":{background:"transparent",color:e.palette.text.constant?.white}},"&.MuiButton-outlined.Mui-disabled":{color:e.palette.text.disabled,border:"none",backgroundColor:e.palette.background.brand?.disabled}})),XW=(0,Qo.styled)(wA)(({theme:e})=>({color:e.palette.text.inverse})),JW=(0,Qo.styled)(CT)(({theme:e})=>({backgroundColor:e.palette.background.error?.default,color:e.palette.text.constant?.white,"&:hover":{background:e.palette.background.error?.hover}})),Hge=(0,Qo.styled)($)(()=>({width:"100%",display:"flex",justifyContent:"end",gap:"1rem"})),Xd=({primaryText:e,secondaryText:t,primaryButtonProps:r,secondaryButtonProps:o})=>(0,kr.jsxs)(Hge,{children:[(0,kr.jsx)(fn,{...o,children:t}),(0,kr.jsx)(un,{...r,children:e})]});var Jd=require("@mui/material");var eq=(0,Jd.styled)("div")(({theme:e})=>({backgroundColor:e.palette.background.surfaces})),tq=(0,Jd.styled)("div")(()=>({zIndex:"100",borderRadius:"5px"})),rq=(0,Jd.styled)("div")(()=>({padding:"1.25rem 1rem",display:"flex",justifyContent:"flex-end",background:"linear-gradient(90deg, #3B687B 0%, #507D90 100%)",boxShadow:"inset 0px 3px 5px 0px rgba(0,0,0,0.25)",position:"relative",zIndex:"100"})),oq=(0,Jd.styled)(z)({fontSize:"18px"}),aq=(0,Jd.styled)("div")(()=>({display:"flex",borderRadius:"5px 5px 0px 0px",justifyContent:"space-between",padding:"11px 16px",height:"52px",fill:Pt,boxShadow:"inset 0px -1px 3px 0px rgba(0,0,0,0.2)",background:"linear-gradient(90deg, #3B687B 0%, #507D90 100%)"}));var bo=require("react/jsx-runtime");function Vge({title:e,leftHeaderIcon:t,helpText:r,helpArea:o,actions:a,hideActions:n=!1,content:i,closeComponent:l}){return(0,bo.jsxs)(tq,{children:[(0,bo.jsxs)(aq,{children:[t&&(0,bo.jsx)("div",{style:{display:"flex",alignItems:"center"},children:t}),e&&(0,bo.jsx)(bo.Fragment,{children:(0,bo.jsx)("div",{style:{display:"flex",alignItems:"center",color:"white"},children:(0,bo.jsx)(oq,{children:e})})}),(0,bo.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[r&&(0,bo.jsx)(bo.Fragment,{children:o}),l]})]}),(0,bo.jsx)(eq,{children:i}),!n&&(0,bo.jsx)(rq,{children:a})]})}var Lm=Vge;var Tt=require("@mui/material");var nq=(0,Tt.styled)("div")({cursor:"pointer",width:"30px",height:"30px",display:"flex",alignItems:"center",fill:gi}),Uge={"bottom-center":{open:{bottom:"0px",left:"50%",transform:"translateX(-50%)"},closed:{bottom:"-42%",left:"50%",transform:"translateX(-50%)"}},"bottom-right":{open:{bottom:"0px",right:"10px"},closed:{bottom:"-448px",right:"10px"}},"bottom-left":{open:{bottom:"0px",left:"10px"},closed:{bottom:"-448px",left:"10px"}},"right-top":{open:{top:"0px",right:"0px"},closed:{top:"0px",right:"-448px"}},"right-middle":{open:{top:"50%",right:"0px",transform:"translateY(-50%)"},closed:{top:"50%",right:"-448px",transform:"translateY(-50%)"}},"right-bottom":{open:{bottom:"0px",right:"0px"},closed:{bottom:"0px",right:"-448px"}}},iq=(0,Tt.styled)(Tt.Box)(({isOpen:e,renderPosition:t})=>({position:"fixed",transition:"all 0.5s ease",...Uge[t][e?"open":"closed"]})),lq=(0,Tt.styled)("div")({display:"flex",flexDirection:"column",justifyContent:"center",transition:"bottom 0.5s ease",padding:"1.688rem 1.188rem",width:"28rem",height:"12rem"}),sq=(0,Tt.styled)("div")({display:"flex",alignItems:"center",paddingTop:"0.5px",height:"20px",width:"21.188rem"}),uq=(0,Tt.styled)("div")({width:"24px",height:"24px"}),iut=(0,Tt.styled)(Tt.Button)(({isOpen:e})=>({color:"white",width:"4.313rem",height:"2.25rem",textTransform:"none",boxShadow:"0px 1px 8px rgba(0, 0, 0, 0.25)",backgroundColor:e?$s.main:Ze,"&:hover":{backgroundColor:GM}})),fq=(0,Tt.styled)(Tt.Button)(({theme:e,renderPosition:t})=>({backgroundColor:Xf,color:gi,borderRadius:"5px",padding:"10px 20px",fontSize:"16px",transition:"bottom 0.5s ease",position:"fixed",...Wge[t],"&:hover":{backgroundColor:e.palette.mode==="dark"?Tr:"#213A45"}})),Wge={"bottom-center":{bottom:"-10px",left:"50%",transform:"translateX(-50%)"},"bottom-right":{bottom:"-10px",right:"10px"},"bottom-left":{bottom:"-10px",left:"10px"},"right-top":{top:"8%",right:"-45px",transform:"rotate(-90deg)"},"right-middle":{top:"50%",right:"-45px",transform:"rotate(-90deg)"},"right-bottom":{bottom:"10%",right:"-45px",transform:"rotate(-90deg)"}},dq=(0,Tt.styled)("div")(({theme:e})=>({display:"block",right:"0",backgroundColor:e.palette.mode==="dark"?"#333333":gi,bottom:"0",width:"100%",zIndex:"100",position:"relative",height:"100%",alignItems:"center",transition:"bottom 0.5s ease"})),pq=(0,Tt.styled)(Tt.Box)(({isOpen:e,theme:t})=>({position:"relative",bottom:e?"0px":"-240px",right:"0",color:t.palette.text.default,backgroundColor:t.palette.mode==="dark"?js:Pt,border:`1px solid ${QM}`,padding:"20px",width:"28rem",height:"333.5px",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",transition:"bottom 0.5s ease",fontSize:"1.5rem",textAlign:"center"})),mq=(0,Tt.styled)(Tt.Box)({display:"flex",justifyContent:"space-between",alignSelf:"center"}),cq=(0,Tt.styled)(Tt.Button)(({theme:e,isOpen:t})=>({fontSize:"16px",lineHeight:1,letterSpacing:"0.029em",textTransform:"none",width:"100%",height:"5rem",display:"flex",padding:"0rem",borderRadius:"0px",flexDirection:"column",borderBottom:t?`2px solid ${Ze}`:"",background:t?e.palette.mode==="dark"?Tr:ha:e.palette.mode==="dark"?js:Bl,color:t?e.palette.mode==="dark"?ha:Tr:e.palette.mode==="dark"?ha:ha,fill:t?e.palette.icon.default:ha,stroke:t?e.palette.icon.inverse:e.palette.icon.brand,"&:hover":{color:e.palette.text.default,backgroundColor:e.palette.background.hover,fill:e.palette.icon.default}})),xq=(0,Tt.styled)("textarea")(({theme:e})=>({width:"100%",background:"transparent",border:`1px solid ${Ks}`,borderRadius:"4px",color:e.palette.mode==="dark"?ha:Tr,fontSize:"16px",paddingTop:"10.5px",paddingBottom:"10.5px",paddingLeft:"0.6rem",paddingRight:"0.6rem",resize:"none",fontFamily:"inherit",fontStyle:"normal","&::placeholder":{color:e.palette.mode==="dark"?ha:js},"&:focus":{outline:`1px solid ${ko}`}})),hq=(0,Tt.styled)("div")(({theme:e})=>({display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"space-between",height:"137px",color:e.palette.text.default})),gq=(0,Tt.styled)("a")({textDecoration:"underline",color:"inherit","&:hover":{color:"inherit"}}),Tq=(0,Tt.styled)(Tt.Checkbox)({color:`${Pt} !important`,marginLeft:"-11px",paddingLeft:"0px"}),Sq=(0,Tt.styled)("div")({padding:"1.5rem 1rem",width:"28rem",height:"12rem"}),Cq=(0,Tt.styled)("div")({padding:"0px",width:"30px",height:"30px",display:"flex",alignItems:"center"});var Le=require("react/jsx-runtime"),qge="Some account and system information may be sent to Layer5. We will use it to fix problems and improve our services, subject to our [Privacy Policy](https://layer5.io/company/legal/privacy) and [Terms of Service](https://layer5.io/company/legal/terms-of-service). We may email you for more information or updates.",xC=[{icon:(0,Le.jsx)(P1,{}),label:"Issue",placeholder:"I\u2019m having an issue with...",isTextInput:!0},{icon:(0,Le.jsx)(Z2,{}),label:"Suggestion",placeholder:"I have a suggestion about...",isTextInput:!0},{icon:(0,Le.jsx)(z2,{}),label:"Meet Request",isTextInput:!1,innerComponent:(0,Le.jsxs)(hq,{children:[(0,Le.jsxs)(p3.default,{style:{lineHeight:"2.5",textAlign:"center"},children:["Need help or have more feedback than fits here?",(0,Le.jsx)("br",{})," Meet with us."]}),(0,Le.jsx)(gq,{target:"_blank",href:"https://calendar.google.com/calendar/appointments/schedules/AcZssZ3pmcApaDP4xd8hvG5fy8ylxuFxD3akIRc5vpWJ60q-HemQi80SFFAVftbiIsq9pgiA2o8yvU56",children:"Select a time convenient for you."})]})}],Gge=({onSubmit:e,containerStyles:t,feedbackOptionStyles:r,renderPosition:o,defaultMessage:a=void 0,defaultOpen:n=!1})=>{let[i,l]=(0,ep.useState)(n),[s,u]=(0,ep.useState)(!1),[f,d]=(0,ep.useState)(xC[0]),[p,m]=(0,ep.useState)(a),[x,h]=(0,ep.useState)(!!a);return(0,Le.jsxs)(Le.Fragment,{children:[(0,Le.jsx)(fq,{onClick:()=>{l(!i),d(xC[0]),u(!1),m("")},style:t,renderPosition:o,children:"Feedback"}),(0,Le.jsx)(iq,{isOpen:i,style:t,renderPosition:o,children:s?(0,Le.jsxs)(pq,{isOpen:i,children:[(0,Le.jsx)(l5,{width:"32",height:"32"}),"Submitting your feedback..."]}):(0,Le.jsx)(Le.Fragment,{children:(0,Le.jsx)(Lm,{onClose:()=>{},open:!0,closeComponent:(0,Le.jsx)(nq,{onClick:()=>l(!1),children:(0,Le.jsx)(Ft,{width:"30",height:"30",fill:gi})}),actions:(0,Le.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,Le.jsxs)(sq,{children:[(0,Le.jsx)(Tq,{checked:x,onChange:R=>{h(R.target.checked)}}),(0,Le.jsx)(p3.default,{style:{color:"white",fontSize:"12px",height:"15px"},children:"We may email you for more information or updates"})]}),(0,Le.jsx)(un,{type:"submit",disabled:!(p&&x),isOpen:!(p&&x),onClick:()=>{u(!0),p&&x&&e({label:f?.label||"",message:p}),setTimeout(()=>{l(!1),d(void 0),u(!1),m("")},2e3)},children:"Send"})]}),leftHeaderIcon:(0,Le.jsx)(P1,{}),title:"Feedback",helpArea:(0,Le.jsx)(xe,{placement:"top",title:qge,arrow:!0,children:(0,Le.jsx)(Cq,{children:(0,Le.jsx)(n5,{width:"30",height:"30"})})}),helpText:"Help",content:(0,Le.jsxs)(dq,{children:[(0,Le.jsx)(mq,{children:xC?.map(R=>(0,Le.jsxs)(cq,{style:r,type:"button",onClick:()=>{d(R)},isOpen:f?.label===R.label,children:[(0,Le.jsx)(uq,{children:R.icon}),(0,Le.jsx)(p3.default,{children:R.label})]},R.label))}),f?.isTextInput?(0,Le.jsx)(lq,{children:(0,Le.jsx)(xq,{value:p||"",onChange:R=>{m(R.target.value)},required:!0,placeholder:f.placeholder,rows:5,cols:30})}):(0,Le.jsx)(Sq,{children:f?.innerComponent})]})})})})]})},hC=Gge;var Fm=require("@mui/material"),Au=G(require("react"));var Dm=require("react/jsx-runtime");function yq(e,t){if(!e||e.length!=2)throw Error("FlipCard requires exactly two child components");return e[t]}var zge=(0,Fm.styled)("div")(({theme:e})=>({height:"100%",backgroundColor:"transparent",perspective:e.spacing(125)})),jge=(0,Fm.styled)("div")(({theme:e})=>({padding:e.spacing(2),borderRadius:e.spacing(1),transformStyle:"preserve-3d",boxShadow:"0 4px 8px 0 rgba(0,0,0,0.2)",backgroundColor:e.palette.mode==="dark"?u1:Pt,cursor:"pointer",transformOrigin:"50% 50% 10%"})),Kge=(0,Fm.styled)("div")({backfaceVisibility:"hidden"}),$ge=(0,Fm.styled)("div")({backfaceVisibility:"hidden",transform:"scale(-1, 1)",wordBreak:"break-word"});function Nm({duration:e=500,onClick:t,onShow:r,children:o,disableFlip:a=!1,padding:n}){let[i,l]=Au.default.useState(!1),[s,u]=Au.default.useState(!1),f=Au.default.useRef(null),d=yq(o,0),p=yq(o,1);return Au.default.useEffect(()=>{f.current&&clearTimeout(f.current),f.current=setTimeout(()=>{u(i)},e/6)},[i,e]),(0,Dm.jsx)(zge,{onClick:()=>{a||(l(m=>!m),t&&t(),r&&r())},children:(0,Dm.jsx)(jge,{style:{transform:i?"scale(-1,1)":void 0,transition:`transform ${e}ms`,padding:n},children:s?(0,Dm.jsx)($ge,{children:Au.default.isValidElement(p)?p:null}):(0,Dm.jsx)(Kge,{children:Au.default.isValidElement(d)?d:null})})})}var Pu=require("@mui/material"),bq=G(require("lodash")),vq=require("react");var ms=require("react/jsx-runtime"),Bm=({id:e})=>{let[t,r]=(0,vq.useState)(!1),o=(0,b.useTheme)(),a=i=>{i.stopPropagation(),navigator.clipboard.writeText(e),r(!0),setTimeout(()=>{r(!1)},2e3)},n=bq.default.truncate(e,{length:15});return(0,ms.jsxs)(Pu.Box,{sx:{display:"flex",alignItems:"center"},children:[(0,ms.jsx)(Pu.Tooltip,{title:e,placement:"top",children:(0,ms.jsx)(Pu.Typography,{variant:"body2",style:{cursor:"pointer",textWrap:"nowrap",color:o.palette.text.primary},children:n})}),(0,ms.jsx)(Pu.Tooltip,{title:t?"Copied!":"Copy",placement:"top",children:(0,ms.jsx)("div",{onClick:a,style:{padding:"0.25rem"},children:(0,ms.jsx)(Ta,{width:16,height:16,fill:o.palette.action.active})})})]})};var gC=G(require("react"));function wq(){let{innerWidth:e,innerHeight:t}=window;return{width:e,height:t}}function Xo(){let[e,t]=gC.default.useState(wq());return gC.default.useEffect(()=>{let r;function o(){r&&clearTimeout(r),r=window.setTimeout(()=>{t(wq())},500)}return window.addEventListener("resize",o),()=>{window.removeEventListener("resize",o),r&&clearTimeout(r)}},[]),e}var we=G(require("react")),rTe=require("react-dom");function Eq(e){var t,r,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(r=Eq(e[t]))&&(o&&(o+=" "),o+=r);else for(t in e)e[t]&&(o&&(o+=" "),o+=t);return o}function Yge(){for(var e,t,r=0,o="";r<arguments.length;)(e=arguments[r++])&&(t=Eq(e))&&(o&&(o+=" "),o+=t);return o}var Hm=Yge;var Zge={data:""},Qge=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||Zge;var Xge=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,Jge=/\/\*[^]*?\*\/| +/g,Rq=/\n+/g,_u=(e,t)=>{let r="",o="",a="";for(let n in e){let i=e[n];n[0]=="@"?n[1]=="i"?r=n+" "+i+";":o+=n[1]=="f"?_u(i,n):n+"{"+_u(i,n[1]=="k"?"":t)+"}":typeof i=="object"?o+=_u(i,t?t.replace(/([^,])+/g,l=>n.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,s=>/&/.test(s)?s.replace(/&/g,l):l?l+" "+s:s)):n):i!=null&&(n=/^--/.test(n)?n:n.replace(/[A-Z]/g,"-$&").toLowerCase(),a+=_u.p?_u.p(n,i):n+":"+i+";")}return r+(t&&a?t+"{"+a+"}":a)+o},qi={},Oq=e=>{if(typeof e=="object"){let t="";for(let r in e)t+=r+Oq(e[r]);return t}return e},eTe=(e,t,r,o,a)=>{let n=Oq(e),i=qi[n]||(qi[n]=(s=>{let u=0,f=11;for(;u<s.length;)f=101*f+s.charCodeAt(u++)>>>0;return"go"+f})(n));if(!qi[i]){let s=n!==e?e:(u=>{let f,d,p=[{}];for(;f=Xge.exec(u.replace(Jge,""));)f[4]?p.shift():f[3]?(d=f[3].replace(Rq," ").trim(),p.unshift(p[0][d]=p[0][d]||{})):p[0][f[1]]=f[2].replace(Rq," ").trim();return p[0]})(e);qi[i]=_u(a?{["@keyframes "+i]:s}:s,r?"":"."+i)}let l=r&&qi.g?qi.g:null;return r&&(qi.g=qi[i]),((s,u,f,d)=>{d?u.data=u.data.replace(d,s):u.data.indexOf(s)===-1&&(u.data=f?s+u.data:u.data+s)})(qi[i],t,o,l),i},tTe=(e,t,r)=>e.reduce((o,a,n)=>{let i=t[n];if(i&&i.call){let l=i(r),s=l&&l.props&&l.props.className||/^go/.test(l)&&l;i=s?"."+s:l&&typeof l=="object"?l.props?"":_u(l,""):l===!1?"":l}return o+a+(i??"")},"");function m3(e){let t=this||{},r=e.call?e(t.p):e;return eTe(r.unshift?r.raw?tTe(r,[].slice.call(arguments,1),t.p):r.reduce((o,a)=>Object.assign(o,a&&a.call?a(t.p):a),{}):r,Qge(t.target),t.g,t.o,t.k)}var Lut=m3.bind({g:1}),Dut=m3.bind({k:1});function Aq(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function oTe(e,t,r){return t&&Aq(e.prototype,t),r&&Aq(e,r),e}function cs(){return cs=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},cs.apply(this,arguments)}function aTe(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function RC(e,t){if(e==null)return{};var r={},o=Object.keys(e),a,n;for(n=0;n<o.length;n++)a=o[n],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}var Pq=function(){return""},nTe=we.default.createContext({enqueueSnackbar:Pq,closeSnackbar:Pq}),Iu={downXs:"@media (max-width:599.95px)",upSm:"@media (min-width:600px)"};var c3="unmounted",tp="exited",rp="entering",Vm="entered",_q="exiting",OC=function(e){aTe(t,e);function t(o){var a;a=e.call(this,o)||this;var n=o.appear,i;return a.appearStatus=null,o.in?n?(i=tp,a.appearStatus=rp):i=Vm:o.unmountOnExit||o.mountOnEnter?i=c3:i=tp,a.state={status:i},a.nextCallback=null,a}t.getDerivedStateFromProps=function(a,n){var i=a.in;return i&&n.status===c3?{status:tp}:null};var r=t.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(a){var n=null;if(a!==this.props){var i=this.state.status;this.props.in?i!==rp&&i!==Vm&&(n=rp):(i===rp||i===Vm)&&(n=_q)}this.updateStatus(!1,n)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var a=this.props.timeout,n=a,i=a;return a!=null&&typeof a!="number"&&typeof a!="string"&&(i=a.exit,n=a.enter),{exit:i,enter:n}},r.updateStatus=function(a,n){a===void 0&&(a=!1),n!==null?(this.cancelNextCallback(),n===rp?this.performEnter(a):this.performExit()):this.props.unmountOnExit&&this.state.status===tp&&this.setState({status:c3})},r.performEnter=function(a){var n=this,i=this.props.enter,l=a,s=this.getTimeouts();if(!a&&!i){this.safeSetState({status:Vm},function(){n.props.onEntered&&n.props.onEntered(n.node,l)});return}this.props.onEnter&&this.props.onEnter(this.node,l),this.safeSetState({status:rp},function(){n.props.onEntering&&n.props.onEntering(n.node,l),n.onTransitionEnd(s.enter,function(){n.safeSetState({status:Vm},function(){n.props.onEntered&&n.props.onEntered(n.node,l)})})})},r.performExit=function(){var a=this,n=this.props.exit,i=this.getTimeouts();if(!n){this.safeSetState({status:tp},function(){a.props.onExited&&a.props.onExited(a.node)});return}this.props.onExit&&this.props.onExit(this.node),this.safeSetState({status:_q},function(){a.props.onExiting&&a.props.onExiting(a.node),a.onTransitionEnd(i.exit,function(){a.safeSetState({status:tp},function(){a.props.onExited&&a.props.onExited(a.node)})})})},r.cancelNextCallback=function(){this.nextCallback!==null&&this.nextCallback.cancel&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(a,n){n=this.setNextCallback(n),this.setState(a,n)},r.setNextCallback=function(a){var n=this,i=!0;return this.nextCallback=function(){i&&(i=!1,n.nextCallback=null,a())},this.nextCallback.cancel=function(){i=!1},this.nextCallback},r.onTransitionEnd=function(a,n){this.setNextCallback(n);var i=a==null&&!this.props.addEndListener;if(!this.node||i){setTimeout(this.nextCallback,0);return}this.props.addEndListener&&this.props.addEndListener(this.node,this.nextCallback),a!=null&&setTimeout(this.nextCallback,a)},r.render=function(){var a=this.state.status;if(a===c3)return null;var n=this.props,i=n.children,l=RC(n,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return i(a,l)},oTe(t,[{key:"node",get:function(){var a,n=(a=this.props.nodeRef)===null||a===void 0?void 0:a.current;if(!n)throw new Error("notistack - Custom snackbar is not refForwarding");return n}}]),t}(we.default.Component);function op(){}OC.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:op,onEntering:op,onEntered:op,onExit:op,onExiting:op,onExited:op};function Iq(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function wC(e,t){return(0,we.useMemo)(function(){return e==null&&t==null?null:function(r){Iq(e,r),Iq(t,r)}},[e,t])}function T3(e){var t=e.timeout,r=e.style,o=r===void 0?{}:r,a=e.mode;return{duration:typeof t=="object"?t[a]||0:t,easing:o.transitionTimingFunction,delay:o.transitionDelay}}var EC={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},Nq=function(t){t.scrollTop=t.scrollTop},kq=function(t){return Math.round(t)+"ms"};function ap(e,t){e===void 0&&(e=["all"]);var r=t||{},o=r.duration,a=o===void 0?300:o,n=r.easing,i=n===void 0?EC.easeInOut:n,l=r.delay,s=l===void 0?0:l,u=Array.isArray(e)?e:[e];return u.map(function(f){var d=typeof a=="string"?a:kq(a),p=typeof s=="string"?s:kq(s);return f+" "+d+" "+i+" "+p}).join(",")}function iTe(e){return e&&e.ownerDocument||document}function Bq(e){var t=iTe(e);return t.defaultView||window}function lTe(e,t){t===void 0&&(t=166);var r;function o(){for(var a=this,n=arguments.length,i=new Array(n),l=0;l<n;l++)i[l]=arguments[l];var s=function(){e.apply(a,i)};clearTimeout(r),r=setTimeout(s,t)}return o.clear=function(){clearTimeout(r)},o}function sTe(e,t){var r=t.getBoundingClientRect(),o=Bq(t),a;if(t.fakeTransform)a=t.fakeTransform;else{var n=o.getComputedStyle(t);a=n.getPropertyValue("-webkit-transform")||n.getPropertyValue("transform")}var i=0,l=0;if(a&&a!=="none"&&typeof a=="string"){var s=a.split("(")[1].split(")")[0].split(",");i=parseInt(s[4],10),l=parseInt(s[5],10)}switch(e){case"left":return"translateX("+(o.innerWidth+i-r.left)+"px)";case"right":return"translateX(-"+(r.left+r.width-i)+"px)";case"up":return"translateY("+(o.innerHeight+l-r.top)+"px)";default:return"translateY(-"+(r.top+r.height-l)+"px)"}}function x3(e,t){if(t){var r=sTe(e,t);r&&(t.style.webkitTransform=r,t.style.transform=r)}}var uTe=(0,we.forwardRef)(function(e,t){var r=e.children,o=e.direction,a=o===void 0?"down":o,n=e.in,i=e.style,l=e.timeout,s=l===void 0?0:l,u=e.onEnter,f=e.onEntered,d=e.onExit,p=e.onExited,m=RC(e,["children","direction","in","style","timeout","onEnter","onEntered","onExit","onExited"]),x=(0,we.useRef)(null),h=wC(r.ref,x),g=wC(h,t),T=function(v,P){x3(a,v),Nq(v),u&&u(v,P)},E=function(v){var P=i?.transitionTimingFunction||EC.easeOut,B=T3({timeout:s,mode:"enter",style:cs({},i,{transitionTimingFunction:P})});v.style.webkitTransition=ap("-webkit-transform",B),v.style.transition=ap("transform",B),v.style.webkitTransform="none",v.style.transform="none"},R=function(v){var P=i?.transitionTimingFunction||EC.sharp,B=T3({timeout:s,mode:"exit",style:cs({},i,{transitionTimingFunction:P})});v.style.webkitTransition=ap("-webkit-transform",B),v.style.transition=ap("transform",B),x3(a,v),d&&d(v)},k=function(v){v.style.webkitTransition="",v.style.transition="",p&&p(v)},D=(0,we.useCallback)(function(){x.current&&x3(a,x.current)},[a]);return(0,we.useEffect)(function(){if(!(n||a==="down"||a==="right")){var C=lTe(function(){x.current&&x3(a,x.current)}),v=Bq(x.current);return v.addEventListener("resize",C),function(){C.clear(),v.removeEventListener("resize",C)}}},[a,n]),(0,we.useEffect)(function(){n||D()},[n,D]),(0,we.createElement)(OC,Object.assign({appear:!0,nodeRef:x,onEnter:T,onEntered:f,onEntering:E,onExit:R,onExited:k,in:n,timeout:s},m),function(C,v){return(0,we.cloneElement)(r,cs({ref:g,style:cs({visibility:C==="exited"&&!n?"hidden":void 0},i,{},r.props.style)},v))})});uTe.displayName="Slide";function S3(e){return Object.entries(e).reduce(function(t,r){var o,a=r[0],n=r[1];return cs({},t,(o={},o[a]=m3(n),o))},{})}var qm={SnackbarContainer:"notistack-SnackbarContainer",Snackbar:"notistack-Snackbar",CollapseWrapper:"notistack-CollapseWrapper",MuiContent:"notistack-MuiContent",MuiContentVariant:function(t){return"notistack-MuiContent-"+t}},Mq=S3({root:{height:0},entered:{height:"auto"}}),TC="0px",SC=175,fTe=(0,we.forwardRef)(function(e,t){var r=e.children,o=e.in,a=e.onExited,n=(0,we.useRef)(null),i=(0,we.useRef)(null),l=wC(t,i),s=function(){return n.current?n.current.clientHeight:0},u=function(h){h.style.height=TC},f=function(h){var g=s(),T=T3({timeout:SC,mode:"enter"}),E=T.duration,R=T.easing;h.style.transitionDuration=typeof E=="string"?E:E+"ms",h.style.height=g+"px",h.style.transitionTimingFunction=R||""},d=function(h){h.style.height="auto"},p=function(h){h.style.height=s()+"px"},m=function(h){Nq(h);var g=T3({timeout:SC,mode:"exit"}),T=g.duration,E=g.easing;h.style.transitionDuration=typeof T=="string"?T:T+"ms",h.style.height=TC,h.style.transitionTimingFunction=E||""};return(0,we.createElement)(OC,{in:o,unmountOnExit:!0,onEnter:u,onEntered:d,onEntering:f,onExit:p,onExited:a,onExiting:m,nodeRef:i,timeout:SC},function(x,h){return(0,we.createElement)("div",Object.assign({ref:l,className:Hm(Mq.root,x==="entered"&&Mq.entered),style:cs({pointerEvents:"all",overflow:"hidden",minHeight:TC,transition:ap("height")},x==="entered"&&{overflow:"visible"},{},x==="exited"&&!o&&{visibility:"hidden"})},h),(0,we.createElement)("div",{ref:n,className:qm.CollapseWrapper,style:{display:"flex",width:"100%"}},r))})});fTe.displayName="Collapse";var dTe=typeof window<"u"?we.useLayoutEffect:we.useEffect;function Lq(e){var t=(0,we.useRef)(e);return dTe(function(){t.current=e}),(0,we.useCallback)(function(){return t.current.apply(void 0,arguments)},[])}var pTe=(0,we.forwardRef)(function(e,t){var r=e.children,o=e.className,a=e.autoHideDuration,n=e.disableWindowBlurListener,i=n===void 0?!1:n,l=e.onClose,s=e.id,u=e.open,f=e.SnackbarProps,d=f===void 0?{}:f,p=(0,we.useRef)(),m=Lq(function(){l&&l.apply(void 0,arguments)}),x=Lq(function(R){!l||R==null||(p.current&&clearTimeout(p.current),p.current=setTimeout(function(){m(null,"timeout",s)},R))});(0,we.useEffect)(function(){return u&&x(a),function(){p.current&&clearTimeout(p.current)}},[u,a,x]);var h=function(){p.current&&clearTimeout(p.current)},g=(0,we.useCallback)(function(){a!=null&&x(a*.5)},[a,x]),T=function(k){d.onMouseEnter&&d.onMouseEnter(k),h()},E=function(k){d.onMouseLeave&&d.onMouseLeave(k),g()};return(0,we.useEffect)(function(){if(!i&&u)return window.addEventListener("focus",g),window.addEventListener("blur",h),function(){window.removeEventListener("focus",g),window.removeEventListener("blur",h)}},[i,g,u]),(0,we.createElement)("div",Object.assign({ref:t},d,{className:Hm(qm.Snackbar,o),onMouseEnter:T,onMouseLeave:E}),r)});pTe.displayName="Snackbar";var CC,mTe=S3({root:(CC={display:"flex",flexWrap:"wrap",flexGrow:1},CC[Iu.upSm]={flexGrow:"initial",minWidth:"288px"},CC)}),Hq=(0,we.forwardRef)(function(e,t){var r=e.className,o=RC(e,["className"]);return we.default.createElement("div",Object.assign({ref:t,className:Hm(mTe.root,r)},o))});Hq.displayName="SnackbarContent";var Um=S3({root:{backgroundColor:"#313131",fontSize:"0.875rem",lineHeight:1.43,letterSpacing:"0.01071em",color:"#fff",alignItems:"center",padding:"6px 16px",borderRadius:"4px",boxShadow:"0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)"},lessPadding:{paddingLeft:8*2.5+"px"},default:{backgroundColor:"#313131"},success:{backgroundColor:"#43a047"},error:{backgroundColor:"#d32f2f"},warning:{backgroundColor:"#ff9800"},info:{backgroundColor:"#2196f3"},message:{display:"flex",alignItems:"center",padding:"8px 0"},action:{display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:"16px",marginRight:"-8px"}}),Dq="notistack-snackbar",cTe=(0,we.forwardRef)(function(e,t){var r=e.id,o=e.message,a=e.action,n=e.iconVariant,i=e.variant,l=e.hideIconVariant,s=e.style,u=e.className,f=n[i],d=a;return typeof d=="function"&&(d=d(r)),we.default.createElement(Hq,{ref:t,role:"alert","aria-describedby":Dq,style:s,className:Hm(qm.MuiContent,qm.MuiContentVariant(i),Um.root,Um[i],u,!l&&f&&Um.lessPadding)},we.default.createElement("div",{id:Dq,className:Um.message},l?null:f,o),d&&we.default.createElement("div",{className:Um.action},d))});cTe.displayName="MaterialDesignContent";var Wm,yC,h3,g3,bC,Gi={view:{default:20,dense:4},snackbar:{default:6,dense:2}},Fq="."+qm.CollapseWrapper,vC=16,Hut=S3({root:(Wm={boxSizing:"border-box",display:"flex",maxHeight:"100%",position:"fixed",zIndex:1400,height:"auto",width:"auto",transition:ap(["top","right","bottom","left","max-width"],{duration:300,easing:"ease"}),pointerEvents:"none"},Wm[Fq]={padding:Gi.snackbar.default+"px 0px",transition:"padding 300ms ease 0ms"},Wm.maxWidth="calc(100% - "+Gi.view.default*2+"px)",Wm[Iu.downXs]={width:"100%",maxWidth:"calc(100% - "+vC*2+"px)"},Wm),rootDense:(yC={},yC[Fq]={padding:Gi.snackbar.dense+"px 0px"},yC),top:{top:Gi.view.default-Gi.snackbar.default+"px",flexDirection:"column"},bottom:{bottom:Gi.view.default-Gi.snackbar.default+"px",flexDirection:"column-reverse"},left:(h3={left:Gi.view.default+"px"},h3[Iu.upSm]={alignItems:"flex-start"},h3[Iu.downXs]={left:vC+"px"},h3),right:(g3={right:Gi.view.default+"px"},g3[Iu.upSm]={alignItems:"flex-end"},g3[Iu.downXs]={right:vC+"px"},g3),center:(bC={left:"50%",transform:"translateX(-50%)"},bC[Iu.upSm]={alignItems:"center"},bC)});var Vut=process.env.NODE_ENV!=="production";var Vq=function(){return(0,we.useContext)(nTe)};var AC=G(require("react")),xTe=()=>{let[e,t]=AC.default.useState(""),{enqueueSnackbar:r}=Vq();return AC.default.useEffect(()=>{e&&(r(e),t(""))},[e,r]),(a,n)=>{t(a),n&&r(a,n)}},PC=xTe;var Jo=(e,t)=>{let r={};return e.forEach(o=>{o[1]==="na"?r[o[0]]=!1:t>1140?r[o[0]]=!0:t>=915&&t<1140?["xs","s","m","l","xl"].includes(o[1])?r[o[0]]=!0:r[o[0]]=!1:t>=775&&t<915?["xs","s","m","l"].includes(o[1])?r[o[0]]=!0:r[o[0]]=!1:t>=690&&t<775?["xs","s","m"].includes(o[1])?r[o[0]]=!0:r[o[0]]=!1:t>=585&&t<690?["xs","s"].includes(o[1])?r[o[0]]=!0:r[o[0]]=!1:t<585&&(o[1]==="xs"?r[o[0]]=!0:r[o[0]]=!1)}),r};var zn=require("@mui/material/styles");var Uq=(0,zn.styled)("div")({width:"28rem",height:"16rem",margin:"auto",borderRadius:"1rem"}),Wq=(0,zn.styled)("div")(({theme:e})=>({cursor:"pointer",transition:"all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.1s","&:hover":{boxShadow:`${e.palette.background.brand?.default} 0px 0px 19px 6px`},backgroundColor:e.palette.mode==="light"?Pt:Tr})),qq=(0,zn.styled)("a")({color:"black",textDecoration:"none"}),_C=(0,zn.styled)("div")(({theme:e})=>({borderTop:`5px solid ${e.palette.background.brand?.default}`,borderRadius:"0.25rem",minHeight:"16rem",display:"flex",flexDirection:"column",justifyContent:"space-between",boxShadow:"0px 0.75rem 1rem 0.25rem rgba(0, 0, 0, 0.12)",position:"relative",transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"})),Gq=(0,zn.styled)("div")(({theme:e})=>({background:e.palette.mode==="light"?O2:Vl,transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"})),IC=(0,zn.styled)("div")(({theme:e})=>({display:"flex",padding:"1rem","& span":{border:`1px solid ${e.palette.primary.dark}`,color:e.palette.text.primary,borderRadius:"0.8rem",padding:"0.05rem 0.75rem",fontSize:"1rem",transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"},"& h3":{color:e.palette.text.primary,transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"}})),kC=(0,zn.styled)("div")(({theme:e})=>({padding:"0 1rem",".summary":{color:e.palette.grey[700],transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"},p:{fontSize:"1rem"}})),zq=(0,zn.styled)("div")(({theme:e})=>({padding:"0 1rem",position:"absolute",bottom:"0rem",p:{fontSize:"1rem",color:e.palette.text.primary,fontWeight:600,transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"}})),MC=(0,zn.styled)("div")({textAlign:"center",position:"absolute",bottom:"0.1rem",right:"0.75rem",opacity:.2,img:{height:"8.5rem",width:"8.5rem"}});var Ke=require("react/jsx-runtime"),hTe=({path:e,children:t})=>e?(0,Ke.jsx)(qq,{href:e,children:t}):(0,Ke.jsx)(Ke.Fragment,{children:t}),gTe=({tutorial:e,path:t,courseCount:r,courseType:o})=>(0,Ke.jsx)(Uq,{children:e.frontmatter.disabled==="yes"?(0,Ke.jsx)(Gq,{children:(0,Ke.jsx)(_C,{style:{borderTop:`5px solid ${e.frontmatter.themeColor}`},children:(0,Ke.jsxs)("div",{children:[(0,Ke.jsxs)(IC,{children:[(0,Ke.jsx)("h3",{children:e.frontmatter.title?e.frontmatter.title:e.frontmatter.courseTitle}),(0,Ke.jsx)("div",{style:{whiteSpace:"nowrap"},children:(0,Ke.jsx)("span",{children:"Coming Soon"})})]}),(0,Ke.jsx)(kC,{children:(0,Ke.jsx)("p",{className:"summary",children:e.frontmatter.description})}),(0,Ke.jsx)(MC,{children:(0,Ke.jsx)("img",{src:e.frontmatter.cardImage,alt:e.frontmatter.title})})]})})}):(0,Ke.jsx)(hTe,{path:t,children:(0,Ke.jsx)(Wq,{children:(0,Ke.jsx)(_C,{style:{borderTop:`5px solid ${e.frontmatter.themeColor}`},children:(0,Ke.jsxs)("div",{children:[(0,Ke.jsxs)(IC,{children:[(0,Ke.jsx)("h3",{children:e.frontmatter.title?e.frontmatter.title:e.frontmatter.courseTitle}),e.frontmatter.status?(0,Ke.jsx)("p",{children:(0,Ke.jsx)("span",{children:"New"})}):null]}),(0,Ke.jsx)(kC,{children:(0,Ke.jsx)("p",{className:"summary",children:e.frontmatter.description})}),(0,Ke.jsx)(zq,{className:"card-subdata",children:(0,Ke.jsxs)("p",{children:[r," ",o,r>1?"s":""]})}),(0,Ke.jsx)(MC,{children:(0,Ke.jsx)("img",{src:e.frontmatter.cardImage})})]})})})})}),LC=gTe;var xs=require("react");var DC=require("@mui/material");var jq=(0,DC.styled)(Il)(()=>({minWidth:400,overflowWrap:"anywhere",textAlign:"center",padding:"5px"})),Kq=(0,DC.styled)($)(()=>({display:"flex",justifyContent:"end",width:"100%",gap:"10px"}));var ea=require("react/jsx-runtime"),Gm={WARNING:"warning",DANGER:"error",SUCCESS:"success",INFO:"info"},$q=(0,xs.forwardRef)(({variant:e},t)=>{let[r,o]=(0,xs.useState)({isOpen:!1,title:"",subtitle:"",primaryOption:"",showInfoIcon:"",variant:e,headerIcon:void 0,isChecked:!1,showCheckbox:!1}),a=(0,xs.useRef)({resolve:()=>{},reject:()=>{}}),n=(0,b.useTheme)(),i=E=>new Promise((R,k)=>{a.current={resolve:R,reject:k},o({...E,isOpen:!0,showInfoIcon:E.showInfoIcon||"",showCheckbox:!!E.showCheckbox})}),l=()=>{o(E=>({...E,isOpen:!1}))},s=()=>{o(E=>({...E,isChecked:!E.isChecked}))},u=()=>!!r.isChecked;(0,xs.useImperativeHandle)(t,()=>({show:i,getCheckboxState:u}));let{isOpen:f,primaryOption:d,title:p,subtitle:m,showInfoIcon:x,headerIcon:h,showCheckbox:g}=r,{resolve:T}=a.current;return(0,ea.jsxs)(Lr,{open:f,closeModal:l,title:p,id:"searchClick",headerIcon:h,reactNode:void 0,children:[m&&(0,ea.jsxs)(Mr,{children:[(0,ea.jsx)(jq,{id:"alert-dialog-description",variant:"body1",component:"div",children:(0,ea.jsx)(z,{variant:"body1",component:"div",style:{color:n.palette.text.primary},children:m})}),g&&(0,ea.jsx)(Ml,{control:(0,ea.jsx)(Yr,{checked:u(),onChange:s,color:"primary"}),label:(0,ea.jsx)("span",{style:{fontSize:"1rem"},children:"Do not show again"})})]}),(0,ea.jsx)(io,{variant:"filled",helpText:x,children:(0,ea.jsxs)(Kq,{children:[(0,ea.jsx)(fn,{onClick:()=>{l(),T("CANCEL")},children:"Cancel"}),(0,ea.jsx)(un,{onClick:()=>{l(),T(d)},style:r.variant&&{backgroundColor:n.palette.background[r.variant]?.default,textTransform:"capitalize"},type:"submit",children:d})]})})]})});$q.displayName="PromptComponent";var C3=$q;var np=C3;var FC=require("@mui/material/OutlinedInput"),y3=require("@mui/material/styles"),Yq=G(require("lodash/debounce")),zm=G(require("react"));var jn=require("react/jsx-runtime"),TTe=e=>(0,y3.createTheme)({typography:{fontFamily:e.typography.fontFamily},components:{MuiTextField:{styleOverrides:{root:{"--TextField-brandBorderColor":e.palette.border.strong,"--TextField-brandBorderHoverColor":e.palette.background.graphics?.default,"--TextField-brandBorderFocusedColor":e.palette.background.graphics?.default,"& label.Mui-focused":{color:"var(--TextField-brandBorderFocusedColor)"}}}},MuiOutlinedInput:{styleOverrides:{notchedOutline:{borderColor:"var(--TextField-brandBorderColor)"},root:{[`&:hover .${FC.outlinedInputClasses.notchedOutline}`]:{borderColor:"var(--TextField-brandBorderHoverColor)"},[`&.Mui-focused .${FC.outlinedInputClasses.notchedOutline}`]:{borderColor:"var(--TextField-brandBorderFocusedColor)"}}}},MuiInput:{styleOverrides:{root:{color:e.palette.text.default,"&::before":{borderBottom:"2px solid var(--TextField-brandBorderColor)"},"&:hover:not(.Mui-disabled, .Mui-error):before":{borderBottom:"2px solid var(--TextField-brandBorderHoverColor)"},"&.Mui-focused:after":{borderBottom:"2px solid var(--TextField-brandBorderFocusedColor)"}}}},MuiButton:{styleOverrides:{root:{lineHeight:"auto"}}}}});function STe({onSearch:e,placeholder:t,onClear:r,expanded:o,setExpanded:a}){let[n,i]=zm.default.useState(""),l=zm.default.useRef(null),s=(0,b.useTheme)(),u=(0,zm.useCallback)((0,Yq.default)(m=>{e(m)},300),[e]),f=m=>{let x=m.target.value;i(x),u(x)},d=m=>{m.stopPropagation(),u(""),i(""),a(!1),r&&r()},p=m=>{m.stopPropagation(),o?(u(""),i(""),a(!1)):(a(!0),setTimeout(()=>{l.current&&l.current.focus()},300))};return(0,jn.jsx)(On,{onClickAway:m=>{m.stopPropagation();let x=m.target?.closest("#ref");n===""&&x&&d(m)},children:(0,jn.jsxs)("div",{style:{display:"flex"},children:[(0,jn.jsx)(y3.ThemeProvider,{theme:TTe(s),children:(0,jn.jsx)(Qr,{variant:"standard",value:n,onChange:f,inputRef:l,placeholder:t,style:{width:o?"150px":"0",opacity:o?1:0,transition:"width 0.3s ease, opacity 0.3s ease"}})}),o?(0,jn.jsx)(zt,{title:"Close",onClick:d,icon:(0,jn.jsx)(Ft,{fill:s.palette.icon.default}),arrow:!0}):(0,jn.jsx)(zt,{title:"Search",onClick:p,icon:(0,jn.jsx)(Cd,{fill:s.palette.icon.default}),arrow:!0})]})})}var Kn=STe;var E3=require("@mui/material");var Ki=require("react");var CTe="N/A",Zq=e=>e&&e.deleted_at&&e.deleted_at.Valid===!0?ds(e.deleted_at.Time):CTe;var zi=require("react/jsx-runtime"),Qq=(0,b.styled)("div")({display:"flex",gap:"1rem"}),hs=(0,b.styled)("div")({display:"flex",justifyContent:"space-between",width:"100%",alignItems:"center"}),b3=(0,b.styled)("div")({display:"flex",alignItems:"center",marginRight:"1rem"}),NC=(0,b.styled)("div")({boxSizing:"border-box",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}),BC=(0,b.styled)("div")({position:"absolute",top:0,right:0,bottom:0,left:0,boxSizing:"border-box",display:"block",width:"100%"}),Xq=(0,b.styled)("span")(()=>({"& svg":{cursor:"pointer",width:"2rem",height:"2rem"}})),Rft=(0,b.styled)("span")(()=>({"& svg":{width:"2rem",height:"2rem"}})),Jq=(0,b.styled)("span")(({theme:e})=>({"& svg":{color:"#3C494F","&:hover":{color:e.palette.error.error}}})),jm=(0,b.styled)("span")(()=>({color:"#455a64",opacity:"0.5","& svg":{cursor:"not-allowed"}})),eG=(0,b.styled)("div")(()=>({display:"flex",justifyContent:"space-between",paddingRight:"26px"})),v3=(0,b.styled)("div")(()=>({color:"#455a64",display:"flex",cursor:"not-allowed","& svg":{cursor:"pointer"}})),tG=(0,b.styled)(Yr)({padding:0,marginRight:"0.5rem",height:"28px","& .MuiSvgIcon-root":{borderColor:"white"},color:"white","&:hover":{color:"white",cursor:"pointer"},"&.Mui-checked":{color:"white"}}),HC=(0,b.styled)(z)({fontSize:"1.25rem",fontWeight:800,"&:hover":{cursor:"default"}}),Oft=(0,b.styled)(z)({fontSize:"0.9rem",display:"flex",alignItems:"end",padding:"0 5px","&:hover":{cursor:"default"}}),Aft=(0,b.styled)("button")({background:"transparent",border:"none","&:hover":{cursor:"default"}}),VC=(0,b.styled)(z)({fontStyle:"italic",fontSize:"12px","&:hover":{cursor:"default"}}),UC=(0,b.styled)(z)({fontSize:"0.9rem",textAlign:"left",fontStyle:"italic"}),rG=(0,b.styled)(UC)({height:"fit-content",fontStyle:"normal","&:hover":{cursor:"default"}}),yTe=(0,b.styled)($)(({theme:e})=>({background:e.palette.background.brand?.default,padding:"10px 10px 1px 10px",borderRadius:"4px",height:"100%",display:"flex",width:"100%"})),Km=(0,b.styled)(yTe)({display:"flex",width:"100%",gap:"10px","@media (min-width : 600px)":{flexDirection:"column",gap:"0"}}),WC=(0,b.styled)(ke)(({theme:e})=>({width:"100%",borderRadius:"4px",background:e.palette.background.brand?.default,boxShadow:"0px 4px 4px 0px rgba(0, 0, 0, 0.25)",display:"flex",flexDirection:"column",marginBottom:"10px",color:e.palette.text.default,"&:hover":{background:e.palette.text.default},padding:"15px 10px"})),qC=(0,b.styled)("p")(({theme:e,textColor:t})=>({margin:"0",fontSize:"14px",fontWeight:"400",display:"flex",color:t||e.palette.text.constant?.white})),GC=(0,b.styled)("p")(({theme:e,textColor:t})=>({margin:"0",fontSize:"60px",fontWeight:"500",lineHeight:1,marginBottom:"5px",color:t||e.palette.text.constant?.white})),Pft=(0,b.styled)(ke)(({theme:e})=>({width:"100%",borderRadius:"4px",background:e.palette.text.default,boxShadow:"0px 4px 4px 0px rgba(0, 0, 0, 0.25)",display:"flex",flexDirection:"column",marginBottom:"10px",color:`${ie[40]}30 !important`,"&:hover":{background:e.palette.text.default},padding:"15px 10px"})),_ft=(0,b.styled)("div")(({disabled:e=!1})=>({cursor:e?"not-allowed":"pointer",opacity:e?"0.5":"1",display:"flex","& svg":{cursor:e?"not-allowed":"pointer"}})),oG=(0,b.styled)(ce)(({theme:e})=>({borderBottom:`1px solid ${e.palette.divider}`,display:"flex",flexDirection:"row",padding:"5px 0"})),w3=({onClick:e,bulk:t,disabled:r,style:o,key:a,title:n="Delete"})=>{let i=(0,b.useTheme)();return(0,zi.jsx)(xe,{title:n,arrow:!0,children:(0,zi.jsx)("div",{children:(0,zi.jsx)(tt,{sx:{"&:hover":{"& svg":{fill:r?i.palette.icon.disabled:i.palette.background.error?.hover}},...o},disableRipple:!0,disabled:r,onClick:e,children:(0,zi.jsx)(co,{fill:r?i.palette.icon.disabled:i.palette.icon.default,width:t?"28":"24",height:t?"28":"24",style:o})})})},a)},$n=({onClick:e,disabled:t,bulk:r,style:o,title:a="Edit"})=>{let n=(0,b.useTheme)();return(0,zi.jsx)(xe,{title:a,arrow:!0,children:(0,zi.jsx)("div",{children:(0,zi.jsx)(tt,{onClick:e,sx:{"&:hover":{"& svg":{fill:t?n.palette.icon.disabled:n.palette.background.brand?.default}},...o},disableRipple:!0,disabled:t,children:(0,zi.jsx)(Ja,{fill:t?n.palette.icon.disabled:n.palette.icon.default,width:r?"28":"24",height:r?"28":"24",style:o})})})})},aG=(0,b.styled)(ce)({display:"flex",flexDirection:"row"}),Ift=(0,b.styled)(ce)({display:"flex",alignItems:"center",marginTop:1}),$m=(0,b.styled)(ce)({width:"100%"}),nG=(0,b.styled)(Rr)(({theme:e})=>({width:"100%",display:"flex",flexDirection:"column",backgroundColor:e.palette.background.paper,padding:e.spacing(2.5),cursor:"pointer"})),iG=(0,b.styled)(nG)(({theme:e})=>({minHeight:e.spacing(50),background:"linear-gradient(180deg, #007366 0%, #000 100%)"})),lG=(0,b.styled)(nG)(({theme:e})=>({minHeight:e.spacing(50),backgroundColor:e.palette.background.paper,boxShadow:"none"})),sG=(0,b.styled)(ce)({display:"flex",flexDirection:"row",justifyContent:"space-between"}),uG=(0,b.styled)(ce)({display:"flex",alignItems:"flex-start"}),fG=(0,b.styled)(ce)({display:"flex",alignItems:"center",justifyContent:"flex-end"}),dG=(0,b.styled)(z)(({theme:e})=>({fontSize:"1.25rem",fontWeight:600,padding:"0.5rem 0",color:e.palette.background.constant?.white})),pG=(0,b.styled)(ce)({display:"flex",flexDirection:"column",maxHeight:"14.5rem",overflowY:"scroll",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"},"-ms-overflow-style":"none"}),mG=(0,b.styled)(ce)(({theme:e})=>({display:"flex",flexDirection:"row",position:"absolute",bottom:"20px",width:"100%",color:`${e.palette.background.constant?.white}99`,justifyContent:"space-between",paddingRight:"40px"})),zC=(0,b.styled)(ce)({textAlign:"left"});var ji=require("react/jsx-runtime"),bTe=({userId:e,userName:t,userEmail:r,profileUrl:o})=>{let a=(0,b.useTheme)(),n=()=>{window.open(`${xa}/user/${e}`)};return(0,ji.jsxs)(ce,{container:!0,alignItems:"center",children:[(0,ji.jsx)(ce,{children:(0,ji.jsx)($,{sx:{color:a.palette.text.default,mr:2,cursor:"pointer"},children:(0,ji.jsx)(qt,{onClick:n,alt:t,src:o,children:o?"":(0,ji.jsx)(Mn,{})})})}),(0,ji.jsxs)(ce,{size:"grow",children:[t,(0,ji.jsx)(z,{variant:"body2",color:a.palette.text.disabled,children:r})]})]})},ku=bTe;var De=require("react/jsx-runtime"),vTe=({tableMeta:e,handleRemoveFromTeam:t,isRemoveFromTeamAllowed:r,theme:o})=>(0,De.jsx)("div",{children:r?(0,De.jsx)(v3,{children:(0,De.jsx)(zt,{id:`delete_user-${e.rowIndex}`,onClick:t(e.rowData),title:"Remove user membership from team",iconType:"delete",children:(0,De.jsx)(zl,{fill:o?.palette.icon.default})})}):(0,De.jsx)(jm,{children:(0,De.jsx)(zl,{fill:o?.palette.icon.disabled,secondaryFill:Xr})})}),wTe=({teamID:e,useGetUsersForOrgQuery:t,org_id:r,useRemoveUserFromTeamMutation:o,useNotificationHandlers:a,isRemoveFromTeamAllowed:n,theme:i})=>{let[l,s]=(0,Ki.useState)(0),[u,f]=(0,Ki.useState)(10),[d,p]=(0,Ki.useState)("last_login_time desc"),[m,x]=(0,Ki.useState)(""),h=[],{handleError:g,handleSuccess:T,handleInfo:E}=a(),R=(0,Ki.useRef)(null),{width:k}=Xo(),{data:D}=t({page:l,pagesize:u,search:m,order:d,teamId:e,orgId:r}),[C]=o(),v=D?.data||[],P=D?.total_count||0,B=V=>async()=>{let y=V[0];await R.current?.show({title:"Remove User From Team ?",subtitle:J(V[3],V[2]),primaryOption:"Proceed",variant:Gm.DANGER})==="Proceed"&&C({orgId:r,teamId:e,userId:y}).unwrap().then(()=>{T(`${V[4]?V[4]:""} ${V[5]?V[5]:""} removed from team`)}).catch(oe=>{let O=oe.response?.data?.message||"Failed to remove user from team";oe.response.status===404?E(O):g(O)})},_=(V,y,ee)=>{let oe=ee.findIndex(O=>O.name===y);return V[oe]},J=(V,y)=>(0,De.jsxs)(De.Fragment,{children:[(0,De.jsx)("p",{children:"Are you sure you want to remove this user? (This action is irreversible)"}),(0,De.jsxs)("p",{children:["User:"," ",(0,De.jsx)("i",{children:(0,De.jsx)("b",{children:V})})]}),(0,De.jsxs)("p",{children:["Email:"," ",(0,De.jsx)("i",{children:(0,De.jsx)("b",{children:y})})]})]}),X,H={search:!1,viewColumns:!1,filter:!1,rowsPerPageOptions:[10,20,25],responsive:"standard",selectableRows:"none",count:P,rowsPerPage:u,page:l,print:!1,download:!1,elevation:0,serverSide:!0,sortOrder:{name:d.split(" ")[0],direction:d.split(" ")[1]},onTableChange:(V,y)=>{let ee=y.announceText?y.announceText.split(" : "):[],oe="";switch(y.activeColumn&&(oe=`${N[y.activeColumn].name} desc`),V){case"changePage":s(y.page);break;case"changeRowsPerPage":f(y.rowsPerPage);break;case"search":X&&clearTimeout(X),X=setTimeout(()=>{m!==y.searchText&&x(y.searchText)},500);break;case"sort":ee.length==2&&(ee[1]==="ascending"?oe=`${N[y.activeColumn].name} asc`:oe=`${N[y.activeColumn].name} desc`),oe!==d&&p(oe);break}}},q=[["user_id","na"],["avatar_url","xs"],["email","na"],["username","na"],["first_name","na"],["last_name","na"],["role_names","xs"],["status","na"],["joined_at","l"],["last_login_time","l"],["deleted_at","na"]],N=[{name:"user_id",label:"User ID",options:{filter:!1,sort:!1,searchable:!1}},{name:"avatar_url",label:"Team Member",options:{filter:!1,sort:!1,searchable:!1,customBodyRender:(V,y)=>(0,De.jsx)($,{sx:{"& > img":{mr:2,flexShrink:0}},children:(0,De.jsx)(ku,{userId:_(y.rowData,"user_id",N),userName:`${y.rowData[4]} ${y.rowData[5]}`,userEmail:y.rowData[2],profileUrl:V})})}},{name:"email",label:"Email",options:{filter:!1,sort:!0,searchable:!0}},{name:"username",label:"Username",options:{filter:!1,sort:!0,searchable:!0,customBodyRender:(V,y)=>(0,De.jsxs)("div",{style:{display:"flex"},children:[V,V?.includes("@")?(0,De.jsx)(Xt,{title:`Search "${y.rowData[3]} ${y.rowData[4]}" on Google`,children:(0,De.jsx)("a",{href:`https://www.google.com/search?q=${y.rowData[3]}+${y.rowData[4]}`,style:{color:"inherit"},target:"_blank",rel:"noreferrer",children:(0,De.jsx)("div",{children:(0,De.jsx)($2,{width:20,height:20})})})}):(0,De.jsx)(Xt,{title:`Lookup "${V}" on GitHub`,children:(0,De.jsx)("a",{href:`https://www.github.com/${V}`,style:{color:"inherit"},target:"_blank",rel:"noreferrer",children:(0,De.jsx)("div",{children:(0,De.jsx)(eu,{width:22,height:22})})})})]})}},{name:"first_name",label:"First",options:{filter:!1,sort:!0,searchable:!0}},{name:"last_name",label:"Last",options:{filter:!1,sort:!0,searchable:!0}},{name:"role_names",label:"Roles",options:{filter:!0,sort:!1,searchable:!1,filterOptions:{names:h.concat(h?.map(V=>`!${V}`))},customBodyRender:V=>(0,De.jsx)("div",{children:V?.join(", ")})}},{name:"status",label:"Status",options:{filter:!0,sort:!0,searchable:!1}},{name:"joined_at",label:"Joined At",options:{filter:!1,sort:!0,searchable:!1,sortDescFirst:!0}},{name:"last_login_time",label:"Last Active At",options:{filter:!1,sort:!0,searchable:!1,sortDescFirst:!0}},{name:"deleted_at",label:"Deleted At",options:{filter:!0,sort:!0,searchable:!1,sortDescFirst:!0,filterOptions:{names:["Deleted","Not Deleted"],logic:(V,y)=>V!="NA"&&y.indexOf("Deleted")>=0?!0:V=="NA"&&y.indexOf("Not Deleted")>=0,fullWidth:!0},customBodyRender:(V,y)=>{let ee=v[y.rowIndex];return Zq(ee)}}},{name:"actions",label:"Actions",options:{filter:!1,sort:!1,searchable:!1,customBodyRender:(V,y)=>_(y.rowData,"deleted_at",N).Valid!==!1?(0,De.jsxs)(jm,{children:[(0,De.jsx)(Ja,{style:{marginRight:".5rem"},fill:Xr,height:"30",width:"30"}),(0,De.jsx)(zl,{fill:Xr,secondaryFill:Xr,height:30,width:30})]}):(0,De.jsx)(vTe,{tableMeta:y,handleRemoveFromTeam:B,isRemoveFromTeamAllowed:n,theme:i})}}],[L,M]=(0,Ki.useState)(N),[F]=(0,Ki.useState)(()=>{let V=Jo(q,k),y={};return N.forEach(ee=>{y[ee.name]=V[ee.name]}),y});return(0,De.jsxs)(F2,{initialMode:i?.palette.mode,children:[(0,De.jsx)("div",{style:{margin:"auto",width:"100%"},children:(0,De.jsx)(Vo,{columns:N,data:v,options:H,colViews:q,tableCols:L,updateCols:M,columnVisibility:F})}),(0,De.jsx)(np,{ref:R})]})},Ym=wTe;var ip=require("react/jsx-runtime"),ETe=(0,b.styled)(E3.Grid2)(({theme:e})=>({display:"grid",margin:"auto",paddingLeft:"0.5rem",borderRadius:"0.25rem",width:"inherit",gap:e.spacing(1)})),RTe=({teams:e,tableOptions:t,columnVisibility:r,colViews:o,tableCols:a,columns:n,updateCols:i,isRemoveFromTeamAllowed:l,org_id:s,useGetUsersForOrgQuery:u,useNotificationHandlers:f,useRemoveUserFromTeamMutation:d})=>{let p=(0,b.useTheme)();return(0,ip.jsx)(no,{children:(0,ip.jsx)(Vo,{columns:n,data:e,options:{...t,renderExpandableRow:(m,x)=>{let h=e[x.dataIndex].id;return(0,ip.jsx)(E3.TableCell,{colSpan:6,sx:{paddingInline:"4rem",backgroundColor:`${p.palette.background.secondary} !important`},children:(0,ip.jsx)(ETe,{container:!0,size:12,children:(0,ip.jsx)(Ym,{teamID:h,isRemoveFromTeamAllowed:l,org_id:s,useGetUsersForOrgQuery:u,useNotificationHandlers:f,useRemoveUserFromTeamMutation:d,theme:p})})})}},colViews:o,tableCols:a,updateCols:i,columnVisibility:r})})},Zm=RTe;var jC=require("react");var R3=require("react/jsx-runtime");function OTe({value:e,maxLength:t,...r}){return e.length>t?(0,R3.jsx)(Xt,{title:e,arrow:!0,placement:"top",children:(0,R3.jsx)("div",{style:{maxWidth:"15rem",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},...r,children:`${e.slice(0,t)}...`})}):(0,R3.jsx)("div",{style:{maxWidth:"15rem",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},...r,children:e})}var Aa=OTe;var ut=require("react/jsx-runtime");function ATe({selected:e,teams:t,deleteTeamsModalHandler:r}){let o={team_ids:[],team_names:[]};return e?.data.forEach(a=>{let n=a.index;o.team_ids.push(t[n]?.team_id),o.team_names.push(t[n]?.team_name)}),(0,ut.jsx)(Xq,{children:(0,ut.jsx)(Jq,{children:(0,ut.jsx)(xe,{title:"Delete Teams",children:(0,ut.jsx)(co,{height:28,width:28,fill:Xr,onClick:()=>{r(o)}})},"delete_teams")})})}function lp({teams:e,count:t,page:r,pageSize:o,setPage:a,setPageSize:n,sortOrder:i,setSortOrder:l,bulkSelect:s,setBulkSelect:u,handleTeamView:f,handleDeleteTeam:d,handleRemoveTeamFromWorkspace:p,handleleaveTeam:m,teamId:x,workspace:h=!1,isEditTeamAllowed:g,isLeaveTeamAllowed:T,isRemoveTeamFromWorkspaceAllowed:E,isDeleteTeamAllowed:R,setSearch:k}){let{width:D}=Xo(),C=(0,b.useTheme)(),v=[["id","na"],["name","xs"],["description","m"],["owner","l"],["created_at","na"],["updated_at","xl"],["deleted_at","na"],["actions","xs"]],P=[{name:"id",label:"ID",options:{filter:!1,sort:!1,searchable:!1,customBodyRender:N=>(0,ut.jsx)(Bm,{id:N})}},{name:"name",label:"Name",options:{filter:!1,sort:!0,searchable:!0}},{name:"description",label:"Description",options:{filter:!1,sort:!0,searchable:!1,customBodyRender:N=>(0,ut.jsx)(Aa,{value:N??"",maxLength:30})}},{name:"owner",label:"Owner",options:{filter:!1,sort:!0,searchable:!0}},{name:"created_at",label:"Created At",options:{filter:!1,sort:!0,searchable:!1,sortDescFirst:!0}},{name:"updated_at",label:"Updated At",options:{filter:!1,sort:!0,searchable:!1,sortDescFirst:!0}},{name:"deleted_at",label:"Deleted At",options:{filter:!0,sort:!0,searchable:!1,sortDescFirst:!0,customBodyRender:N=>JSON.stringify(N),filterOptions:{names:["Deleted","Not Deleted"],logic:(N,L)=>N!="NA"&&L.indexOf("Deleted")>=0?!0:N=="NA"&&L.indexOf("Not Deleted")>=0,fullWidth:!0}}},{name:"actions",label:"Actions",options:{filter:!1,sort:!1,searchable:!1,customBodyRender:(N,L)=>s||L.rowData[4].Valid?(0,ut.jsxs)(jm,{children:[(0,ut.jsx)(Ja,{style:{marginRight:".5rem"}}),(0,ut.jsx)(co,{height:28,width:28,fill:Xr})]}):(0,ut.jsxs)(v3,{children:[!h&&(0,ut.jsxs)(ut.Fragment,{children:[(0,ut.jsx)(Ho,{disabled:!g,children:(0,ut.jsx)(zt,{id:`edit_team-${L.rowIndex}`,title:"Edit Team",onClick:M=>{g&&f(M,L.rowData)},iconType:"edit",children:(0,ut.jsx)(Ja,{style:{height:28.8,width:28.8},fill:Xr})})}),(0,ut.jsx)(Ho,{disabled:!T,children:(0,ut.jsx)(zt,{id:`leave_team-${L.rowIndex}`,title:"Leave Team",onClick:M=>T&&m(M,L.rowData),iconType:"delete",children:(0,ut.jsx)(zl,{fill:Xr,secondaryFill:Xr})})})]}),h?(0,ut.jsx)(Ho,{disabled:!E,children:(0,ut.jsx)(zt,{id:`remove_team-${L.rowIndex}`,title:"Move Team",onClick:()=>{E&&p&&p(L.rowData[0])},iconType:"delete",children:(0,ut.jsx)(co,{height:28,width:28,fill:C.palette.icon.default})})}):(0,ut.jsx)(Ho,{disabled:!R,children:(0,ut.jsx)(zt,{id:`delete_team-${L.rowIndex}`,title:"Delete Team",onClick:M=>{R&&d(M,L.rowData)},iconType:"delete",children:(0,ut.jsx)(co,{height:28,width:28,fill:Xr})})})]})}}],B=e?.findIndex(N=>N.id===x),_={filter:!1,selectableRows:"none",filterType:"dropdown",expandableRows:!0,expandableRowsHeader:!1,expandableRowsOnClick:!0,responsive:"standard",count:t,rowsPerPage:o,page:r,print:!1,download:!1,elevation:0,serverSide:!0,viewColumns:!1,search:!1,rowsExpanded:[B],customToolbarSelect:N=>(0,ut.jsx)(eG,{children:(0,ut.jsx)(ATe,{selected:N,teams:e,deleteTeamsModalHandler:()=>{}})}),textLabels:{selectedRows:{text:"teams(s) selected"}},onTableChange:(N,L)=>{let M=L.announceText?L.announceText.split(" : "):[],F="";switch(L.activeColumn&&(F=`${P[L.activeColumn].name} desc`),N){case"changePage":a(L.page);break;case"changeRowsPerPage":n(L.rowsPerPage);break;case"search":k(L.searchText!==null?L.searchText:"");break;case"sort":M.length==2&&(M[1]==="ascending"?F=`${P[L.activeColumn].name} asc`:F=`${P[L.activeColumn].name} desc`),F!==i&&l(F);break;case"rowSelectionChange":L.selectedRows.data.length?s||u(!0):u(!1);break;default:L.selectedRows.data.length==0&&s&&u(!1)}},isRowSelectable:N=>e[N].deleted_at.Valid!==!0,setRowProps:(N,L,M)=>(M&&M.selectedRows?M.selectedRows.data:[]).includes(L)?{style:{backgroundColor:C.palette.background.hover}}:N[6].Valid?{style:{backgroundColor:C.palette.icon.disabled}}:{style:{backgroundColor:C.palette.background.constant?.table}}},[J,X]=(0,jC.useState)(P),[H,q]=(0,jC.useState)(()=>{let N=Jo(v,D),L={};return P.forEach(M=>{L[M.name]=N[M.name]}),L});return{columns:P,tableOptions:_,tableCols:J,updateCols:X,columnVisibility:H,setColumnVisibility:q,colViews:v}}var Pa=G(require("react"));var wt=require("react/jsx-runtime"),PTe=({width:e=U,height:t=W,primaryFill:r="#00B39F",secondaryFill:o="#00D3A9",...a})=>(0,wt.jsxs)("svg",{width:e,height:t,viewBox:"0 0 135 135",...a,xmlns:"http://www.w3.org/2000/svg",children:[(0,wt.jsx)("path",{d:"M69.5 31.82V64.07L97.45 47.89L69.5 31.82Z",fill:o}),(0,wt.jsx)("path",{d:"M69.5 70.81V103.22L97.7 87.09L69.5 70.81Z",fill:o}),(0,wt.jsx)("path",{d:"M65.47 63.85V32.09L37.87 47.92L65.47 63.85Z",fill:r}),(0,wt.jsx)("path",{d:"M10.1 103.1C15.5182 111.811 22.842 119.179 31.52 124.65V90.71L10.1 103.1Z",fill:r}),(0,wt.jsx)("path",{d:"M65.47 103.06V71.05L37.8 87.07L65.47 103.06Z",fill:r}),(0,wt.jsx)("path",{d:"M35.54 122.63L63.56 106.61L35.54 90.41V122.63Z",fill:o}),(0,wt.jsx)("path",{d:"M99.62 122.8V90.63L71.64 106.63L99.62 122.8Z",fill:r}),(0,wt.jsx)("path",{d:"M127.03 99.37C131.817 90.4433 134.524 80.5502 134.95 70.43L105.78 87.11L127.03 99.37Z",fill:r}),(0,wt.jsx)("path",{d:"M103.64 83.69L131.76 67.61L103.64 51.45V83.69Z",fill:o}),(0,wt.jsx)("path",{d:"M99.62 44.5V12.52L71.77 28.49L99.62 44.5Z",fill:r}),(0,wt.jsx)("path",{d:"M99.62 83.55V51.28L71.7 67.44L99.62 83.55Z",fill:r}),(0,wt.jsx)("path",{d:"M35.54 51.22V83.73L63.66 67.45L35.54 51.22Z",fill:o}),(0,wt.jsx)("path",{d:"M65.47 0C55.1388 0.298791 45.016 2.97835 35.89 7.83L65.52 24.83L65.47 0Z",fill:r}),(0,wt.jsx)("path",{d:"M35.54 12.3V44.62L63.69 28.48L35.54 12.3Z",fill:o}),(0,wt.jsx)("path",{d:"M31.52 10.34C22.8442 15.8136 15.521 23.1813 10.1 31.89L31.52 44.25V10.34Z",fill:r}),(0,wt.jsx)("path",{d:"M99.43 8C90.2123 3.0393 79.9635 0.299881 69.5 0V25.15L99.43 8Z",fill:o}),(0,wt.jsx)("path",{d:"M0 69.87C0.348236 80.2825 3.1145 90.4711 8.08 99.63L29.77 87.07L0 69.87Z",fill:o}),(0,wt.jsx)("path",{d:"M8.07001 35.37C3.13121 44.4917 0.372439 54.6334 0.0100098 65L29.8 47.91L8.07001 35.37Z",fill:o}),(0,wt.jsx)("path",{d:"M35.78 127.13C44.9355 132.013 55.0981 134.706 65.47 135V110.15L35.78 127.13Z",fill:r}),(0,wt.jsx)("path",{d:"M124.89 32C119.512 23.3126 112.237 15.9553 103.61 10.48V44.3L124.89 32Z",fill:o}),(0,wt.jsx)("path",{d:"M103.64 124.54C112.314 119.022 119.624 111.61 125.02 102.86L103.64 90.52V124.54Z",fill:o}),(0,wt.jsx)("path",{d:"M134.96 64.81C134.572 54.5437 131.835 44.5032 126.96 35.46L105.5 47.88L134.96 64.81Z",fill:r}),(0,wt.jsx)("path",{d:"M69.5 135C79.845 134.709 89.9825 132.029 99.12 127.17L69.5 110V135Z",fill:o}),(0,wt.jsx)("path",{d:"M31.52 83.44V51.56L3.83002 67.43L31.52 83.44Z",fill:r})]}),KC=PTe;var cG=G(require("@mui/material/Tooltip")),xG=G(require("react")),$C=require("react/jsx-runtime"),_Te=xG.default.forwardRef((e,t)=>(0,$C.jsx)(cG.default,{...e,ref:t,children:(0,$C.jsx)("span",{children:e.children})})),YC=_Te;var Yn=require("@mui/material");var hG=(0,Yn.styled)(Dt)(({theme:e})=>({padding:"5px 6px !important",color:e.palette.text.default,fontSize:"0.875rem",textTransform:"uppercase",fontWeight:400,height:"unset",borderRadius:"100px",border:`0.5px solid ${e.palette.border?.normal}`,background:e.palette.background.default,maxWidth:"14.375rem"})),gG=(0,Yn.styled)(An)(({theme:e})=>({width:300,height:280,overflow:"auto",backgroundColor:e.palette.background.secondary,borderRadius:"10px",boxShadow:"0px 1px 4px 0px rgba(0, 0, 0, 0.25) inset","@media (max-width: 843px)":{width:260},"@media (max-width: 768px)":{width:300},"@media (max-width: 375px)":{width:"100%"}})),ZC=(0,Yn.styled)(z)(({theme:e})=>({paddingBottom:"15px",color:e.palette.text?.default,textAlign:"center",fontSize:"1rem",letterSpacing:"0.15px"})),Qm=(0,Yn.styled)(ke)(({theme:e})=>({margin:"5px 0",padding:"7px 0",borderRadius:"10px",borderColor:e.palette.border?.strong,boxShadow:"none",display:"flex",flexDirection:"row",fill:e.palette.icon.default,"&:hover":{borderColor:e.palette.border?.brand,backgroundColor:`${Ze} !important`,fill:e.palette.icon.inverse}})),QC=(0,Yn.styled)(Yn.Grid2)({padding:"0 1rem","@media (max-width: 768px)":{padding:"0",display:"flex",alignItems:"center",flexDirection:"column",width:"100%"}}),TG=(0,Yn.styled)(Yn.Grid2)({padding:"2.5rem 1rem 0 1rem","@media (max-width: 768px)":{padding:"1rem",transform:"rotate(90deg)",height:"6.25rem",marginLeft:"6.25rem"}});var Ve=require("react/jsx-runtime"),SG={CHIP:"chip",OTHER:"other"};function ITe(e){return e?{meshery:(0,Ve.jsx)(KC,{}),kubernetes:(0,Ve.jsx)(dd,{}),github:(0,Ve.jsx)(eu,{})}[e]||null:(0,Ve.jsx)(dd,{})}function O3(e,t){return e.filter(r=>t.indexOf(r)===-1)}function CG(e,t){return e.filter(r=>t.indexOf(r)!==-1)}function kTe({name:e,assignableData:t,assignedData:r,assignablePage:o,assignedPage:a,originalAssignedData:n,emptyStateIconLeft:i,emtyStateMessageLeft:l,emptyStateIconRight:s,emtyStateMessageRight:u,originalLeftCount:f,originalRightCount:d,leftPermission:p=!0,rightPermission:m=!0,transferComponentType:x=SG.OTHER}){let[h,g]=Pa.default.useState([]),[T,E]=Pa.default.useState([]),[R,k]=Pa.default.useState(n),[D,C]=Pa.default.useState(0),[v,P]=Pa.default.useState(0);Pa.default.useEffect(()=>{k(n)},[n]),Pa.default.useEffect(()=>{E(t)},[t]),Pa.default.useEffect(()=>{C(f),P(d)},[f,d]);let B=CG(h,T),_=CG(h,R);Pa.default.useEffect(()=>{r(R)},[R]),Pa.default.useEffect(()=>{let M=y=>{y[0].isIntersecting&&o()},F=new IntersectionObserver(M,{threshold:1}),V=document.getElementById("leftList");return V&&F.observe(V),()=>{V&&F.unobserve(V)}},[t]),Pa.default.useEffect(()=>{let M=y=>{y[0].isIntersecting&&a()},F=new IntersectionObserver(M,{threshold:1}),V=document.getElementById("rightList");return V&&F.observe(V),()=>{V&&F.unobserve(V)}},[n]);let J=M=>()=>{let F=h.indexOf(M),V=[...h];F===-1?V.push(M):V.splice(F,1),g(V)},X=M=>{M.stopPropagation(),k(R.concat(T)),E([]),C(0),P(F=>F+D)},H=M=>{M.stopPropagation(),k(R.concat(B)),E(O3(T,B)),g(O3(h,B)),C(F=>F-B.length),P(F=>F+B.length)},q=M=>{M.stopPropagation(),E(T.concat(_)),k(O3(R,_)),g(O3(h,_)),P(F=>F-_.length),C(F=>F+_.length)},N=M=>{M.stopPropagation(),E(T.concat(R)),k([]),P(0),C(F=>F+v)},L=(M,F,V,y)=>(0,Ve.jsxs)(gG,{children:[(0,Ve.jsx)(Zr,{dense:!0,component:"div",role:"list",children:M.length>0?M.map(ee=>{let oe=`transfer-list-item-${ee.name}-label`;return(0,Ve.jsxs)(Or,{role:"listitem",sx:{display:"flex",justifyContent:"space-between","&:hover":{backgroundColor:"#00000010"}},onClick:J(ee),children:[x===SG.CHIP?(0,Ve.jsx)(YC,{title:ee.name,placement:"top",children:(0,Ve.jsx)(hG,{sx:{paddingY:"10px"},variant:"outlined",label:ee.name,onDelete:()=>{},deleteIcon:(0,Ve.jsx)(i5,{}),icon:ITe(ee?.kind)||(0,Ve.jsx)(dd,{})})}):(0,Ve.jsx)(YC,{title:ee.name,placement:"top",children:(0,Ve.jsx)(z,{sx:{maxWidth:"230px",height:"1.5rem",overflow:"hidden"},children:ee.name})}),(0,Ve.jsx)(Yr,{checked:h.indexOf(ee)!==-1,tabIndex:-1,disableRipple:!0,inputProps:{"aria-labelledby":oe}})]},ee.id)}):(0,Ve.jsxs)("div",{style:{textAlign:"center",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",height:"264px"},children:[F,(0,Ve.jsx)(z,{sx:{color:"#979797",px:5,py:2,lineHeight:1},children:V})]})}),(0,Ve.jsx)("div",{id:y})]});return(0,Ve.jsxs)(ce,{container:!0,justifyContent:"center",alignItems:"center",children:[(0,Ve.jsxs)(QC,{children:[(0,Ve.jsxs)(ZC,{children:["Available ",e," (",T.length,")"]}),L(T,i,l,"leftList")]}),(0,Ve.jsx)(TG,{children:(0,Ve.jsxs)(ce,{container:!0,direction:"column",alignItems:"center",children:[(0,Ve.jsxs)(Qm,{variant:"outlined",size:"small",onClick:X,disabled:!m||m&&(T?.length===0||T.length<D),"aria-label":"move all right",children:[(0,Ve.jsx)(Sd,{width:18,height:18}),(0,Ve.jsx)(Sd,{style:{position:"absolute",left:"27px"},width:18,height:18})]}),(0,Ve.jsx)(Qm,{variant:"outlined",size:"small",onClick:H,disabled:!m||m&&B.length===0,"aria-label":"move selected right",children:(0,Ve.jsx)(Sd,{width:18,height:18})}),(0,Ve.jsx)(Qm,{variant:"outlined",size:"small",onClick:q,disabled:!p||p&&_.length===0,"aria-label":"move selected left",children:(0,Ve.jsx)(md,{width:18,height:18})}),(0,Ve.jsxs)(Qm,{variant:"outlined",size:"small",onClick:N,disabled:!p||p&&(R?.length===0||R.length<v),"aria-label":"move all left",children:[(0,Ve.jsx)(md,{width:18,height:18}),(0,Ve.jsx)(md,{style:{position:"absolute",left:"27px"},width:18,height:18})]})]})}),(0,Ve.jsxs)(QC,{children:[(0,Ve.jsxs)(ZC,{children:["Assigned ",e," (",R.length,")"]}),L(R,s,u,"rightList")]})]})}var sp=kTe;var up=require("@mui/material"),XC=G(require("react"));var nr=require("react/jsx-runtime"),MTe=(0,up.styled)("div")(({theme:e})=>({background:e.palette.mode==="light"?Si.header:Ti.header,padding:"0.75rem 1rem",margin:"-1rem -1rem 1rem -1rem",display:"flex",justifyContent:"space-between",alignItems:"center",color:e.palette.text.constant?.white}));function LTe({filters:e,selectedFilters:t,setSelectedFilters:r,variant:o="outlined",handleApplyFilter:a,showAllOption:n=!0,id:i}){let[l,s]=XC.default.useState(null),[u,f]=XC.default.useState(!1),d=(0,b.useTheme)(),p=(0,up.useMediaQuery)(d.breakpoints.down("sm")),m=E=>{s(E.currentTarget),f(R=>!R)},x=()=>{s(null),f(!1)},h=(E,R)=>{let k=E.target.value;r(D=>({...D,[R]:k}))},g=()=>{x(),a()},T=()=>(0,nr.jsxs)("div",{children:[(0,nr.jsx)(MTe,{children:(0,nr.jsx)("h3",{children:"Filters: "})}),Object.keys(e).map(E=>{let R=e[E].options;return(0,nr.jsxs)("div",{role:"presentation",children:[(0,nr.jsx)(Ll,{id:e[E].name,children:e[E].name}),(0,nr.jsxs)(ca,{defaultValue:"All",value:t[E],variant:o,onChange:k=>h(k,E),style:{width:"20rem",marginBottom:"1rem"},inputProps:{"aria-label":"Without label"},displayEmpty:!0,children:[n&&(0,nr.jsx)(At,{value:"All",children:"All"}),R.map(k=>(0,nr.jsx)(At,{value:k.value,children:k.label},k.value))]},E)]},E)}),(0,nr.jsx)("div",{style:{display:"flex",justifyContent:"center"},children:(0,nr.jsx)(ke,{variant:"contained",onClick:g,children:"Apply"})})]});return(0,nr.jsx)(nr.Fragment,{children:(0,nr.jsxs)("div",{id:i,children:[(0,nr.jsx)(zt,{title:"Filter",onClick:m,icon:(0,nr.jsx)(W2,{fill:d.palette.icon.default}),arrow:!0}),p?(0,nr.jsx)(up.Drawer,{anchor:"bottom",open:u,onClose:x,PaperProps:{style:{padding:"0 1rem 1rem 1rem",backgroundColor:d.palette.background.surfaces}},children:T()}):(0,nr.jsx)(Yd,{id:u&&l?"transition-popper":void 0,open:u,anchorEl:l,placement:"bottom-end",children:(0,nr.jsx)(On,{onClickAway:x,mouseEvent:"onMouseDown",touchEvent:"onTouchStart",children:(0,nr.jsx)(An,{sx:{padding:"1rem",paddingTop:"1.8rem",boxShadow:"0px 4px 8px rgba(0, 0, 0, 0.1)",backgroundColor:d.palette.background.surfaces},children:T()})})})]})})}var yG=LTe;var bG=require("react");var ta=require("react/jsx-runtime"),dn={PUBLIC:"public",PRIVATE:"private",PUBLISHED:"published"},DTe=(0,b.styled)(Dl)(({theme:e})=>({"& .MuiPaper-root":{backgroundColor:e.palette.mode==="light"?i1:e.palette.background.constant?.table,color:e.palette.text.secondary,border:`1px solid ${e.palette.border.default}`,borderRadius:"0.25rem",padding:"0rem"},"& .MuiMenuItem-root":{fontSize:".9rem",padding:"0.5rem","&:hover":{backgroundColor:e.palette.mode==="light"?Ks:"rgba(0, 179, 159, 0.25)"}},"& .Mui-selected":{backgroundColor:e.palette.mode==="light"?Ks:"rgba(0, 179, 159, 0.25)"},"& .MuiList-padding":{padding:"0px"}})),FTe=(0,b.styled)(ke)(()=>({padding:"0px"})),NTe=(0,b.styled)("div")(({theme:e,enabled:t})=>({paddingLeft:"0.3rem",height:"1.5rem",width:"auto",paddingRight:t?"0":"0.3rem",borderRadius:"0.25rem",border:`1px solid ${Qf}`,background:e?.palette.mode==="light"?i1:e?.palette.background.constant?.table,textTransform:"uppercase",color:e?.palette.text.default,display:"flex",justifyContent:"center",alignItems:"center",fontSize:"0.75rem",fontFamily:e?.typography.fontFamily})),BTe=(0,b.styled)(At)(({theme:e})=>({textTransform:"capitalize",color:e.palette.icon.default})),HTe=(0,b.styled)("div")({marginRight:"0.5rem"}),VTe=({value:e,onChange:t,options:r,enabled:o})=>{let[a,n]=(0,bG.useState)(null),i=!!a,l=f=>{f.stopPropagation(),n(null)},s=f=>{f.stopPropagation(),o&&n(f.currentTarget)},u=(f,d)=>{f.stopPropagation(),t&&t(d),l(f)};return(0,ta.jsxs)(ta.Fragment,{children:[(0,ta.jsx)(FTe,{disabled:!o,onClick:s,"data-testid":`design-visibility-${e.toLowerCase()}`,children:(0,ta.jsxs)(NTe,{enabled:o,children:[(0,ta.jsx)("span",{style:{fontSize:"0.85rem"},children:e}),o&&(0,ta.jsx)(hF,{style:{...$o}})]})}),(0,ta.jsx)(DTe,{open:i,onClose:l,anchorEl:a,anchorReference:"anchorPosition",anchorPosition:{top:(a?.getBoundingClientRect().bottom??0)+5,left:(a?.getBoundingClientRect().left??0)+5},children:r?.map(([f,d],p)=>(0,ta.jsxs)(BTe,{"data-testid":`visibility-toggle-${f.toLowerCase()}`,onClick:m=>u(m,f),children:[(0,ta.jsx)(HTe,{children:(0,ta.jsx)(d,{width:16,height:16})}),f]},p))})]})},$i=VTe;var kG=require("@mui/material");var Uo=require("@mui/material"),vG=(0,Uo.styled)("div")(()=>({width:"85px",height:"88px",overflow:"hidden",position:"absolute",top:"-3px",left:"-3px"})),wG=(0,Uo.styled)("div")(({catalogClassName:e})=>({font:"bold 10px sans-serif",WebkitTransform:"rotate(-45deg)",textAlign:"center",transform:"rotate(-45deg)",position:"relative",padding:"4px 0",top:"15px",left:"-30px",width:"120px",display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",backgroundColor:{community:"rgba(122,132,142,.8)",official:"#EBC017",verified:"#00B39F"}[e],color:"#fff"})),EG=(0,Uo.styled)("div")(({outerStyles:e})=>({position:"relative",borderRadius:"1rem",textAlign:"center",transformStyle:"preserve-3d",transition:"all .9s ease-out",marginBottom:"1.25rem",display:"inline-flex",perspective:"1000px","&:hover":{cursor:"pointer",transform:"translateY(-2%)"},"@media (max-width:1200px)":{height:"18.75rem"},...e})),RG=(0,Uo.styled)("div")(({theme:e})=>({position:"relative",width:"100%",height:"100%",textAlign:"center",transition:"transform 0.6s",background:e.palette.background.default,boxShadow:`2px 2px 3px 0px ${e.palette.background.brand?.default}`,borderRadius:"0.9375rem"})),OG=(0,Uo.styled)("span")(({theme:e})=>({position:"absolute",top:"0",right:"0",minWidth:"3rem",padding:"0 0.75rem",fontSize:"0.875rem",textTransform:"capitalize",background:e.palette.background.brand?.default,color:e.palette.text.inverse,borderRadius:"0 1rem 0 2rem"})),fp=(0,Uo.styled)("p")(({theme:e})=>({fontSize:"1rem",textTransform:"capitalize",margin:"0rem",lineHeight:"1.5",textAlign:"center",color:e.palette.text.secondary,fontWeight:"600"})),AG=(0,Uo.styled)(Uo.Typography)(({theme:e})=>({fontWeight:"bold",textTransform:"capitalize",color:e.palette.text.default,fontSize:"1.125rem",marginTop:"2rem",padding:"0rem 1rem",position:"relative",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",textAlign:"center",width:"100%"})),PG=(0,Uo.styled)("div")(({theme:e})=>({display:"flex",justifyContent:"space-around",fontSize:"0.2rem",color:e.palette.text.secondary,padding:"0.9rem 0.1rem",background:e.palette.background.secondary,position:"absolute",bottom:"0px",marginTop:"1.2rem",borderRadius:"0 0 0.9375rem 0.9375rem",width:"100%"})),dp=(0,Uo.styled)("div")(()=>({display:"flex",alignItems:"center",gap:"4px",fontSize:"0.2rem",color:"rgba(26, 26, 26, .8)",margin:"0rem",padding:"0.1rem"})),_G=(0,Uo.styled)("div")(()=>({height:"max-content",display:"flex",marginTop:"-1rem",flexDirection:"column",padding:"0rem 1rem",justifyContent:"start",alignItems:"start","@media (max-width:1200px)":{height:"max-content"}})),IG=(0,Uo.styled)("div")(({theme:e})=>({background:e.palette.mode==="light"?"rgba(231, 239, 243, 0.40)":"#212121",display:"flex",alignItems:"center",justifyContent:"center",padding:"0.5rem",width:"100%",borderRadius:"0.5rem"}));var $e=require("react/jsx-runtime"),Tpt=(0,kG.styled)("a")(()=>({textDecoration:"none"}));var UTe=({catalogClassName:e})=>e?(0,$e.jsx)(vG,{children:(0,$e.jsx)(wG,{catalogClassName:e,children:e})}):(0,$e.jsx)($e.Fragment,{}),WTe=({pattern:e,patternType:t,cardHeight:r,cardWidth:o,cardStyles:a,onCardClick:n})=>{let i={height:r,width:o,...a};return(0,$e.jsx)(EG,{outerStyles:i,onClick:n,children:(0,$e.jsxs)(RG,{className:"innerCard",children:[(0,$e.jsx)(UTe,{catalogClassName:e?.catalog_data?.content_class}),(0,$e.jsx)(OG,{children:t}),(0,$e.jsxs)(_G,{children:[(0,$e.jsx)(AG,{style:{margin:"3rem 0 1.59rem 0",textAlign:"center"},children:e.name}),(0,$e.jsx)(IG,{children:(0,$e.jsx)(Xa,{height:"118",width:"120"})})]}),(0,$e.jsxs)(PG,{children:[(0,$e.jsxs)(dp,{children:[(0,$e.jsx)(Sa,{width:18,height:18}),(0,$e.jsx)(fp,{children:e.download_count})]}),(0,$e.jsxs)(dp,{children:[(0,$e.jsx)(td,{width:18,height:18,fill:"#51636B"}),(0,$e.jsx)(fp,{children:e.clone_count})]}),(0,$e.jsxs)(dp,{children:[(0,$e.jsx)(hd,{width:18,height:18,fill:"#51636B"}),(0,$e.jsx)(fp,{children:e.view_count})]}),(0,$e.jsxs)(dp,{children:[(0,$e.jsx)(ud,{width:18,height:18}),(0,$e.jsx)(fp,{children:e.deployment_count})]}),(0,$e.jsxs)(dp,{children:[(0,$e.jsx)(Ln,{width:18,height:18,fill:"#51636B"}),(0,$e.jsx)(fp,{children:e.share_count})]})]})]})})},JC=WTe;var WG=require("@mui/material/styles"),tc=require("react");var ec=require("react");var A3=require("react");var DG=require("lodash"),Mu=require("react");var ey=require("@mui/material");var MG=(0,ey.styled)(zs)(({style:e,theme:t})=>({fontFamily:t.typography.fontFamily,width:"100%","@media (max-width: 590px)":{marginLeft:"0.25rem",paddingLeft:"0.25rem"},display:"flex",backgroundColor:t.palette.mode==="light"?t.palette.common.white:t.palette.background.surfaces,...e})),LG=(0,ey.styled)(Vf)(({theme:e})=>({borderLeft:`1px solid ${e.palette.background.tertiary}`,height:"30px",paddingLeft:"10px"}));var Xm=require("react/jsx-runtime");function qTe({onChange:e,value:t="",label:r,sx:o,placeholder:a,endAdornment:n,debounceTime:i=300}){let l=(0,b.useTheme)(),[s,u]=(0,Mu.useState)(t);(0,Mu.useEffect)(()=>{t!==s&&u(t)},[t]);let f=m=>({target:{value:m},persist:()=>{}}),d=(0,Mu.useMemo)(()=>(0,DG.debounce)(m=>{e?.(f(m))},i),[e,i]);return(0,Mu.useEffect)(()=>{if(e)return s===""?e(f(s)):d(s),()=>{d.cancel()}},[s,e,d]),(0,Xm.jsx)(MG,{type:"search",label:r,fullWidth:!0,value:s,onChange:m=>{let x=m.target.value;u(x)},sx:o,placeholder:a??"Search",startAdornment:(0,Xm.jsx)(Vf,{position:"start",children:(0,Xm.jsx)(Cd,{fill:l.palette.background.neutral?.default})}),endAdornment:(0,Xm.jsx)(LG,{position:"end",children:n})})}var Jm=qTe;var Zn=require("@mui/material/styles");var FG=(0,Zn.styled)($)(({styleProps:e})=>({padding:"1rem",borderRadius:"1rem",width:"100%",gap:"0.5rem",boxShadow:"0px 2px 10px rgba(0, 0, 0, 0.2)",display:"flex",flexDirection:"column",height:"fit-content",backgroundColor:e.backgroundColor,"@media (max-width:900px)":{display:"none"},fontFamily:e.fontFamily,"&::-webkit-scrollbar":{width:"6px"}})),NG=(0,Zn.styled)("div")(()=>({display:"none","@media (max-width:899px)":{display:"block"}})),Lpt=(0,Zn.styled)("div")(()=>({display:"flex",justifyContent:"space-around",alignItems:"center"})),BG=(0,Zn.styled)(ke)(({theme:e})=>({backgroundColor:e.palette.primary.brand?.default,"&:hover":{backgroundColor:e.palette.background.default},height:"3.75rem","@media (max-width:450px)":{minWidth:"0px"}})),HG=(0,Zn.styled)($)(({theme:e})=>({display:"flex",justifyContent:"space-between",alignItems:"center",padding:"0.5rem 1rem",background:e.palette.mode==="light"?Si.header:Ti.header,height:"10vh"})),Dpt=(0,Zn.styled)(ci)(({theme:e})=>({padding:"0.25rem 2rem",borderBottom:"1px solid",borderBottomColor:e.palette.text.disabled})),VG=(0,Zn.styled)(ci)(({theme:e})=>({backgroundColor:e.palette.background.surfaces,borderRadius:"0.5rem",marginTop:2,display:"flex",justifyContent:"space-between"})),UG=(0,Zn.styled)("p")(({theme:e})=>({color:e.palette.text.tertiary})),Fpt=(0,Zn.styled)("span")(()=>({marginLeft:"0.5rem",display:"block","@media (max-width: 853px)":{display:"none"}}));var ir=require("react/jsx-runtime"),GTe=({filterKey:e,sectionDisplayName:t,options:r=[],filters:o,openSections:a,onCheckboxChange:n,onSectionToggle:i,styleProps:l,customComponent:s})=>{let[u,f]=(0,A3.useState)(""),d=(0,A3.useCallback)(x=>{f(x.target.value)},[]),p=r.length>10,m=u&&r.length?r.filter(x=>x.label.toLowerCase().includes(u.toLowerCase())):r;return(0,ir.jsxs)(ir.Fragment,{children:[(0,ir.jsxs)(VG,{onClick:()=>i(e),style:{backgroundColor:l.sectionTitleBackgroundColor},children:[(0,ir.jsx)(z,{sx:{fontSize:"1rem"},fontWeight:"bold",fontFamily:l.fontFamily,children:(t||e).toUpperCase()}),a[e]?(0,ir.jsx)($l,{}):(0,ir.jsx)(Ko,{})]}),(0,ir.jsx)(da,{in:a[e],timeout:"auto",unmountOnExit:!0,children:s?(0,ir.jsx)(s,{}):(0,ir.jsxs)(Zr,{component:"div",sx:{overflowY:"auto",maxHeight:"25rem",backgroundColor:l.backgroundColor,"&::-webkit-scrollbar":{width:"6px"}},children:[p&&(0,ir.jsx)($,{sx:{px:"0.5rem",mb:"0.5rem"},children:(0,ir.jsx)(Jm,{value:u,onChange:d,placeholder:"Search",endAdornment:(0,ir.jsxs)(UG,{children:["Total : ",m.length??0]})})}),m.map((x,h)=>(0,ir.jsxs)(Gf,{direction:"row",alignItems:"center",px:"0.5rem",justifyContent:"space-between",children:[(0,ir.jsxs)(Gf,{direction:"row",alignItems:"center",gap:"0.35rem",children:[(0,ir.jsx)(Yr,{id:`checkbox-${x.label}`,checked:Array.isArray(o[e])?o[e].includes(x.value):o[e]===x.value,onChange:g=>n&&n(e,x.value,g.target.checked),value:x.value}),x.Icon&&(0,ir.jsx)(x.Icon,{width:"20px",height:"20px"}),(0,ir.jsx)(z,{fontFamily:l.fontFamily,children:x.label})]}),(0,ir.jsxs)(Gf,{direction:"row",alignItems:"center",gap:"0.35rem",children:[x.totalCount!==void 0&&`(${x.totalCount||0})`,x.description&&(0,ir.jsx)(Ui,{variant:"standard",helpText:x.description})]})]},`${x.value}-${h}`))]})})]})},ty=GTe;var pp=require("react/jsx-runtime"),zTe=({lists:e,onApplyFilters:t,value:r,styleProps:o})=>{let[a,n]=(0,ec.useState)(()=>{let s={};return e.forEach(u=>{s[u.filterKey]=!!u.defaultOpen}),s}),i=(0,ec.useCallback)(s=>{n(u=>({...u,[s]:!u[s]}))},[]),l=(0,ec.useCallback)((s,u,f)=>{t(d=>{let p={...d};if(e.find(x=>x.filterKey===s)?.isMultiSelect!==!1){let x=p[s];Array.isArray(x)||(x=x?[x]:[]),p[s]=f?[...x,u]:x.filter(h=>h!==u)}else p[s]=f?u:"";return p})},[e,t]);return(0,pp.jsx)(pp.Fragment,{children:e.map(s=>s.customComponent?(0,pp.jsx)(ty,{filterKey:s.filterKey,filters:r,sectionDisplayName:s.sectionDisplayName,onSectionToggle:i,styleProps:o,openSections:a,customComponent:s.customComponent},s.filterKey):(0,pp.jsx)(ty,{filterKey:s.filterKey,sectionDisplayName:s.sectionDisplayName,options:s.options,filters:r,openSections:a,onCheckboxChange:l,onSectionToggle:i,styleProps:o},s.filterKey))})},ry=zTe;var mr=require("react/jsx-runtime"),jTe=({lists:e,setData:t,value:r={},styleProps:o})=>{let a=(0,WG.useTheme)(),[n,i]=(0,tc.useState)(!1),l=(0,tc.useCallback)(()=>{i(!0)},[]),s=(0,tc.useCallback)(()=>{i(!1)},[]),f={...{backgroundColor:a.palette.mode==="light"?a.palette.background.default:a.palette.background.secondary,sectionTitleBackgroundColor:a.palette.mode==="light"?a.palette.background.surfaces:Hl.main,fontFamily:a.typography.fontFamily},...o};return(0,mr.jsxs)(mr.Fragment,{children:[(0,mr.jsx)(FG,{styleProps:f,children:(0,mr.jsx)(ry,{lists:e,onApplyFilters:t,value:r,styleProps:f})}),(0,mr.jsxs)(NG,{children:[(0,mr.jsx)(xe,{title:"Filters",placement:"bottom",children:(0,mr.jsx)(BG,{variant:"contained",onClick:l,children:(0,mr.jsx)(RF,{style:{height:"28px",width:"28px"},fill:a.palette.text.default})})}),(0,mr.jsx)(m2,{anchor:"bottom",open:n,variant:"temporary",onClose:s,style:{zIndex:"1399"},children:(0,mr.jsxs)($,{sx:{overflowY:"hidden",height:"90vh"},children:[(0,mr.jsxs)(HG,{children:[(0,mr.jsx)(z,{variant:"h6",sx:{color:a.palette.text.constant?.white},component:"div",children:"Filters"}),(0,mr.jsx)(Ou,{onClick:s,children:(0,mr.jsx)(Ft,{height:"32px",width:"32px"})})]}),(0,mr.jsx)($,{style:{height:"75vh",overflowY:"auto",background:a.palette.background.surfaces,padding:"0 16px"},children:(0,mr.jsx)(ry,{lists:e,onApplyFilters:t,value:r,styleProps:f})}),(0,mr.jsx)($,{sx:{background:a.palette.mode==="light"?Si.fotter:Ti.fotter,height:"5vh"}})]})})]})]})},oy=jTe;var Lu=require("react/jsx-runtime");function KTe({open:e,content:t,title:r,actions:o,onClose:a}){return(0,Lu.jsxs)(pa,{open:e,onClose:a,children:[(0,Lu.jsx)(Im,{children:r}),(0,Lu.jsx)(_l,{children:(0,Lu.jsx)(Il,{children:t})}),(0,Lu.jsx)(Hf,{children:o})]})}var ay=KTe;var mp=require("@mui/material"),ra=G(require("react"));var jt=require("react/jsx-runtime"),qG=require("react"),$Te=({data:e,label:t,fetchSuggestions:r,setFilterData:o,isLoading:a,type:n,disabled:i,selectedData:l,searchValue:s,setSearchValue:u,iconComponent:f=(0,jt.jsx)(N1,{..._d})})=>{let[d,p]=(0,ra.useState)(""),[m,x]=(0,ra.useState)(!1),[h,g]=(0,ra.useState)(!1),[T,E]=(0,ra.useState)(l);(0,ra.useEffect)(()=>{E(l)},[l]);let R=(0,ra.useCallback)(C=>{let v=T.filter(P=>P.id!==C);E(v),o(v)},[T,o]),k=(0,ra.useCallback)((C,v)=>{if(!v)return;if(T.some(_=>_.id===v.id)){p(`${n} already selected`);return}let B=[...T,v];E(B),o(B),p(""),u(""),x(!1)},[T,o,n,u]),D=(0,ra.useCallback)((C,v)=>{if(u(v),v==="")x(!1);else{let P=encodeURIComponent(v);r(P),p(""),x(!0)}},[r,u]);return(0,jt.jsxs)($,{sx:{width:"100%"},children:[(0,jt.jsx)(mp.Autocomplete,{id:`${n}-search-field`,style:{width:"100%"},options:e,getOptionLabel:()=>s,isOptionEqualToValue:(C,v)=>C.id===v.id,noOptionsText:a?"Loading...":`No ${n} found`,loading:a,open:m,onClose:()=>x(!1),disabled:i,value:void 0,inputValue:s,onChange:k,onInputChange:D,filterOptions:C=>C,disableClearable:!0,includeInputInList:!0,filterSelectedOptions:!0,disableListWrap:!0,clearOnBlur:!0,popupIcon:null,blurOnSelect:!0,forcePopupIcon:!1,renderInput:C=>(0,jt.jsx)(Qr,{...C,label:t||`Add ${n}`,error:!!d,helperText:d,fullWidth:!0,InputLabelProps:{style:{fontFamily:"inherit"}},InputProps:{...C.InputProps,endAdornment:(0,jt.jsx)(ra.default.Fragment,{children:a?(0,jt.jsx)(Gt,{color:"inherit",size:20}):null})}}),renderOption:(C,v)=>(0,qG.createElement)("li",{...C,key:v.id},(0,jt.jsx)($,{component:"li",sx:{"& > img":{mr:2,flexShrink:0}},children:(0,jt.jsxs)(mp.Grid2,{container:!0,alignItems:"center",children:[(0,jt.jsx)(mp.Grid2,{children:(0,jt.jsx)($,{sx:{color:"text.secondary",mr:2},children:f})}),(0,jt.jsx)(mp.Grid2,{size:"grow",children:(0,jt.jsx)(z,{variant:"body2",children:v.name})})]})}))}),(0,jt.jsxs)($,{sx:{display:"flex",flexWrap:"wrap",gap:.5,mt:T?.length>0?"0.5rem":""},children:[!h&&T?.length>0&&(0,jt.jsx)(Dt,{avatar:f,label:T[T.length-1]?.name,size:"small",onDelete:()=>R(T[T.length-1]?.id),deleteIcon:(0,jt.jsx)(Xt,{title:`Remove ${n}`,children:(0,jt.jsx)(Ft,{style:To})})},T[T.length-1]?.id),h&&T?.map(C=>(0,jt.jsx)(Dt,{avatar:(0,jt.jsx)(N1,{...To}),label:C.name,size:"small",onDelete:()=>R(C.id),deleteIcon:(0,jt.jsx)(Xt,{title:`Remove ${n}`,children:(0,jt.jsx)(Ft,{style:To})})},C.id)),T?.length>1&&(0,jt.jsx)(z,{onClick:()=>g(!h),sx:{cursor:"pointer"},children:h?"(hide)":`(+${T?.length-1})`})]})]})},ny=$Te;var rc=require("@mui/material"),GG=(0,rc.styled)("div")(({theme:e})=>({padding:"2.5rem",margin:"2rem 0",backgroundColor:e.palette.grey.A400,display:"flex",border:`1px solid ${e.palette.common.black}`,justifyContent:"space-between",transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)","&:hover":{transition:"background 150ms ease-out 0s, border 150ms ease-out 0s, transform 150ms ease-out 0s",transform:"translate3d(0px, -1px, 0px)",boxShadow:`${e.palette.common.black} 0px 8px 16px 0px`},"@media screen and (max-width: 992px)":{padding:"1.5rem"},"@media screen and (max-width: 500px)":{padding:"0.75rem"}})),zG=(0,rc.styled)("div")({display:"inline-flex"}),jG=(0,rc.styled)("div")(({theme:e})=>({fontSize:"2rem",margin:"0 2rem 0 1rem",color:e.palette.grey[800],alignSelf:"center",transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"})),KG=(0,rc.styled)("div")(({theme:e})=>({h2:{margin:"0.25rem 0"},p:{margin:"0.35rem 0",color:e.palette.grey[800],transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"}}));var gs=require("react/jsx-runtime"),YTe=({chapterNum:e,chapter:t})=>(0,gs.jsx)(GG,{id:t.frontmatter.courseTitle?t.frontmatter.courseTitle:void 0,children:(0,gs.jsxs)(zG,{children:[(0,gs.jsx)(jG,{children:e}),(0,gs.jsxs)(KG,{children:[(0,gs.jsx)("h2",{children:t.frontmatter.chapterTitle?t.frontmatter.chapterTitle:t.frontmatter.courseTitle}),(0,gs.jsx)("p",{children:t.frontmatter.description})]})]})}),iy=YTe;var P3=require("@mui/material"),_3=G(require("react"));var Du=require("@mui/material/styles");var R1t=(0,Du.styled)("div")(({theme:e})=>({marginLeft:".5rem",color:e.palette.background.secondary})),$G=(0,Du.styled)(Wf)({overflowY:"auto",scrollbarWidth:"none","&::-webkit-scrollbar":{width:"0em"}}),YG=(0,Du.styled)(Or)(()=>({pointerEvents:"auto",margin:"0.5rem 0rem 0.5rem 0rem",fontSize:"0.1rem",padding:"0"})),ZG=(0,Du.styled)(Or)(()=>({pointerEvents:"auto",margin:"0rem 0rem 0rem 0.5rem",fontSize:"0.1rem"})),QG=(0,Du.styled)("div")({marginRight:"0.75rem",marginLeft:"0.5rem"}),XG=(0,Du.styled)("div")({marginRight:"0.5rem"});var Kr=require("react/jsx-runtime"),ZTe=({navigationItems:e,MenuListProps:t={},ListItemTextProps:r={}})=>{let o=(0,P3.useTheme)(),a=(0,P3.useMediaQuery)(o.breakpoints.up("sm")),[n,i]=(0,_3.useState)(null),l=(s,u)=>{u.stopPropagation(),i(f=>f===s?null:s)};return(0,Kr.jsx)($G,{...t,dense:!0,children:e.map(s=>{let u=n===s.id,f=s.permission??!0,d=s.addDivider??!1;return!(s.showOnWeb??!0)&&a?null:(0,Kr.jsxs)(_3.default.Fragment,{children:[(0,Kr.jsxs)(At,{disabled:!f,onClick:s.onClick,"data-testid":`nav-item-${s.id}`,children:[(0,Kr.jsxs)(YG,{children:[s.icon&&(0,Kr.jsx)(QG,{children:s.icon}),(0,Kr.jsx)(Qt,{primary:s.title,...r})]}),s.subItems&&(0,Kr.jsx)(Qt,{"data-testid":`nav-toggle-${s.id}`,children:u?(0,Kr.jsx)($l,{onClick:m=>l(s.id,m)}):(0,Kr.jsx)(Ko,{onClick:m=>l(s.id,m)})})]}),s.subItems&&(0,Kr.jsx)(da,{in:u,timeout:"auto",unmountOnExit:!0,variant:"submenu",children:s.subItems.map(m=>(0,Kr.jsx)(At,{disabled:!m.permission,onClick:m.onClick,"data-testid":`nav-subitem-${m.id}`,children:(0,Kr.jsxs)(ZG,{children:[m.icon&&(0,Kr.jsx)(XG,{children:m.icon}),(0,Kr.jsx)(Qt,{primary:m.title,...r})]})},m.id))}),d&&(0,Kr.jsx)(ma,{})]},s.id)})})},ly=ZTe;var I3=require("@mui/material");var cp=require("react/jsx-runtime"),QTe=(0,I3.styled)("div")(({type:e,theme:t})=>({fontWeight:500,background:"#212529",color:"inherit",marginTop:"2rem",width:"100%",height:"100%",marginBottom:"2rem",padding:"0.5rem 1rem",borderRadius:0,borderStyle:"solid",borderColor:e==="warning"?t.palette.text.warning:t.palette.background.brand?.default,borderWidth:"0 0 0 4px"})),XTe=(0,I3.styled)("h4")(({type:e,theme:t})=>({color:e==="warning"?t.palette.text.warning:t.palette.background.brand?.default,fontSize:"1.35rem"})),JTe=(0,I3.styled)("p")(({theme:e})=>({color:e.palette.text.inverse})),e8e=({type:e="note",title:t,content:r})=>(0,cp.jsxs)(QTe,{type:e,children:[(0,cp.jsx)(XTe,{type:e,children:t}),(0,cp.jsx)(JTe,{children:(0,cp.jsx)(t3,{content:r})})]}),sy=e8e;var lz=require("re-resizable"),sz=G(require("react-draggable"));var Ts=require("react/jsx-runtime"),t8e=({height:e=24,width:t=24,fill:r="#E8EFF3",...o})=>(0,Ts.jsxs)("svg",{width:t,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...o,children:[(0,Ts.jsx)("g",{clipPath:"url(#clip0_34897_172744)",children:(0,Ts.jsx)("path",{d:"M6 10C4.9 10 4 10.9 4 12C4 13.1 4.9 14 6 14C7.1 14 8 13.1 8 12C8 10.9 7.1 10 6 10ZM18 10C16.9 10 16 10.9 16 12C16 13.1 16.9 14 18 14C19.1 14 20 13.1 20 12C20 10.9 19.1 10 18 10ZM12 10C10.9 10 10 10.9 10 12C10 13.1 10.9 14 12 14C13.1 14 14 13.1 14 12C14 10.9 13.1 10 12 10Z",fill:r})}),(0,Ts.jsx)("defs",{children:(0,Ts.jsx)("clipPath",{id:"clip0_34897_172744",children:(0,Ts.jsx)("rect",{width:"24",height:"24",fill:"white"})})})]}),uy=t8e;var $1t=(0,b.styled)(Or)(({theme:e})=>({padding:e.spacing(.5,.5),marginBlock:e.spacing(1),"& .MuiListItemText-primary":{fontSize:"1rem",textTransform:"capitalize",fontWeight:700},cursor:"pointer","&:hover":{backgroundColor:e.palette.action.hover},"& .MuiSvgIcon-root":{opacity:0,transition:"opacity 0.2s"},"&:hover .MuiSvgIcon-root":{opacity:1}})),Y1t=(0,b.styled)(Or,{shouldForwardProp:e=>e!=="isVisible"})(({theme:e,isVisible:t})=>({padding:e.spacing(.05,.5),fontStyle:t?"normal":"italic",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap","& .MuiSvgIcon-root":{height:20,width:20},"& .MuiListItemIcon-root":{minWidth:0,opacity:t?.8:.3},"& .MuiTypography-root":{fontSize:"0.9rem",opacity:t?1:.5}})),JG=(0,b.styled)("div")(({theme:e})=>({display:"flex",alignItems:"center",padding:e.spacing(4,2),alignContent:"stretch",justifyContent:"space-between",cursor:"move",background:e.palette.mode==="light"?"linear-gradient(90deg, #3B687B 0%, #507D90 100%)":"linear-gradient(90deg, #28353A 0%, #3D4F57 100%)",height:"3rem",flexShrink:0})),ez=(0,b.styled)($)(({theme:e})=>({padding:e.spacing(2),backgroundColor:e.palette.background.surfaces,overflow:"auto",flex:1,minHeight:0})),tz=(0,b.styled)("div")({height:"100%",display:"flex",flexDirection:"column",minHeight:"3rem"}),rz=(0,b.styled)($)(({theme:e,intitialPosition:t})=>({borderRadius:"8px",overflow:"hidden",flexShrink:0,zIndex:100,position:"absolute",backgroundColor:e.palette.background.blur?.light,boxShadow:`0 4px 16px ${e.palette.background.blur?.light}`,maxHeight:"80%",display:"flex",boxSizing:"border-box",...t})),oz=(0,b.styled)(uy)(({theme:e})=>({fill:e.palette.common.white,position:"absolute",top:"-0.3rem",left:"50%"})),az=(0,b.styled)("div")({display:"flex",gap:"1rem",justifyContent:"flex-end",alignItems:"center"}),nz=(0,b.styled)("div")({display:"flex",justifyContent:"end",alignItems:"center",flex:"1"}),k3=(0,b.styled)(tt)(({theme:e})=>({color:e.palette.common.white})),iz=(0,b.styled)("div")(()=>({position:"absolute",left:"0",right:"0",marginInline:"auto",width:"fit-content"}));var Vt=require("react/jsx-runtime"),r8e=({isOpen:e,id:t="panel",children:r,areAllExpanded:o,toggleExpandAll:a,handleClose:n,defaultSize:i,intitialPosition:l,sx:s,minimizePanel:u,title:f=""})=>{let d=(0,b.useTheme)();return e?(0,Vt.jsx)(sz.default,{handle:".drag-handle",children:(0,Vt.jsx)(rz,{intitialPosition:l,sx:s,children:(0,Vt.jsx)(lz.Resizable,{defaultSize:{width:i?.width||"18rem",height:i?.height||"auto"},onResize:()=>{window.dispatchEvent(new Event("panel-resize"))},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},children:(0,Vt.jsx)(tz,{children:(0,Vt.jsxs)(no,{children:[(0,Vt.jsx)("div",{className:"drag-handle",children:(0,Vt.jsxs)(JG,{children:[(0,Vt.jsx)($,{display:"flex",justifyContent:"flex-end",padding:"8px",children:a&&(0,Vt.jsx)(Xt,{title:o?"Collapse All":"Expand All",children:(0,Vt.jsx)(k3,{onClick:a,children:o?(0,Vt.jsx)(B2,{}):(0,Vt.jsx)(U2,{})})})}),(0,Vt.jsx)(oz,{}),(0,Vt.jsxs)(nz,{children:[(0,Vt.jsx)(az,{id:`${t}-panel-header-actions-container`}),(0,Vt.jsx)(iz,{children:f}),u&&(0,Vt.jsx)(k3,{onClick:u,children:(0,Vt.jsx)(nd,{fill:d.palette.common.white})}),(0,Vt.jsx)(k3,{onClick:n,children:(0,Vt.jsx)(Ft,{fill:d.palette.common.white})})]})]})}),(0,Vt.jsx)(ez,{className:"panel-body",children:r})]})})})})}):null},fy=({...e})=>(0,Vt.jsx)(r8e,{...e});var ac=require("react");var umt=(0,b.styled)($)(()=>({padding:"1rem",borderRadius:"1rem",backgroundColor:"white",width:"100%",alignSelf:"center",height:"20rem",marginBottom:"1rem",boxShadow:"0px 2px 10px rgba(0, 0, 0, 0.2)",display:"block","@media (max-width:900px)":{height:"18rem",marginInline:"0",padding:"0.5rem"}})),fmt=(0,b.styled)("div")(()=>({width:"100%",justifyContent:"center",display:"flex",alignItems:"center",marginTop:"20px"})),dmt=(0,b.styled)($)(()=>({display:"flex",justifyContent:"space-evenly",gap:"2.5rem",width:"100%"})),pmt=(0,b.styled)($)(()=>({display:"flex",flexWrap:"wrap",justifyContent:"space-evenly",gap:"2.5rem",width:"100%"})),mmt=(0,b.styled)("div")(({theme:e})=>({backgroundColor:e.palette.common.white,textAlign:"center",borderRadius:"1rem",width:"100%",padding:"1.5rem",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"})),dy=(0,b.styled)($)(({theme:e})=>({background:e.palette.mode==="light"?e.palette.background.default:e.palette.background.secondary,paddingTop:e.spacing(2),borderRadius:"1rem",display:"flex",alignItems:"center",flexDirection:"column"})),uz=(0,b.styled)($)(({theme:e})=>({paddingInline:e.spacing(2),display:"flex",alignItems:"center",placeSelf:"flex-start",justifyContent:"space-between",width:"100%"})),fz=(0,b.styled)(z)(({theme:e})=>({fontSize:"1.5rem",fontWeight:600,color:e.palette.text.default})),dz=(0,b.styled)(Rr)(({theme:e})=>({width:"200px",margin:"0.5rem",height:"100%",borderRadius:"1rem",position:"relative",overflow:"hidden",transition:"all 0.3s ease-in-out",background:n3(e.palette.mode==="light"),border:"1px solid transparent",boxShadow:"2px 2px 3px 2px rgb(0, 211, 169, 0.5)","&:hover":{transform:"translateY(-4px)",boxShadow:`2px 2px 3px 2px ${e.palette.text.brand}`,cursor:"pointer"}})),pz=(0,b.styled)("div")(()=>({display:"flex",gap:"10px",flexWrap:"nowrap",justifyContent:"center",width:"100%"})),mz=(0,b.styled)($)(()=>({width:"2rem",height:"2rem",padding:"0.25rem",borderRadius:"8px",backgroundColor:"#D6FFF7",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.3s ease","& svg":{transition:"transform 0.3s ease"},"&:hover svg":{transform:"scale(1.2)"},"& .clone-icon":{width:"20px",height:"20px"}})),cz=(0,b.styled)($a)(()=>({height:"100%",display:"flex",flexDirection:"column",padding:"12px",paddingBottom:"0px !important"})),xz=(0,b.styled)($)({display:"flex",justifyContent:"space-between",alignItems:"flex-start",marginBottom:"0.5rem",gap:"0.6rem"}),hz=(0,b.styled)(z)(({theme:e})=>({fontSize:"0.85rem",fontWeight:"bold",color:e.palette.text.default,lineHeight:1.2,marginTop:"4px",textTransform:"uppercase",letterSpacing:"0.5px",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"clip",maxWidth:"70%",height:"2.4em"})),gz=(0,b.styled)(z)(({theme:e})=>({fontSize:"24px",fontWeight:700,color:e.palette.icon.secondary,marginBottom:"0.5rem",lineHeight:1.2})),cmt=(0,b.styled)($)(({theme:e})=>({marginBottom:"1rem",padding:"8px",borderRadius:"8px",background:e.palette.mode==="light"?"#f8fafc":Pn,color:e.palette.mode==="light"?"rgba(26, 26, 26, .8)":e.palette.text.default,transition:"background 0.3s ease, filter 0.3s ease","&:hover":{filter:"brightness(0.98)"}})),Tz=(0,b.styled)(z)(({theme:e})=>({fontSize:"0.9rem",fontWeight:1e3,color:e.palette.text.default,lineHeight:1.3,marginBottom:"4px",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis",minHeight:"fit-content",maxHeight:"2.6em"})),Sz=(0,b.styled)(z)({fontSize:"0.75rem",marginBottom:"8px"}),Cz=(0,b.styled)($)(({theme:e})=>({display:"flex",gap:"15px",width:"100%",padding:"20px",background:e.palette.mode==="light"?e.palette.background.default:e.palette.background.secondary,borderRadius:"12px",boxShadow:"0 1px 3px rgba(0, 0, 0, 0.05)",paddingBottom:e.spacing(3)})),yz=(0,b.styled)($)(({theme:e})=>({padding:"1rem",color:e.palette.text.error,fontSize:"1rem",fontWeight:500}));var pn=require("react/jsx-runtime"),py=({open:e,handleClick:t})=>{let r=(0,b.useTheme)();return(0,pn.jsx)(xe,{title:e?"Hide Performers":"Show Performers",placement:"bottom",children:(0,pn.jsx)("span",{children:(0,pn.jsxs)(ke,{variant:"contained",onClick:t,sx:{height:"3.7rem",padding:"0.3rem 1rem 0.3rem 0.3rem"},style:{backgroundColor:e?void 0:r.palette.background.constant?.disabled},children:[(0,pn.jsx)(Kl,{style:{height:"2rem",width:"2rem",marginRight:"10px"}}),e?"Hide Performers":"Show Performers"]})})})},my=({handleClick:e})=>(0,pn.jsx)(xe,{title:"Open Leaderboard",placement:"bottom",children:(0,pn.jsx)(ke,{variant:"contained",onClick:e,sx:{height:"3.7rem",padding:"0.3rem",display:{xs:"inline-flex",sm:"none"}},children:(0,pn.jsx)(Kl,{style:{height:"2rem",width:"2rem"}})})}),bz=()=>(0,pn.jsx)(pz,{children:[...Array(5)].map((e,t)=>(0,pn.jsx)(g2,{variant:"rounded",height:"13.5rem",width:"inherit",sx:{minWidth:"150px"},style:{borderRadius:"1rem"}},t))});var St=require("react/jsx-runtime"),o8e={pathType:"pattern",page:0,pagesize:1,metrics:!0,expandUser:!0,trim:!0},cy={view:{label:"Most Opens",id:"open",countKey:"view_count"},clone:{label:"Most Clones",id:"clone",countKey:"clone_count"},download:{label:"Most Downloads",id:"download",countKey:"download_count"},deployment:{label:"Most Deploys",id:"deployments",countKey:"deployment_count"},share:{label:"Most Shares",id:"share",countKey:"share_count"}},oc=e=>({...o8e,order:`${cy[e].countKey} desc`}),a8e=({label:e,countKey:t,count:r,patternName:o,pattern:a,userName:n,status:i,id:l,onCardClick:s,onIconClick:u})=>{let f=()=>{s(a)},d=(m,x)=>{m.stopPropagation(),u(x)},p=(0,b.useTheme)();return(0,St.jsx)(dz,{elevation:0,status:i,onClick:f,children:(0,St.jsxs)(cz,{cardId:l,children:[(0,St.jsxs)(xz,{children:[(0,St.jsx)(hz,{children:e}),(0,St.jsx)(mz,{onClick:m=>d(m,`${t}+desc`),children:(0,St.jsx)(J2,{...$o,fill:p.palette.common.black})})]}),(0,St.jsx)(gz,{children:r}),(0,St.jsxs)($,{children:[(0,St.jsx)(Tz,{children:o}),(0,St.jsxs)(Sz,{children:["by ",n]})]})]})})},br=(e={})=>({search:e.search??"",order:e.order??"",pagesize:e.pagesize??0,page:e.page??0,...e}),vz=(0,ac.memo)(a8e);vz.displayName="StatCard";var n8e=e=>{let t=e(br(oc("view"))),r=e(br(oc("clone"))),o=e(br(oc("download"))),a=e(br(oc("deployment"))),n=e(br(oc("share"))),i={view:t,clone:r,download:o,deployment:a,share:n};return{queries:i,isLoading:Object.values(i).some(l=>l.isLoading),hasError:Object.values(i).some(l=>l.isError)}},i8e=(e,t)=>{let r=e[t],o=cy[t],a=r?.isSuccess&&r.data?.patterns?.[0];return a?{label:o.label,countKey:o.countKey,count:a[o.countKey],patternName:a.name||"Unknown",pattern:a,userName:a.user?.first_name||"Unknown",id:o.id,status:a?.catalog_data?.content_class}:null},l8e=({useGetCatalogFilters:e,onCardClick:t,onIconClick:r,onOpenLeaderboard:o})=>{let a=(0,b.useTheme)(),{queries:n,isLoading:i,hasError:l}=n8e(e),s=(0,b.useMediaQuery)(a.breakpoints.down("sm")),u=(0,ac.useMemo)(()=>Object.keys(cy).map(d=>i8e(n,d)).filter(d=>!!d),[n]);if(l)return(0,St.jsx)(dy,{children:(0,St.jsx)(yz,{children:"Error loading statistics. Please try again later."})});let f=u.map((d,p)=>(0,St.jsx)(vz,{...d,onCardClick:t,onIconClick:r},`${d.id}-${p}`));return(0,St.jsx)(no,{children:(0,St.jsxs)(dy,{children:[(0,St.jsxs)(uz,{children:[(0,St.jsxs)($,{display:"flex",alignItems:"center",gap:1,children:[(0,St.jsx)(fz,{children:"Top Performers"}),(0,St.jsx)(Kl,{style:{height:"2rem",width:"2rem",color:a.palette.icon.secondary,display:s?"none":"inline-flex"}})]}),o&&(0,St.jsx)("div",{children:(0,St.jsxs)(ke,{variant:"contained",onClick:()=>o(),children:[(0,St.jsx)(Kl,{style:{height:"2rem",width:"2rem",display:s?"inline-flex":"none"}}),(0,St.jsx)("p",{style:{margin:0,display:s?"none":"inline-flex"},children:"Open Leaderboard"})]})})]}),(0,St.jsxs)(Cz,{children:[i&&(0,St.jsx)(bz,{}),(0,St.jsx)(ou,{items:f})]})]})})},xy=(0,ac.memo)(l8e);var Qn=require("@mui/material"),wz=(0,Qn.styled)("div")({padding:"1rem 0","& h2":{margin:"1rem 0"},".get-started-desc":{margin:"1rem"}}),Ez=(0,Qn.styled)("div")(({theme:e})=>({display:"flex",cursor:"pointer",flexDirection:"row",flexWrap:"wrap","& a":{color:e.palette.text.primary,margin:"1rem"}})),Rz=(0,Qn.styled)("a")(({theme:e})=>({flex:"1",padding:"2rem",textDecoration:"none",background:e.palette.mode==="light"?"#EEEEEE":"#212121",minHeight:"21.5rem",transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)",borderRadius:"10px","&:hover":{boxShadow:`${e.palette.background.brand?.default} 0px 0px 7px`},"& a":{margin:"0 !important","&:hover":{color:e.palette.background.brand?.default}}})),Oz=(0,Qn.styled)("div")({display:"flex",alignItems:"center",gap:"1rem"}),Lmt=(0,Qn.styled)("div")({flex:"0 0 25%",alignSelf:"center",margin:"0 0.5rem"}),Dmt=(0,Qn.styled)("img")({height:"3rem",width:"3rem",maxWidth:"3rem",margin:"auto"}),Fmt=(0,Qn.styled)("svg")(({theme:e})=>({fontSize:"4.15rem",alignSelf:"center",flex:"0 0 25%",margin:"0 0.5rem",filter:e.palette.mode==="light"?"0%":"invert(100%)",transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"})),Nmt=(0,Qn.styled)("h2")({fontSize:"1.75rem",margin:"1rem 0"}),Bmt=(0,Qn.styled)("p")(({theme:e})=>({color:e.palette.text.primary,transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"}));var _a=require("react/jsx-runtime"),s8e=({Steps:e,PrerequisiteLine:t})=>(0,_a.jsxs)(wz,{children:[(0,_a.jsxs)("div",{className:"get-started-desc",id:"pre-requisites",children:[(0,_a.jsx)("h2",{children:"Prerequisites"}),(0,_a.jsx)("p",{children:t})]}),(0,_a.jsx)(Ez,{id:"Set up",children:e.map((r,o)=>(0,_a.jsxs)(Rz,{href:r.url,target:"_blank",children:[(0,_a.jsxs)(Oz,{children:[(0,_a.jsx)("h2",{children:r.heading}),typeof r.Icon=="string"?(0,_a.jsx)("img",{src:r.Icon,alt:r.heading,width:"40px",height:"40px"}):r.Icon]}),(0,_a.jsx)("p",{children:r.description})]},o))})]}),hy=s8e;var Az=require("@mui/material");var u8e=(0,Az.styled)("div")(({theme:e})=>({color:e.palette.text.primary,transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)",".chapter-sub-heading, .chapter-sub-heading a":{color:e.palette.mode==="light"?E2:R2,transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"},".chapter-alt-heading, .chapter-alt-heading a":{color:"gray"},"& a":{color:e.palette.background.brand?.default,textDecoration:"underline","&:hover":{color:e.palette.background.brand?.default}},"& p > code":{color:"inherit",padding:".2em .4em",margin:"0",fontSize:"85%",wordBreak:"normal",backgroundColor:e.palette.background.code,borderRadius:".25rem"},"& pre":{backgroundColor:"#011627",padding:"1em",borderRadius:"0.5rem",overflowX:"auto",color:"#d6deeb",position:"relative",textAlign:"left",width:"100%",margin:"1rem auto autocompleteClasses",fontFamily:"Courier New, Courier, monospace"},"& li code":{color:"inherit",padding:".2em .4em",margin:"0",fontSize:"85%",wordBreak:"normal",backgroundColor:e.palette.background.code,borderRadius:".25rem"},"& li a":{color:e.palette.text.default,textDecoration:"underline","&:hover":{color:e.palette.background.brand?.default}}})),gy=u8e;var Ty=require("react");var Ss=require("@mui/material"),Pz=(0,Ss.styled)("div")({width:"52rem",maxWidth:"90%"}),_z=(0,Ss.styled)("div")({display:"flex",alignItems:"center",background:"#323339",width:"100%",height:"2.875rem",borderRadius:"2px 2px 0 0"}),$mt=(0,Ss.styled)("div")({color:"#76767d",fontFamily:"'Courier New', Courier, monospace",fontSize:"13.5px",margin:"0 auto"}),Iz=(0,Ss.styled)("ul")({position:"absolute",display:"block",listStyle:"none",marginLeft:"1rem",marginTop:"0",marginBottom:"0",padding:"0","& li":{display:"inline-block",width:"0.875rem",height:"0.875rem",background:"#1d1e23",borderRadius:"0.75rem",marginRight:"7px"}}),kz=(0,Ss.styled)("div")({width:"100%",height:"100%",background:"#1d1e23",borderRadius:"0 0 2px 2px",padding:"24px 32px"}),Mz=(0,Ss.styled)("div")({width:"100%",height:"100%",position:"relative",overflow:"scroll",msOverflowStyle:"none",scrollbarWidth:"none","&::-webkit-scrollbar":{WebkitAppearance:"none",width:"0",height:"0"},"&.no-scroll-overflow-wrapper":{"& .code-wrapper":{bottom:"0",position:"absolute",minHeight:"100%"}}}),Lz=(0,Ss.styled)("div")(({theme:e})=>({"& pre":{padding:"0",margin:"0",width:"100%",height:"100%",fontStyle:"normal",fontWeight:"normal",fontSize:"12px",lineHeight:"27px",whiteSpace:"pre-wrap",color:e.palette.info.main,"&.short":{lineHeight:"16px"},"&.navy":{color:"#66a2ff"},"&.gray":{color:"#bdbec2"},"&.white":{color:"#fff"},wrapWord:"normal",[e.breakpoints.up("sm")]:{fontSize:"13.5px",lineHeight:"26px"}}}));var vo=require("react/jsx-runtime"),f8e=({lines:e,title:t,noScroll:r})=>(0,vo.jsxs)(Pz,{children:[(0,vo.jsxs)(_z,{children:[(0,vo.jsxs)(Iz,{children:[(0,vo.jsx)("li",{style:{backgroundColor:"red"}}),(0,vo.jsx)("li",{style:{backgroundColor:"yellow"}}),(0,vo.jsx)("li",{style:{backgroundColor:"green"}})]}),t&&(0,vo.jsx)("div",{className:"title",children:t})]}),(0,vo.jsx)(kz,{children:(0,vo.jsx)(Mz,{className:r?"no-scroll-overflow-wrapper":"",children:(0,vo.jsx)(Lz,{children:e&&e.map((o,a)=>(0,vo.jsx)(Ty.Fragment,{children:(0,vo.jsxs)("pre",{className:`${o.short?"short":""}`,style:{color:o.color?o.color:"blue"},children:[o.indent&&new Array(o.indent*2).fill({}).map((n,i)=>(0,vo.jsx)(Ty.Fragment,{children:"\xA0"},i)),o.code]})},a))})})})]}),Sy=f8e;var Dz=require("@mui/material"),Fz=(0,Dz.styled)("div")(({theme:e})=>({".chapter-back":{display:"flex",justifyContent:"space-between",alignItems:"center","& a":{display:"inline-flex","& svg":{alignSelf:"center",fontSize:"1.5rem",color:e.palette.grey[600],width:"100%",maxWidth:"1.5rem"},"& h4":{fontWeight:500,textTransform:"capitalize",fontSize:"1.25rem"},"&:hover":{"& svg, & h4":{color:e.palette.text.primary}}},".toc-toggle-btn":{display:"none"},".toc-menu-icon":{width:"1.5rem",height:"1.5rem",cursor:"pointer",fill:e.palette.secondary.main,transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"}},".toc-list":{"& ul":{position:"relative",paddingInlineStart:"2.65rem",MozPaddingStart:"2.65rem","&::after":{position:"absolute",inset:"1rem auto 1rem 1.7rem",width:"auto",height:"auto",borderLeft:"1px solid rgba(177, 182, 184, 0.25)",content:'""',zIndex:0},"& li":{width:"fit-content",margin:"1rem 0","&::marker":{color:"rgba(177, 182, 184, 0.75)"},"& p":{margin:0,fontSize:"1rem","& a":{color:e.palette.mode==="light"?"rgb(0 0 0 / 0.65)":"rgb(255 255 255 / 0.65)",transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"}},"&:hover":{"&::marker, & p, & a":{color:e.palette.background.brand?.default}}},".active-link":{"&::marker, & p, & a":{color:e.palette.background.brand?.default}}}}}));var Fu=require("react/jsx-runtime"),d8e=({availableChapters:e,currentChapter:t,onClick:r})=>{let o=a=>a.split("-").map(l=>l.charAt(0).toUpperCase()+l.slice(1)).join(" ");return(0,Fu.jsx)(Fz,{children:(0,Fu.jsx)("div",{className:"toc-list",children:(0,Fu.jsx)("ul",{className:"toc-ul toc-ul-open",children:e.map(a=>(0,Fu.jsx)("li",{className:a+".mdx"===t?"active-link":"",onClick:n=>{r(a,n)},children:(0,Fu.jsxs)("p",{className:"toc-item",children:[" ",o(a)]})},a))})})})},Cy=d8e;var Hz=require("react");var Nz=require("@mui/material"),Bz=(0,Nz.styled)("div")(({theme:e})=>({position:"sticky",top:"10rem",left:0,marginLeft:"-3rem",".go-back":{margin:"1rem 0",display:"flex",justifyContent:"space-between",alignItems:"center","& a":{display:"inline-flex","& svg":{alignSelf:"center",fontSize:"1.5rem",color:e.palette.text.disabled,width:"100%",maxWidth:"1.5rem"},"& h4":{fontWeight:500,textTransform:"capitalize",fontSize:"1.25rem",whiteSpace:"nowrap"},"&:hover":{"& svg, & h4":{color:e.palette.text.primary}}}},".toc-toggle-btn":{display:"none"},".toc-ul-open":{display:"flex",flexDirection:"column",marginTop:"0rem",listStyle:"none",height:"auto !important",opacity:"1 !important",transition:"all .4s !important"},".toc-menu-icon":{width:"1.5rem",height:"1.5rem",cursor:"pointer",fill:e.palette.common.white},".toc-sub-heading":{marginTop:"1rem",fontWeight:500,fontSize:"1.15rem"},".toc-item":{lineHeight:"1.5rem"},".toc-list":{"& ul":{position:"relative",paddingInlineStart:"1.5rem",listStyleType:"none","& li":{margin:"1rem 0 1rem 0.5rem",width:"fit-content","&::marker":{color:"rgba(177, 182, 184, 0.75)"},"& p":{margin:0,fontSize:"1rem","& a":{color:"rgba(0, 0, 0, 0.65)"}},"&:hover":{"&::marker, & p, & a":{color:e.palette.secondary.contrastText}}},".active-link":{"&::marker, & p, & a":{color:e.palette.secondary.contrastText}}}},"@media only screen and (max-width: 991px)":{position:"initial",marginLeft:"-0.5rem",width:"auto",".toc-toggle-btn":{display:"flex"},".go-back":{marginLeft:0},".toc-ul":{opacity:0,height:0,transition:"none",paddingLeft:".8rem !important"},".toc-item":{lineHeight:".8rem"}}}));var lr=require("react/jsx-runtime"),p8e=[{name:"Set up",link:"/cloud-native-management/meshery"},{name:"Run Meshery",link:"/cloud-native-management/meshery/getting-started"},{name:"Manage Meshery",link:"/cloud-native-management/meshery/operating-service-meshes"}],m8e=({coursesData:e})=>{let[t,r]=(0,Hz.useState)(!1);return(0,lr.jsxs)(Bz,{children:[(0,lr.jsxs)("div",{className:"go-back",children:[(0,lr.jsxs)("a",{href:"/learn/learning-paths",children:[(0,lr.jsx)(N2,{}),(0,lr.jsx)("h4",{children:"Learning Paths"})]}),(0,lr.jsx)("div",{className:"toc-toggle-btn",children:t?(0,lr.jsx)(Ft,{className:"toc-menu-icon",onClick:()=>{r(!t)}}):(0,lr.jsx)(ad,{className:"toc-menu-icon",onClick:()=>{r(!t)}})})]}),(0,lr.jsx)("div",{className:"toc-list",children:(0,lr.jsxs)("ul",{className:`toc-ul ${t?"toc-ul-open":""}`,children:[(0,lr.jsx)("a",{href:"#pre-requisites",children:(0,lr.jsx)("h5",{className:"toc-sub-heading",children:"Pre-requisites"})}),p8e.map((o,a)=>(0,lr.jsx)("li",{children:(0,lr.jsx)("p",{className:"toc-item",children:(0,lr.jsx)("a",{href:`#${o.name}`,children:o.name})})},a)),(0,lr.jsx)("a",{href:"#courses-list",children:(0,lr.jsx)("h5",{className:"toc-sub-heading",children:"Courses"})}),e.map((o,a)=>(0,lr.jsx)("li",{children:(0,lr.jsx)("p",{className:"toc-item",children:(0,lr.jsx)("a",{href:`#${o.frontmatter.courseTitle}`,children:o.frontmatter.courseTitle})})},a))]})})]})},yy=m8e;var Vz=require("@mui/material"),Uz=G(require("@mui/material/Autocomplete")),by=G(require("@mui/material/CircularProgress")),nc=require("react"),Wz=require("use-debounce");var Ct=require("react/jsx-runtime"),c8e=({usersData:e,disabled:t=!1,shareWithNewUsers:r,useGetAllUsersQuery:o})=>{let[a,n]=(0,nc.useState)(!1),[i,l]=(0,nc.useState)(""),[s,u]=(0,nc.useState)([]),[f,d]=(0,nc.useState)(!1),p=(0,b.useTheme)(),[m]=(0,Wz.useDebounce)(i,300),{data:x,isLoading:h}=o({search:m,page:0,pagesize:10},{skip:m.trim().length==0}),g=x?.data??[],T=async()=>{console.log("users to share with",s);try{d(!0);let v=await r(s);v.error?n(v.error):u([])}catch(v){console.log("error while sharing",v)}finally{d(!1)}},E=(v,P)=>{P&&(u(P),l(""))},R=(v,P,B)=>{B==="input"?l(P):B==="clear"&&l("")},k=g.filter(v=>!s.concat(e).find(P=>P.email===v.email)),D=t||f||s.length===0,C=({avatarObj:v,...P})=>(0,Ct.jsx)(Dt,{avatar:(0,Ct.jsx)(qt,{alt:v.first_name,src:v.avatar_url,children:v.avatar_url?"":v.first_name?.charAt(0)}),label:v.email,size:"small",...P},v.user_id);return(0,Ct.jsx)(Ct.Fragment,{children:(0,Ct.jsxs)($,{display:"flex",alignItems:"center",justifyContent:"space-between",gap:1,children:[(0,Ct.jsx)(Uz.default,{id:"user-search-field",sx:{width:"100%"},filterOptions:v=>v,options:k,renderTags:(v,P)=>v.map((B,_)=>(0,Ct.jsx)(C,{avatarObj:B,...P({index:_})})),disableClearable:!0,includeInputInList:!0,filterSelectedOptions:!0,multiple:!0,disableListWrap:!0,disabled:f,inputValue:i,loading:h,value:s,getOptionLabel:v=>v.email,noOptionsText:h?"Loading...":i==""?"Search using name or email":"No users found",onChange:E,onInputChange:R,isOptionEqualToValue:(v,P)=>v.email===P.email,renderInput:v=>(0,Ct.jsx)(Qr,{...v,placeholder:"Add Users",error:!!a,helperText:a,fullWidth:!0,label:"",disabled:D,sx:{"& .MuiOutlinedInput-root":{paddingInline:"0.5rem",paddingBlock:"0.1rem"}},InputProps:{...v.InputProps,endAdornment:(0,Ct.jsx)(Ct.Fragment,{children:h?(0,Ct.jsx)(by.default,{color:"inherit",size:20}):null})}}),renderOption:(v,P)=>(0,Ct.jsx)($,{component:"li",sx:{"& > img":{mr:2,flexShrink:0}},...v,children:(0,Ct.jsxs)(ce,{container:!0,alignItems:"center",children:[(0,Ct.jsx)(ce,{children:(0,Ct.jsx)($,{sx:{color:"text.secondary",mr:2},children:(0,Ct.jsx)(qt,{alt:P.first_name,src:P.avatar_url,children:P.avatar_url?"":(0,Ct.jsx)(Mn,{})})})}),(0,Ct.jsx)(ce,{size:"grow",children:P.deleted_at?.Valid?(0,Ct.jsxs)(z,{variant:"body2",color:"text.secondary",children:[P.email," (deleted)"]}):(0,Ct.jsxs)(Ct.Fragment,{children:[(0,Ct.jsxs)(z,{variant:"body2",children:[P.first_name," ",P.last_name]}),(0,Ct.jsx)(z,{variant:"body2",color:"text.secondary",children:P.email})]})})]})})}),(0,Ct.jsx)(Vz.Button,{variant:"contained",sx:{"&.Mui-disabled":{color:`${p.palette.text.secondary} !important`,backgroundColor:`${p.palette.action.disabled} !important`}},onClick:T,disabled:D,children:f?(0,Ct.jsx)(by.default,{size:24,sx:{color:"#fff"}}):"Share"})]})})},M3=c8e;var qz=require("@mui/material"),$r=G(require("react"));var Ue=require("react/jsx-runtime"),x8e=({usersData:e,setUsersData:t,label:r="Add User",setDisableSave:o,handleNotifyPref:a,notifyUpdate:n,isCreate:i,searchType:l,disabled:s=!1,currentUserData:u,searchedUsers:f=[],isUserSearchLoading:d,fetchSearchedUsers:p,usersSearch:m,setUsersSearch:x})=>{let[h,g]=(0,$r.useState)(""),[T,E]=(0,$r.useState)(!1),[R,k]=(0,$r.useState)(!1),[D,C]=(0,$r.useState)(!0),[v,P]=(0,$r.useState)(""),[B,_]=(0,$r.useState)(e||[]);(0,$r.useEffect)(()=>{_(e||[])},[e]);let J=(0,$r.useMemo)(()=>{if(D&&!m&&u)return[u];let N=f.filter(L=>L.user_id!==u?.user_id);return!m&&u?[u,...N]:N},[f,u,m,D,B]),X=(0,$r.useCallback)((N,L)=>{L.stopPropagation();let M=B.filter(F=>F.user_id!==N);_(M),t(M),o&&o(!1)},[B,t,o,p,v]),H=(0,$r.useCallback)((N,L)=>{if(!L)return;let M=B.some(V=>V.user_id===L.user_id),F=L.deleted_at?.Valid===!0;if(M||F){g(M?"User already selected":"User does not exist");return}P(""),x(""),g(""),E(!1),_(V=>[...V,L]),t(V=>[...V,L]),o&&o(!1)},[B,t,o,x]),q=(0,$r.useCallback)((N,L)=>{if(P(L),L==="")E(!0),x(""),C(!0);else{let M=encodeURIComponent(L);p(M),g(""),E(!0),C(!1)}},[p]);return(0,Ue.jsxs)(Ue.Fragment,{children:[(0,Ue.jsx)(qz.Autocomplete,{id:"user-search-field",style:{width:"100%"},open:T,options:J,getOptionLabel:()=>v,isOptionEqualToValue:(N,L)=>N.user_id===L.user_id,onOpen:()=>E(!0),onClose:()=>E(!1),inputValue:v,onChange:H,onInputChange:q,filterOptions:(N,{inputValue:L})=>N.filter(M=>{let F=L.toLowerCase();return M.first_name?.toLowerCase().includes(F)||M.last_name?.toLowerCase().includes(F)||M.email?.toLowerCase().includes(F)}),loading:d,disabled:s,disableClearable:!0,value:void 0,selectOnFocus:!1,blurOnSelect:!0,clearOnBlur:!0,popupIcon:null,forcePopupIcon:!1,noOptionsText:d?"Loading...":"No users found",renderInput:N=>(0,Ue.jsx)(Qr,{...N,label:r,error:!!h,helperText:h,InputLabelProps:{style:{fontFamily:"inherit"}},InputProps:{...N.InputProps,endAdornment:(0,Ue.jsx)($r.default.Fragment,{children:d?(0,Ue.jsx)(Gt,{color:"inherit",size:20}):null})}}),renderOption:(N,L)=>(0,Ue.jsx)("li",{...N,id:L.user_id,children:(0,Ue.jsxs)($,{sx:{"& > img":{mr:2,flexShrink:0}},children:[" ",(0,Ue.jsxs)(ce,{container:!0,alignItems:"center",children:[(0,Ue.jsx)(ce,{children:(0,Ue.jsx)($,{sx:{color:"text.secondary",mr:2},children:(0,Ue.jsx)(qt,{alt:L.first_name,src:L.avatar_url,children:L.avatar_url?"":(0,Ue.jsx)(Mn,{})})})}),(0,Ue.jsx)(ce,{size:"grow",children:L.deleted?(0,Ue.jsxs)(z,{variant:"body2",color:"text.secondary",children:[L.email," (deleted)"]}):(0,Ue.jsxs)(Ue.Fragment,{children:[(0,Ue.jsxs)(z,{variant:"body2",children:[L.first_name," ",L.last_name]}),(0,Ue.jsx)(z,{variant:"body2",color:"text.secondary",children:L.email})]})})]})]})})}),!i&&(0,Ue.jsx)(c2,{row:!0,children:(0,Ue.jsx)("div",{style:{display:"flex",flexWrap:"nowrap"},children:(0,Ue.jsx)(Ml,{control:(0,Ue.jsx)(Yr,{checked:n,onChange:a,name:"notify",color:"primary"}),label:`Notify ${l} of membership change`})})}),(0,Ue.jsxs)($,{sx:{display:"flex",flexWrap:"wrap",gap:.5,mt:e?.length>0?"0.5rem":""},children:[!R&&B?.[0]&&(0,Ue.jsx)(Dt,{avatar:(0,Ue.jsx)(qt,{alt:B[0].first_name,src:B[0].avatar_url,children:!B[0].avatar_url&&B[0].first_name?.[0]}),label:B[0].email,onDelete:N=>X(B[0].user_id,N),deleteIcon:(0,Ue.jsx)(Xt,{title:"Remove user",children:(0,Ue.jsx)(Ft,{style:To})}),size:"small"},B[0].user_id),R&&B?.map(N=>(0,Ue.jsx)(Dt,{avatar:(0,Ue.jsx)(qt,{alt:N.first_name,src:N.avatar_url,children:!N.avatar_url&&N.first_name?.[0]}),label:N.email,onDelete:L=>X(N.user_id,L),deleteIcon:(0,Ue.jsx)(Xt,{title:"Remove user",children:(0,Ue.jsx)(Ft,{style:To})}),size:"small"},N.user_id)),B?.length>1&&(0,Ue.jsx)(z,{onClick:()=>k(!R),sx:{cursor:"pointer"},children:R?"(hide)":`(+${B.length-1})`})]})]})},vy=x8e;var na=require("@mui/material"),Uu=require("@mui/material/StepConnector");function xp(e,...t){let r=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(o=>r.searchParams.append("args[]",o)),`Minified MUI error #${e}; visit ${r} for the full message.`}var Jz=G(require("@emotion/styled"));function Gz(e){for(var t=0,r,o=0,a=e.length;a>=4;++o,a-=4)r=e.charCodeAt(o)&255|(e.charCodeAt(++o)&255)<<8|(e.charCodeAt(++o)&255)<<16|(e.charCodeAt(++o)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(a){case 3:t^=(e.charCodeAt(o+2)&255)<<16;case 2:t^=(e.charCodeAt(o+1)&255)<<8;case 1:t^=e.charCodeAt(o)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var zz={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function jz(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var h8e=!1,g8e=/[A-Z]|^ms/g,T8e=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Zz=function(t){return t.charCodeAt(1)===45},Kz=function(t){return t!=null&&typeof t!="boolean"},wy=jz(function(e){return Zz(e)?e:e.replace(g8e,"-$&").toLowerCase()}),$z=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(T8e,function(o,a,n){return Xn={name:a,styles:n,next:Xn},a})}return zz[t]!==1&&!Zz(t)&&typeof r=="number"&&r!==0?r+"px":r},S8e="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function ic(e,t,r){if(r==null)return"";var o=r;if(o.__emotion_styles!==void 0)return o;switch(typeof r){case"boolean":return"";case"object":{var a=r;if(a.anim===1)return Xn={name:a.name,styles:a.styles,next:Xn},a.name;var n=r;if(n.styles!==void 0){var i=n.next;if(i!==void 0)for(;i!==void 0;)Xn={name:i.name,styles:i.styles,next:Xn},i=i.next;var l=n.styles+";";return l}return C8e(e,t,r)}case"function":{if(e!==void 0){var s=Xn,u=r(e);return Xn=s,ic(e,t,u)}break}}var f=r;if(t==null)return f;var d=t[f];return d!==void 0?d:f}function C8e(e,t,r){var o="";if(Array.isArray(r))for(var a=0;a<r.length;a++)o+=ic(e,t,r[a])+";";else for(var n in r){var i=r[n];if(typeof i!="object"){var l=i;t!=null&&t[l]!==void 0?o+=n+"{"+t[l]+"}":Kz(l)&&(o+=wy(n)+":"+$z(n,l)+";")}else{if(n==="NO_COMPONENT_SELECTOR"&&h8e)throw new Error(S8e);if(Array.isArray(i)&&typeof i[0]=="string"&&(t==null||t[i[0]]===void 0))for(var s=0;s<i.length;s++)Kz(i[s])&&(o+=wy(n)+":"+$z(n,i[s])+";");else{var u=ic(e,t,i);switch(n){case"animation":case"animationName":{o+=wy(n)+":"+u+";";break}default:o+=n+"{"+u+"}"}}}}return o}var Yz=/label:\s*([^\s;{]+)\s*(;|$)/g,Xn;function Qz(e,t,r){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var o=!0,a="";Xn=void 0;var n=e[0];if(n==null||n.raw===void 0)o=!1,a+=ic(r,t,n);else{var i=n;a+=i[0]}for(var l=1;l<e.length;l++)if(a+=ic(r,t,e[l]),o){var s=n;a+=s[l]}Yz.lastIndex=0;for(var u="",f;(f=Yz.exec(a))!==null;)u+="-"+f[1];var d=Gz(a)+u;return{name:d,styles:a,next:Xn}}var Oy=require("@emotion/react");function Ey(e,t){let r=(0,Jz.default)(e,t);return process.env.NODE_ENV!=="production"?(...o)=>{let a=typeof e=="string"?`"${e}"`:"component";return o.length===0?console.error([`MUI: Seems like you called \`styled(${a})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join(`
|
|
79
|
+
`,Fge=(0,Qo.styled)(nd)(({theme:e})=>({height:"2.25rem",width:"2.25rem",fill:e.palette.common.white,cursor:"pointer"})),Nge=(0,Qo.styled)(q2)(({theme:e})=>({height:"2.25rem",width:"2.25rem",fill:e.palette.common.white,cursor:"pointer"})),Mm=(0,Qo.styled)("div")(({theme:e})=>({background:e.palette.mode==="light"?Si.header:Ti.header,color:"#eee",display:"flex",justifyContent:"space-between",alignItems:"center",padding:"1rem",textAlign:"center"})),QW=({headerIcon:e})=>{let[t,r]=(0,Ru.useState)(!1),[o,a]=(0,Ru.useState)(""),n=(0,Ru.useRef)(null),[i,l]=(0,Ru.useState)(null);return{isOpen:t,open:t,openModal:({title:f,reactNode:d=null,onClose:p})=>{f&&a(f),p&&(n.current=p),r(!0),d&&l(d)},reactNode:i,title:o,headerIcon:e,closeModal:()=>{r(!1),n.current&&n.current(),l(null),a(""),n.current=null}}},Mr=(0,Qo.styled)(An)(({theme:e})=>({padding:"1rem",backgroundColor:e.palette.background.surfaces,overflowY:"auto",height:"100%",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"},"-ms-overflow-style":"none"})),Bge=(0,Qo.styled)("div",{shouldForwardProp:e=>e!=="variant"})(({theme:e,variant:t,hasHelpText:r})=>({background:t==="filled"?e.palette.mode==="light"?Si.fotter:Ti.fotter:"transparent",display:"flex",alignItems:"center",justifyContent:r?"space-between":"end",padding:"1rem",gap:"1rem","&& .InfoCircleIcon":{color:t==="filled"?e.palette.common.white:e.palette.background.info?.default}})),Lr=({open:e,closeModal:t,title:r,headerIcon:o,reactNode:a,children:n,maxWidth:i="xs",isFullScreenModeAllowed:l,...s})=>{let[u,f]=(0,Ru.useState)(!1),d=()=>{f(p=>!p)};return(0,kr.jsxs)(Dge,{maxWidth:i,open:e,onClose:t,"aria-labelledby":"alert-dialog-slide-title","aria-describedby":"alert-dialog-slide-description",fullScreen:u,fullWidth:!u,...s,children:[r&&(0,kr.jsxs)(Mm,{children:[o&&o,(0,kr.jsx)(z,{component:"div",variant:"h6",children:r}),(0,kr.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"1rem"},children:[l&&(0,kr.jsx)(xe,{title:u?"Exit Fullscreen":"Enter Fullscreen",children:u?(0,kr.jsx)(Nge,{onClick:d}):(0,kr.jsx)(Fge,{onClick:d})}),(0,kr.jsx)(Ou,{onClick:t,children:(0,kr.jsx)(Ft,{..._d,fill:"#fff"})})]})]}),a&&a,n&&n]})},io=({helpText:e,children:t,variant:r})=>(0,kr.jsxs)(Bge,{variant:r,hasHelpText:!!e,children:[e&&(0,kr.jsx)(xe,{title:e,variant:"standard",placement:"top",children:(0,kr.jsx)(tt,{children:(0,kr.jsx)(G2,{...Jr,className:"InfoCircleIcon"})})}),t]}),un=(0,Qo.styled)(CT)(({theme:e})=>({backgroundColor:e.palette.background.brand?.default,color:e.palette.text.constant?.white,"&:hover":{background:e.palette.background.brand?.hover},"&.MuiButton-contained.Mui-disabled":{color:e.palette.text.constant?.disabled,backgroundColor:e.palette.background.constant?.disabled}})),fn=(0,Qo.styled)(vA)(({theme:e})=>({"&.MuiButton-outlined":{border:`1px solid ${e.palette.background.constant?.white}`,color:e.palette.text.constant?.white,backgroundColor:"transparent","&:hover":{background:"transparent",color:e.palette.text.constant?.white}},"&.MuiButton-outlined.Mui-disabled":{color:e.palette.text.disabled,border:"none",backgroundColor:e.palette.background.brand?.disabled}})),XW=(0,Qo.styled)(wA)(({theme:e})=>({color:e.palette.text.inverse})),JW=(0,Qo.styled)(CT)(({theme:e})=>({backgroundColor:e.palette.background.error?.default,color:e.palette.text.constant?.white,"&:hover":{background:e.palette.background.error?.hover}})),Hge=(0,Qo.styled)($)(()=>({width:"100%",display:"flex",justifyContent:"end",gap:"1rem"})),Xd=({primaryText:e,secondaryText:t,primaryButtonProps:r,secondaryButtonProps:o})=>(0,kr.jsxs)(Hge,{children:[(0,kr.jsx)(fn,{...o,children:t}),(0,kr.jsx)(un,{...r,children:e})]});var Jd=require("@mui/material");var eq=(0,Jd.styled)("div")(({theme:e})=>({backgroundColor:e.palette.background.surfaces})),tq=(0,Jd.styled)("div")(()=>({zIndex:"100",borderRadius:"5px"})),rq=(0,Jd.styled)("div")(()=>({padding:"1.25rem 1rem",display:"flex",justifyContent:"flex-end",background:"linear-gradient(90deg, #3B687B 0%, #507D90 100%)",boxShadow:"inset 0px 3px 5px 0px rgba(0,0,0,0.25)",position:"relative",zIndex:"100"})),oq=(0,Jd.styled)(z)({fontSize:"18px"}),aq=(0,Jd.styled)("div")(()=>({display:"flex",borderRadius:"5px 5px 0px 0px",justifyContent:"space-between",padding:"11px 16px",height:"52px",fill:Pt,boxShadow:"inset 0px -1px 3px 0px rgba(0,0,0,0.2)",background:"linear-gradient(90deg, #3B687B 0%, #507D90 100%)"}));var bo=require("react/jsx-runtime");function Vge({title:e,leftHeaderIcon:t,helpText:r,helpArea:o,actions:a,hideActions:n=!1,content:i,closeComponent:l}){return(0,bo.jsxs)(tq,{children:[(0,bo.jsxs)(aq,{children:[t&&(0,bo.jsx)("div",{style:{display:"flex",alignItems:"center"},children:t}),e&&(0,bo.jsx)(bo.Fragment,{children:(0,bo.jsx)("div",{style:{display:"flex",alignItems:"center",color:"white"},children:(0,bo.jsx)(oq,{children:e})})}),(0,bo.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[r&&(0,bo.jsx)(bo.Fragment,{children:o}),l]})]}),(0,bo.jsx)(eq,{children:i}),!n&&(0,bo.jsx)(rq,{children:a})]})}var Lm=Vge;var Tt=require("@mui/material");var nq=(0,Tt.styled)("div")({cursor:"pointer",width:"30px",height:"30px",display:"flex",alignItems:"center",fill:gi}),Uge={"bottom-center":{open:{bottom:"0px",left:"50%",transform:"translateX(-50%)"},closed:{bottom:"-42%",left:"50%",transform:"translateX(-50%)"}},"bottom-right":{open:{bottom:"0px",right:"10px"},closed:{bottom:"-448px",right:"10px"}},"bottom-left":{open:{bottom:"0px",left:"10px"},closed:{bottom:"-448px",left:"10px"}},"right-top":{open:{top:"0px",right:"0px"},closed:{top:"0px",right:"-448px"}},"right-middle":{open:{top:"50%",right:"0px",transform:"translateY(-50%)"},closed:{top:"50%",right:"-448px",transform:"translateY(-50%)"}},"right-bottom":{open:{bottom:"0px",right:"0px"},closed:{bottom:"0px",right:"-448px"}}},iq=(0,Tt.styled)(Tt.Box)(({isOpen:e,renderPosition:t})=>({position:"fixed",transition:"all 0.5s ease",...Uge[t][e?"open":"closed"]})),lq=(0,Tt.styled)("div")({display:"flex",flexDirection:"column",justifyContent:"center",transition:"bottom 0.5s ease",padding:"1.688rem 1.188rem",width:"28rem",height:"12rem"}),sq=(0,Tt.styled)("div")({display:"flex",alignItems:"center",paddingTop:"0.5px",height:"20px",width:"21.188rem"}),uq=(0,Tt.styled)("div")({width:"24px",height:"24px"}),iut=(0,Tt.styled)(Tt.Button)(({isOpen:e})=>({color:"white",width:"4.313rem",height:"2.25rem",textTransform:"none",boxShadow:"0px 1px 8px rgba(0, 0, 0, 0.25)",backgroundColor:e?$s.main:Ze,"&:hover":{backgroundColor:GM}})),fq=(0,Tt.styled)(Tt.Button)(({theme:e,renderPosition:t})=>({backgroundColor:Xf,color:gi,borderRadius:"5px",padding:"10px 20px",fontSize:"16px",transition:"bottom 0.5s ease",position:"fixed",...Wge[t],"&:hover":{backgroundColor:e.palette.mode==="dark"?Tr:"#213A45"}})),Wge={"bottom-center":{bottom:"-10px",left:"50%",transform:"translateX(-50%)"},"bottom-right":{bottom:"-10px",right:"10px"},"bottom-left":{bottom:"-10px",left:"10px"},"right-top":{top:"8%",right:"-45px",transform:"rotate(-90deg)"},"right-middle":{top:"50%",right:"-45px",transform:"rotate(-90deg)"},"right-bottom":{bottom:"10%",right:"-45px",transform:"rotate(-90deg)"}},dq=(0,Tt.styled)("div")(({theme:e})=>({display:"block",right:"0",backgroundColor:e.palette.mode==="dark"?"#333333":gi,bottom:"0",width:"100%",zIndex:"100",position:"relative",height:"100%",alignItems:"center",transition:"bottom 0.5s ease"})),pq=(0,Tt.styled)(Tt.Box)(({isOpen:e,theme:t})=>({position:"relative",bottom:e?"0px":"-240px",right:"0",color:t.palette.text.default,backgroundColor:t.palette.mode==="dark"?js:Pt,border:`1px solid ${QM}`,padding:"20px",width:"28rem",height:"333.5px",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",transition:"bottom 0.5s ease",fontSize:"1.5rem",textAlign:"center"})),mq=(0,Tt.styled)(Tt.Box)({display:"flex",justifyContent:"space-between",alignSelf:"center"}),cq=(0,Tt.styled)(Tt.Button)(({theme:e,isOpen:t})=>({fontSize:"16px",lineHeight:1,letterSpacing:"0.029em",textTransform:"none",width:"100%",height:"5rem",display:"flex",padding:"0rem",borderRadius:"0px",flexDirection:"column",borderBottom:t?`2px solid ${Ze}`:"",background:t?e.palette.mode==="dark"?Tr:ha:e.palette.mode==="dark"?js:Bl,color:t?e.palette.mode==="dark"?ha:Tr:e.palette.mode==="dark"?ha:ha,fill:t?e.palette.icon.default:ha,stroke:t?e.palette.icon.inverse:e.palette.icon.brand,"&:hover":{color:e.palette.text.default,backgroundColor:e.palette.background.hover,fill:e.palette.icon.default}})),xq=(0,Tt.styled)("textarea")(({theme:e})=>({width:"100%",background:"transparent",border:`1px solid ${Ks}`,borderRadius:"4px",color:e.palette.mode==="dark"?ha:Tr,fontSize:"16px",paddingTop:"10.5px",paddingBottom:"10.5px",paddingLeft:"0.6rem",paddingRight:"0.6rem",resize:"none",fontFamily:"inherit",fontStyle:"normal","&::placeholder":{color:e.palette.mode==="dark"?ha:js},"&:focus":{outline:`1px solid ${ko}`}})),hq=(0,Tt.styled)("div")(({theme:e})=>({display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"space-between",height:"137px",color:e.palette.text.default})),gq=(0,Tt.styled)("a")({textDecoration:"underline",color:"inherit","&:hover":{color:"inherit"}}),Tq=(0,Tt.styled)(Tt.Checkbox)({color:`${Pt} !important`,marginLeft:"-11px",paddingLeft:"0px"}),Sq=(0,Tt.styled)("div")({padding:"1.5rem 1rem",width:"28rem",height:"12rem"}),Cq=(0,Tt.styled)("div")({padding:"0px",width:"30px",height:"30px",display:"flex",alignItems:"center"});var Le=require("react/jsx-runtime"),qge="Some account and system information may be sent to Layer5. We will use it to fix problems and improve our services, subject to our [Privacy Policy](https://layer5.io/company/legal/privacy) and [Terms of Service](https://layer5.io/company/legal/terms-of-service). We may email you for more information or updates.",xC=[{icon:(0,Le.jsx)(P1,{}),label:"Issue",placeholder:"I\u2019m having an issue with...",isTextInput:!0},{icon:(0,Le.jsx)(Z2,{}),label:"Suggestion",placeholder:"I have a suggestion about...",isTextInput:!0},{icon:(0,Le.jsx)(z2,{}),label:"Meet Request",isTextInput:!1,innerComponent:(0,Le.jsxs)(hq,{children:[(0,Le.jsxs)(p3.default,{style:{lineHeight:"2.5",textAlign:"center"},children:["Need help or have more feedback than fits here?",(0,Le.jsx)("br",{})," Meet with us."]}),(0,Le.jsx)(gq,{target:"_blank",href:"https://calendar.google.com/calendar/appointments/schedules/AcZssZ3pmcApaDP4xd8hvG5fy8ylxuFxD3akIRc5vpWJ60q-HemQi80SFFAVftbiIsq9pgiA2o8yvU56",children:"Select a time convenient for you."})]})}],Gge=({onSubmit:e,containerStyles:t,feedbackOptionStyles:r,renderPosition:o,defaultMessage:a=void 0,defaultOpen:n=!1})=>{let[i,l]=(0,ep.useState)(n),[s,u]=(0,ep.useState)(!1),[f,d]=(0,ep.useState)(xC[0]),[p,m]=(0,ep.useState)(a),[x,h]=(0,ep.useState)(!!a);return(0,Le.jsxs)(Le.Fragment,{children:[(0,Le.jsx)(fq,{onClick:()=>{l(!i),d(xC[0]),u(!1),m("")},style:t,renderPosition:o,children:"Feedback"}),(0,Le.jsx)(iq,{isOpen:i,style:t,renderPosition:o,children:s?(0,Le.jsxs)(pq,{isOpen:i,children:[(0,Le.jsx)(l5,{width:"32",height:"32"}),"Submitting your feedback..."]}):(0,Le.jsx)(Le.Fragment,{children:(0,Le.jsx)(Lm,{onClose:()=>{},open:!0,closeComponent:(0,Le.jsx)(nq,{onClick:()=>l(!1),children:(0,Le.jsx)(Ft,{width:"30",height:"30",fill:gi})}),actions:(0,Le.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,Le.jsxs)(sq,{children:[(0,Le.jsx)(Tq,{checked:x,onChange:R=>{h(R.target.checked)}}),(0,Le.jsx)(p3.default,{style:{color:"white",fontSize:"12px",height:"15px"},children:"We may email you for more information or updates"})]}),(0,Le.jsx)(un,{type:"submit",disabled:!(p&&x),isOpen:!(p&&x),onClick:()=>{u(!0),p&&x&&e({label:f?.label||"",message:p}),setTimeout(()=>{l(!1),d(void 0),u(!1),m("")},2e3)},children:"Send"})]}),leftHeaderIcon:(0,Le.jsx)(P1,{}),title:"Feedback",helpArea:(0,Le.jsx)(xe,{placement:"top",title:qge,arrow:!0,children:(0,Le.jsx)(Cq,{children:(0,Le.jsx)(n5,{width:"30",height:"30"})})}),helpText:"Help",content:(0,Le.jsxs)(dq,{children:[(0,Le.jsx)(mq,{children:xC?.map(R=>(0,Le.jsxs)(cq,{style:r,type:"button",onClick:()=>{d(R)},isOpen:f?.label===R.label,children:[(0,Le.jsx)(uq,{children:R.icon}),(0,Le.jsx)(p3.default,{children:R.label})]},R.label))}),f?.isTextInput?(0,Le.jsx)(lq,{children:(0,Le.jsx)(xq,{value:p||"",onChange:R=>{m(R.target.value)},required:!0,placeholder:f.placeholder,rows:5,cols:30})}):(0,Le.jsx)(Sq,{children:f?.innerComponent})]})})})})]})},hC=Gge;var Fm=require("@mui/material"),Au=G(require("react"));var Dm=require("react/jsx-runtime");function yq(e,t){if(!e||e.length!=2)throw Error("FlipCard requires exactly two child components");return e[t]}var zge=(0,Fm.styled)("div")(({theme:e})=>({height:"100%",backgroundColor:"transparent",perspective:e.spacing(125)})),jge=(0,Fm.styled)("div")(({theme:e})=>({padding:e.spacing(2),borderRadius:e.spacing(1),transformStyle:"preserve-3d",boxShadow:"0 4px 8px 0 rgba(0,0,0,0.2)",backgroundColor:e.palette.mode==="dark"?u1:Pt,cursor:"pointer",transformOrigin:"50% 50% 10%"})),Kge=(0,Fm.styled)("div")({backfaceVisibility:"hidden"}),$ge=(0,Fm.styled)("div")({backfaceVisibility:"hidden",transform:"scale(-1, 1)",wordBreak:"break-word"});function Nm({duration:e=500,onClick:t,onShow:r,children:o,disableFlip:a=!1,padding:n}){let[i,l]=Au.default.useState(!1),[s,u]=Au.default.useState(!1),f=Au.default.useRef(null),d=yq(o,0),p=yq(o,1);return Au.default.useEffect(()=>{f.current&&clearTimeout(f.current),f.current=setTimeout(()=>{u(i)},e/6)},[i,e]),(0,Dm.jsx)(zge,{onClick:()=>{a||(l(m=>!m),t&&t(),r&&r())},children:(0,Dm.jsx)(jge,{style:{transform:i?"scale(-1,1)":void 0,transition:`transform ${e}ms`,padding:n},children:s?(0,Dm.jsx)($ge,{children:Au.default.isValidElement(p)?p:null}):(0,Dm.jsx)(Kge,{children:Au.default.isValidElement(d)?d:null})})})}var Pu=require("@mui/material"),bq=G(require("lodash")),vq=require("react");var ms=require("react/jsx-runtime"),Bm=({id:e})=>{let[t,r]=(0,vq.useState)(!1),o=(0,b.useTheme)(),a=i=>{i.stopPropagation(),navigator.clipboard.writeText(e),r(!0),setTimeout(()=>{r(!1)},2e3)},n=bq.default.truncate(e,{length:15});return(0,ms.jsxs)(Pu.Box,{sx:{display:"flex",alignItems:"center"},children:[(0,ms.jsx)(Pu.Tooltip,{title:e,placement:"top",children:(0,ms.jsx)(Pu.Typography,{variant:"body2",style:{cursor:"pointer",textWrap:"nowrap",color:o.palette.text.primary},children:n})}),(0,ms.jsx)(Pu.Tooltip,{title:t?"Copied!":"Copy",placement:"top",children:(0,ms.jsx)("div",{onClick:a,style:{padding:"0.25rem"},children:(0,ms.jsx)(Ta,{width:16,height:16,fill:o.palette.action.active})})})]})};var gC=G(require("react"));function wq(){let{innerWidth:e,innerHeight:t}=window;return{width:e,height:t}}function Xo(){let[e,t]=gC.default.useState(wq());return gC.default.useEffect(()=>{let r;function o(){r&&clearTimeout(r),r=window.setTimeout(()=>{t(wq())},500)}return window.addEventListener("resize",o),()=>{window.removeEventListener("resize",o),r&&clearTimeout(r)}},[]),e}var we=G(require("react")),rTe=require("react-dom");function Eq(e){var t,r,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(r=Eq(e[t]))&&(o&&(o+=" "),o+=r);else for(t in e)e[t]&&(o&&(o+=" "),o+=t);return o}function Yge(){for(var e,t,r=0,o="";r<arguments.length;)(e=arguments[r++])&&(t=Eq(e))&&(o&&(o+=" "),o+=t);return o}var Hm=Yge;var Zge={data:""},Qge=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||Zge;var Xge=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,Jge=/\/\*[^]*?\*\/| +/g,Rq=/\n+/g,_u=(e,t)=>{let r="",o="",a="";for(let n in e){let i=e[n];n[0]=="@"?n[1]=="i"?r=n+" "+i+";":o+=n[1]=="f"?_u(i,n):n+"{"+_u(i,n[1]=="k"?"":t)+"}":typeof i=="object"?o+=_u(i,t?t.replace(/([^,])+/g,l=>n.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,s=>/&/.test(s)?s.replace(/&/g,l):l?l+" "+s:s)):n):i!=null&&(n=/^--/.test(n)?n:n.replace(/[A-Z]/g,"-$&").toLowerCase(),a+=_u.p?_u.p(n,i):n+":"+i+";")}return r+(t&&a?t+"{"+a+"}":a)+o},qi={},Oq=e=>{if(typeof e=="object"){let t="";for(let r in e)t+=r+Oq(e[r]);return t}return e},eTe=(e,t,r,o,a)=>{let n=Oq(e),i=qi[n]||(qi[n]=(s=>{let u=0,f=11;for(;u<s.length;)f=101*f+s.charCodeAt(u++)>>>0;return"go"+f})(n));if(!qi[i]){let s=n!==e?e:(u=>{let f,d,p=[{}];for(;f=Xge.exec(u.replace(Jge,""));)f[4]?p.shift():f[3]?(d=f[3].replace(Rq," ").trim(),p.unshift(p[0][d]=p[0][d]||{})):p[0][f[1]]=f[2].replace(Rq," ").trim();return p[0]})(e);qi[i]=_u(a?{["@keyframes "+i]:s}:s,r?"":"."+i)}let l=r&&qi.g?qi.g:null;return r&&(qi.g=qi[i]),((s,u,f,d)=>{d?u.data=u.data.replace(d,s):u.data.indexOf(s)===-1&&(u.data=f?s+u.data:u.data+s)})(qi[i],t,o,l),i},tTe=(e,t,r)=>e.reduce((o,a,n)=>{let i=t[n];if(i&&i.call){let l=i(r),s=l&&l.props&&l.props.className||/^go/.test(l)&&l;i=s?"."+s:l&&typeof l=="object"?l.props?"":_u(l,""):l===!1?"":l}return o+a+(i??"")},"");function m3(e){let t=this||{},r=e.call?e(t.p):e;return eTe(r.unshift?r.raw?tTe(r,[].slice.call(arguments,1),t.p):r.reduce((o,a)=>Object.assign(o,a&&a.call?a(t.p):a),{}):r,Qge(t.target),t.g,t.o,t.k)}var Lut=m3.bind({g:1}),Dut=m3.bind({k:1});function Aq(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function oTe(e,t,r){return t&&Aq(e.prototype,t),r&&Aq(e,r),e}function cs(){return cs=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},cs.apply(this,arguments)}function aTe(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function RC(e,t){if(e==null)return{};var r={},o=Object.keys(e),a,n;for(n=0;n<o.length;n++)a=o[n],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}var Pq=function(){return""},nTe=we.default.createContext({enqueueSnackbar:Pq,closeSnackbar:Pq}),Iu={downXs:"@media (max-width:599.95px)",upSm:"@media (min-width:600px)"};var c3="unmounted",tp="exited",rp="entering",Vm="entered",_q="exiting",OC=function(e){aTe(t,e);function t(o){var a;a=e.call(this,o)||this;var n=o.appear,i;return a.appearStatus=null,o.in?n?(i=tp,a.appearStatus=rp):i=Vm:o.unmountOnExit||o.mountOnEnter?i=c3:i=tp,a.state={status:i},a.nextCallback=null,a}t.getDerivedStateFromProps=function(a,n){var i=a.in;return i&&n.status===c3?{status:tp}:null};var r=t.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(a){var n=null;if(a!==this.props){var i=this.state.status;this.props.in?i!==rp&&i!==Vm&&(n=rp):(i===rp||i===Vm)&&(n=_q)}this.updateStatus(!1,n)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var a=this.props.timeout,n=a,i=a;return a!=null&&typeof a!="number"&&typeof a!="string"&&(i=a.exit,n=a.enter),{exit:i,enter:n}},r.updateStatus=function(a,n){a===void 0&&(a=!1),n!==null?(this.cancelNextCallback(),n===rp?this.performEnter(a):this.performExit()):this.props.unmountOnExit&&this.state.status===tp&&this.setState({status:c3})},r.performEnter=function(a){var n=this,i=this.props.enter,l=a,s=this.getTimeouts();if(!a&&!i){this.safeSetState({status:Vm},function(){n.props.onEntered&&n.props.onEntered(n.node,l)});return}this.props.onEnter&&this.props.onEnter(this.node,l),this.safeSetState({status:rp},function(){n.props.onEntering&&n.props.onEntering(n.node,l),n.onTransitionEnd(s.enter,function(){n.safeSetState({status:Vm},function(){n.props.onEntered&&n.props.onEntered(n.node,l)})})})},r.performExit=function(){var a=this,n=this.props.exit,i=this.getTimeouts();if(!n){this.safeSetState({status:tp},function(){a.props.onExited&&a.props.onExited(a.node)});return}this.props.onExit&&this.props.onExit(this.node),this.safeSetState({status:_q},function(){a.props.onExiting&&a.props.onExiting(a.node),a.onTransitionEnd(i.exit,function(){a.safeSetState({status:tp},function(){a.props.onExited&&a.props.onExited(a.node)})})})},r.cancelNextCallback=function(){this.nextCallback!==null&&this.nextCallback.cancel&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(a,n){n=this.setNextCallback(n),this.setState(a,n)},r.setNextCallback=function(a){var n=this,i=!0;return this.nextCallback=function(){i&&(i=!1,n.nextCallback=null,a())},this.nextCallback.cancel=function(){i=!1},this.nextCallback},r.onTransitionEnd=function(a,n){this.setNextCallback(n);var i=a==null&&!this.props.addEndListener;if(!this.node||i){setTimeout(this.nextCallback,0);return}this.props.addEndListener&&this.props.addEndListener(this.node,this.nextCallback),a!=null&&setTimeout(this.nextCallback,a)},r.render=function(){var a=this.state.status;if(a===c3)return null;var n=this.props,i=n.children,l=RC(n,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return i(a,l)},oTe(t,[{key:"node",get:function(){var a,n=(a=this.props.nodeRef)===null||a===void 0?void 0:a.current;if(!n)throw new Error("notistack - Custom snackbar is not refForwarding");return n}}]),t}(we.default.Component);function op(){}OC.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:op,onEntering:op,onEntered:op,onExit:op,onExiting:op,onExited:op};function Iq(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function wC(e,t){return(0,we.useMemo)(function(){return e==null&&t==null?null:function(r){Iq(e,r),Iq(t,r)}},[e,t])}function T3(e){var t=e.timeout,r=e.style,o=r===void 0?{}:r,a=e.mode;return{duration:typeof t=="object"?t[a]||0:t,easing:o.transitionTimingFunction,delay:o.transitionDelay}}var EC={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},Nq=function(t){t.scrollTop=t.scrollTop},kq=function(t){return Math.round(t)+"ms"};function ap(e,t){e===void 0&&(e=["all"]);var r=t||{},o=r.duration,a=o===void 0?300:o,n=r.easing,i=n===void 0?EC.easeInOut:n,l=r.delay,s=l===void 0?0:l,u=Array.isArray(e)?e:[e];return u.map(function(f){var d=typeof a=="string"?a:kq(a),p=typeof s=="string"?s:kq(s);return f+" "+d+" "+i+" "+p}).join(",")}function iTe(e){return e&&e.ownerDocument||document}function Bq(e){var t=iTe(e);return t.defaultView||window}function lTe(e,t){t===void 0&&(t=166);var r;function o(){for(var a=this,n=arguments.length,i=new Array(n),l=0;l<n;l++)i[l]=arguments[l];var s=function(){e.apply(a,i)};clearTimeout(r),r=setTimeout(s,t)}return o.clear=function(){clearTimeout(r)},o}function sTe(e,t){var r=t.getBoundingClientRect(),o=Bq(t),a;if(t.fakeTransform)a=t.fakeTransform;else{var n=o.getComputedStyle(t);a=n.getPropertyValue("-webkit-transform")||n.getPropertyValue("transform")}var i=0,l=0;if(a&&a!=="none"&&typeof a=="string"){var s=a.split("(")[1].split(")")[0].split(",");i=parseInt(s[4],10),l=parseInt(s[5],10)}switch(e){case"left":return"translateX("+(o.innerWidth+i-r.left)+"px)";case"right":return"translateX(-"+(r.left+r.width-i)+"px)";case"up":return"translateY("+(o.innerHeight+l-r.top)+"px)";default:return"translateY(-"+(r.top+r.height-l)+"px)"}}function x3(e,t){if(t){var r=sTe(e,t);r&&(t.style.webkitTransform=r,t.style.transform=r)}}var uTe=(0,we.forwardRef)(function(e,t){var r=e.children,o=e.direction,a=o===void 0?"down":o,n=e.in,i=e.style,l=e.timeout,s=l===void 0?0:l,u=e.onEnter,f=e.onEntered,d=e.onExit,p=e.onExited,m=RC(e,["children","direction","in","style","timeout","onEnter","onEntered","onExit","onExited"]),x=(0,we.useRef)(null),h=wC(r.ref,x),g=wC(h,t),T=function(v,P){x3(a,v),Nq(v),u&&u(v,P)},E=function(v){var P=i?.transitionTimingFunction||EC.easeOut,B=T3({timeout:s,mode:"enter",style:cs({},i,{transitionTimingFunction:P})});v.style.webkitTransition=ap("-webkit-transform",B),v.style.transition=ap("transform",B),v.style.webkitTransform="none",v.style.transform="none"},R=function(v){var P=i?.transitionTimingFunction||EC.sharp,B=T3({timeout:s,mode:"exit",style:cs({},i,{transitionTimingFunction:P})});v.style.webkitTransition=ap("-webkit-transform",B),v.style.transition=ap("transform",B),x3(a,v),d&&d(v)},k=function(v){v.style.webkitTransition="",v.style.transition="",p&&p(v)},D=(0,we.useCallback)(function(){x.current&&x3(a,x.current)},[a]);return(0,we.useEffect)(function(){if(!(n||a==="down"||a==="right")){var C=lTe(function(){x.current&&x3(a,x.current)}),v=Bq(x.current);return v.addEventListener("resize",C),function(){C.clear(),v.removeEventListener("resize",C)}}},[a,n]),(0,we.useEffect)(function(){n||D()},[n,D]),(0,we.createElement)(OC,Object.assign({appear:!0,nodeRef:x,onEnter:T,onEntered:f,onEntering:E,onExit:R,onExited:k,in:n,timeout:s},m),function(C,v){return(0,we.cloneElement)(r,cs({ref:g,style:cs({visibility:C==="exited"&&!n?"hidden":void 0},i,{},r.props.style)},v))})});uTe.displayName="Slide";function S3(e){return Object.entries(e).reduce(function(t,r){var o,a=r[0],n=r[1];return cs({},t,(o={},o[a]=m3(n),o))},{})}var qm={SnackbarContainer:"notistack-SnackbarContainer",Snackbar:"notistack-Snackbar",CollapseWrapper:"notistack-CollapseWrapper",MuiContent:"notistack-MuiContent",MuiContentVariant:function(t){return"notistack-MuiContent-"+t}},Mq=S3({root:{height:0},entered:{height:"auto"}}),TC="0px",SC=175,fTe=(0,we.forwardRef)(function(e,t){var r=e.children,o=e.in,a=e.onExited,n=(0,we.useRef)(null),i=(0,we.useRef)(null),l=wC(t,i),s=function(){return n.current?n.current.clientHeight:0},u=function(h){h.style.height=TC},f=function(h){var g=s(),T=T3({timeout:SC,mode:"enter"}),E=T.duration,R=T.easing;h.style.transitionDuration=typeof E=="string"?E:E+"ms",h.style.height=g+"px",h.style.transitionTimingFunction=R||""},d=function(h){h.style.height="auto"},p=function(h){h.style.height=s()+"px"},m=function(h){Nq(h);var g=T3({timeout:SC,mode:"exit"}),T=g.duration,E=g.easing;h.style.transitionDuration=typeof T=="string"?T:T+"ms",h.style.height=TC,h.style.transitionTimingFunction=E||""};return(0,we.createElement)(OC,{in:o,unmountOnExit:!0,onEnter:u,onEntered:d,onEntering:f,onExit:p,onExited:a,onExiting:m,nodeRef:i,timeout:SC},function(x,h){return(0,we.createElement)("div",Object.assign({ref:l,className:Hm(Mq.root,x==="entered"&&Mq.entered),style:cs({pointerEvents:"all",overflow:"hidden",minHeight:TC,transition:ap("height")},x==="entered"&&{overflow:"visible"},{},x==="exited"&&!o&&{visibility:"hidden"})},h),(0,we.createElement)("div",{ref:n,className:qm.CollapseWrapper,style:{display:"flex",width:"100%"}},r))})});fTe.displayName="Collapse";var dTe=typeof window<"u"?we.useLayoutEffect:we.useEffect;function Lq(e){var t=(0,we.useRef)(e);return dTe(function(){t.current=e}),(0,we.useCallback)(function(){return t.current.apply(void 0,arguments)},[])}var pTe=(0,we.forwardRef)(function(e,t){var r=e.children,o=e.className,a=e.autoHideDuration,n=e.disableWindowBlurListener,i=n===void 0?!1:n,l=e.onClose,s=e.id,u=e.open,f=e.SnackbarProps,d=f===void 0?{}:f,p=(0,we.useRef)(),m=Lq(function(){l&&l.apply(void 0,arguments)}),x=Lq(function(R){!l||R==null||(p.current&&clearTimeout(p.current),p.current=setTimeout(function(){m(null,"timeout",s)},R))});(0,we.useEffect)(function(){return u&&x(a),function(){p.current&&clearTimeout(p.current)}},[u,a,x]);var h=function(){p.current&&clearTimeout(p.current)},g=(0,we.useCallback)(function(){a!=null&&x(a*.5)},[a,x]),T=function(k){d.onMouseEnter&&d.onMouseEnter(k),h()},E=function(k){d.onMouseLeave&&d.onMouseLeave(k),g()};return(0,we.useEffect)(function(){if(!i&&u)return window.addEventListener("focus",g),window.addEventListener("blur",h),function(){window.removeEventListener("focus",g),window.removeEventListener("blur",h)}},[i,g,u]),(0,we.createElement)("div",Object.assign({ref:t},d,{className:Hm(qm.Snackbar,o),onMouseEnter:T,onMouseLeave:E}),r)});pTe.displayName="Snackbar";var CC,mTe=S3({root:(CC={display:"flex",flexWrap:"wrap",flexGrow:1},CC[Iu.upSm]={flexGrow:"initial",minWidth:"288px"},CC)}),Hq=(0,we.forwardRef)(function(e,t){var r=e.className,o=RC(e,["className"]);return we.default.createElement("div",Object.assign({ref:t,className:Hm(mTe.root,r)},o))});Hq.displayName="SnackbarContent";var Um=S3({root:{backgroundColor:"#313131",fontSize:"0.875rem",lineHeight:1.43,letterSpacing:"0.01071em",color:"#fff",alignItems:"center",padding:"6px 16px",borderRadius:"4px",boxShadow:"0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)"},lessPadding:{paddingLeft:8*2.5+"px"},default:{backgroundColor:"#313131"},success:{backgroundColor:"#43a047"},error:{backgroundColor:"#d32f2f"},warning:{backgroundColor:"#ff9800"},info:{backgroundColor:"#2196f3"},message:{display:"flex",alignItems:"center",padding:"8px 0"},action:{display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:"16px",marginRight:"-8px"}}),Dq="notistack-snackbar",cTe=(0,we.forwardRef)(function(e,t){var r=e.id,o=e.message,a=e.action,n=e.iconVariant,i=e.variant,l=e.hideIconVariant,s=e.style,u=e.className,f=n[i],d=a;return typeof d=="function"&&(d=d(r)),we.default.createElement(Hq,{ref:t,role:"alert","aria-describedby":Dq,style:s,className:Hm(qm.MuiContent,qm.MuiContentVariant(i),Um.root,Um[i],u,!l&&f&&Um.lessPadding)},we.default.createElement("div",{id:Dq,className:Um.message},l?null:f,o),d&&we.default.createElement("div",{className:Um.action},d))});cTe.displayName="MaterialDesignContent";var Wm,yC,h3,g3,bC,Gi={view:{default:20,dense:4},snackbar:{default:6,dense:2}},Fq="."+qm.CollapseWrapper,vC=16,Hut=S3({root:(Wm={boxSizing:"border-box",display:"flex",maxHeight:"100%",position:"fixed",zIndex:1400,height:"auto",width:"auto",transition:ap(["top","right","bottom","left","max-width"],{duration:300,easing:"ease"}),pointerEvents:"none"},Wm[Fq]={padding:Gi.snackbar.default+"px 0px",transition:"padding 300ms ease 0ms"},Wm.maxWidth="calc(100% - "+Gi.view.default*2+"px)",Wm[Iu.downXs]={width:"100%",maxWidth:"calc(100% - "+vC*2+"px)"},Wm),rootDense:(yC={},yC[Fq]={padding:Gi.snackbar.dense+"px 0px"},yC),top:{top:Gi.view.default-Gi.snackbar.default+"px",flexDirection:"column"},bottom:{bottom:Gi.view.default-Gi.snackbar.default+"px",flexDirection:"column-reverse"},left:(h3={left:Gi.view.default+"px"},h3[Iu.upSm]={alignItems:"flex-start"},h3[Iu.downXs]={left:vC+"px"},h3),right:(g3={right:Gi.view.default+"px"},g3[Iu.upSm]={alignItems:"flex-end"},g3[Iu.downXs]={right:vC+"px"},g3),center:(bC={left:"50%",transform:"translateX(-50%)"},bC[Iu.upSm]={alignItems:"center"},bC)});var Vut=process.env.NODE_ENV!=="production";var Vq=function(){return(0,we.useContext)(nTe)};var AC=G(require("react")),xTe=()=>{let[e,t]=AC.default.useState(""),{enqueueSnackbar:r}=Vq();return AC.default.useEffect(()=>{e&&(r(e),t(""))},[e,r]),(a,n)=>{t(a),n&&r(a,n)}},PC=xTe;var Jo=(e,t)=>{let r={};return e.forEach(o=>{o[1]==="na"?r[o[0]]=!1:t>1140?r[o[0]]=!0:t>=915&&t<1140?["xs","s","m","l","xl"].includes(o[1])?r[o[0]]=!0:r[o[0]]=!1:t>=775&&t<915?["xs","s","m","l"].includes(o[1])?r[o[0]]=!0:r[o[0]]=!1:t>=690&&t<775?["xs","s","m"].includes(o[1])?r[o[0]]=!0:r[o[0]]=!1:t>=585&&t<690?["xs","s"].includes(o[1])?r[o[0]]=!0:r[o[0]]=!1:t<585&&(o[1]==="xs"?r[o[0]]=!0:r[o[0]]=!1)}),r};var zn=require("@mui/material/styles");var Uq=(0,zn.styled)("div")({width:"28rem",height:"16rem",margin:"auto",borderRadius:"1rem"}),Wq=(0,zn.styled)("div")(({theme:e})=>({cursor:"pointer",transition:"all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.1s","&:hover":{boxShadow:`${e.palette.background.brand?.default} 0px 0px 19px 6px`},backgroundColor:e.palette.mode==="light"?Pt:Tr})),qq=(0,zn.styled)("a")({color:"black",textDecoration:"none"}),_C=(0,zn.styled)("div")(({theme:e})=>({borderTop:`5px solid ${e.palette.background.brand?.default}`,borderRadius:"0.25rem",minHeight:"16rem",display:"flex",flexDirection:"column",justifyContent:"space-between",boxShadow:"0px 0.75rem 1rem 0.25rem rgba(0, 0, 0, 0.12)",position:"relative",transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"})),Gq=(0,zn.styled)("div")(({theme:e})=>({background:e.palette.mode==="light"?O2:Vl,transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"})),IC=(0,zn.styled)("div")(({theme:e})=>({display:"flex",padding:"1rem","& span":{border:`1px solid ${e.palette.primary.dark}`,color:e.palette.text.primary,borderRadius:"0.8rem",padding:"0.05rem 0.75rem",fontSize:"1rem",transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"},"& h3":{color:e.palette.text.primary,transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"}})),kC=(0,zn.styled)("div")(({theme:e})=>({padding:"0 1rem",".summary":{color:e.palette.grey[700],transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"},p:{fontSize:"1rem"}})),zq=(0,zn.styled)("div")(({theme:e})=>({padding:"0 1rem",position:"absolute",bottom:"0rem",p:{fontSize:"1rem",color:e.palette.text.primary,fontWeight:600,transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"}})),MC=(0,zn.styled)("div")({textAlign:"center",position:"absolute",bottom:"0.1rem",right:"0.75rem",opacity:.2,img:{height:"8.5rem",width:"8.5rem"}});var Ke=require("react/jsx-runtime"),hTe=({path:e,children:t})=>e?(0,Ke.jsx)(qq,{href:e,children:t}):(0,Ke.jsx)(Ke.Fragment,{children:t}),gTe=({tutorial:e,path:t,courseCount:r,courseType:o})=>(0,Ke.jsx)(Uq,{children:e.frontmatter.disabled==="yes"?(0,Ke.jsx)(Gq,{children:(0,Ke.jsx)(_C,{style:{borderTop:`5px solid ${e.frontmatter.themeColor}`},children:(0,Ke.jsxs)("div",{children:[(0,Ke.jsxs)(IC,{children:[(0,Ke.jsx)("h3",{children:e.frontmatter.title?e.frontmatter.title:e.frontmatter.courseTitle}),(0,Ke.jsx)("div",{style:{whiteSpace:"nowrap"},children:(0,Ke.jsx)("span",{children:"Coming Soon"})})]}),(0,Ke.jsx)(kC,{children:(0,Ke.jsx)("p",{className:"summary",children:e.frontmatter.description})}),(0,Ke.jsx)(MC,{children:(0,Ke.jsx)("img",{src:e.frontmatter.cardImage,alt:e.frontmatter.title})})]})})}):(0,Ke.jsx)(hTe,{path:t,children:(0,Ke.jsx)(Wq,{children:(0,Ke.jsx)(_C,{style:{borderTop:`5px solid ${e.frontmatter.themeColor}`},children:(0,Ke.jsxs)("div",{children:[(0,Ke.jsxs)(IC,{children:[(0,Ke.jsx)("h3",{children:e.frontmatter.title?e.frontmatter.title:e.frontmatter.courseTitle}),e.frontmatter.status?(0,Ke.jsx)("p",{children:(0,Ke.jsx)("span",{children:"New"})}):null]}),(0,Ke.jsx)(kC,{children:(0,Ke.jsx)("p",{className:"summary",children:e.frontmatter.description})}),(0,Ke.jsx)(zq,{className:"card-subdata",children:(0,Ke.jsxs)("p",{children:[r," ",o,r>1?"s":""]})}),(0,Ke.jsx)(MC,{children:(0,Ke.jsx)("img",{src:e.frontmatter.cardImage})})]})})})})}),LC=gTe;var xs=require("react");var DC=require("@mui/material");var jq=(0,DC.styled)(Il)(()=>({minWidth:400,overflowWrap:"anywhere",textAlign:"center",padding:"5px"})),Kq=(0,DC.styled)($)(()=>({display:"flex",justifyContent:"end",width:"100%",gap:"10px"}));var ea=require("react/jsx-runtime"),Gm={WARNING:"warning",DANGER:"error",SUCCESS:"success",INFO:"info"},$q=(0,xs.forwardRef)(({variant:e},t)=>{let[r,o]=(0,xs.useState)({isOpen:!1,title:"",subtitle:"",primaryOption:"",showInfoIcon:"",variant:e,headerIcon:void 0,isChecked:!1,showCheckbox:!1}),a=(0,xs.useRef)({resolve:()=>{},reject:()=>{}}),n=(0,b.useTheme)(),i=E=>new Promise((R,k)=>{a.current={resolve:R,reject:k},o({...E,isOpen:!0,showInfoIcon:E.showInfoIcon||"",showCheckbox:!!E.showCheckbox})}),l=()=>{o(E=>({...E,isOpen:!1}))},s=()=>{o(E=>({...E,isChecked:!E.isChecked}))},u=()=>!!r.isChecked;(0,xs.useImperativeHandle)(t,()=>({show:i,getCheckboxState:u}));let{isOpen:f,primaryOption:d,title:p,subtitle:m,showInfoIcon:x,headerIcon:h,showCheckbox:g}=r,{resolve:T}=a.current;return(0,ea.jsxs)(Lr,{open:f,closeModal:l,title:p,id:"searchClick",headerIcon:h,reactNode:void 0,children:[m&&(0,ea.jsxs)(Mr,{children:[(0,ea.jsx)(jq,{id:"alert-dialog-description",variant:"body1",component:"div",children:(0,ea.jsx)(z,{variant:"body1",component:"div",style:{color:n.palette.text.primary},children:m})}),g&&(0,ea.jsx)(Ml,{control:(0,ea.jsx)(Yr,{checked:u(),onChange:s,color:"primary"}),label:(0,ea.jsx)("span",{style:{fontSize:"1rem"},children:"Do not show again"})})]}),(0,ea.jsx)(io,{variant:"filled",helpText:x,children:(0,ea.jsxs)(Kq,{children:[(0,ea.jsx)(fn,{onClick:()=>{l(),T("CANCEL")},children:"Cancel"}),(0,ea.jsx)(un,{onClick:()=>{l(),T(d)},style:r.variant&&{backgroundColor:n.palette.background[r.variant]?.default,textTransform:"capitalize"},type:"submit",children:d})]})})]})});$q.displayName="PromptComponent";var C3=$q;var np=C3;var FC=require("@mui/material/OutlinedInput"),y3=require("@mui/material/styles"),Yq=G(require("lodash/debounce")),zm=G(require("react"));var jn=require("react/jsx-runtime"),TTe=e=>(0,y3.createTheme)({typography:{fontFamily:e.typography.fontFamily},components:{MuiTextField:{styleOverrides:{root:{"--TextField-brandBorderColor":e.palette.border.strong,"--TextField-brandBorderHoverColor":e.palette.background.graphics?.default,"--TextField-brandBorderFocusedColor":e.palette.background.graphics?.default,"& label.Mui-focused":{color:"var(--TextField-brandBorderFocusedColor)"}}}},MuiOutlinedInput:{styleOverrides:{notchedOutline:{borderColor:"var(--TextField-brandBorderColor)"},root:{[`&:hover .${FC.outlinedInputClasses.notchedOutline}`]:{borderColor:"var(--TextField-brandBorderHoverColor)"},[`&.Mui-focused .${FC.outlinedInputClasses.notchedOutline}`]:{borderColor:"var(--TextField-brandBorderFocusedColor)"}}}},MuiInput:{styleOverrides:{root:{color:e.palette.text.default,"&::before":{borderBottom:"2px solid var(--TextField-brandBorderColor)"},"&:hover:not(.Mui-disabled, .Mui-error):before":{borderBottom:"2px solid var(--TextField-brandBorderHoverColor)"},"&.Mui-focused:after":{borderBottom:"2px solid var(--TextField-brandBorderFocusedColor)"}}}},MuiButton:{styleOverrides:{root:{lineHeight:"auto"}}}}});function STe({onSearch:e,placeholder:t,onClear:r,expanded:o,setExpanded:a}){let[n,i]=zm.default.useState(""),l=zm.default.useRef(null),s=(0,b.useTheme)(),u=(0,zm.useCallback)((0,Yq.default)(m=>{e(m)},300),[e]),f=m=>{let x=m.target.value;i(x),u(x)},d=m=>{m.stopPropagation(),u(""),i(""),a(!1),r&&r()},p=m=>{m.stopPropagation(),o?(u(""),i(""),a(!1)):(a(!0),setTimeout(()=>{l.current&&l.current.focus()},300))};return(0,jn.jsx)(On,{onClickAway:m=>{m.stopPropagation();let x=m.target?.closest("#ref");n===""&&x&&d(m)},children:(0,jn.jsxs)("div",{style:{display:"flex"},children:[(0,jn.jsx)(y3.ThemeProvider,{theme:TTe(s),children:(0,jn.jsx)(Qr,{variant:"standard",value:n,onChange:f,inputRef:l,placeholder:t,style:{width:o?"150px":"0",opacity:o?1:0,transition:"width 0.3s ease, opacity 0.3s ease"}})}),o?(0,jn.jsx)(zt,{title:"Close",onClick:d,icon:(0,jn.jsx)(Ft,{fill:s.palette.icon.default}),arrow:!0}):(0,jn.jsx)(zt,{title:"Search",onClick:p,icon:(0,jn.jsx)(Cd,{fill:s.palette.icon.default}),arrow:!0})]})})}var Kn=STe;var E3=require("@mui/material");var Ki=require("react");var CTe="N/A",Zq=e=>e&&e.deleted_at&&e.deleted_at.Valid===!0?ds(e.deleted_at.Time):CTe;var zi=require("react/jsx-runtime"),Qq=(0,b.styled)("div")({display:"flex",gap:"1rem"}),hs=(0,b.styled)("div")({display:"flex",justifyContent:"space-between",width:"100%",alignItems:"center"}),b3=(0,b.styled)("div")({display:"flex",alignItems:"center",marginRight:"1rem"}),NC=(0,b.styled)("div")({boxSizing:"border-box",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}),BC=(0,b.styled)("div")({position:"absolute",top:0,right:0,bottom:0,left:0,boxSizing:"border-box",display:"block",width:"100%"}),Xq=(0,b.styled)("span")(()=>({"& svg":{cursor:"pointer",width:"2rem",height:"2rem"}})),Rft=(0,b.styled)("span")(()=>({"& svg":{width:"2rem",height:"2rem"}})),Jq=(0,b.styled)("span")(({theme:e})=>({"& svg":{color:"#3C494F","&:hover":{color:e.palette.error.error}}})),jm=(0,b.styled)("span")(()=>({color:"#455a64",opacity:"0.5","& svg":{cursor:"not-allowed"}})),eG=(0,b.styled)("div")(()=>({display:"flex",justifyContent:"space-between",paddingRight:"26px"})),v3=(0,b.styled)("div")(()=>({color:"#455a64",display:"flex",cursor:"not-allowed","& svg":{cursor:"pointer"}})),tG=(0,b.styled)(Yr)({padding:0,marginRight:"0.5rem",height:"28px","& .MuiSvgIcon-root":{borderColor:"white"},color:"white","&:hover":{color:"white",cursor:"pointer"},"&.Mui-checked":{color:"white"}}),HC=(0,b.styled)(z)({fontSize:"1.25rem",fontWeight:800,"&:hover":{cursor:"default"}}),Oft=(0,b.styled)(z)({fontSize:"0.9rem",display:"flex",alignItems:"end",padding:"0 5px","&:hover":{cursor:"default"}}),Aft=(0,b.styled)("button")({background:"transparent",border:"none","&:hover":{cursor:"default"}}),VC=(0,b.styled)(z)({fontStyle:"italic",fontSize:"12px","&:hover":{cursor:"default"}}),UC=(0,b.styled)(z)({fontSize:"0.9rem",textAlign:"left",fontStyle:"italic"}),rG=(0,b.styled)(UC)({height:"fit-content",fontStyle:"normal","&:hover":{cursor:"default"}}),yTe=(0,b.styled)($)(({theme:e})=>({background:e.palette.background.brand?.default,padding:"10px 10px 1px 10px",borderRadius:"4px",height:"100%",display:"flex",width:"100%"})),Km=(0,b.styled)(yTe)({display:"flex",width:"100%",gap:"10px","@media (min-width : 600px)":{flexDirection:"column",gap:"0"}}),WC=(0,b.styled)(ke)(({theme:e})=>({width:"100%",borderRadius:"4px",background:e.palette.background.brand?.default,boxShadow:"0px 4px 4px 0px rgba(0, 0, 0, 0.25)",display:"flex",flexDirection:"column",marginBottom:"10px",color:e.palette.text.default,"&:hover":{background:e.palette.text.default},padding:"15px 10px"})),qC=(0,b.styled)("p")(({theme:e,textColor:t})=>({margin:"0",fontSize:"14px",fontWeight:"400",display:"flex",color:t||e.palette.text.constant?.white})),GC=(0,b.styled)("p")(({theme:e,textColor:t})=>({margin:"0",fontSize:"60px",fontWeight:"500",lineHeight:1,marginBottom:"5px",color:t||e.palette.text.constant?.white})),Pft=(0,b.styled)(ke)(({theme:e})=>({width:"100%",borderRadius:"4px",background:e.palette.text.default,boxShadow:"0px 4px 4px 0px rgba(0, 0, 0, 0.25)",display:"flex",flexDirection:"column",marginBottom:"10px",color:`${ie[40]}30 !important`,"&:hover":{background:e.palette.text.default},padding:"15px 10px"})),_ft=(0,b.styled)("div")(({disabled:e=!1})=>({cursor:e?"not-allowed":"pointer",opacity:e?"0.5":"1",display:"flex","& svg":{cursor:e?"not-allowed":"pointer"}})),oG=(0,b.styled)(ce)(({theme:e})=>({borderBottom:`1px solid ${e.palette.divider}`,display:"flex",flexDirection:"row",padding:"5px 0"})),w3=({onClick:e,bulk:t,disabled:r,style:o,key:a,title:n="Delete"})=>{let i=(0,b.useTheme)();return(0,zi.jsx)(xe,{title:n,arrow:!0,children:(0,zi.jsx)("div",{children:(0,zi.jsx)(tt,{sx:{"&:hover":{"& svg":{fill:r?i.palette.icon.disabled:i.palette.background.error?.hover}},...o},disableRipple:!0,disabled:r,onClick:e,children:(0,zi.jsx)(co,{fill:r?i.palette.icon.disabled:i.palette.icon.default,width:t?"28":"24",height:t?"28":"24",style:o})})})},a)},$n=({onClick:e,disabled:t,bulk:r,style:o,title:a="Edit"})=>{let n=(0,b.useTheme)();return(0,zi.jsx)(xe,{title:a,arrow:!0,children:(0,zi.jsx)("div",{children:(0,zi.jsx)(tt,{onClick:e,sx:{"&:hover":{"& svg":{fill:t?n.palette.icon.disabled:n.palette.background.brand?.default}},...o},disableRipple:!0,disabled:t,children:(0,zi.jsx)(Ja,{fill:t?n.palette.icon.disabled:n.palette.icon.default,width:r?"28":"24",height:r?"28":"24",style:o})})})})},aG=(0,b.styled)(ce)({display:"flex",flexDirection:"row"}),Ift=(0,b.styled)(ce)({display:"flex",alignItems:"center",marginTop:1}),$m=(0,b.styled)(ce)({width:"100%"}),nG=(0,b.styled)(Rr)(({theme:e})=>({width:"100%",display:"flex",flexDirection:"column",backgroundColor:e.palette.background.paper,padding:e.spacing(2.5),cursor:"pointer"})),iG=(0,b.styled)(nG)(({theme:e})=>({minHeight:e.spacing(50),background:"linear-gradient(180deg, #007366 0%, #000 100%)"})),lG=(0,b.styled)(nG)(({theme:e})=>({minHeight:e.spacing(50),backgroundColor:e.palette.background.paper,boxShadow:"none"})),sG=(0,b.styled)(ce)({display:"flex",flexDirection:"row",justifyContent:"space-between"}),uG=(0,b.styled)(ce)({display:"flex",alignItems:"flex-start"}),fG=(0,b.styled)(ce)({display:"flex",alignItems:"center",justifyContent:"flex-end"}),dG=(0,b.styled)(z)(({theme:e})=>({fontSize:"1.25rem",fontWeight:600,padding:"0.5rem 0",color:e.palette.background.constant?.white})),pG=(0,b.styled)(ce)({display:"flex",flexDirection:"column",maxHeight:"14.5rem",overflowY:"scroll",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"},"-ms-overflow-style":"none"}),mG=(0,b.styled)(ce)(({theme:e})=>({display:"flex",flexDirection:"row",position:"absolute",bottom:"20px",width:"100%",color:`${e.palette.background.constant?.white}99`,justifyContent:"space-between",paddingRight:"40px"})),zC=(0,b.styled)(ce)({textAlign:"left"});var ji=require("react/jsx-runtime"),bTe=({userId:e,userName:t,userEmail:r,profileUrl:o})=>{let a=(0,b.useTheme)(),n=()=>{window.open(`${xa}/user/${e}`)};return(0,ji.jsxs)(ce,{container:!0,alignItems:"center",children:[(0,ji.jsx)(ce,{children:(0,ji.jsx)($,{sx:{color:a.palette.text.default,mr:2,cursor:"pointer"},children:(0,ji.jsx)(qt,{onClick:n,alt:t,src:o,children:o?"":(0,ji.jsx)(Mn,{})})})}),(0,ji.jsxs)(ce,{size:"grow",children:[t,(0,ji.jsx)(z,{variant:"body2",color:a.palette.text.disabled,children:r})]})]})},ku=bTe;var De=require("react/jsx-runtime"),vTe=({tableMeta:e,handleRemoveFromTeam:t,isRemoveFromTeamAllowed:r,theme:o})=>(0,De.jsx)("div",{children:r?(0,De.jsx)(v3,{children:(0,De.jsx)(zt,{id:`delete_user-${e.rowIndex}`,onClick:t(e.rowData),title:"Remove user membership from team",iconType:"delete",children:(0,De.jsx)(zl,{fill:o?.palette.icon.default})})}):(0,De.jsx)(jm,{children:(0,De.jsx)(zl,{fill:o?.palette.icon.disabled,secondaryFill:Xr})})}),wTe=({teamID:e,useGetUsersForOrgQuery:t,org_id:r,useRemoveUserFromTeamMutation:o,useNotificationHandlers:a,isRemoveFromTeamAllowed:n,theme:i})=>{let[l,s]=(0,Ki.useState)(0),[u,f]=(0,Ki.useState)(10),[d,p]=(0,Ki.useState)("last_login_time desc"),[m,x]=(0,Ki.useState)(""),h=[],{handleError:g,handleSuccess:T,handleInfo:E}=a(),R=(0,Ki.useRef)(null),{width:k}=Xo(),{data:D}=t({page:l,pagesize:u,search:m,order:d,teamId:e,orgId:r}),[C]=o(),v=D?.data||[],P=D?.total_count||0,B=V=>async()=>{let y=V[0];await R.current?.show({title:"Remove User From Team ?",subtitle:J(V[3],V[2]),primaryOption:"Proceed",variant:Gm.DANGER})==="Proceed"&&C({orgId:r,teamId:e,userId:y}).unwrap().then(()=>{T(`${V[4]?V[4]:""} ${V[5]?V[5]:""} removed from team`)}).catch(oe=>{let O=oe.response?.data?.message||"Failed to remove user from team";oe.response.status===404?E(O):g(O)})},_=(V,y,ee)=>{let oe=ee.findIndex(O=>O.name===y);return V[oe]},J=(V,y)=>(0,De.jsxs)(De.Fragment,{children:[(0,De.jsx)("p",{children:"Are you sure you want to remove this user? (This action is irreversible)"}),(0,De.jsxs)("p",{children:["User:"," ",(0,De.jsx)("i",{children:(0,De.jsx)("b",{children:V})})]}),(0,De.jsxs)("p",{children:["Email:"," ",(0,De.jsx)("i",{children:(0,De.jsx)("b",{children:y})})]})]}),X,H={search:!1,viewColumns:!1,filter:!1,rowsPerPageOptions:[10,20,25],responsive:"standard",selectableRows:"none",count:P,rowsPerPage:u,page:l,print:!1,download:!1,elevation:0,serverSide:!0,sortOrder:{name:d.split(" ")[0],direction:d.split(" ")[1]},onTableChange:(V,y)=>{let ee=y.announceText?y.announceText.split(" : "):[],oe="";switch(y.activeColumn&&(oe=`${N[y.activeColumn].name} desc`),V){case"changePage":s(y.page);break;case"changeRowsPerPage":f(y.rowsPerPage);break;case"search":X&&clearTimeout(X),X=setTimeout(()=>{m!==y.searchText&&x(y.searchText)},500);break;case"sort":ee.length==2&&(ee[1]==="ascending"?oe=`${N[y.activeColumn].name} asc`:oe=`${N[y.activeColumn].name} desc`),oe!==d&&p(oe);break}}},q=[["user_id","na"],["avatar_url","xs"],["email","na"],["username","na"],["first_name","na"],["last_name","na"],["role_names","xs"],["status","na"],["joined_at","l"],["last_login_time","l"],["deleted_at","na"]],N=[{name:"user_id",label:"User ID",options:{filter:!1,sort:!1,searchable:!1}},{name:"avatar_url",label:"Team Member",options:{filter:!1,sort:!1,searchable:!1,customBodyRender:(V,y)=>(0,De.jsx)($,{sx:{"& > img":{mr:2,flexShrink:0}},children:(0,De.jsx)(ku,{userId:_(y.rowData,"user_id",N),userName:`${y.rowData[4]} ${y.rowData[5]}`,userEmail:y.rowData[2],profileUrl:V})})}},{name:"email",label:"Email",options:{filter:!1,sort:!0,searchable:!0}},{name:"username",label:"Username",options:{filter:!1,sort:!0,searchable:!0,customBodyRender:(V,y)=>(0,De.jsxs)("div",{style:{display:"flex"},children:[V,V?.includes("@")?(0,De.jsx)(Xt,{title:`Search "${y.rowData[3]} ${y.rowData[4]}" on Google`,children:(0,De.jsx)("a",{href:`https://www.google.com/search?q=${y.rowData[3]}+${y.rowData[4]}`,style:{color:"inherit"},target:"_blank",rel:"noreferrer",children:(0,De.jsx)("div",{children:(0,De.jsx)($2,{width:20,height:20})})})}):(0,De.jsx)(Xt,{title:`Lookup "${V}" on GitHub`,children:(0,De.jsx)("a",{href:`https://www.github.com/${V}`,style:{color:"inherit"},target:"_blank",rel:"noreferrer",children:(0,De.jsx)("div",{children:(0,De.jsx)(eu,{width:22,height:22})})})})]})}},{name:"first_name",label:"First",options:{filter:!1,sort:!0,searchable:!0}},{name:"last_name",label:"Last",options:{filter:!1,sort:!0,searchable:!0}},{name:"role_names",label:"Roles",options:{filter:!0,sort:!1,searchable:!1,filterOptions:{names:h.concat(h?.map(V=>`!${V}`))},customBodyRender:V=>(0,De.jsx)("div",{children:V?.join(", ")})}},{name:"status",label:"Status",options:{filter:!0,sort:!0,searchable:!1}},{name:"joined_at",label:"Joined At",options:{filter:!1,sort:!0,searchable:!1,sortDescFirst:!0}},{name:"last_login_time",label:"Last Active At",options:{filter:!1,sort:!0,searchable:!1,sortDescFirst:!0}},{name:"deleted_at",label:"Deleted At",options:{filter:!0,sort:!0,searchable:!1,sortDescFirst:!0,filterOptions:{names:["Deleted","Not Deleted"],logic:(V,y)=>V!="NA"&&y.indexOf("Deleted")>=0?!0:V=="NA"&&y.indexOf("Not Deleted")>=0,fullWidth:!0},customBodyRender:(V,y)=>{let ee=v[y.rowIndex];return Zq(ee)}}},{name:"actions",label:"Actions",options:{filter:!1,sort:!1,searchable:!1,customBodyRender:(V,y)=>_(y.rowData,"deleted_at",N).Valid!==!1?(0,De.jsxs)(jm,{children:[(0,De.jsx)(Ja,{style:{marginRight:".5rem"},fill:Xr,height:"30",width:"30"}),(0,De.jsx)(zl,{fill:Xr,secondaryFill:Xr,height:30,width:30})]}):(0,De.jsx)(vTe,{tableMeta:y,handleRemoveFromTeam:B,isRemoveFromTeamAllowed:n,theme:i})}}],[L,M]=(0,Ki.useState)(N),[F]=(0,Ki.useState)(()=>{let V=Jo(q,k),y={};return N.forEach(ee=>{y[ee.name]=V[ee.name]}),y});return(0,De.jsxs)(F2,{initialMode:i?.palette.mode,children:[(0,De.jsx)("div",{style:{margin:"auto",width:"100%"},children:(0,De.jsx)(Vo,{columns:N,data:v,options:H,colViews:q,tableCols:L,updateCols:M,columnVisibility:F})}),(0,De.jsx)(np,{ref:R})]})},Ym=wTe;var ip=require("react/jsx-runtime"),ETe=(0,b.styled)(E3.Grid2)(({theme:e})=>({display:"grid",margin:"auto",paddingLeft:"0.5rem",borderRadius:"0.25rem",width:"inherit",gap:e.spacing(1)})),RTe=({teams:e,tableOptions:t,columnVisibility:r,colViews:o,tableCols:a,columns:n,updateCols:i,isRemoveFromTeamAllowed:l,org_id:s,useGetUsersForOrgQuery:u,useNotificationHandlers:f,useRemoveUserFromTeamMutation:d})=>{let p=(0,b.useTheme)();return(0,ip.jsx)(no,{children:(0,ip.jsx)(Vo,{columns:n,data:e,options:{...t,renderExpandableRow:(m,x)=>{let h=e[x.dataIndex].id;return(0,ip.jsx)(E3.TableCell,{colSpan:6,sx:{paddingInline:"4rem",backgroundColor:`${p.palette.background.secondary} !important`},children:(0,ip.jsx)(ETe,{container:!0,size:12,children:(0,ip.jsx)(Ym,{teamID:h,isRemoveFromTeamAllowed:l,org_id:s,useGetUsersForOrgQuery:u,useNotificationHandlers:f,useRemoveUserFromTeamMutation:d,theme:p})})})}},colViews:o,tableCols:a,updateCols:i,columnVisibility:r})})},Zm=RTe;var jC=require("react");var R3=require("react/jsx-runtime");function OTe({value:e,maxLength:t,...r}){return e.length>t?(0,R3.jsx)(Xt,{title:e,arrow:!0,placement:"top",children:(0,R3.jsx)("div",{style:{maxWidth:"15rem",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},...r,children:`${e.slice(0,t)}...`})}):(0,R3.jsx)("div",{style:{maxWidth:"15rem",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},...r,children:e})}var Aa=OTe;var ut=require("react/jsx-runtime");function ATe({selected:e,teams:t,deleteTeamsModalHandler:r}){let o={team_ids:[],team_names:[]};return e?.data.forEach(a=>{let n=a.index;o.team_ids.push(t[n]?.team_id),o.team_names.push(t[n]?.team_name)}),(0,ut.jsx)(Xq,{children:(0,ut.jsx)(Jq,{children:(0,ut.jsx)(xe,{title:"Delete Teams",children:(0,ut.jsx)(co,{height:28,width:28,fill:Xr,onClick:()=>{r(o)}})},"delete_teams")})})}function lp({teams:e,count:t,page:r,pageSize:o,setPage:a,setPageSize:n,sortOrder:i,setSortOrder:l,bulkSelect:s,setBulkSelect:u,handleTeamView:f,handleDeleteTeam:d,handleRemoveTeamFromWorkspace:p,handleleaveTeam:m,teamId:x,workspace:h=!1,isEditTeamAllowed:g,isLeaveTeamAllowed:T,isRemoveTeamFromWorkspaceAllowed:E,isDeleteTeamAllowed:R,setSearch:k}){let{width:D}=Xo(),C=(0,b.useTheme)(),v=[["id","na"],["name","xs"],["description","m"],["owner","l"],["created_at","na"],["updated_at","xl"],["deleted_at","na"],["actions","xs"]],P=[{name:"id",label:"ID",options:{filter:!1,sort:!1,searchable:!1,customBodyRender:N=>(0,ut.jsx)(Bm,{id:N})}},{name:"name",label:"Name",options:{filter:!1,sort:!0,searchable:!0}},{name:"description",label:"Description",options:{filter:!1,sort:!0,searchable:!1,customBodyRender:N=>(0,ut.jsx)(Aa,{value:N??"",maxLength:30})}},{name:"owner",label:"Owner",options:{filter:!1,sort:!0,searchable:!0}},{name:"created_at",label:"Created At",options:{filter:!1,sort:!0,searchable:!1,sortDescFirst:!0}},{name:"updated_at",label:"Updated At",options:{filter:!1,sort:!0,searchable:!1,sortDescFirst:!0}},{name:"deleted_at",label:"Deleted At",options:{filter:!0,sort:!0,searchable:!1,sortDescFirst:!0,customBodyRender:N=>JSON.stringify(N),filterOptions:{names:["Deleted","Not Deleted"],logic:(N,L)=>N!="NA"&&L.indexOf("Deleted")>=0?!0:N=="NA"&&L.indexOf("Not Deleted")>=0,fullWidth:!0}}},{name:"actions",label:"Actions",options:{filter:!1,sort:!1,searchable:!1,customBodyRender:(N,L)=>s||L.rowData[4].Valid?(0,ut.jsxs)(jm,{children:[(0,ut.jsx)(Ja,{style:{marginRight:".5rem"}}),(0,ut.jsx)(co,{height:28,width:28,fill:Xr})]}):(0,ut.jsxs)(v3,{children:[!h&&(0,ut.jsxs)(ut.Fragment,{children:[(0,ut.jsx)(Ho,{disabled:!g,children:(0,ut.jsx)(zt,{id:`edit_team-${L.rowIndex}`,title:"Edit Team",onClick:M=>{g&&f(M,L.rowData)},iconType:"edit",children:(0,ut.jsx)(Ja,{style:{height:28.8,width:28.8},fill:Xr})})}),(0,ut.jsx)(Ho,{disabled:!T,children:(0,ut.jsx)(zt,{id:`leave_team-${L.rowIndex}`,title:"Leave Team",onClick:M=>T&&m(M,L.rowData),iconType:"delete",children:(0,ut.jsx)(zl,{fill:Xr,secondaryFill:Xr})})})]}),h?(0,ut.jsx)(Ho,{disabled:!E,children:(0,ut.jsx)(zt,{id:`remove_team-${L.rowIndex}`,title:"Move Team",onClick:()=>{E&&p&&p(L.rowData[0])},iconType:"delete",children:(0,ut.jsx)(co,{height:28,width:28,fill:C.palette.icon.default})})}):(0,ut.jsx)(Ho,{disabled:!R,children:(0,ut.jsx)(zt,{id:`delete_team-${L.rowIndex}`,title:"Delete Team",onClick:M=>{R&&d(M,L.rowData)},iconType:"delete",children:(0,ut.jsx)(co,{height:28,width:28,fill:Xr})})})]})}}],B=e?.findIndex(N=>N.id===x),_={filter:!1,selectableRows:"none",filterType:"dropdown",expandableRows:!0,expandableRowsHeader:!1,expandableRowsOnClick:!0,responsive:"standard",count:t,rowsPerPage:o,page:r,print:!1,download:!1,elevation:0,serverSide:!0,viewColumns:!1,search:!1,rowsExpanded:[B],customToolbarSelect:N=>(0,ut.jsx)(eG,{children:(0,ut.jsx)(ATe,{selected:N,teams:e,deleteTeamsModalHandler:()=>{}})}),textLabels:{selectedRows:{text:"teams(s) selected"}},onTableChange:(N,L)=>{let M=L.announceText?L.announceText.split(" : "):[],F="";switch(L.activeColumn&&(F=`${P[L.activeColumn].name} desc`),N){case"changePage":a(L.page);break;case"changeRowsPerPage":n(L.rowsPerPage);break;case"search":k(L.searchText!==null?L.searchText:"");break;case"sort":M.length==2&&(M[1]==="ascending"?F=`${P[L.activeColumn].name} asc`:F=`${P[L.activeColumn].name} desc`),F!==i&&l(F);break;case"rowSelectionChange":L.selectedRows.data.length?s||u(!0):u(!1);break;default:L.selectedRows.data.length==0&&s&&u(!1)}},isRowSelectable:N=>e[N].deleted_at.Valid!==!0,setRowProps:(N,L,M)=>(M&&M.selectedRows?M.selectedRows.data:[]).includes(L)?{style:{backgroundColor:C.palette.background.hover}}:N[6].Valid?{style:{backgroundColor:C.palette.icon.disabled}}:{style:{backgroundColor:C.palette.background.constant?.table}}},[J,X]=(0,jC.useState)(P),[H,q]=(0,jC.useState)(()=>{let N=Jo(v,D),L={};return P.forEach(M=>{L[M.name]=N[M.name]}),L});return{columns:P,tableOptions:_,tableCols:J,updateCols:X,columnVisibility:H,setColumnVisibility:q,colViews:v}}var Pa=G(require("react"));var wt=require("react/jsx-runtime"),PTe=({width:e=U,height:t=W,primaryFill:r="#00B39F",secondaryFill:o="#00D3A9",...a})=>(0,wt.jsxs)("svg",{width:e,height:t,viewBox:"0 0 135 135",...a,xmlns:"http://www.w3.org/2000/svg",children:[(0,wt.jsx)("path",{d:"M69.5 31.82V64.07L97.45 47.89L69.5 31.82Z",fill:o}),(0,wt.jsx)("path",{d:"M69.5 70.81V103.22L97.7 87.09L69.5 70.81Z",fill:o}),(0,wt.jsx)("path",{d:"M65.47 63.85V32.09L37.87 47.92L65.47 63.85Z",fill:r}),(0,wt.jsx)("path",{d:"M10.1 103.1C15.5182 111.811 22.842 119.179 31.52 124.65V90.71L10.1 103.1Z",fill:r}),(0,wt.jsx)("path",{d:"M65.47 103.06V71.05L37.8 87.07L65.47 103.06Z",fill:r}),(0,wt.jsx)("path",{d:"M35.54 122.63L63.56 106.61L35.54 90.41V122.63Z",fill:o}),(0,wt.jsx)("path",{d:"M99.62 122.8V90.63L71.64 106.63L99.62 122.8Z",fill:r}),(0,wt.jsx)("path",{d:"M127.03 99.37C131.817 90.4433 134.524 80.5502 134.95 70.43L105.78 87.11L127.03 99.37Z",fill:r}),(0,wt.jsx)("path",{d:"M103.64 83.69L131.76 67.61L103.64 51.45V83.69Z",fill:o}),(0,wt.jsx)("path",{d:"M99.62 44.5V12.52L71.77 28.49L99.62 44.5Z",fill:r}),(0,wt.jsx)("path",{d:"M99.62 83.55V51.28L71.7 67.44L99.62 83.55Z",fill:r}),(0,wt.jsx)("path",{d:"M35.54 51.22V83.73L63.66 67.45L35.54 51.22Z",fill:o}),(0,wt.jsx)("path",{d:"M65.47 0C55.1388 0.298791 45.016 2.97835 35.89 7.83L65.52 24.83L65.47 0Z",fill:r}),(0,wt.jsx)("path",{d:"M35.54 12.3V44.62L63.69 28.48L35.54 12.3Z",fill:o}),(0,wt.jsx)("path",{d:"M31.52 10.34C22.8442 15.8136 15.521 23.1813 10.1 31.89L31.52 44.25V10.34Z",fill:r}),(0,wt.jsx)("path",{d:"M99.43 8C90.2123 3.0393 79.9635 0.299881 69.5 0V25.15L99.43 8Z",fill:o}),(0,wt.jsx)("path",{d:"M0 69.87C0.348236 80.2825 3.1145 90.4711 8.08 99.63L29.77 87.07L0 69.87Z",fill:o}),(0,wt.jsx)("path",{d:"M8.07001 35.37C3.13121 44.4917 0.372439 54.6334 0.0100098 65L29.8 47.91L8.07001 35.37Z",fill:o}),(0,wt.jsx)("path",{d:"M35.78 127.13C44.9355 132.013 55.0981 134.706 65.47 135V110.15L35.78 127.13Z",fill:r}),(0,wt.jsx)("path",{d:"M124.89 32C119.512 23.3126 112.237 15.9553 103.61 10.48V44.3L124.89 32Z",fill:o}),(0,wt.jsx)("path",{d:"M103.64 124.54C112.314 119.022 119.624 111.61 125.02 102.86L103.64 90.52V124.54Z",fill:o}),(0,wt.jsx)("path",{d:"M134.96 64.81C134.572 54.5437 131.835 44.5032 126.96 35.46L105.5 47.88L134.96 64.81Z",fill:r}),(0,wt.jsx)("path",{d:"M69.5 135C79.845 134.709 89.9825 132.029 99.12 127.17L69.5 110V135Z",fill:o}),(0,wt.jsx)("path",{d:"M31.52 83.44V51.56L3.83002 67.43L31.52 83.44Z",fill:r})]}),KC=PTe;var cG=G(require("@mui/material/Tooltip")),xG=G(require("react")),$C=require("react/jsx-runtime"),_Te=xG.default.forwardRef((e,t)=>(0,$C.jsx)(cG.default,{...e,ref:t,children:(0,$C.jsx)("span",{children:e.children})})),YC=_Te;var Yn=require("@mui/material");var hG=(0,Yn.styled)(Dt)(({theme:e})=>({padding:"5px 6px !important",color:e.palette.text.default,fontSize:"0.875rem",textTransform:"uppercase",fontWeight:400,height:"unset",borderRadius:"100px",border:`0.5px solid ${e.palette.border?.normal}`,background:e.palette.background.default,maxWidth:"14.375rem"})),gG=(0,Yn.styled)(An)(({theme:e})=>({width:300,height:280,overflow:"auto",backgroundColor:e.palette.background.secondary,borderRadius:"10px",boxShadow:"0px 1px 4px 0px rgba(0, 0, 0, 0.25) inset","@media (max-width: 843px)":{width:260},"@media (max-width: 768px)":{width:300},"@media (max-width: 375px)":{width:"100%"}})),ZC=(0,Yn.styled)(z)(({theme:e})=>({paddingBottom:"15px",color:e.palette.text?.default,textAlign:"center",fontSize:"1rem",letterSpacing:"0.15px"})),Qm=(0,Yn.styled)(ke)(({theme:e})=>({margin:"5px 0",padding:"7px 0",borderRadius:"10px",borderColor:e.palette.border?.strong,boxShadow:"none",display:"flex",flexDirection:"row",fill:e.palette.icon.default,"&:hover":{borderColor:e.palette.border?.brand,backgroundColor:`${Ze} !important`,fill:e.palette.icon.inverse}})),QC=(0,Yn.styled)(Yn.Grid2)({padding:"0 1rem","@media (max-width: 768px)":{padding:"0",display:"flex",alignItems:"center",flexDirection:"column",width:"100%"}}),TG=(0,Yn.styled)(Yn.Grid2)({padding:"2.5rem 1rem 0 1rem","@media (max-width: 768px)":{padding:"1rem",transform:"rotate(90deg)",height:"6.25rem",marginLeft:"6.25rem"}});var Ve=require("react/jsx-runtime"),SG={CHIP:"chip",OTHER:"other"};function ITe(e){return e?{meshery:(0,Ve.jsx)(KC,{}),kubernetes:(0,Ve.jsx)(dd,{}),github:(0,Ve.jsx)(eu,{})}[e]||null:(0,Ve.jsx)(dd,{})}function O3(e,t){return e.filter(r=>t.indexOf(r)===-1)}function CG(e,t){return e.filter(r=>t.indexOf(r)!==-1)}function kTe({name:e,assignableData:t,assignedData:r,assignablePage:o,assignedPage:a,originalAssignedData:n,emptyStateIconLeft:i,emtyStateMessageLeft:l,emptyStateIconRight:s,emtyStateMessageRight:u,originalLeftCount:f,originalRightCount:d,leftPermission:p=!0,rightPermission:m=!0,transferComponentType:x=SG.OTHER}){let[h,g]=Pa.default.useState([]),[T,E]=Pa.default.useState([]),[R,k]=Pa.default.useState(n),[D,C]=Pa.default.useState(0),[v,P]=Pa.default.useState(0);Pa.default.useEffect(()=>{k(n)},[n]),Pa.default.useEffect(()=>{E(t)},[t]),Pa.default.useEffect(()=>{C(f),P(d)},[f,d]);let B=CG(h,T),_=CG(h,R);Pa.default.useEffect(()=>{r(R)},[R]),Pa.default.useEffect(()=>{let M=y=>{y[0].isIntersecting&&o()},F=new IntersectionObserver(M,{threshold:1}),V=document.getElementById("leftList");return V&&F.observe(V),()=>{V&&F.unobserve(V)}},[t]),Pa.default.useEffect(()=>{let M=y=>{y[0].isIntersecting&&a()},F=new IntersectionObserver(M,{threshold:1}),V=document.getElementById("rightList");return V&&F.observe(V),()=>{V&&F.unobserve(V)}},[n]);let J=M=>()=>{let F=h.indexOf(M),V=[...h];F===-1?V.push(M):V.splice(F,1),g(V)},X=M=>{M.stopPropagation(),k(R.concat(T)),E([]),C(0),P(F=>F+D)},H=M=>{M.stopPropagation(),k(R.concat(B)),E(O3(T,B)),g(O3(h,B)),C(F=>F-B.length),P(F=>F+B.length)},q=M=>{M.stopPropagation(),E(T.concat(_)),k(O3(R,_)),g(O3(h,_)),P(F=>F-_.length),C(F=>F+_.length)},N=M=>{M.stopPropagation(),E(T.concat(R)),k([]),P(0),C(F=>F+v)},L=(M,F,V,y)=>(0,Ve.jsxs)(gG,{children:[(0,Ve.jsx)(Zr,{dense:!0,component:"div",role:"list",children:M.length>0?M.map(ee=>{let oe=`transfer-list-item-${ee.name}-label`;return(0,Ve.jsxs)(Or,{role:"listitem",sx:{display:"flex",justifyContent:"space-between","&:hover":{backgroundColor:"#00000010"}},onClick:J(ee),children:[x===SG.CHIP?(0,Ve.jsx)(YC,{title:ee.name,placement:"top",children:(0,Ve.jsx)(hG,{sx:{paddingY:"10px"},variant:"outlined",label:ee.name,onDelete:()=>{},deleteIcon:(0,Ve.jsx)(i5,{}),icon:ITe(ee?.kind)||(0,Ve.jsx)(dd,{})})}):(0,Ve.jsx)(YC,{title:ee.name,placement:"top",children:(0,Ve.jsx)(z,{sx:{maxWidth:"230px",height:"1.5rem",overflow:"hidden"},children:ee.name})}),(0,Ve.jsx)(Yr,{checked:h.indexOf(ee)!==-1,tabIndex:-1,disableRipple:!0,inputProps:{"aria-labelledby":oe}})]},ee.id)}):(0,Ve.jsxs)("div",{style:{textAlign:"center",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",height:"264px"},children:[F,(0,Ve.jsx)(z,{sx:{color:"#979797",px:5,py:2,lineHeight:1},children:V})]})}),(0,Ve.jsx)("div",{id:y})]});return(0,Ve.jsxs)(ce,{container:!0,justifyContent:"center",alignItems:"center",children:[(0,Ve.jsxs)(QC,{children:[(0,Ve.jsxs)(ZC,{children:["Available ",e," (",T.length,")"]}),L(T,i,l,"leftList")]}),(0,Ve.jsx)(TG,{children:(0,Ve.jsxs)(ce,{container:!0,direction:"column",alignItems:"center",children:[(0,Ve.jsxs)(Qm,{variant:"outlined",size:"small",onClick:X,disabled:!m||m&&(T?.length===0||T.length<D),"aria-label":"move all right",children:[(0,Ve.jsx)(Sd,{width:18,height:18}),(0,Ve.jsx)(Sd,{style:{position:"absolute",left:"27px"},width:18,height:18})]}),(0,Ve.jsx)(Qm,{variant:"outlined",size:"small",onClick:H,disabled:!m||m&&B.length===0,"aria-label":"move selected right",children:(0,Ve.jsx)(Sd,{width:18,height:18})}),(0,Ve.jsx)(Qm,{variant:"outlined",size:"small",onClick:q,disabled:!p||p&&_.length===0,"aria-label":"move selected left",children:(0,Ve.jsx)(md,{width:18,height:18})}),(0,Ve.jsxs)(Qm,{variant:"outlined",size:"small",onClick:N,disabled:!p||p&&(R?.length===0||R.length<v),"aria-label":"move all left",children:[(0,Ve.jsx)(md,{width:18,height:18}),(0,Ve.jsx)(md,{style:{position:"absolute",left:"27px"},width:18,height:18})]})]})}),(0,Ve.jsxs)(QC,{children:[(0,Ve.jsxs)(ZC,{children:["Assigned ",e," (",R.length,")"]}),L(R,s,u,"rightList")]})]})}var sp=kTe;var up=require("@mui/material"),XC=G(require("react"));var nr=require("react/jsx-runtime"),MTe=(0,up.styled)("div")(({theme:e})=>({background:e.palette.mode==="light"?Si.header:Ti.header,padding:"0.75rem 1rem",margin:"-1rem -1rem 1rem -1rem",display:"flex",justifyContent:"space-between",alignItems:"center",color:e.palette.text.constant?.white}));function LTe({filters:e,selectedFilters:t,setSelectedFilters:r,variant:o="outlined",handleApplyFilter:a,showAllOption:n=!0,id:i}){let[l,s]=XC.default.useState(null),[u,f]=XC.default.useState(!1),d=(0,b.useTheme)(),p=(0,up.useMediaQuery)(d.breakpoints.down("sm")),m=E=>{s(E.currentTarget),f(R=>!R)},x=()=>{s(null),f(!1)},h=(E,R)=>{let k=E.target.value;r(D=>({...D,[R]:k}))},g=()=>{x(),a()},T=()=>(0,nr.jsxs)("div",{children:[(0,nr.jsx)(MTe,{children:(0,nr.jsx)("h3",{children:"Filters: "})}),Object.keys(e).map(E=>{let R=e[E].options;return(0,nr.jsxs)("div",{role:"presentation",children:[(0,nr.jsx)(Ll,{id:e[E].name,children:e[E].name}),(0,nr.jsxs)(ca,{defaultValue:"All",value:t[E],variant:o,onChange:k=>h(k,E),style:{width:"20rem",marginBottom:"1rem"},inputProps:{"aria-label":"Without label"},displayEmpty:!0,children:[n&&(0,nr.jsx)(At,{value:"All",children:"All"}),R.map(k=>(0,nr.jsx)(At,{value:k.value,children:k.label},k.value))]},E)]},E)}),(0,nr.jsx)("div",{style:{display:"flex",justifyContent:"center"},children:(0,nr.jsx)(ke,{variant:"contained",onClick:g,children:"Apply"})})]});return(0,nr.jsx)(nr.Fragment,{children:(0,nr.jsxs)("div",{id:i,children:[(0,nr.jsx)(zt,{title:"Filter",onClick:m,icon:(0,nr.jsx)(W2,{fill:d.palette.icon.default}),arrow:!0}),p?(0,nr.jsx)(up.Drawer,{anchor:"bottom",open:u,onClose:x,PaperProps:{style:{padding:"0 1rem 1rem 1rem",backgroundColor:d.palette.background.surfaces}},children:T()}):(0,nr.jsx)(Yd,{id:u&&l?"transition-popper":void 0,open:u,anchorEl:l,placement:"bottom-end",children:(0,nr.jsx)(On,{onClickAway:x,mouseEvent:"onMouseDown",touchEvent:"onTouchStart",children:(0,nr.jsx)(An,{sx:{padding:"1rem",paddingTop:"1.8rem",boxShadow:"0px 4px 8px rgba(0, 0, 0, 0.1)",backgroundColor:d.palette.background.surfaces},children:T()})})})]})})}var yG=LTe;var bG=require("react");var ta=require("react/jsx-runtime"),dn={PUBLIC:"public",PRIVATE:"private",PUBLISHED:"published"},DTe=(0,b.styled)(Dl)(({theme:e})=>({"& .MuiPaper-root":{backgroundColor:e.palette.mode==="light"?i1:e.palette.background.constant?.table,color:e.palette.text.secondary,border:`1px solid ${e.palette.border.default}`,borderRadius:"0.25rem",padding:"0rem"},"& .MuiMenuItem-root":{fontSize:".9rem",padding:"0.5rem","&:hover":{backgroundColor:e.palette.mode==="light"?Ks:"rgba(0, 179, 159, 0.25)"}},"& .Mui-selected":{backgroundColor:e.palette.mode==="light"?Ks:"rgba(0, 179, 159, 0.25)"},"& .MuiList-padding":{padding:"0px"}})),FTe=(0,b.styled)(ke)(()=>({padding:"0px"})),NTe=(0,b.styled)("div")(({theme:e,enabled:t})=>({paddingLeft:"0.3rem",height:"1.5rem",width:"auto",paddingRight:t?"0":"0.3rem",borderRadius:"0.25rem",border:`1px solid ${Qf}`,background:e?.palette.mode==="light"?i1:e?.palette.background.constant?.table,textTransform:"uppercase",color:e?.palette.text.default,display:"flex",justifyContent:"center",alignItems:"center",fontSize:"0.75rem",fontFamily:e?.typography.fontFamily})),BTe=(0,b.styled)(At)(({theme:e})=>({textTransform:"capitalize",color:e.palette.icon.default})),HTe=(0,b.styled)("div")({marginRight:"0.5rem"}),VTe=({value:e,onChange:t,options:r,enabled:o})=>{let[a,n]=(0,bG.useState)(null),i=!!a,l=f=>{f.stopPropagation(),n(null)},s=f=>{f.stopPropagation(),o&&n(f.currentTarget)},u=(f,d)=>{f.stopPropagation(),t&&t(d),l(f)};return(0,ta.jsxs)(ta.Fragment,{children:[(0,ta.jsx)(FTe,{disabled:!o,onClick:s,"data-testid":`design-visibility-${e.toLowerCase()}`,children:(0,ta.jsxs)(NTe,{enabled:o,children:[(0,ta.jsx)("span",{style:{fontSize:"0.85rem"},children:e}),o&&(0,ta.jsx)(hF,{style:{...$o}})]})}),(0,ta.jsx)(DTe,{open:i,onClose:l,anchorEl:a,anchorReference:"anchorPosition",anchorPosition:{top:(a?.getBoundingClientRect().bottom??0)+5,left:(a?.getBoundingClientRect().left??0)+5},children:r?.map(([f,d],p)=>(0,ta.jsxs)(BTe,{"data-testid":`visibility-toggle-${f.toLowerCase()}`,onClick:m=>u(m,f),children:[(0,ta.jsx)(HTe,{children:(0,ta.jsx)(d,{width:16,height:16})}),f]},p))})]})},$i=VTe;var kG=require("@mui/material");var Uo=require("@mui/material"),vG=(0,Uo.styled)("div")(()=>({width:"85px",height:"88px",overflow:"hidden",position:"absolute",top:"-3px",left:"-3px"})),wG=(0,Uo.styled)("div")(({catalogClassName:e})=>({font:"bold 10px sans-serif",WebkitTransform:"rotate(-45deg)",textAlign:"center",transform:"rotate(-45deg)",position:"relative",padding:"4px 0",top:"15px",left:"-30px",width:"120px",display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",backgroundColor:{community:"rgba(122,132,142,.8)",official:"#EBC017",verified:"#00B39F"}[e],color:"#fff"})),EG=(0,Uo.styled)("div")(({outerStyles:e})=>({position:"relative",borderRadius:"1rem",textAlign:"center",transformStyle:"preserve-3d",transition:"all .9s ease-out",marginBottom:"1.25rem",display:"inline-flex",perspective:"1000px","&:hover":{cursor:"pointer",transform:"translateY(-2%)"},"@media (max-width:1200px)":{height:"18.75rem"},...e})),RG=(0,Uo.styled)("div")(({theme:e})=>({position:"relative",width:"100%",height:"100%",textAlign:"center",transition:"transform 0.6s",background:e.palette.background.default,boxShadow:`2px 2px 3px 0px ${e.palette.background.brand?.default}`,borderRadius:"0.9375rem"})),OG=(0,Uo.styled)("span")(({theme:e})=>({position:"absolute",top:"0",right:"0",minWidth:"3rem",padding:"0 0.75rem",fontSize:"0.875rem",textTransform:"capitalize",background:e.palette.background.brand?.default,color:e.palette.text.inverse,borderRadius:"0 1rem 0 2rem"})),fp=(0,Uo.styled)("p")(({theme:e})=>({fontSize:"1rem",textTransform:"capitalize",margin:"0rem",lineHeight:"1.5",textAlign:"center",color:e.palette.text.secondary,fontWeight:"600"})),AG=(0,Uo.styled)(Uo.Typography)(({theme:e})=>({fontWeight:"bold",textTransform:"capitalize",color:e.palette.text.default,fontSize:"1.125rem",marginTop:"2rem",padding:"0rem 1rem",position:"relative",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",textAlign:"center",width:"100%"})),PG=(0,Uo.styled)("div")(({theme:e})=>({display:"flex",justifyContent:"space-around",fontSize:"0.2rem",color:e.palette.text.secondary,padding:"0.9rem 0.1rem",background:e.palette.background.secondary,position:"absolute",bottom:"0px",marginTop:"1.2rem",borderRadius:"0 0 0.9375rem 0.9375rem",width:"100%"})),dp=(0,Uo.styled)("div")(()=>({display:"flex",alignItems:"center",gap:"4px",fontSize:"0.2rem",color:"rgba(26, 26, 26, .8)",margin:"0rem",padding:"0.1rem"})),_G=(0,Uo.styled)("div")(()=>({height:"max-content",display:"flex",marginTop:"-1rem",flexDirection:"column",padding:"0rem 1rem",justifyContent:"start",alignItems:"start","@media (max-width:1200px)":{height:"max-content"}})),IG=(0,Uo.styled)("div")(({theme:e})=>({background:e.palette.mode==="light"?"rgba(231, 239, 243, 0.40)":"#212121",display:"flex",alignItems:"center",justifyContent:"center",padding:"0.5rem",width:"100%",borderRadius:"0.5rem"}));var $e=require("react/jsx-runtime"),Tpt=(0,kG.styled)("a")(()=>({textDecoration:"none"}));var UTe=({catalogClassName:e})=>e?(0,$e.jsx)(vG,{children:(0,$e.jsx)(wG,{catalogClassName:e,children:e})}):(0,$e.jsx)($e.Fragment,{}),WTe=({pattern:e,patternType:t,cardHeight:r,cardWidth:o,cardStyles:a,onCardClick:n})=>{let i={height:r,width:o,...a};return(0,$e.jsx)(EG,{outerStyles:i,onClick:n,children:(0,$e.jsxs)(RG,{className:"innerCard",children:[(0,$e.jsx)(UTe,{catalogClassName:e?.catalog_data?.content_class}),(0,$e.jsx)(OG,{children:t}),(0,$e.jsxs)(_G,{children:[(0,$e.jsx)(AG,{style:{margin:"3rem 0 1.59rem 0",textAlign:"center"},children:e.name}),(0,$e.jsx)(IG,{children:(0,$e.jsx)(Xa,{height:"118",width:"120"})})]}),(0,$e.jsxs)(PG,{children:[(0,$e.jsxs)(dp,{children:[(0,$e.jsx)(Sa,{width:18,height:18}),(0,$e.jsx)(fp,{children:e.download_count})]}),(0,$e.jsxs)(dp,{children:[(0,$e.jsx)(td,{width:18,height:18,fill:"#51636B"}),(0,$e.jsx)(fp,{children:e.clone_count})]}),(0,$e.jsxs)(dp,{children:[(0,$e.jsx)(hd,{width:18,height:18,fill:"#51636B"}),(0,$e.jsx)(fp,{children:e.view_count})]}),(0,$e.jsxs)(dp,{children:[(0,$e.jsx)(ud,{width:18,height:18}),(0,$e.jsx)(fp,{children:e.deployment_count})]}),(0,$e.jsxs)(dp,{children:[(0,$e.jsx)(Ln,{width:18,height:18,fill:"#51636B"}),(0,$e.jsx)(fp,{children:e.share_count})]})]})]})})},JC=WTe;var WG=require("@mui/material/styles"),tc=require("react");var ec=require("react");var A3=require("react");var DG=require("lodash"),Mu=require("react");var ey=require("@mui/material");var MG=(0,ey.styled)(zs)(({style:e,theme:t})=>({fontFamily:t.typography.fontFamily,width:"100%","@media (max-width: 590px)":{marginLeft:"0.25rem",paddingLeft:"0.25rem"},display:"flex",backgroundColor:t.palette.mode==="light"?t.palette.common.white:t.palette.background.surfaces,...e})),LG=(0,ey.styled)(Vf)(({theme:e})=>({borderLeft:`1px solid ${e.palette.background.tertiary}`,height:"30px",paddingLeft:"10px"}));var Xm=require("react/jsx-runtime");function qTe({onChange:e,value:t="",label:r,sx:o,placeholder:a,endAdornment:n,debounceTime:i=300}){let l=(0,b.useTheme)(),[s,u]=(0,Mu.useState)(t);(0,Mu.useEffect)(()=>{t!==s&&u(t)},[t]);let f=m=>({target:{value:m},persist:()=>{}}),d=(0,Mu.useMemo)(()=>(0,DG.debounce)(m=>{e?.(f(m))},i),[e,i]);return(0,Mu.useEffect)(()=>{if(e)return s===""?e(f(s)):d(s),()=>{d.cancel()}},[s,e,d]),(0,Xm.jsx)(MG,{type:"search",label:r,fullWidth:!0,value:s,onChange:m=>{let x=m.target.value;u(x)},sx:o,placeholder:a??"Search",startAdornment:(0,Xm.jsx)(Vf,{position:"start",children:(0,Xm.jsx)(Cd,{fill:l.palette.background.neutral?.default})}),endAdornment:(0,Xm.jsx)(LG,{position:"end",children:n})})}var Jm=qTe;var Zn=require("@mui/material/styles");var FG=(0,Zn.styled)($)(({styleProps:e})=>({padding:"1rem",borderRadius:"1rem",width:"100%",gap:"0.5rem",boxShadow:"0px 2px 10px rgba(0, 0, 0, 0.2)",display:"flex",flexDirection:"column",height:"fit-content",backgroundColor:e.backgroundColor,"@media (max-width:900px)":{display:"none"},fontFamily:e.fontFamily,"&::-webkit-scrollbar":{width:"6px"}})),NG=(0,Zn.styled)("div")(()=>({display:"none","@media (max-width:899px)":{display:"block"}})),Lpt=(0,Zn.styled)("div")(()=>({display:"flex",justifyContent:"space-around",alignItems:"center"})),BG=(0,Zn.styled)(ke)(({theme:e})=>({backgroundColor:e.palette.primary.brand?.default,"&:hover":{backgroundColor:e.palette.background.default},height:"3.75rem","@media (max-width:450px)":{minWidth:"0px"}})),HG=(0,Zn.styled)($)(({theme:e})=>({display:"flex",justifyContent:"space-between",alignItems:"center",padding:"0.5rem 1rem",background:e.palette.mode==="light"?Si.header:Ti.header,height:"10vh"})),Dpt=(0,Zn.styled)(ci)(({theme:e})=>({padding:"0.25rem 2rem",borderBottom:"1px solid",borderBottomColor:e.palette.text.disabled})),VG=(0,Zn.styled)(ci)(({theme:e})=>({backgroundColor:e.palette.background.surfaces,borderRadius:"0.5rem",marginTop:2,display:"flex",justifyContent:"space-between"})),UG=(0,Zn.styled)("p")(({theme:e})=>({color:e.palette.text.tertiary})),Fpt=(0,Zn.styled)("span")(()=>({marginLeft:"0.5rem",display:"block","@media (max-width: 853px)":{display:"none"}}));var ir=require("react/jsx-runtime"),GTe=({filterKey:e,sectionDisplayName:t,options:r=[],filters:o,openSections:a,onCheckboxChange:n,onSectionToggle:i,styleProps:l,customComponent:s})=>{let[u,f]=(0,A3.useState)(""),d=(0,A3.useCallback)(x=>{f(x.target.value)},[]),p=r.length>10,m=u&&r.length?r.filter(x=>x.label.toLowerCase().includes(u.toLowerCase())):r;return(0,ir.jsxs)(ir.Fragment,{children:[(0,ir.jsxs)(VG,{onClick:()=>i(e),style:{backgroundColor:l.sectionTitleBackgroundColor},children:[(0,ir.jsx)(z,{sx:{fontSize:"1rem"},fontWeight:"bold",fontFamily:l.fontFamily,children:(t||e).toUpperCase()}),a[e]?(0,ir.jsx)($l,{}):(0,ir.jsx)(Ko,{})]}),(0,ir.jsx)(da,{in:a[e],timeout:"auto",unmountOnExit:!0,children:s?(0,ir.jsx)(s,{}):(0,ir.jsxs)(Zr,{component:"div",sx:{overflowY:"auto",maxHeight:"25rem",backgroundColor:l.backgroundColor,"&::-webkit-scrollbar":{width:"6px"}},children:[p&&(0,ir.jsx)($,{sx:{px:"0.5rem",mb:"0.5rem"},children:(0,ir.jsx)(Jm,{value:u,onChange:d,placeholder:"Search",endAdornment:(0,ir.jsxs)(UG,{children:["Total : ",m.length??0]})})}),m.map((x,h)=>(0,ir.jsxs)(Gf,{direction:"row",alignItems:"center",px:"0.5rem",justifyContent:"space-between",children:[(0,ir.jsxs)(Gf,{direction:"row",alignItems:"center",gap:"0.35rem",children:[(0,ir.jsx)(Yr,{id:`checkbox-${x.label}`,checked:Array.isArray(o[e])?o[e].includes(x.value):o[e]===x.value,onChange:g=>n&&n(e,x.value,g.target.checked),value:x.value}),x.Icon&&(0,ir.jsx)(x.Icon,{width:"20px",height:"20px"}),(0,ir.jsx)(z,{fontFamily:l.fontFamily,children:x.label})]}),(0,ir.jsxs)(Gf,{direction:"row",alignItems:"center",gap:"0.35rem",children:[x.totalCount!==void 0&&`(${x.totalCount||0})`,x.description&&(0,ir.jsx)(Ui,{variant:"standard",helpText:x.description})]})]},`${x.value}-${h}`))]})})]})},ty=GTe;var pp=require("react/jsx-runtime"),zTe=({lists:e,onApplyFilters:t,value:r,styleProps:o})=>{let[a,n]=(0,ec.useState)(()=>{let s={};return e.forEach(u=>{s[u.filterKey]=!!u.defaultOpen}),s}),i=(0,ec.useCallback)(s=>{n(u=>({...u,[s]:!u[s]}))},[]),l=(0,ec.useCallback)((s,u,f)=>{t(d=>{let p={...d};if(e.find(x=>x.filterKey===s)?.isMultiSelect!==!1){let x=p[s];Array.isArray(x)||(x=x?[x]:[]),p[s]=f?[...x,u]:x.filter(h=>h!==u)}else p[s]=f?u:"";return p})},[e,t]);return(0,pp.jsx)(pp.Fragment,{children:e.map(s=>s.customComponent?(0,pp.jsx)(ty,{filterKey:s.filterKey,filters:r,sectionDisplayName:s.sectionDisplayName,onSectionToggle:i,styleProps:o,openSections:a,customComponent:s.customComponent},s.filterKey):(0,pp.jsx)(ty,{filterKey:s.filterKey,sectionDisplayName:s.sectionDisplayName,options:s.options,filters:r,openSections:a,onCheckboxChange:l,onSectionToggle:i,styleProps:o},s.filterKey))})},ry=zTe;var mr=require("react/jsx-runtime"),jTe=({lists:e,setData:t,value:r={},styleProps:o})=>{let a=(0,WG.useTheme)(),[n,i]=(0,tc.useState)(!1),l=(0,tc.useCallback)(()=>{i(!0)},[]),s=(0,tc.useCallback)(()=>{i(!1)},[]),f={...{backgroundColor:a.palette.mode==="light"?a.palette.background.default:a.palette.background.secondary,sectionTitleBackgroundColor:a.palette.mode==="light"?a.palette.background.surfaces:Hl.main,fontFamily:a.typography.fontFamily},...o};return(0,mr.jsxs)(mr.Fragment,{children:[(0,mr.jsx)(FG,{styleProps:f,children:(0,mr.jsx)(ry,{lists:e,onApplyFilters:t,value:r,styleProps:f})}),(0,mr.jsxs)(NG,{children:[(0,mr.jsx)(xe,{title:"Filters",placement:"bottom",children:(0,mr.jsx)(BG,{variant:"contained",onClick:l,children:(0,mr.jsx)(RF,{style:{height:"28px",width:"28px"},fill:a.palette.text.default})})}),(0,mr.jsx)(m2,{anchor:"bottom",open:n,variant:"temporary",onClose:s,style:{zIndex:"1399"},children:(0,mr.jsxs)($,{sx:{overflowY:"hidden",height:"90vh"},children:[(0,mr.jsxs)(HG,{children:[(0,mr.jsx)(z,{variant:"h6",sx:{color:a.palette.text.constant?.white},component:"div",children:"Filters"}),(0,mr.jsx)(Ou,{onClick:s,children:(0,mr.jsx)(Ft,{height:"32px",width:"32px"})})]}),(0,mr.jsx)($,{style:{height:"75vh",overflowY:"auto",background:a.palette.background.surfaces,padding:"0 16px"},children:(0,mr.jsx)(ry,{lists:e,onApplyFilters:t,value:r,styleProps:f})}),(0,mr.jsx)($,{sx:{background:a.palette.mode==="light"?Si.fotter:Ti.fotter,height:"5vh"}})]})})]})]})},oy=jTe;var Lu=require("react/jsx-runtime");function KTe({open:e,content:t,title:r,actions:o,onClose:a}){return(0,Lu.jsxs)(pa,{open:e,onClose:a,children:[(0,Lu.jsx)(Im,{children:r}),(0,Lu.jsx)(_l,{children:(0,Lu.jsx)(Il,{children:t})}),(0,Lu.jsx)(Hf,{children:o})]})}var ay=KTe;var mp=require("@mui/material"),ra=G(require("react"));var jt=require("react/jsx-runtime"),qG=require("react"),$Te=({data:e,label:t,fetchSuggestions:r,setFilterData:o,isLoading:a,type:n,disabled:i,selectedData:l,searchValue:s,setSearchValue:u,iconComponent:f=(0,jt.jsx)(N1,{..._d})})=>{let[d,p]=(0,ra.useState)(""),[m,x]=(0,ra.useState)(!1),[h,g]=(0,ra.useState)(!1),[T,E]=(0,ra.useState)(l);(0,ra.useEffect)(()=>{E(l)},[l]);let R=(0,ra.useCallback)(C=>{let v=T.filter(P=>P.id!==C);E(v),o(v)},[T,o]),k=(0,ra.useCallback)((C,v)=>{if(!v)return;if(T.some(_=>_.id===v.id)){p(`${n} already selected`);return}let B=[...T,v];E(B),o(B),p(""),u(""),x(!1)},[T,o,n,u]),D=(0,ra.useCallback)((C,v)=>{u(v),v===""?x(!1):(r(v),p(""),x(!0))},[r,u]);return(0,jt.jsxs)($,{sx:{width:"100%"},children:[(0,jt.jsx)(mp.Autocomplete,{id:`${n}-search-field`,style:{width:"100%"},options:e,getOptionLabel:()=>s,isOptionEqualToValue:(C,v)=>C.id===v.id,noOptionsText:a?"Loading...":`No ${n} found`,loading:a,open:m,onClose:()=>x(!1),disabled:i,value:void 0,inputValue:s,onChange:k,onInputChange:D,filterOptions:C=>C,disableClearable:!0,includeInputInList:!0,filterSelectedOptions:!0,disableListWrap:!0,clearOnBlur:!0,popupIcon:null,blurOnSelect:!0,forcePopupIcon:!1,renderInput:C=>(0,jt.jsx)(Qr,{...C,label:t||`Add ${n}`,error:!!d,helperText:d,fullWidth:!0,InputLabelProps:{style:{fontFamily:"inherit"}},InputProps:{...C.InputProps,endAdornment:(0,jt.jsx)(ra.default.Fragment,{children:a?(0,jt.jsx)(Gt,{color:"inherit",size:20}):null})}}),renderOption:(C,v)=>(0,qG.createElement)("li",{...C,key:v.id},(0,jt.jsx)($,{component:"li",sx:{"& > img":{mr:2,flexShrink:0}},children:(0,jt.jsxs)(mp.Grid2,{container:!0,alignItems:"center",children:[(0,jt.jsx)(mp.Grid2,{children:(0,jt.jsx)($,{sx:{color:"text.secondary",mr:2},children:f})}),(0,jt.jsx)(mp.Grid2,{size:"grow",children:(0,jt.jsx)(z,{variant:"body2",children:v.name})})]})}))}),(0,jt.jsxs)($,{sx:{display:"flex",flexWrap:"wrap",gap:.5,mt:T?.length>0?"0.5rem":""},children:[!h&&T?.length>0&&(0,jt.jsx)(Dt,{avatar:f,label:T[T.length-1]?.name,size:"small",onDelete:()=>R(T[T.length-1]?.id),deleteIcon:(0,jt.jsx)(Xt,{title:`Remove ${n}`,children:(0,jt.jsx)(Ft,{style:To})})},T[T.length-1]?.id),h&&T?.map(C=>(0,jt.jsx)(Dt,{avatar:(0,jt.jsx)(N1,{...To}),label:C.name,size:"small",onDelete:()=>R(C.id),deleteIcon:(0,jt.jsx)(Xt,{title:`Remove ${n}`,children:(0,jt.jsx)(Ft,{style:To})})},C.id)),T?.length>1&&(0,jt.jsx)(z,{onClick:()=>g(!h),sx:{cursor:"pointer"},children:h?"(hide)":`(+${T?.length-1})`})]})]})},ny=$Te;var rc=require("@mui/material"),GG=(0,rc.styled)("div")(({theme:e})=>({padding:"2.5rem",margin:"2rem 0",backgroundColor:e.palette.grey.A400,display:"flex",border:`1px solid ${e.palette.common.black}`,justifyContent:"space-between",transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)","&:hover":{transition:"background 150ms ease-out 0s, border 150ms ease-out 0s, transform 150ms ease-out 0s",transform:"translate3d(0px, -1px, 0px)",boxShadow:`${e.palette.common.black} 0px 8px 16px 0px`},"@media screen and (max-width: 992px)":{padding:"1.5rem"},"@media screen and (max-width: 500px)":{padding:"0.75rem"}})),zG=(0,rc.styled)("div")({display:"inline-flex"}),jG=(0,rc.styled)("div")(({theme:e})=>({fontSize:"2rem",margin:"0 2rem 0 1rem",color:e.palette.grey[800],alignSelf:"center",transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"})),KG=(0,rc.styled)("div")(({theme:e})=>({h2:{margin:"0.25rem 0"},p:{margin:"0.35rem 0",color:e.palette.grey[800],transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"}}));var gs=require("react/jsx-runtime"),YTe=({chapterNum:e,chapter:t})=>(0,gs.jsx)(GG,{id:t.frontmatter.courseTitle?t.frontmatter.courseTitle:void 0,children:(0,gs.jsxs)(zG,{children:[(0,gs.jsx)(jG,{children:e}),(0,gs.jsxs)(KG,{children:[(0,gs.jsx)("h2",{children:t.frontmatter.chapterTitle?t.frontmatter.chapterTitle:t.frontmatter.courseTitle}),(0,gs.jsx)("p",{children:t.frontmatter.description})]})]})}),iy=YTe;var P3=require("@mui/material"),_3=G(require("react"));var Du=require("@mui/material/styles");var R1t=(0,Du.styled)("div")(({theme:e})=>({marginLeft:".5rem",color:e.palette.background.secondary})),$G=(0,Du.styled)(Wf)({overflowY:"auto",scrollbarWidth:"none","&::-webkit-scrollbar":{width:"0em"}}),YG=(0,Du.styled)(Or)(()=>({pointerEvents:"auto",margin:"0.5rem 0rem 0.5rem 0rem",fontSize:"0.1rem",padding:"0"})),ZG=(0,Du.styled)(Or)(()=>({pointerEvents:"auto",margin:"0rem 0rem 0rem 0.5rem",fontSize:"0.1rem"})),QG=(0,Du.styled)("div")({marginRight:"0.75rem",marginLeft:"0.5rem"}),XG=(0,Du.styled)("div")({marginRight:"0.5rem"});var Kr=require("react/jsx-runtime"),ZTe=({navigationItems:e,MenuListProps:t={},ListItemTextProps:r={}})=>{let o=(0,P3.useTheme)(),a=(0,P3.useMediaQuery)(o.breakpoints.up("sm")),[n,i]=(0,_3.useState)(null),l=(s,u)=>{u.stopPropagation(),i(f=>f===s?null:s)};return(0,Kr.jsx)($G,{...t,dense:!0,children:e.map(s=>{let u=n===s.id,f=s.permission??!0,d=s.addDivider??!1;return!(s.showOnWeb??!0)&&a?null:(0,Kr.jsxs)(_3.default.Fragment,{children:[(0,Kr.jsxs)(At,{disabled:!f,onClick:s.onClick,"data-testid":`nav-item-${s.id}`,children:[(0,Kr.jsxs)(YG,{children:[s.icon&&(0,Kr.jsx)(QG,{children:s.icon}),(0,Kr.jsx)(Qt,{primary:s.title,...r})]}),s.subItems&&(0,Kr.jsx)(Qt,{"data-testid":`nav-toggle-${s.id}`,children:u?(0,Kr.jsx)($l,{onClick:m=>l(s.id,m)}):(0,Kr.jsx)(Ko,{onClick:m=>l(s.id,m)})})]}),s.subItems&&(0,Kr.jsx)(da,{in:u,timeout:"auto",unmountOnExit:!0,variant:"submenu",children:s.subItems.map(m=>(0,Kr.jsx)(At,{disabled:!m.permission,onClick:m.onClick,"data-testid":`nav-subitem-${m.id}`,children:(0,Kr.jsxs)(ZG,{children:[m.icon&&(0,Kr.jsx)(XG,{children:m.icon}),(0,Kr.jsx)(Qt,{primary:m.title,...r})]})},m.id))}),d&&(0,Kr.jsx)(ma,{})]},s.id)})})},ly=ZTe;var I3=require("@mui/material");var cp=require("react/jsx-runtime"),QTe=(0,I3.styled)("div")(({type:e,theme:t})=>({fontWeight:500,background:"#212529",color:"inherit",marginTop:"2rem",width:"100%",height:"100%",marginBottom:"2rem",padding:"0.5rem 1rem",borderRadius:0,borderStyle:"solid",borderColor:e==="warning"?t.palette.text.warning:t.palette.background.brand?.default,borderWidth:"0 0 0 4px"})),XTe=(0,I3.styled)("h4")(({type:e,theme:t})=>({color:e==="warning"?t.palette.text.warning:t.palette.background.brand?.default,fontSize:"1.35rem"})),JTe=(0,I3.styled)("p")(({theme:e})=>({color:e.palette.text.inverse})),e8e=({type:e="note",title:t,content:r})=>(0,cp.jsxs)(QTe,{type:e,children:[(0,cp.jsx)(XTe,{type:e,children:t}),(0,cp.jsx)(JTe,{children:(0,cp.jsx)(t3,{content:r})})]}),sy=e8e;var lz=require("re-resizable"),sz=G(require("react-draggable"));var Ts=require("react/jsx-runtime"),t8e=({height:e=24,width:t=24,fill:r="#E8EFF3",...o})=>(0,Ts.jsxs)("svg",{width:t,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...o,children:[(0,Ts.jsx)("g",{clipPath:"url(#clip0_34897_172744)",children:(0,Ts.jsx)("path",{d:"M6 10C4.9 10 4 10.9 4 12C4 13.1 4.9 14 6 14C7.1 14 8 13.1 8 12C8 10.9 7.1 10 6 10ZM18 10C16.9 10 16 10.9 16 12C16 13.1 16.9 14 18 14C19.1 14 20 13.1 20 12C20 10.9 19.1 10 18 10ZM12 10C10.9 10 10 10.9 10 12C10 13.1 10.9 14 12 14C13.1 14 14 13.1 14 12C14 10.9 13.1 10 12 10Z",fill:r})}),(0,Ts.jsx)("defs",{children:(0,Ts.jsx)("clipPath",{id:"clip0_34897_172744",children:(0,Ts.jsx)("rect",{width:"24",height:"24",fill:"white"})})})]}),uy=t8e;var $1t=(0,b.styled)(Or)(({theme:e})=>({padding:e.spacing(.5,.5),marginBlock:e.spacing(1),"& .MuiListItemText-primary":{fontSize:"1rem",textTransform:"capitalize",fontWeight:700},cursor:"pointer","&:hover":{backgroundColor:e.palette.action.hover},"& .MuiSvgIcon-root":{opacity:0,transition:"opacity 0.2s"},"&:hover .MuiSvgIcon-root":{opacity:1}})),Y1t=(0,b.styled)(Or,{shouldForwardProp:e=>e!=="isVisible"})(({theme:e,isVisible:t})=>({padding:e.spacing(.05,.5),fontStyle:t?"normal":"italic",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap","& .MuiSvgIcon-root":{height:20,width:20},"& .MuiListItemIcon-root":{minWidth:0,opacity:t?.8:.3},"& .MuiTypography-root":{fontSize:"0.9rem",opacity:t?1:.5}})),JG=(0,b.styled)("div")(({theme:e})=>({display:"flex",alignItems:"center",padding:e.spacing(4,2),alignContent:"stretch",justifyContent:"space-between",cursor:"move",background:e.palette.mode==="light"?"linear-gradient(90deg, #3B687B 0%, #507D90 100%)":"linear-gradient(90deg, #28353A 0%, #3D4F57 100%)",height:"3rem",flexShrink:0})),ez=(0,b.styled)($)(({theme:e})=>({padding:e.spacing(2),backgroundColor:e.palette.background.surfaces,overflow:"auto",flex:1,minHeight:0})),tz=(0,b.styled)("div")({height:"100%",display:"flex",flexDirection:"column",minHeight:"3rem"}),rz=(0,b.styled)($)(({theme:e,intitialPosition:t})=>({borderRadius:"8px",overflow:"hidden",flexShrink:0,zIndex:100,position:"absolute",backgroundColor:e.palette.background.blur?.light,boxShadow:`0 4px 16px ${e.palette.background.blur?.light}`,maxHeight:"80%",display:"flex",boxSizing:"border-box",...t})),oz=(0,b.styled)(uy)(({theme:e})=>({fill:e.palette.common.white,position:"absolute",top:"-0.3rem",left:"50%"})),az=(0,b.styled)("div")({display:"flex",gap:"1rem",justifyContent:"flex-end",alignItems:"center"}),nz=(0,b.styled)("div")({display:"flex",justifyContent:"end",alignItems:"center",flex:"1"}),k3=(0,b.styled)(tt)(({theme:e})=>({color:e.palette.common.white})),iz=(0,b.styled)("div")(()=>({position:"absolute",left:"0",right:"0",marginInline:"auto",width:"fit-content"}));var Vt=require("react/jsx-runtime"),r8e=({isOpen:e,id:t="panel",children:r,areAllExpanded:o,toggleExpandAll:a,handleClose:n,defaultSize:i,intitialPosition:l,sx:s,minimizePanel:u,title:f=""})=>{let d=(0,b.useTheme)();return e?(0,Vt.jsx)(sz.default,{handle:".drag-handle",children:(0,Vt.jsx)(rz,{intitialPosition:l,sx:s,children:(0,Vt.jsx)(lz.Resizable,{defaultSize:{width:i?.width||"18rem",height:i?.height||"auto"},onResize:()=>{window.dispatchEvent(new Event("panel-resize"))},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},children:(0,Vt.jsx)(tz,{children:(0,Vt.jsxs)(no,{children:[(0,Vt.jsx)("div",{className:"drag-handle",children:(0,Vt.jsxs)(JG,{children:[(0,Vt.jsx)($,{display:"flex",justifyContent:"flex-end",padding:"8px",children:a&&(0,Vt.jsx)(Xt,{title:o?"Collapse All":"Expand All",children:(0,Vt.jsx)(k3,{onClick:a,children:o?(0,Vt.jsx)(B2,{}):(0,Vt.jsx)(U2,{})})})}),(0,Vt.jsx)(oz,{}),(0,Vt.jsxs)(nz,{children:[(0,Vt.jsx)(az,{id:`${t}-panel-header-actions-container`}),(0,Vt.jsx)(iz,{children:f}),u&&(0,Vt.jsx)(k3,{onClick:u,children:(0,Vt.jsx)(nd,{fill:d.palette.common.white})}),(0,Vt.jsx)(k3,{onClick:n,children:(0,Vt.jsx)(Ft,{fill:d.palette.common.white})})]})]})}),(0,Vt.jsx)(ez,{className:"panel-body",children:r})]})})})})}):null},fy=({...e})=>(0,Vt.jsx)(r8e,{...e});var ac=require("react");var umt=(0,b.styled)($)(()=>({padding:"1rem",borderRadius:"1rem",backgroundColor:"white",width:"100%",alignSelf:"center",height:"20rem",marginBottom:"1rem",boxShadow:"0px 2px 10px rgba(0, 0, 0, 0.2)",display:"block","@media (max-width:900px)":{height:"18rem",marginInline:"0",padding:"0.5rem"}})),fmt=(0,b.styled)("div")(()=>({width:"100%",justifyContent:"center",display:"flex",alignItems:"center",marginTop:"20px"})),dmt=(0,b.styled)($)(()=>({display:"flex",justifyContent:"space-evenly",gap:"2.5rem",width:"100%"})),pmt=(0,b.styled)($)(()=>({display:"flex",flexWrap:"wrap",justifyContent:"space-evenly",gap:"2.5rem",width:"100%"})),mmt=(0,b.styled)("div")(({theme:e})=>({backgroundColor:e.palette.common.white,textAlign:"center",borderRadius:"1rem",width:"100%",padding:"1.5rem",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"})),dy=(0,b.styled)($)(({theme:e})=>({background:e.palette.mode==="light"?e.palette.background.default:e.palette.background.secondary,paddingTop:e.spacing(2),borderRadius:"1rem",display:"flex",alignItems:"center",flexDirection:"column"})),uz=(0,b.styled)($)(({theme:e})=>({paddingInline:e.spacing(2),display:"flex",alignItems:"center",placeSelf:"flex-start",justifyContent:"space-between",width:"100%"})),fz=(0,b.styled)(z)(({theme:e})=>({fontSize:"1.5rem",fontWeight:600,color:e.palette.text.default})),dz=(0,b.styled)(Rr)(({theme:e})=>({width:"200px",margin:"0.5rem",height:"100%",borderRadius:"1rem",position:"relative",overflow:"hidden",transition:"all 0.3s ease-in-out",background:n3(e.palette.mode==="light"),border:"1px solid transparent",boxShadow:"2px 2px 3px 2px rgb(0, 211, 169, 0.5)","&:hover":{transform:"translateY(-4px)",boxShadow:`2px 2px 3px 2px ${e.palette.text.brand}`,cursor:"pointer"}})),pz=(0,b.styled)("div")(()=>({display:"flex",gap:"10px",flexWrap:"nowrap",justifyContent:"center",width:"100%"})),mz=(0,b.styled)($)(()=>({width:"2rem",height:"2rem",padding:"0.25rem",borderRadius:"8px",backgroundColor:"#D6FFF7",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.3s ease","& svg":{transition:"transform 0.3s ease"},"&:hover svg":{transform:"scale(1.2)"},"& .clone-icon":{width:"20px",height:"20px"}})),cz=(0,b.styled)($a)(()=>({height:"100%",display:"flex",flexDirection:"column",padding:"12px",paddingBottom:"0px !important"})),xz=(0,b.styled)($)({display:"flex",justifyContent:"space-between",alignItems:"flex-start",marginBottom:"0.5rem",gap:"0.6rem"}),hz=(0,b.styled)(z)(({theme:e})=>({fontSize:"0.85rem",fontWeight:"bold",color:e.palette.text.default,lineHeight:1.2,marginTop:"4px",textTransform:"uppercase",letterSpacing:"0.5px",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"clip",maxWidth:"70%",height:"2.4em"})),gz=(0,b.styled)(z)(({theme:e})=>({fontSize:"24px",fontWeight:700,color:e.palette.icon.secondary,marginBottom:"0.5rem",lineHeight:1.2})),cmt=(0,b.styled)($)(({theme:e})=>({marginBottom:"1rem",padding:"8px",borderRadius:"8px",background:e.palette.mode==="light"?"#f8fafc":Pn,color:e.palette.mode==="light"?"rgba(26, 26, 26, .8)":e.palette.text.default,transition:"background 0.3s ease, filter 0.3s ease","&:hover":{filter:"brightness(0.98)"}})),Tz=(0,b.styled)(z)(({theme:e})=>({fontSize:"0.9rem",fontWeight:1e3,color:e.palette.text.default,lineHeight:1.3,marginBottom:"4px",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis",minHeight:"fit-content",maxHeight:"2.6em"})),Sz=(0,b.styled)(z)({fontSize:"0.75rem",marginBottom:"8px"}),Cz=(0,b.styled)($)(({theme:e})=>({display:"flex",gap:"15px",width:"100%",padding:"20px",background:e.palette.mode==="light"?e.palette.background.default:e.palette.background.secondary,borderRadius:"12px",boxShadow:"0 1px 3px rgba(0, 0, 0, 0.05)",paddingBottom:e.spacing(3)})),yz=(0,b.styled)($)(({theme:e})=>({padding:"1rem",color:e.palette.text.error,fontSize:"1rem",fontWeight:500}));var pn=require("react/jsx-runtime"),py=({open:e,handleClick:t})=>{let r=(0,b.useTheme)();return(0,pn.jsx)(xe,{title:e?"Hide Performers":"Show Performers",placement:"bottom",children:(0,pn.jsx)("span",{children:(0,pn.jsxs)(ke,{variant:"contained",onClick:t,sx:{height:"3.7rem",padding:"0.3rem 1rem 0.3rem 0.3rem"},style:{backgroundColor:e?void 0:r.palette.background.constant?.disabled},children:[(0,pn.jsx)(Kl,{style:{height:"2rem",width:"2rem",marginRight:"10px"}}),e?"Hide Performers":"Show Performers"]})})})},my=({handleClick:e})=>(0,pn.jsx)(xe,{title:"Open Leaderboard",placement:"bottom",children:(0,pn.jsx)(ke,{variant:"contained",onClick:e,sx:{height:"3.7rem",padding:"0.3rem",display:{xs:"inline-flex",sm:"none"}},children:(0,pn.jsx)(Kl,{style:{height:"2rem",width:"2rem"}})})}),bz=()=>(0,pn.jsx)(pz,{children:[...Array(5)].map((e,t)=>(0,pn.jsx)(g2,{variant:"rounded",height:"13.5rem",width:"inherit",sx:{minWidth:"150px"},style:{borderRadius:"1rem"}},t))});var St=require("react/jsx-runtime"),o8e={pathType:"pattern",page:0,pagesize:1,metrics:!0,expandUser:!0,trim:!0},cy={view:{label:"Most Opens",id:"open",countKey:"view_count"},clone:{label:"Most Clones",id:"clone",countKey:"clone_count"},download:{label:"Most Downloads",id:"download",countKey:"download_count"},deployment:{label:"Most Deploys",id:"deployments",countKey:"deployment_count"},share:{label:"Most Shares",id:"share",countKey:"share_count"}},oc=e=>({...o8e,order:`${cy[e].countKey} desc`}),a8e=({label:e,countKey:t,count:r,patternName:o,pattern:a,userName:n,status:i,id:l,onCardClick:s,onIconClick:u})=>{let f=()=>{s(a)},d=(m,x)=>{m.stopPropagation(),u(x)},p=(0,b.useTheme)();return(0,St.jsx)(dz,{elevation:0,status:i,onClick:f,children:(0,St.jsxs)(cz,{cardId:l,children:[(0,St.jsxs)(xz,{children:[(0,St.jsx)(hz,{children:e}),(0,St.jsx)(mz,{onClick:m=>d(m,`${t}+desc`),children:(0,St.jsx)(J2,{...$o,fill:p.palette.common.black})})]}),(0,St.jsx)(gz,{children:r}),(0,St.jsxs)($,{children:[(0,St.jsx)(Tz,{children:o}),(0,St.jsxs)(Sz,{children:["by ",n]})]})]})})},br=(e={})=>({search:e.search??"",order:e.order??"",pagesize:e.pagesize??0,page:e.page??0,...e}),vz=(0,ac.memo)(a8e);vz.displayName="StatCard";var n8e=e=>{let t=e(br(oc("view"))),r=e(br(oc("clone"))),o=e(br(oc("download"))),a=e(br(oc("deployment"))),n=e(br(oc("share"))),i={view:t,clone:r,download:o,deployment:a,share:n};return{queries:i,isLoading:Object.values(i).some(l=>l.isLoading),hasError:Object.values(i).some(l=>l.isError)}},i8e=(e,t)=>{let r=e[t],o=cy[t],a=r?.isSuccess&&r.data?.patterns?.[0];return a?{label:o.label,countKey:o.countKey,count:a[o.countKey],patternName:a.name||"Unknown",pattern:a,userName:a.user?.first_name||"Unknown",id:o.id,status:a?.catalog_data?.content_class}:null},l8e=({useGetCatalogFilters:e,onCardClick:t,onIconClick:r,onOpenLeaderboard:o})=>{let a=(0,b.useTheme)(),{queries:n,isLoading:i,hasError:l}=n8e(e),s=(0,b.useMediaQuery)(a.breakpoints.down("sm")),u=(0,ac.useMemo)(()=>Object.keys(cy).map(d=>i8e(n,d)).filter(d=>!!d),[n]);if(l)return(0,St.jsx)(dy,{children:(0,St.jsx)(yz,{children:"Error loading statistics. Please try again later."})});let f=u.map((d,p)=>(0,St.jsx)(vz,{...d,onCardClick:t,onIconClick:r},`${d.id}-${p}`));return(0,St.jsx)(no,{children:(0,St.jsxs)(dy,{children:[(0,St.jsxs)(uz,{children:[(0,St.jsxs)($,{display:"flex",alignItems:"center",gap:1,children:[(0,St.jsx)(fz,{children:"Top Performers"}),(0,St.jsx)(Kl,{style:{height:"2rem",width:"2rem",color:a.palette.icon.secondary,display:s?"none":"inline-flex"}})]}),o&&(0,St.jsx)("div",{children:(0,St.jsxs)(ke,{variant:"contained",onClick:()=>o(),children:[(0,St.jsx)(Kl,{style:{height:"2rem",width:"2rem",display:s?"inline-flex":"none"}}),(0,St.jsx)("p",{style:{margin:0,display:s?"none":"inline-flex"},children:"Open Leaderboard"})]})})]}),(0,St.jsxs)(Cz,{children:[i&&(0,St.jsx)(bz,{}),(0,St.jsx)(ou,{items:f})]})]})})},xy=(0,ac.memo)(l8e);var Qn=require("@mui/material"),wz=(0,Qn.styled)("div")({padding:"1rem 0","& h2":{margin:"1rem 0"},".get-started-desc":{margin:"1rem"}}),Ez=(0,Qn.styled)("div")(({theme:e})=>({display:"flex",cursor:"pointer",flexDirection:"row",flexWrap:"wrap","& a":{color:e.palette.text.primary,margin:"1rem"}})),Rz=(0,Qn.styled)("a")(({theme:e})=>({flex:"1",padding:"2rem",textDecoration:"none",background:e.palette.mode==="light"?"#EEEEEE":"#212121",minHeight:"21.5rem",transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)",borderRadius:"10px","&:hover":{boxShadow:`${e.palette.background.brand?.default} 0px 0px 7px`},"& a":{margin:"0 !important","&:hover":{color:e.palette.background.brand?.default}}})),Oz=(0,Qn.styled)("div")({display:"flex",alignItems:"center",gap:"1rem"}),Lmt=(0,Qn.styled)("div")({flex:"0 0 25%",alignSelf:"center",margin:"0 0.5rem"}),Dmt=(0,Qn.styled)("img")({height:"3rem",width:"3rem",maxWidth:"3rem",margin:"auto"}),Fmt=(0,Qn.styled)("svg")(({theme:e})=>({fontSize:"4.15rem",alignSelf:"center",flex:"0 0 25%",margin:"0 0.5rem",filter:e.palette.mode==="light"?"0%":"invert(100%)",transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"})),Nmt=(0,Qn.styled)("h2")({fontSize:"1.75rem",margin:"1rem 0"}),Bmt=(0,Qn.styled)("p")(({theme:e})=>({color:e.palette.text.primary,transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"}));var _a=require("react/jsx-runtime"),s8e=({Steps:e,PrerequisiteLine:t})=>(0,_a.jsxs)(wz,{children:[(0,_a.jsxs)("div",{className:"get-started-desc",id:"pre-requisites",children:[(0,_a.jsx)("h2",{children:"Prerequisites"}),(0,_a.jsx)("p",{children:t})]}),(0,_a.jsx)(Ez,{id:"Set up",children:e.map((r,o)=>(0,_a.jsxs)(Rz,{href:r.url,target:"_blank",children:[(0,_a.jsxs)(Oz,{children:[(0,_a.jsx)("h2",{children:r.heading}),typeof r.Icon=="string"?(0,_a.jsx)("img",{src:r.Icon,alt:r.heading,width:"40px",height:"40px"}):r.Icon]}),(0,_a.jsx)("p",{children:r.description})]},o))})]}),hy=s8e;var Az=require("@mui/material");var u8e=(0,Az.styled)("div")(({theme:e})=>({color:e.palette.text.primary,transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)",".chapter-sub-heading, .chapter-sub-heading a":{color:e.palette.mode==="light"?E2:R2,transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"},".chapter-alt-heading, .chapter-alt-heading a":{color:"gray"},"& a":{color:e.palette.background.brand?.default,textDecoration:"underline","&:hover":{color:e.palette.background.brand?.default}},"& p > code":{color:"inherit",padding:".2em .4em",margin:"0",fontSize:"85%",wordBreak:"normal",backgroundColor:e.palette.background.code,borderRadius:".25rem"},"& pre":{backgroundColor:"#011627",padding:"1em",borderRadius:"0.5rem",overflowX:"auto",color:"#d6deeb",position:"relative",textAlign:"left",width:"100%",margin:"1rem auto autocompleteClasses",fontFamily:"Courier New, Courier, monospace"},"& li code":{color:"inherit",padding:".2em .4em",margin:"0",fontSize:"85%",wordBreak:"normal",backgroundColor:e.palette.background.code,borderRadius:".25rem"},"& li a":{color:e.palette.text.default,textDecoration:"underline","&:hover":{color:e.palette.background.brand?.default}}})),gy=u8e;var Ty=require("react");var Ss=require("@mui/material"),Pz=(0,Ss.styled)("div")({width:"52rem",maxWidth:"90%"}),_z=(0,Ss.styled)("div")({display:"flex",alignItems:"center",background:"#323339",width:"100%",height:"2.875rem",borderRadius:"2px 2px 0 0"}),$mt=(0,Ss.styled)("div")({color:"#76767d",fontFamily:"'Courier New', Courier, monospace",fontSize:"13.5px",margin:"0 auto"}),Iz=(0,Ss.styled)("ul")({position:"absolute",display:"block",listStyle:"none",marginLeft:"1rem",marginTop:"0",marginBottom:"0",padding:"0","& li":{display:"inline-block",width:"0.875rem",height:"0.875rem",background:"#1d1e23",borderRadius:"0.75rem",marginRight:"7px"}}),kz=(0,Ss.styled)("div")({width:"100%",height:"100%",background:"#1d1e23",borderRadius:"0 0 2px 2px",padding:"24px 32px"}),Mz=(0,Ss.styled)("div")({width:"100%",height:"100%",position:"relative",overflow:"scroll",msOverflowStyle:"none",scrollbarWidth:"none","&::-webkit-scrollbar":{WebkitAppearance:"none",width:"0",height:"0"},"&.no-scroll-overflow-wrapper":{"& .code-wrapper":{bottom:"0",position:"absolute",minHeight:"100%"}}}),Lz=(0,Ss.styled)("div")(({theme:e})=>({"& pre":{padding:"0",margin:"0",width:"100%",height:"100%",fontStyle:"normal",fontWeight:"normal",fontSize:"12px",lineHeight:"27px",whiteSpace:"pre-wrap",color:e.palette.info.main,"&.short":{lineHeight:"16px"},"&.navy":{color:"#66a2ff"},"&.gray":{color:"#bdbec2"},"&.white":{color:"#fff"},wrapWord:"normal",[e.breakpoints.up("sm")]:{fontSize:"13.5px",lineHeight:"26px"}}}));var vo=require("react/jsx-runtime"),f8e=({lines:e,title:t,noScroll:r})=>(0,vo.jsxs)(Pz,{children:[(0,vo.jsxs)(_z,{children:[(0,vo.jsxs)(Iz,{children:[(0,vo.jsx)("li",{style:{backgroundColor:"red"}}),(0,vo.jsx)("li",{style:{backgroundColor:"yellow"}}),(0,vo.jsx)("li",{style:{backgroundColor:"green"}})]}),t&&(0,vo.jsx)("div",{className:"title",children:t})]}),(0,vo.jsx)(kz,{children:(0,vo.jsx)(Mz,{className:r?"no-scroll-overflow-wrapper":"",children:(0,vo.jsx)(Lz,{children:e&&e.map((o,a)=>(0,vo.jsx)(Ty.Fragment,{children:(0,vo.jsxs)("pre",{className:`${o.short?"short":""}`,style:{color:o.color?o.color:"blue"},children:[o.indent&&new Array(o.indent*2).fill({}).map((n,i)=>(0,vo.jsx)(Ty.Fragment,{children:"\xA0"},i)),o.code]})},a))})})})]}),Sy=f8e;var Dz=require("@mui/material"),Fz=(0,Dz.styled)("div")(({theme:e})=>({".chapter-back":{display:"flex",justifyContent:"space-between",alignItems:"center","& a":{display:"inline-flex","& svg":{alignSelf:"center",fontSize:"1.5rem",color:e.palette.grey[600],width:"100%",maxWidth:"1.5rem"},"& h4":{fontWeight:500,textTransform:"capitalize",fontSize:"1.25rem"},"&:hover":{"& svg, & h4":{color:e.palette.text.primary}}},".toc-toggle-btn":{display:"none"},".toc-menu-icon":{width:"1.5rem",height:"1.5rem",cursor:"pointer",fill:e.palette.secondary.main,transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"}},".toc-list":{"& ul":{position:"relative",paddingInlineStart:"2.65rem",MozPaddingStart:"2.65rem","&::after":{position:"absolute",inset:"1rem auto 1rem 1.7rem",width:"auto",height:"auto",borderLeft:"1px solid rgba(177, 182, 184, 0.25)",content:'""',zIndex:0},"& li":{width:"fit-content",margin:"1rem 0","&::marker":{color:"rgba(177, 182, 184, 0.75)"},"& p":{margin:0,fontSize:"1rem","& a":{color:e.palette.mode==="light"?"rgb(0 0 0 / 0.65)":"rgb(255 255 255 / 0.65)",transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"}},"&:hover":{"&::marker, & p, & a":{color:e.palette.background.brand?.default}}},".active-link":{"&::marker, & p, & a":{color:e.palette.background.brand?.default}}}}}));var Fu=require("react/jsx-runtime"),d8e=({availableChapters:e,currentChapter:t,onClick:r})=>{let o=a=>a.split("-").map(l=>l.charAt(0).toUpperCase()+l.slice(1)).join(" ");return(0,Fu.jsx)(Fz,{children:(0,Fu.jsx)("div",{className:"toc-list",children:(0,Fu.jsx)("ul",{className:"toc-ul toc-ul-open",children:e.map(a=>(0,Fu.jsx)("li",{className:a+".mdx"===t?"active-link":"",onClick:n=>{r(a,n)},children:(0,Fu.jsxs)("p",{className:"toc-item",children:[" ",o(a)]})},a))})})})},Cy=d8e;var Hz=require("react");var Nz=require("@mui/material"),Bz=(0,Nz.styled)("div")(({theme:e})=>({position:"sticky",top:"10rem",left:0,marginLeft:"-3rem",".go-back":{margin:"1rem 0",display:"flex",justifyContent:"space-between",alignItems:"center","& a":{display:"inline-flex","& svg":{alignSelf:"center",fontSize:"1.5rem",color:e.palette.text.disabled,width:"100%",maxWidth:"1.5rem"},"& h4":{fontWeight:500,textTransform:"capitalize",fontSize:"1.25rem",whiteSpace:"nowrap"},"&:hover":{"& svg, & h4":{color:e.palette.text.primary}}}},".toc-toggle-btn":{display:"none"},".toc-ul-open":{display:"flex",flexDirection:"column",marginTop:"0rem",listStyle:"none",height:"auto !important",opacity:"1 !important",transition:"all .4s !important"},".toc-menu-icon":{width:"1.5rem",height:"1.5rem",cursor:"pointer",fill:e.palette.common.white},".toc-sub-heading":{marginTop:"1rem",fontWeight:500,fontSize:"1.15rem"},".toc-item":{lineHeight:"1.5rem"},".toc-list":{"& ul":{position:"relative",paddingInlineStart:"1.5rem",listStyleType:"none","& li":{margin:"1rem 0 1rem 0.5rem",width:"fit-content","&::marker":{color:"rgba(177, 182, 184, 0.75)"},"& p":{margin:0,fontSize:"1rem","& a":{color:"rgba(0, 0, 0, 0.65)"}},"&:hover":{"&::marker, & p, & a":{color:e.palette.secondary.contrastText}}},".active-link":{"&::marker, & p, & a":{color:e.palette.secondary.contrastText}}}},"@media only screen and (max-width: 991px)":{position:"initial",marginLeft:"-0.5rem",width:"auto",".toc-toggle-btn":{display:"flex"},".go-back":{marginLeft:0},".toc-ul":{opacity:0,height:0,transition:"none",paddingLeft:".8rem !important"},".toc-item":{lineHeight:".8rem"}}}));var lr=require("react/jsx-runtime"),p8e=[{name:"Set up",link:"/cloud-native-management/meshery"},{name:"Run Meshery",link:"/cloud-native-management/meshery/getting-started"},{name:"Manage Meshery",link:"/cloud-native-management/meshery/operating-service-meshes"}],m8e=({coursesData:e})=>{let[t,r]=(0,Hz.useState)(!1);return(0,lr.jsxs)(Bz,{children:[(0,lr.jsxs)("div",{className:"go-back",children:[(0,lr.jsxs)("a",{href:"/learn/learning-paths",children:[(0,lr.jsx)(N2,{}),(0,lr.jsx)("h4",{children:"Learning Paths"})]}),(0,lr.jsx)("div",{className:"toc-toggle-btn",children:t?(0,lr.jsx)(Ft,{className:"toc-menu-icon",onClick:()=>{r(!t)}}):(0,lr.jsx)(ad,{className:"toc-menu-icon",onClick:()=>{r(!t)}})})]}),(0,lr.jsx)("div",{className:"toc-list",children:(0,lr.jsxs)("ul",{className:`toc-ul ${t?"toc-ul-open":""}`,children:[(0,lr.jsx)("a",{href:"#pre-requisites",children:(0,lr.jsx)("h5",{className:"toc-sub-heading",children:"Pre-requisites"})}),p8e.map((o,a)=>(0,lr.jsx)("li",{children:(0,lr.jsx)("p",{className:"toc-item",children:(0,lr.jsx)("a",{href:`#${o.name}`,children:o.name})})},a)),(0,lr.jsx)("a",{href:"#courses-list",children:(0,lr.jsx)("h5",{className:"toc-sub-heading",children:"Courses"})}),e.map((o,a)=>(0,lr.jsx)("li",{children:(0,lr.jsx)("p",{className:"toc-item",children:(0,lr.jsx)("a",{href:`#${o.frontmatter.courseTitle}`,children:o.frontmatter.courseTitle})})},a))]})})]})},yy=m8e;var Vz=require("@mui/material"),Uz=G(require("@mui/material/Autocomplete")),by=G(require("@mui/material/CircularProgress")),nc=require("react"),Wz=require("use-debounce");var Ct=require("react/jsx-runtime"),c8e=({usersData:e,disabled:t=!1,shareWithNewUsers:r,useGetAllUsersQuery:o})=>{let[a,n]=(0,nc.useState)(!1),[i,l]=(0,nc.useState)(""),[s,u]=(0,nc.useState)([]),[f,d]=(0,nc.useState)(!1),p=(0,b.useTheme)(),[m]=(0,Wz.useDebounce)(i,300),{data:x,isLoading:h}=o({search:m,page:0,pagesize:10},{skip:m.trim().length==0}),g=x?.data??[],T=async()=>{console.log("users to share with",s);try{d(!0);let v=await r(s);v.error?n(v.error):u([])}catch(v){console.log("error while sharing",v)}finally{d(!1)}},E=(v,P)=>{P&&(u(P),l(""))},R=(v,P,B)=>{B==="input"?l(P):B==="clear"&&l("")},k=g.filter(v=>!s.concat(e).find(P=>P.email===v.email)),D=t||f||s.length===0,C=({avatarObj:v,...P})=>(0,Ct.jsx)(Dt,{avatar:(0,Ct.jsx)(qt,{alt:v.first_name,src:v.avatar_url,children:v.avatar_url?"":v.first_name?.charAt(0)}),label:v.email,size:"small",...P},v.user_id);return(0,Ct.jsx)(Ct.Fragment,{children:(0,Ct.jsxs)($,{display:"flex",alignItems:"center",justifyContent:"space-between",gap:1,children:[(0,Ct.jsx)(Uz.default,{id:"user-search-field",sx:{width:"100%"},filterOptions:v=>v,options:k,renderTags:(v,P)=>v.map((B,_)=>(0,Ct.jsx)(C,{avatarObj:B,...P({index:_})})),disableClearable:!0,includeInputInList:!0,filterSelectedOptions:!0,multiple:!0,disableListWrap:!0,disabled:f,inputValue:i,loading:h,value:s,getOptionLabel:v=>v.email,noOptionsText:h?"Loading...":i==""?"Search using name or email":"No users found",onChange:E,onInputChange:R,isOptionEqualToValue:(v,P)=>v.email===P.email,renderInput:v=>(0,Ct.jsx)(Qr,{...v,placeholder:"Add Users",error:!!a,helperText:a,fullWidth:!0,label:"",disabled:D,sx:{"& .MuiOutlinedInput-root":{paddingInline:"0.5rem",paddingBlock:"0.1rem"}},InputProps:{...v.InputProps,endAdornment:(0,Ct.jsx)(Ct.Fragment,{children:h?(0,Ct.jsx)(by.default,{color:"inherit",size:20}):null})}}),renderOption:(v,P)=>(0,Ct.jsx)($,{component:"li",sx:{"& > img":{mr:2,flexShrink:0}},...v,children:(0,Ct.jsxs)(ce,{container:!0,alignItems:"center",children:[(0,Ct.jsx)(ce,{children:(0,Ct.jsx)($,{sx:{color:"text.secondary",mr:2},children:(0,Ct.jsx)(qt,{alt:P.first_name,src:P.avatar_url,children:P.avatar_url?"":(0,Ct.jsx)(Mn,{})})})}),(0,Ct.jsx)(ce,{size:"grow",children:P.deleted_at?.Valid?(0,Ct.jsxs)(z,{variant:"body2",color:"text.secondary",children:[P.email," (deleted)"]}):(0,Ct.jsxs)(Ct.Fragment,{children:[(0,Ct.jsxs)(z,{variant:"body2",children:[P.first_name," ",P.last_name]}),(0,Ct.jsx)(z,{variant:"body2",color:"text.secondary",children:P.email})]})})]})})}),(0,Ct.jsx)(Vz.Button,{variant:"contained",sx:{"&.Mui-disabled":{color:`${p.palette.text.secondary} !important`,backgroundColor:`${p.palette.action.disabled} !important`}},onClick:T,disabled:D,children:f?(0,Ct.jsx)(by.default,{size:24,sx:{color:"#fff"}}):"Share"})]})})},M3=c8e;var qz=require("@mui/material"),$r=G(require("react"));var Ue=require("react/jsx-runtime"),x8e=({usersData:e,setUsersData:t,label:r="Add User",setDisableSave:o,handleNotifyPref:a,notifyUpdate:n,isCreate:i,searchType:l,disabled:s=!1,currentUserData:u,searchedUsers:f=[],isUserSearchLoading:d,fetchSearchedUsers:p,usersSearch:m,setUsersSearch:x})=>{let[h,g]=(0,$r.useState)(""),[T,E]=(0,$r.useState)(!1),[R,k]=(0,$r.useState)(!1),[D,C]=(0,$r.useState)(!0),[v,P]=(0,$r.useState)(""),[B,_]=(0,$r.useState)(e||[]);(0,$r.useEffect)(()=>{_(e||[])},[e]);let J=(0,$r.useMemo)(()=>{if(D&&!m&&u)return[u];let N=f.filter(L=>L.user_id!==u?.user_id);return!m&&u?[u,...N]:N},[f,u,m,D,B]),X=(0,$r.useCallback)((N,L)=>{L.stopPropagation();let M=B.filter(F=>F.user_id!==N);_(M),t(M),o&&o(!1)},[B,t,o,p,v]),H=(0,$r.useCallback)((N,L)=>{if(!L)return;let M=B.some(V=>V.user_id===L.user_id),F=L.deleted_at?.Valid===!0;if(M||F){g(M?"User already selected":"User does not exist");return}P(""),x(""),g(""),E(!1),_(V=>[...V,L]),t(V=>[...V,L]),o&&o(!1)},[B,t,o,x]),q=(0,$r.useCallback)((N,L)=>{if(P(L),L==="")E(!0),x(""),C(!0);else{let M=encodeURIComponent(L);p(M),g(""),E(!0),C(!1)}},[p]);return(0,Ue.jsxs)(Ue.Fragment,{children:[(0,Ue.jsx)(qz.Autocomplete,{id:"user-search-field",style:{width:"100%"},open:T,options:J,getOptionLabel:()=>v,isOptionEqualToValue:(N,L)=>N.user_id===L.user_id,onOpen:()=>E(!0),onClose:()=>E(!1),inputValue:v,onChange:H,onInputChange:q,filterOptions:(N,{inputValue:L})=>N.filter(M=>{let F=L.toLowerCase();return M.first_name?.toLowerCase().includes(F)||M.last_name?.toLowerCase().includes(F)||M.email?.toLowerCase().includes(F)}),loading:d,disabled:s,disableClearable:!0,value:void 0,selectOnFocus:!1,blurOnSelect:!0,clearOnBlur:!0,popupIcon:null,forcePopupIcon:!1,noOptionsText:d?"Loading...":"No users found",renderInput:N=>(0,Ue.jsx)(Qr,{...N,label:r,error:!!h,helperText:h,InputLabelProps:{style:{fontFamily:"inherit"}},InputProps:{...N.InputProps,endAdornment:(0,Ue.jsx)($r.default.Fragment,{children:d?(0,Ue.jsx)(Gt,{color:"inherit",size:20}):null})}}),renderOption:(N,L)=>(0,Ue.jsx)("li",{...N,id:L.user_id,children:(0,Ue.jsxs)($,{sx:{"& > img":{mr:2,flexShrink:0}},children:[" ",(0,Ue.jsxs)(ce,{container:!0,alignItems:"center",children:[(0,Ue.jsx)(ce,{children:(0,Ue.jsx)($,{sx:{color:"text.secondary",mr:2},children:(0,Ue.jsx)(qt,{alt:L.first_name,src:L.avatar_url,children:L.avatar_url?"":(0,Ue.jsx)(Mn,{})})})}),(0,Ue.jsx)(ce,{size:"grow",children:L.deleted?(0,Ue.jsxs)(z,{variant:"body2",color:"text.secondary",children:[L.email," (deleted)"]}):(0,Ue.jsxs)(Ue.Fragment,{children:[(0,Ue.jsxs)(z,{variant:"body2",children:[L.first_name," ",L.last_name]}),(0,Ue.jsx)(z,{variant:"body2",color:"text.secondary",children:L.email})]})})]})]})})}),!i&&(0,Ue.jsx)(c2,{row:!0,children:(0,Ue.jsx)("div",{style:{display:"flex",flexWrap:"nowrap"},children:(0,Ue.jsx)(Ml,{control:(0,Ue.jsx)(Yr,{checked:n,onChange:a,name:"notify",color:"primary"}),label:`Notify ${l} of membership change`})})}),(0,Ue.jsxs)($,{sx:{display:"flex",flexWrap:"wrap",gap:.5,mt:e?.length>0?"0.5rem":""},children:[!R&&B?.[0]&&(0,Ue.jsx)(Dt,{avatar:(0,Ue.jsx)(qt,{alt:B[0].first_name,src:B[0].avatar_url,children:!B[0].avatar_url&&B[0].first_name?.[0]}),label:B[0].email,onDelete:N=>X(B[0].user_id,N),deleteIcon:(0,Ue.jsx)(Xt,{title:"Remove user",children:(0,Ue.jsx)(Ft,{style:To})}),size:"small"},B[0].user_id),R&&B?.map(N=>(0,Ue.jsx)(Dt,{avatar:(0,Ue.jsx)(qt,{alt:N.first_name,src:N.avatar_url,children:!N.avatar_url&&N.first_name?.[0]}),label:N.email,onDelete:L=>X(N.user_id,L),deleteIcon:(0,Ue.jsx)(Xt,{title:"Remove user",children:(0,Ue.jsx)(Ft,{style:To})}),size:"small"},N.user_id)),B?.length>1&&(0,Ue.jsx)(z,{onClick:()=>k(!R),sx:{cursor:"pointer"},children:R?"(hide)":`(+${B.length-1})`})]})]})},vy=x8e;var na=require("@mui/material"),Uu=require("@mui/material/StepConnector");function xp(e,...t){let r=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(o=>r.searchParams.append("args[]",o)),`Minified MUI error #${e}; visit ${r} for the full message.`}var Jz=G(require("@emotion/styled"));function Gz(e){for(var t=0,r,o=0,a=e.length;a>=4;++o,a-=4)r=e.charCodeAt(o)&255|(e.charCodeAt(++o)&255)<<8|(e.charCodeAt(++o)&255)<<16|(e.charCodeAt(++o)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(a){case 3:t^=(e.charCodeAt(o+2)&255)<<16;case 2:t^=(e.charCodeAt(o+1)&255)<<8;case 1:t^=e.charCodeAt(o)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var zz={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function jz(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var h8e=!1,g8e=/[A-Z]|^ms/g,T8e=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Zz=function(t){return t.charCodeAt(1)===45},Kz=function(t){return t!=null&&typeof t!="boolean"},wy=jz(function(e){return Zz(e)?e:e.replace(g8e,"-$&").toLowerCase()}),$z=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(T8e,function(o,a,n){return Xn={name:a,styles:n,next:Xn},a})}return zz[t]!==1&&!Zz(t)&&typeof r=="number"&&r!==0?r+"px":r},S8e="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function ic(e,t,r){if(r==null)return"";var o=r;if(o.__emotion_styles!==void 0)return o;switch(typeof r){case"boolean":return"";case"object":{var a=r;if(a.anim===1)return Xn={name:a.name,styles:a.styles,next:Xn},a.name;var n=r;if(n.styles!==void 0){var i=n.next;if(i!==void 0)for(;i!==void 0;)Xn={name:i.name,styles:i.styles,next:Xn},i=i.next;var l=n.styles+";";return l}return C8e(e,t,r)}case"function":{if(e!==void 0){var s=Xn,u=r(e);return Xn=s,ic(e,t,u)}break}}var f=r;if(t==null)return f;var d=t[f];return d!==void 0?d:f}function C8e(e,t,r){var o="";if(Array.isArray(r))for(var a=0;a<r.length;a++)o+=ic(e,t,r[a])+";";else for(var n in r){var i=r[n];if(typeof i!="object"){var l=i;t!=null&&t[l]!==void 0?o+=n+"{"+t[l]+"}":Kz(l)&&(o+=wy(n)+":"+$z(n,l)+";")}else{if(n==="NO_COMPONENT_SELECTOR"&&h8e)throw new Error(S8e);if(Array.isArray(i)&&typeof i[0]=="string"&&(t==null||t[i[0]]===void 0))for(var s=0;s<i.length;s++)Kz(i[s])&&(o+=wy(n)+":"+$z(n,i[s])+";");else{var u=ic(e,t,i);switch(n){case"animation":case"animationName":{o+=wy(n)+":"+u+";";break}default:o+=n+"{"+u+"}"}}}}return o}var Yz=/label:\s*([^\s;{]+)\s*(;|$)/g,Xn;function Qz(e,t,r){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var o=!0,a="";Xn=void 0;var n=e[0];if(n==null||n.raw===void 0)o=!1,a+=ic(r,t,n);else{var i=n;a+=i[0]}for(var l=1;l<e.length;l++)if(a+=ic(r,t,e[l]),o){var s=n;a+=s[l]}Yz.lastIndex=0;for(var u="",f;(f=Yz.exec(a))!==null;)u+="-"+f[1];var d=Gz(a)+u;return{name:d,styles:a,next:Xn}}var Oy=require("@emotion/react");function Ey(e,t){let r=(0,Jz.default)(e,t);return process.env.NODE_ENV!=="production"?(...o)=>{let a=typeof e=="string"?`"${e}"`:"component";return o.length===0?console.error([`MUI: Seems like you called \`styled(${a})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join(`
|
|
80
80
|
`)):o.some(n=>n===void 0)&&console.error(`MUI: the styled(${a})(...args) API requires all its args to be defined.`),r(...o)}:r}function ej(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}var Xz=[];function Ry(e){return Xz[0]=e,Qz(Xz)}var ky=G(require("react")),My=G(Iy());function Cs(e){if(typeof e!="object"||e===null)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function oj(e){if(ky.isValidElement(e)||(0,My.isValidElementType)(e)||!Cs(e))return e;let t={};return Object.keys(e).forEach(r=>{t[r]=oj(e[r])}),t}function ys(e,t,r={clone:!0}){let o=r.clone?{...e}:e;return Cs(e)&&Cs(t)&&Object.keys(t).forEach(a=>{ky.isValidElement(t[a])||(0,My.isValidElementType)(t[a])?o[a]=t[a]:Cs(t[a])&&Object.prototype.hasOwnProperty.call(e,a)&&Cs(e[a])?o[a]=ys(e[a],t[a],r):r.clone?o[a]=Cs(t[a])?oj(t[a]):t[a]:o[a]=t[a]}),o}var v8e=e=>{let t=Object.keys(e).map(r=>({key:r,val:e[r]}))||[];return t.sort((r,o)=>r.val-o.val),t.reduce((r,o)=>({...r,[o.key]:o.val}),{})};function Ly(e){let{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:o=5,...a}=e,n=v8e(t),i=Object.keys(n);function l(p){return`@media (min-width:${typeof t[p]=="number"?t[p]:p}${r})`}function s(p){return`@media (max-width:${(typeof t[p]=="number"?t[p]:p)-o/100}${r})`}function u(p,m){let x=i.indexOf(m);return`@media (min-width:${typeof t[p]=="number"?t[p]:p}${r}) and (max-width:${(x!==-1&&typeof t[i[x]]=="number"?t[i[x]]:m)-o/100}${r})`}function f(p){return i.indexOf(p)+1<i.length?u(p,i[i.indexOf(p)+1]):l(p)}function d(p){let m=i.indexOf(p);return m===0?l(i[1]):m===i.length-1?s(i[m]):u(p,i[i.indexOf(p)+1]).replace("@media","@media not all and")}return{keys:i,values:n,up:l,down:s,between:u,only:f,not:d,unit:r,...a}}function Dy(e,t){if(!e.containerQueries)return t;let r=Object.keys(t).filter(o=>o.startsWith("@container")).sort((o,a)=>{let n=/min-width:\s*([0-9.]+)/;return+(o.match(n)?.[1]||0)-+(a.match(n)?.[1]||0)});return r.length?r.reduce((o,a)=>{let n=t[a];return delete o[a],o[a]=n,o},{...t}):t}function Fy(e,t){return t==="@"||t.startsWith("@")&&(e.some(r=>t.startsWith(`@${r}`))||!!t.match(/^@\d/))}function Ny(e,t){let r=t.match(/^@([^/]+)?\/?(.+)?$/);if(!r){if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The provided shorthand ${`(${t})`} is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.
|
|
81
81
|
For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:xp(18,`(${t})`));return null}let[,o,a]=r,n=Number.isNaN(+o)?o||0:+o;return e.containerQueries(a).up(n)}function G3(e){let t=(n,i)=>n.replace("@media",i?`@container ${i}`:"@container");function r(n,i){n.up=(...l)=>t(e.breakpoints.up(...l),i),n.down=(...l)=>t(e.breakpoints.down(...l),i),n.between=(...l)=>t(e.breakpoints.between(...l),i),n.only=(...l)=>t(e.breakpoints.only(...l),i),n.not=(...l)=>{let s=t(e.breakpoints.not(...l),i);return s.includes("not all and")?s.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):s}}let o={},a=n=>(r(o,n),o);return r(a),{...e,containerQueries:a}}var w8e={borderRadius:4},aj=w8e;var hp=G(Q6()),E8e=process.env.NODE_ENV!=="production"?hp.default.oneOfType([hp.default.number,hp.default.string,hp.default.object,hp.default.array]):{},oa=E8e;function R8e(e,t){return t?ys(e,t,{clone:!1}):e}var Yi=R8e;var lc={xs:0,sm:600,md:900,lg:1200,xl:1536},nj={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${lc[e]}px)`},O8e={containerQueries:e=>({up:t=>{let r=typeof t=="number"?t:lc[t]||t;return typeof r=="number"&&(r=`${r}px`),e?`@container ${e} (min-width:${r})`:`@container (min-width:${r})`}})};function wo(e,t,r){let o=e.theme||{};if(Array.isArray(t)){let n=o.breakpoints||nj;return t.reduce((i,l,s)=>(i[n.up(n.keys[s])]=r(t[s]),i),{})}if(typeof t=="object"){let n=o.breakpoints||nj;return Object.keys(t).reduce((i,l)=>{if(Fy(n.keys,l)){let s=Ny(o.containerQueries?o:O8e,l);s&&(i[s]=r(t[l],l))}else if(Object.keys(n.values||lc).includes(l)){let s=n.up(l);i[s]=r(t[l],l)}else{let s=l;i[s]=t[s]}return i},{})}return r(t)}function ij(e={}){return e.keys?.reduce((r,o)=>{let a=e.up(o);return r[a]={},r},{})||{}}function lj(e,t){return e.reduce((r,o)=>{let a=r[o];return(!a||Object.keys(a).length===0)&&delete r[o],r},t)}function bs(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":xp(7));return e.charAt(0).toUpperCase()+e.slice(1)}function gp(e,t,r=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&r){let o=`vars.${t}`.split(".").reduce((a,n)=>a&&a[n]?a[n]:null,e);if(o!=null)return o}return t.split(".").reduce((o,a)=>o&&o[a]!=null?o[a]:null,e)}function sc(e,t,r,o=r){let a;return typeof e=="function"?a=e(r):Array.isArray(e)?a=e[r]||o:a=gp(e,r)||o,t&&(a=t(a,o,e)),a}function A8e(e){let{prop:t,cssProperty:r=e.prop,themeKey:o,transform:a}=e,n=i=>{if(i[t]==null)return null;let l=i[t],s=i.theme,u=gp(s,o)||{};return wo(i,l,d=>{let p=sc(u,a,d);return d===p&&typeof d=="string"&&(p=sc(u,a,`${t}${d==="default"?"":bs(d)}`,d)),r===!1?p:{[r]:p}})};return n.propTypes=process.env.NODE_ENV!=="production"?{[t]:oa}:{},n.filterProps=[t],n}var kt=A8e;function z3(e){let t={};return r=>(t[r]===void 0&&(t[r]=e(r)),t[r])}var P8e={m:"margin",p:"padding"},_8e={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},sj={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},I8e=z3(e=>{if(e.length>2)if(sj[e])e=sj[e];else return[e];let[t,r]=e.split(""),o=P8e[t],a=_8e[r]||"";return Array.isArray(a)?a.map(n=>o+n):[o+a]}),j3=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],K3=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],By=[...j3,...K3];function Nu(e,t,r,o){let a=gp(e,t,!0)??r;return typeof a=="number"||typeof a=="string"?n=>typeof n=="string"?n:(process.env.NODE_ENV!=="production"&&typeof n!="number"&&console.error(`MUI: Expected ${o} argument to be a number or a string, got ${n}.`),typeof a=="string"?`calc(${n} * ${a})`:a*n):Array.isArray(a)?n=>{if(typeof n=="string")return n;let i=Math.abs(n);process.env.NODE_ENV!=="production"&&(Number.isInteger(i)?i>a.length-1&&console.error([`MUI: The value provided (${i}) overflows.`,`The supported values are: ${JSON.stringify(a)}.`,`${i} > ${a.length-1}, you need to add the missing values.`].join(`
|
|
82
82
|
`)):console.error([`MUI: The \`theme.${t}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${t}\` as a number.`].join(`
|
|
@@ -94,7 +94,7 @@ typed_config:\r
|
|
|
94
94
|
runtime: envoy.wasm.runtime.v8\r
|
|
95
95
|
vmId: example-filter\r
|
|
96
96
|
allow_precompiled: true\r
|
|
97
|
-
name: envoy.filters.http.wasm`,"x-rjsf-grid-area":"12"},uploadType:{title:"Select the Upload Method",enum:["File Upload","URL Upload"],default:"File Upload","x-rjsf-grid-area":"6"}},allOf:[{if:{properties:{uploadType:{const:"File Upload"}}},then:{title:"via File",properties:{file:{type:"string",format:"file",description:"Browse the filter file from your file system","x-rjsf-grid-area":"12"}},required:["file"]}},{if:{properties:{uploadType:{const:"URL Upload"}}},then:{title:"via URL",properties:{url:{type:"string",title:"URL",format:"uri",description:"raw url of the filter file, example: https://raw.github.com/...","x-rjsf-grid-area":"12"}},required:["url"]}}]},A$=ySe;var bSe={"ui:order":["name","uploadType","config","file","url"]},P$=bSe;var _$=require("@layer5/schemas"),ol=_$.ModelDefinitionV1Beta1OpenApiSchema.components.schemas,vSe={type:"object",required:["uploadType"],properties:{uploadType:{type:ol.ImportRequest.properties.uploadType.type,title:"Upload method",enum:["File Import","URL Import","CSV Import"],enumDescriptions:ol.ImportRequest.properties.uploadType.enumDescriptions,default:"Select the Upload Method","x-rjsf-grid-area":"12",description:ol.ImportRequest.properties.uploadType.description}},allOf:[{if:{properties:{uploadType:{const:"File Import"}}},then:{properties:{file:{type:ol.ImportBody.oneOf[0].properties.modelFile?.type,format:ol.ImportBody.oneOf[0].properties.modelFile?.format,description:ol.ImportBody.oneOf[0].properties.modelFile?.description,"x-rjsf-grid-area":"12"}},required:["file"]}},{if:{properties:{uploadType:{const:"URL Import"}}},then:{properties:{url:{type:ol.ImportBody.oneOf[1].properties.url?.type,format:ol.ImportBody.oneOf[1].properties.url?.format,title:"URL",description:ol.ImportBody.oneOf[1].properties.url?.description,"x-rjsf-grid-area":"12",disabled:!0}},required:["url"]}}]},I$=vSe;var wSe={uploadType:{"ui:widget":"radio"},"ui:order":["uploadType","file","url","csv"]},k$=wSe;var ESe={type:"object",properties:{compatibility:{type:"array",title:"Technology",items:{enum:["kubernetes"],type:"string"},uniqueItems:!0,minItems:1,description:"A list of technologies included in or implicated by this design; a list of relevant technology tags.","x-rjsf-grid-area":6},pattern_caveats:{type:"string",title:"Caveats and Considerations",description:"Specific stipulations to consider and known behaviors to be aware of when using this design.",format:"textarea","x-rjsf-grid-area":12,"x-encode-in-uri":!0},pattern_info:{type:"string",title:"Description",description:"Purpose of the design along with its intended and unintended uses.",format:"textarea","x-rjsf-grid-area":12,"x-encode-in-uri":!0},type:{type:"string",title:"Type",enum:["Deployment","Observability","Resiliency","Scaling","Security","Traffic-management","Troubleshooting","Workloads"],default:"Deployment",description:"Categorization of the type of design or operational flow depicted in this design.","x-rjsf-grid-area":6}},required:["compatibility","pattern_caveats","pattern_info","type"]},Bc=ESe;var RSe={"ui:order":["type","compatibility","pattern_info","pattern_caveats"]},M$=RSe;var OSe={type:"object",title:"Kubernetes",properties:{credentialName:{title:"Credential Name",type:"string",description:"Name of your credential"},secret:{type:"object",title:"Credential Secret",description:"Credential secret for the Kubernetes cluster",properties:{clusterName:{type:"string",title:"Cluster Name",description:"Name of the Kubernetes cluster"},clusterServerURL:{type:"string",title:"Server URL",description:"URL of the Kubernetes cluster"},auth:{type:"object",title:"Auth",description:"Kubernetes cluster authentication",properties:{clusterUserName:{type:"string",title:"User Name",description:"Name of the Kubernetes cluster user"},clusterToken:{type:"string",title:"Token",description:"Token of the Kubernetes cluster user"},clusterClientCertificateData:{type:"string",title:"Client Certificate Data",description:"Certificate data of the Kubernetes cluster"},clusterClientKeyData:{type:"string",title:"Client Key Data",description:"Client Key data of the Kubernetes cluster"},clusterCertificateAuthorityData:{type:"string",title:"Certificate Authority Data",description:"Certificate Authority data of the Kubernetes cluster"}},required:["clusterUserName","clusterToken","clusterClientCertificateData","clusterClientKeyData","clusterCertificateAuthorityData"]}},required:["clusterName","clusterServerURL"]}},required:["credentialName"]},L$=OSe;var ASe={},D$=ASe;var PSe={type:"object",title:"Prometheus",properties:{credentialName:{title:"Credential Name",type:"string",description:"Name of your credential"},secret:{type:"object",title:"Credential Secret",description:"Credential secret for the Prometheus instance",properties:{prometheusURL:{type:"string",title:"URL",description:"URL of the Prometheus instance"}},required:["prometheusURL"]}},required:["credentialName"]},F$=PSe;var _Se={},N$=_Se;var ISe={type:"object",title:"Grafana",properties:{credentialName:{title:"Credential Name",type:"string",description:"Name of your credential"},secret:{type:"object",title:"Credential Secret",description:"Credential secret for the Grafana instance",properties:{grafanaURL:{type:"string",title:"URL",description:"URL of the Grafana instance"},grafanaAPIKey:{type:"string",title:"API Key",description:"API Key for the Grafana instance"}},required:["grafanaURL","grafanaAPIKey"]}},required:["credentialName"]},B$=ISe;var kSe={},H$=kSe;var Fa=require("react");var MSe=({workspaceId:e,useGetDesignsOfWorkspaceQuery:t,useAssignDesignToWorkspaceMutation:r,useUnassignDesignFromWorkspaceMutation:o,isDesignsVisible:a})=>{let[n,i]=(0,Fa.useState)(0),[l,s]=(0,Fa.useState)([]),u=25,[f,d]=(0,Fa.useState)(0),[p,m]=(0,Fa.useState)([]),[x,h]=(0,Fa.useState)(!1),[g,T]=(0,Fa.useState)(!0),[E,R]=(0,Fa.useState)(!0),[k,D]=(0,Fa.useState)([]),{data:C}=t(br({workspaceId:e,page:n,pagesize:u,filter:'{"assigned":false}'}),{skip:g||!a}),{data:v}=t(br({workspaceId:e,page:f,pagesize:u}),{skip:g||!a}),[P]=r(),[B]=o();(0,Fa.useEffect)(()=>{let F=C?.designs?C.designs:[];s(V=>[...V,...F])},[C]),(0,Fa.useEffect)(()=>{let F=v?.designs?v.designs:[];m(V=>[...V,...F])},[v]);let _=F=>{F?.stopPropagation(),h(!0),T(!1)},J=F=>{F?.stopPropagation(),h(!1),T(!0)},X=()=>{let F=Math.ceil(Number(C?.total_count)/u);n<F-1&&i(V=>V+1)},H=()=>{let F=Math.ceil(Number(v?.total_count)/u);f<F-1&&d(V=>V+1)},q=F=>{let V=p.map(O=>O.id),y=F.map(O=>O.id),ee=y.filter(O=>!V.includes(O)),oe=V.filter(O=>!y.includes(O));return{addedDesignsIds:ee,removedDesignsIds:oe}};return{data:l,workspaceData:p,assignModal:x,handleAssignModal:_,handleAssignModalClose:J,handleAssignablePage:X,handleAssignedPage:H,handleAssign:async()=>{let{addedDesignsIds:F,removedDesignsIds:V}=q(k);F.map(y=>P({workspaceId:e,designId:y}).unwrap()),V.map(y=>B({workspaceId:e,designId:y}).unwrap()),s([]),m([]),i(0),d(0),J()},handleAssignData:F=>{let{addedDesignsIds:V,removedDesignsIds:y}=q(F);R(!(V.length>0||y.length>0)),D(F)},isActivityOccurred:F=>{let{addedDesignsIds:V,removedDesignsIds:y}=q(F);return V.length>0||y.length>0},disableTransferButton:E,assignedItems:k}},b4=MSe;var po=require("react/jsx-runtime"),LSe=({workspaceId:e,workspaceName:t,meshModelModelsData:r,handleBulkUnpublishModal:o,handleBulkWorkspaceDesignDeleteModal:a,handleClone:n,handleCopyUrl:i,handlePublish:l,handleDownload:s,getDownloadUrl:u,handleShowDetails:f,handleUnpublishModal:d,handleWorkspaceDesignDeleteModal:p,publishModalHandler:m,isCopyLinkAllowed:x,isDeleteAllowed:h,isDownloadAllowed:g,isPublishAllowed:T,isUnpublishAllowed:E,useAssignDesignToWorkspaceMutation:R,useUnassignDesignFromWorkspaceMutation:k,GenericRJSFModal:D,isAssignAllowed:C,isRemoveAllowed:v,useGetWorkspaceDesignsQuery:P,handleOpenInDesigner:B,showPlaygroundActions:_=!0,handleVisibilityChange:J,currentUserId:X})=>{let[H,q]=(0,sa.useState)({open:!1,pattern:{}}),N=(0,sa.useRef)(null),[L,M]=(0,sa.useState)(""),[F,V]=(0,sa.useState)(0),[y,ee]=(0,sa.useState)(10),[oe,O]=(0,sa.useState)("updated_at desc"),[Pe,ze]=(0,sa.useState)(!1),{data:Ut,refetch:Nr}=P({workspaceId:e,page:F,pagesize:y,search:L,order:oe,expandUser:!0},{skip:!e}),Je=Hr=>{let Cn=m(Hr);q({open:!0,pattern:Cn})},Br=(0,b.useTheme)(),Wt=o4({handleDeleteModal:Hr=>()=>p(Hr.id,e),handlePublishModal:Je,handleUnpublishModal:Hr=>()=>d(Hr,N),handleCopyUrl:i,handleClone:n,handleShowDetails:f,handleDownload:s,getDownloadUrl:u,isCopyLinkAllowed:x,isDeleteAllowed:h,isDownloadAllowed:g,isPublishAllowed:T,isUnpublishAllowed:E,isFromWorkspaceTable:!0,isRemoveAllowed:v,theme:Br,handleOpenInDesigner:B,showPlaygroundActions:_,handleVisibilityChange:J,currentUserId:X,refetchWorkspaceDesigns:Nr}),[hr,j]=(0,sa.useState)({rjsfSchema:{},uiSchema:{}}),{width:gr}=Xo(),[Z,de]=(0,sa.useState)(()=>{let Hr=Jo(xc,gr),Cn={};return Wt.forEach(ks=>{Cn[ks.name]=Hr[ks.name]}),Cn});(0,sa.useEffect)(()=>{(async()=>{let Cn=v4.default.uniq(r?.models?.map(qc=>qc.display_name)),ks=v4.default.set(v4.default.cloneDeep(Bc),"properties.compatibility.items.enum",Cn);j({rjsfSchema:ks,uiSchema:Bc})})()},[r]);let me=b4({workspaceId:e,useAssignDesignToWorkspaceMutation:R,useUnassignDesignFromWorkspaceMutation:k,useGetDesignsOfWorkspaceQuery:P,isDesignsVisible:C||v}),Er=(0,po.jsx)(hs,{style:{padding:"1rem"},children:(0,po.jsxs)($,{style:{marginRight:"0rem",width:"100%",justifyContent:"end",display:"flex",alignItems:"center"},children:[(0,po.jsx)(Kn,{onSearch:Hr=>{M(Hr)},onClear:()=>{M("")},expanded:Pe,setExpanded:ze,placeholder:"Search designs..."}),(0,po.jsx)(ln,{columns:Wt,customToolsProps:{columnVisibility:Z,setColumnVisibility:de},id:"catalog-table"}),(0,po.jsx)($n,{onClick:me.handleAssignModal,disabled:!C,title:"Assign Designs"})]})});return(0,po.jsxs)(po.Fragment,{children:[Er,(0,po.jsx)(r4,{patterns:Ut?.designs||[],totalCount:Ut?.total_count,sortOrder:oe,setSortOrder:O,pageSize:y,setPageSize:ee,page:F,setPage:V,columnVisibility:Z,colViews:xc,columns:Wt,handleBulkpatternsDataUnpublishModal:o,handleBulkDeleteModal:(Hr,Cn)=>a(Hr,Cn,t,e),filter:"my-designs",setSearch:M}),(0,po.jsx)(ri,{open:me.assignModal,onClose:me.handleAssignModalClose,title:`Assign Designs to ${t}`,headerIcon:(0,po.jsx)(Xa,{height:"40",width:"40"}),name:"Designs",assignableData:me.data,handleAssignedData:me.handleAssignData,originalAssignedData:me.workspaceData,emptyStateIcon:(0,po.jsx)(Xa,{height:"5rem",width:"5rem",secondaryFill:"#808080"}),handleAssignablePage:me.handleAssignablePage,handleAssignedPage:me.handleAssignedPage,originalLeftCount:me.data?.length||0,originalRightCount:me.assignedItems?.length||0,onAssign:me.handleAssign,disableTransfer:me.disableTransferButton,helpText:`Assign Designs to ${t}`,isAssignAllowed:C,isRemoveAllowed:v,showViews:!1}),(0,po.jsx)(D,{open:H.open,handleClose:()=>q({open:!1,pattern:{}}),schema:hr?.rjsfSchema,uiSchema:hr?.uiSchema,handleSubmit:Hr=>l(H,Hr),title:`Publish ${H?.pattern?.name}`,buttonTitle:"Publish"}),(0,po.jsx)(np,{ref:N})]})},V$=LSe;var al=require("react");var Na=require("react");var DSe=({workspaceId:e,useGetEnvironmentsOfWorkspaceQuery:t,useAssignEnvironmentToWorkspaceMutation:r,useUnassignEnvironmentFromWorkspaceMutation:o,isEnvironmentsVisible:a})=>{let[n,i]=(0,Na.useState)(0),[l,s]=(0,Na.useState)([]),u=25,[f,d]=(0,Na.useState)(0),[p,m]=(0,Na.useState)([]),[x,h]=(0,Na.useState)(!1),[g,T]=(0,Na.useState)(!0),[E,R]=(0,Na.useState)(!0),[k,D]=(0,Na.useState)([]),{data:C}=t(br({workspaceId:e,page:n,pagesize:u,filter:'{"assigned":false}'}),{skip:g||!a}),{data:v}=t(br({workspaceId:e,page:f,pagesize:u}),{skip:g||!a}),[P]=r(),[B]=o();(0,Na.useEffect)(()=>{let M=C?.environments?C.environments:[];s(F=>[...F,...M])},[C]),(0,Na.useEffect)(()=>{let M=v?.environments?v.environments:[];m(F=>[...F,...M])},[v]);let _=M=>{M?.stopPropagation(),h(!0),T(!1)},J=M=>{M?.stopPropagation(),h(!1),T(!0)},X=()=>{let M=Math.ceil(Number(C?.total_count)/u);n<M-1&&i(F=>F+1)},H=()=>{let M=Math.ceil(Number(v?.total_count)/u);f<M-1&&d(F=>F+1)},q=M=>{let F=p.map(oe=>oe.id),V=M.map(oe=>oe.id),y=V.filter(oe=>!F.includes(oe)),ee=F.filter(oe=>!V.includes(oe));return{addedEnvironmentsIds:y,removedEnvironmentsIds:ee}};return{data:l,workspaceData:p,assignModal:x,handleAssignModal:_,handleAssignModalClose:J,handleAssignablePage:X,handleAssignedPage:H,handleAssign:async()=>{let{addedEnvironmentsIds:M,removedEnvironmentsIds:F}=q(k);M.map(V=>P({workspaceId:e,environmentId:V}).unwrap()),F.map(V=>B({workspaceId:e,environmentId:V}).unwrap()),s([]),m([]),i(0),d(0),J()},handleAssignData:M=>{let{addedEnvironmentsIds:F,removedEnvironmentsIds:V}=q(M);F.length>0||V.length>0?R(!1):R(!0),D(M)},disableTransferButton:E,assignedItems:k}},w4=DSe;var Xe=require("react/jsx-runtime"),U$=[["id","na"],["name","xs"],["description","m"],["organization_id","l"],["created_at","na"],["updated_at","xl"],["actions","xs"]],FSe=({value:e})=>(0,Xe.jsx)("div",{style:{position:"relative",height:"20px"},children:(0,Xe.jsx)(BC,{children:(0,Xe.jsx)(NC,{children:(0,Xe.jsx)(xe,{title:e,placement:"top-start",children:(0,Xe.jsx)("span",{style:{cursor:"pointer"},children:e})})})})}),NSe=({workspaceId:e,workspaceName:t,isRemoveAllowed:r,useGetEnvironmentsOfWorkspaceQuery:o,useUnassignEnvironmentFromWorkspaceMutation:a,useAssignEnvironmentToWorkspaceMutation:n,isAssignAllowed:i})=>{let[l,s]=(0,al.useState)(!1),u=N=>{N.stopPropagation(),s(!l)},[f,d]=(0,al.useState)(""),[p,m]=(0,al.useState)(!1),[x,h]=(0,al.useState)(0),[g,T]=(0,al.useState)(10),[E,R]=(0,al.useState)("updated_at desc"),{data:k}=o({workspaceId:e,page:x,pageSize:g,search:f,order:E}),{width:D}=Xo(),C=(0,b.useTheme)(),[v]=a(),P=[{name:"id",label:"ID",options:{filter:!1,customBodyRender:N=>(0,Xe.jsx)(Aa,{value:N,maxLength:10})}},{name:"name",label:"Name",options:{filter:!1,sort:!0,searchable:!0,customBodyRender:N=>(0,Xe.jsx)(Aa,{value:N,maxLength:10})}},{name:"organization_id",label:"Organization ID",options:{filter:!1,sort:!1,searchable:!1}},{name:"description",label:"Description",options:{filter:!1,sort:!0,searchable:!0,customBodyRender:N=>(0,Xe.jsx)(FSe,{value:N})}},{name:"created_at",label:"Created At",options:{filter:!1,sort:!0,searchable:!0,setCellHeaderProps:()=>({align:"center"})}},{name:"updated_at",label:"Updated At",options:{filter:!1,sort:!0,searchable:!0,setCellHeaderProps:()=>({align:"center"})}},{name:"actions",label:"Actions",options:{filter:!1,sort:!1,searchable:!1,customBodyRender:(N,L)=>(0,Xe.jsx)(Ho,{disabled:!r,children:(0,Xe.jsx)(zt,{id:`delete_team-${L.rowIndex}`,title:"Remove Environment",onClick:()=>{r&&v({workspaceId:e,environmentId:L.rowData[0]})},iconType:"delete",children:(0,Xe.jsx)(co,{height:28,width:28,fill:C.palette.icon.default})})})}}],B=w4({workspaceId:e,useGetEnvironmentsOfWorkspaceQuery:o,useUnassignEnvironmentFromWorkspaceMutation:a,useAssignEnvironmentToWorkspaceMutation:n,isEnvironmentsVisible:i||r}),[_,J]=(0,al.useState)(()=>{let N=Jo(U$,D),L={};return P.forEach(M=>{L[M.name]=N[M.name]}),L}),X={filter:!1,responsive:"standard",selectableRows:"none",count:k?.total_count,rowsPerPage:g,page:x,elevation:0,sortOrder:{name:E.split(" ")[0],direction:E.split(" ")[1]},serverSide:!0,onTableChange:(N,L)=>{let M=L.announceText?L.announceText.split(" : "):[],F="";switch(L.activeColumn&&(F=`${P[L.activeColumn].name} desc`),N){case"changePage":h(L.page);break;case"changeRowsPerPage":T(L.rowsPerPage);break;case"search":d(L.searchText!==null?L.searchText:"");break;case"sort":M.length==2&&(M[1]==="ascending"?F=`${P[L.activeColumn].name} asc`:F=`${P[L.activeColumn].name} desc`),F!==E&&R(F);break}}},[H,q]=(0,al.useState)(P);return(0,Xe.jsxs)(Xe.Fragment,{children:[(0,Xe.jsxs)(l2,{expanded:l,onChange:u,style:{margin:0},children:[(0,Xe.jsx)(u2,{expandIcon:(0,Xe.jsx)(Ko,{}),sx:{backgroundColor:"background.paper"},children:(0,Xe.jsxs)(hs,{children:[(0,Xe.jsx)(z,{variant:"body1",fontWeight:"bold",children:"Assigned Environments"}),(0,Xe.jsxs)(b3,{children:[(0,Xe.jsx)(Kn,{onSearch:N=>{d(N)},onClear:()=>{d("")},expanded:p,setExpanded:m,placeholder:"Search workspaces..."}),(0,Xe.jsx)(ln,{columns:P,customToolsProps:{columnVisibility:_,setColumnVisibility:J},id:"environments-table"}),(0,Xe.jsx)($n,{onClick:B.handleAssignModal,disabled:!i,title:"Assign Environments"})]})]})}),(0,Xe.jsx)(s2,{style:{padding:0},children:(0,Xe.jsx)(Vo,{columns:P,data:k?.environments,options:X,colViews:U$,tableCols:H,updateCols:q,columnVisibility:_})})]}),(0,Xe.jsx)(ri,{open:B.assignModal,onClose:B.handleAssignModalClose,title:`Assign Environments to ${t}`,headerIcon:(0,Xe.jsx)(In,{height:"40",width:"40",fill:"white"}),name:"Environments",assignableData:B.data,handleAssignedData:B.handleAssignData,originalAssignedData:B.workspaceData,emptyStateIcon:(0,Xe.jsx)(In,{height:"5rem",width:"5rem",fill:"#808080"}),handleAssignablePage:B.handleAssignablePage,handleAssignedPage:B.handleAssignedPage,originalLeftCount:B.data?.length||0,originalRightCount:k?.total_count||0,onAssign:B.handleAssign,disableTransfer:B.disableTransferButton,helpText:`Assign Environments to ${t}`,isAssignAllowed:i,isRemoveAllowed:r})]})},W$=NSe;var Pp=require("@mui/material");var wr=require("react/jsx-runtime"),Hc=({title:e,count:t,onAssign:r,disabled:o})=>{let a=(0,b.useTheme)();return(0,wr.jsx)(WC,{onClick:r,disabled:o,color:"primary",sx:{color:a.palette.background.neutral?.default,backgroundColor:a.palette.background.constant?.table,margin:"0px 0px 10px",padding:"20px 10px","&:hover":{backgroundColor:a.palette.background.constant?.table,boxShadow:"none"}},children:(0,wr.jsxs)(ce,{children:[(0,wr.jsx)(GC,{textColor:a.palette.text.default,children:t}),(0,wr.jsx)(qC,{textColor:a.palette.text.default,children:e}),(0,wr.jsx)(o6,{sx:{position:"absolute",top:"10px",right:"10px"}})]})})},nl=({title:e,count:t,disabled:r=!0})=>(0,wr.jsx)(WC,{disabled:r,color:"primary",sx:{boxShadow:"none"},children:(0,wr.jsxs)(ce,{children:[(0,wr.jsx)(GC,{children:t}),(0,wr.jsx)(qC,{children:e})]})}),q$=({title:e,name:t,date:r})=>{let o=(0,b.useTheme)();return(0,wr.jsxs)(oG,{children:[(0,wr.jsxs)(ce,{sx:{display:"flex",maxHeight:"140px"},size:10,children:[(0,wr.jsx)(z,{sx:{fontSize:14,textAlign:"left",color:o.palette.background.constant?.white,maxWidth:"max-content",overflowX:"hidden"},children:e}),(0,wr.jsx)(z,{sx:{marginInline:"0.5rem",fontStyle:"italic",color:o.palette.background.brand?.default,textWrap:"nowrap"},children:t})]}),(0,wr.jsx)(ce,{sx:{display:"flex",justifyContent:"flex-end"},size:2,children:(0,wr.jsx)(xe,{title:r?fs(r):"",placement:"top",children:(0,wr.jsx)("div",{children:(0,wr.jsx)(z,{sx:{fontSize:14,fontStyle:"italic",color:`${o.palette.text.disabled}`,paddingRight:"12px",textAlign:"end"},children:r?Wi(r):"-"})})})})]})};var Se=require("react/jsx-runtime"),BSe=({workspaceDetails:e,onDelete:t,onEdit:r,onSelect:o,selectedWorkspaces:a,onAssignTeam:n,onAssignEnvironment:i,onAssignDesign:l,recentActivities:s,onFlip:u,onFlipBack:f,loadingEvents:d,teamsOfWorkspaceCount:p,environmentsOfWorkspaceCount:m,designAndViewOfWorkspaceCount:x,isEnvironmentAllowed:h,isTeamAllowed:g,isDesignAllowed:T,isViewAllowed:E,isDeleteWorkspaceAllowed:R,isEditWorkspaceAllowed:k,isViewsVisible:D,isDesignsVisible:C,isEnvironmentsVisible:v,isTeamsVisible:P})=>{let B=e.deleted_at.Valid;return(0,Se.jsxs)(Nm,{disableFlip:!!a.includes(e.id),padding:"0",children:[(0,Se.jsx)(HSe,{onFlip:u,name:e?.name,description:e?.description,environmentsCount:m,onAssignEnvironment:i,teamsCount:p,onAssignTeam:n,designAndViewOfWorkspaceCount:x,onAssignDesign:l,isEnvironmentAllowed:h,isTeamAllowed:g,isDesignAllowed:T,isViewAllowed:E,isViewsVisible:D,isDesignsVisible:C,isEnvironmentsVisible:v,isTeamsVisible:P}),(0,Se.jsx)(VSe,{onFlipBack:f,onSelect:o,name:e?.name,onEdit:r,onDelete:t,selectedWorkspaces:a,workspaceId:e?.id,loadingEvents:d,recentActivities:s,updatedDate:e?.updated_at,createdDate:e?.created_at,deleted:B,isDeleteWorkspaceAllowed:R,isEditWorkspaceAllowed:k})]})},G$=BSe,HSe=({onFlip:e,name:t,description:r,environmentsCount:o,onAssignEnvironment:a,teamsCount:n,onAssignTeam:i,designAndViewOfWorkspaceCount:l,onAssignDesign:s,isEnvironmentAllowed:u,isTeamAllowed:f,isDesignAllowed:d,isViewAllowed:p,isViewsVisible:m,isDesignsVisible:x,isEnvironmentsVisible:h,isTeamsVisible:g})=>(0,Se.jsxs)(lG,{elevation:2,onClick:e,children:[(0,Se.jsx)(aG,{children:(0,Se.jsx)(HC,{variant:"body2",onClick:T=>T.stopPropagation(),children:t})}),(0,Se.jsx)(Pp.Grid2,{children:r?(0,Se.jsx)(rG,{onClick:T=>T.stopPropagation(),sx:{maxHeight:"105px"},children:r}):(0,Se.jsx)(UC,{onClick:T=>T.stopPropagation(),children:"No description"})}),(0,Se.jsxs)(Pp.Grid2,{sx:{display:"flex",flexDirection:{xs:"column",sm:"row"},pt:{xs:1,md:2},gap:1},children:[h&&(0,Se.jsx)($m,{children:(0,Se.jsxs)(Km,{onClick:T=>T.stopPropagation(),children:[u?(0,Se.jsx)(Hc,{title:"Environments",count:o,onAssign:a,disabled:!u}):(0,Se.jsx)(nl,{title:"Environment",count:o}),(0,Se.jsx)(nl,{title:"Connections",count:0})]})}),g&&(0,Se.jsx)($m,{children:(0,Se.jsxs)(Km,{onClick:T=>T.stopPropagation(),children:[f?(0,Se.jsx)(Hc,{title:"Teams",count:n,onAssign:i,disabled:!f}):(0,Se.jsx)(nl,{title:"Teams",count:n}),(0,Se.jsx)(nl,{title:"Users",count:0})]})}),x&&!m&&(0,Se.jsx)($m,{children:(0,Se.jsxs)(Km,{onClick:T=>T.stopPropagation(),children:[d?(0,Se.jsx)(Hc,{title:"Designs",count:l,onAssign:s,disabled:!d}):(0,Se.jsx)(nl,{title:"Designs",count:l}),(0,Se.jsx)(nl,{title:"Deploys",count:0})]})}),x&&m&&(0,Se.jsx)($m,{children:(0,Se.jsxs)(Km,{onClick:T=>T.stopPropagation(),children:[d&&p?(0,Se.jsx)(Hc,{title:"Designs/Views",count:l,onAssign:s,disabled:!(d&&p)}):(0,Se.jsx)(nl,{title:"Designs/Views",count:l}),(0,Se.jsx)(nl,{title:"Deploys",count:0})]})})]})]}),VSe=({onFlipBack:e,onSelect:t,name:r,onEdit:o,onDelete:a,selectedWorkspaces:n,workspaceId:i,loadingEvents:l,recentActivities:s,updatedDate:u,createdDate:f,deleted:d,isDeleteWorkspaceAllowed:p,isEditWorkspaceAllowed:m})=>{let x=n?.includes(i),h=x?!0:!m,g=x?!0:!p,T=(0,Pp.useTheme)();return(0,Se.jsxs)(iG,{elevation:2,onClick:e,children:[(0,Se.jsxs)(sG,{size:12,children:[(0,Se.jsxs)(uG,{size:6,children:[(0,Se.jsx)(tG,{onClick:E=>E.stopPropagation(),onChange:t,disabled:d?!0:!p}),(0,Se.jsx)(HC,{sx:{color:T.palette.background.constant?.white},variant:"body2",onClick:E=>E.stopPropagation(),children:r})]}),(0,Se.jsxs)(fG,{size:6,children:[(0,Se.jsx)($n,{onClick:o,disabled:h,style:{fill:T.palette.background.constant?.white},bulk:!0}),(0,Se.jsx)(w3,{onClick:a,style:{fill:T.palette.background.constant?.white},disabled:g,bulk:!0})]})]}),(0,Se.jsx)(Pp.Grid2,{sx:{display:"flex",alignItems:"center",flexDirection:"row"},children:(0,Se.jsx)(dG,{variant:"body2",children:"Recent Activity"})}),(0,Se.jsx)(pG,{children:l?(0,Se.jsx)(Ff,{sx:{zIndex:"2010"},open:l,children:(0,Se.jsx)(Gt,{color:"inherit",style:{color:T.palette.background.constant?.white}})}):s?.map((E,R)=>(0,Se.jsx)(q$,{title:E?.description,name:E?.first_name,date:E?.created_at},R))}),(0,Se.jsxs)(mG,{size:12,children:[(0,Se.jsx)(zC,{size:6,children:(0,Se.jsxs)(VC,{onClick:E=>E.stopPropagation(),children:["Updated At: ",Wi(u)]})}),(0,Se.jsx)(zC,{size:6,children:(0,Se.jsxs)(VC,{onClick:E=>E.stopPropagation(),children:["Created At: ",Wi(f)]})})]})]})};var E4=require("react");var sr=require("react/jsx-runtime"),USe=(0,b.styled)(ci)({borderRadius:"8px"}),WSe=(0,b.styled)(z)(({theme:e})=>({marginBottom:"1rem",color:e.palette.text.secondary})),qSe=(0,b.styled)("div")(({theme:e})=>({padding:"1rem",textAlign:"center",color:e.palette.text.secondary,border:`1px dashed ${e.palette.border.strong}`,borderRadius:"8px",margin:"1rem 0",display:"flex",flexDirection:"column",alignItems:"center",gap:"1rem"})),GSe=(e,t,r)=>{let o=r?.length||1,a=t?.name||o,n=e===Kf.DESIGN?"Design":"View";return`Move ${a} ${n}${o>1?"s":""}`},zSe=({workspaceContentMoveModal:e,setWorkspaceContentMoveModal:t,currentWorkspace:r,type:o,selectedContent:a,refetch:n,useGetWorkspacesQuery:i,isCreateWorkspaceAllowed:l,isMoveDesignAllowed:s,isMoveViewAllowed:u,assignDesignToWorkspace:f,assignViewToWorkspace:d,WorkspaceModalContext:p,notify:m,router:x,currentOrgId:h})=>{let{setMultiSelectedContent:g,multiSelectedContent:T,closeModal:E}=(0,E4.useContext)(p),{data:R,isLoading:k}=i({page:0,pagesize:"all",order:"updated_at desc",orgID:h},{skip:!h}),D=R?.workspaces?.filter(J=>J.id!==r.id),[C,v]=(0,E4.useState)(null),P=async()=>{t(!1);try{let J=async H=>{await f({workspaceId:C.id,designId:H})},X=async H=>{await d({workspaceId:C.id,viewId:H})};Kf.DESIGN===o?(T.length>0&&(await Promise.all(T.map(H=>J(H.id))),g([])),a&&await J(a.id)):(T.length>0&&(await Promise.all(T.map(H=>X(H.id))),g([])),a&&await X(a.id)),n&&n(),m({message:`Successfully moved ${o===Kf.DESIGN?"design":"view"}${T.length>1?"s":""} to ${C.name}`,event_type:ET.SUCCESS})}catch{m({message:`Failed to move ${o===Kf.DESIGN?"design":"view"}. Please try again.`,event_type:ET.ERROR})}},B=()=>{E(),t(!1),x.push("/management/workspaces")},_=o===Kf.DESIGN?s:u;return(0,sr.jsxs)(Lr,{open:e,headerIcon:(0,sr.jsx)(a5,{}),closeModal:()=>t(!1),title:GSe(o,a,T),children:[(0,sr.jsxs)(Mr,{children:[(0,sr.jsxs)(WSe,{children:["Current Workspace: ",(0,sr.jsx)("strong",{children:r.name})]}),(0,sr.jsx)(ma,{}),(0,sr.jsx)($,{display:"flex",flexDirection:"column",marginTop:"1rem",children:k?(0,sr.jsx)(Gt,{size:24}):D?.length?(0,sr.jsxs)(sr.Fragment,{children:[(0,sr.jsx)(z,{style:{marginBottom:"0.5rem"},children:"Select destination workspace"}),(0,sr.jsx)(Zr,{children:D.map(J=>(0,sr.jsx)(USe,{selected:C?.id===J.id,onClick:()=>_&&v(J),disabled:!_,children:(0,sr.jsx)(Qt,{primary:J.name})},J.id))})]}):(0,sr.jsxs)(qSe,{children:[(0,sr.jsx)(z,{children:"No other workspaces available to move content to."}),(0,sr.jsx)(ke,{variant:"contained",color:"primary",onClick:B,disabled:!l,children:"Create Workspace"})]})})]}),(0,sr.jsx)(io,{variant:"filled",children:(0,sr.jsx)(Xd,{primaryText:"Move",secondaryText:"Cancel",primaryButtonProps:{onClick:P,disabled:k||!C||!D?.length||!_},secondaryButtonProps:{onClick:()=>t(!1)}})})]})},z$=zSe;var Vc=require("react/jsx-runtime"),jSe=({workspaceId:e,useAssignEnvironmentToWorkspaceMutation:t,useGetEnvironmentsOfWorkspaceQuery:r,useUnassignEnvironmentFromWorkspaceMutation:o,useNotificationHandlers:a,isAssignedEnvironmentAllowed:n})=>{let{handleSuccess:i,handleError:l}=a(),{data:s,isLoading:u}=r({workspaceId:e,page:0,pagesize:"all",filter:'{"assigned":false}'}),{data:f,isLoading:d}=r({workspaceId:e,page:0,pagesize:"all"}),p=s?.environments?.map(E=>({label:E.name,value:E.id}))||[],m=f?.environments?.map(E=>({label:E.name,value:E.id}))||[],[x]=t(),[h]=o(),g=(E,R)=>{let k=E.map(C=>C.value),D=R.map(C=>C.value);if(D.length>0){D.forEach(C=>{let v=f?.environments?.find(P=>P.id===C)?.name||"Unknown";h({workspaceId:e,environmentId:C}).unwrap().then(()=>i(`Environment "${v}" unassigned`)).catch(P=>l(`Environment "${v}" Unassign Error: ${P?.data}`))});return}if(k.length>0){k.forEach(C=>{if(m.find(P=>P.value===C))return;let v=s?.environments?.find(P=>P.id===C)?.name||"Unknown";x({workspaceId:e,environmentId:C}).unwrap().then(()=>i(`Environment "${v}" assigned`)).catch(P=>l(`Environment "${v}" Assign Error: ${P?.data}`))});return}};return(0,Vc.jsx)("div",{onClick:E=>E.stopPropagation(),style:{marginBlock:"1rem",maxWidth:"15rem"},children:(0,Vc.jsx)(f2,{multiple:!0,options:p,value:m,loading:u||d,onChange:(E,R)=>{let k=m||[],D=R||[],C=D.filter(P=>!k.some(B=>B.value===P.value)),v=k.filter(P=>!D.some(B=>B.value===P.value));g(C,v)},size:"small",disableCloseOnSelect:!0,getOptionLabel:E=>E.label,renderTags:E=>E.map(R=>(0,Vc.jsx)(Dt,{label:R.label,size:"small",style:{margin:"0.15rem",borderRadius:"0.2rem"},onDelete:()=>{h({workspaceId:e,environmentId:R.value})}},R.value)),renderInput:E=>(0,Vc.jsx)(Qr,{...E,placeholder:"Assigned Environment"}),popupIcon:null,disabled:!n})})},j$=jSe;var Ba=require("react");var Ne=require("react/jsx-runtime"),KSe=({workspaceId:e,workspaceName:t,open:r,handleClose:o,useGetEventsOfWorkspaceQuery:a})=>{let[n,i]=(0,Ba.useState)(0),l=25,[s,u]=(0,Ba.useState)([]),[f,d]=(0,Ba.useState)(!0),p=(0,Ba.useRef)(null),m=(0,Ba.useRef)(null),{data:x,isLoading:h,isFetching:g}=a({workspaceId:e,page:n,pagesize:l},{skip:!r});(0,Ba.useEffect)(()=>{x&&(u(n===0?x.data:k=>[...k,...x.data]),d((x.page+1)*l<x.total_count))},[x,n,l]),(0,Ba.useEffect)(()=>{r&&(i(0),u([]),d(!0))},[r]);let T=(0,Ba.useCallback)(k=>{h||g||(p.current&&p.current.disconnect(),p.current=new IntersectionObserver(D=>{D[0].isIntersecting&&f&&i(C=>C+1)}),k&&p.current.observe(k))},[h,g,f]),E=(0,b.useTheme)(),R=k=>{switch(["design","view","environment","team"].find(v=>k.includes(v))){case"design":return(0,Ne.jsx)(Xa,{...$o});case"view":return(0,Ne.jsx)(u5,{...$o});case"environment":return(0,Ne.jsx)(In,{...$o,fill:E.palette.icon.default});case"team":return(0,Ne.jsx)(ru,{...$o,primaryFill:E.palette.icon.default,fill:""});default:return(0,Ne.jsx)(Od,{...$o,fill:E.palette.icon.default})}};return(0,Ne.jsx)(Ne.Fragment,{children:(0,Ne.jsxs)(Lr,{title:`"${t}" Recent Activity`,open:r,closeModal:o,headerIcon:(0,Ne.jsx)(pF,{}),maxWidth:"md",children:[(0,Ne.jsx)(Mr,{style:{maxHeight:"40rem"},children:n===0&&h?(0,Ne.jsx)($,{display:"flex",justifyContent:"center",padding:4,children:(0,Ne.jsx)(Gt,{})}):s.length>0?(0,Ne.jsxs)(Ne.Fragment,{children:[s.map((k,D)=>(0,Ne.jsxs)(Zr,{sx:{width:"100%",padding:"0"},children:[(0,Ne.jsxs)(Or,{style:{padding:"0"},alignItems:"flex-start",secondaryAction:(0,Ne.jsxs)($,{display:"flex",flexDirection:"column",alignItems:"flex-end",gap:.2,children:[R(k.description),(0,Ne.jsx)(xe,{title:fs(k.created_at),children:(0,Ne.jsx)("div",{children:(0,Ne.jsxs)(z,{variant:"caption",style:{display:"flex",alignItems:"center",fontStyle:"italic"},children:["Updated At: ",ds(k.created_at)]})})})]}),children:[(0,Ne.jsx)(Uf,{style:{minWidth:"0",marginTop:"0.75rem",marginRight:"1rem"},children:(0,Ne.jsx)(qt,{alt:k.first_name,src:k.avatar_url,sx:_d})}),(0,Ne.jsx)(Qt,{primary:k.first_name+" "+k.last_name,secondary:(0,Ne.jsx)(Ne.Fragment,{children:k.description})})]}),(0,Ne.jsx)(ma,{})]},`${k.created_at}-${k.description}-${D}`)),(0,Ne.jsx)("div",{ref:f?T:null,style:{height:"20px",width:"100%"}}),g&&(0,Ne.jsx)($,{display:"flex",justifyContent:"center",padding:2,ref:m,children:(0,Ne.jsx)(Gt,{size:24})}),!f&&s.length>0&&(0,Ne.jsx)(z,{variant:"body2",color:"textSecondary",style:{textAlign:"center"},children:"No more activities to load"})]}):(0,Ne.jsx)($,{display:"flex",justifyContent:"center",padding:4,children:(0,Ne.jsx)(z,{variant:"body2",color:"textSecondary",children:"No recent activity found for this workspace."})})}),(0,Ne.jsx)(io,{variant:"filled",children:(0,Ne.jsx)(Ne.Fragment,{})})]})})},K$=KSe;var Yu=require("react");var Ha=require("react");var $Se=({workspaceId:e,useGetTeamsOfWorkspaceQuery:t,useAssignTeamToWorkspaceMutation:r,useUnassignTeamFromWorkspaceMutation:o,isTeamsVisible:a})=>{let[n,i]=(0,Ha.useState)(0),[l,s]=(0,Ha.useState)([]),u=25,[f,d]=(0,Ha.useState)(0),[p,m]=(0,Ha.useState)([]),[x,h]=(0,Ha.useState)(!1),[g,T]=(0,Ha.useState)(!0),[E]=r(),[R]=o(),[k,D]=(0,Ha.useState)(!0),[C,v]=(0,Ha.useState)([]),{data:P}=t(br({workspaceId:e,page:n,pagesize:u,filter:'{"assigned":false}'}),{skip:g||!a}),{data:B}=t(br({workspaceId:e,page:f,pagesize:u}),{skip:g||!a});(0,Ha.useEffect)(()=>{let M=P?.teams?P.teams:[];s(F=>[...F,...M])},[P]),(0,Ha.useEffect)(()=>{let M=B?.teams?B.teams:[];m(F=>[...F,...M])},[B]);let _=M=>{M?.stopPropagation(),h(!0),T(!1)},J=M=>{M?.stopPropagation(),h(!1),T(!0)},X=()=>{let M=Math.ceil(Number(P?.total_count)/u);n<M-1&&i(F=>F+1)},H=()=>{let M=Math.ceil(Number(B?.total_count)/u);f<M-1&&d(F=>F+1)},q=()=>{let{addedTeamsIds:M,removedTeamsIds:F}=N(C);M.map(V=>E({workspaceId:e,teamId:V}).unwrap()),F.map(V=>R({workspaceId:e,teamId:V}).unwrap()),s([]),m([]),J()},N=M=>{let F=p.map(oe=>oe.id),V=M.map(oe=>oe.id),y=V.filter(oe=>!F.includes(oe)),ee=F.filter(oe=>!V.includes(oe));return{addedTeamsIds:y,removedTeamsIds:ee}};return{data:l,workspaceData:p,assignModal:x,handleAssignModal:_,handleAssignModalClose:J,handleAssignablePage:X,handleAssignedPage:H,handleAssign:q,handleAssignData:M=>{let{addedTeamsIds:F,removedTeamsIds:V}=N(M);F.length>0||V.length>0?D(!1):D(!0),v(M)},disableTransferButton:k,assignedItems:C}},R4=$Se;var Eo=require("react/jsx-runtime"),YSe=({workspaceId:e,workspaceName:t,useGetTeamsOfWorkspaceQuery:r,useAssignTeamToWorkspaceMutation:o,useUnassignTeamFromWorkspaceMutation:a,isEditTeamAllowed:n,isAssignTeamAllowed:i,isRemoveTeamFromWorkspaceAllowed:l,isLeaveTeamAllowed:s,isDeleteTeamAllowed:u,org_id:f,useGetUsersForOrgQuery:d,useNotificationHandlers:p,useRemoveUserFromTeamMutation:m})=>{let[x,h]=(0,Yu.useState)(0),[g,T]=(0,Yu.useState)(10),[E,R]=(0,Yu.useState)("updated_at desc"),[k,D]=(0,Yu.useState)(!1),[C,v]=(0,Yu.useState)(""),[P,B]=(0,Yu.useState)(!1),{data:_}=r({workspaceId:e,page:x,pageSize:g,order:E,search:C}),[J]=a(),X=R4({workspaceId:e,useGetTeamsOfWorkspaceQuery:r,useAssignTeamToWorkspaceMutation:o,useUnassignTeamFromWorkspaceMutation:a,isTeamsVisible:i||l}),H=L=>{J({workspaceId:e,teamId:L}).unwrap()},q=lp({teams:_?.teams,count:_?.total_count,page:x,pageSize:g,setPage:h,setPageSize:T,sortOrder:E,setSortOrder:R,bulkSelect:k,setBulkSelect:D,handleRemoveTeamFromWorkspace:H,handleTeamView:()=>{},handleDeleteTeam:()=>{},handleleaveTeam:()=>{},teamId:"",workspace:!0,isEditTeamAllowed:n,isLeaveTeamAllowed:s,isRemoveTeamFromWorkspaceAllowed:l,isDeleteTeamAllowed:u,setSearch:v}),N=(0,b.useTheme)();return(0,Eo.jsxs)(Eo.Fragment,{children:[(0,Eo.jsxs)(hs,{children:[(0,Eo.jsx)(ke,{variant:"contained",startIcon:(0,Eo.jsx)(cF,{}),onClick:X.handleAssignModal,style:{margin:"1rem"},children:"Assign Teams"}),(0,Eo.jsxs)(b3,{children:[(0,Eo.jsx)(Kn,{onSearch:L=>{v(L)},onClear:()=>{v("")},expanded:P,setExpanded:B,placeholder:"Search workspaces..."}),(0,Eo.jsx)(ln,{columns:q.columns,customToolsProps:{columnVisibility:q.columnVisibility,setColumnVisibility:q.setColumnVisibility},id:"teams-table"})]})]}),(0,Eo.jsx)(Zm,{teams:_?.teams,tableOptions:q.tableOptions,columnVisibility:q.columnVisibility,colViews:q.colViews,tableCols:q.tableCols,updateCols:q.updateCols,columns:q.columns,isRemoveFromTeamAllowed:l,org_id:f,useGetUsersForOrgQuery:d,useNotificationHandlers:p,useRemoveUserFromTeamMutation:m}),(0,Eo.jsx)(ri,{open:X.assignModal,onClose:X.handleAssignModalClose,title:`Assign Teams to ${t}`,headerIcon:(0,Eo.jsx)(ru,{height:"40",width:"40",primaryFill:N.palette.common.white,fill:N.palette.icon.disabled}),name:"Teams",assignableData:X.data,handleAssignedData:X.handleAssignData,originalAssignedData:X.workspaceData,emptyStateIcon:(0,Eo.jsx)(ru,{height:"5rem",width:"5rem",primaryFill:"#808080",secondaryFill:N.palette.icon.disabled,fill:"#808080"}),handleAssignablePage:X.handleAssignablePage,handleAssignedPage:X.handleAssignedPage,originalLeftCount:X.data?.length||0,originalRightCount:_?.total_count||0,onAssign:X.handleAssign,disableTransfer:X.disableTransferButton,helpText:`Assign Teams to ${t}`,isAssignAllowed:i,isRemoveAllowed:l})]})},$$=YSe;var Is=require("react");var Va=require("react");var ZSe=({workspaceId:e,useGetViewsOfWorkspaceQuery:t,useAssignViewToWorkspaceMutation:r,useUnassignViewFromWorkspaceMutation:o,isViewsVisible:a})=>{let[n,i]=(0,Va.useState)(0),[l,s]=(0,Va.useState)([]),u=25,[f,d]=(0,Va.useState)(0),[p,m]=(0,Va.useState)([]),[x,h]=(0,Va.useState)(!1),[g,T]=(0,Va.useState)(!0),[E,R]=(0,Va.useState)(!0),[k,D]=(0,Va.useState)([]),{data:C}=t(br({workspaceId:e,page:n,pagesize:u,filter:'{"assigned":false}'}),{skip:g||!a}),{data:v}=t(br({workspaceId:e,page:f,pagesize:u}),{skip:g||!a}),[P]=r(),[B]=o();(0,Va.useEffect)(()=>{let F=C?.views?C.views:[];s(V=>[...V,...F])},[C]),(0,Va.useEffect)(()=>{let F=v?.views?v.views:[];m(V=>[...V,...F])},[v]);let _=F=>{F?.stopPropagation(),h(!0),T(!1)},J=F=>{F?.stopPropagation(),h(!1),T(!0)},X=()=>{let F=Math.ceil(Number(C?.total_count)/u);n<F-1&&i(V=>V+1)},H=()=>{let F=Math.ceil(Number(v?.total_count)/u);f<F-1&&d(V=>V+1)},q=F=>{let V=p.map(O=>O.id),y=F.map(O=>O.id),ee=y.filter(O=>!V.includes(O)),oe=V.filter(O=>!y.includes(O));return{addedviewsIds:ee,removedviewsIds:oe}};return{data:l,workspaceData:p,assignModal:x,handleAssignModal:_,handleAssignModalClose:J,handleAssignablePage:X,handleAssignedPage:H,handleAssign:async()=>{let{addedviewsIds:F,removedviewsIds:V}=q(k);F.map(y=>P({workspaceId:e,viewId:y}).unwrap()),V.map(y=>B({workspaceId:e,viewId:y}).unwrap()),s([]),m([]),i(0),d(0),J()},isActivityOccurred:F=>{let{addedviewsIds:V,removedviewsIds:y}=q(F);return V.length>0||y.length>0},handleAssignData:F=>{let{addedviewsIds:V,removedviewsIds:y}=q(F);R(!(V.length>0||y.length>0)),D(F)},disableTransferButton:E,assignedItems:k}},O4=ZSe;var xr=require("react/jsx-runtime"),Y$=[["id","na"],["avatar_url","xs"],["email","na"],["name","xs"],["first_name","na"],["last_name","na"],["organization_id","xl"],["created_at","na"],["updated_at","xl"],["visibility","l"],["actions","xs"]];var QSe=({workspaceId:e,workspaceName:t,isRemoveAllowed:r,useGetViewsOfWorkspaceQuery:o,useUnassignViewFromWorkspaceMutation:a,useAssignViewToWorkspaceMutation:n,isAssignAllowed:i,handleShowDetails:l,handleVisibilityChange:s,currentUserId:u})=>{let f=(0,b.useTheme)(),[d,p]=(0,Is.useState)(""),[m,x]=(0,Is.useState)(!1),[h,g]=(0,Is.useState)(0),[T,E]=(0,Is.useState)(10),[R,k]=(0,Is.useState)("updated_at desc"),{data:D,refetch:C}=o({workspaceId:e,page:h,pagesize:T,search:d,order:R,expandUser:!0},{skip:!e}),{width:v}=Xo(),[P]=a(),B=[{name:"id",label:"ID",options:{filter:!1,customBodyRender:L=>(0,xr.jsx)(Aa,{value:L,maxLength:10})}},{name:"name",label:"Name",options:{filter:!1,sort:!0,searchable:!0,customBodyRender:(L,M)=>{let F=M.tableData[M.rowIndex]?.id??"",V=M.tableData[M.rowIndex]?.name??"";return(0,xr.jsx)(bp,{onClick:()=>l(F,V,cc.VIEW),children:L})}}},{name:"avatar_url",label:"Author",options:{filter:!1,sort:!1,searchable:!1,customBodyRender:(L,M)=>(0,xr.jsx)($,{sx:{"& > img":{mr:2,flexShrink:0}},children:(0,xr.jsx)(ku,{userId:((V,y,ee)=>{let oe=ee.findIndex(O=>O.name===y);return V[oe]})(M.rowData,"user_id",B),userName:`${M.rowData[4]} ${M.rowData[5]}`,userEmail:M.rowData[3],profileUrl:L})})}},{name:"email",label:"Email",options:{filter:!1,sort:!0,searchable:!0}},{name:"first_name",label:"First Name",options:{filter:!1,sort:!0,searchable:!0}},{name:"last_name",label:"Last Name",options:{filter:!1,sort:!0,searchable:!0}},{name:"created_at",label:"Created At",options:{filter:!1,sort:!0,searchable:!0,setCellHeaderProps:()=>({align:"center"})}},{name:"updated_at",label:"Updated At",options:{filter:!1,sort:!0,searchable:!0,setCellHeaderProps:()=>({align:"center"})}},{name:"visibility",label:"Visibility",options:{filter:!1,sort:!1,searchable:!0,customBodyRender:(L,M)=>{let F=M.rowIndex,V=M.tableData[F]?.id,y=M.tableData[F]?.visibility,oe=M.tableData[F]?.user_id===u,O=y!==dn.PUBLISHED&&oe;return(0,xr.jsx)($i,{value:L,onChange:Pe=>{s&&(s(V,Pe),C())},enabled:O,options:[[dn.PUBLIC,X1],[dn.PRIVATE,Q1]]})}}},{name:"actions",label:"Actions",options:{filter:!1,sort:!1,searchable:!1,customBodyRender:(L,M)=>(0,xr.jsx)(Ho,{disabled:!r,children:(0,xr.jsxs)(zt,{id:`delete_view-${M.rowIndex}`,title:"Move View",onClick:()=>{r&&P({workspaceId:e,viewId:M.rowData[0]})},iconType:"delete",children:[(0,xr.jsx)(IF,{style:{color:f?.palette.icon.default}})," "]})})}}],_=O4({workspaceId:e,useGetViewsOfWorkspaceQuery:o,useUnassignViewFromWorkspaceMutation:a,useAssignViewToWorkspaceMutation:n,isViewsVisible:i||r}),[J,X]=(0,Is.useState)(()=>{let L=Jo(Y$,v),M={};return B.forEach(F=>{M[F.name]=L[F.name]}),M}),H={filter:!1,responsive:"standard",selectableRows:"none",count:D?.total_count,rowsPerPage:T,serverSide:!0,page:h,elevation:0,sortOrder:{name:R.split(" ")[0],direction:R.split(" ")[1]},onTableChange:(L,M)=>{let F=M.announceText?M.announceText.split(" : "):[],V="";switch(M.activeColumn&&(V=`${B[M.activeColumn].name} desc`),L){case"changePage":g(M.page);break;case"changeRowsPerPage":E(M.rowsPerPage);break;case"sort":F.length==2&&(F[1]==="ascending"?V=`${B[M.activeColumn].name} asc`:V=`${B[M.activeColumn].name} desc`),V!==R&&k(V);break}}},[q,N]=(0,Is.useState)(B);return(0,xr.jsxs)(no,{children:[(0,xr.jsx)(hs,{style:{padding:"1rem"},children:(0,xr.jsxs)($,{style:{marginRight:"0rem",width:"100%",justifyContent:"end",display:"flex",alignItems:"center"},children:[(0,xr.jsx)(Kn,{onSearch:L=>{p(L)},onClear:()=>{p("")},expanded:m,setExpanded:x,placeholder:"Search workspaces..."}),(0,xr.jsx)(ln,{columns:B,customToolsProps:{columnVisibility:J,setColumnVisibility:X},id:"views-table"}),(0,xr.jsx)($n,{onClick:_.handleAssignModal,disabled:!i,title:"Assign Views"})]})}),(0,xr.jsx)(Vo,{columns:B,data:D?.views,options:H,colViews:Y$,tableCols:q,updateCols:N,columnVisibility:J}),(0,xr.jsx)(ri,{open:_.assignModal,onClose:_.handleAssignModalClose,title:`Assign Views to ${t}`,headerIcon:(0,xr.jsx)(In,{height:"40",width:"40",fill:"white"}),name:"Views",assignableData:_.data,handleAssignedData:_.handleAssignData,originalAssignedData:_.workspaceData,emptyStateIcon:(0,xr.jsx)(In,{height:"5rem",width:"5rem",fill:"#808080"}),handleAssignablePage:_.handleAssignablePage,handleAssignedPage:_.handleAssignedPage,originalLeftCount:_.data?.length||0,originalRightCount:D?.total_count||0,onAssign:_.handleAssign,disableTransfer:_.disableTransferButton,helpText:`Assign Views to ${t}`,isAssignAllowed:i,isRemoveAllowed:r})]})},Z$=QSe;var _p=require("react");var XSe={type:"subscribe_to_rooms_activity"},JSe="user_map",eCe=e=>e===xa?wT:e===MM?LM:e;function Q$(){return window.location.protocol==="https:"?"wss://":"ws://"}var tCe=e=>{let t=new URL(e),r=eCe(t.host);return`${r===wT?"wss://":Q$()}${r}/collaboration`},X$=async({provider_url:e,getUserProfile:t,getUserAccessToken:r})=>{let{data:o}=await t(),a=["user_info","user_left","user_joined","user_map"],{data:n}=await r(),i=async()=>(await r()).data;return{signalingUrl:[tCe(e)],user:o,authToken:n,refreshAuthToken:i,websocketCallbacks:a,peerOpts:{config:{iceServers:kM}}}},rCe=async(e,t,r,o,a)=>{let n=await X$({provider_url:r,getUserProfile:o,getUserAccessToken:a}),i=new WebSocket(n.signalingUrl[0],["auth",n.authToken]);e.current=i,i.addEventListener("open",()=>{console.log("[RoomActivity] connected to room activity"),i.send(JSON.stringify(XSe))}),i.addEventListener("message",l=>{console.log("[RoomActivity] new message",l);let s=JSON.parse(l.data);s.type===JSe&&s.user_map&&t(s.user_map)}),i.addEventListener("close",()=>{console.log("[RoomActivity] subscription to room activity closed")}),i.addEventListener("error",l=>{console.error("[RoomActivity] error in room activity subscription",l)})},oCe=({provider_url:e,getUserProfile:t,getUserAccessToken:r})=>{let[o,a]=(0,_p.useState)({}),n=(0,_p.useRef)(null);return(0,_p.useEffect)(()=>{rCe(n,a,e,t,r);let i=n.current;return()=>{i&&(console.log("closing websocket",i),i.close())}},[e,t,r]),[o,n]},aCe=(e,t)=>{e.send(JSON.stringify({type:"subscribe",topic:t}))},nCe=(e,t)=>{e.send(JSON.stringify({type:"unsubscribe",topic:t}))};var A4=G(require("lodash")),J$=Symbol("INVALID_REDUCER_PATH"),eY="REHYDRATE_STATE_ACTION",iCe=(e,t)=>({type:eY,payload:{reducerPath:e,inflatedState:t}}),lCe=(e,t)=>{if(t.type===eY){let r=A4.default.cloneDeep(e);return A4.default.set(r,t.payload.reducerPath.split("/"),t.payload.inflatedState),r}return e},sCe=e=>({persistMiddleware:a=>n=>i=>{let l=n(i),s=e[i.type];if(s){let u=a.getState();s.forEach(f=>{let d=f.split("/"),p=A4.default.get(u,d,J$);if(p===J$)throw new Error(`Reducer Path to Persist Is Invalid: ${f}`);localStorage.setItem(f,JSON.stringify(p))})}return l},createPersistEnhancedReducer:a=>(n,i)=>{let l=lCe(n,i);return a(l,i)},loadPersistedState:()=>a=>{Object.values(e).forEach(n=>{n.forEach(i=>{let l=localStorage.getItem(i);try{l&&(l=JSON.parse(l),a(iCe(i,l)))}catch{console.error(`Error rehydrating state for reducer ${i}`,l)}})})}});var Wc=require("react");var NY=G(P4()),BY=G(uY());var Cb=require("react-dom");function RCe(e){e()}var OCe=RCe,fY=e=>OCe=e;var bb=require("react");var mY=require("react");var Uc=G(require("react")),dY=Symbol.for("react-redux-context"),pY=typeof globalThis<"u"?globalThis:{};function ACe(){var e;if(!Uc.createContext)return{};let t=(e=pY[dY])!=null?e:pY[dY]=new Map,r=t.get(Uc.createContext);return r||(r=Uc.createContext(null),process.env.NODE_ENV!=="production"&&(r.displayName="ReactRedux"),t.set(Uc.createContext,r)),r}var Ua=ACe();function I4(e=Ua){return function(){let r=(0,mY.useContext)(e);if(process.env.NODE_ENV!=="production"&&!r)throw new Error("could not find react-redux context value; please ensure the component is wrapped in a <Provider>");return r}}var yb=I4();var k4=()=>{throw new Error("uSES not initialized!")};var PCe=k4,cY=e=>{PCe=e};var XCe=G(EY()),kp=G(require("react")),MY=G(PY());var kY=G(require("react")),HCt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";var JCe=k4,LY=e=>{JCe=e};var DY=G(require("react"));function J4(e=Ua){let t=e===Ua?yb:I4(e);return function(){let{store:o}=t();return o}}var kb=J4();function FY(e=Ua){let t=e===Ua?kb:J4(e);return function(){return t().dispatch}}var Mb=FY();cY(BY.useSyncExternalStoreWithSelector);LY(NY.useSyncExternalStore);fY(Cb.unstable_batchedUpdates);var eg=require("react/jsx-runtime"),eye=({children:e,loadPersistedState:t})=>{let[r,o]=(0,Wc.useState)(!0),[a,n]=(0,Wc.useState)(null),i=Mb();return(0,Wc.useEffect)(()=>{if(r){try{i(t())}catch(l){n(l)}o(!1)}},[r,i,t]),a&&console.error("Error Loading Persisted State",a),r?null:(0,eg.jsx)(eg.Fragment,{children:e})};0&&(module.exports={ALABASTER_WHITE,ALICE_BLUE,ANAKIWA,Accordion,AccordionActions,AccordionDetails,AccordionSummary,ActionButton,ActionButtonCard,ActionButtons,AddCircleIcon,AddIcon,Alert,AlertTitle,AppBar,ApplicationIcon,ArrowCompressIcon,ArrowExpandIcon,AssignmentModal,AuthorCell,Autocomplete,Avatar,AvatarGroup,BBChart,BLACK,Backdrop,Badge,BasicMarkdown,BellIcon,BookmarkNotification,Box,Breadcrumbs,BusIcon,Button,ButtonGroup,CARIBBEAN_GREEN,CASPER,CHARCOAL,CHINESE_SILVER,CONNECTED,CULTURED,CalenderIcon,Card,CardActions,CardContent,CardHeader,CardMedia,CaretDownIcon,Carousel,CatalogCard,CatalogCardDesignLogo,CatalogDesignsTable,CatalogFilter,CatalogFilterSidebar,CatalogIcon,CaveatsSection,ChainIcon,ChallengesIcon,ChallengesSection,ChapterCard,CheckCircleIcon,Checkbox,ChevronLeft,Chip,CircleIcon,CircularProgress,ClickAwayListener,CloneIcon,CloseBtn,CloseIcon,CloudSavedIcon,CodeFormatter,CollaboratorAvatarGroup,Collapse,CollapseAllIcon,CollapsibleSection,CollapsibleSectionFormatter,ColumnIcon,CommunityClassIcon,ComponentIcon,ConfigurationIcon,ConnectionChip,Container,ContainerFormatter,ContentFilterIcon,CopyIcon,CopyLinkIcon,CreateDesignModal,CreateNewIcon,CredentialIcon,CrossCircleIcon,CssBaseline,CustomCatalogCard,CustomColumnVisibilityControl,CustomDialog,CustomImage,CustomTooltip,CustomizedStepper,DARK_BLUE_GRAY,DARK_PRIMARY_COLOR,DARK_SHADE_GRAY,DARK_SLATE_GRAY,DARK_TEAL,DATA_VALIDATOR_COMMANDS,DATA_VALIDATOR_EVENTS,DELETED,DISCONNECTED,DISCOVERED,DashboardIcon,DataTableEllipsisMenu,DatabaseIcon,DeferEvents,DeleteIcon,DeploymentsIcon,DesignCard,DesignIcon,DesignTable,DesignerBottomRightIcon,DetailIcon,DetailsIcon,Dialog,DialogActions,DialogContent,DialogContentText,DialogTitle,Divider,DocumentIcon,DoneAllIcon,DoneIcon,DownloadIcon,DragIcon,Drawer,DropDownIcon,EERIE_BLACK,EditIcon,EmptyState,EmptyStateCard,EmptyStyleIcon,EnvironmentIcon,EnvironmentTable,ErrorBoundary,ErrorIcon,EventBus,ExpandAllIcon,ExportIcon,ExternalLinkIcon,Fab,FacebookIcon,Fade,Fallback,FavoriteIcon,FeedbackButton,FeedbackIcon,FileIcon,FilterIcon,FlipCard,FormControl,FormControlLabel,FormGroup,FormLabel,FormatId,FormattedTime,FullScreenIcon,FullScreenIconExit,GRAY,GRAY97,GREEN,GetStartedIcon,GetStartedModal,GithubIcon,GoogleIcon,Grid,Grid2,GridViewIcon,Grow,HelpOutlinedIcon,Hidden,IGNORED,IconButton,IdeaIcon,InfoCircleIcon,InfoIcon,InfoOutlined,InfoTooltip,Input,InputAdornment,InputBase,InputLabel,InputSearchField,InsertChartIcon,InviteUserIcon,JourneyModal,KEPPEL,KanvasIcon,KeppelApplicationIcon,KeppelRectangleIcon,KeppelTallRoundedRectangleIcon,KeyValueInRow,KubernetesIcon,L5DeleteIcon,L5EditIcon,LIGHT_GRAY,LIGHT_TEAL,LIMED_SPRUCE,LabelFormatter,LeaderBoardIcon,LearningCard,LearningContent,LearningIcon,LearningSection,LeftAngledArrowIcon,LeftArrowIcon,LeftPanel,LinearProgress,Link,LinkedinIcon,List,ListFormatter,ListItem,ListItemAvatar,ListItemButton,ListItemIcon,ListItemSecondaryAction,ListItemText,ListSubheader,LockIcon,LogoutIcon,MAINTAINENCE,MIDNIGHT_BLACK,MemoryUsage,MendeleyIcon,Menu,MenuIcon,MenuItem,MenuList,MesheryFilterIcon,MesheryOperator,MetricsDisplay,Modal,ModalBody,ModalButtonDanger,ModalButtonPrimary,ModalButtonSecondary,ModalButtonTertiary,ModalCard,ModalFooter,ModalStyledHeader,MoveFileIcon,NOT_FOUND,NativeSelect,NavigationNavbar,NoSsr,Note,NumberState,NumberStateFormatter,ONYX_BLACK,OfficialClassIcon,OpenFileIcon,OpenIcon,OpenInNewIcon,OpenLeaderBoardButton,OperatorDataFormatter,OperatorDynamicFormatter,OrgIcon,OutlinedApplicationIcon,OutlinedCircleIcon,OutlinedCloudSavingIcon,OutlinedDataObjectIcon,OutlinedDeployIcon,OutlinedDoubleChevronIcon,OutlinedHierarchicalIcon,OutlinedInput,OutlinedMeshIcon,OutlinedPatternIcon,OutlinedPatternSwitchIcon,OutlinedPodIcon,OutlinedRectangleIcon,OutlinedRedoIcon,OutlinedResetIcon,OutlinedRingIcon,OutlinedScreenshotIcon,OutlinedSettingsIcon,OutlinedStarIcon,OutlinedTallRoundedRectangleIcon,OutlinedUndeployIcon,OutlinedUndoIcon,OutlinedValidateIcon,OutlinedVisibilityOffIcon,OutlinedVisibilityOnIcon,OutlinedVisualizerSwitcherIcon,OverviewSection,PATTERNS_BLUE,PRIMARY_COLOR,PROMPT_VARIANTS,Pagination,PaginationItem,PanToolIcon,Panel,Paper,PatternInfo,PerformersSection,PerformersSectionButton,PersistedStateProvider,PersonIcon,PlainCard,PollIcon,Popover,Popper,PopperListener,PrimaryActionButtons,PromptComponent,PublicIcon,PublishIcon,QuestionIcon,REDUX_COMMANDS,REDUX_EVENTS,REEE,REGISTERED,RTK_EVENTS,Radio,RadioGroup,ReadIcon,RectangleIcon,RelatedDesigns,RemoveDoneIcon,RemoveIcon,RenderMarkdown,ResponsiveDataTable,RightArrowIcon,RightPanel,RoundedRectangleShapeIcon,RoundedTriangleShapeIcon,SAFFRON,SILVER_GRAY,SLATE_BLUE,SMPIcon,SaveAsIcon,SearchBar,SearchIcon,SecretFormatter,Select,SetupPreReq,ShareIcon,ShareLineIcon,ShareModal,SistentThemeProvider,SistentThemeProviderWithoutBaseLine,Skeleton,Slide,Slider,Snackbar,SocialSharePopper,SpeedDial,SpeedDialAction,Stack,StatusFormatter,Step,StepButton,StepConnector,StepContent,StepIcon,StepLabel,Stepper,StyledChapter,StyledChartDialog,StyledDialogActions,StyledDialogContent,StyledDialogTitle,StyledMarkdown,StyledSearchBar,SuccessIcon,SvgIcon,Switch,TEAL_BLUE,TOC,TOCLearning,TRANSPARENT_WHITE,Tab,Table,TableBody,TableCell,TableContainer,TableDataFormatter,TableHead,TableRow,TableSortLabel,TableViewIcon,TableVisibilityControl,Tabs,TachographDigitalIcon,TachometerIcon,TallRoundedRectangleIcon,TeamSearchField,TeamTable,TeamTableConfiguration,TeamsIcon,TechnologySection,Terminal,TerminalIcon,TextField,TextWithLinkFormatter,ThemeProvider,ToggleButton,ToggleButtonGroup,Toolbar,ToolkitIcon,Tooltip,TooltipIcon,TouchAppIcon,TransferList,TriangleIcon,TropyIcon,TwitterIcon,Typography,UniversalFilter,UserInfo,UserInviteModal,UserSearchField,UserShareSearch,UserTableAvatarInfo,UsersTable,VerificationClassIcon,ViewIcon,ViewSwitch,VisibilityChipMenu,WHITE,WHITESMOKE,WarningIcon,WorkspaceActivityCard,WorkspaceCard,WorkspaceContentMoveModal,WorkspaceEnvironmentSelection,WorkspaceIcon,WorkspaceRecentActivityModal,WorkspaceTeamsTable,WorkspaceViewsTable,XSTATE_DEBUG_EVENT,YELLOW_SEA,Zoom,accentGrey,actionIcon,alpha,anakiwa,black,blue,buttonDelete,buttonDisabled,carribean,casper,charcoal,colViews,colors,common,componentIcon,connected,convertToReadableUnit,createAndEditEnvironmentSchema,createAndEditEnvironmentUiSchema,createAndEditWorkspaceSchema,createAndEditWorkspaceUiSchema,createCanShow,createDesignColumns,createDesignsColumnsConfig,createTheme,cultured,darkModePalette,darkSlateGray,darkTeal,dataValidatorCommands,dataValidatorEvents,dataValidatorMachine,deadLetter,designColumnsColViews,eerieBlack,extractPodVolumnTables,forwardToActors,fromWorkerfiedActor,getCollaborationConfig,getFormatDate,getFullFormattedTime,getRelativeTime,getWebSocketProtocol,grafanaCredentialSUiSchema,grafanaCredentialSchema,gray,green,helmConnectionSchema,helmConnectionUiSchema,helpAndSupportModalSchema,helpAndSupportModalUiSchema,importDesignSchema,importDesignUiSchema,importFilterSchema,importFilterUiSchema,importModelSchema,importModelUiSchema,initReduxPersist,jungleGreen,keppel,keyframes,kubernetesCredentialSchema,kubernetesCredentialUiSchema,lightModePalette,lighten,notificationColors,outlinedInputClasses,patternsBlue,primaryColor,prometheusCredentialSchema,prometheusCredentialUiSchema,publishCatalogItemSchema,publishCatalogItemUiSchema,red,redDelete,reduxActor,reduxCommands,reduxEvents,reply,rtkQueryActor,rtkQueryActorCommands,rtkQueryActorEvents,saffron,selectIsValidating,selectValidationResults,sendToActor,sendToActors,slateGray,socialIcons,splitCamelCaseString,stepConnectorClasses,styled,subscribeToRoom,tabMenu,tableBackgroundHover,tooltipClasses,typography,unSubscribeRoom,updateVisibleColumns,useDesignAssignment,useEnvironmentAssignment,useMediaQuery,useModal,useNotificationHandler,useResourceCleanData,useRoomActivity,useStepper,useTeamAssignment,useTheme,useViewAssignment,useWindowDimensions,white,withErrorBoundary,withSuppressedErrorBoundary,workerfyActor,yellow});
|
|
97
|
+
name: envoy.filters.http.wasm`,"x-rjsf-grid-area":"12"},uploadType:{title:"Select the Upload Method",enum:["File Upload","URL Upload"],default:"File Upload","x-rjsf-grid-area":"6"}},allOf:[{if:{properties:{uploadType:{const:"File Upload"}}},then:{title:"via File",properties:{file:{type:"string",format:"file",description:"Browse the filter file from your file system","x-rjsf-grid-area":"12"}},required:["file"]}},{if:{properties:{uploadType:{const:"URL Upload"}}},then:{title:"via URL",properties:{url:{type:"string",title:"URL",format:"uri",description:"raw url of the filter file, example: https://raw.github.com/...","x-rjsf-grid-area":"12"}},required:["url"]}}]},A$=ySe;var bSe={"ui:order":["name","uploadType","config","file","url"]},P$=bSe;var _$=require("@layer5/schemas"),ol=_$.ModelDefinitionV1Beta1OpenApiSchema.components.schemas,vSe={type:"object",required:["uploadType"],properties:{uploadType:{type:ol.ImportRequest.properties.uploadType.type,title:"Upload method",enum:["File Import","URL Import","CSV Import"],enumDescriptions:ol.ImportRequest.properties.uploadType.enumDescriptions,default:"Select the Upload Method","x-rjsf-grid-area":"12",description:ol.ImportRequest.properties.uploadType.description}},allOf:[{if:{properties:{uploadType:{const:"File Import"}}},then:{properties:{file:{type:ol.ImportBody.oneOf[0].properties.modelFile?.type,format:ol.ImportBody.oneOf[0].properties.modelFile?.format,description:ol.ImportBody.oneOf[0].properties.modelFile?.description,"x-rjsf-grid-area":"12"}},required:["file"]}},{if:{properties:{uploadType:{const:"URL Import"}}},then:{properties:{url:{type:ol.ImportBody.oneOf[1].properties.url?.type,format:ol.ImportBody.oneOf[1].properties.url?.format,title:"URL",description:ol.ImportBody.oneOf[1].properties.url?.description,"x-rjsf-grid-area":"12",disabled:!0}},required:["url"]}}]},I$=vSe;var wSe={uploadType:{"ui:widget":"radio"},"ui:order":["uploadType","file","url","csv"]},k$=wSe;var ESe={type:"object",properties:{compatibility:{type:"array",title:"Technology",items:{enum:["kubernetes"],type:"string"},uniqueItems:!0,minItems:1,description:"A list of technologies included in or implicated by this design; a list of relevant technology tags.","x-rjsf-grid-area":6},pattern_caveats:{type:"string",title:"Caveats and Considerations",description:"Specific stipulations to consider and known behaviors to be aware of when using this design.",format:"textarea","x-rjsf-grid-area":12,"x-encode-in-uri":!0},pattern_info:{type:"string",title:"Description",description:"Purpose of the design along with its intended and unintended uses.",format:"textarea","x-rjsf-grid-area":12,"x-encode-in-uri":!0},type:{type:"string",title:"Type",enum:["Deployment","Observability","Resiliency","Scaling","Security","Traffic-management","Troubleshooting","Workloads"],default:"Deployment",description:"Categorization of the type of design or operational flow depicted in this design.","x-rjsf-grid-area":6}},required:["compatibility","pattern_caveats","pattern_info","type"]},Bc=ESe;var RSe={"ui:order":["type","compatibility","pattern_info","pattern_caveats"]},M$=RSe;var OSe={type:"object",title:"Kubernetes",properties:{credentialName:{title:"Credential Name",type:"string",description:"Name of your credential"},secret:{type:"object",title:"Credential Secret",description:"Credential secret for the Kubernetes cluster",properties:{clusterName:{type:"string",title:"Cluster Name",description:"Name of the Kubernetes cluster"},clusterServerURL:{type:"string",title:"Server URL",description:"URL of the Kubernetes cluster"},auth:{type:"object",title:"Auth",description:"Kubernetes cluster authentication",properties:{clusterUserName:{type:"string",title:"User Name",description:"Name of the Kubernetes cluster user"},clusterToken:{type:"string",title:"Token",description:"Token of the Kubernetes cluster user"},clusterClientCertificateData:{type:"string",title:"Client Certificate Data",description:"Certificate data of the Kubernetes cluster"},clusterClientKeyData:{type:"string",title:"Client Key Data",description:"Client Key data of the Kubernetes cluster"},clusterCertificateAuthorityData:{type:"string",title:"Certificate Authority Data",description:"Certificate Authority data of the Kubernetes cluster"}},required:["clusterUserName","clusterToken","clusterClientCertificateData","clusterClientKeyData","clusterCertificateAuthorityData"]}},required:["clusterName","clusterServerURL"]}},required:["credentialName"]},L$=OSe;var ASe={},D$=ASe;var PSe={type:"object",title:"Prometheus",properties:{credentialName:{title:"Credential Name",type:"string",description:"Name of your credential"},secret:{type:"object",title:"Credential Secret",description:"Credential secret for the Prometheus instance",properties:{prometheusURL:{type:"string",title:"URL",description:"URL of the Prometheus instance"}},required:["prometheusURL"]}},required:["credentialName"]},F$=PSe;var _Se={},N$=_Se;var ISe={type:"object",title:"Grafana",properties:{credentialName:{title:"Credential Name",type:"string",description:"Name of your credential"},secret:{type:"object",title:"Credential Secret",description:"Credential secret for the Grafana instance",properties:{grafanaURL:{type:"string",title:"URL",description:"URL of the Grafana instance"},grafanaAPIKey:{type:"string",title:"API Key",description:"API Key for the Grafana instance"}},required:["grafanaURL","grafanaAPIKey"]}},required:["credentialName"]},B$=ISe;var kSe={},H$=kSe;var Fa=require("react");var MSe=({workspaceId:e,useGetDesignsOfWorkspaceQuery:t,useAssignDesignToWorkspaceMutation:r,useUnassignDesignFromWorkspaceMutation:o,isDesignsVisible:a})=>{let[n,i]=(0,Fa.useState)(0),[l,s]=(0,Fa.useState)([]),u=25,[f,d]=(0,Fa.useState)(0),[p,m]=(0,Fa.useState)([]),[x,h]=(0,Fa.useState)(!1),[g,T]=(0,Fa.useState)(!0),[E,R]=(0,Fa.useState)(!0),[k,D]=(0,Fa.useState)([]),{data:C}=t(br({workspaceId:e,page:n,pagesize:u,filter:'{"assigned":false}'}),{skip:g||!a}),{data:v}=t(br({workspaceId:e,page:f,pagesize:u}),{skip:g||!a}),[P]=r(),[B]=o();(0,Fa.useEffect)(()=>{let F=C?.designs?C.designs:[];s(V=>[...V,...F])},[C]),(0,Fa.useEffect)(()=>{let F=v?.designs?v.designs:[];m(V=>[...V,...F])},[v]);let _=F=>{F?.stopPropagation(),h(!0),T(!1)},J=F=>{F?.stopPropagation(),h(!1),T(!0)},X=()=>{let F=Math.ceil(Number(C?.total_count)/u);n<F-1&&i(V=>V+1)},H=()=>{let F=Math.ceil(Number(v?.total_count)/u);f<F-1&&d(V=>V+1)},q=F=>{let V=p.map(O=>O.id),y=F.map(O=>O.id),ee=y.filter(O=>!V.includes(O)),oe=V.filter(O=>!y.includes(O));return{addedDesignsIds:ee,removedDesignsIds:oe}};return{data:l,workspaceData:p,assignModal:x,handleAssignModal:_,handleAssignModalClose:J,handleAssignablePage:X,handleAssignedPage:H,handleAssign:async()=>{let{addedDesignsIds:F,removedDesignsIds:V}=q(k);F.map(y=>P({workspaceId:e,designId:y}).unwrap()),V.map(y=>B({workspaceId:e,designId:y}).unwrap()),s([]),m([]),i(0),d(0),J()},handleAssignData:F=>{let{addedDesignsIds:V,removedDesignsIds:y}=q(F);R(!(V.length>0||y.length>0)),D(F)},isActivityOccurred:F=>{let{addedDesignsIds:V,removedDesignsIds:y}=q(F);return V.length>0||y.length>0},disableTransferButton:E,assignedItems:k}},b4=MSe;var po=require("react/jsx-runtime"),LSe=({workspaceId:e,workspaceName:t,meshModelModelsData:r,handleBulkUnpublishModal:o,handleBulkWorkspaceDesignDeleteModal:a,handleClone:n,handleCopyUrl:i,handlePublish:l,handleDownload:s,getDownloadUrl:u,handleShowDetails:f,handleUnpublishModal:d,handleWorkspaceDesignDeleteModal:p,publishModalHandler:m,isCopyLinkAllowed:x,isDeleteAllowed:h,isDownloadAllowed:g,isPublishAllowed:T,isUnpublishAllowed:E,useAssignDesignToWorkspaceMutation:R,useUnassignDesignFromWorkspaceMutation:k,GenericRJSFModal:D,isAssignAllowed:C,isRemoveAllowed:v,useGetWorkspaceDesignsQuery:P,handleOpenInDesigner:B,showPlaygroundActions:_=!0,handleVisibilityChange:J,currentUserId:X})=>{let[H,q]=(0,sa.useState)({open:!1,pattern:{}}),N=(0,sa.useRef)(null),[L,M]=(0,sa.useState)(""),[F,V]=(0,sa.useState)(0),[y,ee]=(0,sa.useState)(10),[oe,O]=(0,sa.useState)("updated_at desc"),[Pe,ze]=(0,sa.useState)(!1),{data:Ut,refetch:Nr}=P({workspaceId:e,page:F,pagesize:y,search:L,order:oe,expandUser:!0},{skip:!e}),Je=Hr=>{let Cn=m(Hr);q({open:!0,pattern:Cn})},Br=(0,b.useTheme)(),Wt=o4({handleDeleteModal:Hr=>()=>p(Hr.id,e),handlePublishModal:Je,handleUnpublishModal:Hr=>()=>d(Hr,N),handleCopyUrl:i,handleClone:n,handleShowDetails:f,handleDownload:s,getDownloadUrl:u,isCopyLinkAllowed:x,isDeleteAllowed:h,isDownloadAllowed:g,isPublishAllowed:T,isUnpublishAllowed:E,isFromWorkspaceTable:!0,isRemoveAllowed:v,theme:Br,handleOpenInDesigner:B,showPlaygroundActions:_,handleVisibilityChange:J,currentUserId:X,refetchWorkspaceDesigns:Nr}),[hr,j]=(0,sa.useState)({rjsfSchema:{},uiSchema:{}}),{width:gr}=Xo(),[Z,de]=(0,sa.useState)(()=>{let Hr=Jo(xc,gr),Cn={};return Wt.forEach(ks=>{Cn[ks.name]=Hr[ks.name]}),Cn});(0,sa.useEffect)(()=>{(async()=>{let Cn=v4.default.uniq(r?.models?.map(qc=>qc.display_name)),ks=v4.default.set(v4.default.cloneDeep(Bc),"properties.compatibility.items.enum",Cn);j({rjsfSchema:ks,uiSchema:Bc})})()},[r]);let me=b4({workspaceId:e,useAssignDesignToWorkspaceMutation:R,useUnassignDesignFromWorkspaceMutation:k,useGetDesignsOfWorkspaceQuery:P,isDesignsVisible:C||v}),Er=(0,po.jsx)(hs,{style:{padding:"1rem"},children:(0,po.jsxs)($,{style:{marginRight:"0rem",width:"100%",justifyContent:"end",display:"flex",alignItems:"center"},children:[(0,po.jsx)(Kn,{onSearch:Hr=>{M(Hr)},onClear:()=>{M("")},expanded:Pe,setExpanded:ze,placeholder:"Search designs..."}),(0,po.jsx)(ln,{columns:Wt,customToolsProps:{columnVisibility:Z,setColumnVisibility:de},id:"catalog-table"}),(0,po.jsx)($n,{onClick:me.handleAssignModal,disabled:!C,title:"Assign Designs"})]})});return(0,po.jsxs)(po.Fragment,{children:[Er,(0,po.jsx)(r4,{patterns:Ut?.designs||[],totalCount:Ut?.total_count,sortOrder:oe,setSortOrder:O,pageSize:y,setPageSize:ee,page:F,setPage:V,columnVisibility:Z,colViews:xc,columns:Wt,handleBulkpatternsDataUnpublishModal:o,handleBulkDeleteModal:(Hr,Cn)=>a(Hr,Cn,t,e),filter:"my-designs",setSearch:M}),(0,po.jsx)(ri,{open:me.assignModal,onClose:me.handleAssignModalClose,title:`Assign Designs to ${t}`,headerIcon:(0,po.jsx)(Xa,{height:"40",width:"40"}),name:"Designs",assignableData:me.data,handleAssignedData:me.handleAssignData,originalAssignedData:me.workspaceData,emptyStateIcon:(0,po.jsx)(Xa,{height:"5rem",width:"5rem",secondaryFill:"#808080"}),handleAssignablePage:me.handleAssignablePage,handleAssignedPage:me.handleAssignedPage,originalLeftCount:me.data?.length||0,originalRightCount:me.assignedItems?.length||0,onAssign:me.handleAssign,disableTransfer:me.disableTransferButton,helpText:`Assign Designs to ${t}`,isAssignAllowed:C,isRemoveAllowed:v,showViews:!1}),(0,po.jsx)(D,{open:H.open,handleClose:()=>q({open:!1,pattern:{}}),schema:hr?.rjsfSchema,uiSchema:hr?.uiSchema,handleSubmit:Hr=>l(H,Hr),title:`Publish ${H?.pattern?.name}`,buttonTitle:"Publish"}),(0,po.jsx)(np,{ref:N})]})},V$=LSe;var al=require("react");var Na=require("react");var DSe=({workspaceId:e,useGetEnvironmentsOfWorkspaceQuery:t,useAssignEnvironmentToWorkspaceMutation:r,useUnassignEnvironmentFromWorkspaceMutation:o,isEnvironmentsVisible:a})=>{let[n,i]=(0,Na.useState)(0),[l,s]=(0,Na.useState)([]),u=25,[f,d]=(0,Na.useState)(0),[p,m]=(0,Na.useState)([]),[x,h]=(0,Na.useState)(!1),[g,T]=(0,Na.useState)(!0),[E,R]=(0,Na.useState)(!0),[k,D]=(0,Na.useState)([]),{data:C}=t(br({workspaceId:e,page:n,pagesize:u,filter:'{"assigned":false}'}),{skip:g||!a}),{data:v}=t(br({workspaceId:e,page:f,pagesize:u}),{skip:g||!a}),[P]=r(),[B]=o();(0,Na.useEffect)(()=>{let M=C?.environments?C.environments:[];s(F=>[...F,...M])},[C]),(0,Na.useEffect)(()=>{let M=v?.environments?v.environments:[];m(F=>[...F,...M])},[v]);let _=M=>{M?.stopPropagation(),h(!0),T(!1)},J=M=>{M?.stopPropagation(),h(!1),T(!0)},X=()=>{let M=Math.ceil(Number(C?.total_count)/u);n<M-1&&i(F=>F+1)},H=()=>{let M=Math.ceil(Number(v?.total_count)/u);f<M-1&&d(F=>F+1)},q=M=>{let F=p.map(oe=>oe.id),V=M.map(oe=>oe.id),y=V.filter(oe=>!F.includes(oe)),ee=F.filter(oe=>!V.includes(oe));return{addedEnvironmentsIds:y,removedEnvironmentsIds:ee}};return{data:l,workspaceData:p,assignModal:x,handleAssignModal:_,handleAssignModalClose:J,handleAssignablePage:X,handleAssignedPage:H,handleAssign:async()=>{let{addedEnvironmentsIds:M,removedEnvironmentsIds:F}=q(k);M.map(V=>P({workspaceId:e,environmentId:V}).unwrap()),F.map(V=>B({workspaceId:e,environmentId:V}).unwrap()),s([]),m([]),i(0),d(0),J()},handleAssignData:M=>{let{addedEnvironmentsIds:F,removedEnvironmentsIds:V}=q(M);F.length>0||V.length>0?R(!1):R(!0),D(M)},disableTransferButton:E,assignedItems:k}},w4=DSe;var Xe=require("react/jsx-runtime"),U$=[["id","na"],["name","xs"],["description","m"],["organization_id","l"],["created_at","na"],["updated_at","xl"],["actions","xs"]],FSe=({value:e})=>(0,Xe.jsx)("div",{style:{position:"relative",height:"20px"},children:(0,Xe.jsx)(BC,{children:(0,Xe.jsx)(NC,{children:(0,Xe.jsx)(xe,{title:e,placement:"top-start",children:(0,Xe.jsx)("span",{style:{cursor:"pointer"},children:e})})})})}),NSe=({workspaceId:e,workspaceName:t,isRemoveAllowed:r,useGetEnvironmentsOfWorkspaceQuery:o,useUnassignEnvironmentFromWorkspaceMutation:a,useAssignEnvironmentToWorkspaceMutation:n,isAssignAllowed:i})=>{let[l,s]=(0,al.useState)(!1),u=N=>{N.stopPropagation(),s(!l)},[f,d]=(0,al.useState)(""),[p,m]=(0,al.useState)(!1),[x,h]=(0,al.useState)(0),[g,T]=(0,al.useState)(10),[E,R]=(0,al.useState)("updated_at desc"),{data:k}=o({workspaceId:e,page:x,pageSize:g,search:f,order:E}),{width:D}=Xo(),C=(0,b.useTheme)(),[v]=a(),P=[{name:"id",label:"ID",options:{filter:!1,customBodyRender:N=>(0,Xe.jsx)(Aa,{value:N,maxLength:10})}},{name:"name",label:"Name",options:{filter:!1,sort:!0,searchable:!0,customBodyRender:N=>(0,Xe.jsx)(Aa,{value:N,maxLength:10})}},{name:"organization_id",label:"Organization ID",options:{filter:!1,sort:!1,searchable:!1}},{name:"description",label:"Description",options:{filter:!1,sort:!0,searchable:!0,customBodyRender:N=>(0,Xe.jsx)(FSe,{value:N})}},{name:"created_at",label:"Created At",options:{filter:!1,sort:!0,searchable:!0,setCellHeaderProps:()=>({align:"center"})}},{name:"updated_at",label:"Updated At",options:{filter:!1,sort:!0,searchable:!0,setCellHeaderProps:()=>({align:"center"})}},{name:"actions",label:"Actions",options:{filter:!1,sort:!1,searchable:!1,customBodyRender:(N,L)=>(0,Xe.jsx)(Ho,{disabled:!r,children:(0,Xe.jsx)(zt,{id:`delete_team-${L.rowIndex}`,title:"Remove Environment",onClick:()=>{r&&v({workspaceId:e,environmentId:L.rowData[0]})},iconType:"delete",children:(0,Xe.jsx)(co,{height:28,width:28,fill:C.palette.icon.default})})})}}],B=w4({workspaceId:e,useGetEnvironmentsOfWorkspaceQuery:o,useUnassignEnvironmentFromWorkspaceMutation:a,useAssignEnvironmentToWorkspaceMutation:n,isEnvironmentsVisible:i||r}),[_,J]=(0,al.useState)(()=>{let N=Jo(U$,D),L={};return P.forEach(M=>{L[M.name]=N[M.name]}),L}),X={filter:!1,responsive:"standard",selectableRows:"none",count:k?.total_count,rowsPerPage:g,page:x,elevation:0,sortOrder:{name:E.split(" ")[0],direction:E.split(" ")[1]},serverSide:!0,onTableChange:(N,L)=>{let M=L.announceText?L.announceText.split(" : "):[],F="";switch(L.activeColumn&&(F=`${P[L.activeColumn].name} desc`),N){case"changePage":h(L.page);break;case"changeRowsPerPage":T(L.rowsPerPage);break;case"search":d(L.searchText!==null?L.searchText:"");break;case"sort":M.length==2&&(M[1]==="ascending"?F=`${P[L.activeColumn].name} asc`:F=`${P[L.activeColumn].name} desc`),F!==E&&R(F);break}}},[H,q]=(0,al.useState)(P);return(0,Xe.jsxs)(Xe.Fragment,{children:[(0,Xe.jsxs)(l2,{expanded:l,onChange:u,style:{margin:0},children:[(0,Xe.jsx)(u2,{expandIcon:(0,Xe.jsx)(Ko,{}),sx:{backgroundColor:"background.paper"},children:(0,Xe.jsxs)(hs,{children:[(0,Xe.jsx)(z,{variant:"body1",fontWeight:"bold",children:"Assigned Environments"}),(0,Xe.jsxs)(b3,{children:[(0,Xe.jsx)(Kn,{onSearch:N=>{d(N)},onClear:()=>{d("")},expanded:p,setExpanded:m,placeholder:"Search workspaces..."}),(0,Xe.jsx)(ln,{columns:P,customToolsProps:{columnVisibility:_,setColumnVisibility:J},id:"environments-table"}),(0,Xe.jsx)($n,{onClick:B.handleAssignModal,disabled:!i,title:"Assign Environments"})]})]})}),(0,Xe.jsx)(s2,{style:{padding:0},children:(0,Xe.jsx)(Vo,{columns:P,data:k?.environments,options:X,colViews:U$,tableCols:H,updateCols:q,columnVisibility:_})})]}),(0,Xe.jsx)(ri,{open:B.assignModal,onClose:B.handleAssignModalClose,title:`Assign Environments to ${t}`,headerIcon:(0,Xe.jsx)(In,{height:"40",width:"40",fill:"white"}),name:"Environments",assignableData:B.data,handleAssignedData:B.handleAssignData,originalAssignedData:B.workspaceData,emptyStateIcon:(0,Xe.jsx)(In,{height:"5rem",width:"5rem",fill:"#808080"}),handleAssignablePage:B.handleAssignablePage,handleAssignedPage:B.handleAssignedPage,originalLeftCount:B.data?.length||0,originalRightCount:k?.total_count||0,onAssign:B.handleAssign,disableTransfer:B.disableTransferButton,helpText:`Assign Environments to ${t}`,isAssignAllowed:i,isRemoveAllowed:r})]})},W$=NSe;var Pp=require("@mui/material");var wr=require("react/jsx-runtime"),Hc=({title:e,count:t,onAssign:r,disabled:o})=>{let a=(0,b.useTheme)();return(0,wr.jsx)(WC,{onClick:r,disabled:o,color:"primary",sx:{color:a.palette.background.neutral?.default,backgroundColor:a.palette.background.constant?.table,margin:"0px 0px 10px",padding:"20px 10px","&:hover":{backgroundColor:a.palette.background.constant?.table,boxShadow:"none"}},children:(0,wr.jsxs)(ce,{children:[(0,wr.jsx)(GC,{textColor:a.palette.text.default,children:t}),(0,wr.jsx)(qC,{textColor:a.palette.text.default,children:e}),(0,wr.jsx)(o6,{sx:{position:"absolute",top:"10px",right:"10px"}})]})})},nl=({title:e,count:t,disabled:r=!0})=>(0,wr.jsx)(WC,{disabled:r,color:"primary",sx:{boxShadow:"none"},children:(0,wr.jsxs)(ce,{children:[(0,wr.jsx)(GC,{children:t}),(0,wr.jsx)(qC,{children:e})]})}),q$=({title:e,name:t,date:r})=>{let o=(0,b.useTheme)();return(0,wr.jsxs)(oG,{children:[(0,wr.jsxs)(ce,{sx:{display:"flex",maxHeight:"140px"},size:10,children:[(0,wr.jsx)(z,{sx:{fontSize:14,textAlign:"left",color:o.palette.background.constant?.white,maxWidth:"max-content",overflowX:"hidden"},children:e}),(0,wr.jsx)(z,{sx:{marginInline:"0.5rem",fontStyle:"italic",color:o.palette.background.brand?.default,textWrap:"nowrap"},children:t})]}),(0,wr.jsx)(ce,{sx:{display:"flex",justifyContent:"flex-end"},size:2,children:(0,wr.jsx)(xe,{title:r?fs(r):"",placement:"top",children:(0,wr.jsx)("div",{children:(0,wr.jsx)(z,{sx:{fontSize:14,fontStyle:"italic",color:`${o.palette.text.disabled}`,paddingRight:"12px",textAlign:"end"},children:r?Wi(r):"-"})})})})]})};var Se=require("react/jsx-runtime"),BSe=({workspaceDetails:e,onDelete:t,onEdit:r,onSelect:o,selectedWorkspaces:a,onAssignTeam:n,onAssignEnvironment:i,onAssignDesign:l,recentActivities:s,onFlip:u,onFlipBack:f,loadingEvents:d,teamsOfWorkspaceCount:p,environmentsOfWorkspaceCount:m,designAndViewOfWorkspaceCount:x,isEnvironmentAllowed:h,isTeamAllowed:g,isDesignAllowed:T,isViewAllowed:E,isDeleteWorkspaceAllowed:R,isEditWorkspaceAllowed:k,isViewsVisible:D,isDesignsVisible:C,isEnvironmentsVisible:v,isTeamsVisible:P})=>{let B=e.deleted_at.Valid;return(0,Se.jsxs)(Nm,{disableFlip:!!a.includes(e.id),padding:"0",children:[(0,Se.jsx)(HSe,{onFlip:u,name:e?.name,description:e?.description,environmentsCount:m,onAssignEnvironment:i,teamsCount:p,onAssignTeam:n,designAndViewOfWorkspaceCount:x,onAssignDesign:l,isEnvironmentAllowed:h,isTeamAllowed:g,isDesignAllowed:T,isViewAllowed:E,isViewsVisible:D,isDesignsVisible:C,isEnvironmentsVisible:v,isTeamsVisible:P}),(0,Se.jsx)(VSe,{onFlipBack:f,onSelect:o,name:e?.name,onEdit:r,onDelete:t,selectedWorkspaces:a,workspaceId:e?.id,loadingEvents:d,recentActivities:s,updatedDate:e?.updated_at,createdDate:e?.created_at,deleted:B,isDeleteWorkspaceAllowed:R,isEditWorkspaceAllowed:k})]})},G$=BSe,HSe=({onFlip:e,name:t,description:r,environmentsCount:o,onAssignEnvironment:a,teamsCount:n,onAssignTeam:i,designAndViewOfWorkspaceCount:l,onAssignDesign:s,isEnvironmentAllowed:u,isTeamAllowed:f,isDesignAllowed:d,isViewAllowed:p,isViewsVisible:m,isDesignsVisible:x,isEnvironmentsVisible:h,isTeamsVisible:g})=>(0,Se.jsxs)(lG,{elevation:2,onClick:e,children:[(0,Se.jsx)(aG,{children:(0,Se.jsx)(HC,{variant:"body2",onClick:T=>T.stopPropagation(),children:t})}),(0,Se.jsx)(Pp.Grid2,{children:r?(0,Se.jsx)(rG,{onClick:T=>T.stopPropagation(),sx:{maxHeight:"105px"},children:r}):(0,Se.jsx)(UC,{onClick:T=>T.stopPropagation(),children:"No description"})}),(0,Se.jsxs)(Pp.Grid2,{sx:{display:"flex",flexDirection:{xs:"column",sm:"row"},pt:{xs:1,md:2},gap:1},children:[h&&(0,Se.jsx)($m,{children:(0,Se.jsxs)(Km,{onClick:T=>T.stopPropagation(),children:[u?(0,Se.jsx)(Hc,{title:"Environments",count:o,onAssign:a,disabled:!u}):(0,Se.jsx)(nl,{title:"Environment",count:o}),(0,Se.jsx)(nl,{title:"Connections",count:0})]})}),g&&(0,Se.jsx)($m,{children:(0,Se.jsxs)(Km,{onClick:T=>T.stopPropagation(),children:[f?(0,Se.jsx)(Hc,{title:"Teams",count:n,onAssign:i,disabled:!f}):(0,Se.jsx)(nl,{title:"Teams",count:n}),(0,Se.jsx)(nl,{title:"Users",count:0})]})}),x&&!m&&(0,Se.jsx)($m,{children:(0,Se.jsxs)(Km,{onClick:T=>T.stopPropagation(),children:[d?(0,Se.jsx)(Hc,{title:"Designs",count:l,onAssign:s,disabled:!d}):(0,Se.jsx)(nl,{title:"Designs",count:l}),(0,Se.jsx)(nl,{title:"Deploys",count:0})]})}),x&&m&&(0,Se.jsx)($m,{children:(0,Se.jsxs)(Km,{onClick:T=>T.stopPropagation(),children:[d&&p?(0,Se.jsx)(Hc,{title:"Designs/Views",count:l,onAssign:s,disabled:!(d&&p)}):(0,Se.jsx)(nl,{title:"Designs/Views",count:l}),(0,Se.jsx)(nl,{title:"Deploys",count:0})]})})]})]}),VSe=({onFlipBack:e,onSelect:t,name:r,onEdit:o,onDelete:a,selectedWorkspaces:n,workspaceId:i,loadingEvents:l,recentActivities:s,updatedDate:u,createdDate:f,deleted:d,isDeleteWorkspaceAllowed:p,isEditWorkspaceAllowed:m})=>{let x=n?.includes(i),h=x?!0:!m,g=x?!0:!p,T=(0,Pp.useTheme)();return(0,Se.jsxs)(iG,{elevation:2,onClick:e,children:[(0,Se.jsxs)(sG,{size:12,children:[(0,Se.jsxs)(uG,{size:6,children:[(0,Se.jsx)(tG,{onClick:E=>E.stopPropagation(),onChange:t,disabled:d?!0:!p}),(0,Se.jsx)(HC,{sx:{color:T.palette.background.constant?.white},variant:"body2",onClick:E=>E.stopPropagation(),children:r})]}),(0,Se.jsxs)(fG,{size:6,children:[(0,Se.jsx)($n,{onClick:o,disabled:h,style:{fill:T.palette.background.constant?.white},bulk:!0}),(0,Se.jsx)(w3,{onClick:a,style:{fill:T.palette.background.constant?.white},disabled:g,bulk:!0})]})]}),(0,Se.jsx)(Pp.Grid2,{sx:{display:"flex",alignItems:"center",flexDirection:"row"},children:(0,Se.jsx)(dG,{variant:"body2",children:"Recent Activity"})}),(0,Se.jsx)(pG,{children:l?(0,Se.jsx)(Ff,{sx:{zIndex:"2010"},open:l,children:(0,Se.jsx)(Gt,{color:"inherit",style:{color:T.palette.background.constant?.white}})}):s?.map((E,R)=>(0,Se.jsx)(q$,{title:E?.description,name:E?.first_name,date:E?.created_at},R))}),(0,Se.jsxs)(mG,{size:12,children:[(0,Se.jsx)(zC,{size:6,children:(0,Se.jsxs)(VC,{onClick:E=>E.stopPropagation(),children:["Updated At: ",Wi(u)]})}),(0,Se.jsx)(zC,{size:6,children:(0,Se.jsxs)(VC,{onClick:E=>E.stopPropagation(),children:["Created At: ",Wi(f)]})})]})]})};var E4=require("react");var sr=require("react/jsx-runtime"),USe=(0,b.styled)(ci)({borderRadius:"8px"}),WSe=(0,b.styled)(z)(({theme:e})=>({marginBottom:"1rem",color:e.palette.text.secondary})),qSe=(0,b.styled)("div")(({theme:e})=>({padding:"1rem",textAlign:"center",color:e.palette.text.secondary,border:`1px dashed ${e.palette.border.strong}`,borderRadius:"8px",margin:"1rem 0",display:"flex",flexDirection:"column",alignItems:"center",gap:"1rem"})),GSe=(e,t,r)=>{let o=r?.length||1,a=t?.name||o,n=e===Kf.DESIGN?"Design":"View";return`Move ${a} ${n}${o>1?"s":""}`},zSe=({workspaceContentMoveModal:e,setWorkspaceContentMoveModal:t,currentWorkspace:r,type:o,selectedContent:a,refetch:n,useGetWorkspacesQuery:i,isCreateWorkspaceAllowed:l,isMoveDesignAllowed:s,isMoveViewAllowed:u,assignDesignToWorkspace:f,assignViewToWorkspace:d,WorkspaceModalContext:p,notify:m,router:x,currentOrgId:h})=>{let{setMultiSelectedContent:g,multiSelectedContent:T,closeModal:E}=(0,E4.useContext)(p),{data:R,isLoading:k}=i({page:0,pagesize:"all",order:"updated_at desc",orgID:h},{skip:!h}),D=R?.workspaces?.filter(J=>J.id!==r.id),[C,v]=(0,E4.useState)(null),P=async()=>{t(!1);try{let J=async H=>{await f({workspaceId:C.id,designId:H})},X=async H=>{await d({workspaceId:C.id,viewId:H})};Kf.DESIGN===o?(T.length>0&&(await Promise.all(T.map(H=>J(H.id))),g([])),a&&await J(a.id)):(T.length>0&&(await Promise.all(T.map(H=>X(H.id))),g([])),a&&await X(a.id)),n&&n(),m({message:`Successfully moved ${o===Kf.DESIGN?"design":"view"}${T.length>1?"s":""} to ${C.name}`,event_type:ET.SUCCESS})}catch{m({message:`Failed to move ${o===Kf.DESIGN?"design":"view"}. Please try again.`,event_type:ET.ERROR})}},B=()=>{E(),t(!1),x.push("/management/workspaces")},_=o===Kf.DESIGN?s:u;return(0,sr.jsxs)(Lr,{open:e,headerIcon:(0,sr.jsx)(a5,{}),closeModal:()=>t(!1),title:GSe(o,a,T),children:[(0,sr.jsxs)(Mr,{children:[(0,sr.jsxs)(WSe,{children:["Current Workspace: ",(0,sr.jsx)("strong",{children:r.name})]}),(0,sr.jsx)(ma,{}),(0,sr.jsx)($,{display:"flex",flexDirection:"column",marginTop:"1rem",children:k?(0,sr.jsx)(Gt,{size:24}):D?.length?(0,sr.jsxs)(sr.Fragment,{children:[(0,sr.jsx)(z,{style:{marginBottom:"0.5rem"},children:"Select destination workspace"}),(0,sr.jsx)(Zr,{children:D.map(J=>(0,sr.jsx)(USe,{selected:C?.id===J.id,onClick:()=>_&&v(J),disabled:!_,children:(0,sr.jsx)(Qt,{primary:J.name})},J.id))})]}):(0,sr.jsxs)(qSe,{children:[(0,sr.jsx)(z,{children:"No other workspaces available to move content to."}),(0,sr.jsx)(ke,{variant:"contained",color:"primary",onClick:B,disabled:!l,children:"Create Workspace"})]})})]}),(0,sr.jsx)(io,{variant:"filled",children:(0,sr.jsx)(Xd,{primaryText:"Move",secondaryText:"Cancel",primaryButtonProps:{onClick:P,disabled:k||!C||!D?.length||!_},secondaryButtonProps:{onClick:()=>t(!1)}})})]})},z$=zSe;var Vc=require("react/jsx-runtime"),jSe=({workspaceId:e,useAssignEnvironmentToWorkspaceMutation:t,useGetEnvironmentsOfWorkspaceQuery:r,useUnassignEnvironmentFromWorkspaceMutation:o,useNotificationHandlers:a,isAssignedEnvironmentAllowed:n})=>{let{handleSuccess:i,handleError:l}=a(),{data:s,isLoading:u}=r({workspaceId:e,page:0,pagesize:"all",filter:'{"assigned":false}'}),{data:f,isLoading:d}=r({workspaceId:e,page:0,pagesize:"all"}),p=s?.environments?.map(E=>({label:E.name,value:E.id}))||[],m=f?.environments?.map(E=>({label:E.name,value:E.id}))||[],[x]=t(),[h]=o(),g=(E,R)=>{let k=E.map(C=>C.value),D=R.map(C=>C.value);if(D.length>0){D.forEach(C=>{let v=f?.environments?.find(P=>P.id===C)?.name||"Unknown";h({workspaceId:e,environmentId:C}).unwrap().then(()=>i(`Environment "${v}" unassigned`)).catch(P=>l(`Environment "${v}" Unassign Error: ${P?.data}`))});return}if(k.length>0){k.forEach(C=>{if(m.find(P=>P.value===C))return;let v=s?.environments?.find(P=>P.id===C)?.name||"Unknown";x({workspaceId:e,environmentId:C}).unwrap().then(()=>i(`Environment "${v}" assigned`)).catch(P=>l(`Environment "${v}" Assign Error: ${P?.data}`))});return}};return(0,Vc.jsx)("div",{onClick:E=>E.stopPropagation(),style:{marginBlock:"1rem",maxWidth:"15rem"},children:(0,Vc.jsx)(f2,{multiple:!0,options:p,value:m,loading:u||d,onChange:(E,R)=>{let k=m||[],D=R||[],C=D.filter(P=>!k.some(B=>B.value===P.value)),v=k.filter(P=>!D.some(B=>B.value===P.value));g(C,v)},size:"small",disableCloseOnSelect:!0,getOptionLabel:E=>E.label,renderTags:E=>E.map(R=>(0,Vc.jsx)(Dt,{label:R.label,size:"small",style:{margin:"0.15rem",borderRadius:"0.2rem"},onDelete:()=>{h({workspaceId:e,environmentId:R.value})}},R.value)),renderInput:E=>(0,Vc.jsx)(Qr,{...E,placeholder:"Assigned Environment"}),popupIcon:null,disabled:!n})})},j$=jSe;var Ba=require("react");var Ne=require("react/jsx-runtime"),KSe=({workspaceId:e,workspaceName:t,open:r,handleClose:o,useGetEventsOfWorkspaceQuery:a})=>{let[n,i]=(0,Ba.useState)(0),l=25,[s,u]=(0,Ba.useState)([]),[f,d]=(0,Ba.useState)(!0),p=(0,Ba.useRef)(null),m=(0,Ba.useRef)(null),{data:x,isLoading:h,isFetching:g}=a({workspaceId:e,page:n,pagesize:l},{skip:!r});(0,Ba.useEffect)(()=>{x&&(u(n===0?x.data:k=>[...k,...x.data]),d((x.page+1)*l<x.total_count))},[x,n,l]),(0,Ba.useEffect)(()=>{r&&(i(0),u([]),d(!0))},[r]);let T=(0,Ba.useCallback)(k=>{h||g||(p.current&&p.current.disconnect(),p.current=new IntersectionObserver(D=>{D[0].isIntersecting&&f&&i(C=>C+1)}),k&&p.current.observe(k))},[h,g,f]),E=(0,b.useTheme)(),R=k=>{switch(["design","view","environment","team"].find(v=>k.includes(v))){case"design":return(0,Ne.jsx)(Xa,{...$o});case"view":return(0,Ne.jsx)(u5,{...$o});case"environment":return(0,Ne.jsx)(In,{...$o,fill:E.palette.icon.default});case"team":return(0,Ne.jsx)(ru,{...$o,primaryFill:E.palette.icon.default,fill:""});default:return(0,Ne.jsx)(Od,{...$o,fill:E.palette.icon.default})}};return(0,Ne.jsx)(Ne.Fragment,{children:(0,Ne.jsxs)(Lr,{title:`"${t}" Recent Activity`,open:r,closeModal:o,headerIcon:(0,Ne.jsx)(pF,{}),maxWidth:"md",children:[(0,Ne.jsx)(Mr,{style:{maxHeight:"40rem"},children:n===0&&h?(0,Ne.jsx)($,{display:"flex",justifyContent:"center",padding:4,children:(0,Ne.jsx)(Gt,{})}):s.length>0?(0,Ne.jsxs)(Ne.Fragment,{children:[s.map((k,D)=>(0,Ne.jsxs)(Zr,{sx:{width:"100%",padding:"0"},children:[(0,Ne.jsxs)(Or,{style:{padding:"0"},alignItems:"flex-start",secondaryAction:(0,Ne.jsxs)($,{display:"flex",flexDirection:"column",alignItems:"flex-end",gap:.2,children:[R(k.description),(0,Ne.jsx)(xe,{title:fs(k.created_at),children:(0,Ne.jsx)("div",{children:(0,Ne.jsxs)(z,{variant:"caption",style:{display:"flex",alignItems:"center",fontStyle:"italic"},children:["Updated At: ",ds(k.created_at)]})})})]}),children:[(0,Ne.jsx)(Uf,{style:{minWidth:"0",marginTop:"0.75rem",marginRight:"1rem"},children:(0,Ne.jsx)(qt,{alt:k.first_name,src:k.avatar_url,sx:_d})}),(0,Ne.jsx)(Qt,{primary:k.first_name+" "+k.last_name,secondary:(0,Ne.jsx)(Ne.Fragment,{children:k.description})})]}),(0,Ne.jsx)(ma,{})]},`${k.created_at}-${k.description}-${D}`)),(0,Ne.jsx)("div",{ref:f?T:null,style:{height:"20px",width:"100%"}}),g&&(0,Ne.jsx)($,{display:"flex",justifyContent:"center",padding:2,ref:m,children:(0,Ne.jsx)(Gt,{size:24})}),!f&&s.length>0&&(0,Ne.jsx)(z,{variant:"body2",color:"textSecondary",style:{textAlign:"center"},children:"No more activities to load"})]}):(0,Ne.jsx)($,{display:"flex",justifyContent:"center",padding:4,children:(0,Ne.jsx)(z,{variant:"body2",color:"textSecondary",children:"No recent activity found for this workspace."})})}),(0,Ne.jsx)(io,{variant:"filled",children:(0,Ne.jsx)(Ne.Fragment,{})})]})})},K$=KSe;var Yu=require("react");var Ha=require("react");var $Se=({workspaceId:e,useGetTeamsOfWorkspaceQuery:t,useAssignTeamToWorkspaceMutation:r,useUnassignTeamFromWorkspaceMutation:o,isTeamsVisible:a})=>{let[n,i]=(0,Ha.useState)(0),[l,s]=(0,Ha.useState)([]),u=25,[f,d]=(0,Ha.useState)(0),[p,m]=(0,Ha.useState)([]),[x,h]=(0,Ha.useState)(!1),[g,T]=(0,Ha.useState)(!0),[E]=r(),[R]=o(),[k,D]=(0,Ha.useState)(!0),[C,v]=(0,Ha.useState)([]),{data:P}=t(br({workspaceId:e,page:n,pagesize:u,filter:'{"assigned":false}'}),{skip:g||!a}),{data:B}=t(br({workspaceId:e,page:f,pagesize:u}),{skip:g||!a});(0,Ha.useEffect)(()=>{let M=P?.teams?P.teams:[];s(F=>[...F,...M])},[P]),(0,Ha.useEffect)(()=>{let M=B?.teams?B.teams:[];m(F=>[...F,...M])},[B]);let _=M=>{M?.stopPropagation(),h(!0),T(!1)},J=M=>{M?.stopPropagation(),h(!1),T(!0)},X=()=>{let M=Math.ceil(Number(P?.total_count)/u);n<M-1&&i(F=>F+1)},H=()=>{let M=Math.ceil(Number(B?.total_count)/u);f<M-1&&d(F=>F+1)},q=()=>{let{addedTeamsIds:M,removedTeamsIds:F}=N(C);M.map(V=>E({workspaceId:e,teamId:V}).unwrap()),F.map(V=>R({workspaceId:e,teamId:V}).unwrap()),s([]),m([]),J()},N=M=>{let F=p.map(oe=>oe.id),V=M.map(oe=>oe.id),y=V.filter(oe=>!F.includes(oe)),ee=F.filter(oe=>!V.includes(oe));return{addedTeamsIds:y,removedTeamsIds:ee}};return{data:l,workspaceData:p,assignModal:x,handleAssignModal:_,handleAssignModalClose:J,handleAssignablePage:X,handleAssignedPage:H,handleAssign:q,handleAssignData:M=>{let{addedTeamsIds:F,removedTeamsIds:V}=N(M);F.length>0||V.length>0?D(!1):D(!0),v(M)},disableTransferButton:k,assignedItems:C}},R4=$Se;var Eo=require("react/jsx-runtime"),YSe=({workspaceId:e,workspaceName:t,useGetTeamsOfWorkspaceQuery:r,useAssignTeamToWorkspaceMutation:o,useUnassignTeamFromWorkspaceMutation:a,isEditTeamAllowed:n,isAssignTeamAllowed:i,isRemoveTeamFromWorkspaceAllowed:l,isLeaveTeamAllowed:s,isDeleteTeamAllowed:u,org_id:f,useGetUsersForOrgQuery:d,useNotificationHandlers:p,useRemoveUserFromTeamMutation:m})=>{let[x,h]=(0,Yu.useState)(0),[g,T]=(0,Yu.useState)(10),[E,R]=(0,Yu.useState)("updated_at desc"),[k,D]=(0,Yu.useState)(!1),[C,v]=(0,Yu.useState)(""),[P,B]=(0,Yu.useState)(!1),{data:_}=r({workspaceId:e,page:x,pageSize:g,order:E,search:C}),[J]=a(),X=R4({workspaceId:e,useGetTeamsOfWorkspaceQuery:r,useAssignTeamToWorkspaceMutation:o,useUnassignTeamFromWorkspaceMutation:a,isTeamsVisible:i||l}),H=L=>{J({workspaceId:e,teamId:L}).unwrap()},q=lp({teams:_?.teams,count:_?.total_count,page:x,pageSize:g,setPage:h,setPageSize:T,sortOrder:E,setSortOrder:R,bulkSelect:k,setBulkSelect:D,handleRemoveTeamFromWorkspace:H,handleTeamView:()=>{},handleDeleteTeam:()=>{},handleleaveTeam:()=>{},teamId:"",workspace:!0,isEditTeamAllowed:n,isLeaveTeamAllowed:s,isRemoveTeamFromWorkspaceAllowed:l,isDeleteTeamAllowed:u,setSearch:v}),N=(0,b.useTheme)();return(0,Eo.jsxs)(Eo.Fragment,{children:[(0,Eo.jsxs)(hs,{children:[(0,Eo.jsx)(ke,{variant:"contained",startIcon:(0,Eo.jsx)(cF,{}),onClick:X.handleAssignModal,style:{margin:"1rem"},children:"Assign Teams"}),(0,Eo.jsxs)(b3,{children:[(0,Eo.jsx)(Kn,{onSearch:L=>{v(L)},onClear:()=>{v("")},expanded:P,setExpanded:B,placeholder:"Search workspaces..."}),(0,Eo.jsx)(ln,{columns:q.columns,customToolsProps:{columnVisibility:q.columnVisibility,setColumnVisibility:q.setColumnVisibility},id:"teams-table"})]})]}),(0,Eo.jsx)(Zm,{teams:_?.teams,tableOptions:q.tableOptions,columnVisibility:q.columnVisibility,colViews:q.colViews,tableCols:q.tableCols,updateCols:q.updateCols,columns:q.columns,isRemoveFromTeamAllowed:l,org_id:f,useGetUsersForOrgQuery:d,useNotificationHandlers:p,useRemoveUserFromTeamMutation:m}),(0,Eo.jsx)(ri,{open:X.assignModal,onClose:X.handleAssignModalClose,title:`Assign Teams to ${t}`,headerIcon:(0,Eo.jsx)(ru,{height:"40",width:"40",primaryFill:N.palette.common.white,fill:N.palette.icon.disabled}),name:"Teams",assignableData:X.data,handleAssignedData:X.handleAssignData,originalAssignedData:X.workspaceData,emptyStateIcon:(0,Eo.jsx)(ru,{height:"5rem",width:"5rem",primaryFill:"#808080",secondaryFill:N.palette.icon.disabled,fill:"#808080"}),handleAssignablePage:X.handleAssignablePage,handleAssignedPage:X.handleAssignedPage,originalLeftCount:X.data?.length||0,originalRightCount:_?.total_count||0,onAssign:X.handleAssign,disableTransfer:X.disableTransferButton,helpText:`Assign Teams to ${t}`,isAssignAllowed:i,isRemoveAllowed:l})]})},$$=YSe;var Is=require("react");var Va=require("react");var ZSe=({workspaceId:e,useGetViewsOfWorkspaceQuery:t,useAssignViewToWorkspaceMutation:r,useUnassignViewFromWorkspaceMutation:o,isViewsVisible:a})=>{let[n,i]=(0,Va.useState)(0),[l,s]=(0,Va.useState)([]),u=25,[f,d]=(0,Va.useState)(0),[p,m]=(0,Va.useState)([]),[x,h]=(0,Va.useState)(!1),[g,T]=(0,Va.useState)(!0),[E,R]=(0,Va.useState)(!0),[k,D]=(0,Va.useState)([]),{data:C}=t(br({workspaceId:e,page:n,pagesize:u,filter:'{"assigned":false}'}),{skip:g||!a}),{data:v}=t(br({workspaceId:e,page:f,pagesize:u}),{skip:g||!a}),[P]=r(),[B]=o();(0,Va.useEffect)(()=>{let F=C?.views?C.views:[];s(V=>[...V,...F])},[C]),(0,Va.useEffect)(()=>{let F=v?.views?v.views:[];m(V=>[...V,...F])},[v]);let _=F=>{F?.stopPropagation(),h(!0),T(!1)},J=F=>{F?.stopPropagation(),h(!1),T(!0)},X=()=>{let F=Math.ceil(Number(C?.total_count)/u);n<F-1&&i(V=>V+1)},H=()=>{let F=Math.ceil(Number(v?.total_count)/u);f<F-1&&d(V=>V+1)},q=F=>{let V=p.map(O=>O.id),y=F.map(O=>O.id),ee=y.filter(O=>!V.includes(O)),oe=V.filter(O=>!y.includes(O));return{addedviewsIds:ee,removedviewsIds:oe}};return{data:l,workspaceData:p,assignModal:x,handleAssignModal:_,handleAssignModalClose:J,handleAssignablePage:X,handleAssignedPage:H,handleAssign:async()=>{let{addedviewsIds:F,removedviewsIds:V}=q(k);F.map(y=>P({workspaceId:e,viewId:y}).unwrap()),V.map(y=>B({workspaceId:e,viewId:y}).unwrap()),s([]),m([]),i(0),d(0),J()},isActivityOccurred:F=>{let{addedviewsIds:V,removedviewsIds:y}=q(F);return V.length>0||y.length>0},handleAssignData:F=>{let{addedviewsIds:V,removedviewsIds:y}=q(F);R(!(V.length>0||y.length>0)),D(F)},disableTransferButton:E,assignedItems:k}},O4=ZSe;var xr=require("react/jsx-runtime"),Y$=[["id","na"],["avatar_url","xs"],["email","na"],["name","xs"],["first_name","na"],["last_name","na"],["organization_id","xl"],["created_at","na"],["updated_at","xl"],["visibility","l"],["actions","xs"]];var QSe=({workspaceId:e,workspaceName:t,isRemoveAllowed:r,useGetViewsOfWorkspaceQuery:o,useUnassignViewFromWorkspaceMutation:a,useAssignViewToWorkspaceMutation:n,isAssignAllowed:i,handleShowDetails:l,handleVisibilityChange:s,currentUserId:u})=>{let f=(0,b.useTheme)(),[d,p]=(0,Is.useState)(""),[m,x]=(0,Is.useState)(!1),[h,g]=(0,Is.useState)(0),[T,E]=(0,Is.useState)(10),[R,k]=(0,Is.useState)("updated_at desc"),{data:D,refetch:C}=o({workspaceId:e,page:h,pagesize:T,search:d,order:R,expandUser:!0},{skip:!e}),{width:v}=Xo(),[P]=a(),B=[{name:"id",label:"ID",options:{filter:!1,customBodyRender:L=>(0,xr.jsx)(Aa,{value:L,maxLength:10})}},{name:"name",label:"Name",options:{filter:!1,sort:!0,searchable:!0,customBodyRender:(L,M)=>{let F=M.tableData[M.rowIndex]?.id??"",V=M.tableData[M.rowIndex]?.name??"";return(0,xr.jsx)(bp,{onClick:()=>l(F,V,cc.VIEW),children:L})}}},{name:"avatar_url",label:"Author",options:{filter:!1,sort:!1,searchable:!1,customBodyRender:(L,M)=>(0,xr.jsx)($,{sx:{"& > img":{mr:2,flexShrink:0}},children:(0,xr.jsx)(ku,{userId:((V,y,ee)=>{let oe=ee.findIndex(O=>O.name===y);return V[oe]})(M.rowData,"user_id",B),userName:`${M.rowData[4]} ${M.rowData[5]}`,userEmail:M.rowData[3],profileUrl:L})})}},{name:"email",label:"Email",options:{filter:!1,sort:!0,searchable:!0}},{name:"first_name",label:"First Name",options:{filter:!1,sort:!0,searchable:!0}},{name:"last_name",label:"Last Name",options:{filter:!1,sort:!0,searchable:!0}},{name:"created_at",label:"Created At",options:{filter:!1,sort:!0,searchable:!0,setCellHeaderProps:()=>({align:"center"})}},{name:"updated_at",label:"Updated At",options:{filter:!1,sort:!0,searchable:!0,setCellHeaderProps:()=>({align:"center"})}},{name:"visibility",label:"Visibility",options:{filter:!1,sort:!1,searchable:!0,customBodyRender:(L,M)=>{let F=M.rowIndex,V=M.tableData[F]?.id,y=M.tableData[F]?.visibility,oe=M.tableData[F]?.user_id===u,O=y!==dn.PUBLISHED&&oe;return(0,xr.jsx)($i,{value:L,onChange:Pe=>{s&&(s(V,Pe),C())},enabled:O,options:[[dn.PUBLIC,X1],[dn.PRIVATE,Q1]]})}}},{name:"actions",label:"Actions",options:{filter:!1,sort:!1,searchable:!1,customBodyRender:(L,M)=>(0,xr.jsx)(Ho,{disabled:!r,children:(0,xr.jsxs)(zt,{id:`delete_view-${M.rowIndex}`,title:"Move View",onClick:()=>{r&&P({workspaceId:e,viewId:M.rowData[0]})},iconType:"delete",children:[(0,xr.jsx)(IF,{style:{color:f?.palette.icon.default}})," "]})})}}],_=O4({workspaceId:e,useGetViewsOfWorkspaceQuery:o,useUnassignViewFromWorkspaceMutation:a,useAssignViewToWorkspaceMutation:n,isViewsVisible:i||r}),[J,X]=(0,Is.useState)(()=>{let L=Jo(Y$,v),M={};return B.forEach(F=>{M[F.name]=L[F.name]}),M}),H={filter:!1,responsive:"standard",selectableRows:"none",count:D?.total_count,rowsPerPage:T,serverSide:!0,page:h,elevation:0,sortOrder:{name:R.split(" ")[0],direction:R.split(" ")[1]},onTableChange:(L,M)=>{let F=M.announceText?M.announceText.split(" : "):[],V="";switch(M.activeColumn&&(V=`${B[M.activeColumn].name} desc`),L){case"changePage":g(M.page);break;case"changeRowsPerPage":E(M.rowsPerPage);break;case"sort":F.length==2&&(F[1]==="ascending"?V=`${B[M.activeColumn].name} asc`:V=`${B[M.activeColumn].name} desc`),V!==R&&k(V);break}}},[q,N]=(0,Is.useState)(B);return(0,xr.jsxs)(no,{children:[(0,xr.jsx)(hs,{style:{padding:"1rem"},children:(0,xr.jsxs)($,{style:{marginRight:"0rem",width:"100%",justifyContent:"end",display:"flex",alignItems:"center"},children:[(0,xr.jsx)(Kn,{onSearch:L=>{p(L)},onClear:()=>{p("")},expanded:m,setExpanded:x,placeholder:"Search workspaces..."}),(0,xr.jsx)(ln,{columns:B,customToolsProps:{columnVisibility:J,setColumnVisibility:X},id:"views-table"}),(0,xr.jsx)($n,{onClick:_.handleAssignModal,disabled:!i,title:"Assign Views"})]})}),(0,xr.jsx)(Vo,{columns:B,data:D?.views,options:H,colViews:Y$,tableCols:q,updateCols:N,columnVisibility:J}),(0,xr.jsx)(ri,{open:_.assignModal,onClose:_.handleAssignModalClose,title:`Assign Views to ${t}`,headerIcon:(0,xr.jsx)(In,{height:"40",width:"40",fill:"white"}),name:"Views",assignableData:_.data,handleAssignedData:_.handleAssignData,originalAssignedData:_.workspaceData,emptyStateIcon:(0,xr.jsx)(In,{height:"5rem",width:"5rem",fill:"#808080"}),handleAssignablePage:_.handleAssignablePage,handleAssignedPage:_.handleAssignedPage,originalLeftCount:_.data?.length||0,originalRightCount:D?.total_count||0,onAssign:_.handleAssign,disableTransfer:_.disableTransferButton,helpText:`Assign Views to ${t}`,isAssignAllowed:i,isRemoveAllowed:r})]})},Z$=QSe;var _p=require("react");var XSe={type:"subscribe_to_rooms_activity"},JSe="user_map",eCe=e=>e===xa?wT:e===MM?LM:e;function Q$(){return window.location.protocol==="https:"?"wss://":"ws://"}var tCe=e=>{let t=new URL(e),r=eCe(t.host);return`${r===wT?"wss://":Q$()}${r}/collaboration`},X$=async({provider_url:e,getUserProfile:t,getUserAccessToken:r})=>{let{data:o}=await t(),a=["user_info","user_left","user_joined","user_map"],{data:n}=await r(),i=async()=>(await r()).data;return{signalingUrl:[tCe(e)],user:o,authToken:n,refreshAuthToken:i,websocketCallbacks:a,peerOpts:{config:{iceServers:kM}}}},rCe=async(e,t,r,o,a)=>{if(!r||!o||!a){console.warn("Missing required parameters for subscription");return}try{let n=await X$({provider_url:r,getUserProfile:o,getUserAccessToken:a}),i=new WebSocket(n.signalingUrl[0],["auth",n.authToken]);e.current=i,i.addEventListener("open",()=>{console.log("[RoomActivity] connected to room activity"),i.readyState===WebSocket.OPEN&&i.send(JSON.stringify(XSe))}),i.addEventListener("message",l=>{console.log("[RoomActivity] new message",l);let s=JSON.parse(l.data);s.type===JSe&&s.user_map&&t(s.user_map)}),i.addEventListener("close",()=>{console.log("[RoomActivity] subscription to room activity closed")}),i.addEventListener("error",l=>{console.error("[RoomActivity] error in room activity subscription",l)})}catch(n){console.error("[RoomActivity] Failed to subscribe to room activity:",n)}},oCe=({provider_url:e,getUserProfile:t,getUserAccessToken:r}={})=>{let[o,a]=(0,_p.useState)({}),n=(0,_p.useRef)(null);return(0,_p.useEffect)(()=>{e&&t&&r&&rCe(n,a,e,t,r);let i=n.current;return()=>{i&&(console.log("closing websocket",i),i.close())}},[e,t,r]),[o,n]},aCe=(e,t)=>{e.readyState===WebSocket.OPEN&&e.send(JSON.stringify({type:"subscribe",topic:t}))},nCe=(e,t)=>{e.send(JSON.stringify({type:"unsubscribe",topic:t}))};var A4=G(require("lodash")),J$=Symbol("INVALID_REDUCER_PATH"),eY="REHYDRATE_STATE_ACTION",iCe=(e,t)=>({type:eY,payload:{reducerPath:e,inflatedState:t}}),lCe=(e,t)=>{if(t.type===eY){let r=A4.default.cloneDeep(e);return A4.default.set(r,t.payload.reducerPath.split("/"),t.payload.inflatedState),r}return e},sCe=e=>({persistMiddleware:a=>n=>i=>{let l=n(i),s=e[i.type];if(s){let u=a.getState();s.forEach(f=>{let d=f.split("/"),p=A4.default.get(u,d,J$);if(p===J$)throw new Error(`Reducer Path to Persist Is Invalid: ${f}`);localStorage.setItem(f,JSON.stringify(p))})}return l},createPersistEnhancedReducer:a=>(n,i)=>{let l=lCe(n,i);return a(l,i)},loadPersistedState:()=>a=>{Object.values(e).forEach(n=>{n.forEach(i=>{let l=localStorage.getItem(i);try{l&&(l=JSON.parse(l),a(iCe(i,l)))}catch{console.error(`Error rehydrating state for reducer ${i}`,l)}})})}});var Wc=require("react");var NY=G(P4()),BY=G(uY());var Cb=require("react-dom");function RCe(e){e()}var OCe=RCe,fY=e=>OCe=e;var bb=require("react");var mY=require("react");var Uc=G(require("react")),dY=Symbol.for("react-redux-context"),pY=typeof globalThis<"u"?globalThis:{};function ACe(){var e;if(!Uc.createContext)return{};let t=(e=pY[dY])!=null?e:pY[dY]=new Map,r=t.get(Uc.createContext);return r||(r=Uc.createContext(null),process.env.NODE_ENV!=="production"&&(r.displayName="ReactRedux"),t.set(Uc.createContext,r)),r}var Ua=ACe();function I4(e=Ua){return function(){let r=(0,mY.useContext)(e);if(process.env.NODE_ENV!=="production"&&!r)throw new Error("could not find react-redux context value; please ensure the component is wrapped in a <Provider>");return r}}var yb=I4();var k4=()=>{throw new Error("uSES not initialized!")};var PCe=k4,cY=e=>{PCe=e};var XCe=G(EY()),kp=G(require("react")),MY=G(PY());var kY=G(require("react")),HCt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";var JCe=k4,LY=e=>{JCe=e};var DY=G(require("react"));function J4(e=Ua){let t=e===Ua?yb:I4(e);return function(){let{store:o}=t();return o}}var kb=J4();function FY(e=Ua){let t=e===Ua?kb:J4(e);return function(){return t().dispatch}}var Mb=FY();cY(BY.useSyncExternalStoreWithSelector);LY(NY.useSyncExternalStore);fY(Cb.unstable_batchedUpdates);var eg=require("react/jsx-runtime"),eye=({children:e,loadPersistedState:t})=>{let[r,o]=(0,Wc.useState)(!0),[a,n]=(0,Wc.useState)(null),i=Mb();return(0,Wc.useEffect)(()=>{if(r){try{i(t())}catch(l){n(l)}o(!1)}},[r,i,t]),a&&console.error("Error Loading Persisted State",a),r?null:(0,eg.jsx)(eg.Fragment,{children:e})};0&&(module.exports={ALABASTER_WHITE,ALICE_BLUE,ANAKIWA,Accordion,AccordionActions,AccordionDetails,AccordionSummary,ActionButton,ActionButtonCard,ActionButtons,AddCircleIcon,AddIcon,Alert,AlertTitle,AppBar,ApplicationIcon,ArrowCompressIcon,ArrowExpandIcon,AssignmentModal,AuthorCell,Autocomplete,Avatar,AvatarGroup,BBChart,BLACK,Backdrop,Badge,BasicMarkdown,BellIcon,BookmarkNotification,Box,Breadcrumbs,BusIcon,Button,ButtonGroup,CARIBBEAN_GREEN,CASPER,CHARCOAL,CHINESE_SILVER,CONNECTED,CULTURED,CalenderIcon,Card,CardActions,CardContent,CardHeader,CardMedia,CaretDownIcon,Carousel,CatalogCard,CatalogCardDesignLogo,CatalogDesignsTable,CatalogFilter,CatalogFilterSidebar,CatalogIcon,CaveatsSection,ChainIcon,ChallengesIcon,ChallengesSection,ChapterCard,CheckCircleIcon,Checkbox,ChevronLeft,Chip,CircleIcon,CircularProgress,ClickAwayListener,CloneIcon,CloseBtn,CloseIcon,CloudSavedIcon,CodeFormatter,CollaboratorAvatarGroup,Collapse,CollapseAllIcon,CollapsibleSection,CollapsibleSectionFormatter,ColumnIcon,CommunityClassIcon,ComponentIcon,ConfigurationIcon,ConnectionChip,Container,ContainerFormatter,ContentFilterIcon,CopyIcon,CopyLinkIcon,CreateDesignModal,CreateNewIcon,CredentialIcon,CrossCircleIcon,CssBaseline,CustomCatalogCard,CustomColumnVisibilityControl,CustomDialog,CustomImage,CustomTooltip,CustomizedStepper,DARK_BLUE_GRAY,DARK_PRIMARY_COLOR,DARK_SHADE_GRAY,DARK_SLATE_GRAY,DARK_TEAL,DATA_VALIDATOR_COMMANDS,DATA_VALIDATOR_EVENTS,DELETED,DISCONNECTED,DISCOVERED,DashboardIcon,DataTableEllipsisMenu,DatabaseIcon,DeferEvents,DeleteIcon,DeploymentsIcon,DesignCard,DesignIcon,DesignTable,DesignerBottomRightIcon,DetailIcon,DetailsIcon,Dialog,DialogActions,DialogContent,DialogContentText,DialogTitle,Divider,DocumentIcon,DoneAllIcon,DoneIcon,DownloadIcon,DragIcon,Drawer,DropDownIcon,EERIE_BLACK,EditIcon,EmptyState,EmptyStateCard,EmptyStyleIcon,EnvironmentIcon,EnvironmentTable,ErrorBoundary,ErrorIcon,EventBus,ExpandAllIcon,ExportIcon,ExternalLinkIcon,Fab,FacebookIcon,Fade,Fallback,FavoriteIcon,FeedbackButton,FeedbackIcon,FileIcon,FilterIcon,FlipCard,FormControl,FormControlLabel,FormGroup,FormLabel,FormatId,FormattedTime,FullScreenIcon,FullScreenIconExit,GRAY,GRAY97,GREEN,GetStartedIcon,GetStartedModal,GithubIcon,GoogleIcon,Grid,Grid2,GridViewIcon,Grow,HelpOutlinedIcon,Hidden,IGNORED,IconButton,IdeaIcon,InfoCircleIcon,InfoIcon,InfoOutlined,InfoTooltip,Input,InputAdornment,InputBase,InputLabel,InputSearchField,InsertChartIcon,InviteUserIcon,JourneyModal,KEPPEL,KanvasIcon,KeppelApplicationIcon,KeppelRectangleIcon,KeppelTallRoundedRectangleIcon,KeyValueInRow,KubernetesIcon,L5DeleteIcon,L5EditIcon,LIGHT_GRAY,LIGHT_TEAL,LIMED_SPRUCE,LabelFormatter,LeaderBoardIcon,LearningCard,LearningContent,LearningIcon,LearningSection,LeftAngledArrowIcon,LeftArrowIcon,LeftPanel,LinearProgress,Link,LinkedinIcon,List,ListFormatter,ListItem,ListItemAvatar,ListItemButton,ListItemIcon,ListItemSecondaryAction,ListItemText,ListSubheader,LockIcon,LogoutIcon,MAINTAINENCE,MIDNIGHT_BLACK,MemoryUsage,MendeleyIcon,Menu,MenuIcon,MenuItem,MenuList,MesheryFilterIcon,MesheryOperator,MetricsDisplay,Modal,ModalBody,ModalButtonDanger,ModalButtonPrimary,ModalButtonSecondary,ModalButtonTertiary,ModalCard,ModalFooter,ModalStyledHeader,MoveFileIcon,NOT_FOUND,NativeSelect,NavigationNavbar,NoSsr,Note,NumberState,NumberStateFormatter,ONYX_BLACK,OfficialClassIcon,OpenFileIcon,OpenIcon,OpenInNewIcon,OpenLeaderBoardButton,OperatorDataFormatter,OperatorDynamicFormatter,OrgIcon,OutlinedApplicationIcon,OutlinedCircleIcon,OutlinedCloudSavingIcon,OutlinedDataObjectIcon,OutlinedDeployIcon,OutlinedDoubleChevronIcon,OutlinedHierarchicalIcon,OutlinedInput,OutlinedMeshIcon,OutlinedPatternIcon,OutlinedPatternSwitchIcon,OutlinedPodIcon,OutlinedRectangleIcon,OutlinedRedoIcon,OutlinedResetIcon,OutlinedRingIcon,OutlinedScreenshotIcon,OutlinedSettingsIcon,OutlinedStarIcon,OutlinedTallRoundedRectangleIcon,OutlinedUndeployIcon,OutlinedUndoIcon,OutlinedValidateIcon,OutlinedVisibilityOffIcon,OutlinedVisibilityOnIcon,OutlinedVisualizerSwitcherIcon,OverviewSection,PATTERNS_BLUE,PRIMARY_COLOR,PROMPT_VARIANTS,Pagination,PaginationItem,PanToolIcon,Panel,Paper,PatternInfo,PerformersSection,PerformersSectionButton,PersistedStateProvider,PersonIcon,PlainCard,PollIcon,Popover,Popper,PopperListener,PrimaryActionButtons,PromptComponent,PublicIcon,PublishIcon,QuestionIcon,REDUX_COMMANDS,REDUX_EVENTS,REEE,REGISTERED,RTK_EVENTS,Radio,RadioGroup,ReadIcon,RectangleIcon,RelatedDesigns,RemoveDoneIcon,RemoveIcon,RenderMarkdown,ResponsiveDataTable,RightArrowIcon,RightPanel,RoundedRectangleShapeIcon,RoundedTriangleShapeIcon,SAFFRON,SILVER_GRAY,SLATE_BLUE,SMPIcon,SaveAsIcon,SearchBar,SearchIcon,SecretFormatter,Select,SetupPreReq,ShareIcon,ShareLineIcon,ShareModal,SistentThemeProvider,SistentThemeProviderWithoutBaseLine,Skeleton,Slide,Slider,Snackbar,SocialSharePopper,SpeedDial,SpeedDialAction,Stack,StatusFormatter,Step,StepButton,StepConnector,StepContent,StepIcon,StepLabel,Stepper,StyledChapter,StyledChartDialog,StyledDialogActions,StyledDialogContent,StyledDialogTitle,StyledMarkdown,StyledSearchBar,SuccessIcon,SvgIcon,Switch,TEAL_BLUE,TOC,TOCLearning,TRANSPARENT_WHITE,Tab,Table,TableBody,TableCell,TableContainer,TableDataFormatter,TableHead,TableRow,TableSortLabel,TableViewIcon,TableVisibilityControl,Tabs,TachographDigitalIcon,TachometerIcon,TallRoundedRectangleIcon,TeamSearchField,TeamTable,TeamTableConfiguration,TeamsIcon,TechnologySection,Terminal,TerminalIcon,TextField,TextWithLinkFormatter,ThemeProvider,ToggleButton,ToggleButtonGroup,Toolbar,ToolkitIcon,Tooltip,TooltipIcon,TouchAppIcon,TransferList,TriangleIcon,TropyIcon,TwitterIcon,Typography,UniversalFilter,UserInfo,UserInviteModal,UserSearchField,UserShareSearch,UserTableAvatarInfo,UsersTable,VerificationClassIcon,ViewIcon,ViewSwitch,VisibilityChipMenu,WHITE,WHITESMOKE,WarningIcon,WorkspaceActivityCard,WorkspaceCard,WorkspaceContentMoveModal,WorkspaceEnvironmentSelection,WorkspaceIcon,WorkspaceRecentActivityModal,WorkspaceTeamsTable,WorkspaceViewsTable,XSTATE_DEBUG_EVENT,YELLOW_SEA,Zoom,accentGrey,actionIcon,alpha,anakiwa,black,blue,buttonDelete,buttonDisabled,carribean,casper,charcoal,colViews,colors,common,componentIcon,connected,convertToReadableUnit,createAndEditEnvironmentSchema,createAndEditEnvironmentUiSchema,createAndEditWorkspaceSchema,createAndEditWorkspaceUiSchema,createCanShow,createDesignColumns,createDesignsColumnsConfig,createTheme,cultured,darkModePalette,darkSlateGray,darkTeal,dataValidatorCommands,dataValidatorEvents,dataValidatorMachine,deadLetter,designColumnsColViews,eerieBlack,extractPodVolumnTables,forwardToActors,fromWorkerfiedActor,getCollaborationConfig,getFormatDate,getFullFormattedTime,getRelativeTime,getWebSocketProtocol,grafanaCredentialSUiSchema,grafanaCredentialSchema,gray,green,helmConnectionSchema,helmConnectionUiSchema,helpAndSupportModalSchema,helpAndSupportModalUiSchema,importDesignSchema,importDesignUiSchema,importFilterSchema,importFilterUiSchema,importModelSchema,importModelUiSchema,initReduxPersist,jungleGreen,keppel,keyframes,kubernetesCredentialSchema,kubernetesCredentialUiSchema,lightModePalette,lighten,notificationColors,outlinedInputClasses,patternsBlue,primaryColor,prometheusCredentialSchema,prometheusCredentialUiSchema,publishCatalogItemSchema,publishCatalogItemUiSchema,red,redDelete,reduxActor,reduxCommands,reduxEvents,reply,rtkQueryActor,rtkQueryActorCommands,rtkQueryActorEvents,saffron,selectIsValidating,selectValidationResults,sendToActor,sendToActors,slateGray,socialIcons,splitCamelCaseString,stepConnectorClasses,styled,subscribeToRoom,tabMenu,tableBackgroundHover,tooltipClasses,typography,unSubscribeRoom,updateVisibleColumns,useDesignAssignment,useEnvironmentAssignment,useMediaQuery,useModal,useNotificationHandler,useResourceCleanData,useRoomActivity,useStepper,useTeamAssignment,useTheme,useViewAssignment,useWindowDimensions,white,withErrorBoundary,withSuppressedErrorBoundary,workerfyActor,yellow});
|
|
98
98
|
/*! Bundled license information:
|
|
99
99
|
|
|
100
100
|
is-buffer/index.js:
|