diff --git a/CHANGELOG.md b/CHANGELOG.md index 56e9e58a0..ca3466f6c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -48,6 +48,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fix a random bug caused by queue thread-safety issues when OSS used crontab. - Fix the bug in the update mechanism that fails when the parent references an existing child. - Fix minor bug in openai plugin init method +- Fix the frontend rendering issue related to choices when it is set to /describe_tables. ## [0.4.0](https://github.com/superduper-io/superduper/compare/0.4.0...0.3.0]) (2024-Nov-02) diff --git a/superduper/rest/out/404.html b/superduper/rest/out/404.html index a99d865f4..402e95d37 100644 --- a/superduper/rest/out/404.html +++ b/superduper/rest/out/404.html @@ -1 +1 @@ -Superduper EnterpriseSuperduper Enterprise

404

Page Not Found

Go back home
\ No newline at end of file +Superduper EnterpriseSuperduper Enterprise

404

Page Not Found

Go back home
\ No newline at end of file diff --git a/superduper/rest/out/_next/static/chunks/1409-014ce02151cc5120.js b/superduper/rest/out/_next/static/chunks/1409-014ce02151cc5120.js deleted file mode 100644 index 666fdf2d5..000000000 --- a/superduper/rest/out/_next/static/chunks/1409-014ce02151cc5120.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1409],{4821:function(e,t,r){let n=r(1627),a=r(95006),i=r(59944),o=r(7309),[s,{lineHeight:l}]=i.fontSize.base,{spacing:f,borderWidth:c,borderRadius:d}=i;function u(e,t){return e.replace("",`var(${t}, 1)`)}let p=a.withOptions(function(e={strategy:void 0}){return function({addBase:t,addComponents:r,theme:a}){var i,p;let m;let g=void 0===e.strategy?["base","class"]:[e.strategy],b=[{base:["[type='text']","input:where(:not([type]))","[type='email']","[type='url']","[type='password']","[type='number']","[type='date']","[type='datetime-local']","[type='month']","[type='search']","[type='tel']","[type='time']","[type='week']","[multiple]","textarea","select"],class:[".form-input",".form-textarea",".form-select",".form-multiselect"],styles:{appearance:"none","background-color":"#fff","border-color":u(a("colors.gray.500",o.gray[500]),"--tw-border-opacity"),"border-width":c.DEFAULT,"border-radius":d.none,"padding-top":f[2],"padding-right":f[3],"padding-bottom":f[2],"padding-left":f[3],"font-size":s,"line-height":l,"--tw-shadow":"0 0 #0000","&:focus":{outline:"2px solid transparent","outline-offset":"2px","--tw-ring-inset":"var(--tw-empty,/*!*/ /*!*/)","--tw-ring-offset-width":"0px","--tw-ring-offset-color":"#fff","--tw-ring-color":u(a("colors.blue.600",o.blue[600]),"--tw-ring-opacity"),"--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(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)","box-shadow":"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)","border-color":u(a("colors.blue.600",o.blue[600]),"--tw-border-opacity")}}},{base:["input::placeholder","textarea::placeholder"],class:[".form-input::placeholder",".form-textarea::placeholder"],styles:{color:u(a("colors.gray.500",o.gray[500]),"--tw-text-opacity"),opacity:"1"}},{base:["::-webkit-datetime-edit-fields-wrapper"],class:[".form-input::-webkit-datetime-edit-fields-wrapper"],styles:{padding:"0"}},{base:["::-webkit-date-and-time-value"],class:[".form-input::-webkit-date-and-time-value"],styles:{"min-height":"1.5em"}},{base:["::-webkit-date-and-time-value"],class:[".form-input::-webkit-date-and-time-value"],styles:{"text-align":"inherit"}},{base:["::-webkit-datetime-edit"],class:[".form-input::-webkit-datetime-edit"],styles:{display:"inline-flex"}},{base:["::-webkit-datetime-edit","::-webkit-datetime-edit-year-field","::-webkit-datetime-edit-month-field","::-webkit-datetime-edit-day-field","::-webkit-datetime-edit-hour-field","::-webkit-datetime-edit-minute-field","::-webkit-datetime-edit-second-field","::-webkit-datetime-edit-millisecond-field","::-webkit-datetime-edit-meridiem-field"],class:[".form-input::-webkit-datetime-edit",".form-input::-webkit-datetime-edit-year-field",".form-input::-webkit-datetime-edit-month-field",".form-input::-webkit-datetime-edit-day-field",".form-input::-webkit-datetime-edit-hour-field",".form-input::-webkit-datetime-edit-minute-field",".form-input::-webkit-datetime-edit-second-field",".form-input::-webkit-datetime-edit-millisecond-field",".form-input::-webkit-datetime-edit-meridiem-field"],styles:{"padding-top":0,"padding-bottom":0}},{base:["select"],class:[".form-select"],styles:{"background-image":`url("${n(`","1"))}" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M6 8l4 4 4-4"/>`)}")`,"background-position":`right ${f[2]} center`,"background-repeat":"no-repeat","background-size":"1.5em 1.5em","padding-right":f[10],"print-color-adjust":"exact"}},{base:["[multiple]",'[size]:where(select:not([size="1"]))'],class:['.form-select:where([size]:not([size="1"]))'],styles:{"background-image":"initial","background-position":"initial","background-repeat":"unset","background-size":"initial","padding-right":f[3],"print-color-adjust":"unset"}},{base:["[type='checkbox']","[type='radio']"],class:[".form-checkbox",".form-radio"],styles:{appearance:"none",padding:"0","print-color-adjust":"exact",display:"inline-block","vertical-align":"middle","background-origin":"border-box","user-select":"none","flex-shrink":"0",height:f[4],width:f[4],color:u(a("colors.blue.600",o.blue[600]),"--tw-text-opacity"),"background-color":"#fff","border-color":u(a("colors.gray.500",o.gray[500]),"--tw-border-opacity"),"border-width":c.DEFAULT,"--tw-shadow":"0 0 #0000"}},{base:["[type='checkbox']"],class:[".form-checkbox"],styles:{"border-radius":d.none}},{base:["[type='radio']"],class:[".form-radio"],styles:{"border-radius":"100%"}},{base:["[type='checkbox']:focus","[type='radio']:focus"],class:[".form-checkbox:focus",".form-radio:focus"],styles:{outline:"2px solid transparent","outline-offset":"2px","--tw-ring-inset":"var(--tw-empty,/*!*/ /*!*/)","--tw-ring-offset-width":"2px","--tw-ring-offset-color":"#fff","--tw-ring-color":u(a("colors.blue.600",o.blue[600]),"--tw-ring-opacity"),"--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)"}},{base:["[type='checkbox']:checked","[type='radio']:checked"],class:[".form-checkbox:checked",".form-radio:checked"],styles:{"border-color":"transparent","background-color":"currentColor","background-size":"100% 100%","background-position":"center","background-repeat":"no-repeat"}},{base:["[type='checkbox']:checked"],class:[".form-checkbox:checked"],styles:{"background-image":`url("${n('')}")`,"@media (forced-colors: active) ":{appearance:"auto"}}},{base:["[type='radio']:checked"],class:[".form-radio:checked"],styles:{"background-image":`url("${n('')}")`,"@media (forced-colors: active) ":{appearance:"auto"}}},{base:["[type='checkbox']:checked:hover","[type='checkbox']:checked:focus","[type='radio']:checked:hover","[type='radio']:checked:focus"],class:[".form-checkbox:checked:hover",".form-checkbox:checked:focus",".form-radio:checked:hover",".form-radio:checked:focus"],styles:{"border-color":"transparent","background-color":"currentColor"}},{base:["[type='checkbox']:indeterminate"],class:[".form-checkbox:indeterminate"],styles:{"background-image":`url("${n('')}")`,"border-color":"transparent","background-color":"currentColor","background-size":"100% 100%","background-position":"center","background-repeat":"no-repeat","@media (forced-colors: active) ":{appearance:"auto"}}},{base:["[type='checkbox']:indeterminate:hover","[type='checkbox']:indeterminate:focus"],class:[".form-checkbox:indeterminate:hover",".form-checkbox:indeterminate:focus"],styles:{"border-color":"transparent","background-color":"currentColor"}},{base:["[type='file']"],class:null,styles:{background:"unset","border-color":"inherit","border-width":"0","border-radius":"0",padding:"0","font-size":"unset","line-height":"inherit"}},{base:["[type='file']:focus"],class:null,styles:{outline:["1px solid ButtonText","1px auto -webkit-focus-ring-color"]}}],x=e=>b.map(t=>null===t[e]?null:{[t[e]]:t.styles}).filter(Boolean);g.includes("base")&&t(x("base")),g.includes("class")&&r(x("class"))}});e.exports=p},84313:function(e,t,r){"use strict";r.d(t,{Z:function(){return o}});var n=r(7653),a={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let i=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),o=(e,t)=>{let r=(0,n.forwardRef)((r,o)=>{let{color:s="currentColor",size:l=24,strokeWidth:f=2,absoluteStrokeWidth:c,className:d="",children:u,...p}=r;return(0,n.createElement)("svg",{ref:o,...a,width:l,height:l,stroke:s,strokeWidth:c?24*Number(f)/Number(l):f,className:["lucide","lucide-".concat(i(e)),d].join(" "),...p},[...t.map(e=>{let[t,r]=e;return(0,n.createElement)(t,r)}),...Array.isArray(u)?u:[u]])});return r.displayName="".concat(e),r}},46065:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(84313).Z)("AlertCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]])},61883:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(84313).Z)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},25820:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(84313).Z)("CheckCircle2",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},64386:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(84313).Z)("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]])},40837:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(84313).Z)("Code2",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]])},23919:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(84313).Z)("Loader2",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},58153:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(84313).Z)("Maximize2",[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]])},52269:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(84313).Z)("Minimize2",[["polyline",{points:"4 14 10 14 10 20",key:"11kfnr"}],["polyline",{points:"20 10 14 10 14 4",key:"rlmsce"}],["line",{x1:"14",x2:"21",y1:"10",y2:"3",key:"o5lafz"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]])},24878:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(84313).Z)("RefreshCcw",[["path",{d:"M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"14sxne"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16",key:"1hlbsb"}],["path",{d:"M16 16h5v5",key:"ccwih5"}]])},1627:function(e,t,r){var n=r(23827),a=/\s+/g,i=/%[\dA-F]{2}/g,o=/"/g;function s(e){switch(e){case"%20":return" ";case"%3D":return"=";case"%3A":return":";case"%2F":return"/";default:return e.toLowerCase()}}function l(e){var t;if("string"!=typeof e)throw TypeError("Expected a string, but received "+typeof e);return 65279===e.charCodeAt(0)&&(e=e.slice(1)),"data:image/svg+xml,"+encodeURIComponent((t=e.trim().replace(a," "),Object.keys(n).forEach(function(e){n[e].test(t)&&(t=t.replace(n[e],e))}),t).replace(o,"'")).replace(i,s)}l.toSrcset=function(e){return l(e).replace(/ /g,"%20")},e.exports=l},23827:function(e){e.exports={aqua:/#00ffff(ff)?(?!\w)|#0ff(f)?(?!\w)/gi,azure:/#f0ffff(ff)?(?!\w)/gi,beige:/#f5f5dc(ff)?(?!\w)/gi,bisque:/#ffe4c4(ff)?(?!\w)/gi,black:/#000000(ff)?(?!\w)|#000(f)?(?!\w)/gi,blue:/#0000ff(ff)?(?!\w)|#00f(f)?(?!\w)/gi,brown:/#a52a2a(ff)?(?!\w)/gi,coral:/#ff7f50(ff)?(?!\w)/gi,cornsilk:/#fff8dc(ff)?(?!\w)/gi,crimson:/#dc143c(ff)?(?!\w)/gi,cyan:/#00ffff(ff)?(?!\w)|#0ff(f)?(?!\w)/gi,darkblue:/#00008b(ff)?(?!\w)/gi,darkcyan:/#008b8b(ff)?(?!\w)/gi,darkgrey:/#a9a9a9(ff)?(?!\w)/gi,darkred:/#8b0000(ff)?(?!\w)/gi,deeppink:/#ff1493(ff)?(?!\w)/gi,dimgrey:/#696969(ff)?(?!\w)/gi,gold:/#ffd700(ff)?(?!\w)/gi,green:/#008000(ff)?(?!\w)/gi,grey:/#808080(ff)?(?!\w)/gi,honeydew:/#f0fff0(ff)?(?!\w)/gi,hotpink:/#ff69b4(ff)?(?!\w)/gi,indigo:/#4b0082(ff)?(?!\w)/gi,ivory:/#fffff0(ff)?(?!\w)/gi,khaki:/#f0e68c(ff)?(?!\w)/gi,lavender:/#e6e6fa(ff)?(?!\w)/gi,lime:/#00ff00(ff)?(?!\w)|#0f0(f)?(?!\w)/gi,linen:/#faf0e6(ff)?(?!\w)/gi,maroon:/#800000(ff)?(?!\w)/gi,moccasin:/#ffe4b5(ff)?(?!\w)/gi,navy:/#000080(ff)?(?!\w)/gi,oldlace:/#fdf5e6(ff)?(?!\w)/gi,olive:/#808000(ff)?(?!\w)/gi,orange:/#ffa500(ff)?(?!\w)/gi,orchid:/#da70d6(ff)?(?!\w)/gi,peru:/#cd853f(ff)?(?!\w)/gi,pink:/#ffc0cb(ff)?(?!\w)/gi,plum:/#dda0dd(ff)?(?!\w)/gi,purple:/#800080(ff)?(?!\w)/gi,red:/#ff0000(ff)?(?!\w)|#f00(f)?(?!\w)/gi,salmon:/#fa8072(ff)?(?!\w)/gi,seagreen:/#2e8b57(ff)?(?!\w)/gi,seashell:/#fff5ee(ff)?(?!\w)/gi,sienna:/#a0522d(ff)?(?!\w)/gi,silver:/#c0c0c0(ff)?(?!\w)/gi,skyblue:/#87ceeb(ff)?(?!\w)/gi,snow:/#fffafa(ff)?(?!\w)/gi,tan:/#d2b48c(ff)?(?!\w)/gi,teal:/#008080(ff)?(?!\w)/gi,thistle:/#d8bfd8(ff)?(?!\w)/gi,tomato:/#ff6347(ff)?(?!\w)/gi,violet:/#ee82ee(ff)?(?!\w)/gi,wheat:/#f5deb3(ff)?(?!\w)/gi,white:/#ffffff(ff)?(?!\w)|#fff(f)?(?!\w)/gi}},64070:function(e,t,r){"use strict";r.d(t,{default:function(){return a.a}});var n=r(23842),a=r.n(n)},23842:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return i}});let n=r(11887);r(27573),r(7653);let a=n._(r(58379));function i(e,t){var r;let n={loading:e=>{let{error:t,isLoading:r,pastDelay:n}=e;return null}};"function"==typeof e&&(n.loader=e);let i={...n,...t};return(0,a.default)({...i,modules:null==(r=i.loadableGenerated)?void 0:r.modules})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},42972:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BailoutToCSR",{enumerable:!0,get:function(){return a}});let n=r(20951);function a(e){let{reason:t,children:r}=e;if("undefined"==typeof window)throw new n.BailoutToCSRError(t);return r}},58379:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return f}});let n=r(27573),a=r(7653),i=r(42972),o=r(69111);function s(e){return{default:e&&"default"in e?e.default:e}}let l={loader:()=>Promise.resolve(s(()=>null)),loading:null,ssr:!0},f=function(e){let t={...l,...e},r=(0,a.lazy)(()=>t.loader().then(s)),f=t.loading;function c(e){let s=f?(0,n.jsx)(f,{isLoading:!0,pastDelay:!0,error:null}):null,l=t.ssr?(0,n.jsxs)(n.Fragment,{children:["undefined"==typeof window?(0,n.jsx)(o.PreloadCss,{moduleIds:t.modules}):null,(0,n.jsx)(r,{...e})]}):(0,n.jsx)(i.BailoutToCSR,{reason:"next/dynamic",children:(0,n.jsx)(r,{...e})});return(0,n.jsx)(a.Suspense,{fallback:s,children:l})}return c.displayName="LoadableComponent",c}},69111:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"PreloadCss",{enumerable:!0,get:function(){return i}});let n=r(27573),a=r(92399);function i(e){let{moduleIds:t}=e;if("undefined"!=typeof window)return null;let r=(0,a.getExpectedRequestStore)("next/dynamic css"),i=[];if(r.reactLoadableManifest&&t){let e=r.reactLoadableManifest;for(let r of t){if(!e[r])continue;let t=e[r].files.filter(e=>e.endsWith(".css"));i.push(...t)}}return 0===i.length?null:(0,n.jsx)(n.Fragment,{children:i.map(e=>(0,n.jsx)("link",{precedence:"dynamic",rel:"stylesheet",href:r.assetPrefix+"/_next/"+encodeURI(e),as:"style"},e))})}},91731:function(e){var t=String,r=function(){return{isColorSupported:!1,reset:t,bold:t,dim:t,italic:t,underline:t,inverse:t,hidden:t,strikethrough:t,black:t,red:t,green:t,yellow:t,blue:t,magenta:t,cyan:t,white:t,gray:t,bgBlack:t,bgRed:t,bgGreen:t,bgYellow:t,bgBlue:t,bgMagenta:t,bgCyan:t,bgWhite:t,blackBright:t,redBright:t,greenBright:t,yellowBright:t,blueBright:t,magentaBright:t,cyanBright:t,whiteBright:t,bgBlackBright:t,bgRedBright:t,bgGreenBright:t,bgYellowBright:t,bgBlueBright:t,bgMagentaBright:t,bgCyanBright:t,bgWhiteBright:t}};e.exports=r(),e.exports.createColors=r},58173:function(e,t,r){let n=r(95006);function a(e){return Object.fromEntries(Object.entries(e).filter(([e])=>"DEFAULT"!==e))}e.exports=n(({addUtilities:e,matchUtilities:t,theme:r})=>{e({"@keyframes enter":r("keyframes.enter"),"@keyframes exit":r("keyframes.exit"),".animate-in":{animationName:"enter",animationDuration:r("animationDuration.DEFAULT"),"--tw-enter-opacity":"initial","--tw-enter-scale":"initial","--tw-enter-rotate":"initial","--tw-enter-translate-x":"initial","--tw-enter-translate-y":"initial"},".animate-out":{animationName:"exit",animationDuration:r("animationDuration.DEFAULT"),"--tw-exit-opacity":"initial","--tw-exit-scale":"initial","--tw-exit-rotate":"initial","--tw-exit-translate-x":"initial","--tw-exit-translate-y":"initial"}}),t({"fade-in":e=>({"--tw-enter-opacity":e}),"fade-out":e=>({"--tw-exit-opacity":e})},{values:r("animationOpacity")}),t({"zoom-in":e=>({"--tw-enter-scale":e}),"zoom-out":e=>({"--tw-exit-scale":e})},{values:r("animationScale")}),t({"spin-in":e=>({"--tw-enter-rotate":e}),"spin-out":e=>({"--tw-exit-rotate":e})},{values:r("animationRotate")}),t({"slide-in-from-top":e=>({"--tw-enter-translate-y":`-${e}`}),"slide-in-from-bottom":e=>({"--tw-enter-translate-y":e}),"slide-in-from-left":e=>({"--tw-enter-translate-x":`-${e}`}),"slide-in-from-right":e=>({"--tw-enter-translate-x":e}),"slide-out-to-top":e=>({"--tw-exit-translate-y":`-${e}`}),"slide-out-to-bottom":e=>({"--tw-exit-translate-y":e}),"slide-out-to-left":e=>({"--tw-exit-translate-x":`-${e}`}),"slide-out-to-right":e=>({"--tw-exit-translate-x":e})},{values:r("animationTranslate")}),t({duration:e=>({animationDuration:e})},{values:a(r("animationDuration"))}),t({delay:e=>({animationDelay:e})},{values:r("animationDelay")}),t({ease:e=>({animationTimingFunction:e})},{values:a(r("animationTimingFunction"))}),e({".running":{animationPlayState:"running"},".paused":{animationPlayState:"paused"}}),t({"fill-mode":e=>({animationFillMode:e})},{values:r("animationFillMode")}),t({direction:e=>({animationDirection:e})},{values:r("animationDirection")}),t({repeat:e=>({animationIterationCount:e})},{values:r("animationRepeat")})},{theme:{extend:{animationDelay:({theme:e})=>({...e("transitionDelay")}),animationDuration:({theme:e})=>({0:"0ms",...e("transitionDuration")}),animationTimingFunction:({theme:e})=>({...e("transitionTimingFunction")}),animationFillMode:{none:"none",forwards:"forwards",backwards:"backwards",both:"both"},animationDirection:{normal:"normal",reverse:"reverse",alternate:"alternate","alternate-reverse":"alternate-reverse"},animationOpacity:({theme:e})=>({DEFAULT:0,...e("opacity")}),animationTranslate:({theme:e})=>({DEFAULT:"100%",...e("translate")}),animationScale:({theme:e})=>({DEFAULT:0,...e("scale")}),animationRotate:({theme:e})=>({DEFAULT:"30deg",...e("rotate")}),animationRepeat:{0:"0",1:"1",infinite:"infinite"},keyframes:{enter:{from:{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))"}},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))"}}}}}})},7309:function(e,t,r){let n=r(34619);e.exports=(n.__esModule?n:{default:n}).default},59944:function(e,t,r){let n=r(67474);e.exports=(n.__esModule?n:{default:n}).default},34619:function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o}});let a=(n=r(33345))&&n.__esModule?n:{default:n};function i({version:e,from:t,to:r}){a.default.warn(`${t}-color-renamed`,[`As of Tailwind CSS ${e}, \`${t}\` has been renamed to \`${r}\`.`,"Update your configuration file to silence this warning."])}let o={inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000",white:"#fff",slate:{50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a",950:"#020617"},gray:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827",950:"#030712"},zinc:{50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b",950:"#09090b"},neutral:{50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717",950:"#0a0a0a"},stone:{50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917",950:"#0c0a09"},red:{50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d",950:"#450a0a"},orange:{50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12",950:"#431407"},amber:{50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f",950:"#451a03"},yellow:{50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12",950:"#422006"},lime:{50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314",950:"#1a2e05"},green:{50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d",950:"#052e16"},emerald:{50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b",950:"#022c22"},teal:{50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a",950:"#042f2e"},cyan:{50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63",950:"#083344"},sky:{50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49"},blue:{50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a",950:"#172554"},indigo:{50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81",950:"#1e1b4b"},violet:{50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95",950:"#2e1065"},purple:{50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87",950:"#3b0764"},fuchsia:{50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75",950:"#4a044e"},pink:{50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843",950:"#500724"},rose:{50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337",950:"#4c0519"},get lightBlue(){return i({version:"v2.2",from:"lightBlue",to:"sky"}),this.sky},get warmGray(){return i({version:"v3.0",from:"warmGray",to:"stone"}),this.stone},get trueGray(){return i({version:"v3.0",from:"trueGray",to:"neutral"}),this.neutral},get coolGray(){return i({version:"v3.0",from:"coolGray",to:"gray"}),this.gray},get blueGray(){return i({version:"v3.0",from:"blueGray",to:"slate"}),this.slate}}},26925:function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return a}});let a=((n=r(99582))&&n.__esModule?n:{default:n}).default},67474:function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o}});let a=r(66121),i=(n=r(28216))&&n.__esModule?n:{default:n},o=(0,a.cloneDeep)(i.default.theme)},66121:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"cloneDeep",{enumerable:!0,get:function(){return function e(t){return Array.isArray(t)?t.map(t=>e(t)):"object"==typeof t&&null!==t?Object.fromEntries(Object.entries(t).map(([t,r])=>[t,e(r)])):t}}})},99582:function(e,t){"use strict";function r(e,t){return{handler:e,config:t}}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return n}}),r.withOptions=function(e,t=()=>({})){let r=function(r){return{__options:r,handler:e(r),config:t(r)}};return r.__isOptionsFunction=!0,r.__pluginFunction=e,r.__configFunction=t,r};let n=r},33345:function(e,t,r){"use strict";var n,a=r(74859);Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{dim:function(){return l},default:function(){return f}});let i=(n=r(91731))&&n.__esModule?n:{default:n},o=new Set;function s(e,t,r){(void 0===a||!a.env.JEST_WORKER_ID)&&(r&&o.has(r)||(r&&o.add(r),console.warn(""),t.forEach(t=>console.warn(e,"-",t))))}function l(e){return i.default.dim(e)}let f={info(e,t){s(i.default.bold(i.default.cyan("info")),...Array.isArray(e)?[e]:[t,e])},warn(e,t){s(i.default.bold(i.default.yellow("warn")),...Array.isArray(e)?[e]:[t,e])},risk(e,t){s(i.default.bold(i.default.magenta("risk")),...Array.isArray(e)?[e]:[t,e])}}},95006:function(e,t,r){let n=r(26925);e.exports=(n.__esModule?n:{default:n}).default},28216:function(e){e.exports={content:[],presets:[],darkMode:"media",theme:{accentColor:({theme:e})=>({...e("colors"),auto:"auto"}),animation:{none:"none",spin:"spin 1s linear infinite",ping:"ping 1s cubic-bezier(0, 0, 0.2, 1) infinite",pulse:"pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",bounce:"bounce 1s infinite"},aria:{busy:'busy="true"',checked:'checked="true"',disabled:'disabled="true"',expanded:'expanded="true"',hidden:'hidden="true"',pressed:'pressed="true"',readonly:'readonly="true"',required:'required="true"',selected:'selected="true"'},aspectRatio:{auto:"auto",square:"1 / 1",video:"16 / 9"},backdropBlur:({theme:e})=>e("blur"),backdropBrightness:({theme:e})=>e("brightness"),backdropContrast:({theme:e})=>e("contrast"),backdropGrayscale:({theme:e})=>e("grayscale"),backdropHueRotate:({theme:e})=>e("hueRotate"),backdropInvert:({theme:e})=>e("invert"),backdropOpacity:({theme:e})=>e("opacity"),backdropSaturate:({theme:e})=>e("saturate"),backdropSepia:({theme:e})=>e("sepia"),backgroundColor:({theme:e})=>e("colors"),backgroundImage:{none:"none","gradient-to-t":"linear-gradient(to top, var(--tw-gradient-stops))","gradient-to-tr":"linear-gradient(to top right, var(--tw-gradient-stops))","gradient-to-r":"linear-gradient(to right, var(--tw-gradient-stops))","gradient-to-br":"linear-gradient(to bottom right, var(--tw-gradient-stops))","gradient-to-b":"linear-gradient(to bottom, var(--tw-gradient-stops))","gradient-to-bl":"linear-gradient(to bottom left, var(--tw-gradient-stops))","gradient-to-l":"linear-gradient(to left, var(--tw-gradient-stops))","gradient-to-tl":"linear-gradient(to top left, var(--tw-gradient-stops))"},backgroundOpacity:({theme:e})=>e("opacity"),backgroundPosition:{bottom:"bottom",center:"center",left:"left","left-bottom":"left bottom","left-top":"left top",right:"right","right-bottom":"right bottom","right-top":"right top",top:"top"},backgroundSize:{auto:"auto",cover:"cover",contain:"contain"},blur:{0:"0",none:"",sm:"4px",DEFAULT:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},borderColor:({theme:e})=>({...e("colors"),DEFAULT:e("colors.gray.200","currentColor")}),borderOpacity:({theme:e})=>e("opacity"),borderRadius:{none:"0px",sm:"0.125rem",DEFAULT:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},borderSpacing:({theme:e})=>({...e("spacing")}),borderWidth:{DEFAULT:"1px",0:"0px",2:"2px",4:"4px",8:"8px"},boxShadow:{sm:"0 1px 2px 0 rgb(0 0 0 / 0.05)",DEFAULT:"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",md:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",lg:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",xl:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)","2xl":"0 25px 50px -12px rgb(0 0 0 / 0.25)",inner:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)",none:"none"},boxShadowColor:({theme:e})=>e("colors"),brightness:{0:"0",50:".5",75:".75",90:".9",95:".95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5",200:"2"},caretColor:({theme:e})=>e("colors"),colors:({colors:e})=>({inherit:e.inherit,current:e.current,transparent:e.transparent,black:e.black,white:e.white,slate:e.slate,gray:e.gray,zinc:e.zinc,neutral:e.neutral,stone:e.stone,red:e.red,orange:e.orange,amber:e.amber,yellow:e.yellow,lime:e.lime,green:e.green,emerald:e.emerald,teal:e.teal,cyan:e.cyan,sky:e.sky,blue:e.blue,indigo:e.indigo,violet:e.violet,purple:e.purple,fuchsia:e.fuchsia,pink:e.pink,rose:e.rose}),columns:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12","3xs":"16rem","2xs":"18rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem"},container:{},content:{none:"none"},contrast:{0:"0",50:".5",75:".75",100:"1",125:"1.25",150:"1.5",200:"2"},cursor:{auto:"auto",default:"default",pointer:"pointer",wait:"wait",text:"text",move:"move",help:"help","not-allowed":"not-allowed",none:"none","context-menu":"context-menu",progress:"progress",cell:"cell",crosshair:"crosshair","vertical-text":"vertical-text",alias:"alias",copy:"copy","no-drop":"no-drop",grab:"grab",grabbing:"grabbing","all-scroll":"all-scroll","col-resize":"col-resize","row-resize":"row-resize","n-resize":"n-resize","e-resize":"e-resize","s-resize":"s-resize","w-resize":"w-resize","ne-resize":"ne-resize","nw-resize":"nw-resize","se-resize":"se-resize","sw-resize":"sw-resize","ew-resize":"ew-resize","ns-resize":"ns-resize","nesw-resize":"nesw-resize","nwse-resize":"nwse-resize","zoom-in":"zoom-in","zoom-out":"zoom-out"},divideColor:({theme:e})=>e("borderColor"),divideOpacity:({theme:e})=>e("borderOpacity"),divideWidth:({theme:e})=>e("borderWidth"),dropShadow:{sm:"0 1px 1px rgb(0 0 0 / 0.05)",DEFAULT:["0 1px 2px rgb(0 0 0 / 0.1)","0 1px 1px rgb(0 0 0 / 0.06)"],md:["0 4px 3px rgb(0 0 0 / 0.07)","0 2px 2px rgb(0 0 0 / 0.06)"],lg:["0 10px 8px rgb(0 0 0 / 0.04)","0 4px 3px rgb(0 0 0 / 0.1)"],xl:["0 20px 13px rgb(0 0 0 / 0.03)","0 8px 5px rgb(0 0 0 / 0.08)"],"2xl":"0 25px 25px rgb(0 0 0 / 0.15)",none:"0 0 #0000"},fill:({theme:e})=>({none:"none",...e("colors")}),flex:{1:"1 1 0%",auto:"1 1 auto",initial:"0 1 auto",none:"none"},flexBasis:({theme:e})=>({auto:"auto",...e("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%"}),flexGrow:{0:"0",DEFAULT:"1"},flexShrink:{0:"0",DEFAULT:"1"},fontFamily:{sans:["ui-sans-serif","system-ui","sans-serif",'"Apple Color Emoji"','"Segoe UI Emoji"','"Segoe UI Symbol"','"Noto Color Emoji"'],serif:["ui-serif","Georgia","Cambria",'"Times New Roman"',"Times","serif"],mono:["ui-monospace","SFMono-Regular","Menlo","Monaco","Consolas",'"Liberation Mono"','"Courier New"',"monospace"]},fontSize:{xs:["0.75rem",{lineHeight:"1rem"}],sm:["0.875rem",{lineHeight:"1.25rem"}],base:["1rem",{lineHeight:"1.5rem"}],lg:["1.125rem",{lineHeight:"1.75rem"}],xl:["1.25rem",{lineHeight:"1.75rem"}],"2xl":["1.5rem",{lineHeight:"2rem"}],"3xl":["1.875rem",{lineHeight:"2.25rem"}],"4xl":["2.25rem",{lineHeight:"2.5rem"}],"5xl":["3rem",{lineHeight:"1"}],"6xl":["3.75rem",{lineHeight:"1"}],"7xl":["4.5rem",{lineHeight:"1"}],"8xl":["6rem",{lineHeight:"1"}],"9xl":["8rem",{lineHeight:"1"}]},fontWeight:{thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"},gap:({theme:e})=>e("spacing"),gradientColorStops:({theme:e})=>e("colors"),gradientColorStopPositions:{"0%":"0%","5%":"5%","10%":"10%","15%":"15%","20%":"20%","25%":"25%","30%":"30%","35%":"35%","40%":"40%","45%":"45%","50%":"50%","55%":"55%","60%":"60%","65%":"65%","70%":"70%","75%":"75%","80%":"80%","85%":"85%","90%":"90%","95%":"95%","100%":"100%"},grayscale:{0:"0",DEFAULT:"100%"},gridAutoColumns:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"},gridAutoRows:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"},gridColumn:{auto:"auto","span-1":"span 1 / span 1","span-2":"span 2 / span 2","span-3":"span 3 / span 3","span-4":"span 4 / span 4","span-5":"span 5 / span 5","span-6":"span 6 / span 6","span-7":"span 7 / span 7","span-8":"span 8 / span 8","span-9":"span 9 / span 9","span-10":"span 10 / span 10","span-11":"span 11 / span 11","span-12":"span 12 / span 12","span-full":"1 / -1"},gridColumnEnd:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13"},gridColumnStart:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13"},gridRow:{auto:"auto","span-1":"span 1 / span 1","span-2":"span 2 / span 2","span-3":"span 3 / span 3","span-4":"span 4 / span 4","span-5":"span 5 / span 5","span-6":"span 6 / span 6","span-7":"span 7 / span 7","span-8":"span 8 / span 8","span-9":"span 9 / span 9","span-10":"span 10 / span 10","span-11":"span 11 / span 11","span-12":"span 12 / span 12","span-full":"1 / -1"},gridRowEnd:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13"},gridRowStart:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13"},gridTemplateColumns:{none:"none",subgrid:"subgrid",1:"repeat(1, minmax(0, 1fr))",2:"repeat(2, minmax(0, 1fr))",3:"repeat(3, minmax(0, 1fr))",4:"repeat(4, minmax(0, 1fr))",5:"repeat(5, minmax(0, 1fr))",6:"repeat(6, minmax(0, 1fr))",7:"repeat(7, minmax(0, 1fr))",8:"repeat(8, minmax(0, 1fr))",9:"repeat(9, minmax(0, 1fr))",10:"repeat(10, minmax(0, 1fr))",11:"repeat(11, minmax(0, 1fr))",12:"repeat(12, minmax(0, 1fr))"},gridTemplateRows:{none:"none",subgrid:"subgrid",1:"repeat(1, minmax(0, 1fr))",2:"repeat(2, minmax(0, 1fr))",3:"repeat(3, minmax(0, 1fr))",4:"repeat(4, minmax(0, 1fr))",5:"repeat(5, minmax(0, 1fr))",6:"repeat(6, minmax(0, 1fr))",7:"repeat(7, minmax(0, 1fr))",8:"repeat(8, minmax(0, 1fr))",9:"repeat(9, minmax(0, 1fr))",10:"repeat(10, minmax(0, 1fr))",11:"repeat(11, minmax(0, 1fr))",12:"repeat(12, minmax(0, 1fr))"},height:({theme:e})=>({auto:"auto",...e("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%",full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content"}),hueRotate:{0:"0deg",15:"15deg",30:"30deg",60:"60deg",90:"90deg",180:"180deg"},inset:({theme:e})=>({auto:"auto",...e("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%",full:"100%"}),invert:{0:"0",DEFAULT:"100%"},keyframes:{spin:{to:{transform:"rotate(360deg)"}},ping:{"75%, 100%":{transform:"scale(2)",opacity:"0"}},pulse:{"50%":{opacity:".5"}},bounce:{"0%, 100%":{transform:"translateY(-25%)",animationTimingFunction:"cubic-bezier(0.8,0,1,1)"},"50%":{transform:"none",animationTimingFunction:"cubic-bezier(0,0,0.2,1)"}}},letterSpacing:{tighter:"-0.05em",tight:"-0.025em",normal:"0em",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeight:{none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},listStyleType:{none:"none",disc:"disc",decimal:"decimal"},listStyleImage:{none:"none"},margin:({theme:e})=>({auto:"auto",...e("spacing")}),lineClamp:{1:"1",2:"2",3:"3",4:"4",5:"5",6:"6"},maxHeight:({theme:e})=>({...e("spacing"),none:"none",full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content"}),maxWidth:({theme:e,breakpoints:t})=>({...e("spacing"),none:"none",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",prose:"65ch",...t(e("screens"))}),minHeight:({theme:e})=>({...e("spacing"),full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content"}),minWidth:({theme:e})=>({...e("spacing"),full:"100%",min:"min-content",max:"max-content",fit:"fit-content"}),objectPosition:{bottom:"bottom",center:"center",left:"left","left-bottom":"left bottom","left-top":"left top",right:"right","right-bottom":"right bottom","right-top":"right top",top:"top"},opacity:{0:"0",5:"0.05",10:"0.1",15:"0.15",20:"0.2",25:"0.25",30:"0.3",35:"0.35",40:"0.4",45:"0.45",50:"0.5",55:"0.55",60:"0.6",65:"0.65",70:"0.7",75:"0.75",80:"0.8",85:"0.85",90:"0.9",95:"0.95",100:"1"},order:{first:"-9999",last:"9999",none:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12"},outlineColor:({theme:e})=>e("colors"),outlineOffset:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},outlineWidth:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},padding:({theme:e})=>e("spacing"),placeholderColor:({theme:e})=>e("colors"),placeholderOpacity:({theme:e})=>e("opacity"),ringColor:({theme:e})=>({DEFAULT:e("colors.blue.500","#3b82f6"),...e("colors")}),ringOffsetColor:({theme:e})=>e("colors"),ringOffsetWidth:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},ringOpacity:({theme:e})=>({DEFAULT:"0.5",...e("opacity")}),ringWidth:{DEFAULT:"3px",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},rotate:{0:"0deg",1:"1deg",2:"2deg",3:"3deg",6:"6deg",12:"12deg",45:"45deg",90:"90deg",180:"180deg"},saturate:{0:"0",50:".5",100:"1",150:"1.5",200:"2"},scale:{0:"0",50:".5",75:".75",90:".9",95:".95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5"},screens:{sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},scrollMargin:({theme:e})=>({...e("spacing")}),scrollPadding:({theme:e})=>e("spacing"),sepia:{0:"0",DEFAULT:"100%"},skew:{0:"0deg",1:"1deg",2:"2deg",3:"3deg",6:"6deg",12:"12deg"},space:({theme:e})=>({...e("spacing")}),spacing:{px:"1px",0:"0px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",11:"2.75rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},stroke:({theme:e})=>({none:"none",...e("colors")}),strokeWidth:{0:"0",1:"1",2:"2"},supports:{},data:{},textColor:({theme:e})=>e("colors"),textDecorationColor:({theme:e})=>e("colors"),textDecorationThickness:{auto:"auto","from-font":"from-font",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},textIndent:({theme:e})=>({...e("spacing")}),textOpacity:({theme:e})=>e("opacity"),textUnderlineOffset:{auto:"auto",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},transformOrigin:{center:"center",top:"top","top-right":"top right",right:"right","bottom-right":"bottom right",bottom:"bottom","bottom-left":"bottom left",left:"left","top-left":"top left"},transitionDelay:{0:"0s",75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms"},transitionDuration:{DEFAULT:"150ms",0:"0s",75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms"},transitionProperty:{none:"none",all:"all",DEFAULT:"color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter",colors:"color, background-color, border-color, text-decoration-color, fill, stroke",opacity:"opacity",shadow:"box-shadow",transform:"transform"},transitionTimingFunction:{DEFAULT:"cubic-bezier(0.4, 0, 0.2, 1)",linear:"linear",in:"cubic-bezier(0.4, 0, 1, 1)",out:"cubic-bezier(0, 0, 0.2, 1)","in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},translate:({theme:e})=>({...e("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%",full:"100%"}),size:({theme:e})=>({auto:"auto",...e("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",min:"min-content",max:"max-content",fit:"fit-content"}),width:({theme:e})=>({auto:"auto",...e("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",screen:"100vw",svw:"100svw",lvw:"100lvw",dvw:"100dvw",min:"min-content",max:"max-content",fit:"fit-content"}),willChange:{auto:"auto",scroll:"scroll-position",contents:"contents",transform:"transform"},zIndex:{auto:"auto",0:"0",10:"10",20:"20",30:"30",40:"40",50:"50"}},plugins:[]}},92999:function(e,t,r){"use strict";r.d(t,{fC:function(){return C},z$:function(){return D}});var n=r(7653),a=r(94492),i=r(99933),o=r(46196),s=r(47178),l=r(1403),f=r(35032),c=r(65622),d=r(78378),u=r(27573),p="Checkbox",[m,g]=(0,i.b)(p),[b,x]=m(p),w=n.forwardRef((e,t)=>{let{__scopeCheckbox:r,name:i,checked:l,defaultChecked:f,required:c,disabled:p,value:m="on",onCheckedChange:g,form:x,...w}=e,[h,y]=n.useState(null),C=(0,a.e)(t,e=>y(e)),D=n.useRef(!1),j=!h||x||!!h.closest("form"),[E=!1,_]=(0,s.T)({prop:l,defaultProp:f,onChange:g}),T=n.useRef(E);return n.useEffect(()=>{let e=null==h?void 0:h.form;if(e){let t=()=>_(T.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}},[h,_]),(0,u.jsxs)(b,{scope:r,state:E,disabled:p,children:[(0,u.jsx)(d.WV.button,{type:"button",role:"checkbox","aria-checked":v(E)?"mixed":E,"aria-required":c,"data-state":z(E),"data-disabled":p?"":void 0,disabled:p,value:m,...w,ref:C,onKeyDown:(0,o.M)(e.onKeyDown,e=>{"Enter"===e.key&&e.preventDefault()}),onClick:(0,o.M)(e.onClick,e=>{_(e=>!!v(e)||!e),j&&(D.current=e.isPropagationStopped(),D.current||e.stopPropagation())})}),j&&(0,u.jsx)(k,{control:h,bubbles:!D.current,name:i,value:m,checked:E,required:c,disabled:p,form:x,style:{transform:"translateX(-100%)"},defaultChecked:!v(f)&&f})]})});w.displayName=p;var h="CheckboxIndicator",y=n.forwardRef((e,t)=>{let{__scopeCheckbox:r,forceMount:n,...a}=e,i=x(h,r);return(0,u.jsx)(c.z,{present:n||v(i.state)||!0===i.state,children:(0,u.jsx)(d.WV.span,{"data-state":z(i.state),"data-disabled":i.disabled?"":void 0,...a,ref:t,style:{pointerEvents:"none",...e.style}})})});y.displayName=h;var k=e=>{let{control:t,checked:r,bubbles:a=!0,defaultChecked:i,...o}=e,s=n.useRef(null),c=(0,l.D)(r),d=(0,f.t)(t);n.useEffect(()=>{let e=s.current,t=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set;if(c!==r&&t){let n=new Event("click",{bubbles:a});e.indeterminate=v(r),t.call(e,!v(r)&&r),e.dispatchEvent(n)}},[c,r,a]);let p=n.useRef(!v(r)&&r);return(0,u.jsx)("input",{type:"checkbox","aria-hidden":!0,defaultChecked:null!=i?i:p.current,...o,tabIndex:-1,ref:s,style:{...e.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function v(e){return"indeterminate"===e}function z(e){return v(e)?"indeterminate":e?"checked":"unchecked"}var C=w,D=y},32041:function(e,t,r){"use strict";r.d(t,{f:function(){return f}});var n=r(7653),a=r(78378),i=r(27573),o="horizontal",s=["horizontal","vertical"],l=n.forwardRef((e,t)=>{let{decorative:r,orientation:n=o,...l}=e,f=s.includes(n)?n:o;return(0,i.jsx)(a.WV.div,{"data-orientation":f,...r?{role:"none"}:{"aria-orientation":"vertical"===f?f:void 0,role:"separator"},...l,ref:t})});l.displayName="Separator";var f=l},63612:function(e,t,r){"use strict";let n;r.d(t,{Z:function(){return s}});var a={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let i=new Uint8Array(16),o=[];for(let e=0;e<256;++e)o.push((e+256).toString(16).slice(1));var s=function(e,t,r){if(a.randomUUID&&!t&&!e)return a.randomUUID();let s=(e=e||{}).random||(e.rng||function(){if(!n){if("undefined"==typeof crypto||!crypto.getRandomValues)throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");n=crypto.getRandomValues.bind(crypto)}return n(i)})();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t){r=r||0;for(let e=0;e<16;++e)t[r+e]=s[e];return t}return function(e,t=0){return(o[e[t+0]]+o[e[t+1]]+o[e[t+2]]+o[e[t+3]]+"-"+o[e[t+4]]+o[e[t+5]]+"-"+o[e[t+6]]+o[e[t+7]]+"-"+o[e[t+8]]+o[e[t+9]]+"-"+o[e[t+10]]+o[e[t+11]]+o[e[t+12]]+o[e[t+13]]+o[e[t+14]]+o[e[t+15]]).toLowerCase()}(s)}}}]); \ No newline at end of file diff --git a/superduper/rest/out/_next/static/chunks/1959-00fb5fd17898cf38.js b/superduper/rest/out/_next/static/chunks/1959-00fb5fd17898cf38.js deleted file mode 100644 index 65fd0e0ca..000000000 --- a/superduper/rest/out/_next/static/chunks/1959-00fb5fd17898cf38.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1959],{21959:function(e,t,n){n.d(t,{Z:function(){return G}});var i=n(27573),r=n(70790),s=n(13908),a=n(5772),o=n(412),l=n(45246),d=n(7653),c=n(80840),p=n(87285),h=n(93296),x=n(81695),u=n(56146),m=n(92859),f=n(7109);function j(e){return e.filter(e=>"application"===e.type_id)}function y(){(0,o.v9)(e=>e.environment.environmentLoadedValues);let e=(0,o.v9)(e=>{var t;return null==e?void 0:null===(t=e.userInfo)||void 0===t?void 0:t.userInfoLoadedValues}),t=(0,x.useSearchParams)().get("application"),n=async n=>{try{h.ZP.loading("Fetching latest data",{id:"fetching",position:"bottom-center"});let t=await s.Z.get(n,{headers:{Accept:"application/json",Authorization:(0,f.Z)(e),superduper_reverse_proxy:"http://localhost:8000"}});return console.log(n,t.data),h.ZP.dismiss("fetching"),t.data}catch(e){h.ZP.dismiss("fetching"),console.error("Error fetching Services API data from /webui/restapi/db/show?application=".concat(t))}},[l,y]=(0,d.useState)(null),[v,g]=(0,d.useState)(null),w=e=>{let t={};return e.forEach((e,n)=>{let i=e.type_id;t[i]||(t[i]={type_id:i,payload:[]}),t[i].payload.push({id:n+1,identifier:e.identifier,type_id:e.type_id,status:"online",timestamp:"Retrieved 1 minute ago"})}),Object.values(t)},{data:b,error:N}=(0,r.ZP)("".concat("".concat("http://localhost:8000","/db/show?application=").concat(t)),n,{refreshInterval:6e4,shouldRetryOnError:!1});(0,d.useEffect)(()=>{b?(y(w(b.filter(e=>"application"!==e.type_id))),g(w(j(b)))):(y(w(j([]))),g(w(j([]))))},[b,N]);let[_,k]=(0,d.useState)(!1);return(0,d.useEffect)(()=>{if(l&&0===l.length){let e=setTimeout(()=>{k(!0)},1e3);return()=>clearTimeout(e)}k(!1)},[l]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(u.aG,{children:(0,i.jsxs)(u.Jb,{children:[(0,i.jsx)(u.gN,{children:(0,i.jsx)(u.At,{href:"/webui",children:"Home"})}),(0,i.jsx)(u.bg,{}),(0,i.jsx)(u.gN,{children:(0,i.jsx)(u.At,{href:"/webui/application",children:"Application"})}),(0,i.jsx)(u.bg,{}),(0,i.jsx)(u.gN,{children:(0,i.jsx)(u.AG,{children:t})})]})}),(0,i.jsx)("br",{}),(0,i.jsx)(m.Z,{title:"".concat(t&&t," components"),description:"View all the components that are currently deployed as part of the ".concat(t," application"),buttonText:"Edit ".concat(t&&t),buttonLink:"/webui/update?type_id=application&identifier=".concat(t)}),(0,i.jsx)("br",{}),(0,i.jsxs)("div",{children:[l?l.length>0?l.map((e,t)=>(0,i.jsx)(c.Z,{data:e},t)):!_&&(0,i.jsx)(a.Z,{}):(0,i.jsx)(a.Z,{}),_&&(0,i.jsx)(p.Z,{header:"No component found in ".concat(t," application"),description:"Something went wrong. Please try again later.",createDeployment:"hide"})]}),(0,i.jsx)("br",{}),(0,i.jsx)("br",{}),(0,i.jsx)("br",{}),(0,i.jsx)("br",{})]})}var v=n(96764);let g=d.forwardRef(function(e,t){let{title:n,titleId:i,...r}=e;return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":i},r),n?d.createElement("title",{id:i},n):null,d.createElement("path",{fillRule:"evenodd",d:"M4.25 5.5a.75.75 0 0 0-.75.75v8.5c0 .414.336.75.75.75h8.5a.75.75 0 0 0 .75-.75v-4a.75.75 0 0 1 1.5 0v4A2.25 2.25 0 0 1 12.75 17h-8.5A2.25 2.25 0 0 1 2 14.75v-8.5A2.25 2.25 0 0 1 4.25 4h5a.75.75 0 0 1 0 1.5h-5Z",clipRule:"evenodd"}),d.createElement("path",{fillRule:"evenodd",d:"M6.194 12.753a.75.75 0 0 0 1.06.053L16.5 4.44v2.81a.75.75 0 0 0 1.5 0v-4.5a.75.75 0 0 0-.75-.75h-4.5a.75.75 0 0 0 0 1.5h2.553l-9.056 8.194a.75.75 0 0 0-.053 1.06Z",clipRule:"evenodd"}))});var w=n(36531);function b(e){let{identifier:t}=e,[n,r]=(0,d.useState)(null);(0,o.v9)(e=>e.environment.environmentLoadedValues);let a=(0,o.v9)(e=>{var t;return null==e?void 0:null===(t=e.userInfo)||void 0===t?void 0:t.userInfoLoadedValues});return(0,d.useEffect)(()=>{if(t){let e=()=>{console.error("Error fetching application data from /webui/restapi/db/show?type_id=application&identifier=".concat(t))};(async()=>{try{let e=(await s.Z.get("".concat("".concat("http://localhost:8000","/db/show?type_id=application&identifier=").concat(t)),{headers:{Accept:"application/json",Authorization:(0,f.Z)(a),superduper_reverse_proxy:"http://localhost:8000"}})).data.slice(-1)[0];console.log("Latest Version:",e);let n=await s.Z.get("".concat("".concat("http://localhost:8000","/db/show?type_id=application&identifier=").concat(t,"&version=").concat(e)),{headers:{Accept:"application/json",Authorization:(0,f.Z)(a),superduper_reverse_proxy:"http://localhost:8000"}});console.log("JSON DATA",n.data),r(n.data)}catch(n){console.error("Error fetching application data from /webui/restapi/db/show?type_id=application&identifier=".concat(t),n),e()}})()}},[t]),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)("a",{href:null==n?void 0:n.link,className:"flex gap-x-2",target:"_blank",rel:"noopener noreferrer",children:(0,i.jsxs)(w.z,{variant:"outline",disabled:!(null==n?void 0:n.link),children:["Open",(0,i.jsx)(g,{className:"ml-2 -mr-0.5 h-5 w-5 flex-none text-gray-400","aria-hidden":"true"})]})})})}var N=n(11277),_=n(70694),k=n(97747),A=n(98348),Z=n(27496),L=n(80923),C=n(64520),E=n(1930),I=n(46346);let P={offline:"text-gray-500 bg-gray-100/10",online:"text-green-400 bg-green-400/10",error:"text-rose-400 bg-rose-400/10"};function S(e){var t;(0,o.v9)(e=>e.environment.environmentLoadedValues);let n=(0,o.v9)(e=>{var t;return null==e?void 0:null===(t=e.userInfo)||void 0===t?void 0:t.userInfoLoadedValues}),r=(0,o.I0)(),[a,l]=(0,d.useState)({type_id:"",identifier:"",version:""}),c=()=>{window.location.reload()},[p,x]=(0,d.useState)(!1),[u,m]=(0,d.useState)(!1),[j,y]=(0,d.useState)(!1),[g,S]=(0,d.useState)(""),O=e=>{S(e.target.value)};function W(e){return"application"===e?"Deployed Applications":e.replace(/_/g," ").split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(" ")}let G=async e=>{try{if((null==e?void 0:e.identifier)!==g){h.ZP.error("Identifier does not match. Type it carefully.",{id:"delete-deployment"});return}m(!0),x(!1),console.log("Deleting component:",e),console.log("Deleting by calling API: /webui/restapi/db/remove?type_id=".concat(e.type_id,"&identifier=").concat(e.identifier));let t=await s.Z.post("".concat("".concat("http://localhost:8000","/db/remove?type_id=").concat(e.type_id,"&identifier=").concat(e.identifier)),{headers:{Accept:"application/json",Authorization:(0,f.Z)(n),superduper_reverse_proxy:"http://localhost:8000"}});console.log("Delete Component API data:",t.data),200===t.status?(m(!1),c(),console.log("Component deleted successfully"),h.ZP.success("Component deleted successfully")):(console.error("Error deleting component:",t.data),h.ZP.error("Error deleting component",{id:"delete-component"}),m(!1),y(!0))}catch(e){console.error("Error deleting component:",e),m(!1),y(!0),h.ZP.error("Error deleting component",{id:"delete-component"})}},Y=e.data;return(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(I.x,{className:"max-w-7xl whitespace-nowrap",children:[(0,i.jsxs)("div",{className:" bg-white px-4 py-0 sm:px-6",children:[(0,i.jsx)("div",{className:"mx-auto max-w-7xl pr-4 pt-5 pb-0 sm:pr-6 lg:pr-8",children:(0,i.jsx)("div",{className:"mx-auto flex max-w-2xl items-center justify-between gap-x-8 lg:mx-0 lg:max-w-none",children:(0,i.jsxs)("div",{className:"flex items-center gap-x-4",children:[(0,i.jsx)("div",{className:"bg-black rounded-lg p-2",children:(null==Y?void 0:Y.type_id)=="model"?(0,i.jsx)(F,{className:"w-6 h-6 text-gray-300"}):(null==Y?void 0:Y.type_id)=="datatype"?(0,i.jsx)(V,{className:"w-6 h-6 text-gray-300"}):(null==Y?void 0:Y.type_id)=="listener"?(0,i.jsx)(D,{className:"w-6 h-6 text-gray-300"}):(null==Y?void 0:Y.type_id)=="metric"?(0,i.jsx)(B,{className:"w-6 h-6 text-gray-300"}):(null==Y?void 0:Y.type_id)=="serializer"?(0,i.jsx)(z,{className:"w-6 h-6 text-gray-300"}):(null==Y?void 0:Y.type_id)=="encoder"?(0,i.jsx)(R,{className:"w-6 h-6 text-gray-300"}):(null==Y?void 0:Y.type_id)=="vector_index"?(0,i.jsx)(M,{className:"w-6 h-6 text-gray-300"}):(0,i.jsx)(T,{className:"w-6 h-6 text-gray-300"})}),(0,i.jsx)("h1",{children:(0,i.jsxs)("div",{className:"text-base font-semibold leading-6 text-gray-900",children:[W(null==Y?void 0:Y.type_id)," ",(0,i.jsx)(L.Z,{label:"",popoverheader:W(null==Y?void 0:Y.type_id),popovercontent:(0,i.jsx)("p",{children:"datatype"===(t=null==Y?void 0:Y.type_id)?"Datatype allows users to create and encode custom datatypes by providing their own serializers.":"listener"===t?'A listener is a class that "deploys" a model to "listen" for incoming data, calculate predictions on this data, and then saves them back to the database.':"vector_index"===t?"A vector_index is the necessary combination of Component instances needed to create end-to-end vector-search functionality.":"stack"===t?"A stack is a way to connect diverse and interoperating sets of functionality.":"application"===t?"An application is a way to create dynamic AI applications easily.":"encoder"===t?"An encoder is a class responsible for converting special data types into bytes and back.":"model"===t?"A model is a class that wraps a classical AI model and additionally provides tools required for pre- and post-processing.":"serializer"===t?"Some component objects require special serialization protocols to become saveable in the superduperdb world.":"metric"===t?"A metric serves the purpose of evaluating the quality of Component instances, particularly Model, Listener, and VectorIndex instances.":'To learn more about this component, click on "See more."'})})]})})]})})}),(0,i.jsxs)("div",{className:" bg-white px-4 py-5 sm:px-6",children:[(0,i.jsx)("div",{className:"-ml-4 -mt-4 flex flex-wrap items-center justify-between sm:flex-nowrap border-b border-gray-200",children:(0,i.jsx)("div",{className:"ml-4 mt-4 flex-shrink-0"})}),(0,i.jsx)("ul",{role:"list",className:"divide-y divide-red/5",children:Y.payload.map(e=>(0,i.jsxs)("li",{className:"relative flex items-center space-x-4 py-4",children:[(0,i.jsxs)("div",{className:"min-w-0 flex-auto",children:[(0,i.jsxs)("div",{className:"flex items-center gap-x-3",children:[(0,i.jsx)("div",{className:function(){for(var e=arguments.length,t=Array(e),n=0;n{r((0,Z.t)(e))},children:["Show More"," ",(0,i.jsx)(v.Z,{className:"ml-2 -mr-0.5 h-5 w-5 flex-none text-gray-400","aria-hidden":"true"})]})}),(0,i.jsxs)(_.ue,{className:"overflow-auto w-[800px] sm:w-[800px] sm:max-w-none",children:[(0,i.jsxs)(_.Tu,{children:[(0,i.jsx)("div",{className:"flex justify-between items-center",children:(0,i.jsx)(_.bC,{children:(0,i.jsxs)("div",{children:[(0,i.jsxs)("h1",{className:"text-lg font-semibold leading-6 text-gray-900",children:[e.type_id,"/",e.identifier]}),(0,i.jsxs)("p",{className:"text-sm text-gray-600",children:[" ","type_id: ",Y.type_id,", identifier:"," ",e.identifier]})]})})}),(0,i.jsx)("br",{})]}),(0,i.jsx)("div",{className:"grid gap-4 py-4 overflow-visible",children:(0,i.jsx)(N.Z,{data:e})}),(0,i.jsxs)(_.FF,{children:[(0,i.jsx)("a",{href:"/webui/update?type_id=".concat(e.type_id,"&identifier=").concat(e.identifier,"\n "),children:(0,i.jsxs)(w.z,{className:"px-8 mt-6",variant:"outline",children:["Edit ",e.identifier]})}),(0,i.jsxs)(w.z,{variant:"destructive",className:"px-8 mt-6",onClick:()=>{l({type_id:e.type_id,identifier:e.identifier,version:e.version||""}),x(!0)},children:["Delete ",e.identifier]})]})]}),(0,i.jsxs)(C.aR,{open:p,children:[(0,i.jsx)(C.vW,{}),(0,i.jsxs)(C._T,{children:[(0,i.jsxs)(C.fY,{children:[(0,i.jsxs)(C.f$,{children:["Are you absolutely sure to delete"," ",null==a?void 0:a.identifier,"?"]}),(0,i.jsxs)(C.yT,{children:["This action cannot be undone. This will permanently delete your component with identifier"," ",(0,i.jsxs)("strong",{children:[null==a?void 0:a.identifier," "]})," and remove your data. Be aware!"]}),(0,i.jsx)("br",{}),(0,i.jsxs)("div",{className:"grid w-full max-w-sm items-center gap-1.5",children:[(0,i.jsxs)(k._,{htmlFor:"deployment-name",children:["Type the identifier:"," ",(0,i.jsx)("strong",{children:null==a?void 0:a.identifier})]}),(0,i.jsx)(E.I,{type:"text",id:"deployment-name",placeholder:"Type the identifier",value:g,onChange:O,className:"border border-gray-300 rounded-md p-2"})]})]}),(0,i.jsxs)(C.xo,{children:[(0,i.jsx)(C.le,{onClick:()=>x(!1),children:"Cancel"}),(0,i.jsxs)(C.OL,{onClick:()=>{G(a)},children:["Delete ",null==a?void 0:a.identifier]})]})]})]}),(0,i.jsx)(C.aR,{open:u,children:(0,i.jsx)(C._T,{children:(0,i.jsxs)(C.fY,{children:[(0,i.jsxs)(C.f$,{children:["Deleting"," ",(0,i.jsx)("strong",{children:null==a?void 0:a.identifier})," "]}),(0,i.jsx)(C.yT,{children:"This initiates a delete component process that may take some time. Please wait patiently. You'll be redirected to the show component page once it's complete."}),(0,i.jsx)("br",{}),(0,i.jsx)(A.O,{})]})})}),(0,i.jsx)(C.aR,{open:j,children:(0,i.jsxs)(C._T,{children:[(0,i.jsxs)(C.fY,{children:[(0,i.jsxs)(C.f$,{children:["Deleting"," ",(0,i.jsx)("strong",{children:null==a?void 0:a.identifier})," ","failed..."]}),(0,i.jsxs)(C.yT,{children:["Something went wrong while deleting the"," ",(0,i.jsx)("strong",{children:null==a?void 0:a.identifier}),". Please try again."]})]}),(0,i.jsxs)(C.xo,{children:[(0,i.jsx)(C.le,{onClick:()=>{y(!1),m(!1)},children:"Cancel"}),(0,i.jsx)(C.OL,{onClick:()=>{m(!0),y(!1),G(a)},children:"Retry Now"})]})]})})]})]},e.id))})]})]}),(0,i.jsx)(I.B,{orientation:"horizontal"})]})})}function T(e){return(0,i.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,i.jsx)("rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2"}),(0,i.jsx)("rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2"}),(0,i.jsx)("line",{x1:"6",x2:"6.01",y1:"6",y2:"6"}),(0,i.jsx)("line",{x1:"6",x2:"6.01",y1:"18",y2:"18"})]})}function R(e){return(0,i.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,i.jsx)("polyline",{points:"16 18 22 12 16 6"}),(0,i.jsx)("polyline",{points:"8 6 2 12 8 18"})]})}function B(e){return(0,i.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,i.jsx)("path",{d:"m12 14 4-4"}),(0,i.jsx)("path",{d:"M3.34 19a10 10 0 1 1 17.32 0"})]})}function z(e){return(0,i.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,i.jsx)("line",{x1:"12",x2:"12",y1:"2",y2:"6"}),(0,i.jsx)("line",{x1:"12",x2:"12",y1:"18",y2:"22"}),(0,i.jsx)("line",{x1:"4.93",x2:"7.76",y1:"4.93",y2:"7.76"}),(0,i.jsx)("line",{x1:"16.24",x2:"19.07",y1:"16.24",y2:"19.07"}),(0,i.jsx)("line",{x1:"2",x2:"6",y1:"12",y2:"12"}),(0,i.jsx)("line",{x1:"18",x2:"22",y1:"12",y2:"12"}),(0,i.jsx)("line",{x1:"4.93",x2:"7.76",y1:"19.07",y2:"16.24"}),(0,i.jsx)("line",{x1:"16.24",x2:"19.07",y1:"7.76",y2:"4.93"})]})}function V(e){return(0,i.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,i.jsx)("polyline",{points:"4 7 4 4 20 4 20 7"}),(0,i.jsx)("line",{x1:"9",x2:"15",y1:"20",y2:"20"}),(0,i.jsx)("line",{x1:"12",x2:"12",y1:"4",y2:"20"})]})}function M(e){return(0,i.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,i.jsx)("ellipse",{cx:"12",cy:"5",rx:"9",ry:"3"}),(0,i.jsx)("path",{d:"M3 5V19A9 3 0 0 0 21 19V5"}),(0,i.jsx)("path",{d:"M3 12A9 3 0 0 0 21 12"})]})}function D(e){return(0,i.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,i.jsx)("path",{d:"M6 8.5a6.5 6.5 0 1 1 13 0c0 6-6 6-6 10a3.5 3.5 0 1 1-7 0"}),(0,i.jsx)("path",{d:"M15 8.5a2.5 2.5 0 0 0-5 0v1a2 2 0 1 1 0 4"})]})}function F(e){return(0,i.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,i.jsx)("path",{d:"M12 8V4H8"}),(0,i.jsx)("rect",{width:"16",height:"12",x:"4",y:"8",rx:"2"}),(0,i.jsx)("path",{d:"M2 14h2"}),(0,i.jsx)("path",{d:"M20 14h2"}),(0,i.jsx)("path",{d:"M15 13v2"}),(0,i.jsx)("path",{d:"M9 13v2"})]})}function O(e){return e.filter(e=>"application"===e.type_id)}function W(){(0,o.v9)(e=>e.environment.environmentLoadedValues);let e=(0,o.v9)(e=>{var t;return null==e?void 0:null===(t=e.userInfo)||void 0===t?void 0:t.userInfoLoadedValues}),t=async t=>{try{h.ZP.loading("Fetching latest data",{id:"fetching",position:"bottom-center"});let t=await s.Z.get("".concat("".concat("http://localhost:8000","/db/show")),{headers:{Accept:"application/json",Authorization:(0,f.Z)(e),superduper_reverse_proxy:"http://localhost:8000"}});return console.log("/db/show/ API data:",t.data),h.ZP.dismiss("fetching"),t.data}catch(e){h.ZP.dismiss("fetching"),console.error("Error fetching Services API data")}},[n,l]=(0,d.useState)(null),[c,x]=(0,d.useState)(null),u=e=>{let t={};return e.forEach((e,n)=>{let i=e.type_id;t[i]||(t[i]={type_id:i,payload:[]}),t[i].payload.push({id:n+1,identifier:e.identifier,type_id:e.type_id,status:"online",timestamp:""})}),Object.values(t)},{data:j,error:y}=(0,r.ZP)("".concat("".concat("http://localhost:8000","/db/show")),t,{refreshInterval:6e4,shouldRetryOnError:!1});(0,d.useEffect)(()=>{j?(l(u(j.filter(e=>"application"!==e.type_id))),x(u(O(j)))):(l(u(O([]))),x(u(O([]))))},[j,y]);let[v,g]=(0,d.useState)(!1);return(0,d.useEffect)(()=>{if(c&&0===c.length){let e=setTimeout(()=>{g(!0)},1e3);return()=>clearTimeout(e)}g(!1)},[c]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(m.Z,{title:"Applications",description:"View all your agent applications running, or create a new one.",buttonText:"Add Application",buttonLink:"/webui/add-application"}),(0,i.jsx)("br",{}),(0,i.jsxs)("div",{children:[c?c.length>0?c.map((e,t)=>(0,i.jsx)(S,{data:e},t)):!v&&(0,i.jsx)(a.Z,{}):(0,i.jsx)(a.Z,{}),v&&(0,i.jsx)(p.Z,{header:"No Application Found",description:"Get started by adding a new application.",createDeployment:"hide"})]}),(0,i.jsx)("br",{}),(0,i.jsx)("br",{}),(0,i.jsx)("br",{}),(0,i.jsx)("br",{})]})}function G(e){let{application:t}=e;(0,o.v9)(e=>e.environment.environmentLoadedValues);let n=(0,o.v9)(e=>{var t;return null==e?void 0:null===(t=e.userInfo)||void 0===t?void 0:t.userInfoLoadedValues}),d=async e=>(await s.Z.get(e,{headers:{Accept:"application/json",Authorization:(0,f.Z)(n),superduper_reverse_proxy:"http://localhost:8000"}})).data,{data:c,error:p}=(0,r.ZP)("".concat("".concat("http://localhost:8000","/health")),d,{refreshInterval:3e4,shouldRetryOnError:!1});return c||p?p?(0,i.jsx)(l.Z,{header:"REST API is currently unavailable"}):(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(i.Fragment,{children:t?(0,i.jsx)(W,{}):(0,i.jsx)(y,{})})}):(0,i.jsx)(a.Z,{times:6})}},56146:function(e,t,n){n.d(t,{AG:function(){return h},At:function(){return p},Jb:function(){return d},aG:function(){return l},bg:function(){return x},gN:function(){return c}});var i=n(27573),r=n(7653),s=n(85688),a=n(8828),o=n(18580);let l=r.forwardRef((e,t)=>{let{...n}=e;return(0,i.jsx)("nav",{ref:t,"aria-label":"breadcrumb",...n})});l.displayName="Breadcrumb";let d=r.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,i.jsx)("ol",{ref:t,className:(0,o.cn)("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",n),...r})});d.displayName="BreadcrumbList";let c=r.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,i.jsx)("li",{ref:t,className:(0,o.cn)("inline-flex items-center gap-1.5",n),...r})});c.displayName="BreadcrumbItem";let p=r.forwardRef((e,t)=>{let{asChild:n,className:r,...s}=e,l=n?a.g7:"a";return(0,i.jsx)(l,{ref:t,className:(0,o.cn)("transition-colors hover:text-foreground",r),...s})});p.displayName="BreadcrumbLink";let h=r.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,i.jsx)("span",{ref:t,role:"link","aria-disabled":"true","aria-current":"page",className:(0,o.cn)("font-normal text-foreground",n),...r})});h.displayName="BreadcrumbPage";let x=e=>{let{children:t,className:n,...r}=e;return(0,i.jsx)("li",{role:"presentation","aria-hidden":"true",className:(0,o.cn)("[&>svg]:size-3.5",n),...r,children:null!=t?t:(0,i.jsx)(s.XCv,{})})};x.displayName="BreadcrumbSeparator"}}]); \ No newline at end of file diff --git a/superduper/rest/out/_next/static/chunks/1959-623ec1a7939588c8.js b/superduper/rest/out/_next/static/chunks/1959-623ec1a7939588c8.js new file mode 100644 index 000000000..bbb7cfd9b --- /dev/null +++ b/superduper/rest/out/_next/static/chunks/1959-623ec1a7939588c8.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1959],{21959:function(e,t,n){n.d(t,{Z:function(){return Y}});var i=n(27573),r=n(7653),s=n(5772),a=n(13908),o=n(80840),l=n(87285),d=n(70790),c=n(93296),p=n(81695),h=n(56146),x=n(92859),u=n(412),m=n(7109);function f(e){return e.filter(e=>"application"===e.type_id)}function j(){(0,u.v9)(e=>e.environment.environmentLoadedValues);let e=(0,u.v9)(e=>{var t;return null==e?void 0:null===(t=e.userInfo)||void 0===t?void 0:t.userInfoLoadedValues}),t=(0,p.useSearchParams)().get("application"),n=async n=>{try{c.ZP.loading("Fetching latest data",{id:"fetching",position:"bottom-center"});let t=await a.Z.get(n,{headers:{Accept:"application/json",Authorization:(0,m.Z)(e),superduper_reverse_proxy:"http://localhost:8000"}});return console.log(n,t.data),c.ZP.dismiss("fetching"),t.data}catch(e){c.ZP.dismiss("fetching"),console.error("Error fetching Services API data from /webui/restapi/db/show?application=".concat(t))}},[j,v]=(0,r.useState)(null),[g,y]=(0,r.useState)(null),w=e=>{let t={};return e.forEach((e,n)=>{let i=e.type_id;t[i]||(t[i]={type_id:i,payload:[]}),t[i].payload.push({id:n+1,identifier:e.identifier,type_id:e.type_id,status:"online",timestamp:"Retrieved 1 minute ago"})}),Object.values(t)},{data:b,error:_}=(0,d.ZP)("".concat("".concat("http://localhost:8000","/db/show?application=").concat(t)),n,{refreshInterval:6e4,shouldRetryOnError:!1});(0,r.useEffect)(()=>{b?(v(w(b.filter(e=>"application"!==e.type_id))),y(w(f(b)))):(v(w(f([]))),y(w(f([]))))},[b,_]);let[N,k]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{if(j&&0===j.length){let e=setTimeout(()=>{k(!0)},1e3);return()=>clearTimeout(e)}k(!1)},[j]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(h.aG,{children:(0,i.jsxs)(h.Jb,{children:[(0,i.jsx)(h.gN,{children:(0,i.jsx)(h.At,{href:"/webui",children:"Home"})}),(0,i.jsx)(h.bg,{}),(0,i.jsx)(h.gN,{children:(0,i.jsx)(h.At,{href:"/webui/application",children:"Application"})}),(0,i.jsx)(h.bg,{}),(0,i.jsx)(h.gN,{children:(0,i.jsx)(h.AG,{children:t})})]})}),(0,i.jsx)("br",{}),(0,i.jsx)(x.Z,{title:"".concat(t&&t," components"),description:"View all the components that are currently deployed as part of the ".concat(t," application"),buttonText:"Edit ".concat(t&&t),buttonLink:"/webui/add-application?type_id=application&identifier=".concat(t)}),(0,i.jsx)("br",{}),(0,i.jsxs)("div",{children:[j?j.length>0?j.map((e,t)=>(0,i.jsx)(o.Z,{data:e},t)):!N&&(0,i.jsx)(s.Z,{}):(0,i.jsx)(s.Z,{}),N&&(0,i.jsx)(l.Z,{header:"No component found in ".concat(t," application"),description:"Something went wrong. Please try again later.",createDeployment:"hide"})]}),(0,i.jsx)("br",{}),(0,i.jsx)("br",{}),(0,i.jsx)("br",{}),(0,i.jsx)("br",{})]})}var v=n(96764);let g=r.forwardRef(function(e,t){let{title:n,titleId:i,...s}=e;return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":i},s),n?r.createElement("title",{id:i},n):null,r.createElement("path",{fillRule:"evenodd",d:"M4.25 5.5a.75.75 0 0 0-.75.75v8.5c0 .414.336.75.75.75h8.5a.75.75 0 0 0 .75-.75v-4a.75.75 0 0 1 1.5 0v4A2.25 2.25 0 0 1 12.75 17h-8.5A2.25 2.25 0 0 1 2 14.75v-8.5A2.25 2.25 0 0 1 4.25 4h5a.75.75 0 0 1 0 1.5h-5Z",clipRule:"evenodd"}),r.createElement("path",{fillRule:"evenodd",d:"M6.194 12.753a.75.75 0 0 0 1.06.053L16.5 4.44v2.81a.75.75 0 0 0 1.5 0v-4.5a.75.75 0 0 0-.75-.75h-4.5a.75.75 0 0 0 0 1.5h2.553l-9.056 8.194a.75.75 0 0 0-.053 1.06Z",clipRule:"evenodd"}))});var y=n(36531);function w(e){let{identifier:t}=e,[n,s]=(0,r.useState)(null);(0,u.v9)(e=>e.environment.environmentLoadedValues);let o=(0,u.v9)(e=>{var t;return null==e?void 0:null===(t=e.userInfo)||void 0===t?void 0:t.userInfoLoadedValues});return(0,r.useEffect)(()=>{if(t){let e=()=>{console.error("Error fetching application data from /webui/restapi/db/show?type_id=application&identifier=".concat(t))};(async()=>{try{let e=(await a.Z.get("".concat("".concat("http://localhost:8000","/db/show?type_id=application&identifier=").concat(t)),{headers:{Accept:"application/json",Authorization:(0,m.Z)(o),superduper_reverse_proxy:"http://localhost:8000"}})).data.slice(-1)[0];console.log("Latest Version:",e);let n=await a.Z.get("".concat("".concat("http://localhost:8000","/db/show?type_id=application&identifier=").concat(t,"&version=").concat(e)),{headers:{Accept:"application/json",Authorization:(0,m.Z)(o),superduper_reverse_proxy:"http://localhost:8000"}});console.log("JSON DATA",n.data),s(n.data)}catch(n){console.error("Error fetching application data from /webui/restapi/db/show?type_id=application&identifier=".concat(t),n),e()}})()}},[t]),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)("a",{href:null==n?void 0:n.link,className:"flex gap-x-2",target:"_blank",rel:"noopener noreferrer",children:(0,i.jsxs)(y.z,{variant:"outline",disabled:!(null==n?void 0:n.link),children:["Open",(0,i.jsx)(g,{className:"ml-2 -mr-0.5 h-5 w-5 flex-none text-gray-400","aria-hidden":"true"})]})})})}var b=n(11277),_=n(70694),N=n(97747),k=n(98348),A=n(27496),Z=n(80923),L=n(64520),C=n(1930),E=n(46346);let I={offline:"text-gray-500 bg-gray-100/10",online:"text-green-400 bg-green-400/10",error:"text-rose-400 bg-rose-400/10"};function P(e){var t;(0,u.v9)(e=>e.environment.environmentLoadedValues);let n=(0,u.v9)(e=>{var t;return null==e?void 0:null===(t=e.userInfo)||void 0===t?void 0:t.userInfoLoadedValues}),s=(0,u.I0)(),[o,l]=(0,r.useState)({type_id:"",identifier:"",version:""}),d=()=>{window.location.reload()},[p,h]=(0,r.useState)(!1),[x,f]=(0,r.useState)(!1),[j,g]=(0,r.useState)(!1),[P,O]=(0,r.useState)(""),F=e=>{O(e.target.value)};function W(e){return"application"===e?"Deployed Applications":e.replace(/_/g," ").split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(" ")}let G=async e=>{try{if((null==e?void 0:e.identifier)!==P){c.ZP.error("Identifier does not match. Type it carefully.",{id:"delete-deployment"});return}f(!0),h(!1),console.log("Deleting component:",e),console.log("Deleting by calling API: /webui/restapi/db/remove?type_id=".concat(e.type_id,"&identifier=").concat(e.identifier));let t=await a.Z.post("".concat("".concat("http://localhost:8000","/db/remove?type_id=").concat(e.type_id,"&identifier=").concat(e.identifier)),{headers:{Accept:"application/json",Authorization:(0,m.Z)(n),superduper_reverse_proxy:"http://localhost:8000"}});console.log("Delete Component API data:",t.data),200===t.status?(f(!1),d(),console.log("Component deleted successfully"),c.ZP.success("Component deleted successfully")):(console.error("Error deleting component:",t.data),c.ZP.error("Error deleting component",{id:"delete-component"}),f(!1),g(!0))}catch(e){console.error("Error deleting component:",e),f(!1),g(!0),c.ZP.error("Error deleting component",{id:"delete-component"})}},J=e.data;return(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(E.x,{className:"max-w-7xl whitespace-nowrap",children:[(0,i.jsxs)("div",{className:" bg-white px-4 py-0 sm:px-6",children:[(0,i.jsx)("div",{className:"mx-auto max-w-7xl pr-4 pt-5 pb-0 sm:pr-6 lg:pr-8",children:(0,i.jsx)("div",{className:"mx-auto flex max-w-2xl items-center justify-between gap-x-8 lg:mx-0 lg:max-w-none",children:(0,i.jsxs)("div",{className:"flex items-center gap-x-4",children:[(0,i.jsx)("div",{className:"bg-black rounded-lg p-2",children:(null==J?void 0:J.type_id)=="model"?(0,i.jsx)(D,{className:"w-6 h-6 text-gray-300"}):(null==J?void 0:J.type_id)=="datatype"?(0,i.jsx)(M,{className:"w-6 h-6 text-gray-300"}):(null==J?void 0:J.type_id)=="listener"?(0,i.jsx)(V,{className:"w-6 h-6 text-gray-300"}):(null==J?void 0:J.type_id)=="metric"?(0,i.jsx)(R,{className:"w-6 h-6 text-gray-300"}):(null==J?void 0:J.type_id)=="serializer"?(0,i.jsx)(B,{className:"w-6 h-6 text-gray-300"}):(null==J?void 0:J.type_id)=="encoder"?(0,i.jsx)(T,{className:"w-6 h-6 text-gray-300"}):(null==J?void 0:J.type_id)=="vector_index"?(0,i.jsx)(z,{className:"w-6 h-6 text-gray-300"}):(0,i.jsx)(S,{className:"w-6 h-6 text-gray-300"})}),(0,i.jsx)("h1",{children:(0,i.jsxs)("div",{className:"text-base font-semibold leading-6 text-gray-900",children:[W(null==J?void 0:J.type_id)," ",(0,i.jsx)(Z.Z,{label:"",popoverheader:W(null==J?void 0:J.type_id),popovercontent:(0,i.jsx)("p",{children:"datatype"===(t=null==J?void 0:J.type_id)?"Datatype allows users to create and encode custom datatypes by providing their own serializers.":"listener"===t?'A listener is a class that "deploys" a model to "listen" for incoming data, calculate predictions on this data, and then saves them back to the database.':"vector_index"===t?"A vector_index is the necessary combination of Component instances needed to create end-to-end vector-search functionality.":"stack"===t?"A stack is a way to connect diverse and interoperating sets of functionality.":"application"===t?"An application is a way to create dynamic AI applications easily.":"encoder"===t?"An encoder is a class responsible for converting special data types into bytes and back.":"model"===t?"A model is a class that wraps a classical AI model and additionally provides tools required for pre- and post-processing.":"serializer"===t?"Some component objects require special serialization protocols to become saveable in the superduperdb world.":"metric"===t?"A metric serves the purpose of evaluating the quality of Component instances, particularly Model, Listener, and VectorIndex instances.":'To learn more about this component, click on "See more."'})})]})})]})})}),(0,i.jsxs)("div",{className:" bg-white px-4 py-5 sm:px-6",children:[(0,i.jsx)("div",{className:"-ml-4 -mt-4 flex flex-wrap items-center justify-between sm:flex-nowrap border-b border-gray-200",children:(0,i.jsx)("div",{className:"ml-4 mt-4 flex-shrink-0"})}),(0,i.jsx)("ul",{role:"list",className:"divide-y divide-red/5",children:J.payload.map(e=>(0,i.jsxs)("li",{className:"relative flex items-center space-x-4 py-4",children:[(0,i.jsxs)("div",{className:"min-w-0 flex-auto",children:[(0,i.jsxs)("div",{className:"flex items-center gap-x-3",children:[(0,i.jsx)("div",{className:function(){for(var e=arguments.length,t=Array(e),n=0;n{s((0,A.t)(e))},children:["Show More"," ",(0,i.jsx)(v.Z,{className:"ml-2 -mr-0.5 h-5 w-5 flex-none text-gray-400","aria-hidden":"true"})]})}),(0,i.jsxs)(_.ue,{className:"overflow-auto w-[800px] sm:w-[800px] sm:max-w-none",children:[(0,i.jsxs)(_.Tu,{children:[(0,i.jsx)("div",{className:"flex justify-between items-center",children:(0,i.jsx)(_.bC,{children:(0,i.jsxs)("div",{children:[(0,i.jsxs)("h1",{className:"text-lg font-semibold leading-6 text-gray-900",children:[e.type_id,"/",e.identifier]}),(0,i.jsxs)("p",{className:"text-sm text-gray-600",children:[" ","type_id: ",J.type_id,", identifier:"," ",e.identifier]})]})})}),(0,i.jsx)("br",{})]}),(0,i.jsx)("div",{className:"grid gap-4 py-4 overflow-visible",children:(0,i.jsx)(b.Z,{data:e})}),(0,i.jsxs)(_.FF,{children:[(0,i.jsx)("a",{href:"/webui/add-application?type_id=".concat(e.type_id,"&identifier=").concat(e.identifier,"\n "),children:(0,i.jsxs)(y.z,{className:"px-8 mt-6",variant:"outline",children:["Edit ",e.identifier]})}),(0,i.jsxs)(y.z,{variant:"destructive",className:"px-8 mt-6",onClick:()=>{l({type_id:e.type_id,identifier:e.identifier,version:e.version||""}),h(!0)},children:["Delete ",e.identifier]})]})]}),(0,i.jsxs)(L.aR,{open:p,children:[(0,i.jsx)(L.vW,{}),(0,i.jsxs)(L._T,{children:[(0,i.jsxs)(L.fY,{children:[(0,i.jsxs)(L.f$,{children:["Are you absolutely sure to delete"," ",null==o?void 0:o.identifier,"?"]}),(0,i.jsxs)(L.yT,{children:["This action cannot be undone. This will permanently delete your component with identifier"," ",(0,i.jsxs)("strong",{children:[null==o?void 0:o.identifier," "]})," and remove your data. Be aware!"]}),(0,i.jsx)("br",{}),(0,i.jsxs)("div",{className:"grid w-full max-w-sm items-center gap-1.5",children:[(0,i.jsxs)(N._,{htmlFor:"deployment-name",children:["Type the identifier:"," ",(0,i.jsx)("strong",{children:null==o?void 0:o.identifier})]}),(0,i.jsx)(C.I,{type:"text",id:"deployment-name",placeholder:"Type the identifier",value:P,onChange:F,className:"border border-gray-300 rounded-md p-2"})]})]}),(0,i.jsxs)(L.xo,{children:[(0,i.jsx)(L.le,{onClick:()=>h(!1),children:"Cancel"}),(0,i.jsxs)(L.OL,{onClick:()=>{G(o)},children:["Delete ",null==o?void 0:o.identifier]})]})]})]}),(0,i.jsx)(L.aR,{open:x,children:(0,i.jsx)(L._T,{children:(0,i.jsxs)(L.fY,{children:[(0,i.jsxs)(L.f$,{children:["Deleting"," ",(0,i.jsx)("strong",{children:null==o?void 0:o.identifier})," "]}),(0,i.jsx)(L.yT,{children:"This initiates a delete component process that may take some time. Please wait patiently. You'll be redirected to the show component page once it's complete."}),(0,i.jsx)("br",{}),(0,i.jsx)(k.O,{})]})})}),(0,i.jsx)(L.aR,{open:j,children:(0,i.jsxs)(L._T,{children:[(0,i.jsxs)(L.fY,{children:[(0,i.jsxs)(L.f$,{children:["Deleting"," ",(0,i.jsx)("strong",{children:null==o?void 0:o.identifier})," ","failed..."]}),(0,i.jsxs)(L.yT,{children:["Something went wrong while deleting the"," ",(0,i.jsx)("strong",{children:null==o?void 0:o.identifier}),". Please try again."]})]}),(0,i.jsxs)(L.xo,{children:[(0,i.jsx)(L.le,{onClick:()=>{g(!1),f(!1)},children:"Cancel"}),(0,i.jsx)(L.OL,{onClick:()=>{f(!0),g(!1),G(o)},children:"Retry Now"})]})]})})]})]},e.id))})]})]}),(0,i.jsx)(E.B,{orientation:"horizontal"})]})})}function S(e){return(0,i.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,i.jsx)("rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2"}),(0,i.jsx)("rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2"}),(0,i.jsx)("line",{x1:"6",x2:"6.01",y1:"6",y2:"6"}),(0,i.jsx)("line",{x1:"6",x2:"6.01",y1:"18",y2:"18"})]})}function T(e){return(0,i.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,i.jsx)("polyline",{points:"16 18 22 12 16 6"}),(0,i.jsx)("polyline",{points:"8 6 2 12 8 18"})]})}function R(e){return(0,i.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,i.jsx)("path",{d:"m12 14 4-4"}),(0,i.jsx)("path",{d:"M3.34 19a10 10 0 1 1 17.32 0"})]})}function B(e){return(0,i.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,i.jsx)("line",{x1:"12",x2:"12",y1:"2",y2:"6"}),(0,i.jsx)("line",{x1:"12",x2:"12",y1:"18",y2:"22"}),(0,i.jsx)("line",{x1:"4.93",x2:"7.76",y1:"4.93",y2:"7.76"}),(0,i.jsx)("line",{x1:"16.24",x2:"19.07",y1:"16.24",y2:"19.07"}),(0,i.jsx)("line",{x1:"2",x2:"6",y1:"12",y2:"12"}),(0,i.jsx)("line",{x1:"18",x2:"22",y1:"12",y2:"12"}),(0,i.jsx)("line",{x1:"4.93",x2:"7.76",y1:"19.07",y2:"16.24"}),(0,i.jsx)("line",{x1:"16.24",x2:"19.07",y1:"7.76",y2:"4.93"})]})}function M(e){return(0,i.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,i.jsx)("polyline",{points:"4 7 4 4 20 4 20 7"}),(0,i.jsx)("line",{x1:"9",x2:"15",y1:"20",y2:"20"}),(0,i.jsx)("line",{x1:"12",x2:"12",y1:"4",y2:"20"})]})}function z(e){return(0,i.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,i.jsx)("ellipse",{cx:"12",cy:"5",rx:"9",ry:"3"}),(0,i.jsx)("path",{d:"M3 5V19A9 3 0 0 0 21 19V5"}),(0,i.jsx)("path",{d:"M3 12A9 3 0 0 0 21 12"})]})}function V(e){return(0,i.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,i.jsx)("path",{d:"M6 8.5a6.5 6.5 0 1 1 13 0c0 6-6 6-6 10a3.5 3.5 0 1 1-7 0"}),(0,i.jsx)("path",{d:"M15 8.5a2.5 2.5 0 0 0-5 0v1a2 2 0 1 1 0 4"})]})}function D(e){return(0,i.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,i.jsx)("path",{d:"M12 8V4H8"}),(0,i.jsx)("rect",{width:"16",height:"12",x:"4",y:"8",rx:"2"}),(0,i.jsx)("path",{d:"M2 14h2"}),(0,i.jsx)("path",{d:"M20 14h2"}),(0,i.jsx)("path",{d:"M15 13v2"}),(0,i.jsx)("path",{d:"M9 13v2"})]})}var O=n(74859);function F(e){return e.filter(e=>"application"===e.type_id)}function W(){(0,u.v9)(e=>e.environment.environmentLoadedValues);let e=(0,u.v9)(e=>{var t;return null==e?void 0:null===(t=e.userInfo)||void 0===t?void 0:t.userInfoLoadedValues}),t=async t=>{try{c.ZP.loading("Fetching latest data",{id:"fetching",position:"bottom-center"});let t=await a.Z.get("".concat("".concat("http://localhost:8000","/db/show")),{headers:{Accept:"application/json",Authorization:(0,m.Z)(e),superduper_reverse_proxy:"http://localhost:8000"}});return console.log("/db/show/ API data:",t.data),c.ZP.dismiss("fetching"),t.data}catch(e){c.ZP.dismiss("fetching"),console.error("Error fetching Services API data")}},[n,o]=(0,r.useState)(null),[p,h]=(0,r.useState)(null),f=e=>{let t={};return e.forEach((e,n)=>{let i=e.type_id;t[i]||(t[i]={type_id:i,payload:[]}),t[i].payload.push({id:n+1,identifier:e.identifier,type_id:e.type_id,status:"online",timestamp:""})}),Object.values(t)},{data:j,error:v}=(0,d.ZP)("".concat("".concat("http://localhost:8000","/db/show")),t,{refreshInterval:6e4,shouldRetryOnError:!1});(0,r.useEffect)(()=>{j?(o(f(j.filter(e=>"application"!==e.type_id))),h(f(F(j)))):(o(f(F([]))),h(f(F([]))))},[j,v]);let[g,y]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{if(p&&0===p.length){let e=setTimeout(()=>{y(!0)},1e3);return()=>clearTimeout(e)}y(!1)},[p]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(x.Z,{title:O.env.NEXT_PUBLIC_RENAME_APPLICATION||"Applications",description:"View all your agent applications running, or create a new one.",buttonText:"Add Application",buttonLink:"/webui/add-application"}),(0,i.jsx)("br",{}),(0,i.jsxs)("div",{children:[p?p.length>0?p.map((e,t)=>(0,i.jsx)(P,{data:e},t)):!g&&(0,i.jsx)(s.Z,{}):(0,i.jsx)(s.Z,{}),g&&(0,i.jsx)(l.Z,{header:"No Application Found",description:"Get started by adding a new application.",createDeployment:"hide"})]}),(0,i.jsx)("br",{}),(0,i.jsx)("br",{}),(0,i.jsx)("br",{}),(0,i.jsx)("br",{})]})}var G=n(45246);let{getReasonPhrase:J}=n(70194);function Y(e){let{application:t}=e;(0,u.v9)(e=>e.environment.environmentLoadedValues);let n=(0,u.v9)(e=>{var t;return null==e?void 0:null===(t=e.userInfo)||void 0===t?void 0:t.userInfoLoadedValues}),r=async e=>{try{return(await a.Z.get(e,{headers:{Accept:"application/json",Authorization:(0,m.Z)(n),superduper_reverse_proxy:"http://localhost:8000"}})).data}catch(e){var t,i;throw{status:(null===(t=e.response)||void 0===t?void 0:t.status)||500,message:(null===(i=e.response)||void 0===i?void 0:i.data)||"An unexpected error occurred"}}},{data:o,error:l}=(0,d.ZP)("".concat("".concat("http://localhost:8000","/health")),r,{refreshInterval:3e4,shouldRetryOnError:!1});if(!o&&!l)return(0,i.jsx)(s.Z,{times:6});if(l){console.error("Error Details:",l);let e=l.status||404,t=J(e)||"Service Unavailable";return(0,i.jsx)(G.Z,{header:"REST API",shortMessage:t,status:e,description:"Status: ".concat(e,", Message: ").concat("string"==typeof l.message?l.message:JSON.stringify(l.message))})}return(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(i.Fragment,{children:t?(0,i.jsx)(W,{}):(0,i.jsx)(j,{})})})}},56146:function(e,t,n){n.d(t,{AG:function(){return h},At:function(){return p},Jb:function(){return d},aG:function(){return l},bg:function(){return x},gN:function(){return c}});var i=n(27573),r=n(7653),s=n(85688),a=n(8828),o=n(18580);let l=r.forwardRef((e,t)=>{let{...n}=e;return(0,i.jsx)("nav",{ref:t,"aria-label":"breadcrumb",...n})});l.displayName="Breadcrumb";let d=r.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,i.jsx)("ol",{ref:t,className:(0,o.cn)("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",n),...r})});d.displayName="BreadcrumbList";let c=r.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,i.jsx)("li",{ref:t,className:(0,o.cn)("inline-flex items-center gap-1.5",n),...r})});c.displayName="BreadcrumbItem";let p=r.forwardRef((e,t)=>{let{asChild:n,className:r,...s}=e,l=n?a.g7:"a";return(0,i.jsx)(l,{ref:t,className:(0,o.cn)("transition-colors hover:text-foreground",r),...s})});p.displayName="BreadcrumbLink";let h=r.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,i.jsx)("span",{ref:t,role:"link","aria-disabled":"true","aria-current":"page",className:(0,o.cn)("font-normal text-foreground",n),...r})});h.displayName="BreadcrumbPage";let x=e=>{let{children:t,className:n,...r}=e;return(0,i.jsx)("li",{role:"presentation","aria-hidden":"true",className:(0,o.cn)("[&>svg]:size-3.5",n),...r,children:null!=t?t:(0,i.jsx)(s.XCv,{})})};x.displayName="BreadcrumbSeparator"}}]); \ No newline at end of file diff --git a/superduper/rest/out/_next/static/chunks/2698-34eb5a522bcd965e.js b/superduper/rest/out/_next/static/chunks/2698-34eb5a522bcd965e.js deleted file mode 100644 index 9eb671484..000000000 --- a/superduper/rest/out/_next/static/chunks/2698-34eb5a522bcd965e.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2698],{67430:function(e,t,s){s.d(t,{Z:function(){return E}});var n=s(27573),a=s(7653),r=s(64544),l=s(45034),i=s(97370),o=s(903),d=s(12900),c=s(13908),u=s(93296),m=s(412),x=s(81695),h=s(98348),f=s(85688),p=s(88623),v=s(38983),g=s(87354),j=s(18580),w=s(36531),y=s(42502);let N=[{label:"Off",value:0},{label:"30s",value:3e4},{label:"1m",value:6e4},{label:"2m",value:12e4},{label:"5m",value:3e5},{label:"10m",value:6e5}];function b(){let e=(0,x.useRouter)(),t=(0,x.useSearchParams)(),[s,r]=(0,a.useState)(N[0]),[l,i]=(0,a.useState)(!1);(0,a.useEffect)(()=>{let e=t.get("query");if(e){let t=N.find(t=>t.label.toLowerCase()===e.toLowerCase());t&&r(t)}},[t]),(0,a.useEffect)(()=>{if(s.value>0){let t=setInterval(()=>{e.push("/webui?query=".concat(s.label),void 0,{shallow:!0}),window.location.reload()},s.value);return()=>clearInterval(t)}},[s,e]);let o=t=>{r(t),i(!1),e.push("/webui?query=".concat(t.label),void 0,{shallow:!0})};return(0,n.jsxs)(y.h_,{open:l,onOpenChange:i,children:[(0,n.jsx)(y.$F,{asChild:!0,children:(0,n.jsxs)(w.z,{variant:"outline",role:"combobox","aria-expanded":l,className:"w-[150px] justify-between bg-background text-sm font-normal",children:[(0,n.jsx)(p.Z,{className:"mr-2 h-4 w-4"}),s.label,(0,n.jsx)(v.Z,{className:"ml-auto h-4 w-4 shrink-0 opacity-50"})]})}),(0,n.jsx)(y.AW,{className:"w-[150px]",children:N.map(e=>(0,n.jsxs)(y.Xi,{onSelect:()=>o(e),children:[(0,n.jsx)(g.Z,{className:(0,j.cn)("mr-2 h-4 w-4",s.value===e.value?"opacity-100":"opacity-0")}),e.label]},e.value))})]})}var C=s(64520),L=s(72513),k=s(1930),A=s(97747),_=s(87191),S=s(24776),R=s(7109);function B(){for(var e=arguments.length,t=Array(e),s=0;se.environment.environmentLoadedValues);let[s,p]=(0,a.useState)("Something went wrong while creating the deployment. Please try again later."),v=(0,m.v9)(e=>{var t;return null==e?void 0:null===(t=e.userInfo)||void 0===t?void 0:t.userInfoLoadedValues}),[g,j]=(0,a.useState)(!1),[w,y]=(0,a.useState)(!1),[N,E]=(0,a.useState)(!1),[P,Z]=(0,a.useState)(!1),T=(0,m.v9)(e=>e.deploymentName.deploymentNameLoadedValues.name),I=(0,m.v9)(e=>e.deploymentAPI.deploymentAPILoadedValues),O=(null==I?void 0:null===(e=I.status)||void 0===e?void 0:e.phase)||"Unknown",D=(null==I?void 0:null===(t=I.status)||void 0===t?void 0:t.message)||"",M=(null==I?void 0:I.name)||T,U=(0,x.useRouter)(),[z,F]=(0,a.useState)(""),[V,X]=(0,a.useState)(!1),Y=async()=>{try{if(M!==z){console.error("No deployment name found"),u.ZP.error("Your typed name is not matched with the deployment name. Type it carefully.",{id:"delete-deployment"});return}y(!0),j(!1);let e=await c.Z.delete("".concat("".concat("http://localhost:8090","/deployments/").concat(T)),{headers:{Accept:"application/json",Authorization:(0,R.Z)(v),superduper_reverse_proxy:"http://localhost:8090"}});console.log("Deployments API data:",e.data),200===e.status?(console.log("Deployment deleted successfully"),U.push("/webui?deleted=true"),u.ZP.success("Deployment deleted process is running..."),window.location.assign("/webui?deleted=true")):(console.error("Error deleting deployment:",e.data),u.ZP.error("Error deleting deployment",{id:"delete-deployment"}),y(!1),E(!0),p(null==e?void 0:e.data))}catch(t){var e;console.error("Error deleting deployment:",t),y(!1),p((null===(e=t.response)||void 0===e?void 0:e.data)||t.message),E(!0)}};return(0,n.jsxs)(n.Fragment,{children:[M&&(0,n.jsxs)("div",{className:"pb-2",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between",children:[(0,n.jsx)("h1",{id:"message-heading",className:"text-2xl mb-2 font-semibold text-gray-900",children:"Deployment"}),(0,n.jsx)("div",{className:"mb-2 mr-4",children:(0,n.jsxs)("div",{className:"flex",children:[(0,n.jsx)("div",{children:(0,n.jsxs)("a",{href:"/webui",className:"flex items-center rounded-full bg-white p-2 text-gray-400 hover:text-gray-600 focus:outline-none focus:ring-2 focus:ring-indigo-500",children:[(0,n.jsx)("span",{className:"sr-only",children:"Reload"}),(0,n.jsx)(i.Z,{className:"h-5 w-5","aria-hidden":"true"})]})}),(0,n.jsx)(b,{})]})})]}),(0,n.jsxs)("div",{className:"flex items-center justify-between",children:[(0,n.jsx)("div",{className:"flex items-center sm:w-0 sm:flex-1",children:(0,n.jsx)("div",{className:"flex items-center gap-x-6",children:(0,n.jsx)("div",{children:(0,n.jsxs)("p",{className:"mt-1 truncate text-base text-gray-500",children:[(0,n.jsx)(d.C,{className:"text-base truncate",children:M}),D&&(0,n.jsxs)(C.aR,{children:[(0,n.jsx)(C.vW,{asChild:!0,children:(0,n.jsx)(d.C,{variant:"outline",className:"ml-2 text-base truncate",children:D.length>24?D.slice(0,24)+"... [Show More]":D})}),(0,n.jsxs)(C._T,{children:[(0,n.jsxs)(C.fY,{children:[(0,n.jsxs)(C.f$,{children:["Status of ",(0,n.jsx)("strong",{children:M})]}),(0,n.jsx)(C.yT,{children:(0,n.jsxs)(L.bZ,{children:[(0,n.jsx)(f.WCv,{className:"h-4 w-4"}),(0,n.jsx)(L.Cd,{children:"Status"}),(0,n.jsx)(L.X,{children:D})]})})]}),(0,n.jsxs)(C.xo,{children:[(0,n.jsx)(C.le,{children:"Cancel"}),(0,n.jsx)(C.OL,{children:"Continue"})]})]})]})]})})})}),(0,n.jsxs)("div",{className:"mt--6 flex items-center justify-between sm:ml-6 sm:mt-0 sm:flex-shrink-0 sm:justify-start gap-x-2",children:[!O&&(0,n.jsxs)("dd",{className:"inline-flex items-center rounded-md bg-green-50 px-2 py-1 text-xs font-medium text-green-700 ring-1 ring-inset ring-green-600/20",children:["Running",(0,n.jsx)("div",{className:"offline flex-none rounded-full p-1",children:(0,n.jsxs)("div",{role:"status",children:[(0,n.jsx)("svg",{className:"w-4 h-4 me-0 text-green-500 dark:text-green-400 flex-shrink-0","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 20 20",children:(0,n.jsx)("path",{d:"M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5Zm3.707 8.207-4 4a1 1 0 0 1-1.414 0l-2-2a1 1 0 0 1 1.414-1.414L9 10.586l3.293-3.293a1 1 0 0 1 1.414 1.414Z"})}),(0,n.jsx)("span",{className:"sr-only",children:"..."})]})})]}),O&&(null==O?void 0:O.toLowerCase())==="running"&&(0,n.jsxs)("dd",{className:"inline-flex items-center rounded-md bg-green-50 px-2 py-1 text-xs font-medium text-green-700 ring-1 ring-inset ring-green-600/20",children:["Running",(0,n.jsx)("div",{className:"offline flex-none rounded-full p-1",children:(0,n.jsxs)("div",{role:"status",children:[(0,n.jsx)("svg",{className:"w-4 h-4 me-0 text-green-500 dark:text-green-400 flex-shrink-0","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 20 20",children:(0,n.jsx)("path",{d:"M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5Zm3.707 8.207-4 4a1 1 0 0 1-1.414 0l-2-2a1 1 0 0 1 1.414-1.414L9 10.586l3.293-3.293a1 1 0 0 1 1.414 1.414Z"})}),(0,n.jsx)("span",{className:"sr-only",children:"..."})]})})]}),O&&(null==O?void 0:O.toLowerCase())==="pending"&&(0,n.jsxs)("dd",{className:"inline-flex items-center rounded-md bg-yellow-50 px-2 py-1 text-xs font-medium text-yellow-700 ring-1 ring-inset ring-yellow-600/20",children:["Pending",(0,n.jsx)("div",{className:"offline flex-none rounded-full p-1",children:(0,n.jsx)("div",{role:"status",children:(0,n.jsxs)("svg",{"aria-hidden":"true",className:"w-4 h-4 me-0 text-gray-200 animate-spin dark:text-white-600 fill-yellow-600",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),(0,n.jsx)("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]})})})]}),O&&(null==O?void 0:O.toLowerCase())==="deploying"&&(0,n.jsxs)("dd",{className:"inline-flex items-center rounded-md bg-yellow-50 px-2 py-1 text-xs font-medium text-yellow-700 ring-1 ring-inset ring-yellow-600/20",children:["Deploying",(0,n.jsx)("div",{className:"offline flex-none rounded-full p-1",children:(0,n.jsx)("div",{role:"status",children:(0,n.jsxs)("svg",{"aria-hidden":"true",className:"w-4 h-4 me-0 text-gray-200 animate-spin dark:text-white-600 fill-yellow-600",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),(0,n.jsx)("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]})})})]}),O&&(null==O?void 0:O.toLowerCase())==="failed"&&(0,n.jsxs)("dd",{className:"inline-flex items-center rounded-md bg-red-50 px-2 py-1 text-xs font-medium text-red-700 ring-1 ring-inset ring-red-600/20",children:["Failed",(0,n.jsx)("div",{className:"offline flex-none rounded-full p-1",children:(0,n.jsx)("div",{role:"status",children:(0,n.jsx)("svg",{className:"w-4 h-4 me-0 text-red-500 dark:text-red-400 flex-shrink-0","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",children:(0,n.jsx)("path",{d:"M2 12a10 10 0 1 1 20 0 10 10 0 0 1-20 0Zm7.7-3.7a1 1 0 0 0-1.4 1.4l2.3 2.3-2.3 2.3a1 1 0 1 0 1.4 1.4l2.3-2.3 2.3 2.3a1 1 0 0 0 1.4-1.4L13.4 12l2.3-2.3a1 1 0 0 0-1.4-1.4L12 10.6 9.7 8.3Z"})})})})]}),(0,n.jsxs)(r.v,{as:"div",className:"relative ml-3 inline-block text-left",children:[(0,n.jsx)("div",{children:(0,n.jsxs)(r.v.Button,{className:"-my-2 flex items-center rounded-full bg-white p-2 text-gray-400 hover:text-gray-600 focus:outline-none focus:ring-2 focus:ring-indigo-500",children:[(0,n.jsx)("span",{className:"sr-only",children:"Open options"}),(0,n.jsx)(o.Z,{className:"h-5 w-5","aria-hidden":"true"})]})}),(0,n.jsx)(l.u,{as:a.Fragment,enter:"transition ease-out duration-100",enterFrom:"transform opacity-0 scale-95",enterTo:"transform opacity-100 scale-100",leave:"transition ease-in duration-75",leaveFrom:"transform opacity-100 scale-100",leaveTo:"transform opacity-0 scale-95",children:(0,n.jsx)(r.v.Items,{className:"absolute right-0 z-10 mt-2 w-56 origin-top-right rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none",children:(0,n.jsxs)("div",{className:"py-1",children:[(0,n.jsx)(r.v.Item,{children:e=>{let{active:t}=e;return(0,n.jsx)("a",{href:"#",onClick:()=>j(!0),className:B(t?"bg-gray-100 text-gray-900":"text-gray-700","flex justify-between px-4 py-2 text-sm"),children:(0,n.jsx)("span",{children:"Delete Deployment"})})}}),(0,n.jsx)(r.v.Item,{children:e=>{let{active:t}=e;return(0,n.jsx)("div",{className:B(t?"bg-gray-100 text-gray-900":"text-gray-700","flex justify-between px-4 py-2 text-sm"),onClick:()=>X(!0),children:(0,n.jsx)("span",{children:"View Deployment in JSON"})})}}),(0,n.jsx)(r.v.Item,{children:e=>{let{active:t}=e;return(0,n.jsx)("a",{href:"mailto:support@superduper.io",className:B(t?"bg-gray-100 text-gray-900":"text-gray-700","flex justify-between px-4 py-2 text-sm"),children:(0,n.jsx)("span",{children:"Contact Support"})})}})]})})})]})]})]})]}),(0,n.jsxs)(C.aR,{open:g,children:[(0,n.jsx)(C.vW,{}),(0,n.jsxs)(C._T,{children:[(0,n.jsxs)(C.fY,{children:[(0,n.jsx)(C.f$,{children:"Are you absolutely sure?"}),(0,n.jsx)(C.yT,{children:"This action cannot be undone. This will permanently delete your deployment and remove your data. Be aware!"}),(0,n.jsx)("br",{}),(0,n.jsxs)("div",{className:"grid w-full max-w-sm items-center gap-1.5",children:[(0,n.jsxs)(A._,{htmlFor:"deployment-name",children:["Type the deployment name: ",(0,n.jsx)("strong",{children:M})]}),(0,n.jsx)(k.I,{type:"text",id:"deployment-name",placeholder:"Type the deployment name",value:z,onChange:e=>{F(e.target.value)},className:"border border-gray-300 rounded-md p-2"})]})]}),(0,n.jsxs)(C.xo,{children:[(0,n.jsx)(C.le,{onClick:()=>j(!1),children:"Cancel"}),(0,n.jsx)(C.OL,{onClick:()=>{Y()},children:"Delete Deployment"})]})]})]}),(0,n.jsx)(C.aR,{open:w,children:(0,n.jsx)(C._T,{children:(0,n.jsxs)(C.fY,{children:[(0,n.jsx)(C.f$,{children:"Delete Deployment..."}),(0,n.jsx)(C.yT,{children:"This initiates a delete deployment process that may take some time. Please wait patiently. You'll be redirected to the dashboard once it's complete."}),(0,n.jsx)("br",{}),(0,n.jsx)(h.O,{})]})})}),(0,n.jsx)(C.aR,{open:N,children:(0,n.jsxs)(C._T,{children:[(0,n.jsxs)(C.fY,{children:[(0,n.jsx)(C.f$,{children:"Delete Deployment Failed"}),(0,n.jsx)(C.yT,{children:(0,n.jsxs)(L.bZ,{variant:"destructive",children:[(0,n.jsx)(f.LPM,{className:"h-4 w-4"}),(0,n.jsx)(L.Cd,{children:"Error"}),(0,n.jsx)(L.X,{children:s})]})})]}),(0,n.jsxs)(C.xo,{children:[(0,n.jsx)(C.le,{onClick:()=>{E(!1),y(!1)},children:"Cancel"}),(0,n.jsx)(C.OL,{onClick:()=>{y(!0),E(!1),Y()},children:"Retry Now"})]})]})}),(0,n.jsx)(S.Vq,{open:V,onOpenChange:()=>X(!1),children:(0,n.jsxs)(S.cZ,{className:"sm:max-w-[768px]",children:[(0,n.jsxs)(S.fK,{children:[(0,n.jsx)(S.$N,{children:"View the Deployment"}),(0,n.jsx)(S.Be,{children:"This is the deployment data in JSON format."})]}),(0,n.jsx)(_.Z,{data:I}),(0,n.jsx)(S.cN,{})]})})]})}},78999:function(e,t,s){s.d(t,{Z:function(){return F}});var n=s(27573),a=s(7653),r=s(412),l=s(5772),i=s(22392);s(40020),s(19234),s(83346);var o=s(16800),d=s(64303),c=s(63052),u=s(36531);function m(){return(0,n.jsxs)("div",{className:"flex flex-col items-center justify-center h-[50vh] gap-4",children:[(0,n.jsx)("div",{className:"bg-red-100 dark:bg-red-900 rounded-full p-4",children:(0,n.jsx)(h,{className:"h-8 w-8 text-red-500 dark:text-red-400"})}),(0,n.jsxs)("div",{className:"text-center space-y-2",children:[(0,n.jsx)("h3",{className:"text-2xl font-bold",children:"The dashboard is not yet reachable now!"}),(0,n.jsx)("p",{className:"text-gray-500 dark:text-gray-400",children:"We couldn't load the requested resource right now. Please try again in a few moments."})]}),(0,n.jsxs)(u.z,{className:"mt-4",variant:"outline",onClick:()=>{window.location.reload()},children:[(0,n.jsx)(x,{className:"mr-2 h-4 w-4"}),"Reload"]})]})}function x(e){return(0,n.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,n.jsx)("path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"}),(0,n.jsx)("path",{d:"M21 3v5h-5"}),(0,n.jsx)("path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"}),(0,n.jsx)("path",{d:"M8 16H3v5"})]})}function h(e){return(0,n.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,n.jsx)("path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"}),(0,n.jsx)("path",{d:"M12 9v4"}),(0,n.jsx)("path",{d:"M12 17h.01"})]})}var f=s(74859);function p(e){try{var t,s,n;if(e&&(null==e?void 0:e.status)&&(null==e?void 0:null===(t=e.status)||void 0===t?void 0:t.podRefList))return null==e?void 0:null===(n=e.status)||void 0===n?void 0:null===(s=n.podRefList)||void 0===s?void 0:s.map(e=>e.name);return[]}catch(e){return[]}}var v=e=>{var t,s;let{data:l}=e,u=(0,r.v9)(e=>e.environment.environmentLoadedValues),x=(0,r.v9)(e=>e.deploymentAPI.deploymentAPILoadedValues),[h,v]=(0,a.useState)("".concat(JSON.stringify(l,null," "))),[g,j]=(0,a.useState)(p(l)||[]),[w,y]=(0,a.useState)(g[0]),[N,b]=(0,a.useState)([{label:"Last 5 minutes",value:5},{label:"Last 15 minutes",value:15},{label:"Last 30 minutes",value:30},{label:"Last 1 hour",value:60},{label:"Last 6 hours",value:360},{label:"Last 12 hours",value:720},{label:"Last 24 hours",value:1440},{label:"Last 2 days",value:2880},{label:"Last 3 days",value:4320},{label:"Last 7 days",value:10080},{label:"Last 14 days",value:20160},{label:"Last 30 days",value:43200}]),[C,L]=(0,a.useState)(N[0].value);(0,a.useEffect)(()=>{j(p(l)||[])},[l]);let k=e=>{v(e)},A=(0,a.useRef)(null),_=async()=>{try{A.current.editor.selectAll();let e=A.current.editor.getSelectedText();await navigator.clipboard.writeText(e),console.log("Text copied to clipboard:",e)}catch(e){console.error("Unable to copy text to clipboard:",e)}},[S,R]=(0,a.useState)(!1),[B,E]=(0,a.useState)(!0),P="/webui_api/dns?domain=".concat(f.env.NEXT_PUBLIC_GRAFANA_DASHBOARD||u.NEXT_PUBLIC_GRAFANA_DASHBOARD);return((0,a.useEffect)(()=>{fetch(P).then(e=>{if(console.log("Response:",e),console.log("URL:",P),!e.ok)throw Error("Network response was not ok")}).catch(()=>{E(!1)})},[]),x)?(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(d.mQ,{defaultValue:"log",className:"w-full",children:[(0,n.jsxs)(d.dr,{className:"grid w-full grid-cols-3",children:[w&&(0,n.jsx)(d.SP,{value:"log",children:"Log"}),(0,n.jsx)(d.SP,{value:"status",children:"Status"}),(0,n.jsx)(d.SP,{value:"specs",children:"Specs"})]}),w&&(0,n.jsxs)(d.nU,{value:"log",children:[(0,n.jsxs)("div",{className:"relative mt-4",children:[(0,n.jsx)("div",{className:"absolute inset-0 flex items-center","aria-hidden":"true",children:(0,n.jsx)("div",{className:"w-full border-t border-gray-300"})}),(0,n.jsx)("div",{className:"relative flex justify-start",children:(0,n.jsx)("span",{className:"bg-white pr-3 text-base font-semibold leading-6 text-gray-900",children:"Logs"})})]}),(0,n.jsxs)("div",{className:"flex gap-4",children:[(0,n.jsxs)(c.Ph,{value:w,onValueChange:e=>{y(e)},children:[(0,n.jsx)(c.i4,{className:"w-3/6 mt-4 mb-2",children:(0,n.jsx)(c.ki,{placeholder:"Select a pod for log"})}),(0,n.jsx)(c.Bw,{children:(0,n.jsxs)(c.DI,{children:[(0,n.jsx)(c.n5,{children:"Select a pod for log"}),g&&g.map((e,t)=>(0,n.jsx)(c.Ql,{value:e,children:e},t))]})})]}),(0,n.jsxs)(c.Ph,{value:C,onValueChange:e=>{L(e)},children:[(0,n.jsx)(c.i4,{className:"w-3/6 mt-4 mb-2",children:(0,n.jsx)(c.ki,{placeholder:"Select a pod for log"})}),(0,n.jsx)(c.Bw,{children:(0,n.jsxs)(c.DI,{children:[(0,n.jsx)(c.n5,{children:"Select a time"}),N.map((e,t)=>(0,n.jsx)(c.Ql,{value:e.value,children:e.label},t))]})})]})]}),(0,n.jsx)("div",{children:B&&!S?(0,n.jsx)("iframe",{title:"External Website",allowFullScreen:!0,src:"".concat(f.env.NEXT_PUBLIC_GRAFANA_DASHBOARD||u.NEXT_PUBLIC_GRAFANA_DASHBOARD,"d-solo/logs/container-logs?orgId=1&theme=dark&panelId=2&refresh=&from=now-").concat(C,"m&to=now&var-pod=").concat(w,"&var-namespace=").concat(u.NEXT_PUBLIC_GRAFANA_NAMESPACE||f.env.NEXT_PUBLIC_GRAFANA_NAMESPACE,"&var-container=&var-logs_type=&var-logs_source"),width:"100%",height:"400px",onLoad:()=>{R(!1)},onError:()=>{R(!0)},className:"mt-2",style:{overflow:"auto",borderRadius:"10px"}}):(0,n.jsx)(m,{})})]}),(0,n.jsxs)(d.nU,{value:"status",children:[(0,n.jsxs)("div",{className:"relative mt-4",children:[(0,n.jsx)("div",{className:"absolute inset-0 flex items-center","aria-hidden":"true",children:(0,n.jsx)("div",{className:"w-full border-t border-gray-300"})}),(0,n.jsx)("div",{className:"relative flex justify-start",children:(0,n.jsx)("span",{className:"bg-white pr-3 text-base font-semibold leading-6 text-gray-900",children:"Status"})})]}),(0,n.jsxs)("div",{className:"relative overflow-visible mt-4",children:[(0,n.jsx)("div",{className:"absolute bottom-8 right-5 z-50",children:(0,n.jsx)("span",{onClick:_,children:(0,n.jsx)(o.Z,{popoverheader:"Click to copy"})})}),(0,n.jsx)(i.default,{ref:A,className:"block w-full rounded-md border-2 py-1.5 text-gray-900 shadow-lg ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600",placeholder:"Placeholder Text",mode:"json",theme:"github",name:"blah2",onChange:k,fontSize:14,showPrintMargin:!0,showGutter:!0,highlightActiveLine:!0,value:"".concat(JSON.stringify(l,null," ")),setOptions:{enableBasicAutocompletion:!0,enableLiveAutocompletion:!0,enableSnippets:!0,showLineNumbers:!0,tabSize:2,useWorker:!1,wrap:!0},height:"400px",width:"100%"})]})]}),(0,n.jsxs)(d.nU,{value:"specs",children:[(0,n.jsxs)("div",{className:"relative mt-4",children:[(0,n.jsx)("div",{className:"absolute inset-0 flex items-center","aria-hidden":"true",children:(0,n.jsx)("div",{className:"w-full border-t border-gray-300"})}),(0,n.jsx)("div",{className:"relative flex justify-start",children:(0,n.jsx)("span",{className:"bg-white pr-3 text-base font-semibold leading-6 text-gray-900",children:"Specs"})})]}),(0,n.jsxs)("div",{className:"relative overflow-visible mt-4",children:[(0,n.jsx)("div",{className:"absolute bottom-8 right-5 z-50",children:(0,n.jsx)("span",{onClick:_,children:(0,n.jsx)(o.Z,{popoverheader:"Click to copy"})})}),(0,n.jsx)(i.default,{ref:A,className:"block w-full rounded-md border-2 py-1.5 text-gray-900 shadow-lg ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600",placeholder:"Placeholder Text",mode:"json",theme:"github",name:"blah2",onChange:k,fontSize:14,showPrintMargin:!0,showGutter:!0,highlightActiveLine:!0,value:"".concat(JSON.stringify((null==x?void 0:null===(t=x.spec)||void 0===t?void 0:t.serviceList)&&(null==x?void 0:null===(s=x.spec)||void 0===s?void 0:s.serviceList.filter(e=>(null==e?void 0:e.name.toLowerCase())===(null==l?void 0:l.name.toLowerCase()))),null," ")),setOptions:{enableBasicAutocompletion:!0,enableLiveAutocompletion:!0,enableSnippets:!0,showLineNumbers:!0,tabSize:2,useWorker:!1,wrap:!0},height:"400px",width:"100%"})]})]})]})}):null},g=s(70694),j=s(95042),w=s(12900),y=s(53511),N=s(3078),b=s(85688);function C(e){return(0,n.jsxs)("svg",{...e,"aria-hidden":"true",className:"w-4 h-4 me-0 text-gray-200 animate-spin dark:text-white-600 fill-yellow-600",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),(0,n.jsx)("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]})}let L={running:{bgColor:"bg-green-50",textColor:"text-green-700",ringColor:"ring-green-600/20",icon:(0,n.jsx)(function(e){return(0,n.jsx)("svg",{...e,className:"w-4 h-4 me-0 text-green-500 dark:text-green-400 flex-shrink-0","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 20 20",children:(0,n.jsx)("path",{d:"M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5Zm3.707 8.207-4 4a1 1 0 0 1-1.414 0l-2-2a1 1 0 0 1 1.414-1.414L9 10.586l3.293-3.293a1 1 0 0 1 1.414 1.414Z"})})},{}),label:"Running"},pending:{bgColor:"bg-yellow-50",textColor:"text-yellow-700",ringColor:"ring-yellow-600/20",icon:(0,n.jsx)(C,{}),label:"Pending"},unknown:{bgColor:"bg-yellow-50",textColor:"text-yellow-700",ringColor:"ring-yellow-600/20",icon:(0,n.jsx)(C,{}),label:"Unknown"},failed:{bgColor:"bg-red-50",textColor:"text-red-700",ringColor:"ring-red-600/20",icon:(0,n.jsx)(function(e){return(0,n.jsx)("svg",{...e,className:"w-4 h-4 me-0 text-red-500 dark:text-red-400 flex-shrink-0","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",children:(0,n.jsx)("path",{d:"M2 12a10 10 0 1 1 20 0 10 10 0 0 1-20 0Zm7.7-3.7a1 1 0 0 0-1.4 1.4l2.3 2.3-2.3 2.3a1 1 0 1 0 1.4 1.4l2.3-2.3 2.3 2.3a1 1 0 0 0 1.4-1.4L13.4 12l2.3-2.3a1 1 0 0 0-1.4-1.4L12 10.6 9.7 8.3Z"})})},{}),label:"Failed"}},k=e=>{let t=L[(null==e?void 0:e.toLowerCase())||"unknown"];return t?(0,n.jsxs)("dd",{className:"inline-flex items-center rounded-md ".concat(t.bgColor," px-2 py-1 text-xs font-medium ").concat(t.textColor," ring-1 ring-inset ").concat(t.ringColor),children:[t.label,(0,n.jsx)("div",{className:"offline flex-none rounded-full p-1",children:(0,n.jsx)("div",{role:"status",children:t.icon})})]}):null};var A=s(32966),_=s(6850),S=s(74859);function R(e){let{url:t}=e;return(console.log("DeploymentLink",t),t)?t.toLowerCase().includes("endpoints provisioning in progress... check back in a few minutes")?(0,n.jsxs)(u.z,{variant:"outline",disabled:!0,children:["Endpoint Provisioning",(0,n.jsx)(A.Z,{className:"ml-0.5 -mr.5 h-5 w-5","aria-hidden":"true"})]}):(0,n.jsx)("a",{href:t,target:"_blank",rel:"noopener noreferrer",children:(0,n.jsxs)(u.z,{variant:"outline",children:["Open",(0,n.jsx)(_.Z,{className:"ml-0.5 -mr.5 h-5 w-5","aria-hidden":"true"})]})}):null}let B=e=>{var t,s,a;let{deployment:r,token:l,env:i}=e;if((null==r?void 0:null===(s=r.status)||void 0===s?void 0:null===(t=s.phase)||void 0===t?void 0:t.toLowerCase())!=="running")return null;let o=null==r?void 0:null===(a=r.name)||void 0===a?void 0:a.toLowerCase(),d=[{condition:o.includes("ray"),url:S.env.NEXT_PUBLIC_RAY_DASHBOARD||i.NEXT_PUBLIC_RAY_DASHBOARD},{condition:o.includes("jupyter"),url:"".concat(S.env.NEXT_PUBLIC_JUPYTER_NOTEBOOK||i.NEXT_PUBLIC_JUPYTER_NOTEBOOK,"?superduper_token=").concat(l)},{condition:o.includes("monitoring"),url:S.env.NEXT_PUBLIC_GRAFANA_DASHBOARD||i.NEXT_PUBLIC_GRAFANA_DASHBOARD},{condition:o.includes("rest"),url:"".concat("http://localhost:8000","/rest/docs")},{condition:o.includes("apiserver"),url:S.env.NEXT_PUBLIC_APISERVER||i.NEXT_PUBLIC_APISERVER},{condition:o.includes("webui"),url:S.env.NEXT_PUBLIC_WEBUI||i.NEXT_PUBLIC_WEBUI},{condition:o.includes("proxy"),url:S.env.NEXT_PUBLIC_PROXY||i.NEXT_PUBLIC_PROXY}];return(0,n.jsx)(n.Fragment,{children:d.map((e,t)=>e.condition&&e.url&&(0,n.jsx)(R,{url:e.url},t))})},E=e=>{let{url:t,token:s}=e;return t?t.toLowerCase().includes("endpoints provisioning in progress... check back in a few minutes")?(0,n.jsxs)(u.z,{variant:"outline",disabled:!0,children:["Endpoint Provisioning",(0,n.jsx)(A.Z,{className:"ml-0.5 -mr.5 h-5 w-5","aria-hidden":"true"})]}):(0,n.jsx)(n.Fragment,{children:t&&(0,n.jsx)("a",{href:"".concat(t,"?superduper_token=").concat(s),target:"_blank",rel:"noopener noreferrer",children:(0,n.jsxs)(u.z,{variant:"outline",children:["Open",(0,n.jsx)(_.Z,{className:"ml-0.5 -mr-0.5 h-5 w-5","aria-hidden":"true"})]})})}):null};var P=e=>{var t;let{deployment:s,token:a,env:r,endpointData:l}=e,i=null==s?void 0:null===(t=s.name)||void 0===t?void 0:t.toLowerCase();return l&&null!==l.items&&void 0!==l.items?(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(E,{token:a,url:function(e,t){for(let s of e.items)if(s.serviceName.toLowerCase()===t){for(let e of s.endpoints)if(e.ingressURL&&e.protocol)return"".concat(e.protocol,"://").concat(e.ingressURL)}return null}(l,i)},i)}):null};let Z=e=>{if("object"==typeof e){if("computeClass"in e)return e.computeClass;for(let t of Object.values(e)){let e=Z(t);if(void 0!==e)return e}console.log("No computeClass found in the object:",e)}},T=(e,t)=>{var s,n;let a=null==t?void 0:null===(n=t.spec)||void 0===n?void 0:null===(s=n.serviceList)||void 0===s?void 0:s.find(t=>t.name.toLowerCase()===e.toLowerCase());return(null==a?void 0:a.spec)?Z(a.spec):void 0};function I(e){return(0,n.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,n.jsx)("path",{d:"M22 7.7c0-.6-.4-1.2-.8-1.5l-6.3-3.9a1.72 1.72 0 0 0-1.7 0l-10.3 6c-.5.2-.9.8-.9 1.4v6.6c0 .5.4 1.2.8 1.5l6.3 3.9a1.72 1.72 0 0 0 1.7 0l10.3-6c.5-.3.9-1 .9-1.5Z"}),(0,n.jsx)("path",{d:"M10 21.9V14L2.1 9.1"}),(0,n.jsx)("path",{d:"m10 14 11.9-6.9"}),(0,n.jsx)("path",{d:"M14 19.8v-8.1"}),(0,n.jsx)("path",{d:"M18 17.5V9.4"})]})}var O=s(80923);let D=()=>(0,n.jsx)("div",{className:"mx-auto max-w-7xl pr-4 pt-5 pb-0 sm:pr-6 lg:pr-8",children:(0,n.jsx)("div",{className:"mx-auto flex max-w-2xl items-center justify-between gap-x-8 lg:mx-0 lg:max-w-none",children:(0,n.jsxs)("div",{className:"flex items-center gap-x-4",children:[(0,n.jsx)("div",{className:"bg-black rounded-lg p-2",children:(0,n.jsx)(I,{className:"w-6 h-6 text-gray-300"})}),(0,n.jsxs)("h1",{className:"text-base font-semibold leading-6 text-gray-900",children:["Services",(0,n.jsx)(O.Z,{label:"",popoverheader:"",popovercontent:(0,n.jsx)("p",{children:"Services are the microservices that are running in the cluster that make superduper works!"})})]})]})})});var M=s(46346),U=s(74859);let z=function(){for(var e=arguments.length,t=Array(e),s=0;s{let e=(0,r.v9)(e=>e.environment.environmentLoadedValues),t=(0,r.v9)(e=>e.environment.environmentLoadedValues.endpointData),[s,i]=(0,a.useState)(!0),[o,d]=(0,a.useState)(0),c=(0,r.v9)(e=>{var t,s;return null==e?void 0:null===(s=e.userInfo)||void 0===s?void 0:null===(t=s.userInfoLoadedValues)||void 0===t?void 0:t.token}),m=(0,r.v9)(e=>e.chartsgroups.chartsLoadedValues),x=(0,r.v9)(e=>e.deploymentAPI.deploymentAPILoadedValues);return(0,a.useEffect)(()=>{let e=setTimeout(()=>i(!1),5e3);return()=>clearTimeout(e)},[]),(0,a.useEffect)(()=>{c&&d(e=>e+1)},[c]),m||e||c||(s?(0,n.jsx)(l.Z,{}):(0,n.jsx)(y.Z,{header:"No Services Found",message:""})),(0,n.jsxs)("div",{children:[(0,n.jsx)(D,{}),(0,n.jsxs)(M.x,{className:"max-w-7xl whitespace-nowrap",children:[m&&e&&c&&(0,n.jsx)("div",{className:"bg-white px-4 py-5 sm:px-6",children:(0,n.jsx)("ul",{role:"list",className:"divide-y divide-red/5",children:m.items.map(s=>{var r,l,i,o,d,m,h;return(0,n.jsx)(a.Fragment,{children:s.name&&(0,n.jsxs)("li",{className:"relative flex items-center space-x-4 py-4",children:[(0,n.jsxs)("div",{className:"min-w-0 flex-auto",children:[(0,n.jsxs)("div",{className:"flex items-center gap-x-3",children:[(0,n.jsx)("div",{className:z((null==s?void 0:null===(l=s.status)||void 0===l?void 0:null===(r=l.phase)||void 0===r?void 0:r.toLowerCase())==="running"?"text-green-400 bg-green-400/10":(null==s?void 0:null===(o=s.status)||void 0===o?void 0:null===(i=o.phase)||void 0===i?void 0:i.toLowerCase())==="failed"?"text-rose-400 bg-rose-400/10":"text-yellow-400 bg-yellow-400/10","flex-none rounded-full p-1"),children:(0,n.jsx)("div",{className:"h-2 w-2 rounded-full bg-current"})}),(0,n.jsx)("h2",{className:"min-w-0 text-sm font-semibold leading-6 text-gray-900",children:(0,n.jsxs)(j.J2,{children:[(0,n.jsx)(j.xo,{asChild:!0,children:(0,n.jsxs)("div",{className:"flex",children:[s.name,"\xa0\xa0",(0,n.jsx)(b.jnn,{className:"h-4 w-4 mt-1"})]})}),(0,n.jsx)(j.yk,{className:"w-80",children:(0,n.jsxs)("div",{className:"grid gap-4",children:[(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsx)("h4",{className:"font-medium leading-none",children:"Pods Status"}),(0,n.jsx)("p",{className:"text-sm text-muted-foreground",children:"See the status of the pods"})]}),(0,n.jsx)("div",{className:"grid gap-2",children:null==s?void 0:null===(m=s.status)||void 0===m?void 0:null===(d=m.podRefList)||void 0===d?void 0:d.map(e=>{var t;return(0,n.jsxs)("div",{className:"grid grid-cols-3 items-center gap-4",children:[(0,n.jsx)(w.C,{className:"col-span-2 h-8",children:e.name}),k(null==e?void 0:null===(t=e.lifecycle)||void 0===t?void 0:t.phase)]},e.name)})})]})})]})})]}),(0,n.jsxs)("div",{className:"mt-3 flex items-center gap-x-2.5 text-xs leading-5 text-gray-400",children:[(0,n.jsx)("p",{className:"whitespace-nowrap",children:"ComputeClass:"}),(0,n.jsx)("button",{type:"button",className:"inline-flex items-center rounded-full bg-white px-2.5 py-1 text-xs font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50",children:T(s.name,x)||"No ComputeClass"})]})]}),"true"==U.env.NEXT_PUBLIC_API_DISABLE_ENV_LINK?(0,n.jsx)(P,{deployment:s,token:c,env:e,endpointData:t}):(0,n.jsx)(B,{deployment:s,token:c,env:e,endpointData:t}),k(null==s?void 0:null===(h=s.status)||void 0===h?void 0:h.phase),(0,n.jsxs)(g.yo,{children:[(0,n.jsx)(g.aM,{asChild:!0,children:(0,n.jsxs)(u.z,{variant:"outline",children:["Show More ",(0,n.jsx)(N.Z,{})]})}),(0,n.jsxs)(g.ue,{className:"overflow-auto w-[800px] sm:w-[800px] sm:max-w-none",children:[(0,n.jsxs)(g.Tu,{children:[(0,n.jsxs)(g.bC,{children:["More info about ",s.name]}),(0,n.jsx)(g.Ei,{children:"Here is the information regarding the services."})]}),(0,n.jsx)("div",{className:"grid gap-4 py-4 overflow-visible",children:(0,n.jsx)(v,{data:s})}),(0,n.jsx)(g.FF,{children:(0,n.jsx)(g.sw,{asChild:!0,children:(0,n.jsx)(u.z,{type:"submit",children:"Close Now"})})})]})]})]})},s.name)})})}),(0,n.jsx)(M.B,{orientation:"horizontal"})]})]})}},72513:function(e,t,s){s.d(t,{Cd:function(){return d},X:function(){return c},bZ:function(){return o}});var n=s(27573),a=s(7653),r=s(85145),l=s(18580);let i=(0,r.j)("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),o=a.forwardRef((e,t)=>{let{className:s,variant:a,...r}=e;return(0,n.jsx)("div",{ref:t,role:"alert",className:(0,l.cn)(i({variant:a}),s),...r})});o.displayName="Alert";let d=a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,n.jsx)("h5",{ref:t,className:(0,l.cn)("mb-1 font-medium leading-none tracking-tight",s),...a})});d.displayName="AlertTitle";let c=a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,n.jsx)("div",{ref:t,className:(0,l.cn)("text-sm [&_p]:leading-relaxed",s),...a})});c.displayName="AlertDescription"},86288:function(e,t,s){s.d(t,{Ol:function(){return i},SZ:function(){return d},Zb:function(){return l},aY:function(){return c},eW:function(){return u},ll:function(){return o}});var n=s(27573),a=s(7653),r=s(18580);let l=a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,n.jsx)("div",{ref:t,className:(0,r.cn)("rounded-xl border bg-card text-card-foreground shadow",s),...a})});l.displayName="Card";let i=a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,n.jsx)("div",{ref:t,className:(0,r.cn)("flex flex-col space-y-1.5 p-6",s),...a})});i.displayName="CardHeader";let o=a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,n.jsx)("h3",{ref:t,className:(0,r.cn)("font-semibold leading-none tracking-tight",s),...a})});o.displayName="CardTitle";let d=a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,n.jsx)("p",{ref:t,className:(0,r.cn)("text-sm text-muted-foreground",s),...a})});d.displayName="CardDescription";let c=a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,n.jsx)("div",{ref:t,className:(0,r.cn)("p-6 pt-0",s),...a})});c.displayName="CardContent";let u=a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,n.jsx)("div",{ref:t,className:(0,r.cn)("flex items-center p-6 pt-0",s),...a})});u.displayName="CardFooter"},42502:function(e,t,s){s.d(t,{$F:function(){return d},AW:function(){return u},Xi:function(){return m},_x:function(){return c},h_:function(){return o},qB:function(){return x}});var n=s(27573),a=s(7653),r=s(49002),l=s(85688),i=s(18580);let o=r.fC,d=r.xz;r.ZA,r.Uv,r.Tr;let c=r.Ee;a.forwardRef((e,t)=>{let{className:s,inset:a,children:o,...d}=e;return(0,n.jsxs)(r.fF,{ref:t,className:(0,i.cn)("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",a&&"pl-8",s),...d,children:[o,(0,n.jsx)(l.XCv,{className:"ml-auto h-4 w-4"})]})}).displayName=r.fF.displayName,a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,n.jsx)(r.tu,{ref:t,className:(0,i.cn)("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",s),...a})}).displayName=r.tu.displayName;let u=a.forwardRef((e,t)=>{let{className:s,sideOffset:a=4,...l}=e;return(0,n.jsx)(r.Uv,{children:(0,n.jsx)(r.VY,{ref:t,sideOffset:a,className:(0,i.cn)("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",s),...l})})});u.displayName=r.VY.displayName;let m=a.forwardRef((e,t)=>{let{className:s,inset:a,...l}=e;return(0,n.jsx)(r.ck,{ref:t,className:(0,i.cn)("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",a&&"pl-8",s),...l})});m.displayName=r.ck.displayName,a.forwardRef((e,t)=>{let{className:s,children:a,checked:o,...d}=e;return(0,n.jsxs)(r.oC,{ref:t,className:(0,i.cn)("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",s),checked:o,...d,children:[(0,n.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,n.jsx)(r.wU,{children:(0,n.jsx)(l.nQG,{className:"h-4 w-4"})})}),a]})}).displayName=r.oC.displayName;let x=a.forwardRef((e,t)=>{let{className:s,children:a,...o}=e;return(0,n.jsxs)(r.Rk,{ref:t,className:(0,i.cn)("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",s),...o,children:[(0,n.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,n.jsx)(r.wU,{children:(0,n.jsx)(l.jXb,{className:"h-4 w-4 fill-current"})})}),a]})});x.displayName=r.Rk.displayName,a.forwardRef((e,t)=>{let{className:s,inset:a,...l}=e;return(0,n.jsx)(r.__,{ref:t,className:(0,i.cn)("px-2 py-1.5 text-sm font-semibold",a&&"pl-8",s),...l})}).displayName=r.__.displayName,a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,n.jsx)(r.Z0,{ref:t,className:(0,i.cn)("-mx-1 my-1 h-px bg-muted",s),...a})}).displayName=r.Z0.displayName},95042:function(e,t,s){s.d(t,{J2:function(){return i},xo:function(){return o},yk:function(){return d}});var n=s(27573),a=s(7653),r=s(61284),l=s(18580);let i=r.fC,o=r.xz;r.ee;let d=a.forwardRef((e,t)=>{let{className:s,align:a="center",sideOffset:i=4,...o}=e;return(0,n.jsx)(r.h_,{children:(0,n.jsx)(r.VY,{ref:t,align:a,sideOffset:i,className:(0,l.cn)("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",s),...o})})});d.displayName=r.VY.displayName},63052:function(e,t,s){s.d(t,{Bw:function(){return h},DI:function(){return d},Ph:function(){return o},Ql:function(){return p},i4:function(){return u},ki:function(){return c},n5:function(){return f}});var n=s(27573),a=s(7653),r=s(85688),l=s(66240),i=s(18580);let o=l.fC,d=l.ZA,c=l.B4,u=a.forwardRef((e,t)=>{let{className:s,children:a,...o}=e;return(0,n.jsxs)(l.xz,{ref:t,className:(0,i.cn)("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",s),...o,children:[a,(0,n.jsx)(l.JO,{asChild:!0,children:(0,n.jsx)(r.jnn,{className:"h-4 w-4 opacity-50"})})]})});u.displayName=l.xz.displayName;let m=a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,n.jsx)(l.u_,{ref:t,className:(0,i.cn)("flex cursor-default items-center justify-center py-1",s),...a,children:(0,n.jsx)(r.g8U,{})})});m.displayName=l.u_.displayName;let x=a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,n.jsx)(l.$G,{ref:t,className:(0,i.cn)("flex cursor-default items-center justify-center py-1",s),...a,children:(0,n.jsx)(r.v4q,{})})});x.displayName=l.$G.displayName;let h=a.forwardRef((e,t)=>{let{className:s,children:a,position:r="popper",...o}=e;return(0,n.jsx)(l.h_,{children:(0,n.jsxs)(l.VY,{ref:t,className:(0,i.cn)("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2","popper"===r&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",s),position:r,...o,children:[(0,n.jsx)(m,{}),(0,n.jsx)(l.l_,{className:(0,i.cn)("p-1","popper"===r&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:a}),(0,n.jsx)(x,{})]})})});h.displayName=l.VY.displayName;let f=a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,n.jsx)(l.__,{ref:t,className:(0,i.cn)("px-2 py-1.5 text-sm font-semibold",s),...a})});f.displayName=l.__.displayName;let p=a.forwardRef((e,t)=>{let{className:s,children:a,...o}=e;return(0,n.jsxs)(l.ck,{ref:t,className:(0,i.cn)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",s),...o,children:[(0,n.jsx)("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,n.jsx)(l.wU,{children:(0,n.jsx)(r.nQG,{className:"h-4 w-4"})})}),(0,n.jsx)(l.eT,{children:a})]})});p.displayName=l.ck.displayName,a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,n.jsx)(l.Z0,{ref:t,className:(0,i.cn)("-mx-1 my-1 h-px bg-muted",s),...a})}).displayName=l.Z0.displayName},70694:function(e,t,s){s.d(t,{Ei:function(){return j},FF:function(){return v},Tu:function(){return p},aM:function(){return c},bC:function(){return g},sw:function(){return u},ue:function(){return f},yo:function(){return d}});var n=s(27573),a=s(7653),r=s(67905),l=s(85145),i=s(10269),o=s(18580);let d=r.fC,c=r.xz,u=r.x8,m=r.h_,x=a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,n.jsx)(r.aV,{className:(0,o.cn)("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",s),...a,ref:t})});x.displayName=r.aV.displayName;let h=(0,l.j)("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),f=a.forwardRef((e,t)=>{let{side:s="right",className:a,children:l,...d}=e;return(0,n.jsxs)(m,{children:[(0,n.jsx)(x,{}),(0,n.jsxs)(r.VY,{ref:t,className:(0,o.cn)(h({side:s}),a),...d,children:[l,(0,n.jsxs)(r.x8,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[(0,n.jsx)(i.Z,{className:"h-4 w-4"}),(0,n.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})});f.displayName=r.VY.displayName;let p=e=>{let{className:t,...s}=e;return(0,n.jsx)("div",{className:(0,o.cn)("flex flex-col space-y-2 text-center sm:text-left",t),...s})};p.displayName="SheetHeader";let v=e=>{let{className:t,...s}=e;return(0,n.jsx)("div",{className:(0,o.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...s})};v.displayName="SheetFooter";let g=a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,n.jsx)(r.Dx,{ref:t,className:(0,o.cn)("text-lg font-semibold text-foreground",s),...a})});g.displayName=r.Dx.displayName;let j=a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,n.jsx)(r.dk,{ref:t,className:(0,o.cn)("text-sm text-muted-foreground",s),...a})});j.displayName=r.dk.displayName},87191:function(e,t,s){s.d(t,{Z:function(){return d}});var n=s(27573),a=s(7653),r=s(22392);s(40020),s(19234),s(83346);var l=s(412),i=s(24017),o=s(93296);function d(e){let{data:t,height:s="300px"}=e,d=(0,l.I0)(),[c,u]=(0,a.useState)(JSON.stringify(t,null," "));return(0,a.useRef)(null),(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(r.default,{className:"block w-full rounded-md border-2 py-1.5 text-gray-900 shadow-lg ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600",placeholder:"Stack result JSON here...",mode:"json",theme:"github",name:"blah2",onChange:e=>{try{u(e),d((0,i.q7)(JSON.parse(e)))}catch(e){o.ZP.error("Error updating...",{id:"stack-update-error"})}},fontSize:13,showPrintMargin:!0,showGutter:!0,highlightActiveLine:!0,value:c,setOptions:{enableBasicAutocompletion:!0,enableLiveAutocompletion:!0,enableSnippets:!0,showLineNumbers:!0,tabSize:2,useWorker:!1,wrap:!0},height:s,width:"100%"})})}},53511:function(e,t,s){s.d(t,{Z:function(){return a}});var n=s(27573);function a(e){let{header:t,message:s}=e;return(0,n.jsx)("div",{className:"flex min-h-[40vh] flex-col items-center justify-center bg-background px-4 py-12 sm:px-6 lg:px-8",children:(0,n.jsxs)("div",{className:"mx-auto max-w-md text-center",children:[(0,n.jsx)(r,{className:"mx-auto h-12 w-12 text-primary"}),(0,n.jsx)("h2",{className:"mt-4 text-xl font-bold tracking-tight text-foreground sm:text-xl",children:t||"UNKNOWN"}),(0,n.jsx)("p",{className:"mt-4 text-muted-foreground",children:s||"Status: UNKNOWN"})]})})}function r(e){return(0,n.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,n.jsx)("path",{d:"M12 20h.01"}),(0,n.jsx)("path",{d:"M8.5 16.429a5 5 0 0 1 7 0"}),(0,n.jsx)("path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69"}),(0,n.jsx)("path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523"}),(0,n.jsx)("path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643"}),(0,n.jsx)("path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764"}),(0,n.jsx)("path",{d:"m2 2 20 20"})]})}},98348:function(e,t,s){s.d(t,{O:function(){return o}});var n=s(27573),a=s(7653),r=s(2177),l=s(18580);let i=a.forwardRef((e,t)=>{let{className:s,value:a,...i}=e;return(0,n.jsx)(r.fC,{ref:t,className:(0,l.cn)("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",s),...i,children:(0,n.jsx)(r.z$,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:"translateX(-".concat(100-(a||0),"%)")}})})});function o(){let[e,t]=(0,a.useState)(0);return(0,a.useEffect)(()=>{let s=setInterval(()=>{e<95&&t(e=>e+1)},1e3);return()=>clearInterval(s)},[e,95]),(0,n.jsx)(i,{value:e,max:95,className:"w-[100%]"})}i.displayName=r.fC.displayName},34611:function(e,t,s){s.d(t,{Gi:function(){return a}});var n=s(58108);let a=e=>t=>t({type:n.a6,payload:e})},60855:function(e,t,s){s.d(t,{Bw:function(){return r},Lj:function(){return l},NB:function(){return a}});var n=s(59625);let a=e=>t=>t({type:n.qJ,payload:e}),r=e=>t=>{let s=new Set;(null==e?void 0:e.items)&&Array.isArray(e.items)&&e.items.forEach(e=>{var t,n,a;(null==e?void 0:null===(n=e.status)||void 0===n?void 0:null===(t=n.reservation)||void 0===t?void 0:t.computeClassList)&&Array.isArray(e.status.reservation.computeClassList)&&e.status.reservation.computeClassList.forEach(e=>{s.add(e)});let r=(null==e?void 0:null===(a=e.spec)||void 0===a?void 0:a.extraComputeClass)||[];Array.isArray(r)&&r.forEach(e=>{s.add(e)})});let a=Array.from(s);return a.includes("base")&&(a=["base",...Array.from(s).filter(e=>"base"!==e)]),t({type:n.Ou,payload:a})},l=e=>t=>{let s=e;return e.includes("base")&&(s=["base",...e.filter(e=>"base"!==e)]),t({type:n.Ou,payload:s})}}}]); \ No newline at end of file diff --git a/superduper/rest/out/_next/static/chunks/2895-100a9488746174c8.js b/superduper/rest/out/_next/static/chunks/2895-100a9488746174c8.js new file mode 100644 index 000000000..72c019360 --- /dev/null +++ b/superduper/rest/out/_next/static/chunks/2895-100a9488746174c8.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2895],{4867:function(e,s,t){t.d(s,{N:function(){return a}}),t(27573),t(81695),t(7653),t(412),t(50233),t(39e3),t(74531),t(74859);let a=e=>(e.displayName||e.name,e)},33597:function(e,s,t){t.d(s,{Z:function(){return _}});var a=t(27573),l=t(7653),n=t(21091),r=t(13908),i=t(93296),o=t(412),c=t(1070),d=t(80923),h=t(36531),p=t(5772),u=t(7109),x=e=>{let{fileId:s}=e;(0,o.v9)(e=>e.environment.environmentLoadedValues);let t=(0,o.v9)(e=>{var s;return null==e?void 0:null===(s=e.userInfo)||void 0===s?void 0:s.userInfoLoadedValues}),[n,i]=(0,l.useState)(null),[c,d]=(0,l.useState)(null),[x,j]=(0,l.useState)("");return((0,l.useEffect)(()=>{(async()=>{try{let e=await r.Z.get("".concat("".concat("http://localhost:8000","/db/artifact_store/get?file_id=").concat(s)),{responseType:"blob",headers:{Accept:"application/json",Authorization:(0,u.Z)(t),superduper_reverse_proxy:"http://localhost:8000"}}),a=new Blob([e.data],{type:e.headers["content-type"]}),l=window.URL.createObjectURL(a);if(i(l),d(e.headers["content-type"]),e.headers["content-type"].startsWith("text/")){let s=await new Response(e.data).text();j(s)}}catch(e){console.error("Error fetching file:",e)}})()},[s]),n)?c.startsWith("image/")?(0,a.jsx)("img",{src:n,alt:"File Preview",className:"max-w-sm"}):c.startsWith("text/")?(0,a.jsx)("pre",{className:"bg-gray-100 p-4 rounded-lg dark:bg-gray-800 whitespace-pre-wrap",children:(0,a.jsx)("code",{children:x})}):c.startsWith("audio/")?(0,a.jsxs)("audio",{controls:!0,children:[(0,a.jsx)("source",{src:n,type:c}),"Your browser does not support the audio element."]}):c.startsWith("video/")?(0,a.jsxs)("video",{controls:!0,children:[(0,a.jsx)("source",{src:n,type:c}),"Your browser does not support the video element."]}):(0,a.jsxs)("section",{className:"p-6 border-dashed border-2 border-gray-200 rounded-lg flex flex-col items-center gap-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-4",children:[(0,a.jsx)(f,{className:"h-10 w-10"}),(0,a.jsx)("div",{className:"text-sm text-gray-500",children:(0,a.jsx)("div",{className:"font-medium",children:"Uploaded Byte file"})})]}),(0,a.jsx)("a",{href:n,download:!0,className:"pl-2 pr-2",children:(0,a.jsxs)(h.z,{size:"sm",variant:"outline",children:[(0,a.jsx)(m,{className:"mr-2 h-4 w-4"}),"Download"]})})]}):(0,a.jsxs)("span",{children:["Loading Artifact...",(0,a.jsx)("br",{}),(0,a.jsx)(p.Z,{})]})};function m(e){return(0,a.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,a.jsx)("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),(0,a.jsx)("polyline",{points:"7 10 12 15 17 10"}),(0,a.jsx)("line",{x1:"12",x2:"12",y1:"15",y2:"3"})]})}function f(e){return(0,a.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,a.jsx)("path",{d:"M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"}),(0,a.jsx)("polyline",{points:"14 2 14 8 20 8"})]})}var j=t(85688),g=t(24776),v=t(86288),w=t(1930),y=t(97747);function N(e){return(0,a.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,a.jsx)("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),(0,a.jsx)("polyline",{points:"7 10 12 15 17 10"}),(0,a.jsx)("line",{x1:"12",x2:"12",y1:"15",y2:"3"})]})}function b(e){return(0,a.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,a.jsx)("path",{d:"M3 6h18"}),(0,a.jsx)("path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"}),(0,a.jsx)("path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"})]})}function k(e){return(0,a.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,a.jsx)("path",{d:"m9 18 6-6-6-6"})})}var _=function(){(0,o.v9)(e=>e.environment.environmentLoadedValues);let e=(0,o.v9)(e=>{var s;return null==e?void 0:null===(s=e.userInfo)||void 0===s?void 0:s.userInfoLoadedValues}),[s,t]=(0,l.useState)("bytes"),[p,m]=(0,l.useState)([]),[f,_]=(0,l.useState)(""),[L,C]=(0,l.useState)(!1),z=()=>{navigator.clipboard.writeText(f),C(!0),setTimeout(()=>C(!1),2e3)},F=(0,o.I0)(),Z=(0,o.v9)(e=>e.uploadFiles.uploadFilesLoadedValues||[]),D=(0,o.v9)(e=>e.uploadFiles.uploadFilesLoadedValuesSchema||[]),A=(0,o.v9)(e=>e.uploadFiles.uploadFilesLoadedValuesComponent||[]),[S,U]=(0,l.useState)(null),[V,B]=(0,l.useState)({success:!1,message:""}),I=(0,l.useRef)(null),W=async s=>{try{let t=await r.Z.get("".concat("".concat("http://localhost:8000","/db/artifact_store/get_artifact?file_id=").concat(s)),{responseType:"blob",headers:{accept:"application/json",Authorization:(0,u.Z)(e),superduper_reverse_proxy:"http://localhost:8000"}}),a=new Blob([t.data],{type:t.headers["content-type"]}),l=window.URL.createObjectURL(a),n=document.createElement("a");n.href=l,n.setAttribute("download",s),document.body.appendChild(n),n.click(),document.body.removeChild(n)}catch(e){console.error("Error downloading file:",e)}},E=async t=>{if(!t){B({success:!1,message:"Please select a file to upload."});return}B({success:!0,message:"Uploading. Please wait patiently."});let a=new FormData;a.append("raw",t,t.name);try{let t=await r.Z.put("".concat("".concat("http://localhost:8000","/db/artifact_store/put")),a,{headers:{"Content-Type":"multipart/form-data",accept:"application/json",Authorization:(0,u.Z)(e),superduper_reverse_proxy:"http://localhost:8000"}});t.data?(console.log("FILE UPLOADED",t.data),B({success:!0,message:"Successfully uploaded files"}),F((0,c.Xs)([...Z,t.data.file_id])),F((0,c.nh)([...D,{_content:{file_id:t.data.file_id,datatype:s}}])),console.log("file uploading log",t.data.file_id),F((0,c.QL)([...A,{leaf_type:"blob",type_id:"blob",cls:"Artifact",module:"superduperdb/components/datatype",dict:{file_id:t.data.file_id}}])),i.ZP.success("Artifact uploaded successfully")):B({success:!1,message:"Upload failed. Try again with proper datatype."})}catch(e){B({success:!1,message:"Error uploading file."}),console.error("Error uploading file:",e)}},R=e=>()=>{W(e)},T=e=>()=>{console.log("Deleting:",e),F((0,c.Xs)(Z.filter(s=>s!==e))),F((0,c.nh)(D.filter(s=>s._content.file_id!==e)))};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(v.Zb,{className:"w-full",children:[(0,a.jsx)(v.Ol,{className:"space-y-1",children:(0,a.jsx)(v.ll,{children:(0,a.jsx)(d.Z,{label:(0,a.jsx)("span",{className:"text-base font-semibold leading-7 text-gray-900",children:"Upload Artifacts"}),popoverheader:"",popovercontent:(0,a.jsx)("p",{children:"You can upload various artifacts, such as bytes, images, and videos, and reference them by artifact ID."})})})}),(0,a.jsx)(v.aY,{children:(0,a.jsx)("div",{className:"flex flex-col",children:(0,a.jsx)("div",{className:"col-span-4 mt-4",children:(0,a.jsx)("div",{className:"mt-2 flex justify-center rounded-lg border border-dashed border-gray-900/25 px-6 py-10",onDragOver:e=>{e.preventDefault()},onDrop:e=>{e.preventDefault();let s=e.dataTransfer.files[0];U(s),E(s)},ref:I,children:(0,a.jsxs)("div",{className:"text-center",children:[(0,a.jsx)(n.Z,{className:"mx-auto h-12 w-12 text-gray-300","aria-hidden":"true"}),(0,a.jsx)("div",{className:"mx-auto mt-2"}),(0,a.jsxs)("div",{className:"mt-4 flex text-sm leading-6 text-gray-600",children:[(0,a.jsxs)("label",{htmlFor:"file-upload",className:"relative cursor-pointer rounded-md bg-white font-semibold text-indigo-600 focus-within:outline-none focus-within:ring-2 focus-within:ring-indigo-600 focus-within:ring-offset-2 hover:text-indigo-500",children:[(0,a.jsx)("span",{children:"Upload an artifact"}),(0,a.jsx)("input",{id:"file-upload",name:"file-upload",type:"file",className:"sr-only",onChange:e=>{U(e.target.files[0]),E(e.target.files[0])}})]}),(0,a.jsx)("p",{className:"pl-1",children:"or drag and drop"})]}),(0,a.jsx)("p",{className:"text-xs leading-5 text-gray-600",children:"Max filesize is 1024MB"}),V.message&&(0,a.jsx)("p",{className:"mt-2 text-sm ".concat(V.success?"text-green-500":"text-red-500"),children:V.message})]})})})})}),(0,a.jsx)(v.eW,{className:""})]}),Z&&0!==Z.length&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"pt-2 mt-4 pb-4",children:(0,a.jsx)("label",{htmlFor:"component-type",className:"text-sm font-medium leading-6 text-gray-900",children:"Uploaded Artifacts"})}),(0,a.jsx)("div",{children:Z.map((e,s)=>(0,a.jsx)(v.Zb,{className:"mb-4",children:(0,a.jsxs)(v.Ol,{className:"flex gap-2 items-start",children:[(0,a.jsxs)("div",{className:"grid gap-0.5",children:[(0,a.jsx)(v.ll,{className:"text-sm",children:(0,a.jsx)("span",{className:"flex justify-end w-full",children:(0,a.jsx)("span",{children:e})})}),(0,a.jsx)(v.SZ,{className:"text-[#666] text-xs leading-none",children:"Refer this artifact with the reference above"})]}),(0,a.jsxs)("div",{className:"flex ml-auto gap-1.5",children:[(0,a.jsxs)(g.Vq,{children:[(0,a.jsx)(g.hg,{asChild:!0,children:(0,a.jsxs)(h.z,{size:"sm",variant:"outline",onClick:()=>{_(e)},children:["View Uploaded File"," ",(0,a.jsx)(k,{className:"ml-1 h-4 w-4"})]})}),(0,a.jsxs)(g.cZ,{className:"sm:max-w-md",children:[(0,a.jsxs)(g.fK,{children:[(0,a.jsx)(g.$N,{children:"Artifact"}),(0,a.jsx)(g.Be,{children:"Refer this artifact with the reference"})]}),(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,a.jsxs)("div",{className:"grid flex-1 gap-2",children:[(0,a.jsx)(y._,{htmlFor:"link",className:"sr-only",children:"Artifact Reference Id"}),(0,a.jsx)(w.I,{id:"link",value:"@artifact/".concat(e),readOnly:!0})]}),(0,a.jsxs)(h.z,{type:"button",size:"sm",className:"px-3",onClick:z,"aria-label":L?"Copied":"Copy",children:[(0,a.jsx)("span",{className:"sr-only",children:L?"Copied":"Copy"}),(0,a.jsx)(j.TIy,{className:"h-4 w-4"})]})]}),(0,a.jsx)(g.Be,{children:(0,a.jsx)(x,{fileId:e,className:"pb-2"})}),(0,a.jsx)(g.cN,{className:"sm:justify-start",children:(0,a.jsxs)(h.z,{size:"sm",variant:"outline",onClick:R(e),children:["Download",(0,a.jsx)(N,{className:"ml-2 w-4 h-4"})," ",(0,a.jsx)("span",{className:"sr-only",children:"Download"})]})})]})]}),(0,a.jsxs)(h.z,{size:"sm",variant:"outline",onClick:R(e),children:[(0,a.jsx)(N,{className:"w-4 h-4"})," ",(0,a.jsx)("span",{className:"sr-only",children:"Download"})]}),(0,a.jsxs)(h.z,{size:"sm",variant:"outline",onClick:T(e),children:[(0,a.jsx)(b,{className:"h-4 w-4"})," ",(0,a.jsx)("span",{className:"sr-only",children:"Delete"})]})]})]})},s))})]})]})}},1070:function(e,s,t){t.d(s,{QL:function(){return r},Xs:function(){return l},nh:function(){return n}});var a=t(30479);let l=e=>s=>s({type:a.Tj,payload:e}),n=e=>s=>s({type:a.tX,payload:e}),r=e=>s=>s({type:a.bk,payload:e})}}]); \ No newline at end of file diff --git a/superduper/rest/out/_next/static/chunks/2895-9bfa10ddb0cbee77.js b/superduper/rest/out/_next/static/chunks/2895-9bfa10ddb0cbee77.js deleted file mode 100644 index 0c1d74750..000000000 --- a/superduper/rest/out/_next/static/chunks/2895-9bfa10ddb0cbee77.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2895],{86288:function(e,s,t){t.d(s,{Ol:function(){return i},SZ:function(){return d},Zb:function(){return l},aY:function(){return c},eW:function(){return u},ll:function(){return o}});var a=t(27573),r=t(7653),n=t(18580);let l=r.forwardRef((e,s)=>{let{className:t,...r}=e;return(0,a.jsx)("div",{ref:s,className:(0,n.cn)("rounded-xl border bg-card text-card-foreground shadow",t),...r})});l.displayName="Card";let i=r.forwardRef((e,s)=>{let{className:t,...r}=e;return(0,a.jsx)("div",{ref:s,className:(0,n.cn)("flex flex-col space-y-1.5 p-6",t),...r})});i.displayName="CardHeader";let o=r.forwardRef((e,s)=>{let{className:t,...r}=e;return(0,a.jsx)("h3",{ref:s,className:(0,n.cn)("font-semibold leading-none tracking-tight",t),...r})});o.displayName="CardTitle";let d=r.forwardRef((e,s)=>{let{className:t,...r}=e;return(0,a.jsx)("p",{ref:s,className:(0,n.cn)("text-sm text-muted-foreground",t),...r})});d.displayName="CardDescription";let c=r.forwardRef((e,s)=>{let{className:t,...r}=e;return(0,a.jsx)("div",{ref:s,className:(0,n.cn)("p-6 pt-0",t),...r})});c.displayName="CardContent";let u=r.forwardRef((e,s)=>{let{className:t,...r}=e;return(0,a.jsx)("div",{ref:s,className:(0,n.cn)("flex items-center p-6 pt-0",t),...r})});u.displayName="CardFooter"},4867:function(e,s,t){t.d(s,{N:function(){return a}}),t(27573),t(81695),t(7653),t(412),t(57649),t(39e3),t(74531),t(74859);let a=e=>(e.displayName||e.name,e)},33597:function(e,s,t){t.d(s,{Z:function(){return C}});var a=t(27573),r=t(7653),n=t(21091),l=t(13908),i=t(93296),o=t(412),d=t(1070),c=t(80923),u=t(36531),p=t(5772),h=t(7109),x=e=>{let{fileId:s}=e;(0,o.v9)(e=>e.environment.environmentLoadedValues);let t=(0,o.v9)(e=>{var s;return null==e?void 0:null===(s=e.userInfo)||void 0===s?void 0:s.userInfoLoadedValues}),[n,i]=(0,r.useState)(null),[d,c]=(0,r.useState)(null),[x,j]=(0,r.useState)("");return((0,r.useEffect)(()=>{(async()=>{try{let e=await l.Z.get("".concat("".concat("http://localhost:8000","/db/artifact_store/get?file_id=").concat(s)),{responseType:"blob",headers:{Accept:"application/json",Authorization:(0,h.Z)(t),superduper_reverse_proxy:"http://localhost:8000"}}),a=new Blob([e.data],{type:e.headers["content-type"]}),r=window.URL.createObjectURL(a);if(i(r),c(e.headers["content-type"]),e.headers["content-type"].startsWith("text/")){let s=await new Response(e.data).text();j(s)}}catch(e){console.error("Error fetching file:",e)}})()},[s]),n)?d.startsWith("image/")?(0,a.jsx)("img",{src:n,alt:"File Preview",className:"max-w-sm"}):d.startsWith("text/")?(0,a.jsx)("pre",{className:"bg-gray-100 p-4 rounded-lg dark:bg-gray-800 whitespace-pre-wrap",children:(0,a.jsx)("code",{children:x})}):d.startsWith("audio/")?(0,a.jsxs)("audio",{controls:!0,children:[(0,a.jsx)("source",{src:n,type:d}),"Your browser does not support the audio element."]}):d.startsWith("video/")?(0,a.jsxs)("video",{controls:!0,children:[(0,a.jsx)("source",{src:n,type:d}),"Your browser does not support the video element."]}):(0,a.jsxs)("section",{className:"p-6 border-dashed border-2 border-gray-200 rounded-lg flex flex-col items-center gap-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-4",children:[(0,a.jsx)(f,{className:"h-10 w-10"}),(0,a.jsx)("div",{className:"text-sm text-gray-500",children:(0,a.jsx)("div",{className:"font-medium",children:"Uploaded Byte file"})})]}),(0,a.jsx)("a",{href:n,download:!0,className:"pl-2 pr-2",children:(0,a.jsxs)(u.z,{size:"sm",variant:"outline",children:[(0,a.jsx)(m,{className:"mr-2 h-4 w-4"}),"Download"]})})]}):(0,a.jsxs)("span",{children:["Loading Artifact...",(0,a.jsx)("br",{}),(0,a.jsx)(p.Z,{})]})};function m(e){return(0,a.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,a.jsx)("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),(0,a.jsx)("polyline",{points:"7 10 12 15 17 10"}),(0,a.jsx)("line",{x1:"12",x2:"12",y1:"15",y2:"3"})]})}function f(e){return(0,a.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,a.jsx)("path",{d:"M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"}),(0,a.jsx)("polyline",{points:"14 2 14 8 20 8"})]})}var j=t(85688),g=t(24776),v=t(86288),w=t(1930),y=t(97747);function N(e){return(0,a.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,a.jsx)("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),(0,a.jsx)("polyline",{points:"7 10 12 15 17 10"}),(0,a.jsx)("line",{x1:"12",x2:"12",y1:"15",y2:"3"})]})}function b(e){return(0,a.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,a.jsx)("path",{d:"M3 6h18"}),(0,a.jsx)("path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"}),(0,a.jsx)("path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"})]})}function k(e){return(0,a.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,a.jsx)("path",{d:"m9 18 6-6-6-6"})})}var C=function(){(0,o.v9)(e=>e.environment.environmentLoadedValues);let e=(0,o.v9)(e=>{var s;return null==e?void 0:null===(s=e.userInfo)||void 0===s?void 0:s.userInfoLoadedValues}),[s,t]=(0,r.useState)("bytes"),[p,m]=(0,r.useState)([]),[f,C]=(0,r.useState)(""),[_,L]=(0,r.useState)(!1),z=()=>{navigator.clipboard.writeText(f),L(!0),setTimeout(()=>L(!1),2e3)},Z=(0,o.I0)(),F=(0,o.v9)(e=>e.uploadFiles.uploadFilesLoadedValues||[]),D=(0,o.v9)(e=>e.uploadFiles.uploadFilesLoadedValuesSchema||[]),R=(0,o.v9)(e=>e.uploadFiles.uploadFilesLoadedValuesComponent||[]),[A,S]=(0,r.useState)(null),[U,V]=(0,r.useState)({success:!1,message:""}),W=(0,r.useRef)(null),B=async s=>{try{let t=await l.Z.get("".concat("".concat("http://localhost:8000","/db/artifact_store/get_artifact?file_id=").concat(s)),{responseType:"blob",headers:{accept:"application/json",Authorization:(0,h.Z)(e),superduper_reverse_proxy:"http://localhost:8000"}}),a=new Blob([t.data],{type:t.headers["content-type"]}),r=window.URL.createObjectURL(a),n=document.createElement("a");n.href=r,n.setAttribute("download",s),document.body.appendChild(n),n.click(),document.body.removeChild(n)}catch(e){console.error("Error downloading file:",e)}},I=async t=>{if(!t){V({success:!1,message:"Please select a file to upload."});return}V({success:!0,message:"Uploading. Please wait patiently."});let a=new FormData;a.append("raw",t,t.name);try{let t=await l.Z.put("".concat("".concat("http://localhost:8000","/db/artifact_store/put")),a,{headers:{"Content-Type":"multipart/form-data",accept:"application/json",Authorization:(0,h.Z)(e),superduper_reverse_proxy:"http://localhost:8000"}});t.data?(console.log("FILE UPLOADED",t.data),V({success:!0,message:"Successfully uploaded files"}),Z((0,d.Xs)([...F,t.data.file_id])),Z((0,d.nh)([...D,{_content:{file_id:t.data.file_id,datatype:s}}])),console.log("file uploading log",t.data.file_id),Z((0,d.QL)([...R,{leaf_type:"blob",type_id:"blob",cls:"Artifact",module:"superduperdb/components/datatype",dict:{file_id:t.data.file_id}}])),i.ZP.success("Artifact uploaded successfully")):V({success:!1,message:"Upload failed. Try again with proper datatype."})}catch(e){V({success:!1,message:"Error uploading file."}),console.error("Error uploading file:",e)}},E=e=>()=>{B(e)},T=e=>()=>{console.log("Deleting:",e),Z((0,d.Xs)(F.filter(s=>s!==e))),Z((0,d.nh)(D.filter(s=>s._content.file_id!==e)))};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(v.Zb,{className:"w-full",children:[(0,a.jsx)(v.Ol,{className:"space-y-1",children:(0,a.jsx)(v.ll,{children:(0,a.jsx)(c.Z,{label:(0,a.jsx)("span",{className:"text-base font-semibold leading-7 text-gray-900",children:"Upload Artifacts"}),popoverheader:"",popovercontent:(0,a.jsx)("p",{children:"You can upload various artifacts, such as bytes, images, and videos, and reference them by artifact ID."})})})}),(0,a.jsx)(v.aY,{children:(0,a.jsx)("div",{className:"flex flex-col",children:(0,a.jsx)("div",{className:"col-span-4 mt-4",children:(0,a.jsx)("div",{className:"mt-2 flex justify-center rounded-lg border border-dashed border-gray-900/25 px-6 py-10",onDragOver:e=>{e.preventDefault()},onDrop:e=>{e.preventDefault();let s=e.dataTransfer.files[0];S(s),I(s)},ref:W,children:(0,a.jsxs)("div",{className:"text-center",children:[(0,a.jsx)(n.Z,{className:"mx-auto h-12 w-12 text-gray-300","aria-hidden":"true"}),(0,a.jsx)("div",{className:"mx-auto mt-2"}),(0,a.jsxs)("div",{className:"mt-4 flex text-sm leading-6 text-gray-600",children:[(0,a.jsxs)("label",{htmlFor:"file-upload",className:"relative cursor-pointer rounded-md bg-white font-semibold text-indigo-600 focus-within:outline-none focus-within:ring-2 focus-within:ring-indigo-600 focus-within:ring-offset-2 hover:text-indigo-500",children:[(0,a.jsx)("span",{children:"Upload an artifact"}),(0,a.jsx)("input",{id:"file-upload",name:"file-upload",type:"file",className:"sr-only",onChange:e=>{S(e.target.files[0]),I(e.target.files[0])}})]}),(0,a.jsx)("p",{className:"pl-1",children:"or drag and drop"})]}),(0,a.jsx)("p",{className:"text-xs leading-5 text-gray-600",children:"Max filesize is 1024MB"}),U.message&&(0,a.jsx)("p",{className:"mt-2 text-sm ".concat(U.success?"text-green-500":"text-red-500"),children:U.message})]})})})})}),(0,a.jsx)(v.eW,{className:""})]}),F&&0!==F.length&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"pt-2 mt-4 pb-4",children:(0,a.jsx)("label",{htmlFor:"component-type",className:"text-sm font-medium leading-6 text-gray-900",children:"Uploaded Artifacts"})}),(0,a.jsx)("div",{children:F.map((e,s)=>(0,a.jsx)(v.Zb,{className:"mb-4",children:(0,a.jsxs)(v.Ol,{className:"flex gap-2 items-start",children:[(0,a.jsxs)("div",{className:"grid gap-0.5",children:[(0,a.jsx)(v.ll,{className:"text-sm",children:(0,a.jsx)("span",{className:"flex justify-end w-full",children:(0,a.jsx)("span",{children:e})})}),(0,a.jsx)(v.SZ,{className:"text-[#666] text-xs leading-none",children:"Refer this artifact with the reference above"})]}),(0,a.jsxs)("div",{className:"flex ml-auto gap-1.5",children:[(0,a.jsxs)(g.Vq,{children:[(0,a.jsx)(g.hg,{asChild:!0,children:(0,a.jsxs)(u.z,{size:"sm",variant:"outline",onClick:()=>{C(e)},children:["View Uploaded File"," ",(0,a.jsx)(k,{className:"ml-1 h-4 w-4"})]})}),(0,a.jsxs)(g.cZ,{className:"sm:max-w-md",children:[(0,a.jsxs)(g.fK,{children:[(0,a.jsx)(g.$N,{children:"Artifact"}),(0,a.jsx)(g.Be,{children:"Refer this artifact with the reference"})]}),(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,a.jsxs)("div",{className:"grid flex-1 gap-2",children:[(0,a.jsx)(y._,{htmlFor:"link",className:"sr-only",children:"Artifact Reference Id"}),(0,a.jsx)(w.I,{id:"link",value:"@artifact/".concat(e),readOnly:!0})]}),(0,a.jsxs)(u.z,{type:"button",size:"sm",className:"px-3",onClick:z,"aria-label":_?"Copied":"Copy",children:[(0,a.jsx)("span",{className:"sr-only",children:_?"Copied":"Copy"}),(0,a.jsx)(j.TIy,{className:"h-4 w-4"})]})]}),(0,a.jsx)(g.Be,{children:(0,a.jsx)(x,{fileId:e,className:"pb-2"})}),(0,a.jsx)(g.cN,{className:"sm:justify-start",children:(0,a.jsxs)(u.z,{size:"sm",variant:"outline",onClick:E(e),children:["Download",(0,a.jsx)(N,{className:"ml-2 w-4 h-4"})," ",(0,a.jsx)("span",{className:"sr-only",children:"Download"})]})})]})]}),(0,a.jsxs)(u.z,{size:"sm",variant:"outline",onClick:E(e),children:[(0,a.jsx)(N,{className:"w-4 h-4"})," ",(0,a.jsx)("span",{className:"sr-only",children:"Download"})]}),(0,a.jsxs)(u.z,{size:"sm",variant:"outline",onClick:T(e),children:[(0,a.jsx)(b,{className:"h-4 w-4"})," ",(0,a.jsx)("span",{className:"sr-only",children:"Delete"})]})]})]})},s))})]})]})}},1070:function(e,s,t){t.d(s,{QL:function(){return l},Xs:function(){return r},nh:function(){return n}});var a=t(30479);let r=e=>s=>s({type:a.Tj,payload:e}),n=e=>s=>s({type:a.tX,payload:e}),l=e=>s=>s({type:a.bk,payload:e})}}]); \ No newline at end of file diff --git a/superduper/rest/out/_next/static/chunks/3030-eb8cc9e32aedd396.js b/superduper/rest/out/_next/static/chunks/3030-eb8cc9e32aedd396.js new file mode 100644 index 000000000..9efa89be3 --- /dev/null +++ b/superduper/rest/out/_next/static/chunks/3030-eb8cc9e32aedd396.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3030],{86288:function(e,t,a){a.d(t,{Ol:function(){return d},SZ:function(){return l},Zb:function(){return o},aY:function(){return c},eW:function(){return f},ll:function(){return i}});var r=a(27573),n=a(7653),s=a(18580);let o=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,r.jsx)("div",{ref:t,className:(0,s.cn)("rounded-xl border bg-card text-card-foreground shadow",a),...n})});o.displayName="Card";let d=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,r.jsx)("div",{ref:t,className:(0,s.cn)("flex flex-col space-y-1.5 p-6",a),...n})});d.displayName="CardHeader";let i=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,r.jsx)("h3",{ref:t,className:(0,s.cn)("font-semibold leading-none tracking-tight",a),...n})});i.displayName="CardTitle";let l=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,r.jsx)("p",{ref:t,className:(0,s.cn)("text-sm text-muted-foreground",a),...n})});l.displayName="CardDescription";let c=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,r.jsx)("div",{ref:t,className:(0,s.cn)("p-6 pt-0",a),...n})});c.displayName="CardContent";let f=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,r.jsx)("div",{ref:t,className:(0,s.cn)("flex items-center p-6 pt-0",a),...n})});f.displayName="CardFooter"},24776:function(e,t,a){a.d(t,{$N:function(){return g},Be:function(){return x},Vq:function(){return i},cN:function(){return p},cZ:function(){return u},fK:function(){return m},hg:function(){return l}});var r=a(27573),n=a(7653),s=a(67905),o=a(85688),d=a(18580);let i=s.fC,l=s.xz,c=s.h_;s.x8;let f=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,r.jsx)(s.aV,{ref:t,className:(0,d.cn)("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",a),...n})});f.displayName=s.aV.displayName;let u=n.forwardRef((e,t)=>{let{className:a,children:n,...i}=e;return(0,r.jsxs)(c,{children:[(0,r.jsx)(f,{}),(0,r.jsxs)(s.VY,{ref:t,className:(0,d.cn)("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",a),...i,children:[n,(0,r.jsxs)(s.x8,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[(0,r.jsx)(o.Pxu,{className:"h-4 w-4"}),(0,r.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})});u.displayName=s.VY.displayName;let m=e=>{let{className:t,...a}=e;return(0,r.jsx)("div",{className:(0,d.cn)("flex flex-col space-y-1.5 text-center sm:text-left",t),...a})};m.displayName="DialogHeader";let p=e=>{let{className:t,...a}=e;return(0,r.jsx)("div",{className:(0,d.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...a})};p.displayName="DialogFooter";let g=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,r.jsx)(s.Dx,{ref:t,className:(0,d.cn)("text-lg font-semibold leading-none tracking-tight",a),...n})});g.displayName=s.Dx.displayName;let x=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,r.jsx)(s.dk,{ref:t,className:(0,d.cn)("text-sm text-muted-foreground",a),...n})});x.displayName=s.dk.displayName},1930:function(e,t,a){a.d(t,{I:function(){return o}});var r=a(27573),n=a(7653),s=a(18580);let o=n.forwardRef((e,t)=>{let{className:a,type:n,...o}=e;return(0,r.jsx)("input",{type:n,className:(0,s.cn)("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",a),ref:t,...o})});o.displayName="Input"},97747:function(e,t,a){a.d(t,{_:function(){return l}});var r=a(27573),n=a(7653),s=a(1001),o=a(85145),d=a(18580);let i=(0,o.j)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),l=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,r.jsx)(s.f,{ref:t,className:(0,d.cn)(i(),a),...n})});l.displayName=s.f.displayName},64303:function(e,t,a){a.d(t,{SP:function(){return l},dr:function(){return i},mQ:function(){return d},nU:function(){return c}});var r=a(27573),n=a(7653),s=a(84132),o=a(18580);let d=s.fC,i=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,r.jsx)(s.aV,{ref:t,className:(0,o.cn)("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",a),...n})});i.displayName=s.aV.displayName;let l=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,r.jsx)(s.xz,{ref:t,className:(0,o.cn)("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",a),...n})});l.displayName=s.xz.displayName;let c=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,r.jsx)(s.VY,{ref:t,className:(0,o.cn)("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",a),...n})});c.displayName=s.VY.displayName},7109:function(e,t,a){a.d(t,{Z:function(){return n}});var r=a(74859);function n(e){if(r.env.NEXT_PUBLIC_AUTO_LOGIN_EXTERNAL_SERVICES){let[e,t]=r.env.NEXT_PUBLIC_AUTO_LOGIN_EXTERNAL_SERVICES.split(","),a=e.includes("@")?e.split("@")[0]:e;return"Basic ".concat(btoa("".concat(a,":").concat(t)))}return"jwt"===r.env.AUTH_MECHANISM?"Bearer ".concat(e.token):"Basic ".concat(btoa("".concat(e.username,":").concat(e.password)))}},5772:function(e,t,a){var r=a(27573);a(7653),t.Z=e=>{let t=e.times||4;return(0,r.jsxs)("div",{role:"status",className:"max-w-full p-4 space-y-4 border border-gray-200 divide-y divide-gray-200 rounded shadow animate-pulse gray:divide-gray-700 md:p-6 gray:border-gray-700",children:[[...Array(t)].map((e,t)=>(0,r.jsxs)("div",{className:"flex items-center justify-between pt-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"h-2.5 bg-gray-300 rounded-full gray:bg-gray-600 w-24 mb-2.5"}),(0,r.jsx)("div",{className:"w-32 h-2 bg-gray-200 rounded-full gray:bg-gray-700"})]}),(0,r.jsx)("div",{className:"h-2.5 bg-gray-300 rounded-full gray:bg-gray-700 w-12"})]},t)),(0,r.jsx)("span",{className:"sr-only",children:"Loading..."})]})}},80923:function(e,t,a){a.d(t,{Z:function(){return c}});var r=a(27573),n=a(7653),s=a(86527),o=a(18580);let d=s.fC,i=s.xz,l=n.forwardRef((e,t)=>{let{className:a,align:n="center",sideOffset:d=4,...i}=e;return(0,r.jsx)(s.VY,{ref:t,align:n,sideOffset:d,className:(0,o.cn)("z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a),...i})});l.displayName=s.VY.displayName;var c=e=>{let{label:t,popoverheader:a,popovercontent:n}=e;return(0,r.jsxs)(d,{children:[(0,r.jsx)(i,{children:(0,r.jsx)("label",{className:"text-sm font-medium leading-6 text-gray-900 inline-flex items-center",children:(0,r.jsxs)("p",{children:[t," ",(0,r.jsx)("button",{type:"button",className:"align-middle mb-1",children:(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20","stroke-width":"1.5",stroke:"currentColor",className:"w-4 h-4 hover:text-gray-500 rounded-sm align-middle",children:(0,r.jsx)("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9.375 9.375l.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M17.5 10a7.5 7.5 0 1 1-15 0 7.5 7.5 0 0 1 15 0Zm-7.5-3.125h.008v.008H10V6.875Z"})})})]})})}),(0,r.jsxs)(l,{className:"text-sm text-gray-500 transition-opacity duration-300 bg-white border border-gray-200 rounded-lg shadow-sm overflow-visible",children:[a&&(0,r.jsx)("div",{className:"px-3 py-2 bg-gray-100 border-b border-gray-200 rounded-lg dark:border-gray-600 dark:bg-gray-700 overflow-visible",children:(0,r.jsx)("h3",{className:"font-semibold text-gray-900 dark:text-white overflow-visible",children:a})}),(0,r.jsx)("div",{className:"px-3 py-2",children:n})]})]})}}}]); \ No newline at end of file diff --git a/superduper/rest/out/_next/static/chunks/3220-62d7c2a3f65d8324.js b/superduper/rest/out/_next/static/chunks/3220-62d7c2a3f65d8324.js new file mode 100644 index 000000000..aed76fad6 --- /dev/null +++ b/superduper/rest/out/_next/static/chunks/3220-62d7c2a3f65d8324.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3220],{83220:function(e,s,a){a.d(s,{Z:function(){return eR}});var t=a(27573),r=a(7653),n=a(13908),l=a(88146),i=a(5772),o=a(93296),d=a(61284),c=a(63130),u=a(36531),m=a(412),p=a(60855);function x(e){let{data:s}=e,a=(0,m.I0)(),n=(0,m.v9)(e=>e.nodegroups.nodeUniqueLabels)||[],[l,i]=(0,r.useState)(""),d=async()=>{if(!l){o.ZP.error("Please type a ComputeClass before adding.",{id:"no-input-toast"});return}if(n.includes(l)){o.ZP.error("This ComputeClass is already added! Add a new ComputeClass!");return}try{a((0,p.Lj)([...n,l])),i(""),o.ZP.success("Successfully added!")}catch(e){o.ZP.error("An error occurred. Please reload and try again!")}};return(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)("label",{className:"block text-sm font-medium leading-6 text-gray-900",children:"Add ComputeClass"}),(0,t.jsx)("input",{type:"text",className:"mt-2 w-full rounded-md border-0 bg-white py-1.5 pl-3 pr-10 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6",value:l,onChange:e=>{i(e.target.value)},placeholder:"Type ComputeClass here..."}),(0,t.jsx)(u.z,{type:"button",className:"mt-2",onClick:d,children:"Add Now"})]})}var h=a(85688),v=a(4482),g=a(42502),f=a(64303),j=a(4216),y=a(18580);let b=r.forwardRef((e,s)=>{let{className:a,...r}=e;return(0,t.jsx)("div",{className:"relative w-full overflow-auto",children:(0,t.jsx)("table",{ref:s,className:(0,y.cn)("w-full caption-bottom text-sm",a),...r})})});b.displayName="Table";let N=r.forwardRef((e,s)=>{let{className:a,...r}=e;return(0,t.jsx)("thead",{ref:s,className:(0,y.cn)("[&_tr]:border-b",a),...r})});N.displayName="TableHeader";let w=r.forwardRef((e,s)=>{let{className:a,...r}=e;return(0,t.jsx)("tbody",{ref:s,className:(0,y.cn)("[&_tr:last-child]:border-0",a),...r})});w.displayName="TableBody",r.forwardRef((e,s)=>{let{className:a,...r}=e;return(0,t.jsx)("tfoot",{ref:s,className:(0,y.cn)("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",a),...r})}).displayName="TableFooter";let C=r.forwardRef((e,s)=>{let{className:a,...r}=e;return(0,t.jsx)("tr",{ref:s,className:(0,y.cn)("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",a),...r})});C.displayName="TableRow";let P=r.forwardRef((e,s)=>{let{className:a,...r}=e;return(0,t.jsx)("th",{ref:s,className:(0,y.cn)("h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",a),...r})});P.displayName="TableHead";let L=r.forwardRef((e,s)=>{let{className:a,...r}=e;return(0,t.jsx)("td",{ref:s,className:(0,y.cn)("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",a),...r})});L.displayName="TableCell",r.forwardRef((e,s)=>{let{className:a,...r}=e;return(0,t.jsx)("caption",{ref:s,className:(0,y.cn)("mt-4 text-sm text-muted-foreground",a),...r})}).displayName="TableCaption";var k=a(95042),I=a(12900),_=a(7109),S=a(74859);let A=(e,s)=>[...e].sort((e,a)=>{for(let[t,r]of Object.entries(s)){let s=parseFloat(e.status.capacity[t]),n=parseFloat(a.status.capacity[t]);if(s!==n)return se.environment.environmentLoadedValues),l=(0,m.v9)(e=>{var s;return null==e?void 0:null===(s=e.userInfo)||void 0===s?void 0:s.userInfoLoadedValues}),y=(0,m.I0)(),E=(0,m.v9)(e=>e.nodegroups.nodeLoadedValues),R=(0,m.v9)(e=>e.deploymentName.deploymentNameLoadedValues.name),U=(0,m.v9)(e=>e.nodegroups.nodeUniqueLabels)||[];(0,r.useEffect)(()=>{let e=async()=>{try{let e=(await n.Z.get("".concat("".concat(S.env.NEXT_PUBLIC_API,"/nodegroups?deployment=").concat(R)),{headers:{Accept:"application/json",Authorization:(0,_.Z)(l),superduper_reverse_proxy:S.env.NEXT_PUBLIC_API||a.NEXT_PUBLIC_API}})).data.items.map(e=>e.spec.extraComputeClass&&e.spec.extraComputeClass.length>0?e:{...e,spec:{...e.spec,extraComputeClass:[...new Set([...e.spec.extraComputeClass||[],"base"].filter(Boolean))]},status:{...e.status,reservation:{...e.status.reservation,state:"Idle"}}});y((0,p.NB)({items:e})),y((0,p.Bw)({items:e}))}catch(e){console.error("Error fetching API data:",e),o.ZP.error("Error fetching Node Groups data")}};E||e()},[]);let[T,B]=(0,r.useState)({numCPUs:"asc",numGPUs:"asc",memoryMB:"asc",ephemeralStorageMB:"asc"}),D=(e,s)=>{B(a=>({...a,[e]:s}))},[,F]=(0,r.useState)(),X=()=>F({}),[O,V]=(0,r.useState)(()=>U.length?U[U.length-1]:"base"),[z,M]=(0,r.useState)(0);(0,r.useEffect)(()=>{U.length&&(0===z?(V("base"),M(e=>e+1)):(V(U[U.length-1]),M(e=>e+1)))},[U]),(0,r.useEffect)(()=>{if(console.log("Sorting nodegroups with sortOrder:",T),null==E?void 0:E.items){let e=A(E.items,T);console.log("Sorted items:",e),y((0,p.NB)({items:e})),X()}},[T]);let W=async(e,s)=>{var a,t;(null==e?void 0:e.spec)||(e.spec={}),(null==e?void 0:null===(a=e.spec)||void 0===a?void 0:a.extraComputeClass)||(e.spec.extraComputeClass=[]);let r=(null==e?void 0:null===(t=e.spec)||void 0===t?void 0:t.extraComputeClass)||[];if(r.includes(s)){try{for(let a=e.spec.extraComputeClass.length-1;a>=0;a--)e.spec.extraComputeClass[a]===s&&e.spec.extraComputeClass.splice(a,1);e.spec.exclusiveReservation=null,e.status.reservation.state="Idle";let a=E.items.map(s=>s.name===e.name?e:s);y((0,p.NB)({items:a})),(0,o.ZP)("".concat(s," is removed from ").concat(e.name,"!"),{icon:"❎",id:"updated-toast"}),X()}catch(e){o.ZP.error("An error occurred",{id:"updated-toast"})}return}try{e.spec.extraComputeClass=[...r,s],e.status.reservation.state="Shared";let a=E.items.map(s=>s.name===e.name?e:s);y((0,p.NB)({items:a})),(0,o.ZP)("".concat(s," is added to ").concat(e.name,"!"),{icon:"✅",id:"updated-toast"}),X()}catch(e){o.ZP.error("An error occurred. Please reload and try again!")}},q=async(e,s)=>{var a,t,r;if((null==e?void 0:e.spec)||(e.spec={}),(null==e?void 0:null===(a=e.spec)||void 0===a?void 0:a.extraComputeClass)||(e.spec.extraComputeClass=[]),(null==e?void 0:null===(t=e.spec)||void 0===t?void 0:t.exclusiveReservation)||(e.spec.exclusiveReservation=null),((null==e?void 0:null===(r=e.spec)||void 0===r?void 0:r.exclusiveReservation)||null)===s){try{e.spec.exclusiveReservation=null,e.status.reservation.state="Shared";let a=E.items.map(s=>s.name===e.name?e:s);y((0,p.NB)({items:a})),(0,o.ZP)("".concat(s," is removed from ").concat(e.name,"!"),{icon:"❎",id:"updated-toast"}),X()}catch(e){o.ZP.error("An error occurred",{id:"updated-toast"})}return}try{e.spec.exclusiveReservation=s,e.spec.extraComputeClass=[s],e.status.reservation.state="Exclusive";let a=E.items.map(s=>s.name===e.name?e:s);y((0,p.NB)({items:a})),(0,o.ZP)("".concat(s," is exclusively added to ").concat(e.name,"! It will remove the reserved status from all other nodes."),{icon:"✅",id:"updated-toast"}),X()}catch(e){o.ZP.error("An error occurred. Please reload and try again!")}},G=e=>{try{var s;return"string"==typeof(null==e?void 0:null===(s=e.spec)||void 0===s?void 0:s.exclusiveReservation)&&""!==e.spec.exclusiveReservation.trim()}catch(e){return console.error("Error in reserveDefineDisableOrNot:",e),!1}},Y=(e,s)=>{try{var a,t,r,n,l,i,o,d,c,u;if(null==e?void 0:null===(r=e.spec)||void 0===r?void 0:null===(t=r.extraComputeClass)||void 0===t?void 0:t.includes(null==e?void 0:null===(a=e.spec)||void 0===a?void 0:a.exclusiveReservation)){if((null==e?void 0:null===(u=e.spec)||void 0===u?void 0:u.exclusiveReservation)===s)return!1;return!0}if((null==e?void 0:null===(n=e.spec)||void 0===n?void 0:n.exclusiveReservation)||!(null==e?void 0:null===(i=e.spec)||void 0===i?void 0:null===(l=i.extraComputeClass)||void 0===l?void 0:l.length))return!0;null==e||null===(c=e.spec)||void 0===c||null===(d=c.extraComputeClass)||void 0===d||d.includes(null==e?void 0:null===(o=e.spec)||void 0===o?void 0:o.exclusiveReservation)}catch(e){}return!1},K=(e,s)=>{try{if(1===U.length){o.ZP.error("At least one ComputeClass is required!",{id:"removed-toast"});return}let a=e.items.map(e=>{let a=JSON.parse(JSON.stringify(e));if(a.spec.exclusiveReservation===s&&(a.spec.exclusiveReservation=null),Array.isArray(a.spec.extraComputeClass)){let e=a.spec.extraComputeClass.indexOf(s);-1!==e&&a.spec.extraComputeClass.splice(e,1)}return a});y((0,p.NB)({items:a})),y((0,p.Lj)([...U.filter(e=>e!==s)])),V(U[U.length-1]),X(),(0,o.ZP)("Successfully removed!",{id:"removed-toast"})}catch(e){console.error("Error in handleRemoveComputeClassAndReservation:",e)}},[J,H]=(0,r.useState)("all"),$=e=>{H(e)};return(0,t.jsx)(t.Fragment,{children:(0,t.jsx)("div",{children:E?(0,t.jsx)(t.Fragment,{children:(0,t.jsx)("div",{className:"-ml-4 mt-4 mb-2 bg-white px-4 py-2 sm:px-4",children:(0,t.jsxs)(f.mQ,{defaultValue:O,value:O,onValueChange:e=>V(e),className:"w-full",children:[(0,t.jsx)(f.dr,{children:(0,t.jsxs)("div",{className:"flex",children:[U.map(e=>(0,t.jsxs)(f.SP,{value:e,children:[e," ",(0,t.jsx)(c.Z,{onClick:()=>{K(E,e)},className:"-mr-1 h-4 w-4","aria-hidden":"true"})]},e)),(0,t.jsxs)(k.J2,{children:[(0,t.jsx)(k.xo,{asChild:!0,children:(0,t.jsx)(u.z,{className:"rounded-full",variant:"primary",children:(0,t.jsx)(Z,{className:"h-5 w-5"})})}),(0,t.jsxs)(k.yk,{className:"w-80",children:[(0,t.jsx)(d.xp,{asChild:!0,children:(0,t.jsx)(c.Z,{className:"ml-auto -mb-2 h-5 w-5 flex text-gray-400 cursor-pointer hover:text-gray-500","aria-hidden":"true"})}),(0,t.jsxs)("div",{className:"grid gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("h4",{className:"font-medium leading-none",children:"Add ComputeClass"}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"You can select the compute class for the node later."})]}),(0,t.jsx)("div",{className:"grid gap-2",children:(0,t.jsx)(x,{data:E})})]})]})]})]})}),U.map(e=>(0,t.jsx)(f.nU,{value:e,children:(0,t.jsx)("div",{className:"container mx-auto px-0 py-2 w-full",children:(0,t.jsx)("div",{className:"border rounded-lg overflow-x-auto w-full",children:(0,t.jsxs)(b,{children:[(0,t.jsx)(N,{children:(0,t.jsxs)(C,{children:[(0,t.jsx)(P,{className:"text-center px-1",children:(0,t.jsx)(I.C,{variant:"outline",children:"Reserve"})}),(0,t.jsx)(P,{className:"text-center px-1",children:(0,t.jsx)(I.C,{variant:"outline",children:"Exclusive"})}),(0,t.jsx)(P,{children:(0,t.jsx)(I.C,{variant:"outline",children:"Node Name"})}),(0,t.jsx)(P,{className:"text-center",children:(0,t.jsxs)(g.h_,{children:[(0,t.jsx)(g.$F,{asChild:!0,children:(0,t.jsxs)(u.z,{variant:"ghost",size:"sm",className:"px-0",children:["CPU",(0,t.jsx)(h.jnn,{className:"ml-2 h-4 w-4"})]})}),(0,t.jsx)(g.AW,{align:"end",className:"w-[200px]",children:(0,t.jsxs)(g._x,{value:T.numCPUs,onValueChange:e=>D("numCPUs",e),children:[(0,t.jsx)(g.qB,{value:"asc",children:"Ascending"}),(0,t.jsx)(g.qB,{value:"desc",children:"Descending"})]})})]})}),(0,t.jsx)(P,{className:"text-center",children:(0,t.jsxs)(g.h_,{children:[(0,t.jsx)(g.$F,{asChild:!0,children:(0,t.jsxs)(u.z,{variant:"ghost",size:"sm",className:"px-0",children:["GPU",(0,t.jsx)(h.jnn,{className:"ml-2 h-4 w-4"})]})}),(0,t.jsx)(g.AW,{align:"end",className:"w-[200px]",children:(0,t.jsxs)(g._x,{value:T.numGPUs,onValueChange:e=>D("numGPUs",e),children:[(0,t.jsx)(g.qB,{value:"asc",children:"Ascending"}),(0,t.jsx)(g.qB,{value:"desc",children:"Descending"})]})})]})}),(0,t.jsx)(P,{className:"text-center",children:(0,t.jsxs)(g.h_,{children:[(0,t.jsx)(g.$F,{asChild:!0,children:(0,t.jsxs)(u.z,{variant:"ghost",className:"px-0",size:"sm",children:["RAM",(0,t.jsx)(h.jnn,{className:"ml-2 h-4 w-4"})]})}),(0,t.jsx)(g.AW,{align:"end",className:"w-[200px]",children:(0,t.jsxs)(g._x,{value:T.memoryMB,onValueChange:e=>D("memoryMB",e),children:[(0,t.jsx)(g.qB,{value:"asc",children:"Ascending"}),(0,t.jsx)(g.qB,{value:"desc",children:"Descending"})]})})]})}),(0,t.jsx)(P,{className:"text-center",children:(0,t.jsxs)(g.h_,{children:[(0,t.jsx)(g.$F,{asChild:!0,children:(0,t.jsxs)(u.z,{className:"px-0",variant:"ghost",size:"sm",children:["Storage",(0,t.jsx)(h.jnn,{className:"ml-2 h-4 w-4"})]})}),(0,t.jsx)(g.AW,{align:"end",className:"w-[200px]",children:(0,t.jsxs)(g._x,{value:T.ephemeralStorageMB,onValueChange:e=>D("ephemeralStorageMB",e),children:[(0,t.jsx)(g.qB,{value:"asc",children:"Ascending"}),(0,t.jsx)(g.qB,{value:"desc",children:"Descending"})]})})]})}),(0,t.jsx)(P,{className:"text-center",children:(0,t.jsxs)(g.h_,{children:[(0,t.jsx)(g.$F,{asChild:!0,children:(0,t.jsxs)(u.z,{className:"px-0",variant:"ghost",size:"sm",children:["State",(0,t.jsx)(h.jnn,{className:"ml-2 h-4 w-4"})]})}),(0,t.jsx)(g.AW,{align:"end",className:"w-[200px]",children:(0,t.jsxs)(g._x,{value:J,onValueChange:e=>$(e),children:[(0,t.jsx)(g.qB,{value:"all",children:"Show All"}),(0,t.jsx)(g.qB,{value:"IDLE",children:"IDLE"}),(0,t.jsx)(g.qB,{value:"SHARED",children:"SHARED"}),(0,t.jsx)(g.qB,{value:"EXCLUSIVE",children:"EXCLUSIVE"})]})})]})})]})}),(0,t.jsx)(w,{children:null==E?void 0:E.items.filter(e=>{let s=J.toLowerCase();return"all"===s||!["exclusive","idle","shared"].includes(s)||e.status.reservation.state.toLowerCase()===s}).map((s,a)=>{var r,n,l,i,o,d,c,u,m,p,x,h,g,f,y,b,N;return(0,t.jsxs)(C,{children:[(0,t.jsx)(L,{className:"text-center",children:(0,t.jsx)(j.X,{id:e,onCheckedChange:()=>{W(s,e)},checked:null==s?void 0:null===(n=s.spec)||void 0===n?void 0:null===(r=n.extraComputeClass)||void 0===r?void 0:r.includes(e),defaultChecked:null==s?void 0:null===(i=s.spec)||void 0===i?void 0:null===(l=i.extraComputeClass)||void 0===l?void 0:l.includes(e),disabled:G(s)})}),(0,t.jsx)(L,{className:"text-center",children:(0,t.jsx)(j.X,{id:e+e,onCheckedChange:()=>{q(s,e)},checked:(null==s?void 0:null===(o=s.spec)||void 0===o?void 0:o.exclusiveReservation)===e,defaultChecked:(null==s?void 0:null===(d=s.spec)||void 0===d?void 0:d.exclusiveReservation)===e,disabled:Y(s,e)})}),(0,t.jsx)(L,{children:null==s?void 0:s.name.replace(/\.compute\.internal/g,"")}),(0,t.jsx)(L,{className:"text-center",children:null==s?void 0:null===(u=s.status)||void 0===u?void 0:null===(c=u.capacity)||void 0===c?void 0:c.numCPUs}),(0,t.jsx)(L,{className:"text-center",children:null==s?void 0:null===(p=s.status)||void 0===p?void 0:null===(m=p.capacity)||void 0===m?void 0:m.numGPUs}),(0,t.jsxs)(L,{className:"text-center",children:[null==s?void 0:null===(h=s.status)||void 0===h?void 0:null===(x=h.capacity)||void 0===x?void 0:x.memoryMB,"MB"]}),(0,t.jsxs)(L,{className:"text-center",children:[(parseInt(String(null==s?void 0:null===(f=s.status)||void 0===f?void 0:null===(g=f.capacity)||void 0===g?void 0:g.ephemeralStorageMB),10)/1024).toFixed(2),"GB"]}),(0,t.jsx)(L,{className:"text-center",children:(0,t.jsx)("div",{className:"mt-1",children:(0,t.jsx)("span",{className:"",children:(null==s?void 0:null===(y=s.spec)||void 0===y?void 0:y.exclusiveReservation)?(0,t.jsxs)("dd",{className:"inline-flex items-center rounded-md bg-black px-2 py-1 text-xs font-medium text-white ring-1 ring-inset ring-black/20",children:[(0,t.jsx)(v.pn,{children:(0,t.jsxs)(v.u,{children:[(0,t.jsx)(v.aJ,{children:"EXCLUSIVE"}),(0,t.jsx)(v._v,{children:(0,t.jsx)("p",{children:"The whole node is dedicated to a single computeclass."})})]})}),(0,t.jsx)("div",{className:"offline flex-none rounded-full p-1",children:(0,t.jsx)("div",{role:"status",children:(0,t.jsx)("svg",{className:"w-4 h-4 me-0 text-white dark:text-white flex-shrink-0","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{fillRule:"evenodd",d:"M12 1.5a5.25 5.25 0 0 0-5.25 5.25v3a3 3 0 0 0-3 3v6.75a3 3 0 0 0 3 3h10.5a3 3 0 0 0 3-3v-6.75a3 3 0 0 0-3-3v-3c0-2.9-2.35-5.25-5.25-5.25Zm3.75 8.25v-3a3.75 3.75 0 1 0-7.5 0v3h7.5Z",clipRule:"evenodd"})})})})]}):(null==s?void 0:null===(N=s.spec)||void 0===N?void 0:null===(b=N.extraComputeClass)||void 0===b?void 0:b.length)?(0,t.jsxs)("dd",{className:"inline-flex items-center rounded-md bg-yellow-50 px-2 py-1 text-xs font-medium text-yellow-700 ring-1 ring-inset ring-yellow-600/20",children:[(0,t.jsx)(v.pn,{children:(0,t.jsxs)(v.u,{children:[(0,t.jsx)(v.aJ,{children:"SHARED"}),(0,t.jsx)(v._v,{children:(0,t.jsx)("p",{children:"The node has been allocated to one or more computeclasses."})})]})}),(0,t.jsx)("div",{className:"offline flex-none rounded-full p-1",children:(0,t.jsx)("div",{role:"status",children:(0,t.jsx)("svg",{className:"w-4 h-4 me-0 text-yellow-500 dark:text-yellow-400 flex-shrink-0","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 20 20",children:(0,t.jsx)("path",{d:"M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5Zm3.707 8.207-4 4a1 1 0 0 1-1.414 0l-2-2a1 1 0 0 1 1.414-1.414L9 10.586l3.293-3.293a1 1 0 0 1 1.414 1.414Z"})})})})]}):(0,t.jsxs)("dd",{className:"inline-flex items-center rounded-md bg-green-50 px-2 py-1 text-xs font-medium text-green-700 ring-1 ring-inset ring-green-600/20",children:[(0,t.jsx)(v.pn,{children:(0,t.jsxs)(v.u,{children:[(0,t.jsx)(v.aJ,{children:"IDLE"}),(0,t.jsx)(v._v,{children:(0,t.jsx)("p",{children:"The node is not allocated to any jobs and is available for use."})})]})}),(0,t.jsx)("div",{className:"offline flex-none rounded-full p-1",children:(0,t.jsxs)("div",{role:"status",children:[(0,t.jsx)("svg",{className:"w-4 h-4 me-0 text-green-500 dark:text-green-400 flex-shrink-0","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 20 20",children:(0,t.jsx)("path",{d:"M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5Zm3.707 8.207-4 4a1 1 0 0 1-1.414 0l-2-2a1 1 0 0 1 1.414-1.414L9 10.586l3.293-3.293a1 1 0 0 1 1.414 1.414Z"})}),(0,t.jsx)("span",{className:"sr-only",children:"..."})]})})]})})})})]},a)})})]})})})},e))]})})}):(0,t.jsx)("div",{className:"mt-2 ml-4",children:(0,t.jsx)(i.Z,{})})})})}function Z(e){return(0,t.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("path",{d:"M5 12h14"}),(0,t.jsx)("path",{d:"M12 5v14"})]})}var R=a(87420),U=a(34611),T=a(75355),B=a.n(T),D=a(80923),F=a(34209),X=a(23611),O=a(2187),V=e=>{let{workerdata:s}=e,a=(0,m.I0)(),n=(0,m.v9)(e=>e.chartsgroups.chartsLoadedValues),[l,i]=(0,r.useState)(!0),[d,c]=(0,r.useState)({groupName:s.groupName||"",computeClass:s.computeClass||"",replicaCount:s.replicaCount||0}),u=(0,r.useRef)(d);(0,r.useEffect)(()=>{B()(d,u.current)||(h(),u.current=d)},[d,l,s]);let p=n.items.find(e=>"ray"===e.name),x=(0,m.v9)(e=>e.nodegroups.nodeUniqueLabels),h=()=>{console.log("submittedData RAY:",d);try{if(""===d.groupName&&""===d.computeClass&&0===d.replicaCount){o.ZP.error("Please update the Ray Worker parameters to save changes!");return}if(""!==d.groupName){let e={...p,spec:{...p.spec,rayParams:{...p.spec.rayParams,workers:p.spec.rayParams.workers.map(e=>e.groupName===s.groupName||""===e.groupName?{groupName:d.groupName,computeClass:d.computeClass,replicaCount:d.replicaCount}:e)}}},t=n.items.map(s=>"ray"===s.name?e:s);console.log("Updated data:",t),a((0,U.Gi)({items:[...t]}))}o.ZP.success("Ray Worker Params Updated!",{id:"unique-toast-id"})}catch(e){o.ZP.error("Something is wrong! Please try again.",{id:"rayWorkerParams"})}},v=e=>{let{name:s,value:a}=e.target;c(e=>({...e,[s]:a}))},g=e=>{let s=parseInt(d.replicaCount,10)||0;c(a=>({...a,[e]:Math.max(s-1,1)}))},f=e=>{let s=parseInt(d.replicaCount,10)||0;c(a=>({...a,[e]:s+1}))};return(0,t.jsx)(t.Fragment,{children:l&&(0,t.jsxs)("div",{className:"mt-4 pt-4 rounded-2xl border-4 border-dashed border-gray-900/25 px-6 py-10",children:[(0,t.jsx)("div",{className:"space-y-12",children:(0,t.jsx)("div",{className:"pb-2",children:(0,t.jsxs)("div",{className:"flex items-start justify-between",children:[(0,t.jsx)("h2",{className:"text-base font-semibold leading-7 text-gray-900",children:"Worker Group"}),(0,t.jsx)("div",{className:"ml-3 flex h-7 items-center",children:(0,t.jsxs)("button",{type:"button",className:"rounded-md bg-white text-gray-400 hover:text-gray-500 outline ring-2 ring-indigo-500",onClick:()=>{try{if(""===s.groupName&&""===s.computeClass&&0===s.replicaCount){let e={...p,spec:{...p.spec,rayParams:{...p.spec.rayParams,workers:p.spec.rayParams.workers.slice(0,-1)}}},s=n.items.map(s=>"ray"===s.name?e:s);a((0,U.Gi)({items:s})),i(!1),o.ZP.success("Removed the worker!",{id:"rayWorkerParams"})}else if(1===p.spec.rayParams.workers.length)o.ZP.error("You cannot delete the last worker!",{id:"rayWorkerParams"});else if(""!==s.groupName){let e=p.spec.rayParams.workers.filter(e=>e.groupName!==s.groupName),t={...p,spec:{...p.spec,rayParams:{...p.spec.rayParams,workers:[...e]}}},r=n.items.map(e=>"ray"===e.name?t:e);a((0,U.Gi)({items:r})),i(!1),o.ZP.success("".concat(s.groupName," removed!"),{id:"rayWorkerParams"})}}catch(e){o.ZP.error("Something is wrong! Please reload and try again.",{id:"rayWorkerParams"})}},children:[(0,t.jsx)("span",{className:"sr-only",children:"Close"}),(0,t.jsx)(F.Z,{className:"h-6 w-6","aria-hidden":"true"})]})})]})})}),(0,t.jsx)("div",{className:"mt-5 grid grid-cols-1 gap-x-6 gap-y-8 sm:grid-cols-6",children:(0,t.jsxs)("div",{className:"sm:col-span-5",children:[(0,t.jsx)(D.Z,{label:"Group Name",popoverheader:"Name of the Group",popovercontent:(0,t.jsx)("p",{children:"Please provide the name of your Ray worker group. It is the specific group name you want to add."})}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)("input",{name:"groupName",value:d.groupName,onChange:v,type:"text",placeholder:"Type your group name",autoComplete:"groupName",className:"block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6"})})]})}),(0,t.jsx)("div",{className:"mt-5 grid grid-cols-1 gap-x-6 gap-y-8 sm:grid-cols-6",children:(0,t.jsxs)("div",{className:"sm:col-span-5",children:[(0,t.jsx)(D.Z,{label:"Select ComputeClass",popoverheader:"Select ComputeClass",popovercontent:(0,t.jsx)("p",{children:"Please select the labels for this service. This means the service will run in a particular node! If you want a custom label first add labels in a node!"})}),(0,t.jsx)("div",{className:"mt-2",children:x&&(0,t.jsx)("select",{name:"computeClass",value:d.computeClass,onChange:v,className:"block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6",children:[...x].reverse().map(e=>(0,t.jsx)("option",{value:e,children:e},e))})})]})}),(0,t.jsx)("div",{className:"mt-5 grid grid-cols-1 gap-x-6 gap-y-8 sm:grid-cols-6",children:(0,t.jsxs)("div",{className:"sm:col-span-5",children:[(0,t.jsx)(D.Z,{label:"Number of workers",popoverheader:"Number of workers",popovercontent:(0,t.jsx)("p",{children:"Please provide the number of workers. It represents the number of replicas for your database."})}),(0,t.jsxs)("div",{className:"flex items-center justify-left mt-2",children:[(0,t.jsx)("button",{type:"button",onClick:()=>g("replicaCount"),className:"rounded-full bg-indigo-600 p-1 text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600 mr-4",children:(0,t.jsx)(X.Z,{className:"h-5 w-5","aria-hidden":"true"})}),(0,t.jsx)("input",{disabled:!0,name:"replicaCount",value:d.replicaCount,onChange:v,className:"w-16 text-center block rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6"}),(0,t.jsx)("button",{type:"button",onClick:()=>f("replicaCount"),className:"rounded-full bg-indigo-600 p-1 text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600 ml-4",children:(0,t.jsx)(O.Z,{className:"h-5 w-5","aria-hidden":"true"})})]})]})})]})})},z=e=>{var s,a,n,l,i,d,c,u,p,x,h,v,g;let{data:f}=e,j=(0,m.I0)(),y=(0,m.v9)(e=>e.chartsgroups.chartsLoadedValues),b=(0,m.v9)(e=>e.nodegroups.nodeUniqueLabels),[N,w]=(0,r.useState)({computeClass:(null==f?void 0:null===(n=f.spec)||void 0===n?void 0:null===(a=n.rayParams)||void 0===a?void 0:null===(s=a.head)||void 0===s?void 0:s.computeClass)||"",name:(null==f?void 0:null===(d=f.spec)||void 0===d?void 0:null===(i=d.rayParams)||void 0===i?void 0:null===(l=i.image)||void 0===l?void 0:l.name)||"",tag:(null==f?void 0:null===(p=f.spec)||void 0===p?void 0:null===(u=p.rayParams)||void 0===u?void 0:null===(c=u.image)||void 0===c?void 0:c.tag)||""}),C=(0,r.useRef)(N);(0,r.useEffect)(()=>{B()(N,C.current)||(P(),C.current=N)},[N]);let P=()=>{let{name:e,tag:s,computeClass:a}=N;f.spec||(f.spec={}),f.spec.rayParams||(f.spec.rayParams={}),f.spec.rayParams.head||(f.spec.rayParams.head={}),f.spec.rayParams.image.name=e,f.spec.rayParams.image.tag=s,f.spec.rayParams.head.computeClass=a;let t=y.items.map(e=>e.name===f.name?f:e);j((0,U.Gi)({items:t})),o.ZP.success("Ray Parameters Updated!",{id:"rayParams"})};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"mt-4 pt-4 rounded-2xl border-4 border-dashed border-gray-900/25 px-6 py-10",children:[(0,t.jsx)("h2",{className:"text-base font-semibold leading-7 text-gray-900",children:"Ray Head"}),b&&(0,t.jsx)("div",{className:"mt-5 grid grid-cols-1 gap-x-6 gap-y-8 sm:grid-cols-6",children:(0,t.jsxs)("div",{className:"sm:col-span-5",children:[(0,t.jsx)(D.Z,{label:"Select ComputeClass",popoverheader:"Select ComputeClass",popovercontent:(0,t.jsx)("p",{children:"Please select the labels for this service. This means the service will run in a specific node! For custom labels, add them to a node first."})}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)("select",{name:"computeClass",value:N.computeClass,onChange:e=>{let{name:s,value:a}=e.target;w(e=>({...e,[s]:a}))},className:"block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6",children:[...b].reverse().map(e=>(0,t.jsx)("option",{value:e,children:e},e))})})]})})]}),(null==f?void 0:null===(h=f.spec)||void 0===h?void 0:null===(x=h.rayParams)||void 0===x?void 0:x.workers)&&(null==f?void 0:null===(g=f.spec)||void 0===g?void 0:null===(v=g.rayParams)||void 0===v?void 0:v.workers.map((e,s)=>(0,t.jsx)(V,{workerdata:e},s))),(0,t.jsx)("div",{children:(0,t.jsx)("div",{className:"mt-6 flex items-center justify-center gap-x-6",children:(0,t.jsx)("div",{className:"mt-6",children:(0,t.jsx)("button",{type:"button",onClick:()=>{f.spec||(f.spec={}),f.spec.rayParams||(f.spec.rayParams={}),f.spec.rayParams.workers||(f.spec.rayParams.workers=[]),f.spec.rayParams.workers.push({groupName:"workergroup_".concat(f.spec.rayParams.workers.length+1),computeClass:b.length>0?b[b.length-1]:"",replicaCount:1});let e=y.items.map(e=>e.name===f.name?f:e);j((0,U.Gi)({items:e}))},className:"rounded-full bg-indigo-600 p-2 text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600",children:(0,t.jsx)(O.Z,{className:"h-5 w-5","aria-hidden":"true"})})})})}),(0,t.jsx)("div",{className:"flex justify-center items-center h-full",children:(0,t.jsx)("div",{className:"mt-0 ml-8 grid grid-cols-1 gap-x-6 gap-y-8 sm:grid-cols-6",children:(0,t.jsx)("div",{className:"sm:col-span-5",children:(0,t.jsx)(D.Z,{label:"Add Ray Workers",popoverheader:"Add Ray Workers",popovercontent:(0,t.jsx)("p",{children:"Please click on the plus button to add ray workers. You can add multiple ray workers."})})})})})]})},M=e=>{var s,a;let{data:n,paramsName:l}=e;if(n.name.includes("ray"))return(0,t.jsx)(z,{data:n});let i=(0,m.I0)(),d=(0,m.v9)(e=>e.nodegroups.nodeUniqueLabels),c=(0,m.v9)(e=>e.chartsgroups.chartsLoadedValues),[u,p]=(0,r.useState)({computeClass:(null==n?void 0:null===(a=n.spec)||void 0===a?void 0:null===(s=a[l])||void 0===s?void 0:s.computeClass)||""}),x=(0,r.useRef)(u);(0,r.useEffect)(()=>{B()(u,x.current)||(h(),x.current=u)},[u]);let h=()=>{try{let{computeClass:e}=u;n.spec||(n.spec={}),n.spec[l]||(n.spec[l]={}),n.spec[l].computeClass=e;let s=c.items.map(e=>e.name===n.name?n:e);i((0,U.Gi)({items:s})),o.ZP.success("Parameters Updated!",{id:"paramsName"})}catch(e){o.ZP.error("Something went wrong! Please try again.",{id:"paramsName"})}};return d?(0,t.jsx)("div",{children:(0,t.jsx)("div",{className:"mt-5 grid grid-cols-1 gap-x-6 gap-y-8 sm:grid-cols-6",children:(0,t.jsxs)("div",{className:"sm:col-span-5",children:[(0,t.jsx)(D.Z,{label:"Select ComputeClass",popoverheader:"Select ComputeClass",popovercontent:(0,t.jsx)("p",{children:"Please select the labels for this service. This means the service will run on a specific node! For custom labels, add them to a node first."})}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)("select",{name:"computeClass",value:u.computeClass,onChange:e=>{let{name:s,value:a}=e.target;p(e=>({...e,[s]:a}))},className:"block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6",children:[...d].reverse().map(e=>(0,t.jsx)("option",{value:e,children:e},e))})})]})})}):null},W=e=>{let{deployment:s,icon:a,description:r,children:n}=e;return(0,t.jsxs)("li",{className:"relative flex items-center space-x-4 py-4",children:[(0,t.jsxs)("div",{className:"min-w-0 flex-auto",children:[(0,t.jsxs)("div",{className:"flex items-center gap-x-3",children:[(0,t.jsx)(a,{className:"h-5 w-5 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600","aria-hidden":"true"}),(0,t.jsx)("h2",{className:"min-w-0 text-sm font-semibold leading-6 text-gray-900",children:(0,t.jsx)("a",{href:"#",className:"flex gap-x-2",children:(0,t.jsxs)("span",{className:"whitespace-nowrap text-gray-900",children:[s.name,(0,t.jsx)("span",{className:"text-base text-rose-500",children:"*️"})]})})})]}),(0,t.jsxs)("div",{className:"mt-3 flex items-center gap-x-2.5 text-xs leading-5 text-gray-400",children:[(0,t.jsx)("p",{className:"whitespace-nowrap truncate",children:r}),(0,t.jsx)("br",{})]})]}),n]},s.name)},q=a(70694),G=a(96764),Y=e=>{let{deployment:s,children:a}=e;return(0,t.jsxs)(q.yo,{children:[(0,t.jsx)(q.aM,{asChild:!0,children:(0,t.jsxs)(u.z,{variant:"outline",children:["Edit Params"," ",(0,t.jsx)(G.Z,{className:"ml-2 -mr-0.5 h-5 w-5 flex-none text-gray-400","aria-hidden":"true"})]})}),(0,t.jsxs)(q.ue,{className:"overflow-auto",children:[(0,t.jsxs)(q.Tu,{children:[(0,t.jsxs)(q.bC,{children:["Edit ",s.name," values"]}),(0,t.jsx)(q.Ei,{children:"You can update these values and click update. These are current default values. If there is no value to update then it will be empty."})]}),(0,t.jsx)("div",{className:"grid gap-4 py-4 overflow-visible",children:a})]})]})},K=a(74859);let J=e=>e.items.filter(e=>{if("true"===K.env.NEXT_PUBLIC_SNOWFLAKE){var s,a;return(null==e?void 0:null===(s=e.spec)||void 0===s?void 0:s.category)!=="databases"&&(null==e?void 0:null===(a=e.spec)||void 0===a?void 0:a.category)!=="mongodb"&&(null==e?void 0:e.name)!=="monitoring"}return!0}).sort((e,s)=>e.names.name?1:0).map(e=>(0,t.jsx)(W,{deployment:e,icon:(null==e?void 0:e.icon)||R.Z,description:(null==e?void 0:e.description)||"".concat(e.name," is a service of superduper required to run the application."),children:(0,t.jsx)(Y,{deployment:e,children:(0,t.jsx)(M,{data:e,paramsName:"".concat(e.name,"Params")})})},e.id));var H=()=>{let e=(0,m.v9)(e=>e.environment.environmentLoadedValues),s=(0,m.v9)(e=>{var s;return null==e?void 0:null===(s=e.userInfo)||void 0===s?void 0:s.userInfoLoadedValues}),a=(0,m.I0)(),l=(0,m.v9)(e=>e.nodegroups.nodeUniqueLabels),o=(0,m.v9)(e=>e.chartsgroups.chartsLoadedValues),d=(0,m.v9)(e=>e.deploymentName.deploymentNameLoadedValues.name);return((0,r.useEffect)(()=>{let t=async()=>{try{let t=await n.Z.get("".concat("".concat(K.env.NEXT_PUBLIC_API,"/charts?deployment=").concat(d)),{headers:{Accept:"application/json",Authorization:(0,_.Z)(s),superduper_reverse_proxy:K.env.NEXT_PUBLIC_API||e.NEXT_PUBLIC_API}});console.log("Charts API data:",t.data),a((0,U.Gi)(t.data))}catch(e){console.error("Error fetching Services API data")}};o||t()},[o,a]),o||l)?(0,t.jsx)("div",{className:"mb-8",children:(0,t.jsx)("div",{className:"bg-white px-2 py-5 sm:px-2",children:(0,t.jsxs)("ul",{role:"list",className:"divide-y divide-red/5",children:[o&&J(o)," "]})})}):(0,t.jsxs)("div",{className:"mt-2 ml-4",children:[(0,t.jsx)(i.Z,{})," "]})},$=a(59260),Q=a(33453),ee=a(49904);let es=e=>s=>s({type:ee.s,payload:e});var ea=a(68321),et=a(9551),er=a(72940),en=e=>{var s,a,n,l,i,d,c,u,p,x,h,v,g;let{data:f}=e,j=(0,m.I0)(),y=(0,m.v9)(e=>e.chartsgroups.chartsLoadedValues),[b,N]=(0,r.useState)(!1),w=(0,m.v9)(e=>e.nodegroups.nodeUniqueLabels),[C,P]=(0,r.useState)({database:(null==f?void 0:null===(n=f.spec)||void 0===n?void 0:null===(a=n.mongodbParams)||void 0===a?void 0:null===(s=a.auth)||void 0===s?void 0:s.database)||"",username:(null==f?void 0:null===(d=f.spec)||void 0===d?void 0:null===(i=d.mongodbParams)||void 0===i?void 0:null===(l=i.auth)||void 0===l?void 0:l.username)||"",password:(null==f?void 0:null===(p=f.spec)||void 0===p?void 0:null===(u=p.mongodbParams)||void 0===u?void 0:null===(c=u.auth)||void 0===c?void 0:c.password)||"",replicaCount:(null==f?void 0:null===(h=f.spec)||void 0===h?void 0:null===(x=h.mongodbParams)||void 0===x?void 0:x.replicaCount)||0,computeClass:(null==f?void 0:null===(g=f.spec)||void 0===g?void 0:null===(v=g.mongodbParams)||void 0===v?void 0:v.computeClass)||""}),L=(0,r.useRef)(C),k=(0,r.useRef)(y);(0,r.useEffect)(()=>{B()(C,L.current)&&B()(y,k.current)||(console.log(),I(),L.current=C,k.current=y)},[C,y,ea.V]);let I=()=>{try{let{database:e,username:s,password:a,replicaCount:t,computeClass:r}=C;f.spec.mongodbParams.auth.database=e,f.spec.mongodbParams.auth.username=s,f.spec.mongodbParams.auth.password=a,f.spec.mongodbParams.replicaCount=t,f.spec.mongodbParams.computeClass=r;let n=y.items.map(e=>e.name===f.name?f:e);j((0,U.Gi)({items:n})),o.ZP.success("MongoDB Params Updated!",{id:"unique-toast-id"})}catch(e){o.ZP.error("Something is wrong! Please try again.")}},_=e=>{let{name:s,value:a}=e.target;P(e=>({...e,[s]:a}))};return(0,t.jsxs)("div",{className:"overflow-visible",children:[w&&y&&(0,t.jsx)("div",{className:"mt-5 grid grid-cols-1 gap-x-6 gap-y-8 sm:grid-cols-8",children:(0,t.jsxs)("div",{className:"sm:col-span-3",children:[(0,t.jsx)(D.Z,{label:"Select ComputeClass",popoverheader:"Select ComputeClass",popovercontent:(0,t.jsx)("p",{children:"Please select the labels for this service. This means the service will run in a particular node! If you want a custom label first add labels in a node!"})}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsxs)("select",{name:"computeClass",value:C.computeClass,onChange:_,className:"block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6",children:[(0,t.jsx)("option",{value:"",children:"Select ComputeClass"}),[...w].map(e=>(0,t.jsx)("option",{value:e,children:e},e))]})})]})}),(0,t.jsx)("div",{className:"mt-5 grid grid-cols-1 gap-x-6 gap-y-8 sm:grid-cols-8",children:(0,t.jsxs)("div",{className:"sm:col-span-3",children:[(0,t.jsx)(D.Z,{label:"Database Name",popoverheader:"Name of the Database",popovercontent:(0,t.jsx)("p",{children:"Please provide the name of your database. It is the specific database you want to connect to."})}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)("input",{name:"database",value:C.database,onChange:_,type:"text",placeholder:"Type your database name",autoComplete:"database-name",className:"block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6"})})]})}),(0,t.jsx)("div",{className:"mt-5 grid grid-cols-1 gap-x-6 gap-y-8 sm:grid-cols-8",children:(0,t.jsxs)("div",{className:"sm:col-span-3",children:[(0,t.jsx)(D.Z,{label:"Username",popoverheader:"Database Username",popovercontent:(0,t.jsx)("p",{children:"Please provide your username here. It is used to connect to your database from your cluster."})}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)("input",{name:"username",value:C.username,onChange:_,type:"text",placeholder:"Type your database username",autoComplete:"username",className:"block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6"})})]})}),(0,t.jsx)("div",{className:"mt-5 grid grid-cols-1 gap-x-6 gap-y-8 sm:grid-cols-8",children:(0,t.jsxs)("div",{className:"sm:col-span-3",children:[(0,t.jsx)(D.Z,{label:"Password",popoverheader:"Database Password",popovercontent:(0,t.jsx)("p",{children:"Please provide your password here. It is used to authenticate connections to your database."})}),(0,t.jsxs)("div",{className:"mt-2 relative",children:[(0,t.jsx)("input",{id:"password",value:C.password,onChange:_,type:b?"text":"password",placeholder:"Type your database password",autoComplete:"current-password",className:"block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6 pr-10"}),(0,t.jsx)("div",{className:"absolute inset-y-0 right-0 pr-3 flex items-center",children:(0,t.jsx)("button",{type:"button",onClick:()=>N(!b),className:"text-gray-400 hover:text-gray-500",children:b?(0,t.jsx)(et.Z,{className:"h-5 w-5","aria-hidden":"true"}):(0,t.jsx)(er.Z,{className:"h-5 w-5","aria-hidden":"true"})})})]})]})}),(0,t.jsx)("div",{className:"mt-5 grid grid-cols-1 gap-x-6 gap-y-8 sm:grid-cols-8",children:(0,t.jsxs)("div",{className:"sm:col-span-3",children:[(0,t.jsx)(D.Z,{label:"Replica Count",popoverheader:"Replica Count",popovercontent:(0,t.jsx)("p",{children:"Please provide the replica count. It represents the number of replicas for your database."})}),(0,t.jsxs)("div",{className:"flex items-center justify-left mt-2",children:[(0,t.jsx)("button",{type:"button",onClick:()=>{P(e=>({...e,replicaCount:Math.max(e.replicaCount-1,1)}))},className:"rounded-full bg-indigo-600 p-1 text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600 mr-4",children:(0,t.jsx)(X.Z,{className:"h-5 w-5","aria-hidden":"true"})}),(0,t.jsx)("input",{disabled:!0,name:"replicaCount",value:C.replicaCount,onChange:_,type:"number",className:"w-16 text-center block rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6"}),(0,t.jsx)("button",{type:"button",onClick:()=>{P(e=>({...e,replicaCount:e.replicaCount+1}))},className:"rounded-full bg-indigo-600 p-1 text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600 ml-4",children:(0,t.jsx)(O.Z,{className:"h-5 w-5","aria-hidden":"true"})})]})]})})]})},el=()=>{let e=(0,m.I0)(),s=(0,m.v9)(e=>e.deployment.deploymentLoadedValues),a=a=>{let{name:t,value:r}=a.target;e(es({...s,databackendType:"haveDatabase",[t]:r}))};return(0,t.jsx)(t.Fragment,{children:s?(0,t.jsx)("div",{children:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"mt-2 grid grid-cols-1 gap-x-6 gap-y-8 sm:grid-cols-6",children:(0,t.jsxs)("div",{className:"sm:col-span-3",children:[(0,t.jsx)(D.Z,{label:"Database Connection URI",popoverheader:"Database Connection URI",popovercontent:(0,t.jsx)("p",{children:"Here you put the connection string to your database. So, that we can connect to it. It's the full connection string."})}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)("input",{id:"database_uri",name:"databaseURI",type:"text",placeholder:"",autoComplete:"database_uri",value:s.databaseURI,onChange:a,className:"block w-2/3 rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6"})})]})}),(0,t.jsx)("div",{className:"mt-5 grid grid-cols-1 gap-x-6 gap-y-8 sm:grid-cols-6",children:(0,t.jsxs)("div",{className:"sm:col-span-3",children:[(0,t.jsx)(D.Z,{label:"Metadata Store URI",popoverheader:"Metadata Store URI",popovercontent:(0,t.jsx)("p",{children:"Here you put a connection string of your database. So, that it could be used as metadata store. Otherwise, you can use the same as metadata store."})}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)("input",{id:"metadata-store-uri",name:"metadataStoreURI",type:"text",placeholder:"",autoComplete:"metadata-store-uri",value:s.metadataStoreURI,onChange:a,className:"block w-2/3 rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6"})})]})}),(0,t.jsx)("div",{className:"mt-5 grid grid-cols-1 gap-x-6 gap-y-8 sm:grid-cols-6",children:(0,t.jsxs)("div",{className:"sm:col-span-3",children:[(0,t.jsx)(D.Z,{label:"Artifact Store URI",popoverheader:"Artifact Store URI",popovercontent:(0,t.jsx)("p",{children:"Artifact Store is a place where we store the artifacts. You can use the same as artifact store."})}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)("input",{id:"artifact_database_uri",name:"artifactStoreURI",type:"text",placeholder:"",autoComplete:"artifact_database_uri",value:s.artifactStoreURI,onChange:a,className:"block w-2/3 rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6"})})]})})]})}):(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(i.Z,{})})})};function ei(){for(var e=arguments.length,s=Array(e),a=0;a{var e;let s=(0,m.I0)(),a=(0,m.v9)(e=>e.chartsgroups.chartsLoadedValues),n=(0,m.v9)(e=>e.nodegroups.nodeUniqueLabels),l=(0,m.v9)(e=>e.deployment.deploymentLoadedValues),[o,d]=(0,r.useState)("deployDatabase"),[c,u]=(0,r.useState)({databaseURI:"",databaseType:"",metadataStoreURI:"",artifactStoreURI:""});return(0,r.useEffect)(()=>{s(es({databackendType:o,...c}))},[c,o,s,a]),(0,t.jsx)(t.Fragment,{children:l&&n?(0,t.jsxs)("div",{children:[(0,t.jsxs)($.E,{value:l.databackendType,onChange:d,children:[(0,t.jsx)($.E.Label,{className:"text-base font-semibold leading-6 text-gray-900"}),(0,t.jsx)("div",{className:"mt-4 grid grid-cols-1 gap-y-6 sm:grid-cols-3 sm:gap-x-4",children:[{id:"deployDatabase",title:"Deploy a database",description:"We can deploy a database for you, and you can start using it right away.",users:"Deploy database",disabled:!1,active:!0},{id:"haveDatabase",title:"Connect existing database",description:"If you have a database, select this option and add the uri below.",users:"Host existing data",disabled:!1,active:!1}].map(e=>(0,t.jsx)($.E.Option,{disabled:e.disabled,value:e.id,className:e=>{let{checked:s,active:a}=e;return ei(s?"border-transparent":"border-gray-300",a?"border-indigo-600 ring-2 ring-indigo-600":"","relative flex cursor-pointer rounded-lg border bg-white p-4 shadow-sm focus:outline-none")},children:s=>{let{checked:a,active:r}=s;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"flex flex-1",children:(0,t.jsxs)("span",{className:"flex flex-col",children:[(0,t.jsx)($.E.Label,{as:"span",className:"block text-sm font-medium text-gray-900",children:e.title}),(0,t.jsx)($.E.Description,{as:"span",className:"mt-1 flex items-center text-sm text-gray-500",children:e.description}),(0,t.jsx)($.E.Description,{as:"span",className:"mt-6 text-sm font-medium text-gray-900",children:e.users})]})}),(0,t.jsx)(Q.Z,{className:ei(a?"":"invisible","h-5 w-5 text-indigo-600"),"aria-hidden":"true"}),(0,t.jsx)("span",{className:ei(r?"border":"border-2",a?"border-indigo-600":"border-transparent","pointer-events-none absolute -inset-px rounded-lg"),"aria-hidden":"true"})]})}},e.id))})]}),(0,t.jsx)("br",{}),"deployDatabase"===o&&(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("div",{className:"sm:col-span-3",children:[(0,t.jsx)("label",{htmlFor:"database-type",className:"block text-sm font-medium leading-6 text-gray-900",children:"Select Database"}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsxs)("select",{id:"database-type",name:"databaseType",autoComplete:"database-type",className:"block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:max-w-xs sm:text-sm sm:leading-6",value:c.databaseType,onChange:e=>{let{name:s,value:a}=e.target;u(e=>({...e,[s]:a}))},children:[(0,t.jsx)("option",{value:"",children:"Select Database"}),(null==a?void 0:a.items)&&(null==a?void 0:a.items.filter(e=>{var s;return(null==e?void 0:null===(s=e.spec)||void 0===s?void 0:s.category)==="databases"}).map(e=>e.name).map(e=>(0,t.jsx)("option",{value:e,children:e.toLowerCase()},e)))]})}),a&&"mongodb"==c.databaseType&&(null==a?void 0:null===(e=a.items)||void 0===e?void 0:e.map((e,s)=>(0,t.jsx)(t.Fragment,{children:"mongodb"==e.name&&(0,t.jsx)(en,{data:e},s)})))]})}),"haveDatabase"===o&&(0,t.jsx)(el,{})]}):(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(i.Z,{})})})},ed=a(64520),ec=a(81695),eu=a(72513),em=a(98348),ep=e=>{var s,a;let{data:n}=e,l=(0,m.I0)(),i=(0,m.v9)(e=>e.chartsgroups.chartsLoadedValues),o=(0,m.v9)(e=>e.nodegroups.nodeUniqueLabels),[d,c]=(0,r.useState)({computeClass:(null==n?void 0:null===(a=n.spec)||void 0===a?void 0:null===(s=a.monitoringParams)||void 0===s?void 0:s.computeClass)||""}),u=(0,r.useRef)(d);(0,r.useEffect)(()=>{B()(d,u.current)||(p(),u.current=d)},[d]),(0,m.v9)(e=>e.nodegroups.nodeLoadedValues);let p=()=>{if(i&&i.items){var e,s;let a=(e=i.items,s=d.computeClass,function e(a){if(Array.isArray(a))return a.map(s=>e(s));if("object"!=typeof a||null===a)return a;for(let t in a)a[t]=e(a[t]),"computeClass"===t&&(a[t]=s);return a}(e));l((0,U.Gi)({items:a}))}else console.error("chartsgroups or chartsgroups.items is undefined")};return(0,t.jsx)("div",{children:o&&(0,t.jsx)("div",{className:"mt-1 grid grid-cols-1 gap-x-6 gap-y-8 sm:grid-cols-6",children:(0,t.jsxs)("div",{className:"sm:col-span-3",children:[(0,t.jsx)(D.Z,{label:"Select Default ComputeClass for services",popoverheader:"Select Default ComputeClass",popovercontent:(0,t.jsx)("p",{children:"Please select the default compute class for all of the services and databases. If you have workloads that have unique hardware requirements, such as performing machine learning or AI tasks, needing specific CPU platforms and architecture, or needing performance isolation among users, Superduper offers compute classes. These compute classes are a curated subset of the infrastructure machine types. You can assign a compute class to a workload to ensure that it runs on the right type of machine."})}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsxs)("select",{name:"computeClass",value:d.computeClass,onChange:e=>{let{name:s,value:a}=e.target;c(e=>({...e,[s]:a}))},className:"block w-2/3 rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6",children:[(0,t.jsx)("option",{value:"",children:"Select Default ComputeClass for services"},"defaults"),o&&o.length>0?[...o].map(e=>e&&(0,t.jsx)("option",{value:e,children:e},e)):[(0,t.jsx)("option",{value:"default",children:"default"},"default")]]})})]})})})},ex=a(45696),eh=a.n(ex);function ev(e){let s=new Set;return e&&Array.isArray(e.items)?(e.items.forEach(e=>{var a,t,r,n,l,i;let{spec:o={}}=e;if(null===(a=o.jupyterhubParams)||void 0===a?void 0:a.image){let{name:e,tag:a}=o.jupyterhubParams.image;s.add("".concat(e,":").concat(a))}if(null===(t=o.restParams)||void 0===t?void 0:t.image){let{name:e,tag:a}=o.restParams.image;s.add("".concat(e,":").concat(a))}if(null===(r=o.vectorsearchParams)||void 0===r?void 0:r.image){let{name:e,tag:a}=o.vectorsearchParams.image;s.add("".concat(e,":").concat(a))}if(null===(n=o.rayParams)||void 0===n?void 0:n.image){let{name:e,tag:a}=o.rayParams.image;s.add("".concat(e,":").concat(a))}if(null===(l=o.cdcParams)||void 0===l?void 0:l.image){let{name:e,tag:a}=o.cdcParams.image;s.add("".concat(e,":").concat(a))}if(null===(i=o.schedulerParams)||void 0===i?void 0:i.image){let{name:e,tag:a}=o.schedulerParams.image;s.add("".concat(e,":").concat(a))}}),Array.from(s)):(console.warn("Data is undefined or data.items is not an array"),[])}var eg=e=>{var s,a;let{data:n}=e,l=(0,m.I0)(),i=(0,m.v9)(e=>e.chartsgroups.chartsLoadedValues),d=(0,m.v9)(e=>e.nodegroups.nodeUniqueLabels),[c,u]=(0,r.useState)({computeClass:(null==n?void 0:null===(a=n.spec)||void 0===a?void 0:null===(s=a.monitoringParams)||void 0===s?void 0:s.computeClass)||""});return(0,t.jsx)("div",{children:d&&(0,t.jsx)("div",{className:"mt-5 grid grid-cols-1 gap-x-6 gap-y-8 sm:grid-cols-6",children:(0,t.jsxs)("div",{className:"sm:col-span-3",children:[(0,t.jsx)(D.Z,{label:"Update Default Image",popoverheader:"Update Default Image",popovercontent:(0,t.jsx)("p",{children:"Please select the default Docker image for all services. All our services use the same Docker image."})}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)("input",{name:"imageandtag",value:ev(i)&&ev(i).length>0?ev(i)[0]:"Enter image and tag",onChange:e=>{u(s=>({...s,[e.target.name]:e.target.value}));try{let{value:s}=e.target,{name:a,tag:t}=function(e){let s=e.indexOf(":");return -1===s?{name:e,tag:"latest"}:{name:e.substring(0,s),tag:e.substring(s+1)}}(s),r=i.items.map(e=>{for(let s of Object.keys(e.spec))s.endsWith("Params")&&e.spec[s].image&&(e.spec[s].image.name=a,e.spec[s].image.tag=t);return e});console.log("Updated items:",r),l((0,U.Gi)({items:r})),o.ZP.success("Image parameters updated successfully!",{id:"updateImageParams"})}catch(e){o.ZP.error("Something went wrong! Please try again.",{id:"updateImageParamsError"}),console.error("Update failed:",e)}},className:"block w-2/3 rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6",placeholder:ev(i)&&ev(i).length>0?ev(i)[0]:"Enter image and tag"})})]})})})},ef=a(13333),ej=a(95417),ey=a(37727),eb=a(82869);let eN=e=>s=>s({type:eb.I,payload:e});var ew=a(74859),eC=e=>{let{data:s}=e,a=(0,m.I0)(),[n,l]=(0,r.useState)([]),i=(0,r.useRef)(null),d=(0,m.v9)(e=>e.extraEnvVars),c=(e,s,t)=>{let r=[...d];r[e][s]=t.target.value,a(eN(eh()(r)))};(0,r.useEffect)(()=>{var e;let s=[...d],t=((e=ew.env.NEXT_PUBLIC_API_DEFAULT_ENV)?e.split(",").map(e=>e.trim()):(console.error("NEXT_PUBLIC_API_DEFAULT_ENV is not defined or empty."),[])).filter(e=>!s.some(s=>s.name===e));t.length>0&&(t.forEach(e=>{s.push({name:e,value:""})}),a(eN(eh()(s))))},[a,d]);let p=e=>{let s=d.filter((s,a)=>a!==e);a(eN(eh()(s))),l(n.filter((s,a)=>a!==e))},x=e=>{l(s=>{let a=[...s];return a[e]=!a[e],a})};return d&&Array.isArray(d)?(0,t.jsxs)("div",{children:[d.map((e,s)=>(0,t.jsx)("div",{className:"relative mt-5 grid grid-cols-1 sm:grid-cols-2 gap-x-6 gap-y-8",children:(0,t.jsxs)("div",{className:"sm:col-span-1 grid grid-cols-2 gap-x-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(D.Z,{label:"Key",popoverheader:"Key",popovercontent:(0,t.jsx)("p",{children:"Enter the key for the environment variable."})}),(0,t.jsx)("input",{name:"name-".concat(s),value:e.name,onChange:e=>c(s,"name",e),className:"mt-2 block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6",placeholder:"Enter key"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(D.Z,{label:"Value",popoverheader:"Value",popovercontent:(0,t.jsx)("p",{children:"Enter the value for the environment variable."})}),(0,t.jsxs)("div",{className:"mt-2 flex items-center space-x-4 w-3xl max-w-md",children:[(0,t.jsxs)("div",{className:"relative flex-1",children:[(0,t.jsx)("input",{name:"value-".concat(s),value:e.value,type:n[s]?"text":"password",onChange:e=>c(s,"value",e),placeholder:"Enter value",className:"block w-3xl rounded-md border-0 py-1.5 pr-10 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6"}),(0,t.jsx)("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3 cursor-pointer",onClick:()=>x(s),children:n[s]?(0,t.jsx)(et.Z,{className:"h-5 w-5 text-gray-400 hover:text-gray-600"}):(0,t.jsx)(er.Z,{className:"h-5 w-5 text-gray-400 hover:text-gray-600"})})]}),(0,t.jsx)(u.z,{variant:"ghost",onClick:()=>p(s),className:"bg-black text-white hover:bg-red-500 hover:text-white dark:hover:bg-red-900 px-2",children:(0,t.jsx)(ef.Z,{className:"h-4 w-4"})})]})]})]})},s)),(0,t.jsxs)("div",{className:"flex space-x-4 mt-4",children:[(0,t.jsxs)(u.z,{onClick:()=>{a(eN(eh()([...d,{name:"",value:""}]))),l([...n,!1])},children:[(0,t.jsx)(ej.Z,{className:"mr-2 h-4 w-4"}),"Add Secret"]}),(0,t.jsxs)(u.z,{onClick:()=>i.current.click(),children:[(0,t.jsx)(ey.Z,{className:"mr-2 h-4 w-4"}),"Upload Secret File"]}),(0,t.jsx)("input",{ref:i,type:"file",onChange:e=>{let s=e.target.files[0];try{if(s){let e=new FileReader;e.onload=e=>{let s=e.target.result.split("\n").map(e=>{let[s,a]=e.split("=").map(e=>e.trim());return{name:s,value:a}}).filter(e=>e.name&&e.value);a(eN(eh()([...d,...s]))),l(e=>[...e,...Array(s.length).fill(!1)])},e.readAsText(s)}}catch(e){console.error(e),o.ZP.error("Failed to parse the file. Please try again with .env or .txt format.")}},style:{display:"none"}})]})]}):null},eP=a(76741),eL=a(11952);let ek=e=>s=>s({type:eL.e,payload:e});var eI=a(74859);function e_(e){try{if(e&&Array.isArray(e.items))return e.items.map(e=>e.status.uid);if(e&&(null==e?void 0:e.status)&&(null==e?void 0:e.status.uid))return[e.status.uid]}catch(e){console.error("Error processing payload:",e)}return[]}var eS=e=>{let{data:s}=e,a=(0,m.I0)(),[l,i]=(0,r.useState)([]),d=(0,m.v9)(e=>e.deploymentName.deploymentNameLoadedValues.name),c=(0,m.v9)(e=>{var s;return null==e?void 0:null===(s=e.userInfo)||void 0===s?void 0:s.userInfoLoadedValues}),[p,x]=(0,r.useState)([]),h=(0,m.v9)(e=>e.environment.environmentLoadedValues),v=(0,r.useRef)(null),g=(0,m.v9)(e=>e.extraEnvVars),f=(0,m.v9)(e=>e.secrets),j=(e,s,t)=>{let r=[...g];r[e][s]=t.target.value,a(eN(eh()(r)))};(0,r.useEffect)(()=>{function e(e){let s=[...g],t=e.filter(e=>!s.some(s=>s.name===e));t.length>0&&(t.forEach(e=>{s.push({name:e,value:""})}),a(eN(eh()(s))))}let s=s=>(console.error("Error occurred:",s),console.log("Using fallback logic. Returning an empty array."),e([]),[]),t=async()=>{try{let s="".concat(eI.env.NEXT_PUBLIC_API,"/secrets?deployment=").concat(d),t=await n.Z.get(s,{headers:{Accept:"application/json",Authorization:(0,_.Z)(c),superduper_reverse_proxy:eI.env.NEXT_PUBLIC_API||h.NEXT_PUBLIC_API}});console.log("Secrets retrieved successfully:",t.data);let r=function(e){try{if(e&&Array.isArray(e.items))return e.items.map(e=>e.name)}catch(e){console.error("Error processing payload:",e)}return[]}(t.data),l=e_(t.data);return a(ek([l])),x(r),e(r),r}catch(e){return s(e)}};(async()=>{console.log("Final secrets array:",await t())})()},[]);let y=async e=>{try{let s={headers:{Accept:"application/json",Authorization:(0,_.Z)(c),superduper_reverse_proxy:eI.env.NEXT_PUBLIC_API||h.NEXT_PUBLIC_API}},t=g[e];if(t){let e="".concat(eI.env.NEXT_PUBLIC_API,"/secrets/").concat(t.name,"?deployment=").concat(d);try{let a=await n.Z.delete(e,s);console.log("API Response:",a.data)}catch(e){console.error("Failed to delete secret ".concat(t.name,":"),e),o.ZP.error("Error removing secret: ".concat(t.name));return}}let r=g.filter((s,a)=>a!==e),u=eh()(r);a(eN(u)),i(l.filter((s,a)=>a!==e))}catch(e){console.error("Unexpected error in removing secrets:",e),o.ZP.error("An unexpected error occurred. Please try again.")}},b=e=>{i(s=>{let a=[...s];return a[e]=!a[e],a})},N=async()=>{try{let e=g||[];console.log("Updated environment variables:",e);let s={headers:{Accept:"application/json",Authorization:(0,_.Z)(c),superduper_reverse_proxy:eI.env.NEXT_PUBLIC_API||h.NEXT_PUBLIC_API}};for(let t of e){if(!t.value||"hidden"===t.value){console.log("Skipping variable: ".concat(t.name," with value: ").concat(t.value));continue}if(console.log("Processing variable: ".concat(t.name," with value: ").concat(t.value)),p.includes(t.name))try{let e="".concat(eI.env.NEXT_PUBLIC_API,"/secrets/").concat(t.name,"?deployment=").concat(d),r={name:t.name,spec:{stringData:{[t.name]:t.value},type:"Opaque"}},l=await n.Z.put(e,r,s);console.log("Response:",l.data);let i=e_(l.data);a(ek([...f[0],...i])),console.log("Response:",l.data)}catch(e){console.error("Error updating secret:",e),o.ZP.error("Failed to update secret: ".concat(t.name))}else try{let e="".concat(eI.env.NEXT_PUBLIC_API,"/secrets?deployment=").concat(d),r={name:t.name,spec:{stringData:{[t.name]:t.value},type:"Opaque"}},l=await n.Z.post(e,r,s);console.log("Response:",l.data);let i=e_(l.data);a(ek([...f[0],...i])),x([...p,t.name]),console.log("Response:",l.data)}catch(e){console.error("Error creating secret:",e),o.ZP.error("Failed to create secret: ".concat(t.name))}}o.ZP.success("Environment variables saved successfully!")}catch(e){console.error("Error saving environment variables:",e),o.ZP.error("Failed to save environment variables. Please try again.")}};return g&&Array.isArray(g)?(0,t.jsxs)("div",{children:[g.map((e,s)=>(0,t.jsx)("div",{className:"relative mt-5 grid grid-cols-1 sm:grid-cols-2 gap-x-6 gap-y-8",children:(0,t.jsxs)("div",{className:"sm:col-span-1 grid grid-cols-2 gap-x-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(D.Z,{label:"Key",popoverheader:"Key",popovercontent:(0,t.jsx)("p",{children:"Enter the key for the environment variable."})}),(0,t.jsx)("input",{name:"name-".concat(s),value:e.name,onChange:e=>j(s,"name",e),className:"mt-2 block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6",placeholder:"Enter key"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(D.Z,{label:"Value",popoverheader:"Value",popovercontent:(0,t.jsx)("p",{children:"Enter the value for the environment variable."})}),(0,t.jsxs)("div",{className:"mt-2 flex items-center space-x-4 w-3xl max-w-md",children:[(0,t.jsxs)("div",{className:"relative flex-1",children:[(0,t.jsx)("input",{name:"value-".concat(s),value:e.value,type:l[s]?"text":"password",onChange:e=>j(s,"value",e),placeholder:"Enter value",className:"block w-3xl rounded-md border-0 py-1.5 pr-10 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6"}),(0,t.jsx)("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3 cursor-pointer",onClick:()=>b(s),children:l[s]?(0,t.jsx)(et.Z,{className:"h-5 w-5 text-gray-400 hover:text-gray-600"}):(0,t.jsx)(er.Z,{className:"h-5 w-5 text-gray-400 hover:text-gray-600"})})]}),(0,t.jsx)(u.z,{variant:"ghost",onClick:()=>y(s),className:"bg-black text-white hover:bg-red-500 hover:text-white dark:hover:bg-red-900 px-2",children:(0,t.jsx)(ef.Z,{className:"h-4 w-4"})})]})]})]})},s)),(0,t.jsxs)("div",{className:"flex items-center space-x-4 mt-6",children:[(0,t.jsxs)(u.z,{onClick:()=>{a(eN(eh()([...g,{name:"",value:""}]))),i([...l,!1])},children:[(0,t.jsx)(ej.Z,{className:"mr-2 h-4 w-4"}),"Add Secret"]}),(0,t.jsxs)(u.z,{onClick:()=>v.current.click(),children:[(0,t.jsx)(ey.Z,{className:"mr-2 h-4 w-4"}),"Upload Secret File"]}),(0,t.jsxs)(u.z,{onClick:N,className:"ml-auto bg-green-500 hover:bg-green-600 text-white px-6 py-2 w-64",children:[(0,t.jsx)(eP.Z,{className:"mr-2 h-5 w-5"}),"Save Secrets"]}),(0,t.jsx)("input",{ref:v,type:"file",onChange:e=>{let s=e.target.files[0];try{if(s){let e=new FileReader;e.onload=e=>{let s=e.target.result.split("\n").map(e=>{let[s,a]=e.split("=").map(e=>e.trim());return{name:s,value:a}}).filter(e=>e.name&&e.value);a(eN(eh()([...g,...s]))),i(e=>[...e,...Array(s.length).fill(!1)])},e.readAsText(s)}}catch(e){console.error(e),o.ZP.error("Failed to parse the file. Please try again with .env or .txt format.")}},style:{display:"none"}})]})]}):null};a(87625),a(2854),a(45246);var eA=a(46346),eE=a(58991),eZ=a(74859);function eR(){let e=(0,m.v9)(e=>e.environment.environmentLoadedValues),s=(0,m.v9)(e=>{var s;return null==e?void 0:null===(s=e.userInfo)||void 0===s?void 0:s.userInfoLoadedValues}),a=(0,m.v9)(e=>e.secrets),i=(0,ec.useRouter)(),d=(0,m.v9)(e=>e.deploymentName.deploymentNameLoadedValues.name),c=(0,m.v9)(e=>e.chartsgroups.chartsLoadedValues),u=(0,m.v9)(e=>e.nodegroups.nodeLoadedValues),p=(0,m.v9)(e=>e.deployment.deploymentLoadedValues),x=(0,m.v9)(e=>e.extraEnvVars),[v,g]=(0,r.useState)("Something went wrong while creating the deployment. Please try again later."),[f,j]=(0,r.useState)(!1),[y,b]=(0,r.useState)(!1),[N,w]=(0,r.useState)(!1),[C,P]=(0,r.useState)(!1),L=async()=>{let t;try{if("true"==eZ.env.NEXT_PUBLIC_SNOWFLAKE&&(null==p?void 0:p.databaseURI)===""){o.ZP.error("Database URI is missing.",{duration:5e3});return}window.scrollTo({top:0,behavior:"smooth"});let r={name:d,spec:{fake:!!d.startsWith("fake"),dataEndpoints:{artifactStore:{backendType:"",connectionURI:(null==p?void 0:p.artifactStoreURI)||""},dataStore:{backendType:"",connectionURI:(null==p?void 0:p.databaseURI)||""},metadataStore:{backendType:"",connectionURI:(null==p?void 0:p.metadataStoreURI)||""},extraEnvVars:"true"==eZ.env.NEXT_PUBLIC_SNOWFLAKE?[]:x||[]},nodeGroupList:u.items.map(e=>{let{status:s,...a}=e;return a}).filter(e=>{var s;return(null==e?void 0:null===(s=e.spec)||void 0===s?void 0:s.extraComputeClass)&&e.spec.extraComputeClass.length>0}),secrets:"true"==eZ.env.NEXT_PUBLIC_SNOWFLAKE&&a||[],serviceList:c.items.map(e=>{let{status:s,...a}=e;return a}).filter(e=>{if("true"===eZ.env.NEXT_PUBLIC_SNOWFLAKE){var s;return(null==e?void 0:null===(s=e.spec)||void 0===s?void 0:s.category)!=="databases"&&(null==e?void 0:e.name)!=="mongodb"&&(null==e?void 0:e.name)!=="monitoring"}return!0}).filter(e=>{let{name:s}=e;return!("mongodb"===s&&((null==p?void 0:p.artifactStoreURI)||(null==p?void 0:p.databaseURI)||(null==p?void 0:p.metadataStoreURI)))})}};P(!0),console.log("\uD83D\uDC49 REQUEST DATA",r);let l={headers:{Accept:"application/json","Content-Type":"application/json",Authorization:(0,_.Z)(s),superduper_reverse_proxy:eZ.env.NEXT_PUBLIC_API||e.NEXT_PUBLIC_API}};j(!0),t=o.ZP.loading("Deployment in progress...",{duration:1/0}),await new Promise(e=>setTimeout(e,3e3));let i=await n.Z.post("".concat("".concat(eZ.env.NEXT_PUBLIC_API,"/deployments")),r,l);console.log("RESULT:",i.data),await new Promise(e=>setTimeout(e,5e3)),o.ZP.dismiss(t),window.location.assign("/webui?deployment=done&query=1m"),o.ZP.success("Deployment successful!",{icon:"\uD83D\uDE80",duration:5e3})}catch(e){var r,l;t&&o.ZP.dismiss(t),e.response&&"true"===eZ.env.NEXT_PUBLIC_SNOWFLAKE&&200!==e.response.status&&400!==e.response.status?(console.error("Deployment Form Submission Error:",e.response.data),g((null===(r=e.response)||void 0===r?void 0:r.data)||e.message)):(console.error("Deployment Form Submission Error:",e),g((null===(l=e.response)||void 0===l?void 0:l.data)||e.message)),w(!0),o.ZP.error("Deployment failed. Please try again.",{duration:5e3})}finally{P(!1),j(!1),b(!1)}},k=async()=>{let t;try{if("true"==eZ.env.NEXT_PUBLIC_SNOWFLAKE&&(null==p?void 0:p.databaseURI)===""){o.ZP.error("Database URI is missing.",{duration:5e3});return}let r={name:d,spec:{fake:!!d.startsWith("fake"),dataEndpoints:{artifactStore:{backendType:"",connectionURI:(null==p?void 0:p.artifactStoreURI)||""},dataStore:{backendType:"",connectionURI:(null==p?void 0:p.databaseURI)||""},metadataStore:{backendType:"",connectionURI:(null==p?void 0:p.metadataStoreURI)||""},extraEnvVars:"true"==eZ.env.NEXT_PUBLIC_SNOWFLAKE?[]:x||[]},nodeGroupList:u.items.map(e=>{let{status:s,...a}=e;return a}).filter(e=>{var s;return(null==e?void 0:null===(s=e.spec)||void 0===s?void 0:s.extraComputeClass)&&e.spec.extraComputeClass.length>0}),secrets:"true"==eZ.env.NEXT_PUBLIC_SNOWFLAKE&&a||[],serviceList:c.items.map(e=>{let{status:s,...a}=e;return a}).filter(e=>{if("true"===eZ.env.NEXT_PUBLIC_SNOWFLAKE){var s;return(null==e?void 0:null===(s=e.spec)||void 0===s?void 0:s.category)!=="databases"&&(null==e?void 0:e.name)!=="mongodb"&&(null==e?void 0:e.name)!=="monitoring"}return!0}).filter(e=>{let{name:s}=e;return!("mongodb"===s&&((null==p?void 0:p.artifactStoreURI)||(null==p?void 0:p.databaseURI)||(null==p?void 0:p.metadataStoreURI)))})}};console.log("\uD83D\uDC49 REQUEST DATA",r),j(!0),t=o.ZP.loading("Retrying deployment...",{duration:1/0}),await new Promise(e=>setTimeout(e,5e3));let l={headers:{Accept:"application/json","Content-Type":"application/json",Authorization:(0,_.Z)(s),superduper_reverse_proxy:eZ.env.NEXT_PUBLIC_API||e.NEXT_PUBLIC_API}},m=await n.Z.post("".concat("".concat(eZ.env.NEXT_PUBLIC_API,"/deployments")),r,l);console.log("RESULT:",m.data),await new Promise(e=>setTimeout(e,5e3)),o.ZP.dismiss(t),o.ZP.success("Deployment is successful.",{duration:5e3}),i.push("/webui?deployment=done&query=1m",void 0,{shallow:!1}),b(!1)}catch(e){if(t&&o.ZP.dismiss(t),e.response&&200!==e.response.status&&400!==e.response.status)console.error("Deployment Form Submission Error:",e.response.data),i.push("/webui?deployment=done&query=1m",void 0,{shallow:!1}),o.ZP.success("Deployment successful!",{icon:"\uD83D\uDE80",duration:5e3});else{var r;console.error("Deployment Form Submission Error:",e),g((null===(r=e.response)||void 0===r?void 0:r.data)||e.message),w(!0),o.ZP.error("Deployment retry failed. Please try again.",{duration:5e3})}}finally{j(!1),b(!1)}};return f?(0,t.jsx)(eE.Z,{}):(0,t.jsxs)(t.Fragment,{children:[" ",(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"pb-2",children:[(0,t.jsx)("h2",{className:"text-base font-semibold leading-7 text-gray-900",children:"Step 1: Set Compute Classes"}),(0,t.jsx)("p",{className:"mt-1 text-sm leading-6 text-gray-600",children:"ComputeClass enables users to influence the scheduling of Services on nodes based on specific criteria such as hardware capabilities, geographic location, or other custom requirements."})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(E,{}),(0,t.jsx)(ep,{}),(0,t.jsx)("br",{})]}),(0,t.jsxs)("div",{className:"border-b border-gray-900/10 pb-12",children:[(0,t.jsx)("h2",{className:"text-base font-semibold leading-7 text-gray-900",children:"Step 2: Add Databackend"}),(0,t.jsx)("p",{className:"mt-1 text-sm leading-6 text-gray-600",children:"At first you have to add a database to your deployment. You can update the parameters below. We will deploy and handle the rest."}),(0,t.jsx)("br",{}),"true"!==eZ.env.NEXT_PUBLIC_SNOWFLAKE?(0,t.jsx)(eo,{}):(0,t.jsx)(el,{})]}),(0,t.jsx)("br",{}),(0,t.jsxs)("div",{className:"pb-4",children:[(0,t.jsx)("h2",{className:"text-base font-semibold leading-7 text-gray-900",children:"Step 3: Define Parameters"}),(0,t.jsx)("p",{className:"mt-1 text-sm leading-6 text-gray-600",children:"Update the services you want to install on your deployment. You can click on the service to edit the configuration."}),(0,t.jsxs)("div",{style:{marginLeft:"-1.5rem!important"},children:[(0,t.jsx)(eg,{}),"true"==eZ.env.NEXT_PUBLIC_SNOWFLAKE?(0,t.jsx)(eS,{}):(0,t.jsx)(eC,{}),(0,t.jsx)(H,{})]})]}),(0,t.jsxs)("div",{className:"mt-6 flex items-center justify-end gap-x-6",children:[(0,t.jsx)(l.default,{href:"/webui",children:(0,t.jsx)("button",{type:"button",className:"text-sm font-semibold leading-6 text-gray-900",children:"Cancel"})}),(0,t.jsxs)(ed.aR,{children:[(0,t.jsx)(ed.vW,{className:"rounded-md bg-indigo-600 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600",children:"Start Deployment"}),(0,t.jsxs)(ed._T,{children:[(0,t.jsxs)(ed.fY,{children:[(0,t.jsx)(ed.f$,{children:"Start creating deployment now..."}),(0,t.jsx)(ed.yT,{children:"This will create a deployment and it will take some time to finish. Please be patient. Do you want to continue?"})]}),(0,t.jsxs)(ed.xo,{children:[(0,t.jsx)(ed.le,{children:"Cancel"}),(0,t.jsx)(ed.OL,{onClick:()=>{b(!0),L()},children:"Continue"})]})]})]})]}),(0,t.jsx)(ed.aR,{open:y,children:(0,t.jsx)(ed._T,{children:(0,t.jsxs)(ed.fY,{children:[(0,t.jsx)(ed.f$,{children:"Started deployment process..."}),(0,t.jsx)(ed.yT,{children:"This initiates a deployment process that may take some time. Please wait patiently. You'll be redirected to the dashboard once it's complete."}),(0,t.jsx)("br",{}),(0,t.jsx)(em.O,{})]})})}),(0,t.jsx)(ed.aR,{open:N,children:(0,t.jsxs)(ed._T,{children:[(0,t.jsxs)(ed.fY,{children:[(0,t.jsx)(ed.f$,{children:"Deployment Failed"}),(0,t.jsx)(ed.yT,{children:(0,t.jsxs)(eu.bZ,{variant:"destructive",children:[(0,t.jsx)(h.LPM,{className:"h-4 w-4"}),(0,t.jsx)(eu.Cd,{children:"Error"}),(0,t.jsx)(eA.x,{className:"scrollbar-visible h-[200px] w-full mt-2 pr-4",children:(0,t.jsx)(eu.X,{children:v})})]})})]}),(0,t.jsxs)(ed.xo,{children:[(0,t.jsx)(ed.le,{onClick:()=>{w(!1),b(!1)},children:"Cancel"}),(0,t.jsx)(ed.OL,{onClick:()=>{b(!0),w(!1),k()},children:"Retry Now"})]})]})})]})]})}},87625:function(e,s,a){a.d(s,{Z:function(){return R}});var t=a(27573),r=a(7653),n=a(64544),l=a(45034),i=a(97370),o=a(903),d=a(12900),c=a(13908),u=a(93296),m=a(412),p=a(81695),x=a(98348),h=a(85688),v=a(88623),g=a(38983),f=a(87354),j=a(18580),y=a(36531),b=a(42502);let N=[{label:"Off",value:0},{label:"30s",value:3e4},{label:"1m",value:6e4},{label:"2m",value:12e4},{label:"5m",value:3e5},{label:"10m",value:6e5}];function w(){let e=(0,p.useRouter)(),s=(0,p.useSearchParams)(),[a,n]=(0,r.useState)(N[0]),[l,i]=(0,r.useState)(!1);(0,r.useEffect)(()=>{let e=s.get("query");if(e){let s=N.find(s=>s.label.toLowerCase()===e.toLowerCase());s&&n(s)}},[s]),(0,r.useEffect)(()=>{if(a.value>0){let e=setInterval(()=>{let e=new URL(window.location.href);e.searchParams.set("query",a.label),window.history.replaceState(null,"",e.toString()),window.location.reload()},a.value);return()=>clearInterval(e)}},[a,e]);let o=e=>{n(e),i(!1);let s=new URL(window.location.href);s.searchParams.set("query",e.label),window.history.replaceState(null,"",s.toString())};return(0,t.jsxs)(b.h_,{open:l,onOpenChange:i,children:[(0,t.jsx)(b.$F,{asChild:!0,children:(0,t.jsxs)(y.z,{variant:"outline",role:"combobox","aria-expanded":l,className:"w-[150px] justify-between bg-background text-sm font-normal",children:[(0,t.jsx)(v.Z,{className:"mr-2 h-4 w-4"}),a.label,(0,t.jsx)(g.Z,{className:"ml-auto h-4 w-4 shrink-0 opacity-50"})]})}),(0,t.jsx)(b.AW,{className:"w-[150px]",children:N.map(e=>(0,t.jsxs)(b.Xi,{onSelect:()=>o(e),children:[(0,t.jsx)(f.Z,{className:(0,j.cn)("mr-2 h-4 w-4",a.value===e.value?"opacity-100":"opacity-0")}),e.label]},e.value))})]})}var C=a(64520),P=a(72513),L=a(1930),k=a(97747),I=a(87191),_=a(24776),S=a(7109),A=a(13333),E=a(74859);function Z(){for(var e=arguments.length,s=Array(e),a=0;ae.environment.environmentLoadedValues),[v,g]=(0,r.useState)("Something went wrong while creating the deployment. Please try again later."),f=(0,m.v9)(e=>{var s;return null==e?void 0:null===(s=e.userInfo)||void 0===s?void 0:s.userInfoLoadedValues}),[j,y]=(0,r.useState)(!1),[b,N]=(0,r.useState)(!1),[R,U]=(0,r.useState)(!1),[T,B]=(0,r.useState)(!1),D=(0,m.v9)(e=>e.deploymentName.deploymentNameLoadedValues.name),F=(0,m.v9)(e=>e.deploymentAPI.deploymentAPILoadedValues),X=(null==F?void 0:null===(e=F.status)||void 0===e?void 0:e.phase)||"Unknown",O=(null==F?void 0:null===(s=F.status)||void 0===s?void 0:s.message)||"",V=(null==F?void 0:F.name)||D,z=(0,p.useRouter)(),[M,W]=(0,r.useState)(""),[q,G]=(0,r.useState)(!1),Y=async()=>{try{if(V!==M){console.error("No deployment name found"),u.ZP.error("Your typed name is not matched with the deployment name. Type it carefully.",{id:"delete-deployment"});return}N(!0),y(!1);let e=await c.Z.delete("".concat("".concat(E.env.NEXT_PUBLIC_API,"/deployments/").concat(D)),{headers:{Accept:"application/json",Authorization:(0,S.Z)(f),superduper_reverse_proxy:E.env.NEXT_PUBLIC_API||a.NEXT_PUBLIC_API}});console.log("Deployments API data:",e.data),200===e.status?(console.log("Deployment deleted successfully"),E.env.NEXT_PUBLIC_APPLICATION_URL?z.push("/webui/deployment?deleted=true"):z.push("/webui?deleted=true"),u.ZP.success("Deployment deleted process is running..."),E.env.NEXT_PUBLIC_APPLICATION_URL?window.location.assign("/webui/deployment?deleted=true"):window.location.assign("/webui?deleted=true")):(console.error("Error deleting deployment:",e.data),u.ZP.error("Error deleting deployment",{id:"delete-deployment"}),N(!1),U(!0),g(null==e?void 0:e.data))}catch(s){var e;console.error("Error deleting deployment:",s),N(!1),g((null===(e=s.response)||void 0===e?void 0:e.data)||s.message),U(!0)}};return(0,t.jsxs)(t.Fragment,{children:[V&&(0,t.jsxs)("div",{className:"pb-2",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("h1",{id:"message-heading",className:"text-2xl mb-2 font-semibold text-gray-900",children:"Deployment"}),(0,t.jsx)("div",{className:"mb-2 mr-4",children:(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("div",{children:(0,t.jsxs)("span",{onClick:()=>{window.location.reload()},className:"flex items-center rounded-full bg-white p-2 text-gray-400 hover:text-gray-600 focus:outline-none focus:ring-2 focus:ring-indigo-500",children:[(0,t.jsx)("span",{className:"sr-only",children:"Reload"}),(0,t.jsx)(i.Z,{className:"h-5 w-5","aria-hidden":"true"})]})}),(0,t.jsx)(w,{})]})})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("div",{className:"flex items-center sm:w-0 sm:flex-1",children:(0,t.jsx)("div",{className:"flex items-center gap-x-6",children:(0,t.jsx)("div",{children:(0,t.jsxs)("p",{className:"mt-1 truncate text-base text-gray-500",children:[(0,t.jsx)(d.C,{className:"text-base truncate",children:V}),O&&(0,t.jsxs)(C.aR,{children:[(0,t.jsx)(C.vW,{asChild:!0,children:(0,t.jsx)(d.C,{variant:"outline",className:"ml-2 text-base truncate",children:O.length>24?O.slice(0,24)+"... [Show More]":O})}),(0,t.jsxs)(C._T,{children:[(0,t.jsxs)(C.fY,{children:[(0,t.jsxs)(C.f$,{children:["Status of ",(0,t.jsx)("strong",{children:V})]}),(0,t.jsx)(C.yT,{children:(0,t.jsxs)(P.bZ,{children:[(0,t.jsx)(h.WCv,{className:"h-4 w-4"}),(0,t.jsx)(P.Cd,{children:"Status"}),(0,t.jsx)(P.X,{children:O})]})})]}),(0,t.jsxs)(C.xo,{children:[(0,t.jsx)(C.le,{children:"Cancel"}),(0,t.jsx)(C.OL,{children:"Continue"})]})]})]})]})})})}),(0,t.jsxs)("div",{className:"mt--6 flex items-center justify-between sm:ml-6 sm:mt-0 sm:flex-shrink-0 sm:justify-start gap-x-2",children:[!X&&(0,t.jsxs)("dd",{className:"inline-flex items-center rounded-md bg-green-50 px-2 py-1 text-xs font-medium text-green-700 ring-1 ring-inset ring-green-600/20",children:["Running",(0,t.jsx)("div",{className:"offline flex-none rounded-full p-1",children:(0,t.jsxs)("div",{role:"status",children:[(0,t.jsx)("svg",{className:"w-4 h-4 me-0 text-green-500 dark:text-green-400 flex-shrink-0","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 20 20",children:(0,t.jsx)("path",{d:"M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5Zm3.707 8.207-4 4a1 1 0 0 1-1.414 0l-2-2a1 1 0 0 1 1.414-1.414L9 10.586l3.293-3.293a1 1 0 0 1 1.414 1.414Z"})}),(0,t.jsx)("span",{className:"sr-only",children:"..."})]})})]}),X&&(null==X?void 0:X.toLowerCase())==="running"&&(0,t.jsxs)("dd",{className:"inline-flex items-center rounded-md bg-green-50 px-2 py-1 text-xs font-medium text-green-700 ring-1 ring-inset ring-green-600/20",children:["Running",(0,t.jsx)("div",{className:"offline flex-none rounded-full p-1",children:(0,t.jsxs)("div",{role:"status",children:[(0,t.jsx)("svg",{className:"w-4 h-4 me-0 text-green-500 dark:text-green-400 flex-shrink-0","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 20 20",children:(0,t.jsx)("path",{d:"M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5Zm3.707 8.207-4 4a1 1 0 0 1-1.414 0l-2-2a1 1 0 0 1 1.414-1.414L9 10.586l3.293-3.293a1 1 0 0 1 1.414 1.414Z"})}),(0,t.jsx)("span",{className:"sr-only",children:"..."})]})})]}),X&&(null==X?void 0:X.toLowerCase())==="pending"&&(0,t.jsxs)("dd",{className:"inline-flex items-center rounded-md bg-yellow-50 px-2 py-1 text-xs font-medium text-yellow-700 ring-1 ring-inset ring-yellow-600/20",children:["Pending",(0,t.jsx)("div",{className:"offline flex-none rounded-full p-1",children:(0,t.jsx)("div",{role:"status",children:(0,t.jsxs)("svg",{"aria-hidden":"true",className:"w-4 h-4 me-0 text-gray-200 animate-spin dark:text-white-600 fill-yellow-600",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,t.jsx)("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),(0,t.jsx)("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]})})})]}),X&&(null==X?void 0:X.toLowerCase())==="deploying"&&(0,t.jsxs)("dd",{className:"inline-flex items-center rounded-md bg-yellow-50 px-2 py-1 text-xs font-medium text-yellow-700 ring-1 ring-inset ring-yellow-600/20",children:["Deploying",(0,t.jsx)("div",{className:"offline flex-none rounded-full p-1",children:(0,t.jsx)("div",{role:"status",children:(0,t.jsxs)("svg",{"aria-hidden":"true",className:"w-4 h-4 me-0 text-gray-200 animate-spin dark:text-white-600 fill-yellow-600",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,t.jsx)("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),(0,t.jsx)("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]})})})]}),X&&(null==X?void 0:X.toLowerCase())==="failed"&&(0,t.jsxs)("dd",{className:"inline-flex items-center rounded-md bg-red-50 px-2 py-1 text-xs font-medium text-red-700 ring-1 ring-inset ring-red-600/20",children:["Failed",(0,t.jsx)("div",{className:"offline flex-none rounded-full p-1",children:(0,t.jsx)("div",{role:"status",children:(0,t.jsx)("svg",{className:"w-4 h-4 me-0 text-red-500 dark:text-red-400 flex-shrink-0","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{d:"M2 12a10 10 0 1 1 20 0 10 10 0 0 1-20 0Zm7.7-3.7a1 1 0 0 0-1.4 1.4l2.3 2.3-2.3 2.3a1 1 0 1 0 1.4 1.4l2.3-2.3 2.3 2.3a1 1 0 0 0 1.4-1.4L13.4 12l2.3-2.3a1 1 0 0 0-1.4-1.4L12 10.6 9.7 8.3Z"})})})})]}),(0,t.jsxs)(n.v,{as:"div",className:"relative ml-3 inline-block text-left",children:[(0,t.jsx)("div",{children:(0,t.jsxs)(n.v.Button,{className:"-my-2 flex items-center rounded-full bg-white p-2 text-gray-400 hover:text-gray-600 focus:outline-none focus:ring-2 focus:ring-indigo-500",children:[(0,t.jsx)("span",{className:"sr-only",children:"Open options"}),(0,t.jsx)(o.Z,{className:"h-5 w-5","aria-hidden":"true"})]})}),(0,t.jsx)(l.u,{as:r.Fragment,enter:"transition ease-out duration-100",enterFrom:"transform opacity-0 scale-95",enterTo:"transform opacity-100 scale-100",leave:"transition ease-in duration-75",leaveFrom:"transform opacity-100 scale-100",leaveTo:"transform opacity-0 scale-95",children:(0,t.jsx)(n.v.Items,{className:"absolute right-0 z-10 mt-2 w-56 origin-top-right rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none",children:(0,t.jsxs)("div",{className:"py-1",children:[!0!==E.env.NEXT_PUBLIC_SNOWFLAKE&&(0,t.jsx)(n.v.Item,{children:e=>{let{active:s}=e;return(0,t.jsx)("a",{href:"#",onClick:()=>y(!0),className:Z(s?"bg-gray-100 text-gray-900":"text-gray-700","flex justify-between px-4 py-2 text-sm"),children:(0,t.jsx)("span",{children:"Delete Deployment"})})}}),(0,t.jsx)(n.v.Item,{children:e=>{let{active:s}=e;return(0,t.jsx)("div",{className:Z(s?"bg-gray-100 text-gray-900":"text-gray-700","flex justify-between px-4 py-2 text-sm"),onClick:()=>G(!0),children:(0,t.jsx)("span",{children:"View Deployment in JSON"})})}}),(0,t.jsx)(n.v.Item,{children:e=>{let{active:s}=e;return(0,t.jsx)("a",{href:"mailto:support@superduper.io",className:Z(s?"bg-gray-100 text-gray-900":"text-gray-700","flex justify-between px-4 py-2 text-sm"),children:(0,t.jsx)("span",{children:"Contact Support"})})}})]})})})]})]})]})]}),(0,t.jsxs)(C.aR,{open:j,children:[(0,t.jsx)(C.vW,{}),(0,t.jsxs)(C._T,{children:[(0,t.jsxs)(C.fY,{children:[(0,t.jsx)(C.f$,{children:"Are you absolutely sure?"}),(0,t.jsx)(C.yT,{children:"This action cannot be undone. This will permanently delete your deployment and remove your data. Be aware!"}),(0,t.jsx)("br",{}),(0,t.jsxs)("div",{className:"grid w-full max-w-sm items-center gap-1.5",children:[(0,t.jsxs)(k._,{htmlFor:"deployment-name",children:["Type the deployment name: ",(0,t.jsx)("strong",{children:V})]}),(0,t.jsx)(L.I,{type:"text",id:"deployment-name",placeholder:"Type the deployment name",value:M,onChange:e=>{W(e.target.value)},className:"border border-gray-300 rounded-md p-2"})]})]}),(0,t.jsxs)(C.xo,{children:[(0,t.jsx)(C.le,{onClick:()=>y(!1),children:"Cancel"}),(0,t.jsxs)(C.OL,{onClick:()=>{Y()},variant:"destructive",className:"gap-2 bg-destructive text-destructive-foreground hover:bg-destructive/90",children:[(0,t.jsx)(A.Z,{className:"w-5 h-5"}),"Delete Deployment"]})]})]})]}),(0,t.jsx)(C.aR,{open:b,children:(0,t.jsx)(C._T,{children:(0,t.jsxs)(C.fY,{children:[(0,t.jsx)(C.f$,{children:"Delete Deployment..."}),(0,t.jsx)(C.yT,{children:"This initiates a delete deployment process that may take some time. Please wait patiently. You'll be redirected to the dashboard once it's complete."}),(0,t.jsx)("br",{}),(0,t.jsx)(x.O,{})]})})}),(0,t.jsx)(C.aR,{open:R,children:(0,t.jsxs)(C._T,{children:[(0,t.jsxs)(C.fY,{children:[(0,t.jsx)(C.f$,{children:"Delete Deployment Failed"}),(0,t.jsx)(C.yT,{children:(0,t.jsxs)(P.bZ,{variant:"destructive",children:[(0,t.jsx)(h.LPM,{className:"h-4 w-4"}),(0,t.jsx)(P.Cd,{children:"Error"}),(0,t.jsx)(P.X,{children:v})]})})]}),(0,t.jsxs)(C.xo,{children:[(0,t.jsx)(C.le,{onClick:()=>{U(!1),N(!1)},children:"Cancel"}),(0,t.jsx)(C.OL,{onClick:()=>{N(!0),U(!1),Y()},children:"Retry Now"})]})]})}),(0,t.jsx)(_.Vq,{open:q,onOpenChange:()=>G(!1),children:(0,t.jsxs)(_.cZ,{className:"sm:max-w-[768px]",children:[(0,t.jsxs)(_.fK,{children:[(0,t.jsx)(_.$N,{children:"View the Deployment"}),(0,t.jsx)(_.Be,{children:"This is the deployment data in JSON format."})]}),(0,t.jsx)(I.Z,{data:F}),(0,t.jsx)(_.cN,{})]})})]})}},2854:function(e,s,a){a.d(s,{Z:function(){return K}});var t=a(27573),r=a(7653),n=a(412),l=a(5772),i=a(22392);a(40020),a(19234),a(83346);var o=a(16800),d=a(64303),c=a(63052),u=a(36531);function m(){return(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center h-[50vh] gap-4",children:[(0,t.jsx)("div",{className:"bg-red-100 dark:bg-red-900 rounded-full p-4",children:(0,t.jsx)(x,{className:"h-8 w-8 text-red-500 dark:text-red-400"})}),(0,t.jsxs)("div",{className:"text-center space-y-2",children:[(0,t.jsx)("h3",{className:"text-2xl font-bold",children:"The dashboard is not yet reachable now!"}),(0,t.jsx)("p",{className:"text-gray-500 dark:text-gray-400",children:"We couldn't load the requested resource right now. Please try again in a few moments."})]}),(0,t.jsxs)(u.z,{className:"mt-4",variant:"outline",onClick:()=>{window.location.reload()},children:[(0,t.jsx)(p,{className:"mr-2 h-4 w-4"}),"Reload"]})]})}function p(e){return(0,t.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"}),(0,t.jsx)("path",{d:"M21 3v5h-5"}),(0,t.jsx)("path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"}),(0,t.jsx)("path",{d:"M8 16H3v5"})]})}function x(e){return(0,t.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"}),(0,t.jsx)("path",{d:"M12 9v4"}),(0,t.jsx)("path",{d:"M12 17h.01"})]})}var h=a(86288),v=a(72513),g=a(46065),f=a(7109),j=a(74859);function y(e){let{selectedPod:s}=e,[a,l]=(0,r.useState)([]),[i,o]=(0,r.useState)(null),[d,c]=(0,r.useState)(!0),[u,m]=(0,r.useState)(!1),p=(0,n.v9)(e=>e.environment.environmentLoadedValues),x=(0,n.v9)(e=>{var s;return null==e?void 0:null===(s=e.userInfo)||void 0===s?void 0:s.userInfoLoadedValues}),y=(0,n.v9)(e=>e.deploymentName.deploymentNameLoadedValues.name);(0,r.useEffect)(()=>{(async()=>{try{c(!0);let e=await fetch("".concat("".concat(j.env.NEXT_PUBLIC_API,"/logs/").concat(s,"\n?deployment=").concat(y)),{headers:{Accept:"application/json",Authorization:(0,f.Z)(x),superduper_reverse_proxy:j.env.NEXT_PUBLIC_API||p.NEXT_PUBLIC_API}});if(!e.ok)throw Error("HTTP error! status: ".concat(e.status));let a=(await e.json()).payload;if(!a)throw Error("Invalid data structure received from the API");let t=b(a);l(t),o(null),m(!1)}catch(e){console.error("Error fetching logs:",e),o(e instanceof Error?e.message:"An unknown error occurred")}finally{c(!1)}})()},[s]);let b=e=>"string"!=typeof e?(console.error("Invalid payload type:",typeof e),[]):e.split("\n").filter(Boolean).map(e=>{let s=e.replace(/\s{2,}/g," "),a=s.match(/^\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2}/),t=a?a[0]:"",r=a?s.slice(t.length).trim():s.trim(),n=r.match(/\b(INFO|WARNING|ERROR|SUCC|E)\b/i),l=n?n[1].toUpperCase():"",i=n?r.slice(l.length).trim().replace(/\s{2,}/g," "):r;return{timestamp:t,level:l,message:i}});return d?(0,t.jsx)(h.Zb,{className:"w-full max-w-6xl mx-auto p-4",children:(0,t.jsx)("p",{className:"text-center",children:"Loading logs..."})}):(0,t.jsxs)("div",{className:"w-full max-w-6xl mx-auto mt-2",children:[i&&(0,t.jsxs)(v.bZ,{variant:"destructive",className:"mb-4",children:[(0,t.jsx)(g.Z,{className:"h-4 w-4"}),(0,t.jsx)(v.Cd,{children:"Error"}),(0,t.jsxs)(v.X,{children:["Failed to fetch logs: ",i,"."]})]}),(0,t.jsx)(h.Zb,{className:"bg-black text-green-400 p-4 font-mono text-sm overflow-hidden",children:(0,t.jsx)("div",{className:"overflow-y-auto h-[600px]",children:0===a.length?(0,t.jsx)("p",{className:"text-center",children:"No logs available."}):a.map((e,s)=>(0,t.jsxs)("div",{className:"mb-2",children:[e.timestamp&&(0,t.jsx)("span",{className:"text-blue-400",children:e.timestamp}),e.level&&(0,t.jsxs)("span",{className:"font-bold ".concat(function(e){switch(e.toUpperCase()){case"DEBUG":return"text-gray-400";case"TRACE":return"text-purple-400";case"WARNING":case"WARN":return"text-yellow-400";case"INFO":return"text-cyan-400";case"SUCC":case"SUCCESS":return"text-green-400";case"E":case"ERROR":return"text-rose-400";case"CRITICAL":case"FATAL":return"text-red-600";default:return"text-gray-200"}}(e.level)),children:[" ",e.level]}),(0,t.jsx)("span",{className:"ml-2",dangerouslySetInnerHTML:{__html:e.message.replace(/\u001B\[1m/g,'').replace(/\u001B\[22m/g,"").replace(/\u001B\[32m/g,'').replace(/\u001B\[37m/g,'').replace(/\u001B\[39m/g,"").replace(/\[37m/g,'').replace(/\[39m/g,"").replace(/\[1m/g,'').replace(/\[22m/g,"").replace(/\[32m/g,'')}})]},s))})})]})}var b=a(74859);function N(e){try{var s,a,t;if(e&&(null==e?void 0:e.status)&&(null==e?void 0:null===(s=e.status)||void 0===s?void 0:s.podRefList))return null==e?void 0:null===(t=e.status)||void 0===t?void 0:null===(a=t.podRefList)||void 0===a?void 0:a.map(e=>e.name);return[]}catch(e){return[]}}var w=e=>{var s,a;let{data:l}=e,u=(0,n.v9)(e=>e.environment.environmentLoadedValues),p=(0,n.v9)(e=>e.deploymentAPI.deploymentAPILoadedValues),[x,h]=(0,r.useState)("".concat(JSON.stringify(l,null," "))),[v,g]=(0,r.useState)(N(l)||[]),[f,j]=(0,r.useState)(v[0]),[w,C]=(0,r.useState)([{label:"Last 5 minutes",value:5},{label:"Last 15 minutes",value:15},{label:"Last 30 minutes",value:30},{label:"Last 1 hour",value:60},{label:"Last 6 hours",value:360},{label:"Last 12 hours",value:720},{label:"Last 24 hours",value:1440},{label:"Last 2 days",value:2880},{label:"Last 3 days",value:4320},{label:"Last 7 days",value:10080},{label:"Last 14 days",value:20160},{label:"Last 30 days",value:43200}]),[P,L]=(0,r.useState)(w[0].value);(0,r.useEffect)(()=>{g(N(l)||[])},[l]);let k=e=>{h(e)},I=(0,r.useRef)(null),_=async()=>{try{I.current.editor.selectAll();let e=I.current.editor.getSelectedText();await navigator.clipboard.writeText(e),console.log("Text copied to clipboard:",e)}catch(e){console.error("Unable to copy text to clipboard:",e)}},S=e=>{j(e)},[A,E]=(0,r.useState)(!1),[Z,R]=(0,r.useState)(!0),U=b.env.NEXT_PUBLIC_GRAFANA_DASHBOARD||u.NEXT_PUBLIC_GRAFANA_DASHBOARD||"/grafana/";return p?(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)(d.mQ,{defaultValue:"log",className:"w-full",children:[(0,t.jsxs)(d.dr,{className:"grid w-full grid-cols-3",children:[f&&"true"==b.env.NEXT_PUBLIC_SNOWFLAKE&&(0,t.jsx)(d.SP,{value:"log",children:"Logs"}),f&&"true"!==b.env.NEXT_PUBLIC_SNOWFLAKE&&(0,t.jsx)(d.SP,{value:"monitoring",children:"Logs"}),(0,t.jsx)(d.SP,{value:"status",children:"Status"}),(0,t.jsx)(d.SP,{value:"specs",children:"Specs"})]}),f&&"true"==b.env.NEXT_PUBLIC_SNOWFLAKE&&(0,t.jsxs)(d.nU,{value:"log",children:[(0,t.jsxs)("div",{className:"relative mt-4",children:[(0,t.jsx)("div",{className:"absolute inset-0 flex items-center","aria-hidden":"true",children:(0,t.jsx)("div",{className:"w-full border-t border-gray-300"})}),(0,t.jsx)("div",{className:"relative flex justify-start",children:(0,t.jsx)("span",{className:"bg-white pr-3 text-base font-semibold leading-6 text-gray-900",children:"Logs"})})]}),(0,t.jsx)("div",{className:"flex gap-4",children:(0,t.jsxs)(c.Ph,{value:f,onValueChange:S,children:[(0,t.jsx)(c.i4,{className:"w-3/6 mt-4 mb-2",children:(0,t.jsx)(c.ki,{placeholder:"Select a pod for log"})}),(0,t.jsx)(c.Bw,{children:(0,t.jsxs)(c.DI,{children:[(0,t.jsx)(c.n5,{children:"Select a pod for log"}),v&&v.map((e,s)=>(0,t.jsx)(c.Ql,{value:e,children:e},s))]})})]})}),(0,t.jsx)("div",{children:(0,t.jsx)(y,{selectedPod:f})})]}),f&&"true"!==b.env.NEXT_PUBLIC_SNOWFLAKE&&(0,t.jsxs)(d.nU,{value:"monitoring",children:[(0,t.jsxs)("div",{className:"relative mt-4",children:[(0,t.jsx)("div",{className:"absolute inset-0 flex items-center","aria-hidden":"true",children:(0,t.jsx)("div",{className:"w-full border-t border-gray-300"})}),(0,t.jsx)("div",{className:"relative flex justify-start",children:(0,t.jsx)("span",{className:"bg-white pr-3 text-base font-semibold leading-6 text-gray-900",children:"Logs"})})]}),(0,t.jsxs)("div",{className:"flex gap-4",children:[(0,t.jsxs)(c.Ph,{value:f,onValueChange:S,children:[(0,t.jsx)(c.i4,{className:"w-3/6 mt-4 mb-2",children:(0,t.jsx)(c.ki,{placeholder:"Select a pod for log"})}),(0,t.jsx)(c.Bw,{children:(0,t.jsxs)(c.DI,{children:[(0,t.jsx)(c.n5,{children:"Select a pod for log"}),v&&v.map((e,s)=>(0,t.jsx)(c.Ql,{value:e,children:e},s))]})})]}),(0,t.jsxs)(c.Ph,{value:P,onValueChange:e=>{L(e)},children:[(0,t.jsx)(c.i4,{className:"w-3/6 mt-4 mb-2",children:(0,t.jsx)(c.ki,{placeholder:"Select a pod for log"})}),(0,t.jsx)(c.Bw,{children:(0,t.jsxs)(c.DI,{children:[(0,t.jsx)(c.n5,{children:"Select a time"}),w.map((e,s)=>(0,t.jsx)(c.Ql,{value:e.value,children:e.label},s))]})})]})]}),(0,t.jsx)("div",{children:Z&&!A?(0,t.jsx)("iframe",{title:"External Website",allowFullScreen:!0,src:"".concat(U,"d-solo/logs/container-logs?orgId=1&theme=dark&panelId=2&refresh=&from=now-").concat(P,"m&to=now&var-pod=").concat(f,"&var-namespace=").concat(u.NEXT_PUBLIC_GRAFANA_NAMESPACE||b.env.NEXT_PUBLIC_GRAFANA_NAMESPACE,"&var-container=&var-logs_type=&var-logs_source"),width:"100%",height:"400px",onLoad:()=>{E(!1)},onError:()=>{E(!0)},className:"mt-2",style:{overflow:"auto",borderRadius:"10px"}}):(0,t.jsx)(m,{})})]}),(0,t.jsxs)(d.nU,{value:"status",children:[(0,t.jsxs)("div",{className:"relative mt-4",children:[(0,t.jsx)("div",{className:"absolute inset-0 flex items-center","aria-hidden":"true",children:(0,t.jsx)("div",{className:"w-full border-t border-gray-300"})}),(0,t.jsx)("div",{className:"relative flex justify-start",children:(0,t.jsx)("span",{className:"bg-white pr-3 text-base font-semibold leading-6 text-gray-900",children:"Status"})})]}),(0,t.jsxs)("div",{className:"relative overflow-visible mt-4",children:[(0,t.jsx)("div",{className:"absolute bottom-8 right-5 z-50",children:(0,t.jsx)("span",{onClick:_,children:(0,t.jsx)(o.Z,{popoverheader:"Click to copy"})})}),(0,t.jsx)(i.default,{ref:I,className:"block w-full rounded-md border-2 py-1.5 text-gray-900 shadow-lg ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600",placeholder:"Placeholder Text",mode:"json",theme:"github",name:"blah2",onChange:k,fontSize:14,showPrintMargin:!0,showGutter:!0,highlightActiveLine:!0,value:"".concat(JSON.stringify(l,null," ")),setOptions:{enableBasicAutocompletion:!0,enableLiveAutocompletion:!0,enableSnippets:!0,showLineNumbers:!0,tabSize:2,useWorker:!1,wrap:!0},height:"400px",width:"100%"})]})]}),(0,t.jsxs)(d.nU,{value:"specs",children:[(0,t.jsxs)("div",{className:"relative mt-4",children:[(0,t.jsx)("div",{className:"absolute inset-0 flex items-center","aria-hidden":"true",children:(0,t.jsx)("div",{className:"w-full border-t border-gray-300"})}),(0,t.jsx)("div",{className:"relative flex justify-start",children:(0,t.jsx)("span",{className:"bg-white pr-3 text-base font-semibold leading-6 text-gray-900",children:"Specs"})})]}),(0,t.jsxs)("div",{className:"relative overflow-visible mt-4",children:[(0,t.jsx)("div",{className:"absolute bottom-8 right-5 z-50",children:(0,t.jsx)("span",{onClick:_,children:(0,t.jsx)(o.Z,{popoverheader:"Click to copy"})})}),(0,t.jsx)(i.default,{ref:I,className:"block w-full rounded-md border-2 py-1.5 text-gray-900 shadow-lg ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600",placeholder:"Placeholder Text",mode:"json",theme:"github",name:"blah2",onChange:k,fontSize:14,showPrintMargin:!0,showGutter:!0,highlightActiveLine:!0,value:"".concat(JSON.stringify((null==p?void 0:null===(s=p.spec)||void 0===s?void 0:s.serviceList)&&(null==p?void 0:null===(a=p.spec)||void 0===a?void 0:a.serviceList.filter(e=>(null==e?void 0:e.name.toLowerCase())===(null==l?void 0:l.name.toLowerCase()))),null," ")),setOptions:{enableBasicAutocompletion:!0,enableLiveAutocompletion:!0,enableSnippets:!0,showLineNumbers:!0,tabSize:2,useWorker:!1,wrap:!0},height:"400px",width:"100%"})]})]})]})}):null},C=a(70694),P=a(95042),L=a(12900),k=a(53511),I=a(3078),_=a(85688);function S(e){return(0,t.jsxs)("svg",{...e,"aria-hidden":"true",className:"w-4 h-4 me-0 text-gray-200 animate-spin dark:text-white-600 fill-yellow-600",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,t.jsx)("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),(0,t.jsx)("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]})}let A={running:{bgColor:"bg-green-50",textColor:"text-green-700",ringColor:"ring-green-600/20",icon:(0,t.jsx)(function(e){return(0,t.jsx)("svg",{...e,className:"w-4 h-4 me-0 text-green-500 dark:text-green-400 flex-shrink-0","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 20 20",children:(0,t.jsx)("path",{d:"M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5Zm3.707 8.207-4 4a1 1 0 0 1-1.414 0l-2-2a1 1 0 0 1 1.414-1.414L9 10.586l3.293-3.293a1 1 0 0 1 1.414 1.414Z"})})},{}),label:"Running"},pending:{bgColor:"bg-yellow-50",textColor:"text-yellow-700",ringColor:"ring-yellow-600/20",icon:(0,t.jsx)(S,{}),label:"Pending"},unknown:{bgColor:"bg-yellow-50",textColor:"text-yellow-700",ringColor:"ring-yellow-600/20",icon:(0,t.jsx)(S,{}),label:"Unknown"},failed:{bgColor:"bg-red-50",textColor:"text-red-700",ringColor:"ring-red-600/20",icon:(0,t.jsx)(function(e){return(0,t.jsx)("svg",{...e,className:"w-4 h-4 me-0 text-red-500 dark:text-red-400 flex-shrink-0","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{d:"M2 12a10 10 0 1 1 20 0 10 10 0 0 1-20 0Zm7.7-3.7a1 1 0 0 0-1.4 1.4l2.3 2.3-2.3 2.3a1 1 0 1 0 1.4 1.4l2.3-2.3 2.3 2.3a1 1 0 0 0 1.4-1.4L13.4 12l2.3-2.3a1 1 0 0 0-1.4-1.4L12 10.6 9.7 8.3Z"})})},{}),label:"Failed"}},E=e=>{let s=A[(null==e?void 0:e.toLowerCase())||"unknown"];return s?(0,t.jsxs)("dd",{className:"inline-flex items-center rounded-md ".concat(s.bgColor," px-2 py-1 text-xs font-medium ").concat(s.textColor," ring-1 ring-inset ").concat(s.ringColor),children:[s.label,(0,t.jsx)("div",{className:"offline flex-none rounded-full p-1",children:(0,t.jsx)("div",{role:"status",children:s.icon})})]}):null};var Z=a(32966),R=a(6850),U=a(74859);function T(e){let{url:s}=e;return(console.log("DeploymentLink",s),s)?s.toLowerCase().includes("endpoints provisioning in progress... check back in a few minutes")?(0,t.jsxs)(u.z,{variant:"outline",disabled:!0,children:["Endpoint Provisioning",(0,t.jsx)(Z.Z,{className:"ml-0.5 -mr.5 h-5 w-5","aria-hidden":"true"})]}):(0,t.jsx)("a",{href:s,target:"_blank",rel:"noopener noreferrer",children:(0,t.jsxs)(u.z,{variant:"outline",children:["Open",(0,t.jsx)(R.Z,{className:"ml-0.5 -mr.5 h-5 w-5","aria-hidden":"true"})]})}):null}let B=e=>{var s,a,r;let{deployment:n,token:l,env:i}=e;if((null==n?void 0:null===(a=n.status)||void 0===a?void 0:null===(s=a.phase)||void 0===s?void 0:s.toLowerCase())!=="running")return null;let o=null==n?void 0:null===(r=n.name)||void 0===r?void 0:r.toLowerCase(),d=[{condition:o.includes("ray"),url:U.env.NEXT_PUBLIC_RAY_DASHBOARD||i.NEXT_PUBLIC_RAY_DASHBOARD},{condition:o.includes("jupyter"),url:"".concat(U.env.NEXT_PUBLIC_JUPYTER_NOTEBOOK||i.NEXT_PUBLIC_JUPYTER_NOTEBOOK,"?superduper_token=").concat(l)},{condition:o.includes("monitoring"),url:U.env.NEXT_PUBLIC_GRAFANA_DASHBOARD||i.NEXT_PUBLIC_GRAFANA_DASHBOARD},{condition:o.includes("rest"),url:"".concat("http://localhost:8000","docs")},{condition:o.includes("apiserver"),url:U.env.NEXT_PUBLIC_APISERVER||i.NEXT_PUBLIC_APISERVER},{condition:o.includes("appui"),url:U.env.NEXT_PUBLIC_APPUI||i.NEXT_PUBLIC_APPUI},{condition:o.includes("webui"),url:U.env.NEXT_PUBLIC_WEBUI||i.NEXT_PUBLIC_WEBUI},{condition:o.includes("proxy"),url:U.env.NEXT_PUBLIC_PROXY||i.NEXT_PUBLIC_PROXY}];return(0,t.jsx)(t.Fragment,{children:d.map((e,s)=>e.condition&&e.url&&(0,t.jsx)(T,{url:e.url},s))})};var D=a(74859);let F=e=>{let{url:s,token:a,identifier:r}=e;return s?s.toLowerCase().includes("endpoints provisioning in progress... check back in a few minutes")?(0,t.jsxs)(u.z,{variant:"outline",disabled:!0,children:["Endpoint Provisioning",(0,t.jsx)(Z.Z,{className:"ml-0.5 -mr.5 h-5 w-5","aria-hidden":"true"})]}):(0,t.jsx)(t.Fragment,{children:s&&(0,t.jsx)("a",{href:"true"==D.env.NEXT_PUBLIC_SNOWFLAKE?(e=>{let s=window.location.origin;return"".concat(s,"/webui/").concat(e,"/")})(r):"".concat(s,"?superduper_token=").concat(a),target:"_blank",rel:"noopener noreferrer",children:(0,t.jsxs)(u.z,{variant:"outline",children:["Open",(0,t.jsx)(R.Z,{className:"ml-0.5 -mr-0.5 h-5 w-5","aria-hidden":"true"})]})})}):null};var X=e=>{var s;let{deployment:a,token:r,env:n,endpointData:l}=e,i=null==a?void 0:null===(s=a.name)||void 0===s?void 0:s.toLowerCase();return l&&null!==l.items&&void 0!==l.items?(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(F,{identifier:i,token:r,url:function(e,s){for(let a of e.items)if(a.serviceName.toLowerCase()===s){for(let e of a.endpoints)if(e.ingressURL&&e.protocol)return"".concat(e.protocol,"://").concat(e.ingressURL)}return null}(l,i)},i)}):null};let O=e=>{if("object"==typeof e){if("computeClass"in e)return e.computeClass;for(let s of Object.values(e)){let e=O(s);if(void 0!==e)return e}console.log("No computeClass found in the object:",e)}},V=(e,s)=>{var a,t;let r=null==s?void 0:null===(t=s.spec)||void 0===t?void 0:null===(a=t.serviceList)||void 0===a?void 0:a.find(s=>s.name.toLowerCase()===e.toLowerCase());return(null==r?void 0:r.spec)?O(r.spec):void 0};function z(e){return(0,t.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("path",{d:"M22 7.7c0-.6-.4-1.2-.8-1.5l-6.3-3.9a1.72 1.72 0 0 0-1.7 0l-10.3 6c-.5.2-.9.8-.9 1.4v6.6c0 .5.4 1.2.8 1.5l6.3 3.9a1.72 1.72 0 0 0 1.7 0l10.3-6c.5-.3.9-1 .9-1.5Z"}),(0,t.jsx)("path",{d:"M10 21.9V14L2.1 9.1"}),(0,t.jsx)("path",{d:"m10 14 11.9-6.9"}),(0,t.jsx)("path",{d:"M14 19.8v-8.1"}),(0,t.jsx)("path",{d:"M18 17.5V9.4"})]})}var M=a(80923);let W=()=>(0,t.jsx)("div",{className:"mx-auto max-w-7xl pr-4 pt-5 pb-0 sm:pr-6 lg:pr-8",children:(0,t.jsx)("div",{className:"mx-auto flex max-w-2xl items-center justify-between gap-x-8 lg:mx-0 lg:max-w-none",children:(0,t.jsxs)("div",{className:"flex items-center gap-x-4",children:[(0,t.jsx)("div",{className:"bg-black rounded-lg p-2",children:(0,t.jsx)(z,{className:"w-6 h-6 text-gray-300"})}),(0,t.jsxs)("h1",{className:"text-base font-semibold leading-6 text-gray-900",children:["Services",(0,t.jsx)(M.Z,{label:"",popoverheader:"",popovercontent:(0,t.jsx)("p",{children:"Services are the microservices that are running in the cluster that make superduper works!"})})]})]})})});var q=a(46346),G=a(74859);let Y=function(){for(var e=arguments.length,s=Array(e),a=0;a{let e=(0,n.v9)(e=>e.environment.environmentLoadedValues),s=(0,n.v9)(e=>e.environment.environmentLoadedValues.endpointData),[a,i]=(0,r.useState)(!0),[o,d]=(0,r.useState)(0),c=(0,n.v9)(e=>{var s,a;return null==e?void 0:null===(a=e.userInfo)||void 0===a?void 0:null===(s=a.userInfoLoadedValues)||void 0===s?void 0:s.token}),m=(0,n.v9)(e=>e.chartsgroups.chartsLoadedValues),p=(0,n.v9)(e=>e.deploymentAPI.deploymentAPILoadedValues);return(0,r.useEffect)(()=>{let e=setTimeout(()=>i(!1),5e3);return()=>clearTimeout(e)},[]),(0,r.useEffect)(()=>{c&&d(e=>e+1)},[c]),m||e||c||(a?(0,t.jsx)(l.Z,{}):(0,t.jsx)(k.Z,{header:"No Services Found",message:""})),(0,t.jsxs)("div",{children:[(0,t.jsx)(W,{}),(0,t.jsxs)(q.x,{className:"max-w-7xl whitespace-nowrap",children:[m&&e&&c&&(0,t.jsx)("div",{className:"bg-white px-4 py-5 sm:px-6",children:(0,t.jsx)("ul",{role:"list",className:"divide-y divide-red/5",children:m.items.map(a=>{var n,l,i,o,d,m,x;return(0,t.jsx)(r.Fragment,{children:a.name&&(0,t.jsxs)("li",{className:"relative flex items-center space-x-4 py-4",children:[(0,t.jsxs)("div",{className:"min-w-0 flex-auto",children:[(0,t.jsxs)("div",{className:"flex items-center gap-x-3",children:[(0,t.jsx)("div",{className:Y((null==a?void 0:null===(l=a.status)||void 0===l?void 0:null===(n=l.phase)||void 0===n?void 0:n.toLowerCase())==="running"?"text-green-400 bg-green-400/10":(null==a?void 0:null===(o=a.status)||void 0===o?void 0:null===(i=o.phase)||void 0===i?void 0:i.toLowerCase())==="failed"?"text-rose-400 bg-rose-400/10":"text-yellow-400 bg-yellow-400/10","flex-none rounded-full p-1"),children:(0,t.jsx)("div",{className:"h-2 w-2 rounded-full bg-current"})}),(0,t.jsx)("h2",{className:"min-w-0 text-sm font-semibold leading-6 text-gray-900",children:(0,t.jsxs)(P.J2,{children:[(0,t.jsx)(P.xo,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex",children:[a.name,"\xa0\xa0",(0,t.jsx)(_.jnn,{className:"h-4 w-4 mt-1"})]})}),(0,t.jsx)(P.yk,{className:"w-80",children:(0,t.jsxs)("div",{className:"grid gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("h4",{className:"font-medium leading-none",children:"Pods Status"}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"See the status of the pods"})]}),(0,t.jsx)("div",{className:"grid gap-2",children:null==a?void 0:null===(m=a.status)||void 0===m?void 0:null===(d=m.podRefList)||void 0===d?void 0:d.map(e=>{var s;return(0,t.jsxs)("div",{className:"grid grid-cols-3 items-center gap-4",children:[(0,t.jsx)(L.C,{className:"col-span-2 h-8",children:e.name}),E(null==e?void 0:null===(s=e.lifecycle)||void 0===s?void 0:s.phase)]},e.name)})})]})})]})})]}),(0,t.jsxs)("div",{className:"mt-3 flex items-center gap-x-2.5 text-xs leading-5 text-gray-400",children:[(0,t.jsx)("p",{className:"whitespace-nowrap",children:"ComputeClass:"}),(0,t.jsx)("button",{type:"button",className:"inline-flex items-center rounded-full bg-white px-2.5 py-1 text-xs font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50",children:V(a.name,p)||"No ComputeClass"})]})]}),"true"==G.env.NEXT_PUBLIC_API_DISABLE_ENV_LINK?(0,t.jsx)(X,{deployment:a,token:c,env:e,endpointData:s}):(0,t.jsx)(B,{deployment:a,token:c,env:e,endpointData:s}),E(null==a?void 0:null===(x=a.status)||void 0===x?void 0:x.phase),(0,t.jsxs)(C.yo,{children:[(0,t.jsx)(C.aM,{asChild:!0,children:(0,t.jsxs)(u.z,{variant:"outline",children:["Show More ",(0,t.jsx)(I.Z,{})]})}),(0,t.jsxs)(C.ue,{className:"overflow-auto w-[800px] sm:w-[800px] sm:max-w-none",children:[(0,t.jsxs)(C.Tu,{children:[(0,t.jsxs)(C.bC,{children:["More info about ",a.name]}),(0,t.jsx)(C.Ei,{children:"Here is the information regarding the services."})]}),(0,t.jsx)("div",{className:"grid gap-4 py-4 overflow-visible",children:(0,t.jsx)(w,{data:a})}),(0,t.jsx)(C.FF,{children:(0,t.jsx)(C.sw,{asChild:!0,children:(0,t.jsx)(u.z,{type:"submit",children:"Close Now"})})})]})]})]})},a.name)})})}),(0,t.jsx)(q.B,{orientation:"horizontal"})]})]})}},72513:function(e,s,a){a.d(s,{Cd:function(){return d},X:function(){return c},bZ:function(){return o}});var t=a(27573),r=a(7653),n=a(85145),l=a(18580);let i=(0,n.j)("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),o=r.forwardRef((e,s)=>{let{className:a,variant:r,...n}=e;return(0,t.jsx)("div",{ref:s,role:"alert",className:(0,l.cn)(i({variant:r}),a),...n})});o.displayName="Alert";let d=r.forwardRef((e,s)=>{let{className:a,...r}=e;return(0,t.jsx)("h5",{ref:s,className:(0,l.cn)("mb-1 font-medium leading-none tracking-tight",a),...r})});d.displayName="AlertTitle";let c=r.forwardRef((e,s)=>{let{className:a,...r}=e;return(0,t.jsx)("div",{ref:s,className:(0,l.cn)("text-sm [&_p]:leading-relaxed",a),...r})});c.displayName="AlertDescription"},4216:function(e,s,a){a.d(s,{X:function(){return o}});var t=a(27573),r=a(7653),n=a(92999),l=a(85688),i=a(18580);let o=r.forwardRef((e,s)=>{let{className:a,...r}=e;return(0,t.jsx)(n.fC,{ref:s,className:(0,i.cn)("peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",a),...r,children:(0,t.jsx)(n.z$,{className:(0,i.cn)("flex items-center justify-center text-current"),children:(0,t.jsx)(l.nQG,{className:"h-4 w-4"})})})});o.displayName=n.fC.displayName},42502:function(e,s,a){a.d(s,{$F:function(){return d},AW:function(){return u},Xi:function(){return m},_x:function(){return c},h_:function(){return o},qB:function(){return p}});var t=a(27573),r=a(7653),n=a(49002),l=a(85688),i=a(18580);let o=n.fC,d=n.xz;n.ZA,n.Uv,n.Tr;let c=n.Ee;r.forwardRef((e,s)=>{let{className:a,inset:r,children:o,...d}=e;return(0,t.jsxs)(n.fF,{ref:s,className:(0,i.cn)("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",r&&"pl-8",a),...d,children:[o,(0,t.jsx)(l.XCv,{className:"ml-auto h-4 w-4"})]})}).displayName=n.fF.displayName,r.forwardRef((e,s)=>{let{className:a,...r}=e;return(0,t.jsx)(n.tu,{ref:s,className:(0,i.cn)("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a),...r})}).displayName=n.tu.displayName;let u=r.forwardRef((e,s)=>{let{className:a,sideOffset:r=4,...l}=e;return(0,t.jsx)(n.Uv,{children:(0,t.jsx)(n.VY,{ref:s,sideOffset:r,className:(0,i.cn)("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a),...l})})});u.displayName=n.VY.displayName;let m=r.forwardRef((e,s)=>{let{className:a,inset:r,...l}=e;return(0,t.jsx)(n.ck,{ref:s,className:(0,i.cn)("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",r&&"pl-8",a),...l})});m.displayName=n.ck.displayName,r.forwardRef((e,s)=>{let{className:a,children:r,checked:o,...d}=e;return(0,t.jsxs)(n.oC,{ref:s,className:(0,i.cn)("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",a),checked:o,...d,children:[(0,t.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,t.jsx)(n.wU,{children:(0,t.jsx)(l.nQG,{className:"h-4 w-4"})})}),r]})}).displayName=n.oC.displayName;let p=r.forwardRef((e,s)=>{let{className:a,children:r,...o}=e;return(0,t.jsxs)(n.Rk,{ref:s,className:(0,i.cn)("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",a),...o,children:[(0,t.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,t.jsx)(n.wU,{children:(0,t.jsx)(l.jXb,{className:"h-4 w-4 fill-current"})})}),r]})});p.displayName=n.Rk.displayName,r.forwardRef((e,s)=>{let{className:a,inset:r,...l}=e;return(0,t.jsx)(n.__,{ref:s,className:(0,i.cn)("px-2 py-1.5 text-sm font-semibold",r&&"pl-8",a),...l})}).displayName=n.__.displayName,r.forwardRef((e,s)=>{let{className:a,...r}=e;return(0,t.jsx)(n.Z0,{ref:s,className:(0,i.cn)("-mx-1 my-1 h-px bg-muted",a),...r})}).displayName=n.Z0.displayName},63052:function(e,s,a){a.d(s,{Bw:function(){return x},DI:function(){return d},Ph:function(){return o},Ql:function(){return v},i4:function(){return u},ki:function(){return c},n5:function(){return h}});var t=a(27573),r=a(7653),n=a(85688),l=a(66240),i=a(18580);let o=l.fC,d=l.ZA,c=l.B4,u=r.forwardRef((e,s)=>{let{className:a,children:r,...o}=e;return(0,t.jsxs)(l.xz,{ref:s,className:(0,i.cn)("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",a),...o,children:[r,(0,t.jsx)(l.JO,{asChild:!0,children:(0,t.jsx)(n.jnn,{className:"h-4 w-4 opacity-50"})})]})});u.displayName=l.xz.displayName;let m=r.forwardRef((e,s)=>{let{className:a,...r}=e;return(0,t.jsx)(l.u_,{ref:s,className:(0,i.cn)("flex cursor-default items-center justify-center py-1",a),...r,children:(0,t.jsx)(n.g8U,{})})});m.displayName=l.u_.displayName;let p=r.forwardRef((e,s)=>{let{className:a,...r}=e;return(0,t.jsx)(l.$G,{ref:s,className:(0,i.cn)("flex cursor-default items-center justify-center py-1",a),...r,children:(0,t.jsx)(n.v4q,{})})});p.displayName=l.$G.displayName;let x=r.forwardRef((e,s)=>{let{className:a,children:r,position:n="popper",...o}=e;return(0,t.jsx)(l.h_,{children:(0,t.jsxs)(l.VY,{ref:s,className:(0,i.cn)("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2","popper"===n&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",a),position:n,...o,children:[(0,t.jsx)(m,{}),(0,t.jsx)(l.l_,{className:(0,i.cn)("p-1","popper"===n&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:r}),(0,t.jsx)(p,{})]})})});x.displayName=l.VY.displayName;let h=r.forwardRef((e,s)=>{let{className:a,...r}=e;return(0,t.jsx)(l.__,{ref:s,className:(0,i.cn)("px-2 py-1.5 text-sm font-semibold",a),...r})});h.displayName=l.__.displayName;let v=r.forwardRef((e,s)=>{let{className:a,children:r,...o}=e;return(0,t.jsxs)(l.ck,{ref:s,className:(0,i.cn)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",a),...o,children:[(0,t.jsx)("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,t.jsx)(l.wU,{children:(0,t.jsx)(n.nQG,{className:"h-4 w-4"})})}),(0,t.jsx)(l.eT,{children:r})]})});v.displayName=l.ck.displayName,r.forwardRef((e,s)=>{let{className:a,...r}=e;return(0,t.jsx)(l.Z0,{ref:s,className:(0,i.cn)("-mx-1 my-1 h-px bg-muted",a),...r})}).displayName=l.Z0.displayName},4482:function(e,s,a){a.d(s,{_v:function(){return c},aJ:function(){return d},pn:function(){return i},u:function(){return o}});var t=a(27573),r=a(7653),n=a(23098),l=a(18580);let i=n.zt,o=n.fC,d=n.xz,c=r.forwardRef((e,s)=>{let{className:a,sideOffset:r=4,...i}=e;return(0,t.jsx)(n.VY,{ref:s,sideOffset:r,className:(0,l.cn)("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a),...i})});c.displayName=n.VY.displayName},58991:function(e,s,a){a.d(s,{Z:function(){return f}});var t=a(27573),r=a(7653),n=a(12198),l=a(34527),i=a(82440),o=a(66465),d=a(53896),c=a(86288),u=a(13908),m=a(81695),p=a(7109),x=a(412),h=a(70790),v=a(74859);let g=[{key:"initializing",icon:n.Z,label:"Initializing",duration:3e3},{key:"building",icon:l.Z,label:"Building",duration:3e3},{key:"deploying",icon:i.Z,label:"Deploying",duration:3e3},{key:"success",icon:o.Z,label:"Success",duration:3e3}];function f(){let[e,s]=(0,r.useState)("initializing"),[a,n]=(0,r.useState)(0),l=(0,x.v9)(e=>e.environment.environmentLoadedValues),i=(0,x.v9)(e=>{var s;return null==e?void 0:null===(s=e.userInfo)||void 0===s?void 0:s.userInfoLoadedValues}),o=(0,m.useRouter)(),f=(0,x.v9)(e=>e.deploymentName.deploymentNameLoadedValues.name),j=async e=>(await u.Z.get(e,{headers:{Accept:"application/json",Authorization:(0,p.Z)(i),superduper_reverse_proxy:v.env.NEXT_PUBLIC_API||l.NEXT_PUBLIC_API}})).data,{data:y,error:b}=(0,h.ZP)("".concat("".concat(v.env.NEXT_PUBLIC_API,"/deployments/").concat(f)),"".concat("".concat(v.env.NEXT_PUBLIC_API,"/deployments/").concat(f,"/")),j,{refreshInterval:0,revalidateOnFocus:!1,revalidateOnReconnect:!1,shouldRetryOnError:!1});(0,r.useEffect)(()=>{y&&o.push("/webui?deployment=done&query=1m",void 0,{shallow:!0})},[y]),(0,r.useEffect)(()=>{N()},[]);let N=()=>{s("initializing"),n(0)};return(0,r.useEffect)(()=>{if("success"===e)return;let a=g.find(s=>s.key===e),t=g.findIndex(s=>s.key===e);n(0);let r=setInterval(()=>{n(e=>{let s=e+100/(a.duration/100);return s>=100?100:s})},100),l=setTimeout(()=>{t{clearInterval(r),clearTimeout(l)}},[e]),(0,t.jsxs)("div",{className:"flex items-center justify-center min-h-screen w-full bg-background",children:[(0,t.jsx)("div",{className:"absolute inset-0 bg-gradient-to-b from-primary/10 to-transparent h-96 pointer-events-none"}),(0,t.jsxs)(c.Zb,{className:"w-full max-w-6xl shadow-lg relative -mt-20",children:[(0,t.jsxs)(c.Ol,{className:"text-center space-y-2",children:[(0,t.jsx)(c.ll,{className:"text-4xl font-extrabold tracking-tight",children:"Deployment Status"}),(0,t.jsx)("p",{className:"text-xl text-muted-foreground",children:"Tracking progress of your deployment"})]}),(0,t.jsx)(c.aY,{children:(0,t.jsxs)("div",{className:"flex flex-col md:flex-row gap-8",children:[(0,t.jsxs)("div",{className:"w-full md:w-1/3 md:border-r md:pr-8",children:[(0,t.jsx)("h2",{className:"text-xl font-semibold mb-6",children:"Deployment Stages"}),(0,t.jsx)("ul",{className:"space-y-6",children:g.map(s=>{let a=s.icon,r=s.key===e,n=g.findIndex(s=>s.key===e)>g.findIndex(e=>e.key===s.key);return(0,t.jsxs)("li",{className:"flex items-center space-x-3 ".concat(r?"text-primary font-medium":n?"text-green-600":"text-muted-foreground"),children:[(0,t.jsx)(a,{className:"w-5 h-5"}),(0,t.jsx)("span",{children:s.label}),n&&(0,t.jsx)(d.Z,{className:"w-4 h-4 text-green-600"})]},s.key)})})]}),(0,t.jsxs)("div",{className:"w-full md:w-2/3 md:pl-8 flex flex-col items-center",children:[(0,t.jsx)("h2",{className:"text-xl font-semibold mb-6",children:"Progress"}),(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center mb-8",children:["success"===e?(0,t.jsx)(d.Z,{className:"text-green-500 w-24 h-24 mb-4"}):(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsxs)("svg",{className:"w-24 h-24",viewBox:"0 0 100 100",children:[(0,t.jsx)("circle",{className:"text-gray-200",strokeWidth:"8",stroke:"currentColor",fill:"transparent",r:"42",cx:"50",cy:"50"}),(0,t.jsx)("circle",{className:"text-primary",strokeWidth:"8",strokeDasharray:264,strokeDashoffset:264-a/100*264,strokeLinecap:"round",stroke:"url(#gradient)",fill:"transparent",r:"42",cx:"50",cy:"50"}),(0,t.jsx)("defs",{children:(0,t.jsxs)("linearGradient",{id:"gradient",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[(0,t.jsx)("stop",{offset:"0%",stopColor:"hsl(var(--primary))"}),(0,t.jsx)("stop",{offset:"100%",stopColor:"hsl(var(--primary))"})]})})]}),(0,t.jsxs)("span",{className:"absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 text-xl font-semibold",children:[Math.round(a),"%"]})]}),(0,t.jsx)("p",{className:"text-center text-lg font-medium mt-4",children:(()=>{switch(e){case"initializing":return"Deployment ongoing, initializing...";case"building":return"Deployment ongoing, building files...";case"deploying":return"Deployment ongoing, finalizing production setup...";case"success":return"Deployment ongoing, almost live!";default:return"Deployment ongoing, wrapping up..."}})()})]})]})]})})]})]})}},87191:function(e,s,a){a.d(s,{Z:function(){return d}});var t=a(27573),r=a(7653),n=a(22392);a(40020),a(19234),a(83346);var l=a(412),i=a(24017),o=a(93296);function d(e){let{data:s,height:a="300px"}=e,d=(0,l.I0)(),[c,u]=(0,r.useState)(JSON.stringify(s,null," "));return(0,r.useRef)(null),(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(n.default,{className:"block w-full rounded-md border-2 py-1.5 text-gray-900 shadow-lg ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600",placeholder:"Stack result JSON here...",mode:"json",theme:"github",name:"blah2",onChange:e=>{try{u(e),d((0,i.q7)(JSON.parse(e)))}catch(e){o.ZP.error("Error updating...",{id:"stack-update-error"})}},fontSize:13,showPrintMargin:!0,showGutter:!0,highlightActiveLine:!0,value:c,setOptions:{enableBasicAutocompletion:!0,enableLiveAutocompletion:!0,enableSnippets:!0,showLineNumbers:!0,tabSize:2,useWorker:!1,wrap:!0},height:a,width:"100%"})})}},53511:function(e,s,a){a.d(s,{Z:function(){return r}});var t=a(27573);function r(e){let{header:s,message:a}=e;return(0,t.jsx)("div",{className:"flex min-h-[40vh] flex-col items-center justify-center bg-background px-4 py-12 sm:px-6 lg:px-8",children:(0,t.jsxs)("div",{className:"mx-auto max-w-md text-center",children:[(0,t.jsx)(n,{className:"mx-auto h-12 w-12 text-primary"}),(0,t.jsx)("h2",{className:"mt-4 text-xl font-bold tracking-tight text-foreground sm:text-xl",children:s||"UNKNOWN"}),(0,t.jsx)("p",{className:"mt-4 text-muted-foreground",children:a||"Status: UNKNOWN"})]})})}function n(e){return(0,t.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("path",{d:"M12 20h.01"}),(0,t.jsx)("path",{d:"M8.5 16.429a5 5 0 0 1 7 0"}),(0,t.jsx)("path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69"}),(0,t.jsx)("path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523"}),(0,t.jsx)("path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643"}),(0,t.jsx)("path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764"}),(0,t.jsx)("path",{d:"m2 2 20 20"})]})}},34611:function(e,s,a){a.d(s,{Gi:function(){return r}});var t=a(58108);let r=e=>s=>s({type:t.a6,payload:e})},60855:function(e,s,a){a.d(s,{Bw:function(){return n},Lj:function(){return l},NB:function(){return r}});var t=a(59625);let r=e=>s=>s({type:t.qJ,payload:e}),n=e=>s=>{let a=new Set;(null==e?void 0:e.items)&&Array.isArray(e.items)&&e.items.forEach(e=>{var s,t,r;(null==e?void 0:null===(t=e.status)||void 0===t?void 0:null===(s=t.reservation)||void 0===s?void 0:s.computeClassList)&&Array.isArray(e.status.reservation.computeClassList)&&e.status.reservation.computeClassList.forEach(e=>{a.add(e)});let n=(null==e?void 0:null===(r=e.spec)||void 0===r?void 0:r.extraComputeClass)||[];Array.isArray(n)&&n.forEach(e=>{a.add(e)})});let r=Array.from(a);return r.includes("base")&&(r=["base",...Array.from(a).filter(e=>"base"!==e)]),s({type:t.Ou,payload:r})},l=e=>s=>{let a=e;return e.includes("base")&&(a=["base",...e.filter(e=>"base"!==e)]),s({type:t.Ou,payload:a})}}}]); \ No newline at end of file diff --git a/superduper/rest/out/_next/static/chunks/384-23ccabe2fa4fb74b.js b/superduper/rest/out/_next/static/chunks/384-23ccabe2fa4fb74b.js deleted file mode 100644 index b14b1c26e..000000000 --- a/superduper/rest/out/_next/static/chunks/384-23ccabe2fa4fb74b.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[384],{90206:function(e,r,t){t.d(r,{u:function(){return n}});function n(e,[r,t]){return Math.min(t,Math.max(r,e))}},3864:function(e,r,t){t.d(r,{B:function(){return a}});var n=t(7653),o=t(27573),l=t(94492),i=t(8828);function a(e){let r=e+"CollectionProvider",[t,a]=function(e,r=[]){let t=[],l=()=>{let r=t.map(e=>n.createContext(e));return function(t){let o=t?.[e]||r;return n.useMemo(()=>({[`__scope${e}`]:{...t,[e]:o}}),[t,o])}};return l.scopeName=e,[function(r,l){let i=n.createContext(l),a=t.length;function c(r){let{scope:t,children:l,...c}=r,s=t?.[e][a]||i,u=n.useMemo(()=>c,Object.values(c));return(0,o.jsx)(s.Provider,{value:u,children:l})}return t=[...t,l],c.displayName=r+"Provider",[c,function(t,o){let c=o?.[e][a]||i,s=n.useContext(c);if(s)return s;if(void 0!==l)return l;throw Error(`\`${t}\` must be used within \`${r}\``)}]},function(...e){let r=e[0];if(1===e.length)return r;let t=()=>{let t=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let o=t.reduce((r,{useScope:t,scopeName:n})=>{let o=t(e)[`__scope${n}`];return{...r,...o}},{});return n.useMemo(()=>({[`__scope${r.scopeName}`]:o}),[o])}};return t.scopeName=r.scopeName,t}(l,...r)]}(r),[c,s]=t(r,{collectionRef:{current:null},itemMap:new Map}),u=e=>{let{scope:r,children:t}=e,l=n.useRef(null),i=n.useRef(new Map).current;return(0,o.jsx)(c,{scope:r,itemMap:i,collectionRef:l,children:t})};u.displayName=r;let d=e+"CollectionSlot",f=n.forwardRef((e,r)=>{let{scope:t,children:n}=e,a=s(d,t),c=(0,l.e)(r,a.collectionRef);return(0,o.jsx)(i.g7,{ref:c,children:n})});f.displayName=d;let p=e+"CollectionItemSlot",v="data-radix-collection-item",h=n.forwardRef((e,r)=>{let{scope:t,children:a,...c}=e,u=n.useRef(null),d=(0,l.e)(r,u),f=s(p,t);return n.useEffect(()=>(f.itemMap.set(u,{ref:u,...c}),()=>void f.itemMap.delete(u))),(0,o.jsx)(i.g7,{[v]:"",ref:d,children:a})});return h.displayName=p,[{Provider:u,Slot:f,ItemSlot:h},function(r){let t=s(e+"CollectionConsumer",r);return n.useCallback(()=>{let e=t.collectionRef.current;if(!e)return[];let r=Array.from(e.querySelectorAll("[".concat(v,"]")));return Array.from(t.itemMap.values()).sort((e,t)=>r.indexOf(e.ref.current)-r.indexOf(t.ref.current))},[t.collectionRef,t.itemMap])},a]}},21004:function(e,r,t){t.d(r,{gm:function(){return l}});var n=t(7653);t(27573);var o=n.createContext(void 0);function l(e){let r=n.useContext(o);return e||r||"ltr"}},86705:function(e,r,t){t.d(r,{Ns:function(){return G},fC:function(){return $},gb:function(){return y},l_:function(){return q},q4:function(){return A}});var n=t(7653),o=t(78378),l=t(65622),i=t(99933),a=t(94492),c=t(523),s=t(21004),u=t(81523),d=t(90206),f=t(46196),p=t(27573),v="ScrollArea",[h,w]=(0,i.b)(v),[m,g]=h(v),b=n.forwardRef((e,r)=>{let{__scopeScrollArea:t,type:l="hover",dir:i,scrollHideDelay:c=600,...u}=e,[d,f]=n.useState(null),[v,h]=n.useState(null),[w,g]=n.useState(null),[b,S]=n.useState(null),[x,C]=n.useState(null),[y,E]=n.useState(0),[R,T]=n.useState(0),[P,_]=n.useState(!1),[L,j]=n.useState(!1),N=(0,a.e)(r,e=>f(e)),D=(0,s.gm)(i);return(0,p.jsx)(m,{scope:t,type:l,dir:D,scrollHideDelay:c,scrollArea:d,viewport:v,onViewportChange:h,content:w,onContentChange:g,scrollbarX:b,onScrollbarXChange:S,scrollbarXEnabled:P,onScrollbarXEnabledChange:_,scrollbarY:x,onScrollbarYChange:C,scrollbarYEnabled:L,onScrollbarYEnabledChange:j,onCornerWidthChange:E,onCornerHeightChange:T,children:(0,p.jsx)(o.WV.div,{dir:D,...u,ref:N,style:{position:"relative","--radix-scroll-area-corner-width":y+"px","--radix-scroll-area-corner-height":R+"px",...e.style}})})});b.displayName=v;var S="ScrollAreaViewport",x=n.forwardRef((e,r)=>{let{__scopeScrollArea:t,children:l,nonce:i,...c}=e,s=g(S,t),u=n.useRef(null),d=(0,a.e)(r,u,s.onViewportChange);return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),(0,p.jsx)(o.WV.div,{"data-radix-scroll-area-viewport":"",...c,ref:d,style:{overflowX:s.scrollbarXEnabled?"scroll":"hidden",overflowY:s.scrollbarYEnabled?"scroll":"hidden",...e.style},children:(0,p.jsx)("div",{ref:s.onContentChange,style:{minWidth:"100%",display:"table"},children:l})})]})});x.displayName=S;var C="ScrollAreaScrollbar",y=n.forwardRef((e,r)=>{let{forceMount:t,...o}=e,l=g(C,e.__scopeScrollArea),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:a}=l,c="horizontal"===e.orientation;return n.useEffect(()=>(c?i(!0):a(!0),()=>{c?i(!1):a(!1)}),[c,i,a]),"hover"===l.type?(0,p.jsx)(E,{...o,ref:r,forceMount:t}):"scroll"===l.type?(0,p.jsx)(R,{...o,ref:r,forceMount:t}):"auto"===l.type?(0,p.jsx)(T,{...o,ref:r,forceMount:t}):"always"===l.type?(0,p.jsx)(P,{...o,ref:r}):null});y.displayName=C;var E=n.forwardRef((e,r)=>{let{forceMount:t,...o}=e,i=g(C,e.__scopeScrollArea),[a,c]=n.useState(!1);return n.useEffect(()=>{let e=i.scrollArea,r=0;if(e){let t=()=>{window.clearTimeout(r),c(!0)},n=()=>{r=window.setTimeout(()=>c(!1),i.scrollHideDelay)};return e.addEventListener("pointerenter",t),e.addEventListener("pointerleave",n),()=>{window.clearTimeout(r),e.removeEventListener("pointerenter",t),e.removeEventListener("pointerleave",n)}}},[i.scrollArea,i.scrollHideDelay]),(0,p.jsx)(l.z,{present:t||a,children:(0,p.jsx)(T,{"data-state":a?"visible":"hidden",...o,ref:r})})}),R=n.forwardRef((e,r)=>{var t,o;let{forceMount:i,...a}=e,c=g(C,e.__scopeScrollArea),s="horizontal"===e.orientation,u=B(()=>v("SCROLL_END"),100),[d,v]=(t="hidden",o={hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}},n.useReducer((e,r)=>{let t=o[e][r];return null!=t?t:e},t));return n.useEffect(()=>{if("idle"===d){let e=window.setTimeout(()=>v("HIDE"),c.scrollHideDelay);return()=>window.clearTimeout(e)}},[d,c.scrollHideDelay,v]),n.useEffect(()=>{let e=c.viewport,r=s?"scrollLeft":"scrollTop";if(e){let t=e[r],n=()=>{let n=e[r];t!==n&&(v("SCROLL"),u()),t=n};return e.addEventListener("scroll",n),()=>e.removeEventListener("scroll",n)}},[c.viewport,s,v,u]),(0,p.jsx)(l.z,{present:i||"hidden"!==d,children:(0,p.jsx)(P,{"data-state":"hidden"===d?"hidden":"visible",...a,ref:r,onPointerEnter:(0,f.M)(e.onPointerEnter,()=>v("POINTER_ENTER")),onPointerLeave:(0,f.M)(e.onPointerLeave,()=>v("POINTER_LEAVE"))})})}),T=n.forwardRef((e,r)=>{let t=g(C,e.__scopeScrollArea),{forceMount:o,...i}=e,[a,c]=n.useState(!1),s="horizontal"===e.orientation,u=B(()=>{if(t.viewport){let e=t.viewport.offsetWidth{let{orientation:t="vertical",...o}=e,l=g(C,e.__scopeScrollArea),i=n.useRef(null),a=n.useRef(0),[c,s]=n.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=k(c.viewport,c.content),d={...o,sizes:c,onSizesChange:s,hasThumb:!!(u>0&&u<1),onThumbChange:e=>i.current=e,onThumbPointerUp:()=>a.current=0,onThumbPointerDown:e=>a.current=e};function f(e,r){return function(e,r,t){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"ltr",o=X(t),l=r||o/2,i=t.scrollbar.paddingStart+l,a=t.scrollbar.size-t.scrollbar.paddingEnd-(o-l),c=t.content-t.viewport;return U([i,a],"ltr"===n?[0,c]:[-1*c,0])(e)}(e,a.current,c,r)}return"horizontal"===t?(0,p.jsx)(_,{...d,ref:r,onThumbPositionChange:()=>{if(l.viewport&&i.current){let e=Y(l.viewport.scrollLeft,c,l.dir);i.current.style.transform="translate3d(".concat(e,"px, 0, 0)")}},onWheelScroll:e=>{l.viewport&&(l.viewport.scrollLeft=e)},onDragScroll:e=>{l.viewport&&(l.viewport.scrollLeft=f(e,l.dir))}}):"vertical"===t?(0,p.jsx)(L,{...d,ref:r,onThumbPositionChange:()=>{if(l.viewport&&i.current){let e=Y(l.viewport.scrollTop,c);i.current.style.transform="translate3d(0, ".concat(e,"px, 0)")}},onWheelScroll:e=>{l.viewport&&(l.viewport.scrollTop=e)},onDragScroll:e=>{l.viewport&&(l.viewport.scrollTop=f(e))}}):null}),_=n.forwardRef((e,r)=>{let{sizes:t,onSizesChange:o,...l}=e,i=g(C,e.__scopeScrollArea),[c,s]=n.useState(),u=n.useRef(null),d=(0,a.e)(r,u,i.onScrollbarXChange);return n.useEffect(()=>{u.current&&s(getComputedStyle(u.current))},[u]),(0,p.jsx)(D,{"data-orientation":"horizontal",...l,ref:d,sizes:t,style:{bottom:0,left:"rtl"===i.dir?"var(--radix-scroll-area-corner-width)":0,right:"ltr"===i.dir?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":X(t)+"px",...e.style},onThumbPointerDown:r=>e.onThumbPointerDown(r.x),onDragScroll:r=>e.onDragScroll(r.x),onWheelScroll:(r,t)=>{if(i.viewport){let n=i.viewport.scrollLeft+r.deltaX;e.onWheelScroll(n),n>0&&n{u.current&&i.viewport&&c&&o({content:i.viewport.scrollWidth,viewport:i.viewport.offsetWidth,scrollbar:{size:u.current.clientWidth,paddingStart:I(c.paddingLeft),paddingEnd:I(c.paddingRight)}})}})}),L=n.forwardRef((e,r)=>{let{sizes:t,onSizesChange:o,...l}=e,i=g(C,e.__scopeScrollArea),[c,s]=n.useState(),u=n.useRef(null),d=(0,a.e)(r,u,i.onScrollbarYChange);return n.useEffect(()=>{u.current&&s(getComputedStyle(u.current))},[u]),(0,p.jsx)(D,{"data-orientation":"vertical",...l,ref:d,sizes:t,style:{top:0,right:"ltr"===i.dir?0:void 0,left:"rtl"===i.dir?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":X(t)+"px",...e.style},onThumbPointerDown:r=>e.onThumbPointerDown(r.y),onDragScroll:r=>e.onDragScroll(r.y),onWheelScroll:(r,t)=>{if(i.viewport){let n=i.viewport.scrollTop+r.deltaY;e.onWheelScroll(n),n>0&&n{u.current&&i.viewport&&c&&o({content:i.viewport.scrollHeight,viewport:i.viewport.offsetHeight,scrollbar:{size:u.current.clientHeight,paddingStart:I(c.paddingTop),paddingEnd:I(c.paddingBottom)}})}})}),[j,N]=h(C),D=n.forwardRef((e,r)=>{let{__scopeScrollArea:t,sizes:l,hasThumb:i,onThumbChange:s,onThumbPointerUp:u,onThumbPointerDown:d,onThumbPositionChange:v,onDragScroll:h,onWheelScroll:w,onResize:m,...b}=e,S=g(C,t),[x,y]=n.useState(null),E=(0,a.e)(r,e=>y(e)),R=n.useRef(null),T=n.useRef(""),P=S.viewport,_=l.content-l.viewport,L=(0,c.W)(w),N=(0,c.W)(v),D=B(m,10);function W(e){R.current&&h({x:e.clientX-R.current.left,y:e.clientY-R.current.top})}return n.useEffect(()=>{let e=e=>{let r=e.target;(null==x?void 0:x.contains(r))&&L(e,_)};return document.addEventListener("wheel",e,{passive:!1}),()=>document.removeEventListener("wheel",e,{passive:!1})},[P,x,_,L]),n.useEffect(N,[l,N]),F(x,D),F(S.content,D),(0,p.jsx)(j,{scope:t,scrollbar:x,hasThumb:i,onThumbChange:(0,c.W)(s),onThumbPointerUp:(0,c.W)(u),onThumbPositionChange:N,onThumbPointerDown:(0,c.W)(d),children:(0,p.jsx)(o.WV.div,{...b,ref:E,style:{position:"absolute",...b.style},onPointerDown:(0,f.M)(e.onPointerDown,e=>{0===e.button&&(e.target.setPointerCapture(e.pointerId),R.current=x.getBoundingClientRect(),T.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",S.viewport&&(S.viewport.style.scrollBehavior="auto"),W(e))}),onPointerMove:(0,f.M)(e.onPointerMove,W),onPointerUp:(0,f.M)(e.onPointerUp,e=>{let r=e.target;r.hasPointerCapture(e.pointerId)&&r.releasePointerCapture(e.pointerId),document.body.style.webkitUserSelect=T.current,S.viewport&&(S.viewport.style.scrollBehavior=""),R.current=null})})})}),W="ScrollAreaThumb",A=n.forwardRef((e,r)=>{let{forceMount:t,...n}=e,o=N(W,e.__scopeScrollArea);return(0,p.jsx)(l.z,{present:t||o.hasThumb,children:(0,p.jsx)(M,{ref:r,...n})})}),M=n.forwardRef((e,r)=>{let{__scopeScrollArea:t,style:l,...i}=e,c=g(W,t),s=N(W,t),{onThumbPositionChange:u}=s,d=(0,a.e)(r,e=>s.onThumbChange(e)),v=n.useRef(),h=B(()=>{v.current&&(v.current(),v.current=void 0)},100);return n.useEffect(()=>{let e=c.viewport;if(e){let r=()=>{if(h(),!v.current){let r=V(e,u);v.current=r,u()}};return u(),e.addEventListener("scroll",r),()=>e.removeEventListener("scroll",r)}},[c.viewport,h,u]),(0,p.jsx)(o.WV.div,{"data-state":s.hasThumb?"visible":"hidden",...i,ref:d,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...l},onPointerDownCapture:(0,f.M)(e.onPointerDownCapture,e=>{let r=e.target.getBoundingClientRect(),t=e.clientX-r.left,n=e.clientY-r.top;s.onThumbPointerDown({x:t,y:n})}),onPointerUp:(0,f.M)(e.onPointerUp,s.onThumbPointerUp)})});A.displayName=W;var z="ScrollAreaCorner",H=n.forwardRef((e,r)=>{let t=g(z,e.__scopeScrollArea),n=!!(t.scrollbarX&&t.scrollbarY);return"scroll"!==t.type&&n?(0,p.jsx)(O,{...e,ref:r}):null});H.displayName=z;var O=n.forwardRef((e,r)=>{let{__scopeScrollArea:t,...l}=e,i=g(z,t),[a,c]=n.useState(0),[s,u]=n.useState(0),d=!!(a&&s);return F(i.scrollbarX,()=>{var e;let r=(null===(e=i.scrollbarX)||void 0===e?void 0:e.offsetHeight)||0;i.onCornerHeightChange(r),u(r)}),F(i.scrollbarY,()=>{var e;let r=(null===(e=i.scrollbarY)||void 0===e?void 0:e.offsetWidth)||0;i.onCornerWidthChange(r),c(r)}),d?(0,p.jsx)(o.WV.div,{...l,ref:r,style:{width:a,height:s,position:"absolute",right:"ltr"===i.dir?0:void 0,left:"rtl"===i.dir?0:void 0,bottom:0,...e.style}}):null});function I(e){return e?parseInt(e,10):0}function k(e,r){let t=e/r;return isNaN(t)?0:t}function X(e){let r=k(e.viewport,e.content),t=e.scrollbar.paddingStart+e.scrollbar.paddingEnd;return Math.max((e.scrollbar.size-t)*r,18)}function Y(e,r){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"ltr",n=X(r),o=r.scrollbar.paddingStart+r.scrollbar.paddingEnd,l=r.scrollbar.size-o,i=r.content-r.viewport,a=(0,d.u)(e,"ltr"===t?[0,i]:[-1*i,0]);return U([0,i],[0,l-n])(a)}function U(e,r){return t=>{if(e[0]===e[1]||r[0]===r[1])return r[0];let n=(r[1]-r[0])/(e[1]-e[0]);return r[0]+n*(t-e[0])}}var V=function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{},t={left:e.scrollLeft,top:e.scrollTop},n=0;return!function o(){let l={left:e.scrollLeft,top:e.scrollTop},i=t.left!==l.left,a=t.top!==l.top;(i||a)&&r(),t=l,n=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(n)};function B(e,r){let t=(0,c.W)(e),o=n.useRef(0);return n.useEffect(()=>()=>window.clearTimeout(o.current),[]),n.useCallback(()=>{window.clearTimeout(o.current),o.current=window.setTimeout(t,r)},[t,r])}function F(e,r){let t=(0,c.W)(r);(0,u.b)(()=>{let r=0;if(e){let n=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(t)});return n.observe(e),()=>{window.cancelAnimationFrame(r),n.unobserve(e)}}},[e,t])}var $=b,q=x,G=H}}]); \ No newline at end of file diff --git a/superduper/rest/out/_next/static/chunks/4848-1b83ceb137eef5c2.js b/superduper/rest/out/_next/static/chunks/4848-1b83ceb137eef5c2.js deleted file mode 100644 index 4e72199c5..000000000 --- a/superduper/rest/out/_next/static/chunks/4848-1b83ceb137eef5c2.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4848],{24776:function(e,t,r){r.d(t,{$N:function(){return g},Be:function(){return p},Vq:function(){return l},cN:function(){return x},cZ:function(){return f},fK:function(){return m},hg:function(){return d}});var a=r(27573),n=r(7653),s=r(67905),o=r(85688),i=r(18580);let l=s.fC,d=s.xz,c=s.h_;s.x8;let u=n.forwardRef((e,t)=>{let{className:r,...n}=e;return(0,a.jsx)(s.aV,{ref:t,className:(0,i.cn)("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",r),...n})});u.displayName=s.aV.displayName;let f=n.forwardRef((e,t)=>{let{className:r,children:n,...l}=e;return(0,a.jsxs)(c,{children:[(0,a.jsx)(u,{}),(0,a.jsxs)(s.VY,{ref:t,className:(0,i.cn)("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",r),...l,children:[n,(0,a.jsxs)(s.x8,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[(0,a.jsx)(o.Pxu,{className:"h-4 w-4"}),(0,a.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})});f.displayName=s.VY.displayName;let m=e=>{let{className:t,...r}=e;return(0,a.jsx)("div",{className:(0,i.cn)("flex flex-col space-y-1.5 text-center sm:text-left",t),...r})};m.displayName="DialogHeader";let x=e=>{let{className:t,...r}=e;return(0,a.jsx)("div",{className:(0,i.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...r})};x.displayName="DialogFooter";let g=n.forwardRef((e,t)=>{let{className:r,...n}=e;return(0,a.jsx)(s.Dx,{ref:t,className:(0,i.cn)("text-lg font-semibold leading-none tracking-tight",r),...n})});g.displayName=s.Dx.displayName;let p=n.forwardRef((e,t)=>{let{className:r,...n}=e;return(0,a.jsx)(s.dk,{ref:t,className:(0,i.cn)("text-sm text-muted-foreground",r),...n})});p.displayName=s.dk.displayName},1930:function(e,t,r){r.d(t,{I:function(){return o}});var a=r(27573),n=r(7653),s=r(18580);let o=n.forwardRef((e,t)=>{let{className:r,type:n,...o}=e;return(0,a.jsx)("input",{type:n,className:(0,s.cn)("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",r),ref:t,...o})});o.displayName="Input"},97747:function(e,t,r){r.d(t,{_:function(){return d}});var a=r(27573),n=r(7653),s=r(1001),o=r(85145),i=r(18580);let l=(0,o.j)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),d=n.forwardRef((e,t)=>{let{className:r,...n}=e;return(0,a.jsx)(s.f,{ref:t,className:(0,i.cn)(l(),r),...n})});d.displayName=s.f.displayName},46346:function(e,t,r){r.d(t,{B:function(){return l},x:function(){return i}});var a=r(27573),n=r(7653),s=r(86705),o=r(18580);let i=n.forwardRef((e,t)=>{let{className:r,children:n,...i}=e;return(0,a.jsxs)(s.fC,{ref:t,className:(0,o.cn)("relative overflow-hidden",r),...i,children:[(0,a.jsx)(s.l_,{className:"h-full w-full rounded-[inherit]",children:n}),(0,a.jsx)(l,{}),(0,a.jsx)(s.Ns,{})]})});i.displayName=s.fC.displayName;let l=n.forwardRef((e,t)=>{let{className:r,orientation:n="vertical",...i}=e;return(0,a.jsx)(s.gb,{ref:t,orientation:n,className:(0,o.cn)("flex touch-none select-none transition-colors","vertical"===n&&"h-full w-2.5 border-l border-l-transparent p-[1px]","horizontal"===n&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",r),...i,children:(0,a.jsx)(s.q4,{className:"relative flex-1 rounded-full bg-border"})})});l.displayName=s.gb.displayName},64303:function(e,t,r){r.d(t,{SP:function(){return d},dr:function(){return l},mQ:function(){return i},nU:function(){return c}});var a=r(27573),n=r(7653),s=r(84132),o=r(18580);let i=s.fC,l=n.forwardRef((e,t)=>{let{className:r,...n}=e;return(0,a.jsx)(s.aV,{ref:t,className:(0,o.cn)("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",r),...n})});l.displayName=s.aV.displayName;let d=n.forwardRef((e,t)=>{let{className:r,...n}=e;return(0,a.jsx)(s.xz,{ref:t,className:(0,o.cn)("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",r),...n})});d.displayName=s.xz.displayName;let c=n.forwardRef((e,t)=>{let{className:r,...n}=e;return(0,a.jsx)(s.VY,{ref:t,className:(0,o.cn)("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",r),...n})});c.displayName=s.VY.displayName},7109:function(e,t,r){r.d(t,{Z:function(){return n}});var a=r(74859);function n(e){if(a.env.NEXT_PUBLIC_AUTO_LOGIN_EXTERNAL_SERVICES){let[e,t]=a.env.NEXT_PUBLIC_AUTO_LOGIN_EXTERNAL_SERVICES.split(","),r=e.includes("@")?e.split("@")[0]:e;return"Basic ".concat(btoa("".concat(r,":").concat(t)))}return"jwt"===a.env.AUTH_MECHANISM?"Bearer ".concat(e.token):"Basic ".concat(btoa("".concat(e.username,":").concat(e.password)))}},16800:function(e,t,r){var a=r(27573),n=r(7653),s=r(7611);t.Z=function(e){let{children:t,label:r,popovercontent:o,popoverheader:i,trigger:l="hover"}=e,[d,c]=(0,n.useState)(!1),u=(0,n.useRef)(null);return(0,n.useEffect)(()=>{function e(e){u.current&&!u.current.contains(e.target)&&c(!1)}if(d)return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[d,u]),(0,a.jsxs)("div",{ref:u,onMouseEnter:()=>{"hover"===l&&c(!0)},onMouseLeave:()=>{"hover"===l&&c(!1)},className:"w-fit h-fit relative flex justify-center",children:[(0,a.jsx)("div",{onClick:()=>c(!d),children:(0,a.jsx)("label",{htmlFor:r,className:"text-sm font-medium leading-6 text-gray-900 inline-flex overflow-visible",children:(0,a.jsxs)("p",{children:[r," ",(0,a.jsx)("button",{type:"button",className:"opacity-50 cursor-pointer flex items-center space-x-1 rounded-full bg-gray-600 p-2 text-white shadow-sm hover:bg-gray-500 focus:ring focus:outline-none",children:(0,a.jsx)(s.Z,{className:"h-6 w-6","aria-hidden":"true"})})]})})}),(0,a.jsx)("div",{hidden:!d,className:"bottom-[100%] absolute z-50 w-32 text-sm text-gray-500 transition-opacity duration-300 bg-white border border-gray-200 rounded-lg shadow-sm",children:(0,a.jsx)("div",{className:"px-3 py-2 bg-gray-100 border-b border-gray-200 rounded-t-lg dark:border-gray-600 dark:bg-gray-700",children:(0,a.jsx)("h3",{className:"font-semibold text-gray-900 dark:text-white ",children:i})})})]})}},45246:function(e,t,r){r.d(t,{Z:function(){return s}});var a=r(27573),n=r(36531);function s(e){let{header:t,description:r}=e;return(0,a.jsx)("div",{className:"flex min-h-[50vh] flex-col items-center justify-center bg-background px-4 py-12 sm:px-6 lg:px-8",children:(0,a.jsxs)("div",{className:"mx-auto max-w-md text-center",children:[(0,a.jsx)(o,{className:"mx-auto h-12 w-12 text-primary"}),(0,a.jsx)("h2",{className:"mt-4 text-2xl font-bold tracking-tight text-foreground sm:text-3xl",children:t||"Oops, API Server is currently unavailable"}),(0,a.jsx)("p",{className:"mt-4 text-muted-foreground",children:r||(0,a.jsx)("span",{children:"We're sorry, but we're having trouble connecting to the API. Please try again in a moment."})}),(0,a.jsx)(n.z,{variant:"outline",className:"mt-6 rounded-full px-4 py-2 text-primary transition-colors hover:bg-primary hover:text-primary-foreground",onClick:()=>{window.location.reload()},children:"Retry Connection"})]})})}function o(e){return(0,a.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,a.jsx)("path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"}),(0,a.jsx)("path",{d:"M12 9v4"}),(0,a.jsx)("path",{d:"M12 17h.01"})]})}},5772:function(e,t,r){var a=r(27573);r(7653),t.Z=e=>{let t=e.times||4;return(0,a.jsxs)("div",{role:"status",className:"max-w-3xl p-4 space-y-4 border border-gray-200 divide-y divide-gray-200 rounded shadow animate-pulse gray:divide-gray-700 md:p-6 gray:border-gray-700",children:[[...Array(t)].map((e,t)=>(0,a.jsxs)("div",{className:"flex items-center justify-between pt-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"h-2.5 bg-gray-300 rounded-full gray:bg-gray-600 w-24 mb-2.5"}),(0,a.jsx)("div",{className:"w-32 h-2 bg-gray-200 rounded-full gray:bg-gray-700"})]}),(0,a.jsx)("div",{className:"h-2.5 bg-gray-300 rounded-full gray:bg-gray-700 w-12"})]},t)),(0,a.jsx)("span",{className:"sr-only",children:"Loading..."})]})}},80923:function(e,t,r){r.d(t,{Z:function(){return c}});var a=r(27573),n=r(7653),s=r(86527),o=r(18580);let i=s.fC,l=s.xz,d=n.forwardRef((e,t)=>{let{className:r,align:n="center",sideOffset:i=4,...l}=e;return(0,a.jsx)(s.VY,{ref:t,align:n,sideOffset:i,className:(0,o.cn)("z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",r),...l})});d.displayName=s.VY.displayName;var c=e=>{let{label:t,popoverheader:r,popovercontent:n}=e;return(0,a.jsxs)(i,{children:[(0,a.jsx)(l,{children:(0,a.jsx)("label",{className:"text-sm font-medium leading-6 text-gray-900 inline-flex items-center",children:(0,a.jsxs)("p",{children:[t," ",(0,a.jsx)("button",{type:"button",className:"align-middle mb-1",children:(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20","stroke-width":"1.5",stroke:"currentColor",className:"w-4 h-4 hover:text-gray-500 rounded-sm align-middle",children:(0,a.jsx)("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9.375 9.375l.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M17.5 10a7.5 7.5 0 1 1-15 0 7.5 7.5 0 0 1 15 0Zm-7.5-3.125h.008v.008H10V6.875Z"})})})]})})}),(0,a.jsxs)(d,{className:"text-sm text-gray-500 transition-opacity duration-300 bg-white border border-gray-200 rounded-lg shadow-sm overflow-visible",children:[r&&(0,a.jsx)("div",{className:"px-3 py-2 bg-gray-100 border-b border-gray-200 rounded-lg dark:border-gray-600 dark:bg-gray-700 overflow-visible",children:(0,a.jsx)("h3",{className:"font-semibold text-gray-900 dark:text-white overflow-visible",children:r})}),(0,a.jsx)("div",{className:"px-3 py-2",children:n})]})]})}}}]); \ No newline at end of file diff --git a/superduper/rest/out/_next/static/chunks/5006-408c2fc67a12cce8.js b/superduper/rest/out/_next/static/chunks/5006-408c2fc67a12cce8.js deleted file mode 100644 index cfb9a26cf..000000000 --- a/superduper/rest/out/_next/static/chunks/5006-408c2fc67a12cce8.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5006],{56146:function(e,t,a){a.d(t,{AG:function(){return f},At:function(){return u},Jb:function(){return l},aG:function(){return d},bg:function(){return m},gN:function(){return c}});var r=a(27573),n=a(7653),s=a(85688),o=a(8828),i=a(18580);let d=n.forwardRef((e,t)=>{let{...a}=e;return(0,r.jsx)("nav",{ref:t,"aria-label":"breadcrumb",...a})});d.displayName="Breadcrumb";let l=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,r.jsx)("ol",{ref:t,className:(0,i.cn)("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",a),...n})});l.displayName="BreadcrumbList";let c=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,r.jsx)("li",{ref:t,className:(0,i.cn)("inline-flex items-center gap-1.5",a),...n})});c.displayName="BreadcrumbItem";let u=n.forwardRef((e,t)=>{let{asChild:a,className:n,...s}=e,d=a?o.g7:"a";return(0,r.jsx)(d,{ref:t,className:(0,i.cn)("transition-colors hover:text-foreground",n),...s})});u.displayName="BreadcrumbLink";let f=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,r.jsx)("span",{ref:t,role:"link","aria-disabled":"true","aria-current":"page",className:(0,i.cn)("font-normal text-foreground",a),...n})});f.displayName="BreadcrumbPage";let m=e=>{let{children:t,className:a,...n}=e;return(0,r.jsx)("li",{role:"presentation","aria-hidden":"true",className:(0,i.cn)("[&>svg]:size-3.5",a),...n,children:null!=t?t:(0,r.jsx)(s.XCv,{})})};m.displayName="BreadcrumbSeparator"},24776:function(e,t,a){a.d(t,{$N:function(){return x},Be:function(){return g},Vq:function(){return d},cN:function(){return p},cZ:function(){return f},fK:function(){return m},hg:function(){return l}});var r=a(27573),n=a(7653),s=a(67905),o=a(85688),i=a(18580);let d=s.fC,l=s.xz,c=s.h_;s.x8;let u=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,r.jsx)(s.aV,{ref:t,className:(0,i.cn)("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",a),...n})});u.displayName=s.aV.displayName;let f=n.forwardRef((e,t)=>{let{className:a,children:n,...d}=e;return(0,r.jsxs)(c,{children:[(0,r.jsx)(u,{}),(0,r.jsxs)(s.VY,{ref:t,className:(0,i.cn)("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",a),...d,children:[n,(0,r.jsxs)(s.x8,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[(0,r.jsx)(o.Pxu,{className:"h-4 w-4"}),(0,r.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})});f.displayName=s.VY.displayName;let m=e=>{let{className:t,...a}=e;return(0,r.jsx)("div",{className:(0,i.cn)("flex flex-col space-y-1.5 text-center sm:text-left",t),...a})};m.displayName="DialogHeader";let p=e=>{let{className:t,...a}=e;return(0,r.jsx)("div",{className:(0,i.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...a})};p.displayName="DialogFooter";let x=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,r.jsx)(s.Dx,{ref:t,className:(0,i.cn)("text-lg font-semibold leading-none tracking-tight",a),...n})});x.displayName=s.Dx.displayName;let g=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,r.jsx)(s.dk,{ref:t,className:(0,i.cn)("text-sm text-muted-foreground",a),...n})});g.displayName=s.dk.displayName},1930:function(e,t,a){a.d(t,{I:function(){return o}});var r=a(27573),n=a(7653),s=a(18580);let o=n.forwardRef((e,t)=>{let{className:a,type:n,...o}=e;return(0,r.jsx)("input",{type:n,className:(0,s.cn)("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",a),ref:t,...o})});o.displayName="Input"},97747:function(e,t,a){a.d(t,{_:function(){return l}});var r=a(27573),n=a(7653),s=a(1001),o=a(85145),i=a(18580);let d=(0,o.j)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),l=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,r.jsx)(s.f,{ref:t,className:(0,i.cn)(d(),a),...n})});l.displayName=s.f.displayName},63052:function(e,t,a){a.d(t,{Bw:function(){return p},DI:function(){return l},Ph:function(){return d},Ql:function(){return g},i4:function(){return u},ki:function(){return c},n5:function(){return x}});var r=a(27573),n=a(7653),s=a(85688),o=a(66240),i=a(18580);let d=o.fC,l=o.ZA,c=o.B4,u=n.forwardRef((e,t)=>{let{className:a,children:n,...d}=e;return(0,r.jsxs)(o.xz,{ref:t,className:(0,i.cn)("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",a),...d,children:[n,(0,r.jsx)(o.JO,{asChild:!0,children:(0,r.jsx)(s.jnn,{className:"h-4 w-4 opacity-50"})})]})});u.displayName=o.xz.displayName;let f=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,r.jsx)(o.u_,{ref:t,className:(0,i.cn)("flex cursor-default items-center justify-center py-1",a),...n,children:(0,r.jsx)(s.g8U,{})})});f.displayName=o.u_.displayName;let m=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,r.jsx)(o.$G,{ref:t,className:(0,i.cn)("flex cursor-default items-center justify-center py-1",a),...n,children:(0,r.jsx)(s.v4q,{})})});m.displayName=o.$G.displayName;let p=n.forwardRef((e,t)=>{let{className:a,children:n,position:s="popper",...d}=e;return(0,r.jsx)(o.h_,{children:(0,r.jsxs)(o.VY,{ref:t,className:(0,i.cn)("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2","popper"===s&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",a),position:s,...d,children:[(0,r.jsx)(f,{}),(0,r.jsx)(o.l_,{className:(0,i.cn)("p-1","popper"===s&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:n}),(0,r.jsx)(m,{})]})})});p.displayName=o.VY.displayName;let x=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,r.jsx)(o.__,{ref:t,className:(0,i.cn)("px-2 py-1.5 text-sm font-semibold",a),...n})});x.displayName=o.__.displayName;let g=n.forwardRef((e,t)=>{let{className:a,children:n,...d}=e;return(0,r.jsxs)(o.ck,{ref:t,className:(0,i.cn)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",a),...d,children:[(0,r.jsx)("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,r.jsx)(o.wU,{children:(0,r.jsx)(s.nQG,{className:"h-4 w-4"})})}),(0,r.jsx)(o.eT,{children:n})]})});g.displayName=o.ck.displayName,n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,r.jsx)(o.Z0,{ref:t,className:(0,i.cn)("-mx-1 my-1 h-px bg-muted",a),...n})}).displayName=o.Z0.displayName},7109:function(e,t,a){a.d(t,{Z:function(){return n}});var r=a(74859);function n(e){if(r.env.NEXT_PUBLIC_AUTO_LOGIN_EXTERNAL_SERVICES){let[e,t]=r.env.NEXT_PUBLIC_AUTO_LOGIN_EXTERNAL_SERVICES.split(","),a=e.includes("@")?e.split("@")[0]:e;return"Basic ".concat(btoa("".concat(a,":").concat(t)))}return"jwt"===r.env.AUTH_MECHANISM?"Bearer ".concat(e.token):"Basic ".concat(btoa("".concat(e.username,":").concat(e.password)))}},87191:function(e,t,a){a.d(t,{Z:function(){return l}});var r=a(27573),n=a(7653),s=a(22392);a(40020),a(19234),a(83346);var o=a(412),i=a(24017),d=a(93296);function l(e){let{data:t,height:a="300px"}=e,l=(0,o.I0)(),[c,u]=(0,n.useState)(JSON.stringify(t,null," "));return(0,n.useRef)(null),(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(s.default,{className:"block w-full rounded-md border-2 py-1.5 text-gray-900 shadow-lg ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600",placeholder:"Stack result JSON here...",mode:"json",theme:"github",name:"blah2",onChange:e=>{try{u(e),l((0,i.q7)(JSON.parse(e)))}catch(e){d.ZP.error("Error updating...",{id:"stack-update-error"})}},fontSize:13,showPrintMargin:!0,showGutter:!0,highlightActiveLine:!0,value:c,setOptions:{enableBasicAutocompletion:!0,enableLiveAutocompletion:!0,enableSnippets:!0,showLineNumbers:!0,tabSize:2,useWorker:!1,wrap:!0},height:a,width:"100%"})})}},5772:function(e,t,a){var r=a(27573);a(7653),t.Z=e=>{let t=e.times||4;return(0,r.jsxs)("div",{role:"status",className:"max-w-3xl p-4 space-y-4 border border-gray-200 divide-y divide-gray-200 rounded shadow animate-pulse gray:divide-gray-700 md:p-6 gray:border-gray-700",children:[[...Array(t)].map((e,t)=>(0,r.jsxs)("div",{className:"flex items-center justify-between pt-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"h-2.5 bg-gray-300 rounded-full gray:bg-gray-600 w-24 mb-2.5"}),(0,r.jsx)("div",{className:"w-32 h-2 bg-gray-200 rounded-full gray:bg-gray-700"})]}),(0,r.jsx)("div",{className:"h-2.5 bg-gray-300 rounded-full gray:bg-gray-700 w-12"})]},t)),(0,r.jsx)("span",{className:"sr-only",children:"Loading..."})]})}},80923:function(e,t,a){a.d(t,{Z:function(){return c}});var r=a(27573),n=a(7653),s=a(86527),o=a(18580);let i=s.fC,d=s.xz,l=n.forwardRef((e,t)=>{let{className:a,align:n="center",sideOffset:i=4,...d}=e;return(0,r.jsx)(s.VY,{ref:t,align:n,sideOffset:i,className:(0,o.cn)("z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a),...d})});l.displayName=s.VY.displayName;var c=e=>{let{label:t,popoverheader:a,popovercontent:n}=e;return(0,r.jsxs)(i,{children:[(0,r.jsx)(d,{children:(0,r.jsx)("label",{className:"text-sm font-medium leading-6 text-gray-900 inline-flex items-center",children:(0,r.jsxs)("p",{children:[t," ",(0,r.jsx)("button",{type:"button",className:"align-middle mb-1",children:(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20","stroke-width":"1.5",stroke:"currentColor",className:"w-4 h-4 hover:text-gray-500 rounded-sm align-middle",children:(0,r.jsx)("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9.375 9.375l.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M17.5 10a7.5 7.5 0 1 1-15 0 7.5 7.5 0 0 1 15 0Zm-7.5-3.125h.008v.008H10V6.875Z"})})})]})})}),(0,r.jsxs)(l,{className:"text-sm text-gray-500 transition-opacity duration-300 bg-white border border-gray-200 rounded-lg shadow-sm overflow-visible",children:[a&&(0,r.jsx)("div",{className:"px-3 py-2 bg-gray-100 border-b border-gray-200 rounded-lg dark:border-gray-600 dark:bg-gray-700 overflow-visible",children:(0,r.jsx)("h3",{className:"font-semibold text-gray-900 dark:text-white overflow-visible",children:a})}),(0,r.jsx)("div",{className:"px-3 py-2",children:n})]})]})}}}]); \ No newline at end of file diff --git a/superduper/rest/out/_next/static/chunks/5142-094e64851fe5ec05.js b/superduper/rest/out/_next/static/chunks/5142-094e64851fe5ec05.js deleted file mode 100644 index 890de310f..000000000 --- a/superduper/rest/out/_next/static/chunks/5142-094e64851fe5ec05.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5142],{56908:function(e,t,s){"use strict";s.d(t,{Z:function(){return Q}});var i=s(27573),n=s(7653),l=s(70790),r=s(13908),a=s(412),o=s(34611),d=s(60855),c=s(44195);let u=e=>t=>t({type:c.m,payload:e});var h=s(67430),m=s(87285),v=s(18929),p=s(86288);function x(){return(0,i.jsx)(p.Zb,{className:"w-full max-w-sm mx-auto",children:(0,i.jsx)(p.aY,{className:"flex justify-center items-center p-6",children:(0,i.jsx)("div",{className:"flex space-x-2",children:[0,1,2].map(e=>(0,i.jsx)("div",{className:"w-3 h-3 bg-blue-600 rounded-full animate-pulse",style:{animationDelay:"".concat(.15*e,"s"),animationDuration:"0.9s"}},e))})})})}function f(e){let{header:t,description:s,createDeployment:l,showIconPart:r=!0,showHeadUp:a=!1}=e,[o,d]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{let e=setTimeout(()=>{d(!0)},200);return()=>clearTimeout(e)},[]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("br",{}),(0,i.jsx)("br",{}),(0,i.jsx)("br",{}),r&&(0,i.jsxs)("div",{className:"text-center",children:[(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",className:"mx-auto h-12 w-12 text-gray-400",children:(0,i.jsx)("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 9v3.75m9-.75a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 3.75h.008v.008H12v-.008Z"})}),(0,i.jsx)("h3",{className:"mt-2 text-sm font-semibold text-gray-900",children:t||"No Deployments Found"}),(0,i.jsx)("p",{className:"mt-1 text-sm text-gray-500",children:s||"Get started by creating a new deployment."})]}),(0,i.jsx)("br",{}),(0,i.jsx)("br",{}),!o&&(0,i.jsx)(x,{}),o&&"hide"!==l&&(0,i.jsx)("div",{children:(0,i.jsx)("div",{className:"flex items-center justify-center",children:(0,i.jsx)("div",{className:"bg-white shadow sm:rounded-lg",children:(0,i.jsx)("div",{className:"px-4 py-5 sm:p-6",children:(0,i.jsxs)("div",{className:"sm:flex sm:items-start sm:justify-between",children:[(0,i.jsxs)("div",{children:[(0,i.jsx)("h3",{className:"text-base font-semibold leading-6 text-gray-900",children:"Create Deployment"}),(0,i.jsx)("div",{className:"mt-2 max-w-xl text-sm text-gray-500",children:(0,i.jsx)("p",{children:"You have to create a deployment to use SuperDuper, first you need to deploy instances and then we will manage everything for you."})})]}),(0,i.jsx)("div",{className:"mt-5 sm:ml-6 sm:mt-0 sm:flex sm:flex-shrink-0 sm:items-center",children:(0,i.jsx)("a",{href:"/webui/deployment",children:(0,i.jsxs)("button",{type:"button",className:"inline-flex items-center rounded-md bg-indigo-600 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600",children:["Start Here",(0,i.jsx)("span",{children:" "}),(0,i.jsx)(v.Z,{className:"ml-0.5 -mr.5 h-5 w-5","aria-hidden":"true"})]})})})]})})})})})]})}var g=s(85688),j=s(57293),y=s(72513),N=()=>{let[e,t]=(0,n.useState)(!1);return e?null:(0,i.jsxs)(y.bZ,{variant:"destructive",children:[(0,i.jsx)(g.LPM,{className:"h-4 w-4"}),(0,i.jsx)(y.Cd,{children:"Deleted Deployment"}),(0,i.jsx)(y.X,{children:"Your deployment is deleted and no longer available. You can create a new deployment."}),(0,i.jsx)("button",{onClick:()=>{t(!0)},className:"absolute top-0 right-0 p-2",children:(0,i.jsx)(j.Z,{className:"h-4 w-4 text-gray-400","aria-hidden":"true"})})]})},w=s(37699);let b=e=>t=>t({type:w.t,payload:function(e,t){let s={NEXT_PUBLIC_REST_API:null,NEXT_PUBLIC_APISERVER:null,NEXT_PUBLIC_WEBUI:null,NEXT_PUBLIC_PROXY:null,NEXT_PUBLIC_RAY_DASHBOARD:null,NEXT_PUBLIC_JUPYTER_NOTEBOOK:null,NEXT_PUBLIC_GRAFANA_DASHBOARD:null,NEXT_PUBLIC_GRAFANA_NAMESPACE:"superduperdb",endpointData:e};if(!e||!e.items)return s;try{e.items.forEach(e=>{let i;let n=e.serviceName.toLowerCase();if((i=Object.keys(t).find(e=>e.toLowerCase()===n))&&e.endpoints&&e.endpoints.length>0){let n=e.endpoints.find(e=>e.ingressURL);if(n){let e="".concat(n.protocol.toLowerCase(),"://").concat(n.ingressURL);e.endsWith("/")&&(e=e.slice(0,-1)),s[t[i]||i]=e}}})}catch(e){console.error("Error:",e)}return s}(e,{jupyterhub:"NEXT_PUBLIC_JUPYTER_NOTEBOOK","ray-cluster-ingress":"NEXT_PUBLIC_RAY_DASHBOARD",RAY_HEAD:"NEXT_PUBLIC_RAY_DASHBOARD","monitoring-grafana":"NEXT_PUBLIC_GRAFANA_DASHBOARD",rest:"NEXT_PUBLIC_REST_API",NOCODE_APISERVER:"NEXT_PUBLIC_APISERVER",NOCODE_WEBUI:"NEXT_PUBLIC_WEBUI",NOCODE_PROXY:"NEXT_PUBLIC_PROXY"})});var S=s(7109),_=()=>{(0,a.v9)(e=>e.environment.environmentLoadedValues);let e=(0,a.v9)(e=>{var t;return null==e?void 0:null===(t=e.userInfo)||void 0===t?void 0:t.userInfoLoadedValues}),t=(0,a.I0)(),s=(0,a.v9)(e=>e.deploymentName.deploymentNameLoadedValues.name);async function l(s){try{let i="".concat("".concat("http://localhost:8090","/endpoints?deployment=").concat(s)),n=await fetch(i,{method:"GET",headers:{"Content-Type":"application/json",Authorization:(0,S.Z)(e),superduper_reverse_proxy:"http://localhost:8090"}});if(n.ok){let e=await n.json();e.items?t(b(e)):(t(b({})),console.warn("Endpoint data items are null, dispatching empty values")),console.log("ENDPOINT DATA\uD83D\uDC49\uD83D\uDC49 ",e)}else t(b({})),console.error("Error adding endpoint to local storage:",n.statusText)}catch(e){t(b({})),console.error("Error adding endpoint to local storage:",e)}}return(0,n.useEffect)(()=>{if(s){let e=[0],t=0,i=()=>{if(t{console.log("Calling endpoint for deployment:",s,"after",n/1e3,"seconds"),l(s),t+=1,i()},n)}};return i(),()=>{t=e.length}}},[s]),(0,i.jsx)(i.Fragment,{})},C=s(5772),E=s(53146),k=s.n(E);function R(e){let{text:t="superduper",color:s="currentColor",typingSpeed:l=150,fontSize:r=24,iconSize:a=24}=e,[o,d]=(0,n.useState)(""),[c,u]=(0,n.useState)(0),h=(0,n.useRef)(null);return(0,n.useEffect)(()=>{let e=h.current;return e&&(e.style.animation="spin 1s linear infinite"),()=>{e&&(e.style.animation="")}},[]),(0,n.useEffect)(()=>{if(c{d(e=>e+t[c]),u(e=>e+1)},l);return()=>clearTimeout(e)}{let e=setTimeout(()=>{d(""),u(0)},3*l);return()=>clearTimeout(e)}},[c,t,l]),(0,i.jsxs)("div",{className:"jsx-aca48a445eb89caf flex items-center gap-3",children:[(0,i.jsxs)("svg",{ref:h,width:a,height:a,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"jsx-aca48a445eb89caf",children:[(0,i.jsx)("style",{children:"\n @keyframes spin {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n }\n "}),(0,i.jsx)("path",{d:"M12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2ZM12 4C16.4183 4 20 7.58172 20 12C20 16.4183 16.4183 20 12 20C7.58172 20 4 16.4183 4 12C4 7.58172 7.58172 4 12 4Z",fill:s,fillOpacity:"0.3",className:"jsx-aca48a445eb89caf"}),(0,i.jsx)("path",{d:"M12 2C6.47715 2 2 6.47715 2 12H4C4 7.58172 7.58172 4 12 4V2Z",fill:s,className:"jsx-aca48a445eb89caf"})]}),(0,i.jsxs)("div",{style:{color:s,fontSize:"".concat(r,"px"),minWidth:"".concat(t.length,"ch")},"aria-live":"polite","aria-label":"Loading: typing ".concat(t),className:"jsx-aca48a445eb89caf inline-block",children:[o,(0,i.jsx)("span",{style:{borderRight:"2px solid ".concat(s)},className:"jsx-aca48a445eb89caf animate-blink",children:"\xa0"})]}),(0,i.jsx)(k(),{id:"aca48a445eb89caf",children:"@-webkit-keyframes blink{0%,100%{opacity:0}50%{opacity:1}}@-moz-keyframes blink{0%,100%{opacity:0}50%{opacity:1}}@-o-keyframes blink{0%,100%{opacity:0}50%{opacity:1}}@keyframes blink{0%,100%{opacity:0}50%{opacity:1}}.animate-blink.jsx-aca48a445eb89caf{-webkit-animation:blink.7s step-end infinite;-moz-animation:blink.7s step-end infinite;-o-animation:blink.7s step-end infinite;animation:blink.7s step-end infinite}"})]})}var A=s(45246),T=s(61284),I=s(96764),L=s(63130),D=s(36531),P=s(1930),B=s(97747),F=s(95042),z=s(70694),O=s(80923),Z=s(53511),U=s(22392);s(40020),s(19234),s(83346);var M=s(16800),G=s(64303),V=e=>{var t,s;let{data:l}=e,r=(0,a.v9)(e=>e.deploymentAPI.deploymentAPILoadedValues),[o,d]=(0,n.useState)("".concat(JSON.stringify(l,null," "))),c=e=>{d(e)},u=(0,n.useRef)(null),h=async()=>{try{u.current.editor.selectAll();let e=u.current.editor.getSelectedText();await navigator.clipboard.writeText(e),console.log("Text copied to clipboard:",e)}catch(e){console.error("Unable to copy text to clipboard:",e)}};return r?(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(G.mQ,{defaultValue:"log",className:"w-full",children:[(0,i.jsxs)(G.dr,{className:"grid w-full grid-cols-2",children:[(0,i.jsx)(G.SP,{value:"status",children:"Status"}),(0,i.jsx)(G.SP,{value:"specs",children:"Specs"})]}),(0,i.jsxs)(G.nU,{value:"status",children:[(0,i.jsxs)("div",{className:"relative mt-4",children:[(0,i.jsx)("div",{className:"absolute inset-0 flex items-center","aria-hidden":"true",children:(0,i.jsx)("div",{className:"w-full border-t border-gray-300"})}),(0,i.jsx)("div",{className:"relative flex justify-start",children:(0,i.jsx)("span",{className:"bg-white pr-3 text-base font-semibold leading-6 text-gray-900",children:"Status"})})]}),(0,i.jsxs)("div",{className:"relative overflow-visible mt-4",children:[(0,i.jsx)("div",{className:"absolute bottom-8 right-5 z-50",children:(0,i.jsx)("span",{onClick:h,children:(0,i.jsx)(M.Z,{popoverheader:"Click to copy"})})}),(0,i.jsx)(U.default,{ref:u,className:"block w-full rounded-md border-2 py-1.5 text-gray-900 shadow-lg ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600",placeholder:"Placeholder Text",mode:"json",theme:"github",name:"blah2",onChange:c,fontSize:14,showPrintMargin:!0,showGutter:!0,highlightActiveLine:!0,value:"".concat(JSON.stringify(l,null," ")),setOptions:{enableBasicAutocompletion:!0,enableLiveAutocompletion:!0,enableSnippets:!0,showLineNumbers:!0,tabSize:2,useWorker:!1,wrap:!0},height:"400px",width:"100%"})]})]}),(0,i.jsxs)(G.nU,{value:"specs",children:[(0,i.jsxs)("div",{className:"relative mt-4",children:[(0,i.jsx)("div",{className:"absolute inset-0 flex items-center","aria-hidden":"true",children:(0,i.jsx)("div",{className:"w-full border-t border-gray-300"})}),(0,i.jsx)("div",{className:"relative flex justify-start",children:(0,i.jsx)("span",{className:"bg-white pr-3 text-base font-semibold leading-6 text-gray-900",children:"Specs"})})]}),(0,i.jsxs)("div",{className:"relative overflow-visible mt-4",children:[(0,i.jsx)("div",{className:"absolute bottom-8 right-5 z-50",children:(0,i.jsx)("span",{onClick:h,children:(0,i.jsx)(M.Z,{popoverheader:"Click to copy"})})}),(0,i.jsx)(U.default,{ref:u,className:"block w-full rounded-md border-2 py-1.5 text-gray-900 shadow-lg ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600",placeholder:"Placeholder Text",mode:"json",theme:"github",name:"blah2",onChange:c,fontSize:14,showPrintMargin:!0,showGutter:!0,highlightActiveLine:!0,value:"".concat(JSON.stringify((null==r?void 0:null===(t=r.spec)||void 0===t?void 0:t.nodeGroupList)&&(null==r?void 0:null===(s=r.spec)||void 0===s?void 0:s.nodeGroupList.filter(e=>e.name===(null==l?void 0:l.name))),null," ")),setOptions:{enableBasicAutocompletion:!0,enableLiveAutocompletion:!0,enableSnippets:!0,showLineNumbers:!0,tabSize:2,useWorker:!1,wrap:!0},height:"400px",width:"100%"})]})]})]})}):null},X=s(46346);let Y=e=>e?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():"";function H(){var e;let t=(0,a.v9)(e=>e.nodegroups.nodeLoadedValues);(0,a.v9)(e=>e.deploymentAPI.deploymentAPILoadedValues);let[s,l]=(0,n.useState)(!0);return(0,n.useEffect)(()=>{let e=setTimeout(()=>{l(!1)},5e3);return()=>clearTimeout(e)},[]),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)("div",{children:[(0,i.jsx)("div",{className:"mx-auto max-w-7xl pr-4 pt-8 pb-0 sm:pr-6 lg:pr-8",children:(0,i.jsx)("div",{className:"mx-auto flex max-w-2xl items-center justify-between gap-x-8 lg:mx-0 lg:max-w-none",children:(0,i.jsxs)("div",{className:"flex items-center gap-x-4",children:[(0,i.jsx)("div",{className:"bg-black rounded-lg p-2",children:(0,i.jsx)(W,{className:"w-6 h-6 text-gray-300"})}),(0,i.jsx)("h1",{children:(0,i.jsxs)("div",{className:"text-base font-semibold leading-6 text-gray-900",children:["Node Groups"," ",(0,i.jsx)(O.Z,{label:"",popoverheader:"Node Groups",popovercontent:(0,i.jsx)("p",{children:"Node Groups are a collection of nodes that are managed together."})})]})})]})})}),(0,i.jsxs)(X.x,{className:"max-w-7xl whitespace-nowrap",children:[t?(0,i.jsxs)("div",{className:" bg-white px-4 py-5 sm:px-6",children:[(0,i.jsx)("div",{className:"-ml-4 -mt-4 flex flex-wrap items-center justify-between sm:flex-nowrap border-b border-gray-200",children:(0,i.jsx)("div",{className:"ml-4 mt-4 flex-shrink-0"})}),(0,i.jsx)("ul",{role:"list",className:"divide-y divide-red/5",children:null==t?void 0:null===(e=t.items)||void 0===e?void 0:e.map((e,t)=>{var s,n,l,r,a,o,d,c,u,h,m,v,p,x,f,g,j,y,N,w,b,S,_,C,E,k,R,A,O,Z;return(0,i.jsx)(i.Fragment,{children:(0,i.jsx)("li",{className:"relative flex items-center space-x-4 py-4",children:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:"min-w-0 flex-auto",children:[(0,i.jsxs)("div",{className:"flex items-center gap-x-3",children:[(0,i.jsx)("div",{className:function(){for(var e=arguments.length,t=Array(e),s=0;s0?null==e?void 0:null===(_=e.status)||void 0===_?void 0:null===(S=_.reservation)||void 0===S?void 0:null===(b=S.computeClassList)||void 0===b?void 0:b.map((e,t)=>(0,i.jsx)("button",{type:"button",className:"inline-flex items-center rounded-full bg-white px-2.5 py-1 text-xs font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50",children:e},t)):(0,i.jsx)("button",{type:"button",className:"inline-flex items-center rounded-full bg-white px-2.5 py-1 text-xs font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50",children:"No ComputeClass"})]})]}),e&&(null==e?void 0:null===(C=e.status)||void 0===C?void 0:C.ready)&&(0,i.jsxs)("dd",{className:"inline-flex items-center rounded-md bg-green-50 px-2 py-1 text-xs font-medium text-green-700 ring-1 ring-inset ring-green-600/20",children:[Y(null==e?void 0:null===(E=e.status)||void 0===E?void 0:E.phase)||"Healthy",(0,i.jsx)("div",{className:"offline flex-none rounded-full p-1",children:(0,i.jsxs)("div",{role:"status",children:[(0,i.jsx)("svg",{className:"w-4 h-4 me-0 text-green-500 dark:text-green-400 flex-shrink-0","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 20 20",children:(0,i.jsx)("path",{d:"M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5Zm3.707 8.207-4 4a1 1 0 0 1-1.414 0l-2-2a1 1 0 0 1 1.414-1.414L9 10.586l3.293-3.293a1 1 0 0 1 1.414 1.414Z"})}),(0,i.jsx)("span",{className:"sr-only",children:"..."})]})})]}),e&&!(null==e?void 0:null===(k=e.status)||void 0===k?void 0:k.ready)&&(0,i.jsxs)("dd",{className:"inline-flex items-center rounded-md px-2 py-1 text-xs font-medium ring-1 ring-inset ".concat("Pending"===Y(null==e?void 0:null===(R=e.status)||void 0===R?void 0:R.phase)?"bg-yellow-50 text-yellow-700 ring-yellow-600/20":"bg-red-50 text-red-700 ring-red-600/20"),children:["Pending"===Y(null==e?void 0:null===(A=e.status)||void 0===A?void 0:A.phase)?"Pending":Y(null==e?void 0:null===(O=e.status)||void 0===O?void 0:O.phase)||"Unhealthy",(0,i.jsx)("div",{className:"offline flex-none rounded-full p-1",children:(0,i.jsx)("div",{role:"status",children:(0,i.jsx)("svg",{className:"w-4 h-4 me-0 flex-shrink-0 ".concat("Pending"===Y(null==e?void 0:null===(Z=e.status)||void 0===Z?void 0:Z.phase)?"text-yellow-500 dark:text-yellow-400":"text-red-500 dark:text-red-400"),"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",children:(0,i.jsx)("path",{d:"M2 12a10 10 0 1 1 20 0 10 10 0 0 1-20 0Zm7.7-3.7a1 1 0 0 0-1.4 1.4l2.3 2.3-2.3 2.3a1 1 0 1 0 1.4 1.4l2.3-2.3 2.3 2.3a1 1 0 0 0 1.4-1.4L13.4 12l2.3-2.3a1 1 0 0 0-1.4-1.4L12 10.6 9.7 8.3Z"})})})})]}),(0,i.jsxs)(z.yo,{children:[(0,i.jsx)(z.aM,{asChild:!0,children:(0,i.jsxs)(D.z,{variant:"outline",children:["Show More"," ",(0,i.jsx)(I.Z,{className:"ml-2 -mr-0.5 h-5 w-5 flex-none text-gray-400","aria-hidden":"true"})]})}),(0,i.jsxs)(z.ue,{className:"overflow-auto w-[800px] sm:w-[800px] sm:max-w-none",children:[(0,i.jsxs)(z.Tu,{children:[(0,i.jsxs)(z.bC,{children:["More info about ",e.name]}),(0,i.jsx)(z.Ei,{children:"Here is the information regarding the node groups."})]}),(0,i.jsx)("div",{className:"grid gap-4 py-4 overflow-visible",children:(0,i.jsx)(V,{data:e})}),(0,i.jsx)(z.FF,{children:(0,i.jsx)(z.sw,{asChild:!0,children:(0,i.jsx)(D.z,{type:"submit",children:"Close Now"})})})]})]})]})},e.name)})})})]}):(0,i.jsx)("div",{className:"mt-2 ml-4",children:s?(0,i.jsx)(C.Z,{}):(0,i.jsx)(Z.Z,{header:"UNKNOWN",message:""})}),(0,i.jsx)(X.B,{orientation:"horizontal"})]})]})})}function W(e){return(0,i.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,i.jsx)("rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2"}),(0,i.jsx)("rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2"}),(0,i.jsx)("line",{x1:"6",x2:"6.01",y1:"6",y2:"6"}),(0,i.jsx)("line",{x1:"6",x2:"6.01",y1:"18",y2:"18"})]})}var q=s(78999);function J(){var e,t,s,n,l,r,o,d,c,u,h,m,v,x,f,g,j,y,N,w,b,S,_,C,E,k,R,A,T,I,L,D,P,B,F,z,O,Z,U,M,G,V,X,Y,H,W,q,J,K,Q,$,ee,et,es,ei,en,el,er,ea,eo,ed,ec,eu,eh,em,ev,ep;let ex=(0,a.v9)(e=>e.deploymentAPI.deploymentAPILoadedValues);return ex&&(null==ex?void 0:null===(e=ex.spec)||void 0===e?void 0:e.superDuperEnv)?(0,i.jsxs)(p.Zb,{className:"w-full",children:[(0,i.jsxs)(p.Ol,{children:[(0,i.jsx)(p.ll,{children:"Configuration"}),(0,i.jsx)(p.SZ,{children:"Details for the deployment environment."})]}),(0,i.jsxs)(p.aY,{className:"grid gap-6",children:[(0,i.jsxs)("div",{className:"grid gap-2",children:[(0,i.jsx)("h3",{className:"font-semibold",children:"Data Store"}),(0,i.jsxs)("div",{className:"grid sm:grid-cols-2 gap-4",children:[(0,i.jsxs)("div",{className:"grid gap-1",children:[(0,i.jsx)("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Backend Type"}),(0,i.jsx)("span",{className:"font-medium",children:(null==ex?void 0:null===(n=ex.spec)||void 0===n?void 0:null===(s=n.superDuperEnv)||void 0===s?void 0:null===(t=s.dataStore)||void 0===t?void 0:t.backendType)?null==ex?void 0:null===(o=ex.spec)||void 0===o?void 0:null===(r=o.superDuperEnv)||void 0===r?void 0:null===(l=r.dataStore)||void 0===l?void 0:l.backendType:"[Not Specified]"})]}),(0,i.jsxs)("div",{className:"grid gap-1",children:[(0,i.jsx)("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Connection URI"}),(0,i.jsx)("span",{className:"font-medium",children:(null==ex?void 0:null===(u=ex.spec)||void 0===u?void 0:null===(c=u.superDuperEnv)||void 0===c?void 0:null===(d=c.dataStore)||void 0===d?void 0:d.connectionURI)?null==ex?void 0:null===(v=ex.spec)||void 0===v?void 0:null===(m=v.superDuperEnv)||void 0===m?void 0:null===(h=m.dataStore)||void 0===h?void 0:h.connectionURI:"[Not Specified]"})]})]})]}),(0,i.jsxs)("div",{className:"grid gap-2",children:[(0,i.jsx)("h3",{className:"font-semibold",children:"Metadata Store"}),(0,i.jsxs)("div",{className:"grid sm:grid-cols-2 gap-4",children:[(0,i.jsxs)("div",{className:"grid gap-1",children:[(0,i.jsx)("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Backend Type"}),(0,i.jsxs)("span",{className:"font-medium",children:[" ",(null==ex?void 0:null===(g=ex.spec)||void 0===g?void 0:null===(f=g.superDuperEnv)||void 0===f?void 0:null===(x=f.metadataStore)||void 0===x?void 0:x.backendType)?null==ex?void 0:null===(N=ex.spec)||void 0===N?void 0:null===(y=N.superDuperEnv)||void 0===y?void 0:null===(j=y.metadataStore)||void 0===j?void 0:j.backendType:"[Not Specified]"]})]}),(0,i.jsxs)("div",{className:"grid gap-1",children:[(0,i.jsx)("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Connection URI"}),(0,i.jsx)("span",{className:"font-medium",children:(null==ex?void 0:null===(S=ex.spec)||void 0===S?void 0:null===(b=S.superDuperEnv)||void 0===b?void 0:null===(w=b.metadataStore)||void 0===w?void 0:w.connectionURI)?null==ex?void 0:null===(E=ex.spec)||void 0===E?void 0:null===(C=E.superDuperEnv)||void 0===C?void 0:null===(_=C.metadataStore)||void 0===_?void 0:_.connectionURI:"[Not Specified]"})]})]})]}),(0,i.jsxs)("div",{className:"grid gap-2",children:[(0,i.jsx)("h3",{className:"font-semibold",children:"Artifact Store"}),(0,i.jsxs)("div",{className:"grid sm:grid-cols-2 gap-4",children:[(0,i.jsxs)("div",{className:"grid gap-1",children:[(0,i.jsx)("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Backend Type"}),(0,i.jsx)("span",{className:"font-medium",children:(null==ex?void 0:null===(A=ex.spec)||void 0===A?void 0:null===(R=A.superDuperEnv)||void 0===R?void 0:null===(k=R.artifactStore)||void 0===k?void 0:k.backendType)?null==ex?void 0:null===(L=ex.spec)||void 0===L?void 0:null===(I=L.superDuperEnv)||void 0===I?void 0:null===(T=I.artifactStore)||void 0===T?void 0:T.backendType:"[Not Specified]"})]}),(0,i.jsxs)("div",{className:"grid gap-1",children:[(0,i.jsx)("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Connection URI"}),(0,i.jsx)("span",{className:"font-medium",children:(null==ex?void 0:null===(B=ex.spec)||void 0===B?void 0:null===(P=B.superDuperEnv)||void 0===P?void 0:null===(D=P.artifactStore)||void 0===D?void 0:D.connectionURI)?null==ex?void 0:null===(O=ex.spec)||void 0===O?void 0:null===(z=O.superDuperEnv)||void 0===z?void 0:null===(F=z.artifactStore)||void 0===F?void 0:F.connectionURI:"[Not Specified]"})]})]})]}),(0,i.jsxs)("div",{className:"grid gap-2",children:[(0,i.jsx)("h3",{className:"font-semibold",children:"Service Endpoints"}),(0,i.jsxs)("div",{className:"grid sm:grid-cols-2 gap-4",children:[(0,i.jsxs)("div",{className:"grid gap-1",children:[(0,i.jsx)("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:"CDC"}),(0,i.jsx)("span",{className:"font-medium",children:(null==ex?void 0:null===(M=ex.spec)||void 0===M?void 0:null===(U=M.superDuperEnv)||void 0===U?void 0:null===(Z=U.serviceEndpoints)||void 0===Z?void 0:Z.cdc)?null==ex?void 0:null===(X=ex.spec)||void 0===X?void 0:null===(V=X.superDuperEnv)||void 0===V?void 0:null===(G=V.serviceEndpoints)||void 0===G?void 0:G.cdc:"[Not Specified]"})]}),(0,i.jsxs)("div",{className:"grid gap-1",children:[(0,i.jsx)("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Ray"}),(0,i.jsx)("span",{className:"font-medium",children:(null==ex?void 0:null===(W=ex.spec)||void 0===W?void 0:null===(H=W.superDuperEnv)||void 0===H?void 0:null===(Y=H.serviceEndpoints)||void 0===Y?void 0:Y.ray)?null==ex?void 0:null===(K=ex.spec)||void 0===K?void 0:null===(J=K.superDuperEnv)||void 0===J?void 0:null===(q=J.serviceEndpoints)||void 0===q?void 0:q.ray:"[Not Specified]"})]}),(0,i.jsxs)("div",{className:"grid gap-1",children:[(0,i.jsx)("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:"REST Server"}),(0,i.jsxs)("span",{className:"font-medium",children:[" ",(null==ex?void 0:null===(ee=ex.spec)||void 0===ee?void 0:null===($=ee.superDuperEnv)||void 0===$?void 0:null===(Q=$.serviceEndpoints)||void 0===Q?void 0:Q.restServer)?null==ex?void 0:null===(ei=ex.spec)||void 0===ei?void 0:null===(es=ei.superDuperEnv)||void 0===es?void 0:null===(et=es.serviceEndpoints)||void 0===et?void 0:et.restServer:"[Not Specified]"]})]}),(0,i.jsxs)("div",{className:"grid gap-1",children:[(0,i.jsx)("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Vector Search"}),(0,i.jsxs)("span",{className:"font-medium",children:[" ",(null==ex?void 0:null===(er=ex.spec)||void 0===er?void 0:null===(el=er.superDuperEnv)||void 0===el?void 0:null===(en=el.serviceEndpoints)||void 0===en?void 0:en.vectorSearch)?null==ex?void 0:null===(ed=ex.spec)||void 0===ed?void 0:null===(eo=ed.superDuperEnv)||void 0===eo?void 0:null===(ea=eo.serviceEndpoints)||void 0===ea?void 0:ea.vectorSearch:"[Not Specified]"]})]}),(0,i.jsxs)("div",{className:"grid gap-1",children:[(0,i.jsx)("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Scheduler"}),(0,i.jsxs)("span",{className:"font-medium",children:[" ",(null==ex?void 0:null===(eh=ex.spec)||void 0===eh?void 0:null===(eu=eh.superDuperEnv)||void 0===eu?void 0:null===(ec=eu.serviceEndpoints)||void 0===ec?void 0:ec.scheduler)?null==ex?void 0:null===(ep=ex.spec)||void 0===ep?void 0:null===(ev=ep.superDuperEnv)||void 0===ev?void 0:null===(em=ev.serviceEndpoints)||void 0===em?void 0:em.scheduler:"[Not Specified]"]})]})]})]})]})]}):null}var K=s(81695);function Q(){(0,a.v9)(e=>e.environment.environmentLoadedValues);let e=(0,a.v9)(e=>{var t;return null==e?void 0:null===(t=e.userInfo)||void 0===t?void 0:t.userInfoLoadedValues}),t=(0,a.v9)(e=>e.deploymentName.deploymentNameLoadedValues.name),s=(0,K.useSearchParams)(),c=s.get("deleted"),v=s.get("deployment"),p=(0,a.I0)(),x=async t=>(await r.Z.get(t,{headers:{Accept:"application/json",Authorization:(0,S.Z)(e),superduper_reverse_proxy:"http://localhost:8090"}})).data,{data:g,error:j}=(0,l.ZP)("".concat("".concat("http://localhost:8090","/deployments/").concat(t)),x,{refreshInterval:0,revalidateOnFocus:!1,revalidateOnReconnect:!1,shouldRetryOnError:!1});if((0,n.useEffect)(()=>{g&&(console.log("\uD83D\uDC49 PROXYING FROM","http://localhost:8090"),p(u(g)),null==g.status.nodeGroupList?console.log("No Node Group List"):(p((0,d.NB)({items:g.status.nodeGroupList})),p((0,d.Bw)({items:g.status.nodeGroupList}))),null==g.status.serviceList?console.log("No such service"):p((0,o.Gi)({items:g.status.serviceList.filter(e=>!0).sort((e,t)=>e.namet.name?1:0)})))},[g,p]),"true"===c)return(0,i.jsxs)("div",{children:[(0,i.jsx)(N,{}),(0,i.jsx)(m.Z,{showIconPart:!1})]});if(!g&&!j)return(0,i.jsx)(C.Z,{times:6});if("done"===v&&!g&&j)return(0,i.jsx)("div",{className:"flex items-center justify-center h-75vh",children:(0,i.jsx)(R,{})});if(j){if(j.response){let e=j.response.status;if(console.log("Status Code:",e),404===e)return(0,i.jsx)(f,{showIconPart:!1,showHeadUp:!0})}else if(j.request)return console.log("No response received from server"),(0,i.jsx)(A.Z,{});else return console.log("Error:",j.message),(0,i.jsx)(A.Z,{});return console.log("Error",j),(0,i.jsx)(A.Z,{header:"API Server is currently unavailable"})}return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(_,{}),(0,i.jsx)(h.Z,{}),(0,i.jsx)(J,{}),(0,i.jsx)("br",{}),(0,i.jsx)(H,{}),(0,i.jsx)("br",{}),(0,i.jsx)(q.Z,{}),(0,i.jsx)("br",{}),(0,i.jsx)("br",{})]})}},87285:function(e,t,s){"use strict";s.d(t,{Z:function(){return l}});var i=s(27573);s(7653);var n=s(18929);function l(e){let{header:t,description:s,createDeployment:l,showIconPart:r=!0,showHeadUp:a=!1}=e;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("br",{}),(0,i.jsx)("br",{}),(0,i.jsx)("br",{}),r&&(0,i.jsxs)("div",{className:"text-center",children:[(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",className:"mx-auto h-12 w-12 text-gray-400",children:(0,i.jsx)("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 9v3.75m9-.75a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 3.75h.008v.008H12v-.008Z"})}),(0,i.jsx)("h3",{className:"mt-2 text-sm font-semibold text-gray-900",children:t||"No Deployments Found"}),(0,i.jsx)("p",{className:"mt-1 text-sm text-gray-500",children:s||"Get started by creating a new deployment."})]}),(0,i.jsx)("br",{}),(0,i.jsx)("br",{}),(0,i.jsx)("br",{}),(0,i.jsx)("br",{}),l&&"hide"==l?"":(0,i.jsx)("div",{children:(0,i.jsx)("div",{className:"flex items-center justify-center",children:(0,i.jsx)("div",{className:"bg-white shadow sm:rounded-lg",children:(0,i.jsx)("div",{className:"px-4 py-5 sm:p-6",children:(0,i.jsxs)("div",{className:"sm:flex sm:items-start sm:justify-between",children:[(0,i.jsxs)("div",{children:[(0,i.jsx)("h3",{className:"text-base font-semibold leading-6 text-gray-900",children:"Create Deployment"}),(0,i.jsx)("div",{className:"mt-2 max-w-xl text-sm text-gray-500",children:(0,i.jsx)("p",{children:"You have to create a deployment to use SuperDuper, first you need to deploy instances and then we will manage everything for you."})})]}),(0,i.jsx)("div",{className:"mt-5 sm:ml-6 sm:mt-0 sm:flex sm:flex-shrink-0 sm:items-center",children:(0,i.jsx)("a",{href:"/webui/deployment",children:(0,i.jsxs)("button",{type:"button",className:"inline-flex items-center rounded-md bg-indigo-600 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600",children:["Start Here",(0,i.jsx)("span",{children:" "}),(0,i.jsx)(n.Z,{className:"ml-0.5 -mr.5 h-5 w-5","aria-hidden":"true"})]})})})]})})})})})]})}},87882:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});var i=s(27573),n=s(36531),l=s(86288),r=s(88146);function a(){return(0,i.jsxs)("div",{className:"flex flex-col items-center justify-center min-h-screen bg-background -mt-4",children:[(0,i.jsxs)("div",{className:"text-center space-y-2 mb-8",children:[(0,i.jsx)("h2",{className:"text-3xl font-bold",children:"Welcome to Superduper"}),(0,i.jsx)("p",{className:"text-muted-foreground max-w-md",children:"Explore our reusable templates, applications, and execute queries against your database."})]}),(0,i.jsxs)("header",{className:"flex items-center justify-center gap-4 mb-8",children:[(0,i.jsx)(r.default,{href:"/webui/templates",children:(0,i.jsxs)(n.z,{variant:"outline",size:"sm",className:"flex items-center gap-2",children:[(0,i.jsx)(d,{className:"w-4 h-4"}),"See Templates"]})}),(0,i.jsx)(r.default,{href:"/webui/application",children:(0,i.jsxs)(n.z,{variant:"outline",size:"sm",className:"flex items-center gap-2",children:[(0,i.jsx)(o,{className:"w-4 h-4"}),"See Applications"]})}),(0,i.jsx)(r.default,{href:"/webui/query",children:(0,i.jsxs)(n.z,{variant:"outline",size:"sm",className:"flex items-center gap-2",children:[(0,i.jsx)(c,{className:"w-4 h-4"}),"Execute Query"]})})]}),(0,i.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4 w-full max-w-3xl",children:[(0,i.jsx)(r.default,{href:"/webui/templates",children:(0,i.jsx)(l.Zb,{className:"transition-transform duration-300 hover:scale-105",children:(0,i.jsxs)(l.aY,{className:"flex flex-col items-center justify-center p-8",children:[(0,i.jsx)(d,{className:"w-6 h-6 mb-4 text-primary"}),(0,i.jsx)("h3",{className:"text-base font-bold mb-2",children:"Templates"}),(0,i.jsx)("p",{className:"text-muted-foreground text-center",children:"See our library of reusable templates or add one."})]})})}),(0,i.jsx)(r.default,{href:"/webui/application",children:(0,i.jsx)(l.Zb,{className:"transition-transform duration-300 hover:scale-105",children:(0,i.jsxs)(l.aY,{className:"flex flex-col items-center justify-center p-8",children:[(0,i.jsx)(o,{className:"w-6 h-6 mb-4 text-primary"}),(0,i.jsx)("h3",{className:"text-base font-bold mb-2",children:"Applications"}),(0,i.jsx)("p",{className:"text-muted-foreground text-center",children:"Check out our pre-built applications or add one now."})]})})}),(0,i.jsx)(r.default,{href:"/webui/query",children:(0,i.jsx)(l.Zb,{className:"transition-transform duration-300 hover:scale-105",children:(0,i.jsxs)(l.aY,{className:"flex flex-col items-center justify-center p-8",children:[(0,i.jsx)(c,{className:"w-6 h-6 mb-4 text-primary"}),(0,i.jsx)("h3",{className:"text-base font-bold mb-2",children:"Execute"}),(0,i.jsx)("p",{className:"text-muted-foreground text-center",children:"Execute queries to retrieve data from your database."})]})})})]})]})}function o(e){return(0,i.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,i.jsx)("rect",{width:"7",height:"7",x:"3",y:"3",rx:"1"}),(0,i.jsx)("rect",{width:"7",height:"7",x:"14",y:"3",rx:"1"}),(0,i.jsx)("rect",{width:"7",height:"7",x:"14",y:"14",rx:"1"}),(0,i.jsx)("rect",{width:"7",height:"7",x:"3",y:"14",rx:"1"})]})}function d(e){return(0,i.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,i.jsx)("path",{d:"M19.439 7.85c-.049.322.059.648.289.878l1.568 1.568c.47.47.706 1.087.706 1.704s-.235 1.233-.706 1.704l-1.611 1.611a.98.98 0 0 1-.837.276c-.47-.07-.802-.48-.968-.925a2.501 2.501 0 1 0-3.214 3.214c.446.166.855.497.925.968a.979.979 0 0 1-.276.837l-1.61 1.61a2.404 2.404 0 0 1-1.705.707 2.402 2.402 0 0 1-1.704-.706l-1.568-1.568a1.026 1.026 0 0 0-.877-.29c-.493.074-.84.504-1.02.968a2.5 2.5 0 1 1-3.237-3.237c.464-.18.894-.527.967-1.02a1.026 1.026 0 0 0-.289-.877l-1.568-1.568A2.402 2.402 0 0 1 1.998 12c0-.617.236-1.234.706-1.704L4.23 8.77c.24-.24.581-.353.917-.303.515.077.877.528 1.073 1.01a2.5 2.5 0 1 0 3.259-3.259c-.482-.196-.933-.558-1.01-1.073-.05-.336.062-.676.303-.917l1.525-1.525A2.402 2.402 0 0 1 12 1.998c.617 0 1.234.236 1.704.706l1.568 1.568c.23.23.556.338.877.29.493-.074.84-.504 1.02-.968a2.5 2.5 0 1 1 3.237 3.237c-.464.18-.894.527-.967 1.02Z"})})}function c(e){return(0,i.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,i.jsx)("polyline",{points:"4 17 10 11 4 5"}),(0,i.jsx)("line",{x1:"12",x2:"20",y1:"19",y2:"19"})]})}},42356:function(){},37224:function(e,t,s){"use strict";var i=s(74859);s(42356);var n=s(7653),l=n&&"object"==typeof n&&"default"in n?n:{default:n},r=void 0!==i&&i.env&&!0,a=function(e){return"[object String]"===Object.prototype.toString.call(e)},o=function(){function e(e){var t=void 0===e?{}:e,s=t.name,i=void 0===s?"stylesheet":s,n=t.optimizeForSpeed,l=void 0===n?r:n;d(a(i),"`name` must be a string"),this._name=i,this._deletedRulePlaceholder="#"+i+"-deleted-rule____{}",d("boolean"==typeof l,"`optimizeForSpeed` must be a boolean"),this._optimizeForSpeed=l,this._serverSheet=void 0,this._tags=[],this._injected=!1,this._rulesCount=0;var o="undefined"!=typeof window&&document.querySelector('meta[property="csp-nonce"]');this._nonce=o?o.getAttribute("content"):null}var t=e.prototype;return t.setOptimizeForSpeed=function(e){d("boolean"==typeof e,"`setOptimizeForSpeed` accepts a boolean"),d(0===this._rulesCount,"optimizeForSpeed cannot be when rules have already been inserted"),this.flush(),this._optimizeForSpeed=e,this.inject()},t.isOptimizeForSpeed=function(){return this._optimizeForSpeed},t.inject=function(){var e=this;if(d(!this._injected,"sheet already injected"),this._injected=!0,"undefined"!=typeof window&&this._optimizeForSpeed){this._tags[0]=this.makeStyleTag(this._name),this._optimizeForSpeed="insertRule"in this.getSheet(),this._optimizeForSpeed||(r||console.warn("StyleSheet: optimizeForSpeed mode not supported falling back to standard mode."),this.flush(),this._injected=!0);return}this._serverSheet={cssRules:[],insertRule:function(t,s){return"number"==typeof s?e._serverSheet.cssRules[s]={cssText:t}:e._serverSheet.cssRules.push({cssText:t}),s},deleteRule:function(t){e._serverSheet.cssRules[t]=null}}},t.getSheetForTag=function(e){if(e.sheet)return e.sheet;for(var t=0;t>>0},u={};function h(e,t){if(!t)return"jsx-"+e;var s=String(t),i=e+s;return u[i]||(u[i]="jsx-"+c(e+"-"+s)),u[i]}function m(e,t){"undefined"==typeof window&&(t=t.replace(/\/style/gi,"\\/style"));var s=e+t;return u[s]||(u[s]=t.replace(/__jsx-style-dynamic-selector/g,e)),u[s]}var v=function(){function e(e){var t=void 0===e?{}:e,s=t.styleSheet,i=void 0===s?null:s,n=t.optimizeForSpeed,l=void 0!==n&&n;this._sheet=i||new o({name:"styled-jsx",optimizeForSpeed:l}),this._sheet.inject(),i&&"boolean"==typeof l&&(this._sheet.setOptimizeForSpeed(l),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),this._fromServer=void 0,this._indices={},this._instancesCounts={}}var t=e.prototype;return t.add=function(e){var t=this;void 0===this._optimizeForSpeed&&(this._optimizeForSpeed=Array.isArray(e.children),this._sheet.setOptimizeForSpeed(this._optimizeForSpeed),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),"undefined"==typeof window||this._fromServer||(this._fromServer=this.selectFromServer(),this._instancesCounts=Object.keys(this._fromServer).reduce(function(e,t){return e[t]=0,e},{}));var s=this.getIdAndRules(e),i=s.styleId,n=s.rules;if(i in this._instancesCounts){this._instancesCounts[i]+=1;return}var l=n.map(function(e){return t._sheet.insertRule(e)}).filter(function(e){return -1!==e});this._indices[i]=l,this._instancesCounts[i]=1},t.remove=function(e){var t=this,s=this.getIdAndRules(e).styleId;if(function(e,t){if(!e)throw Error("StyleSheetRegistry: "+t+".")}(s in this._instancesCounts,"styleId: `"+s+"` not found"),this._instancesCounts[s]-=1,this._instancesCounts[s]<1){var i=this._fromServer&&this._fromServer[s];i?(i.parentNode.removeChild(i),delete this._fromServer[s]):(this._indices[s].forEach(function(e){return t._sheet.deleteRule(e)}),delete this._indices[s]),delete this._instancesCounts[s]}},t.update=function(e,t){this.add(t),this.remove(e)},t.flush=function(){this._sheet.flush(),this._sheet.inject(),this._fromServer=void 0,this._indices={},this._instancesCounts={}},t.cssRules=function(){var e=this,t=this._fromServer?Object.keys(this._fromServer).map(function(t){return[t,e._fromServer[t]]}):[],s=this._sheet.cssRules();return t.concat(Object.keys(this._indices).map(function(t){return[t,e._indices[t].map(function(e){return s[e].cssText}).join(e._optimizeForSpeed?"":"\n")]}).filter(function(e){return!!e[1]}))},t.styles=function(e){var t,s;return t=this.cssRules(),void 0===(s=e)&&(s={}),t.map(function(e){var t=e[0],i=e[1];return l.default.createElement("style",{id:"__"+t,key:"__"+t,nonce:s.nonce?s.nonce:void 0,dangerouslySetInnerHTML:{__html:i}})})},t.getIdAndRules=function(e){var t=e.children,s=e.dynamic,i=e.id;if(s){var n=h(i,s);return{styleId:n,rules:Array.isArray(t)?t.map(function(e){return m(n,e)}):[m(n,t)]}}return{styleId:h(i),rules:Array.isArray(t)?t:[t]}},t.selectFromServer=function(){return Array.prototype.slice.call(document.querySelectorAll('[id^="__jsx-"]')).reduce(function(e,t){return e[t.id.slice(2)]=t,e},{})},e}(),p=n.createContext(null);p.displayName="StyleSheetContext";var x=l.default.useInsertionEffect||l.default.useLayoutEffect,f="undefined"!=typeof window?new v:void 0;function g(e){var t=f||n.useContext(p);return t&&("undefined"==typeof window?t.add(e):x(function(){return t.add(e),function(){t.remove(e)}},[e.id,String(e.dynamic)])),null}g.dynamic=function(e){return e.map(function(e){return h(e[0],e[1])}).join(" ")},t.style=g},53146:function(e,t,s){"use strict";e.exports=s(37224).style},18929:function(e,t,s){"use strict";var i=s(7653);let n=i.forwardRef(function(e,t){let{title:s,titleId:n,...l}=e;return i.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":n},l),s?i.createElement("title",{id:n},s):null,i.createElement("path",{d:"M10.75 4.75a.75.75 0 0 0-1.5 0v4.5h-4.5a.75.75 0 0 0 0 1.5h4.5v4.5a.75.75 0 0 0 1.5 0v-4.5h4.5a.75.75 0 0 0 0-1.5h-4.5v-4.5Z"}))});t.Z=n}}]); \ No newline at end of file diff --git a/superduper/rest/out/_next/static/chunks/5435-a59febbb809c2ef7.js b/superduper/rest/out/_next/static/chunks/5435-a59febbb809c2ef7.js deleted file mode 100644 index ea615b524..000000000 --- a/superduper/rest/out/_next/static/chunks/5435-a59febbb809c2ef7.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5435],{53896:function(e,t,r){r.d(t,{Z:function(){return n}});let n=(0,r(84313).Z)("CheckCircle",[["path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",key:"g774vq"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]])},34527:function(e,t,r){r.d(t,{Z:function(){return n}});let n=(0,r(84313).Z)("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]])},82440:function(e,t,r){r.d(t,{Z:function(){return n}});let n=(0,r(84313).Z)("Rocket",[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]])},66465:function(e,t,r){r.d(t,{Z:function(){return n}});let n=(0,r(84313).Z)("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]])},12198:function(e,t,r){r.d(t,{Z:function(){return n}});let n=(0,r(84313).Z)("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])},71584:function(e,t,r){r.d(t,{_:function(){return s},b:function(){return d}});var n=r(7653),a=r(62125),l=r(55281),o=r(11513),i=r(91335),u=r(8840);let c=(0,n.createContext)(null);function d(){let[e,t]=(0,n.useState)([]);return[e.length>0?e.join(" "):void 0,(0,n.useMemo)(()=>function(e){let r=(0,a.z)(e=>(t(t=>[...t,e]),()=>t(t=>{let r=t.slice(),n=r.indexOf(e);return -1!==n&&r.splice(n,1),r}))),l=(0,n.useMemo)(()=>({register:r,slot:e.slot,name:e.name,props:e.props}),[r,e.slot,e.name,e.props]);return n.createElement(c.Provider,{value:l},e.children)},[t])]}let s=Object.assign((0,u.yV)(function(e,t){let r=(0,l.M)(),{id:a="headlessui-label-".concat(r),passive:d=!1,...s}=e,p=function e(){let t=(0,n.useContext)(c);if(null===t){let t=Error("You used a