-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstarmap.min.js
50 lines (50 loc) · 22.6 KB
/
starmap.min.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
var a="function"==typeof Object.defineProperties?Object.defineProperty:function(b,c,d){b!=Array.prototype&&b!=Object.prototype&&(b[c]=d.value)},B="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this;function C(b,c){if(c){var d=B;b=b.split(".");for(var f=0;f<b.length-1;f++){var e=b[f];e in d||(d[e]={});d=d[e]}b=b[b.length-1];f=d[b];c=c(f);c!=f&&null!=c&&a(d,b,{configurable:!0,writable:!0,value:c})}}
C("Array.prototype.fill",function(b){return b?b:function(c,d,f){var e=this.length||0;0>d&&(d=Math.max(0,e+d));if(null==f||f>e)f=e;f=Number(f);0>f&&(f=Math.max(0,e+f));for(d=Number(d||0);d<f;d++)this[d]=c;return this}});var E={};E.Math={};E.Math.A=Math.PI/180;E.Math.Ca=180/Math.PI;E.Math.Ba=648E3/Math.PI;E.Math.G=Math.PI/648E3;E.Math.C=2*Math.PI;E.Math.za=12/Math.PI;E.Math.wa=function(b){return b*b};E.Math.F=function(b){return b-Math.floor(b)};E.Math.L=function(b,c){return c*E.Math.F(b/c)};
E.Math.N=function(b,c,d,f){if(4===arguments.length)this.sign=b,this.degree=c,this.minute=d,this.second=f;else{var e=b;this.sign=1;0>e&&(e=-e,this.sign=-1);this.degree=Math.floor(e);e=60*(e-this.degree);this.minute=Math.floor(e);this.second=e=60*(e-this.minute)}};E.Math.V=function(b,c,d,f){return b*(c+d/60+f/3600)};E.Math.N.prototype.V=function(){return E.Math.V(this.sign,this.degree,this.minute,this.second)};E.Math.ha=function(b){return new E.Math.N(b)};
E.Math.Da=function(b){b=E.Math.L(b,E.Math.C);b=E.Math.ha(E.Math.za*b);b.hour=b.deg;delete b.deg;delete b.sign;return b};E.Math.va=function(b,c,d){var f=.5*(d+b)-c,e=.5*(d-b);b=-e/(2*f);d=(f*b+e)*b+c;e=e*e-4*f*c;c=[];0<=e&&(e=.5*Math.sqrt(e)/Math.abs(f),f=b-e,e=b+e,1>=Math.abs(f)&&c.push(f),1>=Math.abs(e)&&c.push(e));return{xe:b,ye:d,roots:c}};E.Math.sinh=function(b){return(Math.exp(b)-Math.exp(-b))/2};E.Math.cosh=function(b){return(Math.exp(b)+Math.exp(-b))/2};E.b={};E.b.s=function(b,c,d){this.x=b;this.y=c;this.z=d};(function(b){b.B=function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)};b.add=function(c){return new E.b.s(this.x+c.x,this.y+c.y,this.z+c.z)};b.sub=function(c){return new E.b.s(this.x-c.x,this.y-c.y,this.z-c.z)};b.K=function(){return new E.b.s(-this.x,-this.y,-this.z)};b.u=function(c){return new E.b.s(c*this.x,c*this.y,c*this.z)};b.f=function(){return new E.b.s(this.x,this.y,this.z)}})(E.b.s.prototype);
E.b.v=function(b,c,d){var f=arguments.length;2===f&&(d=1);2===f||3===f?(this.phi=b,this.theta=c,this.rad=d):(f=b.x*b.x+b.y*b.y,this.rad=Math.sqrt(f+b.z*b.z),this.phi=0===b.x&&0===b.y?0:Math.atan2(b.y,b.x),0>this.phi&&(this.phi+=E.Math.C),f=Math.sqrt(f),this.theta=0===b.z&&0===f?0:Math.atan2(b.z,f))};
(function(b){b.f=function(){var c=Math.cos(this.theta),d=this.rad;return new E.b.s(d*c*Math.cos(this.phi),d*c*Math.sin(this.phi),d*Math.sin(this.theta))};b.u=function(){return new E.b.v(this.rad,this.phi,this.theta)}})(E.b.v.prototype);E.b.j=function(b,c,d){this.mat=3===arguments.length?[[b.x,b.y,b.z],[c.x,c.y,c.z],[d.x,d.y,d.z]]:c?b:[[b[0][0],b[0][1],b[0][2]],[b[1][0],b[1][1],b[1][2]],[b[2][0],b[2][1],b[2][2]]]};
(function(b){b.apply=function(c){var d=this.mat[0],f=d[0]*c.x+d[1]*c.y+d[2]*c.z;d=this.mat[1];var e=d[0]*c.x+d[1]*c.y+d[2]*c.z;d=this.mat[2];return new E.b.s(f,e,d[0]*c.x+d[1]*c.y+d[2]*c.z)};b.M=function(c){var d=[[0,0,0],[0,0,0],[0,0,0]];c=c.mat;for(var f=0;3>f;f+=1)for(var e=this.mat[f],l=d[f],h=0;3>h;h+=1)for(var g=0;3>g;g+=1)l[h]+=e[g]*c[g][h];return new E.b.j(d,!0)}})(E.b.j.prototype);E.b.j.f=function(b){var c=Math.cos(b);b=Math.sin(b);return new E.b.j([[1,0,0],[0,c,b],[0,-b,c]])};
E.b.j.B=function(b){var c=Math.cos(b);b=Math.sin(b);return new E.b.j([[c,0,-b],[0,1,0],[b,0,c]])};E.b.j.u=function(b){var c=Math.cos(b);b=Math.sin(b);return new E.b.j([[c,b,0],[-b,c,0],[0,0,1]])};E.l={};E.l.DEFAULT_JULIAN_DATE={year:1582,month:10,day:4};E.l.DEFAULT_JULIAN_JD=2299161;E.l.JD_MJD=2400000.5;E.l.ya=function(b){"number"!==typeof b&&(b=b.getTime());return b/864E5+40587};
E.l.Pa=function(b,c){"undefined"===typeof c&&(c=E.l.DEFAULT_JULIAN_JD);var d=Math.floor(b)+2400001;d<c?c=d+1524:(c=Math.floor((d-1867216.25)/36524.25),c=d+c-Math.floor(c/4)+1525);d=Math.floor((c-122.1)/365.25);var f=365*d+Math.floor(d/4);var e=Math.floor((c-f)/30.6001);c=c-f-Math.floor(30.6001*e);e=e-1-12*Math.floor(e/14);d=d-4715-Math.floor((7+e)/10);b=E.l.la(24*(b-Math.floor(b)));b.year=d;b.month=e;b.day=c;return b};E.l.ka=function(b,c,d){return b+c/60+d/3600};
E.l.la=function(b){b=new E.Math.N(b);return{hour:b.degree,minute:b.minute,second:b.second}};E.l.Ia=function(b,c){"undefined"===typeof c&&(c=E.l.DEFAULT_JULIAN_DATE);var d=b.year,f=b.month;2>=f&&(f+=12,--d);return 365*d-679004+(d<=c.year&&f<=c.month&&b.day<=c.day?-2+Math.floor((d+4716)/4)-1179:Math.floor(d/400)-Math.floor(d/100)+Math.floor(d/4))+Math.floor(30.6001*(f+1))+b.day+E.l.ka(b.hour,b.minute,b.second)/24};E.l.W=function(b){return(b-51544.5)/36525};
E.l.ca=function(b){var c=Math.floor(b);var d=E.l.W(c);var f=E.l.W(b);return E.Math.C/86400*E.Math.L(24110.54841+8640184.812866*d+86636.55536351999*(b-c)+(.093104-6.2E-6*f)*f*f,86400)};E.m={};E.m.Ta=function(b,c){c-=b;var d=174.876383889*E.Math.A+((3289.4789+.60622*b)*b+(-869.8089-.50491*b+.03536*c)*c)*E.Math.G;return E.b.j.u(-(d+(5029.0966+(2.22226-4.2E-5*b)*b+(1.11113-4.2E-5*b-6E-6*c)*c)*c*E.Math.G)).M(E.b.j.f((47.0029-(.06603-5.98E-4*b)*b+(-.03302+.00598*b+6E-5*c)*c)*c*E.Math.G)).M(E.b.j.u(d))};
E.m.ua=function(b,c){c-=b;var d=(2306.2181+(1.39656-1.39E-4*b)*b+(.30188-3.44E-4*b+.017998*c)*c)*c*E.Math.G;return E.b.j.u(-(d+(.7928+4.11E-4*b+2.05E-4*c)*c*c*E.Math.G)).M(E.b.j.B((2004.3109-(.8533+.00217*b)*b-(.42665+2.17E-4*b+.041833*c)*c)*c*E.Math.G)).M(E.b.j.u(-d))};E.m.$=function(b){return(23.43929111-(46.815+(5.9E-4-.001813*b)*b)*b/3600)*E.Math.A};E.m.Ja=function(b){return E.b.j.f(E.m.$(b))};E.m.Z=function(b){return E.b.j.f(-E.m.$(b))};
E.m.Ka=function(b,c,d){b=E.b.j.B(Math.PI/2-d).apply((new E.b.v(c,b)).f());b=new E.b.v(b);return{h:b.theta,az:b.phi}};E.m.La=function(b,c,d){b=E.b.j.B(-Math.PI/2+d).apply((new E.b.v(c,d)).f());b=new E.b.v(b);return{dec:b.theta,tau:b.phi}};E.g={};E.g.DEFAULT_ITERATIONS=100;E.g.DEFAULT_PRECISION=1E-9;E.g.ia=function(b,c,d){var f=E.g.DEFAULT_PRECISION;void 0===d&&(d=E.g.DEFAULT_ITERATIONS);b=E.Math.L(b,E.Math.C);var e=Math.sin(b);var l=b+c*e/(1-Math.sin(b+c)+e);do e=l-c*Math.sin(l)-b,l-=e/(1-c*Math.cos(l));while(0<d--&&e>f);return 0<d?l:null};E.g.aa=function(b,c,d,f){b=E.g.ia(c,f);return new E.b.s(d*(Math.cos(b)-f),d*Math.sqrt((1-f)*(1+f))*Math.sin(b),0)};
E.g.qa=function(b,c,d,f,e){var l=0,h={},g=E.g.DEFAULT_PRECISION;var r=.5*e;c=Math.sqrt(b)*(d-c);do{b=l;l=1.5*Math.sqrt(r/(f*f*f))*c;l=Math.pow(Math.sqrt(l*l+1)+l,1/3);d=l-1/l;var p=d*d;l=p*(1-e)/r;var t,n,m=h,k=E.g.DEFAULT_PRECISION;var v=t=r=0;var u=n=1;do v+=u,u/=2*n,t+=u,u/=2*n+1,r+=u,u*=-l,n+=1;while(Math.abs(u)>=k);m.Ea=v;m.Fa=t;m.Ga=r;r=3*e*h.Ga}while(Math.abs(l-b)>=g);return new E.b.s(f*(1-p*h.Fa/r),f*Math.sqrt((1+e)/r)*d*h.Ea,0)};
E.g.ma=function(b,c,d){void 0===d&&(d=E.g.DEFAULT_ITERATIONS);var f=E.g.DEFAULT_PRECISION,e=0;var l=Math.log(2*Math.abs(b)/c+1.8);0>b&&(l=-l);do{var h=c*E.Math.sinh(l)-l-b;l-=h/(c*E.Math.cosh(l)-1);++e;if(e===d)return null}while(Math.abs(h)>f*(1+Math.abs(l+b)));return l};E.g.na=function(b,c,d,f,e){f=Math.abs(f);b=E.g.ma(Math.sqrt(b/f)*(d-c)/f,e);return new E.b.s(f*(e-E.Math.cosh(b)),f*Math.sqrt((e+1)*(e-1))*E.Math.sinh(b),0)};
E.g.pa=function(b,c,d,f,e,l){var h=Math.abs(1-e);var g=h/f;var r=Math.sqrt(b)*(d-c)*Math.sqrt(g*g*g);b=.1>r&&.1>h?E.g.qa(b,c,d,f,e):1>e?E.g.aa(b,r,1/g,e):E.g.na(b,c,d,1/g,e);return l.apply(b)};E.g.ba=function(b,c,d){return E.b.j.u(-b).M(E.b.j.f(-c)).M(E.b.j.u(-d))};E.c={};E.c.U=23.43920111*E.Math.A;
E.c.P=function(b){var c=E.Math.F(.606433+1336.855225*b);var d=E.Math.C*E.Math.F(.374897+1325.55241*b);var f=E.Math.C*E.Math.F(.993133+99.997361*b);var e=E.Math.C*E.Math.F(.827361+1236.853086*b);b=E.Math.C*E.Math.F(.259086+1342.227825*b);var l=22640*Math.sin(d)-4586*Math.sin(d-2*e)+2370*Math.sin(2*e)+769*Math.sin(2*d)-668*Math.sin(f)-412*Math.sin(2*b)+-212*Math.sin(2*d-2*e)-206*Math.sin(d+f-2*e)+192*Math.sin(d+2*e)-165*Math.sin(f-2*e)+-125*Math.sin(e)-110*Math.sin(d+f)+148*Math.sin(d-f)+-55*Math.sin(2*
b-2*e);var h=b+(l+412*Math.sin(2*b)+541*Math.sin(f))*E.Math.G;e=b-2*e;c=E.b.j.f(-E.c.U).apply((new E.b.v(E.Math.C*E.Math.F(c+l/1296E3),(18520*Math.sin(h)+(-526*Math.sin(e)+44*Math.sin(d+e)-31*Math.sin(e-d)+-23*Math.sin(f+e)+11*Math.sin(e-f)-25*Math.sin(b-2*d)+21*Math.sin(b-d)))*E.Math.G)).f());c=new E.b.v(c);return{ra:c.phi,dec:c.theta}};
E.c.J=function(b){var c=E.Math.F(.993133+99.997361*b);var d=E.Math.C*c;b=E.b.j.f(-E.c.U).apply((new E.b.v(E.Math.C*E.Math.F(.7859453+c+(6893*Math.sin(d)+72*Math.sin(2*d)+6191.2*b)/1296E3),0)).f());b=new E.b.v(b);return{ra:b.phi,dec:b.theta}};
E.c.Aa=[{body:"moon",name:"day",title:"Moon",sinh0:Math.sin(8/60*E.Math.A),posFunc:E.c.P},{body:"sun",name:"day",title:"Sun",sinh0:Math.sin(-50/60*E.Math.A),posFunc:E.c.J},{body:"sun",name:"twilightC",title:"Civil twilight",sinh0:Math.sin(-6*E.Math.A),posFunc:E.c.J},{body:"sun",name:"twilightN",title:"Nautical twilight",sinh0:Math.sin(-12*E.Math.A),posFunc:E.c.J},{body:"sun",name:"twilightA",title:"Astronomical twilight",sinh0:Math.sin(-18*E.Math.A),posFunc:E.c.J}];
E.c.Wa=function(b,c,d,f,e){function l(D,J,W,X,Y){D=D((J-51544.5)/36525);return Y*Math.sin(D.dec)+X*Math.cos(D.dec)*Math.cos(E.l.ca(J)+W-D.ra)}var h=E.c.Aa,g=[],r,p,t=1/24,n={},m={},k={},v=Math.cos(f);f=Math.sin(f);var u={sun:{},moon:{}},x={sun:{},moon:{}},z={sun:{},moon:{}},y={};"undefined"===typeof e&&(e=function(D){return D});var A=b;n.moon=l(E.c.P,A,d,v,f);n.sun=l(E.c.J,A,d,v,f);for(p=0;p<h.length;p+=1){var q=h[p];var w=q.name;u[q.body][w]=n[q.body]-q.sinh0}for(;A<c;){e={moon:{midnight:n.moon},
sun:{midnight:n.sun}};for(r=1;24>r;r+=2){p=A+t;A=p+t;m.moon=l(E.c.P,p,d,v,f);m.sun=l(E.c.J,p,d,v,f);k.moon=l(E.c.P,A,d,v,f);k.sun=l(E.c.J,A,d,v,f);for(p=0;p<h.length;p+=1)switch(q=h[p],w=q.name,e[q.body][w]=e[q.body][w]||{},x[q.body][w]=m[q.body]-q.sinh0,z[q.body][w]=k[q.body]-q.sinh0,y=E.Math.va(u[q.body][w],x[q.body][w],z[q.body][w]),y.roots.length){case 1:0>u[q.body][w]?e[q.body][w].rise=r+y.roots[0]:e[q.body][w].set=r+y.roots[0];break;case 2:0>y.ye?(e[q.body][w].rise=r+y.roots[1],e[q.body][w].set=
r+y.roots[0]):(e[q.body][w].rise=r+y.roots[0],e[q.body][w].set=r+y.roots[1])}u=z;z={moon:{},sun:{}}}for(p=0;p<h.length;p+=1)q=h[p],w=q.name,e[q.body][w].set||e[q.body][w].rise||(e[q.body][w].alwaysAbove=m[q.body]>q.sinh0);A=b+=1;g.push(e)}return g};E.c.R=function(){this.name="Sun"};E.c.R.f=new E.b.s(0,0,0);E.c.Y=E.Math.wa(.01720209895);E.c.R.prototype.keplerCoord=function(){return E.c.R.f};
E.c.Body=function(b,c){this.name=b;this.a=c.a;this.ec=c.e;this.m0=c.M0;this.n=c.n;this.omega=c.O;this.i=c.i;this.w=c.w;this.t0=c.T0};E.c.Body.prototype.keplerCoord=function(b){var c=E.g.aa(E.c.Y,E.Math.A*(this.m0+this.n*(b-this.t0)),this.a,this.ec);return E.g.ba(E.Math.A*(this.omega+1.397*b),E.Math.A*this.i,E.Math.A*(this.w-this.omega)).apply(c)};
E.c.D={Sun:new E.c.R,Mercury:new E.c.Body("Mercury",{a:.387099,e:.205634,M0:174.7947,n:149472.6738,O:48.331,i:7.0048,w:77.4552,T0:0}),Venus:new E.c.Body("Venus",{a:.723332,e:.006773,M0:50.4071,n:58517.8149,O:76.68,i:3.3946,w:131.5718,T0:0}),Earth:new E.c.Body("Earth",{a:1,e:.016709,M0:357.5256,n:35999.372,O:174.876,i:0,w:102.94,T0:0}),Mars:new E.c.Body("Mars",{a:1.523692,e:.093405,M0:19.3879,n:19140.3023,O:49.557,i:1.8496,w:336.059,T0:0}),Jupiter:new E.c.Body("Jupiter",{a:5.204267,e:.048775,M0:18.8185,
n:3033.6272,O:100.4908,i:1.3046,w:15.5576,T0:0}),Saturn:new E.c.Body("Saturn",{a:9.582018,e:.055723,M0:320.3477,n:1213.8664,O:113.6427,i:2.4852,w:89.6567,T0:0}),Uranus:new E.c.Body("Uranus",{a:19.229412,e:.044406,M0:142.9559,n:426.9282,O:73.9893,i:.7726,w:170.531,T0:0}),Neptune:new E.c.Body("Neptune",{a:30.103658,e:.011214,M0:267.7649,n:217.9599,O:131.7942,i:1.768,w:37.4435,T0:0})};function F(b){G(this,0,0);this.o=b}function G(b,c,d){b.ta=c;b.da=d;b.S=Math.cos(c);b.X=Math.sin(c);b.Ha=Math.cos(d);b.Va=Math.sin(d)}function H(b,c){var d=b.o,f=b.X+Math.sin(c);if(1E-10>Math.abs(f))return{type:"line",x:0,y:0,H:1,I:0};c=d*Math.cos(c)/f;return{type:"circle",x:0,y:-d*b.S/f,T:0>c,r:Math.abs(c)}}function I(b,c,d){var f=b.o,e=b.S,l=b.X;d=b.da-d;b=Math.cos(c);c=Math.sin(c);var h=Math.cos(d),g=f/(1+l*c+e*b*h);d=g*b*Math.sin(d);e=-g*(e*c-l*b*h);return[d,e,d*d+e*e<f*f]}
function K(b,c,d){d=Math.tan(d/2);var f=(c[0]*c[0]+c[1]*c[1])/(b.o*b.o),e=1-f*d*d;return{type:"circle",x:c[0]*(1+d*d)/e,y:c[1]*(1+d*d)/e,T:0>e,o:b.o*Math.abs(d*(f+1)/e)}}
F.prototype.f=function(b,c){var d=this.da,f=this.ta,e=this.S,l=this.X,h=b*b+c*c;if(h>this.o*this.o)return null;if(1E-18>h)return{ra:d,de:f};h=Math.sqrt(h);var g=2*Math.atan(h/this.o),r=Math.cos(g),p=Math.sin(g);g=Math.asin(r*l+c*p*e/h);b=1E-9>Math.abs(f-Math.PI)?d-Math.atan2(b,-c):1E-9>Math.abs(this.Za- -Math.PI)?d-Math.atan2(b,c):d-Math.atan2(b*p,h*e*r-c*l*p);b=E.Math.L(b,2*Math.PI);g=E.Math.L(g+Math.PI,2*Math.PI)-Math.PI;return{ra:b,de:g}};F.prototype.inverseObj=F.prototype.f;
function L(b,c,d,f,e){this.Oa=document.getElementById(b);this.K=this.Oa.getContext("2d");this.f=e;this.size=c;b=Math.floor(c/2);this.Qa="undefined"===typeof e.planets?!0:e.planets;this.Ya=d;this.Na=f;this.proj=new F(b)}L.prototype.Xa=function(b){this.proj.o=Math.floor(b/2);this.size=b};L.prototype.setSize=L.prototype.Xa;function M(b,c,d){this.ea=b;this.size=c;this.color=d}M.prototype.ja=function(b,c,d){b=this.ea.keplerCoord(b);return new E.b.v(d.apply(b.sub(c)))};
function N(){this.size=20;this.color="#880"}N.prototype.ea={name:"Moon"};N.prototype.ja=function(b){b=E.c.P(b);return{phi:b.ra,theta:b.dec}};var O=[new M(E.c.D.Sun,20,"#FF0"),new N,new M(E.c.D.Mercury,3,"#888"),new M(E.c.D.Venus,4,"#AAA"),new M(E.c.D.Mars,4,"#F80"),new M(E.c.D.Jupiter,6,"#FB0"),new M(E.c.D.Saturn,6,"#AA0"),new M(E.c.D.Uranus,6,"#CAF"),new M(E.c.D.Neptune,6,"#CAF")],P=E.c.D.Earth;
function Q(){this.u="2012 01 17;2012 01 22;2012 01 27;2012 02 01;2012 02 06;2012 02 11;2012 02 16;2012 02 21;2012 02 26;2012 03 02;2012 03 07;2012 03 12;2012 03 17;2012 03 22;2012 03 27;2012 04 01;2012 04 06;2012 04 11".split(";");this.K=[17.4533,17.4175,17.3649,17.289,17.1802,17.0241,16.7981,16.4653,15.967,15.2189,14.1497,12.8391,11.5897,10.6405,9.9973,9.5739,9.2944,9.1087];this.B=[32.839,35.301,38.107,41.29,44.877,48.874,53.248,57.889,62.547,66.752,69.747,70.676,69.266,66.145,62.191,58.016,53.951,
50.147];this.style={fillStyle:"green",strokeStyle:"green",lineWidth:1};this.f={fillStyle:"#8F8",strokeStyle:"#8F8"}}function R(b,c){this.B=b;this.u=c}
function S(b,c,d){function f(h){c.beginPath();c.arc(h.x,h.y,h.o,.15,.5*Math.PI-.15,!1);c.stroke();c.beginPath();c.arc(h.x,h.y,h.o,.5*Math.PI+.15,Math.PI-.15,!1);c.stroke();c.beginPath();c.arc(h.x,h.y,h.o,Math.PI+.15,1.5*Math.PI-.15,!1);c.stroke();c.beginPath();c.arc(h.x,h.y,h.o,1.5*Math.PI+.15,2*Math.PI-.15,!1);c.stroke()}var e=I(d,b.B,b.u);b=K(d,e,.5/180*Math.PI);var l=K(d,e,2/180*Math.PI);d=K(d,e,4/180*Math.PI);c.strokeStyle="rgba(255,0,0,0.6)";c.lineWidth=d.o/9;c.beginPath();c.arc(b.x,b.y,b.o,
0,2*Math.PI,!0);c.stroke();f(l);f(d)}function aa(){var b=window.CON_BOUND_18,c,d=E.Math.A;"undefined"===typeof c&&(c=0);c=E.m.ua(-1.25,c);this.u=new E.b.v(c.apply(new E.b.s(0,0,1)));for(var f=b.length,e=Array(f),l=0;l<f;++l){var h=b[l].slice(0),g=new E.b.v(c.apply((new E.b.v(15*Math.PI*h[0]/180,d*h[1])).f()));h[0]*=15;h.push(g.phi/d);h.push(g.theta/d);e[l]=h}this.f=e}
function ba(b,c,d){function f(n,m){if(n[1]===m[1]){var k=e*n[0];var v=e*m[0];n=I(d,n[4]*e,n[3]*e);var u=I(d,m[4]*e,m[3]*e);m=K(d,I(d,g.theta,g.phi),Math.PI/2-e*m[1]);m.r=m.o;m.Ra=n;m.Sa=u;m.fa=Math.atan2(n[1]-m.y,n[0]-m.x);m.ga=Math.atan2(u[1]-m.y,u[0]-m.x);k=E.Math.L(k-v,2*Math.PI)<E.Math.L(v-k,2*Math.PI)!==m.T}else{k=I(d,n[4]*e,n[3]*e);v=I(d,m[4]*e,m[3]*e);m=k[0]/d.o;n=k[1]/d.o;u=v[0]/d.o;var x=v[1]/d.o,z=m*m+n*n-1,y=u*u+x*x-1,A=2*(x*m-n*u),q=(z*x-y*n)/A,w=(-z*u+y*m)/A,D=Math.sqrt(1+q*q+w*w);z=
Math.atan2(n-w,m-q);y=Math.atan2(x-w,u-q);m={type:"circle",x:q*d.o,y:w*d.o,fa:z,ga:y,Ra:k,Sa:v,T:0>A,r:D*d.o};k=m.T}c.beginPath();switch(m.type){case "circle":c.arc(m.x,m.y,m.r,m.fa,m.ga,k);break;case "line":c.moveTo(m.$a,m.bb),c.lineTo(m.ab,m.cb)}c.stroke()}var e=E.Math.A,l=null;c.strokeStyle="rgba(128,0,128,1)";var h=null,g=b.u;b=b.f;for(var r=0;r<b.length;++r){var p=b[r];if(l===p[2])f(h,p);else{null!==h&&f(h,t);var t=h=p;l=p[2]}h=p}}
function T(b,c,d){this.name=b;this.data=c.slice(0);this.f=d;this.u=function(f,e,l,h){f.beginPath();(h=h[l[2]])||(l=Math.min(15,Math.floor(19-l[5])).toString(16),h="#"+l+l+l);f.strokeStyle=h;f.arc(e[0],e[1],4,0,2*Math.PI,!0);f.stroke()}}function U(b,c,d){for(var f=b.data,e=f.length,l,h,g=0;g<e;++g)l=f[g],h=I(d,l[4],15*l[3]),h[2]&&b.u(c,h,l,b.f)}function ca(b){this.u=b}function V(b,c,d,f){this.f=b;this.color=c;this.K=E.g.ba(b.node,b.oa,b.sa);this.B=d;this.u=f}
function Z(b,c,d){var f=E.g.pa(E.c.Y,b.f.xa,b.B,b.f.q,b.f.e,b.K),e=P.keplerCoord(b.u);f=new E.b.v(E.m.Z(b.u).apply(f.sub(e)));d=I(d,f.theta,f.phi);c.strokeStyle=c.fillStyle=b.color;c.lineWidth=2;c.beginPath();c.arc(d[0],d[1],6,0,2*Math.PI,!0);c.stroke();c.beginPath();c.arc(d[0],d[1],4,0,2*Math.PI,!0);c.fill();b.f.title&&c.fillText(b.f.title,d[0]+8,d[1]+8)}L.prototype.Ua=function(b,c,d){"undefined"===typeof d?d=+new Date:"number"!==typeof d&&(d=+d);this.B=b;this.u=c;this.time=d};
L.prototype.Ma=function(){var b=this.B,c=this.u,d=E.l,f=d.ya(this.time),e=d.ca(f),l=E.Math.A;c*=l;G(this.proj,c,b*l+e);var h=this.proj;e=this.Ya;var g=h.o,r=e.length;b=Array(r);var p=h.S,t=h.X,n=h.Ha,m=h.Va;for(h=0;h<r;++h){var k=e[h],v=k[2],u=-k[1],x=v*v,z=u*u,y=1+x,A=1+z;x=(1-x)/y;v=2*v/y;z=(1-z)/A;y=2*u/A;u=z*n-y*m;A=g/(1+t*v+p*x*u);z=A*x*(z*m+y*n);x=A*(t*x*u-p*v);b[h]=[k[0],z,x,z*z+x*x<g*g]}r=b.length;p=this.Na;t=p.length;e=Math.floor(this.size/2);g=this.K;g.save();g.translate(e,e);g.rotate(0);
n=this.size;h=Math.floor(n/2);m=this.K;m.clearRect(0,0,n,n);m.fillStyle="#FFF";m.fillRect(-h,-h,n,n);m.beginPath();m.fillStyle=this.f.circleFill||"#000010";m.arc(0,0,h,0,2*Math.PI,!0);m.fill();m.beginPath();m.arc(0,0,h,0,2*Math.PI,!0);m.clip();c=new ca(c);n=this.proj;g.strokeStyle="#448";h=Math.floor(c.size/2);for(m=-80;90>m;m+=10){k=H(n,Math.PI*m/180);g.beginPath();g.lineWidth=0===m?1.7:1;switch(k.type){case "line":g.moveTo(k.x-h*k.H,k.y-h*k.I);g.lineTo(k.x+h*k.H,k.y+h*k.I);break;case "circle":g.arc(k.x,
k.y,k.r,0,2*Math.PI,!0)}g.stroke()}for(m=0;180>m;m+=15){k=n.o;x=n.S;v=n.da-Math.PI*m/180;u=Math.sin(v);1E-10>Math.abs(u)||1E-10>Math.abs(x)?k={type:"line",x:0,y:0,H:Math.cos(v),I:u}:(u=k/(x*u),k={type:"circle",x:-k/(x*Math.tan(v)),y:k*Math.tan(n.ta),T:0>u,r:Math.abs(u)});g.beginPath();g.lineWidth=0===m||-180===m?1.7:1;switch(k.type){case "line":g.moveTo(k.x-h*k.H,k.y-h*k.I);g.lineTo(k.x+h*k.H,k.y+h*k.I);break;case "circle":g.arc(k.x,k.y,k.r,0,2*Math.PI,!0)}g.stroke()}g.lineWidth=2;g.beginPath();k=
H(n,Math.PI/2-c.u);switch(k.type){case "line":g.moveTo(k.x-h*k.H,k.y-h*k.I);g.lineTo(k.x+h*k.H,k.y+h*k.I);break;case "circle":g.arc(k.x,k.y,k.r,0,2*Math.PI,!0)}g.stroke();g.beginPath();k=H(n,-Math.PI/2-c.u);switch(k.type){case "line":g.moveTo(k.x-h*k.H,k.y-h*k.I);g.lineTo(k.x+h*k.H,k.y+h*k.I);break;case "circle":g.arc(k.x,k.y,k.r,0,2*Math.PI,!0)}g.stroke();g.lineWidth=1;ba(new aa,g,this.proj);g.beginPath();g.strokeStyle="rgba(255,255,255,0.7)";for(c=t;c--;)if(t=p[c][0],t=b[t],n=b[p[c][1]],t[3]||n[3])g.moveTo(t[1],
t[2]),g.lineTo(n[1],n[2]);g.stroke();c=this.proj;c=K(c,I(c,Math.PI/2+E.c.U,Math.PI/2),Math.PI/2);"circle"===c.type&&(g.beginPath(),g.strokeStyle="yellow",g.arc(c.x,c.y,c.o,0,2*Math.PI,!0),g.stroke());g.fillStyle="#FFF";for(c=0;c<r;++c)t=b[c],t[3]&&(g.beginPath(),g.arc(t[1],t[2],Math.max(3-t[0]/2,.5),0,2*Math.PI,!0),g.fill());this.f&&this.f.messier&&U(new T("Messier",this.f.messier,this.f.messier_colors),g,this.proj);this.f&&this.f.caldwell&&U(new T("Caldwell",this.f.caldwell,this.f.caldwell_colors),
g,this.proj);d=d.W(f);if(this.Qa)for(b=P.keplerCoord(d),r=E.m.Z(d),c=0;c<O.length;++c)p=O[c],t=p.ja(d,b,r),n=I(this.proj,t.theta,t.phi),n[2]&&(g.beginPath(),g.fillStyle=p.color,t=n[0],n=n[1],g.arc(t,n,p.size/2,0,2*Math.PI,!0),g.fill(),g.beginPath(),g.strokeStyle=p.color,g.arc(t,n,p.size/2+2,0,2*Math.PI,!0),g.stroke(),g.fillText&&g.fillText(p.ea.name,t+p.size/2+1,n-p.size/2-1));S(new R(.901,.451),g,this.proj);S(new R(.301,2.151),g,this.proj);b=this.proj;c=new Q;r=c.u;p=c.K;t=c.B;n=Array(t.length);
for(var q in c.style)g[q]=c.style[q];g.beginPath();for(h=0;h<t.length;++h)k=n[h]=I(b,Math.PI*t[h]/180,Math.PI*p[h]/12),k[2]&&(m=k[0],k=k[1],g.lineTo(m,k));g.stroke();for(q in c.f)g[q]=c.f[q];for(h=0;h<t.length;++h)k=n[h],k[2]&&(m=k[0],k=k[1],g.beginPath(),g.arc(m,k,2,0,2*Math.PI,!0),g.fill(),g.fillText&&g.fillText(r[h],m,k-4));Z(new V({title:"C/2009 P1 (Garradd)",xa:55920,q:1.5505367,z:-6.782E-4,e:1.0010516,sa:90.7477*l,node:325.9977*l,oa:106.17749*l},"rgba(220, 255, 220, 0.7)",f,d),g,this.proj);
Z(new V({title:"Lutetia",xa:55400,q:2.039175887090527,e:.1628669085598194,sa:250.192513362607*l,node:80.89961160386014*l,oa:3.063753824680438*l},"rgba(255, 255, 255, 0.7)",f,d),g,this.proj);g.fillText&&(g.fillStyle="gold",g.strokeStyle="black",g.lineWidth=2,g.font="20px serif",g.textAlign="center",g.textBaseline="bottom",g.strokeText("S",0,e-5),g.fillText("S",0,e-5),g.rotate(Math.PI/2+1E-5),g.strokeText("E",0,e-5),g.fillText("E",0,e-5),g.rotate(Math.PI/2),g.strokeText("N",0,e-5),g.fillText("N",0,
e-5),g.rotate(Math.PI/2),g.strokeText("W",0,e-5),g.fillText("W",0,e-5));g.restore()};window.StarMap=L;L.prototype.setPos=L.prototype.Ua;L.prototype.draw=L.prototype.Ma;window.StarJs=E;E.Math=E.Math;E.Math.DEG2RAD=E.Math.A;E.Math.RAD2DEG=E.Math.Ca;E.Math.RAD2ARCS=E.Math.Ba;E.Math.ARCS2RAD=E.Math.G;E.Math.PI2=E.Math.C;E.Math.sqr=E.Math.wa;E.Math.frac=E.Math.F;E.Math.mod=E.Math.L;E.Math.Dms=E.Math.N;E.Math.dms2deg=E.Math.V;E.Math.N.prototype.dms2deg=E.Math.N.prototype.V;E.Math.deg2dms=E.Math.ha;E.Math.angle2hms=E.Math.Da;E.Math.quadInterpolation=E.Math.va;E.Math.sinh=E.Math.sinh;E.Math.cosh=E.Math.cosh;E.Coord=E.m;E.m.precessionEclMatrix=E.m.Ta;
E.m.precessionEquMatrix=E.m.ua;E.m.eclipticObliquity=E.m.$;E.m.equ2eclMatrix=E.m.Ja;E.m.ecl2equMatrix=E.m.Z;E.m.equ2hor=E.m.Ka;E.m.hor2equ=E.m.La;E.Kepler=E.g;E.g.eccAnomaly=E.g.ia;E.g.elliptic=E.g.aa;E.g.parabolic=E.g.qa;E.g.hypAnom=E.g.ma;E.g.hyperbolic=E.g.na;E.g.keplerPos=E.g.pa;E.g.gaussVec=E.g.ba;E.Solar=E.c;E.c.EPS=E.c.U;E.c.approxMoon=E.c.P;E.c.approxSun=E.c.J;E.c.sunAndMoonEvents=E.c.Wa;E.c.Sun=E.c.R;E.c.GM=E.c.Y;E.c.Body=E.c.Body;E.c.BODIES=E.c.D;E.Time=E.l;E.l.time2mjd=E.l.ya;
E.l.mjd2dt=E.l.Pa;E.l.hms2hour=E.l.ka;E.l.hour2hms=E.l.la;E.l.dt2mjd=E.l.Ia;E.l.mjd2jct=E.l.W;E.l.gmst=E.l.ca;E.Vector=E.b;E.b.Vector3=E.b.s;E.b.s.prototype.len=E.b.s.prototype.B;E.b.s.prototype.add=E.b.s.prototype.add;E.b.s.prototype.sub=E.b.s.prototype.sub;E.b.s.prototype.neg=E.b.s.prototype.K;E.b.s.prototype.scale=E.b.s.prototype.u;E.b.s.prototype.clone=E.b.s.prototype.f;E.b.Polar3=E.b.v;E.b.v.prototype.toVector3=E.b.v.prototype.f;E.b.v.prototype.clone=E.b.v.prototype.u;E.b.Matrix3=E.b.j;
E.b.j.prototype.apply=E.b.j.prototype.apply;E.b.j.prototype.mult=E.b.j.prototype.M;E.b.j.r_x=E.b.j.f;E.b.j.r_y=E.b.j.B;E.b.j.r_y=E.b.j.B;