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