module.exports=[48299,a=>{"use strict";var b=a.i(73356),c=a.i(44770),d=a.i(1244);function e(){let[a,e]=(0,c.useState)(null),[f,g]=(0,c.useState)(null),[h,i]=(0,c.useState)(!0);return(0,c.useEffect)(()=>{let a=localStorage.getItem("theme");"dark"===a||!a&&window.matchMedia("(prefers-color-scheme: dark)").matches?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark")},[]),(0,c.useEffect)(()=>{"geolocation"in navigator&&navigator.geolocation.getCurrentPosition(a=>{let b=a.coords.latitude,c=a.coords.longitude;e({lat:b,lng:c}),fetch(`https://api.aladhan.com/v1/qibla/${b}/${c}`).then(a=>a.json()).then(a=>{g(a.data.direction),i(!1)})},()=>{i(!1)})},[]),(0,b.jsxs)("main",{className:"min-h-screen bg-background p-6 flex flex-col items-center justify-center text-center transition-colors duration-500 font-sans",children:[(0,b.jsxs)(d.default,{href:"/",className:"mb-10 flex items-center gap-2 text-slate-400 hover:text-primary transition-colors font-black text-xs uppercase tracking-widest",children:[(0,b.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:(0,b.jsx)("path",{d:"m15 18-6-6 6-6"})}),"Kembali"]}),(0,b.jsxs)("div",{className:"bg-card p-10 rounded-[4rem] border border-primary/10 w-full max-w-sm shadow-2xl shadow-primary/5 transition-all",children:[(0,b.jsx)("h1",{className:"text-3xl font-black text-foreground tracking-tighter mb-2",children:"Arah Kiblat"}),(0,b.jsx)("p",{className:"text-xs font-bold text-slate-400 uppercase tracking-widest mb-10",children:"GPS Precision Mode"}),h?(0,b.jsxs)("div",{className:"flex flex-col items-center gap-4 py-10",children:[(0,b.jsx)("div",{className:"w-12 h-12 border-4 border-primary/20 border-t-primary rounded-full animate-spin"}),(0,b.jsx)("p",{className:"text-[10px] font-black text-primary uppercase tracking-[0.3em]",children:"Mencari Ka'bah..."})]}):f?(0,b.jsxs)("div",{className:"relative flex flex-col items-center",children:[(0,b.jsxs)("div",{className:"relative w-56 h-56 rounded-full border-[1px] border-primary/20 flex items-center justify-center mb-10 bg-gradient-to-b from-primary/[0.02] to-transparent",children:[(0,b.jsx)("span",{className:"absolute top-4 text-[10px] font-black text-slate-300 dark:text-slate-700",children:"N"}),(0,b.jsx)("span",{className:"absolute bottom-4 text-[10px] font-black text-slate-300 dark:text-slate-700",children:"S"}),(0,b.jsx)("div",{className:"relative z-10 transition-transform duration-[2000ms] cubic-bezier(0.4, 0, 0.2, 1)",style:{transform:`rotate(${f}deg)`},children:(0,b.jsxs)("svg",{width:"80",height:"80",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,b.jsx)("path",{d:"M12 2L15 12H9L12 2Z",fill:"currentColor",className:"text-primary"}),(0,b.jsx)("path",{d:"M12 22L9 12H15L12 22Z",fill:"currentColor",className:"text-slate-200 dark:text-slate-800"})]})}),(0,b.jsx)("div",{className:"absolute inset-4 rounded-full border border-primary/5"})]}),(0,b.jsxs)("div",{className:"bg-background px-8 py-4 rounded-[2rem] shadow-xl border border-primary/10",children:[(0,b.jsx)("p",{className:"text-[10px] font-black text-primary uppercase tracking-widest mb-1",children:"Qibla Direction"}),(0,b.jsxs)("p",{className:"text-4xl font-black text-foreground",children:[Math.round(f),"°"]})]})]}):(0,b.jsxs)("div",{className:"py-10",children:[(0,b.jsx)("div",{className:"w-16 h-16 bg-red-50 dark:bg-red-950/20 text-red-500 rounded-3xl flex items-center justify-center mx-auto mb-4",children:(0,b.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,b.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,b.jsx)("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),(0,b.jsx)("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})]})}),(0,b.jsx)("p",{className:"text-sm font-bold text-red-500 leading-relaxed px-4",children:"Akses lokasi ditolak. Aktifkan GPS di browser kamu ya bang."})]})]}),(0,b.jsxs)("div",{className:"mt-12 flex items-center gap-3 bg-primary/5 px-6 py-3 rounded-full border border-primary/10 max-w-xs",children:[(0,b.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-primary shrink-0",children:[(0,b.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,b.jsx)("path",{d:"M12 16v-4"}),(0,b.jsx)("path",{d:"M12 8h.01"})]}),(0,b.jsx)("p",{className:"text-[10px] text-slate-500 dark:text-slate-400 font-bold uppercase tracking-tight text-left leading-tight",children:"Hadapkan bagian atas HP kamu ke arah panah berwarna hijau."})]})]})}a.s(["default",()=>e])}];

//# sourceMappingURL=my-quran-app_app_kiblat_page_tsx_ba472255._.js.map