!function(){var t=!0,n=!1,r=function(i,r,u,f){var e=WP.DOM.Browser.isMobile&&(WP.DOM.Browser.isIPhone||WP.DOM.Browser.isIPad||WP.DOM.Browser.isIPod),o=WP.DOM.Browser.isMobile;switch(i.type){case"focusin":return function(n,i,r){return n||r&&(i._clickToDismiss=!0),t}(u,f,e);case"focusout":return relTarget=i.relatedTarget,0===r.has(relTarget).length?(f._clickToDismiss=!1,n):void 0;case"mouseenter":return function(n,i,r){return i&&(n._suppressMouseOut=!0),r||(n._clickToDismiss=!0),t}(f,e,o);case"mouseleave":return f._suppressMouseOut?void 0:(f._clickToDismiss=!1,n);case"keyup":return function(t,i){if(thisKey=t.key.toUpperCase(),"ESCAPE"===thisKey||"ESC"===thisKey)return i._clickToDismiss=!1,n}(i,f);case"click":return function(i,r,u){return r&&(i._suppressMouseOut=!1),u&&!0===i._clickToDismiss?(i._clickToDismiss=!1,n):(i._clickToDismiss=!0,t)}(f,e,o);default:return}},i;$$WP.Common=$$WP.Common||{};i=function(i){this.WP$Common$ViewBinder(["blur","keyup","focus","click","mouseleave","mouseenter"],[i]);this._statePropertyName=i;this._hovered=t;this._unhovered=n;this._clickToDismiss=!1;this._suppressMouseOut=!1};i.prototype={_statePropertyName:null,_hovered:null,_unhovered:null,_clickToDismiss:null,_suppressMouseOut:null,_onPropertyChanged:function(n,t){t.to===this._unhovered?this.getBoundElements(n).removeClass("hover"):t.to===this._hovered&&this.getBoundElements(n).addClass("hover")},_onSyncModelToDOM:function(n){n[this._statePropertyName]===this._hovered?this.getBoundElements(n).addClass("hover"):this.getBoundElements(n).removeClass("hover")},_onDomEvent:function(n,t,i){var u,f;u=n[this._statePropertyName];void 0!==(f=r(i,t,u,this))&&u!==f&&n.setProperty(this._statePropertyName,f),function(n){return"keyup"!==n.type}(i)&&i.preventDefault()}};$$WP.Common.DismissableHoverViewBinder=i;i.extend($$WP.Common.ViewBinder,"WP$Common$DismissableHoverViewBinder")}();$$WP.Debug.UnitTest=$$WP.Debug.UnitTest||{};$$WP.Debug.UnitTest.tests=$$WP.Debug.UnitTest.tests||[];$$WP.Debug.UnitTest.tests.push(function(){$$WP.Debug.UnitTest.assert});!function(){var r=$$WP.Common.ModelCollection,i=null,t=null,u=[{propertyNames:"PopupVisible",storeAs:"set"}],f=["PopupVisible"],n=function(n){n.BubbleLabelledBy&&"string"!=typeof n.BubbleLabelledBy&&(n.BubbleLabelledBy="");n.BubbleLabel&&"string"!=typeof n.BubbleLabel&&!n.BubbleLabel.string&&(n.BubbleLabel="");this.WP$Common$Model(n);null===i&&(i=new r(u,f));null===t&&(t=new $$WP.UI.InfoBubbleViewBinder);$$WPUtil.IsNullOrEmpty(this.AnchorText)&&$$WPUtil.IsNullOrEmpty(this.Image)&&$$WP.Debug.logError("InfoBubble requested with neither an image nor a text anchor.",!0);$$WPUtil.IsNullOrEmpty(this.BubbleText)&&$$WP.Debug.logError("InfoBubble requested without any text for the popup.",!0);this.PopupVisible=!1;i.add(this);t.bindModel(this)};n.prototype={s_dataMembers:["AnchorText","BubbleLabel","BubbleLabelledBy","BubbleText","BubbleTitle","DisableHtmlEncoding","Image","UseSvgImage"],AnchorText:null,BubbleLabelledBy:null,BubbleLabel:null,BubbleText:null,BubbleTitle:null,DisableHtmlEncoding:null,Image:null,UseSvgImage:null,PopupVisible:null,ViewBinderId:function(){return t.ViewBinderId}};n.SimpleInfoBubble=function(t,i,r,u){return new n({BubbleText:t,DisableHtmlEncoding:i,Image:"images/info.png",BubbleLabelledBy:r,BubbleLabel:u})};n.SimpleTextInfoBubble=function(t,i,r){return new n({AnchorText:t,BubbleText:i,DisableHtmlEncoding:r})};$$WP.UI=$$WP.UI||{};$$WP.UI.InfoBubble=n;n.extend($$WP.Common.Model,"WP$UI$InfoBubble")}(),function(){var n=function(){this.WP$Common$DismissableHoverViewBinder("PopupVisible")};n.prototype={_onPropertyChanged:function(n,t){t.from===this._hovered?this.hidePopup(this.getBoundElements(n)):t.to===this._hovered&&this.showPopup(this.getBoundElements(n));this.WP$Common$DismissableHoverViewBinder$_onPropertyChanged(n,t)},_onSyncModelToDOM:function(n){this.WP$Common$DismissableHoverViewBinder$_onSyncModelToDOM(n);n[this._statePropertyName]===this._hovered?this.showPopup(this.getBoundElements(n)):this.hidePopup(this.getBoundElements(n))},_onDomEvent:function(n,t,i){this.WP$Common$DismissableHoverViewBinder$_onDomEvent(n,t,i)},showPopup:function(n){var t,u,r,i,f;r=n.find(".infoBubbleTarget");i=n.find(".infoBubblePopup");f=$$WPUtil.getPopupParent(i).boxModel(!1).width;n.safeAttr("data-positioned-width")!==f&&(t=$$WPUtil.positionElementNear(r,i),u=r.offset(),t.top-=u.top,t.left-=u.left,i.css({left:t.left+"px",top:t.top+"px"}),n.safeAttr("data-positioned-width",f));i.safeAttr("aria-hidden",!1);r.safeAttr("aria-pressed",!0)},hidePopup:function(n){var t,i;t=n.find(".infoBubblePopup");i=n.find(".infoBubbleTarget");t.safeAttr("aria-hidden",!0);i.safeAttr("aria-pressed",!1)}};$$WP.UI=$$WP.UI||{};$$WP.UI.InfoBubbleViewBinder=n;n.extend($$WP.Common.DismissableHoverViewBinder,"WP$UI$InfoBubbleViewBinder")}();$$WP.Debug.UnitTest=$$WP.Debug.UnitTest||{};$$WP.Debug.UnitTest.tests=$$WP.Debug.UnitTest.tests||[];$$WP.Debug.UnitTest.tests.push(function(){$$WP.Debug.UnitTest.assert});!function(){var n=function(n,t){var i,r=["input","blur"];for(Array.isArray(t)||(t=[t]),i=0;i<t.length;i++)r.push(t[i]);this.WP$Common$ViewBinder(r,[n])};n.prototype={bindAllModels:function(n){for(var i,t=0;t<n.length;t++)if(this.bindModel(n[t]),101===n[t].QuestionType||106===n[t].QuestionType)for(i=0;i<n[t].GroupQuestions.Models.length;i++)this.bindModel(n[t].GroupQuestions.Models[i])},_onPropertyChanged:function(n,t){"OtherSelected"===t.propertyName&&this.getBoundElements(n).trigger($.Event("otherOptionToggled"))},_onSyncModelToDOM:function(n){this.WP$Common$ViewBinder$_onSyncModelToDOM(n)},_onDomEvent:function(n,t,i,r){null===n||"function"!=typeof n._updateAnswerFromDOM||r||n._updateAnswerFromDOM(t,i);$afe.jq(document).trigger("resetDrawingOffset");i.preventDefault()}};$$WP.Questions=$$WP.Questions||{};$$WP.Questions.QuestionViewBinder=n;n.extend($$WP.Common.ViewBinder,"WP$Questions$QuestionViewBinder")}();$$WP.Debug.UnitTest=$$WP.Debug.UnitTest||{};$$WP.Debug.UnitTest.tests=$$WP.Debug.UnitTest.tests||[];$$WP.Debug.UnitTest.tests.push(function(){$$WP.Debug.UnitTest.assert});!function(){$$WP.Utilities.guaranteeExistence($$WP,"Questions");$$WP.Questions.CustomListOptionStyle={Text:1,TextWithImage:2,Image:3};$$WP.Questions.GroupQuestionDisplayStyle={SingleColumn:1,TwoColumn:2,ThreeColumn:3,FourColumn:4,TableSingleColumn:5,TableTwoColumn:7,NumericInputFirstTable:8}}();!function(){$$WP.Utilities.guaranteeExistence($$WP,"Questions");$$WP.Questions.QuestionTypeEnum={Question:100,Group:101,Drawing:102,FamilyHistory:103,PatientSatisfaction:104,PatientSatisfactionGroup:106}}();!function(){$$WP.Utilities.guaranteeExistence($$WP,"Questions");$$WP.Questions.ResponseTypeEnum={Text:1,Date:2,Time:3,Numeric:4,CustomList:6,CategoryINI:7,YesNo:8,TimeWithUnits:14,Upload:19,FamilyHistory:20}}();!function(){$$WP.Utilities.guaranteeExistence($$WP,"Questions");var n=function(n){this.WP$Common$Model(n)},t=[{propertyNames:"ID",storeAs:"set"}],i=["ID"],r=[];n.prototype={s_dataMembers:["Index","Text","IsSelected","ImagePath"],Text:null,Index:null,IsSelected:!1,ImagePath:null,convertToCoreChoiceModel:function(){var n={};return n.Index=this.Index,n}};$$WP.Questions=$$WP.Questions||{};$$WP.Questions.Choice=n;$$WP.Questions.Choice.createChoiceCollection=function(n){var u,f,e,o;if(u=new $$WP.Questions.ChoiceCollection(t,i,r),n){for(u.openChangeBatch(),f=0;f<n.length;f++)e=n[f],o=new $$WP.Questions.Choice(e),u.add(o);u.closeChangeBatch()}return u};n.extend($$WP.Common.Model,"WP$Questions$Choice")}();$$WP.Debug.UnitTest=$$WP.Debug.UnitTest||{};$$WP.Debug.UnitTest.tests=$$WP.Debug.UnitTest.tests||[];$$WP.Debug.UnitTest.tests.push(function(){$$WP.Debug.UnitTest.assert});!function(){var n=function(n,t,i){this.WP$Common$ModelCollection(n,t,i)};n.prototype={convertToCoreChoiceArray:function(){for(var t,i=[],n=0;n<this.Models.length;n++)"function"==typeof(t=this.Models[n]).convertToCoreChoiceModel&&t.IsSelected&&i.push(t.convertToCoreChoiceModel());return i},isAnyChoiceSelected:function(){return this.getSelectedChoices().length>0},getSelectedChoices:function(){for(var t=[],n=0;n<this.Models.length;n++)this.Models[n].IsSelected&&t.push(this.Models[n]);return t}};$$WP.Questions=$$WP.Questions||{};$$WP.Questions.ChoiceCollection=n;n.extend($$WP.Common.ModelCollection,"WP$Questions$ChoiceCollection")}();$$WP.Debug.UnitTest=$$WP.Debug.UnitTest||{};$$WP.Debug.UnitTest.tests=$$WP.Debug.UnitTest.tests||[];$$WP.Debug.UnitTest.tests.push(function(){$$WP.Debug.UnitTest.assert});!function(){var n=function(n,t){this.WP$Common$Model(n);this._updateMiscSettings();this._updateMnemonics();this._updateValidationSettings();this._setAnswerChangedCallback(t);this.HasAnswers=this._isQuestionAnswered();this.HelpText=dangerou$.parseHtml("<div>"+this.HelpText+"<\/div>").prop("innerHTML")},t=[{propertyNames:"ID",storeAs:"set"}],i=["ID"],r=[];n.prototype={s_dataMembers:[],s_coreQuestionDataMembers:["ID","DAT","QuestionType","ResponseType","IsRequired","IsMultiResponse","IsTrigger","IsEnabled","DisplayStyle","DisplayStyleVal"],ID:null,Name:null,DAT:null,QuestionType:0,ResponseType:0,Prompt:null,HelpText:null,IsRequired:!1,IsMultiResponse:!1,DisplayStyle:null,DisplayStyleVal:0,IsTrigger:!1,IsEnabled:!0,AnswerChangedCallback:null,HasAnswers:!1,HasErrors:!1,FormElementName:null,ValidationSettings:null,ViewBinderId:null,CssClassName:"",Timer:0,Delay:175,HasZebraStripeOn:!1,LegendOrLabelHeaderClassName:"question-prompt-header",convertToCoreQuestionModel:function(){for(var i,n,r={},t=0;t<this.s_coreQuestionDataMembers.length;t++)n=this[i=this.s_coreQuestionDataMembers[t]],r[i]=$$WPUtil.IsNullOrEmpty(n)||"function"!=typeof n.WP$Common$Model||"function"!=typeof n.convertToCoreQuestionModel?n:n.convertToCoreQuestionModel();return r},addViewBinderId:function(n){this.ViewBinderId=n},_updateMnemonics:function(){throw"[BaseQuestion] Subclass did not implement the virtual method _updateMnemonics";},_updateValidationSettings:function(){throw"[BaseQuestion] Subclass did not implement the virtual method _updateValidationSettings";},_getValidationSettingsForInput:function(){return this.ValidationSettings},_getGroupValidationSettings:function(){return null},_updateAnswerFromDOM:function(){throw"[BaseQuestion] Subclass did not implement the virtual method _updateAnswerFromDOM. This function is needed for the binder to automatically update the answer in the model.";},_setAnswerChangedCallback:function(n){this.AnswerChangedCallback=n},_triggerAnswerChangedCallback:function(n,t,i){i&&document.activeElement!==t.target?(this.AnswerChangedCallback(this),this.Timer=0):this.Timer||(this.Timer=setTimeout($.proxy(function(){this.AnswerChangedCallback(this);this.Timer=0},this),this.Delay))},_getInvalidInputs:function(){return $afe.select('[data-lql="'+this.ID+'"]').find('[data-invalid="true"]').filter("input, textarea, select")},_updateMiscSettings:function(){this.FormElementName="LQL_"+this.ID},_isQuestionAnswered:function(){throw"[BaseQuestion] Subclass did not implement the virtual method _isQuestionAnswered. This function is needed to determine whether or not a question  has been answered.";}};$$WP.Questions=$$WP.Questions||{};$$WP.Questions.BaseQuestion=n;$$WP.Questions.BaseQuestion.createQuestionCollection=function(){return new $$WP.Questions.QuestionCollection(t,i,r)};n.extend($$WP.Common.Model,"WP$Questions$BaseQuestion")}();$$WP.Debug.UnitTest=$$WP.Debug.UnitTest||{};$$WP.Debug.UnitTest.tests=$$WP.Debug.UnitTest.tests||[];$$WP.Debug.UnitTest.tests.push(function(){$$WP.Debug.UnitTest.assert});!function(){var n=function(n,t){this.Choices=$$WP.Questions.Choice.createChoiceCollection(n.Choices);this.HasQuickButtons=this.Choices&&this.Choices.Models&&this.Choices.Models.length>0;this.WP$Questions$BaseQuestion(n,t);n.MaxLength>0&&(this.MaxLength=n.MaxLength,$$WP.ApplicationContext!==applicationWelcome&&(this.MaxLengthCssClass=$$WPUtil.GetTextareaBucketClass(this.MaxLength)),this._updateValidationSettings(),n.Answer&&n.Answer.length>n.MaxLength&&(this.Answer=n.Answer.substring(0,n.MaxLength)))};n.prototype={s_dataMembers:["ID","Name","DAT","QuestionType","ResponseType","Prompt","HelpText","IsRequired","IsMultiResponse","DisplayStyle","DisplayStyleVal","HasAnswers","IsTrigger","IsEnabled","Timer","Delay","Answer","OtherSelected"],Answer:null,Choices:null,HasQuickButtons:!1,OtherSelected:!1,ButtonsFormElementName:null,ButtonValidationSettings:null,MultiResponsePrompt:null,MaxLength:0,MaxLengthCssClass:"",convertToCoreQuestionModel:function(){var n={};return n=this.WP$Questions$BaseQuestion$convertToCoreQuestionModel(),n.Answer=this._getInvalidInputs().length>0||this.HasQuickButtons&&!this.OtherSelected?{Text:""}:{Text:this.Answer},n.Answer.Choices=this.Choices.convertToCoreChoiceArray(),n},_updateMnemonics:function(){this.IsMultiResponse&&this.HasQuickButtons&&($$WP.Strings.setDefaultNamespace("Questions"),this.MultiResponsePrompt=$$WP.Strings.getForTemplate("MultipleResponsePrompt"),$$WP.Strings.clearDefaultNamespace())},_updateValidationSettings:function(){var n,t;n=0===this.MaxLength?this.IsMultiResponse?"1000":"255":this.MaxLength;t=new $$WP.FormValidation.ValidationSettings({maxLength:n,showCharacterCounter:!0});this.ValidationSettings=t;this.ButtonValidationSettings=new $$WP.FormValidation.ValidationSettings;this.HasQuickButtons?(this.IsMultiResponse?this.ButtonValidationSettings.atLeastOneChecked=this.IsRequired:this.ButtonValidationSettings.required=this.IsRequired,this.ValidationSettings.required=this.IsRequired?this.IsRequired:this.OtherSelected):this.ValidationSettings.required=this.IsRequired},_getValidationSettingsForInput:function(n){var t=n.safeAttr("name");return null!==t&&"string"==typeof t&&t.indexOf("_buttons")>-1?this.ButtonValidationSettings:this.ValidationSettings},_updateMiscSettings:function(){this.WP$Questions$BaseQuestion$_updateMiscSettings();this.ButtonsFormElementName="LQL_"+this.ID+"_buttons"},_updateAnswerFromDOM:function(n,t){var u,r,e,f,i;if(null!==n&&"object"==typeof n&&n instanceof jQuery){if("text"===n[0].type||"textarea"===n[0].type)(u=n.val())&&(u=u.toString().replace(/\s+$/,"")),this.Answer!==u&&(r=!0),this.Answer=u;else if(e=n.val(),null!==this.Choices&&null!==this.Choices.Models&&"focusout"!==t.type){for(f=0;f<this.Choices.Models.length;f++)(i=this.Choices.Models[f]).Index===e?n.is(":checked")?(i.IsSelected||(r=!0),i.IsSelected=!0,this.IsMultiResponse||this.setProperty("OtherSelected",!1)):(i.IsSelected&&(r=!0),i.IsSelected=!1):this.IsMultiResponse||(i.IsSelected&&(r=!0),i.IsSelected=!1);""===e&&(this.OtherSelected==n.is(":checked")||$$WPUtil.IsNullOrEmpty(this.Answer)||(r=!0),this.setProperty("OtherSelected",n.is(":checked")))}r&&(this.HasAnswers=this._isQuestionAnswered(),this._triggerAnswerChangedCallback(n,t,!0))}},_isQuestionAnswered:function(){return!$$WPUtil.IsNullOrEmpty(this.Answer)||this.Choices.isAnyChoiceSelected()},_defaultAfterAccordionCallback:function(){var t,r=jQueryElements[0],n=jQueryElements[1],i=$afe.jq(r).is(":checked");this._updateValidationSettings();n.safeAttr("data-validation-settings",this.ValidationSettings.toJSON());$$WP.FormValidation.resetValidationErrorForAnInput(n,!0);$$WPQuestionUtil.enableInputField(n,i);i&&(t=n.val().length,n.get(0).setSelectionRange(t,t),n.focus())}};$$WP.Questions=$$WP.Questions||{};$$WP.Questions.FreeTextQuestion=n;n.extend($$WP.Questions.BaseQuestion,"WP$Questions$FreeTextQuestion")}();$$WP.Debug.UnitTest=$$WP.Debug.UnitTest||{};$$WP.Debug.UnitTest.tests=$$WP.Debug.UnitTest.tests||[];$$WP.Debug.UnitTest.tests.push(function(){$$WP.Debug.UnitTest.assert});!function(){var n=function(n,t){this.LocalePlaceholder=$$WP.I18N.getDateFormatForDisplay();this.WP$Questions$BaseQuestion(n,t);this.FormElementName+="-date"};n.prototype={s_dataMembers:["ID","Name","DAT","QuestionType","ResponseType","Prompt","HelpText","IsRequired","IsMultiResponse","DisplayStyle","DisplayStyleVal","IsTrigger","IsEnabled","AnswerChangedCallback","Timer","Delay","Answer","LocalePlaceholder"],Answer:null,Timer:0,Delay:500,LocalePlaceholder:null,convertToCoreQuestionModel:function(){var t,n={},i,r;return(n=this.WP$Questions$BaseQuestion$convertToCoreQuestionModel(),t=$afe.select('.question.date[data-lql="'+n.ID+'"]'),this._getInvalidInputs().length>0)?n.Answer={Text:""}:t.find('input[type="date"]').length>0?(i=new Date(this.Answer),r=$$WP.I18N.formatPatientGivenDate(i),n.Answer={Text:r}):n.Answer={Text:this.Answer},n},_updateMnemonics:function(){},_updateValidationSettings:function(){this.ValidationSettings=new $$WP.FormValidation.ValidationSettings({isDate:!0,required:this.IsRequired,maxLength:"15",minDate:new Date(1841,0,1),maxDate:new Date(4578,10,26)})},_updateAnswerFromDOM:function(n,t){var i,r;null!==n&&"object"==typeof n&&n instanceof jQuery&&(i=n.val(),this.Answer!==i&&(r=!0),this.Answer=i,r&&(this.HasAnswers=this._isQuestionAnswered(),this._triggerAnswerChangedCallback(n,t,!0)))},_isQuestionAnswered:function(){return!$$WPUtil.IsNullOrEmpty(this.Answer)},__localeDateToISO:function(n){return null===n||isNaN(n.getTime())?"":(r=n.getUTCFullYear(),(t=n.getUTCMonth()+1)<10&&(t="0"+t),(i=n.getUTCDate())<10&&(i="0"+i),[r,t,i].join("-"));var r,t,i}};$$WP.Questions=$$WP.Questions||{};$$WP.Questions.DateQuestion=n;n.extend($$WP.Questions.BaseQuestion,"WP$Questions$DateQuestion")}();$$WP.Debug.UnitTest=$$WP.Debug.UnitTest||{};$$WP.Debug.UnitTest.tests=$$WP.Debug.UnitTest.tests||[];$$WP.Debug.UnitTest.tests.push(function(){$$WP.Debug.UnitTest.assert});!function(){var n=function(n,t){var i;($$WP.Utilities.UI.IsMobile||WP.DOM.Browser.isMobile||78===$$WP.ApplicationContext||$$WPQuestionUtil.isFakeResponsive())&&""!==n.Answer&&$$WP.Utilities.isBrowserCapableOf("input",{type:"time"})&&(i=$$WP.I18N.parseTime(n.Answer),n.Answer=this.__localeTimeTo24Hr(i));this.LocalePlaceholder=$$WP.I18N.getTimeFormatForDisplay();this.WP$Questions$BaseQuestion(n,t)};n.prototype={s_dataMembers:["ID","Name","DAT","QuestionType","ResponseType","Prompt","HelpText","IsRequired","IsMultiResponse","DisplayStyle","DisplayStyleVal","IsTrigger","IsEnabled","AnswerChangedCallback","Answer","Timer","Delay","LocalePlaceholder"],Answer:null,LocalePlaceholder:null,convertToCoreQuestionModel:function(){var t,n={},i,r;return(n=this.WP$Questions$BaseQuestion$convertToCoreQuestionModel(),t=$afe.select('.question.time[data-lql="'+n.ID+'"]'),this._getInvalidInputs().length>0)?n.Answer={Text:""}:t.find('input[type="time"]').length>0?(i=$$WP.I18N.parse24HrTime(this.Answer),r=$$WP.I18N.formatPatientGivenTime(i),n.Answer={Text:r}):n.Answer={Text:this.Answer},n},_updateMnemonics:function(){},_updateValidationSettings:function(){this.ValidationSettings=new $$WP.FormValidation.ValidationSettings({isTime:!0,required:this.IsRequired,maxLength:"15"})},_updateAnswerFromDOM:function(n,t){var i,r;null!==n&&"object"==typeof n&&n instanceof jQuery&&(i=n.val(),this.Answer!==i&&(r=!0),this.Answer=i,r&&(this.HasAnswers=this._isQuestionAnswered(),this._triggerAnswerChangedCallback(n,t,!0)))},_isQuestionAnswered:function(){return!$$WPUtil.IsNullOrEmpty(this.Answer)},__localeTimeTo24Hr:function(n){return null===n||isNaN(n.getTime())?"":((t=n.getUTCHours())<10&&(t="0"+t),(i=n.getUTCMinutes())<10&&(i="0"+i),[t,i].join(":"));var t,i}};$$WP.Questions=$$WP.Questions||{};$$WP.Questions.TimeQuestion=n;n.extend($$WP.Questions.BaseQuestion,"WP$Questions$TimeQuestion")}();$$WP.Debug.UnitTest=$$WP.Debug.UnitTest||{};$$WP.Debug.UnitTest.tests=$$WP.Debug.UnitTest.tests||[];$$WP.Debug.UnitTest.tests.push(function(){$$WP.Debug.UnitTest.assert});!function(){var n=function(n,t){this.Choices=$$WP.Questions.Choice.createChoiceCollection(n.Choices);this.WP$Questions$BaseQuestion(n,t)};n.prototype={s_dataMembers:["ID","Name","DAT","QuestionType","ResponseType","Prompt","HelpText","IsRequired","IsMultiResponse","DisplayStyle","DisplayStyleVal","HasAnswers","IsTrigger","IsEnabled","Precision","TextAnswer","ButtonsFormElementName","ButtonValidationSettings","GroupValidationSettings","Timer","Delay"],ButtonsFormElementName:null,ButtonValidationSettings:null,GroupValidationSettings:null,OneAnswerPopulated:!1,Precision:null,Choices:null,TextAnswer:null,Mnemonics:null,convertToCoreQuestionModel:function(){var n={};return n=this.WP$Questions$BaseQuestion$convertToCoreQuestionModel(),this._getInvalidInputs().length>0?(n.Answer={Text:""},n.Answer.Choices=[]):(n.Answer={Text:this.TextAnswer},n.Answer.Choices=this.Choices.convertToCoreChoiceArray()),n},_updateMnemonics:function(){this.Mnemonics={QuestionPrompt:{Value:this.Prompt}}},_updateValidationSettings:function(){this.ValidationSettings=new $$WP.FormValidation.ValidationSettings({isNumber:!0,min:0,precision:this.Precision,required:this.IsRequired,maxLength:"15"});this.ButtonValidationSettings=new $$WP.FormValidation.ValidationSettings({required:this.IsRequired});this.GroupValidationSettings=new $$WP.FormValidation.ValidationGroup({name:"time-with-units-"+this.ID,allRequired:!this.IsRequired,disableButtonsWhenEmpty:this.IsRequired,evaluateParentGroups:!0})},_getGroupValidationSettings:function(){return this.GroupValidationSettings},_getValidationSettingsForInput:function(n){var t=n.safeAttr("name");return null!==t&&"string"==typeof t&&t.indexOf("_buttons")>-1?this.ButtonValidationSettings:this.ValidationSettings},_getInvalidInputs:function(){var t,n;return t=$afe.select('[data-lql="'+this.ID+'"]'),0===(n=this.WP$Questions$BaseQuestion$_getInvalidInputs()).length&&(this._hasUnitNoNumber()?$.merge(n,t.find("[name='"+this.FormElementName+"']")):this._hasNumberNoUnit()&&$.merge(n,t.find("[name='"+this.ButtonsFormElementName+"']"))),n},_updateMiscSettings:function(){this.WP$Questions$BaseQuestion$_updateMiscSettings();this.ButtonsFormElementName="LQL_"+this.ID+"_buttons";for(var n=0;n<this.Choices.Models.length;n++)if(this.Choices.Models[n].IsSelected){this.OneAnswerPopulated=!0;break}this.TextAnswer&&(this.OneAnswerPopulated=!this.OneAnswerPopulated)},_updateAnswerFromDOM:function(n,t){var f,i,u,e,r;if(null!==n&&"object"==typeof n&&n instanceof jQuery)if("text"===n[0].type)f=n.val(),this.TextAnswer!==f&&(i=!0),this.TextAnswer=f,i&&$afe.select(".time-with-units-buttons [name='"+this.ButtonsFormElementName+"']").first().trigger("change",!0);else{if(e=n.val(),null!==this.Choices&&null!==this.Choices.Models&&"focusout"!==t.type)for(u=0;u<this.Choices.Models.length;u++)(r=this.Choices.Models[u]).Index===e&&n.is(":checked")?(r.IsSelected||(i=!0),r.IsSelected=!0):(r.IsSelected&&(i=!0),r.IsSelected=!1);i&&($afe.select(".answers > [name='"+this.FormElementName+"']").trigger("change",!0),this.HasAnswers=this._isQuestionAnswered(),this._triggerAnswerChangedCallback(n,t,!0))}},_isQuestionAnswered:function(){return!$$WPUtil.IsNullOrEmpty(this.TextAnswer)||this.Choices.isAnyChoiceSelected()},_hasUnitNoNumber:function(){return $$WPUtil.IsNullOrEmpty(this.TextAnswer)&&this.Choices.isAnyChoiceSelected()},_hasNumberNoUnit:function(){return!$$WPUtil.IsNullOrEmpty(this.TextAnswer)&&!this.Choices.isAnyChoiceSelected()}};$$WP.Questions=$$WP.Questions||{};$$WP.Questions.TimeWithUnitsQuestion=n;n.extend($$WP.Questions.BaseQuestion,"WP$Questions$TimeWithUnitsQuestion")}();$$WP.Debug.UnitTest=$$WP.Debug.UnitTest||{};$$WP.Debug.UnitTest.tests=$$WP.Debug.UnitTest.tests||[];$$WP.Debug.UnitTest.tests.push(function(){$$WP.Debug.UnitTest.assert});var applicationWelcome=78;!function(){var n=function(n,t){this.Choices=$$WP.Questions.Choice.createChoiceCollection(n.Choices);this.HasQuickButtons=this.Choices&&this.Choices.Models&&this.Choices.Models.length>0;this.WP$Questions$BaseQuestion(n,t)};n.prototype={s_dataMembers:["ID","Name","DAT","QuestionType","ResponseType","Prompt","HelpText","IsRequired","IsMultiResponse","DisplayStyle","DisplayStyleVal","IsTrigger","IsEnabled","AnswerChangedCallback","Answer","Precision","MinValue","MaxValue","ShowAsSlider","SliderOptions","Timer","Delay","OtherSelected","InputMode"],Answer:null,Precision:null,MinValue:null,MaxValue:null,SliderFormElementName:null,ShowAsSlider:!1,SliderOptions:null,AriaLabelText:null,MinAriaLabelText:null,MaxAriaLabelText:null,TextFieldAriaLabelText:null,AnswerIsMin:!1,AnswerIsMax:!1,SliderController:null,Choices:null,HasQuickButtons:!1,OtherSelected:!1,ButtonsFormElementName:null,ButtonValidationSettings:null,InputMode:"",convertToCoreQuestionModel:function(){var t,i,n={};return(n=this.WP$Questions$BaseQuestion$convertToCoreQuestionModel()).MinValue=this.MinValue,n.MaxValue=this.MaxValue,n.Precision=this.Precision,t=(i=this.Choices.getSelectedChoices()).length>0?i[0].Index:this._getInvalidInputs().length>0||this.HasQuickButtons&&!this.OtherSelected?"":this.Answer,n.Answer={Text:t},n},_updateMnemonics:function(){var n,u,f,t,i,r,e;this.ShowAsSlider&&($$WP.Strings.setDefaultNamespace("Questions.SliderQuestions"),$$WP.Strings.addMnemonic("@MYCHART@MIN@",this.SliderOptions.MinLocal),$$WP.Strings.addMnemonic("@MYCHART@MINLABEL@",this.SliderOptions.MinLabel),$$WP.Strings.addMnemonic("@MYCHART@MAX@",this.SliderOptions.MaxLocal),$$WP.Strings.addMnemonic("@MYCHART@MAXLABEL@",this.SliderOptions.MaxLabel),$$WP.Strings.addMnemonic("@MYCHART@CURRSLIDERVALUE@",this.Answer),i=this.SliderOptions.MinLabel&&this.SliderOptions.MinLabel!==this.SliderOptions.MinLocal.toString(),r=this.SliderOptions.MaxLabel&&this.SliderOptions.MaxLabel!==this.SliderOptions.MaxLocal.toString(),i&&r?(n="SliderDescriptionWithLabels",t="SliderTextFieldDescriptionWithLabels"):i?(n="SliderDescriptionWithMinLabel",t="SliderTextFieldDescriptionWithMinLabel"):r?(n="SliderDescriptionWithMaxLabel",t="SliderTextFieldDescriptionWithMaxLabel"):(n="SliderDescriptionNoLabels",t="SliderTextFieldDescriptionNoLabels"),u=i?"SliderMinWithLabel":"SliderMin",this.AnswerIsMin&&(u+="Selected"),f=r?"SliderMaxWithLabel":"SliderMax",this.AnswerIsMax&&(f+="Selected"),e=this.SliderOptions.DisplayVertically?"SliderVerticalNoResponseEnd":"SliderHorizontalNoResponseEnd",this.AriaLabelText=new Handlebars.SafeString($$WP.Strings.getForTemplate(e)+" "+$$WP.Strings.getForTemplate(n)),this.MinAriaLabelText=$$WP.Strings.getForTemplate(u),this.MaxAriaLabelText=$$WP.Strings.getForTemplate(f),this.TextFieldAriaLabelText=$$WP.Strings.getForTemplate(t),$$WP.Strings.removeMnemonic("@MYCHART@MIN@"),$$WP.Strings.removeMnemonic("@MYCHART@MINLABEL@"),$$WP.Strings.removeMnemonic("@MYCHART@MAX@"),$$WP.Strings.removeMnemonic("@MYCHART@MAXLABEL@"),$$WP.Strings.removeMnemonic("@MYCHART@CURRSLIDERVALUE@"),$$WP.Strings.clearDefaultNamespace())},_updateValidationSettings:function(){var n;n=new $$WP.FormValidation.ValidationSettings({isNumber:!0,min:this.MinValue,max:this.MaxValue,precision:this.Precision,maxLength:"255"});this.ValidationSettings=n;this.ButtonValidationSettings=new $$WP.FormValidation.ValidationSettings;this.HasQuickButtons?(this.ButtonValidationSettings.required=this.IsRequired,this.ValidationSettings.required=this.IsRequired?this.IsRequired:this.OtherSelected):this.ValidationSettings.required=this.IsRequired},_getValidationSettingsForInput:function(n){var t=n.safeAttr("name");return null!==t&&"string"==typeof t&&t.indexOf("_buttons")>-1?this.ButtonValidationSettings:this.ValidationSettings},_updateAnswerFromDOM:function(n,t){var i,r,e,f,u;if(null!==n&&"object"==typeof n&&n instanceof jQuery){if("text"===n[0].type)(i=n.val())&&(i=i.toString().replace(/\s+$/,"")),this.Answer!==i&&(r=!0),this.Answer=i;else if(e=n.val(),null!==this.Choices&&null!==this.Choices.Models&&"focusout"!==t.type){for(f=0;f<this.Choices.Models.length;f++)(u=this.Choices.Models[f]).Index===e&&n.is(":checked")?(u.IsSelected||(r=!0),u.IsSelected=!0,this.setProperty("OtherSelected",!1)):(u.IsSelected&&(r=!0),u.IsSelected=!1);""===e&&(this.OtherSelected==n.is(":checked")||$$WPUtil.IsNullOrEmpty(this.Answer)||(r=!0),this.setProperty("OtherSelected",n.is(":checked")))}r&&(this.HasAnswers=this._isQuestionAnswered(),this._triggerAnswerChangedCallback(n,t,!0))}},_isQuestionAnswered:function(){return!$$WPUtil.IsNullOrEmpty(this.Answer)||this.Choices.isAnyChoiceSelected()},_updateMiscSettings:function(){this.WP$Questions$BaseQuestion$_updateMiscSettings();!$$WPUtil.IsNullOrEmpty(this.MinValue)&&!$$WPUtil.IsNullOrEmpty(this.Precision)&&this.MinValue>=0?this.Precision<=0?this.InputMode="numeric":this.Precision>0&&(this.InputMode="decimal"):this.InputMode=$$WP.ApplicationContext===applicationWelcome||WP.DOM.Browser.isIPad?"numeric":"text";this.ShowAsSlider?(this.SliderOptions.DisplayVertically||($$WP.Utilities.UI.IsMobile||$$WPQuestionUtil.isFakeResponsive())&&(this.DisplayStyle="VERTSLIDER",this.SliderOptions.DisplayVertically=!0),this.CssClassName=this.CssClassName+" questionSlider "+this.DisplayStyle,this.MinValue=this.SliderOptions.Min,this.MaxValue=this.SliderOptions.Max,this.SliderOptions.MinLocal=$$WP.I18N.formatNumber(this.SliderOptions.Min,this.Precision),this.SliderOptions.MaxLocal=$$WP.I18N.formatNumber(this.SliderOptions.Max,this.Precision),this.Answer&&(this.Answer.toString()===this.MinValue.toString()?this.AnswerIsMin=!0:this.Answer.toString()===this.MaxValue.toString()&&(this.AnswerIsMax=!0)),this.SliderFormElementName=this.FormElementName+"_slider"):this.ButtonsFormElementName=this.FormElementName+"_buttons"},_defaultAfterAccordionCallback:function(n){var i,u=n[0],t=n[1],r=$afe.jq(u).is(":checked");this._updateValidationSettings();t.safeAttr("data-validation-settings",this.ValidationSettings.toJSON());$$WP.FormValidation.resetValidationErrorForAnInput(t,!0);$$WPQuestionUtil.enableInputField(t,r);r&&(i=t.val().length,t.get(0).setSelectionRange(i,i),t.focus())}};$$WP.Questions=$$WP.Questions||{};$$WP.Questions.NumericQuestion=n;n.extend($$WP.Questions.BaseQuestion,"WP$Questions$NumericQuestion")}();$$WP.Debug.UnitTest=$$WP.Debug.UnitTest||{};$$WP.Debug.UnitTest.tests=$$WP.Debug.UnitTest.tests||[];$$WP.Debug.UnitTest.tests.push(function(){$$WP.Debug.UnitTest.assert});!function(){var n=function(n,t){var i,r;for(this.Choices=$$WP.Questions.Choice.createChoiceCollection(n.Choices),i=0;i<this.Choices.Models.length;i++)"1"===(r=this.Choices.Models[i]).Index&&(this.HasYesOption=!0,r.IsSelected&&(this.IsSelected=!0));this.WP$Questions$BaseQuestion(n,t);this.GroupValidationSettings=new $$WP.FormValidation.ValidationGroup({name:"FollowUpGroup_"+this.FormElementName,evaluateParentGroups:!0,evaluateNestedGroups:!0})};n.prototype={s_dataMembers:["ID","Name","DAT","QuestionType","ResponseType","Prompt","HelpText","IsRequired","IsMultiResponse","HasFollowUpQuestions","FollowUpQuestions","DisplayStyle","DisplayStyleVal","IsTrigger","IsEnabled","AnswerChangedCallback","Timer","Delay","AllFollowUpsDisabled","IncludeUnknown"],Choices:null,IsSelected:!1,HasFollowUpQuestions:!1,AllFollowUpsDisabled:!1,HasYesOption:!1,FollowUpQuestions:null,EnableToggle:!1,GroupValidationSettings:null,HasFollowUpAnswers:null,ToggleFollowUpQuestions:null,IncludeUnknown:!1,convertToCoreQuestionModel:function(){var t,i,n={},r=!1;for((n=this.WP$Questions$BaseQuestion$convertToCoreQuestionModel()).Answer={Choices:[]},n.Answer={},n.Answer.Choices=this.Choices.convertToCoreChoiceArray(),t=0;t<this.Choices.Models.length;t++)"1"===(i=this.Choices.Models[t]).Index&&i.IsSelected&&(r=!0);return this.HasFollowUpQuestions&&r&&(n.FollowUpQuestions=this.FollowUpQuestions.convertToCoreQuestionArray()),n},_updateMiscSettings:function(){this.WP$Questions$BaseQuestion$_updateMiscSettings();this.HasFollowUpQuestions&&this.Choices.Models[0].IsSelected&&(this.EnableToggle=!0)},_updateMnemonics:function(){$$WP.Strings.setDefaultNamespace("Questions");this.HasFollowUpAnswers=$$WP.Strings.getForTemplate("HasFollowUpAnswers");$$WP.Strings.addMnemonic("@MYCHART@FOLLOWUPPARENTQUESTIONPROMPT@",this.Prompt,"");this.ToggleFollowUpQuestions=$$WP.Strings.getForTemplate("ToggleFollowUpQuestions");$$WP.Strings.removeMnemonic("@MYCHART@FOLLOWUPPARENTQUESTIONPROMPT@");$$WP.Strings.clearDefaultNamespace()},_updateValidationSettings:function(){this.ValidationSettings=new $$WP.FormValidation.ValidationSettings({required:this.IsRequired})},_areAllFollowUpQuestionsDisabled:function(){for(var t=!0,n=0;n<this.FollowUpQuestions.Models.length;n++)if(this.FollowUpQuestions.Models[n].IsEnabled){t=!1;break}return t},_updateAnswerFromDOM:function(n,t){var f,i,r,u;if(null!==n&&"object"==typeof n&&n instanceof jQuery){if(f=n.closest(".questionGroupAsList").length>0&&-1!==n.val().indexOf("LQL_")?n.val().substr(4)===this.ID&&n.is(":checked")?"1":"2":n.val(),null!==this.Choices&&"focusout"!==t.type)for(r=0;r<this.Choices.Models.length;r++)(i=this.Choices.Models[r]).Index===f&&n.is(":checked")?(i.IsSelected||(u=!0),i.IsSelected=!0):(i.IsSelected&&(u=!0),i.IsSelected=!1);u&&(this.HasAnswers=this._isQuestionAnswered(),this._triggerAnswerChangedCallback(n,t,!1))}},_isQuestionAnswered:function(){return this.Choices.isAnyChoiceSelected()}};$$WP.Questions=$$WP.Questions||{};$$WP.Questions.YesNoQuestion=n;n.extend($$WP.Questions.BaseQuestion,"WP$Questions$YesNoQuestion")}();$$WP.Debug.UnitTest=$$WP.Debug.UnitTest||{};$$WP.Debug.UnitTest.tests=$$WP.Debug.UnitTest.tests||[];$$WP.Debug.UnitTest.tests.push(function(){$$WP.Debug.UnitTest.assert});!function(){var n=function(n,t){this.Choices=$$WP.Questions.Choice.createChoiceCollection(n.Choices);this.WP$Questions$BaseQuestion(n,t)},t={s_dataMembers:["ID","Name","DAT","QuestionType","ResponseType","Prompt","HelpText","IsRequired","IsMultiResponse","DisplayStyle","DisplayStyleVal","IsTrigger","IsEnabled","AnswerChangedCallback","MaxButtons","ShowAsSlider","SliderOptions","HasAnswer","AnswerNdx","Timer","Delay","CustomListOptionStyle"],Choices:null,MaxButtons:null,MultiResponsePrompt:null,ShowAsSelectDropDown:!1,SelectSize:1,DropDownDefaultOptionText:null,ShowAsSlider:!1,SliderOptions:null,SliderFormElementName:null,HasAnswer:!1,AnswerNdx:null,AnswerNdxString:null,AnswerImg:null,AnswerText:null,ShowAllOptions:!0,SliderController:null,AriaLabelText:null,MinAriaLabelText:null,MaxAriaLabelText:null,CustomListOptionStyle:$$WP.Questions.CustomListOptionStyle.Text,convertToCoreQuestionModel:function(){var n={};return(n=this.WP$Questions$BaseQuestion$convertToCoreQuestionModel()).Answer={Choices:[]},n.Answer={},n.Answer.Choices=this.Choices.convertToCoreChoiceArray(),n},_updateMnemonics:function(){var r,n,t,i,u;if($$WP.Strings.setDefaultNamespace("Questions.SliderQuestions"),this.ShowAsSlider){if($$WP.Strings.addMnemonic("@MYCHART@MINLABEL@",this.Choices.Models[0].Text),$$WP.Strings.addMnemonic("@MYCHART@MAXLABEL@",this.Choices.Models[this.Choices.Models.length-1].Text),this.AnswerNdx)for(i=0;i<this.Choices.Models.length;i++)if((u=this.Choices.Models[i]).IsSelected){$$WP.Strings.addMnemonic("@MYCHART@CURRSLIDERVALUE@",u.Text);break}r=this.AnswerNdx?this.SliderOptions.DisplayVertically?"VerticalCustomListSliderDescriptionWithValueAndLabelsWeb":this.SliderOptions.IsRTL?"HorizontalRTLCustomListSliderDescriptionWithValueAndLabelsWeb":"HorizontalCustomListSliderDescriptionWithValueAndLabelsWeb":this.SliderOptions.DisplayVertically?"VerticalCustomListSliderDescriptionEmptyWithLabelsWeb":this.SliderOptions.IsRTL?"HorizontalRTLCustomListSliderDescriptionEmptyWithLabelsWeb":"HorizontalCustomListSliderDescriptionEmptyWithLabelsWeb";this.SliderOptions.DisplayVertically?(n="CustomListSliderMinVertical",t="CustomListSliderMaxVertical"):this.SliderOptions.IsRTL?(n="CustomListSliderMinHorizontalRTL",t="CustomListSliderMaxHorizontalRTL"):(n="CustomListSliderMinHorizontal",t="CustomListSliderMaxHorizontal");this.AriaLabelText=$$WP.Strings.getForTemplate(r);this.MinAriaLabelText=$$WP.Strings.getForTemplate(n);this.MaxAriaLabelText=$$WP.Strings.getForTemplate(t);$$WP.Strings.removeMnemonic("@MYCHART@MINLABEL@");$$WP.Strings.removeMnemonic("@MYCHART@MAXLABEL@");$$WP.Strings.removeMnemonic("@MYCHART@CURRSLIDERVALUE@")}this.IsMultiResponse&&(this.MultiResponsePrompt=$$WP.Strings.getForTemplate("MultipleResponsePrompt","Questions"));this.ShowAsSelectDropDown&&(this.DropDownDefaultOptionText=$$WP.Strings.getForTemplate("DropDownDefaultOptionText","Questions"));$$WP.Strings.clearDefaultNamespace()},_updateValidationSettings:function(){this.ValidationSettings=new $$WP.FormValidation.ValidationSettings;this.IsMultiResponse?this.ValidationSettings.atLeastOneChecked=this.IsRequired:this.ValidationSettings.required=this.IsRequired},_updateMiscSettings:function(){var n,i,r,t,u;for(this.WP$Questions$BaseQuestion$_updateMiscSettings(),this.MaxButtons&&!this.ShowAsSlider&&(this.ShowAsSelectDropDown=this.Choices.Models.length>this.MaxButtons&&!this.DisplayStyle),i=r=!1,this.CustomListOptionStyle!==$$WP.Questions.CustomListOptionStyle.Text&&this.CustomListOptionStyle!==$$WP.Questions.CustomListOptionStyle.TextWithImage||(i=!0),this.CustomListOptionStyle!==$$WP.Questions.CustomListOptionStyle.TextWithImage&&this.CustomListOptionStyle!==$$WP.Questions.CustomListOptionStyle.Image||(r=!0,this.ShowAsSelectDropDown=!1,this.CssClassName=this.CssClassName+" withImage"),this.CustomListOptionStyle===$$WP.Questions.CustomListOptionStyle.Image&&(this.CssClassName=this.CssClassName+" imageOnly"),t=0;t<this.Choices.Models.length;t++)null!==(n=this.Choices.Models[t])&&(n.CanShowText=i,n.CanShowImage=r,$$WPUtil.IsNullOrEmpty(n.ImagePath)||(n.ImagePath="Image/Load?filename="+n.ImagePath+"&withContentType=1"));if(this.ShowAsSelectDropDown?this.IsMultiResponse?(this.SelectSize=10,this.Choices.Models.length<10&&(this.SelectSize=this.Choices.Models.length)):this.SelectSize=1:this.CssClassName=this.CssClassName+" customList",this.ShowAsSlider){for(this.CssClassName=this.CssClassName+" questionSlider ",this.SliderOptions.ShowAllOptions=!0,this.SliderOptions.DisplayVertically||($$WP.Utilities.UI.IsMobile||$$WP.ApplicationContext===applicationWelcome||$$WPQuestionUtil.isFakeResponsive())&&(this.DisplayStyle="VERTSLIDER",this.SliderOptions.DisplayVertically=!0),u=1,t=0;t<this.Choices.Models.length;t++)(n=this.Choices.Models[t]).IsSelected&&(this.AnswerImg=n.ImagePath,this.AnswerText=n.Text),n.SliderNdx=u,u++;this.AnswerNdx&&(this.AnswerNdxString=this.AnswerNdx.toFixed(0));this.SliderFormElementName=this.FormElementName+"_slider"}},_updateAnswerFromDOM:function(n,t){var u,i,f,r;if(null!==n&&"object"==typeof n&&n instanceof jQuery){if(u=n.val(),null!==this.Choices&&null!==this.Choices.Models&&("focusout"!==t.type||this.ShowAsSelectDropDown))for(f=0;f<this.Choices.Models.length;f++)i=this.Choices.Models[f],this.ShowAsSelectDropDown?this.IsMultiResponse?u&&-1!==u.indexOf(i.Index)?(i.IsSelected||(r=!0),i.IsSelected=!0):(i.IsSelected&&(r=!0),i.IsSelected=!1):u&&u===i.Index?(i.IsSelected||(r=!0),i.IsSelected=!0):(i.IsSelected&&(r=!0),i.IsSelected=!1):i.Index===u?n.is(":checked")?(i.IsSelected||(r=!0),i.IsSelected=!0):(i.IsSelected&&(r=!0),i.IsSelected=!1):this.IsMultiResponse||(i.IsSelected=!1);r&&(this.HasAnswers=this._isQuestionAnswered(),this._triggerAnswerChangedCallback(n,t,this.ShowAsSelectDropDown))}},_updateClassName:function(){this.ShowAsSlider&&(this.CssClassName=this.CssClassName+" sliderquestion ")},_isQuestionAnswered:function(){return this.Choices.isAnyChoiceSelected()}};n.prototype=t;$$WP.Questions=$$WP.Questions||{};$$WP.Questions.CustomListQuestion=n;n.extend($$WP.Questions.BaseQuestion,"WP$Questions$CustomListQuestion")}();$$WP.Debug.UnitTest=$$WP.Debug.UnitTest||{};$$WP.Debug.UnitTest.tests=$$WP.Debug.UnitTest.tests||[];$$WP.Debug.UnitTest.tests.push(function(){$$WP.Debug.UnitTest.assert});!function(){var n=function(n,t){this.Choices=$$WP.Questions.Choice.createChoiceCollection(n.Choices);this.WP$Questions$BaseQuestion(n,t)};n.prototype={s_dataMembers:["ID","Name","DAT","QuestionType","ResponseType","Prompt","HelpText","IsRequired","IsMultiResponse","HasAnswers","DisplayStyle","DisplayStyleVal","IsTrigger","IsEnabled","Timer","Delay","MaxButtons"],Choices:null,MaxButtons:null,MultiResponsePrompt:null,ShowAsSelectDropDown:!1,SelectSize:1,DropDownDefaultOptionText:null,convertToCoreQuestionModel:function(){var n={};return(n=this.WP$Questions$BaseQuestion$convertToCoreQuestionModel()).Answer={},n.Answer.Choices=this.Choices.convertToCoreChoiceArray(),n},_updateMnemonics:function(){$$WP.Strings.setDefaultNamespace("Questions");this.IsMultiResponse&&(this.MultiResponsePrompt=$$WP.Strings.getForTemplate("MultipleResponsePrompt"));this.ShowAsSelectDropDown&&(this.DropDownDefaultOptionText=$$WP.Strings.getForTemplate("DropDownDefaultOptionText"));$$WP.Strings.clearDefaultNamespace()},_updateValidationSettings:function(){this.ValidationSettings=new $$WP.FormValidation.ValidationSettings;this.IsMultiResponse?this.ValidationSettings.atLeastOneChecked=this.IsRequired:this.ValidationSettings.required=this.IsRequired},_updateMiscSettings:function(){this.WP$Questions$BaseQuestion$_updateMiscSettings();this.MaxButtons&&(this.ShowAsSelectDropDown=78===$$WP.ApplicationContext?this.Choices.Models.length>this.MaxButtons&&!this.DisplayStyle:this.Choices.Models.length>this.MaxButtons);this.ShowAsSelectDropDown&&(this.IsMultiResponse?(this.SelectSize=10,this.Choices.Models.length<10&&(this.SelectSize=this.Choices.Models.length)):this.SelectSize=1)},_updateAnswerFromDOM:function(n,t){var u,i,f,r;if(null!==n&&"object"==typeof n&&n instanceof jQuery){if(u=n.val(),null!==this.Choices&&null!==this.Choices.Models&&("focusout"!==t.type||this.ShowAsSelectDropDown))for(f=0;f<this.Choices.Models.length;f++)i=this.Choices.Models[f],this.ShowAsSelectDropDown?this.IsMultiResponse?u&&-1!==u.indexOf(i.Index)?(i.IsSelected||(r=!0),i.IsSelected=!0):(i.IsSelected&&(r=!0),i.IsSelected=!1):u&&u===i.Index?(i.IsSelected||(r=!0),i.IsSelected=!0):(i.IsSelected&&(r=!0),i.IsSelected=!1):i.Index===u?n.is(":checked")?(i.IsSelected||(r=!0),i.IsSelected=!0):(i.IsSelected&&(r=!0),i.IsSelected=!1):this.IsMultiResponse||(i.IsSelected=!1);r&&(this.HasAnswers=this._isQuestionAnswered(),this._triggerAnswerChangedCallback(n,t,this.ShowAsSelectDropDown))}},_isQuestionAnswered:function(){return this.Choices.isAnyChoiceSelected()}};$$WP.Questions=$$WP.Questions||{};$$WP.Questions.CategoryINIQuestion=n;n.extend($$WP.Questions.BaseQuestion,"WP$Questions$CategoryINIQuestion")}();$$WP.Debug.UnitTest=$$WP.Debug.UnitTest||{};$$WP.Debug.UnitTest.tests=$$WP.Debug.UnitTest.tests||[];$$WP.Debug.UnitTest.tests.push(function(){$$WP.Debug.UnitTest.assert});!function(){$$WP.Utilities.guaranteeExistence($$WP,"Questions");var n=function(n,t){this.WP$Questions$BaseQuestion(n,t);this.Answers=n.Answers};n.prototype={s_dataMembers:["ID","Name","DAT","QuestionType","ResponseType","DisplayStyle","DisplayStyleVal","Prompt","HelpText","IsRequired","Answers","IsEnabled"],Answers:null,get AnswersAsJson(){return 0===(this.Answers||[]).length?"":JSON.stringify(this.Answers)},convertToCoreQuestionModel:function(){var t={},i,n;for((t=this.WP$Questions$BaseQuestion$convertToCoreQuestionModel()).Answer={Choices:[]},i=(this.Answers||[]).length,n=0;n<i;++n)t.Answer.Choices.push({Index:this.Answers[n].DocumentId});return t},_updateMnemonics:function(){},_updateValidationSettings:function(){this.ValidationSettings=new $$WP.FormValidation.ValidationSettings({required:this.IsRequired})},_updateAnswerFromDOM:function(n,t){var i="";null!==n&&"object"==typeof n&&n instanceof jQuery&&(this.Answers=(i=n.val())&&i.length>0?$$WP.Upload.Models.Document.parseList(JSON.parse(i)):[],this.HasAnswers=this._isQuestionAnswered(),this._triggerAnswerChangedCallback(n,t,!0))},_isQuestionAnswered:function(){return 0!==(this.Answers||[]).length}};$$WP.Questions.UploadQuestion=n;n.extend($$WP.Questions.BaseQuestion,"WP$Questions$UploadQuestion")}();!function(){var n=function(n,t){this.WP$Questions$BaseQuestion(n,t)};n.prototype={s_dataMembers:["ID","Name","DAT","QuestionType","ResponseType","Prompt","HelpText","IsRequired","IsMultiResponse","DisplayStyle","DisplayStyleVal","IsTrigger","IsEnabled","DrawingDetails","DrawingResponse"],DrawingDetails:null,DrawingResponse:null,controller:null,TextAreaValidationSettings:null,TextAreaFormElementName:null,AnswerExists:!1,convertToCoreQuestionModel:function(){var n={};return(n=this.WP$Questions$BaseQuestion$convertToCoreQuestionModel()).DrawingDetails=this.DrawingDetails,this.controller&&(n.Answer={},n.Answer.DrawingResponse=this.controller.getDrawingResponse(),$afe.select('.question.drawing[data-lql="'+n.ID+'"]').find('textarea[data-invalid="true"]').length>0&&(n.Answer.DrawingResponse.Comments=""),n.Answer.DrawingResponse.DcsID=this.DrawingResponse.DcsID),n},_updateMnemonics:function(){},_updateValidationSettings:function(){this.ValidationSettings=new $$WP.FormValidation.ValidationSettings({required:this.IsRequired});this.TextAreaValidationSettings=new $$WP.FormValidation.ValidationSettings({maxLength:255,showCharacterCounter:!0})},_updateMiscSettings:function(){this.WP$Questions$BaseQuestion$_updateMiscSettings();(this.DrawingResponse.Comments||this.DrawingResponse.XValues&&this.DrawingResponse.XValues.length>0)&&(this.AnswerExists=!0);this.TextAreaFormElementName="LQL_"+this.ID+"_drawingComment"},_updateAnswerFromDOM:function(n){null!==n&&"object"==typeof n&&n instanceof jQuery&&n.hasClass("drawingcomment")&&this.controller.updateValidationElement(!0)},_isQuestionAnswered:function(){return!1}};$$WP.Questions=$$WP.Questions||{};$$WP.Questions.DrawingQuestion=n;n.extend($$WP.Questions.BaseQuestion,"WP$Questions$DrawingQuestion")}();$$WP.Debug.UnitTest=$$WP.Debug.UnitTest||{};$$WP.Debug.UnitTest.tests=$$WP.Debug.UnitTest.tests||[];$$WP.Debug.UnitTest.tests.push(function(){$$WP.Debug.UnitTest.assert});!function(){var n=function(n,t){this.WP$Questions$BaseQuestion(n,t)};n.prototype={s_dataMembers:["ID","Name","DAT","QuestionType","ResponseType","Prompt","HelpText","IsRequired","IsMultiResponse","DisplayStyle","DisplayStyleVal","IsTrigger","IsEnabled","AnswerChangedCallback","GroupQuestions","ShowGroupQuestionsAsList","AreAllQuestionsYesNo","HasAnyFollowUpQuestions","GroupQuestionLayout","GroupQuestionLayoutCSS","DisabledBecauseChildrenAllDisabled","Timer","Delay"],GroupQuestions:null,ShowGroupQuestionsAsList:!1,AreAllQuestionsYesNo:!1,HasAnyFollowUpQuestions:!1,MultiResponsePrompt:null,GroupQuestionLayout:0,GroupQuestionLayoutCSS:null,DisabledBecauseChildrenAllDisabled:!1,DisplayTemplateStyle:0,TableLayoutGroupQuestions:[],convertToCoreQuestionModel:function(){var n,i,t={};for((t=this.WP$Questions$BaseQuestion$convertToCoreQuestionModel()).GroupQuestions=[],n=0;n<this.GroupQuestions.Models.length;n++)i=this.GroupQuestions.Models[n].convertToCoreQuestionModel(),t.GroupQuestions.push(i);return t},_updateClassName:function(){var i,n,r,t;if(null!==this.GroupQuestions){if(this.AreAllQuestionsYesNo&&!this.ShowGroupQuestionsAsList){switch(this.GroupQuestionLayout){case $$WP.Questions.GroupQuestionDisplayStyle.SingleColumn:t="col-12";break;case $$WP.Questions.GroupQuestionDisplayStyle.TwoColumn:t="col-6";break;case $$WP.Questions.GroupQuestionDisplayStyle.ThreeColumn:t="col-4";break;case $$WP.Questions.GroupQuestionDisplayStyle.FourColumn:t="col-3"}this.GroupQuestionLayoutCSS=this.GroupQuestionLayoutCSS+" allyesno"}for(r=this.GroupQuestions.Models,i=0;i<r.length;i++)null!==(n=r[i])&&(n.CssClassName=n.CssClassName+" questiongroupitem preload ",n.IncludeUnknown&&(n.CssClassName=n.CssClassName+"includesunknown "),t&&isDataTile()&&!$$WP.Utilities.UI.IsMobile&&!$$WPQuestionUtil.isFakeResponsive()&&(n.CssClassName=n.CssClassName+t))}},_updateMnemonics:function(){$$WP.Strings.setDefaultNamespace("Questions");this.AreAllQuestionsYesNo&&(this.MultiResponsePrompt=$$WP.Strings.getForTemplate("MultipleResponsePrompt"));$$WP.Strings.clearDefaultNamespace()},_updateValidationSettings:function(){this.ValidationSettings=new $$WP.FormValidation.ValidationSettings({atLeastOneChecked:this.IsRequired})},_getInvalidInputs:function(){for(var t=$afe.jq(),n=0;n<this.GroupQuestions.Models.length;n++)$.merge(t,this.GroupQuestions.Models[n]._getInvalidInputs());return t},_areAllChildrenDisabled:function(){for(var t=!0,n=0;n<this.GroupQuestions.Models.length;n++)if(this.GroupQuestions.Models[n].IsEnabled){t=!1;break}return t},_updateLayoutSettings:function(){var t,n,f,i=0,r=1,e=0,u=0;if(this.GroupQuestionLayout===$$WP.Questions.GroupQuestionDisplayStyle.TableSingleColumn||this.GroupQuestionLayout===$$WP.Questions.GroupQuestionDisplayStyle.TableTwoColumn)for(this.TableLayoutGroupQuestions=[],null!==this.GroupQuestions.Models&&this.GroupQuestions.Models.length>0&&(i=this.GroupQuestions.Models[0].Choices.Models.length,e=this.GroupQuestions.Models.length,f=this.__enabledChildQuestionsCount()),78===$$WP.ApplicationContext?this.AreAllQuestionsYesNo||(this.GroupQuestionLayout=0):$$WP.Utilities.UI.IsMobile||$$WPQuestionUtil.isFakeResponsive()?i>3&&(this.GroupQuestionLayout=0):(i>11&&(this.GroupQuestionLayout=0),this.AreAllQuestionsYesNo&this.GroupQuestionLayout===$$WP.Questions.GroupQuestionDisplayStyle.TableTwoColumn&&(r=2),this.AreAllQuestionsYesNo&this.GroupQuestionLayout===$$WP.Questions.GroupQuestionDisplayStyle.TableSingleColumn&&(this.GroupQuestionLayoutCSS=this.GroupQuestionLayoutCSS+" tableSingleCol")),n=0;n<r;n++)t=u,u=this.__getQuestionEndPosForTheColumn(t,f,e,r),this.TableLayoutGroupQuestions[n]=jQuery.extend(!0,{},this.GroupQuestions),this.TableLayoutGroupQuestions[n].Models=this.TableLayoutGroupQuestions[n].Models.slice(t,u);this.HasAnyFollowUpQuestions?this.DisplayTemplateStyle=4:this.ShowGroupQuestionsAsList?this.DisplayTemplateStyle=1:this.GroupQuestionLayout===$$WP.Questions.GroupQuestionDisplayStyle.NumericInputFirstTable?this.DisplayTemplateStyle=8:this.GroupQuestionLayout===$$WP.Questions.GroupQuestionDisplayStyle.TableSingleColumn||this.GroupQuestionLayout===$$WP.Questions.GroupQuestionDisplayStyle.TableTwoColumn?(this.DisplayTemplateStyle=2,this.__updateQuestionPropsForTableLayout()):this.AreAllQuestionsYesNo&&this.GroupQuestionLayout>0&&this.GroupQuestionLayout<5&&(this.DisplayTemplateStyle=3)},__updateQuestionPropsForTableLayout:function(){var n,t;if((this.GroupQuestionLayout===$$WP.Questions.GroupQuestionDisplayStyle.TableSingleColumn||this.GroupQuestionLayout===$$WP.Questions.GroupQuestionDisplayStyle.TableTwoColumn)&&null!==this.GroupQuestions.Models)for(n=0;n<this.TableLayoutGroupQuestions.length;n++)t=this.TableLayoutGroupQuestions[n],this.__updateTableZebraStripeProps(t),this.__updateTableSelectDropDownProps(t)},__updateTableZebraStripeProps:function(n){for(var i,r=!1,t=0;t<n.Models.length;t++)(r=n.Models[t]).IsEnabled&&(i=!i,r.HasZebraStripeOn=i)},__updateTableSelectDropDownProps:function(n){for(var i,t=0;t<n.Models.length;t++)(i=n.Models[t]).ShowAsSelectDropDown&&(i.ShowAsSelectDropDown=!1)},__enabledChildQuestionsCount:function(){for(var t=0,n=0;n<this.GroupQuestions.Models.length;n++)this.GroupQuestions.Models[n].IsEnabled&&t++;return t},__getQuestionEndPosForTheColumn:function(n,t,i,r){var u,e,f=0,o=0;if(1===r||0!==n)f=i+1;else{if(0!==(e=Math.ceil(t/r)))for(u=n;u<i;u++)if(this.GroupQuestions.Models[u].IsEnabled&&o++,o===e){f=u+1;break}0===f&&(f=i+1)}return f},_isQuestionAnswered:function(){return!1}};$$WP.Questions=$$WP.Questions||{};$$WP.Questions.GroupQuestion=n;n.extend($$WP.Questions.BaseQuestion,"WP$Questions$GroupQuestion")}();$$WP.Debug.UnitTest=$$WP.Debug.UnitTest||{};$$WP.Debug.UnitTest.tests=$$WP.Debug.UnitTest.tests||[];$$WP.Debug.UnitTest.tests.push(function(){$$WP.Debug.UnitTest.assert});!function(){var t=$$WP.Questions.QuestionTypeEnum,i=$$WP.Questions.ResponseTypeEnum,n=function(n,t,i){this.WP$Common$ModelCollection(n,t,i)};n.prototype={convertToCoreQuestionArray:function(n){for(var r,f=[],e=0,u=0;u<this.Models.length;u++)"function"!=typeof(r=this.Models[u]).convertToCoreQuestionModel||n&&(r.QuestionType===t.Drawing||r.ResponseType===i.TimeWithUnits)||(f[e++]=r.convertToCoreQuestionModel()),r=null;return f}};$$WP.Questions=$$WP.Questions||{};$$WP.Questions.QuestionCollection=n;n.extend($$WP.Common.ModelCollection,"WP$Questions$QuestionCollection")}();$$WP.Debug.UnitTest=$$WP.Debug.UnitTest||{};$$WP.Debug.UnitTest.tests=$$WP.Debug.UnitTest.tests||[];$$WP.Debug.UnitTest.tests.push(function(){$$WP.Debug.UnitTest.assert});!function(){$$WP.Utilities.guaranteeExistence($$WP,"Questions");var n=function(){};n.prototype={ValidationSettings:null,FormElementName:null,Prompt:null};$$WP.Questions=$$WP.Questions||{};$$WP.Questions.AddressFieldSettings=n;n.extend($$WP.BaseObject,"WP$Questions$AddressFieldSettings")}();$$WP.Debug.UnitTest=$$WP.Debug.UnitTest||{};$$WP.Debug.UnitTest.tests=$$WP.Debug.UnitTest.tests||[];$$WP.Debug.UnitTest.tests.push(function(){$$WP.Debug.UnitTest.assert});!function(){var n=$$WP.Questions.AddressFieldSettings,t=function(t,i){this.Street1FieldSettings=new n;this.Street2FieldSettings=new n;this.CityFieldSettings=new n;this.StateFieldSettings=new n;this.ZipCodeFieldSettings=new n;this.WP$Questions$BaseQuestion(t,i)};t.prototype={s_dataMembers:["ID","Name","DAT","QuestionType","ResponseType","Prompt","HelpText","IsRequired","IsMultiResponse","DisplayStyle","DisplayStyleVal","IsTrigger","IsEnabled","Street1","Street2","City","States","ZipCode"],Street1:null,Street2:null,City:null,States:null,ZipCode:null,PartiallyAnswered:!1,Street1FieldSettings:null,Street2FieldSettings:null,CityFieldSettings:null,StateFieldSettings:null,ZipCodeFieldSettings:null,GroupValidationSettings:null,DropDownDefaultOptionText:null,convertToCoreQuestionModel:function(){for(var i,f,t,r,e,u={},u=this.WP$Questions$BaseQuestion$convertToCoreQuestionModel(),n=0;n<this.States.length;n++)if(null!==(i=this.States[n])&&i.IsSelected){f={Index:i.Index};break}for(t={Street1:this.Street1,Street2:this.Street2,City:this.City,State:f,ZipCode:this.ZipCode},r=this._getInvalidInputs(),n=0;n<r.length;n++)switch(e=r[n],$afe.jq(e).safeAttr("name")){case this.Street1FieldSettings.FormElementName:t.Street1=null;break;case this.Street2FieldSettings.FormElementName:t.Street2=null;break;case this.CityFieldSettings.FormElementName:t.City=null;break;case this.StateFieldSettings.FormElementName:t.State=null;break;case this.ZipCodeFieldSettings.FormElementName:t.ZipCode=null;break;default:return null}return u.Answer={Address:t},u},_updateMnemonics:function(){$$WP.Strings.setDefaultNamespace("Questions");this.Street1FieldSettings.Prompt=$$WP.Strings.getForTemplate("AddressStreetPrompt");this.Street2FieldSettings.Prompt=$$WP.Strings.getForTemplate("AddressStreetLineTwoPrompt");this.CityFieldSettings.Prompt=$$WP.Strings.getForTemplate("AddressCityPrompt");this.StateFieldSettings.Prompt=$$WP.Strings.getForTemplate("AddressStatePrompt");this.ZipCodeFieldSettings.Prompt=$$WP.Strings.getForTemplate("AddressZipPrompt");this.DropDownDefaultOptionText=$$WP.Strings.getForTemplate("DropDownDefaultOptionText");$$WP.Strings.clearDefaultNamespace()},_updateValidationSettings:function(){this.Street1FieldSettings.ValidationSettings=new $$WP.FormValidation.ValidationSettings({required:this.IsRequired,maxLength:255});this.Street2FieldSettings.ValidationSettings=new $$WP.FormValidation.ValidationSettings({maxLength:255});this.StateFieldSettings.ValidationSettings=new $$WP.FormValidation.ValidationSettings({required:this.IsRequired});this.CityFieldSettings.ValidationSettings=new $$WP.FormValidation.ValidationSettings({required:this.IsRequired,maxLength:255});this.ZipCodeFieldSettings.ValidationSettings=new $$WP.FormValidation.ValidationSettings({required:this.IsRequired,isUSZipCode:!0});this.GroupValidationSettings=new $$WP.FormValidation.ValidationGroup({name:this.FormElementName,allRequired:this.IsRequired,disableButtonsWhenEmpty:this.IsRequired,evaluateParentGroups:!0})},_getValidationSettingsForInput:function(n){switch(n.safeAttr("name")){case this.Street1FieldSettings.FormElementName:return this.Street1FieldSettings.ValidationSettings;case this.Street2FieldSettings.FormElementName:return this.Street2FieldSettings.ValidationSettings;case this.CityFieldSettings.FormElementName:return this.CityFieldSettings.ValidationSettings;case this.StateFieldSettings.FormElementName:return this.StateFieldSettings.ValidationSettings;case this.ZipCodeFieldSettings.FormElementName:return this.ZipCodeFieldSettings.ValidationSettings;default:return null}},_getGroupValidationSettings:function(){return this.GroupValidationSettings},_getInvalidInputs:function(){var t,n;return t=$afe.select('[data-lql="'+this.ID+'"]'),0===(n=this.WP$Questions$BaseQuestion$_getInvalidInputs()).length&&(this._areAllQuestionsAnswered()||this._isQuestionAnswered()&&($$WPUtil.IsNullOrEmpty(this.Street1)&&$.merge(n,t.find("[name='"+this.Street1FieldSettings.FormElementName+"']")),$$WPUtil.IsNullOrEmpty(this.City)&&$.merge(n,t.find("[name='"+this.CityFieldSettings.FormElementName+"']")),this._isStateAnswered()||$.merge(n,t.find("[name='"+this.StateFieldSettings.FormElementName+"']")),$$WPUtil.IsNullOrEmpty(this.ZipCode)&&$.merge(n,t.find("[name='"+this.ZipCodeFieldSettings.FormElementName+"']")))),n},_updateMiscSettings:function(){this.WP$Questions$BaseQuestion$_updateMiscSettings();this.Street1FieldSettings.FormElementName=this.FormElementName+"_street1";this.Street2FieldSettings.FormElementName=this.FormElementName+"_street2";this.CityFieldSettings.FormElementName=this.FormElementName+"_city";this.StateFieldSettings.FormElementName=this.FormElementName+"_state";this.ZipCodeFieldSettings.FormElementName=this.FormElementName+"_zip";this.PartiallyAnswered=this._isQuestionAnswered()&&!this._areAllQuestionsAnswered()},_updateAnswerFromDOM:function(n,t){var i,r;if(null!==n&&"object"==typeof n&&n instanceof jQuery){switch(i=n.val(),n.safeAttr("name")){case this.Street1FieldSettings.FormElementName:r=this.Street1!==i;this.Street1=i;break;case this.Street2FieldSettings.FormElementName:r=this.Street2!==i;this.Street2=i;break;case this.CityFieldSettings.FormElementName:r=this.City!==i;this.City=i;break;case this.StateFieldSettings.FormElementName:r=this._updateStateAnswer(i);break;case this.ZipCodeFieldSettings.FormElementName:r=this.ZipCode!==i;this.ZipCode=i}r&&(this.HasAnswers=this._isQuestionAnswered(),this._triggerAnswerChangedCallback(n,t,!0))}},_updateStateAnswer:function(n){for(var r,t,i=0;i<this.States.length;i++)t=this.States[i],n&&n===t.Index?(t.IsSelected||(r=!0),t.IsSelected=!0):t.IsSelected&&(t.IsSelected=!1,r=!0);return r},_isQuestionAnswered:function(){return!$$WPUtil.IsNullOrEmpty(this.Street1)||!$$WPUtil.IsNullOrEmpty(this.Street2)||!$$WPUtil.IsNullOrEmpty(this.City)||this._isStateAnswered()||!$$WPUtil.IsNullOrEmpty(this.ZipCode)},_areAllQuestionsAnswered:function(){return!$$WPUtil.IsNullOrEmpty(this.Street1)&&!$$WPUtil.IsNullOrEmpty(this.City)&&this._isStateAnswered()&&!$$WPUtil.IsNullOrEmpty(this.ZipCode)},_isStateAnswered:function(){for(var t,n=0;n<this.States.length;n++)if(this.States[n].IsSelected){t=!0;break}return t}};$$WP.Questions=$$WP.Questions||{};$$WP.Questions.AddressQuestion=t;t.extend($$WP.Questions.BaseQuestion,"WP$Questions$AddressQuestion")}();$$WP.Debug.UnitTest=$$WP.Debug.UnitTest||{};$$WP.Debug.UnitTest.tests=$$WP.Debug.UnitTest.tests||[];$$WP.Debug.UnitTest.tests.push(function(){$$WP.Debug.UnitTest.assert});!function(){var n=function(n,t){this.WP$Questions$BaseQuestion(n,t)};n.prototype={s_dataMembers:["ID","DAT","QuestionType","ResponseType","IsRequired","IsMultiResponse","IsTrigger","IsEnabled","DisplayStyle","DisplayStyleVal"],_updateMnemonics:function(){},_updateValidationSettings:function(){},_updateAnswerFromDOM:function(){},_isQuestionAnswered:function(){return!0}};$$WP.Questions=$$WP.Questions||{};$$WP.Questions.FamilyHistoryQuestion=n;n.extend($$WP.Questions.BaseQuestion,"WP$Questions$FamilyHistoryQuestion")}()