1import{g as S,j as e,a5 as C,a7 as L,n as k,aa as D,D as O}from"./index-DUCsaRCi.js";import{r as i}from"./react-vendor-C7biPTGg.js";import{DiscordIcon as T}from"./LandingPage-Bu9JV1GS.js";import"./ouVendsTu-DD_BpHEO.js";import"./PlanBadge-BBDhunXq.js";import"./PricingPage-RT6dl7kB.js";import"./AppPageHeader-BRTHclYi.js";const H=6e4,R=1500,I=5e3,E={fr:{title:"Ãtat des services",subtitle:"Vérifié en direct, à chaque chargement de cette page.",back:"â¹ Retour",allOk:"Tout fonctionne normalement",slow:"Service ralenti",degraded:"Panne partielle en cours",down:"Service injoignable",checking:"Vérificationâ¦",throttled:"Trop de vérifications",throttledHint:"Tu as vérifié trop souvent : le serveur a mis la sonde en pause quelques instants. Ce n'est pas une panne â patiente une minute.",web:"Application web",webOkHint:"Cette page vient de se charger : le site répond.",api:"API Klork",apiHint:"Sauvegarde, publication, tableau de bord.",db:"Base de données",dbHint:"Tes annonces, tes ventes, tes réglages.",ok:"Opérationnel",slowLabel:"Ralenti",downLabel:"Injoignable",latency:"Temps de réponse",lastCheck:"Dernière vérification",recheck:"Vérifier maintenant",caveatTitle:"Si cette page ne se charge pas du tout",caveat:"Elle est hébergée sur le même serveur que Klork : une panne totale l'emporte avec le reste. Dans ce cas, les nouvelles s
1ont publiées sur Discord, qui est hébergé ailleurs â c'est le bon réflexe à avoir.",discordJoin:"Voir les annonces sur Discord",extNote:"à savoir : la publication passe par l'extension Chrome, dans ton propre navigateur. Si une marketplace change son formulaire, la publication peut échouer sans que rien n'apparaisse en panne ici â signale-le sur Discord.",never:"jamais"},en:{title:"Service status",subtitle:"Checked live, every time this page loads.",back:"â¹ Back",allOk:"All systems operational",slow:"Degraded performance",degraded:"Partial outage in progress",down:"Service unreachable",checking:"Checkingâ¦",throttled:"Too many checks",throttledHint:"You checked too often: the server paused the probe for a moment. This is not an outage â give it a minute.",web:"Web app",webOkHint:"This page just loaded: the site is responding.",api:"Klork API",apiHint:"Backup, publishing, dashboard.",db:"Database",dbHint:"Your listings, your sales, your settings.",ok:"Operational",slowLabel:"Slow",downLabel:"Unreachable",latency:"Response time",lastCheck:"Last checked",recheck:"Check now",caveatTitle:"If this page doesn't load at all",caveat:"It's hosted on the same server as Klork: a full outage takes it down too. When that happens, updates are posted on Discord, which is hosted elsewhere â that's the reflex to have.",discordJoin:"See updates on Discord",extNote:"Worth knowing: publishing runs through the Chrome extension, in your own browser. If a marketplace changes its form, publishing can fail without anything showing as down here â report it on Discord.",never:"never"}};function f({state:n}){const t=n==="ok"?"var(--accent-teal-text)":n==="down"?"var(--danger)":n==="checking"?"var(--ink-faint)":"var(--warn)";return e.jsx("span",{className:"inline-block h-2.5 w-2.5 shrink-0 rounded-full",style:{backgroundColor:t},"aria-hidden":"true"})}function c({label:n,hint:t,state:a,stateLabel:r}){return e.jsxs("div",{className:"flex items-start justify-between gap-4 border-b border-[var(--line)] px-4 py-3 last:border-b-0",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"text-sm font-medium text-[var(--ink)]",children:n}),e.jsx("div",{className:"mt-0.5 text-xs text-[var(--ink-muted)]",children:t})]}),e.jsxs("div",{className:"flex shrink-0 items-center gap-2 pt-0.5",children:[e.jsx(f,{state:a}),e.jsx("span",{className:"text-xs font-medium text-[var(--ink-soft)]",children:r})]})]})}function M(){const{lang:n}=S(),t=E[n],[a,r]=i.useState("checking"),[d,h]=i.useState(null),[u,w]=i.useState(null),m=i.useRef(0),o=i.useCallback(async(s=!1)=>{const l=Date.now()-m.current;if(s&&l<I)return;m.current=Date.now(),r("checking");const y=performance.now();try{const g=await fetch("/health",{cache:"no-store"}),v=Math.round(performance.now()-y);h(v),g.ok?r(v>R?"slow":"ok"):g.status===429?r("throttled"):r("degraded")}catch{h(null),r("down")}w(new Date)},[]);i.useEffect(()=>{o();const s=()=>{document.hidden||o()},l=setInterval(s,H);return document.addEventListener("visibilitychange",s),()=>{clearInterval(l),document.removeEventListener("visibilitychange",s)}},[o]);const j=a==="ok"?t.allOk:a==="slow"?t.slow:a==="degraded"?t.degraded:a==="down"?t.down:a==="throttled"?t.throttled:t.checking,x=a==="down"?"down":a==="slow"?"slow":"ok",p=a==="down"||a==="degraded"?"down":a==="throttled"?"checking":"ok",b=s=>s==="ok"?t.ok:s==="slow"?t.slowLabel:s==="down"?t.downLabel:t.checking,N=a==="ok"?"border-[rgba(20,184,166,0.35)] bg-[linear-gradient(160deg,rgba(20,184,166,0.10),rgba(20,184,166,0.02))]":a==="down"||a==="degraded"?"border-[var(--danger-line)] bg-[var(--danger-bg)]":"border-[var(--warn-line)] bg-[var(--warn-bg)]";return e.jsxs("div",{className:"relative min-h-screen overflow-x-clip bg-[var(--bg)] text-[var(--ink-soft)]",children:[e.jsx(C,{}),e.jsx("header",{className:"sticky top-0 z-20 border-b border-[var(--line)] bg-[var(--scrim)] backdrop-blur",children:e.jsxs("div",{className:"mx-auto flex max-w-2xl items-center justify-between px-4 py-3",children:[e.jsx("button",{type:"button",onClick:()=>k("/"),className:"flex items-center gap-2 text-lg font-semibold tracking-tight text-[var(--ink)]",children:e.jsx(L,{})}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(D,{}),e.jsx("button",{type:"button",onClick:()=>k("/"),className:"text-sm text-[var(--ink-muted)] hover:text-[#14b8a6]",children:t.back})]})]})}),e.jsxs("main",{className:"relative z-10 mx-auto max-w-2xl px-4 py-8",children:[e.jsx("h1",{className:"font-display text-2xl text-[var(--ink)] sm:text-3xl",children:t.title}),e.jsx("p",{className:"mt-1 text-sm text-[var(--ink-muted)]",children:t.subtitle}),e.jsxs("div",{className:`mt-6 rounded-xl border bg-[var(--surface)] p-5 ${N}`,children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(f,{state:a}),e.jsx("span",{className:"text-base font-semibold text-[var(--ink)]",children:j})]}),a==="throttled"&&e.jsx("p",{className:"mt-2 text-sm leading-relaxed text-[var(--ink-muted)]",children:t.throttledHint})]}),e.jsxs("div",{className:"mt-4 k-elev rounded-xl bg-[var(--surface)]",children:[e.jsx(c,{label:t.web,hint:t.webOkHint,state:"ok",stateLabel:t.ok}),e.jsx(c,{label:t.api,hint:t.apiHint,state:x,stateLabel:b(x)}
1),e.jsx(c,{label:t.db,hint:t.dbHint,state:p,stateLabel:b(p)})]}),e.jsxs("div",{className:"mt-3 flex flex-wrap items-center justify-between gap-3 text-xs text-[var(--ink-faint)]",children:[e.jsxs("span",{children:[t.latency," : ",d===null?"â":`${d} ms`," · ",t.lastCheck," :"," ",u?u.toLocaleTimeString(n==="fr"?"fr-FR":"en-GB"):t.never]}),e.jsx("button",{type:"button",onClick:()=>void o(!0),disabled:a==="checking",className:"rounded-lg border border-[var(--line-strong)] px-3 py-2.5 font-medium text-[var(--accent-teal-text)] hover:bg-[var(--surface-2)] disabled:opacity-50 sm:py-1.5",children:t.recheck})]}),e.jsxs("div",{className:"mt-8 k-elev rounded-xl bg-[var(--surface)] p-5",children:[e.jsx("h2",{className:"text-sm font-semibold text-[var(--ink)]",children:t.caveatTitle}),e.jsx("p",{className:"mt-1 text-sm leading-relaxed text-[var(--ink-muted)]",children:t.caveat}),e.jsxs("a",{href:O,target:"_blank",rel:"noopener noreferrer",className:"mt-4 inline-flex items-center gap-2 rounded-lg bg-[#14b8a6] px-4 py-2 text-sm font-semibold text-[#06201d] hover:bg-[#1ac9b5]",children:[e.jsx(T,{className:"h-4 w-4"}),t.discordJoin]})]}),e.jsx("p",{className:"mt-4 pb-2 text-xs leading-relaxed text-[var(--ink-faint)]",children:t.extNote})]})]})}export{M 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.