(function(){if(typeof window.spWeather.translators.AccuWeather==="undefined"){window.spWeather.translators.AccuWeather=(function(){function a(d){var c=d.Headline.Link;return c.match(/[a-z]+\/\d+/)[0].split("/")}function b(f){function d(l){var k;if(l===1||l===2){k="meteo_32.png"}else{if(l===33||l===34){k="meteo_31.png"}}return k}function j(l){var k;if(l===3||l===4){k="meteo_30.png"}else{if(l===5||l===6){k="meteo_28.png"}else{if(l===7){k="meteo_26.png"}else{if(l===35||l===36){k="meteo_29.png"}else{if(l===37||l===38){k="meteo_29.png"}else{if(l===8){k="meteo_22.png"}}}}}}return k}function h(l){var k;if(l===12){k="meteo_12.png"}else{if(l===13||l===18||l===40){k="meteo_40.png"}else{if(l===14||l===25||l===39){k="meteo_9.png"}else{if(l===26){k="meteo_10.png"}}}}return k}function g(l){var k;if(l===15){k="meteo_39.png"}else{if(l===16||l===42){k="meteo_37.png"}else{if(l===17||l===41){k="meteo_4.png"}}}return k}function c(l){var k;if(l===11){k="meteo_21.png"}else{if([19,20,21,43].includes(l)){k="meteo_1.png"}else{if(l===30){k="meteo_36.png"}else{if(l===31){k="meteo_25.png"}else{if(l===32){k="meteo_23.png"}}}}}return k}function i(l){var k;if(l===22){k="meteo_16.png"}else{if(l===23||l===44){k="meteo_5.png"}else{if(l===24){k="meteo_18.png"}else{if(l===29){k="meteo_5.png"}}}}return k}function e(k){console.log("Weather icon code unknown:",k);return"meteo_3200.png"}return spWeather.iconBaseUrl+new SelectionPipeline(f).either(d).or(j).or(h).or(g).or(c).or(i).or(e).get()}return{translate:function(h){var j=a(h);var d=new spWeather.CityWeather(j[1],j[0]);d.api="daily";for(var g=0;g<h.DailyForecasts.length;g++){var e=moment(h.DailyForecasts[g].Date);var f;if(e.hours()>19&&e.hours()<5){f=b(h.DailyForecasts[g].Night.Icon)}else{f=b(h.DailyForecasts[g].Day.Icon)}var c={date:e,label:h.DailyForecasts[g].Day.IconPhrase,description:h.DailyForecasts[g].Day.IconPhrase,icon:f,temperature:{min:Math.round(h.DailyForecasts[g].Temperature.Minimum.Value),max:Math.round(h.DailyForecasts[g].Temperature.Maximum.Value),unit:"Celcius"},pressure:"NA",humidity:"NA"};d.forecasts.push(c)}return d}}})()}})();