(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9414],{45:(e,t,r)=>{"use strict";r.d(t,{default:()=>l});var n=r(12115),o={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"},a=r(64250);let i=(0,n.createContext)({}),l=(0,n.forwardRef)((e,t)=>{var r,l,s;let{color:c,size:d,strokeWidth:u,absoluteStrokeWidth:h,className:p="",children:m,iconNode:g,...f}=e,{size:v=24,strokeWidth:j=2,absoluteStrokeWidth:x=!1,color:w="currentColor",className:k=""}=null!=(r=(0,n.useContext)(i))?r:{},b=(null!=h?h:x)?24*Number(null!=u?u:j)/Number(null!=d?d:v):null!=u?u:j;return(0,n.createElement)("svg",{ref:t,...o,width:null!=(l=null!=d?d:v)?l:o.width,height:null!=(s=null!=d?d:v)?s:o.height,stroke:null!=c?c:w,strokeWidth:b,className:(0,a.z)("lucide",k,p),...!m&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0;return!1})(f)&&{"aria-hidden":"true"},...f},[...g.map(e=>{let[t,r]=e;return(0,n.createElement)(t,r)}),...Array.isArray(m)?m:[m]])})},10677:(e,t,r)=>{"use strict";r.d(t,{default:()=>a});var n=r(95155),o=r(12115);function a(){let[e,t]=(0,o.useState)([]),[r,a]=(0,o.useState)("");return(0,o.useEffect)(()=>{a(localStorage.getItem("madarx.activeProjectId")||""),fetch("/api/projects").then(e=>e.json()).then(e=>t(e.projects||[])).catch(()=>{})},[]),(0,n.jsx)("div",{className:"project-switcher","data-project-switcher":!0,children:(0,n.jsxs)("select",{value:r,onChange:e=>{var t;a(t=e.target.value),t?localStorage.setItem("madarx.activeProjectId",t):localStorage.removeItem("madarx.activeProjectId"),window.dispatchEvent(new CustomEvent("madarx:project-change",{detail:{project_id:t||null}}))},"aria-label":"Active project",children:[(0,n.jsx)("option",{value:"",children:"All projects"}),e.map(e=>(0,n.jsx)("option",{value:e.id,children:e.name},e.id))]})})}},55464:(e,t,r)=>{"use strict";r.d(t,{EnginePingButton:()=>a});var n=r(95155),o=r(12115);function a(e){let{engineId:t,model:r}=e,[a,i]=(0,o.useState)(null);async function l(){i("loading");try{let e=await fetch("/api/runs/engine-ping",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({engine:t,model:r||""})}),n=await e.json();i(n)}catch(e){i({ok:!1,error:e.message})}}return(0,n.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:8},children:[(0,n.jsx)("button",{onClick:l,disabled:"loading"===a,style:{fontSize:11,padding:"2px 10px",borderRadius:6,border:"1px solid rgba(17,19,24,.14)",background:"rgba(17,19,24,.05)",cursor:"loading"===a?"wait":"pointer",fontFamily:"ui-monospace,monospace",color:"#374151"},children:"loading"===a?"pinging…":"ping"}),a&&"loading"!==a&&(0,n.jsx)("small",{style:{fontFamily:"ui-monospace,monospace",fontSize:11,color:a.ok?"#16a34a":"#dc2626"},children:a.ok?"ok \xb7 ".concat(a.ms,'ms \xb7 "').concat(a.output,'"'):"fail \xb7 ".concat(a.error)})]})}},64250:(e,t,r)=>{"use strict";r.d(t,{z:()=>n});let n=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.filter((e,t,r)=>!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim()}},67341:(e,t,r)=>{Promise.resolve().then(r.bind(r,10677)),Promise.resolve().then(r.bind(r,55464)),Promise.resolve().then(r.bind(r,45))}},e=>{e.O(0,[8441,1255,7358],()=>e(e.s=67341)),_N_E=e.O()}]);