@minecraft-docker/mcctl-console 2.8.0 → 2.8.1

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 (136) 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 +74 -72
  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.js +1 -1
  7. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/admin/users/page_client-reference-manifest.js +1 -1
  8. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/audit-logs/page_client-reference-manifest.js +1 -1
  9. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/backups/page.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 +4 -4
  12. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/dashboard/page.js.nft.json +1 -1
  13. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/dashboard/page_client-reference-manifest.js +1 -1
  14. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/players/page_client-reference-manifest.js +1 -1
  15. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/routing/page_client-reference-manifest.js +1 -1
  16. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/[name]/console/page.js +1 -1
  17. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/[name]/console/page_client-reference-manifest.js +1 -1
  18. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/[name]/page.js +1 -54
  19. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/[name]/page.js.nft.json +1 -1
  20. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/[name]/page_client-reference-manifest.js +1 -1
  21. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/page.js +1 -54
  22. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/page.js.nft.json +1 -1
  23. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/page_client-reference-manifest.js +1 -1
  24. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/settings/page_client-reference-manifest.js +1 -1
  25. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/worlds/page.js +1 -1
  26. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/worlds/page_client-reference-manifest.js +1 -1
  27. package/.next/standalone/platform/services/mcctl-console/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  28. package/.next/standalone/platform/services/mcctl-console/.next/server/app/_not-found.html +1 -1
  29. package/.next/standalone/platform/services/mcctl-console/.next/server/app/_not-found.rsc +1 -1
  30. package/.next/standalone/platform/services/mcctl-console/.next/server/app/audit-logs.html +1 -1
  31. package/.next/standalone/platform/services/mcctl-console/.next/server/app/audit-logs.rsc +2 -2
  32. package/.next/standalone/platform/services/mcctl-console/.next/server/app/backups.html +1 -1
  33. package/.next/standalone/platform/services/mcctl-console/.next/server/app/backups.rsc +3 -3
  34. package/.next/standalone/platform/services/mcctl-console/.next/server/app/dashboard.html +1 -1
  35. package/.next/standalone/platform/services/mcctl-console/.next/server/app/dashboard.rsc +3 -3
  36. package/.next/standalone/platform/services/mcctl-console/.next/server/app/index.html +1 -1
  37. package/.next/standalone/platform/services/mcctl-console/.next/server/app/index.rsc +1 -1
  38. package/.next/standalone/platform/services/mcctl-console/.next/server/app/login/page_client-reference-manifest.js +1 -1
  39. package/.next/standalone/platform/services/mcctl-console/.next/server/app/login.html +1 -1
  40. package/.next/standalone/platform/services/mcctl-console/.next/server/app/login.rsc +2 -2
  41. package/.next/standalone/platform/services/mcctl-console/.next/server/app/page_client-reference-manifest.js +1 -1
  42. package/.next/standalone/platform/services/mcctl-console/.next/server/app/players.html +1 -1
  43. package/.next/standalone/platform/services/mcctl-console/.next/server/app/players.rsc +3 -3
  44. package/.next/standalone/platform/services/mcctl-console/.next/server/app/routing.html +1 -1
  45. package/.next/standalone/platform/services/mcctl-console/.next/server/app/routing.rsc +3 -3
  46. package/.next/standalone/platform/services/mcctl-console/.next/server/app/servers.html +1 -1
  47. package/.next/standalone/platform/services/mcctl-console/.next/server/app/servers.rsc +3 -3
  48. package/.next/standalone/platform/services/mcctl-console/.next/server/app/settings.html +1 -1
  49. package/.next/standalone/platform/services/mcctl-console/.next/server/app/settings.rsc +3 -3
  50. package/.next/standalone/platform/services/mcctl-console/.next/server/app/signup/page_client-reference-manifest.js +1 -1
  51. package/.next/standalone/platform/services/mcctl-console/.next/server/app/signup.html +1 -1
  52. package/.next/standalone/platform/services/mcctl-console/.next/server/app/signup.rsc +2 -2
  53. package/.next/standalone/platform/services/mcctl-console/.next/server/app/worlds.html +1 -1
  54. package/.next/standalone/platform/services/mcctl-console/.next/server/app/worlds.rsc +3 -3
  55. package/.next/standalone/platform/services/mcctl-console/.next/server/app-paths-manifest.json +21 -21
  56. package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/1088.js +1 -0
  57. package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/5843.js +1 -1
  58. package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/7049.js +54 -0
  59. package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/8389.js +1 -1
  60. package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/8847.js +1 -1
  61. package/.next/standalone/platform/services/mcctl-console/.next/server/middleware-manifest.json +5 -5
  62. package/.next/standalone/platform/services/mcctl-console/.next/server/pages/404.html +1 -1
  63. package/.next/standalone/platform/services/mcctl-console/.next/server/pages/500.html +1 -1
  64. package/.next/standalone/platform/services/mcctl-console/.next/server/server-reference-manifest.json +1 -1
  65. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/1047-1957808ef6d146f3.js +1 -0
  66. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/{1658-1c16e5a05aaa11ee.js → 1658-43a798763bcc82ae.js} +1 -1
  67. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/{7727-2552fac729c5514a.js → 2539-6bce0edb99b4e538.js} +1 -1
  68. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/5787-04cc23df05f9da2e.js +1 -0
  69. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/6039-38b0b8c06d25892e.js +1 -0
  70. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/6646-c5d039d1ad306467.js +1 -0
  71. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/682-6192991ddec396b8.js +1 -0
  72. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/7965-420dbb1f781fdc83.js +1 -0
  73. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/837-f4fbf77c24343b1f.js +1 -0
  74. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/8854-b34262a2493987c4.js +1 -0
  75. package/.next/{static/chunks/9949-92aa4cba630945d3.js → standalone/platform/services/mcctl-console/.next/static/chunks/9949-2daeb31bdedf25c7.js} +1 -1
  76. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/admin/users/page-e8263fc89b5d349a.js +1 -0
  77. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/dashboard/page-3cf14179dcdd7ac6.js +1 -0
  78. package/.next/{static/chunks/app/(main)/layout-22d4db17be3f8c25.js → standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/layout-bf1846a6b0c68959.js} +1 -1
  79. package/.next/{static/chunks/app/(main)/players/page-fef43a34b56c2fcf.js → standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/players/page-c4760429d9828ad3.js} +1 -1
  80. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/servers/[name]/console/{page-1287129ad47a4440.js → page-a0050b5b439d954f.js} +1 -1
  81. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/servers/[name]/page-f82acaf60a615953.js +1 -0
  82. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/servers/page-382a14f87768df2c.js +1 -0
  83. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/worlds/page-a194d5d6a77d7e06.js +1 -0
  84. package/.next/{static/chunks/app/login/page-55283ea041e00fc0.js → standalone/platform/services/mcctl-console/.next/static/chunks/app/login/page-b7ec94d60aae14ce.js} +1 -1
  85. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/signup/{page-d3f96f0e775636fd.js → page-6f03571bb9914130.js} +1 -1
  86. package/.next/static/chunks/1047-1957808ef6d146f3.js +1 -0
  87. package/.next/static/chunks/{1658-1c16e5a05aaa11ee.js → 1658-43a798763bcc82ae.js} +1 -1
  88. package/.next/static/chunks/{7727-2552fac729c5514a.js → 2539-6bce0edb99b4e538.js} +1 -1
  89. package/.next/static/chunks/5787-04cc23df05f9da2e.js +1 -0
  90. package/.next/static/chunks/6039-38b0b8c06d25892e.js +1 -0
  91. package/.next/static/chunks/6646-c5d039d1ad306467.js +1 -0
  92. package/.next/static/chunks/682-6192991ddec396b8.js +1 -0
  93. package/.next/static/chunks/7965-420dbb1f781fdc83.js +1 -0
  94. package/.next/static/chunks/837-f4fbf77c24343b1f.js +1 -0
  95. package/.next/static/chunks/8854-b34262a2493987c4.js +1 -0
  96. package/.next/{standalone/platform/services/mcctl-console/.next/static/chunks/9949-92aa4cba630945d3.js → static/chunks/9949-2daeb31bdedf25c7.js} +1 -1
  97. package/.next/static/chunks/app/(main)/admin/users/page-e8263fc89b5d349a.js +1 -0
  98. package/.next/static/chunks/app/(main)/dashboard/page-3cf14179dcdd7ac6.js +1 -0
  99. package/.next/{standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/layout-22d4db17be3f8c25.js → static/chunks/app/(main)/layout-bf1846a6b0c68959.js} +1 -1
  100. package/.next/{standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/players/page-fef43a34b56c2fcf.js → static/chunks/app/(main)/players/page-c4760429d9828ad3.js} +1 -1
  101. package/.next/static/chunks/app/(main)/servers/[name]/console/{page-1287129ad47a4440.js → page-a0050b5b439d954f.js} +1 -1
  102. package/.next/static/chunks/app/(main)/servers/[name]/page-f82acaf60a615953.js +1 -0
  103. package/.next/static/chunks/app/(main)/servers/page-382a14f87768df2c.js +1 -0
  104. package/.next/static/chunks/app/(main)/worlds/page-a194d5d6a77d7e06.js +1 -0
  105. package/.next/{standalone/platform/services/mcctl-console/.next/static/chunks/app/login/page-55283ea041e00fc0.js → static/chunks/app/login/page-b7ec94d60aae14ce.js} +1 -1
  106. package/.next/static/chunks/app/signup/{page-d3f96f0e775636fd.js → page-6f03571bb9914130.js} +1 -1
  107. package/package.json +2 -2
  108. package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/8091.js +0 -1
  109. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/1476-a0570078fdf78fae.js +0 -1
  110. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/3333-7e2d13faa47ed67e.js +0 -1
  111. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/4436-bf86b627021ca7ab.js +0 -1
  112. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/5787-bea4ee84b4bf2dea.js +0 -1
  113. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/7965-e1d52a92f5303aca.js +0 -1
  114. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/8468-8346b1d9ff3f7efa.js +0 -1
  115. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/8854-11e2a182afd76dcd.js +0 -1
  116. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/admin/users/page-3cc240ec265dc135.js +0 -1
  117. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/dashboard/page-fba60ccdbc06c136.js +0 -1
  118. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/servers/[name]/page-1becd4dc3adb9b97.js +0 -1
  119. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/servers/page-bebe3d652d7cf3fb.js +0 -1
  120. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/worlds/page-e78b9914366748cf.js +0 -1
  121. package/.next/static/chunks/1476-a0570078fdf78fae.js +0 -1
  122. package/.next/static/chunks/3333-7e2d13faa47ed67e.js +0 -1
  123. package/.next/static/chunks/4436-bf86b627021ca7ab.js +0 -1
  124. package/.next/static/chunks/5787-bea4ee84b4bf2dea.js +0 -1
  125. package/.next/static/chunks/7965-e1d52a92f5303aca.js +0 -1
  126. package/.next/static/chunks/8468-8346b1d9ff3f7efa.js +0 -1
  127. package/.next/static/chunks/8854-11e2a182afd76dcd.js +0 -1
  128. package/.next/static/chunks/app/(main)/admin/users/page-3cc240ec265dc135.js +0 -1
  129. package/.next/static/chunks/app/(main)/dashboard/page-fba60ccdbc06c136.js +0 -1
  130. package/.next/static/chunks/app/(main)/servers/[name]/page-1becd4dc3adb9b97.js +0 -1
  131. package/.next/static/chunks/app/(main)/servers/page-bebe3d652d7cf3fb.js +0 -1
  132. package/.next/static/chunks/app/(main)/worlds/page-e78b9914366748cf.js +0 -1
  133. /package/.next/standalone/platform/services/mcctl-console/.next/static/{89Bssec70Vx75pcmzcDoG → S1X5jEkA1d_pSlIMuZWrE}/_buildManifest.js +0 -0
  134. /package/.next/standalone/platform/services/mcctl-console/.next/static/{89Bssec70Vx75pcmzcDoG → S1X5jEkA1d_pSlIMuZWrE}/_ssgManifest.js +0 -0
  135. /package/.next/static/{89Bssec70Vx75pcmzcDoG → S1X5jEkA1d_pSlIMuZWrE}/_buildManifest.js +0 -0
  136. /package/.next/static/{89Bssec70Vx75pcmzcDoG → S1X5jEkA1d_pSlIMuZWrE}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8854],{34675:function(t,e,r){var s=r(8091);e.Z=void 0;var i=s(r(66758)),n=r(94655);e.Z=(0,i.default)((0,n.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")},46207:function(t,e,r){var s=r(8091);e.Z=void 0;var i=s(r(66758)),n=r(94655);e.Z=(0,i.default)((0,n.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")},91606:function(t,e,r){var s=r(8091);e.Z=void 0;var i=s(r(66758)),n=r(94655);e.Z=(0,i.default)((0,n.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"}),"CloudUpload")},43436:function(t,e,r){var s=r(8091);e.Z=void 0;var i=s(r(66758)),n=r(94655);e.Z=(0,i.default)((0,n.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")},97731:function(t,e,r){var s=r(8091);e.Z=void 0;var i=s(r(66758)),n=r(94655);e.Z=(0,i.default)((0,n.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"}),"Restore")},628:function(t,e,r){r.d(e,{Z:function(){return Z}});var s=r(81500),i=r(32324),n=r(35106),o=r(70316),a=r(65951),u=r(34519),l=r(28057),c=r(69899),h=r(11379),d=r(9049);function p(t){return(0,d.ZP)("MuiCard",t)}(0,h.Z)("MuiCard",["root"]);var f=r(94655);let m=["className","raised"],v=t=>{let{classes:e}=t;return(0,a.Z)({root:["root"]},p,e)},y=(0,u.ZP)(c.Z,{name:"MuiCard",slot:"Root",overridesResolver:(t,e)=>e.root})(()=>({overflow:"hidden"}));var Z=n.forwardRef(function(t,e){let r=(0,l.i)({props:t,name:"MuiCard"}),{className:n,raised:a=!1}=r,u=(0,i.Z)(r,m),c=(0,s.Z)({},r,{raised:a}),h=v(c);return(0,f.jsx)(y,(0,s.Z)({className:(0,o.Z)(h.root,n),elevation:a?8:void 0,ref:e,ownerState:c},u))})},41565:function(t,e,r){r.d(e,{Z:function(){return y}});var s=r(81500),i=r(32324),n=r(35106),o=r(70316),a=r(65951),u=r(34519),l=r(28057),c=r(11379),h=r(9049);function d(t){return(0,h.ZP)("MuiCardContent",t)}(0,c.Z)("MuiCardContent",["root"]);var p=r(94655);let f=["className","component"],m=t=>{let{classes:e}=t;return(0,a.Z)({root:["root"]},d,e)},v=(0,u.ZP)("div",{name:"MuiCardContent",slot:"Root",overridesResolver:(t,e)=>e.root})(()=>({padding:16,"&:last-child":{paddingBottom:24}}));var y=n.forwardRef(function(t,e){let r=(0,l.i)({props:t,name:"MuiCardContent"}),{className:n,component:a="div"}=r,u=(0,i.Z)(r,f),c=(0,s.Z)({},r,{component:a}),h=m(c);return(0,p.jsx)(v,(0,s.Z)({as:a,className:(0,o.Z)(h.root,n),ownerState:c,ref:e},u))})},76678:function(t,e,r){r.d(e,{Z:function(){return y}});var s=r(32324),i=r(81500),n=r(35106),o=r(70316),a=r(65951),u=r(34519),l=r(28057),c=r(11379),h=r(9049);function d(t){return(0,h.ZP)("MuiDialogActions",t)}(0,c.Z)("MuiDialogActions",["root","spacing"]);var p=r(94655);let f=["className","disableSpacing"],m=t=>{let{classes:e,disableSpacing:r}=t;return(0,a.Z)({root:["root",!r&&"spacing"]},d,e)},v=(0,u.ZP)("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(t,e)=>{let{ownerState:r}=t;return[e.root,!r.disableSpacing&&e.spacing]}})(t=>{let{ownerState:e}=t;return(0,i.Z)({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},!e.disableSpacing&&{"& > :not(style) ~ :not(style)":{marginLeft:8}})});var y=n.forwardRef(function(t,e){let r=(0,l.i)({props:t,name:"MuiDialogActions"}),{className:n,disableSpacing:a=!1}=r,u=(0,s.Z)(r,f),c=(0,i.Z)({},r,{disableSpacing:a}),h=m(c);return(0,p.jsx)(v,(0,i.Z)({className:(0,o.Z)(h.root,n),ownerState:c,ref:e},u))})},65087:function(t,e,r){r.d(e,{Z:function(){return g}});var s=r(32324),i=r(81500),n=r(35106),o=r(70316),a=r(65951),u=r(34519),l=r(15651),c=r(28057),h=r(31317),d=r(11379),p=r(9049);function f(t){return(0,p.ZP)("MuiDialogContentText",t)}(0,d.Z)("MuiDialogContentText",["root"]);var m=r(94655);let v=["children","className"],y=t=>{let{classes:e}=t,r=(0,a.Z)({root:["root"]},f,e);return(0,i.Z)({},e,r)},Z=(0,u.ZP)(h.Z,{shouldForwardProp:t=>(0,l.Z)(t)||"classes"===t,name:"MuiDialogContentText",slot:"Root",overridesResolver:(t,e)=>e.root})({});var g=n.forwardRef(function(t,e){let r=(0,c.i)({props:t,name:"MuiDialogContentText"}),{className:n}=r,a=(0,s.Z)(r,v),u=y(a);return(0,m.jsx)(Z,(0,i.Z)({component:"p",variant:"body1",color:"text.secondary",ref:e,ownerState:a,className:(0,o.Z)(u.root,n)},r,{classes:u}))})},70115:function(t,e,r){r.d(e,{Z:function(){return R}});var s=r(32324),i=r(81500),n=r(35106),o=r(70316),a=r(41499),u=r(9049),l=r(65951),c=r(48442),h=r(14189),d=r(28131),p=r(8557),f=r(43513),m=r(95731),v=r(94655);let y=["component","direction","spacing","divider","children","className","useFlexGap"],Z=(0,p.Z)(),g=(0,c.Z)("div",{name:"MuiStack",slot:"Root",overridesResolver:(t,e)=>e.root});function b(t){return(0,h.Z)({props:t,name:"MuiStack",defaultTheme:Z})}let C=t=>({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[t],M=({ownerState:t,theme:e})=>{let r=(0,i.Z)({display:"flex",flexDirection:"column"},(0,f.k9)({theme:e},(0,f.P$)({values:t.direction,breakpoints:e.breakpoints.values}),t=>({flexDirection:t})));if(t.spacing){let s=(0,m.hB)(e),i=Object.keys(e.breakpoints.values).reduce((e,r)=>(("object"==typeof t.spacing&&null!=t.spacing[r]||"object"==typeof t.direction&&null!=t.direction[r])&&(e[r]=!0),e),{}),n=(0,f.P$)({values:t.direction,base:i}),o=(0,f.P$)({values:t.spacing,base:i});"object"==typeof n&&Object.keys(n).forEach((t,e,r)=>{if(!n[t]){let s=e>0?n[r[e-1]]:"column";n[t]=s}}),r=(0,a.Z)(r,(0,f.k9)({theme:e},o,(e,r)=>t.useFlexGap?{gap:(0,m.NA)(s,e)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${C(r?n[r]:t.direction)}`]:(0,m.NA)(s,e)}}))}return(0,f.dt)(e.breakpoints,r)};var x=r(34519),w=r(28057),R=function(t={}){let{createStyledComponent:e=g,useThemeProps:r=b,componentName:a="MuiStack"}=t,c=()=>(0,l.Z)({root:["root"]},t=>(0,u.ZP)(a,t),{}),h=e(M);return n.forwardRef(function(t,e){let a=r(t),u=(0,d.Z)(a),{component:l="div",direction:p="column",spacing:f=0,divider:m,children:Z,className:g,useFlexGap:b=!1}=u,C=(0,s.Z)(u,y),M=c();return(0,v.jsx)(h,(0,i.Z)({as:l,ownerState:{direction:p,spacing:f,useFlexGap:b},ref:e,className:(0,o.Z)(M.root,g)},C,{children:m?function(t,e){let r=n.Children.toArray(t).filter(Boolean);return r.reduce((t,s,i)=>(t.push(s),i<r.length-1&&t.push(n.cloneElement(e,{key:`separator-${i}`})),t),[])}(Z,m):Z}))})}({createStyledComponent:(0,x.ZP)("div",{name:"MuiStack",slot:"Root",overridesResolver:(t,e)=>e.root}),useThemeProps:t=>(0,w.i)({props:t,name:"MuiStack"})})},53281:function(t,e,r){r.d(e,{Z:function(){return y}});var s=r(81500),i=r(32324),n=r(35106),o=r(70316),a=r(65951),u=r(28057),l=r(34519),c=r(11379),h=r(9049);function d(t){return(0,h.ZP)("MuiTableContainer",t)}(0,c.Z)("MuiTableContainer",["root"]);var p=r(94655);let f=["className","component"],m=t=>{let{classes:e}=t;return(0,a.Z)({root:["root"]},d,e)},v=(0,l.ZP)("div",{name:"MuiTableContainer",slot:"Root",overridesResolver:(t,e)=>e.root})({width:"100%",overflowX:"auto"});var y=n.forwardRef(function(t,e){let r=(0,u.i)({props:t,name:"MuiTableContainer"}),{className:n,component:a="div"}=r,l=(0,i.Z)(r,f),c=(0,s.Z)({},r,{component:a}),h=m(c);return(0,p.jsx)(v,(0,s.Z)({ref:e,as:a,className:(0,o.Z)(h.root,n),ownerState:c},l))})},76492:function(t,e,r){r.d(e,{Fq:function(){return n}});var s=r(22085),i=r(34272);function n(t,e){return t=function t(e){let r;if(e.type)return e;if("#"===e.charAt(0))return t(function(t){t=t.slice(1);let e=RegExp(`.{1,${t.length>=6?2:1}}`,"g"),r=t.match(e);return r&&1===r[0].length&&(r=r.map(t=>t+t)),r?`rgb${4===r.length?"a":""}(${r.map((t,e)=>e<3?parseInt(t,16):Math.round(parseInt(t,16)/255*1e3)/1e3).join(", ")})`:""}(e));let i=e.indexOf("("),n=e.substring(0,i);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(n))throw Error((0,s.Z)(9,e));let o=e.substring(i+1,e.length-1);if("color"===n){if(r=(o=o.split(" ")).shift(),4===o.length&&"/"===o[3].charAt(0)&&(o[3]=o[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(r))throw Error((0,s.Z)(10,r))}else o=o.split(",");return{type:n,values:o=o.map(t=>parseFloat(t)),colorSpace:r}}(t),e=function(t,e=0,r=1){return(0,i.Z)(t,e,r)}(e),("rgb"===t.type||"hsl"===t.type)&&(t.type+="a"),"color"===t.type?t.values[3]=`/${e}`:t.values[3]=e,function(t){let{type:e,colorSpace:r}=t,{values:s}=t;return -1!==e.indexOf("rgb")?s=s.map((t,e)=>e<3?parseInt(t,10):t):-1!==e.indexOf("hsl")&&(s[1]=`${s[1]}%`,s[2]=`${s[2]}%`),s=-1!==e.indexOf("color")?`${r} ${s.join(" ")}`:`${s.join(", ")}`,`${e}(${s})`}(t)}},48442:function(t,e,r){r.d(e,{Z:function(){return Z}});var s=r(81500),i=r(32324),n=r(14526),o=r(41499),a=r(8557),u=r(72686);let l=["ownerState"],c=["variants"],h=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function d(t){return"ownerState"!==t&&"theme"!==t&&"sx"!==t&&"as"!==t}function p(t,e){return e&&t&&"object"==typeof t&&t.styles&&!t.styles.startsWith("@layer")&&(t.styles=`@layer ${e}{${String(t.styles)}}`),t}let f=(0,a.Z)(),m=t=>t?t.charAt(0).toLowerCase()+t.slice(1):t;function v({defaultTheme:t,theme:e,themeId:r}){return 0===Object.keys(e).length?t:e[r]||e}function y(t,e,r){let{ownerState:o}=e,a=(0,i.Z)(e,l),u="function"==typeof t?t((0,s.Z)({ownerState:o},a)):t;if(Array.isArray(u))return u.flatMap(t=>y(t,(0,s.Z)({ownerState:o},a),r));if(u&&"object"==typeof u&&Array.isArray(u.variants)){let{variants:t=[]}=u,e=(0,i.Z)(u,c);return t.forEach(t=>{let i=!0;if("function"==typeof t.props?i=t.props((0,s.Z)({ownerState:o},a,o)):Object.keys(t.props).forEach(e=>{(null==o?void 0:o[e])!==t.props[e]&&a[e]!==t.props[e]&&(i=!1)}),i){Array.isArray(e)||(e=[e]);let i="function"==typeof t.style?t.style((0,s.Z)({ownerState:o},a,o)):t.style;e.push(r?p((0,n.internal_serializeStyles)(i),r):i)}}),e}return r?p((0,n.internal_serializeStyles)(u),r):u}var Z=function(t={}){let{themeId:e,defaultTheme:r=f,rootShouldForwardProp:a=d,slotShouldForwardProp:l=d}=t,c=t=>(0,u.Z)((0,s.Z)({},t,{theme:v((0,s.Z)({},t,{defaultTheme:r,themeId:e}))}));return c.__mui_systemSx=!0,(t,u={})=>{var p;let f;(0,n.internal_processStyles)(t,t=>t.filter(t=>!(null!=t&&t.__mui_systemSx)));let{name:Z,slot:g,skipVariantsResolver:b,skipSx:C,overridesResolver:M=(p=m(g))?(t,e)=>e[p]:null}=u,x=(0,i.Z)(u,h),w=Z&&Z.startsWith("Mui")||g?"components":"custom",R=void 0!==b?b:g&&"Root"!==g&&"root"!==g||!1,S=C||!1,P=d;"Root"===g||"root"===g?P=a:g?P=l:"string"==typeof t&&t.charCodeAt(0)>96&&(P=void 0);let j=(0,n.default)(t,(0,s.Z)({shouldForwardProp:P,label:f},x)),O=t=>"function"==typeof t&&t.__emotion_real!==t||(0,o.P)(t)?i=>{let n=v({theme:i.theme,defaultTheme:r,themeId:e});return y(t,(0,s.Z)({},i,{theme:n}),n.modularCssLayers?w:void 0)}:t,k=(i,...n)=>{let o=O(i),a=n?n.map(O):[];Z&&M&&a.push(t=>{let i=v((0,s.Z)({},t,{defaultTheme:r,themeId:e}));if(!i.components||!i.components[Z]||!i.components[Z].styleOverrides)return null;let n=i.components[Z].styleOverrides,o={};return Object.entries(n).forEach(([e,r])=>{o[e]=y(r,(0,s.Z)({},t,{theme:i}),i.modularCssLayers?"theme":void 0)}),M(t,o)}),Z&&!R&&a.push(t=>{var i;let n=v((0,s.Z)({},t,{defaultTheme:r,themeId:e}));return y({variants:null==n||null==(i=n.components)||null==(i=i[Z])?void 0:i.variants},(0,s.Z)({},t,{theme:n}),n.modularCssLayers?"theme":void 0)}),S||a.push(c);let u=a.length-n.length;if(Array.isArray(i)&&u>0){let t=Array(u).fill("");(o=[...i,...t]).raw=[...i.raw,...t]}let l=j(o,...a);return t.muiName&&(l.muiName=t.muiName),l};return j.withConfig&&(k.withConfig=j.withConfig),k}}()},13864:function(t,e,r){r.d(e,{Z:function(){return i}});var s=r(71483);function i(t){let{theme:e,name:r,props:i}=t;return e&&e.components&&e.components[r]&&e.components[r].defaultProps?(0,s.Z)(e.components[r].defaultProps,i):i}},14189:function(t,e,r){r.d(e,{Z:function(){return n}});var s=r(13864),i=r(32730);function n(t){let{props:e,name:r,defaultTheme:n,themeId:o}=t,a=(0,i.Z)(n);return o&&(a=a[o]||a),(0,s.Z)({theme:a,name:r,props:e})}},98091:function(t,e,r){r.d(e,{R:function(){return a},m:function(){return o}});var s=r(11430),i=r(23620),n=r(97639),o=class extends i.F{#t;#e;#r;#s;constructor(t){super(),this.#t=t.client,this.mutationId=t.mutationId,this.#r=t.mutationCache,this.#e=[],this.state=t.state||a(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#e.includes(t)||(this.#e.push(t),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#e=this.#e.filter(e=>e!==t),this.scheduleGc(),this.#r.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#e.length||("pending"===this.state.status?this.scheduleGc():this.#r.remove(this))}continue(){return this.#s?.continue()??this.execute(this.state.variables)}async execute(t){let e=()=>{this.#i({type:"continue"})},r={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#s=(0,n.Mz)({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(Error("No mutationFn found")),onFail:(t,e)=>{this.#i({type:"failed",failureCount:t,error:e})},onPause:()=>{this.#i({type:"pause"})},onContinue:e,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#r.canRun(this)});let s="pending"===this.state.status,i=!this.#s.canStart();try{if(s)e();else{this.#i({type:"pending",variables:t,isPaused:i}),this.#r.config.onMutate&&await this.#r.config.onMutate(t,this,r);let e=await this.options.onMutate?.(t,r);e!==this.state.context&&this.#i({type:"pending",context:e,variables:t,isPaused:i})}let n=await this.#s.start();return await this.#r.config.onSuccess?.(n,t,this.state.context,this,r),await this.options.onSuccess?.(n,t,this.state.context,r),await this.#r.config.onSettled?.(n,null,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(n,null,t,this.state.context,r),this.#i({type:"success",data:n}),n}catch(e){try{await this.#r.config.onError?.(e,t,this.state.context,this,r)}catch(t){Promise.reject(t)}try{await this.options.onError?.(e,t,this.state.context,r)}catch(t){Promise.reject(t)}try{await this.#r.config.onSettled?.(void 0,e,this.state.variables,this.state.context,this,r)}catch(t){Promise.reject(t)}try{await this.options.onSettled?.(void 0,e,t,this.state.context,r)}catch(t){Promise.reject(t)}throw this.#i({type:"error",error:e}),e}finally{this.#r.runNext(this)}}#i(t){this.state=(e=>{switch(t.type){case"failed":return{...e,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...e,isPaused:!0};case"continue":return{...e,isPaused:!1};case"pending":return{...e,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...e,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...e,data:void 0,error:t.error,failureCount:e.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}})(this.state),s.Vr.batch(()=>{this.#e.forEach(e=>{e.onMutationUpdate(t)}),this.#r.notify({mutation:this,type:"updated",action:t})})}};function a(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}},20367:function(t,e,r){r.d(e,{D:function(){return c}});var s=r(35106),i=r(98091),n=r(11430),o=r(12835),a=r(80375),u=class extends o.l{#t;#n=void 0;#o;#a;constructor(t,e){super(),this.#t=t,this.setOptions(e),this.bindMethods(),this.#u()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){let e=this.options;this.options=this.#t.defaultMutationOptions(t),(0,a.VS)(this.options,e)||this.#t.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#o,observer:this}),e?.mutationKey&&this.options.mutationKey&&(0,a.Ym)(e.mutationKey)!==(0,a.Ym)(this.options.mutationKey)?this.reset():this.#o?.state.status==="pending"&&this.#o.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#o?.removeObserver(this)}onMutationUpdate(t){this.#u(),this.#l(t)}getCurrentResult(){return this.#n}reset(){this.#o?.removeObserver(this),this.#o=void 0,this.#u(),this.#l()}mutate(t,e){return this.#a=e,this.#o?.removeObserver(this),this.#o=this.#t.getMutationCache().build(this.#t,this.options),this.#o.addObserver(this),this.#o.execute(t)}#u(){let t=this.#o?.state??(0,i.R)();this.#n={...t,isPending:"pending"===t.status,isSuccess:"success"===t.status,isError:"error"===t.status,isIdle:"idle"===t.status,mutate:this.mutate,reset:this.reset}}#l(t){n.Vr.batch(()=>{if(this.#a&&this.hasListeners()){let e=this.#n.variables,r=this.#n.context,s={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#a.onSuccess?.(t.data,e,r,s)}catch(t){Promise.reject(t)}try{this.#a.onSettled?.(t.data,null,e,r,s)}catch(t){Promise.reject(t)}}else if(t?.type==="error"){try{this.#a.onError?.(t.error,e,r,s)}catch(t){Promise.reject(t)}try{this.#a.onSettled?.(void 0,t.error,e,r,s)}catch(t){Promise.reject(t)}}}this.listeners.forEach(t=>{t(this.#n)})})}},l=r(58919);function c(t,e){let r=(0,l.NL)(e),[i]=s.useState(()=>new u(r,t));s.useEffect(()=>{i.setOptions(t)},[i,t]);let o=s.useSyncExternalStore(s.useCallback(t=>i.subscribe(n.Vr.batchCalls(t)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),c=s.useCallback((t,e)=>{i.mutate(t,e).catch(a.ZT)},[i]);if(o.error&&(0,a.L3)(i.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:c,mutateAsync:o.mutate}}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9949],{25169:function(e,t,r){var i=r(61626),n=r(94655);t.Z=(0,i.Z)((0,n.jsx)("path",{d:"M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3m-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3m0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5m8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5"}),"Group")},78319:function(e,t,r){var i=r(61626),n=r(94655);t.Z=(0,i.Z)((0,n.jsx)("path",{d:"m17 7-1.41 1.41L18.17 11H8v2h10.17l-2.58 2.58L17 17l5-5zM4 5h8V3H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h8v-2H4z"}),"Logout")},41094:function(e,t,r){var i=r(61626),n=r(94655);t.Z=(0,i.Z)((0,n.jsx)("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"}),"Settings")},554:function(e,t,r){var i=r(61626),n=r(94655);t.Z=(0,i.Z)((0,n.jsx)("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"}),"Visibility")},36848:function(e,t,r){var i=r(61626),n=r(94655);t.Z=(0,i.Z)((0,n.jsx)("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z"}),"VisibilityOff")},67337:function(e,t,r){r.d(t,{Z:function(){return y}});var i=r(32324),n=r(81500),o=r(35106),a=r(70316),l=r(9049),c=r(65951),s=r(6014),d=r(54569),u=r(48442),p=r(8557),h=r(94655);let m=["className","component","disableGutters","fixed","maxWidth","classes"],v=(0,p.Z)(),f=(0,u.Z)("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,t[`maxWidth${(0,s.Z)(String(r.maxWidth))}`],r.fixed&&t.fixed,r.disableGutters&&t.disableGutters]}}),g=e=>(0,d.Z)({props:e,name:"MuiContainer",defaultTheme:v}),x=(e,t)=>{let{classes:r,fixed:i,disableGutters:n,maxWidth:o}=e,a={root:["root",o&&`maxWidth${(0,s.Z)(String(o))}`,i&&"fixed",n&&"disableGutters"]};return(0,c.Z)(a,e=>(0,l.ZP)(t,e),r)};var b=r(38762),Z=r(34519),w=r(28057),y=function(e={}){let{createStyledComponent:t=f,useThemeProps:r=g,componentName:l="MuiContainer"}=e,c=t(({theme:e,ownerState:t})=>(0,n.Z)({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",display:"block"},!t.disableGutters&&{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}}),({theme:e,ownerState:t})=>t.fixed&&Object.keys(e.breakpoints.values).reduce((t,r)=>{let i=e.breakpoints.values[r];return 0!==i&&(t[e.breakpoints.up(r)]={maxWidth:`${i}${e.breakpoints.unit}`}),t},{}),({theme:e,ownerState:t})=>(0,n.Z)({},"xs"===t.maxWidth&&{[e.breakpoints.up("xs")]:{maxWidth:Math.max(e.breakpoints.values.xs,444)}},t.maxWidth&&"xs"!==t.maxWidth&&{[e.breakpoints.up(t.maxWidth)]:{maxWidth:`${e.breakpoints.values[t.maxWidth]}${e.breakpoints.unit}`}}));return o.forwardRef(function(e,t){let o=r(e),{className:s,component:d="div",disableGutters:u=!1,fixed:p=!1,maxWidth:v="lg"}=o,f=(0,i.Z)(o,m),g=(0,n.Z)({},o,{component:d,disableGutters:u,fixed:p,maxWidth:v}),b=x(g,l);return(0,h.jsx)(c,(0,n.Z)({as:d,ownerState:g,className:(0,a.Z)(b.root,s),ref:t},f))})}({createStyledComponent:(0,Z.ZP)("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,t["maxWidth".concat((0,b.Z)(String(r.maxWidth)))],r.fixed&&t.fixed,r.disableGutters&&t.disableGutters]}}),useThemeProps:e=>(0,w.i)({props:e,name:"MuiContainer"})})},69123:function(e,t,r){var i=r(32324),n=r(81500),o=r(35106),a=r(70316),l=r(65951),c=r(64577),s=r(34519),d=r(28057),u=r(16945),p=r(94655);let h=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],m=e=>{let{absolute:t,children:r,classes:i,flexItem:n,light:o,orientation:a,textAlign:c,variant:s}=e;return(0,l.Z)({root:["root",t&&"absolute",s,o&&"light","vertical"===a&&"vertical",n&&"flexItem",r&&"withChildren",r&&"vertical"===a&&"withChildrenVertical","right"===c&&"vertical"!==a&&"textAlignRight","left"===c&&"vertical"!==a&&"textAlignLeft"],wrapper:["wrapper","vertical"===a&&"wrapperVertical"]},u.V,i)},v=(0,s.ZP)("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,r.absolute&&t.absolute,t[r.variant],r.light&&t.light,"vertical"===r.orientation&&t.vertical,r.flexItem&&t.flexItem,r.children&&t.withChildren,r.children&&"vertical"===r.orientation&&t.withChildrenVertical,"right"===r.textAlign&&"vertical"!==r.orientation&&t.textAlignRight,"left"===r.textAlign&&"vertical"!==r.orientation&&t.textAlignLeft]}})(e=>{let{theme:t,ownerState:r}=e;return(0,n.Z)({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(t.vars||t).palette.divider,borderBottomWidth:"thin"},r.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},r.light&&{borderColor:t.vars?"rgba(".concat(t.vars.palette.dividerChannel," / 0.08)"):(0,c.Fq)(t.palette.divider,.08)},"inset"===r.variant&&{marginLeft:72},"middle"===r.variant&&"horizontal"===r.orientation&&{marginLeft:t.spacing(2),marginRight:t.spacing(2)},"middle"===r.variant&&"vertical"===r.orientation&&{marginTop:t.spacing(1),marginBottom:t.spacing(1)},"vertical"===r.orientation&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},r.flexItem&&{alignSelf:"stretch",height:"auto"})},e=>{let{ownerState:t}=e;return(0,n.Z)({},t.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}})},e=>{let{theme:t,ownerState:r}=e;return(0,n.Z)({},r.children&&"vertical"!==r.orientation&&{"&::before, &::after":{width:"100%",borderTop:"thin solid ".concat((t.vars||t).palette.divider),borderTopStyle:"inherit"}})},e=>{let{theme:t,ownerState:r}=e;return(0,n.Z)({},r.children&&"vertical"===r.orientation&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:"thin solid ".concat((t.vars||t).palette.divider),borderLeftStyle:"inherit"}})},e=>{let{ownerState:t}=e;return(0,n.Z)({},"right"===t.textAlign&&"vertical"!==t.orientation&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},"left"===t.textAlign&&"vertical"!==t.orientation&&{"&::before":{width:"10%"},"&::after":{width:"90%"}})}),f=(0,s.ZP)("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.wrapper,"vertical"===r.orientation&&t.wrapperVertical]}})(e=>{let{theme:t,ownerState:r}=e;return(0,n.Z)({display:"inline-block",paddingLeft:"calc(".concat(t.spacing(1)," * 1.2)"),paddingRight:"calc(".concat(t.spacing(1)," * 1.2)")},"vertical"===r.orientation&&{paddingTop:"calc(".concat(t.spacing(1)," * 1.2)"),paddingBottom:"calc(".concat(t.spacing(1)," * 1.2)")})}),g=o.forwardRef(function(e,t){let r=(0,d.i)({props:e,name:"MuiDivider"}),{absolute:o=!1,children:l,className:c,component:s=l?"div":"hr",flexItem:u=!1,light:g=!1,orientation:x="horizontal",role:b="hr"!==s?"separator":void 0,textAlign:Z="center",variant:w="fullWidth"}=r,y=(0,i.Z)(r,h),S=(0,n.Z)({},r,{absolute:o,component:s,flexItem:u,light:g,orientation:x,role:b,textAlign:Z,variant:w}),k=m(S);return(0,p.jsx)(v,(0,n.Z)({as:s,className:(0,a.Z)(k.root,c),role:b,ref:t,ownerState:S},y,{children:l?(0,p.jsx)(f,{className:k.wrapper,ownerState:S,children:l}):null}))});g.muiSkipListHighlight=!0,t.Z=g},41261:function(e,t,r){r.d(t,{Z:function(){return W}});var i=r(32324),n=r(81500),o=r(35106),a=r(70316),l=r(65951),c=r(38762),s=r(34519),d=r(28057),u=r(22125),p=r(38481),h=r(31317),m=r(11379),v=r(9049);function f(e){return(0,v.ZP)("MuiLink",e)}let g=(0,m.Z)("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]);var x=r(20219),b=r(64577);let Z={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},w=e=>Z[e]||e;var y=e=>{let{theme:t,ownerState:r}=e,i=w(r.color),n=(0,x.DW)(t,"palette.".concat(i),!1)||r.color,o=(0,x.DW)(t,"palette.".concat(i,"Channel"));return"vars"in t&&o?"rgba(".concat(o," / 0.4)"):(0,b.Fq)(n,.4)},S=r(94655);let k=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant","sx"],C=e=>{let{classes:t,component:r,focusVisible:i,underline:n}=e,o={root:["root","underline".concat((0,c.Z)(n)),"button"===r&&"button",i&&"focusVisible"]};return(0,l.Z)(o,f,t)},M=(0,s.ZP)(h.Z,{name:"MuiLink",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,t["underline".concat((0,c.Z)(r.underline))],"button"===r.component&&t.button]}})(e=>{let{theme:t,ownerState:r}=e;return(0,n.Z)({},"none"===r.underline&&{textDecoration:"none"},"hover"===r.underline&&{textDecoration:"none","&:hover":{textDecoration:"underline"}},"always"===r.underline&&(0,n.Z)({textDecoration:"underline"},"inherit"!==r.color&&{textDecorationColor:y({theme:t,ownerState:r})},{"&:hover":{textDecorationColor:"inherit"}}),"button"===r.component&&{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},["&.".concat(g.focusVisible)]:{outline:"auto"}})});var W=o.forwardRef(function(e,t){let r=(0,d.i)({props:e,name:"MuiLink"}),{className:l,color:c="primary",component:s="a",onBlur:h,onFocus:m,TypographyClasses:v,underline:f="always",variant:g="inherit",sx:x}=r,b=(0,i.Z)(r,k),{isFocusVisibleRef:w,onBlur:y,onFocus:W,ref:R}=(0,u.Z)(),[L,A]=o.useState(!1),I=(0,p.Z)(t,R),V=(0,n.Z)({},r,{color:c,component:s,focusVisible:L,underline:f,variant:g}),j=C(V);return(0,S.jsx)(M,(0,n.Z)({color:c,className:(0,a.Z)(j.root,l),classes:v,component:s,onBlur:e=>{y(e),!1===w.current&&A(!1),h&&h(e)},onFocus:e=>{W(e),!0===w.current&&A(!0),m&&m(e)},ref:I,ownerState:V,variant:g,sx:[...Object.keys(Z).includes(c)?[]:[{color:c}],...Array.isArray(x)?x:[x]]},b))})},17820:function(e,t,r){var i=r(32324),n=r(81500),o=r(35106),a=r(70316),l=r(65951),c=r(34519),s=r(28057),d=r(33326),u=r(75084),p=r(94655);let h=["className"],m=e=>{let{alignItems:t,classes:r}=e;return(0,l.Z)({root:["root","flex-start"===t&&"alignItemsFlexStart"]},d.f,r)},v=(0,c.ZP)("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,"flex-start"===r.alignItems&&t.alignItemsFlexStart]}})(e=>{let{theme:t,ownerState:r}=e;return(0,n.Z)({minWidth:56,color:(t.vars||t).palette.action.active,flexShrink:0,display:"inline-flex"},"flex-start"===r.alignItems&&{marginTop:8})}),f=o.forwardRef(function(e,t){let r=(0,s.i)({props:e,name:"MuiListItemIcon"}),{className:l}=r,c=(0,i.Z)(r,h),d=o.useContext(u.Z),f=(0,n.Z)({},r,{alignItems:d.alignItems}),g=m(f);return(0,p.jsx)(v,(0,n.Z)({className:(0,a.Z)(g.root,l),ownerState:f,ref:t},c))});t.Z=f}}]);
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9949],{25169:function(e,t,r){var i=r(61626),n=r(94655);t.Z=(0,i.Z)((0,n.jsx)("path",{d:"M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3m-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3m0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5m8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5"}),"Group")},78319:function(e,t,r){var i=r(61626),n=r(94655);t.Z=(0,i.Z)((0,n.jsx)("path",{d:"m17 7-1.41 1.41L18.17 11H8v2h10.17l-2.58 2.58L17 17l5-5zM4 5h8V3H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h8v-2H4z"}),"Logout")},41094:function(e,t,r){var i=r(61626),n=r(94655);t.Z=(0,i.Z)((0,n.jsx)("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"}),"Settings")},554:function(e,t,r){var i=r(61626),n=r(94655);t.Z=(0,i.Z)((0,n.jsx)("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"}),"Visibility")},36848:function(e,t,r){var i=r(61626),n=r(94655);t.Z=(0,i.Z)((0,n.jsx)("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z"}),"VisibilityOff")},67337:function(e,t,r){r.d(t,{Z:function(){return y}});var i=r(32324),n=r(81500),o=r(35106),a=r(70316),l=r(9049),c=r(65951),s=r(6014),d=r(14189),u=r(48442),p=r(8557),h=r(94655);let m=["className","component","disableGutters","fixed","maxWidth","classes"],v=(0,p.Z)(),f=(0,u.Z)("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,t[`maxWidth${(0,s.Z)(String(r.maxWidth))}`],r.fixed&&t.fixed,r.disableGutters&&t.disableGutters]}}),g=e=>(0,d.Z)({props:e,name:"MuiContainer",defaultTheme:v}),x=(e,t)=>{let{classes:r,fixed:i,disableGutters:n,maxWidth:o}=e,a={root:["root",o&&`maxWidth${(0,s.Z)(String(o))}`,i&&"fixed",n&&"disableGutters"]};return(0,c.Z)(a,e=>(0,l.ZP)(t,e),r)};var b=r(38762),Z=r(34519),w=r(28057),y=function(e={}){let{createStyledComponent:t=f,useThemeProps:r=g,componentName:l="MuiContainer"}=e,c=t(({theme:e,ownerState:t})=>(0,n.Z)({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",display:"block"},!t.disableGutters&&{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}}),({theme:e,ownerState:t})=>t.fixed&&Object.keys(e.breakpoints.values).reduce((t,r)=>{let i=e.breakpoints.values[r];return 0!==i&&(t[e.breakpoints.up(r)]={maxWidth:`${i}${e.breakpoints.unit}`}),t},{}),({theme:e,ownerState:t})=>(0,n.Z)({},"xs"===t.maxWidth&&{[e.breakpoints.up("xs")]:{maxWidth:Math.max(e.breakpoints.values.xs,444)}},t.maxWidth&&"xs"!==t.maxWidth&&{[e.breakpoints.up(t.maxWidth)]:{maxWidth:`${e.breakpoints.values[t.maxWidth]}${e.breakpoints.unit}`}}));return o.forwardRef(function(e,t){let o=r(e),{className:s,component:d="div",disableGutters:u=!1,fixed:p=!1,maxWidth:v="lg"}=o,f=(0,i.Z)(o,m),g=(0,n.Z)({},o,{component:d,disableGutters:u,fixed:p,maxWidth:v}),b=x(g,l);return(0,h.jsx)(c,(0,n.Z)({as:d,ownerState:g,className:(0,a.Z)(b.root,s),ref:t},f))})}({createStyledComponent:(0,Z.ZP)("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,t["maxWidth".concat((0,b.Z)(String(r.maxWidth)))],r.fixed&&t.fixed,r.disableGutters&&t.disableGutters]}}),useThemeProps:e=>(0,w.i)({props:e,name:"MuiContainer"})})},69123:function(e,t,r){var i=r(32324),n=r(81500),o=r(35106),a=r(70316),l=r(65951),c=r(64577),s=r(34519),d=r(28057),u=r(16945),p=r(94655);let h=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],m=e=>{let{absolute:t,children:r,classes:i,flexItem:n,light:o,orientation:a,textAlign:c,variant:s}=e;return(0,l.Z)({root:["root",t&&"absolute",s,o&&"light","vertical"===a&&"vertical",n&&"flexItem",r&&"withChildren",r&&"vertical"===a&&"withChildrenVertical","right"===c&&"vertical"!==a&&"textAlignRight","left"===c&&"vertical"!==a&&"textAlignLeft"],wrapper:["wrapper","vertical"===a&&"wrapperVertical"]},u.V,i)},v=(0,s.ZP)("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,r.absolute&&t.absolute,t[r.variant],r.light&&t.light,"vertical"===r.orientation&&t.vertical,r.flexItem&&t.flexItem,r.children&&t.withChildren,r.children&&"vertical"===r.orientation&&t.withChildrenVertical,"right"===r.textAlign&&"vertical"!==r.orientation&&t.textAlignRight,"left"===r.textAlign&&"vertical"!==r.orientation&&t.textAlignLeft]}})(e=>{let{theme:t,ownerState:r}=e;return(0,n.Z)({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(t.vars||t).palette.divider,borderBottomWidth:"thin"},r.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},r.light&&{borderColor:t.vars?"rgba(".concat(t.vars.palette.dividerChannel," / 0.08)"):(0,c.Fq)(t.palette.divider,.08)},"inset"===r.variant&&{marginLeft:72},"middle"===r.variant&&"horizontal"===r.orientation&&{marginLeft:t.spacing(2),marginRight:t.spacing(2)},"middle"===r.variant&&"vertical"===r.orientation&&{marginTop:t.spacing(1),marginBottom:t.spacing(1)},"vertical"===r.orientation&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},r.flexItem&&{alignSelf:"stretch",height:"auto"})},e=>{let{ownerState:t}=e;return(0,n.Z)({},t.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}})},e=>{let{theme:t,ownerState:r}=e;return(0,n.Z)({},r.children&&"vertical"!==r.orientation&&{"&::before, &::after":{width:"100%",borderTop:"thin solid ".concat((t.vars||t).palette.divider),borderTopStyle:"inherit"}})},e=>{let{theme:t,ownerState:r}=e;return(0,n.Z)({},r.children&&"vertical"===r.orientation&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:"thin solid ".concat((t.vars||t).palette.divider),borderLeftStyle:"inherit"}})},e=>{let{ownerState:t}=e;return(0,n.Z)({},"right"===t.textAlign&&"vertical"!==t.orientation&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},"left"===t.textAlign&&"vertical"!==t.orientation&&{"&::before":{width:"10%"},"&::after":{width:"90%"}})}),f=(0,s.ZP)("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.wrapper,"vertical"===r.orientation&&t.wrapperVertical]}})(e=>{let{theme:t,ownerState:r}=e;return(0,n.Z)({display:"inline-block",paddingLeft:"calc(".concat(t.spacing(1)," * 1.2)"),paddingRight:"calc(".concat(t.spacing(1)," * 1.2)")},"vertical"===r.orientation&&{paddingTop:"calc(".concat(t.spacing(1)," * 1.2)"),paddingBottom:"calc(".concat(t.spacing(1)," * 1.2)")})}),g=o.forwardRef(function(e,t){let r=(0,d.i)({props:e,name:"MuiDivider"}),{absolute:o=!1,children:l,className:c,component:s=l?"div":"hr",flexItem:u=!1,light:g=!1,orientation:x="horizontal",role:b="hr"!==s?"separator":void 0,textAlign:Z="center",variant:w="fullWidth"}=r,y=(0,i.Z)(r,h),S=(0,n.Z)({},r,{absolute:o,component:s,flexItem:u,light:g,orientation:x,role:b,textAlign:Z,variant:w}),k=m(S);return(0,p.jsx)(v,(0,n.Z)({as:s,className:(0,a.Z)(k.root,c),role:b,ref:t,ownerState:S},y,{children:l?(0,p.jsx)(f,{className:k.wrapper,ownerState:S,children:l}):null}))});g.muiSkipListHighlight=!0,t.Z=g},41261:function(e,t,r){r.d(t,{Z:function(){return W}});var i=r(32324),n=r(81500),o=r(35106),a=r(70316),l=r(65951),c=r(38762),s=r(34519),d=r(28057),u=r(22125),p=r(38481),h=r(31317),m=r(11379),v=r(9049);function f(e){return(0,v.ZP)("MuiLink",e)}let g=(0,m.Z)("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]);var x=r(20219),b=r(64577);let Z={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},w=e=>Z[e]||e;var y=e=>{let{theme:t,ownerState:r}=e,i=w(r.color),n=(0,x.DW)(t,"palette.".concat(i),!1)||r.color,o=(0,x.DW)(t,"palette.".concat(i,"Channel"));return"vars"in t&&o?"rgba(".concat(o," / 0.4)"):(0,b.Fq)(n,.4)},S=r(94655);let k=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant","sx"],C=e=>{let{classes:t,component:r,focusVisible:i,underline:n}=e,o={root:["root","underline".concat((0,c.Z)(n)),"button"===r&&"button",i&&"focusVisible"]};return(0,l.Z)(o,f,t)},M=(0,s.ZP)(h.Z,{name:"MuiLink",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,t["underline".concat((0,c.Z)(r.underline))],"button"===r.component&&t.button]}})(e=>{let{theme:t,ownerState:r}=e;return(0,n.Z)({},"none"===r.underline&&{textDecoration:"none"},"hover"===r.underline&&{textDecoration:"none","&:hover":{textDecoration:"underline"}},"always"===r.underline&&(0,n.Z)({textDecoration:"underline"},"inherit"!==r.color&&{textDecorationColor:y({theme:t,ownerState:r})},{"&:hover":{textDecorationColor:"inherit"}}),"button"===r.component&&{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},["&.".concat(g.focusVisible)]:{outline:"auto"}})});var W=o.forwardRef(function(e,t){let r=(0,d.i)({props:e,name:"MuiLink"}),{className:l,color:c="primary",component:s="a",onBlur:h,onFocus:m,TypographyClasses:v,underline:f="always",variant:g="inherit",sx:x}=r,b=(0,i.Z)(r,k),{isFocusVisibleRef:w,onBlur:y,onFocus:W,ref:R}=(0,u.Z)(),[L,A]=o.useState(!1),I=(0,p.Z)(t,R),V=(0,n.Z)({},r,{color:c,component:s,focusVisible:L,underline:f,variant:g}),j=C(V);return(0,S.jsx)(M,(0,n.Z)({color:c,className:(0,a.Z)(j.root,l),classes:v,component:s,onBlur:e=>{y(e),!1===w.current&&A(!1),h&&h(e)},onFocus:e=>{W(e),!0===w.current&&A(!0),m&&m(e)},ref:I,ownerState:V,variant:g,sx:[...Object.keys(Z).includes(c)?[]:[{color:c}],...Array.isArray(x)?x:[x]]},b))})},17820:function(e,t,r){var i=r(32324),n=r(81500),o=r(35106),a=r(70316),l=r(65951),c=r(34519),s=r(28057),d=r(33326),u=r(75084),p=r(94655);let h=["className"],m=e=>{let{alignItems:t,classes:r}=e;return(0,l.Z)({root:["root","flex-start"===t&&"alignItemsFlexStart"]},d.f,r)},v=(0,c.ZP)("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,"flex-start"===r.alignItems&&t.alignItemsFlexStart]}})(e=>{let{theme:t,ownerState:r}=e;return(0,n.Z)({minWidth:56,color:(t.vars||t).palette.action.active,flexShrink:0,display:"inline-flex"},"flex-start"===r.alignItems&&{marginTop:8})}),f=o.forwardRef(function(e,t){let r=(0,s.i)({props:e,name:"MuiListItemIcon"}),{className:l}=r,c=(0,i.Z)(r,h),d=o.useContext(u.Z),f=(0,n.Z)({},r,{alignItems:d.alignItems}),g=m(f);return(0,p.jsx)(v,(0,n.Z)({className:(0,a.Z)(g.root,l),ownerState:f,ref:t},c))});t.Z=f}}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5931],{66289:function(e,t,r){Promise.resolve().then(r.bind(r,12256))},71185:function(e,t,r){"use strict";var i=r(8091);t.Z=void 0;var n=i(r(66758)),l=r(94655);t.Z=(0,n.default)((0,l.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close")},69123:function(e,t,r){"use strict";var i=r(32324),n=r(81500),l=r(35106),a=r(70316),o=r(65951),s=r(64577),c=r(34519),d=r(28057),h=r(16945),u=r(94655);let x=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],m=e=>{let{absolute:t,children:r,classes:i,flexItem:n,light:l,orientation:a,textAlign:s,variant:c}=e;return(0,o.Z)({root:["root",t&&"absolute",c,l&&"light","vertical"===a&&"vertical",n&&"flexItem",r&&"withChildren",r&&"vertical"===a&&"withChildrenVertical","right"===s&&"vertical"!==a&&"textAlignRight","left"===s&&"vertical"!==a&&"textAlignLeft"],wrapper:["wrapper","vertical"===a&&"wrapperVertical"]},h.V,i)},v=(0,c.ZP)("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,r.absolute&&t.absolute,t[r.variant],r.light&&t.light,"vertical"===r.orientation&&t.vertical,r.flexItem&&t.flexItem,r.children&&t.withChildren,r.children&&"vertical"===r.orientation&&t.withChildrenVertical,"right"===r.textAlign&&"vertical"!==r.orientation&&t.textAlignRight,"left"===r.textAlign&&"vertical"!==r.orientation&&t.textAlignLeft]}})(e=>{let{theme:t,ownerState:r}=e;return(0,n.Z)({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(t.vars||t).palette.divider,borderBottomWidth:"thin"},r.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},r.light&&{borderColor:t.vars?"rgba(".concat(t.vars.palette.dividerChannel," / 0.08)"):(0,s.Fq)(t.palette.divider,.08)},"inset"===r.variant&&{marginLeft:72},"middle"===r.variant&&"horizontal"===r.orientation&&{marginLeft:t.spacing(2),marginRight:t.spacing(2)},"middle"===r.variant&&"vertical"===r.orientation&&{marginTop:t.spacing(1),marginBottom:t.spacing(1)},"vertical"===r.orientation&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},r.flexItem&&{alignSelf:"stretch",height:"auto"})},e=>{let{ownerState:t}=e;return(0,n.Z)({},t.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}})},e=>{let{theme:t,ownerState:r}=e;return(0,n.Z)({},r.children&&"vertical"!==r.orientation&&{"&::before, &::after":{width:"100%",borderTop:"thin solid ".concat((t.vars||t).palette.divider),borderTopStyle:"inherit"}})},e=>{let{theme:t,ownerState:r}=e;return(0,n.Z)({},r.children&&"vertical"===r.orientation&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:"thin solid ".concat((t.vars||t).palette.divider),borderLeftStyle:"inherit"}})},e=>{let{ownerState:t}=e;return(0,n.Z)({},"right"===t.textAlign&&"vertical"!==t.orientation&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},"left"===t.textAlign&&"vertical"!==t.orientation&&{"&::before":{width:"10%"},"&::after":{width:"90%"}})}),f=(0,c.ZP)("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.wrapper,"vertical"===r.orientation&&t.wrapperVertical]}})(e=>{let{theme:t,ownerState:r}=e;return(0,n.Z)({display:"inline-block",paddingLeft:"calc(".concat(t.spacing(1)," * 1.2)"),paddingRight:"calc(".concat(t.spacing(1)," * 1.2)")},"vertical"===r.orientation&&{paddingTop:"calc(".concat(t.spacing(1)," * 1.2)"),paddingBottom:"calc(".concat(t.spacing(1)," * 1.2)")})}),Z=l.forwardRef(function(e,t){let r=(0,d.i)({props:e,name:"MuiDivider"}),{absolute:l=!1,children:o,className:s,component:c=o?"div":"hr",flexItem:h=!1,light:Z=!1,orientation:p="horizontal",role:g="hr"!==c?"separator":void 0,textAlign:j="center",variant:b="fullWidth"}=r,y=(0,i.Z)(r,x),w=(0,n.Z)({},r,{absolute:l,component:c,flexItem:h,light:Z,orientation:p,role:g,textAlign:j,variant:b}),C=m(w);return(0,u.jsx)(v,(0,n.Z)({as:c,className:(0,a.Z)(C.root,s),role:g,ref:t,ownerState:w},y,{children:o?(0,u.jsx)(f,{className:C.wrapper,ownerState:w,children:o}):null}))});Z.muiSkipListHighlight=!0,t.Z=Z},16945:function(e,t,r){"use strict";r.d(t,{V:function(){return l}});var i=r(11379),n=r(9049);function l(e){return(0,n.ZP)("MuiDivider",e)}let a=(0,i.Z)("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]);t.Z=a},53281:function(e,t,r){"use strict";r.d(t,{Z:function(){return Z}});var i=r(81500),n=r(32324),l=r(35106),a=r(70316),o=r(65951),s=r(28057),c=r(34519),d=r(11379),h=r(9049);function u(e){return(0,h.ZP)("MuiTableContainer",e)}(0,d.Z)("MuiTableContainer",["root"]);var x=r(94655);let m=["className","component"],v=e=>{let{classes:t}=e;return(0,o.Z)({root:["root"]},u,t)},f=(0,c.ZP)("div",{name:"MuiTableContainer",slot:"Root",overridesResolver:(e,t)=>t.root})({width:"100%",overflowX:"auto"});var Z=l.forwardRef(function(e,t){let r=(0,s.i)({props:e,name:"MuiTableContainer"}),{className:l,component:o="div"}=r,c=(0,n.Z)(r,m),d=(0,i.Z)({},r,{component:o}),h=v(d);return(0,x.jsx)(f,(0,i.Z)({ref:t,as:o,className:(0,a.Z)(h.root,l),ownerState:d},c))})},12256:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return R}});var i=r(94655),n=r(35106),l=r(7281),a=r(93017),o=r(81071),s=r(31317),c=r(5632),d=r(6986),h=r(53281),u=r(69899),x=r(21138),m=r(11254),v=r(70366),f=r(47001),Z=r(84811),p=r(25333);function g(e){let{users:t,onUserClick:r}=e;return 0===t.length?(0,i.jsx)(l.Z,{sx:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"200px",p:4},children:(0,i.jsx)(s.Z,{variant:"body1",color:"text.secondary",children:"No users found"})}):(0,i.jsx)(h.Z,{component:u.Z,sx:{overflowX:"auto"},children:(0,i.jsxs)(x.Z,{children:[(0,i.jsx)(m.Z,{children:(0,i.jsxs)(v.Z,{children:[(0,i.jsx)(f.Z,{children:"Email"}),(0,i.jsx)(f.Z,{children:"Name"}),(0,i.jsx)(f.Z,{children:"Role"}),(0,i.jsx)(f.Z,{children:"Status"}),(0,i.jsx)(f.Z,{children:"Created At"})]})}),(0,i.jsx)(Z.Z,{children:t.map(e=>(0,i.jsxs)(v.Z,{hover:!0,onClick:()=>r(e),sx:{cursor:"pointer"},children:[(0,i.jsx)(f.Z,{children:e.email}),(0,i.jsx)(f.Z,{children:e.name||"N/A"}),(0,i.jsx)(f.Z,{children:"admin"===e.role?(0,i.jsx)(p.Z,{label:"Admin",color:"primary",size:"small"}):(0,i.jsx)(p.Z,{label:"User",size:"small"})}),(0,i.jsx)(f.Z,{children:e.banned?(0,i.jsx)(p.Z,{label:"Banned",color:"error",size:"small"}):(0,i.jsx)(p.Z,{label:"Active",color:"success",size:"small"})}),(0,i.jsx)(f.Z,{children:new Date(e.createdAt).toLocaleString("en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!1})})]},e.id))})]})})}var j=r(99770),b=r(62508),y=r(79983),w=r(5682),C=r(69123),A=r(71185);function S(e){let{user:t,open:r,onClose:n}=e;return(0,i.jsxs)(j.Z,{open:r,onClose:n,maxWidth:"sm",fullWidth:!0,children:[(0,i.jsx)(b.Z,{children:(0,i.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[(0,i.jsx)(s.Z,{variant:"h6",children:"User Details"}),(0,i.jsx)(y.Z,{onClick:n,size:"small","aria-label":"close",children:(0,i.jsx)(A.Z,{})})]})}),(0,i.jsx)(w.Z,{children:(0,i.jsxs)(l.Z,{sx:{display:"flex",flexDirection:"column",gap:2},children:[(0,i.jsxs)(l.Z,{children:[(0,i.jsx)(s.Z,{variant:"caption",color:"text.secondary",children:"Email"}),(0,i.jsx)(s.Z,{variant:"body1",children:t.email})]}),(0,i.jsxs)(l.Z,{children:[(0,i.jsx)(s.Z,{variant:"caption",color:"text.secondary",children:"Name"}),(0,i.jsx)(s.Z,{variant:"body1",children:t.name||"N/A"})]}),(0,i.jsxs)(l.Z,{children:[(0,i.jsx)(s.Z,{variant:"caption",color:"text.secondary",children:"Role"}),(0,i.jsx)(l.Z,{sx:{mt:.5},children:"admin"===t.role?(0,i.jsx)(p.Z,{label:"Admin",color:"primary",size:"small"}):(0,i.jsx)(p.Z,{label:"User",size:"small"})})]}),(0,i.jsxs)(l.Z,{children:[(0,i.jsx)(s.Z,{variant:"caption",color:"text.secondary",children:"Status"}),(0,i.jsx)(l.Z,{sx:{mt:.5},children:t.banned?(0,i.jsx)(p.Z,{label:"Banned",color:"error",size:"small"}):(0,i.jsx)(p.Z,{label:"Active",color:"success",size:"small"})})]}),(0,i.jsx)(C.Z,{}),(0,i.jsxs)(l.Z,{children:[(0,i.jsx)(s.Z,{variant:"caption",color:"text.secondary",children:"Created At"}),(0,i.jsx)(s.Z,{variant:"body2",children:new Date(t.createdAt).toLocaleString("en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!1})})]}),(0,i.jsxs)(l.Z,{children:[(0,i.jsx)(s.Z,{variant:"caption",color:"text.secondary",children:"User ID"}),(0,i.jsx)(s.Z,{variant:"body2",sx:{fontFamily:'"Roboto Mono", monospace',fontSize:"0.875rem"},children:t.id})]})]})})]})}function R(){let{data:e,isLoading:t,isError:r,error:h}=(0,c.a)({queryKey:["admin","users"],queryFn:async()=>{let{data:e,error:t}=await d.zB.listUsers({query:{}});if(t)throw Error(t.message||"Failed to fetch users");return(null==e?void 0:e.users)?e.users.map(e=>{var t,r,i;return{id:e.id,email:e.email,name:null!==(t=e.name)&&void 0!==t?t:null,role:null!==(r=e.role)&&void 0!==r?r:"user",banned:null!==(i=e.banned)&&void 0!==i&&i,createdAt:new Date(e.createdAt)}}):[]}}),[u,x]=(0,n.useState)(null);return t?(0,i.jsx)(l.Z,{sx:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"400px"},children:(0,i.jsx)(a.Z,{})}):r?(0,i.jsx)(l.Z,{sx:{p:3},children:(0,i.jsxs)(o.Z,{severity:"error",children:["Failed to load users. ",(null==h?void 0:h.message)||"Please try again later."]})}):(0,i.jsxs)(l.Z,{sx:{p:3},children:[(0,i.jsx)(s.Z,{variant:"h4",component:"h1",gutterBottom:!0,children:"User Management"}),(0,i.jsx)(g,{users:e||[],onUserClick:e=>{x(e)}}),u&&(0,i.jsx)(S,{user:u,open:!0,onClose:()=>{x(null)}})]})}},6986:function(e,t,r){"use strict";r.d(t,{Cp:function(){return u},Nq:function(){return h},cg:function(){return o},kP:function(){return d},w7:function(){return s},y1:function(){return c},zB:function(){return x}});var i=r(77054),n=r(61648),l=r(35016);let a=(0,i.X)({baseURL:l.env.NEXT_PUBLIC_BETTER_AUTH_URL||"",plugins:[(0,n.zB)()]}),{signIn:o,signOut:s,signUp:c,useSession:d,updateUser:h,changePassword:u}=a,x=a.admin}},function(e){e.O(0,[6812,9760,5004,1071,540,4416,2542,880,2844,3669,2757,1744],function(){return e(e.s=66289)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2248],{12121:function(e,t,r){Promise.resolve().then(r.bind(r,64924))},64924:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return B}});var n=r(94655),s=r(69899),i=r(76492),a=r(7281),l=r(31317),o=r(84840),c=r(628),d=r(41565),x=r(10721),h=r(25065),u=r(91179),p=r(11767),m=r(53832),j=r(30164),f=r(92666),g=r(59104);function Z(e){let{title:t,value:r,icon:s,color:i="primary",description:o}=e,x={primary:"#1bd96a",success:"#22c55e",info:"#3b82f6",secondary:"#7c3aed"};return(0,n.jsx)(c.Z,{"data-testid":"stat-card",sx:{height:"100%",position:"relative",overflow:"hidden","&::before":{content:'""',position:"absolute",top:0,left:0,right:0,height:"4px",background:x[i]}},children:(0,n.jsxs)(d.Z,{children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:2},children:[(0,n.jsx)(l.Z,{variant:"body2",color:"text.secondary",sx:{fontWeight:500},children:t}),s&&(0,n.jsx)(a.Z,{sx:{color:x[i],opacity:.8},children:s})]}),(0,n.jsx)(l.Z,{variant:"h3",component:"div",sx:{fontWeight:700,color:"text.primary",mb:o?1:0},children:r}),o&&(0,n.jsx)(l.Z,{variant:"caption",color:"text.secondary",children:o})]})})}var v=r(98406),y=r(93017),b=r(25333),w=r(46725),S=r(8690),C=r(31358),z=r(97511);function I(e){let{servers:t,statusMap:r={},isLoading:s,maxItems:i,showViewAll:o=!1,onServerClick:x}=e,h=(0,C.x)(),u=i?t.slice(0,i):t,p=e=>{x?x(e):h.push("/servers/".concat(e))},m=e=>{switch(e){case"running":return"success";case"stopped":case"exited":return"error";case"created":return"warning";default:return"default"}},j=e=>{switch(e){case"healthy":return"success";case"unhealthy":return"error";case"starting":return"warning";default:return"default"}};return s?(0,n.jsxs)(c.Z,{children:[(0,n.jsx)(v.Z,{title:"Servers"}),(0,n.jsx)(d.Z,{children:(0,n.jsx)(a.Z,{sx:{display:"flex",justifyContent:"center",py:4},children:(0,n.jsx)(y.Z,{})})})]}):0===t.length?(0,n.jsxs)(c.Z,{children:[(0,n.jsx)(v.Z,{title:"Servers"}),(0,n.jsx)(d.Z,{children:(0,n.jsx)(l.Z,{color:"text.secondary",align:"center",children:"No servers found. Create your first server to get started."})})]}):(0,n.jsxs)(c.Z,{children:[(0,n.jsx)(v.Z,{title:"Servers",action:o&&t.length>(i||0)?(0,n.jsxs)(w.default,{href:"/servers",onClick:()=>(0,S.Av)(),style:{textDecoration:"none",color:"inherit",fontSize:"0.875rem"},children:["View All (",t.length,")"]}):null}),(0,n.jsx)(d.Z,{children:(0,n.jsx)(a.Z,{sx:{display:"flex",flexDirection:"column",gap:2},children:u.map(e=>{let t=r[e.name],s=(null==t?void 0:t.status)||e.status,i=(null==t?void 0:t.health)||e.health;return(0,n.jsx)(a.Z,{role:"button",onClick:()=>p(e.name),sx:{p:2,borderRadius:1,border:"1px solid",borderColor:"divider",cursor:"pointer",transition:"all 0.2s","&:hover":{borderColor:"primary.main",backgroundColor:"action.hover"}},children:(0,n.jsxs)(a.Z,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",flexWrap:"wrap",gap:1},children:[(0,n.jsxs)(a.Z,{sx:{minWidth:0,flex:1},children:[(0,n.jsx)(l.Z,{variant:"subtitle1",fontWeight:600,noWrap:!0,children:e.name}),(0,n.jsx)(z.h,{hostname:e.hostname,fontSize:12})]}),(0,n.jsxs)(a.Z,{sx:{display:"flex",gap:.5,flexShrink:0},children:[(0,n.jsx)(b.Z,{label:s,color:m(s),size:"small"}),"none"!==i&&(0,n.jsx)(b.Z,{label:i,color:j(i),size:"small",variant:"outlined"})]})]})},e.name)})})})]})}var k=r(35106),P=r(41261);function W(e){let{maxVersions:t=2,title:r="Recent Updates"}=e,[s,i]=(0,k.useState)([]),[o,h]=(0,k.useState)(!0),[u,p]=(0,k.useState)(null);return((0,k.useEffect)(()=>{(async function(){try{let e=await fetch("https://api.github.com/repos/smallmiro/minecraft-server-manager/contents/CHANGELOG.md",{headers:{Accept:"application/vnd.github.v3+json"}});if(!e.ok)throw Error("Failed to fetch changelog");let r=await e.json(),n=atob(r.content),s=function(e,t){let r=[],n=e.split("\n"),s=null,i="added";for(let e of n){let n=e.match(/^## \[([^\]]+)\] - (\d{4}-\d{2}-\d{2})/);if(n){if(s&&(r.push(s),r.length>=t))break;s={version:n[1],date:n[2],items:[]};continue}let a=e.match(/^### (Added|Fixed|Changed)/i);if(a){i=a[1].toLowerCase();continue}let l=e.match(/^- \*\*([^*]+)\*\*\s*[-–]?\s*(.*)$/);l&&s&&s.items.push({type:i,message:l[1].trim()})}return s&&r.length<t&&r.push(s),r}(n,t);i(s)}catch(e){p(e instanceof Error?e.message:"Unknown error")}finally{h(!1)}})()},[t]),o)?(0,n.jsxs)(c.Z,{children:[(0,n.jsx)(v.Z,{title:r}),(0,n.jsxs)(d.Z,{children:[(0,n.jsx)(x.Z,{variant:"text",width:"60%",height:28}),(0,n.jsx)(x.Z,{variant:"text",width:"80%"}),(0,n.jsx)(x.Z,{variant:"text",width:"70%"}),(0,n.jsxs)(a.Z,{sx:{mt:2},children:[(0,n.jsx)(x.Z,{variant:"text",width:"60%",height:28}),(0,n.jsx)(x.Z,{variant:"text",width:"75%"})]})]})]}):u?(0,n.jsxs)(c.Z,{children:[(0,n.jsx)(v.Z,{title:r}),(0,n.jsx)(d.Z,{children:(0,n.jsx)(l.Z,{color:"text.secondary",align:"center",children:"Unable to load updates"})})]}):(0,n.jsxs)(c.Z,{children:[(0,n.jsx)(v.Z,{title:r,action:(0,n.jsx)(P.Z,{href:"https://github.com/smallmiro/minecraft-server-manager/blob/develop/CHANGELOG.md",target:"_blank",rel:"noopener",sx:{fontSize:13,mr:1},children:"View all"})}),(0,n.jsx)(d.Z,{sx:{pt:0},children:s.map((e,t)=>{let r=e.items.filter(e=>"added"===e.type),i=e.items.filter(e=>"fixed"===e.type),o=e.items.filter(e=>"changed"===e.type);return(0,n.jsxs)(a.Z,{sx:{mb:t<s.length-1?2.5:0,pb:t<s.length-1?2:0,borderBottom:t<s.length-1?"1px solid":"none",borderColor:"divider"},children:[(0,n.jsxs)(l.Z,{variant:"subtitle2",sx:{fontWeight:600,color:"primary.main",mb:1},children:["[",e.version,"] - ",e.date]}),r.length>0&&(0,n.jsxs)(a.Z,{sx:{mb:1},children:[(0,n.jsx)(b.Z,{label:"Added",size:"small",sx:{bgcolor:"success.main",color:"success.contrastText",fontSize:11,height:20,mb:.5}}),r.map((e,t)=>(0,n.jsxs)(l.Z,{variant:"body2",sx:{color:"text.secondary",pl:1},children:["• ",e.message]},t))]}),i.length>0&&(0,n.jsxs)(a.Z,{sx:{mb:1},children:[(0,n.jsx)(b.Z,{label:"Fixed",size:"small",sx:{bgcolor:"warning.main",color:"warning.contrastText",fontSize:11,height:20,mb:.5}}),i.map((e,t)=>(0,n.jsxs)(l.Z,{variant:"body2",sx:{color:"text.secondary",pl:1},children:["• ",e.message]},t))]}),o.length>0&&(0,n.jsxs)(a.Z,{children:[(0,n.jsx)(b.Z,{label:"Changed",size:"small",sx:{bgcolor:"info.main",color:"info.contrastText",fontSize:11,height:20,mb:.5}}),o.map((e,t)=>(0,n.jsxs)(l.Z,{variant:"body2",sx:{color:"text.secondary",pl:1},children:["• ",e.message]},t))]})]},e.version)})})]})}var F=r(30417),T=r(90158),A=r(58347),N=r(73424),q=r(95511),D=r(26577),L=r(56813),R=r(26892),E=r(84509);function O(e){var t;let{maxItems:r=5}=e,{data:s,isLoading:i,error:o}=(0,E.oL)(r),h=null!==(t=null==s?void 0:s.logs)&&void 0!==t?t:[];return(0,n.jsxs)(c.Z,{children:[(0,n.jsx)(v.Z,{title:"Recent Activity",action:(0,n.jsx)(F.Z,{component:w.default,href:"/audit-logs",size:"small",endIcon:(0,n.jsx)(D.Z,{}),sx:{textTransform:"none"},children:"View All"})}),(0,n.jsx)(d.Z,{sx:{pt:0},children:i?(0,n.jsx)(T.Z,{sx:{py:0},children:[...Array(r)].map((e,t)=>(0,n.jsx)(A.ZP,{sx:{px:0,py:1.5},children:(0,n.jsx)(N.Z,{primary:(0,n.jsxs)(a.Z,{sx:{display:"flex",gap:1},children:[(0,n.jsx)(x.Z,{variant:"rounded",width:60,height:24}),(0,n.jsx)(x.Z,{variant:"text",width:80}),(0,n.jsx)(x.Z,{variant:"text",width:60})]}),secondary:(0,n.jsx)(x.Z,{variant:"text",width:50})})},t))}):o?(0,n.jsx)(l.Z,{color:"text.secondary",align:"center",children:"Failed to load recent activity"}):0===h.length?(0,n.jsx)(l.Z,{color:"text.secondary",align:"center",sx:{py:2},children:"No recent activity"}):(0,n.jsx)(T.Z,{sx:{py:0},children:h.map(e=>{var t;return(0,n.jsx)(A.ZP,{sx:{px:0,py:1.5,"&:not(:last-child)":{borderBottom:"1px solid",borderColor:"divider"}},children:(0,n.jsx)(N.Z,{primary:(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",gap:1,flexWrap:"wrap"},children:[(0,n.jsx)(L.I,{action:e.action,size:"small"}),(0,n.jsx)(l.Z,{variant:"body2",sx:{fontWeight:500},children:e.targetName}),(0,n.jsxs)(l.Z,{variant:"body2",color:"text.secondary",children:["by ",e.actor.replace("api:","").replace("cli:","")]}),"failure"===e.status&&(0,n.jsx)(R.c,{status:e.status,size:"small"})]}),secondary:(0,n.jsx)(q.Z,{title:(t=e.timestamp,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(new Date(t))),arrow:!0,children:(0,n.jsx)(l.Z,{variant:"caption",component:"span",color:"text.disabled",children:function(e){let t=new Date,r=new Date(e),n=Math.floor((t.getTime()-r.getTime())/6e4),s=Math.floor(n/60);return n<1?"just now":n<60?"".concat(n,"m ago"):s<24?"".concat(s,"h ago"):"".concat(Math.floor(s/24),"d ago")}(e.timestamp)})})})},e.id)})})})]})}var K=r(84974),M=r(37228);function U(){let{data:e,isLoading:t}=(0,M.UW)();if(t)return(0,n.jsx)(c.Z,{children:(0,n.jsxs)(d.Z,{children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:2},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,n.jsx)(x.Z,{variant:"circular",width:20,height:20}),(0,n.jsx)(x.Z,{variant:"text",width:120})]}),(0,n.jsx)(x.Z,{variant:"rounded",width:60,height:24})]}),(0,n.jsx)(x.Z,{variant:"text",width:"50%",height:32}),(0,n.jsx)(x.Z,{variant:"text",width:"70%"})]})});if(!(null==e?void 0:e.enabled))return(0,n.jsx)(c.Z,{children:(0,n.jsxs)(d.Z,{children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:2},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,n.jsx)(K.Z,{sx:{fontSize:20,color:"text.secondary"}}),(0,n.jsx)(l.Z,{variant:"body2",fontWeight:500,color:"text.secondary",children:"External Access"})]}),(0,n.jsx)(b.Z,{label:"Not configured",size:"small",variant:"outlined"})]}),(0,n.jsx)(l.Z,{variant:"body2",color:"text.secondary",sx:{mb:2},children:"playit.gg is not configured"}),(0,n.jsx)(F.Z,{component:w.default,href:"/routing",size:"small",endIcon:(0,n.jsx)(D.Z,{}),sx:{fontSize:12},children:"Manage"})]})});let r=e.agentRunning&&"running"===e.containerStatus,s=e.servers.length,i=e.servers.filter(e=>e.playitDomain).length;return(0,n.jsx)(c.Z,{children:(0,n.jsxs)(d.Z,{children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:2},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,n.jsx)(K.Z,{sx:{fontSize:20,color:"primary.main"}}),(0,n.jsx)(l.Z,{variant:"body2",fontWeight:500,children:"External Access"})]}),(0,n.jsx)(b.Z,{label:r?"Running":"Stopped",size:"small",color:r?"success":"default",variant:"outlined"})]}),(0,n.jsxs)(l.Z,{variant:"h6",sx:{mb:.5},children:[i," / ",s," servers"]}),(0,n.jsx)(l.Z,{variant:"body2",color:"text.secondary",sx:{mb:2},children:"With external domains"}),(0,n.jsx)(F.Z,{component:w.default,href:"/routing",size:"small",endIcon:(0,n.jsx)(D.Z,{}),sx:{fontSize:12},children:"Manage"})]})})}function B(){let{data:e,isLoading:t}=(0,f.x$)(),{data:r,isLoading:v}=(0,f.Sr)(),{statusMap:y}=(0,g.d)(),b=t||v,w=(null==e?void 0:e.total)||0,S=(null==e?void 0:e.servers.filter(e=>{let t=y[e.name];return"running"===((null==t?void 0:t.status)||e.status)}).length)||0,C=(null==r?void 0:r.total)||0;return b?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.Z,{elevation:0,sx:{mb:4,p:3,background:e=>"linear-gradient(135deg, ".concat((0,i.Fq)(e.palette.secondary.main,.1)," 0%, ").concat((0,i.Fq)(e.palette.primary.main,.1)," 100%)"),borderRadius:2,border:e=>"1px solid ".concat((0,i.Fq)(e.palette.secondary.main,.2))},children:(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",gap:2},children:[(0,n.jsx)(a.Z,{sx:{display:{xs:"none",sm:"flex"},alignItems:"center",justifyContent:"center",width:56,height:56,borderRadius:2,bgcolor:"primary.main",color:"primary.contrastText"},children:(0,n.jsx)(h.Z,{sx:{fontSize:32}})}),(0,n.jsxs)(a.Z,{children:[(0,n.jsx)(l.Z,{variant:"h4",component:"h1",fontWeight:"bold",sx:{fontSize:{xs:"1.5rem",sm:"2.125rem"}},children:"Dashboard"}),(0,n.jsx)(l.Z,{variant:"body1",color:"text.secondary",children:"Overview of your Minecraft server infrastructure"})]})]})}),(0,n.jsx)(o.ZP,{container:!0,spacing:3,sx:{mb:4},children:[0,1,2,3].map(e=>(0,n.jsx)(o.ZP,{item:!0,xs:12,sm:6,md:3,children:(0,n.jsx)(c.Z,{sx:{height:"100%",position:"relative",overflow:"hidden","&::before":{content:'""',position:"absolute",top:0,left:0,right:0,height:"4px",background:"grey.300"}},children:(0,n.jsxs)(d.Z,{children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:2},children:[(0,n.jsx)(x.Z,{variant:"text",width:"60%"}),(0,n.jsx)(x.Z,{variant:"circular",width:32,height:32})]}),(0,n.jsx)(x.Z,{variant:"text",width:"40%",height:48}),(0,n.jsx)(x.Z,{variant:"text",width:"70%"})]})})},e))}),(0,n.jsxs)(o.ZP,{container:!0,spacing:3,children:[(0,n.jsx)(o.ZP,{item:!0,xs:12,md:7,children:(0,n.jsx)(c.Z,{children:(0,n.jsxs)(d.Z,{children:[(0,n.jsx)(x.Z,{variant:"text",width:"30%",height:32,sx:{mb:2}}),[0,1,2,3,4].map(e=>(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",gap:2,py:1.5,borderBottom:"1px solid",borderColor:"divider"},children:[(0,n.jsx)(x.Z,{variant:"circular",width:10,height:10}),(0,n.jsx)(x.Z,{variant:"text",width:"25%"}),(0,n.jsx)(x.Z,{variant:"rounded",width:60,height:24,sx:{ml:"auto"}})]},e))]})})}),(0,n.jsx)(o.ZP,{item:!0,xs:12,md:5,children:(0,n.jsxs)(a.Z,{sx:{display:"flex",flexDirection:"column",gap:3},children:[(0,n.jsx)(c.Z,{children:(0,n.jsxs)(d.Z,{children:[(0,n.jsx)(x.Z,{variant:"text",width:"40%",height:32,sx:{mb:2}}),[0,1,2,3].map(e=>(0,n.jsxs)(a.Z,{sx:{display:"flex",gap:1.5,py:1,borderBottom:"1px solid",borderColor:"divider"},children:[(0,n.jsx)(x.Z,{variant:"circular",width:24,height:24}),(0,n.jsxs)(a.Z,{sx:{flex:1},children:[(0,n.jsx)(x.Z,{variant:"text",width:"80%"}),(0,n.jsx)(x.Z,{variant:"text",width:"50%"})]})]},e))]})}),(0,n.jsx)(c.Z,{children:(0,n.jsxs)(d.Z,{children:[(0,n.jsx)(x.Z,{variant:"text",width:"35%",height:32,sx:{mb:2}}),[0,1].map(e=>(0,n.jsxs)(a.Z,{sx:{py:1,borderBottom:"1px solid",borderColor:"divider"},children:[(0,n.jsx)(x.Z,{variant:"text",width:"60%"}),(0,n.jsx)(x.Z,{variant:"text",width:"90%"})]},e))]})})]})})]})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.Z,{elevation:0,sx:{mb:4,p:3,background:e=>"linear-gradient(135deg, ".concat((0,i.Fq)(e.palette.secondary.main,.1)," 0%, ").concat((0,i.Fq)(e.palette.primary.main,.1)," 100%)"),borderRadius:2,border:e=>"1px solid ".concat((0,i.Fq)(e.palette.secondary.main,.2))},children:(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",gap:2},children:[(0,n.jsx)(a.Z,{sx:{display:{xs:"none",sm:"flex"},alignItems:"center",justifyContent:"center",width:56,height:56,borderRadius:2,bgcolor:"secondary.main",color:"secondary.contrastText"},children:(0,n.jsx)(h.Z,{sx:{fontSize:32}})}),(0,n.jsxs)(a.Z,{children:[(0,n.jsx)(l.Z,{variant:"h4",component:"h1",fontWeight:"bold",sx:{fontSize:{xs:"1.5rem",sm:"2.125rem"}},children:"Dashboard"}),(0,n.jsx)(l.Z,{variant:"body1",color:"text.secondary",children:"Overview of your Minecraft server infrastructure"})]})]})}),(0,n.jsxs)(o.ZP,{container:!0,spacing:3,sx:{mb:4},children:[(0,n.jsx)(o.ZP,{item:!0,xs:12,sm:6,md:3,children:(0,n.jsx)(Z,{title:"Total Servers",value:w,icon:(0,n.jsx)(u.Z,{fontSize:"large"}),color:"primary",description:"All configured servers"})}),(0,n.jsx)(o.ZP,{item:!0,xs:12,sm:6,md:3,children:(0,n.jsx)(Z,{title:"Online Servers",value:S,icon:(0,n.jsx)(p.Z,{fontSize:"large"}),color:"success",description:"Currently running"})}),(0,n.jsx)(o.ZP,{item:!0,xs:12,sm:6,md:3,children:(0,n.jsx)(Z,{title:"Total Players",value:0,icon:(0,n.jsx)(m.Z,{fontSize:"large"}),color:"info",description:"Across all servers"})}),(0,n.jsx)(o.ZP,{item:!0,xs:12,sm:6,md:3,children:(0,n.jsx)(Z,{title:"Total Worlds",value:C,icon:(0,n.jsx)(j.Z,{fontSize:"large"}),color:"secondary",description:"Available worlds"})})]}),(0,n.jsxs)(o.ZP,{container:!0,spacing:3,children:[(0,n.jsx)(o.ZP,{item:!0,xs:12,md:7,children:(0,n.jsx)(I,{servers:(null==e?void 0:e.servers)||[],statusMap:y,isLoading:t,maxItems:5,showViewAll:!0})}),(0,n.jsx)(o.ZP,{item:!0,xs:12,md:5,children:(0,n.jsxs)(a.Z,{sx:{display:"flex",flexDirection:"column",gap:3},children:[(0,n.jsx)(U,{}),(0,n.jsx)(O,{maxItems:5}),(0,n.jsx)(W,{maxVersions:2})]})})]})]})}},56813:function(e,t,r){"use strict";r.d(t,{I:function(){return a}});var n=r(94655),s=r(25333),i=r(82925);function a(e){let{action:t,size:r="small"}=e,a=i.Lu[t]||"default",l=i.n3[t]||t;return(0,n.jsx)(s.Z,{label:l,color:a,size:r,variant:"filled",sx:{fontWeight:600,fontSize:"small"===r?"0.7rem":"0.8rem"}})}},26892:function(e,t,r){"use strict";r.d(t,{c:function(){return l}});var n=r(94655),s=r(25333),i=r(46207),a=r(43436);function l(e){let{status:t,size:r="small"}=e;return(0,n.jsx)(s.Z,{icon:"success"===t?(0,n.jsx)(i.Z,{}):(0,n.jsx)(a.Z,{}),label:"success"===t?"OK":"Error",color:"success"===t?"success":"error",size:r,variant:"outlined",sx:{fontWeight:500,fontSize:"small"===r?"0.7rem":"0.8rem"}})}},84509:function(e,t,r){"use strict";r.d(t,{DM:function(){return a},HZ:function(){return o},VM:function(){return l},hT:function(){return i},oL:function(){return c}});var n=r(5632),s=r(42936);function i(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=function(e){let t=new URLSearchParams;e.action&&t.set("action",e.action),e.actor&&t.set("actor",e.actor),e.targetType&&t.set("targetType",e.targetType),e.targetName&&t.set("targetName",e.targetName),e.status&&t.set("status",e.status),e.from&&t.set("from",e.from),e.to&&t.set("to",e.to),void 0!==e.limit&&t.set("limit",String(e.limit)),void 0!==e.offset&&t.set("offset",String(e.offset)),e.sort&&t.set("sort",e.sort);let r=t.toString();return r?"?".concat(r):""}(e);return(0,n.a)({queryKey:["audit-logs",e],queryFn:()=>(0,s.SC)("/api/audit-logs".concat(r)),enabled:(null==t?void 0:t.enabled)!==!1})}function a(e){return(0,n.a)({queryKey:["audit-logs","stats"],queryFn:()=>(0,s.SC)("/api/audit-logs/stats"),enabled:(null==e?void 0:e.enabled)!==!1,refetchInterval:3e4})}function l(e,t){return(0,n.a)({queryKey:["audit-logs",e],queryFn:()=>(0,s.SC)("/api/audit-logs/".concat(encodeURIComponent(e))),enabled:(null==t?void 0:t.enabled)!==!1&&!!e})}function o(e,t){var r;return i({targetType:"server",targetName:e,limit:null!==(r=null==t?void 0:t.limit)&&void 0!==r?r:20},{enabled:(null==t?void 0:t.enabled)!==!1&&!!e})}function c(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10;return i({limit:e,sort:"timestamp:desc"})}},37228:function(e,t,r){"use strict";r.d(t,{Bc:function(){return o},N$:function(){return c},UW:function(){return l}});var n=r(5632),s=r(58919),i=r(20367),a=r(42936);function l(){return(0,n.a)({queryKey:["playit-status"],queryFn:()=>(0,a.SC)("/api/playit/status"),refetchInterval:3e4})}function o(){let e=(0,s.NL)();return(0,i.D)({mutationFn:()=>(0,a.SC)("/api/playit/start",{method:"POST"}),onSuccess:()=>{e.invalidateQueries({queryKey:["playit-status"]})}})}function c(){let e=(0,s.NL)();return(0,i.D)({mutationFn:()=>(0,a.SC)("/api/playit/stop",{method:"POST"}),onSuccess:()=>{e.invalidateQueries({queryKey:["playit-status"]})}})}},82925:function(e,t,r){"use strict";r.d(t,{KK:function(){return l},Lu:function(){return n},Xn:function(){return a},n3:function(){return s},xg:function(){return i}});let n={"server.create":"success","server.delete":"error","server.start":"info","server.stop":"warning","server.restart":"secondary","player.whitelist.add":"success","player.whitelist.remove":"warning","player.ban":"error","player.unban":"success","player.op":"info","player.deop":"warning","player.kick":"error","audit.purge":"default"},s={"server.create":"Create","server.delete":"Delete","server.start":"Start","server.stop":"Stop","server.restart":"Restart","player.whitelist.add":"Whitelist Add","player.whitelist.remove":"Whitelist Remove","player.ban":"Ban","player.unban":"Unban","player.op":"Op","player.deop":"Deop","player.kick":"Kick","audit.purge":"Purge"},i=["server.create","server.delete","server.start","server.stop","server.restart","player.whitelist.add","player.whitelist.remove","player.ban","player.unban","player.op","player.deop","player.kick","audit.purge"],a=["server.create","server.delete","server.start","server.stop","server.restart"],l=["player.whitelist.add","player.whitelist.remove","player.ban","player.unban","player.op","player.deop","player.kick"]}},function(e){e.O(0,[6812,9760,5004,7296,540,4416,2538,5511,55,8347,5123,2666,2701,3669,2757,1744],function(){return e(e.s=12121)}),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4095],{16387:function(e,r,t){Promise.resolve().then(t.bind(t,6453))},6453:function(e,r,t){"use strict";t.r(r),t.d(r,{default:function(){return B}});var n=t(94655),i=t(35106),a=t(7281),s=t(74228),l=t(46725),o=t(56275),c=t(62108),d=t(79983),x=t(31317),h=t(62142),m=t(90158),u=t(58347),p=t(49954),f=t(17820),g=t(73424),b=t(61505),j=t(71185),y=t(76176),v=t(27171),Z=t(35847),w=t(29983),C=t(80620),k=t(84974),S=t(34675),P=t(85480),z=t(64779);function I(e){return(0,n.jsxs)(z.Z,{...e,viewBox:"0 0 32 32",children:[(0,n.jsx)("rect",{width:"32",height:"32",fill:"#5DA840"}),(0,n.jsx)("rect",{x:"4",y:"8",width:"8",height:"8",fill:"#000"}),(0,n.jsx)("rect",{x:"20",y:"8",width:"8",height:"8",fill:"#000"}),(0,n.jsx)("rect",{x:"12",y:"16",width:"8",height:"4",fill:"#000"}),(0,n.jsx)("rect",{x:"8",y:"20",width:"16",height:"8",fill:"#000"}),(0,n.jsx)("rect",{x:"8",y:"28",width:"4",height:"4",fill:"#000"}),(0,n.jsx)("rect",{x:"20",y:"28",width:"4",height:"4",fill:"#000"}),(0,n.jsx)("rect",{x:"0",y:"0",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"}),(0,n.jsx)("rect",{x:"8",y:"4",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"}),(0,n.jsx)("rect",{x:"24",y:"0",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"}),(0,n.jsx)("rect",{x:"28",y:"8",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"}),(0,n.jsx)("rect",{x:"0",y:"24",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"})]})}var W=t(8690),A=t(6986);let D=[{label:"Dashboard",href:"/dashboard",icon:(0,n.jsx)(y.Z,{})},{label:"Servers",href:"/servers",icon:(0,n.jsx)(v.Z,{})},{label:"Worlds",href:"/worlds",icon:(0,n.jsx)(k.Z,{})},{label:"Players",href:"/players",icon:(0,n.jsx)(Z.Z,{})},{label:"Audit",href:"/audit-logs",icon:(0,n.jsx)(C.Z,{})},{label:"Backups",href:"/backups",icon:(0,n.jsx)(S.Z,{})},{label:"Routing",href:"/routing",icon:(0,n.jsx)(w.Z,{})}];function T(e){let{mobileOpen:r,onMenuToggle:t}=e,i=(0,s.usePathname)(),{data:y}=(0,A.kP)(),v=e=>"/dashboard"===e?"/dashboard"===i||"/"===i:i.startsWith(e);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o.Z,{position:"fixed",elevation:0,sx:{backgroundColor:"background.paper",borderBottom:"1px solid",borderColor:"divider",zIndex:e=>e.zIndex.drawer+1},children:(0,n.jsxs)(c.Z,{sx:{maxWidth:"1400px",width:"100%",mx:"auto",px:{xs:2,sm:3}},children:[(0,n.jsx)(d.Z,{color:"inherit","aria-label":"open menu",edge:"start",onClick:t,sx:{mr:2,display:{md:"none"}},children:(0,n.jsx)(b.Z,{})}),(0,n.jsxs)(l.default,{href:"/",style:{textDecoration:"none",display:"flex",alignItems:"center"},children:[(0,n.jsx)(I,{sx:{fontSize:28,color:"primary.main",mr:1}}),(0,n.jsx)(x.Z,{variant:"h6",component:"span",sx:{fontFamily:'"Minecraft", sans-serif',fontWeight:400,color:"common.white",letterSpacing:"0.05em",fontSize:"1.1rem"},children:"Minecraft Console"})]}),(0,n.jsx)(a.Z,{component:"nav",sx:{display:{xs:"none",md:"flex"},alignItems:"center",gap:1,ml:4,flex:1},children:D.map(e=>{let r=v(e.href);return(0,n.jsx)(l.default,{href:e.href,style:{textDecoration:"none"},onClick:()=>!r&&(0,W.Av)(),children:(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1,borderRadius:2,color:r?"primary.main":"text.secondary",backgroundColor:r?"action.selected":"transparent",transition:"all 0.2s ease","&:hover":{backgroundColor:"action.hover",color:r?"primary.main":"text.primary"}},children:[(0,n.jsx)(a.Z,{component:"span",sx:{display:"flex",alignItems:"center","& svg":{fontSize:20}},children:e.icon}),(0,n.jsx)(x.Z,{variant:"body2",sx:{fontWeight:r?600:400},children:e.label})]})},e.href)})}),(0,n.jsx)(a.Z,{sx:{display:"flex",alignItems:"center",gap:2},children:(0,n.jsx)(P.Ie,{})})]})}),(0,n.jsx)(h.ZP,{variant:"temporary",anchor:"left",open:r,onClose:t,ModalProps:{keepMounted:!0},sx:{display:{xs:"block",md:"none"},"& .MuiDrawer-paper":{boxSizing:"border-box",width:280,backgroundColor:"background.paper"}},children:(0,n.jsxs)(a.Z,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",px:2,py:2,minHeight:64,borderBottom:"1px solid",borderColor:"divider"},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center"},children:[(0,n.jsx)(I,{sx:{fontSize:24,color:"primary.main",mr:1}}),(0,n.jsx)(x.Z,{variant:"h6",component:"span",sx:{fontFamily:'"Minecraft", sans-serif',fontWeight:400,color:"primary.main",letterSpacing:"0.05em",fontSize:"1rem"},children:"Minecraft Console"})]}),(0,n.jsx)(d.Z,{onClick:t,"aria-label":"close menu",children:(0,n.jsx)(j.Z,{})})]}),(0,n.jsx)(m.Z,{sx:{flex:1,px:1,py:2},children:D.map(e=>{let r=v(e.href);return(0,n.jsx)(u.ZP,{disablePadding:!0,sx:{mb:.5},children:(0,n.jsxs)(p.Z,{component:l.default,href:e.href,onClick:()=>{t(),r||(0,W.Av)()},"aria-current":r?"page":void 0,sx:{borderRadius:2,backgroundColor:r?"action.selected":"transparent","&:hover":{backgroundColor:"action.hover"}},children:[(0,n.jsx)(f.Z,{sx:{color:r?"primary.main":"text.secondary",minWidth:40},children:e.icon}),(0,n.jsx)(g.Z,{primary:e.label,primaryTypographyProps:{fontWeight:r?600:400,color:r?"primary.main":"text.primary"}})]})},e.href)})})]})})]})}var _=t(67337),E=t(41261),q=t(69123),M=t(75845),L=t(43880);function R(e){return(0,n.jsx)(z.Z,{...e,viewBox:"0 0 24 24",children:(0,n.jsx)("path",{d:"M13.983 11.078h2.119a.186.186 0 00.186-.185V9.006a.186.186 0 00-.186-.186h-2.119a.185.185 0 00-.185.185v1.888c0 .102.083.185.185.185m-2.954-5.43h2.118a.186.186 0 00.186-.186V3.574a.186.186 0 00-.186-.185h-2.118a.185.185 0 00-.185.185v1.888c0 .102.082.185.185.186m0 2.716h2.118a.187.187 0 00.186-.186V6.29a.186.186 0 00-.186-.185h-2.118a.185.185 0 00-.185.185v1.887c0 .102.082.185.185.186m-2.93 0h2.12a.186.186 0 00.184-.186V6.29a.185.185 0 00-.185-.185H8.1a.185.185 0 00-.185.185v1.887c0 .102.083.185.185.186m-2.964 0h2.119a.186.186 0 00.185-.186V6.29a.185.185 0 00-.185-.185H5.136a.186.186 0 00-.186.185v1.887c0 .102.084.185.186.186m5.893 2.715h2.118a.186.186 0 00.186-.185V9.006a.186.186 0 00-.186-.186h-2.118a.185.185 0 00-.185.185v1.888c0 .102.082.185.185.185m-2.93 0h2.12a.185.185 0 00.184-.185V9.006a.185.185 0 00-.184-.186h-2.12a.185.185 0 00-.184.185v1.888c0 .102.083.185.185.185m-2.964 0h2.119a.185.185 0 00.185-.185V9.006a.185.185 0 00-.184-.186h-2.12a.186.186 0 00-.186.186v1.887c0 .102.084.185.186.185m-2.92 0h2.12a.185.185 0 00.184-.185V9.006a.185.185 0 00-.184-.186h-2.12a.185.185 0 00-.184.185v1.888c0 .102.082.185.185.185M23.763 9.89c-.065-.051-.672-.51-1.954-.51-.338.001-.676.03-1.01.087-.248-1.7-1.653-2.53-1.716-2.566l-.344-.199-.226.327c-.284.438-.49.922-.612 1.43-.23.97-.09 1.882.403 2.661-.595.332-1.55.413-1.744.42H.751a.751.751 0 00-.75.748 11.376 11.376 0 00.692 4.062c.545 1.428 1.355 2.48 2.41 3.124 1.18.723 3.1 1.137 5.275 1.137.983.003 1.963-.086 2.93-.266a12.248 12.248 0 003.823-1.389c.98-.567 1.86-1.288 2.61-2.136 1.252-1.418 1.998-2.997 2.553-4.4h.221c1.372 0 2.215-.549 2.68-1.009.309-.293.55-.65.707-1.046l.098-.288z"})})}let U=[{title:"Resources",links:[{label:"Getting Started",href:"https://minecraft-server-manager.readthedocs.io/en/latest/getting-started/",external:!0},{label:"Configuration",href:"https://minecraft-server-manager.readthedocs.io/en/latest/configuration/",external:!0},{label:"Troubleshooting",href:"https://minecraft-server-manager.readthedocs.io/en/latest/troubleshooting/",external:!0}]},{title:"Documentation",links:[{label:"CLI Commands",href:"https://minecraft-server-manager.readthedocs.io/en/latest/cli/",external:!0},{label:"API Reference",href:"https://minecraft-server-manager.readthedocs.io/en/latest/console/",external:!0},{label:"itzg Reference",href:"https://minecraft-server-manager.readthedocs.io/en/latest/itzg-reference/",external:!0}]},{title:"Community",links:[{label:"GitHub",href:"https://github.com/smallmiro/minecraft-server-manager",external:!0},{label:"Issues",href:"https://github.com/smallmiro/minecraft-server-manager/issues",external:!0}]},{title:"About",links:[{label:"License",href:"https://github.com/smallmiro/minecraft-server-manager/blob/main/LICENSE",external:!0},{label:"Docker Hub",href:"https://hub.docker.com/r/itzg/minecraft-server",external:!0}]}];function H(){let e=new Date().getFullYear();return(0,n.jsx)(a.Z,{component:"footer",sx:{backgroundColor:"background.paper",borderTop:"1px solid",borderColor:"divider",mt:"auto"},children:(0,n.jsxs)(_.Z,{maxWidth:"lg",sx:{py:6},children:[(0,n.jsx)(a.Z,{sx:{display:"grid",gridTemplateColumns:{xs:"repeat(2, 1fr)",sm:"repeat(4, 1fr)"},gap:4,mb:4},children:U.map(e=>(0,n.jsxs)(a.Z,{children:[(0,n.jsx)(x.Z,{variant:"subtitle2",sx:{fontWeight:600,color:"text.primary",mb:2},children:e.title}),(0,n.jsx)(a.Z,{component:"ul",sx:{listStyle:"none",p:0,m:0},children:e.links.map(e=>(0,n.jsx)(a.Z,{component:"li",sx:{mb:1},children:(0,n.jsx)(E.Z,{href:e.href,target:e.external?"_blank":void 0,rel:e.external?"noopener noreferrer":void 0,underline:"hover",sx:{color:"text.secondary",fontSize:"0.875rem",transition:"color 0.2s ease","&:hover":{color:"primary.main"}},children:e.label})},e.label))})]},e.title))}),(0,n.jsx)(q.Z,{sx:{mb:3}}),(0,n.jsxs)(a.Z,{sx:{display:"flex",flexDirection:{xs:"column",sm:"row"},justifyContent:"space-between",alignItems:{xs:"flex-start",sm:"center"},gap:2},children:[(0,n.jsxs)(x.Z,{variant:"body2",sx:{color:"text.tertiary"},children:[e," \xa9"," ",(0,n.jsx)(E.Z,{href:"https://github.com/smallmiro/minecraft-server-manager",target:"_blank",rel:"noopener noreferrer",underline:"hover",sx:{color:"primary.main"},children:"Minecraft Server Management Console"})]}),(0,n.jsxs)(a.Z,{sx:{display:"flex",gap:2},children:[(0,n.jsx)(E.Z,{href:"https://github.com/smallmiro/minecraft-server-manager",target:"_blank",rel:"noopener noreferrer","aria-label":"GitHub",sx:{color:"text.secondary",transition:"color 0.2s ease","&:hover":{color:"text.primary"}},children:(0,n.jsx)(M.Z,{fontSize:"small"})}),(0,n.jsx)(E.Z,{href:"https://minecraft-server-manager.readthedocs.io/",target:"_blank",rel:"noopener noreferrer","aria-label":"Documentation",sx:{color:"text.secondary",transition:"color 0.2s ease","&:hover":{color:"text.primary"}},children:(0,n.jsx)(L.Z,{fontSize:"small"})}),(0,n.jsx)(E.Z,{href:"https://hub.docker.com/r/itzg/minecraft-server",target:"_blank",rel:"noopener noreferrer","aria-label":"Docker Hub",sx:{color:"text.secondary",transition:"color 0.2s ease","&:hover":{color:"text.primary"}},children:(0,n.jsx)(R,{fontSize:"small"})})]})]})]})})}function B(e){let{children:r}=e,[t,s]=(0,i.useState)(!1);return(0,n.jsxs)(a.Z,{sx:{display:"flex",flexDirection:"column",minHeight:"100vh",backgroundColor:"background.default"},children:[(0,n.jsx)(T,{mobileOpen:t,onMenuToggle:()=>{s(!t)}}),(0,n.jsx)(a.Z,{component:"main",sx:{flexGrow:1,display:"flex",flexDirection:"column",pt:{xs:"".concat(88,"px"),sm:"".concat(96,"px")},pb:{xs:3,sm:4},px:{xs:2,sm:3,md:4},maxWidth:"1400px",width:"100%",mx:"auto"},children:r}),(0,n.jsx)(H,{})]})}},85480:function(e,r,t){"use strict";t.d(r,{U0:function(){return u},WS:function(){return p},Ie:function(){return I}});var n=t(94655),i=t(35106),a=t(7281),s=t(81071),l=t(97436),o=t(52082),c=t(79983),d=t(30417),x=t(36848),h=t(554),m=t(6986);function u(e){let{onSuccess:r}=e,[t,u]=(0,i.useState)(""),[p,f]=(0,i.useState)(""),[g,b]=(0,i.useState)(!1),[j,y]=(0,i.useState)({}),[v,Z]=(0,i.useState)(null),[w,C]=(0,i.useState)(!1),k=()=>{let e={};return t?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)||(e.email="Invalid email address"):e.email="Email is required",p||(e.password="Password is required"),y(e),0===Object.keys(e).length},S=async e=>{if(e.preventDefault(),Z(null),k()){C(!0);try{let e=await m.cg.email({email:t,password:p});if(e.error){Z(e.error.message||"Invalid credentials"),C(!1);return}r&&r()}catch(e){Z("An unexpected error occurred. Please try again."),C(!1)}}};return(0,n.jsxs)(a.Z,{component:"form",onSubmit:S,sx:{display:"flex",flexDirection:"column",gap:2},children:[v&&(0,n.jsx)(s.Z,{severity:"error",onClose:()=>Z(null),children:v}),(0,n.jsx)(l.Z,{label:"Email",type:"email",value:t,onChange:e=>u(e.target.value),error:!!j.email,helperText:j.email,disabled:w,fullWidth:!0,required:!0}),(0,n.jsx)(l.Z,{label:"Password",type:g?"text":"password",value:p,onChange:e=>f(e.target.value),error:!!j.password,helperText:j.password,disabled:w,fullWidth:!0,required:!0,InputProps:{endAdornment:(0,n.jsx)(o.Z,{position:"end",children:(0,n.jsx)(c.Z,{"aria-label":"toggle password visibility",onClick:()=>{b(!g)},edge:"end",children:g?(0,n.jsx)(x.Z,{}):(0,n.jsx)(h.Z,{})})})}}),(0,n.jsx)(d.Z,{type:"submit",variant:"contained",color:"primary",disabled:w,fullWidth:!0,size:"large",children:w?"Signing in...":"Sign In"})]})}function p(e){let{onSuccess:r}=e,[t,u]=(0,i.useState)(""),[p,f]=(0,i.useState)(""),[g,b]=(0,i.useState)(""),[j,y]=(0,i.useState)(""),[v,Z]=(0,i.useState)(!1),[w,C]=(0,i.useState)(!1),[k,S]=(0,i.useState)({}),[P,z]=(0,i.useState)(null),[I,W]=(0,i.useState)(!1),A=()=>{let e={};return t||(e.name="Name is required"),p?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(p)||(e.email="Invalid email address"):e.email="Email is required",g?g.length<8&&(e.password="Password must be at least 8 characters"):e.password="Password is required",j?g!==j&&(e.confirmPassword="Passwords do not match"):e.confirmPassword="Please confirm your password",S(e),0===Object.keys(e).length},D=async e=>{if(e.preventDefault(),z(null),A()){W(!0);try{let e=await m.y1.email({email:p,password:g,name:t});if(e.error){z(e.error.message||"Registration failed"),W(!1);return}r&&r()}catch(e){z("An unexpected error occurred. Please try again."),W(!1)}}};return(0,n.jsxs)(a.Z,{component:"form",onSubmit:D,sx:{display:"flex",flexDirection:"column",gap:2},children:[P&&(0,n.jsx)(s.Z,{severity:"error",onClose:()=>z(null),children:P}),(0,n.jsx)(l.Z,{label:"Name",type:"text",value:t,onChange:e=>u(e.target.value),error:!!k.name,helperText:k.name,disabled:I,fullWidth:!0,required:!0}),(0,n.jsx)(l.Z,{label:"Email",type:"email",value:p,onChange:e=>f(e.target.value),error:!!k.email,helperText:k.email,disabled:I,fullWidth:!0,required:!0}),(0,n.jsx)(l.Z,{label:"Password",type:v?"text":"password",value:g,onChange:e=>b(e.target.value),error:!!k.password,helperText:k.password,disabled:I,fullWidth:!0,required:!0,InputProps:{endAdornment:(0,n.jsx)(o.Z,{position:"end",children:(0,n.jsx)(c.Z,{"aria-label":"toggle password visibility",onClick:()=>{Z(!v)},edge:"end",children:v?(0,n.jsx)(x.Z,{}):(0,n.jsx)(h.Z,{})})})}}),(0,n.jsx)(l.Z,{label:"Confirm Password",type:w?"text":"password",value:j,onChange:e=>y(e.target.value),error:!!k.confirmPassword,helperText:k.confirmPassword,disabled:I,fullWidth:!0,required:!0,InputProps:{endAdornment:(0,n.jsx)(o.Z,{position:"end",children:(0,n.jsx)(c.Z,{"aria-label":"toggle password visibility",onClick:()=>{C(!w)},edge:"end",children:w?(0,n.jsx)(x.Z,{}):(0,n.jsx)(h.Z,{})})})}}),(0,n.jsx)(d.Z,{type:"submit",variant:"contained",color:"primary",disabled:I,fullWidth:!0,size:"large",children:I?"Creating account...":"Sign Up"})]})}var f=t(74228),g=t(93017),b=t(86702),j=t(88812),y=t(31317),v=t(25333),Z=t(69123),w=t(7178),C=t(17820),k=t(73424),S=t(25169),P=t(41094),z=t(78319);function I(){let e=(0,f.useRouter)(),{data:r,isPending:t}=(0,m.kP)(),[s,l]=(0,i.useState)(null),o=()=>{l(null)},x=async()=>{o(),await (0,m.w7)(),e.push("/login")};if(t)return(0,n.jsx)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:(0,n.jsx)(g.Z,{size:24})});if(!(null==r?void 0:r.user))return(0,n.jsx)(d.Z,{variant:"contained",color:"primary",onClick:()=>{e.push("/login")},children:"Sign In"});let{user:h}=r,u=((e,r)=>{if(e){let r=e.split(" ");return r.length>=2?"".concat(r[0][0]).concat(r[1][0]).toUpperCase():e.substring(0,2).toUpperCase()}return r?r[0].toUpperCase():"?"})(h.name,h.email);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(c.Z,{onClick:e=>{l(e.currentTarget)},"aria-label":"user menu",children:(0,n.jsx)(b.Z,{sx:{bgcolor:"primary.main"},children:u})}),(0,n.jsxs)(j.Z,{anchorEl:s,open:!!s,onClose:o,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},sx:{mt:1},children:[(0,n.jsxs)(a.Z,{sx:{px:2,py:1.5,minWidth:200},children:[(0,n.jsx)(y.Z,{variant:"subtitle1",fontWeight:"600",children:h.name||"User"}),(0,n.jsx)(y.Z,{variant:"body2",color:"text.secondary",children:h.email}),"admin"===h.role&&(0,n.jsx)(v.Z,{label:"Admin",size:"small",color:"primary",sx:{mt:1}})]}),(0,n.jsx)(Z.Z,{}),"admin"===h.role&&(0,n.jsxs)(w.Z,{onClick:()=>{o(),e.push("/admin/users")},children:[(0,n.jsx)(C.Z,{children:(0,n.jsx)(S.Z,{fontSize:"small"})}),(0,n.jsx)(k.Z,{children:"Users"})]}),(0,n.jsxs)(w.Z,{onClick:()=>{o(),e.push("/settings")},children:[(0,n.jsx)(C.Z,{children:(0,n.jsx)(P.Z,{fontSize:"small"})}),(0,n.jsx)(k.Z,{children:"Settings"})]}),(0,n.jsxs)(w.Z,{onClick:x,children:[(0,n.jsx)(C.Z,{children:(0,n.jsx)(z.Z,{fontSize:"small"})}),(0,n.jsx)(k.Z,{children:"Logout"})]})]})]})}},3454:function(e,r,t){"use strict";t.d(r,{LoadingProvider:function(){return o},startLoading:function(){return c},stopLoading:function(){return d}});var n=t(94655),i=t(35106),a=t(74228),s=t(31477),l=t.n(s);function o(e){let{children:r}=e,t=(0,a.usePathname)(),s=(0,a.useSearchParams)();return(0,i.useEffect)(()=>{l().done()},[t,s]),(0,n.jsx)(n.Fragment,{children:r})}function c(){l().start()}function d(){l().done()}l().configure({showSpinner:!1,speed:300,minimum:.1})},8690:function(e,r,t){"use strict";t.d(r,{Av:function(){return n.startLoading}});var n=t(3454)},6986:function(e,r,t){"use strict";t.d(r,{Cp:function(){return h},Nq:function(){return x},cg:function(){return l},kP:function(){return d},w7:function(){return o},y1:function(){return c},zB:function(){return m}});var n=t(77054),i=t(61648),a=t(35016);let s=(0,n.X)({baseURL:a.env.NEXT_PUBLIC_BETTER_AUTH_URL||"",plugins:[(0,i.zB)()]}),{signIn:l,signOut:o,signUp:c,useSession:d,updateUser:x,changePassword:h}=s,m=s.admin}},function(e){e.O(0,[6812,9760,5004,7296,7436,1071,2542,55,7727,8347,9949,4240,212,3669,2757,1744],function(){return e(e.s=16387)}),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4095],{16387:function(e,r,t){Promise.resolve().then(t.bind(t,6453))},6453:function(e,r,t){"use strict";t.r(r),t.d(r,{default:function(){return B}});var n=t(94655),i=t(35106),a=t(7281),s=t(74228),l=t(46725),o=t(56275),c=t(62108),d=t(79983),x=t(31317),h=t(62142),m=t(90158),u=t(58347),p=t(49954),f=t(17820),g=t(73424),b=t(61505),j=t(71185),y=t(76176),v=t(27171),Z=t(35847),w=t(29983),C=t(80620),k=t(84974),S=t(34675),P=t(85480),z=t(64779);function I(e){return(0,n.jsxs)(z.Z,{...e,viewBox:"0 0 32 32",children:[(0,n.jsx)("rect",{width:"32",height:"32",fill:"#5DA840"}),(0,n.jsx)("rect",{x:"4",y:"8",width:"8",height:"8",fill:"#000"}),(0,n.jsx)("rect",{x:"20",y:"8",width:"8",height:"8",fill:"#000"}),(0,n.jsx)("rect",{x:"12",y:"16",width:"8",height:"4",fill:"#000"}),(0,n.jsx)("rect",{x:"8",y:"20",width:"16",height:"8",fill:"#000"}),(0,n.jsx)("rect",{x:"8",y:"28",width:"4",height:"4",fill:"#000"}),(0,n.jsx)("rect",{x:"20",y:"28",width:"4",height:"4",fill:"#000"}),(0,n.jsx)("rect",{x:"0",y:"0",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"}),(0,n.jsx)("rect",{x:"8",y:"4",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"}),(0,n.jsx)("rect",{x:"24",y:"0",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"}),(0,n.jsx)("rect",{x:"28",y:"8",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"}),(0,n.jsx)("rect",{x:"0",y:"24",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"})]})}var W=t(8690),A=t(6986);let D=[{label:"Dashboard",href:"/dashboard",icon:(0,n.jsx)(y.Z,{})},{label:"Servers",href:"/servers",icon:(0,n.jsx)(v.Z,{})},{label:"Worlds",href:"/worlds",icon:(0,n.jsx)(k.Z,{})},{label:"Players",href:"/players",icon:(0,n.jsx)(Z.Z,{})},{label:"Audit",href:"/audit-logs",icon:(0,n.jsx)(C.Z,{})},{label:"Backups",href:"/backups",icon:(0,n.jsx)(S.Z,{})},{label:"Routing",href:"/routing",icon:(0,n.jsx)(w.Z,{})}];function T(e){let{mobileOpen:r,onMenuToggle:t}=e,i=(0,s.usePathname)(),{data:y}=(0,A.kP)(),v=e=>"/dashboard"===e?"/dashboard"===i||"/"===i:i.startsWith(e);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o.Z,{position:"fixed",elevation:0,sx:{backgroundColor:"background.paper",borderBottom:"1px solid",borderColor:"divider",zIndex:e=>e.zIndex.drawer+1},children:(0,n.jsxs)(c.Z,{sx:{maxWidth:"1400px",width:"100%",mx:"auto",px:{xs:2,sm:3}},children:[(0,n.jsx)(d.Z,{color:"inherit","aria-label":"open menu",edge:"start",onClick:t,sx:{mr:2,display:{md:"none"}},children:(0,n.jsx)(b.Z,{})}),(0,n.jsxs)(l.default,{href:"/",style:{textDecoration:"none",display:"flex",alignItems:"center"},children:[(0,n.jsx)(I,{sx:{fontSize:28,color:"primary.main",mr:1}}),(0,n.jsx)(x.Z,{variant:"h6",component:"span",sx:{fontFamily:'"Minecraft", sans-serif',fontWeight:400,color:"common.white",letterSpacing:"0.05em",fontSize:"1.1rem"},children:"Minecraft Console"})]}),(0,n.jsx)(a.Z,{component:"nav",sx:{display:{xs:"none",md:"flex"},alignItems:"center",gap:1,ml:4,flex:1},children:D.map(e=>{let r=v(e.href);return(0,n.jsx)(l.default,{href:e.href,style:{textDecoration:"none"},onClick:()=>!r&&(0,W.Av)(),children:(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1,borderRadius:2,color:r?"primary.main":"text.secondary",backgroundColor:r?"action.selected":"transparent",transition:"all 0.2s ease","&:hover":{backgroundColor:"action.hover",color:r?"primary.main":"text.primary"}},children:[(0,n.jsx)(a.Z,{component:"span",sx:{display:"flex",alignItems:"center","& svg":{fontSize:20}},children:e.icon}),(0,n.jsx)(x.Z,{variant:"body2",sx:{fontWeight:r?600:400},children:e.label})]})},e.href)})}),(0,n.jsx)(a.Z,{sx:{display:"flex",alignItems:"center",gap:2},children:(0,n.jsx)(P.Ie,{})})]})}),(0,n.jsx)(h.ZP,{variant:"temporary",anchor:"left",open:r,onClose:t,ModalProps:{keepMounted:!0},sx:{display:{xs:"block",md:"none"},"& .MuiDrawer-paper":{boxSizing:"border-box",width:280,backgroundColor:"background.paper"}},children:(0,n.jsxs)(a.Z,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",px:2,py:2,minHeight:64,borderBottom:"1px solid",borderColor:"divider"},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center"},children:[(0,n.jsx)(I,{sx:{fontSize:24,color:"primary.main",mr:1}}),(0,n.jsx)(x.Z,{variant:"h6",component:"span",sx:{fontFamily:'"Minecraft", sans-serif',fontWeight:400,color:"primary.main",letterSpacing:"0.05em",fontSize:"1rem"},children:"Minecraft Console"})]}),(0,n.jsx)(d.Z,{onClick:t,"aria-label":"close menu",children:(0,n.jsx)(j.Z,{})})]}),(0,n.jsx)(m.Z,{sx:{flex:1,px:1,py:2},children:D.map(e=>{let r=v(e.href);return(0,n.jsx)(u.ZP,{disablePadding:!0,sx:{mb:.5},children:(0,n.jsxs)(p.Z,{component:l.default,href:e.href,onClick:()=>{t(),r||(0,W.Av)()},"aria-current":r?"page":void 0,sx:{borderRadius:2,backgroundColor:r?"action.selected":"transparent","&:hover":{backgroundColor:"action.hover"}},children:[(0,n.jsx)(f.Z,{sx:{color:r?"primary.main":"text.secondary",minWidth:40},children:e.icon}),(0,n.jsx)(g.Z,{primary:e.label,primaryTypographyProps:{fontWeight:r?600:400,color:r?"primary.main":"text.primary"}})]})},e.href)})})]})})]})}var _=t(67337),E=t(41261),q=t(69123),M=t(75845),L=t(43880);function R(e){return(0,n.jsx)(z.Z,{...e,viewBox:"0 0 24 24",children:(0,n.jsx)("path",{d:"M13.983 11.078h2.119a.186.186 0 00.186-.185V9.006a.186.186 0 00-.186-.186h-2.119a.185.185 0 00-.185.185v1.888c0 .102.083.185.185.185m-2.954-5.43h2.118a.186.186 0 00.186-.186V3.574a.186.186 0 00-.186-.185h-2.118a.185.185 0 00-.185.185v1.888c0 .102.082.185.185.186m0 2.716h2.118a.187.187 0 00.186-.186V6.29a.186.186 0 00-.186-.185h-2.118a.185.185 0 00-.185.185v1.887c0 .102.082.185.185.186m-2.93 0h2.12a.186.186 0 00.184-.186V6.29a.185.185 0 00-.185-.185H8.1a.185.185 0 00-.185.185v1.887c0 .102.083.185.185.186m-2.964 0h2.119a.186.186 0 00.185-.186V6.29a.185.185 0 00-.185-.185H5.136a.186.186 0 00-.186.185v1.887c0 .102.084.185.186.186m5.893 2.715h2.118a.186.186 0 00.186-.185V9.006a.186.186 0 00-.186-.186h-2.118a.185.185 0 00-.185.185v1.888c0 .102.082.185.185.185m-2.93 0h2.12a.185.185 0 00.184-.185V9.006a.185.185 0 00-.184-.186h-2.12a.185.185 0 00-.184.185v1.888c0 .102.083.185.185.185m-2.964 0h2.119a.185.185 0 00.185-.185V9.006a.185.185 0 00-.184-.186h-2.12a.186.186 0 00-.186.186v1.887c0 .102.084.185.186.185m-2.92 0h2.12a.185.185 0 00.184-.185V9.006a.185.185 0 00-.184-.186h-2.12a.185.185 0 00-.184.185v1.888c0 .102.082.185.185.185M23.763 9.89c-.065-.051-.672-.51-1.954-.51-.338.001-.676.03-1.01.087-.248-1.7-1.653-2.53-1.716-2.566l-.344-.199-.226.327c-.284.438-.49.922-.612 1.43-.23.97-.09 1.882.403 2.661-.595.332-1.55.413-1.744.42H.751a.751.751 0 00-.75.748 11.376 11.376 0 00.692 4.062c.545 1.428 1.355 2.48 2.41 3.124 1.18.723 3.1 1.137 5.275 1.137.983.003 1.963-.086 2.93-.266a12.248 12.248 0 003.823-1.389c.98-.567 1.86-1.288 2.61-2.136 1.252-1.418 1.998-2.997 2.553-4.4h.221c1.372 0 2.215-.549 2.68-1.009.309-.293.55-.65.707-1.046l.098-.288z"})})}let U=[{title:"Resources",links:[{label:"Getting Started",href:"https://minecraft-server-manager.readthedocs.io/en/latest/getting-started/",external:!0},{label:"Configuration",href:"https://minecraft-server-manager.readthedocs.io/en/latest/configuration/",external:!0},{label:"Troubleshooting",href:"https://minecraft-server-manager.readthedocs.io/en/latest/troubleshooting/",external:!0}]},{title:"Documentation",links:[{label:"CLI Commands",href:"https://minecraft-server-manager.readthedocs.io/en/latest/cli/",external:!0},{label:"API Reference",href:"https://minecraft-server-manager.readthedocs.io/en/latest/console/",external:!0},{label:"itzg Reference",href:"https://minecraft-server-manager.readthedocs.io/en/latest/itzg-reference/",external:!0}]},{title:"Community",links:[{label:"GitHub",href:"https://github.com/smallmiro/minecraft-server-manager",external:!0},{label:"Issues",href:"https://github.com/smallmiro/minecraft-server-manager/issues",external:!0}]},{title:"About",links:[{label:"License",href:"https://github.com/smallmiro/minecraft-server-manager/blob/main/LICENSE",external:!0},{label:"Docker Hub",href:"https://hub.docker.com/r/itzg/minecraft-server",external:!0}]}];function H(){let e=new Date().getFullYear();return(0,n.jsx)(a.Z,{component:"footer",sx:{backgroundColor:"background.paper",borderTop:"1px solid",borderColor:"divider",mt:"auto"},children:(0,n.jsxs)(_.Z,{maxWidth:"lg",sx:{py:6},children:[(0,n.jsx)(a.Z,{sx:{display:"grid",gridTemplateColumns:{xs:"repeat(2, 1fr)",sm:"repeat(4, 1fr)"},gap:4,mb:4},children:U.map(e=>(0,n.jsxs)(a.Z,{children:[(0,n.jsx)(x.Z,{variant:"subtitle2",sx:{fontWeight:600,color:"text.primary",mb:2},children:e.title}),(0,n.jsx)(a.Z,{component:"ul",sx:{listStyle:"none",p:0,m:0},children:e.links.map(e=>(0,n.jsx)(a.Z,{component:"li",sx:{mb:1},children:(0,n.jsx)(E.Z,{href:e.href,target:e.external?"_blank":void 0,rel:e.external?"noopener noreferrer":void 0,underline:"hover",sx:{color:"text.secondary",fontSize:"0.875rem",transition:"color 0.2s ease","&:hover":{color:"primary.main"}},children:e.label})},e.label))})]},e.title))}),(0,n.jsx)(q.Z,{sx:{mb:3}}),(0,n.jsxs)(a.Z,{sx:{display:"flex",flexDirection:{xs:"column",sm:"row"},justifyContent:"space-between",alignItems:{xs:"flex-start",sm:"center"},gap:2},children:[(0,n.jsxs)(x.Z,{variant:"body2",sx:{color:"text.tertiary"},children:[e," \xa9"," ",(0,n.jsx)(E.Z,{href:"https://github.com/smallmiro/minecraft-server-manager",target:"_blank",rel:"noopener noreferrer",underline:"hover",sx:{color:"primary.main"},children:"Minecraft Server Management Console"})]}),(0,n.jsxs)(a.Z,{sx:{display:"flex",gap:2},children:[(0,n.jsx)(E.Z,{href:"https://github.com/smallmiro/minecraft-server-manager",target:"_blank",rel:"noopener noreferrer","aria-label":"GitHub",sx:{color:"text.secondary",transition:"color 0.2s ease","&:hover":{color:"text.primary"}},children:(0,n.jsx)(M.Z,{fontSize:"small"})}),(0,n.jsx)(E.Z,{href:"https://minecraft-server-manager.readthedocs.io/",target:"_blank",rel:"noopener noreferrer","aria-label":"Documentation",sx:{color:"text.secondary",transition:"color 0.2s ease","&:hover":{color:"text.primary"}},children:(0,n.jsx)(L.Z,{fontSize:"small"})}),(0,n.jsx)(E.Z,{href:"https://hub.docker.com/r/itzg/minecraft-server",target:"_blank",rel:"noopener noreferrer","aria-label":"Docker Hub",sx:{color:"text.secondary",transition:"color 0.2s ease","&:hover":{color:"text.primary"}},children:(0,n.jsx)(R,{fontSize:"small"})})]})]})]})})}function B(e){let{children:r}=e,[t,s]=(0,i.useState)(!1);return(0,n.jsxs)(a.Z,{sx:{display:"flex",flexDirection:"column",minHeight:"100vh",backgroundColor:"background.default"},children:[(0,n.jsx)(T,{mobileOpen:t,onMenuToggle:()=>{s(!t)}}),(0,n.jsx)(a.Z,{component:"main",sx:{flexGrow:1,display:"flex",flexDirection:"column",pt:{xs:"".concat(88,"px"),sm:"".concat(96,"px")},pb:{xs:3,sm:4},px:{xs:2,sm:3,md:4},maxWidth:"1400px",width:"100%",mx:"auto"},children:r}),(0,n.jsx)(H,{})]})}},85480:function(e,r,t){"use strict";t.d(r,{U0:function(){return u},WS:function(){return p},Ie:function(){return I}});var n=t(94655),i=t(35106),a=t(7281),s=t(81071),l=t(97436),o=t(52082),c=t(79983),d=t(30417),x=t(36848),h=t(554),m=t(6986);function u(e){let{onSuccess:r}=e,[t,u]=(0,i.useState)(""),[p,f]=(0,i.useState)(""),[g,b]=(0,i.useState)(!1),[j,y]=(0,i.useState)({}),[v,Z]=(0,i.useState)(null),[w,C]=(0,i.useState)(!1),k=()=>{let e={};return t?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)||(e.email="Invalid email address"):e.email="Email is required",p||(e.password="Password is required"),y(e),0===Object.keys(e).length},S=async e=>{if(e.preventDefault(),Z(null),k()){C(!0);try{let e=await m.cg.email({email:t,password:p});if(e.error){Z(e.error.message||"Invalid credentials"),C(!1);return}r&&r()}catch(e){Z("An unexpected error occurred. Please try again."),C(!1)}}};return(0,n.jsxs)(a.Z,{component:"form",onSubmit:S,sx:{display:"flex",flexDirection:"column",gap:2},children:[v&&(0,n.jsx)(s.Z,{severity:"error",onClose:()=>Z(null),children:v}),(0,n.jsx)(l.Z,{label:"Email",type:"email",value:t,onChange:e=>u(e.target.value),error:!!j.email,helperText:j.email,disabled:w,fullWidth:!0,required:!0}),(0,n.jsx)(l.Z,{label:"Password",type:g?"text":"password",value:p,onChange:e=>f(e.target.value),error:!!j.password,helperText:j.password,disabled:w,fullWidth:!0,required:!0,InputProps:{endAdornment:(0,n.jsx)(o.Z,{position:"end",children:(0,n.jsx)(c.Z,{"aria-label":"toggle password visibility",onClick:()=>{b(!g)},edge:"end",children:g?(0,n.jsx)(x.Z,{}):(0,n.jsx)(h.Z,{})})})}}),(0,n.jsx)(d.Z,{type:"submit",variant:"contained",color:"primary",disabled:w,fullWidth:!0,size:"large",children:w?"Signing in...":"Sign In"})]})}function p(e){let{onSuccess:r}=e,[t,u]=(0,i.useState)(""),[p,f]=(0,i.useState)(""),[g,b]=(0,i.useState)(""),[j,y]=(0,i.useState)(""),[v,Z]=(0,i.useState)(!1),[w,C]=(0,i.useState)(!1),[k,S]=(0,i.useState)({}),[P,z]=(0,i.useState)(null),[I,W]=(0,i.useState)(!1),A=()=>{let e={};return t||(e.name="Name is required"),p?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(p)||(e.email="Invalid email address"):e.email="Email is required",g?g.length<8&&(e.password="Password must be at least 8 characters"):e.password="Password is required",j?g!==j&&(e.confirmPassword="Passwords do not match"):e.confirmPassword="Please confirm your password",S(e),0===Object.keys(e).length},D=async e=>{if(e.preventDefault(),z(null),A()){W(!0);try{let e=await m.y1.email({email:p,password:g,name:t});if(e.error){z(e.error.message||"Registration failed"),W(!1);return}r&&r()}catch(e){z("An unexpected error occurred. Please try again."),W(!1)}}};return(0,n.jsxs)(a.Z,{component:"form",onSubmit:D,sx:{display:"flex",flexDirection:"column",gap:2},children:[P&&(0,n.jsx)(s.Z,{severity:"error",onClose:()=>z(null),children:P}),(0,n.jsx)(l.Z,{label:"Name",type:"text",value:t,onChange:e=>u(e.target.value),error:!!k.name,helperText:k.name,disabled:I,fullWidth:!0,required:!0}),(0,n.jsx)(l.Z,{label:"Email",type:"email",value:p,onChange:e=>f(e.target.value),error:!!k.email,helperText:k.email,disabled:I,fullWidth:!0,required:!0}),(0,n.jsx)(l.Z,{label:"Password",type:v?"text":"password",value:g,onChange:e=>b(e.target.value),error:!!k.password,helperText:k.password,disabled:I,fullWidth:!0,required:!0,InputProps:{endAdornment:(0,n.jsx)(o.Z,{position:"end",children:(0,n.jsx)(c.Z,{"aria-label":"toggle password visibility",onClick:()=>{Z(!v)},edge:"end",children:v?(0,n.jsx)(x.Z,{}):(0,n.jsx)(h.Z,{})})})}}),(0,n.jsx)(l.Z,{label:"Confirm Password",type:w?"text":"password",value:j,onChange:e=>y(e.target.value),error:!!k.confirmPassword,helperText:k.confirmPassword,disabled:I,fullWidth:!0,required:!0,InputProps:{endAdornment:(0,n.jsx)(o.Z,{position:"end",children:(0,n.jsx)(c.Z,{"aria-label":"toggle password visibility",onClick:()=>{C(!w)},edge:"end",children:w?(0,n.jsx)(x.Z,{}):(0,n.jsx)(h.Z,{})})})}}),(0,n.jsx)(d.Z,{type:"submit",variant:"contained",color:"primary",disabled:I,fullWidth:!0,size:"large",children:I?"Creating account...":"Sign Up"})]})}var f=t(74228),g=t(93017),b=t(86702),j=t(88812),y=t(31317),v=t(25333),Z=t(69123),w=t(7178),C=t(17820),k=t(73424),S=t(25169),P=t(41094),z=t(78319);function I(){let e=(0,f.useRouter)(),{data:r,isPending:t}=(0,m.kP)(),[s,l]=(0,i.useState)(null),o=()=>{l(null)},x=async()=>{o(),await (0,m.w7)(),e.push("/login")};if(t)return(0,n.jsx)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:(0,n.jsx)(g.Z,{size:24})});if(!(null==r?void 0:r.user))return(0,n.jsx)(d.Z,{variant:"contained",color:"primary",onClick:()=>{e.push("/login")},children:"Sign In"});let{user:h}=r,u=((e,r)=>{if(e){let r=e.split(" ");return r.length>=2?"".concat(r[0][0]).concat(r[1][0]).toUpperCase():e.substring(0,2).toUpperCase()}return r?r[0].toUpperCase():"?"})(h.name,h.email);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(c.Z,{onClick:e=>{l(e.currentTarget)},"aria-label":"user menu",children:(0,n.jsx)(b.Z,{sx:{bgcolor:"primary.main"},children:u})}),(0,n.jsxs)(j.Z,{anchorEl:s,open:!!s,onClose:o,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},sx:{mt:1},children:[(0,n.jsxs)(a.Z,{sx:{px:2,py:1.5,minWidth:200},children:[(0,n.jsx)(y.Z,{variant:"subtitle1",fontWeight:"600",children:h.name||"User"}),(0,n.jsx)(y.Z,{variant:"body2",color:"text.secondary",children:h.email}),"admin"===h.role&&(0,n.jsx)(v.Z,{label:"Admin",size:"small",color:"primary",sx:{mt:1}})]}),(0,n.jsx)(Z.Z,{}),"admin"===h.role&&(0,n.jsxs)(w.Z,{onClick:()=>{o(),e.push("/admin/users")},children:[(0,n.jsx)(C.Z,{children:(0,n.jsx)(S.Z,{fontSize:"small"})}),(0,n.jsx)(k.Z,{children:"Users"})]}),(0,n.jsxs)(w.Z,{onClick:()=>{o(),e.push("/settings")},children:[(0,n.jsx)(C.Z,{children:(0,n.jsx)(P.Z,{fontSize:"small"})}),(0,n.jsx)(k.Z,{children:"Settings"})]}),(0,n.jsxs)(w.Z,{onClick:x,children:[(0,n.jsx)(C.Z,{children:(0,n.jsx)(z.Z,{fontSize:"small"})}),(0,n.jsx)(k.Z,{children:"Logout"})]})]})]})}},3454:function(e,r,t){"use strict";t.d(r,{LoadingProvider:function(){return o},startLoading:function(){return c},stopLoading:function(){return d}});var n=t(94655),i=t(35106),a=t(74228),s=t(31477),l=t.n(s);function o(e){let{children:r}=e,t=(0,a.usePathname)(),s=(0,a.useSearchParams)();return(0,i.useEffect)(()=>{l().done()},[t,s]),(0,n.jsx)(n.Fragment,{children:r})}function c(){l().start()}function d(){l().done()}l().configure({showSpinner:!1,speed:300,minimum:.1})},8690:function(e,r,t){"use strict";t.d(r,{Av:function(){return n.startLoading}});var n=t(3454)},6986:function(e,r,t){"use strict";t.d(r,{Cp:function(){return h},Nq:function(){return x},cg:function(){return l},kP:function(){return d},w7:function(){return o},y1:function(){return c},zB:function(){return m}});var n=t(77054),i=t(61648),a=t(35016);let s=(0,n.X)({baseURL:a.env.NEXT_PUBLIC_BETTER_AUTH_URL||"",plugins:[(0,i.zB)()]}),{signIn:l,signOut:o,signUp:c,useSession:d,updateUser:x,changePassword:h}=s,m=s.admin}},function(e){e.O(0,[6812,9760,5004,7296,7436,1071,2542,55,2539,8347,9949,4240,212,3669,2757,1744],function(){return e(e.s=16387)}),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[781],{31809:function(e,n,a){Promise.resolve().then(a.bind(a,38538))},38538:function(e,n,a){"use strict";a.r(n),a.d(n,{default:function(){return ep}});var r=a(94655),l=a(35106),t=a(7281),s=a(31317),i=a(84840),o=a(33402),c=a(60097),d=a(29793),h=a(75726),x=a(62328),u=a(7178),p=a(69899),m=a(76492),j=a(35847),y=a(628),Z=a(41565),v=a(90158),b=a(58347),g=a(73424),f=a(69783),C=a(86702),w=a(79983),k=a(30417),S=a(25333),E=a(99770),P=a(62508),F=a(5682),I=a(65087),A=a(76678),O=a(97436),W=a(93017),D=a(81071),L=a(66561),N=a(12795),z=a(96407),B=a(69366),R=a(11597),T=a(81960),U=a(30114);function M(e){let{onPlayerKicked:n}=e,[a,i]=(0,l.useState)(!0),[o,c]=(0,l.useState)(null),[d,h]=(0,l.useState)([]),[x,u]=(0,l.useState)(!1),[p,m]=(0,l.useState)(null),[j,M]=(0,l.useState)(""),[_,K]=(0,l.useState)(!1),q=(0,l.useCallback)(async()=>{i(!0),c(null);try{let e=await fetch("/api/players");if(!e.ok)throw Error("Failed to fetch players");let n=await e.json();h(n.servers)}catch(e){c("Failed to load players"),console.error("Error fetching players:",e)}finally{i(!1)}},[]);(0,l.useEffect)(()=>{q()},[q]);let J=(e,n)=>{m({player:e,server:n}),M(""),u(!0)},G=async()=>{if(p){K(!0);try{if(!(await fetch("/api/players/kick",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({player:p.player.name,server:p.server,reason:j||"Kicked by administrator"})})).ok)throw Error("Failed to kick player");u(!1),m(null),null==n||n(p.player,p.server),await q()}catch(e){console.error("Error kicking player:",e)}finally{K(!1)}}},Y=d.some(e=>e.players.length>0);return(0,r.jsx)(y.Z,{"data-testid":"player-list",children:(0,r.jsxs)(Z.Z,{children:[(0,r.jsxs)(t.Z,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2},children:[(0,r.jsx)(s.Z,{variant:"h6",children:"Online Players"}),(0,r.jsx)(w.Z,{onClick:q,disabled:a,"aria-label":"Refresh",children:(0,r.jsx)(B.Z,{})})]}),a&&(0,r.jsx)(t.Z,{sx:{display:"flex",justifyContent:"center",py:4},children:(0,r.jsx)(W.Z,{})}),o&&(0,r.jsx)(D.Z,{severity:"error",sx:{mb:2},children:o}),!a&&!o&&!Y&&(0,r.jsx)(s.Z,{color:"text.secondary",sx:{textAlign:"center",py:4},children:"No players online"}),!a&&!o&&Y&&(0,r.jsx)(t.Z,{children:d.map(e=>(0,r.jsxs)(L.Z,{defaultExpanded:e.players.length>0,children:[(0,r.jsx)(N.Z,{expandIcon:(0,r.jsx)(T.Z,{}),children:(0,r.jsxs)(t.Z,{sx:{display:"flex",alignItems:"center",gap:2,width:"100%"},children:[(0,r.jsx)(s.Z,{variant:"subtitle1",sx:{fontWeight:500},children:e.name}),(0,r.jsx)(S.Z,{label:"".concat(e.players.length," player").concat(1!==e.players.length?"s":""),size:"small",color:e.players.length>0?"success":"default"})]})}),(0,r.jsx)(z.Z,{children:0===e.players.length?(0,r.jsx)(s.Z,{color:"text.secondary",sx:{fontStyle:"italic"},children:"No players online on this server"}):(0,r.jsx)(v.Z,{dense:!0,children:e.players.map(n=>(0,r.jsxs)(b.ZP,{secondaryAction:(0,r.jsx)(w.Z,{edge:"end","aria-label":"Kick player",onClick:()=>J(n,e.name),color:"error",children:(0,r.jsx)(R.Z,{})}),children:[(0,r.jsx)(f.Z,{children:(0,r.jsx)(C.Z,{src:"https://mc-heads.net/avatar/".concat(n.uuid,"/40"),alt:n.name,children:(0,r.jsx)(U.Z,{})})}),(0,r.jsx)(g.Z,{primary:n.name,secondary:n.uuid.substring(0,8)+"..."})]},n.uuid))})})]},e.name))}),(0,r.jsxs)(E.Z,{open:x,onClose:()=>u(!1),children:[(0,r.jsx)(P.Z,{children:"Kick Player"}),(0,r.jsxs)(F.Z,{children:[(0,r.jsxs)(I.Z,{children:["Are you sure you want to kick ",null==p?void 0:p.player.name," from ",null==p?void 0:p.server,"?"]}),(0,r.jsx)(O.Z,{autoFocus:!0,margin:"dense",label:"Reason (optional)",fullWidth:!0,variant:"outlined",value:j,onChange:e=>M(e.target.value),placeholder:"Kicked by administrator"})]}),(0,r.jsxs)(A.Z,{children:[(0,r.jsx)(k.Z,{onClick:()=>u(!1),disabled:_,children:"Cancel"}),(0,r.jsx)(k.Z,{onClick:G,color:"error",variant:"contained",disabled:_,"aria-label":"Confirm kick",children:_?(0,r.jsx)(W.Z,{size:20}):"Confirm"})]})]})]})})}var _=a(70115),K=a(38393),q=a(52082),J=a(21111),G=a(47606),Y=a(42431),H=a(29114),$=a(92666);function Q(e){var n,a;let{serverName:i}=e,[o,c]=(0,l.useState)(""),[d,h]=(0,l.useState)(null),[x,u]=(0,l.useState)(!1),[p,m]=(0,l.useState)(""),[j,E]=(0,l.useState)(null),[P,F]=(0,l.useState)(""),{data:I,isLoading:A,error:L}=(0,$.ox)(i),{data:N}=(0,$.Yo)(i),z=(0,$.zF)(),B=(0,$.Ll)(),R=(0,$.S0)(),T=null!==(n=null==I?void 0:I.players)&&void 0!==n?n:[],M=null==I?void 0:I.source,Q=null!==(a=null==N?void 0:N.enabled)&&void 0!==a&&a,V=(0,l.useMemo)(()=>{if(!P.trim())return T;let e=P.toLowerCase();return T.filter(n=>n.name.toLowerCase().includes(e))},[T,P]),X=(null==L?void 0:L.message)||(B.error?"Failed to add player to whitelist":null)||(R.error&&!d?"Failed to remove player from whitelist":null)||(z.error?"Failed to update whitelist status":null),ee=()=>{o.trim()&&B.mutate({serverName:i,player:o.trim()},{onSuccess:()=>c("")})},en=e=>{h(e),R.mutate({serverName:i,player:e},{onSettled:()=>h(null)})},ea=async()=>{let e=p.split(/[,\n]/).map(e=>e.trim()).filter(Boolean);if(0===e.length)return;E(null);let n=0;for(let a of e)try{await B.mutateAsync({serverName:i,player:a}),n++}catch(e){}E("Added ".concat(n," of ").concat(e.length," players")),n>0&&m("")},er=B.isPending;return(0,r.jsx)(y.Z,{"data-testid":"whitelist-manager",children:(0,r.jsxs)(Z.Z,{children:[(0,r.jsxs)(_.Z,{direction:"row",alignItems:"center",justifyContent:"space-between",sx:{mb:2},children:[(0,r.jsxs)(_.Z,{direction:"row",alignItems:"center",spacing:1,children:[(0,r.jsx)(s.Z,{variant:"h6",children:"Whitelist"}),(0,r.jsx)(S.Z,{label:Q?"ON":"OFF",color:Q?"success":"default",size:"small","data-testid":"whitelist-status-chip"})]}),(0,r.jsx)(K.Z,{checked:Q,onChange:()=>{z.mutate({serverName:i,enabled:!Q})},disabled:z.isPending,inputProps:{"aria-label":"Toggle whitelist"},"data-testid":"whitelist-toggle"})]}),X&&(0,r.jsx)(D.Z,{severity:"error",sx:{mb:2},children:X}),!A&&M&&"rcon"!==M&&(0,r.jsxs)(D.Z,{severity:"info",sx:{mb:2},children:["Server is offline. Showing data from ","config"===M?"config.env":"whitelist.json",". Changes will apply on next server start."]}),(0,r.jsxs)(_.Z,{direction:"row",spacing:1,alignItems:"flex-start",sx:{mb:2},children:[x?(0,r.jsxs)(t.Z,{sx:{flex:1},children:[(0,r.jsx)(O.Z,{size:"small",placeholder:"player1, player2, player3",value:p,onChange:e=>m(e.target.value),disabled:er,fullWidth:!0,multiline:!0,rows:3,"data-testid":"bulk-input"}),j&&(0,r.jsx)(D.Z,{severity:"info",sx:{mt:1},"data-testid":"bulk-result",children:j})]}):(0,r.jsx)(O.Z,{size:"small",placeholder:"Player name",value:o,onChange:e=>c(e.target.value),onKeyDown:e=>{"Enter"===e.key&&ee()},disabled:er,fullWidth:!0}),x?(0,r.jsx)(k.Z,{variant:"contained",onClick:ea,disabled:!p.trim()||er,startIcon:er?(0,r.jsx)(W.Z,{size:16}):(0,r.jsx)(H.Z,{}),"aria-label":"Add players in bulk",children:"Add All"}):(0,r.jsx)(k.Z,{variant:"contained",onClick:ee,disabled:!o.trim()||er,startIcon:er?(0,r.jsx)(W.Z,{size:16}):(0,r.jsx)(G.Z,{}),"aria-label":"Add player to whitelist",children:"Add"}),(0,r.jsx)(k.Z,{variant:x?"contained":"outlined",onClick:()=>{u(!x),E(null)},"aria-label":"Toggle bulk mode","data-testid":"bulk-toggle",sx:{whiteSpace:"nowrap"},children:"Bulk"})]}),T.length>=5&&(0,r.jsx)(O.Z,{size:"small",placeholder:"Search players...",value:P,onChange:e=>F(e.target.value),fullWidth:!0,sx:{mb:2},InputProps:{startAdornment:(0,r.jsx)(q.Z,{position:"start",children:(0,r.jsx)(Y.Z,{})})},"data-testid":"search-input"}),A&&(0,r.jsx)(t.Z,{sx:{display:"flex",justifyContent:"center",py:4},children:(0,r.jsx)(W.Z,{})}),!A&&0===T.length&&(0,r.jsx)(s.Z,{color:"text.secondary",sx:{textAlign:"center",py:4},children:"No players whitelisted"}),!A&&T.length>0&&0===V.length&&(0,r.jsx)(s.Z,{color:"text.secondary",sx:{textAlign:"center",py:4},"data-testid":"no-match-message",children:"No matching players"}),!A&&V.length>0&&(0,r.jsx)(v.Z,{dense:!0,children:V.map(e=>(0,r.jsxs)(b.ZP,{secondaryAction:(0,r.jsx)(w.Z,{edge:"end","aria-label":"Remove from whitelist",onClick:()=>en(e.name),disabled:d===e.name,color:"error",children:d===e.name?(0,r.jsx)(W.Z,{size:20}):(0,r.jsx)(J.Z,{})}),children:[(0,r.jsx)(f.Z,{children:(0,r.jsx)(C.Z,{src:e.uuid?"https://mc-heads.net/avatar/".concat(e.uuid,"/40"):void 0,alt:e.name,children:(0,r.jsx)(U.Z,{})})}),(0,r.jsx)(g.Z,{primary:e.name,secondary:e.uuid?e.uuid.substring(0,8)+"...":"UUID not available"})]},e.uuid||e.name))})]})})}var V=a(88812),X=a(37809),ee=a(407),en=a(45813);let ea={1:{color:"info",label:"Moderator",icon:"\uD83D\uDEE1️"},2:{color:"success",label:"Gamemaster",icon:"\uD83C\uDFAE"},3:{color:"warning",label:"Admin",icon:"⚙️"},4:{color:"error",label:"Owner",icon:"\uD83D\uDC51"}};function er(e){let{level:n,showIcon:a=!1,compact:l=!1,size:s="medium",variant:i="filled"}=e,o=ea[n];if(!o)return null;let c=l?n.toString():"Level ".concat(n," - ").concat(o.label),d=a?(0,r.jsx)(t.Z,{component:"span",sx:{mr:.5},children:o.icon}):void 0;return(0,r.jsx)(S.Z,{label:(0,r.jsxs)(r.Fragment,{children:[d,c]}),color:o.color,size:s,variant:i})}var el=a(68038),et=a(34080),es=a(40064),ei=a(39181);let eo=[{value:1,label:"Level 1 - Moderator",description:"Bypass spawn protection",icon:"\uD83D\uDEE1️"},{value:2,label:"Level 2 - Gamemaster",description:"Cheats, command blocks",icon:"\uD83C\uDFAE"},{value:3,label:"Level 3 - Admin",description:"Player management commands",icon:"⚙️"},{value:4,label:"Level 4 - Owner",description:"Full server control",icon:"\uD83D\uDC51"}];function ec(e){let{value:n,onChange:a,label:l,disabled:i=!1}=e;return(0,r.jsxs)(d.Z,{component:"fieldset",fullWidth:!0,disabled:i,children:[l&&(0,r.jsx)(el.Z,{component:"legend",sx:{mb:1},children:l}),(0,r.jsx)(et.Z,{value:n,onChange:e=>{a(parseInt(e.target.value,10))},children:eo.map(e=>(0,r.jsx)(es.Z,{value:e.value,control:(0,r.jsx)(ei.Z,{}),label:(0,r.jsxs)(t.Z,{children:[(0,r.jsxs)(t.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,r.jsx)(s.Z,{component:"span",children:e.icon}),(0,r.jsx)(s.Z,{component:"span",fontWeight:"medium",children:e.label})]}),(0,r.jsx)(s.Z,{variant:"body2",color:"text.secondary",sx:{ml:4},children:e.description})]}),sx:{alignItems:"flex-start",py:1}},e.value))})]})}function ed(e){let{serverName:n}=e,[a,i]=(0,l.useState)(!0),[o,c]=(0,l.useState)(null),[d,h]=(0,l.useState)([]),[x,p]=(0,l.useState)(),[m,j]=(0,l.useState)(""),[S,I]=(0,l.useState)(!1),[L,N]=(0,l.useState)(null),[z,B]=(0,l.useState)(!1),[R,T]=(0,l.useState)(4),[U,M]=(0,l.useState)(!1),[_,K]=(0,l.useState)(null),[q,Y]=(0,l.useState)(4),[H,$]=(0,l.useState)(!1),[Q,ea]=(0,l.useState)(null),[el,et]=(0,l.useState)(null),es=(0,l.useCallback)(async()=>{i(!0),c(null);try{let e=await fetch("/api/players/op?server=".concat(encodeURIComponent(n)));if(!e.ok)throw Error("Failed to fetch operators");let a=await e.json();h(a.operators),p(a.source)}catch(e){c("Failed to load operators"),console.error("Error fetching operators:",e)}finally{i(!1)}},[n]);(0,l.useEffect)(()=>{es()},[es]);let ei=async()=>{if(m.trim()){I(!0),c(null);try{if(!(await fetch("/api/players/op",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({player:m.trim(),server:n,level:R})})).ok)throw Error("Failed to add operator");j(""),T(4),B(!1),await es()}catch(e){c("Failed to add operator"),console.error("Error adding operator:",e)}finally{I(!1)}}},eo=async e=>{N(e),c(null),ea(null),et(null);try{if(!(await fetch("/api/players/op?player=".concat(encodeURIComponent(e),"&server=").concat(encodeURIComponent(n)),{method:"DELETE"})).ok)throw Error("Failed to remove operator");await es()}catch(e){c("Failed to remove operator"),console.error("Error removing operator:",e)}finally{N(null)}},ed=async()=>{if(_){$(!0),c(null);try{if(!(await fetch("/api/players/op/".concat(encodeURIComponent(_.name),"?server=").concat(encodeURIComponent(n)),{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({level:q})})).ok)throw Error("Failed to change operator level");M(!1),K(null),await es()}catch(e){c("Failed to change operator level"),console.error("Error changing operator level:",e)}finally{$(!1)}}},eh=(e,n)=>{ea(e.currentTarget),et(n)},ex=()=>{ea(null),et(null)};return(0,r.jsxs)(y.Z,{"data-testid":"op-manager",children:[(0,r.jsxs)(Z.Z,{children:[(0,r.jsx)(s.Z,{variant:"h6",gutterBottom:!0,children:"Operators"}),o&&(0,r.jsx)(D.Z,{severity:"error",sx:{mb:2},children:o}),!a&&x&&"rcon"!==x&&(0,r.jsxs)(D.Z,{severity:"info",sx:{mb:2},children:["Server is offline. Showing data from ","config"===x?"config.env":"ops.json",". Changes will apply on next server start."]}),(0,r.jsx)(t.Z,{sx:{mb:2},children:(0,r.jsx)(k.Z,{variant:"contained",onClick:()=>B(!0),startIcon:(0,r.jsx)(G.Z,{}),"aria-label":"Add operator",fullWidth:!0,children:"Add Operator"})}),a&&(0,r.jsx)(t.Z,{sx:{display:"flex",justifyContent:"center",py:4},children:(0,r.jsx)(W.Z,{})}),!a&&0===d.length&&(0,r.jsx)(s.Z,{color:"text.secondary",sx:{textAlign:"center",py:4},children:"No operators configured"}),!a&&d.length>0&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(v.Z,{dense:!0,children:d.map(e=>(0,r.jsxs)(b.ZP,{secondaryAction:(0,r.jsx)(w.Z,{edge:"end","aria-label":"Operator actions",onClick:n=>eh(n,e),disabled:L===e.name,children:L===e.name?(0,r.jsx)(W.Z,{size:20}):(0,r.jsx)(X.Z,{})}),children:[(0,r.jsx)(f.Z,{children:(0,r.jsx)(C.Z,{src:e.uuid?"https://mc-heads.net/avatar/".concat(e.uuid,"/40"):void 0,alt:e.name,sx:{bgcolor:"warning.main"},children:(0,r.jsx)(ee.Z,{})})}),(0,r.jsx)(g.Z,{primary:(0,r.jsxs)(t.Z,{sx:{display:"flex",alignItems:"center",gap:1,flexWrap:"wrap"},children:[(0,r.jsx)(s.Z,{component:"span",children:e.name}),(0,r.jsx)(er,{level:e.level,showIcon:!0,size:"small"})]}),secondary:e.uuid?e.uuid.substring(0,8)+"...":"UUID not available"})]},e.uuid||e.name))}),(0,r.jsxs)(V.Z,{anchorEl:Q,open:!!Q,onClose:ex,children:[(0,r.jsxs)(u.Z,{onClick:()=>{el&&(K(el),Y(el.level),M(!0),ex())},children:[(0,r.jsx)(en.Z,{sx:{mr:1},fontSize:"small"}),"Change Level"]}),(0,r.jsxs)(u.Z,{onClick:()=>el&&eo(el.name),children:[(0,r.jsx)(J.Z,{sx:{mr:1},fontSize:"small",color:"error"}),"Remove OP"]})]})]})]}),(0,r.jsxs)(E.Z,{open:z,onClose:()=>!S&&B(!1),maxWidth:"sm",fullWidth:!0,children:[(0,r.jsx)(P.Z,{children:"Add Operator"}),(0,r.jsxs)(F.Z,{children:[(0,r.jsx)(O.Z,{autoFocus:!0,margin:"dense",label:"Player Name",placeholder:"Enter player name",fullWidth:!0,value:m,onChange:e=>j(e.target.value),disabled:S,sx:{mb:2}}),(0,r.jsx)(ec,{value:R,onChange:T,label:"OP Level",disabled:S})]}),(0,r.jsxs)(A.Z,{children:[(0,r.jsx)(k.Z,{onClick:()=>B(!1),disabled:S,children:"Cancel"}),(0,r.jsx)(k.Z,{variant:"contained",onClick:ei,disabled:!m.trim()||S,startIcon:S?(0,r.jsx)(W.Z,{size:16}):void 0,children:S?"Adding...":"Add OP"})]})]}),(0,r.jsxs)(E.Z,{open:U,onClose:()=>!H&&M(!1),maxWidth:"sm",fullWidth:!0,children:[(0,r.jsxs)(P.Z,{children:["Change OP Level - ",null==_?void 0:_.name]}),(0,r.jsx)(F.Z,{children:_&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(s.Z,{variant:"body2",color:"text.secondary",sx:{mb:2},children:["Current: Level ",_.level," (",_.role,")"]}),(0,r.jsx)(ec,{value:q,onChange:Y,label:"New Level",disabled:H})]})}),(0,r.jsxs)(A.Z,{children:[(0,r.jsx)(k.Z,{onClick:()=>M(!1),disabled:H,children:"Cancel"}),(0,r.jsx)(k.Z,{variant:"contained",onClick:ed,disabled:H||q===(null==_?void 0:_.level),startIcon:H?(0,r.jsx)(W.Z,{size:16}):void 0,children:H?"Saving...":"Save Changes"})]})]})]})}var eh=a(397);function ex(e){let{serverName:n}=e,[a,i]=(0,l.useState)(!0),[o,c]=(0,l.useState)(null),[d,h]=(0,l.useState)([]),[x,u]=(0,l.useState)(),[p,m]=(0,l.useState)(!1),[j,S]=(0,l.useState)({player:"",reason:""}),[I,L]=(0,l.useState)(!1),[N,z]=(0,l.useState)(null),B=(0,l.useCallback)(async()=>{i(!0),c(null);try{let e=await fetch("/api/players/ban?server=".concat(encodeURIComponent(n)));if(!e.ok)throw Error("Failed to fetch bans");let a=await e.json();h(a.players),u(a.source)}catch(e){c("Failed to load ban list"),console.error("Error fetching bans:",e)}finally{i(!1)}},[n]);(0,l.useEffect)(()=>{B()},[B]);let R=()=>{m(!1),S({player:"",reason:""})},T=async()=>{if(j.player.trim()){L(!0),c(null);try{if(!(await fetch("/api/players/ban",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({player:j.player.trim(),reason:j.reason.trim()||"Banned by administrator",server:n})})).ok)throw Error("Failed to ban player");R(),await B()}catch(e){c("Failed to ban player"),console.error("Error banning player:",e)}finally{L(!1)}}},M=async e=>{z(e),c(null);try{if(!(await fetch("/api/players/ban?player=".concat(encodeURIComponent(e),"&server=").concat(encodeURIComponent(n)),{method:"DELETE"})).ok)throw Error("Failed to unban player");await B()}catch(e){c("Failed to unban player"),console.error("Error unbanning player:",e)}finally{z(null)}},K=e=>{try{return new Date(e).toLocaleDateString()}catch(n){return e}};return(0,r.jsx)(y.Z,{"data-testid":"ban-manager",children:(0,r.jsxs)(Z.Z,{children:[(0,r.jsxs)(t.Z,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2},children:[(0,r.jsx)(s.Z,{variant:"h6",children:"Ban List"}),(0,r.jsx)(k.Z,{variant:"outlined",color:"error",startIcon:(0,r.jsx)(eh.Z,{}),onClick:()=>{S({player:"",reason:""}),m(!0)},"aria-label":"Ban player",children:"Ban Player"})]}),o&&(0,r.jsx)(D.Z,{severity:"error",sx:{mb:2},children:o}),!a&&x&&"rcon"!==x&&(0,r.jsxs)(D.Z,{severity:"info",sx:{mb:2},children:["Server is offline. Showing data from ","config"===x?"config.env":"banned-players.json",". Changes will apply on next server start."]}),a&&(0,r.jsx)(t.Z,{sx:{display:"flex",justifyContent:"center",py:4},children:(0,r.jsx)(W.Z,{})}),!a&&0===d.length&&(0,r.jsx)(s.Z,{color:"text.secondary",sx:{textAlign:"center",py:4},children:"No players banned"}),!a&&d.length>0&&(0,r.jsx)(v.Z,{dense:!0,children:d.map(e=>(0,r.jsxs)(b.ZP,{secondaryAction:(0,r.jsx)(w.Z,{edge:"end","aria-label":"Unban player",onClick:()=>M(e.name),disabled:N===e.name,color:"success",children:N===e.name?(0,r.jsx)(W.Z,{size:20}):(0,r.jsx)(J.Z,{})}),children:[(0,r.jsx)(f.Z,{children:(0,r.jsx)(C.Z,{src:e.uuid?"https://mc-heads.net/avatar/".concat(e.uuid,"/40"):void 0,alt:e.name,sx:{bgcolor:"error.main"},children:(0,r.jsx)(U.Z,{})})}),(0,r.jsx)(g.Z,{primary:e.name,secondary:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(s.Z,{component:"span",variant:"body2",color:"text.secondary",children:["Reason: ",e.reason||"No reason specified"]}),(0,r.jsx)("br",{}),(0,r.jsxs)(s.Z,{component:"span",variant:"caption",color:"text.secondary",children:["Banned: ",K(e.created)," by ",e.source||"Unknown"]})]})})]},e.uuid||e.name))}),(0,r.jsxs)(E.Z,{open:p,onClose:R,maxWidth:"sm",fullWidth:!0,children:[(0,r.jsx)(P.Z,{children:"Ban Player"}),(0,r.jsx)(F.Z,{children:(0,r.jsxs)(_.Z,{spacing:2,sx:{mt:1},children:[(0,r.jsx)(O.Z,{label:"Player Name",placeholder:"Enter player name",value:j.player,onChange:e=>S({...j,player:e.target.value}),fullWidth:!0,required:!0}),(0,r.jsx)(O.Z,{label:"Reason",placeholder:"Banned by administrator",value:j.reason,onChange:e=>S({...j,reason:e.target.value}),fullWidth:!0,multiline:!0,rows:2})]})}),(0,r.jsxs)(A.Z,{children:[(0,r.jsx)(k.Z,{onClick:R,disabled:I,children:"Cancel"}),(0,r.jsx)(k.Z,{onClick:T,color:"error",variant:"contained",disabled:!j.player.trim()||I,startIcon:I?(0,r.jsx)(W.Z,{size:16}):(0,r.jsx)(eh.Z,{}),children:"Ban"})]})]})]})})}function eu(e){let{children:n,value:a,index:l}=e;return(0,r.jsx)("div",{role:"tabpanel",hidden:a!==l,children:a===l&&(0,r.jsx)(t.Z,{sx:{py:3},children:n})})}function ep(){let[e,n]=(0,l.useState)(0),[a,y]=(0,l.useState)(""),{data:Z,isLoading:v}=(0,$.x$)(),b=null==Z?void 0:Z.servers;return(0,l.useEffect)(()=>{!a&&b&&b.length>0&&y(b[0].name)},[b,a]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(p.Z,{elevation:0,sx:{mb:4,p:3,background:e=>"linear-gradient(135deg, ".concat((0,m.Fq)(e.palette.info.main,.1)," 0%, ").concat((0,m.Fq)(e.palette.secondary.main,.1)," 100%)"),borderRadius:2,border:e=>"1px solid ".concat((0,m.Fq)(e.palette.info.main,.2))},children:(0,r.jsxs)(t.Z,{sx:{display:"flex",alignItems:"center",gap:2},children:[(0,r.jsx)(t.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:56,height:56,borderRadius:2,bgcolor:"info.main",color:"info.contrastText"},children:(0,r.jsx)(j.Z,{sx:{fontSize:32}})}),(0,r.jsxs)(t.Z,{children:[(0,r.jsx)(s.Z,{variant:"h4",component:"h1",fontWeight:"bold",children:"Player Management"}),(0,r.jsx)(s.Z,{variant:"body1",color:"text.secondary",children:"Manage players, whitelist, operators, and bans across your servers"})]})]})}),(0,r.jsx)(t.Z,{sx:{mb:3},children:(0,r.jsxs)(d.Z,{sx:{minWidth:200},children:[(0,r.jsx)(h.Z,{id:"server-select-label",children:"Server"}),(0,r.jsx)(x.Z,{labelId:"server-select-label",value:a,label:"Server",onChange:e=>y(e.target.value),disabled:v,children:null==b?void 0:b.map(e=>(0,r.jsx)(u.Z,{value:e.name,children:e.name},e.name))})]})}),(0,r.jsx)(t.Z,{sx:{borderBottom:1,borderColor:"divider"},children:(0,r.jsxs)(o.Z,{value:e,onChange:(e,a)=>{n(a)},"aria-label":"Player management tabs",children:[(0,r.jsx)(c.Z,{label:"Online Players"}),(0,r.jsx)(c.Z,{label:"Whitelist",disabled:!a}),(0,r.jsx)(c.Z,{label:"Operators",disabled:!a}),(0,r.jsx)(c.Z,{label:"Ban List",disabled:!a})]})}),(0,r.jsx)(eu,{value:e,index:0,children:(0,r.jsx)(M,{})}),(0,r.jsx)(eu,{value:e,index:1,children:a&&(0,r.jsxs)(i.ZP,{container:!0,spacing:3,children:[(0,r.jsx)(i.ZP,{item:!0,xs:12,md:8,children:(0,r.jsx)(Q,{serverName:a})}),(0,r.jsx)(i.ZP,{item:!0,xs:12,md:4,children:(0,r.jsxs)(t.Z,{sx:{p:2,bgcolor:"background.paper",borderRadius:1},children:[(0,r.jsx)(s.Z,{variant:"subtitle2",color:"text.secondary",gutterBottom:!0,children:"About Whitelist"}),(0,r.jsx)(s.Z,{variant:"body2",color:"text.secondary",children:"The whitelist controls which players can join your server. When enabled, only players on the whitelist can connect. Add players by their Minecraft username."})]})})]})}),(0,r.jsx)(eu,{value:e,index:2,children:a&&(0,r.jsxs)(i.ZP,{container:!0,spacing:3,children:[(0,r.jsx)(i.ZP,{item:!0,xs:12,md:8,children:(0,r.jsx)(ed,{serverName:a})}),(0,r.jsx)(i.ZP,{item:!0,xs:12,md:4,children:(0,r.jsxs)(t.Z,{sx:{p:2,bgcolor:"background.paper",borderRadius:1},children:[(0,r.jsx)(s.Z,{variant:"subtitle2",color:"text.secondary",gutterBottom:!0,children:"About Operators"}),(0,r.jsx)(s.Z,{variant:"body2",color:"text.secondary",children:"Operators (OPs) have elevated permissions on the server. They can use commands like /give, /gamemode, /tp, and more. OP levels range from 1-4, with 4 being the highest."}),(0,r.jsxs)(t.Z,{sx:{mt:2},children:[(0,r.jsx)(s.Z,{variant:"caption",color:"text.secondary",component:"div",children:"Level 1: Can bypass spawn protection"}),(0,r.jsx)(s.Z,{variant:"caption",color:"text.secondary",component:"div",children:"Level 2: Can use /clear, /gamemode, etc."}),(0,r.jsx)(s.Z,{variant:"caption",color:"text.secondary",component:"div",children:"Level 3: Can use /ban, /kick, /op, etc."}),(0,r.jsx)(s.Z,{variant:"caption",color:"text.secondary",component:"div",children:"Level 4: Can use /stop, full access"})]})]})})]})}),(0,r.jsx)(eu,{value:e,index:3,children:a&&(0,r.jsxs)(i.ZP,{container:!0,spacing:3,children:[(0,r.jsx)(i.ZP,{item:!0,xs:12,md:8,children:(0,r.jsx)(ex,{serverName:a})}),(0,r.jsx)(i.ZP,{item:!0,xs:12,md:4,children:(0,r.jsxs)(t.Z,{sx:{p:2,bgcolor:"background.paper",borderRadius:1},children:[(0,r.jsx)(s.Z,{variant:"subtitle2",color:"text.secondary",gutterBottom:!0,children:"About Bans"}),(0,r.jsx)(s.Z,{variant:"body2",color:"text.secondary",children:"Banned players cannot connect to your server. You can ban players by username and provide an optional reason. Bans can be removed (pardoned) at any time."})]})})]})})]})}}},function(e){e.O(0,[6812,9760,5004,7296,7436,1071,540,4416,2538,880,7727,8347,1658,5381,4187,4219,392,2666,3669,2757,1744],function(){return e(e.s=31809)}),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[781],{31809:function(e,n,a){Promise.resolve().then(a.bind(a,38538))},38538:function(e,n,a){"use strict";a.r(n),a.d(n,{default:function(){return ep}});var r=a(94655),l=a(35106),t=a(7281),s=a(31317),i=a(84840),o=a(33402),c=a(60097),d=a(29793),h=a(75726),x=a(62328),u=a(7178),p=a(69899),m=a(76492),j=a(35847),y=a(628),Z=a(41565),v=a(90158),b=a(58347),g=a(73424),f=a(69783),C=a(86702),w=a(79983),k=a(30417),S=a(25333),E=a(99770),P=a(62508),F=a(5682),I=a(65087),A=a(76678),O=a(97436),W=a(93017),D=a(81071),L=a(66561),N=a(12795),z=a(96407),B=a(69366),R=a(11597),T=a(81960),U=a(30114);function M(e){let{onPlayerKicked:n}=e,[a,i]=(0,l.useState)(!0),[o,c]=(0,l.useState)(null),[d,h]=(0,l.useState)([]),[x,u]=(0,l.useState)(!1),[p,m]=(0,l.useState)(null),[j,M]=(0,l.useState)(""),[_,K]=(0,l.useState)(!1),q=(0,l.useCallback)(async()=>{i(!0),c(null);try{let e=await fetch("/api/players");if(!e.ok)throw Error("Failed to fetch players");let n=await e.json();h(n.servers)}catch(e){c("Failed to load players"),console.error("Error fetching players:",e)}finally{i(!1)}},[]);(0,l.useEffect)(()=>{q()},[q]);let J=(e,n)=>{m({player:e,server:n}),M(""),u(!0)},G=async()=>{if(p){K(!0);try{if(!(await fetch("/api/players/kick",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({player:p.player.name,server:p.server,reason:j||"Kicked by administrator"})})).ok)throw Error("Failed to kick player");u(!1),m(null),null==n||n(p.player,p.server),await q()}catch(e){console.error("Error kicking player:",e)}finally{K(!1)}}},Y=d.some(e=>e.players.length>0);return(0,r.jsx)(y.Z,{"data-testid":"player-list",children:(0,r.jsxs)(Z.Z,{children:[(0,r.jsxs)(t.Z,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2},children:[(0,r.jsx)(s.Z,{variant:"h6",children:"Online Players"}),(0,r.jsx)(w.Z,{onClick:q,disabled:a,"aria-label":"Refresh",children:(0,r.jsx)(B.Z,{})})]}),a&&(0,r.jsx)(t.Z,{sx:{display:"flex",justifyContent:"center",py:4},children:(0,r.jsx)(W.Z,{})}),o&&(0,r.jsx)(D.Z,{severity:"error",sx:{mb:2},children:o}),!a&&!o&&!Y&&(0,r.jsx)(s.Z,{color:"text.secondary",sx:{textAlign:"center",py:4},children:"No players online"}),!a&&!o&&Y&&(0,r.jsx)(t.Z,{children:d.map(e=>(0,r.jsxs)(L.Z,{defaultExpanded:e.players.length>0,children:[(0,r.jsx)(N.Z,{expandIcon:(0,r.jsx)(T.Z,{}),children:(0,r.jsxs)(t.Z,{sx:{display:"flex",alignItems:"center",gap:2,width:"100%"},children:[(0,r.jsx)(s.Z,{variant:"subtitle1",sx:{fontWeight:500},children:e.name}),(0,r.jsx)(S.Z,{label:"".concat(e.players.length," player").concat(1!==e.players.length?"s":""),size:"small",color:e.players.length>0?"success":"default"})]})}),(0,r.jsx)(z.Z,{children:0===e.players.length?(0,r.jsx)(s.Z,{color:"text.secondary",sx:{fontStyle:"italic"},children:"No players online on this server"}):(0,r.jsx)(v.Z,{dense:!0,children:e.players.map(n=>(0,r.jsxs)(b.ZP,{secondaryAction:(0,r.jsx)(w.Z,{edge:"end","aria-label":"Kick player",onClick:()=>J(n,e.name),color:"error",children:(0,r.jsx)(R.Z,{})}),children:[(0,r.jsx)(f.Z,{children:(0,r.jsx)(C.Z,{src:"https://mc-heads.net/avatar/".concat(n.uuid,"/40"),alt:n.name,children:(0,r.jsx)(U.Z,{})})}),(0,r.jsx)(g.Z,{primary:n.name,secondary:n.uuid.substring(0,8)+"..."})]},n.uuid))})})]},e.name))}),(0,r.jsxs)(E.Z,{open:x,onClose:()=>u(!1),children:[(0,r.jsx)(P.Z,{children:"Kick Player"}),(0,r.jsxs)(F.Z,{children:[(0,r.jsxs)(I.Z,{children:["Are you sure you want to kick ",null==p?void 0:p.player.name," from ",null==p?void 0:p.server,"?"]}),(0,r.jsx)(O.Z,{autoFocus:!0,margin:"dense",label:"Reason (optional)",fullWidth:!0,variant:"outlined",value:j,onChange:e=>M(e.target.value),placeholder:"Kicked by administrator"})]}),(0,r.jsxs)(A.Z,{children:[(0,r.jsx)(k.Z,{onClick:()=>u(!1),disabled:_,children:"Cancel"}),(0,r.jsx)(k.Z,{onClick:G,color:"error",variant:"contained",disabled:_,"aria-label":"Confirm kick",children:_?(0,r.jsx)(W.Z,{size:20}):"Confirm"})]})]})]})})}var _=a(70115),K=a(38393),q=a(52082),J=a(21111),G=a(47606),Y=a(42431),H=a(29114),$=a(92666);function Q(e){var n,a;let{serverName:i}=e,[o,c]=(0,l.useState)(""),[d,h]=(0,l.useState)(null),[x,u]=(0,l.useState)(!1),[p,m]=(0,l.useState)(""),[j,E]=(0,l.useState)(null),[P,F]=(0,l.useState)(""),{data:I,isLoading:A,error:L}=(0,$.ox)(i),{data:N}=(0,$.Yo)(i),z=(0,$.zF)(),B=(0,$.Ll)(),R=(0,$.S0)(),T=null!==(n=null==I?void 0:I.players)&&void 0!==n?n:[],M=null==I?void 0:I.source,Q=null!==(a=null==N?void 0:N.enabled)&&void 0!==a&&a,V=(0,l.useMemo)(()=>{if(!P.trim())return T;let e=P.toLowerCase();return T.filter(n=>n.name.toLowerCase().includes(e))},[T,P]),X=(null==L?void 0:L.message)||(B.error?"Failed to add player to whitelist":null)||(R.error&&!d?"Failed to remove player from whitelist":null)||(z.error?"Failed to update whitelist status":null),ee=()=>{o.trim()&&B.mutate({serverName:i,player:o.trim()},{onSuccess:()=>c("")})},en=e=>{h(e),R.mutate({serverName:i,player:e},{onSettled:()=>h(null)})},ea=async()=>{let e=p.split(/[,\n]/).map(e=>e.trim()).filter(Boolean);if(0===e.length)return;E(null);let n=0;for(let a of e)try{await B.mutateAsync({serverName:i,player:a}),n++}catch(e){}E("Added ".concat(n," of ").concat(e.length," players")),n>0&&m("")},er=B.isPending;return(0,r.jsx)(y.Z,{"data-testid":"whitelist-manager",children:(0,r.jsxs)(Z.Z,{children:[(0,r.jsxs)(_.Z,{direction:"row",alignItems:"center",justifyContent:"space-between",sx:{mb:2},children:[(0,r.jsxs)(_.Z,{direction:"row",alignItems:"center",spacing:1,children:[(0,r.jsx)(s.Z,{variant:"h6",children:"Whitelist"}),(0,r.jsx)(S.Z,{label:Q?"ON":"OFF",color:Q?"success":"default",size:"small","data-testid":"whitelist-status-chip"})]}),(0,r.jsx)(K.Z,{checked:Q,onChange:()=>{z.mutate({serverName:i,enabled:!Q})},disabled:z.isPending,inputProps:{"aria-label":"Toggle whitelist"},"data-testid":"whitelist-toggle"})]}),X&&(0,r.jsx)(D.Z,{severity:"error",sx:{mb:2},children:X}),!A&&M&&"rcon"!==M&&(0,r.jsxs)(D.Z,{severity:"info",sx:{mb:2},children:["Server is offline. Showing data from ","config"===M?"config.env":"whitelist.json",". Changes will apply on next server start."]}),(0,r.jsxs)(_.Z,{direction:"row",spacing:1,alignItems:"flex-start",sx:{mb:2},children:[x?(0,r.jsxs)(t.Z,{sx:{flex:1},children:[(0,r.jsx)(O.Z,{size:"small",placeholder:"player1, player2, player3",value:p,onChange:e=>m(e.target.value),disabled:er,fullWidth:!0,multiline:!0,rows:3,"data-testid":"bulk-input"}),j&&(0,r.jsx)(D.Z,{severity:"info",sx:{mt:1},"data-testid":"bulk-result",children:j})]}):(0,r.jsx)(O.Z,{size:"small",placeholder:"Player name",value:o,onChange:e=>c(e.target.value),onKeyDown:e=>{"Enter"===e.key&&ee()},disabled:er,fullWidth:!0}),x?(0,r.jsx)(k.Z,{variant:"contained",onClick:ea,disabled:!p.trim()||er,startIcon:er?(0,r.jsx)(W.Z,{size:16}):(0,r.jsx)(H.Z,{}),"aria-label":"Add players in bulk",children:"Add All"}):(0,r.jsx)(k.Z,{variant:"contained",onClick:ee,disabled:!o.trim()||er,startIcon:er?(0,r.jsx)(W.Z,{size:16}):(0,r.jsx)(G.Z,{}),"aria-label":"Add player to whitelist",children:"Add"}),(0,r.jsx)(k.Z,{variant:x?"contained":"outlined",onClick:()=>{u(!x),E(null)},"aria-label":"Toggle bulk mode","data-testid":"bulk-toggle",sx:{whiteSpace:"nowrap"},children:"Bulk"})]}),T.length>=5&&(0,r.jsx)(O.Z,{size:"small",placeholder:"Search players...",value:P,onChange:e=>F(e.target.value),fullWidth:!0,sx:{mb:2},InputProps:{startAdornment:(0,r.jsx)(q.Z,{position:"start",children:(0,r.jsx)(Y.Z,{})})},"data-testid":"search-input"}),A&&(0,r.jsx)(t.Z,{sx:{display:"flex",justifyContent:"center",py:4},children:(0,r.jsx)(W.Z,{})}),!A&&0===T.length&&(0,r.jsx)(s.Z,{color:"text.secondary",sx:{textAlign:"center",py:4},children:"No players whitelisted"}),!A&&T.length>0&&0===V.length&&(0,r.jsx)(s.Z,{color:"text.secondary",sx:{textAlign:"center",py:4},"data-testid":"no-match-message",children:"No matching players"}),!A&&V.length>0&&(0,r.jsx)(v.Z,{dense:!0,children:V.map(e=>(0,r.jsxs)(b.ZP,{secondaryAction:(0,r.jsx)(w.Z,{edge:"end","aria-label":"Remove from whitelist",onClick:()=>en(e.name),disabled:d===e.name,color:"error",children:d===e.name?(0,r.jsx)(W.Z,{size:20}):(0,r.jsx)(J.Z,{})}),children:[(0,r.jsx)(f.Z,{children:(0,r.jsx)(C.Z,{src:e.uuid?"https://mc-heads.net/avatar/".concat(e.uuid,"/40"):void 0,alt:e.name,children:(0,r.jsx)(U.Z,{})})}),(0,r.jsx)(g.Z,{primary:e.name,secondary:e.uuid?e.uuid.substring(0,8)+"...":"UUID not available"})]},e.uuid||e.name))})]})})}var V=a(88812),X=a(37809),ee=a(407),en=a(45813);let ea={1:{color:"info",label:"Moderator",icon:"\uD83D\uDEE1️"},2:{color:"success",label:"Gamemaster",icon:"\uD83C\uDFAE"},3:{color:"warning",label:"Admin",icon:"⚙️"},4:{color:"error",label:"Owner",icon:"\uD83D\uDC51"}};function er(e){let{level:n,showIcon:a=!1,compact:l=!1,size:s="medium",variant:i="filled"}=e,o=ea[n];if(!o)return null;let c=l?n.toString():"Level ".concat(n," - ").concat(o.label),d=a?(0,r.jsx)(t.Z,{component:"span",sx:{mr:.5},children:o.icon}):void 0;return(0,r.jsx)(S.Z,{label:(0,r.jsxs)(r.Fragment,{children:[d,c]}),color:o.color,size:s,variant:i})}var el=a(68038),et=a(34080),es=a(40064),ei=a(39181);let eo=[{value:1,label:"Level 1 - Moderator",description:"Bypass spawn protection",icon:"\uD83D\uDEE1️"},{value:2,label:"Level 2 - Gamemaster",description:"Cheats, command blocks",icon:"\uD83C\uDFAE"},{value:3,label:"Level 3 - Admin",description:"Player management commands",icon:"⚙️"},{value:4,label:"Level 4 - Owner",description:"Full server control",icon:"\uD83D\uDC51"}];function ec(e){let{value:n,onChange:a,label:l,disabled:i=!1}=e;return(0,r.jsxs)(d.Z,{component:"fieldset",fullWidth:!0,disabled:i,children:[l&&(0,r.jsx)(el.Z,{component:"legend",sx:{mb:1},children:l}),(0,r.jsx)(et.Z,{value:n,onChange:e=>{a(parseInt(e.target.value,10))},children:eo.map(e=>(0,r.jsx)(es.Z,{value:e.value,control:(0,r.jsx)(ei.Z,{}),label:(0,r.jsxs)(t.Z,{children:[(0,r.jsxs)(t.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,r.jsx)(s.Z,{component:"span",children:e.icon}),(0,r.jsx)(s.Z,{component:"span",fontWeight:"medium",children:e.label})]}),(0,r.jsx)(s.Z,{variant:"body2",color:"text.secondary",sx:{ml:4},children:e.description})]}),sx:{alignItems:"flex-start",py:1}},e.value))})]})}function ed(e){let{serverName:n}=e,[a,i]=(0,l.useState)(!0),[o,c]=(0,l.useState)(null),[d,h]=(0,l.useState)([]),[x,p]=(0,l.useState)(),[m,j]=(0,l.useState)(""),[S,I]=(0,l.useState)(!1),[L,N]=(0,l.useState)(null),[z,B]=(0,l.useState)(!1),[R,T]=(0,l.useState)(4),[U,M]=(0,l.useState)(!1),[_,K]=(0,l.useState)(null),[q,Y]=(0,l.useState)(4),[H,$]=(0,l.useState)(!1),[Q,ea]=(0,l.useState)(null),[el,et]=(0,l.useState)(null),es=(0,l.useCallback)(async()=>{i(!0),c(null);try{let e=await fetch("/api/players/op?server=".concat(encodeURIComponent(n)));if(!e.ok)throw Error("Failed to fetch operators");let a=await e.json();h(a.operators),p(a.source)}catch(e){c("Failed to load operators"),console.error("Error fetching operators:",e)}finally{i(!1)}},[n]);(0,l.useEffect)(()=>{es()},[es]);let ei=async()=>{if(m.trim()){I(!0),c(null);try{if(!(await fetch("/api/players/op",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({player:m.trim(),server:n,level:R})})).ok)throw Error("Failed to add operator");j(""),T(4),B(!1),await es()}catch(e){c("Failed to add operator"),console.error("Error adding operator:",e)}finally{I(!1)}}},eo=async e=>{N(e),c(null),ea(null),et(null);try{if(!(await fetch("/api/players/op?player=".concat(encodeURIComponent(e),"&server=").concat(encodeURIComponent(n)),{method:"DELETE"})).ok)throw Error("Failed to remove operator");await es()}catch(e){c("Failed to remove operator"),console.error("Error removing operator:",e)}finally{N(null)}},ed=async()=>{if(_){$(!0),c(null);try{if(!(await fetch("/api/players/op/".concat(encodeURIComponent(_.name),"?server=").concat(encodeURIComponent(n)),{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({level:q})})).ok)throw Error("Failed to change operator level");M(!1),K(null),await es()}catch(e){c("Failed to change operator level"),console.error("Error changing operator level:",e)}finally{$(!1)}}},eh=(e,n)=>{ea(e.currentTarget),et(n)},ex=()=>{ea(null),et(null)};return(0,r.jsxs)(y.Z,{"data-testid":"op-manager",children:[(0,r.jsxs)(Z.Z,{children:[(0,r.jsx)(s.Z,{variant:"h6",gutterBottom:!0,children:"Operators"}),o&&(0,r.jsx)(D.Z,{severity:"error",sx:{mb:2},children:o}),!a&&x&&"rcon"!==x&&(0,r.jsxs)(D.Z,{severity:"info",sx:{mb:2},children:["Server is offline. Showing data from ","config"===x?"config.env":"ops.json",". Changes will apply on next server start."]}),(0,r.jsx)(t.Z,{sx:{mb:2},children:(0,r.jsx)(k.Z,{variant:"contained",onClick:()=>B(!0),startIcon:(0,r.jsx)(G.Z,{}),"aria-label":"Add operator",fullWidth:!0,children:"Add Operator"})}),a&&(0,r.jsx)(t.Z,{sx:{display:"flex",justifyContent:"center",py:4},children:(0,r.jsx)(W.Z,{})}),!a&&0===d.length&&(0,r.jsx)(s.Z,{color:"text.secondary",sx:{textAlign:"center",py:4},children:"No operators configured"}),!a&&d.length>0&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(v.Z,{dense:!0,children:d.map(e=>(0,r.jsxs)(b.ZP,{secondaryAction:(0,r.jsx)(w.Z,{edge:"end","aria-label":"Operator actions",onClick:n=>eh(n,e),disabled:L===e.name,children:L===e.name?(0,r.jsx)(W.Z,{size:20}):(0,r.jsx)(X.Z,{})}),children:[(0,r.jsx)(f.Z,{children:(0,r.jsx)(C.Z,{src:e.uuid?"https://mc-heads.net/avatar/".concat(e.uuid,"/40"):void 0,alt:e.name,sx:{bgcolor:"warning.main"},children:(0,r.jsx)(ee.Z,{})})}),(0,r.jsx)(g.Z,{primary:(0,r.jsxs)(t.Z,{sx:{display:"flex",alignItems:"center",gap:1,flexWrap:"wrap"},children:[(0,r.jsx)(s.Z,{component:"span",children:e.name}),(0,r.jsx)(er,{level:e.level,showIcon:!0,size:"small"})]}),secondary:e.uuid?e.uuid.substring(0,8)+"...":"UUID not available"})]},e.uuid||e.name))}),(0,r.jsxs)(V.Z,{anchorEl:Q,open:!!Q,onClose:ex,children:[(0,r.jsxs)(u.Z,{onClick:()=>{el&&(K(el),Y(el.level),M(!0),ex())},children:[(0,r.jsx)(en.Z,{sx:{mr:1},fontSize:"small"}),"Change Level"]}),(0,r.jsxs)(u.Z,{onClick:()=>el&&eo(el.name),children:[(0,r.jsx)(J.Z,{sx:{mr:1},fontSize:"small",color:"error"}),"Remove OP"]})]})]})]}),(0,r.jsxs)(E.Z,{open:z,onClose:()=>!S&&B(!1),maxWidth:"sm",fullWidth:!0,children:[(0,r.jsx)(P.Z,{children:"Add Operator"}),(0,r.jsxs)(F.Z,{children:[(0,r.jsx)(O.Z,{autoFocus:!0,margin:"dense",label:"Player Name",placeholder:"Enter player name",fullWidth:!0,value:m,onChange:e=>j(e.target.value),disabled:S,sx:{mb:2}}),(0,r.jsx)(ec,{value:R,onChange:T,label:"OP Level",disabled:S})]}),(0,r.jsxs)(A.Z,{children:[(0,r.jsx)(k.Z,{onClick:()=>B(!1),disabled:S,children:"Cancel"}),(0,r.jsx)(k.Z,{variant:"contained",onClick:ei,disabled:!m.trim()||S,startIcon:S?(0,r.jsx)(W.Z,{size:16}):void 0,children:S?"Adding...":"Add OP"})]})]}),(0,r.jsxs)(E.Z,{open:U,onClose:()=>!H&&M(!1),maxWidth:"sm",fullWidth:!0,children:[(0,r.jsxs)(P.Z,{children:["Change OP Level - ",null==_?void 0:_.name]}),(0,r.jsx)(F.Z,{children:_&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(s.Z,{variant:"body2",color:"text.secondary",sx:{mb:2},children:["Current: Level ",_.level," (",_.role,")"]}),(0,r.jsx)(ec,{value:q,onChange:Y,label:"New Level",disabled:H})]})}),(0,r.jsxs)(A.Z,{children:[(0,r.jsx)(k.Z,{onClick:()=>M(!1),disabled:H,children:"Cancel"}),(0,r.jsx)(k.Z,{variant:"contained",onClick:ed,disabled:H||q===(null==_?void 0:_.level),startIcon:H?(0,r.jsx)(W.Z,{size:16}):void 0,children:H?"Saving...":"Save Changes"})]})]})]})}var eh=a(397);function ex(e){let{serverName:n}=e,[a,i]=(0,l.useState)(!0),[o,c]=(0,l.useState)(null),[d,h]=(0,l.useState)([]),[x,u]=(0,l.useState)(),[p,m]=(0,l.useState)(!1),[j,S]=(0,l.useState)({player:"",reason:""}),[I,L]=(0,l.useState)(!1),[N,z]=(0,l.useState)(null),B=(0,l.useCallback)(async()=>{i(!0),c(null);try{let e=await fetch("/api/players/ban?server=".concat(encodeURIComponent(n)));if(!e.ok)throw Error("Failed to fetch bans");let a=await e.json();h(a.players),u(a.source)}catch(e){c("Failed to load ban list"),console.error("Error fetching bans:",e)}finally{i(!1)}},[n]);(0,l.useEffect)(()=>{B()},[B]);let R=()=>{m(!1),S({player:"",reason:""})},T=async()=>{if(j.player.trim()){L(!0),c(null);try{if(!(await fetch("/api/players/ban",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({player:j.player.trim(),reason:j.reason.trim()||"Banned by administrator",server:n})})).ok)throw Error("Failed to ban player");R(),await B()}catch(e){c("Failed to ban player"),console.error("Error banning player:",e)}finally{L(!1)}}},M=async e=>{z(e),c(null);try{if(!(await fetch("/api/players/ban?player=".concat(encodeURIComponent(e),"&server=").concat(encodeURIComponent(n)),{method:"DELETE"})).ok)throw Error("Failed to unban player");await B()}catch(e){c("Failed to unban player"),console.error("Error unbanning player:",e)}finally{z(null)}},K=e=>{try{return new Date(e).toLocaleDateString()}catch(n){return e}};return(0,r.jsx)(y.Z,{"data-testid":"ban-manager",children:(0,r.jsxs)(Z.Z,{children:[(0,r.jsxs)(t.Z,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2},children:[(0,r.jsx)(s.Z,{variant:"h6",children:"Ban List"}),(0,r.jsx)(k.Z,{variant:"outlined",color:"error",startIcon:(0,r.jsx)(eh.Z,{}),onClick:()=>{S({player:"",reason:""}),m(!0)},"aria-label":"Ban player",children:"Ban Player"})]}),o&&(0,r.jsx)(D.Z,{severity:"error",sx:{mb:2},children:o}),!a&&x&&"rcon"!==x&&(0,r.jsxs)(D.Z,{severity:"info",sx:{mb:2},children:["Server is offline. Showing data from ","config"===x?"config.env":"banned-players.json",". Changes will apply on next server start."]}),a&&(0,r.jsx)(t.Z,{sx:{display:"flex",justifyContent:"center",py:4},children:(0,r.jsx)(W.Z,{})}),!a&&0===d.length&&(0,r.jsx)(s.Z,{color:"text.secondary",sx:{textAlign:"center",py:4},children:"No players banned"}),!a&&d.length>0&&(0,r.jsx)(v.Z,{dense:!0,children:d.map(e=>(0,r.jsxs)(b.ZP,{secondaryAction:(0,r.jsx)(w.Z,{edge:"end","aria-label":"Unban player",onClick:()=>M(e.name),disabled:N===e.name,color:"success",children:N===e.name?(0,r.jsx)(W.Z,{size:20}):(0,r.jsx)(J.Z,{})}),children:[(0,r.jsx)(f.Z,{children:(0,r.jsx)(C.Z,{src:e.uuid?"https://mc-heads.net/avatar/".concat(e.uuid,"/40"):void 0,alt:e.name,sx:{bgcolor:"error.main"},children:(0,r.jsx)(U.Z,{})})}),(0,r.jsx)(g.Z,{primary:e.name,secondary:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(s.Z,{component:"span",variant:"body2",color:"text.secondary",children:["Reason: ",e.reason||"No reason specified"]}),(0,r.jsx)("br",{}),(0,r.jsxs)(s.Z,{component:"span",variant:"caption",color:"text.secondary",children:["Banned: ",K(e.created)," by ",e.source||"Unknown"]})]})})]},e.uuid||e.name))}),(0,r.jsxs)(E.Z,{open:p,onClose:R,maxWidth:"sm",fullWidth:!0,children:[(0,r.jsx)(P.Z,{children:"Ban Player"}),(0,r.jsx)(F.Z,{children:(0,r.jsxs)(_.Z,{spacing:2,sx:{mt:1},children:[(0,r.jsx)(O.Z,{label:"Player Name",placeholder:"Enter player name",value:j.player,onChange:e=>S({...j,player:e.target.value}),fullWidth:!0,required:!0}),(0,r.jsx)(O.Z,{label:"Reason",placeholder:"Banned by administrator",value:j.reason,onChange:e=>S({...j,reason:e.target.value}),fullWidth:!0,multiline:!0,rows:2})]})}),(0,r.jsxs)(A.Z,{children:[(0,r.jsx)(k.Z,{onClick:R,disabled:I,children:"Cancel"}),(0,r.jsx)(k.Z,{onClick:T,color:"error",variant:"contained",disabled:!j.player.trim()||I,startIcon:I?(0,r.jsx)(W.Z,{size:16}):(0,r.jsx)(eh.Z,{}),children:"Ban"})]})]})]})})}function eu(e){let{children:n,value:a,index:l}=e;return(0,r.jsx)("div",{role:"tabpanel",hidden:a!==l,children:a===l&&(0,r.jsx)(t.Z,{sx:{py:3},children:n})})}function ep(){let[e,n]=(0,l.useState)(0),[a,y]=(0,l.useState)(""),{data:Z,isLoading:v}=(0,$.x$)(),b=null==Z?void 0:Z.servers;return(0,l.useEffect)(()=>{!a&&b&&b.length>0&&y(b[0].name)},[b,a]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(p.Z,{elevation:0,sx:{mb:4,p:3,background:e=>"linear-gradient(135deg, ".concat((0,m.Fq)(e.palette.info.main,.1)," 0%, ").concat((0,m.Fq)(e.palette.secondary.main,.1)," 100%)"),borderRadius:2,border:e=>"1px solid ".concat((0,m.Fq)(e.palette.info.main,.2))},children:(0,r.jsxs)(t.Z,{sx:{display:"flex",alignItems:"center",gap:2},children:[(0,r.jsx)(t.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:56,height:56,borderRadius:2,bgcolor:"info.main",color:"info.contrastText"},children:(0,r.jsx)(j.Z,{sx:{fontSize:32}})}),(0,r.jsxs)(t.Z,{children:[(0,r.jsx)(s.Z,{variant:"h4",component:"h1",fontWeight:"bold",children:"Player Management"}),(0,r.jsx)(s.Z,{variant:"body1",color:"text.secondary",children:"Manage players, whitelist, operators, and bans across your servers"})]})]})}),(0,r.jsx)(t.Z,{sx:{mb:3},children:(0,r.jsxs)(d.Z,{sx:{minWidth:200},children:[(0,r.jsx)(h.Z,{id:"server-select-label",children:"Server"}),(0,r.jsx)(x.Z,{labelId:"server-select-label",value:a,label:"Server",onChange:e=>y(e.target.value),disabled:v,children:null==b?void 0:b.map(e=>(0,r.jsx)(u.Z,{value:e.name,children:e.name},e.name))})]})}),(0,r.jsx)(t.Z,{sx:{borderBottom:1,borderColor:"divider"},children:(0,r.jsxs)(o.Z,{value:e,onChange:(e,a)=>{n(a)},"aria-label":"Player management tabs",children:[(0,r.jsx)(c.Z,{label:"Online Players"}),(0,r.jsx)(c.Z,{label:"Whitelist",disabled:!a}),(0,r.jsx)(c.Z,{label:"Operators",disabled:!a}),(0,r.jsx)(c.Z,{label:"Ban List",disabled:!a})]})}),(0,r.jsx)(eu,{value:e,index:0,children:(0,r.jsx)(M,{})}),(0,r.jsx)(eu,{value:e,index:1,children:a&&(0,r.jsxs)(i.ZP,{container:!0,spacing:3,children:[(0,r.jsx)(i.ZP,{item:!0,xs:12,md:8,children:(0,r.jsx)(Q,{serverName:a})}),(0,r.jsx)(i.ZP,{item:!0,xs:12,md:4,children:(0,r.jsxs)(t.Z,{sx:{p:2,bgcolor:"background.paper",borderRadius:1},children:[(0,r.jsx)(s.Z,{variant:"subtitle2",color:"text.secondary",gutterBottom:!0,children:"About Whitelist"}),(0,r.jsx)(s.Z,{variant:"body2",color:"text.secondary",children:"The whitelist controls which players can join your server. When enabled, only players on the whitelist can connect. Add players by their Minecraft username."})]})})]})}),(0,r.jsx)(eu,{value:e,index:2,children:a&&(0,r.jsxs)(i.ZP,{container:!0,spacing:3,children:[(0,r.jsx)(i.ZP,{item:!0,xs:12,md:8,children:(0,r.jsx)(ed,{serverName:a})}),(0,r.jsx)(i.ZP,{item:!0,xs:12,md:4,children:(0,r.jsxs)(t.Z,{sx:{p:2,bgcolor:"background.paper",borderRadius:1},children:[(0,r.jsx)(s.Z,{variant:"subtitle2",color:"text.secondary",gutterBottom:!0,children:"About Operators"}),(0,r.jsx)(s.Z,{variant:"body2",color:"text.secondary",children:"Operators (OPs) have elevated permissions on the server. They can use commands like /give, /gamemode, /tp, and more. OP levels range from 1-4, with 4 being the highest."}),(0,r.jsxs)(t.Z,{sx:{mt:2},children:[(0,r.jsx)(s.Z,{variant:"caption",color:"text.secondary",component:"div",children:"Level 1: Can bypass spawn protection"}),(0,r.jsx)(s.Z,{variant:"caption",color:"text.secondary",component:"div",children:"Level 2: Can use /clear, /gamemode, etc."}),(0,r.jsx)(s.Z,{variant:"caption",color:"text.secondary",component:"div",children:"Level 3: Can use /ban, /kick, /op, etc."}),(0,r.jsx)(s.Z,{variant:"caption",color:"text.secondary",component:"div",children:"Level 4: Can use /stop, full access"})]})]})})]})}),(0,r.jsx)(eu,{value:e,index:3,children:a&&(0,r.jsxs)(i.ZP,{container:!0,spacing:3,children:[(0,r.jsx)(i.ZP,{item:!0,xs:12,md:8,children:(0,r.jsx)(ex,{serverName:a})}),(0,r.jsx)(i.ZP,{item:!0,xs:12,md:4,children:(0,r.jsxs)(t.Z,{sx:{p:2,bgcolor:"background.paper",borderRadius:1},children:[(0,r.jsx)(s.Z,{variant:"subtitle2",color:"text.secondary",gutterBottom:!0,children:"About Bans"}),(0,r.jsx)(s.Z,{variant:"body2",color:"text.secondary",children:"Banned players cannot connect to your server. You can ban players by username and provide an optional reason. Bans can be removed (pardoned) at any time."})]})})]})})]})}}},function(e){e.O(0,[6812,9760,5004,7296,7436,1071,540,4416,2538,880,2539,8347,1658,5381,4187,4219,392,2666,3669,2757,1744],function(){return e(e.s=31809)}),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3767],{32823:function(e,n,r){Promise.resolve().then(r.bind(r,32050))},32050:function(e,n,r){"use strict";r.r(n),r.d(n,{default:function(){return d}});var s=r(94655),i=r(35106),o=r(31358),c=r(7281),l=r(31317),t=r(26138),a=r(41261),h=r(79983),u=r(10117),x=r(73660);function d(e){let{params:n}=e,r=(0,o.x)(),{name:d}=(0,i.use)(n),p=decodeURIComponent(d);return(0,s.jsxs)(c.Z,{sx:{height:"100%",display:"flex",flexDirection:"column"},children:[(0,s.jsxs)(c.Z,{sx:{mb:2},children:[(0,s.jsxs)(c.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:1},children:[(0,s.jsx)(h.Z,{onClick:()=>r.push("/servers/".concat(d)),size:"small","aria-label":"Back to server",children:(0,s.jsx)(u.Z,{})}),(0,s.jsxs)(t.Z,{"aria-label":"breadcrumb",children:[(0,s.jsx)(a.Z,{component:"button",variant:"body1",onClick:()=>r.push("/servers"),sx:{cursor:"pointer"},underline:"hover",color:"inherit",children:"Servers"}),(0,s.jsx)(a.Z,{component:"button",variant:"body1",onClick:()=>r.push("/servers/".concat(d)),sx:{cursor:"pointer"},underline:"hover",color:"inherit",children:p}),(0,s.jsx)(l.Z,{color:"text.primary",children:"Console"})]})]}),(0,s.jsxs)(l.Z,{variant:"h5",component:"h1",children:[p," Console"]})]}),(0,s.jsx)(c.Z,{sx:{flex:1,minHeight:0},children:(0,s.jsx)(x.K,{serverName:p})})]})}}},function(e){e.O(0,[6812,9760,5004,7296,7436,1658,6727,6645,1476,5787,3669,2757,1744],function(){return e(e.s=32823)}),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3767],{32823:function(e,n,r){Promise.resolve().then(r.bind(r,32050))},32050:function(e,n,r){"use strict";r.r(n),r.d(n,{default:function(){return d}});var s=r(94655),i=r(35106),o=r(31358),c=r(7281),l=r(31317),t=r(26138),a=r(41261),h=r(79983),u=r(10117),x=r(73660);function d(e){let{params:n}=e,r=(0,o.x)(),{name:d}=(0,i.use)(n),p=decodeURIComponent(d);return(0,s.jsxs)(c.Z,{sx:{height:"100%",display:"flex",flexDirection:"column"},children:[(0,s.jsxs)(c.Z,{sx:{mb:2},children:[(0,s.jsxs)(c.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:1},children:[(0,s.jsx)(h.Z,{onClick:()=>r.push("/servers/".concat(d)),size:"small","aria-label":"Back to server",children:(0,s.jsx)(u.Z,{})}),(0,s.jsxs)(t.Z,{"aria-label":"breadcrumb",children:[(0,s.jsx)(a.Z,{component:"button",variant:"body1",onClick:()=>r.push("/servers"),sx:{cursor:"pointer"},underline:"hover",color:"inherit",children:"Servers"}),(0,s.jsx)(a.Z,{component:"button",variant:"body1",onClick:()=>r.push("/servers/".concat(d)),sx:{cursor:"pointer"},underline:"hover",color:"inherit",children:p}),(0,s.jsx)(l.Z,{color:"text.primary",children:"Console"})]})]}),(0,s.jsxs)(l.Z,{variant:"h5",component:"h1",children:[p," Console"]})]}),(0,s.jsx)(c.Z,{sx:{flex:1,minHeight:0},children:(0,s.jsx)(x.K,{serverName:p})})]})}}},function(e){e.O(0,[6812,9760,5004,7296,7436,1658,6727,6645,682,5787,3669,2757,1744],function(){return e(e.s=32823)}),_N_E=e.O()}]);