var Offset=function(){function n(n){this.offsetTop=0;this.element=n}return Object.defineProperty(n.prototype,"left",{get:function(){for(var n=this.element,t=0;n;)t+=n.offsetLeft,n=n.offsetParent;return t},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"top",{get:function(){for(var n=this.element,t=0;n;)t+=n.offsetTop,n=n.offsetParent;return t},enumerable:!1,configurable:!0}),n}(),WSData=function(){function n(){this.Settings.TrackingEnabled=!0;this.UserInfo.IsLoggedIn=!1}return n}(),UserData=function(){function n(){this.CustomerId=null;this.IsEmployee=!1;this.IsLoggedIn=!1}return n}(),Utilities;Object.defineProperty(window,"ScreenSizes",{get:function(){return{all:0,xs:480,xsm:600,sm:768,md:992,lg:1200}}});window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=function(n,t){t=t||window;for(var i=0;i<this.length;i++)n.call(t,this[i],i,this)});Array&&!Array.prototype.indexOf&&(Array.prototype.indexOf=function(n){for(var t=0;t<this.length;t++)if(this[t]===n)return t;return-1});window.Element&&!Element.prototype.remove&&(Element.prototype.remove=function(){this.parentNode.removeChild(this)});window.Element&&!Element.prototype.$offset&&(Element.prototype.$offset=function(){return new Offset(this)});window.Element&&!Element.prototype.$outerHeight&&(Element.prototype.$outerHeight=function(n){var t,i;return n===void 0&&(n=!1),t=this.offsetHeight,n&&(i=getComputedStyle(this),t+=parseInt(i.marginTop,10)+parseInt(i.marginBottom,10)),t});window.Element&&!Element.prototype.$outerWidth&&(Element.prototype.$outerWidth=function(n){var t,i;return n===void 0&&(n=!1),t=this.offsetWidth,n&&(i=getComputedStyle(this),t+=parseInt(i.marginLeft,10)+parseInt(i.marginRight,10)),t});window.Element&&!Element.prototype.fadeTo&&(Element.prototype.fadeTo=function(n,t,i){var o=this,u;i===void 0&&(i=null);var r=this,f=getComputedStyle(r),e=f.transition;this.style.opacity=f.opacity;r.flushStyle();u=function(n){n.propertyName==="opacity"&&(r.removeEventListener("transitionend",u),r.style.transition=e!==""?e:"",i===null||i===void 0?void 0:i.call(o))};r.addEventListener("transitionend",u);r.style.transitionProperty="opacity";r.style.transitionTimingFunction="linear";r.style.transitionDuration=typeof n=="number"?n+"ms":n.toString();r.flushStyle();r.style.opacity=t.toString()});window.Element&&!Element.prototype.flushStyle&&(Element.prototype.flushStyle=function(){this.offsetHeight});window.Document&&!Document.prototype.$scrollTop&&Object.defineProperty(Document.prototype,"$scrollTop",{get:function(){var n=document.scrollingElement&&document.scrollingElement.scrollTop||0,t=document.documentElement&&document.documentElement.scrollTop||0,i=document.body&&document.body.scrollTop||0;return Math.max(n,t,i)}});window.Document&&!Document.prototype.createCustomEvent&&(window.Document.prototype.createCustomEvent=function(n){var t;return typeof Event=="function"?t=new Event(n):(t=document.createEvent("CustomEvent"),t.initEvent(n,!0,!0)),t});Window&&!Window.prototype.$scrollBarWidth&&Object.defineProperty(Window.prototype,"$scrollBarWidth",{get:function(){var t,n,r,i;return window._scrollBarWidth||(t=document.createElement("p"),t.style.width="100%",t.style.height="200px",n=document.createElement("div"),n.style.position="absolute",n.style.top="0px",n.style.left="0px",n.style.visibility="hidden",n.style.width="200px",n.style.height="150px",n.style.overflow="hidden",n.appendChild(t),document.body.appendChild(n),r=t.offsetWidth,n.style.overflow="scroll",i=t.offsetWidth,r==i&&(i=n.clientWidth),document.body.removeChild(n),window._scrollBarWidth=r-i),window._scrollBarWidth}});Utilities=function(){function n(){}return n.DisplayClientTime=function(n,t,i,r,u,f,e){var o=new Date,s,v,h,c;if(o.setUTCFullYear(n,t-1,i),o.setUTCHours(r,u,f),e=typeof e=="undefined"?"Time":e,e=="Time"){s=o.getHours();v=s>=12;s>12&&(s-=12);h=o.getMinutes().toString();h.length==1&&(h="0"+h);v||s!=0||(s=12);document.write(s+":"+h+" "+(v?"PM":"AM"));return}if(e=="Date"){c=o.getDate().toString();c.length==1&&(c="0"+c);document.write(c+"-"+["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][o.getMonth()]+"-"+o.getFullYear());return}if(e=="TZ"){var y=o.getTimezoneOffset(),l=Math.floor(y/60),p=Math.abs(y%60),a="GMT";l<0&&(a+=" +"+(-l).toString());l>0&&(a+=" "+(-l).toString());p!=0&&(a+=":"+p);document.write(a)}},n.GetWebSiteApiUrl=function(n){var t=document.location.hostname,i="/",r=/[^.]*?\.?(devexpress\.[^.]+?)$/i,u;return t.match(r)?t.match(/^preview\.devexpress\.com$/i)||(t=t.replace(r,"www.$1")):(t.toLowerCase()=="localhost"||document.location.port=="")&&(i="/DevExpress/"),u=document.location.protocol+"//"+t+i,u+"Api/"+n+"/"},n.GetCookieDomain=function(){var t=document.location.host,n;return t.indexOf(".")>=0&&(n=t.split("."),n.length>=2)?"."+n[n.length-2]+"."+n[n.length-1]:""},n.GetCookie=function(n){for(var r=document.cookie?document.cookie.split("; "):[],i=0,f=r.length;i<f;i++){var u=r[i].split("="),e=u.shift(),t=u.join("=");if(n&&n===e){t.indexOf('"')===0&&(t=t.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return decodeURIComponent(t.replace(/\+/g," "))}catch(o){return null}}}return null},n.ResetInvalidEmailWarning=function(){},n.SetCartQuantity=function(n){var t=document.getElementById("Cart");t.innerText=n<1?t.getAttribute("data-empty-text"):t.getAttribute("data-cart-text").replace("##",n.toString())},n.GetUrlParameter=function(n){n=n.replace(/[[]/,"\\[").replace(/[\]]/,"\\]");var i=new RegExp("[\\?&]"+n+"=([^&#]*)"),t=i.exec(location.search);return t===null?null:decodeURIComponent(t[1].replace(/\+/g," "))},Object.defineProperty(n,"UserData",{get:function(){return typeof _userData!="undefined"?window._userData:new UserData},enumerable:!1,configurable:!0}),Object.defineProperty(n,"SiteSettings",{get:function(){return typeof _wsData!="undefined"?window._wsData:new WSData},enumerable:!1,configurable:!0}),n.GetQueryParameter=function(n){var i=undefined,t=document.location.search;return t.indexOf("?")===0&&(t=t.substr(1)),t.split("&").forEach(function(t){var r=t.split("=",2);r[0]===n&&(i=r.length>1?r[1]:null)}),i},n}();window._wsSetCartQuantity=Utilities.SetCartQuantity;window.WSUtils=Utilities;var TopBarController=function(){function n(){if(this.logoStatic=!1,this.topBar=document.querySelector("header"),this.topBar){var n=document.getElementById("Header-Logo");n&&(this.logoStatic=n.getAttribute("data-logo-static")==="true");this.EnableSticky();this.LoadNotifications(this.topBar);window.addEventListener("scroll",this.FixAdjustHeader.bind(this));window.addEventListener("resize",this.FixAdjustHeader.bind(this));this.FixAdjustHeader();this.InitializeShoppingCartQuantity();window.addEventListener("load",this.FixAdjustHeader.bind(this))}}return n.prototype.EnableSticky=function(){this.placeholder=document.createElement("div");this.placeholder.className="HeaderPlaceholer";this.topBar.insertAdjacentElement("afterend",this.placeholder);this.topBar.classList.add("Fixed");this.AdjustPlaceholderHeight();window.MutationObserver&&new MutationObserver(this.AdjustPlaceholderHeight.bind(this)).observe(this.topBar,{childList:!0,subtree:!0})},n.prototype.AdjustPlaceholderHeight=function(){this.placeholder.style.height=this.topBar.offsetHeight+"px";document.documentElement.style.setProperty("--TopBarHeight",this.topBar.offsetHeight+"px")},n.prototype.FixAdjustHeader=function(){this.logoStatic||(document.$scrollTop>this.topBar.offsetHeight*.66?this.topBar.classList.add("ShowLogo"):this.topBar.classList.remove("ShowLogo"));this.AdjustPlaceholderHeight()},n.prototype.LoadNotifications=function(n){XMLHttpRequest&&n.querySelectorAll("[data-notification]").forEach(function(n){var i=n.getAttribute("data-notification").split("/"),t=new XMLHttpRequest;t.withCredentials=!0;t.open("GET",WSUtils.GetWebSiteApiUrl(i[0])+i[1]);t.onreadystatechange=function(){var i,r;t.readyState===XMLHttpRequest.DONE&&t.status===200&&(i=t.response,i!=null&&i>0&&(r=i>9?"9+":i,n.setAttribute("data-count",r.toString()),n.classList.add("Counter")))};t.send()})},n.prototype.TriggerResizeEvent=function(){var n=document.createEvent("HTMLEvents");n.initEvent("resize",!0,!1);document.dispatchEvent(n)},n.prototype.InitializeShoppingCartQuantity=function(){var t=document.getElementById("Cart"),n;t&&XMLHttpRequest&&(n=new XMLHttpRequest,n.withCredentials=!0,n.open("GET",WSUtils.GetWebSiteApiUrl("ShoppingCart")+"GetQuantity"),n.onreadystatechange=function(){n.readyState===XMLHttpRequest.DONE&&n.status===200&&WSUtils.SetCartQuantity(n.response)},n.send())},n}(),MyAccountMenuController=function(){function n(){var t=this,n;(this.closeMenuEventHandler=null,n=document.querySelector("header"),n!=null)&&(n.querySelectorAll('a[href*="returnUrl"]').forEach(function(n){n.href=t.GetReturnUrl(n.href)}),this.LoadMyAccount())}return n.prototype.SetLoggedIn=function(){var n=document.getElementById("LogIn"),t=document.getElementById("MyAccount");n.style.display!=="none"&&(n.style.display="none",t.style.display="",this.LoadMyAccount())},n.prototype.LoadMyAccount=function(){var r=this,t=document.getElementById("MyAccount"),u=document.getElementById("LogIn"),i,n;t&&XMLHttpRequest&&(i=JSON.parse(t.getAttribute("data-myaccount")),Object.keys(i.Urls).forEach(function(n){i.Urls[n]=r.GetReturnUrl(i.Urls[n])}),n=new XMLHttpRequest,n.withCredentials=!0,n.open("POST",WSUtils.GetWebSiteApiUrl("Account")+"GetMyAccount"),n.setRequestHeader("Content-Type","application/json; charset=utf-8"),n.onreadystatechange=function(){if(n.readyState===XMLHttpRequest.DONE&&n.status===200){var i=JSON.parse(n.response);i!=null&&(i.IsLoggedIn&&u&&(u.style.display="none"),!i.IsLoggedIn&&t&&(t.style.display="none"),i.IsLoggedIn&&(document.documentElement.setAttribute("my-friendly-id",i.FriendlyId),document.documentElement.setAttribute("my-info-encrypted",i.UserInfoEncrypted),document.dispatchEvent(document.createCustomEvent("CustomerLoggedIn")),t.insertAdjacentHTML("afterend",i.Content),t.remove(),r.InitializeMyAccountMenu()))}},n.send(JSON.stringify(i)))},n.prototype.GetReturnUrl=function(n){var t=n.indexOf("returnUrl="),i,r;return t<0?n:(i=n.substr(0,t),r=n.indexOf("&",t)>0?n.substr(n.indexOf("&",t)):"",i+"returnUrl="+encodeURIComponent(document.location.href)+r)},n.prototype.InitializeMyAccountMenu=function(){var n=document.getElementById("MyAccount"),i=n&&n.querySelector(".MyAccountMenu"),r=n&&n.querySelector('[data-behavior="MyAccountMenuTrigger"]'),t;i!=null&&r!=null&&(t=function(n){n.stopPropagation()},n.addEventListener("click",t),n.addEventListener("touchstart",t),r.addEventListener("click",this.TriggerOpen.bind(this,i)))},n.prototype.TriggerOpen=function(n,t){t.stopPropagation();n.getAttribute("data-state")=="open"?this.Close(n):this.Open(n)},n.prototype.Open=function(n){if(n.getAttribute("data-state")!="open"){var t=function(){n.removeEventListener("transitionend",t);n.setAttribute("data-state","open");n.style.height="auto"};n.addEventListener("transitionend",t);n.style.display="block";requestAnimationFrame(function(){n.style.height=n.scrollHeight+"px"});this.closeMenuEventHandler=this.Close.bind(this,n);document.documentElement.addEventListener("click",this.closeMenuEventHandler);document.documentElement.addEventListener("touchstart",this.closeMenuEventHandler)}},n.prototype.Close=function(n){var t,i;n.getAttribute("data-state")=="open"&&(t=function(){n.removeEventListener("transitionend",t);n.style.display="none";n.setAttribute("data-state","closed")},n.addEventListener("transitionend",t),i=n.style.transition,n.style.transition="",requestAnimationFrame(function(){n.style.height=n.scrollHeight+"px";n.style.transition=i;requestAnimationFrame(function(){n.style.height="0"})}),this.closeMenuEventHandler!==null&&(document.documentElement.removeEventListener("click",this.closeMenuEventHandler),document.documentElement.removeEventListener("touchstart",this.closeMenuEventHandler)))},n}(),SearchBoxController=function(){function n(){var n=this;(this.search=document.getElementById("SiteSearch"),this.search!=null)&&(this.searchButton=this.search.querySelector(".SearchButton"),this.textBox=this.search.querySelector("input"),this.searchButton.addEventListener("click",this.SearchButtonClick.bind(this)),this.search.addEventListener("click",function(n){n.stopPropagation()}),this.textBox.setAttribute("nulltext",this.textBox.value),this.textBox.addEventListener("focus",function(){n.textBox.value==n.textBox.getAttribute("nulltext")&&(n.textBox.value="",n.textBox.classList.remove("NullText"))}),this.textBox.addEventListener("blur",function(){n.textBox.value==""&&(n.textBox.value=n.textBox.getAttribute("nulltext"),n.textBox.classList.add("NullText"))}),this.textBox.addEventListener("keyup",function(){var t=n.textBox.value;t!=""&&t!=n.textBox.getAttribute("nulltext")?n.searchButton.classList.add("Active"):n.searchButton.classList.remove("Active")}),this.textBox.addEventListener("keypress",function(t){t.keyCode==13&&(t.preventDefault(),n.DoSearch())}))}return n.prototype.SearchButtonClick=function(){var t=this,n;this.search.classList.contains("Open")?this.DoSearch():(n=function(){document.removeEventListener("click",n);t.search.classList.remove("Open");t.ResetTextBox()},document.addEventListener("click",n),this.search.classList.add("Open"),this.textBox.focus())},n.prototype.ResetTextBox=function(){this.textBox.value=this.textBox.getAttribute("nulltext");this.textBox.classList.add("NullText")},n.prototype.DoSearch=function(){var n=this.textBox.value.trim();n!=""&&n!=this.textBox.getAttribute("nulltext")&&document.location.assign(window.SearchServiceUrl+encodeURIComponent(n))},n}(),OnlineNotifications;(function(n){var t;(function(n){n.MarkAsRead="MarkAsRead";n.Dismiss="Dismiss";n.React="React";n.Postpone="Postpone";n.NotInterested="NotInterested";n.Accomplish="Accomplish"})(t||(t={}));var r=function(){function n(){}return n}(),u=function(){function n(){}return n}(),f=function(){function n(){}return n}(),i=function(){function n(){if(this.Notifications=null,this.forceHideUnreadHint=!1,this.hideNotificationsListEventHandler=null,this.container=document.getElementById("NotificationCenter"),this.container!=null&&XMLHttpRequest){this.bellIcon=this.container.querySelector('a[data-notifications-control="bell"]');this.bellIcon.addEventListener("click",this.NotificationsIconClick.bind(this));this.bellIcon.insertAdjacentHTML("beforeend",'<span class="MessageCount"><\/span>');this.iconMessageCount=this.bellIcon.querySelector(".MessageCount");this.container.insertAdjacentHTML("beforeend",'<div class="UnreadHint"><div class="Hint"><\/div><\/div>');this.unreadHint=this.container.querySelector("div.UnreadHint");this.unreadHint.addEventListener("click",this.NotificationsIconClick.bind(this));this.hintMessageCount=this.unreadHint.querySelector("div.Hint");this.container.insertAdjacentHTML("beforeend",'<div class="NotificationsList"><\/div>');this.notificationsList=this.container.querySelector("div.NotificationsList");this.notificationsList.addEventListener("click",function(n){n.stopPropagation()});window.addEventListener("resize",this.Reposition.bind(this));window.addEventListener("scroll",this.OnScroll.bind(this));var n=document.querySelector("header");n!=null&&MutationObserver&&new MutationObserver(this.HeaderDOMChanged.bind(this)).observe(n,{attributes:!0,childList:!0,subtree:!0,attributeOldValue:!0});setTimeout(this.GetNotifications.bind(this),500);this.hideNotificationsListEventHandler=this.HideNotificationsList.bind(this)}}return n.prototype.OnScroll=function(){!this.forceHideUnreadHint&&document.$scrollTop>70&&(this.forceHideUnreadHint=!0,this.container.classList.add("Scrolled"))},n.prototype.HeaderDOMChanged=function(n,t){var i=!1;n.forEach(function(n){n.type!="attributes"?i=!0:n.attributeName!="class"?i=!0:n.target.className!=n.oldValue&&(i=!0)});i&&this.Reposition();t.takeRecords()},n.prototype.Reposition=function(){this.PositionUnreadHint();this.PositionNotificationsList()},n.prototype.PositionUnreadHint=function(){var u=getComputedStyle(this.unreadHint);if(u.display=="block"){var n=this.unreadHint.offsetWidth,t=this.container.offsetWidth,f=this.container.getBoundingClientRect().left+t/2,i=-(n/2-t/2),r=document.documentElement.clientWidth-5-(f-n/2+n);r<0&&(i+=r);this.unreadHint.style.left=Math.round(i)+"px"}},n.prototype.PositionNotificationsList=function(){var f=getComputedStyle(this.notificationsList),t,n;if(f.display=="block"){t=document.documentElement.clientWidth;n=430;n>t-30&&(n=t-30);var i=this.container.offsetWidth,e=this.container.getBoundingClientRect().left+i/2,r=-(n/2-i/2),u=t-15-(e-n/2+n);u<0&&(r+=u);this.notificationsList.style.left=Math.round(r)+"px";this.notificationsList.style.width=Math.round(n)+"px"}},n.prototype.NotificationsIconClick=function(n){var u=this,i,r;n.stopPropagation();i=[];r=!1;this.Notifications.forEach(function(n){n.IsUnread&&(r=!0);n.IsUnread=!1;i.push(n.Key)});!this.container.classList.contains("ShowNotifications")&&this.Notifications.length>0?(this.container.classList.remove("HasNewMessages"),r&&this.SendMessageActionToServer(i.join(":"),t.MarkAsRead),this.notificationsList.querySelectorAll(".Message").forEach(function(n){n.remove()}),this.Notifications.forEach(function(n){u.notificationsList.appendChild(u.CreateNotificationMarkup(n))}),this.container.classList.add("ShowNotifications"),document.documentElement.addEventListener("click",this.hideNotificationsListEventHandler)):this.HideNotificationsList()},n.prototype.HideNotificationsList=function(){this.container.classList.remove("ShowNotifications");document.documentElement.removeEventListener("click",this.hideNotificationsListEventHandler)},n.prototype.GetApiUrl=function(n){return WSUtils.GetWebSiteApiUrl("OnlineNotifications")+n},n.prototype.GetNotifications=function(){var t=this,n=new XMLHttpRequest;n.withCredentials=!0;n.open("POST",this.GetApiUrl("GetMessages"));n.setRequestHeader("Content-Type","application/json; charset=utf-8");n.addEventListener("readystatechange",function(){n.readyState===XMLHttpRequest.DONE&&n.status===200&&(t.NotificationsData=JSON.parse(n.response),t.Notifications=t.NotificationsData.Messages,t.RegisterStyles(),t.UpdateMessageCount())});n.send()},n.prototype.RegisterStyles=function(){var n=document.createElement("style");n.id="NotificationCenterStyles";n.type="text/css";n.innerHTML=this.NotificationsData.Styles;document.head&&document.head.appendChild(n)},n.prototype.CreateNotificationMarkup=function(n){var i=document.createElement("div"),r,f,u;return i.className="Message",i.insertAdjacentHTML("beforeend",'<div class="Inner"><\/div>'),i.classList.add(n.MessageType),i.setAttribute("data-onnt-message-id",n.Key),r=i.querySelector(".Inner"),n.Actions.Dismiss!=null&&n.Actions.Dismiss.Title==null&&r.insertAdjacentHTML("beforeend",'<div class="Dismiss" data-onnt-message-action="'+t.Dismiss+'"><\/div>'),r.insertAdjacentHTML("beforeend",'<div class="Content"><\/div>'),f=r.querySelector("div.Content"),f.innerHTML=n.MessageContent,r.insertAdjacentHTML("beforeend",'<div class="Actions"><\/div>'),u=r.querySelector("div.Actions"),n.Actions.React!=null&&u.appendChild(this.CreateNotificationAction(n.Actions.React.IsMainAction,n.Actions.React.Title,n.Actions.React.Link,t.React,n.Actions.React.Parameters)),n.Actions.Accomplish!=null&&u.appendChild(this.CreateNotificationAction(n.Actions.Accomplish.IsMainAction,n.Actions.Accomplish.Title,n.Actions.Accomplish.Link,t.Accomplish,n.Actions.Accomplish.Parameters)),n.Actions.Postpone!=null&&u.appendChild(this.CreateNotificationAction(n.Actions.Postpone.IsMainAction,n.Actions.Postpone.Title,n.Actions.Postpone.Link,t.Postpone,n.Actions.Postpone.Parameters)),n.Actions.NotInterested!=null&&u.appendChild(this.CreateNotificationAction(n.Actions.NotInterested.IsMainAction,n.Actions.NotInterested.Title,n.Actions.NotInterested.Link,t.NotInterested,n.Actions.NotInterested.Parameters)),n.Actions.Dismiss!=null&&n.Actions.Dismiss.Title!=null&&u.appendChild(this.CreateNotificationAction(n.Actions.Dismiss.IsMainAction,n.Actions.Dismiss.Title,n.Actions.Dismiss.Link,t.Dismiss,n.Actions.Dismiss.Parameters)),this.BindMessageActions(i),i},n.prototype.UpdateMessageCount=function(){this.iconMessageCount.setAttribute("data-notifications-count",(this.Notifications.length>9?9:this.Notifications.length).toString());this.hintMessageCount.setAttribute("data-notifications-count",this.Notifications.length.toString());this.Notifications.length==0?(this.container.classList.remove("HasMessages"),this.container.classList.remove("HasNewMessages"),setTimeout(this.HideNotificationsList.bind(this),300)):(this.container.classList.add("HasMessages"),this.Notifications.filter(function(n){return n.IsUnread}).length>0&&this.container.classList.add("HasNewMessages"))},n.prototype.CreateNotificationAction=function(n,t,i,r,u){i===void 0&&(i=null);r===void 0&&(r=null);u===void 0&&(u=null);var f=document.createElement("a");return f.innerHTML=t,n&&f.classList.add("Main"),f.href="javascript:;",i!=null&&f.setAttribute("data-onnt-action-url",i),r!=null&&(f.setAttribute("data-onnt-message-action",r),u!=null&&f.setAttribute("data-onnt-message-action-parameters",JSON.stringify(u))),f},n.prototype.BindMessageActions=function(n){var t=this,i=n.getAttribute("data-onnt-message-id");n.querySelectorAll("[data-onnt-message-action]").forEach(function(r){r.addEventListener("click",t.MessageActionClick.bind(t,i,n,r))})},n.prototype.MessageActionClick=function(n,t,i){var f=i.getAttribute("data-onnt-message-action"),r=i.getAttribute("data-onnt-action-url"),e=i.getAttribute("data-onnt-message-action-parameters"),u=r!=null&&r!="";this.SendMessageActionToServer(n,f,e,function(){u&&window.location.assign(r)});u||this.HideMessage(n,t)},n.prototype.HideMessage=function(n,t){this.Notifications=this.Notifications.filter(function(t){return t.Key!=n});this.UpdateMessageCount();var i=function(){t.removeEventListener("animationend",i);t.parentNode.removeChild(t)};t.addEventListener("animationend",i);t.classList.add("Dismissed")},n.prototype.SendMessageActionToServer=function(n,t,i,r){i===void 0&&(i=null);r===void 0&&(r=null);var u=new XMLHttpRequest;u.withCredentials=!0;u.open("POST",this.GetApiUrl("ProcessAction"));u.setRequestHeader("Content-Type","application/json; charset=utf-8");u.addEventListener("readystatechange",function(){u.readyState===XMLHttpRequest.DONE&&u.status===204&&r&&r()});u.send(JSON.stringify({Key:n,Action:t,Parameters:JSON.parse(i)}))},n}();n.OnlineNotificationsController=i})(OnlineNotifications||(OnlineNotifications={}));var MainMenuController=function(){function n(){var n=this;(this.html=document.documentElement,this.nav=document.getElementById("MainMenu"),this.nav!=null)&&(this.menu=this.nav.querySelector("ul"),this.siteHeader=document.querySelector("header"),this.toggleButton=this.nav.querySelector('[data-role="Menu-Toggle-Button"]'),this.toggleButton!=null&&(this.toggleButton.addEventListener("click",this.ToggleButtonClick.bind(this)),this.toggleButton.addEventListener("touchend",this.ToggleButtonClick.bind(this))),this.subMenus=this.menu.querySelectorAll("li > .SubMenu"),this.subMenus.forEach(function(t){t.querySelectorAll("a").forEach(function(n){n.addEventListener("click",function(n){return n.stopImmediatePropagation()})});t.querySelectorAll(".CloseButton").forEach(function(i){var r=function(i){i.stopImmediatePropagation();n.CloseSubMenu(t);n.html.classList.remove("SubMenuOpen")};i.addEventListener("click",r);i.addEventListener("touchend",r)})}),this.menu.querySelectorAll("li > a").forEach(function(t){return t.addEventListener("click",function(i){i.stopImmediatePropagation();var r=n.menu.querySelector(".SubMenu.open"),u=t.parentNode.querySelector(".SubMenu");u!=null&&(i.preventDefault(),u==r?n.Close(i):(n.html.classList.add("RootMenuOpen"),n.html.classList.add("SubMenuOpen"),n.toggleButton.classList.add("open"),r!=null&&n.CloseSubMenu(r),n.OpenSubMenu(u)))})}),this.closeEventHandler=this.Close.bind(this),this.InitializeNotifications())}return n.prototype.CloseSubMenu=function(n){n.classList.remove("open");document.documentElement.removeEventListener("click",this.closeEventHandler)},n.prototype.OpenSubMenu=function(n){var r=this,t,i;document.documentElement.addEventListener("click",this.closeEventHandler);n.classList.add("open");t=n.querySelector(".Header");i=n.querySelector(".r-container");t!=null&&this.siteHeader!=null&&(t.style.height="",requestAnimationFrame(function(){t.style.height=t.offsetHeight+r.siteHeader.offsetHeight+"px"}));i!=null&&this.siteHeader!=null&&(i.style.top="",requestAnimationFrame(function(){i.style.top=parseInt(getComputedStyle(i).top,10)+r.siteHeader.offsetHeight+1+"px"}))},n.prototype.InitializeNotifications=function(){XMLHttpRequest&&this.menu.querySelectorAll("[data-menu-notification]").forEach(function(n){var i=n.getAttribute("data-menu-notification").split("/"),t=new XMLHttpRequest;t.withCredentials=!0;t.open("GET",WSUtils.GetWebSiteApiUrl(i[0])+i[1]);t.onreadystatechange=function(){var i,r;t.readyState===XMLHttpRequest.DONE&&t.status===200&&(i=t.response,i!=null&&i>0&&(r=i>9?"9+":i,n.innerText=r.toString(),n.classList.add("Shown")))};t.send()})},n.prototype.Close=function(n){var t=this;document.documentElement.removeEventListener("click",this.closeEventHandler);this.html.classList.contains("RootMenuOpen")&&n.stopImmediatePropagation();this.toggleButton.classList.remove("open");this.html.classList.remove("RootMenuOpen");this.html.classList.remove("SubMenuOpen");this.subMenus.forEach(function(n){return t.CloseSubMenu(n)})},n.prototype.ToggleButtonClick=function(n){var t=this;n.stopImmediatePropagation();n.preventDefault();this.html.classList.contains("RootMenuOpen")?(document.documentElement.removeEventListener("click",this.closeEventHandler),this.html.classList.remove("RootMenuOpen"),this.html.classList.remove("SubMenuOpen"),this.toggleButton.classList.remove("open"),this.subMenus.forEach(function(n){return t.CloseSubMenu(n)})):(this.toggleButton.classList.add("open"),this.html.classList.add("RootMenuOpen"),document.documentElement.addEventListener("click",this.closeEventHandler))},n}(),FooterController=function(){function n(){var r=document.querySelector("footer"),n=document.getElementById("FooterTop"),t=document.querySelector('[data-role="FooterExpandableContent"]'),i=n&&n.querySelector('[data-behavior="Footer-Toggle"]');n!=null&&t!=null&&i!=null&&(i.addEventListener("click",this.ToggleClick.bind(this,i,n,t)),t.hasAttribute("data-state")||t.setAttribute("data-state","collapsed"),this.DisplayConditionalData())}return n.prototype.ToggleClick=function(n,t,i,r,u){var e,o,f,s,c,h;u.preventDefault();i.getAttribute("data-state")=="collapsed"?(e=r.offsetTop,i.style.display="block",o=i.scrollHeight,f=document.documentElement.scrollHeight-window.innerHeight+o,f>e&&(f=e+1),i.style.height=o+"px",i.setAttribute("data-state","expanding"),s=function(){i.removeEventListener("transitionend",s);i.style.height="auto";i.setAttribute("data-state","expanded")},i.addEventListener("transitionend",s),this.FixScroll(i,f)):(i.setAttribute("data-state","collapsing"),c=i.style.transition,i.style.transition="",h=function(){i.removeEventListener("transitionend",h);i.setAttribute("data-state","collapsed");i.style.display=""},i.addEventListener("transitionend",h),window.requestAnimationFrame(function(){i.style.height=i.scrollHeight+"px";i.style.transition=c;window.requestAnimationFrame(function(){i.style.height="0"})}));n.classList.toggle("open")},n.prototype.FixScroll=function(n,t){window.scrollTo(0,t);n.getAttribute("data-state")=="expanding"&&window.requestAnimationFrame(this.FixScroll.bind(this,n,t))},n.prototype.DisplayConditionalData=function(){var t=document.querySelector('[data-footer="DoNotSell"]'),n,i;t!==null&&(n=new XMLHttpRequest,n.withCredentials=!0,i="IsRequestFromCA",WSUtils.GetQueryParameter("debug_visit_from_ca")!==undefined&&(i+="?ip=204.148.19.195"),n.open("GET",WSUtils.GetWebSiteApiUrl("Geo")+i),n.setRequestHeader("Content-Type","application/json; charset=utf-8"),n.addEventListener("readystatechange",function(){n.readyState===XMLHttpRequest.DONE&&n.status===200&&JSON.parse(n.response)&&(t.insertAdjacentHTML("beforebegin"," | "),t.style.display="initial")}),n.send())},n}(),BackToTopController=function(){function n(){if(document.body!=null){var n=document.createElement("div");n.id="BackToTop";document.body.appendChild(n);window.addEventListener("scroll",this.CheckScroll.bind(this,n));n.addEventListener("click",this.GoToTop.bind(this));this.CheckScroll(n)}}return Object.defineProperty(n.prototype,"LongScrollDelta",{get:function(){return 1500},enumerable:!1,configurable:!0}),n.prototype.CheckScroll=function(n){var t=window.innerHeight;document.$scrollTop/t>.7?n.classList.add("Shown"):n.classList.remove("Shown")},n.prototype.GoToTop=function(){window.scrollY>this.LongScrollDelta&&window.scrollTo(0,this.LongScrollDelta);this.SmoothScrollToTop()},n.prototype.SmoothScrollToTop=function(){var i=document.$scrollTop-(document.documentElement.clientTop||0),u=-i,n=0,f=16,r=300,e=function(n,t,i,r){return(n/=r/2)<1?i/2*n*n*n+t:i/2*((n-=2)*n*n+2)+t},t=function(){n+=f;var o=e(n,i,u,r);o<=0||(window.scrollTo(0,e(n,i,u,r)),window.requestAnimationFrame?window.requestAnimationFrame(t):n<r&&setTimeout(t,f))};window.requestAnimationFrame?window.requestAnimationFrame(t):t()},n}()