PageSourceSearch

https://ai-watch.dev/assets/Ranking-CoOJXNJ1.js

js ai-watch.dev collected 2026-09-24 14:02:01 UTC 8,988 bytes, 1 lines download raw bytes

1import{u as A,p as S,a as w,m as $,r as M,P as E,j as e,Q as G,E as p,B as g,T as h,t as C,W as R,X as v}from"./index-CyQidAZT.js";const D=["🥇","🥈","🥉"];function N({t:r,setPage:l,rows:x,label:c,note:o}){return e.jsxs("section",{className:"bg-[var(--bg1)] border border-[var(--border)] rounded-lg overflow-hidden",children:[e.jsxs("div",{className:"border-b border-[var(--border)]",style:{padding:"12px 16px"},children:[e.jsxs("div",{className:"mono text-[10px] text-[var(--text1)] uppercase tracking-wider flex items-center gap-1.5",children:[e.jsx("span",{className:"rounded-full shrink-0",style:{width:"5px",height:"5px",background:"var(--teal)"}}),c]}),o&&e.jsx("p",{className:"text-[11px] text-[var(--text2)]",style:{marginTop:"6px"},children:o})]}),e.jsx("div",{className:"hidden md:block overflow-x-auto",children:e.jsxs("table",{className:"w-full mono text-[11px]",style:{borderCollapse:"collapse"},children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[var(--border)] text-[var(--text2)]",children:[e.jsx("th",{style:{padding:"8px 12px",textAlign:"left",fontWeight:500},children:"#"}),e.jsx("th",{style:{padding:"8px 12px",textAlign:"left",fontWeight:500},children:r("ranking.service")}),e.jsx("th",{style:{padding:"8px 12px",textAlign:"right",fontWeight:500},children:r("ranking.score")}),e.jsx("th",{style:{padding:"8px 12px",textAlign:"center",fontWeight:500},children:r("ranking.grade")}),e.jsx("th",{style:{padding:"8px 12px",textAlign:"right",fontWeight:500},children:r("ranking.uptime")}),e.jsx("th",{style:{padding:"8px 12px",textAlign:"right",fontWeight:500},children:r("ranking.responsiveness")}),e.jsx("th",{style:{padding:"8px 12px",textAlign:"right",fontWeight:500},children:r("ranking.affectedDays")}),e.jsx("th",{style:{padding:"8px 12px",textAlign:"right",fontWeight:500},children:r("ranking.mttr")})]})}),e.jsx("tbody",{children:x.map(t=>{var d,i,n,a;return e.jsxs("tr",{className:"border-b border-[var(--border)] hover:bg-[var(--bg3)] cursor-pointer transition-colors",onClick:()=>l({name:"service",serviceId:t.id}),children:[e.jsx("td",{style:{padding:"10px 12px"},className:"text-[var(--text2)]",children:t.isTied?`${t.rank}=`:t.rank}),e.jsx("td",{style:{padding:"10px 12px"},className:"text-[var(--text0)] font-medium",children:t.name}),e.jsx("td",{style:{padding:"10px 12px",textAlign:"right"},className:`font-semibold ${g[t.scoreGrade]??""}`,children:t.aiwatchScore}),e.jsx("td",{style:{padding:"10px 12px",textAlign:"center"},children:e.jsx("span",{className:`inline-block rounded text-[9px] ${h[t.scoreGrade]??"bg-[var(--bg3)]"} text-[var(--bg0)]`,style:{padding:"3px 8px"},children:t.scoreGrade})}),e.jsx("td",{style:{padding:"10px 12px",textAlign:"right"},className:"text-[var(--text1)]",children:t.uptime30d!=null?`${t.uptime30d.toFixed(2)}%`:"—"}),e.jsx("td",{style:{padding:"10px 12px",textAlign:"right"},className:"text-[var(--text1)]",children:((i=(d=t.scoreMetrics)==null?void 0:d.probe)==null?void 0:i.p50)!=null?`${t.scoreMetrics.probe.p50}ms`:"—"}),e.jsx("td",{style:{padding:"10px 12px",textAlign:"right"},className:"text-[var(--text1)]",children:((n=t.scoreMetrics)==null?void 0:n.affectedDays30d)!=null?`${t.scoreMetrics.affectedDays30d}${r("ranking.day")}`:"—"}),e.jsx("td",{style:{padding:"10px 12px",textAlign:"right"},className:"text-[var(--text1)]",children:v((a=t.scoreMetrics)==null?void 0:a.mttrHours)})]},t.id)})})]})}),e.jsx("div",{className:"md:hidden flex flex-col",children:x.map((t,d)=>{var u,j,f,y;const i=((u=t.scoreMetrics)==null?void 0:u.affectedDays30d)??null,n=((f=(j=t.scoreMetrics)==null?void 0:j.probe)==null?void 0:f.p50)??null,a=((y=t.scoreMetrics)==null?void 0:y.mttrHours)??null,s=t.uptime30d!=null,m=i!=null&&i>0,k=n!=null,b=[s?`${t.uptime30d.toFixed(2)}%`:null,k?`${n}ms`:null,m?`${i}${r("ranking.day")}`:null,a!=null?v(a):null].filter(Boolean);return e.jsx("div",{onClick:()=>l({name:"service",serviceId:t.id}),className:`cursor-pointer hover:bg-[var(--bg3)] active:bg-[var(--bg3)] transition-colors${d<x.length-1?" border-b border-[var(--border)]":""}`,style:{padding:"10px 16px"},children:e.jsxs("div",{className:"flex items-baseline flex-wrap gap-x-2 gap-y-0.5",children:[e.jsx("span",{className:"mono text-[11px] text-[var(--text2)] shrink-0 text-right",style:{width:"20px"},children:t.isTied?`${t.rank}=`:t.rank}),e.jsx("span",{className:"text-[12px] text-[var(--text0)] font-medium",children:t.name}),e.jsx("span",{className:`mono text-[13px] font-semibold shrink-0 ${g[t.scoreGrade]??""}`,children:t.aiwatchScore}),e.jsx("span",{className:`mono text-[9px] rounded shrink-0 ${h[t.scoreGrade]??"bg-[var(--bg3)]"} text-[var(--bg0)]`,style:{padding:"2px 6px"},children:t.scoreGrade}),b.length>0&&e.jsx("span",{className:"mono text-[10px] text-[var(--text2)]",children:b.join(" · ")})]})},t.id)})})]})}function H(){const{t:r}=A(),{setPage:l}=S(),{services:x,loading:c,error:o,lastUpdated:t,refresh:d}=w(),{settings:i}=$(),n=(x??[]).filter(s=>
1i.enabledServices.includes(s.id)),a=M.useMemo(()=>E(n),[n]);return c&&n.length===0?e.jsx(G,{}):!c&&n.length===0&&o?e.jsx(p,{type:"offline",onAction:d}):o?e.jsx(p,{type:"error",onAction:()=>window.location.reload()}):n.length===0?e.jsx(p,{type:"neutral"}):e.jsxs("div",{className:"flex flex-col",style:{gap:"20px"},children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("h2",{className:"mono text-[10px] text-[var(--text2)] uppercase flex items-center gap-2",style:{letterSpacing:"0.1em"},children:[e.jsx("span",{className:"text-[var(--green)] font-semibold",children:"//"}),r("ranking.title")]}),e.jsxs("span",{className:"mono text-[10px] text-[var(--text2)]",children:["30",r("settings.period.suffix")," ",r("uptime.basis.suffix")]})]}),a.scoredHigh.length>=3&&e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3",style:{gap:"10px"},children:a.scoredHigh.slice(0,3).map((s,m)=>e.jsxs("button",{onClick:()=>l({name:"service",serviceId:s.id}),className:"bg-[var(--bg1)] border border-[var(--border)] rounded-lg text-left cursor-pointer hover:bg-[var(--bg3)] transition-colors",style:{padding:"16px"},children:[e.jsxs("div",{className:"flex items-center gap-2",style:{marginBottom:"8px"},children:[e.jsx("span",{style:{fontSize:"18px"},children:D[s.rank-1]??`#${s.rank}`}),e.jsx("span",{className:"text-xs text-[var(--text0)] font-medium truncate",children:s.name})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:`mono text-[22px] font-semibold ${g[s.scoreGrade]??"text-[var(--text2)]"}`,children:s.aiwatchScore}),e.jsx("span",{className:`mono text-[10px] rounded ${h[s.scoreGrade]??"bg-[var(--bg3)]"} text-[var(--bg0)]`,style:{padding:"3px 8px"},children:s.scoreGrade})]})]},s.id))}),e.jsx("div",{children:e.jsxs("a",{href:"/methodology#score",onClick:()=>C("click_methodology",{location:"ranking",source:"score_link"}),className:"mono text-[10px] text-[var(--blue)] hover:underline cursor-pointer",children:[r("ranking.aboutScore")," →"]})}),a.scoredHigh.length>0&&e.jsx(N,{t:r,setPage:l,rows:a.scoredHigh,label:r("ranking.table")}),a.scoredMedium.length>0&&e.jsx(N,{t:r,setPage:l,rows:a.scoredMedium,label:r("ranking.mediumTable"),note:r("ranking.mediumReason")}),a.recentlyAdded.length>0&&e.jsxs("section",{className:"bg-[var(--bg1)] border border-[var(--border)] rounded-lg overflow-hidden",children:[e.jsx("div",{className:"border-b border-[var(--border)]",style:{padding:"12px 16px"},children:e.jsx("div",{className:"mono text-[10px] text-[var(--text2)] uppercase tracking-wider",children:r("ranking.na.recent")})}),e.jsxs("div",{style:{padding:"16px"},children:[e.jsx("p",{className:"text-[11px] text-[var(--text2)]",style:{marginBottom:"10px"},children:r("ranking.na.recentReason")}),e.jsx("div",{className:"flex flex-col gap-2",children:a.recentlyAdded.map(s=>e.jsxs("div",{className:"flex items-center gap-2 text-[11px] text-[var(--text2)]",children:[e.jsx("span",{children:"•"}),e.jsx("span",{className:"text-[var(--text1)]",children:s.name}),s.coverageDays!=null&&e.jsxs("span",{className:"text-[var(--text2)]",children:["— ",r("ranking.na.ranksIn").replace("{n}",String(Math.max(1,R-s.coverageDays)))]})]},s.id))})]})]}),a.insufficient.length>0&&e.jsxs("section",{className:"bg-[var(--bg1)] border border-[var(--border)] rounded-lg overflow-hidden",children:[e.jsx("div",{className:"border-b border-[var(--border)]",style:{padding:"12px 16px"},children:e.jsx("div",{className:"mono text-[10px] text-[var(--text2)] uppercase tracking-wider",children:r("ranking.na")})}),e.jsxs("div",{style:{padding:"16px"},children:[e.jsx("p",{className:"text-[11px] text-[var(--text2)]",style:{marginBottom:"10px"},children:r("ranking.naReason")}),e.jsx("div",{className:"flex flex-col gap-2",children:a.insufficient.map(s=>e.jsxs("div",{className:"flex items-center gap-2 text-[11px] text-[var(--text2)]",children:[e.jsx("span",{children:"•"}),e.jsx("span",{className:"text-[var(--text1)]",children:s.name})]},s.id))})]})]})]})}export{H as default};

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.