var signalrHubStarted=!1;$(function(){try{var n=$.connection.signalRHub;n.client.sessionExpired=function(n){var t=window.location.href.substr(baseUrl.length);t.indexOf("Login")!=0&&(n==!0&&(sessionStorage.expired=!0),window.location.href=window.location.href)};n.client.userLoggedOut=function(){var n=window.location.href.substr(baseUrl.length);n.indexOf("Login")!=0&&(sessionStorage.userLoggedOut=!0,window.location.href=baseUrl+"/Logout")};n.client.accountContactsExported=function(){$("#button-exportaccountcontacts").loader().hide();n.client.fileDownloaded()};n.client.fileDownloaded=function(){cancelPageLoadEvent();$("header").loader().hide();$("#content:not(.layout-public)").loader().hide()};n.client.gotDashboardChart=function(n,t){Dashboard.chartLoaded(n,jQuery.parseJSON(t))};n.client.pageLoading=function(){$("header").loader().show({message:""});$("#content .blockUI.ci-blockmessage").remove();$("#content:not(.layout-public)").loader().show()};$.connection.hub.disconnected(function(){n.client.fileDownloaded()})}catch(t){console.log(t)}});$(function(){var t,n;try{$.pnotify.defaults.styling="jqueryui";$.pnotify.defaults.stack={dir1:"down",dir2:"left",push:"bottom",spacing1:16,spacing2:25};$.pnotify.defaults.animate_speed="fast";$.pnotify.defaults.history=!1;t=$.connection.clientNotificationsHub;t.client.notify=function(n,t,i,r,u,f,e){u===!0&&Dialog.alert({id:f,title:i,message:n,details:t,type:r.toLowerCase(),callback:e})};n=function(t){$.connection.hub.logging=!0;$.connection.hub.start({transport:t||"auto"}).done(function(){console.log("SignalR Connected. connectionId: "+$.connection.hub.id+", transport: "+$.connection.hub.transport.name);CentralUiAjax.injectSignalrConnectionId()}).fail(function(i){console.log("SignalR could not connect. error: "+i);t||(console.log("SignalR fallback"),n("longPolling"))})};$.browser.mozilla&&$(window).bind("beforeunload",function(){var t=function(){$.connection.hub.stop();n()};setTimeout(t,10)});n()}catch(i){console.log(i)}})