1import{u,r as c,j as e,g as N,L as i,F as d}from"./index-z4o3ADVS.js";import{c as h}from"./catalog-CnW4D3Tq.js";import{F as g}from"./ArrowRightIcon-w54nDIOe.js";const p="magtudin-website",b="homepage-visits",f="https://api.counterapi.dev/v1",m=`hit-counter:${p}:${b}`;function w(s,t){return new Intl.NumberFormat(N(t)==="en"?"en":"hu-HU").format(s)}async function _(s,t){const a=await fetch(`${f}/${p}/${b}${s?"/up":"/"}`,{signal:t});if(!a.ok)throw new Error(`Counter request failed: ${a.status}`);const n=await a.json();if(!n||typeof n!="object"||!("count"in n)||typeof n.count!="number")throw new Error("Counter response did not include a count");return n.count}function v(){const{t:s,i18n:t}=u(),[o,a]=c.useState(null),[n,j]=c.useState(!1);return c.useEffect(()=>{const r=new AbortController,l=sessionStorage.getItem(m)==="1";return l||sessionStorage.setItem(m,"1"),_(!l,r.signal).then(x=>{a(x)}).catch(()=>{r.signal.aborted||(l||sessionStorage.removeItem(m),j(!0))}),()=>r.abort()},[]),e.jsxs("div",{className:"home-stat home-stat--counter",children:[e.jsx("strong",{"aria-live":"polite",children:n?"â":o===null?"â¦":w(o,t.resolvedLanguage??"hu")}),e.jsx("span",{children:s("home.stats.visits")})]})}function y(){const{t:s}=u(),t=[{to:"/members",number:String(h.members),label:s("home.stats.members"),description:s("home.collections.members")},{to:"/books",number:String(h.books),label:s("home.stats.books"),description:s("home.collections.books")},{to:"/articles",number:String(h.articles),label:s("home.stats.articles"),description:s("home.collections.articles")}];return e.jsxs("div",{className:"home-page",children:[e.jsxs("section",{className:"home-hero page-shell page-shell--wide",children:[e.jsxs("div",{className:"home-hero__copy",children:[e.jsx("p",{className:"editorial-eyebrow",children:s("home.eyebrow")}),e.jsx("h1",{children:s("home.title")}),e.jsx("p",{className:"home-hero__subtitle",children:s("home.subtitle")}),e.jsx("p",{className:"home-hero__deck",children:s("home.description")}),e.jsxs("div",{className:"home-hero__actions",children:[e.jsxs(i,{to:"/books",className:"btn-primary",children:[s("home.viewBooks"),e.jsx(g,{"aria-hidden":"true"})]}),e.jsx(i,{to:"/about",className:"btn-secondary",children:s("nav.about")})]})]}),e.jsx("div",{className:"home-hero__mark","aria-hidden":"true",children:e.jsx("span",{className:"turul-mark"})})]}),e.jsx("section",{className:"home-stat-band","aria-label":s("home.stats.label"),children:e.jsxs("div",{className:"page-shell page-shell--wide home-stat-band__inner",children:[t.map(o=>e.jsxs(i,{to:o.to,className:"home-stat",children:[e.jsx("strong",{children:o.number}),e.jsx("span",{children:o.label}),e.jsx(d,{"aria-hidden":"true"})]},o.to)),e.jsx(v,{})]})}),e.jsxs("section",{className:"home-collections page-shell page-shell--wide",children:[e.jsxs("header",{className:"home-section-heading",children:[e.jsxs("div",{children:[e.jsx("p",{className:"editorial-eyebrow",children:s("home.collections.eyebrow")}),e.jsx("h2",{children:s("home.collections.title")})]}),e.jsx("p",{children:s("home.collections.description")})]}),e.jsx("div",{className:"home-collection-list",children:t.map(o=>e.jsxs(i,{to:o.to,className:"home-collection-row",children:[e.jsx("h3",{children:o.label}),e.jsx("p",{children:o.description}),e.jsx(d,{"aria-hidden":"true"})]},o.to))})]}),e.jsxs("section",{className:"home-mission page-shell page-shell--wide",children:[e.jsx("div",{className:"home-mission__label",children:e.jsx("p",{className:"editorial-eyebrow",children:s("home.mission.label")})}),e.jsxs("blockquote",{children:[e.jsxs("p",{children:["â",s("home.mission.quote"),"â"]}),e.jsxs("footer",{children:["â ",s("home.mission.attribution")]})]})]})]})}export{y as Home};
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.