var config={apiKey:"AIzaSyA8aLVHWe7TVmctOXXVXYTl4pnzTgUydG4",authDomain:"swd-user.firebaseapp.com",databaseURL:"https://swd-user.firebaseio.com",storageBucket:"swd-user.appspot.com"};firebase.initializeApp(config);var SWD=SWD||{};SWD.user=null,SWD.analytics=null,SWD.mgr=null,SWD.locale="en",SWD.API_KEY="6bff2f89-84ab-463c-886e-fc0f443da4cf",SWD.RADAR_API_KEY="772e6cda60a5a959965040814aa1f071-d96be1c1-ff71-4b04-92c5-77a87c8caeb8-haPmTD9Kf21KA1iW",SWD.Observations=null,SWD.SWUser=null,SWD.TemperatureValue=null,SWD.WeatherTiles=null,SWD.WeatherTile=null,SWD.Graph=null,SWD.D3Graph=null,SWD.DeviceListItems=null,SWD.DerivedValues=null,SWD.StateManager=null,SWD.SettingsStateManager=null,SWD.Analytics=null,SWD.Diagnostics=null,SWD.Storage=SWD.Storage||{},SWD.LocationIntegrations=null,SWD.RESTHelper=null,SWD.LocationSelection=null,SWD.DataDisplay={},SWD.HistoryView=null,SWD.WeatherListSummaryUpdater=null,SWD.DeviceType={AIR:"AIR",SKY:"SKY"},SWD.ObRecord={AirDensity:"air_density",AirTemp:"air_temp_display",AirTempObserved:"air_temp_observed",AirTempWithSymbol:"air_temp_with_symbol",AirTempWithSymbolAndUnits:"air_temp_with_symbol_and_units",AvgStrikeDistance:"avg_dist",Battery:"battery",BatteryState:"battery_state",Backfill:"backfill",DeviceId:"device_id",DeltaT:"dew_point_display",DeltaTObserved:"delta_t_observed",DeltaTWithSymbol:"delta_t_with_symbol",DeltaTWithSymbolAndUnits:"delta_t_with_symbol_and_units",DewPoint:"dew_point_display",DewPointObserved:"dew_point_observed",DewPointWithSymbol:"dew_point_with_symbol",DewPointWithSymbolAndUnits:"dew_point_with_symbol_and_units",FeelsLike:"feels_like",FeelsLikeObserved:"feels_like_observed",FeelsLikeWithSymbol:"feels_like_with_symbol",FeelsLikeWithSymbolAndUnits:"feels_like_with_symbol_and_units",HeatIndex:"heat_index_display",HeatIndexObserved:"heat_index_observed",HeatIndexWithSymbol:"heat_index_with_symbol",HeatIndexWithSymbolAndUnits:"heat_index_with_symbol_and_units",HeatIndexOrDewPointDisplay:"heat_index_or_dew_point_display",HeatIndexOrDewPointLabel:"heat_index_or_dew_point_label",Humidity:"rh",HumidityWithSymbol:"rh_with_symbol",LightningLastStrikeObserved:"lightning_last_strike_observed",LightningLastStrikeFuzzy:"lightning_last_strike_fuzzy",LightningLastStrikeDistanceObserved:"lightning_last_strike_distance_observed",LightningLastStrikeDistanceDisplay:"lightning_last_strike_distance_display",LightningLastStrikeDistanceDisplayWithUnits:"lightning_last_strike_distance_display_with_units",LightningLastStrikeDistanceTextDisplay:"lightning_last_strike_distance_text_display",LightningStrikeCountLast3Hrs:"lightning_strike_count_last_3hrs",LightningStrikeDistanceObserved:"lightning_strike_distance_observed",LightningStrikeDistanceDisplay:"lightning_strike_distance_display",LightningStrikeDistanceDisplayWithUnits:"lightning_strike_distance_with_units",LightningStrikeDistanceTextDisplay:"lightning_strike_distance_text_display",Lux:"lux",LuxDisplayValueWithUnits:"lux_display_with_units",Pressure:"pres_display",PressureObserved:"pres_observed",PressureWithUnits:"pres_with_units",PressureUnits:"pres_units",PressureTrendLocalized:"pres_trend_localized",PressureTrend:"pres_trend",PrecipAccumLocalYesterdaySensor:"precip_accum_local_yesterday_sensor",PrecipAccumLocalYesterdaySensorDisplayWithUnits:"precip_accum_local_yesterday_sensor_display_with_units",PrecipAccumLocalYesterdayFinal:"precip_accum_local_yesterday_final",PrecipAccumLocalYesterdayFinalDisplayWithUnits:"precip_accumm_local_yesterday_final_display_with_units",PrecipAccumLocalToday:"precip_accum_local_today",PrecipAccumLocalTodayDisplayWithUnits:"precip_accum_local_today_display_with_units",PrecipAccumLocalTodayFinal:"precip_accum_local_today_final",PrecipAccumLocalTodayFinalDisplayWithUnits:"precip_accum_local_today_final_display_with_units",PrecipDurationLocalDay:"precip_duration_local_day",PrecipDurationLocalDayWithUnit:"precip_duration_local_day_with_units",PrecipDurationLocalYesterday:"precip_duration_local_yesterday",PrecipDurationLocalYesterdayWithUnits:"precip_duration_local_yesterday_with_units",PrecipRatePerHour:"precip_rate_per_hour_in_mm",PrecipRateDisplay:"precip_rate_display",PrecipRateDisplayWithUnits:"precip_rate_display_with_units",PrecipRateTextDisplay:"precip_rate_text_display",PrecipRateTextDisplayLocalized:"precip_rate_text_display_localized",PrecipRateTextAndValueDisplay:"precip_rate_text_and_value_display",Precip:"precip_total_observed",PrecipDisplay:"precip_total_display",PrecipDisplayWithUnits:"precip_total_display_with_units",PrecipTotalReportedLastHour:"precip_total_reported_last_hour",PrecipTotalDisplayLastHour:"precip_total_display_last_hour",PrecipTotalDisplayLastHourWithUnits:"precip_total_display_last_hour_with_units",PrecipTotalReportedLast24Hours:"precip_total_reported_last_24",PrecipTotalDisplayLast24Hours:"precip_total_display_last_24",PrecipTotalDisplayLast24HoursWithUnits:"precip_total_display_last_24_with_units",PrecipType:"precip_type",RawObservation:"raw_ob",ReportingInterval:"reporting_interval_in_minutes",SeaLevelPressureRaw:"sea_level_pres_raw",SeaLevelPressure:"sea_level_pres_display",SeaLevelPressureWithUnits:"sea_level_pres_with_units",SerialNumber:"serial",SolarRadiation:"solar_radiation",SolarRadiationDisplayWithUnits:"solar_radiation_display_with_units",Source:"source",StrikeCount:"strike_count",TimestampObserved:"timestamp_observed",TimestampLocalFuzzy:"timestamp_local_fuzzy",TimestampLocalLong:"timestamp_local_long",WetBulbTemp:"wet_bulb_temp_display",WetBulbGlobeTemp:"wet_bulb_globe_temp_display",WetBulbTempObserved:"wet_bulb_temp_observed",WetBulbGlobeTempObserved:"wet_bulb_globe_temp_observed",WetBulbTempWithSymbol:"wet_bulb_temp_with_symbol",WetBulbGlobeTempWithSymbol:"wet_bulb_globe_temp_with_symbol",WetBulbTempWithSymbolAndUnits:"wet_bulb_temp_with_symbol_and_units",WetBulbGlobeTempWithSymbolAndUnits:"wet_bulb_globe_temp_with_symbol_and_units",WindDir:"wind_dir_display",WindDirObserved:"wind_dir_observed",WindDirCardinal:"wind_dir_cardinal",WindChill:"wind_chill_display",WindChillObserved:"wind_chill_observed",WindChillWithSymbol:"wind_chill_with_symbol",WindChillWithSymbolAndUnits:"wind_chill_with_symbol_and_units",WindDirection:"wind_direction_display",WindAvg:"wind_avg_display",WindAvgObserved:"wind_avg_observed",WindAvgWithUnits:"wind_avg_with_units",WindGust:"wind_gust_display",WindGustObserved:"wind_gust_observed",WindGustWithUnits:"wind_gust_with_units",WindInterval:"wind_interval",WindLull:"wind_lull_display",WindLullObserved:"wind_lull_observed",WindLullWithUnits:"wind_lull_with_units",WindLullAndGustWithUnits:"wind_lull_gust_with_units",WindUnits:"wind_units",TempUnits:"temp_units",Timestamp:"timestamp",UV:"uv",UVWithIndex:"uv_with_index"},SWD.RapidWindObRecord={RapidWindSpeedObserved:"rapid_wind_observed",RapidWindSpeed:"rapid_wind_display",RapidWindSpeedWithUnits:"rapid_wind_with_units",RapidWindDirectionObserved:"rapid_wind_dir_observed",RapidWindDirectionCardinal:"rapid_wind_dir_cardinal",RapidWindDirection:"rapid_wind_dir_display",RapidWindAvg:"rapid_wind_avg_display",RapidWindAvgObserved:"rapid_wind_avg_observed",RapidWindAvgWithUnits:"rapid_wind_avg_with_units",RawObservation:"raw_ob",RapidWindTimestamp:"rapid_wind_timestamp"},SWD.TemperatureUnit={CELSIUS:"c",FAHRENHEIT:"f"},SWD.DistanceUnit={MILES:"mi",KILOMETERS:"km"},SWD.PressureUnit={INCHES:"inhg",MILLIBAR:"mb",MILLIMETERS:"mmhg",HECTOPASCAL:"hpa"},SWD.WindUnit={MPS:"mps",MPH:"mph",KPH:"kph",KTS:"kts",BFT:"bft",LFM:"lfm"},SWD.PrecipUnit={INCHES:"in",MILLIMETERS:"mm",CENTIMETERS:"cm"},SWD.DirectionUnit={DEGREES:"degrees",CARDINAL:"cardinal"},SWD.OtherUnit={IMPERIAL:"imperial",METRIC:"metric"},SWD.ElevationUnit={IMPERIAL:"ft",METRIC:"m"},SWD.UserTheme={LIGHT:"light",DARK:"dark",SYSTEM:"system"},SWD.SettingsKey={CURRENT_LOCATION:"current_location",DIRECTION:"units_direction",DISTANCE:"units_distance",LIGHTNING_EVENT:"events_lightning",STATUS_EVENT:"events_status",QUALITY_CONTROL_EVENT:"events_qc",PRECIP:"units_precip",PRESSURE:"units_pressure",RAIN_START_EVENT:"events_rain_start",TEMP:"units_temp",WIND:"units_wind",THEME:"user_theme",TIME:"units_time",MINI_MAP:"user_mini_map",OTHER:"units_other"},SWD.LocalStorage={TEMP_SETTING:"temp_units",DISTANCE_SETTING:"dist_units",MAIN_VIEW:"main_view"},SWD.LocationStatus={ONLINE:"online",OFFLINE:"offline"},SWD.DarkModeMapStyles=[{elementType:"geometry",stylers:[{color:"#242f3e"}]},{elementType:"labels.text.stroke",stylers:[{color:"#512b59"}]},{elementType:"labels.text.fill",stylers:[{color:"#AE9AB3"}]},{featureType:"administrative.locality",elementType:"labels.text.fill",stylers:[{color:"#AE9AB3"}]},{featureType:"poi",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"poi.park",elementType:"geometry",stylers:[{color:"#263c3f"}]},{featureType:"poi.park",elementType:"labels.text.fill",stylers:[{color:"#6b9a76"}]},{featureType:"road",elementType:"geometry",stylers:[{color:"#38414e"}]},{featureType:"road",elementType:"geometry.stroke",stylers:[{color:"#212a37"}]},{featureType:"road",elementType:"labels.text.fill",stylers:[{color:"#9ca5b3"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#866a8a"}]},{featureType:"road.highway",elementType:"geometry.stroke",stylers:[{color:"#1f2835"}]},{featureType:"road.highway",elementType:"labels.text.fill",stylers:[{color:"#f3d19c"}]},{featureType:"transit",elementType:"geometry",stylers:[{color:"#2f3948"}]},{featureType:"transit.station",elementType:"labels.text.fill",stylers:[{color:"#d59563"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#17263c"}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{color:"#515c6d"}]},{featureType:"water",elementType:"labels.text.stroke",stylers:[{color:"#17263c"}]}],SWD.apiBaseURL="https://swd.weatherflow.com/swd/rest/",SWD.makeRequest=function(e,t,a){var i=SWD.apiBaseURL+e+"?callback=?&api_key="+SWD.API_KEY+"&build="+window.SWDDebug.appBuild;null!=SWD.user&&null!=SWD.user.token()&&(t.token=SWD.user.token()),$.getJSON(i,t,(function(e){a&&"function"==typeof a&&a(e)}))},SWD.makeDownloadRequest=function(e,t,a){if(null!=SWD.user.jwt){var i=SWD.apiBaseURL+e+"?callback=?&api_key="+SWD.API_KEY+"&build="+window.SWDDebug.appBuild;$.ajax({contentType:"application/json",data:t,method:"GET",url:i,success:function(e,t,i){a&&"function"==typeof a&&a(e)}})}},SWD.makeAsyncRequest=async function(e,t){var a=SWD.apiBaseURL+e+"?callback=?&api_key="+SWD.API_KEY+"&build="+window.SWDDebug.appBuild;return null!=SWD.user&&null!=SWD.user.token()&&(t.token=SWD.user.token()),await $.getJSON(a,t)},SWD.makeCreateRequest=function(e,t,a){if(null!=SWD.user.jwt){var i=SWD.apiBaseURL+e+"?api_key="+SWD.API_KEY+"&token="+SWD.user.jwt;$.ajax({contentType:"application/json",data:t,method:"POST",url:i,success:function(e,t,i){a&&"function"==typeof a&&a(e)}})}},SWD.makeCreateRequestWithURLParams=function(e,t,a){if(null!=SWD.user.jwt){var i=SWD.apiBaseURL+e+"?api_key="+SWD.API_KEY+"&token="+SWD.user.jwt;$.each(t,(function(e,t){i=i+"&"+e+"="+encodeURIComponent(t)})),$.ajax({contentType:"application/json",method:"POST",url:i,success:function(e,t,i){a&&"function"==typeof a&&a(e)}})}},SWD.makeUpdateRequest=function(e,t,a){if(null!=SWD.user.jwt){var i=SWD.apiBaseURL+e+"?api_key="+SWD.API_KEY+"&token="+SWD.user.jwt;$.ajax({contentType:"application/json",data:t,method:"PUT",url:i,success:function(e,t,i){a&&"function"==typeof a&&a(e)}})}},SWD.makeDeleteRequestWithoutParams=function(e,t){if(null!=SWD.user.jwt){var a=SWD.apiBaseURL+e+"?api_key="+SWD.API_KEY+"&token="+SWD.user.jwt;$.ajax({method:"DELETE",url:a,success:function(e,a,i){t&&"function"==typeof t&&t(e)}})}},SWD.makeDeleteRequest=function(e,t,a){if(null!=SWD.user.jwt){var i="";$.each(t,(function(e,t){i+="&"+e+"="+t}));var r=SWD.apiBaseURL+e+"?api_key="+SWD.API_KEY+"&token="+SWD.user.jwt+i;$.ajax({method:"DELETE",url:r,success:function(e,t,i){a&&"function"==typeof a&&a(e)}})}},SWD.IdApiBaseURL="https://swd.weatherflow.com/id/oauth2/",SWD.makeIdRequest=function(e,t,a){var i=SWD.IdApiBaseURL+e+"?callback=?";$.getJSON(i,t,(function(e){a&&"function"==typeof a&&a(e)}))},SWD.makeIdPostRequest=function(e,t,a){var i=SWD.IdApiBaseURL+e+"?callback=?",r=$.param(t);$.ajax({contentType:"application/x-www-form-urlencoded",data:r,processData:!1,method:"POST",url:i,success:function(e,t,i){a&&"function"==typeof a&&a(e)}})},SWD.parseJSON=function(e){var t=null;try{var a=JSON.parse(e);a&&"object"==typeof a&&(t=a)}catch(e){t=null}return t},SWD.isMobile=function(){return window.getComputedStyle(document.body,":after").getPropertyValue("content").indexOf("mobile")>-1},SWD.debouncer=function(e,t){var a;return t=t||200,function(){var i=this,r=arguments;clearTimeout(a),a=setTimeout((function(){e.apply(i,Array.prototype.slice.call(r))}),t)}},SWD.sanitizeForHTML=function(e){const t=String(e);if(null!=t){const e={"&":"&","<":"<",">":">",'"':""","/":"/"},a=/[&<>"/]/gi;return t.replace(a,(function(t){return e[t]}))}},SWD.rainCheckEnabled=function(e){var t=!1;return null!=e.device_settings&&null!=e.device_settings.show_precip_final&&e.device_settings.show_precip_final&&(t=e.device_settings.show_precip_final),t},SWD.Storage.isAvailable=function(){var e;if(null==SWD.isLocalStorageAvailable)try{var t="__storage_test__";(e=window.localStorage).setItem(t,t),e.removeItem(t),SWD.isLocalStorageAvailable=!0}catch(e){SWD.isLocalStorageAvailable=!1}return SWD.isLocalStorageAvailable},SWD.Storage.saveSessionItem=function(e,t){this.isAvailable()&&window.sessionStorage.setItem(e,t)},SWD.Storage.getSessionItem=function(e){return this.isAvailable()?window.sessionStorage.getItem(e):null},SWD.Storage.saveLocalItem=function(e,t){this.isAvailable()&&window.localStorage.setItem(e,t)},SWD.Storage.getLocalItem=function(e){return this.isAvailable()?window.localStorage.getItem(e):null},SWD.Storage.removeLocalItem=function(e){return this.isAvailable()?window.localStorage.removeItem(e):null},SWD.Storage.removeSessionItem=function(e){this.isAvailable()&&window.sessionStorage.removeItem(e)},SWD.Storage.saveLocalBooleanItem=function(e,t){this.isAvailable()&&window.localStorage.setItem(e,JSON.stringify(t))},SWD.Storage.getLocalObject=function(e){return this.isAvailable()?JSON.parse(window.localStorage.getItem(e)):null},SWD.isDarkMode=function(){var e=!1;return window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches&&!$("html").hasClass("light")&&(e=!0),$("html").hasClass("dark")&&(e=!0),e},SWD.isLocalStorageAvailable=null,function(e,t){e.Locale=function(){this.defaultCode="en-US",this.browserCode=this.defaultCode,this.code=this.defaultCode,this.locale=null,this.defaultUnits={imperial:{temp_units:e.TemperatureUnit.FAHRENHEIT,dist_units:e.DistanceUnit.MILES},metric:{temp_units:e.TemperatureUnit.CELSIUS,dist_units:e.DistanceUnit.KILOMETERS}},this.languageMap={"en-US":"en-US","es-ES":"es-ES","es-AR":"es-ES","fr-FR":"fr-FR","fr-CA":"fr-CA"},this.localizations={"en-US":{units:"imperial",translations:{AccountManagementButtonDeleteData:"Delete All Data",AccountManagementMessageDeleteConfirm:"Are you sure you want to delete your data? This operation cannot be reversed.",AccountMangementMessageDataError:"There was an error deleting your data. ",AccountSetupCreateButtonCreateAccount:"Create Account",AccountSetupCreateButtonHaveAccount:"Have an account?",AccountSetupCreateButtonPrivacyPolicy:"Privacy Policy",AccountSetupCreateButtonToS:"Terms of Use",AccountSetupCreateNavTitle:"Create Account",AccountSetupCreateTextfieldEmail:"Email",AccountSetupCreateTextfieldPassword:"Password",AccountSetupCreateTextfieldPasswordConfirm:"Re-enter Password",AccountSetupErrorMessageInvalidAccount:"There is an error with your account. Please contact customer support.",AccountSetupErrorMessageInvalidEmail:"Please enter a valid email address.",AccountSetupErrorMessageInvalidPassword:"Please enter a valid password.",AccountSetupErrorMessagePasswordLength:"Your password must be 6 or more characters long.",AccountSetupErrorMessagePasswordMismatch:"Please check to make sure your passwords match.",AccountSetupErrorMessageRequiredFields:"Email and password are required",AccountSetupErrorTitleInvalidEmail:"Invalid Email",AccountSetupErrorTitleInvalidPassword:"Invalid Password",AccountSetupErrorTitlePasswordMismatch:"Passwords don't match",AccountSetupForgotButtonReset:"Reset Password",AccountSetupForgotErrorPasswordMismatach:"The passwords entered do not match",AccountSetupForgotErrorRequiredFields:"Please enter a password and password confirmation",AccountSetupForgotErrorResetError:"Unable to reset password",AccountSetupForgotMessageConfirm:"Confirm new password",AccountSetupForgotMessageResetExpired:"Your password reset code has expired",AccountSetupForgotMessageSuccess:"An email with instructions on how to reset your password has been sent.",AccountSetupForgotMessageUser:"Reset password for",AccountSetupForgotNavTitle:"Forgot Password",AccountSetupForgotTextfieldEmail:"Email",AccountSetupForgotTitleNewPassword:"New Password",AccountSetupMessageContinueToTempest:"Continue to Tempest website",AccountSetupMessageCreateLogIn:"To create a WeatherFlow login: Download the Tempest app from the app stores.",AccountSetupMessagePasswordResetSuccess:"Your password has been reset.",AccountSetupSignInButtonForgot:"Forgot Password?",AccountSetupSignInButtonSignIn:"Sign In",AccountSetupSignInNavTitle:"Sign In",AccountSetupSignInTextfieldEmail:"Email",AccountSetupSignInTextfieldPassword:"Password",AccountSetupStartButtonAboutTemptest:"about the Tempest Weather System",AccountSetupStartButtonCreateAccount:"Create Account",AccountSetupStartButtonLearnMore:"Learn More",AccountSetupStartButtonSignIn:"Sign In",AccountSetupStartNavTitle:"Get Started",AccountSetupStartTitle:"Let's get started",AlertsMessageFurtherNotice:"Until further notice",AlertsTextNowUntil:"Now until",AlertsTextTodayAt:"Today at",AlertsTextUntil:"Until",CalibrationMessageError:"There was an error saving the calibration. ",CalibrationMessageSaved:"Calibration saved. ",DevelopersButtonCreate:"Create Application",DevelopersButtonCreateToken:"Create Token",DevelopersButtonUpdate:"Update Application",DevelopersButtonViewTokens:"View Tokens",DevelopersMessageConfirmDelete:"Are you sure you want to delete this application?",DevelopersMessageCreateApplication:"Create an application if you would like users of your application to be able to access their Tempest station data.",DevelopersMessageCreateToken:"Create an access token. ",DevelopersMessageDeauthorize:'Deauthorizing will cause this integration to stop working. You will need to set it up again if you want to use it in the future.',DevelopersMessageDeleteTokenConfirm:"Are you sure you want to delete this token?",DevelopersMessageInfo:'For more information on developing apps for the Tempest Weather System, please visit the Tempest API & Developer Platform documentation.',DevelopersMessageIntegrations:"Integrations allow you to link your account and station seamlessly. You can usually unlink your account from within those applications, but you can also revoke access here, if necessary.",DevelopersMessagePersonalTokenNote:"Note: You do not need a Personal Use Token for applications & integrations that do not ask for one.",DevelopersMessageRequired:"Please fill out all required fields.",DevelopersMessageThirdParty:"Some third-party applications & integrations require a Personal Use Token to access data from your weather station. Create and use a different token for each app.",DevelopersMessageTokenNoteLink:'Developers, please see our API Documentation for information on how to use Personal Use Tokens in your project.',DevelopersTitle:"Developers",DevelopersTitleAccessToken:"Access Token",DevelopersTitleAccessTokenName:"Token Name",DevelopersTitleAppDescription:"Application Description",DevelopersTitleApplicationName:"Application Name",DevelopersTitleCallbackUrl:"Authorization Callback URL (one per line)",DevelopersTitleClientId:"Client ID",DevelopersTitleDeauthorize:"Deauthorize",DevelopersTitleIntegration:"Integration",DevelopersTitleIntegrations:"Integrations",DevelopersTitlePersonalUse:"Personal Use Tokens",DevelopersTitleRedirect:"Redirect URL",DevelopersTitleSecret:"Secret",DevelopersTitleTokenName:"Token Name: (Optional)",DevelopersTitleTokens:"Developers Tokens",DevelopersTitleViewApplications:"View Applications",DeviceSetupAddedButtonAddAnother:"Add Another Device",DeviceSetupAddedButtonNext:"Next",DeviceSetupAddedDescriptionEnd:"has been added to",DeviceSetupAddedDescriptionStart:"Your device",ForecastSettingsMiniMapPrecipChance:"Precip Chance",ForecastSettingsMiniMapShow:"Show",ForecastSettingsMiniMapValueAlways:"Always",ForecastSettingsMiniMapValueAuto:"Auto",ForecastSettingsMiniMapValueNever:"Never",ForecastSettingsTitleMiniMap:"Mini Map",GeneralAlertDeviceOffline:"One or more of your devices is offline",GeneralAlertStationOffline:"Your station is currently offline",GeneralAlexaMessageConnect:"Connect Alexa to your Tempest account.",GeneralAlexaMessageError:"We are unable to link your account using the Alexa app. Please link your account using the Alexa website.",GeneralAlexaMessageInstructions:"to connect Alexa to your account.",GeneralAuthButtonAllow:"Allow",GeneralAuthButtonDeny:"Deny",GeneralAuthError:"Unable to link account.",GeneralAuthErrorApplication:"Unknown Application",GeneralButtonCancel:"Cancel",GeneralButtonClose:"Close",GeneralButtonCopy:"Copy",GeneralButtonDismiss:"Dismiss",GeneralButtonDone:"Done",GeneralButtonNext:"Next",GeneralButtonRefresh:"Refresh",GeneralButtonRemove:"Remove",GeneralButtonRetry:"Retry",GeneralButtonRevoke:"Revoke",GeneralButtonShowBatteryCard:"Show Battery Card",GeneralButtonSignOut:"Sign Out",GeneralButtonSkip:"Skip",GeneralButtonViewMore:"View More",GeneralCalibrateTitleOffset:"Offset",GeneralCustomNetworkButtonEditShared:"Edit Shared Station Name",GeneralCustomNetworkButtonUnlinkStation:"Want to unlink your station? Contact us.",GeneralCustomNetworkClemsonDescription:"is part of the Clemson Tempest Network.",GeneralCustomNetworkMessage:"This station, named",GeneralCustomNetworkMessageClemson:"Observations from this station are being sent to Clemson University.",GeneralCustomNetworkTempestDescription:"is part of the Tempest Network.",GeneralDashboardMessageNoDisplay:"Please use a larger screen to view the dashboard.",GeneralDashboardTitleBatteryDevice:"Battery Device",GeneralDashboardTitleSettings:"Dashboard Settings",GeneralDashboardTitleStatType:"Stat Type",GeneralErrorCheckForMistakes:"The page you requested can not be found. Please check the URL for mistakes and try again.",GeneralErrorPageNotFound:"Page Not Found",GeneralErrorTitle:"Error",GeneralForumMessageConnect:"Connect your account to the Tempest community",GeneralLimitLinkGetPlus:"Get Plus Membership",GeneralLimitTitleViewOn:"View on",GeneralLimitWarningStationView:"You have reached the station owner's personal weather page. Real-time data is not currently available on this page. To access this Tempest weather station's weather data right now, choose from the options below:",GeneralMapMessageNoObs:"No recent observation.",GeneralMessageBuyWs:"Buy a weather station",GeneralMessageLocationMapInstructions:"Drag marker to update location.",GeneralMessageRequestError:"Invalid Request.",GeneralMessageSearchWeather:"Search for weather",GeneralMessageSkyOffline:"SKY Offline",GeneralMessageSocketError:"Unable to connect.",GeneralMessageSocketRetry:"Unable to connect. Retrying connection in ",GeneralMessageTempestLearnMore:"Don't own a Tempest? Learn more about Tempest.",GeneralMessageWeatherFlowSignIn:"Sign into WeatherFlow",GeneralMessageWifiNotSetup:"Your station is offline. Check your station's network connection and/or WiFi setup.",GeneralNavTitleHistory:"History",GeneralNavTitleLogIn:"Log In",GeneralNavTitleMap:"Map",GeneralNavTitleMaps:"Maps",GeneralNavTitleMyStation:"My Station",GeneralNavTitleSettings:"Settings",GeneralNavTitleWeather:"Weather",GeneralPowerSaveMessageBattery:"Your Tempest is conserving power.",GeneralPowerSaveMessageRain:"Your Tempest rain sensor is disabled from active listening to conserve power.",GeneralPowerSaveMessageWind:"Your Tempest is on a lower wind sampling frequency to conserve power.",GeneralPowerSaveTitle:"Power Save Mode",GeneralSettingsMessageConfig:"To add / remove devices or stations, configure WiFi, etc, please use the Tempest mobile app to connect directly with your WeatherFlow device.",GeneralSocketMessageRetrying:"Retrying...",GeneralTextBatteryVoltage:"Battery Voltage",GeneralTextConnect:"Connect",GeneralTextCount:"Count",GeneralTextCurrentConditions:"Current Conditions",GeneralTextDelete:"Delete",GeneralTextHour:"Hour",GeneralTitleAccount:"Account",GeneralTitleAdvanced:"Advanced",GeneralTitleAirTemperature:"Air Temperature",GeneralTitleAlerts:"Alerts",GeneralTitleBrightness:"Brightness",GeneralTitleCelsius:"Celsius",GeneralTitleData:"Data",GeneralTitleDataAuth:"Data Authorizations",GeneralTitleDevice:"Device",GeneralTitleDevices:"Devices",GeneralTitleDewPoint:"Dew Point",GeneralTitleDisableLightning:"Disable Lightning",GeneralTitleDisclaimer:"Disclaimer",GeneralTitleDisplayOptions:"Display Options",GeneralTitleEdit:"Edit",GeneralTitleElevation:"Elevation",GeneralTitleEnviroment:"Environment",GeneralTitleFahrenheit:"Fahrenheit",GeneralTitleFeelsLike:"Feels Like",GeneralTitleForecast:"Forecast",GeneralTitleFullScreenMode:"Full Screen Mode",GeneralTitleHeightAboveGround:"Height Above Ground",GeneralTitleHelp:"Help",GeneralTitleHumidity:"Relative Humidity",GeneralTitleHumidityShort:"Humidity",GeneralTitleImperial:"Imperial",GeneralTitleInstallationTip:"Installation Tips",GeneralTitleLast3Hrs:"Last 3 Hrs",GeneralTitleLastOb:"Last Observation",GeneralTitleLastSrikeDistance:"Last Strike Distance",GeneralTitleLastStrike:"Last Detected",GeneralTitleLightning:"Lightning",GeneralTitleLightningDistance:"Lightning Distance",GeneralTitleLightningDistanceDetected:"Lightning Distance Detected",GeneralTitleLightningLast3Hrs:"Lightning Detected Last 3 Hrs",GeneralTitleLightningLastDetected:"Lightning Last Detected",GeneralTitleLightningStrikeCount:"Lightning Strike Count",GeneralTitleLocation:"Location",GeneralTitleLocations:"Locations",GeneralTitleLux:"Lux",GeneralTitleManage:"Manage",GeneralTitleManageDevices:"Manage Devices",GeneralTitleMessages:"Messages",GeneralTitleMetric:"Metric",GeneralTitleMore:"More",GeneralTitleNA:"N/A",GeneralTitleNewsletter:"Newsletter",GeneralTitleOther:"Other",GeneralTitlePressure:"Sea Level Pressure",GeneralTitlePressureShort:"Pressure",GeneralTitlePublicData:"Public Data",GeneralTitlePublicName:"Public Name",GeneralTitleQualityControl:"Quality Control",GeneralTitleRain:"Rain",GeneralTitleRainAccumToday:"Rain Accumulation (Today)",GeneralTitleRainAccumYesterday:"Rain Accumulation (Yesterday)",GeneralTitleRainCheck:"Rain Check",GeneralTitleRainDurationToday:"Rain Duration (Today)",GeneralTitleRainDurationYesterday:"Rain Duration (Yesterday)",GeneralTitleRainIntensity:"Rain Intensity",GeneralTitleRainRate:"Rain Rate",GeneralTitleRainStart:"Rain Start",GeneralTitleRainToday:"Rain (Today)",GeneralTitleRainYesterday:"Rain (Yesterday)",GeneralTitleRequiredField:"Required Fields",GeneralTitleReset:"Reset",GeneralTitleShareDialog:"Your Station's URL",GeneralTitleSharePage:"Share Page",GeneralTitleSharePublicly:"Share Publicly",GeneralTitleShowNCRain:"Show NC Rain",GeneralTitleSky:"Sky",GeneralTitleSmartHome:"Smart Home Integrations",GeneralTitleSolarRadiation:"Solar Radiation",GeneralTitleStaionMap:"Station Map",GeneralTitleStationPressure:"Station Pressure",GeneralTitleStations:"Stations",GeneralTitleStatus:"Status",GeneralTitleSwitchLocations:"Switch Locations",GeneralTitleTempest:"Tempest",GeneralTitleTempestNetwork:"Tempest Network",GeneralTitleTermsConditions:"Terms & Conditions",GeneralTitleTheme:"Theme",GeneralTitleTime:"Time",GeneralTitleToday:"Today",GeneralTitleTrend:"Trend",GeneralTitleTrendFalling:"Falling",GeneralTitleTrendRising:"Rising",GeneralTitleTrendSteady:"Steady",GeneralTitleUVIndex:"UV Index",GeneralTitleUVIndexShort:"UV",GeneralTitleWind:"Wind",GeneralTitleWindChill:"Wind Chill",GeneralTitleWindDirection:"Wind Direction",GeneralTitleWindDirectionOffset:"Wind Direction Offset",GeneralTitleWindGust:"Wind Gust",GeneralTitleWindLull:"Wind Lull",GeneralTitleWindSpeed:"Wind Speed",GeneralTitleWUSetup:"WU Setup",GeneralTokenErrorDeleteApplication:"Unable to delete application. Please try your request again.",GeneralTokenErrorDeleteIntegration:"Unable to delete integration. Please try your request again.",GeneralTokenErrorDeleteToken:"Unable to delete access token. Please try your request again.",GeneralTokenMessageCopied:"Token copied to clipboard. ",GeneralTokenMessageDeleteConfirm:"Are you sure you want to delete this token?",GeneralTokenMessageNoPersonalTokens:"You have not created any personal use tokens.",GeneralValueAvg:"Avg",GeneralValueClear:"Clear",GeneralValueCloudy:"Cloudy",GeneralValueDisplayDark:"Dark",GeneralValueDisplayLight:"Light",GeneralValueDisplaySystem:"System",GeneralValueDistance:"Distance",GeneralValueDuration:"Duration",GeneralValueEmail:"Email",GeneralValueExtremeRain:"Extreme Rain",GeneralValueFoggy:"Foggy",GeneralValueGust:"Gust",GeneralValueGusting:"Gusting",GeneralValueHeatIndex:"Heat Index",GeneralValueHeavyRain:"Heavy Rain",GeneralValueIndoor:"Indoor",GeneralValueLightRain:"Light Rain",GeneralValueLull:"Lull",GeneralValueMax:"Max",GeneralValueMin:"Min",GeneralValueMinutes:"Minutes",GeneralValueMixed:"Mixed",GeneralValueModerateRain:"Moderate Rain",GeneralValueOutdoor:"Outdoor",GeneralValuePartlyCloudy:"Partly Cloudy",GeneralValueRainExtreme:"Extreme",GeneralValueRainHeavy:"Heavy",GeneralValueRainLight:"Light",GeneralValueRainLikely:"Rain Likely",GeneralValueRainModerate:"Moderate",GeneralValueRainNone:"None",GeneralValueRainPossible:"Rain Possible",GeneralValueRainVeryHeavy:"Very Heavy",GeneralValueRainVeryLight:"Very Light",GeneralValueSnow:"Snow",GeneralValueSnowLikely:"Snow Likely",GeneralValueSnowPossible:"Snow Possible",GeneralValueStrikeCount:"Strike Count",GeneralValueStrikes:"Strikes",GeneralValueSunny:"Sunny",GeneralValueTemp:"Temperature",GeneralValueThunderstormsLikely:"Thunderstorms Likely",GeneralValueThunderstormsPossible:"Thunderstorms Possible",GeneralValueTimestamp:"Timestamp",GeneralValueTimezone:"Timezone",GeneralValueTotal:"Total",GeneralValueUnits:"Units",GeneralValueUnknown:"Unknown",GeneralValueVeryHeavyRain:"Very Heavy Rain",GeneralValueVeryLightRain:"Very Light Rain",GeneralValueVolts:"volts",GeneralValueWetBulb:"Wet Bulb Temperature",GeneralValueWetBulbGlobe:"Wet Bulb Globe Temperature",GeneralValueWindy:"Windy",GeneralValueWintryMixLikely:"Wintry Mix Likely",GeneralValueWintryMixPossible:"Wintry Mix Possible",GeneralWarningDeviceLate:"One or more of your devices is late",GeneralWarningStationLate:"Your station is late",GraphMessageNoObs:"There are no observations for the current time period. Zoom in or out to adjust the graph's date range.",GraphTextAccumulation:"Accumulation",GraphTitleLightningStrikesDetected:"Strikes Detected",GraphTitleNewData:"New Data",GraphValueTemp:"Temp",GraphValueTempHigh:"Temp (High)",GraphValueTempLow:"Temp (Low)",GridTextAdvancedStats:"Advanced Stats",GridTextAirDensity:"Air Density",GridTextDeltaT:"Delta T",HistoryErrorMissingData:"No data available for this date.",HistoryErrorNonStation:"Detailed weather statistics are available for locations with Tempest hardware.\n\nPlease switch to a Tempest station to view history.",HistoryRangeAllTime:"All Time",HistoryRangeDay:"Day",HistoryRangeMonth:"Month",HistoryRangeWeek:"Week",HistoryRangeYear:"Year",HistoryTitleNonStationErrorTitle:"History",HistoryTitleWeek:"Week Of",IftttMessageConnect:"Connect IFTTT to your WeatherFlow account.",IftttMessageInstructions:"to connect IFTTT to your account.",LocationAddNavTitle:"Add Location",LocationButtonAdd:"Add",LocationListMessageDeleteConfirm:"Are you sure you want to delete this location?",LocationListMessageDeleteSuccess:"Location successfully deleted",LocationListNavTitle:"Locations",LocationListSectionTitleLocations:"Locations",LocationListSectionTitleStations:"Stations",LocationMapButtonSave:"Save with different name",LocationMapDescription:"Unlike other weather apps we forecast for your neighborhood, not just your city. Move the map to position the pin and that is the location we will deliver a forecast for.",LocationMapMessageSelect:"Select location using map",LocationMapMessageUpdateError:"Unable to update location. ",LocationMapNavTitle:"Neighborhood Location",LocationMapTitleAddLocation:"Map Location",LocationMapTitleSelectedLocation:"Selected Location:",LocationMessageSearchError:"Unable to fetch location forecast.",LocationNameButtonSave:"Save",LocationNameTextfieldPlaceholder:"Your Name",LocationNameTitleMapLocation:"Map Location",LocationNameTitleNewName:"New Name",MapSettingsTitle:"Map Settings",MapSettingsTitleHybrid:"Hybrid",MapSettingsTitleLegend:"Legend",MapSettingsTitleMapType:"Map Type",MapSettingsTitleOverlayType:"Overlay Type",MapSettingsTitleRadar:"Radar / Precipitation",MapSettingsTitleSatellite:"Satellite",MapSettingsTitleShowLegend:"Show Legend",MapSettingsTitleTempestStations:"Tempest Stations",MapSettingsTitleTheme:"Map Theme",MapSettingsTitleZoomControl:"Show Zoom Control",NearcastMessageInfo:"This forecast is powered by our patented Nearcast technology which provides accurate point-specific weather data everywhere you need it.",RadarForecastPrecipTypeRain:"Rain near",RadarForecastPrecipTypeSleet:"Sleet near",RadarForecastPrecipTypeSnow:"Snow near",RadarForecastPrecipTypeStorm:"Storm near",SettingsButtonCardinal:"Cardinal",SettingsButtonDegrees:"Degrees",StatusButtonTroubleshoot:"Troubleshoot >",StatusMessageTimezone:"All times are displayed in station local time.",StatusMessageTroubleshootDevice:"Use the troubleshooting tips to reconnect your Hub.",StatusNavTitle:"Status",StatusTextBatteryEco:"Eco",StatusTextBatteryGood:"Good",StatusTextBatteryLow:"Low",StatusTextBatteryPowerSave:"Power Save",StatusTextBatteryReplace:"Replace",StatusTextBLEStatusConnected:"Connected",StatusTextBLEStatusDisconnected:"Disconnected",StatusTextGood:"Good",StatusTextLightningDisturber:"Lightning Disturber",StatusTextLightningFailed:"Lightning Failed",StatusTextLightningNoise:"Lightning Noise",StatusTextNoSignal:"No Signal",StatusTextPrecipFailed:"Precip Failed",StatusTextPressureFailed:"Pressure Failed",StatusTextRHFailed:"RH Failed",StatusTextSatisfactory:"Satisfactory",StatusTextSignalExcellent:"Excellent",StatusTextSignalGood:"Good",StatusTextSignalNotConnected:"Not Connected",StatusTextSignalPoor:"Poor",StatusTextSignalStrong:"Strong",StatusTextSignalWeak:"Weak",StatusTextStatusOffline:"Offline",StatusTextStatusOnline:"Online",StatusTextTemperatureFailed:"Temperature Failed",StatusTextUVFailed:"UV Failed",StatusTextWindFailed:"Wind Failed",StatusTitleBattery:"Battery",StatusTitleBatteryState:"State",StatusTitleBLEStatus:"Bluetooth Connection Status",StatusTitleCellStatus:"Cell Status (CREG, RSSI)",StatusTitleDeviceId:"Device ID",StatusTitleDeviceSignal:"Device Signal (RSSI)",StatusTitleFirmware:"Firmware Revision",StatusTitleHub:"Hub - ",StatusTitleLastObservation:"Last Observation",StatusTitleLastStatusMessage:"Last Status Message",StatusTitleLearnMore:"Learn More",StatusTitleName:"Name",StatusTitleSensorStatus:"Sensor Status",StatusTitleSerial:"Serial Number",StatusTitleStationId:"Station ID",StatusTitleStatus:"Network Status",StatusTitleUptime:"Uptime",StatusTitleWifiSignal:"Wi-Fi Signal (RSSI)",WeatherUndergroundButtonLink:"Link",WeatherUndergroundButtonRemoveLink:"Remove WU Link",WeatherUndergroundErrorForecastFailed:"Forecast failed to load.",WeatherUndergroundLink:"Link Weather Underground",WeatherUndergroundMessageConfirm:"Are you sure you want to remove your WU station link?",WeatherUndergroundMessageRemoveLink:"Unable to remove WU station link.",WeatherUndergroundMessageSharingRestricted:"To view your Tempest data on other weather apps, please contact customer support for a list of current options.",WeatherUndergroundTitleSendRain:"Send Rain",WeatherUndergroundTitleStationKey:"Station Key",WuSetupMessageRequiredFieldError:"Station ID and Station Key are required",WuSetupMessageSaveError:"Unable to link station to WU"}},"fr-FR":{translations:{AccountManagementButtonDeleteData:"Supprimer toutes les données",AccountManagementMessageDeleteConfirm:"Êtes-vous sûr de vouloir supprimer vos données ? Cette opération est irréversible.",AccountMangementMessageDataError:"Une erreur s'est produite lors de la suppression de vos données.",AccountSetupCreateButtonCreateAccount:"Créer un compte",AccountSetupCreateButtonHaveAccount:"Avez-vous un compte?",AccountSetupCreateButtonPrivacyPolicy:"Politique de confidentialité",AccountSetupCreateButtonToS:"Conditions d'utilisation",AccountSetupCreateNavTitle:"Créer un compte",AccountSetupCreateTextfieldEmail:"E-mail",AccountSetupCreateTextfieldPassword:"Mot de passe",AccountSetupCreateTextfieldPasswordConfirm:"Entrez à nouveau le mot de passe",AccountSetupErrorMessageInvalidAccount:"Il y a un problème avec votre compte. Veuillez contacter le service client.",AccountSetupErrorMessageInvalidEmail:"SVP, mettez une adresse email valide.",AccountSetupErrorMessageInvalidPassword:"Entrer un mot de passe valide svp.",AccountSetupErrorMessagePasswordLength:"Votre mot de passe doit comporter 6 caractères ou plus.",AccountSetupErrorMessagePasswordMismatch:"Veuillez vérifier que vos mots de passe correspondent.",AccountSetupErrorMessageRequiredFields:"L'e-mail et le mot de passe sont requis",AccountSetupErrorTitleInvalidEmail:"Email invalide",AccountSetupErrorTitleInvalidPassword:"Mot de passe incorrect",AccountSetupErrorTitlePasswordMismatch:"Les mots de passe ne correspondent pas",AccountSetupForgotButtonReset:"Réinitialiser le mot de passe",AccountSetupForgotErrorPasswordMismatach:"Les mots de passe saisis ne correspondent pas",AccountSetupForgotErrorRequiredFields:"Veuillez saisir un mot de passe et une confirmation du mot de passe",AccountSetupForgotErrorResetError:"Impossible de réinitialiser le mot de passe",AccountSetupForgotMessageConfirm:"Confirmer le nouveau mot de passe",AccountSetupForgotMessageResetExpired:"Votre code de réinitialisation de mot de passe a expiré",AccountSetupForgotMessageSuccess:"Un e-mail contenant des instructions sur la façon de réinitialiser votre mot de passe a été envoyé.",AccountSetupForgotMessageUser:"Réinitialiser le mot de passe pour",AccountSetupForgotNavTitle:"Mot de passe oublié",AccountSetupForgotTextfieldEmail:"E-mail",AccountSetupForgotTitleNewPassword:"Nouveau mot de passe",AccountSetupMessageContinueToTempest:"Continuer vers le site Web de Tempest",AccountSetupMessageCreateLogIn:"Pour créer une connexion WeatherFlow : Téléchargez l'application Tempest depuis les magasins d'applications.",AccountSetupMessagePasswordResetSuccess:"Votre mot de passe a été réinitialisé.",AccountSetupSignInButtonForgot:"Mot de passe oublié?",AccountSetupSignInButtonSignIn:"Se connecter",AccountSetupSignInNavTitle:"Se connecter",AccountSetupSignInTextfieldEmail:"E-mail",AccountSetupSignInTextfieldPassword:"Mot de passe",AccountSetupStartButtonAboutTemptest:"A propos du système météo Tempest",AccountSetupStartButtonCreateAccount:"Créer un compte",AccountSetupStartButtonLearnMore:"Apprenez-en plus",AccountSetupStartButtonSignIn:"Se connecter",AccountSetupStartNavTitle:"Commencez",AccountSetupStartTitle:"Commençons",AlertsMessageFurtherNotice:"Jusqu'à nouvel ordre",AlertsTextNowUntil:"Maintenant jusqu'à",AlertsTextTodayAt:"Aujourd'hui à",AlertsTextUntil:"Jusqu'à",CalibrationMessageError:"Une erreur s'est produite lors de l'enregistrement de l'étalonnage.",CalibrationMessageSaved:"Calibrage enregistré.",DevelopersButtonCreate:"Créer une application",DevelopersButtonCreateToken:"Créer un jeton",DevelopersButtonUpdate:"Mettre à jour l'application",DevelopersButtonViewTokens:"Voir les jetons",DevelopersMessageConfirmDelete:"Êtes-vous sûr de vouloir supprimer cette application ?",DevelopersMessageCreateApplication:"Créez une application si vous souhaitez que les utilisateurs de votre application puissent accéder aux données de leur station Tempest.",DevelopersMessageCreateToken:"Créez un jeton d'accès.",DevelopersMessageDeauthorize:"La désautorisation de entraînera l'arrêt de cette intégration. Vous devrez le reconfigurer si vous souhaitez l'utiliser à l'avenir.",DevelopersMessageDeleteTokenConfirm:"Êtes-vous sûr de vouloir supprimer ce jeton ?",DevelopersMessageInfo:"Pour plus d'informations sur le développement d'applications pour le système météo Tempest, veuillez consulter la documentation de l'API Tempest et de la plateforme de développement.",DevelopersMessageIntegrations:"Les intégrations vous permettent de lier votre compte et votre station de manière transparente. Vous pouvez généralement dissocier votre compte depuis ces applications, mais vous pouvez également révoquer l'accès ici, si nécessaire.",DevelopersMessagePersonalTokenNote:"Remarque : Vous n'avez pas besoin d'un jeton d'utilisation personnelle pour les applications et les intégrations qui n'en demandent pas.",DevelopersMessageRequired:"S'il-vous-plaît remplissez tous les champs requis.",DevelopersMessageThirdParty:"Certaines applications et intégrations tierces nécessitent un jeton d'utilisation personnelle pour accéder aux données de votre station météo. Créez et utilisez un jeton différent pour chaque application.",DevelopersMessageTokenNoteLink:"Développeurs, veuillez consulter notre Documentation API pour plus d'informations sur la façon d'utiliser les jetons à usage personnel dans votre projet.",DevelopersTitle:"Développeurs",DevelopersTitleAccessToken:"Jeton d'accès",DevelopersTitleAccessTokenName:"Nom du jeton",DevelopersTitleAppDescription:"Description de l'application",DevelopersTitleApplicationName:"Nom de l'application",DevelopersTitleCallbackUrl:"URL de rappel d'autorisation (une par ligne)",DevelopersTitleClientId:"Numéro de client",DevelopersTitleDeauthorize:"Annuler l'autorisation",DevelopersTitleIntegration:"L'intégration",DevelopersTitleIntegrations:"Intégrations",DevelopersTitlePersonalUse:"Jetons à usage personnel",DevelopersTitleRedirect:"URL de redirection",DevelopersTitleSecret:"Secret",DevelopersTitleTokenName:"Nom du jeton : (facultatif)",DevelopersTitleTokens:"Jetons de développeurs",DevelopersTitleViewApplications:"Voir les applications",DeviceSetupAddedButtonAddAnother:"Ajouter un autre appareil",DeviceSetupAddedButtonNext:"Suivant",DeviceSetupAddedDescriptionEnd:"A été ajouté à",DeviceSetupAddedDescriptionStart:"Votre appareil",ForecastSettingsMiniMapPrecipChance:"Risque de Pluie",ForecastSettingsMiniMapShow:"Montrez",ForecastSettingsMiniMapValueAlways:"Toujours",ForecastSettingsMiniMapValueAuto:"Auto",ForecastSettingsMiniMapValueNever:"Jamais",ForecastSettingsTitleMiniMap:"Mini Carte",GeneralAlertDeviceOffline:"Un ou plusieurs de vos appareils sont hors ligne",GeneralAlertStationOffline:"Votre station est actuellement hors ligne",GeneralAlexaMessageConnect:"Connectez Alexa à votre compte Tempest.",GeneralAlexaMessageError:"Nous ne parvenons pas à associer votre compte à l'aide de l'application Alexa. Veuillez lier votre compte en utilisant le site Web Alexa.",GeneralAlexaMessageInstructions:"pour connecter Alexa à votre compte.",GeneralAuthButtonAllow:"Permettre",GeneralAuthButtonDeny:"Refuser",GeneralAuthError:"Impossible de lier le compte.",GeneralAuthErrorApplication:"Application inconnue",GeneralButtonCancel:"Abandon",GeneralButtonClose:"Fermer",GeneralButtonCopy:"Copier",GeneralButtonDismiss:"Rejeter ",GeneralButtonDone:"Terminé",GeneralButtonNext:"Suivant",GeneralButtonRefresh:"Rafraichir",GeneralButtonRemove:"Retirer",GeneralButtonRetry:"Recommencer",GeneralButtonRevoke:"Révoquer",GeneralButtonShowBatteryCard:"Afficher la carte de batterie",GeneralButtonSignOut:"Se déconnecter",GeneralButtonSkip:"Passer",GeneralButtonViewMore:"Voir plus",GeneralCalibrateTitleOffset:"Compenser",GeneralCustomNetworkButtonEditShared:"Modifier le nom de la station partagée",GeneralCustomNetworkButtonUnlinkStation:"Vous souhaitez dissocier votre station ? Contactez-nous.",GeneralCustomNetworkClemsonDescription:"Fait partie du réseau Clemson Tempest.",GeneralCustomNetworkMessage:"Cette station, nommée",GeneralCustomNetworkMessageClemson:"Les observations de cette station sont envoyées à l'Université de Clemson.",GeneralCustomNetworkTempestDescription:"Fait partie du réseau Tempest.",GeneralDashboardMessageNoDisplay:"Veuillez utiliser un écran plus grand pour afficher le tableau de bord.",GeneralDashboardTitleBatteryDevice:"Appareil à batterie",GeneralDashboardTitleSettings:"Paramètres du tableau de bord",GeneralDashboardTitleStatType:"Type de statistiques",GeneralErrorCheckForMistakes:"La page que vous recherchez n'a pu être trouvée. Veuillez vérifier l'URL pour détecter les erreurs et réessayer.",GeneralErrorPageNotFound:"Page non trouvée",GeneralErrorTitle:"Erreur",GeneralForumMessageConnect:"Connectez votre compte à la communauté Tempest",GeneralLimitLinkGetPlus:"Obtenez un abonnement Plus",GeneralLimitTitleViewOn:"Voir sur",GeneralLimitWarningStationView:"Vous avez atteint la page météo personnelle du propriétaire de la station. Les données en temps réel ne sont actuellement pas disponibles sur cette page. Pour accéder dès maintenant aux données météorologiques de cette station météo Tempest, choisissez parmi les options ci-dessous :",GeneralMapMessageNoObs:"Aucune observation récente.",GeneralMessageBuyWs:"Acheter une station météo",GeneralMessageLocationMapInstructions:"Faites glisser le marqueur pour mettre à jour l'emplacement.",GeneralMessageRequestError:"Requête invalide.",GeneralMessageSearchWeather:"Rechercher la météo",GeneralMessageSkyOffline:"Sky hors ligne",GeneralMessageSocketError:"Impossible de se connecter.",GeneralMessageSocketRetry:"Impossible de se connecter. Nouvelle tentative de connexion dans",GeneralMessageTempestLearnMore:"Vous ne possédez pas de Tempest ? Apprenez-en davantage sur Tempest.",GeneralMessageWeatherFlowSignIn:"Connectez-vous à Tempest",GeneralMessageWifiNotSetup:"Votre station est hors ligne. Vérifiez la connexion réseau de votre station et/ou la configuration WiFi.",GeneralNavTitleHistory:"Historique",GeneralNavTitleLogIn:"Se connecter",GeneralNavTitleMap:"Carte",GeneralNavTitleMaps:"Cartes",GeneralNavTitleMyStation:"Ma station",GeneralNavTitleSettings:"Paramètres",GeneralNavTitleWeather:"Météo",GeneralPowerSaveMessageBattery:"Votre Tempête conserve l'énergie.",GeneralPowerSaveMessageRain:"Votre capteur de pluie Tempest est désactivé pour économiser l'énergie.",GeneralPowerSaveMessageWind:"Votre Tempest utilise une fréquence d'échantillonnage du vent inférieure pour économiser l'énergie.",GeneralPowerSaveTitle:"Mode économie d'énergie",GeneralSettingsMessageConfig:"Pour ajouter/supprimer des appareils ou des stations, configurer le WiFi, etc., veuillez utiliser l'application mobile Tempest pour vous connecter directement à votre appareil Tempest",GeneralSocketMessageRetrying:"Nouvelle tentative...",GeneralTextBatteryVoltage:"Tension de la batterie",GeneralTextConnect:"Connecter",GeneralTextCount:"Compte",GeneralTextCurrentConditions:"Conditions actuelles",GeneralTextDelete:"Supprimer",GeneralTextHour:"Heure",GeneralTitleAccount:"Compte",GeneralTitleAdvanced:"Avancé",GeneralTitleAirTemperature:"Température de l'air",GeneralTitleAlerts:"Alertes",GeneralTitleBrightness:"Luminosité",GeneralTitleCelsius:"Celsius",GeneralTitleData:"Données",GeneralTitleDataAuth:"Autorisations de données",GeneralTitleDevice:"Appareil",GeneralTitleDevices:"Appareils",GeneralTitleDewPoint:"Point de rosée",GeneralTitleDisableLightning:"Désactiver la foudre",GeneralTitleDisclaimer:"Clause de non-responsabilité",GeneralTitleDisplayOptions:"Option d'affichage",GeneralTitleEdit:"Modifier",GeneralTitleElevation:"Élévation",GeneralTitleEnviroment:"Environnement",GeneralTitleFahrenheit:"Fahrenheit",GeneralTitleFeelsLike:"Température ressenti",GeneralTitleForecast:"Prévision",GeneralTitleFullScreenMode:"Mode plein écran",GeneralTitleHeightAboveGround:"Hauteur au-dessus du sol",GeneralTitleHelp:"Aide",GeneralTitleHumidity:"Humidité relative",GeneralTitleHumidityShort:"Humidité",GeneralTitleImperial:"Impérial",GeneralTitleInstallationTip:"Conseils d'installation",GeneralTitleLast3Hrs:"Depuis 3 h.",GeneralTitleLastOb:"Dernière observation",GeneralTitleLastSrikeDistance:"Distance du dernier impact de foudre",GeneralTitleLastStrike:"Dernière détection",GeneralTitleLightning:"Foudre",GeneralTitleLightningDistance:"Distance de la foudre",GeneralTitleLightningDistanceDetected:"Distance de foudre détectée",GeneralTitleLightningLast3Hrs:"Foudres détectées au cours des 3 dernières heures",GeneralTitleLightningLastDetected:"Derniere foudre détectée",GeneralTitleLightningStrikeCount:"Nombre de coups de foudre",GeneralTitleLocation:"Emplacement",GeneralTitleLocations:"Emplacements",GeneralTitleLux:"Lux",GeneralTitleManage:"Gérer",GeneralTitleManageDevices:"Gérer les appareils",GeneralTitleMessages:"Messages",GeneralTitleMetric:"Métrique",GeneralTitleMore:"Plus",GeneralTitleNA:"N/D",GeneralTitleNewsletter:"lettre d'info",GeneralTitleOther:"Autre",GeneralTitlePressure:"Pression au niveau de la mer",GeneralTitlePressureShort:"Pression",GeneralTitlePublicData:"Données publiques",GeneralTitlePublicName:"Nom public",GeneralTitleQualityControl:"Contrôle de qualité",GeneralTitleRain:"Pluie",GeneralTItleRainAccumToday:"Accumulation de pluie (aujourd'hui)",GeneralTitleRainAccumYesterday:"Accumulation de pluie (hier)",GeneralTitleRainCheck:"Contrôle de pluie",GeneralTitleRainDurationToday:"Durée de la pluie (aujourd'hui)",GeneralTitleRainDurationYesterday:"Durée de la pluie (hier)",GeneralTitleRainIntensity:"Intensité de la pluie",GeneralTitleRainRate:"Intensité de pluie",GeneralTitleRainStart:"Début de pluie",GeneralTitleRainToday:"Pluie (aujourd'hui)",GeneralTitleRainYesterday:"Pluie (hier)",GeneralTitleRequiredField:"Champs obligatoires",GeneralTitleReset:"Réinitialiser",GeneralTitleShareDialog:"L'URL de votre station",GeneralTitleSharePage:"Partager la page",GeneralTitleSharePublicly:"Partager publiquement",GeneralTitleShowNCRain:"Afficher NC Pluie",GeneralTitleSky:"Sky",GeneralTitleSmartHome:"Intégrations à des applications 'maison'",GeneralTitleSolarRadiation:"Radiation solaire",GeneralTitleStaionMap:"Plan des stations",GeneralTitleStationPressure:"Pression de la station",GeneralTitleStations:"Stations",GeneralTitleStatus:"Statut",GeneralTitleSwitchLocations:"Changer de localisation",GeneralTitleTempest:"Tempest",GeneralTitleTempestNetwork:"Réseau Tempest",GeneralTitleTermsConditions:"Termes et conditions",GeneralTitleTheme:"Thème",GeneralTitleTime:"Temps",GeneralTitleToday:"Aujourd'hui",GeneralTitleTrend:"Tendance",GeneralTitleTrendFalling:"En chute",GeneralTitleTrendRising:"En hausse",GeneralTitleTrendSteady:"Constant",GeneralTitleUVIndex:"L'indice UV",GeneralTitleUVIndexShort:"UV",GeneralTitleWind:"Vent",GeneralTitleWindChill:"Refroidissement éolien",GeneralTitleWindDirection:"Direction du vent",GeneralTitleWindDirectionOffset:"Décalage de la direction du vent",GeneralTitleWindGust:"Rafale de vent",GeneralTitleWindLull:"Accalmie du vent",GeneralTitleWindSpeed:"Vitesse du vent",GeneralTitleWUSetup:"Configuration WU",GeneralTokenErrorDeleteApplication:"Impossible de supprimer l'application. Veuillez réessayer.",GeneralTokenErrorDeleteIntegration:"Impossible de supprimer l'intégration. Veuillez réessayer.",GeneralTokenErrorDeleteToken:"Impossible de supprimer le jeton d'accès. Veuillez réessayer.",GeneralTokenMessageCopied:"Jeton copié dans le presse-papiers.",GeneralTokenMessageDeleteConfirm:"Êtes-vous sûr de vouloir supprimer ce jeton ?",GeneralTokenMessageNoPersonalTokens:"Vous n'avez créé aucun jeton à usage personnel.",GeneralValueAvg:"Moy.",GeneralValueClear:"Clair",GeneralValueCloudy:"Nuageux",GeneralValueDisplayDark:"Sombre",GeneralValueDisplayLight:"Clair",GeneralValueDisplaySystem:"Système",GeneralValueDistance:"Distance",GeneralValueDuration:"Durée",GeneralValueEmail:"E-mail",GeneralValueExtremeRain:"Pluie extrême",GeneralValueFoggy:"Brumeux",GeneralValueGust:"Rafale",GeneralValueGusting:"Rafales",GeneralValueHeatIndex:"Indice de chaleur",GeneralValueHeavyRain:"Forte pluie",GeneralValueIndoor:"Intérieur",GeneralValueLightRain:"Pluie légère",GeneralValueLull:"Accalmie",GeneralValueMax:"Max.",GeneralValueMin:"Min.",GeneralValueMinutes:"Minutes",GeneralValueMixed:"Mixtes",GeneralValueModerateRain:"Pluie modérée",GeneralValueOutdoor:"Extérieur",GeneralValuePartlyCloudy:"Partiellement nuageux",GeneralValueRainExtreme:"Extrême",GeneralValueRainHeavy:"Fort",GeneralValueRainLight:"Faible",GeneralValueRainLikely:"Pluie probable",GeneralValueRainModerate:"Modéré",GeneralValueRainNone:"Aucun",GeneralValueRainPossible:"Pluie possible",GeneralValueRainVeryHeavy:"Très fort",GeneralValueRainVeryLight:"Très léger",GeneralValueSnow:"Neige",GeneralValueSnowLikely:"Neige probable",GeneralValueSnowPossible:"Neige possible",GeneralValueStrikeCount:"Nombre d'impacts",GeneralValueStrikes:"Impacts",GeneralValueSunny:"Ensoleillé",GeneralValueTemp:"Température",GeneralValueThunderstormsLikely:"Des orages probables",GeneralValueThunderstormsPossible:"Des orages possibles",GeneralValueTimestamp:"Horodatage",GeneralValueTimezone:"Fuseau horaire",GeneralValueTotal:"Total",GeneralValueUnits:"Unités",GeneralValueUnknown:"Inconnu",GeneralValueVeryHeavyRain:"Pluie forte",GeneralValueVeryLightRain:"Très légère pluie",GeneralValueVolts:"Volts",GeneralValueWetBulb:"Température humide",GeneralValueWetBulbGlobe:"Température du globe humide",GeneralValueWindy:"Venteux",GeneralValueWintryMixLikely:"Mélange hivernal probable",GeneralValueWintryMixPossible:"Mélange hivernal possible",GeneralWarningDeviceLate:"Un ou plusieurs de vos appareils sont en retard",GeneralWarningStationLate:"Votre station est en retard",GraphMessageNoObs:"Il n’y a aucune observation pour la période actuelle. Effectuez un zoom avant ou arrière pour ajuster la plage de dates du graphique.",GraphTextAccumulation:"Accumulation",GraphTitleLightningStrikesDetected:"Foudres détectées",GraphTitleNewData:"Nouvelles données",GraphValueTemp:"Température",GraphValueTempHigh:"Température (haute)",GraphValueTempLow:"Température (basse)",GridTextAdvancedStats:"Statistiques avancées",GridTextAirDensity:"Densité de l'air",GridTextDeltaT:"DeltaT",HistoryErrorMissingData:"Aucune donnée disponible pour cette date.",HistoryErrorNonStation:"Des statistiques météorologiques détaillées sont disponibles pour les emplacements équipés du matériel Tempest.\n\nVeuillez choissir une station Tempest pour afficher l'historique.",HistoryRangeAllTime:"Toujours",HistoryRangeDay:"Jour",HistoryRangeMonth:"Mois",HistoryRangeWeek:"Semaine",HistoryRangeYear:"Année",HistoryTitleNonStationErrorTitle:"Historique",HistoryTitleWeek:"Semaine de",IftttMessageConnect:"Connectez IFTTT à votre compte Tempest",IftttMessageInstructions:"Pour connecter IFTTT à votre compte.",LocationAddNavTitle:"Ajouter un emplacement",LocationButtonAdd:"Ajouter",LocationListMessageDeleteConfirm:"Êtes-vous sûr de vouloir supprimer cet emplacement?",LocationListMessageDeleteSuccess:"Emplacement supprimé avec succès",LocationListNavTitle:"Emplacements",LocationListSectionTitleLocations:"Emplacements",LocationListSectionTitleStations:"Stations",LocationMapButtonSave:"Enregistrer sous un nom différent",LocationMapDescription:"Contrairement à d'autres applications météo, nous avons une prévision pour votre quartier, pas seulement pour votre ville. Déplacez la carte pour positionner l’épingle et c’est l’emplacement pour lequel nous fournirons une prévision.",LocationMapMessageSelect:"Sélectionnez l'emplacement à l'aide de la carte",LocationMapMessageUpdateError:"Impossible de mettre à jour l'emplacement.",LocationMapNavTitle:"Emplacement du quartier",LocationMapTitleAddLocation:"Emplacement sur la carte",LocationMapTitleSelectedLocation:"Emplacement sélectionné :",LocationMessageSearchError:"Impossible de récupérer les prévisions de la localisation.",LocationNameButtonSave:"Sauvegarder",LocationNameTextfieldPlaceholder:"votre nom",LocationNameTitleMapLocation:"Emplacement sur la carte",LocationNameTitleNewName:"Nouveau nom",MapSettingsTitle:"Paramètres de la carte",MapSettingsTitleHybrid:"Hybride",MapSettingsTitleLegend:"Légende",MapSettingsTitleMapType:"Type de carte",MapSettingsTitleOverlayType:"Type de superposition",MapSettingsTitleRadar:"Radar / précipitations",MapSettingsTitleSatellite:"Satellite",MapSettingsTitleShowLegend:"Afficher la légende",MapSettingsTitleTempestStations:"Stations Tempest",MapSettingsTitleTheme:"Thème de la carte",MapSettingsTitleZoomControl:"Afficher le contrôle de zoom",NearcastMessageInfo:"Cette prévision est alimentée par notre technologie brevetée Nearcast, qui fournit des données météorologiques précises et spécifiques à chaque point, partout où vous en avez besoin.",RadarForecastPrecipTypeRain:"De la pluie à proximité",RadarForecastPrecipTypeSleet:"Du grésil à proximité",RadarForecastPrecipTypeSnow:"De la neige à proximité",RadarForecastPrecipTypeStorm:"Tempête à proximité",SettingsButtonCardinal:"Cardinal",SettingsButtonDegrees:"Degrés",StatusButtonTroubleshoot:"Dépanner >",StatusMessageTimezone:"Toutes les heures sont affichées en heure locale de la station.",StatusMessageTroubleshootDevice:"Utilisez les conseils de dépannage pour reconnecter votre Hub.",StatusNavTitle:"Statut",StatusTextBatteryEco:"Éco",StatusTextBatteryGood:"Bien",StatusTextBatteryLow:"Faible",StatusTextBatteryPowerSave:"Économie d'énergie",StatusTextBatteryReplace:"Remplacer",StatusTextBLEStatusConnected:"Connecté",StatusTextBLEStatusDisconnected:"Débranché",StatusTextGood:"Bien",StatusTextLightningDisturber:"Filte parasite actif : foudre",StatusTextLightningFailed:"Échec du capteur de foudre",StatusTextLightningNoise:"Signaux parasite : foudre",StatusTextNoSignal:"Pas de signal",StatusTextPrecipFailed:"Échec capteur pluie",StatusTextPressureFailed:"Échec capteur pression",StatusTextRHFailed:"Échec capteur humidité",StatusTextSatisfactory:"Satisfaisant",StatusTextSignalExcellent:"Excellent",StatusTextSignalGood:"Bien",StatusTextSignalNotConnected:"Pas connecté",StatusTextSignalPoor:"Faible",StatusTextSignalStrong:"Fort",StatusTextSignalWeak:"Faible",StatusTextStatusOffline:"Hors ligne",StatusTextStatusOnline:"En ligne",StatusTextTemperatureFailed:"Échec capteur température",StatusTextUVFailed:"Échec capteur UV",StatusTextWindFailed:"Échec capteur de vent ",StatusTitleBattery:"Batterie",StatusTitleBatteryState:"État",StatusTitleBLEStatus:"État de la connexion Bluetooth",StatusTitleCellStatus:"État cellulaire (CREG, RSSI)",StatusTitleDeviceId:"Reference de l'appareil",StatusTitleDeviceSignal:"Signal de l'appareil (RSSI)",StatusTitleFirmware:"Révision du micrologiciel",StatusTitleHub:"Hub -",StatusTitleLastObservation:"Dernière observation",StatusTitleLastStatusMessage:"Dernier message d'état",StatusTitleLearnMore:"En savoir plus",StatusTitleName:"Nom",StatusTitleSensorStatus:"État du capteur",StatusTitleSerial:"Numéro de série",StatusTitleStationId:"Identifiant de la station",StatusTitleStatus:"L'état du réseau",StatusTitleUptime:"Temps de disponibilité",StatusTitleWifiSignal:"Signal Wi-Fi (RSSI)",WeatherUndergroundButtonLink:"Lien",WeatherUndergroundButtonRemoveLink:"Supprimer le lien WU",WeatherUndergroundErrorForecastFailed:"La prévision n'a pas pu être chargée.",WeatherUndergroundLink:"Lien Weather Underground",WeatherUndergroundMessageConfirm:"Êtes-vous sûr de vouloir supprimer le lien de votre station WU ?",WeatherUndergroundMessageRemoveLink:"Impossible de supprimer le lien de la station WU.",WeatherUndergroundMessageSharingRestricted:"Pour afficher vos données Tempest sur d'autres applications météo, veuillez contacter le support client pour obtenir une liste des options actuelles.",WeatherUndergroundTitleSendRain:"Envoyer les données de pluie",WeatherUndergroundTitleStationKey:"Clé de la station",WuSetupMessageRequiredFieldError:"L'ID de la station et la clé de la station sont requises",WuSetupMessageSaveError:"Impossible de lier la station à WU"}},"fr-CA":{translations:{AccountManagementButtonDeleteData:"Effacer toutes les données",AccountManagementMessageDeleteConfirm:"Es-tu sûr(e) de vouloir supprimer tes données? Cette opération ne peut pas être annulée",AccountMangementMessageDataError:"Il y a eu une erreur lors de la suppression de vos données",AccountSetupCreateButtonCreateAccount:"Créer un compte",AccountSetupCreateButtonHaveAccount:"Tu as un compte?",AccountSetupCreateButtonPrivacyPolicy:"Politique de confidentialité",AccountSetupCreateButtonToS:"Conditions d'utilisation",AccountSetupCreateNavTitle:"Créer un compte",AccountSetupCreateTextfieldEmail:"Courriel",AccountSetupCreateTextfieldPassword:"Mot de passe",AccountSetupCreateTextfieldPasswordConfirm:"Réinscris le mot de passe",AccountSetupErrorMessageInvalidAccount:"Il y a une erreur avec votre compte Veuillez contacter le service client",AccountSetupErrorMessageInvalidEmail:"Veuillez entrer une adresse courriel valide",AccountSetupErrorMessageInvalidPassword:"Veuillez entrer un mot de passe valide",AccountSetupErrorMessagePasswordLength:"Votre mot de passe doit comporter 6 caractères ou plus",AccountSetupErrorMessagePasswordMismatch:"Veuillez vérifier que vos mots de passe correspondent",AccountSetupErrorMessageRequiredFields:"Courriel et mot de passe sont nécessaire",AccountSetupErrorTitleInvalidEmail:"Courriel invalide",AccountSetupErrorTitleInvalidPassword:"Mot de passe invalide",AccountSetupErrorTitlePasswordMismatch:"Les mots de passe ne correspondent pas",AccountSetupForgotButtonReset:"Réinitialiser le mot de passe",AccountSetupForgotErrorPasswordMismatach:"Les mots de passe saisis ne correspondent pas",AccountSetupForgotErrorRequiredFields:"Veuillez entrer un mot de passe et confirmer le mot de passe",AccountSetupForgotErrorResetError:"Impossible de réinitialiser le mot de passe",AccountSetupForgotMessageConfirm:"Confirme ton nouveau mot de passe",AccountSetupForgotMessageResetExpired:"Votre code de réinitialisation de mot de passe a expiré",AccountSetupForgotMessageSuccess:"Un courriel contenant des instructions pour réinitialiser votre mot de passe a été envoyé",AccountSetupForgotMessageUser:"Réinitialiser le mot de passe pour",AccountSetupForgotNavTitle:"Mot de passe oublié",AccountSetupForgotTextfieldEmail:"Courriel",AccountSetupForgotTitleNewPassword:"Nouveau mot de passe",AccountSetupMessageContinueToTempest:"Continuez vers le site web de Tempest",AccountSetupMessageCreateLogIn:"Pour créer un compte Tempest : Téléchargez l'application Tempest depuis les magasins d'applications",AccountSetupMessagePasswordResetSuccess:"Votre mot de passe a été réinitialisé",AccountSetupSignInButtonForgot:"Mot de passe oublié?",AccountSetupSignInButtonSignIn:"Connexion",AccountSetupSignInNavTitle:"Connexion",AccountSetupSignInTextfieldEmail:"Courriel",AccountSetupSignInTextfieldPassword:"Mot de passe",AccountSetupStartButtonAboutTemptest:"Concernant le système météorologique Tempest",AccountSetupStartButtonCreateAccount:"Créer un compte",AccountSetupStartButtonLearnMore:"Apprends-en plus",AccountSetupStartButtonSignIn:"Connexion",AccountSetupStartNavTitle:"Commencez",AccountSetupStartTitle:"Commençons",AlertsMessageFurtherNotice:"Jusqu'à nouvel ordre",AlertsTextNowUntil:"Maintenant jusqu’à ce que",AlertsTextTodayAt:"Aujourd'hui à",AlertsTextUntil:"Jusqu’à ce que ",CalibrationMessageError:"Il y a eu une erreur lors de l'enregistrement de la calibration",CalibrationMessageSaved:"Calibration sauvegardée",DevelopersButtonCreate:"Créer une application",DevelopersButtonCreateToken:"Crée un jeton",DevelopersButtonUpdate:"Mettre à jour l'application",DevelopersButtonViewTokens:"Voir les jetons",DevelopersMessageConfirmDelete:"Es-tu sûr(e) de vouloir supprimer cette application?",DevelopersMessageCreateApplication:"Créez une application si vous souhaitez que les utilisateurs de votre application puissent accéder à leurs données de station Tempest",DevelopersMessageCreateToken:"Crée un jeton d'accès",DevelopersMessageDeauthorize:"Révoquer entraînera l'arrêt de cette intégration Vous devrez la configurer à nouveau si vous souhaitez l'utiliser à l'avenir",DevelopersMessageDeleteTokenConfirm:"Es-tu sûr(e) de vouloir supprimer ce jeton?",DevelopersMessageInfo:"Pour plus d'informations sur le développement d'applications pour le système météorologique Tempest, veuillez consulter la documentation de l'API et de la plateforme pour les développeurs sur ce lien",DevelopersMessageIntegrations:"Les intégrations vous permettent de lier votre compte et votre station de manière transparente. Vous pouvez généralement dissocier votre compte de ces applications, mais vous pouvez également révoquer l’accès ici, si nécessaire.",DevelopersMessagePersonalTokenNote:"Remarque : Vous n’avez pas besoin d’un jeton d’utilisation personnelle pour les applications et les intégrations qui n’en demandent pas.",DevelopersMessageRequired:"Veuillez remplir tous les champs obligatoires",DevelopersMessageThirdParty:"Certaines applications et intégrations tierces nécessitent un jeton d’utilisation personnelle pour accéder aux données de votre station météorologique. Créez et utilisez un jeton différent pour chaque application.",DevelopersMessageTokenNoteLink:'Développeurs, veuillez consulter notre documentation API pour plus d’informations sur l’utilisation des jetons d’utilisation personnelle dans votre projet.',DevelopersTitle:"Développeurs",DevelopersTitleAccessToken:"jeton d'accès",DevelopersTitleAccessTokenName:"Nom de jeton",DevelopersTitleAppDescription:"Description de l’application",DevelopersTitleApplicationName:"Nom de l'application",DevelopersTitleCallbackUrl:"URL de rappel d’autorisation (une par ligne)",DevelopersTitleClientId:"Numéro de client",DevelopersTitleDeauthorize:"Révoquer",DevelopersTitleIntegration:"L'intégration",DevelopersTitleIntegrations:"Intégrations",DevelopersTitlePersonalUse:"Jetons à usage personnel",DevelopersTitleRedirect:"URL de redirection",DevelopersTitleSecret:"Secret",DevelopersTitleTokenName:"Nom du jeton : (Facultatif)",DevelopersTitleTokens:"Jetons de développeurs",DevelopersTitleViewApplications:"Voir les applications",DeviceSetupAddedButtonAddAnother:"Ajouter un autre appareil",DeviceSetupAddedButtonNext:"Suivant",DeviceSetupAddedDescriptionEnd:"a été ajouté à",DeviceSetupAddedDescriptionStart:"Votre appareil",ForecastSettingsMiniMapPrecipChance:"Risque de Pluie",ForecastSettingsMiniMapShow:"Montre",ForecastSettingsMiniMapValueAlways:"Toujours",ForecastSettingsMiniMapValueAuto:"Auto",ForecastSettingsMiniMapValueNever:"Jamais",ForecastSettingsTitleMiniMap:"Mini map",GeneralAlertDeviceOffline:"Un ou plusieurs de vos appareils sont hors ligne",GeneralAlertStationOffline:"Ta station est actuellement hors ligne",GeneralAlexaMessageConnect:"Connectez Alexa à votre compte Tempest",GeneralAlexaMessageError:"Nous ne sommes pas en mesure de lier votre compte à l’aide de l’application Alexa. Veuillez lier votre compte à l’aide du site Web d’Alexa.",GeneralAlexaMessageInstructions:"Pour connecter Alexa à votre compte",GeneralAuthButtonAllow:"Autoriser",GeneralAuthButtonDeny:"Refuser",GeneralAuthError:"Impossible de lier le compte",GeneralAuthErrorApplication:"Application inconnue",GeneralButtonCancel:"Annuler",GeneralButtonClose:"Fermer",GeneralButtonCopy:"Copier",GeneralButtonDismiss:"Rejeter",GeneralButtonDone:"Terminé",GeneralButtonNext:"Suivant",GeneralButtonRefresh:"Rafraîchir",GeneralButtonRemove:"Supprimer ",GeneralButtonRetry:"Nouvelle tentative",GeneralButtonRevoke:"Révoquer",GeneralButtonShowBatteryCard:"Afficher la carte de la batterie",GeneralButtonSignOut:"Se déconnecter",GeneralButtonSkip:"Sauter",GeneralButtonViewMore:"Voir plus",GeneralCalibrateTitleOffset:"Décalage",GeneralCustomNetworkButtonEditShared:"Modifier le nom de la station partagée",GeneralCustomNetworkButtonUnlinkStation:"Vous voulez dissocier votre station ? Contactez-nous.",GeneralCustomNetworkClemsonDescription:"fait partie du réseau Clemson Tempest.",GeneralCustomNetworkMessage:"Cette station, nommée",GeneralCustomNetworkMessageClemson:"Les observations de cette station sont envoyées à l'Université de Clemson",GeneralCustomNetworkTempestDescription:"fait partie du réseau Tempest.",GeneralDashboardMessageNoDisplay:"Veuillez utiliser un écran plus grand pour afficher le tableau de bord",GeneralDashboardTitleBatteryDevice:"Dispositif de batterie",GeneralDashboardTitleSettings:"Paramètres du tableau de bord",GeneralDashboardTitleStatType:"Type de statistique",GeneralErrorCheckForMistakes:"La page que vous avez demandée ne peut pas être trouvée Veuillez vérifier l'URL pour des erreurs et réessayer",GeneralErrorPageNotFound:"Page introuvable",GeneralErrorTitle:"Erreur",GeneralForumMessageConnect:"Connecte ton compte à la communauté Tempest",GeneralLimitLinkGetPlus:"Obtiens l'adhésion Plus",GeneralLimitTitleViewOn:"Voir sur",GeneralLimitWarningStationView:"Vous êtes arrivé sur la page météo personnelle du propriétaire de la station. Les données en temps réel ne sont pas disponibles actuellement sur cette page. Pour accéder aux données météo de la station Tempest dès maintenant, choisissez parmi les options ci-dessous",GeneralMapMessageNoObs:"Aucune observation récente.",GeneralMessageBuyWs:"Achète une station météo",GeneralMessageLocationMapInstructions:"Déplacez le marqueur pour mettre à jour l'emplacement",GeneralMessageRequestError:"Demande invalide",GeneralMessageSearchWeather:"Rechercher la météo",GeneralMessageSkyOffline:"Sky hors ligne",GeneralMessageSocketError:"Impossible de se connecter",GeneralMessageSocketRetry:"Impossible de se connecter Réessai de la connexion dans",GeneralMessageTempestLearnMore:"N'as-tu pas de Tempest ? Apprends-en plus sur Tempest",GeneralMessageWeatherFlowSignIn:"Connectez-vous à Tempest",GeneralMessageWifiNotSetup:"Votre station est hors ligne Vérifiez la connexion réseau de votre station et/ou la configuration WiFi",GeneralNavTitleHistory:"Historique",GeneralNavTitleLogIn:"S’identifier",GeneralNavTitleMap:"Carte",GeneralNavTitleMaps:"Cartes",GeneralNavTitleMyStation:"Ma Station",GeneralNavTitleSettings:"Réglages",GeneralNavTitleWeather:"Temps",GeneralPowerSaveMessageBattery:"Votre Tempest est en mode ECO",GeneralPowerSaveMessageRain:"Votre capteur de pluie Tempest est désactivé pour économiser de l'énergie",GeneralPowerSaveMessageWind:"Votre tempest a une fréquence d'échantillonnage du vent plus basse pour économiser de l'énergie",GeneralPowerSaveTitle:"Mode d'économie d'énergie",GeneralSettingsMessageConfig:"Pour ajouter / supprimer des appareils ou des stations, configurer le WiFi, etc, veuillez utiliser l'application mobile Tempest pour vous connecter directement à votre appareil Tempest",GeneralSocketMessageRetrying:"Réessayer...",GeneralTextBatteryVoltage:"Tension de la batterie",GeneralTextConnect:"Connecter",GeneralTextCount:"Compte",GeneralTextCurrentConditions:"Conditions actuelles",GeneralTextDelete:"Effacer",GeneralTextHour:"Heure",GeneralTitleAccount:"Compte",GeneralTitleAdvanced:"Avancé",GeneralTitleAirTemperature:"Température de l'air",GeneralTitleAlerts:"Alertes",GeneralTitleBrightness:"Luminosité",GeneralTitleCelsius:"Celsius",GeneralTitleData:"Données",GeneralTitleDataAuth:"Autorisations de données",GeneralTitleDevice:"Appareil",GeneralTitleDevices:"Appareils",GeneralTitleDewPoint:"Point de rosée",GeneralTitleDisableLightning:"Désactiver la foudre",GeneralTitleDisclaimer:"Clause de non-responsabilité",GeneralTitleDisplayOptions:"Option d'affichage",GeneralTitleEdit:"Modifier",GeneralTitleElevation:"Élévation",GeneralTitleEnviroment:"Environnement",GeneralTitleFahrenheit:"Fahrenheit",GeneralTitleFeelsLike:"Température ressenti",GeneralTitleForecast:"Prévision",GeneralTitleFullScreenMode:"Mode plein écran",GeneralTitleHeightAboveGround:"Hauteur au-dessus du sol",GeneralTitleHelp:"Aide",GeneralTitleHumidity:"Humidité relative",GeneralTitleHumidityShort:"Humidité",GeneralTitleImperial:"Impérial",GeneralTitleInstallationTip:"Conseils d’installation",GeneralTitleLast3Hrs:"Depuis 3 h.",GeneralTitleLastOb:"Dernière observation",GeneralTitleLastSrikeDistance:"Dernière distance d'éclair",GeneralTitleLastStrike:"Dernière détection",GeneralTitleLightning:"Foudre",GeneralTitleLightningDistance:"Distance de l'éclair",GeneralTitleLightningDistanceDetected:"Distance de l'éclair détecté",GeneralTitleLightningLast3Hrs:"Eclairs détectés depuis 3 heures",GeneralTitleLightningLastDetected:"Détection dernier éclair",GeneralTitleLightningStrikeCount:"Nombre d'éclairs",GeneralTitleLocation:"Emplacement",GeneralTitleLocations:"Emplacements",GeneralTitleLux:"Lux",GeneralTitleManage:"Gérer",GeneralTitleManageDevices:"Gérer les appareils",GeneralTitleMessages:"Messages",GeneralTitleMetric:"Métrique",GeneralTitleMore:"Plus",GeneralTitleNA:"N/D",GeneralTitleNewsletter:"Bulletin d’information",GeneralTitleOther:"Autre",GeneralTitlePressure:"Pression au niveau de la mer",GeneralTitlePressureShort:"Pression",GeneralTitlePublicData:"Données publiques",GeneralTitlePublicName:"Nom public",GeneralTitleQualityControl:"Contrôle de la qualité",GeneralTitleRain:"Pluie",GeneralTItleRainAccumToday:"Accumulation de pluie (aujourd'hui)",GeneralTitleRainAccumYesterday:"Accumulation de pluie (hier)",GeneralTitleRainCheck:"Contrôle de pluie",GeneralTitleRainDurationToday:"Durée de la pluie (aujourd’hui)",GeneralTitleRainDurationYesterday:"Durée de la pluie (hier)",GeneralTitleRainIntensity:"Intensité de pluie",GeneralTitleRainRate:"Intensité de pluie",GeneralTitleRainStart:"Début de pluie",GeneralTitleRainToday:"Pluie (Aujourd'hui)",GeneralTitleRainYesterday:"Pluie (Hier)",GeneralTitleRequiredField:"Champs obligatoires",GeneralTitleReset:"Réinitialiser",GeneralTitleShareDialog:"URL de ta station",GeneralTitleSharePage:"Partage la page",GeneralTitleSharePublicly:"Partager publiquement",GeneralTitleShowNCRain:"Afficher NC Pluie",GeneralTitleSky:"Sky",GeneralTitleSmartHome:"Intégrations de maison intelligente",GeneralTitleSolarRadiation:"Radiation solaire",GeneralTitleStaionMap:"Plan des stations",GeneralTitleStationPressure:"Pression au niveau de la station",GeneralTitleStations:"Stations",GeneralTitleStatus:"Statut",GeneralTitleSwitchLocations:"Changer d'endroits",GeneralTitleTempest:"Tempest",GeneralTitleTempestNetwork:"Réseau Tempest",GeneralTitleTermsConditions:"conditions générales",GeneralTitleTheme:"Thème",GeneralTitleTime:"Temps",GeneralTitleToday:"Aujourd'hui",GeneralTitleTrend:"Tendance",GeneralTitleTrendFalling:"Diminue",GeneralTitleTrendRising:"Augmente",GeneralTitleTrendSteady:"Stable",GeneralTitleUVIndex:"Index UV",GeneralTitleUVIndexShort:"UV",GeneralTitleWind:"Vent",GeneralTitleWindChill:"Refroidissement éolien",GeneralTitleWindDirection:"Direction du vent",GeneralTitleWindDirectionOffset:"Décalage de la direction du vent",GeneralTitleWindGust:"Rafale de vent",GeneralTitleWindLull:"Accalmie du vent",GeneralTitleWindSpeed:"Vitesse du vent",GeneralTitleWUSetup:"Configuration WU",GeneralTokenErrorDeleteApplication:"Impossible de supprimer l'application. Veuillez réessayer votre demande",GeneralTokenErrorDeleteIntegration:"Impossible de supprimer l’intégration. Veuillez réessayer votre demande.",GeneralTokenErrorDeleteToken:"Impossible de supprimer le jeton d'accès. Veuillez réessayer votre demande",GeneralTokenMessageCopied:"Jeton copié dans le presse-papiers",GeneralTokenMessageDeleteConfirm:"Es-tu sûr(e) de vouloir supprimer ce jeton?",GeneralTokenMessageNoPersonalTokens:"Vous n’avez pas créé de jetons d’utilisation personnelle.",GeneralValueAvg:"Moy",GeneralValueClear:"Clair",GeneralValueCloudy:"Nuageux",GeneralValueDisplayDark:"Sombre",GeneralValueDisplayLight:"Clair",GeneralValueDisplaySystem:"Système",GeneralValueDistance:"Distance",GeneralValueDuration:"Durée",GeneralValueEmail:"Courriel",GeneralValueExtremeRain:"Pluie extrême",GeneralValueFoggy:"Brumeux",GeneralValueGust:"Rafale",GeneralValueGusting:"Rafales",GeneralValueHeatIndex:"Indice de chaleur",GeneralValueHeavyRain:"Forte pluie",GeneralValueIndoor:"Intérieur",GeneralValueLightRain:"Pluie légère",GeneralValueLull:"Accalmie",GeneralValueMax:"Max",GeneralValueMin:"Min",GeneralValueMinutes:"Minutes",GeneralValueMixed:"Mixtes",GeneralValueModerateRain:"Pluie modérée",GeneralValueOutdoor:"Extérieur",GeneralValuePartlyCloudy:"Partiellement nuageux",GeneralValueRainExtreme:"Extrème",GeneralValueRainHeavy:"Fort",GeneralValueRainLight:"Léger",GeneralValueRainLikely:"Pluie probable",GeneralValueRainModerate:"Modéré",GeneralValueRainNone:"Aucun",GeneralValueRainPossible:"Pluie possible",GeneralValueRainVeryHeavy:"Très fort",GeneralValueRainVeryLight:"Très léger",GeneralValueSnow:"Neige",GeneralValueSnowLikely:"Neige probable",GeneralValueSnowPossible:"Neige possible",GeneralValueStrikeCount:"Nombre d'impacts",GeneralValueStrikes:"Impacts",GeneralValueSunny:"Ensoleillé",GeneralValueTemp:"Température",GeneralValueThunderstormsLikely:"Des orages probables",GeneralValueThunderstormsPossible:"Des orages possibles",GeneralValueTimestamp:"Horodatage",GeneralValueTimezone:"Fuseau horaire",GeneralValueTotal:"Total",GeneralValueUnits:"Unités",GeneralValueUnknown:"Inconnu ",GeneralValueVeryHeavyRain:"Pluie forte",GeneralValueVeryLightRain:"Très légère pluie",GeneralValueVolts:"Volts",GeneralValueWetBulb:"Température humide",GeneralValueWetBulbGlobe:"Température du globe humide",GeneralValueWindy:"Venteux",GeneralValueWintryMixLikely:"Mélange hivernal probable",GeneralValueWintryMixPossible:"Mélange hivernal possible",GeneralWarningDeviceLate:"Un ou plusieurs de vos appareils sont en retard",GeneralWarningStationLate:"Ta station est en retard",GraphMessageNoObs:"Il n'y a pas d'observations pour la période actuelle. Zoomez pour ajuster la plage de dates du graphique",GraphTextAccumulation:"Cumul",GraphTitleLightningStrikesDetected:"Eclairs détectés",GraphTitleNewData:"Nouvelles données",GraphValueTemp:"Temp",GraphValueTempHigh:"Temp (Max)",GraphValueTempLow:"Temp (Min)",GridTextAdvancedStats:"Statistiques avancées",GridTextAirDensity:"Densité de l’air",GridTextDeltaT:"Delta T",HistoryErrorMissingData:"Pas de données disponibles pour cette date",HistoryErrorNonStation:"Des statistiques météorologiques détaillées sont disponibles pour les endroits équipés de matériel Tempest .\n\nVeuillez passer à une station Tempest pour consulter l'historique",HistoryRangeAllTime:"Toujours",HistoryRangeDay:"Jour",HistoryRangeMonth:"Mois",HistoryRangeWeek:"Semaine",HistoryRangeYear:"Année",HistoryTitleNonStationErrorTitle:"Historique",HistoryTitleWeek:"Semaine de",IftttMessageConnect:"Connectez IFTTT à votre compte Tempest",IftttMessageInstructions:"pour connecter IFTTT à votre compte",LocationAddNavTitle:"Ajout lieux",LocationButtonAdd:"Ajouter",LocationListMessageDeleteConfirm:"Es-tu sûr(e) de vouloir supprimer cet emplacement?",LocationListMessageDeleteSuccess:"Lieux supprimé avec succès",LocationListNavTitle:"Lieux",LocationListSectionTitleLocations:"Lieux",LocationListSectionTitleStations:"Stations",LocationMapButtonSave:"Enregistre sous un nom différent",LocationMapDescription:"Contrairement à d'autres applications météo, nous avons une prévision pour votre quartier, pas seulement pour votre ville. Déplacez la carte pour positionner l’épingle et c’est l’emplacement pour lequel nous fournirons une prévision.",LocationMapMessageSelect:"Sélectionne l'emplacement à l'aide de la carte",LocationMapMessageUpdateError:"Impossible de mettre à jour le lieux.",LocationMapNavTitle:"Emplacement du quartier",LocationMapTitleAddLocation:"Emplacement de la carte",LocationMapTitleSelectedLocation:"Lieu sélectionné :",LocationMessageSearchError:"Impossible d’extraire les prévisions d’emplacement.",LocationNameButtonSave:"Enregistrer",LocationNameTextfieldPlaceholder:"Ton nom",LocationNameTitleMapLocation:"Emplacement de la carte",LocationNameTitleNewName:"Nouveau nom",MapSettingsTitle:"Paramètres de la carte",MapSettingsTitleHybrid:"Hybride",MapSettingsTitleLegend:"Légende",MapSettingsTitleMapType:"Type de carte",MapSettingsTitleOverlayType:"Type de superposition",MapSettingsTitleRadar:"Radar / précipitations",MapSettingsTitleSatellite:"Satellite",MapSettingsTitleShowLegend:"Afficher la légende",MapSettingsTitleTempestStations:"Stations Tempest",MapSettingsTitleTheme:"Thème de la carte",MapSettingsTitleZoomControl:"Afficher le contrôle de zoom",NearcastMessageInfo:"Cette prévision est alimentée par notre technologie brevetée Nearcast, qui fournit des données météorologiques précises et spécifiques à chaque point, partout où vous en avez besoin.",RadarForecastPrecipTypeRain:"De la pluie à proximité",RadarForecastPrecipTypeSleet:"Du grésil à proximité",RadarForecastPrecipTypeSnow:"De la neige à proximité",RadarForecastPrecipTypeStorm:"Tempête à proximité",SettingsButtonCardinal:"Cardinal",SettingsButtonDegrees:"Degrés",StatusButtonTroubleshoot:"Dépanner >",StatusMessageTimezone:"Toutes les heures sont affichées dans l'heure locale de la station",StatusMessageTroubleshootDevice:"Utilisez les conseils de dépannage pour reconnecter votre Hub.",StatusNavTitle:"Statut",StatusTextBatteryEco:"Eco",StatusTextBatteryGood:"Bon",StatusTextBatteryLow:"Bas",StatusTextBatteryPowerSave:"Economie d'énergie",StatusTextBatteryReplace:"Remplace",StatusTextBLEStatusConnected:"Connecté",StatusTextBLEStatusDisconnected:"Déconnecté",StatusTextGood:"Bien",StatusTextLightningDisturber:"Filte parasite actif : éclair",StatusTextLightningFailed:"Échec du capteur d'éclair",StatusTextLightningNoise:"Signaux parasite : éclair",StatusTextNoSignal:"Pas de signal",StatusTextPrecipFailed:"Échec capteur pluie",StatusTextPressureFailed:"Échec capteur pression",StatusTextRHFailed:"Échec capteur humidité",StatusTextSatisfactory:"Satisfaisant",StatusTextSignalExcellent:"Excellent",StatusTextSignalGood:"Bien",StatusTextSignalNotConnected:"Pas connecté",StatusTextSignalPoor:"Faible",StatusTextSignalStrong:"Fort",StatusTextSignalWeak:"Faible",StatusTextStatusOffline:"Hors ligne",StatusTextStatusOnline:"En ligne",StatusTextTemperatureFailed:"Échec capteur température",StatusTextUVFailed:"Échec capteur UV",StatusTextWindFailed:"Échec capteur de vent ",StatusTitleBattery:"Batterie",StatusTitleBatteryState:"Etat",StatusTitleBLEStatus:"État de la connexion Bluetooth",StatusTitleCellStatus:"État cellulaire (CREG, RSSI)",StatusTitleDeviceId:"ID de l’appareil",StatusTitleDeviceSignal:"Signal de l'appareil (RSSI)",StatusTitleFirmware:"Révision du firmware",StatusTitleHub:"Hub -",StatusTitleLastObservation:"Dernière observation",StatusTitleLastStatusMessage:"Dernier message d’état",StatusTitleLearnMore:"En savoir plus",StatusTitleName:"Nom",StatusTitleSensorStatus:"État du capteur",StatusTitleSerial:"Numéro de série",StatusTitleStationId:"ID Station",StatusTitleStatus:"Statut réseau",StatusTitleUptime:"Uptime",StatusTitleWifiSignal:"Signal Wi-Fi (RSSI)",WeatherUndergroundButtonLink:"Lien",WeatherUndergroundButtonRemoveLink:"Supprimer le lien WU",WeatherUndergroundErrorForecastFailed:"La prévision n'a pas pu être chargée.",WeatherUndergroundLink:"Lien Weather Underground",WeatherUndergroundMessageConfirm:"Es-tu sûr(e) de vouloir supprimer le lien de ta station WU?",WeatherUndergroundMessageRemoveLink:"Impossible de supprimer le lien de la station WU",WeatherUndergroundMessageSharingRestricted:"Pour voir vos données Tempest sur d'autres applications météo, veuillez contacter le service client pour obtenir une liste des options actuelles",WeatherUndergroundTitleSendRain:"Envoyer les données de pluie",WeatherUndergroundTitleStationKey:"Clé de la station",WuSetupMessageRequiredFieldError:"L'ID de la station et la clé de la station sont nécessaires",WuSetupMessageSaveError:"Impossible de lier la station à WU"}}},this._init()},e.Locale.prototype._init=function(){this._setCountryAndLanguageCode(),this._loadLocale(),this._translateHTML()},e.Locale.prototype._setCountryAndLanguageCode=function(){this.browserCode=Util.getUrlParamByName("lang"),this.browserCode||(navigator.browserLanguage?this.browserCode=navigator.browserLanguage:navigator.language&&(this.browserCode=navigator.language)),Object.prototype.hasOwnProperty.call(this.languageMap,this.browserCode)?this.code=this.languageMap[this.browserCode]:this.code=this.browserCode;var t=this.code.split("-")[0];e.locale=t},e.Locale.prototype._loadLocale=function(){Object.prototype.hasOwnProperty.call(this.localizations,this.code)?this.locale=t.extend({},this.localizations[this.defaultCode],this.localizations[this.code]):this.locale=this.localizations[this.defaultCode]},e.Locale.prototype._translateHTML=function(){var e=this;t("[data-l10n-html]").each((function(){var a=t(this).attr("data-l10n-html"),i=t(this).attr("data-l10n-args"),r=i?JSON.parse(i):void 0;t(this).html(e.localize(a,r))})),t("[data-l10n-placeholder]").each((function(){var a=t(this).attr("data-l10n-placeholder"),i=t(this).attr("data-l10n-args"),r=i?JSON.parse(i):void 0;t(this).attr("placeholder",e.localize(a,r))}))},e.Locale.prototype.localize=function(e,t){var a="";if(!Object.prototype.hasOwnProperty.call(this.locale.translations,e))return"";if(a=this.locale.translations[e],t&&"object"==typeof t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(a=a.replace(new RegExp("\\{"+i+"\\}","g"),t[i]));return a},e.Locale.prototype.localizeDate=function(e){return new Intl.DateTimeFormat(this.code).format(e)},e.Locale.prototype.localizeDateNoYear=function(e){return new Intl.DateTimeFormat(this.code,{month:"numeric",day:"numeric"}).format(e)},e.Locale.prototype.getDefaultUnit=function(e){return this.defaultUnits[this.locale.units][e]}}(window.SWD=window.SWD||{},jQuery), /*! * Pikaday * * Copyright © 2014 David Bushell | BSD & MIT license | https://github.com/Pikaday/Pikaday */ function(e,t){"use strict";var a;if("object"==typeof exports){try{a=require("moment")}catch(e){}module.exports=t(a)}else"function"==typeof define&&define.amd?define((function(e){try{a=e("moment")}catch(e){}return t(a)})):e.Pikaday=t(e.moment)}(this,(function(e){"use strict";var t="function"==typeof e,a=!!window.addEventListener,i=window.document,r=window.setTimeout,n=function(e,t,i,r){a?e.addEventListener(t,i,!!r):e.attachEvent("on"+t,i)},s=function(e,t,i,r){a?e.removeEventListener(t,i,!!r):e.detachEvent("on"+t,i)},o=function(e,t){return-1!==(" "+e.className+" ").indexOf(" "+t+" ")},l=function(e,t){o(e,t)||(e.className=""===e.className?t:e.className+" "+t)},c=function(e,t){var a;e.className=(a=(" "+e.className+" ").replace(" "+t+" "," ")).trim?a.trim():a.replace(/^\s+|\s+$/g,"")},u=function(e){return/Array/.test(Object.prototype.toString.call(e))},d=function(e){return/Date/.test(Object.prototype.toString.call(e))&&!isNaN(e.getTime())},p=function(e){var t=e.getDay();return 0===t||6===t},h=function(e){return e%4==0&&e%100!=0||e%400==0},m=function(e,t){return[31,h(e)?29:28,31,30,31,30,31,31,30,31,30,31][t]},g=function(e){d(e)&&e.setHours(0,0,0,0)},y=function(e,t){return e.getTime()===t.getTime()},v=function(e,t,a){var i,r;for(i in t)(r=void 0!==e[i])&&"object"==typeof t[i]&&null!==t[i]&&void 0===t[i].nodeName?d(t[i])?a&&(e[i]=new Date(t[i].getTime())):u(t[i])?a&&(e[i]=t[i].slice(0)):e[i]=v({},t[i],a):!a&&r||(e[i]=t[i]);return e},f=function(e,t,a){var r;i.createEvent?((r=i.createEvent("HTMLEvents")).initEvent(t,!0,!1),r=v(r,a),e.dispatchEvent(r)):i.createEventObject&&(r=i.createEventObject(),r=v(r,a),e.fireEvent("on"+t,r))},_=function(e){return e.month<0&&(e.year-=Math.ceil(Math.abs(e.month)/12),e.month+=12),e.month>11&&(e.year+=Math.floor(Math.abs(e.month)/12),e.month-=12),e},T={field:null,bound:void 0,ariaLabel:"Use the arrow keys to pick a date",position:"bottom left",reposition:!0,format:"YYYY-MM-DD",toString:null,parse:null,defaultDate:null,setDefaultDate:!1,firstDay:0,formatStrict:!1,minDate:null,maxDate:null,yearRange:10,showWeekNumber:!1,pickWholeWeek:!1,minYear:0,maxYear:9999,minMonth:void 0,maxMonth:void 0,startRange:null,endRange:null,isRTL:!1,yearSuffix:"",showMonthAfterYear:!1,showDaysInNextAndPreviousMonths:!1,enableSelectionDaysInNextAndPreviousMonths:!1,numberOfMonths:1,mainCalendar:"left",container:void 0,blurFieldOnSelect:!0,i18n:{previousMonth:"Previous Month",nextMonth:"Next Month",months:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},theme:null,events:[],onSelect:null,onOpen:null,onClose:null,onDraw:null,keyboardInput:!0},S=function(e,t,a){for(t+=e.firstDay;t>=7;)t-=7;return a?e.i18n.weekdaysShort[t]:e.i18n.weekdays[t]},b=function(e){var t=[],a="false";if(e.isEmpty){if(!e.showDaysInNextAndPreviousMonths)return'';t.push("is-outside-current-month"),e.enableSelectionDaysInNextAndPreviousMonths||t.push("is-selection-disabled")}return e.isDisabled&&t.push("is-disabled"),e.isToday&&t.push("is-today"),e.isSelected&&(t.push("is-selected"),a="true"),e.hasEvent&&t.push("has-event"),e.isInRange&&t.push("is-inrange"),e.isStartRange&&t.push("is-startrange"),e.isEndRange&&t.push("is-endrange"),'"},D=function(e,t,a,i){return''+(t?e.reverse():e).join("")+""},w=function(e,t,a,i,r,n){var s,o,l,c,d,p=e._o,h=a===p.minYear,m=a===p.maxYear,g='
',y=!0,v=!0;for(l=[],s=0;s<12;s++)l.push('");for(c='
'+p.i18n.months[i]+'
",u(p.yearRange)?(s=p.yearRange[0],o=p.yearRange[1]+1):(s=a-p.yearRange,o=1+a+p.yearRange),l=[];s=p.minYear&&l.push('");return d='
'+a+p.yearSuffix+'
",p.showMonthAfterYear?g+=d+c:g+=c+d,h&&(0===i||p.minMonth>=i)&&(y=!1),m&&(11===i||p.maxMonth<=i)&&(v=!1),0===t&&(g+='"),t===e._o.numberOfMonths-1&&(g+='"),g+"
"},R=function(e,t,a){return''+function(e){var t,a=[];for(e.showWeekNumber&&a.push(""),t=0;t<7;t++)a.push('");return""+(e.isRTL?a.reverse():a).join("")+""}(e)+(""+t.join("")+"")+"
'+S(e,t,!0)+"
"},A=function(s){var l=this,c=l.config(s);l._onMouseDown=function(e){if(l._v){var t=(e=e||window.event).target||e.srcElement;if(t)if(o(t,"is-disabled")||(!o(t,"pika-button")||o(t,"is-empty")||o(t.parentNode,"is-disabled")?o(t,"pika-prev")?l.prevMonth():o(t,"pika-next")&&l.nextMonth():(l.setDate(new Date(t.getAttribute("data-pika-year"),t.getAttribute("data-pika-month"),t.getAttribute("data-pika-day"))),c.bound&&r((function(){l.hide(),c.blurFieldOnSelect&&c.field&&c.field.blur()}),100))),o(t,"pika-select"))l._c=!0;else{if(!e.preventDefault)return e.returnValue=!1,!1;e.preventDefault()}}},l._onChange=function(e){var t=(e=e||window.event).target||e.srcElement;t&&(o(t,"pika-select-month")?l.gotoMonth(t.value):o(t,"pika-select-year")&&l.gotoYear(t.value))},l._onKeyChange=function(e){if(e=e||window.event,l.isVisible())switch(e.keyCode){case 13:case 27:c.field&&c.field.blur();break;case 37:e.preventDefault(),l.adjustDate("subtract",1);break;case 38:l.adjustDate("subtract",7);break;case 39:l.adjustDate("add",1);break;case 40:l.adjustDate("add",7)}},l._onInputChange=function(a){var i;a.firedBy!==l&&(i=c.parse?c.parse(c.field.value,c.format):t?(i=e(c.field.value,c.format,c.formatStrict))&&i.isValid()?i.toDate():null:new Date(Date.parse(c.field.value)),d(i)&&l.setDate(i,!0),l._v||l.show())},l._onInputFocus=function(){l.show()},l._onInputClick=function(){l.show()},l._onInputBlur=function(){var e=i.activeElement;do{if(o(e,"pika-single"))return}while(e=e.parentNode);l._c||(l._b=r((function(){l.hide()}),50)),l._c=!1},l._onClick=function(e){var t=(e=e||window.event).target||e.srcElement,i=t;if(t){!a&&o(t,"pika-select")&&(t.onchange||(t.setAttribute("onchange","return;"),n(t,"change",l._onChange)));do{if(o(i,"pika-single")||i===c.trigger)return}while(i=i.parentNode);l._v&&t!==c.trigger&&i!==c.trigger&&l.hide()}},l.el=i.createElement("div"),l.el.className="pika-single"+(c.isRTL?" is-rtl":"")+(c.theme?" "+c.theme:""),n(l.el,"mousedown",l._onMouseDown,!0),n(l.el,"touchend",l._onMouseDown,!0),n(l.el,"change",l._onChange),c.keyboardInput&&n(i,"keydown",l._onKeyChange),c.field&&(c.container?c.container.appendChild(l.el):c.bound?i.body.appendChild(l.el):c.field.parentNode.insertBefore(l.el,c.field.nextSibling),n(c.field,"change",l._onInputChange),c.defaultDate||(t&&c.field.value?c.defaultDate=e(c.field.value,c.format).toDate():c.defaultDate=new Date(Date.parse(c.field.value)),c.setDefaultDate=!0));var u=c.defaultDate;d(u)?c.setDefaultDate?l.setDate(u,!0):l.gotoDate(u):l.gotoDate(new Date),c.bound?(this.hide(),l.el.className+=" is-bound",n(c.trigger,"click",l._onInputClick),n(c.trigger,"focus",l._onInputFocus),n(c.trigger,"blur",l._onInputBlur)):this.show()};return A.prototype={config:function(e){this._o||(this._o=v({},T,!0));var t=v(this._o,e,!0);t.isRTL=!!t.isRTL,t.field=t.field&&t.field.nodeName?t.field:null,t.theme="string"==typeof t.theme&&t.theme?t.theme:null,t.bound=!!(void 0!==t.bound?t.field&&t.bound:t.field),t.trigger=t.trigger&&t.trigger.nodeName?t.trigger:t.field,t.disableWeekends=!!t.disableWeekends,t.disableDayFn="function"==typeof t.disableDayFn?t.disableDayFn:null;var a=parseInt(t.numberOfMonths,10)||1;if(t.numberOfMonths=a>4?4:a,d(t.minDate)||(t.minDate=!1),d(t.maxDate)||(t.maxDate=!1),t.minDate&&t.maxDate&&t.maxDate100&&(t.yearRange=100);return t},toString:function(a){return a=a||this._o.format,d(this._d)?this._o.toString?this._o.toString(this._d,a):t?e(this._d).format(a):this._d.toDateString():""},getMoment:function(){return t?e(this._d):null},setMoment:function(a,i){t&&e.isMoment(a)&&this.setDate(a.toDate(),i)},getDate:function(){return d(this._d)?new Date(this._d.getTime()):null},setDate:function(e,t){if(!e)return this._d=null,this._o.field&&(this._o.field.value="",t||f(this._o.field,"change",{firedBy:this})),this.draw();if("string"==typeof e&&(e=new Date(Date.parse(e))),d(e)){var a=this._o.minDate,i=this._o.maxDate;d(a)&&ei&&(e=i),this._d=new Date(e.getTime()),g(this._d),this.gotoDate(this._d),this._o.field&&(this._o.field.value=this.toString(),t||f(this._o.field,"change",{firedBy:this})),t||"function"!=typeof this._o.onSelect||this._o.onSelect.call(this,this.getDate())}},gotoDate:function(e){var t=!0;if(d(e)){if(this.calendars){var a=new Date(this.calendars[0].year,this.calendars[0].month,1),i=new Date(this.calendars[this.calendars.length-1].year,this.calendars[this.calendars.length-1].month,1),r=e.getTime();i.setMonth(i.getMonth()+1),i.setDate(i.getDate()-1),t=r=n&&(this._y=n,!isNaN(o)&&this._m>o&&(this._m=o)),t="pika-title-"+Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,2);for(var c=0;c'+w(this,c,this.calendars[c].year,this.calendars[c].month,this.calendars[0].year,t)+this.render(this.calendars[c].year,this.calendars[c].month,t)+"";this.el.innerHTML=l,a.bound&&"hidden"!==a.field.type&&r((function(){a.trigger.focus()}),1),"function"==typeof this._o.onDraw&&this._o.onDraw(this),a.bound&&a.field.setAttribute("aria-label",a.ariaLabel)}},adjustPosition:function(){var e,t,a,r,n,s,o,u,d,p,h,m;if(!this._o.container){if(this.el.style.position="absolute",t=e=this._o.trigger,a=this.el.offsetWidth,r=this.el.offsetHeight,n=window.innerWidth||i.documentElement.clientWidth,s=window.innerHeight||i.documentElement.clientHeight,o=window.pageYOffset||i.body.scrollTop||i.documentElement.scrollTop,h=!0,m=!0,"function"==typeof e.getBoundingClientRect)u=(p=e.getBoundingClientRect()).left+window.pageXOffset,d=p.bottom+window.pageYOffset;else for(u=t.offsetLeft,d=t.offsetTop+t.offsetHeight;t=t.offsetParent;)u+=t.offsetLeft,d+=t.offsetTop;(this._o.reposition&&u+a>n||this._o.position.indexOf("right")>-1&&u-a+e.offsetWidth>0)&&(u=u-a+e.offsetWidth,h=!1),(this._o.reposition&&d+r>s+o||this._o.position.indexOf("top")>-1&&d-r-e.offsetHeight>0)&&(d=d-r-e.offsetHeight,m=!1),this.el.style.left=u-17+"px",this.el.style.top=d+"px",l(this.el,h?"left-aligned":"right-aligned"),l(this.el,m?"bottom-aligned":"top-aligned"),c(this.el,h?"right-aligned":"left-aligned"),c(this.el,m?"top-aligned":"bottom-aligned")}},render:function(e,t,a){var i=this._o,r=new Date,n=m(e,t),s=new Date(e,t,1).getDay(),o=[],l=[];g(r),i.firstDay>0&&(s-=i.firstDay)<0&&(s+=7);for(var c=0===t?11:t-1,u=11===t?0:t+1,h=0===t?e-1:e,v=11===t?e+1:e,f=m(h,c),_=n+s,T=_;T>7;)T-=7;_+=7-T;for(var S,w,A,L,I=!1,O=0,W=0;O<_;O++){var G=new Date(e,t,O-s+1),E=!!d(this._d)&&y(G,this._d),C=y(G,r),P=-1!==i.events.indexOf(G.toDateString()),M=O=n+s,x=O-s+1,k=t,V=e,U=i.startRange&&y(i.startRange,G),N=i.endRange&&y(i.endRange,G),F=i.startRange&&i.endRange&&i.startRangei.maxDate||i.disableWeekends&&p(G)||i.disableDayFn&&i.disableDayFn(G),isEmpty:M,isStartRange:U,isEndRange:N,isInRange:F,showDaysInNextAndPreviousMonths:i.showDaysInNextAndPreviousMonths,enableSelectionDaysInNextAndPreviousMonths:i.enableSelectionDaysInNextAndPreviousMonths};i.pickWholeWeek&&E&&(I=!0),l.push(b(H)),7==++W&&(i.showWeekNumber&&l.unshift((S=O-s,w=t,A=e,L=void 0,L=new Date(A,0,1),''+Math.ceil(((new Date(A,w,S)-L)/864e5+L.getDay()+1)/7)+"")),o.push(D(l,i.isRTL,i.pickWholeWeek,I)),l=[],W=0,I=!1)}return R(i,o,a)},isVisible:function(){return this._v},show:function(){this.isVisible()||(this._v=!0,this.draw(),c(this.el,"is-hidden"),this._o.bound&&(n(i,"click",this._onClick),this.adjustPosition()),"function"==typeof this._o.onOpen&&this._o.onOpen.call(this))},hide:function(){var e=this._v;!1!==e&&(this._o.bound&&s(i,"click",this._onClick),this.el.style.position="static",this.el.style.left="auto",this.el.style.top="auto",l(this.el,"is-hidden"),this._v=!1,void 0!==e&&"function"==typeof this._o.onClose&&this._o.onClose.call(this))},destroy:function(){var e=this._o;this.hide(),s(this.el,"mousedown",this._onMouseDown,!0),s(this.el,"touchend",this._onMouseDown,!0),s(this.el,"change",this._onChange),e.keyboardInput&&s(i,"keydown",this._onKeyChange),e.field&&(s(e.field,"change",this._onInputChange),e.bound&&(s(e.trigger,"click",this._onInputClick),s(e.trigger,"focus",this._onInputFocus),s(e.trigger,"blur",this._onInputBlur))),this.el.parentNode&&this.el.parentNode.removeChild(this.el)}},A})),function(e){"use strict";"function"==typeof define&&define.amd?define(e):"undefined"!=typeof module&&void 0!==module.exports?module.exports=e():"undefined"!=typeof Package?Sortable=e():window.Sortable=e()}((function(){"use strict";function e(e,t){if(!e||!e.nodeType||1!==e.nodeType)throw"Sortable: `el` must be HTMLElement, and not "+{}.toString.call(e);this.el=e,this.options=t=y({},t),e[x]=this;var a={group:Math.random(),sort:!0,disabled:!1,store:null,handle:null,scroll:!0,scrollSensitivity:30,scrollSpeed:10,draggable:/[uo]l/i.test(e.nodeName)?"li":">*",ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",ignore:"a, img",filter:null,animation:0,setData:function(e,t){e.setData("Text",t.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1};for(var r in a)!(r in t)&&(t[r]=a[r]);for(var n in $(t),this)"_"===n.charAt(0)&&(this[n]=this[n].bind(this));this.nativeDraggable=!t.forceFallback&&N,i(e,"mousedown",this._onTapStart),i(e,"touchstart",this._onTapStart),this.nativeDraggable&&(i(e,"dragover",this),i(e,"dragenter",this)),Y.push(this._onDragOver),t.store&&this.sort(t.store.get(this))}function t(e){T&&T.state!==e&&(s(T,"display",e?"none":""),!e&&T.state&&S.insertBefore(T,v),T.state=e)}function a(e,t,a){if(e){a=a||V;do{if(">*"===t&&e.parentNode===a||m(e,t))return e}while(e!==a&&(e=e.parentNode))}return null}function i(e,t,a){e.addEventListener(t,a,!1)}function r(e,t,a){e.removeEventListener(t,a,!1)}function n(e,t,a){if(e)if(e.classList)e.classList[a?"add":"remove"](t);else{var i=(" "+e.className+" ").replace(M," ").replace(" "+t+" "," ");e.className=(i+(a?" "+t:"")).replace(M," ")}}function s(e,t,a){var i=e&&e.style;if(i){if(void 0===a)return V.defaultView&&V.defaultView.getComputedStyle?a=V.defaultView.getComputedStyle(e,""):e.currentStyle&&(a=e.currentStyle),void 0===t?a:a[t];t in i||(t="-webkit-"+t),i[t]=a+("string"==typeof a?"":"px")}}function o(e,t,a){if(e){var i=e.getElementsByTagName(t),r=0,n=i.length;if(a)for(;n>r;r++)a(i[r],r);return i}return[]}function l(e,t,a,i,r,n,s){var o=V.createEvent("Event"),l=(e||t[x]).options,c="on"+a.charAt(0).toUpperCase()+a.substr(1);o.initEvent(a,!0,!0),o.to=t,o.from=r||t,o.item=i||t,o.clone=T,o.oldIndex=n,o.newIndex=s,t.dispatchEvent(o),l[c]&&l[c].call(e,o)}function c(e,t,a,i,r,n){var s,o,l=e[x],c=l.options.onMove;return(s=V.createEvent("Event")).initEvent("move",!0,!0),s.to=t,s.from=e,s.dragged=a,s.draggedRect=i,s.related=r||t,s.relatedRect=n||t.getBoundingClientRect(),e.dispatchEvent(s),c&&(o=c.call(l,s)),o}function u(e){e.draggable=!1}function d(){H=!1}function p(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,a=t.length,i=0;a--;)i+=t.charCodeAt(a);return i.toString(36)}function h(e,t){var a=0;if(!e||!e.parentNode)return-1;for(;e&&(e=e.previousElementSibling);)"TEMPLATE"!==e.nodeName.toUpperCase()&&m(e,t)&&a++;return a}function m(e,t){if(e){var a=(t=t.split(".")).shift().toUpperCase(),i=new RegExp("\\s("+t.join("|")+")(?=\\s)","g");return!(""!==a&&e.nodeName.toUpperCase()!=a||t.length&&((" "+e.className+" ").match(i)||[]).length!=t.length)}return!1}function g(e,t){var a,i;return function(){void 0===a&&(a=arguments,i=this,setTimeout((function(){1===a.length?e.call(i,a[0]):e.apply(i,a),a=void 0}),t))}}function y(e,t){if(e&&t)for(var a in t)t.hasOwnProperty(a)&&(e[a]=t[a]);return e}if("undefined"==typeof window||void 0===window.document)return function(){throw new Error("Sortable.js requires a window with a document")};var v,f,_,T,S,b,D,w,R,A,L,I,O,W,G,E,C,P={},M=/\s+/g,x="Sortable"+(new Date).getTime(),k=window,V=k.document,U=k.parseInt,N=!!("draggable"in V.createElement("div")),F=function(e){return(e=V.createElement("x")).style.cssText="pointer-events:auto","auto"===e.style.pointerEvents}(),H=!1,z=Math.abs,Y=[],B=g((function(e,t,a){if(a&&t.scroll){var i,r,n,s,o=t.scrollSensitivity,l=t.scrollSpeed,c=e.clientX,u=e.clientY,d=window.innerWidth,p=window.innerHeight;if(w!==a&&(D=t.scroll,w=a,!0===D)){D=a;do{if(D.offsetWidth=p-u)-(o>=u),((n=(o>=d-c)-(o>=c))||s)&&(i=k)),(P.vx!==n||P.vy!==s||P.el!==i)&&(P.el=i,P.vx=n,P.vy=s,clearInterval(P.pid),i&&(P.pid=setInterval((function(){i===k?k.scrollTo(k.pageXOffset+n*l,k.pageYOffset+s*l):(s&&(i.scrollTop+=s*l),n&&(i.scrollLeft+=n*l))}),24)))}}),30),$=function(e){var t=e.group;t&&"object"==typeof t||(t=e.group={name:t}),["pull","put"].forEach((function(e){e in t||(t[e]=!0)})),e.groups=" "+t.name+(t.put.join?" "+t.put.join(" "):"")+" "};return e.prototype={constructor:e,_onTapStart:function(e){var t=this,i=this.el,r=this.options,n=e.type,s=e.touches&&e.touches[0],o=(s||e).target,c=o,u=r.filter;if(!("mousedown"===n&&0!==e.button||r.disabled)&&(o=a(o,r.draggable,i))){if(I=h(o,r.draggable),"function"==typeof u){if(u.call(this,e,o,this))return l(t,c,"filter",o,i,I),void e.preventDefault()}else if(u&&(u=u.split(",").some((function(e){return(e=a(c,e.trim(),i))?(l(t,e,"filter",o,i,I),!0):void 0}))))return void e.preventDefault();(!r.handle||a(c,r.handle,i))&&this._prepareDragStart(e,s,o)}},_prepareDragStart:function(e,t,a){var r,s=this,l=s.el,c=s.options,d=l.ownerDocument;a&&!v&&a.parentNode===l&&(G=e,S=l,f=(v=a).parentNode,b=v.nextSibling,W=c.group,r=function(){s._disableDelayedDrag(),v.draggable=!0,n(v,s.options.chosenClass,!0),s._triggerDragStart(t)},c.ignore.split(",").forEach((function(e){o(v,e.trim(),u)})),i(d,"mouseup",s._onDrop),i(d,"touchend",s._onDrop),i(d,"touchcancel",s._onDrop),c.delay?(i(d,"mouseup",s._disableDelayedDrag),i(d,"touchend",s._disableDelayedDrag),i(d,"touchcancel",s._disableDelayedDrag),i(d,"mousemove",s._disableDelayedDrag),i(d,"touchmove",s._disableDelayedDrag),s._dragStartTimer=setTimeout(r,c.delay)):r())},_disableDelayedDrag:function(){var e=this.el.ownerDocument;clearTimeout(this._dragStartTimer),r(e,"mouseup",this._disableDelayedDrag),r(e,"touchend",this._disableDelayedDrag),r(e,"touchcancel",this._disableDelayedDrag),r(e,"mousemove",this._disableDelayedDrag),r(e,"touchmove",this._disableDelayedDrag)},_triggerDragStart:function(e){e?(G={target:v,clientX:e.clientX,clientY:e.clientY},this._onDragStart(G,"touch")):this.nativeDraggable?(i(v,"dragend",this),i(S,"dragstart",this._onDragStart)):this._onDragStart(G,!0);try{V.selection?setTimeout((function(){V.selection.empty()})):window.getSelection().removeAllRanges()}catch(e){}},_dragStarted:function(){S&&v&&(n(v,this.options.ghostClass,!0),e.active=this,l(this,S,"start",v,S,I))},_emulateDragOver:function(){if(E){if(this._lastX===E.clientX&&this._lastY===E.clientY)return;this._lastX=E.clientX,this._lastY=E.clientY,F||s(_,"display","none");var e=V.elementFromPoint(E.clientX,E.clientY),t=e,a=" "+this.options.group.name,i=Y.length;if(t)do{if(t[x]&&t[x].options.groups.indexOf(a)>-1){for(;i--;)Y[i]({clientX:E.clientX,clientY:E.clientY,target:e,rootEl:t});break}e=t}while(t=t.parentNode);F||s(_,"display","")}},_onTouchMove:function(t){if(G){e.active||this._dragStarted(),this._appendGhost();var a=t.touches?t.touches[0]:t,i=a.clientX-G.clientX,r=a.clientY-G.clientY,n=t.touches?"translate3d("+i+"px,"+r+"px,0)":"translate("+i+"px,"+r+"px)";C=!0,E=a,s(_,"webkitTransform",n),s(_,"mozTransform",n),s(_,"msTransform",n),s(_,"transform",n),t.preventDefault()}},_appendGhost:function(){if(!_){var e,t=v.getBoundingClientRect(),a=s(v),i=this.options;n(_=v.cloneNode(!0),i.ghostClass,!1),n(_,i.fallbackClass,!0),s(_,"top",t.top-U(a.marginTop,10)),s(_,"left",t.left-U(a.marginLeft,10)),s(_,"width",t.width),s(_,"height",t.height),s(_,"opacity","0.8"),s(_,"position","fixed"),s(_,"zIndex","100000"),s(_,"pointerEvents","none"),i.fallbackOnBody&&V.body.appendChild(_)||S.appendChild(_),e=_.getBoundingClientRect(),s(_,"width",2*t.width-e.width),s(_,"height",2*t.height-e.height)}},_onDragStart:function(e,t){var a=e.dataTransfer,r=this.options;this._offUpEvents(),"clone"==W.pull&&(s(T=v.cloneNode(!0),"display","none"),S.insertBefore(T,v)),t?("touch"===t?(i(V,"touchmove",this._onTouchMove),i(V,"touchend",this._onDrop),i(V,"touchcancel",this._onDrop)):(i(V,"mousemove",this._onTouchMove),i(V,"mouseup",this._onDrop)),this._loopId=setInterval(this._emulateDragOver,50)):(a&&(a.effectAllowed="move",r.setData&&r.setData.call(this,a,v)),i(V,"drop",this),setTimeout(this._dragStarted,0))},_onDragOver:function(e){var i,r,n,o=this.el,l=this.options,u=l.group,p=u.put,h=W===u,m=l.sort;if(void 0!==e.preventDefault&&(e.preventDefault(),!l.dragoverBubble&&e.stopPropagation()),C=!0,W&&!l.disabled&&(h?m||(n=!S.contains(v)):W.pull&&p&&(W.name===u.name||p.indexOf&&~p.indexOf(W.name)))&&(void 0===e.rootEl||e.rootEl===this.el)){if(B(e,l,this.el),H)return;if(i=a(e.target,l.draggable,o),r=v.getBoundingClientRect(),n)return t(!0),void(T||b?S.insertBefore(v,T||b):m||S.appendChild(v));if(0===o.children.length||o.children[0]===_||o===e.target&&(i=function(e,t){var a=e.lastElementChild,i=a.getBoundingClientRect();return(t.clientY-(i.top+i.height)>5||t.clientX-(i.right+i.width)>5)&&a}(o,e))){if(i){if(i.animated)return;y=i.getBoundingClientRect()}t(h),!1!==c(S,o,v,r,i,y)&&(v.contains(o)||(o.appendChild(v),f=o),this._animate(r,v),i&&this._animate(y,i))}else if(i&&!i.animated&&i!==v&&void 0!==i.parentNode[x]){R!==i&&(R=i,A=s(i),L=s(i.parentNode));var g,y=i.getBoundingClientRect(),D=y.right-y.left,w=y.bottom-y.top,I=/left|right|inline/.test(A.cssFloat+A.display)||"flex"==L.display&&0===L["flex-direction"].indexOf("row"),O=i.offsetWidth>v.offsetWidth,G=i.offsetHeight>v.offsetHeight,E=(I?(e.clientX-y.left)/D:(e.clientY-y.top)/w)>.5,P=i.nextElementSibling,M=c(S,o,v,r,i,y);if(!1!==M){if(H=!0,setTimeout(d,30),t(h),1===M||-1===M)g=1===M;else if(I){var k=v.offsetTop,V=i.offsetTop;g=k===V?i.previousElementSibling===v&&!O||E&&O:V>k}else g=P!==v&&!G||E&&G;v.contains(o)||(g&&!P?o.appendChild(v):i.parentNode.insertBefore(v,g?P:i)),f=v.parentNode,this._animate(r,v),this._animate(y,i)}}}},_animate:function(e,t){var a=this.options.animation;if(a){var i=t.getBoundingClientRect();s(t,"transition","none"),s(t,"transform","translate3d("+(e.left-i.left)+"px,"+(e.top-i.top)+"px,0)"),t.offsetWidth,s(t,"transition","all "+a+"ms"),s(t,"transform","translate3d(0,0,0)"),clearTimeout(t.animated),t.animated=setTimeout((function(){s(t,"transition",""),s(t,"transform",""),t.animated=!1}),a)}},_offUpEvents:function(){var e=this.el.ownerDocument;r(V,"touchmove",this._onTouchMove),r(e,"mouseup",this._onDrop),r(e,"touchend",this._onDrop),r(e,"touchcancel",this._onDrop)},_onDrop:function(t){var a=this.el,i=this.options;clearInterval(this._loopId),clearInterval(P.pid),clearTimeout(this._dragStartTimer),r(V,"mousemove",this._onTouchMove),this.nativeDraggable&&(r(V,"drop",this),r(a,"dragstart",this._onDragStart)),this._offUpEvents(),t&&(C&&(t.preventDefault(),!i.dropBubble&&t.stopPropagation()),_&&_.parentNode.removeChild(_),v&&(this.nativeDraggable&&r(v,"dragend",this),u(v),n(v,this.options.ghostClass,!1),n(v,this.options.chosenClass,!1),S!==f?(O=h(v,i.draggable))>=0&&(l(null,f,"sort",v,S,I,O),l(this,S,"sort",v,S,I,O),l(null,f,"add",v,S,I,O),l(this,S,"remove",v,S,I,O)):(T&&T.parentNode.removeChild(T),v.nextSibling!==b&&((O=h(v,i.draggable))>=0&&(l(this,S,"update",v,S,I,O),l(this,S,"sort",v,S,I,O)))),e.active&&((null==O||-1===O)&&(O=I),l(this,S,"end",v,S,I,O),this.save()))),this._nulling()},_nulling:function(){e.active===this&&(S=v=f=_=b=T=D=w=G=E=C=O=R=A=W=e.active=null)},handleEvent:function(e){var t=e.type;"dragover"===t||"dragenter"===t?v&&(this._onDragOver(e),function(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.preventDefault()}(e)):("drop"===t||"dragend"===t)&&this._onDrop(e)},toArray:function(){for(var e,t=[],i=this.el.children,r=0,n=i.length,s=this.options;n>r;r++)a(e=i[r],s.draggable,this.el)&&t.push(e.getAttribute(s.dataIdAttr)||p(e));return t},sort:function(e){var t={},i=this.el;this.toArray().forEach((function(e,r){var n=i.children[r];a(n,this.options.draggable,i)&&(t[e]=n)}),this),e.forEach((function(e){t[e]&&(i.removeChild(t[e]),i.appendChild(t[e]))}))},save:function(){var e=this.options.store;e&&e.set(this)},closest:function(e,t){return a(e,t||this.options.draggable,this.el)},option:function(e,t){var a=this.options;return void 0===t?a[e]:(a[e]=t,void("group"===e&&$(a)))},destroy:function(){var e=this.el;e[x]=null,r(e,"mousedown",this._onTapStart),r(e,"touchstart",this._onTapStart),this.nativeDraggable&&(r(e,"dragover",this),r(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),(function(e){e.removeAttribute("draggable")})),Y.splice(Y.indexOf(this._onDragOver),1),this._onDrop(),this.el=e=null}},e.utils={on:i,off:r,css:s,find:o,is:function(e,t){return!!a(e,t,e)},extend:y,throttle:g,closest:a,toggleClass:n,index:h},e.create=function(t,a){return new e(t,a)},e.version="1.4.2",e})),function(e,t){"function"==typeof define&&define.amd?define(["jquery"],t):t(e.jQuery)}(this,(function(e){"use strict";function t(t){if(i.webkit&&!t)return{height:0,width:0};if(!i.data.outer){var a={border:"none","box-sizing":"content-box",height:"200px",margin:"0",padding:"0",width:"200px"};i.data.inner=e("
").css(e.extend({},a)),i.data.outer=e("
").css(e.extend({left:"-1000px",overflow:"scroll",position:"absolute",top:"-1000px"},a)).append(i.data.inner).appendTo("body")}return i.data.outer.scrollLeft(1e3).scrollTop(1e3),{height:Math.ceil(i.data.outer.offset().top-i.data.inner.offset().top||0),width:Math.ceil(i.data.outer.offset().left-i.data.inner.offset().left||0)}}function a(e){var t=e.originalEvent;return(!t.axis||t.axis!==t.HORIZONTAL_AXIS)&&!t.wheelDeltaX}var i={data:{index:0,name:"scrollbar"},macosx:/mac/i.test(navigator.platform),mobile:/android|webos|iphone|ipad|ipod|blackberry/i.test(navigator.userAgent),overlay:null,scroll:null,scrolls:[],webkit:/webkit/i.test(navigator.userAgent)&&!/edge\/\d+/i.test(navigator.userAgent)};i.scrolls.add=function(e){this.remove(e).push(e)},i.scrolls.remove=function(t){for(;e.inArray(t,this)>=0;)this.splice(e.inArray(t,this),1);return this};var r={autoScrollSize:!0,autoUpdate:!0,debug:!1,disableBodyScroll:!1,duration:200,ignoreMobile:!1,ignoreOverlay:!1,scrollStep:30,showArrows:!1,stepScrolling:!0,scrollx:null,scrolly:null,onDestroy:null,onInit:null,onScroll:null,onUpdate:null},n=function(a){i.scroll||(i.overlay=function(){var e=t(!0);return!(e.height||e.width)}(),i.scroll=t(),o(),e(window).resize((function(){var e=!1;if(i.scroll&&(i.scroll.height||i.scroll.width)){var a=t();(a.height!==i.scroll.height||a.width!==i.scroll.width)&&(i.scroll=a,e=!0)}o(e)}))),this.container=a,this.namespace=".scrollbar_"+i.data.index++,this.options=e.extend({},r,window.jQueryScrollbarOptions||{}),this.scrollTo=null,this.scrollx={},this.scrolly={},a.data(i.data.name,this),i.scrolls.add(this)};n.prototype={destroy:function(){if(this.wrapper){this.container.removeData(i.data.name),i.scrolls.remove(this);var t=this.container.scrollLeft(),a=this.container.scrollTop();this.container.insertBefore(this.wrapper).css({height:"",margin:"","max-height":""}).removeClass("scroll-content scroll-scrollx_visible scroll-scrolly_visible").off(this.namespace).scrollLeft(t).scrollTop(a),this.scrollx.scroll.removeClass("scroll-scrollx_visible").find("div").andSelf().off(this.namespace),this.scrolly.scroll.removeClass("scroll-scrolly_visible").find("div").andSelf().off(this.namespace),this.wrapper.remove(),e(document).add("body").off(this.namespace),e.isFunction(this.options.onDestroy)&&this.options.onDestroy.apply(this,[this.container])}},init:function(t){var r=this,n=this.container,s=this.containerWrapper||n,o=this.namespace,l=e.extend(this.options,t||{}),c={x:this.scrollx,y:this.scrolly},u=this.wrapper,d={scrollLeft:n.scrollLeft(),scrollTop:n.scrollTop()};if(i.mobile&&l.ignoreMobile||i.overlay&&l.ignoreOverlay||i.macosx&&!i.webkit)return!1;if(u)s.css({height:"auto","margin-bottom":-1*i.scroll.height+"px","margin-right":-1*i.scroll.width+"px","max-height":""});else{if(this.wrapper=u=e("
").addClass("scroll-wrapper").addClass(n.attr("class")).css("position","absolute"==n.css("position")?"absolute":"relative").insertBefore(n).append(n),n.is("textarea")&&(this.containerWrapper=s=e("
").insertBefore(n).append(n),u.addClass("scroll-textarea")),s.addClass("scroll-content").css({height:"auto","margin-bottom":-1*i.scroll.height+"px","margin-right":-1*i.scroll.width+"px","max-height":""}),n.on("scroll"+o,(function(t){e.isFunction(l.onScroll)&&l.onScroll.call(r,{maxScroll:c.y.maxScrollOffset,scroll:n.scrollTop(),size:c.y.size,visible:c.y.visible},{maxScroll:c.x.maxScrollOffset,scroll:n.scrollLeft(),size:c.x.size,visible:c.x.visible}),c.x.isVisible&&c.x.scroll.bar.css("left",n.scrollLeft()*c.x.kx+"px"),c.y.isVisible&&c.y.scroll.bar.css("top",n.scrollTop()*c.y.kx+"px")})),u.on("scroll"+o,(function(){u.scrollTop(0).scrollLeft(0)})),l.disableBodyScroll){var p=function(e){a(e)?c.y.isVisible&&c.y.mousewheel(e):c.x.isVisible&&c.x.mousewheel(e)};u.on("MozMousePixelScroll"+o,p),u.on("mousewheel"+o,p),i.mobile&&u.on("touchstart"+o,(function(t){var a=t.originalEvent.touches&&t.originalEvent.touches[0]||t,i=a.pageX,r=a.pageY,s=n.scrollLeft(),l=n.scrollTop();e(document).on("touchmove"+o,(function(e){var t=e.originalEvent.targetTouches&&e.originalEvent.targetTouches[0]||e;n.scrollLeft(s+i-t.pageX),n.scrollTop(l+r-t.pageY),e.preventDefault()})),e(document).on("touchend"+o,(function(){e(document).off(o)}))}))}e.isFunction(l.onInit)&&l.onInit.apply(this,[n])}e.each(c,(function(t,i){var s=null,u=1,d="x"===t?"scrollLeft":"scrollTop",p=l.scrollStep,h=function(){var e=n[d]();n[d](e+p),1==u&&e+p>=m&&(e=n[d]()),-1==u&&m>=e+p&&(e=n[d]()),n[d]()==e&&s&&s()},m=0;i.scroll||(i.scroll=r._getScroll(l["scroll"+t]).addClass("scroll-"+t),l.showArrows&&i.scroll.addClass("scroll-element_arrows_visible"),i.mousewheel=function(e){if(!i.isVisible||"x"===t&&a(e))return!0;if("y"===t&&!a(e))return c.x.mousewheel(e),!0;var s=-1*e.originalEvent.wheelDelta||e.originalEvent.detail,o=i.size-i.visible-i.offset;return(s>0&&o>m||0>s&&m>0)&&(0>(m+=s)&&(m=0),m>o&&(m=o),r.scrollTo=r.scrollTo||{},r.scrollTo[d]=m,setTimeout((function(){r.scrollTo&&(n.stop().animate(r.scrollTo,240,"linear",(function(){m=n[d]()})),r.scrollTo=null)}),1)),e.preventDefault(),!1},i.scroll.on("MozMousePixelScroll"+o,i.mousewheel).on("mousewheel"+o,i.mousewheel).on("mouseenter"+o,(function(){m=n[d]()})),i.scroll.find(".scroll-arrow, .scroll-element_track").on("mousedown"+o,(function(a){if(1!=a.which)return!0;u=1;var o={eventOffset:a["x"===t?"pageX":"pageY"],maxScrollValue:i.size-i.visible-i.offset,scrollbarOffset:i.scroll.bar.offset()["x"===t?"left":"top"],scrollbarSize:i.scroll.bar["x"===t?"outerWidth":"outerHeight"]()},c=0,g=0;return e(this).hasClass("scroll-arrow")?(u=e(this).hasClass("scroll-arrow_more")?1:-1,p=l.scrollStep*u,m=u>0?o.maxScrollValue:0):(u=o.eventOffset>o.scrollbarOffset+o.scrollbarSize?1:o.eventOffset','
','
','
','
','
','
','
','
',"
","
",'
','
','
',"
",'
','
',"
","
","
"].join(""),simple:['
','
','
','
','
',"
","
"].join("")};return a[t]&&(t=a[t]),t||(t=a.simple),t="string"==typeof t?e(t).appendTo(this.wrapper):e(t),e.extend(t,{bar:t.find(".scroll-bar"),size:t.find(".scroll-element_size"),track:t.find(".scroll-element_track")}),t},_handleMouseDown:function(t,a){var i=this.namespace;return e(document).on("blur"+i,(function(){e(document).add("body").off(i),t&&t()})),e(document).on("dragstart"+i,(function(e){return e.preventDefault(),!1})),e(document).on("mouseup"+i,(function(){e(document).add("body").off(i),t&&t()})),e("body").on("selectstart"+i,(function(e){return e.preventDefault(),!1})),a&&a.preventDefault(),!1},_updateScroll:function(t,a){var r=this.container,n=this.containerWrapper||r,s="scroll-scroll"+t+"_visible",o="x"===t?this.scrolly:this.scrollx,l=parseInt(this.container.css("x"===t?"left":"top"),10)||0,c=this.wrapper,u=a.size,d=a.visible+l;a.isVisible=u-d>1,a.isVisible?(a.scroll.addClass(s),o.scroll.addClass(s),n.addClass(s)):(a.scroll.removeClass(s),o.scroll.removeClass(s),n.removeClass(s)),"y"===t&&(r.is("textarea")||d>u?n.css({height:d+i.scroll.height+"px","max-height":"none"}):n.css({"max-height":d+i.scroll.height+"px"})),(a.size!=r.prop("scrollWidth")||o.size!=r.prop("scrollHeight")||a.visible!=c.width()||o.visible!=c.height()||a.offset!=(parseInt(r.css("left"),10)||0)||o.offset!=(parseInt(r.css("top"),10)||0))&&(e.extend(this.scrollx,{offset:parseInt(r.css("left"),10)||0,size:r.prop("scrollWidth"),visible:c.width()}),e.extend(this.scrolly,{offset:parseInt(r.css("top"),10)||0,size:this.container.prop("scrollHeight"),visible:c.height()}),this._updateScroll("x"===t?"y":"x",o))}};var s=n;e.fn.scrollbar=function(t,a){return"string"!=typeof t&&(a=t,t="init"),void 0===a&&(a=[]),e.isArray(a)||(a=[a]),this.not("body, .scroll-wrapper").each((function(){var r=e(this),n=r.data(i.data.name);(n||"init"===t)&&(n||(n=new s(r)),n[t]&&n[t].apply(n,a))})),this},e.fn.scrollbar.options=r;var o=function(){var e=0;return function(t){var a,r,n,s,l,c,u;for(a=0;ar?1:0}))}};$.fn.stripClass=function(e,t){var a=new RegExp((t?"\\S+":"\\b")+e+"\\S*","g");return this.attr("class",(function(e,t){if(t)return t.replace(a,"")})),this},function(e,t){e.Observations=function(a){this.defaultSettings={locationId:null,deviceIds:null,isArbitrary:null,elevationForDevices:null,forecastObservationReceived:null,forecastSource:null,observationReceived:null,setTempTimezone:null,alertRecieved:null,networkRecieved:null,lat:null,lon:null,lightningEventReceived:null,locationStatusEventReceived:null,socketOpened:null,socketConnectionError:null,socketConnectionAttemptsExceeded:null,refreshEventReceived:null,listenerType:e.Observations.LISTENER_DEVICES},this.socketUrl="wss://ws.weatherflow.com/swd/data",this.socket=null,this.socketConnectAttempts=0,this.SOCKET_MAX_CONNECT_ATTEMPTS=10,this.SOCKET_RECONNECT_INTERVAL=4e3,this.SOCKET_MAX_RECONNECT_INTERVAL=6e4,this.refreshInterval=9e5,this.socketReconnectTimeout=null,this.lastObTimestamp={},this.timeoutId=null,this.lastOb={},this.lastRapidWindOb={},this.browser=this._getBrowserInfo(),this.forecastRefresher=null,this.stopMessages=[],this.settings=t.extend({},this.defaultSettings,a),this._init()},e.Observations.prototype._init=function(){switch(this.settings.listenerType){case e.Observations.LISTENER_FORECAST:this._getForecast(),this._createSocket(!1);break;default:null!=this.settings.deviceIds&&this.settings.deviceIds instanceof Array&&this._createSocket(!1)}},e.Observations.prototype._getForecast=function(){if(null!=this.settings.lat&null!=this.settings.lon){var a=this,i={lat:this.settings.lat,lon:this.settings.lon,units_temp:e.user.userTemperatureUnits(),units_wind:e.user.userWindUnits(),units_pressure:e.user.userPressureUnits(),units_distance:e.user.userDistanceUnits(),units_precip:e.user.userPrecipUnits(),units_other:e.user.userOtherUnits(),units_direction:e.user.userWindUnits()};1==this.settings.isArbitrary?i.arbitrary_location_id=this.settings.locationId:i.station_id=this.settings.locationId,null!=this.settings.forecastSource&&(i.source_id=this.settings.forecastSource),e.makeRequest("better_forecast",i,(function(i){if(0==i.status.status_code&&null!=a.settings.forecastObservationReceived){Object.prototype.hasOwnProperty.call(i,"current_conditions")||(i.current_conditions={}),a._refreshInterval=i&&1e3*i.refresh_interval_seconds||9e5,a.settings.setTempTimezone(i.timezone),i.current_conditions.lightning_strike_3hr_last_epoch=null;var r=new e.WindValue(i.current_conditions.wind_avg,i.current_conditions.wind_direction,e.user.userWindUnits(),e.user.userDirectionUnits());i.current_conditions.wind_direction_cardinal=r.windDirectionDisplayValueInText(),null!=i.current_conditions.lightning_strike_count_last_3hr&&i.current_conditions.lightning_strike_count_last_3hr>0&&(i.current_conditions.lightning_strike_3hr_last_epoch=i.current_conditions.lightning_strike_last_epoch),null!=i.alerts?a.settings.alertRecieved(i.alerts.alerts):t("#location-alerts").hide(),void 0!==i.station&&(void 0!==i.station.network_data&&i.station.network_data.length>0?a.settings.networkRecieved(i.station.network_data):t("#custom-network").css("display","none")),a.settings.forecastObservationReceived(i)}else 99==i.status.status_code&&t("body").hasClass("temp-view")&&(alert(e.user.localize("LocationMessageSearchError")),window.location.reload());a.forecastRefresher=setTimeout((function(){a._getForecast()}),a._refreshInterval)}))}},e.Observations.prototype._createSocket=function(t){var a=this;if(t){if(this.socketConnectAttempts>this.SOCKET_MAX_CONNECT_ATTEMPTS)return void("function"==typeof this.settings.socketConnectionAttemptsExceeded&&this.settings.socketConnectionAttemptsExceeded())}else this.socketConnectAttempts=0;if(null!=this.socket){if(this.socket.readyState!=WebSocket.CLOSED)return;this.socket=null}var i=this.socketUrl+"?api_key="+e.API_KEY+"&app=web&ver="+window.SWDDebug.appVersion+"&browser="+this._getBrowserInfoString(this.browser);null!=e.user&&null!=e.user.jwt&&(i=i+"&token="+e.user.jwt),this.socket=new WebSocket(i),this.socket.onopen=function(){a._startListening(),"function"==typeof a.settings.socketOpened&&a.settings.socketOpened()},this.socket.onclose=function(){var e=Math.round(a.SOCKET_RECONNECT_INTERVAL*Math.pow(1.5,a.socketConnectAttempts));clearTimeout(a.socketReconnectTimeout),a.socket=null,e>a.SOCKET_MAX_RECONNECT_INTERVAL&&(e=a.SOCKET_MAX_RECONNECT_INTERVAL),"function"==typeof a.settings.socketConnectionError&&a.settings.socketConnectionError(e),a.socketReconnectTimeout=setTimeout((function(){a.socketConnectAttempts=a.socketConnectAttempts+1,a._createSocket(!0)}),e)},this.socket.onerror=function(e){a._log(e)},this.socket.onmessage=function(i){if("function"==typeof a.settings.observationReceived){let r=e.parseJSON(i.data);if(null!=r)if(null!=r.status_code&&5==r.status_code)a.socket.close();else if(null!=r.type){if(Object.keys(a.lastObTimestamp).length>=1)for(let e in a.lastObTimestamp){let t=a.lastObTimestamp[e];null!=t&&a._isLessThanAnHour(t)&&a._checkForInactivity(t)}switch(a.socketConnectAttempts=0,t=!1,r.type){case"rapid_wind":a.settings.observationReceived(a._createRapidWindMessage(r));break;case"evt_strike":"function"==typeof a.settings.lightningEventReceived&&a.settings.lightningEventReceived(r);break;case"evt_device_offline":a._handleLocationStatusEvent(r,e.LocationStatus.OFFLINE);break;case"evt_device_online":a._handleLocationStatusEvent(r,e.LocationStatus.ONLINE);break;case"refresh":a.settings.refreshEventReceived();break;default:a.settings.observationReceived(a._createMessage(r))}}}}},e.Observations.prototype._socketError=function(){this._log("socket.onerror/data.status_code=5"),"function"==typeof this.settings.socketConnectionError&&this.settings.socketConnectionError()},e.Observations.prototype._startListening=function(){if(null!=this.socket&&this.socket.readyState==WebSocket.OPEN)switch(this.settings.listenerType){case e.Observations.LISTENER_FORECAST:this._log("Starting better forecast listener for "+this.settings.locationId);var t={type:"listen_start_better_forecast",station_id:this.settings.locationId,units_wind:e.user.userWindUnits(),units_distance:e.user.userDistanceUnits()};this.socket.send(JSON.stringify(t)),this._addStopMessage({type:"listen_stop_better_forecast",station_id:this.settings.locationId});break;default:this._log("Starting listener for "+this.settings.deviceIds.join(","));for(var a=0;a0?new e.LightningDistanceValue(s[c],e.user.userDistanceUnits()).textDisplay():"---";i[e.ObRecord.LightningStrikeDistanceObserved]=S.observed(),i[e.ObRecord.LightningStrikeDistanceDisplay]=S.displayValue(),i[e.ObRecord.LightningStrikeDistanceDisplayWithUnits]=S.displayValueWithUnits(),i[e.ObRecord.LightningStrikeDistanceTextDisplay]=b;break;case e.ObservationRecord.BATTERY:null==s[c]||isNaN(s[c])?i[e.ObRecord.Battery]=s[c]:i[e.ObRecord.Battery]=s[c].toFixed(2),"obs_air"==a.type?i[e.ObRecord.BatteryState]=s[c]>2.4?e.user.localize("StatusTextBatteryGood"):e.user.localize("StatusTextBatteryReplace"):"obs_sky"==a.type&&(i[e.ObRecord.BatteryState]=s[c]>2.7?e.user.localize("StatusTextBatteryGood"):e.user.localize("StatusTextBatteryReplace"));break;default:i[l[c]]=s[c]}if("obs_sky"!=i.type&&"obs_st"!=i.type||Object.prototype.hasOwnProperty.call(a.summary,"precip_accum_local_yesterday")||(a.summary.precip_accum_local_yesterday=null),"obs_sky"==i.type||"obs_st"==i.type){var D=new e.WindValue(s[l.indexOf(e.ObservationRecord.WIND_AVG)],s[l.indexOf(e.ObservationRecord.WIND_DIR)],e.user.userWindUnits(),e.user.userDirectionUnits());i[e.ObRecord.WindAvgObserved]=D.windSpeedObserved(),i[e.ObRecord.WindAvg]=D.windSpeedDisplayValue(),i[e.ObRecord.WindAvgWithUnits]=D.windSpeedDisplayValueWithUnits(),i[e.ObRecord.WindDirObserved]=D.windDirectionObserved(),i[e.ObRecord.WindDir]=D.windDirectionDisplayValue(),i[e.ObRecord.WindDirCardinal]=D.windDirectionDisplayValueInText()}if(Object.prototype.hasOwnProperty.call(a,"summary")&&a.summary&&(null==a.summary.precip_accum_local_yesterday_final&&(a.summary.precip_accum_local_yesterday_final=null),null==a.summary.wet_bulb_globe_temperature&&(a.summary.wet_bulb_globe_temperature=null),t.each(a.summary,(function(t,a){switch(t){case"air_density":if(null!=a)if(e.user.userOtherUnits()==e.OtherUnit.IMPERIAL){var r=.062428*a;i[e.ObRecord.AirDensity]=r.toFixed(5)+" lbs/ft3"}else i[e.ObRecord.AirDensity]=a+" kg/m3";else i[e.ObRecord.AirDensity]="---";break;case"pressure_trend":i[e.ObRecord.PressureTrend]=a,i[e.ObRecord.PressureTrendLocalized]=e.user.localize("GeneralTitleTrend"+a.charAt(0).toUpperCase()+a.slice(1));break;case"precip_accum_local_yesterday":var n=new e.PrecipValue(a,e.user.userPrecipUnits());i[e.ObRecord.PrecipAccumLocalYesterdaySensor]=n.observed(),i[e.ObRecord.PrecipAccumLocalYesterdaySensorDisplayWithUnits]=n.displayValueWithUnitsIncludingTrace();break;case"precip_accum_local_yesterday_final":var s=new e.PrecipValue(a,e.user.userPrecipUnits());i[e.ObRecord.PrecipAccumLocalYesterdayFinal]=s.observed(),i[e.ObRecord.PrecipAccumLocalYesterdayFinalDisplayWithUnits]=s.displayValueWithUnitsIncludingTrace();break;case"precip_minutes_local_day":i[e.ObRecord.PrecipDurationLocalDay]=a,i[e.ObRecord.PrecipDurationLocalDayWithUnits]=a+" "+e.user.localize("GeneralValueMinutes");break;case"precip_minutes_local_yesterday":i[e.ObRecord.PrecipDurationLocalYesterday]=a,i[e.ObRecord.PrecipDurationLocalYesterdayWithUnits]=a+" "+e.user.localize("GeneralValueMinutes");break;case"precip_total_1h":var o=new e.PrecipValue(a,e.user.userPrecipUnits());i[e.ObRecord.PrecipTotalReportedLastHour]=o.observed(),i[e.ObRecord.PrecipTotalDisplayLastHourWithUnits]=o.displayValueWithUnits();break;case"precip_total_24h":var l=new e.PrecipValue(a,e.user.userPrecipUnits());i[e.ObRecord.PrecipTotalReportedLast24Hours]=l.observed(),i[e.ObRecord.PrecipTotalDisplayLast24HoursWithUnits]=l.displayValueWithUnits();break;case"strike_count_3h":i[e.ObRecord.LightningStrikeCountLast3Hrs]=a;break;case"strike_last_epoch":var c=new e.TimestampValue(a,e.user.localize("GeneralTitleNA"));i[e.ObRecord.LightningLastStrikeObserved]=a,i[e.ObRecord.LightningLastStrikeFuzzy]=c.localFuzzyTime(!1);break;case"strike_last_dist":var u=new e.DistanceValue(a,e.user.userDistanceUnits()),d=new e.LightningDistanceValue(a,e.user.userDistanceUnits());i[e.ObRecord.LightningLastStrikeDistanceObserved]=u.observed(),i[e.ObRecord.LightningLastStrikeDistanceDisplay]=u.displayValue(),i[e.ObRecord.LightningLastStrikeDistanceDisplayWithUnits]=u.displayValueWithUnits(),i[e.ObRecord.LightningLastStrikeDistanceTextDisplay]=d.textDisplay();break;case"feels_like":var p=new e.TemperatureValue(a,e.user.userTemperatureUnits(),!0);i[e.ObRecord.FeelsLikeObserved]=p.observed(),i[e.ObRecord.FeelsLike]=p.displayValue(),i[e.ObRecord.FeelsLikeWithSymbol]=p.displayValueWithSymbol(),i[e.ObRecord.FeelsLikeWithSymbolAndUnits]=p.displayValueWithSymbolAndUnits();break;case"wet_bulb_temperature":var h=new e.TemperatureValue(a,e.user.userTemperatureUnits(),!1);i[e.ObRecord.WetBulbTempObserved]=h.observed(),i[e.ObRecord.WetBulbTemp]=h.displayValue(),i[e.ObRecord.WetBulbTempWithSymbol]=h.displayValueWithSymbol(),i[e.ObRecord.WetBulbTempWithSymbolAndUnits]=h.displayValueWithSymbolAndUnits();break;case"wet_bulb_globe_temperature":var m=new e.TemperatureValue(a,e.user.userTemperatureUnits(),!1);i[e.ObRecord.WetBulbGlobeTempObserved]=m.observed(),i[e.ObRecord.WetBulbGlobeTemp]=m.displayValue(),i[e.ObRecord.WetBulbGlobeTempWithSymbol]=m.displayValueWithSymbol(),i[e.ObRecord.WetBulbGlobeTempWithSymbolAndUnits]=m.displayValueWithSymbolAndUnits()}}))),Object.prototype.hasOwnProperty.call(a,"device_id")&&a.device_id?i[e.ObRecord.DeviceId]=a.device_id:i[e.ObRecord.DeviceId]="---",Object.prototype.hasOwnProperty.call(a,"source")&&a.source?i[e.ObRecord.Source]=a.source:i[e.ObRecord.Source]="---",Object.prototype.hasOwnProperty.call(a,"serial_number")&&a.serial_number?i[e.ObRecord.SerialNumber]=a.serial_number:i[e.ObRecord.SerialNumber]="---",null!=i[e.ObRecord.WindGust]&&"---"==i[e.ObRecord.WindGust]&&null!=i[e.ObRecord.WindLull]&&"---"==i[e.ObRecord.WindLull]?i[e.ObRecord.WindLullAndGustWithUnits]="---":null!=i[e.ObRecord.WindGust]&&null!=i[e.ObRecord.WindGust]&&null!=i[e.ObRecord.WindLull]&&null!=i[e.ObRecord.WindLull]?i[e.ObRecord.WindLullAndGustWithUnits]=Math.round(i[e.ObRecord.WindLull])+" - "+Math.round(i[e.ObRecord.WindGust])+" "+e.WindSpeedValue.DisplayUnits(e.user.userWindUnits()):i[e.ObRecord.WindLullAndGustWithUnits]="0 - 0 "+e.WindSpeedValue.DisplayUnits(e.user.userWindUnits()),"obs_air"==i.type||"obs_st"==i.type){if(null!=n&&n.isValid()&&null!=i[e.ObRecord.AirTempObserved]){var w=new e.TemperatureValue(this._getDewPoint(i[e.ObRecord.Humidity],i[e.ObRecord.AirTempObserved]),e.user.userTemperatureUnits(),!1);i[e.ObRecord.DewPointObserved]=w.observed(),i[e.ObRecord.DewPoint]=w.displayValue(),i[e.ObRecord.DewPointWithSymbol]=w.displayValueWithSymbol(),i[e.ObRecord.DewPointWithSymbolAndUnits]=w.displayValueWithSymbolAndUnits()}else i[e.ObRecord.DewPointObserved]=i[e.ObRecord.Humidity],i[e.ObRecord.DewPoint]="---",i[e.ObRecord.DewPointWithSymbol]="---",i[e.ObRecord.DewPointWithSymbolAndUnits]="---";if(!Object.prototype.hasOwnProperty.call(i,e.ObRecord.FeelsLikeObserved)&&null!=i[e.ObRecord.AirTempObserved]&&null!=n&&n.isValid()){var R=new e.TemperatureValue(this._getHeatIndex(i[e.ObRecord.AirTempObserved],i[e.ObRecord.Humidity]),e.user.userTemperatureUnits(),!0);i[e.ObRecord.FeelsLikeObserved]=R.observed(),i[e.ObRecord.FeelsLike]=R.displayValue(),i[e.ObRecord.FeelsLikeWithSymbol]=R.displayValueWithSymbol(),i[e.ObRecord.FeelsLikeWithSymbolAndUnits]=R.displayValueWithSymbolAndUnits()}if(Object.prototype.hasOwnProperty.call(i,e.ObRecord.FeelsLikeObserved)&&i[e.ObRecord.FeelsLikeObserved]!=i[e.ObRecord.AirTempObserved]?(i[e.ObRecord.HeatIndexOrDewPointDisplay]=i[e.ObRecord.FeelsLikeWithSymbolAndUnits],i[e.ObRecord.HeatIndexOrDewPointLabel]=e.user.localize("GeneralTitleFeelsLike")):(i[e.ObRecord.HeatIndexOrDewPointDisplay]=i[e.ObRecord.DewPointWithSymbolAndUnits],i[e.ObRecord.HeatIndexOrDewPointLabel]=e.user.localize("GeneralTitleDewPoint")),null!=i[e.ObRecord.AirTemp]&&null!=i[e.ObRecord.WetBulbTemp]){var A=i[e.ObRecord.AirTempObserved],L=i[e.ObRecord.WetBulbTempObserved];e.user.userTemperatureUnits()==e.TemperatureUnit.FAHRENHEIT&&(A=e.TemperatureValue.convertToF(i[e.ObRecord.AirTempObserved]),L=e.TemperatureValue.convertToF(i[e.ObRecord.WetBulbTempObserved]));var I=A-L,O=new e.TemperatureValue(I,e.user.userTemperatureUnits(),!1,{convert:!1,checkValid:!1});i[e.ObRecord.DeltaTObserved]=O.observed(),i[e.ObRecord.DeltaT]=O.displayValue(),i[e.ObRecord.DeltaTWithSymbol]=O.displayValueWithSymbol(),i[e.ObRecord.DeltaTWithSymbolAndUnits]=O.displayValueWithSymbolAndUnits()}else i[e.ObRecord.DeltaTObserved]="---",i[e.ObRecord.DeltaT]="---",i[e.ObRecord.DeltaTWithSymbol]="---",i[e.ObRecord.DeltaTWithSymbolAndUnits]="---"}if(("obs_sky"==i.type||"obs_st"==i.type)&&null!=i[e.ObRecord.Precip]&&null!=i[e.ObRecord.Precip]){var W=null!=i[e.ObRecord.ReportingInterval]&&null!=i[e.ObRecord.ReportingInterval]?i[e.ObRecord.ReportingInterval]:1,G=new e.PrecipRateValue(i[e.ObRecord.Precip],W,e.user.userPrecipUnits());i[e.ObRecord.PrecipRatePerHour]=G.ratePerHour(),i[e.ObRecord.PrecipRateTextDisplay]=G.textDisplay(),i[e.ObRecord.PrecipRateTextDisplayLocalized]=G.textDisplayLocalized(),i[e.ObRecord.PrecipRateTextAndValueDisplay]=G.textDisplayLocalizedWithRate()}}return null!=r&&(this.lastOb[r]=i),i},e.Observations.prototype._createRapidWindMessage=function(t){var a={},i=t.ob,r=Object.prototype.hasOwnProperty.call(t,"device_id")?t[e.ObRecord.DeviceId]:null;if(a[e.ObRecord.DeviceId]=r,a.type=t.type,a[e.RapidWindObRecord.RapidWindTimestamp]=Math.round((new Date).getTime()/1e3),a[e.RapidWindObRecord.RawObservation]=i,null!=t.ob){if(t.ob.length>2){var n=new e.WindValue(i[1],i[2],e.user.userWindUnits(),e.user.userDirectionUnits());if(a[e.RapidWindObRecord.RapidWindSpeedObserved]=n.windSpeedObserved(),a[e.RapidWindObRecord.RapidWindSpeed]=n.windSpeedDisplayValue(),a[e.RapidWindObRecord.RapidWindSpeedWithUnits]=n.windSpeedDisplayValueWithUnits(),a[e.RapidWindObRecord.RapidWindDirectionObserved]=n.windDirectionObserved(),a[e.RapidWindObRecord.RapidWindDirection]=n.windDirectionDisplayValue(),a[e.RapidWindObRecord.RapidWindDirectionCardinal]=n.windDirectionDisplayValueInText(),null!=this.lastOb[r]){var s=this.lastOb[r];a[e.RapidWindObRecord.RapidWindAvgObserved]=null!=s[e.ObRecord.WindAvgObserved]?s[e.ObRecord.WindAvgObserved]:null,a[e.RapidWindObRecord.RapidWindAvgWithUnits]=null!=s[e.ObRecord.WindAvgWithUnits]?s[e.ObRecord.WindAvgWithUnits]:null,a[e.RapidWindObRecord.RapidWindAvg]=null!=s[e.ObRecord.WindAvg]?s[e.ObRecord.WindAvg]:null}a[e.ObRecord.Backfill]=!1,null!=r&&(this.lastRapidWindOb[r]=a)}}else{var o=new e.WindValue(t.wind_speed,t.wind_dir,e.user.userDirectionUnits(),e.user.userDirectionUnits());a[e.RapidWindObRecord.RapidWindSpeed]=o.windSpeedObserved(),a[e.RapidWindObRecord.RapidWindDirection]=o.windDirectionObserved()}return a},e.Observations.prototype._checkForInactivity=function(e){const t=this,a=Date.now(),i=null!=e?moment(1e3*e):null;null!=i&&a-i>12e5?t.socket.close():(clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t._checkForInactivity,12e5))},e.Observations.prototype._isLessThanAnHour=function(e){const t=moment(1e3*e),a=moment().subtract(1,"hour");let i=!1;return null===t&&void 0===t||t.isAfter(a)&&(i=!0),i},e.Observations.prototype._doBackfillCheck=function(e,t){var a=!1;return null==this.lastObTimestamp[e]?this.lastObTimestamp[e]=t:this.lastObTimestamp[e]>t?a=!0:this.lastObTimestamp[e]=t,a},e.Observations.prototype._getDewPoint=function(e,t){return 243.04*(Math.log(e/100)+17.625*t/(243.04+t))/(17.625-Math.log(e/100)-17.625*t/(243.04+t))},e.Observations.prototype._getHeatIndex=function(t,a){var i=Util.convertValue(t,e.TemperatureUnit.CELSIUS,e.TemperatureUnit.FAHRENHEIT,!1);if(a<40||i<80)return t;var r=.5*(i+(61+1.2*(i-68)+.094*a)),n=0;if(r>79){if(n=2.04901523*i-42.379+10.14333127*a-.22475541*i*a-6.83783*Math.pow(10,-3)*Math.pow(i,2)-5.481717*Math.pow(10,-2)*Math.pow(a,2)+1.22874*Math.pow(10,-3)*Math.pow(i,2)*a+8.5282*Math.pow(10,-4)*i*Math.pow(a,2)-1.99*Math.pow(10,-6)*Math.pow(i,2)*Math.pow(a,2),a<=13&&i>=80&&i<112)n-=(13-a)/4*Math.sqrt((17-Math.abs(i-95))/17);else if(a>85&&i>=80&&i<=87){n+=(a-85)/10*((87-i)/5)}}else n=r;return 10*Util.convertValue(n,e.TemperatureUnit.FAHRENHEIT,e.TemperatureUnit.CELSIUS,!1)/10},e.Observations.prototype._getWindChill=function(t,a){var i=t.convertTo(e.TemperatureUnit.FAHRENHEIT,!1),r=a.convertTo(e.WindUnit.MPH,!1);if(r<5||i>50)return t.observed();var n=35.74+.6215*i-35.75*Math.pow(r,.16)+.4275*i*Math.pow(r,.16);return e.TemperatureValue.convertFToC(n)},e.Observations.prototype.changeLocation=function(t,a,i,r,n,s){this._log("Observations.changeLocation"),!0===s&&null!=s&&(this.settings.listenerType="forecast"),this.settings.isArbitrary=s,this.settings.deviceIds=t,this.settings.locationId=a,this.settings.elevationForDevices=i,this.settings.lat=r,this.settings.lon=n,this.lastObTimestamp={},this.settings.listenerType==e.Observations.LISTENER_FORECAST&&(this._clearForecastRefresher(),this._getForecast()),this._restartSocket()},e.Observations.prototype.changeListener=function(t){this.settings.listenerType=t,this._clearForecastRefresher(),this.settings.listenerType==e.Observations.LISTENER_FORECAST&&this._getForecast(),this._restartSocket()},e.Observations.prototype._clearForecastRefresher=function(){null!=this.forecastRefresher&&clearTimeout(this.forecastRefresher)},e.Observations.prototype._restartSocket=function(){null!=this.socket?(this._stopListening(),this._startListening()):this._createSocket(!1)},e.Observations.prototype.retrySocketConnection=function(){this._log("Observations.retrySocketConnection"),this._createSocket()},e.Observations.prototype._log=function(e){"undefined"!=typeof bugsnagClient&&bugsnagClient.leaveBreadcrumb(e)},e.Observations.prototype._getBrowserInfo=function(){var e,t=navigator.userAgent,a=t.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i)||[];return/trident/i.test(a[1])?{name:"IE",version:(e=/\brv[ :]+(\d+)/g.exec(t)||[])[1]||""}:"Chrome"===a[1]&&null!=(e=t.match(/\bOPR|Edge\/(\d+)/))?{name:"Opera",version:e[1]}:(a=a[2]?[a[1],a[2]]:[navigator.appName,navigator.appVersion,"-?"],null!=(e=t.match(/version\/(\d+)/i))&&a.splice(1,1,e[1]),{name:a[0],version:a[1]})},e.Observations.prototype._getBrowserInfoString=function(e){var t="";return null!=e.name&&null!=e.name&&(t+=e.name,null!=e.version&&null!=e.version&&(t+=","+e.version)),t},e.Observations.LISTENER_FORECAST="forecast",e.Observations.LISTENER_DEVICES="devices"}(window.SWD=window.SWD||{},jQuery),$(document).ready((function(){moment.relativeTimeThreshold("s",60),moment.relativeTimeThreshold("m",60),moment.relativeTimeThreshold("h",24),moment.relativeTimeThreshold("M",12),moment.updateLocale("en",{relativeTime:{future:"Just now",past:"%s ago",s:"%d secs",m:"%d min",mm:"%d min",h:"%d hour",hh:"%d hours",d:"%d day",dd:"%d days",M:"%d month",MM:"%d months",y:"%d year",yy:"%d years"}})})),function(e,t){e.Locations=function(e){this.data=null,this.currentLocation=null,this.totalElevationForDevices=null,this.userOwnsStations=!1,this.tileGraphParameters={air_temperature_humidity:["temp-graph","humidity-graph"],barometric_pressure:["pressure-graph"],diagnostics:["battery-graph"],light:["uv-graph","brightness-graph","solar-radiation-graph"],lightning:["lightning-graph","strike-count-graph"],rain:["rain-graph","rain-rate-graph"],wind:["wind-graph"]},this.settings=t.extend({},{locationToSelect:null,locationsLoaded:null,locationId:null,userMustOwn:!0,userSignedIn:!1},e);var a=this;this._init((function(e){!e&&a.settings.userSignedIn&&(a.settings.locationId=a.getLocationIdToLoad()),null!=a.settings.locationId&&(a.setLocationId(a.settings.locationId),a.currentLocation=a._getLocation(a.settings.locationId),a._buildDeviceElevationInfo()),"function"==typeof a.settings.locationsLoaded&&a.settings.locationsLoaded()}))},e.Locations.prototype._init=function(e){var t=this.settings.userSignedIn||null==this.settings.locationId?null:this.settings.locationId,a=this;this._getLocations(t,(function(t){var i=!1;0==t.status.status_code&&(a.data=t,null!=a.settings.locationId&&a.hasLocation(a.settings.locationId)?(i=!0,a.settings.userSignedIn&&(a.userOwnsStations=!0),"function"==typeof e&&e(i)):a.settings.userSignedIn&&null!=a.settings.locationId?a._getLocations(a.settings.locationId,(function(t){0==t.status.status_code&&(a.data=t,a.hasLocation(a.settings.locationId)&&(i=!0)),"function"==typeof e&&e(i)})):"function"==typeof e&&e(i))}))},e.Locations.prototype._getLocations=function(t,a){var i=void 0!==t&&null!=t?"/"+t:"";e.makeRequest("locations"+i,{include_arbitrary_locations:"true"},(function(e){"function"==typeof a&&a(e)}))},e.Locations.prototype.getLocationsList=async function(){const t=await e.makeAsyncRequest("locations",{include_arbitrary_locations:"true"});if(0===t.status.status_code)return t},e.Locations.prototype.userOwnsStation=function(){return this.userOwnsStations},e.Locations.prototype.getLocationIdToLoad=function(){var t=null!=this.settings.locationId?this.settings.locationId:e.user.userCurrentLocation();return null!=t&&null==t||(t=this._defaultLocationId()),t},e.Locations.prototype.getNetworkData=function(a,i){let r=null!=a?a:this.settings.locationId;e.makeRequest(`networks/station/${r}`,(function(e){"function"==typeof i&&(void 0!==e.station_network_data.network_data&&e.station_network_data.network_data.length>0?i(e.station_network_data.network_data):t("#custom-network").css("display","none"))}))},e.Locations.prototype.getCurrentLocationId=function(){var e=null;return null!=this.currentLocation&&null!=this.currentLocation.location_id&&(e=this.currentLocation.location_id),null!=this.currentLocation&&null!=this.currentLocation.arbitrary_location_id&&(e=this.currentLocation.arbitrary_location_id),e},e.Locations.prototype.isCurrentLocationArbitrary=function(){var e=!1;return null!=this.currentLocation&&null!=this.currentLocation.arbitrary_location_id&&(e=!0),e},e.Locations.prototype.getCurrentLocation=function(){return this._getLocation(this.getCurrentLocationId())},e.Locations.prototype.getLocationById=function(e){return this._getLocation(e)},e.Locations.prototype.getNameForCurrentLocation=function(){var e=null;return null!=this.currentLocation&&Object.prototype.hasOwnProperty.call(this.currentLocation,"name")&&(e=this.currentLocation.name),e},e.Locations.prototype.getPublicNameForCurrentLocation=function(){var e=null;return null!=this.currentLocation&&Object.prototype.hasOwnProperty.call(this.currentLocation,"public_name")&&(e=this.currentLocation.public_name),e},e.Locations.prototype.getTimezoneForCurrentLocation=function(){return null!=this.currentLocation&&Object.prototype.hasOwnProperty.call(this.currentLocation,"timezone")?this.currentLocation.timezone:Intl.DateTimeFormat().resolvedOptions().timeZone},e.Locations.prototype.isCurrentLocationPublic=function(){var e=!1;return null!=this.currentLocation&&null!=this.currentLocation.location_meta.share_with_wf&&(e=this.currentLocation.location_meta.share_with_wf),e},e.Locations.prototype.getDevicesForCurrentLocation=function(){var e=null;if(null!=this.currentLocation&&Object.prototype.hasOwnProperty.call(this.currentLocation,"devices")&&(e=this.currentLocation.devices),e)for(var t=0;t-1||"forecast"==i.item)&&e.push(i)})),Util.sortByKey(e,"sort"),e},e.Locations.prototype.getHUDTilesForCurrentLocation=function(){var e=[],a=this.getDeviceIdsForCurrentLocation(),i=null;return Util.sortByKey(this.currentLocation.location_items,"sort"),null!=this.currentLocation&&null!=a&&Object.prototype.hasOwnProperty.call(this.currentLocation,"location_items")&&(t.each(this.currentLocation.location_items,(function(t,r){"forecast"==r.item?i=r:Object.prototype.hasOwnProperty.call(r,"device_id")&&a.indexOf(r.device_id)>-1&&e.length<6&&e.push(r)})),null!=i&&e.push(i)),e},e.Locations.prototype.getGraphParametersForCurrentLocation=function(){for(var e={},t=this.getTilesForCurrentLocation(),a=0;a0&&(e=this.data.locations[0].location_id,this.userOwnsStations=!0),e},e.Locations.prototype._getLocation=function(e){var t=null;if(null!=this.data&&Object.prototype.hasOwnProperty.call(this.data,"locations")&&this.data.locations instanceof Array)for(var a=0;a0&&(e=!0),e}}(window.SWD=window.SWD||{},jQuery);let userSignedIn=!1,locations=null,obs=null,tiles=null,list=null,graph=null,historyView=null,forecastView=null,locationSelection=null,stationData=null,interval=null,reconnectInterval=null,locationMapDrawn=!1,dropdown=null,alerts=null,alertInfo=null,alertClicked=!1,fullscreen=null,lastNetworkClass=null,radarTiles=null,animator=null,map=null,timestamps=null;function load(){var e=SWD.mgr.getState();setLocationsHeader(),updateBuyStationLink(e),setLocationStatus(e.isArbitrary),initStationInfo(),initGraph(),!1===e.isArbitrary&&(initWeatherList(),initWeatherTiles()),initHistory(),initForecast(),fuzzyTimestampUpdater(),showView(e),$("body").hasClass("view-grid")&&locations.getNetworkData(locations.getCurrentLocationId(),(function(e){displayNetwork(e)})),locations.userOwnsStation()?(SWD.analytics.trackLocationEvent(locations.getCurrentLocationId()),updateShareURL()):SWD.analytics.trackSharedLocationEvent(locations.getCurrentLocationId())}function loadSharePageLimit(e,t){$("#view-btn").hide(),$("body").addClass("share-page-limit"),$("#share-page-limit").css("display","flex");const a=["SailFlow","iKitesurf","iWindSurf","WindAlert","FishWeather"];$(".lifestyle-btn").click((function(){const i=this;$.each(a,(function(a,r){$(i).text().includes(r)&&SWD.analytics.trackLifeStyleClickEvent(r,e,t)})),$(this).attr("href",$(this).attr("href")+t)})),setLocationsHeader()}function stateChanged(e){var t=null==locations.getCurrentLocationId()?window.location.reload():locations.getCurrentLocationId();"station"!=e.tab||""!=e.view&&"grid"!=e.view||($("body").toggleClass("view-grid"),$("#current-location").html(e.stationName),e.locationId!=t&&changeLocation(e.locationId,e.isArbitrary)),"history"==e.tab&&initHistory(!0),$("body").hasClass("temp-view")&&window.location.reload(),showView(e)}function startObsListener(){var e=SWD.mgr.getState(),t="grid"!=e.view||e.isArbitrary?SWD.Observations.LISTENER_FORECAST:SWD.Observations.LISTENER_DEVICES,a=!1;if(null==obs){var i=locations.getCoordinatesForCurrentLocation();obs=new SWD.Observations({locationId:locations.getCurrentLocationId(),isArbitrary:e.isArbitrary,lat:i.lat,lon:i.lon,listenerType:t,deviceIds:locations.getDeviceIdsForCurrentLocation(),elevationForDevices:locations.getTotalElevationForDevices(),observationReceived:function(e){var t=SWD.mgr.getState();t.view==SWD.StateManager.TAB_FORECAST||""==t.view?forecastView&&forecastView.update(e):(e.backfill||(tiles&&tiles.update(e),list&&list.update(e)),$("body").hasClass("graph-display")&&graph&&Object.prototype.hasOwnProperty.call(e,SWD.ObRecord.RawObservation)&&Object.prototype.hasOwnProperty.call(e,"device_id")&&"rapid_wind"!=e.type&&graph.deviceId()==e.device_id&&graph.addPoint(e[SWD.ObRecord.RawObservation]))},lightningEventReceived:function(t){if(e.view==SWD.StateManager.TAB_FORECAST||""==e.view)forecastView&&forecastView.update(t);else if(null!=t.device_id&&null!=t.device_id&&null!=t.evt&&null!=t.evt&&t.evt.length>=1){var a=new SWD.LightningDistanceValue(t.evt[1],SWD.user.userDistanceUnits());$(".weather-tile.lightning[data-device-id='"+t.device_id+"']").addClass("active-lightning lightning-event").attr("data-lightning-timestamp",t.evt[0]),$(".weather-tile.lightning[data-device-id='"+t.device_id+"'] p[data-param='param-lightning_last_strike_fuzzy']").attr("data-timestamp",t.evt[0]),$(".weather-tile.lightning[data-device-id='"+t.device_id+"'] p[data-param='param-lightning_last_strike_distance_text_display']").html(a.textDisplay()),$("body").hasClass("graph-display")&&graph&&graph.deviceId()==t.device_id&&graph.addEvent(t.evt)}},socketOpened:function(){socketOpened()},socketConnectionError:function(e){var t=Math.floor(e/1e3);t>10&&showConnectionError(t)},socketConnectionAttemptsExceeded:function(){showUnableToConnect()},locationStatusEventReceived:function(e,t){e==locations.getCurrentLocationId()&&setLocationStatus(t)},forecastObservationReceived:function(e){forecastView&&forecastView.update(e)},setTempTimezone:function(e){setTempTimezone(e)},alertRecieved:function(t){displayAlerts(t),null!==alertInfo&&0==alertClicked&&0==a&&(alertInfo.updateAlert(e.alertId),a=!0)},networkRecieved:function(e){$("body").hasClass("view-grid")||displayNetwork(e)}})}else obs.changeListener(t)}function attachEventHandlers(){$("#view-btn").on("click touchend",(function(){return $("body").removeClass("view-list"),$("body").toggleClass("view-grid"),$("#locations-list").hasClass("show")&&closeLocationList(!1),toggleView(),!1})),$("#current-conditions-main").on("click",(function(){return $("body").removeClass("view-list"),$("body").toggleClass("view-grid"),$("#locations-list").hasClass("show")&&closeLocationList(!1),toggleView(),!1})),$("#location-alerts").on("click touchend",(function(e){return e.stopPropagation(),alertClicked=!0,toggleAlertView(),!1})),$("#graph-close").on("click touchend",(function(){return hideGraph(),toggleView(),!1})),$("#graph-parameter").on("click",(function(){return toggleGraphParams(),!1})),$("#graph-parameter-list").on("click touchend","a",(function(){var e=$(this).attr("data-device-id"),t=$(this).attr("data-graph");return null!=e&&null!=t&&(showGraph(e,t,!0),SWD.mgr.setGraphView(e,t,$("#graph-zoom").attr("data-zoom")),hideGraphParams()),!1})),$("#share-btn").on("click touchend",(function(){return showShareDialog(),!1})),$("#nearcast-learn-more").on("click touchend",(function(){return nearcastLearnMore(),!1})),$("body").on("click",".power-save-mode-icon",(function(){var e=$(this).attr("data-tile");return e==SWD.WeatherTiles.WIND?updatePowerSaveMessage(SWD.user.localize("GeneralPowerSaveMessageWind")):e==SWD.WeatherTiles.RAIN?updatePowerSaveMessage(SWD.user.localize("GeneralPowerSaveMessageRain")):e==SWD.WeatherTiles.DIAGNOSTIC&&updatePowerSaveMessage(SWD.user.localize("GeneralPowerSaveMessageBattery")),showPowerSaveDialog(),!1})),$("body").on("click touchend",".add-temp-location",(function(){showStation()})),$("body").on("click touchend","#arb-location-item.map-search",(function(){showStation(),closeLocationList()})),$("body").on("click touchend",".cancel-location",(function(){window.location.reload()})),$("body").on("click touchend",".save-name",(function(){1==$("#change-name").length?$("#change-name").remove():0==$("#change-name").length&&$(".location-btn-ctn .save-name").after("")})),$("body").on("click touchend","#power-save-learn-more",(function(e){e.stopPropagation()})),$("#power-save-dialog-close").on("click",(function(e){e.stopPropagation(),hidePowerSaveDialog()})),$("#history").on("click",(function(){$("body").hasClass("arb-view")&&alert(SWD.user.localize("HistoryErrorNonStation"))})),$("html").on("click",(function(e){hideShareDialog(),hidePowerSaveDialog(),hideGraphParams(),!$(e.target).closest("#locations-list").length&&$("#locations-list").hasClass("show")&&closeLocationList(!1)})),$(".expand-btn").on("click touchend",(function(){window.location.href="/settings/forecast"}));var e=Util._getDocumentHiddenProp();if(e){var t=e.replace(/[H|h]idden/,"")+"visibilitychange";document.addEventListener(t,(function(){!Util.isDocumentHidden()&&$("body").hasClass("graph-display")&&null!=graph&&graph.refreshGraph()}))}}function attachStationOwnerEventHandlers(){locations.userOwnsStation()&&($("#current-location").on("click touchend",(function(){return $("#locations-list").toggleClass("show"),!1})),$("#dismiss-station-wifi-not-setup").click((function(){$("#station-wifi-not-setup").hide(),$("#station-messages").hide(),SWD.Storage.saveSessionItem("hideStationWiFiSetupMsg",!0)})),$("#share-dialog").on("click touchend",(function(){return!1})),$("#share-dialog-close").on("click touchend",(function(){hideShareDialog()})))}function getLocationList(){var e=$("#search-bar").val(),t={name:e,country_code:getCountryCode()};e.length>=3&&SWD.makeRequest("location_suggestions",t,(function(e){0==e.status.status_code&&e.suggestions.length>0&&showLocationList(e.suggestions)}))}function getCountryCode(){var e=navigator.language.toUpperCase(),t=e.indexOf("-");return e.slice(t+1)}function showSearchLocation(e,t){SWD.makeRequest("location_suggestion_data",e,(function(e){0==e.status.status_code&&(stationData={name:e.name,latitude:e.lat,longitude:e.lon},$("body").removeClass("view-grid"),$("body").addClass("view-forecast"),$("body").addClass("temp-view"),$("#current-location").html(t),changeTempLocation(e.lat,e.lon),closeLocationList())}))}function showLocationList(e){$("#station-location-list").hide(),$("#arb-location-list").empty(),$.each(e,(function(e,t){$("#arb-location-list").append("
  • "+t.name+"

  • ")})),$("#arb-location-list").append("");var t,a,i=$("#arb-location-item");$("input[type='text']").keydown("#search-bar",(function(e){40===e.which?t?(t.removeClass("highlight"),a=t.next(),t=a.length>0?a.addClass("highlight"):i.eq(0).addClass("highlight")):t=i.eq(0).addClass("highlight"):38===e.which&&(t?(t.removeClass("highlight"),a=t.prev(),t=a.length>0?a.addClass("highlight"):i.last().addClass("highlight")):t=i.last().addClass("highlight"))}))}function showStation(){locationSelection=new SWD.LocationSelection({cancelLabel:SWD.user.localize("GeneralButtonCancel"),instructionsLabel:SWD.user.localize("GeneralMessageLocationMapInstructions"),locationUpdated:function(e,t,a,i){null!=stationData&&(stationData.latitude=e,stationData.longitude=t,null!=a&&(stationData.name=a)),updateArbitraryLocations(e,t,a,(function(e){if(0==e.status.status_code){var t=window.location.origin;window.location=t+`/loc/${e.id}`,SWD.analytics.trackDetailEditedEvent(e.id)}else null==a?alert(SWD.user.localize("LocationMapMessageNameError")):alert(SWD.user.localize("LocationMapMessageUpdateError"))}))},saveLabel:SWD.user.localize("LocationAddButtonSave"),location:null!=stationData?stationData.name:null,isDrawn:!0},$("#main-content")),$(".location-btn-ctn").prepend("

    "+SWD.user.localize("LocationMapButtonSave")+"

    "),null!=locationSelection&&null!=stationData?locationSelection.open(stationData.latitude,stationData.longitude):locationSelection.open(39.8283,-98.5795)}function updateArbitraryLocations(e,t,a,i){var r={};r=null!=stationData?{name:stationData.name,latitude:stationData.latitude,longitude:stationData.longitude}:{name:a,latitude:e,longitude:t};var n=JSON.stringify(r);SWD.makeCreateRequest("arbitrary_locations",n,(function(e){i&&"function"==typeof i&&i(e)}))}function getLocationIdToSelect(){var e=null;if(null!=SWD.mgr.LocationId())e=SWD.mgr.LocationId();else if(userSignedIn&&null!=SWD.user.userCurrentLocation())e=SWD.user.userCurrentLocation();else if(null!=SWD.Storage.getSessionItem("sharedStationId"))return SWD.Storage.getSessionItem("sharedStationId");return e}function initWeatherTiles(){tiles=new SWD.WeatherTiles({devices:locations.getDevicesForCurrentLocation(),tiles:locations.getTilesForCurrentLocation(),locationCoords:locations.getCoordinatesForCurrentLocation(),locationId:locations.getCurrentLocationId(),isStationOwner:locations.userOwnsStation(),tileClicked:function(e,t){t&&(showGraph(e,t,!1),SWD.mgr.setGraphView(e,t,$("#graph-zoom").attr("data-zoom")))}})}function initWeatherList(){list=new SWD.WeatherList({devices:locations.getDevicesForCurrentLocation(),itemClicked:function(e,t){showGraph(e,t,!1),SWD.mgr.setGraphView(e,t,$("#graph-zoom").attr("data-zoom"))},locationId:locations.getCurrentLocationId()},$("#list-summary-view"),$("#list-device-view"))}function initGraph(){var e="",t=locations.getGraphParametersForCurrentLocation();$("#graph-parameter-list").empty(),$.each(t,(function(t,a){e+="
  • "+a.name+"
  • ";for(var i=0;i"+getGraphParamLabel(a.parameters[i])+""})),$("#graph-parameter-list").append(e)}function initHistory(e){var t=SWD.mgr.getState();null!=historyView&&historyView.destroy($("#history-view")),t.isArbitrary||(historyView=new SWD.HistoryView({devices:locations.getDevicesForCurrentLocation(),elevationForDevices:locations.getTotalElevationForDevices(),period:t.history.period,day:t.history.day,month:t.history.month,year:t.history.year,dayChanged:function(t){if(null==e||0==e){var a=SWD.mgr.getState();a.history.period=t.period,a.history.year=t.year,a.history.month=t.month,a.history.day=t.day,SWD.mgr.setState(a)}}},$("#history-view-target")))}function initForecast(){const e=locations.getCoordinatesForCurrentLocation(),t=locations.getNameForCurrentLocation(),a=locations.getCurrentLocationId();null!=forecastView&&forecastView.changeLocation(),forecastView=new SWD.Forecast({lat:e.lat,lon:e.lon,stationId:a,units_temp:SWD.user.userTemperatureUnits(),units_wind:SWD.user.userWindUnits(),units_wind_dir:SWD.user.userDirectionUnits(),units_pressure:SWD.user.userPressureUnits(),units_precip:SWD.user.userPrecipUnits(),units_distance:SWD.user.userDistanceUnits(),units_other:SWD.user.userOtherUnits(),show_radar:function(e){e&&!$("body").hasClass("temp-view")&&$("body").hasClass("signed-in")&&initRadarMap(t,a,e)}},$("#forecast-ctn"))}function initDropDown(){var e=locations.getCurrentLocationId();dropdown=new SWD.DropDown({locationId:e,changeLocationData:function(e,t){changeLocation(e,t)},changeView:function(e){showView(e)},showSearchLocation:function(e,t){showSearchLocation(e,t)},getLocationList:function(){getLocationList()},deleteLocation:function(e){deleteLocation(e)},closeList:function(e){closeLocationList(e)}})}function showView(e){switch(e.view){case"graph":startObsListener(),$("#graph-zoom").attr("data-zoom",e.graph.zoom),showGraph(e.graph.deviceId,e.graph.param+"-graph",!1),selectTab("weather");break;case"list":startObsListener(),$("body").addClass("view-list"),selectTab("weather");break;case"grid":e.isArbitrary?showArbGrid():(startObsListener(),showGrid()),selectTab("weather");break;case"alerts":case"alert":startObsListener(),showAlerts(e),selectTab("weather");break;default:"history"==e.tab?($("body").addClass("view-history"),selectTab("history")):e.isClicked&&e.isArbitrary?(setForecast(e),selectTab("weather")):(startObsListener(),setForecast(e),selectTab("weather"))}}function setForecast(e){$("body").removeClass("view-alerts"),$("body").removeClass("view-alert-info"),$("body").removeClass("view-grid"),$("body").removeClass("arb-grid"),$("body").addClass("view-forecast"),$("#station-info").show(),$("#station-btns").show(),e.isArbitrary?showArbLocation():hideArbLocation()}function selectTab(e){$("#nav").attr("data-selected-tab",e)}function getGraphParamLabel(e){var t="";switch(e){case"battery-graph":t=SWD.user.localize("GeneralTextBatteryVoltage");break;case"brightness-graph":t=SWD.user.localize("GeneralTitleBrightness");break;case"humidity-graph":t=SWD.user.localize("GeneralTitleHumidity");break;case"lightning-graph":t=SWD.user.localize("GeneralTitleLightning");break;case"strike-count-graph":t=SWD.user.localize("GeneralTitleLightningStrikeCount");break;case"pressure-graph":t=SWD.user.localize("GeneralTitlePressure");break;case"rain-graph":t=SWD.user.localize("GeneralTitleRain");break;case"rain-rate-graph":t=SWD.user.localize("GeneralTitleRainRate");break;case"solar-radiation-graph":t=SWD.user.localize("GeneralTitleSolarRadiation");break;case"temp-graph":t=SWD.user.localize("GraphValueTemp");break;case"uv-graph":t=SWD.user.localize("GeneralTitleUVIndex");break;case"wind-graph":t=SWD.user.localize("GeneralTitleWind")}return t}function showGraph(e,t,a){var i=locations.getDeviceByIdForCurrentLocation(e);if(null!=i){var r=null;if($("body").addClass("graph-display grid-view"),$("#graph-parameter-list a").removeClass("selected"),$("#graph-parameter-list a[data-graph='"+t+"'][data-device-id='"+e+"']").addClass("selected"),locations.userOwnsStation())if(t==SWD.Graph.WIND||t==SWD.Graph.RAIN||t==SWD.Graph.RAIN_RATE||t==SWD.Graph.BATTERY)if(1==this.diagnosticsLoaded)switch(this.diagnostics.getDevicePowerSaveMode(e)){case 2:case 5:t==SWD.Graph.WIND?r=SWD.WeatherTiles.WIND:t==SWD.Graph.BATTERY&&(r=SWD.WeatherTiles.DIAGNOSTIC);break;case 3:t==SWD.Graph.RAIN?r=SWD.WeatherTiles.RAIN:t==SWD.Graph.WIND?r=SWD.WeatherTiles.WIND:t==SWD.Graph.BATTERY&&(r=SWD.WeatherTiles.DIAGNOSTIC);break;default:r=null}null==graph?graph=new SWD.Graph({device:i,deviceId:e,graphType:t,powerSaveMode:r,stationTimezone:locations.getTimezoneForCurrentLocation(),zoomChanged:function(e,t,a){hideGraphParams(),SWD.mgr.setGraphView(e,a,t)}},$("#graph")):graph.update(i,e,t,a,r)}}function showArbLocation(){$("body").addClass("arb-view"),$("#history").removeAttr("href")}function hideArbLocation(){$("body").removeClass("arb-view"),$("#history").attr("href","/history")}function showArbGrid(){$("body").addClass("arb-grid"),$("body").addClass("arb-view"),$("#history").removeAttr("href"),$("body").removeClass("view-forecast"),$("body").removeClass("view-grid")}function showGrid(){$("body").removeClass("arb-grid"),$("body").removeClass("arb-view"),$("body").removeClass("graph-display"),$("#history").attr("href","/history"),$("body").removeClass("view-forecast"),$("body").addClass("view-grid"),showPowerSaveModeIcons()}function showAlerts(e){var t=locations.getCoordinatesForCurrentLocation(),a=locations.getTimezoneForCurrentLocation(),i=$("#location-alerts").attr("data-id"),r=locations.getNameForCurrentLocation();SWD.makeRequest("alerts",{lat:t.lat,lon:t.lon},(function(n){var s=n.alerts.length;0!=s?s>1&&0==e.alertInfo?($("body").addClass("view-alerts"),$("body").removeClass("view-alert-info"),$("body").removeClass("view-forecast"),alerts=new SWD.Alerts({lat:t.lat,lon:t.lon,name:r,timeZone:a,stateChanged:function(e){stateChanged(e)}})):($("body").addClass("view-alert-info"),$("body").removeClass("view-alerts"),$("body").removeClass("view-forecast"),alertInfo=new SWD.Alert({lat:t.lat,lon:t.lon,alert_id:i,timeZone:a,oneAlert:!0,stateChanged:function(e){stateChanged(e)}})):window.location.href="/"}))}function hideGraph(){$("body").removeClass("graph-display")}function hideGraphParams(){$("#graph-parameter-ctn").removeClass("show")}function toggleGraphParams(){$("#graph-parameter-ctn").toggleClass("show")}function socketOpened(){clearConnectionError()}function showConnectionError(e){var t=0;$(".connection-msg").hide(),$("#wait-to-connect-msg").show(),$("#connection-error-retry-time").html(e+"s"),$("#connection-error").show(),reconnectInterval=setInterval((function(){var a=e-(t+=1);$("#connection-error-retry-time").html(a+"s"),t>=e&&(clearInterval(reconnectInterval),$(".connection-msg").hide(),$("#retrying-msg").show())}),1e3)}function showUnableToConnect(){clearInterval(reconnectInterval),$(".connection-msg").hide(),$("#unable-to-connect").show(),$("#connection-error").show()}function clearConnectionError(){clearInterval(reconnectInterval),$("#connection-error").hide()}function toggleView(){var e="";$("body").hasClass("arb-grid")?(e="",$("body").removeClass("arb-grid")):e=$("body").hasClass("view-grid")?"grid":"",SWD.mgr.setView(e),showView(SWD.mgr.getState()),"grid"==e&&$("body").removeClass("view-forecast")}function toggleAlertView(){SWD.mgr.setView("alerts"),showView(SWD.mgr.getState())}function setLocationsHeader(){var e="",t=locations.userOwnsStation()?"":" - Tempest by WeatherFlow";if($("#current-location").html(SWD.sanitizeForHTML(locations.getNameForCurrentLocation())+t),!$("#shared-location").length>0){var a=locations.getLocationList(),i=locations.getArbitraryLocationList();if(a.length>0){e+="

    "+SWD.user.localize("GeneralTitleStations")+"

    ";for(var r=0;r\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t

    ${n.name}

    \n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t`}}if(i.length>0){e+="

    "+SWD.user.localize("GeneralTitleLocations")+"

    ";for(var s=0;s\n\t\t\t\t\t\t\x3c!-- Delete button is always accessible to screen readers --\x3e\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t

    ${o.name}

    \n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t

    \n\n\t\t\t\t\t\t\t\x3c!-- Ellipsis button for sighted users, hidden to screen readers --\x3e\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t`}}$("#station-location-list").append(e),initDropDown()}}function deleteLocation(e){1==confirm(SWD.user.localize("LocationListMessageDeleteConfirm"))?SWD.makeDeleteRequestWithoutParams("arbitrary_locations/"+e+"/",(function(t){alert(SWD.user.localize("LocationListMessageDeleteSuccess"));var a=window.location.origin,i=locations.getCurrentLocationId(),r=locations.getLocationIdToLoad();i==e?window.location=a+`/station/${r}`:window.location.reload()})):$(".delete-arb-location[data-id='"+e+"']").removeClass("sr-only")}function changeLocation(e,t){if(locations.getCurrentLocationId()!=e){if($(".station-message").hide(),$("#station-messages").hide(),locations.setLocationId(e),t||(initWeatherList(),initGraph(),initWeatherTiles(),$("body").hasClass("view-history")&&initHistory()),initStationInfo(),initForecast(),null!=obs){var a=locations.getCoordinatesForCurrentLocation();obs.changeLocation(locations.getDeviceIdsForCurrentLocation(),e,locations.getTotalElevationForDevices(),a.lat,a.lon,t)}updateStationInfo(t),SWD.analytics.trackLocationEvent(e)}}function closeLocationList(e){e?$("#locations-list").removeClass("show"):0!=e||$("body").hasClass("temp-view")?$("body").hasClass("temp-view")?$("#locations-list").removeClass("show"):($("#arb-location-list").empty(),$("#station-location-list").show()):($("#search-bar").val(""),$("#locations-list").removeClass("show"),$(".search-close").hide(),$("#arb-location-list").empty(),$("#station-location-list").show())}function changeTempLocation(e,t){$(".station-message").hide(),$("#station-messages").hide(),initWeatherTiles(),initForecast(),null!=obs&&obs.changeLocation(null,null,null,e,t,!0),updateStationInfo()}function setTempTimezone(e){$("body").hasClass("temp-view")&&$("#station-timezone").html(e)}function fuzzyTimestampUpdater(){interval=setInterval((function(){for(var e=$("p[data-param='param-"+SWD.ObRecord.Timestamp+"'], span[data-param='param-"+SWD.ObRecord.Timestamp+"'], p[data-param='param-"+SWD.ObRecord.LightningLastStrikeFuzzy+"'], p[data-param='param-"+SWD.RapidWindObRecord.RapidWindTimestamp+"']"),t=0;t60&&tiles.hideRapidWind($(a).attr("data-device-id"))}}for(var l=$(".weather-tile.lightning"),c=0;c1&&forecastView.hideRapidWind();else forecastView.hideRapidWind()}}),1e3)}function displayAlerts(e){if($("#location-alerts").show(),$("#location-alerts").attr("data-length",e.length),e.length<=1&&($("#location-alerts").attr("data-id",e[0].id),SWD.mgr.setAlertId(e[0].id)),e.length>1){let t={},a=!1;for(let i=0;i .cc-alert-text").text(e[0].event+" | + "+(e.length-1))}else $("#cc-warning > .cc-alert-text").text(e[0].event)}function displayNetwork(e){const t=e[0],a=locations.getPublicNameForCurrentLocation(),i=(null!=t.network_deep_link&&t.network_deep_link,"WeatherBug"!==t.network_display_name&&"Clemson"!==t.network_display_name?"Tempest":t.network_display_name);if($("#custom-network").show(),lastNetworkClass&&$("#custom-network .network-icon").removeClass(lastNetworkClass),"Tempest"!==i){let e;e=$("html").hasClass("light")?`${i}-light`:`${i}-dark`,$("#custom-network .network-icon").addClass(e),lastNetworkClass=e,$("#custom-network .network-description").html(`${SWD.user.localize("GeneralCustomNetworkMessage")} ${a}, ${"Clemson"===i?SWD.user.localize("GeneralCustomNetworkClemsonDescription"):SWD.user.localize("GeneralCustomNetworkTempestDescription")}`),"WeatherBug"===i?($(".wb-description").show(),$(".clemson-description").hide()):"Clemson"===i&&($(".clemson-description").show(),$(".wb-description").hide())}else $("#custom-network .network-icon").addClass("tempest"),lastNetworkClass="tempest",$("#custom-network .network-description").html(`${SWD.user.localize("GeneralCustomNetworkMessage")}s ${a}, ${SWD.user.localize("GeneralCustomNetworkTempestDescription")}`)}function isActiveLightning(e){var t=!1;null!=e&&null!=e&&""!=e&&(new SWD.TimestampValue(e).minutesAgo()<=5&&(t=!0));return t}function initStationInfo(){updateShareURL(),$("#station-btns").css("display","flex"),$("#station-timezone").html(locations.getTimezoneForCurrentLocation()),$("#station-info").show()}function updateStationInfo(e){locations.userOwnsStation()&&(setLocationStatus(e),updateShareURL())}function setLocationStatus(e){var t=this,a=null!=e?e:SWD.mgr.getState().isArbitrary;this.diagnosticsLoaded=!1,$("#location-status").removeClass("online"),a||(this.diagnostics=new SWD.Diagnostics({locationId:locations.getCurrentLocationId(),ready:function(){t.diagnosticsLoaded=!0;var e=t.diagnostics.getLocationStatus(),a=t.diagnostics.getBatteryStatus();null==a&&null==a||$(".weather-tile[data-tile-type='diagnostics']").each((function(e){e"),$("#station-info").css("margin-top","75px"),locationMapDrawn=!0}}function isInContinentalUS(e){return e.lat>=20&&e.lat<=55&&e.lng>=-130&&e.lng<=-60}function initRadarMap(e,t,a){$("#radar-map-ctn").show(),"none"===a?$(".rain-msg").hide():($(".rain-msg").show(),$(".rain-msg-ctn p").text(`${SWD.user.localize("RadarForecastPrecipType"+a.charAt(0).toUpperCase()+a.slice(1))} ${e}`));const i=SWD.DarkModeMapStyles,r=locations.getCoordinatesForCurrentLocation(),n={lat:r.lat,lng:r.lon};isInContinentalUS(n)?null===map?(map=new google.maps.Map(document.getElementById("radar-map"),{center:n,zoom:8,disableDefaultUI:!0,gestureHandling:"none",maxZoom:13,styles:$("html").hasClass("dark")?i:[{featureType:"poi",elementType:"labels",stylers:[{visibility:"off"}]}],tilt:0}),map.setOptions({draggableCursor:"pointer"}),$("body").hasClass("arb-view")||createRadarMarker(r),radarTiles=new SWD.RadarTiles({}),animator=new SWD.RadarAnimator(map,radarTiles),$("#radar-map").on("click",(function(){window.location.href=`/radar/${t}/${r.lat.toFixed(4)}/${r.lon.toFixed(4)}/8`})),addMapOverlays()):($("body").hasClass("arb-view")||createRadarMarker(r),map.setOptions({center:n}),$("#radar-map").on("click",(function(){window.location.href=`/radar/${t}/${r.lat.toFixed(4)}/${r.lon.toFixed(4)}/8`})),addMapOverlays()):$("#radar-map-ctn").hide()}function createRadarMarker(e){const t={lat:e.lat,lng:e.lon};let a;$("html").hasClass("light")?a="/images/location-marker-3x.png":$("html").hasClass("dark")&&(a="/images/location-marker-white-3x.png"),map.markers?(map.markers.forEach(e=>e.setMap(null)),map.markers=[]):map.markers=[];const i=new google.maps.Marker({position:t,map:map,icon:{url:a,scaledSize:new google.maps.Size(33,42),anchor:new google.maps.Point(14,35)}});map.markers.push(i)}function addMapOverlays(){fetch(`https://mrms.weatherflow.com/timerange?type=precip&api_key=${SWD.RADAR_API_KEY}`).then(e=>{if(e.ok)return e.json();throw e.status}).then(e=>{e.timestamps&&e.timestamps[e.timestamps.length-1];timestamps=e.timestamps,radarTiles.settings.defaultFrameCount=timestamps.length,addMapOverlay()}).catch(e=>{addMapOverlay()})}function addMapOverlay(){animator.addOverlay(radarTiles),createOverlay()}function removeMapOverlay(){animator.removeOverlay(radarTiles)}function createOverlay(){map.overlayMapTypes.getArray().includes(radarTiles)||map.overlayMapTypes.insertAt(0,radarTiles),null!==radarTiles&&null!==radarTiles.reload&&(radarTiles.reloadInterval||(radarTiles.reloadInterval=setInterval((function(){radarTiles.reload(),checkAndFetchNewTimestamps()}),3e5)))}function checkAndFetchNewTimestamps(){const e=timestamps[timestamps.length-1],t=new Date(e),a=new Date;t.getTime()+3e5-1?window.location.href="/":($("body").attr("id","shared-location"),SWD.makeRequest("station_share_check",{station_id:e},(function(t){if(t.can_show_share){SWD.Storage.saveSessionItem("sharedStationId",e);let t=locations.getCoordinatesForCurrentLocation();null!=e&&null!=t.lat&&null!=t.lon?(showLocationMap(e,locations.getCoordinatesForCurrentLocation()),SWD.makeRequest("observations/location",{location_id:e},(function(e){Object.prototype.hasOwnProperty.call(e,"status")&&Object.prototype.hasOwnProperty.call(e.status,"status_code")&&0==e.status.status_code&&(Object.prototype.hasOwnProperty.call(e,"location_units")?(SWD.user.setUnitSettings(e.location_units),load()):SWD.user.getUnitSettings((function(){load()})))}))):$("body").addClass("private")}else loadSharePageLimit(e,t.coastal_spot_id)})))}}),attachEventHandlers()}})})),function(e){e.SWUser=function(t){this.defaultSettings={defaultUnits:null,ready:null,userSignedIn:null,accessToken:null},this.settings=$.extend({},this.defaultSettings,t),this.isTime24HourFormat=this._isTime24HourFormat(),null!=this.settings.defaultUnits&&null!=this.settings.defaultUnits[e.SettingsKey.WIND]&&"km/h"==this.settings.defaultUnits[e.SettingsKey.WIND]&&(this.settings.defaultUnits[e.SettingsKey.WIND]=e.WindUnit.KPH),this.l10n=new e.Locale,this.userSettings=this.settings.defaultUnits||null,this.jwt=null,this.autoConnect=!1,this.unauthenticatedPages=["/alexa.html","/authorize.html","/forums.html","/google-home.html","/ifttt.html","/reset.html","/signin.html","/support-signin.html","/support-signout.html","/index.html"],this._init()},e.SWUser.IFTTT_SIGN_IN="ifttt",e.SWUser.ALEXA_SIGN_IN="alexa",e.SWUser.GOOGLE_HOME_SIGN_IN="google-home",e.SWUser.FORUMS_SIGN_IN="forums",e.SWUser.SUPPORT="support",e.SWUser.SUPPORT_SIGN_OUT="support-signout",e.SWUser.IMPLICIT_OAUTH="authorize-implicit",e.SWUser.CODE_OAUTH="authorize-code",e.SWUser.DEFAULT_SIGN_IN="default",e.SWUser.prototype._init=function(){var t=this;null!=this.settings.accessToken?"function"==typeof this.settings.ready&&"function"==typeof this.settings.ready&&this.settings.ready():firebase.auth().onAuthStateChanged((function(a){var i=t.signInType();a?(i==e.SWUser.DEFAULT_SIGN_IN&&"/signin.html"==location.pathname?(e.Storage.removeSessionItem("sharedStationId"),window.location.href="/index.html"):t.autoConnect||$("body").addClass("signed-in"),"undefined"!=typeof bugsnagClient&&(bugsnagClient.user={id:a.uid}),a.getToken().then((function(r){switch(t.jwt=r,i){case e.SWUser.IFTTT_SIGN_IN:t.autoConnect&&t.doIFTTTSignIn();break;case e.SWUser.ALEXA_SIGN_IN:t.autoConnect?t.doImplicitOAuth(!0):$("#signed-in-user").html(e.user.username());break;case e.SWUser.GOOGLE_HOME_SIGN_IN:t.autoConnect?t.doImplicitOAuth(!1):$("#signed-in-user").html(e.user.username());break;case e.SWUser.FORUMS_SIGN_IN:t.autoConnect?t.doForumsOAuth():$("#signed-in-user").html(e.user.username());break;case e.SWUser.IMPLICIT_OAUTH:t.autoConnect?t.doImplicitOAuth(!1):$("#signed-in-user").html(e.user.username());break;case e.SWUser.CODE_OAUTH:t.autoConnect?t.doAuthorizationFlow():$("#signed-in-user").html(e.user.username());break;case e.SWUser.SUPPORT:t.autoConnect?t.doSupportOAuth():t.autoConnect=!0;break;default:t._updateUser(),null==t.settings.defaultUnits?t.getUnitSettings((function(){"function"==typeof t.settings.userSignedIn&&t.settings.userSignedIn(a),"function"==typeof t.settings.ready&&t.settings.ready()})):"function"==typeof t.settings.ready&&t.settings.ready()}}))):t._isAuthenticatedPage()?window.location.href="/signin.html":(i&&(t.autoConnect=!0),"function"==typeof t.settings.ready&&t.settings.ready())}))},e.SWUser.prototype.signInType=function(){var t=e.SWUser.DEFAULT_SIGN_IN;return document.body.hasAttribute("data-auth")&&(t=$("body").attr("data-auth")),t},e.SWUser.prototype._isAuthenticatedPage=function(){var e=window.location.pathname,t=!0;return(this.unauthenticatedPages.indexOf(e)>-1||e.indexOf("/share")>-1||e.indexOf("/map")>-1||e.indexOf("/station")>-1||e.indexOf("/history")>-1||e.indexOf("/forecast")>-1)&&(t=!1),t},e.SWUser.prototype.doIFTTTSignIn=function(){this._sendJWTToAPI(this.jwt,(function(e){if(e&&Object.prototype.hasOwnProperty.call(e,"auth_token")){var t=Util.getUrlParamByName("state");window.location.href="https://ifttt.com/channels/weatherflow/authorize?state="+t+"&code="+e.auth_token}}))},e.SWUser.prototype.doImplicitOAuth=function(t){var a=Util.getUrlParamByName("client_id"),i=Util.getUrlParamByName("redirect_uri"),r={client_id:a,redirect_uri:i,fb_user_token:encodeURIComponent(this.jwt)};t=t||!1,e.makeIdRequest("token_implicit",r,(function(e){if(null!=e.status.status_code&&0==e.status.status_code&&null!=e.access_token){var a=Util.getUrlParamByName("state"),r=t?"&token_type=Bearer":"";window.location.href=i+"#state="+a+"&access_token="+e.access_token+r}else $("#authorize-instructions").hide(),$("#authorize-logged-in").hide(),$("#sign-in-wrapper").hide(),$("#oauth-error").show()}))},e.SWUser.prototype.doAuthorizationFlow=function(){var t=Util.getUrlParamByName("client_id"),a=Util.getUrlParamByName("redirect_uri"),i=Util.getUrlParamByName("code_challenge"),r={client_id:t,redirect_uri:a,fb_user_token:encodeURIComponent(this.jwt),code_challenge:i};e.makeIdRequest("auth_token",r,(function(e){if(null!=e.status.status_code&&0==e.status.status_code&&null!=e.auth_token){var t=Util.getUrlParamByName("state");window.location.href=a+"?code="+e.auth_token+"&state="+t}else $("#authorize-instructions").hide(),$("#authorize-logged-in").hide(),$("#sign-in-wrapper").hide(),$("#oauth-error").show()}))},e.SWUser.prototype.doForumsOAuth=function(){var t=Util.getUrlParamByName("sso"),a={sig:Util.getUrlParamByName("sig"),payload:t,fb_user_token:encodeURIComponent(this.jwt)};e.makeIdRequest("discourse",a,(function(e){null!=e.status.status_code&&0==e.status.status_code&&null!=e.payload&&null!=e.redirect_uri&&null!=e.sig&&(window.location.href=e.redirect_uri+"?sso="+encodeURIComponent(e.payload)+"&sig="+e.sig)}))},e.SWUser.prototype.doGeneralOAuth=function(){var t=Util.getUrlParamByName("redirect_uri");if("token"==Util.getUrlParamByName("response_type")){var a=Util.getUrlParamByName("state");window.location.href=t+"#token="+e.user.jwt+"&state="+a}},e.SWUser.prototype.doSupportOAuth=function(){var t=Util.getUrlParamByName("return_to"),a={fb_user_token:encodeURIComponent(this.jwt)};e.makeIdRequest("zendesk_jwt",a,(function(e){null!=e.status.status_code&&0==e.status.status_code&&null!=e.jwt&&(window.location.href="https://smartweather.zendesk.com/access/jwt?jwt="+e.jwt+"&return_to="+encodeURIComponent(t))}))},e.SWUser.prototype._sendJWTToAPI=function(e,t){var a={fb_user_token:encodeURIComponent(e),client_id:Util.getUrlParamByName("client_id"),redirect_uri:Util.getUrlParamByName("redirect_uri")};$.getJSON("https://swd.weatherflow.com/id/oauth2/auth_token?callback=?",a,(function(e){t&&"function"==typeof t&&t(e)}))},e.SWUser.prototype.signOut=function(){firebase.auth().signOut()},e.SWUser.prototype.username=function(){return firebase.auth().currentUser.email},e.SWUser.prototype.localize=function(e){return this.l10n.localize(e)},e.SWUser.prototype.localizeDate=function(e){return this.l10n.localizeDate(e.toDate())},e.SWUser.prototype.localizeDateNoYear=function(e){return this.l10n.localizeDateNoYear(e.toDate())},e.SWUser.prototype.getUnitSettings=function(t){var a=this;e.makeRequest("user_settings",{},(function(i){Object.prototype.hasOwnProperty.call(i,"status")&&0==i.status.status_code&&Object.prototype.hasOwnProperty.call(i,"settings")&&null!=i.settings?(a.userSettings=i.settings,"km/h"==a.userWindUnits()&&a.setSetting(e.SettingsKey.WIND,e.WindUnit.KPH),"function"==typeof t&&t()):(a.userSettings=a._getDefaultSettings(),"function"==typeof t&&t())}))},e.SWUser.prototype.setUnitSettings=function(e){this.userSettings=e},e.SWUser.prototype.userTemperatureUnits=function(){return this._getSetting(e.SettingsKey.TEMP)},e.SWUser.prototype.userPressureUnits=function(){return this._getSetting(e.SettingsKey.PRESSURE)},e.SWUser.prototype.userWindUnits=function(){return this._getSetting(e.SettingsKey.WIND)},e.SWUser.prototype.userDistanceUnits=function(){return this._getSetting(e.SettingsKey.DISTANCE)},e.SWUser.prototype.userTimeUnits=function(){return null===e.Storage.getLocalItem(e.SettingsKey.TIME)?(this.setUserTime("12"),"12"):e.Storage.getLocalItem(e.SettingsKey.TIME)},e.SWUser.prototype.userPrecipUnits=function(){return this._getSetting(e.SettingsKey.PRECIP)},e.SWUser.prototype.userDirectionUnits=function(){return this._getSetting(e.SettingsKey.DIRECTION)},e.SWUser.prototype.userOtherUnits=function(){return this._getSetting(e.SettingsKey.OTHER)},e.SWUser.prototype.userLightningEvent=function(){return this._getSetting(e.SettingsKey.LIGHTNING_EVENT)},e.SWUser.prototype.userRainEvent=function(){return this._getSetting(e.SettingsKey.RAIN_START_EVENT)},e.SWUser.prototype.userStatusEvent=function(){return this._getSetting(e.SettingsKey.STATUS_EVENT)},e.SWUser.prototype.userQualityControlEvent=function(){return this._getSetting(e.SettingsKey.QUALITY_CONTROL_EVENT)},e.SWUser.prototype.userLastViewed=function(){return e.Storage.getLocalObject("lastViewed")},e.SWUser.prototype.userTheme=function(){return e.Storage.getLocalItem(e.SettingsKey.THEME)},e.SWUser.prototype.setUserTheme=function(t){t==e.UserTheme.SYSTEM?(e.Storage.removeLocalItem(e.SettingsKey.THEME),enableTheme()):(e.Storage.saveLocalItem(e.SettingsKey.THEME,t),enableTheme())},e.SWUser.prototype.userMiniMapOptions=function(){return e.Storage.getLocalObject(e.SettingsKey.MINI_MAP)},e.SWUser.prototype.setUserMiniMap=function(t,a){let i={mini_map:t,percent_chance:parseInt(a)};e.Storage.saveLocalItem(e.SettingsKey.MINI_MAP,JSON.stringify(i))},e.SWUser.prototype.setUserTime=function(t){e.Storage.saveLocalItem(e.SettingsKey.TIME,t)},e.SWUser.prototype.getUserCurrentLocation=function(){if(null!=this.userSettings.current_location)return this.userSettings.current_location},e.SWUser.prototype.userCurrentLocation=function(){var e=this.userLastViewed(),t=null;return null!=e&&Object.prototype.hasOwnProperty.call(e,"id")&&(t=e.id),t},e.SWUser.prototype.isCurrentLocationArbitrary=function(){var e=this.userLastViewed(),t=null;return null!=e&&Object.prototype.hasOwnProperty.call(e,"isArbitrary")&&(t=e.isArbitrary),t},e.SWUser.prototype.userTemperatureDisplay=function(t){return new e.TemperatureValue(t,e.user.userTemperatureUnits()).displayValueWithSymbolAndUnits()},e.SWUser.prototype.userPressureDisplay=function(t){return new e.PressureValue(t,e.user.userPressureUnits()).displayValueWithUnits()},e.SWUser.prototype.userHumidityDisplay=function(t){return new e.HumidityValue(t).displayValueWithSymbol()},e.SWUser.prototype.userPrecipAmountDisplay=function(t){return new e.PrecipValue(t,e.user.userPrecipUnits()).displayValueWithUnits()},e.SWUser.prototype.userWindSpeedDisplay=function(t){return new e.WindSpeedValue(t,e.user.userWindUnits()).displayValueWithUnits()},e.SWUser.prototype.userWindDirectionDisplay=function(t){return new e.WindDirectionValue(t,e.user.userDirectionUnits()).displayValue()},e.SWUser.prototype.userDistanceDisplay=function(t){return new e.DistanceValue(t,e.user.userDistanceUnits()).displayValueWithUnits()},e.SWUser.prototype.userBrightnessDisplay=function(e){return e+" lux"},e.SWUser.prototype.userSolarRadiationDisplay=function(e){return e+" W/m2"},e.SWUser.prototype.userFuzzyTimeDisplay=function(t){return new e.TimestampValue(t).localFuzzyTime(!0)},e.SWUser.prototype.userFuzzyTimeDisplayNoSeconds=function(t){return new e.TimestampValue(t).localFuzzyTime(!1)},e.SWUser.prototype.userDateTimeDisplayLocal=function(e){return moment(1e3*e).format("YYYY-MM-DD h:mm:ss A")},e.SWUser.prototype.userDateTimeDisplayStationTime=function(t,a){var i=navigator.language.slice(0,2),r=e.user.isTime24HourFormat?"L H:mm:ss":"L h:mm:ss a",n=moment(1e3*t).tz(a);return n.locale(i),n.format(r)},e.SWUser.prototype.userUVDisplay=function(t){return new e.UVValue(t).displayValue()},e.SWUser.prototype.userDeltaTDisplay=function(t){return e.user.userTemperatureUnits()==e.TemperatureUnit.FAHRENHEIT?Math.abs(1.8*t).toFixed(1)+"° "+e.user.userTemperatureUnits().toUpperCase():t+"° "+e.user.userTemperatureUnits().toUpperCase()},e.SWUser.prototype.userAirDensityDisplay=function(t){return e.user.userOtherUnits()==e.OtherUnit.IMPERIAL?(.062428*t).toFixed(5)+" lbs/ft3":t+" kg/m3"},e.SWUser.prototype.userBatteryDisplay=function(e){return e.toFixed(2)+"v"},e.SWUser.prototype.userBatteryDisplayWithUnits=function(t,a){var i=null;if(null!=t&&1==a){switch(t){case 2:i=e.user.localize("StatusTextBatteryPowerSave");break;case 4:i=e.user.localize("StatusTextBatteryGood");break;case 5:i=e.user.localize("StatusTextBatteryEco");break;case 9:i="---";break;default:i=e.user.localize("StatusTextBatteryGood")}return i}return null!=t&&0==a?e.user.localize("StatusTextBatteryGood"):"---"},e.SWUser.prototype.userStatusDisplay=function(t,a){var i=a;switch(a){case e.LocationStatus.ONLINE:i=e.user.localize("StatusTextStatusOnline");break;case e.LocationStatus.OFFLINE:i=e.user.localize("StatusTextStatusOffline")}return i},e.SWUser.prototype.userLocationStatusDisplay=function(t){var a=t;switch(t){case e.LocationStatus.ONLINE:a="Online";break;case e.LocationStatus.OFFLINE:a="Offline"}return a},e.SWUser.prototype.userWifiSignalDisplay=function(t){var a;return t<=-99?a=`${e.user.localize("StatusTextSignalNotConnected")} (${t})`:t<-80&&t>-99?a=`${e.user.localize("StatusTextSignalWeak")} (${t})`:t<-70&&t>=-80?a=`${e.user.localize("StatusTextGood")} (${t})`:t>=-70&&(a=`${e.user.localize("StatusTextSignalStrong")} (${t})`),a},e.SWUser.prototype.userCellularSignalDisplay=function(t,a){let i;return 99===t?i=`${e.user.localize("StatusTextNoSignal")}`:t>0?t>=36&&t<=65?i=`${e.user.localize("StatusTextGood")} (${a}, ${t})`:t>=26&&t<=35?i=`${e.user.localize("StatusTextSignalSatisfactory")} (${a}, ${t})`:t>=0&&t<=25&&(i=`${e.user.localize("StatusTextSignalPoor")} (${a}, ${t})`):t<=0&&t>=-30?t>-10?i=`${e.user.localize("StatusTextSignalExcellent")} (${a}, ${t})`:t>=-20&&t<=-10?i=`${e.user.localize("StatusTextGood")} (${a}, ${t})`:t<-20&&(i=`${e.user.localize("StatusTextSignalPoor")} (${a}, ${t})`):t<=-40&&t>=-110?t>=-65?i=`${e.user.localize("StatusTextSignalExcellent")} (${a}, ${t})`:t>=-75&&t<-65?i=`${e.user.localize("StatusTextGood")} (${a}, ${t})`:t>=-85&&t<-75?i=`${e.user.localize("StatusTextSignalSatisfactory")} (${a}, ${t})`:t<-85&&(i=`${e.user.localize("StatusTextSignalPoor")} (${a}, ${t})`):i=`${e.user.localize("StatusTextNoSignal")}`,i},e.SWUser.prototype.userDeviceSignalDisplay=function(t,a){var i;return"offline"!==a?t<-85?i=`${e.user.localize("StatusTextSignalWeak")} (${t})`:t>=-85&&(i=`${e.user.localize("StatusTextGood")} (${t})`):i="---",i},e.SWUser.prototype.userLightningDistanceTextDisplay=function(t){return new e.LightningDistanceValue(t,e.user.userDistanceUnits()).textDisplay()},e.SWUser.prototype.userRainAccumulationDisplay=function(t,a){a=null==a||a;var i=new e.PrecipValue(t,e.user.userPrecipUnits());return a?i.displayValueWithUnits():i.displayValue()},e.SWUser.prototype.userPrecipMinutesDisplay=function(e){var t="";return null!=e&&null!=e&&(t=e+" min"),t},e.SWUser.prototype._isTime24HourFormat=function(){let e=!1;return e="12"!==this.userTimeUnits(),e},e.SWUser.prototype.defaultDisplay=function(e){return e},e.SWUser.prototype._getDefaultSettings=function(t){var a={};return a[e.SettingsKey.DIRECTION]=e.DirectionUnit.CARDINAL,a[e.SettingsKey.DISTANCE]=e.DistanceUnit.MILES,a[e.SettingsKey.PRECIP]=e.PrecipUnit.INCHES,a[e.SettingsKey.PRESSURE]=e.PressureUnit.MILLIBAR,a[e.SettingsKey.TEMP]=e.TemperatureUnit.FAHRENHEIT,a[e.SettingsKey.WIND]=e.WindUnit.MPH,a[e.SettingsKey.LIGHTNING_EVENT]=!1,a[e.SettingsKey.RAIN_START_EVENT]=!1,a[e.SettingsKey.QUALITY_CONTROL_EVENT]=!1,a[e.SettingsKey.THEME]=e.UserTheme.SYSTEM,a[e.SettingsKey.OTHER]=e.OtherUnit.IMPERIAL,this._createSettings(a,t),a},e.SWUser.prototype._getSetting=function(e){if(null!=this.userSettings&&Object.prototype.hasOwnProperty.call(this.userSettings,e))return this.userSettings[e]},e.SWUser.prototype.setSetting=function(e,t){this.userSettings[e]=t,this._saveSettings()},e.SWUser.prototype._createSettings=function(t,a){if(null!=t){var i={settings:t};e.makeCreateRequest("user_settings",JSON.stringify(i),a)}},e.SWUser.prototype._saveSettings=function(){if(null!=this.userSettings){var t={settings:this.userSettings};e.makeUpdateRequest("user_settings",JSON.stringify(t))}},e.SWUser.prototype._updateUser=function(){var t={locale:navigator.language||""};e.makeUpdateRequest("user",JSON.stringify(t),(function(){}))},e.SWUser.prototype.token=function(){var e=null;return null!=this.settings.accessToken?e=this.settings.accessToken:null!=this.jwt&&(e=this.jwt),e},e.SWUser.LOW_POWER_FLAGS={LOW_POWER_MODE1:2048,LOW_POWER_MODE2:4096,LOW_POWER_MODE3:8192,LOW_POWER_MODE4:1048576,LOW_POWER_MODE5:2097152}}(window.SWD=window.SWD||{}),function(e){e.DerivedValues={},e.DerivedValues.feelsLike=function(t,a){var i=Util.convertValue(t,e.TemperatureUnit.CELSIUS,e.TemperatureUnit.FAHRENHEIT,!1);if(a<40||i<80)return t;var r=.5*(i+(61+1.2*(i-68)+.094*a)),n=0;if(r>79){if(n=2.04901523*i-42.379+10.14333127*a-.22475541*i*a-6.83783*Math.pow(10,-3)*Math.pow(i,2)-5.481717*Math.pow(10,-2)*Math.pow(a,2)+1.22874*Math.pow(10,-3)*Math.pow(i,2)*a+8.5282*Math.pow(10,-4)*i*Math.pow(a,2)-1.99*Math.pow(10,-6)*Math.pow(i,2)*Math.pow(a,2),a<=13&&i>=80&&i<112)n-=(13-a)/4*Math.sqrt((17-Math.abs(i-95))/17);else if(a>85&&i>=80&&i<=87){n+=(a-85)/10*((87-i)/5)}}else n=r;return 10*Util.convertValue(n,e.TemperatureUnit.FAHRENHEIT,e.TemperatureUnit.CELSIUS,!1)/10}}(window.SWD=window.SWD||{}),function(e){e.TemperatureValue=function(e,t,a,i){this.settings=$.extend({},{convert:!0,checkValid:!0},i),a=a||!1,this.settings.checkValid?this.value=this._isValid(e)?e:null:this.value=e,this.wholeNumber=a,this.units=t,this.degreeSymbol="°",this.dashedPlaceholder="---",this.convertedValue=null==this.value||isNaN(this.value)?this.dashedPlaceholder:this.convertTo(!a)},e.TemperatureValue.prototype.observed=function(){return this.value},e.TemperatureValue.prototype.displayValue=function(){var e=this.wholeNumber?Math.round(this.convertedValue):this.convertedValue;return Object.is(e,-0)&&(e=0),e},e.TemperatureValue.prototype.displayValueWithSymbol=function(){if(this.convertedValue!=this.dashedPlaceholder){var e=this.wholeNumer?Math.round(this.convertedValue):this.convertedValue;return Object.is(e,-0)&&(e=0),e+this.degreeSymbol}return this.convertedValue},e.TemperatureValue.prototype.displayValueWithSymbolAndUnits=function(){if(this.convertedValue!=this.dashedPlaceholder){var e=this.wholeNumber?Math.round(this.convertedValue):this.convertedValue;return Object.is(e,-0)&&(e=0),void 0!==this.units?e+" "+this.degreeSymbol+this.units.toUpperCase():e+" "+this.degreeSymbol}return this.convertedValue},e.TemperatureValue.prototype.convertTo=function(t){var a=this.value;if(t=t||!1,this.settings.convert)switch(this.units){case e.TemperatureUnit.FAHRENHEIT:a=e.TemperatureValue.convertToF(this.value)}return t?parseFloat(a).toFixed(1):a},e.TemperatureValue.convertFToC=function(e){return(e-32)/1.8},e.TemperatureValue.convertToF=function(e){return 1.8*e+32},e.TemperatureValue.prototype._isValid=function(e){return!(e>85||e<-40)}}(window.SWD=window.SWD||{}),function(e){e.PressureValue=function(e,t){this.value=this._isValid(e)?e:null,this.units=t,this.dashedPlaceholder="---",this.convertedValue=null!=this.value?this._convert(this.value):this.dashedPlaceholder},e.PressureValue.prototype.observed=function(){return this.value},e.PressureValue.prototype.displayValue=function(){return this.convertedValue},e.PressureValue.prototype.displayValueWithUnits=function(){return this.convertedValue!=this.dashedPlaceholder?this.convertedValue+" "+e.PressureValue.DisplayUnits(this.units):this.convertedValue},e.PressureValue.prototype.calculateSeaLevelPressure=function(t){if(null!=this.value){var a=[];t=t||0;var i=this._convertToSeaLevel(t);if(this._isValid(i)){var r=this._convert(i);a.push(i),a.push(r),a.push(r+" "+e.PressureValue.DisplayUnits(this.units))}else a.push(null),a.push("---"),a.push("---");return a}return[null,this.dashedPlaceholder,this.dashedPlaceholder]},e.PressureValue.prototype._convert=function(t){if(null==t)return null;switch(this.units){case e.PressureUnit.INCHES:return parseFloat(.0295301*t).toFixed(3);case e.PressureUnit.MILLIMETERS:return parseFloat(.750062*t).toFixed(2);default:return parseFloat(t).toFixed(1)}},e.PressureValue.prototype._convertToSeaLevel=function(e){var t=this.value-0;return t*Math.pow(1+Math.pow(1013.25/t,1.865825/9.80665)*(.0065*e/288.15),9.80665/1.865825)},e.PressureValue.prototype._isValid=function(e){return!(e>1100||e<301)},e.PressureValue.DisplayUnits=function(e){var t=e,a={inhg:"inHg",mb:"mb",mmhg:"mmHg",hpa:"hPa"};return null!=a[e]&&(t=a[e]),t}}(window.SWD=window.SWD||{}),function(e){e.HumidityValue=function(e){this.value=this._isValid(e)?e:null,this.dashedPlaceholder="---"},e.HumidityValue.prototype.observed=function(){return this.value},e.HumidityValue.prototype.displayValue=function(){return null!=this.value?this.value:this.dashedPlaceholder},e.HumidityValue.prototype.displayValueWithSymbol=function(){return null!=this.value?this.value+"%":this.dashedPlaceholder},e.HumidityValue.prototype._isValid=function(e){return!(e>100||e<0)},e.HumidityValue.prototype.isValid=function(){return null!=this.value}}(window.SWD=window.SWD||{}),function(e){e.WindValue=function(t,a,i,r){this.dashedPlaceholder="---",this.speed=t,this.direction=a,this.speedUnits=i,this.directionUnits=r,this.windspeed=null,this.winddirection=null,this.windspeed=new e.WindSpeedValue(this.speed,this.speedUnits),null!=this.speed&&null!=this.speed&&0!=this.speed&&(this.winddirection=new e.WindDirectionValue(this.direction,this.directionUnits))},e.WindValue.prototype.windSpeedObserved=function(){return this.windspeed.observed()},e.WindValue.prototype.windSpeedDisplayValue=function(){return this.windspeed.displayValue()},e.WindValue.prototype.windSpeedDisplayValueWithUnits=function(){return this.windspeed.displayValueWithUnits()},e.WindValue.prototype.windDirectionObserved=function(){return null!=this.winddirection?this.winddirection.observed():null},e.WindValue.prototype.windDirectionDisplayValue=function(){return null!=this.winddirection?this.winddirection.displayValue():this.dashedPlaceholder},e.WindValue.prototype.windDirectionDisplayValueWithSymbol=function(){return null!=this.winddirection?this.winddirection.displayValueWithSymbol():this.dashedPlaceholder},e.WindValue.prototype.windDirectionDisplayValueInText=function(){return null!=this.winddirection?this.winddirection.displayValueInText():this.dashedPlaceholder}}(window.SWD=window.SWD||{}),function(e){e.WindSpeedValue=function(e,t){this.dashedPlaceholder="---",this.value=e,this.units=t,this.convertedValue=null!=this.value?this._convertTo(!0):this.dashedPlaceholder},e.WindSpeedValue.prototype.observed=function(){return this.value},e.WindSpeedValue.prototype.displayValue=function(){return this.convertedValue},e.WindSpeedValue.prototype.displayValueWithUnits=function(){return this.convertedValue!=this.dashedPlaceholder?this.convertedValue+" "+e.WindSpeedValue.DisplayUnits(this.units):this.convertedValue},e.WindSpeedValue.prototype._convertTo=function(t){var a=this.value;switch(t=t||!1,this.units){case e.WindUnit.MPH:a=2.2369362920544*this.value;break;case e.WindUnit.KPH:a=3.6*this.value;break;case e.WindUnit.KTS:a=1.9438*this.value;break;case e.WindUnit.BFT:a=this.value<.3?0:this.value<1.6?1:this.value<3.5?2:this.value<5.5?3:this.value<8?4:this.value<10.8?5:this.value<13.9?6:this.value<17.2?7:this.value<20.8?8:this.value<24.5?9:this.value<28.5?10:this.value<32.7?11:this.value>=32.7?12:0;break;case e.WindUnit.LFM:a=2.2369362920544*this.value*88}return t?parseFloat(a).toFixed(1):a},e.WindSpeedValue.DisplayUnits=function(t){switch(t){case e.WindUnit.KPH:return"km/h";case e.WindUnit.MPS:return"m/s";default:return t}}}(window.SWD=window.SWD||{}),function(e){e.WindDirectionValue=function(e,t){this.dashedPlaceholder="---",this.value=e,this.units=t,this.degreeSymbol="°",this.directionString=null!=this.value?this._getDirectionString():"---"},e.WindDirectionValue.prototype.observed=function(){return this.value},e.WindDirectionValue.prototype.displayValue=function(){return this.units==e.DirectionUnit.CARDINAL?this.displayValueInText():this.displayValueWithSymbol()},e.WindDirectionValue.prototype.displayValueWithSymbol=function(){return null!=this.value?this.value+this.degreeSymbol:this.dashedPlaceholder},e.WindDirectionValue.prototype.displayValueInText=function(){return this.directionString},e.WindDirectionValue.prototype._getDirectionString=function(){var e="";return this.value<=360&&this.value>=348.75?e="N":this.value>=0&&this.value<=11.25?e="N":this.value>=11.25&&this.value<=33.75?e="NNE":this.value>=33.75&&this.value<=56.25?e="NE":this.value>=56.25&&this.value<=78.75?e="ENE":this.value>=78.75&&this.value<=101.25?e="E":this.value>=101.25&&this.value<=123.75?e="ESE":this.value>=123.75&&this.value<=146.25?e="SE":this.value>=146.25&&this.value<=168.75?e="SSE":this.value>=168.75&&this.value<=191.25?e="S":this.value>=191.25&&this.value<=213.75?e="SSW":this.value>=213.75&&this.value<=236.25?e="SW":this.value>=236.25&&this.value<=258.75?e="WSW":this.value>=258.75&&this.value<=281.25?e="W":this.value>=281.25&&this.value<=303.75?e="WNW":this.value>=303.75&&this.value<=326.25?e="NW":this.value>=326.25&&this.value<=348.47&&(e="NNW"),e}}(window.SWD=window.SWD||{}),function(e){e.RapidWind=function(t){var a=parseInt((new Date).getTime()/1e3);this.maxTierValues={},this.rapidWindLoaded=!1,this.currentTier=0,this.lastRapidWindOb={speed:null,direction:null,timestamp:a},this.windAvgFlag=!0,this.maxTierValues[e.WindUnit.MPH]=[20,40,80],this.maxTierValues[e.WindUnit.KTS]=[20,40,80],this.maxTierValues[e.WindUnit.MPS]=[10,20,40],this.maxTierValues[e.WindUnit.KPH]=[30,60,120],this.maxTierValues[e.WindUnit.LFM]=[1800,3600,7200],this.maxTierValues[e.WindUnit.BFT]=[3,6,9],this.settings=$.extend({},{rapidWindBarParentElement:null,rapidWindBarElement:null,rapidWindBarScaleElement:null,rapidWindTarget:null,directionElement:null,units_wind:"mph",showScale:!1,showMinFill:!1},t),this.setRapidWindTimestamp(a),this._setWindScaleMax(this.maxTierValues[this.settings.units_wind][0])},e.RapidWind.prototype.showRapidWind=function(t,a,i){this.rapidWindLoaded=!0,this._setWindIconDirection(a),this.setRapidWindTimestamp(i),this._setWindType(e.RapidWind.WIND_TYPE_RAPID);var r=this._getRapidWindTier(t);if(null!=t&&null!=t){r!=this.currentTier&&(this.currentTier=r);var n=t>=10||0==t?parseFloat(t).toFixed(0):t,s=this._getMaxForRapidWindTier(this.currentTier);this._setWindScaleMax(s),$(this.settings.rapidWindBarParentElement).attr("data-tier",this.currentTier);var o=(t>s?s:t)/s*100;o=this.settings.showMinFill&&o<10?10:o,$(this.settings.rapidWindBarElement).show().css("width",o+"%"),$(this.settings.rapidWindBarParentElement).show(),$(".rapid-wind-speed",this.settings.rapidWindTarget).html(n),this.lastRapidWindOb.speed=t,this.lastRapidWindOb.direction=a,this.lastRapidWindOb.timestamp=i}},e.RapidWind.prototype.hideRapidWind=function(){var t=$("span[data-param='wind_direction_cardinal']").html();$("#cc-wind").attr("data-wind-type")!=e.RapidWind.WIND_TYPE_AVERAGE&&(this._setWindType(e.RapidWind.WIND_TYPE_AVERAGE),null!=t&&null!=t&&""!=t&&this._setWindIconDirection(t))},e.RapidWind.prototype.setRapidWindTimestamp=function(t){$(this.settings.rapidWindTarget).attr("data-"+e.RapidWindObRecord.RapidWindTimestamp,t)},e.RapidWind.prototype.windAvgDirectionReceived=function(t){this.rapidWindLoaded&&$(this.settings.rapidWindTarget).attr("data-wind-type")!=e.RapidWind.WIND_TYPE_AVERAGE||this._setWindIconDirection(t)},e.RapidWind.prototype.windAvgReceived=function(e){var t=this._getRapidWindTier(e);if(t!=this.currentTier){this.currentTier=t;var a=this._getMaxForRapidWindTier(this.currentTier);this._setWindScaleMax(a),$(this.settings.rapidWindBarParentElement).attr("data-tier",this.currentTier),this.showRapidWind(this.lastRapidWindOb.speed,this.lastRapidWindOb.direction,this.lastRapidWindOb.timestamp)}this.windAvgFlag=!this.windAvgFlag},e.RapidWind.prototype._setWindScaleMax=function(e){this.settings.showScale&&$(".rapid-wind-max-label",this.settings.rapidWindTarget).html(e).show()},e.RapidWind.prototype._setWindIconDirection=function(e){var t=$(this.settings.directionElement);if(null!=(e=null==e||"---"==e?null:e)){var a=t.attr("data-wind-direction"),i=e;a=null!=a&&null!=a?a:0,Math.abs(e-a)>180&&(i=e-360),t.css("transform","rotate("+i+"deg)"),t.attr("data-wind-direction",i),t.removeClass("no-wind-dir")}else t.addClass("no-wind-dir")},e.RapidWind.prototype._setWindType=function(e){$(this.settings.rapidWindTarget).attr("data-wind-type",e)},e.RapidWind.prototype._getRapidWindTier=function(e){var t=0;if(null!=this.maxTierValues[this.settings.units_wind])for(var a=this.maxTierValues[this.settings.units_wind],i=0;i0&&te.charAt(0).toUpperCase()+e.slice(1)).join("");return e.user.localize(t)},e.PrecipRateValue.prototype.textDisplayLocalizedWithRate=function(){return this.textDisplayLocalized().toUpperCase()+" ("+this.ratePerHourDisplayWithUnits()+")"},e.PrecipRateValue.prototype.graphTextYAxisValue=function(){var t=0;switch(this.textDisplay()){case e.PrecipRateValue.VERY_LIGHT:t=1;break;case e.PrecipRateValue.LIGHT:t=2;break;case e.PrecipRateValue.MODERATE:t=3;break;case e.PrecipRateValue.HEAVY:t=4;break;case e.PrecipRateValue.VERY_HEAVY:t=5;break;case e.PrecipRateValue.EXTREME:t=6;break;default:t=0}return t},e.PrecipRateValue.prototype._calculateRatePerHour=function(){var e=null;return null!=this.value&&(e=this.value/this.interval*60),e},e.PrecipRateValue.prototype._convertTo=function(){return new e.PrecipValue(this.hourlyRate,this.units).displayValue()},e.PrecipRateValue.prototype._convertToText=function(){var t=e.PrecipRateValue.NONE;return this.hourlyRate>50?t=e.PrecipRateValue.EXTREME:this.hourlyRate>=16?t=e.PrecipRateValue.VERY_HEAVY:this.hourlyRate>=4?t=e.PrecipRateValue.HEAVY:this.hourlyRate>=1?t=e.PrecipRateValue.MODERATE:this.hourlyRate>=.25?t=e.PrecipRateValue.LIGHT:this.hourlyRate>0&&(t=e.PrecipRateValue.VERY_LIGHT),t}}(window.SWD=window.SWD||{}),function(e){e.LightningDistanceValue=function(e,t){this.value=e,this.units=t,this.info=this._getMinMax(),this.textValue=this._convertToText()},e.LightningDistanceValue.prototype.textDisplay=function(){return this.textValue},e.LightningDistanceValue.prototype.binnedInfo=function(){return this.info},e.LightningDistanceValue.prototype._convertToText=function(){var e="---";return null!=this.info.graphMin&&null!=this.info.graphMax&&(e=Math.round(this.info.graphMin)+" - "+Math.round(this.info.graphMax)+" "+this.units),e},e.LightningDistanceValue.prototype._getMinMax=function(){var t={graphMin:null,graphMax:null};switch(this.value){case 0:case 1:t.graphMin=0,t.graphMax=new e.DistanceValue(3,this.units,!1).displayValue();break;default:var a=this.value-2,i=this.value+2;a<0&&(a=0),t.graphMin=parseFloat(new e.DistanceValue(a,this.units,!1).displayValue()),t.graphMax=parseFloat(new e.DistanceValue(i,this.units,!1).displayValue())}return t}}(window.SWD=window.SWD||{}),function(e){e.UVValue=function(e){this.value=this._isValid(e)?e:null,this.dashedPlaceholder="---"},e.UVValue.prototype.observed=function(){return this.value},e.UVValue.prototype.displayValue=function(){return null!=this.value?(Math.round(10*this.value)/10).toFixed(1):this.dashedPlaceholder},e.UVValue.prototype._isValid=function(e){return!(e>20)}}(window.SWD=window.SWD||{}),function(e,t){e.WeatherTiles=function(e){this.tileDefinitions={},this.listDefinitions={},this.rapidWindHelpers={},this.settings=t.extend({},{locationCoords:null,locationId:null,devices:[],isArbitrary:null,isStationOwner:!1,tiles:[],rainCheckEnabled:null,tileClicked:null},e),this._init(),this._buildTiles()},e.WeatherTiles.AIR_TEMPERATURE_HUMIDITY="air_temperature_humidity",e.WeatherTiles.LIGHTNING="lightning",e.WeatherTiles.BAROMETRIC_PRESSURE="barometric_pressure",e.WeatherTiles.WIND="wind",e.WeatherTiles.LIGHT="light",e.WeatherTiles.RAIN="rain",e.WeatherTiles.DIAGNOSTIC="diagnostics",e.WeatherTiles.prototype._init=function(){this.tileDefinitions[e.WeatherTiles.AIR_TEMPERATURE_HUMIDITY]={graph:e.Graph.TEMP,mainDisplays:[{param:e.ObRecord.AirTempWithSymbolAndUnits,label:null,units:null}],secondaryDisplays:[{param:e.ObRecord.HeatIndexOrDewPointDisplay,labelParam:e.ObRecord.HeatIndexOrDewPointLabel},{param:e.ObRecord.HumidityWithSymbol,label:e.user.localize("GeneralTitleHumidityShort"),graph:e.Graph.HUMIDITY}],timestamp:e.ObRecord.Timestamp},this.tileDefinitions[e.WeatherTiles.BAROMETRIC_PRESSURE]={cssIconParam:e.ObRecord.PressureTrend,graph:e.Graph.PRESSURE,mainDisplays:[{param:e.ObRecord.SeaLevelPressure,units:e.PressureValue.DisplayUnits(e.user.userPressureUnits()),label:null}],secondaryDisplays:[{param:e.ObRecord.PressureTrendLocalized,label:e.user.localize("GeneralTitleTrend"),iconParam:e.ObRecord.PressureTrend}],timestamp:e.ObRecord.Timestamp},this.tileDefinitions[e.WeatherTiles.LIGHTNING]={graph:e.Graph.LIGHTNING,mainDisplays:[{param:e.ObRecord.LightningLastStrikeFuzzy,label:e.user.localize("GeneralTitleLastStrike"),units:null}],secondaryDisplays:[{param:e.ObRecord.LightningLastStrikeDistanceTextDisplay,label:e.user.localize("GeneralValueDistance")},{param:e.ObRecord.LightningStrikeCountLast3Hrs,label:e.user.localize("GeneralTitleLast3Hrs"),graph:e.Graph.STRIKE_COUNT}],timestamp:e.ObRecord.Timestamp},this.tileDefinitions[e.WeatherTiles.WIND]={cssIconParam:e.ObRecord.WindDirCardinal,graph:e.Graph.WIND,mainDisplays:[{param:e.ObRecord.WindDir,label:null,units:null},{param:e.ObRecord.WindAvg,units:e.WindSpeedValue.DisplayUnits(e.user.userWindUnits()),label:null}],secondaryDisplays:[{param:e.ObRecord.WindLullAndGustWithUnits,label:e.user.localize("GeneralValueGusting")}],timestamp:e.ObRecord.Timestamp,powerSaveModeIndicator:this.settings.isStationOwner},this.tileDefinitions[e.WeatherTiles.LIGHT]={graph:e.Graph.UV,mainDisplays:[{param:e.ObRecord.UVWithIndex,label:e.user.localize("GeneralTitleUVIndexShort"),units:null}],secondaryDisplays:[{param:e.ObRecord.LuxDisplayValueWithUnits,label:e.user.localize("GeneralTitleBrightness"),graph:e.Graph.BRIGHTNESS},{param:e.ObRecord.SolarRadiationDisplayWithUnits,label:e.user.localize("GeneralTitleSolarRadiation"),graph:e.Graph.SOLAR_RADIATION}],timestamp:e.ObRecord.Timestamp},this.tileDefinitions[e.WeatherTiles.RAIN]={cssIconParam:e.ObRecord.PrecipRateTextDisplay,graph:e.Graph.RAIN,mainDisplays:[{param:e.ObRecord.PrecipRateTextDisplayLocalized,label:null,units:null}],secondaryDisplays:[{param:e.ObRecord.PrecipAccumLocalTodayDisplayWithUnits,label:e.user.localize("GeneralTitleRainToday"),fallback:e.ObRecord.PrecipAccumLocalTodayDisplayWithUnits},{param:e.ObRecord.PrecipAccumLocalYesterdaySensorDisplayWithUnits,label:e.user.localize("GeneralTitleRainYesterday"),fallback:e.ObRecord.PrecipAccumLocalYesterdaySensorDisplayWithUnits}],timestamp:e.ObRecord.Timestamp,powerSaveModeIndicator:this.settings.isStationOwner},this.tileDefinitions[e.WeatherTiles.DIAGNOSTIC]={graph:e.Graph.BATTERY,mainDisplays:[{param:e.ObRecord.Battery,label:e.user.localize("GeneralTextBatteryVoltage"),units:e.user.localize("GeneralValueVolts")}],secondaryDisplays:[{param:e.ObRecord.BatteryState,label:e.user.localize("StatusTitleBatteryState")}],timestamp:e.ObRecord.Timestamp,powerSaveModeIndicator:this.settings.isStationOwner},this.listDefinitions[e.WeatherTiles.AIR_TEMPERATURE_HUMIDITY]={items:[{param:e.ObRecord.DewPointWithSymbolAndUnits,label:e.user.localize("GeneralTitleDewPoint"),advanced:!1,sort:0},{param:e.ObRecord.WetBulbTempWithSymbolAndUnits,label:e.user.localize("GeneralValueWetBulb"),advanced:!0,sort:4},{param:e.ObRecord.WetBulbGlobeTempWithSymbolAndUnits,label:e.user.localize("GeneralValueWetBulbGlobe"),advanced:!0,sort:5},{param:e.ObRecord.DeltaTWithSymbolAndUnits,label:e.user.localize("GridTextDeltaT"),advanced:!0,sort:6},{param:e.ObRecord.AirDensity,label:e.user.localize("GridTextAirDensity"),advanced:!0,sort:7}]},this.listDefinitions[e.WeatherTiles.BAROMETRIC_PRESSURE]={items:[{param:e.ObRecord.PressureWithUnits,label:e.user.localize("GeneralTitleStationPressure"),advanced:!1,sort:1}]},this.listDefinitions[e.WeatherTiles.RAIN]={items:[{param:e.ObRecord.PrecipDurationLocalDayWithUnits,label:e.user.localize("GeneralTitleRainDurationToday"),advanced:!1,sort:2},{param:e.ObRecord.PrecipDurationLocalYesterdayWithUnits,label:e.user.localize("GeneralTitleRainDurationYesterday"),advanced:!1,sort:3}]}},e.WeatherTiles.prototype._buildTiles=function(){var a=t("#grid-view"),i={};a.empty();for(var r=0;r
    ").appendTo(a);if("forecast"==n.item)this.forecastTable=new e.WUForecastTable({coords:this.settings.locationCoords,locationId:this.settings.locationId,tempUnit:e.user.userTemperatureUnits()},s);else if(this.tileDefinitions.hasOwnProperty(n.item)){var o=t.extend(!0,{},this.tileDefinitions[n.item]);if(n.item==e.WeatherTiles.RAIN){var l=e.rainCheckEnabled(this._getDevice(n.device_id));if(this.rainCheckEnabled=l,l)for(var c=o.secondaryDisplays,u=0;u",g+="

    "+e.user.localize("GridTextAdvancedStats")+"

    ",g+="",g+=""),g+="
  • ",g+=""+p[m].label+"",g+="",g+="
  • ",i[n.device_id][p[m].sort]=g}}}}var y=this;"function"==typeof this.settings.tileClicked&&t("body").on("click",".weather-tile, .weather-tile-secondary-display[data-graph]",(function(){t("#power-save-dialog").hide();var e=t(this).attr("data-device-id");return null!=e&&null!=e||(e=t(this).closest(".weather-tile").attr("data-device-id")),y.settings.tileClicked(e,t(this).attr("data-graph")),!1}));var v="
    ";v+="
      ",t.each(i,(function(e,t){v+="
    • "+y._getDeviceName(e)+"

    • ",v+=t.join("")})),v+="
    ",v+="
    ",a.append(v)},e.WeatherTiles.prototype._getDevice=function(e){for(var t=null,a=0;a div.weather-tile-row.weather-tile-row-1");if(l.removeClass("fallback-display"),l){if(s==e.ObRecord.Timestamp||s==e.RapidWindObRecord.RapidWindTimestamp){l.attr("data-timestamp",o);var u=new e.TimestampValue(o);l.attr("mins-ago",u.minutesAgo()),o=u.localFuzzyTime()}if(s==e.ObRecord.LightningLastStrikeFuzzy&&(l.attr("data-timestamp",a[e.ObRecord.LightningLastStrikeObserved]),t(".weather-tile.lightning[data-device-id='"+i+"']").attr("data-lightning-timestamp",a[e.ObRecord.LightningLastStrikeObserved])),s==e.RapidWindObRecord.RapidWindSpeed&&o>=10&&(o=parseFloat(o).toFixed(0)),s==e.ObRecord.WindDirObserved&&null!=r&&null!=r&&r.windAvgDirectionReceived(o),s==e.ObRecord.WindAvg&&null!=r&&null!=r&&r.windAvgReceived(o),s==e.ObRecord.WetBulbGlobeTempWithSymbolAndUnits&&(null!=o&&"---"!=o||t(l).parent().remove()),null!=o&&"---"!=o||null==l.attr("data-fallback-param"))s!=e.ObRecord.PrecipAccumLocalTodayFinalDisplayWithUnits&&s!=e.ObRecord.PrecipAccumLocalYesterdayFinalDisplayWithUnits||!e.rainCheckEnabled(n._getDevice(i))||c.addClass("raincheck");else{var d=l.attr("data-fallback-param");Object.prototype.hasOwnProperty.call(a,d)&&(o=a[d],l.addClass("fallback-display"))}if(l.html(o),l.attr("data-css-icon-param")&&n._setTileIcon(l.attr("data-css-icon-param"),a,l.parent().parent().parent().parent()),l.attr("data-icon-param")){var p=l.attr("data-icon-param");n._setIcon(p,a[p],l)}}}));for(var s=t("[data-param-fallback-value]"),o=0;o=1043?96:e<=983?-96:1013==e?0:3.2*(e-1013)},e.WeatherTiles.prototype._setIcon=function(t,a,i){switch(t){case e.ObRecord.PressureTrend:i.stripClass("param-icon-").addClass("param-icon-"+a.toLowerCase())}},e.WeatherTiles.prototype._getRapidWindHelper=function(e){var t=null;return null!=this.rapidWindHelpers[e]&&(t=this.rapidWindHelpers[e]),t},e.WeatherTiles.prototype.setPowerSaveDisplay=function(a){if(null!=a){var i=this;t.each(a,(function(t,a){switch(a){case 2:case 5:i._showPowerSaveModeIcon(t,e.WeatherTiles.WIND),i._showPowerSaveModeIcon(t,e.WeatherTiles.DIAGNOSTIC);break;case 3:i._showPowerSaveModeIcon(t,e.WeatherTiles.WIND),i._showPowerSaveModeIcon(t,e.WeatherTiles.RAIN),i._showPowerSaveModeIcon(t,e.WeatherTiles.DIAGNOSTIC)}}))}},e.WeatherTiles.prototype._showPowerSaveModeIcon=function(e,a){t(".weather-tile."+a+"[data-device-id='"+e+"'] .power-save-mode-icon").show()}}(window.SWD=window.SWD||{},jQuery),function(e,t){e.WeatherTile=function(e,a,i){this.target=a,this.tileItem=i,this.settings=t.extend({},{name:null,mainDisplays:[],secondaryDisplays:[],showRapidWindBar:!1,powerSaveModeIndicator:!1},e),this._draw()},e.WeatherTile.prototype._draw=function(){var e="";if(e+="
    ",null!=this.settings.name&&(e+="

    "+this.settings.name+"

    "),e+="
    ",null!=this.settings.timestamp&&(e+="

    "),this.settings.powerSaveModeIndicator&&(e+=""),e+="
    ",e+="
    ",e+="
    ",e+="
    ",null!=this.settings.iconDisplay&&(e+="
    ",e+="

    ",e+="
    "),this.settings.showRapidWindBar&&(e+="
    ",e+=""),e+="
    ",this.settings.mainDisplays.length>0){e+="
    ",this.settings.showRapidWindBar&&(e+="
    ");for(var a=0;a",e+="

    "+(null!=i.label?i.label:"")+"

    ",e+="

    ",null!=i.units&&(e+="

    "+i.units+"

    "),e+="
    "}this.settings.showRapidWindBar&&(e+="
    "),this.settings.showRapidWindBar&&(e+="
    ",e+="",e+="
    ",e+="",e+="
    ",e+="",e+="
    "),e+="
    "}if(this.settings.secondaryDisplays.length>0){e+="
    ";for(var r=0;r",Object.prototype.hasOwnProperty.call(n,"label")&&null!=n.label?e+="

    "+n.label+"

    ":Object.prototype.hasOwnProperty.call(n,"labelParam")&&null!=n.labelParam&&(e+="

    "),e+="

    ",e+="
    "}}e+="
    ",e+="
    "}t(this.target).append(e)}}(window.SWD=window.SWD||{},jQuery),function(e,t){e.WeatherList=function(a,i,r){this.summaryTarget=i,this.deviceTarget=r,this.stationTimezone=null,this.summaryMap={outdoor:{label:e.user.localize("GeneralTextCurrentConditions")}},this.listMap={air_density:{label:e.user.localize("GridTextAirDensity"),formatter:e.user.userAirDensityDisplay},air_temperature:{label:e.user.localize("GeneralTitleAirTemperature"),value:e.ObRecord.AirTempWithSymbolAndUnits,graph:e.Graph.TEMP,formatter:e.user.userTemperatureDisplay},barometric_pressure:{label:e.user.localize("GeneralTitleStationPressure"),value:e.ObRecord.PressureWithUnits,graph:e.Graph.PRESSURE,formatter:e.user.userPressureDisplay},brightness:{label:e.user.localize("GeneralTitleBrightness"),value:e.ObRecord.LuxDisplayValueWithUnits,graph:e.Graph.BRIGHTNESS,formatter:e.user.userBrightnessDisplay},delta_t:{label:e.user.localize("GridTextDeltaT"),formatter:e.user.userDeltaTDisplay},dew_point:{label:e.user.localize("GeneralTitleDewPoint"),value:e.ObRecord.DewPointWithSymbolAndUnits,formatter:e.user.userTemperatureDisplay},feels_like:{label:e.user.localize("GeneralTitleFeelsLike"),formatter:e.user.userTemperatureDisplay},heat_index:{label:e.user.localize("GeneralValueHeatIndex"),formatter:e.user.userTemperatureDisplay},lightning_strike_distance:{label:e.user.localize("GeneralTitleLightningDistance"),value:e.ObRecord.LightningStrikeDistanceTextDisplay,formatter:e.user.userDistanceDisplay},lightning_strike_count:{label:e.user.localize("GeneralTitleLightningStrikeCount"),value:e.ObRecord.StrikeCount,formatter:e.user.defaultDisplay},lightning_strike_count_last_3hr:{label:e.user.localize("GeneralTitleLightningLast3Hrs"),value:e.ObRecord.LightningStrikeCountLast3Hrs,formatter:e.user.defaultDisplay},lightning_strike_last_distance:{label:e.user.localize("GeneralTitleLightningDistanceDetected"),formatter:e.user.userLightningDistanceTextDisplay},lightning_strike_last_epoch:{label:e.user.localize("GeneralTitleLightningLastDetected"),formatter:e.user.userFuzzyTimeDisplayNoSeconds},precip:{label:e.user.localize("GeneralTitleRainIntensity"),value:e.ObRecord.PrecipRateTextAndValueDisplay,formatter:this.userPrecipRateTextAndValue,graph:e.Graph.RAIN},precip_accum_local_day:{label:e.user.localize("GeneralTitleRainAccumToday"),formatter:e.user.userPrecipAmountDisplay},precip_accum_local_day_final:{label:e.user.localize("GeneralTitleRainAccumToday"),formatter:e.user.userPrecipAmountDisplay},precip_accum_local_yesterday:{label:e.user.localize("GeneralTitleRainAccumYesterday"),formatter:e.user.userPrecipAmountDisplay},precip_accum_local_yesterday_final:{label:e.user.localize("GeneralTitleRainAccumYesterday"),formatter:e.user.userPrecipAmountDisplay},precip_minutes_local_day:{label:e.user.localize("GeneralTitleRainDurationToday"),formatter:e.user.userPrecipMinutesDisplay},precip_minutes_local_yesterday_final:{label:e.user.localize("GeneralTitleRainDurationYesterday"),formatter:e.user.userPrecipMinutesDisplay},precip_minutes_local_yesterday:{label:e.user.localize("GeneralTitleRainDurationYesterday"),formatter:e.user.userPrecipMinutesDisplay},rain_accum_local_day:{label:e.user.localize("GeneralTItleRainAccumToday"),formatter:e.user.userRainAccumulationDisplay},relative_humidity:{label:e.user.localize("GeneralTitleHumidity"),value:e.ObRecord.HumidityWithSymbol,graph:e.Graph.TEMP,formatter:e.user.userHumidityDisplay},timestamp:{label:e.user.localize("GeneralValueTimestamp"),value:e.ObRecord.TimestampLocalLong,formatter:e.user.userDateTimeDisplayStationTime},sea_level_pressure:{label:e.user.localize("GeneralTitlePressure"),value:e.ObRecord.SeaLevelPressureWithUnits,graph:e.Graph.PRESSURE,formatter:e.user.userPressureDisplay},solar_radiation:{label:e.user.localize("GeneralTitleSolarRadiation"),value:e.ObRecord.SolarRadiationDisplayWithUnits,graph:e.Graph.SOLAR_RADIATION,formatter:function(e){return e+" W/m2"}},uv:{label:e.user.localize("GeneralTitleUVIndex"),value:e.ObRecord.UVWithIndex,graph:e.Graph.UV,formatter:e.user.userUVDisplay},wet_bulb_temperature:{label:e.user.localize("GeneralValueWetBulb"),formatter:e.user.userTemperatureDisplay},wind_avg:{label:e.user.localize("GeneralTitleWindSpeed"),value:e.ObRecord.WindAvgWithUnits,graph:e.Graph.Wind,formatter:e.user.userWindSpeedDisplay},wind_chill:{label:e.user.localize("GeneralTitleWindChill"),graph:e.Graph.Wind,formatter:e.user.userTemperatureDisplay},wind_direction:{label:e.user.localize("GeneralTitleWindDirection"),value:e.ObRecord.WindDir,graph:e.Graph.Wind,formatter:e.user.userWindDirectionDisplay},wind_gust:{label:e.user.localize("GeneralTitleWindGust"),value:e.ObRecord.WindGustWithUnits,graph:e.Graph.WIND,formatter:e.user.userWindSpeedDisplay},wind_lull:{label:e.user.localize("GeneralTitleWindLull"),value:e.ObRecord.WindLullWithUnits,graph:e.Graph.WIND,formatter:e.user.userWindSpeedDisplay},wind_speed:{label:e.user.localize("GeneralTitleWindSpeed"),value:e.ObRecord.WindAvgWithUnits,graph:e.Graph.WIND}},this.settings=t.extend({},{devices:[],itemClicked:null,locationId:null,locationObservationLoaded:null,useLocationUnits:!1},a);const n=this;this._getObservationsByLocation((function(t){n.settings.useLocationUnits&&null!=t.location_units&&e.user.setUnitSettings(t.location_units),void 0!==t&&n._drawObservationForLocation(t),n._setUpdater()})),this._getDeviceListItems((function(){n._draw()}))},e.WeatherList.prototype._getObservationsByLocation=function(t){if(null!=this.settings.locationId){const a=this,i={location_id:this.settings.locationId};e.makeRequest("observations/location",i,(function(e){null==e&&null==e||(null!=e.status.status_code&&0==e.status.status_code&&null!=e.timezone?a.stationTimezone=e.timezone:a.stationTimezone=Intl.DateTimeFormat().resolvedOptions().timeZone,"function"==typeof t&&t(e),"function"==typeof a.settings.locationObservationLoaded&&a.settings.locationObservationLoaded(e))}))}},e.WeatherList.prototype._getDeviceListItems=function(t){null==e.DeviceListItems?e.makeRequest("location_item_list_configuration",{},(function(a){Object.prototype.hasOwnProperty.call(a,"status")&&0==a.status.status_code&&(e.DeviceListItems=a,"function"==typeof t&&t())})):"function"==typeof t&&t()},e.WeatherList.prototype._drawObservationForLocation=function(a){const i=this;let r,n="";const s=a.capabilities.filter((function(e){return"rain"===e.capability}))[0];null!=s&&(r=s.show_precip_final),r?"precip_accum_local_day_final"in a.outdoor&&delete a.outdoor.precip_accum_local_day:delete a.outdoor.precip_accum_local_day_final,t.each(a,(function(s,o){if(Object.prototype.hasOwnProperty.call(i.summaryMap,s)){const l=i.summaryMap[s];let c="style='display:none;'";Object.prototype.hasOwnProperty.call(o,"timestamp")&&(c="style='display:block;'"),n+="
      ",n+="
    • "+l.label+"
    • ",t.each(o,(function(t,o){if(a[s+"_keys"].indexOf(t)>-1&&Object.prototype.hasOwnProperty.call(i.listMap,t)){const a=i.listMap[t],s=Object.prototype.hasOwnProperty.call(a,"formatter")?a.formatter:null;let l=o;null!=s&&(l="timestamp"==t?s(o,i.stationTimezone):s(o)),n+="precip_accum_local_day_final"!=t&&"precip_accum_local_yesterday_final"!=t||1!=r||null==r||0==r?"
    • "+a.label+""+l+"
    • ":"
    • "+a.label+""+l+"
    • ","timestamp"==t&&(n+="
    • "+e.user.localize("GeneralValueTimezone")+""+i.stationTimezone+"
    • ")}})),n+="
    "}})),t(this.summaryTarget).empty().append(n)},e.WeatherList.prototype._draw=function(){let e="";if(null!=this.settings.devices)for(var a=0;a",Object.prototype.hasOwnProperty.call(t,"device_meta")&&Object.prototype.hasOwnProperty.call(t.device_meta,"name")&&null!=t.device_meta.name&&(e+="
  • "+t.device_meta.name+"
  • ");for(var i=0;i",e+=""+a.label+"",e+="",e+=""}}e+=""}}}t(this.deviceTarget).empty().append(e),this._attachEventHandlers()},e.WeatherList.prototype._attachEventHandlers=function(){if("function"==typeof this.settings.itemClicked){const e=this;t(".weather-list-item").on("click",(function(){const a=t(this).attr("data-graph");a&&e.settings.itemClicked(t(this).parent().attr("data-device-id"),a)}))}},e.WeatherList.prototype._setUpdater=function(){const t=this;null!=e.WeatherListSummaryUpdater&&clearInterval(e.WeatherListSummaryUpdater),e.WeatherListSummaryUpdater=setInterval((function(){(t.settings.useLocationUnits||"list"==e.mgr.View())&&t.doSummaryUpdate()}),6e4)},e.WeatherList.prototype._getDeviceKey=function(e){let t=null;return Object.prototype.hasOwnProperty.call(e,"device_type")&&Object.prototype.hasOwnProperty.call(e,"hardware_revision")&&Object.prototype.hasOwnProperty.call(e,"firmware_revision")&&(t=e.device_type+"_"+e.hardware_revision+"_"+e.firmware_revision),t},e.WeatherList.prototype._getListItemsForDeviceType=function(t){let a=null;return Object.prototype.hasOwnProperty.call(e.DeviceListItems,"location_item_list_configuration_json")&&Object.prototype.hasOwnProperty.call(e.DeviceListItems.location_item_list_configuration_json,t)&&(a=e.DeviceListItems.location_item_list_configuration_json[t]),a},e.WeatherList.prototype.update=function(a){const i=a[e.ObRecord.DeviceId];null!=i&&t.each(a,(function(e,a){const r=t("ul[data-device-id="+i+"] span[data-param=param-"+e+"]");r&&r.html(a)}))},e.WeatherList.prototype.doSummaryUpdate=function(){const e=this;this._getObservationsByLocation((function(t){e._updateSummary(t)}))},e.WeatherList.prototype._updateSummary=function(e){const a=this;t.each(e,(function(e,i){Object.prototype.hasOwnProperty.call(a.summaryMap,e)&&t.each(i,(function(i,r){if(Object.prototype.hasOwnProperty.call(a.listMap,i)){const n=a.listMap[i],s=Object.prototype.hasOwnProperty.call(n,"formatter")?n.formatter:null;let o=r;null!=s&&(o="timestamp"==i?s(r,a.stationTimezone):s(r)),t("ul[data-summary="+e+"] span[data-param="+i+"]").html(o)}t("ul[data-summary="+e+"]").show()}))}))},e.WeatherList.prototype.userPrecipRateTextAndValue=function(t){return new e.PrecipRateValue(t,1,e.user.userPrecipUnits()).textDisplayLocalizedWithRate()}}(window.SWD=window.SWD||{},jQuery),function(e,t){e.HistoryView=function(a,i){var r={devices:null,period:e.HistoryView.CAT_DAY,day:null,month:null,year:null,dayChanged:null,elevationForDevices:null};this.target=i,this.picker=null,this.filteredDevices=[],this.deviceData={},this.DATA_CLASS="history-device-data",this.currentDate=null,this.firstObDate=null,this.periodInfo={day:{data:"stats_day",time:null},week:{data:"stats_week",time:"stats_week_time"},month:{data:"stats_month",time:"stats_month_time"},year:{data:"stats_year",time:"stats_year_time"},alltime:{data:"stats_alltime",time:"stats_alltime_time"}},this.paramsByDevice={AR:["temp","humidity","pressure","lightning"],SK:["gust","rain","uv","solar-radiation","lux"],ST:["temp","humidity","pressure","lightning","gust","rain","uv","solar-radiation","lux"]},this.paramLabels={temp:{label:e.user.localize("GeneralTitleAirTemperature"),units:"°"+e.user.userTemperatureUnits().toUpperCase()},humidity:{label:e.user.localize("GeneralTitleHumidity"),units:"%"},pressure:{label:e.user.localize("GeneralTitlePressure"),units:e.user.userPressureUnits()},lightning:{label:e.user.localize("GeneralTitleLightning"),units:null},gust:{label:e.user.localize("GeneralTitleWind"),units:e.WindSpeedValue.DisplayUnits(e.user.userWindUnits())},rain:{label:e.user.localize("GeneralTitleRain"),units:null},uv:{label:e.user.localize("GeneralTitleUVIndex"),units:null},"solar-radiation":{label:e.user.localize("GeneralTitleSolarRadiation"),units:"W/m2"},lux:{label:e.user.localize("GeneralTitleBrightness"),units:"lux"}},this.settings=t.extend({},r,a);var n=this;this._filterDevices(),this._getDeviceData((function(){n._seedCustomDateSelectors(),n._initDate(),n.showHistory(),n._attachEventHandlers()}))},e.HistoryView.prototype._getDefaultDateForPeriod=function(){var t=null;switch(this._getPeriod()){case e.HistoryView.CAT_DAY:t=moment();break;case e.HistoryView.CAT_WEEK:t=moment().startOf("isoweek");break;case e.HistoryView.CAT_MONTH:t=moment().startOf("month");break;case e.HistoryView.CAT_YEAR:t=moment().startOf("year")}return t},e.HistoryView.prototype._setDate=function(t){var a=this._getPeriod();switch(a){case e.HistoryView.CAT_DAY:case e.HistoryView.CAT_WEEK:var i=this.picker.config(),r=a==e.HistoryView.CAT_WEEK;i.pickWholeWeek!=r&&(i.pickWholeWeek=r,this.picker.config(i)),this.picker.setDate(t.toDate());break;case e.HistoryView.CAT_MONTH:case e.HistoryView.CAT_YEAR:case e.HistoryView.CAT_ALL_TIME:var n=this._getStatsDateForPeriod(a,t);this.currentDate=t,this._setCustomDate(n),this.showHistory()}},e.HistoryView.prototype._attachEventHandlers=function(){var a=this;t("html").click((function(){a._hideCustomDateMenus()})),t("input:radio[name=period]").click((function(){var e=a.currentDate;a._setDate(e),a._showDateSelector()})),t("#custom-date").click((function(){var i=a._getPeriod();return i==e.HistoryView.CAT_MONTH?t("#date-list-months").toggleClass("show"):i==e.HistoryView.CAT_YEAR&&t("#date-list-years").toggleClass("show"),!1})),t("#date-lists").on("click","#date-list-years a, #date-list-months a",(function(){return a._setDate(moment(t(this).attr("data-date"))),a._hideCustomDateMenus(),!1})),t("#previous-day").click((function(){var e=a.currentDate,t=a._getPeriod();return e.subtract(1,t),a._setDate(e),!1})),t("#next-day").click((function(){var e=a.currentDate,t=a._getPeriod();return e.add(1,t),a._setDate(e),!1})),t("#close-date-selection").on("click",(function(e){e.preventDefault(),t("#date-list-months").hide(),t("#date-list-years").hide(),t("#next-day").focus()})),t('input[name="period"]').on("change",(function(){t('label[for^="period_"]').attr("aria-checked","false").attr("tabindex","0");var e=t('label[for="'+this.id+'"]');e.attr("aria-checked","true"),e.focus()}))},e.HistoryView.prototype._showDateSelector=function(){var a=this._getPeriod();switch(a){case e.HistoryView.CAT_DAY:case e.HistoryView.CAT_WEEK:this._showDatePicker();break;case e.HistoryView.CAT_MONTH:case e.HistoryView.CAT_YEAR:case e.HistoryView.CAT_ALL_TIME:this._showCustomDateSelector(a)}a==e.HistoryView.CAT_ALL_TIME?(t("#next-day").hide(),t("#previous-day").hide(),t("#date-selection").css("justify-content","center")):(t("#next-day").show(),t("#previous-day").show(),t("#date-selection").css("justify-content","space-between"))},e.HistoryView.prototype._showCustomDateSelector=function(a){t("#selected-date").hide(),a==e.HistoryView.CAT_YEAR?(t("#date-list-years").show(),t("#date-list-months").hide()):a==e.HistoryView.CAT_MONTH?(t("#date-list-months").show(),t("#date-list-years").hide()):a==e.HistoryView.CAT_ALL_TIME&&(t("#date-list-months").hide(),t("#date-list-years").hide()),t("#date-lists").show()},e.HistoryView.prototype._hideCustomDateSelector=function(){t("#date-lists, #date-list-months, #date-list-years").hide()},e.HistoryView.prototype._hideCustomDateMenus=function(){t("#date-list-months, #date-list-years").removeClass("show")},e.HistoryView.prototype._displaySelectedCustomDate=function(a){"All Time"===a?t("#custom-date").html(e.user.localize("HistoryRangeAllTime")):t("#custom-date").html(a)},e.HistoryView.prototype._showDatePicker=function(){this._hideCustomDateSelector(),t("#history-view .dd-list").removeClass("show"),t("#selected-date").show()},e.HistoryView.prototype._seedCustomDateSelectors=function(){var e={},a=[];t.each(this.deviceData,(function(e,t){({}).hasOwnProperty.call(t,"first_ob_day_local")&&null!=t.first_ob_day_local&&a.push(moment(t.first_ob_day_local))}));var i=moment.min(a),r=moment();for(i.startOf("month");i.isBefore(r);){var n=i.format("YYYY"),s=i.format("YYYY-MM-DD");null==e[n]&&(e[n]={yearStart:moment(i).startOf("year").format("YYYY-MM-DD"),months:[]}),e[n].months.push(s),i.add(1,"month")}var o="",l="";t.each(e,(function(e,t){o+="
  • "+e+"
  • ",l+="

    "+e+"

    ",l+="
    ";for(var a=0;a"+moment(t.months[a]).format("MMM")+"";l+="
    "})),t("#date-list-years").empty().append(o),t("#date-list-months").empty().append(l)},e.HistoryView.prototype._initDate=function(){var a=this,i=moment().add(1,"days"),r=this._getStatsDateForPeriod(this.settings.period,moment());this.settings.year=this.settings.year||r.format("YYYY"),this.settings.month=this.settings.month||r.format("MM"),this.settings.month=this.settings.month.padStart(2,"0"),this.settings.day=this.settings.day||r.format("DD"),this.settings.day=this.settings.day.padStart(2,"0"),this.settings.period=this.settings.period||e.HistoryView.CAT_DAY,this.currentDate=moment(this.settings.year+"-"+this.settings.month+"-"+this.settings.day),null!=this.currentDate&&this.currentDate.isValid()||(this.currentDate=moment(),this.settings.period=e.HistoryView.CAT_DAY,this._dateChanged(this.currentDate)),t("input[name=period][value="+this.settings.period+"]").prop("checked",!0),this.picker=new Pikaday({defaultDate:this.currentDate.toDate(),maxDate:i.toDate(),field:t("#selected-date")[0],firstDay:1,pickWholeWeek:this.settings.period==e.HistoryView.CAT_WEEK,format:moment.localeData().longDateFormat("L"),toString:function(t,a){return e.user.localizeDate(moment(t))},setDefaultDate:!0,onSelect:function(){var t=a._getPeriod();null!=moment&&(a.currentDate=a.picker.getMoment()),a.showHistory(),t==e.HistoryView.CAT_WEEK&&a._getWeekOfLabel()}}),this._setCustomDate(this.currentDate),this._showDateSelector()},e.HistoryView.prototype._getWeekOfLabel=function(){var a=this._getPeriod();if(a==e.HistoryView.CAT_WEEK){var i=this._getStatsDateForPeriod(a,this.currentDate),r=moment(i).add(6,"days");t("#selected-date").val(e.user.localizeDate(i)+" - "+e.user.localizeDate(r))}},e.HistoryView.prototype._setCustomDate=function(a){var i=this._getPeriod(),r=i==e.HistoryView.CAT_YEAR?"date-list-years":"date-list-months",n=null!=a?a.format("YYYY-MM-DD"):"";switch(t("#date-lists a").removeClass("selected"),""!=n&&t("#"+r+" a[data-date="+n+"]").addClass("selected"),i){case e.HistoryView.CAT_WEEK:this._getWeekOfLabel();break;case e.HistoryView.CAT_MONTH:this._displaySelectedCustomDate(a.format("MMMM YYYY"));break;case e.HistoryView.CAT_YEAR:this._displaySelectedCustomDate(a.format("YYYY"));break;case e.HistoryView.CAT_ALL_TIME:this._displaySelectedCustomDate("All Time")}},e.HistoryView.prototype._filterDevices=function(){if(null!=this.settings.devices)for(var e=0;e",n+="
    ",null!=u&&null!=u[s]){var p=!1;r=a==e.HistoryView.CAT_ALL_TIME?u.last_ob_day_local:r,this.firstObDate=a==e.HistoryView.CAT_ALL_TIME?u.first_ob_day_local:null;for(var h=0;h",n+="

    "+this.paramLabels[f].label+S+"

    ",n+="
    ",f){case"temp":n+=this._getTempHistory(_,T);break;case"humidity":n+=this._getHumidityHistory(_,T);break;case"pressure":n+=this._getPressureHistory(_,c.device_id,T);break;case"lightning":n+=this._getLightningHistory(_);break;case"gust":n+=this._getGustHistory(_,T);break;case"rain":n+=this._getRainHistory(c,_);break;case"uv":n+=this._getUVHistory(_,T);break;case"solar-radiation":n+=this._getSolarRadiationHistory(_,T);break;case"lux":n+=this._getLuxHistory(_,T)}n+="
    ",n+="
    "}}}p||(n+="

    "+e.user.localize("HistoryErrorMissingData")+"

    ")}n+=""}t(this.target).empty().append(n)},e.HistoryView.prototype._getObjectData=function(e,t){var a=null;return{}.hasOwnProperty.call(e,t)&&(a=e[t]),a},e.HistoryView.prototype.downloadData=function(t){var a,i,r=this,n=this._getPeriod();switch(n){case e.HistoryView.CAT_DAY:a=moment(this.currentDate).startOf("day"),i=moment(this.currentDate).endOf("day");break;case e.HistoryView.CAT_WEEK:a=moment(this.currentDate).startOf("isoweek"),i=moment(this.currentDate).endOf("isoweek");break;case e.HistoryView.CAT_MONTH:a=moment(this.currentDate).startOf("month"),i=moment(this.currentDate).endOf("month");break;case e.HistoryView.CAT_YEAR:a=moment(this.currentDate).startOf("year"),i=moment(this.currentDate).endOf("year");break;case e.HistoryView.CAT_ALL_TIME:a=moment(this.firstObDate),i=moment(this.currentDate)}var s={time_start:a.unix(),time_end:i.unix(),format:"csv"};e.makeDownloadRequest("observations/device/"+t,s,(function(e){""!=e?window.confirm("Are you sure you want to download observations for this device?")&&r.downloadFile(n+"-observations.csv","data:text/csv;charset=utf-8,"+encodeURIComponent(e)):alert("Server can't produce text/csv")}))},e.HistoryView.prototype.downloadFile=function(e,t){var a=document.createElement("a");a.download=e,a.href=t;var i=new MouseEvent("click");a.dispatchEvent(i)},e.HistoryView.prototype._getTempHistory=function(t,a){var i="",r=new e.TemperatureValue(this._getObjectData(t,e.ObservationRecord.TEMP_LOW),e.user.userTemperatureUnits()),n=new e.TemperatureValue(this._getObjectData(t,e.ObservationRecord.TEMP_HIGH),e.user.userTemperatureUnits()),s=new e.TemperatureValue(this._getObjectData(t,e.ObservationRecord.TEMP),e.user.userTemperatureUnits());return i+="
    ",i+=this._getLowLabel(),i+="

    "+r.displayValue()+"

    ",i+=this._getObTime(this._getObjectData(a,e.ObservationRecord.TEMP_LOW)),i+="
    ",i+="
    ",i+=this._getHighLabel(),i+="

    "+n.displayValue()+"

    ",i+=this._getObTime(this._getObjectData(a,e.ObservationRecord.TEMP_HIGH)),i+="
    ",i+="
    ",i+=this._getAverageLabel(),i+="

    "+s.displayValue()+"

    ",i+="
    "},e.HistoryView.prototype._getHumidityHistory=function(t,a){var i="",r=new e.HumidityValue(this._getObjectData(t,e.ObservationRecord.HUMIDITY_LOW)),n=new e.HumidityValue(this._getObjectData(t,e.ObservationRecord.HUMIDITY_HIGH)),s=new e.HumidityValue(this._getObjectData(t,e.ObservationRecord.HUMIDITY));return i+="
    ",i+=this._getLowLabel(),i+="

    "+r.displayValue()+"

    ",i+=this._getObTime(this._getObjectData(a,e.ObservationRecord.HUMIDITY_LOW)),i+="
    ",i+="
    ",i+=this._getHighLabel(),i+="

    "+n.displayValue()+"

    ",i+=this._getObTime(this._getObjectData(a,e.ObservationRecord.HUMIDITY_HIGH)),i+="
    ",i+="
    ",i+=this._getAverageLabel(),i+="

    "+s.displayValue()+"

    ",i+="
    "},e.HistoryView.prototype._getPressureHistory=function(t,a,i){var r="",n=0,s=new e.PressureValue(this._getObjectData(t,e.ObservationRecord.PRESSURE_LOW),e.user.userPressureUnits()),o=new e.PressureValue(this._getObjectData(t,e.ObservationRecord.PRESSURE_HIGH),e.user.userPressureUnits()),l=new e.PressureValue(this._getObjectData(t,e.ObservationRecord.PRESSURE),e.user.userPressureUnits());Object.prototype.hasOwnProperty.call(this.settings.elevationForDevices,a)&&null!=this.settings.elevationForDevices[a].total_elevation&&(n=this.settings.elevationForDevices[a].total_elevation);var c=s.calculateSeaLevelPressure(n),u=o.calculateSeaLevelPressure(n),d=l.calculateSeaLevelPressure(n);return r+="
    ",r+=this._getLowLabel(),r+="

    "+c[1]+"

    ",r+=this._getObTime(this._getObjectData(i,e.ObservationRecord.PRESSURE_LOW)),r+="
    ",r+="
    ",r+=this._getHighLabel(),r+="

    "+u[1]+"

    ",r+=this._getObTime(this._getObjectData(i,e.ObservationRecord.PRESSURE_HIGH)),r+="
    ",r+="
    ",r+=this._getAverageLabel(),r+="

    "+d[1]+"

    ",r+=this._getObTime(this._getObjectData(i,e.ObservationRecord.PRESSURE)),r+="
    "},e.HistoryView.prototype._getLightningHistory=function(t){var a="";return a+="
    ",a+=this._getStrikesLabel(),a+="

    "+this._getObjectData(t,e.ObservationRecord.STRIKE_COUNT)+"

    ",a+="
    "},e.HistoryView.prototype._getGustHistory=function(t,a){var i="",r=new e.WindSpeedValue(this._getObjectData(t,e.ObservationRecord.WIND_LULL),e.user.userWindUnits()),n=new e.WindSpeedValue(this._getObjectData(t,e.ObservationRecord.WIND_GUST),e.user.userWindUnits()),s=new e.WindValue(this._getObjectData(t,e.ObservationRecord.WIND_AVG),this._getObjectData(t,e.ObservationRecord.WIND_DIR),e.user.userWindUnits(),e.user.userDirectionUnits());return i+="
    ",i+=this._getLowLabel(),i+="

    "+r.displayValue()+"

    ",i+=this._getObTime(this._getObjectData(a,e.ObservationRecord.WIND_LULL)),i+="
    ",i+="
    ",i+=this._getHighLabel(),i+="

    "+n.displayValue()+"

    ",i+=this._getObTime(this._getObjectData(a,e.ObservationRecord.WIND_GUST)),i+="
    ",i+="
    ",i+=this._getAverageLabel(),i+="

    "+s.windDirectionDisplayValue()+" "+s.windSpeedDisplayValue()+"

    ",i+="
    "},e.HistoryView.prototype._getRainHistory=function(t,a){var i="",r=e.rainCheckEnabled(t),n=!1,s=(this._getObjectData(a,e.ObservationRecord.PRECIP_ANALYSIS_TYPE),this._getObjectData(a,e.ObservationRecord.PRECIP_ACCUM_TODAY_LOCAL)),o=this._getObjectData(a,e.ObservationRecord.PRECIP_MINS_TODAY_LOCAL);r&&null!=this._getObjectData(a,e.ObservationRecord.PRECIP_ACCUM_TODAY_LOCAL_FINAL)&&(s=this._getObjectData(a,e.ObservationRecord.PRECIP_ACCUM_TODAY_LOCAL_FINAL),n=!0),r&&null!=this._getObjectData(a,e.ObservationRecord.PRECIP_MINS_TODAY_LOCAL_FINAL)&&(o=this._getObjectData(a,e.ObservationRecord.PRECIP_MINS_TODAY_LOCAL_FINAL));var l=new e.PrecipValue(s,e.user.userPrecipUnits());return null==o&&(o="---"),i+="
    ",i+=this._getDurationLabel(),i+="

    "+o+"

    ",i+="
    ",i+="
    ",i+=this._getTotalLabel(),i+="

    "+l.displayValueIncludingTrace(),n&&(i+=""),i+="

    ",i+="
    ",n&&(i+="
    ",i+="
    "),i},e.HistoryView.prototype._getUVHistory=function(t,a){var i="";return i+="
    ",i+=this._getLowLabel(),i+="

    "+e.user.userUVDisplay(this._getObjectData(t,e.ObservationRecord.UV_LOW))+"

    ",i+=this._getObTime(this._getObjectData(a,e.ObservationRecord.UV_LOW)),i+="
    ",i+="
    ",i+=this._getHighLabel(),i+="

    "+e.user.userUVDisplay(this._getObjectData(t,e.ObservationRecord.UV_HIGH))+"

    ",i+=this._getObTime(this._getObjectData(a,e.ObservationRecord.UV_HIGH)),i+="
    ",i+="
    ",i+=this._getAverageLabel(),i+="

    "+e.user.userUVDisplay(this._getObjectData(t,e.ObservationRecord.UV))+"

    ",i+="
    "},e.HistoryView.prototype._getSolarRadiationHistory=function(t,a){var i="",r=null!=this._getObjectData(t,e.ObservationRecord.SOLAR_RADIATION_LOW)?this._getObjectData(t,e.ObservationRecord.SOLAR_RADIATION_LOW):"---",n=null!=this._getObjectData(t,e.ObservationRecord.SOLAR_RADIATION_HIGH)?this._getObjectData(t,e.ObservationRecord.SOLAR_RADIATION_HIGH):"---",s=null!=this._getObjectData(t,e.ObservationRecord.SOLAR_RADIATION)?this._getObjectData(t,e.ObservationRecord.SOLAR_RADIATION):"---";return i+="
    ",i+=this._getLowLabel(),i+="

    "+r+"

    ",i+=this._getObTime(this._getObjectData(a,e.ObservationRecord.SOLAR_RADIATION_LOW)),i+="
    ",i+="
    ",i+=this._getHighLabel(),i+="

    "+n+"

    ",i+=this._getObTime(this._getObjectData(a,e.ObservationRecord.SOLAR_RADIATION_HIGH)),i+="
    ",i+="
    ",i+=this._getAverageLabel(),i+="

    "+s+"

    ",i+="
    "},e.HistoryView.prototype._getLuxHistory=function(t,a){var i="",r=null!=this._getObjectData(t,e.ObservationRecord.LUX_LOW)?this._getObjectData(t,e.ObservationRecord.LUX_LOW):"---",n=null!=this._getObjectData(t,e.ObservationRecord.LUX_HIGH)?this._getObjectData(t,e.ObservationRecord.LUX_HIGH):"---",s=null!=this._getObjectData(t,e.ObservationRecord.LUX)?this._getObjectData(t,e.ObservationRecord.LUX):"---";return i+="
    ",i+=this._getLowLabel(),i+="

    "+r+"

    ",i+=this._getObTime(this._getObjectData(a,e.ObservationRecord.LUX_LOW)),i+="
    ",i+="
    ",i+=this._getHighLabel(),i+="

    "+n+"

    ",i+=this._getObTime(this._getObjectData(a,e.ObservationRecord.LUX_HIGH)),i+="
    ",i+="
    ",i+=this._getAverageLabel(),i+="

    "+s+"

    ",i+="
    "},e.HistoryView.prototype._getLowLabel=function(){return"

    "+e.user.localize("GeneralValueMin")+"

    "},e.HistoryView.prototype._getHighLabel=function(){return"

    "+e.user.localize("GeneralValueMax")+"

    "},e.HistoryView.prototype._getAverageLabel=function(){return"

    "+e.user.localize("GeneralValueAvg")+"

    "},e.HistoryView.prototype._getCountLabel=function(){return"

    "+e.user.localize("GeneralTextCount")+"

    "},e.HistoryView.prototype._getGustLabel=function(){return"

    "+e.user.localize("GeneralValueGust")+"

    "},e.HistoryView.prototype._getTotalLabel=function(){return"

    "+e.user.localize("GeneralValueTotal")+" - "+e.user.userPrecipUnits()+"

    "},e.HistoryView.prototype._getDurationLabel=function(){return"

    "+e.user.localize("GeneralValueDuration")+" - mins

    "},e.HistoryView.prototype._getStrikesLabel=function(){return"

    "+e.user.localize("GeneralValueStrikes")+"

    "},e.HistoryView.prototype._getObTime=function(t){return null!=t&&null!=t&&""!=t?"

    "+(this._getPeriod()==e.HistoryView.CAT_ALL_TIME?e.user.localizeDate(moment(t)):e.user.localizeDateNoYear(moment(t)))+"":""},e.HistoryView.prototype._dateChanged=function(e){if("function"==typeof this.settings.dayChanged){var t={period:this._getPeriod(),year:e.format("YYYY"),month:e.format("M"),day:e.format("D")};this.settings.dayChanged(t)}},e.HistoryView.prototype.destroy=function(e){null!=this.picker&&this.picker.destroy(),t("*",e).unbind()},e.HistoryView.CAT_DAY="day",e.HistoryView.CAT_WEEK="week",e.HistoryView.CAT_MONTH="month",e.HistoryView.CAT_YEAR="year",e.HistoryView.CAT_ALL_TIME="alltime"}(window.SWD=window.SWD||{},jQuery),function(e,t){e.Forecast=function(a,i){this.target=i,this.baseURL=null,this.unitsDisplay=null,this.isTime24HourFormat=this._isTime24HourFormat(),this.rapidWindLoaded=!1,this.windTypeAverage="avg",this.windTypeRapid="rapid",this.settings=t.extend({},{lat:null,lon:null,stationId:null,units_temp:null,units_wind:null,units_wind_dir:null,units_pressure:null,units_precip:null,units_distance:null,units_other:null,show_radar:null,source:null},a),this._attachEventHandlers(),this.rapidWindHelper=new e.RapidWind({rapidWindTarget:t("#cc-wind"),rapidWindBarParentElement:t("#forecast-ctn .cc-rapid-wind-bar"),rapidWindBarElement:t("#forecast-ctn .cc-rapid-wind"),directionElement:t("#forecast-ctn .wind-direction-icon"),units_wind:this.settings.units_wind,showScale:!1,showMinFill:!0})},e.Forecast.prototype._attachEventHandlers=function(){t(this.target).off(),t(this.target).on("click",".forecast-day",(function(){t(this).toggleClass("expanded"),t(".forecast-day-general",this).toggleClass("on-bg")})),t(this.target).on("click",".forecast-day td",(function(){return!1}))},e.Forecast.prototype.update=function(e){if(null!=e.type&&null!=e.type)switch(e.type){case"rapid_wind":this.rapidWindHelper.showRapidWind(e.rapid_wind_display,e.rapid_wind_dir_display,e.rapid_wind_timestamp);break;case"evt_strike":this._showLightningStrike(e.time)}else null!=e.client.base_url&&(this.baseURL=e.client.base_url),null!=e.units_display&&(this.unitsDisplay=e.units_display),this._drawForecast(e)},e.Forecast.prototype._drawForecast=function(e){this._update10DayForecast(e),this._updateCurrentConditions(e),this._drawStationMessage(e)},e.Forecast.prototype._updateStationMessage=function(t){if(null!=t.station.state)switch(t.station.state){case 1:this._showStationMessage(e.user.localize("GeneralWarningStationLate"),"warning");break;case 2:this._showStationMessage(e.user.localize("GeneralAlertStationOffline"),"alert");break;case 3:this._showStationMessage(e.user.localize("GeneralWarningDeviceLate"),"warning");break;case 4:this._showStationMessage(e.user.localize("GeneralAlertDeviceOffline"),"alert");break;default:this._hideStationMessage()}},e.Forecast.prototype._showStationMessage=function(e,a){t("#cc-station-message").html(e).attr("data-msg-level",a).show()},e.Forecast.prototype._hideStationMessage=function(){t("#cc-station-message p").html("").attr("data-msg-level","").hide()},e.Forecast.prototype._drawAQI=function(e){if(null!=e.current_conditions.aq){var a=e.current_conditions.aq,i="";switch(i+=""+a.category+"",i+="AQI("+a.scale.short_name+")",i+="

    ",t("#aqi-display",this.target).empty().append(i),a.category){case"Good":t(".square").css({background:"#00E400"});break;case"Moderate":t(".square").css({background:"#FFFF00"});break;case"Unhealthy for Sensitive Groups":t(".square").css({background:"#FF7E00"});break;case"Unhealthy":t(".square").css({background:"#FF0000"});break;case"Very Unhealthy":t(".square").css({background:"#8F3F97"});break;case"Hazardous":t(".square").css({background:"#7E0023"})}var r=t(".square")[0];this._setAQI(r,a)}else t("#aqi-display").css({display:"none"})},e.Forecast.prototype._setAQI=function(e,t){const a=t.aqi,i=t.scale.display_max,r=Number(100*(a-0)/(i-0));e.textContent=t.aqi,e.style.left=`calc(${r}% - 14px)`},e.Forecast.prototype._drawHourlyForecast=function(e,a,i){t(e).is(":empty")?t(e,this.target).empty().append(this._getHourlyForecast(a,i)):this._updateHourlyForecast(e,a,i)},e.Forecast.prototype._getHourlyForecast=function(e,t){for(var a=[],i=[],r=[],n=[],s=[],o=0;o"+this._getHourlyValue(l.time,t)+""),r.push(""+this._getSkyValue(l.icon)+""),i.push(""+this._getTempValue(l.air_temperature)+""),n.push(""+this._getPrecipValues(l.precip_probability,l.precip_icon)+""),s.push(""+this._getWindValue(l.wind_avg,l.wind_direction_icon)+"")}var c="";return c+=""+a.join("")+"",c+=""+r.join("")+"",c+=""+i.join("")+"",c+=""+n.join("")+"",c+=""+s.join("")+"",c+="
    "},e.Forecast.prototype._updateHourlyForecast=function(e,a,i){for(var r=0;r0||a.current_conditions.precip_accum_local_day>0)?this._showConditionalParams():this._hideConditionalParams()},e.Forecast.prototype._showRadar=function(a){const i=this;let r=e.user.userMiniMapOptions(),n=!1,s=null;r||(r={mini_map:"auto",percent_chance:0});const o=r.mini_map,l=parseInt(r.percent_chance,10)||0;if("always"===o){if(a.forecast.hourly&&Array.isArray(a.forecast.hourly)){let e=!0;for(let t=0;t0){e=!1;break}}s=e?"none":a.forecast.hourly[0].precip_type}n=!0}else if("never"===o)n=!1;else if("auto"===o&&a.forecast.hourly&&Array.isArray(a.forecast.hourly)){for(let e=0;el){n=!0;break}}else if(i>=l){n=!0;break}}s=a.forecast.hourly[0].precip_type}a.forecast.hourly[0]&&"function"==typeof i.settings.show_radar&&(n?i.settings.show_radar(s):t("#radar-map-ctn").hide())},e.Forecast.prototype._showConditionalParams=function(){t(".cc-conditional-param").show()},e.Forecast.prototype._hideConditionalParams=function(){t(".cc-conditional-param").hide()},e.Forecast.prototype._showLightningStrike=function(a){var i=this._isActiveLightning(a)?"active-lightning lightning-event":"",r=t("#cc-lightning").attr("data-lightning-timestamp"),n=new e.TimestampValue(a,e.user.localize("GeneralValueRainNone"));a>(r=null==r?0:r)&&t("#cc-lightning").attr("data-lightning-timestamp",a).removeClass("lightning-event").addClass(i),t("span[data-param='lightning_strike_3hr_last_epoch'").html(n.localFuzzyTime(!1))},e.Forecast.prototype.hideRapidWind=function(){this.rapidWindHelper.hideRapidWind()},e.Forecast.prototype._isActiveLightning=function(t){var a=!1;return new e.TimestampValue(t).minutesAgo()<=5&&(a=!0),a},e.Forecast.prototype._drawStationMessage=function(e){var a="";(null!=e.forecast_message&&null!=e.forecast_message&&(a+="

    "+e.forecast_message+"

    "),this._hasValue(e.source_id))&&(a+="

    "+(e.source_id+"").padStart(3,"0")+"

    ");t("#station-message",this.target).empty().append(a)},e.Forecast.prototype._getRainCheckClass=function(e){var t="";return e&&(t="raincheck"),t},e.Forecast.prototype._getPressureClass=function(e){return"pressure-"+e},e.Forecast.prototype._getCurrentForecastDay=function(e){var t=null;return null!=e.forecast.daily&&Array.isArray(e.forecast.daily)&&e.forecast.daily.length>0&&(t=e.forecast.daily[0]),t},e.Forecast.prototype._getForecastHoursForDay=function(e,t,a){var i=[];if(null!=e.forecast.hourly&&null!=e.forecast.hourly&&Array.isArray(e.forecast.hourly))for(var r=new moment.unix(t).tz(a),n=r.format("DDD"),s=r.add(1,"days").format("DDD"),o=0,l=0;l"),t},e.Forecast.prototype._getPrecipValues=function(e,t){var a="";return e=this._getValue(e),t=this._getValue(t),null!=e&&(a+="

    "+e+"%

    "),a},e.Forecast.prototype._getWindValue=function(e,t){var a="";return e=this._getValue(e),t=this._getValue(t),null!=e&&(a+="

    "+e+"

    "),a},e.Forecast.prototype._getSunriseSunset=function(e,t){var a="";return""!=e&&(a="
    "+e+"
    "),""!=t&&(a=a+"
    "+t+"
    "),a},e.Forecast.prototype._getValue=function(e){return this._hasValue(e)?e:null},e.Forecast.prototype._getValueWithUnits=function(e,t,a){return this._hasValue(e)?e+(a=null!=a?a:"")+(t=null!=t&&""!=t?" "+t:""):null},e.Forecast.prototype._hasValue=function(e){var t=!1;return null!=e&&null!=e&&(t=!0),t},e.Forecast.prototype._getPercentage=function(e){return null!=e&&null!=e?e+"%":e},e.Forecast.prototype._getTempValueWithDegress=function(e){return null!=e&&null!=e?e+"°":e},e.Forecast.prototype._getHumidityValueWithPercentSign=function(e){return null!=e&&null!=e?e+"%":e},e.Forecast.prototype._getIconURL=function(e){if(null!=e&&null!=e)return"/images/Updated/"+(e=e.replace("cc-",""))+".svg"},e.Forecast.prototype._getAriaLabel=function(e){return e.replace(/-/g," ")},e.Forecast.prototype._getDisplayUnit=function(e){var t="";return null!=this.unitsDisplay&&null!=this.unitsDisplay[e]&&(t=this.unitsDisplay[e]),t},e.Forecast.prototype._isTime24HourFormat=function(){let t=!1;return t="12"!==e.user.userTimeUnits(),t},e.Forecast.prototype._displayBlending=function(e){if(null!=e.debug.blender_log&&null!=e.debug.blender_log){for(var a="",i=0;i"+e.debug.blender_log[i]+"

    ";t("#blending-debug").empty().append(a).show()}else t("#blending-debug").hide()},e.Forecast.prototype._formatPrecipAccum=function(t,a,i){return e.PrecipValue.isTrace(t,i._getDisplayUnit(a))?"Trace":i._getValueWithUnits(e.PrecipValue.round(t,i._getDisplayUnit(a)),i._getDisplayUnit(a))},e.Forecast.prototype.changeLocation=function(){null!=this.rapidWindHelper&&this.rapidWindHelper.reset()},e.Forecast.TEMP_UNIT="units_temp",e.Forecast.WIND_UNIT="units_wind",e.Forecast.PRECIP_UNIT="units_precip",e.Forecast.PRESSURE_UNIT="units_pressure",e.Forecast.DISTANCE_UNIT="units_distance",e.Forecast.BRIGHTNESS_UNIT="units_brightness",e.Forecast.SOLAR_RADIATION_UNIT="units_solar_radiation",e.Forecast.AIR_DENSITY_UNIT="units_air_density"}(window.SWD=window.SWD||{},jQuery),String.prototype.padStart||(String.prototype.padStart=function(e,t){return e>>=0,t=String(void 0!==t?t:" "),this.length>e?String(this):((e-=this.length)>t.length&&(t+=t.repeat(e/t.length)),t.slice(0,e)+String(this))}),String.prototype.repeat||(String.prototype.repeat=function(e){"use strict";if(null==this)throw new TypeError("can't convert "+this+" to object");var t=""+this;if((e=+e)!=e&&(e=0),e<0)throw new RangeError("repeat count must be non-negative");if(e==1/0)throw new RangeError("repeat count must be less than infinity");if(e=Math.floor(e),0==t.length||0==e)return"";if(t.length*e>=1<<28)throw new RangeError("repeat count must not overflow maximum string size");var a=t.length*e;for(e=Math.floor(Math.log(e)/Math.log(2));e;)t+=t,e--;return t+=t.substring(0,a-t.length)}),function(e){e.WUForecastTable=function(t,a){var i={key:"f972417f7cd0272a",coords:null,locationId:null,numDays:5,tempUnit:e.TemperatureUnit.FAHRENHEIT,autoUpdate:!0};this.target=a,this.timeout=null,this.settings=$.extend({},i,t),this._getForecastData()},e.WUForecastTable.prototype._getForecastData=function(){if(Object.prototype.hasOwnProperty.call(this.settings.coords,"lat")&&Object.prototype.hasOwnProperty.call(this.settings.coords,"lon")){var t=this,a={lat:this.settings.coords.lat,lon:this.settings.coords.lon,station_id:this.settings.locationId,units_temp:e.user.userTemperatureUnits(),units_wind:e.user.userWindUnits(),units_pressure:e.user.userPressureUnits(),units_distance:e.user.userDistanceUnits(),units_precip:e.user.userPrecipUnits(),units_other:e.user.userOtherUnits(),units_direction:e.user.userWindUnits()};e.makeRequest("better_forecast",a,(function(a){null!=a.status&&null!=a.status.status_code&&0==a.status.status_code&&null!=a.forecast.daily?t._draw(a.forecast.daily,a.timezone,a.client.base_url):$(t.target).empty().append("

    "+e.user.localize("WeatherUndergroundErrorForecastFailed")+"

    ")}))}},e.WUForecastTable.prototype._draw=function(t,a,i){var r="
    ";if(t instanceof Array){for(var n=this.settings.numDays>t.length?t.length:this.settings.numDays,s=0;s",r+="
    ",r+="
    ",r+="
    ",r+="

    "+l+"° / "+c+"°

    ",r+="
    ",r+="",r+=""}r+="",r+="",$(this.target).empty().append(r).attr("data-wu-table-timestamp",(new Date).getTime()),$(".wu-forecast").scrollbar({ignoreMobile:!0}),this.settings.autoUpdate&&this._setUpdater()}},e.WUForecastTable.prototype._attachEventHandlers=function(){var e=Util._getDocumentHiddenProp();if(e){var t=this,a=e.replace(/[H|h]idden/,"")+"visibilitychange";document.addEventListener(a,(function(){if(!Util.isDocumentHidden()){var e=$(t.target).attr("data-wu-table-timestamp");if(e){(new Date).getTime()-e>=108e5&&(clearTimeout(t.timeout),t.refresh())}}}))}},e.WUForecastTable.prototype.refresh=function(){this._getForecastData()},e.WUForecastTable.prototype._setUpdater=function(){var e=this;this.timeout=setTimeout((function(){e.refresh()}),36e5)},e.WUForecastTable.prototype._getShareInfo=function(){if(null!=this.settings.locationId){var t=this,a={location_id:this.settings.locationId};e.makeRequest("location_share",a,(function(e){if(Object.prototype.hasOwnProperty.call(e,"status")&&Object.prototype.hasOwnProperty.call(e.status,"status_code")&&0==e.status.status_code&&Object.prototype.hasOwnProperty.call(e,"location_shares")&&null!=e.location_shares)for(var a=0;a"+e.user.localize("StatusTitleHub")+a+"");else{var s=i._getRow("hub",t,a);null!=s&&r.push(s)}}))})),null!=a.devices)for(var n=0;n"+r+""):null!=(o=i._getRow("device",t,r,a.devices[n].serial_number,a.devices[n].state,a.devices[n].sensor_status))&&s.push(o))}))})),r=r.concat(s)}t(this.settings.target).html("
      "+r.join("")+"
    ")},e.Diagnostics.prototype._attachEventhandlers=function(){t("body").on("click",".power-save-mode-icon",(function(){t("#power-save-dialog").show(),t("#power-save-message").html(e.user.localize("GeneralPowerSaveMessageBattery"))})),t("body").on("click","#power-save-dialog-close",(function(e){e.stopPropagation(),t("#power-save-dialog").hide()})),t("body").on("click",".grid-stripe-item > .lv-value-display.sensor-fail",(function(){window.open("https://help.tempest.earth/hc/en-us/articles/360050786593#h_01FF0NCNQMK0VCA0AWKJ6V0H8F","_blank")}))},e.Diagnostics.prototype._getRow=function(e,t,a,i,r,n){var s=null;if(-1==this.excludedKeys.indexOf(t)&&null!=this.displayFields[e][t]){var o=Object.prototype.hasOwnProperty.call(this.displayFields[e],t)?this.displayFields[e][t]:{},l=null!=o.label?o.label:t;switch(t){case"state":s=this._initState(o,e,a,null,null);break;case"voltage":s=this._initBattery(o,l,a,r,i,n);break;case"sensor_status":s=this._initSensorStatus(o,r,l,a,null,null);break;case"cell_rssi":s=this._initCellularStatus(o,l,a);break;case"rssi":case"uptime":s="
  • "+l+""+(null!=o.formatter?o.formatter(a,r):a)+"
  • ";break;default:s="
  • "+l+""+(null!=o.formatter?o.formatter(a,this.settings.timezone,r):a)+"
  • "}}return s},e.Diagnostics.prototype._calculateUptime=function(e,t){if("offline"!==t){var a=[],i=e/86400>>0,r=e%86400,n=r/3600>>0,s=r%3600,o=s/60>>0,l=s%60;return a.push(i+"d"),a.push(n+"h"),a.push(o+"m"),a.push(l+"s"),a.join(" ")}return"---"},e.Diagnostics.prototype._getSensorStatus=function(t){var a=[];return 0==t?a.push("Good"):(0!=(t&e.Diagnostics.SENSOR_STATUS_FLAGS.AIR_LIGHTNING_FAILED)&&a.push(e.user.localize("StatusTextLightningFailed")),0!=(t&e.Diagnostics.SENSOR_STATUS_FLAGS.AIR_LIGHTNING_NOISE)&&a.push(e.user.localize("StatusTextLightningNoise")),0!=(t&e.Diagnostics.SENSOR_STATUS_FLAGS.AIR_PRESSURE_FAILED)&&a.push(e.user.localize("StatusTextPressureFailed")),0!=(t&e.Diagnostics.SENSOR_STATUS_FLAGS.AIR_TEMPERATURE_FAILED)&&a.push(e.user.localize("StatusTextTemperatureFailed")),0!=(t&e.Diagnostics.SENSOR_STATUS_FLAGS.AIR_RH_FAILED)&&a.push(e.user.localize("StatusTextRHFailed")),0!=(t&e.Diagnostics.SENSOR_STATUS_FLAGS.SKY_WIND_FAILED)&&a.push(e.user.localize("StatusTextWindFailed")),0!=(t&e.Diagnostics.SENSOR_STATUS_FLAGS.SKY_PRECIP_FAILED)&&a.push(e.user.localize("StatusTextPrecipFailed")),0!=(t&e.Diagnostics.SENSOR_STATUS_FLAGS.SKY_LIGHT_UV_FAIL)&&a.push(e.user.localize("StatusTextUVFailed"))),0==a.length&&a.push(e.user.localize("StatusTextGood")),a.join(", ")},e.Diagnostics.prototype.getLocationStatus=function(){var t="",a=this.isStationOffline;return null!=a&&0==a?t=e.user.userLocationStatusDisplay("online"):null!=a&&1==a?t=e.user.userLocationStatusDisplay("offline"):null==a&&(t=e.user.userLocationStatusDisplay("offline")),t},e.Diagnostics.prototype.getLocationName=function(){var e="";return null!=this.data&&null!=this.data.name&&(e=this.data.name),e},e.Diagnostics.prototype.isStationWiFiSetup=function(){var e=!0;return null!=this.data&&(null!=this.data.last_status_received_timestamp&&null!=this.data.last_status_received_timestamp||(e=!1)),e},e.Diagnostics.prototype._getPowerMode=function(t,a){return"offline"!==a?0!=(t&e.Diagnostics.SENSOR_STATUS_FLAGS.LOW_POWER_MODE2)&&0!=(t&e.Diagnostics.SENSOR_STATUS_FLAGS.LOW_POWER_MODE3)?5:0==(t&e.Diagnostics.SENSOR_STATUS_FLAGS.LOW_POWER_MODE2)&&0==(t&e.Diagnostics.SENSOR_STATUS_FLAGS.LOW_POWER_MODE3)||0!=(t&e.Diagnostics.SENSOR_STATUS_FLAGS.LOW_POWER_MODE1)?0:2:9},e.Diagnostics.prototype.getDevicePowerSaveModeInfo=function(){var e={};if(null!=this.data&&null!=this.data.devices)for(var t=0;t-1&&(e[a.device_id]=this._getPowerMode(a.sensor_status,a.state))}return e},e.Diagnostics.prototype.getDevicePowerSaveMode=function(e){var t=null;if(null!=this.data&&null!=this.data.devices)for(var a=0;a-1){t=this._getPowerMode(i.sensor_status,i.state);break}}return t},e.Diagnostics.prototype.getBatteryStatus=function(){var t=[];if(null!=this.data&&null!=this.data.devices)for(var a=0;a-1){var r=this._getPowerMode(i.sensor_status,i.state),n=null;if(null!=r)switch(r){case 2:n=e.user.localize("StatusTextBatteryPowerSave");break;case 4:n=e.user.localize("StatusTextBatteryGood");break;case 5:n=e.user.localize("StatusTextBatteryEco");break;case 9:n="---";break;default:n=e.user.localize("StatusTextBatteryGood")}else n=0===this.data.status.status_code&&null!==this.data.devices?e.user.localize("StatusTextBatteryGood"):(null==this.data||this.data.status,"---");t.unshift(n)}}return t},e.Diagnostics.prototype._initState=function(t,a,i){var r=null!=t.formatter?t.formatter(a,i):i,n="https://got.wf/troubleshoothub";"hub"==a&&"offline"==i||"hub"==a&&"---"==i?this.hubOffline=!0:"device"==a&&"offline"==i&&(this.deviceOffline=!0),0==this.hubOffline&&1==this.deviceOffline&&(n="https://got.wf/troubleshoottempest");var s=`${e.user.localize("StatusButtonTroubleshoot")}`;return`\n\t\t\t
  • \n\t\t\t${t.label}\n\t\t\t
    \n\t\t\t\t${(()=>"offline"==i&&r.indexOf("Use the troubleshooting tips")>-1?"":"online"==i?"":"device"==a&&this.hubOffline&&this.deviceOffline?e.user.localize("StatusMessageTroubleshootDevice"):s)()}\n\t\t\t
    \n\t\t\t\n\t\t\t\t\n\t\t\t\t${r}\n\t\t\t\n\t\t\t
  • \n\t\t`},e.Diagnostics.prototype._initBattery=function(t,a,i,r,n,s){var o,l="";if(n.indexOf("ST")>-1){var c=this._getPowerMode(s,r);o=null!=t.formatter?null==c?t.formatter(i,!1):t.formatter(c,!0):i}else n.indexOf("AR")>-1?o=i>2.4?e.user.localize("StatusTextBatteryGood"):e.user.localize("StatusTextBatteryReplace"):n.indexOf("SK")>-1&&(o=i>2.7?e.user.localize("StatusTextBatteryGood"):e.user.localize("StatusTextBatteryReplace"));return l=o.indexOf("Power Save")>-1?"block":"none",`\n\t\t\t
  • \n\t\t\t${a}\n\t\t\t\t\n\t\t\t\t\t${this.settings.userOwnsStation?``:""}\n\t\t\t\t\t${"---"==o?o+"":o+" ("+i.toFixed(2)+"v)"}\n\t\t\t\t\n\t\t\t
  • \n\t\t`},e.Diagnostics.prototype._initSensorStatus=function(t,a,i,r){var n,s="",o="lv-value-display";return(n="offline"===a?"---":null!=t.formatter?t.formatter(r,this.settings.timezone):r).indexOf(e.user.localize("StatusTextGood"))>-1?s="none":(s="block",o="lv-value-display sensor-fail"),`\n\t\t\t\t
  • \n\t\t\t\t${i}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t${n}\n\t\t\t\t\t\n\t\t\t\t
  • \n\t\t\t`},e.Diagnostics.prototype._initCellularStatus=function(t,a,i){let r,n=this.data.cellular_status,s="offline";if(-1!==n)return 6!==n&&7!==n||!1!==this.hubOffline?r=e.user.localize("StatusTextNoSignal"):(s="online",r=null!=t.formatter?t.formatter(i,n):i),`\n\t\t\t
  • \n\t\t\t${a}\n\t\t\t\n\t\t\t\t\n\t\t\t\t${r}\n\t\t\t\n\t\t\t
  • \n\t\t`},e.Diagnostics.SENSOR_STATUS_FLAGS={SENSORS_OK:0,AIR_LIGHTNING_FAILED:1,AIR_LIGHTNING_NOISE:2,AIR_LIGHTNING_DISTURBER:4,AIR_PRESSURE_FAILED:8,AIR_TEMPERATURE_FAILED:16,AIR_RH_FAILED:32,SKY_WIND_FAILED:64,SKY_PRECIP_FAIL:128,SKY_LIGHT_UV_FAIL:256,ROCKET_DETECTED:512,ROCKET_ENABLED:1024,LOW_POWER_MODE1:2048,LOW_POWER_MODE2:4096,LOW_POWER_MODE3:8192,LOW_POWER_MODE4:1048576,LOW_POWER_MODE5:2097152,SERIAL_ENABLED:16384}}(window.SWD=window.SWD||{},jQuery),function(e,t){e.Graph=function(e,a){this.target=a,this.d3Graph=null,this.data=null,this.requestingData=!1,this.bucket=null,this.graphTarget=null,this.mainYAxisTarget=null,this.secondaryYAxisTarget=null,this.refreshNeeded=!1,this.xDomain=null,this.zoomSteps=[1,5,30,180,1440],this.settings=t.extend({},{device:null,deviceName:null,graphType:null,powerSaveMode:null,stationTimezone:null,zoomChanged:null,zoom:1},e),this.scrollPosition=null,this._init(),this._attachEventHandlers()},e.Graph.prototype._init=function(){t(this.target).empty(),null!=this.settings.device&&(t("#graph-parameter").html(this._getGraphTitle()),this._showPowerSaveIcon(),this.bucket=this._getBucket(),this._draw(),this._getData())},e.Graph.prototype._showPowerSaveIcon=function(){null!=this.settings.powerSaveMode?t("#graph-parameter-ctn .power-save-mode-icon").attr("data-tile",this.settings.powerSaveMode).show():t("#graph-parameter-ctn .power-save-mode-icon").attr("data-tile","").hide()},e.Graph.prototype._getData=function(){var e=this,t=this._getGraphInfoByZoomLevel();null!=t.evtType&&null!=t.evtType?this._getEventData(t,(function(a){if(null!=a[t.evtType]&&null!=a[t.evtType]){a.bucket_step_minutes=t.bucketMins;var i=e._processEventData(a[t.evtType]);e._initGraph(a,i,t)}else e._showNoObsMessage()})):this._getObservationData(t,(function(a){if(null!=a.obs&&null!=e.settings.graphType){var i=e._processData(a.obs,a.bucket_step_minutes);e._initGraph(a,i,t)}else e._showNoObsMessage()}))},e.Graph.prototype._initGraph=function(a,i,r){var n=this;if(this.data=a,this.xDomain=[1e3*r.startTime,1e3*r.endTime],this._clearNoObsMessage(),null==this.d3Graph){var s=this._getGraphLineSettings(r.bucket);this._drawLegend(s),this.d3Graph=new e.D3Graph({lineData:i,lines:s,bucketTimeStep:a.bucket_step_minutes,xIndex:e.ObservationRecord.TIMESTAMP,xAxisDomain:this.xDomain,yAxes:this._getGraphYAxisSettings(),graphDrawn:function(){var e=null!=n.scrollPosition?n.scrollPosition:t(n.graphTarget)[0].scrollWidth;t(n.graphTarget).scrollLeft(e),n.scrollPosition=null},graphHover:function(e,t){n._graphHover(e,t)},stationTimezone:this.settings.stationTimezone},this.graphTarget)}else this.d3Graph.update(i,a.bucket_step_minutes,this.xDomain,!0)},e.Graph.prototype._getObservationData=function(t,a){var i={device_id:this.settings.device.device_id,bucket:t.bucket,time_start:t.startTime,time_end:t.endTime};this.requestingData=!0,e.makeRequest("observations",i,(function(e){self.requestingData=!1,"function"==typeof a&&a(e)}))},e.Graph.prototype._getEventData=function(t,a){var i={device_id:this.settings.device.device_id,time_start:t.startTime,time_end:t.endTime,types:t.evtType};this.requestingData=!0,e.makeRequest("events/device/"+this.settings.device.device_id,i,(function(e){self.requestingData=!1,"function"==typeof a&&a(e)}))},e.Graph.prototype._draw=function(){t(this.target).attr("data-graph-type",this.settings.graphType),this.mainYAxisTarget=t("
    ").appendTo(this.target),this.graphTarget=t("
    ").appendTo(this.target),t(this.target).append("
    "+e.user.localize("GraphTitleNewData")+"
    "),this._hasDualYAxis()&&(this.secondaryYAxisTarget=t("
    ").appendTo(this.target))},e.Graph.prototype._attachEventHandlers=function(){var e=this;t("#graph-zoom-out").on("click touchend",(function(){return e._zoomOut(),!1})),t("#graph-zoom-in").on("click touchend",(function(){return e._zoomIn(),!1})),t("#new-obs").on("click touchend",(function(){t(e.graphTarget).animate({scrollLeft:t(e.graphTarget)[0].scrollWidth},800),t(this).removeClass("show")})),t(this.graphTarget).on("scroll",(function(){t(this).scrollLeft()+t(this).width()>=t(this)[0].scrollWidth&&t("#new-obs").removeClass("show")}))},e.Graph.prototype._getGraphInfoByZoomLevel=function(){var t={endTime:moment.utc().unix(),evtType:null,startTime:null,bucket:null};switch(this._getZoom()){case 1:t.bucket="a",t.bucketMins=1,t.startTime=moment.utc().subtract(1,"days").unix();break;case 2:t.bucket="b",t.bucketMins=5,t.startTime=moment.utc().subtract(5,"days").unix();break;case 3:t.bucket="c",t.bucketMins=30,t.startTime=moment.utc().subtract(30,"days").unix();break;case 4:t.bucket="d",t.bucketMins=180,t.startTime=moment.utc().subtract(180,"days").unix();break;case 5:t.bucket="e",t.bucketMins=1440,t.startTime=moment.utc().subtract(3,"years").unix()}switch(this.settings.graphType){case e.Graph.LIGHTNING:t.evtType="evt_strike"}return t},e.Graph.prototype._getGraphYAxisSettings=function(){switch(this.settings.graphType){case e.Graph.WIND:return{main:{formatter:this.windspeedFormatter,target:this.mainYAxisTarget,label:this._getGraphYTitle()}};case e.Graph.TEMP:return{main:{formatter:this.tempFormatter,target:this.mainYAxisTarget,label:this._getGraphYTitle()}};case e.Graph.HUMIDITY:return{main:{formatter:function(e){return e},target:this.mainYAxisTarget,label:this._getGraphYTitle()}};case e.Graph.PRESSURE:return{main:{formatter:this.pressureFormatter,target:this.mainYAxisTarget,d3Format:d3.format(".1f"),label:this._getGraphYTitle()}};case e.Graph.LIGHTNING:return{main:{formatter:this.lightningFormatter,target:this.mainYAxisTarget,label:this._getGraphYTitle(),minValue:0,maxValue:e.user.userDistanceUnits()==e.DistanceUnit.MILES?30:45}};case e.Graph.STRIKE_COUNT:return{main:{formatter:this.defaultFormatter,target:this.mainYAxisTarget,label:this._getGraphYTitle(),d3Format:d3.format("d"),minTickStep:1}};case e.Graph.RAIN:return{main:{formatter:function(t,a){return e.user.userRainAccumulationDisplay(t,!1)},target:this.mainYAxisTarget,label:this._getGraphYTitle()},secondary:{formatter:function(t,a){var i=0;switch(t){case e.PrecipRateValue.VERY_LIGHT:i=1;break;case e.PrecipRateValue.LIGHT:i=2;break;case e.PrecipRateValue.MODERATE:i=3;break;case e.PrecipRateValue.HEAVY:i=4;break;case e.PrecipRateValue.VERY_HEAVY:i=5;break;case e.PrecipRateValue.EXTREME:i=6;break;default:i=0}return i},target:this.secondaryYAxisTarget,label:"",d3Format:function(e){return""},minValue:0,maxValue:6}};case e.Graph.RAIN_RATE:var t=this;return{main:{formatter:function(a,i){return"accumulation"==i.name?e.user.userRainAccumulationDisplay(a,!1):t.precipRateFormatter(a,!1)},target:this.mainYAxisTarget,label:this._getGraphYTitle()}};case e.Graph.UV:return{main:{formatter:this.uvFormatter,target:this.mainYAxisTarget,label:this._getGraphYTitle()}};case e.Graph.SOLAR_RADIATION:case e.Graph.BRIGHTNESS:return{main:{formatter:this.defaultFormatter,target:this.mainYAxisTarget,label:this._getGraphYTitle()}};case e.Graph.BATTERY:return{main:{formatter:this.defaultFormatter,target:this.mainYAxisTarget,d3Format:d3.format(".2f"),label:this._getGraphYTitle(),minValue:1.6,maxValue:3.7,doNice:!1}}}},e.Graph.prototype._getGraphLineSettings=function(t){switch(this.settings.graphType){case e.Graph.WIND:return[{name:"avg",fill:!0,yIndex:e.ObservationRecord.WIND_AVG,yAxis:e.D3Graph.YAXIS_MAIN,type:e.D3Graph.TYPE_LINE,formatter:this.windspeedTooltipFormatter,legendLabel:e.user.localize("GeneralValueAvg")},{name:"gust",yIndex:e.ObservationRecord.WIND_GUST,yAxis:e.D3Graph.YAXIS_MAIN,type:e.D3Graph.TYPE_LINE,formatter:this.windspeedTooltipFormatter,legendLabel:e.user.localize("GeneralValueGust")},{name:"lull",yIndex:e.ObservationRecord.WIND_LULL,yAxis:e.D3Graph.YAXIS_MAIN,type:e.D3Graph.TYPE_LINE,formatter:this.windspeedTooltipFormatter,legendLabel:e.user.localize("GeneralValueLull")},{name:"wind-arrow",yIndex:e.ObservationRecord.WIND_DIR,type:e.D3Graph.TYPE_WIND_ARROW,formatter:null}];case e.Graph.TEMP:return"e"==t?[{name:"temp",yIndexHigh:e.ObservationRecord.TEMP_HIGH,yIndexLow:e.ObservationRecord.TEMP_LOW,yIndexAvg:e.ObservationRecord.TEMP,yAxis:e.D3Graph.YAXIS_MAIN,type:e.D3Graph.TYPE_CANDLESTICK,formatter:e.user.userTemperatureDisplay,legendLabel:e.user.localize("GraphValueTemp"),order:0}]:[{name:"dew-point",yIndex:e.ObservationRecord.DEW_POINT,yAxis:e.D3Graph.YAXIS_MAIN,type:e.D3Graph.TYPE_LINE,formatter:e.user.userTemperatureDisplay,tooltipLabel:e.user.localize("GeneralTitleDewPoint")+":",legendLabel:e.user.localize("GeneralTitleDewPoint"),order:1},{name:"temp",yIndex:e.ObservationRecord.TEMP,yAxis:e.D3Graph.YAXIS_MAIN,type:e.D3Graph.TYPE_LINE,formatter:e.user.userTemperatureDisplay,tooltipLabel:e.user.localize("GraphValueTemp")+":",legendLabel:e.user.localize("GraphValueTemp"),order:0}];case e.Graph.HUMIDITY:return"e"==t?[{name:"humidity",yIndexHigh:e.ObservationRecord.HUMIDITY_HIGH,yIndexLow:e.ObservationRecord.HUMIDITY_LOW,yIndexAvg:e.ObservationRecord.HUMIDITY,yAxis:e.D3Graph.YAXIS_MAIN,type:e.D3Graph.TYPE_CANDLESTICK,formatter:e.user.userHumidityDisplay,legendLabel:e.user.localize("GeneralTitleHumidity")}]:[{name:"humidity",yIndex:e.ObservationRecord.HUMIDITY,yAxis:e.D3Graph.YAXIS_MAIN,type:e.D3Graph.TYPE_LINE,formatter:e.user.userHumidityDisplay,tooltipLabel:e.user.localize("GeneralTitleHumidity")+":",legendLabel:e.user.localize("GeneralTitleHumidity"),order:0}];case e.Graph.PRESSURE:return"e"==t?[{name:"pressure",yIndexHigh:e.ObservationRecord.PRESSURE_HIGH,yIndexLow:e.ObservationRecord.PRESSURE_LOW,yIndexAvg:e.ObservationRecord.PRESSURE,yAxis:e.D3Graph.YAXIS_MAIN,type:e.D3Graph.TYPE_CANDLESTICK,formatter:e.user.userPressureDisplay,legendLabel:e.user.localize("GeneralTitlePressure")}]:[{name:"pressure",yIndex:e.ObservationRecord.PRESSURE,yAxis:e.D3Graph.YAXIS_MAIN,type:e.D3Graph.TYPE_LINE,formatter:e.user.userPressureDisplay,tooltipLabel:e.user.localize("GeneralTitlePressure")+":",legendLabel:e.user.localize("GeneralTitlePressure")}];case e.Graph.LIGHTNING:return[{name:"lightning",yIndexHigh:e.ObservationRecord.STRIKE_EVENT_MAX,yIndexLow:e.ObservationRecord.STRIKE_EVENT_MIN,yAxis:e.D3Graph.YAXIS_MAIN,type:e.D3Graph.TYPE_CANDLESTICK,formatter:this.defaultFormatter,tooltipLabel:"",legendLabel:e.user.localize("GraphTitleLightningStrikesDetected")}];case e.Graph.STRIKE_COUNT:return[{name:"lightning",yIndex:e.ObservationRecord.STRIKE_COUNT,yAxis:e.D3Graph.YAXIS_MAIN,type:e.D3Graph.TYPE_BAR,formatter:this.defaultFormatter,tooltipLabel:e.user.localize("GeneralTitleLightningStrikeCount"),legendLabel:e.user.localize("GraphTitleLightningStrikesDetected")}];case e.Graph.RAIN:return"e"==t?[{name:"accumulation",yIndex:e.ObservationRecord.PRECIP_ACCUM_TODAY_LOCAL_DISPLAY,yAxis:e.D3Graph.YAXIS_MAIN,type:e.D3Graph.TYPE_LINE,fill:!0,formatter:this.precipAccumTooltipFormatter,tooltipLabel:"",legendLabel:e.user.localize("GraphTextAccumulation")}]:[{name:"rain",yIndex:e.ObservationRecord.PRECIP_RATE_TEXT,yAxis:e.D3Graph.YAXIS_SECONDARY,type:e.D3Graph.TYPE_BAR,formatter:function(t){return e.user.localize("GeneralValueRain"+t.replace(/ /g,""))},tooltipLabel:"",legendLabel:e.user.localize("GeneralTitleRainIntensity")},{name:"accumulation",yIndex:e.ObservationRecord.PRECIP_ACCUM_TODAY_LOCAL_DISPLAY,yAxis:e.D3Graph.YAXIS_MAIN,type:e.D3Graph.TYPE_LINE,fill:!0,formatter:this.precipAccumTooltipFormatter,tooltipLabel:"",legendLabel:e.user.localize("GraphTextAccumulation")}];case e.Graph.RAIN_RATE:var a=this;return"e"==t?[{name:"accumulation",yIndex:e.ObservationRecord.PRECIP_ACCUM_TODAY_LOCAL_DISPLAY,yAxis:e.D3Graph.YAXIS_MAIN,type:e.D3Graph.TYPE_LINE,fill:!0,formatter:function(t){return e.user.userRainAccumulationDisplay(t,!0)},tooltipLabel:"",legendLabel:e.user.localize("GraphTextAccumulation")}]:[{name:"accumulation",yIndex:e.ObservationRecord.PRECIP_ACCUM_TODAY_LOCAL_DISPLAY,yAxis:e.D3Graph.YAXIS_MAIN,type:e.D3Graph.TYPE_LINE,fill:!0,formatter:function(t){return e.user.userRainAccumulationDisplay(t,!0)},tooltipLabel:"",legendLabel:e.user.localize("GraphTextAccumulation")},{name:"rain",yIndex:e.ObservationRecord.PRECIP_DISPLAY,yAxis:e.D3Graph.YAXIS_MAIN,type:e.D3Graph.TYPE_BAR,formatter:function(e){return a.precipRateFormatter(e,!0)},tooltipLabel:"",legendLabel:e.user.localize("GeneralTitleRainRate")}];case e.Graph.UV:return"e"==t?[{name:"uv",yIndexHigh:e.ObservationRecord.UV_HIGH,yIndexLow:e.ObservationRecord.UV_LOW,yIndexAvg:e.ObservationRecord.UV,yAxis:e.D3Graph.YAXIS_MAIN,type:e.D3Graph.TYPE_CANDLESTICK,formatter:this.uvFormatter,tooltipLabel:e.user.localize("GeneralTitleUVIndexShort")+":",legendLabel:e.user.localize("GeneralTitleUVIndex")}]:[{name:"uv",yIndex:e.ObservationRecord.UV,yAxis:e.D3Graph.YAXIS_MAIN,type:e.D3Graph.TYPE_LINE,formatter:this.uvFormatter,tooltipLabel:e.user.localize("GeneralTitleUVIndexShort")+":",legendLabel:e.user.localize("GeneralTitleUVIndex")}];case e.Graph.BRIGHTNESS:return"e"==t?[{name:"brightness",yIndexHigh:e.ObservationRecord.LUX_HIGH,yIndexLow:e.ObservationRecord.LUX_LOW,yIndexAvg:e.ObservationRecord.LUX,yAxis:e.D3Graph.YAXIS_MAIN,type:e.D3Graph.TYPE_CANDLESTICK,formatter:e.user.userBrightnessDisplay,legendLabel:e.user.localize("GeneralTitleBrightness")}]:[{name:"brightness",yIndex:e.ObservationRecord.LUX,yAxis:e.D3Graph.YAXIS_MAIN,type:e.D3Graph.TYPE_LINE,formatter:e.user.userBrightnessDisplay,tooltipLabel:"",legendLabel:e.user.localize("GeneralTitleBrightness")}];case e.Graph.SOLAR_RADIATION:return"e"==t?[{name:"solar-radiation",yIndexHigh:e.ObservationRecord.SOLAR_RADIATION_HIGH,yIndexLow:e.ObservationRecord.SOLAR_RADIATION_LOW,yIndexAvg:e.ObservationRecord.SOLAR_RADIATION,yAxis:e.D3Graph.YAXIS_MAIN,type:e.D3Graph.TYPE_CANDLESTICK,formatter:e.user.userSolarRadiationDisplay,legendLabel:e.user.localize("GeneralTitleSolarRadiation")}]:[{name:"solar-radiation",yIndex:e.ObservationRecord.SOLAR_RADIATION,yAxis:e.D3Graph.YAXIS_MAIN,type:e.D3Graph.TYPE_LINE,formatter:e.user.userSolarRadiationDisplay,tooltipLabel:"",legendLabel:e.user.localize("GeneralTitleSolarRadiation")}];case e.Graph.BATTERY:return[{name:"battery",yIndex:e.ObservationRecord.BATTERY,yAxis:e.D3Graph.YAXIS_MAIN,type:e.D3Graph.TYPE_LINE,formatter:e.user.userBatteryDisplay,tooltipLabel:e.user.localize("GeneralTextBatteryVoltage"),legendLabel:e.user.localize("GeneralTextBatteryVoltage")}];default:return null}},e.Graph.prototype.windspeedFormatter=function(t){if(null!=t)return new e.WindSpeedValue(t,e.user.userWindUnits()).displayValue()},e.Graph.prototype.windspeedTooltipFormatter=function(t){if(null!=t)return new e.WindSpeedValue(t,e.user.userWindUnits()).displayValueWithUnits()},e.Graph.prototype.tempFormatter=function(t){var a=null,i=new e.TemperatureValue(t,e.user.userTemperatureUnits());return"---"!=i.displayValue()&&(a=i.displayValue()),a},e.Graph.prototype.pressureFormatter=function(t){return new e.PressureValue(t,e.user.userPressureUnits()).displayValue()},e.Graph.prototype.distanceFormatter=function(t){return new e.DistanceValue(t,e.user.userDistanceUnits()).displayValue()},e.Graph.prototype.distanceTooltipFormatter=function(t){return new e.DistanceValue(t,e.user.userDistanceUnits()).displayValueWithUnits()},e.Graph.prototype.precipRateFormatter=function(t,a){if(null!=t){var i=null,r=this._getGraphInfoByZoomLevel();return i=new e.PrecipValue(t/r.bucketMins*60,e.user.userPrecipUnits()),a?i.displayValue()+" "+e.user.userPrecipUnits()+" / "+e.user.localize("GeneralTextHour").toLowerCase():i.displayValue()}return""},e.Graph.prototype.precipAccumTooltipFormatter=function(t){return new e.PrecipValue(t,e.user.userPrecipUnits()).displayValueWithUnitsIncludingTrace()},e.Graph.prototype.defaultFormatter=function(e){return e},e.Graph.prototype.lightningFormatter=function(e){return e},e.Graph.prototype.uvFormatter=function(t){var a=null,i=new e.UVValue(t);return"---"!=i.displayValue()&&(a=i.displayValue()),a},e.Graph.prototype._getGraphTitle=function(){var t="";switch(this.settings.graphType){case e.Graph.WIND:t=e.user.localize("GeneralTitleWindSpeed");break;case e.Graph.PRESSURE:t=e.user.localize("GeneralTitlePressure");break;case e.Graph.TEMP:t=e.user.localize("GraphValueTemp");break;case e.Graph.HUMIDITY:t=e.user.localize("GeneralTitleHumidity");break;case e.Graph.LIGHTNING:t=e.user.localize("GeneralTitleLightning");break;case e.Graph.STRIKE_COUNT:t=e.user.localize("GeneralTitleLightningStrikeCount");break;case e.Graph.RAIN:t=e.user.localize("GeneralTitleRain");break;case e.Graph.RAIN_RATE:t=e.user.localize("GeneralTitleRainRate");break;case e.Graph.UV:t=e.user.localize("GeneralTitleUVIndex");break;case e.Graph.BRIGHTNESS:t=e.user.localize("GeneralTitleBrightness");break;case e.Graph.SOLAR_RADIATION:t=e.user.localize("GeneralTitleSolarRadiation");break;case e.Graph.BATTERY:t=e.user.localize("GeneralTextBatteryVoltage")}return Object.prototype.hasOwnProperty.call(this.settings.device,"device_meta")&&null!=this.settings.device.device_meta.name&&(t+=" - "+this.settings.device.device_meta.name),t},e.Graph.prototype._getGraphYTitle=function(){var t="";switch(this.settings.graphType){case e.Graph.PRESSURE:t=e.user.userPressureUnits();break;case e.Graph.TEMP:t=String.fromCharCode(176)+" "+e.user.userTemperatureUnits();break;case e.Graph.HUMIDITY:t=e.user.localize("GeneralTitleHumdity");break;case e.Graph.WIND:t=e.WindSpeedValue.DisplayUnits(e.user.userWindUnits());break;case e.Graph.LIGHTNING:t=e.user.localize("GeneralValueDistance")+" ("+e.user.userDistanceUnits()+")";break;case e.Graph.STRIKE_COUNT:t=e.user.localize("GraphTitleLightningStrikesDetected");break;case e.Graph.RAIN:t=e.user.userPrecipUnits();break;case e.Graph.UV:t=e.user.localize("GeneralTitleUVShort");break;case e.Graph.BRIGHTNESS:t=e.user.localize("GeneralTitleLux");break;case e.Graph.SOLAR_RADIATION:t="W/m2";break;case e.Graph.BATTERY:t=e.user.localize("GeneralValueVolts")}return t},e.Graph.prototype._getGraphSecondaryYTitle=function(){var t="";switch(this.settings.graphType){case e.Graph.TEMP:t="% "+e.user.localize("GeneralTitleHumdityShort")}return t},e.Graph.prototype._processData=function(a,i){for(var r=t.extend(!0,[],a),n=null,s=null,o=[],l=this._disconnectIntervalInMinutes(i),c=this._getTotalElevation(),u=new e.ObservationRecord({bucketInMinutes:i,deviceType:this.settings.device.device_type}),d=0;dl&&o.push(null)}var h=u.getObjectForOb(r[d]);if(this.settings.graphType==e.Graph.WIND)0!=h[e.ObservationRecord.WIND_AVG]&&null!=h[e.ObservationRecord.WIND_AVG]||null==h[e.ObservationRecord.WIND_DIR]||(h[e.ObservationRecord.WIND_DIR]=null);else if(this.settings.graphType==e.Graph.TEMP&&1440!=i){var m=new e.TemperatureValue(h[e.ObservationRecord.TEMP],e.user.userTemperatureUnits());if(h[e.ObservationRecord.TEMP]=m.observed(),null!=h[e.ObservationRecord.TEMP]){var g=new e.HumidityValue(h[e.ObservationRecord.HUMIDITY]);h[e.ObservationRecord.HUMIDITY]=g.observed();var y=h[e.ObservationRecord.HUMIDITY],v=h[e.ObservationRecord.TEMP];if(null!=v&&null!=y){var f=this._getDewPoint(y,v);if(isNaN(f))h[e.ObservationRecord.DEW_POINT]=null;else{var _=new e.TemperatureValue(f,e.user.userTemperatureUnits());h[e.ObservationRecord.DEW_POINT]=_.observed()}}else h[e.ObservationRecord.DEW_POINT]=null}else h=null}else if(this.settings.graphType==e.Graph.PRESSURE)null!=h[e.ObservationRecord.PRESSURE]&&(h[e.ObservationRecord.PRESSURE]=this._getSeaLevelPressure(h[e.ObservationRecord.PRESSURE],c)),null!=h[e.ObservationRecord.PRESSURE_HIGH]&&(h[e.ObservationRecord.PRESSURE_HIGH]=this._getSeaLevelPressure(h[e.ObservationRecord.PRESSURE_HIGH],c)),null!=h[e.ObservationRecord.PRESSURE_LOW]&&(h[e.ObservationRecord.PRESSURE_LOW]=this._getSeaLevelPressure(h[e.ObservationRecord.PRESSURE_LOW],c));else if(this.settings.graphType==e.Graph.RAIN||this.settings.graphType==e.Graph.RAIN_RATE){var T=e.rainCheckEnabled(this.settings.device),S=null,b=null;if(h.rain_check=!1,1440==i?(S=h[e.ObservationRecord.PRECIP_ACCUM_TODAY_LOCAL],T&&null!=h[e.ObservationRecord.PRECIP_ACCUM_TODAY_LOCAL_FINAL]&&(S=h[e.ObservationRecord.PRECIP_ACCUM_TODAY_LOCAL_FINAL],h.rain_check=!0)):(S=h[e.ObservationRecord.PRECIP_ACCUM_TODAY_LOCAL],b=h[e.ObservationRecord.PRECIP],T&&null!=h[e.ObservationRecord.PRECIP_ACCUM_TODAY_LOCAL_FINAL]&&(S=h[e.ObservationRecord.PRECIP_ACCUM_TODAY_LOCAL_FINAL],h.rain_check=!0),T&&null!=h[e.ObservationRecord.PRECIP_FINAL]&&(b=h[e.ObservationRecord.PRECIP_FINAL])),h[e.ObservationRecord.PRECIP_ACCUM_TODAY_LOCAL_DISPLAY]=S,h[e.ObservationRecord.PRECIP_DISPLAY]=b,1440!=i){var D=T?h[e.ObservationRecord.PRECIP_ACCUM_TODAY_LOCAL_FINAL]:h[e.ObservationRecord.PRECIP_ACCUM_TODAY_LOCAL],w=new e.PrecipValue(D,e.PrecipUnit.MILLIMETERS),R="---"!=w.displayValue()?parseFloat(w.displayValue()):"---";null!=s&&"---"!=s&&s>R&&o.push(null);var A=new e.PrecipRateValue(h[e.ObservationRecord.PRECIP_DISPLAY],i,e.user.userPressureUnits());h[e.ObservationRecord.PRECIP_RATE_TEXT]=A.textDisplay(),s=R}}else if(this.settings.graphType==e.Graph.UV){var L=this.uvFormatter(h[e.ObservationRecord.UV]);h[e.ObservationRecord.UV]=L}else this.settings.graphType==e.Graph.BATTERY&&0==h[e.ObservationRecord.BATTERY]&&(h=null);o.push(h),null!=h&&null!=h[e.ObservationRecord.TIMESTAMP]&&null!=h[e.ObservationRecord.TIMESTAMP]&&(n=moment.utc(1e3*h[e.ObservationRecord.TIMESTAMP]))}return o},e.Graph.prototype._processEventData=function(t){for(var a=[],i=0;i"+a[r].legendLabel+"",l=Object.prototype.hasOwnProperty.call(n,"order")?n.order:r;i.splice(l,0,o)}}t("#graph-legend").empty().append(i.join(""))},e.Graph.prototype.addPoint=function(e){if(null!=this.data&&1==this.data.bucket_step_minutes&&(this.data&&Object.prototype.hasOwnProperty.call(this.data,"obs")&&null!=this.d3Graph&&this.data.obs[this.data.obs.length-1][0]!=e[0])){var a=t(this.graphTarget).scrollLeft(),i=a+t(this.graphTarget).width(),r=t(this.graphTarget)[0].scrollWidth,n=a+t(this.graphTarget).width()/2,s=this.d3Graph.getTimestampByPixelLocation(n),o=new moment(1e3*e[0]);o.startOf("minute"),e[0]=o.unix(),this.data.obs.push(e);var l=this._isTimestampVisible(1e3*e[0]),c=this._processData(this.data.obs,this.data.bucket_step_minutes);if(this.d3Graph.update(c,this.data.bucket_step_minutes,this.xDomain,!Util.isDocumentHidden()),this.refreshNeeded=Util.isDocumentHidden(),r==i)t(this.graphTarget).animate({scrollLeft:r},800);else if(!l&!this.refreshNeeded){var u=this.d3Graph.getPixelLocationByTimestamp(s);t(this.graphTarget).scrollLeft(u-t(this.graphTarget).width()/2),t("#new-obs").addClass("show")}}},e.Graph.prototype.addEvent=function(e){if(null!=this.data&&1==this.data.bucket_step_minutes){var a=this._getGraphInfoByZoomLevel();if(this.data&&Object.prototype.hasOwnProperty.call(this.data,a.evtType)&&null!=this.d3Graph)if(this.data[a.evtType][this.data[a.evtType].length-1][0]!=e[0]){var i=t(this.graphTarget).scrollLeft(),r=i+t(this.graphTarget).width(),n=t(this.graphTarget)[0].scrollWidth,s=i+t(this.graphTarget).width()/2,o=this.d3Graph.getTimestampByPixelLocation(s);this.data[a.evtType].push(e);var l=this._isTimestampVisible(1e3*e[0]),c=this._processEventData(this.data[a.evtType],a.bucketMins);if(this.d3Graph.update(c,a.bucketMins,this.xDomain,!Util.isDocumentHidden()),this.refreshNeeded=Util.isDocumentHidden(),n==r)t(this.graphTarget).animate({scrollLeft:n},800);else if(!l&!this.refreshNeeded){var u=this.d3Graph.getPixelLocationByTimestamp(o);t(this.graphTarget).scrollLeft(u-t(this.graphTarget).width()/2),t("#new-obs").addClass("show")}}}},e.Graph.prototype._isTimestampVisible=function(e){var a=t(this.graphTarget).scrollLeft(),i=a+t(this.graphTarget).width(),r=this.d3Graph.getPixelLocationByTimestamp(e),n=!1;return r>=a&&r<=i&&(n=!0),n},e.Graph.prototype._getTotalElevation=function(){return(null!=this.settings.device.location_elevation?this.settings.device.location_elevation:0)+(null!=this.settings.device.device_meta.agl?this.settings.device.device_meta.agl:0)},e.Graph.prototype._getSeaLevelPressure=function(t,a){return new e.PressureValue(t,e.user.userPressureUnits()).calculateSeaLevelPressure(a)[0]},e.Graph.prototype._getDewPoint=function(e,t){return parseFloat(243.04*(Math.log(e/100)+17.625*t/(243.04+t))/(17.625-Math.log(e/100)-17.625*t/(243.04+t))).toFixed(4)},e.Graph.prototype.refreshGraph=function(){!Util.isDocumentHidden()&&this.refreshNeeded&&null!=this.d3Graph&&(this.d3Graph.refresh(),this.refreshNeeded=!1)},e.Graph.prototype._getBucket=function(){return t("input[name=graph-view]:checked").attr("data-bucket")},e.Graph.prototype._zoomIn=function(){var e=this._getZoom(),t=e>1?e-1:e;t!=e&&(this._setZoom(t),this._doZoom(e))},e.Graph.prototype._zoomOut=function(){var e=this._getZoom(),t=e-1&&(t=this.zoomSteps.indexOf(e)+1),t},e.Graph.prototype._doZoom=function(e){var a=this._getZoom();t(this.graphTarget).scrollLeft(t(this.graphTarget)[0].scrollWidth),5==a||5==e?(t(this.target).empty(),this.d3Graph=null,this._init()):this._getData(),"function"==typeof this.settings.zoomChanged&&this.settings.zoomChanged(this.settings.deviceId,this._getZoom(),this.settings.graphType)},e.Graph.prototype._showNoObsMessage=function(){t("#graph").hide(),t("#graph-legend").hide(),t("#graph-no-obs").show(),t(".tooltip").html("")},e.Graph.prototype._clearNoObsMessage=function(){t("#graph-no-obs").hide(),t("#graph").show(),t("#graph-legend").show()},e.Graph.prototype._graphHover=function(a,i){var r=this,n=this._getGraphInfoByZoomLevel(),s="";var o="24"===e.user.userTimeUnits()?"HH:mm":"LT",l="

    "+("

    "+(s=1440==n.bucketMins||null==this.settings.stationTimezone?moment(1e3*a[e.ObservationRecord.TIMESTAMP]):moment(1e3*a[e.ObservationRecord.TIMESTAMP]).tz(this.settings.stationTimezone)).format("l"))+(1440!=n.bucketMins?" "+s.format(o):"")+"

    ",c=[];switch(this.settings.graphType){case e.Graph.WIND:if(null!=a){var u=new e.WindSpeedValue(a[e.ObservationRecord.WIND_AVG],e.user.userWindUnits()).displayValue(),d=new e.WindSpeedValue(a[e.ObservationRecord.WIND_LULL],e.user.userWindUnits()).displayValue(),p=new e.WindSpeedValue(a[e.ObservationRecord.WIND_GUST],e.user.userWindUnits()).displayValue(),h=new e.WindDirectionValue(a[e.ObservationRecord.WIND_DIR],e.user.userDirectionUnits()).displayValue();l+="

    ",null!=u&&(l+=""+u+""),null!=d&&null!=p&&(l+=" ("+d+" - "+p+")"),l+=" "+e.WindSpeedValue.DisplayUnits(e.user.userWindUnits()),null!=h&&(l+=" "+h),l+="

    "}break;default:l+="
      ",t.each(i,(function(t,i){if(null!=i.formatter)switch(i.type){case e.D3Graph.TYPE_CANDLESTICK:if(r.settings.graphType==e.Graph.LIGHTNING){var n=Object.prototype.hasOwnProperty.call(i,"tooltipLabel")&&null!=i.tooltipLabel?i.tooltipLabel+" ":"",s="
    • "+n+" "+new e.LightningDistanceValue(a.distance,e.user.userDistanceUnits()).textDisplay()+"
    • ";c.push(s)}else{var o="
    • ";o+=(n=Object.prototype.hasOwnProperty.call(i,"tooltipLabel")&&null!=i.tooltipLabel?i.tooltipLabel+" ":"")+i.formatter(a[i.yIndexAvg])+" ("+i.formatter(a[i.yIndexLow])+" - "+i.formatter(a[i.yIndexHigh])+")",o+="
    • ",c.push(o)}break;default:n=Object.prototype.hasOwnProperty.call(i,"tooltipLabel")&&null!=i.tooltipLabel?i.tooltipLabel+" ":"";var l=Object.prototype.hasOwnProperty.call(i,"order")?i.order:t,u="";r.settings.graphType!=e.Graph.RAIN&&r.settings.graphType!=e.Graph.RAIN_RATE||"precip_accum_today_local_display"==i.yIndex&&a.rain_check&&(u=" raincheck");s="
    • "+n+i.formatter(a[i.yIndex])+"
    • ";c.splice(l,0,s)}})),l+=c.join(""),l+="
    "}t(".tooltip").html(l)},e.Graph.prototype.update=function(e,a,i,r,n){this.settings.device=e,this.settings.deviceId=a,this.settings.graphType=i,this.d3Graph=null,this.scrollPosition=r?t(this.graphTarget).scrollLeft():null,this.settings.powerSaveMode=n||null,this._init()},e.Graph.prototype.deviceId=function(){return this.settings.deviceId},e.Graph.prototype.setPowerSaveMode=function(e){this.settings.powerSaveMode=e,this._showPowerSaveIcon()},e.Graph.WIND="wind-graph",e.Graph.TEMP="temp-graph",e.Graph.HUMIDITY="humidity-graph",e.Graph.PRESSURE="pressure-graph",e.Graph.LIGHTNING="lightning-graph",e.Graph.STRIKE_COUNT="strike-count-graph",e.Graph.RAIN="rain-graph",e.Graph.RAIN_RATE="rain-rate-graph",e.Graph.UV="uv-graph",e.Graph.BRIGHTNESS="brightness-graph",e.Graph.SOLAR_RADIATION="solar-radiation-graph",e.Graph.BATTERY="battery-graph"}(window.SWD=window.SWD||{},jQuery),function(e,t){e.D3Graph=function(e,a){this.graphTarget=a,this.svg=null,this.ySVG=null,this.graphGroup=null,this.focusGroup=null,this.xRange=null,this.yRange=null,this.mainYScale=null,this.mainYAxis=null,this.secondaryYScale=null,this.secondaryYAxis=null,this.xAxis=null,this.yAxis=null,this.lines=[],this.fill={},this.zoomLevel=null,this.isTime24HourFormat=this._isTime24HourFormat(),this.settings=t.extend({},{lineData:null,lines:null,xAxisDomain:null,xIndex:null,margin:{top:25,right:0,bottom:5,left:0},graphDrawn:null},e),this._init(),this._visualize()},e.D3Graph.prototype._init=function(){var a=this,i=d3.bisector((function(e){if(null!=e)return 1e3*e[a.settings.xIndex]})).right,r=d3.bisector((function(e){if(null!=e)return 1e3*e[a.settings.xIndex]})).left;this.svg=d3.select(this.graphTarget[0]).append("svg").attr("width",28800),this.graphGroup=this.svg.append("g").attr("transform","translate("+this.settings.margin.left+","+this.settings.margin.top+")"),this.focusGroup=this.svg.append("g").attr("id","focus").attr("transform","translate("+this.settings.margin.left+","+this.settings.margin.top+")").style("display","none"),this.focusGroup.append("line").attr("class","tooltip-x").attr("y1",0),t(".tooltip").html(""),this.graphGroup.append("line").attr("class","now-line").attr("y1",0);var n=t(this.settings.yAxes[e.D3Graph.YAXIS_MAIN].target[0]).width();this.ySVG=d3.select(this.settings.yAxes[e.D3Graph.YAXIS_MAIN].target[0]).append("svg").attr("width",n+1).append("g").attr("transform","translate("+n+","+this.settings.margin.top+")"),Object.prototype.hasOwnProperty.call(this.settings.yAxes,e.D3Graph.YAXIS_SECONDARY)&&(this.secondaryYSVG=d3.select(this.settings.yAxes[e.D3Graph.YAXIS_SECONDARY].target[0]).insert("svg","#graph-y-axis-secondary-label").attr("width",t(this.settings.yAxes[e.D3Graph.YAXIS_SECONDARY].target[0]).width()).append("g").attr("transform","translate(0,"+this.settings.margin.top+")")),this.svg.append("rect").attr("class","focus-rect").style("fill","none").style("pointer-events","all").on("mouseover",(function(){a.focusGroup.style("display",null)})).on("mousemove",(function(){var n=null,s=a.xRange.invert(d3.mouse(this)[0]),o=i(a.settings.lineData,s),l=r(a.settings.lineData,s),c=a.settings.lineData[a._getClosestLeftDataPoint(l)],u=a.settings.lineData[a._getClosestRightDataPoint(o)];if(null!=(n=void 0===c||void 0===u?null:s-1e3*c[a.settings.xIndex]>1e3*u[a.settings.xIndex]-s?u:c)){t.each(a.settings.lines,(function(t,i){if(i.type==e.D3Graph.TYPE_LINE){var r=a._getYScale(i.yAxis)(a.settings.yAxes[i.yAxis].formatter(n[i.yIndex],i)),s=a.xRange(1e3*n[a.settings.xIndex]);isNaN(s)||isNaN(r)?a.focusGroup.select("circle.highlighted-plot-point-"+i.name).attr("transform","translate(-1000,-1000)"):a.focusGroup.select("circle.highlighted-plot-point-"+i.name).attr("transform","translate("+s+","+r+")")}}));var d=a.xRange(1e3*n[a.settings.xIndex]);a.focusGroup.select("line.tooltip-x").attr("transform","translate("+d+",0)"),"function"==typeof a.settings.graphHover&&a.settings.graphHover(n,a.settings.lines)}})),this.xRange=d3.scaleTime(),this._createYAxes(),this.xAxis=d3.axisBottom(this.xRange).tickFormat((function(e){var t=null!=a.settings.stationTimezone?moment(e).tz(a.settings.stationTimezone):moment(e),i=a.isTime24HourFormat?t.format("HH:mm"):t.format("h:mm a");switch(a.settings.bucketTimeStep){case 30:return a.isTime24HourFormat?"00:00"==i?t.format("l"):t.format("H"):"00:00"==i?t.format("l"):t.format("h A");case 180:return"00:00"==i?"":t.format("D MMM");case 1440:return 15==moment.utc(e).format("D")?moment(e).format("MMM YYYY"):"";default:return a.isTime24HourFormat?"00:00"==i?t.format("l"):t.format("HH:mm"):"00:00"==i?t.format("l"):t.format("h:mm A")}})),this.graphGroup.append("g").attr("id","x-axis").call(this.xAxis),this._createLines(),"function"==typeof this.settings.graphDrawn&&this.settings.graphDrawn(),e.isMobile()&&(t(window).unbind("resize"),t(window).resize(e.debouncer((function(){a.refresh(!0)}))))},e.D3Graph.prototype._getClosestLeftDataPoint=function(e){for(var t=e;t>=0;t--)if(this.settings.lineData.length>t&&null!=this.settings.lineData[t])return t},e.D3Graph.prototype._getClosestRightDataPoint=function(e){for(var t=e;tt&&null!=this.settings.lineData[t])return t},e.D3Graph.prototype._createYAxes=function(){var a=this;t.each(this.settings.yAxes,(function(t,i){switch(t){case e.D3Graph.YAXIS_MAIN:a.mainYScale=d3.scaleLinear(),a.mainYAxis=d3.axisLeft(a.mainYScale),Object.prototype.hasOwnProperty.call(i,"mainYAxisFormatter")?a.mainYAxis.tickFormat(i.mainYAxisFormatter):Object.prototype.hasOwnProperty.call(i,"d3Format")&&a.mainYAxis.tickFormat(i.d3Format),a.yAxisGrid=d3.axisLeft(a.mainYScale).tickSizeOuter(0),a.ySVG.append("g").attr("id","y-axis").call(a.mainYAxis),a.graphGroup.append("g").attr("id","y-axis-grid-lines").call(a.yAxisGrid),Object.prototype.hasOwnProperty.call(i,"label")&&a.ySVG.append("text").attr("class","y-axis-label y-axis-label-main").attr("transform","rotate(-90)").style("text-anchor","middle").text(i.label);break;case e.D3Graph.YAXIS_SECONDARY:a.secondaryYScale=d3.scaleLinear(),a.secondaryYAxis=d3.axisRight(a.secondaryYScale),Object.prototype.hasOwnProperty.call(i,"d3Format")&&a.secondaryYAxis.tickFormat(i.d3Format),a.secondaryYSVG.append("g").attr("id","y-axis-secondary").call(a.secondaryYAxis),Object.prototype.hasOwnProperty.call(i,"label")&&a.secondaryYSVG.append("text").attr("class","y-axis-label y-axis-label-secondary").attr("transform","rotate(90)").style("text-anchor","middle").text(i.label)}}))},e.D3Graph.prototype._createLines=function(){var a=this,i=function(t){return function(i){return(t.yAxis==e.D3Graph.YAXIS_SECONDARY?a.secondaryYScale:a.mainYScale)(a.settings.yAxes[t.yAxis].formatter(i[t.yIndex],t))}};t.each(this.settings.lines,(function(t,r){var n=r;r.type==e.D3Graph.TYPE_LINE?(a.lines.push(d3.line().defined((function(e){var t=!1;return null!=e&&(t=null!=e[r.yIndex]),t})).x((function(e){return a.xRange(1e3*e.timestamp)})).y(i(n))),a.graphGroup.append("g").attr("id","line-"+r.name).append("path").attr("class","line line-"+r.name),Object.prototype.hasOwnProperty.call(r,"fill")&&r.fill&&(a.fill[r.name]=d3.area().defined((function(e){var t=!1;return null!=e&&(t=null!=e[r.yIndex]),t})).x((function(e){return a.xRange(1e3*e.timestamp)})).y0(300).y1(i(n)),a.graphGroup.select("#line-"+r.name).append("path").attr("class","line-fill line-fill-"+r.name)),a.focusGroup.append("circle").attr("class","highlighted-plot-point highlighted-plot-point-"+r.name).attr("r",8)):(a.graphGroup.append("g").attr("id","line-"+r.name),a.lines.push(null))}))},e.D3Graph.prototype._visualize=function(a){var i=this,r=(a=a||!1)?parseInt(this.svg.attr("width"))+20:parseInt(this.svg.attr("width")),n=this._calcGraphHeight(),s=n+this.settings.margin.top+this.settings.margin.bottom,o=r-this.settings.margin.right,l=n-this.settings.margin.top-this.settings.margin.bottom;this.svg.attr("height",s),t("#graph-y-axis svg").attr("height",n),this._positionYAxisLabels(l),Object.prototype.hasOwnProperty.call(this.settings.yAxes,e.D3Graph.YAXIS_SECONDARY)&&t("svg",this.settings.yAxes[e.D3Graph.YAXIS_SECONDARY].target[0]).attr("height",n),a&&this.svg.attr("width",r),this.focusGroup.select(".tooltip-x").attr("y2",l),this.svg.select(".focus-rect").attr("width",o).attr("height",s),this.graphGroup.select("#x-axis").attr("transform","translate(0,"+l+")"),this._setXRange(o),this._setYRange(l),this._setXDomain(),this._setYDomain(),t.each(this.settings.lines,(function(t,r){var n=d3.select("#line-"+r.name);if(r.type==e.D3Graph.TYPE_LINE){a||n.selectAll(".plot-point-"+r.name).attr("r",0),n.transition().select(".line-"+r.name).duration(750).attr("d",i.lines[t](i.settings.lineData)),Object.prototype.hasOwnProperty.call(i.fill,r.name)&&null!=i.fill[r.name]&&(i.fill[r.name].y0(l),n.transition().select(".line-fill-"+r.name).duration(750).attr("d",i.fill[r.name](i.settings.lineData)));var s=n.selectAll(".plot-point-"+r.name).data(i.settings.lineData);s.enter().append("circle").attr("r",0).attr("class",(function(e,t){return"plot-point plot-point-"+r.name+" plot-point-"+t})).merge(s).attr("cx",(function(e){return null!=e?i.xRange(1e3*e[i.settings.xIndex]):-1e3})).attr("cy",(function(e){var t=i._getYScale(r.yAxis);return null!=e&&null!=e[r.yIndex]?t(i.settings.yAxes[r.yAxis].formatter(e[r.yIndex],r)):-1e3})).transition().delay(400).duration(750).attr("r",3),s.exit().remove()}else if(r.type==e.D3Graph.TYPE_WIND_ARROW){var o=n.selectAll(".wind-arrow").data(i.settings.lineData),c=e.isDarkMode()?"/images/graph-arrow-wind-dark.svg":"/images/graph-arrow-wind-light.svg";o.enter().append("image").attr("class","wind-arrow").attr("xlink:href",c).attr("height",16).attr("width",16).attr("x",-8).attr("y",-8).merge(o).transition().duration(750).attr("transform",(function(e){return null!=e&&null!=e[r.yIndex]?"translate("+i.xRange(1e3*e[i.settings.xIndex])+",-15) rotate("+e[r.yIndex]+")":"translate(-1000, -1000)"})),o.exit().remove()}else if(r.type==e.D3Graph.TYPE_BUBBLE){var u=n.selectAll(".bubble").data(i.settings.lineData);u.enter().append("circle").attr("class","bubble").attr("opacity",".6").merge(u).attr("r",(function(e){if(null!=e){var t=.25*e[r.bubbleModifier];return t>20&&(t=20),t>0&&t<3&&(t=3),t}return 0})).attr("cx",(function(e){return null!=e?i.xRange(1e3*e[i.settings.xIndex]):-1e3})).attr("cy",(function(e){var t=i._getYScale(r.yAxis);return null!=e?t(i.settings.yAxes[r.yAxis].formatter(e[r.yIndex],r)):-1e3})),u.exit().remove()}else if(r.type==e.D3Graph.TYPE_BAR){var d=n.selectAll(".bar").data(i.settings.lineData),p=i._getYScale(r.yAxis);d.enter().append("rect").attr("class","bar").merge(d).attr("x",(function(e){return null!=e?i.xRange(1e3*e.timestamp)-7.5:null})).attr("y",(function(e){if(null!=e)return p(i.settings.yAxes[r.yAxis].formatter(e[r.yIndex],r))})).attr("width",15).attr("height",(function(e){return null!=e?l-p(i.settings.yAxes[r.yAxis].formatter(e[r.yIndex],r)):0})),d.exit().remove()}else if(r.type==e.D3Graph.TYPE_CANDLESTICK){var h=n.selectAll(".stick").data(i.settings.lineData);p=i._getYScale(r.yAxis);if(h.enter().append("rect").attr("class","stick").merge(h).attr("x",(function(e){return null!=e?i.xRange(1e3*e.timestamp)-7.5:null})).attr("y",(function(e){if(null!=e)return p(i.settings.yAxes[r.yAxis].formatter(e[r.yIndexHigh],r))})).attr("width",15).attr("height",(function(e){if(null!=e)return p(i.settings.yAxes[r.yAxis].formatter(e[r.yIndexLow],r))-p(i.settings.yAxes[r.yAxis].formatter(e[r.yIndexHigh],r))})),h.exit().remove(),null!=r.yIndexAvg&&null!=r.yIndexAvg){var m=n.selectAll(".scatter-point-"+r.name).data(i.settings.lineData);m.enter().append("rect").attr("class",(function(e,t){return"scatter-point scatter-point-"+r.name+" scatter-point-"+t})).merge(m).attr("x",(function(e){return null!=e?i.xRange(1e3*e[i.settings.xIndex])-7.5:-1e3})).attr("y",(function(e){var t=i._getYScale(r.yAxis);return null!=e&&null!=e[r.yIndexAvg]?t(i.settings.yAxes[r.yAxis].formatter(e[r.yIndexAvg],r)):-1e3})).attr("height",5).attr("width",15).transition().delay(400).duration(750).attr("r",3),m.exit().remove()}}})),1440==this.settings.bucketTimeStep?this.xAxis.tickValues(this._getYearlyTickValues()):this.xAxis.ticks(this._getXAxisTickDuration()),this.xAxis.tickSizeInner(-l),this.yAxisGrid.tickSizeInner(-o),this._setSecondaryAxisTicks(),this.graphGroup.transition().select("#x-axis").duration(750).call(this.xAxis),180!=this.settings.bucketTimeStep&&1440!=this.settings.bucketTimeStep||this.graphGroup.selectAll("#x-axis .tick line").attr("class",(function(e){return 180==i.settings.bucketTimeStep?"12:00"==moment(e).format("HH:mm")?"hidden-tick":"":1440==i.settings.bucketTimeStep?15==moment(e).format("D")?"hidden-tick":"":void 0})),this.ySVG.transition().select("#y-axis").duration(750).call(this.mainYAxis),null!=this.secondaryYAxis&&this.secondaryYSVG.transition().select("#y-axis-secondary").duration(750).call(this.secondaryYAxis),this.graphGroup.transition().select("#y-axis-grid-lines").duration(750).call(this.yAxisGrid);var c=moment().utcOffset(0);c.set({second:0,millisecond:0}),this.svg.transition().select("line.now-line").duration(750).attr("y2",l).attr("transform","translate("+i.xRange(c.valueOf())+",0)")},e.D3Graph.prototype._positionYAxisLabels=function(a){var i=t(".y-axis-label-main").height();if(t(".y-axis-label-main").attr("x",0-(a-i)/2),t(".y-axis-label-main").attr("y",0-(t(this.settings.yAxes[e.D3Graph.YAXIS_MAIN].target[0]).width()-18)),Object.prototype.hasOwnProperty.call(this.settings.yAxes,e.D3Graph.YAXIS_SECONDARY)){var r=t(".y-axis-label-secondary").height();t(".y-axis-label-secondary").attr("x",(a-r)/2),t(".y-axis-label-secondary").attr("y",-(t(this.settings.yAxes[e.D3Graph.YAXIS_SECONDARY].target[0]).width()-23))}},e.D3Graph.prototype._calcGraphHeight=function(){var a=330;if(e.isMobile()){var i=0,r=window.innerHeight;t(".graph-height-variable").each((function(e,a){i+=t(a).outerHeight(!0)})),a=r-i-this.settings.margin.top}return a},e.D3Graph.prototype._setSecondaryAxisTicks=function(){if(null!=this.secondaryYScale){for(var e=this.mainYScale.ticks(),t=[],a=0;aa?this.settings.xAxisDomain[1]:a);var i=new moment.utc(a).add(this._getXAxisPaddingInMinutes(),"m"),r=null!=this.settings.xAxisDomain?this.settings.xAxisDomain[0]:t;this.xRange.domain([r,i])},e.D3Graph.prototype._getXAxisPaddingInMinutes=function(){switch(this.settings.bucketTimeStep){case 1:return 5;case 5:return 30;case 30:return 360;case 180:return 2160;case 1440:return 2880;default:return 5}},e.D3Graph.prototype._setYDomain=function(){var a=this;t.each(this.settings.yAxes,(function(t,i){var r=t==e.D3Graph.YAXIS_SECONDARY?a.secondaryYScale:a.mainYScale,n=null,s=null;n=null!=i.minValue?i.minValue:d3.min(a.settings.lineData,(function(i){if(null!=i)return Math.min.apply(this,a.settings.lines.map((function(r){return r.type==e.D3Graph.TYPE_CANDLESTICK&&r.yAxis==t&&null!=i[r.yIndexLow]?a.settings.yAxes[t].formatter(i[r.yIndexLow],r):r.type!=e.D3Graph.TYPE_WIND_ARROW&&r.yAxis==t&&null!=i[r.yIndex]?a.settings.yAxes[t].formatter(i[r.yIndex],r):1/0})))})),(s=null!=i.maxValue?i.maxValue:d3.max(a.settings.lineData,(function(i){if(null!=i)return Math.max.apply(this,a.settings.lines.map((function(r){return r.type==e.D3Graph.TYPE_CANDLESTICK&&r.yAxis==t&&i[r.yIndexHigh]?a.settings.yAxes[t].formatter(i[r.yIndexHigh],r):r.type!=e.D3Graph.TYPE_WIND_ARROW&&r.yAxis==t&&null!=i[r.yIndex]?a.settings.yAxes[t].formatter(i[r.yIndex],r):-1/0})))})))-n<1&&(n=n-.5>0?n-.5:0,s+=.5),null!=i.minValue&&null!=i.maxValue?r.domain([i.minValue,i.maxValue]):r.domain([n,s]).nice();var o=t==e.D3Graph.YAXIS_SECONDARY?a.secondaryYAxis:a.mainYAxis,l=t==e.D3Graph.YAXIS_SECONDARY?null:a.yAxisGrid;if(null!=i.tickValues)o.tickValues(i.tickValues),l.tickValues(i.tickValues);else if(null!=i.minTickStep&&s-n<10){var c=r.domain();o.tickValues(d3.range(c[0],c[1]+1,1)),null!=l&&l.tickValues(d3.range(c[0],c[1]+1,1))}else o.tickValues(null),null!=l&&l.tickValues(null)}))},e.D3Graph.prototype._getYearlyTickValues=function(){for(var e=[],t=this.xRange.domain(),a=moment.utc(t[0]),i=moment.utc(t[1]).diff(a,"days"),r=0;r<=i;r++){a.add(1,"days");var n=a.format("D");1!=n&&15!=n||e.push(1e3*a.unix())}return e},e.D3Graph.prototype._resetTooltip=function(){this.focusGroup.selectAll("circle.highlighted-plot-point").attr("transform","translate(-1000,-1000)"),this.focusGroup.select("line.tooltip-x").attr("transform","translate(0,0)"),t(".tooltip").html()},e.D3Graph.prototype.update=function(e,t,a,i){var r=t==this.settings.bucketTimeStep;this.settings.lineData=e,this.settings.bucketTimeStep=t,this.settings.xAxisDomain=a,i&&this.refresh(r)},e.D3Graph.prototype.refresh=function(e){this._resetTooltip(),this._visualize(e)},e.D3Graph.prototype._getXAxisTickDuration=function(){switch(this.settings.bucketTimeStep){case 5:return d3.timeMinute.every(30);case 30:return d3.timeHour.every(3);case 180:return d3.timeHour.every(12);default:return d3.timeMinute.every(5)}},e.D3Graph.prototype.getTimestampByPixelLocation=function(e){return this.xRange.invert(e)},e.D3Graph.prototype.getPixelLocationByTimestamp=function(e){return this.xRange(e)},e.D3Graph.prototype._isTime24HourFormat=function(){let t=!1;return t="12"!==e.user.userTimeUnits(),t},e.D3Graph.TYPE_LINE="line",e.D3Graph.TYPE_SCATTER="scatter",e.D3Graph.TYPE_BUBBLE="bubble",e.D3Graph.TYPE_WIND_ARROW="wind-arrow",e.D3Graph.TYPE_BAR="bar",e.D3Graph.TYPE_CANDLESTICK="candlestick",e.D3Graph.YAXIS_MAIN="main",e.D3Graph.YAXIS_SECONDARY="secondary"}(window.SWD=window.SWD||{},jQuery),function(e){e.StateManager=function(t){this.settings=$.extend({},{stateChanged:null},t),this.state={locationId:null,view:"",stationName:"",graph:{deviceId:null,param:null,zoom:null},history:{period:null,day:null,month:null,year:null},map:{lat:null,lon:null,zoom:null,mapType:null,overlayType:null,showZoom:!0,showLegend:!0,mapTheme:null,clickedMarkerId:null},dashboard:{},alertInfo:!1,alertId:null,isArbitrary:!1,isClicked:!1,tab:e.StateManager.TAB_FORECAST},this._parse(),this._attachEventHandlers()},e.StateManager.prototype._parse=function(){let t=window.location.pathname;t=t.replace(/^\//,""),t=t.replace(/\/$/,"");const a=t.split("/"),i=new URLSearchParams(window.location.search),r=JSON.parse(e.Storage.getLocalItem("mapState"));r&&(r.mapType&&(this.state.map.mapType=r.mapType),void 0!==r.showZoom&&(this.state.map.showZoom=r.showZoom),void 0!==r.showLegend&&(this.state.map.showLegend=r.showLegend),r.mapTheme&&(this.state.map.mapTheme=r.mapTheme),r.lat&&(this.state.map.lat=r.lat),r.lon&&(this.state.map.lon=r.lon),r.zoom&&(this.state.map.zoom=r.zoom),r.overlayType&&(this.state.map.overlayType=r.overlayType),r.clickedMarkerId&&(this.state.map.clickedMarkerId=r.clickedMarkerId));const n=a[0];if("radar"===n?(this.state.tab=e.StateManager.TAB_RADAR,this.state.map.overlayType="radar"):"map"===n?(this.state.map.overlayType||(this.state.map.overlayType="map"),"radar"===this.state.map.overlayType?this.state.tab=e.StateManager.TAB_RADAR:this.state.tab=e.StateManager.TAB_MAP):"history"===n?this.state.tab=e.StateManager.TAB_HISTORY:"loc"===n?(this.state.tab=e.StateManager.TAB_FORECAST,this.state.isArbitrary=!0):"forecast"===n&&(this.state.tab=e.StateManager.TAB_FORECAST),this.state.tab===e.StateManager.TAB_MAP||this.state.tab===e.StateManager.TAB_RADAR){const e=a.indexOf(n),t=a.length-(e+1);if(1===t)this.state.locationId=this._getIntValue(a[e+1]);else if(3===t)this.state.map.lat=this._getFloatValue(a[e+1]),this.state.map.lon=this._getFloatValue(a[e+2]),this.state.map.zoom=this._getIntValue(a[e+3]);else if(4===t)this.state.locationId=this._getIntValue(a[e+1]),this.state.map.lat=this._getFloatValue(a[e+2]),this.state.map.lon=this._getFloatValue(a[e+3]),this.state.map.zoom=this._getIntValue(a[e+4]);else if(5===t){this.state.locationId=this._getIntValue(a[e+1]),this.state.map.lat=this._getFloatValue(a[e+2]),this.state.map.lon=this._getFloatValue(a[e+3]),this.state.map.zoom=this._getIntValue(a[e+4]);const t=a[e+5];this.state.map.clickedMarkerId=t}}else if(this.state.tab===e.StateManager.TAB_HISTORY)for(let e=0;e":"",e+="

    ",e+="

    "+this.settings.labels.instructionsLabel+"

    ",e+="
    ",e+="
    ",e+="",e+="
    ",e+="",t(this.target).append(e),this._attachEventHandlers()},e.LocationSelection.prototype._attachEventHandlers=function(){var a=this;t("#cancel-location").on("click touchend",(function(){a._close()})),t("#save-location").on("click touchend",(function(){if("function"==typeof a.settings.locationUpdated){var i=a.map.getCenter(),r=i.lat(),n=i.lng(),s={lat:r,lng:n},o=t("#change-name").val();if(""!==o&&void 0!==o&&t("#change-name").length>0)var l=e.sanitizeForHTML(o);a.map.elevation.getElevationForLocations({locations:[s]}).then((function(e){a.settings.locationUpdated(r,n,l,e.results[0].elevation)})),a._close()}else a._close()}))},e.LocationSelection.prototype._initMap=function(e,a){var i=this,r={lat:e,lng:a};null==this.map?(this.map=new google.maps.Map(t(".location-selection-map")[0],{center:r,zoom:17,elevation:new google.maps.ElevationService,mapTypeId:google.maps.MapTypeId.SATELLITE,streetViewControl:!1,disableDefaultUI:!0,panControl:!1,rotateControl:!1,fullscreenControl:!1,tilt:0}),t(this.map.getDiv()).append("
    "),this.map.addListener("idle",(function(){var e=i.map.getCenter();i._updateTitle(e.lat(),e.lng())}))):this.map.setCenter(r)},e.LocationSelection.prototype._updateTitle=function(e,a){t("h1.location-lat-lon",this.target).html(parseFloat(e).toFixed(5)+", "+parseFloat(a).toFixed(5))},e.LocationSelection.prototype._updateLocationTitle=function(e){null!=e&&t("h3.location-title",this.target).html(e)},e.LocationSelection.prototype._close=function(){t("body").removeClass("modal-open"),t(".location-selection-ctn",this.target).hide(),this.settings.isDrawn&&t(".location-selection-ctn",this.target).remove()},e.LocationSelection.prototype.open=function(e,a){t("body").addClass("modal-open"),t(".location-selection-ctn",this.target).show(),this._updateTitle(e,a),this._updateLocationTitle(this.settings.location),this._initMap(e,a)}}(window.SWD=window.SWD||{},jQuery),function(e){e.DataDisplay.getValue=function(e){return null!=e&&null!=e?e:""},e.DataDisplay.getBooleanValue=function(e){return null!=e&&null!=e&&e},e.DataDisplay.getLatLon=function(t,a){return t=e.DataDisplay.getValue(t),a=e.DataDisplay.getValue(a),""!=t&&""!=a?t+", "+a:""},e.DataDisplay.getElevationValueInMeters=function(t){return t=t.replace(/[^0-9.-]+/g,""),e.user.userOtherUnits()==e.OtherUnit.IMPERIAL&&(t*=.3048),t},e.DataDisplay.getNumberWithPrecision=function(e,t){var a="";return""!==(e=this.getValue(e))&&(a=e.toFixed(t)),a},e.DataDisplay.getNumberWithPrecisionAndUnits=function(t,a){return e.user.userOtherUnits()==e.OtherUnit.IMPERIAL&&(t*=3.28084),(t=e.DataDisplay.getNumberWithPrecision(t,a))+" "+e.ElevationUnit[e.user.userOtherUnits().toUpperCase()]},e.DataDisplay.getValueOrNull=function(e){return null!=e&&null!=e?e:null}}(window.SWD=window.SWD||{}),function(e,t){e.DropDown=function(e){this._refreshInterval=9e5,this._lastAPICall=0,this._timeout=null,this.settings=t.extend({},{locationId:null,locationType:null,isArbitrary:!1,isDashboard:!1,isMap:!1,changeLocationData:null,showSearchLocation:null,getLocationlist:null,changeView:null,closeList:null,deleteLocation:null},e),this._init()},e.DropDown.prototype._init=function(){const t=e.Storage.getLocalObject("lastViewed");("arbitrary"==this.settings.locationType||t.isArbitrary)&&(this.settings.isArbitrary=!0),this.addEvents(),this.addSearchEvents(),this.initArbView(),this._watchForOpen()},e.DropDown.prototype._watchForOpen=function(){const e=this,t=document.getElementById("locations-list");t&&new MutationObserver((function(a){a.forEach(a=>{"attributes"===a.type&&"class"===a.attributeName&&t.classList.contains("show")&&e._maybeRefresh()})})).observe(t,{attributes:!0})},e.DropDown.prototype._maybeRefresh=function(){const e=Date.now();0!==this._lastAPICall&&e-this._lastAPICall0))return"function"==typeof a.settings.changeLocationData&&a.settings.changeLocationData(a.settings.locationId),"function"==typeof a.settings.closeList&&a.settings.closeList(!0),!1})),t(".hdr-menu").on("click",".arb-delete-btn",(function(e){e.stopPropagation(),e.preventDefault();const a=t(this).closest(".location-list-item").attr("data-id");t(".delete-arb-location[data-id='"+a+"']").removeClass("sr-only")})),t(".hdr-menu").on("click",".delete-arb-location",(function(e){e.stopPropagation(),e.preventDefault();const i=t(this).attr("data-id");"function"==typeof a.settings.deleteLocation&&a.settings.deleteLocation(i),t(this).addClass("sr-only")})),t(".dd-item").on("mouseenter",(function(){t(this).find(".arb-delete-btn").css("visibility","visible")})).on("mouseleave",(function(){const e=t(this).attr("data-id");t(this).find(".arb-delete-btn").css("visibility","hidden"),t(".delete-arb-location[data-id='"+e+"']").addClass("sr-only")}))},e.DropDown.prototype.addSearchEvents=function(){const a=this;t("input[type='text']").keyup("#search-bar",(function(i){if(38!=i.which&&40!=i.which)if(13==i.which){const r=t("#arb-location-list").find("#arb-location-item.highlight").attr("data-key"),n=t("#arb-location-list").find("#arb-location-item.highlight").text();t("body").removeClass("arb-grid");let s=e.mgr.getState();if(s.view="",e.mgr.setState(s),null!=r&&""!=n&&"function"==typeof a.settings.deleteLocation){const e={key:r};a.settings.showSearchLocation(e,n)}else i.preventDefault()}else a.settings.getLocationList()})),t("input[type='text']").keyup("#search-bar",(function(e){38!=e.which&&40!=e.which&&(t("#search-bar").val()?t(".search-close").show():t(".search-close").hide(),8==e.which&&""==!t("#search-bar").val()&&a.settings.getLocationList(),27==e.which&&(t("#search-bar").val(""),t(".search-close").hide(),a.settings.closeList()))})),t(".search-close").on("click touchend",(function(){return t("body").hasClass("temp-view")||a.settings.closeList(),t("#search-bar").val(""),t(".search-close").hide(),!1})),t("body").on("click touchend","#arb-location-item",(function(){let i=e.mgr.getState();i.view="",e.mgr.setState(i);const r=t(this).attr("data-key"),n=t(this).find(".search-location-name").text(),s={key:r};t("#arb-location-list>#arb-location-item.highlight").removeClass("highlight"),t("body").removeClass("arb-grid"),t(this,"arb-location-item").addClass("highlight"),"function"==typeof a.settings.deleteLocation&&a.settings.showSearchLocation(s,n)}))},e.DropDown.prototype.initStationListConditions=async function(){const a=t("#station-location-list").children(),i=this;for(var r=0;rthis.initStationListConditions(),e)},e.DropDown.prototype.destroyTimeout=function(){this._timeout&&(clearTimeout(this._timeout),this._timeout=null)}}(window.SWD=window.SWD||{},jQuery),function(e,t){e.Alerts=function(e){this.settings=t.extend({},{lat:null,lon:null,name:null,timeZone:null,stateChanged:null},e),this._init()},e.Alerts.prototype._init=function(){var a=this,i={lat:this.settings.lat,lon:this.settings.lon};e.makeRequest("alerts",i,(function(e){if(0===e.status.status_code&&null!=e.alerts){var i="";t("#alert-list").empty(),t("#alerts-view > #page-header > h1").text(a.settings.name);for(var r=0;r\n

    \n\t\t\t\t\t\t\t${o=n.color,l=void 0,l=`\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\n \t\t`,l}\n ${n.event}\n

    \n

    ${s}

    \n

    ${n.issuer}

    \n `}t("#alert-list").append(i)}else null==e.alerts?(window.alert("There are no alerts for this location."),window.location.href="/"):(window.alert("Error fetching alerts"),window.location.href="/");var o,l})),setTimeout((function(){a._init()}),9e5),this._attachEventHandlers()},e.Alerts.prototype._attachEventHandlers=function(){var a=this;t("#alert-list").unbind().on("click","#wwa-item",(function(){var i=t(this).attr("data-id");e.mgr.setAlertInfo(!0),e.mgr.setAlertId(i),t("body").addClass("view-alert-info"),t("body").removeClass("view-alerts"),t("body").removeClass("view-forecast"),new e.Alert({lat:a.settings.lat,lon:a.settings.lon,alert_id:i,timeZone:a.settings.timeZone,stateChanged:a.settings.stateChanged})})),t("#back").click((function(){e.mgr.setView("");var t=e.mgr.getState();return a.settings.stateChanged(t),!1}))},e.Alerts.prototype.getDate=function(t,a){const i=this.settings.timeZone,r=moment().tz(i),n=r.unix(),s=r.format("dddd"),o=this._isTime24HourFormat()?"HH:mm":"h:mma",l=void 0!==t?moment(1e3*t).tz(i):null,c=void 0!==a?moment(1e3*a).tz(i):null,u=l?l.format("dddd"):null,d=c?c.format("dddd"):null,p=l?l.format(o):null,h=c?c.format(o):null;if(void 0===t&&void 0===a)return e.user.localize("AlertsMessageFurtherNotice");if(void 0===t&&void 0!==a)return`${e.user.localize("AlertsTextUntil")} ${h} ${d}`;if(t=n){if(c){const t=u!==d?`${d} ${h}`:h;return`${e.user.localize("AlertsTextTodayAt")} ${p} ${e.user.localize("AlertsTextUntil").toLowerCase()} ${t}`}return`${e.user.localize("AlertsTextTodayAt")} ${p}`}return""},e.Alerts.prototype._isTime24HourFormat=function(){return"24"===e.user.userTimeUnits()}}(window.SWD=window.SWD||{},jQuery),function(e,t){var a=null;e.Alert=function(e){this.settings=t.extend({},{lat:null,lon:null,alert_id:null,timeZone:null,oneAlert:!1,stateChanged:null},e),this._init()},e.Alert.prototype._init=function(){var a=this,i={include_geom:!0,alert_id:this.settings.alert_id};e.makeRequest("alert",i,(function(e){0===e.status.status_code?(a.draw(e),null!=e.alert.geom?(a._initMap(),a.drawPolygon(e)):(t("#alert-map").hide(),t(".affected-area").hide(),t(".nws-alert").css("padding","15px 15px")),a._attachEventHandlers()):(window.alert("Error fetching alert"),window.location.href="/")}))},e.Alert.prototype._attachEventHandlers=function(){var a=this;t("#alert-back").unbind().click((function(){if("function"==typeof a.settings.stateChanged){1==a.settings.oneAlert&&e.mgr.setView(""),e.mgr.setAlertInfo(!1);var t=e.mgr.getState();a.settings.stateChanged(t)}return!1}))},e.Alert.prototype._initMap=function(){var i={lat:this.settings.lat,lng:this.settings.lon};const r=e.DarkModeMapStyles;a=new google.maps.Map(document.getElementById("alert-map"),{center:i,disableDefaultUI:!0,gestureHandling:"none",keyboardShortcuts:!1,styles:t("html").hasClass("dark")?r:[{featureType:"poi",elementType:"labels",stylers:[{visibility:"off"}]}],tilt:0});var n={url:"/images/location-marker-grow-3x.png",scaledSize:new google.maps.Size(33,42)};new google.maps.Marker({position:i,icon:n,map:a,clickable:!1})},e.Alert.prototype.drawPolygon=function(e){for(var t=new google.maps.LatLngBounds,i=e.alert.geom.geom.coordinates,r=e.alert.geom.bounding_box.coordinates,n=(i.map((function(t,i){for(var r=[],n=[],s=t[0],o=0;o #page-header > h1").text(a.event),r+=`\n
    \n

    ${i}

    \n

    Affected Area:

    \n
    \n
    \n ${a.description}\n
    \n
    \n `,t("#alert-info-view").append(r)},e.Alert.prototype.getDate=function(t,a){var i="",r=(new moment).tz(this.settings.timeZone).unix(),n=moment().tz(this.settings.timeZone).format("dddd"),s=null!=t?moment(1e3*t).tz(this.settings.timeZone).format("dddd"):null,o=null!=a?moment(1e3*a).tz(this.settings.timeZone).format("dddd"):null,l=this._isTime24HourFormat()?"HH:mm":"h:mma",c=null!=t?moment(1e3*t).tz(this.settings.timeZone).format(l):null,u=null!=a?moment(1e3*a).tz(this.settings.timeZone).format(l):null;return null==t&&null==a?i+=e.user.localize("AlertsMessageFurtherNotice"):null==t&&null!=a?i+=`${e.user.localize("AlertsTextUntil")} ${u} ${o}`:s==n&&t=r&&(i+=`${e.user.localize("AlertsTextTodayAt")} ${null==a?c:c+` ${e.user.localize("AlertsTextUntil").toLowerCase()} ${s!=o?o+" "+u:u}`}`),i},e.Alert.prototype._isTime24HourFormat=function(){return"24"===e.user.userTimeUnits()},e.Alert.prototype.updateAlert=function(a){var i=this,r={include_geom:!0,alert_id:a};e.makeRequest("alert",r,(function(e){0===e.status.status_code?(i.draw(e),null!=e.alert.geom?(i._initMap(),i.drawPolygon(e)):(t("#alert-map").hide(),t(".affected-area").hide(),t(".nws-alert").css("padding","15px 15px")),i._attachEventHandlers()):(window.alert("Error fetching alert"),window.location.href="/")}))}}(window.SWD=window.SWD||{},jQuery),function(e){e.RadarTiles=function(e){this.defaultSettings={defaultFrameCount:25},this.settings=$.extend({},this.defaultSettings,e),this.alt=null,this.name=null,this.projection=null,this.radius=6378137,this.frameIdx=0,this.transparency=.75,this.dates=[],this.tiles=new Array,this.transparency=.75,this.defaultTimeStep=3e5,this.timeStep=this.defaultTimeStep,this.frameCount=this.settings.defaultFrameCount,this.tileSize=new google.maps.Size(256,256),this.baseURL="https://d2ws9h7mk4m5xb.cloudfront.net/tiles/",this.devURL="https://d1p7nsbn36wy46.cloudfront.net/tiles/"},e.RadarTiles.prototype.getTile=function(e,t,a){const i=this.drawTileDiv(e,t,a);return this.createImg(i,this.frameIdx),this.loadImage(i,this.frameIdx),this.tiles.push(i),i},e.RadarTiles.prototype.drawTileDiv=function(e,t,a){const i=a.createElement("div");return i.style.width=this.tileSize.width+"px",i.style.height=this.tileSize.height+"px",i.style.fontSize="10",$(i).css({opacity:this.transparency}),i.coord=e,i.zoom=t,i.frames=this.getFrames(e,t),i},e.RadarTiles.prototype.releaseTile=function(e){for(var t=0;t=this.frameCount&&(this.frameIdx=this.frameCount-1),this.reloadFrames()}},e.RadarTiles.prototype.getDefaultFrameCount=function(){return this.settings.defaultFrameCount},e.RadarTiles.prototype.getMeta=function(){return""},e.RadarTiles.prototype.getDates=function(){return this.dates},e.RadarTiles.prototype.setDates=function(e){this.dates=e},e.RadarTiles.prototype.setDate=function(e){var t=this.dates;if(t[0].getTime()>e.getTime())return!1;if(t[t.length-1].getTime()=e.getTime()){this.setFrameIdx(a);break}return!0},e.RadarTiles.prototype.getCurrentFrameIdx=function(){return this.frameIdx},e.RadarTiles.prototype.setFrameIdx=function(e){this.frameIdx!=e&&(this.frameIdx=e,this.frameIdx<0&&(this.frameIdx=0),this.frameIdx>=this.frameCount&&(this.frameIdx=this.frameCount-1),this.refresh())},e.RadarTiles.prototype.stepFrame=function(){for(var e=(this.frameIdx+1)%this.frameCount,t=!0,a=0;a0?e>=0&&e=this.times.length&&(e=0),this.setFrameIdx(e)},e.RadarAnimator.prototype.previous=function(){var e=this.frameIdx-1;e<0&&(e=this.times.length-1),this.setFrameIdx(e)},e.RadarAnimator.prototype.first=function(){this.frameCount>0&&this.setFrameIdx(0)},e.RadarAnimator.prototype.last=function(){this.frameCount>0&&this.setFrameIdx(this.times.length-1)},e.RadarAnimator.prototype.start=function(){if(null==this.intervalId){var e=this,t=0;this.intervalId=setInterval((function(){e.frameIdx==e.times.length-1&&t<3?t++:(t=0,e.stepFrame())}),this.interval)}},e.RadarAnimator.prototype.stop=function(){null!=this.intervalId&&(clearInterval(this.intervalId),this.intervalId=null)},e.RadarAnimator.prototype.stepFrame=function(){var e=!0;0==this.overlay.stepFrame()&&(e=!1),e&&(this.next(),this.updateTimestamp(this.times[this.frameIdx]),this.updateSlider(this.frameIdx))},e.RadarAnimator.prototype.addOverlay=function(e){this.overlay=e,this.calcFrames()},e.RadarAnimator.prototype.removeOverlay=function(e){this.overlay===e&&this.overlay.splice(0,1),this.calcFrames()},e.RadarAnimator.prototype.getTimeSteps=function(){return this.times},e.RadarAnimator.prototype.calcFrames=function(){this.frameCount=-1,this.timeStep=-1,this.times=new Array,this.overlay.getDefaultFrameCount()>this.frameCount&&(this.frameCount=this.overlay.getDefaultFrameCount()),this.overlay.getDefaultTimeStep()>this.timeStep&&(this.timeStep=this.overlay.getDefaultTimeStep()),this.calcDates(),this.syncOverlays();var e=null;if(this.times.length>0&&this.frameIdx>=0&&this.frameIdx0&&this.timeStep>0){this.now=this.latestRadarTimestamp?e:Math.floor((e-9e4)/this.timeStep)*this.timeStep,this.times=new Array;for(var t=this.frameCount-1;t>=0;t--){var a=this.latestRadarTimestamp&&0==t?new Date(this.now):new Date(this.now-this.timeStep*t);this.times.push(a)}}},e.RadarAnimator.prototype.getFrameStart=function(){var e=0;return this.times.length>0&&(e=this.times.length-1),this.overlay.hasOwnProperty("defaultAnimationStart")&&0==this.overlay.defaultAnimationStart&&(e=0),e},e.RadarAnimator.prototype.setLatestRadarTimestamp=function(e){this.latestRadarTimestamp=e?new Date(e):null,this.updateSlider(this.frameIdx),this.updateTimestamp(e)},e.RadarAnimator.prototype.updateTimestamp=function(t){let a,i=Intl.DateTimeFormat().resolvedOptions().timeZone;const r=this._isTime24HourFormat()?"HH:mm":"h:mm A";a=i&&moment.tz.names().includes(i)?moment(t).tz(i).format(`ddd MMM D | ${r} z`):moment(t).format(`ddd MMM D | ${r}`);const n=new e.TimestampValue(moment(t).unix()).localRadarFuzzyTime();$(".swd-timeline__timestamp").text(a).show(),$(".swd-timeline__mins-ago").text(n)},e.RadarAnimator.prototype._isTime24HourFormat=function(){return"24"===e.user.userTimeUnits()},e.RadarAnimator.prototype.updateSlider=function(e){const t=this.times.length-1,a=Math.min(e,t),i=document.querySelector(".swd-timeline__slider-track"),r=document.querySelector(".swd-timeline__slider-thumb"),n=i.offsetWidth-r.offsetWidth,s=n/t*a,o=s/n*100;r.style.left=`${s}px`,i.style.backgroundSize=`${o}% 100%`},e.RadarAnimator.prototype.refresh=function(){this.calcFrames(),null!=this.map.overlays[0].overlay&&this.map.overlays[0].overlay.reload()}}(window.SWD=window.SWD||{}); //# sourceMappingURL=../../sourcemaps/js/main-96c5c61bb4.min.js.map