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