@minecraft-docker/mcctl-console 2.12.1 → 2.13.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.
Files changed (104) hide show
  1. package/.next/standalone/platform/services/mcctl-console/.next/BUILD_ID +1 -1
  2. package/.next/standalone/platform/services/mcctl-console/.next/app-build-manifest.json +37 -37
  3. package/.next/standalone/platform/services/mcctl-console/.next/app-path-routes-manifest.json +1 -1
  4. package/.next/standalone/platform/services/mcctl-console/.next/build-manifest.json +2 -2
  5. package/.next/standalone/platform/services/mcctl-console/.next/prerender-manifest.json +1 -1
  6. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/admin/users/page_client-reference-manifest.js +1 -1
  7. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/audit-logs/page.js +5 -5
  8. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/audit-logs/page.js.nft.json +1 -1
  9. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/audit-logs/page_client-reference-manifest.js +1 -1
  10. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/backups/page_client-reference-manifest.js +1 -1
  11. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/dashboard/page.js +1 -1
  12. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/dashboard/page_client-reference-manifest.js +1 -1
  13. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/players/page_client-reference-manifest.js +1 -1
  14. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/routing/page_client-reference-manifest.js +1 -1
  15. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/[name]/console/page_client-reference-manifest.js +1 -1
  16. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/[name]/page.js +1 -1
  17. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/[name]/page.js.nft.json +1 -1
  18. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/[name]/page_client-reference-manifest.js +1 -1
  19. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/page.js +1 -1
  20. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/page.js.nft.json +1 -1
  21. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/page_client-reference-manifest.js +1 -1
  22. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/settings/page_client-reference-manifest.js +1 -1
  23. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/worlds/page_client-reference-manifest.js +1 -1
  24. package/.next/standalone/platform/services/mcctl-console/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  25. package/.next/standalone/platform/services/mcctl-console/.next/server/app/_not-found.html +1 -1
  26. package/.next/standalone/platform/services/mcctl-console/.next/server/app/_not-found.rsc +1 -1
  27. package/.next/standalone/platform/services/mcctl-console/.next/server/app/audit-logs.html +1 -1
  28. package/.next/standalone/platform/services/mcctl-console/.next/server/app/audit-logs.rsc +3 -3
  29. package/.next/standalone/platform/services/mcctl-console/.next/server/app/backups.html +1 -1
  30. package/.next/standalone/platform/services/mcctl-console/.next/server/app/backups.rsc +2 -2
  31. package/.next/standalone/platform/services/mcctl-console/.next/server/app/dashboard.html +1 -1
  32. package/.next/standalone/platform/services/mcctl-console/.next/server/app/dashboard.rsc +3 -3
  33. package/.next/standalone/platform/services/mcctl-console/.next/server/app/index.html +1 -1
  34. package/.next/standalone/platform/services/mcctl-console/.next/server/app/index.rsc +1 -1
  35. package/.next/standalone/platform/services/mcctl-console/.next/server/app/login/page_client-reference-manifest.js +1 -1
  36. package/.next/standalone/platform/services/mcctl-console/.next/server/app/login.html +1 -1
  37. package/.next/standalone/platform/services/mcctl-console/.next/server/app/login.rsc +1 -1
  38. package/.next/standalone/platform/services/mcctl-console/.next/server/app/page_client-reference-manifest.js +1 -1
  39. package/.next/standalone/platform/services/mcctl-console/.next/server/app/players.html +1 -1
  40. package/.next/standalone/platform/services/mcctl-console/.next/server/app/players.rsc +3 -3
  41. package/.next/standalone/platform/services/mcctl-console/.next/server/app/routing.html +1 -1
  42. package/.next/standalone/platform/services/mcctl-console/.next/server/app/routing.rsc +2 -2
  43. package/.next/standalone/platform/services/mcctl-console/.next/server/app/servers.html +1 -1
  44. package/.next/standalone/platform/services/mcctl-console/.next/server/app/servers.rsc +2 -2
  45. package/.next/standalone/platform/services/mcctl-console/.next/server/app/settings.html +1 -1
  46. package/.next/standalone/platform/services/mcctl-console/.next/server/app/settings.rsc +2 -2
  47. package/.next/standalone/platform/services/mcctl-console/.next/server/app/signup/page_client-reference-manifest.js +1 -1
  48. package/.next/standalone/platform/services/mcctl-console/.next/server/app/signup.html +1 -1
  49. package/.next/standalone/platform/services/mcctl-console/.next/server/app/signup.rsc +1 -1
  50. package/.next/standalone/platform/services/mcctl-console/.next/server/app/worlds.html +1 -1
  51. package/.next/standalone/platform/services/mcctl-console/.next/server/app/worlds.rsc +2 -2
  52. package/.next/standalone/platform/services/mcctl-console/.next/server/app-paths-manifest.json +14 -14
  53. package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/1302.js +1 -0
  54. package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/{7049.js → 2359.js} +6 -6
  55. package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/2650.js +1 -0
  56. package/.next/standalone/platform/services/mcctl-console/.next/server/middleware-manifest.json +5 -5
  57. package/.next/standalone/platform/services/mcctl-console/.next/server/pages/404.html +1 -1
  58. package/.next/standalone/platform/services/mcctl-console/.next/server/pages/500.html +1 -1
  59. package/.next/standalone/platform/services/mcctl-console/.next/server/server-reference-manifest.json +1 -1
  60. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/1002-a00b243cef6b3efd.js +1 -0
  61. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/4302-487e76466a64d13a.js +1 -0
  62. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/6798-eb703f1c1303853c.js +1 -0
  63. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/6918-a51d55370b6c7caa.js +1 -0
  64. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/7648-2f814761281d3467.js +1 -0
  65. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/9022-598befdec2960f02.js +1 -0
  66. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/audit-logs/page-ed76baece1cfa0be.js +1 -0
  67. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/dashboard/{page-3cf14179dcdd7ac6.js → page-378e9c3500c85120.js} +1 -1
  68. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/{layout-49deaa08620bff5b.js → layout-46198c04ba71ec0e.js} +1 -1
  69. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/players/page-17fac813cd35d4ca.js +1 -0
  70. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/servers/[name]/page-647b5155bd114dd7.js +1 -0
  71. package/.next/static/chunks/1002-a00b243cef6b3efd.js +1 -0
  72. package/.next/static/chunks/4302-487e76466a64d13a.js +1 -0
  73. package/.next/static/chunks/6798-eb703f1c1303853c.js +1 -0
  74. package/.next/static/chunks/6918-a51d55370b6c7caa.js +1 -0
  75. package/.next/static/chunks/7648-2f814761281d3467.js +1 -0
  76. package/.next/static/chunks/9022-598befdec2960f02.js +1 -0
  77. package/.next/static/chunks/app/(main)/audit-logs/page-ed76baece1cfa0be.js +1 -0
  78. package/.next/static/chunks/app/(main)/dashboard/{page-3cf14179dcdd7ac6.js → page-378e9c3500c85120.js} +1 -1
  79. package/.next/static/chunks/app/(main)/{layout-49deaa08620bff5b.js → layout-46198c04ba71ec0e.js} +1 -1
  80. package/.next/static/chunks/app/(main)/players/page-17fac813cd35d4ca.js +1 -0
  81. package/.next/static/chunks/app/(main)/servers/[name]/page-647b5155bd114dd7.js +1 -0
  82. package/package.json +2 -2
  83. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/2698-b163080d7b32e5e3.js +0 -1
  84. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/4036-c4d6006e9e913068.js +0 -1
  85. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/4240-16f6e4c7e86ef2ce.js +0 -1
  86. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/4474-b7d88543d50f7f58.js +0 -1
  87. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/6895-948ae5bf5302e12e.js +0 -1
  88. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/9788-03286ddd24a074b7.js +0 -1
  89. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/audit-logs/page-d65c062a803fc4b2.js +0 -1
  90. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/players/page-430dd294c3b34903.js +0 -1
  91. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/servers/[name]/page-16a7918b3d3736ed.js +0 -1
  92. package/.next/static/chunks/2698-b163080d7b32e5e3.js +0 -1
  93. package/.next/static/chunks/4036-c4d6006e9e913068.js +0 -1
  94. package/.next/static/chunks/4240-16f6e4c7e86ef2ce.js +0 -1
  95. package/.next/static/chunks/4474-b7d88543d50f7f58.js +0 -1
  96. package/.next/static/chunks/6895-948ae5bf5302e12e.js +0 -1
  97. package/.next/static/chunks/9788-03286ddd24a074b7.js +0 -1
  98. package/.next/static/chunks/app/(main)/audit-logs/page-d65c062a803fc4b2.js +0 -1
  99. package/.next/static/chunks/app/(main)/players/page-430dd294c3b34903.js +0 -1
  100. package/.next/static/chunks/app/(main)/servers/[name]/page-16a7918b3d3736ed.js +0 -1
  101. /package/.next/standalone/platform/services/mcctl-console/.next/static/{7sS9MOwdyyBZ3UoHGY6I6 → dfElxaC4ZAYixopXbzElA}/_buildManifest.js +0 -0
  102. /package/.next/standalone/platform/services/mcctl-console/.next/static/{7sS9MOwdyyBZ3UoHGY6I6 → dfElxaC4ZAYixopXbzElA}/_ssgManifest.js +0 -0
  103. /package/.next/static/{7sS9MOwdyyBZ3UoHGY6I6 → dfElxaC4ZAYixopXbzElA}/_buildManifest.js +0 -0
  104. /package/.next/static/{7sS9MOwdyyBZ3UoHGY6I6 → dfElxaC4ZAYixopXbzElA}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[278,2666],{59616:function(e,t,n){Promise.resolve().then(n.bind(n,57028))},57028:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return nb}});var r=n(94655),s=n(35106),a=n(74228),l=n(31358),i=n(7281),o=n(30417),c=n(79983),d=n(81071),u=n(93017),x=n(10721),h=n(628),p=n(41565),m=n(31317),y=n(88812),f=n(7178),v=n(17820),g=n(73424),j=n(99770),b=n(62508),Z=n(5682),C=n(76678),w=n(97436),k=n(84840),S=n(76492),R=n(10117),P=n(5501),T=n(37809),I=n(21111),F=n(17978),z=n(89573),W=n(96292),O=n(33104),D=n(25333),N=n(52082),A=n(69123),M=n(83855),E=n(44059),L=n(71185),q=n(30165),U=n(97293),B=n(11259),K=n(66615),V=n(89161),H=n(34071),Q=n(4405);function G(e){let{value:t,unit:n,label:s,icon:a,progress:l,progressMax:o,color:c="#1bd96a"}=e;return(0,r.jsxs)(h.Z,{"data-testid":"resource-stat-card",sx:{p:2.5,bgcolor:"background.paper",border:"1px solid",borderColor:"divider",borderRadius:3},children:[(0,r.jsxs)(i.Z,{sx:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",gap:2},children:[(0,r.jsxs)(i.Z,{sx:{display:"flex",alignItems:"baseline",gap:.75,flexWrap:"wrap",minWidth:0},children:[(0,r.jsx)(m.Z,{variant:"h4",component:"span",sx:{fontWeight:700,color:"text.primary",letterSpacing:"-0.5px"},children:t}),(0,r.jsx)(m.Z,{variant:"body2",component:"span",sx:{color:"text.secondary",fontWeight:500},children:n})]}),(0,r.jsx)(i.Z,{sx:{color:"text.secondary",flexShrink:0},children:a})]}),(0,r.jsx)(m.Z,{variant:"body2",sx:{color:"text.secondary",fontWeight:500,mt:.5},children:s}),(0,r.jsx)(Q.Z,{variant:"determinate",value:Math.min(l/o*100,100),sx:{mt:1,height:6,borderRadius:1.5,bgcolor:"#2a2d3a","& .MuiLinearProgress-bar":{borderRadius:1.5,background:"linear-gradient(90deg, ".concat(c," 0%, ").concat(c,"cc 100%)")}}})]})}var J=n(163),_=n(73660),$=n(29793),X=n(75726),Y=n(62328),ee=n(89923),et=n(10297),en=n(46725),er=n(26577),es=n(83765),ea=n(84509),el=n(82925);function ei(e){var t,n;let{serverName:a}=e,[l,c]=(0,s.useState)({limit:25,offset:0}),{data:d,isLoading:u,error:x,refetch:h}=(0,ea.HZ)(a,{limit:l.limit,extraParams:{offset:l.offset,action:l.action,status:l.status}}),p=e=>{c(t=>({...t,action:e||void 0,offset:0}))},m="/audit-logs?targetType=server&targetName=".concat(encodeURIComponent(a));return(0,r.jsxs)(i.Z,{children:[(0,r.jsxs)(i.Z,{sx:{display:"flex",flexDirection:{xs:"column",sm:"row"},gap:2,mb:2,alignItems:{sm:"center"}},children:[(0,r.jsxs)($.Z,{size:"small",sx:{minWidth:140},children:[(0,r.jsx)(X.Z,{children:"Action"}),(0,r.jsxs)(Y.Z,{value:l.action||"",label:"Action",onChange:e=>p(e.target.value||void 0),children:[(0,r.jsx)(f.Z,{value:"",children:"All Actions"}),el.Xn.map(e=>(0,r.jsx)(f.Z,{value:e,children:el.n3[e]||e},e))]})]}),(0,r.jsxs)(et.Z,{value:l.status||"",exclusive:!0,onChange:(e,t)=>{c(e=>({...e,status:t||void 0,offset:0}))},size:"small",children:[(0,r.jsx)(ee.Z,{value:"","aria-label":"All statuses",children:"All"}),(0,r.jsx)(ee.Z,{value:"success","aria-label":"Success only",children:"Success"}),(0,r.jsx)(ee.Z,{value:"failure","aria-label":"Failure only",children:"Failure"})]})]}),(0,r.jsx)(es.x,{logs:null!==(t=null==d?void 0:d.logs)&&void 0!==t?t:[],total:null!==(n=null==d?void 0:d.total)&&void 0!==n?n:0,isLoading:u,error:x,filters:l,onFiltersChange:e=>{c(e)},onRetry:()=>h(),hideTargetColumn:!0,rowsPerPageOptions:[25,50]}),(0,r.jsx)(i.Z,{sx:{mt:2,textAlign:"center"},children:(0,r.jsx)(o.Z,{component:en.default,href:m,size:"small",endIcon:(0,r.jsx)(er.Z,{}),sx:{textTransform:"none"},children:"View Full History"})})]})}var eo=n(37530),ec=n(84420),ed=n(46121),eu=n(84775),ex=n(92666),eh=n(70115),ep=n(70603),em=n(32366),ey=n(5942),ef=n(25523);function ev(e){let{serverName:t}=e,{data:n,isLoading:a}=(0,ex.Js)(t),l=(0,ex.Bx)(),[x,y]=(0,s.useState)([]),[f,v]=(0,s.useState)(!1),[g,j]=(0,s.useState)(!1),[b,Z]=(0,s.useState)(""),[C,k]=(0,s.useState)(""),[S,R]=(0,s.useState)(!1),[P,T]=(0,s.useState)({open:!1,message:"",severity:"success"});(0,s.useEffect)(()=>{(null==n?void 0:n.customHostnames)&&(y(n.customHostnames),v(!1),R(!1))},[n]);let F=e=>{let t=e.trim().toLowerCase();return t?t.length>253?"Domain exceeds 253 characters":/^[a-z0-9]([a-z0-9\-.]*[a-z0-9])?$/.test(t)?t.endsWith(".local")?"Cannot use .local system domain":t.endsWith(".nip.io")?"Cannot use .nip.io system domain":x.includes(t)?"Domain already exists":"":"Invalid domain format":"Domain cannot be empty"},z=()=>{let e=b.trim().toLowerCase(),t=F(e);if(t){k(t);return}y(t=>[...t,e]),Z(""),k(""),j(!1),v(!0)},W=e=>{y(t=>t.filter(t=>t!==e)),v(!0)},O=async()=>{try{await l.mutateAsync({serverName:t,customHostnames:x}),v(!1),R(!0),T({open:!0,message:"Hostnames saved. Container recreation required to apply changes.",severity:"warning"})}catch(e){T({open:!0,message:e instanceof Error?e.message:"Failed to save hostnames",severity:"error"})}},N=()=>{j(!1),Z(""),k("")};return a?(0,r.jsx)(h.Z,{sx:{mb:3,borderRadius:3},children:(0,r.jsx)(p.Z,{children:(0,r.jsx)(i.Z,{sx:{display:"flex",justifyContent:"center",py:4},children:(0,r.jsx)(u.Z,{size:24})})})}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(h.Z,{sx:{mb:3,borderRadius:3},children:(0,r.jsxs)(p.Z,{children:[(0,r.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:1},children:[(0,r.jsx)(ef.Z,{color:"primary"}),(0,r.jsx)(m.Z,{variant:"h6",fontWeight:600,children:"Hostnames / Domains"})]}),(0,r.jsx)(m.Z,{variant:"body2",color:"text.secondary",sx:{mb:2},children:"Manage hostnames used by mc-router to route connections to this server."}),(0,r.jsx)(A.Z,{sx:{mb:3}}),(null==n?void 0:n.systemHostnames)&&n.systemHostnames.length>0&&(0,r.jsxs)(i.Z,{sx:{mb:3},children:[(0,r.jsx)(m.Z,{variant:"subtitle2",color:"text.secondary",sx:{mb:1},children:"System Hostnames (read-only)"}),(0,r.jsx)(eh.Z,{direction:"row",flexWrap:"wrap",gap:1,children:n.systemHostnames.map(e=>(0,r.jsx)(D.Z,{icon:(0,r.jsx)(ep.Z,{sx:{fontSize:16}}),label:e.hostname,title:e.description,variant:"outlined",color:"default",size:"small"},e.hostname))})]}),(0,r.jsxs)(i.Z,{sx:{mb:2},children:[(0,r.jsx)(m.Z,{variant:"subtitle2",color:"text.secondary",sx:{mb:1},children:"Custom Domains"}),0===x.length&&!g&&(0,r.jsx)(m.Z,{variant:"body2",color:"text.disabled",sx:{mb:1},children:"No custom domains configured."}),(0,r.jsx)(eh.Z,{spacing:1,children:x.map(e=>(0,r.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",py:.5,px:1.5,borderRadius:1,bgcolor:"action.hover"},children:[(0,r.jsx)(m.Z,{variant:"body2",children:e}),(0,r.jsx)(c.Z,{size:"small",color:"error",onClick:()=>W(e),title:"Remove domain",children:(0,r.jsx)(I.Z,{fontSize:"small"})})]},e))}),g?(0,r.jsxs)(i.Z,{sx:{display:"flex",alignItems:"flex-start",gap:1,mt:1},children:[(0,r.jsx)(w.Z,{size:"small",placeholder:"e.g. play.example.com",value:b,onChange:e=>{Z(e.target.value),k("")},onKeyDown:e=>{"Enter"===e.key&&z(),"Escape"===e.key&&N()},error:!!C,helperText:C,autoFocus:!0,sx:{flex:1}}),(0,r.jsx)(o.Z,{size:"small",variant:"contained",onClick:z,children:"Add"}),(0,r.jsx)(c.Z,{size:"small",onClick:N,children:(0,r.jsx)(L.Z,{fontSize:"small"})})]}):(0,r.jsx)(o.Z,{size:"small",startIcon:(0,r.jsx)(em.Z,{}),onClick:()=>j(!0),sx:{mt:1},children:"Add Domain"})]}),S&&(0,r.jsxs)(d.Z,{severity:"warning",sx:{mb:2},children:["Container recreation is required for hostname changes to take effect. Run ",(0,r.jsx)("code",{children:"docker compose up -d"})," or restart the server from the dashboard."]}),(0,r.jsx)(i.Z,{sx:{display:"flex",justifyContent:"flex-end"},children:(0,r.jsx)(o.Z,{variant:"contained",size:"small",startIcon:(0,r.jsx)(ey.Z,{}),onClick:O,disabled:!f||l.isPending,children:l.isPending?"Saving...":"Save Hostnames"})})]})}),(0,r.jsx)(eo.Z,{open:P.open,autoHideDuration:6e3,onClose:()=>T({...P,open:!1}),anchorOrigin:{vertical:"bottom",horizontal:"right"},children:(0,r.jsx)(d.Z,{onClose:()=>T({...P,open:!1}),severity:P.severity,sx:{width:"100%"},children:P.message})})]})}var eg=n(87716),ej=n(81960),eb=n(40064),eZ=n(38393),eC=n(28058),ew=n(42730);function ek(e){var t;let{field:n,value:a,onChange:l}=e,[o,d]=(0,s.useState)(!1),u=null!==(t=n.columns)&&void 0!==t?t:6;return(0,r.jsx)(k.ZP,{item:!0,xs:12,sm:u,children:(()=>{var e,t,s,u,x,h;switch(n.type){case"boolean":return(0,r.jsxs)(i.Z,{children:[(0,r.jsx)(eb.Z,{control:(0,r.jsx)(eZ.Z,{checked:null!=a&&a,onChange:e=>l(n.key,e.target.checked)}),label:n.label}),n.helperText&&(0,r.jsx)(m.Z,{variant:"caption",color:"text.secondary",sx:{ml:4,display:"block"},children:n.helperText})]});case"select":return(0,r.jsxs)($.Z,{fullWidth:!0,size:"small",children:[(0,r.jsx)(X.Z,{children:n.label}),(0,r.jsx)(Y.Z,{value:null!==(u=null!=a?a:null===(t=n.options)||void 0===t?void 0:null===(e=t[0])||void 0===e?void 0:e.value)&&void 0!==u?u:"",label:n.label,onChange:e=>l(n.key,e.target.value),children:null===(s=n.options)||void 0===s?void 0:s.map(e=>(0,r.jsx)(f.Z,{value:e.value,children:e.label},e.value))})]});case"number":return(0,r.jsx)(w.Z,{fullWidth:!0,size:"small",type:"number",label:n.label,value:null!=a?a:"",onChange:e=>{let t=e.target.value;l(n.key,""===t?void 0:parseInt(t,10))},inputProps:{min:null===(x=n.validation)||void 0===x?void 0:x.min,max:null===(h=n.validation)||void 0===h?void 0:h.max},helperText:n.helperText,InputProps:n.unit?{endAdornment:(0,r.jsx)(N.Z,{position:"end",children:(0,r.jsx)(m.Z,{variant:"caption",color:"text.secondary",children:n.unit})})}:void 0});case"password":return(0,r.jsx)(w.Z,{fullWidth:!0,size:"small",type:o?"text":"password",label:n.label,value:null!=a?a:"",onChange:e=>l(n.key,e.target.value),helperText:n.helperText,InputProps:{endAdornment:(0,r.jsx)(N.Z,{position:"end",children:(0,r.jsx)(c.Z,{size:"small",onClick:()=>d(!o),edge:"end",children:o?(0,r.jsx)(ew.Z,{fontSize:"small"}):(0,r.jsx)(eC.Z,{fontSize:"small"})})})}});default:return(0,r.jsx)(w.Z,{fullWidth:!0,size:"small",label:n.label,value:null!=a?a:"",onChange:e=>l(n.key,e.target.value),helperText:n.helperText})}})()})}function eS(e){let{section:t,values:n,onChange:a}=e,[l,c]=(0,s.useState)(!1),d=t.icon,u=t.advancedFields.length;return(0,r.jsx)(h.Z,{sx:{mb:3,borderRadius:3},children:(0,r.jsxs)(p.Z,{sx:{p:3},children:[(0,r.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:1.5,mb:1},children:[(0,r.jsx)(d,{sx:{fontSize:22,color:"primary.main"}}),(0,r.jsx)(m.Z,{variant:"h6",fontWeight:600,children:t.title})]}),(0,r.jsx)(m.Z,{variant:"body2",color:"text.secondary",sx:{mb:2},children:t.description}),(0,r.jsx)(A.Z,{sx:{mb:3}}),(0,r.jsx)(k.ZP,{container:!0,spacing:2.5,children:t.essentialFields.map(e=>(0,r.jsx)(ek,{field:e,value:n[e.key],onChange:a},e.key))}),u>0&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(o.Z,{fullWidth:!0,variant:"text",onClick:()=>c(!l),endIcon:(0,r.jsx)(ej.Z,{sx:{transform:l?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.3s"}}),sx:{mt:2.5,justifyContent:"flex-start",color:"text.secondary",textTransform:"none",py:1,"&:hover":{bgcolor:"action.hover"}},children:[l?"Hide":"Show"," Advanced Settings (",u,")"]}),(0,r.jsx)(eg.Z,{in:l,timeout:300,children:(0,r.jsx)(i.Z,{sx:{pt:2,borderTop:"1px dashed",borderColor:"divider"},children:(0,r.jsx)(k.ZP,{container:!0,spacing:2.5,children:t.advancedFields.map(e=>(0,r.jsx)(ek,{field:e,value:n[e.key],onChange:a},e.key))})})})]})]})})}var eR=n(12550);function eP(e){let{hasChanges:t,changedCount:n,hasRestartChanges:s,restartFields:a=[],isSaving:l,onSave:c,onDiscard:d}=e;return(0,r.jsx)(eR.Z,{direction:"up",in:t,mountOnEnter:!0,unmountOnExit:!0,children:(0,r.jsxs)(i.Z,{sx:{position:"sticky",bottom:0,zIndex:1100,bgcolor:"background.paper",borderTop:2,borderColor:"primary.main",px:{xs:2,sm:3},py:2,mx:{xs:-2,sm:-3},mb:{xs:-2,sm:-3},boxShadow:"0 -4px 20px rgba(0,0,0,0.4)",display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",gap:1},children:[(0,r.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[s&&(0,r.jsx)(eu.Z,{sx:{color:"warning.main",fontSize:20}}),(0,r.jsxs)(m.Z,{variant:"body2",fontWeight:600,children:[n," unsaved change",1!==n?"s":""]}),s&&(0,r.jsxs)(m.Z,{variant:"caption",color:"warning.main",children:["(",a.length>0?a.join(", "):"some fields"," require restart)"]})]}),(0,r.jsxs)(i.Z,{sx:{display:"flex",gap:1},children:[(0,r.jsx)(o.Z,{variant:"text",color:"inherit",onClick:d,disabled:l,children:"Discard"}),(0,r.jsx)(o.Z,{variant:"contained",startIcon:l?(0,r.jsx)(u.Z,{size:16,color:"inherit"}):(0,r.jsx)(ey.Z,{}),onClick:c,disabled:l,children:l?"Saving...":"Save Changes (".concat(n,")")})]})]})})}var eT=n(90158),eI=n(58347);function eF(e){let{open:t,changedFields:n,onSaveOnly:s,onSaveAndRestart:a,onCancel:l}=e;return(0,r.jsxs)(j.Z,{open:t,onClose:l,maxWidth:"sm",fullWidth:!0,children:[(0,r.jsx)(b.Z,{children:(0,r.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,r.jsx)(eu.Z,{color:"warning"}),(0,r.jsx)(m.Z,{variant:"h6",fontWeight:600,children:"Restart Required"})]})}),(0,r.jsxs)(Z.Z,{children:[(0,r.jsx)(m.Z,{variant:"body1",gutterBottom:!0,children:"The following changes require a server restart to take effect:"}),(0,r.jsx)(eT.Z,{dense:!0,children:n.map(e=>(0,r.jsx)(eI.ZP,{sx:{py:0},children:(0,r.jsx)(g.Z,{primary:e,primaryTypographyProps:{variant:"body2"}})},e))})]}),(0,r.jsxs)(C.Z,{children:[(0,r.jsx)(o.Z,{onClick:l,color:"inherit",children:"Cancel"}),(0,r.jsx)(o.Z,{onClick:s,variant:"outlined",children:"Save Only"}),(0,r.jsx)(o.Z,{onClick:a,variant:"contained",color:"warning",children:"Save & Restart"})]})]})}var ez=n(1217),eW=n(84974),eO=n(23482),eD=n(61244),eN=n(87739);let eA=[{id:"gameplay",icon:ez.Z,title:"Gameplay",description:"Core game rules and player experience settings.",essentialFields:[{key:"difficulty",label:"Difficulty",type:"select",options:[{value:"peaceful",label:"Peaceful"},{value:"easy",label:"Easy"},{value:"normal",label:"Normal"},{value:"hard",label:"Hard"}]},{key:"gameMode",label:"Game Mode",type:"select",options:[{value:"survival",label:"Survival"},{value:"creative",label:"Creative"},{value:"adventure",label:"Adventure"},{value:"spectator",label:"Spectator"}]},{key:"maxPlayers",label:"Max Players",type:"number",validation:{min:1,max:1e3}},{key:"pvp",label:"Enable PvP",type:"boolean",helperText:"Allow players to damage each other"}],advancedFields:[{key:"forceGamemode",label:"Force Game Mode",type:"boolean",helperText:"Force game mode when players join"},{key:"hardcore",label:"Hardcore",type:"boolean",helperText:"One life only - world deleted on death"},{key:"allowFlight",label:"Allow Flight",type:"boolean",helperText:"Allow flight in survival mode"},{key:"allowNether",label:"Allow Nether",type:"boolean",helperText:"Enable Nether portal access"},{key:"enableCommandBlock",label:"Command Blocks",type:"boolean",helperText:"Enable command block functionality"},{key:"spawnProtection",label:"Spawn Protection",type:"number",helperText:"Radius around spawn (0 = disabled)",unit:"blocks",validation:{min:0,max:256}},{key:"spawnAnimals",label:"Spawn Animals",type:"boolean",helperText:"Spawn passive mobs (cows, pigs, etc.)"},{key:"spawnMonsters",label:"Spawn Monsters",type:"boolean",helperText:"Spawn hostile mobs (zombies, creepers, etc.)"},{key:"spawnNpcs",label:"Spawn NPCs",type:"boolean",helperText:"Spawn villagers and wandering traders"}]},{id:"world",icon:eW.Z,title:"World",description:"World generation and server identity settings.",essentialFields:[{key:"motd",label:"MOTD (Message of the Day)",type:"string",helperText:"Displayed in the server list",columns:12},{key:"level",label:"World Name",type:"string",helperText:"Save folder name",restartRequired:!0},{key:"levelType",label:"Level Type",type:"select",restartRequired:!0,options:[{value:"default",label:"Default"},{value:"flat",label:"Flat"},{value:"largeBiomes",label:"Large Biomes"},{value:"amplified",label:"Amplified"},{value:"buffet",label:"Buffet"}]},{key:"seed",label:"World Seed",type:"string",helperText:"Only affects new world generation",restartRequired:!0}],advancedFields:[{key:"generateStructures",label:"Generate Structures",type:"boolean",helperText:"Generate villages, temples, etc."},{key:"maxWorldSize",label:"Max World Size",type:"number",unit:"blocks",helperText:"Maximum world radius",validation:{min:1,max:29999984}},{key:"icon",label:"Server Icon URL",type:"string",helperText:"64x64 PNG image URL",columns:12}]},{id:"security",icon:eO.Z,title:"Security",description:"Authentication and access control settings.",essentialFields:[{key:"onlineMode",label:"Online Mode (Mojang Auth)",type:"boolean",helperText:"Disable to allow cracked clients (not recommended)",restartRequired:!0},{key:"enableWhitelist",label:"Enable Whitelist",type:"boolean",helperText:"Only whitelisted players can join",restartRequired:!0}],advancedFields:[{key:"enforceWhitelist",label:"Enforce Whitelist",type:"boolean",helperText:"Kick non-whitelisted players already online",restartRequired:!0},{key:"enforceSecureProfile",label:"Enforce Secure Profile",type:"boolean",helperText:"Require signed chat messages from players",restartRequired:!0}]},{id:"performance",icon:q.Z,title:"Performance & JVM",description:"Memory, view distance, and JVM optimization settings.",essentialFields:[{key:"memory",label:"Memory",type:"string",helperText:"e.g., 2G, 4G, 8G",restartRequired:!0},{key:"useAikarFlags",label:"Aikar's Flags",type:"boolean",helperText:"Optimized GC flags for Paper/Spigot",restartRequired:!0},{key:"viewDistance",label:"View Distance",type:"number",unit:"chunks",validation:{min:2,max:32}}],advancedFields:[{key:"simulationDistance",label:"Simulation Distance",type:"number",unit:"chunks",validation:{min:3,max:32}},{key:"maxTickTime",label:"Max Tick Time",type:"number",unit:"ms",helperText:"-1 to disable watchdog",validation:{min:-1}},{key:"initMemory",label:"Initial Heap",type:"string",helperText:"e.g., 1G (overrides Memory)",restartRequired:!0},{key:"maxMemory",label:"Max Heap",type:"string",helperText:"e.g., 8G (overrides Memory)",restartRequired:!0},{key:"jvmXxOpts",label:"JVM -XX Options",type:"string",helperText:"Additional -XX JVM flags",restartRequired:!0,columns:12}]},{id:"autopause",icon:eD.Z,title:"Auto-pause / Auto-stop",description:"Automatically pause or stop when no players are connected.",essentialFields:[{key:"enableAutopause",label:"Enable Auto-pause",type:"boolean",helperText:"Pause process when no players connected",restartRequired:!0},{key:"autopauseTimeoutEst",label:"Pause Timeout",type:"number",unit:"seconds",helperText:"Wait time after last player leaves",validation:{min:0}}],advancedFields:[{key:"autopauseTimeoutInit",label:"Init Timeout",type:"number",unit:"seconds",helperText:"Timeout after start without connections",validation:{min:0}},{key:"autopausePeriod",label:"Check Period",type:"number",unit:"seconds",helperText:"Status check interval",validation:{min:1}},{key:"enableAutostop",label:"Enable Auto-stop",type:"boolean",helperText:"Stop container when no players connected",restartRequired:!0},{key:"autostopTimeoutEst",label:"Stop Timeout",type:"number",unit:"seconds",helperText:"Wait time before stopping container",validation:{min:0}}]},{id:"system",icon:eN.Z,title:"System",description:"Timezone, resource pack, RCON, and container settings.",essentialFields:[{key:"tz",label:"Timezone",type:"string",helperText:"e.g., Asia/Seoul, UTC",restartRequired:!0},{key:"resourcePack",label:"Resource Pack URL",type:"string",helperText:"Direct download URL for resource pack",columns:12},{key:"enableRcon",label:"Enable RCON",type:"boolean",helperText:"Remote server console access",restartRequired:!0}],advancedFields:[{key:"resourcePackSha1",label:"Resource Pack SHA1",type:"string",helperText:"40-character hex checksum",columns:12},{key:"resourcePackEnforce",label:"Enforce Resource Pack",type:"boolean",helperText:"Kick players who decline"},{key:"resourcePackPrompt",label:"Resource Pack Prompt",type:"string",helperText:"Custom message for resource pack dialog",columns:12},{key:"rconPassword",label:"RCON Password",type:"password",restartRequired:!0},{key:"rconPort",label:"RCON Port",type:"number",validation:{min:1024,max:65535},restartRequired:!0},{key:"stopDuration",label:"Stop Timeout",type:"number",unit:"seconds",helperText:"Graceful shutdown wait time",restartRequired:!0,validation:{min:0}},{key:"uid",label:"User ID (UID)",type:"number",helperText:"Container process UID",restartRequired:!0,validation:{min:0}},{key:"gid",label:"Group ID (GID)",type:"number",helperText:"Container process GID",restartRequired:!0,validation:{min:0}}]}],eM=["memory","initMemory","maxMemory","useAikarFlags","jvmXxOpts","onlineMode","enableWhitelist","enforceWhitelist","enforceSecureProfile","level","seed","levelType","enableAutopause","enableAutostop","enableRcon","rconPassword","rconPort","tz","uid","gid","stopDuration"];function eE(e){let{serverName:t,isRunning:n}=e,{data:a,isLoading:l}=(0,ex.iC)(t),c=(0,ex.MH)(),x=(0,ex.gx)(),y=(0,ex._I)(),[f,v]=(0,s.useState)({}),[g,k]=(0,s.useState)({}),[S,R]=(0,s.useState)(!1),[P,T]=(0,s.useState)(""),[I,F]=(0,s.useState)(!1),[z,W]=(0,s.useState)({open:!1,message:"",severity:"info"});(0,s.useEffect)(()=>{(null==a?void 0:a.config)&&(v(a.config),k(a.config))},[a]);let O=(0,s.useMemo)(()=>{let e=[];for(let t of Object.keys(f))f[t]!==g[t]&&e.push(t);for(let t of Object.keys(g))f[t]===g[t]||e.includes(t)||e.push(t);return e},[f,g]),D=O.length>0,N=O.filter(e=>eM.includes(e)),M=N.length>0,E=(0,s.useCallback)((e,t)=>{v(n=>({...n,[e]:t}))},[]),L=(0,s.useCallback)(()=>{v(g)},[g]),q=(0,s.useCallback)(async e=>{try{let r=await c.mutateAsync({serverName:t,config:f});if(k(r.config),v(r.config),e&&n)try{await y.mutateAsync(t),W({open:!0,message:"Settings saved. Server is restarting...",severity:"warning"})}catch(e){W({open:!0,message:"Settings saved, but server restart failed. Please restart manually.",severity:"error"})}else W({open:!0,message:r.restartRequired?"Settings saved. Restart required for some changes to take effect.":"Settings saved successfully.",severity:r.restartRequired?"warning":"success"})}catch(e){W({open:!0,message:e instanceof Error?e.message:"Failed to save settings",severity:"error"})}finally{F(!1)}},[f,t,n,c,y]),U=(0,s.useCallback)(()=>{M&&n?F(!0):q(!1)},[M,n,q]),B=async()=>{if("RESET"!==P){W({open:!0,message:"Please type RESET to confirm",severity:"warning"});return}try{await x.mutateAsync(t),W({open:!0,message:"World reset successfully",severity:"success"}),R(!1),T("")}catch(e){W({open:!0,message:e instanceof Error?e.message:"Failed to reset world",severity:"error"})}};return l?(0,r.jsx)(i.Z,{sx:{display:"flex",justifyContent:"center",py:8},children:(0,r.jsx)(u.Z,{})}):(0,r.jsxs)(i.Z,{children:[(0,r.jsx)(ev,{serverName:t}),eA.map(e=>(0,r.jsx)(eS,{section:e,values:f,onChange:E},e.id)),(0,r.jsx)(h.Z,{sx:{borderRadius:3,borderColor:"error.main",borderWidth:1,borderStyle:"solid"},children:(0,r.jsxs)(p.Z,{children:[(0,r.jsx)(m.Z,{variant:"h6",gutterBottom:!0,fontWeight:600,color:"error",children:"Danger Zone"}),(0,r.jsx)(A.Z,{sx:{mb:3}}),(0,r.jsxs)(i.Z,{sx:{mb:3},children:[(0,r.jsx)(m.Z,{variant:"subtitle1",fontWeight:600,gutterBottom:!0,children:"Reset World"}),(0,r.jsx)(m.Z,{variant:"body2",color:"text.secondary",sx:{mb:2},children:"This will permanently delete the current world and generate a new one. This action cannot be undone."}),(0,r.jsx)(o.Z,{variant:"outlined",color:"error",startIcon:(0,r.jsx)(eu.Z,{}),onClick:()=>R(!0),disabled:n,children:"Reset World"}),n&&(0,r.jsx)(m.Z,{variant:"caption",color:"text.secondary",sx:{ml:2},children:"Stop the server first"})]})]})}),(0,r.jsx)(eP,{hasChanges:D,changedCount:O.length,hasRestartChanges:M,restartFields:N,isSaving:c.isPending,onSave:U,onDiscard:L}),(0,r.jsx)(eF,{open:I,changedFields:N,onSaveOnly:()=>q(!1),onSaveAndRestart:()=>q(!0),onCancel:()=>F(!1)}),(0,r.jsxs)(j.Z,{open:S,onClose:()=>R(!1),maxWidth:"sm",fullWidth:!0,children:[(0,r.jsx)(b.Z,{children:(0,r.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,r.jsx)(ec.Z,{color:"error"}),(0,r.jsx)(m.Z,{variant:"h6",fontWeight:600,children:"Reset World"})]})}),(0,r.jsxs)(Z.Z,{children:[(0,r.jsxs)(m.Z,{variant:"body1",gutterBottom:!0,children:["This will permanently delete the world for ",(0,r.jsx)("strong",{children:t})," and generate a new one."]}),(0,r.jsx)(m.Z,{variant:"body2",color:"text.secondary",gutterBottom:!0,children:"This action cannot be undone. All player progress and builds will be lost."}),(0,r.jsx)(w.Z,{fullWidth:!0,label:"Type RESET to confirm",value:P,onChange:e=>T(e.target.value),sx:{mt:3},autoFocus:!0})]}),(0,r.jsxs)(C.Z,{children:[(0,r.jsx)(o.Z,{onClick:()=>R(!1),children:"Cancel"}),(0,r.jsx)(o.Z,{variant:"contained",color:"error",onClick:B,disabled:"RESET"!==P||x.isPending,startIcon:x.isPending?(0,r.jsx)(u.Z,{size:16}):(0,r.jsx)(ed.Z,{}),children:x.isPending?"Resetting...":"Reset World"})]})]}),(0,r.jsx)(eo.Z,{open:z.open,autoHideDuration:6e3,onClose:()=>W({...z,open:!1}),anchorOrigin:{vertical:"bottom",horizontal:"right"},children:(0,r.jsx)(d.Z,{onClose:()=>W({...z,open:!1}),severity:z.severity,sx:{width:"100%"},children:z.message})})]})}var eL=n(86702),eq=n(47606),eU=n(407),eB=n(56056),eK=n(11597),eV=n(59602);let eH={admin:{label:"Owner",color:"primary",variant:"filled"},manage:{label:"Operator",color:"info",variant:"outlined"},view:{label:"Viewer",color:"default",variant:"outlined"}};function eQ(e){let{permission:t,size:n="medium"}=e,s=eH[t];return(0,r.jsx)(D.Z,{label:s.label,color:s.color,variant:s.variant,size:n})}var eG=n(99046),eJ=n(68038),e_=n(34080),e$=n(39181),eX=n(5632),eY=n(58919),e0=n(20367),e1=n(42936);function e2(e){var t,n;let{open:a,onClose:l,serverId:c}=e,[x,h]=(0,s.useState)(""),[p,y]=(0,s.useState)(null),[f,v]=(0,s.useState)("view"),{data:g,isLoading:k}=(n={enabled:a},(0,eX.a)({queryKey:["users","search",x],queryFn:()=>(0,e1.SC)("/api/users?q=".concat(encodeURIComponent(x))),enabled:(null==n?void 0:n.enabled)!==!1&&x.length>=2,staleTime:3e4})),S=function(){let e=(0,eY.NL)();return(0,e0.D)({mutationFn:e=>(0,e1.SC)("/api/user-servers",{method:"POST",body:JSON.stringify(e)}),onSuccess:(t,n)=>{e.invalidateQueries({queryKey:["user-servers",n.serverId]}),e.invalidateQueries({queryKey:["user-servers"]})}})}(),R=(0,s.useMemo)(()=>{var e;return null!==(e=null==g?void 0:g.users)&&void 0!==e?e:[]},[g]),P=()=>{h(""),y(null),v("view"),S.reset(),l()};return(0,r.jsxs)(j.Z,{open:a,onClose:P,maxWidth:"sm",fullWidth:!0,PaperProps:{sx:{borderRadius:3}},children:[(0,r.jsx)(b.Z,{sx:{fontWeight:600},children:"Add User Access"}),(0,r.jsxs)(Z.Z,{sx:{display:"flex",flexDirection:"column",gap:3,pt:"8px !important"},children:[S.isError&&(0,r.jsx)(d.Z,{severity:"error",sx:{mb:1},children:(null===(t=S.error)||void 0===t?void 0:t.message)||"Failed to grant access"}),(0,r.jsx)(eG.Z,{options:R,getOptionLabel:e=>e.name||e.email,isOptionEqualToValue:(e,t)=>e.id===t.id,value:p,onChange:(e,t)=>y(t),inputValue:x,onInputChange:(e,t)=>h(t),loading:k,filterOptions:e=>e,noOptionsText:x.length<2?"Type at least 2 characters":"No users found",renderInput:e=>(0,r.jsx)(w.Z,{...e,label:"Search User",placeholder:"Search by name or email...",InputProps:{...e.InputProps,endAdornment:(0,r.jsxs)(r.Fragment,{children:[k&&(0,r.jsx)(u.Z,{size:20}),e.InputProps.endAdornment]})}}),renderOption:(e,t)=>{var n,s,a;let{key:l,...o}=e;return(0,r.jsxs)(i.Z,{component:"li",...o,sx:{display:"flex",gap:1.5,py:1},children:[(0,r.jsx)(eL.Z,{src:null!==(a=t.image)&&void 0!==a?a:void 0,sx:{width:32,height:32,bgcolor:"primary.main",fontSize:14},children:((null===(n=t.name)||void 0===n?void 0:n[0])||(null===(s=t.email)||void 0===s?void 0:s[0])||"?").toUpperCase()}),(0,r.jsxs)(i.Z,{children:[(0,r.jsx)(m.Z,{variant:"body2",fontWeight:500,children:t.name||"Unknown"}),(0,r.jsx)(m.Z,{variant:"caption",color:"text.secondary",children:t.email})]})]},l)}}),(0,r.jsxs)($.Z,{children:[(0,r.jsx)(eJ.Z,{sx:{fontWeight:500,mb:1},children:"Permission Level"}),(0,r.jsxs)(e_.Z,{value:f,onChange:e=>v(e.target.value),children:[(0,r.jsx)(eb.Z,{value:"view",control:(0,r.jsx)(e$.Z,{size:"small"}),label:(0,r.jsxs)(i.Z,{children:[(0,r.jsx)(m.Z,{variant:"body2",fontWeight:500,children:"Viewer"}),(0,r.jsx)(m.Z,{variant:"caption",color:"text.secondary",children:"Can view server status and logs"})]})}),(0,r.jsx)(eb.Z,{value:"manage",control:(0,r.jsx)(e$.Z,{size:"small"}),label:(0,r.jsxs)(i.Z,{children:[(0,r.jsx)(m.Z,{variant:"body2",fontWeight:500,children:"Operator"}),(0,r.jsx)(m.Z,{variant:"caption",color:"text.secondary",children:"Can start, stop, and configure the server"})]})}),(0,r.jsx)(eb.Z,{value:"admin",control:(0,r.jsx)(e$.Z,{size:"small"}),label:(0,r.jsxs)(i.Z,{children:[(0,r.jsx)(m.Z,{variant:"body2",fontWeight:500,children:"Owner"}),(0,r.jsx)(m.Z,{variant:"caption",color:"text.secondary",children:"Full control including managing other users"})]})})]})]})]}),(0,r.jsxs)(C.Z,{sx:{px:3,pb:2},children:[(0,r.jsx)(o.Z,{onClick:P,color:"inherit",children:"Cancel"}),(0,r.jsx)(o.Z,{onClick:()=>{p&&S.mutate({userId:p.id,serverId:c,permission:f},{onSuccess:P})},variant:"contained",disabled:!p||S.isPending,sx:{borderRadius:2},children:S.isPending?"Adding...":"Add User"})]})]})}function e3(e){var t,n;let{serverId:a}=e,{data:l,isLoading:u,error:j}=(0,eX.a)({queryKey:["user-servers",a],queryFn:()=>(0,e1.SC)("/api/user-servers?serverId=".concat(encodeURIComponent(a))),enabled:!!a}),b=function(){let e=(0,eY.NL)();return(0,e0.D)({mutationFn:e=>{let{id:t,permission:n}=e;return(0,e1.SC)("/api/user-servers/".concat(encodeURIComponent(t)),{method:"PATCH",body:JSON.stringify({permission:n})})},onSuccess:()=>{e.invalidateQueries({queryKey:["user-servers"]})}})}(),Z=function(){let e=(0,eY.NL)();return(0,e0.D)({mutationFn:e=>(0,e1.SC)("/api/user-servers/".concat(encodeURIComponent(e)),{method:"DELETE"}),onSuccess:()=>{e.invalidateQueries({queryKey:["user-servers"]})}})}(),[C,w]=(0,s.useState)(!1),[k,S]=(0,s.useState)(null),[R,P]=(0,s.useState)(null),I=(e,t)=>{S(e.currentTarget),P(t)},F=()=>{S(null),P(null)},z=e=>{if(!R||R.permission===e){F();return}b.mutate({id:R.id,permission:e},{onSettled:F})},W=null!==(t=null==l?void 0:l.users.filter(e=>"admin"===e.permission).length)&&void 0!==t?t:0,O=(null==R?void 0:R.permission)==="admin"&&W<=1;if(u)return(0,r.jsx)(h.Z,{sx:{borderRadius:3},children:(0,r.jsxs)(p.Z,{children:[(0,r.jsxs)(i.Z,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2},children:[(0,r.jsx)(x.Z,{variant:"text",width:"30%",height:32}),(0,r.jsx)(x.Z,{variant:"rounded",width:120,height:36,sx:{borderRadius:2}})]}),(0,r.jsx)(A.Z,{sx:{mb:2}}),[0,1,2].map(e=>(0,r.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:2,py:1.5,borderBottom:"1px solid",borderColor:"divider"},children:[(0,r.jsx)(x.Z,{variant:"circular",width:40,height:40}),(0,r.jsxs)(i.Z,{sx:{flex:1},children:[(0,r.jsx)(x.Z,{variant:"text",width:"40%"}),(0,r.jsx)(x.Z,{variant:"text",width:"60%"})]}),(0,r.jsx)(x.Z,{variant:"rounded",width:80,height:28,sx:{borderRadius:10}}),(0,r.jsx)(x.Z,{variant:"circular",width:32,height:32})]},e))]})});if(j)return(0,r.jsxs)(d.Z,{severity:"error",children:["Failed to load access list: ",j.message]});let D=null!==(n=null==l?void 0:l.users)&&void 0!==n?n:[];return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(h.Z,{sx:{borderRadius:3},children:(0,r.jsxs)(p.Z,{children:[(0,r.jsxs)(i.Z,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2},children:[(0,r.jsx)(m.Z,{variant:"h6",fontWeight:600,children:"Server Access"}),(0,r.jsx)(o.Z,{variant:"contained",size:"small",startIcon:(0,r.jsx)(eq.Z,{}),onClick:()=>w(!0),sx:{borderRadius:2},children:"Add User"})]}),(0,r.jsx)(A.Z,{sx:{mb:1}}),0===D.length?(0,r.jsx)(i.Z,{sx:{py:4,textAlign:"center"},children:(0,r.jsx)(m.Z,{variant:"body2",color:"text.secondary",children:"No users have been granted access to this server yet."})}):D.map(e=>{var t,n,s,a,l,o,d,u;return(0,r.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:2,py:1.5,"&:not(:last-child)":{borderBottom:"1px solid",borderColor:"divider"}},children:[(0,r.jsx)(eL.Z,{src:null!==(u=null===(t=e.user)||void 0===t?void 0:t.image)&&void 0!==u?u:void 0,sx:{width:40,height:40,bgcolor:"primary.main",fontSize:16},children:((null===(s=e.user)||void 0===s?void 0:null===(n=s.name)||void 0===n?void 0:n[0])||(null===(l=e.user)||void 0===l?void 0:null===(a=l.email)||void 0===a?void 0:a[0])||"?").toUpperCase()}),(0,r.jsxs)(i.Z,{sx:{flex:1,minWidth:0},children:[(0,r.jsx)(m.Z,{variant:"body2",fontWeight:500,noWrap:!0,children:(null===(o=e.user)||void 0===o?void 0:o.name)||"Unknown User"}),(0,r.jsx)(m.Z,{variant:"caption",color:"text.secondary",noWrap:!0,children:(null===(d=e.user)||void 0===d?void 0:d.email)||e.userId})]}),(0,r.jsx)(eQ,{permission:e.permission,size:"small"}),(0,r.jsx)(c.Z,{size:"small",onClick:t=>I(t,e),sx:{color:"text.secondary"},children:(0,r.jsx)(T.Z,{fontSize:"small"})})]},e.id)}),(0,r.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:1,mt:2,pt:1},children:[(0,r.jsx)(eV.Z,{sx:{fontSize:16,color:"text.disabled"}}),(0,r.jsx)(m.Z,{variant:"caption",color:"text.disabled",children:"Only platform admins and server owners can manage access."})]})]})}),(0,r.jsxs)(y.Z,{anchorEl:k,open:!!k,onClose:F,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},disableScrollLock:!0,children:[(0,r.jsxs)(f.Z,{onClick:()=>z("admin"),disabled:(null==R?void 0:R.permission)==="admin",children:[(0,r.jsx)(v.Z,{children:(0,r.jsx)(eU.Z,{fontSize:"small"})}),(0,r.jsx)(g.Z,{children:"Change to Owner"})]}),(0,r.jsxs)(f.Z,{onClick:()=>z("manage"),disabled:(null==R?void 0:R.permission)==="manage"||O,children:[(0,r.jsx)(v.Z,{children:(0,r.jsx)(eB.Z,{fontSize:"small"})}),(0,r.jsx)(g.Z,{children:"Change to Operator"})]}),(0,r.jsxs)(f.Z,{onClick:()=>z("view"),disabled:(null==R?void 0:R.permission)==="view"||O,children:[(0,r.jsx)(v.Z,{children:(0,r.jsx)(eC.Z,{fontSize:"small"})}),(0,r.jsx)(g.Z,{children:"Change to Viewer"})]}),(0,r.jsx)(A.Z,{}),(0,r.jsxs)(f.Z,{onClick:()=>{R&&Z.mutate(R.id,{onSettled:F})},disabled:O,sx:{color:"error.main"},children:[(0,r.jsx)(v.Z,{children:(0,r.jsx)(eK.Z,{fontSize:"small",sx:{color:"error.main"}})}),(0,r.jsx)(g.Z,{children:"Remove Access"})]})]}),(0,r.jsx)(e2,{open:C,onClose:()=>w(!1),serverId:a})]})}var e6=n(37228),e4=n(97511);function e5(e){let{label:t,value:n,copyText:s}=e;return(0,r.jsxs)(i.Z,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",py:1},children:[(0,r.jsx)(m.Z,{variant:"body2",color:"text.secondary",children:t}),(0,r.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center"},children:[(0,r.jsx)(m.Z,{variant:"body2",sx:{color:s?"text.primary":"text.secondary",wordBreak:"break-all"},children:n}),s&&(0,r.jsx)(e4.q,{text:s,size:16})]})]})}function e8(e){let{serverName:t,hostname:n}=e,{data:s,isLoading:a}=(0,e6.UW)();if(a)return(0,r.jsx)(h.Z,{sx:{borderRadius:3},children:(0,r.jsxs)(p.Z,{children:[(0,r.jsx)(x.Z,{variant:"text",width:"40%",height:28,sx:{mb:1}}),(0,r.jsx)(x.Z,{variant:"rectangular",height:1,sx:{mb:2}}),(0,r.jsxs)(i.Z,{sx:{display:"flex",justifyContent:"space-between",py:1},children:[(0,r.jsx)(x.Z,{variant:"text",width:"30%"}),(0,r.jsx)(x.Z,{variant:"text",width:"40%"})]}),(0,r.jsxs)(i.Z,{sx:{display:"flex",justifyContent:"space-between",py:1},children:[(0,r.jsx)(x.Z,{variant:"text",width:"30%"}),(0,r.jsx)(x.Z,{variant:"text",width:"40%"})]})]})});let l=(null==s?void 0:s.enabled)&&s.servers.length>0,o=null==s?void 0:s.servers.find(e=>e.serverName===t),c=(null==o?void 0:o.playitDomain)||"Not configured",d=!!(null==o?void 0:o.playitDomain);return(0,r.jsx)(h.Z,{sx:{borderRadius:3},children:(0,r.jsxs)(p.Z,{children:[(0,r.jsx)(m.Z,{variant:"h6",gutterBottom:!0,fontWeight:600,children:"Connection"}),(0,r.jsx)(A.Z,{sx:{mb:2}}),(0,r.jsxs)(i.Z,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",py:1,gap:1},children:[(0,r.jsx)(m.Z,{variant:"body2",color:"text.secondary",sx:{flexShrink:0},children:"LAN Address"}),n?(0,r.jsx)(i.Z,{sx:{minWidth:0},children:(0,r.jsx)(e4.h,{hostname:n,portSuffix:25565,color:"text.primary",showCopyButton:!0})}):(0,r.jsx)(m.Z,{variant:"body2",color:"text.secondary",children:"Not configured"})]}),l&&(0,r.jsx)(e5,{label:"External Address",value:c,copyText:d?c:void 0})]})})}var e7=n(42431),e9=n(76777),te=n(15761);function tt(e){let{serverName:t}=e,{data:n,isLoading:a,error:l}=(0,eX.a)({queryKey:["servers",t,"mods"],queryFn:()=>(0,e1.SC)("/api/servers/".concat(encodeURIComponent(t),"/mods")),enabled:!!t}),x=function(){let e=(0,eY.NL)();return(0,e0.D)({mutationFn:e=>{let{serverName:t,slugs:n,source:r}=e;return(0,e1.SC)("/api/servers/".concat(encodeURIComponent(t),"/mods"),{method:"POST",body:JSON.stringify({slugs:n,source:r})})},onSuccess:(t,n)=>{let{serverName:r}=n;e.invalidateQueries({queryKey:["servers",r,"mods"]})}})}(),y=function(){let e=(0,eY.NL)();return(0,e0.D)({mutationFn:e=>{let{serverName:t,slug:n}=e;return(0,e1.SC)("/api/servers/".concat(encodeURIComponent(t),"/mods/").concat(encodeURIComponent(n)),{method:"DELETE"})},onSuccess:(t,n)=>{let{serverName:r}=n;e.invalidateQueries({queryKey:["servers",r,"mods"]})}})}(),[f,v]=(0,s.useState)(!1),[g,C]=(0,s.useState)(""),[k,S]=(0,s.useState)(""),[R,P]=(0,s.useState)(!1),[T,F]=(0,s.useState)({open:!1,message:"",severity:"info"}),{data:z,isLoading:W}=function(e,t){let n=new URLSearchParams;return e&&n.set("q",e),(null==t?void 0:t.limit)!=null&&n.set("limit",String(t.limit)),(null==t?void 0:t.offset)!=null&&n.set("offset",String(t.offset)),(0,eX.a)({queryKey:["mods","search",e,null==t?void 0:t.limit,null==t?void 0:t.offset],queryFn:()=>(0,e1.SC)("/api/mods/search?".concat(n)),enabled:(null==t?void 0:t.enabled)!==!1&&!!e.trim()})}(k,{limit:10,enabled:f&&k.length>0});(0,s.useEffect)(()=>{let e=setTimeout(()=>{S(g)},300);return()=>clearTimeout(e)},[g]);let O=(0,s.useCallback)(async e=>{try{await y.mutateAsync({serverName:t,slug:e}),P(!0),F({open:!0,message:"Removed ".concat(e),severity:"success"})}catch(e){F({open:!0,message:e instanceof Error?e.message:"Failed to remove mod",severity:"error"})}},[y,t]),M=(0,s.useCallback)(async e=>{try{await x.mutateAsync({serverName:t,slugs:[e]}),P(!0),F({open:!0,message:"Added ".concat(e),severity:"success"})}catch(e){F({open:!0,message:e instanceof Error?e.message:"Failed to add mod",severity:"error"})}},[x,t]),E=new Set;if(null==n?void 0:n.mods)for(let e of Object.values(n.mods))for(let t of e)E.add(t);if(a)return(0,r.jsx)(i.Z,{sx:{display:"flex",justifyContent:"center",py:6},children:(0,r.jsx)(u.Z,{})});if(l)return(0,r.jsxs)(d.Z,{severity:"error",sx:{mt:2},children:["Failed to load mods: ",l.message]});let q=E.size>0;return(0,r.jsxs)(i.Z,{children:[R&&(0,r.jsx)(d.Z,{severity:"info",sx:{mb:2},children:"Restart the server to apply mod changes."}),(0,r.jsx)(h.Z,{sx:{borderRadius:3},children:(0,r.jsxs)(p.Z,{children:[(0,r.jsxs)(i.Z,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2},children:[(0,r.jsx)(m.Z,{variant:"h6",fontWeight:600,children:"Installed Mods"}),(0,r.jsx)(o.Z,{variant:"contained",size:"small",startIcon:(0,r.jsx)(em.Z,{}),onClick:()=>{C(""),S(""),v(!0)},children:"Add Mods"})]}),(0,r.jsx)(A.Z,{sx:{mb:2}}),q?Object.entries(n.mods).map(e=>{let[t,n]=e;return(0,r.jsxs)(i.Z,{sx:{mb:2},children:[(0,r.jsx)(m.Z,{variant:"subtitle2",color:"text.secondary",sx:{mb:1,textTransform:"capitalize"},children:t}),(0,r.jsx)(i.Z,{sx:{display:"flex",flexWrap:"wrap",gap:1},children:n.map(e=>(0,r.jsx)(D.Z,{label:e,icon:(0,r.jsx)(e9.Z,{}),onDelete:()=>O(e),deleteIcon:(0,r.jsx)(I.Z,{}),variant:"outlined"},e))})]},t)}):(0,r.jsxs)(i.Z,{sx:{textAlign:"center",py:4},children:[(0,r.jsx)(e9.Z,{sx:{fontSize:48,color:"text.disabled",mb:1}}),(0,r.jsx)(m.Z,{variant:"body1",color:"text.secondary",children:"No mods installed"}),(0,r.jsx)(m.Z,{variant:"body2",color:"text.disabled",sx:{mt:.5},children:'Click "Add Mods" to search and install mods from Modrinth'})]})]})}),(0,r.jsxs)(j.Z,{open:f,onClose:()=>v(!1),maxWidth:"sm",fullWidth:!0,PaperProps:{sx:{minHeight:400}},children:[(0,r.jsxs)(b.Z,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:["Search Mods",(0,r.jsx)(c.Z,{onClick:()=>v(!1),size:"small",children:(0,r.jsx)(L.Z,{})})]}),(0,r.jsxs)(Z.Z,{children:[(0,r.jsx)(w.Z,{fullWidth:!0,autoFocus:!0,placeholder:"Search Modrinth...",value:g,onChange:e=>C(e.target.value),InputProps:{startAdornment:(0,r.jsx)(N.Z,{position:"start",children:(0,r.jsx)(e7.Z,{})})},sx:{mb:2}}),W&&(0,r.jsx)(i.Z,{sx:{display:"flex",justifyContent:"center",py:4},children:(0,r.jsx)(u.Z,{size:28})}),!W&&z&&0===z.hits.length&&k&&(0,r.jsxs)(m.Z,{variant:"body2",color:"text.secondary",sx:{textAlign:"center",py:4},children:['No mods found for "',k,'"']}),!W&&z&&z.hits.length>0&&(0,r.jsx)(i.Z,{sx:{display:"flex",flexDirection:"column",gap:1.5},children:z.hits.map(e=>{var t;let n=E.has(e.slug);return(0,r.jsx)(h.Z,{variant:"outlined",sx:{borderRadius:2},children:(0,r.jsx)(p.Z,{sx:{py:1.5,px:2,"&:last-child":{pb:1.5}},children:(0,r.jsxs)(i.Z,{sx:{display:"flex",gap:1.5,alignItems:"flex-start"},children:[(0,r.jsx)(eL.Z,{src:e.iconUrl||void 0,variant:"rounded",sx:{width:40,height:40,bgcolor:"action.hover"},children:(0,r.jsx)(e9.Z,{})}),(0,r.jsxs)(i.Z,{sx:{flex:1,minWidth:0},children:[(0,r.jsxs)(i.Z,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,r.jsx)(m.Z,{variant:"subtitle2",noWrap:!0,children:e.title}),(0,r.jsx)(o.Z,{size:"small",variant:n?"outlined":"contained",disabled:n||x.isPending,onClick:()=>M(e.slug),sx:{ml:1,minWidth:80,flexShrink:0},children:n?"Installed":"Add"})]}),(0,r.jsx)(m.Z,{variant:"body2",color:"text.secondary",sx:{mt:.25,overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical"},children:e.description}),(0,r.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:1,mt:.5},children:[(0,r.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:.25},children:[(0,r.jsx)(te.Z,{sx:{fontSize:14,color:"text.disabled"}}),(0,r.jsx)(m.Z,{variant:"caption",color:"text.disabled",children:(t=e.downloads)>=1e6?"".concat((t/1e6).toFixed(1),"M"):t>=1e3?"".concat((t/1e3).toFixed(1),"K"):String(t)})]}),e.author&&(0,r.jsxs)(m.Z,{variant:"caption",color:"text.disabled",children:["by ",e.author]})]})]})]})})},e.slug)})})]})]}),(0,r.jsx)(eo.Z,{open:T.open,autoHideDuration:4e3,onClose:()=>F(e=>({...e,open:!1})),anchorOrigin:{vertical:"bottom",horizontal:"center"},children:(0,r.jsx)(d.Z,{onClose:()=>F(e=>({...e,open:!1})),severity:T.severity,variant:"filled",children:T.message})})]})}function tn(e,t){return(0,eX.a)({queryKey:["servers",e,"files","content",t],queryFn:()=>{let n=new URLSearchParams({path:t});return(0,e1.SC)("/api/servers/".concat(encodeURIComponent(e),"/files/read?").concat(n))},enabled:!!e&&!!t})}function tr(e){let t=(0,eY.NL)();return(0,e0.D)({mutationFn:t=>{let{path:n,content:r}=t,s=new URLSearchParams({path:n});return(0,e1.SC)("/api/servers/".concat(encodeURIComponent(e),"/files/write?").concat(s),{method:"PUT",body:JSON.stringify({content:r})})},onSuccess:()=>{t.invalidateQueries({queryKey:["servers",e,"files"]})}})}var ts=n(26138),ta=n(41261),tl=n(49368);function ti(e){let{path:t,onNavigate:n}=e,s=t.split("/").filter(Boolean);return(0,r.jsxs)(ts.Z,{sx:{mb:1},children:[(0,r.jsxs)(ta.Z,{component:"button",underline:"hover",color:"inherit",onClick:()=>n("/"),sx:{display:"flex",alignItems:"center",gap:.5,cursor:"pointer"},children:[(0,r.jsx)(tl.Z,{sx:{fontSize:18}}),"root"]}),s.map((e,t)=>{let a=t===s.length-1,l="/"+s.slice(0,t+1).join("/");return a?(0,r.jsx)(m.Z,{color:"text.primary",sx:{fontWeight:500},children:e},l):(0,r.jsx)(ta.Z,{component:"button",underline:"hover",color:"inherit",onClick:()=>n(l),sx:{cursor:"pointer"},children:e},l)})]})}var to=n(23907),tc=n(69366),td=n(14895);let tu=/[/\\]/,tx=/\.\./;function th(e){let{open:t,existingNames:n,isPending:a,onConfirm:l,onClose:i}=e,[c,d]=(0,s.useState)(""),u=(0,s.useMemo)(()=>c.trim()?tu.test(c)?"Name cannot contain / or \\":tx.test(c)?'Name cannot contain ".."':c.startsWith(".")?'Name cannot start with "."':null:"Folder name cannot be empty",[c]),x=(0,s.useMemo)(()=>n.some(e=>e.toLowerCase()===c.trim().toLowerCase()),[c,n]),h=!u&&!x&&!!c.trim(),p=(0,s.useCallback)(()=>{h&&(l(c.trim()),d(""))},[h,c,l]),m=(0,s.useCallback)(()=>{d(""),i()},[i]);return(0,r.jsxs)(j.Z,{open:t,onClose:m,maxWidth:"xs",fullWidth:!0,children:[(0,r.jsx)(b.Z,{children:"Create New Folder"}),(0,r.jsx)(Z.Z,{children:(0,r.jsx)(w.Z,{autoFocus:!0,fullWidth:!0,label:"Folder name",value:c,onChange:e=>d(e.target.value),onKeyDown:e=>"Enter"===e.key&&p(),error:!!u&&c.length>0||x,helperText:c.length>0&&u||(x?'"'.concat(c.trim(),'" already exists'):void 0),sx:{mt:1}})}),(0,r.jsxs)(C.Z,{children:[(0,r.jsx)(o.Z,{onClick:m,children:"Cancel"}),(0,r.jsx)(o.Z,{onClick:p,variant:"contained",disabled:a||!h,children:"Create"})]})]})}function tp(e){let{searchQuery:t,onSearchChange:n,onCreateFolder:a,onUpload:l,onRefresh:c,existingNames:d,disabled:u}=e,[x,h]=(0,s.useState)(!1);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(i.Z,{sx:{display:"flex",gap:1,alignItems:"center",mb:2,flexWrap:"wrap"},children:[(0,r.jsx)(w.Z,{size:"small",placeholder:"Search files...",value:t,onChange:e=>n(e.target.value),InputProps:{startAdornment:(0,r.jsx)(N.Z,{position:"start",children:(0,r.jsx)(e7.Z,{sx:{fontSize:20,color:"text.secondary"}})})},sx:{minWidth:200,flex:{xs:"1 1 100%",sm:"0 1 auto"}}}),(0,r.jsxs)(i.Z,{sx:{display:"flex",gap:1,ml:"auto"},children:[(0,r.jsx)(o.Z,{size:"small",startIcon:(0,r.jsx)(td.Z,{}),onClick:l,disabled:u,children:"Upload"}),(0,r.jsx)(o.Z,{size:"small",startIcon:(0,r.jsx)(to.Z,{}),onClick:()=>h(!0),disabled:u,children:"New Folder"}),(0,r.jsx)(o.Z,{size:"small",startIcon:(0,r.jsx)(tc.Z,{}),onClick:c,disabled:u,children:"Refresh"})]})]}),(0,r.jsx)(th,{open:x,existingNames:d,isPending:!!u,onConfirm:e=>{a(e),h(!1)},onClose:()=>h(!1)})]})}var tm=n(21138),ty=n(84811),tf=n(47001),tv=n(53281),tg=n(11254),tj=n(70366),tb=n(53325),tZ=n(32579),tC=n(97589),tw=n(18644),tk=n(7837),tS=n(94358),tR=n(9078),tP=n(45813),tT=n(26559);function tI(e){var t;return["yml","yaml","json","properties","toml","cfg","conf","ini","txt","md","log","xml","sh","bat","csv"].includes((null===(t=e.split(".").pop())||void 0===t?void 0:t.toLowerCase())||"")}function tF(e){var t;let{file:n,currentPath:a,onNavigate:l,onAction:o}=e,[d,u]=(0,s.useState)(null),x=()=>{"directory"===n.type?l("/"===a?"/".concat(n.name):"".concat(a,"/").concat(n.name)):tI(n.name)&&o("open")};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(tj.Z,{hover:!0,sx:{cursor:"directory"===n.type||tI(n.name)?"pointer":"default"},onClick:x,children:[(0,r.jsx)(tf.Z,{children:(0,r.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[function(e){var t;if("directory"===e.type)return(0,r.jsx)(tb.Z,{sx:{color:"#FFB74D"}});let n=(null===(t=e.name.split(".").pop())||void 0===t?void 0:t.toLowerCase())||"";return["yml","yaml","json","properties","toml","cfg","conf","ini","txt","md"].includes(n)?(0,r.jsx)(tC.Z,{sx:{color:"#42A5F5"}}):"jar"===n?(0,r.jsx)(tw.Z,{sx:{color:"#AB47BC"}}):"log"===n?(0,r.jsx)(tk.Z,{sx:{color:"#78909C"}}):["dat","dat_old","mca","nbt","lock"].includes(n)?(0,r.jsx)(tS.Z,{sx:{color:"#8D6E63"}}):(0,r.jsx)(tZ.Z,{sx:{color:"#90A4AE"}})}(n),(0,r.jsx)(m.Z,{variant:"body2",sx:{fontWeight:"directory"===n.type?500:400,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:n.name})]})}),(0,r.jsx)(tf.Z,{sx:{display:{xs:"none",sm:"table-cell"}},children:(0,r.jsx)(m.Z,{variant:"body2",color:"text.secondary",children:"directory"===n.type?"-":0===(t=n.size)?"-":t<1024?"".concat(t," B"):t<1048576?"".concat((t/1024).toFixed(1)," KB"):t<1073741824?"".concat((t/1024/1024).toFixed(1)," MB"):"".concat((t/1024/1024/1024).toFixed(1)," GB")})}),(0,r.jsx)(tf.Z,{sx:{display:{xs:"none",md:"table-cell"}},children:(0,r.jsx)(m.Z,{variant:"body2",color:"text.secondary",children:new Date(n.modifiedAt).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})})}),(0,r.jsx)(tf.Z,{children:(0,r.jsx)(c.Z,{size:"small",onClick:e=>{e.stopPropagation(),u(e.currentTarget)},children:(0,r.jsx)(T.Z,{fontSize:"small"})})})]}),(0,r.jsxs)(y.Z,{anchorEl:d,open:!!d,onClose:()=>u(null),children:["directory"===n.type&&(0,r.jsxs)(f.Z,{onClick:()=>{u(null),x()},children:[(0,r.jsx)(v.Z,{children:(0,r.jsx)(tR.Z,{fontSize:"small"})}),(0,r.jsx)(g.Z,{children:"Open"})]}),"file"===n.type&&tI(n.name)&&(0,r.jsxs)(f.Z,{onClick:()=>{u(null),o("open")},children:[(0,r.jsx)(v.Z,{children:(0,r.jsx)(tP.Z,{fontSize:"small"})}),(0,r.jsx)(g.Z,{children:"Edit"})]}),"file"===n.type&&(0,r.jsxs)(f.Z,{onClick:()=>{u(null),o("download")},children:[(0,r.jsx)(v.Z,{children:(0,r.jsx)(te.Z,{fontSize:"small"})}),(0,r.jsx)(g.Z,{children:"Download"})]}),(0,r.jsxs)(f.Z,{onClick:()=>{u(null),o("rename")},children:[(0,r.jsx)(v.Z,{children:(0,r.jsx)(tT.Z,{fontSize:"small"})}),(0,r.jsx)(g.Z,{children:"Rename"})]}),(0,r.jsxs)(f.Z,{onClick:()=>{u(null),o("delete")},sx:{color:"error.main"},children:[(0,r.jsx)(v.Z,{children:(0,r.jsx)(I.Z,{fontSize:"small",color:"error"})}),(0,r.jsx)(g.Z,{children:"Delete"})]})]})]})}function tz(e){let{files:t,currentPath:n,onNavigate:s,onFileAction:a,searchQuery:l}=e,o=l?t.filter(e=>e.name.toLowerCase().includes(l.toLowerCase())):t;return 0===o.length?(0,r.jsxs)(i.Z,{sx:{textAlign:"center",py:6},children:[(0,r.jsx)(tb.Z,{sx:{fontSize:48,color:"text.disabled",mb:1}}),(0,r.jsx)(m.Z,{variant:"body1",color:"text.secondary",children:l?"No matching files found":"This directory is empty"})]}):(0,r.jsx)(tv.Z,{children:(0,r.jsxs)(tm.Z,{size:"small",children:[(0,r.jsx)(tg.Z,{children:(0,r.jsxs)(tj.Z,{children:[(0,r.jsx)(tf.Z,{sx:{fontWeight:600},children:"Name"}),(0,r.jsx)(tf.Z,{sx:{fontWeight:600,width:100,display:{xs:"none",sm:"table-cell"}},children:"Size"}),(0,r.jsx)(tf.Z,{sx:{fontWeight:600,width:160,display:{xs:"none",md:"table-cell"}},children:"Modified"}),(0,r.jsx)(tf.Z,{sx:{width:48}})]})}),(0,r.jsx)(ty.Z,{children:o.map(e=>(0,r.jsx)(tF,{file:e,currentPath:n,onNavigate:s,onAction:t=>a(t,e)},e.name))})]})})}var tW=n(35308),tO=n(66349),tD=n(45328),tN=n(41648),tA=n(29944),tM=n(75134),tE=n(19341),tL=n(36074),tq=n(66546);function tU(e){let{language:t,fileSize:n,line:s,col:a,dirty:l}=e;return(0,r.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:2,px:2,py:.5,bgcolor:"grey.100",borderTop:1,borderColor:"divider",fontSize:"0.75rem",color:"text.secondary",flexWrap:"wrap",minHeight:28},children:[(0,r.jsx)(m.Z,{variant:"caption",sx:{fontWeight:500},children:t}),(0,r.jsx)(m.Z,{variant:"caption",children:n<1024?"".concat(n," B"):n<1048576?"".concat((n/1024).toFixed(1)," KB"):"".concat((n/1024/1024).toFixed(1)," MB")}),(0,r.jsx)(m.Z,{variant:"caption",children:"UTF-8"}),(0,r.jsxs)(m.Z,{variant:"caption",children:["Ln ",s,", Col ",a]}),(0,r.jsx)(i.Z,{sx:{flex:1}}),l&&(0,r.jsx)(m.Z,{variant:"caption",sx:{color:"warning.main",fontWeight:600},children:"Modified"})]})}function tB(e){var t;let{serverName:n,filePath:a,onBack:l}=e,x=(0,s.useRef)(null),y=(0,s.useRef)(null),[f,v]=(0,s.useState)(!1),[g,b]=(0,s.useState)({line:1,col:1}),[Z,C]=(0,s.useState)(!1),w=a.split("/").pop()||"",{data:k,isLoading:S,error:P}=tn(n,a),T=tr(n),I=(0,s.useCallback)(()=>{if(!y.current||!a)return;let e=y.current.state.doc.toString();T.mutate({path:a,content:e},{onSuccess:()=>v(!1)})},[a,T]),F=(0,s.useCallback)(()=>{f?C(!0):l()},[f,l]),z=(0,s.useCallback)(()=>{C(!1),v(!1),l()},[l]);(0,s.useEffect)(()=>{if(!x.current||!k)return;y.current&&(y.current.destroy(),y.current=null);let e=tW.$f.of([{key:"Mod-s",run:()=>(setTimeout(()=>{if(!y.current||!a)return;let e=y.current.state.doc.toString();T.mutate({path:a,content:e},{onSuccess:()=>v(!1)})},0),!0),preventDefault:!0}]),t=tW.tk.updateListener.of(e=>{if(e.docChanged&&v(!0),e.selectionSet||e.docChanged){let t=e.state.selection.main.head,n=e.state.doc.lineAt(t);b({line:n.number,col:t-n.from+1})}}),n=tO.yy.create({doc:k.content,extensions:[(0,tW.Eu)(),(0,tW.ZO)(),(0,tW.AE)(),(0,tD.m8)(),(0,tN.mi)(),(0,tW.Uw)(),(0,tW.Zs)(),(0,tN.nY)(),(0,tN.n$)(),(0,tA.sW)(),(0,tN.nF)(tN.R_,{fallback:!0}),tq.vk,function(e){var t;switch((null===(t=e.split(".").pop())||void 0===t?void 0:t.toLowerCase())||""){case"json":return(0,tM.AV)();case"yml":case"yaml":return(0,tE.rV)();case"xml":case"html":return(0,tL.Ls)();default:return[]}}(w),e,tW.$f.of([...tD.wQ,...tD.f$,...tA.Lp,tD.oc]),t,tW.tk.lineWrapping,tW.tk.theme({"&":{height:"100%",fontSize:"13px"},".cm-scroller":{overflow:"auto"},".cm-content":{fontFamily:'"Fira Code", "Cascadia Code", "JetBrains Mono", "Consolas", monospace'},".cm-gutters":{fontFamily:'"Fira Code", "Cascadia Code", "JetBrains Mono", "Consolas", monospace'}})]}),r=new tW.tk({state:n,parent:x.current});return y.current=r,()=>{r.destroy(),y.current=null}},[k,w,a]);let W=k&&k.size>5242880;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(h.Z,{sx:{borderRadius:3,display:"flex",flexDirection:"column",minHeight:600},children:[(0,r.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1,borderBottom:1,borderColor:"divider"},children:[(0,r.jsx)(c.Z,{size:"small",onClick:F,"aria-label":"back",children:(0,r.jsx)(R.Z,{})}),(0,r.jsx)(tC.Z,{sx:{color:"primary.main"}}),(0,r.jsxs)(m.Z,{variant:"subtitle1",sx:{fontWeight:600,flex:1},noWrap:!0,children:[w,f&&" *"]}),(0,r.jsx)(o.Z,{size:"small",variant:"contained",startIcon:T.isPending?(0,r.jsx)(u.Z,{size:16,color:"inherit"}):(0,r.jsx)(ey.Z,{}),onClick:I,disabled:!f||T.isPending,children:"Save"})]}),(0,r.jsxs)(p.Z,{sx:{flex:1,display:"flex",flexDirection:"column",overflow:"hidden",p:0,"&:last-child":{pb:0}},children:[S&&(0,r.jsx)(i.Z,{sx:{display:"flex",justifyContent:"center",alignItems:"center",flex:1},children:(0,r.jsx)(u.Z,{})}),P&&(0,r.jsxs)(d.Z,{severity:"error",sx:{m:2},children:["Failed to load file: ",P.message]}),W&&(0,r.jsxs)(d.Z,{severity:"warning",sx:{m:2},children:["This file is too large to edit (",(k.size/1024/1024).toFixed(1)," MB). Maximum editable size is 5 MB."]}),T.isError&&(0,r.jsxs)(d.Z,{severity:"error",sx:{m:2},children:["Failed to save: ",T.error.message]}),T.isSuccess&&!f&&(0,r.jsx)(d.Z,{severity:"success",sx:{m:2},children:"File saved successfully."}),k&&!W&&(0,r.jsx)(i.Z,{ref:x,sx:{flex:1,overflow:"hidden"}}),k&&!W&&(0,r.jsx)(tU,{language:{json:"JSON",yml:"YAML",yaml:"YAML",xml:"XML",html:"HTML",properties:"Properties",toml:"TOML",cfg:"Config",conf:"Config",ini:"INI",txt:"Plain Text",md:"Markdown",log:"Log",sh:"Shell",bat:"Batch",csv:"CSV"}[(null===(t=w.split(".").pop())||void 0===t?void 0:t.toLowerCase())||""]||"Plain Text",fileSize:k.size,line:g.line,col:g.col,dirty:f})]})]}),(0,r.jsx)(j.Z,{open:Z,onClose:()=>C(!1),maxWidth:"xs",fullWidth:!0,children:(0,r.jsxs)(i.Z,{sx:{p:3},children:[(0,r.jsx)(m.Z,{variant:"h6",gutterBottom:!0,children:"Unsaved Changes"}),(0,r.jsxs)(m.Z,{variant:"body2",color:"text.secondary",sx:{mb:3},children:["You have unsaved changes in ",(0,r.jsx)("strong",{children:w}),". Do you want to discard them?"]}),(0,r.jsxs)(i.Z,{sx:{display:"flex",justifyContent:"flex-end",gap:1},children:[(0,r.jsx)(o.Z,{onClick:()=>C(!1),children:"Cancel"}),(0,r.jsx)(o.Z,{onClick:z,color:"error",variant:"contained",children:"Discard"})]})]})})]})}var tK=n(65087);let tV=new Set(["world","world_nether","world_the_end","server.jar","server.properties","plugins","mods"]);function tH(e){var t;let{target:n,isPending:a,onConfirm:l,onClose:i}=e,[c,u]=(0,s.useState)(""),x=!!n&&(t=n.name,tV.has(t.toLowerCase())),h=(null==n?void 0:n.type)==="directory",p=!x||c===(null==n?void 0:n.name);(0,s.useEffect)(()=>{n||u("")},[n]);let m=(0,s.useCallback)(()=>{p&&l()},[p,l]);return(0,r.jsxs)(j.Z,{open:!!n,onClose:i,maxWidth:"xs",fullWidth:!0,children:[(0,r.jsxs)(b.Z,{children:["Delete ",h?"Folder":"File"]}),(0,r.jsxs)(Z.Z,{children:[(0,r.jsxs)(tK.Z,{children:["Are you sure you want to delete ",(0,r.jsx)("strong",{children:null==n?void 0:n.name}),"?",h&&" This will delete all contents inside."," ","This action cannot be undone."]}),x&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(d.Z,{severity:"warning",sx:{mt:2},children:[(0,r.jsx)("strong",{children:null==n?void 0:n.name})," is a critical server ",h?"folder":"file",". Deleting it may break your server."]}),(0,r.jsx)(w.Z,{autoFocus:!0,fullWidth:!0,label:'Type "'.concat(null==n?void 0:n.name,'" to confirm'),value:c,onChange:e=>u(e.target.value),onKeyDown:e=>"Enter"===e.key&&m(),placeholder:null==n?void 0:n.name,sx:{mt:2},error:c.length>0&&c!==(null==n?void 0:n.name)})]})]}),(0,r.jsxs)(C.Z,{children:[(0,r.jsx)(o.Z,{onClick:i,children:"Cancel"}),(0,r.jsx)(o.Z,{onClick:m,color:"error",variant:"contained",disabled:a||!p,children:"Delete"})]})]})}let tQ=/[/\\]/,tG=/\.\./;function tJ(e){let t=e.lastIndexOf(".");return t>0?e.slice(t):""}function t_(e){let{target:t,existingNames:n,isPending:a,onConfirm:l,onClose:i}=e,[c,u]=(0,s.useState)("");(0,s.useEffect)(()=>{t&&u(t.name)},[t]);let x=(0,s.useMemo)(()=>c.trim()?tQ.test(c)?"Name cannot contain / or \\":tG.test(c)?'Name cannot contain ".."':c.startsWith(".")?'Name cannot start with "."':null:"Name cannot be empty",[c]),h=(0,s.useMemo)(()=>n.some(e=>e!==(null==t?void 0:t.name)&&e.toLowerCase()===c.trim().toLowerCase()),[c,null==t?void 0:t.name,n]),p=(0,s.useMemo)(()=>!!t&&"directory"!==t.type&&tJ(t.name)!==tJ(c),[t,c]),m=c.trim()===(null==t?void 0:t.name),y=!x&&!h&&!m&&!!c.trim(),f=(0,s.useCallback)(()=>{y&&l(c.trim())},[y,c,l]);return(0,r.jsxs)(j.Z,{open:!!t,onClose:i,maxWidth:"xs",fullWidth:!0,children:[(0,r.jsx)(b.Z,{children:"Rename"}),(0,r.jsxs)(Z.Z,{children:[(0,r.jsx)(w.Z,{autoFocus:!0,fullWidth:!0,label:"New name",value:c,onChange:e=>u(e.target.value),onKeyDown:e=>"Enter"===e.key&&f(),error:!!x||h,helperText:x||(h?'"'.concat(c.trim(),'" already exists'):void 0),sx:{mt:1}}),p&&!x&&!h&&(0,r.jsx)(d.Z,{severity:"warning",sx:{mt:2},children:"Changing the file extension may make the file unusable."})]}),(0,r.jsxs)(C.Z,{children:[(0,r.jsx)(o.Z,{onClick:i,children:"Cancel"}),(0,r.jsx)(o.Z,{onClick:f,variant:"contained",disabled:a||!y,children:"Rename"})]})]})}var t$=n(75946),tX=n(35847),tY=n(397),t0=n(61650),t1=n(73729),t2=n(41189);let t3={whitelist:{label:"Whitelist Manager",icon:(0,r.jsx)(tX.Z,{sx:{color:"primary.main"}})},ops:{label:"Operators Manager",icon:(0,r.jsx)(eU.Z,{sx:{color:"primary.main"}})},bans:{label:"Ban List Manager",icon:(0,r.jsx)(tY.Z,{sx:{color:"primary.main"}})}};function t6(e){let{serverName:t,editorType:n,filePath:s,onBack:a,onSwitchToRaw:l}=e,d=t3[n];return(0,r.jsxs)(h.Z,{sx:{borderRadius:3,display:"flex",flexDirection:"column",minHeight:600},children:[(0,r.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1,borderBottom:1,borderColor:"divider"},children:[(0,r.jsx)(c.Z,{size:"small",onClick:a,"aria-label":"back",children:(0,r.jsx)(R.Z,{})}),d.icon,(0,r.jsx)(m.Z,{variant:"subtitle1",sx:{fontWeight:600,flex:1},noWrap:!0,children:d.label}),s&&(0,r.jsx)(o.Z,{size:"small",startIcon:(0,r.jsx)(t$.Z,{}),onClick:()=>{a(),l(s)},children:"Raw View"})]}),(0,r.jsxs)(p.Z,{sx:{flex:1,overflow:"auto",p:{xs:1,sm:2},"&:last-child":{pb:2}},children:["whitelist"===n&&(0,r.jsx)(t0.Z,{serverName:t}),"ops"===n&&(0,r.jsx)(t1.d,{serverName:t}),"bans"===n&&(0,r.jsx)(t2.Z,{serverName:t})]})]})}var t4=n(22041),t5=n(72147),t8=n(66561),t7=n(12795),t9=n(96407),ne=n(90117),nt=n(8352);let nn={gameplay:{label:"Gameplay",description:"Game rules, player limits, and core mechanics"},world:{label:"World Generation",description:"World settings, level name, and generation options"},network:{label:"Network & Security",description:"Ports, authentication, RCON, and query settings"},performance:{label:"Performance",description:"View distance, tick settings, and compression"},advanced:{label:"Advanced",description:"Other server properties"}},nr=["gameplay","world","network","performance","advanced"],ns=[{key:"gamemode",type:"enum",category:"gameplay",label:"Game Mode",description:"Default game mode for new players",defaultValue:"survival",options:[{value:"survival",label:"Survival"},{value:"creative",label:"Creative"},{value:"adventure",label:"Adventure"},{value:"spectator",label:"Spectator"}]},{key:"difficulty",type:"enum",category:"gameplay",label:"Difficulty",description:"Server difficulty level",defaultValue:"easy",options:[{value:"peaceful",label:"Peaceful"},{value:"easy",label:"Easy"},{value:"normal",label:"Normal"},{value:"hard",label:"Hard"}]},{key:"hardcore",type:"boolean",category:"gameplay",label:"Hardcore",description:"Players are set to spectator mode on death",defaultValue:"false"},{key:"pvp",type:"boolean",category:"gameplay",label:"PvP",description:"Allow player vs player combat",defaultValue:"true"},{key:"max-players",type:"number",category:"gameplay",label:"Max Players",description:"Maximum number of players on the server",defaultValue:"20",min:0,max:2147483647},{key:"force-gamemode",type:"boolean",category:"gameplay",label:"Force Game Mode",description:"Force players to join in the default game mode",defaultValue:"false"},{key:"allow-flight",type:"boolean",category:"gameplay",label:"Allow Flight",description:"Allow players to use flight in survival mode",defaultValue:"false"},{key:"spawn-protection",type:"number",category:"gameplay",label:"Spawn Protection",description:"Radius of spawn protection area (0 = disabled)",defaultValue:"16",min:0,max:65536},{key:"spawn-animals",type:"boolean",category:"gameplay",label:"Spawn Animals",description:"Allow animals to spawn naturally",defaultValue:"true"},{key:"spawn-monsters",type:"boolean",category:"gameplay",label:"Spawn Monsters",description:"Allow hostile mobs to spawn naturally",defaultValue:"true"},{key:"spawn-npcs",type:"boolean",category:"gameplay",label:"Spawn NPCs",description:"Allow villagers to spawn",defaultValue:"true"},{key:"allow-nether",type:"boolean",category:"gameplay",label:"Allow Nether",description:"Allow players to travel to the Nether",defaultValue:"true"},{key:"enable-command-block",type:"boolean",category:"gameplay",label:"Enable Command Blocks",description:"Allow command blocks to be used",defaultValue:"false"},{key:"player-idle-timeout",type:"number",category:"gameplay",label:"Player Idle Timeout",description:"Kick idle players after N minutes (0 = disabled)",defaultValue:"0",min:0,max:2147483647},{key:"level-name",type:"string",category:"world",label:"Level Name",description:"Name of the world folder",defaultValue:"world"},{key:"level-seed",type:"string",category:"world",label:"Level Seed",description:"Seed for world generation (blank = random)",defaultValue:""},{key:"level-type",type:"enum",category:"world",label:"Level Type",description:"World generation type",defaultValue:"minecraft\\:normal",options:[{value:"minecraft\\:normal",label:"Normal"},{value:"minecraft\\:flat",label:"Flat"},{value:"minecraft\\:large_biomes",label:"Large Biomes"},{value:"minecraft\\:amplified",label:"Amplified"},{value:"minecraft\\:single_biome_surface",label:"Single Biome"}]},{key:"generate-structures",type:"boolean",category:"world",label:"Generate Structures",description:"Generate villages, temples, and other structures",defaultValue:"true"},{key:"max-world-size",type:"number",category:"world",label:"Max World Size",description:"Maximum world border radius in blocks",defaultValue:"29999984",min:1,max:29999984},{key:"generator-settings",type:"string",category:"world",label:"Generator Settings",description:"Custom world generator settings (JSON)",defaultValue:"{}"},{key:"motd",type:"string",category:"world",label:"MOTD",description:"Message displayed in the server list",defaultValue:"A Minecraft Server"},{key:"server-port",type:"readonly",category:"network",label:"Server Port",description:"Port the server listens on (cannot be changed at runtime)",defaultValue:"25565"},{key:"server-ip",type:"readonly",category:"network",label:"Server IP",description:"IP address to bind to (blank = all interfaces)",defaultValue:""},{key:"online-mode",type:"boolean",category:"network",label:"Online Mode",description:"Authenticate players with Mojang servers",defaultValue:"true"},{key:"white-list",type:"boolean",category:"network",label:"Whitelist",description:"Only allow whitelisted players to join",defaultValue:"false"},{key:"enforce-whitelist",type:"boolean",category:"network",label:"Enforce Whitelist",description:"Kick non-whitelisted players when whitelist is reloaded",defaultValue:"false"},{key:"enforce-secure-profile",type:"boolean",category:"network",label:"Enforce Secure Profile",description:"Require players to have a signed key from Mojang",defaultValue:"true"},{key:"enable-rcon",type:"boolean",category:"network",label:"Enable RCON",description:"Enable remote console access",defaultValue:"false"},{key:"rcon.port",type:"number",category:"network",label:"RCON Port",description:"Port for RCON connections",defaultValue:"25575",min:1,max:65535},{key:"rcon.password",type:"string",category:"network",label:"RCON Password",description:"Password for RCON authentication",defaultValue:""},{key:"enable-query",type:"boolean",category:"network",label:"Enable Query",description:"Enable GameSpy4 protocol server listener",defaultValue:"false"},{key:"query.port",type:"number",category:"network",label:"Query Port",description:"Port for query protocol",defaultValue:"25565",min:1,max:65535},{key:"enable-status",type:"boolean",category:"network",label:"Enable Status",description:"Show server in the server list",defaultValue:"true"},{key:"prevent-proxy-connections",type:"boolean",category:"network",label:"Prevent Proxy Connections",description:"Block VPN/proxy connections (requires online-mode)",defaultValue:"false"},{key:"hide-online-players",type:"boolean",category:"network",label:"Hide Online Players",description:"Hide player count and list in server status",defaultValue:"false"},{key:"view-distance",type:"number",category:"performance",label:"View Distance",description:"Render distance in chunks sent to players",defaultValue:"10",min:3,max:32},{key:"simulation-distance",type:"number",category:"performance",label:"Simulation Distance",description:"Distance in chunks for entity simulation",defaultValue:"10",min:3,max:32},{key:"max-tick-time",type:"number",category:"performance",label:"Max Tick Time",description:"Maximum tick duration before watchdog crash (ms, -1 = disabled)",defaultValue:"60000",min:-1,max:2147483647},{key:"network-compression-threshold",type:"number",category:"performance",label:"Network Compression Threshold",description:"Minimum packet size to compress (bytes, -1 = disabled)",defaultValue:"256",min:-1,max:2147483647},{key:"max-chained-neighbor-updates",type:"number",category:"performance",label:"Max Chained Neighbor Updates",description:"Limit for chained block updates (-1 = unlimited)",defaultValue:"1000000",min:-1,max:2147483647},{key:"rate-limit",type:"number",category:"performance",label:"Rate Limit",description:"Max packets per second before kick (0 = disabled)",defaultValue:"0",min:0,max:2147483647},{key:"entity-broadcast-range-percentage",type:"number",category:"performance",label:"Entity Broadcast Range",description:"Percentage of default entity visibility range",defaultValue:"100",min:10,max:1e3},{key:"resource-pack",type:"string",category:"advanced",label:"Resource Pack URL",description:"URL of the server resource pack",defaultValue:""},{key:"resource-pack-sha1",type:"string",category:"advanced",label:"Resource Pack SHA1",description:"SHA1 hash of the resource pack file",defaultValue:""},{key:"require-resource-pack",type:"boolean",category:"advanced",label:"Require Resource Pack",description:"Kick players who decline the resource pack",defaultValue:"false"},{key:"resource-pack-prompt",type:"string",category:"advanced",label:"Resource Pack Prompt",description:"Custom message shown when asking to download resource pack",defaultValue:""},{key:"function-permission-level",type:"enum",category:"advanced",label:"Function Permission Level",description:"OP level required to execute functions",defaultValue:"2",options:[{value:"1",label:"Level 1 - Moderator"},{value:"2",label:"Level 2 - Gamemaster"},{value:"3",label:"Level 3 - Admin"},{value:"4",label:"Level 4 - Owner"}]},{key:"op-permission-level",type:"enum",category:"advanced",label:"OP Permission Level",description:"Default OP level for new operators",defaultValue:"4",options:[{value:"1",label:"Level 1 - Moderator"},{value:"2",label:"Level 2 - Gamemaster"},{value:"3",label:"Level 3 - Admin"},{value:"4",label:"Level 4 - Owner"}]},{key:"text-filtering-config",type:"string",category:"advanced",label:"Text Filtering Config",description:"Text filtering configuration file",defaultValue:""},{key:"log-ips",type:"boolean",category:"advanced",label:"Log IPs",description:"Log player IP addresses in the server log",defaultValue:"true"},{key:"broadcast-console-to-ops",type:"boolean",category:"advanced",label:"Broadcast Console to OPs",description:"Send console output to all OPs",defaultValue:"true"},{key:"broadcast-rcon-to-ops",type:"boolean",category:"advanced",label:"Broadcast RCON to OPs",description:"Send RCON output to all OPs",defaultValue:"true"},{key:"sync-chunk-writes",type:"boolean",category:"advanced",label:"Sync Chunk Writes",description:"Synchronize chunk writes for data safety",defaultValue:"true"},{key:"enable-jmx-monitoring",type:"boolean",category:"advanced",label:"Enable JMX Monitoring",description:"Expose JMX metrics for monitoring",defaultValue:"false"},{key:"use-native-transport",type:"boolean",category:"advanced",label:"Use Native Transport",description:"Use Linux-specific packet optimizations",defaultValue:"true"},{key:"initial-enabled-packs",type:"string",category:"advanced",label:"Initial Enabled Packs",description:"Comma-separated list of initially enabled data packs",defaultValue:"vanilla"},{key:"initial-disabled-packs",type:"string",category:"advanced",label:"Initial Disabled Packs",description:"Comma-separated list of initially disabled data packs",defaultValue:""}];ns.map(e=>[e.key,e]);let na=(0,r.jsx)(D.Z,{label:"modified",size:"small",color:"warning",variant:"outlined"});function nl(e){let{schema:t,value:n,onChange:s,isChanged:a}=e,l=a?{"& .MuiInputBase-root":{bgcolor:"action.selected"}}:void 0,o=a?(0,r.jsx)(N.Z,{position:"end",children:na}):void 0;switch(t.type){case"boolean":return(0,r.jsxs)(i.Z,{children:[(0,r.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,r.jsx)(eb.Z,{control:(0,r.jsx)(eZ.Z,{checked:"true"===n,onChange:e=>s(t.key,e.target.checked?"true":"false"),size:"small"}),label:t.label,sx:{mr:0}}),a&&na]}),(0,r.jsx)(m.Z,{variant:"caption",color:"text.secondary",sx:{ml:"48px",display:"block",mt:-.5},children:t.description})]});case"enum":var c;return(0,r.jsx)(w.Z,{select:!0,fullWidth:!0,size:"small",label:t.label,helperText:t.description,value:n,onChange:e=>s(t.key,e.target.value),InputProps:{endAdornment:o},sx:l,children:null===(c=t.options)||void 0===c?void 0:c.map(e=>(0,r.jsx)(f.Z,{value:e.value,children:e.label},e.value))});case"number":return(0,r.jsx)(w.Z,{fullWidth:!0,size:"small",type:"number",label:t.label,helperText:t.description,value:n,onChange:e=>s(t.key,e.target.value),inputProps:{min:t.min,max:t.max},InputProps:{endAdornment:o},sx:l});case"readonly":return(0,r.jsx)(w.Z,{fullWidth:!0,size:"small",label:t.label,helperText:t.description,value:n,disabled:!0,InputProps:{endAdornment:(0,r.jsx)(N.Z,{position:"end",children:(0,r.jsx)(D.Z,{label:"readonly",size:"small",variant:"outlined"})})}});default:return(0,r.jsx)(w.Z,{fullWidth:!0,size:"small",label:t.label,helperText:t.description,value:n,onChange:e=>s(t.key,e.target.value),InputProps:{endAdornment:o},sx:l})}}function ni(e){let{serverName:t}=e,n="/server.properties",{data:a,isLoading:l,error:c}=tn(t,n),x=tr(t),[h,p]=(0,s.useState)({}),[y,f]=(0,s.useState)({}),[v,g]=(0,s.useState)("");(0,s.useEffect)(()=>{if(!(null==a?void 0:a.content))return;let e=function(e){let t={};for(let n of e.split("\n")){let e=n.trim();if(!e||e.startsWith("#"))continue;let r=e.indexOf("=");if(-1===r)continue;let s=e.substring(0,r).trim(),a=e.substring(r+1).trim();t[s]=a}return t}(a.content);p(e),f(e),x.reset()},[a]);let j=(0,s.useCallback)((e,t)=>{p(n=>({...n,[e]:t}))},[]),b=(0,s.useMemo)(()=>{let e=[];for(let t of Object.keys(h))h[t]!==y[t]&&e.push(t);return e},[h,y]),Z=(0,s.useCallback)(()=>{if(!(null==a?void 0:a.content))return;let e=function(e,t){let n=e.split("\n"),r=new Set,s=n.map(e=>{let n=e.trim();if(!n||n.startsWith("#"))return e;let s=n.indexOf("=");if(-1===s)return e;let a=n.substring(0,s).trim();return(r.add(a),a in t)?"".concat(a,"=").concat(t[a]):e});for(let[e,n]of Object.entries(t))r.has(e)||s.push("".concat(e,"=").concat(n));return s.join("\n")}(a.content,h);x.mutate({path:n,content:e},{onSuccess:()=>{f({...h})}})},[a,h,x]),C=(0,s.useCallback)(()=>{p({...y})},[y]),S=(0,s.useMemo)(()=>{let e=v.toLowerCase(),t={gameplay:[],world:[],network:[],performance:[],advanced:[]};for(let n of ns)(!e||n.key.toLowerCase().includes(e)||n.label.toLowerCase().includes(e)||n.description.toLowerCase().includes(e))&&t[n.category].push(n);let n=new Set(ns.map(e=>e.key));for(let r of Object.keys(h))!n.has(r)&&(!e||r.toLowerCase().includes(e))&&t.advanced.push({key:r,type:"string",category:"advanced",label:r,description:"Custom property (not in standard schema)",defaultValue:""});return t},[v,h]);return l?(0,r.jsx)(i.Z,{sx:{display:"flex",justifyContent:"center",alignItems:"center",py:8},children:(0,r.jsx)(u.Z,{})}):c?(0,r.jsxs)(d.Z,{severity:"error",sx:{m:2},children:["Failed to load server.properties: ",c.message]}):(0,r.jsxs)(i.Z,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[(0,r.jsx)(d.Z,{severity:"warning",icon:(0,r.jsx)(nt.Z,{}),sx:{mx:2,mt:2,mb:1},children:(0,r.jsxs)(m.Z,{variant:"body2",children:[(0,r.jsx)("strong",{children:"Warning:"})," Changes are applied directly to the running server file. For persistent settings that survive server recreation, use the ",(0,r.jsx)("strong",{children:"Options"})," tab."]})}),(0,r.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1},children:[(0,r.jsx)(w.Z,{size:"small",placeholder:"Search properties...",value:v,onChange:e=>g(e.target.value),InputProps:{startAdornment:(0,r.jsx)(N.Z,{position:"start",children:(0,r.jsx)(e7.Z,{fontSize:"small"})})},sx:{flex:1,maxWidth:400}}),(0,r.jsx)(i.Z,{sx:{flex:1}}),b.length>0&&(0,r.jsx)(D.Z,{label:"".concat(b.length," changed"),color:"warning",size:"small"}),(0,r.jsx)(o.Z,{size:"small",startIcon:(0,r.jsx)(ne.Z,{}),onClick:C,disabled:0===b.length,children:"Discard"}),(0,r.jsx)(o.Z,{size:"small",variant:"contained",startIcon:x.isPending?(0,r.jsx)(u.Z,{size:16,color:"inherit"}):(0,r.jsx)(ey.Z,{}),onClick:Z,disabled:0===b.length||x.isPending,children:"Save"})]}),x.isError&&(0,r.jsxs)(d.Z,{severity:"error",sx:{mx:2,mb:1},children:["Failed to save: ",x.error.message]}),x.isSuccess&&0===b.length&&(0,r.jsx)(d.Z,{severity:"success",sx:{mx:2,mb:1},children:"File saved successfully."}),(0,r.jsx)(i.Z,{sx:{flex:1,overflow:"auto",px:2,pb:2},children:nr.map(e=>{let t=S[e];if(0===t.length)return null;let n=nn[e],s=t.filter(e=>b.includes(e.key)).length;return(0,r.jsxs)(t8.Z,{defaultExpanded:"advanced"!==e,disableGutters:!0,children:[(0,r.jsx)(t7.Z,{expandIcon:(0,r.jsx)(ej.Z,{}),children:(0,r.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:1,width:"100%"},children:[(0,r.jsx)(m.Z,{variant:"subtitle1",sx:{fontWeight:600},children:n.label}),(0,r.jsxs)(m.Z,{variant:"caption",color:"text.secondary",children:["(",t.length,")"]}),s>0&&(0,r.jsx)(D.Z,{label:"".concat(s," modified"),size:"small",color:"warning",variant:"outlined"})]})}),(0,r.jsxs)(t9.Z,{children:[(0,r.jsx)(m.Z,{variant:"body2",color:"text.secondary",sx:{mb:2},children:n.description}),(0,r.jsx)(k.ZP,{container:!0,spacing:2,children:t.map(e=>{var t;let n=null!==(t=h[e.key])&&void 0!==t?t:e.defaultValue,s=b.includes(e.key);return(0,r.jsx)(k.ZP,{item:!0,xs:12,sm:"boolean"===e.type?6:12,children:(0,r.jsx)(nl,{schema:e,value:n,onChange:j,isChanged:s})},e.key)})})]})]},e)})})]})}let no=(0,s.forwardRef)(function(e,t){let{serverName:n,filePath:a,onDirtyChange:l}=e,o=(0,s.useRef)(null),c=(0,s.useRef)(null),[x,h]=(0,s.useState)(!1),[p,m]=(0,s.useState)({line:1,col:1}),{data:y,isLoading:f,error:v}=tn(n,a),g=tr(n),j=(0,s.useCallback)(()=>{if(!c.current)return;let e=c.current.state.doc.toString();g.mutate({path:a,content:e},{onSuccess:()=>{h(!1),l(!1)}})},[a,g,l]);return((0,s.useImperativeHandle)(t,()=>({save:j,isDirty:()=>x}),[j,x]),(0,s.useEffect)(()=>{l(x)},[x,l]),(0,s.useEffect)(()=>{if(!o.current||!y)return;c.current&&(c.current.destroy(),c.current=null);let e=tW.$f.of([{key:"Mod-s",run:()=>(setTimeout(()=>{if(!c.current)return;let e=c.current.state.doc.toString();g.mutate({path:a,content:e},{onSuccess:()=>{h(!1),l(!1)}})},0),!0),preventDefault:!0}]),t=tW.tk.updateListener.of(e=>{if(e.docChanged&&h(!0),e.selectionSet||e.docChanged){let t=e.state.selection.main.head,n=e.state.doc.lineAt(t);m({line:n.number,col:t-n.from+1})}}),n=tO.yy.create({doc:y.content,extensions:[(0,tW.Eu)(),(0,tW.ZO)(),(0,tW.AE)(),(0,tD.m8)(),(0,tN.mi)(),(0,tW.Uw)(),(0,tW.Zs)(),(0,tN.nY)(),(0,tN.n$)(),(0,tA.sW)(),(0,tN.nF)(tN.R_,{fallback:!0}),tq.vk,e,tW.$f.of([...tD.wQ,...tD.f$,...tA.Lp,tD.oc]),t,tW.tk.lineWrapping,tW.tk.theme({"&":{height:"100%",fontSize:"13px"},".cm-scroller":{overflow:"auto"},".cm-content":{fontFamily:'"Fira Code", "Cascadia Code", "JetBrains Mono", "Consolas", monospace'},".cm-gutters":{fontFamily:'"Fira Code", "Cascadia Code", "JetBrains Mono", "Consolas", monospace'}})]}),r=new tW.tk({state:n,parent:o.current});return c.current=r,()=>{r.destroy(),c.current=null}},[y,a]),f)?(0,r.jsx)(i.Z,{sx:{display:"flex",justifyContent:"center",alignItems:"center",flex:1},children:(0,r.jsx)(u.Z,{})}):v?(0,r.jsxs)(d.Z,{severity:"error",sx:{m:2},children:["Failed to load file: ",v.message]}):(0,r.jsxs)(i.Z,{sx:{display:"flex",flexDirection:"column",flex:1,overflow:"hidden"},children:[g.isError&&(0,r.jsxs)(d.Z,{severity:"error",sx:{mx:2,mt:1},children:["Failed to save: ",g.error.message]}),g.isSuccess&&!x&&(0,r.jsx)(d.Z,{severity:"success",sx:{mx:2,mt:1},children:"File saved successfully."}),y&&(0,r.jsx)(i.Z,{ref:o,sx:{flex:1,overflow:"hidden"}}),y&&(0,r.jsx)(tU,{language:"Properties",fileSize:y.size,line:p.line,col:p.col,dirty:x})]})});function nc(e){let{serverName:t,onBack:n}=e,[a,l]=(0,s.useState)("form"),[d,u]=(0,s.useState)(!1),[x,y]=(0,s.useState)(null),f=(0,s.useRef)(null),v=(0,s.useCallback)((e,t)=>{t&&t!==a&&("raw"===a&&d?y("form"):l(t))},[a,d]),g=(0,s.useCallback)(()=>{"raw"===a&&d?y("back"):n()},[a,d,n]),b=(0,s.useCallback)(()=>{y(null),u(!1),"back"===x?n():"form"===x&&l("form")},[x,n]),Z=(0,s.useCallback)(()=>{var e;null===(e=f.current)||void 0===e||e.save()},[]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(h.Z,{sx:{borderRadius:3,display:"flex",flexDirection:"column",minHeight:600},children:[(0,r.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1,borderBottom:1,borderColor:"divider"},children:[(0,r.jsx)(c.Z,{size:"small",onClick:g,"aria-label":"back",children:(0,r.jsx)(R.Z,{})}),(0,r.jsx)(t4.Z,{sx:{color:"primary.main"}}),(0,r.jsx)(m.Z,{variant:"subtitle1",sx:{fontWeight:600,flex:1},noWrap:!0,children:"server.properties"}),(0,r.jsxs)(et.Z,{value:a,exclusive:!0,onChange:v,size:"small",children:[(0,r.jsxs)(ee.Z,{value:"form",children:[(0,r.jsx)(t5.Z,{fontSize:"small",sx:{mr:.5}}),"Form"]}),(0,r.jsxs)(ee.Z,{value:"raw",children:[(0,r.jsx)(t$.Z,{fontSize:"small",sx:{mr:.5}}),"Raw"]})]}),"raw"===a&&(0,r.jsx)(o.Z,{size:"small",variant:"contained",startIcon:(0,r.jsx)(ey.Z,{}),onClick:Z,disabled:!d,children:"Save"})]}),(0,r.jsx)(p.Z,{sx:{flex:1,overflow:"auto",p:0,"&:last-child":{pb:0}},children:"form"===a?(0,r.jsx)(ni,{serverName:t}):(0,r.jsx)(i.Z,{sx:{display:"flex",flexDirection:"column",height:"100%",minHeight:500},children:(0,r.jsx)(no,{ref:f,serverName:t,filePath:"/server.properties",onDirtyChange:u})})})]}),(0,r.jsx)(j.Z,{open:null!==x,onClose:()=>y(null),maxWidth:"xs",fullWidth:!0,children:(0,r.jsxs)(i.Z,{sx:{p:3},children:[(0,r.jsx)(m.Z,{variant:"h6",gutterBottom:!0,children:"Unsaved Changes"}),(0,r.jsx)(m.Z,{variant:"body2",color:"text.secondary",sx:{mb:3},children:"You have unsaved changes in the raw editor. Do you want to discard them?"}),(0,r.jsxs)(i.Z,{sx:{display:"flex",justifyContent:"flex-end",gap:1},children:[(0,r.jsx)(o.Z,{onClick:()=>y(null),children:"Cancel"}),(0,r.jsx)(o.Z,{onClick:b,color:"error",variant:"contained",children:"Discard"})]})]})})]})}var nd=n(91606);function nu(e){return e<1024?"".concat(e," B"):e<1048576?"".concat((e/1024).toFixed(1)," KB"):e<1073741824?"".concat((e/1024/1024).toFixed(1)," MB"):"".concat((e/1024/1024/1024).toFixed(1)," GB")}function nx(e){let{open:t,isPending:n,onUpload:a,onClose:l}=e,[u,x]=(0,s.useState)([]),[h,p]=(0,s.useState)(!1),y=(0,s.useRef)(null);(0,s.useEffect)(()=>{t&&(x([]),p(!1))},[t]);let f=u.filter(e=>e.size>104857600),w=(0,s.useCallback)(e=>{let t=Array.from(e);x(e=>{let n=new Set(e.map(e=>e.name));return[...e,...t.filter(e=>!n.has(e.name))]})},[]),k=(0,s.useCallback)(e=>{x(t=>t.filter(t=>t.name!==e))},[]),S=(0,s.useCallback)(e=>{e.preventDefault(),p(!1),e.dataTransfer.files.length&&w(e.dataTransfer.files)},[w]),R=(0,s.useCallback)(()=>{u.length>0&&0===f.length&&a(u)},[u,f,a]),P=(0,s.useCallback)(()=>{n||(x([]),l())},[n,l]);return(0,r.jsxs)(j.Z,{open:t,onClose:P,maxWidth:"sm",fullWidth:!0,children:[(0,r.jsx)(b.Z,{children:"Upload Files"}),(0,r.jsxs)(Z.Z,{children:[(0,r.jsxs)(i.Z,{onDragOver:e=>{e.preventDefault(),p(!0)},onDragLeave:()=>p(!1),onDrop:S,onClick:()=>{var e;return null===(e=y.current)||void 0===e?void 0:e.click()},sx:{border:"2px dashed",borderColor:h?"primary.main":"divider",borderRadius:2,p:4,textAlign:"center",cursor:"pointer",bgcolor:h?"action.hover":"transparent",transition:"all 0.2s","&:hover":{borderColor:"primary.main",bgcolor:"action.hover"}},children:[(0,r.jsx)(nd.Z,{sx:{fontSize:48,color:"text.secondary",mb:1}}),(0,r.jsx)(m.Z,{variant:"body1",color:"text.secondary",children:"Drag & drop files here, or click to browse"}),(0,r.jsxs)(m.Z,{variant:"caption",color:"text.secondary",children:["Max ",nu(104857600)," per file"]})]}),(0,r.jsx)("input",{ref:y,type:"file",multiple:!0,hidden:!0,onChange:e=>{var t;(null===(t=e.target.files)||void 0===t?void 0:t.length)&&(w(e.target.files),e.target.value="")}}),u.length>0&&(0,r.jsx)(eT.Z,{dense:!0,sx:{mt:2},children:u.map(e=>(0,r.jsxs)(eI.ZP,{secondaryAction:(0,r.jsx)(c.Z,{edge:"end",size:"small",onClick:()=>k(e.name),disabled:n,children:(0,r.jsx)(I.Z,{fontSize:"small"})}),children:[(0,r.jsx)(v.Z,{children:(0,r.jsx)(tZ.Z,{})}),(0,r.jsx)(g.Z,{primary:e.name,secondary:nu(e.size),primaryTypographyProps:{noWrap:!0,color:e.size>104857600?"error":"text.primary"}})]},e.name))}),f.length>0&&(0,r.jsx)(d.Z,{severity:"error",sx:{mt:1},children:1===f.length?'"'.concat(f[0].name,'" exceeds the ').concat(nu(104857600)," limit"):"".concat(f.length," files exceed the ").concat(nu(104857600)," limit")}),n&&(0,r.jsx)(Q.Z,{sx:{mt:2}})]}),(0,r.jsxs)(C.Z,{children:[(0,r.jsx)(o.Z,{onClick:P,disabled:n,children:"Cancel"}),(0,r.jsxs)(o.Z,{onClick:R,variant:"contained",startIcon:(0,r.jsx)(nd.Z,{}),disabled:n||0===u.length||f.length>0,children:["Upload ",u.length>0?"(".concat(u.length,")"):""]})]})]})}function nh(e){let{serverName:t}=e,[n,a]=(0,s.useState)("/"),[l,i]=(0,s.useState)(""),[o,c]=(0,s.useState)({open:!1,message:"",severity:"info"}),[u,m]=(0,s.useState)(null),[y,f]=(0,s.useState)(null),[v,g]=(0,s.useState)(null),[j,b]=(0,s.useState)(null),[Z,C]=(0,s.useState)(null),[w,k]=(0,s.useState)(null),[S,R]=(0,s.useState)(!1),{data:P,isLoading:T,error:I,refetch:F}=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/";return(0,eX.a)({queryKey:["servers",e,"files",t],queryFn:()=>{let n=new URLSearchParams({path:t});return(0,e1.SC)("/api/servers/".concat(encodeURIComponent(e),"/files?").concat(n))},enabled:!!e})}(t,n),z=function(e){let t=(0,eY.NL)();return(0,e0.D)({mutationFn:t=>{let{path:n}=t,r=new URLSearchParams({path:n});return(0,e1.SC)("/api/servers/".concat(encodeURIComponent(e),"/files?").concat(r),{method:"DELETE"})},onSuccess:()=>{t.invalidateQueries({queryKey:["servers",e,"files"]})}})}(t),W=function(e){let t=(0,eY.NL)();return(0,e0.D)({mutationFn:t=>{let{path:n}=t,r=new URLSearchParams({path:n});return(0,e1.SC)("/api/servers/".concat(encodeURIComponent(e),"/files/mkdir?").concat(r),{method:"POST"})},onSuccess:()=>{t.invalidateQueries({queryKey:["servers",e,"files"]})}})}(t),O=function(e){let t=(0,eY.NL)();return(0,e0.D)({mutationFn:t=>{let{oldPath:n,newPath:r}=t;return(0,e1.SC)("/api/servers/".concat(encodeURIComponent(e),"/files/rename"),{method:"POST",body:JSON.stringify({oldPath:n,newPath:r})})},onSuccess:()=>{t.invalidateQueries({queryKey:["servers",e,"files"]})}})}(t),D=function(e){let t=(0,eY.NL)();return(0,e0.D)({mutationFn:async t=>{let{path:n,files:r}=t,s=new FormData;for(let e of r)s.append("files",e);let a=new URLSearchParams({path:n}),l=await fetch("/api/servers/".concat(encodeURIComponent(e),"/files/upload?").concat(a),{method:"POST",body:s});if(!l.ok){let e=await l.json().catch(()=>({error:"UnknownError",message:l.statusText})),t=Error(e.message);throw t.statusCode=l.status,t.code=e.error,t}return l.json()},onSuccess:()=>{t.invalidateQueries({queryKey:["servers",e,"files"]})}})}(t),N=(0,s.useCallback)(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"success";c({open:!0,message:e,severity:t})},[]),A=(0,s.useCallback)(e=>{a(e),i("")},[]),M=(0,s.useCallback)(e=>{let t="/"===n?"/".concat(e):"".concat(n,"/").concat(e);W.mutate({path:t},{onSuccess:()=>N('Folder "'.concat(e,'" created')),onError:e=>N(e.message,"error")})},[n,W,N]),E=(0,s.useCallback)((e,r)=>{switch(e){case"delete":m(r);break;case"rename":f(r);break;case"download":!function(e,t){let n=new URLSearchParams({path:t}),r="/api/servers/".concat(encodeURIComponent(e),"/files/download?").concat(n),s=document.createElement("a");s.href=r,s.download="",document.body.appendChild(s),s.click(),document.body.removeChild(s)}(t,"/"===n?"/".concat(r.name):"".concat(n,"/").concat(r.name));break;case"open":{let e="/"===n?"/".concat(r.name):"".concat(n,"/").concat(r.name);if("/"===n&&"server.properties"===r.name)k(e);else{let t="/"===n?function(e){switch(e){case"whitelist.json":return"whitelist";case"ops.json":return"ops";case"banned-players.json":return"bans";default:return null}}(r.name):null;t?(b(t),C(e)):g(e)}}}},[n,t]),L=(0,s.useCallback)(e=>{D.mutate({path:n,files:e},{onSuccess:e=>{N("".concat(e.files.length," file(s) uploaded")),R(!1)},onError:e=>{N(e.message,"error")}})},[n,D,N]),q=(0,s.useCallback)(()=>{if(!u)return;let e="/"===n?"/".concat(u.name):"".concat(n,"/").concat(u.name);z.mutate({path:e},{onSuccess:()=>{N('"'.concat(u.name,'" deleted')),m(null)},onError:e=>{N(e.message,"error"),m(null)}})},[u,n,z,N]),U=(0,s.useCallback)(e=>{if(!y)return;let t="/"===n?"/".concat(y.name):"".concat(n,"/").concat(y.name),r="/"===n?"/".concat(e):"".concat(n,"/").concat(e);O.mutate({oldPath:t,newPath:r},{onSuccess:()=>{N('Renamed to "'.concat(e,'"')),f(null)},onError:e=>{N(e.message,"error"),f(null)}})},[y,n,O,N]),B=(0,s.useMemo)(()=>((null==P?void 0:P.files)||[]).map(e=>e.name),[null==P?void 0:P.files]);return T?(0,r.jsx)(h.Z,{sx:{borderRadius:3},children:(0,r.jsxs)(p.Z,{children:[(0,r.jsx)(x.Z,{variant:"text",width:300,height:32,sx:{mb:2}}),(0,r.jsx)(x.Z,{variant:"rectangular",height:40,sx:{mb:2}}),[1,2,3,4,5].map(e=>(0,r.jsx)(x.Z,{variant:"rectangular",height:48,sx:{mb:.5}},e))]})}):I?(0,r.jsxs)(d.Z,{severity:"error",sx:{borderRadius:3},children:["Failed to load files: ",I.message]}):w?(0,r.jsx)(nc,{serverName:t,onBack:()=>k(null)}):v?(0,r.jsx)(tB,{serverName:t,filePath:v,onBack:()=>g(null)}):j?(0,r.jsx)(t6,{serverName:t,editorType:j,filePath:Z,onBack:()=>{b(null),C(null)},onSwitchToRaw:e=>{b(null),C(null),g(e)}}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(h.Z,{sx:{borderRadius:3},children:(0,r.jsxs)(p.Z,{children:[(0,r.jsx)(ti,{path:n,onNavigate:A}),(0,r.jsx)(tp,{searchQuery:l,onSearchChange:i,onCreateFolder:M,onUpload:()=>R(!0),onRefresh:()=>F(),existingNames:B,disabled:W.isPending}),(0,r.jsx)(tz,{files:(null==P?void 0:P.files)||[],currentPath:n,onNavigate:A,onFileAction:E,searchQuery:l})]})}),(0,r.jsx)(tH,{target:u,isPending:z.isPending,onConfirm:q,onClose:()=>m(null)}),(0,r.jsx)(t_,{target:y,existingNames:B,isPending:O.isPending,onConfirm:U,onClose:()=>f(null)}),(0,r.jsx)(nx,{open:S,isPending:D.isPending,onUpload:L,onClose:()=>R(!1)}),(0,r.jsx)(eo.Z,{open:o.open,autoHideDuration:4e3,onClose:()=>c(e=>({...e,open:!1})),anchorOrigin:{vertical:"bottom",horizontal:"center"},children:(0,r.jsx)(d.Z,{onClose:()=>c(e=>({...e,open:!1})),severity:o.severity,variant:"filled",children:o.message})})]})}let np=["Overview","Activity","Mods","Files","Backups","Access","Options"];function nm(e){return e.replace(/\x1b\[\?[\d;]*[a-zA-Z]/g,"").replace(/\x1b\[[0-9;]*[a-zA-Z]/g,"").replace(/\x1b=/g,"").replace(/\[\?[\d;]*[a-zA-Z]/g,"").replace(/\[[0-9;]*[a-zA-Z]/g,"").replace(/\[m/g,"").replace(/>\.\.\.\.\r?/g,"").replace(/\r/g,"").trim()}function ny(e){var t,n,a,l,d;let{server:u,onSendCommand:x}=e,[y,f]=(0,s.useState)("Overview"),[v,g]=(0,s.useState)(""),[b,C]=(0,s.useState)(!0),[R,P]=(0,s.useState)(!1),T=(0,s.useRef)(null),I=(0,M.Z)(),F=(0,E.Z)(I.breakpoints.down("sm"));(0,s.useEffect)(()=>{"Overview"!==y&&P(!1)},[y]);let{logs:z,isConnected:W}=(0,J.Y)({serverName:u.name}),O=(0,s.useMemo)(()=>z.filter(e=>!e.includes("RCON Listener")&&!e.includes("RCON Client")&&!e.includes("RconClient")),[z]);(0,s.useEffect)(()=>{T.current&&b&&(T.current.scrollTop=T.current.scrollHeight)},[O,b]);let Q=async()=>{v.trim()&&x&&(await x(v.trim()),g(""))},$=null!==(l=null===(t=u.stats)||void 0===t?void 0:t.cpuPercent)&&void 0!==l?l:0;(null===(n=u.stats)||void 0===n?void 0:n.memoryUsage)&&u.stats.memoryUsage,function(e){if(!e)return;let t=e.match(/^(\d+)\s*(M|G)?$/i);if(t)parseInt(t[1],10),(t[2]||"M").toUpperCase()}(u.memory);let X=null!==(d=null===(a=u.stats)||void 0===a?void 0:a.memoryPercent)&&void 0!==d?d:0;return(0,r.jsxs)(i.Z,{children:[(0,r.jsx)(i.Z,{sx:{display:"flex",flexWrap:"wrap",gap:.5,mb:3},children:np.map(e=>(0,r.jsx)(o.Z,{onClick:()=>f(e),sx:{px:2,py:1,borderRadius:5,fontSize:14,fontWeight:500,textTransform:"none",bgcolor:y===e?"primary.main":"transparent",color:y===e?"#0a0e14":"text.secondary","&:hover":{bgcolor:y===e?"primary.main":(0,S.Fq)("#1bd96a",.1)}},children:e},e))}),(0,r.jsxs)(i.Z,{sx:{display:"grid",gridTemplateColumns:{xs:"1fr",sm:"repeat(3, 1fr)"},gap:2,mb:2.5},children:[(0,r.jsx)(G,{value:"".concat($.toFixed(2),"%"),unit:"/ 100%",label:"CPU usage",icon:(0,r.jsx)(q.Z,{sx:{fontSize:28}}),progress:$,progressMax:100,color:"#1bd96a"}),(0,r.jsx)(G,{value:"".concat(X.toFixed(2),"%"),unit:"/ 100%",label:"Memory usage",icon:(0,r.jsx)(U.Z,{sx:{fontSize:28}}),progress:X,progressMax:100,color:"#1bd96a"}),(0,r.jsx)(G,{value:u.worldSize||"0 B",unit:"/ 10 GB",label:"World size",icon:(0,r.jsx)(B.Z,{sx:{fontSize:28}}),progress:function(e){if(!e)return 0;let t=e.match(/^([\d.]+)\s*(B|KB|MB|MiB|GB|GiB)?$/i);if(!t)return 0;let n=parseFloat(t[1]);switch((t[2]||"B").toUpperCase()){case"GB":case"GIB":return 1024*n;case"MB":case"MIB":return n;case"KB":return n/1024;default:return n/1048576}}(u.worldSize),progressMax:10240,color:"#1bd96a"})]}),"Overview"===y&&(0,r.jsxs)(h.Z,{sx:{bgcolor:"background.paper",borderRadius:3,border:"1px solid",borderColor:"divider",overflow:"hidden"},children:[(0,r.jsxs)(i.Z,{sx:{px:3,py:2,borderBottom:"1px solid",borderColor:"divider",display:"flex",alignItems:"center",gap:1.25},children:[(0,r.jsx)(m.Z,{variant:"h6",sx:{fontWeight:700,color:"text.primary"},children:"Console"}),(0,r.jsx)(i.Z,{sx:{width:10,height:10,borderRadius:"50%",bgcolor:W?"primary.main":"error.main",boxShadow:W?"0 0 8px rgba(27, 217, 106, 0.4)":"0 0 8px rgba(239, 68, 68, 0.4)"}})]}),(0,r.jsxs)(i.Z,{sx:{position:"relative"},children:[(0,r.jsx)(i.Z,{ref:T,onScroll:()=>{if(!T.current)return;let{scrollTop:e,scrollHeight:t,clientHeight:n}=T.current;C(t-e-n<30)},sx:{height:{xs:240,sm:360},overflowY:"auto",px:2.5,py:2,fontSize:13,lineHeight:1.85,color:"#b4b6c4",bgcolor:"#0a0a0a",scrollbarWidth:"thin",scrollbarColor:"#3a3d4e #0a0a0a","&::-webkit-scrollbar":{width:8},"&::-webkit-scrollbar-track":{bgcolor:"#0a0a0a"},"&::-webkit-scrollbar-thumb":{bgcolor:"#3a3d4e",borderRadius:4}},children:0===O.length?(0,r.jsx)(m.Z,{sx:{color:"text.secondary",textAlign:"center",py:8},children:"Waiting for logs..."}):O.map((e,t)=>{let n=function(e){let t=nm(e).match(/\[(\d{2}:\d{2}:\d{2})\]\s*\[([^/]+)\/(\w+)\]:\s*(.+)/);return t?{time:t[1],thread:t[2],level:t[3]||"INFO",msg:t[4]}:null}(e);return n?(0,r.jsxs)(i.Z,{sx:{display:"flex",gap:0,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:[(0,r.jsxs)(i.Z,{component:"span",sx:{color:"#4a4d60"},children:["[",n.time,"]"]}),(0,r.jsxs)(i.Z,{component:"span",sx:{color:"#4a4d60"},children:["\xa0[",n.thread,"/",(0,r.jsx)(i.Z,{component:"span",sx:{color:"WARN"===n.level?"#e8a848":"#6b6e80"},children:n.level}),"]:\xa0"]}),(0,r.jsx)(i.Z,{component:"span",sx:{color:"WARN"===n.level?"#c4a45a":"#b4b6c4"},children:n.msg})]},t):(0,r.jsx)(i.Z,{sx:{color:"#b4b6c4"},children:nm(e)},t)})}),(0,r.jsx)(c.Z,{onClick:()=>P(!0),sx:{position:"absolute",top:12,right:12,width:36,height:36,borderRadius:2,bgcolor:"#282a3a",border:"1px solid #3a3d4e",color:"#8b8da0","&:hover":{bgcolor:"#313440"}},children:(0,r.jsx)(K.Z,{sx:{fontSize:18}})}),!b&&(0,r.jsx)(c.Z,{onClick:()=>{T.current&&T.current.scrollTo({top:T.current.scrollHeight,behavior:"smooth"})},sx:{position:"absolute",bottom:12,right:12,width:36,height:36,borderRadius:2,bgcolor:"#282a3a",border:"1px solid #3a3d4e",color:"#8b8da0","&:hover":{bgcolor:"#313440"}},children:(0,r.jsx)(V.Z,{sx:{fontSize:18}})})]}),(0,r.jsx)(i.Z,{sx:{px:2.5,py:1.5,borderTop:"1px solid",borderColor:"divider"},children:(0,r.jsx)(w.Z,{fullWidth:!0,size:"small",placeholder:"Send a command",value:v,onChange:e=>g(e.target.value),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),Q())},disabled:!W,InputProps:{startAdornment:(0,r.jsx)(N.Z,{position:"start",children:(0,r.jsx)(H.Z,{sx:{fontSize:16,color:"#999"}})}),sx:{bgcolor:"#13141c",borderRadius:2,fontSize:14,"& .MuiOutlinedInput-notchedOutline":{borderColor:"#2a2d3e"},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:"#3a3d4e"},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"primary.main"}}}})})]}),"Overview"===y&&(0,r.jsxs)(k.ZP,{container:!0,spacing:3,sx:{mt:1},children:[(0,r.jsx)(k.ZP,{item:!0,xs:12,md:6,children:(0,r.jsx)(h.Z,{sx:{borderRadius:3},children:(0,r.jsxs)(p.Z,{children:[(0,r.jsx)(m.Z,{variant:"h6",gutterBottom:!0,fontWeight:600,children:"Server Information"}),(0,r.jsx)(A.Z,{sx:{mb:2}}),(0,r.jsx)(nf,{label:"Name",value:u.name}),(0,r.jsx)(nf,{label:"Container",value:u.container}),(0,r.jsx)(nf,{label:"Hostname",value:u.hostname?(0,r.jsx)(e4.h,{hostname:u.hostname,color:"text.primary"}):void 0}),(0,r.jsx)(nf,{label:"Type",value:u.type}),(0,r.jsx)(nf,{label:"Version",value:u.version}),(0,r.jsx)(nf,{label:"Memory",value:u.memory}),(0,r.jsx)(nf,{label:"Uptime",value:u.uptime||function(e){if(!e||e<0)return"0s";let t=Math.floor(e/3600),n=Math.floor(e%3600/60),r=e%60;return t>0?"".concat(t,"h ").concat(n,"m"):n>0?"".concat(n,"m ").concat(r,"s"):"".concat(r,"s")}(u.uptimeSeconds)})]})})}),(0,r.jsx)(k.ZP,{item:!0,xs:12,md:6,children:(0,r.jsx)(h.Z,{sx:{borderRadius:3},children:(0,r.jsxs)(p.Z,{children:[(0,r.jsx)(m.Z,{variant:"h6",gutterBottom:!0,fontWeight:600,children:"Players"}),(0,r.jsx)(A.Z,{sx:{mb:2}}),u.players?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(nf,{label:"Online",value:"".concat(u.players.online," / ").concat(u.players.max)}),u.players.players&&u.players.players.length>0&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(m.Z,{variant:"body2",color:"text.secondary",sx:{mt:2,mb:1},children:"Online Players"}),(0,r.jsx)(i.Z,{sx:{display:"flex",flexWrap:"wrap",gap:1},children:u.players.players.map(e=>(0,r.jsx)(D.Z,{label:e,size:"small"},e))})]})]}):(0,r.jsx)(m.Z,{variant:"body2",color:"text.secondary",children:"Player information unavailable"})]})})}),(0,r.jsx)(k.ZP,{item:!0,xs:12,md:6,children:(0,r.jsx)(e8,{serverName:u.name,hostname:u.hostname})})]}),"Activity"===y&&(0,r.jsx)(i.Z,{sx:{mt:3},children:(0,r.jsx)(h.Z,{sx:{borderRadius:3},children:(0,r.jsxs)(p.Z,{children:[(0,r.jsx)(m.Z,{variant:"h6",gutterBottom:!0,fontWeight:600,children:"Server Activity"}),(0,r.jsx)(A.Z,{sx:{mb:2}}),(0,r.jsx)(ei,{serverName:u.name})]})})}),"Mods"===y&&(0,r.jsx)(i.Z,{sx:{mt:3},children:(0,r.jsx)(tt,{serverName:u.name})}),"Files"===y&&(0,r.jsx)(i.Z,{sx:{mt:3},children:(0,r.jsx)(nh,{serverName:u.name})}),"Backups"===y&&(0,r.jsx)(i.Z,{sx:{mt:3},children:(0,r.jsx)(m.Z,{variant:"body1",color:"text.secondary",children:"Backup management coming soon"})}),"Access"===y&&(0,r.jsx)(i.Z,{sx:{mt:3},children:(0,r.jsx)(e3,{serverId:u.name})}),"Options"===y&&(0,r.jsx)(i.Z,{sx:{mt:3},children:(0,r.jsx)(eE,{serverName:u.name,isRunning:"running"===u.status})}),"Overview"===y&&(0,r.jsxs)(j.Z,{open:R,onClose:()=>P(!1),maxWidth:"xl",fullWidth:!0,fullScreen:F,PaperProps:{sx:{height:F?"100vh":"90vh",bgcolor:"background.paper"}},children:[(0,r.jsxs)(i.Z,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",p:2,borderBottom:1,borderColor:"divider"},children:[(0,r.jsxs)(m.Z,{variant:"h6",sx:{fontFamily:'"Minecraft", sans-serif',fontWeight:400,letterSpacing:"0.05em"},children:["Console - ",u.name]}),(0,r.jsx)(c.Z,{onClick:()=>P(!1),"aria-label":"Close console",children:(0,r.jsx)(L.Z,{})})]}),(0,r.jsx)(Z.Z,{sx:{p:0,display:"flex",flexDirection:"column"},children:(0,r.jsx)(_.K,{serverName:u.name})})]})]})}function nf(e){let{label:t,value:n}=e;return n?(0,r.jsxs)(i.Z,{sx:{display:"flex",justifyContent:"space-between",py:1},children:[(0,r.jsx)(m.Z,{variant:"body2",color:"text.secondary",children:t}),(0,r.jsx)(m.Z,{variant:"body2",component:"div",sx:{fontWeight:500},children:n})]}):null}var nv=n(93757);function ng(){return(0,r.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,r.jsx)("line",{x1:"8",y1:"12",x2:"16",y2:"12"})]})}function nj(){return(0,r.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("path",{d:"M21 2v6h-6"}),(0,r.jsx)("path",{d:"M3 12a9 9 0 0115.36-6.36L21 8"}),(0,r.jsx)("path",{d:"M3 22v-6h6"}),(0,r.jsx)("path",{d:"M21 12a9 9 0 01-15.36 6.36L3 16"})]})}function nb(){var e,t,n,D;let N=(0,a.useParams)(),A=(0,l.x)(),M=decodeURIComponent(N.name),{data:E,isLoading:L,error:q}=(0,ex.Hy)(M),{status:U,health:B}=function(e){let{serverName:t,onStatusChange:n,enabled:r=!0,reconnectInterval:a=3e3}=e,[l,i]=(0,s.useState)(null),[o,c]=(0,s.useState)(null);(0,s.useEffect)(()=>{i(null),c(null)},[t]);let d=(0,s.useCallback)(e=>{if("server-status"===e.type){let t=e.data.status,r=e.data.health;i(t),c(r),null==n||n(t,r)}},[n]),{isConnected:u,reconnect:x,retryCount:h}=(0,nv.D)({url:"/api/sse/servers/".concat(encodeURIComponent(t),"/status"),onMessage:d,enabled:r,reconnectInterval:a});return{status:l,health:o,isConnected:u,reconnect:x,retryCount:h}}({serverName:M,enabled:!!M}),[K,V]=(0,s.useState)(null),[H,Q]=(0,s.useState)(!1),[G,J]=(0,s.useState)(""),_=(0,ex.jM)(),$=(0,ex.Aw)(),X=(0,ex._I)(),Y=(0,ex.Hq)(),ee=async()=>{try{await _.mutateAsync(M)}catch(e){console.error("Failed to start server:",e)}},et=async()=>{try{await $.mutateAsync(M)}catch(e){console.error("Failed to stop server:",e)}},en=async()=>{try{await X.mutateAsync(M)}catch(e){console.error("Failed to restart server:",e)}},er=async e=>{try{await fetch("/api/servers/".concat(encodeURIComponent(M),"/exec"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({command:e})})}catch(e){console.error("Failed to send command:",e)}},es=U||(null==E?void 0:E.server.status),ea=_.isPending||$.isPending||X.isPending,el=null==E?void 0:E.server;return(0,r.jsxs)(r.Fragment,{children:[q&&(0,r.jsxs)(d.Z,{severity:"error",sx:{mb:3},children:["Failed to load server: ",q.message]}),_.isError&&(0,r.jsxs)(d.Z,{severity:"error",sx:{mb:3},children:["Failed to start server: ",null===(e=_.error)||void 0===e?void 0:e.message]}),$.isError&&(0,r.jsxs)(d.Z,{severity:"error",sx:{mb:3},children:["Failed to stop server: ",null===(t=$.error)||void 0===t?void 0:t.message]}),X.isError&&(0,r.jsxs)(d.Z,{severity:"error",sx:{mb:3},children:["Failed to restart server: ",null===(n=X.error)||void 0===n?void 0:n.message]}),Y.isError&&(0,r.jsxs)(d.Z,{severity:"error",sx:{mb:3},children:["Failed to delete server: ",null===(D=Y.error)||void 0===D?void 0:D.message]}),L?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:2,mb:2.5},children:[(0,r.jsx)(x.Z,{variant:"rounded",width:64,height:64,sx:{borderRadius:3,flexShrink:0}}),(0,r.jsxs)(i.Z,{sx:{flex:1},children:[(0,r.jsx)(x.Z,{variant:"text",width:80,height:18,sx:{mb:.5}}),(0,r.jsx)(x.Z,{variant:"text",width:"40%",height:40}),(0,r.jsxs)(i.Z,{sx:{display:"flex",gap:2,mt:.75},children:[(0,r.jsx)(x.Z,{variant:"text",width:100}),(0,r.jsx)(x.Z,{variant:"text",width:60}),(0,r.jsx)(x.Z,{variant:"text",width:140}),(0,r.jsx)(x.Z,{variant:"text",width:50})]})]}),(0,r.jsxs)(i.Z,{sx:{display:"flex",gap:1,flexShrink:0},children:[(0,r.jsx)(x.Z,{variant:"rounded",width:90,height:40,sx:{borderRadius:2}}),(0,r.jsx)(x.Z,{variant:"rounded",width:36,height:36,sx:{borderRadius:2}})]})]}),(0,r.jsx)(i.Z,{sx:{display:"flex",gap:.5,mb:3},children:[80,70,65,50,65,65].map((e,t)=>(0,r.jsx)(x.Z,{variant:"rounded",width:e,height:36,sx:{borderRadius:5}},t))}),(0,r.jsx)(i.Z,{sx:{display:"grid",gridTemplateColumns:{xs:"1fr",sm:"repeat(3, 1fr)"},gap:2,mb:2.5},children:[0,1,2].map(e=>(0,r.jsx)(h.Z,{sx:{borderRadius:3},children:(0,r.jsxs)(p.Z,{children:[(0,r.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:1.5},children:[(0,r.jsx)(x.Z,{variant:"text",width:"50%"}),(0,r.jsx)(x.Z,{variant:"circular",width:28,height:28})]}),(0,r.jsx)(x.Z,{variant:"text",width:"60%",height:36}),(0,r.jsx)(x.Z,{variant:"rounded",width:"100%",height:6,sx:{borderRadius:3,mt:1}})]})},e))}),(0,r.jsxs)(h.Z,{sx:{borderRadius:3,border:"1px solid",borderColor:"divider"},children:[(0,r.jsxs)(i.Z,{sx:{px:3,py:2,borderBottom:"1px solid",borderColor:"divider",display:"flex",alignItems:"center",gap:1.25},children:[(0,r.jsx)(x.Z,{variant:"text",width:80,height:28}),(0,r.jsx)(x.Z,{variant:"circular",width:10,height:10})]}),(0,r.jsx)(x.Z,{variant:"rectangular",height:360,sx:{bgcolor:"#0a0a0a"}}),(0,r.jsx)(i.Z,{sx:{px:2.5,py:1.5,borderTop:"1px solid",borderColor:"divider"},children:(0,r.jsx)(x.Z,{variant:"rounded",width:"100%",height:40,sx:{borderRadius:2}})})]}),(0,r.jsxs)(k.ZP,{container:!0,spacing:3,sx:{mt:1},children:[(0,r.jsx)(k.ZP,{item:!0,xs:12,md:6,children:(0,r.jsx)(h.Z,{sx:{borderRadius:3},children:(0,r.jsxs)(p.Z,{children:[(0,r.jsx)(x.Z,{variant:"text",width:"40%",height:28,sx:{mb:1}}),(0,r.jsx)(x.Z,{variant:"rectangular",height:1,sx:{mb:2}}),[0,1,2,3,4,5,6].map(e=>(0,r.jsxs)(i.Z,{sx:{display:"flex",justifyContent:"space-between",py:1},children:[(0,r.jsx)(x.Z,{variant:"text",width:"30%"}),(0,r.jsx)(x.Z,{variant:"text",width:"40%"})]},e))]})})}),(0,r.jsx)(k.ZP,{item:!0,xs:12,md:6,children:(0,r.jsx)(h.Z,{sx:{borderRadius:3},children:(0,r.jsxs)(p.Z,{children:[(0,r.jsx)(x.Z,{variant:"text",width:"30%",height:28,sx:{mb:1}}),(0,r.jsx)(x.Z,{variant:"rectangular",height:1,sx:{mb:2}}),(0,r.jsxs)(i.Z,{sx:{display:"flex",justifyContent:"space-between",py:1},children:[(0,r.jsx)(x.Z,{variant:"text",width:"25%"}),(0,r.jsx)(x.Z,{variant:"text",width:"20%"})]})]})})})]})]}):el?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:2,mb:2.5},children:[(0,r.jsx)(i.Z,{sx:{width:64,height:64,borderRadius:3,overflow:"hidden",bgcolor:"background.paper",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,border:"1px solid",borderColor:"divider",fontSize:36},children:function(e){if(!e)return"\uD83C\uDFAE";let t=e.toUpperCase();return["PAPER","SPIGOT","BUKKIT","PURPUR"].includes(t)?"\uD83D\uDD0C":["FORGE","NEOFORGE","FABRIC","QUILT"].includes(t)?"\uD83D\uDD27":"\uD83C\uDFAE"}(el.type)}),(0,r.jsxs)(i.Z,{sx:{flex:1},children:[(0,r.jsxs)(m.Z,{onClick:()=>A.push("/servers"),sx:{fontSize:12,color:"primary.main",cursor:"pointer",mb:.25,display:"flex",alignItems:"center",gap:.5,"&:hover":{textDecoration:"underline"}},children:[(0,r.jsx)(R.Z,{sx:{fontSize:14}})," All servers"]}),(0,r.jsx)(m.Z,{variant:"h4",component:"h1",sx:{fontFamily:'"Minecraft", sans-serif',fontWeight:400,color:"text.primary",letterSpacing:"0.5px",m:0,textTransform:"uppercase"},children:M}),(0,r.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:0,mt:.75,flexWrap:"wrap",fontSize:13,color:"text.secondary"},children:[el.version&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:.5},children:[(0,r.jsx)(F.Z,{sx:{fontSize:14}}),"Minecraft ",el.version]}),(0,r.jsx)(i.Z,{component:"span",sx:{mx:1.25,color:"#3a3d4e"},children:"|"})]}),el.type&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:.5},children:[(0,r.jsx)(z.Z,{sx:{fontSize:14}}),el.type]}),(0,r.jsx)(i.Z,{component:"span",sx:{mx:1.25,color:"#3a3d4e"},children:"|"})]}),el.hostname&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:.5},children:[(0,r.jsx)(W.Z,{sx:{fontSize:14}}),(0,r.jsx)(e4.h,{hostname:el.hostname,fontSize:13})]}),(0,r.jsx)(i.Z,{component:"span",sx:{mx:1.25,color:"#3a3d4e"},children:"|"})]}),(0,r.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:.5},children:[(0,r.jsx)(O.Z,{sx:{fontSize:14}}),el.uptime||function(e){if(!e||e<0)return"0s";let t=Math.floor(e/3600),n=Math.floor(e%3600/60),r=e%60;return t>0?"".concat(t,"h ").concat(n,"m"):n>0?"".concat(n,"m ").concat(r,"s"):"".concat(r,"s")}(el.uptimeSeconds)||"0s"]})]})]}),(0,r.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:1.25,flexShrink:0},children:[("stopped"===es||"exited"===es||"not_created"===es)&&(0,r.jsx)(o.Z,{variant:"contained",color:"success",startIcon:ea?(0,r.jsx)(u.Z,{size:16,color:"inherit"}):(0,r.jsx)(P.Z,{}),onClick:ee,disabled:ea,sx:{px:2,py:1,borderRadius:2,fontSize:14,fontWeight:600},children:"Start"}),"running"===es&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.Z,{variant:"outlined",startIcon:ea?(0,r.jsx)(u.Z,{size:16}):(0,r.jsx)(ng,{}),onClick:et,disabled:ea,sx:{px:2,py:1,borderRadius:2,fontSize:14,fontWeight:500,borderColor:"divider",color:"text.secondary","&:hover":{borderColor:"text.secondary",bgcolor:(0,S.Fq)("#fff",.05)}},children:"Stop"}),(0,r.jsx)(o.Z,{variant:"contained",startIcon:ea?(0,r.jsx)(u.Z,{size:16,color:"inherit"}):(0,r.jsx)(nj,{}),onClick:en,disabled:ea,sx:{px:2,py:1,borderRadius:2,fontSize:14,fontWeight:600,bgcolor:"primary.main",color:"#0a0e14","&:hover":{bgcolor:"primary.dark"}},children:"Restart"})]}),(0,r.jsx)(c.Z,{onClick:e=>V(e.currentTarget),sx:{width:36,height:36,borderRadius:2,border:"1px solid",borderColor:"divider",color:"text.secondary"},children:(0,r.jsx)(T.Z,{sx:{fontSize:18}})}),(0,r.jsx)(y.Z,{anchorEl:K,open:!!K,onClose:()=>V(null),children:(0,r.jsxs)(f.Z,{onClick:()=>{V(null),Q(!0),J("")},sx:{color:"error.main"},children:[(0,r.jsx)(v.Z,{children:(0,r.jsx)(I.Z,{fontSize:"small",sx:{color:"error.main"}})}),(0,r.jsx)(g.Z,{children:"Delete Server"})]})})]})]}),(0,r.jsx)(ny,{server:el,onSendCommand:er})]}):(0,r.jsx)(d.Z,{severity:"warning",children:"Server not found"}),(0,r.jsxs)(j.Z,{open:H,onClose:()=>{Q(!1),J("")},maxWidth:"sm",fullWidth:!0,children:[(0,r.jsx)(b.Z,{children:"Delete Server"}),(0,r.jsxs)(Z.Z,{children:[(0,r.jsxs)(m.Z,{sx:{mb:2},children:["This action cannot be undone. Type ",(0,r.jsx)("strong",{children:M})," to confirm deletion."]}),(0,r.jsx)(w.Z,{label:"Server name",value:G,onChange:e=>J(e.target.value),fullWidth:!0,autoFocus:!0})]}),(0,r.jsxs)(C.Z,{sx:{px:3,pb:2},children:[(0,r.jsx)(o.Z,{onClick:()=>{Q(!1),J("")},children:"Cancel"}),(0,r.jsx)(o.Z,{variant:"contained",color:"error",onClick:()=>{G===M&&Y.mutate({name:M,force:!0},{onSuccess:()=>{A.push("/servers")}})},disabled:G!==M||Y.isPending,startIcon:Y.isPending?(0,r.jsx)(u.Z,{size:16}):null,children:Y.isPending?"Deleting...":"Delete"})]})]})]})}},56813:function(e,t,n){"use strict";n.d(t,{I:function(){return l}});var r=n(94655),s=n(25333),a=n(82925);function l(e){let{action:t,size:n="small"}=e,l=a.Lu[t]||"default",i=a.n3[t]||t;return(0,r.jsx)(s.Z,{label:i,color:l,size:n,variant:"filled",sx:{fontWeight:600,fontSize:"small"===n?"0.7rem":"0.8rem"}})}},26892:function(e,t,n){"use strict";n.d(t,{c:function(){return i}});var r=n(94655),s=n(25333),a=n(46207),l=n(43436);function i(e){let{status:t,size:n="small"}=e;return(0,r.jsx)(s.Z,{icon:"success"===t?(0,r.jsx)(a.Z,{}):(0,r.jsx)(l.Z,{}),label:"success"===t?"OK":"Error",color:"success"===t?"success":"error",size:n,variant:"outlined",sx:{fontWeight:500,fontSize:"small"===n?"0.7rem":"0.8rem"}})}},83765:function(e,t,n){"use strict";n.d(t,{x:function(){return F}});var r=n(94655),s=n(35106),a=n(7281),l=n(21138),i=n(84811),o=n(47001),c=n(53281),d=n(11254),u=n(70366),x=n(6406),h=n(69899),p=n(31317),m=n(95511),y=n(10721),f=n(81071),v=n(30417),g=n(25333),j=n(87716),b=n(79983),Z=n(89161),C=n(60236),w=n(27171),k=n(30114),S=n(69178),R=n(46725),P=n(56813),T=n(26892);function I(e){var t,n;let{log:c,onClick:d,hideTargetColumn:x}=e,[h,y]=(0,s.useState)("failure"===c.status),v=c.details&&Object.keys(c.details).length>0,S="failure"===c.status&&c.errorMessage,I=v||S,F=(t=c.targetType,n=c.targetName,"server"===t?"/servers/".concat(encodeURIComponent(n)):"player"===t?"/players":null);return(0,r.jsxs)(r.Fragment,{children:[(0,r.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,r.jsx)(o.Z,{padding:"checkbox",sx:{width:48},children:I&&(0,r.jsx)(b.Z,{size:"small",onClick:e=>{e.stopPropagation(),y(!h)},"aria-label":h?"Collapse details":"Expand details",children:h?(0,r.jsx)(C.Z,{}):(0,r.jsx)(Z.Z,{})})}),(0,r.jsx)(o.Z,{children:(0,r.jsx)(m.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,r.jsx)(p.Z,{variant:"body2",color:"text.secondary",sx:{whiteSpace:"nowrap"},children:function(e){let t=new Date,n=new Date(e),r=Math.floor((t.getTime()-n.getTime())/1e3),s=Math.floor(r/60),a=Math.floor(s/60),l=Math.floor(a/24);return r<60?"just now":s<60?"".concat(s,"m ago"):a<24?"".concat(a,"h ago"):l<7?"".concat(l,"d ago"):new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"}).format(n)}(c.timestamp)})})}),(0,r.jsx)(o.Z,{children:(0,r.jsx)(P.I,{action:c.action})}),(0,r.jsx)(o.Z,{children:c.actor.startsWith("cli:")?(0,r.jsx)(g.Z,{label:c.actor.replace("cli:",""),size:"small",variant:"outlined",sx:{fontSize:"0.75rem"}}):(0,r.jsx)(p.Z,{variant:"body2",children:c.actor.replace("api:","")})}),!x&&(0,r.jsx)(o.Z,{children:(0,r.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center"},children:[function(e){switch(e){case"server":return(0,r.jsx)(w.Z,{sx:{fontSize:16,mr:.5,color:"text.secondary"}});case"player":return(0,r.jsx)(k.Z,{sx:{fontSize:16,mr:.5,color:"text.secondary"}});default:return null}}(c.targetType),F?(0,r.jsx)(R.default,{href:F,style:{textDecoration:"none"},onClick:e=>e.stopPropagation(),children:(0,r.jsx)(p.Z,{variant:"body2",sx:{color:"primary.main","&:hover":{textDecoration:"underline"}},children:c.targetName})}):(0,r.jsx)(p.Z,{variant:"body2",children:c.targetName})]})}),(0,r.jsx)(o.Z,{children:(0,r.jsx)(T.c,{status:c.status})})]}),I&&(0,r.jsx)(u.Z,{children:(0,r.jsx)(o.Z,{sx:{py:0},colSpan:x?5:6,children:(0,r.jsx)(j.Z,{in:h,timeout:"auto",unmountOnExit:!0,children:(0,r.jsxs)(a.Z,{sx:{py:2,px:2},children:[S&&(0,r.jsx)(f.Z,{severity:"error",sx:{mb:2},children:c.errorMessage}),v&&(0,r.jsxs)(a.Z,{children:[(0,r.jsx)(p.Z,{variant:"caption",color:"text.secondary",sx:{mb:1,display:"block"},children:"Details"}),(0,r.jsx)(l.Z,{size:"small",sx:{width:"auto"},children:(0,r.jsx)(i.Z,{children:Object.entries(c.details).map(e=>{let[t,n]=e;return(0,r.jsxs)(u.Z,{children:[(0,r.jsx)(o.Z,{sx:{fontWeight:600,color:"text.secondary",border:"none",py:.5,pl:0},children:t}),(0,r.jsx)(o.Z,{sx:{border:"none",py:.5},children:String(n)})]},t)})})})]})]})})})})]})}function F(e){let{logs:t,total:n,isLoading:s,error:a,filters:m,onFiltersChange:g,onRowClick:j,onRetry:b,hideTargetColumn:Z,rowsPerPageOptions:C=[25,50,100]}=e,w=Math.floor((m.offset||0)/(m.limit||50)),k=m.limit||50;return s?(0,r.jsx)(h.Z,{children:(0,r.jsx)(c.Z,{children:(0,r.jsxs)(l.Z,{children:[(0,r.jsx)(d.Z,{children:(0,r.jsxs)(u.Z,{children:[(0,r.jsx)(o.Z,{padding:"checkbox"}),(0,r.jsx)(o.Z,{children:"Timestamp"}),(0,r.jsx)(o.Z,{children:"Action"}),(0,r.jsx)(o.Z,{children:"Actor"}),!Z&&(0,r.jsx)(o.Z,{children:"Target"}),(0,r.jsx)(o.Z,{children:"Status"})]})}),(0,r.jsx)(i.Z,{children:[void 0,void 0,void 0,void 0,void 0].map((e,t)=>(0,r.jsxs)(u.Z,{children:[(0,r.jsx)(o.Z,{padding:"checkbox"}),(0,r.jsx)(o.Z,{children:(0,r.jsx)(y.Z,{variant:"text",width:80})}),(0,r.jsx)(o.Z,{children:(0,r.jsx)(y.Z,{variant:"rounded",width:70,height:24})}),(0,r.jsx)(o.Z,{children:(0,r.jsx)(y.Z,{variant:"text",width:60})}),!Z&&(0,r.jsx)(o.Z,{children:(0,r.jsx)(y.Z,{variant:"text",width:100})}),(0,r.jsx)(o.Z,{children:(0,r.jsx)(y.Z,{variant:"rounded",width:50,height:24})})]},t))})]})})}):a?(0,r.jsx)(f.Z,{severity:"error",action:b&&(0,r.jsx)(v.Z,{color:"inherit",size:"small",onClick:b,children:"Retry"}),children:a.message||"Failed to load audit logs"}):0===t.length?(0,r.jsxs)(h.Z,{sx:{p:6,textAlign:"center"},children:[(0,r.jsx)(S.Z,{sx:{fontSize:64,color:"text.disabled",mb:2}}),(0,r.jsx)(p.Z,{variant:"h6",color:"text.secondary",gutterBottom:!0,children:"No audit logs found"}),(0,r.jsx)(p.Z,{variant:"body2",color:"text.disabled",sx:{mb:2},children:"Try adjusting your filters or check back later."}),(0,r.jsx)(v.Z,{variant:"outlined",size:"small",onClick:()=>g({limit:m.limit,sort:m.sort}),children:"Reset Filters"})]}):(0,r.jsxs)(h.Z,{children:[(0,r.jsx)(c.Z,{sx:{overflowX:"auto"},children:(0,r.jsxs)(l.Z,{size:"small",children:[(0,r.jsx)(d.Z,{children:(0,r.jsxs)(u.Z,{children:[(0,r.jsx)(o.Z,{padding:"checkbox",sx:{width:48}}),(0,r.jsx)(o.Z,{sx:{fontWeight:600,whiteSpace:"nowrap"},children:"Timestamp"}),(0,r.jsx)(o.Z,{sx:{fontWeight:600},children:"Action"}),(0,r.jsx)(o.Z,{sx:{fontWeight:600},children:"Actor"}),!Z&&(0,r.jsx)(o.Z,{sx:{fontWeight:600},children:"Target"}),(0,r.jsx)(o.Z,{sx:{fontWeight:600},children:"Status"})]})}),(0,r.jsx)(i.Z,{children:t.map(e=>(0,r.jsx)(I,{log:e,onClick:j,hideTargetColumn:Z},e.id))})]})}),(0,r.jsx)(x.Z,{component:"div",count:n,page:w,onPageChange:(e,t)=>{g({...m,offset:t*k})},rowsPerPage:k,onRowsPerPageChange:e=>{let t=parseInt(e.target.value,10);g({...m,limit:t,offset:0})},rowsPerPageOptions:C,"aria-label":"Audit log pagination"})]})}},97511:function(e,t,n){"use strict";n.d(t,{q:function(){return o},h:function(){return p}});var r=n(94655),s=n(35106),a=n(79983),l=n(10449),i=n(24559);function o(e){let{text:t,size:n=14}=e,[o,c]=(0,s.useState)(!1),d=async e=>{e.stopPropagation();try{await navigator.clipboard.writeText(t),c(!0),setTimeout(()=>c(!1),2e3)}catch(e){}};return(0,r.jsx)(a.Z,{size:"small",onClick:d,sx:{ml:.5,p:.25,color:o?"success.main":"text.secondary","&:hover":{bgcolor:"action.hover"}},"aria-label":o?"Copied":"Copy to clipboard",children:o?(0,r.jsx)(i.Z,{sx:{fontSize:n}}):(0,r.jsx)(l.Z,{sx:{fontSize:n}})})}var c=n(7281),d=n(31317),u=n(25333),x=n(93300);function h(e){return e?e.split(",").map(e=>e.trim()).filter(Boolean):[]}function p(e){let{hostname:t,portSuffix:n,color:a="text.secondary",fontSize:l,showCopyButton:i=!1}=e,[p,m]=(0,s.useState)(null),y=h(t),f=function(e){let t=h(e);return 0===t.length?"-":t.find(e=>e.endsWith(".local"))||t[0]}(t),v=e=>n?"".concat(e,":").concat(n):e;return 0===y.length?(0,r.jsx)(c.Z,{component:"span",sx:{color:a,fontSize:l,display:"inline"},children:"-"}):1===y.length?(0,r.jsxs)(c.Z,{component:"span",sx:{display:"inline-flex",alignItems:"center"},children:[(0,r.jsx)(c.Z,{component:"span",sx:{color:a,fontSize:l,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:v(f)}),i&&(0,r.jsx)(o,{text:v(f)})]}):(0,r.jsxs)(c.Z,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:.75,minWidth:0},children:[(0,r.jsx)(c.Z,{component:"span",sx:{color:a,fontSize:l,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:v(f)}),(0,r.jsx)(u.Z,{label:"+".concat(y.length-1),size:"small",onClick:e=>{e.stopPropagation(),m(e.currentTarget)},sx:{height:20,fontSize:11,cursor:"pointer","& .MuiChip-label":{px:.75}}}),(0,r.jsx)(x.ZP,{open:!!p,anchorEl:p,onClose:()=>{m(null)},onClick:e=>e.stopPropagation(),anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},children:(0,r.jsx)(c.Z,{sx:{p:1.5,minWidth:200},children:y.map(e=>(0,r.jsxs)(c.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",py:.5},children:[(0,r.jsx)(d.Z,{variant:"body2",sx:{fontSize:12},children:v(e)}),(0,r.jsx)(o,{text:v(e)})]},e))})})]})}},3454:function(e,t,n){"use strict";n.d(t,{LoadingProvider:function(){return o},startLoading:function(){return c},stopLoading:function(){return d}});var r=n(94655),s=n(35106),a=n(74228),l=n(31477),i=n.n(l);function o(e){let{children:t}=e,n=(0,a.usePathname)(),l=(0,a.useSearchParams)();return(0,s.useEffect)(()=>{i().done()},[n,l]),(0,r.jsx)(r.Fragment,{children:t})}function c(){i().start()}function d(){i().done()}i().configure({showSpinner:!1,speed:300,minimum:.1})},8690:function(e,t,n){"use strict";n.d(t,{Av:function(){return r.startLoading}});var r=n(3454)},73660:function(e,t,n){"use strict";n.d(t,{K:function(){return R}});var r=n(94655),s=n(35106),a=n(18844),l=n.n(a),i=n(7281),o=n(69899),c=n(97436),d=n(30417),u=n(90829),x=n(79983),h=n(31317),p=n(25333),m=n(40064),y=n(45547),f=n(70115),v=n(69123),g=n(93017),j=n(11141),b=n(19127),Z=n(69366),C=n(163);let w=[{label:"say",template:"say "},{label:"give",template:"give "},{label:"tp",template:"tp "},{label:"gamemode",template:"gamemode "}],k=new(l())({fg:"#aaa",bg:"#000",newline:!1,escapeXML:!0,colors:{0:"#000000",1:"#cc0000",2:"#4e9a06",3:"#c4a000",4:"#3465a4",5:"#75507b",6:"#06989a",7:"#d3d7cf",8:"#555753",9:"#ef2929",10:"#8ae234",11:"#fce94f",12:"#729fcf",13:"#ad7fa8",14:"#34e2e2",15:"#eeeeec"}}),S=(0,s.memo)(function(e){let{log:t}=e,n=(0,s.useMemo)(()=>(function(e){let t=e.replace(/\x1b\[\?[\d;]*[a-zA-Z]/g,"").replace(/\x1b\[[0-9;]*[KJH]/g,"").replace(/\x1b=/g,"").replace(/\[\?[\d;]*[a-zA-Z]/g,"").replace(/\[[0-9;]*[KJH]/g,"").replace(/\[m/g,"").replace(/\[(\d+)m/g,"\x1b[$1m").replace(/>\.\.\.\.\r?/g,"").replace(/\r/g,"");return k.toHtml(t)})(t),[t]);return(0,r.jsx)(i.Z,{sx:{py:.25,whiteSpace:"pre-wrap",wordBreak:"break-all","& span":{}},dangerouslySetInnerHTML:{__html:n}})});function R(e){let{serverName:t}=e,[n,a]=(0,s.useState)(""),[l,k]=(0,s.useState)([]),[R,P]=(0,s.useState)(-1),[T,I]=(0,s.useState)("ALL"),[F,z]=(0,s.useState)(!0),[W,O]=(0,s.useState)(!0),[D,N]=(0,s.useState)(!1),A=(0,s.useRef)(null),M=(0,s.useRef)(null),{logs:E,isConnected:L,clearLogs:q,reconnect:U,retryCount:B}=(0,C.Y)({serverName:t}),K=(0,s.useMemo)(()=>{let e=E;return W&&(e=e.filter(e=>!e.includes("RCON Listener")&&!e.includes("RCON Client")&&!e.includes("RconClient"))),"ALL"!==T&&(e=e.filter(e=>(e.includes("/ERROR]")||e.includes("/ERROR:")?"ERROR":e.includes("/WARN]")||e.includes("/WARN:")?"WARN":(e.includes("/INFO]")||e.includes("/INFO:"),"INFO"))===T)),e},[E,T,W]);(0,s.useEffect)(()=>{F&&M.current&&(M.current.scrollTop=M.current.scrollHeight)},[K,F]);let V=(0,s.useCallback)(async()=>{let e=n.trim();if(e&&!D){N(!0);try{k(t=>[...t,e]),P(-1),await fetch("/api/servers/".concat(encodeURIComponent(t),"/exec"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({command:e})}),a("")}catch(e){console.error("Failed to execute command:",e)}finally{N(!1)}}},[n,t,D]),H=(0,s.useCallback)(e=>{if("Enter"===e.key)e.preventDefault(),V();else if("ArrowUp"===e.key){if(e.preventDefault(),0===l.length)return;let t=-1===R?l.length-1:Math.max(0,R-1);P(t),a(l[t])}else if("ArrowDown"===e.key){if(e.preventDefault(),-1===R)return;let t=R+1;t>=l.length?(P(-1),a("")):(P(t),a(l[t]))}},[l,R,V]),Q=(0,s.useCallback)(e=>{var t;a(e),null===(t=A.current)||void 0===t||t.focus()},[]),G=L?{text:"Connected",color:"success"}:B>0?{text:"Disconnected (Retry ".concat(B,")"),color:"warning"}:{text:"Disconnected",color:"error"};return(0,r.jsxs)(o.Z,{"data-testid":"server-console",sx:{display:"flex",flexDirection:"column",height:"100%",minHeight:400},children:[(0,r.jsxs)(i.Z,{sx:{display:"flex",flexDirection:{xs:"column",sm:"row"},alignItems:{xs:"flex-start",sm:"center"},justifyContent:"space-between",px:2,py:1,gap:1,borderBottom:1,borderColor:"divider"},children:[(0,r.jsxs)(f.Z,{direction:"row",spacing:1,alignItems:"center",children:[(0,r.jsx)(h.Z,{variant:"subtitle2",children:"Console"}),(0,r.jsx)(p.Z,{"data-testid":"connection-status",label:G.text,color:G.color,size:"small"})]}),(0,r.jsxs)(f.Z,{direction:"row",spacing:1,alignItems:"center",flexWrap:"wrap",useFlexGap:!0,children:[(0,r.jsx)(u.Z,{size:"small",variant:"outlined",children:["ALL","INFO","WARN","ERROR"].map(e=>(0,r.jsx)(d.Z,{onClick:()=>I(e),variant:T===e?"contained":"outlined",children:e},e))}),(0,r.jsx)(m.Z,{control:(0,r.jsx)(y.Z,{checked:F,onChange:e=>z(e.target.checked),size:"small",inputProps:{"aria-label":"Auto-scroll"}}),label:"Auto-scroll"}),(0,r.jsx)(m.Z,{control:(0,r.jsx)(y.Z,{checked:W,onChange:e=>O(e.target.checked),size:"small",inputProps:{"aria-label":"Hide RCON"}}),label:"Hide RCON"}),(0,r.jsx)(x.Z,{size:"small",onClick:q,"aria-label":"Clear logs",title:"Clear logs",children:(0,r.jsx)(b.Z,{})}),!L&&(0,r.jsx)(d.Z,{size:"small",startIcon:(0,r.jsx)(Z.Z,{}),onClick:U,"aria-label":"Reconnect",children:"Reconnect"})]})]}),(0,r.jsx)(i.Z,{ref:M,sx:{flex:1,overflow:"auto",bgcolor:"#1a1a1a",p:1,fontSize:"0.85rem"},children:0===K.length?(0,r.jsx)(h.Z,{color:"text.secondary",sx:{textAlign:"center",py:4,color:"#666"},children:"Waiting for logs..."}):K.map((e,t)=>(0,r.jsx)(S,{log:e},t))}),(0,r.jsx)(v.Z,{}),(0,r.jsx)(i.Z,{sx:{px:2,py:1,bgcolor:"background.default"},children:(0,r.jsxs)(f.Z,{direction:"row",spacing:1,children:[(0,r.jsx)(h.Z,{variant:"caption",color:"text.secondary",sx:{alignSelf:"center"},children:"Quick:"}),w.map(e=>(0,r.jsx)(d.Z,{size:"small",variant:"outlined",onClick:()=>Q(e.template),children:e.label},e.label))]})}),(0,r.jsx)(v.Z,{}),(0,r.jsxs)(i.Z,{sx:{display:"flex",p:1,gap:1},children:[(0,r.jsx)(c.Z,{inputRef:A,fullWidth:!0,size:"small",placeholder:"Enter command...",value:n,onChange:e=>a(e.target.value),onKeyDown:H,disabled:!L||D,InputProps:{}}),(0,r.jsx)(d.Z,{variant:"contained",onClick:V,disabled:!n.trim()||!L||D,startIcon:D?(0,r.jsx)(g.Z,{size:16}):(0,r.jsx)(j.Z,{}),"aria-label":"Send command",children:"Send"})]})]})}},42936:function(e,t,n){"use strict";async function r(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={...t.headers};t.body&&(n["Content-Type"]="application/json");let r=await fetch(e,{...t,headers:n});if(!r.ok){let e=await r.json().catch(()=>({error:"UnknownError",message:r.statusText})),t=Error(e.message);throw t.statusCode=r.status,t.code=e.error,t}return r.json()}n.d(t,{SC:function(){return r}})},31358:function(e,t,n){"use strict";n.d(t,{x:function(){return l}});var r=n(74228),s=n(35106),a=n(8690);function l(){let e=(0,r.useRouter)(),t=(0,s.useCallback)((t,n)=>{(0,a.Av)(),e.push(t,n)},[e]),n=(0,s.useCallback)((t,n)=>{(0,a.Av)(),e.replace(t,n)},[e]);return(0,s.useMemo)(()=>({...e,push:t,replace:n}),[e,t,n])}},84509:function(e,t,n){"use strict";n.d(t,{DM:function(){return l},HZ:function(){return o},VM:function(){return i},hT:function(){return a},oL:function(){return c}});var r=n(5632),s=n(42936);function a(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=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 n=t.toString();return n?"?".concat(n):""}(e);return(0,r.a)({queryKey:["audit-logs",e],queryFn:()=>(0,s.SC)("/api/audit-logs".concat(n)),enabled:(null==t?void 0:t.enabled)!==!1})}function l(e){return(0,r.a)({queryKey:["audit-logs","stats"],queryFn:()=>(0,s.SC)("/api/audit-logs/stats"),enabled:(null==e?void 0:e.enabled)!==!1,refetchInterval:3e4})}function i(e,t){return(0,r.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 o(e,t){var n;return a({targetType:"server",targetName:e,limit:null!==(n=null==t?void 0:t.limit)&&void 0!==n?n: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 a({limit:e,sort:"timestamp:desc"})}},92666:function(e,t,n){"use strict";n.d(t,{$t:function(){return k},Aw:function(){return u},Bx:function(){return Z},Fv:function(){return f},Hq:function(){return c},Hy:function(){return o},Js:function(){return b},Ll:function(){return F},MH:function(){return g},S0:function(){return z},Sr:function(){return h},Yo:function(){return T},_I:function(){return x},c5:function(){return S},g2:function(){return y},gx:function(){return j},hy:function(){return p},iC:function(){return v},jM:function(){return d},mj:function(){return w},nq:function(){return m},nv:function(){return C},ox:function(){return P},s8:function(){return R},x$:function(){return i},zF:function(){return I}});var r=n(5632),s=n(58919),a=n(20367),l=n(42936);function i(){return(0,r.a)({queryKey:["servers"],queryFn:()=>(0,l.SC)("/api/servers"),refetchInterval:6e4})}function o(e,t){return(0,r.a)({queryKey:["servers",e],queryFn:()=>(0,l.SC)("/api/servers/".concat(encodeURIComponent(e))),enabled:(null==t?void 0:t.enabled)!==!1&&!!e,refetchInterval:3e4})}function c(){let e=(0,s.NL)();return(0,a.D)({mutationFn:e=>{let{name:t,force:n}=e;return(0,l.SC)("/api/servers/".concat(encodeURIComponent(t)).concat(n?"?force=true":""),{method:"DELETE"})},onSuccess:()=>{e.invalidateQueries({queryKey:["servers"]})}})}function d(){let e=(0,s.NL)();return(0,a.D)({mutationFn:e=>(0,l.SC)("/api/servers/".concat(encodeURIComponent(e),"/start"),{method:"POST"}),onSuccess:(t,n)=>{e.invalidateQueries({queryKey:["servers"]}),e.invalidateQueries({queryKey:["servers",n]})}})}function u(){let e=(0,s.NL)();return(0,a.D)({mutationFn:e=>(0,l.SC)("/api/servers/".concat(encodeURIComponent(e),"/stop"),{method:"POST"}),onSuccess:(t,n)=>{e.invalidateQueries({queryKey:["servers"]}),e.invalidateQueries({queryKey:["servers",n]})}})}function x(){let e=(0,s.NL)();return(0,a.D)({mutationFn:e=>(0,l.SC)("/api/servers/".concat(encodeURIComponent(e),"/restart"),{method:"POST"}),onSuccess:(t,n)=>{e.invalidateQueries({queryKey:["servers"]}),e.invalidateQueries({queryKey:["servers",n]})}})}function h(){return(0,r.a)({queryKey:["worlds"],queryFn:()=>(0,l.SC)("/api/worlds"),refetchInterval:3e4})}function p(){let e=(0,s.NL)();return(0,a.D)({mutationFn:e=>(0,l.SC)("/api/worlds",{method:"POST",body:JSON.stringify(e)}),onSuccess:()=>{e.invalidateQueries({queryKey:["worlds"]})}})}function m(){let e=(0,s.NL)();return(0,a.D)({mutationFn:e=>{let{worldName:t,serverName:n}=e;return(0,l.SC)("/api/worlds/".concat(encodeURIComponent(t),"/assign"),{method:"POST",body:JSON.stringify({serverName:n})})},onSuccess:()=>{e.invalidateQueries({queryKey:["worlds"]}),e.invalidateQueries({queryKey:["servers"]})}})}function y(){let e=(0,s.NL)();return(0,a.D)({mutationFn:e=>{let{worldName:t,force:n}=e;return(0,l.SC)("/api/worlds/".concat(encodeURIComponent(t),"/release").concat(n?"?force=true":""),{method:"POST"})},onSuccess:()=>{e.invalidateQueries({queryKey:["worlds"]})}})}function f(){let e=(0,s.NL)();return(0,a.D)({mutationFn:e=>{let{name:t,force:n}=e;return(0,l.SC)("/api/worlds/".concat(encodeURIComponent(t)).concat(n?"?force=true":""),{method:"DELETE"})},onSuccess:()=>{e.invalidateQueries({queryKey:["worlds"]})}})}function v(e,t){return(0,r.a)({queryKey:["servers",e,"config"],queryFn:()=>(0,l.SC)("/api/servers/".concat(encodeURIComponent(e),"/config")),enabled:(null==t?void 0:t.enabled)!==!1&&!!e})}function g(){let e=(0,s.NL)();return(0,a.D)({mutationFn:e=>{let{serverName:t,config:n}=e;return(0,l.SC)("/api/servers/".concat(encodeURIComponent(t),"/config"),{method:"PATCH",body:JSON.stringify(n)})},onSuccess:(t,n)=>{let{serverName:r}=n;e.invalidateQueries({queryKey:["servers",r,"config"]}),e.invalidateQueries({queryKey:["servers",r]})}})}function j(){let e=(0,s.NL)();return(0,a.D)({mutationFn:e=>(0,l.SC)("/api/servers/".concat(encodeURIComponent(e),"/world/reset"),{method:"POST"}),onSuccess:(t,n)=>{e.invalidateQueries({queryKey:["servers",n]}),e.invalidateQueries({queryKey:["worlds"]})}})}function b(e,t){return(0,r.a)({queryKey:["servers",e,"hostnames"],queryFn:()=>(0,l.SC)("/api/servers/".concat(encodeURIComponent(e),"/hostnames")),enabled:(null==t?void 0:t.enabled)!==!1&&!!e})}function Z(){let e=(0,s.NL)();return(0,a.D)({mutationFn:e=>{let{serverName:t,customHostnames:n}=e;return(0,l.SC)("/api/servers/".concat(encodeURIComponent(t),"/hostnames"),{method:"PUT",body:JSON.stringify({customHostnames:n})})},onSuccess:(t,n)=>{let{serverName:r}=n;e.invalidateQueries({queryKey:["servers",r,"hostnames"]}),e.invalidateQueries({queryKey:["servers",r]})}})}function C(){return(0,r.a)({queryKey:["router-status"],queryFn:()=>(0,l.SC)("/api/router/status"),refetchInterval:3e4})}function w(){return(0,r.a)({queryKey:["backup-status"],queryFn:()=>(0,l.SC)("/api/backup"),refetchInterval:6e4})}function k(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20;return(0,r.a)({queryKey:["backup-history",e],queryFn:()=>(0,l.SC)("/api/backup/history?limit=".concat(e)),refetchInterval:6e4})}function S(){let e=(0,s.NL)();return(0,a.D)({mutationFn:e=>{let{message:t}=e;return(0,l.SC)("/api/backup",{method:"POST",body:JSON.stringify({message:t})})},onSuccess:()=>{e.invalidateQueries({queryKey:["backup-status"]}),e.invalidateQueries({queryKey:["backup-history"]})}})}function R(){let e=(0,s.NL)();return(0,a.D)({mutationFn:e=>(0,l.SC)("/api/backup/restore",{method:"POST",body:JSON.stringify({commitHash:e})}),onSuccess:()=>{e.invalidateQueries({queryKey:["worlds"]}),e.invalidateQueries({queryKey:["servers"]})}})}function P(e){return(0,r.a)({queryKey:["servers",e,"whitelist"],queryFn:()=>(0,l.SC)("/api/players/whitelist?server=".concat(encodeURIComponent(e))),enabled:!!e})}function T(e){return(0,r.a)({queryKey:["servers",e,"whitelist-status"],queryFn:()=>(0,l.SC)("/api/players/whitelist/status?server=".concat(encodeURIComponent(e))),enabled:!!e})}function I(){let e=(0,s.NL)();return(0,a.D)({mutationFn:e=>{let{serverName:t,enabled:n}=e;return(0,l.SC)("/api/players/whitelist/status",{method:"PUT",body:JSON.stringify({server:t,enabled:n})})},onSuccess:(t,n)=>{let{serverName:r}=n;e.invalidateQueries({queryKey:["servers",r,"whitelist-status"]}),e.invalidateQueries({queryKey:["servers",r,"whitelist"]})}})}function F(){let e=(0,s.NL)();return(0,a.D)({mutationFn:e=>{let{serverName:t,player:n}=e;return(0,l.SC)("/api/players/whitelist",{method:"POST",body:JSON.stringify({server:t,player:n})})},onSuccess:(t,n)=>{let{serverName:r}=n;e.invalidateQueries({queryKey:["servers",r,"whitelist"]})}})}function z(){let e=(0,s.NL)();return(0,a.D)({mutationFn:e=>{let{serverName:t,player:n}=e;return(0,l.SC)("/api/players/whitelist?player=".concat(encodeURIComponent(n),"&server=").concat(encodeURIComponent(t)),{method:"DELETE"})},onSuccess:(t,n)=>{let{serverName:r}=n;e.invalidateQueries({queryKey:["servers",r,"whitelist"]})}})}},37228:function(e,t,n){"use strict";n.d(t,{Bc:function(){return o},N$:function(){return c},UW:function(){return i}});var r=n(5632),s=n(58919),a=n(20367),l=n(42936);function i(){return(0,r.a)({queryKey:["playit-status"],queryFn:()=>(0,l.SC)("/api/playit/status"),refetchInterval:3e4})}function o(){let e=(0,s.NL)();return(0,a.D)({mutationFn:()=>(0,l.SC)("/api/playit/start",{method:"POST"}),onSuccess:()=>{e.invalidateQueries({queryKey:["playit-status"]})}})}function c(){let e=(0,s.NL)();return(0,a.D)({mutationFn:()=>(0,l.SC)("/api/playit/stop",{method:"POST"}),onSuccess:()=>{e.invalidateQueries({queryKey:["playit-status"]})}})}},93757:function(e,t,n){"use strict";n.d(t,{D:function(){return a}});var r=n(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,n;let r=JSON.parse(e.data);null===(n=this.options)||void 0===n||null===(t=n.onMessage)||void 0===t||t.call(n,r)}catch(e){console.warn("Failed to parse SSE message:",e)}},this.eventSource.onerror=()=>{var e,t;let n={message:"SSE connection error",code:"CONNECTION_ERROR",retryCount:this.retryCount,timestamp:new Date};this.lastError=n,this.updateState("error"),null===(t=this.options)||void 0===t||null===(e=t.onError)||void 0===e||e.call(t,n),this.shouldReconnect&&this.scheduleReconnect()})}scheduleReconnect(){var e,t;if(!this.options)return;let n=null!==(e=this.options.maxReconnectAttempts)&&void 0!==e?e:1/0;if(this.retryCount>=n)return;this.reconnectTimer&&clearTimeout(this.reconnectTimer);let r=null!==(t=this.options.reconnectInterval)&&void 0!==t?t:3e3;this.reconnectTimer=setTimeout(()=>{this.retryCount++,this.establishConnection()},r)}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,n;this.state=e,null===(n=this.options)||void 0===n||null===(t=n.onStateChange)||void 0===t||t.call(n,e)}constructor(){this.eventSource=null,this.state="disconnected",this.retryCount=0,this.lastError=null,this.reconnectTimer=null,this.options=null,this.shouldReconnect=!0}}function a(e){let{url:t,onMessage:n,onError:a,reconnectInterval:l=3e3,maxReconnectAttempts:i=1/0,enabled:o=!0,withCredentials:c=!1}=e,[d,u]=(0,r.useState)(null),[x,h]=(0,r.useState)("disconnected"),[p,m]=(0,r.useState)(null),[y,f]=(0,r.useState)(0),v=(0,r.useRef)(null),g=(0,r.useCallback)(e=>{u(e),null==n||n(e)},[n]),j=(0,r.useCallback)(e=>{h(e),"connected"===e&&f(0)},[]),b=(0,r.useCallback)(e=>{m(e),"number"==typeof e.retryCount&&f(e.retryCount),null==a||a(e)},[a]),Z=(0,r.useCallback)(()=>{v.current&&(v.current.reconnect(),f(v.current.getRetryCount()))},[]),C=(0,r.useCallback)(()=>{v.current&&v.current.disconnect()},[]);return(0,r.useEffect)(()=>{if(!o){v.current&&(v.current.disconnect(),v.current=null);return}return v.current||(v.current=new s),v.current.connect({url:t,onMessage:g,onStateChange:j,onError:b,reconnectInterval:l,maxReconnectAttempts:i,withCredentials:c}),()=>{v.current&&(v.current.disconnect(),v.current=null)}},[t,o,l,i,c,g,j,b]),{data:d,isConnected:"connected"===x,state:x,error:p,retryCount:y,reconnect:Z,disconnect:C}}},163:function(e,t,n){"use strict";n.d(t,{Y:function(){return a}});var r=n(35106),s=n(93757);function a(e){let{serverName:t,maxLines:n=500,enabled:a=!0,reconnectInterval:l=3e3}=e,[i,o]=(0,r.useState)([]);(0,r.useEffect)(()=>{o([])},[t]);let c=(0,r.useCallback)(e=>{let t;"server-log"===e.type?t=e.data.log:"log"in e&&"string"==typeof e.log&&(t=e.log),t&&o(e=>{let r=[...e,t];return r.length>n?r.slice(r.length-n):r})},[n]),{isConnected:d,reconnect:u,retryCount:x}=(0,s.D)({url:"/api/sse/servers/".concat(encodeURIComponent(t),"/logs"),onMessage:c,enabled:a,reconnectInterval:l});return{logs:i,isConnected:d,clearLogs:(0,r.useCallback)(()=>{o([])},[]),reconnect:u,retryCount:x}}},82925:function(e,t,n){"use strict";n.d(t,{KK:function(){return i},Lu:function(){return r},Xn:function(){return l},n3:function(){return s},xg:function(){return a}});let r={"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"},a=["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"],l=["server.create","server.delete","server.start","server.stop","server.restart"],i=["player.whitelist.add","player.whitelist.remove","player.ban","player.unban","player.op","player.deop","player.kick"]}},function(e){e.O(0,[8206,6812,9760,5004,7296,7436,1071,540,4416,2538,880,5511,55,2844,4219,8347,4841,7073,1658,9097,6727,9022,1055,6650,7648,5498,3669,2757,1744],function(){return e(e.s=59616)}),_N_E=e.O()}]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@minecraft-docker/mcctl-console",
3
- "version": "2.12.1",
3
+ "version": "2.13.0",
4
4
  "description": "Web management console for Docker Minecraft servers",
5
5
  "bin": {
6
6
  "mcctl-console": "bin/start.js"
@@ -57,7 +57,7 @@
57
57
  "@emotion/react": "^11.13.5",
58
58
  "@emotion/styled": "^11.13.5",
59
59
  "@lezer/highlight": "^1.2.3",
60
- "@minecraft-docker/shared": "^2.12.1",
60
+ "@minecraft-docker/shared": "^2.13.0",
61
61
  "@mui/icons-material": "^5.17.1",
62
62
  "@mui/material": "^5.17.1",
63
63
  "@mui/material-nextjs": "^5.17.1",
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2698],{69178:function(t,e,n){var a=n(8091);e.Z=void 0;var r=a(n(66758)),i=n(94655);e.Z=(0,r.default)((0,i.jsx)("path",{d:"M19 3h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1m2 14H7v-2h7zm3-4H7v-2h10zm0-4H7V7h10z"}),"Assignment")},46207:function(t,e,n){var a=n(8091);e.Z=void 0;var r=a(n(66758)),i=n(94655);e.Z=(0,r.default)((0,i.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-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z"}),"CheckCircle")},54617:function(t,e,n){var a=n(8091);e.Z=void 0;var r=a(n(66758)),i=n(94655);e.Z=(0,r.default)((0,i.jsx)("path",{d:"M5 13h14v-2H5zm-2 4h14v-2H3zM7 7v2h14V7z"}),"ClearAll")},15761:function(t,e,n){var a=n(8091);e.Z=void 0;var r=a(n(66758)),i=n(94655);e.Z=(0,r.default)((0,i.jsx)("path",{d:"M5 20h14v-2H5zM19 9h-4V3H9v6H5l7 7z"}),"Download")},43436:function(t,e,n){var a=n(8091);e.Z=void 0;var r=a(n(66758)),i=n(94655);e.Z=(0,r.default)((0,i.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-2h2zm0-4h-2V7h2z"}),"Error")},45354:function(t,e,n){var a=n(8091);e.Z=void 0;var r=a(n(66758)),i=n(94655);e.Z=(0,r.default)((0,i.jsx)("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),"ErrorOutline")},84284:function(t,e,n){var a=n(8091);e.Z=void 0;var r=a(n(66758)),i=n(94655);e.Z=(0,r.default)((0,i.jsx)("path",{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"}),"ExpandLess")},81960:function(t,e,n){var a=n(8091);e.Z=void 0;var r=a(n(66758)),i=n(94655);e.Z=(0,r.default)((0,i.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore")},78439:function(t,e,n){var a=n(8091);e.Z=void 0;var r=a(n(66758)),i=n(94655);e.Z=(0,r.default)((0,i.jsx)("circle",{cx:"12",cy:"12",r:"8"}),"FiberManualRecord")},50880:function(t,e,n){var a=n(8091);e.Z=void 0;var r=a(n(66758)),i=n(94655);e.Z=(0,r.default)((0,i.jsx)("path",{d:"M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z"}),"FilterList")},89161:function(t,e,n){var a=n(8091);e.Z=void 0;var r=a(n(66758)),i=n(94655);e.Z=(0,r.default)((0,i.jsx)("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"}),"KeyboardArrowDown")},60236:function(t,e,n){var a=n(8091);e.Z=void 0;var r=a(n(66758)),i=n(94655);e.Z=(0,r.default)((0,i.jsx)("path",{d:"M7.41 15.41 12 10.83l4.59 4.58L18 14l-6-6-6 6z"}),"KeyboardArrowUp")},30114:function(t,e,n){var a=n(8091);e.Z=void 0;var r=a(n(66758)),i=n(94655);e.Z=(0,r.default)((0,i.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 4m0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4"}),"Person")},87716:function(t,e,n){n.d(e,{Z:function(){return P}});var a=n(32324),r=n(81500),i=n(35106),o=n(70316),l=n(92019),s=n(67485),c=n(65951),d=n(34519),u=n(28057),p=n(30035),h=n(56874),v=n(83855),g=n(38481),m=n(11379),f=n(9049);function Z(t){return(0,f.ZP)("MuiCollapse",t)}(0,m.Z)("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);var b=n(94655);let x=["addEndListener","children","className","collapsedSize","component","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","orientation","style","timeout","TransitionComponent"],w=t=>{let{orientation:e,classes:n}=t;return(0,c.Z)({root:["root","".concat(e)],entered:["entered"],hidden:["hidden"],wrapper:["wrapper","".concat(e)],wrapperInner:["wrapperInner","".concat(e)]},Z,n)},y=(0,d.ZP)("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(t,e)=>{let{ownerState:n}=t;return[e.root,e[n.orientation],"entered"===n.state&&e.entered,"exited"===n.state&&!n.in&&"0px"===n.collapsedSize&&e.hidden]}})(t=>{let{theme:e,ownerState:n}=t;return(0,r.Z)({height:0,overflow:"hidden",transition:e.transitions.create("height")},"horizontal"===n.orientation&&{height:"auto",width:0,transition:e.transitions.create("width")},"entered"===n.state&&(0,r.Z)({height:"auto",overflow:"visible"},"horizontal"===n.orientation&&{width:"auto"}),"exited"===n.state&&!n.in&&"0px"===n.collapsedSize&&{visibility:"hidden"})}),C=(0,d.ZP)("div",{name:"MuiCollapse",slot:"Wrapper",overridesResolver:(t,e)=>e.wrapper})(t=>{let{ownerState:e}=t;return(0,r.Z)({display:"flex",width:"100%"},"horizontal"===e.orientation&&{width:"auto",height:"100%"})}),M=(0,d.ZP)("div",{name:"MuiCollapse",slot:"WrapperInner",overridesResolver:(t,e)=>e.wrapperInner})(t=>{let{ownerState:e}=t;return(0,r.Z)({width:"100%"},"horizontal"===e.orientation&&{width:"auto",height:"100%"})}),R=i.forwardRef(function(t,e){let n=(0,u.i)({props:t,name:"MuiCollapse"}),{addEndListener:c,children:d,className:m,collapsedSize:f="0px",component:Z,easing:R,in:P,onEnter:I,onEntered:S,onEntering:j,onExit:B,onExited:L,onExiting:k,orientation:z="vertical",style:A,timeout:T=p.x9.standard,TransitionComponent:N=l.ZP}=n,H=(0,a.Z)(n,x),E=(0,r.Z)({},n,{orientation:z,collapsedSize:f}),F=w(E),V=(0,v.Z)(),D=(0,s.Z)(),O=i.useRef(null),W=i.useRef(),_="number"==typeof f?"".concat(f,"px"):f,q="horizontal"===z,X=q?"width":"height",G=i.useRef(null),K=(0,g.Z)(e,G),U=t=>e=>{if(t){let n=G.current;void 0===e?t(n):t(n,e)}},J=()=>O.current?O.current[q?"clientWidth":"clientHeight"]:0,Q=U((t,e)=>{O.current&&q&&(O.current.style.position="absolute"),t.style[X]=_,I&&I(t,e)}),Y=U((t,e)=>{let n=J();O.current&&q&&(O.current.style.position="");let{duration:a,easing:r}=(0,h.C)({style:A,timeout:T,easing:R},{mode:"enter"});if("auto"===T){let e=V.transitions.getAutoHeightDuration(n);t.style.transitionDuration="".concat(e,"ms"),W.current=e}else t.style.transitionDuration="string"==typeof a?a:"".concat(a,"ms");t.style[X]="".concat(n,"px"),t.style.transitionTimingFunction=r,j&&j(t,e)}),$=U((t,e)=>{t.style[X]="auto",S&&S(t,e)}),tt=U(t=>{t.style[X]="".concat(J(),"px"),B&&B(t)}),te=U(L),tn=U(t=>{let e=J(),{duration:n,easing:a}=(0,h.C)({style:A,timeout:T,easing:R},{mode:"exit"});if("auto"===T){let n=V.transitions.getAutoHeightDuration(e);t.style.transitionDuration="".concat(n,"ms"),W.current=n}else t.style.transitionDuration="string"==typeof n?n:"".concat(n,"ms");t.style[X]=_,t.style.transitionTimingFunction=a,k&&k(t)});return(0,b.jsx)(N,(0,r.Z)({in:P,onEnter:Q,onEntered:$,onEntering:Y,onExit:tt,onExited:te,onExiting:tn,addEndListener:t=>{"auto"===T&&D.start(W.current||0,t),c&&c(G.current,t)},nodeRef:G,timeout:"auto"===T?null:T},H,{children:(t,e)=>(0,b.jsx)(y,(0,r.Z)({as:Z,className:(0,o.Z)(F.root,m,{entered:F.entered,exited:!P&&"0px"===_&&F.hidden}[t]),style:(0,r.Z)({[q?"minWidth":"minHeight"]:_},A),ref:K},e,{ownerState:(0,r.Z)({},E,{state:t}),children:(0,b.jsx)(C,{ownerState:(0,r.Z)({},E,{state:t}),className:F.wrapper,ref:O,children:(0,b.jsx)(M,{ownerState:(0,r.Z)({},E,{state:t}),className:F.wrapperInner,children:d})})}))}))});R.muiSupportAuto=!0;var P=R},69123:function(t,e,n){var a=n(32324),r=n(81500),i=n(35106),o=n(70316),l=n(65951),s=n(64577),c=n(34519),d=n(28057),u=n(16945),p=n(94655);let h=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],v=t=>{let{absolute:e,children:n,classes:a,flexItem:r,light:i,orientation:o,textAlign:s,variant:c}=t;return(0,l.Z)({root:["root",e&&"absolute",c,i&&"light","vertical"===o&&"vertical",r&&"flexItem",n&&"withChildren",n&&"vertical"===o&&"withChildrenVertical","right"===s&&"vertical"!==o&&"textAlignRight","left"===s&&"vertical"!==o&&"textAlignLeft"],wrapper:["wrapper","vertical"===o&&"wrapperVertical"]},u.V,a)},g=(0,c.ZP)("div",{name:"MuiDivider",slot:"Root",overridesResolver:(t,e)=>{let{ownerState:n}=t;return[e.root,n.absolute&&e.absolute,e[n.variant],n.light&&e.light,"vertical"===n.orientation&&e.vertical,n.flexItem&&e.flexItem,n.children&&e.withChildren,n.children&&"vertical"===n.orientation&&e.withChildrenVertical,"right"===n.textAlign&&"vertical"!==n.orientation&&e.textAlignRight,"left"===n.textAlign&&"vertical"!==n.orientation&&e.textAlignLeft]}})(t=>{let{theme:e,ownerState:n}=t;return(0,r.Z)({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin"},n.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},n.light&&{borderColor:e.vars?"rgba(".concat(e.vars.palette.dividerChannel," / 0.08)"):(0,s.Fq)(e.palette.divider,.08)},"inset"===n.variant&&{marginLeft:72},"middle"===n.variant&&"horizontal"===n.orientation&&{marginLeft:e.spacing(2),marginRight:e.spacing(2)},"middle"===n.variant&&"vertical"===n.orientation&&{marginTop:e.spacing(1),marginBottom:e.spacing(1)},"vertical"===n.orientation&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},n.flexItem&&{alignSelf:"stretch",height:"auto"})},t=>{let{ownerState:e}=t;return(0,r.Z)({},e.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}})},t=>{let{theme:e,ownerState:n}=t;return(0,r.Z)({},n.children&&"vertical"!==n.orientation&&{"&::before, &::after":{width:"100%",borderTop:"thin solid ".concat((e.vars||e).palette.divider),borderTopStyle:"inherit"}})},t=>{let{theme:e,ownerState:n}=t;return(0,r.Z)({},n.children&&"vertical"===n.orientation&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:"thin solid ".concat((e.vars||e).palette.divider),borderLeftStyle:"inherit"}})},t=>{let{ownerState:e}=t;return(0,r.Z)({},"right"===e.textAlign&&"vertical"!==e.orientation&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},"left"===e.textAlign&&"vertical"!==e.orientation&&{"&::before":{width:"10%"},"&::after":{width:"90%"}})}),m=(0,c.ZP)("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(t,e)=>{let{ownerState:n}=t;return[e.wrapper,"vertical"===n.orientation&&e.wrapperVertical]}})(t=>{let{theme:e,ownerState:n}=t;return(0,r.Z)({display:"inline-block",paddingLeft:"calc(".concat(e.spacing(1)," * 1.2)"),paddingRight:"calc(".concat(e.spacing(1)," * 1.2)")},"vertical"===n.orientation&&{paddingTop:"calc(".concat(e.spacing(1)," * 1.2)"),paddingBottom:"calc(".concat(e.spacing(1)," * 1.2)")})}),f=i.forwardRef(function(t,e){let n=(0,d.i)({props:t,name:"MuiDivider"}),{absolute:i=!1,children:l,className:s,component:c=l?"div":"hr",flexItem:u=!1,light:f=!1,orientation:Z="horizontal",role:b="hr"!==c?"separator":void 0,textAlign:x="center",variant:w="fullWidth"}=n,y=(0,a.Z)(n,h),C=(0,r.Z)({},n,{absolute:i,component:c,flexItem:u,light:f,orientation:Z,role:b,textAlign:x,variant:w}),M=v(C);return(0,p.jsx)(g,(0,r.Z)({as:c,className:(0,o.Z)(M.root,s),role:b,ref:e,ownerState:C},y,{children:l?(0,p.jsx)(m,{className:M.wrapper,ownerState:C,children:l}):null}))});f.muiSkipListHighlight=!0,e.Z=f},16945:function(t,e,n){n.d(e,{V:function(){return i}});var a=n(11379),r=n(9049);function i(t){return(0,r.ZP)("MuiDivider",t)}let o=(0,a.Z)("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]);e.Z=o},33326:function(t,e,n){n.d(e,{f:function(){return i}});var a=n(11379),r=n(9049);function i(t){return(0,r.ZP)("MuiListItemIcon",t)}let o=(0,a.Z)("MuiListItemIcon",["root","alignItemsFlexStart"]);e.Z=o},7178:function(t,e,n){n.d(e,{Z:function(){return I}});var a=n(32324),r=n(81500),i=n(35106),o=n(70316),l=n(65951),s=n(64577),c=n(34519),d=n(15651),u=n(28057),p=n(75084),h=n(29084),v=n(65425),g=n(38481),m=n(16945),f=n(33326),Z=n(64769),b=n(11379),x=n(9049);function w(t){return(0,x.ZP)("MuiMenuItem",t)}let y=(0,b.Z)("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]);var C=n(94655);let M=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],R=t=>{let{disabled:e,dense:n,divider:a,disableGutters:i,selected:o,classes:s}=t,c=(0,l.Z)({root:["root",n&&"dense",e&&"disabled",!i&&"gutters",a&&"divider",o&&"selected"]},w,s);return(0,r.Z)({},s,c)},P=(0,c.ZP)(h.Z,{shouldForwardProp:t=>(0,d.Z)(t)||"classes"===t,name:"MuiMenuItem",slot:"Root",overridesResolver:(t,e)=>{let{ownerState:n}=t;return[e.root,n.dense&&e.dense,n.divider&&e.divider,!n.disableGutters&&e.gutters]}})(t=>{let{theme:e,ownerState:n}=t;return(0,r.Z)({},e.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!n.disableGutters&&{paddingLeft:16,paddingRight:16},n.divider&&{borderBottom:"1px solid ".concat((e.vars||e).palette.divider),backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},["&.".concat(y.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(y.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(y.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(y.focusVisible)]:{backgroundColor:(e.vars||e).palette.action.focus},["&.".concat(y.disabled)]:{opacity:(e.vars||e).palette.action.disabledOpacity},["& + .".concat(m.Z.root)]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},["& + .".concat(m.Z.inset)]:{marginLeft:52},["& .".concat(Z.Z.root)]:{marginTop:0,marginBottom:0},["& .".concat(Z.Z.inset)]:{paddingLeft:36},["& .".concat(f.Z.root)]:{minWidth:36}},!n.dense&&{[e.breakpoints.up("sm")]:{minHeight:"auto"}},n.dense&&(0,r.Z)({minHeight:32,paddingTop:4,paddingBottom:4},e.typography.body2,{["& .".concat(f.Z.root," svg")]:{fontSize:"1.25rem"}}))});var I=i.forwardRef(function(t,e){let n;let l=(0,u.i)({props:t,name:"MuiMenuItem"}),{autoFocus:s=!1,component:c="li",dense:d=!1,divider:h=!1,disableGutters:m=!1,focusVisibleClassName:f,role:Z="menuitem",tabIndex:b,className:x}=l,w=(0,a.Z)(l,M),y=i.useContext(p.Z),I=i.useMemo(()=>({dense:d||y.dense||!1,disableGutters:m}),[y.dense,d,m]),S=i.useRef(null);(0,v.Z)(()=>{s&&S.current&&S.current.focus()},[s]);let j=(0,r.Z)({},l,{dense:I.dense,divider:h,disableGutters:m}),B=R(l),L=(0,g.Z)(S,e);return l.disabled||(n=void 0!==b?b:-1),(0,C.jsx)(p.Z.Provider,{value:I,children:(0,C.jsx)(P,(0,r.Z)({ref:L,role:Z,tabIndex:n,component:c,focusVisibleClassName:(0,o.Z)(B.focusVisible,f),className:(0,o.Z)(B.root,x)},w,{ownerState:j,classes:B}))})})},10721:function(t,e,n){n.d(e,{Z:function(){return L}});var a=n(16295),r=n(32324),i=n(81500),o=n(35106),l=n(70316),s=n(41060),c=n(65951),d=n(76492),u=n(34519),p=n(28057),h=n(11379),v=n(9049);function g(t){return(0,v.ZP)("MuiSkeleton",t)}(0,h.Z)("MuiSkeleton",["root","text","rectangular","rounded","circular","pulse","wave","withChildren","fitContent","heightAuto"]);var m=n(94655);function f(){let t=(0,a._)(["\n 0% {\n opacity: 1;\n }\n\n 50% {\n opacity: 0.4;\n }\n\n 100% {\n opacity: 1;\n }\n"]);return f=function(){return t},t}function Z(){let t=(0,a._)(["\n 0% {\n transform: translateX(-100%);\n }\n\n 50% {\n /* +0.5s of delay between each loop */\n transform: translateX(100%);\n }\n\n 100% {\n transform: translateX(100%);\n }\n"]);return Z=function(){return t},t}function b(){let t=(0,a._)(["\n animation: "," 2s ease-in-out 0.5s infinite;\n "]);return b=function(){return t},t}function x(){let t=(0,a._)(["\n position: relative;\n overflow: hidden;\n\n /* Fix bug in Safari https://bugs.webkit.org/show_bug.cgi?id=68196 */\n -webkit-mask-image: -webkit-radial-gradient(white, black);\n\n &::after {\n animation: "," 2s linear 0.5s infinite;\n background: linear-gradient(\n 90deg,\n transparent,\n ",",\n transparent\n );\n content: '';\n position: absolute;\n transform: translateX(-100%); /* Avoid flash during server-side hydration */\n bottom: 0;\n left: 0;\n right: 0;\n top: 0;\n }\n "]);return x=function(){return t},t}let w=["animation","className","component","height","style","variant","width"],y=t=>t,C,M,R,P,I=t=>{let{classes:e,variant:n,animation:a,hasChildren:r,width:i,height:o}=t;return(0,c.Z)({root:["root",n,a,r&&"withChildren",r&&!i&&"fitContent",r&&!o&&"heightAuto"]},g,e)},S=(0,s.F4)(C||(C=y(f()))),j=(0,s.F4)(M||(M=y(Z()))),B=(0,u.ZP)("span",{name:"MuiSkeleton",slot:"Root",overridesResolver:(t,e)=>{let{ownerState:n}=t;return[e.root,e[n.variant],!1!==n.animation&&e[n.animation],n.hasChildren&&e.withChildren,n.hasChildren&&!n.width&&e.fitContent,n.hasChildren&&!n.height&&e.heightAuto]}})(t=>{let{theme:e,ownerState:n}=t,a=String(e.shape.borderRadius).match(/[\d.\-+]*\s*(.*)/)[1]||"px",r=parseFloat(e.shape.borderRadius);return(0,i.Z)({display:"block",backgroundColor:e.vars?e.vars.palette.Skeleton.bg:(0,d.Fq)(e.palette.text.primary,"light"===e.palette.mode?.11:.13),height:"1.2em"},"text"===n.variant&&{marginTop:0,marginBottom:0,height:"auto",transformOrigin:"0 55%",transform:"scale(1, 0.60)",borderRadius:"".concat(r).concat(a,"/").concat(Math.round(r/.6*10)/10).concat(a),"&:empty:before":{content:'"\\00a0"'}},"circular"===n.variant&&{borderRadius:"50%"},"rounded"===n.variant&&{borderRadius:(e.vars||e).shape.borderRadius},n.hasChildren&&{"& > *":{visibility:"hidden"}},n.hasChildren&&!n.width&&{maxWidth:"fit-content"},n.hasChildren&&!n.height&&{height:"auto"})},t=>{let{ownerState:e}=t;return"pulse"===e.animation&&(0,s.iv)(R||(R=y(b(),0)),S)},t=>{let{ownerState:e,theme:n}=t;return"wave"===e.animation&&(0,s.iv)(P||(P=y(x(),0,0)),j,(n.vars||n).palette.action.hover)});var L=o.forwardRef(function(t,e){let n=(0,p.i)({props:t,name:"MuiSkeleton"}),{animation:a="pulse",className:o,component:s="span",height:c,style:d,variant:u="text",width:h}=n,v=(0,r.Z)(n,w),g=(0,i.Z)({},n,{animation:a,component:s,variant:u,hasChildren:!!v.children}),f=I(g);return(0,m.jsx)(B,(0,i.Z)({as:s,ref:e,className:(0,l.Z)(f.root,o),ownerState:g},v,{style:(0,i.Z)({width:h,height:c},d)}))})},53281:function(t,e,n){n.d(e,{Z:function(){return f}});var a=n(81500),r=n(32324),i=n(35106),o=n(70316),l=n(65951),s=n(28057),c=n(34519),d=n(11379),u=n(9049);function p(t){return(0,u.ZP)("MuiTableContainer",t)}(0,d.Z)("MuiTableContainer",["root"]);var h=n(94655);let v=["className","component"],g=t=>{let{classes:e}=t;return(0,l.Z)({root:["root"]},p,e)},m=(0,c.ZP)("div",{name:"MuiTableContainer",slot:"Root",overridesResolver:(t,e)=>e.root})({width:"100%",overflowX:"auto"});var f=i.forwardRef(function(t,e){let n=(0,s.i)({props:t,name:"MuiTableContainer"}),{className:i,component:l="div"}=n,c=(0,r.Z)(n,v),d=(0,a.Z)({},n,{component:l}),u=g(d);return(0,h.jsx)(m,(0,a.Z)({ref:e,as:l,className:(0,o.Z)(u.root,i),ownerState:d},c))})},6406:function(t,e,n){n.d(e,{Z:function(){return W}});var a,r=n(32324),i=n(81500),o=n(35106),l=n(70316),s=n(65951),c=n(23225),d=n(34519),u=n(28057),p=n(47684),h=n(7178),v=n(62328),g=n(47001),m=n(62108),f=n(16501),Z=n(6858),b=n(92302),x=n(79983),w=n(61626),y=n(94655),C=(0,w.Z)((0,y.jsx)("path",{d:"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"}),"LastPage"),M=(0,w.Z)((0,y.jsx)("path",{d:"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"}),"FirstPage");let R=["backIconButtonProps","count","disabled","getItemAriaLabel","nextIconButtonProps","onPageChange","page","rowsPerPage","showFirstButton","showLastButton","slots","slotProps"],P=o.forwardRef(function(t,e){var n,a,o,l,s,c,d,u;let{backIconButtonProps:p,count:h,disabled:v=!1,getItemAriaLabel:g,nextIconButtonProps:m,onPageChange:w,page:P,rowsPerPage:I,showFirstButton:S,showLastButton:j,slots:B={},slotProps:L={}}=t,k=(0,r.Z)(t,R),z=(0,f.V)(),A=null!=(n=B.firstButton)?n:x.Z,T=null!=(a=B.lastButton)?a:x.Z,N=null!=(o=B.nextButton)?o:x.Z,H=null!=(l=B.previousButton)?l:x.Z,E=null!=(s=B.firstButtonIcon)?s:M,F=null!=(c=B.lastButtonIcon)?c:C,V=null!=(d=B.nextButtonIcon)?d:b.Z,D=null!=(u=B.previousButtonIcon)?u:Z.Z,O=z?T:A,W=z?N:H,_=z?H:N,q=z?A:T,X=z?L.lastButton:L.firstButton,G=z?L.nextButton:L.previousButton,K=z?L.previousButton:L.nextButton,U=z?L.firstButton:L.lastButton;return(0,y.jsxs)("div",(0,i.Z)({ref:e},k,{children:[S&&(0,y.jsx)(O,(0,i.Z)({onClick:t=>{w(t,0)},disabled:v||0===P,"aria-label":g("first",P),title:g("first",P)},X,{children:z?(0,y.jsx)(F,(0,i.Z)({},L.lastButtonIcon)):(0,y.jsx)(E,(0,i.Z)({},L.firstButtonIcon))})),(0,y.jsx)(W,(0,i.Z)({onClick:t=>{w(t,P-1)},disabled:v||0===P,color:"inherit","aria-label":g("previous",P),title:g("previous",P)},null!=G?G:p,{children:z?(0,y.jsx)(V,(0,i.Z)({},L.nextButtonIcon)):(0,y.jsx)(D,(0,i.Z)({},L.previousButtonIcon))})),(0,y.jsx)(_,(0,i.Z)({onClick:t=>{w(t,P+1)},disabled:v||-1!==h&&P>=Math.ceil(h/I)-1,color:"inherit","aria-label":g("next",P),title:g("next",P)},null!=K?K:m,{children:z?(0,y.jsx)(D,(0,i.Z)({},L.previousButtonIcon)):(0,y.jsx)(V,(0,i.Z)({},L.nextButtonIcon))})),j&&(0,y.jsx)(q,(0,i.Z)({onClick:t=>{w(t,Math.max(0,Math.ceil(h/I)-1))},disabled:v||P>=Math.ceil(h/I)-1,"aria-label":g("last",P),title:g("last",P)},U,{children:z?(0,y.jsx)(E,(0,i.Z)({},L.firstButtonIcon)):(0,y.jsx)(F,(0,i.Z)({},L.lastButtonIcon))}))]}))});var I=n(88207),S=n(11379),j=n(9049);function B(t){return(0,j.ZP)("MuiTablePagination",t)}let L=(0,S.Z)("MuiTablePagination",["root","toolbar","spacer","selectLabel","selectRoot","select","selectIcon","input","menuItem","displayedRows","actions"]),k=["ActionsComponent","backIconButtonProps","className","colSpan","component","count","disabled","getItemAriaLabel","labelDisplayedRows","labelRowsPerPage","nextIconButtonProps","onPageChange","onRowsPerPageChange","page","rowsPerPage","rowsPerPageOptions","SelectProps","showFirstButton","showLastButton","slotProps","slots"],z=(0,d.ZP)(g.Z,{name:"MuiTablePagination",slot:"Root",overridesResolver:(t,e)=>e.root})(t=>{let{theme:e}=t;return{overflow:"auto",color:(e.vars||e).palette.text.primary,fontSize:e.typography.pxToRem(14),"&:last-child":{padding:0}}}),A=(0,d.ZP)(m.Z,{name:"MuiTablePagination",slot:"Toolbar",overridesResolver:(t,e)=>(0,i.Z)({["& .".concat(L.actions)]:e.actions},e.toolbar)})(t=>{let{theme:e}=t;return{minHeight:52,paddingRight:2,["".concat(e.breakpoints.up("xs")," and (orientation: landscape)")]:{minHeight:52},[e.breakpoints.up("sm")]:{minHeight:52,paddingRight:2},["& .".concat(L.actions)]:{flexShrink:0,marginLeft:20}}}),T=(0,d.ZP)("div",{name:"MuiTablePagination",slot:"Spacer",overridesResolver:(t,e)=>e.spacer})({flex:"1 1 100%"}),N=(0,d.ZP)("p",{name:"MuiTablePagination",slot:"SelectLabel",overridesResolver:(t,e)=>e.selectLabel})(t=>{let{theme:e}=t;return(0,i.Z)({},e.typography.body2,{flexShrink:0})}),H=(0,d.ZP)(v.Z,{name:"MuiTablePagination",slot:"Select",overridesResolver:(t,e)=>(0,i.Z)({["& .".concat(L.selectIcon)]:e.selectIcon,["& .".concat(L.select)]:e.select},e.input,e.selectRoot)})({color:"inherit",fontSize:"inherit",flexShrink:0,marginRight:32,marginLeft:8,["& .".concat(L.select)]:{paddingLeft:8,paddingRight:24,textAlign:"right",textAlignLast:"right"}}),E=(0,d.ZP)(h.Z,{name:"MuiTablePagination",slot:"MenuItem",overridesResolver:(t,e)=>e.menuItem})({}),F=(0,d.ZP)("p",{name:"MuiTablePagination",slot:"DisplayedRows",overridesResolver:(t,e)=>e.displayedRows})(t=>{let{theme:e}=t;return(0,i.Z)({},e.typography.body2,{flexShrink:0})});function V(t){let{from:e,to:n,count:a}=t;return"".concat(e,"–").concat(n," of ").concat(-1!==a?a:"more than ".concat(n))}function D(t){return"Go to ".concat(t," page")}let O=t=>{let{classes:e}=t;return(0,s.Z)({root:["root"],toolbar:["toolbar"],spacer:["spacer"],selectLabel:["selectLabel"],select:["select"],input:["input"],selectIcon:["selectIcon"],menuItem:["menuItem"],displayedRows:["displayedRows"],actions:["actions"]},B,e)};var W=o.forwardRef(function(t,e){var n;let s;let d=(0,u.i)({props:t,name:"MuiTablePagination"}),{ActionsComponent:h=P,backIconButtonProps:v,className:m,colSpan:f,component:Z=g.Z,count:b,disabled:x=!1,getItemAriaLabel:w=D,labelDisplayedRows:C=V,labelRowsPerPage:M="Rows per page:",nextIconButtonProps:R,onPageChange:S,onRowsPerPageChange:j,page:B,rowsPerPage:L,rowsPerPageOptions:W=[10,25,50,100],SelectProps:_={},showFirstButton:q=!1,showLastButton:X=!1,slotProps:G={},slots:K={}}=d,U=(0,r.Z)(d,k),J=O(d),Q=null!=(n=null==G?void 0:G.select)?n:_,Y=Q.native?"option":E;(Z===g.Z||"td"===Z)&&(s=f||1e3);let $=(0,I.Z)(Q.id),tt=(0,I.Z)(Q.labelId);return(0,y.jsx)(z,(0,i.Z)({colSpan:s,ref:e,as:Z,ownerState:d,className:(0,l.Z)(J.root,m)},U,{children:(0,y.jsxs)(A,{className:J.toolbar,children:[(0,y.jsx)(T,{className:J.spacer}),W.length>1&&(0,y.jsx)(N,{className:J.selectLabel,id:tt,children:M}),W.length>1&&(0,y.jsx)(H,(0,i.Z)({variant:"standard"},!Q.variant&&{input:a||(a=(0,y.jsx)(p.ZP,{}))},{value:L,onChange:j,id:$,labelId:tt},Q,{classes:(0,i.Z)({},Q.classes,{root:(0,l.Z)(J.input,J.selectRoot,(Q.classes||{}).root),select:(0,l.Z)(J.select,(Q.classes||{}).select),icon:(0,l.Z)(J.selectIcon,(Q.classes||{}).icon)}),disabled:x,children:W.map(t=>(0,o.createElement)(Y,(0,i.Z)({},!(0,c.Z)(Y)&&{ownerState:d},{className:J.menuItem,key:t.label?t.label:t,value:t.value?t.value:t}),t.label?t.label:t))})),(0,y.jsx)(F,{className:J.displayedRows,children:C({from:0===b?0:B*L+1,to:-1===b?(B+1)*L:-1===L?b:Math.min(b,(B+1)*L),count:-1===b?-1:b,page:B})}),(0,y.jsx)(h,{className:J.actions,backIconButtonProps:v,count:b,nextIconButtonProps:R,onPageChange:S,page:B,rowsPerPage:L,showFirstButton:q,showLastButton:X,slotProps:G.actions,slots:K.actions,getItemAriaLabel:w,disabled:x})]})}))})}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4036],{34675:function(t,e,r){"use strict";var n=r(8091);e.Z=void 0;var o=n(r(66758)),a=r(94655);e.Z=(0,o.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 n=r(8091);e.Z=void 0;var o=n(r(66758)),a=r(94655);e.Z=(0,o.default)((0,a.jsx)("path",{d:"M3 13h8V3H3zm0 8h8v-6H3zm10 0h8V11h-8zm0-18v6h8V3z"}),"Dashboard")},75845:function(t,e,r){"use strict";var n=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 n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if("default"!==a&&Object.prototype.hasOwnProperty.call(t,a)){var s=o?Object.getOwnPropertyDescriptor(t,a):null;s&&(s.get||s.set)?Object.defineProperty(n,a,s):n[a]=t[a]}n.default=t,r&&r.set(t,n)}}(r(35106));var o=n(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,o.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")},61505:function(t,e,r){"use strict";var n=r(8091);e.Z=void 0;var o=n(r(66758)),a=r(94655);e.Z=(0,o.default)((0,a.jsx)("path",{d:"M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z"}),"Menu")},43880:function(t,e,r){"use strict";var n=r(8091);e.Z=void 0;var o=n(r(66758)),a=r(94655);e.Z=(0,o.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")},35847:function(t,e,r){"use strict";var n=r(8091);e.Z=void 0;var o=n(r(66758)),a=r(94655);e.Z=(0,o.default)((0,a.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"}),"People")},84974:function(t,e,r){"use strict";var n=r(8091);e.Z=void 0;var o=n(r(66758)),a=r(94655);e.Z=(0,o.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 n=r(8091);e.Z=void 0;var o=n(r(66758)),a=r(94655);e.Z=(0,o.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 n=r(61626),o=r(94655);e.Z=(0,n.Z)((0,o.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 n=r(61626),o=r(94655);e.Z=(0,n.Z)((0,o.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 n=r(61626),o=r(94655);e.Z=(0,n.Z)((0,o.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 n=r(61626),o=r(94655);e.Z=(0,n.Z)((0,o.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 n=r(61626),o=r(94655);e.Z=(0,n.Z)((0,o.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 n.createSvgIcon}});var n=r(26505)},56275:function(t,e,r){"use strict";r.d(e,{Z:function(){return x}});var n=r(32324),o=r(81500),a=r(35106),i=r(70316),s=r(65951),c=r(34519),l=r(28057),u=r(38762),d=r(69899),p=r(11379),f=r(9049);function v(t){return(0,f.ZP)("MuiAppBar",t)}(0,p.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:n}=t,o={root:["root","color".concat((0,u.Z)(e)),"position".concat((0,u.Z)(r))]};return(0,s.Z)(o,v,n)},b=(t,e)=>t?"".concat(null==t?void 0:t.replace(")",""),", ").concat(e,")"):e,Z=(0,c.ZP)(d.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,n="light"===e.palette.mode?e.palette.grey[100]:e.palette.grey[900];return(0,o.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,o.Z)({},"default"===r.color&&{backgroundColor:n,color:e.palette.getContrastText(n)},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,o.Z)({backgroundColor:"transparent",color:"inherit"},"dark"===e.palette.mode&&{backgroundImage:"none"})),e.vars&&(0,o.Z)({},"default"===r.color&&{"--AppBar-background":r.enableColorOnDark?e.vars.palette.AppBar.defaultBg:b(e.vars.palette.AppBar.darkBg,e.vars.palette.AppBar.defaultBg),"--AppBar-color":r.enableColorOnDark?e.vars.palette.text.primary:b(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:b(e.vars.palette.AppBar.darkBg,e.vars.palette[r.color].main),"--AppBar-color":r.enableColorOnDark?e.vars.palette[r.color].contrastText:b(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:s="primary",enableColorOnDark:c=!1,position:u="fixed"}=r,d=(0,n.Z)(r,h),p=(0,o.Z)({},r,{color:s,position:u,enableColorOnDark:c}),f=g(p);return(0,m.jsx)(Z,(0,o.Z)({square:!0,component:"header",ownerState:p,elevation:4,className:(0,i.Z)(f.root,a,"fixed"===u&&"mui-fixed"),ref:e},d))})},67337:function(t,e,r){"use strict";r.d(e,{Z:function(){return k}});var n=r(32324),o=r(81500),a=r(35106),i=r(70316),s=r(9049),c=r(65951),l=r(6014),u=r(14189),d=r(48442),p=r(8557),f=r(94655);let v=["className","component","disableGutters","fixed","maxWidth","classes"],m=(0,p.Z)(),h=(0,d.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}),b=(t,e)=>{let{classes:r,fixed:n,disableGutters:o,maxWidth:a}=t,i={root:["root",a&&`maxWidth${(0,l.Z)(String(a))}`,n&&"fixed",o&&"disableGutters"]};return(0,c.Z)(i,t=>(0,s.ZP)(e,t),r)};var Z=r(38762),x=r(34519),y=r(28057),k=function(t={}){let{createStyledComponent:e=h,useThemeProps:r=g,componentName:s="MuiContainer"}=t,c=e(({theme:t,ownerState:e})=>(0,o.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 n=t.breakpoints.values[r];return 0!==n&&(e[t.breakpoints.up(r)]={maxWidth:`${n}${t.breakpoints.unit}`}),e},{}),({theme:t,ownerState:e})=>(0,o.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:d=!1,fixed:p=!1,maxWidth:m="lg"}=a,h=(0,n.Z)(a,v),g=(0,o.Z)({},a,{component:u,disableGutters:d,fixed:p,maxWidth:m}),Z=b(g,s);return(0,f.jsx)(c,(0,o.Z)({as:u,ownerState:g,className:(0,i.Z)(Z.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,Z.Z)(String(r.maxWidth)))],r.fixed&&e.fixed,r.disableGutters&&e.disableGutters]}}),useThemeProps:t=>(0,y.i)({props:t,name:"MuiContainer"})})},49954:function(t,e,r){"use strict";var n=r(32324),o=r(81500),a=r(35106),i=r(70316),s=r(65951),c=r(64577),l=r(34519),u=r(15651),d=r(28057),p=r(29084),f=r(65425),v=r(38481),m=r(75084),h=r(12721),g=r(94655);let b=["alignItems","autoFocus","component","children","dense","disableGutters","divider","focusVisibleClassName","selected","className"],Z=t=>{let{alignItems:e,classes:r,dense:n,disabled:a,disableGutters:i,divider:c,selected:l}=t,u=(0,s.Z)({root:["root",n&&"dense",!i&&"gutters",c&&"divider",a&&"disabled","flex-start"===e&&"alignItemsFlexStart",l&&"selected"]},h.t,r);return(0,o.Z)({},r,u)},x=(0,l.ZP)(p.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,o.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,c.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,c.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,c.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,c.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})}),y=a.forwardRef(function(t,e){let r=(0,d.i)({props:t,name:"MuiListItemButton"}),{alignItems:s="center",autoFocus:c=!1,component:l="div",children:u,dense:p=!1,disableGutters:h=!1,divider:y=!1,focusVisibleClassName:k,selected:C=!1,className:M}=r,S=(0,n.Z)(r,b),O=a.useContext(m.Z),z=a.useMemo(()=>({dense:p||O.dense||!1,alignItems:s,disableGutters:h}),[s,O.dense,p,h]),B=a.useRef(null);(0,f.Z)(()=>{c&&B.current&&B.current.focus()},[c]);let j=(0,o.Z)({},r,{alignItems:s,dense:z.dense,disableGutters:h,divider:y,selected:C}),I=Z(j),P=(0,v.Z)(B,e);return(0,g.jsx)(m.Z.Provider,{value:z,children:(0,g.jsx)(x,(0,o.Z)({ref:P,href:S.href||S.to,component:(S.href||S.to)&&"div"===l?"button":l,focusVisibleClassName:(0,i.Z)(I.focusVisible,k),ownerState:j,className:(0,i.Z)(I.root,M)},S,{classes:I,children:u}))})});e.Z=y},27350:function(t,e,r){"use strict";var n=r(34834);e.Z=n.Z},26505:function(t,e,r){"use strict";r.r(e),r.d(e,{capitalize:function(){return o.Z},createChainedFunction:function(){return a.Z},createSvgIcon:function(){return i.Z},debounce:function(){return s.Z},deprecatedPropType:function(){return c},isMuiElement:function(){return l.Z},ownerDocument:function(){return u.Z},ownerWindow:function(){return d.Z},requirePropFactory:function(){return p},setRef:function(){return f},unstable_ClassNameGenerator:function(){return y},unstable_useEnhancedEffect:function(){return v.Z},unstable_useId:function(){return m.Z},unsupportedProp:function(){return h},useControlled:function(){return g.Z},useEventCallback:function(){return b.Z},useForkRef:function(){return Z.Z},useIsFocusVisible:function(){return x.Z}});var n=r(74055),o=r(38762),a=r(27350),i=r(61626),s=r(19521),c=function(t,e){return()=>null},l=r(9290),u=r(34713),d=r(99466);r(81500);var p=function(t,e){return()=>null},f=r(25880).Z,v=r(65425),m=r(88207),h=function(t,e,r,n,o){return null},g=r(18280),b=r(10620),Z=r(38481),x=r(22125);let y={configure:t=>{n.Z.configure(t)}}},88207:function(t,e,r){"use strict";var n=r(40552);e.Z=n.Z},31477:function(t,e,r){var n,o;void 0!==(o="function"==typeof(n=function(){var t,e,r,n={};n.version="0.2.0";var o=n.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}n.configure=function(t){var e,r;for(e in t)void 0!==(r=t[e])&&t.hasOwnProperty(e)&&(o[e]=r);return this},n.status=null,n.set=function(t){var e=n.isStarted();t=a(t,o.minimum,1),n.status=1===t?null:t;var r=n.render(!e),c=r.querySelector(o.barSelector),l=o.speed,u=o.easing;return r.offsetWidth,i(function(e){var a,i;""===o.positionUsing&&(o.positionUsing=n.getPositioningCSS()),s(c,(a=t,(i="translate3d"===o.positionUsing?{transform:"translate3d("+(-1+a)*100+"%,0,0)"}:"translate"===o.positionUsing?{transform:"translate("+(-1+a)*100+"%,0)"}:{"margin-left":(-1+a)*100+"%"}).transition="all "+l+"ms "+u,i)),1===t?(s(r,{transition:"none",opacity:1}),r.offsetWidth,setTimeout(function(){s(r,{transition:"all "+l+"ms linear",opacity:0}),setTimeout(function(){n.remove(),e()},l)},l)):setTimeout(e,l)}),this},n.isStarted=function(){return"number"==typeof n.status},n.start=function(){n.status||n.set(0);var t=function(){setTimeout(function(){n.status&&(n.trickle(),t())},o.trickleSpeed)};return o.trickle&&t(),this},n.done=function(t){return t||n.status?n.inc(.3+.5*Math.random()).set(1):this},n.inc=function(t){var e=n.status;return e?("number"!=typeof t&&(t=(1-e)*a(Math.random()*e,.1,.95)),e=a(e+t,0,.994),n.set(e)):n.start()},n.trickle=function(){return n.inc(Math.random()*o.trickleRate)},t=0,e=0,n.promise=function(r){return r&&"resolved"!==r.state()&&(0===e&&n.start(),t++,e++,r.always(function(){0==--e?(t=0,n.done()):n.set((t-e)/t)})),this},n.render=function(t){if(n.isRendered())return document.getElementById("nprogress");l(document.documentElement,"nprogress-busy");var e=document.createElement("div");e.id="nprogress",e.innerHTML=o.template;var r,a=e.querySelector(o.barSelector),i=t?"-100":(-1+(n.status||0))*100,c=document.querySelector(o.parent);return s(a,{transition:"all 0 linear",transform:"translate3d("+i+"%,0,0)"}),!o.showSpinner&&(r=e.querySelector(o.spinnerSelector))&&p(r),c!=document.body&&l(c,"nprogress-custom-parent"),c.appendChild(e),e},n.remove=function(){u(document.documentElement,"nprogress-busy"),u(document.querySelector(o.parent),"nprogress-custom-parent");var t=document.getElementById("nprogress");t&&p(t)},n.isRendered=function(){return!!document.getElementById("nprogress")},n.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)}()}),s=function(){var t=["Webkit","O","Moz","ms"],e={};function r(r,n,o){var a;n=e[a=(a=n).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 n,o=t.length,a=e.charAt(0).toUpperCase()+e.slice(1);o--;)if((n=t[o]+a)in r)return n;return e}(a)),r.style[n]=o}return function(t,e){var n,o,a=arguments;if(2==a.length)for(n in e)void 0!==(o=e[n])&&e.hasOwnProperty(n)&&r(t,n,o);else r(t,a[1],a[2])}}();function c(t,e){return("string"==typeof t?t:d(t)).indexOf(" "+e+" ")>=0}function l(t,e){var r=d(t),n=r+e;c(r,e)||(t.className=n.substring(1))}function u(t,e){var r,n=d(t);c(t,e)&&(r=n.replace(" "+e+" "," "),t.className=r.substring(1,r.length-1))}function d(t){return(" "+(t.className||"")+" ").replace(/\s+/gi," ")}function p(t){t&&t.parentNode&&t.parentNode.removeChild(t)}return n})?n.call(e,r,e,t):n)&&(t.exports=o)}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4240],{71185:function(e,t,r){var n=r(8091);t.Z=void 0;var o=n(r(66758)),a=r(94655);t.Z=(0,o.default)((0,a.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")},27171:function(e,t,r){var n=r(8091);t.Z=void 0;var o=n(r(66758)),a=r(94655);t.Z=(0,o.default)((0,a.jsx)("path",{d:"M20 13H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h16c.55 0 1-.45 1-1v-6c0-.55-.45-1-1-1M7 19c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2M20 3H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h16c.55 0 1-.45 1-1V4c0-.55-.45-1-1-1M7 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2"}),"Dns")},80620:function(e,t,r){var n=r(8091);t.Z=void 0;var o=n(r(66758)),a=r(94655);t.Z=(0,o.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")},62142:function(e,t,r){r.d(t,{ZP:function(){return T}});var n=r(32324),o=r(81500),a=r(35106),i=r(70316),s=r(65951),c=r(16501),l=r(66743),p=r(12550),d=r(69899),u=r(38762),f=r(83855),h=r(28057),m=r(34519),g=r(15651),v=r(11379),Z=r(9049);function x(e){return(0,Z.ZP)("MuiDrawer",e)}(0,v.Z)("MuiDrawer",["root","docked","paper","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);var k=r(94655);let w=["BackdropProps"],b=["anchor","BackdropProps","children","className","elevation","hideBackdrop","ModalProps","onClose","open","PaperProps","SlideProps","TransitionComponent","transitionDuration","variant"],y=(e,t)=>{let{ownerState:r}=e;return[t.root,("permanent"===r.variant||"persistent"===r.variant)&&t.docked,t.modal]},E=e=>{let{classes:t,anchor:r,variant:n}=e,o={root:["root"],docked:[("permanent"===n||"persistent"===n)&&"docked"],modal:["modal"],paper:["paper","paperAnchor".concat((0,u.Z)(r)),"temporary"!==n&&"paperAnchorDocked".concat((0,u.Z)(r))]};return(0,s.Z)(o,x,t)},P=(0,m.ZP)(l.Z,{name:"MuiDrawer",slot:"Root",overridesResolver:y})(e=>{let{theme:t}=e;return{zIndex:(t.vars||t).zIndex.drawer}}),M=(0,m.ZP)("div",{shouldForwardProp:g.Z,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:y})({flex:"0 0 auto"}),R=(0,m.ZP)(d.Z,{name:"MuiDrawer",slot:"Paper",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.paper,t["paperAnchor".concat((0,u.Z)(r.anchor))],"temporary"!==r.variant&&t["paperAnchorDocked".concat((0,u.Z)(r.anchor))]]}})(e=>{let{theme:t,ownerState:r}=e;return(0,o.Z)({overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:(t.vars||t).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((t.vars||t).palette.divider)},"top"===r.anchor&&"temporary"!==r.variant&&{borderBottom:"1px solid ".concat((t.vars||t).palette.divider)},"right"===r.anchor&&"temporary"!==r.variant&&{borderLeft:"1px solid ".concat((t.vars||t).palette.divider)},"bottom"===r.anchor&&"temporary"!==r.variant&&{borderTop:"1px solid ".concat((t.vars||t).palette.divider)})}),D={left:"right",right:"left",top:"down",bottom:"up"};var T=a.forwardRef(function(e,t){let r=(0,h.i)({props:e,name:"MuiDrawer"}),s=(0,f.Z)(),l=(0,c.V)(),d={enter:s.transitions.duration.enteringScreen,exit:s.transitions.duration.leavingScreen},{anchor:u="left",BackdropProps:m,children:g,className:v,elevation:Z=16,hideBackdrop:x=!1,ModalProps:{BackdropProps:y}={},onClose:T,open:C=!1,PaperProps:A={},SlideProps:S,TransitionComponent:B=p.Z,transitionDuration:j=d,variant:L="temporary"}=r,N=(0,n.Z)(r.ModalProps,w),H=(0,n.Z)(r,b),z=a.useRef(!1);a.useEffect(()=>{z.current=!0},[]);let I=function(e,t){let{direction:r}=e;return"rtl"===r&&-1!==["left","right"].indexOf(t)?D[t]:t}({direction:l?"rtl":"ltr"},u),V=(0,o.Z)({},r,{anchor:u,elevation:Z,open:C,variant:L},H),Y=E(V),X=(0,k.jsx)(R,(0,o.Z)({elevation:"temporary"===L?Z:0,square:!0},A,{className:(0,i.Z)(Y.paper,A.className),ownerState:V,children:g}));if("permanent"===L)return(0,k.jsx)(M,(0,o.Z)({className:(0,i.Z)(Y.root,Y.docked,v),ownerState:V,ref:t},H,{children:X}));let _=(0,k.jsx)(B,(0,o.Z)({in:C,direction:D[I],timeout:j,appear:z.current},S,{children:X}));return"persistent"===L?(0,k.jsx)(M,(0,o.Z)({className:(0,i.Z)(Y.root,Y.docked,v),ownerState:V,ref:t},H,{children:_})):(0,k.jsx)(P,(0,o.Z)({BackdropProps:(0,o.Z)({},m,y,{transitionDuration:j}),className:(0,i.Z)(Y.root,Y.modal,v),open:C,ownerState:V,onClose:T,hideBackdrop:x,ref:t},H,N,{children:_}))})},12550:function(e,t,r){var n=r(81500),o=r(32324),a=r(35106),i=r(92019),s=r(11844),c=r(19521),l=r(38481),p=r(83855),d=r(56874),u=r(99466),f=r(94655);let h=["addEndListener","appear","children","container","direction","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function m(e,t,r){let n=function(e,t,r){let n;let o=t.getBoundingClientRect(),a=r&&r.getBoundingClientRect(),i=(0,u.Z)(t);if(t.fakeTransform)n=t.fakeTransform;else{let e=i.getComputedStyle(t);n=e.getPropertyValue("-webkit-transform")||e.getPropertyValue("transform")}let s=0,c=0;if(n&&"none"!==n&&"string"==typeof n){let e=n.split("(")[1].split(")")[0].split(",");s=parseInt(e[4],10),c=parseInt(e[5],10)}return"left"===e?a?"translateX(".concat(a.right+s-o.left,"px)"):"translateX(".concat(i.innerWidth+s-o.left,"px)"):"right"===e?a?"translateX(-".concat(o.right-a.left-s,"px)"):"translateX(-".concat(o.left+o.width-s,"px)"):"up"===e?a?"translateY(".concat(a.bottom+c-o.top,"px)"):"translateY(".concat(i.innerHeight+c-o.top,"px)"):a?"translateY(-".concat(o.top-a.top+o.height-c,"px)"):"translateY(-".concat(o.top+o.height-c,"px)")}(e,t,"function"==typeof r?r():r);n&&(t.style.webkitTransform=n,t.style.transform=n)}let g=a.forwardRef(function(e,t){let r=(0,p.Z)(),g={enter:r.transitions.easing.easeOut,exit:r.transitions.easing.sharp},v={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:Z,appear:x=!0,children:k,container:w,direction:b="down",easing:y=g,in:E,onEnter:P,onEntered:M,onEntering:R,onExit:D,onExited:T,onExiting:C,style:A,timeout:S=v,TransitionComponent:B=i.ZP}=e,j=(0,o.Z)(e,h),L=a.useRef(null),N=(0,l.Z)((0,s.Z)(k),L,t),H=e=>t=>{e&&(void 0===t?e(L.current):e(L.current,t))},z=H((e,t)=>{m(b,e,w),(0,d.n)(e),P&&P(e,t)}),I=H((e,t)=>{let o=(0,d.C)({timeout:S,style:A,easing:y},{mode:"enter"});e.style.webkitTransition=r.transitions.create("-webkit-transform",(0,n.Z)({},o)),e.style.transition=r.transitions.create("transform",(0,n.Z)({},o)),e.style.webkitTransform="none",e.style.transform="none",R&&R(e,t)}),V=H(M),Y=H(C),X=H(e=>{let t=(0,d.C)({timeout:S,style:A,easing:y},{mode:"exit"});e.style.webkitTransition=r.transitions.create("-webkit-transform",t),e.style.transition=r.transitions.create("transform",t),m(b,e,w),D&&D(e)}),_=H(e=>{e.style.webkitTransition="",e.style.transition="",T&&T(e)}),G=a.useCallback(()=>{L.current&&m(b,L.current,w)},[b,w]);return a.useEffect(()=>{if(E||"down"===b||"right"===b)return;let e=(0,c.Z)(()=>{L.current&&m(b,L.current,w)}),t=(0,u.Z)(L.current);return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}},[b,E,w]),a.useEffect(()=>{E||G()},[E,G]),(0,f.jsx)(B,(0,n.Z)({nodeRef:L,onEnter:z,onEntered:V,onEntering:I,onExit:X,onExited:_,onExiting:Y,addEndListener:e=>{Z&&Z(L.current,e)},appear:x,in:E,timeout:S},j,{children:(e,t)=>a.cloneElement(k,(0,n.Z)({ref:N,style:(0,n.Z)({visibility:"exited"!==e||E?void 0:"hidden"},A,k.props.style)},t))}))});t.Z=g},62108:function(e,t,r){r.d(t,{Z:function(){return v}});var n=r(32324),o=r(81500),a=r(35106),i=r(70316),s=r(65951),c=r(28057),l=r(34519),p=r(11379),d=r(9049);function u(e){return(0,d.ZP)("MuiToolbar",e)}(0,p.Z)("MuiToolbar",["root","gutters","regular","dense"]);var f=r(94655);let h=["className","component","disableGutters","variant"],m=e=>{let{classes:t,disableGutters:r,variant:n}=e;return(0,s.Z)({root:["root",!r&&"gutters",n]},u,t)},g=(0,l.ZP)("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,!r.disableGutters&&t.gutters,t[r.variant]]}})(e=>{let{theme:t,ownerState:r}=e;return(0,o.Z)({position:"relative",display:"flex",alignItems:"center"},!r.disableGutters&&{paddingLeft:t.spacing(2),paddingRight:t.spacing(2),[t.breakpoints.up("sm")]:{paddingLeft:t.spacing(3),paddingRight:t.spacing(3)}},"dense"===r.variant&&{minHeight:48})},e=>{let{theme:t,ownerState:r}=e;return"regular"===r.variant&&t.mixins.toolbar});var v=a.forwardRef(function(e,t){let r=(0,c.i)({props:e,name:"MuiToolbar"}),{className:a,component:s="div",disableGutters:l=!1,variant:p="regular"}=r,d=(0,n.Z)(r,h),u=(0,o.Z)({},r,{component:s,disableGutters:l,variant:p}),v=m(u);return(0,f.jsx)(g,(0,o.Z)({as:s,className:(0,i.Z)(v.root,a),ref:t,ownerState:u},d))})}}]);