skypilot-nightly 1.0.0.dev20250604__py3-none-any.whl → 1.0.0.dev20250606__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.
- sky/__init__.py +2 -2
- sky/admin_policy.py +5 -0
- sky/catalog/__init__.py +2 -2
- sky/catalog/common.py +7 -9
- sky/cli.py +11 -9
- sky/client/cli.py +11 -9
- sky/client/sdk.py +30 -12
- sky/clouds/kubernetes.py +2 -2
- sky/dashboard/out/404.html +1 -1
- sky/dashboard/out/_next/static/99m-BAySO8Q7J-ul1jZVL/_buildManifest.js +1 -0
- sky/dashboard/out/_next/static/chunks/{236-fef38aa6e5639300.js → 236-a90f0a9753a10420.js} +2 -2
- sky/dashboard/out/_next/static/chunks/614-635a84e87800f99e.js +66 -0
- sky/dashboard/out/_next/static/chunks/{856-f1b1f7f47edde2e8.js → 856-3a32da4b84176f6d.js} +1 -1
- sky/dashboard/out/_next/static/chunks/937.3759f538f11a0953.js +1 -0
- sky/dashboard/out/_next/static/chunks/pages/clusters/[cluster]-35cbeb5214fd4036.js +6 -0
- sky/dashboard/out/_next/static/chunks/pages/config-1a1eeb949dab8897.js +6 -0
- sky/dashboard/out/_next/static/chunks/pages/jobs/[job]-2d23a9c7571e6320.js +16 -0
- sky/dashboard/out/_next/static/chunks/pages/users-262aab38b9baaf3a.js +16 -0
- sky/dashboard/out/_next/static/chunks/pages/workspaces-384ea5fa0cea8f28.js +1 -0
- sky/dashboard/out/_next/static/chunks/{webpack-f27c9a32aa3d9c6d.js → webpack-65d465f948974c0d.js} +1 -1
- sky/dashboard/out/_next/static/css/667d941a2888ce6e.css +3 -0
- sky/dashboard/out/clusters/[cluster]/[job].html +1 -1
- sky/dashboard/out/clusters/[cluster].html +1 -1
- sky/dashboard/out/clusters.html +1 -1
- sky/dashboard/out/config.html +1 -1
- sky/dashboard/out/index.html +1 -1
- sky/dashboard/out/infra/[context].html +1 -1
- sky/dashboard/out/infra.html +1 -1
- sky/dashboard/out/jobs/[job].html +1 -1
- sky/dashboard/out/jobs.html +1 -1
- sky/dashboard/out/users.html +1 -1
- sky/dashboard/out/workspace/new.html +1 -1
- sky/dashboard/out/workspaces/[name].html +1 -1
- sky/dashboard/out/workspaces.html +1 -1
- sky/execution.py +44 -46
- sky/global_user_state.py +118 -83
- sky/jobs/client/sdk.py +4 -1
- sky/jobs/server/core.py +5 -1
- sky/models.py +1 -0
- sky/resources.py +22 -1
- sky/serve/load_balancer.py +56 -45
- sky/server/constants.py +3 -1
- sky/server/requests/payloads.py +9 -0
- sky/server/server.py +30 -9
- sky/setup_files/MANIFEST.in +1 -0
- sky/setup_files/dependencies.py +2 -0
- sky/skylet/constants.py +10 -4
- sky/skypilot_config.py +4 -2
- sky/templates/websocket_proxy.py +11 -1
- sky/users/__init__.py +0 -0
- sky/users/model.conf +15 -0
- sky/users/permission.py +178 -0
- sky/users/rbac.py +86 -0
- sky/users/server.py +66 -0
- sky/utils/schemas.py +20 -7
- sky/workspaces/core.py +2 -2
- {skypilot_nightly-1.0.0.dev20250604.dist-info → skypilot_nightly-1.0.0.dev20250606.dist-info}/METADATA +3 -1
- {skypilot_nightly-1.0.0.dev20250604.dist-info → skypilot_nightly-1.0.0.dev20250606.dist-info}/RECORD +70 -66
- sky/catalog/constants.py +0 -8
- sky/dashboard/out/_next/static/chunks/614-3d29f98e0634b179.js +0 -66
- sky/dashboard/out/_next/static/chunks/937.f97f83652028e944.js +0 -1
- sky/dashboard/out/_next/static/chunks/pages/clusters/[cluster]-62c9982dc3675725.js +0 -6
- sky/dashboard/out/_next/static/chunks/pages/config-35383adcb0edb5e2.js +0 -6
- sky/dashboard/out/_next/static/chunks/pages/jobs/[job]-a62a3c65dc9bc57c.js +0 -11
- sky/dashboard/out/_next/static/chunks/pages/users-07b523ccb19317ad.js +0 -6
- sky/dashboard/out/_next/static/chunks/pages/workspaces-f54921ec9eb20965.js +0 -1
- sky/dashboard/out/_next/static/css/63d3995d8b528eb1.css +0 -3
- sky/dashboard/out/_next/static/vWwfD3jOky5J5jULHp8JT/_buildManifest.js +0 -1
- /sky/dashboard/out/_next/static/{vWwfD3jOky5J5jULHp8JT → 99m-BAySO8Q7J-ul1jZVL}/_ssgManifest.js +0 -0
- /sky/dashboard/out/_next/static/chunks/{121-8f55ee3fa6301784.js → 121-865d2bf8a3b84c6a.js} +0 -0
- /sky/dashboard/out/_next/static/chunks/{37-947904ccc5687bac.js → 37-beedd583fea84cc8.js} +0 -0
- /sky/dashboard/out/_next/static/chunks/{682-2be9b0f169727f2f.js → 682-6647f0417d5662f0.js} +0 -0
- /sky/dashboard/out/_next/static/chunks/{843-a097338acb89b7d7.js → 843-c296541442d4af88.js} +0 -0
- /sky/dashboard/out/_next/static/chunks/{969-d7b6fb7f602bfcb3.js → 969-c7abda31c10440ac.js} +0 -0
- /sky/dashboard/out/_next/static/chunks/pages/{_app-67925f5e6382e22f.js → _app-cb81dc4d27f4d009.js} +0 -0
- /sky/dashboard/out/_next/static/chunks/pages/clusters/[cluster]/{[job]-158b70da336d8607.js → [job]-65d04d5d77cbb6b6.js} +0 -0
- {skypilot_nightly-1.0.0.dev20250604.dist-info → skypilot_nightly-1.0.0.dev20250606.dist-info}/WHEEL +0 -0
- {skypilot_nightly-1.0.0.dev20250604.dist-info → skypilot_nightly-1.0.0.dev20250606.dist-info}/entry_points.txt +0 -0
- {skypilot_nightly-1.0.0.dev20250604.dist-info → skypilot_nightly-1.0.0.dev20250606.dist-info}/licenses/LICENSE +0 -0
- {skypilot_nightly-1.0.0.dev20250604.dist-info → skypilot_nightly-1.0.0.dev20250606.dist-info}/top_level.txt +0 -0
@@ -1 +1 @@
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[856],{3266:function(e,t,r){r.d(t,{QL:function(){return d},Sl:function(){return u},getClusters:function(){return c}});var a=r(7294),o=r(5821),s=r(3225),n=r(6378);let l={UP:"RUNNING",STOPPED:"STOPPED",INIT:"LAUNCHING",null:"TERMINATED"};async function c(){let{clusterNames:e=null}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{let t=await fetch("".concat(s.f4,"/status"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cluster_names:e,all_users:!0})}),r=t.headers.get("X-Skypilot-Request-ID")||t.headers.get("X-Request-ID"),a=await fetch("".concat(s.f4,"/api/get?request_id=").concat(r)),o=await a.json();return(o.return_value?JSON.parse(o.return_value):[]).map(e=>{let t="",r=t=e.zone?e.zone:e.region;return t&&t.length>25&&(t=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:15;if(!e||e.length<=t)return e;if(t<=3)return"...";let r=Math.floor((t-3)/2),a=r+(t-3)%2;return 0===r?e.substring(0,a)+"...":e.substring(0,a)+"..."+e.substring(e.length-r)}(t,25)),{status:l[e.status],cluster:e.name,user:e.user_name,user_hash:e.user_hash,cloud:e.cloud,region:e.region,infra:t?e.cloud+" ("+t+")":e.cloud,full_infra:r?"".concat(e.cloud," (").concat(r,")"):e.cloud,cpus:e.cpus,mem:e.memory,gpus:e.accelerators,resources_str:e.resources_str,resources_str_full:e.resources_str_full,time:new Date(1e3*e.launched_at),num_nodes:e.nodes,workspace:e.workspace,autostop:e.autostop,to_down:e.to_down,jobs:[],command:e.last_creation_command||e.last_use,task_yaml:e.last_creation_yaml||"{}",events:[{time:new Date(1e3*e.launched_at),event:"Cluster created."}]}})}catch(e){return console.error("Error fetching clusters:",e),[]}}async function u(e){let{clusterName:t,jobId:r,onNewLog:a,workspace:n}=e;try{let e=(await fetch("".concat(s.f4,"/logs"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({follow:!1,cluster_name:t,job_id:r,override_skypilot_config:{active_workspace:n||"default"}})})).body.getReader();for(;;){let{done:t,value:r}=await e.read();if(t)break;let o=new TextDecoder().decode(r);a(o)}}catch(e){console.error("Error in streamClusterJobLogs:",e),(0,o.C)("Error in streamClusterJobLogs: ".concat(e.message),"error")}}async function i(e){let{clusterName:t,workspace:r}=e;try{let e=await fetch("".concat(s.f4,"/queue"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cluster_name:t,all_users:!0,override_skypilot_config:{active_workspace:r}})}),a=e.headers.get("X-Skypilot-Request-ID")||e.headers.get("X-Request-ID"),o=await fetch("".concat(s.f4,"/api/get?request_id=").concat(a)),n=await o.json();return JSON.parse(n.return_value).map(e=>{let a=e.end_at?e.end_at:Date.now()/1e3,o=0,s=0;return e.submitted_at&&(o=a-e.submitted_at),e.start_at&&(s=a-e.start_at),{id:e.job_id,status:e.status,job:e.job_name,user:e.username,gpus:e.accelerators||{},submitted_at:e.submitted_at?new Date(1e3*e.submitted_at):null,resources:e.resources,cluster:t,total_duration:o,job_duration:s,infra:"",logs:"",workspace:r||"default"}})}catch(e){return console.error("Error fetching cluster jobs:",e),[]}}function d(e){let{cluster:t,job:r=null}=e,[o,s]=(0,a.useState)(null),[l,u]=(0,a.useState)(null),[d,g]=(0,a.useState)(!0),[f,p]=(0,a.useState)(!0),h=(0,a.useCallback)(async()=>{if(t)try{g(!0);let e=await n.default.get(c,[{clusterNames:[t]}]);return s(e[0]),e[0]}catch(e){console.error("Error fetching cluster data:",e)}finally{g(!1)}return null},[t]),_=(0,a.useCallback)(async e=>{if(t)try{p(!0);let r=await n.default.get(i,[{clusterName:t,workspace:e||"default"}]);u(r)}catch(e){console.error("Error fetching cluster job data:",e)}finally{p(!1)}},[t]),b=(0,a.useCallback)(async()=>{n.default.invalidate(c,[{clusterNames:[t]}]);let e=await h();e&&(n.default.invalidate(i,[{clusterName:t,workspace:e.workspace||"default"}]),await _(e.workspace))},[h,_,t]),m=(0,a.useCallback)(async()=>{o&&(n.default.invalidate(i,[{clusterName:t,workspace:o.workspace||"default"}]),await _(o.workspace))},[_,o,t]);return(0,a.useEffect)(()=>{(async()=>{let e=await h();e&&_(e.workspace)})()},[t,r,h,_]),{clusterData:o,clusterJobData:l,loading:d,clusterDetailsLoading:d,clusterJobsLoading:f,refreshData:b,refreshClusterJobsOnly:m}}},2045:function(e,t,r){r.d(t,{l4:function(){return s}});var a=r(3225);async function o(e,t){try{let r=[];try{let e=await fetch("".concat(a.f4,"/enabled_clouds"),{method:"GET",headers:{"Content-Type":"application/json"}}),t=e.headers.get("X-Skypilot-Request-ID")||e.headers.get("X-Request-ID"),o=await fetch("".concat(a.f4,"/api/get?request_id=").concat(t)),s=await o.json();r=s.return_value?JSON.parse(s.return_value):[],console.log("Enabled clouds:",r)}catch(e){console.error("Error fetching enabled clouds:",e),r=[]}let o={};a.$m.forEach(e=>{let t=r.includes(e.toLowerCase());o[e]={name:e,clusters:0,jobs:0,enabled:t}}),e.forEach(e=>{if(e.cloud){let t=e.cloud;o[t]&&(o[t].clusters+=1,o[t].enabled=!0)}}),t.forEach(e=>{if(e.cloud){let t=e.cloud;o[t]&&(o[t].jobs+=1,o[t].enabled=!0)}});let s=a.$m.length,n=Object.values(o).filter(e=>e.enabled).length;return{clouds:Object.values(o).filter(e=>e.enabled).sort((e,t)=>t.clusters-e.clusters||t.jobs-e.jobs),totalClouds:s,enabledClouds:n}}catch(e){return console.error("Error fetching cloud infrastructure:",e),{clouds:[],totalClouds:a.$m.length,enabledClouds:0}}}async function s(){let{getClusters:e}=await Promise.resolve().then(r.bind(r,3266)),{getManagedJobs:t}=await Promise.resolve().then(r.bind(r,8969)),a=(await Promise.resolve().then(r.bind(r,6378))).default,[s,l]=await Promise.all([a.get(e),a.get(t,[{allUsers:!0}])]),c=s||[],u=(null==l?void 0:l.jobs)||[],[i,d]=await Promise.all([n(c,u),o(c,u)]);return{gpuData:i,cloudData:d}}async function n(e,t){return await d({clusters:e||[],jobs:t||[]})}async function l(){try{let e=await fetch("".concat(a.f4,"/realtime_kubernetes_gpu_availability"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({context:null,name_filter:null,quantity_filter:null})});if(!e.ok)return console.error("Error fetching Kubernetes context GPUs (in getKubernetesContextGPUs): ".concat(e.status," ").concat(e.statusText)),[];let t=e.headers.get("X-Skypilot-Request-ID")||e.headers.get("x-request-id");if(!t)return console.error("No request ID returned for Kubernetes GPU availability (in getKubernetesContextGPUs)"),[];let r=await fetch("".concat(a.f4,"/api/get?request_id=").concat(t)),o=await r.text();if(500===r.status){try{let e=JSON.parse(o);if(e.detail&&e.detail.error)try{let t=JSON.parse(e.detail.error);console.error("[infra.jsx] getKubernetesContextGPUs: Server error detail:",t.message)}catch(t){console.error("[infra.jsx] getKubernetesContextGPUs: Error parsing server error JSON:",t,"Original error text:",e.detail.error)}}catch(e){console.error("[infra.jsx] getKubernetesContextGPUs: Error parsing 500 error response JSON:",e,"Raw text was:",o)}return[]}let s=JSON.parse(o);return s.return_value?JSON.parse(s.return_value):[]}catch(e){return console.error("[infra.jsx] Outer error in getKubernetesContextGPUs:",e),[]}}async function c(){try{let e=await fetch("".concat(a.f4,"/all_contexts"),{method:"GET",headers:{"Content-Type":"application/json"}});if(!e.ok)return console.error("Error fetching all contexts: ".concat(e.status," ").concat(e.statusText)),[];let t=e.headers.get("X-Skypilot-Request-ID")||e.headers.get("x-request-id");if(!t)return console.error("No request ID returned for /all_contexts"),[];let r=await fetch("".concat(a.f4,"/api/get?request_id=").concat(t)),o=await r.json();return o.return_value?JSON.parse(o.return_value):[]}catch(e){return console.error("[infra.jsx] Error in getAllContexts:",e),[]}}async function u(e){try{let t=await fetch("".concat(a.f4,"/kubernetes_node_info"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({context:e})}),r=t.headers.get("X-Skypilot-Request-ID")||t.headers.get("x-request-id"),o=await fetch("".concat(a.f4,"/api/get?request_id=").concat(r));if(500===o.status){try{let e=await o.json();if(e.detail&&e.detail.error)try{let t=JSON.parse(e.detail.error);console.error("Error fetching Kubernetes per node GPUs:",t.message)}catch(e){console.error("Error parsing JSON:",e)}}catch(e){console.error("Error parsing JSON:",e)}return{}}let s=await o.json();return(s.return_value?JSON.parse(s.return_value):{}).node_info_dict||{}}catch(t){return console.error("[infra.jsx] Error in getKubernetesPerNodeGPUs for context",e,":",t),{}}}async function i(e){try{let t=e.clusters,r=e.jobs,a={};return t.forEach(e=>{let t=null;if("Kubernetes"===e.cloud)(t=e.region)&&(t="kubernetes/".concat(t));else if("SSH"===e.cloud&&(t=e.region)){let e=t.startsWith("ssh-")?t.substring(4):t;t="ssh/".concat(e)}t&&(a[t]||(a[t]={clusters:0,jobs:0}),a[t].clusters+=1)}),r.forEach(e=>{let t=null;if("Kubernetes"===e.cloud)(t=e.region)&&(t="kubernetes/".concat(t));else if("SSH"===e.cloud&&(t=e.region)){let e=t.startsWith("ssh-")?t.substring(4):t;t="ssh/".concat(e)}t&&(a[t]||(a[t]={clusters:0,jobs:0}),a[t].jobs+=1)}),a}catch(e){return console.error("=== Error in getContextClustersAndJobs ===",e),{}}}async function d(e){try{let s=await c();if(!s||0===s.length)return console.log("No contexts found from /all_contexts endpoint."),{allContextNames:[],allGPUs:[],perContextGPUs:[],perNodeGPUs:[],contextStats:{}};let n=await i(e),d=await l(),g=new Map;d&&d.forEach(e=>{g.set(e[0],e[1])});let f={},p={},h={};for(let e of s){p[e]||(p[e]=[]);let s=g.get(e);if(s&&s.length>0)for(let t of s){let r=t[0],a=t[1].join(", "),o=t[2],s=t[3];r in f?(f[r].gpu_total+=o,f[r].gpu_free+=s):f[r]={gpu_total:o,gpu_free:s,gpu_name:r},p[e].push({gpu_name:r,gpu_requestable_qty_per_node:a,gpu_total:o,gpu_free:s,context:e})}let n=await u(e);if(n&&Object.keys(n).length>0)for(let s in n){var t,r,a,o;let l=n[s],c=l.accelerator_type||"-",u=null!==(a=null===(t=l.total)||void 0===t?void 0:t.accelerator_count)&&void 0!==a?a:0,i=null!==(o=null===(r=l.free)||void 0===r?void 0:r.accelerators_available)&&void 0!==o?o:0;h["".concat(e,"/").concat(s)]={node_name:l.name,gpu_name:c,gpu_total:u,gpu_free:i,context:e},"-"===c||p[e].some(e=>e.gpu_name===c)||(c in f||(f[c]={gpu_total:0,gpu_free:0,gpu_name:c}),p[e].find(e=>e.gpu_name===c)||p[e].push({gpu_name:c,gpu_requestable_qty_per_node:"-",gpu_total:0,gpu_free:0,context:e}))}0===p[e].length&&n&&Object.keys(n).length}return{allContextNames:s.sort(),allGPUs:Object.values(f).sort((e,t)=>e.gpu_name.localeCompare(t.gpu_name)),perContextGPUs:Object.values(p).flat().sort((e,t)=>e.context.localeCompare(t.context)||e.gpu_name.localeCompare(t.gpu_name)),perNodeGPUs:Object.values(h).sort((e,t)=>e.context.localeCompare(t.context)||e.node_name.localeCompare(t.node_name)||e.gpu_name.localeCompare(t.gpu_name)),contextStats:n}}catch(e){return console.error("[infra.jsx] Outer error in getKubernetesGPUs:",e),{allContextNames:[],allGPUs:[],perContextGPUs:[],perNodeGPUs:[],contextStats:{}}}}r(3266),r(8969)},3081:function(e,t,r){r.d(t,{R:function(){return c},i:function(){return u}});var a=r(3225),o=r(3266),s=r(8969);let n=e=>e&&e.includes("@")?e.split("@")[0]:e||"N/A",l=e=>e&&e.includes("@")?e:"-";async function c(){try{let e=await fetch("".concat(a.f4,"/users"));if(!e.ok)throw Error("HTTP error! status: ".concat(e.status));return(await e.json()).map(e=>({userId:e.id,username:e.name}))||[]}catch(e){return console.error("Failed to fetch users:",e),[]}}async function u(){let[e,t,r]=await Promise.all([c(),(0,o.getClusters)(),(0,s.getManagedJobs)()]),a=r.jobs||[];return(e||[]).map(e=>{let r=(t||[]).filter(t=>t.user_hash===e.userId),o=(a||[]).filter(t=>t.user_hash===e.userId);return{...e,usernameDisplay:n(e.username),fullEmail:l(e.username),clusterCount:r.length,jobCount:o.length}})}},6856:function(e,t,r){var a=r(6378),o=r(3266),s=r(8969),n=r(7324),l=r(3081),c=r(2045);let u={base:{getClusters:{fn:o.getClusters,args:[]},getManagedJobs:{fn:s.getManagedJobs,args:[{allUsers:!0}]},getWorkspaces:{fn:n.fX,args:[]},getUsers:{fn:l.R,args:[]},getUsersWithCounts:{fn:l.i,args:[]},getInfraData:{fn:c.l4,args:[]}},dynamic:{getEnabledClouds:{fn:n.yz,requiresWorkspaces:!0}},pages:{clusters:["getClusters","getWorkspaces"],jobs:["getManagedJobs","getClusters","getWorkspaces"],infra:["getInfraData"],workspaces:["getWorkspaces","getClusters","getManagedJobs","getEnabledClouds"],users:["getUsersWithCounts"]}};class i{async preloadForPage(e,t){let{backgroundPreload:r=!0,force:a=!1}=t||{};if(!u.pages[e]){console.warn("Unknown page: ".concat(e));return}console.log("[CachePreloader] Preloading cache for page: ".concat(e));try{await this._loadPageData(e,a),r&&this._backgroundPreloadOtherPages(e)}catch(t){console.error("[CachePreloader] Error preloading for page ".concat(e,":"),t)}}async _loadPageData(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=u.pages[e],o=[];for(let e of r)if(u.base[e]){let{fn:r,args:s}=u.base[e];t&&a.default.invalidate(r,s),o.push(a.default.get(r,s))}else"getEnabledClouds"===e&&o.push(this._loadEnabledCloudsForAllWorkspaces(t));await Promise.allSettled(o),console.log("[CachePreloader] Loaded data for page: ".concat(e))}async _loadEnabledCloudsForAllWorkspaces(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];try{e&&a.default.invalidate(n.fX);let t=await a.default.get(n.fX),r=Object.keys(t||{}).map(t=>(e&&a.default.invalidate(n.yz,[t]),a.default.get(n.yz,[t])));await Promise.allSettled(r)}catch(e){console.error("[CachePreloader] Error loading enabled clouds:",e)}}_backgroundPreloadOtherPages(e){if(this.isPreloading)return;this.isPreloading=!0;let t=Object.keys(u.pages).filter(t=>t!==e);console.log("[CachePreloader] Background preloading pages: ".concat(t.join(", "))),Promise.allSettled(t.map(async e=>{try{await this._loadPageData(e,!1),console.log("[CachePreloader] Background loaded: ".concat(e))}catch(t){console.error("[CachePreloader] Background load failed for ".concat(e,":"),t)}})).then(()=>{this.isPreloading=!1,console.log("[CachePreloader] Background preloading complete")})}async preloadBaseFunctions(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];console.log("[CachePreloader] Preloading all base functions");let t=Object.entries(u.base).map(t=>{let[r,{fn:o,args:s}]=t;return e&&a.default.invalidate(o,s),a.default.get(o,s).catch(e=>{console.error("[CachePreloader] Failed to preload ".concat(r,":"),e)})});await Promise.allSettled(t),console.log("[CachePreloader] Base functions preloaded")}getCacheStats(){return{...a.default.getStats(),isPreloading:this.isPreloading}}clearCache(){a.default.clear(),this.isPreloading=!1,this.preloadPromises.clear(),console.log("[CachePreloader] Cache cleared")}constructor(){this.isPreloading=!1,this.preloadPromises=new Map}}let d=new i;t.ZP=d}}]);
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[856],{3266:function(e,t,r){r.d(t,{QL:function(){return d},Sl:function(){return u},getClusters:function(){return c}});var a=r(7294),o=r(5821),s=r(3225),n=r(6378);let l={UP:"RUNNING",STOPPED:"STOPPED",INIT:"LAUNCHING",null:"TERMINATED"};async function c(){let{clusterNames:e=null}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{let t=await fetch("".concat(s.f4,"/status"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cluster_names:e,all_users:!0})}),r=t.headers.get("X-Skypilot-Request-ID")||t.headers.get("X-Request-ID"),a=await fetch("".concat(s.f4,"/api/get?request_id=").concat(r)),o=await a.json();return(o.return_value?JSON.parse(o.return_value):[]).map(e=>{let t="",r=t=e.zone?e.zone:e.region;return t&&t.length>25&&(t=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:15;if(!e||e.length<=t)return e;if(t<=3)return"...";let r=Math.floor((t-3)/2),a=r+(t-3)%2;return 0===r?e.substring(0,a)+"...":e.substring(0,a)+"..."+e.substring(e.length-r)}(t,25)),{status:l[e.status],cluster:e.name,user:e.user_name,user_hash:e.user_hash,cloud:e.cloud,region:e.region,infra:t?e.cloud+" ("+t+")":e.cloud,full_infra:r?"".concat(e.cloud," (").concat(r,")"):e.cloud,cpus:e.cpus,mem:e.memory,gpus:e.accelerators,resources_str:e.resources_str,resources_str_full:e.resources_str_full,time:new Date(1e3*e.launched_at),num_nodes:e.nodes,workspace:e.workspace,autostop:e.autostop,to_down:e.to_down,jobs:[],command:e.last_creation_command||e.last_use,task_yaml:e.last_creation_yaml||"{}",events:[{time:new Date(1e3*e.launched_at),event:"Cluster created."}]}})}catch(e){return console.error("Error fetching clusters:",e),[]}}async function u(e){let{clusterName:t,jobId:r,onNewLog:a,workspace:n}=e;try{let e=(await fetch("".concat(s.f4,"/logs"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({follow:!1,cluster_name:t,job_id:r,override_skypilot_config:{active_workspace:n||"default"}})})).body.getReader();for(;;){let{done:t,value:r}=await e.read();if(t)break;let o=new TextDecoder().decode(r);a(o)}}catch(e){console.error("Error in streamClusterJobLogs:",e),(0,o.C)("Error in streamClusterJobLogs: ".concat(e.message),"error")}}async function i(e){let{clusterName:t,workspace:r}=e;try{let e=await fetch("".concat(s.f4,"/queue"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cluster_name:t,all_users:!0,override_skypilot_config:{active_workspace:r}})}),a=e.headers.get("X-Skypilot-Request-ID")||e.headers.get("X-Request-ID"),o=await fetch("".concat(s.f4,"/api/get?request_id=").concat(a)),n=await o.json();return JSON.parse(n.return_value).map(e=>{let a=e.end_at?e.end_at:Date.now()/1e3,o=0,s=0;return e.submitted_at&&(o=a-e.submitted_at),e.start_at&&(s=a-e.start_at),{id:e.job_id,status:e.status,job:e.job_name,user:e.username,gpus:e.accelerators||{},submitted_at:e.submitted_at?new Date(1e3*e.submitted_at):null,resources:e.resources,cluster:t,total_duration:o,job_duration:s,infra:"",logs:"",workspace:r||"default"}})}catch(e){return console.error("Error fetching cluster jobs:",e),[]}}function d(e){let{cluster:t,job:r=null}=e,[o,s]=(0,a.useState)(null),[l,u]=(0,a.useState)(null),[d,g]=(0,a.useState)(!0),[f,p]=(0,a.useState)(!0),h=(0,a.useCallback)(async()=>{if(t)try{g(!0);let e=await n.default.get(c,[{clusterNames:[t]}]);return s(e[0]),e[0]}catch(e){console.error("Error fetching cluster data:",e)}finally{g(!1)}return null},[t]),_=(0,a.useCallback)(async e=>{if(t)try{p(!0);let r=await n.default.get(i,[{clusterName:t,workspace:e||"default"}]);u(r)}catch(e){console.error("Error fetching cluster job data:",e)}finally{p(!1)}},[t]),b=(0,a.useCallback)(async()=>{n.default.invalidate(c,[{clusterNames:[t]}]);let e=await h();e&&(n.default.invalidate(i,[{clusterName:t,workspace:e.workspace||"default"}]),await _(e.workspace))},[h,_,t]),m=(0,a.useCallback)(async()=>{o&&(n.default.invalidate(i,[{clusterName:t,workspace:o.workspace||"default"}]),await _(o.workspace))},[_,o,t]);return(0,a.useEffect)(()=>{(async()=>{let e=await h();e&&_(e.workspace)})()},[t,r,h,_]),{clusterData:o,clusterJobData:l,loading:d,clusterDetailsLoading:d,clusterJobsLoading:f,refreshData:b,refreshClusterJobsOnly:m}}},2045:function(e,t,r){r.d(t,{l4:function(){return s}});var a=r(3225);async function o(e,t){try{let r=[];try{let e=await fetch("".concat(a.f4,"/enabled_clouds"),{method:"GET",headers:{"Content-Type":"application/json"}}),t=e.headers.get("X-Skypilot-Request-ID")||e.headers.get("X-Request-ID"),o=await fetch("".concat(a.f4,"/api/get?request_id=").concat(t)),s=await o.json();r=s.return_value?JSON.parse(s.return_value):[],console.log("Enabled clouds:",r)}catch(e){console.error("Error fetching enabled clouds:",e),r=[]}let o={};a.$m.forEach(e=>{let t=r.includes(e.toLowerCase());o[e]={name:e,clusters:0,jobs:0,enabled:t}}),e.forEach(e=>{if(e.cloud){let t=e.cloud;o[t]&&(o[t].clusters+=1,o[t].enabled=!0)}}),t.forEach(e=>{if(e.cloud){let t=e.cloud;o[t]&&(o[t].jobs+=1,o[t].enabled=!0)}});let s=a.$m.length,n=Object.values(o).filter(e=>e.enabled).length;return{clouds:Object.values(o).filter(e=>e.enabled).sort((e,t)=>t.clusters-e.clusters||t.jobs-e.jobs),totalClouds:s,enabledClouds:n}}catch(e){return console.error("Error fetching cloud infrastructure:",e),{clouds:[],totalClouds:a.$m.length,enabledClouds:0}}}async function s(){let{getClusters:e}=await Promise.resolve().then(r.bind(r,3266)),{getManagedJobs:t}=await Promise.resolve().then(r.bind(r,8969)),a=(await Promise.resolve().then(r.bind(r,6378))).default,[s,l]=await Promise.all([a.get(e),a.get(t,[{allUsers:!0}])]),c=s||[],u=(null==l?void 0:l.jobs)||[],[i,d]=await Promise.all([n(c,u),o(c,u)]);return{gpuData:i,cloudData:d}}async function n(e,t){return await d({clusters:e||[],jobs:t||[]})}async function l(){try{let e=await fetch("".concat(a.f4,"/realtime_kubernetes_gpu_availability"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({context:null,name_filter:null,quantity_filter:null})});if(!e.ok)return console.error("Error fetching Kubernetes context GPUs (in getKubernetesContextGPUs): ".concat(e.status," ").concat(e.statusText)),[];let t=e.headers.get("X-Skypilot-Request-ID")||e.headers.get("x-request-id");if(!t)return console.error("No request ID returned for Kubernetes GPU availability (in getKubernetesContextGPUs)"),[];let r=await fetch("".concat(a.f4,"/api/get?request_id=").concat(t)),o=await r.text();if(500===r.status){try{let e=JSON.parse(o);if(e.detail&&e.detail.error)try{let t=JSON.parse(e.detail.error);console.error("[infra.jsx] getKubernetesContextGPUs: Server error detail:",t.message)}catch(t){console.error("[infra.jsx] getKubernetesContextGPUs: Error parsing server error JSON:",t,"Original error text:",e.detail.error)}}catch(e){console.error("[infra.jsx] getKubernetesContextGPUs: Error parsing 500 error response JSON:",e,"Raw text was:",o)}return[]}let s=JSON.parse(o);return s.return_value?JSON.parse(s.return_value):[]}catch(e){return console.error("[infra.jsx] Outer error in getKubernetesContextGPUs:",e),[]}}async function c(){try{let e=await fetch("".concat(a.f4,"/all_contexts"),{method:"GET",headers:{"Content-Type":"application/json"}});if(!e.ok)return console.error("Error fetching all contexts: ".concat(e.status," ").concat(e.statusText)),[];let t=e.headers.get("X-Skypilot-Request-ID")||e.headers.get("x-request-id");if(!t)return console.error("No request ID returned for /all_contexts"),[];let r=await fetch("".concat(a.f4,"/api/get?request_id=").concat(t)),o=await r.json();return o.return_value?JSON.parse(o.return_value):[]}catch(e){return console.error("[infra.jsx] Error in getAllContexts:",e),[]}}async function u(e){try{let t=await fetch("".concat(a.f4,"/kubernetes_node_info"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({context:e})}),r=t.headers.get("X-Skypilot-Request-ID")||t.headers.get("x-request-id"),o=await fetch("".concat(a.f4,"/api/get?request_id=").concat(r));if(500===o.status){try{let e=await o.json();if(e.detail&&e.detail.error)try{let t=JSON.parse(e.detail.error);console.error("Error fetching Kubernetes per node GPUs:",t.message)}catch(e){console.error("Error parsing JSON:",e)}}catch(e){console.error("Error parsing JSON:",e)}return{}}let s=await o.json();return(s.return_value?JSON.parse(s.return_value):{}).node_info_dict||{}}catch(t){return console.error("[infra.jsx] Error in getKubernetesPerNodeGPUs for context",e,":",t),{}}}async function i(e){try{let t=e.clusters,r=e.jobs,a={};return t.forEach(e=>{let t=null;if("Kubernetes"===e.cloud)(t=e.region)&&(t="kubernetes/".concat(t));else if("SSH"===e.cloud&&(t=e.region)){let e=t.startsWith("ssh-")?t.substring(4):t;t="ssh/".concat(e)}t&&(a[t]||(a[t]={clusters:0,jobs:0}),a[t].clusters+=1)}),r.forEach(e=>{let t=null;if("Kubernetes"===e.cloud)(t=e.region)&&(t="kubernetes/".concat(t));else if("SSH"===e.cloud&&(t=e.region)){let e=t.startsWith("ssh-")?t.substring(4):t;t="ssh/".concat(e)}t&&(a[t]||(a[t]={clusters:0,jobs:0}),a[t].jobs+=1)}),a}catch(e){return console.error("=== Error in getContextClustersAndJobs ===",e),{}}}async function d(e){try{let s=await c();if(!s||0===s.length)return console.log("No contexts found from /all_contexts endpoint."),{allContextNames:[],allGPUs:[],perContextGPUs:[],perNodeGPUs:[],contextStats:{}};let n=await i(e),d=await l(),g=new Map;d&&d.forEach(e=>{g.set(e[0],e[1])});let f={},p={},h={};for(let e of s){p[e]||(p[e]=[]);let s=g.get(e);if(s&&s.length>0)for(let t of s){let r=t[0],a=t[1].join(", "),o=t[2],s=t[3];r in f?(f[r].gpu_total+=o,f[r].gpu_free+=s):f[r]={gpu_total:o,gpu_free:s,gpu_name:r},p[e].push({gpu_name:r,gpu_requestable_qty_per_node:a,gpu_total:o,gpu_free:s,context:e})}let n=await u(e);if(n&&Object.keys(n).length>0)for(let s in n){var t,r,a,o;let l=n[s],c=l.accelerator_type||"-",u=null!==(a=null===(t=l.total)||void 0===t?void 0:t.accelerator_count)&&void 0!==a?a:0,i=null!==(o=null===(r=l.free)||void 0===r?void 0:r.accelerators_available)&&void 0!==o?o:0;h["".concat(e,"/").concat(s)]={node_name:l.name,gpu_name:c,gpu_total:u,gpu_free:i,context:e},"-"===c||p[e].some(e=>e.gpu_name===c)||(c in f||(f[c]={gpu_total:0,gpu_free:0,gpu_name:c}),p[e].find(e=>e.gpu_name===c)||p[e].push({gpu_name:c,gpu_requestable_qty_per_node:"-",gpu_total:0,gpu_free:0,context:e}))}0===p[e].length&&n&&Object.keys(n).length}return{allContextNames:s.sort(),allGPUs:Object.values(f).sort((e,t)=>e.gpu_name.localeCompare(t.gpu_name)),perContextGPUs:Object.values(p).flat().sort((e,t)=>e.context.localeCompare(t.context)||e.gpu_name.localeCompare(t.gpu_name)),perNodeGPUs:Object.values(h).sort((e,t)=>e.context.localeCompare(t.context)||e.node_name.localeCompare(t.node_name)||e.gpu_name.localeCompare(t.gpu_name)),contextStats:n}}catch(e){return console.error("[infra.jsx] Outer error in getKubernetesGPUs:",e),{allContextNames:[],allGPUs:[],perContextGPUs:[],perNodeGPUs:[],contextStats:{}}}}r(3266),r(8969)},3081:function(e,t,r){r.d(t,{R:function(){return o}});var a=r(3225);async function o(){try{let e=await fetch("".concat(a.f4,"/users"));if(!e.ok)throw Error("HTTP error! status: ".concat(e.status));return(await e.json()).map(e=>({userId:e.id,username:e.name,role:e.role}))||[]}catch(e){return console.error("Failed to fetch users:",e),[]}}r(3266),r(8969)},6856:function(e,t,r){var a=r(6378),o=r(3266),s=r(8969),n=r(7324),l=r(3081),c=r(2045);let u={base:{getClusters:{fn:o.getClusters,args:[]},getManagedJobs:{fn:s.getManagedJobs,args:[{allUsers:!0}]},getWorkspaces:{fn:n.fX,args:[]},getUsers:{fn:l.R,args:[]},getInfraData:{fn:c.l4,args:[]}},dynamic:{getEnabledClouds:{fn:n.yz,requiresWorkspaces:!0}},pages:{clusters:["getClusters","getWorkspaces"],jobs:["getManagedJobs","getClusters","getWorkspaces"],infra:["getInfraData","getClusters","getManagedJobs"],workspaces:["getWorkspaces","getClusters","getManagedJobs","getEnabledClouds"],users:["getUsers","getClusters","getManagedJobs"]}};class i{async preloadForPage(e,t){let{backgroundPreload:r=!0,force:a=!1}=t||{};if(!u.pages[e]){console.warn("Unknown page: ".concat(e));return}console.log("[CachePreloader] Preloading cache for page: ".concat(e));try{await this._loadPageData(e,a),r&&this._backgroundPreloadOtherPages(e)}catch(t){console.error("[CachePreloader] Error preloading for page ".concat(e,":"),t)}}async _loadPageData(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=u.pages[e],o=[];for(let e of r)if(u.base[e]){let{fn:r,args:s}=u.base[e];t&&a.default.invalidate(r,s),o.push(a.default.get(r,s))}else"getEnabledClouds"===e&&o.push(this._loadEnabledCloudsForAllWorkspaces(t));await Promise.allSettled(o),console.log("[CachePreloader] Loaded data for page: ".concat(e))}async _loadEnabledCloudsForAllWorkspaces(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];try{e&&a.default.invalidate(n.fX);let t=await a.default.get(n.fX),r=Object.keys(t||{}).map(t=>(e&&a.default.invalidate(n.yz,[t]),a.default.get(n.yz,[t])));await Promise.allSettled(r)}catch(e){console.error("[CachePreloader] Error loading enabled clouds:",e)}}_backgroundPreloadOtherPages(e){if(this.isPreloading)return;this.isPreloading=!0;let t=Object.keys(u.pages).filter(t=>t!==e);console.log("[CachePreloader] Background preloading pages: ".concat(t.join(", "))),Promise.allSettled(t.map(async e=>{try{await this._loadPageData(e,!1),console.log("[CachePreloader] Background loaded: ".concat(e))}catch(t){console.error("[CachePreloader] Background load failed for ".concat(e,":"),t)}})).then(()=>{this.isPreloading=!1,console.log("[CachePreloader] Background preloading complete")})}async preloadBaseFunctions(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];console.log("[CachePreloader] Preloading all base functions");let t=Object.entries(u.base).map(t=>{let[r,{fn:o,args:s}]=t;return e&&a.default.invalidate(o,s),a.default.get(o,s).catch(e=>{console.error("[CachePreloader] Failed to preload ".concat(r,":"),e)})});await Promise.allSettled(t),console.log("[CachePreloader] Base functions preloaded")}getCacheStats(){return{...a.default.getStats(),isPreloading:this.isPreloading}}clearCache(){a.default.clear(),this.isPreloading=!1,this.preloadPromises.clear(),console.log("[CachePreloader] Cache cleared")}constructor(){this.isPreloading=!1,this.preloadPromises=new Map}}let d=new i;t.ZP=d}}]);
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[937],{3937:function(t,e,i){let n;i.r(e),i.d(e,{default:function(){return i2}});var s=i(2445),r=i(9432);function a(t,e,i){let n=t.getProps();return(0,r.o)(n,e,void 0!==i?i:n.custom,t)}function o(t,e){return t?.[e]??t?.default??t}let l=t=>t,{schedule:u,cancel:h,state:d,steps:p}=(0,i(3674).Z)("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:l,!0);var c=i(9354);let m=new Set(["width","height","top","left","right","bottom",...c._]);class f{constructor(){this.subscriptions=[]}add(t){var e;return -1===(e=this.subscriptions).indexOf(t)&&e.push(t),()=>(function(t,e){let i=t.indexOf(e);i>-1&&t.splice(i,1)})(this.subscriptions,t)}notify(t,e,i){let n=this.subscriptions.length;if(n){if(1===n)this.subscriptions[0](t,e,i);else for(let s=0;s<n;s++){let n=this.subscriptions[s];n&&n(t,e,i)}}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}var v=i(2218);function y(){n=void 0}let g={now:()=>(void 0===n&&g.set(d.isProcessing||v.c.useManualTiming?d.timestamp:performance.now()),n),set:t=>{n=t,queueMicrotask(y)}},b=t=>!isNaN(parseFloat(t)),w={current:void 0};class T{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=(t,e=!0)=>{let i=g.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let t of this.dependents)t.dirty();e&&this.events.renderRequest?.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){this.current=t,this.updatedAt=g.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=b(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new f);let i=this.events[t].add(e);return"change"===t?()=>{i(),u.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(let t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t,e=!0){e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)}setWithVelocity(t,e,i){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-i}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return w.current&&w.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){var t;let e=g.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;let i=Math.min(this.updatedAt-this.prevUpdatedAt,30);return t=parseFloat(this.current)-parseFloat(this.prevFrameValue),i?1e3/i*t:0}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function S(t,e){return new T(t,e)}let A=t=>Array.isArray(t);var M=i(2558),V=i(8588);let x=(t,e)=>i=>e(t(i)),C=(...t)=>t.reduce(x);var k=i(488);let F=t=>1e3*t,P=t=>t/1e3,E={mainThread:0,waapi:0},D=()=>{},O=()=>{};var I=i(1219),R=i(7958);let N=t=>Math.round(1e5*t)/1e5,L=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,j=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,B=(t,e)=>i=>!!("string"==typeof i&&j.test(i)&&i.startsWith(t)||e&&null!=i&&Object.prototype.hasOwnProperty.call(i,e)),$=(t,e,i)=>n=>{if("string"!=typeof n)return n;let[s,r,a,o]=n.match(L);return{[t]:parseFloat(s),[e]:parseFloat(r),[i]:parseFloat(a),alpha:void 0!==o?parseFloat(o):1}},K=t=>(0,k.u)(0,255,t),q={...R.Rx,transform:t=>Math.round(K(t))},U={test:B("rgb","red"),parse:$("red","green","blue"),transform:({red:t,green:e,blue:i,alpha:n=1})=>"rgba("+q.transform(t)+", "+q.transform(e)+", "+q.transform(i)+", "+N(R.Fq.transform(n))+")"},W={test:B("#"),parse:function(t){let e="",i="",n="",s="";return t.length>5?(e=t.substring(1,3),i=t.substring(3,5),n=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),i=t.substring(2,3),n=t.substring(3,4),s=t.substring(4,5),e+=e,i+=i,n+=n,s+=s),{red:parseInt(e,16),green:parseInt(i,16),blue:parseInt(n,16),alpha:s?parseInt(s,16)/255:1}},transform:U.transform};var _=i(7259);let Y={test:B("hsl","hue"),parse:$("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:i,alpha:n=1})=>"hsla("+Math.round(t)+", "+_.aQ.transform(N(e))+", "+_.aQ.transform(N(i))+", "+N(R.Fq.transform(n))+")"},z={test:t=>U.test(t)||W.test(t)||Y.test(t),parse:t=>U.test(t)?U.parse(t):Y.test(t)?Y.parse(t):W.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?U.transform(t):Y.transform(t)},G=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,H="number",X="color",Z=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Q(t){let e=t.toString(),i=[],n={color:[],number:[],var:[]},s=[],r=0,a=e.replace(Z,t=>(z.test(t)?(n.color.push(r),s.push(X),i.push(z.parse(t))):t.startsWith("var(")?(n.var.push(r),s.push("var"),i.push(t)):(n.number.push(r),s.push(H),i.push(parseFloat(t))),++r,"${}")).split("${}");return{values:i,split:a,indexes:n,types:s}}function J(t){return Q(t).values}function tt(t){let{split:e,types:i}=Q(t),n=e.length;return t=>{let s="";for(let r=0;r<n;r++)if(s+=e[r],void 0!==t[r]){let e=i[r];e===H?s+=N(t[r]):e===X?s+=z.transform(t[r]):s+=t[r]}return s}}let te=t=>"number"==typeof t?0:t,ti={test:function(t){return isNaN(t)&&"string"==typeof t&&(t.match(L)?.length||0)+(t.match(G)?.length||0)>0},parse:J,createTransformer:tt,getAnimatableNone:function(t){let e=J(t);return tt(t)(e.map(te))}};function tn(t,e,i){return(i<0&&(i+=1),i>1&&(i-=1),i<1/6)?t+(e-t)*6*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}function ts(t,e){return i=>i>0?e:t}let tr=(t,e,i)=>t+(e-t)*i,ta=(t,e,i)=>{let n=t*t,s=i*(e*e-n)+n;return s<0?0:Math.sqrt(s)},to=[W,U,Y],tl=t=>to.find(e=>e.test(t));function tu(t){let e=tl(t);if(D(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`),!e)return!1;let i=e.parse(t);return e===Y&&(i=function({hue:t,saturation:e,lightness:i,alpha:n}){t/=360,i/=100;let s=0,r=0,a=0;if(e/=100){let n=i<.5?i*(1+e):i+e-i*e,o=2*i-n;s=tn(o,n,t+1/3),r=tn(o,n,t),a=tn(o,n,t-1/3)}else s=r=a=i;return{red:Math.round(255*s),green:Math.round(255*r),blue:Math.round(255*a),alpha:n}}(i)),i}let th=(t,e)=>{let i=tu(t),n=tu(e);if(!i||!n)return ts(t,e);let s={...i};return t=>(s.red=ta(i.red,n.red,t),s.green=ta(i.green,n.green,t),s.blue=ta(i.blue,n.blue,t),s.alpha=tr(i.alpha,n.alpha,t),U.transform(s))},td=new Set(["none","hidden"]);function tp(t,e){return i=>tr(t,e,i)}function tc(t){return"number"==typeof t?tp:"string"==typeof t?(0,I.t)(t)?ts:z.test(t)?th:tv:Array.isArray(t)?tm:"object"==typeof t?z.test(t)?th:tf:ts}function tm(t,e){let i=[...t],n=i.length,s=t.map((t,i)=>tc(t)(t,e[i]));return t=>{for(let e=0;e<n;e++)i[e]=s[e](t);return i}}function tf(t,e){let i={...t,...e},n={};for(let s in i)void 0!==t[s]&&void 0!==e[s]&&(n[s]=tc(t[s])(t[s],e[s]));return t=>{for(let e in n)i[e]=n[e](t);return i}}let tv=(t,e)=>{let i=ti.createTransformer(e),n=Q(t),s=Q(e);return n.indexes.var.length===s.indexes.var.length&&n.indexes.color.length===s.indexes.color.length&&n.indexes.number.length>=s.indexes.number.length?td.has(t)&&!s.values.length||td.has(e)&&!n.values.length?td.has(t)?i=>i<=0?t:e:i=>i>=1?e:t:C(tm(function(t,e){let i=[],n={color:0,var:0,number:0};for(let s=0;s<e.values.length;s++){let r=e.types[s],a=t.indexes[r][n[r]],o=t.values[a]??0;i[s]=o,n[r]++}return i}(n,s),s.values),i):(D(!0,`Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),ts(t,e))};function ty(t,e,i){return"number"==typeof t&&"number"==typeof e&&"number"==typeof i?tr(t,e,i):tc(t)(t,e)}let tg=t=>{let e=({timestamp:e})=>t(e);return{start:(t=!0)=>u.update(e,t),stop:()=>h(e),now:()=>d.isProcessing?d.timestamp:g.now()}},tb=(t,e,i=10)=>{let n="",s=Math.max(Math.round(e/i),2);for(let e=0;e<s;e++)n+=t(e/(s-1))+", ";return`linear(${n.substring(0,n.length-2)})`};function tw(t){let e=0,i=t.next(e);for(;!i.done&&e<2e4;)e+=50,i=t.next(e);return e>=2e4?1/0:e}function tT(t,e,i){var n,s;let r=Math.max(e-5,0);return n=i-t(r),(s=e-r)?1e3/s*n:0}let tS={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function tA(t,e){return t*Math.sqrt(1-e*e)}let tM=["duration","bounce"],tV=["stiffness","damping","mass"];function tx(t,e){return e.some(e=>void 0!==t[e])}function tC(t=tS.visualDuration,e=tS.bounce){let i;let n="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t,{restSpeed:s,restDelta:r}=n,a=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],l={done:!1,value:a},{stiffness:u,damping:h,mass:d,duration:p,velocity:c,isResolvedFromDuration:m}=function(t){let e={velocity:tS.velocity,stiffness:tS.stiffness,damping:tS.damping,mass:tS.mass,isResolvedFromDuration:!1,...t};if(!tx(t,tV)&&tx(t,tM)){if(t.visualDuration){let i=2*Math.PI/(1.2*t.visualDuration),n=i*i,s=2*(0,k.u)(.05,1,1-(t.bounce||0))*Math.sqrt(n);e={...e,mass:tS.mass,stiffness:n,damping:s}}else{let i=function({duration:t=tS.duration,bounce:e=tS.bounce,velocity:i=tS.velocity,mass:n=tS.mass}){let s,r;D(t<=F(tS.maxDuration),"Spring duration must be 10 seconds or less");let a=1-e;a=(0,k.u)(tS.minDamping,tS.maxDamping,a),t=(0,k.u)(tS.minDuration,tS.maxDuration,P(t)),a<1?(s=e=>{let n=e*a,s=n*t;return .001-(n-i)/tA(e,a)*Math.exp(-s)},r=e=>{let n=e*a*t,r=Math.pow(a,2)*Math.pow(e,2)*t,o=tA(Math.pow(e,2),a);return(n*i+i-r)*Math.exp(-n)*(-s(e)+.001>0?-1:1)/o}):(s=e=>-.001+Math.exp(-e*t)*((e-i)*t+1),r=e=>t*t*(i-e)*Math.exp(-e*t));let o=function(t,e,i){let n=i;for(let i=1;i<12;i++)n-=t(n)/e(n);return n}(s,r,5/t);if(t=F(t),isNaN(o))return{stiffness:tS.stiffness,damping:tS.damping,duration:t};{let e=Math.pow(o,2)*n;return{stiffness:e,damping:2*a*Math.sqrt(n*e),duration:t}}}(t);(e={...e,...i,mass:tS.mass}).isResolvedFromDuration=!0}}return e}({...n,velocity:-P(n.velocity||0)}),f=c||0,v=h/(2*Math.sqrt(u*d)),y=o-a,g=P(Math.sqrt(u/d)),b=5>Math.abs(y);if(s||(s=b?tS.restSpeed.granular:tS.restSpeed.default),r||(r=b?tS.restDelta.granular:tS.restDelta.default),v<1){let t=tA(g,v);i=e=>o-Math.exp(-v*g*e)*((f+v*g*y)/t*Math.sin(t*e)+y*Math.cos(t*e))}else if(1===v)i=t=>o-Math.exp(-g*t)*(y+(f+g*y)*t);else{let t=g*Math.sqrt(v*v-1);i=e=>{let i=Math.exp(-v*g*e),n=Math.min(t*e,300);return o-i*((f+v*g*y)*Math.sinh(n)+t*y*Math.cosh(n))/t}}let w={calculatedDuration:m&&p||null,next:t=>{let e=i(t);if(m)l.done=t>=p;else{let n=0===t?f:0;v<1&&(n=0===t?F(f):tT(i,t,e));let a=Math.abs(n)<=s,u=Math.abs(o-e)<=r;l.done=a&&u}return l.value=l.done?o:e,l},toString:()=>{let t=Math.min(tw(w),2e4),e=tb(e=>w.next(t*e).value,t,30);return t+"ms "+e},toTransition:()=>{}};return w}function tk({keyframes:t,velocity:e=0,power:i=.8,timeConstant:n=325,bounceDamping:s=10,bounceStiffness:r=500,modifyTarget:a,min:o,max:l,restDelta:u=.5,restSpeed:h}){let d,p;let c=t[0],m={done:!1,value:c},f=t=>void 0!==o&&t<o||void 0!==l&&t>l,v=t=>void 0===o?l:void 0===l?o:Math.abs(o-t)<Math.abs(l-t)?o:l,y=i*e,g=c+y,b=void 0===a?g:a(g);b!==g&&(y=b-c);let w=t=>-y*Math.exp(-t/n),T=t=>b+w(t),S=t=>{let e=w(t),i=T(t);m.done=Math.abs(e)<=u,m.value=m.done?b:i},A=t=>{f(m.value)&&(d=t,p=tC({keyframes:[m.value,v(m.value)],velocity:tT(T,t,m.value),damping:s,stiffness:r,restDelta:u,restSpeed:h}))};return A(0),{calculatedDuration:null,next:t=>{let e=!1;return(p||void 0!==d||(e=!0,S(t),A(t)),void 0!==d&&t>=d)?p.next(t-d):(e||S(t),m)}}}tC.applyToOptions=t=>{let e=function(t,e=100,i){let n=i({...t,keyframes:[0,e]}),s=Math.min(tw(n),2e4);return{type:"keyframes",ease:t=>n.next(s*t).value/e,duration:P(s)}}(t,100,tC);return t.ease=e.ease,t.duration=F(e.duration),t.type="keyframes",t};let tF=(t,e,i)=>(((1-3*i+3*e)*t+(3*i-6*e))*t+3*e)*t;function tP(t,e,i,n){if(t===e&&i===n)return l;let s=e=>(function(t,e,i,n,s){let r,a;let o=0;do(r=tF(a=e+(i-e)/2,n,s)-t)>0?i=a:e=a;while(Math.abs(r)>1e-7&&++o<12);return a})(e,0,1,t,i);return t=>0===t||1===t?t:tF(s(t),e,n)}let tE=tP(.42,0,1,1),tD=tP(0,0,.58,1),tO=tP(.42,0,.58,1),tI=t=>Array.isArray(t)&&"number"!=typeof t[0],tR=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,tN=t=>e=>1-t(1-e),tL=tP(.33,1.53,.69,.99),tj=tN(tL),tB=tR(tj),t$=t=>(t*=2)<1?.5*tj(t):.5*(2-Math.pow(2,-10*(t-1))),tK=t=>1-Math.sin(Math.acos(t)),tq=tN(tK),tU=tR(tK),tW=t=>Array.isArray(t)&&"number"==typeof t[0],t_={linear:l,easeIn:tE,easeInOut:tO,easeOut:tD,circIn:tK,circInOut:tU,circOut:tq,backIn:tj,backInOut:tB,backOut:tL,anticipate:t$},tY=t=>"string"==typeof t,tz=t=>{if(tW(t)){O(4===t.length,"Cubic bezier arrays must contain four numerical values.");let[e,i,n,s]=t;return tP(e,i,n,s)}return tY(t)?(O(void 0!==t_[t],`Invalid easing type '${t}'`),t_[t]):t},tG=(t,e,i)=>{let n=e-t;return 0===n?1:(i-t)/n};function tH({duration:t=300,keyframes:e,times:i,ease:n="easeInOut"}){let s=tI(n)?n.map(tz):tz(n),r={done:!1,value:e[0]},a=function(t,e,{clamp:i=!0,ease:n,mixer:s}={}){let r=t.length;if(O(r===e.length,"Both input and output ranges must be the same length"),1===r)return()=>e[0];if(2===r&&e[0]===e[1])return()=>e[1];let a=t[0]===t[1];t[0]>t[r-1]&&(t=[...t].reverse(),e=[...e].reverse());let o=function(t,e,i){let n=[],s=i||v.c.mix||ty,r=t.length-1;for(let i=0;i<r;i++){let r=s(t[i],t[i+1]);e&&(r=C(Array.isArray(e)?e[i]||l:e,r)),n.push(r)}return n}(e,n,s),u=o.length,h=i=>{if(a&&i<t[0])return e[0];let n=0;if(u>1)for(;n<t.length-2&&!(i<t[n+1]);n++);let s=tG(t[n],t[n+1],i);return o[n](s)};return i?e=>h((0,k.u)(t[0],t[r-1],e)):h}((i&&i.length===e.length?i:function(t){let e=[0];return function(t,e){let i=t[t.length-1];for(let n=1;n<=e;n++){let s=tG(0,e,n);t.push(tr(i,1,s))}}(e,t.length-1),e}(e)).map(e=>e*t),e,{ease:Array.isArray(s)?s:e.map(()=>s||tO).splice(0,e.length-1)});return{calculatedDuration:t,next:e=>(r.value=a(e),r.done=e>=t,r)}}let tX=t=>null!==t;function tZ(t,{repeat:e,repeatType:i="loop"},n,s=1){let r=t.filter(tX),a=s<0||e&&"loop"!==i&&e%2==1?0:r.length-1;return a&&void 0!==n?n:r[a]}let tQ={decay:tk,inertia:tk,tween:tH,keyframes:tH,spring:tC};function tJ(t){"string"==typeof t.type&&(t.type=tQ[t.type])}class t0{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,e){return this.finished.then(t,e)}}let t1=t=>t/100;class t2 extends t0{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{let{motionValue:t}=this.options;t&&t.updatedAt!==g.now()&&this.tick(g.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},E.mainThread++,this.options=t,this.initAnimation(),this.play(),!1===t.autoplay&&this.pause()}initAnimation(){let{options:t}=this;tJ(t);let{type:e=tH,repeat:i=0,repeatDelay:n=0,repeatType:s,velocity:r=0}=t,{keyframes:a}=t,o=e||tH;o!==tH&&"number"!=typeof a[0]&&(this.mixKeyframes=C(t1,ty(a[0],a[1])),a=[0,100]);let l=o({...t,keyframes:a});"mirror"===s&&(this.mirroredGenerator=o({...t,keyframes:[...a].reverse(),velocity:-r})),null===l.calculatedDuration&&(l.calculatedDuration=tw(l));let{calculatedDuration:u}=l;this.calculatedDuration=u,this.resolvedDuration=u+n,this.totalDuration=this.resolvedDuration*(i+1)-n,this.generator=l}updateTime(t){let e=Math.round(t-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=e}tick(t,e=!1){let{generator:i,totalDuration:n,mixKeyframes:s,mirroredGenerator:r,resolvedDuration:a,calculatedDuration:o}=this;if(null===this.startTime)return i.next(0);let{delay:l=0,keyframes:u,repeat:h,repeatType:d,repeatDelay:p,type:c,onUpdate:m,finalKeyframe:f}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-n/this.speed,this.startTime)),e?this.currentTime=t:this.updateTime(t);let v=this.currentTime-l*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?v<0:v>n;this.currentTime=Math.max(v,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=n);let g=this.currentTime,b=i;if(h){let t=Math.min(this.currentTime,n)/a,e=Math.floor(t),i=t%1;!i&&t>=1&&(i=1),1===i&&e--,(e=Math.min(e,h+1))%2&&("reverse"===d?(i=1-i,p&&(i-=p/a)):"mirror"===d&&(b=r)),g=(0,k.u)(0,1,i)*a}let w=y?{done:!1,value:u[0]}:b.next(g);s&&(w.value=s(w.value));let{done:T}=w;y||null===o||(T=this.playbackSpeed>=0?this.currentTime>=n:this.currentTime<=0);let S=null===this.holdTime&&("finished"===this.state||"running"===this.state&&T);return S&&c!==tk&&(w.value=tZ(u,this.options,f,this.speed)),m&&m(w.value),S&&this.finish(),w}then(t,e){return this.finished.then(t,e)}get duration(){return P(this.calculatedDuration)}get time(){return P(this.currentTime)}set time(t){t=F(t),this.currentTime=t,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(g.now());let e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=P(this.currentTime))}play(){if(this.isStopped)return;let{driver:t=tg,startTime:e}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),this.options.onPlay?.();let i=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=i):null!==this.holdTime?this.startTime=i-this.holdTime:this.startTime||(this.startTime=e??i),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(g.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null,E.mainThread--}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}let t5=t=>180*t/Math.PI,t3=t=>t6(t5(Math.atan2(t[1],t[0]))),t4={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:t3,rotateZ:t3,skewX:t=>t5(Math.atan(t[1])),skewY:t=>t5(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},t6=t=>((t%=360)<0&&(t+=360),t),t9=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),t8=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),t7={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:t9,scaleY:t8,scale:t=>(t9(t)+t8(t))/2,rotateX:t=>t6(t5(Math.atan2(t[6],t[5]))),rotateY:t=>t6(t5(Math.atan2(-t[2],t[0]))),rotateZ:t3,rotate:t3,skewX:t=>t5(Math.atan(t[4])),skewY:t=>t5(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function et(t){return t.includes("scale")?1:0}function ee(t,e){let i,n;if(!t||"none"===t)return et(e);let s=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);if(s)i=t7,n=s;else{let e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=t4,n=e}if(!n)return et(e);let r=i[e],a=n[1].split(",").map(en);return"function"==typeof r?r(a):a[r]}let ei=(t,e)=>{let{transform:i="none"}=getComputedStyle(t);return ee(i,e)};function en(t){return parseFloat(t.trim())}let es=t=>t===R.Rx||t===_.px,er=new Set(["x","y","z"]),ea=c._.filter(t=>!er.has(t)),eo={width:({x:t},{paddingLeft:e="0",paddingRight:i="0"})=>t.max-t.min-parseFloat(e)-parseFloat(i),height:({y:t},{paddingTop:e="0",paddingBottom:i="0"})=>t.max-t.min-parseFloat(e)-parseFloat(i),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>ee(e,"x"),y:(t,{transform:e})=>ee(e,"y")};eo.translateX=eo.x,eo.translateY=eo.y;let el=new Set,eu=!1,eh=!1,ed=!1;function ep(){if(eh){let t=Array.from(el).filter(t=>t.needsMeasurement),e=new Set(t.map(t=>t.element)),i=new Map;e.forEach(t=>{let e=function(t){let e=[];return ea.forEach(i=>{let n=t.getValue(i);void 0!==n&&(e.push([i,n.get()]),n.set(i.startsWith("scale")?1:0))}),e}(t);e.length&&(i.set(t,e),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();let e=i.get(t);e&&e.forEach(([e,i])=>{t.getValue(e)?.set(i)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}eh=!1,eu=!1,el.forEach(t=>t.complete(ed)),el.clear()}function ec(){el.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(eh=!0)})}class em{constructor(t,e,i,n,s,r=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=i,this.motionValue=n,this.element=s,this.isAsync=r}scheduleResolve(){this.state="scheduled",this.isAsync?(el.add(this),eu||(eu=!0,u.read(ec),u.resolveKeyframes(ep))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:t,name:e,element:i,motionValue:n}=this;if(null===t[0]){let s=n?.get(),r=t[t.length-1];if(void 0!==s)t[0]=s;else if(i&&e){let n=i.readValue(e,r);null!=n&&(t[0]=n)}void 0===t[0]&&(t[0]=r),n&&void 0===s&&n.set(t[0])}!function(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),el.delete(this)}cancel(){"scheduled"===this.state&&(el.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}let ef=t=>t.startsWith("--");function ev(t){let e;return()=>(void 0===e&&(e=t()),e)}let ey=ev(()=>void 0!==window.ScrollTimeline);var eg=i(7275);let eb={},ew=function(t,e){let i=ev(t);return()=>eb[e]??i()}(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),eT=([t,e,i,n])=>`cubic-bezier(${t}, ${e}, ${i}, ${n})`,eS={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:eT([0,.65,.55,1]),circOut:eT([.55,0,1,.45]),backIn:eT([.31,.01,.66,-.59]),backOut:eT([.33,1.53,.69,.99])};function eA(t){return"function"==typeof t&&"applyToOptions"in t}class eM extends t0{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;let{element:e,name:i,keyframes:n,pseudoElement:s,allowFlatten:r=!1,finalKeyframe:a,onComplete:o}=t;this.isPseudoElement=!!s,this.allowFlatten=r,this.options=t,O("string"!=typeof t.type,'animateMini doesn\'t support "type" as a string. Did you mean to import { spring } from "motion"?');let l=function({type:t,...e}){return eA(t)&&ew()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}(t);this.animation=function(t,e,i,{delay:n=0,duration:s=300,repeat:r=0,repeatType:a="loop",ease:o="easeOut",times:l}={},u){let h={[e]:i};l&&(h.offset=l);let d=function t(e,i){if(e)return"function"==typeof e?ew()?tb(e,i):"ease-out":tW(e)?eT(e):Array.isArray(e)?e.map(e=>t(e,i)||eS.easeOut):eS[e]}(o,s);Array.isArray(d)&&(h.easing=d),eg.f.value&&E.waapi++;let p={delay:n,duration:s,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:r+1,direction:"reverse"===a?"alternate":"normal"};u&&(p.pseudoElement=u);let c=t.animate(h,p);return eg.f.value&&c.finished.finally(()=>{E.waapi--}),c}(e,i,n,l,s),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){let t=tZ(n,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(t):ef(i)?e.style.setProperty(i,t):e.style[i]=t,this.animation.cancel()}o?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(t){}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:t}=this;"idle"!==t&&"finished"!==t&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){return P(Number(this.animation.effect?.getComputedTiming?.().duration||0))}get time(){return P(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=F(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:e}){return(this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&ey())?(this.animation.timeline=t,l):e(this)}}let eV={anticipate:t$,backInOut:tB,circInOut:tU};class ex extends eM{constructor(t){"string"==typeof t.ease&&t.ease in eV&&(t.ease=eV[t.ease]),tJ(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){let{motionValue:e,onUpdate:i,onComplete:n,element:s,...r}=this.options;if(!e)return;if(void 0!==t){e.set(t);return}let a=new t2({...r,autoplay:!1}),o=F(this.finishedTime??this.time);e.setWithVelocity(a.sample(o-10).value,a.sample(o).value,10),a.stop()}}let eC=(t,e)=>"zIndex"!==e&&!!("number"==typeof t||Array.isArray(t)||"string"==typeof t&&(ti.test(t)||"0"===t)&&!t.startsWith("url("));var ek=i(7596);let eF=new Set(["opacity","clipPath","filter","transform"]),eP=ev(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));class eE extends t0{constructor({autoplay:t=!0,delay:e=0,type:i="keyframes",repeat:n=0,repeatDelay:s=0,repeatType:r="loop",keyframes:a,name:o,motionValue:l,element:u,...h}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=g.now();let d={autoplay:t,delay:e,type:i,repeat:n,repeatDelay:s,repeatType:r,name:o,motionValue:l,element:u,...h},p=u?.KeyframeResolver||em;this.keyframeResolver=new p(a,(t,e,i)=>this.onKeyframesResolved(t,e,d,!i),o,l,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,e,i,n){this.keyframeResolver=void 0;let{name:s,type:r,velocity:a,delay:o,isHandoff:u,onUpdate:h}=i;this.resolvedAt=g.now(),!function(t,e,i,n){let s=t[0];if(null===s)return!1;if("display"===e||"visibility"===e)return!0;let r=t[t.length-1],a=eC(s,e),o=eC(r,e);return D(a===o,`You are trying to animate ${e} from "${s}" to "${r}". ${s} is not an animatable value - to enable this animation set ${s} to a value animatable to ${r} via the \`style\` property.`),!!a&&!!o&&(function(t){let e=t[0];if(1===t.length)return!0;for(let i=0;i<t.length;i++)if(t[i]!==e)return!0}(t)||("spring"===i||eA(i))&&n)}(t,s,r,a)&&((v.c.instantAnimations||!o)&&h?.(tZ(t,i,e)),t[0]=t[t.length-1],i.duration=0,i.repeat=0);let d={startTime:n?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:e,...i,keyframes:t},p=!u&&function(t){let{motionValue:e,name:i,repeatDelay:n,repeatType:s,damping:r,type:a}=t;if(!(0,ek.R)(e?.owner?.current))return!1;let{onUpdate:o,transformTemplate:l}=e.owner.getProps();return eP()&&i&&eF.has(i)&&("transform"!==i||!l)&&!o&&!n&&"mirror"!==s&&0!==r&&"inertia"!==a}(d)?new ex({...d,element:d.motionValue.owner.current}):new t2(d);p.finished.then(()=>this.notifyFinished()).catch(l),this.pendingTimeline&&(this.stopTimeline=p.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=p}get finished(){return this._animation?this.animation.finished:this._finished}then(t,e){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),ed=!0,ec(),ep(),ed=!1),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}let eD=t=>null!==t,eO={type:"spring",stiffness:500,damping:25,restSpeed:10},eI=t=>({type:"spring",stiffness:550,damping:0===t?2*Math.sqrt(550):30,restSpeed:10}),eR={type:"keyframes",duration:.8},eN={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},eL=(t,{keyframes:e})=>e.length>2?eR:c.G.has(t)?t.startsWith("scale")?eI(e[1]):eO:eN,ej=(t,e,i,n={},s,r)=>a=>{let l=o(n,t)||{},h=l.delay||n.delay||0,{elapsed:d=0}=n;d-=F(h);let p={keyframes:Array.isArray(i)?i:[null,i],ease:"easeOut",velocity:e.getVelocity(),...l,delay:-d,onUpdate:t=>{e.set(t),l.onUpdate&&l.onUpdate(t)},onComplete:()=>{a(),l.onComplete&&l.onComplete()},name:t,motionValue:e,element:r?void 0:s};!function({when:t,delay:e,delayChildren:i,staggerChildren:n,staggerDirection:s,repeat:r,repeatType:a,repeatDelay:o,from:l,elapsed:u,...h}){return!!Object.keys(h).length}(l)&&Object.assign(p,eL(t,p)),p.duration&&(p.duration=F(p.duration)),p.repeatDelay&&(p.repeatDelay=F(p.repeatDelay)),void 0!==p.from&&(p.keyframes[0]=p.from);let c=!1;if(!1!==p.type&&(0!==p.duration||p.repeatDelay)||(p.duration=0,0!==p.delay||(c=!0)),(v.c.instantAnimations||v.c.skipAnimations)&&(c=!0,p.duration=0,p.delay=0),p.allowFlatten=!l.type&&!l.ease,c&&!r&&void 0!==e.get()){let t=function(t,{repeat:e,repeatType:i="loop"},n){let s=t.filter(eD),r=e&&"loop"!==i&&e%2==1?0:s.length-1;return s[r]}(p.keyframes,l);if(void 0!==t){u.update(()=>{p.onUpdate(t),p.onComplete()});return}}return l.isSync?new t2(p):new eE(p)};function eB(t,e,{delay:i=0,transitionOverride:n,type:s}={}){let{transition:r=t.getDefaultTransition(),transitionEnd:l,...h}=e;n&&(r=n);let d=[],p=s&&t.animationState&&t.animationState.getState()[s];for(let e in h){let n=t.getValue(e,t.latestValues[e]??null),s=h[e];if(void 0===s||p&&function({protectedKeys:t,needsAnimating:e},i){let n=t.hasOwnProperty(i)&&!0!==e[i];return e[i]=!1,n}(p,e))continue;let a={delay:i,...o(r||{},e)},l=n.get();if(void 0!==l&&!n.isAnimating&&!Array.isArray(s)&&s===l&&!a.velocity)continue;let c=!1;if(window.MotionHandoffAnimation){let i=t.props[V.M];if(i){let t=window.MotionHandoffAnimation(i,e,u);null!==t&&(a.startTime=t,c=!0)}}!function(t,e){let i=t.getValue("willChange");if((0,M.i)(i)&&i.add)return i.add(e);if(!i&&v.c.WillChange){let i=new v.c.WillChange("auto");t.addValue("willChange",i),i.add(e)}}(t,e),n.start(ej(e,n,s,t.shouldReduceMotion&&m.has(e)?{type:!1}:a,t,c));let f=n.animation;f&&d.push(f)}return l&&Promise.all(d).then(()=>{u.update(()=>{l&&function(t,e){let{transitionEnd:i={},transition:n={},...s}=a(t,e)||{};for(let e in s={...s,...i}){var r;let i=A(r=s[e])?r[r.length-1]||0:r;t.hasValue(e)?t.getValue(e).set(i):t.addValue(e,S(i))}}(t,l)})}),d}function e$(t,e,i={}){let n=a(t,e,"exit"===i.type?t.presenceContext?.custom:void 0),{transition:s=t.getDefaultTransition()||{}}=n||{};i.transitionOverride&&(s=i.transitionOverride);let r=n?()=>Promise.all(eB(t,n,i)):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(n=0)=>{let{delayChildren:r=0,staggerChildren:a,staggerDirection:o}=s;return function(t,e,i=0,n=0,s=1,r){let a=[],o=(t.variantChildren.size-1)*n,l=1===s?(t=0)=>t*n:(t=0)=>o-t*n;return Array.from(t.variantChildren).sort(eK).forEach((t,n)=>{t.notify("AnimationStart",e),a.push(e$(t,e,{...r,delay:i+l(n)}).then(()=>t.notify("AnimationComplete",e)))}),Promise.all(a)}(t,e,r+n,a,o,i)}:()=>Promise.resolve(),{when:l}=s;if(!l)return Promise.all([r(),o(i.delay)]);{let[t,e]="beforeChildren"===l?[r,o]:[o,r];return t().then(()=>e())}}function eK(t,e){return t.sortNodePosition(e)}function eq(t,e){if(!Array.isArray(e))return!1;let i=e.length;if(i!==t.length)return!1;for(let n=0;n<i;n++)if(e[n]!==t[n])return!1;return!0}var eU=i(7732),eW=i(2963);let e_=eW.V.length,eY=[...eW.e].reverse(),ez=eW.e.length;function eG(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function eH(){return{animate:eG(!0),whileInView:eG(),whileHover:eG(),whileTap:eG(),whileDrag:eG(),whileFocus:eG(),exit:eG()}}class eX{constructor(t){this.isMounted=!1,this.node=t}update(){}}class eZ extends eX{constructor(t){super(t),t.animationState||(t.animationState=function(t){let e=e=>Promise.all(e.map(({animation:e,options:i})=>(function(t,e,i={}){let n;if(t.notify("AnimationStart",e),Array.isArray(e))n=Promise.all(e.map(e=>e$(t,e,i)));else if("string"==typeof e)n=e$(t,e,i);else{let s="function"==typeof e?a(t,e,i.custom):e;n=Promise.all(eB(t,s,i))}return n.then(()=>{t.notify("AnimationComplete",e)})})(t,e,i))),i=eH(),n=!0,r=e=>(i,n)=>{let s=a(t,n,"exit"===e?t.presenceContext?.custom:void 0);if(s){let{transition:t,transitionEnd:e,...n}=s;i={...i,...n,...e}}return i};function o(o){let{props:l}=t,u=function t(e){if(!e)return;if(!e.isControllingVariants){let i=e.parent&&t(e.parent)||{};return void 0!==e.props.initial&&(i.initial=e.props.initial),i}let i={};for(let t=0;t<e_;t++){let n=eW.V[t],s=e.props[n];((0,eU.$)(s)||!1===s)&&(i[n]=s)}return i}(t.parent)||{},h=[],d=new Set,p={},c=1/0;for(let e=0;e<ez;e++){var m;let a=eY[e],f=i[a],v=void 0!==l[a]?l[a]:u[a],y=(0,eU.$)(v),g=a===o?f.isActive:null;!1===g&&(c=e);let b=v===u[a]&&v!==l[a]&&y;if(b&&n&&t.manuallyAnimateOnMount&&(b=!1),f.protectedKeys={...p},!f.isActive&&null===g||!v&&!f.prevProp||(0,s.H)(v)||"boolean"==typeof v)continue;let w=(m=f.prevProp,"string"==typeof v?v!==m:!!Array.isArray(v)&&!eq(v,m)),T=w||a===o&&f.isActive&&!b&&y||e>c&&y,S=!1,M=Array.isArray(v)?v:[v],V=M.reduce(r(a),{});!1===g&&(V={});let{prevResolvedValues:x={}}=f,C={...x,...V},k=e=>{T=!0,d.has(e)&&(S=!0,d.delete(e)),f.needsAnimating[e]=!0;let i=t.getValue(e);i&&(i.liveStyle=!1)};for(let t in C){let e=V[t],i=x[t];if(!p.hasOwnProperty(t))(A(e)&&A(i)?eq(e,i):e===i)?void 0!==e&&d.has(t)?k(t):f.protectedKeys[t]=!0:null!=e?k(t):d.add(t)}f.prevProp=v,f.prevResolvedValues=V,f.isActive&&(p={...p,...V}),n&&t.blockInitialAnimation&&(T=!1);let F=!(b&&w)||S;T&&F&&h.push(...M.map(t=>({animation:t,options:{type:a}})))}if(d.size){let e={};if("boolean"!=typeof l.initial){let i=a(t,Array.isArray(l.initial)?l.initial[0]:l.initial);i&&i.transition&&(e.transition=i.transition)}d.forEach(i=>{let n=t.getBaseTarget(i),s=t.getValue(i);s&&(s.liveStyle=!0),e[i]=n??null}),h.push({animation:e})}let f=!!h.length;return n&&(!1===l.initial||l.initial===l.animate)&&!t.manuallyAnimateOnMount&&(f=!1),n=!1,f?e(h):Promise.resolve()}return{animateChanges:o,setActive:function(e,n){if(i[e].isActive===n)return Promise.resolve();t.variantChildren?.forEach(t=>t.animationState?.setActive(e,n)),i[e].isActive=n;let s=o(e);for(let t in i)i[t].protectedKeys={};return s},setAnimateFunction:function(i){e=i(t)},getState:()=>i,reset:()=>{i=eH(),n=!0}}}(t))}updateAnimationControlsSubscription(){let{animate:t}=this.node.getProps();(0,s.H)(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let eQ=0;class eJ extends eX{constructor(){super(...arguments),this.id=eQ++}update(){if(!this.node.presenceContext)return;let{isPresent:t,onExitComplete:e}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;let n=this.node.animationState.setActive("exit",!t);e&&!t&&n.then(()=>{e(this.id)})}mount(){let{register:t,onExitComplete:e}=this.node.presenceContext||{};e&&e(this.id),t&&(this.unmount=t(this.id))}unmount(){}}let e0={x:!1,y:!1};function e1(t,e){let i=function(t,e,i){if(t instanceof EventTarget)return[t];if("string"==typeof t){let e=document,i=(void 0)??e.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t)}(t),n=new AbortController;return[i,{passive:!0,...e,signal:n.signal},()=>n.abort()]}function e2(t){return!("touch"===t.pointerType||e0.x||e0.y)}function e5(t){return{point:{x:t.pageX,y:t.pageY}}}function e3(t,e,i){let{props:n}=t;t.animationState&&n.whileHover&&t.animationState.setActive("whileHover","Start"===i);let s=n["onHover"+i];s&&u.postRender(()=>s(e,e5(e)))}class e4 extends eX{mount(){let{current:t}=this.node;t&&(this.unmount=function(t,e,i={}){let[n,s,r]=e1(t,i),a=t=>{if(!e2(t))return;let{target:i}=t,n=e(i,t);if("function"!=typeof n||!i)return;let r=t=>{e2(t)&&(n(t),i.removeEventListener("pointerleave",r))};i.addEventListener("pointerleave",r,s)};return n.forEach(t=>{t.addEventListener("pointerenter",a,s)}),r}(t,(t,e)=>(e3(this.node,e,"Start"),t=>e3(this.node,t,"End"))))}unmount(){}}function e6(t,e,i,n={passive:!0}){return t.addEventListener(e,i,n),()=>t.removeEventListener(e,i)}class e9 extends eX{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(e){t=!0}t&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=C(e6(this.node.current,"focus",()=>this.onFocus()),e6(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}let e8=(t,e)=>!!e&&(t===e||e8(t,e.parentElement)),e7=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary,it=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]),ie=new WeakSet;function ii(t){return e=>{"Enter"===e.key&&t(e)}}function is(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}let ir=(t,e)=>{let i=t.currentTarget;if(!i)return;let n=ii(()=>{if(ie.has(i))return;is(i,"down");let t=ii(()=>{is(i,"up")});i.addEventListener("keyup",t,e),i.addEventListener("blur",()=>is(i,"cancel"),e)});i.addEventListener("keydown",n,e),i.addEventListener("blur",()=>i.removeEventListener("keydown",n),e)};function ia(t){return e7(t)&&!(e0.x||e0.y)}function io(t,e,i){let{props:n}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&n.whileTap&&t.animationState.setActive("whileTap","Start"===i);let s=n["onTap"+("End"===i?"":i)];s&&u.postRender(()=>s(e,e5(e)))}class il extends eX{mount(){let{current:t}=this.node;t&&(this.unmount=function(t,e,i={}){let[n,s,r]=e1(t,i),a=t=>{let n=t.currentTarget;if(!ia(t))return;ie.add(n);let r=e(n,t),a=(t,e)=>{window.removeEventListener("pointerup",o),window.removeEventListener("pointercancel",l),ie.has(n)&&ie.delete(n),ia(t)&&"function"==typeof r&&r(t,{success:e})},o=t=>{a(t,n===window||n===document||i.useGlobalTarget||e8(n,t.target))},l=t=>{a(t,!1)};window.addEventListener("pointerup",o,s),window.addEventListener("pointercancel",l,s)};return n.forEach(t=>{(i.useGlobalTarget?window:t).addEventListener("pointerdown",a,s),(0,ek.R)(t)&&(t.addEventListener("focus",t=>ir(t,s)),it.has(t.tagName)||-1!==t.tabIndex||t.hasAttribute("tabindex")||(t.tabIndex=0))}),r}(t,(t,e)=>(io(this.node,e,"Start"),(t,{success:e})=>io(this.node,t,e?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}let iu=new WeakMap,ih=new WeakMap,id=t=>{let e=iu.get(t.target);e&&e(t)},ip=t=>{t.forEach(id)},ic={some:0,all:1};class im extends eX{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();let{viewport:t={}}=this.node.getProps(),{root:e,margin:i,amount:n="some",once:s}=t,r={root:e?e.current:void 0,rootMargin:i,threshold:"number"==typeof n?n:ic[n]};return function(t,e,i){let n=function({root:t,...e}){let i=t||document;ih.has(i)||ih.set(i,{});let n=ih.get(i),s=JSON.stringify(e);return n[s]||(n[s]=new IntersectionObserver(ip,{root:t,...e})),n[s]}(e);return iu.set(t,i),n.observe(t),()=>{iu.delete(t),n.unobserve(t)}}(this.node.current,r,t=>{let{isIntersecting:e}=t;if(this.isInView===e||(this.isInView=e,s&&!e&&this.hasEnteredView))return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);let{onViewportEnter:i,onViewportLeave:n}=this.node.getProps(),r=e?i:n;r&&r(t)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;let{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return i=>t[i]!==e[i]}(t,e))&&this.startObserver()}unmount(){}}var iv=i(7294);let iy=t=>e=>e.test(t),ig=[R.Rx,_.px,_.aQ,_.RW,_.vw,_.vh,{test:t=>"auto"===t,parse:t=>t}],ib=t=>ig.find(iy(t)),iw=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),iT=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u,iS=t=>/^0[^.\s]+$/u.test(t),iA=new Set(["brightness","contrast","saturate","opacity"]);function iM(t){let[e,i]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;let[n]=i.match(L)||[];if(!n)return t;let s=i.replace(n,""),r=iA.has(e)?1:0;return n!==i&&(r*=100),e+"("+r+s+")"}let iV=/\b([a-z-]*)\(.*?\)/gu,ix={...ti,getAnimatableNone:t=>{let e=t.match(iV);return e?e.map(iM).join(" "):t}},iC={...i(354).j,color:z,backgroundColor:z,outlineColor:z,fill:z,stroke:z,borderColor:z,borderTopColor:z,borderRightColor:z,borderBottomColor:z,borderLeftColor:z,filter:ix,WebkitFilter:ix},ik=t=>iC[t];function iF(t,e){let i=ik(t);return i!==ix&&(i=ti),i.getAnimatableNone?i.getAnimatableNone(e):void 0}let iP=new Set(["auto","none","0"]);class iE extends em{constructor(t,e,i,n,s){super(t,e,i,n,s,!0)}readKeyframes(){let{unresolvedKeyframes:t,element:e,name:i}=this;if(!e||!e.current)return;super.readKeyframes();for(let i=0;i<t.length;i++){let n=t[i];if("string"==typeof n&&(n=n.trim(),(0,I.t)(n))){let s=function t(e,i,n=1){O(n<=4,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);let[s,r]=function(t){let e=iT.exec(t);if(!e)return[,];let[,i,n,s]=e;return[`--${i??n}`,s]}(e);if(!s)return;let a=window.getComputedStyle(i).getPropertyValue(s);if(a){let t=a.trim();return iw(t)?parseFloat(t):t}return(0,I.t)(r)?t(r,i,n+1):r}(n,e.current);void 0!==s&&(t[i]=s),i===t.length-1&&(this.finalKeyframe=n)}}if(this.resolveNoneKeyframes(),!m.has(i)||2!==t.length)return;let[n,s]=t,r=ib(n),a=ib(s);if(r!==a){if(es(r)&&es(a))for(let e=0;e<t.length;e++){let i=t[e];"string"==typeof i&&(t[e]=parseFloat(i))}else eo[i]&&(this.needsMeasurement=!0)}}resolveNoneKeyframes(){let{unresolvedKeyframes:t,name:e}=this,i=[];for(let e=0;e<t.length;e++){var n;(null===t[e]||("number"==typeof(n=t[e])?0===n:null===n||"none"===n||"0"===n||iS(n)))&&i.push(e)}i.length&&function(t,e,i){let n,s=0;for(;s<t.length&&!n;){let e=t[s];"string"==typeof e&&!iP.has(e)&&Q(e).values.length&&(n=t[s]),s++}if(n&&i)for(let s of e)t[s]=iF(i,n)}(t,i,e)}measureInitialState(){let{element:t,unresolvedKeyframes:e,name:i}=this;if(!t||!t.current)return;"height"===i&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=eo[i](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;let n=e[e.length-1];void 0!==n&&t.getValue(i,n).jump(n,!1)}measureEndState(){let{element:t,name:e,unresolvedKeyframes:i}=this;if(!t||!t.current)return;let n=t.getValue(e);n&&n.jump(this.measuredOrigin,!1);let s=i.length-1,r=i[s];i[s]=eo[e](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==r&&void 0===this.finalKeyframe&&(this.finalKeyframe=r),this.removedTransforms?.length&&this.removedTransforms.forEach(([e,i])=>{t.getValue(e).set(i)}),this.resolveNoneKeyframes()}}let iD=[...ig,z,ti],iO=t=>iD.find(iy(t));var iI=i(9442);let iR=()=>({min:0,max:0}),iN=()=>({x:iR(),y:iR()});var iL=i(1741);let ij={current:null},iB={current:!1},i$=new WeakMap;var iK=i(7504);let iq=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class iU{scrapeMotionValuesFromProps(t,e,i){return{}}constructor({parent:t,props:e,presenceContext:i,reducedMotionConfig:n,blockInitialAnimation:s,visualState:r},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=em,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let t=g.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,u.render(this.render,!1,!0))};let{latestValues:o,renderState:l}=r;this.latestValues=o,this.baseTarget={...o},this.initialValues=e.initial?{...o}:{},this.renderState=l,this.parent=t,this.props=e,this.presenceContext=i,this.depth=t?t.depth+1:0,this.reducedMotionConfig=n,this.options=a,this.blockInitialAnimation=!!s,this.isControllingVariants=(0,iK.G)(e),this.isVariantNode=(0,iK.M)(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);let{willChange:h,...d}=this.scrapeMotionValuesFromProps(e,{},this);for(let t in d){let e=d[t];void 0!==o[t]&&(0,M.i)(e)&&e.set(o[t],!1)}}mount(t){this.current=t,i$.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((t,e)=>this.bindToMotionValue(e,t)),iB.current||function(){if(iB.current=!0,iL.j){if(window.matchMedia){let t=window.matchMedia("(prefers-reduced-motion)"),e=()=>ij.current=t.matches;t.addListener(e),e()}else ij.current=!1}}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||ij.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){for(let t in this.projection&&this.projection.unmount(),h(this.notifyUpdate),h(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this),this.events)this.events[t].clear();for(let t in this.features){let e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}bindToMotionValue(t,e){let i;this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();let n=c.G.has(t);n&&this.onBindTransform&&this.onBindTransform();let s=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&u.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),r=e.on("renderRequest",this.scheduleRender);window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{s(),r(),i&&i(),e.owner&&e.stop()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in iI.featureDefinitions){let e=iI.featureDefinitions[t];if(!e)continue;let{isEnabled:i,Feature:n}=e;if(!this.features[t]&&n&&i(this.props)&&(this.features[t]=new n(this)),this.features[t]){let e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):iN()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;e<iq.length;e++){let i=iq[e];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);let n=t["on"+i];n&&(this.propEventSubscriptions[i]=this.on(i,n))}this.prevMotionValues=function(t,e,i){for(let n in e){let s=e[n],r=i[n];if((0,M.i)(s))t.addValue(n,s);else if((0,M.i)(r))t.addValue(n,S(s,{owner:t}));else if(r!==s){if(t.hasValue(n)){let e=t.getValue(n);!0===e.liveStyle?e.jump(s):e.hasAnimated||e.set(s)}else{let e=t.getStaticValue(n);t.addValue(n,S(void 0!==e?e:s,{owner:t}))}}}for(let n in i)void 0===e[n]&&t.removeValue(n);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){let e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){let i=this.values.get(t);e!==i&&(i&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);let e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let i=this.values.get(t);return void 0===i&&void 0!==e&&(i=S(null===e?void 0:e,{owner:this}),this.addValue(t,i)),i}readValue(t,e){let i=void 0===this.latestValues[t]&&this.current?this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];return null!=i&&("string"==typeof i&&(iw(i)||iS(i))?i=parseFloat(i):!iO(i)&&ti.test(e)&&(i=iF(t,e)),this.setBaseTarget(t,(0,M.i)(i)?i.get():i)),(0,M.i)(i)?i.get():i}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){let e;let{initial:i}=this.props;if("string"==typeof i||"object"==typeof i){let n=(0,r.o)(this.props,i,this.presenceContext?.custom);n&&(e=n[t])}if(i&&void 0!==e)return e;let n=this.getBaseTargetFromProps(this.props,t);return void 0===n||(0,M.i)(n)?void 0!==this.initialValues[t]&&void 0===e?void 0:this.baseTarget[t]:n}on(t,e){return this.events[t]||(this.events[t]=new f),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}class iW extends iU{constructor(){super(...arguments),this.KeyframeResolver=iE}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:i}){delete e[t],delete i[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:t}=this.props;(0,M.i)(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}var i_=i(1069);function iY(t,{style:e,vars:i},n,s){for(let r in Object.assign(t.style,e,s&&s.getProjectionStyles(n)),i)t.style.setProperty(r,i[r])}var iz=i(189);class iG extends iW{constructor(){super(...arguments),this.type="html",this.renderInstance=iY}readValueFromInstance(t,e){if(c.G.has(e))return this.projection?.isProjecting?et(e):ei(t,e);{let i=window.getComputedStyle(t),n=((0,I.f)(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof n?n.trim():n}}measureInstanceViewportBox(t,{transformPagePoint:e}){return function({top:t,left:e,right:i,bottom:n}){return{x:{min:e,max:i},y:{min:t,max:n}}}(function(t,e){if(!e)return t;let i=e({x:t.left,y:t.top}),n=e({x:t.right,y:t.bottom});return{top:i.y,left:i.x,bottom:n.y,right:n.x}}(t.getBoundingClientRect(),e))}build(t,e,i){(0,i_.r)(t,e,i.transformTemplate)}scrapeMotionValuesFromProps(t,e,i){return(0,iz.U)(t,e,i)}}var iH=i(3193),iX=i(2617);let iZ=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);var iQ=i(9854),iJ=i(6832);class i0 extends iW{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=iN}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(c.G.has(e)){let t=ik(e);return t&&t.default||0}return e=iZ.has(e)?e:(0,iH.D)(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,i){return(0,iJ.U)(t,e,i)}build(t,e,i){(0,iX.i)(t,e,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(t,e,i,n){!function(t,e,i,n){for(let i in iY(t,e,void 0,n),e.attrs)t.setAttribute(iZ.has(i)?i:(0,iH.D)(i),e.attrs[i])}(t,e,0,n)}mount(t){this.isSVGTag=(0,iQ.a)(t.tagName),super.mount(t)}}var i1=i(2627),i2={renderer:(t,e)=>(0,i1.q)(t)?new i0(e):new iG(e,{allowProjection:t!==iv.Fragment}),animation:{Feature:eZ},exit:{Feature:eJ},inView:{Feature:im},tap:{Feature:il},focus:{Feature:e9},hover:{Feature:e4}}}}]);
|
@@ -0,0 +1,6 @@
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[722],{8706:function(e,s,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/clusters/[cluster]",function(){return t(6996)}])},6639:function(e,s,t){"use strict";t.d(s,{Z:function(){return a}});/**
|
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 a=(0,t(998).Z)("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},6996:function(e,s,t){"use strict";t.r(s);var a=t(5893),r=t(7294),l=t(8799),n=t(8236),i=t(1163),c=t(9470),d=t(1664),o=t.n(d),m=t(9037),x=t(9307),u=t(7673),h=t(3266),j=t(3626),f=t(282),N=t(8671),y=t(5895),b=t(6639),v=t(1272),g=t(6989),p=t(9284),w=t(3001),k=t(9008),_=t.n(k);let C=(e,s)=>{let t="",a="";return e>=0&&(t=e+"m",a=" "),s&&(t+="".concat(a,"(down)")),""===t&&(t="-"),t};function S(e){let{clusterData:s,clusterJobData:t,clusterJobsLoading:l,refreshClusterJobsOnly:i}=e,[c,d]=(0,r.useState)(!1),[m,h]=(0,r.useState)(!1),[j,p]=(0,r.useState)(!1),w=async()=>{try{let e=_(s.task_yaml);await navigator.clipboard.writeText(e),h(!0),setTimeout(()=>h(!1),2e3)}catch(e){console.error("Failed to copy YAML to clipboard:",e)}},k=async()=>{try{await navigator.clipboard.writeText(s.command),p(!0),setTimeout(()=>p(!1),2e3)}catch(e){console.error("Failed to copy command to clipboard:",e)}},_=e=>{if(!e)return"No YAML available";try{let s=v.ZP.load(e),t=v.ZP.dump(s,{lineWidth:-1,styles:{"!!str":"literal"},quotingType:"'",forceQuotes:!1,noRefs:!0,sortKeys:!1,condenseFlow:!1,indent:2}).split("\n"),a=[],r=-1;for(let e=0;e<t.length;e++){let s=t[e],l=s.search(/\S/);0===l&&r>=0&&e>0&&a.push(""),a.push(s),r=l}return a.join("\n").trim()}catch(s){return console.error("YAML formatting error:",s),e}},S=(null==s?void 0:s.command)||(null==s?void 0:s.task_yaml);return(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"mb-6",children:(0,a.jsxs)(u.Zb,{children:[(0,a.jsx)("div",{className:"flex items-center justify-between px-4 pt-4",children:(0,a.jsx)("h3",{className:"text-lg font-semibold",children:"Details"})}),(0,a.jsx)("div",{className:"p-4",children:(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-6",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Status"}),(0,a.jsx)("div",{className:"text-base mt-1",children:(0,a.jsx)(x.OE,{status:s.status})})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Cluster"}),(0,a.jsx)("div",{className:"text-base mt-1",children:s.cluster})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"User"}),(0,a.jsx)("div",{className:"text-base mt-1",children:s.user})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Infra"}),(0,a.jsx)("div",{className:"text-base mt-1",children:s.infra?(0,a.jsx)(g.Md,{content:s.full_infra||s.infra,className:"text-sm text-muted-foreground",children:(0,a.jsxs)("span",{children:[(0,a.jsx)(o(),{href:"/infra",className:"text-blue-600 hover:underline",children:s.cloud||s.infra.split("(")[0].trim()}),s.infra.includes("(")&&(0,a.jsx)("span",{children:" "+s.infra.substring(s.infra.indexOf("("))})]})}):"N/A"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Resources"}),(0,a.jsx)("div",{className:"text-base mt-1",children:s.resources_str_full||s.resources_str||"N/A"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Started"}),(0,a.jsx)("div",{className:"text-base mt-1",children:s.time?new Date(s.time).toLocaleString():"N/A"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Autostop"}),(0,a.jsx)("div",{className:"text-base mt-1",children:C(s.autostop,s.to_down)})]}),S&&(0,a.jsxs)("div",{className:"col-span-2",children:[(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Entrypoint"}),s.command&&(0,a.jsx)(g.WH,{content:j?"Copied!":"Copy command",className:"text-muted-foreground",children:(0,a.jsx)("button",{onClick:k,className:"flex items-center text-gray-500 hover:text-gray-700 transition-colors duration-200 p-1 ml-2",children:j?(0,a.jsx)(f.Z,{className:"w-4 h-4 text-green-600"}):(0,a.jsx)(N.Z,{className:"w-4 h-4"})})})]}),(0,a.jsxs)("div",{className:"space-y-4 mt-3",children:[s.command&&(0,a.jsx)("div",{children:(0,a.jsx)("div",{className:"bg-gray-50 border border-gray-200 rounded-md p-3",children:(0,a.jsx)("code",{className:"text-sm text-gray-800 font-mono break-all",children:s.command})})}),s.task_yaml&&"{}"!==s.task_yaml&&!s.cluster.startsWith("sky-jobs-controller-")&&!s.cluster.startsWith("sky-serve-controller-")&&(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center mb-2",children:[(0,a.jsxs)("button",{onClick:()=>{d(!c)},className:"flex items-center text-left focus:outline-none text-gray-700 hover:text-gray-900 transition-colors duration-200",children:[c?(0,a.jsx)(y.Z,{className:"w-4 h-4 mr-1"}):(0,a.jsx)(b.Z,{className:"w-4 h-4 mr-1"}),(0,a.jsx)("span",{className:"text-base",children:"Show SkyPilot YAML"})]}),(0,a.jsx)(g.WH,{content:m?"Copied!":"Copy YAML",className:"text-muted-foreground",children:(0,a.jsx)("button",{onClick:w,className:"flex items-center text-gray-500 hover:text-gray-700 transition-colors duration-200 p-1 ml-2",children:m?(0,a.jsx)(f.Z,{className:"w-4 h-4 text-green-600"}):(0,a.jsx)(N.Z,{className:"w-4 h-4"})})})]}),c&&(0,a.jsx)("div",{className:"bg-gray-50 border border-gray-200 rounded-md p-3 max-h-96 overflow-y-auto",children:(0,a.jsx)("pre",{className:"text-sm text-gray-800 font-mono whitespace-pre-wrap",children:_(s.task_yaml)})})]})]})]})]})})]})}),(0,a.jsx)("div",{className:"mb-8",children:(0,a.jsx)(n.L4,{clusterName:s.cluster,clusterJobData:t,loading:l,refreshClusterJobsOnly:i})})]})}s.default=function(){let e=(0,i.useRouter)(),{cluster:s}=e.query,[t,n]=(0,r.useState)(!1),[d,x]=(0,r.useState)(!0),[u,f]=(0,r.useState)(!1),[N,y]=(0,r.useState)(!1),b=(0,w.X)(),{clusterData:v,clusterJobData:k,loading:C,clusterDetailsLoading:Z,clusterJobsLoading:L,refreshData:O,refreshClusterJobsOnly:A}=(0,h.QL)({cluster:s});r.useEffect(()=>{!Z&&d&&x(!1)},[Z,d]);let D=async()=>{n(!0),await O(),n(!1)};if(!e.isReady)return(0,a.jsx)("div",{children:"Loading..."});let E=s?"Cluster: ".concat(s," | SkyPilot Dashboard"):"Cluster Details | SkyPilot Dashboard";return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(_(),{children:(0,a.jsx)("title",{children:E})}),(0,a.jsxs)(c.A,{highlighted:"clusters",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-4 h-5",children:[(0,a.jsxs)("div",{className:"text-base flex items-center",children:[(0,a.jsx)(o(),{href:"/clusters",className:"text-sky-blue hover:underline",children:"Sky Clusters"}),(0,a.jsx)("span",{className:"mx-2 text-gray-500",children:"›"}),(0,a.jsx)(o(),{href:"/clusters/".concat(s),className:"text-sky-blue hover:underline",children:s})]}),(0,a.jsx)("div",{className:"text-sm flex items-center",children:(0,a.jsxs)("div",{className:"text-sm flex items-center",children:[(Z||t)&&(0,a.jsxs)("div",{className:"flex items-center mr-4",children:[(0,a.jsx)(l.Z,{size:15,className:"mt-0"}),(0,a.jsx)("span",{className:"ml-2 text-gray-500",children:"Loading..."})]}),v&&(0,a.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,a.jsx)(g.WH,{content:"Refresh",className:"text-sm text-muted-foreground",children:(0,a.jsxs)("button",{onClick:D,disabled:Z||t,className:"text-sky-blue hover:text-sky-blue-bright font-medium inline-flex items-center",children:[(0,a.jsx)(j.Z,{className:"w-4 h-4 mr-1.5"}),!b&&(0,a.jsx)("span",{children:"Refresh"})]})}),(0,a.jsx)(m.GV,{withLabel:!0,cluster:v.cluster,status:v.status,onOpenSSHModal:()=>{f(!0)},onOpenVSCodeModal:()=>{y(!0)}})]})]})})]}),Z&&d?(0,a.jsxs)("div",{className:"flex justify-center items-center py-12",children:[(0,a.jsx)(l.Z,{size:24,className:"mr-2"}),(0,a.jsx)("span",{className:"text-gray-500",children:"Loading cluster details..."})]}):v?(0,a.jsx)(S,{clusterData:v,clusterJobData:k,clusterJobsLoading:L,refreshClusterJobsOnly:A}):null,(0,a.jsx)(p.Oh,{isOpen:u,onClose:()=>f(!1),cluster:s}),(0,a.jsx)(p._R,{isOpen:N,onClose:()=>y(!1),cluster:s})]})]})}}},function(e){e.O(0,[614,798,121,470,293,969,856,973,236,37,888,774,179],function(){return e(e.s=8706)}),_N_E=e.O()}]);
|
@@ -0,0 +1,6 @@
|
|
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()}]);
|
@@ -0,0 +1,16 @@
|
|
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()}]);
|
@@ -0,0 +1,16 @@
|
|
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()}]);
|
@@ -0,0 +1 @@
|
|
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()}]);
|
sky/dashboard/out/_next/static/chunks/{webpack-f27c9a32aa3d9c6d.js → webpack-65d465f948974c0d.js}
RENAMED
@@ -1 +1 @@
|
|
1
|
-
!function(){"use strict";var e,t,n,r,o,u,i,c,f,a={},l={};function d(e){var t=l[e];if(void 0!==t)return t.exports;var n=l[e]={exports:{}},r=!0;try{a[e](n,n.exports,d),r=!1}finally{r&&delete l[e]}return n.exports}d.m=a,e=[],d.O=function(t,n,r,o){if(n){o=o||0;for(var u=e.length;u>0&&e[u-1][2]>o;u--)e[u]=e[u-1];e[u]=[n,r,o];return}for(var i=1/0,u=0;u<e.length;u++){for(var n=e[u][0],r=e[u][1],o=e[u][2],c=!0,f=0;f<n.length;f++)i>=o&&Object.keys(d.O).every(function(e){return d.O[e](n[f])})?n.splice(f--,1):(c=!1,o<i&&(i=o));if(c){e.splice(u--,1);var a=r();void 0!==a&&(t=a)}}return t},d.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return d.d(t,{a:t}),t},n=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},d.t=function(e,r){if(1&r&&(e=this(e)),8&r||"object"==typeof e&&e&&(4&r&&e.__esModule||16&r&&"function"==typeof e.then))return e;var o=Object.create(null);d.r(o);var u={};t=t||[null,n({}),n([]),n(n)];for(var i=2&r&&e;"object"==typeof i&&!~t.indexOf(i);i=n(i))Object.getOwnPropertyNames(i).forEach(function(t){u[t]=function(){return e[t]}});return u.default=function(){return e},d.d(o,u),o},d.d=function(e,t){for(var n in t)d.o(t,n)&&!d.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},d.f={},d.e=function(e){return Promise.all(Object.keys(d.f).reduce(function(t,n){return d.f[n](e,t),t},[]))},d.u=function(e){return"static/chunks/"+e+".
|
1
|
+
!function(){"use strict";var e,t,n,r,o,u,i,c,f,a={},l={};function d(e){var t=l[e];if(void 0!==t)return t.exports;var n=l[e]={exports:{}},r=!0;try{a[e](n,n.exports,d),r=!1}finally{r&&delete l[e]}return n.exports}d.m=a,e=[],d.O=function(t,n,r,o){if(n){o=o||0;for(var u=e.length;u>0&&e[u-1][2]>o;u--)e[u]=e[u-1];e[u]=[n,r,o];return}for(var i=1/0,u=0;u<e.length;u++){for(var n=e[u][0],r=e[u][1],o=e[u][2],c=!0,f=0;f<n.length;f++)i>=o&&Object.keys(d.O).every(function(e){return d.O[e](n[f])})?n.splice(f--,1):(c=!1,o<i&&(i=o));if(c){e.splice(u--,1);var a=r();void 0!==a&&(t=a)}}return t},d.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return d.d(t,{a:t}),t},n=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},d.t=function(e,r){if(1&r&&(e=this(e)),8&r||"object"==typeof e&&e&&(4&r&&e.__esModule||16&r&&"function"==typeof e.then))return e;var o=Object.create(null);d.r(o);var u={};t=t||[null,n({}),n([]),n(n)];for(var i=2&r&&e;"object"==typeof i&&!~t.indexOf(i);i=n(i))Object.getOwnPropertyNames(i).forEach(function(t){u[t]=function(){return e[t]}});return u.default=function(){return e},d.d(o,u),o},d.d=function(e,t){for(var n in t)d.o(t,n)&&!d.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},d.f={},d.e=function(e){return Promise.all(Object.keys(d.f).reduce(function(t,n){return d.f[n](e,t),t},[]))},d.u=function(e){return"static/chunks/"+e+".3759f538f11a0953.js"},d.miniCssF=function(e){},d.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r={},o="_N_E:",d.l=function(e,t,n,u){if(r[e]){r[e].push(t);return}if(void 0!==n)for(var i,c,f=document.getElementsByTagName("script"),a=0;a<f.length;a++){var l=f[a];if(l.getAttribute("src")==e||l.getAttribute("data-webpack")==o+n){i=l;break}}i||(c=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,d.nc&&i.setAttribute("nonce",d.nc),i.setAttribute("data-webpack",o+n),i.src=d.tu(e)),r[e]=[t];var s=function(t,n){i.onerror=i.onload=null,clearTimeout(p);var o=r[e];if(delete r[e],i.parentNode&&i.parentNode.removeChild(i),o&&o.forEach(function(e){return e(n)}),t)return t(n)},p=setTimeout(s.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=s.bind(null,i.onerror),i.onload=s.bind(null,i.onload),c&&document.head.appendChild(i)},d.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},d.tt=function(){return void 0===u&&(u={createScriptURL:function(e){return e}},"undefined"!=typeof trustedTypes&&trustedTypes.createPolicy&&(u=trustedTypes.createPolicy("nextjs#bundler",u))),u},d.tu=function(e){return d.tt().createScriptURL(e)},d.p="/dashboard/_next/",i={272:0},d.f.j=function(e,t){var n=d.o(i,e)?i[e]:void 0;if(0!==n){if(n)t.push(n[2]);else if(272!=e){var r=new Promise(function(t,r){n=i[e]=[t,r]});t.push(n[2]=r);var o=d.p+d.u(e),u=Error();d.l(o,function(t){if(d.o(i,e)&&(0!==(n=i[e])&&(i[e]=void 0),n)){var r=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;u.message="Loading chunk "+e+" failed.\n("+r+": "+o+")",u.name="ChunkLoadError",u.type=r,u.request=o,n[1](u)}},"chunk-"+e,e)}else i[e]=0}},d.O.j=function(e){return 0===i[e]},c=function(e,t){var n,r,o=t[0],u=t[1],c=t[2],f=0;if(o.some(function(e){return 0!==i[e]})){for(n in u)d.o(u,n)&&(d.m[n]=u[n]);if(c)var a=c(d)}for(e&&e(t);f<o.length;f++)r=o[f],d.o(i,r)&&i[r]&&i[r][0](),i[r]=0;return d.O(a)},(f=self.webpackChunk_N_E=self.webpackChunk_N_E||[]).forEach(c.bind(null,0)),f.push=c.bind(null,f.push.bind(f)),d.nc=void 0}();
|
@@ -0,0 +1,3 @@
|
|
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}
|