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 y,o as g,p as E,q as w,r as x,u as D,v as P,w as b,x as $,y as I,z as R,A as V,B as z,C as A,D as C,E as N,F as j,G as S}from"./client.b8e806fc.js";function k(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 M(t){var n,e,r,a,c,o,s,D,P,b,$,I,R,V,z,A,C,N,j,S,k,M,T,H,J,K,B,O,q,F,Z,G,L,Q,U,W,X,Y,tt,nt,et,rt,at,ct,ot,st,it,ut;return{c:function(){n=i("div"),e=i("div"),r=i("div"),a=i("i"),c=u(),o=i("h1"),s=f(_),D=u(),P=i("div"),b=i("p"),$=f(t[0]),I=u(),R=i("div"),V=i("h2"),z=f("KP "),A=f(t[1]),C=u(),N=i("p"),j=i("span"),S=f("↑ KP "),k=f(t[3]),M=u(),T=i("span"),H=f("↓ KP "),J=f(t[2]),K=u(),B=i("div"),O=i("div"),q=i("p"),F=f("BZ"),Z=u(),G=i("p"),L=f(t[4]),Q=u(),U=i("div"),W=i("p"),X=f("Probability"),Y=u(),tt=i("p"),nt=f("10%"),et=u(),rt=i("div"),at=i("p"),ct=f("Clouds"),ot=u(),st=i("p"),it=f(t[5]),ut=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 y=h(o);s=d(y,_),y.forEach(v),m.forEach(v),D=p(f),P=l(f,"DIV",{class:!0});var g=h(P);b=l(g,"P",{});var E=h(b);$=d(E,t[0]),E.forEach(v),g.forEach(v),I=p(f),R=l(f,"DIV",{class:!0});var w=h(R);V=l(w,"H2",{class:!0});var x=h(V);z=d(x,"KP "),A=d(x,t[1]),x.forEach(v),C=p(w),N=l(w,"P",{});var ft=h(N);j=l(ft,"SPAN",{className:!0});var lt=h(j);S=d(lt,"↑ KP "),k=d(lt,t[3]),lt.forEach(v),M=p(ft),T=l(ft,"SPAN",{className:!0});var ht=h(T);H=d(ht,"↓ KP "),J=d(ht,t[2]),ht.forEach(v),ft.forEach(v),w.forEach(v),K=p(f),B=l(f,"DIV",{class:!0});var vt=h(B);O=l(vt,"DIV",{});var pt=h(O);q=l(pt,"P",{class:!0});var dt=h(q);F=d(dt,"BZ"),dt.forEach(v),Z=p(pt),G=l(pt,"P",{class:!0});var mt=h(G);L=d(mt,t[4]),mt.forEach(v),pt.forEach(v),Q=p(vt),U=l(vt,"DIV",{});var yt=h(U);W=l(yt,"P",{class:!0});var gt=h(W);X=d(gt,"Probability"),gt.forEach(v),Y=p(yt),tt=l(yt,"P",{class:!0});var Et=h(tt);nt=d(Et,"10%"),Et.forEach(v),yt.forEach(v),et=p(vt),rt=l(vt,"DIV",{});var wt=h(rt);at=l(wt,"P",{class:!0});var xt=h(at);ct=d(xt,"Clouds"),xt.forEach(v),ot=p(wt),st=l(wt,"P",{class:!0});var Dt=h(st);it=d(Dt,t[5]),ut=d(Dt,"%"),Dt.forEach(v),wt.forEach(v),vt.forEach(v),f.forEach(v),u.forEach(v),this.h()},h:function(){m(a,"class","symbol fas fa-map-marker-alt svelte-1y77zx4"),m(o,"class","svelte-1y77zx4"),m(r,"class","weatherCurrent-data-location svelte-1y77zx4"),m(P,"class","weatherCurrent-data-date"),m(V,"class","svelte-1y77zx4"),m(j,"classname","pr-2"),m(T,"classname","pl-2"),m(R,"class","weatherCurrent-data-kp svelte-1y77zx4"),m(q,"class","svelte-1y77zx4"),m(G,"class","svelte-1y77zx4"),m(W,"class","svelte-1y77zx4"),m(tt,"class","svelte-1y77zx4"),m(at,"class","svelte-1y77zx4"),m(st,"class","svelte-1y77zx4"),m(B,"class","current-details svelte-1y77zx4"),m(e,"class","weatherCurrent-data svelte-1y77zx4"),m(n,"class","weatherCurrent-wrapper svelte-1y77zx4")},m:function(t,i){y(t,n,i),g(n,e),g(e,r),g(r,a),g(r,c),g(r,o),g(o,s),g(e,D),g(e,P),g(P,b),g(b,$),g(e,I),g(e,R),g(R,V),g(V,z),g(V,A),g(R,C),g(R,N),g(N,j),g(j,S),g(j,k),g(N,M),g(N,T),g(T,H),g(T,J),g(e,K),g(e,B),g(B,O),g(O,q),g(q,F),g(O,Z),g(O,G),g(G,L),g(B,Q),g(B,U),g(U,W),g(W,X),g(U,Y),g(U,tt),g(tt,nt),g(B,et),g(B,rt),g(rt,at),g(at,ct),g(rt,ot),g(rt,st),g(st,it),g(st,ut)},p:function(t,n){var e=E(n,1)[0];1&e&&w($,t[0]),2&e&&w(A,t[1]),8&e&&w(k,t[3]),4&e&&w(J,t[2]),16&e&&w(L,t[4]),32&e&&w(it,t[5])},i:x,o:x,d:function(t){t&&v(n)}}}var _="The earth";function T(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=(Array(),"-"),i="-",u="-",f="-",l="-",h="-";function v(t){r=t.coords.longitude,a=t.coords.latitude,function(t,n){c(this,void 0,void 0,P.mark((function r(){var a,c,v,p,d,m;return P.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:return a=r.sent,e(5,h=a.properties.timeseries[0].data.instant.details.cloud_area_fraction),r.t0=e,r.next=7,fetch("https://services.swpc.noaa.gov/products/summary/solar-wind-mag-field.json").then((function(t){return t.json()}));case 7:return r.t1=l=r.sent.Bz,(0,r.t0)(4,r.t1),r.next=11,fetch("https://services.swpc.noaa.gov/products/noaa-planetary-k-index-forecast.json").then((function(t){return t.json()}));case 11:(c=r.sent).shift(),v=new Date,p=new Date(0,0,0),d=1e3,m=0,c.forEach((function(t,n){t[1]>m&&(m=t[1]),t[1]