1import{Qc as u,_ as a,ea as o,x as n}from"./chunk-TMTJGMF4.js";var m=class i{http=o(u);lat=-28.0627;lon=-55.4779;baseUrl="https://api.open-meteo.com/v1/forecast";getClimaActual(){let e=`${this.baseUrl}?latitude=${this.lat}&longitude=${this.lon}¤t=temperature_2m,apparent_temperature,relative_humidity_2m,wind_speed_10m,weather_code,precipitation&timezone=America%2FArgentina%2FBuenos_Aires`;return this.http.get(e).pipe(n(t=>this.mapActual(t.current)))}getClimaCompleto(){let e=`${this.baseUrl}?latitude=${this.lat}&longitude=${this.lon}¤t=temperature_2m,apparent_temperature,relative_humidity_2m,wind_speed_10m,weather_code,precipitation&daily=temperature_2m_max,temperature_2m_min,weather_code,precipitation_sum&timezone=America%2FArgentina%2FBuenos_Aires`;return this.http.get(e).pipe(n(t=>({actual:this.mapActual(t.current),pronostico:this.mapPronostico(t.daily)})))}mapActual(e){return{temperatura:Math.round(e.temperature_2m),sensacion:Math.round(e.apparent_temperature),humedad:e.relative_humidity_2m,viento:Math.round(e.wind_speed_10m),precipitacion:e.precipitation??0,codigo:e.weather_code,descripcion:this.getDescripcion(e.weather_code),icono:this.getIcono(e.weather_code)}}mapPronostico(e){return e.time.map((t,r)=>({fecha:t,tempMax:Math.round(e.temperature_2m_max[r]),tempMin:Math.round(e.temperature_2m_min[r]),codigo:e.weather_code[r],precipitacion:Math.round((e.precipitation_sum[r]??0)*10)/10,descripcion:this.getDescripcion(e.weather_code[r]),icono:this.getIcono(e.weather_code[r])}))}getIcono(e){return e===0?"\u2600\uFE0F":e<=2?"\u{1F324}\uFE0F":e===3?"\u2601\uFE0F":e<=48?"\u{1F32B}\uFE0F":e<=55?"\u{1F326}\uFE0F":e<=65?"\u{1F327}\uFE0F":e<=67?"\u{1F328}\uFE0F":e<=77?"\u2744\uFE0F":e<=82?"\u{1F326}\uFE0F":e<=86?"\u{1F328}\uFE0F":e<=99?"\u26C8\uFE0F":"\u{1F321}\uFE0F"}getDescripcion(e){return e===0?"Despejado":e===1?"Mayormente despejado":e===2?"Parcialmente nublado":e===3?"Nublado":e<=48?"Niebla":e<=55?"Llovizna":e<=65?"Lluvia":e<=67?"Lluvia con nieve":e<=77?"Nieve":e<=82?"Chaparr\xF3n":e<=86?"Nieve intensa":e<=99?"Tormenta":"Sin datos"}formatFecha(e){return new Date(e+"T00:00:00").toLocaleDateString("es-AR",{weekday:"short",day:"numeric",month:"short"})}static \u0275fac=function(t){return new(t||i)};static \u0275prov=a({token:i,factory:i.\u0275fac,providedIn:"root"})};export{m as a};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.