summaryrefslogtreecommitdiff
path: root/client/index.c01a634b.js
diff options
context:
space:
mode:
Diffstat (limited to 'client/index.c01a634b.js')
-rw-r--r--client/index.c01a634b.js1
1 files changed, 0 insertions, 1 deletions
diff --git a/client/index.c01a634b.js b/client/index.c01a634b.js
deleted file mode 100644
index 67dab40..0000000
--- a/client/index.c01a634b.js
+++ /dev/null
@@ -1 +0,0 @@
-import{S as t,i as a,s as e,e as s,a as r,t as o,c as n,b as c,d as i,f as l,g as h,h as f,j as u,k as p,l as d,n as v,o as m,m as g,p as E,q as w,r as $,u as D,v as y,w as P,x as b,y as I,z as V}from"./client.df220531.js";function x(t){let a,e,m,g,E,w,$,D,y,P,b,I,V,x,N,T,M,j,_,k,A,S,H,J,K,B,O,q,z,F,Z,G,L,Q,R,U,W,X,Y,tt,at,et,st,rt,ot,nt,ct,it,lt;return{c(){a=s("div"),e=s("div"),m=s("div"),g=s("i"),E=r(),w=s("h1"),$=o(C),D=r(),y=s("div"),P=s("p"),b=o(t[0]),I=r(),V=s("div"),x=s("h2"),N=o("KP "),T=o(t[1]),M=r(),j=s("p"),_=s("span"),k=o("↑ KP "),A=o(t[3]),S=r(),H=s("span"),J=o("↓ KP "),K=o(t[2]),B=r(),O=s("div"),q=s("div"),z=s("p"),F=o("BZ"),Z=r(),G=s("p"),L=o(t[4]),Q=r(),R=s("div"),U=s("p"),W=o("Temp"),X=r(),Y=s("p"),tt=o(t[6]),at=o("°C"),et=r(),st=s("div"),rt=s("p"),ot=o("Clouds"),nt=r(),ct=s("p"),it=o(t[5]),lt=o("%"),this.h()},l(s){a=n(s,"DIV",{class:!0});var r=c(a);e=n(r,"DIV",{class:!0});var o=c(e);m=n(o,"DIV",{class:!0});var f=c(m);g=n(f,"I",{class:!0}),c(g).forEach(i),E=l(f),w=n(f,"H1",{class:!0});var u=c(w);$=h(u,C),u.forEach(i),f.forEach(i),D=l(o),y=n(o,"DIV",{class:!0});var p=c(y);P=n(p,"P",{});var d=c(P);b=h(d,t[0]),d.forEach(i),p.forEach(i),I=l(o),V=n(o,"DIV",{class:!0});var v=c(V);x=n(v,"H2",{class:!0});var ht=c(x);N=h(ht,"KP "),T=h(ht,t[1]),ht.forEach(i),M=l(v),j=n(v,"P",{});var ft=c(j);_=n(ft,"SPAN",{className:!0});var ut=c(_);k=h(ut,"↑ KP "),A=h(ut,t[3]),ut.forEach(i),S=l(ft),H=n(ft,"SPAN",{className:!0});var pt=c(H);J=h(pt,"↓ KP "),K=h(pt,t[2]),pt.forEach(i),ft.forEach(i),v.forEach(i),B=l(o),O=n(o,"DIV",{class:!0});var dt=c(O);q=n(dt,"DIV",{});var vt=c(q);z=n(vt,"P",{class:!0});var mt=c(z);F=h(mt,"BZ"),mt.forEach(i),Z=l(vt),G=n(vt,"P",{class:!0});var gt=c(G);L=h(gt,t[4]),gt.forEach(i),vt.forEach(i),Q=l(dt),R=n(dt,"DIV",{});var Et=c(R);U=n(Et,"P",{class:!0});var wt=c(U);W=h(wt,"Temp"),wt.forEach(i),X=l(Et),Y=n(Et,"P",{class:!0});var $t=c(Y);tt=h($t,t[6]),at=h($t,"°C"),$t.forEach(i),Et.forEach(i),et=l(dt),st=n(dt,"DIV",{});var Dt=c(st);rt=n(Dt,"P",{class:!0});var yt=c(rt);ot=h(yt,"Clouds"),yt.forEach(i),nt=l(Dt),ct=n(Dt,"P",{class:!0});var Pt=c(ct);it=h(Pt,t[5]),lt=h(Pt,"%"),Pt.forEach(i),Dt.forEach(i),dt.forEach(i),o.forEach(i),r.forEach(i),this.h()},h(){f(g,"class","symbol fas fa-map-marker-alt svelte-1oi7i0p"),f(w,"class","svelte-1oi7i0p"),f(m,"class","weatherCurrent-data-location svelte-1oi7i0p"),f(y,"class","weatherCurrent-data-date"),f(x,"class","svelte-1oi7i0p"),f(_,"classname","pr-2"),f(H,"classname","pl-2"),f(V,"class","weatherCurrent-data-kp svelte-1oi7i0p"),f(z,"class","svelte-1oi7i0p"),f(G,"class","svelte-1oi7i0p"),f(U,"class","svelte-1oi7i0p"),f(Y,"class","svelte-1oi7i0p"),f(rt,"class","svelte-1oi7i0p"),f(ct,"class","svelte-1oi7i0p"),f(O,"class","current-details svelte-1oi7i0p"),f(e,"class","weatherCurrent-data svelte-1oi7i0p"),f(a,"class","weatherCurrent-wrapper svelte-1oi7i0p")},m(t,s){u(t,a,s),p(a,e),p(e,m),p(m,g),p(m,E),p(m,w),p(w,$),p(e,D),p(e,y),p(y,P),p(P,b),p(e,I),p(e,V),p(V,x),p(x,N),p(x,T),p(V,M),p(V,j),p(j,_),p(_,k),p(_,A),p(j,S),p(j,H),p(H,J),p(H,K),p(e,B),p(e,O),p(O,q),p(q,z),p(z,F),p(q,Z),p(q,G),p(G,L),p(O,Q),p(O,R),p(R,U),p(U,W),p(R,X),p(R,Y),p(Y,tt),p(Y,at),p(O,et),p(O,st),p(st,rt),p(rt,ot),p(st,nt),p(st,ct),p(ct,it),p(ct,lt)},p(t,[a]){1&a&&d(b,t[0]),2&a&&d(T,t[1]),8&a&&d(A,t[3]),4&a&&d(K,t[2]),16&a&&d(L,t[4]),64&a&&d(tt,t[6]),32&a&&d(it,t[5])},i:v,o:v,d(t){t&&i(a)}}}let C="The earth";function N(t,a,e){var s=this&&this.__awaiter||function(t,a,e,s){return new(e||(e=Promise))((function(r,o){function n(t){try{i(s.next(t))}catch(t){o(t)}}function c(t){try{i(s.throw(t))}catch(t){o(t)}}function i(t){var a;t.done?r(t.value):(a=t.value,a instanceof e?a:new e((function(t){t(a)}))).then(n,c)}i((s=s.apply(t,a||[])).next())}))};const r=["January","February","March","April","May","June","July","August","September","October","November","December"];let o,n,c="-",i="-",l="-",h="-",f="-",u="-",p="-";function d(t){o=t.coords.longitude,n=t.coords.latitude,function(t,a){s(this,void 0,void 0,(function*(){let s=yield fetch(`https://api.met.no/weatherapi/locationforecast/2.0/compact?lat=${a}&lon=${t}`).then((t=>t.json()));e(5,u=s.properties.timeseries[0].data.instant.details.cloud_area_fraction),e(6,p=s.properties.timeseries[0].data.instant.details.air_temperature)}))}(o,n)}function v(t){g()}function g(){o=28.283333,n=-15.416667}return m((function(){!function(){s(this,void 0,void 0,(function*(){e(4,f=(yield fetch("https://services.swpc.noaa.gov/products/summary/solar-wind-mag-field.json").then((t=>t.json()))).Bz);let t=yield fetch("https://services.swpc.noaa.gov/products/noaa-planetary-k-index-forecast.json").then((t=>t.json()));t.shift();let a=new Date,s=new Date(0,0,0),o=1e3,n=0;t.forEach(((t,r)=>{t[1]>n&&(n=t[1]),t[1]<o&&(o=t[1]);let c=new Date(t[0]);Math.abs(c.getTime()-a.getTime())<Math.abs(s.getTime()-a.getTime())&&(s=c,e(1,i=t[1]))})),e(2,l=o.toString()),e(3,h=n.toString()),e(0,c=s.getDay()+". "+r[s.getMonth()]+" "+s.getHours()+":"+s.getMinutes())}))}(),navigator.geolocation?navigator.geolocation.getCurrentPosition(d,v):g()})),[c,i,l,h,f,u,p]}class T extends t{constructor(t){super(),a(this,t,N,x,e,{})}}function M(t){let a,e,d,m,g,E,w,$,D,y,P,b,I=t[5]&&function(t){let a,e,d,m,g,E,w,$,D,y,P,b;return{c(){a=s("div"),e=s("p"),d=s("i"),m=r(),g=o(t[3]),E=o("°C"),w=r(),$=s("p"),D=s("i"),y=r(),P=o(t[4]),b=o("%"),this.h()},l(s){a=n(s,"DIV",{});var r=c(a);e=n(r,"P",{});var o=c(e);d=n(o,"I",{class:!0}),c(d).forEach(i),m=l(o),g=h(o,t[3]),E=h(o,"°C"),o.forEach(i),w=l(r),$=n(r,"P",{});var f=c($);D=n(f,"I",{class:!0}),c(D).forEach(i),y=l(f),P=h(f,t[4]),b=h(f,"%"),f.forEach(i),r.forEach(i),this.h()},h(){f(d,"class","fas fa-thermometer-half"),f(D,"class","fas fa-cloud")},m(t,s){u(t,a,s),p(a,e),p(e,d),p(e,m),p(e,g),p(e,E),p(a,w),p(a,$),p($,D),p($,y),p($,P),p($,b)},p:v,d(t){t&&i(a)}}}(t);return{c(){a=s("div"),e=s("div"),d=s("h3"),m=o(t[2]),g=r(),E=s("p"),w=o(t[1]),$=r(),D=s("div"),y=s("h2"),P=o(t[0]),b=r(),I&&I.c(),this.h()},l(s){a=n(s,"DIV",{class:!0});var r=c(a);e=n(r,"DIV",{});var o=c(e);d=n(o,"H3",{class:!0});var f=c(d);m=h(f,t[2]),f.forEach(i),g=l(o),E=n(o,"P",{});var u=c(E);w=h(u,t[1]),u.forEach(i),o.forEach(i),$=l(r),D=n(r,"DIV",{class:!0});var p=c(D);y=n(p,"H2",{class:!0});var v=c(y);P=h(v,t[0]),v.forEach(i),b=l(p),I&&I.l(p),p.forEach(i),r.forEach(i),this.h()},h(){f(d,"class","svelte-u548p6"),f(y,"class","svelte-u548p6"),f(D,"class","data svelte-u548p6"),f(a,"class","prediction-details svelte-u548p6")},m(t,s){u(t,a,s),p(a,e),p(e,d),p(d,m),p(e,g),p(e,E),p(E,w),p(a,$),p(a,D),p(D,y),p(y,P),p(D,b),I&&I.m(D,null)},p(t,[a]){t[5]&&I.p(t,a)},i:v,o:v,d(t){t&&i(a),I&&I.d()}}}function j(t,a,e){let{prediction:s}=a;let r=s.kp,o=s.time.split(" "),n=Number(o[0].split("-")[2])+". "+["January","February","March","April","May","June","July","August","September","October","November","December"][Number(o[0].split("-")[1])],c=o[1].substring(0,5),i=s.temp,l=s.clouds,h=s.hasNOMETData;return t.$$set=t=>{"prediction"in t&&e(6,s=t.prediction)},[r,n,c,i,l,h,s]}class _ extends t{constructor(t){super(),a(this,t,j,M,e,{prediction:6})}}function k(t,a,e){const s=t.slice();return s[13]=a[e],s[15]=e,s}function A(t){let a,e,d,m,g;return{c(){a=s("div"),e=s("i"),d=r(),m=s("p"),g=o("No prediction data"),this.h()},l(t){a=n(t,"DIV",{class:!0});var s=c(a);e=n(s,"I",{class:!0}),c(e).forEach(i),d=l(s),m=n(s,"P",{});var r=c(m);g=h(r,"No prediction data"),r.forEach(i),s.forEach(i),this.h()},h(){f(e,"class","fas fa-7x fa-exclamation-triangle"),f(a,"class","no-data svelte-1romtap")},m(t,s){u(t,a,s),p(a,e),p(a,d),p(a,m),p(m,g)},p:v,i:v,o:v,d(t){t&&i(a)}}}function S(t){let a,e,d,v,m,D,y=t[0],P=[];for(let a=0;a<y.length;a+=1)P[a]=H(k(t,y,a));const b=t=>E(P[t],1,1,(()=>{P[t]=null}));return{c(){a=s("div"),e=s("h2"),d=o("Predicted"),v=r(),m=s("div");for(let t=0;t<P.length;t+=1)P[t].c();this.h()},l(t){a=n(t,"DIV",{className:!0});var s=c(a);e=n(s,"H2",{class:!0});var r=c(e);d=h(r,"Predicted"),r.forEach(i),s.forEach(i),v=l(t),m=n(t,"DIV",{class:!0});var o=c(m);for(let t=0;t<P.length;t+=1)P[t].l(o);o.forEach(i),this.h()},h(){f(e,"class","svelte-1romtap"),f(a,"classname","flex flex-row justify-between items-top"),f(m,"class","prediction-table svelte-1romtap")},m(t,s){u(t,a,s),p(a,e),p(e,d),u(t,v,s),u(t,m,s);for(let t=0;t<P.length;t+=1)P[t].m(m,null);D=!0},p(t,a){if(1&a){let e;for(y=t[0],e=0;e<y.length;e+=1){const s=k(t,y,e);P[e]?(P[e].p(s,a),$(P[e],1)):(P[e]=H(s),P[e].c(),$(P[e],1),P[e].m(m,null))}for(g(),e=y.length;e<P.length;e+=1)b(e);w()}},i(t){if(!D){for(let t=0;t<y.length;t+=1)$(P[t]);D=!0}},o(t){P=P.filter(Boolean);for(let t=0;t<P.length;t+=1)E(P[t]);D=!1},d(t){t&&i(a),t&&i(v),t&&i(m),I(P,t)}}}function H(t){let a,e;return a=new _({props:{prediction:t[13]}}),{c(){D(a.$$.fragment)},l(t){y(a.$$.fragment,t)},m(t,s){P(a,t,s),e=!0},p(t,e){const s={};1&e&&(s.prediction=t[13]),a.$set(s)},i(t){e||($(a.$$.fragment,t),e=!0)},o(t){E(a.$$.fragment,t),e=!1},d(t){b(a,t)}}}function J(t){let a,e,r,o;const l=[S,A],h=[];function p(t,a){return t[0]?0:1}return e=p(t),r=h[e]=l[e](t),{c(){a=s("div"),r.c(),this.h()},l(t){a=n(t,"DIV",{class:!0});var e=c(a);r.l(e),e.forEach(i),this.h()},h(){f(a,"class","predicted-weather svelte-1romtap")},m(t,s){u(t,a,s),h[e].m(a,null),o=!0},p(t,[s]){let o=e;e=p(t),e===o?h[e].p(t,s):(g(),E(h[o],1,1,(()=>{h[o]=null})),w(),r=h[e],r||(r=h[e]=l[e](t),r.c()),$(r,1),r.m(a,null))},i(t){o||($(r),o=!0)},o(t){E(r),o=!1},d(t){t&&i(a),h[e].d()}}}function K(t,a,e){var s=this&&this.__awaiter||function(t,a,e,s){return new(e||(e=Promise))((function(r,o){function n(t){try{i(s.next(t))}catch(t){o(t)}}function c(t){try{i(s.throw(t))}catch(t){o(t)}}function i(t){var a;t.done?r(t.value):(a=t.value,a instanceof e?a:new e((function(t){t(a)}))).then(n,c)}i((s=s.apply(t,a||[])).next())}))};let r,o,n,c=!1;function i(t,a){return s(this,void 0,void 0,(function*(){let s;c&&(s=yield fetch(`https://api.met.no/weatherapi/locationforecast/2.0/compact?lat=${a}&lon=${t}`).then((t=>t.json())));let r=yield fetch("https://services.swpc.noaa.gov/products/noaa-planetary-k-index-forecast.json").then((t=>t.json()));r.shift();let o=[];r.forEach(((t,a)=>{if("observed"!=t[2]){let a,e,r=new Date(t[0]),n=new Date(0,0,0);c&&s.properties.timeseries.forEach(((t,s)=>{let o=new Date(t.time);Math.abs(o.getTime()-r.getTime())<Math.abs(n.getTime()-r.getTime())&&(n=o,a=t.data.instant.details.air_temperature,e=t.data.instant.details.cloud_area_fraction)})),o.push({time:t[0],kp:t[1],temp:a,clouds:e,hasNOMETData:c})}})),e(0,n=o)}))}function l(t){r=t.coords.longitude,o=t.coords.latitude,i(r,o)}function h(t){c=!1,f()}function f(){r=28.283333,o=-15.416667,i(0,0)}return m((function(){navigator.geolocation?(c=!0,navigator.geolocation.getCurrentPosition(l,h)):(c=!1,f())})),[n]}class B extends t{constructor(t){super(),a(this,t,K,J,e,{})}}function O(t){let a,e,o,h,d,m;return o=new T({}),d=new B({}),{c(){a=r(),e=s("div"),D(o.$$.fragment),h=r(),D(d.$$.fragment),this.h()},l(t){V('[data-svelte="svelte-1q3846k"]',document.head).forEach(i),a=l(t),e=n(t,"DIV",{class:!0});var s=c(e);y(o.$$.fragment,s),h=l(s),y(d.$$.fragment,s),s.forEach(i),this.h()},h(){document.title="Aurora data",f(e,"class","homescreen svelte-pf4p6y")},m(t,s){u(t,a,s),u(t,e,s),P(o,e,null),p(e,h),P(d,e,null),m=!0},p:v,i(t){m||($(o.$$.fragment,t),$(d.$$.fragment,t),m=!0)},o(t){E(o.$$.fragment,t),E(d.$$.fragment,t),m=!1},d(t){t&&i(a),t&&i(e),b(o),b(d)}}}export default class extends t{constructor(t){super(),a(this,t,null,O,e,{})}}