1import{j as e}from"./vendor-markdown-HF1GOdbd.js";import{b as l}from"./vendor-react-CzzokFOB.js";const r="eaura_pwa_dismissed",m="eaura_pwa_shown_at",S=7*24*60*60*1e3,a=()=>window.matchMedia("(display-mode: standalone)").matches||window.navigator.standalone===!0,b=()=>/iphone|ipad|ipod/i.test(navigator.userAgent),y=()=>b()&&!a(),v=()=>{try{const n=parseInt(localStorage.getItem(m)||"0",10);return n&&Date.now()-n<S}catch{return!1}},u=()=>{try{localStorage.setItem(m,String(Date.now()))}catch{}},f={position:"fixed",bottom:"16px",left:"50%",transform:"translateX(-50%)",zIndex:9999,width:"calc(100% - 32px)",maxWidth:"420px",background:"rgba(15,13,8,0.97)",backdropFilter:"blur(16px)",border:"1px solid rgba(232,184,75,0.2)",borderRadius:"16px",padding:"16px 20px",display:"flex",alignItems:"center",gap:"14px",boxShadow:"0 8px 32px rgba(0,0,0,0.5)"},p={width:"40px",height:"40px",borderRadius:"12px",background:"linear-gradient(135deg,var(--gold),var(--coral))",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"1.2rem",color:"#fff",flexShrink:0},x={background:"none",border:"none",color:"rgba(245,240,226,0.35)",fontSize:"1.1rem",cursor:"pointer",padding:"4px",flexShrink:0,lineHeight:1};function j(){const[n,o]=l.useState(!1),[g,d]=l.useState(null),t=l.useRef(null);l.useEffect(()=>{if(a()||localStorage.getItem(r)||v()||window.innerWidth>768)return;if(y()){const s=setTimeout(()=>{localStorage.getItem(r)||a()||(d("ios"),o(!0),u())},5e3);return()=>clearTimeout(s)}const i=s=>{s.preventDefault(),!localStorage.getItem(r)&&(t.current=s,d("native"),o(!0),u())};return window.addEventListener("beforeinstallprompt",i),()=>window.removeEventListener("beforeinstallprompt",i)},[]);const h=async()=>{if(!t.current)return;t.current.prompt();const{outcome:i}=await t.current.userChoice;t.current=null,o(!1),i==="dismissed"&&localStorage.setItem(r,"1")},c=()=>{o(!1),localStorage.setItem(r,"1")};return n?g==="ios"?e.jsxs("div",{style:f,children:[e.jsx("div",{style:p,children:"â¦"}),e.jsxs("div",{style:{flex:1,minWidth:0},children:[e.jsx("div",{style:{fontSize:"0.88rem",fontWeight:700,color:"var(--text)",marginBottom:"3px"},children:"Install eAura"}),e.jsxs("div",{style:{fontSize:"0.78rem",color:"rgba(245,240,226,0.5)",lineHeight:1.45},children:["Tap ",e.jsx("span",{style:{display:"inline-flex",alignItems:"center",verticalAlign:"middle",margin:"0 2px",padding:"1px 5px",borderRadius:"4px",background:"rgba(232,184,75,0.15)",color:"var(--gold)",fontSize:"0.85rem",fontWeight:700},children:"â¬"})," then ",e.jsx("span",{style:{fontWeight:600,color:"var(--text)"},children:'"Add to Home Screen"'})]})]}),e.jsx("button",{onClick:c,style:x,children:"â"})]}):e.jsxs("div",{style:f,children:[e.jsx("div",{style:p,children:"â¦"}),e.jsxs("div",{style:{flex:1,minWidth:0},children:[e.jsx("div",{style:{fontSize:"0.88rem",fontWeight:700,color:"var(--text)",marginBottom:"2px"},children:"Add eAura to home screen"}),e.jsx("div",{style:{fontSize:"0.78rem",color:"rgba(245,240,226,0.45)"},children:"Quick access, offline shell, full screen"})]}),e.jsx("button",{onClick:h,style:{padding:"8px 16px",borderRadius:"10px",background:"linear-gradient(135deg,var(--gold),var(--coral))",border:"none",color:"#fff",fontSize:"0.82rem",fontWeight:700,cursor:"pointer",flexShrink:0},children:"Install"}),e.jsx("button",{onClick:c,style:x,children:"â"})]}):null}export{j 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.