"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[940],{81021:function(e,t,n){n.d(t,{Z:function(){return s}});/**
 * @license lucide-react v0.407.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let s=(0,n(60998).Z)("PinOff",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89",key:"znwnzq"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11",key:"c9qhm2"}]])},24544:function(e,t,n){n.d(t,{Z:function(){return s}});/**
 * @license lucide-react v0.407.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let s=(0,n(60998).Z)("Pin",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]])},65134:function(e,t,n){n.d(t,{Z:function(){return s}});/**
 * @license lucide-react v0.407.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let s=(0,n(60998).Z)("SquarePen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]])},47603:function(e,t,n){n.d(t,{Z:function(){return s}});/**
 * @license lucide-react v0.407.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let s=(0,n(60998).Z)("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]])},96122:function(e,t,n){n.d(t,{Z:function(){return s}});/**
 * @license lucide-react v0.407.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let s=(0,n(60998).Z)("TriangleAlert",[["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",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]])},1125:function(e,t,n){n.d(t,{C:function(){return i}});var s=n(85893),a=n(67294),r=n(34209),l=n(84283);let c=e=>{if(!e||"string"!=typeof e)return e;let t=e.split("\n"),n=[];for(let e=0;e<t.length;e++){let s=t[e];if(""===s.trim()){let a=!1,r=0;for(let n=e-1;n>=0;n--){let e=t[n],s=e.trim();if(s&&e.match(/:\s*[|>]\s*$/)){a=!0;for(let e=n+1;e<t.length;e++){let n=t[e];if(n.trim()){r=n.search(/\S/);break}}break}if(s&&0===e.search(/\S/))break}if(a)for(let a=e+1;a<t.length;a++){let e=t[a];if(e.trim()){e.search(/\S/)>=r?n.push("  #YAML_BLANK_LINE_MARKER#"):n.push(s);break}}else n.push(s)}else n.push(s)}return n.join("\n")};function i(e){let{children:t,className:n=""}=e,i=(0,a.useRef)(null),o=c(t);(0,a.useEffect)(()=>{if(i.current){let e=i.current;setTimeout(()=>{let t;let n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,null);for(;t=n.nextNode();)t.textContent&&t.textContent.includes("#YAML_BLANK_LINE_MARKER#")&&(t.textContent=t.textContent.replace(/#YAML_BLANK_LINE_MARKER#/g,""))},0)}},[o]);let d={...l.mQ,'code[class*="language-"]':{...l.mQ['code[class*="language-"]'],whiteSpace:"pre !important"},'pre[class*="language-"]':{...l.mQ['pre[class*="language-"]'],whiteSpace:"pre !important"}};return(0,s.jsx)("div",{ref:i,className:n,children:(0,s.jsx)(r.Z,{language:"yaml",style:d,customStyle:{margin:0,padding:0,background:"transparent",fontSize:"0.875rem",fontFamily:'ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", Menlo, monospace'},wrapLines:!0,wrapLongLines:!0,showLineNumbers:!1,useInlineStyles:!0,children:o})})}},50940:function(e,t,n){n.r(t),n.d(t,{RecipeDetail:function(){return R}});var s=n(85893),a=n(67294),r=n(11163),l=n(41664),c=n.n(l),i=n(55739),o=n(1272),d=n(96122),u=n(47603),m=n(60998);/**
 * @license lucide-react v0.407.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let x=(0,m.Z)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);var p=n(24544),h=n(70282);/**
 * @license lucide-react v0.407.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let y=(0,m.Z)("Share",[["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",key:"1b2hhj"}],["polyline",{points:"16 6 12 2 8 6",key:"m901s6"}],["line",{x1:"12",x2:"12",y1:"2",y2:"15",key:"1p0rca"}]]);var f=n(81021),b=n(27325),g=n(65134);n(37673);var j=n(30803),v=n(91360),N=n(42557),w=n(29749);n(69123);var k=n(28970);n(62935);var C=n(1125),_=n(15821),L=n(79586),M=n(56072),S=n(470);function Z(e){let{isOpen:t,onClose:n,template:r,onSave:l}=e,[c,u]=(0,a.useState)(""),[m,x]=(0,a.useState)(""),[p,h]=(0,a.useState)(!1),[y,f]=(0,a.useState)(null);(0,a.useEffect)(()=>{r&&t&&(u(r.description||""),x(r.content||""),f(null))},[r,t]);let b=async e=>{e.preventDefault(),h(!0),f(null);try{o.ZP.load(m)}catch(e){f("Invalid YAML: ".concat(e.message)),h(!1);return}try{await l({description:c||null,content:m}),n()}catch(e){f(e.message)}finally{h(!1)}};return r?(0,s.jsx)(v.Vq,{open:t,onOpenChange:n,children:(0,s.jsxs)(v.cZ,{className:"sm:max-w-2xl max-h-[90vh] overflow-y-auto px-8",children:[(0,s.jsxs)(v.fK,{children:[(0,s.jsxs)(v.$N,{className:"text-xl text-gray-900",children:["Edit Recipe: ",r.name]}),(0,s.jsx)(v.Be,{children:"Update your recipe description and content."})]}),(0,s.jsxs)("form",{onSubmit:b,className:"space-y-4 mt-4",children:[(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(w._,{htmlFor:"description",children:"Description"}),(0,s.jsx)(N.I,{id:"description",value:c,onChange:e=>u(e.target.value),placeholder:"Optional description...",className:"placeholder:text-gray-500"})]}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(w._,{htmlFor:"content",children:"YAML Content *"}),(0,s.jsx)(k.X,{value:m,onChange:e=>{x(e),f(null)},maxHeight:"400px"})]}),y&&(0,s.jsxs)("div",{className:"rounded-md border border-red-200 bg-red-50 p-3 flex items-start gap-2",children:[(0,s.jsx)(d.Z,{className:"w-4 h-4 text-red-600 mt-0.5 flex-shrink-0"}),(0,s.jsx)("p",{className:"text-sm text-red-800",children:y})]}),(0,s.jsxs)(v.cN,{children:[(0,s.jsx)(j.z,{type:"button",variant:"outline",onClick:n,disabled:p,children:"Cancel"}),(0,s.jsx)(j.z,{type:"submit",disabled:p,className:"bg-sky-600 hover:bg-sky-700 text-white",children:p?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(i.Z,{size:16,className:"mr-2"}),"Saving..."]}):"Save Changes"})]})]})]})}):null}function E(e){let{isOpen:t,onClose:n,template:r,onDelete:l}=e,[c,o]=(0,a.useState)(!1),d=async()=>{o(!0);try{await l(),n()}catch(e){(0,_.C)("Delete failed: ".concat(e.message),"error")}finally{o(!1)}};return r?(0,s.jsx)(v.Vq,{open:t,onOpenChange:n,children:(0,s.jsxs)(v.cZ,{className:"sm:max-w-md",children:[(0,s.jsxs)(v.fK,{children:[(0,s.jsx)(v.$N,{className:"text-xl text-red-600",children:"Delete Recipe"}),(0,s.jsxs)(v.Be,{children:['Are you sure you want to delete "',r.name,'"? This action cannot be undone.']})]}),(0,s.jsxs)(v.cN,{className:"mt-4",children:[(0,s.jsx)(j.z,{variant:"outline",onClick:n,disabled:c,children:"Cancel"}),(0,s.jsx)(j.z,{onClick:d,disabled:c,className:"bg-red-600 hover:bg-red-700 text-white",children:c?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(i.Z,{size:16,className:"mr-2"}),"Deleting..."]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(u.Z,{className:"w-4 h-4 mr-2"}),"Delete"]})})]})]})}):null}function R(){let e=(0,r.useRouter)(),{recipe:t}=e.query,[n,l]=(0,a.useState)(null),[o,d]=(0,a.useState)(!0),[m,v]=(0,a.useState)(null),[N,w]=(0,a.useState)(!1),[k,R]=(0,a.useState)(!1),[O,A]=(0,a.useState)(!1),[z,U]=(0,a.useState)(!1),[T,D]=(0,a.useState)(!1),F=(0,a.useCallback)(async()=>{if(!e.isReady||!t)return;let n=t||null;if(!n){v("Invalid template URL"),d(!1);return}d(!0),v(null);try{let e=await (0,L.G3)(n);e?l(e):v("Recipe not found")}catch(e){v(e.message||"Failed to load recipe")}finally{d(!1)}},[e.isReady,t]);(0,a.useEffect)(()=>{F()},[F]);let V=async e=>{let t=await (0,L.DI)(n.name,e);if(t)l(t),(0,_.C)("Recipe updated successfully!","success");else throw Error("Failed to update recipe")},I=async()=>{if(await (0,L.eI)(n.name))(0,_.C)("Recipe deleted successfully!","success"),e.push("/recipes");else throw Error("Failed to delete recipe")},B=async()=>{try{let e=await (0,L.Uu)(n.name,!n.pinned);e&&(l(e),(0,_.C)(e.pinned?"Recipe pinned!":"Recipe unpinned!","success"))}catch(e){(0,_.C)("Recipe pin operation failed: ".concat(e.message),"error")}},q=async(e,t,n)=>{try{if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(e);else{let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.left="-999999px",t.style.top="-999999px",document.body.appendChild(t),t.focus(),t.select(),document.execCommand("copy"),t.remove()}n(!0),(0,_.C)(t,"success"),setTimeout(()=>n(!1),2e3)}catch(e){(0,_.C)("Failed to copy to clipboard","error")}};if(o)return(0,s.jsxs)("div",{className:"flex justify-center items-center h-64",children:[(0,s.jsx)(i.Z,{size:20,className:"mr-2"}),(0,s.jsx)("span",{className:"text-gray-500",children:"Loading..."})]});if(m)return(0,s.jsxs)("div",{className:"flex flex-col items-center justify-center h-64",children:[(0,s.jsx)("div",{className:"text-red-500 mb-4",children:m}),(0,s.jsx)(c(),{href:"/recipes",children:(0,s.jsxs)(j.z,{variant:"outline",children:[(0,s.jsx)(x,{className:"w-4 h-4 mr-2"}),"Back to Hub"]})})]});if(!n)return null;let P=(0,M.NL)(n.recipe_type),H=P.icon;return(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("div",{className:"flex items-center gap-4",children:[(0,s.jsxs)(c(),{href:"/recipes",className:"text-sky-blue hover:text-sky-blue-bright flex items-center",children:[(0,s.jsx)(x,{className:"h-4 w-4 mr-1.5"}),(0,s.jsx)("span",{children:"Back"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)(H,{className:"w-5 h-5 ".concat("sky"===P.color?"text-sky-600":"purple"===P.color?"text-purple-600":"green"===P.color?"text-green-600":"orange"===P.color?"text-orange-600":"text-gray-600")}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("h1",{className:"text-base text-sky-blue leading-none",children:n.name}),n.pinned&&(0,s.jsx)(p.Z,{className:"w-4 h-4 text-amber-500"})]}),(0,s.jsx)("div",{className:"flex items-center gap-2 text-sm text-gray-500",children:(0,s.jsx)("span",{children:P.fullLabel})})]})]})]}),(0,s.jsxs)("div",{className:"flex items-center gap-4",children:[(0,s.jsxs)("button",{onClick:()=>{q(window.location.href,"Link copied to clipboard!",w)},className:"text-sky-blue hover:text-sky-blue-bright flex items-center",children:[N?(0,s.jsx)(h.Z,{className:"h-4 w-4 mr-1.5 text-green-600"}):(0,s.jsx)(y,{className:"h-4 w-4 mr-1.5"}),(0,s.jsx)("span",{children:N?"Copied!":"Share"})]}),(0,s.jsx)("button",{onClick:!1!==n.is_pinnable?B:void 0,className:"flex items-center ".concat(!1===n.is_pinnable?"text-gray-400 cursor-not-allowed":"text-sky-blue hover:text-sky-blue-bright"),title:!1===n.is_pinnable?"Default recipes cannot be pinned/unpinned":"",disabled:!1===n.is_pinnable,children:n.pinned?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(f.Z,{className:"h-4 w-4 mr-1.5"}),(0,s.jsx)("span",{children:"Unpin"})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(p.Z,{className:"h-4 w-4 mr-1.5"}),(0,s.jsx)("span",{children:"Pin"})]})}),(0,s.jsxs)("button",{onClick:()=>{let t={name:"".concat(n.name,"-copied"),description:n.description,content:n.content,recipe_type:n.recipe_type};e.push({pathname:"/recipes",query:{copy:JSON.stringify(t)}})},className:"text-sky-blue hover:text-sky-blue-bright flex items-center",children:[(0,s.jsx)(b.Z,{className:"h-4 w-4 mr-1.5"}),(0,s.jsx)("span",{children:"Copy to New"})]}),(0,s.jsxs)("button",{onClick:!1!==n.is_editable?()=>U(!0):void 0,className:"flex items-center ".concat(!1===n.is_editable?"text-gray-400 cursor-not-allowed":"text-sky-blue hover:text-sky-blue-bright"),title:!1===n.is_editable?"Default recipes cannot be edited":"",disabled:!1===n.is_editable,children:[(0,s.jsx)(g.Z,{className:"h-4 w-4 mr-1.5"}),(0,s.jsx)("span",{children:"Edit"})]}),(0,s.jsxs)("button",{onClick:!1!==n.is_editable?()=>D(!0):void 0,className:"flex items-center ".concat(!1===n.is_editable?"text-gray-400 cursor-not-allowed":"text-red-600 hover:text-red-700"),title:!1===n.is_editable?"Default recipes cannot be deleted":"",disabled:!1===n.is_editable,children:[(0,s.jsx)(u.Z,{className:"h-4 w-4 mr-1.5"}),(0,s.jsx)("span",{children:"Delete"})]})]})]}),(0,s.jsxs)("div",{className:"rounded-lg border bg-card text-card-foreground shadow-sm",children:[(0,s.jsx)("div",{className:"flex items-center justify-between px-4 pt-4",children:(0,s.jsx)("h3",{className:"text-lg font-semibold",children:"Details"})}),(0,s.jsxs)("div",{className:"p-4",children:[(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-6 mb-6",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Name"}),(0,s.jsx)("div",{className:"text-base mt-1",children:n.name})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Type"}),(0,s.jsx)("div",{className:"text-base mt-1",children:P.fullLabel})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Authored by"}),(0,s.jsx)("div",{className:"text-base mt-1",children:n.user_name||n.user_id||"Unknown"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Updated"}),(0,s.jsxs)("div",{className:"text-base mt-1",children:[(0,s.jsx)(S.Zg,{date:n.updated_at?new Date(1e3*n.updated_at):null})," ","by ",n.updated_by_name||n.user_name||"Unknown"]})]})]}),n.description&&(0,s.jsxs)("div",{className:"mb-6",children:[(0,s.jsx)("div",{className:"text-gray-600 font-medium text-base mb-1",children:"Description"}),(0,s.jsx)("p",{className:"text-base text-gray-700",children:n.description})]}),(0,s.jsxs)("div",{className:"mb-6",children:[(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Launch Command"}),(0,s.jsx)("button",{onClick:()=>{n&&q((0,M.UU)(n.recipe_type,n.name),"Command copied to clipboard!",R)},className:"flex items-center text-gray-500 hover:text-gray-700 transition-colors duration-200 p-1 ml-2",title:k?"Copied!":"Copy command",children:k?(0,s.jsx)(h.Z,{className:"w-4 h-4 text-green-600"}):(0,s.jsx)(b.Z,{className:"w-4 h-4"})})]}),(0,s.jsx)("div",{className:"bg-gray-50 border border-gray-200 rounded-md p-3 mt-2",children:(0,s.jsx)("code",{className:"text-sm text-gray-800 font-mono break-all",children:(0,M.UU)(n.recipe_type,n.name)})})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"YAML Content"}),(0,s.jsx)("button",{onClick:()=>{n&&q(n.content,"YAML copied to clipboard!",A)},className:"flex items-center text-gray-500 hover:text-gray-700 transition-colors duration-200 p-1 ml-2",title:O?"Copied!":"Copy YAML",children:O?(0,s.jsx)(h.Z,{className:"w-4 h-4 text-green-600"}):(0,s.jsx)(b.Z,{className:"w-4 h-4"})})]}),(0,s.jsx)("div",{className:"bg-gray-50 border border-gray-200 rounded-md p-3 max-h-96 overflow-y-auto mt-2",children:(0,s.jsx)(C.C,{className:"whitespace-pre-wrap",children:n.content})})]})]})]}),(0,s.jsx)(Z,{isOpen:z,onClose:()=>U(!1),template:n,onSave:V}),(0,s.jsx)(E,{isOpen:T,onClose:()=>D(!1),template:n,onDelete:I})]})}},79586:function(e,t,n){n.d(t,{DI:function(){return c},G3:function(){return r},Uu:function(){return o},eI:function(){return i},iM:function(){return a},kW:function(){return l}});var s=n(47145);async function a(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{let t={pinned_only:e.pinnedOnly||!1,my_recipes_only:e.myRecipesOnly||!1,recipe_type:e.recipeType||null};return await s.x.fetch("/recipes/list",t,"POST")||[]}catch(e){throw console.error("Error fetching YAML templates:",e),e}}async function r(e){try{return await s.x.fetch("/recipes/get",{recipe_name:e})}catch(e){throw console.error("Error fetching Recipe:",e),e}}async function l(e){try{return await s.x.fetch("/recipes/create",{name:e.name,content:e.content,recipe_type:e.recipeType,description:e.description||null,owner_name:e.ownerName||null})}catch(e){throw console.error("Error creating Recipe:",e),e}}async function c(e,t){try{return await s.x.fetch("/recipes/update",{recipe_name:e,description:t.description,content:t.content})}catch(e){throw console.error("Error updating Recipe:",e),e}}async function i(e){try{return await s.x.fetch("/recipes/delete",{recipe_name:e})}catch(e){throw console.error("Error deleting Recipe:",e),e}}async function o(e,t){try{return await s.x.fetch("/recipes/pin",{recipe_name:e,pinned:t})}catch(e){throw console.error("Error toggling Recipe pin status:",e),e}}},15821:function(e,t,n){n.d(t,{C:function(){return s}});function s(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"info",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5e3,s=document.getElementById("toast-container");s||((s=document.createElement("div")).id="toast-container",s.className="fixed top-0 right-0 p-4 z-[9999] flex flex-col items-end space-y-2",document.body.appendChild(s));let a=document.createElement("div");switch(a.className="rounded-md border-l-4 p-4 shadow-md flex items-center justify-between max-w-md w-full mb-2 pointer-events-auto",t){case"success":a.className+=" bg-green-100 border-green-500 text-green-800";break;case"error":a.className+=" bg-red-100 border-red-500 text-red-800";break;case"warning":a.className+=" bg-yellow-100 border-yellow-500 text-yellow-800";break;default:a.className+=" bg-blue-100 border-blue-500 text-blue-800"}return a.innerHTML='\n      <div class="flex-1 mr-2">\n        <p class="text-sm font-medium">'.concat(e,'</p>\n      </div>\n      <button class="text-gray-500 hover:text-gray-700 focus:outline-none" aria-label="Close toast">\n        <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n          <line x1="18" y1="6" x2="6" y2="18"></line>\n          <line x1="6" y1="6" x2="18" y2="18"></line>\n        </svg>\n      </button>\n    '),s.appendChild(a),a.querySelector("button").addEventListener("click",()=>{s.removeChild(a)}),setTimeout(()=>{s.contains(a)&&s.removeChild(a)},n),a}},56072:function(e,t,n){n.d(t,{Ft:function(){return o},nT:function(){return i},UU:function(){return m},NL:function(){return u}});var s=n(60998);/**
 * @license lucide-react v0.407.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let a=(0,s.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"}]]),r=(0,s.Z)("Briefcase",[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]]),l=(0,s.Z)("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]),c=(0,s.Z)("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]),i=Object.freeze({CLUSTER:"cluster",JOB:"job",POOL:"pool",VOLUME:"volume"}),o=Object.freeze(Object.values(i)),d={sky:"text-sky-600",purple:"text-purple-600",green:"text-green-600",orange:"text-orange-600",gray:"text-gray-600"};function u(e){let t;switch(e){case i.CLUSTER:t={icon:a,color:"sky",label:"Cluster",fullLabel:"Cluster"};break;case i.JOB:t={icon:r,color:"purple",label:"Job",fullLabel:"Managed Job"};break;case i.VOLUME:t={icon:l,color:"green",label:"Volume",fullLabel:"Volume"};break;case i.POOL:t={icon:c,color:"orange",label:"Pool",fullLabel:"Job Pool"};break;default:throw Error("Invalid recipe type: ".concat(e))}return t.colorClass=d[t.color]||"text-gray-600",t}function m(e,t){switch(e){case i.CLUSTER:return"sky launch recipes:".concat(t);case i.JOB:return"sky jobs launch recipes:".concat(t);case i.VOLUME:return"sky volumes apply recipes:".concat(t);case i.POOL:return"sky jobs pool apply recipes:".concat(t);default:throw Error("Invalid recipe type: ".concat(e))}}}}]);