import{_ as t,a as n,b as e,c as r,i as a,s as c,d as o,S as i,e as s,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 E,p as y,q as w,r as D,u as P,v as $,w as x,x as b,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.880dfc75.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,i,P,$,x,b,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,it,st,ut,ft;return{c:function(){n=s("div"),e=s("div"),r=s("div"),a=s("i"),c=u(),o=s("h1"),i=f(_),P=u(),$=s("div"),x=s("p"),b=f(t[0]),I=u(),R=s("div"),V=s("h2"),C=f("KP "),N=f(t[1]),T=u(),k=s("p"),M=s("span"),j=f("↑ KP "),S=f(t[3]),A=u(),H=s("span"),J=f("↓ KP "),K=f(t[2]),B=u(),O=s("div"),F=s("div"),q=s("p"),z=f("BZ"),Z=u(),G=s("p"),L=f(t[4]),Q=u(),U=s("div"),W=s("p"),X=f("Temp"),Y=u(),tt=s("p"),nt=f(t[6]),et=f("°C"),rt=u(),at=s("div"),ct=s("p"),ot=f("Clouds"),it=u(),st=s("p"),ut=f(t[5]),ft=f("%"),this.h()},l:function(s){n=l(s,"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);i=d(g,_),g.forEach(v),m.forEach(v),P=p(f),$=l(f,"DIV",{class:!0});var E=h($);x=l(E,"P",{});var y=h(x);b=d(y,t[0]),y.forEach(v),E.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 Et=h(U);W=l(Et,"P",{class:!0});var yt=h(W);X=d(yt,"Temp"),yt.forEach(v),Y=p(Et),tt=l(Et,"P",{class:!0});var wt=h(tt);nt=d(wt,t[6]),et=d(wt,"°C"),wt.forEach(v),Et.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),it=p(Dt),st=l(Dt,"P",{class:!0});var $t=h(st);ut=d($t,t[5]),ft=d($t,"%"),$t.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-1oi7i0p"),m(o,"class","svelte-1oi7i0p"),m(r,"class","weatherCurrent-data-location svelte-1oi7i0p"),m($,"class","weatherCurrent-data-date"),m(V,"class","svelte-1oi7i0p"),m(M,"classname","pr-2"),m(H,"classname","pl-2"),m(R,"class","weatherCurrent-data-kp svelte-1oi7i0p"),m(q,"class","svelte-1oi7i0p"),m(G,"class","svelte-1oi7i0p"),m(W,"class","svelte-1oi7i0p"),m(tt,"class","svelte-1oi7i0p"),m(ct,"class","svelte-1oi7i0p"),m(st,"class","svelte-1oi7i0p"),m(O,"class","current-details svelte-1oi7i0p"),m(e,"class","weatherCurrent-data svelte-1oi7i0p"),m(n,"class","weatherCurrent-wrapper svelte-1oi7i0p")},m:function(t,s){g(t,n,s),E(n,e),E(e,r),E(r,a),E(r,c),E(r,o),E(o,i),E(e,P),E(e,$),E($,x),E(x,b),E(e,I),E(e,R),E(R,V),E(V,C),E(V,N),E(R,T),E(R,k),E(k,M),E(M,j),E(M,S),E(k,A),E(k,H),E(H,J),E(H,K),E(e,B),E(e,O),E(O,F),E(F,q),E(q,z),E(F,Z),E(F,G),E(G,L),E(O,Q),E(O,U),E(U,W),E(W,X),E(U,Y),E(U,tt),E(tt,nt),E(tt,et),E(O,rt),E(O,at),E(at,ct),E(ct,ot),E(at,it),E(at,st),E(st,ut),E(st,ft)},p:function(t,n){var e=y(n,1)[0];1&e&&w(b,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{s(r.next(t))}catch(t){c(t)}}function i(t){try{s(r.throw(t))}catch(t){c(t)}}function s(t){var n;t.done?a(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(o,i)}s((r=r.apply(t,n||[])).next())}))},o=["January","February","March","April","May","June","July","August","September","October","November","December"],i="-",s="-",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,$.mark((function r(){var a;return $.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,$.mark((function t(){var n,r,a,c,h;return $.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]