1import{u as h,r,a as N,j as e,L as k,b as L,c as P,d as T,t as E,e as m,w as d,S as c,H as v,f as A,g as D,Q as R,D as H,h as _,i as $,k as y}from"./index-Bi0N1yOc.js";function x(a){return a==="ios"||a==="android"}function C(a=typeof navigator>"u"?null:navigator){const t=(a==null?void 0:a.userAgent)??"";return t?/android/i.test(t)?"android":/iPhone|iPad|iPod/i.test(t)||/Macintosh/i.test(t)&&((a==null?void 0:a.maxTouchPoints)??0)>1?"ios":/Windows|Macintosh|Linux|CrOS/i.test(t)?"desktop":"unknown":"unknown"}const M=/^[a-z0-9_-]{1,32}$/,O=2e3;function U(a){const t=new URLSearchParams(a),n=t.get("source")??t.get("utm_source");if(!n)return"direct";const s=n.trim().toLowerCase();return M.test(s)?s:"unknown"}function q(){const{language:a,t}=L(),n=h(),s=r.useMemo(()=>U(n),[n]),[o,w]=r.useState(null),u=o!==null&&x(o),[f,g]=r.useState(!1);r.useEffect(()=>{w(C())},[]),r.useEffect(()=>{if(o===null)return;const j=P(n),i={...T(j),platform:o,source:s,language:a};if(!x(o)){E("download-redirect",i);return}let l=!1;const b=window.setTimeout(()=>{l||g(!0)},O),S=o==="ios"?"app-store-redirect":"google-play-redirect";return Promise.all([m("download-redirect",i),m(S,i)]).then(()=>{l||window.location.replace(d(y[o],n,{source:s}))}),()=>{l=!0,window.clearTimeout(b)}},[o,s,a,n]);const p=`${c.domain}${d($,n,{source:s})}`;return e.jsxs("main",{className:"flex min-h-screen flex-col items-center justify-center bg-paper px-4 py-14 text-ink",children:[e.jsxs(v,{children:[e.jsx("title",{children:`${t.download.pageTitle} · ${c.name}`}),e.jsx("meta",{name:"description",content:t.download.pageSubtitle}),e.jsx("meta",{name:"robots",content:"noindex, nofollow"})]}),e.jsxs("div",{className:"w-full max-w-md text-center",children:[e.jsx("img",{src:A,alt:"",width:64,height:64,className:"mx-auto h-16 w-16 rounded-[1.125rem] shadow-soft"}),e.jsx("img",{src:D,alt:c.name,width:135,height:32,className:"mx-auto mt-5 h-8 w-auto"}),e.jsx("h1",{className:"mt-6 text-2xl font-semibold tracking-tight",children:t.download.pageTitle}),e.jsx("p",{className:"mt-2 text-mute",children:t.download.pageSubtitle}),u?e.jsxs("p",{className:"mt-7 inline-flex items-center gap-2.5 text-sm text-mute",role:"status","aria-live":"polite",children:[e.jsx("span",{className:"h-4 w-4 shrink-0 animate-spin rounded-full border-2 border-hairline border-t-ink motion-reduce:animate-none","aria-hidden":!0}),t.download.redirecting]}):e.jsxs("div",{className:"mt-8",children:[e.jsx("div",{className:"mx-auto w-[210px] rounded-3xl border border-hairline bg-[var(--c-qr-bg)] p-4 shadow-soft",children:e.jsx(R,{value:p,label:t.download.qrAlt})}),e.jsx("p",{className:"mx-auto mt-4 max-w-xs text-sm leading-relaxed text-mute",children:t.download.scanHint})]}),e.jsxs("div",{className:"mt-9 border-t border-hairline pt-7",children:[e.jsx("p",{className:"text-sm font-medium text-mute","aria-live":"polite",children:u&&f?t.download.manualHint:t.download.chooseStore}),e.jsx(H,{className:"mt-4",source:s,align:"center"})]}),e.jsx(_,{to:d(`/${a}`,n),className:"mt-9 inline-block text-sm text-mute underline underline-offset-4 transition-colors hover:text-ink",children:t.download.backHome})]})]})}function W(){const a=h(),t=r.useMemo(()=>N(new URLSearchParams(a).get("lang")),[a]);return e.jsx(k,{language:t,children:e.jsx(q,{})})}export{W as Download};
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.