1/*! LICENSE: 602.8ce8207afa.js.LICENSE.txt */ 2"use strict";(self.rspackChunknewapi_web=self.rspackChunknewapi_web||[]).push([[602],{6273(e,s,t){var n=t(79015),a=t(60033),r=t(89077),i=t(71304),l=t(73178),d=t(36543),c=t(47801);function o(e){let{t:s}=(0,r.Bd)(),t=e.icon??a.A;return(0,n.jsx)(i._A,{children:(0,n.jsxs)(d.Sv,{className:(0,c.cn)("min-h-[300px]",e.className),children:[(0,n.jsxs)(d.FT,{children:[(0,n.jsx)(d.Kr,{variant:"icon",children:(0,n.jsx)(t,{className:"text-destructive size-6"})}),(0,n.jsx)(d.cz,{children:e.title??s("Oops! Something went wrong")}),null!=e.description&&(0,n.jsx)(d.Ou,{children:e.description})]}),(0,n.jsxs)(d.HY,{children:[null!=e.onRetry&&(0,n.jsx)(l.$,{variant:"outline",size:"sm",onClick:e.onRetry,children:s("Retry")}),e.action]})]})})}t.d(s,{W:()=>o})},39825(e,s,t){t.r(s),t.d(s,{component:()=>Y});var n=t(79015),a=t(89077),r=t(51571),i=t(83357),l=t(2276),d=t(43866),c=t(71588),o=t(60033),m=t(70326),x=t(30935),u=t(223),h=t(79736),p=t(65311),g=t(26028),j=t(73406),f=t(6273),N=t(73178),y=t(7803),b=t(93539),v=t(55664),k=t(52909),w=t(30046),A=t(77577),_=t(47801),D=t(63228);async function E(){return(await D.FH.get("/api/system-info/instances")).data}async function z(){return(await D.FH.delete("/api/system-info/stale-instances")).data}async function I(e){return(await D.FH.delete(`/api/system-info/instances/${encodeURIComponent(e)}`)).data}let F=["system-instance-skeleton-1","system-instance-skeleton-2","system-instance-skeleton-3"],M={online:"bg-emerald-50 text-emerald-700 dark:bg-emerald-500/15 dark:text-emerald-300",stale:"bg-amber-50 text-amber-700 dark:bg-amber-500/15 dark:text-amber-300"},B={online:"bg-emerald-500",stale:"bg-amber-500"};function R(e){return e.info?.node?.name||e.node_name}function C(e){if("number"!=typeof e||Number.isNaN(e))return"-";if(0===e)return"0 B";if(e<0)return`-${C(-e)}`;let s=["B","KB","MB","GB","TB"],t=Math.min(Math.floor(Math.log(e)/Math.log(1024)),s.length-1);return`${new Intl.NumberFormat(void 0,{maximumFractionDigits:+(0!==t)}).format(e/1024**t)} ${s[t]}`}function S(e){var s;let t=e.size??22,a=(t-2.5)/2,r=2*Math.PI*a,i=null===e.percent?r:r-e.percent/100*r;return(0,n.jsxs)("svg",{width:t,height:t,viewBox:`0 0 ${t} ${t}`,className:"shrink-0 -rotate-90","aria-hidden":"true",children:[(0,n.jsx)("circle",{cx:t/2,cy:t/2,r:a,fill:"none",strokeWidth:2.5,stroke:"currentColor",className:"text-muted"}),(0,n.jsx)("circle",{cx:t/2,cy:t/2,r:a,fill:"none",strokeWidth:2.5,strokeLinecap:"round",stroke:"currentColor",strokeDasharray:r,strokeDashoffset:i,className:(0,_.cn)("transition-[stroke-dashoffset] duration-500",null===(s=e.percent)?"text-muted-foreground/40":s>=90?"text-red-500":s>=70?"text-amber-500":"text-emerald-500")})]})}function T(e){var s;let t="number"!=typeof e.value||Number.isNaN(e.value)?null:Math.max(0,Math.min(100,e.value)),a=(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)(S,{percent:t}),(0,n.jsx)("span",{className:"font-mono text-[11px] tabular-nums",children:"number"!=typeof(s=e.value)||Number.isNaN(s)?"-":`${new Intl.NumberFormat(void 0,{maximumFractionDigits:1}).format(s)}%`})]});return e.tooltip?(0,n.jsx)(k.Bc,{delay:100,children:(0,n.jsxs)(k.m_,{children:[(0,n.jsx)(k.k$,{className:"block w-full rounded-sm text-left focus-visible:ring-2 focus-visible:outline-none",children:a}),(0,n.jsx)(k.ZI,{className:"max-w-80",children:e.tooltip})]})}):a}function $(e){let{t:s,i18n:t}=(0,a.Bd)();return(0,n.jsx)("div",{className:"overflow-x-auto rounded-md border",children:(0,n.jsxs)(v.XI,{className:"min-w-[1230px]",children:[(0,n.jsx)(v.A0,{children:(0,n.jsxs)(v.Hj,{className:"bg-muted/40 hover:bg-muted/40",children:[(0,n.jsx)(v.nd,{className:"h-9 min-w-[240px] px-4 text-xs",children:s("Instances")}),(0,n.jsx)(v.nd,{className:"h-9 w-[110px] text-xs",children:s("Status")}),(0,n.jsx)(v.nd,{className:"h-9 w-[100px] text-xs",children:s("Role")}),(0,n.jsx)(v.nd,{className:"h-9 w-[96px] text-xs",children:s("CPU")}),(0,n.jsx)(v.nd,{className:"h-9 w-[96px] text-xs",children:s("Memory")}),(0,n.jsx)(v.nd,{className:"h-9 w-[96px] text-xs",children:s("Storage")}),(0,n.jsx)(v.nd,{className:"h-9 w-[100px] text-xs",children:s("Version")}),(0,n.jsx)(v.nd,{className:"h-9 w-[140px] text-xs",children:s("Runtime")}),(0,n.jsx)(v.nd,{className:"h-9 w-[170px] text-xs",children:s("Started")}),(0,n.jsx)(v.nd,{className:"h-9 w-[170px] text-xs",children:s("Last Seen")}),(0,n.jsx)(v.nd,{className:"h-9 w-[90px] pr-4 text-right text-xs",children:s("Actions")})]})}),(0,n.jsx)(v.BF,{children:e.instances.map(a=>{let r=a.info?.node?.should_configure_manually===!0,l=a.info?.resources,d=l?.storage,c=e.isDeletingInstance&&e.deletingNodeName===a.node_name;return(0,n.jsxs)(v.Hj,{className:"hover:bg-muted/30",children:[(0,n.jsx)(v.nA,{className:"px-4 py-2.5 align-middle",children:(0,n.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,n.jsx)("span",{className:(0,_.cn)("size-2 shrink-0 rounded-full",B[a.status]),"aria-hidden":"true"}),(0,n.jsxs)("div",{className:"min-w-0",children:[(0,n.jsxs)("div",{className:"flex min-w-0 items-center gap-1.5",children:[(0,n.jsx)("span",{className:"truncate text-sm font-medium",children:R(a)}),r&&(0,n.jsxs)(y.AM,{children:[(0,n.jsx)(y.Wv,{className:"inline-flex shrink-0 rounded-full focus-visible:ring-2 focus-visible:outline-none","aria-label":s("Configure NODE_NAME"),children:(0,n.jsx)(i.E,{variant:"outline",className:"border-amber-200 bg-amber-50 text-amber-700 dark:border-amber-500/30 dark:bg-amber-500/15 dark:text-amber-300",children:(0,n.jsx)(o.A,{className:"size-3","aria-hidden":"true"})})}),(0,n.jsxs)(y.hl,{align:"start",className:"w-80",children:[(0,n.jsxs)(y.DI,{children:[(0,n.jsx)(y.eO,{children:s("Configure NODE_NAME")}),(0,n.jsx)(y.ui,{children:s("This instance is using an automatic hostname. Set NODE_NAME to a stable unique value for multi-instance management.")})]}),(0,n.jsxs)("div",{className:"space-y-2 text-xs",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"mb-1 font-medium",children:s("Example")}),(0,n.jsx)("code",{className:"bg-muted block rounded-md px-2 py-1.5 font-mono text-[11px] break-all",children:"NODE_NAME=new-api-master-1"})]}),(0,n.jsx)("p",{className:"text-muted-foreground",children:s("Use a different stable value for each instance, then restart the service.")})]})]})]})]}),(0,n.jsx)("div",{className:"text-muted-foreground truncate font-mono text-[11px]",children:a.info?.host?.hostname||"-"})]})]})}),(0,n.jsx)(v.nA,{className:"py-2.5 align-middle",children:(0,n.jsxs)(i.E,{variant:"secondary",className:(0,_.cn)("gap-1.5",M[a.status]),children:[(0,n.jsx)("span",{className:(0,_.cn)("size-1.5 rounded-full",B[a.status]),"aria-hidden":"true"}),s(a.status)]})}),(0,n.jsx)(v.nA,{className:"py-2.5 align-middle",children:(0,n.jsx)(k.Bc,{delay:100,children:(0,n.jsxs)(k.m_,{children:[(0,n.jsx)(k.k$,{className:"inline-flex shrink-0 rounded-full focus-visible:ring-2 focus-visible:outline-none","aria-label":s("Node role"),children:(0,n.jsx)(i.E,{variant:"outline",children:a.info?.role?.is_master?"master":"worker"})}),(0,n.jsx)(k.ZI,{children:s(a.info?.role?.is_master?"Master instances run scheduled background tasks.":"Worker instances do not run master-only background tasks.")})]})})}),(0,n.jsx)(v.nA,{className:"py-2.5 align-middle",children:(0,n.jsx)(T,{value:l?.cpu?.usage_percent})}),(0,n.jsx)(v.nA,{className:"py-2.5 align-middle",children:(0,n.jsx)(T,{value:l?.memory?.usage_percent})}),(0,n.jsx)(v.nA,{className:"py-2.5 align-middle",children:(0,n.jsx)(T,{value:d?.used_percent,tooltip:d?(0,n.jsx)("div",{className:"space-y-1 text-xs",children:(0,n.jsxs)("div",{className:"grid grid-cols-[auto_1fr] gap-x-3 gap-y-1",children:[(0,n.jsx)("span",{className:"text-muted-foreground",children:s("Used")}),(0,n.jsx)("span",{className:"font-mono",children:C(d.used_bytes)}),(0,n.jsx)("span",{className:"text-muted-foreground",children:s("Free")}),(0,n.jsx)("span",{className:"font-mono",children:C(d.free_bytes)}),(0,n.jsx)("span",{className:"text-muted-foreground",children:s("Total")}),(0,n.jsx)("span",{className:"font-mono",children:C(d.total_bytes)})]})}):void 0})}),(0,n.jsx)(v.nA,{className:"py-2.5 align-middle",children:(0,n.jsx)("div",{className:"truncate font-mono text-xs",children:a.info?.runtime?.version||"-"})}),(0,n.jsx)(v.nA,{className:"py-2.5 align-middle",children:(0,n.jsx)("div",{className:"truncate font-mono text-xs",children:function(e){let s=e.info?.runtime;if(!s?.goos&&!s?.goarch)return"-";let t=[];
2return(s.goos||s.goarch)&&t.push([s.goos,s.goarch].filter(Boolean).join("/")),t.join(" · ")}(a)})}),(0,n.jsx)(v.nA,{className:"text-muted-foreground py-2.5 align-middle text-xs whitespace-nowrap",children:(0,A.fk)(a.started_at)}),(0,n.jsx)(v.nA,{className:"text-muted-foreground py-2.5 align-middle text-xs whitespace-nowrap",title:(0,A.fk)(a.last_seen_at),children:(0,A.K3)(a.last_seen_at,"seconds",(0,w.Tl)(t.language))}),(0,n.jsx)(v.nA,{className:"py-2.5 pr-4 text-right align-middle",children:"stale"===a.status?(0,n.jsx)(k.Bc,{delay:100,children:(0,n.jsxs)(k.m_,{children:[(0,n.jsx)(k.k$,{render:(0,n.jsx)(N.$,{type:"button",variant:"destructive",size:"icon-xs",onClick:()=>e.onDeleteStaleInstance(a),disabled:e.isDeletingInstance||c,"aria-label":s("Delete stale instance"),children:c?(0,n.jsx)(m.A,{className:"size-3 animate-spin","aria-hidden":"true"}):(0,n.jsx)(x.A,{className:"size-3","aria-hidden":"true"})})}),(0,n.jsx)(k.ZI,{children:s("Delete stale instance")})]})}):(0,n.jsx)("span",{className:"text-muted-foreground text-xs",children:"-"})})]},a.node_name)})})]})})}function P(){let e,{t:s}=(0,a.Bd)(),t=(0,l.jE)(),[r,i]=(0,p.useState)(null),[o,y]=(0,p.useState)(!1),[v,k]=(0,p.useState)(null),w=(0,d.I)({queryKey:["system-info","instances"],queryFn:async()=>{let e=await E();if(!e.success||!Array.isArray(e.data))throw Error(e.message||s("We could not load instances."));return e.data},staleTime:3e4,retry:!1,refetchInterval:3e4}),A=w.data??[],D=A.filter(e=>"stale"===e.status),M=D.length>0,B=w.isLoading,C=w.isFetching&&!w.isLoading,S=async()=>{await t.invalidateQueries({queryKey:["system-info","instances"]})},T=(0,c.n)({mutationFn:async e=>{let t=await I(e);if(!t.success)throw Error(t.message||s("Delete failed"));return t},onMutate:e=>{k(e)},onSuccess:async()=>{g.oR.success(s("Deleted stale instance")),await S(),i(null)},onError:e=>{g.oR.error(e instanceof Error?e.message:s("Delete failed")),S()},onSettled:()=>{k(null)}}),P=(0,c.n)({mutationFn:async()=>{let e=await z();if(!e.success)throw Error(e.message||s("Delete failed"));return e},onSuccess:async e=>{g.oR.success(s("Deleted {{count}} stale instances",{count:e.data?.deleted_count??0})),await S(),y(!1)},onError:e=>{g.oR.error(e instanceof Error?e.message:s("Delete failed"))}}),W=null!==v||T.isPending;return e=B?(0,n.jsx)("div",{className:"space-y-2 p-4 sm:p-5",children:F.map(e=>(0,n.jsx)(b.E,{className:"h-9 w-full rounded-md"},e))}):w.isError?(0,n.jsx)(f.W,{title:s("We could not load instances."),description:w.error instanceof Error?w.error.message:void 0,onRetry:()=>{w.refetch()},className:"min-h-[220px]"}):0===A.length?(0,n.jsxs)("div",{className:"px-4 py-10 text-center sm:px-5",children:[(0,n.jsx)("div",{className:"bg-muted mx-auto mb-3 flex size-10 items-center justify-center rounded-lg",children:(0,n.jsx)(u.A,{className:"text-muted-foreground size-5","aria-hidden":"true"})}),(0,n.jsx)("p",{className:"text-muted-foreground text-sm",children:s("No instances have reported yet.")})]}):(0,n.jsx)("div",{className:"p-4 sm:p-5",children:(0,n.jsx)($,{instances:A,deletingNodeName:v,isDeletingInstance:W||P.isPending,onDeleteStaleInstance:i})}),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("section",{className:"bg-card overflow-hidden rounded-lg border shadow-xs",children:[(0,n.jsxs)("div",{className:"flex flex-col gap-3 border-b px-4 py-3 sm:flex-row sm:items-center sm:justify-between sm:px-5",children:[(0,n.jsx)("div",{className:"min-w-0",children:(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)("span",{className:"bg-muted text-muted-foreground inline-flex size-7 items-center justify-center rounded-md",children:(0,n.jsx)(u.A,{className:"size-4","aria-hidden":"true"})}),(0,n.jsxs)("div",{className:"min-w-0",children:[(0,n.jsx)("h3",{className:"text-sm font-semibold",children:s("Instances")}),(0,n.jsx)("p",{className:"text-muted-foreground mt-0.5 text-xs",children:s("Nodes reporting from this deployment and their latest heartbeat.")})]})]})}),(0,n.jsxs)("div",{className:"flex shrink-0 flex-wrap items-center gap-2 sm:justify-end",children:[(0,n.jsx)("span",{className:"text-muted-foreground text-xs","aria-live":"polite",children:s("Auto-refreshing every {{seconds}}s",{seconds:30})}),M?(0,n.jsxs)(N.$,{type:"button",variant:"destructive",size:"sm",onClick:()=>y(!0),disabled:W||P.isPending,children:[P.isPending?(0,n.jsx)(m.A,{"data-icon":"inl
2ine-start",className:"size-3.5 animate-spin","aria-hidden":"true"}):(0,n.jsx)(x.A,{"data-icon":"inline-start",className:"size-3.5","aria-hidden":"true"}),s("Delete all stale")]}):null,(0,n.jsxs)(N.$,{type:"button",variant:"outline",size:"sm",onClick:()=>void w.refetch(),disabled:w.isFetching,"aria-label":s("Refresh"),children:[(0,n.jsx)(h.A,{"data-icon":"inline-start",className:(0,_.cn)("size-3.5",C&&"animate-spin"),"aria-hidden":"true"}),C?s("Refreshing..."):s("Refresh")]})]})]}),(0,n.jsx)("div",{"aria-busy":w.isFetching,children:e})]}),(0,n.jsx)(j.T,{open:o,onOpenChange:y,title:s("Delete stale instances"),desc:s("Delete {{count}} stale instance records? Online instances will not be deleted.",{count:D.length}),destructive:!0,isLoading:P.isPending,confirmText:P.isPending?s("Deleting..."):s("Delete"),handleConfirm:()=>P.mutate()}),(0,n.jsx)(j.T,{open:null!==r,onOpenChange:e=>{e||i(null)},title:s("Delete stale instance"),desc:r?s('Delete stale instance "{{name}}"? If it has reported again, it will not be deleted.',{name:R(r)}):"",destructive:!0,isLoading:T.isPending,confirmText:T.isPending?s("Deleting..."):s("Delete"),handleConfirm:()=>{r&&T.mutate(r.node_name)}})]})}var W=t(58026),L=t(18875),O=t(76612);let H={pending:"secondary",running:"secondary",succeeded:"secondary",failed:"destructive"},q={pending:"bg-amber-50 text-amber-700 dark:bg-amber-500/15 dark:text-amber-300",running:"bg-sky-50 text-sky-700 dark:bg-sky-500/15 dark:text-sky-300 [&_span]:bg-sky-500",succeeded:"bg-emerald-50 text-emerald-700 dark:bg-emerald-500/15 dark:text-emerald-300",failed:""},K={pending:"bg-amber-500",running:"bg-sky-500",succeeded:"bg-emerald-500",failed:"bg-destructive"},U={pending:"[&_[data-slot=progress-indicator]]:bg-amber-500",running:"[&_[data-slot=progress-indicator]]:bg-sky-500",succeeded:"[&_[data-slot=progress-indicator]]:bg-emerald-500",failed:"[&_[data-slot=progress-indicator]]:bg-destructive"},Z={log_cleanup:"Log cleanup",channel_test:"Batch channel test",model_update:"Batch upstream model update",midjourney_poll:"Drawing task polling",async_task_poll:"Async task polling"},X={midjourney_poll:"drawing_task_poll"};function G(e){return"pending"===e||"running"===e}function Q(e){let{t:s,i18n:t}=(0,a.Bd)();return(0,n.jsx)("div",{className:"overflow-x-auto rounded-md border",children:(0,n.jsxs)(v.XI,{className:"min-w-[900px]",children:[(0,n.jsx)(v.A0,{children:(0,n.jsxs)(v.Hj,{className:"bg-muted/40 hover:bg-muted/40",children:[(0,n.jsx)(v.nd,{className:"h-9 w-[260px] px-4 text-xs",children:s("Type")}),(0,n.jsx)(v.nd,{className:"h-9 w-[130px] text-xs",children:s("Status")}),(0,n.jsx)(v.nd,{className:"h-9 w-[180px] text-xs",children:s("Progress")}),(0,n.jsx)(v.nd,{className:"h-9 min-w-[260px] text-xs",children:s("Executor")}),(0,n.jsx)(v.nd,{className:"h-9 w-[190px] text-xs",children:s("Updated")}),(0,n.jsx)(v.nd,{className:"h-9 w-[220px] pr-4 text-xs",children:s("Detail")})]})}),(0,n.jsx)(v.BF,{children:e.tasks.map(e=>{let a,r="number"!=typeof(a=e.state?.progress)||Number.isNaN(a)?null:Math.min(100,Math.max(0,a));return(0,n.jsxs)(v.Hj,{className:"hover:bg-muted/30",children:[(0,n.jsx)(v.nA,{className:"px-4 py-3 align-middle",children:(0,n.jsxs)("div",{className:"space-y-0.5",children:[(0,n.jsx)("div",{className:"font-medium",children:s(Z[e.type]??e.type)}),(0,n.jsx)("div",{className:"text-muted-foreground font-mono text-[11px]",children:X[e.type]??e.type})]})}),(0,n.jsx)(v.nA,{className:"py-3 align-middle",children:(0,n.jsxs)(i.E,{variant:H[e.status],className:(0,_.cn)("gap-1.5",q[e.status]),children:[(0,n.jsx)("span",{className:(0,_.cn)("size-1.5 rounded-full",K[e.status]),"aria-hidden":"true"}),s(e.status)]})}),(0,n.jsx)(v.nA,{className:"py-3 align-middle",children:(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)(L.ke,{value:r??0,className:(0,_.cn)("w-24",U[e.status])}),(0,n.jsx)("span",{className:"text-muted-foreground w-10 text-right text-xs tabular-nums",children:null===r?"-":`${r}%`})]})}),(0,n.jsx)(v.nA,{className:"text-muted-foreground max-w-[280px] truncate py-3 align-middle font-mono text-xs",children:e.locked_by||"-"}),(0,n.jsx)(v.nA,{className:"text-muted-foreground py-3 align-middle text-xs whitespace-nowrap",title:(0,A.fk)(e.updated_at),children:(0,A.K3)(e.updated_at,"
2seconds",(0,w.Tl)(t.language))}),(0,n.jsx)(v.nA,{className:"text-destructive max-w-[220px] truncate py-3 pr-4 align-middle text-xs",title:e.error||void 0,children:e.error||"-"})]},e.task_id)})})]})})}function V(){let{t:e}=(0,a.Bd)(),s=(0,d.I)({queryKey:["system-info","system-tasks"],queryFn:async()=>{let s=await (0,O.IM)(20);if(!s.success||!Array.isArray(s.data))throw Error(s.message||e("We could not load system tasks."));return s.data},staleTime:3e4,retry:!1,refetchInterval:e=>!!e.state.data?.some(e=>G(e.status))&&8e3}),t=s.data??[],r=s.isLoading,l=s.isFetching&&!s.isLoading,c=t.some(e=>G(e.status)),o=t.filter(e=>G(e.status)),m=t.filter(e=>!G(e.status));return(0,n.jsxs)("section",{className:"bg-card overflow-hidden rounded-lg border shadow-xs",children:[(0,n.jsxs)("div",{className:"flex flex-col gap-3 border-b px-4 py-3 sm:flex-row sm:items-center sm:justify-between sm:px-5",children:[(0,n.jsx)("div",{className:"min-w-0",children:(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)("span",{className:"bg-muted text-muted-foreground inline-flex size-7 items-center justify-center rounded-md",children:(0,n.jsx)(W.A,{className:"size-4","aria-hidden":"true"})}),(0,n.jsxs)("div",{className:"min-w-0",children:[(0,n.jsx)("h3",{className:"text-sm font-semibold",children:e("System Tasks")}),(0,n.jsx)("p",{className:"text-muted-foreground mt-0.5 text-xs",children:e("Recent maintenance tasks running across instances and their execution status.")})]})]})}),(0,n.jsxs)("div",{className:"flex shrink-0 items-center gap-3",children:[(0,n.jsxs)("span",{className:"text-muted-foreground inline-flex items-center gap-1.5 text-xs","aria-live":"polite",children:[(0,n.jsx)("span",{className:(0,_.cn)("size-1.5 rounded-full",c?"bg-emerald-500":"bg-muted-foreground/40"),"aria-hidden":"true"}),c?e("Auto-refreshing every {{seconds}}s",{seconds:8}):e("Live refresh pauses when no task is running")]}),(0,n.jsxs)(N.$,{type:"button",variant:"outline",size:"sm",onClick:()=>void s.refetch(),disabled:s.isFetching,"aria-label":e("Refresh"),children:[(0,n.jsx)(h.A,{"data-icon":"inline-start",className:(0,_.cn)("size-3.5",l&&"animate-spin"),"aria-hidden":"true"}),l?e("Refreshing..."):e("Refresh")]})]})]}),(0,n.jsx)("div",{"aria-busy":s.isFetching,children:r?(0,n.jsx)("div",{className:"space-y-2 p-4 sm:p-5",children:Array.from({length:4}).map((e,s)=>(0,n.jsx)(b.E,{className:"h-9 w-full rounded-md"},s))}):s.isError?(0,n.jsx)(f.W,{title:e("We could not load system tasks."),description:s.error instanceof Error?s.error.message:void 0,onRetry:()=>{s.refetch()},className:"min-h-[260px]"}):0===t.length?(0,n.jsxs)("div",{className:"px-4 py-10 text-center sm:px-5",children:[(0,n.jsx)("div",{className:"bg-muted mx-auto mb-3 flex size-10 items-center justify-center rounded-lg",children:(0,n.jsx)(W.A,{className:"text-muted-foreground size-5","aria-hidden":"true"})}),(0,n.jsx)("p",{className:"text-muted-foreground text-sm",children:e("No system tasks yet.")})]}):(0,n.jsxs)("div",{className:"space-y-4 p-4 sm:p-5",children:[(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:"mb-2 flex items-center justify-between gap-3",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("h4",{className:"text-sm font-medium",children:e("Active Tasks")}),(0,n.jsx)("p",{className:"text-muted-foreground mt-0.5 text-xs",children:e("Tasks currently pending or running.")})]}),(0,n.jsx)(i.E,{variant:"outline",children:o.length})]}),o.length>0?(0,n.jsx)(Q,{tasks:o}):(0,n.jsx)("div",{className:"text-muted-foreground rounded-md border border-dashed px-4 py-6 text-center text-sm",children:e("No active system tasks.")})]}),(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:"mb-2 flex items-center justify-between gap-3",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("h4",{className:"text-sm font-medium",children:e("Task History")}),(0,n.jsx)("p",{className:"text-muted-foreground mt-0.5 text-xs",children:e("Recently completed or failed system task runs.")})]}),(0,n.jsx)(i.E,{variant:"outline",children:m.length})]}),m.length>0?(0,n.jsx)(Q,{tasks:m}):(0,n.jsx)("div",{className:"text-muted-foreground rounded-md border border-dashed px-4 py-6 text-center text-sm",children:e("No historical system tasks.")})]})]})})]})}let Y=function(){let{t:e}=(0,a.Bd)();return(0,n.jsxs)(r.Ni,{children:[(0,n.jsx)(r.Ni.Title,{children:(0,n.jsxs)("span",{className:"inline-flex min-w-0 items-center gap-2",children:[(0,n.jsx)("span",{className:"truncate",children:e("System Info")}),(0,n.jsx)(i.E,{variant:"outline",className:"shrink-0",children:"Root"})]})}),(0,n.jsx)(r.Ni.Content,{children:(0,n.jsxs)("div",{className:"space-y-4",children:[(0,n.jsx)(P,{}),(0,n.jsx)(V,{})]})})]})}},58026(e,s,t){let n=(0,t(40946).A)("list-checks",[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]]);t.d(s,{},{A:n})}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.