skypilot-nightly 1.0.0.dev20250606__py3-none-any.whl → 1.0.0.dev20250609__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. sky/__init__.py +2 -2
  2. sky/backends/backend_utils.py +21 -3
  3. sky/check.py +18 -22
  4. sky/cli.py +5 -8
  5. sky/client/cli.py +5 -8
  6. sky/client/sdk.py +2 -1
  7. sky/clouds/cloud.py +4 -0
  8. sky/clouds/nebius.py +44 -4
  9. sky/core.py +3 -2
  10. sky/dashboard/out/404.html +1 -1
  11. sky/dashboard/out/_next/static/chunks/236-619ed0248fb6fdd9.js +6 -0
  12. sky/dashboard/out/_next/static/chunks/470-680c19413b8f808b.js +1 -0
  13. sky/dashboard/out/_next/static/chunks/{614-635a84e87800f99e.js → 63-e2d7b1e75e67c713.js} +8 -8
  14. sky/dashboard/out/_next/static/chunks/843-16c7194621b2b512.js +11 -0
  15. sky/dashboard/out/_next/static/chunks/969-2c584e28e6b4b106.js +1 -0
  16. sky/dashboard/out/_next/static/chunks/973-aed916d5b02d2d63.js +1 -0
  17. sky/dashboard/out/_next/static/chunks/pages/clusters/[cluster]/{[job]-65d04d5d77cbb6b6.js → [job]-d31688d3e52736dd.js} +1 -1
  18. sky/dashboard/out/_next/static/chunks/pages/clusters/{[cluster]-35cbeb5214fd4036.js → [cluster]-e7d8710a9b0491e5.js} +1 -1
  19. sky/dashboard/out/_next/static/chunks/pages/{clusters-5549a350f97d7ef3.js → clusters-3c674e5d970e05cb.js} +1 -1
  20. sky/dashboard/out/_next/static/chunks/pages/config-3aac7a015c6eede1.js +6 -0
  21. sky/dashboard/out/_next/static/chunks/pages/infra/{[context]-b68ddeed712d45b5.js → [context]-46d2e4ad6c487260.js} +1 -1
  22. sky/dashboard/out/_next/static/chunks/pages/{infra-13b117a831702196.js → infra-7013d816a2a0e76c.js} +1 -1
  23. sky/dashboard/out/_next/static/chunks/pages/jobs/[job]-f7f0c9e156d328bc.js +16 -0
  24. sky/dashboard/out/_next/static/chunks/pages/{jobs-a76b2700eca236f7.js → jobs-87e60396c376292f.js} +1 -1
  25. sky/dashboard/out/_next/static/chunks/pages/users-9355a0f13d1db61d.js +16 -0
  26. sky/dashboard/out/_next/static/chunks/pages/workspace/{new-c7516f2b4c3727c0.js → new-9a749cca1813bd27.js} +1 -1
  27. sky/dashboard/out/_next/static/chunks/pages/workspaces/{[name]-7799de9e691e35d8.js → [name]-8eeb628e03902f1b.js} +1 -1
  28. sky/dashboard/out/_next/static/chunks/pages/workspaces-8fbcc5ab4af316d0.js +1 -0
  29. sky/dashboard/out/_next/static/css/8b1c8321d4c02372.css +3 -0
  30. sky/dashboard/out/_next/static/xos0euNCptbGAM7_Q3Acl/_buildManifest.js +1 -0
  31. sky/dashboard/out/clusters/[cluster]/[job].html +1 -1
  32. sky/dashboard/out/clusters/[cluster].html +1 -1
  33. sky/dashboard/out/clusters.html +1 -1
  34. sky/dashboard/out/config.html +1 -1
  35. sky/dashboard/out/index.html +1 -1
  36. sky/dashboard/out/infra/[context].html +1 -1
  37. sky/dashboard/out/infra.html +1 -1
  38. sky/dashboard/out/jobs/[job].html +1 -1
  39. sky/dashboard/out/jobs.html +1 -1
  40. sky/dashboard/out/users.html +1 -1
  41. sky/dashboard/out/workspace/new.html +1 -1
  42. sky/dashboard/out/workspaces/[name].html +1 -1
  43. sky/dashboard/out/workspaces.html +1 -1
  44. sky/exceptions.py +5 -0
  45. sky/global_user_state.py +11 -6
  46. sky/jobs/scheduler.py +9 -4
  47. sky/jobs/server/core.py +23 -2
  48. sky/jobs/server/server.py +0 -95
  49. sky/jobs/state.py +18 -15
  50. sky/jobs/utils.py +2 -1
  51. sky/models.py +18 -0
  52. sky/provision/kubernetes/utils.py +12 -5
  53. sky/provision/nebius/constants.py +47 -0
  54. sky/provision/nebius/instance.py +2 -1
  55. sky/provision/nebius/utils.py +28 -7
  56. sky/serve/server/core.py +1 -1
  57. sky/server/common.py +4 -2
  58. sky/server/constants.py +0 -2
  59. sky/server/requests/executor.py +10 -2
  60. sky/server/requests/requests.py +4 -3
  61. sky/server/server.py +22 -5
  62. sky/skylet/constants.py +4 -0
  63. sky/skylet/job_lib.py +2 -1
  64. sky/skypilot_config.py +13 -1
  65. sky/templates/jobs-controller.yaml.j2 +3 -1
  66. sky/templates/nebius-ray.yml.j2 +6 -0
  67. sky/users/model.conf +1 -1
  68. sky/users/permission.py +148 -31
  69. sky/users/rbac.py +26 -0
  70. sky/users/server.py +14 -13
  71. sky/utils/common.py +6 -1
  72. sky/utils/common_utils.py +21 -3
  73. sky/utils/kubernetes/deploy_remote_cluster.py +5 -3
  74. sky/utils/resources_utils.py +3 -1
  75. sky/utils/schemas.py +9 -0
  76. sky/workspaces/core.py +100 -8
  77. sky/workspaces/server.py +15 -2
  78. sky/workspaces/utils.py +56 -0
  79. {skypilot_nightly-1.0.0.dev20250606.dist-info → skypilot_nightly-1.0.0.dev20250609.dist-info}/METADATA +1 -1
  80. {skypilot_nightly-1.0.0.dev20250606.dist-info → skypilot_nightly-1.0.0.dev20250609.dist-info}/RECORD +89 -87
  81. sky/dashboard/out/_next/static/99m-BAySO8Q7J-ul1jZVL/_buildManifest.js +0 -1
  82. sky/dashboard/out/_next/static/chunks/236-a90f0a9753a10420.js +0 -6
  83. sky/dashboard/out/_next/static/chunks/470-9e7a479cc8303baa.js +0 -1
  84. sky/dashboard/out/_next/static/chunks/843-c296541442d4af88.js +0 -11
  85. sky/dashboard/out/_next/static/chunks/969-c7abda31c10440ac.js +0 -1
  86. sky/dashboard/out/_next/static/chunks/973-1a09cac61cfcc1e1.js +0 -1
  87. sky/dashboard/out/_next/static/chunks/pages/config-1a1eeb949dab8897.js +0 -6
  88. sky/dashboard/out/_next/static/chunks/pages/jobs/[job]-2d23a9c7571e6320.js +0 -16
  89. sky/dashboard/out/_next/static/chunks/pages/users-262aab38b9baaf3a.js +0 -16
  90. sky/dashboard/out/_next/static/chunks/pages/workspaces-384ea5fa0cea8f28.js +0 -1
  91. sky/dashboard/out/_next/static/css/667d941a2888ce6e.css +0 -3
  92. /sky/dashboard/out/_next/static/chunks/{37-beedd583fea84cc8.js → 37-600191c5804dcae2.js} +0 -0
  93. /sky/dashboard/out/_next/static/chunks/{682-6647f0417d5662f0.js → 682-b60cfdacc15202e8.js} +0 -0
  94. /sky/dashboard/out/_next/static/chunks/{856-3a32da4b84176f6d.js → 856-affc52adf5403a3a.js} +0 -0
  95. /sky/dashboard/out/_next/static/chunks/pages/{_app-cb81dc4d27f4d009.js → _app-5f16aba5794ee8e7.js} +0 -0
  96. /sky/dashboard/out/_next/static/{99m-BAySO8Q7J-ul1jZVL → xos0euNCptbGAM7_Q3Acl}/_ssgManifest.js +0 -0
  97. {skypilot_nightly-1.0.0.dev20250606.dist-info → skypilot_nightly-1.0.0.dev20250609.dist-info}/WHEEL +0 -0
  98. {skypilot_nightly-1.0.0.dev20250606.dist-info → skypilot_nightly-1.0.0.dev20250609.dist-info}/entry_points.txt +0 -0
  99. {skypilot_nightly-1.0.0.dev20250606.dist-info → skypilot_nightly-1.0.0.dev20250609.dist-info}/licenses/LICENSE +0 -0
  100. {skypilot_nightly-1.0.0.dev20250606.dist-info → skypilot_nightly-1.0.0.dev20250609.dist-info}/top_level.txt +0 -0
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[973],{9307:function(e,t,s){s.d(t,{Cl:function(){return c},OE:function(){return d}});var r=s(5893);s(7294);var a=s(8799),n=s(6989),l=s(3850);let c=e=>{switch(e){case"LAUNCHING":return"bg-blue-100 text-sky-blue";case"RUNNING":return"bg-green-50 text-green-700";case"STOPPED":return"bg-yellow-100 text-yellow-800";case"TERMINATED":default:return"bg-gray-100 text-gray-800";case"PENDING":case"CANCELLED":case"CANCELLING":return"bg-yellow-50 text-yellow-700";case"SUCCEEDED":return"bg-blue-50 text-blue-700";case"FAILED":case"FAILED_PRECHECKS":case"FAILED_NO_RESOURCE":case"FAILED_CONTROLLER":return"bg-red-50 text-red-700";case"RECOVERING":return"bg-orange-50 text-orange-700";case"SUBMITTED":return"bg-indigo-50 text-indigo-700";case"STARTING":return"bg-cyan-50 text-cyan-700";case"FAILED_SETUP":return"bg-pink-50 text-pink-700"}},o=e=>{switch(e){case"LAUNCHING":case"STARTING":return(0,r.jsx)(a.Z,{size:12,className:"w-3 h-3 mr-1"});case"RUNNING":default:return(0,r.jsx)(l.W2,{className:"w-3 h-3 mr-1"});case"STOPPED":return(0,r.jsx)(l.fp,{className:"w-3 h-3 mr-1"});case"TERMINATED":case"FAILED":case"CANCELLED":return(0,r.jsx)(l.Ps,{className:"w-3 h-3 mr-1"});case"SUCCEEDED":return(0,r.jsx)(l.Ye,{className:"w-3 h-3 mr-1"});case"PENDING":case"RECOVERING":case"SUBMITTED":case"CANCELLING":case"FAILED_SETUP":case"FAILED_PRECHECKS":case"FAILED_NO_RESOURCE":case"FAILED_CONTROLLER":return(0,r.jsx)(l.J$,{className:"w-3 h-3 mr-1"})}},i=e=>{let t=c(e),s=o(e);return(0,r.jsxs)("span",{className:"".concat("inline-flex items-center px-2 py-1 rounded-full text-sm"," ").concat(t),children:[s,e]})},d=e=>{let{status:t}=e;return(0,r.jsx)(n.WH,{content:t,className:"text-muted-foreground text-sm",children:(0,r.jsx)("span",{children:i(t)})})}},9284:function(e,t,s){s.d(t,{Oh:function(){return m},_R:function(){return f},cV:function(){return x}});var r=s(5893),a=s(7294),n=s(326),l=s(803),c=s(7673),o=s(8671),i=s(6989),d=s(3225),u=s(3001);function m(e){let{isOpen:t,onClose:s,cluster:d}=e,[u,m]=a.useState(!1),f=e=>{navigator.clipboard.writeText(e),m(!0),setTimeout(()=>m(!1),2e3)},x=["sky status ".concat(d),"ssh ".concat(d)],h=x.join("\n");return(0,r.jsx)(n.Vq,{open:t,onOpenChange:s,children:(0,r.jsxs)(n.cZ,{className:"sm:max-w-md",children:[(0,r.jsxs)(n.fK,{children:[(0,r.jsxs)(n.$N,{children:["Connect to: ",(0,r.jsx)("span",{className:"font-light",children:d})]}),(0,r.jsx)(n.Be,{children:"Use these instructions to connect to your cluster via SSH."})]}),(0,r.jsxs)("div",{className:"flex flex-col space-y-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"text-sm font-medium mb-2",children:"SSH Command"}),(0,r.jsx)(c.Zb,{className:"p-3 bg-gray-50",children:(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)("pre",{className:"text-sm w-full whitespace-pre-wrap",children:x.map((e,t)=>(0,r.jsx)("code",{className:"block",children:e},t))}),(0,r.jsx)(i.WH,{content:u?"Copied!":"Copy command",children:(0,r.jsx)(l.z,{variant:"ghost",size:"icon",onClick:()=>f(h),className:"h-8 w-8 rounded-full",children:(0,r.jsx)(o.Z,{className:"h-4 w-4"})})})]})})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"text-sm font-medium mb-2",children:"Additional Information"}),(0,r.jsxs)("p",{className:"text-sm text-secondary-foreground",children:["Make sure to run"," ",(0,r.jsxs)("code",{className:"text-sm",children:["sky status ",d]})," first to have SkyPilot set up the SSH access."]})]})]})]})})}function f(e){let{isOpen:t,onClose:s,cluster:a}=e,m=(0,u.X)();return(0,r.jsx)(n.Vq,{open:t,onOpenChange:s,children:(0,r.jsx)(n.cZ,{className:"sm:max-w-3xl",children:(0,r.jsxs)(n.fK,{children:[(0,r.jsxs)(n.$N,{children:["Connect to: ",(0,r.jsx)("span",{className:"font-light",children:a})]}),(0,r.jsx)(n.Be,{children:(0,r.jsxs)("div",{className:"flex flex-col space-y-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"text-sm font-medium mb-2 my-2",children:"Setup SSH access"}),(0,r.jsx)(c.Zb,{className:"p-3 bg-gray-50",children:(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)("pre",{className:"text-sm",children:(0,r.jsxs)("code",{children:["sky status ",a]})}),(0,r.jsx)(i.WH,{content:"Copy command",children:(0,r.jsx)(l.z,{variant:"ghost",size:"icon",onClick:()=>navigator.clipboard.writeText("sky status ".concat(a)),className:"h-8 w-8 rounded-full",children:(0,r.jsx)(o.Z,{className:"h-4 w-4"})})})]})})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"text-sm font-medium mb-2 my-2",children:"Connect with VSCode/Cursor"}),(0,r.jsx)(c.Zb,{className:"p-3 bg-gray-50",children:(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)("pre",{className:"text-sm",children:(0,r.jsxs)("code",{children:["code --remote ssh-remote+",a]})}),(0,r.jsx)(i.WH,{content:"Copy command",children:(0,r.jsx)(l.z,{variant:"ghost",size:"icon",onClick:()=>navigator.clipboard.writeText("code --remote ssh-remote+".concat(a)),className:"h-8 w-8 rounded-full",children:(0,r.jsx)(o.Z,{className:"h-4 w-4"})})})]})})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"text-sm font-medium",children:"Or use the GUI to connect"}),(0,r.jsx)("div",{className:"relative ".concat(m?"-mt-5":"-mt-10"),style:{paddingBottom:"70%"},children:(0,r.jsxs)("video",{className:"absolute top-0 left-0 w-full h-full rounded-lg",controls:!0,autoPlay:!0,muted:!0,preload:"metadata",children:[(0,r.jsx)("source",{src:"".concat(d.GW,"/videos/cursor-small.mp4"),type:"video/mp4"}),"Your browser does not support the video tag."]})})]})]})})]})})})}function x(e){let{isOpen:t,onClose:s,onConfirm:a,title:c,message:o,confirmText:i="Confirm",confirmVariant:d="destructive"}=e;return(0,r.jsx)(n.Vq,{open:t,onOpenChange:s,children:(0,r.jsxs)(n.cZ,{className:"sm:max-w-md",children:[(0,r.jsxs)(n.fK,{children:[(0,r.jsx)(n.$N,{children:c}),(0,r.jsx)(n.Be,{children:o})]}),(0,r.jsxs)(n.cN,{className:"flex justify-end gap-2 pt-4",children:[(0,r.jsx)(l.z,{variant:"outline",onClick:s,children:"Cancel"}),(0,r.jsx)(l.z,{variant:d,onClick:()=>{a(),s()},children:i})]})]})})}},803:function(e,t,s){s.d(t,{z:function(){return i}});var r=s(5893),a=s(7294),n=s(8426),l=s(2003),c=s(2350);let o=(0,l.j)("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),i=a.forwardRef((e,t)=>{let{className:s,variant:a,size:l,asChild:i=!1,...d}=e,u=i?n.g7:"button";return(0,r.jsx)(u,{className:(0,c.cn)(o({variant:a,size:l,className:s})),ref:t,...d})});i.displayName="Button"},7673:function(e,t,s){s.d(t,{Ol:function(){return i},Zb:function(){return o},aY:function(){return m},eW:function(){return f},ll:function(){return d}});var r=s(5893),a=s(7294),n=s(5697),l=s.n(n),c=s(2350);let o=a.forwardRef((e,t)=>{let{className:s,children:a,...n}=e;return(0,r.jsx)("div",{ref:t,className:(0,c.cn)("rounded-lg border bg-card text-card-foreground shadow-sm",s),...n,children:a})});o.displayName="Card",o.propTypes={className:l().string,children:l().node};let i=a.forwardRef((e,t)=>{let{className:s,children:a,...n}=e;return(0,r.jsx)("div",{ref:t,className:(0,c.cn)("flex flex-col space-y-1.5 p-6",s),...n,children:a})});i.displayName="CardHeader",i.propTypes={className:l().string,children:l().node};let d=a.forwardRef((e,t)=>{let{className:s,children:a,...n}=e;return(0,r.jsx)("h3",{ref:t,className:(0,c.cn)("text-2xl font-semibold leading-none tracking-tight",s),...n,children:a})});d.displayName="CardTitle",d.propTypes={className:l().string,children:l().node};let u=a.forwardRef((e,t)=>{let{className:s,children:a,...n}=e;return(0,r.jsx)("p",{ref:t,className:(0,c.cn)("text-sm text-muted-foreground",s),...n,children:a})});u.displayName="CardDescription",u.propTypes={className:l().string,children:l().node};let m=a.forwardRef((e,t)=>{let{className:s,children:a,...n}=e;return(0,r.jsx)("div",{ref:t,className:(0,c.cn)("p-6 pt-0",s),...n,children:a})});m.displayName="CardContent",m.propTypes={className:l().string,children:l().node};let f=a.forwardRef((e,t)=>{let{className:s,children:a,...n}=e;return(0,r.jsx)("div",{ref:t,className:(0,c.cn)("flex items-center p-6 pt-0",s),...n,children:a})});f.displayName="CardFooter",f.propTypes={className:l().string,children:l().node}},326:function(e,t,s){s.d(t,{$N:function(){return x},Be:function(){return h},Vq:function(){return o},cN:function(){return f},cZ:function(){return u},fK:function(){return m}});var r=s(5893),a=s(7294),n=s(6327),l=s(2350),c=s(3767);let o=n.fC;n.xz;let i=n.h_;n.x8;let d=a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)(n.aV,{ref:t,className:(0,l.cn)("fixed inset-0 z-50 bg-black/50 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",s),...a})});d.displayName=n.aV.displayName;let u=a.forwardRef((e,t)=>{let{className:s,children:a,...o}=e;return(0,r.jsxs)(i,{children:[(0,r.jsx)(d,{}),(0,r.jsxs)(n.VY,{ref:t,className:(0,l.cn)("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-gray-200 bg-white p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",s),...o,children:[a,(0,r.jsxs)(n.x8,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-white transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-gray-400 focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-gray-100 data-[state=open]:text-gray-500",children:[(0,r.jsx)(c.Z,{className:"h-4 w-4"}),(0,r.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})});u.displayName=n.VY.displayName;let m=e=>{let{className:t,...s}=e;return(0,r.jsx)("div",{className:(0,l.cn)("flex flex-col space-y-1.5 text-center sm:text-left",t),...s})};m.displayName="DialogHeader";let f=e=>{let{className:t,...s}=e;return(0,r.jsx)("div",{className:(0,l.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...s})};f.displayName="DialogFooter";let x=a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)(n.Dx,{ref:t,className:(0,l.cn)("text-lg font-semibold leading-none tracking-tight",s),...a})});x.displayName=n.Dx.displayName;let h=a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)(n.dk,{ref:t,className:(0,l.cn)("text-sm text-gray-500",s),...a})});h.displayName=n.dk.displayName},8764:function(e,t,s){s.d(t,{RM:function(){return o},SC:function(){return i},iA:function(){return l},pj:function(){return u},ss:function(){return d},xD:function(){return c}});var r=s(5893),a=s(7294),n=s(2350);let l=a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("div",{className:"relative w-full overflow-auto",children:(0,r.jsx)("table",{ref:t,className:(0,n.cn)("w-full caption-bottom text-base",s),...a})})});l.displayName="Table";let c=a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("thead",{ref:t,className:(0,n.cn)("[&_tr]:border-b",s),...a})});c.displayName="TableHeader";let o=a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("tbody",{ref:t,className:(0,n.cn)("[&_tr:last-child]:border-0",s),...a})});o.displayName="TableBody",a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("tfoot",{ref:t,className:(0,n.cn)("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",s),...a})}).displayName="TableFooter";let i=a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("tr",{ref:t,className:(0,n.cn)("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",s),...a})});i.displayName="TableRow";let d=a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("th",{ref:t,className:(0,n.cn)("h-12 px-4 text-left align-middle font-medium text-[hsl(var(--text-strong))] [&:has([role=checkbox])]:pr-0",s),...a})});d.displayName="TableHead";let u=a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("td",{ref:t,className:(0,n.cn)("p-4 align-middle [&:has([role=checkbox])]:pr-0",s),...a})});u.displayName="TableCell",a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("caption",{ref:t,className:(0,n.cn)("mt-4 text-base text-muted-foreground",s),...a})}).displayName="TableCaption"},4545:function(e,t,s){function r(e){return e.startsWith("sky-jobs-controller-")}function a(e,t,s){return null===t?e:[...e].sort((e,r)=>e[t]<r[t]?"ascending"===s?-1:1:e[t]>r[t]?"ascending"===s?1:-1:0)}s.d(t,{R0:function(){return a},Ym:function(){return r}})}}]);
@@ -1,6 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[490],{4483:function(e,r,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/config",function(){return t(9377)}])},9333:function(e,r,t){"use strict";t.d(r,{Z:function(){return n}});/**
2
- * @license lucide-react v0.407.0 - ISC
3
- *
4
- * This source code is licensed under the ISC license.
5
- * See the LICENSE file in the root directory of this source tree.
6
- */let n=(0,t(998).Z)("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]])},1812:function(e,r,t){"use strict";t.d(r,{X:function(){return i}});var n=t(5893),s=t(7294);let l=e=>{if(!(null==e?void 0:e.message))return"An unexpected error occurred.";let r=e.message;return r.includes("failed:")&&(r=r.split("failed:")[1].trim()),r.charAt(0).toUpperCase()+r.slice(1)},i=e=>{let{error:r,title:t="Error",onDismiss:i}=e,[a,o]=(0,s.useState)(!1);if((0,s.useEffect)(()=>{r&&o(!1)},[r]),!r||a)return null;let c="string"==typeof r?r:l(r);return(0,n.jsx)("div",{className:"bg-red-50 border border-red-200 rounded-md p-3 mb-4",children:(0,n.jsxs)("div",{className:"flex items-center justify-between",children:[(0,n.jsxs)("div",{className:"flex",children:[(0,n.jsx)("div",{className:"flex-shrink-0",children:(0,n.jsx)("svg",{className:"h-5 w-5 text-red-400",viewBox:"0 0 20 20",fill:"currentColor",children:(0,n.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})})}),(0,n.jsx)("div",{className:"ml-3",children:(0,n.jsxs)("div",{className:"text-sm text-red-800",children:[(0,n.jsxs)("strong",{children:[t,":"]})," ",c]})})]}),(0,n.jsx)("button",{onClick:()=>{o(!0),i&&i()},className:"flex-shrink-0 ml-4 text-red-400 hover:text-red-600 focus:outline-none focus:ring-2 focus:ring-red-500 focus:ring-offset-2 focus:ring-offset-red-50 rounded","aria-label":"Dismiss error",children:(0,n.jsx)("svg",{className:"h-4 w-4",viewBox:"0 0 20 20",fill:"currentColor",children:(0,n.jsx)("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})})]})})}},803:function(e,r,t){"use strict";t.d(r,{z:function(){return c}});var n=t(5893),s=t(7294),l=t(8426),i=t(2003),a=t(2350);let o=(0,i.j)("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),c=s.forwardRef((e,r)=>{let{className:t,variant:s,size:i,asChild:c=!1,...d}=e,u=c?l.g7:"button";return(0,n.jsx)(u,{className:(0,a.cn)(o({variant:s,size:i,className:t})),ref:r,...d})});c.displayName="Button"},7673:function(e,r,t){"use strict";t.d(r,{Ol:function(){return c},Zb:function(){return o},aY:function(){return f},eW:function(){return m},ll:function(){return d}});var n=t(5893),s=t(7294),l=t(5697),i=t.n(l),a=t(2350);let o=s.forwardRef((e,r)=>{let{className:t,children:s,...l}=e;return(0,n.jsx)("div",{ref:r,className:(0,a.cn)("rounded-lg border bg-card text-card-foreground shadow-sm",t),...l,children:s})});o.displayName="Card",o.propTypes={className:i().string,children:i().node};let c=s.forwardRef((e,r)=>{let{className:t,children:s,...l}=e;return(0,n.jsx)("div",{ref:r,className:(0,a.cn)("flex flex-col space-y-1.5 p-6",t),...l,children:s})});c.displayName="CardHeader",c.propTypes={className:i().string,children:i().node};let d=s.forwardRef((e,r)=>{let{className:t,children:s,...l}=e;return(0,n.jsx)("h3",{ref:r,className:(0,a.cn)("text-2xl font-semibold leading-none tracking-tight",t),...l,children:s})});d.displayName="CardTitle",d.propTypes={className:i().string,children:i().node};let u=s.forwardRef((e,r)=>{let{className:t,children:s,...l}=e;return(0,n.jsx)("p",{ref:r,className:(0,a.cn)("text-sm text-muted-foreground",t),...l,children:s})});u.displayName="CardDescription",u.propTypes={className:i().string,children:i().node};let f=s.forwardRef((e,r)=>{let{className:t,children:s,...l}=e;return(0,n.jsx)("div",{ref:r,className:(0,a.cn)("p-6 pt-0",t),...l,children:s})});f.displayName="CardContent",f.propTypes={className:i().string,children:i().node};let m=s.forwardRef((e,r)=>{let{className:t,children:s,...l}=e;return(0,n.jsx)("div",{ref:r,className:(0,a.cn)("flex items-center p-6 pt-0",t),...l,children:s})});m.displayName="CardFooter",m.propTypes={className:i().string,children:i().node}},9377:function(e,r,t){"use strict";t.r(r),t.d(r,{default:function(){return b}});var n=t(5893),s=t(7294),l=t(1163),i=t(9470);t(1664);var a=t(9008),o=t.n(a),c=t(803),d=t(7673),u=t(7324),f=t(1812),m=t(8799),h=t(9333),x=t(1272),p=t(3225),g=t(6989);function v(){let[e,r]=(0,s.useState)(null),[t,l]=(0,s.useState)(null);return((0,s.useEffect)(()=>{fetch("".concat(p.f4,"/api/health")).then(e=>e.json()).then(e=>{e.version&&r(e.version),e.commit&&l(e.commit)}).catch(e=>{console.error("Error fetching API server version and commit hash:",e)})},[]),e)?(0,n.jsx)(g.Md,{content:t?"Commit: ".concat(t):"Commit information not available",className:"text-sm text-muted-foreground",children:(0,n.jsxs)("div",{className:"text-sm text-gray-500 cursor-help border-b border-dotted border-gray-400 inline-block",children:["Version: ",e]})}):null}function b(){let e=(0,l.useRouter)(),[r,t]=(0,s.useState)(""),[a,g]=(0,s.useState)(!0),[b,j]=(0,s.useState)(!1),[y,N]=(0,s.useState)(null),[w,k]=(0,s.useState)(!1);(0,s.useEffect)(()=>{C()},[]);let C=async()=>{g(!0),N(null);try{let e=await (0,u.iE)();0===Object.keys(e).length?t(""):t(x.ZP.dump(e,{indent:2}))}catch(e){console.error("Error loading config:",e),N(e)}finally{g(!1)}},E=async()=>{j(!0),N(null),k(!1);try{let e=await fetch("".concat(p.f4,"/users/role"));if(!e.ok){let r=await e.json();throw Error(r.detail||"Failed to get user role")}let t=await e.json(),n=t.role;if("admin"!=n){N(Error("".concat(t.name," is logged in as no admin, cannot edit config"))),j(!1);return}let s=x.ZP.load(r);if(null==s&&(s={}),"object"!=typeof s||Array.isArray(s)){let e="Invalid config structure: Configuration must be a mapping (key-value pairs) in YAML format.";Array.isArray(s),e="Invalid config structure: Configuration must be a mapping (key-value pairs) in YAML format.",N(Error(e)),j(!1);return}await (0,u.rF)(s),k(!0),setTimeout(()=>k(!1),3e3)}catch(e){console.error("Error saving config:",e),N(e)}finally{j(!1)}};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o(),{children:(0,n.jsx)("title",{children:"Edit SkyPilot Configuration | SkyPilot Dashboard"})}),(0,n.jsxs)(i.A,{highlighted:"workspaces",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between mb-4 h-5",children:[(0,n.jsx)("div",{className:"text-base flex items-center",children:(0,n.jsx)("span",{className:"text-sky-blue",children:"SkyPilot Configuration"})}),(0,n.jsxs)("div",{className:"flex items-center",children:[(0,n.jsx)("div",{className:"text-sm flex items-center",children:(a||b)&&(0,n.jsxs)("div",{className:"flex items-center mr-4",children:[(0,n.jsx)(m.Z,{size:15,className:"mt-0"}),(0,n.jsx)("span",{className:"ml-2 text-gray-500",children:b?"Applying...":"Loading..."})]})}),(0,n.jsx)(v,{})]})]}),(0,n.jsxs)(d.Zb,{className:"w-full",children:[(0,n.jsx)(d.Ol,{children:(0,n.jsx)(d.ll,{className:"text-base font-normal flex items-center justify-between",children:(0,n.jsx)("span",{children:"Edit SkyPilot API Server Configuration"})})}),(0,n.jsxs)(d.aY,{className:"space-y-4",children:[(0,n.jsxs)("p",{className:"text-sm text-gray-600 mb-3",children:["Refer to the"," ",(0,n.jsx)("a",{href:"https://docs.skypilot.co/en/latest/reference/config.html",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:underline",children:"SkyPilot Docs"})," ","for details. The configuration should be in YAML format."]}),w&&(0,n.jsx)("div",{className:"bg-green-50 border border-green-200 rounded p-4 mb-6",children:(0,n.jsxs)("div",{className:"flex items-center",children:[(0,n.jsx)("div",{className:"flex-shrink-0",children:(0,n.jsx)("svg",{className:"h-5 w-5 text-green-400",viewBox:"0 0 20 20",fill:"currentColor",children:(0,n.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})})}),(0,n.jsx)("div",{className:"ml-3",children:(0,n.jsx)("p",{className:"text-sm font-medium text-green-800",children:"Configuration saved successfully!"})})]})}),y&&(0,n.jsx)("div",{className:"mb-6",children:(0,n.jsx)(f.X,{error:y,title:"Failed to apply new configuration",onDismiss:()=>N(null)})}),(0,n.jsx)("div",{className:"w-full",children:(0,n.jsx)("textarea",{value:r,onChange:e=>t(e.target.value),className:"w-full h-96 p-3 border border-gray-300 rounded font-mono text-sm resize-vertical focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:a?"Loading configuration...":"# Enter SkyPilot configuration in YAML format\n# Example:\n# kubernetes:\n# allowed_contexts: [default, my-context]",disabled:a||b})}),(0,n.jsxs)("div",{className:"flex justify-end space-x-3 pt-3",children:[(0,n.jsx)(c.z,{variant:"outline",onClick:()=>{e.push("/workspaces")},disabled:b,children:"Cancel"}),(0,n.jsx)(c.z,{onClick:E,disabled:a||b,className:"inline-flex items-center bg-blue-600 hover:bg-blue-700 text-white",children:b?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(m.Z,{size:16,className:"mr-2"}),"Applying..."]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(h.Z,{className:"w-4 h-4 mr-1.5"}),"Apply"]})})]})]})]})]})]})}},2003:function(e,r,t){"use strict";t.d(r,{j:function(){return i}});var n=t(512);let s=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,l=n.W,i=(e,r)=>t=>{var n;if((null==r?void 0:r.variants)==null)return l(e,null==t?void 0:t.class,null==t?void 0:t.className);let{variants:i,defaultVariants:a}=r,o=Object.keys(i).map(e=>{let r=null==t?void 0:t[e],n=null==a?void 0:a[e];if(null===r)return null;let l=s(r)||s(n);return i[e][l]}),c=t&&Object.entries(t).reduce((e,r)=>{let[t,n]=r;return void 0===n||(e[t]=n),e},{});return l(e,o,null==r?void 0:null===(n=r.compoundVariants)||void 0===n?void 0:n.reduce((e,r)=>{let{class:t,className:n,...s}=r;return Object.entries(s).every(e=>{let[r,t]=e;return Array.isArray(t)?t.includes({...a,...c}[r]):({...a,...c})[r]===t})?[...e,t,n]:e},[]),null==t?void 0:t.class,null==t?void 0:t.className)}}},function(e){e.O(0,[614,798,470,293,888,774,179],function(){return e(e.s=4483)}),_N_E=e.O()}]);
@@ -1,16 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[315],{479:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/jobs/[job]",function(){return s(8099)}])},6639:function(e,t,s){"use strict";s.d(t,{Z:function(){return r}});/**
2
- * @license lucide-react v0.407.0 - ISC
3
- *
4
- * This source code is licensed under the ISC license.
5
- * See the LICENSE file in the root directory of this source tree.
6
- */let r=(0,s(998).Z)("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},8671:function(e,t,s){"use strict";s.d(t,{Z:function(){return r}});/**
7
- * @license lucide-react v0.407.0 - ISC
8
- *
9
- * This source code is licensed under the ISC license.
10
- * See the LICENSE file in the root directory of this source tree.
11
- */let r=(0,s(998).Z)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},3626:function(e,t,s){"use strict";s.d(t,{Z:function(){return r}});/**
12
- * @license lucide-react v0.407.0 - ISC
13
- *
14
- * This source code is licensed under the ISC license.
15
- * See the LICENSE file in the root directory of this source tree.
16
- */let r=(0,s(998).Z)("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]])},9307:function(e,t,s){"use strict";s.d(t,{Cl:function(){return c},OE:function(){return d}});var r=s(5893);s(7294);var n=s(8799),l=s(6989),a=s(3850);let c=e=>{switch(e){case"LAUNCHING":return"bg-blue-100 text-sky-blue";case"RUNNING":return"bg-green-50 text-green-700";case"STOPPED":return"bg-yellow-100 text-yellow-800";case"TERMINATED":default:return"bg-gray-100 text-gray-800";case"PENDING":case"CANCELLED":case"CANCELLING":return"bg-yellow-50 text-yellow-700";case"SUCCEEDED":return"bg-blue-50 text-blue-700";case"FAILED":case"FAILED_PRECHECKS":case"FAILED_NO_RESOURCE":case"FAILED_CONTROLLER":return"bg-red-50 text-red-700";case"RECOVERING":return"bg-orange-50 text-orange-700";case"SUBMITTED":return"bg-indigo-50 text-indigo-700";case"STARTING":return"bg-cyan-50 text-cyan-700";case"FAILED_SETUP":return"bg-pink-50 text-pink-700"}},i=e=>{switch(e){case"LAUNCHING":case"STARTING":return(0,r.jsx)(n.Z,{size:12,className:"w-3 h-3 mr-1"});case"RUNNING":default:return(0,r.jsx)(a.W2,{className:"w-3 h-3 mr-1"});case"STOPPED":return(0,r.jsx)(a.fp,{className:"w-3 h-3 mr-1"});case"TERMINATED":case"FAILED":case"CANCELLED":return(0,r.jsx)(a.Ps,{className:"w-3 h-3 mr-1"});case"SUCCEEDED":return(0,r.jsx)(a.Ye,{className:"w-3 h-3 mr-1"});case"PENDING":case"RECOVERING":case"SUBMITTED":case"CANCELLING":case"FAILED_SETUP":case"FAILED_PRECHECKS":case"FAILED_NO_RESOURCE":case"FAILED_CONTROLLER":return(0,r.jsx)(a.J$,{className:"w-3 h-3 mr-1"})}},o=e=>{let t=c(e),s=i(e);return(0,r.jsxs)("span",{className:"".concat("inline-flex items-center px-2 py-1 rounded-full text-sm"," ").concat(t),children:[s,e]})},d=e=>{let{status:t}=e;return(0,r.jsx)(l.WH,{content:t,className:"text-muted-foreground text-sm",children:(0,r.jsx)("span",{children:o(t)})})}},7673:function(e,t,s){"use strict";s.d(t,{Ol:function(){return o},Zb:function(){return i},aY:function(){return m},eW:function(){return x},ll:function(){return d}});var r=s(5893),n=s(7294),l=s(5697),a=s.n(l),c=s(2350);let i=n.forwardRef((e,t)=>{let{className:s,children:n,...l}=e;return(0,r.jsx)("div",{ref:t,className:(0,c.cn)("rounded-lg border bg-card text-card-foreground shadow-sm",s),...l,children:n})});i.displayName="Card",i.propTypes={className:a().string,children:a().node};let o=n.forwardRef((e,t)=>{let{className:s,children:n,...l}=e;return(0,r.jsx)("div",{ref:t,className:(0,c.cn)("flex flex-col space-y-1.5 p-6",s),...l,children:n})});o.displayName="CardHeader",o.propTypes={className:a().string,children:a().node};let d=n.forwardRef((e,t)=>{let{className:s,children:n,...l}=e;return(0,r.jsx)("h3",{ref:t,className:(0,c.cn)("text-2xl font-semibold leading-none tracking-tight",s),...l,children:n})});d.displayName="CardTitle",d.propTypes={className:a().string,children:a().node};let u=n.forwardRef((e,t)=>{let{className:s,children:n,...l}=e;return(0,r.jsx)("p",{ref:t,className:(0,c.cn)("text-sm text-muted-foreground",s),...l,children:n})});u.displayName="CardDescription",u.propTypes={className:a().string,children:a().node};let m=n.forwardRef((e,t)=>{let{className:s,children:n,...l}=e;return(0,r.jsx)("div",{ref:t,className:(0,c.cn)("p-6 pt-0",s),...l,children:n})});m.displayName="CardContent",m.propTypes={className:a().string,children:a().node};let x=n.forwardRef((e,t)=>{let{className:s,children:n,...l}=e;return(0,r.jsx)("div",{ref:t,className:(0,c.cn)("flex items-center p-6 pt-0",s),...l,children:n})});x.displayName="CardFooter",x.propTypes={className:a().string,children:a().node}},8099:function(e,t,s){"use strict";s.r(t);var r=s(5893),n=s(7294),l=s(8799),a=s(1163),c=s(9470),i=s(7673),o=s(8969),d=s(1664),u=s.n(d),m=s(3626),x=s(282),g=s(8671),h=s(5895),f=s(6639),j=s(6989),N=s(9307),p=s(3001),y=s(9008),b=s.n(y),v=s(1272);function E(e){let{jobData:t,activeTab:s,setIsLoadingLogs:a,setIsLoadingControllerLogs:c,isLoadingLogs:i,isLoadingControllerLogs:d,refreshFlag:m}=e,[p,y]=(0,n.useState)(""),[b,E]=(0,n.useState)(""),[L,w]=(0,n.useState)(!1),[C,R]=(0,n.useState)({}),[S,T]=(0,n.useState)(!1),[I,k]=(0,n.useState)(!1),[A,D]=(0,n.useState)(0),[_,Z]=(0,n.useState)(0),[F,P]=(0,n.useState)(!1),[M,O]=(0,n.useState)(!1),[q,G]=(0,n.useState)(!1),[U,H]=(0,n.useState)(!1),W=(0,n.useRef)(null),B=(0,n.useRef)(null),Y=(0,n.useRef)(null),J=(0,n.useRef)(null),z=(0,n.useRef)(""),$=(0,n.useRef)(""),V=(0,n.useRef)(null);(0,n.useRef)(0);let K=(0,n.useCallback)(e=>{let t="logs"===e?Y:J;if(t.current)for(let s of[()=>t.current.querySelector(".logs-container"),()=>t.current.querySelector('[class*="logs-container"]'),()=>t.current.querySelector('div[style*="overflow"]'),()=>t.current]){let t=s();if(t&&t.scrollHeight>t.clientHeight){t.scrollTop=t.scrollHeight,console.log("Auto-scrolled ".concat(e," to bottom"));break}}},[]),X=["PENDING","SUBMITTED","STARTING"].includes(t.status),Q=["PENDING","SUBMITTED"].includes(t.status),ee=["RECOVERING"].includes(t.status),et=e=>{R(t=>({...t,[e]:!t[e]}))},es=async()=>{try{let e=en(t.dag_yaml),s="";s=1===e.length?e[0].content:e.length>1?e.map(e=>e.content).join("\n---\n"):t.dag_yaml,await navigator.clipboard.writeText(s),T(!0),setTimeout(()=>T(!1),2e3)}catch(e){console.error("Failed to copy YAML to clipboard:",e)}},er=async()=>{try{await navigator.clipboard.writeText(t.entrypoint),k(!0),setTimeout(()=>k(!1),2e3)}catch(e){console.error("Failed to copy command to clipboard:",e)}},en=e=>{if(!e)return[];try{let t=[],s=e.split(/^---$/m);for(let e=0;e<s.length;e++){let r=s[e].trim();r&&""!==r&&t.push(r)}return(t.length>1?t.slice(1):t).map((e,t)=>{try{let s=v.ZP.load(e),r=v.ZP.dump(s,{lineWidth:-1,styles:{"!!str":"literal"},quotingType:"'",forceQuotes:!1,noRefs:!0,sortKeys:!1,condenseFlow:!1,indent:2}).split("\n"),n=[],l=-1;for(let e=0;e<r.length;e++){let t=r[e],s=t.search(/\S/);0===s&&l>=0&&e>0&&n.push(""),n.push(t),l=s}return{index:t,content:n.join("\n").trim(),preview:el(s)}}catch(s){return console.error("YAML formatting error for document ".concat(t,":"),s),{index:t,content:e,preview:"Invalid YAML"}}})}catch(t){return console.error("YAML formatting error:",t),[{index:0,content:e,preview:"Invalid YAML"}]}},el=e=>"string"==typeof e?e.substring(0,50)+"...":e&&e.name?"name: ".concat(e.name):e&&e.resources?"Task configuration":"YAML document";(0,n.useEffect)(()=>{y(""),D(0),H(!1)},[s,t.id]),(0,n.useEffect)(()=>{E(""),Z(0),H(!1)},[s,t.id]);let ea=(0,n.useCallback)(function(e,t,s,r){let n=arguments.length>4&&void 0!==arguments[4]&&arguments[4],l="logs"===e?W:B;if(l.current)return console.log("Request already active for ".concat(e,", skipping...")),()=>{};let a=!0,c=new AbortController;return"logs"===e&&(X||ee)?(r(!1),n&&P(!1),()=>{}):"controllerlogs"===e&&Q?(r(!1),n&&O(!1),()=>{}):t?(l.current=c,r(!0),G(!0),n&&(s(""),"logs"===e?D(0):Z(0)),(0,o.NJ)({jobId:t,controller:"controllerlogs"===e,signal:c.signal,onNewLog:t=>{if(a){let s=(0,j.q8)(t);U||H(!0),ec(e,s),"logs"===e?D(e=>e+s.length):Z(e=>e+s.length)}}}).then(()=>{a&&(r(!1),n&&("logs"===e?P(!1):O(!1)),requestAnimationFrame(()=>{K(e)}))}).catch(t=>{a&&("AbortError"!==t.name&&(console.error("Error streaming ".concat(e,":"),t),t.message&&s(e=>e+"Error fetching logs: ".concat(t.message,"\n"))),r(!1),n&&("logs"===e?P(!1):O(!1)))}).finally(()=>{console.log("Cleaning up ".concat(e," request")),a=!1,l.current===c&&(l.current.abort(),l.current=null),"logs"===e?z.current="":$.current="",V.current&&(clearTimeout(V.current),V.current=null)}),()=>{console.log("Cleaning up ".concat(e," request")),a=!1,l.current===c&&(l.current.abort(),l.current=null),"logs"===e?z.current="":$.current="",V.current&&(clearTimeout(V.current),V.current=null)}):()=>{a=!1}},[X,Q,ee,U]);(0,n.useEffect)(()=>{if(W.current&&(W.current.abort(),W.current=null),!X&&!ee)return ea("logs",t.id,y,a)},[t.id,ea,a,X,ee]),(0,n.useEffect)(()=>{if(B.current&&(B.current.abort(),B.current=null),!Q)return ea("controllerlogs",t.id,E,c)},[t.id,ea,c,Q]),(0,n.useEffect)(()=>{if(m>0&&"logs"===s)return W.current&&(W.current.abort(),W.current=null),P(!0),ea("logs",t.id,y,a,!0)},[m,s,t.id,ea,a]),(0,n.useEffect)(()=>{if(m>0&&"controllerlogs"===s)return B.current&&(B.current.abort(),B.current=null),O(!0),ea("controllerlogs",t.id,E,c,!0)},[m,s,t.id,ea,c]),(0,n.useEffect)(()=>()=>{console.log("Cleaning up managed job log requests..."),W.current&&(W.current.abort(),W.current=null),B.current&&(B.current.abort(),B.current=null),V.current&&(clearTimeout(V.current),V.current=null),z.current="",$.current="",a(!1),c(!1),P(!1),O(!1)},[]),(0,n.useEffect)(()=>{let e=()=>{document.hidden?(console.log("Page hidden - pausing log streaming for performance"),V.current&&(clearTimeout(V.current),V.current=null)):console.log("Page visible - resuming normal operation")};return document.addEventListener("visibilitychange",e),()=>{document.removeEventListener("visibilitychange",e)}},[]),(0,n.useEffect)(()=>{let e=()=>{("logs"===s&&p||"controllerlogs"===s&&b)&&K("logs"===s?"logs":"controllerlogs")};requestAnimationFrame(()=>{requestAnimationFrame(e)})},[s,p,b,K]);let ec=(0,n.useCallback)((e,t)=>{("logs"===e?y:E)(e=>e+t),requestAnimationFrame(()=>{K(e)})},[K]);return"logs"===s?(0,r.jsx)("div",{className:"max-h-96 overflow-y-auto",ref:Y,children:X?(0,r.jsx)("div",{className:"bg-[#f7f7f7] flex items-center justify-center py-4 text-gray-500",children:(0,r.jsx)("span",{children:"Waiting for the job to start, please refresh after a while"})}):ee?(0,r.jsx)("div",{className:"bg-[#f7f7f7] flex items-center justify-center py-4 text-gray-500",children:(0,r.jsx)("span",{children:"Waiting for the job to recover, please refresh after a while"})}):U||p?(0,r.jsx)(j.$B,{logs:p}):i?(0,r.jsxs)("div",{className:"flex items-center justify-center py-4",children:[(0,r.jsx)(l.Z,{size:20,className:"mr-2"}),(0,r.jsx)("span",{children:"Loading logs..."})]}):(0,r.jsx)(j.$B,{logs:p})}):"controllerlogs"===s?(0,r.jsx)("div",{className:"max-h-96 overflow-y-auto",ref:J,children:Q?(0,r.jsx)("div",{className:"bg-[#f7f7f7] flex items-center justify-center py-4 text-gray-500",children:(0,r.jsx)("span",{children:"Waiting for the job controller process to start, please refresh after a while"})}):U||b?(0,r.jsx)(j.$B,{logs:b,controller:!0}):d?(0,r.jsxs)("div",{className:"flex items-center justify-center py-4",children:[(0,r.jsx)(l.Z,{size:20,className:"mr-2"}),(0,r.jsx)("span",{children:"Loading logs..."})]}):(0,r.jsx)(j.$B,{logs:b,controller:!0})}):(0,r.jsxs)("div",{className:"grid grid-cols-2 gap-6",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Job ID (Name)"}),(0,r.jsxs)("div",{className:"text-base mt-1",children:[t.id," ",t.name?"(".concat(t.name,")"):""]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Status"}),(0,r.jsxs)("div",{className:"text-base mt-1 flex items-center",children:[(0,r.jsx)(N.OE,{status:t.status}),t.priority&&(0,r.jsxs)("span",{className:"ml-2",children:[" (priority: ",t.priority,")"]})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"User"}),(0,r.jsx)("div",{className:"text-base mt-1",children:t.user})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Requested Resources"}),(0,r.jsx)("div",{className:"text-base mt-1",children:t.requested_resources||"N/A"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Infra"}),(0,r.jsx)("div",{className:"text-base mt-1",children:t.infra?(0,r.jsx)(j.Md,{content:t.full_infra||t.infra,className:"text-sm text-muted-foreground",children:(0,r.jsxs)("span",{children:[(0,r.jsx)(u(),{href:"/infra",className:"text-blue-600 hover:underline",children:t.cloud||t.infra.split("(")[0].trim()}),t.infra.includes("(")&&(0,r.jsx)("span",{children:" "+t.infra.substring(t.infra.indexOf("("))})]})}):"-"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Resources"}),(0,r.jsx)("div",{className:"text-base mt-1",children:t.resources_str_full||t.resources_str||"-"})]}),(t.entrypoint||t.dag_yaml)&&(0,r.jsxs)("div",{className:"col-span-2",children:[(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Entrypoint"}),t.entrypoint&&(0,r.jsx)(j.WH,{content:I?"Copied!":"Copy command",className:"text-muted-foreground",children:(0,r.jsx)("button",{onClick:er,className:"flex items-center text-gray-500 hover:text-gray-700 transition-colors duration-200 p-1 ml-2",children:I?(0,r.jsx)(x.Z,{className:"w-4 h-4 text-green-600"}):(0,r.jsx)(g.Z,{className:"w-4 h-4"})})})]}),(0,r.jsxs)("div",{className:"space-y-4 mt-3",children:[t.entrypoint&&(0,r.jsx)("div",{children:(0,r.jsx)("div",{className:"bg-gray-50 border border-gray-200 rounded-md p-3",children:(0,r.jsx)("code",{className:"text-sm text-gray-800 font-mono break-all",children:t.entrypoint})})}),t.dag_yaml&&"{}"!==t.dag_yaml&&(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex items-center mb-2",children:[(0,r.jsxs)("button",{onClick:()=>{w(!L)},className:"flex items-center text-left focus:outline-none text-gray-700 hover:text-gray-900 transition-colors duration-200",children:[L?(0,r.jsx)(h.Z,{className:"w-4 h-4 mr-1"}):(0,r.jsx)(f.Z,{className:"w-4 h-4 mr-1"}),(0,r.jsx)("span",{className:"text-base",children:"Show SkyPilot YAML"})]}),(0,r.jsx)(j.WH,{content:S?"Copied!":"Copy YAML",className:"text-muted-foreground",children:(0,r.jsx)("button",{onClick:es,className:"flex items-center text-gray-500 hover:text-gray-700 transition-colors duration-200 p-1 ml-2",children:S?(0,r.jsx)(x.Z,{className:"w-4 h-4 text-green-600"}):(0,r.jsx)(g.Z,{className:"w-4 h-4"})})})]}),L&&(0,r.jsx)("div",{className:"bg-gray-50 border border-gray-200 rounded-md p-3 max-h-96 overflow-y-auto",children:(()=>{let e=en(t.dag_yaml);return 0===e.length?(0,r.jsx)("div",{className:"text-gray-500",children:"No YAML available"}):1===e.length?(0,r.jsx)("pre",{className:"text-sm text-gray-800 font-mono whitespace-pre-wrap",children:e[0].content}):(0,r.jsx)("div",{className:"space-y-4",children:e.map((e,t)=>(0,r.jsxs)("div",{className:"border-b border-gray-200 pb-4 last:border-b-0",children:[(0,r.jsx)("button",{onClick:()=>et(t),className:"flex items-center justify-between w-full text-left focus:outline-none",children:(0,r.jsxs)("div",{className:"flex items-center",children:[C[t]?(0,r.jsx)(h.Z,{className:"w-4 h-4 mr-2"}):(0,r.jsx)(f.Z,{className:"w-4 h-4 mr-2"}),(0,r.jsxs)("span",{className:"text-sm font-medium text-gray-700",children:["Task ",t+1,": ",e.preview]})]})}),C[t]&&(0,r.jsx)("div",{className:"mt-3 ml-6",children:(0,r.jsx)("pre",{className:"text-sm text-gray-800 font-mono whitespace-pre-wrap",children:e.content})})]},t))})})()})]})]})]})]})}t.default=function(){var e;let t=(0,a.useRouter)(),{job:s,tab:d}=t.query,[x,g]=(0,n.useState)(0),{jobData:h,loading:f}=(0,o.UA)(s,x),[N,y]=(0,n.useState)(!1),[v,L]=(0,n.useState)(!0),[w,C]=(0,n.useState)(!1),[R,S]=(0,n.useState)(!1),[T,I]=(0,n.useState)(!1),[k,A]=(0,n.useState)(!1),[D,_]=(0,n.useState)(!1),[Z,F]=(0,n.useState)(0),[P,M]=(0,n.useState)(0),O=(0,p.X)();n.useEffect(()=>{!f&&v&&L(!1)},[f,v]);let q=e=>{let t=document.getElementById(e);t&&t.scrollIntoView({behavior:"smooth"})};(0,n.useEffect)(()=>{A(!0)},[]),(0,n.useEffect)(()=>{if(!D){let e=new MutationObserver(()=>{let t=document.getElementById("logs-section"),s=document.getElementById("controller-logs-section");("logs"===d&&t||"controllerlogs"===d&&s)&&(_(!0),e.disconnect())});return e.observe(document.body,{childList:!0,subtree:!0}),()=>e.disconnect()}},[D,d]),(0,n.useEffect)(()=>{if(t.isReady&&k&&D&&!T){let e=setTimeout(()=>{"logs"===d?(q("logs-section"),I(!0)):"controllerlogs"===d&&(q("controller-logs-section"),I(!0))},800);return()=>clearTimeout(e)}},[t.isReady,d,T,k,D]),(0,n.useEffect)(()=>{I(!1),_(!1)},[d]);let G=async()=>{y(!0);try{g(e=>e+1),F(e=>e+1),M(e=>e+1)}catch(e){console.error("Error refreshing data:",e)}finally{y(!1)}};if(!t.isReady)return(0,r.jsx)("div",{children:"Loading..."});let U=null==h?void 0:null===(e=h.jobs)||void 0===e?void 0:e.find(e=>String(e.id)===String(s)),H=s?"Job: ".concat(s," | SkyPilot Dashboard"):"Job Details | SkyPilot Dashboard";return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(b(),{children:(0,r.jsx)("title",{children:H})}),(0,r.jsxs)(c.A,{highlighted:"managed-jobs",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,r.jsxs)("div",{className:"text-base flex items-center",children:[(0,r.jsx)(u(),{href:"/jobs",className:"text-sky-blue hover:underline",children:"Managed Jobs"}),(0,r.jsx)("span",{className:"mx-2 text-gray-500",children:"›"}),(0,r.jsxs)(u(),{href:"/jobs/".concat(s),className:"text-sky-blue hover:underline",children:[s," ",(null==U?void 0:U.name)?"(".concat(U.name,")"):""]})]}),(0,r.jsxs)("div",{className:"text-sm flex items-center",children:[(f||N||w||R)&&(0,r.jsxs)("div",{className:"flex items-center mr-4",children:[(0,r.jsx)(l.Z,{size:15,className:"mt-0"}),(0,r.jsx)("span",{className:"ml-2 text-gray-500",children:"Loading..."})]}),(0,r.jsx)(j.WH,{content:"Refresh",className:"text-muted-foreground",children:(0,r.jsxs)("button",{onClick:G,disabled:f||N,className:"text-sky-blue hover:text-sky-blue-bright font-medium inline-flex items-center h-8",children:[(0,r.jsx)(m.Z,{className:"w-4 h-4 mr-1.5"}),!O&&(0,r.jsx)("span",{children:"Refresh"})]})})]})]}),f&&v?(0,r.jsxs)("div",{className:"flex items-center justify-center py-32",children:[(0,r.jsx)(l.Z,{size:20,className:"mr-2"}),(0,r.jsx)("span",{children:"Loading..."})]}):U?(0,r.jsxs)("div",{className:"space-y-8",children:[(0,r.jsx)("div",{id:"details-section",children:(0,r.jsxs)(i.Zb,{children:[(0,r.jsx)("div",{className:"flex items-center justify-between px-4 pt-4",children:(0,r.jsx)("h3",{className:"text-lg font-semibold",children:"Details"})}),(0,r.jsx)("div",{className:"p-4",children:(0,r.jsx)(E,{jobData:U,activeTab:"info",setIsLoadingLogs:C,setIsLoadingControllerLogs:S,isLoadingLogs:w,isLoadingControllerLogs:R,refreshFlag:0})})]})}),(0,r.jsx)("div",{id:"logs-section",className:"mt-6",children:(0,r.jsxs)(i.Zb,{children:[(0,r.jsxs)("div",{className:"flex items-center justify-between px-4 pt-4",children:[(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)("h3",{className:"text-lg font-semibold",children:"Logs"}),(0,r.jsx)("span",{className:"ml-2 text-xs text-gray-500",children:"(Logs are not streaming; click refresh to fetch the latest logs.)"})]}),(0,r.jsx)(j.WH,{content:"Refresh logs",className:"text-muted-foreground",children:(0,r.jsx)("button",{onClick:()=>{F(e=>e+1)},disabled:w,className:"text-sky-blue hover:text-sky-blue-bright flex items-center",children:(0,r.jsx)(m.Z,{className:"w-4 h-4 ".concat(w?"animate-spin":"")})})})]}),(0,r.jsx)("div",{className:"p-4",children:(0,r.jsx)(E,{jobData:U,activeTab:"logs",setIsLoadingLogs:C,setIsLoadingControllerLogs:S,isLoadingLogs:w,isLoadingControllerLogs:R,refreshFlag:Z})})]})}),(0,r.jsx)("div",{id:"controller-logs-section",className:"mt-6",children:(0,r.jsxs)(i.Zb,{children:[(0,r.jsxs)("div",{className:"flex items-center justify-between px-4 pt-4",children:[(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)("h3",{className:"text-lg font-semibold",children:"Controller Logs"}),(0,r.jsx)("span",{className:"ml-2 text-xs text-gray-500",children:"(Logs are not streaming; click refresh to fetch the latest logs.)"})]}),(0,r.jsx)(j.WH,{content:"Refresh controller logs",className:"text-muted-foreground",children:(0,r.jsx)("button",{onClick:()=>{M(e=>e+1)},disabled:R,className:"text-sky-blue hover:text-sky-blue-bright flex items-center",children:(0,r.jsx)(m.Z,{className:"w-4 h-4 ".concat(R?"animate-spin":"")})})})]}),(0,r.jsx)("div",{className:"p-4",children:(0,r.jsx)(E,{jobData:U,activeTab:"controllerlogs",setIsLoadingLogs:C,setIsLoadingControllerLogs:S,isLoadingLogs:w,isLoadingControllerLogs:R,refreshFlag:P})})]})})]}):(0,r.jsx)("div",{className:"flex items-center justify-center py-32",children:(0,r.jsx)("span",{children:"Job not found"})})]})]})}}},function(e){e.O(0,[614,798,470,969,888,774,179],function(){return e(e.s=479)}),_N_E=e.O()}]);
@@ -1,16 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[892],{7476:function(e,r,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/users",function(){return t(9253)}])},3626:function(e,r,t){"use strict";t.d(r,{Z:function(){return s}});/**
2
- * @license lucide-react v0.407.0 - ISC
3
- *
4
- * This source code is licensed under the ISC license.
5
- * See the LICENSE file in the root directory of this source tree.
6
- */let s=(0,t(998).Z)("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]])},3767:function(e,r,t){"use strict";t.d(r,{Z:function(){return s}});/**
7
- * @license lucide-react v0.407.0 - ISC
8
- *
9
- * This source code is licensed under the ISC license.
10
- * See the LICENSE file in the root directory of this source tree.
11
- */let s=(0,t(998).Z)("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},803:function(e,r,t){"use strict";t.d(r,{z:function(){return c}});var s=t(5893),n=t(7294),a=t(8426),l=t(2003),i=t(2350);let o=(0,l.j)("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),c=n.forwardRef((e,r)=>{let{className:t,variant:n,size:l,asChild:c=!1,...d}=e,u=c?a.g7:"button";return(0,s.jsx)(u,{className:(0,i.cn)(o({variant:n,size:l,className:t})),ref:r,...d})});c.displayName="Button"},7673:function(e,r,t){"use strict";t.d(r,{Ol:function(){return c},Zb:function(){return o},aY:function(){return f},eW:function(){return m},ll:function(){return d}});var s=t(5893),n=t(7294),a=t(5697),l=t.n(a),i=t(2350);let o=n.forwardRef((e,r)=>{let{className:t,children:n,...a}=e;return(0,s.jsx)("div",{ref:r,className:(0,i.cn)("rounded-lg border bg-card text-card-foreground shadow-sm",t),...a,children:n})});o.displayName="Card",o.propTypes={className:l().string,children:l().node};let c=n.forwardRef((e,r)=>{let{className:t,children:n,...a}=e;return(0,s.jsx)("div",{ref:r,className:(0,i.cn)("flex flex-col space-y-1.5 p-6",t),...a,children:n})});c.displayName="CardHeader",c.propTypes={className:l().string,children:l().node};let d=n.forwardRef((e,r)=>{let{className:t,children:n,...a}=e;return(0,s.jsx)("h3",{ref:r,className:(0,i.cn)("text-2xl font-semibold leading-none tracking-tight",t),...a,children:n})});d.displayName="CardTitle",d.propTypes={className:l().string,children:l().node};let u=n.forwardRef((e,r)=>{let{className:t,children:n,...a}=e;return(0,s.jsx)("p",{ref:r,className:(0,i.cn)("text-sm text-muted-foreground",t),...a,children:n})});u.displayName="CardDescription",u.propTypes={className:l().string,children:l().node};let f=n.forwardRef((e,r)=>{let{className:t,children:n,...a}=e;return(0,s.jsx)("div",{ref:r,className:(0,i.cn)("p-6 pt-0",t),...a,children:n})});f.displayName="CardContent",f.propTypes={className:l().string,children:l().node};let m=n.forwardRef((e,r)=>{let{className:t,children:n,...a}=e;return(0,s.jsx)("div",{ref:r,className:(0,i.cn)("flex items-center p-6 pt-0",t),...a,children:n})});m.displayName="CardFooter",m.propTypes={className:l().string,children:l().node}},8764:function(e,r,t){"use strict";t.d(r,{RM:function(){return o},SC:function(){return c},iA:function(){return l},pj:function(){return u},ss:function(){return d},xD:function(){return i}});var s=t(5893),n=t(7294),a=t(2350);let l=n.forwardRef((e,r)=>{let{className:t,...n}=e;return(0,s.jsx)("div",{className:"relative w-full overflow-auto",children:(0,s.jsx)("table",{ref:r,className:(0,a.cn)("w-full caption-bottom text-base",t),...n})})});l.displayName="Table";let i=n.forwardRef((e,r)=>{let{className:t,...n}=e;return(0,s.jsx)("thead",{ref:r,className:(0,a.cn)("[&_tr]:border-b",t),...n})});i.displayName="TableHeader";let o=n.forwardRef((e,r)=>{let{className:t,...n}=e;return(0,s.jsx)("tbody",{ref:r,className:(0,a.cn)("[&_tr:last-child]:border-0",t),...n})});o.displayName="TableBody",n.forwardRef((e,r)=>{let{className:t,...n}=e;return(0,s.jsx)("tfoot",{ref:r,className:(0,a.cn)("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",t),...n})}).displayName="TableFooter";let c=n.forwardRef((e,r)=>{let{className:t,...n}=e;return(0,s.jsx)("tr",{ref:r,className:(0,a.cn)("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",t),...n})});c.displayName="TableRow";let d=n.forwardRef((e,r)=>{let{className:t,...n}=e;return(0,s.jsx)("th",{ref:r,className:(0,a.cn)("h-12 px-4 text-left align-middle font-medium text-[hsl(var(--text-strong))] [&:has([role=checkbox])]:pr-0",t),...n})});d.displayName="TableHead";let u=n.forwardRef((e,r)=>{let{className:t,...n}=e;return(0,s.jsx)("td",{ref:r,className:(0,a.cn)("p-4 align-middle [&:has([role=checkbox])]:pr-0",t),...n})});u.displayName="TableCell",n.forwardRef((e,r)=>{let{className:t,...n}=e;return(0,s.jsx)("caption",{ref:r,className:(0,a.cn)("mt-4 text-base text-muted-foreground",t),...n})}).displayName="TableCaption"},4545:function(e,r,t){"use strict";function s(e){return e.startsWith("sky-jobs-controller-")}function n(e,r,t){return null===r?e:[...e].sort((e,s)=>e[r]<s[r]?"ascending"===t?-1:1:e[r]>s[r]?"ascending"===t?1:-1:0)}t.d(r,{R0:function(){return n},Ym:function(){return s}})},9253:function(e,r,t){"use strict";t.r(r),t.d(r,{default:function(){return I}});var s=t(5893),n=t(7294),a=t(9008),l=t.n(a),i=t(5697),o=t.n(i),c=t(8799),d=t(1664),u=t.n(d);t(803);var f=t(8764),m=t(3081),x=t(3266),h=t(8969),p=t(6378),g=t(6856),b=t(1214),y=t(4545),j=t(3626),N=t(282),v=t(3767);/**
12
- * @license lucide-react v0.407.0 - ISC
13
- *
14
- * This source code is licensed under the ISC license.
15
- * See the LICENSE file in the root directory of this source tree.
16
- */let w=(0,t(998).Z)("Pen",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]]);var C=t(9470),k=t(3001),R=t(7673),E=t(3225);let T=e=>e&&e.includes("@")?e.split("@")[0]:e||"N/A",_=e=>e&&e.includes("@")?e:"-",Z=b.nb.REFRESH_INTERVAL;function S(){let[e,r]=(0,n.useState)(!1),t=(0,n.useRef)(null),a=(0,k.X)();return(0,s.jsxs)(C.A,{highlighted:"users",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-4 h-5",children:[(0,s.jsx)("div",{className:"text-base",children:(0,s.jsx)(u(),{href:"/users",className:"text-sky-blue hover:underline leading-none",children:"Users"})}),(0,s.jsxs)("div",{className:"flex items-center",children:[e&&(0,s.jsxs)("div",{className:"flex items-center mr-2",children:[(0,s.jsx)(c.Z,{size:15,className:"mt-0"}),(0,s.jsx)("span",{className:"ml-2 text-gray-500 text-sm",children:"Loading..."})]}),(0,s.jsxs)("button",{onClick:()=>{p.default.invalidate(m.R),p.default.invalidate(x.getClusters),p.default.invalidate(h.getManagedJobs,[{allUsers:!0}]),t.current&&t.current()},disabled:e,className:"text-sky-blue hover:text-sky-blue-bright flex items-center",children:[(0,s.jsx)(j.Z,{className:"h-4 w-4 mr-1.5"}),!a&&(0,s.jsx)("span",{children:"Refresh"})]})]})]}),(0,s.jsx)(D,{refreshInterval:Z,setLoading:r,refreshDataRef:t})]})}function D(e){let{refreshInterval:r,setLoading:t,refreshDataRef:a}=e,[l,i]=(0,n.useState)([]),[o,d]=(0,n.useState)(!0),[u,b]=(0,n.useState)(!1),[j,C]=(0,n.useState)({key:"username",direction:"ascending"}),[k,Z]=(0,n.useState)(null),[S,D]=(0,n.useState)(""),I=(0,n.useCallback)(async function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];t&&e&&t(!0),e&&d(!0);try{let r=await p.default.get(m.R),s=(r||[]).map(e=>({...e,usernameDisplay:T(e.username),fullEmail:_(e.username),clusterCount:-1,jobCount:-1}));i(s),b(!0),t&&e&&t(!1),e&&d(!1);let[n,a]=await Promise.all([p.default.get(x.getClusters),p.default.get(h.getManagedJobs,[{allUsers:!0}])]),l=a.jobs||[],o=(r||[]).map(e=>{let r=(n||[]).filter(r=>r.user_hash===e.userId),t=(l||[]).filter(r=>r.user_hash===e.userId);return{...e,usernameDisplay:T(e.username),fullEmail:_(e.username),clusterCount:r.length,jobCount:t.length}});i(o)}catch(r){console.error("Failed to fetch or process user data:",r),i([]),b(!0),t&&e&&t(!1),e&&d(!1)}},[t]);(0,n.useEffect)(()=>{a&&(a.current=()=>I(!0))},[a,I]),(0,n.useEffect)(()=>{(async()=>{b(!1),d(!0),await g.ZP.preloadForPage("users"),I(!0)})();let e=setInterval(()=>{I(!1)},r);return()=>clearInterval(e)},[I,r]);let F=(0,n.useMemo)(()=>(0,y.R0)(l,j.key,j.direction),[l,j]),L=e=>{let r="ascending";j.key===e&&"ascending"===j.direction&&(r="descending"),C({key:e,direction:r})},M=e=>j.key===e?"ascending"===j.direction?" ↑":" ↓":"",z=async(e,r)=>{try{let t=await fetch("".concat(E.f4,"/users/role"));if(!t.ok){let e=await t.json();throw Error(e.detail||"Failed to get user role")}let s=await t.json();console.log("data",s);let n=s.role;if("admin"!=n){alert("".concat(s.name," is logged in as no admin, cannot edit user role."));return}Z(e),D(r)}catch(e){console.error("Failed to check user role:",e),alert("Error: ".concat(e.message))}},A=()=>{Z(null),D("")},O=async e=>{if(!e||!S){console.error("User ID or role is missing."),alert("Error: User ID or role is missing.");return}d(!0);try{let r=await fetch("".concat(E.f4,"/users/update"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({user_id:e,role:S})});if(!r.ok){let e=await r.json();throw Error(e.detail||"Failed to update role")}p.default.invalidate(m.R),await I(!0),A()}catch(e){console.error("Failed to update user role:",e),alert("Error updating role: ".concat(e.message))}finally{d(!1)}};return o&&0===l.length&&!u?(0,s.jsx)("div",{className:"flex justify-center items-center h-64",children:(0,s.jsx)(c.Z,{})}):u?F&&0!==F.length?(0,s.jsx)(R.Zb,{children:(0,s.jsxs)(f.iA,{children:[(0,s.jsx)(f.xD,{children:(0,s.jsxs)(f.SC,{children:[(0,s.jsxs)(f.ss,{onClick:()=>L("usernameDisplay"),className:"sortable whitespace-nowrap cursor-pointer hover:bg-gray-50 w-1/5",children:["Name",M("usernameDisplay")]}),(0,s.jsxs)(f.ss,{onClick:()=>L("fullEmail"),className:"sortable whitespace-nowrap cursor-pointer hover:bg-gray-50 w-1/5",children:["Email",M("fullEmail")]}),(0,s.jsxs)(f.ss,{onClick:()=>L("role"),className:"sortable whitespace-nowrap cursor-pointer hover:bg-gray-50 w-1/5",children:["Role",M("role")]}),(0,s.jsxs)(f.ss,{onClick:()=>L("clusterCount"),className:"sortable whitespace-nowrap cursor-pointer hover:bg-gray-50 w-1/5",children:["Clusters",M("clusterCount")]}),(0,s.jsxs)(f.ss,{onClick:()=>L("jobCount"),className:"sortable whitespace-nowrap cursor-pointer hover:bg-gray-50 w-1/5",children:["Jobs",M("jobCount")]})]})}),(0,s.jsx)(f.RM,{children:F.map(e=>(0,s.jsxs)(f.SC,{children:[(0,s.jsx)(f.pj,{className:"truncate",title:e.username,children:e.usernameDisplay}),(0,s.jsx)(f.pj,{className:"truncate",title:e.fullEmail,children:e.fullEmail}),(0,s.jsx)(f.pj,{className:"truncate",title:e.role,children:(0,s.jsx)("div",{className:"flex items-center gap-2",children:k===e.userId?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("select",{value:S,onChange:e=>D(e.target.value),className:"block w-auto p-1 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-sky-blue focus:border-sky-blue sm:text-sm",children:[(0,s.jsx)("option",{value:"admin",children:"Admin"}),(0,s.jsx)("option",{value:"user",children:"User"})]}),(0,s.jsx)("button",{onClick:()=>O(e.userId),className:"text-green-600 hover:text-green-800 p-1",title:"Save",children:(0,s.jsx)(N.Z,{className:"h-4 w-4"})}),(0,s.jsx)("button",{onClick:A,className:"text-gray-500 hover:text-gray-700 p-1",title:"Cancel",children:(0,s.jsx)(v.Z,{className:"h-4 w-4"})})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"capitalize",children:e.role}),(0,s.jsx)("button",{onClick:()=>z(e.userId,e.role),className:"text-gray-400 hover:text-sky-blue p-1",title:"Edit role",children:(0,s.jsx)(w,{className:"h-3 w-3"})})]})})}),(0,s.jsx)(f.pj,{children:-1===e.clusterCount?(0,s.jsxs)("span",{className:"px-2 py-0.5 bg-gray-100 text-gray-400 rounded text-xs font-medium flex items-center",children:[(0,s.jsx)(c.Z,{size:10,className:"mr-1"}),"Loading..."]}):e.clusterCount>0?(0,s.jsx)("span",{className:"px-2 py-0.5 bg-blue-100 text-blue-800 rounded text-xs font-medium",children:e.clusterCount}):(0,s.jsx)("span",{className:"px-2 py-0.5 bg-gray-100 text-gray-500 rounded text-xs font-medium",children:"0"})}),(0,s.jsx)(f.pj,{children:-1===e.jobCount?(0,s.jsxs)("span",{className:"px-2 py-0.5 bg-gray-100 text-gray-400 rounded text-xs font-medium flex items-center",children:[(0,s.jsx)(c.Z,{size:10,className:"mr-1"}),"Loading..."]}):e.jobCount>0?(0,s.jsx)("span",{className:"px-2 py-0.5 bg-green-100 text-green-800 rounded text-xs font-medium",children:e.jobCount}):(0,s.jsx)("span",{className:"px-2 py-0.5 bg-gray-100 text-gray-500 rounded text-xs font-medium",children:"0"})})]},e.userId))})]})}):(0,s.jsxs)("div",{className:"text-center py-12",children:[(0,s.jsx)("p",{className:"text-lg font-semibold text-gray-500",children:"No users found."}),(0,s.jsx)("p",{className:"text-sm text-gray-400 mt-1",children:"There are currently no users to display."})]}):(0,s.jsxs)("div",{className:"flex justify-center items-center h-64",children:[(0,s.jsx)(c.Z,{}),(0,s.jsx)("span",{className:"ml-2 text-gray-500",children:"Loading users..."})]})}function I(){return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(l(),{children:(0,s.jsx)("title",{children:"Users | SkyPilot Dashboard"})}),(0,s.jsx)(S,{})]})}D.propTypes={refreshInterval:o().number.isRequired,setLoading:o().func.isRequired,refreshDataRef:o().shape({current:o().func}).isRequired}},2003:function(e,r,t){"use strict";t.d(r,{j:function(){return l}});var s=t(512);let n=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,a=s.W,l=(e,r)=>t=>{var s;if((null==r?void 0:r.variants)==null)return a(e,null==t?void 0:t.class,null==t?void 0:t.className);let{variants:l,defaultVariants:i}=r,o=Object.keys(l).map(e=>{let r=null==t?void 0:t[e],s=null==i?void 0:i[e];if(null===r)return null;let a=n(r)||n(s);return l[e][a]}),c=t&&Object.entries(t).reduce((e,r)=>{let[t,s]=r;return void 0===s||(e[t]=s),e},{});return a(e,o,null==r?void 0:null===(s=r.compoundVariants)||void 0===s?void 0:s.reduce((e,r)=>{let{class:t,className:s,...n}=r;return Object.entries(n).every(e=>{let[r,t]=e;return Array.isArray(t)?t.includes({...i,...c}[r]):({...i,...c})[r]===t})?[...e,t,s]:e},[]),null==t?void 0:t.class,null==t?void 0:t.className)}}},function(e){e.O(0,[614,470,293,969,856,888,774,179],function(){return e(e.s=7476)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[590],{2592:function(e,s,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/workspaces",function(){return t(9434)}])},1812:function(e,s,t){"use strict";t.d(s,{X:function(){return n}});var r=t(5893),l=t(7294);let a=e=>{if(!(null==e?void 0:e.message))return"An unexpected error occurred.";let s=e.message;return s.includes("failed:")&&(s=s.split("failed:")[1].trim()),s.charAt(0).toUpperCase()+s.slice(1)},n=e=>{let{error:s,title:t="Error",onDismiss:n}=e,[c,o]=(0,l.useState)(!1);if((0,l.useEffect)(()=>{s&&o(!1)},[s]),!s||c)return null;let i="string"==typeof s?s:a(s);return(0,r.jsx)("div",{className:"bg-red-50 border border-red-200 rounded-md p-3 mb-4",children:(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsxs)("div",{className:"flex",children:[(0,r.jsx)("div",{className:"flex-shrink-0",children:(0,r.jsx)("svg",{className:"h-5 w-5 text-red-400",viewBox:"0 0 20 20",fill:"currentColor",children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})})}),(0,r.jsx)("div",{className:"ml-3",children:(0,r.jsxs)("div",{className:"text-sm text-red-800",children:[(0,r.jsxs)("strong",{children:[t,":"]})," ",i]})})]}),(0,r.jsx)("button",{onClick:()=>{o(!0),n&&n()},className:"flex-shrink-0 ml-4 text-red-400 hover:text-red-600 focus:outline-none focus:ring-2 focus:ring-red-500 focus:ring-offset-2 focus:ring-offset-red-50 rounded","aria-label":"Dismiss error",children:(0,r.jsx)("svg",{className:"h-4 w-4",viewBox:"0 0 20 20",fill:"currentColor",children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})})]})})}},9434:function(e,s,t){"use strict";t.r(s),t.d(s,{default:function(){return _}});var r=t(5893),l=t(7294),a=t(9008),n=t.n(a),c=t(9470),o=t(1163),i=t(3266),d=t(8969),u=t(7324),x=t(7673),m=t(803),h=t(8799),f=t(1272),p=t(326),g=t(3850),j=t(1812),w=t(3626),N=t(3001),b=t(8236),k=t(6378),v=t(1214),y=t(6856),C=t(3225);let E=e=>{let{workspace:s,onDelete:t,onEdit:l,router:a}=e,n=async()=>{try{let e=await fetch("".concat(C.f4,"/users/role"));if(!e.ok){let s=await e.json();throw Error(s.detail||"Failed to get user role")}let t=await e.json(),r=t.role;if("admin"!=r){alert("".concat(t.name," is logged in as no admin, cannot edit workspace"));return}l(s.name)}catch(e){console.error("Failed to check user role:",e),alert("Error: ".concat(e.message))}};return(0,r.jsxs)(x.Zb,{children:[(0,r.jsx)(x.Ol,{children:(0,r.jsxs)(x.ll,{className:"text-base font-normal",children:[(0,r.jsx)("span",{className:"font-semibold",children:"Workspace:"})," ",s.name]})}),(0,r.jsxs)(x.aY,{className:"text-sm pb-2",children:[(0,r.jsxs)("div",{className:"py-2 flex items-center justify-between",children:[(0,r.jsxs)("div",{className:"flex items-center text-gray-600",children:[(0,r.jsx)(g.QT,{className:"w-4 h-4 mr-2 text-gray-500"}),(0,r.jsx)("span",{children:"Clusters (Running / Total)"})]}),(0,r.jsxs)("button",{onClick:()=>{a.push({pathname:"/clusters",query:{workspace:s.name}})},className:"font-normal text-blue-600 hover:text-blue-800 hover:underline cursor-pointer",children:[s.runningClusterCount," / ",s.totalClusterCount]})]}),(0,r.jsxs)("div",{className:"py-2 flex items-center justify-between border-t border-gray-100",children:[(0,r.jsxs)("div",{className:"flex items-center text-gray-600",children:[(0,r.jsx)(g.Vp,{className:"w-4 h-4 mr-2 text-gray-500"}),(0,r.jsx)("span",{children:"Managed Jobs"})]}),(0,r.jsx)("button",{onClick:()=>{a.push({pathname:"/jobs",query:{workspace:s.name}})},className:"font-normal text-blue-600 hover:text-blue-800 hover:underline cursor-pointer",children:s.managedJobsCount})]})]}),(0,r.jsxs)("div",{className:"px-6 pb-3 text-sm pt-3",children:[(0,r.jsx)("h4",{className:"mb-2 text-xs text-gray-500 tracking-wider",children:"Enabled Infra"}),(0,r.jsx)("div",{className:"flex flex-wrap gap-x-4 gap-y-1",children:s.clouds.map(e=>(0,r.jsxs)("div",{className:"flex items-center text-gray-700",children:[(0,r.jsx)(g.Ye,{className:"w-3.5 h-3.5 mr-1.5 text-green-500"}),(0,r.jsx)("span",{children:e})]},e))})]}),(0,r.jsxs)(x.eW,{className:"flex justify-end pt-3 gap-2",children:[(0,r.jsx)(m.z,{variant:"outline",size:"sm",onClick:()=>t(s.name),disabled:"default"===s.name,title:"default"===s.name?"Cannot delete default workspace":"Delete workspace",className:"text-red-600 hover:text-red-700 hover:bg-red-50",children:"Delete"}),(0,r.jsx)(m.z,{variant:"outline",size:"sm",onClick:n,children:"Edit"})]})]},s.name)},D=e=>{let{onClick:s}=e,t=async()=>{try{let e=await fetch("".concat(C.f4,"/users/role"));if(!e.ok){let s=await e.json();throw Error(s.detail||"Failed to get user role")}let t=await e.json(),r=t.role;if("admin"!=r){alert("".concat(t.name," is logged in as no admin, cannot create workspace"));return}s()}catch(e){console.error("Failed to check user role:",e),alert("Error: ".concat(e.message))}};return(0,r.jsx)(x.Zb,{className:"border-2 border-dashed border-sky-300 hover:border-sky-400 cursor-pointer transition-colors flex flex-col",onClick:t,children:(0,r.jsx)("div",{className:"flex-1 flex items-center justify-center p-6",children:(0,r.jsxs)("div",{className:"text-center",children:[(0,r.jsx)("div",{className:"w-16 h-16 rounded-full bg-sky-100 flex items-center justify-center mb-4 mx-auto",children:(0,r.jsx)("span",{className:"text-3xl text-sky-600",children:"+"})}),(0,r.jsx)("h3",{className:"text-lg font-medium text-sky-700 mb-2",children:"Create New Workspace"}),(0,r.jsx)("p",{className:"text-sm text-gray-500",children:"Set up a new workspace with custom infrastructure configurations"})]})})},"create-new")},z=e=>{let{workspaceCount:s,runningClusters:t,totalClusters:l,managedJobs:a,router:n}=e;return(0,r.jsx)("div",{className:"bg-sky-50 p-4 rounded-lg shadow mb-6",children:(0,r.jsxs)("div",{className:"flex flex-col sm:flex-row justify-around items-center",children:[(0,r.jsx)("div",{className:"p-2",children:(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)(g.E9,{className:"w-5 h-5 mr-2 text-sky-600"}),(0,r.jsx)("span",{className:"text-sm text-gray-600",children:"Workspaces:"}),(0,r.jsx)("span",{className:"ml-1 text-xl font-semibold text-sky-700",children:s})]})}),(0,r.jsx)("div",{className:"p-2",children:(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)(g.QT,{className:"w-5 h-5 mr-2 text-sky-600"}),(0,r.jsx)("span",{className:"text-sm text-gray-600",children:"Clusters (Running / Total):"}),(0,r.jsxs)("button",{onClick:()=>n.push("/clusters"),className:"ml-1 text-xl font-semibold text-blue-600 hover:text-blue-800 hover:underline cursor-pointer",children:[t," / ",l]})]})}),(0,r.jsx)("div",{className:"p-2",children:(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)(g.Vp,{className:"w-5 h-5 mr-2 text-sky-600"}),(0,r.jsx)("span",{className:"text-sm text-gray-600",children:"Managed Jobs:"}),(0,r.jsx)("button",{onClick:()=>n.push("/jobs"),className:"ml-1 text-xl font-semibold text-blue-600 hover:text-blue-800 hover:underline cursor-pointer",children:a})]})})]})})},O=v.nb.REFRESH_INTERVAL;function T(){let[e,s]=(0,l.useState)([]),[t,a]=(0,l.useState)({runningClusters:0,totalClusters:0,managedJobs:0}),[n,c]=(0,l.useState)(!0),[x,g]=(0,l.useState)(null),[v,T]=(0,l.useState)(!1),[_,R]=(0,l.useState)({confirmOpen:!1,workspaceToDelete:null,deleting:!1,error:null}),S=(0,o.useRouter)(),F=(0,N.X)(),J=async function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];e&&c(!0);try{let[e,t,r]=await Promise.all([k.default.get(u.fX),k.default.get(i.getClusters),k.default.get(d.getManagedJobs,[{allUsers:!0}])]);g(e);let l=Object.keys(e),n=await Promise.all(l.map(e=>k.default.get(u.yz,[e]))),c=Object.fromEntries(l.map((e,s)=>[e,n[s]])),o=Object.fromEntries(t.map(e=>[e.cluster,e.workspace||"default"])),x={};l.forEach(e=>{x[e]={name:e,totalClusterCount:0,runningClusterCount:0,managedJobsCount:0,clouds:new Set}});let m=0;t.forEach(e=>{let s=e.workspace||"default";x[s]||(x[s]={name:s,totalClusterCount:0,runningClusterCount:0,managedJobsCount:0,clouds:new Set}),x[s].totalClusterCount++,("RUNNING"===e.status||"LAUNCHING"===e.status)&&(x[s].runningClusterCount++,m++),e.cloud&&x[s].clouds.add(e.cloud)});let h=r.jobs||[],f=new Set(b.x2.active),p=0;h.forEach(e=>{let s=e.cluster_name||e.resources&&e.resources.cluster_name;if(s){let t=o[s];t&&x[t]&&f.has(e.status)&&x[t].managedJobsCount++}f.has(e.status)&&p++});let j=Object.values(x).filter(e=>l.includes(e.name)).map(e=>({...e,clouds:Array.isArray(c[e.name])?c[e.name]:[]})).sort((e,s)=>e.name.localeCompare(s.name));s(j),a({runningClusters:m,totalClusters:t.length,managedJobs:p})}catch(e){console.error("Error fetching workspace data:",e),s([]),a({runningClusters:0,totalClusters:0,managedJobs:0})}e&&c(!1)};(0,l.useEffect)(()=>{(async()=>{await y.ZP.preloadForPage("workspaces"),J(!0)})();let e=setInterval(()=>{J(!1)},O);return()=>clearInterval(e)},[]);let L=async e=>{try{let s=await fetch("".concat(C.f4,"/users/role"));if(!s.ok){let e=await s.json();throw Error(e.detail||"Failed to get user role")}let t=await s.json(),r=t.role;if("admin"!=r){alert("".concat(t.name," is logged in as no admin, cannot delete workspace"));return}R({confirmOpen:!0,workspaceToDelete:e,deleting:!1,error:null})}catch(e){console.error("Failed to check user role:",e),alert("Error: ".concat(e.message))}},A=async()=>{if(_.workspaceToDelete){R(e=>({...e,deleting:!0,error:null}));try{await (0,u.zl)(_.workspaceToDelete),R({confirmOpen:!1,workspaceToDelete:null,deleting:!1,error:null}),await J()}catch(e){console.error("Error deleting workspace:",e),R(s=>({...s,deleting:!1,error:e}))}}},Z=()=>{R({confirmOpen:!1,workspaceToDelete:null,deleting:!1,error:null})},P=async()=>{try{let e=await fetch("".concat(C.f4,"/users/role"));if(!e.ok){let s=await e.json();throw Error(s.detail||"Failed to get user role")}let s=await e.json(),t=s.role;if("admin"!=t){alert("".concat(s.name," is logged in as no admin, cannot edit config"));return}S.push("/config")}catch(e){console.error("Failed to check user role:",e),alert("Error: ".concat(e.message))}};return n&&0===e.length?(0,r.jsxs)("div",{className:"flex justify-center items-center h-64",children:[(0,r.jsx)(h.Z,{}),(0,r.jsx)("span",{className:"ml-2 text-gray-500",children:"Loading workspaces..."})]}):(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-4 h-5",children:[(0,r.jsxs)("div",{className:"text-base flex items-center",children:[(0,r.jsx)("span",{className:"text-sky-blue leading-none",children:"Workspaces"}),(0,r.jsx)(m.z,{variant:"outline",size:"sm",onClick:P,className:"ml-4 px-2 py-1 text-xs",disabled:n||!x||0===Object.keys(x).length,children:"Edit All Configs"})]}),(0,r.jsxs)("div",{className:"flex items-center",children:[n&&(0,r.jsxs)("div",{className:"flex items-center mr-2",children:[(0,r.jsx)(h.Z,{size:15,className:"mt-0"}),(0,r.jsx)("span",{className:"ml-2 text-gray-500 text-xs",children:"Refreshing..."})]}),(0,r.jsxs)("button",{onClick:()=>{k.default.invalidate(u.fX),k.default.invalidate(i.getClusters),k.default.invalidate(d.getManagedJobs,[{allUsers:!0}]),k.default.invalidateFunction(u.yz),J(!0)},disabled:n,className:"text-sky-blue hover:text-sky-blue-bright flex items-center",children:[(0,r.jsx)(w.Z,{className:"h-4 w-4 mr-1.5"}),!F&&(0,r.jsx)("span",{children:"Refresh"})]})]})]}),(0,r.jsx)(z,{workspaceCount:e.length,runningClusters:t.runningClusters,totalClusters:t.totalClusters,managedJobs:t.managedJobs,router:S}),0!==e.length||n?(0,r.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:[e.map(e=>(0,r.jsx)(E,{workspace:e,onDelete:L,onEdit:e=>S.push("/workspaces/".concat(e)),router:S},e.name)),(0,r.jsx)(D,{onClick:()=>S.push("/workspace/new")})]}):(0,r.jsxs)("div",{className:"text-center py-10",children:[(0,r.jsx)("p",{className:"text-lg text-gray-600",children:"No workspaces found."}),(0,r.jsx)("p",{className:"text-sm text-gray-500 mt-2",children:"Create a cluster to see its workspace here."})]}),x&&(0,r.jsx)(p.Vq,{open:v,onOpenChange:T,children:(0,r.jsxs)(p.cZ,{className:"sm:max-w-md md:max-w-lg lg:max-w-xl xl:max-w-2xl w-full max-h-[90vh] flex flex-col",children:[(0,r.jsx)(p.fK,{children:(0,r.jsx)(p.$N,{className:"pr-10",children:"All Workspaces Configuration"})}),(0,r.jsx)("div",{className:"flex-grow overflow-y-auto py-4",children:(0,r.jsx)("pre",{style:{backgroundColor:"#f5f5f5",padding:"16px",borderRadius:"8px",overflowX:"auto",whiteSpace:"pre",wordBreak:"normal"},children:f.ZP.dump(x,{indent:2})})})]})}),(0,r.jsx)(p.Vq,{open:_.confirmOpen,onOpenChange:Z,children:(0,r.jsxs)(p.cZ,{className:"sm:max-w-md",children:[(0,r.jsxs)(p.fK,{children:[(0,r.jsx)(p.$N,{children:"Delete Workspace"}),(0,r.jsxs)(p.Be,{children:['Are you sure you want to delete workspace "',_.workspaceToDelete,'"? This action cannot be undone.']})]}),(0,r.jsx)(j.X,{error:_.error,title:"Deletion Failed",onDismiss:()=>R(e=>({...e,error:null}))}),(0,r.jsxs)(p.cN,{children:[(0,r.jsx)(m.z,{variant:"outline",onClick:Z,disabled:_.deleting,children:"Cancel"}),(0,r.jsx)(m.z,{variant:"destructive",onClick:A,disabled:_.deleting,children:_.deleting?"Deleting...":"Delete"})]})]})})]})}function _(){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n(),{children:(0,r.jsx)("title",{children:"Workspaces | SkyPilot Dashboard"})}),(0,r.jsx)(c.A,{highlighted:"workspaces",children:(0,r.jsx)(T,{})})]})}}},function(e){e.O(0,[614,798,121,470,293,969,856,973,236,888,774,179],function(){return e(e.s=2592)}),_N_E=e.O()}]);
@@ -1,3 +0,0 @@
1
- *,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*
2
- ! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com
3
- */*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}:root{--background:0 0% 100%;--foreground:220 17% 27%;--card:0 0% 100%;--card-foreground:220 17% 27%;--popover:0 0% 100%;--popover-foreground:220 17% 27%;--primary:222.2 47.4% 11.2%;--primary-foreground:220 17% 27%;--secondary:210 40% 96.1%;--secondary-foreground:220 9% 46%;--muted:210 40% 96.1%;--muted-foreground:210 40% 96.1%;--accent:210 40% 96.1%;--accent-foreground:220 17% 27%;--destructive:0 84.2% 60.2%;--destructive-foreground:210 40% 98%;--border:214.3 31.8% 91.4%;--input:214.3 31.8% 91.4%;--ring:222.2 84% 4.9%;--radius:0.5rem;--chart-1:12 76% 61%;--chart-2:173 58% 39%;--chart-3:197 37% 24%;--chart-4:43 74% 66%;--chart-5:27 87% 67%;--text-strong:220 17% 27%}*{border-color:hsl(var(--border))}body{background-color:hsl(var(--background));color:hsl(var(--foreground))}.container{width:100%;margin-right:auto;margin-left:auto;padding-right:2rem;padding-left:2rem}@media (min-width:1400px){.container{max-width:1400px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.left-0{left:0}.left-2{left:.5rem}.left-\[50\%\]{left:50%}.left-full{left:100%}.right-0{right:0}.right-4{right:1rem}.top-0{top:0}.top-1\/2{top:50%}.top-14{top:3.5rem}.top-4{top:1rem}.top-\[50\%\]{top:50%}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-50{z-index:50}.z-\[9999\]{z-index:9999}.col-span-2{grid-column:span 2/span 2}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.-mt-10{margin-top:-2.5rem}.-mt-5{margin-top:-1.25rem}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.ml-0{margin-left:0}.ml-1{margin-left:.25rem}.ml-1\.5{margin-left:.375rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.ml-4{margin-left:1rem}.ml-6{margin-left:1.5rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mr-1\.5{margin-right:.375rem}.mr-2{margin-right:.5rem}.mr-3{margin-right:.75rem}.mr-4{margin-right:1rem}.mr-6{margin-right:1.5rem}.mt-0{margin-top:0}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.aspect-square{aspect-ratio:1/1}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-20{height:5rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-96{height:24rem}.h-\[calc\(100vh-56px\)\]{height:calc(100vh - 56px)}.h-\[var\(--radix-select-trigger-height\)\]{height:var(--radix-select-trigger-height)}.h-full{height:100%}.h-px{height:1px}.max-h-96{max-height:24rem}.max-h-\[250px\]{max-height:250px}.max-h-\[90vh\]{max-height:90vh}.min-h-\[80px\]{min-height:80px}.min-h-screen{min-height:100vh}.w-1\/2{width:50%}.w-1\/4{width:25%}.w-1\/5{width:20%}.w-10{width:2.5rem}.w-16{width:4rem}.w-2\/3{width:66.666667%}.w-20{width:5rem}.w-24{width:6rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-32{width:8rem}.w-4{width:1rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-8{width:2rem}.w-auto{width:auto}.w-full{width:100%}.w-max{width:max-content}.min-w-5{min-width:1.25rem}.min-w-\[100px\]{min-width:100px}.min-w-\[8rem\]{min-width:8rem}.min-w-\[var\(--radix-select-trigger-width\)\]{min-width:var(--radix-select-trigger-width)}.min-w-full{min-width:100%}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.flex-1{flex:1 1 0%}.flex-shrink-0,.shrink-0{flex-shrink:0}.flex-grow{flex-grow:1}.caption-bottom{caption-side:bottom}.-translate-x-full{--tw-translate-x:-100%}.-translate-x-full,.-translate-y-1\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y:-50%}.translate-x-0{--tw-translate-x:0px}.translate-x-0,.translate-x-\[-50\%\]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-\[-50\%\]{--tw-translate-x:-50%}.translate-y-\[-50\%\]{--tw-translate-y:-50%}.transform,.translate-y-\[-50\%\]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-help{cursor:help}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.select-none{user-select:none}.resize-none{resize:none}.resize{resize:both}.appearance-none{appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.content-center{align-content:center}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-around{justify-content:space-around}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-x-4{column-gap:1rem}.gap-y-1{row-gap:.25rem}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(.75rem * var(--tw-space-x-reverse));margin-left:calc(.75rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-gray-200>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgb(229 231 235/var(--tw-divide-opacity,1))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis}.truncate,.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l{border-left-width:1px}.border-l-4{border-left-width:4px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-dotted{border-style:dotted}.border-none{border-style:none}.border-blue-200{--tw-border-opacity:1;border-color:rgb(191 219 254/var(--tw-border-opacity,1))}.border-blue-500{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity,1))}.border-gray-100{--tw-border-opacity:1;border-color:rgb(243 244 246/var(--tw-border-opacity,1))}.border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}.border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}.border-gray-400{--tw-border-opacity:1;border-color:rgb(156 163 175/var(--tw-border-opacity,1))}.border-green-200{--tw-border-opacity:1;border-color:rgb(187 247 208/var(--tw-border-opacity,1))}.border-green-500{--tw-border-opacity:1;border-color:rgb(34 197 94/var(--tw-border-opacity,1))}.border-input{border-color:hsl(var(--input))}.border-red-200{--tw-border-opacity:1;border-color:rgb(254 202 202/var(--tw-border-opacity,1))}.border-red-500{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity,1))}.border-sky-200{--tw-border-opacity:1;border-color:rgb(186 230 253/var(--tw-border-opacity,1))}.border-sky-300{--tw-border-opacity:1;border-color:rgb(125 211 252/var(--tw-border-opacity,1))}.border-transparent{border-color:transparent}.border-yellow-500{--tw-border-opacity:1;border-color:rgb(234 179 8/var(--tw-border-opacity,1))}.bg-\[\#f7f7f7\]{--tw-bg-opacity:1;background-color:rgb(247 247 247/var(--tw-bg-opacity,1))}.bg-background{background-color:hsl(var(--background))}.bg-black\/50{background-color:rgba(0,0,0,.5)}.bg-blue-100{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity,1))}.bg-blue-50{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}.bg-blue-600{--tw-bg-opacity:1;background-color:rgb(37 99 235/var(--tw-bg-opacity,1))}.bg-card{background-color:hsl(var(--card))}.bg-cyan-50{--tw-bg-opacity:1;background-color:rgb(236 254 255/var(--tw-bg-opacity,1))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}.bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.bg-gray-500{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity,1))}.bg-green-100{--tw-bg-opacity:1;background-color:rgb(220 252 231/var(--tw-bg-opacity,1))}.bg-green-50{--tw-bg-opacity:1;background-color:rgb(240 253 244/var(--tw-bg-opacity,1))}.bg-green-700{--tw-bg-opacity:1;background-color:rgb(21 128 61/var(--tw-bg-opacity,1))}.bg-indigo-50{--tw-bg-opacity:1;background-color:rgb(238 242 255/var(--tw-bg-opacity,1))}.bg-muted{background-color:hsl(var(--muted))}.bg-muted\/50{background-color:hsl(var(--muted)/.5)}.bg-orange-50{--tw-bg-opacity:1;background-color:rgb(255 247 237/var(--tw-bg-opacity,1))}.bg-pink-50{--tw-bg-opacity:1;background-color:rgb(253 242 248/var(--tw-bg-opacity,1))}.bg-popover{background-color:hsl(var(--popover))}.bg-primary{background-color:hsl(var(--primary))}.bg-red-100{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity,1))}.bg-red-50{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity,1))}.bg-secondary{background-color:hsl(var(--secondary))}.bg-sky-100{--tw-bg-opacity:1;background-color:rgb(224 242 254/var(--tw-bg-opacity,1))}.bg-sky-50{--tw-bg-opacity:1;background-color:rgb(240 249 255/var(--tw-bg-opacity,1))}.bg-slate-100{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.bg-white\/50{background-color:hsla(0,0%,100%,.5)}.bg-yellow-100{--tw-bg-opacity:1;background-color:rgb(254 249 195/var(--tw-bg-opacity,1))}.bg-yellow-50{--tw-bg-opacity:1;background-color:rgb(254 252 232/var(--tw-bg-opacity,1))}.bg-yellow-500{--tw-bg-opacity:1;background-color:rgb(234 179 8/var(--tw-bg-opacity,1))}.object-contain{object-fit:contain}.p-0{padding:0}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-32{padding-top:8rem;padding-bottom:8rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.pb-1{padding-bottom:.25rem}.pb-2{padding-bottom:.5rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pb-6{padding-bottom:1.5rem}.pl-2{padding-left:.5rem}.pl-8{padding-left:2rem}.pr-10{padding-right:2.5rem}.pr-2{padding-right:.5rem}.pr-6{padding-right:1.5rem}.pt-0{padding-top:0}.pt-1{padding-top:.25rem}.pt-2{padding-top:.5rem}.pt-3{padding-top:.75rem}.pt-4{padding-top:1rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-middle{vertical-align:middle}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-light{font-weight:300}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.capitalize{text-transform:capitalize}.italic{font-style:italic}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.tracking-tight{letter-spacing:-.025em}.tracking-wider{letter-spacing:.05em}.text-\[hsl\(var\(--text-strong\)\)\]{color:hsl(var(--text-strong))}.text-amber-700{--tw-text-opacity:1;color:rgb(180 83 9/var(--tw-text-opacity,1))}.text-blue-600{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity,1))}.text-blue-700{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity,1))}.text-blue-800{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.text-card-foreground{color:hsl(var(--card-foreground))}.text-cyan-700{--tw-text-opacity:1;color:rgb(14 116 144/var(--tw-text-opacity,1))}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-gray-100{--tw-text-opacity:1;color:rgb(243 244 246/var(--tw-text-opacity,1))}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity,1))}.text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.text-green-400{--tw-text-opacity:1;color:rgb(74 222 128/var(--tw-text-opacity,1))}.text-green-500{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity,1))}.text-green-600{--tw-text-opacity:1;color:rgb(22 163 74/var(--tw-text-opacity,1))}.text-green-700{--tw-text-opacity:1;color:rgb(21 128 61/var(--tw-text-opacity,1))}.text-green-800{--tw-text-opacity:1;color:rgb(22 101 52/var(--tw-text-opacity,1))}.text-indigo-700{--tw-text-opacity:1;color:rgb(67 56 202/var(--tw-text-opacity,1))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-orange-700{--tw-text-opacity:1;color:rgb(194 65 12/var(--tw-text-opacity,1))}.text-pink-700{--tw-text-opacity:1;color:rgb(190 24 93/var(--tw-text-opacity,1))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-red-400{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.text-red-700{--tw-text-opacity:1;color:rgb(185 28 28/var(--tw-text-opacity,1))}.text-red-800{--tw-text-opacity:1;color:rgb(153 27 27/var(--tw-text-opacity,1))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.text-sky-600{--tw-text-opacity:1;color:rgb(2 132 199/var(--tw-text-opacity,1))}.text-sky-700{--tw-text-opacity:1;color:rgb(3 105 161/var(--tw-text-opacity,1))}.text-sky-blue{--tw-text-opacity:1;color:rgb(14 46 101/var(--tw-text-opacity,1))}.text-slate-500{--tw-text-opacity:1;color:rgb(100 116 139/var(--tw-text-opacity,1))}.text-slate-950{--tw-text-opacity:1;color:rgb(2 6 23/var(--tw-text-opacity,1))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.text-yellow-700{--tw-text-opacity:1;color:rgb(161 98 7/var(--tw-text-opacity,1))}.text-yellow-800{--tw-text-opacity:1;color:rgb(133 77 14/var(--tw-text-opacity,1))}.underline{text-decoration-line:underline}.underline-offset-4{text-underline-offset:4px}.opacity-30{opacity:.3}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.shadow,.shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.shadow-md,.shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-offset-background{--tw-ring-offset-color:hsl(var(--background))}.ring-offset-white{--tw-ring-offset-color:#fff}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-sm{--tw-backdrop-blur:blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-150,.transition-transform{transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0) scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1)) rotate(var(--tw-enter-rotate,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0) scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1)) rotate(var(--tw-exit-rotate,0))}}.duration-150{animation-duration:.15s}.duration-200{animation-duration:.2s}.duration-300{animation-duration:.3s}.ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.running{animation-play-state:running}.sortable{cursor:pointer;user-select:none}.sortable:hover{text-decoration:underline}.container{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;margin:20px}.chart{border:1px solid #ccc;padding:10px;border-radius:5px;background-color:#fff;box-shadow:0 2px 10px rgba(0,0,0,.1);max-height:400px;overflow:auto}.flip-card-container{display:flex;flex-wrap:wrap;gap:20px;justify-content:center}.flip-card-back,.flip-card-front{width:300px;height:350px;border:1px solid #ccc;display:flex;flex-direction:column;align-items:center;justify-content:center;background:#fff;border-radius:10px;box-shadow:0 4px 8px rgba(0,0,0,.1)}.flip-card-back{padding:20px;text-align:center}.home-card{display:flex;flex-direction:column;justify-content:space-between;flex:1 1 0;height:100%}.home-cloud-card{background-color:#f0fff0}.chartContainer{width:200px;height:200px}.tableCellWidth{width:210px!important}.tableCellWidth-sm{width:10px!important}.items-center h3.text-xl.font-semibold.mb-4:first-of-type{font-size:0;margin-bottom:1rem}.items-center h3.text-xl.font-semibold.mb-4:first-of-type:after{content:"";font-size:1.25rem}.file\:border-0::file-selector-button{border-width:0}.file\:bg-transparent::file-selector-button{background-color:transparent}.file\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\:font-medium::file-selector-button{font-weight:500}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.last\:border-b-0:last-child{border-bottom-width:0}.hover\:border-sky-400:hover{--tw-border-opacity:1;border-color:rgb(56 189 248/var(--tw-border-opacity,1))}.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:bg-blue-700:hover{--tw-bg-opacity:1;background-color:rgb(29 78 216/var(--tw-bg-opacity,1))}.hover\:bg-destructive\/90:hover{background-color:hsl(var(--destructive)/.9)}.hover\:bg-gray-100:hover{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.hover\:bg-gray-200:hover{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}.hover\:bg-gray-50:hover{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.hover\:bg-muted\/50:hover{background-color:hsl(var(--muted)/.5)}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary)/.9)}.hover\:bg-red-50:hover{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity,1))}.hover\:bg-secondary\/80:hover{background-color:hsl(var(--secondary)/.8)}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-blue-600:hover{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity,1))}.hover\:text-blue-700:hover{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity,1))}.hover\:text-blue-800:hover{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.hover\:text-gray-700:hover{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.hover\:text-gray-900:hover{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.hover\:text-green-700:hover{--tw-text-opacity:1;color:rgb(21 128 61/var(--tw-text-opacity,1))}.hover\:text-green-800:hover{--tw-text-opacity:1;color:rgb(22 101 52/var(--tw-text-opacity,1))}.hover\:text-red-600:hover{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.hover\:text-red-700:hover{--tw-text-opacity:1;color:rgb(185 28 28/var(--tw-text-opacity,1))}.hover\:text-sky-blue:hover{--tw-text-opacity:1;color:rgb(14 46 101/var(--tw-text-opacity,1))}.hover\:text-sky-blue-bright:hover{--tw-text-opacity:1;color:rgb(30 98 204/var(--tw-text-opacity,1))}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}.focus\:border-sky-blue:focus{--tw-border-opacity:1;border-color:rgb(14 46 101/var(--tw-border-opacity,1))}.focus\:bg-accent:focus{background-color:hsl(var(--accent))}.focus\:text-accent-foreground:focus{color:hsl(var(--accent-foreground))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-0:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.focus\:ring-0:focus,.focus\:ring-2:focus{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\:ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.focus\:ring-blue-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246/var(--tw-ring-opacity,1))}.focus\:ring-gray-400:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(156 163 175/var(--tw-ring-opacity,1))}.focus\:ring-red-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(239 68 68/var(--tw-ring-opacity,1))}.focus\:ring-ring:focus{--tw-ring-color:hsl(var(--ring))}.focus\:ring-sky-blue:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(14 46 101/var(--tw-ring-opacity,1))}.focus\:ring-offset-0:focus{--tw-ring-offset-width:0px}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px}.focus\:ring-offset-red-50:focus{--tw-ring-offset-color:#fef2f2}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color:hsl(var(--ring))}.focus-visible\:ring-slate-400:focus-visible{--tw-ring-opacity:1;--tw-ring-color:rgb(148 163 184/var(--tw-ring-opacity,1))}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:bg-gray-300:disabled{--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity,1))}.disabled\:text-gray-500:disabled{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.disabled\:opacity-30:disabled{opacity:.3}.disabled\:opacity-50:disabled{opacity:.5}.disabled\:hover\:bg-transparent:hover:disabled{background-color:transparent}.peer:disabled~.peer-disabled\:cursor-not-allowed{cursor:not-allowed}.peer:disabled~.peer-disabled\:opacity-70{opacity:.7}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom]{--tw-translate-y:0.25rem}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom],.data-\[side\=left\]\:-translate-x-1[data-side=left]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=left\]\:-translate-x-1[data-side=left]{--tw-translate-x:-0.25rem}.data-\[side\=right\]\:translate-x-1[data-side=right]{--tw-translate-x:0.25rem}.data-\[side\=right\]\:translate-x-1[data-side=right],.data-\[side\=top\]\:-translate-y-1[data-side=top]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=top\]\:-translate-y-1[data-side=top]{--tw-translate-y:-0.25rem}.data-\[state\=active\]\:bg-white[data-state=active]{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.data-\[state\=open\]\:bg-gray-100[data-state=open]{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.data-\[state\=selected\]\:bg-muted[data-state=selected]{background-color:hsl(var(--muted))}.data-\[state\=active\]\:text-slate-950[data-state=active]{--tw-text-opacity:1;color:rgb(2 6 23/var(--tw-text-opacity,1))}.data-\[state\=open\]\:text-gray-500[data-state=open]{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[state\=active\]\:shadow-sm[data-state=active]{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.data-\[state\=open\]\:animate-in[data-state=open]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity:initial;--tw-enter-scale:initial;--tw-enter-rotate:initial;--tw-enter-translate-x:initial;--tw-enter-translate-y:initial}.data-\[state\=closed\]\:animate-out[data-state=closed]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity:initial;--tw-exit-scale:initial;--tw-exit-rotate:initial;--tw-exit-translate-x:initial;--tw-exit-translate-y:initial}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity:0}.data-\[state\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity:0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale:.95}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale:.95}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y:-0.5rem}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x:0.5rem}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x:-0.5rem}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y:0.5rem}.data-\[state\=closed\]\:slide-out-to-left-1\/2[data-state=closed]{--tw-exit-translate-x:-50%}.data-\[state\=closed\]\:slide-out-to-top-\[48\%\][data-state=closed]{--tw-exit-translate-y:-48%}.data-\[state\=open\]\:slide-in-from-left-1\/2[data-state=open]{--tw-enter-translate-x:-50%}.data-\[state\=open\]\:slide-in-from-top-\[48\%\][data-state=open]{--tw-enter-translate-y:-48%}.dark\:bg-slate-800:is(.dark *){--tw-bg-opacity:1;background-color:rgb(30 41 59/var(--tw-bg-opacity,1))}.dark\:bg-slate-950:is(.dark *){--tw-bg-opacity:1;background-color:rgb(2 6 23/var(--tw-bg-opacity,1))}.dark\:text-slate-400:is(.dark *){--tw-text-opacity:1;color:rgb(148 163 184/var(--tw-text-opacity,1))}.dark\:text-slate-50:is(.dark *){--tw-text-opacity:1;color:rgb(248 250 252/var(--tw-text-opacity,1))}.dark\:ring-offset-slate-950:is(.dark *){--tw-ring-offset-color:#020617}.dark\:focus-visible\:ring-slate-800:focus-visible:is(.dark *){--tw-ring-opacity:1;--tw-ring-color:rgb(30 41 59/var(--tw-ring-opacity,1))}.dark\:data-\[state\=active\]\:bg-slate-950[data-state=active]:is(.dark *){--tw-bg-opacity:1;background-color:rgb(2 6 23/var(--tw-bg-opacity,1))}.dark\:data-\[state\=active\]\:text-slate-50[data-state=active]:is(.dark *){--tw-text-opacity:1;color:rgb(248 250 252/var(--tw-text-opacity,1))}@media (min-width:640px){.sm\:max-w-3xl{max-width:48rem}.sm\:max-w-md{max-width:28rem}.sm\:flex-row{flex-direction:row}.sm\:justify-end{justify-content:flex-end}.sm\:space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.sm\:rounded-lg{border-radius:var(--radius)}.sm\:text-left{text-align:left}.sm\:text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width:768px){.md\:max-w-lg{max-width:32rem}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}}@media (min-width:1024px){.lg\:col-span-1{grid-column:span 1/span 1}.lg\:col-span-2{grid-column:span 2/span 2}.lg\:col-span-3{grid-column:span 3/span 3}.lg\:max-w-xl{max-width:36rem}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (min-width:1280px){.xl\:max-w-2xl{max-width:42rem}}.\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0:has([role=checkbox]){padding-right:0}.\[\&\>span\]\:line-clamp-1>span{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.\[\&\>tr\]\:last\:border-b-0:last-child>tr{border-bottom-width:0}.\[\&_tr\:last-child\]\:border-0 tr:last-child{border-width:0}.\[\&_tr\]\:border-b tr{border-bottom-width:1px}