function $K12(n){return K12Api.getObjectByServerControlID(n)||null}function $$K12(n,t){return document.getElementById($K12(n)[t])||{}}function EnableButton(n,t){var i=_.isString(n)?document.getElementById(n):n;i&&(i.getAttribute("prevhref")||i.setAttribute("prevhref",i.getAttribute("href")),t?(i.setAttribute("href",i.getAttribute("prevhref")),i.removeAttribute("disabled"),i.classList.remove("loading","disabled"),i.classList.contains("disabled")&&i.classList.remove("disabled")):(i.removeAttribute("href"),i.setAttribute("disabled","disabled"),i.classList.add("disabled")))}function ShowHideButton(n,t){n&&$("#"+n).length>0&&(t?jQuery("#"+n).show():jQuery("#"+n).hide())}function ToolBarLoading(n,t){if(n){var r=jQuery("#"+n),i=r.attr("class");i.indexOf("-loading")!=-1?r.attr("class",t?i:i.substr(0,i.indexOf("-loading"))):r.attr("class",t?i+"-loading":i)}}function ToolBarLoadingDisabled(n,t){if($("#"+n).length>0){var r=jQuery("#"+n),i=r.attr("class");$("#"+n).attr("prevhref")||$("#"+n).attr("prevhref",$("#"+n).attr("href"));$("#"+n).removeAttr("href");$("#"+n).attr("disabled","disabled");i.indexOf("-disabled")!=-1&&(i=i.substr(0,i.indexOf("-disabled")));i.indexOf("-loading")!=-1?r.attr("class",t?i:i.substr(0,i.indexOf("-loading"))):r.attr("class",t?i+"-loading":i)}}function CheckAll(n){xgvGrid.SelectAllRowsOnPage(n.GetChecked())}function SelectAll(n,t,i){i.SelectAllRowsOnPage(n.GetChecked())}function EnableFileMenu(n,t){n.SetItemEnabled("0",t,!t);var i=t?"~/Images/menuIcon_18.gif":"/Images/menuIcon_18_disabled.gif",i=K12Api.JsGlobal.ResolveUrl(i);n.SetItemImageUrl("0",i)}function SetFileMenus(n,t,i){EnableFileMenu(n,!1);EnableFileMenu(t,!1);i!=null&&i.pageRowCount>0&&jsGlobal.IsAuthenticated&&(EnableFileMenu(n,!0),EnableFileMenu(t,!0))}function SetMenuVisibleByName(n,t,i){n.GetItem(0).GetItemByName(t).SetEnabled(i)}function ShowHideDiv(n,t,i){i?t?$("#"+n).animate({height:"show"},500):$("#"+n).animate({height:"hide"},500):t?$("#"+n).show():$("#"+n).hide()}function EnableDisable(n,t){t?(n.disabled=!1,n.className=n.className.replace("-disabled","")):(n.disabled=!0,n.className.indexOf("-disabled")<0&&(n.className=n.className+"-disabled"))}function IsSet(n){return typeof window[n]!="undefined"}function InitCountDown(){$(".cell-timeleft").each(function(){var n=this.innerHTML.split("|"),t=new Date(n[0],n[1]-1,n[2],n[3],n[4],n[5]);$(this.parentNode).countdown({until:$.countdown.UTCDate(0,t),compact:!0,layout:"<b>{dn}{dl} {hnn}{sep}{mnn}{sep}{snn} <\/b>"})})}function InitJSCountDown(){$(".cell-timeleft").each(function(){var t=this;t.id=Math.random();var n=this.innerHTML.split("|"),i=new Date(n[0],n[1]-1,n[2],n[3],n[4],n[5]).getTime(),r=setInterval(function(){var u=new Date,o=Date.UTC(u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate(),u.getUTCHours(),u.getUTCMinutes(),u.getUTCSeconds(),u.getUTCMilliseconds()),f=i-o,s=Math.floor(f/864e5),h=Math.floor(f%864e5/36e5),c=Math.floor(f%36e5/6e4),l=Math.floor(f%6e4/1e3),e=document.getElementById(t.id);e!=null&&(e.innerHTML=(n.length>6?n[6]:"")+" <b>"+s+"d "+h+"h "+c+"m "+l+"s <\/b>");f<0&&(clearInterval(r),e!=null&&(e.innerHTML=n[7]==""?"EXPIRED":n[7]));t.style.visibility!=""&&(t.style.visibility="")},1e3)})}function GetPriceOptionByValue(n){var i=PriceOptions.UnitCost,r,t;for(r in PriceOptions)if(t=PriceOptions[r],t.value==n){i=t;break}return i}function GetPriceOptionByField(n){var i=PriceOptions.UnitCost,r,t;for(r in PriceOptions)if(t=PriceOptions[r],t.field==n){i=t;break}return i}function ShowModalImage(n){var t=jQuery("#modal-image-container"),i=jQuery("#modal-image-close"),r=jQuery("#modal-image");return t.length<=0&&(t=jQuery("<div/>",{id:"modal-image-container",style:"display:none;"}).appendTo("body > form"),i=jQuery("<div/>",{id:"modal-image-close",html:"&times;"}),t.append(i),r=jQuery("<img/>",{id:"modal-image"}),t.append(r),i.click(function(){var n=jQuery("#modal-image-container");n.hide()})),t.show(),r.attr("src",n),!0}function ShowModalImageByImageTag(n){var t=jQuery(n).attr("src");return ShowModalImage(t)}function HideShowMore(n){var t=jQuery(n),i=t.prev().prev();i.css("display")=="none"?(i.show(),jQuery(n).text("HIDE MORE"),t.prev().text("  ")):(i.hide(),jQuery(n).text("SHOW MORE"),t.prev().text("... "))}function HideShowDetails(n,t,i,r){t=typeof t!="undefined"?t:"MORE";i=typeof i!="undefined"?i:"LESS";r=typeof r!="undefined"?r:"";let f=jQuery(n);f.text(t);let e=f.prev(".show-hide-3dots"),o=f.prev(".show-hide-3dots").prev().prev(),u=f.prev(".show-hide-3dots").prev();typeof u=="undefined"||typeof u[0]=="undefined"||typeof u[0].classList!="undefined"&&u[0].classList.contains("show-hide-hidden-text")||(u=u.find(".show-hide-hidden-text"));let s=f.parent();u.css("display")=="none"?(u.show(),o.addClass("hidden"),jQuery(n).removeClass("arrow-down").addClass("arrow-up"),f.text(i),r&&s.addClass(r),e.text("  ")):(u.hide(),o.removeClass("hidden"),jQuery(n).removeClass("arrow-up").addClass("arrow-down"),f.text(t),r&&s.removeClass(r),e.text("... "))}function HideShowHTMLDetails(n,t,i,r){t=typeof t!="undefined"?t:"MORE";i=typeof i!="undefined"?i:"LESS";r=typeof r!="undefined"?r:"";let e=jQuery(n);e.text(t);let o=e.prev(".show-hide-3dots"),f=e.prev(".show-hide-3dots").prev().prev();console.log(f);typeof f=="undefined"||typeof f[0]=="undefined"||typeof f[0].classList!="undefined"&&f[0].classList.contains("short-text")||(f=f.find(".short-text"));let u=e.prev(".show-hide-3dots").prev();console.log(u);typeof u=="undefined"||typeof u[0]=="undefined"||typeof u[0].classList!="undefined"&&u[0].classList.contains("show-hide-full-text")||(u=u.find(".show-hide-full-text"));let s=e.parent();u.css("display")=="none"?(u.show(),f.hide(),jQuery(n).removeClass("arrow-down").addClass("arrow-up"),e.text(i),r&&s.addClass(r),o.text("  ")):(u.hide(),f.show(),jQuery(n).removeClass("arrow-up").addClass("arrow-down"),e.text(t),r&&s.removeClass(r),o.text("  "))}function GetYoutubeVideoInfoByVideoURL(n,t,i){var r=GetYoutubeIdByUrl(t);return GetYoutubeVideoInfoByVideoID(n,r,i)}function GetYoutubeVideoInfoByVideoID(n,t,i){var r=!0,u;return i==null&&(r=!1),u=null,jQuery.ajax({url:"https://www.googleapis.com/youtube/v3/videos?part=snippet%2CcontentDetails%2Cstatistics&id="+t+"&key="+n,dataTypw:"json",async:r,success:function(n){n!=null&&(r?i(n):u=n)}}),u}function formatNumber(n,t){var r,i;for(n=n.toString().replace(/,/g,""),n=round(n,t),r=n.indexOf(".")==-1?n.length:n.indexOf("."),i=r-3;i>0;i-=3)n=n.substring(0,i)+","+n.substring(i);return n}function getNumber(n,t){return n=n.toString().replace(/,/g,""),isNaN(n)&&(n="0"),round(n,t)}function round(n,t){n=+n;t=t||0;var i=Math.pow(10,t);return n=Math.round(n*i)/i,n+=Math.pow(10,-(t+1)),n+="",t==0?n.substring(0,n.indexOf(".")):n.substring(0,n.indexOf(".")+t+1)}function formatCurrency(n,t){n=n.toString().replace(/\$|\,/g,"");isNaN(n)&&(n="0");var i=formatNumber(n,t);return"$"+i}function ShowHelp(){var n=window.event.srcElement.value;window.open(n,"helpcontent","width=600,height=425,status,resizable=1,scrollbars=1",!0)}function printIt(){window.print()}function printItLandscape(){var n=document.getElementById("thecontent");w=window.open("about:blank");w.document.open();w.document.write("<html><HEAD>");w.document.write('<link rel="stylesheet" type="text/css" href="Common/SiteStyles.css" />');w.document.write("<\/HEAD>");w.document.write('<div class="page">');w.document.write(n.innerHTML);w.document.write("<\/div>");w.document.writeln("<script>window.print();<\/script>");w.document.writeln("<\/html>");w.document.close();w.close()}function changeBackColor(n,t){t?(lastColorUsed=n.style.backgroundColor,n.style.backgroundColor="#CCCCFF"):n.style.backgroundColor=lastColorUsed}function displayGraphicLoader(){var t=document.getElementById("graphicLoader"),n;t!=null&&(t.src="images/loader.gif");n=document.getElementById("graphicLoaderBottom");n!=null&&(n.src="images/loader.gif")}function doOnClickBody(){var n=document.getElementById("hdnScrollTop"),t;n!=null&&(n.value=document.body.scrollTop);t=document.getElementById("gridBorder");n!=null&&t!=null&&(n.value=t.scrollTop)}function doOnLoadBody(){var n=document.getElementById("hdnScrollTop");n!=null}function showImage(imgName,origName){document.images&&(imgOff=eval(imgName+".src"),origName.src=imgOff)}function LoadInditcator(){this.Init=function(){this.div=document.createElement("div");this.img=document.createElement("img");this.span=document.createElement("span");jQuery(this.img).attr("src",K12Api.JsGlobal.ResolveUrl("~/Images/loader.gif")).css({margin:"2px",verticalAlign:"middle"}).appendTo(this.div);jQuery(this.span).text("Loading...").css({fontWeight:"bold"}).appendTo(this.div);jQuery(this.div).css({backgroundColor:"yellow",border:"2px solid red",padding:"3px 8px 3px 8px",position:"fixed",left:"45%",top:50,whiteSpace:"nowrap",width:"100px",zIndex:1e5}).prependTo(document.body);jQuery.browser.msie&&(jQuery(this.div).css({position:"absolute",top:jQuery(window).scrollTop()}),jQuery(window).scroll(jQuery.proxy(this,"OnScroll")));this.Hide();jQuery(window).on("load",this.Hide.bind(this));jQuery(window).on("unload",this.Show.bind(this))};this.OnScroll=function(){jQuery(this.div).css({top:jQuery(window).scrollTop()})};this.Show=function(){jQuery(this.div).show();jQuery.browser.msie&&setTimeout(jQuery.proxy(this,"RefreshImage"),100)};this.RefreshImage=function(){jQuery(this.img).attr("src",K12Api.JsGlobal.ResolveUrl("~/Images/loader.gif"))};this.Hide=function(){jQuery(this.div).hide()};this.Init()}function hlViewManager_Click(n,t){var i=document.getElementById(t.htmlElement.id).getAttribute("data-mng");ContactInfo.LoadData(i,!0)}function dvxAddAnswerLink_Click(n){rbMessageTypeAnswer.SetChecked(!0);cmbMessageAnswerToQuestion.SetEnabled(!0);cmbMessageAnswerToQuestion.SetValue(n);dxAddAnswerCallBack.PerformCallback(n)}function dvxAddAnswerLink_CallbackComplete(n,t){dvxQuestionAndAnswer_CallbackComplete(n,t);lblMessageSubject.SetText("Question to "+t.result)}function selectQuestion_RB(){imLoaderTo.style.display="";dxMessageTypeQuestion.PerformCallback(null);cmbMessageAnswerToQuestion.SetValue(0);cmbMessageAnswerToQuestion.SetEnabled(!1)}function selectAnswer_RB(){imLoaderTo.style.display="";cmbMessageAnswerToQuestion.SetValue(0);cmbMessageAnswerToQuestion.SetEnabled(!0);selectAnswer_DDL()}function selectAnswer_DDL(){dxMessageTypeAnswer.PerformCallback(null)}function dvxQuestionAndAnswer_CallbackComplete(n,t){lblMessageToAuthor.SetText(t.result);lblMessageSubject.SetText("Question to "+t.result)}function dvxQuestionAndAnswer_EndCallback(){imLoaderTo.style.display="none"}function dxMessageTypeQuestionAndAnswer_EndCallback(){imLoaderTo.style.display="none"}function Grid(n,t,i,r,u,f){this.ASPxGrid=null;this.ToolbarTop=null;this.ToolbarBottom=null;this.signleRowActions=[];this.multiRowActions=[];this.Init=function(){var r=this;this.ASPxGrid=window[n];this.ToolbarTop=t.length>0?$K12(t):null;this.ToolbarBottom=i.length>0?$K12(i):null;this.ASPxGrid.SelectionChanged.AddHandler(jQuery.proxy(this,"OnGridRowSelected"));this.ASPxGrid.EndCallback.AddHandler(jQuery.proxy(this,"OnGridEndCallback"));jQuery(".single-row").each(function(){r.signleRowActions.push(jQuery(this).attr("id"));jQuery(this).removeClass("single-row")});jQuery(".multi-row").each(function(){r.multiRowActions.push(jQuery(this).attr("id"));jQuery(this).removeClass("multi-row")});this.InitSearch();this.OnGridRowSelected(this.ASPxGrid,null)};this.InitSearch=function(){r!=null&&(jQuery("#lbtnSearchGo").removeAttr("onclick").click(jQuery.proxy(this,"OnGridSearch")),jQuery(".search-bar .erase").click(jQuery.proxy(this,"OnGridSearchReset")))};this.OnGridEndCallback=function(){loading.Hide();this.OnGridRowSelected()};this.OnGridRowSelected=function(){var t,n;if(this.DisableAll(),t=this.ASPxGrid.GetSelectedRowCount(),t==1)for(n=0;n<this.signleRowActions.length;n++)EnableButton(this.signleRowActions[n],!0);if(t>0)for(n=0;n<this.multiRowActions.length;n++)EnableButton(this.multiRowActions[n],!0)};this.OnGridSearch=function(){var n=null;return n=r!=null?"search|"+r.GetSearchType()+"|"+r.GetVisibleSearchText():"search|"+f.GetSearchType()+"|"+f.GetSearchText(),this.ASPxGrid.PerformCallback(n),!1};this.OnActiveInactiveClick=function(n,t){var i="search|Active|";switch(t.item.name){case"ActiveInactive":i=i+"2";break;case"Active":i=i+"1";break;case"Inactive":i=i+"0"}return this.ASPxGrid.PerformCallback(i),!1};this.OnGridSearchReset=function(){return this.ASPxGrid.PerformCallback("clear"),!1};this.SetEnabled=function(n){K12Api.GrayOutControl("#"+u,n)};this.DisableAll=function(){for(var n=0;n<this.signleRowActions.length;n++)EnableButton(this.signleRowActions[n],!1);for(n=0;n<this.multiRowActions.length;n++)EnableButton(this.multiRowActions[n],!1)};this.Init()}function OnFileMenuItemClick(n,t){t.processOnServer=!1;switch(t.item.name){case"export":case"print":t.processOnServer=!0;break;case"hidefields":xgvGrid.ShowCustomizationWindow();break;case"resetgrid":GridFilters.ResetGrid()}}function PhoneFaxNumberEntry(n,t,i,r,u,f,e,o,s,h,c,l,a){function v(){n.OnChanged.publish()}var n=this,y;this.OnChanged=new K12Api.Event.Event(this);this.OnValidation=new K12Api.Event.Event(this);this.Init=function(){y=jQuery("#"+t);typeof ASPxClientComboBox!="undefined"&&(this.ddlCountry=ASPxClientComboBox.Cast(i));typeof ASPxClientTextBox!="undefined"&&(this.tbxCountry=ASPxClientTextBox.Cast(r),this.tbxArea=ASPxClientTextBox.Cast(u),this.tbxNumber=ASPxClientTextBox.Cast(f),this.tbxExtention=ASPxClientTextBox.Cast(e));typeof ASPxClientButton!="undefined"&&(this.CountryHelp=ASPxClientButton.Cast(h),this.AreaHelp=ASPxClientButton.Cast(c),this.NumberHelp=ASPxClientButton.Cast(l),this.ExtentionHelp=ASPxClientButton.Cast(a));typeof ASPxClientHiddenField!="undefined"&&(this.hfPhoneParams=ASPxClientHiddenField.Cast(o));this.ddlCountry!=null&&this.ddlCountry.ValueChanged.AddHandler(jQuery.proxy(this,"OnCountryValueChanged"));this.tbxArea!=null&&this.tbxArea.KeyUp.AddHandler(jQuery.proxy(this,"OnAreaKeyUp"));this.tbxCountry!=null&&this.tbxCountry.KeyUp.AddHandler(v,this);this.tbxNumber!=null&&this.tbxNumber.KeyUp.AddHandler(jQuery.proxy(this,"OnNumberKeyUp"));this.tbxExtention!=null&&this.tbxExtention.KeyUp.AddHandler(v,this);typeof this.ddlCountry!="undefined"&&(this._hasCountries=this.ddlCountry.GetItemCount()>0);this.SetVisible(this.hfPhoneParams.Get("ClientVisible"))};this.OnCountryValueChanged=function(n){this.hfPhoneParams.Set("CountryCode",n.GetValue());n.SetText("+"+n.GetValue());v()};this.OnAreaKeyUp=function(n){n.Validate();v()};this.OnNumberKeyUp=function(n){n.Validate();v()};this.GetCountryCode=function(){return this.hfPhoneParams.Get("CountryCode")};this.SetCountry=function(n,t){this.tbxCountry!=null&&this.tbxCountry.SetText(n+" +"+t);this.ddlCountry!=null&&this.ddlCountry.SetText("+"+t);this.hfPhoneParams.Set("CountryCode",t)};this.SetEnabled=function(n){return this.ddlCountry!=null&&this.ddlCountry.SetEnabled(n),this.tbxArea.SetEnabled(n),this.tbxNumber.SetEnabled(n),this.tbxExtention.SetEnabled(n),typeof s=="function"&&s(this),this.CountryHelp!=null&&this.CountryHelp.SetEnabled(n),this.AreaHelp!=null&&this.AreaHelp.SetEnabled(n),this.NumberHelp!=null&&this.NumberHelp.SetEnabled(n),this.ExtentionHelp!=null&&this.ExtentionHelp.SetEnabled(n),!1};this.SetValue=function(n){var u,i;n=n||"";var t=n.split(")"),r=t[0].split("("),f=r.length==2?r[1].trim():"";this.tbxArea.SetValue(f);u=t.length==2?t[1].trim().replace("-",""):"";this.tbxNumber.SetValue(u);i=t.length==2?t[1].split("x"):[];i=i.length==2?i[1]:null;this.tbxExtention.SetValue(i)};this.SetValueO=function(n){this.tbxArea.SetText(n.AreaCode);this.tbxNumber.SetText(n.Number);this.tbxExtention.SetText(n.Extension);this.tbxCountry.SetText("+"+n.CountryCode);this.ddlCountry.SetValue(n.CountryCode);this.hfPhoneParams.Set("CountryCode",n.CountryCode)};this.GetValue=function(){var n="",t=this.Get();return t.AreaCode&&t.Number&&(n="("+t.AreaCode+")"+t.Number),n&&this.tbxCountry.GetVisible()&&(n=(this.ddlCountry.GetValue()||"")+n),n&&this.tbxExtention.GetVisible()&&t.Extension.length>0&&(n+=" x"+t.Extension),n};this.GetFullNumber=function(){return"+"+this.GetCountryCode()+this.GetValue()};this.Reset=function(){this.ddlCountry!=null&&this._hasCountries&&this.ddlCountry.SetSelectedIndex(0);this.tbxArea.SetText("");this.tbxNumber.SetText("");this.tbxExtention.SetText("")};this.Get=function(){return{AreaCode:this.tbxArea.GetValue()||"",Number:this.tbxNumber.GetValue()||"",Extension:this.tbxExtention.GetValue()||""}};this.Set=function(n){this.tbxArea.SetText(n.AreaCode);this.tbxNumber.SetText(n.Number);this.tbxExtention.SetText(n.Extension)};this.GetVisible=function(){return y.is(":visible")};this.SetVisible=function(n){n=!!n;y.toggle(n);this.hfPhoneParams.Set("ClientVisible",n)};this.SetRequiredStyle=function(n){var t={border:n?"1px solid red":""};jQuery(this.ddlCountry.GetMainElement()).css(t);jQuery(this.tbxArea.GetMainElement()).css(t);jQuery(this.tbxNumber.GetMainElement()).css(t);jQuery(this.tbxExtention.GetMainElement()).css(t)};this.Init()}var K12Api,DX,SimpleTimeout,ControlHelper,PriceOptions,__aspxControlCollection,GetYoutubeIdByUrl,lastColorUsed,filter;+function(){"use strict";var t=window.ContractFX=window.ContractFX||{},n;t.Common=t.Common||{};n=t.Common.Event=function(n){this._source=n;this._subscribers=[];this._contexts=[];this._customData=[]};n.prototype.hasSubscribers=function(){return this._subscribers.length>0};n.prototype.subscribe=function(n,t,i){if(typeof n!="function")return!1;var r=this._subscribers.indexOf(n);return(r==-1||this._contexts[r]!==t)&&(this._subscribers.push(n),this._contexts.push(t),this._customData.push(i)),{remove:function(){var t=this._subscribers.indexOf(n);t>-1&&(this._subscribers.splice(t,1),this._contexts.splice(t,1),this._customData.splice(t,1))}.bind(this)}};n.prototype.publish=function(){for(var i=new Array(arguments.length),t,r,u,f,n=0;n<arguments.length;n++)i[n]=arguments[n];for(t={defaultPrevented:!1,propagationStopped:!1,preventDefault:function(){this.defaultPrevented=!0},stopPropagation:function(){this.propagationStopped=!0},customData:undefined,data:i},n=0;n<this._subscribers.length;n++)if(r=this._contexts[n]||window,t.customData=this._customData[n],u=[this._source,t].concat(t.data),f=this._subscribers[n].apply(r,u),f!==!1||t.defaultPrevented||t.preventDefault(),t.propagationStopped)break;return t};n.prototype.proxy=function(){return function(n){var t=this.publish.apply(this,arguments);return n&&(t.defaultPrevented&&typeof n.preventDefault=="function"&&n.preventDefault(),t.propagationStopped&&typeof n.propagationStopped=="function"&&n.stopPropagation()),t.defaultPrevented?!1:!0}.bind(this)}}();+function(){var t=window.ContractFX=window.ContractFX||{},n;t.Common=t.Common||{};n=t.Common.SiteConfig=function(n){this._config=n;this.BaseUrl=n.BaseUrl;this.UserID=n.UserID;this.OrgHierarchyID=n.OrganizationalHierarchyID;this.ClientId=n.ClientId;this.RoleID=n.RoleID;this.IsAuthenticated=this.UserID>0&&this.OrgHierarchyID>0;this.IsSingleClient=!0;this.WorldERPUrl=n.WorldERPUrl;this.ContractFXUrl=n.ContractFXUrl;this.SpendManagerProUrl=n.SpendManagerProUrl;this.MyProfileURL=n.MyProfileURL;this.ProRFxUrl=n.ProRFxUrl;this.IsAtHome=n.CurrentPath.indexOf("home.aspx")>=0;this.UTCOffsetMinutes=n.UTCOffsetMinutes;this.InvalidFilenameCharacters=n.InvalidFilenameCharacters};n.prototype.GetClientTime=function(){var n=new Date,t=new Date;return t.setTime(Date.UTC(n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate(),n.getUTCHours(),n.getUTCMinutes(),n.getUTCSeconds(),n.getUTCMilliseconds())+this.UTCOffsetMinutes*6e4),t};n.prototype.IsValidFilenames=function(n){var t=this.InvalidFilenameCharacters;return n.every(function(n){for(var i=0;i<t.length;i++)if(n.indexOf(t[i])!=-1)return!1;return!0})};n.prototype.ResolveUrl=function(n){return n.indexOf("~/")==0&&(n=this._config.BaseUrl+n.substring(2)),n};n.prototype.Redirect=function(n){window.location.href=this.ResolveUrl(n)};n.prototype.GetLoading=function(){return loading}}();window.K12Event=ContractFX.Common.Event;K12Api=function(n){"use strict";var t=n.siteConfig!=undefined?new ContractFX.Common.SiteConfig(n.siteConfig):null;return t==null&&console.error("site config not available"),{instances:{},SiteConfig:t,JsGlobal:null,UI:{Grid:{},LoadIndicator:null},getObjectByServerControlID:function(n){return this.instances[n]},registerObject:function(n,t){this.instances[n]=t},Event:{}}}(window);+function(n){"use strict";n.Event.Event=ContractFX.Common.Event;n.Event.ValidationArg=function(n){n?this.FromDX(n):(this.IsValid=!0,this.ErrorText=null,this.Value=null)};n.Event.ValidationArg.prototype.FromDX=function(n){return this.IsValid=n.isValid,this.ErrorText=n.errorText,this.Value=n.value,this};n.Event.ValidationArg.prototype.ToDX=function(n){return n=n||{},n.isValid=this.IsValid,n.errorText=this.ErrorText,n.value=this.Value,n}}(K12Api);+function(n,t,i){function r(n){if(n.htmlEvent.target!=null&&n.htmlEvent.target.href!=null)return!0;if(document.all){if(t(n.htmlEvent).attr("onclick")!=null)return!0}else if(n.htmlEvent.explicitOriginalTarget!=null&&n.htmlEvent.explicitOriginalTarget.attributes!=null&&n.htmlEvent.explicitOriginalTarget.attributes.onclick!=null||typeof t(n.htmlEvent.target).filter(":input").get(0)!="undefined"||typeof t(n.htmlEvent.target).parents(".cell-no-click").get(0)!="undefined")return!0;return!1}n.SingleSelect=i.UI.Grid.SingleSelect=function(n,t){r(t)?t.cancel=!0:(n._isRowSelected(t.visibleIndex)||n.SelectAllRowsOnPage(!1),n.SelectRowOnPage(t.visibleIndex,!n._isRowSelected(t.visibleIndex)),t.cancel=!0)};n.MultiSelect=i.UI.Grid.MultiSelect=function(n,t){r(t)?t.cancel=!0:(typeof cbxCheckAll!="undefined"&&cbxCheckAll.SetChecked(!1),n.SelectRowOnPage(t.visibleIndex,!n._isRowSelected(t.visibleIndex)),t.cancel=!0)}}(window,jQuery,K12Api);jQuery(function(){typeof jQuery.tooltip!="undefined"&&(jQuery("[data-tooltip]").tooltip({bodyHandler:function(){return jQuery(this).attr("data-tooltip")},showURL:!1}),jQuery(".popup-tooltip > span").tooltip({bodyHandler:function(){return jQuery(this).next().html()}}));OnMouseEnter=function(n){n.preventDefault();jQuery(".menu-context").hide();jQuery("[data-menu]").removeClass("active");jQuery(this).addClass("active")};OnOpen=function(n){var i=jQuery(this);i.attr("href")||n.preventDefault();var f=i.data("menu"),r=jQuery("#"+f),o=r.data("position"),t=jQuery(this).offset();if(o=="auto"){var s=jQuery(window).height()/2,h=jQuery(window).width()/2,c=t.left<=t.top,e=this.getBoundingClientRect(),l=Math.floor(e.height),a=Math.floor(e.width),u;c?(t.bottom="auto",t.left<=h?(t.left-=15,t.left=t.left+a+"px",t.top-=50,t.right="auto"):(t.left="auto",t.right=t.left+"px")):(t.right="auto",t.top<=s?(u="top",t.top=t.top+l+"px",t.bottom="auto"):(u="bottom",t.top="auto",t.bottom=t.top+"px"));i.removeClass("top bottom").addClass(u);r.removeClass("top bottom").addClass(u)}else f=="contextNotifications"?(r.width(i.width()),t.top+=i.outerHeight()):i.attr("move-left")!=null?(t.left-=parseInt(i.attr("move-left")),t.top+=i.outerHeight()):(t.top-=50,t.left-=15,t.top+=i.outerHeight());r.css(t).show();r.trigger("menu-open")};K12Api.UI.SetupMenus=function(n){n=jQuery(n||document);jQuery("[data-menu]",n).each(function(){var n=jQuery(this).attr("data-event-open")||"mouseenter";jQuery(this).bind("mouseenter",OnMouseEnter).bind(n,OnOpen).click(function(){return this.href!=""?!0:(setTimeout(function(){loading.Hide()},100),!1)})});jQuery("[data-menu]",n).parents().bind("mouseleave",function(){jQuery(".menu-context").hide();jQuery("[data-menu]").removeClass("active")});jQuery("[data-value]",n).click(function(){var n=jQuery(this).attr("data-value"),t=jQuery(this).text();return jQuery(this).parent().find("input[type=hidden]").val(n),jQuery(this).parent().prev().text(t),jQuery(".menu-context").hide(),jQuery("[data-menu]").removeClass("active"),RefreshSearchDDLs(),!1});jQuery(".menu-context input[type=hidden]",n).each(function(){var t=jQuery(this).val(),n;t&&t.length>0&&(n=jQuery(this).parent().find('a[data-value="'+t+'"]'),n.length>0?jQuery(this).parent().prev().text(n.text()):(n=jQuery(this).parent().find("input[type=text]"),n.length>0&&(jQuery(this).parent().prev().text(t),jQuery(this).next().find("input[type=radio]").removeAttr("checked").filter("[id*=Spec]").attr("checked","checked"),n.val(t))))})};K12Api.UI.SetupMenus()});DX={GetFloat:function(n){if(n&&typeof n.GetValue=="function"){var t=n.GetValue();if(t)return parseFloat(t.replace(/,/g,""))}return 0},GetInt:function(n){if(n&&typeof n.GetValue=="function"){var t=n.GetValue();if(t)return parseInt(t.replace(/,/g,""))}return 0}};Array.prototype.indexOf||(Array.prototype.indexOf=function(n){var i=this.length,t=Number(arguments[1])||0;for(t=t<0?Math.ceil(t):Math.floor(t),t<0&&(t+=i);t<i;t++)if(t in this&&this[t]===n)return t;return-1});jQuery(document).ready(function(){$("a[rel=fancybox-modal]").each(function(){$(this).fancybox({modal:!1,padding:5,showNavArrows:!1})});setTimeout(function(){$(".signup-help-blink.animation").each(function(){console.log($(this).id);$(this).removeClass("animation");$(this).addClass("hide");console.log("Hide help blink")})},10700)});SimpleTimeout={IdCollection:[],Trigger:function(n,t,i){this.Init=function(){typeof SimpleTimeout.IdCollection[n]!="undefined"&&clearInterval(SimpleTimeout.IdCollection[n]);SimpleTimeout.IdCollection[n]=setInterval(this.CallFunction,i)};this.CallFunction=function(){clearInterval(SimpleTimeout.IdCollection[n]);typeof t!="undefined"&&t()};this.Init()},KeepTrying:function(n,t,i,r){this.Init=function(){typeof SimpleTimeout.IdCollection[this.ID]!="undefined"&&clearInterval(SimpleTimeout.IdCollection[n]);i()?t():SimpleTimeout.IdCollection[n]=setInterval(this.CallFunction,r)};this.CallFunction=function(){i()&&(clearInterval(SimpleTimeout.IdCollection[n]),t())};this.Init()}};ControlHelper={Associate:function(n,t){$(n).attr("type")=="radio"?ControlHelper.AssociateRadio(n,t):(ControlHelper.CheckState(n,t),$(n).unbind().click(function(){ControlHelper.CheckState(n,t)}))},AssociateRadio:function(n,t){ControlHelper.CheckState(n,t);var i=$(n).attr("name"),r=$(n).attr("value");$(n).get(0).element=t;$("input[type=radio][name="+i+"]").unbind().click(function(){$("input[type=radio][name="+i+"]").each(function(){ControlHelper.CheckState(this,this.element)})})},CheckState:function(n,t){$(n).is(":checked")?$(t).removeAttr("disabled"):$(t).attr("disabled","disabled")}};PriceOptions=Object.freeze({UnitCost:{value:0,name:"Unit Price in $",field:"Bid_Unit_Price",name2:"Bid Unit Price"},MarginCurrency:{value:1,name:"Price Margin in $",field:"Bid_Unit_Price_Margin_Currency",name2:"Bid Margin in $"},MarginPercent:{value:2,name:"Price Margin in %",field:"Bid_Unit_Price_Margin_Percent",name2:"Bid Margin in %"},InterestPercent:{value:3,name:"Interest in %",field:"Bid_Unit_Price_Interest_Percent",name2:"Bid Interest in %"}});__aspxControlCollection={ControlsInitialized:{AddHandler:function(n){ASPx.GetControlCollection().ControlsInitialized.AddHandler(n)}}};GetYoutubeIdByUrl=function(n){var t=n.match(/^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#\&\?]*).*/);return t&&t[7].length==11?t[7]:!1};_.templateSettings={interpolate:/\{\{(.+?)\}\}/g,evaluate:/\{%([\s\S]+?)%\}/g,escape:/\{%-([\s\S]+?)%\}/g},function(n){function h(){this.regional=[];this.regional[""]={labels:["Years","Months","Weeks","Days","Hours","Minutes","Seconds"],labels1:["Year","Month","Week","Day","Hour","Minute","Second"],compactLabels:["y","m","w","d"],whichLabels:null,timeSeparator:":",isRTL:!1};this._defaults={until:null,since:null,timezone:null,serverSync:null,format:"dHMS",layout:"",compact:!1,significant:0,description:"",expiryUrl:"",expiryText:"",alwaysExpire:!1,onExpiry:null,onTick:null,tickInterval:1};n.extend(this._defaults,this.regional[""]);this._serverSyncs=[]}function c(t,i){n.extend(t,i);for(var r in i)i[r]==null&&(t[r]=null);return t}var s="countdown",t=0,r=1,e=2,o=3,u=4,f=5,i=6;n.extend(h.prototype,{markerClassName:"hasCountdown",_timer:setInterval(function(){n.countdown._updateTargets()},980),_timerTargets:[],setDefaults:function(n){this._resetExtraLabels(this._defaults,n);c(this._defaults,n||{})},UTCDate:function(n,t,i,r,u,f,e,o){typeof t=="object"&&t.constructor==Date&&(o=t.getMilliseconds(),e=t.getSeconds(),f=t.getMinutes(),u=t.getHours(),r=t.getDate(),i=t.getMonth(),t=t.getFullYear());var s=new Date;return s.setUTCFullYear(t),s.setUTCDate(1),s.setUTCMonth(i||0),s.setUTCDate(r||1),s.setUTCHours(u||0),s.setUTCMinutes((f||0)-(Math.abs(n)<30?n*60:n)),s.setUTCSeconds(e||0),s.setUTCMilliseconds(o||0),s},periodsToSeconds:function(n){return n[0]*31557600+n[1]*2629800+n[2]*604800+n[3]*86400+n[4]*3600+n[5]*60+n[6]},_settingsCountdown:function(t,i){if(!i)return n.countdown._defaults;var r=n.data(t,s);return i=="all"?r.options:r.options[i]},_attachCountdown:function(t,i){var r=n(t),u;r.hasClass(this.markerClassName)||(r.addClass(this.markerClassName),u={options:n.extend({},i),_periods:[0,0,0,0,0,0,0]},n.data(t,s,u),this._changeCountdown(t))},_addTarget:function(n){this._hasTarget(n)||this._timerTargets.push(n)},_hasTarget:function(t){return n.inArray(t,this._timerTargets)>-1},_removeTarget:function(t){this._timerTargets=n.map(this._timerTargets,function(n){return n==t?null:n})},_updateTargets:function(){for(var n=this._timerTargets.length-1;n>=0;n--)this._updateCountdown(this._timerTargets[n])},_updateCountdown:function(t,i){var c=n(t),r,u,f,l,e,o,a,h;(i=i||n.data(t,s),i)&&(c.html(this._generateHTML(i)),c[(this._get(i,"isRTL")?"add":"remove")+"Class"]("countdown_rtl"),r=this._get(i,"onTick"),r&&(u=i._hold!="lap"?i._periods:this._calculatePeriods(i,i._show,this._get(i,"significant"),new Date),f=this._get(i,"tickInterval"),(f==1||this.periodsToSeconds(u)%f==0)&&r.apply(t,[u])),l=i._hold!="pause"&&(i._since?i._now.getTime()<i._since.getTime():i._now.getTime()>=i._until.getTime()),l&&!i._expiring?(i._expiring=!0,(this._hasTarget(t)||this._get(i,"alwaysExpire"))&&(this._removeTarget(t),e=this._get(i,"onExpiry"),e&&e.apply(t,[]),o=this._get(i,"expiryText"),o&&(a=this._get(i,"layout"),i.options.layout=o,this._updateCountdown(t,i),i.options.layout=a),h=this._get(i,"expiryUrl"),h&&(window.location=h)),i._expiring=!1):i._hold=="pause"&&this._removeTarget(t),n.data(t,s,i))},_changeCountdown:function(t,i,r){var e,u,f;i=i||{};typeof i=="string"&&(e=i,i={},i[e]=r);u=n.data(t,s);u&&(this._resetExtraLabels(u.options,i),c(u.options,i),this._adjustSettings(t,u),n.data(t,s,u),f=new Date,(u._since&&u._since<f||u._until&&u._until>f)&&this._addTarget(t),this._updateCountdown(t,u))},_resetExtraLabels:function(n,t){var r=!1,i;for(i in t)if(i!="whichLabels"&&i.match(/[Ll]abels/)){r=!0;break}if(r)for(i in n)i.match(/[Ll]abels[0-9]/)&&(n[i]=null)},_adjustSettings:function(n,t){for(var u,f=this._get(t,"serverSync"),i=0,o=null,s,r,e=0;e<this._serverSyncs.length;e++)if(this._serverSyncs[e][0]==f){o=this._serverSyncs[e][1];break}o!=null?(i=f?o:0,u=new Date):(s=f?f.apply(n,[]):null,u=new Date,i=s?u.getTime()-s.getTime():0,this._serverSyncs.push([f,i]));r=this._get(t,"timezone");r=r==null?-u.getTimezoneOffset():r;t._since=this._get(t,"since");t._since!=null&&(t._since=this.UTCDate(r,this._determineTime(t._since,null)),t._since&&i&&t._since.setMilliseconds(t._since.getMilliseconds()+i));t._until=this.UTCDate(r,this._determineTime(this._get(t,"until"),u));i&&t._until.setMilliseconds(t._until.getMilliseconds()+i);t._show=this._determineShow(t)},_destroyCountdown:function(t){var i=n(t);i.hasClass(this.markerClassName)&&(this._removeTarget(t),i.removeClass(this.markerClassName).empty(),n.removeData(t,s))},_pauseCountdown:function(n){this._hold(n,"pause")},_lapCountdown:function(n){this._hold(n,"lap")},_resumeCountdown:function(n){this._hold(n,null)},_hold:function(t,i){var r=n.data(t,s),u;r&&(r._hold!="pause"||i||(r._periods=r._savePeriods,u=r._since?"-":"+",r[r._since?"_since":"_until"]=this._determineTime(u+r._periods[0]+"y"+u+r._periods[1]+"o"+u+r._periods[2]+"w"+u+r._periods[3]+"d"+u+r._periods[4]+"h"+u+r._periods[5]+"m"+u+r._periods[6]+"s"),this._addTarget(t)),r._hold=i,r._savePeriods=i=="pause"?r._periods:null,n.data(t,s,r),this._updateCountdown(t,r))},_getTimesCountdown:function(t){var i=n.data(t,s);return i?i._hold?this._calculatePeriods(i,i._show,this._get(i,"significant"),new Date):i._periods:null},_get:function(t,i){return t.options[i]!=null?t.options[i]:n.countdown._defaults[i]},_determineTime:function(t,i){var u=function(n){var t=new Date;return t.setTime(t.getTime()+n*1e3),t},f=function(t){t=t.toLowerCase();for(var u=new Date,f=u.getFullYear(),e=u.getMonth(),r=u.getDate(),o=u.getHours(),s=u.getMinutes(),h=u.getSeconds(),c=/([+-]?[0-9]+)\s*(s|m|h|d|w|o|y)?/g,i=c.exec(t);i;){switch(i[2]||"s"){case"s":h+=parseInt(i[1],10);break;case"m":s+=parseInt(i[1],10);break;case"h":o+=parseInt(i[1],10);break;case"d":r+=parseInt(i[1],10);break;case"w":r+=parseInt(i[1],10)*7;break;case"o":e+=parseInt(i[1],10);r=Math.min(r,n.countdown._getDaysInMonth(f,e));break;case"y":f+=parseInt(i[1],10);r=Math.min(r,n.countdown._getDaysInMonth(f,e))}i=c.exec(t)}return new Date(f,e,r,o,s,h,0)},r=t==null?i:typeof t=="string"?f(t):typeof t=="number"?u(t):t;return r&&r.setMilliseconds(0),r},_getDaysInMonth:function(n,t){return 32-new Date(n,t,32).getDate()},_normalLabels:function(n){return n},_generateHTML:function(s){var a=this._get(s,"significant"),v,h;s._periods=s._hold?s._periods:this._calculatePeriods(s,s._show,a,new Date);var b=!1,k=0,p=a,c=n.extend({},s._show);for(h=t;h<=i;h++)b|=s._show[h]=="?"&&s._periods[h]>0,c[h]=s._show[h]=="?"&&!b?null:s._show[h],k+=c[h]?1:0,p-=s._periods[h]>0?1:0;for(v=[!1,!1,!1,!1,!1,!1,!1],h=i;h>=t;h--)s._show[h]&&(s._periods[h]?v[h]=!0:(v[h]=p>0,p--));var w=this._get(s,"compact"),d=this._get(s,"layout"),g=w?this._get(s,"compactLabels"):this._get(s,"labels"),nt=this._get(s,"whichLabels")||this._normalLabels,tt=this._get(s,"timeSeparator"),it=this._get(s,"description")||"",y=function(t){var i=n.countdown._get(s,"compactLabels"+nt(s._periods[t]));return c[t]?s._periods[t]+(i?i[t]:g[t])+" ":""},l=function(t){var i=n.countdown._get(s,"labels"+nt(s._periods[t]));return!a&&c[t]||a&&v[t]?'<span class="countdown_section"><span class="countdown_amount">'+s._periods[t]+"<\/span><br/>"+(i?i[t]:g[t])+"<\/span>":""};return d?this._buildLayout(s,c,d,w,a,v):(w?'<span class="countdown_row countdown_amount'+(s._hold?" countdown_holding":"")+'">'+y(t)+y(r)+y(e)+y(o)+(c[u]?this._minDigits(s._periods[u],2):"")+(c[f]?(c[u]?tt:"")+this._minDigits(s._periods[f],2):"")+(c[i]?(c[u]||c[f]?tt:"")+this._minDigits(s._periods[i],2):""):'<span class="countdown_row countdown_show'+(a||k)+(s._hold?" countdown_holding":"")+'">'+l(t)+l(r)+l(e)+l(o)+l(u)+l(f)+l(i))+"<\/span>"+(it?'<span class="countdown_row countdown_descr">'+it+"<\/span>":"")},_buildLayout:function(s,h,c,l,a,v){for(var g=this._get(s,l?"compactLabels":"labels"),nt=this._get(s,"whichLabels")||this._normalLabels,p=function(t){return(n.countdown._get(s,(l?"compactLabels":"labels")+nt(s._periods[t]))||g)[t]},y=function(n,t){return Math.floor(n/t)%10},tt={desc:this._get(s,"description"),sep:this._get(s,"timeSeparator"),yl:p(t),yn:s._periods[t],ynn:this._minDigits(s._periods[t],2),ynnn:this._minDigits(s._periods[t],3),y1:y(s._periods[t],1),y10:y(s._periods[t],10),y100:y(s._periods[t],100),y1000:y(s._periods[t],1e3),ol:p(r),on:s._periods[r],onn:this._minDigits(s._periods[r],2),onnn:this._minDigits(s._periods[r],3),o1:y(s._periods[r],1),o10:y(s._periods[r],10),o100:y(s._periods[r],100),o1000:y(s._periods[r],1e3),wl:p(e),wn:s._periods[e],wnn:this._minDigits(s._periods[e],2),wnnn:this._minDigits(s._periods[e],3),w1:y(s._periods[e],1),w10:y(s._periods[e],10),w100:y(s._periods[e],100),w1000:y(s._periods[e],1e3),dl:p(o),dn:s._periods[o],dnn:this._minDigits(s._periods[o],2),dnnn:this._minDigits(s._periods[o],3),d1:y(s._periods[o],1),d10:y(s._periods[o],10),d100:y(s._periods[o],100),d1000:y(s._periods[o],1e3),hl:p(u),hn:s._periods[u],hnn:this._minDigits(s._periods[u],2),hnnn:this._minDigits(s._periods[u],3),h1:y(s._periods[u],1),h10:y(s._periods[u],10),h100:y(s._periods[u],100),h1000:y(s._periods[u],1e3),ml:p(f),mn:s._periods[f],mnn:this._minDigits(s._periods[f],2),mnnn:this._minDigits(s._periods[f],3),m1:y(s._periods[f],1),m10:y(s._periods[f],10),m100:y(s._periods[f],100),m1000:y(s._periods[f],1e3),sl:p(i),sn:s._periods[i],snn:this._minDigits(s._periods[i],2),snnn:this._minDigits(s._periods[i],3),s1:y(s._periods[i],1),s10:y(s._periods[i],10),s100:y(s._periods[i],100),s1000:y(s._periods[i],1e3)},b=c,k,d,w=t;w<=i;w++)k="yowdhms".charAt(w),d=new RegExp("\\{"+k+"<\\}(.*)\\{"+k+">\\}","g"),b=b.replace(d,!a&&h[w]||a&&v[w]?"$1":"");return n.each(tt,function(n,t){var i=new RegExp("\\{"+n+"\\}","g");b=b.replace(i,t)}),b},_minDigits:function(n,t){return(n=""+n,n.length>=t)?n:(n="0000000000"+n,n.substr(n.length-t))},_determineShow:function(n){var s=this._get(n,"format"),h=[];return h[t]=s.match("y")?"?":s.match("Y")?"!":null,h[r]=s.match("o")?"?":s.match("O")?"!":null,h[e]=s.match("w")?"?":s.match("W")?"!":null,h[o]=s.match("d")?"?":s.match("D")?"!":null,h[u]=s.match("h")?"?":s.match("H")?"!":null,h[f]=s.match("m")?"?":s.match("M")?"!":null,h[i]=s.match("s")?"?":s.match("S")?"!":null,h},_calculatePeriods:function(s,h,c,l){var v,a,ut,b,p,w,y;if(s._now=l,s._now.setMilliseconds(0),v=new Date(s._now.getTime()),s._since?l.getTime()<s._since.getTime()?s._now=l=v:l=s._since:(v.setTime(s._until.getTime()),l.getTime()>s._until.getTime()&&(s._now=l=v)),a=[0,0,0,0,0,0,0],h[t]||h[r]){var k=n.countdown._getDaysInMonth(l.getFullYear(),l.getMonth()),nt=n.countdown._getDaysInMonth(v.getFullYear(),v.getMonth()),tt=v.getDate()==l.getDate()||v.getDate()>=Math.min(k,nt)&&l.getDate()>=Math.min(k,nt),it=function(n){return(n.getHours()*60+n.getMinutes())*60+n.getSeconds()},rt=Math.max(0,(v.getFullYear()-l.getFullYear())*12+v.getMonth()-l.getMonth()+(v.getDate()<l.getDate()&&!tt||tt&&it(v)<it(l)?-1:0));a[t]=h[t]?Math.floor(rt/12):0;a[r]=h[r]?rt-a[t]*12:0;l=new Date(l.getTime());ut=l.getDate()==k;b=n.countdown._getDaysInMonth(l.getFullYear()+a[t],l.getMonth()+a[r]);l.getDate()>b&&l.setDate(b);l.setFullYear(l.getFullYear()+a[t]);l.setMonth(l.getMonth()+a[r]);ut&&l.setDate(b)}if(p=Math.floor((v.getTime()-l.getTime())/1e3),w=function(n,t){a[n]=h[n]?Math.floor(p/t):0;p-=a[n]*t},w(e,604800),w(o,86400),w(u,3600),w(f,60),w(i,1),p>0&&!s._since){var ft=[1,12,4.3482,7,24,60,60],d=i,g=1;for(y=i;y>=t;y--)h[y]&&(a[d]>=g&&(a[d]=0,p=1),p>0&&(a[y]++,p=0,d=y,g=1)),g*=ft[y]}if(c)for(y=t;y<=i;y++)c&&a[y]?c--:c||(a[y]=0);return a}});n.fn.countdown=function(t){var i=Array.prototype.slice.call(arguments,1);return t=="getTimes"||t=="settings"?n.countdown["_"+t+"Countdown"].apply(n.countdown,[this[0]].concat(i)):this.each(function(){typeof t=="string"?n.countdown["_"+t+"Countdown"].apply(n.countdown,[this].concat(i)):n.countdown._attachCountdown(this,t)})};n.countdown=new h}(jQuery);+function(n){"use strict";var i=n.ContractFX=n.ContractFX||{},t;i.Common=i.Common||{};t=i.Common.UrlUtils=i.Common.UrlUtils||{};t.PATH_AND_QUERY=1;t.ParseUrl=function(n){var t=n.match("^((https?)://)?(([a-z0-9-.]+)(:([0-9]+))?)?(/[^?#]*)(\\?([^#]*))?"),u,f,i,r;if(!t)return null;if(u={},t[9])for(f=t[9].split("&"),i=0;i<f.length;i++)r=f[i].split("=",2),u[r[0]]=r.length==2?decodeURIComponent(r[1]):null;return{Schema:t[2],Host:t[4],Port:t[6],Path:t[7],Query:u}};t.GetFullPath=function(n){var t=n.indexOf("?");return t>0?n.substring(0,t):n};t.BuildUrl=function(n){var t="";return n.Schema&&(t+=n.Schema),n.Host&&(t+=n.Host),n.Port&&(t+=n.Port),n.Path&&(t+=n.Path),n.Query&&(t+=n.Query),t};t.CompareUrls=function(n,i,r){var u=r==t.PATH_AND_QUERY,f=r==t.PATH_AND_QUERY;return u&&n.Path!=i.Path?!1:f&&(!_.isMatch(n.Query,i.Query)||Object.keys(n.Query).length!=Object.keys(i.Query).length)?!1:!0}}(window),function(n){"use strict";var t=n.ContractFX=n.ContractFX||{},i;t.Common=t.Common||{};i=t.Common.Utils=t.Common.Utils||{};i.Extend=function(n,t){var i=function(){this.constructor=n};i.prototype=t.prototype;n.prototype=new i};i.GenerateUUID=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){var t=Math.random()*16|0,i=n=="x"?t:t&3|8;return i.toString(16)})};i.EncodeHtml=function(n){return jQuery("<div><\/div>").text(n).html()}}(window),function(n){"use strict";n.ContractFX=n.ContractFX||{};n.ContractFX.Common=n.ContractFX.Common||{};n.ContractFX.Common.PopupAutoResizer=function(t){function s(){t.Init.AddHandler(function(){r=jQuery(h());u=r.find(".content-wrapper");i=r.find(".popup-content");t.Shown.AddHandler(c,e);t.Closing.AddHandler(l,e);jQuery(document).keydown(function(n){n.keyCode==27&&t.Hide()})})}function h(){return t.GetContentContainer(-1)}function o(){var e=jQuery(n).height(),o=t.GetHeight(),s=r.height(),h=u.height(),c=i.height(),l=o-s+(s-h),a=l+c,v=a-e,f;v>0?(f=o-e,f!=0&&u.height(h-f)):u.height("auto");t.UpdatePosition()}function c(){i.on("resize",f);jQuery(n).on("resize",f);o()}function l(){jQuery(n).off("resize",f);i.off("resize")}var e=this,r,u,i,f;this.OnBeforeSave=new K12Event(this);f=function(){o()}.bind(this);s.call(this)}}(window),function(n,t){"use strict";var i=n.ContractFX=n.ContractFX||{};i.Common=i.Common||{};i.Common.PopupBase=function(n){this._popup=n;this._closeDefer=null;this._isAutoClearErrors=!1;this.OnReady=new K12Event(this);n.Init.AddHandler(this._popup_Init,this)};i.Common.PopupBase.prototype.GetPopup=function(){return this._popup};i.Common.PopupBase.prototype.GetContentContainer=function(){return this._popup.GetContentContainer(-1)};i.Common.PopupBase.prototype.Show=function(){return this._closeDefer||(this._closeDefer=t.Deferred().always(function(){this._closeDefer=null}.bind(this))),this._popup.Show(),this._closeDefer.promise()};i.Common.PopupBase.prototype.Hide=function(n){n&&(this._closeDefer=null);this._popup.Hide()};i.Common.PopupBase.prototype.SetAutoClearErrors=function(n){this._isAutoClearErrors=n};i.Common.PopupBase.prototype._resolve=function(){this._closeDefer&&this._closeDefer.resolve()};i.Common.PopupBase.prototype._reject=function(){this._closeDefer&&this._closeDefer.reject()};i.Common.PopupBase.prototype._popup_Init=function(){this._popup.Closing.AddHandler(this._popup_Closing,this);t(document).keydown(function(n){if(n.keyCode==27){var t=ASPx.GetPopupControlCollection().GetTopWindow();t&&t.id==this._popup.GetWindowElementId(-1)&&this.Hide()}}.bind(this));this.OnReady.publish()};i.Common.PopupBase.prototype._popup_Closing=function(){this._closeDefer&&this._closeDefer.state()=="pending"&&this._closeDefer.reject();this._isAutoClearErrors&&ASPxClientEdit.ClearEditorsInContainer(this.GetContentContainer())}}(window,jQuery);+function(n){"use strict";var t=n.ContractFX=n.ContractFX||{};t.Common=t.Common||{};t.Common.EditFormPopupBase=function(n,i,r){t.Common.PopupBase.call(this,n);this.OnBeforeValidate=new K12Event(this);this.OnBeforeSave=new K12Event(this);this.OnBeforeCancel=new K12Event(this);i.Click.AddHandler(this._btnCancel_Click,this);r.Click.AddHandler(this._btnSave_Click,this)};t.Common.Utils.Extend(t.Common.EditFormPopupBase,t.Common.PopupBase);t.Common.EditFormPopupBase.prototype._btnCancel_Click=function(){var n=function(){this._popup.Hide()}.bind(this);if(!this.OnBeforeCancel.hasSubscribers()){n();return}this.OnBeforeCancel.publish(n)};t.Common.EditFormPopupBase.prototype._btnSave_Click=function(){var n=function(){var t=this.GetContentContainer(),n;if(ASPxClientEdit.ValidateEditorsInContainer(t)&&ASPxClientEdit.AreEditorsValid(t)){if(n=function(){this._resolve();this._popup.Hide()}.bind(this),this.OnBeforeSave.hasSubscribers()){this.OnBeforeSave.publish(n);return}n()}}.bind(this);if(this.OnBeforeValidate.hasSubscribers()){this.OnBeforeValidate.publish(n);return}n()}}(window);+function(){"use strict";var n=window.ContractFX=window.ContractFX||{};n.Common=n.Common||{};n.Common.JsGlobal=function(n){var t;this.Init=function(){this.UTCOffsetMinutes=n.UTCOffsetMinutes;this.DateTimeFormat=n.DateTimeFormat;this.IsiOS=navigator.platform=="iPad"||navigator.platform=="iPhone"||navigator.platform=="iPod";this.IsAuthenticated=n.UserID>0&&n.OrgHierarchyID>0;t=new Date(Date.parse(n.ServerDateTime))};this.GetCurrentPath=function(){return n.CurrentPath};this.GetUserID=function(){return n.UserID};this.GetOrgHierarchyID=function(){return n.OrgHierarchyID};this.GetIsAuthenticated=function(){return this.GetUserID()>0&&this.GetOrgHierarchyID()>0};this.GetClientID=function(){return n.ClientID};this.GetIsApprover=function(){return n.IsApprover};this.IsAtHome=function(){return this.GetCurrentPath().match(/\/home\w?\w?.aspx/i)!=null};this.GetClientTime=function(){var n=new Date,t=new Date;return t.setTime(Date.UTC(n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate(),n.getUTCHours(),n.getUTCMinutes(),n.getUTCSeconds(),n.getUTCMilliseconds())+this.UTCOffsetMinutes*6e4),t};this.GetServerDateTime=function(){return t};this.GetLoading=function(){return loading};this.GoHome=function(){return window.opener==null?window.location=this.ResolveUrl("~/Home.aspx"):window.opener.closed||(window.opener.location=this.ResolveUrl("~/Home.aspx"),window.close()),!1};this.ResolveUrl=function(t){return t.indexOf("~/")==0&&(t=n.BaseUrl+t.substring(2)),t};this.Redirect=function(n){window.location.href=this.ResolveUrl(n)};this.OpenNewTab=function(n){window.open(n,"_blank")};this.RemoveParameter=function(n,t){var u=t.split("?")[0],f,i=[],e=t.indexOf("?")!==-1?t.split("?")[1]:"",r;if(e!==""){for(i=e.split("&"),r=i.length-1;r>=0;r-=1)f=i[r].split("=")[0],f===n&&i.splice(r,1);u=u+"?"+i.join("&")}return u};this.GetParameterByNameFromURL=function(n,t){t||(t=window.location.href);n=n.replace(/[\[\]]/g,"\\$&");var r=new RegExp("[?&]"+n+"(=([^&#]*)|&|#|$)"),i=r.exec(t);return i?i[2]?decodeURIComponent(i[2].replace(/\+/g," ")):"":null};this.ConfirmActionPopup=function(n,t,i){return n.className.includes("confirm-window-to-redirect")||n.hasAttribute("confirm-window-to-redirect")?(t||(t="Are you sure you want to leave this page?"),window.confirm(t)?(i&&loading.Show(),!0):(n.processOnServer=!1,!1)):!0};this.Init()}}(window);+function(n,t,i){"use strict";var r=n.ContractFX=n.ContractFX||{};r.Common=r.Common||{};r.Common.LoadIndicator=function(r){function u(){var i=t(f.div),r=0,e,u;i.width("auto");i.contents().each(function(){r+=t(this).outerWidth(!0)});r+=Math.ceil(i.outerWidth()-i.width());i.outerWidth(r);e=t(n).width();u=(e-r)/2;u=u/e*100;i.css("left",u+"%")}var f=this;this._defaultText="Loading...";r=r||{};r.text=r.text||this._defaultText;this._total=1;this.Init=function(){t("#divPreloadIndicator").length==0?(this.div=document.createElement("div"),this.img=document.createElement("img"),this.span=document.createElement("span"),t(this.img).attr("src",i.SiteConfig.ResolveUrl("~/Images/loader.gif")).css({margin:"2px",verticalAlign:"middle"}).on("load",function(){u()}).appendTo(this.div),t(this.span).text(r.text).css({fontWeight:"bold",lineHeight:"20px"}).appendTo(this.div),t(this.div).attr("id","divPreloadIndicator").css({backgroundColor:"yellow",border:"2px solid red",padding:"3px 8px 3px 8px",position:"fixed",left:"45%",top:50,whiteSpace:"nowrap",width:"100px",zIndex:1e5}).prependTo(t("body").get(0))):this.div=t("#divPreloadIndicator").get(0);this.SetText(r.text);t.browser.msie&&(t(this.div).css({position:"absolute",top:t(n).scrollTop()}),t(n).scroll(t.proxy(this,"OnScroll")))};this.SetText=function(n){r.text=n?n:this._defaultText;var i=t(this.div);i.find("span").text(r.text);i.is(":visible")&&u()};this.OnScroll=function(){t(this.div).css({top:t(n).scrollTop()})};this.Show=function(n){var n=typeof n=="string"?n:null;this.SetText(n||this._defaultText);t(this.div).show();t.browser.msie&&setTimeout(this.RefreshImage.bind(this),0);u();this._total++};this.RefreshImage=function(){this.img.src=this.img.src};this.Hide=function(){this._total=Math.max(0,this._total-1);this._total==0&&t(this.div).hide()};this.Init()}}(window,jQuery,K12Api);jQuery(function(){window.loading=new LoadInditcator});+function(n){"use strict";var t=window.ContractFX=window.ContractFX||{};t.Controls=t.Controls||{};t.Controls.Auth=t.Controls.Auth||{};t.Common.LoginSecurity=function(t,i,r){this.Init=function(){t.Init.AddHandler(this.Update,this);i.Init.AddHandler(this.Update,this);i.CheckedChanged.AddHandler(this.Update,this)};this.Update=function(){var t=i.GetChecked();n(i.GetMainElement()).siblings(".login-security-warning").toggle(t);r.SetEnabled(t);t||r.SetChecked(!1)};this.Init()}}(jQuery);+function(n,t){"use strict";var r=n.ContractFX=n.ContractFX||{},i;r.Common=r.Common||{};i=r.Common.PickerPopupBase=function(n,t,i,u,f,e,o,s){this._initialDataLoaded=!1;this._tempSelected=[];this._isSingleSelect=s;this._deferreds=[];this._popup=n;this._gridSearchForm=t;this._dxGrid=i;this._btnCancel=u;this._btnSelect=f;this._cbHelper=e;this._hfData=o;r.Common.EditFormPopupBase.call(this,this._popup,this._btnCancel,this._btnSelect);new r.Common.PopupAutoResizer(this._popup);this.OnReady.subscribe(this._popup_OnReady,this)};r.Common.Utils.Extend(i,r.Common.EditFormPopupBase);i.prototype._popup_OnReady=function(){if(this._popup.Shown.AddHandler(this._popup_Shown,this),this._gridSearchForm){var n=this._gridSearchForm_OnSearch.bind(this);this._gridSearchForm.OnSearch.subscribe(n);this._gridSearchForm.OnReset.subscribe(n)}this._dxGrid.RowClick.AddHandler(this._isSingleSelect?SingleSelect:MultiSelect,this);this._dxGrid.SelectionChanged.AddHandler(this._dxGrid_SelectionChanged,this);this._dxGrid.EndCallback.AddHandler(this._dxGrid_EndCallback,this);this._cbHelper.CallbackComplete.AddHandler(this._cbHelper_CallbackComplete,this);this.SetSingleSelect(this._isSingleSelect)};i.prototype._CreateDeferred=function(n){var t={id:this._deferreds.length+1,name:n,deferred:jQuery.Deferred()};return this._deferreds.push(t),t};i.prototype._FindDeferred=function(n){return t.find(this._deferreds,function(t){return t.id==n})};i.prototype._popup_Shown=function(){this._initialDataLoaded||(this._initialDataLoaded=!0,this._dxGrid.PerformCallback(""));this._tempSelected=this.GetIds();this._closeDefer.done(function(){this.SetIds(this._tempSelected)}.bind(this))};i.prototype._gridSearchForm_OnSearch=function(){return this._dxGrid.PerformCallback(""),!1};i.prototype._IndexOf=function(n,i){return t.findIndex(n,function(n){return n==i})};i.prototype._dxGrid_SelectionChanged=function(n,t){var r=this._dxGrid.GetItemKey(t.visibleIndex),i;t.isSelected?this._tempSelected.push(r):(i=this._IndexOf(this._tempSelected,r),i>=0&&this._tempSelected.splice(i,1));this._isSingleSelect&&t.isSelected&&(this._resolve(),this.Hide())};i.prototype._dxGrid_EndCallback=function(n){this._popup.GetVisible()&&this._popup.UpdatePosition();n.cpSelected&&(this.SetIds(n.cpSelected),delete n.cpSelected);var i=n.cpResult||"",r=~~i.split("|").shift(),t=this._FindDeferred(r);t&&t.deferred.resolve()};i.prototype._cbHelper_CallbackComplete=function(n,t){var i=this._FindDeferred(parseInt(t.parameter)),r;i&&(r=n["cp"+i.name],delete n["cp"+i.name],i.deferred.resolve(r))};i.prototype._RequestData=function(n){var t=this._CreateDeferred(n);return this._cbHelper.PerformCallback(t.id+"|"+n),t.deferred.promise()};i.prototype._PerformGridCallack=function(n){var t=this._CreateDeferred();return this._dxGrid.PerformCallback(t.id+"|"+n),t.deferred.promise()};i.prototype._WrapDataForCallback=function(n,t){return Array.isArray(t)||(t=[t]),n+"|"+t.join("|")};i.prototype._SelectIdsOnGrid=function(n){for(var t=this._dxGrid.GetTopVisibleIndex(),u=this._dxGrid.GetVisibleItemsOnPage()+t,i,r;t<u;t++)i=this._dxGrid.GetRowKey(t),r=this._IndexOf(n,i)>=0,this._dxGrid.SelectRowOnPage(t,r)};i.prototype.SetSingleSelect=function(n){this._isSingleSelect=n;jQuery(this.GetContentContainer()).find(".buttons-holder").toggle(!n)};i.prototype.GetIds=function(){var n=this._hfData.Get("Ids");return n?JSON.parse(n):[]};i.prototype.SetIds=function(n){n=t.uniq(n);this._isSingleSelect&&(n=n.pop(),n=n!=undefined?[n]:[]);this._hfData.Set("Ids",JSON.stringify(n));this._SelectIdsOnGrid(n)};i.prototype.Unselect=function(n){var t=this.GetIds().filter(function(t){return this._IndexOf(n,t)==-1}.bind(this));this.SetIds(t)};i.prototype.Select=function(n){var t=this.GetIds().concat(n);this.SetIds(t)}}(window,_);+function(n,t){"use strict";var r=n.ContractFX=n.ContractFX||{},i;r.Common=r.Common||{};i=r.Common.PickerPopupBase2=function(n,t,i,u,f,e,o,s){this._initialDataLoaded=!1;this._tempSelected=[];this._isSingleSelect=s;this._deferreds=[];this._popup=n;this._gridSearchForm=t;this._dxTreeList=i;this._btnCancel=u;this._btnSelect=f;this._cbHelper=e;this._hfData=o;r.Common.EditFormPopupBase.call(this,this._popup,this._btnCancel,this._btnSelect);new r.Common.PopupAutoResizer(this._popup);this.OnReady.subscribe(this._popup_OnReady,this)};r.Common.Utils.Extend(i,r.Common.EditFormPopupBase);i.prototype._popup_OnReady=function(){this._popup.Shown.AddHandler(this._popup_Shown,this);this._cbHelper.CallbackComplete.AddHandler(this._cbHelper_CallbackComplete,this);this.SetSingleSelect(this._isSingleSelect)};i.prototype._CreateDeferred=function(n){var t={id:this._deferreds.length+1,name:n,deferred:jQuery.Deferred()};return this._deferreds.push(t),t};i.prototype._FindDeferred=function(n){return t.find(this._deferreds,function(t){return t.id==n})};i.prototype._popup_Shown=function(){this._initialDataLoaded||(this._initialDataLoaded=!0);this._tempSelected=this.GetIds();this._closeDefer.done(function(){}.bind(this))};i.prototype._gridSearchForm_OnSearch=function(){return this._dxGrid.PerformCallback(""),!1};i.prototype._IndexOf=function(n,i){return t.findIndex(n,function(n){return n==i})};i.prototype._dxGrid_SelectionChanged=function(n,t){var r=this._dxGrid.GetItemKey(t.visibleIndex),i;t.isSelected?this._tempSelected.push(r):(i=this._IndexOf(this._tempSelected,r),i>=0&&this._tempSelected.splice(i,0));this._isSingleSelect&&t.isSelected&&(this._resolve(),this.Hide())};i.prototype._dxGrid_EndCallback=function(n){this._popup.GetVisible()&&this._popup.UpdatePosition();n.cpSelected&&(this.SetIds(n.cpSelected),delete n.cpSelected);var i=n.cpResult||"",r=~~i.split("|").shift(),t=this._FindDeferred(r);t&&t.deferred.resolve()};i.prototype._cbHelper_CallbackComplete=function(n,t){var i=this._FindDeferred(parseInt(t.parameter)),r;i&&(r=n["cp"+i.name],delete n["cp"+i.name],i.deferred.resolve(r))};i.prototype._RequestData=function(n){var t=this._CreateDeferred(n);return this._cbHelper.PerformCallback(t.id+"|"+n),t.deferred.promise()};i.prototype._PerformGridCallack=function(n){var t=this._CreateDeferred();return this._dxGrid.PerformCallback(t.id+"|"+n),t.deferred.promise()};i.prototype._WrapDataForCallback=function(n,t){return Array.isArray(t)||(t=[t]),n+"|"+t.join("|")};i.prototype._SelectIdsOnGrid=function(n){for(var t=this._dxGrid.GetTopVisibleIndex(),u=this._dxGrid.GetVisibleItemsOnPage()+t,i,r;t<u;t++)i=this._dxGrid.GetRowKey(t),r=this._IndexOf(n,i)>=0,this._dxGrid.SelectRowOnPage(t,r)};i.prototype.SetSingleSelect=function(n){this._isSingleSelect=n;jQuery(this.GetContentContainer()).find(".buttons-holder").toggle(!n)};i.prototype.GetIds=function(){var n=this._hfData.Get("Ids");return n?JSON.parse(n):[]};i.prototype.SetIds=function(n){n=t.uniq(n);this._isSingleSelect&&(n=n.pop(),n=n!=undefined?[n]:[]);this._hfData.Set("Ids",JSON.stringify(n));this._SelectIdsOnGrid(n)};i.prototype.Unselect=function(n){var t=this.GetIds().filter(function(t){return this._IndexOf(n,t)==-1}.bind(this));this.SetIds(t)};i.prototype.Select=function(n){var t=this.GetIds().concat(n);this.SetIds(t)}}(window,_);+function(n,t,i,r){"use strict";var u=window.ContractFX=window.ContractFX||{};u.Common=u.Common||{};u.Common.TogglePanel=function(u,f,e,o,s,h){function y(){u!==null&&typeof u=="object"&&i.extend(v,u);v["container-selector"]=h||n;this.IsInitialising=!0;s!=null&&(this.InitialState=s?"true":"false");c=t(v["container-selector"]);a=c.find(".toggle-panel td.panel-left").css({textAlign:"left"});l=c.find(".toggle-panel td.panel-right").css({textAlign:"left"});a.data("tp-width",a.data("width")||"200px");p();c.find(v["toggle-button-selector"]).attr("href","javascript:;").click(t.proxy(this,"Toggle"));this.rWidth=l.width();l.css({overflow:"hidden"});c.find(".toggle-button img").attr("src",r.JsGlobal.ResolveUrl(this.IsToggled()?"~/Images/panelClosed.gif":"~/Images/panelOpen.gif"));try{t.browser.msie||t.browser.chrome?t("div.right-panel-container").css({width:l.width()-240+"px"}):t("div.right-panel-container").css({width:l.width()+"px"})}catch(f){}this.cookieID="is_rvsq_panel_open";typeof o!="undefined"&&(this.cookieID=o);this.CheckForCookie(this.InitialState)}function p(){var n=a.children(),t=n.find("script");t.each(function(){this.oldType=this.type;this.type="plain/text"});n.wrapAll("<div class='left-panel-container'><\/div>");t.each(function(){this.type=this.oldType;delete this.oldType})}var c,a,l,v={"container-selector":null,"toggle-button-selector":".toggle-button"};this.InitialState="true";this.rWidth=0;this.Toggle=function(){this.IsToggled()?this.Show(!0):this.Hide(!0)};this.AdjustControl=function(){var t=c.find("table.toggle-panel").hasClass("resp-toggle-panel")?"100%":l.width(),n;e&&(n=e.GetVisible(),e.SetVisible(!1),e.SetWidth(t),e.SetVisible(n))};this.Show=function(n){var n=n||!1;t.globalcookie(this.cookieID,"true");this.OnBefore();n?c.find("div.left-panel-container").show().animate({width:a.data("tp-width")},1e3,t.proxy(this,"OnShown")).parent().show().next().show():(c.find("div.left-panel-container").show().css({width:a.data("tp-width")}).parent().show().next().show(),this.OnShown())};this.Hide=function(n){var n=n||!1;t.globalcookie(this.cookieID,"false");c.find("table.toggle-panel").height(c.find("table.toggle-panel").height());this.OnBefore();n?c.find("div.left-panel-container").animate({width:"0px"},1e3,t.proxy(this,"OnHidden")):(c.find("div.left-panel-container").css({width:"0px"}),this.OnHidden())};this.CheckForCookie=function(){var n=t.globalcookie(this.cookieID);n==null&&(t.globalcookie(this.cookieID,this.InitialState),n=this.InitialState);n=="true"?this.Show(!1):this.Hide(!1)};this.SetCookieIsOpened=function(n,i){i?t.globalcookie(this.cookieID,n):t.globalcookie(this.cookieID)==null&&t.globalcookie(this.cookieID,n)};this.OnShown=function(){this.setGridWidthWithDelta("~/Images/panelOpen.gif",this.rWidth,235);this.AdjustControl()};this.OnHidden=function(){c.find("div.left-panel-container").hide().parent().hide().next().hide();this.setGridWidthWithDelta("~/Images/panelClosed.gif",l.width(),30);this.AdjustControl()};this.OnAfter=function(){if(typeof f=="function"&&f(this,{hidden:this.IsToggled()}),typeof e=="object"&&this.IsInitialising==!1)try{e.Refresh()}catch(n){}typeof OnAfterToggle=="function"&&setTimeout(function(){OnAfterToggle()},200);this.IsInitialising=!1};this.OnBefore=function(){typeof u=="function"&&u(this,{hidden:this.IsToggled()});typeof e=="object"};this.GetCurrentWidth=function(){return l.width()};this.GetToggledWidth=function(){return this.rWidth};this.IsToggled=function(){return c.find("div.left-panel-container").css("display")=="none"};this.setGridWidthWithDelta=function(n,t){c.find(".toggle-button img").attr("src",r.SiteConfig.ResolveUrl(n));c.find("div.right-panel-container").css({width:t+"px"});this.OnAfter()};y.call(this)}}(document,jQuery,_,K12Api);ContractFX=window.ContractFX||{};ContractFX.Admin=ContractFX.Admin||{};ContractFX.Admin.DynamicFieldsDefinition=function(n,t){function u(){r=jQuery(document.getElementById(t));var u=r.val();u.length>0?i=new FormBuilder.Section(n,JSON.parse(u)):(i=new FormBuilder.Section(n),i.CreateElement())}var r,i;this.Save=function(){return r.val(JSON.stringify(i.Serialize())),!0};u.call(this)};ContractFX=window.ContractFX||{};ContractFX.Admin=ContractFX.Admin||{};ContractFX.Admin.AdminFormConstructDynamicDonateButton=function(n,t){function u(){r=jQuery(document.getElementById(t));var u=r.val();u.length>0?i=new FormBuilder.Section(n,JSON.parse(u)):(i=new FormBuilder.Section(n),i.CreateElement())}var r,i;this.Save=function(){return r.val(JSON.stringify(i.Serialize())),!0};u.call(this)};+function(n,t){"use strict";var r=window.ContractFX=window.ContractFX||{},i;r.Controls=r.Controls||{};r.Controls.Auth=r.Controls.Auth||{};i=r.Controls.Auth.LoginPopup=function(t,i,r,u,f,e,o,s,h,c){this._popup=t;this._tbxEmail=i;this._tbxPass=r;this._btnCancel=u;this._btnSignIn=f;this._rbUnsafeComp=e;this._rbSafeComp=o;this._cbxRemember=s;this._hfLoginType=n("#"+h);this._recaptchaLoginPopup=c;this._popupReady=n.Deferred();this._captchaChecked=!1;t.Init.AddHandler(this._popup_Init,this)};i.TYPE_CLIENT=1;i.TYPE_VENDOR=2;i.prototype._popup_Init=function(){this._container=n(this._GetContentContainer());this._popup.Shown.AddHandler(this._popup_OnShown,this);this._tbxEmail.KeyUp.AddHandler(this._tbxEmail_KeyUp,this);this._tbxEmail.TextChanged.AddHandler(this._tbxEmail_KeyUp,this);this._tbxPass.KeyUp.AddHandler(this._tbxPass_KeyUp,this);this._tbxPass.TextChanged.AddHandler(this._tbxPass_KeyUp,this);this._btnCancel.Click.AddHandler(this._btnCancel_Click,this);new t.LoginSecurity(this._rbUnsafeComp,this._rbSafeComp,this._cbxRemember);this._popupReady.resolve()};i.prototype._popup_OnShown=function(){this._RefreshClientType();this._UpdateSignInButton();this._checkRecaptchaApi()};i.prototype._tbxEmail_KeyUp=function(){this._UpdateSignInButton()};i.prototype._tbxPass_KeyUp=function(){this._UpdateSignInButton()};i.prototype._btnCancel_Click=function(n,t){t.processOnServer=!1;this._popup.Hide()};i.prototype._OnVerifyCert_Click=function(n){n.preventDefault();GoToPopupSized("https://seal.starfieldtech.com/verifySeal?sealID=bUjQkACqg21R3Db3KlYhul6F4uXpDC6TdWcHB0D9ROCXa1yznahe19L7",595,394)};i.prototype._GetContentContainer=function(){return this._popup.GetContentContainer(-1)};i.prototype._UpdateSignInButton=function(){var n=this._tbxEmail.GetText()!=""&&this._tbxPass.GetText()!=""&&this._captchaChecked;this._btnSignIn.SetEnabled(n)};i.prototype.SetType=function(n){this._hfLoginType.val(n);this._RefreshClientType()};i.prototype._RefreshClientType=function(){var n=this._container.find(".lbl-client-type"),t=this._hfLoginType.val()==i.TYPE_VENDOR,r=t?"Attendee":"Client";n.text(r)};i.prototype.Show=function(){this._popupReady.done(function(){this._popup.Show();this._tbxEmail.GetText()==""?this._tbxEmail.SetFocus():this._tbxPass.SetFocus()}.bind(this))};i.prototype._checkRecaptchaApi=function(){document.querySelectorAll("#"+this._recaptchaLoginPopup+"> div").length===0?($("#recaptcha-error-login-popup-msg").text("Something went wrong with Captcha. We are working on resolving this issue. Please try again later."),$(".recaptcha-error-login-popup").attr({style:" max-width: 326px; font-size: 12px;color: Red;display: flex;","class":"justify-content-center"})):$(".recaptcha-error-login-popup").attr({style:"display: none;"})}}(jQuery,ContractFX.Common);+function(n,t){"use strict";var i=n.ContractFX=n.ContractFX||{},r;i.Controls=i.Controls||{};i.Controls.Auth=i.Controls.Auth||{};r=i.Controls.Auth.SessionTimeoutPopup=function(n,t,i,r,u){this._sessionLength=60;this._activityTimeout=this._sessionLength/2;this._sessionLengthSeconds=this._sessionLength*60;this._activityTimeoutSeconds=this._activityTimeout*60;this._sessionRenewDelay=3e5;this._popup=n;this._btnSignOut=i;this._cbSession=r;this._domainName=u;this._timerId=null;this._timerLeftId=null;this._isDelay=!1;n.Init.AddHandler(this._popup_Init,this);t.Click.AddHandler(this._btnContinue_Click,this)};r.prototype._GetContainer=function(){return this._popup.GetContentContainer(-1)};r.prototype._popup_Init=function(){this._Init()};r.prototype._Init=function(){this._container=t(this._GetContainer());this._lblTimeLeft=this._container.find(".lbl-time-left");this._container.find(".lbl-inactive-length").text(this._activityTimeout);this._container.find(".lbl-session-length").text(this._sessionLength);this._Start();setInterval(function(){i&&i.Web&&i.Web.Services&&i.Web.Services.Auth&&typeof i.Web.Services.Auth.GetPingSession=="function"?i.Web.Services.Auth.GetPingSession():this._cbSession.PerformCallback()},this._sessionRenewDelay);try{var r=this;this._GetSessionState()=="true"&&($("body").click(function(){r._isDelay==!0||r._popup.GetVisible()||r._Restart()}),$("body").keydown(function(){r._isDelay==!0||r._popup.GetVisible()||r._Restart()}),n.addEventListener("scroll",function(){r._isDelay==!0||r._popup.GetVisible()||r._Restart()}))}catch(u){console.log(u)}};r.prototype._continue_Click=function(){console.log("The user is active.");i&&i.Web&&i.Web.Services&&i.Web.Services.Auth&&typeof i.Web.Services.Auth.GetPingSession=="function"?i.Web.Services.Auth.GetPingSession():this._cbSession.PerformCallback();this._Restart();this._HideWarning();this._countCheckSessionPopup=0};r.prototype._btnContinue_Click=function(){this._continue_Click()};r.prototype._Delay=function(){this._isDelay=!0;this._timerId&&(clearTimeout(this._timerId),this._timerId=null);this._timerLeftId&&(clearInterval(this._timerLeftId),this._timerLeftId=null)};r.prototype._Start=function(){var t=this;if(this._isDelay==!0)this._timerId&&(clearTimeout(this._timerId),this._timerId=null),this._timerLeftId&&(clearInterval(this._timerLeftId),this._timerLeftId=null),console.log("TimeOut is Delay");else{if(this._timerId)return;this._timerId=n.setTimeout(function(){t._ShowWarning()},this._activityTimeoutSeconds*1e3)}};r.prototype._Restart=function(){this._isDelay=!1;this._timerId&&(clearTimeout(this._timerId),this._timerId=null);this._timerLeftId&&(clearInterval(this._timerLeftId),this._timerLeftId=null);this._Start()};r.prototype._ShowWarning=function(){var i=this,t;this._popup.SetVisible(!0);t=this._sessionLengthSeconds-this._activityTimeoutSeconds;this._timerLeftId=n.setInterval(function(){var n,r,u;t--;t<=0?(clearInterval(i._timerLeftId),i._btnSignOut.DoClick()):(n=Math.floor(t/60),r=t-n*60,n<10&&(n="0"+n),r<10&&(r="0"+r),u=n+" minutes and "+r+" seconds",i._lblTimeLeft.text(u))},1e3)};r.prototype._HideWarning=function(){this._popup.SetVisible(!1)};r.prototype._GetSessionState=function(){let t=this._domainName+"_Session",n=document.cookie.match(new RegExp("(?:^|; )"+t.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,"\\$1")+"=([^;]*)"));return n?decodeURIComponent(n[1]):undefined}}(window,jQuery);+function(){"use strict";var n=window.ContractFX=window.ContractFX||{},t;n.Controls=n.Controls||{};n.Controls.AdminSystemOptions=n.Controls.AdminSystemOptions||{};t=n.Controls.AdminSystemOptions.ManagementOptionsEFX=function(n){this._dynamicFields=n};t.prototype.Save=function(){this._dynamicFields.Save()}}();ContractFX=window.ContractFX||{};ContractFX.General=ContractFX.General||{};ContractFX.General.DynamicFields=function(n,t,i){function u(){for(var n,i=0;i<t.length;i++)switch(t[i].Type){case"CheckBox":n=document.getElementById(t[i].ID);n=jQuery(n);n.parent().hasClass("raf-readonly")&&n.attr("disabled","disabled");n.change(function(){r.OnChange.publish(n)});break;case"TextBox":n=ASPxClientControl.GetControlCollection().GetByName(t[i].ID),function(t){n.Validation.AddHandler(function(n,i){e.call(this,n,i,t)},r)}(t[i]);jQuery(n.mainElement).hasClass("raf-readonly")&&n.SetEnabled(!1);n.KeyUp.AddHandler(function(){r.OnChange.publish(n)});break;case"DropDownList":n=document.getElementById(t[i].ID);n=jQuery(n);n.hasClass("raf-readonly")&&n.attr("disabled","disabled");n.change(function(){r.OnChange.publish(n)});break;case"DatePicker":n=ASPxClientControl.GetControlCollection().GetByName(t[i].ID);jQuery(n.mainElement).hasClass("raf-readonly")&&n.SetEnabled(!1);n.ValueChanged.AddHandler(function(){r.OnChange.publish(n)})}}function f(n){for(var i,r=0;r<t.length;r++)switch(t[r].Type){case"CheckBox":i=jQuery(document.getElementById(t[r].ID));i.parent().toggleClass("raf-readonly",!n);n?i.removeAttr("disabled"):i.attr("disabled","disabled");break;case"TextBox":i=ASPxClientControl.GetControlCollection().GetByName(t[r].ID);jQuery(i.mainElement).toggleClass("raf-readonly",!n);i.SetEnabled(n);break;case"DropDownList":i=jQuery(document.getElementById(t[r].ID));i.toggleClass("raf-readonly",!n);n?i.removeAttr("disabled"):i.attr("disabled","disabled");break;case"DatePicker":i=ASPxClientControl.GetControlCollection().GetByName(t[r].ID);jQuery(i.mainElement).toggleClass("raf-readonly",!n);i.SetEnabled(n)}}function e(n,t,i){if(t.isValid){var r=n.GetText().length;(r<i.Props.minLength||r>i.Props.maxLength)&&(t.isValid=!1,t.errorText=i.Label+" length must be between "+i.Props.minLength+" and "+i.Props.maxLength)}}var r=this;this.OnChange=new K12Event(this);this.GetEnabled=function(){return i};this.SetEnabled=function(n){i=n;f(n)};this.GetData=function(){for(var i=[],n=0;n<t.length;n++)(function(n){var t=undefined;switch(n.Type){case"CheckBox":t=jQuery("#"+n.ID+":checked").length>0;break;case"TextBox":t=ASPxClientControl.GetControlCollection().GetByName(n.ID).GetValue();break;case"DatePicker":t=ASPxClientControl.GetControlCollection().GetByName(n.ID).GetValue();t!=null&&(t=t.toISOString());break;case"DropDownList":t=jQuery("#"+n.ID).val()}t!==undefined&&i.push({ID:n.Props.syn,Value:t})})(t[n]);return i};this.SetData=function(n){for(var r={},u,f,i=0;i<n.length;i++)r[n[i].ID]=n[i].Value;for(i=0;i<t.length;i++)if(u=t[i].Props.syn,r.hasOwnProperty(u))switch(t[i].Type){case"CheckBox":jQuery("#"+t[i].ID).prop("checked",r[u]);break;case"TextBox":ASPxClientControl.GetControlCollection().GetByName(t[i].ID).SetValue(r[u]);break;case"DatePicker":f=r[u]?new Date(r[u]):null;ASPxClientControl.GetControlCollection().GetByName(t[i].ID).SetValue(f);break;case"DropDownList":jQuery("#"+t[i].ID).val(r[u])}};this.Clear=function(){for(var n=0;n<t.length;n++)switch(t[n].Type){case"CheckBox":jQuery("#"+t[n].ID).prop("checked",!1);break;case"TextBox":case"DatePicker":ASPxClientControl.GetControlCollection().GetByName(t[n].ID).SetValue(null);break;case"DropDownList":jQuery("#"+t[n].ID).val(null)}};this.Validate=function(){return ASPxClientEdit.ValidateEditorsInContainerById(n)};this.ValidateDropDown=function(){return!0};this.ValidateCheckbox=function(n){return jQuery("#"+n+":checked").length>0?!0:!1};this.ValidateTextbox=function(n){return jQuery("#"+n).val().length>0?!0:!1};u.call(this)};+function(n,t,i){"use strict";var r=n.ContractFX=n.ContractFX||{},u,e,f;r.Controls=r.Controls||{};u=r.Controls.Contract=r.Controls.Contract||{};u.InsurancesService=function(n){var u=function(){function t(){var t;try{t=JSON.parse(n.Get("TempRecords"));t instanceof Array||(t=[])}catch(i){t=[]}return t}function i(t){n.Set("TempRecords",JSON.stringify(t))}function r(){var n=t(),i=_.isEmpty(n)?0:_.max(n,function(n){return n.Id}).Id;return i+1}return{GetItem:function(n){return _.find(t(),function(t){return t.Id==n})},SaveItem:function(n){var u,f;if(n){for(n.Id||(n.Id=r()),u=t(),f=0;f<u.length;f++)if(u[f].Id==n.Id)break;f<u.length?u[f]=n:u.push(n);i(u)}},DeleteItem:function(n){var r=_.filter(t(),function(t){return t.Id!=n});i(r)}}}();return{GetContractID:function(){return n.Get("ContractID")},IsNew:function(){return!this.GetContractID()},IsEditable:function(){return n.Get("IsEditable")},GetInsurance:function(n){var f=t.Deferred(),i=t.Deferred(),e;return this.IsNew()?(e=u.GetItem(n),e?i.resolve(e):i.reject("No such record")):r.Web.Services.Contracts.GetInsurance(n,function(n){i.resolve(n)},function(n){i.reject(n.get_message())}),i.then(function(n){n.StartDate&&(n.StartDate=new Date(n.StartDate));n.EndDate=new Date(n.EndDate);f.resolve(n)},function(n){f.reject(n)}),f.promise()},SaveInsurance:function(n){var f=t.Deferred();return n.StartDate&&(n.StartDate=i(n.StartDate).utcOffset(0,!0).toDate()),n.EndDate=i(n.EndDate).utcOffset(0,!0).toDate(),this.IsNew()?(u.SaveItem(n),f.resolve(n.Id)):(n.ContractID=this.GetContractID(),r.Web.Services.Contracts.SaveInsurance(n,function(n){f.resolve(n)},function(n){f.reject(n.get_message())})),f.promise()},DeleteInsurance:function(n){var i=t.Deferred();return this.IsNew()?(u.DeleteItem(n),i.resolve(!0)):r.Web.Services.Contracts.DeleteInsurance(n,function(){i.resolve(!0)},function(n){i.reject(n.get_message())}),i.promise()},CreatePolicyCarrier:function(n){var i=t.Deferred();return r.Web.Services.Contracts.CreatePolicyCarrier(n,function(n){i.resolve(n)},function(n){i.reject(n.get_message())}),i.promise()},CreatePolicyType:function(n){var i=t.Deferred();return r.Web.Services.Contracts.CreatePolicyType(n,function(n){i.resolve(n)},function(n){i.reject(n.get_message())}),i.promise()}}};u.Insurances=function(n,i,r,f,e,o,s,h,c){function tt(){nt=t(n);l=i.GetItems();a=r.GetItems();i.OnPageSizeChanged.subscribe(it);f.ItemClick.AddHandler(w,this);e.ItemClick.AddHandler(w,this);t(l.lbAddTop).click(b);t(a.lbAddBot).click(b);t(l.lbEditTop).click(k);t(a.lbEditBot).click(k);t(l.lbDeleteTop).click(d);t(a.lbDeleteBot).click(d);o.EndCallback.AddHandler(rt,this);o.SelectionChanged.AddHandler(p,this);o.RowClick.AddHandler(SingleSelect);this.SetEnabled(h.IsEditable())}function it(){y()}function w(n,t){t.processOnServer=!1;switch(t.item.name){case"export":case"print":t.processOnServer=!0}}function p(){var n=o.GetSelectedRowCount()==1,t=v&&n;i.SetItemEnabled(l.lbAddTop,v);r.SetItemEnabled(a.lbAddBot,v);i.SetItemEnabled(l.lbEditTop,n);r.SetItemEnabled(a.lbEditBot,n);i.SetItemEnabled(l.lbDeleteTop,t);r.SetItemEnabled(a.lbDeleteBot,t)}function y(){o.PerformCallback("")}function g(){s.Show().then(function(){c.GetLoading().Show();var n=s.GetData();h.SaveInsurance(n).always(function(){c.GetLoading().Hide()}).then(function(){o.UnselectAllRowsOnPage();y()},function(n){k12Popup.Alert(n)})})}function ut(n){var t=v?u.Insurances.MODE_NORMAL:u.Insurances.MODE_VIEW;s.SetMode(t);c.GetLoading().Show();h.GetInsurance(n).always(function(){c.GetLoading().Hide()}).then(function(n){s.SetData(n);g()},function(n){k12Popup.Alert(n)})}var v=!0,nt,l,a,b=function(n){n.preventDefault();s.Clear();g()}.bind(this),k=function(n){n.preventDefault();var t=o.GetSelectedKeysOnPage().shift();ut(t)}.bind(this),d=function(n){n.preventDefault();var t=o.GetSelectedKeysOnPage().shift();loading.Show();h.DeleteInsurance(t).always(function(){loading.Hide()}).then(function(){o.UnselectRowsByKey(t);y()},function(n){k12Popup.Alert(n)})}.bind(this),rt=function(){p()};this.LoadData=function(){y();s.LoadData()};this.AdjustControl=function(){o.AdjustControl()};this.SetEnabled=function(n){v=n;p()};tt.call(this)};u.Insurances.MODE_NORMAL=1;u.Insurances.MODE_VIEW=2;e=u.InsuranceEditForm=function(){function n(n,i,f,e,o,s,h,c,l,a,v,y,p,w,b,k,d,g,nt,tt,it,rt,ut,ft,et,ot){r.Common.EditFormPopupBase.call(this,n,ut,ft);new r.Common.PopupAutoResizer(n);this._mode=u.Insurances.MODE_NORMAL;this._isEnabled=!0;this._ID=null;this._setStateCode=null;this.OnReady.subscribe(function(){this._ddlPolicyCarrierName=i;this._tbxPolicyNumber=f;this._ddlPolicyType=e;this._memoComments=o;this._deStart=s;this._deEnd=h;this._cbxAlertBuyers=c;this._ddlAlertDays=l;this._cbxAlertOtherEmails=a;this._tbxAlertOtherEmails=v;this._tbxAgentName=y;this._tbxAddress1=p;this._tbxAddress2=w;this._tbxCity=b;this._ddlCountry=k;this._ddlState=d;this._tbxStateOther=g;this._tbxZip=nt;this._pfnPhone=tt;this._tbxEmail=it;this._ucAttachments=rt;this._btnCancel=ut;this._btnSave=ft;this._editPolicyForm=et;this._service=ot;this._ctrlEditPolicyCarrier=t(this.GetContentContainer()).find(".ctrl-edit-policy");this._ctrlEditPolicyType=t(this.GetContentContainer()).find(".ctrl-edit-type");var n=this._EditPolicyHandler.bind(this);this._ctrlEditPolicyCarrier.click(n);this._ctrlEditPolicyType.click(n);h.Validation.AddHandler(this._deEnd_Validation,this);c.CheckedChanged.AddHandler(this._cbxAlertBuyers_CheckedChanged,this);a.CheckedChanged.AddHandler(this._cbxAlertOtherEmails_CheckedChanged,this);k.SelectedIndexChanged.AddHandler(this._ddlCountry_SelectedIndexChanged,this);d.Init.AddHandler(this._UpdateStates,this);d.SelectedIndexChanged.AddHandler(this._UpdateStates,this);d.EndCallback.AddHandler(this._ddlState_EndCallback,this)},this)}return r.Common.Utils.Extend(n,r.Common.EditFormPopupBase),n.prototype._EditPolicyHandler=function(n){var t=n.currentTarget==this._ctrlEditPolicyCarrier.get(0),i=t?f.VIEW_CARRIER:f.VIEW_TYPE;this._editPolicyForm.SetView(i);this._editPolicyForm.Clear();this._editPolicyForm.Show().then(function(){var r=this._editPolicyForm.GetData(),n=r.Name,i;jsGlobal.GetLoading().Show();i=t?this._service.CreatePolicyCarrier(n):this._service.CreatePolicyType(n);i.always(function(){jsGlobal.GetLoading().Hide()}).then(function(n){var i=t?this._ddlPolicyCarrierName:this._ddlPolicyType;i.PerformCallback("select|"+n.Id)}.bind(this),function(n){k12Popup.Alert(n)})}.bind(this))},n.prototype._deEnd_Validation=function(n,t){var i=this._deStart.GetValue(),r=this._deEnd.GetValue();i!=null&&i>r&&(t.isError=!0,t.errorText="Start Date can't be greater than End Date")},n.prototype._cbxAlertBuyers_CheckedChanged=function(){this._UpdateAlerting()},n.prototype._cbxAlertOtherEmails_CheckedChanged=function(){this._EnableAlertOthers(this._cbxAlertOtherEmails.GetChecked())},n.prototype._ddlCountry_SelectedIndexChanged=function(){this._ReloadStates()},n.prototype._ddlState_EndCallback=function(){this._setStateCode&&(this._ddlState.SetValue(this._setStateCode),this._setStateCode=null);this._UpdateStates()},n.prototype._UpdateStates=function(){var n=this._ddlState.GetValue()==null;this._tbxStateOther.SetEnabled(n&&this._isEnabled)},n.prototype._ReloadStates=function(n){this._setStateCode=n;this._ddlState.PerformCallback()},n.prototype._UpdateAlerting=function(){var t=this._cbxAlertBuyers.GetChecked()&&this._isEnabled,n=this._mode==u.Insurances.MODE_NORMAL&&t;this._ddlAlertDays.SetEnabled(n);this._EnableAlertOthers(n)},n.prototype._EnableAlertOthers=function(n){this._cbxAlertOtherEmails.SetEnabled(n);this._tbxAlertOtherEmails.SetEnabled(this._cbxAlertOtherEmails.GetChecked()&&n)},n.prototype.LoadData=function(){this._ddlPolicyCarrierName.PerformCallback("");this._ddlPolicyType.PerformCallback("")},n.prototype.GetData=function(){return{Id:this._Id,PolicyCarrierId:this._ddlPolicyCarrierName.GetValue(),PolicyNumber:this._tbxPolicyNumber.GetValue(),PolicyTypeId:this._ddlPolicyType.GetValue(),Comments:this._memoComments.GetValue(),StartDate:this._deStart.GetValue(),EndDate:this._deEnd.GetValue(),AlertBeforeDays:this._cbxAlertBuyers.GetChecked()?this._ddlAlertDays.GetValue():null,AlertOtherEmails:this._cbxAlertOtherEmails.GetChecked()&&this._cbxAlertOtherEmails.GetEnabled()?this._tbxAlertOtherEmails.GetValue():null,AgentName:this._tbxAgentName.GetValue(),Address1:this._tbxAddress1.GetValue(),Address2:this._tbxAddress2.GetValue(),City:this._tbxCity.GetValue(),CountryCode:this._ddlCountry.GetValue(),StateCode:this._ddlState.GetValue(),StateOther:this._tbxStateOther.GetValue(),ZipCode:this._tbxZip.GetValue(),Phone:this._pfnPhone.GetValue(),Email:this._tbxEmail.GetValue(),AttachmentIds:this._ucAttachments.GetValue()}},n.prototype.SetData=function(n){var t=this._ddlCountry.GetValue()!=n.CountryCode;this._Id=n.Id;this._ddlPolicyCarrierName.SetValue(n.PolicyCarrierId);this._tbxPolicyNumber.SetValue(n.PolicyNumber);this._ddlPolicyType.SetValue(n.PolicyTypeId);this._memoComments.SetValue(n.Comments);this._deStart.SetValue(n.StartDate);this._deEnd.SetValue(n.EndDate);this._cbxAlertBuyers.SetChecked(n.AlertBeforeDays!==null);this._ddlAlertDays.FindItemByValue(n.AlertBeforeDays)==null&&this._ddlAlertDays.GetItemCount()>0&&this._ddlAlertDays.SetSelectedIndex(0);this._cbxAlertOtherEmails.SetChecked(!!n.AlertOtherEmails);this._tbxAlertOtherEmails.SetValue(n.AlertOtherEmails);this._tbxAgentName.SetValue(n.AgentName);this._tbxAddress1.SetValue(n.Address1);this._tbxAddress2.SetValue(n.Address2);this._tbxCity.SetValue(n.City);this._ddlCountry.SetValue(n.CountryCode);this._ddlState.SetValue(n.StateCode);this._tbxStateOther.SetValue(n.StateOther);this._tbxZip.SetValue(n.ZipCode);this._pfnPhone.SetValue(n.Phone);this._tbxEmail.SetValue(n.Email);this._ucAttachments.SetValue(n.AttachmentIds,!1);this._UpdateAlerting();t&&this._ReloadStates(n.StateCode)},n.prototype.Clear=function(){this._Id=null;this._ddlPolicyCarrierName.GetItemCount()>0&&this._ddlPolicyCarrierName.SetSelectedIndex(0);this._tbxPolicyNumber.SetValue(null);this._ddlPolicyType.GetItemCount()>0&&this._ddlPolicyType.SetSelectedIndex(0);this._memoComments.SetValue(null);this._deStart.SetValue(null);this._deEnd.SetValue(null);this._cbxAlertBuyers.SetChecked(!1);this._cbxAlertOtherEmails.SetChecked(!1);this._tbxAlertOtherEmails.SetValue(null);this._ddlAlertDays.SetSelectedIndex(0);this._tbxAgentName.SetValue(null);this._tbxAddress1.SetValue(null);this._tbxAddress2.SetValue(null);this._tbxCity.SetValue(null);this._ddlState.GetItemCount()>0&&this._ddlState.SetSelectedIndex(0);this._tbxStateOther.SetValue(null);this._tbxZip.SetValue(null);this._pfnPhone.Reset();this._tbxEmail.SetValue(null);this._ucAttachments.Clear();this._UpdateAlerting();this._UpdateStates()},n.prototype.SetMode=function(n){var t=this._mode!=n;this._mode=n;t&&this.SetEnabled(this._isEnabled)},n.prototype.SetEnabled=function(n){this._isEnabled=n;var t=this._mode==u.Insurances.MODE_NORMAL&&n,i=this._mode==u.Insurances.MODE_VIEW&&n;this._ctrlEditPolicyCarrier.toggle(t);this._ddlPolicyCarrierName.SetEnabled(t);this._tbxPolicyNumber.SetEnabled(t);this._ctrlEditPolicyType.toggle(t);this._ddlPolicyType.SetEnabled(t);this._memoComments.SetEnabled(t);this._deStart.SetEnabled(t);this._deEnd.SetEnabled(t);this._cbxAlertBuyers.SetEnabled(t);this._tbxAgentName.SetEnabled(t);this._tbxAddress1.SetEnabled(t);this._tbxAddress2.SetEnabled(t);this._tbxCity.SetEnabled(t);this._ddlCountry.SetEnabled(t);this._ddlState.SetEnabled(t);this._tbxZip.SetEnabled(t);this._pfnPhone.SetEnabled(t);this._tbxEmail.SetEnabled(t);this._ucAttachments.SetEnabled(t);this._btnCancel.SetEnabled(t||i);this._btnSave.SetEnabled(t);this._UpdateAlerting();this._UpdateStates()},n}();f=u.PolicyEditForm=function(){function n(t,i,u,f){r.Common.EditFormPopupBase.call(this,t,u,f);new r.Common.PopupAutoResizer(t);this._type=null;this._view=n.VIEW_CARRIER;this.OnReady.subscribe(function(){this._tbxName=i;this._btnCancel=u;this._btnSave=f},this)}return n.VIEW_CARRIER=1,n.VIEW_TYPE=2,r.Common.Utils.Extend(n,r.Common.EditFormPopupBase),n.prototype.GetData=function(){return{Name:this._tbxName.GetValue()}},n.prototype.Clear=function(){this._tbxName.SetValue(null)},n.prototype.GetView=function(){return this._view},n.prototype.SetView=function(i){this._view=i;var r=i==n.VIEW_CARRIER?"Policy Carrier Name":"Policy Carrier Type";t(this.GetContentContainer()).find(".label").text(r+":");this._popup.SetHeaderText("Add "+r)},n}()}(window,jQuery,moment);+function(n,t,i){"use strict";var u=n.ContractFX=n.ContractFX||{},f,r;u.Controls=u.Controls||{};f=u.Controls.Contract=u.Controls.Contract||{};f.MilestonesService=function(n){return{GetContractID:function(){return n.Get("ContractID")},IsNew:function(){return!this.GetContractID()},IsEditable:function(){return n.Get("IsEditable")},IsClient:function(){return n.Get("IsClient")},IsTrackKPIs:function(){return n.Get("IsTrackKPIs")}}};r=f.Milestones=function(n,t,r,f,e){this._isEnabled=!0;this._container=i("#"+n);this._dxTreeList=f;this._service=e;this._togglePanel=new u.Common.TogglePanel(null,null,null,"ContractMilestones",null,this._container);var o=this._container.find(".tree-menu");o.treeview();this._topMenu=t;this._botMenu=r;this._topMenuItems=t.GetItems();this._botMenuItems=r.GetItems();e.IsClient()&&(this._topMenu.SetItemEnabled("lbViewTop",!1),this._topMenu.SetItemEnabled("lbAddMilestoneTop",!1),this._topMenu.SetItemEnabled("lbAddTaskTop",!1),this._topMenu.SetItemEnabled("lbEditTop",!1),this._topMenu.SetItemEnabled("lbJournalTop",!1),this._topMenu.SetItemEnabled("lbDeleteTop",!1),this._topMenu.SetItemEnabled("lbAddSubtaskTop",!1),this._topMenu.SetItemEnabled("lbKPIsTop",!1),this._botMenu.SetItemEnabled("lbViewBot",!1),this._botMenu.SetItemEnabled("lbAddMilestoneBot",!1),this._botMenu.SetItemEnabled("lbAddTaskBot",!1),this._botMenu.SetItemEnabled("lbEditBot",!1),this._botMenu.SetItemEnabled("lbJournalBot",!1),this._botMenu.SetItemEnabled("lbDeleteBot",!1),this._botMenu.SetItemEnabled("lbAddSubtaskBot",!1),this._botMenu.SetItemEnabled("lbKPIsBot",!1));this._topMenuItems.fileMenuTop.ItemClick.AddHandler(this._MenuItem_OnClick,this);this._botMenuItems.fileMenuBot.ItemClick.AddHandler(this._MenuItem_OnClick,this);this.SetEnabled(e.IsEditable());f.SelectionChanged.AddHandler(this._dxTreeList_SelectionChanged,this);f.Init.AddHandler(this._dxTreeList_EndCallback,this);f.EndCallback.AddHandler(this._dxTreeList_EndCallback,this)};r.prototype._dxTreeList_SelectionChanged=function(){this._UpdateToolbars()};r.prototype._dxTreeList_EndCallback=function(){};r.prototype._UpdateToolbars=function(){var o,t;console.log(this._dxTreeList.GetVisibleSelectedNodeKeys());var i=this._dxTreeList.GetVisibleSelectedNodeKeys(),u=i.length,n=!1,r=!1,f=!1,e=!1;u!=0&&(n=i[0].split(":")[2]=="R"?!0:!1,r=i[0].split(":")[3]=="E"?!0:!1,f=i[0].split(":")[0]!="T"&&i[0].split(":")[0]!="S"?!0:!1,e=i[0].split(":")[0]!="S"&&i[0].split(":")[0]!="M"?!0:!1);o=u>0&&this._isEnabled;t=u==1&&this._isEnabled;this._topMenu.SetItemEnabled("lbViewTop",t&&this._service.IsClient());this._topMenu.SetItemEnabled("lbAddMilestoneTop",this._isEnabled&&this._service.IsClient());this._topMenu.SetItemEnabled("lbAddTaskTop",t&&f&&this._service.IsClient());this._topMenu.SetItemEnabled("lbEditTop",t&&(n&&r||!n)&&this._service.IsClient());this._topMenu.SetItemEnabled("lbJournalTop",u<=1&&this._isEnabled&&this._service.IsClient());this._topMenu.SetItemEnabled("lbDeleteTop",o&&(n&&r||!n)&&this._service.IsClient());this._topMenu.SetItemEnabled("lbAddSubtaskTop",t&&e&&this._service.IsClient());this._topMenu.SetItemEnabled("lbKPIsTop",(n&&r||!n)&&t&&this._service.IsClient&&this._service.IsTrackKPIs());this._botMenu.SetItemEnabled("lbViewBot",t&&this._service.IsClient());this._botMenu.SetItemEnabled("lbAddMilestoneBot",this._isEnabled&&this._service.IsClient());this._botMenu.SetItemEnabled("lbAddTaskBot",t&&f&&this._service.IsClient());this._botMenu.SetItemEnabled("lbEditBot",t&&(n&&r||!n)&&this._service.IsClient());this._botMenu.SetItemEnabled("lbJournalBot",u<=1&&this._isEnabled&&this._service.IsClient());this._botMenu.SetItemEnabled("lbDeleteBot",o&&(n&&r||!n)&&this._service.IsClient());this._botMenu.SetItemEnabled("lbAddSubtaskBot",t&&e&&this._service.IsClient());this._botMenu.SetItemEnabled("lbKPIsBot",(n&&r||!n)&&t&&this._service.IsClient&&this._service.IsTrackKPIs())};r.prototype._MenuItem_OnClick=function(n,t){t.processOnServer=!1;switch(t.item.name){case"export":case"print":t.processOnServer=!0}};r.prototype.LoadData=function(){this._dxTreeList.PerformCallback("")};r.prototype.AdjustControl=function(){this._togglePanel.AdjustControl();this._dxTreeList.AdjustControl()};r.prototype.SetEnabled=function(n){this._isEnabled=n;this._UpdateToolbars()};r.prototype.OnKPIClick=function(){var n=this._service.IsTrackKPIs();return n?!0:(k12Popup.Alert("KPI tracking is not enabled for this Contract.  <br> Ask the Contract Manager to enable KPI Tracking on the Contract Details screen<\/br>"),!1)}}(window,document,jQuery,_);+function(n,t,i,r){"use strict";var f=n.ContractFX=n.ContractFX||{},u,e;f.Controls=f.Controls||{};u=f.Controls.Contract=f.Controls.Contract||{};u.TransactionsService=function(n){var t=function(){function t(){var t;try{t=JSON.parse(n.Get("TempRecords"));t instanceof Array||(t=[])}catch(i){t=[]}return t}function i(t){n.Set("TempRecords",JSON.stringify(t))}function r(){var n=t(),i=_.isEmpty(n)?0:_.max(n,function(n){return n.ID}).ID;return i+1}return{GetItem:function(n){return _.find(t(),function(t){return t.ID==n})},SaveItem:function(n){var u,f;if(n){for(n.ID||(n.ID=r()),u=t(),f=0;f<u.length;f++)if(u[f].ID==n.ID)break;f<u.length?u[f]=n:u.push(n);i(u)}}}}();return{GetContractID:function(){return n.Get("ContractID")},IsNew:function(){return!this.GetContractID()},IsEditable:function(){return n.Get("IsEditable")},GetType:function(){return n.Get("Type")},SetType:function(t){n.Set("Type",t)},SetGridType:function(t){n.Set("GridType",t)},GetSearchBarViewName:function(){return n.Get("SearchBarViewName")},GetKey:function(n){return n.substr(1)},GetManualTransaction:function(n){var e=i.Deferred(),u=i.Deferred(),o;return this.IsNew()?(o=t.GetItem(n),o?u.resolve(o):u.reject("No such record")):f.Web.Services.Contracts.GetManualTransaction(n,function(n){u.resolve(n)},function(n){u.reject(n.get_message())}),u.then(function(n){n&&(n.DatePaid=r().local(n.DatePaid).toDate());e.resolve(n)},function(n){e.reject(n)}),e.promise()},SaveManualTransaction:function(n){var u=i.Deferred();return n.DatePaid&&(n.DatePaid=r().utc(n.DatePaid).toDate()),this.IsNew()?(t.SaveItem(n),u.resolve(n.ID)):(n.ContractID=this.GetContractID(),f.Web.Services.Contracts.SaveManualTransaction(n,function(n){console.log("Save: "+n);u.resolve(n)},function(n){u.reject(n.get_message())})),u.promise()}}};u.Transactions=function(n,t,r,e,o,s,h,c,l,a){function at(){g=i(n);ft=g.find(".total");w=g.find(".tree-menu");w.treeview();tt=w.find(".nav-link");w.on("click",".nav-link",vt);ut=new f.Common.TogglePanel(null,null,h,"ContractTransactions",null,g);v=t.GetItems();y=r.GetItems();t.OnPageSizeChanged.subscribe(yt);e.ItemClick.AddHandler(ot,this);o.ItemClick.AddHandler(ot,this);i(v.lbAddTop).click(st);i(y.lbAddBot).click(st);i(v.lbEditTop).click(ht);i(y.lbEditBot).click(ht);i(v.lbViewTop).click(ct);i(y.lbViewBot).click(ct);s.OnChanged.subscribe(et);typeof SearchBar!="undefined"&&SearchBar.OnOptionValueChanged.subscribe(et);h.EndCallback.AddHandler(pt,this);h.SelectionChanged.AddHandler(it,this);h.RowClick.AddHandler(SingleSelect);this.SetEnabled(l.IsEditable());h.PerformCallback(null)}function yt(){nt()}function ot(n,t){t.processOnServer=!1;switch(t.item.name){case"export":case"print":t.processOnServer=!0}}function wt(){var t=p==u.Transactions.TYPE_MANUAL?"manual":"requisition",n=tt.filter('[data-type="'+t+'"]');tt.not(n).removeClass("active");n.addClass("active")}function bt(){var n=p==u.Transactions.TYPE_MANUAL?"Manually Posted":"Posted via Requisition";t.SetTitle(n);r.SetTitle(n)}function kt(n){w.find(".lbl-manually-posted").text("("+n.ManualCount+")");w.find(".lbl-requisition-posted").text("("+n.RequisitionCount+")");ft.text(n.RequisitionTotal.toFixed(2)).parent().toggle(p==u.Transactions.TYPE_REQUISITION)}function it(){var n=p==u.Transactions.TYPE_MANUAL,i=h.GetSelectedRowCount()==1;t.SetItemEnabled(v.lbAddTop,n&&d);t.SetItemEnabled(v.lbAddTop,n);t.SetItemVisible(v.lbAddTop,n);r.SetItemEnabled(y.lbAddBot,n&&d);r.SetItemEnabled(y.lbAddBot,n);r.SetItemVisible(y.lbAddBot,n);t.SetItemEnabled(v.lbEditTop,n&&i);t.SetItemVisible(v.lbEditTop,n);r.SetItemEnabled(y.lbEditBot,n&&i);r.SetItemVisible(y.lbEditBot,n);t.SetItemEnabled(v.lbViewTop,!n&&i);t.SetItemVisible(v.lbViewTop,!n);r.SetItemEnabled(y.lbViewBot,!n&&i);r.SetItemVisible(y.lbViewBot,!n)}function nt(){h.PerformCallback("")}function lt(){c.Show().then(function(){a.GetLoading().Show();var n=c.GetData();l.SaveManualTransaction(n).always(function(){a.GetLoading().Hide()}).then(function(){h.UnselectAllRowsOnPage();nt()},function(n){k12Popup.Alert(n)})})}function dt(n){var t=d?u.Transactions.MODE_NORMAL:u.Transactions.MODE_VIEW;c.SetMode(t);a.GetLoading().Show();l.GetManualTransaction(n).always(function(){a.GetLoading().Hide()}).then(function(n){c.SetData(n);lt()},function(n){k12Popup.Alert(n)})}var d=!0,p=l.GetType(),b=null,k=null,rt=null,g,ut,w,tt,v,y,ft,et=function(n){n==s?typeof SearchBar!="undefined"&&SearchBar.GetView()==l.GetSearchBarViewName()&&SearchBar.SetOptionValue("year",s.GetValue()):s.SetValue(SearchBar.GetOptionValue("year"));nt()}.bind(this),vt=function(n){var t,r,f;h.InCallback()||(t=i(n.currentTarget),t.prev(".hitarea").click(),r=t.data("type"),r&&(f=r=="manual"?u.Transactions.TYPE_MANUAL:u.Transactions.TYPE_REQUISITION,this.LoadView(f)))}.bind(this),st=function(n){n.preventDefault();c.Clear();c.SetEnabled(!0);var t=i.Deferred();b&&!k?(a.GetLoading().Show(),rt.Get(b).always(function(){a.GetLoading().Hide()}).then(function(n){k=n;t.resolve(n)})):t.resolve(k);t.always(function(n){n&&c.SetVendor(n);lt()});c.AddClick_DefaultAssociateValue()}.bind(this),ht=function(n){n.preventDefault();c.SetEnabled(!1);var t=h.GetSelectedKeysOnPage().shift();t=l.GetKey(t);dt(t);c.EditClick_AssociateInfo()}.bind(this),ct=function(n){var r,u,t,f,e;for(n.preventDefault(),r=h.GetSelectedKeysOnPage().shift(),u=h.GetVisibleRowsOnPage(),t=0;t<u;t++)if(h.GetRowKey(t)==r){f=h.GetDataRow(t);e=i(".viewreq",f).attr("href");a.Redirect(e);break}}.bind(this),pt=function(n){l.SetGridType(l.GetType());it();wt();bt();kt(n.cpStats)};this.SetVendorsProviderPopup=function(n){rt=n;c.SetVendorsProviderPopup(n)};this.SetDefaultVendor=function(n){typeof n=="object"?(b=n.ID,k=n):b!=n&&(b=n,k=null)};this.LoadView=function(n){p=n;l.SetType(p);nt()};this.LoadData=function(){this.LoadView(p)};this.AdjustControl=function(){ut.AdjustControl()};this.SetEnabled=function(n){d=n;it()};at.call(this)};u.Transactions.TYPE_REQUISITION=1;u.Transactions.TYPE_MANUAL=2;u.Transactions.MODE_NORMAL=1;u.Transactions.MODE_VIEW=2;e=u.ManualTransactionEditForm=function(){function n(n,r,e,o,s,h,c,l,a,v,y,p,w,b,k,d,g,nt,tt,it,rt,ut,ft,et,ot,st,ht,ct,lt,at,vt,yt,pt){f.Common.EditFormPopupBase.call(this,n,yt,pt);new f.Common.PopupAutoResizer(n);this._mode=u.Transactions.MODE_NORMAL;this._isEnabled=!0;this._vendorsProviderPopup=null;this._ID=null;this._vendorID=null;this.OnReady.subscribe(function(){var n,u;this._rbExpense=r;this._rbCredit=e;this._tbxAmount=o;this._dePaid=s;this._tbxRefNo=h;this._tbxVendorName=c;this._tbxAddress1=l;this._tbxAddress2=a;this._tbxCity=v;this._tbxCountry=y;this._tbxState=p;this._tbxStateOther=w;this._tbxZip=b;this._tbxContactName=k;this._pfnPhone=d;this._tbxEmail=g;this._memoDescription=nt;this._ucAttachments=tt;this._btnCancel=yt;this._btnSave=pt;this._cbFilterMilestone=it;this._ddlFilterMilestones=rt;this._cbFilterTask=ut;this._ddlFilterTasks=ft;this._rbnContractLevel=et;this._rbnMilestone=ot;this._ddlMilestones=st;this._rbnProject=ht;this._rbnTask=ct;this._ddlTasks=lt;this._rbnSubTask=at;this._ddlSubTasks=vt;this._imgLoadTask=t.getElementById("imgLoadTask");this._imgLoadSubTask=t.getElementById("imgLoadSubTask");this._ctrlSelectVendor=i(this.GetContentContainer()).find(".ctrl-select-vendor");this._ctrlHideShowAssociate=i(this.GetContentContainer()).find(".ctrl-hideShow-associate");this._ctrlAssociateBlock=i(this.GetContentContainer()).find(".ctrl-associate-block");this._ctrlAssociateFiltersBlock=i(this.GetContentContainer()).find(".ctrl-associate-filters-block");this._rbnContractLevel.CheckedChanged.AddHandler(this._rbnContractLevel_UnselectAll_CheckedChanged,this);this._rbnMilestone.CheckedChanged.AddHandler(this._rbnMilestone_CheckedChanged,this);this._ddlMilestones.Init.AddHandler(this._ddlMilestones_Init,this);this._rbnProject.CheckedChanged.AddHandler(this._rbnProject_CheckedChanged,this);this._rbnTask.CheckedChanged.AddHandler(this._rbnTask_CheckedChanged,this);this._ddlTasks.Init.AddHandler(this._ddlTasks_Init,this);this._ddlTasks.EndCallback.AddHandler(this._ddlTasks_EndCallback,this);this._rbnSubTask.CheckedChanged.AddHandler(this._rbnSubTask_CheckedChanged,this);this._ddlSubTasks.Init.AddHandler(this._ddlSubTasks_Init,this);this._ddlSubTasks.EndCallback.AddHandler(this._ddlSubTasks_EndCallback,this);this._ddlFilterMilestones.Init.AddHandler(this._ddlFilterMilestones_Init,this);this._cbFilterMilestone.CheckedChanged.AddHandler(this._cbFilterMilestone_CheckedChanged,this);this._ddlFilterMilestones.SelectedIndexChanged.AddHandler(this._ddlFilterMilestones_CheckedChanged,this);this._cbFilterTask.CheckedChanged.AddHandler(this._cbFilterTask_CheckedChanged,this);this._ddlFilterTasks.Init.AddHandler(this._ddlFilterTasks_Init,this);this._ddlFilterTasks.SelectedIndexChanged.AddHandler(this._ddlFilterTasks_CheckedChanged,this);this._ddlFilterTasks.EndCallback.AddHandler(this._ddlFilterTasks_EndCallback,this);n=this._SelectVendor.bind(this);i(this._tbxVendorName.GetInputElement()).click(n);u=this._HideShowAssociate.bind(this);this._ctrlSelectVendor.click(n);this._ctrlHideShowAssociate.click(u);this._tbxVendorName.Validation.AddHandler(this._tbxVendorName_Validation,this);this._ddlMilestones.Validation.AddHandler(this._ddlMilestones_Validation,this);this._ddlTasks.Validation.AddHandler(this._ddlTasks_Validation,this);this._ddlSubTasks.Validation.AddHandler(this._ddlSubTasks_Validation,this);this._UpdateSelectVendorCtrl()},this)}return n.TYPE_EXPENSE=1,n.TYPE_CREDIT=2,f.Common.Utils.Extend(n,f.Common.EditFormPopupBase),n.prototype._tbxVendorName_Validation=function(n,t){this._vendorID==null&&(t.isValid=!1,t.errorText="Vendor is required")},n.prototype._ddlMilestones_Validation=function(n,t){(this._ddlMilestones==null||this._rbnMilestone.GetChecked()&&this._ddlMilestones.GetValue()==0)&&(t.isValid=!1,t.errorText="Associate Milestone is required")},n.prototype._ddlTasks_Validation=function(n,t){(this._ddlTasks==null||this._rbnTask.GetChecked()&&this._ddlTasks.GetValue()==0)&&(t.isValid=!1,t.errorText="Associate Task is required")},n.prototype._ddlSubTasks_Validation=function(n,t){(this._ddlSubTasks==null||this._rbnSubTask.GetChecked()&&this._ddlSubTasks.GetValue()==0)&&(t.isValid=!1,t.errorText="Associate Sub-Task is required")},n.prototype._SelectVendor=function(n){(n.preventDefault(),this._vendorsProviderPopup)&&this._vendorsProviderPopup.GetInteractive().then(function(n){this.SetVendor(n)}.bind(this))},n.prototype._UpdateSelectVendorCtrl=function(){var n=this._tbxVendorName.GetValue()!=null,t=n?"CHANGE":"SELECT";this._ctrlSelectVendor.text(t);this._ctrlSelectVendor.toggleClass("link-add",!n).toggleClass("link-edit",n)},n.prototype._HideShowAssociate=function(){this._ctrlAssociateBlock.css("display")==="none"?(this._ctrlAssociateBlock.css({display:"block"}),(this._rbnMilestone.GetChecked()||this._rbnTask.GetChecked()||this._rbnSubTask.GetChecked())&&this._ctrlAssociateFiltersBlock.css({display:"block"}),hlHideShowAssociate.text="Hide"):(this._ctrlAssociateBlock.css({display:"none"}),this._ctrlAssociateFiltersBlock.css({display:"none"}),hlHideShowAssociate.text="Show")},n.prototype._ddlMilestones_Init=function(n){n.SetEnabled(this._rbnMilestone.GetChecked())},n.prototype._ddlTasks_Init=function(n){n.GetValue()<=0&&(n.GetSelectedItem()==null||n.GetSelectedItem().value<=0)&&(n.InsertItem(0,["--- Pleace select Task ---","None"],"0"),n.SetSelectedIndex(0));n.SetEnabled(this._rbnTask.GetChecked())},n.prototype._ddlSubTasks_Init=function(n){n.GetValue()<=0&&(n.GetSelectedItem()==null||n.GetSelectedItem().value<=0)&&(n.InsertItem(0,["--- Pleace select SubTask ---","None","None"],"0"),n.SetSelectedIndex(0));n.SetEnabled(this._rbnSubTask.GetChecked())},n.prototype._rbnContractLevel_UnselectAll_CheckedChanged=function(){this._ctrlAssociateFiltersBlock.css({display:"none"});this._ddlFilterMilestones.SetEnabled(!1);this._ddlFilterTasks.SetEnabled(!1)},n.prototype._rbnMilestone_CheckedChanged=function(n){if(this._isEnabled){var t=n.GetChecked();this._ctrlAssociateFiltersBlock.css({display:"none"});this._ddlMilestones.SetEnabled(t);this._ddlMilestones.SetSelectedIndex(0);this._ddlTasks.SetSelectedIndex(0);this._ddlSubTasks.SetSelectedIndex(0);this.AssociateFilterBlockClear(!0,!0)}},n.prototype._rbnProject_CheckedChanged=function(){this._ctrlAssociateFiltersBlock.css({display:"none"});this._ddlFilterMilestones.SetEnabled(!1);this._ddlFilterTasks.SetEnabled(!1)},n.prototype._rbnTask_CheckedChanged=function(n){if(this._isEnabled){var t=n.GetChecked();this._ctrlAssociateFiltersBlock.css({display:"block"});this._ddlTasks.SetEnabled(t);this._ddlFilterMilestones.SetSelectedIndex(0);this._ddlMilestones.SetSelectedIndex(0);this._ddlSubTasks.SetSelectedIndex(0);this._cbFilterMilestone.SetEnabled(t);this._ddlFilterMilestones.SetEnabled(this._cbFilterMilestone.GetChecked());this.AssociateFilterBlockClear(!1,!0)}},n.prototype._rbnSubTask_CheckedChanged=function(n){if(this._isEnabled){var t=n.GetChecked();this._ctrlAssociateFiltersBlock.css({display:"block"});this._ddlFilterMilestones.SetSelectedIndex(0);this._ddlMilestones.SetSelectedIndex(0);this._ddlTasks.SetSelectedIndex(0);this._cbFilterMilestone.SetEnabled(t);this._ddlFilterMilestones.SetEnabled(this._cbFilterMilestone.GetChecked());this._cbFilterTask.SetEnabled(t);this._ddlFilterTasks.SetEnabled(this._cbFilterTask.GetChecked());this._ddlSubTasks.SetEnabled(t)}},n.prototype._ddlFilterMilestones_Init=function(){},n.prototype._ddlFilterTasks_Init=function(n){n.SetEnabled(!1)},n.prototype._ddlFilterMilestones_CheckedChanged=function(){this._rbnTask.GetChecked()?(this._imgLoadTask.style.display="",this._ddlTasks.PerformCallback()):this._rbnSubTask.GetChecked()&&(this._imgLoadSubTask.style.display="",this._ddlFilterTasks.PerformCallback(),this._ddlSubTasks.PerformCallback())},n.prototype._ddlFilterTasks_CheckedChanged=function(){this._rbnSubTask.GetChecked()&&(this._imgLoadSubTask.style.display="",this._ddlSubTasks.PerformCallback())},n.prototype._cbFilterMilestone_CheckedChanged=function(n){var t=n.GetChecked();this._ddlFilterMilestones.SetEnabled(t);t||(this._imgLoadTask.style.display="",this._imgLoadSubTask.style.display="",this._ddlFilterMilestones.SetSelectedIndex(0),this._ddlTasks.PerformCallback(),this._ddlSubTasks.PerformCallback())},n.prototype._cbFilterTask_CheckedChanged=function(n){var t=n.GetChecked();this._ddlFilterTasks.SetEnabled(t);t||(this._imgLoadTask.style.display="",this._imgLoadSubTask.style.display="",this._ddlFilterTasks.SetSelectedIndex(0),this._ddlTasks.PerformCallback(),this._ddlSubTasks.PerformCallback())},n.prototype._ddlFilterTasks_EndCallback=function(n){n.GetValue()<=0&&(n.GetSelectedItem()==null||n.GetSelectedItem().value<=0)&&(n.InsertItem(0,"--- Select ---","0"),n.SetSelectedIndex(0))},n.prototype._ddlTasks_EndCallback=function(n){n.GetValue()<=0&&(n.GetSelectedItem()==null||n.GetSelectedItem().value<=0)&&(n.InsertItem(0,["--- Pleace select Task ---","None"],"0"),n.SetSelectedIndex(0));this._imgLoadTask.style.display="none"},n.prototype._ddlSubTasks_EndCallback=function(n){n.GetValue()<=0&&(n.GetSelectedItem()==null||n.GetSelectedItem().value<=0)&&(n.InsertItem(0,["--- Pleace select SubTask ---","None","None"],"0"),n.SetSelectedIndex(0));this._imgLoadSubTask.style.display="none"},n.prototype.SetVendor=function(n){this._vendorID=n.ID;this._tbxVendorName.SetValue(n.Name);this._tbxAddress1.SetValue(n.Address1);this._tbxAddress2.SetValue(n.Address2);this._tbxCity.SetValue(n.City);this._tbxCountry.SetValue(n.CountryName);this._tbxState.SetValue(n.StateName?n.StateName:null);this._tbxStateOther.SetValue(n.StateName?null:n.StateOther);this._tbxZip.SetValue(n.ZipCode);this._UpdateSelectVendorCtrl()},n.prototype.GetData=function(){var t=0,i=0;return this._rbnContractLevel.GetChecked()?t=0:this._rbnMilestone.GetChecked()?(t=1,i=this._ddlMilestones.GetValue()):this._rbnProject.GetChecked()?t=2:this._rbnTask.GetChecked()?(t=3,i=this._ddlTasks.GetValue()):this._rbnSubTask.GetChecked()&&(t=4,i=this._ddlSubTasks.GetValue()),{ID:this._ID,Type:this._rbExpense.GetChecked()?n.TYPE_EXPENSE:n.TYPE_CREDIT,Amount:this._tbxAmount.GetValue(),DatePaid:this._dePaid.GetValue(),ReferenceNumber:this._tbxRefNo.GetValue(),AssociateObjectType:t,AssociateObjectID:i,VendorID:this._vendorID,VendorName:this._tbxVendorName.GetValue(),Address1:this._tbxAddress1.GetValue(),Address2:this._tbxAddress2.GetValue(),City:this._tbxCity.GetValue(),Country:this._tbxCountry.GetValue(),State:this._tbxState.GetValue(),StateOther:this._tbxStateOther.GetValue(),Zip:this._tbxZip.GetValue(),ContactName:this._tbxContactName.GetValue(),Phone:this._pfnPhone.GetValue(),Email:this._tbxEmail.GetValue(),Description:this._memoDescription.GetValue(),AttachmentIds:this._ucAttachments.GetValue()}},n.prototype.SetData=function(t){var i=t.Type==n.TYPE_EXPENSE;this._ID=t.ID;this._rbExpense.SetChecked(i);this._rbCredit.SetChecked(!i);this._tbxAmount.SetValue(t.Amount);this._dePaid.SetValue(t.DatePaid);this._tbxRefNo.SetValue(t.ReferenceNumber);t.AssociateObjectType==0?this._rbnContractLevel.SetChecked(!0):t.AssociateObjectType==1?(this._rbnMilestone.SetChecked(!0),this._ddlMilestones.SetValue(t.AssociateObjectID)):t.AssociateObjectType==2?this._rbnContractLevel.SetChecked(!0):t.AssociateObjectType==3?(this._rbnTask.SetChecked(!0),this._ddlTasks.SetValue(t.AssociateObjectID)):t.AssociateObjectType==4&&(this._rbnSubTask.SetChecked(!0),this._ddlSubTasks.SetValue(t.AssociateObjectID));this._vendorID=t.VendorID;this._tbxVendorName.SetValue(t.VendorName);this._tbxAddress1.SetValue(t.Address1);this._tbxAddress2.SetValue(t.Address2);this._tbxCity.SetValue(t.City);this._tbxCountry.SetValue(t.Country);this._tbxState.SetValue(t.State);this._tbxStateOther.SetValue(t.StateOther);this._tbxZip.SetValue(t.Zip);this._tbxContactName.SetValue(t.ContactName);this._pfnPhone.SetValue(t.Phone);this._tbxEmail.SetValue(t.Email);this._memoDescription.SetValue(t.Description);this._ucAttachments.SetValue(t.AttachmentIDs,!1);this._UpdateSelectVendorCtrl()},n.prototype.Clear=function(){this._ID=null;this._rbExpense.SetChecked(!0);this._rbCredit.SetChecked(!1);this._tbxAmount.SetValue(null);this._dePaid.SetValue(null);this._tbxRefNo.SetValue(null);this._vendorID=null;this._tbxVendorName.SetValue(null);this._tbxAddress1.SetValue(null);this._tbxAddress2.SetValue(null);this._tbxCity.SetValue(null);this._tbxCountry.SetValue(null);this._tbxState.SetValue(null);this._tbxStateOther.SetValue(null);this._tbxZip.SetValue(null);this._tbxContactName.SetValue(null);this._pfnPhone.Reset();this._tbxEmail.SetValue(null);this._memoDescription.SetValue(null);this._ucAttachments.Clear();this._UpdateSelectVendorCtrl()},n.prototype.AddClick_DefaultAssociateValue=function(){this.AssociateFilterBlockClear(!0,!0);this._rbnContractLevel.SetChecked(!0);this._ddlMilestones.SetSelectedIndex(0);this._ddlTasks.PerformCallback();this._ddlSubTasks.PerformCallback()},n.prototype.EditClick_AssociateInfo=function(){this._ddlMilestones.SetSelectedIndex(0);this._ddlTasks.SetSelectedIndex(0);this._ddlSubTasks.SetSelectedIndex(0);this._ctrlAssociateFiltersBlock.css({display:"none"})},n.prototype.SetVendorsProviderPopup=function(n){this._vendorsProviderPopup=n},n.prototype.SetMode=function(n){var t=this._mode!=n;this._mode=n;t&&this.SetEnabled(this._isEnabled)},n.prototype.AssociateFilterBlockClear=function(n,t){n&&(this._cbFilterMilestone.SetChecked(!1),this._cbFilterMilestone.SetEnabled(!1),this._ddlFilterMilestones.SetSelectedIndex(0),this._ddlFilterMilestones.SetEnabled(!1));t&&(this._cbFilterTask.SetChecked(!1),this._cbFilterTask.SetEnabled(!1),this._ddlFilterTasks.SetSelectedIndex(0),this._ddlFilterTasks.SetEnabled(!1))},n.prototype.SetEnabled=function(n){this._isEnabled=n;var t=this._mode==u.Transactions.MODE_NORMAL&&n,i=this._mode==u.Transactions.MODE_VIEW&&n;t=n;this._rbExpense.SetEnabled(t);this._rbCredit.SetEnabled(t);this._tbxAmount.SetEnabled(t);this._dePaid.SetEnabled(t);this._tbxRefNo.SetEnabled(t);this._ctrlAssociateBlock.css({display:"none"});this._rbnContractLevel.SetChecked(t);this._rbnMilestone.SetChecked(t);this._ddlMilestones.SetEnabled(!1);this._rbnProject.SetChecked(t);this._rbnTask.SetChecked(t);this._ddlTasks.SetEnabled(!1);this._rbnSubTask.SetChecked(t);this._ddlSubTasks.SetEnabled(!1);this._ctrlSelectVendor.toggle(t);this._tbxVendorName.SetEnabled(t);this._tbxAddress1.SetEnabled(!1);this._tbxAddress2.SetEnabled(!1);this._tbxCity.SetEnabled(!1);this._tbxCountry.SetEnabled(!1);this._tbxState.SetEnabled(!1);this._tbxStateOther.SetEnabled(!1);this._tbxZip.SetEnabled(!1);this._tbxContactName.SetEnabled(t);this._pfnPhone.SetEnabled(t);this._tbxEmail.SetEnabled(t);this._memoDescription.SetEnabled(t);this._ucAttachments.SetEnabled(t);this._btnCancel.SetEnabled(t||i);this._btnSave.SetEnabled(t)},n}()}(window,document,jQuery,moment);+function(n,t,i){"use strict";var r=n.ContractFX=n.ContractFX||{},u,f;r.Controls=r.Controls||{};u=r.Controls.Contract=r.Controls.Contract||{};u.DialogService=function(n){return{GetContractID:function(){return n.Get("ContractID")},IsNew:function(){return!this.GetContractID()},IsEditable:function(){return n.Get("IsEditable")}}};f=u.Dialog=function(n,t,r){this._isEnabled=!0;this._container=i("#"+n);this._menu=t;this._menuItems=t.GetItems();this._menuItems.fileMenu.ItemClick.AddHandler(this._MenuItem_OnClick,this);this.SetEnabled(r.IsEditable())};f.prototype._MenuItem_OnClick=function(n,t){t.processOnServer=!1;switch(t.item.name){case"export":case"print":t.processOnServer=!0}};f.prototype.SetEnabled=function(n){this._isEnabled=n}}(window,document,jQuery,_);+function(n,t,i){"use strict";var r=n.ContractFX=n.ContractFX||{},u,f;r.Controls=r.Controls||{};u=r.Controls.Contract=r.Controls.Contract||{};u.ApprovalHistoryService=function(n){return{GetContractID:function(){return n.Get("ContractID")},IsNew:function(){return!this.GetContractID()},IsEditable:function(){return n.Get("IsEditable")}}};f=u.ApprovalHistory=function(n,t){this._isEnabled=!0;this._container=i("#"+n);this.SetEnabled(t.IsEditable())};f.prototype._MenuItem_OnClick=function(n,t){t.processOnServer=!1;switch(t.item.name){case"export":case"print":t.processOnServer=!0}};f.prototype.SetEnabled=function(n){this._isEnabled=n}}(window,document,jQuery,_);+function(n,t,i){"use strict";var r=n.ContractFX=n.ContractFX||{},f,u;r.Controls=r.Controls||{};f=r.Controls.Contract=r.Controls.Contract||{};f.AmendmentsService=function(n){return{GetContractID:function(){return n.Get("ContractID")},IsNew:function(){return!this.GetContractID()},IsEditable:function(){return n.Get("IsEditable")}}};u=f.Amendments=function(n,t,u,f,e){this._isEnabled=!0;this._container=i("#"+n);this._dxGrid=f;this._togglePanel=new r.Common.TogglePanel(null,null,null,"ContractAmendments",null,this._container);this._topMenu=t;this._botMenu=u;this._topMenuItems=t.GetItems();this._botMenuItems=u.GetItems();this._topMenuItems.fileMenuTop.ItemClick.AddHandler(this._MenuItem_OnClick,this);this._botMenuItems.fileMenuBot.ItemClick.AddHandler(this._MenuItem_OnClick,this);this._dxGrid.EndCallback.AddHandler(this.dxGrid_EndCallback,this);this._dxGrid.SelectionChanged.AddHandler(this._UpdateToolbars,this);this.SetEnabled(e.IsEditable())};u.prototype.dxGrid_EndCallback=function(n){this._UpdateToolbars();xgvAmendmentDetails.SetWidth("101%");xgvAmendmentDetails.SetWidth("100%");n.SetWidth("101%");n.SetWidth("100%")};u.prototype._UpdateToolbars=function(){var t=this._dxGrid.GetSelectedRowCount()==1,n=this._dxGrid.GetSelectedRowCount()>0;this._topMenu.SetItemEnabled("lbAddTop",!n);this._topMenu.SetItemEnabled("lbViewTop",t);this._topMenu.SetItemEnabled("lbRecallTop",n);this._topMenu.SetItemEnabled("lbCancelTop",n);this._botMenu.SetItemEnabled("lbAddBot",!n);this._botMenu.SetItemEnabled("lbViewBot",t);this._botMenu.SetItemEnabled("lbRecallBot",n);this._botMenu.SetItemEnabled("lbCancelBot",n)};u.prototype._MenuItem_OnClick=function(n,t){t.processOnServer=!1;switch(t.item.name){case"export":case"print":t.processOnServer=!0}};u.prototype.SetEnabled=function(n){this._isEnabled=n;this._UpdateToolbars()}}(window,document,jQuery,_);+function(n,t,i){"use strict";var r=n.ContractFX=n.ContractFX||{},f,u;r.Controls=r.Controls||{};f=r.Controls.Contract=r.Controls.Contract||{};f.ExtensionsService=function(n){return{GetContractID:function(){return n.Get("ContractID")},IsNew:function(){return!this.GetContractID()},IsEditable:function(){return n.Get("IsEditable")}}};u=f.Extensions=function(n,t,u,f,e){this._isEnabled=!0;this._container=i("#"+n);this._dxGrid=f;this._togglePanel=new r.Common.TogglePanel(null,null,null,"ContractExtensions",null,this._container);this._topMenu=t;this._botMenu=u;this._topMenuItems=t.GetItems();this._botMenuItems=u.GetItems();this._topMenuItems.fileMenuTop.ItemClick.AddHandler(this._MenuItem_OnClick,this);this._botMenuItems.fileMenuBot.ItemClick.AddHandler(this._MenuItem_OnClick,this);this._dxGrid.EndCallback.AddHandler(this.dxGrid_EndCallback,this);this._dxGrid.SelectionChanged.AddHandler(this._UpdateToolbars,this);this.SetEnabled(e.IsEditable())};u.prototype.dxGrid_EndCallback=function(n){this._UpdateToolbars();n.SetWidth("101%");n.SetWidth("100%")};u.prototype._UpdateToolbars=function(){var t=this._dxGrid.GetSelectedRowCount()==1,n=this._dxGrid.GetSelectedRowCount()>0;this._topMenu.SetItemEnabled("lbAddTop",!n);this._topMenu.SetItemEnabled("lbViewTop",t);this._topMenu.SetItemEnabled("lbRecallTop",n);this._topMenu.SetItemEnabled("lbCancelTop",n);this._botMenu.SetItemEnabled("lbAddBot",!n);this._botMenu.SetItemEnabled("lbViewBot",t);this._botMenu.SetItemEnabled("lbRecallBot",n);this._botMenu.SetItemEnabled("lbCancelBot",n)};u.prototype._MenuItem_OnClick=function(n,t){t.processOnServer=!1;switch(t.item.name){case"export":case"print":t.processOnServer=!0}};u.prototype.SetEnabled=function(n){this._isEnabled=n;this._UpdateToolbars()}}(window,document,jQuery,_);+function(n,t,i){"use strict";var r=n.ContractFX=n.ContractFX||{};r.Controls=r.Controls||{};r.Controls.General=r.Controls.General||{};r.Controls.General.AccountCodeEntry=function(n,r){function l(){for(var s=n.Get("accountFormat"),e=s.split(n.Get("separator")),i=e.length-1,o,u,f=0;f<e.length;f++)i+=parseInt(e[f]);i+=3;t.browser.msie&&(i+=1);o=new Array(i).join("a");u=t("<span><\/span>").text(o);u.css({"font-family":"monospace",position:"absolute !important",top:"100% !important",left:"100% !important",visibility:"hidden !important",width:"auto",height:"auto"});t("body").append(u);i=u.width();u.remove();r.SetWidth(i);t(r.GetInputElement()).add("no-clear").css("font-family","monospace")}function u(n){return n.GetValue()=="."}function a(){var t=this,e=r.maskInfo.SetValueCore,o=function(t){for(var p=n.Get("separator"),a=i.filter(r.maskInfo.parts,function(n){return!u(n)}),y=[],l=0,o=0,e="",h=a[l].GetSize(),v=!1,s,c=0;c<t.length;c++)if(s=t.charAt(c),s!=p||v?n.Get("allowWildcards")&&(s=="*"||s=="?")?(e+=s,e+=new Array(h-o).join(r.maskInfo.promptChar),o=h):f(s)&&(e+=s,o++):(e=new Array(h-o+1).join("0")+e,o=e.length),v=!1,o==h||c+1==t.length){if(y.push(e),l+1==a.length)break;l++;o=0;e="";h=a[l].GetSize();v=!0}return y.join("")},s=function(n,i){t.KeyInitiatedEvent||(n=o(n,i));e.call(this,n,i)};r.maskInfo.SetValueCore=s}function f(t){return t=t.toLowerCase(),t>="0"&&t<="9"||t>="a"&&t<="z"||n.Get("allowWildcards")&&o(t)}function o(n){return n=="*"||n=="?"}function s(n){ASPxClientUtils.PreventEvent(n.htmlEvent);n.htmlEvent.returnValue=!1}function v(){for(var t=r.maskInfo.parts,o=r.maskInfo.caretPos,i,f=0,e=!1,n=0;n<t.length;n++)if(i=f,f+=t[n].GetSize(),!u(t[n]))if(i<=o&&o<=f)e=!0;else if(e)break;return e?i:-1}function y(){var i=n.Get("accountFormat"),t=i.split(n.Get("separator"));return t[t.length-1]=0,t.map(function(n){return n=parseInt(n),new Array(n+1).join(" ")}).join(n.Get("separator"))}function p(){var n=r.GetIsValid(),e,t,o,s,i;if(n)for(e=r.maskInfo.parts,t=0;t<e.length&&n;t++)if(o=e[t],!u(o))for(s=o.GetValue(),i=0;i<s.length;i++)if(!f(s[i])){n=!1;break}return n}function w(){var e=r.GetIsValid(),h,o,c,i,t,s;if(e)for(h=r.maskInfo.parts,o=0;o<h.length&&e;o++)if(c=h[o],!u(c)){if(i=c.GetValue(),n.Get("allowWildcards")&&(t=i.trimStart(),t.length>0&&(t[0]=="*"||t[0]=="?")&&(i=t),t=i.trimEnd(),t.length>0&&(t[t.length-1]=="*"||t[t.length-1]=="?")&&(i=t)),i.length==0){e=!1;break}for(s=0;s<i.length;s++)if(!f(i[s])){e=!1;break}}return e}var b=this,e,h,c;this.KeyInitiatedEvent=!1;this.Init=function(){e=y();var i=this.OnClick.bind(this);t(r.GetInputElement()).click(i).on("contextmenu",i);r.KeyPress.AddHandler(this.OnKeyPress,this);r.Validation.AddHandler(this.OnValidation,this);this.SetEnabled(n.Get("enabled"));a.call(this);l()};this._GetInputControl=function(){return r};h=-1;c=-1;this.OnKeyPressInternal=function(t,i){for(var a=r.maskInfo.parts,o=r.maskInfo.caretPos,l=0,y,p,e=0;e<a.length;e++)if(l+=a[e].GetSize(),o<=l&&!u(a[e]))break;if(e!=a.length){var w=a[e],b=ASPxClientUtils.GetKeyCode(i.htmlEvent),k=String.fromCharCode(b);if(!(b<32)){if(k==n.Get("separator")){y=v();n.Get("allowWildcards")||this.TryPad(w,o,l,!1);y!=-1&&r.SetCaretPosition(y);s(i);return}if(!f(k)){s(i);return}n.Get("allowWildcards")||(p=o+1==l,(p||o==l)&&this.TryPad(w,o,l,p));h=o;c=e}}};this.OnKeyPress=function(n,t){this.KeyInitiatedEvent=!0;this.OnKeyPressInternal(n,t);this.KeyInitiatedEvent=!1};this.TryPad=function(n,t,i,u){var e=n.GetSize(),s=e,f=n.GetValue().trimStart(),o;for(u?(f=f.trimStart(),f.length>0&&f[f.length-1]==" "&&(f=f.substring(0,f.length-1)),s--):f=f.trim();f.length<s;)f="0"+f;o=r.GetValue();f=o.substring(0,i-e)+f+o.substring(i-(e-f.length));r.SetValue(f);r.maskInfo.SetCaret(t)};this.OnClick=function(){for(var e=r.maskInfo.parts,t=[],i,f,n=0;n<e.length;n++)(i=e[n],u(i))||t.push(i.text);for(t=t.join(""),f=!0,n=0;n<t.length;n++)if(t.charAt(n)!=" "){f=!1;break}f&&r.SetCaretPosition(0)};this.GetValue=function(){return r.GetValue()};this.SetValue=function(n){r.SetValue(n)};this.IsEmpty=function(){var i=n.Get("accountFormat"),t=this.GetValue();return i?t===e:t==""};this.IsWildcardValue=function(){var t=this.GetValue(),i=t.split(n.Get("separator"));return i.every(function(n){var i=n.length,t=0;for(n=n.trim();t<i;)if(o(n[t]))n[t]=="*"&&(i=n.length),t++;else return!1;return!0})};this.SetEnabled=function(t){n.Get("required")&&t?r.GetInputElement().classList.add("requiredBorder"):r.GetInputElement().classList.add("requiredBorder");r.SetEnabled(t)};this.SetVisible=function(n){r.SetVisible(n)};this.Focus=function(){r.Focus()};this.OnValidation=function(t,i){var u=n.Get("required"),r=n.Get("allowWildcards"),f=this.IsEmpty(),e;if(u&&f){i.errorText=r?"Account code mask is required":"Account code is required";i.isValid=!1;return}(u||!f)&&(e=r?w():p(),e||(i.errorText=r?"Account code mask is invalid":"Account code is invalid",i.isValid=!1))};this.IsValid=function(){return r.Validate(),r.GetIsValid()};this.Init()}}(window,jQuery,_);+function(n,t,i){"use strict";var r=n.ContractFX=n.ContractFX||{};r.Controls=r.Controls||{};r.Controls.General=r.Controls.General||{};r.Controls.General.AttachmentUploader=function(n,u,f,e,o,s,h,c,l,a,v,y,p){function k(){e.SetVisible(!0);o.SetVisible(!1)}function d(n,t){k();var i=t.errorText.indexOf("being used by another process")>=0;i&&(f.viewManager.errorView.Clear(),k12Popup.Alert("The file is not able to be uploaded.<br/>Please close all copies of the file and try again."))}this.files=[];this.single=!1;this.type=null;this.events={OnShowList:null};this.messageMax="Sorry, you can't add new attachment. Max.quantity of attachments is "+a;this.isEditable=v==="True";this.isVP=y==="True";this.isContractAttachment=p==="True";var w,b;this.OnValueChanged=new i.Event.Event(this);this.OnUpdated=new i.Event.Event(this);this.Ready=t.Deferred();this.Init=function(){b=document.getElementById(n);this.type=u.Get("type");this.single=u.Get("single");w=t("#"+l);f.FileUploadStart.AddHandler(this.OnUploadStart,this);f.FileUploadComplete.AddHandler(this.OnUploadComplete,this);f.UploadingProgressChanged.AddHandler(this.OnProgressChanged,this);f.FilesUploadComplete.AddHandler(d.bind(this));e.Click.AddHandler(this.OnUploadClick,this);w.css({width:"100%"});t("#"+c).toggle(this.isEditable);var i=u.Get("files");i=i?i.split("|"):[];this.SetValue(i,this.isVP);this.Ready.resolve(this)};this.AddHandler=function(n,t){this.events[n]=t};this.RunHandler=function(n){if(typeof this.events[n]=="function"){var t=Array.prototype.slice.call(arguments);this.events[n].apply(this,t.slice(1))}};this.OnProgressChanged=function(n,t){o.SetPosition(t.progress)};this.OnUploadClick=function(){f.UploadFile()};this.OnUploadStart=function(){e.SetVisible(!1);o.SetPosition(0);o.SetVisible(!0)};this.OnUploadComplete=function(n,t){var u;if(t.isValid){if(this.single&&this.files.length>0){for(u=0;u<this.files.length;u++)r.Web.Services.AttachmentService.RemoveAttachment(this.files[u].ID);this.files=[]}var i=t.callbackData.split("|"),e=i[0],o=i[1],h=i[2],c=i[3],l=i[4],a=i[5],f={ID:i[0],FileName:i[1],Title:i[2],Url:i[3],Ext:i[4],Size:i[5],Type:i[6]};this.files.push(f);this.ShowList();this.HideSave();s.SetValue(null);this.RunHandler("OnUploadComplete",f);this.OnValueChanged.publish()}s.SetValue(null);k()};this.OnRemoveClick=function(n){var i=t(n.currentTarget);this.removeId=i.attr("attach_id");this.isVP?r.Web.Services.AttachmentService.VPRemoveAttachment(this.removeId,this.OnRemoved.bind(this)):this.isContractAttachment?r.Web.Services.AttachmentService.RemoveContractAttachment(this.removeId,this.OnRemoved.bind(this)):r.Web.Services.AttachmentService.RemoveAttachment(this.removeId,this.OnRemoved.bind(this))};this.OnRemoved=function(){var n=this.GetIndexByID(this.removeId);n!=-1&&(this.files.splice(n,1),this.OnValueChanged.publish(),this.ShowList(),this.HideSave())};this.GetIndexByID=function(n){for(var t=0;t<this.files.length;t++)if(this.files[t].ID==n)return t;return-1};this.GetIconByExt=function(n){switch(n){case"doc":case"docx":return i.JsGlobal.ResolveUrl("~/images/Word-icon.png");case"pdf":return i.JsGlobal.ResolveUrl("~/images/PDF.gif");case"xls":return i.JsGlobal.ResolveUrl("~/images/excel_Normal.gif");case"rar":case"zip":return i.JsGlobal.ResolveUrl("~/images/renameFile18_Normal.png");case"png":case"jpg":case"jpeg":case"gif":return i.JsGlobal.ResolveUrl("~/images/imageIcon_18.gif");default:return i.JsGlobal.ResolveUrl("~/images/documentIcon_18.gif")}};this.GetValue=function(){var t=[],n;if(this.files.length>0)for(n=0;n<this.files.length;n++)t.push(this.files[n].ID);return t};this.GetFileCount=function(){return this.GetValue().length};this.SetValue=function(n,t){n.length>0?r.Web.Services.AttachmentService.GetAttachmentArr(n,t,this.OnAttachmentsGot.bind(this)):this.OnAttachmentsGot(n)};this.OnAttachmentsGot=function(n){this.files=[];for(var t=0;t<n.length;t++)this.files.push(n[t]);this.ShowList()};this.Clear=function(){this.files=[];s.SetValue(null);e.SetVisible(!0);o.SetVisible(!1);this.ShowList()};this.ShowList=function(){var o="",i,c;for(w.empty(),i=0;i<this.files.length;i++){var n=this.files[i],s=document.createElement("div"),r=document.createElement("a"),l=document.createElement("a"),f=document.createElement("span"),e=document.createElement("img");this.isEditable?(t(e).attr("src",this.GetIconByExt(n.Ext)).css({marginRight:"5px",verticalAlign:"middle"}),t(r).attr("href",n.Url).attr("target","_blank").text(n.Title),t(f).text(" ("+n.Ext.toUpperCase()+", "+this.PrettyBytesToString(n.Size)+") "),t(l).attr("href","javascript:;").attr("attach_id",n.ID).text("Remove").click(this.OnRemoveClick.bind(this)),t(s).css({paddingTop:"5px",paddingBottom:"5px",paddingLeft:"30px"}).append(e).append(r).append(f).append(l)):(t(e).attr("src",this.GetIconByExt(n.Ext)).css({marginRight:"5px",verticalAlign:"middle"}),t(r).attr("href",n.Url).attr("target","_blank").text(n.Title),t(f).text(" ("+n.Ext.toUpperCase()+", "+this.PrettyBytesToString(n.Size)+") "),t(s).css({paddingTop:"5px",paddingBottom:"5px",paddingLeft:"30px"}).append(e).append(r).append(f));w.append(s);o+=n.ID;i<this.files.length-1&&(o+="|")}u.Set("files",o);typeof this.events.OnShowList=="function"&&this.events.OnShowList(this,this.files.length);this.files.length>=a?(this.isEditable&&(c=document.createElement("span"),t(c).text(this.messageMax).css({paddingBottom:"20px",paddingLeft:"30px",display:"block"}),w.prepend(c)),t("#"+h).hide()):t("#"+h).show();w.toggle(this.files.length>0);this.OnUpdated.publish()};this.PrettyBytesToString=function(n){return n==1?"1 byte":n<1024?String.format("{0} bytes",n):n<1048576?String.format("{0:N1} KB",n/1024):n<1073741824?String.format("{0:N2} MB",n/1048576):String.format("{0:N2} GB",n/1073741824)};this.HideSave=function(){t("#lblNotice").hide();t("#lblSaved").hide()};this.GetContainer=function(){return b};this.GetEditable=function(){return this.isEditable};this.SetEnabled=function(n){f.SetEnabled(n);e.SetEnabled(n);s.SetEnabled(n);var t=this.isEditable;this.isEditable=n;this.isEditable!=t&&this.ShowList()};this.SetVisible=function(n){t(b).toggle(n)};this.SetTitle=function(n){s.SetText(n)};this.Init()}}(window,jQuery,K12Api);+function(n,t,i){"use strict";var r=n.ContractFX=n.ContractFX||{};r.Controls=r.Controls||{};r.Controls.General=r.Controls.General||{};r.Controls.General.DateTimePicker=function(n,r,u,f,e,o,s){function c(n,t){var i={IsValid:t.isValid,Message:t.errorText};this.OnValidation.publish(i);t.isValid=i.IsValid;t.errorText=i.Message}var h;this.OnValidation=new i.Event.Event(this);this.Init=function(){n.Validation.AddHandler(c,this);!e.GetVisible();h=parseInt(e.GetValue());isNaN(h)&&(e.GetItemCount()>0&&(h=parseInt(e.GetItem(0).value)),isNaN(h)&&(h=0))};this.GetStringValue=function(){if(console.log("This method is obsolete. Use .GetMoment() instead"),n.GetValue()==null)return null;var t=n.GetValueString().replace(/ \d\d:\d\d:\d\d(.\d+)?/,"")+" "+r.GetValue()+":"+u.GetValue()+" "+f.GetValue();return s&&(t+=" "+e.GetValue()),t};this.GetValue=function(){var n=this.GetStringValue();return(console.log("date string value: "+n),n==null)?null:new Date(n)};this.GetEnabled=function(){return n.GetEnabled()};this.SetValueWithTZ=function(t){var s;console.log("This method is obsolete. Use .SetMoment() instead");s=t.substring(t.length-6,t.length);t=Date.parse(t.substring(0,t.length-6));var h="AM",i=t.getHours(),o=t.getMinutes();i>11&&(h="PM");i>12&&(i-=12);i==0&&(i=12);o=parseInt(Math.round(o/15)*15);o==60&&(o=45);n.SetValue(t);r.SetValue(i<10?"0"+i.toString():i.toString());u.SetValue(o<10?"0"+o.toString():o.toString());f.SetValue(h);e.GetVisible()&&e.SetValue(s)};this.SetValue=function(t){var v;typeof t=="string"&&(t=new Date(t));var h="AM",i=t.getHours(),o=t.getMinutes();i>11&&(h="PM");i>12&&(i-=12);i==0&&(i=12);o=parseInt(Math.round(o/15)*15);o==60&&(o=45);var c=t.getTimezoneOffset(),s=c/60,l="",a=c%60;l=Math.abs(s)<10?(s>0?"-":"+")+"0"+Math.abs(s):(s>0?"-":"+")+Math.abs(s);v=l+":"+(a<10?"0":"")+a;n.SetValue(t);r.SetValue(i<10?"0"+i.toString():i.toString());u.SetValue(o<10?"0"+o.toString():o.toString());f.SetValue(h);e.GetVisible()&&e.SetValue(v)};this.GetMoment=function(){var o=n.GetDate(),i;if(!o)return null;var h=f.GetValue()=="AM",s=parseInt(r.GetValue()),c=parseInt(u.GetValue()),l=parseInt(e.GetValue());return h||(s=(s+12)%24),i=t.utc(0).utcOffset(l),i.year(o.getFullYear()),i.month(o.getMonth()),i.date(o.getDate()),i.hour(s),i.minute(c),i};this.SetMoment=function(t){var t,i,o;if(!t||!t.isValid()){this.Clear();return}t=t.clone();i=t.utcOffset();e.FindItemByValue(i)==null&&(i=h);t.utcOffset(i);o=Math.round(t.minute()/15)*15;o==60&&t.minute(0).add(1,"hour");var c=new Date(t.year(),t.month(),t.date()),s=t.hour(),l=s<12;s%=12;s==0&&(s=12);o=t.minute();n.SetDate(c);r.SetValue(s);u.SetValue(o);f.SetValue(l?"AM":"PM");e.FindItemByValue(i)!=null&&e.SetValue(i)};this.SetEnabled=function(t){n.SetEnabled(t);r.SetEnabled(t);u.SetEnabled(t);f.SetEnabled(t);e.SetEnabled(t)};this.Clear=function(){n.SetValue(null);r.SetSelectedIndex(0);u.SetSelectedIndex(0);f.SetSelectedIndex(0);e.SetSelectedIndex(0)};this.Init()}}(window,moment,K12Api);+function(n){var t=n.ContractFX=n.ContractFX||{};t.Controls=t.Controls||{};t.Controls.General=t.Controls.General||{};t.Controls.General.DefaultViewFlipBook=function(n){this.init=function(){$(document).ready(function(){var t={pdfUrl:n,skin:"dark",icons:"fontawesome",btnToc:{enabled:!1},btnDownloadPages:{enabled:!1},btnSelect:{enabled:!1},layout:4};t.mobile={btnBookmark:{enabled:!1},btnZoomIn:{enabled:!1},btnZoomOut:{enabled:!1}};$("#container-js-book").flipBook(t)})};this.init()}}(window);window.ContractFX=window.ContractFX||{};ContractFX.General=ContractFX.General||{};!function(){"use strict";var n=ContractFX.General.GridLayoutCustomizationNotice=function(n){this.OnBeforeEndCallback=new K12Event(this);this._dxGrid=n;n.Init.AddHandler(this._dxGrid_Init,this);n.EndCallback.AddHandler(this._dxGrid_EndCallback,this)},t;n.prototype._RenderHint=function(){var n=this._dxGrid.GetCustomizationWindow(),t;n&&(t=n.GetContentContainer(-1),t.querySelector(".grid-customization-hint")||(n.SetHeaderText("Columns To Display"),jQuery(t).prepend('<div class="grid-customization-hint"><p>- Drag a column below and drop it on the grid in order to add.<\/p><p>- Drag a column from the grid and drop it below to remove.<\/p><\/div>')))};n.prototype._dxGrid_Init=function(){this._RenderHint()};n.prototype._dxGrid_EndCallback=function(){this.OnBeforeEndCallback.publish();var n=this._dxGrid.GetCustomizationWindow();this._RenderHint()};t=ContractFX.General.GridLayoutState=function(t,i){n.call(this,t);this._hfOptions=i;this.OnBeforeEndCallback.subscribe(this._OnBeforeEndCallbackHandler,this)};ContractFX.Common.Utils.Extend(t,n);t.prototype._OnBeforeEndCallbackHandler=function(){this._hfOptions.Remove("Reset")};t.prototype.Reset=function(){this._hfOptions.Set("Reset",1);this._dxGrid.Refresh()}}();+function(n,t,i,r){"use strict";function e(n){this.Name=n;this.OnActiveStateChanged=new K12Event(this);this.OnPageSizeChanged=new K12Event(this)}var u=n.ContractFX=n.ContractFX||{},f,o;u.Controls=u.Controls||{};u.Controls.General=u.Controls.General||{};f=u.Controls.General.GridTooblarGroups=u.Controls.General.GridTooblarGroups||{};o=u.Controls.General.GridToolbar=function(u,o,s,h,c,l){function b(n){var t=n.target;return t.classList.contains("loading")||t.classList.contains("disabled")?(n.stopImmediatePropagation(),!1):y[t.id]?y[t.id](n):!0}function d(){var i,r,n;for(i in l)l.hasOwnProperty(i)&&(r=l[i],n=document.getElementById(r),n&&n.classList.contains("menu-button"))&&(n.onclick?(y[r]=n.onclick,n.onclick=b):t(n).click(b))}function g(){return!o||!n[o]?null:n[o]}function nt(t,i){n.ddlGridPageCount_SelectedIndexChanged&&ddlGridPageCount_SelectedIndexChanged(t,i);a.OnPageSizeChanged.publish({control:this,size:this.GetPageSize()})}var p=0,k=1,w=2,a,v=null,y;this.OnPageSizeChanged=new r.Event.Event(this);this.Init=function(){var i=t("#"+u),n;v=this._ResolveControls(l);r.registerObject(c.Get("ID"),l);d();f[c.Get("Group")]||(f[c.Get("Group")]=new e(c.Get("Group")));a=f[c.Get("Group")];a.OnActiveStateChanged.subscribe(this.OnGroupEvent,this,"active-state");a.OnPageSizeChanged.subscribe(this.OnGroupEvent,this,"page-size");s&&(s.ItemClick.AddHandler(this.OnActiveMenuClick,this),this.SetActiveState(c.Get("ActiveState")));h&&h.SelectedIndexChanged.AddHandler(nt,this);n=i.find(".toggle-button");n.length>0&&new Opentip(n,"Click to Open or Close<br/>the left panel for options",{fixed:!0,target:!0,stem:!0,tipJoint:"bottom left",targetJoint:"top",background:"rgb(226, 240, 217)",borderColor:"rgb(226, 240, 217)"})};y={};this.SetActiveState=function(n){var t,i;n<0||n>2||(c.Set("ActiveState",n),t=1,n==w?t=0:n==p&&(t=2),i=s.GetItem(0),i.SetText("Show: "+i.GetItem(t).GetText()))};this.GetPageSize=function(n){return h?h.GetValue(n):-1};this.SetPageSize=function(n){h&&h.FindItemByValue(n)!=null&&h.SetValue(n)};this.OnGroupEvent=function(n,t,i){if(t.customData=="active-state"){if(i.control==this)return;this.SetActiveState(i.state)}else t.customData=="page-size"&&(i.control!=this&&this.SetPageSize(i.size),this.OnPageSizeChanged.publish(i.size))};this.OnActiveMenuClick=function(n,t){var u=g(),r,i;if(u){if(t.item.name=="Inactive")r=p;else if(t.item.name=="Active")r=k;else if(t.item.name=="ActiveInactive")r=w;else return;if(this.SetActiveState(r),a.OnActiveStateChanged.publish({control:this,state:r}),u.OnActiveInactiveClick)u.OnActiveInactiveClick(n,t);else{i="search|Active|";switch(t.item.name){case"ActiveInactive":i=i+"2";break;case"Active":i=i+"1";break;case"Inactive":i=i+"0"}u.PerformCallback(i)}}};this._ResolveControls=function(n){var r=ASPx.GetControlCollection(),t={};return i.each(n,function(n,i){var u=r.GetByName(n);t[i]=u!==null?u:document.getElementById(n)}),t};this.GetItems=function(){return v};this.SetTitle=function(n){t(this.GetItems().Title).text(n)};this.SetItemVisible=function(n,r){var u=i.isString(n)?v[n]:n;u&&(u.SetVisible?u.SetVisible(r):t(u).toggle(r))};this.SetItemEnabled=function(n,r){var u=i.isString(n)?v[n]:n,f;u&&(u.SetEnabled?u.SetEnabled(r):(f=t(u).toggleClass("disabled",!r),r?(f.removeAttr("disabled"),f.removeProp("disabled")):f.prop("disabled",!0)))};this.Init()}}(window,jQuery,_,K12Api);+function(n,t){"use strict";var r=n.ContractFX=n.ContractFX||{},i;r.Controls=r.Controls||{};r.Controls.General=r.Controls.General||{};i=r.Controls.General.NAICSPicker=function(n,i,u,f,e,o,s,h){this.OnChanged=new r.Common.Event(this);this._tbxCode=n;this._tbxDescription=i;this._popSearch=e;this._dxGrid=o;this._callbackHelper=s;o.EndCallback.AddHandler(this._dxGrid_EndCallback,this);o.SelectionChanged.AddHandler(this._dxGrid_SelectionChanged,this);h.OnSearch.subscribe(this._gridSearchForm_Changed,this);h.OnReset.subscribe(this._gridSearchForm_Changed,this);n.KeyUp.AddHandler(this._tbxCode_ValueChanged,this);s.CallbackComplete.AddHandler(this._callbackHelper_CallbackComplete,this);var c=this._OpenGrid.bind(this);this._lnkFind=t("#"+u).click(c);this._lnkChange=t("#"+f).click(c);this._UpdateLinks()};i.prototype._SearchGrid=function(){this._dxGrid.PerformCallback("search")};i.prototype._OpenGrid=function(){this._dxGrid.UnselectAllRowsOnPage();this._SearchGrid();this._popSearch.Show()};i.prototype._dxGrid_SelectionChanged=function(n){if(n.GetSelectedRowCount()==1){var i=n.GetSelectedKeysOnPage()[0],r=t("#hfDesc"+i).val();this.SetValue(i,r);this._popSearch.Hide()}};i.prototype._dxGrid_EndCallback=function(){loading.Hide();this._popSearch.UpdatePosition()};i.prototype._gridSearchForm_Changed=function(n,t){t.preventDefault();this._SearchGrid()};i.prototype._tbxCode_ValueChanged=function(n){this._callbackHelper.PerformCallback(n.GetValue())};i.prototype._callbackHelper_CallbackComplete=function(n,t){this._tbxDescription.SetText(t.result);this._UpdateLinks();this.OnChanged.publish()};i.prototype._UpdateLinks=function(){this._lnkChange.hide();this._lnkFind.hide();this._tbxCode.GetEnabled()&&(this._tbxCode.GetText()!=""?this._lnkChange.show():this._lnkFind.show())};i.prototype.SetEnabled=function(n){this._lnkChange.hide();this._lnkFind.hide();this._tbxCode.SetEnabled(n);this._tbxDescription.SetEnabled(n);n&&this._UpdateLinks()};i.prototype.Reset=function(){this._tbxCode.SetText("");this._tbxDescription.SetText("")};i.prototype.HasSelection=function(){return this._tbxCode.GetText()!=""};i.prototype.HasValue=function(){return this._tbxDescription.GetText()!=""};i.prototype.SetValue=function(n,t){this._tbxCode.SetText(n);this._tbxDescription.SetText(t);this._UpdateLinks();this.OnChanged.publish()};i.prototype.GetValue=function(){return this._tbxDescription.GetText()!=""?{Code:this._tbxCode.GetText(),Description:String.format("[{0}] {1}",this._tbxCode.GetText(),this._tbxDescription.GetValue())}:""}}(window,jQuery);PhoneFaxNumberEntry.prototype.GetIsValid=function(){var t="+"+this.GetCountryCode()+this.GetValue(),i=t.match(/(\+\d{1,4})(\([\d]{2,4}\)|\(-\))[0-9-]{2,4}[0-9-]{2,4}|[x]\d{4}/),n=this.Get(),r=this.tbxExtention.GetVisible()&&this.tbxExtention.GetValue()!==null?this.tbxExtention.GetValue().length>0?!!n.Extension&&/\d{4}/.test(n.Extension):!0:!0;return i!=null&&r};+function(n,t){"use strict";var i=window.ContractFX=window.ContractFX||{},r;i.Controls=i.Controls||{};i.Controls.General=i.Controls.General||{};r=i.Controls.General.SearchBar=function(i,r,u,f,e,o){function g(n){if(n.which==13){n.preventDefault();s.click();return}v(c.val());y()}function nt(n){if(!s.hasClass("disabled"))return v(c.val()),e.Set("IsSearched",!0),this.OnSearch.proxy()(n)}function k(){return e.Get("SearchText")||""}function v(n){n=n||"";e.Set("SearchText",n.trim())}function tt(n){if(a.addClass("inactive"),c.val("").focus(),v(""),this.OnReset.hasSubscribers())return this.OnReset.proxy()(n);this.PerformSearch()}function y(){var n=k().length>0;a.toggleClass("inactive",!n)}function it(n){n?y():a.toggleClass("inactive",!0)}function d(){var i=h.GetSearchType(),t=n("#contextCustomSearch").find('a[data-custom-value="'+i+'"]');t.length>0&&n('a[data-menu="contextCustomSearch"]').text(t.text())}var h=this,p,w,b,l,c,s,a;this.OnSearch=new t.Event.Event(this);this.OnReset=new t.Event.Event(this);this.OnOptionValueChanged=new t.Event.Event(this);this.Init=function(){this._container=n("#"+i);p=this._container.find(".search-bar");w=this._container.find(".so-custom-pm");b=n("#"+u);l=this._container.find(".og-right").add(this._container.find(".og-left"));c=n("#"+r);a=this._container.find(".erase-btn");s=n("#"+f);this._hfSearchBar=e;this._hfOptionGroups=o;c.keyup(g.bind(this));s.click(nt.bind(this));this._InitHelp();s.data({href:s.attr("href"),onclick:s.attr("onclick")});a.click(tt.bind(this)).tooltip({showURL:!1});d();this._InitOptionGroups();this.SetView(this.GetView());n(function(){h._RefreshSearchDDLs()})};this._RefreshSearchDDLs=function(){var t=78,i=this._container.find(".search-bar td.st-td3 > div");i.each(function(){var i=n(this);i.data("width")!="auto"&&(i.find(" > a").each(function(){n(this).css("width","auto");t+=n(this).width()}),i.width(t))})};this._InitOptionGroups=function(){b.find("[data-custom-value]").click(function(){var t=n(this),i=t.data("custom-value"),r=t.text();return h.SetSearchType(i),t.parent().prev().text(r),n(t.parents(".menu-context").get(0)).hide(),n("[data-menu]").removeClass("active"),h._RefreshSearchDDLs(),!1});l.find(".option-group").each(function(){var t=n(this).data("name");h.SetOptionValue(t,h.GetOptionValue(t));n(this).find(".options-ddl > div").click(function(){var r=h.GetOptionValue(t),i=n(this).data("custom-value").toString(),u;n(this).parents(".options-ddl").hide();u=h.SetOptionValue(t,i);u&&r!=i&&h.OnOptionValueChanged.publish(t,r,i)})})};this.SetEnabled=function(t){var i,r,u;c.is(":enabled")!=t&&(i=!t,c.val(i?"Search Not Available For This Screen":"").attr("disabled",i?"disabled":null),p.toggleClass("disabled",i),it(t),l.each(function(){var t=n(this);t.show();t.toggle(!i&&t.children().is(":visible"))}),r={href:null,onclick:null},t&&(u=s.data(),r.href=u.href,r.onclick=u.onclick),s.attr(r).toggleClass("disabled",i))};this.GetSearchText=function(){return k()};this.GetVisibleSearchText=function(){return c.val()};this.SetSearchText=function(n){v(n);c.val(n);y()};this.GetSearchType=function(){var n=this._hfSearchBar.Get("SearchBy");return n?n.toString():null};this.SetSearchType=function(n){this._hfSearchBar.Set("SearchBy",n);d()};this.PerformSearch=function(){s.get(0).click()};this.GetOptionValue=function(n){return o.Get(n)};this.SetOptionValue=function(n,t){var r=l.find('.option-group[data-name="'+n+'"]'),u=r.find(".options-ddl > [data-custom-value]"),i=u.filter('[data-custom-value="'+t+'"]');return(i.length==0&&(i=u.first()),i.length>0)?(r.find(".name").text(i.text()),o.Set(r.data("name"),t),!0):!1};this.GetView=function(){return e.Get("ViewName")};this.SetView=function(t){var u=t?"data-views~=":"data-views=",i=!1,r;l.each(function(){var e=n(this),o=e.find(".option-group"),r=o.filter("["+u+'"'+(t||"")+'"]'),f;o.not(r).hide();r.show();f=r.length>0;i=i||f;e.toggle(f)});this._hfSearchBar.Set("ViewName",i?t:null);r=!1;i||(r=w.children().not(l).filter("div").length>0);this.SetEnabled(i||r)};this.GetSearchByStatus=function(){e.Get("ActivityStatus")};this.SetSearchByStatus=function(n){e.Set("ActivityStatus",n)};this.GetSearchByFolder=function(){e.Get("FolderSelected")};this.SetSearchByFolder=function(n){e.Set("FolderSelected",n)};this.GetSearchBySubFolder=function(){e.Get("SubFolderSelected")};this.SetSearchBySubFolder=function(n){e.Set("SubFolderSelected",n)};this.Init()};r.prototype._InitHelp=function(){var t=this;n(t._container.find(".ctrl-help")).click(function(n){n.stopImmediatePropagation()}).tooltip({bodyHandler:function(){return n(t._container.find(".help-content")).html()},showURL:!1})}}(jQuery,K12Api);!1&&isAutocomplete&&(filter=jQuery("#tbSearch").autocomplete({source:function(n,t){var r,i=SearchBar.GetOptionValue("SearchType");r=i=="supplies"||i=="services"?"aps":i=="books"?"stripbooks":location.href.indexOf("ShoppingScreenTextbookNew.aspx")!=-1?"stripbooks":"aps";jQuery.ajax({url:"https://completion.amazon.com/search/complete",type:"GET",cache:!1,dataType:"jsonp",success:function(n){t(n[1]);var i=jQuery("#ucSearch input[type=text]").outerHeight(!1),r=jQuery("#ucSearch input[type=text]").width(),u=jQuery("#ucSearch input[type=text]").offset();jQuery(".ui-autocomplete").css({top:u.top+i,width:r})},data:{q:n.term,"search-alias":r,mkt:"1",callback:"?"}})},select:function(){setTimeout(function(){location.href=jQuery("#lbtnSearchGo").attr("href");K12Api.UI.LoadIndicator.Show("Searching...");jQuery(".ui-autocomplete").hide()})}}));+function(n,t){"use strict";var i=window.ContractFX=window.ContractFX||{},r;i.Controls=i.Controls||{};i.Controls.General=i.Controls.General||{};r=i.Controls.General.SearchNoResults=function(i,r,u,f,e){var a=1,y=2,o,v,p=1e3,h,c,s=!1,l=null;this.BeforeSearchAll=new t.Event.Event(this);this.OnSearchAllYears=new t.Event.Event(this);this.Init=function(){o=n("#"+r);this.SetSearchParams(e.type,e.text);u.CallbackComplete.AddHandler(this.callbacker_OnCallbackComplete,this);o.find(".search-all-folders-ctrl").toggleClass("active",this.IsSearchAllAvailable()).click(n.proxy(this.OnSearchAll,this));o.find(".folders-holder").on("click",".search-link",n.proxy(this.OnFolderSearch,this));o.find(".search-all-years-ctrl").click(this.OnSearchAllYears.proxy())};this.SetSearchParams=function(n,t){h=n||"";c=t||""};this.BuildSearchInfo=function(n,t){for(var u={},f,r,i=0;i<t.length;i++)u[t[i].Name]=t[i];for(f=[],i=0;i<n.length;i++)r=u[n[i].Name]?u[n[i].Name]:{Status:y},f.push({name:n[i].Name,status:r.Status,count:r.Count,title:n[i].Title,visible:n[i].Visible});return f};this.GenerateFolderInfo=function(n){var t=[],i,r,u;return n.visible&&(n.status==a?(i=n.count>1?"s":"",r=n.count+" record"+i+" found in ",t.push(r)):t.push('<div class="status-searching"><img src="'+jsGlobal.ResolveUrl("~/images/loader.gif")+'"> Searching...<\/div>')),t.push(" "),u=n.count>0?'<span class="search-link" data-name="'+n.name+'">'+n.title+"<\/span>":n.title,n.visible&&t.push(u),'<div class="search-info">'+t.join("")+"<\/div>"};this.RenderFoldersInfo=function(t){for(var r=[],i=0;i<t.length;i++)r.push(this.GenerateFolderInfo(t[i]));n(".folders-holder",o).html(r.join(""))};this.IsSearchAllAvailable=function(){return f.length>0};this.SearchAllFolders=function(n,t){var r=this.BuildSearchInfo(f,[]),i;this.RenderFoldersInfo(r);s=!0;i="start-search|"+n+"|"+t;u.PerformCallback(i)};this.IsSearching=function(){return s};this.StopSearch=function(){s=!1;clearTimeout(l);l=null;n(".folders-holder",o).html("")};this.CheckProgress=function(){if(s){var t=n.proxy(function(){s&&u.PerformCallback("get-progress|"+v)},this);l=setTimeout(t,p)}};this.IsSearchCompleted=function(n){return n.every(function(n){return n.status==a})};this.OnSearchAll=function(){this.IsSearchAllAvailable()&&(this.BeforeSearchAll.publish(),this.SearchAllFolders(h,c))};this.OnFolderSearch=function(t){var r=n(t.target).data("name");__doPostBack(i,"searchResultClick|"+r+"|"+h+"|"+c)};this.callbacker_OnCallbackComplete=function(n,t){var r=t.parameter.split("|"),u,i;r[0]=="start-search"&&t.result?(v=t.result,this.CheckProgress()):r[0]=="get-progress"&&(u=JSON.parse(t.result)||[],i=this.BuildSearchInfo(f,u),this.RenderFoldersInfo(i),this.IsSearchCompleted(i)||this.CheckProgress())};this.Init()}}(jQuery,K12Api);+function(n,t){"use strict";var i=window.ContractFX=window.ContractFX||{},r;i.Controls=i.Controls||{};i.Controls.General=i.Controls.General||{};r=i.Controls.General.TimeSpanByYear=function(n,i){this._mnTimeSpan=n;this._hfParams=i;this.OnChanged=new t.Event.Event(this);n.ItemClick.AddHandler(this._OnItemClick,this);this.SetValue(this.GetValue())};r.prototype._OnItemClick=function(n,t){if(t.item.indexPath!=0&&!window.isInCallback){try{t.item.parent.SetText(t.item.GetText())}catch(t){}this._hfParams.Set("FilterTimeSpan",t.item.name);this.OnChanged.publish()}};r.prototype.SetVisible=function(n){this._mnTimeSpan.SetVisible(n)};r.prototype.GetValue=function(){return this._hfParams.Get("FilterTimeSpan")};r.prototype.SetValue=function(n){var t=this._mnTimeSpan.GetItemByName(n);t&&(t.parent.SetText(t.GetText()),this._hfParams.Set("FilterTimeSpan",n))}}(jQuery,K12Api);+function(n){"use strict";var t=n.ContractFX=n.ContractFX||{},i;t.Controls=t.Controls||{};t.Controls.Vendor=t.Controls.Vendor||{};i=t.Controls.Vendor.SearchPopup=function(n,i,r,u,f,e,o,s){t.Common.PickerPopupBase.call(this,n,i,r,u,f,e,o,s)};t.Common.Utils.Extend(i,t.Common.PickerPopupBase)}(window);!function(n,t,i){"use strict";var r=n.ContractFX=n.ContractFX||{},u;r.Controls=r.Controls||{};r.Controls.General=r.Controls.General||{};u=r.Controls.General.ValidationDialog=function(n,r,u,f,e){var h=this,o=t.Deferred(),s=null;this.OnErrorsShown=new i.Event.Event(this);this.OnErrorClick=new i.Event.Event(this);this.Init=function(){r.Init.AddHandler(function(){o.resolve()},this);r.CloseButtonClick.AddHandler(this.OnCloseButtonClick,this);u.Init.AddHandler(this.OnInit,this);u.VisibilityChanged.AddHandler(this.OnVisibilityChanged,this);s=ASPx.VSOnErrorClick;ASPx.VSOnErrorClick=this.ASPx_VSOnErrorClick;u.SetVisible(!1)};this.ASPx_VSOnErrorClick=function(n){var t=ASPx.GetControlCollection().Get(n);this.OnErrorClick.publish(t);s(n)}.bind(this);this.OnCloseButtonClick=function(){u.SetClientVisible(!1)};this.OnInit=function(){u.invalidEditorNames={};u.InlineInitialize()};this.OnVisibilityChanged=function(){o.then(function(){u.GetVisible()?(r.Show(),h.OnErrorsShown.publish(),setTimeout(function(){t("#"+e+" a").each(function(){this.href=this.href+n+".OnCloseButtonClick();"})})):(r.Hide(),typeof loading!="undefined"&&loading.Hide())})};this.Show=function(){r.Show();setTimeout(function(){t("#"+e+" a").each(function(){this.href=this.href+n+".OnCloseButtonClick();"})})};this.Hide=function(){r.Hide()};this.Clear=function(){ASPx.GetControlCollection().ForEachControl(function(n){n.GetIsValid&&!n.GetIsValid()&&u.RemoveError(n.name)})};this.GetIsValid=function(){return!u.GetVisible()};this.Init()}}(window,jQuery,K12Api);+function(n,t){"use strict";function u(){}function f(t){var i=n[t];return i&&i.ASPxGrid&&(i=i.ASPxGrid),i&&i.isASPxClientControl?i:null}var r=n.ContractFX=n.ContractFX||{},i;r.Controls=r.Controls||{};r.Controls.General=r.Controls.General||{};i=r.Controls.General.WizardTabs=function(n){var i=this;this.$container=null;this.tabSelector=".tab-ctrl";this.OnActivate=new K12Event(this);this.OnDeactivate=new K12Event(this);this.Init=function(){this.$container=t(n);this.FixControlsWidth();this.GetTabs().map(function(n){n.Tab.click(function(r){var u=r.target;r.target.dataset.name&&r.target.dataset.name===n.Name?i.ActivateTab(n):i.FindTabByName(r.target.dataset.name)&&i.ActivateTab(i.FindTabByName(r.target.dataset.name));t(u).hasClass("action-tab-complex")?(t(".action-tab-complex").not(t(u)).removeClass("selected"),t(u).toggleClass("selected")):(i.FindTabByName(r.target.dataset.name)&&t(".action-tab-complex").removeClass("selected"),t(".action-tab-menu").hide())})});this.$container.find(".tabs-head").addClass("visible")};this.FixControlsWidth=function(){var n=this;this.$container.find(".tabs-head").each(function(){var u=t(this),i=u.find(n.tabSelector),r;i.length!=0&&(r=100/i.length,i.each(function(){t(this).width(r+"%")}))})};this.Init()};i.prototype._Tab_OnCLick=function(){};u.prototype.GetId=function(){return this.Tab.data("tab-id")};u.prototype.GetContent=function(){var i=this.GetId(),n=this.Tab.data("content-index");return n=n!==undefined?n:i,t("#tabid"+n)};i.prototype._GetTabDescription=function(n){if(n=t(n),n.length==0)return null;var r=n.hasClass("tab")?"tab":"action-tab",i=new u;return i.Name=n.data("name"),i.Type=r,i.IsActive=n.hasClass("active"),i.Tab=n,i};i.prototype.GetTabContent=function(){};i.prototype.FindTabByName=function(n){var t=this.$container.find('[data-name="'+n+'"]');return this._GetTabDescription(t)};i.prototype.GetTab=function(n){return this._GetTabDescription(n)};i.prototype.GetCurrentTab=function(){return this._GetTabDescription(this.$container.find(this.tabSelector).filter(".active"))};i.prototype.GetPrevTab=function(){var n=this.GetCurrentTab();return n?(n=n.Tab.prev(this.tabSelector).get(0),this._GetTabDescription(n)):null};i.prototype.GetNextTab=function(){var n=this.GetCurrentTab();return n?(n=n.Tab.next(this.tabSelector).get(0),this._GetTabDescription(n)):null};i.prototype.GetTabs=function(){return this.$container.find(this.tabSelector).toArray().map(this._GetTabDescription)};i.prototype.AddInnerTabs=function(n,i,r){var u=this;this.FindTabByName(n).Tab.append('<div class="action-tab-menu" data-parenttab="'+n+'"><\/div>');t.each(i,function(t,i){u.FindTabByName(i).Tab.detach().first().appendTo('.action-tab-menu[data-parenttab="'+n+'"]').replaceWith(function(){return $("<div>",{"class":this.className,"data-tab-id":this.getAttribute("data-tab-id"),"data-name":this.getAttribute("data-name"),text:this.innerText})})});this.FindTabByName(n).Tab.click(function(){t(".action-tab-menu").not(t(this).find(".action-tab-menu")).hide();t(this).find(".action-tab-menu").toggle()});r&&this.FindTabByName(n).Tab.find(".action-tab-menu").addClass("fl-right")};i.prototype._MakeTabActive=function(n,i){var r=t("#"+n).find(this.tabSelector),u=r.filter('[data-tab-id="'+i+'"]').addClass("active"),f;r.not(u).addClass("inactive");f=u.closest("td").prev("td");t(f).removeClass("inactive").addClass("inactive-prev")};i.prototype.ActivateTab=function(t){var c,s,l,h;if(t.Tab){var a=t.Tab.hasClass("last"),i=t.GetContent(),r=t.GetId();if(!t.Tab.hasClass("non-clickable")){var u=this.GetCurrentTab(),e=i.data("onactivated"),o=this.$container.find(".container.tab-active").data("ondeactivated");(o&&typeof n[o]=="function"&&n[o](),c=this.OnDeactivate.publish({curr:u,next:t}),c.defaultPrevented)||(this.$container.find(this.tabSelector).removeClass("active inactive inactive-prev"),hfValues.Set("ActiveTabId",r),this._MakeTabActive("topTable",r),this._MakeTabActive("botTable",r),s=t.Tab.data("url"),s?n.location=s:(this.$container.find(".container").removeClass("tab-active"),i.addClass("tab-active"),l=i.attr("gridID"),h=f(l),h&&this._ResizeGrid(h)),e&&typeof n[e]=="function"&&n[e](),t.IsActive=!0,u.IsActive=!1,this.OnActivate.publish({curr:t,prev:u}))}}};i.prototype._ResizeGrid=function(n){var t=this.$container.width();n.SetVisible(!1);n.SetWidth(t);n.SetVisible(!0)}}(window,jQuery);+function(n,t){"use strict";function u(){}var r=n.ContractFX=n.ContractFX||{},i;r.Controls=r.Controls||{};r.Controls.ContractEditNew=r.Controls.ContractEditNew||{};i=r.Controls.ContractEditNew.WizardTabsNew=function(n){var i=this;this.$container=null;this.$containerId="#";this.tabSelector=".tab-ctrl";this.OnActivate=new K12Event(this);this.OnDeactivate=new K12Event(this);this.Init=function(){var r,u;this.$container=t(n);this.$containerId="#"+this.$container.attr("id");this.FixControlsWidth();this.SetUrlForTabs();r=hfTabValues.Get("ActiveTabName");r!=undefined&&r!=null&&(u=this.FindTabByName(r),u!=null&&this.MakeTabActiveNew(u.GetId()));this.LoadTabStatus();this.GetTabs().map(function(n){n.Tab.click(function(t){i.OnTabClick(t,n)})});this.$container.find(".tabs-head").addClass("visible");(this.FindTabByName("dialog")!=null||this.FindTabByName("more")!=null)&&(this.FindTabByName("dialog").Tab.addClass("action-tab-complex non-clickable"),this.FindTabByName("more").Tab.addClass("action-tab-complex non-clickable"),this.AddInnerTabs("dialog",["dialogInternal","dialogVendors"]),this.AddInnerTabs("more",["acc-assoc","purchase-mgmt","transactions","access"],!0))};this.OnTabClick=function(n,t){var i=n.target;n.target.dataset.name&&n.target.dataset.name===t.Name?this.ActivateTab(t):this.FindTabByName(n.target.dataset.name)&&this.ActivateTab(this.FindTabByName(n.target.dataset.name))};this.FixControlsWidth=function(){var n=this;this.$container.find(".tabs-head").each(function(){var u=t(this),i=u.find(n.tabSelector),r;i.length!=0&&(r=100/i.length,i.each(function(){t(this).width(r+"%")}))})};this.SetUrlForTabs=function(){var n=hfTabValues.Get("ContractId"),t=hfTabValues.Get("IsEditable")!=null?hfTabValues.Get("IsEditable"):!1;n!=undefined&&n!=null&&this.GetTabs().forEach(function(i){var r=i.Tab.attr("data-url");r!=undefined&&r!=null&&i.Tab.attr("data-url","ContractEdit.aspx?c="+n+"&tab="+i.Tab.attr("data-name")+(t?"&edit=1":""))})};this.ShowHideImageForTabs=function(){var i=this.$container.find(".movable-tab"),n=this;i.each(function(){var i=this.getAttribute("data-name"),r=t(n.$containerId+' [data-name="'+i+'"]'),u;r.append(function(){return $("<div>",{"class":"pinned-tab",html:function(){return $("<img>",{src:"/Images/pinIconBlue.png"})}})});u=r.find(".pinned-tab img");u.click(function(){n.UnPinClick(i)})})};this.UnPinTab=function(n){var r=this,i=t(this.$containerId+' [data-name="'+n+'"]'),u;i.hasClass("active")&&i.prev().removeClass("inactive-prev").addClass("inactive");i.next().hasClass("active")&&(i.prev().removeClass("inactive").addClass("inactive-prev"),i.removeClass("inactive-prev").addClass("inactive"));i.removeClass("tab").addClass("action-tab").removeClass("last");i.find(".pinned-tab").removeClass("pinned-tab").addClass("unpinned-tab");i.detach().first().appendTo(this.$containerId+' .action-tab-menu[data-parenttab="more"]').replaceWith(function(){return $("<div>",{"class":this.className,"data-tab-id":this.getAttribute("data-tab-id"),"data-name":this.getAttribute("data-name"),"data-url":this.getAttribute("data-url"),html:this.innerHTML})});u=t(this.$containerId+' [data-name="'+n+'"]').find(".unpinned-tab img").click(function(){r.PinClick(n)})};this.PinTab=function(n){var f=this,e=t(this.$containerId+' [data-name="'+n+'"]'),u=e.attr("data-tab-id"),r=-1,i,o;this.GetTabs().some(function(n){var t=n.Tab.attr("data-tab-id");if(t!=u){if(r>=0&&t>u&&r<u)return!0;r=t}});e.detach().first().insertAfter(this.$containerId+' [data-tab-id="'+r+'"]').replaceWith(function(){return $("<td>",{"class":this.className,"data-tab-id":this.getAttribute("data-tab-id"),"data-name":this.getAttribute("data-name"),"data-url":this.getAttribute("data-url"),html:this.innerHTML})});i=t(this.$containerId+' [data-name="'+n+'"]');i.hasClass("selected")&&i.prev().removeClass("inactive").addClass("inactive-prev");i.next().hasClass("active")&&(i.removeClass("inactive").addClass("inactive-prev"),i.prev().removeClass("inactive-prev").addClass("inactive"));i.removeClass("action-tab").addClass("tab").addClass("last");i.find(".unpinned-tab").removeClass("unpinned-tab").addClass("pinned-tab");i.find(".pinned-tab img").click(function(){f.UnPinClick(n)});o=this.FindTabByName(i.data("name"));i.click(function(n){f.OnTabClick(n,o)})};this.UnPinClick=function(n){this.UnPinTab(n);this.SaveTabStatus()};this.PinClick=function(n){this.PinTab(n);this.SaveTabStatus()};this.SaveTabStatus=function(){var n=[],t;this.GetTabs().some(function(t){if(t.Tab.hasClass("movable-tab")){var i={};i.tabName=t.Name;i.visible=t.Tab.find(".pinned-tab").length>0;n.push(i)}});t=JSON.stringify(n);r.Web.Services.Helpers.SaveTabStatus(t,function(){return},function(){console.log("Error While Saving Tab Status")})};this.LoadTabStatus=function(){var n=this;this.ShowHideImageForTabs();r.Web.Services.Helpers.GetTabStatus(function(t){if(t!=null&&t!=""){var i=JSON.parse(t);i.some(function(t){t==null||t==""||t.visible||n.UnPinTab(t.tabName)})}},function(){console.log("Error While Saving Tab Status")})};this.Init()};i.prototype._Tab_OnCLick=function(){};u.prototype.GetId=function(){return this.Tab.data("tab-id")};u.prototype.GetContent=function(){var i=this.GetId(),n=this.Tab.data("content-index");return n=n!==undefined?n:i,t("#tabid"+n)};i.prototype._GetTabDescription=function(n){if(n=t(n),n.length==0)return null;var r=n.hasClass("tab")?"tab":"action-tab",i=new u;return i.Name=n.data("name"),i.Type=r,i.IsActive=n.hasClass("active"),i.Tab=n,i};i.prototype.GetTabContent=function(){};i.prototype.FindTabByName=function(n){var t=this.$container.find('[data-name="'+n+'"]');return this._GetTabDescription(t)};i.prototype.GetTab=function(n){return this._GetTabDescription(n)};i.prototype.GetCurrentTab=function(){return this._GetTabDescription(this.$container.find(this.tabSelector).filter(".active"))};i.prototype.GetPrevTab=function(){var n=this.GetCurrentTab();return n?(n=n.Tab.prev(this.tabSelector).get(0),this._GetTabDescription(n)):null};i.prototype.GetNextTab=function(){var n=this.GetCurrentTab();return n?(n=n.Tab.next(this.tabSelector).get(0),this._GetTabDescription(n)):null};i.prototype.GetTabs=function(){return this.$container.find(this.tabSelector).toArray().map(this._GetTabDescription)};i.prototype.AddInnerTabs=function(n,i,r){var f=this,u=this.FindTabByName(n).Tab;u.click(function(i){var f=t(this),r=f.find(".action-tab-menu"),u;r.width(f.width());u=i.target;(u.getAttribute("data-parenttab")==n||u.getAttribute("data-name")==n)&&(t(".action-tab-menu").not(r).hide(),r.toggle())});r&&u.find(".action-tab-menu").addClass("fl-right")};i.prototype.MakeTabActiveNew=function(n){var f=this.$containerId+" .tabs-head",i=t(f).find(this.tabSelector),r=i.filter('[data-tab-id="'+n+'"]').removeClass("inactive").addClass("active"),u;i.not(r).addClass("inactive");u=r.closest("td").prev("td");t(u).removeClass("inactive").addClass("inactive-prev")};i.prototype.ActivateTab=function(t){var i;if(t.Tab&&!t.Tab.hasClass("non-clickable")){var r=!1,f=t.Tab.hasClass("last"),e=t.GetContent(),u=t.GetId();if(u==this.GetCurrentTab().GetId()&&(r=!0),i=t.Tab.data("url"),i&&!r){n.location=i;return}}}}(window,jQuery);+function(n,t,i){"use strict";var u=n.ContractFX=n.ContractFX||{},r;u.Admin=u.Admin||{};r=u.Admin.Administrators=function(n,r,u,f,e,o,s){this._topMenu=n;this._fileMenuTop=r;this._botMenu=u;this._fileMenuBot=f;this._dxGrid=e;this._topMenuItems=n.GetItems();this._botMenuItems=u.GetItems();var h=this._MenuItem_OnClick.bind(this);t(this._topMenuItems.lbAddTop).click(h);t(this._botMenuItems.lbAddBot).click(h);t(this._topMenuItems.lbEditTop).click(h);t(this._botMenuItems.lbEditBot).click(h);t(this._topMenuItems.lbDeleteTop).click(h);t(this._botMenuItems.lbDeleteBot).click(h);r.ItemClick.AddHandler(this._fileMenu_OnClick,this);f.ItemClick.AddHandler(this._fileMenu_OnClick,this);e.Init.AddHandler(this._UpdateMenu,this);e.RowClick.AddHandler(i.UI.Grid.SingleSelect);e.SelectionChanged.AddHandler(this._UpdateMenu,this);e.EndCallback.AddHandler(this._UpdateMenu,this);o.OnSearch.subscribe(this._gridSearchForm_OnChanged,this);o.OnReset.subscribe(this._gridSearchForm_OnChanged,this);s.CallbackComplete.AddHandler(this._callbackHelper_CallbackComplete,this)};r.prototype._gridSearchForm_OnChanged=function(n,t){t.preventDefault();this._dxGrid.Refresh()};r.prototype._callbackHelper_CallbackComplete=function(n,t){var i=t.parameter.split("|");t.result=="failed"?k12Popup.Alert("Failed sending password reminder email!"):k12Popup.Alert("Password reminder email sent to "+t.result)};r.prototype._fileMenu_OnClick=function(n,t){t.processOnServer=!1;switch(t.item.name){case"export":case"print":t.processOnServer=!0}};r.prototype._MenuItem_OnClick=function(n){n.preventDefault();var r=this,i=t(n.target).data("command-name");i=="delete"?k12Popup.Confirm("Are you sure that you want to delete selected Administrator(s)?",function(){r._dxGrid.PerformCallback("delete")}):(i=="add"||i=="edit")&&this._dxGrid.PerformCallback(i)};r.prototype._UpdateMenu=function(){var n=this._dxGrid.GetSelectedRowCount()==1;this._topMenu.SetItemEnabled(this._topMenuItems.lbEditTop,n);this._botMenu.SetItemEnabled(this._botMenuItems.lbEditBot,n);this._topMenu.SetItemEnabled(this._topMenuItems.lbDeleteTop,n);this._botMenu.SetItemEnabled(this._botMenuItems.lbDeleteBot,n)}}(window,jQuery,K12Api);+function(n,t,i){"use strict";var u=n.ContractFX=n.ContractFX||{},r;u.Admin=u.Admin||{};r=u.Admin.Instructors=function(n,r,u,f,e,o,s){this._topMenu=n;this._fileMenuTop=r;this._botMenu=u;this._fileMenuBot=f;this._dxGrid=e;this._topMenuItems=n.GetItems();this._botMenuItems=u.GetItems();var h=this._MenuItem_OnClick.bind(this);t(this._topMenuItems.lbAddTop).click(h);t(this._botMenuItems.lbAddBot).click(h);t(this._topMenuItems.lbEditTop).click(h);t(this._botMenuItems.lbEditBot).click(h);t(this._topMenuItems.lbDeleteTop).click(h);t(this._botMenuItems.lbDeleteBot).click(h);r.ItemClick.AddHandler(this._fileMenu_OnClick,this);f.ItemClick.AddHandler(this._fileMenu_OnClick,this);e.Init.AddHandler(this._UpdateMenu,this);e.RowClick.AddHandler(i.UI.Grid.SingleSelect);e.SelectionChanged.AddHandler(this._UpdateMenu,this);e.EndCallback.AddHandler(this._UpdateMenu,this);o.OnSearch.subscribe(this._gridSearchForm_OnChanged,this);o.OnReset.subscribe(this._gridSearchForm_OnChanged,this);s.CallbackComplete.AddHandler(this._callbackHelper_CallbackComplete,this)};r.prototype._gridSearchForm_OnChanged=function(n,t){t.preventDefault();this._dxGrid.Refresh()};r.prototype._callbackHelper_CallbackComplete=function(n,t){var i=t.parameter.split("|");t.result=="failed"?k12PopupEFX.Alert("Failed sending password reminder email!"):k12PopupEFX.Alert("Password reminder email sent to "+t.result)};r.prototype._fileMenu_OnClick=function(n,t){t.processOnServer=!1;switch(t.item.name){case"export":case"print":t.processOnServer=!0}};r.prototype._MenuItem_OnClick=function(n){n.preventDefault();var r=this,i=t(n.target).data("command-name");i=="delete"?k12PopupEFX.Confirm("Are you sure that you want to delete selected Speaker(s)?",function(){r._dxGrid.PerformCallback("delete")}):(i=="add"||i=="edit")&&this._dxGrid.PerformCallback(i)};r.prototype._UpdateMenu=function(){var n=this._dxGrid.GetSelectedRowCount()==1;this._topMenu.SetItemEnabled(this._topMenuItems.lbEditTop,n);this._botMenu.SetItemEnabled(this._botMenuItems.lbEditBot,n);this._topMenu.SetItemEnabled(this._topMenuItems.lbDeleteTop,this._dxGrid.GetSelectedRowCount()>0);this._botMenu.SetItemEnabled(this._botMenuItems.lbDeleteBot,this._dxGrid.GetSelectedRowCount()>0)}}(window,jQuery,K12Api);+function(n,t,i){"use strict";var r=n.ContractFX=n.ContractFX||{},u;r.Admin=r.Admin||{};u=r.Admin.AdminVendorClass=function(n,t,r,u,f,e){this._topMenu=n;this._botMenu=t;this._topMenuItems=n.GetItems();this._botMenuItems=t.GetItems();this._dxGrid=f;this._GridFilters=e;r.ItemClick.AddHandler(this._OnFileMenuItemClick,this);u.ItemClick.AddHandler(this._OnFileMenuItemClick,this);f.Init.AddHandler(this._UpdateMenu,this);f.EndCallback.AddHandler(this._UpdateMenu,this);f.RowClick.AddHandler(i.UI.Grid.SingleSelect);f.SelectionChanged.AddHandler(this._UpdateMenu,this)};u.prototype._UpdateMenu=function(){var n=xgvGrid.GetSelectedRowCount()==1,t=xgvGrid.GetSelectedRowCount()>0,i=xgvGrid.pageCount==1;this._topMenu.SetItemEnabled(this._topMenuItems.lbAddTop,i);this._botMenu.SetItemEnabled(this._botMenuItems.lbAddBottom,i);this._topMenu.SetItemEnabled(this._topMenuItems.lbEditTop,n);this._botMenu.SetItemEnabled(this._botMenuItems.lbEditBottom,n);this._topMenu.SetItemEnabled(this._topMenuItems.lbDeleteTop,t);this._botMenu.SetItemEnabled(this._botMenuItems.lbDeleteBottom,t)};u.prototype._OnFileMenuItemClick=function(n,t){t.processOnServer=!1;switch(t.item.name){case"export":case"print":t.processOnServer=!0;break;case"hidefields":this._dxGrid.ShowCustomizationWindow();break;case"resetgrid":this._GridFilters.ResetGrid()}}}(window,jQuery,K12Api);+function(n,t){"use strict";var r=n.ContractFX=n.ContractFX||{},i;r.Admin=r.Admin||{};i=r.Admin.MyAgencyInfo=function(n,i,r,u,f,e,o,s,h){i.SelectedIndexChanged.AddHandler(this._ddlCountries_SelectedIndexChanged,this);r.SelectedIndexChanged.AddHandler(this._ddlStates_SelectedIndexChanged,this);r.EndCallback.AddHandler(this._ddlStates_EndCallback,this);f.SelectedIndexChanged.AddHandler(this._ddlStatesInc_SelectedIndexChanged,this);f.EndCallback.AddHandler(this._ddlStatesInc_EndCallback,this);h.CallbackComplete.AddHandler(this._CallbackHelper_CallbackComplete,this);this._container=t(n);this._ddlStates=r;this._tbxStatesOther=u;this._ddlStatesInc=f;this._tbxStatesIncOther=e;this._tbxStateID=s;this._CallbackHelper=h;this._imLoader=this._container.find(".imLoader").get(0);this._imLoaderInc=this._container.find(".imLoaderInc").get(0);this._UpdateStateOther();this._UpdateStateIncOther()};i.prototype._UpdateStateOther=function(){this._tbxStatesOther.SetEnabled(ddlStates.GetValue()=="0")};i.prototype._UpdateStateIncOther=function(){this._tbxStatesIncOther.SetEnabled(ddlStatesInc.GetValue()=="0")};i.prototype._ddlCountries_SelectedIndexChanged=function(n){this._ddlStates.PerformCallback(null);this._ddlStatesInc.PerformCallback(null);this._imLoader.style.display="";this._imLoaderInc.style.display="";this._CallbackHelper.PerformCallback(n.GetValue())};i.prototype._ddlStates_SelectedIndexChanged=function(){this._UpdateStateOther()};i.prototype._ddlStates_EndCallback=function(){this._imLoader.style.display="none"};i.prototype._ddlStatesInc_SelectedIndexChanged=function(){this._UpdateStateIncOther()};i.prototype._ddlStatesInc_EndCallback=function(){this._imLoaderInc.style.display="none"};i.prototype._cbxStateTax_SelectedIndexChanged=function(n){var t=n.GetSelectedIndex()==0;this._tbxStateID.SetEnabled(t)};i.prototype._CallbackHelper_CallbackComplete=function(){return}}(window,jQuery);+function(n,t){"use strict";n.ContractFX=n.ContractFX||{};var i=n.ContractFX.ClientBenefits=function(n,i,r,u,f){this._container=t(n);this._ddlWatchCountry=i;this._pfnWatchPhone=r;this._service=f;this._isValid=!1;this._container.on("click",".watch-video .overlay",function(){alert("To watch the video, please fill out all the fields")});i.SelectedIndexChanged.AddHandler(this._ddlWatchCountry_SelectedIndexChanged,this);r.OnValidation.subscribe(this._pfnWatchPhone_OnValidation,this);u.Click.AddHandler(this._btnWatchVideo_Click,this)};i.prototype._ddlWatchCountry_SelectedIndexChanged=function(n){var i=this,t=n.GetValue();this._service.GetCallingCode(t).then(function(n){i._pfnWatchPhone.SetCountry(t,n)})};i.prototype._pfnWatchPhone_OnValidation=function(n){this._isValid=n.GetIsValid();this._container.find(".valWatchPhone").toggle(!this._isValid).text("Invalid Phone Number")};i.prototype._GetIsValid=function(){var t="WatchVideoGroup",i=n.Page_ClientValidate(t),r=ASPxClientEdit.ValidateGroup(t);return i&&r&&this._isValid};i.prototype._btnWatchVideo_Click=function(n,t){t.processOnServer=this._GetIsValid()};i.Demo=function(n,r,u,f,e){this._container=t(n);this._pfnDemoPhone=u;this._service=e;this._isValid=!1;r.SelectedIndexChanged.AddHandler(this._ddlDemoCountry_SelectedIndexChanged,this);u.OnValidation.subscribe(this._pfnDemoPhone_OnValidation,this);var o=t("#"+f).click(i.Demo.prototype._btnRequestDemo_Click.bind(this))};i.Demo.prototype._ddlDemoCountry_SelectedIndexChanged=function(n){var i=this,t=n.GetValue();this._service.GetCallingCode(t).then(function(n){i._pfnDemoPhone.SetCountry(t,n)})};i.Demo.prototype._pfnDemoPhone_OnValidation=function(n){this._isValid=n.GetIsValid();this._container.find(".valDemoPhone").toggle(!this._isValid).text("Invalid Phone Number")};i.Demo.prototype._GetIsValid=function(){var n="DemoGroup",t=Page_ClientValidate(n),i=ASPxClientEdit.ValidateGroup(n);return t&&i&&this._isValid};i.Demo.prototype._btnRequestDemo_Click=function(n){this._GetIsValid()||n.preventDefault()};i.Service=function(n){this._PageMethods=n};i.Service.prototype.GetCallingCode=function(n){var i=t.Deferred();return this._PageMethods.GetCallingCode(n,function(n){i.resolve(n)},function(){i.reject()}),i.promise()}}(window,jQuery);+function(n,t){"use strict";n.ContractFX=n.ContractFX||{};var i=n.ContractFX.MyEmailSignatures=function(n,i,r,u,f,e,o){this._topMenu=n;this._fileMenuTop=i;this._botMenu=r;this._fileMenuBot=u;this._dxGrid=f;this._gridFilters=o;this._topMenuItems=n.GetItems();this._botMenuItems=r.GetItems();var s=this._MenuItem_OnClick.bind(this);t(this._topMenuItems.lbAddTop).click(s);t(this._botMenuItems.lbAddBot).click(s);t(this._topMenuItems.lbEditTop).click(s);t(this._botMenuItems.lbEditBot).click(s);t(this._topMenuItems.lbDeleteTop).click(s);t(this._botMenuItems.lbDeleteBot).click(s);i.ItemClick.AddHandler(this._fileMenu_OnClick,this);u.ItemClick.AddHandler(this._fileMenu_OnClick,this);f.Init.AddHandler(this._UpdateMenu,this);f.RowClick.AddHandler(K12Api.UI.Grid.SingleSelect);f.SelectionChanged.AddHandler(this._UpdateMenu,this);f.EndCallback.AddHandler(this._UpdateMenu,this);e.OnSearch.subscribe(this._gridSearchForm_OnChanged,this);e.OnReset.subscribe(this._gridSearchForm_OnChanged,this)};i.prototype._gridSearchForm_OnChanged=function(n,t){t.preventDefault();this._gridFilters.SetForceGridUpdate(!0);this._dxGrid.PerformCallback()};i.prototype._fileMenu_OnClick=function(n,t){t.processOnServer=!1;switch(t.item.name){case"export":case"print":t.processOnServer=!0}};i.prototype._MenuItem_OnClick=function(n){n.preventDefault();var r=this,i=t(n.target).data("command-name");i=="delete"?k12PopupEFX.Confirm("Are you sure that you want to delete selected Email Signature(s)?",function(){r._dxGrid.PerformCallback("delete")}):(i=="add"||i=="edit")&&this._dxGrid.PerformCallback(i)};i.prototype._UpdateMenu=function(){var n=this._dxGrid.GetSelectedRowCount()==1;this._topMenu.SetItemEnabled(this._topMenuItems.lbEditTop,n);this._botMenu.SetItemEnabled(this._botMenuItems.lbEditBot,n);this._topMenu.SetItemEnabled(this._topMenuItems.lbDeleteTop,this._dxGrid.GetSelectedRowCount()>0);this._botMenu.SetItemEnabled(this._botMenuItems.lbDeleteBot,this._dxGrid.GetSelectedRowCount()>0)}}(window,jQuery,K12Api);+function(n,t){"use strict";var i,r,u;n.ContractFX=n.ContractFX||{};i=n.ContractFX.ContractsHome=function(n){this._container=t(n);this._container.find(".action-links").on("click","> a",function(n){if(n.currentTarget.classList.contains("disabled")){n.preventDefault();return}})};r=i.ConractStatuses=function(i,r){var u=this;this._wccContractStatuses=r;r.Init.AddHandler(function(){u._ResizeChart()});r.EndCallback.AddHandler(function(){u._wccContractStatuses.SetVisible(!0)});t(n).resize(function(){u._ResizeChart()})};r.prototype._ResizeChart=function(){var n=t(this._wccContractStatuses.GetMainElement()).parent(),i=n.height(),r=n.width();this._wccContractStatuses.PerformCallback(i+"|"+r)};u=function(n,t){this._cbPanel=t};u.prototype._RefreshContracts=function(){this._cbPanel.PerformCallback()}}(window,jQuery);+function(n,t){"use strict";var i,r,u;n.ContractFX=n.ContractFX||{};i=n.ContractFX.EventsHome=function(n){this._container=t(n);this._container.find(".action-links").on("click","> a",function(n){if(n.currentTarget.classList.contains("disabled")){n.preventDefault();return}});$(".cell-timeleft").each(function(){var n=this.innerHTML.split("|"),t=new Date(n[0],n[1]-1,n[2],n[3],n[4],n[5]);$(this.parentNode).countdown({until:$.countdown.UTCDate(0,t),compact:!0,layout:"<b>{dn}{dl} {hnn}{sep}{mnn}{sep}{snn} <\/b>"})})};r=i.EventStatuses=function(i,r){var u=this;this._wccContractStatuses=r;r.Init.AddHandler(function(){u._ResizeChart()});r.EndCallback.AddHandler(function(){u._wccContractStatuses.SetVisible(!0)});t(n).resize(function(){u._ResizeChart()})};r.prototype._ResizeChart=function(){var i=t(this._wccContractStatuses.GetMainElement()).parent(),n=i.height(),r=i.width();n<=0&&(n=200);this._wccContractStatuses.PerformCallback(n+"|"+r)};u=function(n,t){this._cbPanel=t};u.prototype._RefreshContracts=function(){this._cbPanel.PerformCallback()}}(window,jQuery);+function(n,t){"use strict";var i=n.ContractFX=n.ContractFX||{},r=i.WelcomeMaster=function(n,i,r){this._container=t(n);this._ucLogin=i;this._hiddenNavMenu=r;this._pnlTopNav=this._container.find(".main-navigation .topnav").get(0);this._ctrlToggleMenu=this._container.find(".ctrl-toggle-menu");this._ctrlClientLogin=this._container.find(".ctrl-client-login");this._ctrlVendorLogin=this._container.find(".ctrl-vendor-login");this._ctrlToggleMenu.click(this._OnToggleMenu.bind(this));var u=this._OnLogin.bind(this);this._ctrlClientLogin.click(u);this._ctrlVendorLogin.click(u)};r.prototype._OnToggleMenu=function(n){n.preventDefault();this._pnlTopNav.classList.contains("responsive")?(this._pnlTopNav.classList.remove("responsive"),document.querySelector(this._hiddenNavMenu).classList.remove("hidden-nav-menu")):(this._pnlTopNav.classList.add("responsive"),document.querySelector(this._hiddenNavMenu).classList.add("hidden-nav-menu"))};r.prototype._OnLogin=function(n){n.preventDefault();var t=n.currentTarget==this._ctrlClientLogin[0]?i.Controls.Auth.LoginPopup.TYPE_CLIENT:i.Controls.Auth.LoginPopup.TYPE_VENDOR;this._ucLogin.SetType(t);this._ucLogin.Show()}}(window,jQuery);+function(n,t){"use strict";var r=n.ContractFX=n.ContractFX||{},i;n.ContractFX.Home=n.ContractFX.Home||{};i=ContractFX.Home=function(i,r,u){this._container=t(i);this._loginPopup=r;this._ddlVideos=typeof u!="undefined"?u:null;this._container.on("click",".tab-world",function(){n.open(K12Api.SiteConfig.WorldERPUrl,"_blank")});this._container.on("click",".tab-search",function(){n.open(K12Api.SiteConfig.ProRFxUrl,"_blank")});this._container.on("click",".tab-cfx",function(){n.open(K12Api.SiteConfig.ContractFXUrl,"_blank")});this._container.on("click",".tab-smp",function(){n.open(K12Api.SiteConfig.SpendManagerProUrl,"_blank")});this._container.find(".btn-placeholder.watch").click(this._OnWatchVideo.bind(this));this._container.find(".ctrl-client-signin, .ctrl-vendor-signin").click(this._OnSignIn.bind(this))};i.prototype._OnWatchVideo=function(){if(this._ddlVideos!=null){var t=this._ddlVideos.GetValue();t&&n.open(t,"_blank")}};i.prototype._OnSignIn=function(n){n.preventDefault();var t=n.currentTarget.classList.contains("ctrl-client-signin")?ContractFX.Controls.Auth.LoginPopup.TYPE_CLIENT:ContractFX.Controls.Auth.LoginPopup.TYPE_VENDOR;this._loginPopup.SetType(t);this._loginPopup.Show()}}(window,jQuery);+function(n){"use strict";var r=window.ContractFX||{},t,i;r.Controls=r.Controls||{};r.Controls.General=r.Controls.General||{};t=r.Controls.General.RfxSearchNew=function(i,u,f,e,o,s,h,c){var l=this,a;this._UNSPSC=[];this._unspscPopup=s;this._container=n(document);this.OnInit=new K12Api.Event.Event(this);this.OnPostedDateChanged=new K12Api.Event.Event(this);this.OnUNSPSCChanged=new K12Api.Event.Event(this);this.OnReset=new K12Api.Event.Event(this);this.OnSearch=new K12Api.Event.Event(this);this.OnChanged=new K12Api.Event.Event(this);this.OnTabChanged=new K12Api.Event.Event(this);this._unspscControl=this._container.find(".unspsc-control");this._unspscSelector=this._container.find(".unspsc-selector");this._unspscList=this._container.find(".unspsc-list");this._ucLogin=i;this._ddlPostedDate=ddlPostedDate;this._ddlPostedYear=o;this._tbsSearchRFxSearch=tbsSearchRFxSearch;this._hfData=h;this._folderMenus=c;a={rfq:1,rfi:2,rfp:3,sact:4,ifb:5,ract:6,soq:7};this._OnBrowseAll=null;this.Init=function(){var i,r;this._initDeferreds=[];this._WaitInit(ddlPostedDate);o&&this._WaitInit(o);this._WaitInit();i=this.OnChanged.proxy();this.OnPostedDateChanged.subscribe(i);this.OnUNSPSCChanged.subscribe(i);this.OnSearch.subscribe(i);this.OnReset.subscribe(i);this._container.find(".tab-bar .tab").click(this._Tab_OnClick.bind(this));u.ItemClick.AddHandler(this.mnRegions_ItemClick,this);n("#"+f).click(this._OnResetClick.bind(this));n("#"+e).click(this._OnSearchClick.bind(this));this._container.find(".ctrl-add-unspsc").click(this._unspscAdd_Click.bind(this));this._container.find(".unspsc-control a.add").click(this._unspscAdd_Click.bind(this));this._unspscList.on("click",".remove",this._unspscList_OnRemove.bind(this));this._ctrlClientLogin=this._container.find(".ctrl-client-login");this._ctrlVendorLogin=this._container.find(".ctrl-vendor-login");r=this._OnLogin.bind(this);this._ctrlClientLogin.click(r);this._ctrlVendorLogin.click(r);this._filterOpenBtn=this._container.find(".filter-button-open");this._filterOpenBtn.click(this._OnToggleClick.bind(this));this._filterCloseBtn=this._container.find(".filter-button-close");this._filterCloseBtn.click(this._OnToggleClick.bind(this));c&&c.OnChanged.subscribe(i);ddlPostedDate.SelectedIndexChanged.AddHandler(this.OnPostedDateChanged.proxy());o&&o.SelectedIndexChanged.AddHandler(this._ddlPostedYear_SelectedIndexChanged,this);this.OpenTab(t.TAB_ACTIVE)};this._unspscAdd_Click=function(){return this._unspscPopup.SetValues(this._UNSPSC),this._unspscPopup.Show().then(function(){var n=l._unspscPopup.GetValues();l._UpdateUNSPSC(n);l.OnUNSPSCChanged.publish()}),!1};this._unspscList_OnRemove=function(t){var i=n(t.target).data("id"),r=this._UNSPSC.filter(function(n){return n.code!=i});this._UpdateUNSPSC(r);this.OnUNSPSCChanged.publish()};this._UpdateUNSPSC=function(n){this._UNSPSC=n||[];this._RenderUNSPSC(this._UNSPSC)};this._RenderUNSPSC=function(n){var t=[];n.forEach(function(n){var i=r.Common.Utils.EncodeHtml(n.code),u=r.Common.Utils.EncodeHtml(n.text);t.push('<div class="text single-line"><a href="javascript:void(0)" class="remove" data-id="'+i+'">[X]<\/a> '+i+': <a href="javascript:;" title="'+u+'" class="tooltip-arrow-down">DESCRIPTION<\/a><\/div>')});this._unspscList.html(t.join(""));n.length>0?(this._unspscControl.show(),this._unspscSelector.hide()):(this._unspscControl.hide(),this._unspscSelector.show())};this._OnLogin=function(n){n.preventDefault();var t=n.currentTarget==this._ctrlClientLogin[0]?r.Controls.Login.LoginForm.TYPE_CLIENT:r.Controls.Login.LoginForm.TYPE_VENDOR;this._ucLogin.SetType(t);this._ucLogin.Show()};this.mnRegions_ItemClick=function(n,t){t.item.name=="non"&&(t.processOnServer=!1)};this._OnToggle=function(n){n?(this._filterOpenBtn.show(),this._filterCloseBtn.hide()):(this._filterOpenBtn.hide(),this._filterCloseBtn.show())};this._OnToggleClick=function(){this._toggler.Toggle()};this._OnResetClick=function(n){n.preventDefault();this.ClearSearch();this.OnReset.publish()};this._OnSearchClick=function(n){n.preventDefault();this.OnSearch.publish()};this.SetToggler=function(n){this._toggler=n};this.OnBeforeToggle=function(){};this.OnAfterToggle=function(n){return l.IsFunction(l._OnToggle)&&l._OnToggle(n.IsToggled()),!1};this.SetSearchText=function(n){tbsSearchRFxSearch.SetText(n)};this.GetSearchText=function(){return tbsSearchRFxSearch.GetText()};this.GetUNSPSC=function(){return this._UNSPSC};this.SetUNSPSC=function(n){n=n||[];this._UpdateUNSPSC(n)};this.SetPostedDate=function(n){n&&ddlPostedDate.SetValue(n)};this.GetPostedDate=function(){return ddlPostedDate.GetSelectedItem().value};this.ClearSearch=function(){tbsSearchRFxSearch.SetText("")};this.SetListingType=function(n){var t=parseInt(n),i;isNaN(t)&&(t=a.hasOwnProperty(n)?a[n]:NaN);i=dvxListingType.FindItemByValue(t);i&&dvxListingType.SelectIndex(i.index)};this.OnBrowseAll=function(){return this.IsFunction(this._OnBrowseAll)&&this._OnBrowseAll(),!1};this.BrowseAll=function(n){this._OnBrowseAll=n};this.IsFunction=function(n){return typeof n=="function"};this.Init()};t.TAB_ACTIVE=1;t.TAB_ENDED=2;t.prototype._WaitInit=function(t){var i,r;t?(i=this,r=n.Deferred(),i._initDeferreds.push(r),t.Init.AddHandler(function(){r.resolve()})):(i=this,n.when.apply(n,this._initDeferreds).then(function(){i.OnInit.publish()}))};t.prototype.GetData=function(){var n={Days:parseInt(this._ddlPostedDate.GetValue()),Year:this._ddlPostedYear?parseInt(this._ddlPostedYear.GetValue()):null,Text:this._tbsSearchRFxSearch.GetText()};return this._folderMenus&&(n.FolderId=this._folderMenus.GetData().Id),n};t.prototype.SetData=function(n,t){if(t=!!t,this._folderMenus&&this._folderMenus.SetData({Id:n.FolderId}),this._ddlPostedYear&&(this._ddlPostedYear.SetValue(n.Year),t&&this._ddlPostedYear.GetSelectedItem()===null&&this._ddlPostedYear.SelectIndex(0)),this._ddlPostedDate.SetValue(n.Days),t&&this._ddlPostedDate.GetSelectedItem()===null){var i=this._ddlPostedDate.FindItemByValue(365);this._ddlPostedDate.SetSelectedItem(i)}this._tbsSearchRFxSearch.SetText(n.Text)};t.prototype.OpenTab=function(r){var f=this._container.find(".tab-bar .tab"),o=r==t.TAB_ENDED?".tab-ended":".tab-active",e=f.filter(o),u;e.length&&(this._hfData.Set("Tab",r),f.removeClass("active"),e.addClass("active"),u=this._ddlPostedDate.GetMainElement(),n(u).parent().closest("div.data-pnl").toggle(r==t.TAB_ACTIVE),this._ddlPostedYear&&(u=this._ddlPostedYear.GetMainElement(),n(u).parent().closest("div.data-pnl").toggle(r==t.TAB_ENDED)),this._folderMenus&&this._folderMenus.SetData({Type:r==t.TAB_ENDED?i.TYPE_ENDED:i.TYPE_ACTIVE}))};t.prototype.GetCurrentTabId=function(){var n=this._container.find(".tab-bar .tab.active");return n[0].classList.contains("tab-ended")?t.TAB_ENDED:t.TAB_ACTIVE};t.prototype._Tab_OnClick=function(n){var i=n.target.classList.contains("tab-ended")?t.TAB_ENDED:t.TAB_ACTIVE;this.OpenTab(i);this.OnTabChanged.publish();this.OnChanged.publish()};t.prototype._ddlPostedYear_SelectedIndexChanged=function(){this.OnChanged.publish()};i=r.Controls.General.RfxSearchNew.FolderMenus=function(t,r,u){this._type=i.TYPE_ACTIVE;this.OnChanged=new K12Api.Event.Event(this);this._container=n(t);this._mnActiveFolders=r;this._mnEndedFolders=u;this._container.find(".ctrl-change").click(this._change_OnClick.bind(this));r.ItemClick.AddHandler(this._menu_ItemClick,this);u.ItemClick.AddHandler(this._menu_ItemClick,this);this._UpdateLabel()};i.TYPE_ACTIVE=1;i.TYPE_ENDED=2;i.prototype._GetMenu=function(n){return n==i.TYPE_ACTIVE?this._mnActiveFolders:this._mnEndedFolders};i.prototype._GetCurrentMenu=function(){return this._GetMenu(this._type)};i.prototype._UpdateLabel=function(){var n=this._GetCurrentMenu().GetSelectedItem();this._container.find(".lbl-name").text(n.GetText())};i.prototype._change_OnClick=function(n){this._GetCurrentMenu().ShowAtElement(n.target)};i.prototype._menu_ItemClick=function(){this._UpdateLabel();this.OnChanged.publish()};i.prototype.GetData=function(){var n=this._GetCurrentMenu().GetSelectedItem();return{Type:this._type,Id:parseInt(n.name)}};i.prototype.SetData=function(n){var t,r,u;n=n||{};t=this._type;typeof n.Type!="undefined"&&(t=n.Type==i.TYPE_ENDED?i.TYPE_ENDED:i.TYPE_ACTIVE);n.Id&&(r=this._GetMenu(t),u=r.GetItemByName(n.Id),u!==null&&r.SetSelectedItem(u));this._type=t;this._UpdateLabel()}}(jQuery);!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):n.moment=t()}(this,function(){"use strict";function t(){return kf.apply(null,arguments)}function rt(n){return n instanceof Array||"[object Array]"===Object.prototype.toString.call(n)}function ti(n){return null!=n&&"[object Object]"===Object.prototype.toString.call(n)}function s(n,t){return Object.prototype.hasOwnProperty.call(n,t)}function eu(n){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(n).length;for(var t in n)if(s(n,t))return;return 1}function k(n){return void 0===n}function at(n){return"number"==typeof n||"[object Number]"===Object.prototype.toString.call(n)}function yi(n){return n instanceof Date||"[object Date]"===Object.prototype.toString.call(n)}function gf(n,t){for(var r=[],i=0;i<n.length;++i)r.push(t(n[i],i));return r}function dt(n,t){for(var i in t)s(t,i)&&(n[i]=t[i]);return s(t,"toString")&&(n.toString=t.toString),s(t,"valueOf")&&(n.valueOf=t.valueOf),n}function ot(n,t,i,r){return io(n,t,i,r,!0).utc()}function u(n){return null==n._pf&&(n._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}),n._pf}function ou(n){if(null==n._isValid){var t=u(n),r=df.call(t.parsedDateParts,function(n){return null!=n}),i=!isNaN(n._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&r);if(n._strict&&(i=i&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(n))return i;n._isValid=i}return n._isValid}function ir(n){var t=ot(NaN);return null!=n?dt(u(t),n):u(t).userInvalidated=!0,t}function su(n,t){var i,r,f;if(k(t._isAMomentObject)||(n._isAMomentObject=t._isAMomentObject),k(t._i)||(n._i=t._i),k(t._f)||(n._f=t._f),k(t._l)||(n._l=t._l),k(t._strict)||(n._strict=t._strict),k(t._tzm)||(n._tzm=t._tzm),k(t._isUTC)||(n._isUTC=t._isUTC),k(t._offset)||(n._offset=t._offset),k(t._pf)||(n._pf=u(t)),k(t._locale)||(n._locale=t._locale),0<rr.length)for(i=0;i<rr.length;i++)k(f=t[r=rr[i]])||(n[r]=f);return n}function pi(n){su(this,n);this._d=new Date(null!=n._d?n._d.getTime():NaN);this.isValid()||(this._d=new Date(NaN));!1===ur&&(ur=!0,t.updateOffset(this),ur=!1)}function ut(n){return n instanceof pi||null!=n&&null!=n._isAMomentObject}function ne(n){!1===t.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+n)}function nt(n,i){var r=!0;return dt(function(){if(null!=t.deprecationHandler&&t.deprecationHandler(null,n),r){for(var u,e,o=[],f=0;f<arguments.length;f++){if(u="","object"==typeof arguments[f]){for(e in u+="\n["+f+"] ",arguments[0])s(arguments[0],e)&&(u+=e+": "+arguments[0][e]+", ");u=u.slice(0,-2)}else u=arguments[f];o.push(u)}ne(n+"\nArguments: "+Array.prototype.slice.call(o).join("")+"\n"+(new Error).stack);r=!1}return i.apply(this,arguments)},i)}function ie(n,i){null!=t.deprecationHandler&&t.deprecationHandler(n,i);hu[n]||(ne(i),hu[n]=!0)}function st(n){return"undefined"!=typeof Function&&n instanceof Function||"[object Function]"===Object.prototype.toString.call(n)}function cu(n,t){var i,r=dt({},n);for(i in t)s(t,i)&&(ti(n[i])&&ti(t[i])?(r[i]={},dt(r[i],n[i]),dt(r[i],t[i])):null!=t[i]?r[i]=t[i]:delete r[i]);for(i in n)s(n,i)&&!s(t,i)&&ti(n[i])&&(r[i]=dt({},r[i]));return r}function lu(n){null!=n&&this.set(n)}function ht(n,t,i){var r=""+Math.abs(n),u=t-r.length;return(0<=n?i?"+":"":"-")+Math.pow(10,Math.max(0,u)).toString().substr(1)+r}function r(n,t,i,r){var u="string"==typeof r?function(){return this[r]()}:r;n&&(fi[n]=u);t&&(fi[t[0]]=function(){return ht(u.apply(this,arguments),t[1],t[2])});i&&(fi[i]=function(){return this.localeData().ordinal(u.apply(this,arguments),n)})}function er(n,t){return n.isValid()?(t=re(t,n.localeData()),vu[t]=vu[t]||function(n){for(var r,t=n.match(au),i=0,u=t.length;i<u;i++)t[i]=fi[t[i]]?fi[t[i]]:(r=t[i]).match(/\[[\s\S]/)?r.replace(/^\[|\]$/g,""):r.replace(/\\/g,"");return function(i){for(var f="",r=0;r<u;r++)f+=st(t[r])?t[r].call(i,n):t[r];return f}}(t),vu[t](n)):n.localeData().invalidDate()}function re(n,t){function r(n){return t.longDateFormat(n)||n}var i=5;for(fr.lastIndex=0;0<=i&&fr.test(n);)n=n.replace(fr,r),fr.lastIndex=0,--i;return n}function p(n,t){var i=n.toLowerCase();ei[i]=ei[i+"s"]=ei[t]=n}function tt(n){if("string"==typeof n)return ei[n]||ei[n.toLowerCase()]}function yu(n){var i,t,r={};for(t in n)s(n,t)&&(i=tt(t))&&(r[i]=n[t]);return r}function w(n,t){pu[n]=t}function or(n){return n%4==0&&n%100!=0||n%400==0}function it(n){return n<0?Math.ceil(n)||0:Math.floor(n)}function f(n){var t=+n,i=0;return 0!=t&&isFinite(t)&&(i=it(t)),i}function oi(n,i){return function(r){return null!=r?(ue(this,n,r),t.updateOffset(this,i),this):sr(this,n)}}function sr(n,t){return n.isValid()?n._d["get"+(n._isUTC?"UTC":"")+t]():NaN}function ue(n,t,i){n.isValid()&&!isNaN(i)&&("FullYear"===t&&or(n.year())&&1===n.month()&&29===n.date()?(i=f(i),n._d["set"+(n._isUTC?"UTC":"")+t](i,n.month(),wr(i,n.month()))):n._d["set"+(n._isUTC?"UTC":"")+t](i))}function i(n,t,i){hr[n]=st(t)?t:function(n){return n&&i?i:t}}function ls(n,t){return s(hr,n)?hr[n](t._strict,t._locale):new RegExp(g(n.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(n,t,i,r,u){return t||i||r||u})))}function g(n){return n.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function h(n,t){var i,r=t;for("string"==typeof n&&(n=[n]),at(t)&&(r=function(n,i){i[t]=f(n)}),i=0;i<n.length;i++)pr[n[i]]=r}function bi(n,t){h(n,function(n,i,r,u){r._w=r._w||{};t(n,r._w,r,u)})}function wr(n,t){if(isNaN(n)||isNaN(t))return NaN;var i,r=(t%(i=12)+i)%i;return n+=(t-r)/12,1==r?or(n)?29:28:31-r%7%2}function le(n,t){var i;if(!n.isValid())return n;if("string"==typeof t)if(/^\d+$/.test(t))t=f(t);else if(!at(t=n.localeData().monthsParse(t)))return n;return i=Math.min(n.date(),wr(n.year(),t)),n._d["set"+(n._isUTC?"UTC":"")+"Month"](t,i),n}function ae(n){return null!=n?(le(this,n),t.updateOffset(this,!0),this):sr(this,"Month")}function ve(){function f(n,t){return t.length-n.length}for(var i,r=[],u=[],t=[],n=0;n<12;n++)i=ot([2e3,n]),r.push(this.monthsShort(i,"")),u.push(this.months(i,"")),t.push(this.months(i,"")),t.push(this.monthsShort(i,""));for(r.sort(f),u.sort(f),t.sort(f),n=0;n<12;n++)r[n]=g(r[n]),u[n]=g(u[n]);for(n=0;n<24;n++)t[n]=g(t[n]);this._monthsRegex=new RegExp("^("+t.join("|")+")","i");this._monthsShortRegex=this._monthsRegex;this._monthsStrictRegex=new RegExp("^("+u.join("|")+")","i");this._monthsShortStrictRegex=new RegExp("^("+r.join("|")+")","i")}function ki(n){return or(n)?366:365}function di(n){var t,i;return n<100&&0<=n?((i=Array.prototype.slice.call(arguments))[0]=n+400,t=new Date(Date.UTC.apply(null,i)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(n)):t=new Date(Date.UTC.apply(null,arguments)),t}function br(n,t,i){var r=7+t-i;return r-(7+di(n,0,r).getUTCDay()-t)%7-1}function ye(n,t,i,r,u){var e,f=1+7*(t-1)+(7+i-r)%7+br(n,r,u),o=f<=0?ki(e=n-1)+f:f>ki(n)?(e=n+1,f-ki(n)):(e=n,f);return{year:e,dayOfYear:o}}function gi(n,t,i){var u,f,e=br(n.year(),t,i),r=Math.floor((n.dayOfYear()-e-1)/7)+1;return r<1?u=r+pt(f=n.year()-1,t,i):r>pt(n.year(),t,i)?(u=r-pt(n.year(),t,i),f=n.year()+1):(f=n.year(),u=r),{week:u,year:f}}function pt(n,t,i){var r=br(n,t,i),u=br(n+1,t,i);return(ki(n)-r+u)/7}function du(n,t){return n.slice(t,7).concat(n.slice(0,t))}function gu(){function t(n,t){return t.length-n.length}for(var i,r,u,f,e=[],o=[],s=[],n=[],h=0;h<7;h++)i=ot([2e3,1]).day(h),r=g(this.weekdaysMin(i,"")),u=g(this.weekdaysShort(i,"")),f=g(this.weekdays(i,"")),e.push(r),o.push(u),s.push(f),n.push(r),n.push(u),n.push(f);e.sort(t);o.sort(t);s.sort(t);n.sort(t);this._weekdaysRegex=new RegExp("^("+n.join("|")+")","i");this._weekdaysShortRegex=this._weekdaysRegex;this._weekdaysMinRegex=this._weekdaysRegex;this._weekdaysStrictRegex=new RegExp("^("+s.join("|")+")","i");this._weekdaysShortStrictRegex=new RegExp("^("+o.join("|")+")","i");this._weekdaysMinStrictRegex=new RegExp("^("+e.join("|")+")","i")}function nf(){return this.hours()%12||12}function we(n,t){r(n,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function be(n,t){return t._meridiemParse}function de(n){return n?n.toLowerCase().replace("_","-"):n}function ih(n){for(var t,i,f,u,r=0;r<n.length;){for(t=(u=de(n[r]).split("-")).length,i=(i=de(n[r+1]))?i.split("-"):null;0<t;){if(f=kr(u.slice(0,t).join("-")))return f;if(i&&i.length>=t&&function(n,t){for(var r=Math.min(n.length,t.length),i=0;i<r;i+=1)if(n[i]!==t[i])return i;return r}(u,i)>=t-1)break;t--}r++}return nr}function kr(n){var t;if(void 0===a[n]&&"undefined"!=typeof module&&module&&module.exports)try{t=nr._abbr;require("./locale/"+n);gt(t)}catch(t){a[n]=null}return a[n]}function gt(n,t){var i;return n&&((i=k(t)?wt(n):tf(n,t))?nr=i:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+n+" not found. Did you forget to load it?")),nr._abbr}function tf(n,t){if(null===t)return delete a[n],null;var r,i=ke;if(t.abbr=n,null!=a[n])ie("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),i=a[n]._config;else if(null!=t.parentLocale)if(null!=a[t.parentLocale])i=a[t.parentLocale]._config;else{if(null==(r=kr(t.parentLocale)))return tr[t.parentLocale]||(tr[t.parentLocale]=[]),tr[t.parentLocale].push({name:n,config:t}),null;i=r._config}return a[n]=new lu(cu(i,t)),tr[n]&&tr[n].forEach(function(n){tf(n.name,n.config)}),gt(n),a[n]}function wt(n){var t;if(n&&n._locale&&n._locale._abbr&&(n=n._locale._abbr),!n)return nr;if(!rt(n)){if(t=kr(n))return t;n=[n]}return ih(n)}function rf(n){var i,t=n._a;return t&&-2===u(n).overflow&&(i=t[vt]<0||11<t[vt]?vt:t[ct]<1||t[ct]>wr(t[b],t[vt])?ct:t[y]<0||24<t[y]||24===t[y]&&(0!==t[ft]||0!==t[yt]||0!==t[ii])?y:t[ft]<0||59<t[ft]?ft:t[yt]<0||59<t[yt]?yt:t[ii]<0||999<t[ii]?ii:-1,u(n)._overflowDayOfYear&&(i<b||ct<i)&&(i=ct),u(n)._overflowWeeks&&-1===i&&(i=as),u(n)._overflowWeekday&&-1===i&&(i=vs),u(n).overflow=i),n}function ge(n){var t,r,o,e,f,s,h=n._i,i=rh.exec(h)||uh.exec(h);if(i){for(u(n).iso=!0,t=0,r=dr.length;t<r;t++)if(dr[t][1].exec(i[1])){e=dr[t][0];o=!1!==dr[t][2];break}if(null==e)return void(n._isValid=!1);if(i[3]){for(t=0,r=uf.length;t<r;t++)if(uf[t][1].exec(i[3])){f=(i[2]||" ")+uf[t][0];break}if(null==f)return void(n._isValid=!1)}if(!o&&null!=f)return void(n._isValid=!1);if(i[4]){if(!fh.exec(i[4]))return void(n._isValid=!1);s="Z"}n._f=e+(f||"")+(s||"");ef(n)}else n._isValid=!1}function hh(n,t,i,r,u,f){var e=[function(n){var t=parseInt(n,10);return t<=49?2e3+t:t<=999?1900+t:t}(n),he.indexOf(t),parseInt(i,10),parseInt(r,10),parseInt(u,10)];return f&&e.push(parseInt(f,10)),e}function no(n){var r,f,i,e,t=oh.exec(n._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(t){if(r=hh(t[4],t[3],t[2],t[5],t[6],t[7]),f=t[1],i=r,e=n,f&&pe.indexOf(f)!==new Date(i[0],i[1],i[2]).getDay()&&(u(e).weekdayMismatch=!0,!void(e._isValid=!1)))return;n._a=r;n._tzm=function(n,t,i){if(n)return sh[n];if(t)return 0;var r=parseInt(i,10),u=r%100;return 60*((r-u)/100)+u}(t[8],t[9],t[10]);n._d=di.apply(null,n._a);n._d.setUTCMinutes(n._d.getUTCMinutes()-n._tzm);u(n).rfc2822=!0}else n._isValid=!1}function hi(n,t,i){return null!=n?n:null!=t?t:i}function ff(n){var i,f,e,h,o,c,r,s=[];if(!n._d){for(c=n,r=new Date(t.now()),e=c._useUTC?[r.getUTCFullYear(),r.getUTCMonth(),r.getUTCDate()]:[r.getFullYear(),r.getMonth(),r.getDate()],n._w&&null==n._a[ct]&&null==n._a[vt]&&function(n){var t,o,f,i,r,e,h,s,c;null!=(t=n._w).GG||null!=t.W||null!=t.E?(r=1,e=4,o=hi(t.GG,n._a[b],gi(l(),1,4).year),f=hi(t.W,1),((i=hi(t.E,1))<1||7<i)&&(s=!0)):(r=n._locale._week.dow,e=n._locale._week.doy,c=gi(l(),r,e),o=hi(t.gg,n._a[b],c.year),f=hi(t.w,c.week),null!=t.d?((i=t.d)<0||6<i)&&(s=!0):null!=t.e?(i=t.e+r,(t.e<0||6<t.e)&&(s=!0)):i=r);f<1||f>pt(o,r,e)?u(n)._overflowWeeks=!0:null!=s?u(n)._overflowWeekday=!0:(h=ye(o,f,i,r,e),n._a[b]=h.year,n._dayOfYear=h.dayOfYear)}(n),null!=n._dayOfYear&&(o=hi(n._a[b],e[b]),(n._dayOfYear>ki(o)||0===n._dayOfYear)&&(u(n)._overflowDayOfYear=!0),f=di(o,0,n._dayOfYear),n._a[vt]=f.getUTCMonth(),n._a[ct]=f.getUTCDate()),i=0;i<3&&null==n._a[i];++i)n._a[i]=s[i]=e[i];for(;i<7;i++)n._a[i]=s[i]=null==n._a[i]?2===i?1:0:n._a[i];24===n._a[y]&&0===n._a[ft]&&0===n._a[yt]&&0===n._a[ii]&&(n._nextDay=!0,n._a[y]=0);n._d=(n._useUTC?di:function(n,t,i,r,u,f,e){var o;return n<100&&0<=n?(o=new Date(n+400,t,i,r,u,f,e),isFinite(o.getFullYear())&&o.setFullYear(n)):o=new Date(n,t,i,r,u,f,e),o}).apply(null,s);h=n._useUTC?n._d.getUTCDay():n._d.getDay();null!=n._tzm&&n._d.setUTCMinutes(n._d.getUTCMinutes()-n._tzm);n._nextDay&&(n._a[y]=24);n._w&&void 0!==n._w.d&&n._w.d!==h&&(u(n).weekdayMismatch=!0)}}function ef(n){if(n._f!==t.ISO_8601)if(n._f!==t.RFC_2822){n._a=[];u(n).empty=!0;for(var r,f,c,l,e,a,o,i=""+n._i,w=i.length,v=0,p=re(n._f,n._locale).match(au)||[],h=0;h<p.length;h++)f=p[h],(r=(i.match(ls(f,n))||[])[0])&&(0<(c=i.substr(0,i.indexOf(r))).length&&u(n).unusedInput.push(c),i=i.slice(i.indexOf(r)+r.length),v+=r.length),fi[f]?(r?u(n).empty=!1:u(n).unusedTokens.push(f),e=f,o=n,null!=(a=r)&&s(pr,e)&&pr[e](a,o._a,o,e)):n._strict&&!r&&u(n).unusedTokens.push(f);u(n).charsLeftOver=w-v;0<i.length&&u(n).unusedInput.push(i);n._a[y]<=12&&!0===u(n).bigHour&&0<n._a[y]&&(u(n).bigHour=void 0);u(n).parsedDateParts=n._a.slice(0);u(n).meridiem=n._meridiem;n._a[y]=function(n,t,i){var r;return null==i?t:null!=n.meridiemHour?n.meridiemHour(t,i):(null!=n.isPM&&((r=n.isPM(i))&&t<12&&(t+=12),r||12!==t||(t=0)),t)}(n._locale,n._a[y],n._meridiem);null!==(l=u(n).era)&&(n._a[b]=n._locale.erasConvertYear(l,n._a[b]));ff(n);rf(n)}else no(n);else ge(n)}function to(n){var i,r,f=n._i,e=n._f;return n._locale=n._locale||wt(n._l),null===f||void 0===e&&""===f?ir({nullInput:!0}):("string"==typeof f&&(n._i=f=n._locale.preparse(f)),ut(f)?new pi(rf(f)):(yi(f)?n._d=f:rt(e)?function(n){var t,o,r,f,i,e,s=!1;if(0===n._f.length)return u(n).invalidFormat=!0,n._d=new Date(NaN);for(f=0;f<n._f.length;f++)i=0,e=!1,t=su({},n),null!=n._useUTC&&(t._useUTC=n._useUTC),t._f=n._f[f],ef(t),ou(t)&&(e=!0),i+=u(t).charsLeftOver,i+=10*u(t).unusedTokens.length,u(t).score=i,s?i<r&&(r=i,o=t):(null==r||i<r||e)&&(r=i,o=t,e&&(s=!0));dt(n,o||t)}(n):e?ef(n):k(r=(i=n)._i)?i._d=new Date(t.now()):yi(r)?i._d=new Date(r.valueOf()):"string"==typeof r?function(n){var i=eh.exec(n._i);null===i?(ge(n),!1===n._isValid&&(delete n._isValid,no(n),!1===n._isValid&&(delete n._isValid,n._strict?n._isValid=!1:t.createFromInputFallback(n)))):n._d=new Date(+i[1])}(i):rt(r)?(i._a=gf(r.slice(0),function(n){return parseInt(n,10)}),ff(i)):ti(r)?function(n){var t,i;n._d||(i=void 0===(t=yu(n._i)).day?t.date:t.day,n._a=gf([t.year,t.month,i,t.hour,t.minute,t.second,t.millisecond],function(n){return n&&parseInt(n,10)}),ff(n))}(i):at(r)?i._d=new Date(r):t.createFromInputFallback(i),ou(n)||(n._d=null),n))}function io(n,t,i,r,u){var e,f={};return!0!==t&&!1!==t||(r=t,t=void 0),!0!==i&&!1!==i||(r=i,i=void 0),(ti(n)&&eu(n)||rt(n)&&0===n.length)&&(n=void 0),f._isAMomentObject=!0,f._useUTC=f._isUTC=u,f._l=i,f._i=n,f._f=t,f._strict=r,(e=new pi(rf(to(f))))._nextDay&&(e.add(1,"d"),e._nextDay=void 0),e}function l(n,t,i,r){return io(n,t,i,r,!1)}function fo(n,t){var r,i;if(1===t.length&&rt(t[0])&&(t=t[0]),!t.length)return l();for(r=t[0],i=1;i<t.length;++i)t[i].isValid()&&!t[i][n](r)||(r=t[i]);return r}function gr(n){var t=yu(n),i=t.year||0,r=t.quarter||0,u=t.month||0,e=t.week||t.isoWeek||0,o=t.day||0,h=t.hour||0,c=t.minute||0,l=t.second||0,a=t.millisecond||0;this._isValid=function(n){var i,t,r=!1;for(i in n)if(s(n,i)&&(-1===v.call(ci,i)||null!=n[i]&&isNaN(n[i])))return!1;for(t=0;t<ci.length;++t)if(n[ci[t]]){if(r)return!1;parseFloat(n[ci[t]])!==f(n[ci[t]])&&(r=!0)}return!0}(t);this._milliseconds=+a+1e3*l+6e4*c+36e5*h;this._days=+o+7*e;this._months=+u+3*r+12*i;this._data={};this._locale=wt();this._bubble()}function nu(n){return n instanceof gr}function of(n){return n<0?-1*Math.round(-1*n):Math.round(n)}function eo(n,t){r(n,0,0,function(){var n=this.utcOffset(),i="+";return n<0&&(n=-n,i="-"),i+ht(~~(n/60),2)+t+ht(~~n%60,2)})}function sf(n,t){var i,r,u=(t||"").match(n);return null===u?null:0===(r=60*(i=((u[u.length-1]||[])+"").match(oo)||["-",0,0])[1]+f(i[2]))?0:"+"===i[0]?r:-r}function hf(n,i){var r,u;return i._isUTC?(r=i.clone(),u=(ut(n)||yi(n)?n.valueOf():l(n).valueOf())-r.valueOf(),r._d.setTime(r._d.valueOf()+u),t.updateOffset(r,!1),r):l(n).local()}function cf(n){return-Math.round(n._d.getTimezoneOffset())}function so(){return!!this.isValid()&&this._isUTC&&0===this._offset}function et(n,t){var u,e,o,i=n,r=null;return nu(n)?i={ms:n._milliseconds,d:n._days,M:n._months}:at(n)||!isNaN(+n)?(i={},t?i[t]=+n:i.milliseconds=+n):(r=ho.exec(n))?(u="-"===r[1]?-1:1,i={y:0,d:f(r[ct])*u,h:f(r[y])*u,m:f(r[ft])*u,s:f(r[yt])*u,ms:f(of(1e3*r[ii]))*u}):(r=co.exec(n))?(u="-"===r[1]?-1:1,i={y:ri(r[2],u),M:ri(r[3],u),w:ri(r[4],u),d:ri(r[5],u),h:ri(r[6],u),m:ri(r[7],u),s:ri(r[8],u)}):null==i?i={}:"object"==typeof i&&("from"in i||"to"in i)&&(o=function(n,t){var i;return!n.isValid()||!t.isValid()?{milliseconds:0,months:0}:(t=hf(t,n),n.isBefore(t)?i=lo(n,t):((i=lo(t,n)).milliseconds=-i.milliseconds,i.months=-i.months),i)}(l(i.from),l(i.to)),(i={}).ms=o.milliseconds,i.M=o.months),e=new gr(i),nu(n)&&s(n,"_locale")&&(e._locale=n._locale),nu(n)&&s(n,"_isValid")&&(e._isValid=n._isValid),e}function ri(n,t){var i=n&&parseFloat(n.replace(",","."));return(isNaN(i)?0:i)*t}function lo(n,t){var i={};return i.months=t.month()-n.month()+12*(t.year()-n.year()),n.clone().add(i.months,"M").isAfter(t)&&--i.months,i.milliseconds=t-n.clone().add(i.months,"M"),i}function ao(n,t){return function(i,r){var u;return null===r||isNaN(+r)||(ie(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),u=i,i=r,r=u),vo(this,et(i,r),n),this}}function vo(n,i,r,u){var o=i._milliseconds,f=of(i._days),e=of(i._months);n.isValid()&&(u=null==u||u,e&&le(n,sr(n,"Month")+e*r),f&&ue(n,"Date",sr(n,"Date")+f*r),o&&n._d.setTime(n._d.valueOf()+o*r),u&&t.updateOffset(n,f||e))}function wo(n){return"string"==typeof n||n instanceof String}function ch(n){return ut(n)||yi(n)||wo(n)||at(n)||function(n){var t=rt(n),i=!1;return t&&(i=0===n.filter(function(t){return!at(t)&&wo(n)}).length),t&&i}(n)||function(n){for(var r,f=ti(n)&&!eu(n),i=!1,u=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],t=0;t<u.length;t+=1)r=u[t],i=i||s(n,r);return f&&i}(n)||null==n}function tu(n,t){if(n.date()<t.date())return-tu(t,n);var r=12*(t.year()-n.year())+(t.month()-n.month()),i=n.clone().add(r,"months"),u=t-i<0?(t-i)/(i-n.clone().add(r-1,"months")):(t-i)/(n.clone().add(1+r,"months")-i);return-(r+u)||0}function bo(n){var t;return void 0===n?this._locale._abbr:(null!=(t=wt(n))&&(this._locale=t),this)}function ko(){return this._locale}function li(n,t){return(n%t+t)%t}function go(n,t,i){return n<100&&0<=n?new Date(n+400,t,i)-af:new Date(n,t,i).valueOf()}function ns(n,t,i){return n<100&&0<=n?Date.UTC(n+400,t,i)-af:Date.UTC(n,t,i)}function vf(n,t){return t.erasAbbrRegex(n)}function yf(){for(var r=[],u=[],f=[],i=[],t=this.eras(),n=0,e=t.length;n<e;++n)u.push(g(t[n].name)),r.push(g(t[n].abbr)),f.push(g(t[n].narrow)),i.push(g(t[n].name)),i.push(g(t[n].abbr)),i.push(g(t[n].narrow));this._erasRegex=new RegExp("^("+i.join("|")+")","i");this._erasNameRegex=new RegExp("^("+u.join("|")+")","i");this._erasAbbrRegex=new RegExp("^("+r.join("|")+")","i");this._erasNarrowRegex=new RegExp("^("+f.join("|")+")","i")}function iu(n,t){r(0,[n,n.length],0,t)}function ts(n,t,i,r,u){var f;return null==n?gi(this,r,u).year:((f=pt(n,r,u))<t&&(t=f),function(n,t,i,r,u){var e=ye(n,t,i,r,u),f=di(e.year,0,e.dayOfYear);return this.year(f.getUTCFullYear()),this.month(f.getUTCMonth()),this.date(f.getUTCDate()),this}.call(this,n,t,i,r,u))}function lh(n,t){t[ii]=f(1e3*("0."+n))}function fs(n){return n}function ru(n,t,i,r){var u=wt(),f=ot().set(r,t);return u[i](f,n)}function es(n,t,i){if(at(n)&&(t=n,n=void 0),n=n||"",null!=t)return ru(n,t,i,"month");for(var u=[],r=0;r<12;r++)u[r]=ru(n,r,i,"month");return u}function wf(n,t,i,r){t=("boolean"==typeof n?at(t)&&(i=t,t=void 0):(t=n,n=!1,at(i=t)&&(i=t,t=void 0)),t||"");var u,o=wt(),f=n?o._week.dow:0,e=[];if(null!=i)return ru(t,(i+f)%7,r,"day");for(u=0;u<7;u++)e[u]=ru(t,(u+f)%7,r,"day");return e}function os(n,t,i,r){var u=et(t,i);return n._milliseconds+=r*u._milliseconds,n._days+=r*u._days,n._months+=r*u._months,n._bubble()}function ss(n){return n<0?Math.floor(n):Math.ceil(n)}function hs(n){return 4800*n/146097}function bf(n){return 146097*n/4800}function bt(n){return function(){return this.as(n)}}function ui(n){return function(){return this.isValid()?this._data[n]:NaN}}function oc(n,t,i,r){var u=et(n).abs(),e=kt(u.as("s")),o=kt(u.as("m")),s=kt(u.as("h")),h=kt(u.as("d")),c=kt(u.as("M")),l=kt(u.as("w")),a=kt(u.as("y")),f=(e<=i.ss?["s",e]:e<i.s&&["ss",e])||o<=1&&["m"]||o<i.m&&["mm",o]||s<=1&&["h"]||s<i.h&&["hh",s]||h<=1&&["d"]||h<i.d&&["dd",h];return null!=i.w&&(f=f||l<=1&&["w"]||l<i.w&&["ww",l]),(f=f||c<=1&&["M"]||c<i.M&&["MM",c]||a<=1&&["y"]||["yy",a])[2]=t,f[3]=0<+n,f[4]=r,function(n,t,i,r,u){return u.relativeTime(t||1,!!i,n,r)}.apply(null,f)}function vi(n){return(0<n)-(n<0)||+n}function fu(){if(!this.isValid())return this.localeData().invalidDate();var n,r,e,s,h,o,c,u,t=uu(this._milliseconds)/1e3,l=uu(this._days),f=uu(this._months),i=this.asSeconds();return i?(n=it(t/60),r=it(n/60),t%=60,n%=60,e=it(f/12),f%=12,s=t?t.toFixed(3).replace(/\.?0+$/,""):"",h=i<0?"-":"",o=vi(this._months)!==vi(i)?"-":"",c=vi(this._days)!==vi(i)?"-":"",u=vi(this._milliseconds)!==vi(i)?"-":"",h+"P"+(e?o+e+"Y":"")+(f?o+f+"M":"")+(l?c+l+"D":"")+(r||n||t?"T":"")+(r?u+r+"H":"")+(n?u+n+"M":"")+(t?u+s+"S":"")):"P0D"}var kf,df,rr,ur,te,hu,ei,pu,pr,ku,ro,uo,ci,oo,ho,co,yo,po,lf,af,pf,is,ni,rs,us,n,o,lt,uu,e;df=Array.prototype.some?Array.prototype.some:function(n){for(var i=Object(this),r=i.length>>>0,t=0;t<r;t++)if(t in i&&n.call(this,i[t],t,i))return!0;return!1};rr=t.momentProperties=[];ur=!1;hu={};t.suppressDeprecationWarnings=!1;t.deprecationHandler=null;te=Object.keys?Object.keys:function(n){var t,i=[];for(t in n)s(n,t)&&i.push(t);return i};var au=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,fr=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,vu={},fi={};ei={};pu={};var hr,fe=/\d/,d=/\d\d/,ee=/\d{3}/,wu=/\d{4}/,cr=/[+-]?\d{6}/,c=/\d\d?/,oe=/\d\d\d\d?/,se=/\d\d\d\d\d\d?/,lr=/\d{1,3}/,bu=/\d{1,4}/,ar=/[+-]?\d{1,6}/,si=/\d+/,vr=/[+-]?\d+/,cs=/Z|[+-]\d\d:?\d\d/gi,yr=/Z|[+-]\d\d(?::?\d\d)?/gi,wi=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;hr={};pr={};var v,b=0,vt=1,ct=2,y=3,ft=4,yt=5,ii=6,as=7,vs=8;v=Array.prototype.indexOf?Array.prototype.indexOf:function(n){for(var t=0;t<this.length;++t)if(this[t]===n)return t;return-1};r("M",["MM",2],"Mo",function(){return this.month()+1});r("MMM",0,0,function(n){return this.localeData().monthsShort(this,n)});r("MMMM",0,0,function(n){return this.localeData().months(this,n)});p("month","M");w("month",8);i("M",c);i("MM",c,d);i("MMM",function(n,t){return t.monthsShortRegex(n)});i("MMMM",function(n,t){return t.monthsRegex(n)});h(["M","MM"],function(n,t){t[vt]=f(n)-1});h(["MMM","MMMM"],function(n,t,i,r){var f=i._locale.monthsParse(n,r,i._strict);null!=f?t[vt]=f:u(i).invalidMonth=n});var ys="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),he="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),ce=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,ps=wi,ws=wi;r("Y",0,0,function(){var n=this.year();return n<=9999?ht(n,4):"+"+n});r(0,["YY",2],0,function(){return this.year()%100});r(0,["YYYY",4],0,"year");r(0,["YYYYY",5],0,"year");r(0,["YYYYYY",6,!0],0,"year");p("year","y");w("year",1);i("Y",vr);i("YY",c,d);i("YYYY",bu,wu);i("YYYYY",ar,cr);i("YYYYYY",ar,cr);h(["YYYYY","YYYYYY"],b);h("YYYY",function(n,i){i[b]=2===n.length?t.parseTwoDigitYear(n):f(n)});h("YY",function(n,i){i[b]=t.parseTwoDigitYear(n)});h("Y",function(n,t){t[b]=parseInt(n,10)});t.parseTwoDigitYear=function(n){return f(n)+(68<f(n)?1900:2e3)};ku=oi("FullYear",!0);r("w",["ww",2],"wo","week");r("W",["WW",2],"Wo","isoWeek");p("week","w");p("isoWeek","W");w("week",5);w("isoWeek",5);i("w",c);i("ww",c,d);i("W",c);i("WW",c,d);bi(["w","ww","W","WW"],function(n,t,i,r){t[r.substr(0,1)]=f(n)});r("d",0,"do","day");r("dd",0,0,function(n){return this.localeData().weekdaysMin(this,n)});r("ddd",0,0,function(n){return this.localeData().weekdaysShort(this,n)});r("dddd",0,0,function(n){return this.localeData().weekdays(this,n)});r("e",0,0,"weekday");r("E",0,0,"isoWeekday");p("day","d");p("weekday","e");p("isoWeekday","E");w("day",11);w("weekday",11);w("isoWeekday",11);i("d",c);i("e",c);i("E",c);i("dd",function(n,t){return t.weekdaysMinRegex(n)});i("ddd",function(n,t){return t.weekdaysShortRegex(n)});i("dddd",function(n,t){return t.weekdaysRegex(n)});bi(["dd","ddd","dddd"],function(n,t,i,r){var f=i._locale.weekdaysParse(n,r,i._strict);null!=f?t.d=f:u(i).invalidWeekday=n});bi(["d","e","E"],function(n,t,i,r){t[r]=f(n)});var bs="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),pe="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),ks="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),ds=wi,gs=wi,nh=wi;r("H",["HH",2],0,"hour");r("h",["hh",2],0,nf);r("k",["kk",2],0,function(){return this.hours()||24});r("hmm",0,0,function(){return""+nf.apply(this)+ht(this.minutes(),2)});r("hmmss",0,0,function(){return""+nf.apply(this)+ht(this.minutes(),2)+ht(this.seconds(),2)});r("Hmm",0,0,function(){return""+this.hours()+ht(this.minutes(),2)});r("Hmmss",0,0,function(){return""+this.hours()+ht(this.minutes(),2)+ht(this.seconds(),2)});we("a",!0);we("A",!1);p("hour","h");w("hour",13);i("a",be);i("A",be);i("H",c);i("h",c);i("k",c);i("HH",c,d);i("hh",c,d);i("kk",c,d);i("hmm",oe);i("hmmss",se);i("Hmm",oe);i("Hmmss",se);h(["H","HH"],y);h(["k","kk"],function(n,t){var i=f(n);t[y]=24===i?0:i});h(["a","A"],function(n,t,i){i._isPm=i._locale.isPM(n);i._meridiem=n});h(["h","hh"],function(n,t,i){t[y]=f(n);u(i).bigHour=!0});h("hmm",function(n,t,i){var r=n.length-2;t[y]=f(n.substr(0,r));t[ft]=f(n.substr(r));u(i).bigHour=!0});h("hmmss",function(n,t,i){var r=n.length-4,e=n.length-2;t[y]=f(n.substr(0,r));t[ft]=f(n.substr(r,2));t[yt]=f(n.substr(e));u(i).bigHour=!0});h("Hmm",function(n,t){var i=n.length-2;t[y]=f(n.substr(0,i));t[ft]=f(n.substr(i))});h("Hmmss",function(n,t){var i=n.length-4,r=n.length-2;t[y]=f(n.substr(0,i));t[ft]=f(n.substr(i,2));t[yt]=f(n.substr(r))});var th=oi("Hours",!0),nr,ke={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:ys,monthsShort:he,week:{dow:0,doy:6},weekdays:bs,weekdaysMin:ks,weekdaysShort:pe,meridiemParse:/[ap]\.?m?\.?/i},a={},tr={};var rh=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,uh=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,fh=/Z|[+-]\d\d(?::?\d\d)?/,dr=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],uf=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],eh=/^\/?Date\((-?\d+)/i,oh=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,sh={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};for(t.createFromInputFallback=nt("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(n){n._d=new Date(n._i+(n._useUTC?" UTC":""))}),t.ISO_8601=function(){},t.RFC_2822=function(){},ro=nt("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var n=l.apply(null,arguments);return this.isValid()&&n.isValid()?n<this?this:n:ir()}),uo=nt("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var n=l.apply(null,arguments);return this.isValid()&&n.isValid()?this<n?this:n:ir()}),ci=["year","quarter","month","week","day","hour","minute","second","millisecond"],eo("Z",":"),eo("ZZ",""),i("Z",yr),i("ZZ",yr),h(["Z","ZZ"],function(n,t,i){i._useUTC=!0;i._tzm=sf(yr,n)}),oo=/([\+\-]|\d\d)/gi,t.updateOffset=function(){},ho=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,co=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,et.fn=gr.prototype,et.invalid=function(){return et(NaN)},yo=ao(1,"add"),po=ao(-1,"subtract"),t.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",t.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]",lf=nt("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(n){return void 0===n?this.localeData():this.locale(n)}),af=126227808e5,r("N",0,0,"eraAbbr"),r("NN",0,0,"eraAbbr"),r("NNN",0,0,"eraAbbr"),r("NNNN",0,0,"eraName"),r("NNNNN",0,0,"eraNarrow"),r("y",["y",1],"yo","eraYear"),r("y",["yy",2],0,"eraYear"),r("y",["yyy",3],0,"eraYear"),r("y",["yyyy",4],0,"eraYear"),i("N",vf),i("NN",vf),i("NNN",vf),i("NNNN",function(n,t){return t.erasNameRegex(n)}),i("NNNNN",function(n,t){return t.erasNarrowRegex(n)}),h(["N","NN","NNN","NNNN","NNNNN"],function(n,t,i,r){var f=i._locale.erasParse(n,r,i._strict);f?u(i).era=f:u(i).invalidEra=n}),i("y",si),i("yy",si),i("yyy",si),i("yyyy",si),i("yo",function(n,t){return t._eraYearOrdinalRegex||si}),h(["y","yy","yyy","yyyy"],b),h(["yo"],function(n,t,i){var r;i._locale._eraYearOrdinalRegex&&(r=n.match(i._locale._eraYearOrdinalRegex));t[b]=i._locale.eraYearOrdinalParse?i._locale.eraYearOrdinalParse(n,r):parseInt(n,10)}),r(0,["gg",2],0,function(){return this.weekYear()%100}),r(0,["GG",2],0,function(){return this.isoWeekYear()%100}),iu("gggg","weekYear"),iu("ggggg","weekYear"),iu("GGGG","isoWeekYear"),iu("GGGGG","isoWeekYear"),p("weekYear","gg"),p("isoWeekYear","GG"),w("weekYear",1),w("isoWeekYear",1),i("G",vr),i("g",vr),i("GG",c,d),i("gg",c,d),i("GGGG",bu,wu),i("gggg",bu,wu),i("GGGGG",ar,cr),i("ggggg",ar,cr),bi(["gggg","ggggg","GGGG","GGGGG"],function(n,t,i,r){t[r.substr(0,2)]=f(n)}),bi(["gg","GG"],function(n,i,r,u){i[u]=t.parseTwoDigitYear(n)}),r("Q",0,"Qo","quarter"),p("quarter","Q"),w("quarter",7),i("Q",fe),h("Q",function(n,t){t[vt]=3*(f(n)-1)}),r("D",["DD",2],"Do","date"),p("date","D"),w("date",9),i("D",c),i("DD",c,d),i("Do",function(n,t){return n?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),h(["D","DD"],ct),h("Do",function(n,t){t[ct]=f(n.match(c)[0])}),pf=oi("Date",!0),r("DDD",["DDDD",3],"DDDo","dayOfYear"),p("dayOfYear","DDD"),w("dayOfYear",4),i("DDD",lr),i("DDDD",ee),h(["DDD","DDDD"],function(n,t,i){i._dayOfYear=f(n)}),r("m",["mm",2],0,"minute"),p("minute","m"),w("minute",14),i("m",c),i("mm",c,d),h(["m","mm"],ft),is=oi("Minutes",!1),r("s",["ss",2],0,"second"),p("second","s"),w("second",15),i("s",c),i("ss",c,d),h(["s","ss"],yt),us=oi("Seconds",!1),r("S",0,0,function(){return~~(this.millisecond()/100)}),r(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),r(0,["SSS",3],0,"millisecond"),r(0,["SSSS",4],0,function(){return 10*this.millisecond()}),r(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),r(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),r(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),r(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),r(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),p("millisecond","ms"),w("millisecond",16),i("S",lr,fe),i("SS",lr,d),i("SSS",lr,ee),ni="SSSS";ni.length<=9;ni+="S")i(ni,si);for(ni="S";ni.length<=9;ni+="S")h(ni,lh);rs=oi("Milliseconds",!1);r("z",0,0,"zoneAbbr");r("zz",0,0,"zoneName");n=pi.prototype;n.add=yo;n.calendar=function(n,i){1===arguments.length&&(arguments[0]?ch(arguments[0])?(n=arguments[0],i=void 0):function(n){for(var u=ti(n)&&!eu(n),t=!1,r=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],i=0;i<r.length;i+=1)t=t||s(n,r[i]);return u&&t}(arguments[0])&&(i=arguments[0],n=void 0):i=n=void 0);var u=n||l(),f=hf(u,this).startOf("day"),r=t.calendarFormat(this,f)||"sameElse",e=i&&(st(i[r])?i[r].call(this,u):i[r]);return this.format(e||this.localeData().calendar(r,this,l(u)))};n.clone=function(){return new pi(this)};n.diff=function(n,t,i){var r,f,u;if(!this.isValid())return NaN;if(!(r=hf(n,this)).isValid())return NaN;switch(f=6e4*(r.utcOffset()-this.utcOffset()),t=tt(t)){case"year":u=tu(this,r)/12;break;case"month":u=tu(this,r);break;case"quarter":u=tu(this,r)/3;break;case"second":u=(this-r)/1e3;break;case"minute":u=(this-r)/6e4;break;case"hour":u=(this-r)/36e5;break;case"day":u=(this-r-f)/864e5;break;case"week":u=(this-r-f)/6048e5;break;default:u=this-r}return i?u:it(u)};n.endOf=function(n){var i,r;if(void 0===(n=tt(n))||"millisecond"===n||!this.isValid())return this;switch(r=this._isUTC?ns:go,n){case"year":i=r(this.year()+1,0,1)-1;break;case"quarter":i=r(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":i=r(this.year(),this.month()+1,1)-1;break;case"week":i=r(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":i=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":i=r(this.year(),this.month(),this.date()+1)-1;break;case"hour":i=this._d.valueOf();i+=3599999-li(i+(this._isUTC?0:6e4*this.utcOffset()),36e5);break;case"minute":i=this._d.valueOf();i+=59999-li(i,6e4);break;case"second":i=this._d.valueOf();i+=999-li(i,1e3)}return this._d.setTime(i),t.updateOffset(this,!0),this};n.format=function(n){n=n||(this.isUtc()?t.defaultFormatUtc:t.defaultFormat);var i=er(this,n);return this.localeData().postformat(i)};n.from=function(n,t){return this.isValid()&&(ut(n)&&n.isValid()||l(n).isValid())?et({to:this,from:n}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()};n.fromNow=function(n){return this.from(l(),n)};n.to=function(n,t){return this.isValid()&&(ut(n)&&n.isValid()||l(n).isValid())?et({from:this,to:n}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()};n.toNow=function(n){return this.to(l(),n)};n.get=function(n){return st(this[n=tt(n)])?this[n]():this};n.invalidAt=function(){return u(this).overflow};n.isAfter=function(n,t){var i=ut(n)?n:l(n);return!(!this.isValid()||!i.isValid())&&("millisecond"===(t=tt(t)||"millisecond")?this.valueOf()>i.valueOf():i.valueOf()<this.clone().startOf(t).valueOf())};n.isBefore=function(n,t){var i=ut(n)?n:l(n);return!(!this.isValid()||!i.isValid())&&("millisecond"===(t=tt(t)||"millisecond")?this.valueOf()<i.valueOf():this.clone().endOf(t).valueOf()<i.valueOf())};n.isBetween=function(n,t,i,r){var u=ut(n)?n:l(n),f=ut(t)?t:l(t);return!!(this.isValid()&&u.isValid()&&f.isValid())&&("("===(r=r||"()")[0]?this.isAfter(u,i):!this.isBefore(u,i))&&(")"===r[1]?this.isBefore(f,i):!this.isAfter(f,i))};n.isSame=function(n,t){var i,r=ut(n)?n:l(n);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=tt(t)||"millisecond")?this.valueOf()===r.valueOf():(i=r.valueOf(),this.clone().startOf(t).valueOf()<=i&&i<=this.clone().endOf(t).valueOf()))};n.isSameOrAfter=function(n,t){return this.isSame(n,t)||this.isAfter(n,t)};n.isSameOrBefore=function(n,t){return this.isSame(n,t)||this.isBefore(n,t)};n.isValid=function(){return ou(this)};n.lang=lf;n.locale=bo;n.localeData=ko;n.max=uo;n.min=ro;n.parsingFlags=function(){return dt({},u(this))};n.set=function(n,t){if("object"==typeof n)for(var r=function(n){var t,i=[];for(t in n)s(n,t)&&i.push({unit:t,priority:pu[t]});return i.sort(function(n,t){return n.priority-t.priority}),i}(n=yu(n)),i=0;i<r.length;i++)this[r[i].unit](n[r[i].unit]);else if(st(this[n=tt(n)]))return this[n](t);return this};n.startOf=function(n){var i,r;if(void 0===(n=tt(n))||"millisecond"===n||!this.isValid())return this;switch(r=this._isUTC?ns:go,n){case"year":i=r(this.year(),0,1);break;case"quarter":i=r(this.year(),this.month()-this.month()%3,1);break;case"month":i=r(this.year(),this.month(),1);break;case"week":i=r(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":i=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":i=r(this.year(),this.month(),this.date());break;case"hour":i=this._d.valueOf();i-=li(i+(this._isUTC?0:6e4*this.utcOffset()),36e5);break;case"minute":i=this._d.valueOf();i-=li(i,6e4);break;case"second":i=this._d.valueOf();i-=li(i,1e3)}return this._d.setTime(i),t.updateOffset(this,!0),this};n.subtract=po;n.toArray=function(){var n=this;return[n.year(),n.month(),n.date(),n.hour(),n.minute(),n.second(),n.millisecond()]};n.toObject=function(){var n=this;return{years:n.year(),months:n.month(),date:n.date(),hours:n.hours(),minutes:n.minutes(),seconds:n.seconds(),milliseconds:n.milliseconds()}};n.toDate=function(){return new Date(this.valueOf())};n.toISOString=function(n){if(!this.isValid())return null;var i=!0!==n,t=i?this.clone().utc():this;return t.year()<0||9999<t.year()?er(t,i?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):st(Date.prototype.toISOString)?i?this.toDate().toISOString():new Date(this.valueOf()+6e4*this.utcOffset()).toISOString().replace("Z",er(t,"Z")):er(t,i?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")};n.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var n,t,i,r="moment",u="";return this.isLocal()||(r=0===this.utcOffset()?"moment.utc":"moment.parseZone",u="Z"),n="["+r+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i=u+'[")]',this.format(n+t+"-MM-DD[T]HH:mm:ss.SSS"+i)};"undefined"!=typeof Symbol&&null!=Symbol.for&&(n[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});n.toJSON=function(){return this.isValid()?this.toISOString():null};n.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")};n.unix=function(){return Math.floor(this.valueOf()/1e3)};n.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)};n.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}};n.eraName=function(){for(var i,t=this.localeData().eras(),n=0,r=t.length;n<r;++n)if((i=this.clone().startOf("day").valueOf(),t[n].since<=i&&i<=t[n].until)||t[n].until<=i&&i<=t[n].since)return t[n].name;return""};n.eraNarrow=function(){for(var i,t=this.localeData().eras(),n=0,r=t.length;n<r;++n)if((i=this.clone().startOf("day").valueOf(),t[n].since<=i&&i<=t[n].until)||t[n].until<=i&&i<=t[n].since)return t[n].narrow;return""};n.eraAbbr=function(){for(var i,t=this.localeData().eras(),n=0,r=t.length;n<r;++n)if((i=this.clone().startOf("day").valueOf(),t[n].since<=i&&i<=t[n].until)||t[n].until<=i&&i<=t[n].since)return t[n].abbr;return""};n.eraYear=function(){for(var u,r,i=this.localeData().eras(),n=0,f=i.length;n<f;++n)if(u=i[n].since<=i[n].until?1:-1,r=this.clone().startOf("day").valueOf(),i[n].since<=r&&r<=i[n].until||i[n].until<=r&&r<=i[n].since)return(this.year()-t(i[n].since).year())*u+i[n].offset;return this.year()};n.year=ku;n.isLeapYear=function(){return or(this.year())};n.weekYear=function(n){return ts.call(this,n,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)};n.isoWeekYear=function(n){return ts.call(this,n,this.isoWeek(),this.isoWeekday(),1,4)};n.quarter=n.quarters=function(n){return null==n?Math.ceil((this.month()+1)/3):this.month(3*(n-1)+this.month()%3)};n.month=ae;n.daysInMonth=function(){return wr(this.year(),this.month())};n.week=n.weeks=function(n){var t=this.localeData().week(this);return null==n?t:this.add(7*(n-t),"d")};n.isoWeek=n.isoWeeks=function(n){var t=gi(this,1,4).week;return null==n?t:this.add(7*(n-t),"d")};n.weeksInYear=function(){var n=this.localeData()._week;return pt(this.year(),n.dow,n.doy)};n.weeksInWeekYear=function(){var n=this.localeData()._week;return pt(this.weekYear(),n.dow,n.doy)};n.isoWeeksInYear=function(){return pt(this.year(),1,4)};n.isoWeeksInISOWeekYear=function(){return pt(this.isoWeekYear(),1,4)};n.date=pf;n.day=n.days=function(n){if(!this.isValid())return null!=n?this:NaN;var t,i,r=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=n?(t=n,i=this.localeData(),n="string"!=typeof t?t:isNaN(t)?"number"==typeof(t=i.weekdaysParse(t))?t:null:parseInt(t,10),this.add(n-r,"d")):r};n.weekday=function(n){if(!this.isValid())return null!=n?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==n?t:this.add(n-t,"d")};n.isoWeekday=function(n){if(!this.isValid())return null!=n?this:NaN;if(null==n)return this.day()||7;var t,i,r=(t=n,i=this.localeData(),"string"==typeof t?i.weekdaysParse(t)%7||7:isNaN(t)?null:t);return this.day(this.day()%7?r:r-7)};n.dayOfYear=function(n){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==n?t:this.add(n-t,"d")};n.hour=n.hours=th;n.minute=n.minutes=is;n.second=n.seconds=us;n.millisecond=n.milliseconds=rs;n.utcOffset=function(n,i,r){var u,f=this._offset||0;if(!this.isValid())return null!=n?this:NaN;if(null==n)return this._isUTC?f:cf(this);if("string"==typeof n){if(null===(n=sf(yr,n)))return this}else Math.abs(n)<16&&!r&&(n*=60);return!this._isUTC&&i&&(u=cf(this)),this._offset=n,this._isUTC=!0,null!=u&&this.add(u,"m"),f!==n&&(!i||this._changeInProgress?vo(this,et(n-f,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,t.updateOffset(this,!0),this._changeInProgress=null)),this};n.utc=function(n){return this.utcOffset(0,n)};n.local=function(n){return this._isUTC&&(this.utcOffset(0,n),this._isUTC=!1,n&&this.subtract(cf(this),"m")),this};n.parseZone=function(){var n;return null!=this._tzm?this.utcOffset(this._tzm,!1,!0):"string"==typeof this._i&&(null!=(n=sf(cs,this._i))?this.utcOffset(n):this.utcOffset(0,!0)),this};n.hasAlignedHourOffset=function(n){return!!this.isValid()&&(n=n?l(n).utcOffset():0,(this.utcOffset()-n)%60==0)};n.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()};n.isLocal=function(){return!!this.isValid()&&!this._isUTC};n.isUtcOffset=function(){return!!this.isValid()&&this._isUTC};n.isUtc=so;n.isUTC=so;n.zoneAbbr=function(){return this._isUTC?"UTC":""};n.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""};n.dates=nt("dates accessor is deprecated. Use date instead.",pf);n.months=nt("months accessor is deprecated. Use month instead",ae);n.years=nt("years accessor is deprecated. Use year instead",ku);n.zone=nt("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(n,t){return null!=n?("string"!=typeof n&&(n=-n),this.utcOffset(n,t),this):-this.utcOffset()});n.isDSTShifted=nt("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!k(this._isDSTShifted))return this._isDSTShifted;var t,n={};return su(n,this),(n=to(n))._a?(t=(n._isUTC?ot:l)(n._a),this._isDSTShifted=this.isValid()&&0<function(n,t,i){for(var e=Math.min(n.length,t.length),o=Math.abs(n.length-t.length),u=0,r=0;r<e;r++)(i&&n[r]!==t[r]||!i&&f(n[r])!==f(t[r]))&&u++;return u+o}(n._a,t.toArray())):this._isDSTShifted=!1,this._isDSTShifted});o=lu.prototype;o.calendar=function(n,t,i){var r=this._calendar[n]||this._calendar.sameElse;return st(r)?r.call(t,i):r};o.longDateFormat=function(n){var t=this._longDateFormat[n],i=this._longDateFormat[n.toUpperCase()];return t||!i?t:(this._longDateFormat[n]=i.match(au).map(function(n){return"MMMM"===n||"MM"===n||"DD"===n||"dddd"===n?n.slice(1):n}).join(""),this._longDateFormat[n])};o.invalidDate=function(){return this._invalidDate};o.ordinal=function(n){return this._ordinal.replace("%d",n)};o.preparse=fs;o.postformat=fs;o.relativeTime=function(n,t,i,r){var u=this._relativeTime[i];return st(u)?u(n,t,i,r):u.replace(/%d/i,n)};o.pastFuture=function(n,t){var i=this._relativeTime[0<n?"future":"past"];return st(i)?i(t):i.replace(/%s/i,t)};o.set=function(n){var i,t;for(t in n)s(n,t)&&(st(i=n[t])?this[t]=i:this["_"+t]=i);this._config=n;this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)};o.eras=function(){for(var r,n=this._eras||wt("en")._eras,i=0,u=n.length;i<u;++i){switch(typeof n[i].since){case"string":r=t(n[i].since).startOf("day");n[i].since=r.valueOf()}switch(typeof n[i].until){case"undefined":n[i].until=1/0;break;case"string":r=t(n[i].until).startOf("day").valueOf();n[i].until=r.valueOf()}}return n};o.erasParse=function(n,t,i){var r,s,f,e,o,u=this.eras();for(n=n.toUpperCase(),r=0,s=u.length;r<s;++r)if(f=u[r].name.toUpperCase(),e=u[r].abbr.toUpperCase(),o=u[r].narrow.toUpperCase(),i)switch(t){case"N":case"NN":case"NNN":if(e===n)return u[r];break;case"NNNN":if(f===n)return u[r];break;case"NNNNN":if(o===n)return u[r]}else if(0<=[f,e,o].indexOf(n))return u[r]};o.erasConvertYear=function(n,i){var r=n.since<=n.until?1:-1;return void 0===i?t(n.since).year():t(n.since).year()+(i-n.offset)*r};o.erasAbbrRegex=function(n){return s(this,"_erasAbbrRegex")||yf.call(this),n?this._erasAbbrRegex:this._erasRegex};o.erasNameRegex=function(n){return s(this,"_erasNameRegex")||yf.call(this),n?this._erasNameRegex:this._erasRegex};o.erasNarrowRegex=function(n){return s(this,"_erasNarrowRegex")||yf.call(this),n?this._erasNarrowRegex:this._erasRegex};o.months=function(n,t){return n?rt(this._months)?this._months[n.month()]:this._months[(this._months.isFormat||ce).test(t)?"format":"standalone"][n.month()]:rt(this._months)?this._months:this._months.standalone};o.monthsShort=function(n,t){return n?rt(this._monthsShort)?this._monthsShort[n.month()]:this._monthsShort[ce.test(t)?"format":"standalone"][n.month()]:rt(this._monthsShort)?this._monthsShort:this._monthsShort.standalone};o.monthsParse=function(n,t,i){var r,u,f;if(this._monthsParseExact)return function(n,t,i){var u,r,e,f=n.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],u=0;u<12;++u)e=ot([2e3,u]),this._shortMonthsParse[u]=this.monthsShort(e,"").toLocaleLowerCase(),this._longMonthsParse[u]=this.months(e,"").toLocaleLowerCase();return i?"MMM"===t?-1!==(r=v.call(this._shortMonthsParse,f))?r:null:-1!==(r=v.call(this._longMonthsParse,f))?r:null:"MMM"===t?-1!==(r=v.call(this._shortMonthsParse,f))||-1!==(r=v.call(this._longMonthsParse,f))?r:null:-1!==(r=v.call(this._longMonthsParse,f))||-1!==(r=v.call(this._shortMonthsParse,f))?r:null}.call(this,n,t,i);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++)if((u=ot([2e3,r]),i&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(u,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(u,"").replace(".","")+"$","i")),i||this._monthsParse[r]||(f="^"+this.months(u,"")+"|^"+this.monthsShort(u,""),this._monthsParse[r]=new RegExp(f.replace(".",""),"i")),i&&"MMMM"===t&&this._longMonthsParse[r].test(n))||i&&"MMM"===t&&this._shortMonthsParse[r].test(n)||!i&&this._monthsParse[r].test(n))return r};o.monthsRegex=function(n){return this._monthsParseExact?(s(this,"_monthsRegex")||ve.call(this),n?this._monthsStrictRegex:this._monthsRegex):(s(this,"_monthsRegex")||(this._monthsRegex=ws),this._monthsStrictRegex&&n?this._monthsStrictRegex:this._monthsRegex)};o.monthsShortRegex=function(n){return this._monthsParseExact?(s(this,"_monthsRegex")||ve.call(this),n?this._monthsShortStrictRegex:this._monthsShortRegex):(s(this,"_monthsShortRegex")||(this._monthsShortRegex=ps),this._monthsShortStrictRegex&&n?this._monthsShortStrictRegex:this._monthsShortRegex)};o.week=function(n){return gi(n,this._week.dow,this._week.doy).week};o.firstDayOfYear=function(){return this._week.doy};o.firstDayOfWeek=function(){return this._week.dow};o.weekdays=function(n,t){var i=rt(this._weekdays)?this._weekdays:this._weekdays[n&&!0!==n&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===n?du(i,this._week.dow):n?i[n.day()]:i};o.weekdaysMin=function(n){return!0===n?du(this._weekdaysMin,this._week.dow):n?this._weekdaysMin[n.day()]:this._weekdaysMin};o.weekdaysShort=function(n){return!0===n?du(this._weekdaysShort,this._week.dow):n?this._weekdaysShort[n.day()]:this._weekdaysShort};o.weekdaysParse=function(n,t,i){var r,u,f;if(this._weekdaysParseExact)return function(n,t,i){var f,r,e,u=n.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],f=0;f<7;++f)e=ot([2e3,1]).day(f),this._minWeekdaysParse[f]=this.weekdaysMin(e,"").toLocaleLowerCase(),this._shortWeekdaysParse[f]=this.weekdaysShort(e,"").toLocaleLowerCase(),this._weekdaysParse[f]=this.weekdays(e,"").toLocaleLowerCase();return i?"dddd"===t?-1!==(r=v.call(this._weekdaysParse,u))?r:null:"ddd"===t?-1!==(r=v.call(this._shortWeekdaysParse,u))?r:null:-1!==(r=v.call(this._minWeekdaysParse,u))?r:null:"dddd"===t?-1!==(r=v.call(this._weekdaysParse,u))||-1!==(r=v.call(this._shortWeekdaysParse,u))||-1!==(r=v.call(this._minWeekdaysParse,u))?r:null:"ddd"===t?-1!==(r=v.call(this._shortWeekdaysParse,u))||-1!==(r=v.call(this._weekdaysParse,u))||-1!==(r=v.call(this._minWeekdaysParse,u))?r:null:-1!==(r=v.call(this._minWeekdaysParse,u))||-1!==(r=v.call(this._weekdaysParse,u))||-1!==(r=v.call(this._shortWeekdaysParse,u))?r:null}.call(this,n,t,i);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++)if((u=ot([2e3,1]).day(r),i&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(u,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(u,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(u,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(f="^"+this.weekdays(u,"")+"|^"+this.weekdaysShort(u,"")+"|^"+this.weekdaysMin(u,""),this._weekdaysParse[r]=new RegExp(f.replace(".",""),"i")),i&&"dddd"===t&&this._fullWeekdaysParse[r].test(n))||i&&"ddd"===t&&this._shortWeekdaysParse[r].test(n)||i&&"dd"===t&&this._minWeekdaysParse[r].test(n)||!i&&this._weekdaysParse[r].test(n))return r};o.weekdaysRegex=function(n){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||gu.call(this),n?this._weekdaysStrictRegex:this._weekdaysRegex):(s(this,"_weekdaysRegex")||(this._weekdaysRegex=ds),this._weekdaysStrictRegex&&n?this._weekdaysStrictRegex:this._weekdaysRegex)};o.weekdaysShortRegex=function(n){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||gu.call(this),n?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(s(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=gs),this._weekdaysShortStrictRegex&&n?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)};o.weekdaysMinRegex=function(n){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||gu.call(this),n?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(s(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=nh),this._weekdaysMinStrictRegex&&n?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)};o.isPM=function(n){return"p"===(n+"").toLowerCase().charAt(0)};o.meridiem=function(n,t,i){return 11<n?i?"pm":"PM":i?"am":"AM"};gt("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(n){var t=n%10;return n+(1===f(n%100/10)?"th":1==t?"st":2==t?"nd":3==t?"rd":"th")}});t.lang=nt("moment.lang is deprecated. Use moment.locale instead.",gt);t.langData=nt("moment.langData is deprecated. Use moment.localeData instead.",wt);lt=Math.abs;var ah=bt("ms"),vh=bt("s"),yh=bt("m"),ph=bt("h"),wh=bt("d"),bh=bt("w"),kh=bt("M"),dh=bt("Q"),gh=bt("y");var nc=ui("milliseconds"),tc=ui("seconds"),ic=ui("minutes"),rc=ui("hours"),uc=ui("days"),fc=ui("months"),ec=ui("years"),kt=Math.round,ai={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};return uu=Math.abs,e=gr.prototype,e.isValid=function(){return this._isValid},e.abs=function(){var n=this._data;return this._milliseconds=lt(this._milliseconds),this._days=lt(this._days),this._months=lt(this._months),n.milliseconds=lt(n.milliseconds),n.seconds=lt(n.seconds),n.minutes=lt(n.minutes),n.hours=lt(n.hours),n.months=lt(n.months),n.years=lt(n.years),this},e.add=function(n,t){return os(this,n,t,1)},e.subtract=function(n,t){return os(this,n,t,-1)},e.as=function(n){if(!this.isValid())return NaN;var t,r,i=this._milliseconds;if("month"===(n=tt(n))||"quarter"===n||"year"===n)switch(t=this._days+i/864e5,r=this._months+hs(t),n){case"month":return r;case"quarter":return r/3;case"year":return r/12}else switch(t=this._days+Math.round(bf(this._months)),n){case"week":return t/7+i/6048e5;case"day":return t+i/864e5;case"hour":return 24*t+i/36e5;case"minute":return 1440*t+i/6e4;case"second":return 86400*t+i/1e3;case"millisecond":return Math.floor(864e5*t)+i;default:throw new Error("Unknown unit "+n);}},e.asMilliseconds=ah,e.asSeconds=vh,e.asMinutes=yh,e.asHours=ph,e.asDays=wh,e.asWeeks=bh,e.asMonths=kh,e.asQuarters=dh,e.asYears=gh,e.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*f(this._months/12):NaN},e._bubble=function(){var u,f,e,o,s,r=this._milliseconds,n=this._days,t=this._months,i=this._data;return 0<=r&&0<=n&&0<=t||r<=0&&n<=0&&t<=0||(r+=864e5*ss(bf(t)+n),t=n=0),i.milliseconds=r%1e3,u=it(r/1e3),i.seconds=u%60,f=it(u/60),i.minutes=f%60,e=it(f/60),i.hours=e%24,n+=it(e/24),t+=s=it(hs(n)),n-=ss(bf(s)),o=it(t/12),t%=12,i.days=n,i.months=t,i.years=o,this},e.clone=function(){return et(this)},e.get=function(n){return n=tt(n),this.isValid()?this[n+"s"]():NaN},e.milliseconds=nc,e.seconds=tc,e.minutes=ic,e.hours=rc,e.days=uc,e.weeks=function(){return it(this.days()/7)},e.months=fc,e.years=ec,e.humanize=function(n,t){if(!this.isValid())return this.localeData().invalidDate();var i,r,u=!1,f=ai;return"object"==typeof n&&(t=n,n=!1),"boolean"==typeof n&&(u=n),"object"==typeof t&&(f=Object.assign({},ai,t),null!=t.s&&null==t.ss&&(f.ss=t.s-1)),i=this.localeData(),r=oc(this,!u,f,i),u&&(r=i.pastFuture(+this,r)),i.postformat(r)},e.toISOString=fu,e.toString=fu,e.toJSON=fu,e.locale=bo,e.localeData=ko,e.toIsoString=nt("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",fu),e.lang=lf,r("X",0,0,"unix"),r("x",0,0,"valueOf"),i("x",vr),i("X",/[+-]?\d+(\.\d{1,3})?/),h("X",function(n,t,i){i._d=new Date(1e3*parseFloat(n))}),h("x",function(n,t,i){i._d=new Date(f(n))}),t.version="2.29.1",kf=l,t.fn=n,t.min=function(){return fo("isBefore",[].slice.call(arguments,0))},t.max=function(){return fo("isAfter",[].slice.call(arguments,0))},t.now=function(){return Date.now?Date.now():+new Date},t.utc=ot,t.unix=function(n){return l(1e3*n)},t.months=function(n,t){return es(n,t,"months")},t.isDate=yi,t.locale=gt,t.invalid=ir,t.duration=et,t.isMoment=ut,t.weekdays=function(n,t,i){return wf(n,t,i,"weekdays")},t.parseZone=function(){return l.apply(null,arguments).parseZone()},t.localeData=wt,t.isDuration=nu,t.monthsShort=function(n,t){return es(n,t,"monthsShort")},t.weekdaysMin=function(n,t,i){return wf(n,t,i,"weekdaysMin")},t.defineLocale=tf,t.updateLocale=function(n,t){var u,i,r;return null!=t?(r=ke,null!=a[n]&&null!=a[n].parentLocale?a[n].set(cu(a[n]._config,t)):(null!=(i=kr(n))&&(r=i._config),t=cu(r,t),null==i&&(t.abbr=n),(u=new lu(t)).parentLocale=a[n],a[n]=u),gt(n)):null!=a[n]&&(null!=a[n].parentLocale?(a[n]=a[n].parentLocale,n===gt()&&gt(n)):null!=a[n]&&delete a[n]),a[n]},t.locales=function(){return te(a)},t.weekdaysShort=function(n,t,i){return wf(n,t,i,"weekdaysShort")},t.normalizeUnits=tt,t.relativeTimeRounding=function(n){return void 0===n?kt:"function"==typeof n&&(kt=n,!0)},t.relativeTimeThreshold=function(n,t){return void 0!==ai[n]&&(void 0===t?ai[n]:(ai[n]=t,"s"===n&&(ai.ss=t-1),!0))},t.calendarFormat=function(n,t){var i=n.diff(t,"days",!0);return i<-6?"sameElse":i<-1?"lastWeek":i<0?"lastDay":i<1?"sameDay":i<2?"nextDay":i<7?"nextWeek":"sameElse"},t.prototype=n,t.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},t})