!function(){"use strict";var e="https://api.issinfo.net",t=3e4,n=5e3;"localhost"!==location.hostname&&"127.0.0.1"!==location.hostname||(e="http://localhost:5013");var a="IDLE",r=!1,i=[],s=null,o=null,l=null,c=0,d=0,m=0,u=0,h=!1,g="idle",y=null,p=null;function f(e){var t={earthKm:e.distance_earth_km,moonKm:e.distance_moon_km,speed:e.speed_km_s};if("LIVE"===a&&!r&&c>0&&h){var n=(Date.now()-c)/1e3;n>0&&(t.earthKm=e.distance_earth_km+d*n,t.earthKm<0&&(t.earthKm=e.distance_earth_km),e.distance_moon_km&&(t.moonKm=e.distance_moon_km+m*n,t.moonKm<0&&(t.moonKm=e.distance_moon_km)),e.speed_km_s&&(t.speed=e.speed_km_s+u*n,t.speed<0&&(t.speed=e.speed_km_s)))}return t}var v,x,b,k=[],w=0,_=0,M=!1,L=24,E=0,I=0,T=0,C=1,S=0,D=1,A=14,B=5,P=1,H=0,N=0,O=null,R=null,V=null,j=!0,U=0;function q(){j=!0}var F=!1;function J(e){return null==e||isNaN(e)?"--":F?ue(.621371*e)+" mi":ue(e)+" km"}var K,Y,X,G,z,W,Q,$,Z,ee,te,ne,ae,re,ie,se,oe,le,ce=function(e){return document.getElementById(e)},de=!0,me=null;function ue(e){return null==e||isNaN(e)?"--":Math.round(e).toLocaleString("en-US")}function he(e){return e<10?"0"+e:""+e}function ge(e,t){if(!e)return"--:--:--";var n=(t||Date.now())-new Date(e).getTime(),a="T+";return n<0&&(n=-n,a="T-"),a+Math.floor(n/864e5)+"d "+he(Math.floor(n%864e5/36e5))+":"+he(Math.floor(n%36e5/6e4))+":"+he(Math.floor(n%6e4/1e3))}var ye,pe,fe="110,231,247";function ve(e){if(!(s&&s.phases&&s.phases.length&&k[e]))return fe;for(var t=new Date(s.launch_utc).getTime(),n=(new Date(k[e].t).getTime()-t)/864e5,a=null,r=0;r=s.phases[r].start_day&&s.phases[r].color&&(a=s.phases[r].color);return a?parseInt(a.slice(1,3),16)+","+parseInt(a.slice(3,5),16)+","+parseInt(a.slice(5,7),16):fe}function xe(e,t){var n=ye.x+e*pe,a=ye.y-t*pe;return{x:(n-.5*I)*P+.5*I+H,y:(a-.5*T)*P+.5*T+N}}function be(){var e="LIVE"===a&&r&&k.length?k[Math.min(Math.round(_),k.length-1)].moon:"LIVE"===a&&l?l:"HISTORICAL"===a&&k.length?k[Math.min(Math.round(_),k.length-1)].moon:"LIVE"===a&&k.length&&w>=0?k[Math.min(w,k.length-1)].moon:null;return e&&e.x_km?xe(e.x_km,e.y_km):null}function ke(){var e=v.parentElement.getBoundingClientRect();C=window.devicePixelRatio||1,I=e.width,T=e.height,v.width=I*C,v.height=T*C,v.style.width=I+"px",v.style.height=T+"px",x.setTransform(C,0,0,C,0,0)}function we(e){var t;x?("LIVE"===a&&!r&&e-U>2e3&&(j=!0),j?(j=!1,U=e,x.clearRect(0,0,I,T),(t=x.createLinearGradient(0,0,0,T)).addColorStop(0,"#03071a"),t.addColorStop(1,"#060d26"),x.fillStyle=t,x.fillRect(0,0,I,T),function(){if(k.length<2)return D=1,A=14,B=5,ye={x:(b={x:.5*I,y:.5*T}).x,y:b.y},pe=D,void 0;for(var e=0,t=0,n=0,a=0,r=0;rt&&(t=i.x_km),i.y_kma&&(a=i.y_km),s&&null!=s.x_km&&(s.x_kmt&&(t=s.x_km),s.y_kma&&(a=s.y_km))}e>0&&(e=0),t<0&&(t=0),n>0&&(n=0),a<0&&(a=0);var o=.12*(t-e),l=.12*(a-n);l<3e4&&(l=3e4);var c=(t+=o)-(e-=o),d=(a+=l)-(n-=l);D=Math.min(I/c,T/d),b={x:(I-c*D)/2+-e*D,y:(T-d*D)/2+a*D},A=Math.max(I<500?6:10,.011*I),B=Math.max(3,.27*A),ye={x:b.x,y:b.y},pe=D,A=A*P,B=B*P,b=xe(0,0)}(),_e("earth"),_e("moon"),function(){if(k.length<2)return;var e="HISTORICAL"===a||r?Math.min(Math.round(_),k.length-1):w;if(x.save(),x.lineJoin="round",x.lineCap="butt",e0){x.strokeStyle="rgba(200,200,220,0.30)",x.lineWidth=3,x.beginPath();for(var o=!1,l=0;l<=e;l++){var c=k[l].moon;if(c&&null!=c.x_km){var d=xe(c.x_km,c.y_km);o?x.lineTo(d.x,d.y):(x.moveTo(d.x,d.y),o=!0)}}x.stroke()}x.restore()}(),function(){if(k.length<2)return;(function(){if("LIVE"!==a||!k.length||!s)return;for(var e=Date.now(),t=w;t0?Le(0,e):[];I.length>1&&Ce(I,!1);T.length>1&&Ce(T,!0);x.restore()}(),function(){var e=Se(),t=be(),n=e?xe(e.x_km,e.y_km):null,a=I<500?10:13,r=I<500?9:11,i=I<500?8:10,s=6,o=a+2,l=[];l.push({x:b.x,y:b.y,r:A}),t&&l.push({x:t.x,y:t.y,r:B});n&&l.push({x:n.x,y:n.y,r:(I<500?6:8)*P});for(var c=[],d=Math.max(1,Math.floor(k.length/300)),m=0;m0){var d=a+i/2,m=r+s/2,u=Math.max(0,Math.min(1,((d-e.x1)*o+(m-e.y1)*l)/c)),h=e.x1+u*o,g=e.y1+u*l;if(h>=a&&h<=a+i&&g>=r&&g<=r+s)return!0}if(e.x1>=a&&e.x1<=a+i&&e.y1>=r&&e.y1<=r+s)return!0;if(e.x2>=a&&e.x2<=a+i&&e.y2>=r&&e.y2<=r+s)return!0;for(var y=[{x:a,y:r},{x:a+i,y:r},{x:a,y:r+s},{x:a+i,y:r+s},{x:a+i/2,y:r},{x:a+i/2,y:r+s},{x:a,y:r+s/2},{x:a+i,y:r+s/2},{x:a+i/2,y:r+s/2}],p=1/0,f=0;f.01&&h<.99&&g>.01&&g<.99}function D(e,t,n){var a=e.x+e.w/2,r=e.y+e.h/2,i=Math.max(e.x,Math.min(e.x+e.w,t)),s=Math.max(e.y,Math.min(e.y+e.h,n));return t>=e.x&&t<=e.x+e.w&&(i=a),n>=e.y&&n<=e.y+e.h&&(s=r),{x:i,y:s}}function H(e,t,n,a,r){for(var i=0,s=0;s0&&f>0&&(i+=p*f*50)}for(var v=0;v=8){for(var w=0;w.25?"left":w<-.25?"right":"center",C=L(_,M,a,r,E);if(!(C.x<0||C.x+C.w>I||C.y<0||C.y+C.h>T)){var S=D(C,e,t),A=H(C,S,e,t,c);!p||b===p.ai&&v===p.di||(A+=f),A=0&&(Ee[i]={ai:g,di:y}),u)return u;var B=t+o,P=L(e,B,a,r,"center");return{x:e,y:B,align:"center",box:P,edge:D(P,e,t)}}function O(e,t,n,a,r,i){var s=n-e,o=a-t,l=Math.sqrt(s*s+o*o);if(!(l<8)){var c=3,d=s/l,m=o/l;x.beginPath(),x.moveTo(e+d*c,t+m*c),x.lineTo(n-d*c,a-m*c),x.strokeStyle="rgba("+r+","+.6*i+")",x.lineWidth=1.5,x.stroke()}}function R(e,t,n,a,r,i,s,o){var l=N(e,t,n,a,r,o),c={x:l.box.x,y:l.box.y,w:l.box.w,h:l.box.h};_.push(c);var d=l.edge||D(l.box,e,t),m=d.x-e,u=d.y-t;return Math.sqrt(m*m+u*u)>=8&&(M.push({x1:d.x,y1:d.y,x2:e,y2:t}),O(d.x,d.y,e,t,i,s)),l}function V(e,t){var n=20;return e>=-n&&e<=I+n&&t>=-n&&t<=T+n}x.save();var j=e?f(e):null;x.font=a+'px "IBM Plex Sans",sans-serif';var U="Earth",q=x.measureText(U).width,F=j&&j.earthKm?J(j.earthKm):"";x.font=r+'px "IBM Plex Mono",monospace';var K=F?x.measureText(F).width:0,Y=Math.max(q,K),X=F?o+r+6:o;if(V(b.x,b.y)){var G=R(b.x,b.y,A,Y,X,"255,255,255",.4,"earth"),z=G.box.y+o;x.textAlign=G.align,x.font=a+'px "IBM Plex Sans",sans-serif',x.fillStyle="rgba(255,255,255,0.85)",x.fillText(U,G.x,z),F&&(x.font=r+'px "IBM Plex Mono",monospace',x.fillStyle="rgba(134,239,172,0.6)",x.fillText(F,G.x,z+r+4))}else;if(t&&V(t.x,t.y)){x.font=a+'px "IBM Plex Sans",sans-serif';var W="Moon",Q=x.measureText(W).width,$=j&&j.moonKm?J(j.moonKm):"";x.font=r+'px "IBM Plex Mono",monospace';var Z=$?x.measureText($).width:0,ee=Math.max(Q,Z),te=$?o+r+6:o,ne=R(t.x,t.y,B,ee,te,"200,200,220",.4,"moon"),ae=ne.box.y+o;x.textAlign=ne.align,x.font=a+'px "IBM Plex Sans",sans-serif',x.fillStyle="rgba(255,255,255,0.85)",x.fillText(W,ne.x,ae),$&&(x.font=r+'px "IBM Plex Mono",monospace',x.fillStyle="rgba(196,181,253,0.6)",x.fillText($,ne.x,ae+r+4))}if(n&&V(n.x,n.y)){var re=I<500?6:8;x.font="bold "+a+'px "IBM Plex Sans",sans-serif';var ie="Orion",se=x.measureText(ie).width,oe=R(n.x,n.y,re,se,o,"253,230,138",.5,"orion");x.textAlign=oe.align,x.fillStyle="rgba(253,230,138,0.95)",x.fillText(ie,oe.x,oe.y)}x.font=i+'px "IBM Plex Sans",sans-serif';for(var le=i+2,ce=0;ce=8&&(M.push({x1:he.x,y1:he.y,x2:de.pt.x,y2:de.pt.y}),O(he.x,he.y,de.pt.x,de.pt.y,de.color,de.alpha)),x.textAlign=ue.align,x.fillStyle="rgba("+de.color+","+de.alpha+")",x.fillText(de.name,ue.x,ue.y)}}x.restore()}(),function(){var e=Se();if(!e)return;var t=xe(e.x_km,e.y_km),n=I<500?6:8,i="LIVE"!==a||r?.85:.5+.5*Math.sin(S),s=x.createRadialGradient(t.x,t.y,n,t.x,t.y,5*n);s.addColorStop(0,"rgba(253,230,138,"+.5*i+")"),s.addColorStop(1,"rgba(253,230,138,0)"),x.beginPath(),x.arc(t.x,t.y,5*n,0,2*Math.PI),x.fillStyle=s,x.fill(),x.beginPath(),x.arc(t.x,t.y,n,0,2*Math.PI),x.fillStyle="rgba(253,230,138,"+i+")",x.fill(),x.beginPath(),x.arc(t.x,t.y,.4*n,0,2*Math.PI),x.fillStyle="#fff",x.fill()}(),function(){x.save();var e=I<500?12:14;x.font="800 "+e+'px "IBM Plex Sans",sans-serif',x.textAlign="left",x.fillStyle="rgba(255,255,255,0.3)",x.fillText("issinfo.net",8,T-8),x.restore()}(),(S+=.04)>2*Math.PI&&(S-=2*Math.PI),requestAnimationFrame(we)):requestAnimationFrame(we)):requestAnimationFrame(we)}function _e(e){var t="earth"===e,n=t?b:be();if(n){var a=t?A:B;if(t){var r=x.createRadialGradient(n.x,n.y,a,n.x,n.y,2.5*a);r.addColorStop(0,"rgba(100,180,255,0.12)"),r.addColorStop(.6,"rgba(60,140,255,0.03)"),r.addColorStop(1,"rgba(0,0,0,0)"),x.beginPath(),x.arc(n.x,n.y,2.5*a,0,2*Math.PI),x.fillStyle=r,x.fill();var i=x.createRadialGradient(n.x-.3*a,n.y-.3*a,.1*a,n.x,n.y,a);i.addColorStop(0,"#4a9eff"),i.addColorStop(.4,"#1a6dcc"),i.addColorStop(.8,"#0e4a8a"),i.addColorStop(1,"#0a3366"),x.beginPath(),x.arc(n.x,n.y,a,0,2*Math.PI),x.fillStyle=i,x.fill(),x.save(),x.beginPath(),x.arc(n.x,n.y,a,0,2*Math.PI),x.clip(),x.fillStyle="rgba(34,120,60,0.45)",Me(n.x-.35*a,n.y-.15*a,.25*a,.5*a),Me(n.x+.15*a,n.y-.1*a,.2*a,.45*a),Me(n.x+.35*a,n.y-.3*a,.35*a,.3*a),x.restore(),x.beginPath(),x.arc(n.x,n.y,a+2,0,2*Math.PI),x.strokeStyle="rgba(100,180,255,0.2)",x.lineWidth=1.5,x.stroke()}else{var s=x.createRadialGradient(n.x,n.y,a,n.x,n.y,2*a);s.addColorStop(0,"rgba(200,200,210,0.08)"),s.addColorStop(1,"rgba(0,0,0,0)"),x.beginPath(),x.arc(n.x,n.y,2*a,0,2*Math.PI),x.fillStyle=s,x.fill();var o=x.createRadialGradient(n.x-.25*a,n.y-.25*a,.1*a,n.x,n.y,a);o.addColorStop(0,"#d4d4d8"),o.addColorStop(.5,"#a1a1aa"),o.addColorStop(1,"#71717a"),x.beginPath(),x.arc(n.x,n.y,a,0,2*Math.PI),x.fillStyle=o,x.fill(),x.fillStyle="rgba(80,80,90,0.3)",[[.2,-.3,.15],[-.3,.1,.12],[.1,.35,.1]].forEach(function(e){x.beginPath(),x.arc(n.x+e[0]*a,n.y+e[1]*a,e[2]*a,0,2*Math.PI),x.fill()})}}}function Me(e,t,n,a){x.beginPath(),x.ellipse(e,t,n,a,-.2,0,2*Math.PI),x.fill()}function Le(e,t){for(var n=[],a=null,r=e;r=k.length&&(t=k.length-1),V&&t=k.length)){for(var o=Te(i),l=(new Date(k[i].t).getTime()-a)/864e5,c="",d=0;d=s.phases[d].start_day&&(c=s.phases[d].name);p(o,e[r].color,c);var m=e[r-1].to;if(m>=0&&mu&&y=0?k[Math.min(w,k.length-1)].orion:null}function De(){var e=s;return!!(e&&e.phases&&e.phases.length)&&(Date.now()-new Date(e.launch_utc).getTime())/864e5>=e.phases[e.phases.length-1].start_day}function Ae(){return y?new Date(y).getTime():s&&s.splashdown_utc?new Date(s.splashdown_utc).getTime():0}function Be(e){if(e<=0)return"now";var t=Math.floor(e/1e3),n=Math.floor(t/60);t%=60;var a=Math.floor(n/60);return n%=60,a>0?a+"h "+he(n)+"m "+he(t)+"s":n+"m "+he(t)+"s"}function Pe(e,i){var o=s;if(G){if(!o)return G.textContent="--:--:--",z.textContent=F?"-- mi":"-- km",W.textContent=F?"-- mi":"-- km",Q.textContent=F?"-- mph":"-- km/s",$.textContent="--",void(Z&&(Z.style.width="0%"));var l=e||Date.now();if(("HISTORICAL"===a||r)&&k.length){var d=Math.min(Math.round(_),k.length-1);l=new Date(k[d].t).getTime()}G.textContent=ge(o.launch_utc,l);var m=new Date(o.launch_utc).getTime(),u=new Date(o.splashdown_utc).getTime(),h=Math.max(1,Math.ceil((l-m)/864e5+.01));$.textContent="Day "+h+" of "+Math.ceil((u-m)/864e5),Z&&(Z.style.width=Math.min(100,Math.max(0,function(e,t){if(!e)return 0;var n=new Date(e.launch_utc).getTime(),a=new Date(e.splashdown_utc).getTime(),r=t||Date.now();return r<=n?0:r>=a?100:(r-n)/(a-n)*100}(o,l))).toFixed(1)+"%");var y,v=Se();if(v){var x=f(v);z.textContent=J(x.earthKm),W.textContent=x.moonKm?J(x.moonKm):F?"-- mi":"-- km",Q.textContent=x.speed?null==(y=x.speed)||isNaN(y)?"--":F?ue(2236.936*y)+" mph":y.toFixed(2)+" km/s":F?"-- mph":"-- km/s"}else z.textContent=F?"-- mi":"-- km",W.textContent=F?"-- mi":"-- km",Q.textContent=F?"-- mph":"-- km/s";if("LIVE"===a&&ee)if(r)ee.className="freshness-dot amber",ut();else if("completed_recently"===g){ee.className="freshness-dot green";var b=(L=Ae())>0?Math.floor((Date.now()-L)/6e4):0,M=b<1?"just now":b+" minute"+(1===b?"":"s")+" ago";mt("success","Splashdown! "+(s?s.name:"Mission")+" has completed successfully. Splashdown "+M+". Showing last tracked position.")}else if("reentry"===g){ee.className="freshness-dot red";var L,E=(L=Ae())>0?L-Date.now():0,I=function(){if(!pt||!pt.events||!s)return null;var e=new Date(s.launch_utc).getTime(),t=Date.now(),n=Ae(),a=0;if(n>0)for(var r=pt.events.length-1;r>=0;r--)if("Splashdown"===pt.events[r].title){a=pt.events[r].met_day;break}for(var i=a>0?e+864e5*a:0,o=n>0&&i>0?n-i:0,l=0;lt)return{title:c.title,time:d,category:c.category}}return null}(),T="Re-entry in progress -- Tracking data has ended as Orion enters Earth's atmosphere.";p&&!p.has_signal&&p.signal_lost?T="Re-entry in progress -- DSN signal lost. Orion is in communications blackout.":p&&p.has_signal&&p.signal_acquired&&function(){if(!k.length||"LIVE"!==a||r)return!1;if(we}()&&(T="Signal reacquired! Orion has survived re-entry. Parachute descent in progress."),E>0?T+=" Splashdown expected in "+Be(E)+".":E>-3e5&&(T+=" Splashdown expected any moment."),I&&I.time>Date.now()&&(T+=" Next: "+I.title+" in "+Be(I.time-Date.now())+"."),mt("reentry",T)}else{var C=(Date.now()-c)/1e3;if(ee.className="freshness-dot "+(C<120?"green":C<600?"amber":"red"),c>0&&C>=600)dt("warning","Loss of signal -- Orion may be behind the Moon and out of contact with NASA's Deep Space Network. Showing last known position from "+(new Date(c).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"})+" UTC")+".");else C<120&&ut()}!function(e,t){var n=s,a=ce("mo-name"),r=ce("mo-badge"),i=ce("mo-launch"),o=ce("mo-splash"),l=ce("mo-duration"),c=ce("mo-phase"),d=ce("mo-next"),m=ce("mo-maxdist"),u=ce("mo-crew-section"),h=ce("mo-crew");if(!a)return;if(!n)return void(ce("artemis-side-panel").style.opacity="0.4");ce("artemis-side-panel").style.opacity="",a.textContent=n.name;var y=ce("mo-status-line");if("active"===n.status){if("reentry"===g){if(r.textContent="RE-ENTRY",r.className="sp-badge reentry",y)(I=(B=Ae())>0?B-e:0)>0?(y.textContent="Splashdown in "+Be(I),y.style.color="#f97316"):(y.textContent="Splashdown any moment",y.style.color="#f97316"),y.className="sp-status-line active"}else if("completed_recently"===g){if(r.textContent="COMPLETE",r.className="sp-badge completed-recently",y){var p=(B=Ae())>0?Math.floor((e-B)/6e4):0;y.textContent=p<1?"Splashdown just now!":"Splashdown "+p+"m ago",y.style.color="#22c55e",y.className="sp-status-line active"}}else r.textContent="LIVE",r.className="sp-badge live",y&&(y.className="sp-status-line")}else if("completed_recently"===g){if(r.textContent="COMPLETE",r.className="sp-badge completed-recently",y){p=(B=Ae())>0?Math.floor((e-B)/6e4):0;y.textContent=p<1?"Splashdown just now!":"Splashdown "+p+"m ago",y.style.color="#22c55e",y.className="sp-status-line active"}}else r.textContent=n.status.toUpperCase(),r.className="sp-badge completed",y&&(y.className="sp-status-line");var f=new Date(n.launch_utc),v=new Date(n.splashdown_utc);i.textContent=He(f),o.textContent=He(v);var x=(v.getTime()-f.getTime())/36e5,b=Math.floor(x/24),k=Math.round(x-24*b);24===k&&(b++,k=0);if(l.textContent=b+"d "+k+"h",n.phases&&n.phases.length){for(var w=(e-f.getTime())/864e5,_=0,M=0;M=n.phases[M].start_day&&(_=M);var L=n.phases[_].color||"#6ee7f7",E='';if(c.innerHTML=E+''+n.phases[_].name+"",_+10){var S=Math.floor(I/36e5),D=Math.floor(I%36e5/6e4),A=Math.floor(S/24);S%=24,d.innerHTML=''+T.name+''+(A>0?A+"d ":"")+S+"h "+D+"m"}else d.innerHTML=''+T.name+""}else{var B,P=(B=Ae())>0?B-e:0;d.innerHTML="completed_recently"===g||P<=0?'Splashdown!':'Splashdown'+Be(P)+""}}else c.textContent="--",d.textContent="--";m.textContent=n.max_dist_km?J(n.max_dist_km):"--",n.crewed&&n.crew&&n.crew.length?(u.classList.add("sp-visible"),t||(h.innerHTML=n.crew.map(function(e){return''+e.name+""}).join(""))):u.classList.remove("sp-visible");var H=ce("mo-legend-section"),N=ce("mo-legend");H&&N&&n.phases&&n.phases.length?(H.classList.add("sp-visible"),t||(N.innerHTML=n.phases.map(function(e){return'
'+e.name+"
"}).join(""))):H&&H.classList.remove("sp-visible")}(l,i),function(){var e=ce("dsn-section"),t=ce("dsn-signal"),n=ce("dsn-dish"),r=ce("dsn-rate");if(!e||!t)return;if(!p||"LIVE"!==a)return void(e.style.display="none");e.style.display="",p.has_signal?t.innerHTML=' Locked':t.innerHTML=' No signal';if(p.dishes&&p.dishes.length>0){var i=p.dishes.join(", ");p.station&&(i+=" ("+p.station+")"),n.textContent=i}else n.textContent="--";r.textContent=p.has_signal?(s=p.downlink_bps,!s||s<=0?"--":s>=1e6?(s/1e6).toFixed(1)+" Mbps":s>=1e3?(s/1e3).toFixed(0)+" kbps":s+" bps"):"--";var s}(),function(){if(!R||"LIVE"!==a)return;var e=De()?n:t;e!==Ve&&(Ve=e,je(),R=setInterval(Oe,Ve))}()}}function He(e){return e.getUTCDate()+" "+["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][e.getUTCMonth()]+" "+e.getUTCFullYear()+" "+he(e.getUTCHours())+":"+he(e.getUTCMinutes())+" UTC"}function Ne(){fetch(e+"/artemis/missions").then(function(e){return e.json()}).then(function(e){i=e.missions||[],function(){if(!K)return;if(de&&me)return;K.innerHTML="";var e=document.createElement("optgroup");e.label="Active / Upcoming";var t=document.createElement("optgroup");t.label="Past Missions";for(var n=!1,a=!1,r=0;rnew Date(t.splashdown_utc))&&(t=i[a]);e?qe(e,"LIVE"):t&&qe(t,"HISTORICAL")}()}).catch(function(e){console.error(e),dt("warning","Unable to load missions.")})}function Oe(){fetch(e+"/artemis/live").then(function(e){return e.json()}).then(function(e){if(g=e.status||"idle",e.splashdown_utc&&(y=e.splashdown_utc),e.dsn&&(p=e.dsn),"active"!==e.status&&"reentry"!==e.status||!e.orion)if("reentry"!==e.status||e.orion){if("completed_recently"===e.status){if(e.orion&&!o&&(o=e.orion,l=e.moon||null),e.mission)for(var t=0;t0){var a=(n-c)/1e3;if(a>1&&a<120){var r=(e.orion.distance_earth_km-o.distance_earth_km)/a;0!==r&&(d=r,h=!0);var s=e.orion.distance_moon_km&&o.distance_moon_km?(e.orion.distance_moon_km-o.distance_moon_km)/a:0;0!==s&&(m=s);var f=e.orion.speed_km_s&&o.speed_km_s?(e.orion.speed_km_s-o.speed_km_s)/a:0;0!==f&&(u=f)}}o=e.orion,l=e.moon||null,c=n,q(),Pe()}}).catch(function(e){console.error(e)})}function Re(t,n){n||dt("info","Loading trajectory…"),fetch(e+"/artemis/history/"+t).then(function(e){if(!e.ok)throw new Error("HTTP "+e.status);return e.json()}).then(function(e){k=e.points||[],w=e.now_index||0,_="LIVE"===a?w:0,r=!1,function(){if(k.length&&!(w<1)){var e=Math.max(0,w-1),t=w,n=new Date(k[e].t).getTime(),a=(new Date(k[t].t).getTime()-n)/1e3;if(!(a<=0)){var r=k[e].orion,i=k[t].orion;r.distance_earth_km&&i.distance_earth_km&&(d=(i.distance_earth_km-r.distance_earth_km)/a),r.distance_moon_km&&i.distance_moon_km&&(m=(i.distance_moon_km-r.distance_moon_km)/a),r.speed_km_s&&i.speed_km_s&&(u=(i.speed_km_s-r.speed_km_s)/a),h=!0}}}(),ut(),q(),k.length&&(te.style.display="block",function(){if(!s||!k.length)return;var e=new Date(s.launch_utc).getTime(),t=(new Date(s.splashdown_utc).getTime()-e)/864e5;re.innerHTML="";for(var n=Math.ceil(t),a=n<=8?1:n<=16?2:n<=24?3:n<=40?5:10,r=0;r<=n;r++){var i=document.createElement("span"),o=r%a===0||r===n&&!(r===n&&n%a!==0&&n%a<.6*a);i.className="tick"+(o?" major":" minor"),i.style.left=r/n*100+"%";var l=document.createElement("span");l.textContent=r,i.appendChild(l),re.appendChild(i)}for(var c=ne.querySelectorAll(".timeline-phase"),d=0;dArtemis I was an uncrewed test flight of the Space Launch System (SLS) rocket and Orion spacecraft. Launched on 16 November 2022, Orion travelled beyond the Moon and entered a Distant Retrograde Orbit (DRO), a stable orbit roughly 70,000 km (43,000 miles) beyond the far side of the Moon.

The mission lasted 25 days, covering over 2.2 million km (1.4 million miles). Orion reached a maximum distance of 432,210 km (268,563 miles) from Earth, the farthest any spacecraft designed to carry humans has ever travelled. The flight tested the heat shield at lunar return speeds of 11 km/s (25,000 mph) using a skip re-entry technique, dipping into the atmosphere, bouncing back up, then plunging in for final descent.

Artemis I proved that SLS and Orion were ready to carry astronauts. The data from this mission directly shaped the flight plan for Artemis II.

",mobile:"Artemis I was a 25-day uncrewed test flight in November 2022. Orion travelled beyond the Moon into Distant Retrograde Orbit, reaching 432,210 km (268,563 miles) from Earth, the farthest any human-rated spacecraft has ever flown."},"artemis-2":{desktop:"

Artemis II was a free-return trajectory mission, the simplest and most elegant way to reach the Moon and come back. After launch, a single powerful burn from the upper stage (Trans-Lunar Injection) flung Orion toward the Moon at around 11 km/s (25,000 mph). From that point on, no major engine burns were needed. Gravity did the rest.

During the outbound coast, Earth's gravity steadily pulled Orion back, decelerating it from ~11 km/s down to less than 1 km/s (2,200 mph) as it approached the Moon. The Moon's gravity then swung Orion around its far side, a gravitational slingshot that redirected the spacecraft back toward Earth without any braking burn. On the return coast, Earth's gravity accelerated Orion again, pulling it faster and faster until it hit the atmosphere at roughly 11 km/s (about 40,000 km/h / 25,000 mph). The speed curve was a \"U\" shape: fast, slow, fast.

Re-entry was dramatic. Orion used a skip re-entry technique, dipping into the upper atmosphere to shed some speed, bouncing back up briefly, then plunging in for final descent, spreading the extreme heating (~2,800°C / 5,000°F) over two passes. The heat shield handled forces of 4-6G.

Note: tracking data from JPL Horizons cut out during re-entry as Orion entered the atmosphere. The last tracked position is just before atmospheric interface at roughly 120 km (75 miles) altitude.

",mobile:"Replay Orion's complete journey to the Moon and back. Artemis II used a free-return trajectory -- one big burn toward the Moon, then gravity did the rest. Earth slowed Orion on the way out, the Moon slung it back, and Earth's gravity accelerated it home to a fiery 11 km/s (25,000 mph) re-entry."}};function qe(i,c){var d,m,u,h,g=de&&me===i.mission_id;if(de&&(de=!1),s=i,a=c||("active"===i.status?"LIVE":"HISTORICAL"),q(),K&&(K.value=i.mission_id),!g&&Y&&(Y.innerHTML="LIVE"===a?'LIVE':'COMPLETED'),te&&(te.style.display=k.length>1?"block":"none"),je(),Ze(),r=!1,k=[],_=0,w=0,o=null,l=null,function(e){var t=ce("mission-description"),n=ce("mob-desc-short"),a=ce("mob-desc-full"),r=ce("mission-description-mobile"),i=ce("mob-desc-toggle"),s=e?Ue[e.mission_id]:null;t&&t.getAttribute("data-mission")===(e&&e.mission_id)||(t&&(t.innerHTML=s?s.desktop:"",t.setAttribute("data-mission",e?e.mission_id:"")),n&&(n.textContent=s?s.mobile:""),a&&(a.innerHTML=s?s.desktop:""),r&&r.setAttribute("data-mission",e?e.mission_id:"")),r&&r.classList.remove("expanded"),i&&(i.textContent=" ...more",i.style.display=s?"":"none")}(i),!g&&window.__artemisFAQs&&window.__artemisFAQs[i.mission_id]){var y=ce("faq-wrapper");y&&(y.innerHTML=window.__artemisFAQs[i.mission_id])}"LIVE"===a&&(je(),Ve=De()?n:t,Oe(),R=setInterval(Oe,Ve)),Re(i.mission_id,g),Ct(i.mission_id),d=i.mission_id,m=document.getElementById("gallery-days"),u=document.getElementById("gallery-empty"),h=document.getElementById("gallery-hero"),fetch(e+"/artemis/gallery/"+d).then(function(e){if(!e.ok)throw new Error("HTTP "+e.status);return e.json()}).then(function(e){Rt=e,function(e){var t=document.getElementById("gallery-days"),n=document.getElementById("gallery-empty"),a=document.getElementById("gallery-hero"),r=document.getElementById("gallery-summary");if(t){if(!e||!e.days||0===e.days.length)return t.innerHTML="",a&&(a.style.display="none"),n&&(n.style.display=Ot?"block":"none"),void(r&&(r.textContent=""));if(n&&(n.style.display="none"),r){for(var i=0,s=0;s=0&&i++;var o=[e.total_images+" photos"];i>0&&o.push(i+" mission day"+(1!==i?"s":"")),r.textContent=o.join(" · ")}Vt=[];for(var l=0;l=0&&e.days[y].images.length>0){g=e.days[y].images[0];break}if(!g&&e.days.length>0&&e.days[0].images.length>0&&(g=e.days[0].images[0]),g&&a){for(var p=tn(g.large_url||g.medium_url||g.thumb_url),f=0,v=0;v",a.style.display="block",a.onclick=function(){zt(f)}}else a&&(a.style.display="none");for(var x="",b=0,k=0;k',x+='";var L=Math.min(w.images.length,Ft);x+='",b++}if(w.images.length>Ft){var T=w.images.length-Ft;x+='",b+=T}Kt[k]=L,x+="",x+=""}t.innerHTML=x;for(var C=t.querySelectorAll(".gallery-thumb"),S=0;S0?1:-1))),"LIVE"===a&&(r=!0),q(),Fe(),Pe(),Qe())}function We(){"LIVE"===a&&(r=!1,_=w,Ze(),q(),Fe(),Pe(),Qe())}function Qe(){var e=ce("go-live-btn");e&&(e.style.display="LIVE"===a&&r?"inline-block":"none")}function $e(){M?Ze():function(){if(!k.length)return;M=!0,ie.innerHTML="▮▮ Pause",ie.classList.add("active"),E=performance.now(),requestAnimationFrame(et)}()}function Ze(){M=!1,ie.innerHTML="▶ Play",ie.classList.remove("active")}function et(e){if(M){var t=(e-E)/1e3;E=e,_+=3600*L/2.5/300*t,"LIVE"===a&&(r=!0),q(),_>=k.length-1&&(_=k.length-1,Ze()),_=Math.max(0,Math.min(k.length-1,_)),Fe(),Pe(),M&&requestAnimationFrame(et)}}var tt=!1;function nt(){tt=!tt,document.body.classList.toggle("artemis-fullscreen-active",tt),window.scrollTo(0,0),setTimeout(function(){ke(),q()},50)}var at="m3kR2KK8TEs",rt=!1,it=!0,st=!1;function ot(){if(window.innerWidth<768)window.open("https://www.youtube.com/watch?v="+at,"_blank");else{var e=ce("nasatv-player"),t=ce("nasatv-btn");if(e)if(rt=!rt){if(e.classList.add("open"),t.classList.add("active"),!st)ce("nasatv-video").innerHTML='',st=!0,it=!1,e.classList.remove("collapsed"),setTimeout(function(){it=!0,e.classList.add("collapsed")},1500)}else lt()}}function lt(){var e=ce("nasatv-player"),t=ce("nasatv-btn");if(e){e.classList.remove("open","collapsed");var n=ce("nasatv-video");n&&(n.innerHTML=""),st=!1}t&&t.classList.remove("active"),rt=!1}function ct(){var e=ce("nasatv-player");e&&(it=!it,e.classList.toggle("collapsed",it))}function dt(e,t){X.className="artemis-banner "+e,X.textContent=t,X.style.display="block"}function mt(e,t){X.className="artemis-banner "+e,X.innerHTML=t,X.style.display="block"}function ut(){X.style.display="none"}function ht(){K.addEventListener("change",function(){for(var e=0;e0){var d=v.getBoundingClientRect(),m=(o[0].x+o[1].x)/2-d.left-.5*I,u=(o[0].y+o[1].y)/2-d.top-.5*T,h=c/l,g=Math.max(.5,Math.min(20,P*h));H=m-g/P*(m-H),N=u-g/P*(u-N),P=g}var y=(i[0].x+i[1].x)/2,p=(i[0].y+i[1].y)/2,f=(o[0].x+o[1].x)/2,x=(o[0].y+o[1].y)/2;H+=f-y,N+=x-p,i=o,q()}else if(1===e.touches.length&&null!=s){e.preventDefault();for(var b=0;b0?o+a+"d "+he(i)+":"+he(s):o+he(i)+":"+he(s)}function Lt(e){var t=new Date(e);return t.getUTCDate()+" "+["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][t.getUTCMonth()]+" "+he(t.getUTCHours())+":"+he(t.getUTCMinutes())+" UTC"}function Et(e){var t=new Date(e),n=t.getHours(),a=t.getMinutes(),r=n>=12?"PM":"AM",i=n%12||12;return t.getDate()+" "+["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][t.getMonth()]+" "+i+":"+he(a)+" "+r+" Local"}function It(e){if(e<60)return e+" min";var t=Math.floor(e/60),n=e%60;return n>0?t+"h "+n+"m":t+"h"}function Tt(e){var t=document.createElement("div");return t.appendChild(document.createTextNode(e)),t.innerHTML}function Ct(t){ft&&(clearInterval(ft),ft=null),vt&&(clearInterval(vt),vt=null),fetch(e+"/artemis/itinerary/"+t).then(function(e){if(!e.ok)throw new Error("HTTP "+e.status);return e.json()}).then(function(e){pt=e,St(e),rn(),"active"===e.status&&(vt=setInterval(function(){!function(){if(!pt||!pt.events||!s)return;for(var e=new Date(pt.launch_utc).getTime(),t=(Date.now()-e)/1e3,n=!1,a=0;a=o?"completed":"upcoming":t>=l?"completed":t>=o?"active":"upcoming",r.status!==i&&(r.status=i,n=!0)}else"completed"!==r.status&&(r.status="completed",n=!0)}n&&St(pt)}()},wt),ft=setInterval(function(){Ct(t)},kt))}).catch(function(){pt=null;var e=document.getElementById("itinerary-timeline"),t=document.getElementById("itinerary-empty"),n=document.getElementById("itinerary-static");e&&(e.style.display="none"),n&&(n.style.display="none"),t&&(t.style.display=xt?"block":"none")})}function St(e){var t=document.getElementById("itinerary-timeline"),n=document.getElementById("itinerary-empty"),a=document.getElementById("itinerary-static"),r=document.getElementById("itin-scroll-btn"),i=document.getElementById("itinerary-summary");if(t){if(a&&(a.style.display="none"),!e||!e.events||0===e.events.length)return t.style.display="none",n&&(n.style.display=xt?"block":"none"),void(i&&(i.textContent=""));if(n&&(n.style.display="none"),t.style.display=xt?"block":"none",i){for(var o=e.events.length,l={},c=0,d=0,m=0;m0?u.push(d+" active"):c>0&&u.push(c+" completed"),i.textContent=u.join(" · ")}var h=e.events,g="",y="",p=null,f={};if(s&&s.phases)for(var v=0;v'+Tt(y=b.phase)+"");var w="itin-event--"+b.status,_="itin-evt-"+x;if("active"===b.status&&(p=_),g+='
',g+='
',g+='
',g+=''+Mt(b.met_day)+"",g+=''+Lt(b.time_utc)+"",g+=''+Et(b.time_utc)+"",g+="
",g+='
',g+=''+Tt(b.title)+"",g+=''+(_t[b.category]||b.category)+"",b.duration_min>0&&(g+=''+It(b.duration_min)+""),g+="
",g+='

'+Tt(b.description)+"

",b.crew&&b.crew.length>0){g+='
';for(var M=0;M'+Tt(b.crew[M])+"";g+="
"}g+="
"}t.innerHTML=g;var L=p;if(!L)for(m=0;m0)for(var E=h.length-1;E>=0;E--)if("completed"===h[E].status){L="itin-evt-"+E;break}bt=!("active"!==e.status||!L),r&&(bt?(r.style.display=xt?"inline-block":"none",r.onclick=function(){var e=document.getElementById(L);e&&e.scrollIntoView({behavior:"smooth",block:"center"})}):r.style.display="none")}}var Dt,At,Bt,Pt,Ht,Nt,Ot=!1,Rt=null,Vt=[],jt=0,Ut=!1,qt=null,Ft=12,Jt=24,Kt={};function Yt(e){var t=e.split("-");if(3!==t.length)return e;var n=parseInt(t[1],10)-1,a=parseInt(t[2],10);return["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][n]+" "+a+", "+t[0]}function Xt(e){if(Rt&&Rt.days[e]){var t=Rt.days[e],n=document.getElementById("gallery-row-"+e);if(n){var a=n.querySelector(".gallery-show-more")||n.querySelector(".gallery-load-more");a&&a.remove();for(var r=0,i=0;i",u.addEventListener("click",function(e){return function(){zt(e)}}(m)),n.appendChild(u)}Kt[e]=o;var h=document.createElement("div");h.className="gallery-day-actions";var g=t.images.length-o;if(g>0){var y=document.createElement("div");y.className="gallery-load-more",y.setAttribute("data-day",e),y.innerHTML="Load "+Math.min(g,Jt)+' moreshowing '+o+" of "+t.images.length+"",y.addEventListener("click",function(){Xt(e)}),h.appendChild(y)}var p=document.createElement("div");p.className="gallery-collapse",p.textContent="Show less",p.addEventListener("click",function(){!function(e){if(!Rt||!Rt.days[e])return;var t=Rt.days[e],n=document.getElementById("gallery-row-"+e);if(!n)return;for(var a=0,r=0;r=0;o--){var l=i[o];if(l.classList.contains("gallery-day-actions")||l.classList.contains("gallery-load-more")||l.classList.contains("gallery-show-more"))l.remove();else if(l.classList.contains("gallery-thumb"))parseInt(l.getAttribute("data-gallery-idx"),10)>=a+s&&l.remove()}if(Kt[e]=s,t.images.length>Ft){var c=t.images.length-Ft,d=document.createElement("div");d.className="gallery-show-more",d.setAttribute("data-day",e),d.innerHTML="Show "+c+' moreshowing '+s+" of "+t.images.length+"",d.addEventListener("click",function(){Xt(e)}),n.appendChild(d)}var m=n.parentElement;m&&m.scrollIntoView({behavior:"smooth",block:"nearest"})}(e)}),h.appendChild(p),n.appendChild(h),Gt()}}}function Gt(){if(qt&&qt.disconnect(),"IntersectionObserver"in window){qt=new IntersectionObserver(function(e){for(var t=0;t=Vt.length)){jt=e,Ut=!0;var t=document.getElementById("gallery-lightbox");t&&t.classList.add("gallery-lb-open"),document.body.style.overflow="hidden",Qt()}}function Wt(){Ut=!1;var e=document.getElementById("gallery-lightbox");e&&e.classList.remove("gallery-lb-open"),document.body.style.overflow=""}function Qt(){if(!(!Ut||jt<0||jt>=Vt.length)){var e=Vt[jt],t=e.image,n=document.getElementById("gallery-lb-img"),a=document.getElementById("gallery-lb-title"),r=document.getElementById("gallery-lb-desc"),i=document.getElementById("gallery-lb-meta"),s=document.getElementById("gallery-lb-spinner"),o=tn(t.large_url||t.medium_url||t.thumb_url);if(n){n.style.opacity="0.3",s&&(s.style.display="block");var l=new Image;l.onload=function(){n.src=o,n.alt=t.title,n.style.opacity="1",s&&(s.style.display="none")},l.onerror=function(){n.src=tn(t.medium_url||t.thumb_url),n.alt=t.title,n.style.opacity="1",s&&(s.style.display="none")},l.src=o}if(a&&(a.textContent=t.title),r){var c=t.description||"";c.length>200&&(c=c.substring(0,200)+"..."),r.textContent=c}if(i){var d=[e.dayLabel];t.photographer&&d.push(t.photographer),e.phases&&e.phases.length&&d.push(e.phases.join(", ")),i.textContent=d.join(" · ")}var m=document.getElementById("gallery-lb-prev"),u=document.getElementById("gallery-lb-next");m&&(m.style.display=jt>0?"":"none"),u&&(u.style.display=jt=Vt.length)){var t=Vt[jt].image,n=t.orig_url||t.large_url||t.medium_url||t.thumb_url;if(n){var a=(t.title||t.nasa_id||"photo").replace(/[^a-zA-Z0-9]+/g,"-").replace(/^-|-$/g,"").toLowerCase();a.length>80&&(a=a.substring(0,80).replace(/-$/,""));var r=n.split(".").pop().split("?")[0].toLowerCase();-1===["jpg","jpeg","png","tif","tiff"].indexOf(r)&&(r="jpg");var i="issinfo-"+a+"."+r,s=e+"/artemis/gallery/img?dl=1&fname="+encodeURIComponent(i)+"&url="+encodeURIComponent(n),o=document.getElementById("gallery-lb-download");o&&(o.textContent="..."),fetch(s).then(function(e){if(!e.ok)throw new Error("HTTP "+e.status);return e.blob()}).then(function(e){var t=document.createElement("a");t.href=URL.createObjectURL(e),t.download=i,document.body.appendChild(t),t.click(),document.body.removeChild(t),URL.revokeObjectURL(t.href),o&&(o.innerHTML="⇩")}).catch(function(){window.open(s,"_blank"),o&&(o.innerHTML="⇩")})}}}function Zt(e){if(!e)return"";var t=document.createElement("div");return t.appendChild(document.createTextNode(e)),t.innerHTML}function en(e){return e?e.replace(/&/g,"&").replace(/"/g,""").replace(//g,">"):""}function tn(t){return t?e+"/artemis/gallery/img?url="+encodeURIComponent(t):""}Dt=document.getElementById("gallery-toggle"),At=document.getElementById("gallery-body"),Bt=document.getElementById("gallery-arrow"),Dt&&Dt.addEventListener("click",function(){Ot=!Ot,At&&(At.style.display=Ot?"block":"none"),Bt&&(Bt.style.transform=Ot?"rotate(180deg)":"")}),function(){var e=document.getElementById("gallery-lb-close"),t=document.getElementById("gallery-lb-prev"),n=document.getElementById("gallery-lb-next"),a=document.getElementById("gallery-lb-download"),r=document.getElementById("gallery-lightbox");e&&e.addEventListener("click",Wt),a&&a.addEventListener("click",$t),t&&t.addEventListener("click",function(){jt>0&&(jt--,Qt())}),n&&n.addEventListener("click",function(){jt0&&(jt--,Qt()),e.preventDefault()):"ArrowRight"===e.key&&(jt50&&Math.abs(n)>1.5*Math.abs(a)&&(n<0&&jt0&&jt>0&&(jt--,Qt()))}},{passive:!0}))}();function nn(){var t=new XMLHttpRequest;t.open("GET",e+"/artemis/viewers"),t.timeout=5e3,t.onload=function(){if(200===t.status)try{var e=JSON.parse(t.responseText);e.viewers>1&&Pt&&Ht?(Pt.textContent=e.viewers.toLocaleString()+" watching",Ht.style.opacity="1",Nt&&e.peak_viewers>0&&(Nt.textContent="(peak: "+e.peak_viewers.toLocaleString()+" on "+function(e){if(!e)return"";var t=new Date(e);return["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][t.getUTCMonth()]+" "+t.getUTCDate()+", "+he(t.getUTCHours())+":"+he(t.getUTCMinutes())+" UTC"}(e.peak_timestamp)+")",Nt.style.display="")):Ht&&(Ht.style.opacity="0")}catch(e){}},t.onerror=t.ontimeout=function(){},t.send()}function an(){!function(){K=ce("mission-selector"),Y=ce("status-badge"),X=ce("artemis-banner"),G=ce("met-value"),z=ce("earth-dist-value"),W=ce("moon-dist-value"),Q=ce("velocity-value"),$=ce("progress-value"),Z=ce("progress-bar"),ee=ce("freshness-dot"),te=ce("timeline-section"),ne=ce("timeline-bar"),ae=ce("timeline-handle"),re=ce("timeline-ticks"),ie=ce("play-btn"),se=ce("scrub-time"),oe=ce("fullscreen-btn"),le=ce("fullscreen-exit-btn");var e=document.querySelector("[data-server-mission]");me=e?e.getAttribute("data-server-mission"):null;try{F="imperial"===localStorage.getItem("artemis-units")}catch(e){}yt()}(),v=ce("artemis-canvas"),x=v.getContext("2d"),ke(),"undefined"!=typeof ResizeObserver?new ResizeObserver(function(){ke(),q()}).observe(v.parentElement):window.addEventListener("resize",function(){ke(),q()}),ht(),Ne(),O&&clearInterval(O),O=setInterval(function(){"LIVE"===a&&Pe()},1e3),we(),Pt=ce("viewer-count"),Ht=ce("viewer-overlay"),Nt=ce("viewer-peak"),nn(),setInterval(nn,6e4),window.addEventListener("hashchange",rn)}function rn(){var e=location.hash.replace("#","").toLowerCase();if(e){var t={itinerary:{sectionId:"itinerary-section",open:function(){if(!xt){xt=!0;var e=document.getElementById("itinerary-timeline"),t=document.getElementById("itinerary-empty"),n=document.getElementById("itinerary-arrow"),a=document.getElementById("itin-scroll-btn");e&&(e.style.display=pt&&pt.events&&pt.events.length?"block":"none"),t&&(t.style.display=pt&&pt.events&&pt.events.length?"none":"block"),n&&(n.style.transform="rotate(180deg)"),a&&(a.style.display=bt?"inline-block":"none")}}},gallery:{sectionId:"gallery-section",open:function(){if(!Ot){Ot=!0;var e=document.getElementById("gallery-body"),t=document.getElementById("gallery-arrow");e&&(e.style.display="block"),t&&(t.style.transform="rotate(180deg)")}}},"activity-log":{sectionId:"audit-log-section",open:function(){var e=document.getElementById("audit-log-toggle"),t=document.getElementById("audit-log-body");e&&t&&"none"===t.style.display&&e.click()}}},n=t[e];if(n){n.open();var a=document.getElementById(n.sectionId);a&&setTimeout(function(){a.scrollIntoView({behavior:"smooth",block:"start"})},100)}}}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",an):an()}();