@minecraft-docker/mcctl-console 2.13.0 → 2.15.0
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/.next/standalone/platform/services/mcctl-console/.next/BUILD_ID +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/app-build-manifest.json +70 -69
- package/.next/standalone/platform/services/mcctl-console/.next/app-path-routes-manifest.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/build-manifest.json +4 -4
- package/.next/standalone/platform/services/mcctl-console/.next/prerender-manifest.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/routes-manifest.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/admin/users/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/audit-logs/page.js +5 -5
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/audit-logs/page.js.nft.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/audit-logs/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/backups/page.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/backups/page.js.nft.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/backups/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/dashboard/page.js +4 -4
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/dashboard/page.js.nft.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/dashboard/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/players/page.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/players/page.js.nft.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/players/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/routing/page.js +5 -5
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/routing/page.js.nft.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/routing/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/[name]/console/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/[name]/page.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/[name]/page.js.nft.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/[name]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/page.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/page.js.nft.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/settings/page.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/settings/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/worlds/page.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/worlds/page.js.nft.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/worlds/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/_not-found.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/_not-found.rsc +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/backup/schedules/[id]/route.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/backup/schedules/[id]/route.js.nft.json +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/backup/schedules/[id]/toggle/route.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/backup/schedules/[id]/toggle/route.js.nft.json +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/backup/schedules/route.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/backup/schedules/route.js.nft.json +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/mods/projects/route.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/mods/projects/route.js.nft.json +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/audit-logs.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/audit-logs.rsc +3 -3
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/backups.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/backups.rsc +3 -3
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/dashboard.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/dashboard.rsc +3 -3
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/index.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/index.rsc +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/login.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/login.rsc +2 -2
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/players.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/players.rsc +3 -3
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/routing.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/routing.rsc +3 -3
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/servers.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/servers.rsc +3 -3
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/settings.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/settings.rsc +3 -3
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/signup/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/signup.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/signup.rsc +2 -2
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/worlds.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/worlds.rsc +3 -3
- package/.next/standalone/platform/services/mcctl-console/.next/server/app-paths-manifest.json +21 -17
- package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/1309.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/354.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/4151.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/5843.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/7573.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/7879.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/8243.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/middleware-build-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/middleware-manifest.json +5 -5
- package/.next/standalone/platform/services/mcctl-console/.next/server/pages/404.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/pages/500.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/pages-manifest.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/server-reference-manifest.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/1002-c53deedf30706db3.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/140-c12e00f0de7cd7be.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/2476-4fff0814e9d341f8.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/2666-0ffcaa56248fa87e.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/3938-b55cb95203c34832.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/4219-4ac199a28917d787.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/423-766c202217f701c0.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/admin/users/page-cc0c71dc0e6631fb.js +1 -0
- package/.next/{static/chunks/app/(main)/audit-logs/page-ed76baece1cfa0be.js → standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/audit-logs/page-58b3d20be5540dd0.js} +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/backups/page-bd084d0163678e15.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/{layout-46198c04ba71ec0e.js → layout-9822cba515754d43.js} +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/players/{page-17fac813cd35d4ca.js → page-d3e8734d942f5fea.js} +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/routing/{page-f430d126cc21547c.js → page-8e36e2c23d9a62c2.js} +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/servers/[name]/page-8eda8c4709976b6a.js +1 -0
- package/.next/{static/chunks/app/(main)/servers/page-5286112dc6e93885.js → standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/servers/page-35a24570b3f06f3b.js} +1 -1
- package/.next/{static/chunks/app/(main)/settings/page-dd38d40e3e0257a8.js → standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/settings/page-9e447db7e4f551c2.js} +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/worlds/{page-874ad606cffc439d.js → page-66e7e55928f43f54.js} +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/login/page-913fdb0c7c3e7114.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/signup/page-4fe85a21b5914e70.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/{main-58b18a5a50224bc7.js → main-63101811e3f573cc.js} +1 -1
- package/.next/static/chunks/1002-c53deedf30706db3.js +1 -0
- package/.next/static/chunks/140-c12e00f0de7cd7be.js +1 -0
- package/.next/static/chunks/2476-4fff0814e9d341f8.js +1 -0
- package/.next/static/chunks/2666-0ffcaa56248fa87e.js +1 -0
- package/.next/static/chunks/3938-b55cb95203c34832.js +1 -0
- package/.next/static/chunks/4219-4ac199a28917d787.js +1 -0
- package/.next/static/chunks/423-766c202217f701c0.js +1 -0
- package/.next/static/chunks/app/(main)/admin/users/page-cc0c71dc0e6631fb.js +1 -0
- package/.next/{standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/audit-logs/page-ed76baece1cfa0be.js → static/chunks/app/(main)/audit-logs/page-58b3d20be5540dd0.js} +1 -1
- package/.next/static/chunks/app/(main)/backups/page-bd084d0163678e15.js +1 -0
- package/.next/static/chunks/app/(main)/{layout-46198c04ba71ec0e.js → layout-9822cba515754d43.js} +1 -1
- package/.next/static/chunks/app/(main)/players/{page-17fac813cd35d4ca.js → page-d3e8734d942f5fea.js} +1 -1
- package/.next/static/chunks/app/(main)/routing/{page-f430d126cc21547c.js → page-8e36e2c23d9a62c2.js} +1 -1
- package/.next/static/chunks/app/(main)/servers/[name]/page-8eda8c4709976b6a.js +1 -0
- package/.next/{standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/servers/page-5286112dc6e93885.js → static/chunks/app/(main)/servers/page-35a24570b3f06f3b.js} +1 -1
- package/.next/{standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/settings/page-dd38d40e3e0257a8.js → static/chunks/app/(main)/settings/page-9e447db7e4f551c2.js} +1 -1
- package/.next/static/chunks/app/(main)/worlds/{page-874ad606cffc439d.js → page-66e7e55928f43f54.js} +1 -1
- package/.next/static/chunks/app/login/page-913fdb0c7c3e7114.js +1 -0
- package/.next/static/chunks/app/signup/page-4fe85a21b5914e70.js +1 -0
- package/.next/static/chunks/{main-58b18a5a50224bc7.js → main-63101811e3f573cc.js} +1 -1
- package/package.json +2 -2
- package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/1088.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/2650.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/1002-a00b243cef6b3efd.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/140-25eb9312925d8fea.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/2666-060d67b8e56af9d0.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/4219-26d64443218aac0b.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/6918-a51d55370b6c7caa.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/880-be7151cc9c502be6.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/8854-b34262a2493987c4.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/admin/users/page-b3a3231f2ddc0371.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/backups/page-47c96f8f36c1c1a3.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/servers/[name]/page-647b5155bd114dd7.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/login/page-05a2cf46a8784859.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/signup/page-df2a4f73aae39ef2.js +0 -1
- package/.next/static/chunks/1002-a00b243cef6b3efd.js +0 -1
- package/.next/static/chunks/140-25eb9312925d8fea.js +0 -1
- package/.next/static/chunks/2666-060d67b8e56af9d0.js +0 -1
- package/.next/static/chunks/4219-26d64443218aac0b.js +0 -1
- package/.next/static/chunks/6918-a51d55370b6c7caa.js +0 -1
- package/.next/static/chunks/880-be7151cc9c502be6.js +0 -1
- package/.next/static/chunks/8854-b34262a2493987c4.js +0 -1
- package/.next/static/chunks/app/(main)/admin/users/page-b3a3231f2ddc0371.js +0 -1
- package/.next/static/chunks/app/(main)/backups/page-47c96f8f36c1c1a3.js +0 -1
- package/.next/static/chunks/app/(main)/servers/[name]/page-647b5155bd114dd7.js +0 -1
- package/.next/static/chunks/app/login/page-05a2cf46a8784859.js +0 -1
- package/.next/static/chunks/app/signup/page-df2a4f73aae39ef2.js +0 -1
- /package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/{5498-b79f9cd3afa37253.js → 5498-096ebd4d2953f7f7.js} +0 -0
- /package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/dashboard/{page-378e9c3500c85120.js → page-11c6a90c8d27eb8d.js} +0 -0
- /package/.next/standalone/platform/services/mcctl-console/.next/static/{dfElxaC4ZAYixopXbzElA → pDxz0TbbzYPdWJWIkmR-v}/_buildManifest.js +0 -0
- /package/.next/standalone/platform/services/mcctl-console/.next/static/{dfElxaC4ZAYixopXbzElA → pDxz0TbbzYPdWJWIkmR-v}/_ssgManifest.js +0 -0
- /package/.next/static/chunks/{5498-b79f9cd3afa37253.js → 5498-096ebd4d2953f7f7.js} +0 -0
- /package/.next/static/chunks/app/(main)/dashboard/{page-378e9c3500c85120.js → page-11c6a90c8d27eb8d.js} +0 -0
- /package/.next/static/{dfElxaC4ZAYixopXbzElA → pDxz0TbbzYPdWJWIkmR-v}/_buildManifest.js +0 -0
- /package/.next/static/{dfElxaC4ZAYixopXbzElA → pDxz0TbbzYPdWJWIkmR-v}/_ssgManifest.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4219],{86702:function(e,t,r){r.d(t,{Z:function(){return k}});var o=r(32324),n=r(81500),a=r(35106),i=r(70316),s=r(65951),l=r(34519),c=r(28057),d=r(61626),u=r(94655),p=(0,d.Z)((0,u.jsx)("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}),"Person"),m=r(11379),v=r(9049);function f(e){return(0,v.ZP)("MuiAvatar",e)}(0,m.Z)("MuiAvatar",["root","colorDefault","circular","rounded","square","img","fallback"]);var y=r(3510);let g=["alt","children","className","component","slots","slotProps","imgProps","sizes","src","srcSet","variant"],h=e=>{let{classes:t,variant:r,colorDefault:o}=e;return(0,s.Z)({root:["root",r,o&&"colorDefault"],img:["img"],fallback:["fallback"]},f,t)},Z=(0,l.ZP)("div",{name:"MuiAvatar",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,t[r.variant],r.colorDefault&&t.colorDefault]}})(e=>{let{theme:t}=e;return{position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:40,height:40,fontFamily:t.typography.fontFamily,fontSize:t.typography.pxToRem(20),lineHeight:1,borderRadius:"50%",overflow:"hidden",userSelect:"none",variants:[{props:{variant:"rounded"},style:{borderRadius:(t.vars||t).shape.borderRadius}},{props:{variant:"square"},style:{borderRadius:0}},{props:{colorDefault:!0},style:(0,n.Z)({color:(t.vars||t).palette.background.default},t.vars?{backgroundColor:t.vars.palette.Avatar.defaultBg}:(0,n.Z)({backgroundColor:t.palette.grey[400]},t.applyStyles("dark",{backgroundColor:t.palette.grey[600]})))}]}}),b=(0,l.ZP)("img",{name:"MuiAvatar",slot:"Img",overridesResolver:(e,t)=>t.img})({width:"100%",height:"100%",textAlign:"center",objectFit:"cover",color:"transparent",textIndent:1e4}),x=(0,l.ZP)(p,{name:"MuiAvatar",slot:"Fallback",overridesResolver:(e,t)=>t.fallback})({width:"75%",height:"75%"});var k=a.forwardRef(function(e,t){let r=(0,c.i)({props:e,name:"MuiAvatar"}),{alt:s,children:l,className:d,component:p="div",slots:m={},slotProps:v={},imgProps:f,sizes:k,src:C,srcSet:w,variant:P="circular"}=r,S=(0,o.Z)(r,g),M=null,R=function(e){let{crossOrigin:t,referrerPolicy:r,src:o,srcSet:n}=e,[i,s]=a.useState(!1);return a.useEffect(()=>{if(!o&&!n)return;s(!1);let e=!0,a=new Image;return a.onload=()=>{e&&s("loaded")},a.onerror=()=>{e&&s("error")},a.crossOrigin=t,a.referrerPolicy=r,a.src=o,n&&(a.srcset=n),()=>{e=!1}},[t,r,o,n]),i}((0,n.Z)({},f,{src:C,srcSet:w})),A=C||w,I=A&&"error"!==R,j=(0,n.Z)({},r,{colorDefault:!I,component:p,variant:P}),O=h(j),[N,_]=(0,y.Z)("img",{className:O.img,elementType:b,externalForwardedProps:{slots:m,slotProps:{img:(0,n.Z)({},f,v.img)}},additionalProps:{alt:s,src:C,srcSet:w,sizes:k},ownerState:j});return M=I?(0,u.jsx)(N,(0,n.Z)({},_)):l||0===l?l:A&&s?s[0]:(0,u.jsx)(x,{ownerState:j,className:O.fallback}),(0,u.jsx)(Z,(0,n.Z)({as:p,ownerState:j,className:(0,i.Z)(O.root,d),ref:t},S,{children:M}))})},52082:function(e,t,r){r.d(t,{Z:function(){return C}});var o,n=r(32324),a=r(81500),i=r(35106),s=r(70316),l=r(65951),c=r(38762),d=r(31317),u=r(14406),p=r(85016),m=r(34519),v=r(11379),f=r(9049);function y(e){return(0,f.ZP)("MuiInputAdornment",e)}let g=(0,v.Z)("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var h=r(28057),Z=r(94655);let b=["children","className","component","disablePointerEvents","disableTypography","position","variant"],x=e=>{let{classes:t,disablePointerEvents:r,hiddenLabel:o,position:n,size:a,variant:i}=e,s={root:["root",r&&"disablePointerEvents",n&&"position".concat((0,c.Z)(n)),i,o&&"hiddenLabel",a&&"size".concat((0,c.Z)(a))]};return(0,l.Z)(s,y,t)},k=(0,m.ZP)("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,t["position".concat((0,c.Z)(r.position))],!0===r.disablePointerEvents&&t.disablePointerEvents,t[r.variant]]}})(e=>{let{theme:t,ownerState:r}=e;return(0,a.Z)({display:"flex",height:"0.01em",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(t.vars||t).palette.action.active},"filled"===r.variant&&{["&.".concat(g.positionStart,"&:not(.").concat(g.hiddenLabel,")")]:{marginTop:16}},"start"===r.position&&{marginRight:8},"end"===r.position&&{marginLeft:8},!0===r.disablePointerEvents&&{pointerEvents:"none"})});var C=i.forwardRef(function(e,t){let r=(0,h.i)({props:e,name:"MuiInputAdornment"}),{children:l,className:c,component:m="div",disablePointerEvents:v=!1,disableTypography:f=!1,position:y,variant:g}=r,C=(0,n.Z)(r,b),w=(0,p.Z)()||{},P=g;g&&w.variant,w&&!P&&(P=w.variant);let S=(0,a.Z)({},r,{hiddenLabel:w.hiddenLabel,size:w.size,disablePointerEvents:v,position:y,variant:P}),M=x(S);return(0,Z.jsx)(u.Z.Provider,{value:null,children:(0,Z.jsx)(k,(0,a.Z)({as:m,ownerState:S,className:(0,s.Z)(M.root,c),ref:t},C,{children:"string"!=typeof l||f?(0,Z.jsxs)(i.Fragment,{children:["start"===y?o||(o=(0,Z.jsx)("span",{className:"notranslate",children:""})):null,l]}):(0,Z.jsx)(d.Z,{color:"text.secondary",children:l})}))})})},33326:function(e,t,r){r.d(t,{f:function(){return a}});var o=r(11379),n=r(9049);function a(e){return(0,n.ZP)("MuiListItemIcon",e)}let i=(0,o.Z)("MuiListItemIcon",["root","alignItemsFlexStart"]);t.Z=i},7178:function(e,t,r){r.d(t,{Z:function(){return M}});var o=r(32324),n=r(81500),a=r(35106),i=r(70316),s=r(65951),l=r(64577),c=r(34519),d=r(15651),u=r(28057),p=r(75084),m=r(29084),v=r(65425),f=r(38481),y=r(16945),g=r(33326),h=r(64769),Z=r(11379),b=r(9049);function x(e){return(0,b.ZP)("MuiMenuItem",e)}let k=(0,Z.Z)("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]);var C=r(94655);let w=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],P=e=>{let{disabled:t,dense:r,divider:o,disableGutters:a,selected:i,classes:l}=e,c=(0,s.Z)({root:["root",r&&"dense",t&&"disabled",!a&&"gutters",o&&"divider",i&&"selected"]},x,l);return(0,n.Z)({},l,c)},S=(0,c.ZP)(m.Z,{shouldForwardProp:e=>(0,d.Z)(e)||"classes"===e,name:"MuiMenuItem",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,r.dense&&t.dense,r.divider&&t.divider,!r.disableGutters&&t.gutters]}})(e=>{let{theme:t,ownerState:r}=e;return(0,n.Z)({},t.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!r.disableGutters&&{paddingLeft:16,paddingRight:16},r.divider&&{borderBottom:"1px solid ".concat((t.vars||t).palette.divider),backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},["&.".concat(k.selected)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / ").concat(t.vars.palette.action.selectedOpacity,")"):(0,l.Fq)(t.palette.primary.main,t.palette.action.selectedOpacity),["&.".concat(k.focusVisible)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.focusOpacity,"))"):(0,l.Fq)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},["&.".concat(k.selected,":hover")]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.hoverOpacity,"))"):(0,l.Fq)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / ").concat(t.vars.palette.action.selectedOpacity,")"):(0,l.Fq)(t.palette.primary.main,t.palette.action.selectedOpacity)}},["&.".concat(k.focusVisible)]:{backgroundColor:(t.vars||t).palette.action.focus},["&.".concat(k.disabled)]:{opacity:(t.vars||t).palette.action.disabledOpacity},["& + .".concat(y.Z.root)]:{marginTop:t.spacing(1),marginBottom:t.spacing(1)},["& + .".concat(y.Z.inset)]:{marginLeft:52},["& .".concat(h.Z.root)]:{marginTop:0,marginBottom:0},["& .".concat(h.Z.inset)]:{paddingLeft:36},["& .".concat(g.Z.root)]:{minWidth:36}},!r.dense&&{[t.breakpoints.up("sm")]:{minHeight:"auto"}},r.dense&&(0,n.Z)({minHeight:32,paddingTop:4,paddingBottom:4},t.typography.body2,{["& .".concat(g.Z.root," svg")]:{fontSize:"1.25rem"}}))});var M=a.forwardRef(function(e,t){let r;let s=(0,u.i)({props:e,name:"MuiMenuItem"}),{autoFocus:l=!1,component:c="li",dense:d=!1,divider:m=!1,disableGutters:y=!1,focusVisibleClassName:g,role:h="menuitem",tabIndex:Z,className:b}=s,x=(0,o.Z)(s,w),k=a.useContext(p.Z),M=a.useMemo(()=>({dense:d||k.dense||!1,disableGutters:y}),[k.dense,d,y]),R=a.useRef(null);(0,v.Z)(()=>{l&&R.current&&R.current.focus()},[l]);let A=(0,n.Z)({},s,{dense:M.dense,divider:m,disableGutters:y}),I=P(s),j=(0,f.Z)(R,t);return s.disabled||(r=void 0!==Z?Z:-1),(0,C.jsx)(p.Z.Provider,{value:M,children:(0,C.jsx)(S,(0,n.Z)({ref:j,role:h,tabIndex:r,component:c,focusVisibleClassName:(0,i.Z)(I.focusVisible,g),className:(0,i.Z)(I.root,b)},x,{ownerState:A,classes:I}))})})},48442:function(e,t,r){r.d(t,{Z:function(){return h}});var o=r(81500),n=r(32324),a=r(14526),i=r(41499),s=r(8557),l=r(72686);let c=["ownerState"],d=["variants"],u=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function p(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}function m(e,t){return t&&e&&"object"==typeof e&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}let v=(0,s.Z)(),f=e=>e?e.charAt(0).toLowerCase()+e.slice(1):e;function y({defaultTheme:e,theme:t,themeId:r}){return 0===Object.keys(t).length?e:t[r]||t}function g(e,t,r){let{ownerState:i}=t,s=(0,n.Z)(t,c),l="function"==typeof e?e((0,o.Z)({ownerState:i},s)):e;if(Array.isArray(l))return l.flatMap(e=>g(e,(0,o.Z)({ownerState:i},s),r));if(l&&"object"==typeof l&&Array.isArray(l.variants)){let{variants:e=[]}=l,t=(0,n.Z)(l,d);return e.forEach(e=>{let n=!0;if("function"==typeof e.props?n=e.props((0,o.Z)({ownerState:i},s,i)):Object.keys(e.props).forEach(t=>{(null==i?void 0:i[t])!==e.props[t]&&s[t]!==e.props[t]&&(n=!1)}),n){Array.isArray(t)||(t=[t]);let n="function"==typeof e.style?e.style((0,o.Z)({ownerState:i},s,i)):e.style;t.push(r?m((0,a.internal_serializeStyles)(n),r):n)}}),t}return r?m((0,a.internal_serializeStyles)(l),r):l}var h=function(e={}){let{themeId:t,defaultTheme:r=v,rootShouldForwardProp:s=p,slotShouldForwardProp:c=p}=e,d=e=>(0,l.Z)((0,o.Z)({},e,{theme:y((0,o.Z)({},e,{defaultTheme:r,themeId:t}))}));return d.__mui_systemSx=!0,(e,l={})=>{var m;let v;(0,a.internal_processStyles)(e,e=>e.filter(e=>!(null!=e&&e.__mui_systemSx)));let{name:h,slot:Z,skipVariantsResolver:b,skipSx:x,overridesResolver:k=(m=f(Z))?(e,t)=>t[m]:null}=l,C=(0,n.Z)(l,u),w=h&&h.startsWith("Mui")||Z?"components":"custom",P=void 0!==b?b:Z&&"Root"!==Z&&"root"!==Z||!1,S=x||!1,M=p;"Root"===Z||"root"===Z?M=s:Z?M=c:"string"==typeof e&&e.charCodeAt(0)>96&&(M=void 0);let R=(0,a.default)(e,(0,o.Z)({shouldForwardProp:M,label:v},C)),A=e=>"function"==typeof e&&e.__emotion_real!==e||(0,i.P)(e)?n=>{let a=y({theme:n.theme,defaultTheme:r,themeId:t});return g(e,(0,o.Z)({},n,{theme:a}),a.modularCssLayers?w:void 0)}:e,I=(n,...a)=>{let i=A(n),s=a?a.map(A):[];h&&k&&s.push(e=>{let n=y((0,o.Z)({},e,{defaultTheme:r,themeId:t}));if(!n.components||!n.components[h]||!n.components[h].styleOverrides)return null;let a=n.components[h].styleOverrides,i={};return Object.entries(a).forEach(([t,r])=>{i[t]=g(r,(0,o.Z)({},e,{theme:n}),n.modularCssLayers?"theme":void 0)}),k(e,i)}),h&&!P&&s.push(e=>{var n;let a=y((0,o.Z)({},e,{defaultTheme:r,themeId:t}));return g({variants:null==a||null==(n=a.components)||null==(n=n[h])?void 0:n.variants},(0,o.Z)({},e,{theme:a}),a.modularCssLayers?"theme":void 0)}),S||s.push(d);let l=s.length-a.length;if(Array.isArray(n)&&l>0){let e=Array(l).fill("");(i=[...n,...e]).raw=[...n.raw,...e]}let c=R(i,...s);return e.muiName&&(c.muiName=e.muiName),c};return R.withConfig&&(I.withConfig=R.withConfig),I}}()},13864:function(e,t,r){r.d(t,{Z:function(){return n}});var o=r(71483);function n(e){let{theme:t,name:r,props:n}=e;return t&&t.components&&t.components[r]&&t.components[r].defaultProps?(0,o.Z)(t.components[r].defaultProps,n):n}},14189:function(e,t,r){r.d(t,{Z:function(){return a}});var o=r(13864),n=r(32730);function a(e){let{props:t,name:r,defaultTheme:a,themeId:i}=e,s=(0,n.Z)(a);return i&&(s=s[i]||s),(0,o.Z)({theme:s,name:r,props:t})}}}]);
|
package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/423-766c202217f701c0.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[423],{34675:function(t,e,r){"use strict";var o=r(8091);e.Z=void 0;var n=o(r(66758)),a=r(94655);e.Z=(0,n.default)((0,a.jsx)("path",{d:"M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96M14 13v4h-4v-4H7l5-5 5 5z"}),"Backup")},76176:function(t,e,r){"use strict";var o=r(8091);e.Z=void 0;var n=o(r(66758)),a=r(94655);e.Z=(0,n.default)((0,a.jsx)("path",{d:"M3 13h8V3H3zm0 8h8v-6H3zm10 0h8V11h-8zm0-18v6h8V3z"}),"Dashboard")},75845:function(t,e,r){"use strict";var o=r(8091);e.Z=void 0,function(t,e){if((!t||!t.__esModule)&&null!==t&&("object"==typeof t||"function"==typeof t)){var r=i(void 0);if(r&&r.has(t))return r.get(t);var o={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if("default"!==a&&Object.prototype.hasOwnProperty.call(t,a)){var c=n?Object.getOwnPropertyDescriptor(t,a):null;c&&(c.get||c.set)?Object.defineProperty(o,a,c):o[a]=t[a]}o.default=t,r&&r.set(t,o)}}(r(35106));var n=o(r(66758)),a=r(94655);function i(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(i=function(t){return t?r:e})(t)}e.Z=(0,n.default)((0,a.jsx)("path",{d:"M12 1.27a11 11 0 00-3.48 21.46c.55.09.73-.28.73-.55v-1.84c-3.03.64-3.67-1.46-3.67-1.46-.55-1.29-1.28-1.65-1.28-1.65-.92-.65.1-.65.1-.65 1.1 0 1.73 1.1 1.73 1.1.92 1.65 2.57 1.2 3.21.92a2 2 0 01.64-1.47c-2.47-.27-5.04-1.19-5.04-5.5 0-1.1.46-2.1 1.2-2.84a3.76 3.76 0 010-2.93s.91-.28 3.11 1.1c1.8-.49 3.7-.49 5.5 0 2.1-1.38 3.02-1.1 3.02-1.1a3.76 3.76 0 010 2.93c.83.74 1.2 1.74 1.2 2.94 0 4.21-2.57 5.13-5.04 5.4.45.37.82.92.82 2.02v3.03c0 .27.1.64.73.55A11 11 0 0012 1.27"}),"GitHub")},80620:function(t,e,r){"use strict";var o=r(8091);e.Z=void 0;var n=o(r(66758)),a=r(94655);e.Z=(0,n.default)((0,a.jsx)("path",{d:"M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9m-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8z"}),"History")},61505:function(t,e,r){"use strict";var o=r(8091);e.Z=void 0;var n=o(r(66758)),a=r(94655);e.Z=(0,n.default)((0,a.jsx)("path",{d:"M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z"}),"Menu")},43880:function(t,e,r){"use strict";var o=r(8091);e.Z=void 0;var n=o(r(66758)),a=r(94655);e.Z=(0,n.default)([(0,a.jsx)("path",{d:"M21 5c-1.11-.35-2.33-.5-3.5-.5-1.95 0-4.05.4-5.5 1.5-1.45-1.1-3.55-1.5-5.5-1.5S2.45 4.9 1 6v14.65c0 .25.25.5.5.5.1 0 .15-.05.25-.05C3.1 20.45 5.05 20 6.5 20c1.95 0 4.05.4 5.5 1.5 1.35-.85 3.8-1.5 5.5-1.5 1.65 0 3.35.3 4.75 1.05.1.05.15.05.25.05.25 0 .5-.25.5-.5V6c-.6-.45-1.25-.75-2-1m0 13.5c-1.1-.35-2.3-.5-3.5-.5-1.7 0-4.15.65-5.5 1.5V8c1.35-.85 3.8-1.5 5.5-1.5 1.2 0 2.4.15 3.5.5z"},"0"),(0,a.jsx)("path",{d:"M17.5 10.5c.88 0 1.73.09 2.5.26V9.24c-.79-.15-1.64-.24-2.5-.24-1.7 0-3.24.29-4.5.83v1.66c1.13-.64 2.7-.99 4.5-.99M13 12.49v1.66c1.13-.64 2.7-.99 4.5-.99.88 0 1.73.09 2.5.26V11.9c-.79-.15-1.64-.24-2.5-.24-1.7 0-3.24.3-4.5.83m4.5 1.84c-1.7 0-3.24.29-4.5.83v1.66c1.13-.64 2.7-.99 4.5-.99.88 0 1.73.09 2.5.26v-1.52c-.79-.16-1.64-.24-2.5-.24"},"1")],"MenuBook")},84974:function(t,e,r){"use strict";var o=r(8091);e.Z=void 0;var n=o(r(66758)),a=r(94655);e.Z=(0,n.default)((0,a.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39"}),"Public")},29983:function(t,e,r){"use strict";var o=r(8091);e.Z=void 0;var n=o(r(66758)),a=r(94655);e.Z=(0,n.default)((0,a.jsx)("path",{d:"m20.2 5.9.8-.8C19.6 3.7 17.8 3 16 3s-3.6.7-5 2.1l.8.8C13 4.8 14.5 4.2 16 4.2s3 .6 4.2 1.7m-.9.8c-.9-.9-2.1-1.4-3.3-1.4s-2.4.5-3.3 1.4l.8.8c.7-.7 1.6-1 2.5-1 .9 0 1.8.3 2.5 1zM19 13h-2V9h-2v4H5c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-4c0-1.1-.9-2-2-2M8 18H6v-2h2zm3.5 0h-2v-2h2zm3.5 0h-2v-2h2z"}),"Router")},25169:function(t,e,r){"use strict";var o=r(61626),n=r(94655);e.Z=(0,o.Z)((0,n.jsx)("path",{d:"M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3m-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3m0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5m8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5"}),"Group")},78319:function(t,e,r){"use strict";var o=r(61626),n=r(94655);e.Z=(0,o.Z)((0,n.jsx)("path",{d:"m17 7-1.41 1.41L18.17 11H8v2h10.17l-2.58 2.58L17 17l5-5zM4 5h8V3H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h8v-2H4z"}),"Logout")},41094:function(t,e,r){"use strict";var o=r(61626),n=r(94655);e.Z=(0,o.Z)((0,n.jsx)("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"}),"Settings")},554:function(t,e,r){"use strict";var o=r(61626),n=r(94655);e.Z=(0,o.Z)((0,n.jsx)("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"}),"Visibility")},36848:function(t,e,r){"use strict";var o=r(61626),n=r(94655);e.Z=(0,o.Z)((0,n.jsx)("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z"}),"VisibilityOff")},66758:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return o.createSvgIcon}});var o=r(26505)},56275:function(t,e,r){"use strict";r.d(e,{Z:function(){return x}});var o=r(32324),n=r(81500),a=r(35106),i=r(70316),c=r(65951),s=r(34519),l=r(28057),u=r(38762),p=r(69899),d=r(11379),f=r(9049);function v(t){return(0,f.ZP)("MuiAppBar",t)}(0,d.Z)("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent","colorError","colorInfo","colorSuccess","colorWarning"]);var m=r(94655);let h=["className","color","enableColorOnDark","position"],g=t=>{let{color:e,position:r,classes:o}=t,n={root:["root","color".concat((0,u.Z)(e)),"position".concat((0,u.Z)(r))]};return(0,c.Z)(n,v,o)},Z=(t,e)=>t?"".concat(null==t?void 0:t.replace(")",""),", ").concat(e,")"):e,b=(0,s.ZP)(p.Z,{name:"MuiAppBar",slot:"Root",overridesResolver:(t,e)=>{let{ownerState:r}=t;return[e.root,e["position".concat((0,u.Z)(r.position))],e["color".concat((0,u.Z)(r.color))]]}})(t=>{let{theme:e,ownerState:r}=t,o="light"===e.palette.mode?e.palette.grey[100]:e.palette.grey[900];return(0,n.Z)({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0},"fixed"===r.position&&{position:"fixed",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}},"absolute"===r.position&&{position:"absolute",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0},"sticky"===r.position&&{position:"sticky",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0},"static"===r.position&&{position:"static"},"relative"===r.position&&{position:"relative"},!e.vars&&(0,n.Z)({},"default"===r.color&&{backgroundColor:o,color:e.palette.getContrastText(o)},r.color&&"default"!==r.color&&"inherit"!==r.color&&"transparent"!==r.color&&{backgroundColor:e.palette[r.color].main,color:e.palette[r.color].contrastText},"inherit"===r.color&&{color:"inherit"},"dark"===e.palette.mode&&!r.enableColorOnDark&&{backgroundColor:null,color:null},"transparent"===r.color&&(0,n.Z)({backgroundColor:"transparent",color:"inherit"},"dark"===e.palette.mode&&{backgroundImage:"none"})),e.vars&&(0,n.Z)({},"default"===r.color&&{"--AppBar-background":r.enableColorOnDark?e.vars.palette.AppBar.defaultBg:Z(e.vars.palette.AppBar.darkBg,e.vars.palette.AppBar.defaultBg),"--AppBar-color":r.enableColorOnDark?e.vars.palette.text.primary:Z(e.vars.palette.AppBar.darkColor,e.vars.palette.text.primary)},r.color&&!r.color.match(/^(default|inherit|transparent)$/)&&{"--AppBar-background":r.enableColorOnDark?e.vars.palette[r.color].main:Z(e.vars.palette.AppBar.darkBg,e.vars.palette[r.color].main),"--AppBar-color":r.enableColorOnDark?e.vars.palette[r.color].contrastText:Z(e.vars.palette.AppBar.darkColor,e.vars.palette[r.color].contrastText)},!["inherit","transparent"].includes(r.color)&&{backgroundColor:"var(--AppBar-background)"},{color:"inherit"===r.color?"inherit":"var(--AppBar-color)"},"transparent"===r.color&&{backgroundImage:"none",backgroundColor:"transparent",color:"inherit"}))});var x=a.forwardRef(function(t,e){let r=(0,l.i)({props:t,name:"MuiAppBar"}),{className:a,color:c="primary",enableColorOnDark:s=!1,position:u="fixed"}=r,p=(0,o.Z)(r,h),d=(0,n.Z)({},r,{color:c,position:u,enableColorOnDark:s}),f=g(d);return(0,m.jsx)(b,(0,n.Z)({square:!0,component:"header",ownerState:d,elevation:4,className:(0,i.Z)(f.root,a,"fixed"===u&&"mui-fixed"),ref:e},p))})},67337:function(t,e,r){"use strict";r.d(e,{Z:function(){return y}});var o=r(32324),n=r(81500),a=r(35106),i=r(70316),c=r(9049),s=r(65951),l=r(6014),u=r(14189),p=r(48442),d=r(8557),f=r(94655);let v=["className","component","disableGutters","fixed","maxWidth","classes"],m=(0,d.Z)(),h=(0,p.Z)("div",{name:"MuiContainer",slot:"Root",overridesResolver:(t,e)=>{let{ownerState:r}=t;return[e.root,e[`maxWidth${(0,l.Z)(String(r.maxWidth))}`],r.fixed&&e.fixed,r.disableGutters&&e.disableGutters]}}),g=t=>(0,u.Z)({props:t,name:"MuiContainer",defaultTheme:m}),Z=(t,e)=>{let{classes:r,fixed:o,disableGutters:n,maxWidth:a}=t,i={root:["root",a&&`maxWidth${(0,l.Z)(String(a))}`,o&&"fixed",n&&"disableGutters"]};return(0,s.Z)(i,t=>(0,c.ZP)(e,t),r)};var b=r(38762),x=r(34519),k=r(28057),y=function(t={}){let{createStyledComponent:e=h,useThemeProps:r=g,componentName:c="MuiContainer"}=t,s=e(({theme:t,ownerState:e})=>(0,n.Z)({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",display:"block"},!e.disableGutters&&{paddingLeft:t.spacing(2),paddingRight:t.spacing(2),[t.breakpoints.up("sm")]:{paddingLeft:t.spacing(3),paddingRight:t.spacing(3)}}),({theme:t,ownerState:e})=>e.fixed&&Object.keys(t.breakpoints.values).reduce((e,r)=>{let o=t.breakpoints.values[r];return 0!==o&&(e[t.breakpoints.up(r)]={maxWidth:`${o}${t.breakpoints.unit}`}),e},{}),({theme:t,ownerState:e})=>(0,n.Z)({},"xs"===e.maxWidth&&{[t.breakpoints.up("xs")]:{maxWidth:Math.max(t.breakpoints.values.xs,444)}},e.maxWidth&&"xs"!==e.maxWidth&&{[t.breakpoints.up(e.maxWidth)]:{maxWidth:`${t.breakpoints.values[e.maxWidth]}${t.breakpoints.unit}`}}));return a.forwardRef(function(t,e){let a=r(t),{className:l,component:u="div",disableGutters:p=!1,fixed:d=!1,maxWidth:m="lg"}=a,h=(0,o.Z)(a,v),g=(0,n.Z)({},a,{component:u,disableGutters:p,fixed:d,maxWidth:m}),b=Z(g,c);return(0,f.jsx)(s,(0,n.Z)({as:u,ownerState:g,className:(0,i.Z)(b.root,l),ref:e},h))})}({createStyledComponent:(0,x.ZP)("div",{name:"MuiContainer",slot:"Root",overridesResolver:(t,e)=>{let{ownerState:r}=t;return[e.root,e["maxWidth".concat((0,b.Z)(String(r.maxWidth)))],r.fixed&&e.fixed,r.disableGutters&&e.disableGutters]}}),useThemeProps:t=>(0,k.i)({props:t,name:"MuiContainer"})})},16945:function(t,e,r){"use strict";r.d(e,{V:function(){return a}});var o=r(11379),n=r(9049);function a(t){return(0,n.ZP)("MuiDivider",t)}let i=(0,o.Z)("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]);e.Z=i},62142:function(t,e,r){"use strict";r.d(e,{ZP:function(){return O}});var o=r(32324),n=r(81500),a=r(35106),i=r(70316),c=r(65951),s=r(16501),l=r(66743),u=r(12550),p=r(69899),d=r(38762),f=r(83855),v=r(28057),m=r(34519),h=r(15651),g=r(11379),Z=r(9049);function b(t){return(0,Z.ZP)("MuiDrawer",t)}(0,g.Z)("MuiDrawer",["root","docked","paper","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);var x=r(94655);let k=["BackdropProps"],y=["anchor","BackdropProps","children","className","elevation","hideBackdrop","ModalProps","onClose","open","PaperProps","SlideProps","TransitionComponent","transitionDuration","variant"],C=(t,e)=>{let{ownerState:r}=t;return[e.root,("permanent"===r.variant||"persistent"===r.variant)&&e.docked,e.modal]},M=t=>{let{classes:e,anchor:r,variant:o}=t,n={root:["root"],docked:[("permanent"===o||"persistent"===o)&&"docked"],modal:["modal"],paper:["paper","paperAnchor".concat((0,d.Z)(r)),"temporary"!==o&&"paperAnchorDocked".concat((0,d.Z)(r))]};return(0,c.Z)(n,b,e)},S=(0,m.ZP)(l.Z,{name:"MuiDrawer",slot:"Root",overridesResolver:C})(t=>{let{theme:e}=t;return{zIndex:(e.vars||e).zIndex.drawer}}),w=(0,m.ZP)("div",{shouldForwardProp:h.Z,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:C})({flex:"0 0 auto"}),P=(0,m.ZP)(p.Z,{name:"MuiDrawer",slot:"Paper",overridesResolver:(t,e)=>{let{ownerState:r}=t;return[e.paper,e["paperAnchor".concat((0,d.Z)(r.anchor))],"temporary"!==r.variant&&e["paperAnchorDocked".concat((0,d.Z)(r.anchor))]]}})(t=>{let{theme:e,ownerState:r}=t;return(0,n.Z)({overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:(e.vars||e).zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0},"left"===r.anchor&&{left:0},"top"===r.anchor&&{top:0,left:0,right:0,height:"auto",maxHeight:"100%"},"right"===r.anchor&&{right:0},"bottom"===r.anchor&&{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"},"left"===r.anchor&&"temporary"!==r.variant&&{borderRight:"1px solid ".concat((e.vars||e).palette.divider)},"top"===r.anchor&&"temporary"!==r.variant&&{borderBottom:"1px solid ".concat((e.vars||e).palette.divider)},"right"===r.anchor&&"temporary"!==r.variant&&{borderLeft:"1px solid ".concat((e.vars||e).palette.divider)},"bottom"===r.anchor&&"temporary"!==r.variant&&{borderTop:"1px solid ".concat((e.vars||e).palette.divider)})}),B={left:"right",right:"left",top:"down",bottom:"up"};var O=a.forwardRef(function(t,e){let r=(0,v.i)({props:t,name:"MuiDrawer"}),c=(0,f.Z)(),l=(0,s.V)(),p={enter:c.transitions.duration.enteringScreen,exit:c.transitions.duration.leavingScreen},{anchor:d="left",BackdropProps:m,children:h,className:g,elevation:Z=16,hideBackdrop:b=!1,ModalProps:{BackdropProps:C}={},onClose:O,open:z=!1,PaperProps:A={},SlideProps:j,TransitionComponent:R=u.Z,transitionDuration:D=p,variant:I="temporary"}=r,V=(0,o.Z)(r.ModalProps,k),W=(0,o.Z)(r,y),T=a.useRef(!1);a.useEffect(()=>{T.current=!0},[]);let N=function(t,e){let{direction:r}=t;return"rtl"===r&&-1!==["left","right"].indexOf(e)?B[e]:e}({direction:l?"rtl":"ltr"},d),H=(0,n.Z)({},r,{anchor:d,elevation:Z,open:z,variant:I},W),L=M(H),_=(0,x.jsx)(P,(0,n.Z)({elevation:"temporary"===I?Z:0,square:!0},A,{className:(0,i.Z)(L.paper,A.className),ownerState:H,children:h}));if("permanent"===I)return(0,x.jsx)(w,(0,n.Z)({className:(0,i.Z)(L.root,L.docked,g),ownerState:H,ref:e},W,{children:_}));let E=(0,x.jsx)(R,(0,n.Z)({in:z,direction:B[N],timeout:D,appear:T.current},j,{children:_}));return"persistent"===I?(0,x.jsx)(w,(0,n.Z)({className:(0,i.Z)(L.root,L.docked,g),ownerState:H,ref:e},W,{children:E})):(0,x.jsx)(S,(0,n.Z)({BackdropProps:(0,n.Z)({},m,C,{transitionDuration:D}),className:(0,i.Z)(L.root,L.modal,g),open:z,ownerState:H,onClose:O,hideBackdrop:b,ref:e},W,V,{children:E}))})},49954:function(t,e,r){"use strict";var o=r(32324),n=r(81500),a=r(35106),i=r(70316),c=r(65951),s=r(64577),l=r(34519),u=r(15651),p=r(28057),d=r(29084),f=r(65425),v=r(38481),m=r(75084),h=r(12721),g=r(94655);let Z=["alignItems","autoFocus","component","children","dense","disableGutters","divider","focusVisibleClassName","selected","className"],b=t=>{let{alignItems:e,classes:r,dense:o,disabled:a,disableGutters:i,divider:s,selected:l}=t,u=(0,c.Z)({root:["root",o&&"dense",!i&&"gutters",s&&"divider",a&&"disabled","flex-start"===e&&"alignItemsFlexStart",l&&"selected"]},h.t,r);return(0,n.Z)({},r,u)},x=(0,l.ZP)(d.Z,{shouldForwardProp:t=>(0,u.Z)(t)||"classes"===t,name:"MuiListItemButton",slot:"Root",overridesResolver:(t,e)=>{let{ownerState:r}=t;return[e.root,r.dense&&e.dense,"flex-start"===r.alignItems&&e.alignItemsFlexStart,r.divider&&e.divider,!r.disableGutters&&e.gutters]}})(t=>{let{theme:e,ownerState:r}=t;return(0,n.Z)({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},["&.".concat(h.Z.selected)]:{backgroundColor:e.vars?"rgba(".concat(e.vars.palette.primary.mainChannel," / ").concat(e.vars.palette.action.selectedOpacity,")"):(0,s.Fq)(e.palette.primary.main,e.palette.action.selectedOpacity),["&.".concat(h.Z.focusVisible)]:{backgroundColor:e.vars?"rgba(".concat(e.vars.palette.primary.mainChannel," / calc(").concat(e.vars.palette.action.selectedOpacity," + ").concat(e.vars.palette.action.focusOpacity,"))"):(0,s.Fq)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},["&.".concat(h.Z.selected,":hover")]:{backgroundColor:e.vars?"rgba(".concat(e.vars.palette.primary.mainChannel," / calc(").concat(e.vars.palette.action.selectedOpacity," + ").concat(e.vars.palette.action.hoverOpacity,"))"):(0,s.Fq)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?"rgba(".concat(e.vars.palette.primary.mainChannel," / ").concat(e.vars.palette.action.selectedOpacity,")"):(0,s.Fq)(e.palette.primary.main,e.palette.action.selectedOpacity)}},["&.".concat(h.Z.focusVisible)]:{backgroundColor:(e.vars||e).palette.action.focus},["&.".concat(h.Z.disabled)]:{opacity:(e.vars||e).palette.action.disabledOpacity}},r.divider&&{borderBottom:"1px solid ".concat((e.vars||e).palette.divider),backgroundClip:"padding-box"},"flex-start"===r.alignItems&&{alignItems:"flex-start"},!r.disableGutters&&{paddingLeft:16,paddingRight:16},r.dense&&{paddingTop:4,paddingBottom:4})}),k=a.forwardRef(function(t,e){let r=(0,p.i)({props:t,name:"MuiListItemButton"}),{alignItems:c="center",autoFocus:s=!1,component:l="div",children:u,dense:d=!1,disableGutters:h=!1,divider:k=!1,focusVisibleClassName:y,selected:C=!1,className:M}=r,S=(0,o.Z)(r,Z),w=a.useContext(m.Z),P=a.useMemo(()=>({dense:d||w.dense||!1,alignItems:c,disableGutters:h}),[c,w.dense,d,h]),B=a.useRef(null);(0,f.Z)(()=>{s&&B.current&&B.current.focus()},[s]);let O=(0,n.Z)({},r,{alignItems:c,dense:P.dense,disableGutters:h,divider:k,selected:C}),z=b(O),A=(0,v.Z)(B,e);return(0,g.jsx)(m.Z.Provider,{value:P,children:(0,g.jsx)(x,(0,n.Z)({ref:A,href:S.href||S.to,component:(S.href||S.to)&&"div"===l?"button":l,focusVisibleClassName:(0,i.Z)(z.focusVisible,y),ownerState:O,className:(0,i.Z)(z.root,M)},S,{classes:z,children:u}))})});e.Z=k},27350:function(t,e,r){"use strict";var o=r(34834);e.Z=o.Z},26505:function(t,e,r){"use strict";r.r(e),r.d(e,{capitalize:function(){return n.Z},createChainedFunction:function(){return a.Z},createSvgIcon:function(){return i.Z},debounce:function(){return c.Z},deprecatedPropType:function(){return s},isMuiElement:function(){return l.Z},ownerDocument:function(){return u.Z},ownerWindow:function(){return p.Z},requirePropFactory:function(){return d},setRef:function(){return f},unstable_ClassNameGenerator:function(){return k},unstable_useEnhancedEffect:function(){return v.Z},unstable_useId:function(){return m.Z},unsupportedProp:function(){return h},useControlled:function(){return g.Z},useEventCallback:function(){return Z.Z},useForkRef:function(){return b.Z},useIsFocusVisible:function(){return x.Z}});var o=r(74055),n=r(38762),a=r(27350),i=r(61626),c=r(19521),s=function(t,e){return()=>null},l=r(9290),u=r(34713),p=r(99466);r(81500);var d=function(t,e){return()=>null},f=r(25880).Z,v=r(65425),m=r(88207),h=function(t,e,r,o,n){return null},g=r(18280),Z=r(10620),b=r(38481),x=r(22125);let k={configure:t=>{o.Z.configure(t)}}},88207:function(t,e,r){"use strict";var o=r(40552);e.Z=o.Z},31477:function(t,e,r){var o,n;void 0!==(n="function"==typeof(o=function(){var t,e,r,o={};o.version="0.2.0";var n=o.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'};function a(t,e,r){return t<e?e:t>r?r:t}o.configure=function(t){var e,r;for(e in t)void 0!==(r=t[e])&&t.hasOwnProperty(e)&&(n[e]=r);return this},o.status=null,o.set=function(t){var e=o.isStarted();t=a(t,n.minimum,1),o.status=1===t?null:t;var r=o.render(!e),s=r.querySelector(n.barSelector),l=n.speed,u=n.easing;return r.offsetWidth,i(function(e){var a,i;""===n.positionUsing&&(n.positionUsing=o.getPositioningCSS()),c(s,(a=t,(i="translate3d"===n.positionUsing?{transform:"translate3d("+(-1+a)*100+"%,0,0)"}:"translate"===n.positionUsing?{transform:"translate("+(-1+a)*100+"%,0)"}:{"margin-left":(-1+a)*100+"%"}).transition="all "+l+"ms "+u,i)),1===t?(c(r,{transition:"none",opacity:1}),r.offsetWidth,setTimeout(function(){c(r,{transition:"all "+l+"ms linear",opacity:0}),setTimeout(function(){o.remove(),e()},l)},l)):setTimeout(e,l)}),this},o.isStarted=function(){return"number"==typeof o.status},o.start=function(){o.status||o.set(0);var t=function(){setTimeout(function(){o.status&&(o.trickle(),t())},n.trickleSpeed)};return n.trickle&&t(),this},o.done=function(t){return t||o.status?o.inc(.3+.5*Math.random()).set(1):this},o.inc=function(t){var e=o.status;return e?("number"!=typeof t&&(t=(1-e)*a(Math.random()*e,.1,.95)),e=a(e+t,0,.994),o.set(e)):o.start()},o.trickle=function(){return o.inc(Math.random()*n.trickleRate)},t=0,e=0,o.promise=function(r){return r&&"resolved"!==r.state()&&(0===e&&o.start(),t++,e++,r.always(function(){0==--e?(t=0,o.done()):o.set((t-e)/t)})),this},o.render=function(t){if(o.isRendered())return document.getElementById("nprogress");l(document.documentElement,"nprogress-busy");var e=document.createElement("div");e.id="nprogress",e.innerHTML=n.template;var r,a=e.querySelector(n.barSelector),i=t?"-100":(-1+(o.status||0))*100,s=document.querySelector(n.parent);return c(a,{transition:"all 0 linear",transform:"translate3d("+i+"%,0,0)"}),!n.showSpinner&&(r=e.querySelector(n.spinnerSelector))&&d(r),s!=document.body&&l(s,"nprogress-custom-parent"),s.appendChild(e),e},o.remove=function(){u(document.documentElement,"nprogress-busy"),u(document.querySelector(n.parent),"nprogress-custom-parent");var t=document.getElementById("nprogress");t&&d(t)},o.isRendered=function(){return!!document.getElementById("nprogress")},o.getPositioningCSS=function(){var t=document.body.style,e="WebkitTransform"in t?"Webkit":"MozTransform"in t?"Moz":"msTransform"in t?"ms":"OTransform"in t?"O":"";return e+"Perspective" in t?"translate3d":e+"Transform" in t?"translate":"margin"};var i=(r=[],function(t){r.push(t),1==r.length&&function t(){var e=r.shift();e&&e(t)}()}),c=function(){var t=["Webkit","O","Moz","ms"],e={};function r(r,o,n){var a;o=e[a=(a=o).replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(t,e){return e.toUpperCase()})]||(e[a]=function(e){var r=document.body.style;if(e in r)return e;for(var o,n=t.length,a=e.charAt(0).toUpperCase()+e.slice(1);n--;)if((o=t[n]+a)in r)return o;return e}(a)),r.style[o]=n}return function(t,e){var o,n,a=arguments;if(2==a.length)for(o in e)void 0!==(n=e[o])&&e.hasOwnProperty(o)&&r(t,o,n);else r(t,a[1],a[2])}}();function s(t,e){return("string"==typeof t?t:p(t)).indexOf(" "+e+" ")>=0}function l(t,e){var r=p(t),o=r+e;s(r,e)||(t.className=o.substring(1))}function u(t,e){var r,o=p(t);s(t,e)&&(r=o.replace(" "+e+" "," "),t.className=r.substring(1,r.length-1))}function p(t){return(" "+(t.className||"")+" ").replace(/\s+/gi," ")}function d(t){t&&t.parentNode&&t.parentNode.removeChild(t)}return o})?o.call(e,r,e,t):o)&&(t.exports=n)}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5931],{66289:function(e,t,r){Promise.resolve().then(r.bind(r,12256))},71185:function(e,t,r){"use strict";var i=r(8091);t.Z=void 0;var n=i(r(66758)),l=r(94655);t.Z=(0,n.default)((0,l.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close")},69123:function(e,t,r){"use strict";var i=r(32324),n=r(81500),l=r(35106),a=r(70316),o=r(65951),s=r(64577),c=r(34519),d=r(28057),h=r(16945),u=r(94655);let x=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],m=e=>{let{absolute:t,children:r,classes:i,flexItem:n,light:l,orientation:a,textAlign:s,variant:c}=e;return(0,o.Z)({root:["root",t&&"absolute",c,l&&"light","vertical"===a&&"vertical",n&&"flexItem",r&&"withChildren",r&&"vertical"===a&&"withChildrenVertical","right"===s&&"vertical"!==a&&"textAlignRight","left"===s&&"vertical"!==a&&"textAlignLeft"],wrapper:["wrapper","vertical"===a&&"wrapperVertical"]},h.V,i)},v=(0,c.ZP)("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,r.absolute&&t.absolute,t[r.variant],r.light&&t.light,"vertical"===r.orientation&&t.vertical,r.flexItem&&t.flexItem,r.children&&t.withChildren,r.children&&"vertical"===r.orientation&&t.withChildrenVertical,"right"===r.textAlign&&"vertical"!==r.orientation&&t.textAlignRight,"left"===r.textAlign&&"vertical"!==r.orientation&&t.textAlignLeft]}})(e=>{let{theme:t,ownerState:r}=e;return(0,n.Z)({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(t.vars||t).palette.divider,borderBottomWidth:"thin"},r.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},r.light&&{borderColor:t.vars?"rgba(".concat(t.vars.palette.dividerChannel," / 0.08)"):(0,s.Fq)(t.palette.divider,.08)},"inset"===r.variant&&{marginLeft:72},"middle"===r.variant&&"horizontal"===r.orientation&&{marginLeft:t.spacing(2),marginRight:t.spacing(2)},"middle"===r.variant&&"vertical"===r.orientation&&{marginTop:t.spacing(1),marginBottom:t.spacing(1)},"vertical"===r.orientation&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},r.flexItem&&{alignSelf:"stretch",height:"auto"})},e=>{let{ownerState:t}=e;return(0,n.Z)({},t.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}})},e=>{let{theme:t,ownerState:r}=e;return(0,n.Z)({},r.children&&"vertical"!==r.orientation&&{"&::before, &::after":{width:"100%",borderTop:"thin solid ".concat((t.vars||t).palette.divider),borderTopStyle:"inherit"}})},e=>{let{theme:t,ownerState:r}=e;return(0,n.Z)({},r.children&&"vertical"===r.orientation&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:"thin solid ".concat((t.vars||t).palette.divider),borderLeftStyle:"inherit"}})},e=>{let{ownerState:t}=e;return(0,n.Z)({},"right"===t.textAlign&&"vertical"!==t.orientation&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},"left"===t.textAlign&&"vertical"!==t.orientation&&{"&::before":{width:"10%"},"&::after":{width:"90%"}})}),Z=(0,c.ZP)("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.wrapper,"vertical"===r.orientation&&t.wrapperVertical]}})(e=>{let{theme:t,ownerState:r}=e;return(0,n.Z)({display:"inline-block",paddingLeft:"calc(".concat(t.spacing(1)," * 1.2)"),paddingRight:"calc(".concat(t.spacing(1)," * 1.2)")},"vertical"===r.orientation&&{paddingTop:"calc(".concat(t.spacing(1)," * 1.2)"),paddingBottom:"calc(".concat(t.spacing(1)," * 1.2)")})}),p=l.forwardRef(function(e,t){let r=(0,d.i)({props:e,name:"MuiDivider"}),{absolute:l=!1,children:o,className:s,component:c=o?"div":"hr",flexItem:h=!1,light:p=!1,orientation:f="horizontal",role:g="hr"!==c?"separator":void 0,textAlign:j="center",variant:b="fullWidth"}=r,y=(0,i.Z)(r,x),w=(0,n.Z)({},r,{absolute:l,component:c,flexItem:h,light:p,orientation:f,role:g,textAlign:j,variant:b}),C=m(w);return(0,u.jsx)(v,(0,n.Z)({as:c,className:(0,a.Z)(C.root,s),role:g,ref:t,ownerState:w},y,{children:o?(0,u.jsx)(Z,{className:C.wrapper,ownerState:w,children:o}):null}))});p.muiSkipListHighlight=!0,t.Z=p},53281:function(e,t,r){"use strict";r.d(t,{Z:function(){return p}});var i=r(81500),n=r(32324),l=r(35106),a=r(70316),o=r(65951),s=r(28057),c=r(34519),d=r(11379),h=r(9049);function u(e){return(0,h.ZP)("MuiTableContainer",e)}(0,d.Z)("MuiTableContainer",["root"]);var x=r(94655);let m=["className","component"],v=e=>{let{classes:t}=e;return(0,o.Z)({root:["root"]},u,t)},Z=(0,c.ZP)("div",{name:"MuiTableContainer",slot:"Root",overridesResolver:(e,t)=>t.root})({width:"100%",overflowX:"auto"});var p=l.forwardRef(function(e,t){let r=(0,s.i)({props:e,name:"MuiTableContainer"}),{className:l,component:o="div"}=r,c=(0,n.Z)(r,m),d=(0,i.Z)({},r,{component:o}),h=v(d);return(0,x.jsx)(Z,(0,i.Z)({ref:t,as:o,className:(0,a.Z)(h.root,l),ownerState:d},c))})},12256:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return R}});var i=r(94655),n=r(35106),l=r(7281),a=r(93017),o=r(81071),s=r(31317),c=r(5632),d=r(6986),h=r(53281),u=r(69899),x=r(21138),m=r(11254),v=r(70366),Z=r(47001),p=r(84811),f=r(25333);function g(e){let{users:t,onUserClick:r}=e;return 0===t.length?(0,i.jsx)(l.Z,{sx:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"200px",p:4},children:(0,i.jsx)(s.Z,{variant:"body1",color:"text.secondary",children:"No users found"})}):(0,i.jsx)(h.Z,{component:u.Z,sx:{overflowX:"auto"},children:(0,i.jsxs)(x.Z,{children:[(0,i.jsx)(m.Z,{children:(0,i.jsxs)(v.Z,{children:[(0,i.jsx)(Z.Z,{children:"Email"}),(0,i.jsx)(Z.Z,{children:"Name"}),(0,i.jsx)(Z.Z,{children:"Role"}),(0,i.jsx)(Z.Z,{children:"Status"}),(0,i.jsx)(Z.Z,{children:"Created At"})]})}),(0,i.jsx)(p.Z,{children:t.map(e=>(0,i.jsxs)(v.Z,{hover:!0,onClick:()=>r(e),sx:{cursor:"pointer"},children:[(0,i.jsx)(Z.Z,{children:e.email}),(0,i.jsx)(Z.Z,{children:e.name||"N/A"}),(0,i.jsx)(Z.Z,{children:"admin"===e.role?(0,i.jsx)(f.Z,{label:"Admin",color:"primary",size:"small"}):(0,i.jsx)(f.Z,{label:"User",size:"small"})}),(0,i.jsx)(Z.Z,{children:e.banned?(0,i.jsx)(f.Z,{label:"Banned",color:"error",size:"small"}):(0,i.jsx)(f.Z,{label:"Active",color:"success",size:"small"})}),(0,i.jsx)(Z.Z,{children:new Date(e.createdAt).toLocaleString("en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!1})})]},e.id))})]})})}var j=r(99770),b=r(62508),y=r(79983),w=r(5682),C=r(69123),A=r(71185);function S(e){let{user:t,open:r,onClose:n}=e;return(0,i.jsxs)(j.Z,{open:r,onClose:n,maxWidth:"sm",fullWidth:!0,children:[(0,i.jsx)(b.Z,{children:(0,i.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[(0,i.jsx)(s.Z,{variant:"h6",children:"User Details"}),(0,i.jsx)(y.Z,{onClick:n,size:"small","aria-label":"close",children:(0,i.jsx)(A.Z,{})})]})}),(0,i.jsx)(w.Z,{children:(0,i.jsxs)(l.Z,{sx:{display:"flex",flexDirection:"column",gap:2},children:[(0,i.jsxs)(l.Z,{children:[(0,i.jsx)(s.Z,{variant:"caption",color:"text.secondary",children:"Email"}),(0,i.jsx)(s.Z,{variant:"body1",children:t.email})]}),(0,i.jsxs)(l.Z,{children:[(0,i.jsx)(s.Z,{variant:"caption",color:"text.secondary",children:"Name"}),(0,i.jsx)(s.Z,{variant:"body1",children:t.name||"N/A"})]}),(0,i.jsxs)(l.Z,{children:[(0,i.jsx)(s.Z,{variant:"caption",color:"text.secondary",children:"Role"}),(0,i.jsx)(l.Z,{sx:{mt:.5},children:"admin"===t.role?(0,i.jsx)(f.Z,{label:"Admin",color:"primary",size:"small"}):(0,i.jsx)(f.Z,{label:"User",size:"small"})})]}),(0,i.jsxs)(l.Z,{children:[(0,i.jsx)(s.Z,{variant:"caption",color:"text.secondary",children:"Status"}),(0,i.jsx)(l.Z,{sx:{mt:.5},children:t.banned?(0,i.jsx)(f.Z,{label:"Banned",color:"error",size:"small"}):(0,i.jsx)(f.Z,{label:"Active",color:"success",size:"small"})})]}),(0,i.jsx)(C.Z,{}),(0,i.jsxs)(l.Z,{children:[(0,i.jsx)(s.Z,{variant:"caption",color:"text.secondary",children:"Created At"}),(0,i.jsx)(s.Z,{variant:"body2",children:new Date(t.createdAt).toLocaleString("en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!1})})]}),(0,i.jsxs)(l.Z,{children:[(0,i.jsx)(s.Z,{variant:"caption",color:"text.secondary",children:"User ID"}),(0,i.jsx)(s.Z,{variant:"body2",sx:{fontSize:"0.875rem"},children:t.id})]})]})})]})}function R(){let{data:e,isLoading:t,isError:r,error:h}=(0,c.a)({queryKey:["admin","users"],queryFn:async()=>{let{data:e,error:t}=await d.zB.listUsers({query:{}});if(t)throw Error(t.message||"Failed to fetch users");return(null==e?void 0:e.users)?e.users.map(e=>{var t,r,i;return{id:e.id,email:e.email,name:null!==(t=e.name)&&void 0!==t?t:null,role:null!==(r=e.role)&&void 0!==r?r:"user",banned:null!==(i=e.banned)&&void 0!==i&&i,createdAt:new Date(e.createdAt)}}):[]}}),[u,x]=(0,n.useState)(null);return t?(0,i.jsx)(l.Z,{sx:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"400px"},children:(0,i.jsx)(a.Z,{})}):r?(0,i.jsx)(l.Z,{sx:{p:3},children:(0,i.jsxs)(o.Z,{severity:"error",children:["Failed to load users. ",(null==h?void 0:h.message)||"Please try again later."]})}):(0,i.jsxs)(l.Z,{sx:{p:3},children:[(0,i.jsx)(s.Z,{variant:"h4",component:"h1",gutterBottom:!0,children:"User Management"}),(0,i.jsx)(g,{users:e||[],onUserClick:e=>{x(e)}}),u&&(0,i.jsx)(S,{user:u,open:!0,onClose:()=>{x(null)}})]})}},6986:function(e,t,r){"use strict";r.d(t,{Cp:function(){return u},Nq:function(){return h},cg:function(){return o},kP:function(){return d},w7:function(){return s},y1:function(){return c},zB:function(){return x}});var i=r(77054),n=r(61648),l=r(35016);let a=(0,i.X)({baseURL:l.env.NEXT_PUBLIC_BETTER_AUTH_URL||"",plugins:[(0,n.zB)()]}),{signIn:o,signOut:s,signUp:c,useSession:d,updateUser:h,changePassword:u}=a,x=a.admin}},function(e){e.O(0,[6812,9760,5004,1071,540,4416,2542,3938,2844,3669,2757,1744],function(){return e(e.s=66289)}),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4743],{3590:function(e,t,r){Promise.resolve().then(r.bind(r,98885))},98885:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return eh}});var n=r(94655),s=r(35106),i=r(74228),a=r(7281),o=r(69899),l=r(31317),c=r(25333),d=r(76492),u=r(80620),x=r(78439),h=r(56813),m=r(26892),p=r(84840),g=r(628),j=r(41565),f=r(10721),v=r(69178),Z=r(46207),y=r(45354),b=r(35847);function S(e){var t,r,s;let{stats:i,isLoading:o}=e;if(o)return(0,n.jsx)(p.ZP,{container:!0,spacing:2,children:[0,1,2,3].map(e=>(0,n.jsx)(p.ZP,{item:!0,xs:6,md:3,children:(0,n.jsx)(g.Z,{children:(0,n.jsxs)(j.Z,{children:[(0,n.jsx)(f.Z,{variant:"text",width:"60%"}),(0,n.jsx)(f.Z,{variant:"text",width:"40%",height:40}),(0,n.jsx)(f.Z,{variant:"text",width:"80%"})]})})},e))});let c=null!==(t=null==i?void 0:i.total)&&void 0!==t?t:0,d=c>0?((null!==(r=null==i?void 0:i.byStatus.success)&&void 0!==r?r:0)/c*100).toFixed(1):"0.0",u=null!==(s=null==i?void 0:i.byStatus.failure)&&void 0!==s?s:0,x=i?Object.keys(i.byActor).length:0,h=[{title:"Total Logs",value:c.toLocaleString(),icon:(0,n.jsx)(v.Z,{fontSize:"large"}),color:"#1bd96a",description:"All audit log entries"},{title:"Success Rate",value:"".concat(d,"%"),icon:(0,n.jsx)(Z.Z,{fontSize:"large"}),color:"#22c55e",description:"Successful operations"},{title:"Failures",value:u,icon:(0,n.jsx)(y.Z,{fontSize:"large"}),color:"#ef4444",description:"Failed operations"},{title:"Active Users",value:x,icon:(0,n.jsx)(b.Z,{fontSize:"large"}),color:"#3b82f6",description:"Unique actors"}];return(0,n.jsx)(p.ZP,{container:!0,spacing:2,children:h.map(e=>(0,n.jsx)(p.ZP,{item:!0,xs:6,md:3,children:(0,n.jsx)(g.Z,{sx:{height:"100%",position:"relative",overflow:"hidden","&::before":{content:'""',position:"absolute",top:0,left:0,right:0,height:"4px",background:e.color}},children:(0,n.jsxs)(j.Z,{children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:2},children:[(0,n.jsx)(l.Z,{variant:"body2",color:"text.secondary",sx:{fontWeight:500},children:e.title}),(0,n.jsx)(a.Z,{sx:{color:e.color,opacity:.8},children:e.icon})]}),(0,n.jsx)(l.Z,{variant:"h3",component:"div",sx:{fontWeight:700,color:"text.primary",mb:1},children:e.value}),(0,n.jsx)(l.Z,{variant:"caption",color:"text.secondary",children:e.description})]})})},e.title))})}var C=r(97436),w=r(62328),T=r(7178),k=r(29793),z=r(75726),N=r(30417),R=r(87716),A=r(79983),E=r(89923),I=r(10297),L=r(50880),F=r(54617),D=r(42431),P=r(81960),W=r(84284),M=r(82925);function O(e){return"server"===e?M.Xn:"player"===e?M.KK:M.xg}function U(e){let t,{filters:r,onFiltersChange:i,onExport:o}=e,[d,u]=(0,s.useState)(!0),x=(t=0,r.action&&t++,r.actor&&t++,r.targetType&&t++,r.targetName&&t++,r.status&&t++,r.from&&t++,r.to&&t++,t),h=O(r.targetType),m=(e,t)=>{let n={...r};""===t||void 0===t?delete n[e]:n[e]=t,"targetType"===e&&n.action&&!O(t).includes(n.action)&&delete n.action,n.offset=0,i(n)};return(0,n.jsxs)(a.Z,{sx:{mb:3},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:d?2:0},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,n.jsxs)(A.Z,{onClick:()=>u(!d),size:"small","aria-label":d?"Collapse filters":"Expand filters",children:[(0,n.jsx)(L.Z,{}),d?(0,n.jsx)(W.Z,{sx:{fontSize:14}}):(0,n.jsx)(P.Z,{sx:{fontSize:14}})]}),(0,n.jsx)(l.Z,{variant:"subtitle2",color:"text.secondary",children:"Filters"}),x>0&&(0,n.jsx)(c.Z,{label:x,size:"small",color:"primary",sx:{height:20,fontSize:"0.7rem"}})]}),(0,n.jsxs)(a.Z,{sx:{display:"flex",gap:1},children:[x>0&&(0,n.jsx)(N.Z,{size:"small",startIcon:(0,n.jsx)(F.Z,{}),onClick:()=>{i({limit:r.limit,sort:r.sort})},color:"inherit",children:"Clear All"}),o&&(0,n.jsx)(N.Z,{size:"small",variant:"outlined",onClick:o,children:"Export"})]})]}),(0,n.jsx)(R.Z,{in:d,children:(0,n.jsxs)(a.Z,{sx:{display:"flex",flexDirection:{xs:"column",md:"row"},gap:2,flexWrap:"wrap"},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",gap:1,alignItems:"center"},children:[(0,n.jsx)(C.Z,{type:"date",label:"From",size:"small",value:r.from?r.from.split("T")[0]:"",onChange:e=>{let t=e.target.value;m("from",t?"".concat(t,"T00:00:00Z"):void 0)},InputLabelProps:{shrink:!0},sx:{minWidth:150}}),(0,n.jsx)(l.Z,{variant:"body2",color:"text.secondary",children:"~"}),(0,n.jsx)(C.Z,{type:"date",label:"To",size:"small",value:r.to?r.to.split("T")[0]:"",onChange:e=>{let t=e.target.value;m("to",t?"".concat(t,"T23:59:59Z"):void 0)},InputLabelProps:{shrink:!0},sx:{minWidth:150}})]}),(0,n.jsxs)(k.Z,{size:"small",sx:{minWidth:160},children:[(0,n.jsx)(z.Z,{children:"Action"}),(0,n.jsxs)(w.Z,{value:r.action||"",label:"Action",onChange:e=>m("action",e.target.value||void 0),children:[(0,n.jsx)(T.Z,{value:"",children:"All Actions"}),h.map(e=>(0,n.jsx)(T.Z,{value:e,children:M.n3[e]||e},e))]})]}),(0,n.jsx)(a.Z,{children:(0,n.jsxs)(I.Z,{value:r.targetType||"",exclusive:!0,onChange:(e,t)=>m("targetType",t||void 0),size:"small",children:[(0,n.jsx)(E.Z,{value:"","aria-label":"All targets",children:"All"}),(0,n.jsx)(E.Z,{value:"server","aria-label":"Server targets",children:"Server"}),(0,n.jsx)(E.Z,{value:"player","aria-label":"Player targets",children:"Player"})]})}),(0,n.jsx)(a.Z,{children:(0,n.jsxs)(I.Z,{value:r.status||"",exclusive:!0,onChange:(e,t)=>m("status",t||void 0),size:"small",children:[(0,n.jsx)(E.Z,{value:"","aria-label":"All statuses",children:"All"}),(0,n.jsx)(E.Z,{value:"success","aria-label":"Success only",children:"Success"}),(0,n.jsx)(E.Z,{value:"failure","aria-label":"Failure only",children:"Failure"})]})}),(0,n.jsx)(C.Z,{label:"Target Name",placeholder:"Search...",size:"small",value:r.targetName||"",onChange:e=>m("targetName",e.target.value||void 0),InputProps:{startAdornment:(0,n.jsx)(D.Z,{sx:{color:"text.secondary",mr:.5,fontSize:18}})},sx:{minWidth:160}}),(0,n.jsx)(C.Z,{label:"Actor",placeholder:"e.g., api:admin",size:"small",value:r.actor||"",onChange:e=>m("actor",e.target.value||void 0),sx:{minWidth:140}})]})})]})}var q=r(83765),K=r(62142),_=r(69123),B=r(81071),V=r(21138),X=r(84811),J=r(47001),H=r(70366),G=r(33402),Q=r(60097),Y=r(90158),$=r(58347),ee=r(73424),et=r(93017),er=r(71185),en=r(84509);function es(e){let{logs:t}=e;return 0===t.length?(0,n.jsx)(l.Z,{variant:"body2",color:"text.secondary",sx:{py:2,textAlign:"center"},children:"No related logs found"}):(0,n.jsx)(Y.Z,{dense:!0,sx:{py:0},children:t.map(e=>(0,n.jsx)($.ZP,{sx:{px:0,py:1,"&:not(:last-child)":{borderBottom:"1px solid",borderColor:"divider"}},children:(0,n.jsx)(ee.Z,{primary:(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,n.jsx)(h.I,{action:e.action,size:"small"}),e.targetName&&(0,n.jsx)(l.Z,{variant:"body2",color:"text.secondary",children:e.targetName})]}),secondary:function(e){let t=new Date,r=new Date(e),n=Math.floor((t.getTime()-r.getTime())/6e4),s=Math.floor(n/60);return n<60?"".concat(n,"m ago"):s<24?"".concat(s,"h ago"):"".concat(Math.floor(s/24),"d ago")}(e.timestamp)})},e.id))})}function ei(e){var t,r,i,o,c;let{log:d,open:u,onClose:x}=e,[p,g]=(0,s.useState)(0),{data:j,isLoading:f}=(0,en.VM)(null!==(t=null==d?void 0:d.id)&&void 0!==t?t:null,{enabled:u&&!!d});return(0,n.jsxs)(K.ZP,{anchor:"right",open:u,onClose:x,sx:{"& .MuiDrawer-paper":{width:{xs:"100%",sm:420},maxWidth:"100%"}},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",p:2,borderBottom:"1px solid",borderColor:"divider"},children:[(0,n.jsx)(l.Z,{variant:"h6",component:"h2",children:"Audit Log Detail"}),(0,n.jsx)(A.Z,{onClick:x,"aria-label":"Close detail drawer",autoFocus:!0,children:(0,n.jsx)(er.Z,{})})]}),(0,n.jsx)(a.Z,{sx:{p:2,overflow:"auto",flex:1},children:d?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(a.Z,{sx:{mb:3},children:[(0,n.jsx)(l.Z,{variant:"caption",color:"text.secondary",sx:{display:"block",mb:.5},children:"ID"}),(0,n.jsx)(l.Z,{variant:"body2",sx:{fontSize:"0.8rem",wordBreak:"break-all"},children:d.id})]}),(0,n.jsxs)(a.Z,{sx:{mb:3},children:[(0,n.jsx)(l.Z,{variant:"caption",color:"text.secondary",sx:{display:"block",mb:.5},children:"Timestamp"}),(0,n.jsx)(l.Z,{variant:"body2",children:function(e){let t=new Date(e);return new Intl.DateTimeFormat(void 0,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:"short"}).format(t)}(d.timestamp)})]}),(0,n.jsxs)(a.Z,{sx:{display:"flex",gap:3,mb:3},children:[(0,n.jsxs)(a.Z,{children:[(0,n.jsx)(l.Z,{variant:"caption",color:"text.secondary",sx:{display:"block",mb:.5},children:"Action"}),(0,n.jsx)(h.I,{action:d.action,size:"medium"})]}),(0,n.jsxs)(a.Z,{children:[(0,n.jsx)(l.Z,{variant:"caption",color:"text.secondary",sx:{display:"block",mb:.5},children:"Status"}),(0,n.jsx)(m.c,{status:d.status,size:"medium"})]})]}),(0,n.jsxs)(a.Z,{sx:{mb:3},children:[(0,n.jsx)(l.Z,{variant:"caption",color:"text.secondary",sx:{display:"block",mb:.5},children:"Actor"}),(0,n.jsx)(l.Z,{variant:"body2",children:d.actor})]}),(0,n.jsxs)(a.Z,{sx:{mb:3},children:[(0,n.jsx)(l.Z,{variant:"caption",color:"text.secondary",sx:{display:"block",mb:.5},children:"Target"}),(0,n.jsxs)(l.Z,{variant:"body2",children:[d.targetType,"/",d.targetName]})]}),"failure"===d.status&&d.errorMessage&&(0,n.jsx)(B.Z,{severity:"error",sx:{mb:3},children:d.errorMessage}),d.details&&Object.keys(d.details).length>0&&(0,n.jsxs)(a.Z,{sx:{mb:3},children:[(0,n.jsx)(_.Z,{sx:{mb:2}}),(0,n.jsx)(l.Z,{variant:"subtitle2",sx:{mb:1},children:"Details"}),(0,n.jsx)(V.Z,{size:"small",children:(0,n.jsx)(X.Z,{children:Object.entries(d.details).map(e=>{let[t,r]=e;return(0,n.jsxs)(H.Z,{children:[(0,n.jsx)(J.Z,{sx:{fontWeight:600,color:"text.secondary",border:"none",py:.5,pl:0,width:"40%"},children:t}),(0,n.jsx)(J.Z,{sx:{border:"none",py:.5},children:String(r)})]},t)})})})]}),(0,n.jsx)(_.Z,{sx:{mb:2}}),(0,n.jsx)(l.Z,{variant:"subtitle2",sx:{mb:1},children:"Related Logs"}),f?(0,n.jsx)(a.Z,{sx:{display:"flex",justifyContent:"center",py:3},children:(0,n.jsx)(et.Z,{size:24})}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(G.Z,{value:p,onChange:(e,t)=>g(t),sx:{mb:1},children:[(0,n.jsx)(Q.Z,{label:"Same Target (".concat(null!==(r=null==j?void 0:j.relatedLogs.sameTarget.length)&&void 0!==r?r:0,")"),sx:{textTransform:"none",fontSize:"0.8rem"}}),(0,n.jsx)(Q.Z,{label:"Same Actor (".concat(null!==(i=null==j?void 0:j.relatedLogs.sameActor.length)&&void 0!==i?i:0,")"),sx:{textTransform:"none",fontSize:"0.8rem"}})]}),0===p&&(0,n.jsx)(es,{logs:null!==(o=null==j?void 0:j.relatedLogs.sameTarget)&&void 0!==o?o:[]}),1===p&&(0,n.jsx)(es,{logs:null!==(c=null==j?void 0:j.relatedLogs.sameActor)&&void 0!==c?c:[]})]})]}):(0,n.jsx)(l.Z,{color:"text.secondary",children:"No log selected"})})]})}var ea=r(99770),eo=r(62508),el=r(5682),ec=r(76678),ed=r(15761);function eu(e){let{open:t,onClose:r,filters:i,totalCount:o}=e,[c,d]=(0,s.useState)("csv"),[u,x]=(0,s.useState)(!1),[h,m]=(0,s.useState)(null),p=function(e){let t=[];return e.action&&t.push("Action: ".concat(e.action)),e.actor&&t.push("Actor: ".concat(e.actor)),e.targetType&&t.push("Type: ".concat(e.targetType)),e.targetName&&t.push("Target: ".concat(e.targetName)),e.status&&t.push("Status: ".concat(e.status)),e.from&&t.push("From: ".concat(e.from.split("T")[0])),e.to&&t.push("To: ".concat(e.to.split("T")[0])),t}(i),g=async()=>{x(!0),m(null);try{let e=function(e,t){let r=new URLSearchParams;return r.set("format",t),e.action&&r.set("action",e.action),e.actor&&r.set("actor",e.actor),e.targetType&&r.set("targetType",e.targetType),e.targetName&&r.set("targetName",e.targetName),e.status&&r.set("status",e.status),e.from&&r.set("from",e.from),e.to&&r.set("to",e.to),"/api/audit-logs/export?".concat(r.toString())}(i,c),t=await fetch(e);if(!t.ok){let e=await t.json().catch(()=>({message:"Export failed"}));throw Error(e.message||"Export failed")}let n=await t.blob(),s=window.URL.createObjectURL(n),a=document.createElement("a");a.href=s;let o=t.headers.get("Content-Disposition"),l=null==o?void 0:o.match(/filename="?([^"]+)"?/);a.download=(null==l?void 0:l[1])||"audit-logs.".concat(c),document.body.appendChild(a),a.click(),document.body.removeChild(a),window.URL.revokeObjectURL(s),r()}catch(e){m(e instanceof Error?e.message:"Export failed")}finally{x(!1)}};return(0,n.jsxs)(ea.Z,{open:t,onClose:r,maxWidth:"sm",fullWidth:!0,children:[(0,n.jsx)(eo.Z,{children:"Export Audit Logs"}),(0,n.jsxs)(el.Z,{children:[(0,n.jsxs)(a.Z,{sx:{mb:3},children:[(0,n.jsx)(l.Z,{variant:"subtitle2",sx:{mb:1},children:"Format"}),(0,n.jsxs)(I.Z,{value:c,exclusive:!0,onChange:(e,t)=>t&&d(t),size:"small",children:[(0,n.jsx)(E.Z,{value:"csv",children:"CSV"}),(0,n.jsx)(E.Z,{value:"json",children:"JSON"})]})]}),(0,n.jsxs)(a.Z,{sx:{mb:3},children:[(0,n.jsx)(l.Z,{variant:"subtitle2",sx:{mb:1},children:"Applied Filters"}),p.length>0?(0,n.jsx)(a.Z,{sx:{display:"flex",flexDirection:"column",gap:.5},children:p.map(e=>(0,n.jsx)(l.Z,{variant:"body2",color:"text.secondary",children:e},e))}):(0,n.jsx)(l.Z,{variant:"body2",color:"text.secondary",children:"No filters applied (all logs)"})]}),(0,n.jsxs)(a.Z,{sx:{mb:2},children:[(0,n.jsx)(l.Z,{variant:"subtitle2",sx:{mb:.5},children:"Estimated Rows"}),(0,n.jsxs)(l.Z,{variant:"body2",color:"text.secondary",children:[Math.min(o,5e3).toLocaleString()," rows"]})]}),o>5e3&&(0,n.jsxs)(B.Z,{severity:"warning",sx:{mb:2},children:["Export is limited to ",5e3.toLocaleString()," rows. Total matching logs: ",o.toLocaleString(),". Consider narrowing your filters for a complete export."]}),h&&(0,n.jsx)(B.Z,{severity:"error",sx:{mb:2},children:h})]}),(0,n.jsxs)(ec.Z,{children:[(0,n.jsx)(N.Z,{onClick:r,disabled:u,children:"Cancel"}),(0,n.jsx)(N.Z,{variant:"contained",startIcon:u?(0,n.jsx)(et.Z,{size:16,color:"inherit"}):(0,n.jsx)(ed.Z,{}),onClick:g,disabled:u,children:u?"Exporting...":"Export ".concat(c.toUpperCase())})]})]})}var ex=r(93757);function eh(){var e,t,r;let h=(0,i.useRouter)(),m=(0,i.useSearchParams)(),[p,g]=(0,s.useState)(()=>(function(e){let t={},r=e.get("action"),n=e.get("actor"),s=e.get("targetType"),i=e.get("targetName"),a=e.get("status"),o=e.get("from"),l=e.get("to"),c=e.get("limit"),d=e.get("offset"),u=e.get("sort");return r&&(t.action=r),n&&(t.actor=n),s&&(t.targetType=s),i&&(t.targetName=i),a&&(t.status=a),o&&(t.from=o),l&&(t.to=l),c&&(t.limit=parseInt(c,10)),d&&(t.offset=parseInt(d,10)),("timestamp:asc"===u||"timestamp:desc"===u)&&(t.sort=u),t})(m)),[j,f]=(0,s.useState)(null),[v,Z]=(0,s.useState)(!1),[y,b]=(0,s.useState)(!1),[C,w]=(0,s.useState)(0),T=(0,s.useRef)(new Set),{data:k,isLoading:z,error:N,refetch:R}=(0,en.hT)(p),{data:A,isLoading:E}=(0,en.DM)(),{isConnected:I}=(0,ex.D)({url:"/api/audit-logs/stream",enabled:!0,onMessage:(0,s.useCallback)(e=>{if("audit-log"===e.type){let t=e.data;if("id"in t&&"string"==typeof t.id){if(T.current.has(t.id))return;if(T.current.add(t.id),T.current.size>1e3){let e=Array.from(T.current);T.current=new Set(e.slice(e.length-500))}}w(e=>e+1)}},[]),reconnectInterval:3e3,maxReconnectAttempts:1/0});(0,s.useEffect)(()=>{let e=function(e){let t=new URLSearchParams;e.action&&t.set("action",e.action),e.actor&&t.set("actor",e.actor),e.targetType&&t.set("targetType",e.targetType),e.targetName&&t.set("targetName",e.targetName),e.status&&t.set("status",e.status),e.from&&t.set("from",e.from),e.to&&t.set("to",e.to),e.limit&&50!==e.limit&&t.set("limit",String(e.limit)),e.offset&&e.offset>0&&t.set("offset",String(e.offset)),e.sort&&"timestamp:desc"!==e.sort&&t.set("sort",e.sort);let r=t.toString();return r?"?".concat(r):""}(p);e!==(m.toString()?"?".concat(m.toString()):"")&&h.replace("/audit-logs".concat(e),{scroll:!1})},[p,h,m]);let L=(0,s.useCallback)(e=>{g(e),w(0)},[]),F=(0,s.useCallback)(e=>{f(e),Z(!0)},[]),D=(0,s.useCallback)(()=>{w(0),R()},[R]);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o.Z,{elevation:0,sx:{mb:4,p:3,background:e=>"linear-gradient(135deg, ".concat((0,d.Fq)(e.palette.warning.main,.1)," 0%, ").concat((0,d.Fq)(e.palette.error.main,.1)," 100%)"),borderRadius:2,border:e=>"1px solid ".concat((0,d.Fq)(e.palette.warning.main,.2))},children:(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",gap:2},children:[(0,n.jsx)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:56,height:56,borderRadius:2,bgcolor:"warning.main",color:"warning.contrastText"},children:(0,n.jsx)(u.Z,{sx:{fontSize:32}})}),(0,n.jsxs)(a.Z,{sx:{flex:1},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",gap:1.5},children:[(0,n.jsx)(l.Z,{variant:"h4",component:"h1",fontWeight:"bold",children:"Audit Log"}),(0,n.jsx)(c.Z,{icon:(0,n.jsx)(x.Z,{sx:{fontSize:10,color:I?"success.main":"text.disabled",animation:I?"pulse 2s infinite":"none","@keyframes pulse":{"0%":{opacity:1},"50%":{opacity:.4},"100%":{opacity:1}}}}),label:I?"Live":"Offline",size:"small",variant:"outlined",sx:{fontSize:"0.7rem"}})]}),(0,n.jsx)(l.Z,{variant:"body1",color:"text.secondary",children:"Monitor all management activities across your servers"})]})]})}),(0,n.jsx)(a.Z,{sx:{mb:3},children:(0,n.jsx)(S,{stats:A,isLoading:E})}),C>0&&(0,n.jsx)(a.Z,{sx:{mb:2,p:1.5,textAlign:"center",bgcolor:"primary.main",color:"primary.contrastText",borderRadius:1,cursor:"pointer","&:hover":{opacity:.9}},onClick:D,role:"button","aria-label":"".concat(C," new logs, click to refresh"),children:(0,n.jsxs)(l.Z,{variant:"body2",fontWeight:600,children:[C," new ",1===C?"log":"logs"," available - Click to refresh"]})}),(0,n.jsx)(U,{filters:p,onFiltersChange:L,onExport:()=>b(!0)}),(0,n.jsx)(q.x,{logs:null!==(e=null==k?void 0:k.logs)&&void 0!==e?e:[],total:null!==(t=null==k?void 0:k.total)&&void 0!==t?t:0,isLoading:z,error:N,filters:p,onFiltersChange:L,onRowClick:F,onRetry:()=>R()}),(0,n.jsx)(ei,{log:j,open:v,onClose:()=>{Z(!1),f(null)}}),(0,n.jsx)(eu,{open:y,onClose:()=>b(!1),filters:p,totalCount:null!==(r=null==k?void 0:k.total)&&void 0!==r?r:0})]})}},56813:function(e,t,r){"use strict";r.d(t,{I:function(){return a}});var n=r(94655),s=r(25333),i=r(82925);function a(e){let{action:t,size:r="small"}=e,a=i.Lu[t]||"default",o=i.n3[t]||t;return(0,n.jsx)(s.Z,{label:o,color:a,size:r,variant:"filled",sx:{fontWeight:600,fontSize:"small"===r?"0.7rem":"0.8rem"}})}},26892:function(e,t,r){"use strict";r.d(t,{c:function(){return o}});var n=r(94655),s=r(25333),i=r(46207),a=r(43436);function o(e){let{status:t,size:r="small"}=e;return(0,n.jsx)(s.Z,{icon:"success"===t?(0,n.jsx)(i.Z,{}):(0,n.jsx)(a.Z,{}),label:"success"===t?"OK":"Error",color:"success"===t?"success":"error",size:r,variant:"outlined",sx:{fontWeight:500,fontSize:"small"===r?"0.7rem":"0.8rem"}})}},83765:function(e,t,r){"use strict";r.d(t,{x:function(){return A}});var n=r(94655),s=r(35106),i=r(7281),a=r(21138),o=r(84811),l=r(47001),c=r(53281),d=r(11254),u=r(70366),x=r(6406),h=r(69899),m=r(31317),p=r(95511),g=r(10721),j=r(81071),f=r(30417),v=r(25333),Z=r(87716),y=r(79983),b=r(89161),S=r(60236),C=r(27171),w=r(30114),T=r(69178),k=r(46725),z=r(56813),N=r(26892);function R(e){var t,r;let{log:c,onClick:d,hideTargetColumn:x}=e,[h,g]=(0,s.useState)("failure"===c.status),f=c.details&&Object.keys(c.details).length>0,T="failure"===c.status&&c.errorMessage,R=f||T,A=(t=c.targetType,r=c.targetName,"server"===t?"/servers/".concat(encodeURIComponent(r)):"player"===t?"/players":null);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(u.Z,{hover:!0,sx:{cursor:"pointer","&:last-child td, &:last-child th":{border:0}},onClick:()=>null==d?void 0:d(c),tabIndex:0,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),null==d||d(c))},role:"button","aria-label":"".concat(c.action," by ").concat(c.actor," on ").concat(c.targetName),children:[(0,n.jsx)(l.Z,{padding:"checkbox",sx:{width:48},children:R&&(0,n.jsx)(y.Z,{size:"small",onClick:e=>{e.stopPropagation(),g(!h)},"aria-label":h?"Collapse details":"Expand details",children:h?(0,n.jsx)(S.Z,{}):(0,n.jsx)(b.Z,{})})}),(0,n.jsx)(l.Z,{children:(0,n.jsx)(p.Z,{title:function(e){let t=new Date(e);return new Intl.DateTimeFormat(void 0,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:"short"}).format(t)}(c.timestamp),arrow:!0,children:(0,n.jsx)(m.Z,{variant:"body2",color:"text.secondary",sx:{whiteSpace:"nowrap"},children:function(e){let t=new Date,r=new Date(e),n=Math.floor((t.getTime()-r.getTime())/1e3),s=Math.floor(n/60),i=Math.floor(s/60),a=Math.floor(i/24);return n<60?"just now":s<60?"".concat(s,"m ago"):i<24?"".concat(i,"h ago"):a<7?"".concat(a,"d ago"):new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"}).format(r)}(c.timestamp)})})}),(0,n.jsx)(l.Z,{children:(0,n.jsx)(z.I,{action:c.action})}),(0,n.jsx)(l.Z,{children:c.actor.startsWith("cli:")?(0,n.jsx)(v.Z,{label:c.actor.replace("cli:",""),size:"small",variant:"outlined",sx:{fontSize:"0.75rem"}}):(0,n.jsx)(m.Z,{variant:"body2",children:c.actor.replace("api:","")})}),!x&&(0,n.jsx)(l.Z,{children:(0,n.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center"},children:[function(e){switch(e){case"server":return(0,n.jsx)(C.Z,{sx:{fontSize:16,mr:.5,color:"text.secondary"}});case"player":return(0,n.jsx)(w.Z,{sx:{fontSize:16,mr:.5,color:"text.secondary"}});default:return null}}(c.targetType),A?(0,n.jsx)(k.default,{href:A,style:{textDecoration:"none"},onClick:e=>e.stopPropagation(),children:(0,n.jsx)(m.Z,{variant:"body2",sx:{color:"primary.main","&:hover":{textDecoration:"underline"}},children:c.targetName})}):(0,n.jsx)(m.Z,{variant:"body2",children:c.targetName})]})}),(0,n.jsx)(l.Z,{children:(0,n.jsx)(N.c,{status:c.status})})]}),R&&(0,n.jsx)(u.Z,{children:(0,n.jsx)(l.Z,{sx:{py:0},colSpan:x?5:6,children:(0,n.jsx)(Z.Z,{in:h,timeout:"auto",unmountOnExit:!0,children:(0,n.jsxs)(i.Z,{sx:{py:2,px:2},children:[T&&(0,n.jsx)(j.Z,{severity:"error",sx:{mb:2},children:c.errorMessage}),f&&(0,n.jsxs)(i.Z,{children:[(0,n.jsx)(m.Z,{variant:"caption",color:"text.secondary",sx:{mb:1,display:"block"},children:"Details"}),(0,n.jsx)(a.Z,{size:"small",sx:{width:"auto"},children:(0,n.jsx)(o.Z,{children:Object.entries(c.details).map(e=>{let[t,r]=e;return(0,n.jsxs)(u.Z,{children:[(0,n.jsx)(l.Z,{sx:{fontWeight:600,color:"text.secondary",border:"none",py:.5,pl:0},children:t}),(0,n.jsx)(l.Z,{sx:{border:"none",py:.5},children:String(r)})]},t)})})})]})]})})})})]})}function A(e){let{logs:t,total:r,isLoading:s,error:i,filters:p,onFiltersChange:v,onRowClick:Z,onRetry:y,hideTargetColumn:b,rowsPerPageOptions:S=[25,50,100]}=e,C=Math.floor((p.offset||0)/(p.limit||50)),w=p.limit||50;return s?(0,n.jsx)(h.Z,{children:(0,n.jsx)(c.Z,{children:(0,n.jsxs)(a.Z,{children:[(0,n.jsx)(d.Z,{children:(0,n.jsxs)(u.Z,{children:[(0,n.jsx)(l.Z,{padding:"checkbox"}),(0,n.jsx)(l.Z,{children:"Timestamp"}),(0,n.jsx)(l.Z,{children:"Action"}),(0,n.jsx)(l.Z,{children:"Actor"}),!b&&(0,n.jsx)(l.Z,{children:"Target"}),(0,n.jsx)(l.Z,{children:"Status"})]})}),(0,n.jsx)(o.Z,{children:[void 0,void 0,void 0,void 0,void 0].map((e,t)=>(0,n.jsxs)(u.Z,{children:[(0,n.jsx)(l.Z,{padding:"checkbox"}),(0,n.jsx)(l.Z,{children:(0,n.jsx)(g.Z,{variant:"text",width:80})}),(0,n.jsx)(l.Z,{children:(0,n.jsx)(g.Z,{variant:"rounded",width:70,height:24})}),(0,n.jsx)(l.Z,{children:(0,n.jsx)(g.Z,{variant:"text",width:60})}),!b&&(0,n.jsx)(l.Z,{children:(0,n.jsx)(g.Z,{variant:"text",width:100})}),(0,n.jsx)(l.Z,{children:(0,n.jsx)(g.Z,{variant:"rounded",width:50,height:24})})]},t))})]})})}):i?(0,n.jsx)(j.Z,{severity:"error",action:y&&(0,n.jsx)(f.Z,{color:"inherit",size:"small",onClick:y,children:"Retry"}),children:i.message||"Failed to load audit logs"}):0===t.length?(0,n.jsxs)(h.Z,{sx:{p:6,textAlign:"center"},children:[(0,n.jsx)(T.Z,{sx:{fontSize:64,color:"text.disabled",mb:2}}),(0,n.jsx)(m.Z,{variant:"h6",color:"text.secondary",gutterBottom:!0,children:"No audit logs found"}),(0,n.jsx)(m.Z,{variant:"body2",color:"text.disabled",sx:{mb:2},children:"Try adjusting your filters or check back later."}),(0,n.jsx)(f.Z,{variant:"outlined",size:"small",onClick:()=>v({limit:p.limit,sort:p.sort}),children:"Reset Filters"})]}):(0,n.jsxs)(h.Z,{children:[(0,n.jsx)(c.Z,{sx:{overflowX:"auto"},children:(0,n.jsxs)(a.Z,{size:"small",children:[(0,n.jsx)(d.Z,{children:(0,n.jsxs)(u.Z,{children:[(0,n.jsx)(l.Z,{padding:"checkbox",sx:{width:48}}),(0,n.jsx)(l.Z,{sx:{fontWeight:600,whiteSpace:"nowrap"},children:"Timestamp"}),(0,n.jsx)(l.Z,{sx:{fontWeight:600},children:"Action"}),(0,n.jsx)(l.Z,{sx:{fontWeight:600},children:"Actor"}),!b&&(0,n.jsx)(l.Z,{sx:{fontWeight:600},children:"Target"}),(0,n.jsx)(l.Z,{sx:{fontWeight:600},children:"Status"})]})}),(0,n.jsx)(o.Z,{children:t.map(e=>(0,n.jsx)(R,{log:e,onClick:Z,hideTargetColumn:b},e.id))})]})}),(0,n.jsx)(x.Z,{component:"div",count:r,page:C,onPageChange:(e,t)=>{v({...p,offset:t*w})},rowsPerPage:w,onRowsPerPageChange:e=>{let t=parseInt(e.target.value,10);v({...p,limit:t,offset:0})},rowsPerPageOptions:S,"aria-label":"Audit log pagination"})]})}},42936:function(e,t,r){"use strict";async function n(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={...t.headers};t.body&&(r["Content-Type"]="application/json");let n=await fetch(e,{...t,headers:r});if(!n.ok){let e=await n.json().catch(()=>({error:"UnknownError",message:n.statusText})),t=Error(e.message);throw t.statusCode=n.status,t.code=e.error,t}return n.json()}r.d(t,{SC:function(){return n}})},84509:function(e,t,r){"use strict";r.d(t,{DM:function(){return a},HZ:function(){return l},VM:function(){return o},hT:function(){return i},oL:function(){return c}});var n=r(5632),s=r(42936);function i(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=function(e){let t=new URLSearchParams;e.action&&t.set("action",e.action),e.actor&&t.set("actor",e.actor),e.targetType&&t.set("targetType",e.targetType),e.targetName&&t.set("targetName",e.targetName),e.status&&t.set("status",e.status),e.from&&t.set("from",e.from),e.to&&t.set("to",e.to),void 0!==e.limit&&t.set("limit",String(e.limit)),void 0!==e.offset&&t.set("offset",String(e.offset)),e.sort&&t.set("sort",e.sort);let r=t.toString();return r?"?".concat(r):""}(e);return(0,n.a)({queryKey:["audit-logs",e],queryFn:()=>(0,s.SC)("/api/audit-logs".concat(r)),enabled:(null==t?void 0:t.enabled)!==!1})}function a(e){return(0,n.a)({queryKey:["audit-logs","stats"],queryFn:()=>(0,s.SC)("/api/audit-logs/stats"),enabled:(null==e?void 0:e.enabled)!==!1,refetchInterval:3e4})}function o(e,t){return(0,n.a)({queryKey:["audit-logs",e],queryFn:()=>(0,s.SC)("/api/audit-logs/".concat(encodeURIComponent(e))),enabled:(null==t?void 0:t.enabled)!==!1&&!!e})}function l(e,t){var r;return i({targetType:"server",targetName:e,limit:null!==(r=null==t?void 0:t.limit)&&void 0!==r?r:20,...null==t?void 0:t.extraParams},{enabled:(null==t?void 0:t.enabled)!==!1&&!!e})}function c(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10;return i({limit:e,sort:"timestamp:desc"})}},93757:function(e,t,r){"use strict";r.d(t,{D:function(){return i}});var n=r(35106);class s{connect(e){this.options=e,this.shouldReconnect=!0,this.establishConnection()}establishConnection(){this.options&&(this.updateState("connecting"),this.eventSource&&this.eventSource.close(),this.eventSource=new EventSource(this.options.url,{withCredentials:this.options.withCredentials||!1}),this.eventSource.onopen=()=>{this.updateState("connected"),this.retryCount=0,this.lastError=null},this.eventSource.onmessage=e=>{if(!e.data.startsWith(":"))try{var t,r;let n=JSON.parse(e.data);null===(r=this.options)||void 0===r||null===(t=r.onMessage)||void 0===t||t.call(r,n)}catch(e){console.warn("Failed to parse SSE message:",e)}},this.eventSource.onerror=()=>{var e,t;let r={message:"SSE connection error",code:"CONNECTION_ERROR",retryCount:this.retryCount,timestamp:new Date};this.lastError=r,this.updateState("error"),null===(t=this.options)||void 0===t||null===(e=t.onError)||void 0===e||e.call(t,r),this.shouldReconnect&&this.scheduleReconnect()})}scheduleReconnect(){var e,t;if(!this.options)return;let r=null!==(e=this.options.maxReconnectAttempts)&&void 0!==e?e:1/0;if(this.retryCount>=r)return;this.reconnectTimer&&clearTimeout(this.reconnectTimer);let n=null!==(t=this.options.reconnectInterval)&&void 0!==t?t:3e3;this.reconnectTimer=setTimeout(()=>{this.retryCount++,this.establishConnection()},n)}disconnect(){this.shouldReconnect=!1,this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.eventSource&&(this.eventSource.close(),this.eventSource=null),this.updateState("disconnected")}getState(){return this.state}isConnected(){return"connected"===this.state}getLastError(){return this.lastError}getRetryCount(){return this.retryCount}reconnect(){this.retryCount++,this.shouldReconnect=!0,this.eventSource&&(this.eventSource.close(),this.eventSource=null),this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.establishConnection()}updateState(e){var t,r;this.state=e,null===(r=this.options)||void 0===r||null===(t=r.onStateChange)||void 0===t||t.call(r,e)}constructor(){this.eventSource=null,this.state="disconnected",this.retryCount=0,this.lastError=null,this.reconnectTimer=null,this.options=null,this.shouldReconnect=!0}}function i(e){let{url:t,onMessage:r,onError:i,reconnectInterval:a=3e3,maxReconnectAttempts:o=1/0,enabled:l=!0,withCredentials:c=!1}=e,[d,u]=(0,n.useState)(null),[x,h]=(0,n.useState)("disconnected"),[m,p]=(0,n.useState)(null),[g,j]=(0,n.useState)(0),f=(0,n.useRef)(null),v=(0,n.useCallback)(e=>{u(e),null==r||r(e)},[r]),Z=(0,n.useCallback)(e=>{h(e),"connected"===e&&j(0)},[]),y=(0,n.useCallback)(e=>{p(e),"number"==typeof e.retryCount&&j(e.retryCount),null==i||i(e)},[i]),b=(0,n.useCallback)(()=>{f.current&&(f.current.reconnect(),j(f.current.getRetryCount()))},[]),S=(0,n.useCallback)(()=>{f.current&&f.current.disconnect()},[]);return(0,n.useEffect)(()=>{if(!l){f.current&&(f.current.disconnect(),f.current=null);return}return f.current||(f.current=new s),f.current.connect({url:t,onMessage:v,onStateChange:Z,onError:y,reconnectInterval:a,maxReconnectAttempts:o,withCredentials:c}),()=>{f.current&&(f.current.disconnect(),f.current=null)}},[t,l,a,o,c,v,Z,y]),{data:d,isConnected:"connected"===x,state:x,error:m,retryCount:g,reconnect:b,disconnect:S}}},82925:function(e,t,r){"use strict";r.d(t,{KK:function(){return o},Lu:function(){return n},Xn:function(){return a},n3:function(){return s},xg:function(){return i}});let n={"server.create":"success","server.delete":"error","server.start":"info","server.stop":"warning","server.restart":"secondary","player.whitelist.add":"success","player.whitelist.remove":"warning","player.ban":"error","player.unban":"success","player.op":"info","player.deop":"warning","player.kick":"error","audit.purge":"default"},s={"server.create":"Create","server.delete":"Delete","server.start":"Start","server.stop":"Stop","server.restart":"Restart","player.whitelist.add":"Whitelist Add","player.whitelist.remove":"Whitelist Remove","player.ban":"Ban","player.unban":"Unban","player.op":"Op","player.deop":"Deop","player.kick":"Kick","audit.purge":"Purge"},i=["server.create","server.delete","server.start","server.stop","server.restart","player.whitelist.add","player.whitelist.remove","player.ban","player.unban","player.op","player.deop","player.kick","audit.purge"],a=["server.create","server.delete","server.start","server.stop","server.restart"],o=["player.whitelist.add","player.whitelist.remove","player.ban","player.unban","player.op","player.deop","player.kick"]}},function(e){e.O(0,[6812,9760,5004,7296,7436,1071,540,4416,2538,880,5511,55,2844,8347,7073,9022,4302,1002,3669,2757,1744],function(){return e(e.s=3590)}),_N_E=e.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4743],{3590:function(e,t,r){Promise.resolve().then(r.bind(r,98885))},98885:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return eh}});var n=r(94655),s=r(35106),i=r(74228),a=r(7281),o=r(69899),l=r(31317),c=r(25333),d=r(76492),u=r(80620),x=r(78439),h=r(56813),m=r(26892),p=r(84840),g=r(628),j=r(41565),f=r(10721),v=r(69178),Z=r(46207),y=r(45354),b=r(35847);function S(e){var t,r,s;let{stats:i,isLoading:o}=e;if(o)return(0,n.jsx)(p.ZP,{container:!0,spacing:2,children:[0,1,2,3].map(e=>(0,n.jsx)(p.ZP,{item:!0,xs:6,md:3,children:(0,n.jsx)(g.Z,{children:(0,n.jsxs)(j.Z,{children:[(0,n.jsx)(f.Z,{variant:"text",width:"60%"}),(0,n.jsx)(f.Z,{variant:"text",width:"40%",height:40}),(0,n.jsx)(f.Z,{variant:"text",width:"80%"})]})})},e))});let c=null!==(t=null==i?void 0:i.total)&&void 0!==t?t:0,d=c>0?((null!==(r=null==i?void 0:i.byStatus.success)&&void 0!==r?r:0)/c*100).toFixed(1):"0.0",u=null!==(s=null==i?void 0:i.byStatus.failure)&&void 0!==s?s:0,x=i?Object.keys(i.byActor).length:0,h=[{title:"Total Logs",value:c.toLocaleString(),icon:(0,n.jsx)(v.Z,{fontSize:"large"}),color:"#1bd96a",description:"All audit log entries"},{title:"Success Rate",value:"".concat(d,"%"),icon:(0,n.jsx)(Z.Z,{fontSize:"large"}),color:"#22c55e",description:"Successful operations"},{title:"Failures",value:u,icon:(0,n.jsx)(y.Z,{fontSize:"large"}),color:"#ef4444",description:"Failed operations"},{title:"Active Users",value:x,icon:(0,n.jsx)(b.Z,{fontSize:"large"}),color:"#3b82f6",description:"Unique actors"}];return(0,n.jsx)(p.ZP,{container:!0,spacing:2,children:h.map(e=>(0,n.jsx)(p.ZP,{item:!0,xs:6,md:3,children:(0,n.jsx)(g.Z,{sx:{height:"100%",position:"relative",overflow:"hidden","&::before":{content:'""',position:"absolute",top:0,left:0,right:0,height:"4px",background:e.color}},children:(0,n.jsxs)(j.Z,{children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:2},children:[(0,n.jsx)(l.Z,{variant:"body2",color:"text.secondary",sx:{fontWeight:500},children:e.title}),(0,n.jsx)(a.Z,{sx:{color:e.color,opacity:.8},children:e.icon})]}),(0,n.jsx)(l.Z,{variant:"h3",component:"div",sx:{fontWeight:700,color:"text.primary",mb:1},children:e.value}),(0,n.jsx)(l.Z,{variant:"caption",color:"text.secondary",children:e.description})]})})},e.title))})}var C=r(97436),w=r(62328),T=r(7178),k=r(29793),z=r(75726),N=r(30417),R=r(87716),A=r(79983),E=r(89923),I=r(10297),L=r(50880),F=r(54617),D=r(42431),P=r(81960),W=r(84284),M=r(82925);function O(e){return"server"===e?M.Xn:"player"===e?M.KK:M.xg}function U(e){let t,{filters:r,onFiltersChange:i,onExport:o}=e,[d,u]=(0,s.useState)(!0),x=(t=0,r.action&&t++,r.actor&&t++,r.targetType&&t++,r.targetName&&t++,r.status&&t++,r.from&&t++,r.to&&t++,t),h=O(r.targetType),m=(e,t)=>{let n={...r};""===t||void 0===t?delete n[e]:n[e]=t,"targetType"===e&&n.action&&!O(t).includes(n.action)&&delete n.action,n.offset=0,i(n)};return(0,n.jsxs)(a.Z,{sx:{mb:3},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:d?2:0},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,n.jsxs)(A.Z,{onClick:()=>u(!d),size:"small","aria-label":d?"Collapse filters":"Expand filters",children:[(0,n.jsx)(L.Z,{}),d?(0,n.jsx)(W.Z,{sx:{fontSize:14}}):(0,n.jsx)(P.Z,{sx:{fontSize:14}})]}),(0,n.jsx)(l.Z,{variant:"subtitle2",color:"text.secondary",children:"Filters"}),x>0&&(0,n.jsx)(c.Z,{label:x,size:"small",color:"primary",sx:{height:20,fontSize:"0.7rem"}})]}),(0,n.jsxs)(a.Z,{sx:{display:"flex",gap:1},children:[x>0&&(0,n.jsx)(N.Z,{size:"small",startIcon:(0,n.jsx)(F.Z,{}),onClick:()=>{i({limit:r.limit,sort:r.sort})},color:"inherit",children:"Clear All"}),o&&(0,n.jsx)(N.Z,{size:"small",variant:"outlined",onClick:o,children:"Export"})]})]}),(0,n.jsx)(R.Z,{in:d,children:(0,n.jsxs)(a.Z,{sx:{display:"flex",flexDirection:{xs:"column",md:"row"},gap:2,flexWrap:"wrap"},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",gap:1,alignItems:"center"},children:[(0,n.jsx)(C.Z,{type:"date",label:"From",size:"small",value:r.from?r.from.split("T")[0]:"",onChange:e=>{let t=e.target.value;m("from",t?"".concat(t,"T00:00:00Z"):void 0)},InputLabelProps:{shrink:!0},sx:{minWidth:150}}),(0,n.jsx)(l.Z,{variant:"body2",color:"text.secondary",children:"~"}),(0,n.jsx)(C.Z,{type:"date",label:"To",size:"small",value:r.to?r.to.split("T")[0]:"",onChange:e=>{let t=e.target.value;m("to",t?"".concat(t,"T23:59:59Z"):void 0)},InputLabelProps:{shrink:!0},sx:{minWidth:150}})]}),(0,n.jsxs)(k.Z,{size:"small",sx:{minWidth:160},children:[(0,n.jsx)(z.Z,{children:"Action"}),(0,n.jsxs)(w.Z,{value:r.action||"",label:"Action",onChange:e=>m("action",e.target.value||void 0),children:[(0,n.jsx)(T.Z,{value:"",children:"All Actions"}),h.map(e=>(0,n.jsx)(T.Z,{value:e,children:M.n3[e]||e},e))]})]}),(0,n.jsx)(a.Z,{children:(0,n.jsxs)(I.Z,{value:r.targetType||"",exclusive:!0,onChange:(e,t)=>m("targetType",t||void 0),size:"small",children:[(0,n.jsx)(E.Z,{value:"","aria-label":"All targets",children:"All"}),(0,n.jsx)(E.Z,{value:"server","aria-label":"Server targets",children:"Server"}),(0,n.jsx)(E.Z,{value:"player","aria-label":"Player targets",children:"Player"})]})}),(0,n.jsx)(a.Z,{children:(0,n.jsxs)(I.Z,{value:r.status||"",exclusive:!0,onChange:(e,t)=>m("status",t||void 0),size:"small",children:[(0,n.jsx)(E.Z,{value:"","aria-label":"All statuses",children:"All"}),(0,n.jsx)(E.Z,{value:"success","aria-label":"Success only",children:"Success"}),(0,n.jsx)(E.Z,{value:"failure","aria-label":"Failure only",children:"Failure"})]})}),(0,n.jsx)(C.Z,{label:"Target Name",placeholder:"Search...",size:"small",value:r.targetName||"",onChange:e=>m("targetName",e.target.value||void 0),InputProps:{startAdornment:(0,n.jsx)(D.Z,{sx:{color:"text.secondary",mr:.5,fontSize:18}})},sx:{minWidth:160}}),(0,n.jsx)(C.Z,{label:"Actor",placeholder:"e.g., api:admin",size:"small",value:r.actor||"",onChange:e=>m("actor",e.target.value||void 0),sx:{minWidth:140}})]})})]})}var q=r(83765),K=r(62142),_=r(69123),B=r(81071),V=r(21138),X=r(84811),J=r(47001),H=r(70366),G=r(33402),Q=r(60097),Y=r(90158),$=r(58347),ee=r(73424),et=r(93017),er=r(71185),en=r(84509);function es(e){let{logs:t}=e;return 0===t.length?(0,n.jsx)(l.Z,{variant:"body2",color:"text.secondary",sx:{py:2,textAlign:"center"},children:"No related logs found"}):(0,n.jsx)(Y.Z,{dense:!0,sx:{py:0},children:t.map(e=>(0,n.jsx)($.ZP,{sx:{px:0,py:1,"&:not(:last-child)":{borderBottom:"1px solid",borderColor:"divider"}},children:(0,n.jsx)(ee.Z,{primary:(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,n.jsx)(h.I,{action:e.action,size:"small"}),e.targetName&&(0,n.jsx)(l.Z,{variant:"body2",color:"text.secondary",children:e.targetName})]}),secondary:function(e){let t=new Date,r=new Date(e),n=Math.floor((t.getTime()-r.getTime())/6e4),s=Math.floor(n/60);return n<60?"".concat(n,"m ago"):s<24?"".concat(s,"h ago"):"".concat(Math.floor(s/24),"d ago")}(e.timestamp)})},e.id))})}function ei(e){var t,r,i,o,c;let{log:d,open:u,onClose:x}=e,[p,g]=(0,s.useState)(0),{data:j,isLoading:f}=(0,en.VM)(null!==(t=null==d?void 0:d.id)&&void 0!==t?t:null,{enabled:u&&!!d});return(0,n.jsxs)(K.ZP,{anchor:"right",open:u,onClose:x,sx:{"& .MuiDrawer-paper":{width:{xs:"100%",sm:420},maxWidth:"100%"}},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",p:2,borderBottom:"1px solid",borderColor:"divider"},children:[(0,n.jsx)(l.Z,{variant:"h6",component:"h2",children:"Audit Log Detail"}),(0,n.jsx)(A.Z,{onClick:x,"aria-label":"Close detail drawer",autoFocus:!0,children:(0,n.jsx)(er.Z,{})})]}),(0,n.jsx)(a.Z,{sx:{p:2,overflow:"auto",flex:1},children:d?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(a.Z,{sx:{mb:3},children:[(0,n.jsx)(l.Z,{variant:"caption",color:"text.secondary",sx:{display:"block",mb:.5},children:"ID"}),(0,n.jsx)(l.Z,{variant:"body2",sx:{fontSize:"0.8rem",wordBreak:"break-all"},children:d.id})]}),(0,n.jsxs)(a.Z,{sx:{mb:3},children:[(0,n.jsx)(l.Z,{variant:"caption",color:"text.secondary",sx:{display:"block",mb:.5},children:"Timestamp"}),(0,n.jsx)(l.Z,{variant:"body2",children:function(e){let t=new Date(e);return new Intl.DateTimeFormat(void 0,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:"short"}).format(t)}(d.timestamp)})]}),(0,n.jsxs)(a.Z,{sx:{display:"flex",gap:3,mb:3},children:[(0,n.jsxs)(a.Z,{children:[(0,n.jsx)(l.Z,{variant:"caption",color:"text.secondary",sx:{display:"block",mb:.5},children:"Action"}),(0,n.jsx)(h.I,{action:d.action,size:"medium"})]}),(0,n.jsxs)(a.Z,{children:[(0,n.jsx)(l.Z,{variant:"caption",color:"text.secondary",sx:{display:"block",mb:.5},children:"Status"}),(0,n.jsx)(m.c,{status:d.status,size:"medium"})]})]}),(0,n.jsxs)(a.Z,{sx:{mb:3},children:[(0,n.jsx)(l.Z,{variant:"caption",color:"text.secondary",sx:{display:"block",mb:.5},children:"Actor"}),(0,n.jsx)(l.Z,{variant:"body2",children:d.actor})]}),(0,n.jsxs)(a.Z,{sx:{mb:3},children:[(0,n.jsx)(l.Z,{variant:"caption",color:"text.secondary",sx:{display:"block",mb:.5},children:"Target"}),(0,n.jsxs)(l.Z,{variant:"body2",children:[d.targetType,"/",d.targetName]})]}),"failure"===d.status&&d.errorMessage&&(0,n.jsx)(B.Z,{severity:"error",sx:{mb:3},children:d.errorMessage}),d.details&&Object.keys(d.details).length>0&&(0,n.jsxs)(a.Z,{sx:{mb:3},children:[(0,n.jsx)(_.Z,{sx:{mb:2}}),(0,n.jsx)(l.Z,{variant:"subtitle2",sx:{mb:1},children:"Details"}),(0,n.jsx)(V.Z,{size:"small",children:(0,n.jsx)(X.Z,{children:Object.entries(d.details).map(e=>{let[t,r]=e;return(0,n.jsxs)(H.Z,{children:[(0,n.jsx)(J.Z,{sx:{fontWeight:600,color:"text.secondary",border:"none",py:.5,pl:0,width:"40%"},children:t}),(0,n.jsx)(J.Z,{sx:{border:"none",py:.5},children:String(r)})]},t)})})})]}),(0,n.jsx)(_.Z,{sx:{mb:2}}),(0,n.jsx)(l.Z,{variant:"subtitle2",sx:{mb:1},children:"Related Logs"}),f?(0,n.jsx)(a.Z,{sx:{display:"flex",justifyContent:"center",py:3},children:(0,n.jsx)(et.Z,{size:24})}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(G.Z,{value:p,onChange:(e,t)=>g(t),sx:{mb:1},children:[(0,n.jsx)(Q.Z,{label:"Same Target (".concat(null!==(r=null==j?void 0:j.relatedLogs.sameTarget.length)&&void 0!==r?r:0,")"),sx:{textTransform:"none",fontSize:"0.8rem"}}),(0,n.jsx)(Q.Z,{label:"Same Actor (".concat(null!==(i=null==j?void 0:j.relatedLogs.sameActor.length)&&void 0!==i?i:0,")"),sx:{textTransform:"none",fontSize:"0.8rem"}})]}),0===p&&(0,n.jsx)(es,{logs:null!==(o=null==j?void 0:j.relatedLogs.sameTarget)&&void 0!==o?o:[]}),1===p&&(0,n.jsx)(es,{logs:null!==(c=null==j?void 0:j.relatedLogs.sameActor)&&void 0!==c?c:[]})]})]}):(0,n.jsx)(l.Z,{color:"text.secondary",children:"No log selected"})})]})}var ea=r(99770),eo=r(62508),el=r(5682),ec=r(76678),ed=r(15761);function eu(e){let{open:t,onClose:r,filters:i,totalCount:o}=e,[c,d]=(0,s.useState)("csv"),[u,x]=(0,s.useState)(!1),[h,m]=(0,s.useState)(null),p=function(e){let t=[];return e.action&&t.push("Action: ".concat(e.action)),e.actor&&t.push("Actor: ".concat(e.actor)),e.targetType&&t.push("Type: ".concat(e.targetType)),e.targetName&&t.push("Target: ".concat(e.targetName)),e.status&&t.push("Status: ".concat(e.status)),e.from&&t.push("From: ".concat(e.from.split("T")[0])),e.to&&t.push("To: ".concat(e.to.split("T")[0])),t}(i),g=async()=>{x(!0),m(null);try{let e=function(e,t){let r=new URLSearchParams;return r.set("format",t),e.action&&r.set("action",e.action),e.actor&&r.set("actor",e.actor),e.targetType&&r.set("targetType",e.targetType),e.targetName&&r.set("targetName",e.targetName),e.status&&r.set("status",e.status),e.from&&r.set("from",e.from),e.to&&r.set("to",e.to),"/api/audit-logs/export?".concat(r.toString())}(i,c),t=await fetch(e);if(!t.ok){let e=await t.json().catch(()=>({message:"Export failed"}));throw Error(e.message||"Export failed")}let n=await t.blob(),s=window.URL.createObjectURL(n),a=document.createElement("a");a.href=s;let o=t.headers.get("Content-Disposition"),l=null==o?void 0:o.match(/filename="?([^"]+)"?/);a.download=(null==l?void 0:l[1])||"audit-logs.".concat(c),document.body.appendChild(a),a.click(),document.body.removeChild(a),window.URL.revokeObjectURL(s),r()}catch(e){m(e instanceof Error?e.message:"Export failed")}finally{x(!1)}};return(0,n.jsxs)(ea.Z,{open:t,onClose:r,maxWidth:"sm",fullWidth:!0,children:[(0,n.jsx)(eo.Z,{children:"Export Audit Logs"}),(0,n.jsxs)(el.Z,{children:[(0,n.jsxs)(a.Z,{sx:{mb:3},children:[(0,n.jsx)(l.Z,{variant:"subtitle2",sx:{mb:1},children:"Format"}),(0,n.jsxs)(I.Z,{value:c,exclusive:!0,onChange:(e,t)=>t&&d(t),size:"small",children:[(0,n.jsx)(E.Z,{value:"csv",children:"CSV"}),(0,n.jsx)(E.Z,{value:"json",children:"JSON"})]})]}),(0,n.jsxs)(a.Z,{sx:{mb:3},children:[(0,n.jsx)(l.Z,{variant:"subtitle2",sx:{mb:1},children:"Applied Filters"}),p.length>0?(0,n.jsx)(a.Z,{sx:{display:"flex",flexDirection:"column",gap:.5},children:p.map(e=>(0,n.jsx)(l.Z,{variant:"body2",color:"text.secondary",children:e},e))}):(0,n.jsx)(l.Z,{variant:"body2",color:"text.secondary",children:"No filters applied (all logs)"})]}),(0,n.jsxs)(a.Z,{sx:{mb:2},children:[(0,n.jsx)(l.Z,{variant:"subtitle2",sx:{mb:.5},children:"Estimated Rows"}),(0,n.jsxs)(l.Z,{variant:"body2",color:"text.secondary",children:[Math.min(o,5e3).toLocaleString()," rows"]})]}),o>5e3&&(0,n.jsxs)(B.Z,{severity:"warning",sx:{mb:2},children:["Export is limited to ",5e3.toLocaleString()," rows. Total matching logs: ",o.toLocaleString(),". Consider narrowing your filters for a complete export."]}),h&&(0,n.jsx)(B.Z,{severity:"error",sx:{mb:2},children:h})]}),(0,n.jsxs)(ec.Z,{children:[(0,n.jsx)(N.Z,{onClick:r,disabled:u,children:"Cancel"}),(0,n.jsx)(N.Z,{variant:"contained",startIcon:u?(0,n.jsx)(et.Z,{size:16,color:"inherit"}):(0,n.jsx)(ed.Z,{}),onClick:g,disabled:u,children:u?"Exporting...":"Export ".concat(c.toUpperCase())})]})]})}var ex=r(93757);function eh(){var e,t,r;let h=(0,i.useRouter)(),m=(0,i.useSearchParams)(),[p,g]=(0,s.useState)(()=>(function(e){let t={},r=e.get("action"),n=e.get("actor"),s=e.get("targetType"),i=e.get("targetName"),a=e.get("status"),o=e.get("from"),l=e.get("to"),c=e.get("limit"),d=e.get("offset"),u=e.get("sort");return r&&(t.action=r),n&&(t.actor=n),s&&(t.targetType=s),i&&(t.targetName=i),a&&(t.status=a),o&&(t.from=o),l&&(t.to=l),c&&(t.limit=parseInt(c,10)),d&&(t.offset=parseInt(d,10)),("timestamp:asc"===u||"timestamp:desc"===u)&&(t.sort=u),t})(m)),[j,f]=(0,s.useState)(null),[v,Z]=(0,s.useState)(!1),[y,b]=(0,s.useState)(!1),[C,w]=(0,s.useState)(0),T=(0,s.useRef)(new Set),{data:k,isLoading:z,error:N,refetch:R}=(0,en.hT)(p),{data:A,isLoading:E}=(0,en.DM)(),{isConnected:I}=(0,ex.D)({url:"/api/audit-logs/stream",enabled:!0,onMessage:(0,s.useCallback)(e=>{if("audit-log"===e.type){let t=e.data;if("id"in t&&"string"==typeof t.id){if(T.current.has(t.id))return;if(T.current.add(t.id),T.current.size>1e3){let e=Array.from(T.current);T.current=new Set(e.slice(e.length-500))}}w(e=>e+1)}},[]),reconnectInterval:3e3,maxReconnectAttempts:1/0});(0,s.useEffect)(()=>{let e=function(e){let t=new URLSearchParams;e.action&&t.set("action",e.action),e.actor&&t.set("actor",e.actor),e.targetType&&t.set("targetType",e.targetType),e.targetName&&t.set("targetName",e.targetName),e.status&&t.set("status",e.status),e.from&&t.set("from",e.from),e.to&&t.set("to",e.to),e.limit&&50!==e.limit&&t.set("limit",String(e.limit)),e.offset&&e.offset>0&&t.set("offset",String(e.offset)),e.sort&&"timestamp:desc"!==e.sort&&t.set("sort",e.sort);let r=t.toString();return r?"?".concat(r):""}(p);e!==(m.toString()?"?".concat(m.toString()):"")&&h.replace("/audit-logs".concat(e),{scroll:!1})},[p,h,m]);let L=(0,s.useCallback)(e=>{g(e),w(0)},[]),F=(0,s.useCallback)(e=>{f(e),Z(!0)},[]),D=(0,s.useCallback)(()=>{w(0),R()},[R]);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o.Z,{elevation:0,sx:{mb:4,p:3,background:e=>"linear-gradient(135deg, ".concat((0,d.Fq)(e.palette.warning.main,.1)," 0%, ").concat((0,d.Fq)(e.palette.error.main,.1)," 100%)"),borderRadius:2,border:e=>"1px solid ".concat((0,d.Fq)(e.palette.warning.main,.2))},children:(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",gap:2},children:[(0,n.jsx)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:56,height:56,borderRadius:2,bgcolor:"warning.main",color:"warning.contrastText"},children:(0,n.jsx)(u.Z,{sx:{fontSize:32}})}),(0,n.jsxs)(a.Z,{sx:{flex:1},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",gap:1.5},children:[(0,n.jsx)(l.Z,{variant:"h4",component:"h1",fontWeight:"bold",children:"Audit Log"}),(0,n.jsx)(c.Z,{icon:(0,n.jsx)(x.Z,{sx:{fontSize:10,color:I?"success.main":"text.disabled",animation:I?"pulse 2s infinite":"none","@keyframes pulse":{"0%":{opacity:1},"50%":{opacity:.4},"100%":{opacity:1}}}}),label:I?"Live":"Offline",size:"small",variant:"outlined",sx:{fontSize:"0.7rem"}})]}),(0,n.jsx)(l.Z,{variant:"body1",color:"text.secondary",children:"Monitor all management activities across your servers"})]})]})}),(0,n.jsx)(a.Z,{sx:{mb:3},children:(0,n.jsx)(S,{stats:A,isLoading:E})}),C>0&&(0,n.jsx)(a.Z,{sx:{mb:2,p:1.5,textAlign:"center",bgcolor:"primary.main",color:"primary.contrastText",borderRadius:1,cursor:"pointer","&:hover":{opacity:.9}},onClick:D,role:"button","aria-label":"".concat(C," new logs, click to refresh"),children:(0,n.jsxs)(l.Z,{variant:"body2",fontWeight:600,children:[C," new ",1===C?"log":"logs"," available - Click to refresh"]})}),(0,n.jsx)(U,{filters:p,onFiltersChange:L,onExport:()=>b(!0)}),(0,n.jsx)(q.x,{logs:null!==(e=null==k?void 0:k.logs)&&void 0!==e?e:[],total:null!==(t=null==k?void 0:k.total)&&void 0!==t?t:0,isLoading:z,error:N,filters:p,onFiltersChange:L,onRowClick:F,onRetry:()=>R()}),(0,n.jsx)(ei,{log:j,open:v,onClose:()=>{Z(!1),f(null)}}),(0,n.jsx)(eu,{open:y,onClose:()=>b(!1),filters:p,totalCount:null!==(r=null==k?void 0:k.total)&&void 0!==r?r:0})]})}},56813:function(e,t,r){"use strict";r.d(t,{I:function(){return a}});var n=r(94655),s=r(25333),i=r(82925);function a(e){let{action:t,size:r="small"}=e,a=i.Lu[t]||"default",o=i.n3[t]||t;return(0,n.jsx)(s.Z,{label:o,color:a,size:r,variant:"filled",sx:{fontWeight:600,fontSize:"small"===r?"0.7rem":"0.8rem"}})}},26892:function(e,t,r){"use strict";r.d(t,{c:function(){return o}});var n=r(94655),s=r(25333),i=r(46207),a=r(43436);function o(e){let{status:t,size:r="small"}=e;return(0,n.jsx)(s.Z,{icon:"success"===t?(0,n.jsx)(i.Z,{}):(0,n.jsx)(a.Z,{}),label:"success"===t?"OK":"Error",color:"success"===t?"success":"error",size:r,variant:"outlined",sx:{fontWeight:500,fontSize:"small"===r?"0.7rem":"0.8rem"}})}},83765:function(e,t,r){"use strict";r.d(t,{x:function(){return A}});var n=r(94655),s=r(35106),i=r(7281),a=r(21138),o=r(84811),l=r(47001),c=r(53281),d=r(11254),u=r(70366),x=r(6406),h=r(69899),m=r(31317),p=r(95511),g=r(10721),j=r(81071),f=r(30417),v=r(25333),Z=r(87716),y=r(79983),b=r(89161),S=r(60236),C=r(27171),w=r(30114),T=r(69178),k=r(46725),z=r(56813),N=r(26892);function R(e){var t,r;let{log:c,onClick:d,hideTargetColumn:x}=e,[h,g]=(0,s.useState)("failure"===c.status),f=c.details&&Object.keys(c.details).length>0,T="failure"===c.status&&c.errorMessage,R=f||T,A=(t=c.targetType,r=c.targetName,"server"===t?"/servers/".concat(encodeURIComponent(r)):"player"===t?"/players":null);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(u.Z,{hover:!0,sx:{cursor:"pointer","&:last-child td, &:last-child th":{border:0}},onClick:()=>null==d?void 0:d(c),tabIndex:0,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),null==d||d(c))},role:"button","aria-label":"".concat(c.action," by ").concat(c.actor," on ").concat(c.targetName),children:[(0,n.jsx)(l.Z,{padding:"checkbox",sx:{width:48},children:R&&(0,n.jsx)(y.Z,{size:"small",onClick:e=>{e.stopPropagation(),g(!h)},"aria-label":h?"Collapse details":"Expand details",children:h?(0,n.jsx)(S.Z,{}):(0,n.jsx)(b.Z,{})})}),(0,n.jsx)(l.Z,{children:(0,n.jsx)(p.Z,{title:function(e){let t=new Date(e);return new Intl.DateTimeFormat(void 0,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:"short"}).format(t)}(c.timestamp),arrow:!0,children:(0,n.jsx)(m.Z,{variant:"body2",color:"text.secondary",sx:{whiteSpace:"nowrap"},children:function(e){let t=new Date,r=new Date(e),n=Math.floor((t.getTime()-r.getTime())/1e3),s=Math.floor(n/60),i=Math.floor(s/60),a=Math.floor(i/24);return n<60?"just now":s<60?"".concat(s,"m ago"):i<24?"".concat(i,"h ago"):a<7?"".concat(a,"d ago"):new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"}).format(r)}(c.timestamp)})})}),(0,n.jsx)(l.Z,{children:(0,n.jsx)(z.I,{action:c.action})}),(0,n.jsx)(l.Z,{children:c.actor.startsWith("cli:")?(0,n.jsx)(v.Z,{label:c.actor.replace("cli:",""),size:"small",variant:"outlined",sx:{fontSize:"0.75rem"}}):(0,n.jsx)(m.Z,{variant:"body2",children:c.actor.replace("api:","")})}),!x&&(0,n.jsx)(l.Z,{children:(0,n.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center"},children:[function(e){switch(e){case"server":return(0,n.jsx)(C.Z,{sx:{fontSize:16,mr:.5,color:"text.secondary"}});case"player":return(0,n.jsx)(w.Z,{sx:{fontSize:16,mr:.5,color:"text.secondary"}});default:return null}}(c.targetType),A?(0,n.jsx)(k.default,{href:A,style:{textDecoration:"none"},onClick:e=>e.stopPropagation(),children:(0,n.jsx)(m.Z,{variant:"body2",sx:{color:"primary.main","&:hover":{textDecoration:"underline"}},children:c.targetName})}):(0,n.jsx)(m.Z,{variant:"body2",children:c.targetName})]})}),(0,n.jsx)(l.Z,{children:(0,n.jsx)(N.c,{status:c.status})})]}),R&&(0,n.jsx)(u.Z,{children:(0,n.jsx)(l.Z,{sx:{py:0},colSpan:x?5:6,children:(0,n.jsx)(Z.Z,{in:h,timeout:"auto",unmountOnExit:!0,children:(0,n.jsxs)(i.Z,{sx:{py:2,px:2},children:[T&&(0,n.jsx)(j.Z,{severity:"error",sx:{mb:2},children:c.errorMessage}),f&&(0,n.jsxs)(i.Z,{children:[(0,n.jsx)(m.Z,{variant:"caption",color:"text.secondary",sx:{mb:1,display:"block"},children:"Details"}),(0,n.jsx)(a.Z,{size:"small",sx:{width:"auto"},children:(0,n.jsx)(o.Z,{children:Object.entries(c.details).map(e=>{let[t,r]=e;return(0,n.jsxs)(u.Z,{children:[(0,n.jsx)(l.Z,{sx:{fontWeight:600,color:"text.secondary",border:"none",py:.5,pl:0},children:t}),(0,n.jsx)(l.Z,{sx:{border:"none",py:.5},children:String(r)})]},t)})})})]})]})})})})]})}function A(e){let{logs:t,total:r,isLoading:s,error:i,filters:p,onFiltersChange:v,onRowClick:Z,onRetry:y,hideTargetColumn:b,rowsPerPageOptions:S=[25,50,100]}=e,C=Math.floor((p.offset||0)/(p.limit||50)),w=p.limit||50;return s?(0,n.jsx)(h.Z,{children:(0,n.jsx)(c.Z,{children:(0,n.jsxs)(a.Z,{children:[(0,n.jsx)(d.Z,{children:(0,n.jsxs)(u.Z,{children:[(0,n.jsx)(l.Z,{padding:"checkbox"}),(0,n.jsx)(l.Z,{children:"Timestamp"}),(0,n.jsx)(l.Z,{children:"Action"}),(0,n.jsx)(l.Z,{children:"Actor"}),!b&&(0,n.jsx)(l.Z,{children:"Target"}),(0,n.jsx)(l.Z,{children:"Status"})]})}),(0,n.jsx)(o.Z,{children:[void 0,void 0,void 0,void 0,void 0].map((e,t)=>(0,n.jsxs)(u.Z,{children:[(0,n.jsx)(l.Z,{padding:"checkbox"}),(0,n.jsx)(l.Z,{children:(0,n.jsx)(g.Z,{variant:"text",width:80})}),(0,n.jsx)(l.Z,{children:(0,n.jsx)(g.Z,{variant:"rounded",width:70,height:24})}),(0,n.jsx)(l.Z,{children:(0,n.jsx)(g.Z,{variant:"text",width:60})}),!b&&(0,n.jsx)(l.Z,{children:(0,n.jsx)(g.Z,{variant:"text",width:100})}),(0,n.jsx)(l.Z,{children:(0,n.jsx)(g.Z,{variant:"rounded",width:50,height:24})})]},t))})]})})}):i?(0,n.jsx)(j.Z,{severity:"error",action:y&&(0,n.jsx)(f.Z,{color:"inherit",size:"small",onClick:y,children:"Retry"}),children:i.message||"Failed to load audit logs"}):0===t.length?(0,n.jsxs)(h.Z,{sx:{p:6,textAlign:"center"},children:[(0,n.jsx)(T.Z,{sx:{fontSize:64,color:"text.disabled",mb:2}}),(0,n.jsx)(m.Z,{variant:"h6",color:"text.secondary",gutterBottom:!0,children:"No audit logs found"}),(0,n.jsx)(m.Z,{variant:"body2",color:"text.disabled",sx:{mb:2},children:"Try adjusting your filters or check back later."}),(0,n.jsx)(f.Z,{variant:"outlined",size:"small",onClick:()=>v({limit:p.limit,sort:p.sort}),children:"Reset Filters"})]}):(0,n.jsxs)(h.Z,{children:[(0,n.jsx)(c.Z,{sx:{overflowX:"auto"},children:(0,n.jsxs)(a.Z,{size:"small",children:[(0,n.jsx)(d.Z,{children:(0,n.jsxs)(u.Z,{children:[(0,n.jsx)(l.Z,{padding:"checkbox",sx:{width:48}}),(0,n.jsx)(l.Z,{sx:{fontWeight:600,whiteSpace:"nowrap"},children:"Timestamp"}),(0,n.jsx)(l.Z,{sx:{fontWeight:600},children:"Action"}),(0,n.jsx)(l.Z,{sx:{fontWeight:600},children:"Actor"}),!b&&(0,n.jsx)(l.Z,{sx:{fontWeight:600},children:"Target"}),(0,n.jsx)(l.Z,{sx:{fontWeight:600},children:"Status"})]})}),(0,n.jsx)(o.Z,{children:t.map(e=>(0,n.jsx)(R,{log:e,onClick:Z,hideTargetColumn:b},e.id))})]})}),(0,n.jsx)(x.Z,{component:"div",count:r,page:C,onPageChange:(e,t)=>{v({...p,offset:t*w})},rowsPerPage:w,onRowsPerPageChange:e=>{let t=parseInt(e.target.value,10);v({...p,limit:t,offset:0})},rowsPerPageOptions:S,"aria-label":"Audit log pagination"})]})}},42936:function(e,t,r){"use strict";async function n(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={...t.headers};t.body&&(r["Content-Type"]="application/json");let n=await fetch(e,{...t,headers:r});if(!n.ok){let e=await n.json().catch(()=>({error:"UnknownError",message:n.statusText})),t=Error(e.message);throw t.statusCode=n.status,t.code=e.error,t}return n.json()}r.d(t,{SC:function(){return n}})},84509:function(e,t,r){"use strict";r.d(t,{DM:function(){return a},HZ:function(){return l},VM:function(){return o},hT:function(){return i},oL:function(){return c}});var n=r(5632),s=r(42936);function i(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=function(e){let t=new URLSearchParams;e.action&&t.set("action",e.action),e.actor&&t.set("actor",e.actor),e.targetType&&t.set("targetType",e.targetType),e.targetName&&t.set("targetName",e.targetName),e.status&&t.set("status",e.status),e.from&&t.set("from",e.from),e.to&&t.set("to",e.to),void 0!==e.limit&&t.set("limit",String(e.limit)),void 0!==e.offset&&t.set("offset",String(e.offset)),e.sort&&t.set("sort",e.sort);let r=t.toString();return r?"?".concat(r):""}(e);return(0,n.a)({queryKey:["audit-logs",e],queryFn:()=>(0,s.SC)("/api/audit-logs".concat(r)),enabled:(null==t?void 0:t.enabled)!==!1})}function a(e){return(0,n.a)({queryKey:["audit-logs","stats"],queryFn:()=>(0,s.SC)("/api/audit-logs/stats"),enabled:(null==e?void 0:e.enabled)!==!1,refetchInterval:3e4})}function o(e,t){return(0,n.a)({queryKey:["audit-logs",e],queryFn:()=>(0,s.SC)("/api/audit-logs/".concat(encodeURIComponent(e))),enabled:(null==t?void 0:t.enabled)!==!1&&!!e})}function l(e,t){var r;return i({targetType:"server",targetName:e,limit:null!==(r=null==t?void 0:t.limit)&&void 0!==r?r:20,...null==t?void 0:t.extraParams},{enabled:(null==t?void 0:t.enabled)!==!1&&!!e})}function c(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10;return i({limit:e,sort:"timestamp:desc"})}},93757:function(e,t,r){"use strict";r.d(t,{D:function(){return i}});var n=r(35106);class s{connect(e){this.options=e,this.shouldReconnect=!0,this.establishConnection()}establishConnection(){this.options&&(this.updateState("connecting"),this.eventSource&&this.eventSource.close(),this.eventSource=new EventSource(this.options.url,{withCredentials:this.options.withCredentials||!1}),this.eventSource.onopen=()=>{this.updateState("connected"),this.retryCount=0,this.lastError=null},this.eventSource.onmessage=e=>{if(!e.data.startsWith(":"))try{var t,r;let n=JSON.parse(e.data);null===(r=this.options)||void 0===r||null===(t=r.onMessage)||void 0===t||t.call(r,n)}catch(e){console.warn("Failed to parse SSE message:",e)}},this.eventSource.onerror=()=>{var e,t;let r={message:"SSE connection error",code:"CONNECTION_ERROR",retryCount:this.retryCount,timestamp:new Date};this.lastError=r,this.updateState("error"),null===(t=this.options)||void 0===t||null===(e=t.onError)||void 0===e||e.call(t,r),this.shouldReconnect&&this.scheduleReconnect()})}scheduleReconnect(){var e,t;if(!this.options)return;let r=null!==(e=this.options.maxReconnectAttempts)&&void 0!==e?e:1/0;if(this.retryCount>=r)return;this.reconnectTimer&&clearTimeout(this.reconnectTimer);let n=null!==(t=this.options.reconnectInterval)&&void 0!==t?t:3e3;this.reconnectTimer=setTimeout(()=>{this.retryCount++,this.establishConnection()},n)}disconnect(){this.shouldReconnect=!1,this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.eventSource&&(this.eventSource.close(),this.eventSource=null),this.updateState("disconnected")}getState(){return this.state}isConnected(){return"connected"===this.state}getLastError(){return this.lastError}getRetryCount(){return this.retryCount}reconnect(){this.retryCount++,this.shouldReconnect=!0,this.eventSource&&(this.eventSource.close(),this.eventSource=null),this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.establishConnection()}updateState(e){var t,r;this.state=e,null===(r=this.options)||void 0===r||null===(t=r.onStateChange)||void 0===t||t.call(r,e)}constructor(){this.eventSource=null,this.state="disconnected",this.retryCount=0,this.lastError=null,this.reconnectTimer=null,this.options=null,this.shouldReconnect=!0}}function i(e){let{url:t,onMessage:r,onError:i,reconnectInterval:a=3e3,maxReconnectAttempts:o=1/0,enabled:l=!0,withCredentials:c=!1}=e,[d,u]=(0,n.useState)(null),[x,h]=(0,n.useState)("disconnected"),[m,p]=(0,n.useState)(null),[g,j]=(0,n.useState)(0),f=(0,n.useRef)(null),v=(0,n.useCallback)(e=>{u(e),null==r||r(e)},[r]),Z=(0,n.useCallback)(e=>{h(e),"connected"===e&&j(0)},[]),y=(0,n.useCallback)(e=>{p(e),"number"==typeof e.retryCount&&j(e.retryCount),null==i||i(e)},[i]),b=(0,n.useCallback)(()=>{f.current&&(f.current.reconnect(),j(f.current.getRetryCount()))},[]),S=(0,n.useCallback)(()=>{f.current&&f.current.disconnect()},[]);return(0,n.useEffect)(()=>{if(!l){f.current&&(f.current.disconnect(),f.current=null);return}return f.current||(f.current=new s),f.current.connect({url:t,onMessage:v,onStateChange:Z,onError:y,reconnectInterval:a,maxReconnectAttempts:o,withCredentials:c}),()=>{f.current&&(f.current.disconnect(),f.current=null)}},[t,l,a,o,c,v,Z,y]),{data:d,isConnected:"connected"===x,state:x,error:m,retryCount:g,reconnect:b,disconnect:S}}},82925:function(e,t,r){"use strict";r.d(t,{KK:function(){return o},Lu:function(){return n},Xn:function(){return a},n3:function(){return s},xg:function(){return i}});let n={"server.create":"success","server.delete":"error","server.start":"info","server.stop":"warning","server.restart":"secondary","player.whitelist.add":"success","player.whitelist.remove":"warning","player.ban":"error","player.unban":"success","player.op":"info","player.deop":"warning","player.kick":"error","audit.purge":"default"},s={"server.create":"Create","server.delete":"Delete","server.start":"Start","server.stop":"Stop","server.restart":"Restart","player.whitelist.add":"Whitelist Add","player.whitelist.remove":"Whitelist Remove","player.ban":"Ban","player.unban":"Unban","player.op":"Op","player.deop":"Deop","player.kick":"Kick","audit.purge":"Purge"},i=["server.create","server.delete","server.start","server.stop","server.restart","player.whitelist.add","player.whitelist.remove","player.ban","player.unban","player.op","player.deop","player.kick","audit.purge"],a=["server.create","server.delete","server.start","server.stop","server.restart"],o=["player.whitelist.add","player.whitelist.remove","player.ban","player.unban","player.op","player.deop","player.kick"]}},function(e){e.O(0,[6812,9760,5004,7296,7436,1071,540,4416,2538,5511,3938,55,2844,8347,7073,9022,4302,1002,3669,2757,1744],function(){return e(e.s=3590)}),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6302],{1366:function(e,n,t){Promise.resolve().then(t.bind(t,1256))},1256:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return en}});var s=t(94655),a=t(31317),i=t(7281),l=t(69899),r=t(70115),o=t(76492),c=t(91606),d=t(628),u=t(41565),h=t(25333),x=t(46207),j=t(43436),m=t(92666);function Z(){let{data:e,isLoading:n,error:t}=(0,m.mj)();if(n)return(0,s.jsx)(d.Z,{children:(0,s.jsxs)(u.Z,{children:[(0,s.jsx)(a.Z,{variant:"h6",gutterBottom:!0,children:"Backup Status"}),(0,s.jsx)(a.Z,{color:"text.secondary",children:"Loading..."})]})});if(t)return(0,s.jsx)(d.Z,{children:(0,s.jsxs)(u.Z,{children:[(0,s.jsx)(a.Z,{variant:"h6",gutterBottom:!0,children:"Backup Status"}),(0,s.jsx)(a.Z,{color:"error",children:"Failed to load backup status"})]})});let{configured:l,lastBackup:r,repository:o}=e||{};return(0,s.jsx)(d.Z,{children:(0,s.jsxs)(u.Z,{children:[(0,s.jsxs)(i.Z,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2},children:[(0,s.jsx)(a.Z,{variant:"h6",children:"Backup Status"}),(0,s.jsx)(h.Z,{icon:l?(0,s.jsx)(x.Z,{}):(0,s.jsx)(j.Z,{}),label:l?"Configured":"Not Configured",color:l?"success":"error",size:"small"})]}),l?(0,s.jsxs)(i.Z,{sx:{display:"flex",flexDirection:"column",gap:1},children:[o&&(0,s.jsxs)(i.Z,{children:[(0,s.jsx)(a.Z,{variant:"caption",color:"text.secondary",children:"Repository"}),(0,s.jsx)(a.Z,{variant:"body2",sx:{fontFamily:"monospace",fontSize:"0.875rem"},children:o})]}),r&&(0,s.jsxs)(i.Z,{children:[(0,s.jsx)(a.Z,{variant:"caption",color:"text.secondary",children:"Last Backup"}),(0,s.jsx)(a.Z,{variant:"body2",children:function(e){let n=new Date,t=new Date(e),s=Math.floor((n.getTime()-t.getTime())/6e4),a=Math.floor(s/60);return s<1?"just now":s<60?"".concat(s," minutes ago"):a<24?"".concat(a," hours ago"):"".concat(Math.floor(a/24)," days ago")}(r)})]}),!r&&(0,s.jsx)(a.Z,{variant:"body2",color:"text.secondary",children:"No backups yet"})]}):(0,s.jsx)(a.Z,{variant:"body2",color:"text.secondary",children:"GitHub backup is not configured. Please configure BACKUP_REPO_URL in your environment."})]})})}var p=t(35106),g=t(21138),y=t(84811),v=t(47001),b=t(53281),f=t(11254),k=t(70366),C=t(79983),S=t(97731),w=t(30417),B=t(99770),D=t(76678),A=t(5682),F=t(65087),P=t(62508),R=t(81071),z=t(93017);function I(e){var n;let{open:t,commit:l,onClose:r}=e,{mutate:o,isPending:c}=(0,m.s8)(),[d,u]=(0,p.useState)(""),[h,x]=(0,p.useState)(""),j=()=>{c||(u(""),x(""),r())};return(0,s.jsxs)(B.Z,{open:t,onClose:j,maxWidth:"sm",fullWidth:!0,children:[(0,s.jsx)(P.Z,{children:"Restore Backup"}),(0,s.jsxs)(A.Z,{children:[(0,s.jsx)(R.Z,{severity:"warning",sx:{mb:2},children:"This will restore all worlds from the selected backup. Current world data will be overwritten."}),d&&(0,s.jsx)(R.Z,{severity:"success",sx:{mb:2},children:d}),h&&(0,s.jsx)(R.Z,{severity:"error",sx:{mb:2},children:h}),(0,s.jsx)(F.Z,{sx:{mb:2},children:"Are you sure you want to restore from this backup?"}),(0,s.jsxs)(i.Z,{sx:{display:"flex",flexDirection:"column",gap:1},children:[(0,s.jsxs)(i.Z,{children:[(0,s.jsx)(a.Z,{variant:"caption",color:"text.secondary",children:"Commit Hash"}),(0,s.jsx)(a.Z,{variant:"body2",sx:{fontFamily:"monospace",fontSize:"0.875rem"},children:l.hash})]}),(0,s.jsxs)(i.Z,{children:[(0,s.jsx)(a.Z,{variant:"caption",color:"text.secondary",children:"Date"}),(0,s.jsx)(a.Z,{variant:"body2",children:(n=l.date,new Intl.DateTimeFormat(void 0,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date(n)))})]}),(0,s.jsxs)(i.Z,{children:[(0,s.jsx)(a.Z,{variant:"caption",color:"text.secondary",children:"Message"}),(0,s.jsx)(a.Z,{variant:"body2",children:l.message})]}),(0,s.jsxs)(i.Z,{children:[(0,s.jsx)(a.Z,{variant:"caption",color:"text.secondary",children:"Author"}),(0,s.jsx)(a.Z,{variant:"body2",children:l.author})]})]})]}),(0,s.jsxs)(D.Z,{children:[(0,s.jsx)(w.Z,{onClick:j,disabled:c,children:"Cancel"}),(0,s.jsx)(w.Z,{onClick:()=>{u(""),x(""),o(l.hash,{onSuccess:()=>{u("Backup restored successfully from ".concat(l.hash.substring(0,7))),setTimeout(()=>{r()},2e3)},onError:e=>{x("Failed to restore backup: ".concat(e.message))}})},variant:"contained",color:"warning",disabled:c,startIcon:c?(0,s.jsx)(z.Z,{size:16}):(0,s.jsx)(S.Z,{}),children:c?"Restoring...":"Restore"})]})]})}function W(){let{data:e,isLoading:n,error:t}=(0,m.$t)(20),[i,l]=(0,p.useState)(null),r=e=>{l(e)};if(n)return(0,s.jsx)(d.Z,{children:(0,s.jsxs)(u.Z,{children:[(0,s.jsx)(a.Z,{variant:"h6",gutterBottom:!0,children:"Backup History"}),(0,s.jsx)(a.Z,{color:"text.secondary",children:"Loading..."})]})});if(t)return(0,s.jsx)(d.Z,{children:(0,s.jsxs)(u.Z,{children:[(0,s.jsx)(a.Z,{variant:"h6",gutterBottom:!0,children:"Backup History"}),(0,s.jsx)(a.Z,{color:"error",children:"Failed to load backup history"})]})});let o=(null==e?void 0:e.commits)||[];return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(d.Z,{children:(0,s.jsxs)(u.Z,{children:[(0,s.jsx)(a.Z,{variant:"h6",gutterBottom:!0,children:"Backup History"}),0===o.length?(0,s.jsx)(a.Z,{color:"text.secondary",children:"No backup history available"}):(0,s.jsx)(b.Z,{children:(0,s.jsxs)(g.Z,{children:[(0,s.jsx)(f.Z,{children:(0,s.jsxs)(k.Z,{children:[(0,s.jsx)(v.Z,{children:"Commit"}),(0,s.jsx)(v.Z,{children:"Date"}),(0,s.jsx)(v.Z,{children:"Message"}),(0,s.jsx)(v.Z,{children:"Author"}),(0,s.jsx)(v.Z,{align:"right",children:"Actions"})]})}),(0,s.jsx)(y.Z,{children:o.map(e=>{var n;return(0,s.jsxs)(k.Z,{children:[(0,s.jsx)(v.Z,{children:(0,s.jsx)(h.Z,{label:e.hash.substring(0,7),size:"small",variant:"outlined",sx:{fontFamily:"monospace"}})}),(0,s.jsx)(v.Z,{children:(0,s.jsx)(a.Z,{variant:"body2",children:(n=e.date,new Intl.DateTimeFormat(void 0,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}).format(new Date(n)))})}),(0,s.jsx)(v.Z,{children:(0,s.jsx)(a.Z,{variant:"body2",children:e.message})}),(0,s.jsx)(v.Z,{children:(0,s.jsx)(a.Z,{variant:"body2",color:"text.secondary",children:e.author})}),(0,s.jsx)(v.Z,{align:"right",children:(0,s.jsx)(C.Z,{size:"small",color:"primary",onClick:()=>r(e),title:"Restore this backup",children:(0,s.jsx)(S.Z,{})})})]},e.hash)})})]})})]})}),i&&(0,s.jsx)(I,{open:!!i,commit:i,onClose:()=>{l(null)}})]})}var E=t(97436),M=t(34675);function T(e){let{disabled:n}=e,[t,a]=(0,p.useState)(!1),[i,l]=(0,p.useState)(""),[r,o]=(0,p.useState)(""),[c,d]=(0,p.useState)(""),{mutate:u,isPending:h}=(0,m.c5)(),x=()=>{h||(a(!1),l(""),o(""),d(""))};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(w.Z,{variant:"contained",startIcon:(0,s.jsx)(M.Z,{}),onClick:()=>{a(!0),o(""),d(""),l("Backup ".concat(new Date().toISOString().split("T")[0]))},disabled:n||h,children:"Push Backup"}),(0,s.jsxs)(B.Z,{open:t,onClose:x,maxWidth:"sm",fullWidth:!0,children:[(0,s.jsx)(P.Z,{children:"Push Backup"}),(0,s.jsxs)(A.Z,{children:[r&&(0,s.jsx)(R.Z,{severity:"success",sx:{mb:2},children:r}),c&&(0,s.jsx)(R.Z,{severity:"error",sx:{mb:2},children:c}),(0,s.jsx)(E.Z,{autoFocus:!0,margin:"dense",label:"Commit Message",type:"text",fullWidth:!0,variant:"outlined",value:i,onChange:e=>l(e.target.value),disabled:h,helperText:"Optional message describing this backup"})]}),(0,s.jsxs)(D.Z,{children:[(0,s.jsx)(w.Z,{onClick:x,disabled:h,children:"Cancel"}),(0,s.jsx)(w.Z,{onClick:()=>{o(""),d(""),u({message:i||void 0},{onSuccess:e=>{o(e.commitHash?"Backup pushed successfully (".concat(e.commitHash.substring(0,7),")"):"Backup pushed successfully"),setTimeout(()=>{x()},2e3)},onError:e=>{d("Failed to push backup: ".concat(e.message))}})},variant:"contained",disabled:h,startIcon:h?(0,s.jsx)(z.Z,{size:16}):(0,s.jsx)(M.Z,{}),children:h?"Pushing...":"Push"})]})]})]})}var N=t(38393),q=t(95511),H=t(69123),_=t(32366),L=t(45813),O=t(21111),K=t(54211),U=t(29793),G=t(75726),J=t(62328),V=t(7178);let $=[{label:"Every hour",value:"0 * * * *"},{label:"Every 6 hours",value:"0 */6 * * *"},{label:"Every 12 hours",value:"0 */12 * * *"},{label:"Daily at 3 AM",value:"0 3 * * *"},{label:"Weekly (Sunday 3 AM)",value:"0 3 * * 0"},{label:"Custom",value:"custom"}];function Q(e){let{open:n,schedule:t,onClose:l}=e,o=(0,m.tT)(),c=(0,m.CA)(),d=!!t,[u,x]=(0,p.useState)(""),[j,Z]=(0,p.useState)(""),[g,y]=(0,p.useState)(""),[v,b]=(0,p.useState)(""),[f,k]=(0,p.useState)(""),[C,S]=(0,p.useState)("");(0,p.useEffect)(()=>{if(n){if(t){var e,s,a,i;x(t.name);let n=$.find(e=>e.value===t.cronExpression);n?(Z(n.value),y("")):(Z("custom"),y(t.cronExpression)),b(null!==(a=null===(e=t.retentionPolicy.maxCount)||void 0===e?void 0:e.toString())&&void 0!==a?a:""),k(null!==(i=null===(s=t.retentionPolicy.maxAgeDays)||void 0===s?void 0:s.toString())&&void 0!==i?i:"")}else x(""),Z("0 3 * * *"),y(""),b("10"),k("30");S("")}},[n,t]);let F=()=>"custom"===j?g.trim():j,z=async()=>{S("");let e=F();if(!u.trim()){S("Name is required");return}if(!e){S("Cron expression is required");return}try{d&&t?await c.mutateAsync({id:t.id,data:{name:u.trim(),cron:e,...v?{maxCount:parseInt(v,10)}:{},...f?{maxAgeDays:parseInt(f,10)}:{}}}):await o.mutateAsync({name:u.trim(),cron:e,...v?{maxCount:parseInt(v,10)}:{},...f?{maxAgeDays:parseInt(f,10)}:{},enabled:!0}),l()}catch(e){S(e.message||"Failed to save schedule")}},I=o.isPending||c.isPending;return(0,s.jsxs)(B.Z,{open:n,onClose:l,maxWidth:"sm",fullWidth:!0,children:[(0,s.jsx)(P.Z,{children:d?"Edit Backup Schedule":"Create Backup Schedule"}),(0,s.jsx)(A.Z,{children:(0,s.jsxs)(r.Z,{spacing:2.5,sx:{mt:1},children:[C&&(0,s.jsx)(R.Z,{severity:"error",onClose:()=>S(""),children:C}),(0,s.jsx)(E.Z,{label:"Schedule Name",value:u,onChange:e=>x(e.target.value),fullWidth:!0,required:!0,placeholder:"e.g., Daily backup, Hourly snapshot",autoFocus:!0}),(0,s.jsxs)(U.Z,{fullWidth:!0,children:[(0,s.jsx)(G.Z,{children:"Schedule Frequency"}),(0,s.jsx)(J.Z,{value:j,onChange:e=>Z(e.target.value),label:"Schedule Frequency",children:$.map(e=>(0,s.jsxs)(V.Z,{value:e.value,children:[e.label,"custom"!==e.value&&(0,s.jsx)(h.Z,{label:e.value,size:"small",variant:"outlined",sx:{ml:1,fontFamily:"monospace",fontSize:"0.75rem"}})]},e.value))})]}),"custom"===j&&(0,s.jsx)(E.Z,{label:"Cron Expression",value:g,onChange:e=>y(e.target.value),fullWidth:!0,required:!0,placeholder:"e.g., 0 */6 * * *",helperText:"Format: minute hour day-of-month month day-of-week",InputProps:{sx:{fontFamily:"monospace"}}}),(0,s.jsx)(a.Z,{variant:"subtitle2",color:"text.secondary",sx:{mt:1},children:"Retention Policy (optional)"}),(0,s.jsxs)(i.Z,{sx:{display:"flex",gap:2},children:[(0,s.jsx)(E.Z,{label:"Max Backup Count",type:"number",value:v,onChange:e=>b(e.target.value),fullWidth:!0,placeholder:"e.g., 10",inputProps:{min:1},helperText:"Keep at most N backups"}),(0,s.jsx)(E.Z,{label:"Max Age (days)",type:"number",value:f,onChange:e=>k(e.target.value),fullWidth:!0,placeholder:"e.g., 30",inputProps:{min:1},helperText:"Delete backups older than N days"})]})]})}),(0,s.jsxs)(D.Z,{children:[(0,s.jsx)(w.Z,{onClick:l,disabled:I,children:"Cancel"}),(0,s.jsx)(w.Z,{onClick:z,variant:"contained",disabled:I,children:I?"Saving...":d?"Update":"Create"})]})]})}function X(e){let n=new Date,t=new Date(e),s=Math.floor((n.getTime()-t.getTime())/6e4),a=Math.floor(s/60);return s<1?"just now":s<60?"".concat(s,"m ago"):a<24?"".concat(a,"h ago"):"".concat(Math.floor(a/24),"d ago")}function Y(e){let{schedule:n,onEdit:t,onDelete:l,onToggle:r,toggleLoading:o}=e;return(0,s.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",py:1.5,px:1,"&:hover":{bgcolor:"action.hover",borderRadius:1}},children:[(0,s.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:2,flex:1,minWidth:0},children:[(0,s.jsx)(K.Z,{color:n.enabled?"primary":"disabled"}),(0,s.jsxs)(i.Z,{sx:{minWidth:0},children:[(0,s.jsx)(a.Z,{variant:"body1",fontWeight:"medium",noWrap:!0,children:n.name}),(0,s.jsxs)(a.Z,{variant:"caption",color:"text.secondary",noWrap:!0,children:[n.cronHumanReadable," (",n.cronExpression,")"]})]})]}),(0,s.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:1.5,flexShrink:0},children:[n.lastRunStatus&&(0,s.jsx)(q.Z,{title:n.lastRunMessage?"".concat(n.lastRunAt?X(n.lastRunAt):"",": ").concat(n.lastRunMessage):n.lastRunAt?X(n.lastRunAt):"",children:(0,s.jsx)(h.Z,{icon:"success"===n.lastRunStatus?(0,s.jsx)(x.Z,{sx:{fontSize:16}}):(0,s.jsx)(j.Z,{sx:{fontSize:16}}),label:"success"===n.lastRunStatus?"OK":"Failed",size:"small",color:"success"===n.lastRunStatus?"success":"error",variant:"outlined"})}),(n.retentionPolicy.maxCount||n.retentionPolicy.maxAgeDays)&&(0,s.jsx)(q.Z,{title:[n.retentionPolicy.maxCount&&"Max ".concat(n.retentionPolicy.maxCount," backups"),n.retentionPolicy.maxAgeDays&&"Max ".concat(n.retentionPolicy.maxAgeDays," days")].filter(Boolean).join(", "),children:(0,s.jsx)(h.Z,{label:"Retention",size:"small",variant:"outlined",color:"info"})}),(0,s.jsx)(q.Z,{title:n.enabled?"Disable schedule":"Enable schedule",children:(0,s.jsx)(N.Z,{size:"small",checked:n.enabled,onChange:(e,t)=>r(n,t),disabled:o})}),(0,s.jsx)(q.Z,{title:"Edit schedule",children:(0,s.jsx)(C.Z,{size:"small",onClick:()=>t(n),children:(0,s.jsx)(L.Z,{fontSize:"small"})})}),(0,s.jsx)(q.Z,{title:"Delete schedule",children:(0,s.jsx)(C.Z,{size:"small",color:"error",onClick:()=>l(n),children:(0,s.jsx)(O.Z,{fontSize:"small"})})})]})]})}function ee(){var e;let{data:n,isLoading:t,error:l}=(0,m.d)(),o=(0,m.c1)(),c=(0,m.JV)(),[h,x]=(0,p.useState)(!1),[j,Z]=(0,p.useState)(null),[g,y]=(0,p.useState)(!1),[v,b]=(0,p.useState)(null),f=e=>{Z(e),x(!0)},k=e=>{b(e),y(!0)},C=async()=>{if(v)try{await c.mutateAsync(v.id)}catch(e){}y(!1),b(null)},S=(e,n)=>{o.mutate({id:e.id,enabled:n})};if(t)return(0,s.jsx)(d.Z,{children:(0,s.jsxs)(u.Z,{children:[(0,s.jsx)(a.Z,{variant:"h6",gutterBottom:!0,children:"Backup Schedules"}),(0,s.jsx)(a.Z,{color:"text.secondary",children:"Loading..."})]})});if(l)return(0,s.jsx)(d.Z,{children:(0,s.jsxs)(u.Z,{children:[(0,s.jsx)(a.Z,{variant:"h6",gutterBottom:!0,children:"Backup Schedules"}),(0,s.jsx)(R.Z,{severity:"error",children:"Failed to load backup schedules"})]})});let F=null!==(e=null==n?void 0:n.schedules)&&void 0!==e?e:[];return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(d.Z,{children:(0,s.jsxs)(u.Z,{children:[(0,s.jsxs)(i.Z,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2},children:[(0,s.jsxs)(i.Z,{children:[(0,s.jsx)(a.Z,{variant:"h6",children:"Backup Schedules"}),(0,s.jsx)(a.Z,{variant:"caption",color:"text.secondary",children:"Automated cron-based backup scheduling"})]}),(0,s.jsx)(w.Z,{variant:"contained",size:"small",startIcon:(0,s.jsx)(_.Z,{}),onClick:()=>{Z(null),x(!0)},children:"Add Schedule"})]}),0===F.length?(0,s.jsxs)(i.Z,{sx:{textAlign:"center",py:4},children:[(0,s.jsx)(K.Z,{sx:{fontSize:48,color:"text.disabled",mb:1}}),(0,s.jsx)(a.Z,{color:"text.secondary",children:"No backup schedules configured"}),(0,s.jsx)(a.Z,{variant:"caption",color:"text.secondary",children:"Create a schedule to automatically back up your worlds"})]}):(0,s.jsx)(r.Z,{divider:(0,s.jsx)(H.Z,{}),children:F.map(e=>(0,s.jsx)(Y,{schedule:e,onEdit:f,onDelete:k,onToggle:S,toggleLoading:o.isPending},e.id))})]})}),(0,s.jsx)(Q,{open:h,schedule:j,onClose:()=>{x(!1),Z(null)}}),(0,s.jsxs)(B.Z,{open:g,onClose:()=>y(!1),children:[(0,s.jsx)(P.Z,{children:"Delete Backup Schedule"}),(0,s.jsx)(A.Z,{children:(0,s.jsxs)(a.Z,{children:['Are you sure you want to delete the schedule "',null==v?void 0:v.name,'"? This action cannot be undone.']})}),(0,s.jsxs)(D.Z,{children:[(0,s.jsx)(w.Z,{onClick:()=>y(!1),children:"Cancel"}),(0,s.jsx)(w.Z,{onClick:C,color:"error",variant:"contained",disabled:c.isPending,children:c.isPending?"Deleting...":"Delete"})]})]})]})}function en(){var e;let{data:n}=(0,m.mj)(),t=null!==(e=null==n?void 0:n.configured)&&void 0!==e&&e;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(l.Z,{elevation:0,sx:{mb:4,p:3,background:e=>"linear-gradient(135deg, ".concat((0,o.Fq)(e.palette.secondary.main,.1)," 0%, ").concat((0,o.Fq)(e.palette.info.main,.1)," 100%)"),borderRadius:2,border:e=>"1px solid ".concat((0,o.Fq)(e.palette.secondary.main,.2)),display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,s.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:2},children:[(0,s.jsx)(i.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:56,height:56,borderRadius:2,bgcolor:"secondary.main",color:"secondary.contrastText"},children:(0,s.jsx)(c.Z,{sx:{fontSize:32}})}),(0,s.jsxs)(i.Z,{children:[(0,s.jsx)(a.Z,{variant:"h4",component:"h1",fontWeight:"bold",children:"Backups"}),(0,s.jsx)(a.Z,{variant:"body1",color:"text.secondary",children:"Manage world backups and restore points"})]})]}),(0,s.jsx)(T,{disabled:!t})]}),(0,s.jsxs)(r.Z,{spacing:3,children:[(0,s.jsx)(Z,{}),(0,s.jsx)(ee,{}),t&&(0,s.jsx)(W,{})]})]})}}},function(e){e.O(0,[6812,9760,5004,7296,7436,1071,540,4416,5511,3938,2844,2476,2666,3669,2757,1744],function(){return e(e.s=1366)}),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4095],{16387:function(e,r,t){Promise.resolve().then(t.bind(t,6453))},6453:function(e,r,t){"use strict";t.r(r),t.d(r,{default:function(){return B}});var n=t(94655),i=t(35106),a=t(7281),s=t(74228),l=t(46725),o=t(56275),c=t(62108),d=t(79983),x=t(31317),h=t(62142),m=t(90158),u=t(58347),p=t(49954),f=t(17820),g=t(73424),b=t(61505),j=t(71185),y=t(76176),v=t(27171),Z=t(35847),w=t(29983),C=t(80620),k=t(84974),S=t(34675),P=t(85480),z=t(64779);function I(e){return(0,n.jsxs)(z.Z,{...e,viewBox:"0 0 32 32",children:[(0,n.jsx)("rect",{width:"32",height:"32",fill:"#5DA840"}),(0,n.jsx)("rect",{x:"4",y:"8",width:"8",height:"8",fill:"#000"}),(0,n.jsx)("rect",{x:"20",y:"8",width:"8",height:"8",fill:"#000"}),(0,n.jsx)("rect",{x:"12",y:"16",width:"8",height:"4",fill:"#000"}),(0,n.jsx)("rect",{x:"8",y:"20",width:"16",height:"8",fill:"#000"}),(0,n.jsx)("rect",{x:"8",y:"28",width:"4",height:"4",fill:"#000"}),(0,n.jsx)("rect",{x:"20",y:"28",width:"4",height:"4",fill:"#000"}),(0,n.jsx)("rect",{x:"0",y:"0",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"}),(0,n.jsx)("rect",{x:"8",y:"4",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"}),(0,n.jsx)("rect",{x:"24",y:"0",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"}),(0,n.jsx)("rect",{x:"28",y:"8",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"}),(0,n.jsx)("rect",{x:"0",y:"24",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"})]})}var W=t(8690),A=t(6986);let D=[{label:"Dashboard",href:"/dashboard",icon:(0,n.jsx)(y.Z,{})},{label:"Servers",href:"/servers",icon:(0,n.jsx)(v.Z,{})},{label:"Worlds",href:"/worlds",icon:(0,n.jsx)(k.Z,{})},{label:"Players",href:"/players",icon:(0,n.jsx)(Z.Z,{})},{label:"Audit",href:"/audit-logs",icon:(0,n.jsx)(C.Z,{})},{label:"Backups",href:"/backups",icon:(0,n.jsx)(S.Z,{})},{label:"Routing",href:"/routing",icon:(0,n.jsx)(w.Z,{})}];function T(e){let{mobileOpen:r,onMenuToggle:t}=e,i=(0,s.usePathname)(),{data:y}=(0,A.kP)(),v=e=>"/dashboard"===e?"/dashboard"===i||"/"===i:i.startsWith(e);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o.Z,{position:"fixed",elevation:0,sx:{backgroundColor:"background.paper",borderBottom:"1px solid",borderColor:"divider",zIndex:e=>e.zIndex.drawer+1},children:(0,n.jsxs)(c.Z,{sx:{maxWidth:"1400px",width:"100%",mx:"auto",px:{xs:2,sm:3}},children:[(0,n.jsx)(d.Z,{color:"inherit","aria-label":"open menu",edge:"start",onClick:t,sx:{mr:2,display:{md:"none"}},children:(0,n.jsx)(b.Z,{})}),(0,n.jsxs)(l.default,{href:"/",style:{textDecoration:"none",display:"flex",alignItems:"center"},children:[(0,n.jsx)(I,{sx:{fontSize:28,color:"primary.main",mr:1}}),(0,n.jsx)(x.Z,{variant:"h6",component:"span",sx:{fontFamily:'"Minecraft", sans-serif',fontWeight:400,color:"common.white",letterSpacing:"0.05em",fontSize:"1.1rem"},children:"Minecraft Console"})]}),(0,n.jsx)(a.Z,{component:"nav",sx:{display:{xs:"none",md:"flex"},alignItems:"center",gap:1,ml:4,flex:1},children:D.map(e=>{let r=v(e.href);return(0,n.jsx)(l.default,{href:e.href,style:{textDecoration:"none"},onClick:()=>!r&&(0,W.Av)(),children:(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1,borderRadius:2,color:r?"primary.main":"text.secondary",backgroundColor:r?"action.selected":"transparent",transition:"all 0.2s ease","&:hover":{backgroundColor:"action.hover",color:r?"primary.main":"text.primary"}},children:[(0,n.jsx)(a.Z,{component:"span",sx:{display:"flex",alignItems:"center","& svg":{fontSize:20}},children:e.icon}),(0,n.jsx)(x.Z,{variant:"body2",sx:{fontWeight:r?600:400},children:e.label})]})},e.href)})}),(0,n.jsx)(a.Z,{sx:{display:"flex",alignItems:"center",gap:2},children:(0,n.jsx)(P.Ie,{})})]})}),(0,n.jsx)(h.ZP,{variant:"temporary",anchor:"left",open:r,onClose:t,ModalProps:{keepMounted:!0},sx:{display:{xs:"block",md:"none"},"& .MuiDrawer-paper":{boxSizing:"border-box",width:280,backgroundColor:"background.paper"}},children:(0,n.jsxs)(a.Z,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",px:2,py:2,minHeight:64,borderBottom:"1px solid",borderColor:"divider"},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center"},children:[(0,n.jsx)(I,{sx:{fontSize:24,color:"primary.main",mr:1}}),(0,n.jsx)(x.Z,{variant:"h6",component:"span",sx:{fontFamily:'"Minecraft", sans-serif',fontWeight:400,color:"primary.main",letterSpacing:"0.05em",fontSize:"1rem"},children:"Minecraft Console"})]}),(0,n.jsx)(d.Z,{onClick:t,"aria-label":"close menu",children:(0,n.jsx)(j.Z,{})})]}),(0,n.jsx)(m.Z,{sx:{flex:1,px:1,py:2},children:D.map(e=>{let r=v(e.href);return(0,n.jsx)(u.ZP,{disablePadding:!0,sx:{mb:.5},children:(0,n.jsxs)(p.Z,{component:l.default,href:e.href,onClick:()=>{t(),r||(0,W.Av)()},"aria-current":r?"page":void 0,sx:{borderRadius:2,backgroundColor:r?"action.selected":"transparent","&:hover":{backgroundColor:"action.hover"}},children:[(0,n.jsx)(f.Z,{sx:{color:r?"primary.main":"text.secondary",minWidth:40},children:e.icon}),(0,n.jsx)(g.Z,{primary:e.label,primaryTypographyProps:{fontWeight:r?600:400,color:r?"primary.main":"text.primary"}})]})},e.href)})})]})})]})}var _=t(67337),E=t(41261),q=t(69123),M=t(75845),L=t(43880);function R(e){return(0,n.jsx)(z.Z,{...e,viewBox:"0 0 24 24",children:(0,n.jsx)("path",{d:"M13.983 11.078h2.119a.186.186 0 00.186-.185V9.006a.186.186 0 00-.186-.186h-2.119a.185.185 0 00-.185.185v1.888c0 .102.083.185.185.185m-2.954-5.43h2.118a.186.186 0 00.186-.186V3.574a.186.186 0 00-.186-.185h-2.118a.185.185 0 00-.185.185v1.888c0 .102.082.185.185.186m0 2.716h2.118a.187.187 0 00.186-.186V6.29a.186.186 0 00-.186-.185h-2.118a.185.185 0 00-.185.185v1.887c0 .102.082.185.185.186m-2.93 0h2.12a.186.186 0 00.184-.186V6.29a.185.185 0 00-.185-.185H8.1a.185.185 0 00-.185.185v1.887c0 .102.083.185.185.186m-2.964 0h2.119a.186.186 0 00.185-.186V6.29a.185.185 0 00-.185-.185H5.136a.186.186 0 00-.186.185v1.887c0 .102.084.185.186.186m5.893 2.715h2.118a.186.186 0 00.186-.185V9.006a.186.186 0 00-.186-.186h-2.118a.185.185 0 00-.185.185v1.888c0 .102.082.185.185.185m-2.93 0h2.12a.185.185 0 00.184-.185V9.006a.185.185 0 00-.184-.186h-2.12a.185.185 0 00-.184.185v1.888c0 .102.083.185.185.185m-2.964 0h2.119a.185.185 0 00.185-.185V9.006a.185.185 0 00-.184-.186h-2.12a.186.186 0 00-.186.186v1.887c0 .102.084.185.186.185m-2.92 0h2.12a.185.185 0 00.184-.185V9.006a.185.185 0 00-.184-.186h-2.12a.185.185 0 00-.184.185v1.888c0 .102.082.185.185.185M23.763 9.89c-.065-.051-.672-.51-1.954-.51-.338.001-.676.03-1.01.087-.248-1.7-1.653-2.53-1.716-2.566l-.344-.199-.226.327c-.284.438-.49.922-.612 1.43-.23.97-.09 1.882.403 2.661-.595.332-1.55.413-1.744.42H.751a.751.751 0 00-.75.748 11.376 11.376 0 00.692 4.062c.545 1.428 1.355 2.48 2.41 3.124 1.18.723 3.1 1.137 5.275 1.137.983.003 1.963-.086 2.93-.266a12.248 12.248 0 003.823-1.389c.98-.567 1.86-1.288 2.61-2.136 1.252-1.418 1.998-2.997 2.553-4.4h.221c1.372 0 2.215-.549 2.68-1.009.309-.293.55-.65.707-1.046l.098-.288z"})})}let U=[{title:"Resources",links:[{label:"Getting Started",href:"https://minecraft-server-manager.readthedocs.io/en/latest/getting-started/",external:!0},{label:"Configuration",href:"https://minecraft-server-manager.readthedocs.io/en/latest/configuration/",external:!0},{label:"Troubleshooting",href:"https://minecraft-server-manager.readthedocs.io/en/latest/troubleshooting/",external:!0}]},{title:"Documentation",links:[{label:"CLI Commands",href:"https://minecraft-server-manager.readthedocs.io/en/latest/cli/",external:!0},{label:"API Reference",href:"https://minecraft-server-manager.readthedocs.io/en/latest/console/",external:!0},{label:"itzg Reference",href:"https://minecraft-server-manager.readthedocs.io/en/latest/itzg-reference/",external:!0}]},{title:"Community",links:[{label:"GitHub",href:"https://github.com/smallmiro/minecraft-server-manager",external:!0},{label:"Issues",href:"https://github.com/smallmiro/minecraft-server-manager/issues",external:!0}]},{title:"About",links:[{label:"License",href:"https://github.com/smallmiro/minecraft-server-manager/blob/main/LICENSE",external:!0},{label:"Docker Hub",href:"https://hub.docker.com/r/itzg/minecraft-server",external:!0}]}];function H(){let e=new Date().getFullYear();return(0,n.jsx)(a.Z,{component:"footer",sx:{backgroundColor:"background.paper",borderTop:"1px solid",borderColor:"divider",mt:"auto"},children:(0,n.jsxs)(_.Z,{maxWidth:"lg",sx:{py:6},children:[(0,n.jsx)(a.Z,{sx:{display:"grid",gridTemplateColumns:{xs:"repeat(2, 1fr)",sm:"repeat(4, 1fr)"},gap:4,mb:4},children:U.map(e=>(0,n.jsxs)(a.Z,{children:[(0,n.jsx)(x.Z,{variant:"subtitle2",sx:{fontWeight:600,color:"text.primary",mb:2},children:e.title}),(0,n.jsx)(a.Z,{component:"ul",sx:{listStyle:"none",p:0,m:0},children:e.links.map(e=>(0,n.jsx)(a.Z,{component:"li",sx:{mb:1},children:(0,n.jsx)(E.Z,{href:e.href,target:e.external?"_blank":void 0,rel:e.external?"noopener noreferrer":void 0,underline:"hover",sx:{color:"text.secondary",fontSize:"0.875rem",transition:"color 0.2s ease","&:hover":{color:"primary.main"}},children:e.label})},e.label))})]},e.title))}),(0,n.jsx)(q.Z,{sx:{mb:3}}),(0,n.jsxs)(a.Z,{sx:{display:"flex",flexDirection:{xs:"column",sm:"row"},justifyContent:"space-between",alignItems:{xs:"flex-start",sm:"center"},gap:2},children:[(0,n.jsxs)(x.Z,{variant:"body2",sx:{color:"text.tertiary"},children:[e," \xa9"," ",(0,n.jsx)(E.Z,{href:"https://github.com/smallmiro/minecraft-server-manager",target:"_blank",rel:"noopener noreferrer",underline:"hover",sx:{color:"primary.main"},children:"Minecraft Server Management Console"})]}),(0,n.jsxs)(a.Z,{sx:{display:"flex",gap:2},children:[(0,n.jsx)(E.Z,{href:"https://github.com/smallmiro/minecraft-server-manager",target:"_blank",rel:"noopener noreferrer","aria-label":"GitHub",sx:{color:"text.secondary",transition:"color 0.2s ease","&:hover":{color:"text.primary"}},children:(0,n.jsx)(M.Z,{fontSize:"small"})}),(0,n.jsx)(E.Z,{href:"https://minecraft-server-manager.readthedocs.io/",target:"_blank",rel:"noopener noreferrer","aria-label":"Documentation",sx:{color:"text.secondary",transition:"color 0.2s ease","&:hover":{color:"text.primary"}},children:(0,n.jsx)(L.Z,{fontSize:"small"})}),(0,n.jsx)(E.Z,{href:"https://hub.docker.com/r/itzg/minecraft-server",target:"_blank",rel:"noopener noreferrer","aria-label":"Docker Hub",sx:{color:"text.secondary",transition:"color 0.2s ease","&:hover":{color:"text.primary"}},children:(0,n.jsx)(R,{fontSize:"small"})})]})]})]})})}function B(e){let{children:r}=e,[t,s]=(0,i.useState)(!1);return(0,n.jsxs)(a.Z,{sx:{display:"flex",flexDirection:"column",minHeight:"100vh",backgroundColor:"background.default"},children:[(0,n.jsx)(T,{mobileOpen:t,onMenuToggle:()=>{s(!t)}}),(0,n.jsx)(a.Z,{component:"main",sx:{flexGrow:1,display:"flex",flexDirection:"column",pt:{xs:"".concat(88,"px"),sm:"".concat(96,"px")},pb:{xs:3,sm:4},px:{xs:2,sm:3,md:4},maxWidth:"1400px",width:"100%",mx:"auto"},children:r}),(0,n.jsx)(H,{})]})}},85480:function(e,r,t){"use strict";t.d(r,{U0:function(){return u},WS:function(){return p},Ie:function(){return I}});var n=t(94655),i=t(35106),a=t(7281),s=t(81071),l=t(97436),o=t(52082),c=t(79983),d=t(30417),x=t(36848),h=t(554),m=t(6986);function u(e){let{onSuccess:r}=e,[t,u]=(0,i.useState)(""),[p,f]=(0,i.useState)(""),[g,b]=(0,i.useState)(!1),[j,y]=(0,i.useState)({}),[v,Z]=(0,i.useState)(null),[w,C]=(0,i.useState)(!1),k=()=>{let e={};return t?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)||(e.email="Invalid email address"):e.email="Email is required",p||(e.password="Password is required"),y(e),0===Object.keys(e).length},S=async e=>{if(e.preventDefault(),Z(null),k()){C(!0);try{let e=await m.cg.email({email:t,password:p});if(e.error){Z(e.error.message||"Invalid credentials"),C(!1);return}r&&r()}catch(e){Z("An unexpected error occurred. Please try again."),C(!1)}}};return(0,n.jsxs)(a.Z,{component:"form",onSubmit:S,sx:{display:"flex",flexDirection:"column",gap:2},children:[v&&(0,n.jsx)(s.Z,{severity:"error",onClose:()=>Z(null),children:v}),(0,n.jsx)(l.Z,{label:"Email",type:"email",value:t,onChange:e=>u(e.target.value),error:!!j.email,helperText:j.email,disabled:w,fullWidth:!0,required:!0}),(0,n.jsx)(l.Z,{label:"Password",type:g?"text":"password",value:p,onChange:e=>f(e.target.value),error:!!j.password,helperText:j.password,disabled:w,fullWidth:!0,required:!0,InputProps:{endAdornment:(0,n.jsx)(o.Z,{position:"end",children:(0,n.jsx)(c.Z,{"aria-label":"toggle password visibility",onClick:()=>{b(!g)},edge:"end",children:g?(0,n.jsx)(x.Z,{}):(0,n.jsx)(h.Z,{})})})}}),(0,n.jsx)(d.Z,{type:"submit",variant:"contained",color:"primary",disabled:w,fullWidth:!0,size:"large",children:w?"Signing in...":"Sign In"})]})}function p(e){let{onSuccess:r}=e,[t,u]=(0,i.useState)(""),[p,f]=(0,i.useState)(""),[g,b]=(0,i.useState)(""),[j,y]=(0,i.useState)(""),[v,Z]=(0,i.useState)(!1),[w,C]=(0,i.useState)(!1),[k,S]=(0,i.useState)({}),[P,z]=(0,i.useState)(null),[I,W]=(0,i.useState)(!1),A=()=>{let e={};return t||(e.name="Name is required"),p?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(p)||(e.email="Invalid email address"):e.email="Email is required",g?g.length<8&&(e.password="Password must be at least 8 characters"):e.password="Password is required",j?g!==j&&(e.confirmPassword="Passwords do not match"):e.confirmPassword="Please confirm your password",S(e),0===Object.keys(e).length},D=async e=>{if(e.preventDefault(),z(null),A()){W(!0);try{let e=await m.y1.email({email:p,password:g,name:t});if(e.error){z(e.error.message||"Registration failed"),W(!1);return}r&&r()}catch(e){z("An unexpected error occurred. Please try again."),W(!1)}}};return(0,n.jsxs)(a.Z,{component:"form",onSubmit:D,sx:{display:"flex",flexDirection:"column",gap:2},children:[P&&(0,n.jsx)(s.Z,{severity:"error",onClose:()=>z(null),children:P}),(0,n.jsx)(l.Z,{label:"Name",type:"text",value:t,onChange:e=>u(e.target.value),error:!!k.name,helperText:k.name,disabled:I,fullWidth:!0,required:!0}),(0,n.jsx)(l.Z,{label:"Email",type:"email",value:p,onChange:e=>f(e.target.value),error:!!k.email,helperText:k.email,disabled:I,fullWidth:!0,required:!0}),(0,n.jsx)(l.Z,{label:"Password",type:v?"text":"password",value:g,onChange:e=>b(e.target.value),error:!!k.password,helperText:k.password,disabled:I,fullWidth:!0,required:!0,InputProps:{endAdornment:(0,n.jsx)(o.Z,{position:"end",children:(0,n.jsx)(c.Z,{"aria-label":"toggle password visibility",onClick:()=>{Z(!v)},edge:"end",children:v?(0,n.jsx)(x.Z,{}):(0,n.jsx)(h.Z,{})})})}}),(0,n.jsx)(l.Z,{label:"Confirm Password",type:w?"text":"password",value:j,onChange:e=>y(e.target.value),error:!!k.confirmPassword,helperText:k.confirmPassword,disabled:I,fullWidth:!0,required:!0,InputProps:{endAdornment:(0,n.jsx)(o.Z,{position:"end",children:(0,n.jsx)(c.Z,{"aria-label":"toggle password visibility",onClick:()=>{C(!w)},edge:"end",children:w?(0,n.jsx)(x.Z,{}):(0,n.jsx)(h.Z,{})})})}}),(0,n.jsx)(d.Z,{type:"submit",variant:"contained",color:"primary",disabled:I,fullWidth:!0,size:"large",children:I?"Creating account...":"Sign Up"})]})}var f=t(74228),g=t(93017),b=t(86702),j=t(88812),y=t(31317),v=t(25333),Z=t(69123),w=t(7178),C=t(17820),k=t(73424),S=t(25169),P=t(41094),z=t(78319);function I(){let e=(0,f.useRouter)(),{data:r,isPending:t}=(0,m.kP)(),[s,l]=(0,i.useState)(null),o=()=>{l(null)},x=async()=>{o(),await (0,m.w7)(),e.push("/login")};if(t)return(0,n.jsx)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:(0,n.jsx)(g.Z,{size:24})});if(!(null==r?void 0:r.user))return(0,n.jsx)(d.Z,{variant:"contained",color:"primary",onClick:()=>{e.push("/login")},children:"Sign In"});let{user:h}=r,u=((e,r)=>{if(e){let r=e.split(" ");return r.length>=2?"".concat(r[0][0]).concat(r[1][0]).toUpperCase():e.substring(0,2).toUpperCase()}return r?r[0].toUpperCase():"?"})(h.name,h.email);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(c.Z,{onClick:e=>{l(e.currentTarget)},"aria-label":"user menu",children:(0,n.jsx)(b.Z,{sx:{bgcolor:"primary.main"},children:u})}),(0,n.jsxs)(j.Z,{anchorEl:s,open:!!s,onClose:o,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},sx:{mt:1},children:[(0,n.jsxs)(a.Z,{sx:{px:2,py:1.5,minWidth:200},children:[(0,n.jsx)(y.Z,{variant:"subtitle1",fontWeight:"600",children:h.name||"User"}),(0,n.jsx)(y.Z,{variant:"body2",color:"text.secondary",children:h.email}),"admin"===h.role&&(0,n.jsx)(v.Z,{label:"Admin",size:"small",color:"primary",sx:{mt:1}})]}),(0,n.jsx)(Z.Z,{}),"admin"===h.role&&(0,n.jsxs)(w.Z,{onClick:()=>{o(),e.push("/admin/users")},children:[(0,n.jsx)(C.Z,{children:(0,n.jsx)(S.Z,{fontSize:"small"})}),(0,n.jsx)(k.Z,{children:"Users"})]}),(0,n.jsxs)(w.Z,{onClick:()=>{o(),e.push("/settings")},children:[(0,n.jsx)(C.Z,{children:(0,n.jsx)(P.Z,{fontSize:"small"})}),(0,n.jsx)(k.Z,{children:"Settings"})]}),(0,n.jsxs)(w.Z,{onClick:x,children:[(0,n.jsx)(C.Z,{children:(0,n.jsx)(z.Z,{fontSize:"small"})}),(0,n.jsx)(k.Z,{children:"Logout"})]})]})]})}},3454:function(e,r,t){"use strict";t.d(r,{LoadingProvider:function(){return o},startLoading:function(){return c},stopLoading:function(){return d}});var n=t(94655),i=t(35106),a=t(74228),s=t(31477),l=t.n(s);function o(e){let{children:r}=e,t=(0,a.usePathname)(),s=(0,a.useSearchParams)();return(0,i.useEffect)(()=>{l().done()},[t,s]),(0,n.jsx)(n.Fragment,{children:r})}function c(){l().start()}function d(){l().done()}l().configure({showSpinner:!1,speed:300,minimum:.1})},8690:function(e,r,t){"use strict";t.d(r,{Av:function(){return n.startLoading}});var n=t(3454)},6986:function(e,r,t){"use strict";t.d(r,{Cp:function(){return h},Nq:function(){return x},cg:function(){return l},kP:function(){return d},w7:function(){return o},y1:function(){return c},zB:function(){return m}});var n=t(77054),i=t(61648),a=t(35016);let s=(0,n.X)({baseURL:a.env.NEXT_PUBLIC_BETTER_AUTH_URL||"",plugins:[(0,i.zB)()]}),{signIn:l,signOut:o,signUp:c,useSession:d,updateUser:x,changePassword:h}=s,m=s.admin}},function(e){e.O(0,[6812,9760,5004,7296,7436,1071,2542,55,4219,8347,9097,9022,6918,3669,2757,1744],function(){return e(e.s=16387)}),_N_E=e.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4095],{16387:function(e,r,t){Promise.resolve().then(t.bind(t,6453))},6453:function(e,r,t){"use strict";t.r(r),t.d(r,{default:function(){return B}});var n=t(94655),i=t(35106),a=t(7281),s=t(74228),l=t(46725),o=t(56275),c=t(62108),d=t(79983),x=t(31317),h=t(62142),m=t(90158),u=t(58347),p=t(49954),f=t(17820),g=t(73424),b=t(61505),j=t(71185),y=t(76176),v=t(27171),Z=t(35847),w=t(29983),C=t(80620),k=t(84974),S=t(34675),P=t(85480),z=t(64779);function I(e){return(0,n.jsxs)(z.Z,{...e,viewBox:"0 0 32 32",children:[(0,n.jsx)("rect",{width:"32",height:"32",fill:"#5DA840"}),(0,n.jsx)("rect",{x:"4",y:"8",width:"8",height:"8",fill:"#000"}),(0,n.jsx)("rect",{x:"20",y:"8",width:"8",height:"8",fill:"#000"}),(0,n.jsx)("rect",{x:"12",y:"16",width:"8",height:"4",fill:"#000"}),(0,n.jsx)("rect",{x:"8",y:"20",width:"16",height:"8",fill:"#000"}),(0,n.jsx)("rect",{x:"8",y:"28",width:"4",height:"4",fill:"#000"}),(0,n.jsx)("rect",{x:"20",y:"28",width:"4",height:"4",fill:"#000"}),(0,n.jsx)("rect",{x:"0",y:"0",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"}),(0,n.jsx)("rect",{x:"8",y:"4",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"}),(0,n.jsx)("rect",{x:"24",y:"0",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"}),(0,n.jsx)("rect",{x:"28",y:"8",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"}),(0,n.jsx)("rect",{x:"0",y:"24",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"})]})}var W=t(8690),A=t(6986);let D=[{label:"Dashboard",href:"/dashboard",icon:(0,n.jsx)(y.Z,{})},{label:"Servers",href:"/servers",icon:(0,n.jsx)(v.Z,{})},{label:"Worlds",href:"/worlds",icon:(0,n.jsx)(k.Z,{})},{label:"Players",href:"/players",icon:(0,n.jsx)(Z.Z,{})},{label:"Audit",href:"/audit-logs",icon:(0,n.jsx)(C.Z,{})},{label:"Backups",href:"/backups",icon:(0,n.jsx)(S.Z,{})},{label:"Routing",href:"/routing",icon:(0,n.jsx)(w.Z,{})}];function T(e){let{mobileOpen:r,onMenuToggle:t}=e,i=(0,s.usePathname)(),{data:y}=(0,A.kP)(),v=e=>"/dashboard"===e?"/dashboard"===i||"/"===i:i.startsWith(e);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o.Z,{position:"fixed",elevation:0,sx:{backgroundColor:"background.paper",borderBottom:"1px solid",borderColor:"divider",zIndex:e=>e.zIndex.drawer+1},children:(0,n.jsxs)(c.Z,{sx:{maxWidth:"1400px",width:"100%",mx:"auto",px:{xs:2,sm:3}},children:[(0,n.jsx)(d.Z,{color:"inherit","aria-label":"open menu",edge:"start",onClick:t,sx:{mr:2,display:{md:"none"}},children:(0,n.jsx)(b.Z,{})}),(0,n.jsxs)(l.default,{href:"/",style:{textDecoration:"none",display:"flex",alignItems:"center"},children:[(0,n.jsx)(I,{sx:{fontSize:28,color:"primary.main",mr:1}}),(0,n.jsx)(x.Z,{variant:"h6",component:"span",sx:{fontFamily:'"Minecraft", sans-serif',fontWeight:400,color:"common.white",letterSpacing:"0.05em",fontSize:"1.1rem"},children:"Minecraft Console"})]}),(0,n.jsx)(a.Z,{component:"nav",sx:{display:{xs:"none",md:"flex"},alignItems:"center",gap:1,ml:4,flex:1},children:D.map(e=>{let r=v(e.href);return(0,n.jsx)(l.default,{href:e.href,style:{textDecoration:"none"},onClick:()=>!r&&(0,W.Av)(),children:(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1,borderRadius:2,color:r?"primary.main":"text.secondary",backgroundColor:r?"action.selected":"transparent",transition:"all 0.2s ease","&:hover":{backgroundColor:"action.hover",color:r?"primary.main":"text.primary"}},children:[(0,n.jsx)(a.Z,{component:"span",sx:{display:"flex",alignItems:"center","& svg":{fontSize:20}},children:e.icon}),(0,n.jsx)(x.Z,{variant:"body2",sx:{fontWeight:r?600:400},children:e.label})]})},e.href)})}),(0,n.jsx)(a.Z,{sx:{display:"flex",alignItems:"center",gap:2},children:(0,n.jsx)(P.Ie,{})})]})}),(0,n.jsx)(h.ZP,{variant:"temporary",anchor:"left",open:r,onClose:t,ModalProps:{keepMounted:!0},sx:{display:{xs:"block",md:"none"},"& .MuiDrawer-paper":{boxSizing:"border-box",width:280,backgroundColor:"background.paper"}},children:(0,n.jsxs)(a.Z,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",px:2,py:2,minHeight:64,borderBottom:"1px solid",borderColor:"divider"},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center"},children:[(0,n.jsx)(I,{sx:{fontSize:24,color:"primary.main",mr:1}}),(0,n.jsx)(x.Z,{variant:"h6",component:"span",sx:{fontFamily:'"Minecraft", sans-serif',fontWeight:400,color:"primary.main",letterSpacing:"0.05em",fontSize:"1rem"},children:"Minecraft Console"})]}),(0,n.jsx)(d.Z,{onClick:t,"aria-label":"close menu",children:(0,n.jsx)(j.Z,{})})]}),(0,n.jsx)(m.Z,{sx:{flex:1,px:1,py:2},children:D.map(e=>{let r=v(e.href);return(0,n.jsx)(u.ZP,{disablePadding:!0,sx:{mb:.5},children:(0,n.jsxs)(p.Z,{component:l.default,href:e.href,onClick:()=>{t(),r||(0,W.Av)()},"aria-current":r?"page":void 0,sx:{borderRadius:2,backgroundColor:r?"action.selected":"transparent","&:hover":{backgroundColor:"action.hover"}},children:[(0,n.jsx)(f.Z,{sx:{color:r?"primary.main":"text.secondary",minWidth:40},children:e.icon}),(0,n.jsx)(g.Z,{primary:e.label,primaryTypographyProps:{fontWeight:r?600:400,color:r?"primary.main":"text.primary"}})]})},e.href)})})]})})]})}var _=t(67337),E=t(41261),q=t(69123),M=t(75845),L=t(43880);function R(e){return(0,n.jsx)(z.Z,{...e,viewBox:"0 0 24 24",children:(0,n.jsx)("path",{d:"M13.983 11.078h2.119a.186.186 0 00.186-.185V9.006a.186.186 0 00-.186-.186h-2.119a.185.185 0 00-.185.185v1.888c0 .102.083.185.185.185m-2.954-5.43h2.118a.186.186 0 00.186-.186V3.574a.186.186 0 00-.186-.185h-2.118a.185.185 0 00-.185.185v1.888c0 .102.082.185.185.186m0 2.716h2.118a.187.187 0 00.186-.186V6.29a.186.186 0 00-.186-.185h-2.118a.185.185 0 00-.185.185v1.887c0 .102.082.185.185.186m-2.93 0h2.12a.186.186 0 00.184-.186V6.29a.185.185 0 00-.185-.185H8.1a.185.185 0 00-.185.185v1.887c0 .102.083.185.185.186m-2.964 0h2.119a.186.186 0 00.185-.186V6.29a.185.185 0 00-.185-.185H5.136a.186.186 0 00-.186.185v1.887c0 .102.084.185.186.186m5.893 2.715h2.118a.186.186 0 00.186-.185V9.006a.186.186 0 00-.186-.186h-2.118a.185.185 0 00-.185.185v1.888c0 .102.082.185.185.185m-2.93 0h2.12a.185.185 0 00.184-.185V9.006a.185.185 0 00-.184-.186h-2.12a.185.185 0 00-.184.185v1.888c0 .102.083.185.185.185m-2.964 0h2.119a.185.185 0 00.185-.185V9.006a.185.185 0 00-.184-.186h-2.12a.186.186 0 00-.186.186v1.887c0 .102.084.185.186.185m-2.92 0h2.12a.185.185 0 00.184-.185V9.006a.185.185 0 00-.184-.186h-2.12a.185.185 0 00-.184.185v1.888c0 .102.082.185.185.185M23.763 9.89c-.065-.051-.672-.51-1.954-.51-.338.001-.676.03-1.01.087-.248-1.7-1.653-2.53-1.716-2.566l-.344-.199-.226.327c-.284.438-.49.922-.612 1.43-.23.97-.09 1.882.403 2.661-.595.332-1.55.413-1.744.42H.751a.751.751 0 00-.75.748 11.376 11.376 0 00.692 4.062c.545 1.428 1.355 2.48 2.41 3.124 1.18.723 3.1 1.137 5.275 1.137.983.003 1.963-.086 2.93-.266a12.248 12.248 0 003.823-1.389c.98-.567 1.86-1.288 2.61-2.136 1.252-1.418 1.998-2.997 2.553-4.4h.221c1.372 0 2.215-.549 2.68-1.009.309-.293.55-.65.707-1.046l.098-.288z"})})}let U=[{title:"Resources",links:[{label:"Getting Started",href:"https://minecraft-server-manager.readthedocs.io/en/latest/getting-started/",external:!0},{label:"Configuration",href:"https://minecraft-server-manager.readthedocs.io/en/latest/configuration/",external:!0},{label:"Troubleshooting",href:"https://minecraft-server-manager.readthedocs.io/en/latest/troubleshooting/",external:!0}]},{title:"Documentation",links:[{label:"CLI Commands",href:"https://minecraft-server-manager.readthedocs.io/en/latest/cli/",external:!0},{label:"API Reference",href:"https://minecraft-server-manager.readthedocs.io/en/latest/console/",external:!0},{label:"itzg Reference",href:"https://minecraft-server-manager.readthedocs.io/en/latest/itzg-reference/",external:!0}]},{title:"Community",links:[{label:"GitHub",href:"https://github.com/smallmiro/minecraft-server-manager",external:!0},{label:"Issues",href:"https://github.com/smallmiro/minecraft-server-manager/issues",external:!0}]},{title:"About",links:[{label:"License",href:"https://github.com/smallmiro/minecraft-server-manager/blob/main/LICENSE",external:!0},{label:"Docker Hub",href:"https://hub.docker.com/r/itzg/minecraft-server",external:!0}]}];function H(){let e=new Date().getFullYear();return(0,n.jsx)(a.Z,{component:"footer",sx:{backgroundColor:"background.paper",borderTop:"1px solid",borderColor:"divider",mt:"auto"},children:(0,n.jsxs)(_.Z,{maxWidth:"lg",sx:{py:6},children:[(0,n.jsx)(a.Z,{sx:{display:"grid",gridTemplateColumns:{xs:"repeat(2, 1fr)",sm:"repeat(4, 1fr)"},gap:4,mb:4},children:U.map(e=>(0,n.jsxs)(a.Z,{children:[(0,n.jsx)(x.Z,{variant:"subtitle2",sx:{fontWeight:600,color:"text.primary",mb:2},children:e.title}),(0,n.jsx)(a.Z,{component:"ul",sx:{listStyle:"none",p:0,m:0},children:e.links.map(e=>(0,n.jsx)(a.Z,{component:"li",sx:{mb:1},children:(0,n.jsx)(E.Z,{href:e.href,target:e.external?"_blank":void 0,rel:e.external?"noopener noreferrer":void 0,underline:"hover",sx:{color:"text.secondary",fontSize:"0.875rem",transition:"color 0.2s ease","&:hover":{color:"primary.main"}},children:e.label})},e.label))})]},e.title))}),(0,n.jsx)(q.Z,{sx:{mb:3}}),(0,n.jsxs)(a.Z,{sx:{display:"flex",flexDirection:{xs:"column",sm:"row"},justifyContent:"space-between",alignItems:{xs:"flex-start",sm:"center"},gap:2},children:[(0,n.jsxs)(x.Z,{variant:"body2",sx:{color:"text.tertiary"},children:[e," \xa9"," ",(0,n.jsx)(E.Z,{href:"https://github.com/smallmiro/minecraft-server-manager",target:"_blank",rel:"noopener noreferrer",underline:"hover",sx:{color:"primary.main"},children:"Minecraft Server Management Console"})]}),(0,n.jsxs)(a.Z,{sx:{display:"flex",gap:2},children:[(0,n.jsx)(E.Z,{href:"https://github.com/smallmiro/minecraft-server-manager",target:"_blank",rel:"noopener noreferrer","aria-label":"GitHub",sx:{color:"text.secondary",transition:"color 0.2s ease","&:hover":{color:"text.primary"}},children:(0,n.jsx)(M.Z,{fontSize:"small"})}),(0,n.jsx)(E.Z,{href:"https://minecraft-server-manager.readthedocs.io/",target:"_blank",rel:"noopener noreferrer","aria-label":"Documentation",sx:{color:"text.secondary",transition:"color 0.2s ease","&:hover":{color:"text.primary"}},children:(0,n.jsx)(L.Z,{fontSize:"small"})}),(0,n.jsx)(E.Z,{href:"https://hub.docker.com/r/itzg/minecraft-server",target:"_blank",rel:"noopener noreferrer","aria-label":"Docker Hub",sx:{color:"text.secondary",transition:"color 0.2s ease","&:hover":{color:"text.primary"}},children:(0,n.jsx)(R,{fontSize:"small"})})]})]})]})})}function B(e){let{children:r}=e,[t,s]=(0,i.useState)(!1);return(0,n.jsxs)(a.Z,{sx:{display:"flex",flexDirection:"column",minHeight:"100vh",backgroundColor:"background.default"},children:[(0,n.jsx)(T,{mobileOpen:t,onMenuToggle:()=>{s(!t)}}),(0,n.jsx)(a.Z,{component:"main",sx:{flexGrow:1,display:"flex",flexDirection:"column",pt:{xs:"".concat(88,"px"),sm:"".concat(96,"px")},pb:{xs:3,sm:4},px:{xs:2,sm:3,md:4},maxWidth:"1400px",width:"100%",mx:"auto"},children:r}),(0,n.jsx)(H,{})]})}},85480:function(e,r,t){"use strict";t.d(r,{U0:function(){return u},WS:function(){return p},Ie:function(){return I}});var n=t(94655),i=t(35106),a=t(7281),s=t(81071),l=t(97436),o=t(52082),c=t(79983),d=t(30417),x=t(36848),h=t(554),m=t(6986);function u(e){let{onSuccess:r}=e,[t,u]=(0,i.useState)(""),[p,f]=(0,i.useState)(""),[g,b]=(0,i.useState)(!1),[j,y]=(0,i.useState)({}),[v,Z]=(0,i.useState)(null),[w,C]=(0,i.useState)(!1),k=()=>{let e={};return t?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)||(e.email="Invalid email address"):e.email="Email is required",p||(e.password="Password is required"),y(e),0===Object.keys(e).length},S=async e=>{if(e.preventDefault(),Z(null),k()){C(!0);try{let e=await m.cg.email({email:t,password:p});if(e.error){Z(e.error.message||"Invalid credentials"),C(!1);return}r&&r()}catch(e){Z("An unexpected error occurred. Please try again."),C(!1)}}};return(0,n.jsxs)(a.Z,{component:"form",onSubmit:S,sx:{display:"flex",flexDirection:"column",gap:2},children:[v&&(0,n.jsx)(s.Z,{severity:"error",onClose:()=>Z(null),children:v}),(0,n.jsx)(l.Z,{label:"Email",type:"email",value:t,onChange:e=>u(e.target.value),error:!!j.email,helperText:j.email,disabled:w,fullWidth:!0,required:!0}),(0,n.jsx)(l.Z,{label:"Password",type:g?"text":"password",value:p,onChange:e=>f(e.target.value),error:!!j.password,helperText:j.password,disabled:w,fullWidth:!0,required:!0,InputProps:{endAdornment:(0,n.jsx)(o.Z,{position:"end",children:(0,n.jsx)(c.Z,{"aria-label":"toggle password visibility",onClick:()=>{b(!g)},edge:"end",children:g?(0,n.jsx)(x.Z,{}):(0,n.jsx)(h.Z,{})})})}}),(0,n.jsx)(d.Z,{type:"submit",variant:"contained",color:"primary",disabled:w,fullWidth:!0,size:"large",children:w?"Signing in...":"Sign In"})]})}function p(e){let{onSuccess:r}=e,[t,u]=(0,i.useState)(""),[p,f]=(0,i.useState)(""),[g,b]=(0,i.useState)(""),[j,y]=(0,i.useState)(""),[v,Z]=(0,i.useState)(!1),[w,C]=(0,i.useState)(!1),[k,S]=(0,i.useState)({}),[P,z]=(0,i.useState)(null),[I,W]=(0,i.useState)(!1),A=()=>{let e={};return t||(e.name="Name is required"),p?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(p)||(e.email="Invalid email address"):e.email="Email is required",g?g.length<8&&(e.password="Password must be at least 8 characters"):e.password="Password is required",j?g!==j&&(e.confirmPassword="Passwords do not match"):e.confirmPassword="Please confirm your password",S(e),0===Object.keys(e).length},D=async e=>{if(e.preventDefault(),z(null),A()){W(!0);try{let e=await m.y1.email({email:p,password:g,name:t});if(e.error){z(e.error.message||"Registration failed"),W(!1);return}r&&r()}catch(e){z("An unexpected error occurred. Please try again."),W(!1)}}};return(0,n.jsxs)(a.Z,{component:"form",onSubmit:D,sx:{display:"flex",flexDirection:"column",gap:2},children:[P&&(0,n.jsx)(s.Z,{severity:"error",onClose:()=>z(null),children:P}),(0,n.jsx)(l.Z,{label:"Name",type:"text",value:t,onChange:e=>u(e.target.value),error:!!k.name,helperText:k.name,disabled:I,fullWidth:!0,required:!0}),(0,n.jsx)(l.Z,{label:"Email",type:"email",value:p,onChange:e=>f(e.target.value),error:!!k.email,helperText:k.email,disabled:I,fullWidth:!0,required:!0}),(0,n.jsx)(l.Z,{label:"Password",type:v?"text":"password",value:g,onChange:e=>b(e.target.value),error:!!k.password,helperText:k.password,disabled:I,fullWidth:!0,required:!0,InputProps:{endAdornment:(0,n.jsx)(o.Z,{position:"end",children:(0,n.jsx)(c.Z,{"aria-label":"toggle password visibility",onClick:()=>{Z(!v)},edge:"end",children:v?(0,n.jsx)(x.Z,{}):(0,n.jsx)(h.Z,{})})})}}),(0,n.jsx)(l.Z,{label:"Confirm Password",type:w?"text":"password",value:j,onChange:e=>y(e.target.value),error:!!k.confirmPassword,helperText:k.confirmPassword,disabled:I,fullWidth:!0,required:!0,InputProps:{endAdornment:(0,n.jsx)(o.Z,{position:"end",children:(0,n.jsx)(c.Z,{"aria-label":"toggle password visibility",onClick:()=>{C(!w)},edge:"end",children:w?(0,n.jsx)(x.Z,{}):(0,n.jsx)(h.Z,{})})})}}),(0,n.jsx)(d.Z,{type:"submit",variant:"contained",color:"primary",disabled:I,fullWidth:!0,size:"large",children:I?"Creating account...":"Sign Up"})]})}var f=t(74228),g=t(93017),b=t(86702),j=t(88812),y=t(31317),v=t(25333),Z=t(69123),w=t(7178),C=t(17820),k=t(73424),S=t(25169),P=t(41094),z=t(78319);function I(){let e=(0,f.useRouter)(),{data:r,isPending:t}=(0,m.kP)(),[s,l]=(0,i.useState)(null),o=()=>{l(null)},x=async()=>{o(),await (0,m.w7)(),e.push("/login")};if(t)return(0,n.jsx)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:(0,n.jsx)(g.Z,{size:24})});if(!(null==r?void 0:r.user))return(0,n.jsx)(d.Z,{variant:"contained",color:"primary",onClick:()=>{e.push("/login")},children:"Sign In"});let{user:h}=r,u=((e,r)=>{if(e){let r=e.split(" ");return r.length>=2?"".concat(r[0][0]).concat(r[1][0]).toUpperCase():e.substring(0,2).toUpperCase()}return r?r[0].toUpperCase():"?"})(h.name,h.email);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(c.Z,{onClick:e=>{l(e.currentTarget)},"aria-label":"user menu",children:(0,n.jsx)(b.Z,{sx:{bgcolor:"primary.main"},children:u})}),(0,n.jsxs)(j.Z,{anchorEl:s,open:!!s,onClose:o,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},sx:{mt:1},children:[(0,n.jsxs)(a.Z,{sx:{px:2,py:1.5,minWidth:200},children:[(0,n.jsx)(y.Z,{variant:"subtitle1",fontWeight:"600",children:h.name||"User"}),(0,n.jsx)(y.Z,{variant:"body2",color:"text.secondary",children:h.email}),"admin"===h.role&&(0,n.jsx)(v.Z,{label:"Admin",size:"small",color:"primary",sx:{mt:1}})]}),(0,n.jsx)(Z.Z,{}),"admin"===h.role&&(0,n.jsxs)(w.Z,{onClick:()=>{o(),e.push("/admin/users")},children:[(0,n.jsx)(C.Z,{children:(0,n.jsx)(S.Z,{fontSize:"small"})}),(0,n.jsx)(k.Z,{children:"Users"})]}),(0,n.jsxs)(w.Z,{onClick:()=>{o(),e.push("/settings")},children:[(0,n.jsx)(C.Z,{children:(0,n.jsx)(P.Z,{fontSize:"small"})}),(0,n.jsx)(k.Z,{children:"Settings"})]}),(0,n.jsxs)(w.Z,{onClick:x,children:[(0,n.jsx)(C.Z,{children:(0,n.jsx)(z.Z,{fontSize:"small"})}),(0,n.jsx)(k.Z,{children:"Logout"})]})]})]})}},3454:function(e,r,t){"use strict";t.d(r,{LoadingProvider:function(){return o},startLoading:function(){return c},stopLoading:function(){return d}});var n=t(94655),i=t(35106),a=t(74228),s=t(31477),l=t.n(s);function o(e){let{children:r}=e,t=(0,a.usePathname)(),s=(0,a.useSearchParams)();return(0,i.useEffect)(()=>{l().done()},[t,s]),(0,n.jsx)(n.Fragment,{children:r})}function c(){l().start()}function d(){l().done()}l().configure({showSpinner:!1,speed:300,minimum:.1})},8690:function(e,r,t){"use strict";t.d(r,{Av:function(){return n.startLoading}});var n=t(3454)},6986:function(e,r,t){"use strict";t.d(r,{Cp:function(){return h},Nq:function(){return x},cg:function(){return l},kP:function(){return d},w7:function(){return o},y1:function(){return c},zB:function(){return m}});var n=t(77054),i=t(61648),a=t(35016);let s=(0,n.X)({baseURL:a.env.NEXT_PUBLIC_BETTER_AUTH_URL||"",plugins:[(0,i.zB)()]}),{signIn:l,signOut:o,signUp:c,useSession:d,updateUser:x,changePassword:h}=s,m=s.admin}},function(e){e.O(0,[6812,9760,5004,7296,7436,1071,2542,55,4219,8347,9097,9022,423,3669,2757,1744],function(){return e(e.s=16387)}),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[781],{31809:function(e,n,r){Promise.resolve().then(r.bind(r,12192))},12192:function(e,n,r){"use strict";r.r(n),r.d(n,{default:function(){return G}});var s=r(94655),a=r(35106),l=r(7281),t=r(31317),i=r(84840),o=r(33402),c=r(60097),d=r(29793),x=r(75726),h=r(62328),p=r(7178),u=r(69899),j=r(76492),y=r(35847),m=r(628),Z=r(41565),b=r(90158),v=r(58347),g=r(73424),f=r(69783),k=r(86702),C=r(79983),P=r(30417),w=r(25333),S=r(99770),O=r(62508),E=r(5682),N=r(65087),B=r(76678),F=r(97436),A=r(93017),R=r(81071),W=r(66561),I=r(12795),L=r(96407),_=r(69366),T=r(11597),K=r(81960),q=r(30114);function z(e){let{onPlayerKicked:n}=e,[r,i]=(0,a.useState)(!0),[o,c]=(0,a.useState)(null),[d,x]=(0,a.useState)([]),[h,p]=(0,a.useState)(!1),[u,j]=(0,a.useState)(null),[y,z]=(0,a.useState)(""),[M,J]=(0,a.useState)(!1),Y=(0,a.useCallback)(async()=>{i(!0),c(null);try{let e=await fetch("/api/players");if(!e.ok)throw Error("Failed to fetch players");let n=await e.json();x(n.servers)}catch(e){c("Failed to load players"),console.error("Error fetching players:",e)}finally{i(!1)}},[]);(0,a.useEffect)(()=>{Y()},[Y]);let $=(e,n)=>{j({player:e,server:n}),z(""),p(!0)},D=async()=>{if(u){J(!0);try{if(!(await fetch("/api/players/kick",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({player:u.player.name,server:u.server,reason:y||"Kicked by administrator"})})).ok)throw Error("Failed to kick player");p(!1),j(null),null==n||n(u.player,u.server),await Y()}catch(e){console.error("Error kicking player:",e)}finally{J(!1)}}},G=d.some(e=>e.players.length>0);return(0,s.jsx)(m.Z,{"data-testid":"player-list",children:(0,s.jsxs)(Z.Z,{children:[(0,s.jsxs)(l.Z,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2},children:[(0,s.jsx)(t.Z,{variant:"h6",children:"Online Players"}),(0,s.jsx)(C.Z,{onClick:Y,disabled:r,"aria-label":"Refresh",children:(0,s.jsx)(_.Z,{})})]}),r&&(0,s.jsx)(l.Z,{sx:{display:"flex",justifyContent:"center",py:4},children:(0,s.jsx)(A.Z,{})}),o&&(0,s.jsx)(R.Z,{severity:"error",sx:{mb:2},children:o}),!r&&!o&&!G&&(0,s.jsx)(t.Z,{color:"text.secondary",sx:{textAlign:"center",py:4},children:"No players online"}),!r&&!o&&G&&(0,s.jsx)(l.Z,{children:d.map(e=>(0,s.jsxs)(W.Z,{defaultExpanded:e.players.length>0,children:[(0,s.jsx)(I.Z,{expandIcon:(0,s.jsx)(K.Z,{}),children:(0,s.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",gap:2,width:"100%"},children:[(0,s.jsx)(t.Z,{variant:"subtitle1",sx:{fontWeight:500},children:e.name}),(0,s.jsx)(w.Z,{label:"".concat(e.players.length," player").concat(1!==e.players.length?"s":""),size:"small",color:e.players.length>0?"success":"default"})]})}),(0,s.jsx)(L.Z,{children:0===e.players.length?(0,s.jsx)(t.Z,{color:"text.secondary",sx:{fontStyle:"italic"},children:"No players online on this server"}):(0,s.jsx)(b.Z,{dense:!0,children:e.players.map(n=>(0,s.jsxs)(v.ZP,{secondaryAction:(0,s.jsx)(C.Z,{edge:"end","aria-label":"Kick player",onClick:()=>$(n,e.name),color:"error",children:(0,s.jsx)(T.Z,{})}),children:[(0,s.jsx)(f.Z,{children:(0,s.jsx)(k.Z,{src:"https://mc-heads.net/avatar/".concat(n.uuid,"/40"),alt:n.name,children:(0,s.jsx)(q.Z,{})})}),(0,s.jsx)(g.Z,{primary:n.name,secondary:n.uuid.substring(0,8)+"..."})]},n.uuid))})})]},e.name))}),(0,s.jsxs)(S.Z,{open:h,onClose:()=>p(!1),children:[(0,s.jsx)(O.Z,{children:"Kick Player"}),(0,s.jsxs)(E.Z,{children:[(0,s.jsxs)(N.Z,{children:["Are you sure you want to kick ",null==u?void 0:u.player.name," from ",null==u?void 0:u.server,"?"]}),(0,s.jsx)(F.Z,{autoFocus:!0,margin:"dense",label:"Reason (optional)",fullWidth:!0,variant:"outlined",value:y,onChange:e=>z(e.target.value),placeholder:"Kicked by administrator"})]}),(0,s.jsxs)(B.Z,{children:[(0,s.jsx)(P.Z,{onClick:()=>p(!1),disabled:M,children:"Cancel"}),(0,s.jsx)(P.Z,{onClick:D,color:"error",variant:"contained",disabled:M,"aria-label":"Confirm kick",children:M?(0,s.jsx)(A.Z,{size:20}):"Confirm"})]})]})]})})}var M=r(61650),J=r(73729),Y=r(41189),$=r(92666);function D(e){let{children:n,value:r,index:a}=e;return(0,s.jsx)("div",{role:"tabpanel",hidden:r!==a,children:r===a&&(0,s.jsx)(l.Z,{sx:{py:3},children:n})})}function G(){let[e,n]=(0,a.useState)(0),[r,m]=(0,a.useState)(""),{data:Z,isLoading:b}=(0,$.x$)(),v=null==Z?void 0:Z.servers;return(0,a.useEffect)(()=>{!r&&v&&v.length>0&&m(v[0].name)},[v,r]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(u.Z,{elevation:0,sx:{mb:4,p:3,background:e=>"linear-gradient(135deg, ".concat((0,j.Fq)(e.palette.info.main,.1)," 0%, ").concat((0,j.Fq)(e.palette.secondary.main,.1)," 100%)"),borderRadius:2,border:e=>"1px solid ".concat((0,j.Fq)(e.palette.info.main,.2))},children:(0,s.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",gap:2},children:[(0,s.jsx)(l.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:56,height:56,borderRadius:2,bgcolor:"info.main",color:"info.contrastText"},children:(0,s.jsx)(y.Z,{sx:{fontSize:32}})}),(0,s.jsxs)(l.Z,{children:[(0,s.jsx)(t.Z,{variant:"h4",component:"h1",fontWeight:"bold",children:"Player Management"}),(0,s.jsx)(t.Z,{variant:"body1",color:"text.secondary",children:"Manage players, whitelist, operators, and bans across your servers"})]})]})}),(0,s.jsx)(l.Z,{sx:{mb:3},children:(0,s.jsxs)(d.Z,{sx:{minWidth:200},children:[(0,s.jsx)(x.Z,{id:"server-select-label",children:"Server"}),(0,s.jsx)(h.Z,{labelId:"server-select-label",value:r,label:"Server",onChange:e=>m(e.target.value),disabled:b,children:null==v?void 0:v.map(e=>(0,s.jsx)(p.Z,{value:e.name,children:e.name},e.name))})]})}),(0,s.jsx)(l.Z,{sx:{borderBottom:1,borderColor:"divider"},children:(0,s.jsxs)(o.Z,{value:e,onChange:(e,r)=>{n(r)},"aria-label":"Player management tabs",children:[(0,s.jsx)(c.Z,{label:"Online Players"}),(0,s.jsx)(c.Z,{label:"Whitelist",disabled:!r}),(0,s.jsx)(c.Z,{label:"Operators",disabled:!r}),(0,s.jsx)(c.Z,{label:"Ban List",disabled:!r})]})}),(0,s.jsx)(D,{value:e,index:0,children:(0,s.jsx)(z,{})}),(0,s.jsx)(D,{value:e,index:1,children:r&&(0,s.jsxs)(i.ZP,{container:!0,spacing:3,children:[(0,s.jsx)(i.ZP,{item:!0,xs:12,md:8,children:(0,s.jsx)(M.Z,{serverName:r})}),(0,s.jsx)(i.ZP,{item:!0,xs:12,md:4,children:(0,s.jsxs)(l.Z,{sx:{p:2,bgcolor:"background.paper",borderRadius:1},children:[(0,s.jsx)(t.Z,{variant:"subtitle2",color:"text.secondary",gutterBottom:!0,children:"About Whitelist"}),(0,s.jsx)(t.Z,{variant:"body2",color:"text.secondary",children:"The whitelist controls which players can join your server. When enabled, only players on the whitelist can connect. Add players by their Minecraft username."})]})})]})}),(0,s.jsx)(D,{value:e,index:2,children:r&&(0,s.jsxs)(i.ZP,{container:!0,spacing:3,children:[(0,s.jsx)(i.ZP,{item:!0,xs:12,md:8,children:(0,s.jsx)(J.d,{serverName:r})}),(0,s.jsx)(i.ZP,{item:!0,xs:12,md:4,children:(0,s.jsxs)(l.Z,{sx:{p:2,bgcolor:"background.paper",borderRadius:1},children:[(0,s.jsx)(t.Z,{variant:"subtitle2",color:"text.secondary",gutterBottom:!0,children:"About Operators"}),(0,s.jsx)(t.Z,{variant:"body2",color:"text.secondary",children:"Operators (OPs) have elevated permissions on the server. They can use commands like /give, /gamemode, /tp, and more. OP levels range from 1-4, with 4 being the highest."}),(0,s.jsxs)(l.Z,{sx:{mt:2},children:[(0,s.jsx)(t.Z,{variant:"caption",color:"text.secondary",component:"div",children:"Level 1: Can bypass spawn protection"}),(0,s.jsx)(t.Z,{variant:"caption",color:"text.secondary",component:"div",children:"Level 2: Can use /clear, /gamemode, etc."}),(0,s.jsx)(t.Z,{variant:"caption",color:"text.secondary",component:"div",children:"Level 3: Can use /ban, /kick, /op, etc."}),(0,s.jsx)(t.Z,{variant:"caption",color:"text.secondary",component:"div",children:"Level 4: Can use /stop, full access"})]})]})})]})}),(0,s.jsx)(D,{value:e,index:3,children:r&&(0,s.jsxs)(i.ZP,{container:!0,spacing:3,children:[(0,s.jsx)(i.ZP,{item:!0,xs:12,md:8,children:(0,s.jsx)(Y.Z,{serverName:r})}),(0,s.jsx)(i.ZP,{item:!0,xs:12,md:4,children:(0,s.jsxs)(l.Z,{sx:{p:2,bgcolor:"background.paper",borderRadius:1},children:[(0,s.jsx)(t.Z,{variant:"subtitle2",color:"text.secondary",gutterBottom:!0,children:"About Bans"}),(0,s.jsx)(t.Z,{variant:"body2",color:"text.secondary",children:"Banned players cannot connect to your server. You can ban players by username and provide an optional reason. Bans can be removed (pardoned) at any time."})]})})]})})]})}}},function(e){e.O(0,[6812,9760,5004,7296,7436,1071,540,4416,2538,
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[781],{31809:function(e,n,r){Promise.resolve().then(r.bind(r,12192))},12192:function(e,n,r){"use strict";r.r(n),r.d(n,{default:function(){return G}});var s=r(94655),a=r(35106),l=r(7281),t=r(31317),i=r(84840),o=r(33402),c=r(60097),d=r(29793),x=r(75726),h=r(62328),p=r(7178),u=r(69899),j=r(76492),y=r(35847),m=r(628),Z=r(41565),b=r(90158),v=r(58347),g=r(73424),f=r(69783),k=r(86702),C=r(79983),P=r(30417),w=r(25333),S=r(99770),O=r(62508),E=r(5682),N=r(65087),B=r(76678),F=r(97436),A=r(93017),R=r(81071),W=r(66561),I=r(12795),L=r(96407),_=r(69366),T=r(11597),K=r(81960),q=r(30114);function z(e){let{onPlayerKicked:n}=e,[r,i]=(0,a.useState)(!0),[o,c]=(0,a.useState)(null),[d,x]=(0,a.useState)([]),[h,p]=(0,a.useState)(!1),[u,j]=(0,a.useState)(null),[y,z]=(0,a.useState)(""),[M,J]=(0,a.useState)(!1),Y=(0,a.useCallback)(async()=>{i(!0),c(null);try{let e=await fetch("/api/players");if(!e.ok)throw Error("Failed to fetch players");let n=await e.json();x(n.servers)}catch(e){c("Failed to load players"),console.error("Error fetching players:",e)}finally{i(!1)}},[]);(0,a.useEffect)(()=>{Y()},[Y]);let $=(e,n)=>{j({player:e,server:n}),z(""),p(!0)},D=async()=>{if(u){J(!0);try{if(!(await fetch("/api/players/kick",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({player:u.player.name,server:u.server,reason:y||"Kicked by administrator"})})).ok)throw Error("Failed to kick player");p(!1),j(null),null==n||n(u.player,u.server),await Y()}catch(e){console.error("Error kicking player:",e)}finally{J(!1)}}},G=d.some(e=>e.players.length>0);return(0,s.jsx)(m.Z,{"data-testid":"player-list",children:(0,s.jsxs)(Z.Z,{children:[(0,s.jsxs)(l.Z,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2},children:[(0,s.jsx)(t.Z,{variant:"h6",children:"Online Players"}),(0,s.jsx)(C.Z,{onClick:Y,disabled:r,"aria-label":"Refresh",children:(0,s.jsx)(_.Z,{})})]}),r&&(0,s.jsx)(l.Z,{sx:{display:"flex",justifyContent:"center",py:4},children:(0,s.jsx)(A.Z,{})}),o&&(0,s.jsx)(R.Z,{severity:"error",sx:{mb:2},children:o}),!r&&!o&&!G&&(0,s.jsx)(t.Z,{color:"text.secondary",sx:{textAlign:"center",py:4},children:"No players online"}),!r&&!o&&G&&(0,s.jsx)(l.Z,{children:d.map(e=>(0,s.jsxs)(W.Z,{defaultExpanded:e.players.length>0,children:[(0,s.jsx)(I.Z,{expandIcon:(0,s.jsx)(K.Z,{}),children:(0,s.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",gap:2,width:"100%"},children:[(0,s.jsx)(t.Z,{variant:"subtitle1",sx:{fontWeight:500},children:e.name}),(0,s.jsx)(w.Z,{label:"".concat(e.players.length," player").concat(1!==e.players.length?"s":""),size:"small",color:e.players.length>0?"success":"default"})]})}),(0,s.jsx)(L.Z,{children:0===e.players.length?(0,s.jsx)(t.Z,{color:"text.secondary",sx:{fontStyle:"italic"},children:"No players online on this server"}):(0,s.jsx)(b.Z,{dense:!0,children:e.players.map(n=>(0,s.jsxs)(v.ZP,{secondaryAction:(0,s.jsx)(C.Z,{edge:"end","aria-label":"Kick player",onClick:()=>$(n,e.name),color:"error",children:(0,s.jsx)(T.Z,{})}),children:[(0,s.jsx)(f.Z,{children:(0,s.jsx)(k.Z,{src:"https://mc-heads.net/avatar/".concat(n.uuid,"/40"),alt:n.name,children:(0,s.jsx)(q.Z,{})})}),(0,s.jsx)(g.Z,{primary:n.name,secondary:n.uuid.substring(0,8)+"..."})]},n.uuid))})})]},e.name))}),(0,s.jsxs)(S.Z,{open:h,onClose:()=>p(!1),children:[(0,s.jsx)(O.Z,{children:"Kick Player"}),(0,s.jsxs)(E.Z,{children:[(0,s.jsxs)(N.Z,{children:["Are you sure you want to kick ",null==u?void 0:u.player.name," from ",null==u?void 0:u.server,"?"]}),(0,s.jsx)(F.Z,{autoFocus:!0,margin:"dense",label:"Reason (optional)",fullWidth:!0,variant:"outlined",value:y,onChange:e=>z(e.target.value),placeholder:"Kicked by administrator"})]}),(0,s.jsxs)(B.Z,{children:[(0,s.jsx)(P.Z,{onClick:()=>p(!1),disabled:M,children:"Cancel"}),(0,s.jsx)(P.Z,{onClick:D,color:"error",variant:"contained",disabled:M,"aria-label":"Confirm kick",children:M?(0,s.jsx)(A.Z,{size:20}):"Confirm"})]})]})]})})}var M=r(61650),J=r(73729),Y=r(41189),$=r(92666);function D(e){let{children:n,value:r,index:a}=e;return(0,s.jsx)("div",{role:"tabpanel",hidden:r!==a,children:r===a&&(0,s.jsx)(l.Z,{sx:{py:3},children:n})})}function G(){let[e,n]=(0,a.useState)(0),[r,m]=(0,a.useState)(""),{data:Z,isLoading:b}=(0,$.x$)(),v=null==Z?void 0:Z.servers;return(0,a.useEffect)(()=>{!r&&v&&v.length>0&&m(v[0].name)},[v,r]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(u.Z,{elevation:0,sx:{mb:4,p:3,background:e=>"linear-gradient(135deg, ".concat((0,j.Fq)(e.palette.info.main,.1)," 0%, ").concat((0,j.Fq)(e.palette.secondary.main,.1)," 100%)"),borderRadius:2,border:e=>"1px solid ".concat((0,j.Fq)(e.palette.info.main,.2))},children:(0,s.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",gap:2},children:[(0,s.jsx)(l.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:56,height:56,borderRadius:2,bgcolor:"info.main",color:"info.contrastText"},children:(0,s.jsx)(y.Z,{sx:{fontSize:32}})}),(0,s.jsxs)(l.Z,{children:[(0,s.jsx)(t.Z,{variant:"h4",component:"h1",fontWeight:"bold",children:"Player Management"}),(0,s.jsx)(t.Z,{variant:"body1",color:"text.secondary",children:"Manage players, whitelist, operators, and bans across your servers"})]})]})}),(0,s.jsx)(l.Z,{sx:{mb:3},children:(0,s.jsxs)(d.Z,{sx:{minWidth:200},children:[(0,s.jsx)(x.Z,{id:"server-select-label",children:"Server"}),(0,s.jsx)(h.Z,{labelId:"server-select-label",value:r,label:"Server",onChange:e=>m(e.target.value),disabled:b,children:null==v?void 0:v.map(e=>(0,s.jsx)(p.Z,{value:e.name,children:e.name},e.name))})]})}),(0,s.jsx)(l.Z,{sx:{borderBottom:1,borderColor:"divider"},children:(0,s.jsxs)(o.Z,{value:e,onChange:(e,r)=>{n(r)},"aria-label":"Player management tabs",children:[(0,s.jsx)(c.Z,{label:"Online Players"}),(0,s.jsx)(c.Z,{label:"Whitelist",disabled:!r}),(0,s.jsx)(c.Z,{label:"Operators",disabled:!r}),(0,s.jsx)(c.Z,{label:"Ban List",disabled:!r})]})}),(0,s.jsx)(D,{value:e,index:0,children:(0,s.jsx)(z,{})}),(0,s.jsx)(D,{value:e,index:1,children:r&&(0,s.jsxs)(i.ZP,{container:!0,spacing:3,children:[(0,s.jsx)(i.ZP,{item:!0,xs:12,md:8,children:(0,s.jsx)(M.Z,{serverName:r})}),(0,s.jsx)(i.ZP,{item:!0,xs:12,md:4,children:(0,s.jsxs)(l.Z,{sx:{p:2,bgcolor:"background.paper",borderRadius:1},children:[(0,s.jsx)(t.Z,{variant:"subtitle2",color:"text.secondary",gutterBottom:!0,children:"About Whitelist"}),(0,s.jsx)(t.Z,{variant:"body2",color:"text.secondary",children:"The whitelist controls which players can join your server. When enabled, only players on the whitelist can connect. Add players by their Minecraft username."})]})})]})}),(0,s.jsx)(D,{value:e,index:2,children:r&&(0,s.jsxs)(i.ZP,{container:!0,spacing:3,children:[(0,s.jsx)(i.ZP,{item:!0,xs:12,md:8,children:(0,s.jsx)(J.d,{serverName:r})}),(0,s.jsx)(i.ZP,{item:!0,xs:12,md:4,children:(0,s.jsxs)(l.Z,{sx:{p:2,bgcolor:"background.paper",borderRadius:1},children:[(0,s.jsx)(t.Z,{variant:"subtitle2",color:"text.secondary",gutterBottom:!0,children:"About Operators"}),(0,s.jsx)(t.Z,{variant:"body2",color:"text.secondary",children:"Operators (OPs) have elevated permissions on the server. They can use commands like /give, /gamemode, /tp, and more. OP levels range from 1-4, with 4 being the highest."}),(0,s.jsxs)(l.Z,{sx:{mt:2},children:[(0,s.jsx)(t.Z,{variant:"caption",color:"text.secondary",component:"div",children:"Level 1: Can bypass spawn protection"}),(0,s.jsx)(t.Z,{variant:"caption",color:"text.secondary",component:"div",children:"Level 2: Can use /clear, /gamemode, etc."}),(0,s.jsx)(t.Z,{variant:"caption",color:"text.secondary",component:"div",children:"Level 3: Can use /ban, /kick, /op, etc."}),(0,s.jsx)(t.Z,{variant:"caption",color:"text.secondary",component:"div",children:"Level 4: Can use /stop, full access"})]})]})})]})}),(0,s.jsx)(D,{value:e,index:3,children:r&&(0,s.jsxs)(i.ZP,{container:!0,spacing:3,children:[(0,s.jsx)(i.ZP,{item:!0,xs:12,md:8,children:(0,s.jsx)(Y.Z,{serverName:r})}),(0,s.jsx)(i.ZP,{item:!0,xs:12,md:4,children:(0,s.jsxs)(l.Z,{sx:{p:2,bgcolor:"background.paper",borderRadius:1},children:[(0,s.jsx)(t.Z,{variant:"subtitle2",color:"text.secondary",gutterBottom:!0,children:"About Bans"}),(0,s.jsx)(t.Z,{variant:"body2",color:"text.secondary",children:"Banned players cannot connect to your server. You can ban players by username and provide an optional reason. Bans can be removed (pardoned) at any time."})]})})]})})]})}}},function(e){e.O(0,[6812,9760,5004,7296,7436,1071,540,4416,2538,3938,4219,8347,4841,1658,4302,6798,2666,5498,3669,2757,1744],function(){return e(e.s=31809)}),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[148],{61943:function(e,t,i){Promise.resolve().then(i.bind(i,34488))},34488:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return p}});var n=i(94655),r=i(7281),s=i(84840),a=i(31317),x=i(10721),l=i(81071),d=i(628),o=i(41565),c=i(69899),h=i(76492),j=i(29983),u=i(92666),Z=i(57965);function g(e){let{rows:t}=e;return(0,n.jsx)(d.Z,{children:(0,n.jsxs)(o.Z,{children:[(0,n.jsxs)(r.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:2},children:[(0,n.jsx)(x.Z,{variant:"circular",width:24,height:24}),(0,n.jsx)(x.Z,{variant:"text",width:"50%",height:32})]}),[...Array(t)].map((e,t)=>(0,n.jsxs)(r.Z,{sx:{display:"flex",justifyContent:"space-between",py:.75},children:[(0,n.jsx)(x.Z,{variant:"text",width:"35%"}),(0,n.jsx)(x.Z,{variant:"text",width:"40%"})]},t))]})})}function m(){return(0,n.jsx)(d.Z,{sx:{height:"100%"},children:(0,n.jsxs)(o.Z,{children:[(0,n.jsxs)(r.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:2},children:[(0,n.jsx)(x.Z,{variant:"circular",width:24,height:24}),(0,n.jsx)(x.Z,{variant:"text",width:"40%",height:32}),(0,n.jsxs)(r.Z,{sx:{ml:"auto",display:"flex",gap:1},children:[(0,n.jsx)(x.Z,{variant:"rounded",width:70,height:24}),(0,n.jsx)(x.Z,{variant:"rounded",width:70,height:24})]})]}),(0,n.jsx)(x.Z,{variant:"text",width:"30%",sx:{mt:3,mb:1}}),[0,1].map(e=>(0,n.jsxs)(r.Z,{sx:{border:1,borderColor:"divider",p:2,"&:not(:last-child)":{borderBottom:0}},children:[(0,n.jsxs)(r.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:1.5},children:[(0,n.jsx)(x.Z,{variant:"circular",width:10,height:10}),(0,n.jsx)(x.Z,{variant:"text",width:"25%"}),(0,n.jsx)(x.Z,{variant:"text",width:"15%"}),(0,n.jsx)(x.Z,{variant:"text",width:"10%",sx:{ml:"auto"}})]}),[0,1,2].map(e=>(0,n.jsx)(x.Z,{variant:"text",width:"70%",sx:{ml:2.5}},e))]},e))]})})}function p(){let{data:e,isLoading:t,error:i}=(0,u.nv)();return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(c.Z,{elevation:0,sx:{mb:4,p:3,background:e=>"linear-gradient(135deg, ".concat((0,h.Fq)(e.palette.warning.main,.1)," 0%, ").concat((0,h.Fq)(e.palette.info.main,.1)," 100%)"),borderRadius:2,border:e=>"1px solid ".concat((0,h.Fq)(e.palette.warning.main,.2))},children:(0,n.jsxs)(r.Z,{sx:{display:"flex",alignItems:"center",gap:2},children:[(0,n.jsx)(r.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:56,height:56,borderRadius:2,bgcolor:"warning.main",color:"warning.contrastText"},children:(0,n.jsx)(j.Z,{sx:{fontSize:32}})}),(0,n.jsxs)(r.Z,{children:[(0,n.jsx)(a.Z,{variant:"h4",component:"h1",fontWeight:"bold",children:"Routing"}),(0,n.jsx)(a.Z,{variant:"body1",color:"text.secondary",children:"Server routing and network configuration"})]})]})}),i&&(0,n.jsxs)(l.Z,{severity:"error",sx:{mb:3},children:["Failed to load router status: ",i.message]}),t?(0,n.jsxs)(s.ZP,{container:!0,spacing:3,children:[(0,n.jsx)(s.ZP,{item:!0,xs:12,md:4,children:(0,n.jsxs)(r.Z,{sx:{display:"flex",flexDirection:"column",gap:3},children:[(0,n.jsx)(g,{rows:4}),(0,n.jsx)(g,{rows:4}),(0,n.jsx)(g,{rows:1})]})}),(0,n.jsx)(s.ZP,{item:!0,xs:12,md:8,children:(0,n.jsx)(m,{})})]}):(null==e?void 0:e.router)?(0,n.jsxs)(s.ZP,{container:!0,spacing:3,children:[(0,n.jsx)(s.ZP,{item:!0,xs:12,md:4,children:(0,n.jsxs)(r.Z,{sx:{display:"flex",flexDirection:"column",gap:3},children:[(0,n.jsx)(Z.hI,{router:e.router}),(0,n.jsx)(Z.SB,{router:e.router}),(0,n.jsx)(Z.E4,{avahi:e.avahi}),(0,n.jsx)(Z.aY,{})]})}),(0,n.jsx)(s.ZP,{item:!0,xs:12,md:8,children:(0,n.jsx)(Z.Ik,{router:e.router})})]}):null]})}}},function(e){e.O(0,[6812,9760,5004,7296,7436,1071,540,4416,2538,2542,
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[148],{61943:function(e,t,i){Promise.resolve().then(i.bind(i,34488))},34488:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return p}});var n=i(94655),r=i(7281),s=i(84840),a=i(31317),x=i(10721),l=i(81071),d=i(628),o=i(41565),c=i(69899),h=i(76492),j=i(29983),u=i(92666),Z=i(57965);function g(e){let{rows:t}=e;return(0,n.jsx)(d.Z,{children:(0,n.jsxs)(o.Z,{children:[(0,n.jsxs)(r.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:2},children:[(0,n.jsx)(x.Z,{variant:"circular",width:24,height:24}),(0,n.jsx)(x.Z,{variant:"text",width:"50%",height:32})]}),[...Array(t)].map((e,t)=>(0,n.jsxs)(r.Z,{sx:{display:"flex",justifyContent:"space-between",py:.75},children:[(0,n.jsx)(x.Z,{variant:"text",width:"35%"}),(0,n.jsx)(x.Z,{variant:"text",width:"40%"})]},t))]})})}function m(){return(0,n.jsx)(d.Z,{sx:{height:"100%"},children:(0,n.jsxs)(o.Z,{children:[(0,n.jsxs)(r.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:2},children:[(0,n.jsx)(x.Z,{variant:"circular",width:24,height:24}),(0,n.jsx)(x.Z,{variant:"text",width:"40%",height:32}),(0,n.jsxs)(r.Z,{sx:{ml:"auto",display:"flex",gap:1},children:[(0,n.jsx)(x.Z,{variant:"rounded",width:70,height:24}),(0,n.jsx)(x.Z,{variant:"rounded",width:70,height:24})]})]}),(0,n.jsx)(x.Z,{variant:"text",width:"30%",sx:{mt:3,mb:1}}),[0,1].map(e=>(0,n.jsxs)(r.Z,{sx:{border:1,borderColor:"divider",p:2,"&:not(:last-child)":{borderBottom:0}},children:[(0,n.jsxs)(r.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:1.5},children:[(0,n.jsx)(x.Z,{variant:"circular",width:10,height:10}),(0,n.jsx)(x.Z,{variant:"text",width:"25%"}),(0,n.jsx)(x.Z,{variant:"text",width:"15%"}),(0,n.jsx)(x.Z,{variant:"text",width:"10%",sx:{ml:"auto"}})]}),[0,1,2].map(e=>(0,n.jsx)(x.Z,{variant:"text",width:"70%",sx:{ml:2.5}},e))]},e))]})})}function p(){let{data:e,isLoading:t,error:i}=(0,u.nv)();return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(c.Z,{elevation:0,sx:{mb:4,p:3,background:e=>"linear-gradient(135deg, ".concat((0,h.Fq)(e.palette.warning.main,.1)," 0%, ").concat((0,h.Fq)(e.palette.info.main,.1)," 100%)"),borderRadius:2,border:e=>"1px solid ".concat((0,h.Fq)(e.palette.warning.main,.2))},children:(0,n.jsxs)(r.Z,{sx:{display:"flex",alignItems:"center",gap:2},children:[(0,n.jsx)(r.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:56,height:56,borderRadius:2,bgcolor:"warning.main",color:"warning.contrastText"},children:(0,n.jsx)(j.Z,{sx:{fontSize:32}})}),(0,n.jsxs)(r.Z,{children:[(0,n.jsx)(a.Z,{variant:"h4",component:"h1",fontWeight:"bold",children:"Routing"}),(0,n.jsx)(a.Z,{variant:"body1",color:"text.secondary",children:"Server routing and network configuration"})]})]})}),i&&(0,n.jsxs)(l.Z,{severity:"error",sx:{mb:3},children:["Failed to load router status: ",i.message]}),t?(0,n.jsxs)(s.ZP,{container:!0,spacing:3,children:[(0,n.jsx)(s.ZP,{item:!0,xs:12,md:4,children:(0,n.jsxs)(r.Z,{sx:{display:"flex",flexDirection:"column",gap:3},children:[(0,n.jsx)(g,{rows:4}),(0,n.jsx)(g,{rows:4}),(0,n.jsx)(g,{rows:1})]})}),(0,n.jsx)(s.ZP,{item:!0,xs:12,md:8,children:(0,n.jsx)(m,{})})]}):(null==e?void 0:e.router)?(0,n.jsxs)(s.ZP,{container:!0,spacing:3,children:[(0,n.jsx)(s.ZP,{item:!0,xs:12,md:4,children:(0,n.jsxs)(r.Z,{sx:{display:"flex",flexDirection:"column",gap:3},children:[(0,n.jsx)(Z.hI,{router:e.router}),(0,n.jsx)(Z.SB,{router:e.router}),(0,n.jsx)(Z.E4,{avahi:e.avahi}),(0,n.jsx)(Z.aY,{})]})}),(0,n.jsx)(s.ZP,{item:!0,xs:12,md:8,children:(0,n.jsx)(Z.Ik,{router:e.router})})]}):null]})}}},function(e){e.O(0,[6812,9760,5004,7296,7436,1071,540,4416,2538,5511,2542,2844,4841,4898,2666,7965,3669,2757,1744],function(){return e(e.s=61943)}),_N_E=e.O()}]);
|