@minecraft-docker/mcctl-console 2.15.3 → 2.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/standalone/package.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/BUILD_ID +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/app-build-manifest.json +288 -282
- package/.next/standalone/platform/services/mcctl-console/.next/app-path-routes-manifest.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/build-manifest.json +9 -9
- package/.next/standalone/platform/services/mcctl-console/.next/prerender-manifest.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/react-loadable-manifest.json +8 -1
- package/.next/standalone/platform/services/mcctl-console/.next/routes-manifest.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/admin/users/page.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/admin/users/page.js.nft.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/admin/users/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/audit-logs/page.js +2 -2
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/audit-logs/page.js.nft.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/audit-logs/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/backups/page.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/backups/page.js.nft.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/backups/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/dashboard/page.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/dashboard/page.js.nft.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/dashboard/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/players/page.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/players/page.js.nft.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/players/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/routing/page.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/routing/page.js.nft.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/routing/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/[name]/console/page.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/[name]/console/page.js.nft.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/[name]/console/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/[name]/page.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/[name]/page.js.nft.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/[name]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/page.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/page.js.nft.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/settings/page.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/settings/page.js.nft.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/settings/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/worlds/page.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/worlds/page.js.nft.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/worlds/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/_not-found/page.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/_not-found.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/_not-found.rsc +5 -5
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/config-snapshot-schedules/[id]/route.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/config-snapshot-schedules/[id]/route.js.nft.json +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/config-snapshot-schedules/[id]/toggle/route.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/config-snapshot-schedules/[id]/toggle/route.js.nft.json +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/config-snapshot-schedules/route.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/config-snapshot-schedules/route.js.nft.json +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/config-snapshots/[id1]/diff/[id2]/route.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/config-snapshots/[id1]/diff/[id2]/route.js.nft.json +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/servers/[name]/config-snapshots/[id]/restore/route.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/servers/[name]/config-snapshots/[id]/restore/route.js.nft.json +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/servers/[name]/config-snapshots/route.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/servers/[name]/config-snapshots/route.js.nft.json +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/audit-logs.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/audit-logs.rsc +7 -7
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/backups.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/backups.rsc +7 -7
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/dashboard.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/dashboard.rsc +7 -7
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/index.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/index.rsc +6 -6
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/login/page.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/login/page.js.nft.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/login.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/login.rsc +6 -6
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/page.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/page.js.nft.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/players.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/players.rsc +7 -7
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/routing.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/routing.rsc +7 -7
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/servers.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/servers.rsc +7 -7
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/settings.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/settings.rsc +7 -7
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/signup/page.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/signup/page.js.nft.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/signup/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/signup.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/signup.rsc +6 -6
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/worlds.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/worlds.rsc +7 -7
- package/.next/standalone/platform/services/mcctl-console/.next/server/app-paths-manifest.json +26 -20
- package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/1258.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/1309.js +2 -2
- package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/1465.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/3097.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/3613.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/4151.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/5843.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/{6554.js → 6965.js} +2 -2
- package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/731.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/7879.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/middleware-build-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/middleware-manifest.json +5 -5
- package/.next/standalone/platform/services/mcctl-console/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/pages/404.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/pages/500.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/pages-manifest.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/server-reference-manifest.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/1116-90e393e11322b96b.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/1164-f51ba1b8b2a8397d.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/1400-fd6d16ed1fc47d10.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/2603-4e610b5895784491.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/2666-13a1106f264477e7.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/271.1ddad6a871759970.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/310-1ce88ce372edcd70.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/3217-9df8e8d8e07ad4f0.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/4920-fa70dfac23995375.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/5618-bf7fd85c91f76e0d.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/6368-737efbaafd70bcba.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/6648-4f261adfced5c408.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/6942-9f909d2263194390.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/7195-28f07b61938ea9d1.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/7632-4cd7961537874121.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/{7965-67c4c53f693bc0c4.js → 7965-a3405fd50f7cc762.js} +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/8175-ba0a01a3b7844882.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/9986-eaaa18e89bd2b030.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/admin/users/{page-cc0c71dc0e6631fb.js → page-148e2baaceb33b2a.js} +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/audit-logs/{page-58b3d20be5540dd0.js → page-abfe3bbfaa7eb99b.js} +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/backups/page-50eec2b821445eee.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/dashboard/{page-11c6a90c8d27eb8d.js → page-77b32d45e2f64eec.js} +1 -1
- package/.next/{static/chunks/app/(main)/layout-9822cba515754d43.js → standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/layout-26e37b29ee07fc8c.js} +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/players/{page-d3e8734d942f5fea.js → page-08dd972363e964d9.js} +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/routing/{page-8e36e2c23d9a62c2.js → page-de9846175ecac0ae.js} +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/servers/[name]/console/{page-bea101bb0e8858b4.js → page-afcf019de92646f0.js} +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/servers/[name]/page-32309b73a831aa9b.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/servers/{page-35a24570b3f06f3b.js → page-842fa30b14dcb89f.js} +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/settings/page-ed3bb49a21cd3e7c.js +1 -0
- package/.next/{static/chunks/app/(main)/worlds/page-66e7e55928f43f54.js → standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/worlds/page-55df5fd15e110449.js} +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/{layout-eaefe334d7b2816a.js → layout-35cb1ada75bbaa71.js} +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/login/page-25894f9a24831c25.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/signup/page-3406801cf7f3df0d.js +1 -0
- package/.next/{static/chunks/main-63101811e3f573cc.js → standalone/platform/services/mcctl-console/.next/static/chunks/main-b1805c976aebe9ce.js} +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/webpack-a47ff07ca7471347.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/package.json +2 -1
- package/.next/static/chunks/1116-90e393e11322b96b.js +1 -0
- package/.next/static/chunks/1164-f51ba1b8b2a8397d.js +1 -0
- package/.next/static/chunks/1400-fd6d16ed1fc47d10.js +1 -0
- package/.next/static/chunks/2603-4e610b5895784491.js +1 -0
- package/.next/static/chunks/2666-13a1106f264477e7.js +1 -0
- package/.next/static/chunks/271.1ddad6a871759970.js +1 -0
- package/.next/static/chunks/310-1ce88ce372edcd70.js +1 -0
- package/.next/static/chunks/3217-9df8e8d8e07ad4f0.js +1 -0
- package/.next/static/chunks/4920-fa70dfac23995375.js +1 -0
- package/.next/static/chunks/5618-bf7fd85c91f76e0d.js +1 -0
- package/.next/static/chunks/6368-737efbaafd70bcba.js +1 -0
- package/.next/static/chunks/6648-4f261adfced5c408.js +1 -0
- package/.next/static/chunks/6942-9f909d2263194390.js +1 -0
- package/.next/static/chunks/7195-28f07b61938ea9d1.js +1 -0
- package/.next/static/chunks/7632-4cd7961537874121.js +1 -0
- package/.next/static/chunks/{7965-67c4c53f693bc0c4.js → 7965-a3405fd50f7cc762.js} +1 -1
- package/.next/static/chunks/8175-ba0a01a3b7844882.js +1 -0
- package/.next/static/chunks/9986-eaaa18e89bd2b030.js +1 -0
- package/.next/static/chunks/app/(main)/admin/users/{page-cc0c71dc0e6631fb.js → page-148e2baaceb33b2a.js} +1 -1
- package/.next/static/chunks/app/(main)/audit-logs/{page-58b3d20be5540dd0.js → page-abfe3bbfaa7eb99b.js} +1 -1
- package/.next/static/chunks/app/(main)/backups/page-50eec2b821445eee.js +1 -0
- package/.next/static/chunks/app/(main)/dashboard/{page-11c6a90c8d27eb8d.js → page-77b32d45e2f64eec.js} +1 -1
- package/.next/{standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/layout-9822cba515754d43.js → static/chunks/app/(main)/layout-26e37b29ee07fc8c.js} +1 -1
- package/.next/static/chunks/app/(main)/players/{page-d3e8734d942f5fea.js → page-08dd972363e964d9.js} +1 -1
- package/.next/static/chunks/app/(main)/routing/{page-8e36e2c23d9a62c2.js → page-de9846175ecac0ae.js} +1 -1
- package/.next/static/chunks/app/(main)/servers/[name]/console/{page-bea101bb0e8858b4.js → page-afcf019de92646f0.js} +1 -1
- package/.next/static/chunks/app/(main)/servers/[name]/page-32309b73a831aa9b.js +1 -0
- package/.next/static/chunks/app/(main)/servers/{page-35a24570b3f06f3b.js → page-842fa30b14dcb89f.js} +1 -1
- package/.next/static/chunks/app/(main)/settings/page-ed3bb49a21cd3e7c.js +1 -0
- package/.next/{standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/worlds/page-66e7e55928f43f54.js → static/chunks/app/(main)/worlds/page-55df5fd15e110449.js} +1 -1
- package/.next/static/chunks/app/{layout-eaefe334d7b2816a.js → layout-35cb1ada75bbaa71.js} +1 -1
- package/.next/static/chunks/app/login/page-25894f9a24831c25.js +1 -0
- package/.next/static/chunks/app/signup/page-3406801cf7f3df0d.js +1 -0
- package/.next/{standalone/platform/services/mcctl-console/.next/static/chunks/main-63101811e3f573cc.js → static/chunks/main-b1805c976aebe9ce.js} +1 -1
- package/.next/static/chunks/webpack-a47ff07ca7471347.js +1 -0
- package/package.json +3 -2
- package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/1645.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/8872.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/8913.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/1002-c53deedf30706db3.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/1055-b8c83674b69387ea.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/140-c12e00f0de7cd7be.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/2476-4fff0814e9d341f8.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/2666-0ffcaa56248fa87e.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/423-766c202217f701c0.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/4416-2385e5784dc036d6.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/6650-51e2b21d03bb2f09.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/7073-3b047d20c07ac065.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/7087-64ab6928ccdc0ca7.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/7648-2f814761281d3467.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/7753-74bf23c88b387cb7.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/9022-598befdec2960f02.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/9097-3bc29153e9b2c9d1.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/backups/page-bd084d0163678e15.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/servers/[name]/page-8eda8c4709976b6a.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/settings/page-9e447db7e4f551c2.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/login/page-913fdb0c7c3e7114.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/signup/page-4fe85a21b5914e70.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/webpack-7e31802f06defd3e.js +0 -1
- package/.next/static/chunks/1002-c53deedf30706db3.js +0 -1
- package/.next/static/chunks/1055-b8c83674b69387ea.js +0 -1
- package/.next/static/chunks/140-c12e00f0de7cd7be.js +0 -1
- package/.next/static/chunks/2476-4fff0814e9d341f8.js +0 -1
- package/.next/static/chunks/2666-0ffcaa56248fa87e.js +0 -1
- package/.next/static/chunks/423-766c202217f701c0.js +0 -1
- package/.next/static/chunks/4416-2385e5784dc036d6.js +0 -1
- package/.next/static/chunks/6650-51e2b21d03bb2f09.js +0 -1
- package/.next/static/chunks/7073-3b047d20c07ac065.js +0 -1
- package/.next/static/chunks/7087-64ab6928ccdc0ca7.js +0 -1
- package/.next/static/chunks/7648-2f814761281d3467.js +0 -1
- package/.next/static/chunks/7753-74bf23c88b387cb7.js +0 -1
- package/.next/static/chunks/9022-598befdec2960f02.js +0 -1
- package/.next/static/chunks/9097-3bc29153e9b2c9d1.js +0 -1
- package/.next/static/chunks/app/(main)/backups/page-bd084d0163678e15.js +0 -1
- package/.next/static/chunks/app/(main)/servers/[name]/page-8eda8c4709976b6a.js +0 -1
- package/.next/static/chunks/app/(main)/settings/page-9e447db7e4f551c2.js +0 -1
- package/.next/static/chunks/app/login/page-913fdb0c7c3e7114.js +0 -1
- package/.next/static/chunks/app/signup/page-4fe85a21b5914e70.js +0 -1
- package/.next/static/chunks/webpack-7e31802f06defd3e.js +0 -1
- /package/.next/standalone/platform/services/mcctl-console/.next/static/{6a6vvSaqr365vHaitEiOZ → EANeiraUW-eUpqLSPNGwp}/_buildManifest.js +0 -0
- /package/.next/standalone/platform/services/mcctl-console/.next/static/{6a6vvSaqr365vHaitEiOZ → EANeiraUW-eUpqLSPNGwp}/_ssgManifest.js +0 -0
- /package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/{1071-235049df1c3caba7.js → 1071-97b7f8379e993fe3.js} +0 -0
- /package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/{1658-43a798763bcc82ae.js → 1658-8e31f0c08520255d.js} +0 -0
- /package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/{2538-09440cfe5c38aa16.js → 2538-202c61c3f13684f5.js} +0 -0
- /package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/{2542-6ea12719b9ca1b7c.js → 2542-8ae47ca53ab8b1cb.js} +0 -0
- /package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/{2701-677e528d028253ad.js → 2701-0c76fe71a0c8b1a4.js} +0 -0
- /package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/{2757-058492b5c236cb62.js → 2757-89af113a429f789f.js} +0 -0
- /package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/{2844-de6e17c136b0de1e.js → 2844-6679c1f7742fd8e4.js} +0 -0
- /package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/{3938-b55cb95203c34832.js → 3938-7cab16ec2b4786dc.js} +0 -0
- /package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/{3b518dcd-5724e59d48f01b72.js → 3b518dcd-7c24a9aea6246f3f.js} +0 -0
- /package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/{4219-4ac199a28917d787.js → 4219-efc805d1901adfb1.js} +0 -0
- /package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/{4302-487e76466a64d13a.js → 4302-0fb262de582174b7.js} +0 -0
- /package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/{4841-6260a560fdad2dd4.js → 4841-951c7a01f48ba3dd.js} +0 -0
- /package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/{4898-60767ae3dfa904db.js → 4898-1ea31f09e131e287.js} +0 -0
- /package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/{5004-6ecca3df16643209.js → 5004-5ae4399bb0c5063c.js} +0 -0
- /package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/{5123-bc0af955f93964c7.js → 5123-b0144b4a19d55153.js} +0 -0
- /package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/{540-4b925f2c57833962.js → 540-41699a718be7f9fb.js} +0 -0
- /package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/{5498-096ebd4d2953f7f7.js → 5498-6305b5a34ba84ce4.js} +0 -0
- /package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/{55-cc17f03142ace10c.js → 55-5cd4930da22197a0.js} +0 -0
- /package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/{5511-7a419d84918a8d64.js → 5511-fb4905e23b2a0e3d.js} +0 -0
- /package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/{6727-e25ea0d10f0fea68.js → 6727-a674299e85a54ac5.js} +0 -0
- /package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/{6798-eb703f1c1303853c.js → 6798-fad1c50441244c82.js} +0 -0
- /package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/{6812-f5924f14ef351036.js → 6812-698a590a47ad1a32.js} +0 -0
- /package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/{7296-063cc1cf1200429d.js → 7296-70ec1bdc0b487394.js} +0 -0
- /package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/{7436-dc5c09a9f287522b.js → 7436-78809c41e7689be2.js} +0 -0
- /package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/{7477-3b97ce4c66d3cf7e.js → 7477-d1aa9858bb5a89b0.js} +0 -0
- /package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/{8347-d55cd74fb316fad0.js → 8347-6a204768b348b2b8.js} +0 -0
- /package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/{9760-3b9261fc2cfda017.js → 9760-30e83c11974cef44.js} +0 -0
- /package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/_not-found/{page-04a252eb6000a47f.js → page-562e8bf174e92275.js} +0 -0
- /package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/{page-06fbf91c6bf684a9.js → page-9cdf86ac8c200db6.js} +0 -0
- /package/.next/static/{6a6vvSaqr365vHaitEiOZ → EANeiraUW-eUpqLSPNGwp}/_buildManifest.js +0 -0
- /package/.next/static/{6a6vvSaqr365vHaitEiOZ → EANeiraUW-eUpqLSPNGwp}/_ssgManifest.js +0 -0
- /package/.next/static/chunks/{1071-235049df1c3caba7.js → 1071-97b7f8379e993fe3.js} +0 -0
- /package/.next/static/chunks/{1658-43a798763bcc82ae.js → 1658-8e31f0c08520255d.js} +0 -0
- /package/.next/static/chunks/{2538-09440cfe5c38aa16.js → 2538-202c61c3f13684f5.js} +0 -0
- /package/.next/static/chunks/{2542-6ea12719b9ca1b7c.js → 2542-8ae47ca53ab8b1cb.js} +0 -0
- /package/.next/static/chunks/{2701-677e528d028253ad.js → 2701-0c76fe71a0c8b1a4.js} +0 -0
- /package/.next/static/chunks/{2757-058492b5c236cb62.js → 2757-89af113a429f789f.js} +0 -0
- /package/.next/static/chunks/{2844-de6e17c136b0de1e.js → 2844-6679c1f7742fd8e4.js} +0 -0
- /package/.next/static/chunks/{3938-b55cb95203c34832.js → 3938-7cab16ec2b4786dc.js} +0 -0
- /package/.next/static/chunks/{3b518dcd-5724e59d48f01b72.js → 3b518dcd-7c24a9aea6246f3f.js} +0 -0
- /package/.next/static/chunks/{4219-4ac199a28917d787.js → 4219-efc805d1901adfb1.js} +0 -0
- /package/.next/static/chunks/{4302-487e76466a64d13a.js → 4302-0fb262de582174b7.js} +0 -0
- /package/.next/static/chunks/{4841-6260a560fdad2dd4.js → 4841-951c7a01f48ba3dd.js} +0 -0
- /package/.next/static/chunks/{4898-60767ae3dfa904db.js → 4898-1ea31f09e131e287.js} +0 -0
- /package/.next/static/chunks/{5004-6ecca3df16643209.js → 5004-5ae4399bb0c5063c.js} +0 -0
- /package/.next/static/chunks/{5123-bc0af955f93964c7.js → 5123-b0144b4a19d55153.js} +0 -0
- /package/.next/static/chunks/{540-4b925f2c57833962.js → 540-41699a718be7f9fb.js} +0 -0
- /package/.next/static/chunks/{5498-096ebd4d2953f7f7.js → 5498-6305b5a34ba84ce4.js} +0 -0
- /package/.next/static/chunks/{55-cc17f03142ace10c.js → 55-5cd4930da22197a0.js} +0 -0
- /package/.next/static/chunks/{5511-7a419d84918a8d64.js → 5511-fb4905e23b2a0e3d.js} +0 -0
- /package/.next/static/chunks/{6727-e25ea0d10f0fea68.js → 6727-a674299e85a54ac5.js} +0 -0
- /package/.next/static/chunks/{6798-eb703f1c1303853c.js → 6798-fad1c50441244c82.js} +0 -0
- /package/.next/static/chunks/{6812-f5924f14ef351036.js → 6812-698a590a47ad1a32.js} +0 -0
- /package/.next/static/chunks/{7296-063cc1cf1200429d.js → 7296-70ec1bdc0b487394.js} +0 -0
- /package/.next/static/chunks/{7436-dc5c09a9f287522b.js → 7436-78809c41e7689be2.js} +0 -0
- /package/.next/static/chunks/{7477-3b97ce4c66d3cf7e.js → 7477-d1aa9858bb5a89b0.js} +0 -0
- /package/.next/static/chunks/{8347-d55cd74fb316fad0.js → 8347-6a204768b348b2b8.js} +0 -0
- /package/.next/static/chunks/{9760-3b9261fc2cfda017.js → 9760-30e83c11974cef44.js} +0 -0
- /package/.next/static/chunks/app/_not-found/{page-04a252eb6000a47f.js → page-562e8bf174e92275.js} +0 -0
- /package/.next/static/chunks/app/{page-06fbf91c6bf684a9.js → page-9cdf86ac8c200db6.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7632],{71185:function(t,e,r){var i=r(8091);e.Z=void 0;var n=i(r(66758)),a=r(94655);e.Z=(0,n.default)((0,a.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close")},27171:function(t,e,r){var i=r(8091);e.Z=void 0;var n=i(r(66758)),a=r(94655);e.Z=(0,n.default)((0,a.jsx)("path",{d:"M20 13H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h16c.55 0 1-.45 1-1v-6c0-.55-.45-1-1-1M7 19c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2M20 3H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h16c.55 0 1-.45 1-1V4c0-.55-.45-1-1-1M7 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2"}),"Dns")},69123:function(t,e,r){var i=r(32324),n=r(81500),a=r(35106),o=r(70316),l=r(65951),s=r(64577),c=r(34519),d=r(28057),h=r(16945),p=r(94655);let f=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],g=t=>{let{absolute:e,children:r,classes:i,flexItem:n,light:a,orientation:o,textAlign:s,variant:c}=t;return(0,l.Z)({root:["root",e&&"absolute",c,a&&"light","vertical"===o&&"vertical",n&&"flexItem",r&&"withChildren",r&&"vertical"===o&&"withChildrenVertical","right"===s&&"vertical"!==o&&"textAlignRight","left"===s&&"vertical"!==o&&"textAlignLeft"],wrapper:["wrapper","vertical"===o&&"wrapperVertical"]},h.V,i)},u=(0,c.ZP)("div",{name:"MuiDivider",slot:"Root",overridesResolver:(t,e)=>{let{ownerState:r}=t;return[e.root,r.absolute&&e.absolute,e[r.variant],r.light&&e.light,"vertical"===r.orientation&&e.vertical,r.flexItem&&e.flexItem,r.children&&e.withChildren,r.children&&"vertical"===r.orientation&&e.withChildrenVertical,"right"===r.textAlign&&"vertical"!==r.orientation&&e.textAlignRight,"left"===r.textAlign&&"vertical"!==r.orientation&&e.textAlignLeft]}})(t=>{let{theme:e,ownerState:r}=t;return(0,n.Z)({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin"},r.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},r.light&&{borderColor:e.vars?"rgba(".concat(e.vars.palette.dividerChannel," / 0.08)"):(0,s.Fq)(e.palette.divider,.08)},"inset"===r.variant&&{marginLeft:72},"middle"===r.variant&&"horizontal"===r.orientation&&{marginLeft:e.spacing(2),marginRight:e.spacing(2)},"middle"===r.variant&&"vertical"===r.orientation&&{marginTop:e.spacing(1),marginBottom:e.spacing(1)},"vertical"===r.orientation&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},r.flexItem&&{alignSelf:"stretch",height:"auto"})},t=>{let{ownerState:e}=t;return(0,n.Z)({},e.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}})},t=>{let{theme:e,ownerState:r}=t;return(0,n.Z)({},r.children&&"vertical"!==r.orientation&&{"&::before, &::after":{width:"100%",borderTop:"thin solid ".concat((e.vars||e).palette.divider),borderTopStyle:"inherit"}})},t=>{let{theme:e,ownerState:r}=t;return(0,n.Z)({},r.children&&"vertical"===r.orientation&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:"thin solid ".concat((e.vars||e).palette.divider),borderLeftStyle:"inherit"}})},t=>{let{ownerState:e}=t;return(0,n.Z)({},"right"===e.textAlign&&"vertical"!==e.orientation&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},"left"===e.textAlign&&"vertical"!==e.orientation&&{"&::before":{width:"10%"},"&::after":{width:"90%"}})}),v=(0,c.ZP)("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(t,e)=>{let{ownerState:r}=t;return[e.wrapper,"vertical"===r.orientation&&e.wrapperVertical]}})(t=>{let{theme:e,ownerState:r}=t;return(0,n.Z)({display:"inline-block",paddingLeft:"calc(".concat(e.spacing(1)," * 1.2)"),paddingRight:"calc(".concat(e.spacing(1)," * 1.2)")},"vertical"===r.orientation&&{paddingTop:"calc(".concat(e.spacing(1)," * 1.2)"),paddingBottom:"calc(".concat(e.spacing(1)," * 1.2)")})}),m=a.forwardRef(function(t,e){let r=(0,d.i)({props:t,name:"MuiDivider"}),{absolute:a=!1,children:l,className:s,component:c=l?"div":"hr",flexItem:h=!1,light:m=!1,orientation:b="horizontal",role:x="hr"!==c?"separator":void 0,textAlign:w="center",variant:Z="fullWidth"}=r,y=(0,i.Z)(r,f),E=(0,n.Z)({},r,{absolute:a,component:c,flexItem:h,light:m,orientation:b,role:x,textAlign:w,variant:Z}),k=g(E);return(0,p.jsx)(u,(0,n.Z)({as:c,className:(0,o.Z)(k.root,s),role:x,ref:e,ownerState:E},y,{children:l?(0,p.jsx)(v,{className:k.wrapper,ownerState:E,children:l}):null}))});m.muiSkipListHighlight=!0,e.Z=m},12550:function(t,e,r){var i=r(81500),n=r(32324),a=r(35106),o=r(92019),l=r(11844),s=r(19521),c=r(38481),d=r(83855),h=r(56874),p=r(99466),f=r(94655);let g=["addEndListener","appear","children","container","direction","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function u(t,e,r){let i=function(t,e,r){let i;let n=e.getBoundingClientRect(),a=r&&r.getBoundingClientRect(),o=(0,p.Z)(e);if(e.fakeTransform)i=e.fakeTransform;else{let t=o.getComputedStyle(e);i=t.getPropertyValue("-webkit-transform")||t.getPropertyValue("transform")}let l=0,s=0;if(i&&"none"!==i&&"string"==typeof i){let t=i.split("(")[1].split(")")[0].split(",");l=parseInt(t[4],10),s=parseInt(t[5],10)}return"left"===t?a?"translateX(".concat(a.right+l-n.left,"px)"):"translateX(".concat(o.innerWidth+l-n.left,"px)"):"right"===t?a?"translateX(-".concat(n.right-a.left-l,"px)"):"translateX(-".concat(n.left+n.width-l,"px)"):"up"===t?a?"translateY(".concat(a.bottom+s-n.top,"px)"):"translateY(".concat(o.innerHeight+s-n.top,"px)"):a?"translateY(-".concat(n.top-a.top+n.height-s,"px)"):"translateY(-".concat(n.top+n.height-s,"px)")}(t,e,"function"==typeof r?r():r);i&&(e.style.webkitTransform=i,e.style.transform=i)}let v=a.forwardRef(function(t,e){let r=(0,d.Z)(),v={enter:r.transitions.easing.easeOut,exit:r.transitions.easing.sharp},m={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:b,appear:x=!0,children:w,container:Z,direction:y="down",easing:E=v,in:k,onEnter:C,onEntered:S,onEntering:R,onExit:L,onExited:T,onExiting:A,style:M,timeout:V=m,TransitionComponent:I=o.ZP}=t,W=(0,n.Z)(t,g),B=a.useRef(null),j=(0,c.Z)((0,l.Z)(w),B,e),z=t=>e=>{t&&(void 0===e?t(B.current):t(B.current,e))},D=z((t,e)=>{u(y,t,Z),(0,h.n)(t),C&&C(t,e)}),N=z((t,e)=>{let n=(0,h.C)({timeout:V,style:M,easing:E},{mode:"enter"});t.style.webkitTransition=r.transitions.create("-webkit-transform",(0,i.Z)({},n)),t.style.transition=r.transitions.create("transform",(0,i.Z)({},n)),t.style.webkitTransform="none",t.style.transform="none",R&&R(t,e)}),P=z(S),H=z(A),X=z(t=>{let e=(0,h.C)({timeout:V,style:M,easing:E},{mode:"exit"});t.style.webkitTransition=r.transitions.create("-webkit-transform",e),t.style.transition=r.transitions.create("transform",e),u(y,t,Z),L&&L(t)}),Y=z(t=>{t.style.webkitTransition="",t.style.transition="",T&&T(t)}),_=a.useCallback(()=>{B.current&&u(y,B.current,Z)},[y,Z]);return a.useEffect(()=>{if(k||"down"===y||"right"===y)return;let t=(0,s.Z)(()=>{B.current&&u(y,B.current,Z)}),e=(0,p.Z)(B.current);return e.addEventListener("resize",t),()=>{t.clear(),e.removeEventListener("resize",t)}},[y,k,Z]),a.useEffect(()=>{k||_()},[k,_]),(0,f.jsx)(I,(0,i.Z)({nodeRef:B,onEnter:D,onEntered:P,onEntering:N,onExit:X,onExited:Y,onExiting:H,addEndListener:t=>{b&&b(B.current,t)},appear:x,in:k,timeout:V},W,{children:(t,e)=>a.cloneElement(w,(0,i.Z)({ref:j,style:(0,i.Z)({visibility:"exited"!==t||k?void 0:"hidden"},M,w.props.style)},e))}))});e.Z=v}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7965],{57965:function(e,r,s){s.d(r,{eE:function(){return Q},E4:function(){return N},SB:function(){return k},ms:function(){return X},hI:function(){return p},aY:function(){return ec},zd:function(){return U},Ik:function(){return P}});var n=s(94655),t=s(628),i=s(41565),a=s(31317),l=s(7281),o=s(25333),c=s(21138),d=s(84811),x=s(70366),u=s(47001),h=s(59602);let j={fontWeight:500,color:"text.secondary",border:0,width:"40%",py:1},m={border:0,py:1};function p(e){var r;let{router:s}=e,p=(r=s.mode)?r.includes("in-docker")||r.includes("auto-discovery")?{label:"Auto Discovery",color:"info"}:r.includes("mapping")?{label:"Manual Mapping",color:"warning"}:{label:r,color:"default"}:{label:"Unknown",color:"default"};return(0,n.jsx)(t.Z,{children:(0,n.jsxs)(i.Z,{children:[(0,n.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:2},children:[(0,n.jsx)(h.Z,{color:"primary"}),(0,n.jsx)(a.Z,{variant:"h6",component:"h2",children:"Platform Information"})]}),(0,n.jsx)(c.Z,{size:"small",children:(0,n.jsxs)(d.Z,{children:[(0,n.jsxs)(x.Z,{children:[(0,n.jsx)(u.Z,{sx:j,children:"Router Name"}),(0,n.jsx)(u.Z,{sx:m,children:s.name})]}),(0,n.jsxs)(x.Z,{children:[(0,n.jsx)(u.Z,{sx:j,children:"Port"}),(0,n.jsx)(u.Z,{sx:m,children:s.port})]}),(0,n.jsxs)(x.Z,{children:[(0,n.jsx)(u.Z,{sx:j,children:"Mode"}),(0,n.jsx)(u.Z,{sx:m,children:(0,n.jsx)(o.Z,{label:p.label,size:"small",color:p.color,variant:"outlined"})})]}),(0,n.jsxs)(x.Z,{children:[(0,n.jsx)(u.Z,{sx:j,children:"Uptime"}),(0,n.jsx)(u.Z,{sx:m,children:s.uptime||"-"})]})]})})]})})}var Z=s(95511),f=s(66561),g=s(12795),y=s(96407),v=s(29983),b=s(81960);function w(e){switch(e){case"running":return"#4caf50";case"exited":case"dead":case"not_found":case"not_created":return"#f44336";case"created":case"restarting":case"paused":return"#ff9800";default:return"#9e9e9e"}}function S(e){let{status:r}=e;return(0,n.jsx)(Z.Z,{title:r,arrow:!0,children:(0,n.jsx)(l.Z,{sx:{width:10,height:10,borderRadius:"50%",bgcolor:w(r),flexShrink:0,boxShadow:"running"===r?"0 0 6px ".concat(w(r)):"none"}})})}function P(e){let{router:r}=e,s=function(e){let r=new Map;for(let s of e){let e=s.target.replace(/^mc-/,"").replace(/:25565$/,""),n=r.get(e);n?n.hostnames.push(s.hostname):r.set(e,{status:s.serverStatus,hostnames:[s.hostname],serverType:s.serverType,serverVersion:s.serverVersion})}return r}(r.routes);return(0,n.jsx)(t.Z,{sx:{height:"100%"},children:(0,n.jsxs)(i.Z,{children:[(0,n.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:2},children:[(0,n.jsx)(v.Z,{color:"primary"}),(0,n.jsx)(a.Z,{variant:"h6",component:"h2",children:"MC-Router Status"}),(0,n.jsxs)(l.Z,{sx:{ml:"auto",display:"flex",gap:1},children:[(0,n.jsx)(o.Z,{label:r.status,size:"small",color:function(e){switch(e){case"running":return"success";case"exited":case"dead":case"not_found":case"not_created":return"error";case"created":case"restarting":case"paused":return"warning";default:return"default"}}(r.status)}),(0,n.jsx)(o.Z,{label:r.health,size:"small",color:function(e){switch(e){case"healthy":return"success";case"unhealthy":return"error";case"starting":return"warning";default:return"default"}}(r.health),variant:"outlined"})]})]}),(0,n.jsx)(a.Z,{variant:"subtitle2",sx:{mb:1,mt:3},children:"Routing Table"}),0===r.routes.length?(0,n.jsx)(a.Z,{variant:"body2",color:"text.secondary",sx:{py:2,textAlign:"center"},children:"No routes configured"}):(0,n.jsx)(l.Z,{sx:{mt:1},children:Array.from(s.entries()).map(e=>{let[r,{status:s,hostnames:t,serverType:i,serverVersion:o}]=e;return(0,n.jsxs)(f.Z,{defaultExpanded:!0,disableGutters:!0,elevation:0,sx:{border:1,borderColor:"divider","&:not(:last-child)":{borderBottom:0},"&::before":{display:"none"}},children:[(0,n.jsx)(g.Z,{expandIcon:(0,n.jsx)(b.Z,{}),children:(0,n.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",gap:1,width:"100%",pr:1},children:[(0,n.jsx)(S,{status:s}),(0,n.jsx)(a.Z,{variant:"subtitle2",sx:{fontWeight:600},children:r}),(i||o)&&(0,n.jsx)(a.Z,{variant:"caption",color:"text.secondary",children:[i,o].filter(Boolean).join(" ")}),(0,n.jsxs)(a.Z,{variant:"caption",color:"text.secondary",sx:{ml:"auto"},children:[t.length," ",1===t.length?"route":"routes"]})]})}),(0,n.jsx)(y.Z,{sx:{pt:0},children:(0,n.jsx)(l.Z,{sx:{display:"flex",flexDirection:"column",gap:.5},children:t.map(e=>(0,n.jsx)(a.Z,{variant:"body2",sx:{fontSize:"0.85rem",color:"text.secondary"},children:e},e))})})]},r)})})]})})}var C=s(21605);let z={fontWeight:500,color:"text.secondary",border:0,width:"40%",py:1},I={border:0,py:1};function k(e){var r;let{router:s}=e,h=s.routes.filter(e=>"running"===e.serverStatus).length,j=s.routes.length;return(0,n.jsx)(t.Z,{children:(0,n.jsxs)(i.Z,{children:[(0,n.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:2},children:[(0,n.jsx)(C.Z,{color:"primary"}),(0,n.jsx)(a.Z,{variant:"h6",component:"h2",children:"Network Settings"})]}),(0,n.jsx)(l.Z,{sx:{overflowX:"auto"},children:(0,n.jsx)(c.Z,{size:"small",children:(0,n.jsxs)(d.Z,{children:[(0,n.jsxs)(x.Z,{children:[(0,n.jsx)(u.Z,{sx:z,children:"Listening Port"}),(0,n.jsx)(u.Z,{sx:I,children:(0,n.jsx)(o.Z,{label:s.port,size:"small",variant:"outlined"})})]}),(0,n.jsxs)(x.Z,{children:[(0,n.jsx)(u.Z,{sx:z,children:"Routing Mode"}),(0,n.jsx)(u.Z,{sx:I,children:(0,n.jsx)(o.Z,{label:(r=s.mode)?r.includes("in-docker")||r.includes("auto-discovery")?"Auto Discovery":r.includes("mapping")?"Manual Mapping":r:"Unknown",size:"small",color:"info",variant:"outlined"})})]}),(0,n.jsxs)(x.Z,{children:[(0,n.jsx)(u.Z,{sx:z,children:"Total Routes"}),(0,n.jsx)(u.Z,{sx:I,children:j})]}),(0,n.jsxs)(x.Z,{children:[(0,n.jsx)(u.Z,{sx:z,children:"Active Routes"}),(0,n.jsx)(u.Z,{sx:I,children:(0,n.jsx)(o.Z,{label:"".concat(h," / ").concat(j),size:"small",color:h>0?"success":"default",variant:"outlined"})})]})]})})})]})})}var A=s(76544);function N(e){var r;let{avahi:s}=e,c=null!==(r=null==s?void 0:s.status)&&void 0!==r?r:"unknown";return(0,n.jsx)(t.Z,{children:(0,n.jsxs)(i.Z,{children:[(0,n.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:2},children:[(0,n.jsx)(A.Z,{color:"primary"}),(0,n.jsx)(a.Z,{variant:"h6",component:"h2",children:"mDNS (Avahi)"}),(0,n.jsx)(o.Z,{label:c,size:"small",color:"running"===c?"success":c.includes("not running")?"warning":"not installed"===c?"error":"default",sx:{ml:"auto"}})]}),(0,n.jsxs)(a.Z,{variant:"body2",color:"text.secondary",children:["Avahi mDNS daemon enables ",(0,n.jsx)("code",{children:".local"})," hostname resolution for Minecraft servers on the local network."]})]})})}var D=s(35106),T=s(97436),E=s(30417),W=s(93017),B=s(30114),R=s(6986);function U(e){var r;let{onSuccess:s,onError:c}=e,{data:d}=(0,R.kP)(),[x,u]=(0,D.useState)((null==d?void 0:null===(r=d.user)||void 0===r?void 0:r.name)||""),[h,j]=(0,D.useState)(!1),[m,p]=(0,D.useState)(!1),Z=null==d?void 0:d.user;(0,D.useEffect)(()=>{(null==Z?void 0:Z.name)&&!m&&(u(Z.name),p(!0))},[null==Z?void 0:Z.name,m]);let f=x!==((null==Z?void 0:Z.name)||""),g=async()=>{if(f&&x.trim()){j(!0);try{let{error:e}=await (0,R.Nq)({name:x.trim()});e?c(e.message||"Failed to update profile"):s("Profile updated successfully")}catch(e){c("Failed to update profile")}finally{j(!1)}}};return Z?(0,n.jsx)(t.Z,{sx:{height:"100%"},children:(0,n.jsxs)(i.Z,{children:[(0,n.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:3},children:[(0,n.jsx)(B.Z,{color:"primary"}),(0,n.jsx)(a.Z,{variant:"h6",component:"h2",children:"Profile"})]}),(0,n.jsxs)(l.Z,{sx:{display:"flex",flexDirection:"column",gap:2.5},children:[(0,n.jsx)(T.Z,{label:"Name",value:x,onChange:e=>u(e.target.value),fullWidth:!0,size:"small"}),(0,n.jsx)(T.Z,{label:"Email",value:Z.email,fullWidth:!0,size:"small",disabled:!0,helperText:"Email cannot be changed"}),(0,n.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,n.jsx)(a.Z,{variant:"body2",color:"text.secondary",children:"Role:"}),(0,n.jsx)(o.Z,{label:"admin"===Z.role?"Admin":"User",size:"small",color:"admin"===Z.role?"primary":"default",variant:"outlined"})]}),(0,n.jsx)(l.Z,{sx:{display:"flex",justifyContent:"flex-end"},children:(0,n.jsx)(E.Z,{variant:"contained",onClick:g,disabled:!f||!x.trim()||h,startIcon:h?(0,n.jsx)(W.Z,{size:16}):null,children:h?"Saving...":"Save Changes"})})]})]})}):null}var _=s(52082),F=s(79983),M=s(70603),L=s(28058),q=s(42730);function X(e){let{onSuccess:r,onError:s}=e,[o,c]=(0,D.useState)(""),[d,x]=(0,D.useState)(""),[u,h]=(0,D.useState)(""),[j,m]=(0,D.useState)(!1),[p,Z]=(0,D.useState)(!1),[f,g]=(0,D.useState)(!1),[y,v]=(0,D.useState)(!1),[b,w]=(0,D.useState)({}),S=()=>{let e={};return o||(e.currentPassword="Current password is required"),d?d.length<8&&(e.newPassword="Password must be at least ".concat(8," characters")):e.newPassword="New password is required",u?d!==u&&(e.confirmPassword="Passwords do not match"):e.confirmPassword="Please confirm your new password",o&&d&&o===d&&(e.newPassword="New password must be different from current password"),w(e),0===Object.keys(e).length},P=async e=>{if(e.preventDefault(),S()){v(!0);try{let{error:e}=await (0,R.Cp)({currentPassword:o,newPassword:d,revokeOtherSessions:!1});e?s(e.message||"Failed to change password"):(r("Password changed successfully"),c(""),x(""),h(""),w({}))}catch(e){s("Failed to change password")}finally{v(!1)}}},C=(e,r)=>(0,n.jsx)(_.Z,{position:"end",children:(0,n.jsx)(F.Z,{"aria-label":e?"hide password":"show password",onClick:()=>r(!e),edge:"end",size:"small",children:e?(0,n.jsx)(q.Z,{fontSize:"small"}):(0,n.jsx)(L.Z,{fontSize:"small"})})});return(0,n.jsx)(t.Z,{children:(0,n.jsxs)(i.Z,{children:[(0,n.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:3},children:[(0,n.jsx)(M.Z,{color:"primary"}),(0,n.jsx)(a.Z,{variant:"h6",component:"h2",children:"Change Password"})]}),(0,n.jsxs)(l.Z,{component:"form",onSubmit:P,sx:{display:"flex",flexDirection:"column",gap:2.5},children:[(0,n.jsx)(T.Z,{label:"Current Password",type:j?"text":"password",value:o,onChange:e=>{c(e.target.value),b.currentPassword&&w(e=>({...e,currentPassword:""}))},error:!!b.currentPassword,helperText:b.currentPassword,fullWidth:!0,size:"small",autoComplete:"current-password",InputProps:{endAdornment:C(j,m)}}),(0,n.jsx)(T.Z,{label:"New Password",type:p?"text":"password",value:d,onChange:e=>{x(e.target.value),b.newPassword&&w(e=>({...e,newPassword:""}))},error:!!b.newPassword,helperText:b.newPassword||"Minimum ".concat(8," characters"),fullWidth:!0,size:"small",autoComplete:"new-password",InputProps:{endAdornment:C(p,Z)}}),(0,n.jsx)(T.Z,{label:"Confirm New Password",type:f?"text":"password",value:u,onChange:e=>{h(e.target.value),b.confirmPassword&&w(e=>({...e,confirmPassword:""}))},error:!!b.confirmPassword,helperText:b.confirmPassword,fullWidth:!0,size:"small",autoComplete:"new-password",InputProps:{endAdornment:C(f,g)}}),(0,n.jsx)(l.Z,{sx:{display:"flex",justifyContent:"flex-end"},children:(0,n.jsx)(E.Z,{type:"submit",variant:"contained",disabled:y,startIcon:y?(0,n.jsx)(W.Z,{size:16}):null,children:y?"Changing...":"Change Password"})})]})]})})}var O=s(23695);let K={fontWeight:500,color:"text.secondary",border:0,width:"40%",py:1},V={border:0,py:1};function $(e){return e?("string"==typeof e?new Date(e):e).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"}):"-"}function Q(){let{data:e}=(0,R.kP)(),r=null==e?void 0:e.user;return r?(0,n.jsx)(t.Z,{sx:{height:"100%"},children:(0,n.jsxs)(i.Z,{children:[(0,n.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:2},children:[(0,n.jsx)(O.Z,{color:"primary"}),(0,n.jsx)(a.Z,{variant:"h6",component:"h2",children:"Account Information"})]}),(0,n.jsx)(c.Z,{size:"small",children:(0,n.jsxs)(d.Z,{children:[(0,n.jsxs)(x.Z,{children:[(0,n.jsx)(u.Z,{sx:K,children:"Account ID"}),(0,n.jsx)(u.Z,{sx:V,children:(0,n.jsx)(a.Z,{variant:"body2",sx:{fontSize:"0.8rem"},children:r.id})})]}),(0,n.jsxs)(x.Z,{children:[(0,n.jsx)(u.Z,{sx:K,children:"Created"}),(0,n.jsx)(u.Z,{sx:V,children:$(r.createdAt)})]}),(0,n.jsxs)(x.Z,{children:[(0,n.jsx)(u.Z,{sx:K,children:"Last Updated"}),(0,n.jsx)(u.Z,{sx:V,children:$(r.updatedAt)})]})]})})]})}):null}var Y=s(11254),G=s(10721),H=s(81071),J=s(84974),ee=s(5501),er=s(93315),es=s(9078),en=s(10449),et=s(24559),ei=s(37228);let ea={fontWeight:500,color:"text.secondary",border:0,width:"40%",py:1},el={border:0,py:1};function eo(e){let{text:r}=e,[s,t]=(0,D.useState)(!1),i=async()=>{try{await navigator.clipboard.writeText(r),t(!0),setTimeout(()=>t(!1),2e3)}catch(e){console.error("Failed to copy:",e)}};return(0,n.jsx)(F.Z,{size:"small",onClick:i,sx:{ml:1,color:s?"success.main":"text.secondary","&:hover":{bgcolor:"action.hover"}},"aria-label":s?"Copied":"Copy to clipboard",children:s?(0,n.jsx)(et.Z,{sx:{fontSize:16}}):(0,n.jsx)(en.Z,{sx:{fontSize:16}})})}function ec(){let{data:e,isLoading:r,error:s}=(0,ei.UW)(),h=(0,ei.Bc)(),j=(0,ei.N$)();if(s)return(0,n.jsx)(t.Z,{children:(0,n.jsxs)(i.Z,{children:[(0,n.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:2},children:[(0,n.jsx)(J.Z,{color:"primary"}),(0,n.jsx)(a.Z,{variant:"h6",component:"h2",children:"External Access (playit.gg)"})]}),(0,n.jsxs)(H.Z,{severity:"error",children:["Failed to load playit status: ",s.message]})]})});if(r)return(0,n.jsx)(t.Z,{children:(0,n.jsxs)(i.Z,{children:[(0,n.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:2},children:[(0,n.jsx)(G.Z,{variant:"circular",width:24,height:24}),(0,n.jsx)(G.Z,{variant:"text",width:"40%",height:32})]}),(0,n.jsxs)(l.Z,{sx:{display:"flex",justifyContent:"space-between",py:.75},children:[(0,n.jsx)(G.Z,{variant:"text",width:"35%"}),(0,n.jsx)(G.Z,{variant:"text",width:"40%"})]}),(0,n.jsxs)(l.Z,{sx:{display:"flex",justifyContent:"space-between",py:.75},children:[(0,n.jsx)(G.Z,{variant:"text",width:"35%"}),(0,n.jsx)(G.Z,{variant:"text",width:"40%"})]})]})});if(!(null==e?void 0:e.enabled))return(0,n.jsx)(t.Z,{children:(0,n.jsxs)(i.Z,{children:[(0,n.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:2},children:[(0,n.jsx)(J.Z,{color:"primary"}),(0,n.jsx)(a.Z,{variant:"h6",component:"h2",children:"External Access (playit.gg)"})]}),(0,n.jsxs)(H.Z,{severity:"info",children:[(0,n.jsx)(a.Z,{variant:"body2",fontWeight:500,sx:{mb:.5},children:"Not configured"}),(0,n.jsx)(a.Z,{variant:"body2",color:"text.secondary",children:"playit.gg agent is not set up. Configure PLAYIT_SECRET to enable external access."})]})]})});let m=e.agentRunning&&"running"===e.containerStatus,p=h.isPending||j.isPending,Z=h.error||j.error;return(0,n.jsx)(t.Z,{children:(0,n.jsxs)(i.Z,{children:[(0,n.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:1},children:[(0,n.jsx)(J.Z,{color:"primary"}),(0,n.jsx)(a.Z,{variant:"h6",component:"h2",children:"External Access (playit.gg)"})]}),Z&&(0,n.jsx)(H.Z,{severity:"error",sx:{mb:2},children:Z.message||"Action failed"}),(0,n.jsxs)(l.Z,{sx:{display:"flex",gap:1,mb:2,flexWrap:"wrap"},children:[m?(0,n.jsx)(E.Z,{variant:"outlined",size:"small",color:"error",startIcon:p?(0,n.jsx)(W.Z,{size:16}):(0,n.jsx)(er.Z,{}),onClick:()=>{j.mutate()},disabled:p,sx:{fontSize:12},children:p?"Stopping...":"Stop Agent"}):(0,n.jsx)(E.Z,{variant:"contained",size:"small",color:"success",startIcon:p?(0,n.jsx)(W.Z,{size:16,color:"inherit"}):(0,n.jsx)(ee.Z,{}),onClick:()=>{h.mutate()},disabled:p,sx:{fontSize:12},children:p?"Starting...":"Start Agent"}),(0,n.jsx)(E.Z,{component:"a",href:"https://playit.gg/account/tunnels",target:"_blank",rel:"noopener noreferrer",size:"small",startIcon:(0,n.jsx)(es.Z,{}),sx:{fontSize:12},children:"View Dashboard"})]}),(0,n.jsx)(l.Z,{sx:{overflowX:"auto"},children:(0,n.jsx)(c.Z,{size:"small",sx:{mb:3},children:(0,n.jsxs)(d.Z,{children:[(0,n.jsxs)(x.Z,{children:[(0,n.jsx)(u.Z,{sx:ea,children:"Agent Status"}),(0,n.jsx)(u.Z,{sx:el,children:(0,n.jsx)(o.Z,{label:m?"Running":"Stopped",size:"small",color:m?"success":"default",variant:"outlined"})})]}),e.uptime&&(0,n.jsxs)(x.Z,{children:[(0,n.jsx)(u.Z,{sx:ea,children:"Uptime"}),(0,n.jsx)(u.Z,{sx:el,children:e.uptime})]})]})})}),e.servers&&e.servers.length>0&&(()=>{let r=e.servers.filter(e=>e.playitDomain),s=e.servers.filter(e=>!e.playitDomain);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(a.Z,{variant:"subtitle2",sx:{mb:1.5,fontWeight:600},children:"Server Domains"}),r.length>0?(0,n.jsx)(l.Z,{sx:{overflowX:"auto"},children:(0,n.jsxs)(c.Z,{size:"small",sx:{mb:s.length>0?2:0},children:[(0,n.jsx)(Y.Z,{children:(0,n.jsxs)(x.Z,{children:[(0,n.jsx)(u.Z,{sx:{fontWeight:600,borderBottom:2,borderColor:"divider"},children:"Server"}),(0,n.jsx)(u.Z,{sx:{fontWeight:600,borderBottom:2,borderColor:"divider"},children:"External Domain"})]})}),(0,n.jsx)(d.Z,{children:r.map(e=>(0,n.jsxs)(x.Z,{children:[(0,n.jsx)(u.Z,{sx:{py:1.5,borderBottom:1,borderColor:"divider"},children:e.serverName}),(0,n.jsx)(u.Z,{sx:{py:1.5,borderBottom:1,borderColor:"divider"},children:(0,n.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center"},children:[(0,n.jsx)(a.Z,{variant:"body2",sx:{wordBreak:"break-all"},children:e.playitDomain}),(0,n.jsx)(eo,{text:e.playitDomain})]})})]},e.serverName))})]})}):(0,n.jsxs)(a.Z,{variant:"body2",color:"text.secondary",sx:{mb:2},children:["No servers with external domains configured. Use ",(0,n.jsx)("code",{children:"mcctl create --playit-domain"})," to register a domain."]}),s.length>0&&(0,n.jsxs)(a.Z,{variant:"body2",color:"text.secondary",children:[s.length," server",s.length>1?"s":""," without external domain: ",s.map(e=>e.serverName).join(", ")]})]})})()]})})}},37228:function(e,r,s){s.d(r,{Bc:function(){return o},N$:function(){return c},UW:function(){return l}});var n=s(5632),t=s(58919),i=s(20367),a=s(42936);function l(){return(0,n.a)({queryKey:["playit-status"],queryFn:()=>(0,a.SC)("/api/playit/status"),refetchInterval:3e4})}function o(){let e=(0,t.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,t.NL)();return(0,i.D)({mutationFn:()=>(0,a.SC)("/api/playit/stop",{method:"POST"}),onSuccess:()=>{e.invalidateQueries({queryKey:["playit-status"]})}})}},6986:function(e,r,s){s.d(r,{Cp:function(){return u},Nq:function(){return x},cg:function(){return l},kP:function(){return d},w7:function(){return o},y1:function(){return c},zB:function(){return h}});var n=s(77054),t=s(61648),i=s(35016);let a=(0,n.X)({baseURL:i.env.NEXT_PUBLIC_BETTER_AUTH_URL||"",plugins:[(0,t.zB)()]}),{signIn:l,signOut:o,signUp:c,useSession:d,updateUser:x,changePassword:u}=a,h=a.admin}}]);
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7965],{57965:function(e,r,s){s.d(r,{eE:function(){return Q},E4:function(){return N},SB:function(){return k},ms:function(){return X},hI:function(){return p},aY:function(){return ec},zd:function(){return U},Ik:function(){return P}});var n=s(94655),t=s(628),i=s(41565),a=s(31317),l=s(7281),o=s(25333),c=s(21138),d=s(84811),x=s(70366),u=s(47001),h=s(59602);let j={fontWeight:500,color:"text.secondary",border:0,width:"40%",py:1},m={border:0,py:1};function p(e){var r;let{router:s}=e,p=(r=s.mode)?r.includes("in-docker")||r.includes("auto-discovery")?{label:"Auto Discovery",color:"info"}:r.includes("mapping")?{label:"Manual Mapping",color:"warning"}:{label:r,color:"default"}:{label:"Unknown",color:"default"};return(0,n.jsx)(t.Z,{children:(0,n.jsxs)(i.Z,{children:[(0,n.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:2},children:[(0,n.jsx)(h.Z,{color:"primary"}),(0,n.jsx)(a.Z,{variant:"h6",component:"h2",children:"Platform Information"})]}),(0,n.jsx)(c.Z,{size:"small",children:(0,n.jsxs)(d.Z,{children:[(0,n.jsxs)(x.Z,{children:[(0,n.jsx)(u.Z,{sx:j,children:"Router Name"}),(0,n.jsx)(u.Z,{sx:m,children:s.name})]}),(0,n.jsxs)(x.Z,{children:[(0,n.jsx)(u.Z,{sx:j,children:"Port"}),(0,n.jsx)(u.Z,{sx:m,children:s.port})]}),(0,n.jsxs)(x.Z,{children:[(0,n.jsx)(u.Z,{sx:j,children:"Mode"}),(0,n.jsx)(u.Z,{sx:m,children:(0,n.jsx)(o.Z,{label:p.label,size:"small",color:p.color,variant:"outlined"})})]}),(0,n.jsxs)(x.Z,{children:[(0,n.jsx)(u.Z,{sx:j,children:"Uptime"}),(0,n.jsx)(u.Z,{sx:m,children:s.uptime||"-"})]})]})})]})})}var Z=s(95511),f=s(66561),g=s(12795),y=s(96407),v=s(29983),b=s(81960);function w(e){switch(e){case"running":return"#4caf50";case"exited":case"dead":case"not_found":case"not_created":return"#f44336";case"created":case"restarting":case"paused":return"#ff9800";default:return"#9e9e9e"}}function S(e){let{status:r}=e;return(0,n.jsx)(Z.Z,{title:r,arrow:!0,children:(0,n.jsx)(l.Z,{sx:{width:10,height:10,borderRadius:"50%",bgcolor:w(r),flexShrink:0,boxShadow:"running"===r?"0 0 6px ".concat(w(r)):"none"}})})}function P(e){let{router:r}=e,s=function(e){let r=new Map;for(let s of e){let e=s.target.replace(/^mc-/,"").replace(/:25565$/,""),n=r.get(e);n?n.hostnames.push(s.hostname):r.set(e,{status:s.serverStatus,hostnames:[s.hostname],serverType:s.serverType,serverVersion:s.serverVersion})}return r}(r.routes);return(0,n.jsx)(t.Z,{sx:{height:"100%"},children:(0,n.jsxs)(i.Z,{children:[(0,n.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:2},children:[(0,n.jsx)(v.Z,{color:"primary"}),(0,n.jsx)(a.Z,{variant:"h6",component:"h2",children:"MC-Router Status"}),(0,n.jsxs)(l.Z,{sx:{ml:"auto",display:"flex",gap:1},children:[(0,n.jsx)(o.Z,{label:r.status,size:"small",color:function(e){switch(e){case"running":return"success";case"exited":case"dead":case"not_found":case"not_created":return"error";case"created":case"restarting":case"paused":return"warning";default:return"default"}}(r.status)}),(0,n.jsx)(o.Z,{label:r.health,size:"small",color:function(e){switch(e){case"healthy":return"success";case"unhealthy":return"error";case"starting":return"warning";default:return"default"}}(r.health),variant:"outlined"})]})]}),(0,n.jsx)(a.Z,{variant:"subtitle2",sx:{mb:1,mt:3},children:"Routing Table"}),0===r.routes.length?(0,n.jsx)(a.Z,{variant:"body2",color:"text.secondary",sx:{py:2,textAlign:"center"},children:"No routes configured"}):(0,n.jsx)(l.Z,{sx:{mt:1},children:Array.from(s.entries()).map(e=>{let[r,{status:s,hostnames:t,serverType:i,serverVersion:o}]=e;return(0,n.jsxs)(f.Z,{defaultExpanded:!0,disableGutters:!0,elevation:0,sx:{border:1,borderColor:"divider","&:not(:last-child)":{borderBottom:0},"&::before":{display:"none"}},children:[(0,n.jsx)(g.Z,{expandIcon:(0,n.jsx)(b.Z,{}),children:(0,n.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",gap:1,width:"100%",pr:1},children:[(0,n.jsx)(S,{status:s}),(0,n.jsx)(a.Z,{variant:"subtitle2",sx:{fontWeight:600},children:r}),(i||o)&&(0,n.jsx)(a.Z,{variant:"caption",color:"text.secondary",children:[i,o].filter(Boolean).join(" ")}),(0,n.jsxs)(a.Z,{variant:"caption",color:"text.secondary",sx:{ml:"auto"},children:[t.length," ",1===t.length?"route":"routes"]})]})}),(0,n.jsx)(y.Z,{sx:{pt:0},children:(0,n.jsx)(l.Z,{sx:{display:"flex",flexDirection:"column",gap:.5},children:t.map(e=>(0,n.jsx)(a.Z,{variant:"body2",sx:{fontSize:"0.85rem",color:"text.secondary"},children:e},e))})})]},r)})})]})})}var C=s(21605);let z={fontWeight:500,color:"text.secondary",border:0,width:"40%",py:1},I={border:0,py:1};function k(e){var r;let{router:s}=e,h=s.routes.filter(e=>"running"===e.serverStatus).length,j=s.routes.length;return(0,n.jsx)(t.Z,{children:(0,n.jsxs)(i.Z,{children:[(0,n.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:2},children:[(0,n.jsx)(C.Z,{color:"primary"}),(0,n.jsx)(a.Z,{variant:"h6",component:"h2",children:"Network Settings"})]}),(0,n.jsx)(l.Z,{sx:{overflowX:"auto"},children:(0,n.jsx)(c.Z,{size:"small",children:(0,n.jsxs)(d.Z,{children:[(0,n.jsxs)(x.Z,{children:[(0,n.jsx)(u.Z,{sx:z,children:"Listening Port"}),(0,n.jsx)(u.Z,{sx:I,children:(0,n.jsx)(o.Z,{label:s.port,size:"small",variant:"outlined"})})]}),(0,n.jsxs)(x.Z,{children:[(0,n.jsx)(u.Z,{sx:z,children:"Routing Mode"}),(0,n.jsx)(u.Z,{sx:I,children:(0,n.jsx)(o.Z,{label:(r=s.mode)?r.includes("in-docker")||r.includes("auto-discovery")?"Auto Discovery":r.includes("mapping")?"Manual Mapping":r:"Unknown",size:"small",color:"info",variant:"outlined"})})]}),(0,n.jsxs)(x.Z,{children:[(0,n.jsx)(u.Z,{sx:z,children:"Total Routes"}),(0,n.jsx)(u.Z,{sx:I,children:j})]}),(0,n.jsxs)(x.Z,{children:[(0,n.jsx)(u.Z,{sx:z,children:"Active Routes"}),(0,n.jsx)(u.Z,{sx:I,children:(0,n.jsx)(o.Z,{label:"".concat(h," / ").concat(j),size:"small",color:h>0?"success":"default",variant:"outlined"})})]})]})})})]})})}var A=s(76544);function N(e){var r;let{avahi:s}=e,c=null!==(r=null==s?void 0:s.status)&&void 0!==r?r:"unknown";return(0,n.jsx)(t.Z,{children:(0,n.jsxs)(i.Z,{children:[(0,n.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:2},children:[(0,n.jsx)(A.Z,{color:"primary"}),(0,n.jsx)(a.Z,{variant:"h6",component:"h2",children:"mDNS (Avahi)"}),(0,n.jsx)(o.Z,{label:c,size:"small",color:"running"===c?"success":c.includes("not running")?"warning":"not installed"===c?"error":"default",sx:{ml:"auto"}})]}),(0,n.jsxs)(a.Z,{variant:"body2",color:"text.secondary",children:["Avahi mDNS daemon enables ",(0,n.jsx)("code",{children:".local"})," hostname resolution for Minecraft servers on the local network."]})]})})}var D=s(35106),T=s(97436),E=s(30417),W=s(93017),B=s(30114),R=s(6986);function U(e){var r;let{onSuccess:s,onError:c}=e,{data:d}=(0,R.kP)(),[x,u]=(0,D.useState)((null==d?void 0:null===(r=d.user)||void 0===r?void 0:r.name)||""),[h,j]=(0,D.useState)(!1),[m,p]=(0,D.useState)(!1),Z=null==d?void 0:d.user;(0,D.useEffect)(()=>{(null==Z?void 0:Z.name)&&!m&&(u(Z.name),p(!0))},[null==Z?void 0:Z.name,m]);let f=x!==((null==Z?void 0:Z.name)||""),g=async()=>{if(f&&x.trim()){j(!0);try{let{error:e}=await (0,R.Nq)({name:x.trim()});e?c(e.message||"Failed to update profile"):s("Profile updated successfully")}catch(e){c("Failed to update profile")}finally{j(!1)}}};return Z?(0,n.jsx)(t.Z,{sx:{height:"100%"},children:(0,n.jsxs)(i.Z,{children:[(0,n.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:3},children:[(0,n.jsx)(B.Z,{color:"primary"}),(0,n.jsx)(a.Z,{variant:"h6",component:"h2",children:"Profile"})]}),(0,n.jsxs)(l.Z,{sx:{display:"flex",flexDirection:"column",gap:2.5},children:[(0,n.jsx)(T.Z,{label:"Name",value:x,onChange:e=>u(e.target.value),fullWidth:!0,size:"small"}),(0,n.jsx)(T.Z,{label:"Email",value:Z.email,fullWidth:!0,size:"small",disabled:!0,helperText:"Email cannot be changed"}),(0,n.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,n.jsx)(a.Z,{variant:"body2",color:"text.secondary",children:"Role:"}),(0,n.jsx)(o.Z,{label:"admin"===Z.role?"Admin":"User",size:"small",color:"admin"===Z.role?"primary":"default",variant:"outlined"})]}),(0,n.jsx)(l.Z,{sx:{display:"flex",justifyContent:"flex-end"},children:(0,n.jsx)(E.Z,{variant:"contained",onClick:g,disabled:!f||!x.trim()||h,startIcon:h?(0,n.jsx)(W.Z,{size:16}):null,children:h?"Saving...":"Save Changes"})})]})]})}):null}var _=s(52082),F=s(79983),M=s(70603),L=s(28058),q=s(42730);function X(e){let{onSuccess:r,onError:s}=e,[o,c]=(0,D.useState)(""),[d,x]=(0,D.useState)(""),[u,h]=(0,D.useState)(""),[j,m]=(0,D.useState)(!1),[p,Z]=(0,D.useState)(!1),[f,g]=(0,D.useState)(!1),[y,v]=(0,D.useState)(!1),[b,w]=(0,D.useState)({}),S=()=>{let e={};return o||(e.currentPassword="Current password is required"),d?d.length<8&&(e.newPassword="Password must be at least ".concat(8," characters")):e.newPassword="New password is required",u?d!==u&&(e.confirmPassword="Passwords do not match"):e.confirmPassword="Please confirm your new password",o&&d&&o===d&&(e.newPassword="New password must be different from current password"),w(e),0===Object.keys(e).length},P=async e=>{if(e.preventDefault(),S()){v(!0);try{let{error:e}=await (0,R.Cp)({currentPassword:o,newPassword:d,revokeOtherSessions:!1});e?s(e.message||"Failed to change password"):(r("Password changed successfully"),c(""),x(""),h(""),w({}))}catch(e){s("Failed to change password")}finally{v(!1)}}},C=(e,r)=>(0,n.jsx)(_.Z,{position:"end",children:(0,n.jsx)(F.Z,{"aria-label":e?"hide password":"show password",onClick:()=>r(!e),edge:"end",size:"small",children:e?(0,n.jsx)(q.Z,{fontSize:"small"}):(0,n.jsx)(L.Z,{fontSize:"small"})})});return(0,n.jsx)(t.Z,{children:(0,n.jsxs)(i.Z,{children:[(0,n.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:3},children:[(0,n.jsx)(M.Z,{color:"primary"}),(0,n.jsx)(a.Z,{variant:"h6",component:"h2",children:"Change Password"})]}),(0,n.jsxs)(l.Z,{component:"form",onSubmit:P,sx:{display:"flex",flexDirection:"column",gap:2.5},children:[(0,n.jsx)(T.Z,{label:"Current Password",type:j?"text":"password",value:o,onChange:e=>{c(e.target.value),b.currentPassword&&w(e=>({...e,currentPassword:""}))},error:!!b.currentPassword,helperText:b.currentPassword,fullWidth:!0,size:"small",autoComplete:"current-password",InputProps:{endAdornment:C(j,m)}}),(0,n.jsx)(T.Z,{label:"New Password",type:p?"text":"password",value:d,onChange:e=>{x(e.target.value),b.newPassword&&w(e=>({...e,newPassword:""}))},error:!!b.newPassword,helperText:b.newPassword||"Minimum ".concat(8," characters"),fullWidth:!0,size:"small",autoComplete:"new-password",InputProps:{endAdornment:C(p,Z)}}),(0,n.jsx)(T.Z,{label:"Confirm New Password",type:f?"text":"password",value:u,onChange:e=>{h(e.target.value),b.confirmPassword&&w(e=>({...e,confirmPassword:""}))},error:!!b.confirmPassword,helperText:b.confirmPassword,fullWidth:!0,size:"small",autoComplete:"new-password",InputProps:{endAdornment:C(f,g)}}),(0,n.jsx)(l.Z,{sx:{display:"flex",justifyContent:"flex-end"},children:(0,n.jsx)(E.Z,{type:"submit",variant:"contained",disabled:y,startIcon:y?(0,n.jsx)(W.Z,{size:16}):null,children:y?"Changing...":"Change Password"})})]})]})})}var O=s(23695);let K={fontWeight:500,color:"text.secondary",border:0,width:"40%",py:1},V={border:0,py:1};function $(e){return e?("string"==typeof e?new Date(e):e).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"}):"-"}function Q(){let{data:e}=(0,R.kP)(),r=null==e?void 0:e.user;return r?(0,n.jsx)(t.Z,{sx:{height:"100%"},children:(0,n.jsxs)(i.Z,{children:[(0,n.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:2},children:[(0,n.jsx)(O.Z,{color:"primary"}),(0,n.jsx)(a.Z,{variant:"h6",component:"h2",children:"Account Information"})]}),(0,n.jsx)(c.Z,{size:"small",children:(0,n.jsxs)(d.Z,{children:[(0,n.jsxs)(x.Z,{children:[(0,n.jsx)(u.Z,{sx:K,children:"Account ID"}),(0,n.jsx)(u.Z,{sx:V,children:(0,n.jsx)(a.Z,{variant:"body2",sx:{fontSize:"0.8rem"},children:r.id})})]}),(0,n.jsxs)(x.Z,{children:[(0,n.jsx)(u.Z,{sx:K,children:"Created"}),(0,n.jsx)(u.Z,{sx:V,children:$(r.createdAt)})]}),(0,n.jsxs)(x.Z,{children:[(0,n.jsx)(u.Z,{sx:K,children:"Last Updated"}),(0,n.jsx)(u.Z,{sx:V,children:$(r.updatedAt)})]})]})})]})}):null}var Y=s(11254),G=s(10721),H=s(81071),J=s(84974),ee=s(5501),er=s(93315),es=s(9078),en=s(10449),et=s(24559),ei=s(37228);let ea={fontWeight:500,color:"text.secondary",border:0,width:"40%",py:1},el={border:0,py:1};function eo(e){let{text:r}=e,[s,t]=(0,D.useState)(!1),i=async()=>{try{await navigator.clipboard.writeText(r),t(!0),setTimeout(()=>t(!1),2e3)}catch(e){console.error("Failed to copy:",e)}};return(0,n.jsx)(F.Z,{size:"small",onClick:i,sx:{ml:1,color:s?"success.main":"text.secondary","&:hover":{bgcolor:"action.hover"}},"aria-label":s?"Copied":"Copy to clipboard",children:s?(0,n.jsx)(et.Z,{sx:{fontSize:16}}):(0,n.jsx)(en.Z,{sx:{fontSize:16}})})}function ec(){let{data:e,isLoading:r,error:s}=(0,ei.UW)(),h=(0,ei.Bc)(),j=(0,ei.N$)();if(s)return(0,n.jsx)(t.Z,{children:(0,n.jsxs)(i.Z,{children:[(0,n.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:2},children:[(0,n.jsx)(J.Z,{color:"primary"}),(0,n.jsx)(a.Z,{variant:"h6",component:"h2",children:"External Access (playit.gg)"})]}),(0,n.jsxs)(H.Z,{severity:"error",children:["Failed to load playit status: ",s.message]})]})});if(r)return(0,n.jsx)(t.Z,{children:(0,n.jsxs)(i.Z,{children:[(0,n.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:2},children:[(0,n.jsx)(G.Z,{variant:"circular",width:24,height:24}),(0,n.jsx)(G.Z,{variant:"text",width:"40%",height:32})]}),(0,n.jsxs)(l.Z,{sx:{display:"flex",justifyContent:"space-between",py:.75},children:[(0,n.jsx)(G.Z,{variant:"text",width:"35%"}),(0,n.jsx)(G.Z,{variant:"text",width:"40%"})]}),(0,n.jsxs)(l.Z,{sx:{display:"flex",justifyContent:"space-between",py:.75},children:[(0,n.jsx)(G.Z,{variant:"text",width:"35%"}),(0,n.jsx)(G.Z,{variant:"text",width:"40%"})]})]})});if(!(null==e?void 0:e.enabled))return(0,n.jsx)(t.Z,{children:(0,n.jsxs)(i.Z,{children:[(0,n.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:2},children:[(0,n.jsx)(J.Z,{color:"primary"}),(0,n.jsx)(a.Z,{variant:"h6",component:"h2",children:"External Access (playit.gg)"})]}),(0,n.jsxs)(H.Z,{severity:"info",children:[(0,n.jsx)(a.Z,{variant:"body2",fontWeight:500,sx:{mb:.5},children:"Not configured"}),(0,n.jsx)(a.Z,{variant:"body2",color:"text.secondary",children:"playit.gg agent is not set up. Configure PLAYIT_SECRET to enable external access."})]})]})});let m=e.agentRunning&&"running"===e.containerStatus,p=h.isPending||j.isPending,Z=h.error||j.error;return(0,n.jsx)(t.Z,{children:(0,n.jsxs)(i.Z,{children:[(0,n.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:1},children:[(0,n.jsx)(J.Z,{color:"primary"}),(0,n.jsx)(a.Z,{variant:"h6",component:"h2",children:"External Access (playit.gg)"})]}),Z&&(0,n.jsx)(H.Z,{severity:"error",sx:{mb:2},children:Z.message||"Action failed"}),(0,n.jsxs)(l.Z,{sx:{display:"flex",gap:1,mb:2,flexWrap:"wrap"},children:[m?(0,n.jsx)(E.Z,{variant:"outlined",size:"small",color:"error",startIcon:p?(0,n.jsx)(W.Z,{size:16}):(0,n.jsx)(er.Z,{}),onClick:()=>{j.mutate()},disabled:p,sx:{fontSize:12},children:p?"Stopping...":"Stop Agent"}):(0,n.jsx)(E.Z,{variant:"contained",size:"small",color:"success",startIcon:p?(0,n.jsx)(W.Z,{size:16,color:"inherit"}):(0,n.jsx)(ee.Z,{}),onClick:()=>{h.mutate()},disabled:p,sx:{fontSize:12},children:p?"Starting...":"Start Agent"}),(0,n.jsx)(E.Z,{component:"a",href:"https://playit.gg/account/tunnels",target:"_blank",rel:"noopener noreferrer",size:"small",startIcon:(0,n.jsx)(es.Z,{}),sx:{fontSize:12},children:"View Dashboard"})]}),(0,n.jsx)(l.Z,{sx:{overflowX:"auto"},children:(0,n.jsx)(c.Z,{size:"small",sx:{mb:3},children:(0,n.jsxs)(d.Z,{children:[(0,n.jsxs)(x.Z,{children:[(0,n.jsx)(u.Z,{sx:ea,children:"Agent Status"}),(0,n.jsx)(u.Z,{sx:el,children:(0,n.jsx)(o.Z,{label:m?"Running":"Stopped",size:"small",color:m?"success":"default",variant:"outlined"})})]}),e.uptime&&(0,n.jsxs)(x.Z,{children:[(0,n.jsx)(u.Z,{sx:ea,children:"Uptime"}),(0,n.jsx)(u.Z,{sx:el,children:e.uptime})]})]})})}),e.servers&&e.servers.length>0&&(()=>{let r=e.servers.filter(e=>e.playitDomain),s=e.servers.filter(e=>!e.playitDomain);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(a.Z,{variant:"subtitle2",sx:{mb:1.5,fontWeight:600},children:"Server Domains"}),r.length>0?(0,n.jsx)(l.Z,{sx:{overflowX:"auto"},children:(0,n.jsxs)(c.Z,{size:"small",sx:{mb:s.length>0?2:0},children:[(0,n.jsx)(Y.Z,{children:(0,n.jsxs)(x.Z,{children:[(0,n.jsx)(u.Z,{sx:{fontWeight:600,borderBottom:2,borderColor:"divider"},children:"Server"}),(0,n.jsx)(u.Z,{sx:{fontWeight:600,borderBottom:2,borderColor:"divider"},children:"External Domain"})]})}),(0,n.jsx)(d.Z,{children:r.map(e=>(0,n.jsxs)(x.Z,{children:[(0,n.jsx)(u.Z,{sx:{py:1.5,borderBottom:1,borderColor:"divider"},children:e.serverName}),(0,n.jsx)(u.Z,{sx:{py:1.5,borderBottom:1,borderColor:"divider"},children:(0,n.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center"},children:[(0,n.jsx)(a.Z,{variant:"body2",sx:{wordBreak:"break-all"},children:e.playitDomain}),(0,n.jsx)(eo,{text:e.playitDomain})]})})]},e.serverName))})]})}):(0,n.jsxs)(a.Z,{variant:"body2",color:"text.secondary",sx:{mb:2},children:["No servers with external domains configured. Use ",(0,n.jsx)("code",{children:"mcctl create --playit-domain"})," to register a domain."]}),s.length>0&&(0,n.jsxs)(a.Z,{variant:"body2",color:"text.secondary",children:[s.length," server",s.length>1?"s":""," without external domain: ",s.map(e=>e.serverName).join(", ")]})]})})()]})})}},37228:function(e,r,s){s.d(r,{Bc:function(){return o},N$:function(){return c},UW:function(){return l}});var n=s(98324),t=s(58919),i=s(20367),a=s(42936);function l(){return(0,n.a)({queryKey:["playit-status"],queryFn:()=>(0,a.SC)("/api/playit/status"),refetchInterval:3e4})}function o(){let e=(0,t.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,t.NL)();return(0,i.D)({mutationFn:()=>(0,a.SC)("/api/playit/stop",{method:"POST"}),onSuccess:()=>{e.invalidateQueries({queryKey:["playit-status"]})}})}},6986:function(e,r,s){s.d(r,{Cp:function(){return u},Nq:function(){return x},cg:function(){return l},kP:function(){return d},w7:function(){return o},y1:function(){return c},zB:function(){return h}});var n=s(77054),t=s(61648),i=s(35016);let a=(0,n.X)({baseURL:i.env.NEXT_PUBLIC_BETTER_AUTH_URL||"",plugins:[(0,t.zB)()]}),{signIn:l,signOut:o,signUp:c,useSession:d,updateUser:x,changePassword:u}=a,h=a.admin}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8175],{66758:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return n.createSvgIcon}});var n=r(26505)},69123:function(e,t,r){var n=r(32324),i=r(81500),o=r(35106),a=r(70316),l=r(65951),u=r(64577),s=r(34519),c=r(28057),f=r(16945),d=r(94655);let h=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],p=e=>{let{absolute:t,children:r,classes:n,flexItem:i,light:o,orientation:a,textAlign:u,variant:s}=e;return(0,l.Z)({root:["root",t&&"absolute",s,o&&"light","vertical"===a&&"vertical",i&&"flexItem",r&&"withChildren",r&&"vertical"===a&&"withChildrenVertical","right"===u&&"vertical"!==a&&"textAlignRight","left"===u&&"vertical"!==a&&"textAlignLeft"],wrapper:["wrapper","vertical"===a&&"wrapperVertical"]},f.V,n)},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,i.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,u.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,i.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,i.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,i.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,i.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%"}})}),m=(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,i.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,c.i)({props:e,name:"MuiDivider"}),{absolute:o=!1,children:l,className:u,component:s=l?"div":"hr",flexItem:f=!1,light:g=!1,orientation:Z="horizontal",role:y="hr"!==s?"separator":void 0,textAlign:b="center",variant:w="fullWidth"}=r,S=(0,n.Z)(r,h),x=(0,i.Z)({},r,{absolute:o,component:s,flexItem:f,light:g,orientation:Z,role:y,textAlign:b,variant:w}),A=p(x);return(0,d.jsx)(v,(0,i.Z)({as:s,className:(0,a.Z)(A.root,u),role:y,ref:t,ownerState:x},S,{children:l?(0,d.jsx)(m,{className:A.wrapper,ownerState:x,children:l}):null}))});g.muiSkipListHighlight=!0,t.Z=g},16945:function(e,t,r){r.d(t,{V:function(){return o}});var n=r(11379),i=r(9049);function o(e){return(0,i.ZP)("MuiDivider",e)}let a=(0,n.Z)("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]);t.Z=a},27350:function(e,t,r){var n=r(34834);t.Z=n.Z},26505:function(e,t,r){r.r(t),r.d(t,{capitalize:function(){return i.Z},createChainedFunction:function(){return o.Z},createSvgIcon:function(){return a.Z},debounce:function(){return l.Z},deprecatedPropType:function(){return u},isMuiElement:function(){return s.Z},ownerDocument:function(){return c.Z},ownerWindow:function(){return f.Z},requirePropFactory:function(){return d},setRef:function(){return h},unstable_ClassNameGenerator:function(){return w},unstable_useEnhancedEffect:function(){return p.Z},unstable_useId:function(){return v.Z},unsupportedProp:function(){return m},useControlled:function(){return g.Z},useEventCallback:function(){return Z.Z},useForkRef:function(){return y.Z},useIsFocusVisible:function(){return b.Z}});var n=r(74055),i=r(38762),o=r(27350),a=r(61626),l=r(19521),u=function(e,t){return()=>null},s=r(9290),c=r(34713),f=r(99466);r(81500);var d=function(e,t){return()=>null},h=r(25880).Z,p=r(65425),v=r(88207),m=function(e,t,r,n,i){return null},g=r(18280),Z=r(10620),y=r(38481),b=r(22125);let w={configure:e=>{n.Z.configure(e)}}},88207:function(e,t,r){var n=r(40552);t.Z=n.Z},48442:function(e,t,r){r.d(t,{Z:function(){return Z}});var n=r(81500),i=r(32324),o=r(14526),a=r(41499),l=r(8557),u=r(72686);let s=["ownerState"],c=["variants"],f=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function d(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}function h(e,t){return t&&e&&"object"==typeof e&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}let p=(0,l.Z)(),v=e=>e?e.charAt(0).toLowerCase()+e.slice(1):e;function m({defaultTheme:e,theme:t,themeId:r}){return 0===Object.keys(t).length?e:t[r]||t}function g(e,t,r){let{ownerState:a}=t,l=(0,i.Z)(t,s),u="function"==typeof e?e((0,n.Z)({ownerState:a},l)):e;if(Array.isArray(u))return u.flatMap(e=>g(e,(0,n.Z)({ownerState:a},l),r));if(u&&"object"==typeof u&&Array.isArray(u.variants)){let{variants:e=[]}=u,t=(0,i.Z)(u,c);return e.forEach(e=>{let i=!0;if("function"==typeof e.props?i=e.props((0,n.Z)({ownerState:a},l,a)):Object.keys(e.props).forEach(t=>{(null==a?void 0:a[t])!==e.props[t]&&l[t]!==e.props[t]&&(i=!1)}),i){Array.isArray(t)||(t=[t]);let i="function"==typeof e.style?e.style((0,n.Z)({ownerState:a},l,a)):e.style;t.push(r?h((0,o.internal_serializeStyles)(i),r):i)}}),t}return r?h((0,o.internal_serializeStyles)(u),r):u}var Z=function(e={}){let{themeId:t,defaultTheme:r=p,rootShouldForwardProp:l=d,slotShouldForwardProp:s=d}=e,c=e=>(0,u.Z)((0,n.Z)({},e,{theme:m((0,n.Z)({},e,{defaultTheme:r,themeId:t}))}));return c.__mui_systemSx=!0,(e,u={})=>{var h;let p;(0,o.internal_processStyles)(e,e=>e.filter(e=>!(null!=e&&e.__mui_systemSx)));let{name:Z,slot:y,skipVariantsResolver:b,skipSx:w,overridesResolver:S=(h=v(y))?(e,t)=>t[h]:null}=u,x=(0,i.Z)(u,f),A=Z&&Z.startsWith("Mui")||y?"components":"custom",C=void 0!==b?b:y&&"Root"!==y&&"root"!==y||!1,P=w||!1,_=d;"Root"===y||"root"===y?_=l:y?_=s:"string"==typeof e&&e.charCodeAt(0)>96&&(_=void 0);let R=(0,o.default)(e,(0,n.Z)({shouldForwardProp:_,label:p},x)),L=e=>"function"==typeof e&&e.__emotion_real!==e||(0,a.P)(e)?i=>{let o=m({theme:i.theme,defaultTheme:r,themeId:t});return g(e,(0,n.Z)({},i,{theme:o}),o.modularCssLayers?A:void 0)}:e,k=(i,...o)=>{let a=L(i),l=o?o.map(L):[];Z&&S&&l.push(e=>{let i=m((0,n.Z)({},e,{defaultTheme:r,themeId:t}));if(!i.components||!i.components[Z]||!i.components[Z].styleOverrides)return null;let o=i.components[Z].styleOverrides,a={};return Object.entries(o).forEach(([t,r])=>{a[t]=g(r,(0,n.Z)({},e,{theme:i}),i.modularCssLayers?"theme":void 0)}),S(e,a)}),Z&&!C&&l.push(e=>{var i;let o=m((0,n.Z)({},e,{defaultTheme:r,themeId:t}));return g({variants:null==o||null==(i=o.components)||null==(i=i[Z])?void 0:i.variants},(0,n.Z)({},e,{theme:o}),o.modularCssLayers?"theme":void 0)}),P||l.push(c);let u=l.length-o.length;if(Array.isArray(i)&&u>0){let e=Array(u).fill("");(a=[...i,...e]).raw=[...i.raw,...e]}let s=R(a,...l);return e.muiName&&(s.muiName=e.muiName),s};return R.withConfig&&(k.withConfig=R.withConfig),k}}()},13864:function(e,t,r){r.d(t,{Z:function(){return i}});var n=r(71483);function i(e){let{theme:t,name:r,props:i}=e;return t&&t.components&&t.components[r]&&t.components[r].defaultProps?(0,n.Z)(t.components[r].defaultProps,i):i}},14189:function(e,t,r){r.d(t,{Z:function(){return o}});var n=r(13864),i=r(32730);function o(e){let{props:t,name:r,defaultTheme:o,themeId:a}=e,l=(0,i.Z)(o);return a&&(l=l[a]||l),(0,n.Z)({theme:l,name:r,props:t})}},66107:function(e,t,r){r.d(t,{Z:function(){return i}});var n=r(35106);function i(e){return n.Children.toArray(e).filter(e=>n.isValidElement(e))}},74228:function(e,t,r){var n=r(73310);r.o(n,"useParams")&&r.d(t,{useParams:function(){return n.useParams}}),r.o(n,"usePathname")&&r.d(t,{usePathname:function(){return n.usePathname}}),r.o(n,"useRouter")&&r.d(t,{useRouter:function(){return n.useRouter}}),r.o(n,"useSearchParams")&&r.d(t,{useSearchParams:function(){return n.useSearchParams}}),r.o(n,"useServerInsertedHTML")&&r.d(t,{useServerInsertedHTML:function(){return n.useServerInsertedHTML}})}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9986],{66758:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return s.createSvgIcon}});var s=r(26505)},27350:function(e,t,r){var s=r(34834);t.Z=s.Z},26505:function(e,t,r){r.r(t),r.d(t,{capitalize:function(){return i.Z},createChainedFunction:function(){return n.Z},createSvgIcon:function(){return u.Z},debounce:function(){return a.Z},deprecatedPropType:function(){return c},isMuiElement:function(){return o.Z},ownerDocument:function(){return h.Z},ownerWindow:function(){return l.Z},requirePropFactory:function(){return d},setRef:function(){return f},unstable_ClassNameGenerator:function(){return g},unstable_useEnhancedEffect:function(){return p.Z},unstable_useId:function(){return y.Z},unsupportedProp:function(){return R},useControlled:function(){return v.Z},useEventCallback:function(){return b.Z},useForkRef:function(){return m.Z},useIsFocusVisible:function(){return Q.Z}});var s=r(74055),i=r(38762),n=r(27350),u=r(61626),a=r(19521),c=function(e,t){return()=>null},o=r(9290),h=r(34713),l=r(99466);r(81500);var d=function(e,t){return()=>null},f=r(25880).Z,p=r(65425),y=r(88207),R=function(e,t,r,s,i){return null},v=r(18280),b=r(10620),m=r(38481),Q=r(22125);let g={configure:e=>{s.Z.configure(e)}}},88207:function(e,t,r){var s=r(40552);t.Z=s.Z},68278:function(e,t,r){r.d(t,{z:function(){return h}});var s=r(94379),i=r(11430),n=r(49644),u=r(12835),a=r(81240),c=r(80375),o=r(29669),h=class extends u.l{constructor(e,t){super(),this.options=t,this.#e=e,this.#t=null,this.#r=(0,a.O)(),this.bindMethods(),this.setOptions(t)}#e;#s=void 0;#i=void 0;#n=void 0;#u;#a;#r;#t;#c;#o;#h;#l;#d;#f;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#s.addObserver(this),l(this.#s,this.options)?this.#y():this.updateResult(),this.#R())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return d(this.#s,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return d(this.#s,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#v(),this.#b(),this.#s.removeObserver(this)}setOptions(e){let t=this.options,r=this.#s;if(this.options=this.#e.defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof(0,c.Nc)(this.options.enabled,this.#s))throw Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#m(),this.#s.setOptions(this.options),t._defaulted&&!(0,c.VS)(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#s,observer:this});let s=this.hasListeners();s&&f(this.#s,r,this.options,t)&&this.#y(),this.updateResult(),s&&(this.#s!==r||(0,c.Nc)(this.options.enabled,this.#s)!==(0,c.Nc)(t.enabled,this.#s)||(0,c.KC)(this.options.staleTime,this.#s)!==(0,c.KC)(t.staleTime,this.#s))&&this.#Q();let i=this.#g();s&&(this.#s!==r||(0,c.Nc)(this.options.enabled,this.#s)!==(0,c.Nc)(t.enabled,this.#s)||i!==this.#f)&&this.#I(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),r=this.createResult(t,e);return(0,c.VS)(this.getCurrentResult(),r)||(this.#n=r,this.#a=this.options,this.#u=this.#s.state),r}getCurrentResult(){return this.#n}trackResult(e,t){return new Proxy(e,{get:(e,r)=>(this.trackProp(r),t?.(r),"promise"!==r||(this.trackProp("data"),this.options.experimental_prefetchInRender||"pending"!==this.#r.status||this.#r.reject(Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(e,r))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#s}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),r=this.#e.getQueryCache().build(this.#e,t);return r.fetch().then(()=>this.createResult(r,t))}fetch(e){return this.#y({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#n))}#y(e){this.#m();let t=this.#s.fetch(this.options,e);return e?.throwOnError||(t=t.catch(c.ZT)),t}#Q(){this.#v();let e=(0,c.KC)(this.options.staleTime,this.#s);if(c.sk||this.#n.isStale||!(0,c.PN)(e))return;let t=(0,c.Kp)(this.#n.dataUpdatedAt,e);this.#l=o.mr.setTimeout(()=>{this.#n.isStale||this.updateResult()},t+1)}#g(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#s):this.options.refetchInterval)??!1}#I(e){this.#b(),this.#f=e,!c.sk&&!1!==(0,c.Nc)(this.options.enabled,this.#s)&&(0,c.PN)(this.#f)&&0!==this.#f&&(this.#d=o.mr.setInterval(()=>{(this.options.refetchIntervalInBackground||s.j.isFocused())&&this.#y()},this.#f))}#R(){this.#Q(),this.#I(this.#g())}#v(){this.#l&&(o.mr.clearTimeout(this.#l),this.#l=void 0)}#b(){this.#d&&(o.mr.clearInterval(this.#d),this.#d=void 0)}createResult(e,t){let r;let s=this.#s,i=this.options,u=this.#n,o=this.#u,h=this.#a,d=e!==s?e.state:this.#i,{state:y}=e,R={...y},v=!1;if(t._optimisticResults){let r=this.hasListeners(),u=!r&&l(e,t),a=r&&f(e,s,t,i);(u||a)&&(R={...R,...(0,n.z)(y.data,e.options)}),"isRestoring"===t._optimisticResults&&(R.fetchStatus="idle")}let{error:b,errorUpdatedAt:m,status:Q}=R;r=R.data;let g=!1;if(void 0!==t.placeholderData&&void 0===r&&"pending"===Q){let e;u?.isPlaceholderData&&t.placeholderData===h?.placeholderData?(e=u.data,g=!0):e="function"==typeof t.placeholderData?t.placeholderData(this.#h?.state.data,this.#h):t.placeholderData,void 0!==e&&(Q="success",r=(0,c.oE)(u?.data,e,t),v=!0)}if(t.select&&void 0!==r&&!g){if(u&&r===o?.data&&t.select===this.#c)r=this.#o;else try{this.#c=t.select,r=t.select(r),r=(0,c.oE)(u?.data,r,t),this.#o=r,this.#t=null}catch(e){this.#t=e}}this.#t&&(b=this.#t,r=this.#o,m=Date.now(),Q="error");let I="fetching"===R.fetchStatus,O="pending"===Q,C="error"===Q,T=O&&I,S=void 0!==r,E={status:Q,fetchStatus:R.fetchStatus,isPending:O,isSuccess:"success"===Q,isError:C,isInitialLoading:T,isLoading:T,data:r,dataUpdatedAt:R.dataUpdatedAt,error:b,errorUpdatedAt:m,failureCount:R.fetchFailureCount,failureReason:R.fetchFailureReason,errorUpdateCount:R.errorUpdateCount,isFetched:R.dataUpdateCount>0||R.errorUpdateCount>0,isFetchedAfterMount:R.dataUpdateCount>d.dataUpdateCount||R.errorUpdateCount>d.errorUpdateCount,isFetching:I,isRefetching:I&&!O,isLoadingError:C&&!S,isPaused:"paused"===R.fetchStatus,isPlaceholderData:v,isRefetchError:C&&S,isStale:p(e,t),refetch:this.refetch,promise:this.#r,isEnabled:!1!==(0,c.Nc)(t.enabled,e)};if(this.options.experimental_prefetchInRender){let t=void 0!==E.data,r="error"===E.status&&!t,i=e=>{r?e.reject(E.error):t&&e.resolve(E.data)},n=()=>{i(this.#r=E.promise=(0,a.O)())},u=this.#r;switch(u.status){case"pending":e.queryHash===s.queryHash&&i(u);break;case"fulfilled":(r||E.data!==u.value)&&n();break;case"rejected":r&&E.error===u.reason||n()}}return E}updateResult(){let e=this.#n,t=this.createResult(this.#s,this.options);this.#u=this.#s.state,this.#a=this.options,void 0!==this.#u.data&&(this.#h=this.#s),(0,c.VS)(t,e)||(this.#n=t,this.#O({listeners:(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,r="function"==typeof t?t():t;if("all"===r||!r&&!this.#p.size)return!0;let s=new Set(r??this.#p);return this.options.throwOnError&&s.add("error"),Object.keys(this.#n).some(t=>this.#n[t]!==e[t]&&s.has(t))})()}))}#m(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#s)return;let t=this.#s;this.#s=e,this.#i=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#R()}#O(e){i.Vr.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#n)}),this.#e.getQueryCache().notify({query:this.#s,type:"observerResultsUpdated"})})}};function l(e,t){return!1!==(0,c.Nc)(t.enabled,e)&&void 0===e.state.data&&!("error"===e.state.status&&!1===t.retryOnMount)||void 0!==e.state.data&&d(e,t,t.refetchOnMount)}function d(e,t,r){if(!1!==(0,c.Nc)(t.enabled,e)&&"static"!==(0,c.KC)(t.staleTime,e)){let s="function"==typeof r?r(e):r;return"always"===s||!1!==s&&p(e,t)}return!1}function f(e,t,r,s){return(e!==t||!1===(0,c.Nc)(s.enabled,e))&&(!r.suspense||"error"!==e.state.status)&&p(e,r)}function p(e,t){return!1!==(0,c.Nc)(t.enabled,e)&&e.isStaleByTime((0,c.KC)(t.staleTime,e))}},76221:function(e,t,r){let s;r.d(t,{r:function(){return m}});var i=r(35106),n=r(11430),u=r(80375),a=r(58919);r(94655);var c=i.createContext((s=!1,{clearReset:()=>{s=!1},reset:()=>{s=!0},isReset:()=>s})),o=()=>i.useContext(c),h=(e,t,r)=>{let s=(null==r?void 0:r.state.error)&&"function"==typeof e.throwOnError?(0,u.L3)(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||s)&&!t.isReset()&&(e.retryOnMount=!1)},l=e=>{i.useEffect(()=>{e.clearReset()},[e])},d=e=>{let{result:t,errorResetBoundary:r,throwOnError:s,query:i,suspense:n}=e;return t.isError&&!r.isReset()&&!t.isFetching&&i&&(n&&void 0===t.data||(0,u.L3)(s,[t.error,i]))},f=i.createContext(!1),p=()=>i.useContext(f);f.Provider;var y=e=>{if(e.suspense){let t=e=>"static"===e?e:Math.max(e??1e3,1e3),r=e.staleTime;e.staleTime="function"==typeof r?(...e)=>t(r(...e)):t(r),"number"==typeof e.gcTime&&(e.gcTime=Math.max(e.gcTime,1e3))}},R=(e,t)=>e.isLoading&&e.isFetching&&!t,v=(e,t)=>e?.suspense&&t.isPending,b=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function m(e,t,r){var s,c,f,m;let Q=p(),g=o(),I=(0,a.NL)(r),O=I.defaultQueryOptions(e);null===(c=I.getDefaultOptions().queries)||void 0===c||null===(s=c._experimental_beforeQuery)||void 0===s||s.call(c,O);let C=I.getQueryCache().get(O.queryHash);O._optimisticResults=Q?"isRestoring":"optimistic",y(O),h(O,g,C),l(g);let T=!I.getQueryCache().get(O.queryHash),[S]=i.useState(()=>new t(I,O)),E=S.getOptimisticResult(O),w=!Q&&!1!==e.subscribed;if(i.useSyncExternalStore(i.useCallback(e=>{let t=w?S.subscribe(n.Vr.batchCalls(e)):u.ZT;return S.updateResult(),t},[S,w]),()=>S.getCurrentResult(),()=>S.getCurrentResult()),i.useEffect(()=>{S.setOptions(O)},[O,S]),v(O,E))throw b(O,S,g);if(d({result:E,errorResetBoundary:g,throwOnError:O.throwOnError,query:C,suspense:O.suspense}))throw E.error;if(null===(m=I.getDefaultOptions().queries)||void 0===m||null===(f=m._experimental_afterQuery)||void 0===f||f.call(m,O,E),O.experimental_prefetchInRender&&!u.sk&&R(E,Q)){let e=T?b(O,S,g):null==C?void 0:C.promise;null==e||e.catch(u.ZT).finally(()=>{S.updateResult()})}return O.notifyOnChangeProps?E:S.trackResult(E)}},98324:function(e,t,r){r.d(t,{a:function(){return n}});var s=r(68278),i=r(76221);function n(e,t){return(0,i.r)(e,s.z,t)}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5931],{66289:function(e,t,r){Promise.resolve().then(r.bind(r,12256))},71185:function(e,t,r){"use strict";var i=r(8091);t.Z=void 0;var n=i(r(66758)),l=r(94655);t.Z=(0,n.default)((0,l.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close")},69123:function(e,t,r){"use strict";var i=r(32324),n=r(81500),l=r(35106),a=r(70316),o=r(65951),s=r(64577),c=r(34519),d=r(28057),h=r(16945),u=r(94655);let x=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],m=e=>{let{absolute:t,children:r,classes:i,flexItem:n,light:l,orientation:a,textAlign:s,variant:c}=e;return(0,o.Z)({root:["root",t&&"absolute",c,l&&"light","vertical"===a&&"vertical",n&&"flexItem",r&&"withChildren",r&&"vertical"===a&&"withChildrenVertical","right"===s&&"vertical"!==a&&"textAlignRight","left"===s&&"vertical"!==a&&"textAlignLeft"],wrapper:["wrapper","vertical"===a&&"wrapperVertical"]},h.V,i)},v=(0,c.ZP)("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,r.absolute&&t.absolute,t[r.variant],r.light&&t.light,"vertical"===r.orientation&&t.vertical,r.flexItem&&t.flexItem,r.children&&t.withChildren,r.children&&"vertical"===r.orientation&&t.withChildrenVertical,"right"===r.textAlign&&"vertical"!==r.orientation&&t.textAlignRight,"left"===r.textAlign&&"vertical"!==r.orientation&&t.textAlignLeft]}})(e=>{let{theme:t,ownerState:r}=e;return(0,n.Z)({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(t.vars||t).palette.divider,borderBottomWidth:"thin"},r.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},r.light&&{borderColor:t.vars?"rgba(".concat(t.vars.palette.dividerChannel," / 0.08)"):(0,s.Fq)(t.palette.divider,.08)},"inset"===r.variant&&{marginLeft:72},"middle"===r.variant&&"horizontal"===r.orientation&&{marginLeft:t.spacing(2),marginRight:t.spacing(2)},"middle"===r.variant&&"vertical"===r.orientation&&{marginTop:t.spacing(1),marginBottom:t.spacing(1)},"vertical"===r.orientation&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},r.flexItem&&{alignSelf:"stretch",height:"auto"})},e=>{let{ownerState:t}=e;return(0,n.Z)({},t.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}})},e=>{let{theme:t,ownerState:r}=e;return(0,n.Z)({},r.children&&"vertical"!==r.orientation&&{"&::before, &::after":{width:"100%",borderTop:"thin solid ".concat((t.vars||t).palette.divider),borderTopStyle:"inherit"}})},e=>{let{theme:t,ownerState:r}=e;return(0,n.Z)({},r.children&&"vertical"===r.orientation&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:"thin solid ".concat((t.vars||t).palette.divider),borderLeftStyle:"inherit"}})},e=>{let{ownerState:t}=e;return(0,n.Z)({},"right"===t.textAlign&&"vertical"!==t.orientation&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},"left"===t.textAlign&&"vertical"!==t.orientation&&{"&::before":{width:"10%"},"&::after":{width:"90%"}})}),Z=(0,c.ZP)("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.wrapper,"vertical"===r.orientation&&t.wrapperVertical]}})(e=>{let{theme:t,ownerState:r}=e;return(0,n.Z)({display:"inline-block",paddingLeft:"calc(".concat(t.spacing(1)," * 1.2)"),paddingRight:"calc(".concat(t.spacing(1)," * 1.2)")},"vertical"===r.orientation&&{paddingTop:"calc(".concat(t.spacing(1)," * 1.2)"),paddingBottom:"calc(".concat(t.spacing(1)," * 1.2)")})}),p=l.forwardRef(function(e,t){let r=(0,d.i)({props:e,name:"MuiDivider"}),{absolute:l=!1,children:o,className:s,component:c=o?"div":"hr",flexItem:h=!1,light:p=!1,orientation:f="horizontal",role:g="hr"!==c?"separator":void 0,textAlign:j="center",variant:b="fullWidth"}=r,y=(0,i.Z)(r,x),w=(0,n.Z)({},r,{absolute:l,component:c,flexItem:h,light:p,orientation:f,role:g,textAlign:j,variant:b}),C=m(w);return(0,u.jsx)(v,(0,n.Z)({as:c,className:(0,a.Z)(C.root,s),role:g,ref:t,ownerState:w},y,{children:o?(0,u.jsx)(Z,{className:C.wrapper,ownerState:w,children:o}):null}))});p.muiSkipListHighlight=!0,t.Z=p},53281:function(e,t,r){"use strict";r.d(t,{Z:function(){return p}});var i=r(81500),n=r(32324),l=r(35106),a=r(70316),o=r(65951),s=r(28057),c=r(34519),d=r(11379),h=r(9049);function u(e){return(0,h.ZP)("MuiTableContainer",e)}(0,d.Z)("MuiTableContainer",["root"]);var x=r(94655);let m=["className","component"],v=e=>{let{classes:t}=e;return(0,o.Z)({root:["root"]},u,t)},Z=(0,c.ZP)("div",{name:"MuiTableContainer",slot:"Root",overridesResolver:(e,t)=>t.root})({width:"100%",overflowX:"auto"});var p=l.forwardRef(function(e,t){let r=(0,s.i)({props:e,name:"MuiTableContainer"}),{className:l,component:o="div"}=r,c=(0,n.Z)(r,m),d=(0,i.Z)({},r,{component:o}),h=v(d);return(0,x.jsx)(Z,(0,i.Z)({ref:t,as:o,className:(0,a.Z)(h.root,l),ownerState:d},c))})},12256:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return R}});var i=r(94655),n=r(35106),l=r(7281),a=r(93017),o=r(81071),s=r(31317),c=r(
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5931],{66289:function(e,t,r){Promise.resolve().then(r.bind(r,12256))},71185:function(e,t,r){"use strict";var i=r(8091);t.Z=void 0;var n=i(r(66758)),l=r(94655);t.Z=(0,n.default)((0,l.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close")},69123:function(e,t,r){"use strict";var i=r(32324),n=r(81500),l=r(35106),a=r(70316),o=r(65951),s=r(64577),c=r(34519),d=r(28057),h=r(16945),u=r(94655);let x=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],m=e=>{let{absolute:t,children:r,classes:i,flexItem:n,light:l,orientation:a,textAlign:s,variant:c}=e;return(0,o.Z)({root:["root",t&&"absolute",c,l&&"light","vertical"===a&&"vertical",n&&"flexItem",r&&"withChildren",r&&"vertical"===a&&"withChildrenVertical","right"===s&&"vertical"!==a&&"textAlignRight","left"===s&&"vertical"!==a&&"textAlignLeft"],wrapper:["wrapper","vertical"===a&&"wrapperVertical"]},h.V,i)},v=(0,c.ZP)("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,r.absolute&&t.absolute,t[r.variant],r.light&&t.light,"vertical"===r.orientation&&t.vertical,r.flexItem&&t.flexItem,r.children&&t.withChildren,r.children&&"vertical"===r.orientation&&t.withChildrenVertical,"right"===r.textAlign&&"vertical"!==r.orientation&&t.textAlignRight,"left"===r.textAlign&&"vertical"!==r.orientation&&t.textAlignLeft]}})(e=>{let{theme:t,ownerState:r}=e;return(0,n.Z)({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(t.vars||t).palette.divider,borderBottomWidth:"thin"},r.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},r.light&&{borderColor:t.vars?"rgba(".concat(t.vars.palette.dividerChannel," / 0.08)"):(0,s.Fq)(t.palette.divider,.08)},"inset"===r.variant&&{marginLeft:72},"middle"===r.variant&&"horizontal"===r.orientation&&{marginLeft:t.spacing(2),marginRight:t.spacing(2)},"middle"===r.variant&&"vertical"===r.orientation&&{marginTop:t.spacing(1),marginBottom:t.spacing(1)},"vertical"===r.orientation&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},r.flexItem&&{alignSelf:"stretch",height:"auto"})},e=>{let{ownerState:t}=e;return(0,n.Z)({},t.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}})},e=>{let{theme:t,ownerState:r}=e;return(0,n.Z)({},r.children&&"vertical"!==r.orientation&&{"&::before, &::after":{width:"100%",borderTop:"thin solid ".concat((t.vars||t).palette.divider),borderTopStyle:"inherit"}})},e=>{let{theme:t,ownerState:r}=e;return(0,n.Z)({},r.children&&"vertical"===r.orientation&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:"thin solid ".concat((t.vars||t).palette.divider),borderLeftStyle:"inherit"}})},e=>{let{ownerState:t}=e;return(0,n.Z)({},"right"===t.textAlign&&"vertical"!==t.orientation&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},"left"===t.textAlign&&"vertical"!==t.orientation&&{"&::before":{width:"10%"},"&::after":{width:"90%"}})}),Z=(0,c.ZP)("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.wrapper,"vertical"===r.orientation&&t.wrapperVertical]}})(e=>{let{theme:t,ownerState:r}=e;return(0,n.Z)({display:"inline-block",paddingLeft:"calc(".concat(t.spacing(1)," * 1.2)"),paddingRight:"calc(".concat(t.spacing(1)," * 1.2)")},"vertical"===r.orientation&&{paddingTop:"calc(".concat(t.spacing(1)," * 1.2)"),paddingBottom:"calc(".concat(t.spacing(1)," * 1.2)")})}),p=l.forwardRef(function(e,t){let r=(0,d.i)({props:e,name:"MuiDivider"}),{absolute:l=!1,children:o,className:s,component:c=o?"div":"hr",flexItem:h=!1,light:p=!1,orientation:f="horizontal",role:g="hr"!==c?"separator":void 0,textAlign:j="center",variant:b="fullWidth"}=r,y=(0,i.Z)(r,x),w=(0,n.Z)({},r,{absolute:l,component:c,flexItem:h,light:p,orientation:f,role:g,textAlign:j,variant:b}),C=m(w);return(0,u.jsx)(v,(0,n.Z)({as:c,className:(0,a.Z)(C.root,s),role:g,ref:t,ownerState:w},y,{children:o?(0,u.jsx)(Z,{className:C.wrapper,ownerState:w,children:o}):null}))});p.muiSkipListHighlight=!0,t.Z=p},53281:function(e,t,r){"use strict";r.d(t,{Z:function(){return p}});var i=r(81500),n=r(32324),l=r(35106),a=r(70316),o=r(65951),s=r(28057),c=r(34519),d=r(11379),h=r(9049);function u(e){return(0,h.ZP)("MuiTableContainer",e)}(0,d.Z)("MuiTableContainer",["root"]);var x=r(94655);let m=["className","component"],v=e=>{let{classes:t}=e;return(0,o.Z)({root:["root"]},u,t)},Z=(0,c.ZP)("div",{name:"MuiTableContainer",slot:"Root",overridesResolver:(e,t)=>t.root})({width:"100%",overflowX:"auto"});var p=l.forwardRef(function(e,t){let r=(0,s.i)({props:e,name:"MuiTableContainer"}),{className:l,component:o="div"}=r,c=(0,n.Z)(r,m),d=(0,i.Z)({},r,{component:o}),h=v(d);return(0,x.jsx)(Z,(0,i.Z)({ref:t,as:o,className:(0,a.Z)(h.root,l),ownerState:d},c))})},12256:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return R}});var i=r(94655),n=r(35106),l=r(7281),a=r(93017),o=r(81071),s=r(31317),c=r(98324),d=r(6986),h=r(53281),u=r(69899),x=r(21138),m=r(11254),v=r(70366),Z=r(47001),p=r(84811),f=r(25333);function g(e){let{users:t,onUserClick:r}=e;return 0===t.length?(0,i.jsx)(l.Z,{sx:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"200px",p:4},children:(0,i.jsx)(s.Z,{variant:"body1",color:"text.secondary",children:"No users found"})}):(0,i.jsx)(h.Z,{component:u.Z,sx:{overflowX:"auto"},children:(0,i.jsxs)(x.Z,{children:[(0,i.jsx)(m.Z,{children:(0,i.jsxs)(v.Z,{children:[(0,i.jsx)(Z.Z,{children:"Email"}),(0,i.jsx)(Z.Z,{children:"Name"}),(0,i.jsx)(Z.Z,{children:"Role"}),(0,i.jsx)(Z.Z,{children:"Status"}),(0,i.jsx)(Z.Z,{children:"Created At"})]})}),(0,i.jsx)(p.Z,{children:t.map(e=>(0,i.jsxs)(v.Z,{hover:!0,onClick:()=>r(e),sx:{cursor:"pointer"},children:[(0,i.jsx)(Z.Z,{children:e.email}),(0,i.jsx)(Z.Z,{children:e.name||"N/A"}),(0,i.jsx)(Z.Z,{children:"admin"===e.role?(0,i.jsx)(f.Z,{label:"Admin",color:"primary",size:"small"}):(0,i.jsx)(f.Z,{label:"User",size:"small"})}),(0,i.jsx)(Z.Z,{children:e.banned?(0,i.jsx)(f.Z,{label:"Banned",color:"error",size:"small"}):(0,i.jsx)(f.Z,{label:"Active",color:"success",size:"small"})}),(0,i.jsx)(Z.Z,{children:new Date(e.createdAt).toLocaleString("en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!1})})]},e.id))})]})})}var j=r(99770),b=r(62508),y=r(79983),w=r(5682),C=r(69123),A=r(71185);function S(e){let{user:t,open:r,onClose:n}=e;return(0,i.jsxs)(j.Z,{open:r,onClose:n,maxWidth:"sm",fullWidth:!0,children:[(0,i.jsx)(b.Z,{children:(0,i.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[(0,i.jsx)(s.Z,{variant:"h6",children:"User Details"}),(0,i.jsx)(y.Z,{onClick:n,size:"small","aria-label":"close",children:(0,i.jsx)(A.Z,{})})]})}),(0,i.jsx)(w.Z,{children:(0,i.jsxs)(l.Z,{sx:{display:"flex",flexDirection:"column",gap:2},children:[(0,i.jsxs)(l.Z,{children:[(0,i.jsx)(s.Z,{variant:"caption",color:"text.secondary",children:"Email"}),(0,i.jsx)(s.Z,{variant:"body1",children:t.email})]}),(0,i.jsxs)(l.Z,{children:[(0,i.jsx)(s.Z,{variant:"caption",color:"text.secondary",children:"Name"}),(0,i.jsx)(s.Z,{variant:"body1",children:t.name||"N/A"})]}),(0,i.jsxs)(l.Z,{children:[(0,i.jsx)(s.Z,{variant:"caption",color:"text.secondary",children:"Role"}),(0,i.jsx)(l.Z,{sx:{mt:.5},children:"admin"===t.role?(0,i.jsx)(f.Z,{label:"Admin",color:"primary",size:"small"}):(0,i.jsx)(f.Z,{label:"User",size:"small"})})]}),(0,i.jsxs)(l.Z,{children:[(0,i.jsx)(s.Z,{variant:"caption",color:"text.secondary",children:"Status"}),(0,i.jsx)(l.Z,{sx:{mt:.5},children:t.banned?(0,i.jsx)(f.Z,{label:"Banned",color:"error",size:"small"}):(0,i.jsx)(f.Z,{label:"Active",color:"success",size:"small"})})]}),(0,i.jsx)(C.Z,{}),(0,i.jsxs)(l.Z,{children:[(0,i.jsx)(s.Z,{variant:"caption",color:"text.secondary",children:"Created At"}),(0,i.jsx)(s.Z,{variant:"body2",children:new Date(t.createdAt).toLocaleString("en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!1})})]}),(0,i.jsxs)(l.Z,{children:[(0,i.jsx)(s.Z,{variant:"caption",color:"text.secondary",children:"User ID"}),(0,i.jsx)(s.Z,{variant:"body2",sx:{fontSize:"0.875rem"},children:t.id})]})]})})]})}function R(){let{data:e,isLoading:t,isError:r,error:h}=(0,c.a)({queryKey:["admin","users"],queryFn:async()=>{let{data:e,error:t}=await d.zB.listUsers({query:{}});if(t)throw Error(t.message||"Failed to fetch users");return(null==e?void 0:e.users)?e.users.map(e=>{var t,r,i;return{id:e.id,email:e.email,name:null!==(t=e.name)&&void 0!==t?t:null,role:null!==(r=e.role)&&void 0!==r?r:"user",banned:null!==(i=e.banned)&&void 0!==i&&i,createdAt:new Date(e.createdAt)}}):[]}}),[u,x]=(0,n.useState)(null);return t?(0,i.jsx)(l.Z,{sx:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"400px"},children:(0,i.jsx)(a.Z,{})}):r?(0,i.jsx)(l.Z,{sx:{p:3},children:(0,i.jsxs)(o.Z,{severity:"error",children:["Failed to load users. ",(null==h?void 0:h.message)||"Please try again later."]})}):(0,i.jsxs)(l.Z,{sx:{p:3},children:[(0,i.jsx)(s.Z,{variant:"h4",component:"h1",gutterBottom:!0,children:"User Management"}),(0,i.jsx)(g,{users:e||[],onUserClick:e=>{x(e)}}),u&&(0,i.jsx)(S,{user:u,open:!0,onClose:()=>{x(null)}})]})}},6986:function(e,t,r){"use strict";r.d(t,{Cp:function(){return u},Nq:function(){return h},cg:function(){return o},kP:function(){return d},w7:function(){return s},y1:function(){return c},zB:function(){return x}});var i=r(77054),n=r(61648),l=r(35016);let a=(0,i.X)({baseURL:l.env.NEXT_PUBLIC_BETTER_AUTH_URL||"",plugins:[(0,n.zB)()]}),{signIn:o,signOut:s,signUp:c,useSession:d,updateUser:h,changePassword:u}=a,x=a.admin}},function(e){e.O(0,[6812,9760,5004,1071,540,9986,2542,3938,2844,3669,2757,1744],function(){return e(e.s=66289)}),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4743],{3590:function(e,t,r){Promise.resolve().then(r.bind(r,98885))},98885:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return eh}});var n=r(94655),s=r(35106),i=r(74228),a=r(7281),o=r(69899),l=r(31317),c=r(25333),d=r(76492),u=r(80620),x=r(78439),h=r(56813),m=r(26892),p=r(84840),g=r(628),j=r(41565),f=r(10721),v=r(69178),Z=r(46207),y=r(45354),b=r(35847);function S(e){var t,r,s;let{stats:i,isLoading:o}=e;if(o)return(0,n.jsx)(p.ZP,{container:!0,spacing:2,children:[0,1,2,3].map(e=>(0,n.jsx)(p.ZP,{item:!0,xs:6,md:3,children:(0,n.jsx)(g.Z,{children:(0,n.jsxs)(j.Z,{children:[(0,n.jsx)(f.Z,{variant:"text",width:"60%"}),(0,n.jsx)(f.Z,{variant:"text",width:"40%",height:40}),(0,n.jsx)(f.Z,{variant:"text",width:"80%"})]})})},e))});let c=null!==(t=null==i?void 0:i.total)&&void 0!==t?t:0,d=c>0?((null!==(r=null==i?void 0:i.byStatus.success)&&void 0!==r?r:0)/c*100).toFixed(1):"0.0",u=null!==(s=null==i?void 0:i.byStatus.failure)&&void 0!==s?s:0,x=i?Object.keys(i.byActor).length:0,h=[{title:"Total Logs",value:c.toLocaleString(),icon:(0,n.jsx)(v.Z,{fontSize:"large"}),color:"#1bd96a",description:"All audit log entries"},{title:"Success Rate",value:"".concat(d,"%"),icon:(0,n.jsx)(Z.Z,{fontSize:"large"}),color:"#22c55e",description:"Successful operations"},{title:"Failures",value:u,icon:(0,n.jsx)(y.Z,{fontSize:"large"}),color:"#ef4444",description:"Failed operations"},{title:"Active Users",value:x,icon:(0,n.jsx)(b.Z,{fontSize:"large"}),color:"#3b82f6",description:"Unique actors"}];return(0,n.jsx)(p.ZP,{container:!0,spacing:2,children:h.map(e=>(0,n.jsx)(p.ZP,{item:!0,xs:6,md:3,children:(0,n.jsx)(g.Z,{sx:{height:"100%",position:"relative",overflow:"hidden","&::before":{content:'""',position:"absolute",top:0,left:0,right:0,height:"4px",background:e.color}},children:(0,n.jsxs)(j.Z,{children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:2},children:[(0,n.jsx)(l.Z,{variant:"body2",color:"text.secondary",sx:{fontWeight:500},children:e.title}),(0,n.jsx)(a.Z,{sx:{color:e.color,opacity:.8},children:e.icon})]}),(0,n.jsx)(l.Z,{variant:"h3",component:"div",sx:{fontWeight:700,color:"text.primary",mb:1},children:e.value}),(0,n.jsx)(l.Z,{variant:"caption",color:"text.secondary",children:e.description})]})})},e.title))})}var C=r(97436),w=r(62328),T=r(7178),k=r(29793),z=r(75726),N=r(30417),R=r(87716),A=r(79983),E=r(89923),I=r(10297),L=r(50880),F=r(54617),D=r(42431),P=r(81960),W=r(84284),M=r(82925);function O(e){return"server"===e?M.Xn:"player"===e?M.KK:M.xg}function U(e){let t,{filters:r,onFiltersChange:i,onExport:o}=e,[d,u]=(0,s.useState)(!0),x=(t=0,r.action&&t++,r.actor&&t++,r.targetType&&t++,r.targetName&&t++,r.status&&t++,r.from&&t++,r.to&&t++,t),h=O(r.targetType),m=(e,t)=>{let n={...r};""===t||void 0===t?delete n[e]:n[e]=t,"targetType"===e&&n.action&&!O(t).includes(n.action)&&delete n.action,n.offset=0,i(n)};return(0,n.jsxs)(a.Z,{sx:{mb:3},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:d?2:0},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,n.jsxs)(A.Z,{onClick:()=>u(!d),size:"small","aria-label":d?"Collapse filters":"Expand filters",children:[(0,n.jsx)(L.Z,{}),d?(0,n.jsx)(W.Z,{sx:{fontSize:14}}):(0,n.jsx)(P.Z,{sx:{fontSize:14}})]}),(0,n.jsx)(l.Z,{variant:"subtitle2",color:"text.secondary",children:"Filters"}),x>0&&(0,n.jsx)(c.Z,{label:x,size:"small",color:"primary",sx:{height:20,fontSize:"0.7rem"}})]}),(0,n.jsxs)(a.Z,{sx:{display:"flex",gap:1},children:[x>0&&(0,n.jsx)(N.Z,{size:"small",startIcon:(0,n.jsx)(F.Z,{}),onClick:()=>{i({limit:r.limit,sort:r.sort})},color:"inherit",children:"Clear All"}),o&&(0,n.jsx)(N.Z,{size:"small",variant:"outlined",onClick:o,children:"Export"})]})]}),(0,n.jsx)(R.Z,{in:d,children:(0,n.jsxs)(a.Z,{sx:{display:"flex",flexDirection:{xs:"column",md:"row"},gap:2,flexWrap:"wrap"},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",gap:1,alignItems:"center"},children:[(0,n.jsx)(C.Z,{type:"date",label:"From",size:"small",value:r.from?r.from.split("T")[0]:"",onChange:e=>{let t=e.target.value;m("from",t?"".concat(t,"T00:00:00Z"):void 0)},InputLabelProps:{shrink:!0},sx:{minWidth:150}}),(0,n.jsx)(l.Z,{variant:"body2",color:"text.secondary",children:"~"}),(0,n.jsx)(C.Z,{type:"date",label:"To",size:"small",value:r.to?r.to.split("T")[0]:"",onChange:e=>{let t=e.target.value;m("to",t?"".concat(t,"T23:59:59Z"):void 0)},InputLabelProps:{shrink:!0},sx:{minWidth:150}})]}),(0,n.jsxs)(k.Z,{size:"small",sx:{minWidth:160},children:[(0,n.jsx)(z.Z,{children:"Action"}),(0,n.jsxs)(w.Z,{value:r.action||"",label:"Action",onChange:e=>m("action",e.target.value||void 0),children:[(0,n.jsx)(T.Z,{value:"",children:"All Actions"}),h.map(e=>(0,n.jsx)(T.Z,{value:e,children:M.n3[e]||e},e))]})]}),(0,n.jsx)(a.Z,{children:(0,n.jsxs)(I.Z,{value:r.targetType||"",exclusive:!0,onChange:(e,t)=>m("targetType",t||void 0),size:"small",children:[(0,n.jsx)(E.Z,{value:"","aria-label":"All targets",children:"All"}),(0,n.jsx)(E.Z,{value:"server","aria-label":"Server targets",children:"Server"}),(0,n.jsx)(E.Z,{value:"player","aria-label":"Player targets",children:"Player"})]})}),(0,n.jsx)(a.Z,{children:(0,n.jsxs)(I.Z,{value:r.status||"",exclusive:!0,onChange:(e,t)=>m("status",t||void 0),size:"small",children:[(0,n.jsx)(E.Z,{value:"","aria-label":"All statuses",children:"All"}),(0,n.jsx)(E.Z,{value:"success","aria-label":"Success only",children:"Success"}),(0,n.jsx)(E.Z,{value:"failure","aria-label":"Failure only",children:"Failure"})]})}),(0,n.jsx)(C.Z,{label:"Target Name",placeholder:"Search...",size:"small",value:r.targetName||"",onChange:e=>m("targetName",e.target.value||void 0),InputProps:{startAdornment:(0,n.jsx)(D.Z,{sx:{color:"text.secondary",mr:.5,fontSize:18}})},sx:{minWidth:160}}),(0,n.jsx)(C.Z,{label:"Actor",placeholder:"e.g., api:admin",size:"small",value:r.actor||"",onChange:e=>m("actor",e.target.value||void 0),sx:{minWidth:140}})]})})]})}var q=r(83765),K=r(62142),_=r(69123),B=r(81071),V=r(21138),X=r(84811),J=r(47001),H=r(70366),G=r(33402),Q=r(60097),Y=r(90158),$=r(58347),ee=r(73424),et=r(93017),er=r(71185),en=r(84509);function es(e){let{logs:t}=e;return 0===t.length?(0,n.jsx)(l.Z,{variant:"body2",color:"text.secondary",sx:{py:2,textAlign:"center"},children:"No related logs found"}):(0,n.jsx)(Y.Z,{dense:!0,sx:{py:0},children:t.map(e=>(0,n.jsx)($.ZP,{sx:{px:0,py:1,"&:not(:last-child)":{borderBottom:"1px solid",borderColor:"divider"}},children:(0,n.jsx)(ee.Z,{primary:(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,n.jsx)(h.I,{action:e.action,size:"small"}),e.targetName&&(0,n.jsx)(l.Z,{variant:"body2",color:"text.secondary",children:e.targetName})]}),secondary:function(e){let t=new Date,r=new Date(e),n=Math.floor((t.getTime()-r.getTime())/6e4),s=Math.floor(n/60);return n<60?"".concat(n,"m ago"):s<24?"".concat(s,"h ago"):"".concat(Math.floor(s/24),"d ago")}(e.timestamp)})},e.id))})}function ei(e){var t,r,i,o,c;let{log:d,open:u,onClose:x}=e,[p,g]=(0,s.useState)(0),{data:j,isLoading:f}=(0,en.VM)(null!==(t=null==d?void 0:d.id)&&void 0!==t?t:null,{enabled:u&&!!d});return(0,n.jsxs)(K.ZP,{anchor:"right",open:u,onClose:x,sx:{"& .MuiDrawer-paper":{width:{xs:"100%",sm:420},maxWidth:"100%"}},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",p:2,borderBottom:"1px solid",borderColor:"divider"},children:[(0,n.jsx)(l.Z,{variant:"h6",component:"h2",children:"Audit Log Detail"}),(0,n.jsx)(A.Z,{onClick:x,"aria-label":"Close detail drawer",autoFocus:!0,children:(0,n.jsx)(er.Z,{})})]}),(0,n.jsx)(a.Z,{sx:{p:2,overflow:"auto",flex:1},children:d?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(a.Z,{sx:{mb:3},children:[(0,n.jsx)(l.Z,{variant:"caption",color:"text.secondary",sx:{display:"block",mb:.5},children:"ID"}),(0,n.jsx)(l.Z,{variant:"body2",sx:{fontSize:"0.8rem",wordBreak:"break-all"},children:d.id})]}),(0,n.jsxs)(a.Z,{sx:{mb:3},children:[(0,n.jsx)(l.Z,{variant:"caption",color:"text.secondary",sx:{display:"block",mb:.5},children:"Timestamp"}),(0,n.jsx)(l.Z,{variant:"body2",children:function(e){let t=new Date(e);return new Intl.DateTimeFormat(void 0,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:"short"}).format(t)}(d.timestamp)})]}),(0,n.jsxs)(a.Z,{sx:{display:"flex",gap:3,mb:3},children:[(0,n.jsxs)(a.Z,{children:[(0,n.jsx)(l.Z,{variant:"caption",color:"text.secondary",sx:{display:"block",mb:.5},children:"Action"}),(0,n.jsx)(h.I,{action:d.action,size:"medium"})]}),(0,n.jsxs)(a.Z,{children:[(0,n.jsx)(l.Z,{variant:"caption",color:"text.secondary",sx:{display:"block",mb:.5},children:"Status"}),(0,n.jsx)(m.c,{status:d.status,size:"medium"})]})]}),(0,n.jsxs)(a.Z,{sx:{mb:3},children:[(0,n.jsx)(l.Z,{variant:"caption",color:"text.secondary",sx:{display:"block",mb:.5},children:"Actor"}),(0,n.jsx)(l.Z,{variant:"body2",children:d.actor})]}),(0,n.jsxs)(a.Z,{sx:{mb:3},children:[(0,n.jsx)(l.Z,{variant:"caption",color:"text.secondary",sx:{display:"block",mb:.5},children:"Target"}),(0,n.jsxs)(l.Z,{variant:"body2",children:[d.targetType,"/",d.targetName]})]}),"failure"===d.status&&d.errorMessage&&(0,n.jsx)(B.Z,{severity:"error",sx:{mb:3},children:d.errorMessage}),d.details&&Object.keys(d.details).length>0&&(0,n.jsxs)(a.Z,{sx:{mb:3},children:[(0,n.jsx)(_.Z,{sx:{mb:2}}),(0,n.jsx)(l.Z,{variant:"subtitle2",sx:{mb:1},children:"Details"}),(0,n.jsx)(V.Z,{size:"small",children:(0,n.jsx)(X.Z,{children:Object.entries(d.details).map(e=>{let[t,r]=e;return(0,n.jsxs)(H.Z,{children:[(0,n.jsx)(J.Z,{sx:{fontWeight:600,color:"text.secondary",border:"none",py:.5,pl:0,width:"40%"},children:t}),(0,n.jsx)(J.Z,{sx:{border:"none",py:.5},children:String(r)})]},t)})})})]}),(0,n.jsx)(_.Z,{sx:{mb:2}}),(0,n.jsx)(l.Z,{variant:"subtitle2",sx:{mb:1},children:"Related Logs"}),f?(0,n.jsx)(a.Z,{sx:{display:"flex",justifyContent:"center",py:3},children:(0,n.jsx)(et.Z,{size:24})}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(G.Z,{value:p,onChange:(e,t)=>g(t),sx:{mb:1},children:[(0,n.jsx)(Q.Z,{label:"Same Target (".concat(null!==(r=null==j?void 0:j.relatedLogs.sameTarget.length)&&void 0!==r?r:0,")"),sx:{textTransform:"none",fontSize:"0.8rem"}}),(0,n.jsx)(Q.Z,{label:"Same Actor (".concat(null!==(i=null==j?void 0:j.relatedLogs.sameActor.length)&&void 0!==i?i:0,")"),sx:{textTransform:"none",fontSize:"0.8rem"}})]}),0===p&&(0,n.jsx)(es,{logs:null!==(o=null==j?void 0:j.relatedLogs.sameTarget)&&void 0!==o?o:[]}),1===p&&(0,n.jsx)(es,{logs:null!==(c=null==j?void 0:j.relatedLogs.sameActor)&&void 0!==c?c:[]})]})]}):(0,n.jsx)(l.Z,{color:"text.secondary",children:"No log selected"})})]})}var ea=r(99770),eo=r(62508),el=r(5682),ec=r(76678),ed=r(15761);function eu(e){let{open:t,onClose:r,filters:i,totalCount:o}=e,[c,d]=(0,s.useState)("csv"),[u,x]=(0,s.useState)(!1),[h,m]=(0,s.useState)(null),p=function(e){let t=[];return e.action&&t.push("Action: ".concat(e.action)),e.actor&&t.push("Actor: ".concat(e.actor)),e.targetType&&t.push("Type: ".concat(e.targetType)),e.targetName&&t.push("Target: ".concat(e.targetName)),e.status&&t.push("Status: ".concat(e.status)),e.from&&t.push("From: ".concat(e.from.split("T")[0])),e.to&&t.push("To: ".concat(e.to.split("T")[0])),t}(i),g=async()=>{x(!0),m(null);try{let e=function(e,t){let r=new URLSearchParams;return r.set("format",t),e.action&&r.set("action",e.action),e.actor&&r.set("actor",e.actor),e.targetType&&r.set("targetType",e.targetType),e.targetName&&r.set("targetName",e.targetName),e.status&&r.set("status",e.status),e.from&&r.set("from",e.from),e.to&&r.set("to",e.to),"/api/audit-logs/export?".concat(r.toString())}(i,c),t=await fetch(e);if(!t.ok){let e=await t.json().catch(()=>({message:"Export failed"}));throw Error(e.message||"Export failed")}let n=await t.blob(),s=window.URL.createObjectURL(n),a=document.createElement("a");a.href=s;let o=t.headers.get("Content-Disposition"),l=null==o?void 0:o.match(/filename="?([^"]+)"?/);a.download=(null==l?void 0:l[1])||"audit-logs.".concat(c),document.body.appendChild(a),a.click(),document.body.removeChild(a),window.URL.revokeObjectURL(s),r()}catch(e){m(e instanceof Error?e.message:"Export failed")}finally{x(!1)}};return(0,n.jsxs)(ea.Z,{open:t,onClose:r,maxWidth:"sm",fullWidth:!0,children:[(0,n.jsx)(eo.Z,{children:"Export Audit Logs"}),(0,n.jsxs)(el.Z,{children:[(0,n.jsxs)(a.Z,{sx:{mb:3},children:[(0,n.jsx)(l.Z,{variant:"subtitle2",sx:{mb:1},children:"Format"}),(0,n.jsxs)(I.Z,{value:c,exclusive:!0,onChange:(e,t)=>t&&d(t),size:"small",children:[(0,n.jsx)(E.Z,{value:"csv",children:"CSV"}),(0,n.jsx)(E.Z,{value:"json",children:"JSON"})]})]}),(0,n.jsxs)(a.Z,{sx:{mb:3},children:[(0,n.jsx)(l.Z,{variant:"subtitle2",sx:{mb:1},children:"Applied Filters"}),p.length>0?(0,n.jsx)(a.Z,{sx:{display:"flex",flexDirection:"column",gap:.5},children:p.map(e=>(0,n.jsx)(l.Z,{variant:"body2",color:"text.secondary",children:e},e))}):(0,n.jsx)(l.Z,{variant:"body2",color:"text.secondary",children:"No filters applied (all logs)"})]}),(0,n.jsxs)(a.Z,{sx:{mb:2},children:[(0,n.jsx)(l.Z,{variant:"subtitle2",sx:{mb:.5},children:"Estimated Rows"}),(0,n.jsxs)(l.Z,{variant:"body2",color:"text.secondary",children:[Math.min(o,5e3).toLocaleString()," rows"]})]}),o>5e3&&(0,n.jsxs)(B.Z,{severity:"warning",sx:{mb:2},children:["Export is limited to ",5e3.toLocaleString()," rows. Total matching logs: ",o.toLocaleString(),". Consider narrowing your filters for a complete export."]}),h&&(0,n.jsx)(B.Z,{severity:"error",sx:{mb:2},children:h})]}),(0,n.jsxs)(ec.Z,{children:[(0,n.jsx)(N.Z,{onClick:r,disabled:u,children:"Cancel"}),(0,n.jsx)(N.Z,{variant:"contained",startIcon:u?(0,n.jsx)(et.Z,{size:16,color:"inherit"}):(0,n.jsx)(ed.Z,{}),onClick:g,disabled:u,children:u?"Exporting...":"Export ".concat(c.toUpperCase())})]})]})}var ex=r(93757);function eh(){var e,t,r;let h=(0,i.useRouter)(),m=(0,i.useSearchParams)(),[p,g]=(0,s.useState)(()=>(function(e){let t={},r=e.get("action"),n=e.get("actor"),s=e.get("targetType"),i=e.get("targetName"),a=e.get("status"),o=e.get("from"),l=e.get("to"),c=e.get("limit"),d=e.get("offset"),u=e.get("sort");return r&&(t.action=r),n&&(t.actor=n),s&&(t.targetType=s),i&&(t.targetName=i),a&&(t.status=a),o&&(t.from=o),l&&(t.to=l),c&&(t.limit=parseInt(c,10)),d&&(t.offset=parseInt(d,10)),("timestamp:asc"===u||"timestamp:desc"===u)&&(t.sort=u),t})(m)),[j,f]=(0,s.useState)(null),[v,Z]=(0,s.useState)(!1),[y,b]=(0,s.useState)(!1),[C,w]=(0,s.useState)(0),T=(0,s.useRef)(new Set),{data:k,isLoading:z,error:N,refetch:R}=(0,en.hT)(p),{data:A,isLoading:E}=(0,en.DM)(),{isConnected:I}=(0,ex.D)({url:"/api/audit-logs/stream",enabled:!0,onMessage:(0,s.useCallback)(e=>{if("audit-log"===e.type){let t=e.data;if("id"in t&&"string"==typeof t.id){if(T.current.has(t.id))return;if(T.current.add(t.id),T.current.size>1e3){let e=Array.from(T.current);T.current=new Set(e.slice(e.length-500))}}w(e=>e+1)}},[]),reconnectInterval:3e3,maxReconnectAttempts:1/0});(0,s.useEffect)(()=>{let e=function(e){let t=new URLSearchParams;e.action&&t.set("action",e.action),e.actor&&t.set("actor",e.actor),e.targetType&&t.set("targetType",e.targetType),e.targetName&&t.set("targetName",e.targetName),e.status&&t.set("status",e.status),e.from&&t.set("from",e.from),e.to&&t.set("to",e.to),e.limit&&50!==e.limit&&t.set("limit",String(e.limit)),e.offset&&e.offset>0&&t.set("offset",String(e.offset)),e.sort&&"timestamp:desc"!==e.sort&&t.set("sort",e.sort);let r=t.toString();return r?"?".concat(r):""}(p);e!==(m.toString()?"?".concat(m.toString()):"")&&h.replace("/audit-logs".concat(e),{scroll:!1})},[p,h,m]);let L=(0,s.useCallback)(e=>{g(e),w(0)},[]),F=(0,s.useCallback)(e=>{f(e),Z(!0)},[]),D=(0,s.useCallback)(()=>{w(0),R()},[R]);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o.Z,{elevation:0,sx:{mb:4,p:3,background:e=>"linear-gradient(135deg, ".concat((0,d.Fq)(e.palette.warning.main,.1)," 0%, ").concat((0,d.Fq)(e.palette.error.main,.1)," 100%)"),borderRadius:2,border:e=>"1px solid ".concat((0,d.Fq)(e.palette.warning.main,.2))},children:(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",gap:2},children:[(0,n.jsx)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:56,height:56,borderRadius:2,bgcolor:"warning.main",color:"warning.contrastText"},children:(0,n.jsx)(u.Z,{sx:{fontSize:32}})}),(0,n.jsxs)(a.Z,{sx:{flex:1},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",gap:1.5},children:[(0,n.jsx)(l.Z,{variant:"h4",component:"h1",fontWeight:"bold",children:"Audit Log"}),(0,n.jsx)(c.Z,{icon:(0,n.jsx)(x.Z,{sx:{fontSize:10,color:I?"success.main":"text.disabled",animation:I?"pulse 2s infinite":"none","@keyframes pulse":{"0%":{opacity:1},"50%":{opacity:.4},"100%":{opacity:1}}}}),label:I?"Live":"Offline",size:"small",variant:"outlined",sx:{fontSize:"0.7rem"}})]}),(0,n.jsx)(l.Z,{variant:"body1",color:"text.secondary",children:"Monitor all management activities across your servers"})]})]})}),(0,n.jsx)(a.Z,{sx:{mb:3},children:(0,n.jsx)(S,{stats:A,isLoading:E})}),C>0&&(0,n.jsx)(a.Z,{sx:{mb:2,p:1.5,textAlign:"center",bgcolor:"primary.main",color:"primary.contrastText",borderRadius:1,cursor:"pointer","&:hover":{opacity:.9}},onClick:D,role:"button","aria-label":"".concat(C," new logs, click to refresh"),children:(0,n.jsxs)(l.Z,{variant:"body2",fontWeight:600,children:[C," new ",1===C?"log":"logs"," available - Click to refresh"]})}),(0,n.jsx)(U,{filters:p,onFiltersChange:L,onExport:()=>b(!0)}),(0,n.jsx)(q.x,{logs:null!==(e=null==k?void 0:k.logs)&&void 0!==e?e:[],total:null!==(t=null==k?void 0:k.total)&&void 0!==t?t:0,isLoading:z,error:N,filters:p,onFiltersChange:L,onRowClick:F,onRetry:()=>R()}),(0,n.jsx)(ei,{log:j,open:v,onClose:()=>{Z(!1),f(null)}}),(0,n.jsx)(eu,{open:y,onClose:()=>b(!1),filters:p,totalCount:null!==(r=null==k?void 0:k.total)&&void 0!==r?r:0})]})}},56813:function(e,t,r){"use strict";r.d(t,{I:function(){return a}});var n=r(94655),s=r(25333),i=r(82925);function a(e){let{action:t,size:r="small"}=e,a=i.Lu[t]||"default",o=i.n3[t]||t;return(0,n.jsx)(s.Z,{label:o,color:a,size:r,variant:"filled",sx:{fontWeight:600,fontSize:"small"===r?"0.7rem":"0.8rem"}})}},26892:function(e,t,r){"use strict";r.d(t,{c:function(){return o}});var n=r(94655),s=r(25333),i=r(46207),a=r(43436);function o(e){let{status:t,size:r="small"}=e;return(0,n.jsx)(s.Z,{icon:"success"===t?(0,n.jsx)(i.Z,{}):(0,n.jsx)(a.Z,{}),label:"success"===t?"OK":"Error",color:"success"===t?"success":"error",size:r,variant:"outlined",sx:{fontWeight:500,fontSize:"small"===r?"0.7rem":"0.8rem"}})}},83765:function(e,t,r){"use strict";r.d(t,{x:function(){return A}});var n=r(94655),s=r(35106),i=r(7281),a=r(21138),o=r(84811),l=r(47001),c=r(53281),d=r(11254),u=r(70366),x=r(6406),h=r(69899),m=r(31317),p=r(95511),g=r(10721),j=r(81071),f=r(30417),v=r(25333),Z=r(87716),y=r(79983),b=r(89161),S=r(60236),C=r(27171),w=r(30114),T=r(69178),k=r(46725),z=r(56813),N=r(26892);function R(e){var t,r;let{log:c,onClick:d,hideTargetColumn:x}=e,[h,g]=(0,s.useState)("failure"===c.status),f=c.details&&Object.keys(c.details).length>0,T="failure"===c.status&&c.errorMessage,R=f||T,A=(t=c.targetType,r=c.targetName,"server"===t?"/servers/".concat(encodeURIComponent(r)):"player"===t?"/players":null);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(u.Z,{hover:!0,sx:{cursor:"pointer","&:last-child td, &:last-child th":{border:0}},onClick:()=>null==d?void 0:d(c),tabIndex:0,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),null==d||d(c))},role:"button","aria-label":"".concat(c.action," by ").concat(c.actor," on ").concat(c.targetName),children:[(0,n.jsx)(l.Z,{padding:"checkbox",sx:{width:48},children:R&&(0,n.jsx)(y.Z,{size:"small",onClick:e=>{e.stopPropagation(),g(!h)},"aria-label":h?"Collapse details":"Expand details",children:h?(0,n.jsx)(S.Z,{}):(0,n.jsx)(b.Z,{})})}),(0,n.jsx)(l.Z,{children:(0,n.jsx)(p.Z,{title:function(e){let t=new Date(e);return new Intl.DateTimeFormat(void 0,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:"short"}).format(t)}(c.timestamp),arrow:!0,children:(0,n.jsx)(m.Z,{variant:"body2",color:"text.secondary",sx:{whiteSpace:"nowrap"},children:function(e){let t=new Date,r=new Date(e),n=Math.floor((t.getTime()-r.getTime())/1e3),s=Math.floor(n/60),i=Math.floor(s/60),a=Math.floor(i/24);return n<60?"just now":s<60?"".concat(s,"m ago"):i<24?"".concat(i,"h ago"):a<7?"".concat(a,"d ago"):new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"}).format(r)}(c.timestamp)})})}),(0,n.jsx)(l.Z,{children:(0,n.jsx)(z.I,{action:c.action})}),(0,n.jsx)(l.Z,{children:c.actor.startsWith("cli:")?(0,n.jsx)(v.Z,{label:c.actor.replace("cli:",""),size:"small",variant:"outlined",sx:{fontSize:"0.75rem"}}):(0,n.jsx)(m.Z,{variant:"body2",children:c.actor.replace("api:","")})}),!x&&(0,n.jsx)(l.Z,{children:(0,n.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center"},children:[function(e){switch(e){case"server":return(0,n.jsx)(C.Z,{sx:{fontSize:16,mr:.5,color:"text.secondary"}});case"player":return(0,n.jsx)(w.Z,{sx:{fontSize:16,mr:.5,color:"text.secondary"}});default:return null}}(c.targetType),A?(0,n.jsx)(k.default,{href:A,style:{textDecoration:"none"},onClick:e=>e.stopPropagation(),children:(0,n.jsx)(m.Z,{variant:"body2",sx:{color:"primary.main","&:hover":{textDecoration:"underline"}},children:c.targetName})}):(0,n.jsx)(m.Z,{variant:"body2",children:c.targetName})]})}),(0,n.jsx)(l.Z,{children:(0,n.jsx)(N.c,{status:c.status})})]}),R&&(0,n.jsx)(u.Z,{children:(0,n.jsx)(l.Z,{sx:{py:0},colSpan:x?5:6,children:(0,n.jsx)(Z.Z,{in:h,timeout:"auto",unmountOnExit:!0,children:(0,n.jsxs)(i.Z,{sx:{py:2,px:2},children:[T&&(0,n.jsx)(j.Z,{severity:"error",sx:{mb:2},children:c.errorMessage}),f&&(0,n.jsxs)(i.Z,{children:[(0,n.jsx)(m.Z,{variant:"caption",color:"text.secondary",sx:{mb:1,display:"block"},children:"Details"}),(0,n.jsx)(a.Z,{size:"small",sx:{width:"auto"},children:(0,n.jsx)(o.Z,{children:Object.entries(c.details).map(e=>{let[t,r]=e;return(0,n.jsxs)(u.Z,{children:[(0,n.jsx)(l.Z,{sx:{fontWeight:600,color:"text.secondary",border:"none",py:.5,pl:0},children:t}),(0,n.jsx)(l.Z,{sx:{border:"none",py:.5},children:String(r)})]},t)})})})]})]})})})})]})}function A(e){let{logs:t,total:r,isLoading:s,error:i,filters:p,onFiltersChange:v,onRowClick:Z,onRetry:y,hideTargetColumn:b,rowsPerPageOptions:S=[25,50,100]}=e,C=Math.floor((p.offset||0)/(p.limit||50)),w=p.limit||50;return s?(0,n.jsx)(h.Z,{children:(0,n.jsx)(c.Z,{children:(0,n.jsxs)(a.Z,{children:[(0,n.jsx)(d.Z,{children:(0,n.jsxs)(u.Z,{children:[(0,n.jsx)(l.Z,{padding:"checkbox"}),(0,n.jsx)(l.Z,{children:"Timestamp"}),(0,n.jsx)(l.Z,{children:"Action"}),(0,n.jsx)(l.Z,{children:"Actor"}),!b&&(0,n.jsx)(l.Z,{children:"Target"}),(0,n.jsx)(l.Z,{children:"Status"})]})}),(0,n.jsx)(o.Z,{children:[void 0,void 0,void 0,void 0,void 0].map((e,t)=>(0,n.jsxs)(u.Z,{children:[(0,n.jsx)(l.Z,{padding:"checkbox"}),(0,n.jsx)(l.Z,{children:(0,n.jsx)(g.Z,{variant:"text",width:80})}),(0,n.jsx)(l.Z,{children:(0,n.jsx)(g.Z,{variant:"rounded",width:70,height:24})}),(0,n.jsx)(l.Z,{children:(0,n.jsx)(g.Z,{variant:"text",width:60})}),!b&&(0,n.jsx)(l.Z,{children:(0,n.jsx)(g.Z,{variant:"text",width:100})}),(0,n.jsx)(l.Z,{children:(0,n.jsx)(g.Z,{variant:"rounded",width:50,height:24})})]},t))})]})})}):i?(0,n.jsx)(j.Z,{severity:"error",action:y&&(0,n.jsx)(f.Z,{color:"inherit",size:"small",onClick:y,children:"Retry"}),children:i.message||"Failed to load audit logs"}):0===t.length?(0,n.jsxs)(h.Z,{sx:{p:6,textAlign:"center"},children:[(0,n.jsx)(T.Z,{sx:{fontSize:64,color:"text.disabled",mb:2}}),(0,n.jsx)(m.Z,{variant:"h6",color:"text.secondary",gutterBottom:!0,children:"No audit logs found"}),(0,n.jsx)(m.Z,{variant:"body2",color:"text.disabled",sx:{mb:2},children:"Try adjusting your filters or check back later."}),(0,n.jsx)(f.Z,{variant:"outlined",size:"small",onClick:()=>v({limit:p.limit,sort:p.sort}),children:"Reset Filters"})]}):(0,n.jsxs)(h.Z,{children:[(0,n.jsx)(c.Z,{sx:{overflowX:"auto"},children:(0,n.jsxs)(a.Z,{size:"small",children:[(0,n.jsx)(d.Z,{children:(0,n.jsxs)(u.Z,{children:[(0,n.jsx)(l.Z,{padding:"checkbox",sx:{width:48}}),(0,n.jsx)(l.Z,{sx:{fontWeight:600,whiteSpace:"nowrap"},children:"Timestamp"}),(0,n.jsx)(l.Z,{sx:{fontWeight:600},children:"Action"}),(0,n.jsx)(l.Z,{sx:{fontWeight:600},children:"Actor"}),!b&&(0,n.jsx)(l.Z,{sx:{fontWeight:600},children:"Target"}),(0,n.jsx)(l.Z,{sx:{fontWeight:600},children:"Status"})]})}),(0,n.jsx)(o.Z,{children:t.map(e=>(0,n.jsx)(R,{log:e,onClick:Z,hideTargetColumn:b},e.id))})]})}),(0,n.jsx)(x.Z,{component:"div",count:r,page:C,onPageChange:(e,t)=>{v({...p,offset:t*w})},rowsPerPage:w,onRowsPerPageChange:e=>{let t=parseInt(e.target.value,10);v({...p,limit:t,offset:0})},rowsPerPageOptions:S,"aria-label":"Audit log pagination"})]})}},42936:function(e,t,r){"use strict";async function n(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={...t.headers};t.body&&(r["Content-Type"]="application/json");let n=await fetch(e,{...t,headers:r});if(!n.ok){let e=await n.json().catch(()=>({error:"UnknownError",message:n.statusText})),t=Error(e.message);throw t.statusCode=n.status,t.code=e.error,t}return n.json()}r.d(t,{SC:function(){return n}})},84509:function(e,t,r){"use strict";r.d(t,{DM:function(){return a},HZ:function(){return l},VM:function(){return o},hT:function(){return i},oL:function(){return c}});var n=r(5632),s=r(42936);function i(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=function(e){let t=new URLSearchParams;e.action&&t.set("action",e.action),e.actor&&t.set("actor",e.actor),e.targetType&&t.set("targetType",e.targetType),e.targetName&&t.set("targetName",e.targetName),e.status&&t.set("status",e.status),e.from&&t.set("from",e.from),e.to&&t.set("to",e.to),void 0!==e.limit&&t.set("limit",String(e.limit)),void 0!==e.offset&&t.set("offset",String(e.offset)),e.sort&&t.set("sort",e.sort);let r=t.toString();return r?"?".concat(r):""}(e);return(0,n.a)({queryKey:["audit-logs",e],queryFn:()=>(0,s.SC)("/api/audit-logs".concat(r)),enabled:(null==t?void 0:t.enabled)!==!1})}function a(e){return(0,n.a)({queryKey:["audit-logs","stats"],queryFn:()=>(0,s.SC)("/api/audit-logs/stats"),enabled:(null==e?void 0:e.enabled)!==!1,refetchInterval:3e4})}function o(e,t){return(0,n.a)({queryKey:["audit-logs",e],queryFn:()=>(0,s.SC)("/api/audit-logs/".concat(encodeURIComponent(e))),enabled:(null==t?void 0:t.enabled)!==!1&&!!e})}function l(e,t){var r;return i({targetType:"server",targetName:e,limit:null!==(r=null==t?void 0:t.limit)&&void 0!==r?r:20,...null==t?void 0:t.extraParams},{enabled:(null==t?void 0:t.enabled)!==!1&&!!e})}function c(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10;return i({limit:e,sort:"timestamp:desc"})}},93757:function(e,t,r){"use strict";r.d(t,{D:function(){return i}});var n=r(35106);class s{connect(e){this.options=e,this.shouldReconnect=!0,this.establishConnection()}establishConnection(){this.options&&(this.updateState("connecting"),this.eventSource&&this.eventSource.close(),this.eventSource=new EventSource(this.options.url,{withCredentials:this.options.withCredentials||!1}),this.eventSource.onopen=()=>{this.updateState("connected"),this.retryCount=0,this.lastError=null},this.eventSource.onmessage=e=>{if(!e.data.startsWith(":"))try{var t,r;let n=JSON.parse(e.data);null===(r=this.options)||void 0===r||null===(t=r.onMessage)||void 0===t||t.call(r,n)}catch(e){console.warn("Failed to parse SSE message:",e)}},this.eventSource.onerror=()=>{var e,t;let r={message:"SSE connection error",code:"CONNECTION_ERROR",retryCount:this.retryCount,timestamp:new Date};this.lastError=r,this.updateState("error"),null===(t=this.options)||void 0===t||null===(e=t.onError)||void 0===e||e.call(t,r),this.shouldReconnect&&this.scheduleReconnect()})}scheduleReconnect(){var e,t;if(!this.options)return;let r=null!==(e=this.options.maxReconnectAttempts)&&void 0!==e?e:1/0;if(this.retryCount>=r)return;this.reconnectTimer&&clearTimeout(this.reconnectTimer);let n=null!==(t=this.options.reconnectInterval)&&void 0!==t?t:3e3;this.reconnectTimer=setTimeout(()=>{this.retryCount++,this.establishConnection()},n)}disconnect(){this.shouldReconnect=!1,this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.eventSource&&(this.eventSource.close(),this.eventSource=null),this.updateState("disconnected")}getState(){return this.state}isConnected(){return"connected"===this.state}getLastError(){return this.lastError}getRetryCount(){return this.retryCount}reconnect(){this.retryCount++,this.shouldReconnect=!0,this.eventSource&&(this.eventSource.close(),this.eventSource=null),this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.establishConnection()}updateState(e){var t,r;this.state=e,null===(r=this.options)||void 0===r||null===(t=r.onStateChange)||void 0===t||t.call(r,e)}constructor(){this.eventSource=null,this.state="disconnected",this.retryCount=0,this.lastError=null,this.reconnectTimer=null,this.options=null,this.shouldReconnect=!0}}function i(e){let{url:t,onMessage:r,onError:i,reconnectInterval:a=3e3,maxReconnectAttempts:o=1/0,enabled:l=!0,withCredentials:c=!1}=e,[d,u]=(0,n.useState)(null),[x,h]=(0,n.useState)("disconnected"),[m,p]=(0,n.useState)(null),[g,j]=(0,n.useState)(0),f=(0,n.useRef)(null),v=(0,n.useCallback)(e=>{u(e),null==r||r(e)},[r]),Z=(0,n.useCallback)(e=>{h(e),"connected"===e&&j(0)},[]),y=(0,n.useCallback)(e=>{p(e),"number"==typeof e.retryCount&&j(e.retryCount),null==i||i(e)},[i]),b=(0,n.useCallback)(()=>{f.current&&(f.current.reconnect(),j(f.current.getRetryCount()))},[]),S=(0,n.useCallback)(()=>{f.current&&f.current.disconnect()},[]);return(0,n.useEffect)(()=>{if(!l){f.current&&(f.current.disconnect(),f.current=null);return}return f.current||(f.current=new s),f.current.connect({url:t,onMessage:v,onStateChange:Z,onError:y,reconnectInterval:a,maxReconnectAttempts:o,withCredentials:c}),()=>{f.current&&(f.current.disconnect(),f.current=null)}},[t,l,a,o,c,v,Z,y]),{data:d,isConnected:"connected"===x,state:x,error:m,retryCount:g,reconnect:b,disconnect:S}}},82925:function(e,t,r){"use strict";r.d(t,{KK:function(){return o},Lu:function(){return n},Xn:function(){return a},n3:function(){return s},xg:function(){return i}});let n={"server.create":"success","server.delete":"error","server.start":"info","server.stop":"warning","server.restart":"secondary","player.whitelist.add":"success","player.whitelist.remove":"warning","player.ban":"error","player.unban":"success","player.op":"info","player.deop":"warning","player.kick":"error","audit.purge":"default"},s={"server.create":"Create","server.delete":"Delete","server.start":"Start","server.stop":"Stop","server.restart":"Restart","player.whitelist.add":"Whitelist Add","player.whitelist.remove":"Whitelist Remove","player.ban":"Ban","player.unban":"Unban","player.op":"Op","player.deop":"Deop","player.kick":"Kick","audit.purge":"Purge"},i=["server.create","server.delete","server.start","server.stop","server.restart","player.whitelist.add","player.whitelist.remove","player.ban","player.unban","player.op","player.deop","player.kick","audit.purge"],a=["server.create","server.delete","server.start","server.stop","server.restart"],o=["player.whitelist.add","player.whitelist.remove","player.ban","player.unban","player.op","player.deop","player.kick"]}},function(e){e.O(0,[6812,9760,5004,7296,7436,1071,540,4416,2538,5511,3938,55,2844,8347,7073,9022,4302,1002,3669,2757,1744],function(){return e(e.s=3590)}),_N_E=e.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4743],{3590:function(e,t,r){Promise.resolve().then(r.bind(r,98885))},98885:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return eh}});var n=r(94655),s=r(35106),i=r(74228),a=r(7281),o=r(69899),l=r(31317),c=r(25333),d=r(76492),u=r(80620),x=r(78439),h=r(56813),m=r(26892),p=r(84840),g=r(628),j=r(41565),f=r(10721),v=r(69178),Z=r(46207),y=r(45354),b=r(35847);function S(e){var t,r,s;let{stats:i,isLoading:o}=e;if(o)return(0,n.jsx)(p.ZP,{container:!0,spacing:2,children:[0,1,2,3].map(e=>(0,n.jsx)(p.ZP,{item:!0,xs:6,md:3,children:(0,n.jsx)(g.Z,{children:(0,n.jsxs)(j.Z,{children:[(0,n.jsx)(f.Z,{variant:"text",width:"60%"}),(0,n.jsx)(f.Z,{variant:"text",width:"40%",height:40}),(0,n.jsx)(f.Z,{variant:"text",width:"80%"})]})})},e))});let c=null!==(t=null==i?void 0:i.total)&&void 0!==t?t:0,d=c>0?((null!==(r=null==i?void 0:i.byStatus.success)&&void 0!==r?r:0)/c*100).toFixed(1):"0.0",u=null!==(s=null==i?void 0:i.byStatus.failure)&&void 0!==s?s:0,x=i?Object.keys(i.byActor).length:0,h=[{title:"Total Logs",value:c.toLocaleString(),icon:(0,n.jsx)(v.Z,{fontSize:"large"}),color:"#1bd96a",description:"All audit log entries"},{title:"Success Rate",value:"".concat(d,"%"),icon:(0,n.jsx)(Z.Z,{fontSize:"large"}),color:"#22c55e",description:"Successful operations"},{title:"Failures",value:u,icon:(0,n.jsx)(y.Z,{fontSize:"large"}),color:"#ef4444",description:"Failed operations"},{title:"Active Users",value:x,icon:(0,n.jsx)(b.Z,{fontSize:"large"}),color:"#3b82f6",description:"Unique actors"}];return(0,n.jsx)(p.ZP,{container:!0,spacing:2,children:h.map(e=>(0,n.jsx)(p.ZP,{item:!0,xs:6,md:3,children:(0,n.jsx)(g.Z,{sx:{height:"100%",position:"relative",overflow:"hidden","&::before":{content:'""',position:"absolute",top:0,left:0,right:0,height:"4px",background:e.color}},children:(0,n.jsxs)(j.Z,{children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:2},children:[(0,n.jsx)(l.Z,{variant:"body2",color:"text.secondary",sx:{fontWeight:500},children:e.title}),(0,n.jsx)(a.Z,{sx:{color:e.color,opacity:.8},children:e.icon})]}),(0,n.jsx)(l.Z,{variant:"h3",component:"div",sx:{fontWeight:700,color:"text.primary",mb:1},children:e.value}),(0,n.jsx)(l.Z,{variant:"caption",color:"text.secondary",children:e.description})]})})},e.title))})}var C=r(97436),w=r(62328),T=r(7178),k=r(29793),z=r(75726),N=r(30417),R=r(87716),A=r(79983),E=r(89923),I=r(10297),L=r(50880),F=r(54617),D=r(42431),P=r(81960),W=r(84284),M=r(82925);function O(e){return"server"===e?M.Xn:"player"===e?M.KK:M.xg}function U(e){let t,{filters:r,onFiltersChange:i,onExport:o}=e,[d,u]=(0,s.useState)(!0),x=(t=0,r.action&&t++,r.actor&&t++,r.targetType&&t++,r.targetName&&t++,r.status&&t++,r.from&&t++,r.to&&t++,t),h=O(r.targetType),m=(e,t)=>{let n={...r};""===t||void 0===t?delete n[e]:n[e]=t,"targetType"===e&&n.action&&!O(t).includes(n.action)&&delete n.action,n.offset=0,i(n)};return(0,n.jsxs)(a.Z,{sx:{mb:3},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:d?2:0},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,n.jsxs)(A.Z,{onClick:()=>u(!d),size:"small","aria-label":d?"Collapse filters":"Expand filters",children:[(0,n.jsx)(L.Z,{}),d?(0,n.jsx)(W.Z,{sx:{fontSize:14}}):(0,n.jsx)(P.Z,{sx:{fontSize:14}})]}),(0,n.jsx)(l.Z,{variant:"subtitle2",color:"text.secondary",children:"Filters"}),x>0&&(0,n.jsx)(c.Z,{label:x,size:"small",color:"primary",sx:{height:20,fontSize:"0.7rem"}})]}),(0,n.jsxs)(a.Z,{sx:{display:"flex",gap:1},children:[x>0&&(0,n.jsx)(N.Z,{size:"small",startIcon:(0,n.jsx)(F.Z,{}),onClick:()=>{i({limit:r.limit,sort:r.sort})},color:"inherit",children:"Clear All"}),o&&(0,n.jsx)(N.Z,{size:"small",variant:"outlined",onClick:o,children:"Export"})]})]}),(0,n.jsx)(R.Z,{in:d,children:(0,n.jsxs)(a.Z,{sx:{display:"flex",flexDirection:{xs:"column",md:"row"},gap:2,flexWrap:"wrap"},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",gap:1,alignItems:"center"},children:[(0,n.jsx)(C.Z,{type:"date",label:"From",size:"small",value:r.from?r.from.split("T")[0]:"",onChange:e=>{let t=e.target.value;m("from",t?"".concat(t,"T00:00:00Z"):void 0)},InputLabelProps:{shrink:!0},sx:{minWidth:150}}),(0,n.jsx)(l.Z,{variant:"body2",color:"text.secondary",children:"~"}),(0,n.jsx)(C.Z,{type:"date",label:"To",size:"small",value:r.to?r.to.split("T")[0]:"",onChange:e=>{let t=e.target.value;m("to",t?"".concat(t,"T23:59:59Z"):void 0)},InputLabelProps:{shrink:!0},sx:{minWidth:150}})]}),(0,n.jsxs)(k.Z,{size:"small",sx:{minWidth:160},children:[(0,n.jsx)(z.Z,{children:"Action"}),(0,n.jsxs)(w.Z,{value:r.action||"",label:"Action",onChange:e=>m("action",e.target.value||void 0),children:[(0,n.jsx)(T.Z,{value:"",children:"All Actions"}),h.map(e=>(0,n.jsx)(T.Z,{value:e,children:M.n3[e]||e},e))]})]}),(0,n.jsx)(a.Z,{children:(0,n.jsxs)(I.Z,{value:r.targetType||"",exclusive:!0,onChange:(e,t)=>m("targetType",t||void 0),size:"small",children:[(0,n.jsx)(E.Z,{value:"","aria-label":"All targets",children:"All"}),(0,n.jsx)(E.Z,{value:"server","aria-label":"Server targets",children:"Server"}),(0,n.jsx)(E.Z,{value:"player","aria-label":"Player targets",children:"Player"})]})}),(0,n.jsx)(a.Z,{children:(0,n.jsxs)(I.Z,{value:r.status||"",exclusive:!0,onChange:(e,t)=>m("status",t||void 0),size:"small",children:[(0,n.jsx)(E.Z,{value:"","aria-label":"All statuses",children:"All"}),(0,n.jsx)(E.Z,{value:"success","aria-label":"Success only",children:"Success"}),(0,n.jsx)(E.Z,{value:"failure","aria-label":"Failure only",children:"Failure"})]})}),(0,n.jsx)(C.Z,{label:"Target Name",placeholder:"Search...",size:"small",value:r.targetName||"",onChange:e=>m("targetName",e.target.value||void 0),InputProps:{startAdornment:(0,n.jsx)(D.Z,{sx:{color:"text.secondary",mr:.5,fontSize:18}})},sx:{minWidth:160}}),(0,n.jsx)(C.Z,{label:"Actor",placeholder:"e.g., api:admin",size:"small",value:r.actor||"",onChange:e=>m("actor",e.target.value||void 0),sx:{minWidth:140}})]})})]})}var q=r(83765),K=r(62142),_=r(69123),B=r(81071),V=r(21138),X=r(84811),J=r(47001),H=r(70366),G=r(33402),Q=r(60097),Y=r(90158),$=r(58347),ee=r(73424),et=r(93017),er=r(71185),en=r(84509);function es(e){let{logs:t}=e;return 0===t.length?(0,n.jsx)(l.Z,{variant:"body2",color:"text.secondary",sx:{py:2,textAlign:"center"},children:"No related logs found"}):(0,n.jsx)(Y.Z,{dense:!0,sx:{py:0},children:t.map(e=>(0,n.jsx)($.ZP,{sx:{px:0,py:1,"&:not(:last-child)":{borderBottom:"1px solid",borderColor:"divider"}},children:(0,n.jsx)(ee.Z,{primary:(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,n.jsx)(h.I,{action:e.action,size:"small"}),e.targetName&&(0,n.jsx)(l.Z,{variant:"body2",color:"text.secondary",children:e.targetName})]}),secondary:function(e){let t=new Date,r=new Date(e),n=Math.floor((t.getTime()-r.getTime())/6e4),s=Math.floor(n/60);return n<60?"".concat(n,"m ago"):s<24?"".concat(s,"h ago"):"".concat(Math.floor(s/24),"d ago")}(e.timestamp)})},e.id))})}function ei(e){var t,r,i,o,c;let{log:d,open:u,onClose:x}=e,[p,g]=(0,s.useState)(0),{data:j,isLoading:f}=(0,en.VM)(null!==(t=null==d?void 0:d.id)&&void 0!==t?t:null,{enabled:u&&!!d});return(0,n.jsxs)(K.ZP,{anchor:"right",open:u,onClose:x,sx:{"& .MuiDrawer-paper":{width:{xs:"100%",sm:420},maxWidth:"100%"}},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",p:2,borderBottom:"1px solid",borderColor:"divider"},children:[(0,n.jsx)(l.Z,{variant:"h6",component:"h2",children:"Audit Log Detail"}),(0,n.jsx)(A.Z,{onClick:x,"aria-label":"Close detail drawer",autoFocus:!0,children:(0,n.jsx)(er.Z,{})})]}),(0,n.jsx)(a.Z,{sx:{p:2,overflow:"auto",flex:1},children:d?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(a.Z,{sx:{mb:3},children:[(0,n.jsx)(l.Z,{variant:"caption",color:"text.secondary",sx:{display:"block",mb:.5},children:"ID"}),(0,n.jsx)(l.Z,{variant:"body2",sx:{fontSize:"0.8rem",wordBreak:"break-all"},children:d.id})]}),(0,n.jsxs)(a.Z,{sx:{mb:3},children:[(0,n.jsx)(l.Z,{variant:"caption",color:"text.secondary",sx:{display:"block",mb:.5},children:"Timestamp"}),(0,n.jsx)(l.Z,{variant:"body2",children:function(e){let t=new Date(e);return new Intl.DateTimeFormat(void 0,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:"short"}).format(t)}(d.timestamp)})]}),(0,n.jsxs)(a.Z,{sx:{display:"flex",gap:3,mb:3},children:[(0,n.jsxs)(a.Z,{children:[(0,n.jsx)(l.Z,{variant:"caption",color:"text.secondary",sx:{display:"block",mb:.5},children:"Action"}),(0,n.jsx)(h.I,{action:d.action,size:"medium"})]}),(0,n.jsxs)(a.Z,{children:[(0,n.jsx)(l.Z,{variant:"caption",color:"text.secondary",sx:{display:"block",mb:.5},children:"Status"}),(0,n.jsx)(m.c,{status:d.status,size:"medium"})]})]}),(0,n.jsxs)(a.Z,{sx:{mb:3},children:[(0,n.jsx)(l.Z,{variant:"caption",color:"text.secondary",sx:{display:"block",mb:.5},children:"Actor"}),(0,n.jsx)(l.Z,{variant:"body2",children:d.actor})]}),(0,n.jsxs)(a.Z,{sx:{mb:3},children:[(0,n.jsx)(l.Z,{variant:"caption",color:"text.secondary",sx:{display:"block",mb:.5},children:"Target"}),(0,n.jsxs)(l.Z,{variant:"body2",children:[d.targetType,"/",d.targetName]})]}),"failure"===d.status&&d.errorMessage&&(0,n.jsx)(B.Z,{severity:"error",sx:{mb:3},children:d.errorMessage}),d.details&&Object.keys(d.details).length>0&&(0,n.jsxs)(a.Z,{sx:{mb:3},children:[(0,n.jsx)(_.Z,{sx:{mb:2}}),(0,n.jsx)(l.Z,{variant:"subtitle2",sx:{mb:1},children:"Details"}),(0,n.jsx)(V.Z,{size:"small",children:(0,n.jsx)(X.Z,{children:Object.entries(d.details).map(e=>{let[t,r]=e;return(0,n.jsxs)(H.Z,{children:[(0,n.jsx)(J.Z,{sx:{fontWeight:600,color:"text.secondary",border:"none",py:.5,pl:0,width:"40%"},children:t}),(0,n.jsx)(J.Z,{sx:{border:"none",py:.5},children:String(r)})]},t)})})})]}),(0,n.jsx)(_.Z,{sx:{mb:2}}),(0,n.jsx)(l.Z,{variant:"subtitle2",sx:{mb:1},children:"Related Logs"}),f?(0,n.jsx)(a.Z,{sx:{display:"flex",justifyContent:"center",py:3},children:(0,n.jsx)(et.Z,{size:24})}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(G.Z,{value:p,onChange:(e,t)=>g(t),sx:{mb:1},children:[(0,n.jsx)(Q.Z,{label:"Same Target (".concat(null!==(r=null==j?void 0:j.relatedLogs.sameTarget.length)&&void 0!==r?r:0,")"),sx:{textTransform:"none",fontSize:"0.8rem"}}),(0,n.jsx)(Q.Z,{label:"Same Actor (".concat(null!==(i=null==j?void 0:j.relatedLogs.sameActor.length)&&void 0!==i?i:0,")"),sx:{textTransform:"none",fontSize:"0.8rem"}})]}),0===p&&(0,n.jsx)(es,{logs:null!==(o=null==j?void 0:j.relatedLogs.sameTarget)&&void 0!==o?o:[]}),1===p&&(0,n.jsx)(es,{logs:null!==(c=null==j?void 0:j.relatedLogs.sameActor)&&void 0!==c?c:[]})]})]}):(0,n.jsx)(l.Z,{color:"text.secondary",children:"No log selected"})})]})}var ea=r(99770),eo=r(62508),el=r(5682),ec=r(76678),ed=r(15761);function eu(e){let{open:t,onClose:r,filters:i,totalCount:o}=e,[c,d]=(0,s.useState)("csv"),[u,x]=(0,s.useState)(!1),[h,m]=(0,s.useState)(null),p=function(e){let t=[];return e.action&&t.push("Action: ".concat(e.action)),e.actor&&t.push("Actor: ".concat(e.actor)),e.targetType&&t.push("Type: ".concat(e.targetType)),e.targetName&&t.push("Target: ".concat(e.targetName)),e.status&&t.push("Status: ".concat(e.status)),e.from&&t.push("From: ".concat(e.from.split("T")[0])),e.to&&t.push("To: ".concat(e.to.split("T")[0])),t}(i),g=async()=>{x(!0),m(null);try{let e=function(e,t){let r=new URLSearchParams;return r.set("format",t),e.action&&r.set("action",e.action),e.actor&&r.set("actor",e.actor),e.targetType&&r.set("targetType",e.targetType),e.targetName&&r.set("targetName",e.targetName),e.status&&r.set("status",e.status),e.from&&r.set("from",e.from),e.to&&r.set("to",e.to),"/api/audit-logs/export?".concat(r.toString())}(i,c),t=await fetch(e);if(!t.ok){let e=await t.json().catch(()=>({message:"Export failed"}));throw Error(e.message||"Export failed")}let n=await t.blob(),s=window.URL.createObjectURL(n),a=document.createElement("a");a.href=s;let o=t.headers.get("Content-Disposition"),l=null==o?void 0:o.match(/filename="?([^"]+)"?/);a.download=(null==l?void 0:l[1])||"audit-logs.".concat(c),document.body.appendChild(a),a.click(),document.body.removeChild(a),window.URL.revokeObjectURL(s),r()}catch(e){m(e instanceof Error?e.message:"Export failed")}finally{x(!1)}};return(0,n.jsxs)(ea.Z,{open:t,onClose:r,maxWidth:"sm",fullWidth:!0,children:[(0,n.jsx)(eo.Z,{children:"Export Audit Logs"}),(0,n.jsxs)(el.Z,{children:[(0,n.jsxs)(a.Z,{sx:{mb:3},children:[(0,n.jsx)(l.Z,{variant:"subtitle2",sx:{mb:1},children:"Format"}),(0,n.jsxs)(I.Z,{value:c,exclusive:!0,onChange:(e,t)=>t&&d(t),size:"small",children:[(0,n.jsx)(E.Z,{value:"csv",children:"CSV"}),(0,n.jsx)(E.Z,{value:"json",children:"JSON"})]})]}),(0,n.jsxs)(a.Z,{sx:{mb:3},children:[(0,n.jsx)(l.Z,{variant:"subtitle2",sx:{mb:1},children:"Applied Filters"}),p.length>0?(0,n.jsx)(a.Z,{sx:{display:"flex",flexDirection:"column",gap:.5},children:p.map(e=>(0,n.jsx)(l.Z,{variant:"body2",color:"text.secondary",children:e},e))}):(0,n.jsx)(l.Z,{variant:"body2",color:"text.secondary",children:"No filters applied (all logs)"})]}),(0,n.jsxs)(a.Z,{sx:{mb:2},children:[(0,n.jsx)(l.Z,{variant:"subtitle2",sx:{mb:.5},children:"Estimated Rows"}),(0,n.jsxs)(l.Z,{variant:"body2",color:"text.secondary",children:[Math.min(o,5e3).toLocaleString()," rows"]})]}),o>5e3&&(0,n.jsxs)(B.Z,{severity:"warning",sx:{mb:2},children:["Export is limited to ",5e3.toLocaleString()," rows. Total matching logs: ",o.toLocaleString(),". Consider narrowing your filters for a complete export."]}),h&&(0,n.jsx)(B.Z,{severity:"error",sx:{mb:2},children:h})]}),(0,n.jsxs)(ec.Z,{children:[(0,n.jsx)(N.Z,{onClick:r,disabled:u,children:"Cancel"}),(0,n.jsx)(N.Z,{variant:"contained",startIcon:u?(0,n.jsx)(et.Z,{size:16,color:"inherit"}):(0,n.jsx)(ed.Z,{}),onClick:g,disabled:u,children:u?"Exporting...":"Export ".concat(c.toUpperCase())})]})]})}var ex=r(93757);function eh(){var e,t,r;let h=(0,i.useRouter)(),m=(0,i.useSearchParams)(),[p,g]=(0,s.useState)(()=>(function(e){let t={},r=e.get("action"),n=e.get("actor"),s=e.get("targetType"),i=e.get("targetName"),a=e.get("status"),o=e.get("from"),l=e.get("to"),c=e.get("limit"),d=e.get("offset"),u=e.get("sort");return r&&(t.action=r),n&&(t.actor=n),s&&(t.targetType=s),i&&(t.targetName=i),a&&(t.status=a),o&&(t.from=o),l&&(t.to=l),c&&(t.limit=parseInt(c,10)),d&&(t.offset=parseInt(d,10)),("timestamp:asc"===u||"timestamp:desc"===u)&&(t.sort=u),t})(m)),[j,f]=(0,s.useState)(null),[v,Z]=(0,s.useState)(!1),[y,b]=(0,s.useState)(!1),[C,w]=(0,s.useState)(0),T=(0,s.useRef)(new Set),{data:k,isLoading:z,error:N,refetch:R}=(0,en.hT)(p),{data:A,isLoading:E}=(0,en.DM)(),{isConnected:I}=(0,ex.D)({url:"/api/audit-logs/stream",enabled:!0,onMessage:(0,s.useCallback)(e=>{if("audit-log"===e.type){let t=e.data;if("id"in t&&"string"==typeof t.id){if(T.current.has(t.id))return;if(T.current.add(t.id),T.current.size>1e3){let e=Array.from(T.current);T.current=new Set(e.slice(e.length-500))}}w(e=>e+1)}},[]),reconnectInterval:3e3,maxReconnectAttempts:1/0});(0,s.useEffect)(()=>{let e=function(e){let t=new URLSearchParams;e.action&&t.set("action",e.action),e.actor&&t.set("actor",e.actor),e.targetType&&t.set("targetType",e.targetType),e.targetName&&t.set("targetName",e.targetName),e.status&&t.set("status",e.status),e.from&&t.set("from",e.from),e.to&&t.set("to",e.to),e.limit&&50!==e.limit&&t.set("limit",String(e.limit)),e.offset&&e.offset>0&&t.set("offset",String(e.offset)),e.sort&&"timestamp:desc"!==e.sort&&t.set("sort",e.sort);let r=t.toString();return r?"?".concat(r):""}(p);e!==(m.toString()?"?".concat(m.toString()):"")&&h.replace("/audit-logs".concat(e),{scroll:!1})},[p,h,m]);let L=(0,s.useCallback)(e=>{g(e),w(0)},[]),F=(0,s.useCallback)(e=>{f(e),Z(!0)},[]),D=(0,s.useCallback)(()=>{w(0),R()},[R]);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o.Z,{elevation:0,sx:{mb:4,p:3,background:e=>"linear-gradient(135deg, ".concat((0,d.Fq)(e.palette.warning.main,.1)," 0%, ").concat((0,d.Fq)(e.palette.error.main,.1)," 100%)"),borderRadius:2,border:e=>"1px solid ".concat((0,d.Fq)(e.palette.warning.main,.2))},children:(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",gap:2},children:[(0,n.jsx)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:56,height:56,borderRadius:2,bgcolor:"warning.main",color:"warning.contrastText"},children:(0,n.jsx)(u.Z,{sx:{fontSize:32}})}),(0,n.jsxs)(a.Z,{sx:{flex:1},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",gap:1.5},children:[(0,n.jsx)(l.Z,{variant:"h4",component:"h1",fontWeight:"bold",children:"Audit Log"}),(0,n.jsx)(c.Z,{icon:(0,n.jsx)(x.Z,{sx:{fontSize:10,color:I?"success.main":"text.disabled",animation:I?"pulse 2s infinite":"none","@keyframes pulse":{"0%":{opacity:1},"50%":{opacity:.4},"100%":{opacity:1}}}}),label:I?"Live":"Offline",size:"small",variant:"outlined",sx:{fontSize:"0.7rem"}})]}),(0,n.jsx)(l.Z,{variant:"body1",color:"text.secondary",children:"Monitor all management activities across your servers"})]})]})}),(0,n.jsx)(a.Z,{sx:{mb:3},children:(0,n.jsx)(S,{stats:A,isLoading:E})}),C>0&&(0,n.jsx)(a.Z,{sx:{mb:2,p:1.5,textAlign:"center",bgcolor:"primary.main",color:"primary.contrastText",borderRadius:1,cursor:"pointer","&:hover":{opacity:.9}},onClick:D,role:"button","aria-label":"".concat(C," new logs, click to refresh"),children:(0,n.jsxs)(l.Z,{variant:"body2",fontWeight:600,children:[C," new ",1===C?"log":"logs"," available - Click to refresh"]})}),(0,n.jsx)(U,{filters:p,onFiltersChange:L,onExport:()=>b(!0)}),(0,n.jsx)(q.x,{logs:null!==(e=null==k?void 0:k.logs)&&void 0!==e?e:[],total:null!==(t=null==k?void 0:k.total)&&void 0!==t?t:0,isLoading:z,error:N,filters:p,onFiltersChange:L,onRowClick:F,onRetry:()=>R()}),(0,n.jsx)(ei,{log:j,open:v,onClose:()=>{Z(!1),f(null)}}),(0,n.jsx)(eu,{open:y,onClose:()=>b(!1),filters:p,totalCount:null!==(r=null==k?void 0:k.total)&&void 0!==r?r:0})]})}},56813:function(e,t,r){"use strict";r.d(t,{I:function(){return a}});var n=r(94655),s=r(25333),i=r(82925);function a(e){let{action:t,size:r="small"}=e,a=i.Lu[t]||"default",o=i.n3[t]||t;return(0,n.jsx)(s.Z,{label:o,color:a,size:r,variant:"filled",sx:{fontWeight:600,fontSize:"small"===r?"0.7rem":"0.8rem"}})}},26892:function(e,t,r){"use strict";r.d(t,{c:function(){return o}});var n=r(94655),s=r(25333),i=r(46207),a=r(43436);function o(e){let{status:t,size:r="small"}=e;return(0,n.jsx)(s.Z,{icon:"success"===t?(0,n.jsx)(i.Z,{}):(0,n.jsx)(a.Z,{}),label:"success"===t?"OK":"Error",color:"success"===t?"success":"error",size:r,variant:"outlined",sx:{fontWeight:500,fontSize:"small"===r?"0.7rem":"0.8rem"}})}},83765:function(e,t,r){"use strict";r.d(t,{x:function(){return A}});var n=r(94655),s=r(35106),i=r(7281),a=r(21138),o=r(84811),l=r(47001),c=r(53281),d=r(11254),u=r(70366),x=r(6406),h=r(69899),m=r(31317),p=r(95511),g=r(10721),j=r(81071),f=r(30417),v=r(25333),Z=r(87716),y=r(79983),b=r(89161),S=r(60236),C=r(27171),w=r(30114),T=r(69178),k=r(46725),z=r(56813),N=r(26892);function R(e){var t,r;let{log:c,onClick:d,hideTargetColumn:x}=e,[h,g]=(0,s.useState)("failure"===c.status),f=c.details&&Object.keys(c.details).length>0,T="failure"===c.status&&c.errorMessage,R=f||T,A=(t=c.targetType,r=c.targetName,"server"===t?"/servers/".concat(encodeURIComponent(r)):"player"===t?"/players":null);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(u.Z,{hover:!0,sx:{cursor:"pointer","&:last-child td, &:last-child th":{border:0}},onClick:()=>null==d?void 0:d(c),tabIndex:0,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),null==d||d(c))},role:"button","aria-label":"".concat(c.action," by ").concat(c.actor," on ").concat(c.targetName),children:[(0,n.jsx)(l.Z,{padding:"checkbox",sx:{width:48},children:R&&(0,n.jsx)(y.Z,{size:"small",onClick:e=>{e.stopPropagation(),g(!h)},"aria-label":h?"Collapse details":"Expand details",children:h?(0,n.jsx)(S.Z,{}):(0,n.jsx)(b.Z,{})})}),(0,n.jsx)(l.Z,{children:(0,n.jsx)(p.Z,{title:function(e){let t=new Date(e);return new Intl.DateTimeFormat(void 0,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:"short"}).format(t)}(c.timestamp),arrow:!0,children:(0,n.jsx)(m.Z,{variant:"body2",color:"text.secondary",sx:{whiteSpace:"nowrap"},children:function(e){let t=new Date,r=new Date(e),n=Math.floor((t.getTime()-r.getTime())/1e3),s=Math.floor(n/60),i=Math.floor(s/60),a=Math.floor(i/24);return n<60?"just now":s<60?"".concat(s,"m ago"):i<24?"".concat(i,"h ago"):a<7?"".concat(a,"d ago"):new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"}).format(r)}(c.timestamp)})})}),(0,n.jsx)(l.Z,{children:(0,n.jsx)(z.I,{action:c.action})}),(0,n.jsx)(l.Z,{children:c.actor.startsWith("cli:")?(0,n.jsx)(v.Z,{label:c.actor.replace("cli:",""),size:"small",variant:"outlined",sx:{fontSize:"0.75rem"}}):(0,n.jsx)(m.Z,{variant:"body2",children:c.actor.replace("api:","")})}),!x&&(0,n.jsx)(l.Z,{children:(0,n.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center"},children:[function(e){switch(e){case"server":return(0,n.jsx)(C.Z,{sx:{fontSize:16,mr:.5,color:"text.secondary"}});case"player":return(0,n.jsx)(w.Z,{sx:{fontSize:16,mr:.5,color:"text.secondary"}});default:return null}}(c.targetType),A?(0,n.jsx)(k.default,{href:A,style:{textDecoration:"none"},onClick:e=>e.stopPropagation(),children:(0,n.jsx)(m.Z,{variant:"body2",sx:{color:"primary.main","&:hover":{textDecoration:"underline"}},children:c.targetName})}):(0,n.jsx)(m.Z,{variant:"body2",children:c.targetName})]})}),(0,n.jsx)(l.Z,{children:(0,n.jsx)(N.c,{status:c.status})})]}),R&&(0,n.jsx)(u.Z,{children:(0,n.jsx)(l.Z,{sx:{py:0},colSpan:x?5:6,children:(0,n.jsx)(Z.Z,{in:h,timeout:"auto",unmountOnExit:!0,children:(0,n.jsxs)(i.Z,{sx:{py:2,px:2},children:[T&&(0,n.jsx)(j.Z,{severity:"error",sx:{mb:2},children:c.errorMessage}),f&&(0,n.jsxs)(i.Z,{children:[(0,n.jsx)(m.Z,{variant:"caption",color:"text.secondary",sx:{mb:1,display:"block"},children:"Details"}),(0,n.jsx)(a.Z,{size:"small",sx:{width:"auto"},children:(0,n.jsx)(o.Z,{children:Object.entries(c.details).map(e=>{let[t,r]=e;return(0,n.jsxs)(u.Z,{children:[(0,n.jsx)(l.Z,{sx:{fontWeight:600,color:"text.secondary",border:"none",py:.5,pl:0},children:t}),(0,n.jsx)(l.Z,{sx:{border:"none",py:.5},children:String(r)})]},t)})})})]})]})})})})]})}function A(e){let{logs:t,total:r,isLoading:s,error:i,filters:p,onFiltersChange:v,onRowClick:Z,onRetry:y,hideTargetColumn:b,rowsPerPageOptions:S=[25,50,100]}=e,C=Math.floor((p.offset||0)/(p.limit||50)),w=p.limit||50;return s?(0,n.jsx)(h.Z,{children:(0,n.jsx)(c.Z,{children:(0,n.jsxs)(a.Z,{children:[(0,n.jsx)(d.Z,{children:(0,n.jsxs)(u.Z,{children:[(0,n.jsx)(l.Z,{padding:"checkbox"}),(0,n.jsx)(l.Z,{children:"Timestamp"}),(0,n.jsx)(l.Z,{children:"Action"}),(0,n.jsx)(l.Z,{children:"Actor"}),!b&&(0,n.jsx)(l.Z,{children:"Target"}),(0,n.jsx)(l.Z,{children:"Status"})]})}),(0,n.jsx)(o.Z,{children:[void 0,void 0,void 0,void 0,void 0].map((e,t)=>(0,n.jsxs)(u.Z,{children:[(0,n.jsx)(l.Z,{padding:"checkbox"}),(0,n.jsx)(l.Z,{children:(0,n.jsx)(g.Z,{variant:"text",width:80})}),(0,n.jsx)(l.Z,{children:(0,n.jsx)(g.Z,{variant:"rounded",width:70,height:24})}),(0,n.jsx)(l.Z,{children:(0,n.jsx)(g.Z,{variant:"text",width:60})}),!b&&(0,n.jsx)(l.Z,{children:(0,n.jsx)(g.Z,{variant:"text",width:100})}),(0,n.jsx)(l.Z,{children:(0,n.jsx)(g.Z,{variant:"rounded",width:50,height:24})})]},t))})]})})}):i?(0,n.jsx)(j.Z,{severity:"error",action:y&&(0,n.jsx)(f.Z,{color:"inherit",size:"small",onClick:y,children:"Retry"}),children:i.message||"Failed to load audit logs"}):0===t.length?(0,n.jsxs)(h.Z,{sx:{p:6,textAlign:"center"},children:[(0,n.jsx)(T.Z,{sx:{fontSize:64,color:"text.disabled",mb:2}}),(0,n.jsx)(m.Z,{variant:"h6",color:"text.secondary",gutterBottom:!0,children:"No audit logs found"}),(0,n.jsx)(m.Z,{variant:"body2",color:"text.disabled",sx:{mb:2},children:"Try adjusting your filters or check back later."}),(0,n.jsx)(f.Z,{variant:"outlined",size:"small",onClick:()=>v({limit:p.limit,sort:p.sort}),children:"Reset Filters"})]}):(0,n.jsxs)(h.Z,{children:[(0,n.jsx)(c.Z,{sx:{overflowX:"auto"},children:(0,n.jsxs)(a.Z,{size:"small",children:[(0,n.jsx)(d.Z,{children:(0,n.jsxs)(u.Z,{children:[(0,n.jsx)(l.Z,{padding:"checkbox",sx:{width:48}}),(0,n.jsx)(l.Z,{sx:{fontWeight:600,whiteSpace:"nowrap"},children:"Timestamp"}),(0,n.jsx)(l.Z,{sx:{fontWeight:600},children:"Action"}),(0,n.jsx)(l.Z,{sx:{fontWeight:600},children:"Actor"}),!b&&(0,n.jsx)(l.Z,{sx:{fontWeight:600},children:"Target"}),(0,n.jsx)(l.Z,{sx:{fontWeight:600},children:"Status"})]})}),(0,n.jsx)(o.Z,{children:t.map(e=>(0,n.jsx)(R,{log:e,onClick:Z,hideTargetColumn:b},e.id))})]})}),(0,n.jsx)(x.Z,{component:"div",count:r,page:C,onPageChange:(e,t)=>{v({...p,offset:t*w})},rowsPerPage:w,onRowsPerPageChange:e=>{let t=parseInt(e.target.value,10);v({...p,limit:t,offset:0})},rowsPerPageOptions:S,"aria-label":"Audit log pagination"})]})}},42936:function(e,t,r){"use strict";async function n(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={...t.headers};t.body&&(r["Content-Type"]="application/json");let n=await fetch(e,{...t,headers:r});if(!n.ok){let e=await n.json().catch(()=>({error:"UnknownError",message:n.statusText})),t=Error(e.message);throw t.statusCode=n.status,t.code=e.error,t}return n.json()}r.d(t,{SC:function(){return n}})},84509:function(e,t,r){"use strict";r.d(t,{DM:function(){return a},HZ:function(){return l},VM:function(){return o},hT:function(){return i},oL:function(){return c}});var n=r(98324),s=r(42936);function i(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=function(e){let t=new URLSearchParams;e.action&&t.set("action",e.action),e.actor&&t.set("actor",e.actor),e.targetType&&t.set("targetType",e.targetType),e.targetName&&t.set("targetName",e.targetName),e.status&&t.set("status",e.status),e.from&&t.set("from",e.from),e.to&&t.set("to",e.to),void 0!==e.limit&&t.set("limit",String(e.limit)),void 0!==e.offset&&t.set("offset",String(e.offset)),e.sort&&t.set("sort",e.sort);let r=t.toString();return r?"?".concat(r):""}(e);return(0,n.a)({queryKey:["audit-logs",e],queryFn:()=>(0,s.SC)("/api/audit-logs".concat(r)),enabled:(null==t?void 0:t.enabled)!==!1})}function a(e){return(0,n.a)({queryKey:["audit-logs","stats"],queryFn:()=>(0,s.SC)("/api/audit-logs/stats"),enabled:(null==e?void 0:e.enabled)!==!1,refetchInterval:3e4})}function o(e,t){return(0,n.a)({queryKey:["audit-logs",e],queryFn:()=>(0,s.SC)("/api/audit-logs/".concat(encodeURIComponent(e))),enabled:(null==t?void 0:t.enabled)!==!1&&!!e})}function l(e,t){var r;return i({targetType:"server",targetName:e,limit:null!==(r=null==t?void 0:t.limit)&&void 0!==r?r:20,...null==t?void 0:t.extraParams},{enabled:(null==t?void 0:t.enabled)!==!1&&!!e})}function c(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10;return i({limit:e,sort:"timestamp:desc"})}},93757:function(e,t,r){"use strict";r.d(t,{D:function(){return i}});var n=r(35106);class s{connect(e){this.options=e,this.shouldReconnect=!0,this.establishConnection()}establishConnection(){this.options&&(this.updateState("connecting"),this.eventSource&&this.eventSource.close(),this.eventSource=new EventSource(this.options.url,{withCredentials:this.options.withCredentials||!1}),this.eventSource.onopen=()=>{this.updateState("connected"),this.retryCount=0,this.lastError=null},this.eventSource.onmessage=e=>{if(!e.data.startsWith(":"))try{var t,r;let n=JSON.parse(e.data);null===(r=this.options)||void 0===r||null===(t=r.onMessage)||void 0===t||t.call(r,n)}catch(e){console.warn("Failed to parse SSE message:",e)}},this.eventSource.onerror=()=>{var e,t;let r={message:"SSE connection error",code:"CONNECTION_ERROR",retryCount:this.retryCount,timestamp:new Date};this.lastError=r,this.updateState("error"),null===(t=this.options)||void 0===t||null===(e=t.onError)||void 0===e||e.call(t,r),this.shouldReconnect&&this.scheduleReconnect()})}scheduleReconnect(){var e,t;if(!this.options)return;let r=null!==(e=this.options.maxReconnectAttempts)&&void 0!==e?e:1/0;if(this.retryCount>=r)return;this.reconnectTimer&&clearTimeout(this.reconnectTimer);let n=null!==(t=this.options.reconnectInterval)&&void 0!==t?t:3e3;this.reconnectTimer=setTimeout(()=>{this.retryCount++,this.establishConnection()},n)}disconnect(){this.shouldReconnect=!1,this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.eventSource&&(this.eventSource.close(),this.eventSource=null),this.updateState("disconnected")}getState(){return this.state}isConnected(){return"connected"===this.state}getLastError(){return this.lastError}getRetryCount(){return this.retryCount}reconnect(){this.retryCount++,this.shouldReconnect=!0,this.eventSource&&(this.eventSource.close(),this.eventSource=null),this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.establishConnection()}updateState(e){var t,r;this.state=e,null===(r=this.options)||void 0===r||null===(t=r.onStateChange)||void 0===t||t.call(r,e)}constructor(){this.eventSource=null,this.state="disconnected",this.retryCount=0,this.lastError=null,this.reconnectTimer=null,this.options=null,this.shouldReconnect=!0}}function i(e){let{url:t,onMessage:r,onError:i,reconnectInterval:a=3e3,maxReconnectAttempts:o=1/0,enabled:l=!0,withCredentials:c=!1}=e,[d,u]=(0,n.useState)(null),[x,h]=(0,n.useState)("disconnected"),[m,p]=(0,n.useState)(null),[g,j]=(0,n.useState)(0),f=(0,n.useRef)(null),v=(0,n.useCallback)(e=>{u(e),null==r||r(e)},[r]),Z=(0,n.useCallback)(e=>{h(e),"connected"===e&&j(0)},[]),y=(0,n.useCallback)(e=>{p(e),"number"==typeof e.retryCount&&j(e.retryCount),null==i||i(e)},[i]),b=(0,n.useCallback)(()=>{f.current&&(f.current.reconnect(),j(f.current.getRetryCount()))},[]),S=(0,n.useCallback)(()=>{f.current&&f.current.disconnect()},[]);return(0,n.useEffect)(()=>{if(!l){f.current&&(f.current.disconnect(),f.current=null);return}return f.current||(f.current=new s),f.current.connect({url:t,onMessage:v,onStateChange:Z,onError:y,reconnectInterval:a,maxReconnectAttempts:o,withCredentials:c}),()=>{f.current&&(f.current.disconnect(),f.current=null)}},[t,l,a,o,c,v,Z,y]),{data:d,isConnected:"connected"===x,state:x,error:m,retryCount:g,reconnect:b,disconnect:S}}},82925:function(e,t,r){"use strict";r.d(t,{KK:function(){return o},Lu:function(){return n},Xn:function(){return a},n3:function(){return s},xg:function(){return i}});let n={"server.create":"success","server.delete":"error","server.start":"info","server.stop":"warning","server.restart":"secondary","player.whitelist.add":"success","player.whitelist.remove":"warning","player.ban":"error","player.unban":"success","player.op":"info","player.deop":"warning","player.kick":"error","audit.purge":"default"},s={"server.create":"Create","server.delete":"Delete","server.start":"Start","server.stop":"Stop","server.restart":"Restart","player.whitelist.add":"Whitelist Add","player.whitelist.remove":"Whitelist Remove","player.ban":"Ban","player.unban":"Unban","player.op":"Op","player.deop":"Deop","player.kick":"Kick","audit.purge":"Purge"},i=["server.create","server.delete","server.start","server.stop","server.restart","player.whitelist.add","player.whitelist.remove","player.ban","player.unban","player.op","player.deop","player.kick","audit.purge"],a=["server.create","server.delete","server.start","server.stop","server.restart"],o=["player.whitelist.add","player.whitelist.remove","player.ban","player.unban","player.op","player.deop","player.kick"]}},function(e){e.O(0,[6812,9760,5004,7296,7436,1071,540,9986,2538,5511,3938,55,2844,4920,8347,7632,4302,6648,310,3669,2757,1744],function(){return e(e.s=3590)}),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6302],{1366:function(e,n,t){Promise.resolve().then(t.bind(t,37006))},37006:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return eP}});var s=t(94655),a=t(35106),l=t(31317),i=t(7281),r=t(69899),o=t(70115),c=t(76492),d=t(91606),u=t(628),h=t(41565),x=t(25333),m=t(46207),p=t(43436),j=t(92666);function f(){let{data:e,isLoading:n,error:t}=(0,j.mj)();if(n)return(0,s.jsx)(u.Z,{children:(0,s.jsxs)(h.Z,{children:[(0,s.jsx)(l.Z,{variant:"h6",gutterBottom:!0,children:"Backup Status"}),(0,s.jsx)(l.Z,{color:"text.secondary",children:"Loading..."})]})});if(t)return(0,s.jsx)(u.Z,{children:(0,s.jsxs)(h.Z,{children:[(0,s.jsx)(l.Z,{variant:"h6",gutterBottom:!0,children:"Backup Status"}),(0,s.jsx)(l.Z,{color:"error",children:"Failed to load backup status"})]})});let{configured:a,lastBackup:r,repository:o}=e||{};return(0,s.jsx)(u.Z,{children:(0,s.jsxs)(h.Z,{children:[(0,s.jsxs)(i.Z,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2},children:[(0,s.jsx)(l.Z,{variant:"h6",children:"Backup Status"}),(0,s.jsx)(x.Z,{icon:a?(0,s.jsx)(m.Z,{}):(0,s.jsx)(p.Z,{}),label:a?"Configured":"Not Configured",color:a?"success":"error",size:"small"})]}),a?(0,s.jsxs)(i.Z,{sx:{display:"flex",flexDirection:"column",gap:1},children:[o&&(0,s.jsxs)(i.Z,{children:[(0,s.jsx)(l.Z,{variant:"caption",color:"text.secondary",children:"Repository"}),(0,s.jsx)(l.Z,{variant:"body2",sx:{fontFamily:"monospace",fontSize:"0.875rem"},children:o})]}),r&&(0,s.jsxs)(i.Z,{children:[(0,s.jsx)(l.Z,{variant:"caption",color:"text.secondary",children:"Last Backup"}),(0,s.jsx)(l.Z,{variant:"body2",children:function(e){let n=new Date,t=new Date(e),s=Math.floor((n.getTime()-t.getTime())/6e4),a=Math.floor(s/60);return s<1?"just now":s<60?"".concat(s," minutes ago"):a<24?"".concat(a," hours ago"):"".concat(Math.floor(a/24)," days ago")}(r)})]}),!r&&(0,s.jsx)(l.Z,{variant:"body2",color:"text.secondary",children:"No backups yet"})]}):(0,s.jsx)(l.Z,{variant:"body2",color:"text.secondary",children:"GitHub backup is not configured. Please configure BACKUP_REPO_URL in your environment."})]})})}var g=t(21138),Z=t(84811),v=t(47001),y=t(53281),b=t(11254),C=t(70366),S=t(79983),k=t(97731),w=t(30417),z=t(99770),D=t(76678),P=t(5682),A=t(65087),B=t(62508),I=t(81071),F=t(93017);function R(e){var n;let{open:t,commit:r,onClose:o}=e,{mutate:c,isPending:d}=(0,j.s8)(),[u,h]=(0,a.useState)(""),[x,m]=(0,a.useState)(""),p=()=>{d||(h(""),m(""),o())};return(0,s.jsxs)(z.Z,{open:t,onClose:p,maxWidth:"sm",fullWidth:!0,children:[(0,s.jsx)(B.Z,{children:"Restore Backup"}),(0,s.jsxs)(P.Z,{children:[(0,s.jsx)(I.Z,{severity:"warning",sx:{mb:2},children:"This will restore all worlds from the selected backup. Current world data will be overwritten."}),u&&(0,s.jsx)(I.Z,{severity:"success",sx:{mb:2},children:u}),x&&(0,s.jsx)(I.Z,{severity:"error",sx:{mb:2},children:x}),(0,s.jsx)(A.Z,{sx:{mb:2},children:"Are you sure you want to restore from this backup?"}),(0,s.jsxs)(i.Z,{sx:{display:"flex",flexDirection:"column",gap:1},children:[(0,s.jsxs)(i.Z,{children:[(0,s.jsx)(l.Z,{variant:"caption",color:"text.secondary",children:"Commit Hash"}),(0,s.jsx)(l.Z,{variant:"body2",sx:{fontFamily:"monospace",fontSize:"0.875rem"},children:r.hash})]}),(0,s.jsxs)(i.Z,{children:[(0,s.jsx)(l.Z,{variant:"caption",color:"text.secondary",children:"Date"}),(0,s.jsx)(l.Z,{variant:"body2",children:(n=r.date,new Intl.DateTimeFormat(void 0,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date(n)))})]}),(0,s.jsxs)(i.Z,{children:[(0,s.jsx)(l.Z,{variant:"caption",color:"text.secondary",children:"Message"}),(0,s.jsx)(l.Z,{variant:"body2",children:r.message})]}),(0,s.jsxs)(i.Z,{children:[(0,s.jsx)(l.Z,{variant:"caption",color:"text.secondary",children:"Author"}),(0,s.jsx)(l.Z,{variant:"body2",children:r.author})]})]})]}),(0,s.jsxs)(D.Z,{children:[(0,s.jsx)(w.Z,{onClick:p,disabled:d,children:"Cancel"}),(0,s.jsx)(w.Z,{onClick:()=>{h(""),m(""),c(r.hash,{onSuccess:()=>{h("Backup restored successfully from ".concat(r.hash.substring(0,7))),setTimeout(()=>{o()},2e3)},onError:e=>{m("Failed to restore backup: ".concat(e.message))}})},variant:"contained",color:"warning",disabled:d,startIcon:d?(0,s.jsx)(F.Z,{size:16}):(0,s.jsx)(k.Z,{}),children:d?"Restoring...":"Restore"})]})]})}function T(){let{data:e,isLoading:n,error:t}=(0,j.$t)(20),[i,r]=(0,a.useState)(null),o=e=>{r(e)};if(n)return(0,s.jsx)(u.Z,{children:(0,s.jsxs)(h.Z,{children:[(0,s.jsx)(l.Z,{variant:"h6",gutterBottom:!0,children:"Backup History"}),(0,s.jsx)(l.Z,{color:"text.secondary",children:"Loading..."})]})});if(t)return(0,s.jsx)(u.Z,{children:(0,s.jsxs)(h.Z,{children:[(0,s.jsx)(l.Z,{variant:"h6",gutterBottom:!0,children:"Backup History"}),(0,s.jsx)(l.Z,{color:"error",children:"Failed to load backup history"})]})});let c=(null==e?void 0:e.commits)||[];return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(u.Z,{children:(0,s.jsxs)(h.Z,{children:[(0,s.jsx)(l.Z,{variant:"h6",gutterBottom:!0,children:"Backup History"}),0===c.length?(0,s.jsx)(l.Z,{color:"text.secondary",children:"No backup history available"}):(0,s.jsx)(y.Z,{children:(0,s.jsxs)(g.Z,{children:[(0,s.jsx)(b.Z,{children:(0,s.jsxs)(C.Z,{children:[(0,s.jsx)(v.Z,{children:"Commit"}),(0,s.jsx)(v.Z,{children:"Date"}),(0,s.jsx)(v.Z,{children:"Message"}),(0,s.jsx)(v.Z,{children:"Author"}),(0,s.jsx)(v.Z,{align:"right",children:"Actions"})]})}),(0,s.jsx)(Z.Z,{children:c.map(e=>{var n;return(0,s.jsxs)(C.Z,{children:[(0,s.jsx)(v.Z,{children:(0,s.jsx)(x.Z,{label:e.hash.substring(0,7),size:"small",variant:"outlined",sx:{fontFamily:"monospace"}})}),(0,s.jsx)(v.Z,{children:(0,s.jsx)(l.Z,{variant:"body2",children:(n=e.date,new Intl.DateTimeFormat(void 0,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}).format(new Date(n)))})}),(0,s.jsx)(v.Z,{children:(0,s.jsx)(l.Z,{variant:"body2",children:e.message})}),(0,s.jsx)(v.Z,{children:(0,s.jsx)(l.Z,{variant:"body2",color:"text.secondary",children:e.author})}),(0,s.jsx)(v.Z,{align:"right",children:(0,s.jsx)(S.Z,{size:"small",color:"primary",onClick:()=>o(e),title:"Restore this backup",children:(0,s.jsx)(k.Z,{})})})]},e.hash)})})]})})]})}),i&&(0,s.jsx)(R,{open:!!i,commit:i,onClose:()=>{r(null)}})]})}var W=t(97436),E=t(34675);function N(e){let{disabled:n}=e,[t,l]=(0,a.useState)(!1),[i,r]=(0,a.useState)(""),[o,c]=(0,a.useState)(""),[d,u]=(0,a.useState)(""),{mutate:h,isPending:x}=(0,j.c5)(),m=()=>{x||(l(!1),r(""),c(""),u(""))};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(w.Z,{variant:"contained",startIcon:(0,s.jsx)(E.Z,{}),onClick:()=>{l(!0),c(""),u(""),r("Backup ".concat(new Date().toISOString().split("T")[0]))},disabled:n||x,children:"Push Backup"}),(0,s.jsxs)(z.Z,{open:t,onClose:m,maxWidth:"sm",fullWidth:!0,children:[(0,s.jsx)(B.Z,{children:"Push Backup"}),(0,s.jsxs)(P.Z,{children:[o&&(0,s.jsx)(I.Z,{severity:"success",sx:{mb:2},children:o}),d&&(0,s.jsx)(I.Z,{severity:"error",sx:{mb:2},children:d}),(0,s.jsx)(W.Z,{autoFocus:!0,margin:"dense",label:"Commit Message",type:"text",fullWidth:!0,variant:"outlined",value:i,onChange:e=>r(e.target.value),disabled:x,helperText:"Optional message describing this backup"})]}),(0,s.jsxs)(D.Z,{children:[(0,s.jsx)(w.Z,{onClick:m,disabled:x,children:"Cancel"}),(0,s.jsx)(w.Z,{onClick:()=>{c(""),u(""),h({message:i||void 0},{onSuccess:e=>{c(e.commitHash?"Backup pushed successfully (".concat(e.commitHash.substring(0,7),")"):"Backup pushed successfully"),setTimeout(()=>{m()},2e3)},onError:e=>{u("Failed to push backup: ".concat(e.message))}})},variant:"contained",disabled:x,startIcon:x?(0,s.jsx)(F.Z,{size:16}):(0,s.jsx)(E.Z,{}),children:x?"Pushing...":"Push"})]})]})]})}var M=t(38393),q=t(95511),L=t(69123),U=t(32366),O=t(45813),H=t(21111),K=t(54211),V=t(29793),_=t(75726),Q=t(62328),J=t(7178);let G=[{label:"Every hour",value:"0 * * * *"},{label:"Every 6 hours",value:"0 */6 * * *"},{label:"Every 12 hours",value:"0 */12 * * *"},{label:"Daily at 3 AM",value:"0 3 * * *"},{label:"Weekly (Sunday 3 AM)",value:"0 3 * * 0"},{label:"Custom",value:"custom"}];function Y(e){let{open:n,schedule:t,onClose:r}=e,c=(0,j.tT)(),d=(0,j.CA)(),u=!!t,[h,m]=(0,a.useState)(""),[p,f]=(0,a.useState)(""),[g,Z]=(0,a.useState)(""),[v,y]=(0,a.useState)(""),[b,C]=(0,a.useState)(""),[S,k]=(0,a.useState)("");(0,a.useEffect)(()=>{if(n){if(t){var e,s,a,l;m(t.name);let n=G.find(e=>e.value===t.cronExpression);n?(f(n.value),Z("")):(f("custom"),Z(t.cronExpression)),y(null!==(a=null===(e=t.retentionPolicy.maxCount)||void 0===e?void 0:e.toString())&&void 0!==a?a:""),C(null!==(l=null===(s=t.retentionPolicy.maxAgeDays)||void 0===s?void 0:s.toString())&&void 0!==l?l:"")}else m(""),f("0 3 * * *"),Z(""),y("10"),C("30");k("")}},[n,t]);let A=()=>"custom"===p?g.trim():p,F=async()=>{k("");let e=A();if(!h.trim()){k("Name is required");return}if(!e){k("Cron expression is required");return}try{u&&t?await d.mutateAsync({id:t.id,data:{name:h.trim(),cron:e,...v?{maxCount:parseInt(v,10)}:{},...b?{maxAgeDays:parseInt(b,10)}:{}}}):await c.mutateAsync({name:h.trim(),cron:e,...v?{maxCount:parseInt(v,10)}:{},...b?{maxAgeDays:parseInt(b,10)}:{},enabled:!0}),r()}catch(e){k(e.message||"Failed to save schedule")}},R=c.isPending||d.isPending;return(0,s.jsxs)(z.Z,{open:n,onClose:r,maxWidth:"sm",fullWidth:!0,children:[(0,s.jsx)(B.Z,{children:u?"Edit Backup Schedule":"Create Backup Schedule"}),(0,s.jsx)(P.Z,{children:(0,s.jsxs)(o.Z,{spacing:2.5,sx:{mt:1},children:[S&&(0,s.jsx)(I.Z,{severity:"error",onClose:()=>k(""),children:S}),(0,s.jsx)(W.Z,{label:"Schedule Name",value:h,onChange:e=>m(e.target.value),fullWidth:!0,required:!0,placeholder:"e.g., Daily backup, Hourly snapshot",autoFocus:!0}),(0,s.jsxs)(V.Z,{fullWidth:!0,children:[(0,s.jsx)(_.Z,{children:"Schedule Frequency"}),(0,s.jsx)(Q.Z,{value:p,onChange:e=>f(e.target.value),label:"Schedule Frequency",children:G.map(e=>(0,s.jsxs)(J.Z,{value:e.value,children:[e.label,"custom"!==e.value&&(0,s.jsx)(x.Z,{label:e.value,size:"small",variant:"outlined",sx:{ml:1,fontFamily:"monospace",fontSize:"0.75rem"}})]},e.value))})]}),"custom"===p&&(0,s.jsx)(W.Z,{label:"Cron Expression",value:g,onChange:e=>Z(e.target.value),fullWidth:!0,required:!0,placeholder:"e.g., 0 */6 * * *",helperText:"Format: minute hour day-of-month month day-of-week",InputProps:{sx:{fontFamily:"monospace"}}}),(0,s.jsx)(l.Z,{variant:"subtitle2",color:"text.secondary",sx:{mt:1},children:"Retention Policy (optional)"}),(0,s.jsxs)(i.Z,{sx:{display:"flex",gap:2},children:[(0,s.jsx)(W.Z,{label:"Max Backup Count",type:"number",value:v,onChange:e=>y(e.target.value),fullWidth:!0,placeholder:"e.g., 10",inputProps:{min:1},helperText:"Keep at most N backups"}),(0,s.jsx)(W.Z,{label:"Max Age (days)",type:"number",value:b,onChange:e=>C(e.target.value),fullWidth:!0,placeholder:"e.g., 30",inputProps:{min:1},helperText:"Delete backups older than N days"})]})]})}),(0,s.jsxs)(D.Z,{children:[(0,s.jsx)(w.Z,{onClick:r,disabled:R,children:"Cancel"}),(0,s.jsx)(w.Z,{onClick:F,variant:"contained",disabled:R,children:R?"Saving...":u?"Update":"Create"})]})]})}function $(e){let n=new Date,t=new Date(e),s=Math.floor((n.getTime()-t.getTime())/6e4),a=Math.floor(s/60);return s<1?"just now":s<60?"".concat(s,"m ago"):a<24?"".concat(a,"h ago"):"".concat(Math.floor(a/24),"d ago")}function X(e){let{schedule:n,onEdit:t,onDelete:a,onToggle:r,toggleLoading:o}=e;return(0,s.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",py:1.5,px:1,"&:hover":{bgcolor:"action.hover",borderRadius:1}},children:[(0,s.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:2,flex:1,minWidth:0},children:[(0,s.jsx)(K.Z,{color:n.enabled?"primary":"disabled"}),(0,s.jsxs)(i.Z,{sx:{minWidth:0},children:[(0,s.jsx)(l.Z,{variant:"body1",fontWeight:"medium",noWrap:!0,children:n.name}),(0,s.jsxs)(l.Z,{variant:"caption",color:"text.secondary",noWrap:!0,children:[n.cronHumanReadable," (",n.cronExpression,")"]})]})]}),(0,s.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:1.5,flexShrink:0},children:[n.lastRunStatus&&(0,s.jsx)(q.Z,{title:n.lastRunMessage?"".concat(n.lastRunAt?$(n.lastRunAt):"",": ").concat(n.lastRunMessage):n.lastRunAt?$(n.lastRunAt):"",children:(0,s.jsx)(x.Z,{icon:"success"===n.lastRunStatus?(0,s.jsx)(m.Z,{sx:{fontSize:16}}):(0,s.jsx)(p.Z,{sx:{fontSize:16}}),label:"success"===n.lastRunStatus?"OK":"Failed",size:"small",color:"success"===n.lastRunStatus?"success":"error",variant:"outlined"})}),(n.retentionPolicy.maxCount||n.retentionPolicy.maxAgeDays)&&(0,s.jsx)(q.Z,{title:[n.retentionPolicy.maxCount&&"Max ".concat(n.retentionPolicy.maxCount," backups"),n.retentionPolicy.maxAgeDays&&"Max ".concat(n.retentionPolicy.maxAgeDays," days")].filter(Boolean).join(", "),children:(0,s.jsx)(x.Z,{label:"Retention",size:"small",variant:"outlined",color:"info"})}),(0,s.jsx)(q.Z,{title:n.enabled?"Disable schedule":"Enable schedule",children:(0,s.jsx)(M.Z,{size:"small",checked:n.enabled,onChange:(e,t)=>r(n,t),disabled:o})}),(0,s.jsx)(q.Z,{title:"Edit schedule",children:(0,s.jsx)(S.Z,{size:"small",onClick:()=>t(n),children:(0,s.jsx)(O.Z,{fontSize:"small"})})}),(0,s.jsx)(q.Z,{title:"Delete schedule",children:(0,s.jsx)(S.Z,{size:"small",color:"error",onClick:()=>a(n),children:(0,s.jsx)(H.Z,{fontSize:"small"})})})]})]})}function ee(){var e;let{data:n,isLoading:t,error:r}=(0,j.d)(),c=(0,j.c1)(),d=(0,j.JV)(),[x,m]=(0,a.useState)(!1),[p,f]=(0,a.useState)(null),[g,Z]=(0,a.useState)(!1),[v,y]=(0,a.useState)(null),b=e=>{f(e),m(!0)},C=e=>{y(e),Z(!0)},S=async()=>{if(v)try{await d.mutateAsync(v.id)}catch(e){}Z(!1),y(null)},k=(e,n)=>{c.mutate({id:e.id,enabled:n})};if(t)return(0,s.jsx)(u.Z,{children:(0,s.jsxs)(h.Z,{children:[(0,s.jsx)(l.Z,{variant:"h6",gutterBottom:!0,children:"Backup Schedules"}),(0,s.jsx)(l.Z,{color:"text.secondary",children:"Loading..."})]})});if(r)return(0,s.jsx)(u.Z,{children:(0,s.jsxs)(h.Z,{children:[(0,s.jsx)(l.Z,{variant:"h6",gutterBottom:!0,children:"Backup Schedules"}),(0,s.jsx)(I.Z,{severity:"error",children:"Failed to load backup schedules"})]})});let A=null!==(e=null==n?void 0:n.schedules)&&void 0!==e?e:[];return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(u.Z,{children:(0,s.jsxs)(h.Z,{children:[(0,s.jsxs)(i.Z,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2},children:[(0,s.jsxs)(i.Z,{children:[(0,s.jsx)(l.Z,{variant:"h6",children:"Backup Schedules"}),(0,s.jsx)(l.Z,{variant:"caption",color:"text.secondary",children:"Automated cron-based backup scheduling"})]}),(0,s.jsx)(w.Z,{variant:"contained",size:"small",startIcon:(0,s.jsx)(U.Z,{}),onClick:()=>{f(null),m(!0)},children:"Add Schedule"})]}),0===A.length?(0,s.jsxs)(i.Z,{sx:{textAlign:"center",py:4},children:[(0,s.jsx)(K.Z,{sx:{fontSize:48,color:"text.disabled",mb:1}}),(0,s.jsx)(l.Z,{color:"text.secondary",children:"No backup schedules configured"}),(0,s.jsx)(l.Z,{variant:"caption",color:"text.secondary",children:"Create a schedule to automatically back up your worlds"})]}):(0,s.jsx)(o.Z,{divider:(0,s.jsx)(L.Z,{}),children:A.map(e=>(0,s.jsx)(X,{schedule:e,onEdit:b,onDelete:C,onToggle:k,toggleLoading:c.isPending},e.id))})]})}),(0,s.jsx)(Y,{open:x,schedule:p,onClose:()=>{m(!1),f(null)}}),(0,s.jsxs)(z.Z,{open:g,onClose:()=>Z(!1),children:[(0,s.jsx)(B.Z,{children:"Delete Backup Schedule"}),(0,s.jsx)(P.Z,{children:(0,s.jsxs)(l.Z,{children:['Are you sure you want to delete the schedule "',null==v?void 0:v.name,'"? This action cannot be undone.']})}),(0,s.jsxs)(D.Z,{children:[(0,s.jsx)(w.Z,{onClick:()=>Z(!1),children:"Cancel"}),(0,s.jsx)(w.Z,{onClick:S,color:"error",variant:"contained",disabled:d.isPending,children:d.isPending?"Deleting...":"Delete"})]})]})]})}var en=t(33402),et=t(60097),es=t(45420);function ea(e){let{value:n,onChange:t}=e;return(0,s.jsx)(i.Z,{sx:{borderBottom:1,borderColor:"divider",mb:3},children:(0,s.jsxs)(en.Z,{value:n,onChange:(e,n)=>t(n),"aria-label":"Backup management tabs",children:[(0,s.jsx)(et.Z,{value:"world-backups",label:"World Backups",icon:(0,s.jsx)(d.Z,{}),iconPosition:"start",sx:{textTransform:"none",fontWeight:"medium"}}),(0,s.jsx)(et.Z,{value:"config-snapshots",label:"Config Snapshots",icon:(0,s.jsx)(es.Z,{}),iconPosition:"start",sx:{textTransform:"none",fontWeight:"medium"}})]})})}var el=t(73517),ei=t(87739),er=t(12063),eo=t(98324),ec=t(58919),ed=t(20367),eu=t(42936);function eh(e){let n=e?"?serverName=".concat(encodeURIComponent(e)):"";return(0,eo.a)({queryKey:["config-snapshot-schedules",e||"all"],queryFn:()=>(0,eu.SC)("/api/config-snapshot-schedules".concat(n)),refetchInterval:6e4})}var ex=t(27171),em=t(80620),ep=t(86071);function ej(e){let{serverName:n,snapshots:t,totalCount:a,schedule:r,onViewHistory:c,onCreateSnapshot:d,onViewDiff:p}=e,j=t.length>0?t[0]:null,f=t.length>=2;return(0,s.jsx)(u.Z,{variant:"outlined",sx:{"&:hover":{borderColor:"primary.main"}},children:(0,s.jsxs)(h.Z,{children:[(0,s.jsx)(i.Z,{sx:{display:"flex",alignItems:"flex-start",justifyContent:"space-between"},children:(0,s.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:1.5,mb:1},children:[(0,s.jsx)(ex.Z,{color:"primary"}),(0,s.jsx)(l.Z,{variant:"h6",component:"h3",fontWeight:"bold",children:n})]})}),(0,s.jsxs)(o.Z,{direction:"row",spacing:2,sx:{mb:2,flexWrap:"wrap",gap:1},children:[j?(0,s.jsx)(q.Z,{title:"Latest: ".concat(new Date(j.createdAt).toLocaleString()),children:(0,s.jsx)(x.Z,{icon:(0,s.jsx)(em.Z,{sx:{fontSize:16}}),label:"Latest: ".concat(function(e){let n=new Date,t=new Date(e),s=Math.floor((n.getTime()-t.getTime())/6e4),a=Math.floor(s/60),l=Math.floor(a/24);return s<1?"just now":s<60?"".concat(s,"m ago"):a<24?"".concat(a,"h ago"):l<30?"".concat(l,"d ago"):t.toLocaleDateString()}(j.createdAt)),size:"small",variant:"outlined"})}):(0,s.jsx)(x.Z,{label:"No snapshots yet",size:"small",variant:"outlined",color:"default"}),j&&(0,s.jsx)(x.Z,{label:"".concat(j.files.length," files"),size:"small",variant:"outlined",color:"info"}),(0,s.jsx)(x.Z,{label:"".concat(a," snapshot").concat(1!==a?"s":""," total"),size:"small",variant:"outlined"}),r?(0,s.jsx)(q.Z,{title:"Schedule: ".concat(r.name," (").concat(r.cronExpression,")"),children:(0,s.jsx)(x.Z,{icon:r.enabled?(0,s.jsx)(m.Z,{sx:{fontSize:16}}):(0,s.jsx)(K.Z,{sx:{fontSize:16}}),label:r.enabled?"Schedule: Active":"Schedule: Paused",size:"small",variant:"outlined",color:r.enabled?"success":"default"})}):(0,s.jsx)(x.Z,{label:"No schedule",size:"small",variant:"outlined",color:"default"})]}),(0,s.jsxs)(o.Z,{direction:"row",spacing:1,children:[(0,s.jsx)(w.Z,{size:"small",variant:"outlined",startIcon:(0,s.jsx)(em.Z,{}),onClick:()=>c(n),disabled:0===a,children:"View History"}),(0,s.jsx)(w.Z,{size:"small",variant:"outlined",startIcon:(0,s.jsx)(el.Z,{}),onClick:()=>d(n),children:"Create Snapshot"}),f&&(0,s.jsx)(w.Z,{size:"small",variant:"outlined",startIcon:(0,s.jsx)(ep.Z,{}),onClick:()=>p(n),children:"View Diff"})]})]})})}function ef(e){let{servers:n,snapshotsByServer:t,schedules:r,isLoading:c,error:d,onViewHistory:u,onCreateSnapshot:h,onViewDiff:x}=e,m=(0,a.useMemo)(()=>n.map(e=>{var n,s;let a=t.get(e.name),l=r.find(n=>n.serverName===e.name);return{serverName:e.name,snapshots:null!==(n=null==a?void 0:a.snapshots)&&void 0!==n?n:[],totalCount:null!==(s=null==a?void 0:a.total)&&void 0!==s?s:0,schedule:l}}),[n,t,r]);return c?(0,s.jsx)(i.Z,{sx:{display:"flex",justifyContent:"center",py:4},children:(0,s.jsx)(F.Z,{})}):d?(0,s.jsxs)(I.Z,{severity:"error",children:["Failed to load config snapshots: ",d.message]}):0===n.length?(0,s.jsxs)(i.Z,{sx:{textAlign:"center",py:6},children:[(0,s.jsx)(es.Z,{sx:{fontSize:48,color:"text.disabled",mb:1}}),(0,s.jsx)(l.Z,{color:"text.secondary",children:"No servers found"}),(0,s.jsx)(l.Z,{variant:"caption",color:"text.secondary",children:"Create a server to start taking config snapshots"})]}):(0,s.jsx)(o.Z,{spacing:2,children:m.map(e=>(0,s.jsx)(ej,{serverName:e.serverName,snapshots:e.snapshots,totalCount:e.totalCount,schedule:e.schedule,onViewHistory:u,onCreateSnapshot:h,onViewDiff:x},e.serverName))})}var eg=t(6516),eZ=t(62142),ev=t(71185);function ey(e){let{schedule:n,onEdit:t,onDelete:a,onToggle:r,toggleLoading:o}=e;return(0,s.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",py:1.5,px:1,"&:hover":{bgcolor:"action.hover",borderRadius:1}},children:[(0,s.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:2,flex:1,minWidth:0},children:[(0,s.jsx)(K.Z,{color:n.enabled?"primary":"disabled"}),(0,s.jsxs)(i.Z,{sx:{minWidth:0},children:[(0,s.jsx)(l.Z,{variant:"body2",fontWeight:"medium",noWrap:!0,children:n.name}),(0,s.jsxs)(l.Z,{variant:"caption",color:"text.secondary",noWrap:!0,children:[n.serverName," | ",n.cronExpression," | Retain: ",n.retentionCount]})]})]}),(0,s.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:1,flexShrink:0},children:[n.lastRunStatus&&(0,s.jsx)(q.Z,{title:n.lastRunAt?"Last run: ".concat(function(e){let n=new Date,t=new Date(e),s=Math.floor((n.getTime()-t.getTime())/6e4),a=Math.floor(s/60);return s<1?"just now":s<60?"".concat(s,"m ago"):a<24?"".concat(a,"h ago"):"".concat(Math.floor(a/24),"d ago")}(n.lastRunAt)," (").concat(n.lastRunStatus,")"):n.lastRunStatus,children:(0,s.jsx)(x.Z,{icon:"success"===n.lastRunStatus?(0,s.jsx)(m.Z,{sx:{fontSize:16}}):(0,s.jsx)(p.Z,{sx:{fontSize:16}}),label:"success"===n.lastRunStatus?"OK":"Failed",size:"small",color:"success"===n.lastRunStatus?"success":"error",variant:"outlined"})}),(0,s.jsx)(q.Z,{title:n.enabled?"Disable schedule":"Enable schedule",children:(0,s.jsx)(M.Z,{size:"small",checked:n.enabled,onChange:(e,t)=>r(n,t),disabled:o})}),(0,s.jsx)(q.Z,{title:"Edit schedule",children:(0,s.jsx)(S.Z,{size:"small",onClick:()=>t(n),children:(0,s.jsx)(O.Z,{fontSize:"small"})})}),(0,s.jsx)(q.Z,{title:"Delete schedule",children:(0,s.jsx)(S.Z,{size:"small",color:"error",onClick:()=>a(n),children:(0,s.jsx)(H.Z,{fontSize:"small"})})})]})]})}function eb(e){let{schedules:n,onEdit:t,onDelete:a,onToggle:r,toggleLoading:c}=e;return 0===n.length?(0,s.jsxs)(i.Z,{sx:{textAlign:"center",py:3},children:[(0,s.jsx)(K.Z,{sx:{fontSize:40,color:"text.disabled",mb:1}}),(0,s.jsx)(l.Z,{color:"text.secondary",variant:"body2",children:"No config snapshot schedules configured"})]}):(0,s.jsx)(o.Z,{divider:(0,s.jsx)(L.Z,{}),children:n.map(e=>(0,s.jsx)(ey,{schedule:e,onEdit:t,onDelete:a,onToggle:r,toggleLoading:c},e.id))})}let eC=[{label:"Every hour",value:"0 * * * *"},{label:"Every 6 hours",value:"0 */6 * * *"},{label:"Daily at midnight",value:"0 0 * * *"},{label:"Daily at 3 AM",value:"0 3 * * *"},{label:"Weekly (Sunday midnight)",value:"0 0 * * 0"},{label:"Custom",value:""}];function eS(e){var n;let{serverNames:t,editingSchedule:r,onSubmit:o,onUpdate:c,onCancel:d,isSubmitting:u,error:h}=e,x=!!r,[m,p]=(0,a.useState)((null==r?void 0:r.serverName)||""),[j,f]=(0,a.useState)((null==r?void 0:r.name)||""),[g,Z]=(0,a.useState)(""),[v,y]=(0,a.useState)((null==r?void 0:r.cronExpression)||"0 0 * * *"),[b,C]=(0,a.useState)(null!==(n=null==r?void 0:r.retentionCount)&&void 0!==n?n:10);(0,a.useEffect)(()=>{let e=eC.find(e=>e.value===v);Z(e?e.value:"")},[v]),(0,a.useEffect)(()=>{r?(p(r.serverName),f(r.name),y(r.cronExpression),C(r.retentionCount)):(p(""),f(""),y("0 0 * * *"),C(10))},[r]);let S=e=>{Z(e),e&&y(e)},k=(x||m)&&j.trim()&&v.trim();return(0,s.jsxs)(i.Z,{sx:{display:"flex",flexDirection:"column",gap:2},children:[(0,s.jsx)(l.Z,{variant:"subtitle2",color:"text.secondary",children:x?"Edit Schedule":"Create New Schedule"}),!x&&(0,s.jsxs)(V.Z,{fullWidth:!0,size:"small",required:!0,children:[(0,s.jsx)(_.Z,{children:"Server"}),(0,s.jsx)(Q.Z,{value:m,onChange:e=>p(e.target.value),label:"Server",disabled:u,children:t.map(e=>(0,s.jsx)(J.Z,{value:e,children:e},e))})]}),(0,s.jsx)(W.Z,{label:"Schedule Name",value:j,onChange:e=>f(e.target.value),placeholder:"e.g., Daily config backup",size:"small",fullWidth:!0,required:!0,disabled:u}),(0,s.jsxs)(V.Z,{fullWidth:!0,size:"small",children:[(0,s.jsx)(_.Z,{children:"Cron Preset"}),(0,s.jsx)(Q.Z,{value:g,onChange:e=>S(e.target.value),label:"Cron Preset",disabled:u,children:eC.map(e=>(0,s.jsx)(J.Z,{value:e.value,children:e.label},e.label))})]}),(0,s.jsx)(W.Z,{label:"Cron Expression",value:v,onChange:e=>y(e.target.value),placeholder:"0 0 * * *",size:"small",fullWidth:!0,required:!0,disabled:u,helperText:"Standard cron format: minute hour day month weekday"}),(0,s.jsx)(W.Z,{label:"Retention Count",type:"number",value:b,onChange:e=>C(Math.max(1,parseInt(e.target.value)||1)),size:"small",fullWidth:!0,disabled:u,helperText:"Maximum number of scheduled snapshots to keep per server",inputProps:{min:1,max:100}}),h&&(0,s.jsx)(I.Z,{severity:"error",sx:{py:0},children:h}),(0,s.jsxs)(i.Z,{sx:{display:"flex",gap:1,justifyContent:"flex-end"},children:[(0,s.jsx)(w.Z,{size:"small",onClick:d,disabled:u,children:"Cancel"}),(0,s.jsx)(w.Z,{size:"small",variant:"contained",onClick:()=>{x&&c?c({name:j.trim(),cronExpression:v,retentionCount:b}):o({serverName:m,name:j.trim(),cronExpression:v,retentionCount:b})},disabled:!k||u,children:u?"Saving...":x?"Update":"Create"})]})]})}function ek(e){var n,t,r;let{open:o,onClose:c,serverNames:d}=e,{data:u,isLoading:h,error:x}=eh(),m=function(){let e=(0,ec.NL)();return(0,ed.D)({mutationFn:e=>(0,eu.SC)("/api/config-snapshot-schedules",{method:"POST",body:JSON.stringify(e)}),onSuccess:()=>{e.invalidateQueries({queryKey:["config-snapshot-schedules"]})}})}(),p=function(){let e=(0,ec.NL)();return(0,ed.D)({mutationFn:e=>{let{id:n,data:t}=e;return(0,eu.SC)("/api/config-snapshot-schedules/".concat(encodeURIComponent(n)),{method:"PUT",body:JSON.stringify(t)})},onSuccess:()=>{e.invalidateQueries({queryKey:["config-snapshot-schedules"]})}})}(),j=function(){let e=(0,ec.NL)();return(0,ed.D)({mutationFn:e=>{let{id:n,enabled:t}=e;return(0,eu.SC)("/api/config-snapshot-schedules/".concat(encodeURIComponent(n),"/toggle"),{method:"PATCH",body:JSON.stringify({enabled:t})})},onSuccess:()=>{e.invalidateQueries({queryKey:["config-snapshot-schedules"]})}})}(),f=function(){let e=(0,ec.NL)();return(0,ed.D)({mutationFn:e=>(0,eu.SC)("/api/config-snapshot-schedules/".concat(encodeURIComponent(e)),{method:"DELETE"}),onSuccess:()=>{e.invalidateQueries({queryKey:["config-snapshot-schedules"]})}})}(),[g,Z]=(0,a.useState)(!1),[v,y]=(0,a.useState)(null),[b,C]=(0,a.useState)(!1),[k,A]=(0,a.useState)(null),R=null!==(r=null==u?void 0:u.schedules)&&void 0!==r?r:[],T=async()=>{if(k)try{await f.mutateAsync(k.id)}catch(e){}C(!1),A(null)},W=async e=>{try{await m.mutateAsync({serverName:e.serverName,name:e.name,cronExpression:e.cronExpression,retentionCount:e.retentionCount}),Z(!1)}catch(e){}},E=async e=>{if(v)try{await p.mutateAsync({id:v.id,data:e}),Z(!1),y(null)}catch(e){}},N=(null===(n=m.error)||void 0===n?void 0:n.message)||(null===(t=p.error)||void 0===t?void 0:t.message)||null;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(eZ.ZP,{anchor:"right",open:o,onClose:c,PaperProps:{sx:{width:{xs:"100%",sm:480},p:3}},children:[(0,s.jsxs)(i.Z,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2},children:[(0,s.jsx)(l.Z,{variant:"h6",fontWeight:"bold",children:"Config Snapshot Schedules"}),(0,s.jsx)(S.Z,{onClick:c,size:"small",children:(0,s.jsx)(ev.Z,{})})]}),(0,s.jsx)(L.Z,{sx:{mb:2}}),!g&&(0,s.jsx)(w.Z,{variant:"outlined",startIcon:(0,s.jsx)(U.Z,{}),onClick:()=>{y(null),Z(!0)},fullWidth:!0,sx:{mb:2},children:"Add Schedule"}),g&&(0,s.jsxs)(i.Z,{sx:{mb:2},children:[(0,s.jsx)(eS,{serverNames:d,editingSchedule:v,onSubmit:W,onUpdate:E,onCancel:()=>{Z(!1),y(null),m.reset(),p.reset()},isSubmitting:m.isPending||p.isPending,error:N}),(0,s.jsx)(L.Z,{sx:{mt:2}})]}),h?(0,s.jsx)(i.Z,{sx:{display:"flex",justifyContent:"center",py:4},children:(0,s.jsx)(F.Z,{})}):x?(0,s.jsx)(I.Z,{severity:"error",children:"Failed to load schedules"}):(0,s.jsx)(eb,{schedules:R,onEdit:e=>{y(e),Z(!0)},onDelete:e=>{A(e),C(!0)},onToggle:(e,n)=>{j.mutate({id:e.id,enabled:n})},toggleLoading:j.isPending})]}),(0,s.jsxs)(z.Z,{open:b,onClose:()=>C(!1),children:[(0,s.jsx)(B.Z,{children:"Delete Config Snapshot Schedule"}),(0,s.jsx)(P.Z,{children:(0,s.jsxs)(l.Z,{children:['Are you sure you want to delete the schedule "',null==k?void 0:k.name,'"? Existing snapshots created by this schedule will be preserved.']})}),(0,s.jsxs)(D.Z,{children:[(0,s.jsx)(w.Z,{onClick:()=>C(!1),children:"Cancel"}),(0,s.jsx)(w.Z,{onClick:T,color:"error",variant:"contained",disabled:f.isPending,children:f.isPending?"Deleting...":"Delete"})]})]})]})}var ew=t(84728);function ez(){var e,n;let{data:t,isLoading:r}=(0,j.x$)(),o=null!==(e=null==t?void 0:t.servers)&&void 0!==e?e:[],c=o.map(e=>e.name),{snapshotsByServer:d,isLoading:u,error:h}=function(e){var n;let t=e.map(e=>({name:e,query:(0,er.m)(e,5,0,{enabled:!!e})})),s=t.some(e=>e.query.isLoading),l=(null===(n=t.find(e=>e.query.error))||void 0===n?void 0:n.query.error)||null;return{snapshotsByServer:(0,a.useMemo)(()=>{let e=new Map;for(let n of t)n.query.data&&e.set(n.name,{snapshots:n.query.data.snapshots,total:n.query.data.total});return e},[t]),isLoading:s,error:l}}(c),{data:x}=eh(),m=null!==(n=null==x?void 0:x.schedules)&&void 0!==n?n:[],[p,f]=(0,a.useState)(!1),[g,Z]=(0,a.useState)(void 0),[v,y]=(0,a.useState)(!1),[b,C]=(0,a.useState)(!1),[S,k]=(0,a.useState)(""),z=(0,a.useMemo)(()=>{if(!S)return{snapshotA:null,snapshotB:null};let e=d.get(S);return!e||e.snapshots.length<2?{snapshotA:null,snapshotB:null}:{snapshotA:e.snapshots[1],snapshotB:e.snapshots[0]}},[S,d]);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(i.Z,{sx:{display:"flex",justifyContent:"flex-end",gap:1,mb:2},children:[(0,s.jsx)(w.Z,{variant:"outlined",size:"small",startIcon:(0,s.jsx)(ei.Z,{}),onClick:()=>y(!0),children:"Manage Schedules"}),(0,s.jsx)(w.Z,{variant:"contained",size:"small",startIcon:(0,s.jsx)(el.Z,{}),onClick:()=>{Z(void 0),f(!0)},children:"Create Snapshot"})]}),(0,s.jsx)(l.Z,{variant:"body2",color:"text.secondary",sx:{mb:2},children:"Config snapshots capture server configuration files (server.properties, config.env, etc.) for versioning, comparison, and restore operations."}),(0,s.jsx)(ef,{servers:o,snapshotsByServer:d,schedules:m,isLoading:r||u,error:h,onViewHistory:e=>{let n=d.get(e);n&&n.snapshots.length>0&&(k(e),C(!0))},onCreateSnapshot:e=>{Z(e),f(!0)},onViewDiff:e=>{k(e),C(!0)}}),(0,s.jsx)(eg.e,{open:p,onClose:()=>{f(!1),Z(void 0)},serverNames:c,defaultServer:g}),(0,s.jsx)(ek,{open:v,onClose:()=>y(!1),serverNames:c}),b&&z.snapshotA&&z.snapshotB&&(0,s.jsx)(ew.YN,{open:b,onClose:()=>{C(!1),k("")},snapshotA:z.snapshotA,snapshotB:z.snapshotB})]})}var eD=t(74228);function eP(){var e;let{data:n}=(0,j.mj)(),t=null!==(e=null==n?void 0:n.configured)&&void 0!==e&&e,u=(0,eD.useSearchParams)(),h=(0,eD.useRouter)(),x=u.get("tab")||"world-backups",m=(0,a.useCallback)(e=>{let n=new URLSearchParams(u.toString());"world-backups"===e?n.delete("tab"):n.set("tab",e);let t=n.toString();h.push(t?"/backups?".concat(t):"/backups")},[u,h]);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(r.Z,{elevation:0,sx:{mb:4,p:3,background:e=>"linear-gradient(135deg, ".concat((0,c.Fq)(e.palette.secondary.main,.1)," 0%, ").concat((0,c.Fq)(e.palette.info.main,.1)," 100%)"),borderRadius:2,border:e=>"1px solid ".concat((0,c.Fq)(e.palette.secondary.main,.2)),display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,s.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:2},children:[(0,s.jsx)(i.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:56,height:56,borderRadius:2,bgcolor:"secondary.main",color:"secondary.contrastText"},children:(0,s.jsx)(d.Z,{sx:{fontSize:32}})}),(0,s.jsxs)(i.Z,{children:[(0,s.jsx)(l.Z,{variant:"h4",component:"h1",fontWeight:"bold",children:"Backups"}),(0,s.jsx)(l.Z,{variant:"body1",color:"text.secondary",children:"Manage world backups and config snapshots"})]})]}),"world-backups"===x&&(0,s.jsx)(N,{disabled:!t})]}),(0,s.jsx)(ea,{value:x,onChange:m}),"world-backups"===x&&(0,s.jsxs)(o.Z,{spacing:3,children:[(0,s.jsx)(f,{}),(0,s.jsx)(ee,{}),t&&(0,s.jsx)(T,{})]}),"config-snapshots"===x&&(0,s.jsx)(ez,{})]})}},6516:function(e,n,t){"use strict";t.d(n,{e:function(){return Z}});var s=t(94655),a=t(35106),l=t(99770),i=t(62508),r=t(5682),o=t(76678),c=t(30417),d=t(97436),u=t(29793),h=t(75726),x=t(62328),m=t(7178),p=t(81071),j=t(93017),f=t(7281),g=t(12063);function Z(e){var n;let{open:t,onClose:Z,serverNames:v,defaultServer:y}=e,[b,C]=(0,a.useState)(y||""),[S,k]=(0,a.useState)(""),w=(0,g.t)(),z=async()=>{if(b)try{await w.mutateAsync({serverName:b,description:S.trim()||void 0}),D()}catch(e){}},D=()=>{w.isPending||(C(y||""),k(""),w.reset(),Z())};return(0,s.jsxs)(l.Z,{open:t,onClose:D,maxWidth:"sm",fullWidth:!0,children:[(0,s.jsx)(i.Z,{children:"Create Config Snapshot"}),(0,s.jsx)(r.Z,{children:(0,s.jsxs)(f.Z,{sx:{display:"flex",flexDirection:"column",gap:2,mt:1},children:[(0,s.jsxs)(u.Z,{fullWidth:!0,required:!0,children:[(0,s.jsx)(h.Z,{children:"Server"}),(0,s.jsx)(x.Z,{value:b,onChange:e=>C(e.target.value),label:"Server",disabled:w.isPending||!!y,children:v.map(e=>(0,s.jsx)(m.Z,{value:e,children:e},e))})]}),(0,s.jsx)(d.Z,{label:"Description (optional)",value:S,onChange:e=>k(e.target.value),placeholder:"e.g., Before modpack update",fullWidth:!0,disabled:w.isPending}),w.isError&&(0,s.jsx)(p.Z,{severity:"error",children:(null===(n=w.error)||void 0===n?void 0:n.message)||"Failed to create snapshot"}),w.isPending&&(0,s.jsx)(p.Z,{severity:"info",icon:(0,s.jsx)(j.Z,{size:20}),children:"Creating snapshot... This may take a moment."})]})}),(0,s.jsxs)(o.Z,{children:[(0,s.jsx)(c.Z,{onClick:D,disabled:w.isPending,children:"Cancel"}),(0,s.jsx)(c.Z,{onClick:z,variant:"contained",disabled:!b||w.isPending,children:w.isPending?"Creating...":"Create Snapshot"})]})]})}},84728:function(e,n,t){"use strict";t.d(n,{YN:function(){return V}});var s=t(94655),a=t(35106),l=t(30417),i=t(99770),r=t(62508),o=t(5682),c=t(76678),d=t(7281),u=t(31317),h=t(81071),x=t(93017),m=t(79983),p=t(69123),j=t(44059),f=t(83855),g=t(71185),Z=t(97731),v=t(86071),y=t(72205),b=t(90158),C=t(49954),S=t(17820),k=t(73424),w=t(95511),z=t(73517),D=t(47254),P=t(43214);function A(e){let{changes:n,selectedFile:t,onSelectFile:l}=e,i=(0,a.useCallback)((e,t,s)=>{"ArrowUp"===e.key&&s>0?(e.preventDefault(),l(n[s-1].path)):"ArrowDown"===e.key&&s<n.length-1?(e.preventDefault(),l(n[s+1].path)):("Enter"===e.key||" "===e.key)&&(e.preventDefault(),l(t))},[n,l]);return 0===n.length?(0,s.jsx)(d.Z,{sx:{p:2},children:(0,s.jsx)(u.Z,{variant:"body2",color:"text.secondary",children:"No changes"})}):(0,s.jsxs)(d.Z,{sx:{height:"100%",overflow:"auto",borderRight:1,borderColor:"divider"},role:"tree","aria-label":"Changed files",children:[(0,s.jsxs)(u.Z,{variant:"caption",sx:{display:"block",px:2,py:1,color:"text.secondary",fontWeight:"medium",letterSpacing:"0.08em",textTransform:"uppercase",borderBottom:1,borderColor:"divider",bgcolor:"background.paper"},children:["Changed Files (",n.length,")"]}),(0,s.jsx)(b.Z,{dense:!0,disablePadding:!0,role:"group",children:n.map((e,n)=>{let a=function(e){switch(e){case"added":return{icon:(0,s.jsx)(z.Z,{fontSize:"small"}),color:"success.main",label:"Added"};case"modified":return{icon:(0,s.jsx)(D.Z,{fontSize:"small"}),color:"warning.main",label:"Modified"};case"deleted":return{icon:(0,s.jsx)(P.Z,{fontSize:"small"}),color:"error.main",label:"Deleted"}}}(e.status),r=function(e){let n=e.split("/");return n[n.length-1]}(e.path),o=function(e){let n=e.split("/");return n.length<=1?"":n.slice(0,-1).join("/")}(e.path),c=t===e.path;return(0,s.jsx)(w.Z,{title:"".concat(a.label,": ").concat(e.path),placement:"right",children:(0,s.jsxs)(C.Z,{selected:c,onClick:()=>l(e.path),onKeyDown:t=>i(t,e.path,n),role:"treeitem","aria-selected":c,"aria-label":"".concat(e.path," - ").concat(a.label),sx:{py:.75,"&.Mui-selected":{bgcolor:"action.selected"}},children:[(0,s.jsx)(S.Z,{sx:{minWidth:32,color:a.color},children:a.icon}),(0,s.jsx)(k.Z,{primary:r,secondary:o||void 0,primaryTypographyProps:{variant:"body2",sx:{fontFamily:"monospace",fontSize:"0.8rem",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},secondaryTypographyProps:{variant:"caption",sx:{fontFamily:"monospace",fontSize:"0.7rem",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}}})]})},e.path)})})]})}var B=t(20876),I=t(25333);let F=(0,B.default)(()=>t.e(271).then(t.bind(t,40271)),{loadableGenerated:{webpack:()=>[null]},ssr:!1});function R(e){var n,t;let{change:a,viewMode:l,fileRef:i}=e,r="added"===a.status?"":null!==(n=a.oldContent)&&void 0!==n?n:"",o="deleted"===a.status?"":null!==(t=a.newContent)&&void 0!==t?t:"";return(0,s.jsxs)(d.Z,{ref:i,sx:{mb:3},"data-file-path":a.path,id:"diff-file-".concat(a.path.replace(/[^a-zA-Z0-9]/g,"-")),children:[(0,s.jsxs)(d.Z,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1,bgcolor:"background.default",borderTop:1,borderBottom:1,borderColor:"divider",position:"sticky",top:0,zIndex:1},children:[function(e){switch(e){case"added":return(0,s.jsx)(z.Z,{fontSize:"small",sx:{color:"success.main"}});case"modified":return(0,s.jsx)(D.Z,{fontSize:"small",sx:{color:"warning.main"}});case"deleted":return(0,s.jsx)(P.Z,{fontSize:"small",sx:{color:"error.main"}})}}(a.status),(0,s.jsx)(u.Z,{variant:"body2",sx:{fontFamily:"monospace",fontWeight:"bold",flex:1},children:a.path}),(0,s.jsx)(I.Z,{label:function(e){switch(e){case"added":return"added";case"modified":return"modified";case"deleted":return"deleted"}}(a.status),size:"small",color:function(e){switch(e){case"added":return"success";case"modified":return"warning";case"deleted":return"error"}}(a.status),variant:"outlined"})]}),(0,s.jsx)(d.Z,{sx:{fontSize:"0.8rem",overflow:"auto"},children:(0,s.jsx)(F,{oldValue:r,newValue:o,splitView:"split"===l,useDarkTheme:!0,hideLineNumbers:!1,showDiffOnly:!0,styles:{variables:{dark:{diffViewerBackground:"#1a1a1a",addedBackground:"#1a3a1a",addedColor:"#4caf50",removedBackground:"#3a1a1a",removedColor:"#f44336",wordAddedBackground:"#2d5a2d",wordRemovedBackground:"#5a2d2d",emptyLineBackground:"#1a1a1a",gutterBackground:"#111",gutterColor:"#555",codeFoldBackground:"#111",codeFoldGutterBackground:"#111"}}}})})]})}function T(e){let{changes:n,selectedFile:t,viewMode:l}=e,i=(0,a.useRef)(new Map),r=(0,a.useRef)(null);return((0,a.useEffect)(()=>{if(t&&i.current.has(t)){let e=i.current.get(t);null==e||e.scrollIntoView({behavior:"smooth",block:"start"})}},[t]),0===n.length)?(0,s.jsx)(d.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",p:4},children:(0,s.jsx)(u.Z,{variant:"body1",color:"text.secondary",children:"No differences between these snapshots"})}):(0,s.jsx)(d.Z,{ref:r,sx:{height:"100%",overflow:"auto","& table":{width:"100%"}},children:n.map((e,t)=>(0,s.jsxs)(d.Z,{children:[(0,s.jsx)(R,{change:e,viewMode:l,fileRef:n=>{n?i.current.set(e.path,n):i.current.delete(e.path)}}),t<n.length-1&&(0,s.jsx)(p.Z,{})]},e.path))})}var W=t(89923),E=t(10297),N=t(98874),M=t(23345);function q(e){let{value:n,onChange:t}=e;return(0,s.jsxs)(E.Z,{value:n,exclusive:!0,onChange:(e,n)=>{null!==n&&t(n)},"aria-label":"Diff view mode",size:"small",children:[(0,s.jsx)(w.Z,{title:"Unified diff view",children:(0,s.jsx)(W.Z,{value:"unified","aria-label":"Unified view",children:(0,s.jsx)(N.Z,{fontSize:"small"})})}),(0,s.jsx)(w.Z,{title:"Side-by-side diff view",children:(0,s.jsx)(W.Z,{value:"split","aria-label":"Split view",children:(0,s.jsx)(M.Z,{fontSize:"small"})})})]})}var L=t(32366),U=t(45813),O=t(21111);function H(e){let{summary:n}=e,{added:t,modified:a,deleted:l}=n;return 0===t+a+l?(0,s.jsx)(d.Z,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1,borderTop:1,borderColor:"divider",bgcolor:"background.paper"},children:(0,s.jsx)(u.Z,{variant:"body2",color:"text.secondary",children:"No differences found between snapshots"})}):(0,s.jsxs)(d.Z,{sx:{display:"flex",alignItems:"center",gap:1.5,px:2,py:1,borderTop:1,borderColor:"divider",bgcolor:"background.paper",flexWrap:"wrap"},role:"status","aria-label":"Summary: ".concat(t," added, ").concat(a," modified, ").concat(l," deleted"),children:[(0,s.jsx)(u.Z,{variant:"caption",color:"text.secondary",sx:{fontWeight:"medium"},children:"Summary:"}),a>0&&(0,s.jsx)(I.Z,{icon:(0,s.jsx)(U.Z,{sx:{fontSize:"0.875rem"}}),label:"".concat(a," modified"),size:"small",sx:{bgcolor:"warning.dark",color:"warning.contrastText","& .MuiChip-icon":{color:"warning.contrastText"}}}),t>0&&(0,s.jsx)(I.Z,{icon:(0,s.jsx)(L.Z,{sx:{fontSize:"0.875rem"}}),label:"".concat(t," added"),size:"small",sx:{bgcolor:"success.dark",color:"success.contrastText","& .MuiChip-icon":{color:"success.contrastText"}}}),l>0&&(0,s.jsx)(I.Z,{icon:(0,s.jsx)(O.Z,{sx:{fontSize:"0.875rem"}}),label:"".concat(l," deleted"),size:"small",sx:{bgcolor:"error.dark",color:"error.contrastText","& .MuiChip-icon":{color:"error.contrastText"}}})]})}function K(e){return new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit"}).format(new Date(e))}function V(e){var n;let{open:t,snapshotA:b,snapshotB:C,onClose:S,onRestoreA:k}=e,w=(0,f.Z)(),z=(0,j.Z)(w.breakpoints.down("md")),[D,P]=(0,a.useState)(void 0),[B,I]=(0,a.useState)("unified"),{data:F,isLoading:R,isError:W,error:E}=(0,y.m)(b.id,C.id,{enabled:t});(0,a.useEffect)(()=>{t&&(P(void 0),I("unified"))},[t,z]),(0,a.useEffect)(()=>{(null==F?void 0:F.changes)&&F.changes.length>0&&!D&&P(F.changes[0].path)},[F,D]);let N=(0,a.useCallback)(e=>{"Escape"===e.key&&S()},[S]);(0,a.useEffect)(()=>{if(t)return document.addEventListener("keydown",N),()=>document.removeEventListener("keydown",N)},[t,N]);let M=(0,a.useCallback)(e=>{P(e)},[]),L=(0,a.useCallback)(()=>{null==k||k(b),S()},[k,b,S]);return(0,s.jsxs)(i.Z,{open:t,onClose:S,maxWidth:"xl",fullWidth:!0,fullScreen:z,"aria-labelledby":"config-diff-dialog-title",PaperProps:{sx:{height:z?"100%":"90vh",maxHeight:z?"100%":"90vh",display:"flex",flexDirection:"column"}},children:[(0,s.jsxs)(r.Z,{id:"config-diff-dialog-title",sx:{display:"flex",alignItems:"center",gap:1,pb:1,flexShrink:0},children:[(0,s.jsx)(v.Z,{color:"primary"}),(0,s.jsxs)(d.Z,{sx:{flex:1},children:[(0,s.jsx)(u.Z,{variant:"h6",component:"span",children:"Config Diff"}),(0,s.jsxs)(u.Z,{variant:"body2",color:"text.secondary",sx:{display:"block",mt:.25},children:["Snapshot A: ",K(b.createdAt),(0,s.jsx)(d.Z,{component:"span",sx:{mx:1},children:"vs"}),"Snapshot B: ",K(C.createdAt)]})]}),(0,s.jsx)(q,{value:B,onChange:I}),(0,s.jsx)(m.Z,{onClick:S,"aria-label":"Close diff dialog",size:"small",sx:{ml:1},children:(0,s.jsx)(g.Z,{})})]}),(0,s.jsx)(p.Z,{}),(0,s.jsxs)(o.Z,{sx:{flex:1,overflow:"hidden",display:"flex",flexDirection:"column",p:0},children:[R&&(0,s.jsxs)(d.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center",flex:1,gap:2},children:[(0,s.jsx)(x.Z,{size:24}),(0,s.jsx)(u.Z,{variant:"body2",color:"text.secondary",children:"Loading diff..."})]}),W&&(0,s.jsx)(d.Z,{sx:{p:2},children:(0,s.jsxs)(h.Z,{severity:"error",children:["Failed to load diff: ",null!==(n=null==E?void 0:E.message)&&void 0!==n?n:"Unknown error"]})}),F&&(0,s.jsxs)(d.Z,{sx:{flex:1,display:"flex",flexDirection:{xs:"column",md:"row"},overflow:"hidden"},children:[(0,s.jsx)(d.Z,{sx:{width:{xs:"100%",md:220},flexShrink:0,height:{xs:"auto",md:"100%"},maxHeight:{xs:160,md:"none"},overflow:"auto"},children:(0,s.jsx)(A,{changes:F.changes,selectedFile:D,onSelectFile:M})}),(0,s.jsx)(p.Z,{orientation:z?"horizontal":"vertical"}),(0,s.jsx)(d.Z,{sx:{flex:1,overflow:"auto"},children:(0,s.jsx)(T,{changes:F.changes,selectedFile:D,viewMode:B})})]})]}),F&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(p.Z,{}),(0,s.jsx)(H,{summary:F.summary})]}),(0,s.jsx)(p.Z,{}),(0,s.jsxs)(c.Z,{sx:{px:2,py:1.5,flexShrink:0},children:[k&&(0,s.jsx)(l.Z,{onClick:L,variant:"outlined",color:"warning",startIcon:(0,s.jsx)(Z.Z,{}),disabled:R,children:"Restore to Snapshot A"}),(0,s.jsx)(d.Z,{sx:{flex:1}}),(0,s.jsx)(l.Z,{onClick:S,variant:"contained",children:"Close"})]})]})}},72205:function(e,n,t){"use strict";t.d(n,{m:function(){return l}});var s=t(98324),a=t(42936);function l(e,n,t){return(0,s.a)({queryKey:["config-snapshots","diff",e,n],queryFn:()=>(0,a.SC)("/api/config-snapshots/".concat(encodeURIComponent(e),"/diff/").concat(encodeURIComponent(n))),enabled:(null==t?void 0:t.enabled)!==!1&&!!e&&!!n,staleTime:3e5})}},12063:function(e,n,t){"use strict";t.d(n,{m:function(){return r},t:function(){return o}});var s=t(98324),a=t(58919),l=t(20367),i=t(42936);function r(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:20,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3?arguments[3]:void 0;return(0,s.a)({queryKey:["config-snapshots","list",e,n,t],queryFn:()=>(0,i.SC)("/api/servers/".concat(encodeURIComponent(e),"/config-snapshots?limit=").concat(n,"&offset=").concat(t)),enabled:(null==a?void 0:a.enabled)!==!1&&!!e,refetchInterval:6e4})}function o(){let e=(0,a.NL)();return(0,l.D)({mutationFn:e=>{let{serverName:n,description:t}=e;return(0,i.SC)("/api/servers/".concat(encodeURIComponent(n),"/config-snapshots"),{method:"POST",body:JSON.stringify({description:t})})},onSuccess:(n,t)=>{let{serverName:s}=t;e.invalidateQueries({queryKey:["config-snapshots","list",s]}),e.invalidateQueries({queryKey:["config-snapshots"]})}})}}},function(e){e.O(0,[6812,9760,5004,7296,7436,1071,540,9986,5511,3938,2844,4920,7632,4302,6368,2603,2666,3669,2757,1744],function(){return e(e.s=1366)}),_N_E=e.O()}]);
|