1var ps=Object.defineProperty;var gs=(e,t,i)=>t in e?ps(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i;var R=(e,t,i)=>gs(e,typeof t!="symbol"?t+"":t,i);import{m as ws,a as ki,c as ys,e as fs,r as D,b as As,u as Ts,d as Ss,f as oi,g as ri,j as n,I as zi,h as li,i as Hi,k as Es,l as bs,n as Rs,o as xs,p as Ds,q as Ns,s as Ht,t as Gi,v as $i,w as Is,x as Os,y as Ms,z as Ji,A as ks,B as js,C as Cs,D as Ls,E as vs,F as _s,G as Ps,H as Bs,J as Ys,K as Fs,L as Zs,M as Us,N as zs,O as Hs,P as Gs,Q as $s,R as Js,S as Vs,T as Ks,U as Ws,V as qs}from"./vendor-TXvl9UmZ.js";import{u as Vi,a as Xs,b as Qs,B as _,I as Ki,P as me,T as K,c as G,d as Xe,G as j,M as ci,S as Z,A as Te,D as Gt,L as Wi,K as Tt,e as Nt,f as ea,g as ta,h as ia,i as di,j as Ne,k as de,s as na,l as we,m as wt,n as sa,o as st,C as ji,p as aa,q as oa,U as ra,r as la,t as ca,v as da,w as ua,x as ma}from"./vendor-mantine-B2bNWGMS.js";import{S as qi,P as ha,a as ui,T as mi,M as Qe,B as pa,b as et,E as hi,R as Xi,G as St,V as oe,L as ga,C as Be,c as pi,d as wa,e as Qi,f as en,O as Et,g as tn,h as nn,D as It,i as ya,j as fa,k as Ci,l as Aa,m as Ta,n as Sa,o as gi,p as $t,q as Ea,r as ba,s as Ra,A as xa,W as Da,t as Na,u as Ia,U as Oa,v as Ma}from"./vendor-three-C3de3ICq.js";import"./index-CTnsve5n.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))s(a);new MutationObserver(a=>{for(const o of a)if(o.type==="childList")for(const r of o.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&s(r)}).observe(document,{childList:!0,subtree:!0});function i(a){const o={};return a.integrity&&(o.integrity=a.integrity),a.referrerPolicy&&(o.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?o.credentials="include":a.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function s(a){if(a.ep)return;a.ep=!0;const o=i(a);fetch(a.href,o)}})();function yd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var x=(e=>(e[e.SECOND=1]="SECOND",e[e.MINUTE=60]="MINUTE",e[e.HOUR=3600]="HOUR",e[e.DAY=86400]="DAY",e[e.WEEK=604800]="WEEK",e[e.MONTH=2629746]="MONTH",e[e.YEAR=31557600]="YEAR",e))(x||{});const P={name:"J2000",year:2e3,month:0,day:1,hour:12,minute:0,second:0},ka=2440588;function O(e){const t=Number(e.slice(2,e.length)),i=new Date((t-ka)*86400*1e3);return Ot(e,i)}function Ot(e,t){const i=t.getUTCFullYear(),s=t.getUTCMonth(),a=t.getUTCDate(),o=t.getUTCHours(),r=t.getUTCMinutes(),d=t.getUTCSeconds();return{name:e,year:i,month:s,day:a,hour:o,minute:r,second:d}}function Jt({year:e,month:t,day:i,hour:s,minute:a,second:o}){return new Date(Date.UTC(e,t,i,s,a,o))}function ja(){const e=new Date;return Ot(sn(e),e)}function sn(e){const{year:t,month:i,day:s,hour:a,minute:o,second:r}=Ot("",e),d=i+1,g=e.getUTCMilliseconds(),c=s+a/24+o/1440+r/86400+g/864e5,[h,y]=d<=2?[t-1,d+12]:[t,d],u=Math.floor(h/100),f=2-u+Math.floor(u/4);return`JD${Math.floor(365.25*(h+4716))+Math.floor(30.6001*(y+1))+c+f-1524.5}`}function bt(e){return e.toISOString().split("T")[0]}function Li(e){return e.toLocaleString("en-US",{timeZone:"UTC",year:"numeric",month:"long",day:"numeric"})}function wi(e){return`${e.toLocaleString("en-US",{timeZone:"UTC",year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1})} UTC`}const rt=66743e-15;function ie(e){return e*Math.PI/180}function Ca(e){return e*180/Math.PI}function an(e){return Math.sqrt(e.reduce((t,i)=>t+i**2,0))}function La(e,t){return Math.PI*2*Math.sqrt(Math.pow(e,3)/(rt*t))}function va(e,t){return e*Math.sqrt(1-t**2)}function _a(e,t){return e*(1-t**2)}function Pa(e,t){return rt*e/t**2}function pe(e){return 2500*(4/3)*Math.PI*e**3}function Ba(e){return 500*(4/3)*Math.PI*e**3}function on(e,t,i,s){return e*(1-t)*Math.cbrt(s/(3*(i+s)))}function Ya(e,t,i=1e-8,s=100){const a=e%(2*Math.PI);let o=a;for(let g=0;g<s;g++){const c=(o-t*Math.sin(o)-a)/(1-t*Math.cos(o));if(o=o-c,Math.abs(c)<i)break}const r=Math.sqrt(1-t**2)*Math.sin(o),d=Math.atan2(r,Math.cos(o)-t);return d<0?d+2*Math.PI:d}
1function Fa({eccentricity:e,semiMajorAxis:t,inclination:i,longitudeAscending:s,argumentOfPeriapsis:a,meanAnomaly:o},r){const d=ie(i),g=ie(s),c=ie(a),h=Ya(ie(o),e),y=_a(t,e),u=y/(1+e*Math.cos(h)),f=[u*Math.cos(h),u*Math.sin(h)],A=[-Math.sqrt(r/y)*Math.sin(h),Math.sqrt(r/y)*(e+Math.cos(h))],[v,M]=[Math.cos(g),Math.sin(g)],[z,J]=[Math.cos(d),Math.sin(d)],[C,B]=[Math.cos(c),Math.sin(c)],$=[[v*C-M*B*z,-v*B-M*C*z,M*J],[M*C+v*B*z,-M*B+v*C*z,-v*J],[B*J,C*J,z]],W=$.map(U=>U[0]*f[0]+U[1]*f[1]),Q=$.map(U=>U[0]*A[0]+U[1]*A[1]);return{position:W,velocity:Q}}function vi(e){return(e%360+360)%360}function Za(e,t,i){const{semiMajorAxis:s,rotation:a}=e,o=(Number(Jt(i))-Number(Jt(e.epoch)))/1e3,r=Math.sqrt(rt*t/s/s/s),d=e.meanAnomaly+Ca(r*o),g=a!=null&&a.initialRotation!=null?{...a,initialRotation:vi(a.initialRotation+o/a.siderealPeriod)}:a;return{...e,epoch:i,meanAnomaly:vi(d),rotation:g}}const ye="https://ssd-api.jpl.nasa.gov/doc/sbdb.html";function Ua(e){return typeof e=="object"&&e!==null&&"code"in e&&typeof e.code=="string"&&"moreInfo"in e&&typeof e.moreInfo=="string"&&"message"in e&&typeof e.message=="string"}var p=(e=>(e.STAR="star",e.PLANET="planet",e.MOON="moon",e.DWARF_PLANET="dwarf-planet",e.ASTEROID="asteroid",e.COMET="comet",e.TRANS_NEPTUNIAN_OBJECT="trans-neptunian-object",e.SPACECRAFT="spacecraft",e))(p||{});const yi=["star","planet","moon","dwarf-planet","asteroid","comet","trans-neptunian-object","spacecraft"];var w=(e=>(e.INNER_SYSTEM="regime/inner-system",e.ASTEROID_BELT="regime/asteroid-belt",e.OUTER_SYSTEM="regime/outer-system",e.KUIPER_BELT="regime/kuiper-belt",e.INNER_OORT_CLOUD="regime/inner-oort-cloud",e))(w||{}),S=(e=>(e.NASA="organization/nasa",e.USSR="organization/ussr",e.ESA="organization/esa",e.JAXA="organization/jaxa",e.CNSA="organization/cnsa",e))(S||{}),l=(e=>(e.FLYBY="Flyby",e.GRAVITY_ASSIST="Gravity Assist",e.ORBITER="Orbiter",e.LANDER="Lander",e.ROVER="Rover",e.HELICOPTER="Helicopter",e.IMPACTOR="Impactor",e))(l||{}),E=(e=>(e.OPERATIONAL="Operational",e.DEFUNCT="Defunct",e.DECOMMISSIONED="Decommissioned",e.RETURNED="Returned",e.CRASHED="Crashed",e))(E||{});function Fe(e){return`body/${e}`}function rn(e){return`regime/${e}`}function ln(e){return`spacecraft/${e}`}function cn(e){return`organization/${e}`}function dn(e){return`hill/${e}`}function un(e){return e!=null&&typeof e=="string"&&e.startsWith("body/")}function mn(e){return e!=null&&typeof e=="string"&&e.startsWith("regime/")}function fi(e){return e!=null&&typeof e=="string"&&e.startsWith("spacecraft/")}function za(e){return e!=null&&typeof e=="string"&&e.startsWith("organization/")}function Ha(e){return e!=null&&typeof e=="object"&&"type"in e&&typeof e.type=="string"&&yi.includes(e.type)}function Vt(e,t){const i=Math.abs(e);return i>1||i<1?`${e.toLocaleString()} ${t}s`:`${e.toLocaleString()} ${t}`}function Kt(e,t=!1){const i=Math.abs(e);return i<x.MINUTE?[e,"second"]:i<x.HOUR?[e/x.MINUTE,"minute"]:i<x.DAY?[e/x.HOUR,"hour"]:i<(t?x.WEEK:x.YEAR)?[e/x.DAY,"day"]:t&&i<x.MONTH?[e/x.WEEK,"week"]:t&&i<x.YEAR?[e/x.MONTH,"month"]:[e/x.YEAR,"year"]}function hn(e){return e<1e3?[e,"m"]:e<.01*N?[e/1e3,"km"]:[e/N,"AU"]}function Oe(e,t=!1){const i={[p.STAR]:"Star",[p.PLANET]:"Planet",[p.MOON]:"Moon",[p.DWARF_PLANET]:"Dwarf Planet",[p.ASTEROID]:"Asteroid",[p.COMET]:"Comet",[p.TRANS_NEPTUNIAN_OBJECT]:"Trans-Neptunian Object",[p.SPACECRAFT]:"Spacecraft"}[e];return t&&e!==p.SPACECRAFT?`${i}s`:i}function Ai(e){var a;const t=Oe(e.type),i=((a=e.elements.wrt)==null?void 0:a.split("/",2)[1])??"",s=`${String(i).charAt(0).toUpperCase()}${String(i).slice(1)}`;return e.type!==p.MOON?t:`${t} of ${s}`}function Wt(e){return e!=null}function Ti(e,t){return(t??e).replace(/\s+/g,"-").replace(/'/g,"-").toLowerCase()}const N=149597870700,Ga=9.807,Mt="#8b8b8b",lt="#51807c",Si="#50C878",$a={[p.MOON]:"#aaaaaa",[p.ASTEROID]:Mt,[p.COMET]:lt,[p.DWARF_PLANET]:"#998a98",[p.TRANS_NEPTUNIAN_OBJECT]:"#7b739e",[p.SPACECRAFT]:Si},Ja={[p.MOON]:"#888888",[p.ASTEROID]:"#4b4b4b",[p.DWARF_PLANET]:"#6e636d",[p.TRANS_NEPTUNIAN_OBJECT]:"#6d6887"};function T(e){var t,i,s;return{...e,id:e.id??Fe(Ti(e.name,e.shortName)),style:{fgColor:((t=e.style)==null?void 0:t.fgColor)??$a[e.type]??Mt,bgColor:((i=e.style)==null?void 0:i.bgColor)??((s=e.style)==null?void 0:s.fgColor)??Ja[e.type]}}}const m=T({type:p.STAR,name:"Sol (The Sun)",shortName:"Sol",influencedBy:[],elements:{wrt:null,epoch:P,eccentricity:0,semiMajorAxis:0,inclination:0,longitudeAscending:0,argumentOfPeriapsis:0,meanAnomaly:0,rotation:{axialTilt:7.25,siderealPeriod:609.12*x.HOUR}},mass:19885e26,radius:6957e5,style:{fgColor:"#fa0"},assets:{thumbnail:"sol-thumb.jpg",texture:"sol-texture.jpg",wiki:"https://en.wikipedia.org/wiki/Sun"}
1,facts:[{label:"age",value:"4.6 billion years"},{label:"star type",value:"G-type main-sequence star (yellow dwarf)"},{label:"temperature (center)",value:"15,700,000 K"},{label:"temperature (corona)",value:"5,000,000 K"}]}),We=T({type:p.PLANET,name:"Mercury",influencedBy:[m.id],orbitalRegime:w.INNER_SYSTEM,elements:{wrt:m.id,epoch:P,eccentricity:.20563,semiMajorAxis:5790905e4,inclination:7.005,longitudeAscending:48.331,argumentOfPeriapsis:29.124,meanAnomaly:174.796,rotation:{axialTilt:.034,siderealPeriod:58.6467*x.DAY}},mass:33011e19,radius:2439700,style:{fgColor:"#b3aeae"},assets:{thumbnail:"mercury-thumb.jpg",texture:"mercury-texture.jpg",wiki:"https://en.wikipedia.org/wiki/Mercury_(planet)"},facts:[{label:"solar day length",value:"A solar day on Mercury (176 Earth days) is longer than a year (88 Earth days)"}]}),q=T({type:p.PLANET,name:"Venus",influencedBy:[m.id],orbitalRegime:w.INNER_SYSTEM,elements:{wrt:m.id,epoch:P,eccentricity:.006772,semiMajorAxis:108208e6,inclination:3.39458,longitudeAscending:76.6799,argumentOfPeriapsis:54.884,meanAnomaly:50.115,rotation:{axialTilt:2.64,siderealPeriod:-243.02*x.DAY}},mass:48675e20,radius:6051800,style:{fgColor:"#e6b667"},assets:{thumbnail:"venus-thumb.jpg",texture:"venus-texture.jpg",wiki:"https://en.wikipedia.org/wiki/Venus",gallery:[{filename:"venus-venera.jpg"},{filename:"venus-venera2.jpg"},{filename:"venus-eistla-regio.jpg"},{filename:"venus-venera3.jpg"},{filename:"venus-magellan.jpg"}]}}),he=T({type:p.PLANET,name:"Earth",influencedBy:[m.id],orbitalRegime:w.INNER_SYSTEM,elements:{wrt:m.id,epoch:P,eccentricity:.0167086,semiMajorAxis:149597870700,inclination:5e-5,longitudeAscending:-11.26064,argumentOfPeriapsis:114.20783,meanAnomaly:358.617,rotation:{axialTilt:-23.4,siderealPeriod:23*x.HOUR+56*x.MINUTE+4.1,initialRotation:170}},mass:5972168e18,radius:6371e3,style:{fgColor:"#7e87dd"},assets:{thumbnail:"earth-thumb.jpg",texture:"earth-texture.jpg",wiki:"https://en.wikipedia.org/wiki/Earth"}}),L=T({type:p.MOON,name:"Luna (The Moon)",shortName:"Luna",influencedBy:[m.id,he.id],elements:{wrt:he.id,epoch:P,eccentricity:.0549,semiMajorAxis:3844e5,inclination:5.145,longitudeAscending:125.08,argumentOfPeriapsis:318.15,meanAnomaly:0,rotation:{axialTilt:6.687,siderealPeriod:27.321661*x.DAY,initialRotation:145}}
1,mass:7342e19,radius:1737400,assets:{thumbnail:"luna-thumb.jpg",texture:"luna-texture.jpg",wiki:"https://en.wikipedia.org/wiki/Moon",gallery:[{filename:"luna-apollo-15.jpg",caption:"Apollo 15 astronaut Jim Irwin stands at the Lunar Rover, with Mt. Hadley as a backdrop, in this image taken by Dave Scott at the end of EVA-1. Newly-processed from NASA Photo ID AS15-86-11603."},{filename:"luna-apollo-17.jpg"},{filename:"luna-change-landing.mp4"},{filename:"luna-apollo-15-2.jpg"},{filename:"luna-apollo-11.jpg"}]}}),Va=[he,L],I=T({type:p.PLANET,name:"Mars",influencedBy:[m.id],orbitalRegime:w.INNER_SYSTEM,elements:{wrt:m.id,epoch:P,eccentricity:.0935,semiMajorAxis:227939366e3,inclination:1.85,longitudeAscending:49.57854,argumentOfPeriapsis:286.502,meanAnomaly:19.412,rotation:{axialTilt:25.19,siderealPeriod:x.DAY+37*x.MINUTE+22.66}},mass:64171e19,radius:3389500,style:{fgColor:"#c96c3c"},assets:{thumbnail:"mars-thumb.jpg",texture:"mars-texture.jpg",wiki:"https://en.wikipedia.org/wiki/Mars",gallery:[{filename:"mars-curiosity.jpg"},{filename:"mars-perseverance.jpg"},{filename:"mars-ingenuity.mp4"},{filename:"mars-viking.jpg"},{filename:"mars-korolev.jpg"}]}}),Ka=T({type:p.MOON,name:"Phobos",influencedBy:[m.id,I.id],elements:{wrt:I.id,epoch:P,eccentricity:.0151,semiMajorAxis:9376e3,inclination:1.093+I.elements.rotation.axialTilt,longitudeAscending:0,argumentOfPeriapsis:0,meanAnomaly:0,rotation:{axialTilt:0,siderealPeriod:7*x.HOUR+39*x.MINUTE+12}},mass:10659e12,radius:11266.7,assets:{thumbnail:"phobos-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/Phobos_(moon)"}}),pn=T({type:p.MOON,name:"Deimos",influencedBy:[m.id,I.id],elements:{wrt:I.id,epoch:P,eccentricity:33e-5,semiMajorAxis:23458e3,inclination:.93+I.elements.rotation.axialTilt,longitudeAscending:0,argumentOfPeriapsis:0,meanAnomaly:0,rotation:{axialTilt:0,siderealPeriod:30.312*x.HOUR}},mass:14762e11,radius:6200,assets:{thumbnail:"deimos-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/Deimos_(moon)",gallery:[{filename:"deimos-hera-flyby.jpg",caption:"Mars and Deimos viewed by Hera's Asteroid Framing Camera"},{filename:"deimos-hera-flyby-hyperscout.jpg",caption:"Mars and Deimos viewed by Hera's Hyperscout H"}]}}),Wa=[I,Ka,pn],qt=T({type:p.DWARF_PLANET,name:"1 Ceres",shortName:"Ceres",influencedBy:[m.id],orbitalRegime:w.ASTEROID_BELT,elements:{wrt:m.id,epoch:O("JD2459600.5"),eccentricity:.075823,semiMajorAxis:41369025e4,inclination:10.594,longitudeAscending:80.305,argumentOfPeriapsis:73.597,meanAnomaly:291.4,rotation:{axialTilt:4,siderealPeriod:9.07417*x.HOUR}},mass:93839e16,radius:966200/2,assets:{thumbnail:"ceres-thumb.jpg",texture:"ceres-texture.jpg",wiki:"https://en.wikipedia.org/wiki/Ceres_(dwarf_planet)"}}),qa=T({type:p.ASTEROID,name:"2 Pallas",shortName:"Pallas",influencedBy:[m.id],orbitalRegime:w.ASTEROID_BELT,elements:{wrt:m.id,epoch:O("JD2453300.5"),eccentricity:.2302,semiMajorAxis:414e9,inclination:34.93,longitudeAscending:172.9,argumentOfPeriapsis:310.9,meanAnomaly:40.6},mass:204e18,radius:256e3,assets:{thumbnail:"pallas-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/2_Pallas"}}),Xa=T({type:p.ASTEROID,name:"3 Juno",shortName:"Juno",influencedBy:[m.id],orbitalRegime:w.ASTEROID_BELT,elements:{wrt:m.id,epoch:P,eccentricity:.2562,semiMajorAxis:3.35*N,inclination:12.991,longitudeAscending:169.84,argumentOfPeriapsis:247.74,meanAnomaly:0},mass:267e17,radius:127e3,assets:{thumbnail:"juno-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/3_Juno"}}),gn=T({type:p.ASTEROID,name:"4 Vesta",shortName:"Vesta",influencedBy:[m.id],orbitalRegime:w.ASTEROID_BELT,elements:{wrt:m.id,epoch:O("JD2453300.5"),eccentricity:.0894,semiMajorAxis:2.36*N,inclination:7.1422,longitudeAscending:103.71,argumentOfPeriapsis:151.66,meanAnomaly:169.4},mass:2590271e14,radius:278600,assets:{thumbnail:"vesta-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/4_Vesta"}}),Qa=T({type:p.ASTEROID,name:"6 Hebe",shortName:"Hebe",influencedBy:[m.id],orbitalRegime:w.ASTEROID_BELT,elements:{wrt:m.id,source:ye,epoch:O("JD2460600.5"),eccentricity:.2024234177620576,semiMajorAxis:36293029402313635e-5,inclination:14.7343613757291,longitudeAscending:138.6198303084144,argumentOfPeriapsis:239.6481345551401,meanAnomaly:248.2729238857798},mass:124e17,radius:92590,assets:{thumbnail:"hebe-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/6_Hebe"}}),eo=T({type:p.ASTEROID,name:"7 Iris",shortName:"Iris",influencedBy:[m.id],orbitalRegime:w.ASTEROID_BELT,elements:{wrt:m.id,source:ye,epoch:O("JD2460600.5"),eccentricity:.2298579625141813,semiMajorAxis:3569472744327954e-4,inclination:5.51947889466475,longitudeAscending:259.4989908638725,argumentOfPeriapsis:145.5201004327357,meanAnomaly:314.7578447776537},mass:135e17,radius:99915,assets:{thumbnail:"iris-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/7_Iris"}}),to=T({type:p.ASTEROID,name:"10 Hygiea",shortName:"Hygiea",influencedBy:[m.id],orbitalRegime:w.ASTEROID_BELT,elements:{wrt:m.id,epoch:P,eccentricity:.1125,semiMajorAxis:3.1415*N,inclination:3.8316,longitudeAscending:283.2,argumentOfPeriapsis:312.32,meanAnomaly:0},mass:874e17,radius:215e3,assets:{thumbnail:"hygiea-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/10_Hygiea"}}),Xt=T({type:p.ASTEROID,name:"16 Psyche",shortName:"Psyche",influencedBy:[m.id],orbitalRegime:w.ASTEROID_BELT,elements:{wrt:m.id,source:ye,epoch:O("JD2460600.5"),eccentricity:.1341242551713989,semiMajorAxis:437195001460578e-3,inclination:3.097229304279378,longitudeAscending:150.01901994,argumentOfPeriapsis:229.5887902320436,meanAnomaly:321.8655831010872},mass:229e17,radius:111500,assets:{thumbnail:"psyche-thumb.jpg",gallery:[{filename:"psyche-illustration.jpg"},{filename:"psyche-mission-illustration.jpg"}],wiki:"https://en.wikipedia.org/wiki/16_Psyche"},facts:[{label:"spacecraft mission",value:"NASA launched a mission to Psyche on October 13th, 2023, expected to arrive in 2029"},{label:"estimated value",value:"Estimated $10,000 quadrillion due to size and metallic composition"},{label:"material composition",value:"Believed to be mainly iron and nickel"}]}
1),wn=T({type:p.ASTEROID,name:"21 Lutetia",shortName:"Lutetia",influencedBy:[m.id],orbitalRegime:w.ASTEROID_BELT,elements:{wrt:m.id,epoch:P,eccentricity:.16339,semiMajorAxis:2.435*1496e8,inclination:3.064,longitudeAscending:80.867,argumentOfPeriapsis:249.997,meanAnomaly:87.976,rotation:{axialTilt:96,siderealPeriod:8.1655*x.HOUR}},mass:17e17,radius:49e3,assets:{thumbnail:"lutetia-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/21_Lutetia"}}),yn=T({type:p.ASTEROID,name:"243 Ida",shortName:"Ida",influencedBy:[m.id],orbitalRegime:w.ASTEROID_BELT,elements:{wrt:m.id,source:ye,epoch:O("JD2460600.5"),eccentricity:.04468707145845256,semiMajorAxis:42784974387560846e-5,inclination:1.130081146832236,longitudeAscending:323.584684217808,argumentOfPeriapsis:114.1278027764417,meanAnomaly:286.6317462477484},mass:42e15,radius:15700,assets:{thumbnail:"ida-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/243_Ida",search:"Q149012"}}),fn=T({type:p.ASTEROID,name:"253 Mathilde",shortName:"Mathilde",influencedBy:[m.id],orbitalRegime:w.ASTEROID_BELT,elements:{wrt:m.id,epoch:P,eccentricity:.26492652,semiMajorAxis:2.648402147*N,inclination:6.7427122,longitudeAscending:179.58936,argumentOfPeriapsis:157.39642,meanAnomaly:0},mass:1033e14,radius:26400,assets:{thumbnail:"mathilde-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/253_Mathilde"}}),Qt=T({type:p.ASTEROID,name:"433 Eros",shortName:"Eros",influencedBy:[m.id],orbitalRegime:w.INNER_SYSTEM,elements:{wrt:m.id,epoch:P,eccentricity:.2226,semiMajorAxis:1.4579*N,inclination:10.828,longitudeAscending:304.32,argumentOfPeriapsis:178.82,meanAnomaly:0},mass:6687e12,radius:8420,assets:{thumbnail:"eros-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/433_Eros"}}),An=T({type:p.ASTEROID,name:"951 Gaspra",shortName:"Gaspra",influencedBy:[m.id],orbitalRegime:w.ASTEROID_BELT,elements:{wrt:m.id,source:ye,epoch:O("JD2460600.5"),eccentricity:.1732495684718864,semiMajorAxis:33059292886786774e-5,inclination:4.106111105065087,longitudeAscending:252.9889923571982,argumentOfPeriapsis:129.9547895107816,meanAnomaly:293.0013480495998},mass:25e14,radius:6100,assets:{thumbnail:"gaspra-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/951_Gaspra"}}),Tn=T({id:Fe("steins"),type:p.ASTEROID,name:"2867 Å teins",shortName:"Å teins",influencedBy:[m.id],orbitalRegime:w.ASTEROID_BELT,elements:{wrt:m.id,source:ye,epoch:O("JD2460600.5"),eccentricity:.1455164445582001,semiMajorAxis:3538302292549914e-4,inclination:9.929375137550416,longitudeAscending:55.33347402049609,argumentOfPeriapsis:251.3574059590774,meanAnomaly:112.7677797374499},mass:17984059711845384e-2,radius:2580,assets:{thumbnail:"steins-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/2867_%C5%A0teins"}}),Sn=T({type:p.ASTEROID,name:"4179 Toutatis",shortName:"Toutatis",influencedBy:[m.id],orbitalRegime:w.INNER_SYSTEM,elements:{wrt:m.id,epoch:O("JD2454797.5"),eccentricity:.6288,semiMajorAxis:2.5321*N,inclination:.446,longitudeAscending:124.3,argumentOfPeriapsis:278.75,meanAnomaly:5.122},mass:19e12,radius:1225,assets:{thumbnail:"toutatis-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/4179_Toutatis"}}),io=T({type:p.ASTEROID,name:"4660 Nereus",shortName:"Nereus",influencedBy:[m.id],orbitalRegime:w.INNER_SYSTEM,elements:{wrt:m.id,epoch:O("JD2459396.5"),eccentricity:.36004,semiMajorAxis:1.4889*N,inclination:1.4316,longitudeAscending:314.41,argumentOfPeriapsis:158.12,meanAnomaly:0,rotation:{axialTilt:0,siderealPeriod:15.16*x.HOUR}},mass:pe(165),radius:165,assets:{thumbnail:"nereus-thumb.gif",wiki:"https://en.wikipedia.org/wiki/4660_Nereus"}}),En=T({type:p.ASTEROID,name:"5535 Annefrank",shortName:"Annefrank",influencedBy:[m.id],orbitalRegime:w.ASTEROID_BELT,elements:{wrt:m.id,epoch:O("JD2458000.5"),eccentricity:.0634,semiMajorAxis:2.2124*N,inclination:4.2473,longitudeAscending:120.64,argumentOfPeriapsis:9.1351,meanAnomaly:23.021},mass:pe(4340),radius:4340,assets:{thumbnail:"annefrank-thumb.png",wiki:"https://en.wikipedia.org/wiki/5535_Annefrank"}}),bn=T({type:p.ASTEROID,name:"9969 Braille",shortName:"Braille",influencedBy:[m.id],orbitalRegime:w.INNER_SYSTEM,elements:{wrt:m.id,epoch:O("JD2458000.5"),eccentricity:.4334,semiMajorAxis:2.341*N,inclination:28.999,longitudeAscending:241.95,argumentOfPeriapsis:356.11,meanAnomaly:16.88},mass:78e11,radius:800,assets:{thumbnail:"braille-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/9969_Braille"}}),ei=T({type:p.ASTEROID,name:"25143 Itokawa",shortName:"Itokawa",influencedBy:[m.id],orbitalRegime:w.INNER_SYSTEM,elements:{wrt:m.id,source:ye,epoch:O("JD2460600.5"),eccentricity:.28025543912428,semiMajorAxis:19808801025465103e-5,inclination:1.621180357660033,longitudeAscending:69.07689932024779,argumentOfPeriapsis:162.8201675534644,meanAnomaly:142.574067256416
17},mass:351e8,radius:165,assets:{thumbnail:"itokawa-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/25143_Itokawa"}}),Rn=T({type:p.ASTEROID,name:"52246 Donaldjohanson",shortName:"Donaldjohanson",influencedBy:[m.id],orbitalRegime:w.ASTEROID_BELT,elements:{wrt:m.id,source:ye,epoch:O("JD2460800.5"),eccentricity:.1869458828192647,semiMajorAxis:2.383197850368363*N,inclination:4.425553912250094,longitudeAscending:262.7769276643449,argumentOfPeriapsis:212.7962110751709,meanAnomaly:40.80284479504778},mass:pe(3895),radius:3895,assets:{thumbnail:"donaldjohanson-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/52246_Donaldjohanson",search:"Q15163754"}}),at=T({type:p.ASTEROID,name:"65803 Didymos",shortName:"Didymos",influencedBy:[m.id],orbitalRegime:w.INNER_SYSTEM,elements:{wrt:m.id,source:ye,epoch:O("JD2460800.5"),eccentricity:.3832511742413838,semiMajorAxis:24572942600604123e-5,inclination:3.41417645416608,longitudeAscending:72.9859763839095,argumentOfPeriapsis:319.602659066438,meanAnomaly:73.56984859743463},mass:52e10,radius:382.5,assets:{thumbnail:"didymos-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/65803_Didymos",search:"Q2265762"}}),ti=T({type:p.ASTEROID,name:"101955 Bennu",shortName:"Bennu",influencedBy:[m.id],orbitalRegime:w.INNER_SYSTEM,elements:{wrt:m.id,epoch:O("JD2455562.5"),eccentricity:.2038,semiMajorAxis:1.1264*N,inclination:6.0349,longitudeAscending:2.0609,argumentOfPeriapsis:66.2231,meanAnomaly:101.7039},mass:7329e7,radius:245.03,assets:{thumbnail:"bennu-thumb.png",gallery:[{filename:"bennu-landing.jpg"},{filename:"bennu-rotation.gif"},{filename:"bennu-surface.jpg"}],wiki:"https://en.wikipedia.org/wiki/101955_Bennu"}}),xn=T({type:p.ASTEROID,name:"152830 Dinkinesh",shortName:"Dinkinesh",influencedBy:[m.id],orbitalRegime:w.ASTEROID_BELT,elements:{wrt:m.id,epoch:O("JD2460000.5"),eccentricity:.112,semiMajorAxis:2.191*N,inclination:2.094,longitudeAscending:21.38,argumentOfPeriapsis:66.711,meanAnomaly:25.239},mass:pe(395),radius:395,assets:{thumbnail:"dinkinesh-thumb.png",wiki:"https://en.wikipedia.org/wiki/152830_Dinkinesh"}}),ii=T({type:p.ASTEROID,name:"162173 Ryugu",shortName:"Ryugu",influencedBy:[m.id],orbitalRegime:w.INNER_SYSTEM,elements:{wrt:m.id,epoch:O("JD2455907.5"),eccentricity:.1902,semiMajorAxis:1.1896*N,inclination:5.8837,longitudeAscending:251.62,argumentOfPeriapsis:211.43,meanAnomaly:3.9832},mass:45e10,radius:448,assets:{thumbnail:"ryugu-thumb.jpg",gallery:[{filename:"ryugu-surface.jpg"},{filename:"ryugu-surface2.jpg"},{filename:"ryugu-rotation.gif"}],wiki:"https://en.wikipedia.org/wiki/162173_Ryugu"}}),Dn=[qt,qa,Xa,gn,Qa,eo,to,Xt,wn,yn,fn,Qt,An,Tn,Sn,io,En,bn,ei,Rn,at,ti,xn,ii],ni=T({id:Fe("cg67p"),type:p.COMET,name:"67P/ChuryumovâGerasimenko",shortName:"67P/CâG",influencedBy:[m.id],mass:1e13,radius:2e3,elements:{wrt:m.id,epoch:O("JD2460000.5"),eccentricity:.64989,semiMajorAxis:3.457*N,inclination:3.8719,longitudeAscending:36.33,argumentOfPeriapsis:22.15,meanAnomaly:73.57,rotation:{axialTilt:52,siderealPeriod:12.4*x.HOUR}},assets:{thumbnail:"cg67p-thumb.jpg",gallery:[{filename:"cg67p-animation.gif"},{filename:"cg67p-thumb2.jpg"},{filename:"cg67p-thumb3.jpg"}],wiki:"https://en.wikipedia.org/wiki/67P/Churyumov%E2%80%93Gerasimenko"}}),Se=T({type:p.COMET,name:"Halley's Comet (1P/Halley)",shortName:"Halley",influencedBy:[m.id],mass:22e13,radius:5500,elements:{wrt:m.id,epoch:O("JD2474040.5"),eccentricity:.96658,semiMajorAxis:17.737*N,inclination:161.96,longitudeAscending:59.396,argumentOfPeriapsis:112.05,meanAnomaly:.07323},assets:{thumbnail:"halley-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/Halley%27s_Comet"}}),no=T({type:p.COMET,name:"Hale-Bopp (C/1995 O1)",shortName:"Hale-Bopp",influencedBy:[m.id],mass:13e18,radius:3e4,elements:{wrt:m.id,epoch:O("JD2459837.5"),eccentricity:.99498,semiMajorAxis:177.43*N,inclination:89.3,longitudeAscending:282.73,argumentOfPeriapsis:130.41,meanAnomaly:3.8784},assets:{thumbnail:"hale-bopp-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/Comet_Hale%E2%80%93Bopp"}}),Nn=T({type:p.COMET,name:"Borrelly's Comet (19P/Borrelly)",shortName:"Borrelly",influencedBy:[m.id],mass:2e13,radius:2400,elements:{wrt:m.id,epoch:O("JD2459279.5"),eccentricity:.6379142835777641,semiMajorAxis:3.606964684326838*N,inclination:29.3186623395529,longitudeAscending:74.30084258786506,argumentOfPeriapsis:351.8616063839783,meanAnomaly:312.1229200779977},assets:{thumbnail:"borrelly-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/19P/Borrelly"}}),Rt=T({type:p.COMET,name:"9P/Tempel 1",shortName:"Tempel 1",influencedBy:[m.id],mass:72e12,radius:3200,elements:{wrt:m.id,epoch:O("JD2457461.5"),eccentricity:.5097153029324003,semiMajorAxis:3.146206212969314*N,inclination:10.47337655895403,longitudeAscending:68.75447718427989,argumentOfPeriapsis:179.1960457087085,meanAnomaly:334.9969963096004},assets:{thumbnail:"tempel-1-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/Tempel_1"}}),In=T({type:p.COMET,name:"103P/Hartley 2",shortName:"Hartley 2",influencedBy:[m.id],mass:3e11,radius:570,elements:{wrt:m.id,epoch:O("JD2460146.5"),eccentricity:.6938071328607858,semiMajorAxis:3.475233576688153*N,inclination:13.61020331340449,longitudeAscending:219.7506
1522429561,argumentOfPeriapsis:181.3013988764762,meanAnomaly:347.2946368735635},assets:{thumbnail:"hartley-2-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/103P/Hartley"}}),On=T({type:p.COMET,name:"81P/Wild 2",shortName:"Wild 2",influencedBy:[m.id],mass:23e12,radius:2250,elements:{wrt:m.id,epoch:O("JD2458808.5"),eccentricity:.5373989073846863,semiMajorAxis:3.449745576963111*N,inclination:3.237004173608168,longitudeAscending:136.1102208500619,argumentOfPeriapsis:41.72523085114398,meanAnomaly:187.5966814232084},assets:{thumbnail:"wild-2-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/81P/Wild"}}),Mn=T({type:p.COMET,name:"26P/GriggâSkjellerup",shortName:"Grigg-Skjellerup",influencedBy:[m.id],radius:1300,mass:Ba(1300),elements:{wrt:m.id,source:ye,epoch:O("JD2456017.5"),eccentricity:.6396679618697105,semiMajorAxis:3.024224445052753*N,inclination:22.45511403015216,longitudeAscending:211.633966473815,argumentOfPeriapsis:1.896085645552865,meanAnomaly:273.4178382900974},assets:{thumbnail:"grigg-skjellerup-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/26P/Grigg%E2%80%93Skjellerup"}}),so=[ni,Se,no,Nn,Rt,In,On,Mn],Yt=T({name:"Mariner 2",type:p.SPACECRAFT,influencedBy:[m.id],orbitalRegime:w.INNER_SYSTEM,elements:{wrt:m.id,epoch:O("JD"),eccentricity:.16278,semiMajorAxis:.86*N,inclination:0,longitudeAscending:0,argumentOfPeriapsis:0,meanAnomaly:0},mass:203.6,radius:3,assets:{thumbnail:"mariner-2-thumb.jpg",search:"Mariner 2"}});T({name:"Elon Musk's Tesla Roadster",shortName:"Roadster",type:p.SPACECRAFT,influencedBy:[m.id],orbitalRegime:w.INNER_SYSTEM,elements:{wrt:m.id,epoch:P,eccentricity:.25591503690056,semiMajorAxis:1.325313962984*N,inclination:1.0737669848641,longitudeAscending:316.80045452644,argumentOfPeriapsis:177.89825115403,meanAnomaly:99.302874432786},mass:1300,radius:2,assets:{thumbnail:"roadster-thumb.jpg"}});const re=T({name:"134340 Pluto",shortName:"Pluto",type:p.DWARF_PLANET,influencedBy:[m.id],orbitalRegime:w.KUIPER_BELT,elements:{wrt:m.id,epoch:P,eccentricity:.2488,semiMajorAxis:5906440628e3,inclination:17.16,longitudeAscending:110.299,argumentOfPeriapsis:113.834,meanAnomaly:14.53,rotation:{axialTilt:122.53,siderealPeriod:6*x.DAY+9*x.HOUR+17.6*x.MINUTE}},mass:13025e18,radius:1188300,style:{fgColor:"#E7C7A4"},facts:[{label:"class",value:"plutino"}],assets:{thumbnail:"pluto-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/Pluto"}}),kn=T({type:p.MOON,name:"Charon",influencedBy:[m.id,re.id],elements:{wrt:re.id,epoch:O("JD2452600.5"),eccentricity:161e-6,semiMajorAxis:19595764,inclination:.08,longitudeAscending:223.046,argumentOfPeriapsis:0,meanAnomaly:0,rotation:{axialTilt:0,siderealPeriod:6*x.DAY+9*x.HOUR+17*x.MINUTE+35.89}},mass:1586e18,radius:606e3,assets:{thumbnail:"charon-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/Charon_(moon)"}}),jn=T({type:p.MOON,name:"Styx",influencedBy:[m.id,re.id],elements:{wrt:re.id,epoch:O("JD2455743.5"),eccentricity:.005787,semiMajorAxis:42656e3,inclination:.809,longitudeAscending:183.4,argumentOfPeriapsis:296.1,meanAnomaly:0,rotation:{axialTilt:82,siderealPeriod:3.24*x.DAY}},mass:75e14,radius:12e3/2,assets:{thumbnail:"styx-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/Styx_(moon)"}}),Cn=T({type:p.MOON,name:"Nix",influencedBy:[m.id,re.id],elements:{wrt:re.id,epoch:O("JD2455743.5"),eccentricity:.002036,semiMajorAxis:48694e3,inclination:.133,longitudeAscending:3.7,argumentOfPeriapsis:221.6,meanAnomaly:0},mass:26e15,radius:35e3/2,assets:{thumbnail:"nix-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/Nix_(moon)"}}),Ln=T({type:p.MOON,name:"Kerberos",influencedBy:[m.id,re.id],elements:{wrt:re.id,epoch:O("JD2455743.5"),eccentricity:.00328,semiMajorAxis:57783e3,inclination:.389,longitudeAscending:225.2,argumentOfPeriapsis:187.6,meanAnomaly:0,rotation:{axialTilt:96,siderealPeriod:5.31*x.DAY}},mass:165e14,radius:12e3/2,assets:{thumbnail:"kerberos-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/Kerberos_(moon)"}}),vn=T({type:p.MOON,name:"Hydra",influencedBy:[m.id,re.id],elements:{wrt:re.id,epoch:O("JD2455743.5"),eccentricity:.005862,semiMajorAxis:64738e3,inclination:.242,longitudeAscending:189.7,argumentOfPeriapsis:192.2,meanAnomaly:0},mass:301e14,radius:19e3,assets:{thumbnail:"hydra-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/Hydra_(moon)"}}),ao=[re,kn,jn,Cn,Ln,vn],oo=T({type:p.DWARF_PLANET,name:"50000 Quaoar",shortName:"Quaoar",influencedBy:[m.id],orbitalRegime:w.KUIPER_BELT,elements:{wrt:m.id,epoch:O("JD2459000.5"),eccentricity:.04106,semiMajorAxis:43.694*N,inclination:7.9895,longitudeAscending:188.927,argumentOfPeriapsis:147.48,meanAnomaly:301.104},mass:12e20,radius:545e3,assets:{thumbnail:"quaoar-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/Quaoar"}}),ro=T({type:p.DWARF_PLANET,name:"90377 Sedna",shortName:"Sedna",influencedBy:[m.id],orbitalRegime:w.INNER_OORT_CLOUD,elements:{wrt:m.id,epoch:O("JD2458900.5"),eccentricity:.8496,semiMajorAxis:506*N,inclination:11.9307,longitudeAscending:144.248,argumentOfPeriapsis:311.352,meanAnomaly:358.117},mass:25e20,radius:906e3/2,facts:[{label:"class",value:"sednoid"}],assets:{thumbnail:"sedna-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/Sedna_(dwarf_planet)"}}),lo=T({type:p.DWARF_PLANET,name:"90482 Orcus",shortName:"Orcus",influencedBy:[m.id],orbitalRegime:w.KUIPER_BELT,elements:{wrt:m.id,epoch:O("JD2459000.5"),eccentricity:.22701,semiMajorAxis:39.174*N,inclination:20.592,longitudeAscending:268.799,argumentOfPeriapsis:72.31,meanAnomaly:181.735},mass:6348e17,radius:91e4/2,facts:[{label:"class",value:"plutino"}],assets:{thumbnail:"orcus-thumb.gif",wiki:"https://en.wikipedia.org/wiki/Orcus_(dwarf_planet)"}}),co=T({type:p.DWARF_PLANET,name:"136199 Eris",shortName:"Eris",influencedBy:[m.id],orbitalRegime:w.KUIPER_BELT,elements:{wrt:m.id,epoch:O("JD2459000.5"),eccentricity:.43607,semiMajorAxis:67.864*N,inclination:44.04,longitudeAscending:35.951,argumentOfPeriapsis:151.639,meanAnomaly:205.989},mass:16466e18,radius:1163e3,assets:{thumbnail:"eris-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/Eris_(dwarf_planet)"}}),uo=T({type:p.DWARF_PLANET,name:"136108 Haumea",shortName:"Haumea",influencedBy:[m.id],orbitalRegime:w.KUIPER_BELT,elements:{wrt:m.id,epoch:O("JD2459200.5"),eccentricity:.19642,semiMajorAxis:43.116*N,inclination:28.2137,longitudeAscending:122.167,argumentOfPeriapsis:239.041,meanAnomaly:218.205},mass:4006e18,radius:78e4,assets:{thumbnail:"haumea-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/Haumea"}}),mo=T({type:p.DWARF_PLANET,name:"136472 Makemake",shortName:"Makemake",influencedBy:[m.id],orbitalRegime:w.KUIPER_BELT,elements:{wrt:m.id,epoch:O("JD2458900.5"),eccentricity:.16126,semiMajorAxis:45.43*N,inclination:28.9835,longitudeAscending:79.62,argumentOfPeriapsis:294.834,meanAnomaly:165.514},mass:31e20,radius:715e3,assets:{thumbnail:"makemake-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/Makemake"}}),_n=T({type:p.TRANS_NEPTUNIAN_OBJECT,name:"486958 Arrokoth",shortName:"Arrokoth",influencedBy:[m.id],orbitalRegime:w.KUIPER_BELT,mass:7485e11,radius:18e3,elements:{wrt:m.id,epoch:O("JD2458600.5"),eccentricity:.04172,semiMajorAxis:44.581*N,inclination:2.4512,longitudeAscending:158.998,argumentOfPeriapsis:174.418,meanAnomaly:316.551},assets:{thumbnail:"arrokoth-thumb.jpg",gallery:[{filename:"arrokoth-rotation.gif"}],wiki:"https://en.wikipedia.org/wiki/486958_Arrokoth"}}),ho=T({type:p.DWARF_PLANET,name:"225088 Gonggong",shortName:"Gonggong",influencedBy:[m.id],orbitalRegime:w.KUIPER_BELT,mass:175e19,radiu
1s:615e3,elements:{wrt:m.id,epoch:O("JD2459200.5"),eccentricity:.49943,semiMajorAxis:67.485*N,inclination:30.6273,longitudeAscending:336.8573,argumentOfPeriapsis:207.6675,meanAnomaly:106.496},assets:{thumbnail:"gonggong-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/Gonggong_(dwarf_planet)"}}),po=T({type:p.DWARF_PLANET,name:"2012 VP113",influencedBy:[m.id],orbitalRegime:w.INNER_OORT_CLOUD,mass:1e21,radius:574e3/2,elements:{wrt:m.id,epoch:O("JD2459800.5"),eccentricity:.7036,semiMajorAxis:271.5*N,inclination:24.0563,longitudeAscending:90.787,argumentOfPeriapsis:293.8,meanAnomaly:3.5},facts:[{label:"class",value:"sednoid"}],assets:{thumbnail:"vp113-thumb.gif",search:"2012 VP113",wiki:"https://en.wikipedia.org/wiki/2012_VP113"}}),go=T({id:Fe("leleakuhonua"),type:p.TRANS_NEPTUNIAN_OBJECT,name:"541132 LeleÄkÅ«honua",shortName:"LeleÄkÅ«honua",influencedBy:[m.id],orbitalRegime:w.INNER_OORT_CLOUD,mass:1e20,radius:11e4/2,elements:{wrt:m.id,epoch:O("JD2459000.5"),eccentricity:.93997,semiMajorAxis:1085*N,inclination:11.654,longitudeAscending:300.78,argumentOfPeriapsis:117.778,meanAnomaly:359.418},facts:[{label:"class",value:"sednoid"}],assets:{thumbnail:"leleakuhonua-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/541132_Lele%C4%81k%C5%ABhonua"}}),wo=T({type:p.TRANS_NEPTUNIAN_OBJECT,name:"2021 RR205",influencedBy:[m.id],orbitalRegime:w.INNER_OORT_CLOUD,mass:pe(15e4),radius:15e4,elements:{wrt:m.id,epoch:O("JD2460000.5"),eccentricity:.94395,semiMajorAxis:990.9*N,inclination:7.644,longitudeAscending:108.345,argumentOfPeriapsis:208.574,meanAnomaly:.363},facts:[{label:"class",value:"sednoid (disputed)"}],assets:{thumbnail:"rr205-thumb.png",wiki:"https://en.wikipedia.org/wiki/2021_RR205"}}),yo=T({type:p.TRANS_NEPTUNIAN_OBJECT,name:"2018 AG37 (FarFarOut)",shortName:"FarFarOut",influencedBy:[m.id],orbitalRegime:w.INNER_OORT_CLOUD,mass:pe(2e5),radius:2e5,elements:{wrt:m.id,epoch:O("JD2458540.5"),eccentricity:.655,semiMajorAxis:80.2*N,inclination:18.68,longitudeAscending:68.35,argumentOfPeriapsis:231.9,meanAnomaly:186.9},assets:{thumbnail:"farfarout-thumb.gif",wiki:"https://en.wikipedia.org/wiki/2018_AG37"}}),fo=T({type:p.TRANS_NEPTUNIAN_OBJECT,name:"15760 Albion",shortName:"Albion",influencedBy:[m.id],orbitalRegime:w.KUIPER_BELT,mass:pe(6e4),radius:6e4,elements:{wrt:m.id,epoch:O("JD2459000.5"),eccentricity:.07096,semiMajorAxis:43.925*N,inclination:2.1797,longitudeAscending:359.276,argumentOfPeriapsis:.7765,meanAnomaly:34.041},assets:{thumbnail:"albion-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/15760_Albion"}}),Ao=T({type:p.TRANS_NEPTUNIAN_OBJECT,name:"15810 Arawn",shortName:"Arawn",influencedBy:[m.id],orbitalRegime:w.KUIPER_BELT,mass:pe(7e4),radius:7e4,elements:{wrt:m.id,epoch:O("JD2457800.5"),eccentricity:.1206,semiMajorAxis:39.48*N,inclination:3.8074,longitudeAscending:144.69,argumentOfPeriapsis:101.89,meanAnomaly:30.638},facts:[{label:"class",value:"plutino"}],assets:{thumbnail:"arawn-thumb.gif",wiki:"https://en.wikipedia.org/wiki/15810_Arawn"}}),To=T({type:p.TRANS_NEPTUNIAN_OBJECT,name:"20000 Varuna",shortName:"Varuna",influencedBy:[m.id],orbitalRegime:w.KUIPER_BELT,mass:pe(33e4),radius:33e4,elements:{wrt:m.id,epoch:O("JD2459000.5"),eccentricity:.05617,semiMajorAxis:42.718*N,inclination:17.221,longitudeAscending:97.372,argumentOfPeriapsis:262.22,meanAnomaly:119.121,rotation:{siderealPeriod:6.343572*x.HOUR,axialTilt:0}},facts:[{label:"class",value:"cubewano"}],assets:{thumbnail:"varuna-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/20000_Varuna"}}),So=T({type:p.TRANS_NEPTUNIAN_OBJECT,name:"(55636) 2002 TX300",shortName:"2002 TX300",influencedBy:[m.id],orbitalRegime:w.KUIPER_BELT,mass:12e18,radius:143e3,elements:{wrt:m.id,epoch:O("JD2457400.5"),eccentricity:.12174,semiMajorAxis:43.116*N,inclination:25.87838,longitudeAscending:324.6984,argumentOfPeriapsis:338.958,meanAnomaly:73.7618,rotation:{siderealPeriod:12.101*x.HOUR,axialTilt:0}},facts:[{label:"class",value:"cubewano"}],assets:{thumbnail:"tx300-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/(55636)_2002_TX300"}}),Eo=T({type:p.TRANS_NEPTUNIAN_OBJECT,name:"19521 Chaos",shortName:"Chaos",influencedBy:[m.id],orbitalRegime:w.KUIPER_BELT,mass:pe(32e4),radius:32e4,elements:{wrt:m.id,epoch:O("JD2457400.5"),eccentricity:.10567,semiMajorAxis:45.796*N,inclination:12.0502,longitudeAscending:50.0239,argumentOfPeriapsis:58.4097,meanAnomaly:337.2998},facts:[{label:"class",value:"cubewano"}],assets:{thumbnail:"chaos-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/19521_Chaos",search:"19521 Chaos"}}),bo=T({type:p.TRANS_NEPTUNIAN_OBJECT,name:"28978 Ixion",shortName:"Ixion",influencedBy:[m.id],orbitalRegime:w.KUIPER_BELT,mass:pe(354800),radius:354800,elements:{wrt:m.id,epoch:O("JD2459200.5"),eccentricity:.24579,semiMajorAxis:39.802*N,inclination:19.6,longitudeAscending:71.011,argumentOfPeriapsis:298.314,meanAnomaly:289.587}
1,facts:[{label:"class",value:"plutino"}],assets:{thumbnail:"ixion-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/28978_Ixion"}}),Ro=[oo,ro,lo,uo,co,mo,ho,_n,po,go,wo,yo,fo,Ao,To,So,Eo,bo],H=T({type:p.PLANET,name:"Jupiter",influencedBy:[m.id],orbitalRegime:w.OUTER_SYSTEM,elements:{wrt:m.id,epoch:P,eccentricity:.0489,semiMajorAxis:778340821e3,inclination:1.303,longitudeAscending:100.464,argumentOfPeriapsis:273.867,meanAnomaly:20.02,rotation:{axialTilt:3.13,siderealPeriod:9*x.HOUR+55*x.MINUTE+30}},mass:18982e23,radius:69911e3,style:{fgColor:"#e9be76"},assets:{thumbnail:"jupiter-thumb.jpg",texture:"jupiter-texture.jpg",wiki:"https://en.wikipedia.org/wiki/Jupiter"}}),Ze=T({type:p.MOON,name:"Io",influencedBy:[m.id,H.id],elements:{wrt:H.id,epoch:P,eccentricity:.0041,semiMajorAxis:4218e5,inclination:.05+H.elements.rotation.axialTilt,longitudeAscending:0,argumentOfPeriapsis:0,meanAnomaly:0},mass:8931938e16,radius:1821600,style:{fgColor:"#fcf794"},assets:{thumbnail:"io-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/Io_(moon)"}}),Ee=T({type:p.MOON,name:"Europa",influencedBy:[m.id,H.id],elements:{wrt:H.id,epoch:P,eccentricity:.0094,semiMajorAxis:6711e5,inclination:.466+H.elements.rotation.axialTilt,longitudeAscending:0,argumentOfPeriapsis:0,meanAnomaly:0},mass:4799844e16,radius:1560800,style:{fgColor:"#b6d3d1"},assets:{thumbnail:"europa-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/Europa_(moon)"},facts:[{label:"volume of water",value:"Europa's subsurface ocean is believed to contain about twice as much water as all of Earth's oceans, combined"}]}),Me=T({type:p.MOON,name:"Ganymede",influencedBy:[m.id,H.id],elements:{wrt:H.id,epoch:P,eccentricity:.0013,semiMajorAxis:10704e5,inclination:.177+H.elements.rotation.axialTilt,longitudeAscending:0,argumentOfPeriapsis:0,meanAnomaly:0},mass:14819e19,radius:2634100,assets:{thumbnail:"ganymede-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/Ganymede_(moon)"}}),Ue=T({type:p.MOON,name:"Callisto",influencedBy:[m.id,H.id],elements:{wrt:H.id,epoch:P,eccentricity:.0074,semiMajorAxis:18827e5,inclination:2.017,longitudeAscending:0,argumentOfPeriapsis:0,meanAnomaly:0},mass:1075938e17,radius:2410300,assets:{thumbnail:"callisto-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/Callisto_(moon)"}}),xo=[H,Ze,Ee,Me,Ue],F=T({type:p.PLANET,name:"Saturn",influencedBy:[m.id],orbitalRegime:w.OUTER_SYSTEM,elements:{wrt:m.id,epoch:P,eccentricity:.0565,semiMajorAxis:143353e7,inclination:2.485,longitudeAscending:113.665,argumentOfPeriapsis:339.392,meanAnomaly:317.02,rotation:{axialTilt:26.73,siderealPeriod:10*x.HOUR+32*x.MINUTE+35}},mass:56834e22,radius:58232e3,rings:[{name:"DCBAF",start:7e7,end:142e6,texture:"saturn-rings-texture.png"}],style:{fgColor:"#d7be87"},assets:{thumbnail:"saturn-thumb.jpg",texture:"saturn-texture.jpg",wiki:"https://en.wikipedia.org/wiki/Saturn"}}),kt=T({type:p.MOON,name:"Mimas",influencedBy:[m.id,F.id],elements:{wrt:F.id,epoch:P,eccentricity:.0196,semiMajorAxis:18554e4,inclination:1.574+F.elements.rotation.axialTilt,longitudeAscending:0,argumentOfPeriapsis:0,meanAnomaly:0},mass:37493e15,radius:198200,assets:{thumbnail:"mimas-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/Mimas"}}),ct=T({type:p.MOON,name:"Enceladus",influencedBy:[m.id,F.id],elements:{wrt:F.id,epoch:P,eccentricity:.0047,semiMajorAxis:23804e4,inclination:.009+F.elements.rotation.axialTilt,longitudeAscending:0,argumentOfPeriapsis:0,meanAnomaly:0},mass:108022e15,radius:252100,assets:{thumbnail:"enceladus-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/Enceladus"}}),jt=T({type:p.MOON,name:"Tethys",influencedBy:[m.id,F.id],elements:{wrt:F.id,epoch:P,eccentricity:1e-4,semiMajorAxis:29467e4,inclination:1.091+F.elements.rotation.axialTilt,longitudeAscending:0,argumentOfPeriapsis:0,meanAnomaly:0},mass:617449e15,radius:531100,assets:{thumbnail:"tethys-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/Tethys_(moon)"}}),Ct=T({type:p.MOON,name:"Dione",influencedBy:[m.id,F.id],elements:{wrt:F.id,epoch:P,eccentricity:.0022,semiMajorAxis:37742e4,inclination:.028+F.elements.rotation.axialTilt,longitudeAscending:0,argumentOfPeriapsis:0,meanAnomaly:0},mass:1095452e15,radius:561400,assets:{thumbnail:"dione-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/Dione_(moon)"}}),dt=T({type:p.MOON,name:"Rhea",influencedBy:[m.id,F.id],elements:{wrt:F.id,epoch:P,eccentricity:.001,semiMajorAxis:52707e4,inclination:.345+F.elements.rotation.axialTilt,longitudeAscending:0,argumentOfPeriapsis:0,meanAnomaly:0},mass:2306518e15,radius:763800,assets:{thumbnail:"rhea-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/Rhea_(moon)"}}),Ce=T({type:p.MOON,name:"Titan",influencedBy:[m.id,F.id],elements:{wrt:F.id,epoch:P,eccentricity:.0288,semiMajorAxis:122187e4,inclination:.34854+F.elements.rotation.axialTilt,longitudeAscending:0,argumentOfPeriapsis:0,meanAnomaly:0}
1,mass:13452e19,radius:2574700,style:{fgColor:"#f1e193"},assets:{thumbnail:"titan-thumb.jpg",gallery:[{filename:"huygens-descent.mp4"},{filename:"huygens.jpg"}],wiki:"https://en.wikipedia.org/wiki/Titan_(moon)"}}),Lt=T({type:p.MOON,name:"Iapetus",influencedBy:[m.id,F.id],elements:{wrt:F.id,epoch:P,eccentricity:.0286,semiMajorAxis:356082e4,inclination:15.47+F.elements.rotation.axialTilt,longitudeAscending:0,argumentOfPeriapsis:0,meanAnomaly:0},mass:1805635e15,radius:734500,assets:{thumbnail:"iapetus-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/Iapetus_(moon)"}}),ut=T({type:p.MOON,name:"Hyperion",influencedBy:[m.id,F.id],elements:{wrt:F.id,epoch:P,eccentricity:.1230061,semiMajorAxis:1481009e3,inclination:.43+F.elements.rotation.axialTilt,longitudeAscending:0,argumentOfPeriapsis:0,meanAnomaly:0},mass:5551e15,radius:135e3,assets:{thumbnail:"hyperion-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/Hyperion_(moon)"}}),vt=T({type:p.MOON,name:"Phoebe",influencedBy:[m.id,F.id],elements:{wrt:F.id,epoch:O("JD2460000.5"),eccentricity:.1796752,semiMajorAxis:.0861776*N,inclination:151.78+F.elements.rotation.axialTilt,longitudeAscending:269.35082,argumentOfPeriapsis:15.26338,meanAnomaly:174.44144,rotation:{axialTilt:152.14,siderealPeriod:9.2735*x.HOUR}},mass:83123e14,radius:106500,assets:{thumbnail:"phoebe-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/Phoebe_(moon)"}}),Do=[F,kt,ct,jt,Ct,dt,Ce,Lt,ut,vt],ee=T({type:p.PLANET,name:"Uranus",influencedBy:[m.id],orbitalRegime:w.OUTER_SYSTEM,elements:{wrt:m.id,epoch:P,eccentricity:.04717,semiMajorAxis:19.19126*N,inclination:.773,longitudeAscending:74.006,argumentOfPeriapsis:96.998857,meanAnomaly:142.2386,rotation:{axialTilt:82.23,siderealPeriod:-17*x.HOUR+14*x.MINUTE+24}},mass:8681e22,radius:25362e3,style:{fgColor:"#9bcee6"},assets:{thumbnail:"uranus-thumb.jpg",texture:"uranus-texture.jpg",wiki:"https://en.wikipedia.org/wiki/Uranus"}}),No=T({type:p.MOON,name:"Puck",influencedBy:[m.id,ee.id],elements:{wrt:ee.id,epoch:P,eccentricity:12e-5,semiMajorAxis:86004444,inclination:.31921+ee.elements.rotation.axialTilt,longitudeAscending:0,argumentOfPeriapsis:0,meanAnomaly:0},mass:191e16,radius:81e3/2,assets:{thumbnail:"puck-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/Puck_(moon)"}}),Pn=T({type:p.MOON,name:"Miranda",influencedBy:[m.id,ee.id],elements:{wrt:ee.id,epoch:P,eccentricity:.0013,semiMajorAxis:12939e4,inclination:4.232+ee.elements.rotation.axialTilt,longitudeAscending:0,argumentOfPeriapsis:0,meanAnomaly:0},mass:6293e16,radius:235800,assets:{thumbnail:"miranda-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/Miranda_(moon)"}}),Bn=T({type:p.MOON,name:"Ariel",influencedBy:[m.id,ee.id],elements:{wrt:ee.id,epoch:P,eccentricity:.0012,semiMajorAxis:1909e5,inclination:.26+ee.elements.rotation.axialTilt,longitudeAscending:0,argumentOfPeriapsis:0,meanAnomaly:0},mass:12331e17,radius:578900,assets:{thumbnail:"ariel-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/Ariel_(moon)"}}),Yn=T({type:p.MOON,name:"Umbriel",influencedBy:[m.id,ee.id],elements:{wrt:ee.id,epoch:P,eccentricity:.0039,semiMajorAxis:266e6,inclination:.128+ee.elements.rotation.axialTilt,longitudeAscending:0,argumentOfPeriapsis:0,meanAnomaly:0},mass:12885e17,radius:584700,assets:{thumbnail:"umbriel-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/Umbriel"}}),Fn=T({type:p.MOON,name:"Titania",influencedBy:[m.id,ee.id],elements:{wrt:ee.id,epoch:P,eccentricity:.0011,semiMajorAxis:43591e4,inclination:.34+ee.elements.rotation.axialTilt,longitudeAscending:0,argumentOfPeriapsis:0,meanAnomaly:0},mass:3455e18,radius:788400,assets:{thumbnail:"titania-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/Titania_(moon)"}}),Zn=T({type:p.MOON,name:"Oberon",influencedBy:[m.id,ee.id],elements:{wrt:ee.id,epoch:P,eccentricity:.0014,semiMajorAxis:58352e4,inclination:.058+ee.elements.rotation.axialTilt,longitudeAscending:0,argumentOfPeriapsis:0,meanAnomaly:0},mass:31104e17,radius:761400,assets:{thumbnail:"oberon-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/Oberon_(moon)"}}),Io=[ee,No,Pn,Bn,Yn,Fn,Zn],te=T({type:p.PLANET,name:"Neptune",influencedBy:[m.id],orbitalRegime:w.OUTER_SYSTEM,elements:{wrt:m.id,epoch:P,eccentricity:.008678,semiMajorAxis:4503443661e3,inclination:1.77,longitudeAscending:131.783,argumentOfPeriapsis:273.187,meanAnomaly:259.883,rotation:{axialTilt:28.32,siderealPeriod:16*x.HOUR+6.6*x.MINUTE}},mass:102409e21,radius:24622e3,style:{fgColor:"#5a7cf6"},assets:{thumbnail:"neptune-thumb.jpg",texture:"neptune-texture.jpg",gallery:[{filename:"neptune-moons.png",caption:"Captured by JWST"}],wiki:"https://en.wikipedia.org/wiki/Neptune"}}),Un=T({type:p.MOON,name:"Triton",influencedBy:[m.id,te.id],elements:{wrt:te.id,epoch:P,eccentricity:16e-6,semiMajorAxis:354759e3,inclination:129.608,longitudeAscending:177.70910343,argumentOfPeriapsis:260.64357,meanAnomaly:0,rotation:{axialTilt:0,siderealPeriod:5*x.DAY+21*x.HOUR+2*x.MINUTE+53}},mass:21389e18,radius:1353400,assets:{thumbnail:"triton-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/Triton_(moon)"}}),zn=T({type:p.MOON,name:"Proteus",influencedBy:[m.id,te.id],elements:{wrt:te.id,epoch:P,eccentricity:5e-4,semiMajorAxis:117646e3,inclination:.524+te.elements.rotation.axialTilt,longitudeAscending:0,argumentOfPeriapsis:0,meanAnomaly:0},mass:25e18,radius:209e3,assets:{thumbnail:"proteus-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/Proteus_(moon)"}}),Hn=T({type:p.MOON,name:"Nereid",influencedBy:[m.id,te.id],elements:{wrt:te.id,epoch:P,eccentricity:.749,semiMajorAxis:5504e6,inclination:5.8,longitudeAscending:326,argumentOfPeriapsis:290.3,meanAnomaly:318},mass:357e17,radius:357e3/2,assets:{thumbnail:"nereid-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/Nereid_(moon)"}}),Oo=T({type:p.MOON,name:"Despina",influencedBy:[m.id,te.id],elements:{wrt:te.id,epoch:P,eccentricity:38e-5,semiMajorAxis:52525950,inclination:.216+te.elements.rotation.axialTilt,longitudeAscending:0,argumentOfPeriapsis:0,meanAnomaly:0},mass:11e17,radius:75e3,assets:{thumbnail:"despina-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/Despina_(moon)"}}),Gn=T({type:p.MOON,name:"Larissa",influencedBy:[m.id,te.id],elements:{wrt:te.id,epoch:O("JD2447756.5"),eccentricity:.001393,semiMajorAxis:73548260,inclination:.251+te.elements.rotation.axialTilt,longitudeAscending:0,argumentOfPeriapsis:0,meanAnomaly:0},mass:25e17,radius:97e3,assets:{thumbnail:"larissa-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/Larissa_(moon)"}}),$n=T({type:p.MOON,name:"Galatea",influencedBy:[m.id,te.id],elements:{wrt:te.id,epoch:O("JD2447756.5"),eccentricity:22e-5,semiMajorAxis:61952570,inclination:.052+te.elements.rotation.axialTilt,longitudeAscending:0,argumentOfPeriapsis:0,meanAnomaly:0},mass:25e17,radius:97e3,assets:{thumbnail:"galatea-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/Galatea_(moon)"}}),Mo=[te,Un,Oo,$n,Gn,zn,Hn],Jn=[m,We,q,...Va,...Wa,...xo,...Do,...Io,...Mo,...ao,...Dn,...so,...Ro],ko={id:S.NASA,name:"National Aeronautics and Space Administration",shortName:"NASA",founded:new Date(1958,6,29),thumbnail:"nasa-meatball.svg",wiki:"https://en.wikipedia.org/wiki/NASA",color:"#1b3c8c"},jo={id:S.USSR,name:"Soviet Space Program",shortName:"USSR",founded:new Date(1951,6,22),dissolved:new Date(1991,10,14),thumbnail:"ussr-logo.svg",wiki:"https://en.wikipedia.org/wiki/Soviet_space_program",color:"#bc271a"},Co={id:S.ESA,name:"European Space Agency",shortName:"ESA",founded:new Date(1975,4,30),thumbnail:"esa-logo-blue.png",wiki:"https://en.wikipedia.org/wiki/European_Space_Agency",color:"#00567a"},Lo={id:S.JAXA,name:"Japan Aerospace Exploration Agency",shortName:"JAXA",founded:new Date(2003,9,1),thumbnail:"jaxa-logo.png",wiki:"https://en.wikipedia.org/wiki/JAXA",color:"#285eaa"},vo={id:S.CNSA,name:"China National Space Administration",shortName:"CNSA",founded:new Date(1993,3,22),thumbnail:"cnsa-logo.svg",wiki:"https://en.wikipedia.org/wiki/China_National_Space_Administration",color:"#4887e4"}
1,Le=[ko,jo,Co,Lo,vo].reduce((e,t)=>({...e,[t.id]:t}),{});function b(e){return{...e,id:`spacecraft/${Ti(e.name)}`,color:e.color??Si}}const tt="Chang'e",_o=b({name:"Chang'e 1",organization:S.CNSA,launchMass:2350,start:new Date("2007-10-24T10:05:04Z"),end:new Date("2009-03-01T08:13:10Z"),focusId:L.id,orbitalRegimes:[w.INNER_SYSTEM],missionFamily:tt,status:{status:E.DEFUNCT,details:"Deliberately impacted the Moon on March 1, 2009"},wiki:"https://en.wikipedia.org/wiki/Chang%27e_1",thumbnail:"change-1-thumb.jpg",visited:[{id:L.id,type:l.ORBITER,start:new Date("2007-11-05T00:00:00Z"),end:new Date("2009-03-01T08:13:10Z")}]}),Po=b({name:"Chang'e 2",organization:S.CNSA,launchMass:2480,start:new Date("2010-10-01T10:59:00Z"),end:new Date(2014,6,1),orbitalRegimes:[w.INNER_SYSTEM],missionFamily:tt,status:{status:E.DEFUNCT,details:"Drifting out beyond Earth's orbit"},wiki:"https://en.wikipedia.org/wiki/Chang%27e_2",thumbnail:"change-2-thumb.jpg",visited:[{id:L.id,type:l.ORBITER,start:new Date("2010-10-06T03:06:00Z"),end:new Date("2011-06-08T12:00:00Z")},{id:Sn.id,type:l.FLYBY,start:new Date("2012-12-13T08:30:00Z")}]}),Bo=b({name:"Chang'e 4",organization:S.CNSA,launchMass:3780,start:new Date("2018-12-07T18:23:00Z"),orbitalRegimes:[w.INNER_SYSTEM],missionFamily:tt,focusId:L.id,status:{status:E.OPERATIONAL},wiki:"https://en.wikipedia.org/wiki/Chang%27e_4",thumbnail:"change-4-thumb.jpg",visited:[{id:L.id,type:l.LANDER,start:new Date("2019-01-03T02:26:00Z")}]}),Yo=b({name:"Yutu-2",organization:S.CNSA,launchMass:140,start:new Date("2018-12-07T18:23:00Z"),orbitalRegimes:[w.INNER_SYSTEM],missionFamily:tt,focusId:L.id,status:{status:E.OPERATIONAL,details:"Still operational as of September 2024"},wiki:"https://en.wikipedia.org/wiki/Yutu-2",thumbnail:"yutu-2-thumb.jpg",visited:[{id:L.id,type:l.ROVER,start:new Date("2019-01-03T02:26:00Z")}]}),Vn="Tianwen-1",Fo=b({name:"Tianwen-1",organization:S.CNSA,launchMass:5e3,start:new Date("2020-07-23T04:41:15Z"),focusId:I.id,orbitalRegimes:[w.INNER_SYSTEM],missionFamily:Vn,status:{status:E.OPERATIONAL},thumbnail:"tianwen-1-thumb.png",wiki:"https://en.wikipedia.org/wiki/Tianwen-1",color:I.style.fgColor,visited:[{id:I.id,type:l.ORBITER,start:new Date("2021-02-10T11:52:00Z")}]}),Zo=b({name:"Zhurong",organization:S.CNSA,launchMass:240,start:new Date("2020-07-23T04:41:15Z"),end:new Date("2022-12-26T12:00:00Z"),focusId:I.id,orbitalRegimes:[w.INNER_SYSTEM],missionFamily:Vn,status:{status:E.DEFUNCT,details:"Failed to wake from hibernation in December 2022 due to dust buildup"},thumbnail:"zhurong-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/Zhurong_(rover)",color:I.style.fgColor,visited:[{id:I.id,type:l.ROVER,start:new Date("2021-05-22T02:40:00Z"),end:new Date("2022-12-26T12:00:00Z")}]}),Uo=b({name:"Chang'e 5",organization:S.CNSA,launchMass:8200,start:new Date("2020-11-23T20:30:12Z"),end:new Date("2020-12-16T17:59:00Z"),orbitalRegimes:[w.INNER_SYSTEM],missionFamily:tt,focusId:L.id,status:{status:E.RETURNED,details:"Capsule returned to Earth with 1.7 kg of samples"},wiki:"https://en.wikipedia.org/wiki/Chang%27e_5",thumbnail:"change-5-thumb.jpg",visited:[{id:L.id,type:l.LANDER,start:new Date("2020-12-01T15:11:00Z"),end:new Date("2020-12-03T15:10:00Z")}]}),zo=b({name:"Chang'e 6",organization:S.CNSA,launchMass:8350,start:new Date("2024-05-03T09:27:29Z"),end:new Date("2024-06-25T06:07:00Z"),orbitalRegimes:[w.INNER_SYSTEM],missionFamily:tt,focusId:L.id,status:{status:E.RETURNED,details:"Returned with the first samples collected from the far side of the Moon"},wiki:"https://en.wikipedia.org/wiki/Chang%27e_6",thumbnail:"change-6-thumb.jpg",visited:[{id:L.id,type:l.LANDER,start:new Date("2024-06-01T22:23:16Z"),end:new Date("2024-06-03T23:38:10Z")}]}),Ho=[_o,Po,Bo,Yo,Fo,Zo,Uo,zo],Ei="Mariner",Go=b({name:Yt.name,organization:S.NASA,launchMass:Yt.mass,power:220,orbitalRegimes:[w.INNER_SYSTEM],missionFamily:Ei,start:new Date("1962-08-27T06:53:14Z"),end:new Date("1963-01-03T07:00:00Z"),status:{status:E.DEFUNCT,details:"Drifting in a heliocentric orbit"},wiki:"https://en.wikipedia.org/wiki/Mariner_2",thumbnail:Yt.assets.thumbnail,color:q.style.fgColor,visited:[{id:q.id,type:l.FLYBY,start:new Date("1962-12-14T12:00:00Z")}]}),$o=b({name:"Mariner 4",organization:S.NASA,launchMass:260.8,power:310,orbitalRegimes:[w.INNER_SYSTEM],missionFamily:Ei,start:new Date("1964-11-28T14:22:01Z"),end:new Date(1967,11,21),focusId:I.id,status:{status:E.DEFUNCT,details:"Damaged by 83 micrometeoroid hits, likely debris from comet D/1895 Q1 (Swift)"},wiki:"https://en.wikipedia.org/wiki/Mariner_4",thumbnail:"mariner-4-thumb.jpg",color:I.style.fgColor,visited:[{id:I.id,type:l.FLYBY,start:new Date("1965-07-15T01:00:57Z")}]}),ke="Apollo",Jo=b({name:"Apollo 8",organization:S.NASA,launchMass:28870,start:new Date("1968-12-21T12:51:00Z"),end:new Date("1968-12-27T15:51:42Z"),focusId:L.id,orbitalRegimes:[w.INNER_SYSTEM],missionFamily:ke,status:{status:E.RETURNED},thumbnail:"apollo-8-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/Apollo_8",crew:["Frank Borman","James Lovell","William Anders"],color:he.style.fgColor,visited:[{id:L.id,type:l.ORBITER,start:new Date("1968-12-24T10:03:27Z"),end:new Date("1968-12-25T06:13:40Z")}]}),Vo=b({name:"Apollo 10",organization:S.NASA,launchMass:42775,start:new Date("1969-05-18T16:49:00Z"),end:new Date("1969-05-26T16:52:23Z"),focusId:L.id,orbitalRegimes:[w.INNER_SYSTEM],missionFamily:ke,status:{status:E.RETURNED},thumbnail:"apollo-10-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/Apollo_10",crew:["Thomas Stafford","Gene Cernan","John Young"],
1color:he.style.fgColor,visited:[{id:L.id,type:l.ORBITER,start:new Date("1969-05-21T08:44:54Z"),end:new Date("1969-05-24T10:25:29Z")}]}),Ko=b({name:"Apollo 11",organization:S.NASA,launchMass:49735,start:new Date("1969-07-16T13:32:00Z"),end:new Date("1969-07-24T16:50:35Z"),focusId:L.id,orbitalRegimes:[w.INNER_SYSTEM],missionFamily:ke,status:{status:E.RETURNED},thumbnail:"apollo-11-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/Apollo_11",crew:["Neil Armstrong","Buzz Aldrin","Michael Collins"],color:he.style.fgColor,visited:[{id:L.id,type:l.LANDER,start:new Date("1969-07-20T20:17:00Z"),end:new Date("1969-07-21T17:54:00Z")}]}),Wo=b({name:"Apollo 12",organization:S.NASA,launchMass:49915,start:new Date("1969-11-14T16:22:00Z"),end:new Date("1969-11-24T20:58:24Z"),focusId:L.id,orbitalRegimes:[w.INNER_SYSTEM],missionFamily:ke,status:{status:E.RETURNED},thumbnail:"apollo-12-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/Apollo_12",crew:["Pete Conrad","Alan Bean","Richard Gordon"],color:he.style.fgColor,visited:[{id:L.id,type:l.LANDER,start:new Date("1969-11-19T06:54:35Z"),end:new Date("1969-11-20T14:25:47Z")}]}),qo=b({name:"Apollo 13",organization:S.NASA,launchMass:44069,start:new Date("1970-04-11T19:13:00Z"),end:new Date("1970-04-17T18:07:41Z"),focusId:L.id,orbitalRegimes:[w.INNER_SYSTEM],missionFamily:ke,status:{status:E.RETURNED},thumbnail:"apollo-13-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/Apollo_13",crew:["Jim Lovell","Jack Swigert","Fred Haise"],color:he.style.fgColor,visited:[{id:L.id,type:l.FLYBY,start:new Date("1970-04-15T00:21:00Z")}]}),Xo=b({name:"Apollo 14",organization:S.NASA,launchMass:46305,start:new Date("1971-01-31T21:03:02Z"),end:new Date("1971-02-09T21:05:02Z"),focusId:L.id,orbitalRegimes:[w.INNER_SYSTEM],missionFamily:ke,status:{status:E.RETURNED},thumbnail:"apollo-14-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/Apollo_14",crew:["Alan Shepard","Stuart Roosa","Edgar Mitchell"],color:he.style.fgColor,visited:[{id:L.id,type:l.LANDER,start:new Date("1971-02-05T09:18:11Z"),end:new Date("1971-02-06T18:48:42Z")}]}),Qo=b({name:"Apollo 15",organization:S.NASA,launchMass:48599,start:new Date("1971-07-26T13:34:00Z"),end:new Date("1971-08-07T20:45:53Z"),focusId:L.id,orbitalRegimes:[w.INNER_SYSTEM],missionFamily:ke,status:{status:E.RETURNED},thumbnail:"apollo-15-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/Apollo_15",crew:["David Scott","Alfred Worden","James Irwin"],color:he.style.fgColor,visited:[{id:L.id,type:l.LANDER,start:new Date("1971-07-30T22:16:29Z"),end:new Date("1971-08-02T17:11:23Z")}]}),Kn="Pioneer",er=b({name:"Pioneer 10",organization:S.NASA,launchMass:258,power:155,start:new Date("1972-03-03T01:49:04Z"),end:new Date("2003-01-23T12:00:00Z"),orbitalRegimes:[w.OUTER_SYSTEM,w.KUIPER_BELT],missionFamily:Kn,status:{status:E.DEFUNCT,details:"Drifting out beyond the Kuiper Belt"},wiki:"https://en.wikipedia.org/wiki/Pioneer_10",thumbnail:"pioneer-10-thumb.jpg",visited:[{id:Ue.id,type:l.FLYBY,start:new Date("1973-12-03T12:26:00Z")},{id:Me.id,type:l.FLYBY,start:new Date("1973-12-03T13:56:00Z")},{id:Ee.id,type:l.FLYBY,start:new Date("1973-12-03T19:26:00Z")},{id:Ze.id,type:l.FLYBY,start:new Date("1973-12-03T22:56:00Z")},{id:H.id,type:l.FLYBY,start:new Date("1973-12-04T02:26:00Z")}]}),tr=b({name:"Apollo 16",organization:S.NASA,launchMass:52759,start:new Date("1972-04-16T17:54:00Z"),end:new Date("1972-04-27T19:45:05Z"),focusId:L.id,orbitalRegimes:[w.INNER_SYSTEM],missionFamily:ke,status:{status:E.RETURNED},thumbnail:"apollo-16-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/Apollo_16",crew:["John Young","Ken Mattingly","Charlie Duke"],color:he.style.fgColor,visited:[{id:L.id,type:l.LANDER,start:new Date("1972-04-21T02:23:35Z"),end:new Date("1972-04-24T01:25:47Z")}]}),ir=b({name:"Apollo 17",organization:S.NASA,launchMass:48609,start:new Date("1972-12-07T05:33:00Z"),end:new Date("1972-12-19T19:54:58Z"),focusId:L.id,orbitalRegimes:[w.INNER_SYSTEM],missionFamily:ke,status:{status:E.RETURNED},thumbnail:"apollo-17-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/Apollo_17",crew:["Gene Cernan","Ronald Evans","Jack Schmitt"],color:he.style.fgColor,visited:[{id:L.id,type:l.LANDER,start:new Date("1972-12-10T19:53:55Z"),end:new Date("1972-12-16T23:35:09Z")}]}),nr=b({name:"Pioneer 11",organization:S.NASA,launchMass:258.5,power:155,start:new Date("1973-04-06T02:11:04Z"),end:new Date("1995-11-24T12:00:00Z"),orbitalRegimes:[w.OUTER_SYSTEM,w.KUIPER_BELT],missionFamily:Kn,status:{status:E.DEFUNCT,details:"Drifting through the Kuiper Belt"},wiki:"https://en.wikipedia.org/wiki/Pioneer_11",thumbnail:"pioneer-11-thumb.jpg",visited:[{id:Ue.id,type:l.FLYBY,start:new Date("1974-12-02T08:2
11:00Z")},{id:Me.id,type:l.FLYBY,start:new Date("1974-12-02T22:09:00Z")},{id:Ze.id,type:l.FLYBY,start:new Date("1974-12-03T03:11:00Z")},{id:Ee.id,type:l.FLYBY,start:new Date("1974-12-03T04:15:00Z")},{id:H.id,type:l.FLYBY,start:new Date("1974-12-03T05:21:19Z")},{id:Lt.id,type:l.FLYBY,start:new Date("1979-08-29T06:06:10Z")},{id:vt.id,type:l.FLYBY,start:new Date("1979-08-29T11:53:33Z")},{id:ut.id,type:l.FLYBY,start:new Date("1979-08-31T12:32:33Z")},{id:Ct.id,type:l.FLYBY,start:new Date("1979-09-01T15:59:30Z")},{id:kt.id,type:l.FLYBY,start:new Date("1979-09-01T16:26:28Z")},{id:F.id,type:l.FLYBY,start:new Date("1979-09-01T16:29:34Z")},{id:jt.id,type:l.FLYBY,start:new Date("1979-09-01T18:25:34Z")},{id:ct.id,type:l.FLYBY,start:new Date("1979-09-01T18:30:14Z")},{id:dt.id,type:l.FLYBY,start:new Date("1979-09-01T22:15:27Z")},{id:Ce.id,type:l.FLYBY,start:new Date("1979-09-02T18:00:33Z")}]}),sr=b({name:"Mariner 10",organization:S.NASA,launchMass:502.9,power:820,orbitalRegimes:[w.INNER_SYSTEM],missionFamily:Ei,start:new Date(1973,10,3,5,45),end:new Date(1975,2,24,12,21),status:{status:E.DEFUNCT,details:"Drifting in a heliocentric orbit in the inner system"},wiki:"https://en.wikipedia.org/wiki/Mariner_10",thumbnail:"mariner-10-thumb.jpg",visited:[{id:q.id,type:l.FLYBY,start:new Date(1974,1,5)},{id:We.id,type:l.FLYBY,start:new Date(1974,2,29)}]}),Wn="Voyager",ar=b({name:"Voyager 2",organization:S.NASA,launchMass:721.9,power:470,start:new Date("1977-08-20T14:29:00Z"),status:{status:E.OPERATIONAL},orbitalRegimes:[w.OUTER_SYSTEM,w.KUIPER_BELT],missionFamily:Wn,thumbnail:"voyager-2.jpg",wiki:"https://en.wikipedia.org/wiki/Voyager_2",visited:[{id:H.id,type:l.FLYBY,start:new Date("1979-07-08T12:00:00Z"),end:new Date("1979-08-05T12:00:00Z")},{id:Ue.id,type:l.FLYBY,start:new Date("1979-07-08T12:21:00Z")},{id:Me.id,type:l.FLYBY,start:new Date("1979-07-09T07:14:00Z")},{id:Ee.id,type:l.FLYBY,start:new Date("1979-07-09T17:53:00Z")},{id:Ze.id,type:l.FLYBY,start:new Date("1979-07-09T23:17:00Z")},{id:F.id,type:l.FLYBY,start:new Date("1981-06-05T00:00:00Z"),end:new Date("1981-09-25T00:00:00Z")},{id:Lt.id,type:l.FLYBY,start:new Date("1981-08-22T01:26:57Z")},{id:ut.id,type:l.FLYBY,start:new Date("1981-08-25T01:25:26Z")},{id:Ce.id,type:l.FLYBY,start:new Date("1981-08-25T09:37:46Z")},{id:Ct.id,type:l.FLYBY,start:new Date("1981-08-26T01:04:32Z")},{id:kt.id,type:l.FLYBY,start:new Date("1981-08-26T02:24:26Z")},{id:ct.id,type:l.FLYBY,start:new Date("1981-08-26T03:45:16Z")},{id:jt.id,type:l.FLYBY,start:new Date("1981-08-26T06:12:30Z")},{id:dt.id,type:l.FLYBY,start:new Date("1981-08-26T06:28:48Z")},{id:vt.id,type:l.FLYBY,start:new Date("1981-09-04T01:22:34Z")},{id:ee.id,type:l.FLYBY,start:new Date("1985-11-04T00:00:00Z"),end:new Date("1986-02-25T00:00:00Z")},{id:Pn.id,type:l.FLYBY,start:new Date("1986-01-24T16:50:00Z")},{id:Bn.id,type:l.FLYBY,start:new Date("1986-01-24T17:25:00Z")},{id:Yn.id,type:l.FLYBY,start:new Date("1986-01-24T17:25:00Z")},{id:Fn.id,type:l.FLYBY,start:new Date("1986-01-24T17:25:00Z")},{id:Zn.id,type:l.FLYBY,start:new Date("1986-01-24T17:25:00Z")},{id:te.id,type:l.FLYBY,start:new Date("1989-06-05T00:00:00Z"),end:new Date("1989-10-02T00:00:00Z")},{id:$n.id,type:l.FLYBY,start:new Date("1989-08-25T04:41:00Z")},{id:Gn.id,type:l.FLYBY,start:new Date("1989-08-25T04:51:00Z")},{id:zn.id,type:l.FLYBY,start:new Date("1989-08-25T05:29:00Z")},{id:Un.id,type:l.FLYBY,start:new Date("1989-08-25T09:23:00Z")},{id:Hn.id,type:l.FLYBY,start:new Date("1989-08-25T12:00:00Z")}]}),or=b({name:"Voyager 1",organization:S.NASA,launchMass:815,power:470,start:new Date("1977-09-05T12:56:01Z"),status:{status:E.OPERATIONAL},orbitalRegimes:[w.OUTER_SYSTEM,w.KUIPER_BELT],missionFamily:Wn,thumbnail:"voyager-1.png",wiki:"https://en.wikipedia.org/wiki/Voyager_1",visited:[{id:H.id,type:l.FLYBY,start:new Date("1979-03-05T12:00:00Z")},{id:Ze.id,type:l.FLYBY,start:new Date("1979-03-05T15:14:00Z")},{id:Ee.id,type:l.FLYBY,start:new Date("1979-03-05T18:19:00Z")},{id:Me.id,type:l.FLYBY,start:new Date("1979-03-06T02:15:00Z")},{id:Ue.id,type:l.FLYBY,start:new Date("1979-03-06T17:08:00Z")},{id:F.id,type:l.FLYBY,start:new Date("1980-11-12T12:00:00Z")},{id:Ce.id,type:l.FLYBY,start:new Date("1980-11-12T05:41:00Z")},{id:jt.id,type:l.FLYBY,start:new Date("1980-11-12T22:16:00Z")},{id:kt.id,type:l.FLYBY,start:new Date("1980-11-13T01:43:00Z")},{id:ct.id,type:l.FLYBY,start:new Date("1980-11-13T01:51:00Z")},{id:dt.id,type:l.FLYBY,start:new Date("1980-11-13T06:21:00Z")},{id:ut.id,type:l.FLYBY,start:new Date("1980-11-13T16:44:00Z")}]}),rr=b({name:"Magellan",organization:S.NASA,launchMass:3445,power:1030,orbitalRegimes:[w.INNER_SYSTEM],start:new Date("1989-05-04T18:47:00Z"),end:new Date("1994-10-13T10:05:00Z"),status:{status:E.DECOMMISSIONED,details:"Deorbited into the Venusian atmosphere on October 13, 1994"},wiki:"https://en.wikipedia.org/wiki/Magellan_(spacecraft)",thumbnail:"magellan-thumb.jpg",visited:[{id:q.id,type:l.ORBITER,start:new Date("1990-08-10T17:00:00Z"),end:new Date("1994-10-13T10:05:00Z")}]}),lr=b({name:"Galileo",organization:S.NASA,launchMass:2560,power:570,start:new Date("1989-10-18T16:53:40Z"),end:new Date("2003-09-21T18:57:18Z"),focusId:H.id,orbitalRegimes:[w.ASTEROID_BELT,w.OUTER_SYSTEM],status:{status:E.DECOMMISSIONED,details:"Intentionally flown into Jupiter's atmosphere on September 21, 2003"},thumbnail:"galileo-thumb.png",wiki:"https://en.wikipedia.org/wiki/Galileo_(spacecraft)",color:H.style.fgColor,visited:[{id:An.id,type:l.FLYBY,start:new Date("1991-10-29T12:00:00Z")},{id:yn.id,type:l.FLYBY,start:new Date("1993-08-28T12:00:00Z")},{id:H.id,type:l.ORBITER,start:new Date("1995-12-07T12:00:00Z"),end:new Date("2003-09-21T12:00:00Z")},{id:Ze.id,type:l.FLYBY,start:new Date("1995-12-07T12:00:00Z")},{id:Me.id,type:l.FLYBY,start:new Date("1996-06-27T12:00:00Z")},{id:Ue.id,type:l.FLYBY,start:new Date("1996-12-19T12:00:00Z")},{id:Ee.id,type:l.FLYBY,start:new Date("1997-02-20T12:00:00Z")}]}),cr=b({name:"NEAR Shoemaker",organization:S.NASA,launchMass:805,power:1800,start:new Date("1996-02-17T20:43:27Z"),end:new Date("2001-02-28T00:00:00Z"),focusId:Qt.id,orbitalRegimes:[w.INNER_SYSTEM],status:{status:E.DEFUNCT,details:"Soft landed on 433 Eros on February 12, 2001"},wiki:"https://en.wikipedia.org/wiki/NEAR_Shoemaker",thumbnail:"near-shoemaker-thumb.png",visited:[{id:fn.id,type:l.FLYBY,start:new Date("1997-06-27T12:56:00Z")},{id:Qt.id,type:l.ORBITER,start:new Date("2000-02-14T15:33:00Z"),end:new Date("2001-02-28T00:00:00Z")}]}),dr=b({name:"Mars Global Surveyor",organization:S.NASA,launchMass:1030.5,power:980,start:new Date("1996-11-07T17:00:00Z"),end:new Date(2007,0,28),status:{status:E.DEFUNCT,details:"Contact lost on November 2, 2006, estimated to remain in orbit until ~2050"},focusId:I.id,color:I.style.fgColor,orbitalRegimes:[w.INNER_SYSTEM],thumbnail:"mars-global-surveyor.jpg",wiki:"https://en.wikipedia.org/wiki/Mars_Global_Surveyor",visited:[{id:I.id,type:l.ORBITER,start:new Date("1997-09-11T01:17:00Z")}]}),qn="Pathfinder",ur=b({name:"Mars Pathfinder",organization:S.NASA,launchMass:890,power:35,start:new Date("1996-12-04T06:58:07Z"),end:new Date("1997-09-27T10:23:00Z"),status:{status:E.DEFUNCT,details:"Lost contact on September 27, 1997"},focusId:I.id,missionFamily:qn,orbitalRegimes:[w.INNER_SYSTEM],wiki:"https://en.wikipedia.org/wiki/Mars_Pathfinder",thumbnail:"pathfinder-thumb.webp",color:I.style.fgColor,visited:[{id:I.id,type:l.LANDER,start:new Date("1997-07-04T16:55:56Z"),end:new Date(1997,8,27)}]}
1),mr=b({name:"Sojourner",organization:S.NASA,launchMass:11.5,power:13,start:new Date("1996-12-04T06:58:07Z"),end:new Date(1998,2,10),status:{status:E.DEFUNCT,details:"Lost contact on September 27, 1997"},focusId:I.id,missionFamily:qn,orbitalRegimes:[w.INNER_SYSTEM],wiki:"https://en.wikipedia.org/wiki/Sojourner_(rover)",thumbnail:"sojourner-thumb.jpg",color:I.style.fgColor,visited:[{id:I.id,type:l.ROVER,start:new Date("1997-07-04T16:56:55Z"),end:new Date(1998,2,10)}]}),Xn="Cassini-Huygens",hr=b({name:"Cassini",organization:S.NASA,launchMass:5712,power:885,start:new Date("1997-10-15T08:43:00Z"),end:new Date("2017-09-15T11:55:00Z"),status:{status:E.DECOMMISSIONED,details:"Intentionally flown into Saturn's atmosphere on September 15, 2017"},focusId:F.id,orbitalRegimes:[w.OUTER_SYSTEM],missionFamily:Xn,thumbnail:"cassini-huygens.gif",wiki:"https://en.wikipedia.org/wiki/Cassini%E2%80%93Huygens",color:F.style.fgColor,visited:[{id:q.id,type:l.GRAVITY_ASSIST,start:new Date("1998-04-26T12:00:00Z")},{id:L.id,type:l.FLYBY,start:new Date("1999-08-18T03:28:00Z")},{id:H.id,type:l.GRAVITY_ASSIST,start:new Date("2000-12-30T10:05:00Z")},{id:F.id,type:l.ORBITER,start:new Date("2004-05-18T12:00:00Z"),end:new Date("2017-09-15T11:55:00Z")},{id:vt.id,type:l.FLYBY,start:new Date("2004-05-27T12:00:00Z")},{id:Ce.id,type:l.FLYBY,start:new Date("2004-07-02T12:00:00Z")},{id:Lt.id,type:l.FLYBY,start:new Date("2004-12-31T18:45:37Z")},{id:ct.id,type:l.FLYBY,start:new Date("2005-02-17T12:00:00Z")},{id:ut.id,type:l.FLYBY,start:new Date("2005-09-26T12:00:00Z")},{id:dt.id,type:l.FLYBY,start:new Date("2005-11-26T22:37:00Z")},{id:Ct.id,type:l.FLYBY,start:new Date("2010-04-07T12:00:00Z")}]}),pr=b({name:"Deep Space 1",organization:S.NASA,launchMass:486,power:2500,start:new Date("1998-10-24T12:08:00Z"),end:new Date("2001-12-18T20:00:00Z"),orbitalRegimes:[w.INNER_SYSTEM],status:{status:E.DEFUNCT,details:"Drifting in a heliocentric orbit"},wiki:"https://en.wikipedia.org/wiki/Deep_Space_1",thumbnail:"deep-space-1-thumb.png",visited:[{id:bn.id,type:l.FLYBY,start:new Date("1999-07-29T04:46:00Z")},{id:Nn.id,type:l.FLYBY,start:new Date("2001-09-22T22:29:33Z")}]}),gr=b({name:"Stardust",organization:S.NASA,launchMass:385,power:330,start:new Date("1999-02-07T21:04:15Z"),end:new Date("2011-03-24T23:33:00Z"),orbitalRegimes:[w.INNER_SYSTEM,w.ASTEROID_BELT],status:{status:E.DEFUNCT,details:"Deactivated on March 24, 2011"},wiki:"https://en.wikipedia.org/wiki/Stardust_(spacecraft)",thumbnail:"stardust-thumb.jpg",color:lt,visited:[{id:En.id,type:l.FLYBY,start:new Date("2002-11-02T04:50:20Z")},{id:On.id,type:l.FLYBY,start:new Date("2004-01-02T19:21:28Z")},{id:Rt.id,type:l.FLYBY,start:new Date("2011-02-15T04:39:10Z")}]}),wr=b({name:"MESSENGER",organization:S.NASA,launchMass:1107.9,power:450,start:new Date("2004-08-03T06:15:56Z"),end:new Date("2015-04-30T19:26:00Z"),focusId:We.id,orbitalRegimes:[w.INNER_SYSTEM],status:{status:E.DECOMMISSIONED,details:"Intentionally crashed into Mercury on April 30th, 2015"},thumbnail:"messenger-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/MESSENGER",visited:[{id:q.id,type:l.GRAVITY_ASSIST,start:new Date("2007-06-05T12:00:00Z")},{id:We.id,type:l.ORBITER,start:new Date("2011-03-18T01:00:00Z")}]}),yr=b({name:"Deep Impact",organization:S.NASA,launchMass:973,power:92,start:new Date("2005-01-12T18:47:08Z"),end:new Date("2013-08-08T12:00:00Z"),focusId:Rt.id,orbitalRegimes:[w.INNER_SYSTEM],status:{status:E.DEFUNCT,details:"Communications unexpectedly lost in August 2013"},wiki:"https://en.wikipedia.org/wiki/Deep_Impact_(spacecraft)",thumbnail:"deep-impact-thumb.jpg",color:lt,visited:[{id:Rt.id,type:l.IMPACTOR,start:new Date("2005-07-04T05:52:00Z")},{id:In.id,type:l.FLYBY,start:new Date("2010-11-04T13:50:57Z")}]}),fr=b({name:"Mars Reconnaissance Orbiter",organization:S.NASA,launchMass:2180,power:2e3,start:new Date("2005-08-12T11:43:00Z"),orbitalRegimes:[w.INNER_SYSTEM],status:{status:E.OPERATIONAL},focusId:I.id,thumbnail:"mro-thumb.webp",wiki:"https://en.wikipedia.org/wiki/Mars_Reconnaissance_Orbiter",color:I.style.fgColor,visited:[{id:I.id,type:l.ORBITER,start:new Date("2006-03-10T21:24:00Z")}]}
1),Ar=b({name:"New Horizons",organization:S.NASA,launchMass:478,power:245,start:new Date("2006-01-19T19:00:00Z"),status:{status:E.OPERATIONAL,details:"Currently traveling through the Kuiper belt"},orbitalRegimes:[w.OUTER_SYSTEM,w.KUIPER_BELT],focusId:re.id,thumbnail:"new-horizons-thumb.png",wiki:"https://en.wikipedia.org/wiki/New_Horizons",color:re.style.fgColor,visited:[{id:H.id,type:l.FLYBY,start:new Date("2007-02-28T12:00:00Z")},{id:re.id,type:l.FLYBY,start:new Date("2015-03-10T12:00:00Z"),end:new Date("2015-07-14T12:00:00Z")},{id:kn.id,type:l.FLYBY,start:new Date("2015-07-14T12:03:00Z")},{id:vn.id,type:l.FLYBY,start:new Date("2015-07-14T12:00:00Z")},{id:Cn.id,type:l.FLYBY,start:new Date("2015-07-14T12:00:00Z")},{id:Ln.id,type:l.FLYBY,start:new Date("2015-07-14T12:00:00Z")},{id:jn.id,type:l.FLYBY,start:new Date("2015-07-14T12:00:00Z")},{id:_n.id,type:l.FLYBY,start:new Date("2019-01-01T12:00:00Z")}]}),Tr=b({name:"Dawn",organization:S.NASA,launchMass:1217.7,power:1e4,start:new Date("2007-09-27T11:34:00Z"),end:new Date("2018-10-30T12:00:00Z"),focusId:qt.id,orbitalRegimes:[w.ASTEROID_BELT],status:{status:E.DEFUNCT,details:"Remains in a stable orbit around Ceres"},wiki:"https://en.wikipedia.org/wiki/Dawn_(spacecraft)",thumbnail:"dawn-thumb.png",visited:[{id:I.id,type:l.GRAVITY_ASSIST,start:new Date("2009-02-17T12:00:00Z")},{id:gn.id,type:l.ORBITER,start:new Date("2011-07-16T12:00:00Z"),end:new Date("2012-09-05T12:00:00Z")},{id:qt.id,type:l.ORBITER,start:new Date("2015-03-06T12:00:00Z"),end:new Date("2018-10-30T12:00:00Z")}]}),Sr=b({name:"Juno",organization:S.NASA,launchMass:3625,power:14e3,start:new Date("2011-08-05T16:25:00Z"),focusId:H.id,orbitalRegimes:[w.OUTER_SYSTEM],status:{status:E.OPERATIONAL},thumbnail:"juno-thumb.png",wiki:"https://en.wikipedia.org/wiki/Juno_(spacecraft)",color:H.style.fgColor,visited:[{id:H.id,type:l.ORBITER,start:new Date("2016-07-05T03:53:00Z")},{id:Me.id,type:l.FLYBY,start:new Date("2019-12-26T16:58:59Z")},{id:Ee.id,type:l.FLYBY,start:new Date("2022-09-29T09:36:00Z")},{id:Ze.id,type:l.FLYBY,start:new Date("2022-12-14T12:00:00Z")}]}),Er=b({name:"Curiosity",organization:S.NASA,launchMass:899,power:100,start:new Date("2011-11-26T15:02:00Z"),focusId:I.id,orbitalRegimes:[w.INNER_SYSTEM],status:{status:E.OPERATIONAL},thumbnail:"curiosity-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/Curiosity_(rover)",color:I.style.fgColor,visited:[{id:I.id,type:l.ROVER,start:new Date("2012-08-06T05:17:00Z")}]}),br=b({name:"MAVEN",organization:S.NASA,launchMass:2454,power:1135,start:new Date("2013-11-18T18:28:00Z"),orbitalRegimes:[w.INNER_SYSTEM],status:{status:E.OPERATIONAL},focusId:I.id,color:I.style.fgColor,wiki:"https://en.wikipedia.org/wiki/MAVEN",thumbnail:"maven-thumb.png",visited:[{id:I.id,type:l.ORBITER,start:new Date("2014-09-22T02:24:00Z")}]}),Rr=b({name:"OSIRIS-REx",organization:S.NASA,launchMass:2110,power:3e3,start:new Date("2016-09-08T23:05:00Z"),end:new Date("2023-09-24T14:52:00Z"),focusId:ti.id,orbitalRegimes:[w.INNER_SYSTEM],status:{status:E.RETURNED,details:"Capsule returned to Earth with 121.6 grams of material from Bennu"},wiki:"https://en.wikipedia.org/wiki/OSIRIS-REx",thumbnail:"osiris-rex-thumb.png",visited:[{id:ti.id,type:l.ORBITER,start:new Date("2018-12-03T12:00:00Z"),end:new Date("2021-05-10T12:00:00Z")}]}),xr=b({name:"InSight",organization:S.NASA,launchMass:694,power:600,start:new Date("2018-05-05T11:05:01Z"),orbitalRegimes:[w.INNER_SYSTEM],status:{status:E.DEFUNCT,details:"Lost contact on December 15, 2022"},focusId:I.id,wiki:"https://en.wikipedia.org/wiki/InSight",thumbnail:"insight-thumb.jpg",color:I.style.fgColor,visited:[{id:I.id,type:l.LANDER,start:new Date("2018-11-26T19:52:59Z"),end:new Date(2022,11,21)}]}),Dr=b({name:"Parker Solar Probe",organization:S.NASA,launchMass:685,power:343,start:new Date("2018-08-12T07:31:00Z"),focusId:m.id,orbitalRegimes:[w.INNER_SYSTEM],status:{status:E.OPERATIONAL},thumbnail:"parker-solar-probe-thumb.png",wiki:"https://en.wikipedia.org/wiki/Parker_Solar_Probe",color:m.style.fgColor,visited:[{id:q.id,type:l.GRAVITY_ASSIST,start:new Date("2018-10-03T08:44:00Z")},{id:m.id,type:l.ORBITER,start:new Date("2018-11-06T03:27:00Z")}]}),Qn="Perseverance",Nr=b({name:"Perseverance",organization:S.NASA,launchMass:1025,power:110,start:new Date("2020-07-30T11:50:00Z"),focusId:I.id,orbitalRegimes:[w.INNER_SYSTEM],missionFamily:Qn,status:{status:E.OPERATIONAL},thumbnail:"perseverance-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/Perseverance_(rover)",color:I.style.fgColor,visited:[{id:I.id,type:l.ROVER,start:new Date("2021-02-18T20:55:00Z")}]}),Ir=b({name:"Ingenuity",organization:S.NASA,launchMass:1.8,power:350,start:new Date("2020-07-30T11:50:00Z"),end:new Date("2024-01-18T12:00:00Z"),focusId:I.id,orbitalRegimes:[w.INNER_SYSTEM],missionFamily:Qn,status:{status:E.DEFUNCT,details:"Ret
1ired in 2024 due to sustained rotor damage"},thumbnail:"ingenuity-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/Ingenuity_(helicopter)",color:I.style.fgColor,visited:[{id:I.id,type:l.HELICOPTER,start:new Date("2021-02-18T20:55:00Z")}]}),Or=b({name:"Lucy",organization:S.NASA,launchMass:1550,power:504,start:new Date("2021-10-16T09:34:02Z"),focusId:H.id,orbitalRegimes:[w.ASTEROID_BELT,w.OUTER_SYSTEM],status:{status:E.OPERATIONAL},thumbnail:"lucy-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/Lucy_(spacecraft)",visited:[{id:xn.id,type:l.FLYBY,start:new Date("2023-11-01T12:00:00Z")},{id:Rn.id,type:l.FLYBY,start:new Date("2025-04-20")}]}),es="Asteroid Impact and Deflection Assessment (AIDA)",Mr=b({name:"Double Asteroid Redirect Test (DART)",organization:S.NASA,launchMass:610,power:6600,start:new Date("2021-11-24T06:21:02Z"),end:new Date("2022-09-26T23:14:00Z"),focusId:at.id,orbitalRegimes:[w.INNER_SYSTEM],missionFamily:es,status:{status:E.DECOMMISSIONED,details:"Impacted Dimorphos on September 26, 2022"},thumbnail:"dart-thumb.png",wiki:"https://en.wikipedia.org/wiki/Double_Asteroid_Redirection_Test",visited:[{id:at.id,type:l.IMPACTOR,start:new Date("2022-09-22T23:14:00Z")}]}),kr=b({name:"Psyche",organization:S.NASA,launchMass:2608,power:4500,start:new Date("2023-10-13T14:19:00Z"),focusId:Xt.id,orbitalRegimes:[w.ASTEROID_BELT],status:{status:E.OPERATIONAL},thumbnail:"psyche-spacecraft-thumb.png",wiki:"https://en.wikipedia.org/wiki/Psyche_(spacecraft)",visited:[{id:Xt.id,type:l.ORBITER,start:new Date("2029-08-15T12:00:00Z")}]}),jr=b({name:"Europa Clipper",organization:S.NASA,launchMass:6065,power:600,start:new Date("2024-10-14T16:06:00Z"),focusId:H.id,orbitalRegimes:[w.INNER_SYSTEM,w.OUTER_SYSTEM],status:{status:E.OPERATIONAL},thumbnail:"europa-clipper-thumb.png",wiki:"https://en.wikipedia.org/wiki/Europa_Clipper",color:Ee.style.fgColor,visited:[{id:I.id,type:l.GRAVITY_ASSIST,start:new Date("2025-03-01T17:00:00Z")},{id:H.id,type:l.ORBITER,start:new Date("2030-04-11T12:00:00Z")},{id:Me.id,type:l.FLYBY,start:new Date("2030-04-15T12:00:00Z")},{id:Ee.id,type:l.FLYBY,start:new Date("2030-04-15T12:00:00Z")}]}),Cr=[Go,$o,Jo,Vo,Ko,Wo,qo,Xo,Qo,er,tr,ir,nr,sr,ar,or,rr,lr,cr,dr,ur,mr,hr,pr,gr,wr,yr,fr,Ar,Tr,Sr,Er,br,Rr,xr,Dr,Nr,Ir,Or,Mr,kr,jr],Lr=b({name:"Giotto",organization:S.ESA,launchMass:960,power:196,start:new Date("1985-07-02T11:23:00Z"),end:new Date(1992,6,23),status:{status:E.DEFUNCT},orbitalRegimes:[w.INNER_SYSTEM],thumbnail:"giotto-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/Giotto_(spacecraft)",color:lt,visited:[{id:Se.id,type:l.FLYBY,start:new Date(1986,2,14)},{id:Mn.id,type:l.FLYBY,start:new Date(1992,6,10)}]}),vr=b({name:"Ulysses",organization:S.ESA,launchMass:371,power:285,start:new Date("1990-10-06T11:47:16Z"),end:new Date(2009,5,30),orbitalRegimes:[w.INNER_SYSTEM,w.OUTER_SYSTEM],status:{status:E.DEFUNCT,details:"Deactivated after 18 years and 8 months of operation"},wiki:"https://en.wikipedia.org/wiki/Ulysses_(spacecraft)",thumbnail:"ulysses-thumb.jpg",visited:[{id:H.id,type:l.GRAVITY_ASSIST,start:new Date(1992,1,8)},{id:m.id,type:l.FLYBY,start:new Date(1994,5,26),end:new Date(1994,10,5)}]}),_r=b({name:"Solar and Heliospheric Observatory (SOHO)",organization:S.ESA,launchMass:1850,power:1500,start:new Date("1995-12-02T08:08:01Z"),focusId:m.id,orbitalRegimes:[w.INNER_SYSTEM],status:{status:E.OPERATIONAL},wiki:"https://en.wikipedia.org/wiki/Solar_and_Heliospheric_Observatory",thumbnail:"soho-thumb.jpg",visited:[{id:m.id,type:l.ORBITER,start:new Date(1996,4,1)}],color:m.style.fgColor}),Pr=b({name:"Huygens",organization:S.ESA,launchMass:320,power:600,start:new Date("1997-10-15T08:43:00Z"),end:new Date("2005-01-14T13:37:00Z"),focusId:Ce.id,orbitalRegimes:[w.OUTER_SYSTEM],missionFamily:Xn,status:{status:E.DEFUNCT,details:"Ran out of battery ~90 minutes after touchdown"},thumbnail:"huygens-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/Huygens_(spacecraft)",color:Ce.style.fgColor,visited:[{id:Ce.id,type:l.LANDER,start:new Date("2005-01-14T12:43:00Z"),end:new Date("2005-01-14T13:37:00Z")}]}),Br=b({name:"Mars Express",organization:S.ESA,launchMass:1123,power:460,start:new Date("2003-06-02T17:45:00Z"),status:{status:E.OPERATIONAL},orbitalRegimes:[w.INNER_SYSTEM],focusId:I.id,color:I.style.fgColor,wiki:"https://en.wikipedia.org/wiki/Mars_Express",thumbnail:"mars-express-thumb.jpg",visited:[{id:I.id,type:l.ORBITER,start:new Date("2003-12-25T03:00:00Z")}]}),Yr=b({name:"SMART-1",organization:S.ESA,launchMass:367,power:1850,start:new Date("2003-09-27T23:14:46Z"),end:new Date("2006-09-03T05:42:22Z"),focusId:L.id,orbitalRegimes:[w.INNER_SYSTEM],status:{status:E.DEFUNCT,details:"Deliberately impacted the Moon on September 3, 2006"},wiki:"https://en.wikipedia.org/wiki/SMART-1",thumbnail:"smart-1-thumb.jpg",visited:[{id:L.id,type:l.ORBITER,start:new Date(2004,10,15),end:new Date("2006-09-03T05:42:22Z")}]}),Fr=b({name:"Rosetta",organization:S.ESA,launchMass:3e3,power:850,start:new Date("2004-03-02T07:17:51Z"),end:new Date("2016-09-30T10:39:28Z"),focusId:ni.id,orbitalRegimes:[w.INNER_SYSTEM,w.ASTEROID_BELT],status:{status:E.DECOMMISSIONED,details:"Intentionally deorbited into Comet 67P in September 2016"}
1,wiki:"https://en.wikipedia.org/wiki/Rosetta_(spacecraft)",thumbnail:"rosetta-thumb.png",color:lt,visited:[{id:I.id,type:l.GRAVITY_ASSIST,start:new Date("2007-02-25T12:00:00Z")},{id:Tn.id,type:l.FLYBY,start:new Date("2008-09-05T12:00:00Z")},{id:wn.id,type:l.FLYBY,start:new Date("2010-07-10T12:00:00Z")},{id:ni.id,type:l.ORBITER,start:new Date("2014-08-05T09:06:00Z"),end:new Date("2016-09-30T10:39:28Z")}]}),Zr=b({name:"Venus Express",organization:S.ESA,launchMass:1270,power:1100,start:new Date("2005-11-09T03:33:34Z"),end:new Date("2015-01-18T15:01:55Z"),focusId:q.id,orbitalRegimes:[w.INNER_SYSTEM],status:{status:E.DECOMMISSIONED,details:"Deorbited into the Venusian atmosphere"},thumbnail:"venus-express-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/Venus_Express",color:q.style.fgColor,visited:[{id:q.id,type:l.ORBITER,start:new Date("2006-04-11T12:00:00Z"),end:new Date("2015-01-15T15:01:55Z")}]}),Ur=b({name:"BepiColombo",organization:S.ESA,launchMass:4100,power:150,start:new Date("2018-10-20T01:45:00Z"),focusId:We.id,orbitalRegimes:[w.INNER_SYSTEM],status:{status:E.OPERATIONAL,details:"Planned to enter Mercury orbit in November 2026"},thumbnail:"bepicolombo-thumb.png",wiki:"https://en.wikipedia.org/wiki/BepiColombo",visited:[{id:q.id,type:l.GRAVITY_ASSIST,start:new Date("2020-10-15T03:48:00Z")},{id:We.id,type:l.GRAVITY_ASSIST,start:new Date("2021-10-01T23:34:41Z")}]}),zr=b({name:"Jupiter Icy Moons Explorer",organization:S.ESA,launchMass:6070,power:850,start:new Date("2023-04-14T12:14:36Z"),focusId:H.id,orbitalRegimes:[w.OUTER_SYSTEM],status:{status:E.OPERATIONAL},thumbnail:"juice-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/Jupiter_Icy_Moons_Explorer",color:H.style.fgColor,visited:[{id:L.id,type:l.FLYBY,start:new Date("2024-08-19T21:16:00Z")},{id:q.id,type:l.GRAVITY_ASSIST,start:new Date("2025-08-31T12:00:00Z")},{id:H.id,type:l.ORBITER,start:new Date("2031-07-15T12:00:00Z")},{id:Ue.id,type:l.FLYBY,start:new Date("2032-01-15T12:00:00Z")},{id:Ee.id,type:l.FLYBY,start:new Date("2032-07-15T12:00:00Z")},{id:Me.id,type:l.ORBITER,start:new Date("2034-12-15T12:00:00Z")}]}),Hr=b({name:"Hera",organization:S.ESA,launchMass:1128,start:new Date("2024-10-07T14:52:11Z"),focusId:at.id,orbitalRegimes:[w.INNER_SYSTEM],missionFamily:es,status:{status:E.OPERATIONAL},thumbnail:"hera-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/Hera_(space_mission)",visited:[{id:I.id,type:l.GRAVITY_ASSIST,start:new Date("2025-03-12T12:00:00Z")},{id:pn.id,type:l.FLYBY,start:new Date("2025-03-12T12:00:00Z")},{id:at.id,type:l.ORBITER,start:new Date("2026-12-14T12:00:00Z")}]}),Gr=b({name:"Solar Orbiter",organization:S.ESA,launchMass:1800,power:180,start:new Date("2020-02-10T04:03:00Z"),focusId:m.id,orbitalRegimes:[w.INNER_SYSTEM],status:{status:E.OPERATIONAL},thumbnail:"solar-orbiter-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/Solar_Orbiter",color:m.style.fgColor,visited:[{id:m.id,type:l.ORBITER,start:new Date("2020-06-15T12:00:00Z")},{id:q.id,type:l.GRAVITY_ASSIST,start:new Date("2020-12-27T12:39:00Z")}]}),$r=[Lr,vr,_r,Pr,Br,Yr,Fr,Zr,Ur,Gr,zr,Hr],Jr=b({name:"Sakigake",organization:S.JAXA,launchMass:138.1,start:new Date("1985-01-07T19:27:00Z"),end:new Date(1995,10,15),focusId:Se.id,orbitalRegimes:[w.INNER_SYSTEM],status:{status:E.DEFUNCT,details:"Lost data contact in 1995, beacon contact in 1999"},wiki:"https://en.wikipedia.org/wiki/Sakigake",thumbnail:"sakigake-thumb.jpg",visited:[{id:Se.id,type:l.FLYBY,start:new Date("1986-03-11T04:18:00Z")}]}),Vr=b({name:"Hiten",organization:S.JAXA,launchMass:197,start:new Date("1990-01-24T11:46:00Z"),end:new Date("1993-04-10T18:03:25.7Z"),focusId:L.id,orbitalRegimes:[w.INNER_SYSTEM],status:{status:E.DEFUNCT,details:"Deliberately crashed into the lunar surface on April 10, 1993"},wiki:"https://en.wikipedia.org/wiki/Hiten_(spacecraft)",thumbnail:"hiten-thumb.jpg",visited:[{id:L.id,type:l.ORBITER,start:new Date("1993-02-15T13:33:00Z"),end:new Date("1993-04-10T18:03:25.7Z")}]}),Kr=b({name:"Nozomi",organization:S.JAXA,launchMass:540,start:new Date("1998-07-03T18:12:00Z"),end:new Date("2003-12-31T00:00:00Z"),focusId:I.id,color:I.style.fgColor,orbitalRegimes:[w.INNER_SYSTEM],status:{status:E.DEFUNCT,details:"Failed to enter Mars orbit due to electrical failure"},wiki:"https://en.wikipedia.org/wiki/Nozomi_(spacecraft)",thumbnail:"nozomi-thumb.jpg",visited:[{id:L.id,type:l.GRAVITY_ASSIST,start:new Date("1998-09-24T00:00:00Z")},{id:I.id,type:l.FLYBY,start:new Date("2003-12-14T00:00:00Z")}]}),ts="Hayabusa",Wr=b({name:"Hayabusa",organization:S.JAXA,launchMass:510,start:new Date("2003-05-09T04:29:25Z"),end:new Date("2010-06-13T14:12:00Z"),focusId:ei.id,orbitalRegimes:[w.INNER_SYSTEM],missionFamily:ts,status:{status:E.RETURNED,details:"Returned to Earth with samples of Itokawa in 2010"},wiki:"https://en.wikipedia.org/wiki/Hayabusa",thumbnail:"hayabusa-thumb.jpg",visited:[{id:ei.id,type:l.LANDER,start:new Date("2005-11-19T21:30:00Z"),end:new Date("2005-11-19T21:58:00Z")}]}
1),qr=b({name:"SELENE",organization:S.JAXA,launchMass:3020,power:3486,start:new Date("2007-09-14T01:31:01Z"),end:new Date("2009-06-10T18:25:00Z"),focusId:L.id,orbitalRegimes:[w.INNER_SYSTEM],status:{status:E.DECOMMISSIONED,details:"Deliberately impacted lunar surface near crater Gill"},wiki:"https://en.wikipedia.org/wiki/SELENE",thumbnail:"selene-thumb.jpg",visited:[{id:L.id,type:l.ORBITER,start:new Date("2007-10-03T00:00:00Z"),end:new Date("2009-06-10T18:25:00Z")}]}),Xr=b({name:"IKAROS",organization:S.JAXA,launchMass:310,start:new Date("2010-05-20T21:58:22Z"),end:new Date("2015-05-20T12:00:00Z"),orbitalRegimes:[w.INNER_SYSTEM],status:{status:E.DEFUNCT,details:"Drifting in a heliocentric orbit"},thumbnail:"ikaros-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/IKAROS",visited:[{id:q.id,type:l.FLYBY,start:new Date("2010-12-08T12:00:00Z")}]}),Qr=b({name:"Akatsuki",organization:S.JAXA,launchMass:517.6,power:700,start:new Date("2010-05-21T21:58:22Z"),end:new Date(2024,4,29),focusId:q.id,orbitalRegimes:[w.INNER_SYSTEM],status:{status:E.DEFUNCT,details:"Lost contact in April 2024"},wiki:"https://en.wikipedia.org/wiki/Akatsuki_(spacecraft)",thumbnail:"akatsuki-thumb.png",color:q.style.fgColor,visited:[{id:q.id,type:l.ORBITER,start:new Date(2015,11,7)}]}),el=b({name:"Hayabusa2",organization:S.JAXA,launchMass:600,power:2600,start:new Date("2014-12-03T04:22:04Z"),end:new Date("2020-12-05T12:00:00Z"),focusId:ii.id,orbitalRegimes:[w.INNER_SYSTEM],missionFamily:ts,status:{status:E.RETURNED,details:"Returned to Earth with 5 grams of material from Ryugu"},wiki:"https://en.wikipedia.org/wiki/Hayabusa2",thumbnail:"hayabusa-2-thumb.jpg",visited:[{id:ii.id,type:l.ORBITER,start:new Date("2018-06-27T12:00:00Z")}]}),tl=b({name:"Smart Lander for Investigating Moon (SLIM)",organization:S.JAXA,launchMass:590,start:new Date("2023-09-06T23:42:11Z"),end:new Date("2024-08-23T13:40:00Z"),focusId:L.id,orbitalRegimes:[w.INNER_SYSTEM],status:{status:E.DEFUNCT,details:"Landed on its side but survived multiple lunar nights before ultimately losing communication"},wiki:"https://en.wikipedia.org/wiki/Smart_Lander_for_Investigating_Moon",thumbnail:"slim-thumb.jpg",visited:[{id:L.id,type:l.LANDER,start:new Date("2024-01-19T15:20:00Z"),end:new Date("2024-08-23T13:40:00Z")}]}),il=[Jr,Vr,Kr,Wr,qr,Xr,Qr,el,tl],is="Luna",nl=b({name:"Luna 2",organization:S.USSR,launchMass:390.2,start:new Date("1959-09-12T06:39:42Z"),end:new Date("1959-09-13T21:02:24Z"),focusId:L.id,orbitalRegimes:[w.INNER_SYSTEM],missionFamily:is,status:{status:E.DECOMMISSIONED,details:"Impacted the surface of the Moon on September 13, 1959"},thumbnail:"luna-2-thumb.png",wiki:"https://en.wikipedia.org/wiki/Luna_2",visited:[{id:L.id,type:l.IMPACTOR,start:new Date("1959-09-13T21:02:24Z")}]}),sl=b({name:"Luna 3",organization:S.USSR,launchMass:278.5,start:new Date("1959-10-04T00:43:40Z"),end:new Date(1959,9,22),focusId:L.id,orbitalRegimes:[w.INNER_SYSTEM],missionFamily:is,status:{status:E.DECOMMISSIONED,details:"Spacecraft reentered Earth's atmosphere due to orbital decay sometime in 1960-1962"},thumbnail:"luna-3-thumb.jpeg",wiki:"https://en.wikipedia.org/wiki/Luna_3",visited:[{id:L.id,type:l.FLYBY,start:new Date("1959-10-06T14:16:00Z")}]}),al="Zond",ol=b({name:"Zond 5",organization:S.USSR,launchMass:5375,start:new Date("1968-09-14T21:42:11Z"),end:new Date("1968-09-21T16:08:00Z"),orbitalRegimes:[w.INNER_SYSTEM],status:{status:E.RETURNED,details:"Safely returned two Russian tortoises to Earth"},focusId:L.id,missionFamily:al,thumbnail:"zond-5-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/Zond_5",visited:[{id:L.id,type:l.FLYBY,start:new Date(1968,8,18)}]}),rl="Venera",ll=b({name:"Venera 7",organization:S.USSR,launchMass:1180,start:new Date("1970-08-17T05:38:22Z"),end:new Date("1970-12-15T06:00:00Z"),focusId:q.id,orbitalRegimes:[w.INNER_SYSTEM],missionFamily:rl,status:{status:E.DEFUNCT},thumbnail:"venera-7-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/Venera_7",color:q.style.fgColor,visited:[{id:q.id,type:l.LANDER,start:new Date("1970-12-15T06:00:00Z")}]}),cl=b({name:"Lunokhod 1",organization:S.USSR,launchMass:756,power:180,start:new Date("1970-11-10T14:44:01Z"),end:new Date("1971-09-14T13:05:00Z"),focusId:L.id,orbitalRegimes:[w.INNER_SYSTEM],status:{status:E.DEFUNCT,details:"Last contact on September 14, 1971"}
1,wiki:"https://en.wikipedia.org/wiki/Lunokhod_1",thumbnail:"lunokhod-1-thumb.jpg",visited:[{id:L.id,type:l.ROVER,start:new Date("1970-11-17T03:47:00Z"),end:new Date("1971-09-14T13:05:00Z")}]}),dl=b({name:"Mars 3",organization:S.USSR,launchMass:4650,start:new Date("1971-05-28T15:26:30Z"),end:new Date(1972,7,22),orbitalRegimes:[w.INNER_SYSTEM],focusId:I.id,status:{status:E.DEFUNCT,details:"Lander failed 110 seconds after landing"},thumbnail:"mars-3-thumb.jpg",wiki:"https://en.wikipedia.org/wiki/Mars_3",color:I.style.fgColor,visited:[{id:I.id,type:l.LANDER,start:new Date("1971-12-02T13:52:00Z")}]}),ns="Vega",ul=b({name:"Vega 1",organization:S.USSR,launchMass:4840,start:new Date("1984-12-15T09:16:24Z"),end:new Date(1987,0,30),focusId:Se.id,color:Se.style.fgColor,orbitalRegimes:[w.INNER_SYSTEM],missionFamily:ns,status:{status:E.DEFUNCT,details:"Drifting in a heliocentric orbit after losing contact on January 30, 1987"},thumbnail:"vega-1-thumb.png",wiki:"https://en.wikipedia.org/wiki/Vega_1",visited:[{id:q.id,type:l.LANDER,start:new Date("1985-06-11T03:02:54Z")},{id:Se.id,type:l.FLYBY,start:new Date(1986,2,6)}]}),ml=b({name:"Vega 2",organization:S.USSR,launchMass:4840,start:new Date("1984-12-21T09:13:52Z"),end:new Date(1987,2,24),focusId:Se.id,color:Se.style.fgColor,orbitalRegimes:[w.INNER_SYSTEM],missionFamily:ns,status:{status:E.DEFUNCT,details:"Drifting in a heliocentric orbit after losing contact on March 24, 1987"},wiki:"https://en.wikipedia.org/wiki/Vega_2",thumbnail:"vega-2-thumb.jpg",visited:[{id:q.id,type:l.LANDER,start:new Date(1985,5,15)},{id:Se.id,type:l.FLYBY,start:new Date(1986,2,9)}]}),hl=[nl,sl,ol,ll,cl,dl,ul,ml],be=[...Cr,...hl,...$r,...il,...Ho].sort((e,t)=>e.start.getTime()-t.start.getTime()),pl=ws((e,t)=>e.sort((i,s)=>{var a,o,r,d;return(((o=(a=i.visited.find(({id:g})=>g===t))==null?void 0:a.start)==null?void 0:o.getTime())??i.start.getTime())-(((d=(r=s.visited.find(({id:g})=>g===t))==null?void 0:r.start)==null?void 0:d.getTime())??s.start.getTime())}),be.reduce((e,t)=>(t.visited.forEach(i=>{e[i.id]=[...e[i.id]??[],t]}),e),{})),bi=be.reduce((e,t)=>(e[t.id]=t,e),{}),ss=["/:bodyId?","/regime/:regimeId","/spacecraft/:spacecraftId","/organization/:organizationId"];function as(e){if(e==null)return"/";const[t,i]=e.split("/",2);return t==="body"?`/${i}`:t==="regime"?`/regime/${i}`:t==="spacecraft"?`/spacecraft/${i}`:t==="organization"?`/organization/${i}`:"/"}function gl(){const e=window.location.pathname,t=ss.find(d=>ki(d,e));if(t==null)return null;const i=ki(t,e),{bodyId:s,regimeId:a,spacecraftId:o,organizationId:r}=(i==null?void 0:i.params)??{};return s!=null?Fe(s):a!=null?rn(a):o!=null?ln(o):r!=null?cn(r):null}[null,...Jn.map(({id:e})=>e),...be.map(({id:e})=>e),...Object.values(Le).map(({id:e})=>e),...Object.values(w)].map(as);const Ft={settings:{epoch:ja(),play:!0,speed:x.DAY,drawOrbit:!0,drawLabel:!0,center:gl(),hover:null,toggles:new Set([]),visibleTypes:new Set([p.STAR,p.PLANET,p.MOON,p.DWARF_PLANET,p.ASTEROID,p.TRANS_NEPTUNIAN_OBJECT]),visibleRegimes:new Set([]),bodies:Jn,isTouchDevice:!1},model:{time:0,fps:null,metersPerPx:1,vernalEquinox:[1,0,0]}},k=ys(e=>({...Ft,updateModel:t=>e(i=>({model:{...i.model,...t,vernalEquinox:i.model.vernalEquinox.some((s,a)=>Math.abs(s-t.vernalEquinox[a])>1e-5)?t.vernalEquinox:i.model.vernalEquinox}})),updateSettings:t=>e(i=>{const s=typeof t=="function"?t(i.settings):{...i.settings,...t},a=s.isTouchDevice?{...s,hover:null}:s;return fs(a,i.settings)?i:{settings:a}}),reset:()=>{const t={...Ft,settings:{...Ft.settings,center:null}};return e(t),t}}));function Ri(){const e=k(s=>s.updateSettings),t=Vi(),i=D.useMemo(()=>t==="ios"||t==="android",[t]);return D.useEffect(()=>{e({isTouchDevice:i})},[i]),i}const wl=10;function yl(e){const t=k(y=>y.settings),i=k(y=>y.updateSettings),s=Ri(),a=D.useRef(null),o=s?25:10;function r(y){const{left:u,top:f}=y.currentTarget.getBoundingClientRect();return[y.clientX-u,y.clientY-f]}function d(y){a.current={dragged:!1,initial:r(y)}}function g(){a.current=null}function c(y){var M,z;const u=a.current,[f,A]=r(y);if(u!=null){const[J,C]=u.initial,B=an([J-f,C-A]);a.current={...u,dragged:u.dragged||B>wl}}if(e==null||(M=a.current)!=null&&M.dragged)return;const v=e.findCloseBody([f,A],t,o);i({hover:((z=v==null?void 0:v.body)==null?void 0:z.id)??null})}function h(y){var A;const u=(A=a.current)==null?void 0:A.dragged;if(a.current=null,u||e==null)return;const f=e.findCloseBody(r(y),t,o);f!=null&&i({center:f.body.id})}return{onPointerDown:d,onPointerMove:c,onPointerLeave:g,onClick:h}}function ve(){const e=Xs(),t=Math.max(e.width,window.innerWidth);return D.useMemo(()=>({sm:fl(t),xs:os(t)}),[t])}function os(e){return e<580}function fl(e){return e<1080}const Al={id:w.INNER_SYSTEM,name:"Inner System",min:.2*N,max:2.2*N,roundness:.1},Tl={id:w.ASTEROID_BELT,name:"Asteroid Belt",min:2*N,max:3.2*N,roundness:2},Sl={id:w.OUTER_SYSTEM,name:"Outer System",min:3.2*N,max:32*N,roundness:.1},El={id:w.KUIPER_BELT,name:"Kuiper Belt",min:30*N,max:55*N,roundness:.1},bl={id:w.INNER_OORT_CLOUD,name:"Inner Oort Cloud",min:55*N,max:2e4*N,roundness:.001},Rl=[Al,Tl,Sl,El,bl],ze=Object.fromEntries(Rl.map(e=>[e.id,e]));var ae=(e=>(e.CELESTIAL_BODY="celestial-body",e.ORBITAL_REGIME="orbital-regime",e.SPACECRAFT="spacecraft",e.ORGANIZATION="organization",e))(ae||{});function xl(){const e=k(s=>s.settings.center),t=k(s=>s.settings.bodies),i=D.useMemo(()=>Dl(e,t),[e,JSON.stringify(t)]);return D.useEffect(()=>{const s=(i==null?void 0:i.name)!=null?`${i==null?void 0:i.name} ⢠`:"";document.title=`${s}Atlas of Space`},[i==null?void 0:i.name]),i}function Dl(e,t){if(un(e)){const i=t.find(s=>
1s.id===e);return i==null?void 0:{type:"celestial-body",item:i,color:i.style.fgColor,name:i.shortName??i.name}}else if(mn(e)){const i=ze[e];return{type:"orbital-regime",item:i,color:Mt,name:i.name}}else if(fi(e)){const i=bi[e];return{type:"spacecraft",item:i,color:i.color,name:i.name}}else if(za(e)){const i=Le[e];return{type:"organization",item:i,color:i.color,name:i.shortName}}}const X="Electrolize, sans-serif";function rs([e,t],[i,s],a=0){return e<-a||e>i+a||t<-a||t>s+a}function Nl(e){const t=window.devicePixelRatio??1;return[e.canvas.width/t,e.canvas.height/t]}function Il(e){const t="An Example String";e.save(),e.font=`12px ${X}`;const i=e.measureText(t);e.font="12px sans-serif";const s=e.measureText(t);return e.restore(),i.width!==s.width}function Ol(e,t,[i,s],[a,o]){const[d,g]=[i/2,s/2],[c,h,y,u]=[-d,d,-g,g],[f,A]=[a-d,o-g],v=A/f,[M,z,J,C]=[v*c,v*h,y/v,u/v];let B=[-1/0,-1/0],$={type:"left",offsetPx:[0,0]};y<=M&&M<=u&&f<0?(B=[c+24,M],$={type:"left",offsetPx:[-24/2,0]}):y<=z&&z<=u?(B=[h-24,z],$={type:"right",offsetPx:[24/2,0]}):c<=J&&J<=h&&A<0?(B=[J,y+24],$={type:"down",offsetPx:[0,-24/2]}):c<=C&&C<=h&&(B=[C,u-24],$={type:"up",offsetPx:[0,24/2]});const[W,Q]=[B[0]+d,B[1]+g],U=[W+$.offsetPx[0],Q+$.offsetPx[1]];jl(e,t,U,$.type)}function Ml(e,t,i,s,[a,o],[r,d],g,c=4){const h=window.devicePixelRatio,[y,u]=[e.canvas.width/h,e.canvas.height/h];e.save(),e.scale(1,-1),e.translate(0,-u);const f=u-o,A=d+c*2,v=r+A/2,M=Math.atan2(2,1),[z,J]=[g*Math.cos(M),g*Math.sin(M)],C=a+z+v+c>y-c,B=C?-1:1,$=f-J-A-c<c,W=$?-1:1,[Q,U]=[a+z*B,f-J*W],ce=[[v+c,0],[v+c,A],[A/2,A]];e.beginPath(),e.moveTo(Q,U),ce.forEach(([Ae,le])=>e.lineTo(Q+Ae*B,U-le*W)),e.closePath(),e.fillStyle="black",e.strokeStyle=s,e.fill(),e.stroke(),e.fillStyle=i,e.fillText(t,C?Q-v:Q+A/2,U-c+($?A:0)),e.restore();const[fe,V]=ce[1],ge=[Q+fe*B,U-V*W];return[[Q,U],ge]}function kl(e,t,[i,s],a){e.beginPath(),e.arc(i,s,a,0,Math.PI*2),e.fillStyle=t,e.closePath(),e.fill()}function jl(e,t,[i,s],a){const[o,r]=[2,6],d=a==="right"?[[i+o,s],[i-o,s-r],[i-o,s+r]]:a==="left"?[[i-o,s],[i+o,s-r],[i+o,s+r]]:a==="up"?[[i,s+o],[i+r,s-o],[i-r,s-o]]:[[i,s-o],[i+r,s+o],[i-r,s+o]];e.beginPath(),e.moveTo(...d[0]),d.reverse().forEach(g=>{e.lineTo(...g)}),e.closePath(),e.fillStyle="black",e.strokeStyle=t,e.fill(),e.stroke()}const Y=1e9,De=5,_i=16777200,Pi=ie(55),Je={up:[0,0,1],position:[0,-1e6*Math.cos(Pi),1e6*Math.sin(Pi)],lookAt:[0,0,0]},Cl={[p.STAR]:-1,[p.PLANET]:20,[p.MOON]:25,[p.SPACECRAFT]:50,[p.DWARF_PLANET]:75,[p.ASTEROID]:150,[p.COMET]:100,[p.TRANS_NEPTUNIAN_OBJECT]:100},Ll="https://atlasofspace.b-cdn.net";function qe(e){return`${Ll}/${e}`}class vl{constructor(t){R(this,"scene");R(this,"camera");R(this,"skybox");R(this,"renderPass");R(this,"eclipticTiltDegrees",60);R(this,"galacticCenterDegrees",267);R(this,"firmamentFilename","milky-way.webp");this.scene=new qi,this.camera=new ha(75,t.x/t.y,1,4e6),this.camera.up.set(...Je.up),this.camera.position.set(...Je.position),this.camera.lookAt(...Je.lookAt);const i=new ui(2e6,32,32),s=new mi().load(qe(this.firmamentFilename)),a=new Qe({map:s,side:pa,transparent:!0,opacity:.15});this.skybox=new et(i,a);const o=Math.PI/2+ie(this.eclipticTiltDegrees),r=ie(this.galacticCenterDegrees);this.skybox.setRotationFromEuler(new hi(o,0,r,"ZYX")),this.scene.add(this.skybox),this.renderPass=new Xi(this.scene,this.camera)}update(t,i){this.camera.position.copy(t),this.camera.lookAt(i)}resize(t,i){this.camera.aspect=t/i,this.camera.updateProjectionMatrix()}dispose(){this.skybox.geometry.dispose(),this.skybox.material.dispose(),this.scene.remove(this.skybox)}}class _l{constructor(){R(this,"times",[]);R(this,"maxAgeMillis",1e3)}update(){const t=performance.now();for(this.times.push(t);this.times.length>0&&this.times[0]<=t-this.maxAgeMillis;)this.times.shift()}fps(){if(this.times.length<2)return null;const t=this.times[this.times.length-1]-this.times[0];return Math.max((this.times.length-1)/t*1e3,1)}}class Pl{constructor(t,i,s,a){R(this,"scene");R(this,"group");R(this,"line");R(this,"bodyRadius");R(this,"rotationEuler");R(this,"segments");var g;this.scene=t,this.bodyRadius=s.radius,this.group=new St,this.group.position.copy(a).divideScalar(Y),this.scene.add(this.group),this.rotationEuler=new hi(ie(((g=s.elements.rotation)==null?void 0:g.axialTilt)??0),0,0),this.segments=[new oe,new oe,new oe,new oe];const o=new ga;o.setPositions(this.calculatePositions());const r=new Be(s.style.bgColor??s.style.fgColor),d=new pi({color:r,linewidth:1,resolution:i,depthTest:!0});d.depthTest=!0,this.line=new wa(o,d),this.line.visible=!1,this.line.renderOrder=1,this.group.add(this.line)}update(t,i){this.line.visible=i,i&&(this.group.position.copy(t).divideScalar(Y),this.line.geometry.setPositions(this.calculatePositions()))}dispose(){this.line.geometry.dispose(),this.line.material.dispose(),this.scene.remove(this.group)}calculatePositions(){return this.segments[0].set(0,0,this.bodyRadius*De).applyEuler(this.rotationEuler),this.segments[1].set(0,0,this.bodyRadius*De*1.5).applyEuler(this.rotationEuler),this.segments[2].set(0,0,-this.bodyRadius*De).applyEuler(this.rotationEuler),this.segments[3].set(0,0,-this.bodyRadius*De*1.5).applyEuler(this.rotationEuler),this.segments.flatMap(t=>[t.x,t.y,t.z]).map(t=>t/Y)}}class Bl{constructor(t,i,s,a,o){R(this,"scene");R(this,"group");R(this,"line");this.scene=t,this.group=new St,this.group.position.copy(o).divideScalar(Y),this.scene.add(this.group);const r=new Qi,{x:d,y:g,z:c}=o.clone().sub(a).divideScalar(Y);r.setPositions([0,0,0,d,g,c]);const h=new Be(s.style.fgColor),y=new pi({color:h,linewidth:1,resolution:i,depthTest:!0});this.line=new en(r,y),this.line.visible=!1,this.line.renderOrder=0,this.group.add(this.line)}update(t,i,s){if(this.line.visible=s,s){this.group.position.copy(i).divideScalar(Y);const a=[(((t==null?void 0:t.x)??0)-i.x)/Y,(((t==null?void 0:t.y)??0)-i.y)/Y,(((t==null?void 0:t.z)??0)-i.z)/Y];this.line.geometry.setPositions([0,0,0,...a])}}dispose(){this.line.geometry.dispose(),this.line.material.dispose(),this.scene.remove(this.group)}}class Yl{constructor(t,i,s){R(this,"scene");R(this,"mesh");this.scene=t;const a=new Qe({color:2236962,transparent:!0,side:It,depthWrite:!1,blending:nn,blendEquation:tn,blendSrc:Et,blendDst:Et}),o=new ui(i/Y);this.mesh=new et(o,a),this.mesh.position.copy(s).divideScalar(Y),this.scene.add(this.mesh)}update(t){this.mesh.position.copy(t).divideScalar(Y)}dispose(){this.mesh.geometry.dispose(),this.mesh.material.dispose(),this.scene.remove(this.mesh)}}class Fl{constructor(t,i,s,a){R(this,"influencedBy");R(this,"rotationPeriod");R(this,"position");R(this,"velocity");R(this,"acceleration");R(this,"rotation");R(this,"tmp");this.influencedBy=t,this.rotationPeriod=a==null?void 0:a.siderealPeriod,this.position=i.clone(),this.velocity=s.clone(),this.rotation=(a==null?void 0:a.initialRotation)??0,this.acceleration=new oe,this.tmp=new oe}increment(t,i){this.acceleration.set(0,0,0),t.forEach(s=>{this.tmp.copy(this.position).sub(s.position);const a=this.tmp.length();this.tmp.multiplyScalar(-rt*s.mass).divideScalar(a).divideScalar(a).divideScalar(a),this.acceleration.add(this.tmp)}),this.velocity.add(this.tmp.copy(this.acceleration).multiplyScalar(i)),this.position.add(this.tmp.copy(this.velocity).multiplyScalar(i)),this.rotationPeriod!=null&&(this.rotation=(this.rotation+360*i/this.rotationPeriod)%360)}getScreenPosition(t,i){this.tmp.copy(this.position).divideScalar(Y).project(t);
1const s=(this.tmp.x+1)*i.x/2,a=(1-this.tmp.y)*i.y/2;return[s,a]}}class Zl{constructor(t,i,s,a,o){R(this,"scene");R(this,"parentGroup");R(this,"bodyGroup");R(this,"ellipse");R(this,"ellipseHover");R(this,"face");R(this,"nPoints",3600);this.scene=t,this.parentGroup=new St,a!=null&&this.parentGroup.position.copy(a).divideScalar(Y),this.scene.add(this.parentGroup),this.bodyGroup=new St,this.bodyGroup.position.copy(o),a!=null&&this.bodyGroup.position.sub(a),this.bodyGroup.position.divideScalar(Y),this.parentGroup.add(this.bodyGroup);const{semiMajorAxis:r,eccentricity:d,longitudeAscending:g,argumentOfPeriapsis:c,inclination:h}=s.elements,y=r/Y,u=va(y,d),f=Math.sqrt(y**2-u**2),A=ie(c),v=ie(g),M=ie(h),z=-(Math.cos(A)*f),J=-(Math.sin(A)*f),C=new ya(z,J,y,u,0,Math.PI*2,!1,A),B=o.clone().sub(a??new oe).divideScalar(Y),$=new hi(M,0,v,"ZYX"),W=C.getPoints(this.nPoints).map(se=>new oe(se.x,se.y,0).applyEuler($).sub(B)),U=new fa(W,!0,"catmullrom",.5).getPoints(this.nPoints*2),ce=new Ci().setFromPoints(U),fe=new Aa({color:new Be(s.style.bgColor??s.style.fgColor)});this.ellipse=new Ta(ce,fe),this.ellipse.renderOrder=0,this.bodyGroup.add(this.ellipse);const V=new Be(s.style.fgColor),ge=new Qi().setFromPoints(U),Ae=new pi({color:V,linewidth:2,resolution:i,depthTest:!0});this.ellipseHover=new en(ge,Ae),this.ellipseHover.visible=!1,this.ellipseHover.renderOrder=0,this.bodyGroup.add(this.ellipseHover);const le=new Ci().setFromPoints(U),_e=Array(U.length-2).fill(null).flatMap((se,Pe)=>[0,Pe+1,Pe+2]);le.setIndex(_e);const it=new Qe({color:V,transparent:!0,opacity:.025,side:It,depthWrite:!0,depthTest:!0});this.face=new et(le,it),this.face.renderOrder=0,this.face.visible=!1,this.bodyGroup.add(this.face)}update(t,i){this.ellipse.visible=i,t!=null&&this.parentGroup.position.copy(t).divideScalar(Y)}setHover(t){this.ellipseHover.visible=t,this.face.visible=t}dispose(){this.ellipse.geometry.dispose(),this.ellipse.material.dispose(),this.ellipseHover.geometry.dispose(),this.ellipseHover.material.dispose(),this.face.geometry.dispose(),this.face.material.dispose(),this.scene.remove(this.parentGroup)}}class Ul{constructor(t,i,s,a){R(this,"scene");R(this,"ring");R(this,"nSegments",64);var y;this.scene=t;const[o,r]=[s.start/Y,s.end/Y],d=new Sa(o,r,this.nSegments),g=d.attributes.position,c=d.attributes.uv;for(let u=0;u<g.count;u++){const f=new gi(g.getX(u),g.getY(u)),A=(f.length()-o)/(r-o);c.setXY(u,(f.angle()+Math.PI)/(2*Math.PI),A)}let h;if(s.texture!=null){const u=new mi().load(qe(s.texture));h=new $t({map:u,side:It})}else h=new Qe({color:new Be(i.style.fgColor)});this.ring=new et(d,h),this.ring.rotation.x=ie(i.elements.inclination)+ie(((y=i.elements.rotation)==null?void 0:y.axialTilt)??0),this.ring.position.copy(a).divideScalar(Y),t.add(this.ring)}update(t,i){this.ring.position.copy(t).divideScalar(Y),this.ring.visible=i}setHover(t){t?this.ring.scale.set(De,De,1):this.ring.scale.set(1,1,1)}dispose(){this.ring.geometry.dispose(),this.ring.material.dispose(),this.scene.remove(this.ring)}}class zl{constructor(t,i,s){R(this,"scene");R(this,"body");R(this,"sphere");R(this,"rings");R(this,"spherePoints",144);R(this,"hasLoadedTexture",!1);this.scene=t,this.body=i;const a=s.clone().divideScalar(Y),o=new ui(i.radius/Y,this.spherePoints,this.spherePoints),r=new Be(this.body.style.fgColor),d=new Qe({color:r});this.sphere=new et(o,d);const g=ie(i.elements.inclination),c=i.elements.rotation!=null?ie(i.elements.rotation.axialTilt):0;this.sphere.rotation.x=Math.PI/2+g+c,this.sphere.position.set(a.x,a.y,a.z),this.sphere.renderOrder=1,t.add(this.sphere),this.rings=(i.rings??[]).map(h=>new Ul(t,i,h,s))}update(t,i,s){this.sphere.updateWorldMatrix(!0,!1),this.sphere.position.copy(t).divideScalar(Y),this.sphere.rotation.y=ie(i),this.sphere.visible=s,this.rings.forEach(a=>a.update(t,s))}setHover(t){t?this.sphere.scale.multiplyScalar(De):this.sphere.scale.divideScalar(De),this.rings.forEach(i=>i.setHover(t))}dispose(){this.sphere.geometry.dispose(),this.sphere.material.dispose(),this.scene.remove(this.sphere),this.rings.forEach(t=>t.dispose())}ensureTextureLoaded(){var a;const t=(a=this.body.assets)==null?void 0:a.texture;if(t==null||this.hasLoadedTexture)return;this.hasLoadedTexture=!0;const i=new mi().load(qe(t));this.body.type===p.STAR?this.sphere.material=new $t({map:i,emissive:new Be(this.body.style.fgColor),emissiveIntensity:.5,roughness:.2,metalness:.1}):this.sphere.material=new $t({map:i,metalness:0,roughness:1})}}class xt extends Fl{constructor(i,s,a,o,r,d,g){super(r.influencedBy,d,g,r.elements.rotation);R(this,"scene");R(this,"body");R(this,"resolution");R(this,"sphere");R(this,"ellipse");
1R(this,"radius");R(this,"axis",null);R(this,"hillSphere",null);R(this,"dotRadius");R(this,"labelBox",new Ea);R(this,"screenPoint",new gi);R(this,"labelSize",{});R(this,"visible",!1);R(this,"hovered",!1);R(this,"focused",!1);this.scene=i,this.body=r,this.resolution=s,this.visible=this.isVisible(a),this.ellipse=new Zl(i,s,r,(o==null?void 0:o.position)??null,d),this.radius=new Bl(i,s,r,(o==null?void 0:o.position)??new oe,d),this.sphere=new zl(i,r,d),this.dotRadius=xt.getDotRadius(r),r.elements.rotation!=null&&(this.axis=new Pl(i,s,r,this.position))}update(i,s){var o;this.visible=this.isVisible(i),this.focused=i.center===this.body.id,this.sphere.update(this.position,this.rotation,this.visible),this.ellipse.update((s==null?void 0:s.position)??null,this.visible&&i.drawOrbit);const a=i.hover===this.body.id;a!==this.hovered&&(this.sphere.setHover(a),this.ellipse.setHover(a),this.hovered=a),this.radius.update((s==null?void 0:s.position)??null,this.position,a),(o=this.axis)==null||o.update(this.position,a),this.updateHillSphere(i,s)}dispose(){var i,s;this.sphere.dispose(),this.ellipse.dispose(),this.radius.dispose(),(i=this.axis)==null||i.dispose(),(s=this.hillSphere)==null||s.dispose()}drawAnnotations(i,s,a,o,r=!0){if(!this.visible)return;const[d,g]=this.getScreenPosition(s,this.resolution),c=[d,this.resolution.y-g],h=this.body.style.fgColor,y=this.body.style.bgColor??this.body.style.fgColor;if(rs(c,[this.resolution.x,this.resolution.y])){os(window.innerWidth)||Ol(i,y,o,c);return}const u=this.body.radius/a,f=this.hovered?u*De:u;f<this.dotRadius&&this.shouldDrawDot(a)&&kl(i,h,c,this.dotRadius),1.5*f>=this.dotRadius&&this.sphere.ensureTextureLoaded();const A=this.labelFontSize(a);if(!r&&!this.hovered||A==null)return;const v=this.body.shortName??this.body.name;i.font=`${A??12}px ${X}`;let M=this.labelSize[i.font];if(M==null){const{width:$,actualBoundingBoxAscent:W}=i.measureText(v);Il(i)&&(this.labelSize[i.font]=[$,W]),M=[$,W]}const z=Math.max(f,1)+5,J=A*4/12,[C,B]=Ml(i,v,h,y,c,M,z,J);this.labelBox.min.x=Math.min(C[0],B[0]),this.labelBox.min.y=Math.min(C[1],B[1]),this.labelBox.max.x=Math.max(C[0],B[0]),this.labelBox.max.y=Math.max(C[1],B[1])}isNearCursor([i,s],a,o,r=10){const[d,g]=this.getScreenPosition(a,this.resolution),c=an([i-d,s-g]),h=c<r,y=o&&this.labelBox.containsPoint(this.screenPoint.set(i,s));return[y?-1/this.tmp.copy(this.position).divideScalar(Y).sub(a.position).length():c,h||y]}isVisible(i){const s=fi(i.center)?bi[i.center]:null;return i.hover===this.body.id||i.center===this.body.id||i.visibleTypes.has(this.body.type)||(s==null?void 0:s.focusId)==this.body.id}updateHillSphere(i,s){var o,r;const a=s!=null&&i.toggles.has(dn(this.body.id));if(a&&this.hillSphere==null){const{semiMajorAxis:d,eccentricity:g}=this.body.elements,c=on(d,g,s.body.mass,this.body.mass);this.hillSphere=new Yl(this.scene,c,this.position)}a||((o=this.hillSphere)==null||o.dispose(),this.hillSphere=null),(r=this.hillSphere)==null||r.update(this.position)}shouldDrawDot(i){const s=this.body.elements.semiMajorAxis*2/i,a=this.body.type===p.STAR;return this.focused||this.hovered||a||this.visible&&s>this.dotRadius}labelFontSize(i){const[s,a,o]=[8,12,14];if(this.hovered)return o;const r=Cl[this.body.type];if(this.focused||r<0)return a;const d=this.body.elements.semiMajorAxis*2/i;if(!this.visible&&!this.focused||d<r)return null;const g=(d-r)/(r*2),c=Math.min(s+(a-s)*g,a);return Number(c.toFixed(1))}static getDotRadius(i){switch(i.type){case p.STAR:return 3;case p.PLANET:return 2.5;case p.MOON:case p.DWARF_PLANET:return 2;default:return 1.5}}}class Hl{constructor(t,i,s){R(this,"regime");R(this,"scene");R(this,"mesh");this.regime=s,this.scene=t;const a=(s.max-s.min)/Y,o=new ba(s.min/Y+a/2,a/2,36,100),r=new Qe({color:1118481,transparent:!0,side:It,depthWrite:!1,blending:nn,blendEquation:tn,blendSrc:Et,blendDst:Et});this.mesh=new et(o,r),this.mesh.visible=this.isVisible(i),this.mesh.scale.z=s.roundness,t.add(this.mesh)}update(t){this.mesh.visible=this.isVisible(t)}dispose(){this.mesh.geometry.dispose(),this.mesh.material.dispose(),this.scene.remove(this.mesh)}isVisible(t){return t.hover===this.regime.id||t.center===this.regime.id||mn(this.regime.id)&&t.visibleRegimes.has(this.regime.id)}}class Gl{constructor(t,i){R(this,"scene");R(this,"resolution");R(this,"camera");R(this,"controls");R(this,"renderer");R(this,"composer");R(this,"lights");R(this,"firmament");R(this,"regimes");R(this,"fpsCounter");R(this,"time",0);R(this,"bodies");R(this,"tmp",new oe);R(this,"lockedCenter",null);R(this,"maxSafeDt",x.MINUTE*15);this.scene=new qi,this.resolution=new gi(t.clientWidth,t.clientHeight),this.fpsCounter=new _l;const s=new Ra(_i,1e5);s.position.set(0,0,0),this.lights=[new xa(_i,.5),s],this.lights.forEac
1h(g=>this.scene.add(g)),this.renderer=new Da({antialias:!0,logarithmicDepthBuffer:!0}),this.renderer.setSize(this.resolution.x,this.resolution.y),this.setupRenderer(t);const[a,o]=[this.resolution.x,this.resolution.y];this.camera=new Na(-a/2,a/2,o/2,-o/2,0,Y*10),this.setupCamera(),this.controls=new Ia(this.camera,this.renderer.domElement),this.controls.enableDamping=!0,this.controls.dampingFactor=.05,this.controls.screenSpacePanning=!0,this.controls.minZoom=.001,this.controls.maxZoom=1e4,this.controls.zoomToCursor=!0,this.controls.keyPanSpeed=10,this.controls.listenToKeyEvents(window),this.bodies=this.createBodies(i),this.firmament=new vl(this.resolution),this.regimes=Object.values(ze).map(g=>new Hl(this.scene,i,g));const r=new Xi(this.scene,this.camera);r.clear=!1;const d=new Oa(this.resolution,1,1,0);this.composer=new Ma(this.renderer),this.composer.addPass(this.firmament.renderPass),this.composer.addPass(r),this.composer.addPass(d)}resize(t){this.setupRenderer(t);const[i,s]=[t.clientWidth,t.clientHeight];this.composer.setSize(i,s),this.resolution.set(i,s),this.firmament.resize(i,s),this.camera.left=-i/2,this.camera.right=i/2,this.camera.top=s/2,this.camera.bottom=-s/2,this.camera.updateProjectionMatrix()}getMetersPerPixel(){const t=(this.camera.right-this.camera.left)/this.camera.zoom;return Y*t/this.resolution.width}getVernalEquinox(){return this.tmp.set(1,0,0).applyMatrix4(this.camera.matrixWorld).sub(this.camera.position).normalize().toArray()}getModelState(){return{time:this.time,fps:this.fpsCounter.fps(),metersPerPx:this.getMetersPerPixel(),vernalEquinox:this.getVernalEquinox()}}update(t,i){this.fpsCounter.update();const s=this.fpsCounter.fps();s!=null&&(t.play&&this.incrementKinematics(1/s*t.speed),this.updateCenter(t),this.controls.update(),this.firmament.update(this.camera.position,this.controls.target),this.regimes.forEach(a=>a.update(t)),Object.values(this.bodies).forEach(a=>{const o=a.body.elements.wrt!=null?this.bodies[a.body.elements.wrt]:void 0;a.update(t,o??null)}),this.composer.render(),this.drawAnnotations(i,t))}add(t,i){if(Object.keys(this.bodies).some(a=>a===i.id))return;const s=i.influencedBy.map(a=>this.bodies[a]).filter(Wt);this.bodies[i.id]=this.createBodyWithParents(t,s,i)}remove(t){const i=this.bodies[t];t==null||i==null||(delete this.bodies[t],i.dispose())}reset(t,i=!0){this.time=0,i&&(this.setupCamera(),this.controls.reset()),Object.values(this.bodies).forEach(s=>s.dispose()),this.bodies=this.createBodies(t)}dispose(){Object.values(this.bodies).forEach(t=>t.dispose()),this.lights.forEach(t=>t.dispose()),this.firmament.dispose(),this.regimes.forEach(t=>t.dispose()),this.renderer.dispose(),this.controls.stopListenToKeyEvents(),this.controls.dispose()}findCloseBody([t,i],s,a=10){var g;const o=this.getMetersPerPixel();let r,d=1/0;for(const c of Object.values(this.bodies).reverse()){const h=a+c.body.radius/o;if(!c.isVisible(s))continue;const[y,u]=c.getScreenPosition(this.camera,this.resolution);if(rs([y,u],[this.resolution.x,this.resolution.y],h))continue;const[f,A]=c.isNearCursor([t,i],this.camera,s.drawLabel,h),v=c.body.type===p.MOON,M=((g=r==null?void 0:r.body)==null?void 0:g.type)===p.MOON;A&&f<d&&(!v||M||r==null)&&(r=c,d=f)}return r}createBodies(t){const i={},s=[...t.bodies];for(;s.length>0;){const a=s.shift(),o=a.influencedBy.map(r=>i[r]);if(o.some(r=>r==null)){s.push(a);continue}i[a.id]=o.length>0?this.createBodyWithParents(t,o,a):new xt(this.scene,this.resolution,t,null,a,new oe,new oe)}return Object.fromEntries(Object.entries(i).reverse())}createBodyWithParents(t,i,s){var y;const a=i.find(u=>u.body.id===s.elements.wrt)??null,o=((y=a==null?void 0:a.body)==null?void 0:y.mass)??1,r=a!=null?Za(s.elements,o,t.epoch):s.elements,d=Fa(r,rt*o),g=i.reduce((u,{position:f})=>u.add(f),new oe(...d.position)),c=i.reduce((u,{velocity:f})=>u.add(f),new oe(...d.velocity)),h={...s,elements:r};return new xt(this.scene,this.resolution,t,a,h,g,c)}incrementKinematics(t){this.time+=t;const i=Math.ceil(Math.abs(t)/this.maxSafeDt),s=t/i;Array(i).fill(null).forEach(()=>this.incrementKinematicsSafe(s))}incrementKinematicsSafe(t){const i=As(({position:s,body:a})=>({position:s.clone(),mass:a.mass}),this.bodies);
1Object.values(this.bodies).forEach(s=>{const a=s.influencedBy.map(o=>i[o]);s.increment(a,t)})}drawAnnotations(t,i){t.clearRect(0,0,this.resolution.x,this.resolution.y);const s=this.getMetersPerPixel(),a=Nl(t);Object.values(this.bodies).map(o=>{const r=o.isVisible(i)?o.body.id===i.center?2:o.body.id===i.hover?1:this.tmp.copy(o.position).divideScalar(Y).sub(this.camera.position).length():-1;return[o,r]}).filter(([,o])=>o>0).sort(([,o],[,r])=>r-o).forEach(([o])=>{o.drawAnnotations(t,this.camera,s,a,i.drawLabel)})}updateCenter(t){var g;const i=fi(t.center)?(g=bi[t.center])==null?void 0:g.focusId:un(t.center)?t.center:void 0;if(this.controls.zoomToCursor=i==null,i==null){this.lockedCenter=null;return}const s=this.bodies[i];if(s==null)return;const a=this.controls.target.clone().multiplyScalar(Y).sub(s.position),o=a.length(),r=this.getMetersPerPixel(),d=Math.max(5*r,.1*o);i===this.lockedCenter||o<d?(this.controls.target.copy(s.position).divideScalar(Y),this.lockedCenter=i):this.controls.target.add(a.normalize().multiplyScalar(-d/Y))}setupCamera(){this.camera.clearViewOffset(),this.camera.up.set(...Je.up),this.camera.position.set(...Je.position),this.camera.lookAt(...Je.lookAt),this.camera.zoom=1,this.camera.updateProjectionMatrix()}setupRenderer(t){const[i,s]=[t.clientWidth,t.clientHeight];for(this.renderer.setSize(i,s),this.renderer.setPixelRatio(window.devicePixelRatio);t.firstChild!=null;)t.removeChild(t.firstChild);t.appendChild(this.renderer.domElement)}}function $l(){const e=k(u=>u.updateSettings),t=D.useRef(null),i=D.useRef(null),s=D.useRef(null),a=D.useCallback(()=>{const u=i.current;if(u==null||t.current==null)return;const f=u.getContext("2d"),A=window.devicePixelRatio??1;u.width=t.current.clientWidth*A,u.height=t.current.clientHeight*A,f.clearRect(0,0,f.canvas.width,f.canvas.height),f.scale(A,-A),f.translate(0,-u.height/A)},[i.current,t.current]),o=D.useCallback(u=>{if(!(t.current==null||i.current==null))return s.current==null&&(s.current=new Gl(t.current,u)),a(),window.addEventListener("resize",y),()=>{var f;window.removeEventListener("resize",y),s.current!=null&&((f=s.current)==null||f.dispose(),s.current=null)}},[i.current,t.current,s.current,a]),r=D.useCallback((u,f)=>{var A;(A=s.current)==null||A.update(u,f)},[s.current]),d=D.useCallback(u=>{e(f=>{var A;return(A=s.current)==null||A.add(f,u),{...f,bodies:[...f.bodies,u]}})},[s.current]),g=D.useCallback(u=>{var f;e(A=>({...A,bodies:A.bodies.filter(v=>v.id!==u)})),(f=s.current)==null||f.remove(u)},[s.current]),c=D.useCallback((u,f=!0)=>{var A;(A=s.current)==null||A.reset(u,f)},[s.current]),h=D.useCallback(u=>{e(f=>{const A={...f,epoch:u};return c(A,!1),A})},[c]),y=D.useCallback(()=>{var u;t.current!=null&&((u=s.current)==null||u.resize(t.current),a())},[t.current,s.current,a]);return{containerRef:t,canvasRef:i,modelRef:s,initialize:o,resize:y,update:r,addBody:d,removeBody:g,setEpoch:h,reset:c}}function Jl(){const{bodyId:e,regimeId:t,spacecraftId:i,organizationId:s}=Ts(),a=Ss(),o=k(g=>g.settings.center),r=k(g=>g.updateSettings),d=D.useMemo(()=>e!=null?Fe(e):t!=null?rn(t):i!=null?ln(i):s!=null?cn(s):null,[e,t,i,s]);D.useEffect(()=>{d!=o&&r({center:d})},[d]),D.useEffect(()=>{o!=d&&a(as(o))},[o])}const ue=18,Ve=4;function ls(){const e=Vi();return e==="macos"?"â":e==="windows"||e==="linux"?"â":void 0}function Vl(){return`Today's date is ${new Date().toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})}.`}`${Vl()}`;async function xi(e,t,i){var d;t(!0);const s=(d=e.body)==null?void 0:d.getReader();if(s==null)return"";let a="";const o=new TextDecoder;let r="";for(;;){const{done:g,value:c}=await s.read();if(g)break;r+=o.decode(c,{stream:!0});const h=r.split(` 2 3`);r=h.pop()||"";for(const y of h)if(y.startsWith("data: ")){const u=JSON.parse(y.slice(6));a=`${a}${u.content}`,i(a)}}return t(!1),a}function yt(e){return e.replace(/\//g,"-")}function cs({stream:e=!0,...t}){const i=D.useMemo(()=>Kl(t),[JSON.stringify(t)]),[s,a]=D.useState(!1),o=oi(),r=["GET","summary",i];return{...ri({queryKey:r,queryFn:async({signal:g})=>{a(!0);const c=new URLSearchParams({search:i,stream:String(e)}),h=await fetch(`/api/summary?${c}`,{signal:g});return await xi(h,a,u=>o.setQueryData(r,u))},staleTime:1/0}),isLoading:s}}function Kl(e){switch(e.type){case ae.CELESTIAL_BODY:switch(e.item.type){case p.MOON:return`${e.item.elements.wrt}'s moon ${e.item.name}`;default:return`the ${Oe(e.item.type).toLowerCase()} ${e.item.name}`}case ae.ORBITAL_REGIME:{const t=Object.values(ze).map(({name:i})=>i).join(", ");return`the heliocentric orbital regime '${e.item.name}' (of the set with ${t})`}case ae.SPACECRAFT:return`the ${Le[e.item.organization].shortName}
3 spacecraft ${e.item.name}`;case ae.ORGANIZATION:return`the space exploration organization ${e.item.name} (${e.item.shortName})`}}const Wl="_Card_6gp8h_1",_t={Card:Wl};function Ie({thumbnail:e,alt:t,search:i="",size:s,radius:a="md",lazy:o=!1}){const{ref:r,inViewport:d}=Qs(),[g,c]=D.useState(!1),h=e!=null?qe(e):`/api/thumbnail?${new URLSearchParams({search:i})}`,y=g?{}:{display:"none"},u=D.useRef(!o);D.useEffect(()=>{u.current=u.current||d},[d]);const f=n.jsx(Ki,{radius:a,src:h,alt:t,maw:s,mah:s,style:y,onLoad:()=>c(!0),onError:()=>c(!1)},h);return o?n.jsx(_,{ref:r,children:(d||u.current)&&f}):f}function Ye({body:e,size:t,radius:i,lazy:s}){var d;const{name:a,type:o}=e,r=`${a} ${o}`;return n.jsx(Ie,{thumbnail:(d=e.assets)==null?void 0:d.thumbnail,alt:e.name,search:r,size:t,radius:i,lazy:s})}const ql="_LoadingCursor_hpxpo_1",Xl={LoadingCursor:ql};function He(){return n.jsx(_,{component:"span",display:"inline-block",className:Xl.LoadingCursor,w:"0.6em",h:"1.2em",color:"var(--mantine-color-gray-light-color)",bg:"var(--mantine-color-gray-light-color)",children:"_"})}function Pt({body:e,onClick:t,onHover:i}){const{data:s,isLoading:a}=cs({item:e,type:ae.CELESTIAL_BODY,stream:!1});return n.jsxs(me,{className:_t.Card,withBorder:!0,p:"xs",onClick:t,onMouseEnter:i!=null?()=>i(!0):void 0,onMouseLeave:i!=null?()=>i(!1):void 0,children:[n.jsx(_,{ml:"xs",style:{float:"right"},children:n.jsx(Ye,{body:e,size:100})}),n.jsx(K,{order:6,children:e.name}),n.jsxs(G,{mt:4,inherit:!0,c:"dimmed",fz:"xs",children:[s,a&&n.jsx(He,{})]})]})}var Ke=(e=>(e.SUMMARY="summary",e.VISIT="visit",e.REGIME="regime",e.END="end",e))(Ke||{});function Di({stream:e=!0,...t}){const[i,s]=D.useState(!1),a=Ql(t),o=ec(t),r=oi(),d=["GET","visit",o];return{...ri({queryKey:d,queryFn:async({signal:c})=>{s(!0);const h=new URLSearchParams({search:a,blobId:o,stream:String(e)}),y=await fetch(`/api/visit?${h}`,{signal:c});return await xi(y,s,f=>r.setQueryData(d,f))},staleTime:1/0}),isLoading:i}}function Ql({spacecraft:e,...t}){const{name:i,organization:s,status:a,end:o}=e,r=Le[s].shortName;switch(t.type){case"summary":return`the ${r} spacecraft ${i}`;case"visit":{const{body:d,visit:g}=t,c=g.end!=null?`${g.start.getFullYear()}-${g.end.getFullYear()}`:g.start.getFullYear();return`the encounter (${g.type}) between the ${r} spacecraft ${i} and the ${Oe(d.type).toLowerCase()} ${d.name} in ${c}`}case"regime":return`the activities of the ${r} spacecraft ${i} in the heliocentric orbital regime '${t.regime.name}'`;case"end":{const d=o!=null?` on ${wi(o)}`:"",g=a.details!=null?` with the provided details '${a.details}'`:"";return`the end of the ${r} spacecraft ${i}'s mission${d}. 4 5Its status is '${a.status.toLowerCase()}'${g}.`}}}function ec({spacecraft:e,...t}){const i=`${t.type}-${yt(e.id)}`;switch(t.type){case"summary":case"end":return i;case"visit":return`${i}-${yt(t.body.id)}-${bt(t.visit.start)}`;case"regime":return`${i}-${yt(t.regime.id)}`}}function tc({spacecraft:e,body:t}){return D.useMemo(()=>(t==null?void 0:t.id)!=null?e.visited.find(({id:i})=>i===t.id):void 0,[JSON.stringify(e),t==null?void 0:t.id])}const ic="_LinkPill_119y6_1",mt={LinkPill:ic};function Ni({organization:e,disableClick:t=!1}){const i=k(r=>r.updateSettings),{id:s,thumbnail:a,shortName:o}=e;return n.jsx(Xe,{className:t?void 0:mt.LinkPill,onClick:t?void 0:()=>i({center:s,hover:null}),children:n.jsxs(j,{gap:8,wrap:"nowrap",children:[n.jsx(_,{w:14,children:n.jsx(Ie,{size:14,thumbnail:a,alt:e.shortName})}),o]})})}function Ii({spacecraft:e,body:t,regime:i,onClick:s,compact:a=!1}){var u;const o=tc({spacecraft:e,body:t}),r=t!=null&&o!=null?{type:Ke.VISIT,spacecraft:e,body:t,visit:o}:i!=null?{type:Ke.REGIME,spacecraft:e,regime:i}:{type:Ke.SUMMARY,spacecraft:e},{data:d,isLoading:g}=Di({...r,stream:!1}),c=o!=null&&o.start<new Date,h=(o==null?void 0:o.type)===l.ROVER||(o==null?void 0:o.type)===l.LANDER?c?"landed":"planning to land":(o==null?void 0:o.type)===l.ORBITER?c?"entered orbit":"planning to enter orbit":(o==null?void 0:o.type)===l.HELICOPTER?c?"started flying":"planning to start flying":(o==null?void 0:o.type)===l.IMPACTOR?c?"impacted":"planning to impact":c?"visited":"planning to visit",y=o!=null?`, ${h} in ${o.start.getFullYear()}`:"";return n.jsxs(me,{className:_t.Card,withBorder:!0,p:"xs",style:{overflow:"auto"},onClick:s,children:[e.thumbnail!=null&&n.jsx(_,{ml:"xs",style:{float:"right"},children:n.jsx(Ie,{thumbnail:e.thumbnail,alt:e.name,size:100})}),n.jsxs(j,{gap:4,align:"center",children:[n.jsxs(j,{gap:0,mr:8,children:[n.jsx(K,{order:6,mr:"xs",children:e.name}),o!=null&&n.jsx(G,{c:"dimmed",fz:"sm",fs:"italic",children:o.type})]}),!a&&n.jsx(Ni,{organization:Le[e.organization],disableClick:!0})]}
5),!a&&n.jsxs(G,{mt:4,fz:"xs",fs:"italic",children:["Launched in ",e.start.getFullYear(),y]}),(((u=e.crew)==null?void 0:u.length)??!1)&&!a&&n.jsxs(G,{mt:4,fz:"xs",children:["Crewed by ",((e==null?void 0:e.crew)??[]).join(", ")]}),n.jsxs(G,{mt:4,c:"dimmed",fz:"xs",children:[d,g&&n.jsx(He,{})]})]})}const ft={size:20,color:"var(--mantine-color-dimmed)"},nc=[{IconComponent:Hi,segments:[{content:"Scroll",highlight:!0},{content:" to zoom"}]},{IconComponent:xs,segments:[{content:"Click + drag",highlight:!0},{content:" to rotate"}]},{IconComponent:Ds,segments:[{content:"Right-click + drag",highlight:!0},{content:" to pan"}]},{IconComponent:Ns,segments:[{content:"Click",highlight:!0},{content:" on an object to learn more"}]}],sc=[{IconComponent:Hi,segments:[{content:"Pinch",highlight:!0},{content:" to zoom"}]},{IconComponent:Es,segments:[{content:"Drag",highlight:!0},{content:" to rotate"}]},{IconComponent:bs,segments:[{content:"Drag with two fingers",highlight:!0},{content:" to pan"}]},{IconComponent:Rs,segments:[{content:"Tap",highlight:!0},{content:" on an object to learn more"}]}];function ac({isOpen:e,onClose:t}){const i=k(h=>h.settings.bodies),s=k(h=>h.updateSettings),a=Ri(),{sm:o}=ve(),r=ls(),d=D.useMemo(()=>[...i,...be].sort(()=>Math.random()-.5).slice(0,3),[]);function g({id:h}){s({center:h}),t()}const c=d.map(h=>Ha(h)?n.jsx(Pt,{body:h,onClick:()=>g(h)},h.id):n.jsx(Ii,{spacecraft:h,onClick:()=>g(h),compact:!0},h.id));return n.jsx(ci,{size:"xl",opened:e,onClose:t,withCloseButton:!1,styles:{body:{padding:0},content:{border:"1px solid var(--mantine-color-gray-8)",borderRadius:"var(--mantine-radius-md)",overflow:"auto",backgroundColor:"black"}},children:n.jsxs(Z,{gap:0,fz:"sm",bg:"black",children:[n.jsxs(Z,{gap:0,pos:"sticky",top:0,bg:"black",style:{zIndex:10},children:[n.jsxs(j,{p:"md",justify:"space-between",align:"center",gap:"xs",children:[n.jsxs(j,{gap:"xs",children:[n.jsx(zi,{...ft}),n.jsx(K,{order:5,children:"Atlas of Space"})]}),n.jsx(Te,{onClick:t,children:n.jsx(li,{...ft})})]}),n.jsx(Gt,{})]}),n.jsxs(Z,{p:"md",gap:"md",children:[n.jsx(At,{segments:[{content:"Welcome to the Atlas of Space â an "},{content:"interactive visualization",highlight:!0},{content:" to explore the planets, moons, asteroids, and other objects in the Solar System."}]}),n.jsx(Wi,{fz:"sm",spacing:"xs",withPadding:!0,center:!0,children:(a?sc:nc).map(({IconComponent:h,segments:y},u)=>n.jsx(oc,{IconComponent:h,segments:y},u))}),n.jsx(At,{segments:[{content:"Use "},{content:"Search ",highlight:!0},{content:n.jsx(Ht,{size:14,style:{marginBottom:-2}}),highlight:!0},...a?[]:[{content:" or "},{content:n.jsx(Tt,{children:r})},{content:" + "},{content:n.jsx(Tt,{children:"k"})}],{content:" to jump to a specific planet."}]}),n.jsx(At,{segments:[{content:"Use the "},{content:"Settings ",highlight:!0},{content:n.jsx(Gi,{size:14,style:{marginBottom:-2}}),highlight:!0},{content:" menu to update display settings or click "},{content:"Help ",highlight:!0},{content:n.jsx($i,{size:14,style:{marginBottom:-2}}),highlight:!0},{content:" to open this menu."}]}),n.jsx(Nt,{variant:"light",color:"blue",rightSection:n.jsx(Is,{size:ft.size}),onClick:t,"data-autofocus":!0,children:"Get Started"}),o?n.jsx(Z,{gap:"xs",children:c}):n.jsx(ea,{cols:3,children:c})]}),n.jsx(Gt,{}),n.jsxs(j,{p:"md",gap:4,justify:"center",children:[n.jsxs(j,{gap:4,wrap:"nowrap",children:[n.jsx(Os,{size:ue,color:"var(--mantine-color-dimmed)"}),n.jsxs(G,{c:"dimmed",fz:"xs",children:["2024-",new Date().getFullYear()]})]}),n.jsx(ta,{href:"https://github.com/gordonhart/atlasof.space",children:n.jsxs(j,{gap:4,wrap:"nowrap",children:[n.jsx(Ms,{size:ue,color:"var(--mantine-color-dimmed)"}),n.jsx(G,{fz:"xs",c:"dimmed",fw:"bold",children:"@gordonhart/atlasof.space"}),n.jsx(Ji,{size:ue,color:"var(--mantine-color-dimmed)"})]})})]})]})})}function At({segments:e}){return n.jsx(_,{children:e.map(({content:t,highlight:i=!1},s)=>n.jsx(G,{span:!0,inherit:!0,c:i?void 0:"dimmed",children:t},s))})}function oc({IconComponent:e,segments:t}){return n.jsx(Wi.Item,{icon:n.jsx(e,{size:ft.size,color:"var(--mantine-color-blue-light-color)"}),children:n.jsx(At,{segments:t})})}function rc(){const e=k(d=>d.updateSettings),[t,i]=ia({key:"has-seen-help-modal",getInitialValueInEffect:!1}),[s,a]=di(!1);function o(){e({play:!1}),a.open()}function r(){e({play:!0}),a.close(),i("true")}return D.useEffect(()=>{t!=="true"&&o()},[t]),n.jsxs(n.Fragment,{children:[n.jsx(Ne,{position:"top",label:"Help",children:n.jsx(Te,{"aria-label":"Help",onClick:a.open,children:n.jsx($i,{size:ue})})}),n.jsx(ac,{isOpen:s,onClose:r})]})}const lc="_Action_1lo1s_1",pt={Action:lc},$e=24;function cc(){const e=k(c=>c.settings.bodies),t=k(c=>c.updateSettings),[i,s]=D.useState(""),a=ls(),o=D.useMemo(()=>e.filter(c=>i.length===0||dc(c,i)).map((c,h)=>n.jsx(de.Action,{label:c.name,className:pt.Action,ff:X,leftSection:n.jsx(_,{miw:$e,children:n.jsx(Ye,{body:c,size:$e,radius:"sm",lazy:!0})}),rightSection:n.jsx(G,{c:"dimmed",size:"xs",ff:X,children:Ai(c)}),onClick:()=>t(y=>({...y,center:c.id}))},`${c.name}-${h}`)),[i,JSON.stringify(e)]),r=D.useMemo(()=>be.filter(({name:c}
5)=>i.length===0||c.toLowerCase().includes(i.toLowerCase())).map(({id:c,name:h,organization:y,thumbnail:u},f)=>n.jsx(de.Action,{label:h,className:pt.Action,ff:X,leftSection:n.jsx(_,{miw:$e,children:n.jsx(Ie,{thumbnail:u,alt:h,size:$e,radius:"sm",lazy:!0})}),rightSection:n.jsxs(G,{c:"dimmed",size:"xs",ff:X,children:[y," Spacecraft"]}),onClick:()=>t(A=>({...A,center:c}))},`${h}-${f}`)),[i]),d=D.useMemo(()=>Object.values(Le).filter(({name:c,shortName:h})=>`${c} (${h})`.toLowerCase().includes(i.toLowerCase())).map(({id:c,shortName:h,thumbnail:y},u)=>n.jsx(de.Action,{label:h,className:pt.Action,ff:X,leftSection:n.jsx(_,{miw:$e,children:n.jsx(Ie,{thumbnail:y,alt:h,size:$e,radius:"sm",lazy:!0})}),rightSection:n.jsx(G,{c:"dimmed",size:"xs",ff:X,children:"Organization"}),onClick:()=>t(f=>({...f,center:c}))},`${c}-${u}`)),[i]),g=D.useMemo(()=>Object.values(ze).filter(({name:c})=>c.toLowerCase().includes(i.toLowerCase())).map(({id:c,name:h},y)=>n.jsx(de.Action,{label:h,className:pt.Action,ff:X,rightSection:n.jsx(G,{c:"dimmed",size:"xs",ff:X,children:"Orbital Regime"}),onClick:()=>t(u=>({...u,center:c}))},`${c}-${y}`)),[i]);return n.jsxs(n.Fragment,{children:[n.jsx(Ne,{position:"top",label:"Search",children:n.jsx(Te,{"aria-label":"Search",onClick:na.open,children:n.jsx(Ht,{size:ue})})}),n.jsx(de.Root,{radius:"md",query:i,onQueryChange:s,onSpotlightClose:()=>s(""),overlayProps:{blur:4,backgroundOpacity:0},transitionProps:{transition:"fade"},scrollable:!0,children:n.jsxs(_,{bg:"black",style:{overflowX:"hidden",overflowY:"auto",border:"1px solid var(--mantine-color-gray-8)",borderRadius:"var(--mantine-radius-md)"},children:[n.jsx(de.Search,{placeholder:"Enter name...",styles:{input:{fontFamily:X}},leftSection:n.jsx(Ht,{stroke:1.5}),rightSection:a!=null?n.jsxs(j,{gap:2,w:80,wrap:"nowrap",style:{flexShrink:0},children:[n.jsx(Tt,{children:a}),"+",n.jsx(Tt,{children:"k"})]}):void 0}),n.jsxs(de.ActionsList,{style:{overflow:"auto"},children:[o.length+r.length+d.length+g.length<1&&n.jsx(de.Empty,{ff:X,children:"Nothing found..."}),o.length>0&&n.jsxs(de.ActionsGroup,{ff:X,label:"Celestial Bodies",children:[n.jsx(_,{pb:"xs"}),o]}),r.length>0&&n.jsxs(de.ActionsGroup,{ff:X,label:"Spacecraft",children:[n.jsx(_,{pb:"xs"}),r]}),d.length>0&&n.jsxs(de.ActionsGroup,{ff:X,label:"Space Exploration Organizations",children:[n.jsx(_,{pb:"xs"}),d]}),g.length>0&&n.jsxs(de.ActionsGroup,{ff:X,label:"Orbital Regimes",children:[n.jsx(_,{pb:"xs"}),g]})]})]})})]})}function dc(e,t){return`${e.shortName} ${e.name} ${Ai(e)}`.toLowerCase().includes(t.toLowerCase())}function uc({reset:e}){const t=k(u=>u.settings.drawOrbit),i=k(u=>u.settings.drawLabel),s=k(u=>u.settings.visibleTypes),a=k(u=>u.updateSettings),[o,{open:r,close:d}]=di(!1);function g(u){const f=s.has(u)?new Set([...s].filter(A=>A!==u)):new Set([...s,u]);a({visibleTypes:f})}function c(){d(),e()}const h=n.jsx(zi,{color:"var(--mantine-color-cyan-light-color)",size:14}),y=n.jsx(js,{color:"var(--mantine-color-gray-6)",size:14});return n.jsxs(we,{position:"top-end",opened:o,onClose:d,closeOnItemClick:!1,children:[n.jsx(we.Target,{children:n.jsx(Ne,{position:"top",label:"Settings",disabled:o,children:n.jsx(Te,{"aria-label":"Settings",onClick:o?d:r,children:n.jsx(Gi,{size:ue})})})}),n.jsxs(we.Dropdown,{bg:"black",mah:"calc(90dvh - var(--mantine-spacing-xs))",style:{overflow:"auto"},children:[n.jsx(we.Label,{children:"General"}),n.jsx(we.Item,{onClick:()=>a(u=>({...u,drawOrbit:!u.drawOrbit})),children:n.jsxs(j,{gap:"xs",align:"center",children:[t?h:y,"Show Orbits"]})}),n.jsx(we.Item,{onClick:()=>a(u=>({...u,drawLabel:!u.drawLabel})),children:n.jsxs(j,{gap:"xs",align:"center",children:[i?h:y,"Show Labels"]})}),n.jsx(we.Divider,{}),n.jsx(we.Label,{children:"Celestial Body Types"}),yi.filter(u=>u!==p.SPACECRAFT).map(u=>n.jsx(we.Item,{onClick:()=>g(u),children:n.jsxs(j,{gap:"xs",align:"center",children:[s.has(u)?h:y,Oe(u)]})},u)),n.jsx(we.Divider,{}),n.jsx(we.Item,{onClick:c,children:n.jsxs(j,{gap:"xs",align:"center",children:[n.jsx(ks,{color:"var(--mantine-color-orange-light-color)",size:14}),"Reset"]})})]})]})}function mc({reset:e}){return n.jsxs(j,{gap:Ve,children:[n.jsx(uc,{reset:e}),n.jsx(rc,{}),n.jsx(cc,{})]})}function hc(){const e=k(o=>o.model.vernalEquinox),t=20,i=Number(Math.atan2(e[1],e[0]).toFixed(3)),s=6,a=t+s*2;return n.jsx(Ne,{offset:0,position:"bottom-end",label:n.jsxs(j,{gap:4,children:[n.jsx(G,{inherit:!0,children:"Vernal Equinox"}),n.jsx(Ls,{size:t})]}),children:n.jsx(j,{p:s,w:a,h:a,gap:Ve,justify:"center",align:"center",style:{borderRadius:a/2,backdropFilter:"blur(4px)",transform:`rotate(${i}rad)`,transformOrigin:"center"},children:n.jsx(Cs,{size:t})})})}function pc(){const e=k(a=>a.model.metersPerPx);let t,i,s;return e>.005*N?(i=Bi(e/N)*50,t=i*N,s="AU"):(t=Bi(e)*50,i=t/1e3,s="km"),n.jsx(me,{p:4,bg:"transparent",radius:"md",style:{backdropFilter:"blur(4px)"},children:n.jsxs(Z,{gap:4,align:"flex-end",children:[n.jsx(_,{w:t/e,h:1,style:{backgroundColor:"var(--mantine-color-gray-light-color)"}}
5),n.jsxs(G,{size:"xs",c:"dimmed",ff:X,children:[i.toLocaleString()," ",s]})]})})}function Bi(e){const t=Math.floor(Math.log10(e)),i=Math.pow(10,t),s=e<=i*2?2:e<=i*4?4:10;return i*s}function gc(){return n.jsxs(j,{gap:Ve,align:"flex-end",children:[n.jsx(pc,{}),n.jsx(hc,{})]})}const wc=new Date(1900,0,1),yc=new Date(2200,0,1),fc=D.memo(function({setEpoch:t}){const i=k(r=>Math.floor(r.model.time/x.DAY)),s=k(r=>r.settings.epoch),a=D.useRef(!1),o=D.useMemo(()=>{const r=Number(Jt(s)),d=new Date(r+i*x.DAY*1e3);return new Date(d.getFullYear(),d.getMonth(),d.getDate())},[i,s]);return n.jsxs(wt,{position:"bottom",keepMounted:!1,onExitTransitionEnd:()=>{a.current=!1},children:[n.jsx(wt.Target,{children:n.jsx(Nt,{ff:X,size:"compact-xs",color:"gray",variant:"subtle",children:bt(o)})}),n.jsx(wt.Dropdown,{mih:277,bg:"black",children:n.jsx(sa,{ff:X,size:"xs",yearLabelFormat:"YYYY",yearsListFormat:"YYYY",monthsListFormat:"MM (MMM)",monthLabelFormat:"YYYY-MM",minDate:wc,maxDate:yc,date:a.current?void 0:o,value:o,defaultDate:o,onClick:()=>{a.current=!0},onChange:r=>{r!=null&&t(Ot(sn(r),r))},weekendDays:[]})})]})}),Dt=[x.SECOND,x.MINUTE,x.HOUR,x.HOUR*6,x.HOUR*12,x.DAY,x.DAY*3,x.WEEK,x.MONTH,x.MONTH*3,x.MONTH*6,x.YEAR,x.YEAR*2,x.YEAR*3],si=Dt[Dt.length-1];function gt(e,t){return(t==="faster"?Dt:[...Dt].reverse()).find(s=>t==="faster"?s>e:s<e)??si}function Yi(e,t){const i=e<0;return t==="down"?i?-gt(Math.abs(e),"faster"):e<=1?-x.SECOND:gt(e,"slower"):i?e>=-1?x.SECOND:-gt(Math.abs(e),"slower"):gt(e,"faster")}const Ac=D.memo(function({setEpoch:t}){const i=k(c=>c.settings.speed),s=k(c=>c.settings.play),a=k(c=>c.updateSettings),[o,r]=D.useMemo(()=>Kt(i,!0),[i]),d=i<0&&i<=-si,g=i>0&&i>=si;return n.jsxs(Z,{gap:Ve,children:[n.jsx(me,{pr:Ve,py:2,radius:"md",children:n.jsxs(Z,{gap:2,align:"flex-start",fz:"xs",children:[n.jsx(fc,{setEpoch:t}),n.jsx(G,{ml:8,inherit:!0,c:"dimmed",ff:X,children:r==="second"&&o===1?"speed: realtime":`${Vt(o,r)} / second`})]})}),n.jsxs(j,{gap:Ve,align:"flex-end",children:[n.jsx(Ne,{disabled:d,position:"top-end",label:"Slow Down",children:n.jsx(Te,{"aria-label":"Slow Down",disabled:d,onClick:()=>a(({speed:c,...h})=>({...h,speed:Yi(c,"down")})),children:n.jsx(vs,{size:ue})})}),n.jsx(Ne,{position:"top",label:s?"Stop":"Start",children:n.jsx(Te,{"aria-label":s?"Stop":"Start",onClick:()=>a({play:!s}),children:s?n.jsx(_s,{size:ue}):n.jsx(Ps,{size:ue})})}),n.jsx(Ne,{disabled:g,position:"right",label:"Speed Up",children:n.jsx(Te,{"aria-label":"Speed Up",disabled:g,onClick:()=>a(({speed:c,...h})=>({...h,speed:Yi(c,"up")})),children:n.jsx(Bs,{size:ue})})})]})]})});function Tc({setEpoch:e,reset:t}){const{xs:i}=ve(),s=D.useMemo(()=>i?6:10,[i]);return n.jsxs(n.Fragment,{children:[n.jsx(_,{pos:"absolute",bottom:s,left:s,children:n.jsx(Ac,{setEpoch:e})}),n.jsx(_,{pos:"absolute",left:s,top:s,children:n.jsx(mc,{reset:t})}),n.jsx(_,{pos:"absolute",right:s,top:s,children:n.jsx(gc,{})})]})}function Sc({id:e,name:t,type:i,assets:s}){const[a,o]=D.useState(!1),r=oi(),d=(s==null?void 0:s.search)??`${t}+${i}`,g=`facts-${yt(e)}`,c=["GET","facts",d];return{...ri({queryKey:c,queryFn:async({signal:y})=>{o(!0);const u=await fetch(`/api/facts?${new URLSearchParams({search:d,blobId:g})}`,{signal:y});return await xi(u,o,A=>r.setQueryData(c,A))},staleTime:1/0}),isLoading:a}}function ne(){const{xs:e}=ve();return{px:e?"xs":"md",py:"md",pt:"lg"}}function ai({facts:e,isLoading:t=!1,keysWidth:i=190}){return n.jsx(st,{fz:"xs",horizontalSpacing:0,verticalSpacing:2,withRowBorders:!1,children:n.jsx(st.Tbody,{children:e.map(({label:s,value:a},o)=>n.jsxs(st.Tr,{style:{verticalAlign:"top"},children:[n.jsx(st.Td,{style:{width:i},children:n.jsx(G,{inherit:!0,c:"dimmed",children:s})}),n.jsx(st.Td,{pl:"xs",children:n.jsxs(G,{span:!0,inherit:!0,children:[a,t&&o+1===e.length&&a!==""&&n.jsx(He,{})]})})]},o))})})}function ot(e){const t=ne(),{data:i,isLoading:s}=cs(e);return n.jsx(_,{px:t.px,py:t.px,mih:`calc(61px + var(--mantine-spacing-${t.px}) * 2)`,children:n.jsxs(G,{size:"sm",children:[i,s&&n.jsx(He,{})]})})}function Bt({title:e,subTitle:t,color:i,onClose:s,onHover:a}){const o=ne(),{xs:r,sm:d}=ve();return n.jsxs(j,{pos:"sticky",top:0,bg:"black",px:o.px,py:d?8:"md",gap:"xs",justify:"space-between",wrap:"nowrap",style:{borderBottom:`1px solid ${i}`,zIndex:10},onMouseEnter:a!=null?()=>a(!0):void 0,onMouseLeave:a!=null?()=>a(!1):void 0,children:[n.jsx(Fi,{position:"tl",color:i}),n.jsx(Fi,{position:"br",color:i}),n.jsxs(j,{gap:0,align:"baseline",children:[n.jsx(K,{order:r?3:2,pr:"xs",children:e}),n.jsx(K,{order:6,c:"dimmed",children:t})]}),n.jsx(Te,{"aria-label":"Close",onClick:s,children:n.jsx(li,{size:ue})})]})}function Fi({color:e,position:t}){const s="calc(var(--mantine-spacing-md) / 4)",a=`1px solid ${e}`;return n.jsx(_,{pos:"absolute",w:8,h:8,top:t.startsWith("t")?s:void 0,left:t.endsWith("l")?s:void 0,right:t.endsWith("r")?s:void 0,bottom:t.startsWith("b")?s:void 0,style:{borderTop:t.startsWith("t")?a:void 0,borderLeft:t.endsWith("l")?a:void 0,borderRight:t.endsWith("r")?a:void 0,borderBottom:t.startsWith("b")?a:void 0}})}const Ec="_control_uyl9o_1",bc={control:Ec},Rc=["mp4"];function xc({assets:e}){const{xs:t}=ve(),i=D.useRef(Ys({delay:2e3})),s=3,a=16,o=178,r=e.map((d,g)=>Rc.some(c=>d.filename.endsWith(c))?n.jsx(Z,{align:"center",style:{borderRadius:"var(--mantine-radius-md)",overflow:"hidden"}
5,children:n.jsx("video",{src:qe(d.filename),width:o,height:o,controls:!1,autoPlay:!0,playsInline:!0,loop:!0})},g):n.jsx(Ki,{radius:"md",src:qe(d.filename),w:o,h:o},g));return n.jsxs(Z,{p:"md",pt:"lg",gap:"xs",children:[n.jsx(K,{order:5,children:"Gallery"}),t||e.length>3?n.jsx(ji,{classNames:bc,slidesToScroll:1,slideSize:o,plugins:[i.current],align:"start",slideGap:"md",dragFree:!0,loop:!0,children:r.map((d,g)=>n.jsx(ji.Slide,{children:d},g))}):n.jsx(j,{gap:a,maw:o*s+a*(s-1),children:r})]})}function Dc({body:e,parent:t}){const i=k(u=>u.settings.toggles),s=k(u=>u.updateSettings),{semiMajorAxis:a,eccentricity:o}=e.elements,r=on(a,o,t.mass,e.mass),[d,g]=hn(r),c=dn(e.id);function h(){s(({toggles:u,...f})=>{const A=u.has(c)?[...u].filter(v=>v!==c):[...u,c];return{...f,toggles:new Set(A)}})}const y=i.has(c);return n.jsxs(j,{gap:8,wrap:"nowrap",fw:"normal",fz:"xs",c:y?void 0:"var(--mantine-color-gray-light-color)",children:[(d>1e4?Number(d.toFixed(0)):d).toLocaleString()," ",g,n.jsx(aa,{size:"xs",radius:"sm",variant:"light",color:e.style.fgColor,checked:y,onChange:h})]})}const Nc=new Set([p.PLANET,p.MOON]);function Ic({body:e}){const t=k(g=>g.settings.bodies),i=k(g=>g.updateSettings),s=ne(),a=D.useMemo(()=>Object.fromEntries(t.map(g=>[g.name,g])),[JSON.stringify(t)]),o=D.useMemo(()=>t.filter(({type:g,influencedBy:c})=>{var h;return((h=c[c.length-1])==null?void 0:h.includes(e.id))&&Nc.has(g)}),[JSON.stringify(e),a]);if(o.length<1)return n.jsx(n.Fragment,{});const r=new Set(o.map(({type:g})=>g)),d=r.size!==1?"Satellites":Oe(r.values().next().value,!0);return n.jsxs(Z,{gap:"xs",...s,children:[n.jsxs(K,{order:5,children:["Major ",d]}),o.map((g,c)=>n.jsx(Pt,{body:g,onClick:()=>i({center:g.id,hover:null}),onHover:h=>i({hover:h?g.id:null})},`${g.name}-${c}`))]})}function Oi({regime:e}){const t=k(i=>i.updateSettings);return n.jsx(Xe,{className:mt.LinkPill,onClick:()=>t({center:e.id,hover:null}),onMouseEnter:()=>t({hover:e.id}),onMouseLeave:()=>t({hover:null}),children:n.jsxs(j,{gap:8,align:"center",wrap:"nowrap",children:[n.jsx(Fs,{size:14}),e.name]})})}const Zt=6;function Oc({body:e}){const t=k(r=>r.settings.bodies),i=k(r=>r.updateSettings),s=ne(),a=D.useMemo(()=>{const r=t.filter(({type:h})=>h===e.type),d=r.findIndex(({name:h})=>h===e.name);r.splice(d,1);const g=r.length-d,c=Math.max(0,d-Math.max(Zt/2,Zt-g));return r.slice(c,c+Zt)},[JSON.stringify(e),JSON.stringify(t)]),o=14;return a.length>0?n.jsxs(Z,{gap:"xs",...s,children:[n.jsxs(K,{order:5,children:["Other ",Oe(e.type,!0)]}),n.jsx(j,{gap:8,children:a.map((r,d)=>n.jsx(Xe,{className:mt.LinkPill,onClick:()=>i({center:r.id,hover:null}),onMouseEnter:()=>i({hover:r.id}),onMouseLeave:()=>i({hover:null}),children:n.jsxs(j,{gap:8,align:"center",wrap:"nowrap",children:[n.jsx(_,{w:o,children:n.jsx(Ye,{body:r,size:o})}),r.shortName??r.name]})},`${r.name}-${d}`))})]}):n.jsx(n.Fragment,{})}function ds({regime:e,title:t="Other Orbital Regimes"}){const i=ne(),s=D.useMemo(()=>Object.values(ze).filter(a=>a.id!==(e==null?void 0:e.id)),[JSON.stringify(e)]);return n.jsxs(Z,{...i,children:[n.jsx(K,{order:5,children:t}),n.jsx(j,{gap:8,children:s.map((a,o)=>n.jsx(Oi,{regime:a},`${a.id}-${o}`))})]})}function Mc({body:e}){const t=k(o=>o.settings.bodies),i=k(o=>o.updateSettings),s=ne(),a=D.useMemo(()=>t.find(({type:o,id:r})=>o!==p.STAR&&r===e.elements.wrt),[JSON.stringify(e),JSON.stringify(t)]);return a!=null?n.jsxs(Z,{gap:"xs",...s,children:[n.jsxs(K,{order:5,children:["Parent ",Oe(a.type)]}),n.jsx(Pt,{body:a,onClick:()=>i({center:a.id,hover:null}),onHover:o=>i({hover:o?a.id:null})})]}):n.jsx(n.Fragment,{})}const Ut=3;function us({spacecraft:e,onClick:t,onMouseEnter:i,onMouseLeave:s}){var r,d;const a=k(g=>g.settings.bodies),o=D.useMemo(()=>{const g=Object.fromEntries(a.map(c=>[c.id,c]));return e.visited.map(c=>[c,g[c.id]]).sort((c,h)=>Zi(...c)-Zi(...h)).map(([,c])=>c)},[JSON.stringify(e),JSON.stringify(a)]);return n.jsx(me,{className:_t.Card,withBorder:!0,p:8,onMouseEnter:i,onMouseLeave:s,onClick:t,style:{overflow:"auto"},children:n.jsxs(j,{gap:"xs",wrap:"nowrap",children:[n.jsx(_,{w:80,style:{flexShrink:0},children:n.jsx(Ie,{thumbnail:e.thumbnail,alt:e.name,size:80,radius:"xs"})}),n.jsxs(j,{gap:0,justify:"space-between",flex:1,children:[n.jsxs(Z,{gap:0,mr:"xs",children:[n.jsx(K,{order:6,mr:"xs",children:e.name}),n.jsxs(G,{fz:"xs",c:"dimmed",children:[e.start.getFullYear(),((r=e.end)==null?void 0:r.getFullYear())!==e.start.getFullYear()?` - ${((d=e.end)==null?void 0:d.getFullYear())??"
5Now"}`:""]})]}),n.jsxs(j,{gap:4,justify:"flex-end",flex:1,wrap:"nowrap",style:{flexShrink:0},children:[o.slice(0,Ut).map((g,c)=>n.jsx(_,{w:32,children:n.jsx(Ye,{body:g,size:32})},`${g.id}-${c}`)),o.length-Ut>0&&n.jsxs(G,{c:"dimmed",size:"xs",children:["+",o.length-Ut]})]})]})]})})}const kc={[l.HELICOPTER]:0,[l.ROVER]:0,[l.LANDER]:1,[l.IMPACTOR]:2,[l.ORBITER]:3,[l.FLYBY]:4,[l.GRAVITY_ASSIST]:5},jc={[p.STAR]:0,[p.PLANET]:1,[p.DWARF_PLANET]:2,[p.MOON]:3,[p.ASTEROID]:4,[p.COMET]:5,[p.TRANS_NEPTUNIAN_OBJECT]:6,[p.SPACECRAFT]:7};function Zi(e,t){const i=kc[e.type],s=jc[t.type];return+`${i}.${s}`}const Cc=110;function Mi({datedItems:e,activeIndex:t,end:i,accentColor:s,width:a=Cc}){const{ref:o,height:r}=oa(),d=D.useRef(null),g=D.useRef([]);return D.useEffect(()=>{if(d.current==null)return;const c=window.devicePixelRatio??1;d.current.width=a*c,d.current.height=r*c;const h=d.current.getContext("2d");h!=null&&h.scale(c,c)},[d.current,a,r]),D.useEffect(()=>{var v;const c=(v=d.current)==null?void 0:v.getContext("2d");if(o.current==null||c==null)return;const y=o.current.getBoundingClientRect().top,f=g.current.map((M,z)=>{const{height:J,top:C}=M.getBoundingClientRect(),[B]=e[z];return{height:J,top:C-y,date:B,hover:t===z}}).sort((M,z)=>M.date.getTime()-z.date.getTime()),A=new Date(Math.min(...e.map(([M])=>M.getTime())));Lc(c,f,s,A,i)},[e,r,t,i]),n.jsxs(j,{gap:0,wrap:"nowrap",flex:1,align:"flex-start",children:[n.jsx(_,{w:a,h:"100%",style:{flexShrink:0},children:n.jsx("canvas",{ref:d,style:{height:"100%",width:a}})}),n.jsx(Z,{ref:o,gap:"xs",flex:1,children:e.map(([,c],h)=>n.jsx(_,{ref:y=>{y!=null&&(g.current[h]=y)},children:c},`item-${h}`))})]})}function Lc(e,t,i,s,a){const o=s.getTime();let r=Math.max(...t.map(({date:V})=>V.getTime()),(a==null?void 0:a.getTime())??Date.now());o===r&&(r=r+x.DAY);const d=r-o,g=window.devicePixelRatio||1,c=6,h=e.canvas.width/g,y=e.canvas.height/g,u=a==null,f=d/(y-c*(u?4:2)),A="#828282";e.font=`12px ${X}`;const M=[...new Set(t.map(({date:V})=>V.getFullYear().toString()))].map(V=>e.measureText(V)),z=Math.max(...M.map(({width:V})=>V)),J=Math.max(...M.map(({actualBoundingBoxAscent:V})=>V)),C=c*2+1+z;e.lineWidth=1,e.strokeStyle=A,e.clearRect(0,0,h,y),e.moveTo(C,0),e.lineTo(C,y),e.stroke();const B=t.length<6?t.length:Math.ceil(t.length/2),$=20,W=(h-2*$-C)/Math.max(B-1,1),Q=new Set;let U=-1/0;function ce({top:V,height:ge,date:Ae,hover:le},_e){const se=(Ae.getTime()-o)/f+c,Pe=t.length<6?t.length-_e-1:Math.max(Math.min(_e,2*B-_e-1-t.length%2),0),je=$+Pe*W,Re=V+ge/2,nt=se<Re,ht=Math.abs(Re-se)<2*c?1:2;e.beginPath(),e.strokeStyle=le?i:A,e.lineWidth=le?2:1,e.fillStyle=le?i:"#000000",e.moveTo(C,se),e.lineTo(C+je-c,se),ht===1?e.lineTo(C+je+Math.abs(Re-se),Re):(e.lineTo(C+je,se+(nt?c:-c)),e.lineTo(C+je,Re+(nt?-c:c)),e.lineTo(C+je+c,Re)),e.lineTo(h,Re),e.stroke(),e.closePath(),e.strokeStyle=i,vc(e,[C,se],c),e.fillStyle=le?i:A;const Ge=Ae.getFullYear().toString();if(!Q.has(Ge)){const{width:xe}=e.measureText(Ge);U=Math.max(se+J/2,U+J+2),e.fillText(Ge,C-xe-c*2,U),Q.add(Ge)}}function fe(){e.fillStyle=A,e.beginPath(),e.moveTo(C,y),e.lineTo(C-c/Math.sqrt(2),y-c),e.lineTo(C+c/Math.sqrt(2),y-c),e.lineTo(C,y),e.fill(),e.closePath()}t.forEach((V,ge)=>ce(V,ge)),u&&fe(),t.filter(({hover:V})=>V).forEach(V=>{const ge=t.findIndex(({top:Ae,date:le})=>Ae===V.top&&le===V.date);ce(V,ge)})}function vc(e,[t,i],s){e.beginPath(),e.moveTo(t,i+s),e.lineTo(t+s,i),e.lineTo(t,i-s),e.lineTo(t-s,i),e.lineTo(t,i+s),e.fill(),e.stroke(),e.closePath()}function ms({spacecraft:e,body:t,regime:i,title:s="Spacecraft Visits",compact:a=!1}){var h;const o=k(y=>y.updateSettings),r=ne(),[d,g]=D.useState(),c=D.useMemo(()=>e.map((y,u)=>{var f;return[(t!=null?(f=y.visited.find(({id:A})=>A===t.id))==null?void 0:f.start:null)??y.start,n.jsx(_,{onMouseEnter:()=>g(u),onMouseLeave:()=>g(void 0),children:a?n.jsx(us,{spacecraft:y,onClick:()=>o({center:y.id,hover:null})}):n.jsx(Ii,{spacecraft:y,body:t,regime:i,onClick:()=>o({center:y.id,hover:null})})},`${y.name}-${u}`)]}),[JSON.stringify(e),JSON.stringify(t),JSON.stringify(i)]);return e.length>0?n.jsxs(Z,{gap:"xs",...r,children:[n.jsx(K,{order:5,children:s}),n.jsx(Mi,{datedItems:c,activeIndex:d,accentColor:((h=t==null?void 0:t.style)==null?void 0:h.fgColor)??Si})]}):n.jsx(n.Fragment,{})}function hs({url:e}){return n.jsx(ra,{component:"a",href:e,target:"_blank",children:n.jsx(Xe,{className:mt.LinkPill,children:n.jsxs(j,{gap:4,wrap:"nowrap",children:[n.jsx(Zs,{size:14}),"Wikipedia",n.jsx(Ji,{size:14})]})})})}function _c({body:e}){const t=k(xe=>xe.settings.bodies),i=k(xe=>xe.updateSettings),{id:s,name:a,type:o,mass:r,radius:d,elements:g,orbitalRegime:c,assets:h,facts:y,style:u}=e,{wrt:f,semiMajorAxis:A,eccentricity:v,inclination:M,longitudeAscending:z,argumentOfPeriapsis:J,rotation:C}=g,{data:B,isLoading:$}=Sc(e),W=ne(),{xs:Q}=ve(),U=t.find(({id:xe})=>xe===f),ce=La(A,(U==null?void 0:U.mass)??1),[fe,V]=Kt(ce),[ge,Ae]=hn(A),[le,_e]=Kt(Math.abs((C==null?void 0:C.siderealPeriod)??0)),it=c!=null?n.jsx(Oi,{regime:ze[c]}):void 0,se=(h==null?void 0:h.wiki)!=null?n.jsx(hs,{url:h.wiki}
5):void 0,Pe=(Pa(r,d)/Ga).toLocaleString(),je=U!=null&&U.type===p.STAR?n.jsx(Dc,{body:e,parent:U}):null,Re=[...it!=null?[{label:"orbital regime",value:it}]:[],...se!=null?[{label:"learn more",value:se}]:[],{label:"mass",value:`${r.toExponential(4)} kg`},{label:"radius",value:`${(d/1e3).toLocaleString()} km`},...je!=null?[{label:"hill radius",value:je}]:[],...o!==p.STAR?[{label:"semi-major axis",value:`${ge.toLocaleString()} ${Ae}`},{label:"eccentricity",value:v.toLocaleString()},{label:"inclination",value:`${M.toLocaleString()}º`},{label:"longitude of the ascending node",value:`${z.toLocaleString()}º`},{label:"argument of periapsis",value:`${J.toLocaleString()}º`}]:[],...U!=null?[{label:"orbital period",value:Vt(fe,V)}]:[],...C!=null?[{label:"sidereal rotation period",value:`${Vt(le,_e)}${C.siderealPeriod<0?" (retrograde)":""}`},{label:"axial tilt",value:`${C.axialTilt.toLocaleString()}º`}]:[],...Number(Pe)>0?[{label:"surface gravity",value:`${Pe} g`}]:[],...y??[]],nt=Pc(B),ht=(h==null?void 0:h.gallery)??[],Ge=pl[s]??[];return n.jsxs(Z,{fz:"xs",gap:0,h:"100%",style:{overflow:"auto"},flex:1,children:[n.jsx(Bt,{title:a,subTitle:Ai(e),color:u.fgColor,onClose:()=>i({center:null}),onHover:xe=>i({hover:xe?s:null})}),Q?n.jsxs(j,{gap:0,justify:"space-between",align:"flex-start",wrap:"nowrap",w:"100%",children:[n.jsx(ot,{item:e,type:ae.CELESTIAL_BODY}),n.jsx(_,{pt:W.px,pr:W.px,style:{flexShrink:0},children:n.jsx(Ye,{body:e,size:160},a)})]}):n.jsx(ot,{item:e,type:ae.CELESTIAL_BODY}),n.jsxs(Z,{gap:2,flex:1,children:[n.jsxs(j,{pt:W.pt,px:W.px,gap:"xs",align:"flex-start",justify:"space-between",wrap:"nowrap",children:[n.jsxs(Z,{gap:"xs",children:[n.jsx(K,{order:5,children:"Key Facts"}),n.jsx(ai,{facts:Re})]}),!Q&&n.jsx(_,{style:{flexShrink:1},children:n.jsx(Ye,{body:e,size:220},a)})]}),n.jsx(_,{px:W.px,children:$&&nt.length===0?n.jsx(He,{}):n.jsx(ai,{facts:nt,isLoading:$})})]}),n.jsxs(_,{pt:"md",style:{justifySelf:"flex-end"},children:[ht.length>0&&n.jsx(xc,{assets:ht}),n.jsx(Ic,{body:e}),n.jsx(Mc,{body:e}),n.jsx(ms,{spacecraft:Ge,body:e}),n.jsx(Oc,{body:e}),o===p.STAR&&n.jsx(ds,{title:"Orbital Regimes"})]})]})}function Pc(e){if(e==null)return[];const t=[],i=e.split(` 6`).map(o=>o.trim()).filter(o=>o!=="");let s=null,a=[];for(const o of i)if(o.startsWith("- **")){s!=null&&(t.push({label:s.toLowerCase(),value:a.filter(d=>d!=="").join(", ").replace(/\.$/,"")}),s=null);const r=o.match(/- \*\*(.*?)\*\*:(.*)/);if(r!=null){s=r[1];const d=r[2].trim();a=d!==""?[d]:[]}}else o.startsWith("-")&&a.push(o.replace(/^-/,"").trim());return s!=null&&t.push({label:s.toLowerCase(),value:a.filter(o=>o!=="").join(", ").replace(/\.$/,"")}),t}function Bc(e){return Us({queries:e.map(t=>({queryKey:["GET","sbdb",t],queryFn:()=>Yc(t),staleTime:1/0}))})}async function Yc(e){var c,h,y,u,f,A,v;const t=new URLSearchParams({sstr:e}),s=await(await fetch(`/api/sbdb?${t}`)).json();if(Ua(s))return null;const{object:a,orbit:o,phys_par:r}=s,{elements:d}=o,g=Number(((c=r.find(({name:M})=>M==="diameter"))==null?void 0:c.value)??0)/2*1e3;return T({type:p.ASTEROID,name:e,shortName:a.shortname,influencedBy:[m.id],orbitalRegime:w.ASTEROID_BELT,elements:{wrt:m.id,source:ye,epoch:O(`JD${o.epoch}`),eccentricity:Number((h=d.find(({name:M})=>M==="e"))==null?void 0:h.value),semiMajorAxis:Number((y=d.find(({name:M})=>M==="a"))==null?void 0:y.value)*N,inclination:Number((u=d.find(({name:M})=>M==="i"))==null?void 0:u.value),longitudeAscending:Number((f=d.find(({name:M})=>M==="om"))==null?void 0:f.value),argumentOfPeriapsis:Number((A=d.find(({name:M})=>M==="w"))==null?void 0:A.value),meanAnomaly:Number((v=d.find(({name:M})=>M==="ma"))==null?void 0:v.value)},mass:pe(g),radius:g})}const Fc=["1 Ceres","2 Pallas","3 Juno","4 Vesta","5 Astraea","6 Hebe","7 Iris","8 Flora","9 Metis","10 Hygiea","11 Parthenope","12 Victoria","13 Egeria","14 Irene","15 Eunomia","16 Psyche","17 Thetis","18 Melpomene","19 Fortuna","20 Massalia","21 Lutetia","22 Kalliope","23 Thalia","24 Themis","25 Phocaea","26 Proserpina","27 Euterpe","28 Bellona","29 Amphitrite","30 Urania","31 Euphrosyne","32 Pomona","33 Polyhymnia","34 Circe","35 Leukothea","36 Atalante","37 Fides","38 Leda","39 Laetitia","40 Harmonia","41 Daphne","42 Isis","43 Ariadne","44 Nysa","45 Eugenia","46 Hestia","47 Aglaja","48 Doris","49 Pales","50 Virginia","51 Nemausa","52 Europa","53 Kalypso","54 Alexandra","55 Pandora","56 Melete","57 Mnemosyne","58 Concordia","59 Elpis","60 Echo","61 Danae","62 Erato","63 Ausonia","64 Angelina","65 Cybele","66 Maja","67 Asia","68 Leto","69 Hesperi
6a","70 Panopaea","71 Niobe","72 Feronia","73 Klytia","74 Galatea","75 Eurydike","76 Freia","77 Frigga","78 Diana","79 Eurynome","80 Sappho","81 Terpsichore","82 Alkmene","83 Beatrix","84 Klio","85 Io","86 Semele","87 Sylvia","88 Thisbe","89 Julia","90 Antiope","91 Aegina","92 Undina","93 Minerva","94 Aurora","95 Arethusa","96 Aegle","97 Klotho","98 Ianthe","99 Dike","100 Hekate","101 Helena","102 Miriam","103 Hera","104 Klymene","105 Artemis","106 Dione","107 Camilla","108 Hecuba","109 Felicitas","110 Lydia","111 Ate","112 Iphigenia","113 Amalthea","114 Kassandra","115 Thyra","116 Sirona","117 Lomia","118 Peitho","119 Althaea","120 Lachesis","121 Hermione","122 Gerda","123 Brunhild","124 Alkeste","125 Liberatrix","126 Velleda","127 Johanna","128 Nemesis","129 Antigone","130 Elektra","131 Vala","132 Aethra","133 Cyrene","134 Sophrosyne","135 Hertha","136 Austria","137 Meliboea","138 Tolosa","139 Juewa","140 Siwa","141 Lumen","142 Polana","143 Adria","144 Vibilia","145 Adeona","146 Lucina","147 Protogeneia","148 Gallia","149 Medusa","150 Nuwa","151 Abundantia","152 Atala","153 Hilda","154 Bertha","155 Scylla","156 Xanthippe","157 Dejanira","158 Koronis","159 Aemilia","160 Una","161 Athor","162 Laurentia","163 Erigone","164 Eva","165 Loreley","166 Rhodope","167 Urda","168 Sibylla","169 Zelia","170 Maria","171 Ophelia","172 Baucis","173 Ino","174 Phaedra","175 Andromache","176 Iduna","177 Irma","178 Belisana","179 Klytaemnestra","180 Garumna","181 Eucharis","182 Elsa","183 Istria","184 Dejopeja","185 Eunike","186 Celuta","187 Lamberta","188 Menippe","189 Phthia","190 Ismene","191 Kolga","192 Nausikaa","193 Ambrosia","194 Prokne","195 Eurykleia","196 Philomela","197 Arete","198 Ampella","199 Byblis","200 Dynamene","201 Penelope","202 Chryseis","203 Pompeja","204 Kallisto","205 Martha","206 Hersilia","207 Hedda","208 Lacrimosa","209 Dido","210 Isabella","211 Isolda","212 Medea","213 Lilaea","214 Aschera","215 Oenone","216 Kleopatra","217 Eudora","218 Bianca","219 Thusnelda","220 Stephania","221 Eos","222 Lucia","223 Rosa","224 Oceana","225 Henrietta","226 Weringia","227 Philosophia","228 Agathe","229 Adelinda","230 Athamantis","231 Vindobona","232 Russia","233 Asterope","234 Barbara","235 Carolina","236 Honoria","237 Coelestina","238 Hypatia","239 Adrastea","240 Vanadis","241 Germania","242 Kriemhild","243 Ida","244 Sita","245 Vera","246 Asporina","247 Eukrate","248 Lameia","249 Ilse","250 Bettina","251 Sophia","252 Clementina","253 Mathilde","254 Augusta","255 Oppavia","256 Walpurga","257 Silesia","258 Tyche","259 Aletheia","260 Huberta","261 Prymno","262 Valda","263 Dresda","264 Libussa","265 Anna","266 Aline","267 Tirza","268 Adorea","269 Justitia","270 Anahita","271 Penthesilea","272 Antonia","273 Atropos","274 Philagoria","275 Sapientia","276 Adelheid","277 Elvira","278 Paulina","279 Thule","280 Philia","281 Lucretia","282 Clorinde","283 Emma","284 Amalia","285 Regina","286 Iclea","287 Nephthys","288 Glauke","289 Nenetta","290 Bruna","291 Alice","292 Ludovica","293 Brasilia","294 Felicia","295 Theresia","296 Phaetusa","297 Caecilia","298 Baptistina","299 Thora","300 Geraldina","301 Bavaria","302 Clarissa","303 Josephina","304 Olga","305 Gordonia","306 Unitas","307 Nike","308 Polyxo","309 Fraternitas","310 Margarita","311 Claudia","312 Pierretta","313 Chaldaea","314 Rosalia","315 Constantia","316 Goberta","317 Roxane","318 Magdalena","319 Leona","320 Katharina","321 Florentina","322 Phaeo","323 Brucia","324 Bamberga","325 Heidelberga","326 Tamara","327 Columbia","328 Gudrun","329 Svea","330 Adalberta","331 Etheridgea","332 Siri","333 Badenia","334 Chicago","335 Roberta","336 Lacadiera","337 Devosa","338 Budrosa","339 Dorothea","340 Eduarda","341 California","342 Endymion","343 Ostara","344 Desiderata","345 Tercidina","346 Hermentaria","347 Pariana","348 May","349 Dembowska","350 Ornamenta","351 Yrsa","352 Gisela","353 Ruperto-Carola","354 Eleonora","355 Gabriella","356 Liguria","357 Ninina","358 Apollonia","359 Georgia","360 Carlova","361 Bononia","362 Havnia","363 Padua","364 Isara","365 Corduba","366 Vincentina","367 Amicitia","368 Haidea","369 Aeria","370 Modestia","371 Bohemia","372 Palma","373 Melusina","374 Burgundia","375 Ursula","376 Geometri
6a","377 Campania","378 Holmia","379 Huenna","380 Fiducia","381 Myrrha","382 Dodona","383 Janina","384 Burdigala","385 Ilmatar","386 Siegena","387 Aquitania","388 Charybdis","389 Industria","390 Alma","391 Ingeborg","392 Wilhelmina","393 Lampetia","394 Arduina","395 Delia","396 Aeolia","397 Vienna","398 Admete","399 Persephone","400 Ducrosa","401 Ottilia","402 Chloe","403 Cyane","404 Arsinoe","405 Thia","406 Erna","407 Arachne","408 Fama","409 Aspasia","410 Chloris","411 Xanthe","412 Elisabetha","413 Edburga","414 Liriope","415 Palatia","416 Vaticana","417 Suevia","418 Alemannia","419 Aurelia","420 Bertholda","421 Zahringia","422 Berolina","423 Diotima","424 Gratia","425 Cornelia","426 Hippo","427 Galene","428 Monachia","429 Lotis","430 Hybris","431 Nephele","432 Pythia","433 Eros","434 Hungaria","435 Ella","436 Patricia","437 Rhodia","438 Zeuxo","439 Ohio","440 Theodora","441 Bathilde","442 Eichsfeldia","443 Photographica","444 Gyptis","445 Edna","446 Aeternitas","447 Valentine","448 Natalie","449 Hamburga","450 Brigitta","451 Patientia","452 Hamiltonia","453 Tea","454 Mathesis","455 Bruchsalia","456 Abnoba","457 Alleghenia","458 Hercynia","459 Signe","460 Scania","461 Saskia","462 Eriphyla","463 Lola","464 Megaira","465 Alekto","466 Tisiphone","467 Laura","468 Lina","469 Argentina","470 Kilia","471 Papagena","472 Roma","473 Nolli","474 Prudentia","475 Ocllo","476 Hedwig","477 Italia","478 Tergeste","479 Caprera","480 Hansa","481 Emita","482 Petrina","483 Seppina","484 Pittsburghia","485 Genua","48
66 Cremona","487 Venetia","488 Kreusa","489 Comacina","490 Veritas","491 Carina","492 Gismonda","493 Griseldis","494 Virtus","495 Eulalia","496 Gryphia","497 Iva","498 Tokio","499 Venusia","500 Selinur"],Zc=Object.fromEntries(Dn.map(({name:e,id:t})=>[e,t])),Ui=Fc.reduce((e,t,i)=>{var r,d;const s=`${i+1} - ${i+10}`,a=Zc[t]??Fe(Ti(t)),o={label:t,value:`${s}/${t}`,nodeProps:{id:a}};return i%10===0?e.push({label:s,value:s,children:[o]}):(d=(r=e[e.length-1])==null?void 0:r.children)==null||d.push(o),e},[]);function Uc({bodies:e,isOpen:t,onClose:i,addBody:s,removeBody:a}){const o=D.useMemo(()=>{const u=e.filter(({type:A})=>Hc(A)).map(({name:A})=>A);return Ui.flatMap(({children:A})=>A??[]).filter(({value:A})=>u.some(v=>A.includes(v))).map(({value:A})=>A)},[JSON.stringify(e)]),r=la({initialCheckedState:o}),d=new Set(e.map(({name:u})=>u)),g=r.checkedState.map(Gc).filter(u=>u!=null&&!d.has(u)).filter(Wt),h=Bc(g).map(({data:u})=>u).filter(Wt);D.useEffect(()=>{h.forEach(u=>{s(u)})},[JSON.stringify(h)]);function y({node:u,expanded:f,hasChildren:A,elementProps:v,tree:M}){const z=M.isNodeChecked(u.value),J=M.isNodeIndeterminate(u.value);function C(){var $,W;if(!z)M.checkNode(u.value);else{const Q=($=u.nodeProps)==null?void 0:$.id;Q!=null&&a(Q),(W=u.children)==null||W.forEach(U=>{var fe;const ce=(fe=U.nodeProps)==null?void 0:fe.id;ce!=null&&a(ce)}),M.uncheckNode(u.value)}}function B(){M.toggleExpanded(u.value)}return n.jsxs(j,{gap:"xs",py:2,...v,children:[n.jsx(da.Indicator,{checked:z,indeterminate:J,size:"xs",onClick:C}),n.jsxs(j,{gap:4,onClick:A?B:C,children:[A&&n.jsx(zs,{size:14,style:{transform:f?"rotate(180deg)":"rotate(0deg)"}}),n.jsx(G,{size:"xs",children:u.label})]})]})}return n.jsx(ci,{size:"md",centered:!0,opened:t,onClose:i,withCloseButton:!1,styles:{body:{padding:0}},children:n.jsxs(me,{bg:"black",withBorder:!0,style:{overflow:"hidden"},children:[n.jsxs(j,{p:"md",gap:"xs",justify:"space-between",wrap:"nowrap",children:[n.jsx(K,{order:5,children:"Add Asteroids from JPL Small-Body Database"}),n.jsx(Te,{onClick:i,children:n.jsx(li,{color:"var(--mantine-color-gray-light-color)",size:20})})]}),n.jsx(Gt,{}),n.jsx(_,{p:"md",mah:"calc(100dvh - 180px)",style:{overflow:"auto"},children:n.jsx(ca,{tree:r,data:Ui,levelOffset:23,expandOnClick:!1,renderNode:y})})]})})}const zc=new Set([p.ASTEROID,p.COMET,p.DWARF_PLANET,p.TRANS_NEPTUNIAN_OBJECT]);function Hc(e){return zc.has(e)}function Gc(e){return e.split("/")[1]}function $c({bodies:e,addBody:t,removeBody:i}){const[s,{open:a,close:o}]=di(!1);return n.jsxs(n.Fragment,{children:[n.jsx(Nt,{size:"xl",fz:"xs",color:"gray",variant:"light",leftSection:n.jsx(Hs,{size:ue}),onClick:a,children:"Add Asteroids from JPL Small-Body Database"}),n.jsx(Uc,{isOpen:s,onClose:o,bodies:e,addBody:t,removeBody:i})]})}const Jc=D.memo(function({regime:t,addBody:i,removeBody:s}){const a=k(h=>h.settings.bodies),o=k(h=>h.updateSettings),r=ne(),d=D.useMemo(()=>{const h=a.filter(u=>u.orbitalRegime===t.id),y=Object.fromEntries(yi.map(u=>[u,[]]));return h.reduce((u,f)=>(u[f.type].push(f),u),y)},[t.id,JSON.stringify(a)]),g=D.useMemo(()=>be.filter(({orbitalRegimes:h})=>(h==null?void 0:h.includes(t.id))??!1),[t.id]),c=D.useMemo(()=>[p.DWARF_PLANET,p.ASTEROID].flatMap(h=>d[h]),[d]);return n.jsxs(Z,{fz:"xs",gap:0,h:"100%",style:{overflow:"auto"},flex:1,children:[n.jsx(Bt,{title:t.name,subTitle:"Orbital Regime",color:Mt,onClose:()=>o({center:null})}),n.jsx(_,{style:{flexShrink:0},children:n.jsx(ot,{item:t,type:ae.ORBITAL_REGIME})}),n.jsx(Z,{px:r.px,py:r.py,gap:"xl",flex:1,children:Object.entries(d).filter(([,h])=>h.length>0).map(([h,y],u)=>n.jsxs(Z,{gap:"xs",children:[n.jsx(K,{order:5,children:Oe(h,!0)}),y.map((f,A)=>n.jsx(Pt,{body:f,onClick:()=>o({center:f.id}),onHover:v=>o({hover:v?f.id:null})},`${f.name}-${A}`)),t.id===w.ASTEROID_BELT&&h===p.ASTEROID&&n.jsx($c,{bodies:c,addBody:i,removeBody:s})]},`${h}-${u}`))}),n.jsx(ms,{title:"Spacecraft Missions",spacecraft:g,regime:t,compact:!0}),n.jsx(_,{style:{justifySelf:"flex-end"},children:n.jsx(ds,{regime:t})})]})});function Vc({organization:e}){const t=ne(),i=Object.values(Le).filter(({id:s})=>s!==e.id);return n.jsxs(Z,{gap:"xs",...t,children:[n.jsx(K,{order:5,children:"Other Organizations"}),n.jsx(j,{gap:8,children:i.map((s,a)=>n.jsx(Ni,{organization:s},`${s.id}-${a}`))})]})}function Kc({organization:e}){const t=k(y=>y.updateSettings),{xs:i}=ve(),s=ne(),[a,o]=D.useState(null),r=n.jsx(me,{p:"xs",withBorder:!0,onMouseEnter:()=>o(0),onMouseLeave:()=>o(null),children:n.jsxs(j,{gap:0,align:"baseline",children:[n.jsx(K,{order:6,mr:"xs",children:"Founded"}),n.jsx(G,{c:"dimmed",fz:"xs",children:Li(e.founded)})]})}),g=D.useMemo(()=>be.filter(y=>y.organization===e.id),[e.id]).map((y,u)=>[y.start,n.jsx(us,{spacecraft:y,onClick:()=>t({center:y.id,hover:null}),onMouseEnter:()=>o(u+1),onMouseLeave:()=>o(null)},`${y.name}-${u}`)]),c=e.dissolved!=null?n.jsx(me,{p:"xs",withBorder:!0,onMouseEnter:()=>o(g.length+1),onMouseLeave:()=>o(null),children:n.jsxs(j,{gap:0,align:"baseline",children:[n.jsx(K,{order:6,mr:"xs",children:"Dissolved"}),n.jsx(G,{c:"dimmed",fz:"xs",children:Li(e.dissolved)})]})}
6):null,h=[[e.founded,r],...g,...e.dissolved!=null?[[e.dissolved,c]]:[]];return n.jsxs(Z,{gap:"xs",...s,children:[n.jsx(K,{order:5,children:"Spacecraft Missions"}),n.jsx(Mi,{datedItems:h,activeIndex:a??-1,end:e.dissolved,accentColor:e.color,width:i?void 0:160})]})}function Wc({organization:e}){const t=k(s=>s.updateSettings),i=ne();return n.jsxs(Z,{fz:"xs",gap:0,h:"100%",style:{overflow:"auto"},flex:1,children:[n.jsx(Bt,{title:e.shortName,subTitle:"Organization",color:e.color,onClose:()=>t({center:null})}),n.jsxs(j,{gap:0,justify:"space-between",align:"flex-start",wrap:"nowrap",w:"100%",children:[n.jsx(ot,{item:e,type:ae.ORGANIZATION}),n.jsx(_,{pt:i.px,pr:i.px,style:{flexShrink:0},children:n.jsx(Ie,{thumbnail:e.thumbnail,alt:e.shortName,size:100})})]}),n.jsx(Kc,{organization:e}),n.jsx(Z,{gap:0,flex:1,justify:"flex-end",children:n.jsx(Vc,{organization:e})})]})}function qc({spacecraft:e}){const{data:t,isLoading:i}=Di({type:Ke.END,spacecraft:e,stream:!1});return n.jsxs(me,{p:"xs",withBorder:!0,children:[n.jsxs(j,{gap:0,align:"baseline",children:[n.jsx(K,{order:6,mr:"xs",children:e.status.status??"Mission End"}),n.jsx(G,{c:"dimmed",fz:"xs",children:wi((e==null?void 0:e.end)??new Date)})]}),n.jsxs(G,{mt:4,inherit:!0,c:"dimmed",fz:"xs",children:[t,i&&n.jsx(He,{})]})]})}function Xc({body:e,spacecraft:t,visit:i}){const s=k(r=>r.updateSettings),{data:a,isLoading:o}=Di({type:Ke.VISIT,spacecraft:t,body:e,visit:i,stream:!1});return n.jsxs(me,{className:_t.Card,withBorder:!0,p:"xs",onClick:()=>s({center:e.id,hover:null}),onMouseEnter:()=>s({hover:e.id}),onMouseLeave:()=>s({hover:null}),style:{overflow:"auto"},children:[n.jsx(_,{ml:"xs",style:{float:"right"},children:n.jsx(Ye,{body:e,size:100})}),n.jsxs(j,{gap:0,align:"baseline",children:[n.jsx(K,{order:6,mr:"xs",children:e.name}),n.jsx(G,{c:"dimmed",fs:"italic",fz:"sm",children:i.type})]}),n.jsxs(G,{mt:4,inherit:!0,c:"dimmed",fz:"xs",children:[a,o&&n.jsx(He,{})]})]})}const Qc="_StatusIcon_12ok2_12",ed={StatusIcon:Qc};function td({status:{status:e,details:t}}){const i=e===E.OPERATIONAL?"var(--mantine-color-green-7)":e===E.CRASHED?"var(--mantine-color-red-7)":e===E.RETURNED?"var(--mantine-color-cyan-7)":"var(--mantine-color-gray-7)",s=n.jsx(Xe,{children:n.jsxs(j,{gap:8,wrap:"nowrap",children:[n.jsx(Gs,{className:e===E.OPERATIONAL?ed.StatusIcon:void 0,size:6,color:i}),e]})});return t!=null?n.jsx(Ne,{label:t,maw:320,multiline:!0,children:s}):s}function id({spacecraft:e}){const t=k(f=>f.settings.hover),i=k(f=>f.settings.bodies),s=ne(),[a,o]=D.useState(null),r=D.useMemo(()=>{const f=Object.fromEntries(i.map(A=>[A.id,A]));return e.visited.map(({id:A})=>f[A])},[JSON.stringify(e),JSON.stringify(i)]),d=n.jsx(me,{p:"xs",withBorder:!0,onMouseEnter:()=>o(0),onMouseLeave:()=>o(null),children:n.jsxs(j,{gap:0,align:"baseline",children:[n.jsx(K,{order:6,mr:"xs",children:"Launched"}),n.jsx(G,{c:"dimmed",fz:"xs",children:wi(e.start)})]})}),g=r.map((f,A)=>{const v=e.visited[A];return v==null?null:n.jsx(Xc,{body:f,spacecraft:e,visit:v})}),c=e.end!=null?n.jsx(_,{onMouseEnter:()=>o(g.length+1),onMouseLeave:()=>o(null),children:n.jsx(qc,{spacecraft:e})}):null,h=[[e.start,d],...g.map((f,A)=>[e.visited[A].start,f]),...e.end!=null?[[e.end,c]]:[]],y=r.findIndex(({id:f})=>f===t),u=a??(y>=0?y+1:void 0);return n.jsxs(Z,{gap:"xs",...s,children:[n.jsxs(j,{gap:"xs",children:[n.jsx(K,{order:5,children:"Mission Timeline"}),n.jsx(td,{status:e.status})]}),n.jsx(Mi,{datedItems:h,activeIndex:u,end:e.end,accentColor:e.color})]})}function nd({spacecraft:e}){const t=k(s=>s.updateSettings),i=14;return n.jsx(Xe,{className:mt.LinkPill,style:{cursor:"pointer"},onClick:()=>t({center:e.id,hover:null}),onMouseEnter:()=>t({hover:e.id}),onMouseLeave:()=>t({hover:null}),children:n.jsxs(j,{gap:8,align:"center",wrap:"nowrap",children:[n.jsx(_,{w:i,children:n.jsx(Ie,{thumbnail:e.thumbnail,alt:e.name,size:i,radius:"xs"})}),e.name]})})}const zt=7;function sd({spacecraft:e}){const t=ne(),i=D.useMemo(()=>{const s=be.filter(({id:d})=>d!==e.id),a=be.findIndex(({id:d})=>d===e.id),o=s.length-a,r=Math.max(0,a-Math.max(zt/2,zt-o));return s.slice(r,r+zt)},[e.id]);return n.jsxs(Z,{gap:"xs",...t,children:[n.jsx(K,{order:5,children:"Other Spacecraft"}),n.jsx(j,{gap:8,children:i.map((s,a)=>n.jsx(nd,{spacecraft:s},`${s.id}-${a}`))})]})}function ad({spacecraft:e}){const t=k(r=>r.updateSettings),i=ne(),{id:s,missionFamily:a}=e,o=D.useMemo(()=>a!=null?be.filter(r=>s!==r.id&&a===r.missionFamily):[],[s,a]);return o.length>0?n.jsxs(Z,{gap:"xs",...i,children:[n.jsx(K,{order:5,children:"Related Spacecraft"}),o.map((r,d)=>n.jsx(Ii,{spacecraft:r,onClick:()=>t({center:r.id})},`${r.name}-${d}`))]}):n.jsx(n.Fragment,{})}function od({spacecraft:e}){var d,g;const t=k(c=>c.updateSettings),i=ne(),s=n.jsx(Ni,{organization:Le[e.organization]}),a=n.jsx(j,{gap:4,children:(d=e.orbitalRegimes)==null?void 0:d.map(c=>n.jsx(Oi,{regime:ze[c]},c))}),o=e.orbitalRegimes!=null&&(((g=e.orbitalRegimes)==null?void 0:g.length)??0)>0?{label:`orbital regime${e.orbitalRegimes.length>
61?"s":""}`,value:a}:null,r=[{label:"organization",value:s},...o!=null?[o]:[],{label:"learn more",value:n.jsx(hs,{url:e.wiki})},...e.crew!=null?[{label:"crew",value:e.crew.join(", ")}]:[],{label:"launched",value:bt(e.start)},...e.end!=null?[{label:e.status.status.toLowerCase(),value:bt(e.end)}]:[],{label:"launch mass",value:`${e.launchMass.toLocaleString()} kg`},...e.power!=null?[{label:"power",value:`${e.power.toLocaleString()} watts`}]:[]];return n.jsxs(Z,{fz:"xs",gap:0,h:"100%",style:{overflow:"auto"},flex:1,children:[n.jsx(Bt,{title:e.name,subTitle:Oe(p.SPACECRAFT),color:e.color,onClose:()=>t({center:null}),onHover:c=>t({hover:c?e.id:null})}),n.jsx(_,{children:n.jsx(ot,{item:e,type:ae.SPACECRAFT})}),n.jsxs(Z,{gap:2,flex:1,children:[n.jsxs(j,{...i,gap:"xs",align:"flex-start",justify:"space-between",wrap:"nowrap",children:[n.jsxs(Z,{gap:"xs",children:[n.jsx(K,{order:5,children:"Key Facts"}),n.jsx(ai,{facts:r,keysWidth:120})]}),n.jsx(_,{style:{flexShrink:1},children:n.jsx(Ie,{thumbnail:e.thumbnail,alt:e.name,size:240})})]}),n.jsx(id,{spacecraft:e})]}),n.jsxs(_,{style:{justifySelf:"flex-end"},children:[n.jsx(ad,{spacecraft:e}),n.jsx(sd,{spacecraft:e})]})]})}function rd({item:e,addBody:t,removeBody:i,resize:s}){return D.useEffect(()=>(s(),s)),e.type===ae.CELESTIAL_BODY?n.jsx(_c,{body:e.item}):e.type===ae.ORBITAL_REGIME?n.jsx(Jc,{regime:e.item,addBody:t,removeBody:i}):e.type===ae.SPACECRAFT?n.jsx(od,{spacecraft:e.item}):e.type===ae.ORGANIZATION?n.jsx(Wc,{organization:e.item}):n.jsx(n.Fragment,{})}function ld(){const{sm:e}=ve(),t=k(h=>h.settings.hover),i=k(h=>h.updateModel),s=k(h=>h.reset),a=$l(),o=yl(a.modelRef.current),r=xl();Jl(),Ri();const d=D.useCallback(()=>{const h=s();a.reset(h.settings)},[s]);function g(){var u,f;const h=(u=a.modelRef.current)==null?void 0:u.getModelState();h!=null&&i(h);const y=(f=a.canvasRef.current)==null?void 0:f.getContext("2d");y!=null&&a.update(k.getState().settings,y),window.requestAnimationFrame(g)}D.useEffect(()=>{a.initialize(k.getState().settings);const h=window.requestAnimationFrame(g);return()=>{window.cancelAnimationFrame(h)}},[]);const c=e?Z:j;return n.jsxs(c,{gap:0,w:"100vw",h:"100dvh",flex:1,children:[n.jsxs(_,{pos:"relative",w:"100%",h:"100dvh",flex:1,children:[n.jsx(_,{style:{cursor:t!=null?"pointer":"unset"},ref:a.containerRef,pos:"absolute",w:"100%",h:"100%",...o}),n.jsx("canvas",{ref:a.canvasRef,style:{height:"100%",width:"100%",position:"absolute",pointerEvents:"none"}}),n.jsx(Tc,{setEpoch:a.setEpoch,reset:d})]}),r!=null&&n.jsx(_,{h:e?"60dvh":"100dvh",w:e?void 0:600,style:{borderLeft:e?void 0:`1px solid ${r.color}`,borderTop:e?`1px solid ${r.color}`:void 0},children:n.jsx(rd,{item:r,addBody:a.addBody,removeBody:a.removeBody,resize:a.resize},r.item.id)})]})}const cd=ua({primaryColor:"blue",headings:{fontFamily:"Electrolize, sans-serif"},cursorType:"pointer",components:{Button:Nt.extend({defaultProps:{style:{backdropFilter:"blur(4px)"}}}),ActionIcon:Te.extend({defaultProps:{variant:"subtle",color:"gray",style:{backdropFilter:"blur(4px)"}}}),Tooltip:Ne.extend({defaultProps:{fz:"xs",px:6,py:2,openDelay:400}}),Popover:wt.extend({defaultProps:{transitionProps:{transition:"fade",duration:200}}}),Paper:me.extend({defaultProps:{bg:"transparent",style:{backdropFilter:"blur(4px)"}}}),Modal:ci.extend({defaultProps:{overlayProps:{blur:4,backgroundOpacity:0},transitionProps:{transition:"fade"}}})}}),dd=new $s;function ud(){return n.jsx(ma,{defaultColorScheme:"dark",theme:cd,children:n.jsx(Js,{client:dd,children:n.jsx(Vs,{children:n.jsx(Ks,{children:ss.map(e=>n.jsx(Ws,{path:e,element:n.jsx(ld,{})},e))})})})})}qs.createRoot(document.getElementById("root")).render(n.jsx(D.StrictMode,{children:n.jsx(ud,{})}));export{yd as g};
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.