PageSourceSearch

https://astrometry.in/assets/VedicDashboard-BXHOyv3f.js

js astrometry.in collected 2026-10-09 22:03:06 UTC 9,790 bytes, 1 lines download raw bytes

1import{d as g,e as p,r as b,j as e,L as C}from"./index-Cj1LBViU.js";import{u as m}from"./index-CwaY08VE.js";import{c as z}from"./tools.functions-BUxTioQ1.js";import{C as I}from"./calendar-DV6zNs-j.js";import{S as T}from"./star-DS3RAitr.js";import{S as K}from"./sun-DCYcwqaT.js";import{M as D}from"./map-pin-R4UPalhf.js";import{E as L}from"./external-link-DkBXpJst.js";const E=g({method:"GET"}).handler(p("e2fb9f99db091ad32c37c4b77aa541aa0bbc9d5d8363f8970df7dd071786afaf")),M=g({method:"GET"}).handler(p("ff75d04e4a16e90cef45053e89e28c9fdb951ae5f578eb49cdf97c3004bf02cb")),x=[{id:"delhi",label:"New Delhi, India",coords:"28.6139,77.2090",tz:"Asia/Kolkata"},{id:"mumbai",label:"Mumbai, India",coords:"19.0760,72.8777",tz:"Asia/Kolkata"},{id:"bengaluru",label:"Bengaluru, India",coords:"12.9716,77.5946",tz:"Asia/Kolkata"},{id:"chennai",label:"Chennai, India",coords:"13.0827,80.2707",tz:"Asia/Kolkata"},{id:"kolkata",label:"Kolkata, India",coords:"22.5726,88.3639",tz:"Asia/Kolkata"},{id:"hyderabad",label:"Hyderabad, India",coords:"17.3850,78.4867",tz:"Asia/Kolkata"},{id:"pune",label:"Pune, India",coords:"18.5204,73.8567",tz:"Asia/Kolkata"},{id:"ahmedabad",label:"Ahmedabad, India",coords:"23.0225,72.5714",tz:"Asia/Kolkata"},{id:"jaipur",label:"Jaipur, India",coords:"26.9124,75.7873",tz:"Asia/Kolkata"},{id:"lucknow",label:"Lucknow, India",coords:"26.8467,80.9462",tz:"Asia/Kolkata"},{id:"varanasi",label:"Varanasi, India",coords:"25.3176,82.9739",tz:"Asia/Kolkata"},{id:"chandigarh",label:"Chandigarh, India",coords:"30.7333,76.7794",tz:"Asia/Kolkata"},{id:"kathmandu",label:"Kathmandu, Nepal",coords:"27.7172,85.3240",tz:"Asia/Kathmandu"},{id:"colombo",label:"Colombo, Sri Lanka",coords:"6.9271,79.8612",tz:"Asia/Colombo"},{id:"dubai",label:"Dubai, UAE",coords:"25.2048,55.2708",tz:"Asia/Dubai"},{id:"singapore",label:"Singapore",coords:"1.3521,103.8198",tz:"Asia/Singapore"},{id:"london",label:"London, UK",coords:"51.5074,-0.1278",tz:"Europe/London"},{id:"newyork",label:"New York, USA",coords:"40.7128,-74.0060",tz:"America/New_York"},{id:"sanfrancisco",label:"San Francisco, USA",coords:"37.7749,-122.4194",tz:"America/Los_Angeles"},{id:"toronto",label:"Toronto, Canada",coords:"43.6532,-79.3832",tz:"America/Toronto"},{id:"sydney",label:"Sydney, Australia",coords:"-33.8688,151.2093",tz:"Australia/Sydney"}],j=x[0];function y(a){return x.find(s=>s.id===a)??j}const f="astrometry:selected-city";function u({title:a,icon:s,to:t,children:n}){return e.jsxs("div",{className:"flex flex-col rounded-2xl bg-card border border-[color:var(--brand)]/15 shadow-card overflow-hidden",children:[e.jsxs("div",{className:"flex items-center justify-between px-4 py-2.5 bg-brand-soft border-b border-[color:var(--brand)]/15",children:[e.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[e.jsx(s,{className:"h-4 w-4 text-brand shrink-0"}),e.jsx("h3",{className:"font-display text-sm font-semibold text-foreground truncate",children:a})]}),t&&e.jsxs(C,{to:t,className:"text-[10px] uppercase tracking-wider text-brand hover:underline flex items-center gap-1","aria-label":`View ${a.toLowerCase()} details`,children:["View ",a," ",e.jsx(L,{className:"h-3 w-3","aria-hidden":"true",focusable:"false"})]})]}),e.jsx("div",{className:"flex-1 p-4 text-left text-xs sm:text-[13px] text-foreground/90",children:n})]})}function i({label:a,value:s}){return e.jsxs("div",{className:"flex items-baseline justify-between gap-3 py-0.5",children:[e.jsx("span",{className:"text-muted-foreground shrink-0",children:a}),e.jsx("span",{className:"text-right font-medium text-foreground truncate",children:s})]})}function P({p:a,cityLabel:s}){if(!a)return e.jsx("p",{className:"text-muted-foreground",children:"Loading panchang…"});const t=n=>n?` upto ${n}`:"";return e.jsxs("div",{className:"space-y-0.5",children:[e.jsx("p",{className:"font-semibold mb-1",children:s}),e.jsxs("p",{className:"text-muted-foreground mb-2",children:[a.vara,", ",a.date]}),e.jsx(i,{label:"Sunrise",value:a.sunrise}),e.jsx(i,{label:"Sunset",value:a.sunset}),e.jsx(i,{label:"Tithi",value:`${a.tithi.name} (${a.paksha})${t(a.tithi.end)}`}),e.jsx(i,{label:"Nakshatra",value:`${a.nakshatra.name}${t(a.nakshatra.end)}`}),e.jsx(i,{label:"Yoga",value:`${a.yoga.name}${t(a.yoga.end)}`}),e.jsx(i,{label:"Karana",value:`${a.karana.name}
1${t(a.karana.end)}`}),e.jsx(i,{label:"Weekday",value:a.vara}),e.jsx(i,{label:"Amanta Month",value:a.amanta}),e.jsx(i,{label:"Purnimanta Month",value:a.purnimanta}),e.jsx(i,{label:"Ritu",value:a.ritu}),e.jsx(i,{label:"Shaka Samvat",value:a.shaka}),e.jsx(i,{label:"Vikram Samvat",value:a.vikram})]})}const U=new Set(["Amrit","Shubh","Labh","Char"]);function $({data:a,loading:s}){if(s&&!a)return e.jsx("p",{className:"text-muted-foreground text-[11px]",children:"Finding today's auspicious windows…"});if(!a)return e.jsx("p",{className:"text-muted-foreground",children:"Muhurat unavailable."});const t=(a.day??[]).filter(r=>U.has(r.name)).slice(0,3),n=a.inauspicious??{};return e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"rounded-lg bg-emerald-50 border border-emerald-200 px-3 py-2",children:[e.jsx("p",{className:"text-[10px] uppercase tracking-wider text-emerald-800",children:"Abhijit Muhurat"}),e.jsxs("p",{className:"font-semibold text-emerald-900 tabular-nums",children:[a.abhijit?.start," - ",a.abhijit?.end]})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-[10px] uppercase tracking-wider text-brand mb-1",children:"Best day windows"}),e.jsxs("ul",{className:"space-y-1",children:[t.length===0&&e.jsx("li",{className:"text-[11px] text-muted-foreground",children:"No preferred windows in daytime."}),t.map((r,o)=>e.jsxs("li",{className:"flex items-center justify-between text-[12px]",children:[e.jsx("span",{className:"font-medium",children:r.name}),e.jsxs("span",{className:"tabular-nums text-muted-foreground",children:[r.start," - ",r.end]})]},o))]})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-[10px] uppercase tracking-wider text-destructive mb-1",children:"Avoid"}),e.jsx("ul",{className:"space-y-0.5 text-[11px]",children:Object.values(n).map(r=>e.jsxs("li",{className:"flex items-center justify-between",children:[e.jsx("span",{children:r.name}),e.jsxs("span",{className:"tabular-nums text-muted-foreground",children:[r.start," - ",r.end]})]},r.name))})]})]})}function O({items:a,loading:s}){if(s&&!a)return e.jsx("p",{className:"text-muted-foreground text-[11px]",children:"Reading the sky for today's rashifal…"});const t=a??[];return e.jsx("ul",{className:"space-y-2 max-h-[280px] overflow-y-auto pr-1",children:t.map(n=>e.jsxs("li",{className:"border-b border-[color:var(--brand)]/10 pb-1.5 last:border-0",children:[e.jsx("p",{className:"font-semibold text-brand text-[12px]",children:n.name}),e.jsx("p",{className:"text-[11px] text-muted-foreground leading-snug line-clamp-3",children:n.prediction??"Prediction unavailable."})]},n.slug))})}function F({city:a,onChange:s}){return e.jsxs("label",{className:"inline-flex items-center gap-2 rounded-lg border border-[color:var(--brand)]/20 bg-card px-3 py-1.5 shadow-card text-xs sm:text-sm",children:[e.jsx(D,{className:"h-3.5 w-3.5 text-brand shrink-0"}),e.jsx("span",{className:"text-muted-foreground shrink-0 hidden sm:inline",children:"Location:"}),e.jsx("select",{"aria-label":"Select location",value:a.id,onChange:t=>s(y(t.target.value)),className:"bg-transparent outline-none font-medium text-foreground max-w-[180px] sm:max-w-none cursor-pointer",children:x.map(t=>e.jsx("option",{value:t.id,className:"bg-background text-foreground",children:t.label},t.id))})]})}function Q(){const[a,s]=b.useState(j);b.useEffect(()=>{try{const l=localStorage.getItem(f);l&&s(y(l))}catch{}},[]);const t=l=>{s(l);try{localStorage.setItem(f,l.id)}catch{}},n=m({queryKey:["local-panchang",a.id],queryFn:()=>E({data:{coords:a.coords,tz:a.tz,label:a.label}}),staleTime:1800*1e3}),r=m({queryKey:["daily-rashifal",new Date().toISOString().slice(0,10)],queryFn:()=>M({data:{dateISO:new Date().toISOString().slice(0,10)}}),staleTime:360*60*1e3}),o=m({queryKey:["muhurat",a.id,new Date().toISOString().slice(0,10)],queryFn:()=>{const l=new Date,[N,v]=a.coords.split(","),k=new Intl.DateTimeFormat("en-US",{timeZone:a.tz,hour12:!1,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).formatToParts(l),d=w=>Number(k.find(A=>A.type===w)?.value),S=Date.UTC(d("year"),d("month")-1,d("day"),d("hour"),d("minute"),d("second")),h=Math.round((S-l.getTime())/6e4),c=new Date(l.getTime()+h*6e4);return z({data:{year:c.getUTCFullYear(),month:c.getUTCMonth()+1,day:c.getUTCDate(),lat:Number(N),lon:Number(v),tzOffsetMinutes:h,placeLabel:a.label}})},staleTime:360*60*1e3});return e.jsxs("div",{className:"text-left",children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2 mb-3",children:[e.jsxs("p",{className:"text-[11px] text-muted-foreground",children:["Showing insights for ",e.jsx("span",{className:"font-semibold text-foreground",children:a.label})]}),e.jsx(F,{city:a,onChange:t})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-3",children:[e.jsx(u,{title:"Panchang for Today",icon:I,to:"/astro/panchang",children:e.jsx(P,{p:n.data,cityLabel:a.label})}),e.jsx(u,{title:"Today's Muhurat",icon:T,to:"/astro/muhurat",children:e.jsx($,{data:o.data,loading:o.isPending})}),e.jsx(u,{title:"Rashifal for Today",icon:K,to:"/astro/rashifal",children:e.jsx(O,{items:r.data,loading:r.isPending})})]})]})}function W(){return e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-3",children:Array.from({length:6}).map((a,s)=>e.jsx("div",{className:"h-[320px] rounded-2xl bg-card border border-[color:var(--brand)]/15 animate-pulse"},s))})}export{Q as VedicDashboard,W as VedicDashboardSkeleton};

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.