{"version":3,"file":"notifications.min.js","sources":["../../../js/globalization.js","../../../js/platform/platform.js","../../../js/notifications/notifications.js","../../../js/SignalR/webpack:/signalR/webpack/universalModuleDefinition","../../../js/SignalR/webpack:/signalR/webpack/bootstrap","../../../js/SignalR/webpack:/signalR/src/browser-index.ts","../../../js/SignalR/webpack:/signalR/node_modules/es6-promise/dist/es6-promise.auto.js","../../../js/SignalR/webpack:/signalR/common/node_modules/webpack/buildin/global.js","../../../js/SignalR/webpack:/signalR/src/index.ts","../../../js/SignalR/webpack:/signalR/src/Errors.ts","../../../js/SignalR/webpack:/signalR/src/HttpClient.ts","../../../js/SignalR/webpack:/signalR/src/DefaultHttpClient.ts","../../../js/SignalR/webpack:/signalR/src/EmptyNodeHttpClient.ts","../../../js/SignalR/webpack:/signalR/src/XhrHttpClient.ts","../../../js/SignalR/webpack:/signalR/src/ILogger.ts","../../../js/SignalR/webpack:/signalR/src/HubConnection.ts","../../../js/SignalR/webpack:/signalR/src/HandshakeProtocol.ts","../../../js/SignalR/webpack:/signalR/src/TextMessageFormat.ts","../../../js/SignalR/webpack:/signalR/src/Utils.ts","../../../js/SignalR/webpack:/signalR/src/Loggers.ts","../../../js/SignalR/webpack:/signalR/src/IHubProtocol.ts","../../../js/SignalR/webpack:/signalR/src/HubConnectionBuilder.ts","../../../js/SignalR/webpack:/signalR/src/HttpConnection.ts","../../../js/SignalR/webpack:/signalR/src/ITransport.ts","../../../js/SignalR/webpack:/signalR/src/LongPollingTransport.ts","../../../js/SignalR/webpack:/signalR/src/AbortController.ts","../../../js/SignalR/webpack:/signalR/src/ServerSentEventsTransport.ts","../../../js/SignalR/webpack:/signalR/src/WebSocketTransport.ts","../../../js/SignalR/webpack:/signalR/src/JsonHubProtocol.ts"],"sourcesContent":["function GetLanguage(useParent) {\r\n var userLanguage = \"en-US\";\r\n\r\n var cookie = getCookie(\"layout\");\r\n var cookies = cookie.split(\"&\");\r\n for (var i = 0; i < cookies.length; i++) {\r\n var dateIndex = cookies[i].indexOf(\"userLanguage=\");\r\n if (dateIndex > -1) {\r\n userLanguage = cookies[i].substring(13);\r\n break;\r\n }\r\n }\r\n\r\n if (useParent) {\r\n var indexOfDash = userLanguage.indexOf('-');\r\n if (indexOfDash > -1) {\r\n userLanguage = userLanguage.substring(0, indexOfDash);\r\n }\r\n }\r\n\r\n return userLanguage;\r\n}\r\n\r\nfunction GetUserDateFormat(originalCase) {\r\n var userDateFormat = \"MM/DD/YYYY\";\r\n\r\n var cookie = getCookie(\"layout\");\r\n var cookies = cookie.split(\"&\");\r\n for (var i = 0; i < cookies.length; i++) {\r\n var dateIndex = cookies[i].indexOf(\"userDateFormat=\");\r\n if (dateIndex > -1) {\r\n if (originalCase)\r\n userDateFormat = cookies[i].substring(15);\r\n else\r\n userDateFormat = cookies[i].substring(15).toUpperCase();\r\n break;\r\n }\r\n }\r\n\r\n return userDateFormat;\r\n}\r\n\r\nfunction GetUserDateTimeFormat () {\r\n var userDateFormat = \"MM/DD/YYYY\";\r\n var userTimeFormat = \"hh:mm A\";\r\n\r\n var cookie = getCookie(\"layout\");\r\n var cookies = cookie.split(\"&\");\r\n for (var i = 0; i < cookies.length; i++) {\r\n var dateIndex = cookies[i].indexOf(\"userDateFormat=\");\r\n var timeIndex = cookies[i].indexOf(\"userTimeFormat=\");\r\n\r\n if (dateIndex > -1) {\r\n userDateFormat = cookies[i].substring(15).toUpperCase();\r\n }\r\n\r\n if (timeIndex > -1) {\r\n userTimeFormat = cookies[i].substring(15);\r\n userTimeFormat = userTimeFormat.replace(\"tt\", \"A\");\r\n }\r\n }\r\n\r\n return userDateFormat + \" \" + userTimeFormat;\r\n}\r\n\r\nfunction GetUserTimeZone() {\r\n var userTimeZone = \"America/New_York\";\r\n\r\n var cookie = getCookie(\"layout\");\r\n var cookies = cookie.split(\"&\");\r\n for (var i = 0; i < cookies.length; i++) {\r\n var dateIndex = cookies[i].indexOf(\"userTimeZone=\");\r\n if (dateIndex > -1) {\r\n userTimeZone = cookies[i].substring(13);\r\n break;\r\n }\r\n }\r\n\r\n return userTimeZone;\r\n}\r\n\r\nfunction GetTimeFormat() {\r\n return Show24Hours() ? \"HH:mm\" : \"hh:mm A\";\r\n}\r\n\r\nfunction Show24Hours() {\r\n var show24Hours = true;\r\n var cookie = getCookie(\"layout\");\r\n var cookies = cookie.split(\"&\");\r\n\r\n for (var i = 0; i < cookies.length; i++) {\r\n var timeIndex = cookies[i].indexOf(\"userTimeFormat=\");\r\n \r\n if (timeIndex > -1) {\r\n var userTimeFormat = cookies[i].substring(15);\r\n if (userTimeFormat.indexOf(\"tt\") > -1)\r\n show24Hours = false;\r\n }\r\n }\r\n\r\n return show24Hours;\r\n}\r\n\r\nfunction getCookie(cname) {\r\n var name = cname + \"=\";\r\n var decodedCookie = decodeURIComponent(document.cookie);\r\n var ca = decodedCookie.split(';');\r\n for (var i = 0; i < ca.length; i++) {\r\n var c = ca[i];\r\n while (c.charAt(0) == ' ') {\r\n c = c.substring(1);\r\n }\r\n if (c.indexOf(name) == 0) {\r\n return c.substring(name.length, c.length);\r\n }\r\n }\r\n return \"\";\r\n}\r\n\r\nfunction ConvertFromUtcToLocalDateTimeFromNow(utcDateTime) {\r\n try {\r\n var justNow = \"Just Now\";\r\n\r\n var userTimeZone = GetUserTimeZone();\r\n var localDateTimeFromNow = moment.utc(utcDateTime).tz(userTimeZone).fromNow();\r\n\r\n if (localDateTimeFromNow.indexOf(justNow) > -1)\r\n localDateTimeFromNow = moment.utc(utcDateTime).tz(userTimeZone).fromNow(true);\r\n\r\n return localDateTimeFromNow;\r\n } catch (e) {\r\n console.log(e);\r\n\r\n return utcDateTime;\r\n }\r\n}\r\n\r\nfunction ConvertFromUtcToLocalDateWithUserFormat(utcDateTime) {\r\n try {\r\n var userTimeZone = GetUserTimeZone();\r\n var localDate = moment.utc(utcDateTime).tz(userTimeZone).toDate();\r\n var userdateFormat = GetUserDateFormat();\r\n\r\n return formatDateTime(localDate, userdateFormat);\r\n } catch (e) {\r\n console.log(e);\r\n\r\n return utcDateTime;\r\n }\r\n}\r\n\r\nfunction formatDateTime(dateTime, dateTimeFormat) {\r\n return moment(dateTime).format(dateTimeFormat);\r\n}","var EnsembleVideo = EnsembleVideo || {};\r\nEnsembleVideo.Platform = function () {\r\n\r\n //GLOBALLY USEFUL VARIABLES\r\n //Note: These values are set automatically during the Init function.\r\n //Stores whether we're currently initializing the most popular functions.\r\n this.initCompleted= false;\r\n this.isWebkit= false; //Stores the result of DetectWebkit()\r\n this.isMobilePhone= false; //Stores the result of DetectMobileQuick()\r\n this.isIphone= false; //Stores the result of DetectIphone()\r\n this.isAndroid= false; //Stores the result of DetectAndroid()\r\n this.isIos = false;//Stores the result of DetectIos()\r\n this.isWindowsPhone = false;\r\n this.isAndroidPhone= false; //Stores the result of DetectAndroidPhone()\r\n this.isTierTablet= false; //Stores the result of DetectTierTablet()\r\n this.isTierIphone= false; //Stores the result of DetectTierIphone()\r\n this.isTierRichCss= false; //Stores the result of DetectTierRichCss()\r\n this.isTierGenericMobile= false; //Stores the result of DetectTierOtherPhones()\r\n //INTERNALLY USED DETECTION STRING VARIABLES\r\n this.engineWebKit= 'webkit';\r\n\r\n this.deviceIphone= 'iphone';\r\n this.deviceIpod= 'ipod';\r\n this.deviceIpad= 'ipad';\r\n this.deviceMacPpc= 'macintosh'; //Used for disambiguation\r\n\r\n this.deviceAndroid= 'android';\r\n this.deviceGoogleTV= 'googletv';\r\n this.deviceHtcFlyer= 'htc_flyer'; //HTC Flyer\r\n\r\n this.deviceWinPhone7= 'windows phone os 7';\r\n this.deviceWinPhone8 = 'windows phone 8';\r\n this.deviceWinPhone10 = 'windows phone 10',\r\n\r\n this.deviceWinMob= 'windows ce';\r\n this.deviceWindows= 'windows';\r\n this.deviceIeMob = 'iemobile';\r\n this.deviceUbuntu = \"ubuntu\";\r\n this.devicePpc= 'ppc'; //Stands for PocketPC\r\n this.enginePie= 'wm5 pie'; //An old Windows Mobile\r\n\r\n this.deviceBB= 'blackberry';\r\n this.deviceBB10= 'bb10'; //For the new BB 10 OS\r\n this.vndRIM= 'vnd.rim'; //Detectable when BB devices emulate IE or Firefox\r\n this.deviceBBStorm= 'blackberry95'; //Storm 1 and 2\r\n this.deviceBBBold= 'blackberry97'; //Bold 97x0 (non-touch)\r\n this.deviceBBBoldTouch= 'blackberry 99'; //Bold 99x0 (touchscreen)\r\n this.deviceBBTour= 'blackberry96'; //Tour\r\n this.deviceBBCurve= 'blackberry89'; //Curve 2\r\n this.deviceBBCurveTouch= 'blackberry 938'; //Curve Touch 9380\r\n this.deviceBBTorch= 'blackberry 98'; //Torch\r\n this.deviceBBPlaybook= 'playbook'; //PlayBook tablet\r\n\r\n this.deviceSymbian= 'symbian';\r\n this.deviceSymbos= 'symbos'; //Opera 10 on Symbian\r\n this.deviceS60= 'series60';\r\n this.deviceS70= 'series70';\r\n this.deviceS80= 'series80';\r\n this.deviceS90= 'series90';\r\n\r\n this.devicePalm= 'palm';\r\n this.deviceWebOS= 'webos'; //For Palm's line of WebOS devices\r\n this.deviceWebOShp= 'hpwos'; //For HP's line of WebOS devices\r\n this.engineBlazer= 'blazer'; //Old Palm browser\r\n this.engineXiino= 'xiino'; //Another old Palm\r\n\r\n this.deviceNuvifone= 'nuvifone'; //Garmin Nuvifone\r\n this.deviceBada= 'bada'; //Samsung's Bada OS\r\n this.deviceTizen= 'tizen'; //Tizen OS\r\n this.deviceMeego= 'meego'; //Meego OS\r\n\r\n this.deviceKindle= 'kindle'; //Amazon eInk Kindle\r\n this.engineSilk= 'silk-accelerated'; //Amazon's accelerated Silk browser for Kindle Fire\r\n\r\n //Initialize variables for mobile-specific content.\r\n this.vndwap= 'vnd.wap';\r\n this.wml= 'wml';\r\n\r\n //Initialize variables for random devices and mobile browsers.\r\n //Some of these may not support JavaScript\r\n this.deviceTablet= 'tablet';\r\n this.deviceBrew= 'brew';\r\n this.deviceDanger= 'danger';\r\n this.deviceHiptop= 'hiptop';\r\n this.devicePlaystation= 'playstation';\r\n this.devicePlaystationVita= 'vita';\r\n this.deviceNintendoDs= 'nitro';\r\n this.deviceNintendo= 'nintendo';\r\n this.deviceWii= 'wii';\r\n this.deviceXbox= 'xbox';\r\n this.deviceArchos= 'archos';\r\n\r\n this.engineFirefox= 'firefox', //For Firefox OS\r\n this.engineChrome = 'chrome'; // Chrome browser\r\n this.engineSafari = 'safari';\r\n this.engineOpera = 'opera'; //Popular browser\r\n this.engineInternetExplorer = 'msie'; //Internet Explorer\r\n this.engineTrident = 'trident'; // Internet Explorer 11\r\n this.engineNetfront= 'netfront'; //Common embedded OS browser\r\n this.engineUpBrowser= 'up.browser'; //common on some phones\r\n this.engineOpenWeb= 'openweb'; //Transcoding by OpenWave server\r\n this.deviceMidp= 'midp'; //a mobile Java technology\r\n this.uplink= 'up.link';\r\n this.engineTelecaQ= 'teleca q'; //a modern feature phone browser\r\n this.engineObigo= 'obigo'; //W 10 is a modern feature phone browser\r\n\r\n this.devicePda= 'pda';\r\n this.mini= 'mini'; //Some mobile browsers put 'mini' in their names\r\n this.mobile= 'mobile'; //Some mobile browsers put 'mobile' in their user agent strings\r\n this.mobi= 'mobi'; //Some mobile browsers put 'mobi' in their user agent strings\r\n\r\n //Use Maemo; Tablet; and Linux to test for Nokia's Internet Tablets.\r\n this.maemo= 'maemo';\r\n this.linux= 'linux';\r\n this.mylocom2= 'sony/com'; // for Sony Mylo 1 and 2\r\n\r\n //In some UserAgents; the only clue is the manufacturer\r\n this.manuSonyEricsson= 'sonyericsson';\r\n this.manuericsson= 'ericsson';\r\n this.manuSamsung1= 'sec-sgh';\r\n this.manuSony= 'sony';\r\n this.manuHtc= 'htc';\r\n\r\n //In some UserAgents; the only clue is the operator\r\n this.svcDocomo= 'docomo';\r\n this.svcKddi= 'kddi';\r\n this.svcVodafone= 'vodafone';\r\n\r\n //Disambiguation strings.\r\n this.disUpdate= 'update'; //pda vs. update\r\n\r\n //Holds the User Agent string value.\r\n this.uagent = '';\r\n\r\n this.isChromeBrowser = false;\r\n this.isSafariBrowser = false;\r\n\r\n this.androidVersion = 0.0;\r\n}\r\n\r\nEnsembleVideo.Platform.prototype = {\r\n\r\n //Initializes key platform variables\r\n InitDeviceScan : function () {\r\n this.initCompleted = false;\r\n \r\n if (navigator && navigator.userAgent)\r\n this.uagent = navigator.userAgent.toLowerCase();\r\n\r\n //Save these properties to speed processing\r\n this.isWebkit = this.DetectWebkit();\r\n this.isIphone = this.DetectIphone();\r\n this.isAndroid = this.DetectAndroid();\r\n this.isAndroidPhone = this.DetectAndroidPhone();\r\n this.isIos = this.DetectIos();\r\n\r\n //Generally, these tiers are the most useful for web development\r\n this.isTierIphone = this.DetectTierIphone(); //Do first\r\n this.isTierTablet = this.DetectTierTablet(); //Do second\r\n this.isMobilePhone = this.DetectMobileQuick(); //Do third\r\n\r\n this.isTierRichCss = this.DetectTierRichCss();\r\n this.isTierGenericMobile = this.DetectTierOtherPhones();\r\n\r\n this.isChromeBrowser = this.DetectChromeBrowser();\r\n this.isIeBrowser = this.DetectIeBrowser();\r\n this.isSafariBrowser = this.DetectSafariBrowser();\r\n\r\n this.initCompleted = true;\r\n },\r\n\r\n\r\n //APPLE IOS\r\n\r\n //**************************\r\n // Detects if the current device is an iPhone.\r\n DetectIphone : function () {\r\n if (this.initCompleted || this.isIphone)\r\n return this.isIphone;\r\n\r\n if (this.uagent.search(this.deviceIphone) > -1) {\r\n //The iPad and iPod Touch say they're an iPhone! So let's disambiguate.\r\n if (this.DetectIpad() || this.DetectIpod())\r\n return false;\r\n //Yay! It's an iPhone!\r\n else\r\n return true;\r\n }\r\n else\r\n return false;\r\n },\r\n\r\n //**************************\r\n // Detects if the current device is an iPod Touch.\r\n DetectIpod : function () {\r\n if (this.uagent.search(this.deviceIpod) > -1)\r\n return true;\r\n else\r\n return false;\r\n },\r\n\r\n //**************************\r\n // Detects if the current device is an iPhone or iPod Touch.\r\n DetectIphoneOrIpod : function () {\r\n //We repeat the searches here because some iPods \r\n // may report themselves as an iPhone, which is ok.\r\n if (this.DetectIphone() || this.DetectIpod())\r\n return true;\r\n else\r\n return false;\r\n\r\n \r\n },\r\n\r\n //**************************\r\n // Detects if the current device is an iPad tablet.\r\n DetectIpad : function () {\r\n if (this.uagent.search(this.deviceIpad) > -1 && this.DetectWebkit())\r\n return true;\r\n else\r\n return false;\r\n },\r\n\r\n //**************************\r\n // Detects *any* iOS device: iPhone, iPod Touch, iPad.\r\n DetectIos : function () {\r\n if (this.DetectIphoneOrIpod() || this.DetectIpad())\r\n return true;\r\n else\r\n return false;\r\n },\r\n\r\n\r\n //ANDROID\r\n\r\n //**************************\r\n // Detects *any* Android OS-based device: phone, tablet, and multi-media player.\r\n // Also detects Google TV.\r\n DetectAndroid : function () {\r\n if (this.initCompleted || this.isAndroid)\r\n return this.isAndroid;\r\n \r\n if (this.uagent.search(this.deviceAndroid) > -1) {\r\n this.androidVersion = this.DetectAndroidVersion();\r\n return true;\r\n }\r\n\r\n if (this.DetectGoogleTV())\r\n return true;\r\n\r\n //Special check for the HTC Flyer 7\" tablet. It should report here.\r\n if (this.uagent.search(this.deviceHtcFlyer) > -1)\r\n return true;\r\n else\r\n return false;\r\n },\r\n\r\n //**************************\r\n // Detects if the current device is a (small-ish) Android OS-based device\r\n // used for calling and/or multi-media (like a Samsung Galaxy Player).\r\n // Google says these devices will have 'Android' AND 'mobile' in user agent.\r\n // Ignores tablets (Honeycomb and later).\r\n DetectAndroidPhone : function () {\r\n if (this.initCompleted || this.isAndroidPhone)\r\n return this.isAndroidPhone;\r\n\r\n if (this.DetectAndroid() && (this.uagent.search(this.mobile) > -1))\r\n return true;\r\n //Special check for Android phones with Opera Mobile. They should report here.\r\n if (this.DetectOperaAndroidPhone())\r\n return true;\r\n //Special check for the HTC Flyer 7\" tablet. It should report here.\r\n if (this.uagent.search(this.deviceHtcFlyer) > -1)\r\n return true;\r\n else\r\n return false;\r\n },\r\n\r\n //**************************\r\n // Detects if the current device is a (self-reported) Android tablet.\r\n // Google says these devices will have 'Android' and NOT 'mobile' in their user agent.\r\n DetectAndroidTablet : function () {\r\n //First, let's make sure we're on an Android device.\r\n if (!this.DetectAndroid())\r\n return false;\r\n\r\n //Special check for Opera Android Phones. They should NOT report here.\r\n if (this.DetectOperaMobile())\r\n return false;\r\n //Special check for the HTC Flyer 7\" tablet. It should NOT report here.\r\n if (this.uagent.search(this.deviceHtcFlyer) > -1)\r\n return false;\r\n\r\n //Otherwise, if it's Android and does NOT have 'mobile' in it, Google says it's a tablet.\r\n if (this.uagent.search(this.mobile) > -1)\r\n return false;\r\n else\r\n return true;\r\n },\r\n\r\n //**************************\r\n // Detects if the current device is an Android OS-based device and\r\n // the browser is based on WebKit.\r\n DetectAndroidWebKit : function () {\r\n if (this.DetectAndroid() && this.DetectWebkit())\r\n return true;\r\n else\r\n return false;\r\n },\r\n\r\n //**************************\r\n // Detects if the current device is a GoogleTV.\r\n DetectGoogleTV : function () {\r\n if (this.uagent.search(this.deviceGoogleTV) > -1)\r\n return true;\r\n else\r\n return false;\r\n },\r\n\r\n //**************************\r\n // Detects if the current browser is based on WebKit.\r\n DetectWebkit : function () {\r\n if (this.initCompleted || this.isWebkit)\r\n return this.isWebkit;\r\n\r\n if (this.uagent.search(this.engineWebKit) > -1)\r\n return true;\r\n else\r\n return false;\r\n },\r\n\r\n\r\n //WINDOWS MOBILE AND PHONE\r\n\r\n // Detects if the current browser is EITHER a \r\n // Windows Phone 7, 8, or 10 device.\r\n DetectWindowsPhone : function () {\r\n if (this.DetectWindowsPhone7() ||\r\n this.DetectWindowsPhone8() ||\r\n this.DetectWindowsPhone10())\r\n return true;\r\n else\r\n return false;\r\n },\r\n\r\n //**************************\r\n // Detects a Windows Phone 7.x device (in mobile browsing mode).\r\n DetectWindowsPhone7 : function () {\r\n if (this.uagent.search(this.deviceWinPhone7) > -1)\r\n return true;\r\n else\r\n return false;\r\n },\r\n\r\n //**************************\r\n // Detects a Windows Phone 8 device (in mobile browsing mode).\r\n DetectWindowsPhone8 : function () {\r\n if (this.uagent.search(this.deviceWinPhone8) > -1)\r\n return true;\r\n else\r\n return false;\r\n },\r\n\r\n\r\n //**************************\r\n // Detects a Windows Phone 10 device (in mobile browsing mode).\r\n DetectWindowsPhone10: function () {\r\n if (this.uagent.search(this.deviceWinPhone10) > -1)\r\n return true;\r\n else\r\n return false;\r\n },\r\n\r\n //**************************\r\n // Detects if the current browser is a Windows Mobile device.\r\n // Excludes Windows Phone 7 and later devices. \r\n // Focuses on Windows Mobile 6.xx and earlier.\r\n DetectWindowsMobile : function () {\r\n if (this.DetectWindowsPhone())\r\n return false;\r\n\r\n //Most devices use 'Windows CE', but some report 'iemobile' \r\n // and some older ones report as 'PIE' for Pocket IE. \r\n if (this.uagent.search(this.deviceWinMob) > -1 ||\r\n this.uagent.search(this.deviceIeMob) > -1 ||\r\n this.uagent.search(this.enginePie) > -1)\r\n return true;\r\n //Test for Windows Mobile PPC but not old Macintosh PowerPC.\r\n if ((this.uagent.search(this.devicePpc) > -1) &&\r\n !(this.uagent.search(this.deviceMacPpc) > -1))\r\n return true;\r\n //Test for Windwos Mobile-based HTC devices.\r\n if (this.uagent.search(this.manuHtc) > -1 &&\r\n this.uagent.search(this.deviceWindows) > -1)\r\n return true;\r\n else\r\n return false;\r\n },\r\n\r\n\r\n //BLACKBERRY\r\n\r\n //**************************\r\n // Detects if the current browser is a BlackBerry of some sort.\r\n // Includes BB10 OS, but excludes the PlayBook.\r\n DetectBlackBerry : function () {\r\n if ((this.uagent.search(this.deviceBB) > -1) ||\r\n (this.uagent.search(this.vndRIM) > -1))\r\n return true;\r\n if (this.DetectBlackBerry10Phone())\r\n return true;\r\n else\r\n return false;\r\n },\r\n\r\n //**************************\r\n // Detects if the current browser is a BlackBerry 10 OS phone.\r\n // Excludes tablets.\r\n DetectBlackBerry10Phone : function () {\r\n if ((this.uagent.search(this.deviceBB10) > -1) &&\r\n (this.uagent.search(this.mobile) > -1))\r\n return true;\r\n else\r\n return false;\r\n },\r\n\r\n //**************************\r\n // Detects if the current browser is on a BlackBerry tablet device.\r\n // Example: PlayBook\r\n DetectBlackBerryTablet : function () {\r\n if (this.uagent.search(this.deviceBBPlaybook) > -1)\r\n return true;\r\n else\r\n return false;\r\n },\r\n\r\n //**************************\r\n // Detects if the current browser is a BlackBerry device AND uses a\r\n // WebKit-based browser. These are signatures for the new BlackBerry OS 6.\r\n // Examples: Torch. Includes the Playbook.\r\n DetectBlackBerryWebKit : function () {\r\n if (this.DetectBlackBerry() &&\r\n this.uagent.search(this.engineWebKit) > -1)\r\n return true;\r\n else\r\n return false;\r\n },\r\n\r\n //**************************\r\n // Detects if the current browser is a BlackBerry Touch\r\n // device, such as the Storm, Torch, and Bold Touch. Excludes the Playbook.\r\n DetectBlackBerryTouch : function () {\r\n if (this.DetectBlackBerry() &&\r\n ((this.uagent.search(this.deviceBBStorm) > -1) ||\r\n (this.uagent.search(this.deviceBBTorch) > -1) ||\r\n (this.uagent.search(this.deviceBBBoldTouch) > -1) ||\r\n (this.uagent.search(this.deviceBBCurveTouch) > -1)))\r\n return true;\r\n else\r\n return false;\r\n },\r\n\r\n //**************************\r\n // Detects if the current browser is a BlackBerry OS 5 device AND\r\n // has a more capable recent browser. Excludes the Playbook.\r\n // Examples, Storm, Bold, Tour, Curve2\r\n // Excludes the new BlackBerry OS 6 and 7 browser!!\r\n DetectBlackBerryHigh : function () {\r\n //Disambiguate for BlackBerry OS 6 or 7 (WebKit) browser\r\n if (this.DetectBlackBerryWebKit())\r\n return false;\r\n if ((this.DetectBlackBerry()) &&\r\n (this.DetectBlackBerryTouch() ||\r\n this.uagent.search(this.deviceBBBold) > -1 ||\r\n this.uagent.search(this.deviceBBTour) > -1 ||\r\n this.uagent.search(this.deviceBBCurve) > -1))\r\n return true;\r\n else\r\n return false;\r\n },\r\n\r\n //**************************\r\n // Detects if the current browser is a BlackBerry device AND\r\n // has an older, less capable browser. \r\n // Examples: Pearl, 8800, Curve1.\r\n DetectBlackBerryLow : function () {\r\n if (this.DetectBlackBerry()) {\r\n //Assume that if it's not in the High tier or has WebKit, then it's Low.\r\n if (this.DetectBlackBerryHigh() || this.DetectBlackBerryWebKit())\r\n return false;\r\n else\r\n return true;\r\n }\r\n else\r\n return false;\r\n },\r\n\r\n\r\n //SYMBIAN\r\n\r\n //**************************\r\n // Detects if the current browser is the Nokia S60 Open Source Browser.\r\n DetectS60OssBrowser : function () {\r\n if (this.DetectWebkit()) {\r\n if ((this.uagent.search(this.deviceS60) > -1 ||\r\n this.uagent.search(this.deviceSymbian) > -1))\r\n return true;\r\n else\r\n return false;\r\n }\r\n else\r\n return false;\r\n },\r\n\r\n //**************************\r\n // Detects if the current device is any Symbian OS-based device,\r\n // including older S60, Series 70, Series 80, Series 90, and UIQ, \r\n // or other browsers running on these devices.\r\n DetectSymbianOS : function () {\r\n if (this.uagent.search(this.deviceSymbian) > -1 ||\r\n this.uagent.search(this.deviceS60) > -1 ||\r\n ((this.uagent.search(this.deviceSymbos) > -1) &&\r\n (this.DetectOperaMobile)) || //Opera 10\r\n this.uagent.search(this.deviceS70) > -1 ||\r\n this.uagent.search(this.deviceS80) > -1 ||\r\n this.uagent.search(this.deviceS90) > -1)\r\n return true;\r\n else\r\n return false;\r\n },\r\n\r\n\r\n //WEBOS AND PALM\r\n\r\n //**************************\r\n // Detects if the current browser is on a PalmOS device.\r\n DetectPalmOS : function () {\r\n //Make sure it's not WebOS first\r\n if (this.DetectPalmWebOS())\r\n return false;\r\n\r\n //Most devices nowadays report as 'Palm', \r\n // but some older ones reported as Blazer or Xiino.\r\n if (this.uagent.search(this.devicePalm) > -1 ||\r\n this.uagent.search(this.engineBlazer) > -1 ||\r\n this.uagent.search(this.engineXiino) > -1)\r\n return true;\r\n else\r\n return false;\r\n },\r\n\r\n //**************************\r\n // Detects if the current browser is on a Palm device\r\n // running the new WebOS.\r\n DetectPalmWebOS : function () {\r\n if (this.uagent.search(this.deviceWebOS) > -1)\r\n return true;\r\n else\r\n return false;\r\n },\r\n\r\n //**************************\r\n // Detects if the current browser is on an HP tablet running WebOS.\r\n DetectWebOSTablet : function () {\r\n if (this.uagent.search(this.deviceWebOShp) > -1 &&\r\n this.uagent.search(this.deviceTablet) > -1)\r\n return true;\r\n else\r\n return false;\r\n },\r\n\r\n // Detects if current browser is chrome\r\n DetectChromeBrowser : function() {\r\n if (this.uagent.search(this.engineChrome) > -1)\r\n return true;\r\n\r\n return false;\r\n },\r\n // Detects if current browser is IE\r\n DetectIeBrowser: function () {\r\n if (this.uagent.search(this.engineInternetExplorer) > -1 || this.uagent.search(this.engineTrident) > -1)\r\n return true;\r\n\r\n return false;\r\n },\r\n // Detects if current browser is Safari\r\n DetectSafariBrowser: function () {\r\n if (this.uagent.search(this.engineSafari) > -1 && !this.DetectChromeBrowser())\r\n return true;\r\n\r\n return false;\r\n },\r\n\r\n //OPERA\r\n\r\n //**************************\r\n // Detects if the current browser is Opera Mobile or Mini.\r\n // Note: Older embedded Opera on mobile devices didn't follow these naming conventions.\r\n // Like Archos media players, they will probably show up in DetectMobileQuick or -Long instead. \r\n DetectOperaMobile : function () {\r\n if ((this.uagent.search(this.engineOpera) > -1) &&\r\n ((this.uagent.search(this.mini) > -1 ||\r\n this.uagent.search(this.mobi) > -1)))\r\n return true;\r\n else\r\n return false;\r\n },\r\n\r\n //**************************\r\n // Detects if the current browser is Opera Mobile \r\n // running on an Android phone.\r\n DetectOperaAndroidPhone : function () {\r\n if ((this.uagent.search(this.engineOpera) > -1) &&\r\n (this.uagent.search(this.deviceAndroid) > -1) &&\r\n (this.uagent.search(this.mobi) > -1))\r\n return true;\r\n else\r\n return false;\r\n },\r\n\r\n //**************************\r\n // Detects if the current browser is Opera Mobile \r\n // running on an Android tablet.\r\n DetectOperaAndroidTablet : function () {\r\n if ((this.uagent.search(this.engineOpera) > -1) &&\r\n (this.uagent.search(this.deviceAndroid) > -1) &&\r\n (this.uagent.search(this.deviceTablet) > -1))\r\n return true;\r\n else\r\n return false;\r\n },\r\n\r\n\r\n //MISCELLANEOUS DEVICES\r\n\r\n //**************************\r\n // Detects if the current device is an Amazon Kindle (eInk devices only).\r\n // Note: For the Kindle Fire, use the normal Android methods.\r\n DetectKindle : function () {\r\n if (this.uagent.search(this.deviceKindle) > -1 &&\r\n !this.DetectAndroid())\r\n return true;\r\n else\r\n return false;\r\n },\r\n\r\n //**************************\r\n // Detects if the current Amazon device has turned on the Silk accelerated browsing feature.\r\n // Note: Typically used by the the Kindle Fire.\r\n DetectAmazonSilk : function () {\r\n if (this.uagent.search(this.engineSilk) > -1)\r\n return true;\r\n else\r\n return false;\r\n },\r\n\r\n //**************************\r\n // Detects if the current browser is a\r\n // Garmin Nuvifone.\r\n DetectGarminNuvifone : function () {\r\n if (this.uagent.search(this.deviceNuvifone) > -1)\r\n return true;\r\n else\r\n return false;\r\n },\r\n\r\n //**************************\r\n // Detects a device running the Bada smartphone OS from Samsung.\r\n DetectBada : function () {\r\n if (this.uagent.search(this.deviceBada) > -1)\r\n return true;\r\n else\r\n return false;\r\n },\r\n\r\n //**************************\r\n // Detects a device running the Tizen smartphone OS.\r\n DetectTizen : function () {\r\n if (this.uagent.search(this.deviceTizen) > -1)\r\n return true;\r\n else\r\n return false;\r\n },\r\n\r\n //**************************\r\n // Detects a device running the Meego OS.\r\n DetectMeego : function () {\r\n if (this.uagent.search(this.deviceMeego) > -1)\r\n return true;\r\n else\r\n return false;\r\n },\r\n\r\n //**************************\r\n // Detects a mobile device (probably) running the Firefox OS.\r\n DetectFirefoxOS: function () {\r\n if (this.DetectFirefoxOSPhone() || this.DetectFirefoxOSTablet())\r\n return true;\r\n else\r\n return false;\r\n },\r\n\r\n //**************************\r\n // Detects a phone (probably) running the Firefox OS.\r\n DetectFirefoxOSPhone: function () {\r\n //First, let's make sure we're NOT on another major mobile OS.\r\n if (this.DetectIos() ||\r\n\t\t\tthis.DetectAndroid() ||\r\n\t\t\tthis.DetectSailfish())\r\n return false;\r\n\r\n if ((this.uagent.search(this.engineFirefox) > -1) &&\r\n\t\t\t(this.uagent.search(this.mobile) > -1))\r\n return true;\r\n\r\n return false;\r\n },\r\n\r\n //**************************\r\n // Detects a tablet (probably) running the Firefox OS.\r\n DetectFirefoxOSTablet: function () {\r\n //First, let's make sure we're NOT on another major mobile OS.\r\n if (this.DetectIos() ||\r\n\t\t\tthis.DetectAndroid() ||\r\n\t\t\tthis.DetectSailfish())\r\n return false;\r\n\r\n if ((this.uagent.search(this.engineFirefox) > -1) &&\r\n\t\t\t(this.uagent.search(this.deviceTablet) > -1))\r\n return true;\r\n\r\n return false;\r\n },\r\n\r\n //**************************\r\n // Detects a device running the Sailfish OS.\r\n DetectSailfish: function () {\r\n if (this.uagent.search(this.deviceSailfish) > -1)\r\n return true;\r\n else\r\n return false;\r\n },\r\n\r\n //**************************\r\n // Detects a phone running the Sailfish OS.\r\n DetectSailfishPhone: function () {\r\n if (this.DetectSailfish() && (this.uagent.search(this.mobile) > -1))\r\n return true;\r\n\r\n return false;\r\n },\r\n\r\n\r\n //**************************\r\n // Detects a mobile device running the Ubuntu Mobile OS.\r\n DetectUbuntu: function () {\r\n if (this.DetectUbuntuPhone() || this.DetectUbuntuTablet())\r\n return true;\r\n else\r\n return false;\r\n },\r\n\r\n //**************************\r\n // Detects a phone running the Ubuntu Mobile OS.\r\n DetectUbuntuPhone: function () {\r\n if ((this.uagent.search(this.deviceUbuntu) > -1) &&\r\n\t\t\t(this.uagent.search(this.mobile) > -1))\r\n return true;\r\n\r\n return false;\r\n },\r\n\r\n //**************************\r\n // Detects a tablet running the Ubuntu Mobile OS.\r\n DetectUbuntuTablet: function () {\r\n if ((this.uagent.search(this.deviceUbuntu) > -1) &&\r\n\t\t\t(this.uagent.search(this.deviceTablet) > -1))\r\n return true;\r\n\r\n return false;\r\n },\r\n //**************************\r\n // Detects the Danger Hiptop device.\r\n DetectDangerHiptop : function () {\r\n if (this.uagent.search(this.deviceDanger) > -1 ||\r\n this.uagent.search(this.deviceHiptop) > -1)\r\n return true;\r\n else\r\n return false;\r\n },\r\n\r\n //**************************\r\n // Detects if the current browser is a Sony Mylo device.\r\n DetectSonyMylo : function () {\r\n if ((this.uagent.search(this.manuSony) > -1) &&\r\n ((this.uagent.search(this.qtembedded) > -1) ||\r\n (this.uagent.search(this.mylocom2) > -1)))\r\n return true;\r\n else\r\n return false;\r\n },\r\n\r\n //**************************\r\n // Detects if the current device is on one of \r\n // the Maemo-based Nokia Internet Tablets.\r\n DetectMaemoTablet : function () {\r\n if (this.uagent.search(this.maemo) > -1)\r\n return true;\r\n //For Nokia N810, must be Linux + Tablet, or else it could be something else.\r\n if ((this.uagent.search(this.linux) > -1)\r\n && (this.uagent.search(this.deviceTablet) > -1)\r\n && !this.DetectWebOSTablet()\r\n && !this.DetectAndroid())\r\n return true;\r\n else\r\n return false;\r\n },\r\n\r\n //**************************\r\n // Detects if the current device is an Archos media player/Internet tablet.\r\n DetectArchos : function () {\r\n if (this.uagent.search(this.deviceArchos) > -1)\r\n return true;\r\n else\r\n return false;\r\n },\r\n\r\n //**************************\r\n // Detects if the current device is an Internet-capable game console.\r\n // Includes many handheld consoles.\r\n DetectGameConsole : function () {\r\n if (this.DetectSonyPlaystation() ||\r\n this.DetectNintendo() ||\r\n this.DetectXbox())\r\n return true;\r\n else\r\n return false;\r\n },\r\n\r\n //**************************\r\n // Detects if the current device is a Sony Playstation.\r\n DetectSonyPlaystation : function () {\r\n if (this.uagent.search(this.devicePlaystation) > -1)\r\n return true;\r\n else\r\n return false;\r\n },\r\n\r\n //**************************\r\n // Detects if the current device is a handheld gaming device with\r\n // a touchscreen and modern iPhone-class browser. Includes the Playstation Vita.\r\n DetectGamingHandheld : function () {\r\n if ((this.uagent.search(this.devicePlaystation) > -1) &&\r\n (this.uagent.search(this.devicePlaystationVita) > -1))\r\n return true;\r\n else\r\n return false;\r\n },\r\n\r\n //**************************\r\n // Detects if the current device is a Nintendo game device.\r\n DetectNintendo : function () {\r\n if (this.uagent.search(this.deviceNintendo) > -1 ||\r\n this.uagent.search(this.deviceWii) > -1 ||\r\n this.uagent.search(this.deviceNintendoDs) > -1)\r\n return true;\r\n else\r\n return false;\r\n },\r\n\r\n //**************************\r\n // Detects if the current device is a Microsoft Xbox.\r\n DetectXbox : function () {\r\n if (this.uagent.search(this.deviceXbox) > -1)\r\n return true;\r\n else\r\n return false;\r\n },\r\n\r\n\r\n //**************************\r\n // Detects whether the device is a Brew-powered device.\r\n // Note: Limited to older Brew-powered feature phones.\r\n // Ignores newer Brew versions like MP. Refer to DetectMobileQuick().\r\n DetectBrewDevice : function () {\r\n if (this.uagent.search(this.deviceBrew) > -1)\r\n return true;\r\n else\r\n return false;\r\n },\r\n\r\n\r\n // DEVICE CLASSES\r\n\r\n //**************************\r\n // Check to see whether the device is *any* 'smartphone'.\r\n // Note: It's better to use DetectTierIphone() for modern touchscreen devices. \r\n DetectSmartphone : function () {\r\n //Exclude duplicates from TierIphone\r\n if (this.DetectTierIphone() ||\r\n this.DetectS60OssBrowser() ||\r\n this.DetectSymbianOS() ||\r\n this.DetectWindowsMobile() ||\r\n this.DetectBlackBerry() ||\r\n this.DetectPalmOS())\r\n return true;\r\n\r\n //Otherwise, return false.\r\n return false;\r\n },\r\n\r\n //**************************\r\n // Detects if the current device is a mobile device.\r\n // This method catches most of the popular modern devices.\r\n // Excludes Apple iPads and other modern tablets.\r\n DetectMobileQuick : function () {\r\n //Let's exclude tablets.\r\n if (this.DetectTierTablet())\r\n return false;\r\n\r\n if (this.initCompleted || this.isMobilePhone)\r\n return this.isMobilePhone;\r\n\r\n //Most mobile browsing is done on smartphones\r\n if (this.DetectSmartphone())\r\n return true;\r\n\r\n //Catch all for many mobile devices\r\n if (this.uagent.search(this.mobile) > -1)\r\n return true;\r\n\r\n if (this.DetectKindle() ||\r\n this.DetectAmazonSilk())\r\n return true;\r\n\r\n if (this.uagent.search(this.deviceMidp) > -1 ||\r\n this.DetectBrewDevice())\r\n return true;\r\n\r\n if (this.DetectOperaMobile() ||\r\n this.DetectArchos())\r\n return true;\r\n\r\n if ((this.uagent.search(this.engineObigo) > -1) ||\r\n (this.uagent.search(this.engineNetfront) > -1) ||\r\n (this.uagent.search(this.engineUpBrowser) > -1) ||\r\n (this.uagent.search(this.engineOpenWeb) > -1))\r\n return true;\r\n\r\n return false;\r\n },\r\n\r\n //**************************\r\n // Detects in a more comprehensive way if the current device is a mobile device.\r\n DetectMobileLong : function () {\r\n if (this.DetectMobileQuick())\r\n return true;\r\n if (this.DetectGameConsole())\r\n return true;\r\n\r\n if (this.DetectDangerHiptop() ||\r\n this.DetectMaemoTablet() ||\r\n this.DetectSonyMylo() ||\r\n this.DetectGarminNuvifone() ||\r\n this.DetectArchos())\r\n return true;\r\n\r\n if ((this.uagent.search(this.devicePda) > -1) &&\r\n !(this.uagent.search(this.disUpdate) > -1))\r\n return true;\r\n\r\n //Detect for certain very old devices with stupid useragent strings.\r\n if (this.uagent.search(this.manuSamsung1) > -1 ||\r\n this.uagent.search(this.manuSonyEricsson) > -1 ||\r\n this.uagent.search(this.manuericsson) > -1)\r\n return true;\r\n\r\n if ((this.uagent.search(this.svcDocomo) > -1) ||\r\n (this.uagent.search(this.svcKddi) > -1) ||\r\n (this.uagent.search(this.svcVodafone) > -1))\r\n return true;\r\n\r\n return false;\r\n },\r\n\r\n //*****************************\r\n // For Mobile Web Site Design\r\n //*****************************\r\n\r\n //**************************\r\n // The quick way to detect for a tier of devices.\r\n // This method detects for the new generation of\r\n // HTML 5 capable, larger screen tablets.\r\n // Includes iPad, Android (e.g., Xoom), BB Playbook, WebOS, etc.\r\n DetectTierTablet : function () {\r\n if (this.initCompleted || this.isTierTablet)\r\n return this.isTierTablet;\r\n\r\n if (this.DetectIpad() ||\r\n this.DetectAndroidTablet() ||\r\n this.DetectBlackBerryTablet() ||\r\n this.DetectFirefoxOSTablet() ||\r\n this.DetectUbuntuTablet() ||\r\n this.DetectWebOSTablet())\r\n return true;\r\n else\r\n return false;\r\n },\r\n\r\n //**************************\r\n // The quick way to detect for a tier of devices.\r\n // This method detects for devices which can \r\n // display iPhone-optimized web content.\r\n // Includes iPhone, iPod Touch, Android, Windows Phone 7 and 8, BB10, WebOS, Playstation Vita, etc.\r\n DetectTierIphone : function () {\r\n if (this.initCompleted || this.isTierIphone)\r\n return this.isTierIphone;\r\n\r\n if (this.DetectIphoneOrIpod() ||\r\n this.DetectAndroidPhone() ||\r\n this.DetectWindowsPhone() ||\r\n this.DetectBlackBerry10Phone() ||\r\n this.DetectPalmWebOS() ||\r\n this.DetectBada() ||\r\n this.DetectTizen() ||\r\n this.DetectFirefoxOSPhone() ||\r\n this.DetectSailfishPhone() ||\r\n this.DetectUbuntuPhone() ||\r\n this.DetectGamingHandheld())\r\n return true;\r\n\r\n //Note: BB10 phone is in the previous paragraph\r\n if (this.DetectBlackBerryWebKit() && this.DetectBlackBerryTouch())\r\n return true;\r\n\r\n else\r\n return false;\r\n },\r\n\r\n //**************************\r\n // The quick way to detect for a tier of devices.\r\n // This method detects for devices which are likely to be \r\n // capable of viewing CSS content optimized for the iPhone, \r\n // but may not necessarily support JavaScript.\r\n // Excludes all iPhone Tier devices.\r\n DetectTierRichCss : function () {\r\n if (this.initCompleted || this.isTierRichCss)\r\n return this.isTierRichCss;\r\n\r\n //Exclude iPhone and Tablet Tiers and e-Ink Kindle devices\r\n if (this.DetectTierIphone() ||\r\n this.DetectKindle() ||\r\n this.DetectTierTablet())\r\n return false;\r\n\r\n //Exclude if not mobile\r\n if (!this.DetectMobileQuick())\r\n return false;\r\n\r\n //If it's a mobile webkit browser on any other device, it's probably OK.\r\n if (this.DetectWebkit())\r\n return true;\r\n\r\n //The following devices are also explicitly ok.\r\n if (this.DetectS60OssBrowser() ||\r\n this.DetectBlackBerryHigh() ||\r\n this.DetectWindowsMobile() ||\r\n (this.uagent.search(this.engineTelecaQ) > -1))\r\n return true;\r\n\r\n else\r\n return false;\r\n },\r\n\r\n //**************************\r\n // The quick way to detect for a tier of devices.\r\n // This method detects for all other types of phones,\r\n // but excludes the iPhone and RichCSS Tier devices.\r\n // NOTE: This method probably won't work due to poor\r\n // support for JavaScript among other devices. \r\n DetectTierOtherPhones : function () {\r\n if (this.initCompleted || this.isTierGenericMobile)\r\n return this.isTierGenericMobile;\r\n\r\n //Exclude iPhone, Rich CSS and Tablet Tiers\r\n if (this.DetectTierIphone() ||\r\n this.DetectTierRichCss() ||\r\n this.DetectTierTablet())\r\n return false;\r\n\r\n //Otherwise, if it's mobile, it's OK\r\n if (this.DetectMobileLong())\r\n return true;\r\n\r\n else\r\n return false;\r\n },\r\n\r\n // Detects Android device version (4.4, 5.0)\r\n DetectAndroidVersion: function () {\r\n var androidVersion = 0.0;\r\n \r\n try {\r\n androidVersion = parseFloat(this.uagent.slice(this.uagent.indexOf(this.deviceAndroid) + 8));\r\n } catch (e) {\r\n console.log(e.message);\r\n }\r\n\r\n return androidVersion;\r\n }\r\n};\r\n\r\n\r\n","var EnsembleVideo = EnsembleVideo || {};\r\nvar platform = new EnsembleVideo.Platform();\r\nplatform.InitDeviceScan();\r\nvar isAndroidOrIos = platform.isAndroid || platform.isIos;\r\n\r\nvar loggedLibraryId = jQuery('#LoggedLibraryId').val();\r\nvar loggedOrganizationId = jQuery('#LoggedOrganizationId').val();\r\nvar loggedInstitutionId = jQuery('#LoggedInstitutionId').val();\r\n\r\n(function ($) {\r\n \"use strict\";\r\n\r\n EnsembleVideo.Notifications = (function () {\r\n var baseUrl = $('#HostBaseURL').val(),\r\n loggedUserId = $('#LoggedUserId').val(),\r\n userPermissions = {\r\n loggedUserIsSysAdmin: $('#LoggedUserIsSysAdmin').val() === \"True\",\r\n loggedUserIsAdmin: $('#LoggedUserIsAdmin').val() === \"True\"\r\n },\r\n globalization = {\r\n\r\n init: function () {\r\n var userLanguage = GetLanguage(true);\r\n\r\n moment.locale(userLanguage);\r\n moment.updateLocale(userLanguage, {\r\n relativeTime: {\r\n s: 'Just Now'\r\n }\r\n });\r\n }\r\n },\r\n mySignalR = {\r\n hubConnection: baseUrl + '/hapi/evhubs/notificationHub',\r\n signalRIsEnabled: $('#SignalRIsEnabled').val() === \"True\",\r\n\r\n init: function () {\r\n var self = this;\r\n if (!self.signalRIsEnabled) {\r\n console.log(\"SignalR Is Not Enabled\");\r\n return;\r\n }\r\n\r\n console.log(baseUrl);\r\n console.log(loggedUserId);\r\n console.log(loggedLibraryId);\r\n\r\n var connection = new signalR.HubConnectionBuilder()\r\n .configureLogging(signalR.LogLevel.Debug)\r\n .withUrl(self.hubConnection).build();\r\n\r\n connection.on(\"RefreshNotifications\",\r\n function () {\r\n EnsembleVideo.Notifications.Notifications.pageNumber = 1;\r\n EnsembleVideo.Notifications.Notifications.getNotifications();\r\n });\r\n\r\n connection.onclose(function (e) {\r\n console.log(\"Connection Closed...\");\r\n\r\n console.log(\"Re-Connecting Hub...\");\r\n setTimeout(function () {\r\n connection.start().then(function () {\r\n console.log(\"Hub connected.\");\r\n\r\n connection.invoke(\"JoinGroup\", loggedUserId).catch(function (err) {\r\n return console.log(err.toString());\r\n });\r\n\r\n connection.invoke(\"JoinGroup\", \"System\").catch(function (err) {\r\n return console.log(err.toString());\r\n });\r\n\r\n }).catch(function (err) {\r\n return console.log(err.toString());\r\n });\r\n }, 3000);\r\n });\r\n\r\n // Start the hub connection\r\n console.log(\"Connecting Hub...\");\r\n\r\n connection.start().then(function () {\r\n console.log(\"Hub connected.\");\r\n\r\n connection.invoke(\"JoinGroup\", loggedUserId).catch(function (err) {\r\n return console.log(err.toString());\r\n });\r\n\r\n connection.invoke(\"JoinGroup\", \"System\").catch(function (err) {\r\n return console.log(err.toString());\r\n });\r\n\r\n }).catch(function (err) {\r\n return console.log(err.toString());\r\n });\r\n }\r\n },\r\n notifications = {\r\n scrollLoaderInProcess: false,\r\n pageNumber: 1,\r\n totalPages: 0,\r\n pageSize: 10,\r\n mainNotificationIcon: '#mainNotificationIcon',\r\n notificationsMenu: '#notifications_menu',\r\n markAllAsReadLink: '#markAllAsRead',\r\n editNotificationsLink: '#editNotifications',\r\n notificationDropdownMenu: '#notification-dropdown-menu',\r\n notificationsList: '#notificationsList',\r\n notificationsListItems: '#notificationsList li',\r\n notificationLink: '#notificationsList a',\r\n markAsReadNotificationAction: '.markAsReadNotification',\r\n deleteNotification: '.deleteNotification',\r\n notificationActions: '.notificationActions',\r\n notificationProgress: '#notificationProgress',\r\n noNotificationsMessage: '#no-notifications-message',\r\n templates: {\r\n system: {\r\n system:\r\n \"