"use strict";var __assign=undefined&&undefined.__assign||function(){return __assign=Object.assign||function(n){for(var t,i,r=1,u=arguments.length;r<u;r++){t=arguments[r];for(i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])}return n},__assign.apply(this,arguments)},__extends=undefined&&undefined.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),__decorate=undefined&&undefined.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u};define("utils/query-string",["require","exports"],function(n,t){Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function n(){}return n.UpdateQueryString=function(n,t,i){var u,r,f;return i||(i=window.location.href),u=new RegExp("([?&])"+n+"=.*?(&|#|$)(.*)","gi"),u.test(i)?typeof t!="undefined"&&t!==null?i.replace(u,"$1"+n+"="+t+"$2$3"):(r=i.split("#"),i=r[0].replace(u,"$1$3").replace(/(&|\?)$/,""),typeof r[1]!="undefined"&&r[1]!==null&&(i+="#"+r[1]),i):typeof t!="undefined"&&t!==null?(f=i.indexOf("?")!==-1?"&":"?",r=i.split("#"),i=r[0]+f+n+"="+t,typeof r[1]!="undefined"&&r[1]!==null&&(i+="#"+r[1]),i):i},n.GetQueryString=function(n){var r=window.location.href,i,t;return(n=n.replace(/[\[\]]/g,"\\$&"),i=new RegExp("[?&]"+n+"(=([^&#]*)|&|#|$)"),t=i.exec(r),!t)?null:t[2]?decodeURIComponent(t[2].replace(/\+/g," ")):""},n}();t["default"]=i});define("components/account-chooser",["require","exports","utils/query-string"],function(n,t,i){function r(){$(".account-chooser--full-page .account-chooser_search").val(i["default"].GetQueryString("searchTerm"));$("body").on("keydown",".account-chooser--full-page .account-chooser_search",function(n){n.keyCode===13&&(n.preventDefault,window.location.href=i["default"].UpdateQueryString("searchTerm",n.target.value,window.location.href))});$("body").on("keyup",".account-chooser:not(.account-chooser--full-page) .account-chooser_search",function(n){var t=$(n.target).val();t?Array.from($(".account-chooser:not(.account-chooser--full-page) .dropdown-item")).forEach(function(n){n.innerText.toLocaleLowerCase().indexOf(t.toLocaleLowerCase())>=0?$(n).show():$(n).attr("style","display:none !important")}):$(".account-chooser:not(.account-chooser--full-page) .dropdown-item").show()})}Object.defineProperty(t,"__esModule",{value:!0});t["default"]=r});define("utils/cookies",["require","exports"],function(n,t){Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function n(){}return n.set=function(n,t,i){return typeof i=="undefined"&&(i=new Date,i.setTime(i.getTime()+6048e5)),document.cookie=n+"="+t+"; expires="+i.toUTCString()+"; path=/",this.get(n)},n.get=function(n){var i="; "+document.cookie,t=i.split("; "+n+"=");if(t.length==2)return t.pop().split(";").shift()},n.remove=function(n){var t=new Date;t.setTime(t.getTime()+-864e5);document.cookie=n+"=; expires="+t.toUTCString()+"; path=/"},n}();t["default"]=i});define("components/alerts",["require","exports","utils/cookies"],function(n,t,i){function r(){var n="ch-alerts";$(".alert__popup").each(function(){var r=$(this).data("alert-id"),u,t,f;if(r){if(u=r.toString(),t=i["default"].get(n),!t){$(this).removeClass("d-none");return}f=t.split(",");f.indexOf(u)===-1?$(this).removeClass("d-none"):$(this).remove()}});$(".alert__popup").on("closed.bs.alert",function(){var t=$(this).data("alert-id").toString(),r,u;t&&(r=i["default"].get(n),r?(u=r.split(","),u.push(t),i["default"].set(n,u.toString())):i["default"].set(n,t))})}Object.defineProperty(t,"__esModule",{value:!0});t["default"]=r});define("utils/number-helper",["require","exports"],function(n,t){Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function n(){}return n.formatCurrency=function(n){return"$"+n.toFixed(2).toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,")},n.formatNumber=function(n,t){return n.toFixed(t).toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,")},n}();t["default"]=i});define("components/bill-breakdown-chart",["require","exports","utils/number-helper"],function(n,t,i){function r(n){function o(n,t,i,r){var u=Math.atan((t-r)/Math.abs(n-i));return u*180/Math.PI}var h;if($("#billbreakdownchart").length>0){n.defaults.global.defaultFontFamily="myriad-pro";var s=function(n){var t=n.chart.ctx,c=$("#billbreakdownchart").width(),u=$("#billbreakdownchart").height(),i=c/2,r=u/2,f=i+n.outerRadius+15,e=i-(n.outerRadius+15),s=[],h=[];n.data.datasets.forEach(function(c,l){var a=n.getDatasetMeta(l);a.hidden||a.data.forEach(function(c,l){var p=c._model.label,b=t.measureText(p).width,v=c.getCenterPoint();if(t.fillStyle=n.options.labelColor[l],t.strokeStyle="black",t.lineWidth=2,t.textAlign="left",t.textBaseline="middle",t.font=screen.width<parseInt("768px")&&screen.width>parseInt("576px")?"normal 16px myriad-pro":screen.width<parseInt("576px")?"normal 12px myriad-pro":"normal 20px myriad-pro",v.x<i){var y=o(i,r,v.x,v.y),w=i-n.outerRadius*Math.cos(y*Math.PI/180),a=r-n.outerRadius*Math.sin(y*Math.PI/180);a<10?a=a+10:a>u-10&&(a=a-10);s.forEach(function(n){a>=n-20&&a<n&&(a=a-20);a<=n+20&&a>n&&(a=a+20)});t.beginPath();t.moveTo(w,a);t.lineTo(e,a);t.stroke();t.fillText(p,e-(b+5),a);s.push(a)}else{var y=o(i,r,v.x,v.y),w=i+n.outerRadius*Math.cos(y*Math.PI/180),a=r-n.outerRadius*Math.sin(y*Math.PI/180);a<10?a=a+10:a>u-10&&(a=a-10);h.forEach(function(n){a>=n-15&&a<=n+15&&(a=a+15)});t.beginPath();t.moveTo(w,a);t.lineTo(f,a);t.stroke();t.fillText(p,f+5,a);h.push(a)}})})},t=$("#billbreakdownchart").first(),r=[],u=[],f=[],e=[];parseFloat($(t).data("gas-delivery"))>0&&(r.push(parseFloat($(t).data("gas-delivery"))),u.push($(t).data("gas-delivery-label")),f.push("#001970"),e.push("#003366"));parseFloat($(t).data("gas-supply"))>0&&(r.push(parseFloat($(t).data("gas-supply"))),u.push($(t).data("gas-supply-label")),f.push("#006EAD"),e.push("#003366"));parseFloat($(t).data("other"))>0&&(r.push(parseFloat($(t).data("other"))),u.push($(t).data("other-label")),f.push("#b8b8b8"),e.push("#000000"));parseFloat($(t).data("taxes"))>0&&(r.push(parseFloat($(t).data("taxes"))),u.push($(t).data("taxes-label")),f.push("#f6ce3c"),e.push("#000000"));parseFloat($(t).data("electric-supply"))>0&&(r.push(parseFloat($(t).data("electric-supply"))),u.push($(t).data("electric-supply-label")),f.push("#def0e6"),e.push("#007833"));parseFloat($(t).data("electric-delivery"))>0&&(r.push(parseFloat($(t).data("electric-delivery"))),u.push($(t).data("electric-delivery-label")),f.push("#007833"),e.push("#007833"));h=new n(t,{type:"doughnut",data:{datasets:[{data:r,backgroundColor:f}],labels:u},options:{labelColor:e,aspectRatio:3,cutoutPercentage:75,elements:{center:[{text:i["default"].formatCurrency(Number($(t).data("total-charges"))),fontStyle:"myriad-pro",sidePadding:50},{text:$(t).data("total-charges-label"),fontStyle:"myriad-pro",sidePadding:40}]},tooltips:{enabled:!0,displayColors:!1,backgroundColor:"white",bodyFontSize:32,bodyFontColor:"black",borderColor:"black",borderWidth:1,callbacks:{label:function(n,t){return i["default"].formatCurrency(Math.round(t.datasets[n.datasetIndex].data[n.index]*100)/100)}}},legend:{display:!1},animation:{onProgress:function(n){n.currentStep!=n.numSteps&&s(n.chart)},onComplete:function(n){s(n.chart)}}},plugins:[{beforeDraw:function(n){var t=n.chart.ctx;n.config.options.elements.center&&n.config.options.elements.center.forEach(function(i){var r=i,f=r.fontStyle||"Arial",e=r.text,s=r.color||"#000",h=r.sidePadding||20,c=h/100*n.innerRadius*2,o,u;t.font="30px "+f;var l=t.measureText(e).width,a=n.innerRadius*2-c,v=a/l,y=Math.floor(30*v),p=n.innerRadius*2,w=Math.min(y,p);t.textAlign="center";t.textBaseline="middle";o=(n.chartArea.left+n.chartArea.right)/2;u=(n.chartArea.top+n.chartArea.bottom)/2.2;r!==n.config.options.elements.center[0]&&(u=(n.chartArea.top+n.chartArea.bottom)/1.7);t.font=w+"px "+f;t.fillStyle=s;t.fillText(e,o,u)})}}]})}}Object.defineProperty(t,"__esModule",{value:!0});t["default"]=r});define("components/bill-comparison-chart",["require","exports"],function(n,t){function i(n){function t(t){var i=new n(t,{type:"bar",data:{datasets:[{label:$(t).data("esco-label"),data:$(t).data("esco").split(",").map(function(n){return parseFloat(n)}),backgroundColor:"rgba(0, 100, 200, 0.5)"},{label:$(t).data("cenhud-label"),data:$(t).data("cenhud").split(",").map(function(n){return parseFloat(n)}),type:"line",borderColor:"rgb(75, 75, 90)",backgroundColor:"rgba(0,0,0,0)"}],labels:$(t).data("dates").split(",")},options:{maintainAspectRatio:!1,scales:{yAxes:[{ticks:{beginAtZero:!0,min:0,stepSize:200,precision:2,callback:function(n){return"$"+n}}}]},legend:{position:"bottom"}}})}if($(".billcomparisonchart").length>0){var i=$(".billcomparisonchart"),r=$(".tab-pane:not('.active')");i.each(function(n,i){return t(i)});r.addClass("active")}}Object.defineProperty(t,"__esModule",{value:!0});t["default"]=i});define("utils/alerts-helper",["require","exports"],function(n,t){Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function n(){}return n.showAlert=function(t,i){var u=$("#dynamic-alert"),f=u.find("#dynamic-alert-content"),e=u.find("#dynamic-alert-close"),r;f.length>0&&$(f[0]).html(t);u.css("display","block");r="alert-";switch(i){case 1:r+="secondary";break;case 2:r+="success";break;case 3:r+="warning";break;case 4:r+="error";break;case 0:default:r+="primary"}u.addClass(r);e.on("click keydown",function(t){(t.keyCode===13||t.type==="click")&&n.closeAlertAction(u,r)});setTimeout(function(){n.closeAlertAction(u,r)},4e3)},n.closeAlert=function(){var t=$("#dynamic-alert");n.closeAlertAction(t)},n.closeAlertAction=function(n,t){t===void 0&&(t="alert-secondary alert-success alert-warning alert-error alert-primary");n.fadeOut();n.removeClass(t)},n}();t["default"]=i});define("utils/error-messages",["require","exports"],function(n,t){Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function n(){}return n.get=function(n){var t=window.ERROR_MESSAGES;switch(n){case 2:return t.invalidRequestMessage;case 3:return t.notFoundMessage;case 4:return t.resultsNotFoundMessage;case 5:return t.serverErrorMessage;case 6:return t.unauthorizedMessage;case 7:return t.contactUsMessage;case 8:return t.unavailableMessage;case 9:return t.unknownErrorMessage;case 0:case 1:default:return""}},n.getByStatusCode=function(n){var t=window.ERROR_MESSAGES;switch(n){case 401:return t.invalidRequestMessage;case 403:return t.unauthorizedMessage;case 404:return t.notFoundMessage;case 500:default:return t.serverErrorMessage}},n}();t["default"]=i});define("components/budget-billing",["require","exports","utils/alerts-helper","utils/error-messages"],function(n,t,i,r){function u(){$("#flyout_container").on("click keydown",".budget-enrolling_submit",function(n){(n.keyCode===13||n.type==="click")&&(n.preventDefault(),$("#flyout_container .budget-enrolling").waitMe({effect:"rotation"}),$.ajax({type:"PUT",url:window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"")+"/api/accounts/active/budget",dataType:"json",data:{__RequestVerificationToken:$("input[name='__RequestVerificationToken']").val()},success:function(n){$("#flyout_container .budget-enrolling").waitMe("hide");n.result?($(".budget-enrolling").hide(),$(".budget-enrolling_enrolled").show()):alert(r["default"].get(9))},error:function(n){$("#flyout_container .budget-enrolling").waitMe("hide");i["default"].showAlert(r["default"].getByStatusCode(n.status),4)}}))});$("#flyout_container").on("click keydown",".budget-enrolling_done",function(n){(n.keyCode===13||n.type==="click")&&(n.preventDefault(),$("#flyout-close").click(),$("body").waitMe({effect:"rotation"}),window.location.reload())})}Object.defineProperty(t,"__esModule",{value:!0});t["default"]=u});define("components/flyout",["require","exports","utils/error-messages"],function(n,t,i){Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function n(){}return n.openFlyout=function(t){$("#header-menu-search").removeClass("visible");$("#flyout_container .flyout__container").waitMe({effect:"rotation"});$(".overlay").addClass("active");$("#flyout_container").addClass("active");$("html").css("overflow","hidden");$("#flyout-close").focus();$.ajax(t,{type:"GET",contentType:"text/html",dataType:"html",beforeSend:n.beforeSendFunc,success:n.successFunc,error:n.errorFunc})},n.closeFlyout=function(){if(n.closeFlyoutCallbacks!=null)for(var t=0;t<n.closeFlyoutCallbacks.length;t++)n.closeFlyoutCallbacks[t]();n.closeFlyoutCallbacks=null;$(".overlay").removeClass("active");$("#flyout_container").removeClass("active");$("html").css("overflow","auto");n.isLoading=!1},n.attachListenerIfInFlyout=function(t,i){$("#flyout_container "+t).length>0&&n.closeFlyoutCallbacks.push(i)},n.init=function(){var t=this;$("body").on("click keydown",".flyoutLink",function(n){if(n.keyCode===13||n.type==="click"){n.preventDefault();var i=$(n.currentTarget);window.history.replaceState("","",location.pathname.replace(/\/+(.*)/,"/$1")+"#"+i.data("link")+location.search);t.openFlyout(i.data("link"))}});$("#flyout-close").on("click keydown",n.closeFlyoutState);$(document).on("click",".overlay",function(){$("#flyout_container.active")&&$("#flyout-close").click()});$(document).on("click keydown",".flyout-close",n.closeFlyoutState);$(window).bind("hashchange",n.determineFlyoutState);$(document).ready(n.determineFlyoutState)},n.determineFlyoutState=function(){if(location.hash.replace("#","")!=""&&location.href.includes("/login?"))n.closeFlyout();else if(location.hash.replace("#","")=="")n.closeFlyout();else{if(n.checkDataLink(location.hash.replace("#","")))return;var t=location.hash.replace("#","");n.openFlyout(t)}},n.closeFlyoutState=function(t){(t.keyCode===13||t.type==="click")&&(t.preventDefault(),window.history.replaceState("","",location.pathname.replace(/\/+(.*)/,"/$1")+location.search),n.closeFlyout())},n.beforeSendFunc=function(){n.isLoading=!0;$("#flyout_container .flyout__container").waitMe({effect:"rotation"});$(".flyout__content").html("")},n.successFunc=function(t){n.isLoading&&(n.closeFlyoutCallbacks=[],$(".flyout__content").html(t),$("#flyout_container .flyout__container").waitMe("hide"),n.isLoading=!1)},n.errorFunc=function(){n.isLoading&&($("#flyout_container .flyout__container").waitMe("hide"),$(".flyout__content").html(i["default"].get(5)),n.isLoading=!1)},n.checkDataLink=function(n){var t=new RegExp("^(?:[a-z]+:)?//","i");return t.test(n)},n.isLoading=!1,n.closeFlyoutCallbacks=null,n}();t["default"]=r});define("components/ebills",["require","exports","utils/alerts-helper","utils/error-messages","components/flyout"],function(n,t,i,r,u){function f(){$("#flyout_container").on("click keydown",".ebill-enrolling_submit",function(n){(n.keyCode===13||n.type==="click")&&(n.preventDefault(),$("#flyout_container .ebill-enrolling").waitMe({effect:"rotation"}),$.ajax({type:"PUT",url:window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"")+"/api/accounts/active/ebill/enroll",dataType:"json",data:{__RequestVerificationToken:$("input[name='__RequestVerificationToken']").val()},success:function(n){if($("#flyout_container .ebill-enrolling").waitMe("hide"),n.result)$(".ebill-enrolling").hide(),$(".ebill-enrolling_enrolled").show(),u["default"].attachListenerIfInFlyout(".ebill-enrolling",function(){$("body").waitMe({effect:"rotation"});window.location.reload()});else{var t=n.errorMessageId;t!=0&&i["default"].showAlert(r["default"].get(t),4)}},error:function(n){$("#flyout_container .ebill-enrolling").waitMe("hide");i["default"].showAlert(r["default"].getByStatusCode(n.status),4)}}))});$("#flyout_container").on("click keydown",".ebill-enrolling_unenroll",function(n){(n.keyCode===13||n.type==="click")&&(n.preventDefault(),$("#flyout_container .ebill-enrolling").waitMe({effect:"rotation"}),$.ajax({type:"PUT",url:window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"")+"/api/accounts/active/ebill/unenroll",dataType:"json",data:{__RequestVerificationToken:$("input[name='__RequestVerificationToken']").val()},success:function(n){if($("#flyout_container .ebill-enrolling").waitMe("hide"),n.result)$(".ebill-enrolling").hide(),$(".ebill-enrolling_unenrolled").show(),u["default"].attachListenerIfInFlyout(".ebill-enrolling",function(){$("body").waitMe({effect:"rotation"});window.location.reload()});else{var t=n.errorMessageId;t!=0&&i["default"].showAlert(r["default"].get(t),4)}},error:function(n){$("#flyout_container .ebill-enrolling").waitMe("hide");i["default"].showAlert(r["default"].getByStatusCode(n.status),4)}}))})}Object.defineProperty(t,"__esModule",{value:!0});t["default"]=f});define("components/enablement-links",["require","exports"],function(n,t){function i(){$(".enablement-link-link_enabled").on("click keydown",function(n){(n.keyCode===13||n.type==="click")&&(n.preventDefault(),$($(n.target).parents(".enablement-link-link").find(".enablement-link-link_link")).find("button").click())})}Object.defineProperty(t,"__esModule",{value:!0});t["default"]=i});define("components/header-block",["require","exports"],function(n,t){function i(){function i(){var n=$(".quick-links--mobile").first().outerHeight()+10;$(".quick-links--mobile").css("display")==="none"?($(".footer").css("padding-bottom","10px"),t=10):t!==n&&($(".footer").css("padding-bottom",n+"px"),t=n)}function r(t,i,r){r===void 0&&(r=!1);r||i.hasClass(f)?(i.find(".sidebar__links__dropdown").slideUp(n),u.each(function(i,r){var u=$(r).find("a").first();u.attr("id")!==t&&$(r).slideDown(n)})):(u.each(function(i,r){var u=$(r).find("a").first();u.attr("id")!==t&&$(r).slideUp(n)}),i.find(".sidebar__links__dropdown").slideDown(n));i.toggleClass(f)}var t=0;$(window).on("resize",i);$(document).ready(i);$("#header-menu-btn").on("click keydown",function(n){(n.keyCode===13||n.type==="click")&&(n.preventDefault(),$("#header-menu-search").removeClass("visible"),$(".sidebar").addClass("active"),$(".overlay").addClass("active"),$("html, body").css("overflow","hidden"),$("body").addClass("lock-body"),n.which===13&&$("#navbarItem0").focus())});$("#sidebar-close").on("click keydown",function(n){if(n.keyCode===13||n.type==="click"){n.preventDefault();$(".overlay").removeClass("active");$(".sidebar").removeClass("active");$("html, body").css("overflow","auto");$("body").removeClass("lock-body");n.which===13&&$("#header-menu-btn").focus();var t=$(".sidebar__links--open > a").attr("id"),i=$(".sidebar__links--open > a").parent();r(t,i,!0)}});$(document).on("click",".overlay",function(){$(".sidebar.active")&&$("#sidebar-close").click()});var u=$(".sidebar__links__item"),n=225,f="sidebar__links--open";$(".sidebar__links__item.dropdown > a").on("click keydown",function(n){if(n.keyCode===13||n.type==="click"){n.preventDefault();var t=$(this).attr("id"),i=$(this).parent();r(t,i)}});$("#header-search-btn").on("click keydown",function(n){var t,i;(n.keyCode===13||n.type==="click")&&(n.preventDefault(),t=$("#header-menu-search"),t.toggleClass("visible"),t.hasClass("visible")&&(i=$("#header-menu-search").find(".header-search_input.tt-input"),i.focus()))});$(".header-search_input").on("keydown",function(n){n.keyCode===13&&(n.preventDefault(),$($(n.target).closest(".twitter-typeahead")).parent().find(".header-search-btn_submit").click())});$(".header-search-btn_submit").on("click keydown",function(n){if(n.keyCode===13||n.type==="click"){n.preventDefault();var t=$($(n.target).closest(".search-input_container")).find(".header-search_input.tt-input");window.location.href=t.data("typeahead-page")+"?q="+t.val()}});$(".header-search-btn_close").on("click keydown",function(n){(n.keyCode===13||n.type==="click")&&(n.preventDefault(),$("#header-menu-search").toggleClass("visible"))});window.addEventListener("popstate",function(n){var t=navigator.userAgent.indexOf("Safari")>-1?!0:!1,i=navigator.userAgent.indexOf("Firefox")>-1?!0:!1;(t||i)&&(n.preventDefault(),history.go(-2),window.onpageshow=function(n){n.persisted&&window.location.reload()})})}Object.defineProperty(t,"__esModule",{value:!0});t["default"]=i});define("utils/form-validator",["require","exports"],function(n,t){Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function n(){}return n.validateEmail=function(n){return n.length===0?!1:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(n)},n.validatePhoneNumber=function(n){return n.length===0?!1:(n=n.replace(/[-\s]/,""),/\d{10,11}/.test(n))},n.validateAccountNumber=function(n){return/^(\d{10}|\d{11})$/.test(n)},n.validateAccountNumberWithChecksum=function(n){return n.length!==11?!1:/\d{11}/.test(n)},n.validateZipCode=function(n){return n.length<5?!1:/\d+/.test(n)},n.updateVisibiltyFromRadioGroup=function(t,i,r){r===void 0&&(r="d-none");$(t).on("change",function(){n.refreshVisibiltyFromRadioGroup(t,i,r)});n.refreshVisibiltyFromRadioGroup(t,i,r)},n.refreshVisibiltyFromRadioGroup=function(n,t,i){i===void 0&&(i="d-none");var r=$(n+":checked").val();t.forEach(function(n,t){r==t?$(n).removeClass(i):$(n).addClass(i)})},n.updateVisibiltyFromDropDown=function(t,i){$(t).on("change",function(){n.refreshVisibiltyFromDropDown(t,i)});n.refreshVisibiltyFromDropDown(t,i)},n.refreshVisibiltyFromDropDown=function(n,t){var i=$(n).val();t.forEach(function(n,t){i==t?$(n).removeClass("d-none"):$(n).addClass("d-none")})},n.updateVisibiltyFromCheckbox=function(t,i,r){r===void 0&&(r=null);$(t).on("change",function(){n.refreshVisibiltyFromCheckbox(t,i,r)});n.refreshVisibiltyFromCheckbox(t,i,r)},n.refreshVisibiltyFromCheckbox=function(n,t,i){i===void 0&&(i=null);$(n).prop("checked")?(t&&$(t).removeClass("d-none"),i&&$(i).addClass("d-none")):(t&&$(t).addClass("d-none"),i&&$(i).removeClass("d-none"))},n}();t["default"]=i});define("components/password-validator",["require","exports"],function(n,t){function r(){function u(n,t){n?t.addClass("password-rules--valid"):t.removeClass("password-rules--valid")}var o=$("#password-validator"),s=$("#password-rules"),t,r,f,n,e;if(!(o.length<1)&&!(s.length<1)){t=$("#Password");r=$("#PasswordConfirm");$("#ShowPassword").on("click keydown",function(n){(n.keyCode===13||n.type==="click")&&(t.attr("type",t.attr("type")==="text"?"password":"text"),r.attr("type",r.attr("type")==="text"?"password":"text"))});f=null;n=!0;t.on("keyup",function(){f&&clearTimeout(f);f=setTimeout(function(){var f=t.val(),w=r.val(),e,o,s,h,c,l,a,v,y,p;n=!0;e=$("#lowercase-rule");e.length>0&&(o=i.HasAtleastOneLowerCase(f),u(o,e),n=n&&o);s=$("#uppercase-rule");s.length>0&&(h=i.HasAtleastOneUpperCase(f),u(h,s),n=n&&h);c=$("#number-rule");c.length>0&&(l=i.HasAtleastOneNumber(f),u(l,c),n=n&&l);a=$("#symbol-rule");a.length>0&&(v=i.HasAtleastOneSymbol(f),u(v,a),n=n&&v);y=$("#minchar-rule");y.length>0&&(p=i.HasAtleast8Characters(f),u(p,y),n=n&&p);$("input[type=submit]").prop("disabled",!(n&&f===w))},400)});e=null;r.on("keyup",function(){e&&clearTimeout(e);e=setTimeout(function(){var u=t.val(),f=r.val(),i=u===f;i?$("#confirm-password-error").hide():$("#confirm-password-error").show();$("input[type=submit]").prop("disabled",!(n&&i))},400)})}}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function n(){}return n.HasAtleast8Characters=function(n){return n.length>=8?!0:!1},n.HasAtleastOneNumber=function(n){return/\d/g.test(n)?!0:!1},n.HasAtleastOneSymbol=function(n){return/[!@#$%^&*(),.?":{}|<>]/g.test(n)?!0:!1},n.HasAtleastOneLowerCase=function(n){return/[a-z]/g.test(n)?!0:!1},n.HasAtleastOneUpperCase=function(n){return/[A-Z]/g.test(n)?!0:!1},n.DoesNotContainUserId=function(n,t){var t=t.toUpperCase(),i=n.split("@")[0].toUpperCase();return t&&!t.includes(i)?!0:!1},n}();t.PasswordValidator=i;t["default"]=r});define("components/page-adjustments",["require","exports"],function(n,t){function i(){function n(){var f=t.outerHeight(),n;i.css("margin-bottom","-"+f+"px");r.css("height",f+"px");n=0;$(".alert__popup").each(function(t,i){var r=$(i).outerHeight();r>n&&(n=r)});u.css("height",n+"px")}var t,i,r,u;t=$("footer.footer").first();i=$(".page-wrapper").first();r=$(".page-push").first();u=$(".alert-push").first();$(window).on("resize",function(){return n()});n();$(".alert").on("closed.bs.alert",function(){n()})}Object.defineProperty(t,"__esModule",{value:!0});t["default"]=i});define("components/meter-reading-form",["require","exports"],function(n,t){function i(){function n(){$("input[name=MeterTypeChoice]:checked").val()=="StandardMeter"?($(".tou-reading").addClass("d-none"),$(".standard-reading").removeClass("d-none")):($(".standard-reading").addClass("d-none"),$(".tou-reading").removeClass("d-none"))}$(".meter-reading").on("change","#MeterTypeStandardChoice",n);$(".meter-reading").on("change","#MeterTypeTOUChoice",n);n()}Object.defineProperty(t,"__esModule",{value:!0});t["default"]=i});define("components/modal",["require","exports","utils/cookies"],function(n,t,i){function r(){var n="ch-popups",t;$(".modal-auto").each(function(t,r){var u=$(r),h=u.data("popup-id"),s=!0,f,e,o;h&&(f=h.toString(),e=i["default"].get(n),e&&(o=e.split(","),s=o.indexOf(f)===-1),s&&u.data("popup-frequency")=="Once"&&(e?(o=e.split(","),o.push(f),i["default"].set(n,o.toString())):i["default"].set(n,f)),u.find("a.modal-cancel-permanent").click(function(){var r=i["default"].get(n),t;r?(t=r.split(","),t.push(f),i["default"].set(n,t.toString())):i["default"].set(n,f);u.modal("hide")}));s&&window.setTimeout(function(){u.modal()},u.data("delay")*1e3)});$("#globalModal").on("show.bs.modal",function(n){var r=$(n.target),i=$(n.relatedTarget).data(),u,f;r.data("modal-data",i);u=r.find(".modal-dialog");r.find(".modal-title").html(i.modalTitle||"");r.find(".modal-subtitle").html(i.modalSubtitle||"");i.modalCloseButtonVisible!==!0?r.find(".modal-header .close").hide():r.find(".modal-header .close").show();i.modalSize=="XL"?u.addClass("modal-xl").removeClass(["modal-lg","modal-sm"]):i.modalSize=="LG"?u.addClass("modal-lg").removeClass(["modal-xl","modal-sm"]):i.modalSize=="SM"?u.addClass("modal-sm").removeClass(["modal-xl","modal-lg"]):u.removeClass(["modal-xl","modal-lg","modal-sm"]);i.modalBody?(r.find(".modal-footer").show(),r.find(".modal-body p").html(i.modalBody),r.find("button.modal-ok").addClass(i.modalOkButtonClass||"button button--primary").html(i.modalOkButtonText||"OK"),i.modalOkButtonVisible!==!1?r.find("button.modal-ok").show():r.find("button.modal-ok").hide(),r.find("button.modal-cancel").addClass(i.modalOkButtonClass||"button button--default").html(i.modalCancelButtonText||"Cancel"),i.modalCancelButtonVisible!==!1?r.find("button.modal-cancel").show():r.find("button.modal-cancel").hide(),i.modalOkButtonClick&&(eval("handler="+i.modalOkButtonClick),r.find("button.modal-ok").click(function(){typeof t=="function"&&t();$("#globalModal").modal("hide")}))):i.modalUrl&&(r.find(".modal-footer").hide(),f=document.documentElement.lang,$.ajaxSetup({headers:{"Accept-Language":f}}),r.find(".modal-body p").waitMe({effect:"rotation"}).load(i.modalUrl))}).on("shown.bs.modal",function(n){var t=$(n.target);t.find("form[data-ajax]").each(function(n,t){$.validator.unobtrusive.parse("#"+t.id)})}).on("hide.bs.modal",function(n){var i=$(n.target),r=i.data("modal-data"),u=i.find(".modal-data").data();t=undefined;(r&&r.modalReloadOnClose===!0||u&&u.modalReloadOnClose===!0)&&($("body").waitMe({effect:"rotation"}),window.location.reload())})}Object.defineProperty(t,"__esModule",{value:!0});t["default"]=r});define("utils/date-helper",["require","exports"],function(n,t){Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function n(){}return n.formatTime=function(n,t){var i,r="am",u;return n===0?(i="12:",r="am"):n===12?(i="12:",r="pm"):n>12?(i=n-12+":",r="pm"):i=n+":",u=t.toString(),i+=u.length<2?"0"+t:t,i+r},n.formatTimeFromTimestamp=function(n){var t=new Date(n);return this.formatTime(t.getHours(),t.getMinutes())},n.formatDateFromUnixTimestamp=function(n,t,i,r){var u=new Date(n),f=this.formatTime(u.getHours(),u.getMinutes());return t[u.getDay()]+" "+i[u.getMonth()]+" "+u.getDate()+", "+u.getFullYear()+" "+r+" "+f},n.parseDateStringArray=function(n){return n.split(",").map(function(n){return new Date(n)})},n.isDateInArray=function(n,t){var r=n.getTime(),i;return t?(i=t.map(function(n){return n.getTime()}),$.inArray(r,i)==-1)?!1:!0:!1},n}();t["default"]=i});define("utils/mask",["require","exports"],function(n,t){Object.defineProperty(t,"__esModule",{value:!0});var i="(000) 000-0000",r="0000-0000-00-0",u="000000000",f="000-00-0000",e="0000-0000-00-0",o=function(){function n(){}return n.getRawValue=function(n){return n.replace(/[\s+\(\)-]/g,"")},n.getMaskedPhoneNumber=function(n){var t=n.replace(/\D/g,"").match(/(\d{0,3})(\d{0,3})(\d{0,4})/);return t[2]?t[1]+"-"+t[2]+(t[3]?"-"+t[3]:""):t[1]},n.phoneNumber=function(n,t){n===void 0&&(n=".phone-number");t===void 0&&(t={});$(n).mask(i,__assign({selectOnFocus:!1},t))},n.accountNumber=function(n,t){n===void 0&&(n=".account-number");t===void 0&&(t={});$(n).mask(r,__assign({selectOnFocus:!1},t))},n.accountNumberChecksum=function(n,t){n===void 0&&(n=".account-number-checksum");t===void 0&&(t={});$(n).mask(e,__assign({selectOnFocus:!1},t))},n.customerNumber=function(n,t){n===void 0&&(n=".customer-number");t===void 0&&(t={});$(n).mask(u,__assign({selectOnFocus:!1},t))},n.ssNumber=function(n,t){n===void 0&&(n=".ss-number");t===void 0&&(t={});$(n).mask(f,__assign({selectOnFocus:!1},t))},n.custom=function(n,t,i){i===void 0&&(i={});$(n).mask(t,__assign({selectOnFocus:!1},i))},n.driversLicense=function(n,t){n===void 0&&(n=".drivers-license");t===void 0&&(t={});$(n).mask("AAAAZZZZZZZZZZZ",__assign({translation:{Z:{pattern:/[a-zA-Z0-9]/,optional:!0}}},t))},n.stateID=function(n,t){n===void 0&&(n=".state-id");t===void 0&&(t={});$(n).mask("AAAZZZZZZZZZZZZZZZZZ",__assign({translation:{Z:{pattern:/[a-zA-Z0-9]/,optional:!0}}},t))},n.passportNumber=function(n,t){n===void 0&&(n=".passport");t===void 0&&(t={});$(n).mask("AAAZZZZZZZZZZZZZZZZZ",__assign({translation:{Z:{pattern:/[a-zA-Z0-9]/,optional:!0}}},t))},n.paNumber=function(n,t){n===void 0&&(n=".pa-number");t===void 0&&(t={});$(n).mask("ZZZZZZZZZZ",__assign({translation:{Z:{pattern:/[a-zA-Z0-9]/,optional:!0}}},t))},n}();t["default"]=o});define("components/discontinue-service",["require","exports","utils/date-helper","utils/mask"],function(n,t,i,r){Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function n(){}return n.init=function(){$("#PhoneNumber").length>0&&$("#Date").length>0&&(r["default"].phoneNumber("#PhoneNumber"),n.initDateLimitedDatePicker())},n.initDateLimitedDatePicker=function(){var n=i["default"].parseDateStringArray($("#Date").data("allowed-dates").toString());$(function(){$("#Date").datepicker({beforeShowDay:function(t){if(!i["default"].isDateInArray(t,n))return{enabled:!1}},format:"mm/dd/yyyy"})})},n}();t["default"]=u});define("components/payment-extension",["require","exports"],function(n,t){function i(){function i(){$(".optionSelection").show();$(".final-agreement-container").hide();$(".final-agreement-text.optionSelected-1").hide();$(".final-agreement-text.optionSelected-2").hide();$(".final-agreement-buttons").hide()}function r(n){$(".optionSelection").hide();$(".final-agreement-container").show();$(".final-agreement-text.optionSelected-"+n).show();$(".final-agreement-buttons").show()}function u(){$(".optionSelection").hide();$(".final-agreement-container").hide();$(".final-agreement-text.optionSelected-1").hide();$(".final-agreement-text.optionSelected-2").hide();$(".final-agreement-buttons").hide();$(".request-error").hide();$(".request-success").show()}function n(){$(".optionSelection").hide();$(".final-agreement-container").hide();$(".final-agreement-text.optionSelected-1").hide();$(".final-agreement-text.optionSelected-2").hide();$(".final-agreement-buttons").hide();$(".request-success").hide();$(".request-error").show()}function f(t){t.result?u():n()}function t(){return $("input[name=options]:checked").val()}function e(){var i=$("input[name=__RequestVerificationToken]").val(),r={chosenOption:t,__RequestVerificationToken:i};$.ajax({url:"/api/accounts/active/paymentextension",type:"PUT",data:r,success:f,error:n})}$(document).ready(function(){$("input[name=optionSelectButton]").click(function(){r(t())});$("input[name=cancelButton]").click(function(){i()});$("input[name=finalAcceptanceButton]").click(function(){e()})})}Object.defineProperty(t,"__esModule",{value:!0});t["default"]=i});define("components/typeahead",["require","exports"],function(n,t){function i(){function n(){var n=$(this),t=n.data("typeahead-page"),i=new Bloodhound({datumTokenizer:Bloodhound.tokenizers.obj.whitespace("value"),queryTokenizer:Bloodhound.tokenizers.whitespace,remote:{url:"/find_v2/_autocomplete?prefix=%QUERY&size=5",wildcard:"%QUERY",transform:function(n){return n.hits.map(function(n){return n.query})},prepare:function(n,t){return t.url=t.url.replace("%QUERY",n),t}}});n.typeahead({},{name:"search-results",source:i});n.bind("typeahead:select",function(n,i){console.log("Selection: "+i);window.location.href=t+"?q="+i+"&page=1"})}$("[data-typeahead]").each(n)}Object.defineProperty(t,"__esModule",{value:!0});t["default"]=i});define("components/unobtrusive-forms",["require","exports"],function(n,t){function i(){$(document).on("submit","form[data-spin-onsubmit]",function(n){var i=$(n.target),t=i.data("spinOnsubmit")||{},r;t.effect=t.effect||"rotation";r=i.data("spinOnsubmitSelector");r!=undefined?$(r).waitMe(t):i.waitMe(t)});$(document).ajaxSuccess(function(){$.validator.unobtrusive.parse("form[data-ajax=true]")})}Object.defineProperty(t,"__esModule",{value:!0});t["default"]=i});define("utils/downloaders",["require","exports"],function(n,t){Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function n(){}return n.DownloadCsv=function(n,t){var n=n+".csv",i=document.createElement("a");i.style.display="none";i.setAttribute("target","_blank");i.setAttribute("href","data:text/csv;charset=utf-8,"+encodeURIComponent(t));i.setAttribute("download",n);document.body.appendChild(i);i.click();document.body.removeChild(i)},n}();t["default"]=i});define("components/usage-history-chart",["require","exports","utils/downloaders"],function(n,t,i){function r(n){function u(t){function et(){for(var t,f,e,o,s=Math.floor(c.length/i),n=0;n<=s;n++){var e=n*i-1>=0?n*i-1:0,o=n===s?n*i+i:n*i+i-1,h={};for(t in r)h[t]=r[t].slice(e,o);ut.push(h)}if(c.length>0)for(f=Math.floor(c.length/i),n=0;n<=f;n++)e=n*i-1>=0?n*i-1:0,o=n===f?n*i+i:n*i+i-1,v.push(c.slice(e,o));else v.push([]);y=v.length;u=y-1}function k(){u>=v.length||(d(h.data,ut[u],v[u]),$("#chart-next-elec,#chart-next-gas").show(),$("#chart-prev-elec,#chart-prev-gas").show(),u===y-1?$("#chart-next-elec,#chart-next-gas").hide():u===0&&$("#chart-prev-elec,#chart-prev-gas").hide(),u===0&&y===1&&($("#chart-next-elec,#chart-next-gas").hide(),$("#chart-prev-elec,#chart-prev-gas").hide()))}function nt(){window.matchMedia("(min-width: 768px)").matches?(d(h.data,r,c),ft=!1):(ft=!0,k());h.update()}function d(n,i,r){var e,u,f;if(n.labels=r,e=0,t.getAttribute("data-show-cost")=="true"){var o=Array(r.length).fill(0),s=Array(r.length).fill(0),h=Array(r.length);for(f in i)for(u=0;u<i[f].length;u++)i[f][u]&&i[f][u].cost&&(o[u]+=i[f][u].cost),i[f][u]&&i[f][u].usage&&(s[u]+=i[f][u].usage),h[u]=i[f][u].timeRange;n.datasets[e].data=o;n.datasets[e].cost=o;n.datasets[e].usage=s;n.datasets[e].timeRange=h;e++}for(f in i)tt(i,e,r,!1,f),e++,tt(i,e,r,!0,f),e++}function tt(n,i,r,u,f){for(var s=Array(r.length),h=Array(r.length),c=Array(r.length),l=Array(r.length),a=f,e=0;e<n[f].length;e++)n[f][e]==null?(s[e]=0,h[e]=0,c[e]=b.actualUsageColor,l[e]=""):u?(s[e]=n[f][e].isEst?n[f][e].usage:0,h[e]=n[f][e].isEst?n[f][e].cost:0,c[e]=b.estimatedUsageColor,l[e]=n[f][e].isEst?n[f][e].timeRange:null):(s[e]=n[f][e].isEst?0:n[f][e].usage,h[e]=n[f][e].isEst?0:n[f][e].cost,c[e]=b.actualUsageColor,l[e]=n[f][e].isEst?null:n[f][e].timeRange);o.datasets[i].data=s;o.datasets[i].usage=s;t.getAttribute("data-show-cost")=="true"&&(o.datasets[i].cost=h);o.datasets[i].backgroundColor=c;o.datasets[i].timeRange=l;o.datasets[i].meterNumber=a}function ot(n,i){var r,u;if(n===0&&t.getAttribute("data-show-cost")=="true"){if(r=i.options.scales.yAxes.filter(function(n){return n.id==="costAxes"}),r.length===0)return;u=!r[0].gridLines.display;r[0].gridLines.display=u;r[0].scaleLabel.fontColor=u?"black":"transparent";r[0].ticks.minor&&(r[0].ticks.minor.fontColor=u?"black":"transparent");r[0].ticks.major&&(r[0].ticks.major.fontColor=u?"black":"transparent")}}var c,g=t.getAttribute("data-months"),it,p,w,s,l,h;if(c=g!==null&&g!==""?JSON.parse(g):[],c.length===0){it=t.getAttribute("data-no-data-msg");$(t).hide();$(t).after("<strong>"+it+"<\/strong>");$(t).parent().css("min-height","auto");return}var rt=t.getAttribute("data-chart-type"),b=rt==="Electric"?f:e,a=JSON.parse(t.getAttribute("data-chart-labels")),r=JSON.parse(t.getAttribute("data-usage-metrics")),ut=[],v=[],u=3,y=4,ft=!1,i=6,o={labels:[],datasets:[]};t.getAttribute("data-show-cost")=="true"&&o.datasets.push({label:a.costLabel,data:[],type:"line",borderColor:"#000",backgroundColor:"#000",lineTension:0,pointRadius:7,pointBackgroundColor:"#000",pointBorderWidth:1,pointHoverRadius:10,fill:!1,yAxisID:"costAxes",hidden:!0});for(s in r)o.datasets.push({label:a.actualUsageLabel+" "+s,fill:!1,spanGaps:!0,data:[],backgroundColor:[],yAxisID:"usageKWhAxes"});for(s in r)o.datasets.push({label:a.estimatedUsageLabel+" "+s,fill:!1,spanGaps:!0,data:[],backgroundColor:[],yAxisID:"usageKWhAxes"});d(o,r,c);p=0;w=0;for(s in r)for(l=0;l<r[s].length;l++)r[s][l]&&(w=Math.max(w,r[s][l].usage),r[s][l].cost&&(p=Math.max(p,r[s][l].cost)));h=new n(t,{type:"bar",data:o,options:{responsive:!0,maintainAspectRatio:!1,scales:{yAxes:[{id:"usageKWhAxes",scaleLabel:{display:!0,fontColor:"black",fontSize:14,labelString:a.usageYAxisLabel},display:"auto",position:"left",min:0,suggestedMax:w,maxTicksLimit:8,stacked:!0,ticks:{beginAtZero:!1}},{id:"costAxes",scaleLabel:{display:!0,fontColor:"transparent",fontSize:16,labelString:a.costLabel},position:"right",min:0,stacked:!0,ticks:{major:{fontColor:"transparent"},minor:{fontColor:"transparent"},beginAtZero:!1,min:0,suggestedMax:p,maxTicksLimit:8,callback:function(n){return"$"+n}},gridLines:{display:!1,drawOnChartArea:!1},animation:!1}],xAxes:[{barPercentage:1,stacked:!0,categoryPercentage:.95,maxBarThickness:80,gridLines:{display:!1}}]},legend:{display:!1},tooltips:{position:"average",backgroundColor:"#ffffff",titleFontColor:"#010101",titleFontSize:18,bodyFontColor:b.actualUsageColor,bodyFontSize:18,bodyFontStyle:"bold",footerFontColor:"#010101",footerFontSize:16,footerFontStyle:"normal",borderColor:"#cfcfcf",borderWidth:2,xPadding:12,yPadding:12,callbacks:{title:function(n,t){var i=n[0],r=t.datasets[i.datasetIndex].usage[i.index];return r.toLocaleString()+" "+(rt==="Electric"?"kWh":"Ccf")},label:function(){return""},afterBody:function(n,t){var i=n[0],r="",u=t.datasets[i.datasetIndex].cost;return u!=null&&(r=u[i.index].toLocaleString("en-US",{style:"currency",currency:"USD"})),r},footer:function(n,t){var i=n[0];return t.datasets[i.datasetIndex].timeRange[i.index]},afterFooter:function(n,t){var i=n[0],r=t.datasets[i.datasetIndex].meterNumber,u=""+(a.meterLabel+": "+r);return t.datasets[i.datasetIndex].label!=a.costLabel?u:""}}}}});et();$(document).ready(function(){$("#chart-next-elec,#chart-next-gas").on("click keydown",function(n){(n.type==="click"||n.keyCode===13)&&(n.preventDefault(),u+1<y&&u++,k(),h.update())});$("#chart-prev-elec,#chart-prev-gas").on("click keydown",function(n){(n.type==="click"||n.keyCode===13)&&(n.preventDefault(),u-1>=0&&u--,k(),h.update())})});$(".custom-legend-checkbox").change(function(){var n=parseInt($(this).attr("data-dataset"));h.getDatasetMeta(n).hidden=$(this).is(":checked")?!1:!0;$(".custom-legend-checkbox[data-dataset*='"+n+"']").prop("checked",$(this).is(":checked"));n==0&&ot(0,h);h.update()});t.getAttribute("data-paging")=="true"&&(nt(),window.addEventListener("resize",nt))}var t;if(n.defaults.global.defaultFontFamily="myriad-pro",t=".usage-history-chart",!($(t).length<=0)){$(".usage-export").on("click keydown",function(n){var t,f,e,r,u,h;if(n.type==="click"||n.keyCode===13){n.preventDefault();var c=document.querySelectorAll(".active table.data-table tr"),o=[],s=[];for(s.push('"'+$(".data-table").data("csvtitle")+'"'),s.push('"'+$(".account-chooser_number")[0].innerText+'"'),o.push(s),t=0;t<c.length;t++){for(f=[],e=c[t].querySelectorAll("td, th"),r=0;r<e.length;r++)u=e[r].innerText.replace(/(\r\n|\n|\r)/gm,"").replace(/(\s\s)/gm," "),u=u.replace(/"/g,'""'),f.push('"'+u+'"');o.push(f.join(","))}h=o.join("\n");i["default"].DownloadCsv("usage_"+(new Date).toLocaleDateString(),h)}});var f={actualUsageColor:"#43763B",estimatedUsageColor:"#98A88B"},e={actualUsageColor:"#13206F",estimatedUsageColor:"#AAA6BF"},o=$(t),r=$(".tab-pane:not('.active')");r.addClass("active");o.each(function(n,t){return u(t)});r.removeClass("active")}}Object.defineProperty(t,"__esModule",{value:!0});t["default"]=r});define("components/natural-gas-availability",["require","exports","utils/mask"],function(n,t,i){function u(){r()}function r(){function n(){$("input[name=SearchType]:checked").val()=="Address"?($(".account-search").addClass("d-none"),$(".address-search").removeClass("d-none")):($(".address-search").addClass("d-none"),$(".account-search").removeClass("d-none"))}window.scrollTo(0,0);$.applyDataMask();i["default"].ssNumber();i["default"].phoneNumber();i["default"].accountNumber();$("#SearchTypeAccount").on("change",n);$("#SearchTypeAddress").on("change",n);n()}Object.defineProperty(t,"__esModule",{value:!0});t["default"]=u;t.initForm=r});define("components/gas-service-agreement",["require","exports","utils/mask","utils/form-validator"],function(n,t,i,r){function f(){u()}function u(){$.applyDataMask();$(".datepicker").datepicker({format:"mm/dd/yyyy"});i["default"].ssNumber();i["default"].phoneNumber();i["default"].accountNumber();r["default"].updateVisibiltyFromDropDown("#DwellingType",new Map([["Other",".other-dwelling"]]));r["default"].updateVisibiltyFromDropDown("#MeterLocation",new Map([["OppositeGarage",".meter-location-garage"],["OtherLocation",".meter-location-other"]]));r["default"].updateVisibiltyFromCheckbox("#IsServiceUpgrade",".isGas-Appliances");r["default"].updateVisibiltyFromCheckbox("#IsAdditionalgasMeters",".isMeters-Installed");r["default"].updateVisibiltyFromCheckbox("#IsServiceReconnection",".isGas-Reconnection");r["default"].updateVisibiltyFromRadioGroup("#ReconnectionFire",new Map([["true",".isGas-Other"],["false",".isGas-Other"]]));r["default"].updateVisibiltyFromCheckbox("#ReconnectionOther",".isGas-Other");r["default"].updateVisibiltyFromCheckbox("#HasFurnace",".furnace-btu");r["default"].updateVisibiltyFromCheckbox("#HasTanklessWaterHeater",".tanklesswaterheater-btu");r["default"].updateVisibiltyFromCheckbox("#HasWaterHeater",".waterheater-btu");r["default"].updateVisibiltyFromCheckbox("#HasFireplace",".fireplace-btu");r["default"].updateVisibiltyFromCheckbox("#HasOven",".oven-btu");r["default"].updateVisibiltyFromCheckbox("#HasDryer",".dryer-btu");r["default"].updateVisibiltyFromCheckbox("#HasPoolHeater",".poolheater-btu");r["default"].updateVisibiltyFromCheckbox("#HasGarageHeater",".garageheater-btu");r["default"].updateVisibiltyFromCheckbox("#HasGenerator",".generator-btu");window.scrollTo(0,0)}Object.defineProperty(t,"__esModule",{value:!0});t["default"]=f;t.initForm=u});define("components/commercial-data",["require","exports","utils/mask"],function(n,t,i){function u(){r()}function r(){var n=document.querySelector('div[id="commercial-data"]');n!=null&&($.applyDataMask(),$(".datepicker").datepicker({format:"mm/dd/yyyy"}),i["default"].ssNumber(),i["default"].phoneNumber(),i["default"].accountNumber(),window.scrollTo(0,0))}Object.defineProperty(t,"__esModule",{value:!0});t["default"]=u;t.initForm=r});define("components/residential-data",["require","exports","utils/mask"],function(n,t,i){function u(){r()}function r(){var n=document.querySelector('div[id="residential-data"]');n!=null&&($.applyDataMask(),$(".datepicker").datepicker({format:"mm/dd/yyyy"}),i["default"].ssNumber(),i["default"].phoneNumber(),i["default"].accountNumber(),window.scrollTo(0,0))}Object.defineProperty(t,"__esModule",{value:!0});t["default"]=u;t.initForm=r});define("components/find-customer",["require","exports","utils/mask"],function(n,t,i){function u(){r()}function r(){function n(){var n=$("#SearchType").val();n==="CustomerNumber"?($(".customer-number-search").removeClass("d-none"),$(".ssn-search").addClass("d-none"),$(".account-number-search").addClass("d-none"),$(".phone-search").addClass("d-none"),$(".email-search").addClass("d-none")):n==="SSN"?($(".customer-number-search").addClass("d-none"),$(".ssn-search").removeClass("d-none"),$(".account-number-search").addClass("d-none"),$(".phone-search").addClass("d-none"),$(".email-search").addClass("d-none")):n==="AccountNumber"?($(".customer-number-search").addClass("d-none"),$(".ssn-search").addClass("d-none"),$(".account-number-search").removeClass("d-none"),$(".phone-search").addClass("d-none"),$(".email-search").addClass("d-none")):n==="Phone"?($(".customer-number-search").addClass("d-none"),$(".ssn-search").addClass("d-none"),$(".account-number-search").addClass("d-none"),$(".phone-search").removeClass("d-none"),$(".email-search").addClass("d-none")):n==="Email"?($(".customer-number-search").addClass("d-none"),$(".ssn-search").addClass("d-none"),$(".account-number-search").addClass("d-none"),$(".phone-search").addClass("d-none"),$(".email-search").removeClass("d-none")):($(".customer-number-search").addClass("d-none"),$(".ssn-search").addClass("d-none"),$(".account-number-search").addClass("d-none"),$(".phone-search").addClass("d-none"),$(".email-search").addClass("d-none"))}$.applyDataMask();i["default"].ssNumber();i["default"].phoneNumber();i["default"].accountNumber();$("#SearchType").on("change",n);n()}Object.defineProperty(t,"__esModule",{value:!0});t["default"]=u;t.initForm=r});define("services/accounts-service",["require","exports"],function(n,t){Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function n(n){this.csrf="";this.baseUrl="";this.baseApiUrl="";this.baseUrl=window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"")+"/api/accounts/";this.baseApiUrl=n+"/v2/accounts";this.csrf=$('[name="__RequestVerificationToken"]').last().val().toString()}return n.prototype.getCurrentAccounts=function(n,t){t===void 0&&(t=null);$.ajax({url:this.baseUrl+"current",type:"GET",dataType:"json",data:{},success:function(t){t?n(t):n([])},error:function(n,i,r){console.error("Error retrieving accounts: ");console.error(r);t&&t()}})},n.prototype.getAccountByAccountNumber=function(n,t,i){i===void 0&&(i=null);var r={accountNumber:n.value,zipCode:n.zipcode.trim(),recaptchaToken:n.recaptchaToken};this.getAccounts(r,this.baseApiUrl,t,i)},n.prototype.getAccountByPhoneNumber=function(n,t,i){i===void 0&&(i=null);var r={phoneNumber:n.value,zipCode:n.zipcode.trim(),recaptchaToken:n.recaptchaToken};this.getAccounts(r,this.baseApiUrl,t,i)},n.prototype.getAccountByEmail=function(n,t,i){i===void 0&&(i=null);var r={email:n.value,zipCode:n.zipcode.trim(),recaptchaToken:n.recaptchaToken};this.getAccounts(r,this.baseApiUrl,t,i)},n.prototype.getAccounts=function(n,t,i,r){r===void 0&&(r=null);$.ajax({url:t,type:"GET",dataType:"json",data:{key:n.zipCode,accountNumber:n.accountNumber,email:n.email,phoneNumber:n.phoneNumber},success:function(n){if(n.accounts!==undefined||n.accounts!==0){var t=[];n.accounts.forEach(function(n){var i=n.serviceAddress.line1+","+n.serviceAddress.city+","+n.serviceAddress.state+" "+n.serviceAddress.zip,r=n.maskedServiceAddress.line1+","+n.maskedServiceAddress.city+","+n.maskedServiceAddress.state+" "+n.maskedServiceAddress.zip,u={address:i,maskedAddress:r,accountNumber:n.number,maskedAccountNumber:n.maskedNumber,accountDisplayNumber:n.number+n.checkDigit,token:n.token};t.push(u)});i(t)}else i([])},error:function(n,t,i){console.error("Error retrieving accounts: ");console.error(i);r&&r()}})},n.prototype.getActiveAccount=function(n){$.ajax({url:this.baseUrl+"active/accountchooser",type:"GET",dataType:"json",data:{},success:function(t){t&&n(t)},error:function(n,t,i){console.error("Error retrieving active accounts: ");console.error(i)}})},n.prototype.updateActiveAccount=function(n,t,i){i===void 0&&(i=null);$.ajax({url:this.baseUrl+"active/update",type:"PUT",dataType:"json",data:{__RequestVerificationToken:this.csrf,accountNumber:n.accountNumber},success:function(r){r.result?t(n):i(r)},error:function(n,t,r){console.error("Error retrieving accounts: ");console.error(r);i&&i({result:!1,errorMessageId:5})}})},n.prototype.setEBillStatus=function(n,t,i,r){r===void 0&&(r=null);$.ajax({url:this.baseUrl+n.accountNumber+"/ebill",type:"PUT",dataType:"json",data:{__RequestVerificationToken:this.csrf,enrollInEBills:t},success:function(n){n.result?i():r(n)},error:function(n,t,i){console.error("Error retrieving accounts: ");console.error(i);r&&r({result:!1,errorMessageId:5})}})},n}();t["default"]=i});define("components/start-service",["require","exports","utils/mask","utils/date-helper"],function(n,t,i,r){function f(){u()}function u(){function w(){$("#ResidingAs").val()==="Rent"?$(".renting").removeClass("d-none"):$(".renting").addClass("d-none")}function f(){$("input[name=MailingAddressChoice]:checked").val()=="DifferentThanServiceAddress"?($("input.mailing-address-input").prop("readonly",!1),$("select.mailing-address-input").prop("disabled",!1),$(".mailing-address-container").removeClass("d-none")):($(".mailing-address-container").addClass("d-none"),$("input.mailing-address-input").prop("readonly",!0),$("select.mailing-address-input").prop("disabled",!0))}function b(){$("#EmploymentStatusChoice").val()==="Employed"?$(".employed").removeClass("d-none"):$(".employed").addClass("d-none")}function k(){$("#LiveAloneChoice").val()==="DoesNotLiveAlone"?$(".co-tenant").removeClass("d-none"):$(".co-tenant").addClass("d-none")}function d(){$("#AuthorizedPartyChoice").val()==="HasAuthorizedParty"?$(".authorized-party").removeClass("d-none"):$(".authorized-party").addClass("d-none")}function e(){$("input[name=SearchType]:checked").val()=="Address"?($(".meter-search").addClass("d-none"),$(".address-search").removeClass("d-none")):($(".address-search").addClass("d-none"),$(".meter-search").removeClass("d-none"))}function o(){$("input[name=StopServiceChoice]:checked").val()=="StoppingService"?($(".stop-service-container").removeClass("d-none"),$(".no-stop-service-container").addClass("d-none")):($(".stop-service-container").addClass("d-none"),$(".no-stop-service-container").removeClass("d-none"))}function s(){$("input[name=CustomerBefore]:checked").val()=="Yes"?$(".start-service-customer-type").removeClass("d-none"):$("input[name=CustomerBefore]:checked").val()=="No"?$(".start-service-customer-type").removeClass("d-none"):$(".start-service-customer-type").addClass("d-none");c()}function h(){$("input[name=LifeSupportEquipmentChoice]:checked").val()=="True"?$("#lse-email-msg").removeClass("d-none"):$("#lse-email-msg").addClass("d-none")}function g(){p||$("input[name=CustomerSignUp]:checked").val()=="Yes"?$("#MultiFormSubmitButton").removeClass("d-none"):$("#MultiFormSubmitButton").addClass("d-none")}function nt(){$("input[name=CustomerSignUp]:checked").val()=="Yes"&&($("#CustomerSignUpEmail").removeClass("d-none"),$("#lblHome").addClass("d-none"),$("#UserConfirmation").removeClass("d-none"));$("input[name=CustomerSignUp]:checked").val()=="No"&&($("#CustomerSignUpEmail").addClass("d-none"),$("#lblHome").removeClass("d-none"),$("#UserConfirmation").addClass("d-none"));g()}function t(){var n=document.getElementById("File1"),t=document.getElementById("File2"),i=document.getElementById("File3"),r=document.getElementById("File4"),u=n==null?0:n.files.length,f=t==null?0:t.files.length,e=i==null?0:i.files.length,o=r==null?0:r.files.length;p=u+f+e+o>0?!0:!1;g()}function lt(){$("#AddToNextBill").val("True");$("#add-to-next-bill-msg").removeClass("d-none")}function at(){$("input[name=IsExistingCustomer]").length&&($("input[name=IsExistingCustomer]").val()==="True"?($(".move-in-emergency-partnertype").removeClass("d-none"),$(".move-in-emergency-address").addClass("d-none")):($(".move-in-emergency-partnertype").addClass("d-none"),$(".move-in-emergency-address").removeClass("d-none")))}function vt(){$("#BusinessPartnerID").val()==="0"?($("input[name=IsEmergencyAddressRequired]").val("True"),$(".move-in-emergency-address").removeClass("d-none")):($("input[name=IsEmergencyAddressRequired]").val("False"),$(".move-in-emergency-address").addClass("d-none"))}function tt(){$(".identification-number-group").addClass("d-none");switch($("#IDChoice").val()){case"DriversLicense":$(".driving-license").removeClass("d-none");break;case"StateId":$(".state-number").removeClass("d-none");break;case"Passport":$(".passport-number").removeClass("d-none");break;case"SSN":$(".ssn-number").removeClass("d-none")}}function c(){$("input[name=ResidentialCommercialCustomerType]:checked").val()=="Residential"?($("input[name=CustomerBefore]:checked").val()=="Yes"?($(".start-service-customer-number").removeClass("d-none"),$("#SearchType").find('option[value="CustomerNumber"]').text("Customer Number")):$(".start-service-customer-number").addClass("d-none"),$("#customertype-residential").attr("checked","checked"),$("#customertype-commercial").removeAttr("checked"),$("#SelectedCustomerType").val("Residential")):$("input[name=ResidentialCommercialCustomerType]:checked").val()=="Commercial"?($("input[name=CustomerBefore]:checked").val()=="Yes"?($(".start-service-customer-number").removeClass("d-none"),$("#SearchType").find('option[value="CustomerNumber"]').text("EIN")):$(".start-service-customer-number").addClass("d-none"),$("#customertype-commercial").attr("checked","checked"),$("#customertype-residential").removeAttr("checked"),$("#SelectedCustomerType").val("Commercial")):($(".start-service-customer-number").addClass("d-none"),$("#SearchType").find('option[value="CustomerNumber"]').text("Customer Number"))}function it(n){var t=$("#ddlUserSlotsAppointment").data("available-slots"),i;t!=undefined&&(i=rt(n,t),pt(i))}function yt(){$("#customer-before-yes:checked").length>0?$("#FindCustomerForm").submit():$("#new-cusomter-form").submit()}function pt(n){var i="",u,t,r;for(i='<option value="">-----Select-----<\/option>',u=n,t=0;t<n.length;t++)r=n[t],i+='<option value="'+r+'">'+r+"<\/option>";document.getElementById("ddlUserSlotsAppointment").innerHTML=i}function rt(n,t){for(var f,e,h=u(n,"date"),l=u(n,"time"),o=[],i=0;i<t.length;i++){var r=t[i],c=u(r.Start,"date"),s=u(r.Start,"time");h==c&&(f=bt(s,r.Duration),e=s+"-"+f,o.push(e))}return o}function u(n,t){var i=new Date(n),e=("0"+i.getHours()).slice(-2),o=("0"+i.getMinutes()).slice(-2),s=("0"+i.getDate()).slice(-2),r=i.getMonth(),u,f;return(r=r+1,u=("0"+r).slice(-2),f=i.getFullYear(),t=="date")?s+"/"+u+"/"+f:t=="time"?e+":"+o:void 0}function ut(n){var t=n.split(":");return t[0]*60+ +t[1]}function wt(n){function t(n){return(n<10?"0":"")+n}var i=(n/60|0)%24,r=n%60;return t(i)+":"+t(r)}function bt(n,t){return wt(ut(n)+ut(t))}function kt(){$("#RefreshOnly").val("true");$("#IsSelectedDateRequired").val("false");$("#IsSelectedSlotRequired").val("false");$("#ddlAccounts").closest("form").trigger("submit")}function l(){$("input[name=StoppingServiceAtYourExistingPremise]:checked").val()=="Yes"?$(".stop-service-question").removeClass("d-none"):$(".stop-service-question").addClass("d-none")}function ft(){$("input[name=FinalMeterRead]:checked").val()=="Yes"?$(".no-stop-service-container").removeClass("d-none"):$(".no-stop-service-container").addClass("d-none")}function et(n){var t=$("#ddlUserSlotsTransfer").data("available-slots"),i;t!=undefined&&(i=rt(n,t),dt(i))}function dt(n){var i="",u,t,r;for(i='<option value="">-----Select-----<\/option>',u=n,t=0;t<n.length;t++)r=n[t],i+='<option value="'+r+'">'+r+"<\/option>";document.getElementById("ddlUserSlotsTransfer").innerHTML=i}function gt(){var n=new Bloodhound({datumTokenizer:function(n){return Bloodhound.tokenizers.whitespace(n.value)},queryTokenizer:Bloodhound.tokenizers.whitespace,remote:{wildcard:"%QUERY",url:"/api/premise/search-address?query=%QUERY&active=false",transform:function(n){return ot(n),$.map(n,function(n){return{value:n.fullAddress}})}}});$("#StreetAddress").typeahead({hint:!0,highlight:!0,minLength:3},{display:"value",source:n})}function ni(){var n=new Bloodhound({datumTokenizer:function(n){return Bloodhound.tokenizers.whitespace(n.value)},queryTokenizer:Bloodhound.tokenizers.whitespace,remote:{wildcard:"%QUERY",url:"/api/premise/search-address?query=%QUERY&active=true",transform:function(n){return ot(n),$.map(n,function(n){return{value:n.fullAddress}})}}});$("#StreetAddr").typeahead({hint:!0,highlight:!0,minLength:3},{display:"value",source:n})}function ot(n){var t=[],i=[],r=[],u=[],f=[],e=[],o=[],s=[],h=[],c=[];n.forEach(function(n){var l,a;t.push(n.premiseId);i.push(n.addressId);r.push(n.contractAccountId);u.push(n.address.houseNumber);f.push(n.address.street);e.push(n.address.houseSupplement);o.push(n.address.city);s.push(n.address.state);h.push(n.address.zip);l=n.address.houseNumber+" "+n.address.street;n.address.houseSupplement!=""&&(l=l+" "+n.address.houseSupplement);a=n.address.city+" "+n.address.state+" "+n.address.zip;c.push(l+" "+a)});$("#SearchResultsPremiseId").val(t);$("#SearchResultsAddressId").val(i);$("#SearchResultsContractAccountId").val(r);$("#SearchResultsHouseNo").val(u);$("#SearchResultsStreetName").val(f);$("#SearchResultsHouseSuppl").val(e);$("#SearchResultsCity").val(o);$("#SearchResultsState").val(s);$("#SearchResultsZip").val(h);$("#SearchResultsFullAddress").val(c)}var st,a,v,y,p,ht,ct,n;window.scrollTo(0,0);a=$("#DateOfStart").data("allowed-dates");a&&(st=r["default"].parseDateStringArray(a.toString()));y=$("#DateOfStop").data("allowed-dates");y&&(v=r["default"].parseDateStringArray(y.toString()));p=!1;$.applyDataMask();i["default"].ssNumber();i["default"].phoneNumber();i["default"].ssNumber();i["default"].driversLicense();i["default"].passportNumber();i["default"].stateID();$(".datepicker").datepicker({format:"mm/dd/yyyy"});$("#DateOfStart").datepicker({beforeShowDay:function(n){if(!r["default"].isDateInArray(n,st))return{enabled:!1}},format:"mm/dd/yyyy"});$("#DateOfStop").datepicker({beforeShowDay:function(n){if(!r["default"].isDateInArray(n,v))return{enabled:!1}},format:"mm/dd/yyyy"});$("#ResidingAs").on("change",w);$("#MailingAddressChoiceSame").on("change",f);$("#MailingAddressChoiceDifferent").on("change",f);$("#EmploymentStatusChoice").on("change",b);$("#LiveAloneChoice").on("change",k);$("#AuthorizedPartyChoice").on("change",d);$("#SearchTypeMeter").on("change",e);$("#SearchTypeAddress").on("change",e);$("#IsStoppingService").on("change",o);$("#IsNotStoppingService").on("change",o);$("#customer-before-yes").on("change",s);$("#customer-before-no").on("change",s);$("#lse-yes").on("change",h);$("#lse-no").on("change",h);$("#move-in-add-to-next-bill").on("click",lt);$("#BusinessPartnerID").on("change",vt);$("#stoppingserviceatpremise-yes").on("change",l);$("#stoppingserviceatpremise-no").on("change",l);$("input[name=FinalMeterRead]").on("change",ft);$("#IDChoice").on("change",tt);$("#ddlAccounts").on("change",kt);$("#find-customer-button").unbind().on("click",yt);$("#signmeup-yes").on("change",nt);$("#signmeup-no").on("change",nt);$("#customertype-residential").on("change",c);$("#customertype-commercial").on("change",c);$("#File1").on("change",t);$("#File2").on("change",t);$("#File3").on("change",t);$("#File4").on("change",t);w();f();b();k();d();e();o();s();h();at();l();tt();ft();n=$("#DateOfStartAppointment").data("allowed-dates");n&&(ht=r["default"].parseDateStringArray(n.toString()),it($("#DateOfStartAppointment").val()));$("#DateOfStartAppointment").datepicker({beforeShowDay:function(n){if(!r["default"].isDateInArray(n,ht))return{enabled:!1}},format:"mm/dd/yyyy"}).on("changeDate",function(n){it(n.date)});n=$("#SelectedDate").data("allowed-dates");n&&(ct=r["default"].parseDateStringArray(n.toString()),$("#SelectedDate").val()==""&&$("#SelectedDate").val(v[0].toLocaleDateString("en-US",{day:"2-digit",month:"2-digit",year:"numeric"})),et($("#SelectedDate").val()));$("#SelectedDate").datepicker({beforeShowDay:function(n){if(!r["default"].isDateInArray(n,ct))return{enabled:!1}},format:"mm/dd/yyyy"}).on("changeDate",function(n){et(n.date)});$("#StreetAddress").each(gt);$("#StreetAddr").each(ni);$("input.tt-hint").removeAttr("data-val data-val-required data-val-maxlength data-val-maxlength-max");$(document).ready(function(){$("#ConfirmationStepSubmitted").val()=="True"&&($("#MultiFormSubmitButton").addClass("d-none"),$("#MultiFormBackButton").addClass("d-none"),$("#IsCreateUserStepCompleted").val()=="False"&&$("#lblHome").removeClass("d-none"))})}Object.defineProperty(t,"__esModule",{value:!0});t["default"]=f;t.initForm=u});define("components/webchat",["require","exports"],function(n,t){function i(){function n(){var n=$($("df-messenger").first()[0].shadowRoot).find(".df-messenger-wrapper");t.is(":visible")?n.css("margin-bottom",t.outerHeight()+"px"):n.css("margin-bottom","")}$("df-messenger").length&&window.addEventListener("dfMessengerLoaded",function(){$(window).on("resize",function(){return n()});n()});var t=$(".quick-links--mobile").first()}Object.defineProperty(t,"__esModule",{value:!0});t["default"]=i});define("components/video",["require","exports"],function(n,t){function i(){function n(){$(window).width()<=600?$(".video-container").css("padding-bottom","56.25%"):$(".video-container").css("padding-bottom",t)}var t;$(function(){$(".video-container")[0]&&(t=document.querySelector(".video-container").style.paddingBottom,n(),$(window).resize(n))})}Object.defineProperty(t,"__esModule",{value:!0});t["default"]=i});define("components/add-first-account",["require","exports"],function(n,t){function i(){$(".add-first-account_option").change(function(){var n=$(".add-first-account_option:checked").length;n==0?$("button.associate-account").prop("disabled",!0):$("button.associate-account").prop("disabled",!1)})}Object.defineProperty(t,"__esModule",{value:!0});t["default"]=i});define("components/tabs",["require","exports"],function(n,t){function i(){$(".nav-item.dropdown").on("click",".dropdown-item",function(n){var t=$(n.target).text();$($(n.target).parent(".dropdown-menu").prev(".dropdown-toggle")).text(t)})}Object.defineProperty(t,"__esModule",{value:!0});t["default"]=i});define("components/forgot-email",["require","exports","utils/mask"],function(n,t,i){function r(){$(".forgot-email").on("click","#RecoveryTypeAccountNum",function(){$(".forgot-email__user-id").addClass("d-none");$(".forgot-email__account-number").removeClass("d-none")});$(".forgot-email").on("click","#RecoveryTypeUserId",function(){$(".forgot-email__user-id").removeClass("d-none");$(".forgot-email__account-number").addClass("d-none")});$(function(){$(".forgot-email .forgot-email__radio-choices [checked]").click();i["default"].accountNumber()})}Object.defineProperty(t,"__esModule",{value:!0});t["default"]=r});define("components/epi-forms",["require","exports","utils/mask"],function(n,t,i){function r(){function n(n){i["default"].phoneNumber();i["default"].accountNumber();i["default"].ssNumber();$(".datepicker").datepicker({format:"mm/dd/yyyy"});var t=$(".FormRecaptcha",n);$.each(t,function(n,t){var i=$(t).data("epiforms-recaptcha-widgetid");i!=undefined&&grecaptcha&&grecaptcha.reset(i)})}if(typeof epi!="undefined"&&typeof epi.EPiServer!="undefined"){typeof $$epiforms!="undefined"&&$$epiforms(document).ready(function(){$$epiforms(".EPiServerForms").on("formsStepValidating",function(n){if(n.isValid==!0){$(".signature input").length>0&&!$(".signature input").val().toString().startsWith("/s/")&&$(".signature input").val("/s/"+$(".signature input").val().toString());return}})});$(".EPiServerForms").on("formsReset formsNavigationPrevStep",function(t){n(t.target)});$(".EPiServerForms").on("formsStepValidating",function(t){t.isValid!=!0&&n(t.target)});$(".EPiServerForms").on("formsSubmitted",function(t){t.returnedResult&&t.returnedResult.IsSuccess||n(t.target)});$.extend(!0,epi.EPiServer.Forms,{Validators:{"CenHud.Web.Business.Validator.RecaptchaValidator":function(n,t,i){return t?{isValid:!0}:{isValid:!1,message:i.model.message}},"CenHud.Web.Business.Validator.AccountNumberValidator":function(n,t,i){return t.length!==0&&t.length!==14?{isValid:!1,message:i.model.message}:{isValid:!0}},"CenHud.Web.Business.Validator.PhoneNumberValidator":function(n,t,i){return t.length===0?{isValid:!0}:/^\(?(?!0{3})[0-9]{3}\)?[-. ]?[0-9]{3}[-. ]?[0-9]{4}$/.test(t)?{isValid:!0}:{isValid:!1,message:i.model.message}}},Extension:{getCustomElementValue:function(n){if(n.hasClass("FormRecaptcha")){var t=n.data("epiforms-recaptcha-widgetid");return t!=undefined&&grecaptcha?grecaptcha.getResponse(t):null}}}});window.initRecaptchaElements=function(){(function(n){function t(n){return function(){return function(t){t&&t.length!=0&&n.find(".Form__Element__ValidationError").hide()}}()}n(".Form__Element.FormRecaptcha").each(function(i,r){var u=n(r),f=n(".g-recaptcha",u),e=u.data("epiforms-sitekey"),o;f.length==1&&e&&(o=grecaptcha.render(f[0],{sitekey:e,callback:t(u)}),u.data("epiforms-recaptcha-widgetid",o))})})($$epiforms||$)}}}Object.defineProperty(t,"__esModule",{value:!0});t["default"]=r});define("utils/responsive-table",["require","exports"],function(n,t){function i(){for(var r,t,i,n,f=$(".responsive-table"),u=0;u<f.length;u++){for(r=[],t=f[u],n=0;n<t.rows[0].cells.length;n++)r.push(t.rows[0].cells[n].innerHTML);for(i=1;i<t.rows.length;i++)for(n=0;n<t.rows[i].cells.length;n++)n<r.length&&(t.rows[i].cells[n].hasAttribute("data-label")||t.rows[i].cells[n].setAttribute("data-label",r[n]))}}Object.defineProperty(t,"__esModule",{value:!0});t["default"]=i});define("components/popups",["require","exports"],function(n,t){function i(){$(".popup").popup({hoverable:!0})}Object.defineProperty(t,"__esModule",{value:!0});t["default"]=i});define("components/stop-service",["require","exports","utils/mask","utils/date-helper"],function(n,t,i,r){function f(){u()}function u(){function e(n){var t=$("#ddlUserSlots").data("availableSlots"),i=h(n,t);s(i)}function t(){$("input[name=IsRightToRead]:checked").val()=="Yes"?$(".no-stop-service-container").removeClass("d-none"):$(".no-stop-service-container").addClass("d-none")}function s(n){var i="",u,t,r;for(i='<option value="">-----Select-----<\/option>',u=n,t=0;t<n.length;t++)r=n[t],i+='<option value="'+r+'">'+r+"<\/option>";document.getElementById("ddlUserSlots").innerHTML=i}function h(t,i){for(var f,e,h=n(t,"date"),a=n(t,"time"),o=[],r=0;r<i.length;r++){var u=i[r],c=n(u.Start,"date"),s=n(u.Start,"time");h==c&&(f=l(s,u.Duration),e=s+"-"+f,o.push(e))}return o}function n(n,t){var i=new Date(n),e=("0"+i.getHours()).slice(-2),o=("0"+i.getMinutes()).slice(-2),h=("0"+i.getSeconds()).slice(-2),s=("0"+i.getDate()).slice(-2),r=i.getMonth(),u,f;return(r=r+1,u=("0"+r).slice(-2),f=i.getFullYear(),t=="date")?s+"/"+u+"/"+f:(t="time")?e+":"+o:void 0}function o(n){var t=n.split(":");return t[0]*60+ +t[1]}function c(n){function t(n){return(n<10?"0":"")+n}var i=(n/60|0)%24,r=n%60;return t(i)+":"+t(r)}function l(n,t){return c(o(n)+o(t))}function a(){var n=$("#ddlUserSlots option:selected").text();$("#SelectdSlots").val(n)}var u,f;window.scrollTo(0,0);$.applyDataMask();i["default"].ssNumber();i["default"].phoneNumber();u=$("#Date").data("allowed-dates");u&&(f=r["default"].parseDateStringArray(u.toString()),$(function(){$("#Date").datepicker({beforeShowDay:function(n){if(!r["default"].isDateInArray(n,f))return{enabled:!1}},format:"mm/dd/yyyy"}).on("changeDate",function(n){e(n.date)})}),$("#Date").val()==""&&$("#Date").val(f[0].toLocaleDateString("en-US",{day:"2-digit",month:"2-digit",year:"numeric"})),e($("#Date").val()));$(".datepicker").datepicker({format:"mm/dd/yyyy"});$("#IsStoppingServiceFinalBill").on("change",t);$("#IsNotStoppingServiceFinalBill").on("change",t);$("#ddlUserSlots").on("change",a);t()}Object.defineProperty(t,"__esModule",{value:!0});t["default"]=f;t.initForm=u});define("utils/multiform-helper",["require","exports"],function(n,t){function r(){i()}function i(){$(document).ready(function(){history.pushState(null,document.title,location.href);window.addEventListener("popstate",function(){history.pushState(null,document.title,location.href)});window.onpopstate=function(){var t=$("#MultiFormContainer #CurrentStepNum").val(),n=$("#MultiFormBackButton");n.length>0&&n.click()}})}Object.defineProperty(t,"__esModule",{value:!0});t["default"]=r;t.initForm=i});define("components/dss-portal",["require","exports"],function(n,t){function i(){$(".dss-nav-link").on("click",function(n){return $(".dss-nav-link").removeClass("active"),$(this).addClass("active"),$("#dss-portal-content").waitMe({effect:"rotation"}),$(n.currentTarget.parentElement).trigger("submit"),!1})}Object.defineProperty(t,"__esModule",{value:!0});t["default"]=i});define("utils/idle-timeout",["require","exports"],function(n,t){Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function n(n){var t=this;this.timeoutLength=0;this.timeoutWarningLength=0;this.frameElement=null;this.onWarning=function(){};this.onExpired=function(){};this.onReset=function(){};this.intervalHandle=null;this.updateInterval=100;this.isActive=!1;this.isExpired=!1;this.hadActivity=!1;this.isWarned=!1;this.eventElement=null;this.lastPageX=0;this.lastPageY=0;this.expirationTime=0;this.activityEventNames=["DOMMouseScroll","mousedown","mousemove","mousewheel","MSPointerDown","MSPointerMove","keydown","touchmove","touchstart","wheel"];this.handleActivityEvent=function(n){if(t.isActive&&!t.isWarned&&!t.isExpired){if(n.type==="mousemove"){var u=n,i=u.pageX,r=u.pageY;if(i===undefined&&r===undefined||i===t.lastPageX&&r===t.lastPageY)return;t.lastPageX=i;t.lastPageY=r}t.hadActivity=!0}};this.timeoutLength=Math.max(0,n.timeoutLength);this.timeoutWarningLength=Math.max(0,n.timeoutWarningLength||this.timeoutWarningLength);this.updateInterval=Math.max(100,n.updateInterval||this.updateInterval);this.frameElement=n.frameElement;this.activityEventNames.forEach(function(n){t.frameElement&&t.frameElement.addEventListener(n,t.handleActivityEvent)});this.onWarning=n.onWarning;this.onExpired=n.onExpired;this.onReset=n.onReset}return n.prototype.destroy=function(){var n=this;this.isExpired=!1;this.isWarned=!1;this.clearUpdateInterval();this.isActive=!1;this.activityEventNames.forEach(function(t){n.frameElement&&n.frameElement.removeEventListener(t,n.handleActivityEvent)})},n.prototype.reset=function(){this.timeoutLength<=0||(this.isExpired=!1,this.isWarned=!1,this.updateExpirationTime(),this.setUpdateInterval(),this.isActive=!0,this.onReset&&this.onReset(),this.update())},Object.defineProperty(n.prototype,"timeRemaining",{get:function(){if(!this.isActive||this.isExpired)return 0;var n=this.expirationTime-Date.now();return n<0?0:n},enumerable:!0,configurable:!0}),n.prototype.update=function(){if(this.isActive){this.hadActivity&&(this.hadActivity=!1,this.updateExpirationTime());var n=this.timeRemaining;n<=0?this.expire():this.timeoutWarningLength>0&&n-this.timeoutWarningLength<=0&&this.warn()}},n.prototype.warn=function(){this.isWarned||(this.isWarned=!0,this.onWarning&&this.onWarning())},n.prototype.expire=function(){this.isExpired||(this.isExpired=!0,this.clearUpdateInterval(),this.onExpired&&this.onExpired())},n.prototype.setUpdateInterval=function(){var n=this;this.clearUpdateInterval();this.intervalHandle=window.setInterval(function(){n.update()},this.updateInterval)},n.prototype.clearUpdateInterval=function(){this.intervalHandle&&(window.clearInterval(this.intervalHandle),this.intervalHandle=null)},n.prototype.updateExpirationTime=function(){this.expirationTime=Date.now()+this.timeoutLength+this.timeoutWarningLength},n}();t["default"]=i});define("components/idle-logout",["require","exports","utils/idle-timeout"],function(n,t,i){function r(n){function e(n){t.destroy();n===!0&&localStorage.setItem(u,"yes");window.location.href="/api/users/logout"}function h(){s.text(o(t.timeRemaining));f=window.setInterval(function(){s.text(o(t.timeRemaining))},1e3);r.modal("show")}function c(){f&&window.clearInterval(f);r.modal("hide")}function o(n){function t(n){return n<10?"0"+n:n}var r=n/1e3,i=Math.floor(r/3600),u=Math.floor(r/60)-i*60,f=Math.floor(r-i*3600-u*60);return i>0?t(i)+":"+t(u)+":"+t(f):t(u)+":"+t(f)}function l(){var n=localStorage.getItem(u);n&&n==="yes"&&(localStorage.removeItem(u),$("#globalLoggedOutModal").modal("show"),$("#globalLoggedOutModal").find("button.modal-signin").click(function(){window.location.href="/login"}));t.destroy()}var u="_idleLogoutComplete",r=$("#globalTimeoutModal"),s=r.find(".timeout-countdown"),f=null,a={timeoutLength:n.timeoutLengthInMinutes*6e4,timeoutWarningLength:n.timeoutWarningLengthInSeconds*1e3,frameElement:document,onExpired:function(){return e(!0)},onWarning:h,onReset:c},t=new i["default"](a);r.find("button.modal-ok").click(function(){t.reset()});r.find("button.modal-cancel").click(function(){e(!1)});n.isLoggedIn?t.reset():l()}Object.defineProperty(t,"__esModule",{value:!0});t["default"]=r});define("components/fuelswitching-calculator-chart",["require","exports"],function(n,t){function i(n){function r(i){function u(n,t,i){var r;n.labels=i;var u=0,f=Array(i.length).fill(0),e=Array(i.length).fill(0);for(r=0;r<i.length;r++)f[r]=t[r],e[r]=t[r]<0?"#FF0000":"#A9D18E";n.datasets[u].data=f;n.datasets[u].backgroundColor=e}$(i).hide();var f,e,o,s=$(".fuelswitching-calculator-chart").attr("data-xaxis-label"),r=new n(i,{type:"bar",data:{labels:f,datasets:[{backgroundColor:o,data:e}]},options:{legend:{display:!1},title:{display:!0,position:"bottom",text:s,fontColor:"#138496",fontSize:22},scales:{xAxes:[{gridLines:{display:!1},ticks:{fontColor:"#138496",fontSize:18}}],yAxes:[{ticks:{fontColor:"#138496",fontSize:14,callback:function(n){var t=Math.abs(n).toLocaleString("en-US",{style:"currency",currency:"USD",minimumFractionDigits:0});return n<0?"("+t+")":t}}}]},tooltips:{enabled:!1},hover:{animationDuration:1},animation:{duration:0,onComplete:function(){var t=this.chart.ctx;t.textAlign="center";t.textBaseline="bottom";this.data.datasets.forEach(function(i){for(var r=0;r<i.data.length;r++){var f=i._meta[Object.keys(i._meta)[0]].data[r]._model,e=i.data[r],u=Math.abs(e).toLocaleString("en-US",{style:"currency",currency:"USD",minimumFractionDigits:0});u=e<0?"("+u+")":u;t.font=n.helpers.fontString(14,"normal",n.defaults.global.defaultFontFamily);e<0?t.fillText(u,f.x,f.y+20):t.fillText(u,f.x,f.y-10)}})}}}});$(t).on("drawChart",function(){var t=Math.round(Number($(".fuelswitching-calculator-chart").attr("data-years"))),s=Number($(".fuelswitching-calculator-chart").attr("data-annual-savings")),e=Number($(".fuelswitching-calculator-chart").attr("data-net-conversion-costs")),o,f,n;for(t=t+3,o=Array(t),n=0;n<=t;n++)o[n]=n.toString();for(f=Array(t),f[0]=e>0?Math.round(e*-1):Math.round(e),n=1;n<=t;n++)f[n]=Math.round(f[n-1]+s);u(r.data,f,o);$(".fuelswitching-calculator .results").off("drawChart");r.update();$(i).show()})}var t,i;(n.defaults.global.defaultFontFamily="arial",t=".fuelswitching-calculator-chart",$(t).length<=0)||(i=$(t).get(0),r(i))}Object.defineProperty(t,"__esModule",{value:!0});t["default"]=i});define("cenhud",["require","exports","components/account-chooser","components/alerts","components/bill-breakdown-chart","components/bill-comparison-chart","components/budget-billing","components/ebills","components/enablement-links","components/flyout","components/header-block","components/password-validator","components/page-adjustments","components/meter-reading-form","components/modal","components/discontinue-service","components/payment-extension","components/typeahead","components/unobtrusive-forms","components/usage-history-chart","components/natural-gas-availability","components/gas-service-agreement","components/commercial-data","components/residential-data","components/find-customer","components/start-service","components/webchat","components/video","utils/mask","components/add-first-account","components/tabs","components/forgot-email","components/epi-forms","utils/responsive-table","components/popups","components/stop-service","utils/multiform-helper","components/dss-portal","components/idle-logout","components/fuelswitching-calculator-chart"],function(n,t,i,r,u,f,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,wt,bt,kt){function gt(){r["default"]();o["default"]();s["default"]();h["default"].init();c["default"]();e["default"]();i["default"]();l["default"]();v["default"]();y["default"]();a["default"]();k["default"]();b["default"]();p["default"].init();ut["default"]();rt["default"]();g["default"]();nt["default"]();tt["default"]();it["default"]();st["default"]();ht["default"]();ct["default"]();lt["default"]();ft["default"]();et["default"]();at["default"]();dt();vt["default"]();yt["default"]();pt["default"]();wt["default"]()}function ni(n){bt["default"](n)}function ti(n){f["default"](n);u["default"](n);d["default"](n);kt["default"](n)}function ii(){w["default"]()}function dt(){ot["default"].phoneNumber();ot["default"].customerNumber();ot["default"].accountNumber();ot["default"].ssNumber();ot["default"].driversLicense();ot["default"].passportNumber();ot["default"].stateID();ot["default"].paNumber();$.applyDataMask();$(".datepicker").datepicker({format:"mm/dd/yyyy"})}function ri(){p["default"].initDateLimitedDatePicker()}Object.defineProperty(t,"__esModule",{value:!0});t.main=gt;t.initIdleTimeout=ni;t.initCharts=ti;t.initPaymentExtension=ii;t.initForms=dt;t.initDateLimitedDatePicker=ri});define("apps/utils/event-bus",["require","exports","vue-property-decorator"],function(n,t,i){Object.defineProperty(t,"__esModule",{value:!0});var r=new i.Vue;t["default"]=r});define("apps/components/find-account-inputs/phone-number-form",["require","exports","vue-property-decorator","utils/form-validator","utils/mask","apps/utils/event-bus"],function(n,t,i,r,u,f){Object.defineProperty(t,"__esModule",{value:!0});var e=function(n){function t(){var t=n!==null&&n.apply(this,arguments)||this;return t.currentValue="",t.zipCodeValue="",t.recaptchaToken="",t.hasUserSubmitted=!1,t}return __extends(t,n),Object.defineProperty(t.prototype,"rawValue",{get:function(){return u["default"].getRawValue(this.currentValue)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isValid",{get:function(){var t=r["default"].validatePhoneNumber(this.rawValue),i=r["default"].validateZipCode(this.zipCodeValue),n,u;return this.isUserAuthenticated?n=t&&i:(u=this.recaptchaToken!=="",n=t&&i&&u),n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"showPhoneNumberError",{get:function(){return!r["default"].validatePhoneNumber(this.rawValue)&&this.hasUserSubmitted},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"showZipCodeError",{get:function(){return!r["default"].validateZipCode(this.zipCodeValue)&&this.hasUserSubmitted},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"showRecaptchaError",{get:function(){return this.recaptchaToken===""&&this.hasUserSubmitted},enumerable:!0,configurable:!0}),t.prototype.mounted=function(){u["default"].phoneNumber("#phoneNumber");grecaptcha.render(this.$refs.FindByPhoneCaptcha,{sitekey:this.recaptchaPublicKey,callback:this.recaptchaCallback})},t.prototype.activated=function(){this.recaptchaToken=""},t.prototype.recaptchaCallback=function(n){this.recaptchaToken=n},t.prototype.maskPhoneNumber=function(){this.currentValue=$("#phoneNumber").masked(this.rawValue)},t.prototype.submitForm=function(){this.isValid?f["default"].$emit("submit-form",{value:this.rawValue,zipcode:this.zipCodeValue,recaptchaToken:this.recaptchaToken}):this.hasUserSubmitted=!0},__decorate([i.Prop(Object)],t.prototype,"inputLabels",void 0),__decorate([i.Prop(Object)],t.prototype,"zipcodeLabels",void 0),__decorate([i.Prop(Object)],t.prototype,"recaptchaLabels",void 0),__decorate([i.Prop(String)],t.prototype,"buttonLabel",void 0),__decorate([i.Prop(String)],t.prototype,"recaptchaPublicKey",void 0),__decorate([i.Prop(String)],t.prototype,"isUserAuthenticated",void 0),__decorate([i.Component({template:'\n        <form action="#" method="post" @submit.prevent="submitForm">\n            <label for="phoneNumber" class="required">{{ inputLabels.label }}<\/label>\n            <input type="tel"\n                id="phoneNumber"\n                :class="{\n                    \'mb-1\': inputLabels.helpText && inputLabels.helpText.length > 0,\n                    \'input--error\': showPhoneNumberError\n                }"\n                name="phoneNumber"\n                role="textbox"\n                @input="maskPhoneNumber"\n                :placeholder="inputLabels.placeholder"\n                :aria-label="inputLabels.label"\n                v-model="currentValue"\n                :aria-valuenow="currentValue"\n                :aria-valuetext="currentValue"\n                maxlength="11"\n                required />\n            <p v-if="inputLabels.helpText" class="form__help-text mb-0">{{ inputLabels.helpText }}<\/p>\n            <p v-if="inputLabels.requiredErrorLabel" v-show="showPhoneNumberError" class="form__error mt-0 mb-0">{{ inputLabels.requiredErrorLabel }}<\/p>\n            <label for="zipCode" class="mt-3 required">{{ zipcodeLabels.label  }}<\/label>\n            <input type="text"\n                id="zipCode"\n                :class="{\n                    \'mb-1\': zipcodeLabels.helpText && zipcodeLabels.helpText.length > 0,\n                    \'input--error\': showZipCodeError\n                }"\n                name="zipCode"\n                value=""\n                role="textbox"\n                :placeholder="zipcodeLabels.placeholder"\n                :aria-label="zipcodeLabels.label"\n                v-model="zipCodeValue"\n                @input="maskPhoneNumber"\n                :title="zipcodeLabels.helpText ? zipcodeLabels.helpText : \'Please enter a 5 digit zip code\'"\n                pattern="[0-9]{5}"\n                maxlength="5"\n                required />\n            <p v-if="zipcodeLabels.helpText" class="form__help-text mb-0">{{ zipcodeLabels.helpText }}<\/p>\n            <p v-if="zipcodeLabels.requiredErrorLabel" v-show="showZipCodeError" class="form__error mt-0">{{ zipcodeLabels.requiredErrorLabel }}<\/p>\n            <div v-if="!isUserAuthenticated" class="mt-4">\n                <div style="display:block" ref="FindByPhoneCaptcha" class="g-recaptcha"><\/div>\n            <\/div>\n            <p v-if="recaptchaLabels.requiredErrorLabel" v-show="showRecaptchaError" class="form__error mt-0">{{ recaptchaLabels.requiredErrorLabel }}<\/p>\n            <button type="submit" class="button button--default mt-4" :class="{ \'disabled\' : !isValid }">\n                {{ buttonLabel }}\n            <\/button>\n        <\/form>\n    '})],t)}(i.Vue);t["default"]=e});define("apps/components/find-account-inputs/email-form",["require","exports","vue-property-decorator","utils/form-validator","apps/utils/event-bus"],function(n,t,i,r,u){Object.defineProperty(t,"__esModule",{value:!0});var f=function(n){function t(){var t=n!==null&&n.apply(this,arguments)||this;return t.currentValue="",t.zipCodeValue="",t.recaptchaToken="",t.hasUserSubmitted=!1,t}return __extends(t,n),Object.defineProperty(t.prototype,"isValid",{get:function(){var t=r["default"].validateEmail(this.currentValue),i=r["default"].validateZipCode(this.zipCodeValue),n,u;return this.isUserAuthenticated?n=t&&i:(u=this.recaptchaToken!=="",n=t&&i&&u),n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"showEmailError",{get:function(){return!r["default"].validateEmail(this.currentValue)&&this.hasUserSubmitted},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"showZipCodeError",{get:function(){return!r["default"].validateZipCode(this.zipCodeValue)&&this.hasUserSubmitted},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"showRecaptchaError",{get:function(){return this.recaptchaToken===""&&this.hasUserSubmitted},enumerable:!0,configurable:!0}),t.prototype.mounted=function(){$.applyDataMask();grecaptcha.render(this.$refs.FindByEmailCaptcha,{sitekey:this.recaptchaPublicKey,callback:this.recaptchaCallback})},t.prototype.activated=function(){this.recaptchaToken=""},t.prototype.recaptchaCallback=function(n){this.recaptchaToken=n},t.prototype.submitForm=function(){this.isValid?u["default"].$emit("submit-form",{value:this.currentValue,zipcode:this.zipCodeValue,recaptchaToken:this.recaptchaToken}):this.hasUserSubmitted=!0},__decorate([i.Prop(Object)],t.prototype,"inputLabels",void 0),__decorate([i.Prop(Object)],t.prototype,"zipcodeLabels",void 0),__decorate([i.Prop(Object)],t.prototype,"recaptchaLabels",void 0),__decorate([i.Prop(String)],t.prototype,"recaptchaPublicKey",void 0),__decorate([i.Prop(String)],t.prototype,"buttonLabel",void 0),__decorate([i.Prop(String)],t.prototype,"isUserAuthenticated",void 0),__decorate([i.Component({template:'\n        <form action="#" method="post" @submit.prevent="submitForm">\n            <label for="email" class="required">{{ inputLabels.label }}<\/label>\n            <input type="email"\n                id="email"\n                :class="{\n                    \'mb-1\': inputLabels.helpText && inputLabels.helpText.length > 0,\n                    \'input-error\': showEmailError\n                }"\n                name="email"\n                value=""\n                :placeholder="inputLabels.placeholder"\n                :aria-label="inputLabels.label"\n                v-model="currentValue"\n                maxlength="320"\n                required />\n            <p v-if="inputLabels.helpText" class="form__help-text mb-0">{{ inputLabels.helpText }}<\/p>\n            <p v-if="inputLabels.requiredErrorLabel" v-show="showEmailError" class="form__error mt-0 mb-0">{{ inputLabels.requiredErrorLabel }}<\/p>\n            <label for="zipCode" class="required mt-3">{{ zipcodeLabels.label }}<\/label>\n            <input type="text"\n                :class="{\n                    \'mb-1\': zipcodeLabels.helpText && zipcodeLabels.helpText.length > 0,\n                    \'input--error\': showZipCodeError\n                }"\n                name="zipCode"\n                value=""\n                :placeholder="zipcodeLabels.placeholder"\n                :aria-label="zipcodeLabels.label"\n                v-model="zipCodeValue"\n                pattern="[0-9]{5}"\n                :title="zipcodeLabels.helpText ? zipcodeLabels.helpText : \'Please enter a 5 digit zip code\'"\n                maxlength="5"\n                data_mask = "00000" \n                required />\n            <p v-if="zipcodeLabels.helpText" class="form__help-text mb-0">{{ zipcodeLabels.helpText }}<\/p>\n            <p v-if="zipcodeLabels.requiredErrorLabel" v-show="showZipCodeError" class="form__error mt-0">{{ zipcodeLabels.requiredErrorLabel }}<\/p>\n            <div v-if="!isUserAuthenticated" class="mt-4">\n                <div style="display:block" ref="FindByEmailCaptcha" class="g-recaptcha"><\/div>\n            <\/div>\n            <p v-if="recaptchaLabels.requiredErrorLabel" v-show="showRecaptchaError" class="form__error mt-0">{{ recaptchaLabels.requiredErrorLabel }}<\/p>\n            <button type="submit" class="button button--default mt-4" :class="{ \'disabled\' : !isValid }">\n                {{ buttonLabel }}\n            <\/button>\n        <\/form>\n    '})],t)}(i.Vue);t["default"]=f});define("apps/components/find-account-inputs/account-number-form",["require","exports","vue-property-decorator","utils/form-validator","utils/mask","apps/utils/event-bus"],function(n,t,i,r,u,f){Object.defineProperty(t,"__esModule",{value:!0});var e=function(n){function t(){var t=n!==null&&n.apply(this,arguments)||this;return t.currentValue="",t.zipCodeValue="",t.recaptchaToken="",t.hasUserSubmitted=!1,t}return __extends(t,n),Object.defineProperty(t.prototype,"rawValue",{get:function(){return u["default"].getRawValue(this.currentValue)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isValid",{get:function(){var t=r["default"].validateAccountNumber(this.rawValue),i=r["default"].validateZipCode(this.zipCodeValue),n,u;return this.isUserAuthenticated?n=t&&i:(u=this.recaptchaToken!=="",n=t&&i&&u),n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"showAccountNumberError",{get:function(){return!r["default"].validateAccountNumber(this.rawValue)&&this.hasUserSubmitted},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"showZipCodeError",{get:function(){return!r["default"].validateZipCode(this.zipCodeValue)&&this.hasUserSubmitted},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"showRecaptchaError",{get:function(){return this.recaptchaToken===""&&this.hasUserSubmitted},enumerable:!0,configurable:!0}),t.prototype.mounted=function(){u["default"].accountNumber("#accountNumber-find");$.applyDataMask();grecaptcha.render(this.$refs.FindByAccountNumberCaptcha,{sitekey:this.recaptchaPublicKey,callback:this.recaptchaCallback})},t.prototype.activated=function(){this.recaptchaToken=""},t.prototype.recaptchaCallback=function(n){this.recaptchaToken=n},t.prototype.maskAccountNumber=function(){this.currentValue=$("#accountNumber-find").masked(this.rawValue)},t.prototype.submitForm=function(){this.isValid?f["default"].$emit("submit-form",{value:this.rawValue,zipcode:this.zipCodeValue,recaptchaToken:this.recaptchaToken}):this.hasUserSubmitted=!0},__decorate([i.Prop(Object)],t.prototype,"inputLabels",void 0),__decorate([i.Prop(Object)],t.prototype,"zipcodeLabels",void 0),__decorate([i.Prop(Object)],t.prototype,"recaptchaLabels",void 0),__decorate([i.Prop(String)],t.prototype,"buttonLabel",void 0),__decorate([i.Prop(String)],t.prototype,"recaptchaPublicKey",void 0),__decorate([i.Prop(String)],t.prototype,"isUserAuthenticated",void 0),__decorate([i.Component({template:'\n        <form action="#" method="post" @submit.prevent="submitForm">\n            <label for="accountNumber-find" class="required">{{ inputLabels.label }}<\/label>\n            <input type="text"\n                id="accountNumber-find"\n                :class="{ \n                    \'mb-1\': inputLabels.helpText && inputLabels.helpText.length > 0,\n                    \'input--error\': showAccountNumberError\n                }"\n                name="accountNumber-find"\n                value=""\n                @input="maskAccountNumber"\n                :placeholder="inputLabels.placeholder"\n                :aria-label="inputLabels.label"\n                :aria-valuenow="currentValue"\n                :aria-valuetext="currentValue"\n                v-model="currentValue"\n                required />\n            <p v-if="inputLabels.helpText" class="form__help-text mb-0">{{ inputLabels.helpText }}<\/p>\n            <p v-if="inputLabels.requiredErrorLabel" v-show="showAccountNumberError" class="form__error mt-0 mb-0">{{ inputLabels.requiredErrorLabel }}<\/p>\n            <label for="zipCode" class="mt-3 required">{{ zipcodeLabels.label }}<\/label>\n            <input type="text" \n                id="zipCode"\n                :class="{ \n                    \'mb-1\': zipcodeLabels.helpText && zipcodeLabels.helpText.length > 0,\n                    \'input--error\': showZipCodeError\n                }"\n                name="zipCode" \n                value=""\n                :placeholder="zipcodeLabels.placeholder"\n                :aria-label="zipcodeLabels.label"\n                @input="maskAccountNumber"\n                v-model="zipCodeValue"\n                data_mask = "00000"\n                pattern="[0-9]{5}"\n                :title="zipcodeLabels.helpText ? zipcodeLabels.helpText : \'Please enter a 5 digit zip code\'"\n                maxlength="5"\n                required />\n            <p v-if="zipcodeLabels.helpText" class="form__help-text mb-0">{{ zipcodeLabels.helpText }}<\/p>\n            <p v-if="zipcodeLabels.requiredErrorLabel" v-show="showZipCodeError" class="form__error mt-0">{{ zipcodeLabels.requiredErrorLabel }}<\/p>\n            <div v-if="!isUserAuthenticated" class="mt-4">\n                <div style="display:block" ref="FindByAccountNumberCaptcha" class="g-recaptcha"><\/div>\n            <\/div>\n            <p v-if="recaptchaLabels.requiredErrorLabel" v-show="showRecaptchaError" class="form__error mt-0">{{ recaptchaLabels.requiredErrorLabel }}<\/p>\n            <button type="submit" class="button button--default mt-4" :class="{ \'disabled\' : !isValid }">\n                {{ buttonLabel }}\n            <\/button>\n        <\/form>\n    '})],t)}(i.Vue);t["default"]=e});define("components/login",["require","exports"],function(n,t){function i(n,t,i,r){var f,e,u;return i&&(f=window.location.hash,t=decodeURIComponent(t+f)),e={baseUrl:r.domain,clientId:r.clientId,redirectUri:r.clientRedirectLink,authParams:{pkce:!1,issuer:r.authority,responseType:"code",responseMode:"form_post",display:"page",scopes:["openid","email","profile","phone","accounts","suppliers","dss","payments","groups"],state:t},features:{registration:r.allowRegistration,showPasswordToggleOnSignInPage:!0},logo:r.logoLink,language:"en",helpLinks:{help:r.helpLink.link},i18n:{en:{remember:r.rememberMeLabel,needhelp:r.needHelpHeader,goback:r.backToSignInLabel,help:r.helpLink.title,retry:r.loginRetryButtonLabel,forgotpassword:r.forgotPasswordLinkText,"oform.errorbanner.title":r.formErrorBannerText,"error.username.required":r.emailInput.requiredErrorLabel,"error.password.required":r.passwordInput.requiredErrorLabel,"error.auth.lockedOut":r.userLockedMsg,"errors.E0000004":r.invalidLoginMsg,"errors.E0000069":r.userLockedMsg,"errors.E0000119":r.userLockedMsg,"errors.E0000047":r.maxRequestsExceededText,"errors.E0000017":r.passwordResetFailedText,"primaryauth.title":r.signInTitle,"primaryauth.username.placeholder":r.emailInput.label,"primaryauth.username.tooltip":r.emailInput.placeholder,"primaryauth.password.placeholder":r.passwordInput.label,"primaryauth.password.tooltip":r.passwordInput.placeholder,"primaryauth.submit":r.loginButtonText,"password.forgot.email.or.username.placeholder":r.emailInput.label,"password.forgot.email.or.username.tooltip":r.emailInput.placeholder,"password.forgot.sendEmail":r.resetViaEmailButtonLabel,"password.forgot.emailSent.title":r.emailSentText,"password.forgot.emailSent.desc":r.emailSentWithInstructionsText,"password.forgot.question.title":r.forgottenPasswordChallengeText,"password.forgot.question.submit":r.resetPasswordButtonLabel,"registration.signup.label":r.newMemberLabel,"registration.signup.text":r.registerLinkText,"registration.complete.title":r.verificationEmailSentTitle,"registration.complete.desc":r.verificationEmailSentText,"registration.form.title":r.createAccountButtonLabel,"registration.form.submit":r.registerButtonLabel,"registration.passwordComplexity.minLength":r.minCharRequiredText,"registration.passwordComplexity.minLower":r.minLowerCaseCharRequiredText,"registration.passwordComplexity.minUpper":r.minUpperCaseCharRequiredText,"registration.passwordComplexity.minNumber":r.minDigitsRequiredText,"registration.passwordComplexity.minSymbol":r.minSymbolsRequiredText,"registration.passwordComplexity.excludeUsername":r.mustNotContainUserNameText,"registration.passwordComplexity.excludeAttribute":r.mustNotContainAttributeText,"registration.required.fields.label":r.requiredFieldsLabel,"registration.default.callbackhook.error":r.couldNotProcessRegistrationText,"registration.error.userName.invalidEmail":r.emailInput.notValidErrorLabel,"registration.error.password.passwordRequirementsNotMet":r.passwordInput.notValidErrorLabel,"registration.error.userName.notUniqueWithinOrg":r.emailAlreadyExistsText}}},u=new OktaSignIn(e),u.authClient.session.exists().then(function(i){if(i){var f=new OktaAuth({url:r.domain,issuer:r.authority});f.token.getWithRedirect({pkce:!1,display:"page",clientId:r.clientId,responseType:"code",responseMode:"form_post",scopes:["openid","email","profile","phone","accounts","suppliers","dss","payments","groups"],redirectUri:r.clientRedirectLink,state:t})}else{u.showSignInAndRedirect({el:n});u.on("afterRender",function(n){n.controller==="primary-auth"&&$(".js-help-links").show()})}}),u}Object.defineProperty(t,"__esModule",{value:!0});t["default"]=i});define("apps/components/find-account-inputs/login-form",["require","exports","vue-property-decorator","components/login"],function(n,t,i,r){Object.defineProperty(t,"__esModule",{value:!0});var u=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t.prototype.mounted=function(){this.widget=r["default"]("#find-account-widget-container",window.location.pathname+window.location.hash,!1,this.loginOptions)},t.prototype.destroyed=function(){this.widget.remove()},__decorate([i.Prop(Object)],t.prototype,"loginOptions",void 0),__decorate([i.Prop(String)],t.prototype,"loginIntroText",void 0),__decorate([i.Component({template:'\n        <div class="find-account_login-container">\n            <p>{{ loginIntroText }}<\/p>\n            <div id="find-account-widget-container"><\/div>\n        <\/div>\n    '})],t)}(i.Vue);t["default"]=u});define("apps/components/account-listing",["require","exports","vue-property-decorator"],function(n,t,i){Object.defineProperty(t,"__esModule",{value:!0});var r=function(n){function t(){var t=n!==null&&n.apply(this,arguments)||this;return t.selectedIndex=0,t}return __extends(t,n),t.prototype.mounted=function(){this.selectedIndex=0;$("#account0").focus();$(".tabs__content").waitMe("hide")},t.prototype.submitForm=function(){return this.accounts[this.selectedIndex]},__decorate([i.Prop(String)],t.prototype,"submitButtonLabel",void 0),__decorate([i.Prop(String)],t.prototype,"chooseAccountPrompt",void 0),__decorate([i.Prop(Array)],t.prototype,"accounts",void 0),__decorate([i.Emit("account-selected")],t.prototype,"submitForm",null),__decorate([i.Component({template:'\n        <div>\n            <form action="#" method="post" @submit.prevent="submitForm">\n                <h3> {{ chooseAccountPrompt }} <\/h3>\n                <ul class="d-flex flex-column list-reset">\n                    <li v-for="(account, index) in accounts" :key="\'account\' + index" class="d-inline-block">\n                        <label class="d-flex flex-row align-items-center align-content-center radio-label" :for="\'account\' + index">\n                            <input name="account" type="radio" class="d-inline-block mb-0 flex-shrink-1" :id="\'account\' + index" :value="index" v-model="selectedIndex" />\n                            <span class="text-uppercase flex-grow-1 flex-shrink-1">{{ account.address }}<\/span>\n                        <\/label>\n                    <\/li>\n                <\/ul>\n                <button type="submit" class="button button--default">{{submitButtonLabel}}<\/button>\n            <\/form>\n        <\/div>\n    '})],t)}(i.Vue);t["default"]=r});define("apps/components/find-account",["require","exports","vue-property-decorator","apps/utils/event-bus","apps/components/find-account-inputs/phone-number-form","apps/components/find-account-inputs/email-form","apps/components/find-account-inputs/account-number-form","apps/components/find-account-inputs/login-form","apps/components/account-listing","services/accounts-service"],function(n,t,i,r,u,f,e,o,s,h){Object.defineProperty(t,"__esModule",{value:!0});var c=function(n){function t(){var t=n.call(this)||this;return t.totalAccountsFound=-1,t.foundAccounts=null,t.selectedTab="",t.errorMessage="",t.accountsService=new h["default"](t.options.apiUrl),t.selectedTab=t.options.displayLogin?"login":"phoneNumber",t}return __extends(t,n),t.prototype.created=function(){r["default"].$on("submit-form",this.retrieveAccounts)},t.prototype.destroyed=function(){r["default"].$off("submit-form",this.retrieveAccounts)},Object.defineProperty(t.prototype,"currentTab",{get:function(){switch(this.selectedTab){case"email":return"EmailForm";case"accountNumber":return"AccountNumberForm";case"login":return"LoginForm";case"phoneNumber":default:return"PhoneNumberForm"}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isComponentAFindAccountInput",{get:function(){return this.selectedTab==="email"||this.selectedTab==="accountNumber"||this.selectedTab==="phoneNumber"||this.selectedTab==="login"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"inputLabels",{get:function(){switch(this.selectedTab){case"phoneNumber":return this.options.phoneNumberInputLabels;case"email":return this.options.emailInputLabels;case"login":return this.options.loginInputLabels;case"accountNumber":return this.options.accountNumberInputLabels}},enumerable:!0,configurable:!0}),t.prototype.switchTab=function(n){this.selectedTab=n;this.totalAccountsFound=-1;$(".tabs__content").waitMe("hide")},t.prototype.retrieveAccounts=function(n){var i=n.value,r=n.zipcode,u=n.recaptchaToken,t={value:i,zipcode:r,recaptchaToken:u};$(".tabs__content").waitMe({effect:"rotation"});switch(this.selectedTab){case"phoneNumber":this.accountsService.getAccountByPhoneNumber(t,this.onSearchCompleted,this.onSearchError);break;case"email":this.accountsService.getAccountByEmail(t,this.onSearchCompleted,this.onSearchError);break;case"accountNumber":this.accountsService.getAccountByAccountNumber(t,this.onSearchCompleted,this.onSearchError)}},t.prototype.handleAccountSelected=function(n){return n},t.prototype.onSearchCompleted=function(n){return this.foundAccounts=n,this.totalAccountsFound=this.foundAccounts.length,this.totalAccountsFound===1&&(this.handleAccountSelected(this.foundAccounts[0]),$(".tabs__content").waitMe("hide")),this.totalAccountsFound===0&&$(".tabs__content").waitMe("hide"),n},t.prototype.onLoginSuccess=function(){$(".tabs__content").waitMe("hide");location.reload()},t.prototype.onSearchError=function(){return $(".tabs__content").waitMe("hide"),this.foundAccounts=null,this.totalAccountsFound=-1,this.errorMessage=this.options.accountRetrievalErrorText,this.errorMessage},__decorate([i.Prop(Object)],t.prototype,"options",void 0),__decorate([i.Emit("account-found")],t.prototype,"handleAccountSelected",null),__decorate([i.Component({name:"FindAccount",components:{LoginForm:o["default"],PhoneNumberForm:u["default"],EmailForm:f["default"],AccountNumberForm:e["default"],AccountListing:s["default"]},template:'\n        <div class="tabs">\n            <div class="tabs__button-row d-flex align-items-center">\n                <slot name="extraTabs"><\/slot>\n                <button v-show="options.displayLogin" @click.prevent="switchTab(\'login\')"\n                        class="tab px-2 py-4 flex-1"\n                        :class="{\'tab--active\': selectedTab === \'login\'}"\n                        :disabled="selectedTab === \'login\'">\n                    <i class="fas fa-user"><\/i>\n                    {{ options.loginHeader }}\n                <\/button>\n                <button v-show="options.displayPhone" @click.prevent="switchTab(\'phoneNumber\')"\n                        class="tab px-2 py-4 flex-1"\n                        :class="{\'tab--active\': selectedTab === \'phoneNumber\'}"\n                        :disabled="selectedTab === \'phoneNumber\'">\n                    <i class="fas fa-phone"><\/i>\n                    {{ options.phoneHeader }}\n                <\/button>\n                <button v-show="options.displayAccount" @click.prevent="switchTab(\'accountNumber\')"\n                        class="tab px-2 py-4 flex-1"\n                        :class="{\'tab--active\': selectedTab === \'accountNumber\'}"\n                        :disabled="selectedTab === \'accountNumber\'">\n                    <i class="fas fa-hashtag"><\/i>\n                    {{ options.accountNumberHeader }}\n                <\/button>\n                <button v-show="options.displayEmail" @click.prevent="switchTab(\'email\')"\n                        class="tab px-2 py-4 flex-1"\n                        :class="{\'tab--active\': selectedTab === \'email\'}"\n                        :disabled="selectedTab === \'email\'">\n                    <i class="far fa-envelope"><\/i>\n                    {{ options.emailHeader }}\n                <\/button>\n            <\/div>\n            <div class="tabs__content px-2 px-md-4">\n                <div v-show="totalAccountsFound === 0" class="px-2 py-4">\n                    <h2>{{ options.noResultsFoundHeader}}<\/h2>\n                    <div v-html="options.noResultsFoundContent"><\/div>\n                    <button type="button" class="button button--default" @click="totalAccountsFound = -1">{{ options.pleaseTryAgainText }}<\/button>\n                <\/div>\n                <p v-show="errorMessage.length > 0">{{ errorMessage }}<\/p>\n                <div v-show="totalAccountsFound === -1">\n                    <keep-alive>\n                        <component\n                            v-if="isComponentAFindAccountInput"\n                            :is="currentTab"\n                            :inputLabels="inputLabels"\n                            :zipcodeLabels="options.zipCodeInputLabels"\n                            :loginOptions = "options.loginOptions"\n                            :loginIntroText ="options.loginIntroText"\n                            :buttonLabel="options.searchButton"\n                            :recaptchaLabels = "options.recaptchaInputLabels"\n                            :recaptchaPublicKey = "options.recaptchaPublicKey"\n                            :isUserAuthenticated = "options.isUserAuthenticated"\n                        >\n                        <\/component>\n                        <component v-else :is="currentTab"><\/component>\n                    <\/keep-alive>\n                <\/div>\n                <account-listing v-if="totalAccountsFound > 1"\n                    :accounts="foundAccounts"\n                    :chooseAccountPrompt="options.chooseAccountFromListPrompt"\n                    :submitButtonLabel="options.submitButtonLabel"\n                    @account-selected="handleAccountSelected"><\/account-listing>\n            <\/div>\n        <\/div>\n    '})],t)}(i.Vue);t["default"]=c});define("apps/components/dynamic-label",["require","exports","vue-property-decorator"],function(n,t,i){Object.defineProperty(t,"__esModule",{value:!0});var r=function(n){function t(){var t=n!==null&&n.apply(this,arguments)||this;return t.templateRenderer=null,t}return __extends(t,n),t.prototype.onTemplateChange=function(){var n=i.Vue.compile("\n            <"+this.tagName+" "+(this.extraClasses.length>0?'class="'+this.extraClasses+'"':"")+" \n                "+(this.extraIds.length>0?'id="'+this.extraIds+'"':"")+"\n            >\n                "+this.templateContent+"\n            <\/"+this.tagName+">");this.templateRenderer=n.render;this.$options.staticRenderFns=n.staticRenderFns.map(function(n){return n})},t.prototype.render=function(n){return this.templateRenderer?this.templateRenderer():n("strong","Loading label...")},__decorate([i.Prop(String)],t.prototype,"templateContent",void 0),__decorate([i.Prop(String)],t.prototype,"tagName",void 0),__decorate([i.Prop({type:String,"default":""})],t.prototype,"extraClasses",void 0),__decorate([i.Prop({type:String,"default":""})],t.prototype,"extraIds",void 0),__decorate([i.Prop(String)],t.prototype,"address",void 0),__decorate([i.Prop(String)],t.prototype,"city",void 0),__decorate([i.Prop(String)],t.prototype,"phone",void 0),__decorate([i.Prop(String)],t.prototype,"email",void 0),__decorate([i.Watch("templateContent",{immediate:!0,deep:!0})],t.prototype,"onTemplateChange",null),__decorate([i.Component],t)}(i.Vue);t["default"]=r});define("utils/string-helper",["require","exports"],function(n,t){Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function n(){}return n.formatAsPhoneNumber=function(n){return n.length==10?"("+n.substr(0,3)+") "+n.substr(3,3)+"-"+n.substr(6,4):n},n.formatAsAccountNumber=function(n){return n.length==10?n.substr(0,4)+"-"+n.substr(4,4)+"-"+n.substr(8,2):n},n.titleize=function(n){for(var i=!0,r="",t=0,u=n.length;t<u;t++){if(n[t]==" "){i=!0;r+=n[t];continue}r+=i?n[t].toUpperCase():n[t].toLowerCase();i=!1}return r},n.format=function(n){for(var t,r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];for(t=0;t<r.length;t++)n=n.replace("{"+t+"}",r[t]);return n},n}();t["default"]=i});define("services/users-service",["require","exports"],function(n,t){Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function n(){this.csrf="";this.baseUrl="";this.baseUrl=window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"")+"/api/users/";this.csrf=$('[name="__RequestVerificationToken"]').last().val().toString()}return n.prototype.addAssociatedAccount=function(n,t,i,r,u,f,e,o){o===void 0&&(o=null);$.ajax({url:this.baseUrl+"associate",type:"POST",dataType:"json",data:{__RequestVerificationToken:this.csrf,accountNumber:n,otpToken:t,otpPasscode:i,enrollInEBills:r,relationShipType:u,phoneNumber:f},success:function(n){e(n)},error:function(n,t,i){console.error("Error associating account: ");console.error(i);o&&o()}})},n.prototype.requestAccountAuthorization=function(n,t,i,r,u,f,e,o,s,h){h===void 0&&(h=null);$.ajax({url:this.baseUrl+"authorize",type:"POST",dataType:"json",data:{__RequestVerificationToken:this.csrf,accountNumber:n,phoneNumber:t,mailingAddressLine1:i,mailingAddressLine2:r,mailingAddressCity:u,mailingAddressState:f,mailingAddressZipCode:e,relationshipType:o},success:function(n){s(n)},error:function(n,t,i){console.error("Error associating account: ");console.error(i);h&&h()}})},n.prototype.reorderAccount=function(n,t,i,r){r===void 0&&(r=null);$.ajax({url:this.baseUrl+"reorder",type:"POST",dataType:"json",data:{__RequestVerificationToken:this.csrf,accountNumber:n,afterAccountNumber:t},success:function(n){n?i():r&&r()},error:function(n,t,i){console.error(i);r&&r()}})},n}();t["default"]=i});define("services/kubra-service",["require","exports"],function(n,t){Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function n(){this.csrf="";this.baseUrl="";this.baseUrl=window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"")+"/api/kubra/";this.csrf=$('[name="__RequestVerificationToken"]').last().val().toString()}return n.prototype.createLink=function(n,t,i,r,u){u===void 0&&(u=null);$.ajax({url:this.baseUrl+"link",type:"POST",dataType:"json",data:{__RequestVerificationToken:this.csrf,accountNumber:n,returnLink:t,landingPage:i},success:function(n){n.result?r(n):u()},error:function(n,t,i){console.error("Error retrieving accounts: ");console.error(i);u&&u()}})},n}();t["default"]=i});define("services/otp-service",["require","exports"],function(n,t){Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function n(){this.csrf="";this.baseUrl="";this.baseUrl=window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"")+"/api/otp/";this.csrf=$('[name="__RequestVerificationToken"]').last().val().toString()}return n.prototype.retrieveOtpAccountOptions=function(n,t,i){i===void 0&&(i=null);$.ajax({url:this.baseUrl+"account-options",type:"POST",dataType:"json",data:{__RequestVerificationToken:this.csrf,accountNumber:n},success:function(n){t(n)},error:function(n,t,r){console.error(r);i&&i()}})},n.prototype.sendOtpAccountCode=function(n,t,i,r){r===void 0&&(r=null);$.ajax({url:this.baseUrl+"account-code",type:"POST",dataType:"json",data:{__RequestVerificationToken:this.csrf,accountNumber:n,method:t},success:function(n){i(n)},error:function(n,t,i){console.error(i);r&&r()}})},n}();t["default"]=i});define("apps/account-associate-app",["require","exports","vue-property-decorator","apps/components/find-account","apps/components/dynamic-label","utils/mask","services/users-service","services/accounts-service","services/kubra-service","services/otp-service","components/flyout","utils/query-string","utils/form-validator"],function(n,t,i,r,u,f,e,o,s,h,c,l,a){function y(n,t){var r=new i.Vue({el:"#"+n,data:{accountAssociateAppOptions:t},components:{AccountAssociateApp:v}});c["default"].attachListenerIfInFlyout("#"+n,function(){r.$destroy()})}Object.defineProperty(t,"__esModule",{value:!0});t.init=y;var v=function(n){function t(){var t=n.call(this)||this;return t.state="find-account",t.passcodeSelection="Text",t.account=null,t.relationshipType="BillAuthorized",t.customerPhone="",t.passcode="",t.token=null,t.otpMethods=null,t.kubraLink=null,t.hasEnoughTimePassed=!0,t.currentTimeoutInSeconds=20,t.enrolledInEBills=!0,t.isCustomerPhoneRequired=!1,t.hasSubmittedInvalidPasscode=!1,t.usersService=new e["default"],t.otpService=new h["default"],t.accountsService=new o["default"](null),t.kubraService=new s["default"],t}return __extends(t,n),Object.defineProperty(t.prototype,"isSendPasscodeFormValid",{get:function(){return this.hasEnoughTimePassed&&(!this.isCustomerPhoneRequired||a["default"].validatePhoneNumber(f["default"].getRawValue(this.customerPhone)))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isConfirmPasscodeFormValid",{get:function(){return this.passcode&&this.passcode.length===6&&(!this.isCustomerPhoneRequired||a["default"].validatePhoneNumber(f["default"].getRawValue(this.customerPhone)))},enumerable:!0,configurable:!0}),t.prototype.onPreferredCallbackChange=function(n,t){t.length>0||f["default"].custom("#passcode","000000")},t.prototype.onCustomerPhoneChange=function(n,t){t.length>0||f["default"].phoneNumber("#customerPhone")},t.prototype.onAccountFound=function(n){this.account=n;$(".account-associate-app").waitMe({effect:"rotation"});this.state="load-passcode-options";this.otpService.retrieveOtpAccountOptions(this.account.accountNumber,this.onOtpOptionsComplete,this.onCallbackFail)},t.prototype.onOtpOptionsComplete=function(n){this.otpMethods=n;this.otpMethods.text==null&&this.otpMethods.email==null&&this.otpMethods.voice==null?this.usersService.addAssociatedAccount(this.account.accountNumber,this.token,"000000",this.enrolledInEBills,this.relationshipType,this.customerPhone,this.onConfirmPasscodeComplete,this.onCallbackFail):(this.otpMethods.text==null&&(this.passcodeSelection="Email"),this.state="send-passcode",$(".account-associate-app").waitMe("hide"))},t.prototype.sendPasscode=function(){var n=this;this.isSendPasscodeFormValid&&(this.state==="send-passcode"||this.state==="confirm-passcode")&&(this.passcode="",this.hasSubmittedInvalidPasscode=!1,this.hasEnoughTimePassed=!1,$(".account-associate-app").waitMe({effect:"rotation"}),this.state="confirm-passcode",this.otpService.sendOtpAccountCode(this.account.accountNumber,this.passcodeSelection,this.onSendPasscodeComplete,this.onCallbackFail),window.setTimeout(function(){return n.hasEnoughTimePassed=!0},this.currentTimeoutInSeconds*1e3),this.currentTimeoutInSeconds+=10)},t.prototype.onSendPasscodeComplete=function(n){this.token=n;this.state=n!==null?"confirm-passcode":"fail";$(".account-associate-app").waitMe("hide")},t.prototype.confirmPasscode=function(){this.isConfirmPasscodeFormValid&&this.state==="confirm-passcode"&&($(".account-associate-app").waitMe({effect:"rotation"}),this.usersService.addAssociatedAccount(this.account.accountNumber,this.token,this.passcode,this.enrolledInEBills,this.relationshipType,this.customerPhone,this.onConfirmPasscodeComplete,this.onCallbackFail))},t.prototype.onConfirmPasscodeComplete=function(n){n.status==0?this.kubraService.createLink(this.account.accountNumber,this.options.autoPayReturnLink,this.options.autoPayLandingPage,this.onKubraLinkComplete,this.onKubraLinkFail):n.status==1?this.state="already-associated":n.status==4?this.state="fail":this.hasSubmittedInvalidPasscode=!0;$(".account-associate-app").waitMe("hide")},t.prototype.onCallbackFail=function(){this.state="fail";$(".account-associate-app").waitMe("hide")},t.prototype.onKubraLinkComplete=function(n){this.kubraLink=n;this.state="success";$(".account-associate-app").waitMe("hide")},t.prototype.onKubraLinkFail=function(){this.state="success";$(".account-associate-app").waitMe("hide")},t.prototype.switchEBillsStatus=function(){$(".switchEBillsStatus").waitMe({effect:"rotation"});this.accountsService.setEBillStatus(this.account,!this.enrolledInEBills,this.onSwitchEBillsComplete,this.onSwitchEBillsFail)},t.prototype.onSwitchEBillsComplete=function(){this.enrolledInEBills=!this.enrolledInEBills;$(".switchEBillsStatus").waitMe("hide")},t.prototype.onSwitchEBillsFail=function(){$(".switchEBillsStatus").waitMe("hide")},t.prototype.destroyed=function(){if(this.state==="success"){var n=l["default"].GetQueryString("target");n&&n.length>0?window.location.href=n:window.location.reload()}},__decorate([i.Prop(Object)],t.prototype,"options",void 0),__decorate([i.Watch("passcode")],t.prototype,"onPreferredCallbackChange",null),__decorate([i.Watch("customerPhone")],t.prototype,"onCustomerPhoneChange",null),__decorate([i.Component({name:"AccountAssociateApp",components:{FindAccount:r["default"],DynamicLabel:u["default"]},template:'\n        <div class="account-associate-app">\n            <div class="mb-2 mb-sm-4 account-associate__header">\n                <div class="d-flex flex-column flex-sm-row justify-content-between align-items-sm-end">\n                    <h1 class="mb-0 font-weight-bold text-uppercase">{{options.title}}<\/h1>\n                <\/div>\n                <h3 class="mt-2 mt-sm-4">{{options.subtitle}}<\/h3>\n            <\/div>\n            <find-account v-if="state===\'find-account\'" :options="options.findAccount" v-on:account-found="onAccountFound"><\/find-account>\n            <div v-else-if="state===\'send-passcode\' || state===\'confirm-passcode\'">\n                <div class="row">\n                    <div class="col-3"><span class="font-weight-bold">{{options.accountLabel}}<\/span><\/div>\n                    <div class="col-9"><span>{{ account.accountDisplayNumber }}<\/span><\/div>\n                <\/div>\n                <div class="row">\n                    <div class="col-3"><span class="font-weight-bold">{{options.addressLabel}}<\/span><\/div>\n                    <div class="col-9"><span>{{ account.address }}<\/span><\/div>\n                <\/div>\n\n                <form action="#" method="post" @submit.prevent="sendPasscode" class="form-invisible">\n                    <div class="row mt-3">\n                        <div class="col" v-html="options.accountAssociationTypeLabel"><\/div>\n                    <\/div>\n                    <ul class="d-flex flex-column list-reset mt-3 ml-0">\n                        <li class="d-inline-block">\n                            <label class="d-flex flex-row align-items-center align-content-center radio-label" for="Co-Responsible">\n                                <input name="AccountRelationshipType"\n                                    type="radio"\n                                    id="Co-Responsible"\n                                    class="d-inline-block mb-0 flex-shrink-1"\n                                    value="CoResponsible"\n                                    v-model="relationshipType" />\n                                <span class="flex-grow-1 flex-shrink-1">{{ options.coResponsibleLabel }}<\/span>\n                            <\/label>\n                        <\/li>\n                        <li class="d-inline-block">\n                            <label class="d-flex flex-row align-items-center align-content-center radio-label" for="BillAuthorized">\n                                <input name="AccountRelationshipType"\n                                    type="radio"\n                                    id="BillAuthorized"\n                                    class="d-inline-block mb-0 flex-shrink-1"\n                                    value="BillAuthorized"\n                                    v-model="relationshipType" />\n                                <span class="flex-grow-1 flex-shrink-1">{{ options.billAuthorizedLabel }}<\/span>\n                            <\/label>\n                        <\/li>\n                    <\/ul>\n\n                    <div v-if="options.isPhoneNumberRequired === true" class="mt-1">\n                        <label for="customerPhone" class="d-block">{{options.phoneNumberLabel}}<\/label>\n                        <input type="tel"\n                               class="d-inline-block"\n                               id="customerPhone"\n                               name="customerPhone"\n                               max-length="14"\n                               :aria-label="options.phoneNumberLabel"\n                               v-model="customerPhone"/>\n                    <\/div>\n\n                    <div class="row mt-4">\n                        <div class="col" v-html="options.passcodeExplanationContent"><\/div>\n                    <\/div>\n\n                    <p>{{options.selectPasscodeChoiceLabel}}<\/p>\n\n                    <ul class="d-flex flex-column list-reset mb-0">\n                        <li v-if="otpMethods.text !== null" class="d-inline-block">\n                            <label class="d-flex flex-row align-items-center align-content-center radio-label" for="passcodePreference_text">\n                                <input name="passcodePreference"\n                                    type="radio"\n                                    id="passcodePreference_text"\n                                    class="d-inline-block mb-0 flex-shrink-1"\n                                    value="Text"\n                                    v-model="passcodeSelection" />\n                                <dynamic-label :templateContent="options.smsOptionLabel"\n                                    :tagName="\'span\'"\n                                    :extraClasses="\'flex-grow-1 flex-shrink-1\'"\n                                    :phone="otpMethods.text">\n                                <\/dynamic-label>\n                            <\/label>\n                        <\/li>\n                        <li v-if="otpMethods.voice !== null" class="d-inline-block">\n                            <label class="d-flex flex-row align-items-center align-content-center radio-label" for="passcodePreference_voice">\n                                <input name="passcodePreference"\n                                    type="radio"\n                                    id="passcodePreference_voice"\n                                    class="d-inline-block mb-0 flex-shrink-1"\n                                    value="Voice"\n                                    v-model="passcodeSelection" />\n                                <dynamic-label :templateContent="options.voiceOptionLabel"\n                                    :tagName="\'span\'"\n                                    :extraClasses="\'flex-grow-1 flex-shrink-1\'"\n                                    :phone="otpMethods.voice">\n                                <\/dynamic-label>\n                            <\/label>\n                        <\/li>\n                        <li  v-if="otpMethods.email !== null"class="d-inline-block">\n                            <label class="d-flex flex-row align-items-center align-content-center radio-label" for="passcodePreference_email">\n                                <input name="passcodePreference"\n                                    type="radio"\n                                    id="passcodePreference_email"\n                                    class="d-inline-block mb-0 flex-shrink-1"\n                                    value="Email"\n                                    v-model="passcodeSelection" />\n                                <dynamic-label :templateContent="options.emailOptionLabel"\n                                    :tagName="\'span\'"\n                                    :extraClasses="\'flex-grow-1 flex-shrink-1\'"\n                                    :email="otpMethods.email">\n                                <\/dynamic-label>\n                            <\/label>\n                        <\/li>\n                    <\/ul>\n                    <button type="submit" class="button button--default mt-4" :class="{ disabled: !isSendPasscodeFormValid }">\n                        <span v-if="state===\'send-passcode\'">{{options.sendPasscodeButtonLabel}}<\/span>\n                        <span v-if="state===\'confirm-passcode\'">{{options.resendPasscodeButtonLabel}}<\/span>\n                    <\/button>\n                <\/form>\n                <form action="#" v-if="state===\'confirm-passcode\'" method="post" @submit.prevent="confirmPasscode" class="form-invisible pt-4">\n                    <div class="row">\n                        <div class="form-group col">\n                            <label for="passcodeVerify">{{options.passcodeInputLabel}}<\/label>\n                            <input type="text"\n                                    class="form-control passcode-input"\n                                    id="passcode"\n                                    name="passcode"\n                                    max-length="14"\n                                    :aria-label="options.passcodeInputLabel"\n                                    v-model="passcode"/>\n                            <p class="form__error" v-show="hasSubmittedInvalidPasscode">{{ options.invalidPasscodeMessage }}<\/p>\n                        <\/div>\n                    <\/div>\n                    <div class="row">\n                        <div class="form-group col">\n                            <button type="submit" class="button button--default" :class="{ disabled: !isConfirmPasscodeFormValid }">{{options.confirmPasscodeButtonLabel}}<\/button>\n                        <\/div>\n                    <\/div>\n                <\/form>\n            <\/div>\n            <div v-else-if="state===\'success\'">\n                <div class="alert alert-success my-4" v-html="options.successMessage"><\/div>\n                <form action="#" method="post" @submit.prevent="switchEBillsStatus" class="switchEBillsStatus form-invisible mb-4">\n                    <div class="row" v-if="!enrolledInEBills">\n                        <div class="col-auto contents-vertical-center">\n                            <img :src="options.unenrolledEBillsImageLink" :alt="options.unenrolledEBillsImageAltText" />\n                        <\/div>\n                        <div class="col" v-html="options.unenrolledEBillsContent">\n                        <\/div>\n                        <div class="col-12 text-center"><button type="submit" class="button button--link">{{options.unenrolledEBillsClickText}}<\/button><\/div>\n                    <\/div>\n                    <div class="row" v-else>\n                        <div class="col-auto contents-vertical-center">\n                            <img :src="options.enrolledEBillsImageLink" :alt="options.enrolledEBillsImageAltText" />\n                        <\/div>\n                        <div class="col" v-html="options.enrolledEBillsContent">\n                        <\/div>\n                        <div class="col-12 text-center"><button type="submit" class="button button--link">{{options.enrolledEBillsClickText}}<\/button><\/div>\n                    <\/div>\n                <\/form>\n                <div v-if="kubraLink !== null && kubraLink.kubraActionLink !== null">\n                    <div class="row">\n                        <div class="col">\n                            <h5>{{options.autoPayTitle}}<\/h5>\n                        <\/div>\n                    <\/div>\n                    <div class="row mt-1">\n                        <div class="col">\n                            <form method="POST" class="form-invisible" :action="kubraLink.kubraActionLink">\n                                <input type="hidden" name="Token1" :value="kubraLink.userToken">\n                                <input type="hidden" name="Token2" :value="kubraLink.chToken">\n                                <input type="hidden" name="RETURNURL" :value="kubraLink.returnLink">\n                                <input type="hidden" name="RETURNURLHASH" :value="kubraLink.returnLinkHash">\n                                <input type="hidden" name="LANDINGPAGE" :value="kubraLink.landingPage">\n                                <input type="hidden" name="language" :value="kubraLink.language">\n                                <input type="hidden" name="CustomerType" :value="kubraLink.customerType">\n                                <input v-if="kubraLink.bypassCallback" type="hidden" name="cbvalidation" value="ON" />\n                                <input v-if="kubraLink.accountNumber !== null" type="hidden" name="AccountNumber" :value="kubraLink.accountNumber" />\n\n                                <button type="submit" :class="options.autoPayLinkCss">{{options.autoPayLinkTitle}}<\/button>\n                            <\/form>\n                        <\/div>\n                    <\/div>\n                    <div class="row mt-2">\n                        <div class="col">\n                            <a class="button button--outline button--outline--default btn-block flyout-close">{{options.noAutoPayLinkLabel}}<\/a>\n                        <\/div>\n                    <\/div>\n                <\/div>\n                <div v-else>\n                    <a href="javascript:void(0)" class="button button--default btn-block flyout-close">{{options.closeButtonLabel}}<\/a>\n                <\/div>\n            <\/div>\n            <div v-else-if="state===\'already-associated\'">\n                <div class="alert alert-warning my-4" v-html="options.alreadyAssociatedMessage"><\/div>\n                <a href="javascript:void(0)" class="button button--default flyout-close">{{options.closeButtonLabel}}<\/a>\n            <\/div>\n            <div v-else-if="state===\'fail\'">\n                <div class="alert alert-danger my-4" v-html="options.failureMessage"><\/div>\n                <a href="javascript:void(0)" class="button button--default flyout-close">{{options.closeButtonLabel}}<\/a>\n            <\/div>\n        <\/div>\n    '})],t)}(i.Vue);t["default"]=v});define("apps/account-authorization-app",["require","exports","vue-property-decorator","apps/components/find-account","apps/components/dynamic-label","utils/string-helper","services/users-service","services/accounts-service","components/flyout","utils/query-string","utils/form-validator","utils/mask"],function(n,t,i,r,u,f,e,o,s,h,c,l){function v(n,t){var r=new i.Vue({el:"#"+n,data:{accountAssociateAppOptions:t},components:{AccountAuthorizationApp:a}});s["default"].attachListenerIfInFlyout("#"+n,function(){r.$destroy()})}Object.defineProperty(t,"__esModule",{value:!0});t.init=v;var a=function(n){function t(){var t=n.call(this)||this;return t.state="find-account",t.account=null,t.relationshipType="BillAuthorized",t.customerPhone="",t.isCustomerPhoneRequired=!1,t.mailingAddressLine1="",t.mailingAddressLine2="",t.mailingAddressCity="",t.mailingAddressState="",t.mailingAddressZipCode="",t.isMailingAddressRequired=!1,t.hasUserSubmitted=!1,t.usersService=new e["default"],t.accountsService=new o["default"](null),t}return __extends(t,n),t.prototype.onAccountFound=function(n){this.account=n;this.state="request-access";$(".account-authorization-app").waitMe("hide")},t.prototype.sendAuthorizationRequest=function(){(this.hasUserSubmitted=!0,this.isRequestAuthorizationFormValid)&&($(".account-authorization-app").waitMe({effect:"rotation"}),this.usersService.requestAccountAuthorization(this.account.accountNumber,this.customerPhone,this.mailingAddressLine1,this.mailingAddressLine2,this.mailingAddressCity,this.mailingAddressState,this.mailingAddressZipCode,this.relationshipType,this.onRequestAccountAuthorizationComplete,this.onCallbackFail))},Object.defineProperty(t.prototype,"showPhoneNumberError",{get:function(){return!c["default"].validatePhoneNumber(this.customerPhone)&&this.hasUserSubmitted},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"showMailingAddressLine1Error",{get:function(){return!this.mailingAddressLine1&&this.hasUserSubmitted},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"showMailingAddressCityError",{get:function(){return!this.mailingAddressCity&&this.hasUserSubmitted},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"showMailingAddressStateError",{get:function(){return!this.mailingAddressState&&this.hasUserSubmitted},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"showZipCodeError",{get:function(){return!c["default"].validateZipCode(this.mailingAddressZipCode)&&this.hasUserSubmitted},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isRequestAuthorizationFormValid",{get:function(){return(!this.isCustomerPhoneRequired||c["default"].validatePhoneNumber(l["default"].getRawValue(this.customerPhone)))&&(!this.isMailingAddressRequired||c["default"].validateZipCode(this.mailingAddressZipCode)&&this.mailingAddressLine1!=""&&this.mailingAddressCity!="")},enumerable:!0,configurable:!0}),t.prototype.onCustomerPhoneChange=function(n,t){t.length>0||l["default"].phoneNumber("#phoneNumber")},t.prototype.onRequestAccountAuthorizationComplete=function(n){console.log(5);n.status==5?this.state="success":n.status==1?this.state="already-associated":n.status==4&&(this.state="fail");$(".account-authorization-app").waitMe("hide")},t.prototype.onCallbackFail=function(){this.state="fail";$(".account-authorization-app").waitMe("hide")},t.prototype.formatAccountNumber=function(n){return f["default"].formatAsAccountNumber(n)},t.prototype.destroyed=function(){if(this.state==="success"){var n=h["default"].GetQueryString("target");n&&n.length>0?window.location.href=n:window.location.reload()}},__decorate([i.Prop(Object)],t.prototype,"options",void 0),__decorate([i.Watch("customerPhone")],t.prototype,"onCustomerPhoneChange",null),__decorate([i.Component({name:"AccountAuthorizationApp",components:{FindAccount:r["default"],DynamicLabel:u["default"]},template:'\n     <div class="account-authorization-app">\n            <div class="mb-2 mb-sm-4 account-associate__header">\n                <div class="d-flex flex-column flex-sm-row justify-content-between align-items-sm-end">\n                    <h1 class="mb-0 font-weight-bold text-uppercase">{{options.title}}<\/h1>\n                <\/div>\n                <h3 class="mt-2 mt-sm-4">{{options.subtitle}}<\/h3>\n            <\/div>\n            <find-account v-if="state===\'find-account\'" :options="options.findAccount" v-on:account-found="onAccountFound"><\/find-account>\n            <div v-else-if="state===\'request-access\'">\n                <div class="row">\n                    <div class="col-3"><span class="font-weight-bold">{{options.accountLabel}}<\/span><\/div>\n                    <div class="col-9"><span>{{ account.accountDisplayNumber }}<\/span><\/div>\n                <\/div>\n                <div class="row">\n                    <div class="col-3"><span class="font-weight-bold">{{options.addressLabel}}<\/span><\/div>\n                    <div class="col-9"><span>{{ account.address }}<\/span><\/div>\n                <\/div>\n\n                <form action="#" method="post" @submit.prevent="sendAuthorizationRequest" class="form-invisible">\n\n                  <div class="row mt-3">\n                        <div class="col" v-html="options.accountAssociationTypeLabel"><\/div>\n                  <\/div>\n                  <ul class="d-flex flex-column list-reset mt-3 ml-0">\n                            <li class="d-inline-block">\n                                <label class="d-flex flex-row align-items-center align-content-center radio-label" for="Co-Responsible">\n                                    <input name="AccountRelationshipType"\n                                        type="radio"\n                                        id="Co-Responsible"\n                                        class="d-inline-block mb-0 flex-shrink-1"\n                                        value="CoResponsible"\n                                        v-model="relationshipType" />\n                                    <span class="flex-grow-1 flex-shrink-1">{{ options.coResponsibleLabel }}<\/span>\n                                <\/label>\n                            <\/li>\n                            <li class="d-inline-block">\n                                <label class="d-flex flex-row align-items-center align-content-center radio-label" for="BillAuthorized">\n                                    <input name="AccountRelationshipType"\n                                        type="radio"\n                                        id="BillAuthorized"\n                                        class="d-inline-block mb-0 flex-shrink-1"\n                                        value="BillAuthorized"\n                                        v-model="relationshipType" />\n                                    <span class="flex-grow-1 flex-shrink-1">{{ options.billAuthorizedLabel }}<\/span>\n                                <\/label>\n                          <\/li>\n                      <\/ul>\n\n                    <div v-if="options.isPhoneNumberRequired === true" class="mt-1">\n                        <label for="phoneNumber" class="required">{{ options.phoneNumberInputLabels.label }}<\/label>\n                        <input type="tel"\n                            id="phoneNumber"\n                            :class="{\n                                \'mb-1\': options.phoneNumberInputLabels.helpText && options.phoneNumberInputLabels.helpText.length > 0,\n                                \'input--error\': showPhoneNumberError\n                            }"\n                            name="phoneNumber"\n                            role="textbox"\n                            :placeholder="options.phoneNumberInputLabels.placeholder"\n                            :aria-label="options.phoneNumberInputLabels.label"\n                            v-model="customerPhone"\n                            :aria-valuenow="customerPhone"\n                            :aria-valuetext="customerPhone"\n                            maxlength="11"\n                            required />\n                        <p v-if="options.phoneNumberInputLabels.helpText" class="form__help-text mb-0">{{ options.phoneNumberInputLabels.helpText }}<\/p>\n                        <p v-if="options.phoneNumberInputLabels.requiredErrorLabel" v-show="showPhoneNumberError" class="form__error mt-0 mb-0">{{ options.phoneNumberInputLabels.requiredErrorLabel }}<\/p>\n                    <\/div>\n\n                    <div v-if="options.isMailingAddressRequired === true" class="row mt-3">\n                        <div class="col" v-html="options.mailingAddressTitle"><\/div>\n                    <\/div>\n                    <div v-if="options.isMailingAddressRequired === true" class="mt-1">\n                        <div>\n                            <label for="line1" class="mt-3 required">{{ options.mailingAddressLine1InputLabels.label }}<\/label>\n                            <input type="text"\n                                id="line1"\n                                :class="{\n                                    \'mb-1\': options.mailingAddressLine1InputLabels.helpText && options.mailingAddressLine1InputLabels.helpText.length > 0,\n                                    \'input--error\': showMailingAddressLine1Error\n                                }"\n                                name="mailingAddressLine1"\n                                :placeholder="options.mailingAddressLine1InputLabels.placeholder"\n                                :aria-label="options.mailingAddressLine1InputLabels.label"\n                                v-model="mailingAddressLine1"\n                                :title="options.mailingAddressLine1InputLabels.helpText ? options.mailingAddressLine1InputLabels.helpText : \'Please enter a valid address\'"\n                                required />\n                            <p v-if="options.mailingAddressLine1InputLabels.helpText" class="form__help-text mb-0">{{ options.mailingAddressLine1InputLabels.helpText }}<\/p>\n                            <p v-if="options.mailingAddressLine1InputLabels.requiredErrorLabel" v-show="showMailingAddressLine1Error" class="form__error mt-0">{{ options.mailingAddressLine1InputLabels.requiredErrorLabel }}<\/p>\n                        <\/div>\n\n                        <div>\n                            <label for="line2" class="mt-3">{{ options.mailingAddressLine2InputLabels.label }}<\/label>\n                            <input type="text"\n                                id="line2"\n                                :class="{\n                                    \'mb-1\': options.mailingAddressLine2InputLabels.helpText && options.mailingAddressLine2InputLabels.helpText.length > 0,\n                                }"\n                                name="mailingAddressLine2"\n                                :placeholder="options.mailingAddressLine2InputLabels.placeholder"\n                                :aria-label="options.mailingAddressLine2InputLabels.label"\n                                v-model="mailingAddressLine2"\n                                :title="options.mailingAddressLine2InputLabels.helpText ? options.mailingAddressLine2InputLabels.helpText : \'Please enter a valid address\'" />\n                            <p v-if="options.mailingAddressLine2InputLabels.helpText" class="form__help-text mb-0">{{ options.mailingAddressLine2InputLabels.helpText }}<\/p>\n                        <\/div>\n\n                        <div>\n                            <label for="city" class="mt-3 required">{{ options.mailingAddressCityInputLabels.label }}<\/label>\n                            <input type="text"\n                                id="city"\n                                :class="{\n                                    \'mb-1\': options.mailingAddressCityInputLabels.helpText && options.mailingAddressCityInputLabels.helpText.length > 0,\n                                    \'input--error\': showMailingAddressCityError\n                                }"\n                                name="mailingAddressCity"\n                                :placeholder="options.mailingAddressCityInputLabels.placeholder"\n                                :aria-label="options.mailingAddressCityInputLabels.label"\n                                v-model="mailingAddressCity"\n                                :title="options.mailingAddressCityInputLabels.helpText ? options.mailingAddressCityInputLabels.helpText : \'Please enter a valid city\'"\n                                required />\n                            <p v-if="options.mailingAddressCityInputLabels.helpText" class="form__help-text mb-0">{{ options.mailingAddressCityInputLabels.helpText }}<\/p>\n                            <p v-if="options.mailingAddressCityInputLabels.requiredErrorLabel" v-show="showMailingAddressCityError" class="form__error mt-0">{{ options.mailingAddressCityInputLabels.requiredErrorLabel }}<\/p>\n                        <\/div>\n\n                        <div>\n                            <label for="state" class="mt-3 required">{{ options.mailingAddressStateInputLabels.label }}<\/label>\n                            <select\n                                v-model="mailingAddressState"\n                                :class="{\n                                    \'mb-1\': options.mailingAddressStateInputLabels.helpText && options.mailingAddressStateInputLabels.helpText.length > 0,\n                                    \'input--error\': showMailingAddressStateError\n                                }"\n                                name="mailingAddressState"\n                                :placeholder="options.mailingAddressZipCodeInputLabels.placeholder"\n                                :aria-label="options.mailingAddressZipCodeInputLabels.label"\n                                :title="options.mailingAddressStateInputLabels.helpText ? options.mailingAddressStateInputLabels.helpText : \'Please enter a 5 digit zip code\'"\n                                required >\n                              <option v-for="option in options.states" v-bind:value="option">\n                                {{ option }}\n                              <\/option>\n                            <\/select>\n                            <p v-if="options.mailingAddressStateInputLabels.helpText" class="form__help-text mb-0">{{ options.mailingAddressStateInputLabels.helpText }}<\/p>\n                            <p v-if="options.mailingAddressStateInputLabels.requiredErrorLabel" v-show="showMailingAddressStateError" class="form__error mt-0">{{ options.mailingAddressStateInputLabels.requiredErrorLabel }}<\/p>\n                        <\/div>\n\n                        <div>\n                            <label for="zipCode" class="mt-3 required">{{ options.mailingAddressZipCodeInputLabels.label }}<\/label>\n                            <input type="text"\n                                id="zipCode"\n                                :class="{\n                                    \'mb-1\': options.mailingAddressZipCodeInputLabels.helpText && options.mailingAddressZipCodeInputLabels.helpText.length > 0,\n                                    \'input--error\': showZipCodeError\n                                }"\n                                name="mailingAddressZipCode"\n                                :placeholder="options.mailingAddressZipCodeInputLabels.placeholder"\n                                :aria-label="options.mailingAddressZipCodeInputLabels.label"\n                                v-model="mailingAddressZipCode"\n                                data_mask = "00000"\n                                pattern="[0-9]{5}"\n                                :title="options.mailingAddressZipCodeInputLabels.helpText ? options.mailingAddressZipCodeInputLabels.helpText : \'Please enter a 5 digit zip code\'"\n                                maxlength="5"\n                                required />\n                            <p v-if="options.mailingAddressZipCodeInputLabels.helpText" class="form__help-text mb-0">{{ options.mailingAddressZipCodeInputLabels.helpText }}<\/p>\n                            <p v-if="options.mailingAddressZipCodeInputLabels.requiredErrorLabel" v-show="showZipCodeError" class="form__error mt-0">{{ options.mailingAddressZipCodeInputLabels.requiredErrorLabel }}<\/p>\n                        <\/div>\n                    <\/div>\n\n                    <button type="submit" class="button button--default my-4" :class="{ disabled: !isRequestAuthorizationFormValid }">\n                        <span>{{options.requestAuthorizationButtonLabel}}<\/span>\n                    <\/button>\n\n                    <a href="javascript:void(0)" class="button button--default btn-block flyout-close">{{options.closeButtonLabel}}<\/a>\n\n                <\/form>\n            <\/div>\n            <div v-else-if="state===\'success\'">\n                <div class="alert alert-success my-4" v-html="options.successMessage"><\/div>\n            <\/div>\n            <div v-else-if="state===\'already-associated\'">\n                <div class="alert alert-warning my-4" v-html="options.alreadyAssociatedMessage"><\/div>\n                <a href="javascript:void(0)" class="button button--default flyout-close">{{options.closeButtonLabel}}<\/a>\n            <\/div>\n            <div v-else-if="state===\'fail\'">\n                <div class="alert alert-danger my-4" v-html="options.failureMessage"><\/div>\n                <a href="javascript:void(0)" class="button button--default flyout-close">{{options.closeButtonLabel}}<\/a>\n            <\/div>\n        <\/div>\n    '})],t)}(i.Vue);t["default"]=a});define("services/payments-service",["require","exports"],function(n,t){Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function n(){this.csrf="";this.baseUrl="";this.baseUrl=window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"")+"/api/payments/";this.csrf=$('[name="__RequestVerificationToken"]').last().val().toString()}return n.prototype.getPaymentInfo=function(n,t,i){i===void 0&&(i=null);$.ajax({url:this.baseUrl,type:"POST",dataType:"json",data:{accountToken:n,__RequestVerificationToken:this.csrf},success:function(n){n.result?t(n):i(n)},error:function(n,t,r){console.error("Error retrieving accounts: ");console.error(r);i&&i({result:!1,errorMessageId:5})}})},n.prototype.getCCPaymentUrl=function(n,t,i){i===void 0&&(i=null);$.ajax({url:this.baseUrl+"cc/url",type:"POST",dataType:"json",data:{accountToken:n,__RequestVerificationToken:this.csrf},success:function(n){n.result?t(n):i(n)},error:function(){i&&i({result:!1,errorMessageId:5})}})},n.prototype.checkPaymentValid=function(n,t,i){i===void 0&&(i=null);$.ajax({url:this.baseUrl+"verify",type:"POST",dataType:"json",data:__assign({__RequestVerificationToken:this.csrf},n),success:function(n){n.result?t(n):i(n)},error:function(n,t,r){console.error("Error retrieving accounts: ");console.error(r);i&&i({result:!1,errorMessageId:5})}})},n.prototype.submitPaymentValid=function(n,t,i,r){r===void 0&&(r=null);$.ajax({url:this.baseUrl+"post",type:"POST",dataType:"json",data:{paymentPayload:n,contentId:t,__RequestVerificationToken:this.csrf},success:function(n){n.result?i(n):r(n)},error:function(n,t,i){console.error("Error retrieving accounts: ");console.error(i);r&&r({result:!1,errorMessageId:5})}})},n.prototype.getIOAPPaymentInfo=function(n,t,i){i===void 0&&(i=null);$.ajax({url:this.baseUrl,type:"POST",dataType:"json",data:{accountToken:n,isIOAP:!0,__RequestVerificationToken:this.csrf},success:function(n){n.result?t(n):i(n)},error:function(n,t,r){console.error("Error retrieving accounts: ");console.error(r);i&&i({result:!1,errorMessageId:5})}})},n}();t["default"]=i});define("apps/payments-app",["require","exports","vue-property-decorator","apps/components/find-account","services/payments-service","apps/components/payments-by-check","utils/error-messages","components/flyout","utils/number-helper"],function(n,t,i,r,u,f,e,o,s){function c(n,t){var r=new i.Vue({el:"#"+n,data:{paymentsAppOptions:t},components:{PaymentsApp:h}});o["default"].attachListenerIfInFlyout("#"+n,function(){r.$destroy();window.location.reload()})}Object.defineProperty(t,"__esModule",{value:!0});t.init=c;var h=function(n){function t(){var t=n.call(this)||this;return t.isCheckPay=!1,t.account=null,t.currErrorMessage="",t.accountPayment=null,t.displayAccountInfo=!0,t.paymentsService=new u["default"],t}return __extends(t,n),t.prototype.amountDue=function(n){return s["default"].formatCurrency(n)},t.prototype.onAccountFound=function(n){this.account=n;$(".payment-app").waitMe({effect:"rotation"});this.paymentsService.getPaymentInfo(n.token,this.onPaymentFetch,this.onFailure)},t.prototype.onPaymentFetch=function(n){this.accountPayment=n;$(".payment-app").waitMe("hide")},t.prototype.onFailure=function(n){switch(n.errorMessageId){case 1:this.currErrorMessage=n.customMessage;break;default:this.currErrorMessage=e["default"].get(n.errorMessageId)}$(".payment-app").waitMe("hide")},t.prototype.handleCheckClick=function(n){n.preventDefault();this.isCheckPay=!0},t.prototype.handleCCClick=function(n){n.preventDefault();$(".payment-app").waitMe({effect:"rotation"});this.paymentsService.getCCPaymentUrl(this.account.token,this.onCCPaymentUrlSuccess,this.onFailure)},t.prototype.onCCPaymentUrlSuccess=function(n){window.location.href=n.link},t.prototype.setDisplayAccountInfo=function(n){this.displayAccountInfo=n},__decorate([i.Prop(Object)],t.prototype,"options",void 0),__decorate([i.Component({name:"PaymentsApp",components:{FindAccount:r["default"],PaymentsByCheck:f["default"]},template:'\n        <div class="payment-app">\n            <div class="mb-2 mb-sm-4 payments__header">\n                <div class="d-flex flex-column flex-sm-row justify-content-between align-items-sm-end">\n                    <h1 class="mb-0 font-weight-bold text-uppercase">{{options.title}}<\/h1>\n                <\/div>\n            <\/div>\n            <div v-if="!options.payByCheckEnabled & !options.payByCardEnabled" class="alert alert-danger">\n                <span v-html="options.unauthenticatedPaymentsDisabledMessage"><\/span>\n            <\/div>  \n            <template v-if="options.payByCheckEnabled || options.payByCardEnabled">\n                <find-account :options="options.findAccount" v-if="account === null" v-on:account-found="onAccountFound"><\/find-account>\n                <div v-if="currErrorMessage" class="alert alert-danger">\n                    {{ currErrorMessage }}\n                <\/div>\n                <div v-if="account !== null && accountPayment !== null">\n                    <div class="alert alert-warning" v-if="accountPayment.displayLateMessage">\n                        {{ options.latePaymentMessage }}\n                    <\/div>\n                    <div v-if="!accountPayment.displayLateMessage" class="payments-selector">\n                        <div v-if="displayAccountInfo">\n                            <div class="payments-selector_address"> {{ account.Address }} <\/div>\n                            <div class="payments-selector_amount-due">{{ options.amountDueLabel }}<\/div>\n                            <h2>{{ amountDue(accountPayment.amountDue) }}<\/h2>\n                            <span>{{ options.lateChargesAddedAfterLabel }}<\/span><span>{{ accountPayment.dueDate }}<\/span>\n                        <\/div>\n                        <div v-if="!isCheckPay">\n                            <a v-if="options.payByCheckEnabled" href="#" v-on:click="handleCheckClick" class="button button--default col-12 mt-4 mb-2">{{options.payByCheckLabel}} <\/a>\n                            <a v-if="options.payByCardEnabled" href="#" v-on:click="handleCCClick" class="button button--default col-12 mt-2 mb-4">{{options.payByCardLabel}} <\/a>\n                        <\/div>                              \n\n                        <payments-by-check v-if="isCheckPay" :options="options" :accountNum="account.number" :accountToken="account.token" :accountPayment="accountPayment" @displayAccountInfo="setDisplayAccountInfo"><\/payments-by-check>\n                    <\/div>\n                <\/div>\n                <a :href="options.paymentAssistanceProgramsLink.link" class="mt-4 payments__bottom-links">{{options.paymentAssistanceProgramsLink.title}}<\/a>\n            <\/template>            \n            <a :href="options.morePaymentOptionsLink.link" class="mt-4 payments__bottom-links">{{options.morePaymentOptionsLink.title}}<\/a>\n        <\/div>\n    '})],t)}(i.Vue);t["default"]=h});define("apps/components/payments-by-check",["require","exports","vue-property-decorator","services/payments-service","utils/string-helper","utils/form-validator","utils/error-messages","components/popups"],function(n,t,i,r,u,f,e,o){function h(n,t){var r=new i.Vue({el:"#"+n,data:{paymentsAppOptions:t},components:{PaymentsByCheck:s}})}Object.defineProperty(t,"__esModule",{value:!0});t.init=h;var s=function(n){function t(){var t=n.call(this)||this;return t.paymentOption="amount",t.bankRouting="",t.bankAccount="",t.dataHtmlRoutingNumber="",t.dataHtmlAccountNumber="",t.other="",t.email="",t.hasUserSubmitted=!1,t.paymentIsValid=!1,t.paymentPosted=!1,t.gnfAmountDue="0",t.paymentModel={accountToken:"",bankRouting:"",bankAccount:"",amount:0,postDate:"",email:"",timestamp:"",bankAccountId:""},t.error="",t.payDate=t.getDateStr(new Date),t.paymentsService=new r["default"],t.dataHtmlRoutingNumber="<div class='popupNoMargin'>"+t.options.bankRoutingNumberTooltip+"<\/div>",t.dataHtmlAccountNumber="<div class='popupNoMargin'>"+t.options.bankAccountNumberTooltip+"<\/div>",t}return __extends(t,n),t.prototype.onConfirmValidationSuccess=function(n){this.hasUserSubmitted=!1;n.result?(this.paymentModel.bankAccountId=n.bankAccountId,this.paymentIsValid=!0,this.$emit("displayAccountInfo",!1)):this.handleError(n)},t.prototype.onConfirmValidationFailure=function(n){n.result||(this.handleError(n),this.hasUserSubmitted=!1)},t.prototype.onPaymentPosted=function(n){this.hasUserSubmitted=!1;$(".payment-app").waitMe("hide");n.result?(this.error="",this.confirmationNumber=n.confirmationNumber,this.paymentPosted=!0,this.paymentModel.email&&(this.options.emailReceiptLabel=this.options.emailReceiptLabel.replace("{{ email }}",this.paymentModel.email))):(this.paymentIsValid=!1,this.handleError(n))},t.prototype.onPaymentFailed=function(n){$(".payment-app").waitMe("hide");n.result||this.handleError(n)},t.prototype.handleError=function(n){this.error=n.customMessage==="InvalidRouting"?this.options.invalidRoutingError:n.customMessage==="BankAccountBlocked"?this.options.bankAccountBlockedError:n.customMessage==="InvalidInput"?this.options.invalidInputError:n.customMessage==="PaymentAlreadyPosted"?this.options.paymentAlreadyPosted:n.customMessage=="ChildAccount"?u["default"].format(this.options.childAccountError,n.collectiveAccountNumber):e["default"].get(n.errorMessageId)},Object.defineProperty(t.prototype,"isFormValid",{get:function(){return!this.bankRouting||!this.bankAccount||!this.payDate?!1:this.paymentOption==="other"&&!this.other?!1:this.email&&!f["default"].validateEmail(this.email)?!1:!0},enumerable:!0,configurable:!0}),t.prototype.confirmValidation=function(n){this.hasUserSubmitted=!0;n.preventDefault();var t=this.paymentOption==="amount"?Number(this.gnfAmountDue):0,i=this.paymentOption==="other"?Number(this.other):Number(this.accountPayment.amountDue)+Number(t);this.paymentModel.accountToken=this.accountToken;this.paymentModel.bankRouting=this.bankRouting;this.paymentModel.bankAccount=this.bankAccount;this.paymentModel.amount=i;this.formattedAmount=this.paymentModel.amount.toFixed(2);this.paymentModel.email=this.email;this.paymentModel.postDate=this.payDate;this.paymentModel.timestamp=this.accountPayment.timestamp;this.paymentsService.checkPaymentValid(this.paymentModel,this.onConfirmValidationSuccess,this.onConfirmValidationFailure)},t.prototype.submitPayment=function(n){n.preventDefault();$(".payment-app").waitMe({effect:"rotation"});this.paymentsService.submitPaymentValid(this.paymentModel,this.options.contentId,this.onPaymentPosted,this.onPaymentFailed)},t.prototype.cancel=function(n){n.preventDefault();this.$emit("accountFound",!1);$("#flyout-close").click()},t.prototype.modify=function(n){n.preventDefault();this.error="";this.paymentIsValid=!1;this.$emit("displayAccountInfo",!0)},t.prototype.setupOtherField=function(n){this.paymentOption==="other"&&($("#other")[0].oninput=function(){var t=Number.parseFloat($("#other").val().toString());t<1?$("#other")[0].setCustomValidity(n.options.paymentLessThanOneErrorLabel):t>Number(n.accountPayment.amountDue)&&t<Number(n.accountPayment.amountDue)+1?$("#other")[0].setCustomValidity(n.options.overpaymentMustBeGreaterThanOne):$("#other")[0].setCustomValidity("")})},t.prototype.setupAmountDue=function(n){this.paymentOption==="amount"&&n.accountPayment.amountDue<1&&$("#paymentOptions")[0].setCustomValidity(n.options.paymentLessThanOneErrorLabel)},t.prototype.prepForm=function(n){var t=this,i=new Date,r;i.setDate(i.getDate()+30);r=i.getMonth()+1+"/"+i.getDate()+"/"+i.getFullYear();$(".datepicker-limited").datepicker({format:"mm/dd/yyyy",startDate:"0",endDate:r}).on("changeDate",function(i){n.payDate=t.getDateStr(i.date)});$.applyDataMask();this.setupAmountDue(n);$("#bankRouting")[0].oninvalid=function(){$("#bankRouting")[0].setCustomValidity(n.options.routingNumberLengthErrorLabel)};$("#bankAccount")[0].oninput=function(){$("#bankAccount").val()===$("#bankRouting").val()?$("#bankAccount")[0].setCustomValidity(n.options.differentAccountNumAndRoutingNumErrorLabel):$("#bankAccount")[0].setCustomValidity("")};$(".payments-by-check").on("click",".payments-by-check_stepper .minus",function(n){n.preventDefault();var i=Number(t.gnfAmountDue);i>0&&(t.gnfAmountDue=(i-1).toString())});$(".payments-by-check").on("click",".payments-by-check_stepper .plus",function(n){n.preventDefault();var i=Number(t.gnfAmountDue);i<10&&(t.gnfAmountDue=(i+1).toString())});$("#other").length>0&&this.setupOtherField(n);o["default"]()},t.prototype.getDateStr=function(n){var t=n.getMonth()+1,r=n.getFullYear(),i=n.getDate(),u=t<10?"0"+t:t,f=i<10?"0"+i:i;return u+"/"+f+"/"+r},__decorate([i.Prop(Object)],t.prototype,"options",void 0),__decorate([i.Prop(String)],t.prototype,"accountNum",void 0),__decorate([i.Prop(String)],t.prototype,"accountToken",void 0),__decorate([i.Prop(Object)],t.prototype,"accountPayment",void 0),__decorate([i.Component({name:"PaymentsByCheck",template:'\n        <div v-if="error" class="alert alert-danger">\n                {{ error }}\n        <\/div>\n        <form class="payments-by-check" @submit="confirmValidation" v-else-if="!paymentIsValid">\n            <h4 class="payments-by-check_title">{{ options.payByCheckLabel }}<\/h4>\n\n            <div class="form-group">\n                <span class="fas fa-info-circle popup" data-position="left center" :data-html="dataHtmlRoutingNumber"><\/span>\n                <label for="bankRouting">{{ options.bankRoutingNumberLabel}}<\/label>\n                <input type="text" pattern="(?!0+$)[0-9]{9}" data-mask="000000000" name="bankRouting" id="bankRouting" v-model="bankRouting" required class="form-control" oninput="setCustomValidity(\'\')"/>\n            <\/div>\n            <div class="form-group">\n                <span class="fas fa-info-circle popup" data-position="left center" :data-html="dataHtmlAccountNumber"><\/span>\n                <label for="bankAccount">{{ options.bankAccountNumberLabel}}<\/label>\n                <input type="text" pattern="(?!0+$)[0-9]{1,17}" data-mask="99999999999999999" name="bankAccount" id="bankAccount" v-model="bankAccount" required class="form-control"/>\n            <\/div>\n            <div class="form-group">\n                <label for="paymentAmount">{{ options.paymentAmountLabel }}<\/label>\n                <select id="paymentOptions" name="paymentOptions" v-model="paymentOption">\n                    <option v-if="accountPayment.amountDue !== null && accountPayment.amountDue > 0" value="amount">{{ options.amountDueLabel }} (${{ accountPayment.amountDue }})<\/option>\n                    <option value="other">{{ options.otherPaymentOptionLabel }}<\/option>\n                <\/select>\n                <div v-if="paymentOption === \'amount\'">\n                    <div class="pt-2" v-html="options.gnfRadioLabel"><\/div>\n                    <div class="payments-by-check_stepper">\n                        <button class="minus"><\/button>\n                        <input type="number" class="stepper" name="gnfAmountDue" min="0" max="10" v-model="gnfAmountDue" value="0"/>\n                        <button class="plus"><\/button>\n                    <\/div>\n                <\/div>\n                <strong class="col-1 d-inline" v-if="paymentOption === \'other\'">$<\/strong>\n                <input v-if="paymentOption === \'other\'" type="text" class="col-10 form-control d-inline mt-2" v-model="other" id="other" pattern="[0-9]*(?:.[0-9]{1,2})?" required/>\n                <span v-if="paymentOption === \'other\'" class="ml-5 clearfix" v-html="options.gnfLabel"><\/span>\n            <\/div>\n            <div class="form-group">\n                <label for="paymentDate">{{ options.paymentDateLabel }} <\/label>\n                <input name="date" id="date" class="datepicker-limited col-10 inline form-control" placeholder="mm/dd/yyyy" v-model="payDate" required/>\n            <\/div>\n            <div class="form-group">\n                <label for="email" class="mb-0">{{ options.emailAddressLabel }}<\/label>\n                <div class="payments-by-check_email-optional">{{ options.emailOptionalLabel }}<\/div>\n                <input type="email" :placeholder="options.emailAddressPlaceholder" v-model="email" class="form-control" />\n            <\/div>\n            <button class="button button--default mt-4 col-12" type="submit" :class="{ disabled: !isFormValid || hasUserSubmitted }">{{ options.submitPaymentButtonLabel }}<\/button>\n        <\/form>\n        <div class="payments-by-check" v-else-if="paymentIsValid && !paymentPosted">\n            <h5 class="payments-by-check_confirm-payment payments-by-check_title">{{ options.confirmToCompletePaymentLabel }}<\/h5>\n            <div class="payments-by-check_details">\n                <strong>{{ options.accountNumberConfirmationLabel }}<\/strong>\n                <p>{{ accountNum }}<\/p>\n                <strong>{{ options.bankRoutingNumberLabel }}<\/strong>\n                <p>{{ paymentModel.bankRouting }}<\/p>\n                <strong>{{ options.bankAccountNumberLabel }}<\/strong>\n                <p>{{ paymentModel.bankAccount }}<\/p>\n                <strong>{{ options.paymentAmountLabel }}<\/strong>\n                <p>${{ formattedAmount }} <\/p>\n                <strong>{{ options.paymentProcessedOnLabel }}<\/strong>\n                <div class="mb-3">{{ paymentModel.postDate }}<\/div>\n                <strong v-if="paymentModel.email" >{{ options.emailAddressLabel }}<\/strong>\n                <p v-if="paymentModel.email">{{ paymentModel.email }}<\/p>\n                <a href="#" class="button button--default col-12 mb-3" v-on:click="submitPayment" :class="{ disabled: hasUserSubmitted }">{{ options.confirmPaymentButtonLabel }}<\/a>\n                <a href="#" class="button button--outline--default button--outline payments-by-check_light-button" v-on:click="cancel">{{ options.cancelButtonLabel }}<\/a>\n                <a href="#" class="button button--outline--default button--outline payments-by-check_light-button" v-on:click="modify">{{ options.modifyButtonLabel }}<\/a>\n            <\/div>\n        <\/div>\n        <div v-else-if="paymentPosted" class="payments-posted">\n            <h4 class="payments-posted_thank payments-by-check_title">{{ options.thankYouLabel }}<\/h4>\n            <h6 class="payments-posted_auth-details">{{ options.paymentAuthorizationDetailsLabel }}<\/h6>\n            <div class="payments-by-check_details">\n                <strong>{{ options.confirmationNumberLabel }}<\/strong>\n                <div class="mb-3">{{ confirmationNumber }}<\/div>\n                <strong>{{ options.paymentAmountLabel }}<\/strong>\n                <div class="mb-3">${{ formattedAmount }}<\/div>\n                <strong>{{ options.paymentProcessedOnLabel }}<\/strong>\n                <div class="mb-3">{{ paymentModel.postDate }}<\/div>\n                <div v-if="paymentModel.email">\n                    {{ options.emailReceiptLabel}}\n                <\/div>\n                <div class="mt-3" v-html="options.promotionalContent"><\/div>\n            <\/div>\n        <\/div>\n        \n    ',mounted:function(){var n=this;n.prepForm(n)},watch:{paymentIsValid:function(){var n=this;n.paymentIsValid||i.Vue.nextTick(function(){n.prepForm(n)})},paymentOption:function(){var n=this;n.paymentOption==="other"?i.Vue.nextTick(function(){$("#paymentOptions")[0].setCustomValidity("");n.setupOtherField(n)}):n.setupAmountDue(n)}}})],t)}(i.Vue);t["default"]=s});define("apps/ioap-payments-app",["require","exports","vue-property-decorator","apps/components/payments-by-check","services/payments-service","utils/error-messages","utils/mask","utils/form-validator"],function(n,t,i,r,u,f,e,o){function h(n,t){var r=new i.Vue({el:"#"+n,data:{paymentsAppOptions:t},components:{IoapPaymentsApp:s}})}Object.defineProperty(t,"__esModule",{value:!0});t.init=h;var s=function(n){function t(){var t=n.call(this)||this;return t.accountFound=!1,t.currErrorMessage="",t.accountNum="",t.accountToken="",t.accountPayment=null,t.displayAccountInfo=!0,t.paymentsService=new u["default"],t}return __extends(t,n),t.prototype.mounted=function(){e["default"].accountNumberChecksum("#billingInvoice");$("#billingInvoice").val(this.options.billingOrderNumber);this.accountNum=this.options.billingOrderNumber;this.accountToken=this.options.accountToken;this.accountNum.length==11&&this.submitForm(null)},Object.defineProperty(t.prototype,"rawValue",{get:function(){return e["default"].getRawValue(this.accountNum)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isValid",{get:function(){return this.currErrorMessage="",this.validateForm()},enumerable:!0,configurable:!0}),t.prototype.maskAccountNumber=function(){this.accountNum=$("#billingInvoice").masked(this.rawValue)},t.prototype.validateForm=function(){return o["default"].validateAccountNumberWithChecksum(this.rawValue)},t.prototype.submitForm=function(n){n!=undefined&&n!=null&&n.preventDefault();this.validateForm()&&($(".payment-app").waitMe({effect:"rotation"}),this.paymentsService.getIOAPPaymentInfo(this.accountNum.substr(0,12),this.onPaymentFetch,this.onFailure))},t.prototype.onPaymentFetch=function(n){this.accountPayment=n;$(".payment-app").waitMe("hide");this.accountFound=!0},t.prototype.onFailure=function(n){$(".payment-app").waitMe("hide");switch(n.errorMessageId){case 1:this.currErrorMessage=n.customMessage;break;default:this.currErrorMessage=f["default"].get(n.errorMessageId)}},t.prototype.setAccountFound=function(n){this.accountFound=n},__decorate([i.Prop(Object)],t.prototype,"options",void 0),__decorate([i.Component({name:"IoapPaymentsApp",components:{PaymentsByCheck:r["default"]},template:'\n        <div class="payment-app">\n            <div class="mb-2 mb-sm-4 payments__header">\n                <div class="d-flex flex-column flex-sm-row justify-content-between align-items-sm-end">\n                    <h1 class="mb-0 font-weight-bold text-uppercase">{{options.ioapTitle}}<\/h1>\n                <\/div>\n            <\/div>\n            <form class="" v-if="!accountFound" @submit="submitForm">\n                <label for="billingInvoice">{{options.billingInvoiceNumberLabel}}<\/label>\n                <input type="text"\n                       id="billingInvoice"\n                       name="billingInvoice"\n                       @input="maskAccountNumber"\n                       :aria-valuenow="accountNum"\n                       :aria-valuetext="accountNum"\n                       v-model="accountNum"\n                       value=""\n                       required />\n                <div v-if="currErrorMessage" class="alert alert-danger">\n                    {{ currErrorMessage }}\n                <\/div>\n                <button type="submit" class="button button--default mt-4" :class="{ \'disabled\' : !isValid }">\n                    {{ options.submitButton }}\n                <\/button>\n            <\/form>\n            \n            <payments-by-check v-if="accountFound" :options="options.paymentsBlock" :accountNum="accountNum.substr(0, 12)" :accountToken="accountToken" :accountPayment="accountPayment" @accountFound="setAccountFound"><\/payments-by-check>\n        <\/div>\n    '})],t)}(i.Vue);t["default"]=s});define("services/meter-reading-service",["require","exports","utils/error-messages"],function(n,t,i){Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function n(n,t){this.csrf="";this.baseUrl="";this.baseApiUrl="";this.isImpersonating=!1;this.baseUrl=window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"")+"/api/meterreading/";this.baseApiUrl=n+"/v2/";this.isImpersonating=t;this.csrf=$('[name="__RequestVerificationToken"]').last().val().toString()}return n.prototype.getMeterInfo=function(n,t,r){r===void 0&&(r=null);$.ajax({url:this.baseUrl,type:"GET",dataType:"json",data:{accountNumberOrToken:n},success:function(n){n&&t(n)},error:function(n,t,u){var f=i["default"].getByStatusCode(n.status);console.error("Error getting Meter Reading info: ");console.error(u);r&&r(f)}})},n.prototype.submitMeterReading=function(n,t,r){r===void 0&&(r=null);n.append("__RequestVerificationToken",this.csrf);$.ajax({url:this.baseUrl,type:"POST",contentType:!1,processData:!1,data:n,success:function(n){t(n)},error:function(n){var t=i["default"].getByStatusCode(n.status);console.error("Error submitting meter reading: ");console.error(t);r&&r(t)}})},n.prototype.getImageReadingAuth=function(n,t,r,u,f,e){e===void 0&&(e=null);n.append("__RequestVerificationToken",this.csrf);var o=this.baseApiUrl+"accounts/"+t+"/meter-reading/"+r+"/image",s=this.isImpersonating?"?isImpersonating=true":"",h=o+s;$.ajax({url:h,type:"POST",contentType:!1,processData:!1,headers:{Authorization:"Bearer "+u},data:n,success:function(n){f(n)},error:function(n){var t=i["default"].getByStatusCode(n.status);console.error("Error getting meter reading from the uploaded file(s) ");console.error(t);e&&e(t)}})},n.prototype.getImageReadingUnAuth=function(n,t,r,u,f){f===void 0&&(f=null);n.append("__RequestVerificationToken",this.csrf);var e=this.baseApiUrl+"meter-reading/image?accountToken="+t+"&meterIdToken="+r+"";$.ajax({url:e,type:"POST",contentType:!1,processData:!1,data:n,success:function(n){u(n)},error:function(n){var t=i["default"].getByStatusCode(n.status);console.error("Error getting meter reading from the uploaded file(s) ");console.error(t);f&&f(t)}})},n}();t["default"]=r});define("utils/stack",["require","exports"],function(n,t){Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function n(n){n===void 0&&(n=Infinity);this.capacity=n;this.storage=[]}return n.prototype.push=function(n){if(this.size()===this.capacity)throw Error("Stack has reached max capacity, you cannot add more items");this.storage.push(n)},n.prototype.pop=function(){return this.storage.pop()},n.prototype.peek=function(){return this.storage[this.size()-1]},n.prototype.size=function(){return this.storage.length},n}();t["default"]=i});define("apps/meter-reading-app",["require","exports","vue-property-decorator","apps/components/find-account","services/accounts-service","services/meter-reading-service","utils/stack","components/flyout","utils/form-validator"],function(n,t,i,r,u,f,e,o,s){function c(n,t){var r=new i.Vue({el:"#"+n,data:{meterReadingAppOptions:t},components:{MeterReadingApp:h}});o["default"].attachListenerIfInFlyout("#"+n,function(){r.$destroy()})}Object.defineProperty(t,"__esModule",{value:!0});t.init=c;var h=function(n){function t(){var t=n.call(this)||this;return t.accountNumber=null,t.accountDisplayNumber=null,t.accountToken=null,t.meters=[],t.selectedMeter=null,t.navstack=new e["default"],t.step="",t.meterReadingChoice="Enter",t.checkbox1=!1,t.checkbox2=!1,t.firstName="",t.lastName="",t.serviceAddress="",t.city="",t.zipCode="",t.phoneNumber="",t.phoneExt="",t.email="",t.standardReading="",t.tou4="",t.tou5="",t.tou6="",t.kwh1="",t.kw1="",t.cum1="",t.kwh2="",t.kw2="",t.cum2="",t.errors=[],t.currErrorMessage="",t.currInfoMessage="",t.hideMeterDropDown=!1,t.isUserAuthenticated=!1,t.isAlreadyimageProcessed=!1,t.isImageProcessingSuccess=!1,t.isDigitalImageNotProcessedSuccessful=!1,t.dbTransactionId="",t.meterReadingService=new f["default"](t.options.apiUrl,t.options.isImpersonating),t.accountsService=new u["default"](null),t}return __extends(t,n),t.prototype.created=function(){$(".meter-reading-app").waitMe({effect:"rotation"});this.accountsService.getActiveAccount(this.checkUserAuthenticatedStatus)},t.prototype.onAccountFound=function(n){this.accountToken=n.token;this.address=this.isUserAuthenticated?n.address:n.maskedAddress;this.accountNumber=this.isUserAuthenticated?n.accountNumber:n.maskedAccountNumber;this.accountDisplayNumber=this.isUserAuthenticated?n.accountDisplayNumber:n.maskedAccountNumber;this.meterReadingService.getMeterInfo(n.token,this.onGetMeterInfoComplete,this.onGetMeterInfoError);$(".meter-reading-app").waitMe({effect:"rotation"})},t.prototype.onGetMeterInfoComplete=function(n){if($(".meter-reading-app").waitMe("hide"),console.log("response.customMessage: "+n.customMessage),n.result)n.meters.length!=0?this.meters=n.meters:(this.hideMeterDropDown=!0,this.currErrorMessage=this.options.noAccountsToShowErrorText);else{this.hideMeterDropDown=!0;switch(n.errorMessageId){case 1:this.currErrorMessage=n.customMessage!=null?n.customMessage:this.options.meterReadingServerErrorText;break;default:this.currErrorMessage=this.options.meterReadingServerErrorText}}},t.prototype.onGetMeterInfoError=function(n){this.hideMeterDropDown=!0;$(".meter-reading-app").waitMe("hide");this.currErrorMessage=n!=null?n:this.options.meterReadingServerErrorText},t.prototype.validateUpload=function(n,t){n.preventDefault();var i=t.files[0];if(i!=null)return this.handleNextClick(n),this.errors.splice(0),!0;this.errors.splice(0);this.errors.push(t.name+" "+this.options.requiredText)},t.prototype.validateReading=function(n,t){return(n.preventDefault(),this.errors.splice(0),t=="")?(this.errors.push(n.target.name+" "+this.options.requiredText),!1):isNaN(Number(t))?(this.errors.push(n.target.name+" "+this.options.notValidReadingText),!1):t!=""?(this.handleNextClick(n),!0):void 0},t.prototype.validateTouReading=function(n,t,i,r){return(n.preventDefault(),this.errors.splice(0),t==""&&this.errors.push(this.options.no4ReadingRequiredText),i==""&&this.errors.push(this.options.no5ReadingRequiredText),r==""&&this.errors.push(this.options.no6ReadingRequiredText),isNaN(Number(t))||isNaN(Number(i))||isNaN(Number(r)))?(this.errors.push(n.target.name+" "+this.options.notValidReadingText),!1):t!=""&&i!=""&&r!=""?(this.handleNextClick(n),!0):void 0},t.prototype.validateDemandReading=function(n,t,i,r){return(n.preventDefault(),this.errors.splice(0),t==""&&this.errors.push(this.options.kwhReadingRequiredText),i==""&&this.errors.push(this.options.kwReadingRequiredText),r==""&&this.errors.push(this.options.cumReadingRequiredText),isNaN(Number(t))||isNaN(Number(i))||isNaN(Number(r)))?(this.errors.push(n.target.name+" "+this.options.notValidReadingText),!1):t!=""&&i!=""&&r!=""?(this.handleNextClick(n),!0):void 0},t.prototype.validateTouUpload=function(n,t,i,r){n.preventDefault();var u=t.files[0],f=i.files[0],e=r.files[0];if(u!=null&&f!=null&&e!=null)return this.errors.splice(0),this.handleNextClick(n),!0;this.errors.splice(0);u==null&&this.errors.push(this.options.no4ReadingRequiredText);f==null&&this.errors.push(this.options.no5ReadingRequiredText);e==null&&this.errors.push(this.options.no6ReadingRequiredText)},t.prototype.validateDemandUpload=function(n,t,i,r){n.preventDefault();var u=t.files[0],f=i.files[0],e=r.files[0];if(u!=null&&f!=null&&e!=null)return this.errors.splice(0),this.handleNextClick(n),!0;this.errors.splice(0);u==null&&this.errors.push(this.options.kwhReadingRequiredText);f==null&&this.errors.push(this.options.kwReadingRequiredText);e==null&&this.errors.push(this.options.cumReadingRequiredText)},t.prototype.validateInfo=function(n,t){if(n.preventDefault(),t!="")return(this.errors.splice(0),!s["default"].validateEmail(t))?(this.errors.push(this.options.invalidEmailText),!1):(this.handleNextClick(n),!0);this.errors.splice(0);t==""&&this.errors.push(this.options.emailAddressRequiredText)},t.prototype.validateTerms=function(n){if(n.preventDefault(),this.checkbox1&&this.checkbox2)return this.errors.splice(0),this.submitMeterReading(),!0;this.errors.splice(0);this.checkbox1||this.errors.push(this.options.agreeToTerms1Text);this.checkbox2||this.errors.push(this.options.agreeToTerms2Text)},t.prototype.onMeterChange=function(){var n;n=this.selectedMeter.rateType=="TOU"?"TOUStep1":this.selectedMeter.rateType=="Demand"?"DemandStep1":"StandardStep1";this.navstack.push(n);this.step=n},t.prototype.handleNextClick=function(n){n.preventDefault();var t;if((this.step=="StandardStep1"||this.step=="TOUStep1")&&this.meterReadingChoice=="Upload"){this.getPictureReading();return}t=n.target.attributes.value.nodeValue;t=="Info"&&this.isUserAuthenticated&&(t="Terms");this.navstack.push(t);this.step=t},t.prototype.handleBackClick=function(n){n.preventDefault();this.errors.splice(0);this.navstack.pop();this.step=this.navstack.peek()},t.prototype.checkUserAuthenticatedStatus=function(n){if(!n.result){$(".meter-reading-app").waitMe("hide");return}this.isUserAuthenticated=!0;this.onAccountFound(__assign({},n.activeAccount,{accountNumber:n.activeAccount.accountNumber}))},t.prototype.getPictureReading=function(){var n=new FormData;n.append("StandardPic",this.$refs.standardFile.files[0]);n.append("ToUPic1",this.$refs.tou4File.files[0]);n.append("ToUPic2",this.$refs.tou5File.files[0]);n.append("ToUPic3",this.$refs.tou6File.files[0]);$(".meter-reading-app").waitMe({effect:"rotation"});this.isUserAuthenticated?this.meterReadingService.getImageReadingAuth(n,this.accountNumber,this.selectedMeter.meterNumber,this.options.accessToken,this.onGetImageReading,this.onGetImageReadingError):this.meterReadingService.getImageReadingUnAuth(n,this.accountToken,this.selectedMeter.meterIdToken,this.onGetImageReading,this.onGetImageReadingError)},t.prototype.onGetImageReadingError=function(n){$(".meter-reading-app").waitMe("hide");this.currErrorMessage=n!=null?n:this.options.meterReadingServerErrorText},t.prototype.submitMeterReading=function(){var n=new FormData;n.append("AccountNumberOrToken",this.accountToken);this.meterReadingChoice=="Upload"?(n.append("Files[0]",this.$refs.standardFile.files[0]),n.append("Files[1]",this.$refs.tou4File.files[0]),n.append("Files[2]",this.$refs.tou5File.files[0]),n.append("Files[3]",this.$refs.tou6File.files[0]),n.append("Files[4]",this.$refs.KWH1File.files[0]),n.append("Files[5]",this.$refs.KW1File.files[0]),n.append("Files[6]",this.$refs.CUM1File.files[0]),n.append("Files[7]",this.$refs.KWH2File.files[0]),n.append("Files[8]",this.$refs.KW2File.files[0]),n.append("Files[9]",this.$refs.CUM2File.files[0])):(n.append("StandardReading",this.standardReading),n.append("Tou4",this.tou4),n.append("Tou5",this.tou5),n.append("Tou6",this.tou6),n.append("KWH1",this.kwh1),n.append("KW1",this.kw1),n.append("CUM1",this.cum1),n.append("KWH2",this.kwh2),n.append("KW2",this.kw2),n.append("CUM2",this.cum2));n.append("MeterReadingChoice",this.meterReadingChoice);n.append("MeterNumber",this.selectedMeter.meterNumber);n.append("RateType",this.selectedMeter.rateType);n.append("ServiceType",this.selectedMeter.serviceType);n.append("MeterIdToken",this.selectedMeter.meterIdToken);n.append("EmailAddress",this.email);n.append("IsAlreadyimageProcessed",String(this.isAlreadyimageProcessed));n.append("DBTransactionId",this.dbTransactionId);$(".meter-reading-app").waitMe({effect:"rotation"});this.meterReadingService.submitMeterReading(n,this.onSubmitMeterReadingComplete)},t.prototype.onGetImageReading=function(n){$(".meter-reading-app").waitMe("hide");var t;n.isImageProcessingSuccess?(this.isImageProcessingSuccess=!0,this.meterReadingChoice="Enter",this.selectedMeter.rateType=="Standard"?(t="StandardStep1",this.standardReading=n.standardReading):this.selectedMeter.rateType=="TOU"&&(t="TOUStep1",this.tou4=n.toU1Reading,this.tou5=n.toU2Reading,this.tou6=n.toU3Reading)):this.selectedMeter.hardwareType==="Digital"||this.selectedMeter.hardwareType==="Unknown"?(this.isDigitalImageNotProcessedSuccessful=!0,this.meterReadingChoice="Enter",this.selectedMeter.rateType=="Standard"?(t="StandardStep1",this.standardReading=n.standardReading):this.selectedMeter.rateType=="TOU"&&(t="TOUStep1",this.tou4=n.toU1Reading,this.tou5=n.toU2Reading,this.tou6=n.toU3Reading)):(this.meterReadingChoice="Upload",t=this.isUserAuthenticated?"Terms":"Info");this.navstack.push(t);this.step=t;this.dbTransactionId=n.dbTransactionId;this.isAlreadyimageProcessed=!0},t.prototype.onSubmitMeterReadingComplete=function(n){if($(".meter-reading-app").waitMe("hide"),this.step="",n.successfullySubmitted)this.currInfoMessage=this.options.thankYouMessage;else switch(n.errorMessageId){case 1:this.currErrorMessage=n.customMessage!=null?n.customMessage:this.options.meterReadingServerErrorText;break;default:this.currErrorMessage=this.options.meterReadingServerErrorText}},__decorate([i.Prop(Object)],t.prototype,"options",void 0),__decorate([i.Component({name:"MeterReadingApp",components:{FindAccount:r["default"]},template:'\n        <div class="meter-reading-app">\n            <form action="#" method="post" enctype="multipart/form-data" @submit.prevent="submitMeterReading" class="p-0">\n            <div class="mb-2 mb-sm-4 payments__header">\n                <div class="d-flex flex-column flex-sm-row justify-content-between align-items-sm-end">\n                    <h1 class="mb-0 font-weight-bold text-uppercase">{{options.title}}<\/h1>\n                <\/div>\n            <\/div>\n            <find-account :options="options.findAccount" v-if="accountNumber === null" v-on:account-found="onAccountFound"><\/find-account>\n            <div v-if="accountNumber !== null">\n                <div class="row">\n                    <div class="col">\n                        {{options.addressLabel}} {{address}}\n                    <\/div>\n                <\/div>\n                <div class="row">\n                    <div class="col">\n                        {{options.accountNumberLabel}} {{accountDisplayNumber}} \n                    <\/div>\n                <\/div>\n\n              <div v-if="!hideMeterDropDown">\n                <div v-if="selectedMeter && step !== \'StandardStep1\' && step !== \'TOUStep1\' && step !== \'DemandStep1\'" class="row mb-4">\n                    <div class="col">\n                        {{options.meterSelectorLabel}} {{ selectedMeter.serviceType }} {{ selectedMeter.meterNumber }}\n                    <\/div>\n                <\/div>\n\n                <div v-if="!selectedMeter || step === \'StandardStep1\' || step === \'TOUStep1\' || step === \'DemandStep1\'" class="row mt-4 mb-4">\n                    <div class="col-12 form-group">\n                        <label for="MeterSelection">{{options.meterSelectorLabel}}<\/label>\n                        <select id="MeterSelection" v-model="selectedMeter" v-on:change="onMeterChange">\n                            <option disabled v-bind:value="null">Please select meter<\/option>\n                            <option v-for="option in meters" v-bind:value="option">\n                                {{ option.serviceType }} {{ option.meterNumber }}\n                            <\/option>\n                        <\/select>\n                    <\/div>\n                    <div v-if="selectedMeter" class="col-12 form-group">\n                        <div v-if="selectedMeter.isNetMeterCustomer" class="alert alert-danger text-center">\n                             {{options.netMeterOrPVCustomerAlertText}}\n                        <\/div>\n                        <div v-else-if="selectedMeter.isEstimatedMRCreated">\n                             <div class="col-12">   \n                              <div class="form-check form-check-inline">\n                                    <input class="form-check-input" type="radio" id="EnterReadingChoice" name="MeterReadingChoice" value="Enter" v-model="meterReadingChoice">\n                                    <label class="form-check-label" for="EnterReadingChoice">{{options.enterReadingLabel}}<\/label>\n                                <\/div>                                                     \n                               <div v-if="(selectedMeter.hardwareType === \'Digital\' || selectedMeter.hardwareType === \'Unknown\') && this.isDigitalImageNotProcessedSuccessful" class="form-check form-check-inline">                                                \n                                    <input class="form-check-input" type="radio" id="UploadPhotoChoice" name="MeterReadingChoice" value="Upload" :disabled=true v-model="meterReadingChoice">\n                                    <label class="form-check-label" for="UploadPhotoChoice">{{options.uploadPhotoLabel}}<\/label>\n                                <\/div>\n                                <div v-else class="form-check form-check-inline">\n                                    <input class="form-check-input" type="radio" id="UploadPhotoChoice" name="MeterReadingChoice" value="Upload" :disabled=false v-model="meterReadingChoice">\n                                   <label class="form-check-label" for="UploadPhotoChoice">{{options.uploadPhotoLabel}}<\/label>\n                                <\/div>  \n                            <\/div>                                  \n                        <\/div>                        \n                        <div v-else class="alert alert-danger text-center">\n                             {{options.readingNotAllowedText}}\n                        <\/div>                    \n                    <\/div>\n                 <\/div>\n                <div v-if="selectedMeter && selectedMeter.isEstimatedMRCreated && !selectedMeter.isNetMeterCustomer">\n                    <div v-show="step ===\'StandardStep1\'" class="row">\n                        <div v-if="selectedMeter.serviceType === \'Gas\'" class="col-12" v-html="options.gasMeterReadingDescription"><\/div>\n                        <div v-else-if="selectedMeter.hardwareType === \'Digital\' || selectedMeter.hardwareType === \'Unknown\'" class="col-12" v-html="options.standardDigitalReadingDescription"><\/div>\n                        <div v-else class="col-12" v-html="options.standardDialReadingDescription"><\/div>\n                        <div v-if="(selectedMeter.hardwareType === \'Digital\' || selectedMeter.hardwareType === \'Unknown\') && this.isDigitalImageNotProcessedSuccessful" v-html="options.meterImageReadingOutOfImageText" class="col alert alert-danger text-center"><\/div>\n                        <div v-else-if="isImageProcessingSuccess" class="col-12" v-html="options.meterImageReadingConfirmationText"><\/div>\n                        <div class="col-12 form-group" v-if="meterReadingChoice === \'Upload\'">\n                            <div class="form-group">\n                                <label class="required" for="MeterReadingUpload">{{options.title}}<\/label>\n                                <input id="MeterReadingUpload" name="Meter Reading" class="file-input" type="file" ref="standardFile" accept=".png, .jpg"> \n                            <\/div>                           \n                            <div class="text-right form-group">\n                                <a href="#" value="Info" v-on:click="validateUpload($event, $refs.standardFile)" class="button button--default">{{options.nextButtonLabel}}<\/a>\n                            <\/div>\n                        <\/div>\n                        <div class="col-12 form-group" v-else>\n                            <div>\n                                <label class="required" for="EnterMeterReading">{{options.title}}<\/label>\n                                <input class="form-control" id="EnterMeterReading" type="text" value="" v-model="standardReading">\n                            <\/div>\n                           \n                            <div class="text-right mt-3 form-group">\n                                <a href="#" value="Info" v-on:click="validateReading($event, standardReading)" class="button button--default">{{options.nextButtonLabel}}<\/a>\n                            <\/div>\n                        <\/div>\n                    <\/div>\n                    <div v-show="step === \'TOUStep1\'" class="row">\n                        <div v-if="selectedMeter.hardwareType === \'Digital\' || selectedMeter.hardwareType === \'Unknown\'" class="col" v-html="options.touDigitalReadingDescription"><\/div>\n                        <div v-else class="col" v-html="options.touDialReadingDescription"><\/div>\n                       <div v-if="(selectedMeter.hardwareType === \'Digital\' || selectedMeter.hardwareType === \'Unknown\') && this.isDigitalImageNotProcessedSuccessful" class="col-7">\n                                    <div>\n                                         <div class="alert alert-danger text-center">{{options.meterImageReadingOutOfImageText}}<\/div>\t\t\t\t                          \n                                      <\/div>\n                          <\/div> \n                   <div v-else-if="isImageProcessingSuccess" class="col-12" v-html="options.meterImageReadingConfirmationText"><\/div>\n                        <div v-if="meterReadingChoice === \'Upload\'" class="col-3">\n                            <div class="col-12 form-group">\n                                <label class="required" for="TOU4Upload">{{options.tou4Label}}<\/label>\n                                <input id="TOU4Upload" class="file-input" type="file" ref="tou4File" accept=".png, .jpg"> \n                            <\/div>\n                            <div class="col-12 form-group">\n                                <label class="required" for="TOU5Upload">{{options.tou5Label}}<\/label>\n                                <input id="TOU5Upload" class="file-input" type="file" ref="tou5File" accept=".png, .jpg"> \n                            <\/div>\n                            <div class="col-12 form-group">\n                                <label class="required" for="TOU6Upload">{{options.tou6Label}}<\/label>\n                                <input id="TOU6Upload" class="file-input" type="file" ref="tou6File" accept=".png, .jpg"> \n                            <\/div>\n                            <div class="col-6"><\/div>                          \n                            <div class="col-12 text-right form-group">\n                                <a href="#" value="Info" v-on:click="validateTouUpload($event, $refs.tou4File, $refs.tou5File, $refs.tou6File)" class="button button--default">{{options.nextButtonLabel}}<\/a>\n                            <\/div>\n                        <\/div>\n                        <div v-else>\n                            <div class="col-12 form-group">\n                                <label class="required" for="TOU4">{{options.tou4Label}}<\/label>\n                                <input name="TOU4 Reading" class="form-control" id="TOU4" type="text" value="" autocomplete="off" maxlength="9" v-model="tou4">\n                            <\/div>\n                            <div class="col-12 form-group">\n                                <label class="required" for="TOU5">{{options.tou5Label}}<\/label>\n                                <input name="TOU5 Reading" class="form-control" id="TOU5" type="text" value="" autocomplete="off" maxlength="9" v-model="tou5">\n                            <\/div>\n                            <div class="col-12 form-group">\n                                <label class="required" for="TOU6">{{options.tou6Label}}<\/label>\n                                <input class="form-control" id="TOU6" name="TOU6" type="text" value="" autocomplete="off" maxlength="9" v-model="tou6">\n                            <\/div>\n                            <div class="col-6"><\/div>\n                            <div class="col-12 text-right form-group">\n                                <a href="#" value="Info" v-on:click="validateTouReading($event, tou4, tou5, tou6)" class="button button--default">{{options.nextButtonLabel}}<\/a>\n                            <\/div>\n                        <\/div>\n                    <\/div>\n                    <div v-show="step === \'DemandStep1\'" class="row">\n                        <div class="col" v-html="options.demandReading1Description"><\/div>\n\n                        <div v-if="meterReadingChoice === \'Upload\'">\n                            <div class="col-12 form-group">\n                                <label class="required" for="KWH1Upload">{{options.kwh1Label}}<\/label>\n                                <input :required="selectedMeter.rateType === \'Demand\' ? true : false" id="KWH1Upload" name="KWH Reading" class=" form-control file-input" type="file" ref="KWH1File" accept=".png, .jpg">\n                            <\/div>\n                            <div class="col-6"><\/div>\n                            <div class="col-12 text-right form-group">\n                                <a href="#" value="DemandStep2" v-on:click="validateUpload($event, $refs.KWH1File)" class="button button--default">{{options.nextButtonLabel}}<\/a>\n                            <\/div>\n                        <\/div>\n                        <div v-else>\n                            <div class="col-12 form-group">\n                                <label class="required" for="KWH1">{{options.kwh1Label}}<\/label>\n                                <input class="form-control" id="KWH1" name="KWH Reading" type="text" value="" autocomplete="off" maxlength="9" v-model="kwh1">\n                            <\/div>\n                            <div class="col-6"><\/div>\n                            <div class="col-6 text-right form-group">\n                                <a href="#" value="DemandStep2" v-on:click="validateReading($event, kwh1)" class="button button--default">{{options.nextButtonLabel}}<\/a>\n                            <\/div>\n                        <\/div>\n                    <\/div>\n                    <div v-show="step === \'DemandStep2\'" class="row">\n                        <div class="col" v-html="options.demandReading2Description"><\/div>\n\n                        <div v-if="meterReadingChoice === \'Upload\'">\n                            <div class="col-12 form-group">\n                                <label class="required" for="KW1Upload">{{options.kw1Label}}<\/label>\n                                <input id="KW1Upload" name="KW Reading" class="form-control file-input" type="file" ref="KW1File" accept=".png, .jpg">\n                            <\/div>                          \n                            <div class="col-12 text-right form-group">\n                                 <a href="#" v-on:click="handleBackClick" class="button button--default">{{options.backButtonLabel}}<\/a>\n                                 <a href="#" value="DemandStep3" v-on:click="validateUpload($event, $refs.KW1File)" class="button button--default">{{options.nextButtonLabel}}<\/a>\n                            <\/div>\n                        <\/div>\n                        <div v-else>\n                            <div class="col-12 form-group">\n                                <label class="required" for="KW1">{{options.kw1Label}}<\/label>\n                                <input class="form-control" id="KW1" name="KW1" type="text" value="" autocomplete="off" maxlength="9" v-model="kw1">                               \n                            <\/div>\n                            \n                            <div class="col-12 text-right form-group">\n                                 <a href="#" v-on:click="handleBackClick" class="button button--default">{{options.backButtonLabel}}<\/a>\n                                 <a href="#" value="DemandStep3" v-on:click="validateReading($event, kw1)" class="button button--default">{{options.nextButtonLabel}}<\/a>\n                            <\/div>                          \n                        <\/div>\n                    <\/div>\n                    <div v-show="step === \'DemandStep3\'" class="row">\n                        <div class="col" v-html="options.demandReading3Description"><\/div>\n\n                        <div v-if="meterReadingChoice === \'Upload\'">\n                            <div class="col-12 form-group">\n                                <label class="required" for="CUM1Upload">{{options.cum1Label}}<\/label>\n                                <input id="CUM1Upload" name="CUM Reading" class="form-control file-input" type="file" ref="CUM1File" accept=".png, .jpg">\n                            <\/div>\n                            <div class="col-12 text-right form-group">\n                                <a href="#" v-on:click="handleBackClick" class="button button--default">{{options.backButtonLabel}}<\/a>\n                                <a href="#" value="DemandStep4" v-on:click="validateUpload($event, $refs.CUM1File)" class="button button--default">{{options.nextButtonLabel}}<\/a>\n                            <\/div>                           \n                        <\/div>\n                        <div v-else>\n                            <div class="col-12 form-group">\n                                <label class="required" for="CUM1">{{options.cum1Label}}<\/label>\n                                <input class="form-control" id="CUM1" name="CUM1" type="text" value="" autocomplete="off" maxlength="9" v-model="cum1">\n                            <\/div>\n                            <div class="col-12 text-right form-group">\n                                <a href="#" v-on:click="handleBackClick" class="button button--default">{{options.backButtonLabel}}<\/a>\n                                <a href="#" value="DemandStep4" v-on:click="validateReading($event, cum1)" class="button button--default">{{options.nextButtonLabel}}<\/a>\n                            <\/div>                            \n                        <\/div>\n                    <\/div>\n                    <div v-show="step === \'DemandStep4\'" class="row">\n                        <div class="col" v-html="options.demandReading4Description"><\/div>\n\n                        <div v-if="meterReadingChoice === \'Upload\'">\n                            <div class="col-12 form-group">\n                                <label for="KWH2Upload">{{options.kwh2Label}}<\/label>\n                                <input id="KWH2Upload" name="KWH Reading" class="form-control file-input" type="file" ref="KWH2File" accept=".png, .jpg">\n                            <\/div>\n                            <div class="col-12 form-group">\n                                <label for="KW2Upload">{{options.kw2Label}}<\/label>\n                                <input id="KW2Upload" name="KW Reading" class="form-control file-input" type="file" ref="KW2File" accept=".png, .jpg">\n                            <\/div>\n                            <div class="col-12 form-group">\n                                <label for="CUM2Upload">{{options.cum2Label}}<\/label>\n                                <input id="CUM2Upload" name="CUM Reading" class="form-control file-input" type="file" ref="CUM2File" accept=".png, .jpg">\n                            <\/div>                           \n                            <div class="col-12 text-right form-group">\n                                <a href="#" v-on:click="handleBackClick" class="button button--default">{{options.backButtonLabel}}<\/a>\n                                <a href="#" value="Info" v-on:click="validateDemandUpload($event, $refs.KWH2File, $refs.KW2File, $refs.CUM2File)" class="button button--default">{{options.nextButtonLabel}}<\/a>\n                            <\/div>\n                        <\/div>\n                        <div v-else>\n                            <div class="col-12 form-group">\n                                <label class="required" for="KWH2">{{options.kwh2Label}}<\/label>\n                                <input class="form-control" id="KWH2" name="KWH Reading" type="text" value="" autocomplete="off" maxlength="9" v-model="kwh2">\n                            <\/div>\n                            <div class="col-12 form-group">\n                                <label class="required" for="KW2">{{options.kw2Label}}<\/label>\n                                <input class="form-control" id="KW2" name="KW Reading" type="text" value="" autocomplete="off" maxlength="9" v-model="kw2">\n                            <\/div>\n                            <div class="col-12 form-group">\n                                <label class="required" for="CUM2">{{options.cum2Label}}<\/label>\n                                <input class="form-control" id="CUM2" name="CUM Reading" type="text" value="" autocomplete="off" maxlength="9" v-model="cum2">\n                            <\/div>                           \n                            <div class="col-12 text-right form-group">\n                                <a href="#" v-on:click="handleBackClick" class="button button--default">{{options.backButtonLabel}}<\/a>\n                                <a href="#" value="Info" v-on:click="validateDemandReading($event, kwh2, kw2, cum2)" class="button button--default">{{options.nextButtonLabel}}<\/a>\n                            <\/div>\n                        <\/div>\n                    <\/div>\n                    <div v-show="step === \'Info\' && !isUserAuthenticated" class="row">\n                        <div class="col-12 form-group">\n                            <label class="required" for="Email">{{options.emailLabel}}<\/label>\n                            <input class="form-control" id="Email" name="Email" type="text" value="" v-model="email">\n                        <\/div>\n\n                        <div class="col-6">\n                            <a href="#" v-on:click="handleBackClick" class="button button--default">Back<\/a>\n                        <\/div>\n                        <div class="col-6 text-right form-group">\n                            <a href="#" value="Terms" v-on:click="validateInfo($event, email)" class="button button--default">{{options.nextButtonLabel}}<\/a>\n                        <\/div>\n                    <\/div>\n                    <div v-show="step === \'Terms\'" class="row">\n                        <div class="col-12 form-group form-check">\n                            <input class="form-check-input" type="checkbox" id="Checkbox1" v-model="checkbox1" required>\n                            <label for="Checkbox1" v-html="options.checkboxTerms1"><\/label>\n                        <\/div>\n                        <div class="col-12 form-group form-check">\n                            <input class="form-check-input" type="checkbox" id="Checkbox2" v-model="checkbox2" required>\n                            <label for="Checkbox2" v-html="options.checkboxTerms2"><\/label>\n                        <\/div>\n                        <div class="col-6">\n                            <a href="#" v-on:click="handleBackClick" class="button button--default">{{options.backButtonLabel}}<\/a>\n                        <\/div>\n                        <div class="col-6 text-right form-group">\n                            <button type="submit" class="button button--default" v-on:click="validateTerms($event)">{{options.submitButtonLabel}}<\/button>\n                        <\/div>\n                    <\/div>                   \n                <\/div>\n               <\/div>\n\n                <div class="row">\n                    <div class="col">\n                        <p class="text-danger" v-if="errors.length">\n                            <b>Please correct the following error(s):<\/b>\n                            <ul>\n                                <li v-for="error in errors">{{ error }}<\/li>\n                            <\/ul>\n                        <\/p>\n                    <\/div>\n                <\/div>\n                <div v-if="currErrorMessage">\n                    <div class="row">\n                        <div class="col">\n                            <div class="alert alert-danger">{{currErrorMessage}}<\/div>\n                        <\/div>\n                    <\/div>\n                <\/div>\n                 <div v-if="currInfoMessage">\n                    <div class="row">\n                        <div class="col">\n                            <div class="alert alert-success">{{currInfoMessage}}<\/div>\n                        <\/div>\n                    <\/div>\n                <\/div>\n            <\/div>\n            <\/form>\n        <\/div>\n    '})],t)}(i.Vue);t["default"]=h});define("apps/components/account-chooser/account-chooser",["require","exports","vue-property-decorator","services/accounts-service","utils/error-messages","utils/number-helper"],function(n,t,i,r,u,f){Object.defineProperty(t,"__esModule",{value:!0});var e=function(n){function t(){var t=n.call(this)||this;return t.accountSearchQuery="",t.errorMessage="",t.isLoading=!1,t.redirectToFullpage=!1,t.accountsService=new r["default"](null),t.redirectLink=t.accountChooserOptions.fullPageUrl+"?target="+encodeURIComponent(t.accountChooserOptions.targetUrl),t.redirectToFullpage=t.accounts.length>t.accountChooserOptions.numberOfAccountsBeforeExternalPage,t}return __extends(t,n),Object.defineProperty(t.prototype,"displayableAccounts",{get:function(){var n=this;return this.accounts.filter(function(t){return t.accountNumber!==n.activeAccount.accountNumber&&(t.accountNumber.includes(n.accountSearchQuery)||t.accountDisplayNumber.includes(n.accountSearchQuery)||t.address.toLowerCase().includes(n.accountSearchQuery.toLowerCase()))})},enumerable:!0,configurable:!0}),t.prototype.amountDue=function(n){return f["default"].formatCurrency(n)},t.prototype.changeAccount=function(n){this.isLoading=!0;$(".account-chooser").waitMe({effect:"rotation"});this.redirectToFullpage=!1;this.accountSearchQuery="";this.accountsService.updateActiveAccount(n,this.onAccountUpdate,this.onAccountUpdateFailed)},t.prototype.onAccountUpdate=function(n){return this.isLoading=!1,$(".account-chooser").waitMe("hide"),n},t.prototype.onAccountUpdateFailed=function(n){this.isLoading=!1;$(".account-chooser").waitMe("hide");switch(n.errorMessageId){case 1:this.errorMessage=n.customMessage;break;default:this.errorMessage=u["default"].get(n.errorMessageId)}},__decorate([i.Prop(Object)],t.prototype,"accountChooserOptions",void 0),__decorate([i.Prop(Number)],t.prototype,"selectMode",void 0),__decorate([i.Prop(Object)],t.prototype,"activeAccount",void 0),__decorate([i.Prop(Array)],t.prototype,"accounts",void 0),__decorate([i.Emit("account-found")],t.prototype,"onAccountUpdate",null),__decorate([i.Component({template:'\n<div class="dropdown account-chooser mb-4">\n    <button type="button"\n        id="accountChooserDropdown"\n        class="d-flex justify-content-between w-100 active account-chooser_account"\n        data-toggle="dropdown"\n        aria-haspopup="true"\n        aria-expanded="false"\n        v-if="!redirectToFullpage">\n        <div>\n            <div class="row">\n                <div class="col-12 col-md">\n                    <div class="account-chooser_number">{{ accountChooserOptions.accountNumberLabel }}: <span class="account-chooser_number-alone">{{ activeAccount.accountDisplayNumber }}<\/span><\/div>\n                    <div>{{ activeAccount.address }}<\/div>\n                <\/div>\n\n                <div class="col-12 col-md-auto">\n                    <div class="account-chooser_closed" v-if="!activeAccount.isActive">\n                        <span>{{ accountChooserOptions.accountClosedLabel }}<\/span>\n                    <\/div>\n                <\/div>\n            <\/div>\n        <\/div>\n        <i class="fas fa-caret-down account-chooser_caret"><\/i>\n    <\/button>\n    <div class="dropdown-menu account-chooser_accounts-container px-0 py-3" aria-labelledby="accountChooserDropdown">\n        <div class="search-input_container mt-0 mx-4 mb-2">\n            <i class="fas fa-search"><\/i>\n            <input type="text"\n                class="d-block w-100 account-chooser_search mb-0 search-input"\n                v-bind:aria-label="accountChooserOptions.searchAccountLabel"\n                v-model="accountSearchQuery"\n            />\n        <\/div>\n        <!-- Loop over nothing. -->\n        <div class="account-chooser_accounts" v-if="!redirectToFullpage">\n            <a v-for="(account, index) in displayableAccounts" :key="account + index"\n                class="dropdown-item account-chooser_account px-4 py-2" href="#"\n                @click.prevent="changeAccount(account)"\n            >\n                <div class="container-fluid">\n                    <div class="row">\n                        <div class="col-12 col-md">\n                            <div>{{ accountChooserOptions.accountNumberLabel }}: <span class="account-chooser_number-alone">{{ account.accountDisplayNumber }}<\/span><\/div>\n                            <div>{{ account.address }}<\/div>\n                        <\/div>\n                        <div class="col-12 col-md-auto">\n                            <div v-if="accountChooserOptions.showBalance && (account.isActive || account.balance > 0)">{{ amountDue(account.balance) }}<\/div>\n                            <div class="account-chooser_closed" v-if="!account.isActive">\n                                <span>{{ accountChooserOptions.accountClosedLabel }}<\/span>\n                            <\/div>\n                        <\/div>\n                    <\/div>\n                <\/div>\n            <\/a>\n        <\/div>\n    <\/div>\n    <a v-bind:href="redirectLink" v-bind:title="accountChooserOptions.switchAccountsTitle" class="account-chooser account-chooser--display-only account-chooser--display-only--with-icon" v-if="redirectToFullpage">\n        <span>{{ activeAccount.address }}<\/span>\n        <span class="d-block account-chooser_number"><span class="font-weight-bold d-inline-block">{{ accountChooserOptions.accountNumberLabel }}:<\/span> {{ activeAccount.accountDisplayNumber }}<\/span>\n        <i class="fas fa-caret-right account-chooser_caret"><\/i>\n    <\/a>\n    <strong v-show="!isLoading && errorMessage.length > 0" class="form__error">{{ errorMessage }}<\/strong>\n<\/div>\n'})],t)}(i.Vue);t["default"]=e});define("services/outages-service",["require","exports","utils/error-messages"],function(n,t,i){Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function n(n,t,i){this.csrf="";this.baseUrl="";this.accessToken="";this.isImpersonating=!1;this.baseUrl=n+"/v2/";this.accessToken=t;this.isImpersonating=i;this.csrf=$('[name="__RequestVerificationToken"]').last().val().toString()}return n.prototype.GetEndPoint=function(n){var t=isNaN(Number(n));return t?this.baseUrl+"outages/account":this.baseUrl+"accounts/"+n+"/outage"},n.prototype.getOutageStatus=function(n,t,r){r===void 0&&(r=null);$.ajax({url:this.GetEndPoint(n.token),type:"GET",dataType:"json",headers:{Authorization:"Bearer "+this.accessToken},data:{token:n.token,isImpersonating:this.isImpersonating},success:function(n){var i,r,u;console.log("data.outage.etr: "+n.outage.etr);i=n.outage.etr;i!=undefined&&i.substr(i.length-1)=="Z"&&(i=i.substr(0,i.length-1),console.log("etr: "+i));r={reportingSource:n.outage.reportingSource,etr:i,outageStatus:n.outage.status,streetAddress:n.serviceAddress.line1,city:n.serviceAddress.city,comments:n.outage.comments,phoneNumber:n.callbackPhoneNumber};u={outage:r,returnCode:1,canReportOutage:!0};t(u)},error:function(n,u,f){var e=4,o,s;f==="GetOutageNoElectricService"?e=0:f==="GetOutageInvalidAccount"?e=3:f==="GetOutageCallCustomerService"?e=2:(o=i["default"].getByStatusCode(n.status),console.error("Error retrieving outage status: "),console.error(o),r&&r(o));e!==4&&(s={outage:{},returnCode:e,canReportOutage:!1},t(s))}})},n.prototype.reportOutage=function(n,t,r,u,f,e){e===void 0&&(e=null);var o=this.isImpersonating?"?isImpersonating=true":"",s={token:n.token,wantsCallback:r,channel:t,alternativePhoneNumber:{fullNumber:u}};$.ajax({url:this.GetEndPoint(n.token)+o,type:"POST",dataType:"json",headers:{Authorization:"Bearer "+this.accessToken},data:s,success:function(n){n.result=!0;f(n)},error:function(n){var t=i["default"].getByStatusCode(n.status);console.error("Error retrieving outage status: ");console.error(t);e&&e(t)}})},n}();t["default"]=r});define("apps/outages-app",["require","exports","vue-property-decorator","utils/string-helper","apps/components/find-account","apps/components/account-chooser/account-chooser","apps/components/dynamic-label","utils/mask","services/outages-service","services/accounts-service","utils/date-helper","utils/form-validator","utils/alerts-helper","utils/error-messages","components/flyout"],function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y){function w(n,t){var r=new i.Vue({el:"#"+n,data:{outageAppOptions:t},components:{OutagesApp:p}});y["default"].attachListenerIfInFlyout("#"+n,function(){r.$destroy()})}Object.defineProperty(t,"__esModule",{value:!0});t.init=w;var p=function(n){function t(){var t=n.call(this)||this;return t.account=null,t.allRelatedAccounts=[],t.outage=null,t.canReportOutage=!0,t.outageReported=!1,t.confirmOutage=!1,t.isLoading=!1,t.currErrorMessage="",t.isAuthenticated=!1,t.accountChooserMode=0,t.wantsCallbackOnBestNumber=!0,t.preferredCallback="",t.doNotCallToConfirm=!1,t.userReportingMethod="Website",t.hasUserSubmitted=!1,t.outagesService=new s["default"](t.options.apiUrl,t.options.accessToken,t.options.isImpersonating),t.accountsService=new h["default"](t.options.apiUrl),t}return __extends(t,n),t.prototype.created=function(){this.accountsService.getActiveAccount(this.checkUserAuthenticatedStatus)},t.prototype.mounted=function(){this.isLoading=!0;$(".outage-app").waitMe({effect:"rotation"})},t.prototype.onPreferredCallbackChange=function(n,t){t.length>0||o["default"].phoneNumber("#preferredCallback")},t.prototype.checkUserAuthenticatedStatus=function(n){if(!n.result){this.isLoading=!1;$(".outage-app").waitMe("hide");return}this.isAuthenticated=!0;this.allRelatedAccounts=n.accounts;this.onAccountFound(__assign({},n.activeAccount,{accountNumber:n.activeAccount.accountNumber}))},Object.defineProperty(t.prototype,"isOutageKnown",{get:function(){return this.outage?this.outage.outageStatus!=="Unknown":!1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"wasOutagePredicted",{get:function(){return this.outage.reportingSource=="Predicted"?!0:!1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isFormValid",{get:function(){return this.wantsCallbackOnBestNumber?!0:l["default"].validatePhoneNumber(o["default"].getRawValue(this.preferredCallback))||this.doNotCallToConfirm},enumerable:!0,configurable:!0}),t.prototype.getTextFromStatus=function(n){switch(n){case"Unassigned":return this.options.statusUnassigned;case"Assigned":return this.options.statusAssigned;case"EnRoute":return this.options.statusEnRoute;case"OnSite":return this.options.statusOnSite;case"Restored":return this.options.statusRestored;case"Unknown":return this.options.statusUnknown;default:return this.options.outageStatusErrorText}},t.prototype.onAccountFound=function(n){this.account=n;this.isLoading=!0;$(".outage-app").waitMe({effect:"rotation"});this.outagesService.getOutageStatus(this.account,this.onGetOutageStatusComplete,this.onGetOutageStatusError)},t.prototype.onGetOutageStatusComplete=function(n){if(n.result||n.returnCode===1)this.outage=n.outage,this.currErrorMessage="",this.canReportOutage=n.canReportOutage,this.outage&&(this.outage.phoneNumber===null||this.outage.phoneNumber===undefined)&&(this.outage.phoneNumber=null,this.wantsCallbackOnBestNumber=!1),o["default"].phoneNumber("#preferredCallback");else{this.outage=null;switch(n.returnCode){case 0:this.currErrorMessage=this.options.doesNotHaveElectricMeterMessage;break;case 2:this.currErrorMessage=n.errorMessageId===1?n.customMessage:v["default"].get(n.errorMessageId);break;case 3:this.currErrorMessage=this.options.invalidAccountError}}this.isLoading=!1;$(".outage-app").waitMe("hide")},t.prototype.onGetOutageStatusError=function(n){this.isLoading=!1;$(".outage-app").waitMe("hide");a["default"].showAlert(n,4)},t.prototype.reportOutage=function(){if(this.isFormValid&&!this.hasUserSubmitted){var n=null;this.wantsCallbackOnBestNumber||this.doNotCallToConfirm||(n=o["default"].getRawValue(this.preferredCallback));this.isLoading=!0;$(".outage-app").waitMe({effect:"rotation"});this.currErrorMessage="";this.hasUserSubmitted=!0;n!=null?this.outagesService.reportOutage(this.account,this.userReportingMethod,!0,n,this.onReportOutageComplete,this.onReportOutageError):this.outagesService.reportOutage(this.account,this.userReportingMethod,this.wantsCallbackOnBestNumber,n,this.onReportOutageComplete,this.onReportOutageError)}},t.prototype.onReportOutageComplete=function(n){if(n.result)this.outageReported=!0;else switch(n.errorMessageId){case 1:this.currErrorMessage=n.customMessage;break;default:a["default"].showAlert(v["default"].get(n.errorMessageId),4)}this.isLoading=!1;$(".outage-app").waitMe("hide")},t.prototype.onReportOutageError=function(n){this.isLoading=!1;$(".outage-app").waitMe("hide");a["default"].showAlert(n,4)},t.prototype.formatOutageStatusLabel=function(n){return n.lastIndexOf(":")===n.length-1?n:n+":"},t.prototype.onConfirmOutage=function(n){n.event.preventDefault?n.event.preventDefault():n.event.returnValue=!1;this.confirmOutage=!0},t.prototype.formatOutageETR=function(n,t,i,r){return this.outage.etr?c["default"].formatDateFromUnixTimestamp(this.outage.etr.toString(),t,i,r):this.outage.etr},t.prototype.formatPhoneNumber=function(n){return r["default"].formatAsPhoneNumber(n)},t.prototype.destroyed=function(){this.outageReported&&$(".account-outage-status").length>0&&window.location.reload()},t.prototype.outageMapClick=function(){window.open(this.options.outageMapLink.link+this.options.languageParam,"_blank")},__decorate([i.Prop(Object)],t.prototype,"options",void 0),__decorate([i.Watch("preferredCallback")],t.prototype,"onPreferredCallbackChange",null),__decorate([i.Component({name:"OutagesApp",components:{FindAccount:u["default"],AccountChooser:f["default"],DynamicLabel:e["default"]},template:'\n        <div class="outage-app">\n            <div class="mb-2 mb-sm-4 outages__header">               \n                <h1 class="mb-2 font-weight-bold text-uppercase">{{options.title}}<\/h1>\n                <a class="mb-5 text-light button button--default" @click="outageMapClick(this)">{{options.outageMapLink.title}} <\/a> \n                <h3>{{options.subtitle}}<\/h3>\n            <\/div>\n            <div v-if="!options.canCheckStatus" class="alert alert-danger">\n              <div v-html="options.outageStatusUnavailableContent" />\n            <\/div>\n            <template v-if="options.canCheckStatus">\n                <find-account v-if="account === null && !isAuthenticated && !isLoading" \n                    :options="options.findAccount"\n                    v-on:account-found="onAccountFound"\n                ><\/find-account>\n                <account-chooser v-else-if="isAuthenticated && allRelatedAccounts.length > 1"\n                    :activeAccount="account"\n                    :accounts="allRelatedAccounts"\n                    :accountChooserOptions="options.accountChooser"\n                    :selectMode="accountChooserMode"\n                    v-on:account-found="onAccountFound"\n                ><\/account-chooser>\n                <div v-if="account !== null">\n                    <template v-if="outage === null">\n                        <div v-if="!isLoading">\n                            <strong class="error-text">{{ currErrorMessage }}<\/strong>\n                            <br />\n                            <button type="button" class="button button--default mt-3" @click="account = null">{{ options.findAccount.pleaseTryAgainText }}<\/button>\n                        <\/div>\n                    <\/template>\n                    <template v-if="outage !== null && !outageReported">\n                        <!-- Report Outage Form -->\n                        <div v-if="!isOutageKnown || confirmOutage">\n                            <form action="#" method="post" @submit.prevent="reportOutage" v-show="!isLoading" class="p-0">\n                                <dynamic-label :templateContent="confirmOutage ? options.knownOutageText : options.noKnownOutagesText"\n                                    :tagName="\'h3\'"\n                                    :extraClasses="\'h4 outages__no-record-msg\'"\n                                    :address="outage.streetAddress"\n                                    >\n                                <\/dynamic-label>\n                                <hr />\n                                <div v-if="!canReportOutage" class="alert alert-danger">\n                                    <div v-html="options.outageReportingUnavailableContent" />\n                                <\/div>\n                                <template v-if="canReportOutage">\n                                    <dynamic-label :templateContent="options.reportOutageHeader"\n                                        :tagName="\'h3\'"\n                                        :address="outage.streetAddress"\n                                        :city="outage.city">\n                                    <\/dynamic-label>\n                                   <div v-if="!options.isInEmergencyMode">\n                                    <div v-if="outage.phoneNumber === null" v-html="options.noPhoneNumberContent" />\n                                    <template v-if="outage.phoneNumber !== null">\n                                        <dynamic-label :templateContent="options.phoneVerificationPrompt"\n                                            :tagName="\'p\'"\n                                            :phone="formatPhoneNumber(outage.phoneNumber)">\n                                        <\/dynamic-label>\n                                        <ul class="d-flex flex-column list-reset mb-0">\n                                            <li class="d-inline-block">\n                                                <label class="d-flex flex-row align-items-center align-content-center radio-label" for="callback_yes">\n                                                    <input name="contactThisNumber"\n                                                        type="radio"\n                                                        id="callback_yes"\n                                                        class="d-inline-block mb-0 flex-shrink-1"\n                                                        :aria-label="options.callbackYesOption"\n                                                        :value="true"\n                                                        v-model="wantsCallbackOnBestNumber" />\n                                                    <span class="flex-grow-1 flex-shrink-1">{{ options.callbackYesOption }}<\/span>\n                                                <\/label>\n                                            <\/li>\n                                            <li class="d-inline-block">\n                                                <label class="d-flex flex-row align-items-center align-content-center radio-label" for="callback_noalt">\n                                                    <input name="contactThisNumber"\n                                                        type="radio"\n                                                        id="callback_noalt"\n                                                        class="d-inline-block mb-0 flex-shrink-1"\n                                                        :aria-label="options.callbackNoOrAlternate"\n                                                        :value="false"\n                                                        v-model="wantsCallbackOnBestNumber" />\n                                                    <span class="flex-grow-1 flex-shrink-1">{{ options.callbackNoOrAlternate }}<\/span>\n                                                <\/label>\n                                            <\/li>\n                                        <\/ul>\n                                    <\/template>\n                                    <div v-show="!wantsCallbackOnBestNumber" class="mt-1 outages__alt-form">\n                                        <label for="preferredCallback" class="d-block">{{options.alternateCallbackInputLabel}}<\/label>\n                                        <input type="tel"\n                                            class="d-inline-block"\n                                            id="preferredCallback"\n                                            name="preferredCallback"\n                                            max-length="14"\n                                            :aria-label="options.alternateCallbackInputLabel"\n                                            v-model="preferredCallback"/>\n                                        <p class="form__error my-0 font-weight-bold" v-show="!isFormValid && hasUserSubmitted">{{ options.noCallbackErrorMessage }}<\/p>\n                                        <strong class="d-block pb-2">{{options.noCallbackSwitchLabel}}<\/strong>\n                                        <label for="doNotCallToConfirm" class="d-inline-block cursor-pointer">\n                                            <input type="checkbox" id="doNotCallToConfirm" name="doNotCallToConfirm" v-model="doNotCallToConfirm" />\n                                            <span class="ml-2">{{options.noCallbackOption}}<\/span>\n                                        <\/label>\n                                        <br />\n                                        <a :href="options.whyNoCallbackBadLink.link" class="font-weight-bold outages__alt-form__no-callback-link">{{options.whyNoCallbackBadLink.title}}<\/a>\n                                    <\/div>\n                                   <\/div>\n                                    <p v-show="!isLoading && currErrorMessage.length > 0" class="form__error form__error--large font-weight-bold mt-3">{{ currErrorMessage }}<\/p>\n                                    <button type="submit" class="button button--default mt-4" :class="{ disabled: !isFormValid || hasUserSubmitted }">{{options.reportOutageButton}}<\/button>\n                                <\/template>\n                            <\/form>\n                        <\/div>\n\n                        <!-- Current Outage Status -->\n                        <div v-else class="outages__status-report" v-show="!isLoading">\n                            <h3>{{options.outageStatusHeader}}<\/h3>\n\n                            <span><b>{{ formatOutageStatusLabel(options.locationLabel) }}<\/b> {{outage.streetAddress}}, {{outage.city}}<\/span><br/>\n                            <span><b>{{ formatOutageStatusLabel(options.etrLabel) }}<\/b> {{ formatOutageETR(outage.etr, options.dayNames, options.monthNames, options.dateTimeSeparator) }}<\/span><br/>\n                            <span><b>{{ formatOutageStatusLabel(options.statusLabel) }}<\/b> {{getTextFromStatus(outage.outageStatus)}}<\/span><br/>\n                            <span><b>{{ formatOutageStatusLabel(options.notesLabel) }}<\/b> {{outage.comments || \'N/A\'}}<\/span><br/>\n\n                            <!-- If this Account has not reported an outage, yet... let them -->\n                            <template v-if="wasOutagePredicted">\n                                <p class="mt-4 font-weight-bold">{{options.confirmOutageText}}<\/p>\n                                <a href="#" @click="onConfirmOutage(this)" class="button button--default d-inline-block mb-2">{{options.confirmOutageButton}}<\/a>\n                            <\/template>\n\n                            <p class="mt-4 font-weight-bold">{{options.setupAlertsPrompt}}<\/p>\n                            <a :href="options.setupAlertsLink.link" class="button button--info d-inline-block mb-2">{{options.setupAlertsLink.title}}<\/a>\n                        <\/div>\n                    <\/template>\n\n                    <!-- After New Outage Has Been Reported -->\n                    <div v-if="outageReported && outage" v-show="!isLoading">\n                        <h3>{{ options.outageReportedHeader }}<\/h3>\n                        <hr/>\n                        <dynamic-label :templateContent="options.outageReportedText"\n                            :tagName="\'h3\'"\n                            :extraClasses="\'h4\'"\n                            :address="outage.streetAddress"\n                            :city="outage.city">\n                        <\/dynamic-label>\n                        <div class="alert alert--danger my-4" v-html="options.outageWarningsContent"><\/div>\n                        <p class="font-weight-bold">{{options.setupAlertsPrompt}}<\/p>\n\n                        <a :href="options.setupAlertsLink.link" class="button button--default">{{options.setupAlertsLink.title}}<\/a>\n                    <\/div>\n                <\/div>\n            <\/template>\n            <ul class="mt-4 list-reset">\n                <li>\n                    <a :href="options.stormsAndOutagesLink.link" class="outages__bottom-links">{{options.stormsAndOutagesLink.title}}<\/a>\n                <\/li>\n                <li class="mt-2">\n                    <a :href="options.outagePriorityLink.link" class="outages__bottom-links">{{options.outagePriorityLink.title}}<\/a>\n                <\/li>\n                <li class="mt-2">\n                    <a :href="options.contactUsLink.link" class="outages__bottom-links">{{options.contactUsLink.title}}<\/a>\n                <\/li>\n            <\/ul>\n        <\/div>\n    '})],t)}(i.Vue);t["default"]=p});define("apps/vue-init",["require","exports","vue-property-decorator"],function(n,t,i){Object.defineProperty(t,"__esModule",{value:!0});i.Vue.config.productionTip=!1});define("components/contacts",["require","exports"],function(n,t){Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function n(){}return n}(),i=function(){function n(n,t){this.options=t;var i=this.options.contactItemBlockVMs;$(document).ready(function(){$("#"+n).bind("change",function(){for(var t=$(this).children("option:selected").val(),n=0;n<i.length;n++)if(i[n].label==t){$(this).parents(".contact-item-container").find(".contact-image").attr("src",i[n].imageSrc);$(this).parents(".contact-item-container").find(".contact-fname").html(i[n].firstName);$(this).parents(".contact-item-container").find(".contact-lname").html(i[n].lastName);$(this).parents(".contact-item-container").find(".contact-title").html(i[n].title);i[n].bio!=undefined?$(this).parents(".contact-item-container").find(".contact-bio").html(i[n].bio):$(this).parents(".contact-item-container").find(".contact-bio").html("");i[n].phone!=undefined?$(this).parents(".contact-item-container").find(".contact-phone").html(i[n].phone):$(this).parents(".contact-item-container").find(".contact-phone").html("");i[n].email!=undefined?$(this).parents(".contact-item-container").find(".contact-email").html("<a href='mailto:"+i[n].email+"'>"+i[n].email+"<\/a>"):$(this).parents(".contact-item-container").find(".contact-email").html("");i[n].streetAddress!=undefined&&i[n].line3!=undefined?$(this).parents(".contact-item-container").find(".contact-addr").html(i[n].streetAddress+"<br />"+i[n].line3):$(this).parents(".contact-item-container").find(".contact-addr").html("");i[n].phone==undefined&&i[n].email==undefined&&i[n].streetAddress==undefined&&(i[n].line3==undefined||i[n].line3.trim()==",")?$(this).parents(".contact-item-container").find(".contact-info").hide():$(this).parents(".contact-item-container").find(".contact-info").show();break}});$("#"+n).trigger("change")})}return n}();t["default"]=i});define("utils/events",["require","exports"],function(n,t){Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function n(){}return n.emit=function(t){for(var i,u,f,e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];for(i=0,u=n.events[t]||[];i<u.length;i++)f=u[i],f.apply(void 0,e)},n.on=function(t,i){(n.events[t]=n.events[t]||[]).push(i)},n.events={},n}();t["default"]=i});define("components/customer-impacted-block",["require","exports","utils/events"],function(n,t,i){function r(){$("input[name=ci-radio-btn]").click(function(){$(".customer-impacted").waitMe({effect:"rotation"});var n={impactCode:$("#CurrentBlock_Code").val(),impactResponse:$("input[name='ci-radio-btn']:checked").val()};$.ajax({type:"PUT",url:"/api/accounts/"+$("#AccountNo").val()+"/update-impact",data:__assign({__RequestVerificationToken:$('[name="__RequestVerificationToken"]').last().val().toString()},n),dataType:"json",success:function(n){n.result==!0?i["default"].emit("ci-responded"):($(".customer-impacted").waitMe("hide"),$("#customer-impacted-error").removeClass("d-none"),$("#customer-impacted-content").addClass("d-none"))},error:function(){$(".customer-impacted").waitMe("hide");$("#customer-impacted-error").removeClass("d-none");$("#customer-impacted-content").addClass("d-none")}})})}Object.defineProperty(t,"__esModule",{value:!0});t["default"]=r});define("components/customer-impacted-page",["require","exports","utils/events"],function(n,t,i){function r(){i["default"].on("ci-responded",function(){document.location.reload()})}Object.defineProperty(t,"__esModule",{value:!0});t["default"]=r});define("components/fuelswitching-calculator",["require","exports","utils/number-helper"],function(n,t,i){Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function n(){var n=this;this.data={};this.shouldDoFullRecalc=!0;this.isCustomUpfrontCost=!1;$(".fuelswitching-calculator input[name=fuel-method]").on("click",function(t){n.SetPrimaryHeatingSource(t.target)});$(".fuelswitching-calculator button[name=switch]").on("click",function(t){n.SetSwitchTo(t.target)});$(".fuelswitching-calculator input[name=remove]").on("change",function(t){n.SetRemoveYesNo(t.target)});$(".fuelswitching-calculator button[name=built]").on("click",function(t){n.SetBuiltYear(t.target)});$(".fuelswitching-calculator button[name=built-gshp]").on("click",function(t){n.SetBuiltYear(t.target)});$(".fuelswitching-calculator input[name=home-size]").on("click",function(t){n.SetHomeSize(t.target)});$(".fuelswitching-calculator input[name=home-size-gshp]").on("click",function(t){n.SetHomeSize(t.target)});$(".fuelswitching-calculator button[name=monthly-or-yearly]").on("click",function(t){n.SetMonthlyOrYearly(t.target)});$(".fuelswitching-calculator #upfront-cost-value").on("input",function(t){n.SetUpfrontCost(t.target)});$(".fuelswitching-calculator #upfront-cost-value-gshp").on("input",function(t){n.SetUpfrontCost(t.target)});$(".fuelswitching-calculator #input-dollars").on("keypress",function(t){return n.IsDecimalKey(t)});$(".fuelswitching-calculator #input-dollars").on("input",function(){return n.UpdateCalculateButton()});$(".fuelswitching-calculator button[name=boiler-or-furnace]").on("click",function(t){n.SetBoilerOrFurnace(t.target)});$(".fuelswitching-calculator input[name=home-percent]").on("input",function(t){n.OnHomePercentChange(t.target)});$(".fuelswitching-calculator input[name=home-percent-gshp]").on("input",function(t){n.OnHomePercentChange(t.target)});$(".fuelswitching-calculator #btnCalculate").on("click",function(){n.OnCalculateClick()});$(".fuelswitching-calculator #btnCalculate-gshp").on("click",function(){n.OnCalculateClick()})}return n.prototype.OnCalculateClick=function(){var n=Object.assign({},this.data),t;n.yearlyCost=Number($(".fuelswitching-calculator #input-dollars").val());this.shouldDoFullRecalc?($(".fuelswitching-calculator").waitMe({effect:"rotation"}),n.switchToHeatingSource=="Geothermal"&&(n.heatingPortion="Heat100"),t=this,$.ajax({type:"POST",url:"/api/calculators/fuel-switching",data:__assign({__RequestVerificationToken:$('[name="__RequestVerificationToken"]').last().val().toString()},n),dataType:"json",success:function(i){i==null?alert("These calculations are currently unavailable. Please try again later."):(t.result=i,t.isCustomUpfrontCost&&(t.result.upfrontCost=n.switchToHeatingSource=="Geothermal"?Number($(".fuelswitching-calculator #upfront-cost-value-gshp").val().toString().replace("$","").replace(",","")):Number($(".fuelswitching-calculator #upfront-cost-value").val().toString().replace("$","").replace(",",""))),t.ProcessResult(n),$(".fuelswitching-calculator").waitMe("hide"),t.shouldDoFullRecalc=!1)},error:function(){alert("These calculations are currently unavailable. Please try again later.")}})):(this.result.upfrontCost=n.switchToHeatingSource=="Geothermal"?Number($(".fuelswitching-calculator #upfront-cost-value-gshp").val().toString().replace("$","").replace(",","")):Number($(".fuelswitching-calculator #upfront-cost-value").val().toString().replace("$","").replace(",","")),this.ProcessResult(n))},n.prototype.ProcessResult=function(n){var t=this.result.chIncentive+this.result.federalTaxCredit+this.result.nyStateTaxCredit,r;$(".fuelswitching-calculator #upfront-cost-value").val(i["default"].formatCurrency(this.result.upfrontCost));$(".fuelswitching-calculator #upfront-cost-value-gshp").val(i["default"].formatCurrency(this.result.upfrontCost));$(".fuelswitching-calculator #annual-fuel-savings-amt").html(i["default"].formatCurrency(this.result.annualDollarSavings));$(".fuelswitching-calculator #net-conversion-costs-amt").html(i["default"].formatCurrency(this.result.upfrontCost-t));$(".fuelswitching-calculator #net-conversion-costs-amt-gshp").html(i["default"].formatCurrency(this.result.upfrontCost-t));$(".fuelswitching-calculator #miles-driven").html(i["default"].formatNumber(this.result.annualCarbonSavings));$(".fuelswitching-calculator #total-incentives-amt").html(i["default"].formatCurrency(t));$(".fuelswitching-calculator #total-incentives-amt-gshp").html(i["default"].formatCurrency(t));this.result.chIncentive>0?($(".fuelswitching-calculator .ch-incentive, .fuelswitching-calculator .ch-incentive-gshp").removeClass("d-none"),$(".fuelswitching-calculator #ch-incentive-amt, .fuelswitching-calculator #ch-incentive-amt-gshp").html(i["default"].formatCurrency(this.result.chIncentive))):$(".fuelswitching-calculator .ch-incentive, .fuelswitching-calculator .ch-incentive-gshp").addClass("d-none");this.result.federalTaxCredit>0?($(".fuelswitching-calculator .federal-tax-credit, .fuelswitching-calculator .federal-tax-credit-gshp").removeClass("d-none"),$(".fuelswitching-calculator #federal-tax-credit-amt, .fuelswitching-calculator #federal-tax-credit-amt-gshp").html(i["default"].formatCurrency(this.result.federalTaxCredit))):$(".fuelswitching-calculator .federal-tax-credit, .fuelswitching-calculator .federal-tax-credit-gshp").addClass("d-none");this.result.nyStateTaxCredit>0?($(".fuelswitching-calculator .nystate-tax-credit-gshp").removeClass("d-none"),$(".fuelswitching-calculator #nystate-tax-credit-amt-gshp").html(i["default"].formatCurrency(this.result.nyStateTaxCredit))):$(".fuelswitching-calculator .nystate-tax-credit-gshp").addClass("d-none");r=Math.max(0,(this.result.upfrontCost-t)/this.result.annualDollarSavings);$(".fuelswitching-calculator #roi").html(i["default"].formatNumber(r,1));n.switchToHeatingSource=="NaturalGas"&&($(".fuelswitching-calculator #future-annual-fuel-costs").html(i["default"].formatCurrency(n.yearlyCost-this.result.annualDollarSavings)),$(".fuelswitching-calculator #current-annual-fuel-costs").html(i["default"].formatCurrency(n.yearlyCost)));r<=15?($(".fuelswitching-calculator-chart").attr("data-years",i["default"].formatNumber(r,1)),$(".fuelswitching-calculator-chart").attr("data-annual-savings",this.result.annualDollarSavings),$(".fuelswitching-calculator-chart").attr("data-net-conversion-costs",this.result.upfrontCost-t),$(".fuelswitching-calculator-chart").trigger("drawChart"),$(".fuelswitching-calculator .chart-div").removeClass("d-none")):$(".fuelswitching-calculator .chart-div").addClass("d-none");$(".fuelswitching-calculator .results").removeClass("d-none");setTimeout(function(){$("#results-id").get(0).scrollIntoView({behavior:"smooth"})},500)},n.prototype.SetPrimaryHeatingSource=function(n){this.data.primaryHeatingSource=n.value;$(".fuelswitching-calculator #input-ques-2").removeClass("d-none");$(".fuelswitching-calculator .switch-to-ashp").addClass("d-none");$(".fuelswitching-calculator .switch-to-gshp").addClass("d-none");$(".fuelswitching-calculator .switch-to-ng").addClass("d-none");$(".fuelswitching-calculator .results").addClass("d-none");$(".fuelswitching-calculator .chart-div").addClass("d-none");$(".fuelswitching-calculator .calculated-costs").addClass("d-none");$(".fuelswitching-calculator .calculated-costs-gshp").addClass("d-none");$(".fuelswitching-calculator input[name=remove]").prop("checked",!1);$(".fuelswitching-calculator input[name=home-size]").prop("checked",!1);$(".fuelswitching-calculator input[name=home-size-gshp]").prop("checked",!1);$(".fuelswitching-calculator button[name=switch]").removeClass("active");$(".fuelswitching-calculator button[name=built]").removeClass("active");$(".fuelswitching-calculator button[name=built-gshp]").removeClass("active");$(".fuelswitching-calculator button[name=boiler-or-furnace]").removeClass("active");$(".fuelswitching-calculator #home-size-size5-container").removeClass("d-none");$(".fuelswitching-calculator #home-size-size6-container").removeClass("d-none");this.data.homeBuilt=null;this.data.homeSize=null;this.data.heatingPortion="Heat100";this.data.removingFurnaceOrBoiler=!1;this.isCustomUpfrontCost=!1;$(".fuelswitching-calculator #btnCalculate").prop("disabled",!0);$(".fuelswitching-calculator #btnCalculate-gshp").prop("disabled",!0);$(".fuelswitching-calculator #switch-gas").prop("disabled",this.data.primaryHeatingSource=="NaturalGas");switch(this.data.primaryHeatingSource){case"NaturalGas":$(".fuelswitching-calculator #boilerOrFurnaceQuestion").html($("#CurrentBlock_BoileroraFurnace").val().toString());$(".fuelswitching-calculator #spend-type").html($("#CurrentBlock_NaturalGas").val().toString());break;case"Propane":$(".fuelswitching-calculator #boilerOrFurnaceQuestion").html($("#CurrentBlock_DoYouHaveBoileroraFurnaceOption").val().toString());$(".fuelswitching-calculator #spend-type").html($("#CurrentBlock_Propane").val().toString());break;case"FuelOil":$(".fuelswitching-calculator #boilerOrFurnaceQuestion").html($("#CurrentBlock_DoYouHaveBoileroraFurnaceOption").val().toString());$(".fuelswitching-calculator #spend-type").html($("#CurrentBlock_FuelOil").val().toString());break;case"ElectricBaseboard":$(".fuelswitching-calculator #boilerOrFurnaceQuestion").html($("#CurrentBlock_BoileroraFurnace").val().toString());$(".fuelswitching-calculator #spend-type").html($("#CurrentBlock_ElectricBaseboard").val().toString())}this.UpdateCalculateButton()},n.prototype.SetSwitchTo=function(n){this.data.switchToHeatingSource=n.value;$(".fuelswitching-calculator button[name='switch']").removeClass("active");$(n).addClass("active");$(".fuelswitching-calculator .results").addClass("d-none");$(".fuelswitching-calculator .chart-div").addClass("d-none");this.isCustomUpfrontCost=!1;this.data.removingFurnaceOrBoiler=!1;switch(this.data.switchToHeatingSource){case"AirSourceHeatPump":$(".fuelswitching-calculator .switch-to-ashp").removeClass("d-none");$(".fuelswitching-calculator .switch-to-gshp").addClass("d-none");$(".fuelswitching-calculator .switch-to-ng").addClass("d-none");$(".fuelswitching-calculator #switch-pic").attr("src","/Static/images/fuelswitching-calculator/air-source-heat-pump.png");$(".fuelswitching-calculator #switch-pic").attr("alt","Air Source Heat Pump");$(".fuelswitching-calculator #results-header-text").html($("#CurrentBlock_AirSourceHeatPumpText").val().toString());$(".fuelswitching-calculator #net-conversion-costs-heading").removeClass("collapsible collapsed");$(".fuelswitching-calculator #net-conversion-costs-text").addClass("d-none");$(".fuelswitching-calculator #calc-button-number").html("7");$(".fuelswitching-calculator .calculated-costs").removeClass("d-none");$(".fuelswitching-calculator .calculated-costs-gshp").addClass("d-none");$(".fuelswitching-calculator #btnLearnMoreHeatPump").removeClass("d-none");$(".fuelswitching-calculator #btnLearnMoreGeothermal").addClass("d-none");$(".fuelswitching-calculator #btnLearnMoreNaturalGas").addClass("d-none");break;case"Geothermal":$(".fuelswitching-calculator .switch-to-ashp").addClass("d-none");$(".fuelswitching-calculator .switch-to-gshp").removeClass("d-none");$(".fuelswitching-calculator .switch-to-ng").addClass("d-none");$(".fuelswitching-calculator #switch-pic").attr("src","/Static/images/fuelswitching-calculator/geo.png");$(".fuelswitching-calculator #switch-pic").attr("alt","Geothermal");$(".fuelswitching-calculator #results-header-text").html($("#CurrentBlock_GeothermalText").val().toString());$(".fuelswitching-calculator #net-conversion-costs-heading").removeClass("collapsible collapsed");$(".fuelswitching-calculator #net-conversion-costs-text").addClass("d-none");$(".fuelswitching-calculator .calculated-costs-gshp").removeClass("d-none");$(".fuelswitching-calculator .calculated-costs").addClass("d-none");$(".fuelswitching-calculator #btnLearnMoreHeatPump").addClass("d-none");$(".fuelswitching-calculator #btnLearnMoreGeothermal").removeClass("d-none");$(".fuelswitching-calculator #btnLearnMoreNaturalGas").addClass("d-none");break;case"NaturalGas":$(".fuelswitching-calculator .switch-to-ashp").addClass("d-none");$(".fuelswitching-calculator .switch-to-gshp").addClass("d-none");$(".fuelswitching-calculator .switch-to-ng").removeClass("d-none");$(".fuelswitching-calculator #switch-pic").attr("src","/Static/images/fuelswitching-calculator/furnace2.png");$(".fuelswitching-calculator #switch-pic").attr("alt","Natural Gas");$(".fuelswitching-calculator #results-header-text").html($("#CurrentBlock_NaturalGasText").val().toString());$(".fuelswitching-calculator #net-conversion-costs-heading").addClass("collapsible collapsed");$(".fuelswitching-calculator #net-conversion-costs-text").removeClass("d-none");$(".fuelswitching-calculator #calc-button-number").html("5");$(".fuelswitching-calculator .calculated-costs").removeClass("d-none");$(".fuelswitching-calculator .calculated-costs-gshp").addClass("d-none");$(".fuelswitching-calculator #btnLearnMoreHeatPump").addClass("d-none");$(".fuelswitching-calculator #btnLearnMoreGeothermal").addClass("d-none");$(".fuelswitching-calculator #btnLearnMoreNaturalGas").removeClass("d-none")}this.UpdateCalculateButton()},n.prototype.SetRemoveYesNo=function(n){this.data.removingFurnaceOrBoiler=n.checked&&n.value=="yes"?!0:!1;this.UpdateCalculateButton()},n.prototype.SetBuiltYear=function(n){this.data.homeBuilt=n.value;$(".fuelswitching-calculator button[name='built']").removeClass("active");$(".fuelswitching-calculator button[name='built-gshp']").removeClass("active");$(n).addClass("active");switch(this.data.homeBuilt){case"After2000":$(".fuelswitching-calculator #home-size-size5-container").removeClass("d-none");$(".fuelswitching-calculator #home-size-size5-container-gshp").removeClass("d-none");$(".fuelswitching-calculator #home-size-size6-container").removeClass("d-none");$(".fuelswitching-calculator #home-size-size6-container-gshp").removeClass("d-none");break;case"Between1980And2000":$(".fuelswitching-calculator #home-size-size5-container").removeClass("d-none");$(".fuelswitching-calculator #home-size-size5-container-gshp").removeClass("d-none");$(".fuelswitching-calculator #home-size-size6-container").addClass("d-none");$(".fuelswitching-calculator #home-size-size6-container-gshp").addClass("d-none");$(".fuelswitching-calculator #home-size-size6").prop("checked",!1);$(".fuelswitching-calculator #home-size-size6-gshp").prop("checked",!1);break;case"Before1980":$(".fuelswitching-calculator #home-size-size5-container").addClass("d-none");$(".fuelswitching-calculator #home-size-size5-container-gshp").addClass("d-none");$(".fuelswitching-calculator #home-size-size5").prop("checked",!1);$(".fuelswitching-calculator #home-size-size5-gshp").prop("checked",!1);$(".fuelswitching-calculator #home-size-size6-container").addClass("d-none");$(".fuelswitching-calculator #home-size-size6-container-gshp").addClass("d-none");$(".fuelswitching-calculator #home-size-size6").prop("checked",!1);$(".fuelswitching-calculator #home-size-size6-gshp").prop("checked",!1)}this.UpdateCalculateButton()},n.prototype.SetHomeSize=function(n){this.data.homeSize=n.value;this.UpdateCalculateButton()},n.prototype.SetMonthlyOrYearly=function(n){var i=$(".fuelswitching-calculator button[name='monthly-or-yearly'].active").val(),t;i!==n.value&&($(".fuelswitching-calculator button[name='monthly-or-yearly']").removeClass("active"),$(n).addClass("active"),t=Number($(".fuelswitching-calculator #input-dollars").val()),t!=0&&(n.value==="Monthly"?$(".fuelswitching-calculator #input-dollars").val(t/12):$(".fuelswitching-calculator #input-dollars").val(t*12)),this.UpdateCalculateButton())},n.prototype.SetBoilerOrFurnace=function(n){this.data.primaryHeatingType=n.value;$(".fuelswitching-calculator button[name='boiler-or-furnace']").removeClass("active");$(n).addClass("active");this.data.primaryHeatingType==="Boiler"?($(".fuelswitching-calculator #heater-pic").attr("src","/Static/images/fuelswitching-calculator/boiler2.png"),$(".fuelswitching-calculator #heater-pic").attr("alt","Boiler")):($(".fuelswitching-calculator #heater-pic").attr("src","/Static/images/fuelswitching-calculator/furnace2.png"),$(".fuelswitching-calculator #heater-pic").attr("alt","Furnace"));this.UpdateCalculateButton()},n.prototype.OnHomePercentChange=function(n){this.shouldDoFullRecalc=!0;switch(n.value){case"25":this.data.heatingPortion="Heat25";break;case"50":this.data.heatingPortion="Heat50";break;case"75":this.data.heatingPortion="Heat75";break;case"100":this.data.heatingPortion="Heat100"}$(".fuelswitching-calculator #house-pic").attr("src","/Static/images/fuelswitching-calculator/house-"+this.data.heatingPortion+".png")},n.prototype.SetUpfrontCost=function(){this.isCustomUpfrontCost=!0},n.prototype.UpdateCalculateButton=function(){this.shouldDoFullRecalc=!0;this.data.switchToHeatingSource=="NaturalGas"&&this.data.primaryHeatingType!=null&&Number($(".fuelswitching-calculator #input-dollars").val())>0&&$(".fuelswitching-calculator button[name='boiler-or-furnace']").hasClass("active")||this.data.switchToHeatingSource=="AirSourceHeatPump"&&($("#remove-yes").prop("checked")||$("#remove-no").prop("checked"))&&this.data.homeBuilt!=null&&this.data.homeSize!=null||this.data.switchToHeatingSource=="Geothermal"&&this.data.homeBuilt!=null&&this.data.homeSize!=null?($(".fuelswitching-calculator #btnCalculate").prop("disabled",!1),$(".fuelswitching-calculator #btnCalculate-gshp").prop("disabled",!1)):($(".fuelswitching-calculator #btnCalculate").prop("disabled",!0),$(".fuelswitching-calculator #btnCalculate-gshp").prop("disabled",!0))},n.prototype.IsDecimalKey=function(n){var t=n.which?n.which:event.keyCode;return t>31&&t!=46&&(t<48||t>57)?!1:!0},n}();t["default"]=r});define("components/led-calculator",["require","exports"],function(n,t){Object.defineProperty(t,"__esModule",{value:!0});var i=[$("#CurrentBlock_LebBulbTip1").val().toString(),$("#CurrentBlock_LebBulbTip2").val().toString(),$("#CurrentBlock_LebBulbTip3").val().toString()],r=9,u=365,f=function(){function n(n,t,i,r){this.bulbType=n;this.wattage=t;this.numOfBulbs=i;this.hoursOfUse=r}return n}(),e=function(){function n(n){var t=this;this.list=[];this.idIncrement=0;this.options=n;$(".led-calculator #qtyNoOfBulbs").prop("disabled",!0);$(".led-calculator #qtyNoOfHours").prop("disabled",!0);$(".led-calculator #btnPlusNoOfBulbs").click(function(){$(".led-calculator #qtyNoOfBulbs").val(parseInt($(".led-calculator #qtyNoOfBulbs").val())+1);$(".led-calculator #qtyNoOfBulbs").val()==100&&$(".led-calculator #qtyNoOfBulbs").val(99)});$(".led-calculator #btnMinusNoOfBulbs").click(function(){$(".led-calculator #qtyNoOfBulbs").val(parseInt($(".led-calculator #qtyNoOfBulbs").val())-1);$(".led-calculator #qtyNoOfBulbs").val()==0&&$(".led-calculator #qtyNoOfBulbs").val(1)});$(".led-calculator #btnPlusNoOfHours").click(function(){$(".led-calculator #qtyNoOfHours").val(parseInt($(".led-calculator #qtyNoOfHours").val())+1);$(".led-calculator #qtyNoOfHours").val()==25&&$(".led-calculator #qtyNoOfHours").val(24)});$(".led-calculator #btnMinusNoOfHours").click(function(){$(".led-calculator #qtyNoOfHours").val(parseInt($(".led-calculator #qtyNoOfHours").val())-1);$(".led-calculator #qtyNoOfHours").val()==0&&$(".led-calculator #qtyNoOfHours").val(1)});$(".led-calculator #inc-btn").click(function(){var i=[40,60,75,100,150],t,r;for($(".led-calculator #wattage").find("option").remove(),t=0;t<i.length;t++)$(".led-calculator #wattage").append('<option id="'+i[t]+'">'+i[t]+"<\/option>");r=document.getElementById("wattage").children[1];r.setAttribute("selected","selected");$(".led-calculator #bulb-pic").attr("src","/Static/images/led-calculator/incandescent.png");$(".led-calculator #bulb-pic").data("bulb-type",n.currentBlock.incandescent)});$(".led-calculator #cfl-btn").click(function(){var i=[15,18,19,20,23,26,40],t,r;for($(".led-calculator #wattage").find("option").remove(),t=0;t<i.length;t++)$(".led-calculator #wattage").append('<option id="'+i[t]+'">'+i[t]+"<\/option>");r=document.getElementById("wattage").children[5];r.setAttribute("selected","selected");$(".led-calculator #bulb-pic").attr("src","/Static/images/led-calculator/cfl.png");$(".led-calculator #bulb-pic").data("bulb-type",n.currentBlock.compactFluorescentLight)});$(".led-calculator #hal-btn").click(function(){var i=[29,43,53,72],t,r;for($(".led-calculator #wattage").find("option").remove(),t=0;t<i.length;t++)$(".led-calculator #wattage").append('<option id="'+i[t]+'">'+i[t]+"<\/option>");r=document.getElementById("wattage").children[1];r.setAttribute("selected","selected");$(".led-calculator #bulb-pic").attr("src","/Static/images/led-calculator/halogen.png");$(".led-calculator #bulb-pic").data("bulb-type",n.currentBlock.halogen)});$(".led-calculator #add-to-calc").click(function(){if(t.list.length>r-1)alert($("#CurrentBlock_MaximumAmountofBulbs").val().toString());else{var n=$(".led-calculator #bulb-pic").data("bulb-type"),i=$(".led-calculator #wattage").val(),u=$(".led-calculator #qtyNoOfBulbs").val(),e=$(".led-calculator #qtyNoOfHours").val(),o=new f(n,i,u,e);t.displayElement(o)}});$(".led-calculator #btnCalculate").click(function(){var n,r,i,u;if(t.list.length==0)alert($("#CurrentBlock_AddAtLeastOneBulbs").val().toString());else{for(n=0,r=0,i=0;i<t.list.length;i++)r=t.kwhCalculation(t.list[i]),n=n+r;u=Math.round(n);$(".led-calculator #kwh").html(u.toString());$(".led-calculator #kwh").attr("style","font-size:24px;font-weight: bold;");t.YearlyCalculation(n);t.MilesCalculation(n);$(".led-calculator #btnCalculate").html($("#CurrentBlock_ReCalculate").val().toString());$(".led-calculator #advisement-inner").html($("#CurrentBlock_Didyouknow").val().toString()+t.getTip())}})}return n.prototype.getTip=function(){var n=Math.floor(Math.random()*i.length);return i[n]},n.prototype.displayElement=function(n){var u=this,s,t,f,e,h,i,o;this.list.length>=0&&$(".led-calculator #btnCalculate").prop("disabled",!1);s=n.bulbType;this.list.push(n);t=document.createElement("li");f=n.bulbType+this.idIncrement;this.idIncrement++;t.setAttribute("id",f);e=n.numOfBulbs+" "+n.wattage+"Watt "+n.bulbType;t.innerHTML=e;h=document.createTextNode(t.innerHTML);n.bulbType==="bulb"?(this.list.pop(),alert($("#CurrentBlock_SelectBulbToBeginCalculation").val().toString())):document.getElementById("myUL").appendChild(t);i=document.createElement("SPAN");o=document.createTextNode("×");i.className="close";i.appendChild(o);t.appendChild(i);i.onclick=function(){t.style.display="none";var n=u.list.filter(function(){return f===t.id}),i=u.list.indexOf(n[0]);u.list.splice(i,1);u.list.length==0&&($(".led-calculator #btnCalculate").prop("disabled",!0),$(".led-calculator #yearly-dollars").html("-"),$(".led-calculator #miles").html("-"),$(".led-calculator #kwh").html("-"))};this.list.length>r-1&&alert($("#CurrentBlock_MaximumAmountofBulbs").val().toString())},n.prototype.kwhCalculation=function(n){var t=n.numOfBulbs,i=n.wattage,r=n.hoursOfUse;return t*((i-this.options.wattsElecEquivalent)/1e3)*r*u},n.prototype.YearlyCalculation=function(n){var t=n*this.options.dollarConversionFactor,i=Math.round(t);$(".led-calculator #yearly-dollars").html(i.toString());$(".led-calculator #yearly-dollars").attr("style","font-size:24px;font-weight: bold;")},n.prototype.MilesCalculation=function(n){var t=Math.round(n*(this.options.emissionsFactor/this.options.milesDrivenAvgCar));$(".led-calculator #miles").html(t.toString());$(".led-calculator #miles").attr("style","font-size:24px;font-weight: bold;")},n}();t["default"]=e});define("components/legacy-fuelswitching-calculator",["require","exports"],function(n,t){Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function n(n){var t=this;this.DataLoaded=!1;this.numbrOfGalPerYearOil="850";this.numbrOfGalPerYearPropane="950";this.fuelSwitchClicked=!1;this.boilerFurClicked=!1;this.primaryHeatingSource="";this.cleanHeatingSource="";this.boilerOrFurnaceOption="";this.utilityBillAmount=0;this.utilityBillDuration="";this.fuelGallonsAnnual=0;this.fuelPricePerGallonAnnual=0;this.fuelFreq="";this.fuelSwitch="";this.options=n;$(".legacy-fuelswitching-calculator #electric, .legacy-fuelswitching-calculator #natural-gas, .legacy-fuelswitching-calculator #propane, .legacy-fuelswitching-calculator #oil").click(function(n){t.Question3Enable(n.target)});$(".legacy-fuelswitching-calculator #heat-pump-btn, .legacy-fuelswitching-calculator #geo-btn, .legacy-fuelswitching-calculator #gas-btn").click(function(n){t.SetSwitch(n.target)});$(".legacy-fuelswitching-calculator #btnmonthly, .legacy-fuelswitching-calculator #btnyearly").click(function(n){t.setFuelFreq(n.target)});$(".legacy-fuelswitching-calculator #boiler-btn, .legacy-fuelswitching-calculator #furnace-btn").click(function(n){t.SetBoilerOrFurnace(n.target)});$(".legacy-fuelswitching-calculator #btnCalculate").click(function(){t.OnCalculateClick()});$(".legacy-fuelswitching-calculator #input-dollars, .legacy-fuelswitching-calculator #input-gal, .legacy-fuelswitching-calculator #UpCostDuctlessASHP, .legacy-fuelswitching-calculator #UpCostDuctASHP, .legacy-fuelswitching-calculator #UpCostGeothermal, .legacy-fuelswitching-calculator #UpCostNatGas").keypress(function(n){return t.IsNumberKey(n)});$(".legacy-fuelswitching-calculator #input-price").keypress(function(n){return t.IsDecimalKey(n)})}return n.prototype.InsertFuelSwitchPreferences=function(){var n={};n.primaryHeatingSource=this.primaryHeatingSource;n.cleanHeatingSource=this.cleanHeatingSource;this.fuelType=parseInt($(".legacy-fuelswitching-calculator input[name=fuel-method]:checked").val());this.fuelType==1||this.fuelType==2?(n.utilityBillAmount=Number($(".legacy-fuelswitching-calculator #input-dollars").val()),n.utilityBillDuration=this.fuelFreq,n.fuelPricePerGallonAnnual=0,n.fuelGallonsAnnual=0):(n.utilityBillAmount=0,n.fuelPricePerGallonAnnual=Number($(".legacy-fuelswitching-calculator #input-price").val()),n.fuelGallonsAnnual=Number($(".legacy-fuelswitching-calculator #input-gal").val()),n.utilityBillDuration="");n.boilerOrFurnaceOption=this.boilerOrFurnaceOption;$.ajax({type:"POST",url:"/api/calculators/legacy-fuel-switching",data:__assign({__RequestVerificationToken:$('[name="__RequestVerificationToken"]').last().val().toString()},n),dataType:"json",success:function(n){n.errorMsg!=null&&alert("These calculations are currently unavailable. Please try again later.")},error:function(){alert("These calculations are currently unavailable. Please try again later.")}})},n.prototype.OnCalculateClick=function(){this.DataLoaded||(this.setDefaultFuelSwitchData(),this.DataLoaded=!0);this.Recalculate();this.InsertFuelSwitchPreferences()},n.prototype.ValidateUpfrontCost=function(){return $(".legacy-fuelswitching-calculator #UpCostDuctlessASHP").val()<1||$(".legacy-fuelswitching-calculator #UpCostDuctlessASHP").val()>999999?(alert("Please enter Upfront cost ranging from 1 to 999999"),!1):$(".legacy-fuelswitching-calculator #UpCostDuctASHP").val()<1||$(".legacy-fuelswitching-calculator #UpCostDuctASHP").val()>999999?(alert("Please enter Upfront cost ranging from 1 to 999999"),!1):$(".legacy-fuelswitching-calculator #UpCostGeothermal").val()<1||$(".legacy-fuelswitching-calculator #UpCostGeothermal").val()>999999?(alert("Please enter Upfront cost ranging from 1 to 999999"),!1):($(".legacy-fuelswitching-calculator #UpCostNatGas").val()<1||$(".legacy-fuelswitching-calculator #UpCostNatGas").val()>999999)&&(this.fuelType=parseInt($(".legacy-fuelswitching-calculator input[name=fuel-method]:checked").val()),this.fuelType==1||this.fuelType==3||this.fuelType==4)?(alert("Please enter Upfront cost ranging from 1 to 999999"),!1):!0},n.prototype.SetUpFrontCosts=function(){this.fuelType=parseInt($(".legacy-fuelswitching-calculator input[name=fuel-method]:checked").val());this.fuelType==1&&(this.activeboiler?$(".legacy-fuelswitching-calculator #UpCostNatGas").val(this.options.electricToNatGasBoiler):$(".legacy-fuelswitching-calculator #UpCostNatGas").val(this.options.electricToNatGasFurnace));this.fuelType==3&&(this.activeboiler?$(".legacy-fuelswitching-calculator #UpCostNatGas").val(this.options.propaneToNatGasBoiler):$(".legacy-fuelswitching-calculator #UpCostNatGas").val(this.options.propaneToNatGasFurnace));this.fuelType==4&&(this.activeboiler?$(".legacy-fuelswitching-calculator #UpCostNatGas").val(this.options.fueloilToNatGasBoiler):$(".legacy-fuelswitching-calculator #UpCostNatGas").val(this.options.fueloilToNatGasFurnace))},n.prototype.Recalculate=function(){if(document.getElementById("table").style.visibility="visible",document.getElementById("divDisclaimer").style.visibility="visible",this.DataLoaded&&(this.activeboiler?(this.furBoilerFlag&&(this.SetUpFrontCosts(),$(".legacy-fuelswitching-calculator #UpCostDuctASHP").val(this.options.upfrontCostDuctedAshp),$(".legacy-fuelswitching-calculator #UpCostDuctlessASHP").val(this.options.upfrontCostDuctlessAshp),$(".legacy-fuelswitching-calculator #UpCostGeothermal").val(this.options.upfrontCostGshp),this.furBoilerFlag=!1),$(".legacy-fuelswitching-calculator #NysNatGas").val(this.options.nyserdaNatGasBoiler),$(".legacy-fuelswitching-calculator #ChIncNatGas").val(this.options.chIncentiveNatGasBoiler),$(".legacy-fuelswitching-calculator #FedTxNatGas").val(this.options.federalTaxNatGasBoiler),$(".legacy-fuelswitching-calculator #RateImpNatGas").val(this.options.rateImpactCreditNatGasBoiler)):(this.furBoilerFlag&&(this.SetUpFrontCosts(),$(".legacy-fuelswitching-calculator #UpCostDuctASHP").val(this.options.upfrontCostDuctedAshp),$(".legacy-fuelswitching-calculator #UpCostDuctlessASHP").val(this.options.upfrontCostDuctlessAshp),$(".legacy-fuelswitching-calculator #UpCostGeothermal").val(this.options.upfrontCostGshp),this.furBoilerFlag=!1),$(".legacy-fuelswitching-calculator #NysNatGas").val(this.options.nyserdaNatGasFurnace),$(".legacy-fuelswitching-calculator #ChIncNatGas").val(this.options.chIncentiveNatGasFurnace),$(".legacy-fuelswitching-calculator #FedTxNatGas").val(this.options.federalTaxNatGasFurnace),$(".legacy-fuelswitching-calculator #RateImpNatGas").val(this.options.rateImpactCreditNatGasFurnace)),this.ValidateUpfrontCost(),$(".legacy-fuelswitching-calculator #btnCalculate").html("<h3>RE-CALCULATE<\/h3>"),this.fuelType=parseInt($(".legacy-fuelswitching-calculator input[name=fuel-method]:checked").val()),this.fuelType==1&&(this.primaryHeatingSource="Electric"),this.fuelType==2&&(this.primaryHeatingSource="Natural Gas"),this.fuelType==3&&(this.primaryHeatingSource="Propane"),this.fuelType==4&&(this.primaryHeatingSource="Oil"),this.ApplyHighlighting(this.fuelSwitch),this.fuelType==2&&($(".legacy-fuelswitching-calculator #gas-btn").attr("style","background-color: #d2d2d2;border-color:#d2d2d2;margin-bottom: 10px;"),$(".legacy-fuelswitching-calculator table tr > td:nth-child(5), .legacy-fuelswitching-calculator table tr > th:nth-child(5)").attr("style","vertical-align:middle;")),(this.fuelType==3||this.fuelType==4)&&($(".legacy-fuelswitching-calculator #ChIncDuctASHP").val(this.options.chIncentiveDuctedAshpFuelOrPropane),$(".legacy-fuelswitching-calculator #ChIncDuctlessASHP").val(this.options.chIncentiveDuctlessAshpFuelOrPropane)),this.fuelType==2&&($(".legacy-fuelswitching-calculator #ChIncDuctASHP").val(this.options.chIncentiveDuctedAshpNatGas),$(".legacy-fuelswitching-calculator #ChIncDuctlessASHP").val(this.options.chIncentiveDuctlessAshpNatGas)),this.fuelType==1&&($(".legacy-fuelswitching-calculator #ChIncDuctASHP").val(this.options.chIncentiveDuctedAshpElectric),$(".legacy-fuelswitching-calculator #ChIncDuctlessASHP").val(this.options.chIncentiveDuctlessAshpElectric)),$(".legacy-fuelswitching-calculator #ChIncGeothermal").val(this.options.chIncentiveGshp),this.activeboiler?$(".legacy-fuelswitching-calculator #ChIncNatGas").val(this.options.chIncentiveNatGasBoiler):$(".legacy-fuelswitching-calculator #ChIncNatGas").val(this.options.chIncentiveNatGasFurnace)),$(".legacy-fuelswitching-calculator #FedTxGeothermal").val(parseFloat((Number($(".legacy-fuelswitching-calculator #UpCostGeothermal").val())*this.options.fedTaxCreditPercentGshp).toString()).toFixed(0)),$(".legacy-fuelswitching-calculator #IncTotalDuctlessASHP").val(Number($(".legacy-fuelswitching-calculator #RateImpDuctlessASHP").val())+Number($(".legacy-fuelswitching-calculator #FedTxDuctlessASHP").val())+Number($(".legacy-fuelswitching-calculator #ChIncDuctlessASHP").val())+Number($(".legacy-fuelswitching-calculator #NysDuctlessASHP").val())),$(".legacy-fuelswitching-calculator #IncTotalDuctASHP").val(Number($(".legacy-fuelswitching-calculator #RateImpDuctASHP").val())+Number($(".legacy-fuelswitching-calculator #FedTxDuctASHP").val())+Number($(".legacy-fuelswitching-calculator #ChIncDuctASHP").val())+Number($(".legacy-fuelswitching-calculator #NysDuctASHP").val())),$(".legacy-fuelswitching-calculator #IncTotalGeothermal").val(Number($(".legacy-fuelswitching-calculator #RateImpGeothermal").val())+Number($(".legacy-fuelswitching-calculator #FedTxGeothermal").val())+Number($(".legacy-fuelswitching-calculator #ChIncGeothermal").val())+Number($(".legacy-fuelswitching-calculator #NysGeothermal").val())),$(".legacy-fuelswitching-calculator #IncTotalNatGas").val(Number($(".legacy-fuelswitching-calculator #RateImpNatGas").val())+Number($(".legacy-fuelswitching-calculator #FedTxNatGas").val())+Number($(".legacy-fuelswitching-calculator #ChIncNatGas").val())+Number($(".legacy-fuelswitching-calculator #NysNatGas").val())),$(".legacy-fuelswitching-calculator #ConvCostDuctlessASHP").val(Number($(".legacy-fuelswitching-calculator #UpCostDuctlessASHP").val())-Number($(".legacy-fuelswitching-calculator #IncTotalDuctlessASHP").val())),$(".legacy-fuelswitching-calculator #ConvCostDuctASHP").val(Number($(".legacy-fuelswitching-calculator #UpCostDuctASHP").val())-Number($(".legacy-fuelswitching-calculator #IncTotalDuctASHP").val())),$(".legacy-fuelswitching-calculator #ConvCostGeothermal").val(Number($(".legacy-fuelswitching-calculator #UpCostGeothermal").val())-Number($(".legacy-fuelswitching-calculator #IncTotalGeothermal").val())),$(".legacy-fuelswitching-calculator #ConvCostNatGas").val(Number($(".legacy-fuelswitching-calculator #UpCostNatGas").val())-Number($(".legacy-fuelswitching-calculator #IncTotalNatGas").val())),this.fuelType=parseInt($(".legacy-fuelswitching-calculator input[name=fuel-method]:checked").val()),this.fuelType==3||this.fuelType==4?($(".legacy-fuelswitching-calculator #CurAnnCostDuctlessASHP").val((Number($(".legacy-fuelswitching-calculator #input-gal").val())*Number($(".legacy-fuelswitching-calculator #input-price").val())).toFixed(2)),$(".legacy-fuelswitching-calculator #CurAnnCostDuctASHP").val((Number($(".legacy-fuelswitching-calculator #input-gal").val())*Number($(".legacy-fuelswitching-calculator #input-price").val())).toFixed(2)),$(".legacy-fuelswitching-calculator #CurAnnCostGeoThermal").val((Number($(".legacy-fuelswitching-calculator #input-gal").val())*Number($(".legacy-fuelswitching-calculator #input-price").val())).toFixed(2)),$(".legacy-fuelswitching-calculator #CurAnnCostNatGas").val((Number($(".legacy-fuelswitching-calculator #input-gal").val())*Number($(".legacy-fuelswitching-calculator #input-price").val())).toFixed(2))):this.fuelFreq=="monthly"?($(".legacy-fuelswitching-calculator #CurAnnCostDuctlessASHP").val((Number($(".legacy-fuelswitching-calculator #input-dollars").val())*12).toFixed(2)),$(".legacy-fuelswitching-calculator #CurAnnCostDuctASHP").val((Number($(".legacy-fuelswitching-calculator #input-dollars").val())*12).toFixed(2)),$(".legacy-fuelswitching-calculator #CurAnnCostGeoThermal").val((Number($(".legacy-fuelswitching-calculator #input-dollars").val())*12).toFixed(2)),$(".legacy-fuelswitching-calculator #CurAnnCostNatGas").val((Number($(".legacy-fuelswitching-calculator #input-dollars").val())*12).toFixed(2))):($(".legacy-fuelswitching-calculator #CurAnnCostDuctlessASHP").val(Number($(".legacy-fuelswitching-calculator #input-dollars").val()).toFixed(2)),$(".legacy-fuelswitching-calculator #CurAnnCostDuctASHP").val(Number($(".legacy-fuelswitching-calculator #input-dollars").val()).toFixed(2)),$(".legacy-fuelswitching-calculator #CurAnnCostGeoThermal").val(Number($(".legacy-fuelswitching-calculator #input-dollars").val()).toFixed(2)),$(".legacy-fuelswitching-calculator #CurAnnCostNatGas").val(Number($(".legacy-fuelswitching-calculator #input-dollars").val()).toFixed(2))),this.fuelType==1){var n=0,a=0,t=0,v=0,u=0,f=0;n=Number($(".legacy-fuelswitching-calculator #CurAnnCostDuctlessASHP").val())/this.options.electricRatePerKwh;t=n*this.options.factorMilesPerlbCO2*this.options.factorLbCO2KWH;a=n*this.options.factorElectricToAshp;v=a*this.options.factorMilesPerlbCO2*this.options.factorLbCO2KWH;u=a*this.options.electricRatePerKwh;f=Number($(".legacy-fuelswitching-calculator #CurAnnCostDuctlessASHP").val())-Math.round(u);$(".legacy-fuelswitching-calculator #milesASHP").html(Math.round(t-v).toString());$(".legacy-fuelswitching-calculator #milesASHPDuct").html(Math.round(t-v).toString());var y=0,yt=0,p=0,e=0;y=n*this.options.factorElectricToGSHP;yt=y*this.options.factorMilesPerlbCO2*this.options.factorLbCO2KWH;p=y*this.options.electricRatePerKwh;e=Number($(".legacy-fuelswitching-calculator #CurAnnCostGeoThermal").val())-Math.round(p);$(".legacy-fuelswitching-calculator #milesGeothermal").html(Math.round(t-yt).toString());var pt=0,w=0,b=0,k=0;w=n*this.options.factorElectricToNatGas;pt=w*this.options.factorMilesPerlbCO2*this.options.factorLbCO2THERM;b=w*this.options.naturalGasRatePerTherm;k=Number($(".legacy-fuelswitching-calculator #CurAnnCostNatGas").val())-Math.round(b);$(".legacy-fuelswitching-calculator #milesNatGas").html(Math.round(t-pt).toString());$(".legacy-fuelswitching-calculator #FutAnnCostDuctlessASHP").val(Math.round(u));$(".legacy-fuelswitching-calculator #FutAnnCostDuctASHP").val(Math.round(u));$(".legacy-fuelswitching-calculator #FutAnnCostGeoThermal").val(Math.floor(p));$(".legacy-fuelswitching-calculator #FutAnnCostNatGas").val(Math.floor(b))}if(this.fuelType==3){var i=0,d=0,g=0,o=0,f=0;i=Number($(".legacy-fuelswitching-calculator #input-gal").val())*this.options.factorMilesPerlbCO2*this.options.factorLbCO2GalPropane;d=Number($(".legacy-fuelswitching-calculator #input-gal").val())*this.options.factorPropaneToAshp;g=d*this.options.factorMilesPerlbCO2*this.options.factorLbCO2KWH;o=d*this.options.electricRatePerKwh;f=Number($(".legacy-fuelswitching-calculator #CurAnnCostDuctlessASHP").val())-Math.round(o);$(".legacy-fuelswitching-calculator #milesASHP").html(Math.round(i-g).toString());$(".legacy-fuelswitching-calculator #milesASHPDuct").html(Math.round(i-g).toString());var nt=0,wt=0,tt=0,e=0;nt=Number($(".legacy-fuelswitching-calculator #input-gal").val())*this.options.factorPropaneToGshp;wt=nt*this.options.factorMilesPerlbCO2*this.options.factorLbCO2KWH;tt=nt*this.options.electricRatePerKwh;e=Number($(".legacy-fuelswitching-calculator #CurAnnCostGeoThermal").val())-Math.round(tt);$(".legacy-fuelswitching-calculator #milesGeothermal").html(Math.round(i-wt).toString());var it=0,bt=0,rt=0,k=0;it=Number($(".legacy-fuelswitching-calculator #input-gal").val())*this.options.factorPropaneToNatGas;bt=it*this.options.factorMilesPerlbCO2*this.options.factorLbCO2THERM;rt=it*this.options.naturalGasRatePerTherm;k=Number($(".legacy-fuelswitching-calculator #CurAnnCostNatGas").val())-Math.round(rt);$(".legacy-fuelswitching-calculator #milesNatGas").html(Math.round(i-bt).toString());$(".legacy-fuelswitching-calculator #FutAnnCostDuctlessASHP").val(Math.round(o));$(".legacy-fuelswitching-calculator #FutAnnCostDuctASHP").val(Math.round(o));$(".legacy-fuelswitching-calculator #FutAnnCostGeoThermal").val(Math.round(tt));$(".legacy-fuelswitching-calculator #FutAnnCostNatGas").val(Math.round(rt))}if(this.fuelType==4){var r=0,ut=0,ft=0,s=0,f=0;r=Number($(".legacy-fuelswitching-calculator #input-gal").val())*this.options.factorMilesPerlbCO2*this.options.factorLbCO2GalFuelOil;ut=Number($(".legacy-fuelswitching-calculator #input-gal").val())*this.options.factorFueloilToAshp;ft=ut*this.options.factorMilesPerlbCO2*this.options.factorLbCO2KWH;s=ut*this.options.electricRatePerKwh;f=Number($(".legacy-fuelswitching-calculator #CurAnnCostDuctlessASHP").val())-Math.round(s);$(".legacy-fuelswitching-calculator #milesASHP").html(Math.round(r-ft).toString());$(".legacy-fuelswitching-calculator #milesASHPDuct").html(Math.round(r-ft).toString());var et=0,kt=0,ot=0,e=0;et=Number($(".legacy-fuelswitching-calculator #input-gal").val())*this.options.factorFueloilToGshp;kt=et*this.options.factorMilesPerlbCO2*this.options.factorLbCO2KWH;ot=et*this.options.electricRatePerKwh;e=Number($(".legacy-fuelswitching-calculator #CurAnnCostGeoThermal").val())-Math.round(ot);$(".legacy-fuelswitching-calculator #milesGeothermal").html(Math.round(r-kt).toString());var st=0,dt=0,ht=0,k=0;st=Number($(".legacy-fuelswitching-calculator #input-gal").val())*this.options.factorFueloilToNatGas;dt=st*this.options.factorMilesPerlbCO2*this.options.factorLbCO2THERM;ht=st*this.options.naturalGasRatePerTherm;k=Number($(".legacy-fuelswitching-calculator #CurAnnCostNatGas").val())-Math.round(ht);$(".legacy-fuelswitching-calculator #milesNatGas").html(Math.round(r-dt).toString());$(".legacy-fuelswitching-calculator #FutAnnCostDuctlessASHP").val(Math.round(s));$(".legacy-fuelswitching-calculator #FutAnnCostDuctASHP").val(Math.round(s));$(".legacy-fuelswitching-calculator #FutAnnCostGeoThermal").val(Math.round(ot));$(".legacy-fuelswitching-calculator #FutAnnCostNatGas").val(Math.round(ht))}if(this.fuelType==2){$(".legacy-fuelswitching-calculator table tr > td:nth-child(5), .legacy-fuelswitching-calculator table tr > th:nth-child(5)").find(":input").val(0);var h=0,c=0,ct=0,lt=0,l=0,f=0;h=Number($(".legacy-fuelswitching-calculator #CurAnnCostDuctlessASHP").val())/this.options.naturalGasRatePerTherm;c=h*this.options.factorMilesPerlbCO2*this.options.factorLbCO2THERM;ct=h*this.options.factorNatGasToAshp;lt=ct*this.options.factorLbCO2KWH*this.options.factorMilesPerlbCO2;l=ct*this.options.electricRatePerKwh;f=Number($(".legacy-fuelswitching-calculator #CurAnnCostDuctlessASHP").val())-Math.round(l);$(".legacy-fuelswitching-calculator #milesASHP").html(Math.round(c-lt).toString());$(".legacy-fuelswitching-calculator #milesASHPDuct").html(Math.round(c-lt).toString());$(".legacy-fuelswitching-calculator #FutAnnCostDuctlessASHP").val(Math.round(l));$(".legacy-fuelswitching-calculator #FutAnnCostDuctASHP").val(Math.round(l));var at=0,gt=0,vt=0,e=0;at=h*this.options.factorNatGasToGshp;gt=at*this.options.factorLbCO2KWH*this.options.factorMilesPerlbCO2;vt=at*this.options.electricRatePerKwh;e=Number($(".legacy-fuelswitching-calculator #CurAnnCostGeoThermal").val())-Math.round(vt);$(".legacy-fuelswitching-calculator #milesGeothermal").html(Math.round(c-gt).toString());$(".legacy-fuelswitching-calculator #FutAnnCostGeoThermal").val(Math.round(vt));$(".legacy-fuelswitching-calculator #ROICostNatGas").val(0);$(".legacy-fuelswitching-calculator #milesNatGas").html("0")}$(".legacy-fuelswitching-calculator #AnnSavDuctlessASHP").val((Number($(".legacy-fuelswitching-calculator #CurAnnCostDuctlessASHP").val())-Number($(".legacy-fuelswitching-calculator #FutAnnCostDuctlessASHP").val())).toFixed(2));$(".legacy-fuelswitching-calculator #AnnSavCostDuctASHP").val((Number($(".legacy-fuelswitching-calculator #CurAnnCostDuctASHP").val())-Number($(".legacy-fuelswitching-calculator #FutAnnCostDuctASHP").val())).toFixed(2));$(".legacy-fuelswitching-calculator #AnnSavCostGeoThermal").val((Number($(".legacy-fuelswitching-calculator #CurAnnCostGeoThermal").val())-Number($(".legacy-fuelswitching-calculator #FutAnnCostGeoThermal").val())).toFixed(2));$(".legacy-fuelswitching-calculator #AnnSavCostNatGas").val((Number($(".legacy-fuelswitching-calculator #CurAnnCostNatGas").val())-Number($(".legacy-fuelswitching-calculator #FutAnnCostNatGas").val())).toFixed(2));$(".legacy-fuelswitching-calculator #ROIDuctlessASHP").val(Math.round(10*Number($(".legacy-fuelswitching-calculator #ConvCostDuctlessASHP").val())/Number($(".legacy-fuelswitching-calculator #AnnSavDuctlessASHP").val()))/10);$(".legacy-fuelswitching-calculator #ROICostDuctASHP").val(Math.round(10*Number($(".legacy-fuelswitching-calculator #ConvCostDuctASHP").val())/Number($(".legacy-fuelswitching-calculator #AnnSavCostDuctASHP").val()))/10);$(".legacy-fuelswitching-calculator #ROICostGeoThermal").val(Math.round(10*Number($(".legacy-fuelswitching-calculator #ConvCostGeothermal").val())/Number($(".legacy-fuelswitching-calculator #AnnSavCostGeoThermal").val()))/10);this.fuelType==2?$(".legacy-fuelswitching-calculator #ROICostNatGas").val(0):$(".legacy-fuelswitching-calculator #ROICostNatGas").val(Math.round(10*Number($(".legacy-fuelswitching-calculator #ConvCostNatGas").val())/Number($(".legacy-fuelswitching-calculator #AnnSavCostNatGas").val()))/10);$(".legacy-fuelswitching-calculator #milesASHP").attr("style","");$(".legacy-fuelswitching-calculator #Span1").attr("style","");$(".legacy-fuelswitching-calculator #milesASHPDuct").attr("style","");$(".legacy-fuelswitching-calculator #Span3").attr("style","");$(".legacy-fuelswitching-calculator #milesGeothermal").attr("style","");$(".legacy-fuelswitching-calculator #Span4").attr("style","");$(".legacy-fuelswitching-calculator #milesNatGas").attr("style","");$(".legacy-fuelswitching-calculator #Span5").attr("style","");$(".legacy-fuelswitching-calculator #tdmilesASHP").attr("style","");$(".legacy-fuelswitching-calculator #tdmilesASHPDuct").attr("style","");$(".legacy-fuelswitching-calculator #tdmilesGeothermal").attr("style","");$(".legacy-fuelswitching-calculator #tdmilesNatGas").attr("style","");$(".legacy-fuelswitching-calculator #ASHPCar").attr("src","/Static/images/fuelswitching-calculator/car_icon.png");$(".legacy-fuelswitching-calculator #ASHPDlessCar").attr("src","/Static/images/fuelswitching-calculator/car_icon.png");$(".legacy-fuelswitching-calculator #GeothCar").attr("src","/Static/images/fuelswitching-calculator/car_icon.png");$(".legacy-fuelswitching-calculator #NatCar").attr("src","/Static/images/fuelswitching-calculator/car_icon.png");this.fuelSwitch=="heat-pump-btn"&&($(".legacy-fuelswitching-calculator #tdmilesASHP").attr("style","background-color: #39c7cf;"),$(".legacy-fuelswitching-calculator #milesASHP").attr("style","color: white;"),$(".legacy-fuelswitching-calculator #Span1").attr("style","color: white;"),$(".legacy-fuelswitching-calculator #ASHPCar").attr("src","/Static/images/fuelswitching-calculator/car_icon_white.png"),$(".legacy-fuelswitching-calculator #tdmilesASHPDuct").attr("style","background-color: #39c7cf;"),$(".legacy-fuelswitching-calculator #milesASHPDuct").attr("style","color: white;"),$(".legacy-fuelswitching-calculator #Span3").attr("style","color: white;"),$(".legacy-fuelswitching-calculator #ASHPDlessCar").attr("src","/Static/images/fuelswitching-calculator/car_icon_white.png"));this.fuelSwitch=="geo-btn"&&($(".legacy-fuelswitching-calculator #tdmilesGeothermal").attr("style","background-color: #39c7cf;"),$(".legacy-fuelswitching-calculator #milesGeothermal").attr("style","color: white;"),$(".legacy-fuelswitching-calculator #Span4").attr("style","color: white;"),$(".legacy-fuelswitching-calculator #GeothCar").attr("src","/Static/images/fuelswitching-calculator/car_icon_white.png"));this.fuelSwitch=="gas-btn"&&($(".legacy-fuelswitching-calculator #tdmilesNatGas").attr("style","background-color: #39c7cf;"),$(".legacy-fuelswitching-calculator #milesNatGas").attr("style","color: white;"),$(".legacy-fuelswitching-calculator #Span5").attr("style","color: white;"),$(".legacy-fuelswitching-calculator #NatCar").attr("src","/Static/images/fuelswitching-calculator/car_icon_white.png"))},n.prototype.setDefaultFuelSwitchData=function(){$(".legacy-fuelswitching-calculator #UpCostDuctlessASHP").val(this.options.upfrontCostDuctlessAshp);$(".legacy-fuelswitching-calculator #UpCostDuctASHP").val(this.options.upfrontCostDuctedAshp);$(".legacy-fuelswitching-calculator #UpCostGeothermal").val(this.options.upfrontCostGshp);this.SetUpFrontCosts();$(".legacy-fuelswitching-calculator #NysDuctlessASHP").val(this.options.nyserdaDuctlessAshp);$(".legacy-fuelswitching-calculator #NysDuctASHP").val(this.options.nyserdaDuctedAshp);$(".legacy-fuelswitching-calculator #NysGeothermal").val(this.options.nyserdaGshp);this.activeboiler?$(".legacy-fuelswitching-calculator #NysNatGas").val(this.options.nyserdaNatGasBoiler):$(".legacy-fuelswitching-calculator #NysNatGas").val(this.options.nyserdaNatGasFurnace);this.fuelType=parseInt($(".legacy-fuelswitching-calculator input[name=fuel-method]:checked").val());(this.fuelType==3||this.fuelType==4)&&($(".legacy-fuelswitching-calculator #ChIncDuctASHP").val(this.options.chIncentiveDuctedAshpFuelOrPropane),$(".legacy-fuelswitching-calculator #ChIncDuctlessASHP").val(this.options.chIncentiveDuctlessAshpFuelOrPropane));this.fuelType==2&&($(".legacy-fuelswitching-calculator #ChIncDuctASHP").val(this.options.chIncentiveDuctedAshpNatGas),$(".legacy-fuelswitching-calculator #ChIncDuctlessASHP").val(this.options.chIncentiveDuctlessAshpNatGas));this.fuelType==1&&($(".legacy-fuelswitching-calculator #ChIncDuctASHP").val(this.options.chIncentiveDuctedAshpElectric),$(".legacy-fuelswitching-calculator #ChIncDuctlessASHP").val(this.options.chIncentiveDuctlessAshpElectric));$(".legacy-fuelswitching-calculator #ChIncGeothermal").val(this.options.chIncentiveGshp);this.activeboiler?$(".legacy-fuelswitching-calculator #ChIncNatGas").val(this.options.chIncentiveNatGasBoiler):$(".legacy-fuelswitching-calculator #ChIncNatGas").val(this.options.chIncentiveNatGasFurnace);$(".legacy-fuelswitching-calculator #FedTxDuctlessASHP").val(this.options.federalTaxDuctlessAshp);$(".legacy-fuelswitching-calculator #FedTxDuctASHP").val(this.options.federalTaxDuctedAshp);$(".legacy-fuelswitching-calculator #FedTxGeothermal").val(this.options.fedTaxCreditPercentGshp*this.options.upfrontCostGshp);this.activeboiler?$(".legacy-fuelswitching-calculator #FedTxNatGas").val(this.options.federalTaxNatGasBoiler):$(".legacy-fuelswitching-calculator #FedTxNatGas").val(this.options.federalTaxNatGasFurnace);$(".legacy-fuelswitching-calculator #RateImpDuctlessASHP").val(this.options.rateImpactCreditDuctlessAshp);$(".legacy-fuelswitching-calculator #RateImpDuctASHP").val(this.options.rateImpactCreditDuctedAshp);$(".legacy-fuelswitching-calculator #RateImpGeothermal").val(this.options.rateImpactCreditGshp*this.options.rateImpactCreditMultiplierGshp);this.activeboiler?$(".legacy-fuelswitching-calculator #RateImpNatGas").val(this.options.rateImpactCreditNatGasBoiler):$(".legacy-fuelswitching-calculator #RateImpNatGas").val(this.options.rateImpactCreditNatGasFurnace)},n.prototype.IsNumberKey=function(n){var t=n.which?n.which:event.keyCode;return t>31&&(t<48||t>57)?!1:!0},n.prototype.IsDecimalKey=function(n){var t=n.which?n.which:event.keyCode;return t>31&&t!=46&&(t<48||t>57)?!1:!0},n.prototype.Question3Enable=function(n){var t=parseInt(n.value);this.ClearHighlighting();$(".legacy-fuelswitching-calculator #boiler-btn").attr("style","background-color: #138496;margin-bottom: 10px;");$(".legacy-fuelswitching-calculator #furnace-btn").attr("style","background-color: #138496;margin-bottom: 10px;");this.SetColumnWidth();$(".legacy-fuelswitching-calculator #btnCalculate").prop("disabled",!0);t==1||t==2?(t==2?($(".legacy-fuelswitching-calculator #gas-btn").attr("style","background-color: #d2d2d2;border-color:#d2d2d2;margin-bottom: 10px;"),$(".legacy-fuelswitching-calculator #gas-btn").prop("disabled",!0),$(".legacy-fuelswitching-calculator table tr > td:nth-child(5), table tr > th:nth-child(5)").find(":input").prop("disabled",!0),$(".legacy-fuelswitching-calculator table tr > td:nth-child(5), table tr > th:nth-child(5)").find(":input").val(0),$(".legacy-fuelswitching-calculator #lblSpend").html("Spend on Natural Gas bill?"),$(".legacy-fuelswitching-calculator #lblbilerfurnace").html(" Do you have a boiler or a furnace?")):($(".legacy-fuelswitching-calculator #gas-btn").attr("style","background-color: #138496;border-color:#17a2b8;margin-bottom: 10px;"),$(".legacy-fuelswitching-calculator #gas-btn").prop("disabled",!1),$(".legacy-fuelswitching-calculator table tr > td:nth-child(5), .legacy-fuelswitching-calculator table tr > th:nth-child(5)").find(":input").prop("disabled",!0),$(".legacy-fuelswitching-calculator #UpCostNatGas").prop("disabled",!1),$(".legacy-fuelswitching-calculator #lblSpend").html("Spend on Electric bill?"),$(".legacy-fuelswitching-calculator #lblbilerfurnace").html(" Would you like a boiler or a furnace?"),this.furBoilerFlag&&this.SetUpFrontCosts()),this.setFuelRate(n),document.getElementById("input-gal").value="",$(".legacy-fuelswitching-calculator #option-1").removeClass("d-none"),$(".legacy-fuelswitching-calculator #option-2").addClass("d-none")):($(".legacy-fuelswitching-calculator #gas-btn").attr("style","background-color: #138496;border-color:#17a2b8;margin-bottom: 10px;"),$(".legacy-fuelswitching-calculator #option-2").removeClass("d-none"),$(".legacy-fuelswitching-calculator #option-1").addClass("d-none"),t==3?($(".legacy-fuelswitching-calculator #lblSpend").html("Spend on Propane bill?"),$(".legacy-fuelswitching-calculator #lblbilerfurnace").html(" Do you have a boiler or a furnace?")):($(".legacy-fuelswitching-calculator #lblSpend").html("Spend on Fuel Oil bill?"),$(".legacy-fuelswitching-calculator #lblbilerfurnace").html(" Do you have a boiler or a furnace?")),$(".legacy-fuelswitching-calculator #gas-btn").prop("disabled",!1),$(".legacy-fuelswitching-calculator #UpCostNatGas").prop("disabled",!1),this.furBoilerFlag&&this.SetUpFrontCosts(),this.setFuelRate(n),$(".legacy-fuelswitching-calculator #input-dollars").val(""))},n.prototype.SetColumnWidth=function(){$(".legacy-fuelswitching-calculator #ColASHP").attr("style","background-color: rgb(17, 122, 139);vertical-align:middle;width:18%;");$(".legacy-fuelswitching-calculator #ColGSHP").attr("style","background-color: rgb(17, 122, 139);vertical-align:middle;width:18%;");$(".legacy-fuelswitching-calculator #ColGeothermal").attr("style","background-color: rgb(17, 122, 139);vertical-align:middle;width:18%;");$(".legacy-fuelswitching-calculator #ColNatGas").attr("style","background-color: rgb(17, 122, 139);vertical-align:middle;width:18%;")},n.prototype.setFuelRate=function(n){n.id=="oil"?($(".legacy-fuelswitching-calculator #input-price").val(this.options.fuelOilRatePerGallon),$(".legacy-fuelswitching-calculator #input-gal").val(this.numbrOfGalPerYearOil)):n.id=="propane"?($(".legacy-fuelswitching-calculator #input-price").val(this.options.propaneRatePerGallon),$(".legacy-fuelswitching-calculator #input-gal").val(this.numbrOfGalPerYearPropane)):$(".legacy-fuelswitching-calculator #input-price").val("")},n.prototype.setFuelFreq=function(n){this.fuelFreq="";this.fuelFreqFlag=!0;n.id=="btnmonthly"?(this.fuelFreq="monthly",$(".legacy-fuelswitching-calculator #btnmonthly").attr("style","background-color: #39c7cf;margin-bottom: 10px;"),$(".legacy-fuelswitching-calculator #btnyearly").attr("style","background-color: #138496;margin-bottom: 10px;")):n.id=="btnyearly"?(this.fuelFreq="yearly",$(".legacy-fuelswitching-calculator #btnyearly").attr("style","background-color: #39c7cf;margin-bottom: 10px;"),$(".legacy-fuelswitching-calculator #btnmonthly").attr("style","background-color: #138496;margin-bottom: 10px;")):this.fuelFreq=""},n.prototype.EnableDisableCalculate=function(){this.fuelType=parseInt($(".legacy-fuelswitching-calculator input[name=fuel-method]:checked").val());this.fuelSwitchClicked==!1||Number($(".legacy-fuelswitching-calculator #input-dollars").val())==0||this.boilerFurClicked==!1||Number($(".legacy-fuelswitching-calculator #input-price").val())==0||$(".legacy-fuelswitching-calculator #input-price").val()==""||Number($(".legacy-fuelswitching-calculator #input-gal").val())==0||$(".legacy-fuelswitching-calculator #input-gal").val()==""?($(".legacy-fuelswitching-calculator #btnCalculate").prop("disabled",!0),(Number($(".legacy-fuelswitching-calculator #input-dollars").val())==0||$(".legacy-fuelswitching-calculator #input-dollars").val()=="")&&(this.fuelType==1||this.fuelType==2)&&this.fuelFreqFlag==!1?(alert("Please provide spend on heating"),$(".legacy-fuelswitching-calculator #furnace-btn").attr("style","background-color: #138496;margin-bottom: 10px;"),$(".legacy-fuelswitching-calculator #boiler-btn").attr("style","background-color: #138496;margin-bottom: 10px;"),$(".legacy-fuelswitching-calculator #btnCalculate").prop("disabled",!0)):$(".legacy-fuelswitching-calculator #btnCalculate").prop("disabled",!1),this.fuelSwitchClicked==!1&&(alert("Please select Switch to Fuel"),$(".legacy-fuelswitching-calculator #furnace-btn").attr("style","background-color: #138496;margin-bottom: 10px;"),$(".legacy-fuelswitching-calculator #boiler-btn").attr("style","background-color: #138496;margin-bottom: 10px;"),$(".legacy-fuelswitching-calculator #btnCalculate").prop("disabled",!0)),(this.fuelType==1||this.fuelType==2)&&(this.fuelFreqFlag==!1||this.fuelSwitchClicked==!1||Number($(".legacy-fuelswitching-calculator #input-dollars").val())==0)&&(alert("Please select Fuel Frequency and Price"),$(".legacy-fuelswitching-calculator #furnace-btn").attr("style","background-color: #138496;margin-bottom: 10px;"),$(".legacy-fuelswitching-calculator #boiler-btn").attr("style","background-color: #138496;margin-bottom: 10px;"),$(".legacy-fuelswitching-calculator #btnCalculate").prop("disabled",!0)),(Number($(".legacy-fuelswitching-calculator #input-price").val())==0||$(".legacy-fuelswitching-calculator #input-price").val()==""||Number($(".legacy-fuelswitching-calculator #input-gal").val())==0||$(".legacy-fuelswitching-calculator #input-gal").val()=="")&&(this.fuelType==3||this.fuelType==4)&&(alert("Please provide Gallons and Price values"),$(".legacy-fuelswitching-calculator #furnace-btn").attr("style","background-color: #138496;margin-bottom: 10px;"),$(".legacy-fuelswitching-calculator #boiler-btn").attr("style","background-color: #138496;margin-bottom: 10px;"),$(".legacy-fuelswitching-calculator #btnCalculate").prop("disabled",!0))):$(".legacy-fuelswitching-calculator #btnCalculate").prop("disabled",!1)},n.prototype.SetSwitch=function(n){var t=$(".legacy-fuelswitching-calculator input[name=fuel-method]:checked").val(),i;this.ClearHighlighting();this.SetColumnWidth();n.id=="heat-pump-btn"?(i=jQuery("table"),this.fuelSwitch="heat-pump-btn",this.cleanHeatingSource="Air Source Heat Pump",this.fuelSwitchClicked=!0,$(".legacy-fuelswitching-calculator #heat-pump-btn").attr("style","background-color: #39c7cf;margin-bottom: 10px;"),$(".legacy-fuelswitching-calculator #geo-btn").attr("style","background-color: #138496;margin-bottom: 10px;"),t==2?$(".legacy-fuelswitching-calculator #gas-btn").attr("style","background-color: #d2d2d2;border-color:#d2d2d2;margin-bottom: 10px;"):$(".legacy-fuelswitching-calculator #gas-btn").attr("style","background-color: #138496;margin-bottom: 10px;")):n.id=="geo-btn"?(i=jQuery("table"),this.fuelSwitch="geo-btn",this.cleanHeatingSource="Geothermal",this.fuelSwitchClicked=!0,$(".legacy-fuelswitching-calculator #geo-btn").attr("style","background-color: #39c7cf;margin-bottom: 10px;"),$(".legacy-fuelswitching-calculator #heat-pump-btn").attr("style","background-color: #138496;margin-bottom: 10px;"),t==2?$(".legacy-fuelswitching-calculator #gas-btn").attr("style","background-color: #d2d2d2;border-color:#d2d2d2;margin-bottom: 10px;"):$(".legacy-fuelswitching-calculator #gas-btn").attr("style","background-color: #138496;margin-bottom: 10px;")):n.id=="gas-btn"&&(this.fuelSwitch="gas-btn",this.cleanHeatingSource="Natural Gas",this.fuelSwitchClicked=!0,$(".legacy-fuelswitching-calculator #gas-btn").attr("style","background-color: #39c7cf;margin-bottom: 10px;"),$(".legacy-fuelswitching-calculator #heat-pump-btn").attr("style","background-color: #138496;margin-bottom: 10px;"),$(".legacy-fuelswitching-calculator #geo-btn").attr("style","background-color: #138496;margin-bottom: 10px;"))},n.prototype.ApplyHighlighting=function(n){var t=$(".legacy-fuelswitching-calculator input[name=fuel-method]:checked").val();this.ClearHighlighting();$(".legacy-fuelswitching-calculator #ASHPLearnMore").attr("style","background-color: rgb(17, 122, 139);");$(".legacy-fuelswitching-calculator #ASHPDuctedLearnMore").attr("style","background-color: rgb(17, 122, 139);");$(".legacy-fuelswitching-calculator #GSHPLearnMore").attr("style","background-color: rgb(17, 122, 139);");$(".legacy-fuelswitching-calculator #NatGasLearnMore").attr("style","background-color: rgb(17, 122, 139);");this.SetColumnWidth();n=="heat-pump-btn"&&($(".legacy-fuelswitching-calculator table tr > td:nth-child(2), .legacy-fuelswitching-calculator table tr > th:nth-child(2)").attr("style","background-color:#39c7cf;"),$(".legacy-fuelswitching-calculator table tr > td:nth-child(3), .legacy-fuelswitching-calculator table tr > th:nth-child(3)").attr("style","background-color:#39c7cf;"),$(".legacy-fuelswitching-calculator #heat-pump-btn").attr("style","background-color: #39c7cf;margin-bottom: 10px;"),$(".legacy-fuelswitching-calculator #ASHPLearnMore").attr("style","background-color: rgb(17, 122, 139);"),$(".legacy-fuelswitching-calculator #ASHPDuctedLearnMore").attr("style","background-color: rgb(17, 122, 139);"),$(".legacy-fuelswitching-calculator #ColASHP").attr("style","background-color: rgb(17, 122, 139);vertical-align:middle;width:18%;"),$(".legacy-fuelswitching-calculator #ColGSHP").attr("style","background-color: rgb(17, 122, 139);vertical-align:middle;width:18%;"));n=="geo-btn"&&($(".legacy-fuelswitching-calculator table tr > td:nth-child(4), .legacy-fuelswitching-calculator table tr > th:nth-child(4)").attr("style","background-color:#39c7cf;vertical-align:middle;"),$(".legacy-fuelswitching-calculator #geo-btn").attr("style","background-color: #39c7cf;margin-bottom: 10px;"),$(".legacy-fuelswitching-calculator #GSHPLearnMore").attr("style","background-color: rgb(17, 122, 139);"),$(".legacy-fuelswitching-calculator #ColGeothermal").attr("style","background-color: rgb(17, 122, 139);vertical-align:middle;width:18%;"));n=="gas-btn"&&($(".legacy-fuelswitching-calculator table tr > td:nth-child(5), .legacy-fuelswitching-calculator table tr > th:nth-child(5)").attr("style","background-color:#39c7cf;vertical-align:middle;"),$(".legacy-fuelswitching-calculator #gas-btn").attr("style","background-color: #39c7cf;margin-bottom: 10px;"),$(".legacy-fuelswitching-calculator #NatGasLearnMore").attr("style","background-color: rgb(17, 122, 139);"),$(".legacy-fuelswitching-calculator #ColNatGas").attr("style","background-color: rgb(17, 122, 139);vertical-align:middle;width:18%;"))},n.prototype.ClearHighlighting=function(){$(".legacy-fuelswitching-calculator #heat-pump-btn").attr("style","background-color: #138496;margin-bottom: 10px;");$(".legacy-fuelswitching-calculator #geo-btn").attr("style","background-color: #138496;margin-bottom: 10px;");$(".legacy-fuelswitching-calculator #gas-btn").attr("style","background-color: #138496;margin-bottom: 10px;");$(".legacy-fuelswitching-calculator table tr > td:nth-child(2), .legacy-fuelswitching-calculator table tr > th:nth-child(2)").attr("style","background-color:none;");$(".legacy-fuelswitching-calculator table tr > td:nth-child(3), .legacy-fuelswitching-calculator table tr > th:nth-child(3)").attr("style","background-color:none;");$(".legacy-fuelswitching-calculator table tr > td:nth-child(4), .legacy-fuelswitching-calculator table tr > th:nth-child(4)").attr("style","vertical-align:middle;");$(".legacy-fuelswitching-calculator table tr > td:nth-child(5), .legacy-fuelswitching-calculator table tr > th:nth-child(5)").attr("style","vertical-align:middle;");$(".legacy-fuelswitching-calculator #milesASHP").attr("style","");$(".legacy-fuelswitching-calculator #Span1").attr("style","");$(".legacy-fuelswitching-calculator #milesASHPDuct").attr("style","");$(".legacy-fuelswitching-calculator #Span3").attr("style","");$(".legacy-fuelswitching-calculator #milesGeothermal").attr("style","");$(".legacy-fuelswitching-calculator #Span4").attr("style","");$(".legacy-fuelswitching-calculator #milesNatGas").attr("style","");$(".legacy-fuelswitching-calculator #Span5").attr("style","");$(".legacy-fuelswitching-calculator #ASHPCar").attr("src","/Static/images/fuelswitching-calculator/car_icon.png");$(".legacy-fuelswitching-calculator #ASHPDlessCar").attr("src","/Static/images/fuelswitching-calculator/car_icon.png");$(".legacy-fuelswitching-calculator #GeothCar").attr("src","/Static/images/fuelswitching-calculator/car_icon.png");$(".legacy-fuelswitching-calculator #NatCar").attr("src","/Static/images/fuelswitching-calculator/car_icon.png")},n.prototype.SetBoilerOrFurnace=function(n){this.furBoilerFlag=!0;this.boilerFurClicked=!0;n.id=="boiler-btn"?($(".legacy-fuelswitching-calculator #heater-pic").attr("src","/Static/images/fuelswitching-calculator/boiler.png"),$(".legacy-fuelswitching-calculator #heater-pic").attr("alt","Boiler"),this.activeboiler=!0,this.boilerOrFurnaceOption="Boiler",$(".legacy-fuelswitching-calculator #boiler-btn").attr("style","background-color: #39c7cf;margin-bottom: 10px;"),$(".legacy-fuelswitching-calculator #furnace-btn").attr("style","background-color: #138496;margin-bottom: 10px;")):n.id=="furnace-btn"&&($(".legacy-fuelswitching-calculator #furnace-btn").attr("style","background-color: #39c7cf;margin-bottom: 10px;"),$(".legacy-fuelswitching-calculator #boiler-btn").attr("style","background-color: #138496;margin-bottom: 10px;"),$(".legacy-fuelswitching-calculator #heater-pic").attr("src","/Static/images/fuelswitching-calculator/furnace.png"),$(".legacy-fuelswitching-calculator #heater-pic").attr("alt","Furnace"),this.activeboiler=!1,this.boilerOrFurnaceOption="Furnace");this.EnableDisableCalculate()},n}();t["default"]=i});define("components/manage-accounts",["require","exports","sortablejs","services/users-service"],function(n,t,i,r){function u(){var n=new r["default"];$(".sortable-accounts").each(function(t,r){var u=i.create(r,{ghostClass:"sortable-ghost",handle:".account__reorder-button",onUpdate:function(t){var r=$(t.item).first().data("account"),i;t.newIndex!=0&&(i=$($(t.target).children()[t.newIndex-1]).first().data("account"));$(".accounts-manage").waitMe({effect:"rotation"});$(".reorder-failed").addClass("d-none");n.reorderAccount(r,i,function(){$(".accounts-manage").waitMe("hide")},function(){$(".reorder-failed").removeClass("d-none");$(".accounts-manage").waitMe("hide")})}})})}Object.defineProperty(t,"__esModule",{value:!0});t["default"]=u});define("components/payment-agreement-alert",["require","exports","utils/cookies"],function(n,t,i){function r(){var t=$("#pa-alert").data("pa-date-offered"),n,r;t&&(n="pa-alert-"+t.toString(),r=i["default"].get(n),r||$("#pa-alert").removeClass("d-none"),$("#pa-alert-dismiss").click(function(){var r=i["default"].get(n),t;r||(t=new Date,t.setFullYear(9999),i["default"].set(n,"dismiss",t))}))}Object.defineProperty(t,"__esModule",{value:!0});t["default"]=r});define("components/suppliers",["require","exports","utils/query-string"],function(n,t,i){Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function n(n){$(document).ready(function(){$("#"+n).bind("change",function(){$("body").waitMe({effect:"rotation"});var n=$(this).children("option:selected").val();window.location.href=i["default"].UpdateQueryString("serviceProviderId",n,window.location.href)})})}return n}();t["default"]=r});define("components/thermostat-calculator",["require","exports"],function(n,t){Object.defineProperty(t,"__esModule",{value:!0});var i=.33,r=function(){function n(n){var t=this;this.options=n;$(".thermostat-calculator #qtyNoOfBulbs").prop("disabled",!0);$(".thermostat-calculator #qtyNoOfHours").prop("disabled",!0);$(".thermostat-calculator #btnYes").click(function(){$(".thermostat-calculator #btnYes").attr("style","background-color: #138496;");$(".thermostat-calculator #btnNo").attr("style","background-color: #17a2b8;");t.isCentralAirActive=!0;t.EnableDisableCalculate();$(".thermostat-calculator #inputWinterHome").prop("disabled",!1);$(".thermostat-calculator #inputWinterAway").prop("disabled",!1);$(".thermostat-calculator #inputWinterSleep").prop("disabled",!1);$(".thermostat-calculator #inputSummerHome").prop("disabled",!1);$(".thermostat-calculator #inputSummerAway").prop("disabled",!1);$(".thermostat-calculator #inputSummerSleep").prop("disabled",!1);$(".thermostat-calculator #inputSummerHome").val(70);$(".thermostat-calculator #inputSummerAway").val(70);$(".thermostat-calculator #inputSummerSleep").val(70)});$(".thermostat-calculator #btnNo").click(function(){$(".thermostat-calculator #btnNo").attr("style","background-color: #138496;");$(".thermostat-calculator #btnYes").attr("style","background-color: #17a2b8;");t.isCentralAirActive=!1;t.EnableDisableCalculate();$(".thermostat-calculator #inputWinterHome").prop("disabled",!1);$(".thermostat-calculator #inputWinterAway").prop("disabled",!1);$(".thermostat-calculator #inputWinterSleep").prop("disabled",!1);$(".thermostat-calculator #inputSummerHome").prop("disabled",!0);$(".thermostat-calculator #inputSummerAway").prop("disabled",!0);$(".thermostat-calculator #inputSummerSleep").prop("disabled",!0);$(".thermostat-calculator #inputSummerHome").prop("required",!1);$(".thermostat-calculator #inputSummerAway").prop("required",!1);$(".thermostat-calculator #inputSummerSleep").prop("required",!1);$(".thermostat-calculator #inputSummerHome").val("-");$(".thermostat-calculator #inputSummerAway").val("-");$(".thermostat-calculator #inputSummerSleep").val("-")});$(".thermostat-calculator #btnCalculate").click(function(){document.getElementById("cool-text").innerHTML="-";document.getElementById("yearly-dollars").innerHTML="-";Number($(".thermostat-calculator #inputWinterHome").val())>100||Number($(".thermostat-calculator #inputWinterHome").val())<0||$(".thermostat-calculator #inputWinterHome").val()==""||Number($(".thermostat-calculator #inputWinterAway").val())>100||Number($(".thermostat-calculator #inputWinterAway").val())<0||$(".thermostat-calculator #inputWinterAway").val()==""||Number($(".thermostat-calculator #inputWinterSleep").val()>100)||Number($(".thermostat-calculator #inputWinterSleep").val()<0)||$(".thermostat-calculator #inputWinterSleep").val()==""||Number($(".thermostat-calculator #inputSummerHome").val())>100&&$(".thermostat-calculator #inputSummerHome").val()!=""||Number($(".thermostat-calculator #inputSummerHome").val())<0||t.isCentralAirActive&&$(".thermostat-calculator #inputSummerHome").val()==""||Number($(".thermostat-calculator #inputSummerAway").val())>100&&$(".thermostat-calculator #inputSummerAway").val()!=""||Number($(".thermostat-calculator #inputSummerAway").val())<0||t.isCentralAirActive&&$(".thermostat-calculator #inputSummerAway").val()==""||Number($(".thermostat-calculator #inputSummerSleep").val()>100&&$(".thermostat-calculator #inputSummerSleep").val()!="")||Number($(".thermostat-calculator #inputSummerSleep").val())<0||t.isCentralAirActive&&$(".thermostat-calculator #inputSummerSleep").val()==""?($(".thermostat-calculator #winterHomeRecom").html("-"),$(".thermostat-calculator #winterAwayRecom").html("-"),$(".thermostat-calculator #winterSleepRecom").html("-"),$(".thermostat-calculator #summerHomeRecom").html("-"),$(".thermostat-calculator #summerAwayRecom").html("-"),$(".thermostat-calculator #summerSleepRecom").html("-"),$(".thermostat-calculator #heat-text").html("-"),$(".thermostat-calculator #cool-text").html("-"),$(".thermostat-calculator #yearly-dollars").html("-"),$(".thermostat-calculator #miles").html("-"),alert($("#CurrentBlock_EnterTemperatureBetween0To100").val().toString())):($(".thermostat-calculator #btnCalculate").html($("#CurrentBlock_ReCalculate").val().toString()),$(".thermostat-calculator #winterHomeRecom").html(t.options.homeHeat.toString()),$(".thermostat-calculator #winterAwayRecom").html(t.options.leaveHeat.toString()),$(".thermostat-calculator #winterSleepRecom").html(t.options.sleepHeat.toString()),t.isCentralAirActive?($(".thermostat-calculator #summerHomeRecom").html(t.options.homeCool.toString()),$(".thermostat-calculator #summerAwayRecom").html(t.options.leaveCool.toString()),$(".thermostat-calculator #summerSleepRecom").html(t.options.sleepCool.toString()),t.HeatingAndCoolingCalc()):($(".thermostat-calculator #summerHomeRecom").html("-"),$(".thermostat-calculator #summerAwayRecom").html("-"),$(".thermostat-calculator #summerSleepRecom").html("-"),t.HeatingCalc(),$(".thermostat-calculator #cool-text").html("")))})}return n.prototype.EnableDisableCalculate=function(){var n=document.getElementById("dropdownFuel").value;n==""?$(".thermostat-calculator #btnCalculate").prop("disabled",!0):($(".thermostat-calculator #btnCalculate").prop("disabled",!1),$(".thermostat-calculator #btnCalculate").attr("style","background-color: #17A2BE;"))},n.prototype.HeatingAndCoolingCalc=function(){var n=this.GetPriceSetpoint(),u=this.HeatingDegreesToDollars(n),f=this.CoolingDegreesToDollars(),r=u+f,e=document.getElementById("dropdownFuel"),t=e.options[e.selectedIndex].text;t=="Electric"&&(t="Electricity");document.getElementById("heat-text").innerHTML=u<=0?$("#CurrentBlock_HeatingDegreesDollarsLessThan0").val().toString().replace("{0}",n.toFixed(2)).replace("{1}",t):$("#CurrentBlock_HeatingDegreesDollarsMoreThan0").val().toString().replace("{0}",Math.round(i*n*this.options.heatingHours).toString()).replace("{1}",Math.round(n*this.options.heatingHours).toString());document.getElementById("cool-text").innerHTML=f<=0?$("#CurrentBlock_CoolingDegreesDollarsLessThan0").val().toString().replace("{0}",this.options.centralAirSetPointChange.toFixed(2)).replace("{1}",t):$("#CurrentBlock_CoolingDegreesDollarsMoreThan0").val().toString().replace("{0}",Math.round(i*this.options.centralAirSetPointChange*this.options.coolingHours).toString()).replace("{1}",Math.round(this.options.centralAirSetPointChange*this.options.coolingHours).toString());r>0&&($(".thermostat-calculator #yearly-dollars").html(Math.round(r).toString()),$(".thermostat-calculator #yearly-dollars").attr("style","font-size:40px;font-weight: bold;"));this.MilesCalculation(r/this.options.electricKwhCost)},n.prototype.HeatingCalc=function(){var n=this.GetPriceSetpoint(),t=this.HeatingDegreesToDollars(n),u=document.getElementById("dropdownFuel"),r=u.options[u.selectedIndex].text;r=="Electric"&&(r="Electricity");$(".thermostat-calculator #yearly-dollars").html("-");t<=0?document.getElementById("heat-text").innerHTML=$("#CurrentBlock_HeatingDegreesSelectedFuelText").val().toString().replace("{0}",n.toFixed(2)).replace("{1}",r):(document.getElementById("heat-text").innerHTML=$("#CurrentBlock_HeatingDegreesHeatingHours").val().toString().replace("{0}",Math.round(i*n*this.options.heatingHours).toString()).replace("{1}",Math.round(n*this.options.heatingHours).toString()),$(".thermostat-calculator #yearly-dollars").html(Math.round(t).toString()),$(".thermostat-calculator #yearly-dollars").attr("style","font-size:40px;font-weight: bold;"));this.MilesCalculation(t/this.options.electricKwhCost)},n.prototype.HeatingDegreesToDollars=function(n){var t=parseInt($(".thermostat-calculator #inputWinterHome").val()),i=parseInt($(".thermostat-calculator #inputWinterAway").val()),r=parseInt($(".thermostat-calculator #inputWinterSleep").val()),u=8*(t-this.options.homeHeat)+8*(i-this.options.leaveHeat)+8*(r-this.options.sleepHeat),f=u*n,e=f/24;return Math.max(0,e*this.options.heatingHours)},n.prototype.CoolingDegreesToDollars=function(){var n=parseInt($(".thermostat-calculator #inputSummerHome").val()),t=parseInt($(".thermostat-calculator #inputSummerAway").val()),i=parseInt($(".thermostat-calculator #inputSummerSleep").val()),r=8*(this.options.homeCool-n)+8*(this.options.leaveCool-t)+8*(this.options.sleepCool-i),u=r*this.options.centralAirSetPointChange,f=u/24;return Math.max(0,f*this.options.coolingHours)},n.prototype.GetPriceSetpoint=function(){var n=document.getElementById("dropdownFuel").value;return n=="propane"?this.options.propaneSetPointChange:n=="fuel"?this.options.fuelOilSetPointChange:n=="electric"?this.options.electricSetPointChange:this.options.naturalGasSetPointChange},n.prototype.MilesCalculation=function(n){var t=Math.round(n*(this.options.emissionsFactor/this.options.milesDrivenAvgCar));$(".thermostat-calculator #miles").html(t.toString());$(".thermostat-calculator #miles").attr("style","font-size:40px;font-weight: bold;")},n}();t["default"]=r});define("components/timeofuserate-calculator",["require","exports"],function(n,t){Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function n(n){var t=this;this.options=n;$(".timeofuserate-calculator #electric-tou, .timeofuserate-calculator #fuel-oil-tou, .timeofuserate-calculator #natural-gas-tou, .timeofuserate-calculator #propane-tou").click(function(n){t.HouseText(n.target)});$(".timeofuserate-calculator #electricRange").mousemove(function(){t.ElectricSlide()});$(".timeofuserate-calculator #central-air, .timeofuserate-calculator #EV-Charger, .timeofuserate-calculator #Hot-tub, .timeofuserate-calculator #dehum").click(function(){t.UncheckNoneOption()});$(".timeofuserate-calculator #None").click(function(){t.UncheckOtherProgOptions()});$(".timeofuserate-calculator #btnCalculate").click(function(){t.CalculateTouDetails()})}return n.prototype.CalculateTouDetails=function(){var n={},t,i,r;n.monthlyKwhUsage=Number($(".timeofuserate-calculator #electricRange").val());n.primaryHeatingFuel=$("input[name=fuel-method]:checked").val().toString();n.hasEsco=$("input[name=alternate-supplier]:checked").val().toString()=="yes";t=this.GetCheckedBoxes("controllable-app");i=this.GetCheckedBoxes("programmable-app");t==null||i==null?alert($("#CurrentBlock_SelectedOneControllableProgrammableApp").val().toString()):(n.controllableApp=this.GetArrayListApps(t),n.programmableApp=this.GetArrayListApps(i),r=this,$.ajax({type:"POST",url:"/api/calculators/time-of-use-rate",data:__assign({__RequestVerificationToken:$('[name="__RequestVerificationToken"]').last().val().toString()},n),dataType:"json",success:function(t){t.errorMsg==null?r.DisplayTouResults(t.potentialSavings,t.isGoodFit,n):alert($("#CurrentBlock_CalculationsAreUnavailable").val().toString())},error:function(){alert($("#CurrentBlock_CalculationsAreUnavailable").val().toString())}}))},n.prototype.DisplayTouResults=function(n,t,i){$(".timeofuserate-calculator #btnCalculate").val("Re-Calculate");t==!0?($(".timeofuserate-calculator #tououtputboxGoodFit").attr("style","visibility:visible;"),$(".timeofuserate-calculator #divDisclaimer").attr("style","visibility:visible;"),$(".timeofuserate-calculator #tououtputboxBadFit").attr("style","display: none;"),i.controllableApp!==null?$(".timeofuserate-calculator #controllable-text").html($("#CurrentBlock_ShiftUsageOfOutsidePeakUsageHours").val().toString().replace("{0}",i.controllableApp)):$(".timeofuserate-calculator #controllable-text").html($("#CurrentBlock_ShiftControllableAppliances").val().toString()),i.programmableApp!==null&&($(".timeofuserate-calculator #None").is(":checked")?$(".timeofuserate-calculator #programmable-text").attr("style","display:none;"):($(".timeofuserate-calculator #programmable-text").html($("#CurrentBlock_ReduceUsageDuringPeakHours").val().toString().replace("{0}",i.programmableApp)),$(".timeofuserate-calculator #programmable-text").attr("style","visibility:visible;"))),$(".timeofuserate-calculator #estimates").html($("#CurrentBlock_PerYear").val().toString().replace("{0}",Math.round(n).toString()))):($(".timeofuserate-calculator #tououtputboxGoodFit").attr("style","display:none;"),$(".timeofuserate-calculator #tououtputboxBadFit").attr("style","visibility:visible;"),$(".timeofuserate-calculator #divDisclaimer").attr("style","visibility:visible;"))},n.prototype.HouseText=function(n){n.id=="electric-tou"?($(".timeofuserate-calculator #electricRangeOutput").html("1300"),document.getElementById("electricRange").value="1300",$(".timeofuserate-calculator #house-text").html($("#CurrentBlock_AverageResidentialHeat1300kWh").val().toString())):($(".timeofuserate-calculator #electricRangeOutput").html("650"),$(".timeofuserate-calculator #house-text").html($("#CurrentBlock_AverageResidentialHeat650kWh").val().toString()),document.getElementById("electricRange").value="650")},n.prototype.ElectricSlide=function(){var n=$(".timeofuserate-calculator #electricRange"),t=$(".timeofuserate-calculator #electricRangeOutput");t.html(n.val().toString());$(".timeofuserate-calculator #house").attr("src","/Static/images/timeofuserate-calculator/medium.png")},n.prototype.UncheckNoneOption=function(){($(".timeofuserate-calculator #Hot-tub").is(":checked")||$(".timeofuserate-calculator #EV-Charger").is(":checked")||$(".timeofuserate-calculator #dehum").is(":checked")||$(".timeofuserate-calculator #central-air").is(":checked"))&&$(".timeofuserate-calculator #None").prop("checked",!1)},n.prototype.UncheckOtherProgOptions=function(){$(".timeofuserate-calculator #None").is(":checked")&&($(".timeofuserate-calculator #Hot-tub").prop("checked",!1),$(".timeofuserate-calculator #EV-Charger").prop("checked",!1),$(".timeofuserate-calculator #dehum").prop("checked",!1),$(".timeofuserate-calculator #central-air").prop("checked",!1))},n.prototype.GetCheckedBoxes=function(n){for(var i=document.getElementsByName(n),r=[],t=0;t<i.length;t++)i[t].checked&&r.push(i[t]);return r.length>0?r:null},n.prototype.GetArrayListApps=function(n){var i="",t;if(i+=n[0].value,n.length-1>0)for(t=1;t<n.length;t++)i+="; "+n[t].value;return i},n}();t["default"]=i});define("services/move-out-service",["require","exports","utils/error-messages"],function(n,t,i){Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function n(n){this.baseApiUrl="";this.baseApiUrl=n+"/v2/"}return n.prototype.canStopService=function(n,t,r){r===void 0&&(r=null);$.ajax({url:this.baseApiUrl+"stopService/canStopService?accountNumber="+n+"",type:"POST",contentType:"application/json",dataType:"json",success:function(n){t(n)},error:function(n,t,u){var f=i["default"].getByStatusCode(n.status);console.error("Error checking if service can be stopped...");console.error(u);r&&r(f)}})},n.prototype.getAppointmentScheduleSlots=function(n,t,r){r===void 0&&(r=null);$.ajax({url:this.baseApiUrl+"stopService/scheduleSlots",type:"POST",contentType:"application/json",dataType:"json",data:JSON.stringify(n),success:function(n){n&&t(n)},error:function(n,t,u){var f=i["default"].getByStatusCode(n.status);console.error("Error retrieving appointment schedule slots: ");console.error(u);r&&r(f)}})},n.prototype.submitStopService=function(n,t,r){r===void 0&&(r=null);var u={customerInput:{customerNumber:n.contactInfo.customerNumber,firstName:n.contactInfo.firstName,lastName:n.contactInfo.lastName,email:n.contactInfo.email,phone:n.contactInfo.telePhone,mobile:n.contactInfo.mobile,primaryPhone:n.contactInfo.primaryPhone,currentAddress:{houseNumber:n.contactInfo.mailingAddress.houseNumber,houseSupplement:n.contactInfo.mailingAddress.houseSupplement,street:n.contactInfo.mailingAddress.street,city:n.contactInfo.mailingAddress.city,state:n.contactInfo.mailingAddress.state,zip:n.contactInfo.mailingAddress.zip}},accountNumber:n.contactInfo.accountNumber,isAppointmentRequired:n.stopDateInfo.isAppointmentRequired,isMeterRead:n.stopDateInfo.finalBillCalculation=="SendSomeOneForMeterRead"?!0:!1,moveOutDate:n.stopDateInfo.moveOutDate,moveOutStartTime:n.stopDateInfo.moveOutStartTime,moveOutEndTime:n.stopDateInfo.moveOutEndTime};$.ajax({url:this.baseApiUrl+"stopService",type:"POST",contentType:"application/json",dataType:"json",data:JSON.stringify(u),success:function(n){n&&t(n)},error:function(n,t,u){var f=i["default"].getByStatusCode(n.status);console.error("Error creating stop service: ");console.error(f);console.error(u);r&&r(f)}})},n}();t["default"]=r});define("services/move-service",["require","exports","utils/error-messages"],function(n,t,i){Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function n(n){this.internalApiUrl="";this.baseApiUrl="";this.internalApiUrl=window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"")+"/api/internal/move/";this.baseApiUrl=n+"/v2/"}return n.prototype.getAppointmentScheduleSlots=function(n,t,r){r===void 0&&(r=null);$.ajax({url:this.baseApiUrl+"startService/scheduleSlots",type:"POST",contentType:"application/json",dataType:"json",data:JSON.stringify(n),success:function(n){n&&t(n)},error:function(n,t,u){var f=i["default"].getByStatusCode(n.status);console.error("Error retrieving appointment schedule slots: ");console.error(u);r&&r(f)}})},n.prototype.searchPremiseByMeterNumber=function(n,t,r){r===void 0&&(r=null);$.ajax({url:this.baseApiUrl+"premises/"+n.meterNumber+"/search-premise",type:"GET",contentType:"application/json",dataType:"json",success:function(n){t(n)},error:function(n,t,u){var f=i["default"].getByStatusCode(n.status);console.error("Error retrieving address by Meter Number ");console.error(u);r&&r(f)}})},n.prototype.searchPremiseByAddress=function(n,t,r){r===void 0&&(r=null);$.ajax({url:this.baseApiUrl+"premises/search-address",type:"GET",contentType:"application/json",dataType:"json",data:{address:n.address,zip:n.zip,active:n.active},success:function(n){t(n)},error:function(n,t,u){var f=i["default"].getByStatusCode(n.status);console.error("Error retrieving address by Meter Number ");console.error(u);r&&r(f)}})},n.prototype.submitStartService=function(n,t,r){r===void 0&&(r=null);var u={customerInput:{customerNumber:n.personalInfo.customerNumber,isNewCustomer:n.personalInfo.isNewCustomer,firstName:n.personalInfo.firstName,lastName:n.personalInfo.lastName,email:n.reviewConfirmFormInfo.email,phone:n.personalInfo.primaryPhone==0?n.reviewConfirmFormInfo.phoneNumber:n.personalInfo.phone,mobile:n.personalInfo.primaryPhone==1?n.reviewConfirmFormInfo.phoneNumber:n.personalInfo.mobile,primaryPhone:n.personalInfo.primaryPhone,DateOfBirth:n.personalInfo.dob,idType:n.personalInfo.idType,idNumber:n.personalInfo.idNumber,ein:n.personalInfo.ein,currentAddress:n.personalInfo.currentAddress,IsUpdatedPersonalInfo:n.personalInfo.isUpdatedPersonalInfo,isNonResidentialCustomer:n.personalInfo.isNonResidentialCustomer,signUpForMyAccount:n.reviewConfirmFormInfo.signUpForMyAccount},premiseId:n.newAddressInfo.serviceAddress.premiseId,isRenting:n.newAddressInfo.isRenting,rentDuration:n.newAddressInfo.rentDuration,needsLifeSupportEquipment:n.startDateInfo.useLifeSupport,isAppointmentRequired:n.startDateInfo.isAppointmentRequired,appointmentStartDate:n.startDateInfo.appointmentStartDate,appointmentStartTime:n.startDateInfo.appointmentStartTime,appointmentEndDate:n.startDateInfo.appointmentEndDate,appointmentEndTime:n.startDateInfo.appointmentEndTime,moveInInstallations:n.startDateInfo.moveInInstallations,mailingAddress:n.newAddressInfo.mailingAddress,serviceAddress:n.newAddressInfo.serviceAddress.address,isMailingAddressSameAsServiceAddress:n.newAddressInfo.isMailingAddressSameAsServiceAddress,bpemIgnoreList:n.bpemIgnoreList};$.ajax({url:this.baseApiUrl+"startService",type:"POST",contentType:"application/json",dataType:"json",data:JSON.stringify(u),success:function(n){n&&t(n)},error:function(n,t,u){var f=i["default"].getByStatusCode(n.status);console.error("Error creating start service: ");console.error(f);console.error(u);r&&r(f)}})},n.prototype.findCustomers=function(n,t,r){r===void 0&&(r=null);$.ajax({url:this.baseApiUrl+"customers",type:"GET",contentType:"application/json",dataType:"json",data:n,success:function(n){n&&t(n)},error:function(n,t,u){var f=i["default"].getByStatusCode(n.status);console.error("Error finding Customer: ");console.error(u);r&&r(f)}})},n.prototype.getCustomerOtpOptions=function(n,t,r){r===void 0&&(r=null);$.ajax({url:this.baseApiUrl+"otp/customer/options",type:"POST",contentType:"application/json",dataType:"json",data:JSON.stringify(n),success:function(n){n&&t(n)},error:function(n,t,u){var f=i["default"].getByStatusCode(n.status);console.error("Error getting OTP Options for Find Customer: ");console.error(u);r&&r(f)}})},n.prototype.sendCustomerOtpCode=function(n,t,r){r===void 0&&(r=null);$.ajax({url:this.baseApiUrl+"otp/customer/code",type:"POST",contentType:"application/json",dataType:"json",data:JSON.stringify(n),success:function(n){n&&t(n)},error:function(n,t,u){var f=i["default"].getByStatusCode(n.status);console.error("Error sending OTP Code for Find Customer: ");console.error(u);r&&r(f)}})},n.prototype.verifyCustomerOtpCode=function(n,t,i){i===void 0&&(i=null);$.ajax({url:this.baseApiUrl+"otp/customer/auth",type:"POST",contentType:"application/json",dataType:"json",data:JSON.stringify(n),success:function(n){n&&t(n)},error:function(n,t,r){n.status==400;console.error("Error "+n.status+": "+n.statusText+", "+n.responseJSON.message+" "+n.responseJSON.exceptionMessage);console.error(r);i&&i("Invalid passcode entered")}})},n.prototype.getCustomer=function(n,t,r){r===void 0&&(r=null);$.ajax({url:this.baseApiUrl+"customers",type:"GET",contentType:"application/json",dataType:"json",data:n,success:function(n){n&&t(n)},error:function(n,t,u){var f=i["default"].getByStatusCode(n.status);console.error("Error getting Customer: ");console.error(u);r&&r(f)}})},n.prototype.sendFiles=function(n){$.ajax({url:this.internalApiUrl+"fileUploads",type:"POST",contentType:!1,processData:!1,data:n,success:function(n){n==!0?console.log("Successfully emailed file uploads"):console.error("Sending uploaded files failed ")},error:function(n,t,r){var u=i["default"].getByStatusCode(n.status);console.error("Error sending uploaded files: ");console.error(r)}})},n}();t["default"]=r});define("services/transfer-service",["require","exports","utils/error-messages"],function(n,t,i){Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function n(n){this.baseApiUrl="";this.baseApiUrl=n+"/v2/"}return n.prototype.submitTransferService=function(n,t,r){r===void 0&&(r=null);var u={stopServiceInput:{accountNumber:n.currentAddressInfo.accountNumber,isAppointmentRequired:n.currentAddressInfo.isAppointmentRequired,isMeterRead:n.currentAddressInfo.finalBillCalculation=="SendSomeOneForMeterRead"?"true":"false",moveOutDate:n.currentAddressInfo.moveOutDate,moveOutStartTime:n.currentAddressInfo.moveOutStartTime,moveOutEndTime:n.currentAddressInfo.moveOutEndTime},startServiceInput:{customerInput:{customerNumber:n.personalInfo.customerNumber,firstName:n.personalInfo.customerFirstName,lastName:n.personalInfo.customerLastName,email:n.personalInfo.customerEmail,phone:n.personalInfo.customerPhone,mobile:n.personalInfo.customerCell,primaryPhone:n.personalInfo.primaryPhone,currentAddress:n.newAddressInfo.mailingAddress},premiseId:n.newAddressInfo.serviceAddress.premiseId,isRenting:n.newAddressInfo.isRenting,rentDuration:n.newAddressInfo.rentDuration,needsLifeSupportEquipment:n.startDateInfo.useLifeSupport,isAppointmentRequired:n.startDateInfo.isAppointmentRequired,appointmentStartDate:n.startDateInfo.appointmentStartDate,appointmentEndDate:n.startDateInfo.appointmentEndDate,appointmentStartTime:n.startDateInfo.appointmentStartTime,appointmentEndTime:n.startDateInfo.appointmentEndTime,moveInInstallations:n.startDateInfo.moveInInstallations,mailingAddress:n.newAddressInfo.mailingAddress,serviceAddress:n.newAddressInfo.serviceAddress.address,isMailingAddressSameAsServiceAddress:n.newAddressInfo.isMailingAddressSameAsServiceAddress},customerAdditionalInfo:{coTenantFirstName:n.personalInfo.coTenantFirstName,coTenantLastName:n.personalInfo.coTenantLastName,coTenantPhone:n.personalInfo.coTenantPhone,employerName:n.personalInfo.employerName,employerAddressLine1:n.personalInfo.employerAddress,employerCity:n.personalInfo.employerCity,employerState:n.personalInfo.employerState,employerZipCode:n.personalInfo.employerZip,employerPhone:n.personalInfo.employerPhone,emergencyContactFirstName:n.personalInfo.emergencyFirstName,emergencyContactLastName:n.personalInfo.emergencyLastName,emergencyContactPhone:n.personalInfo.emergencyPhone,emergencyContactAddressLine1:n.personalInfo.emergencyAddress,emergencyContactCity:n.personalInfo.emergencyCity,emergencyContactState:n.personalInfo.emergencyState,emergencyContactZipCode:n.personalInfo.emergencyZip,isCoTenantInfoUpdated:n.personalInfo.isCoTenantInfoUpdated,isEmployerInfoUpdated:n.personalInfo.isEmployerInfoUpdated,isEmergencyContactInfoUpdated:n.personalInfo.isEmergencyContactInfoUpdated}};$.ajax({url:this.baseApiUrl+"transferService",type:"POST",contentType:"application/json",dataType:"json",data:JSON.stringify(u),success:function(n){n&&t(n)},error:function(n,t,u){var f=i["default"].getByStatusCode(n.status);console.error("Error creating transfer service: ");console.error(u);r&&r(f)}})},n}();t["default"]=r});define("utils/dropdown",["require","exports"],function(n,t){Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function n(){}return n.intialize=function(n){n===void 0&&(n=".ui.dropdown");$(n).dropdown()},n.intializeAllowAdditions=function(n){n===void 0&&(n=".ui.dropdown");$(n).dropdown({allowAdditions:!0})},n}();t["default"]=i});define("apps/start-service/confirmation",["require","exports","vue-property-decorator"],function(n,t,i){Object.defineProperty(t,"__esModule",{value:!0});var r=function(n){function t(){var t=n!==null&&n.apply(this,arguments)||this;return t.requestAlreadyExistsError=!1,t}return __extends(t,n),t.prototype.mounted=function(){$(".move-app").waitMe({effect:"rotation",text:this.content.requestProcessingStatusText,fontSize:"24px",color:"darkblue"})},t.prototype.OnServiceAddressChanged=function(n){n!=null&&(this.result.moveFailureError==="RequestAlreadyExists"&&(this.requestAlreadyExistsError=!0),$(".move-app").waitMe("hide"))},__decorate([i.Prop(Object)],t.prototype,"result",void 0),__decorate([i.Prop(Object)],t.prototype,"content",void 0),__decorate([i.Watch("result")],t.prototype,"OnServiceAddressChanged",null),__decorate([i.Component({template:'<div class="move-app">\n                <div v-if="result">\n                   <div v-if="result.isSuccess">\n                       <h5 class="text-center font-weight-bold">{{content.startServiceApprovalText}}<\/h5>\n                       <div class="move-app__confirmation_page confirmation_appt_details px-3 py-3">\n                             <h5 class="text-center">{{content.appointmentDetailsHeader}}<\/h5>\n                             <label>{{content.startServiceLocationLabel}}<\/label>\n                             <div class="mb-2">\n                                 <div>{{result.serviceAddress.houseNumber}} {{result.serviceAddress.street}} {{result.serviceAddress.houseSupplement}}<\/div>\n                                 <div>{{result.serviceAddress.city}}, {{result.serviceAddress.state}} {{result.serviceAddress.zip}}<\/div>\n                             <\/div>\n                             <label>{{content.startServiceDateLabel}}<\/label>\n                             <div class="mb-2">{{result.serviceDate}}<\/div>\n                             <label>{{content.timeSlotLabel}}<\/label>\n                             <div>{{result.selectedTimeSlot}}<\/div>\n                             <div v-if="result.isAppointmentRequired" class="text-center font-weight-bold">{{content.customerMustBePresentText}}<\/div>\n                             <div v-else class="text-center font-weight-bold">{{content.customerNeedNotToBePresentText}}<\/div>\n                       <\/div>\n                   <\/div>\n                   <div v-else-if="requestAlreadyExistsError" class="text-center">\n                        <h5 class="font-weight-bold">{{content.moveInAlreadyCreatedText}}<\/h5>\n                   <\/div>\n                    <div v-else class="move-app__start_confirmation_additional_review px-3 pt-3 pb-2">\n                        <h6 class="font-weight-bold">{{content.startServiceAdditionalReviewText}}<\/h6>\n                        <div class="text-center">\n                            <h5>{{content.startServiceCallUsText}}<\/h5>\n                        <\/div>\n                        <h5 class="font-weight-bold">845-452-2700<\/h5>                        \n                        <div>Monday-Friday: 8am-6pm <\/div>\n                        <div>Saturday: 9am-1pm <\/div>          \n                        <div>\n                            <h5 class="font-weight-bold mt-3">{{content.thankYouText}}<\/h5>\n                        <\/div>\n                    <\/div>\n\n                    <div v-if="result.isSuccess" class="move-app__confirmation_page confirmation_acct_details mt-3 mb-3 px-3 py-3">\n                        <h5 class="text-center">{{content.accountInformationHeader}}<\/h5>\n                        <p><label>{{content.customerNumberLabel}}<\/label> {{result.customerNumber}}<\/p>\n                        <p><label>{{content.accountNumberLabel}}<\/label> {{result.accountNumber}}<\/p>\n                    <\/div>\n                    <div v-if="result.isSuccess" class="text-center mt-2 mb-2 font-weight-bold">{{content.emailConfirmationText}}<\/div>                   \n                 <\/div>\n               <\/div>'})],t)}(i.Vue);t["default"]=r});define("apps/start-service/new-address",["require","exports","vue-property-decorator","apps/utils/event-bus"],function(n,t,i,r){Object.defineProperty(t,"__esModule",{value:!0});var u=function(n){function t(){var t=n!==null&&n.apply(this,arguments)||this;return t.zip="",t.address="",t.meterNumber="",t.premiseAddressIndex=-1,t.meterNumberPremiseResult=null,t.premiseSearchAddressList=null,t.picked="streetAddress",t.rented="false",t.showPremiseResult=!1,t.showAddressResult=!1,t.showSearchBtn=!0,t.showResetBtn=!1,t.checkedMailingAddress=!0,t.resultPremiseAddressSearch=!1,t.noResultPremiseAddressSearch=!1,t.noResultPremiseMeterSearch=!1,t.selectedDuration="",t.mailingHouseNo="",t.mailingStreetAddress="",t.mailingHouseSupplement="",t.mailingCity="",t.mailingZip="",t.mailingState="",t.indexPremise="",t}return __extends(t,n),t.prototype.data=function(){return{picked:"streetAddress",rented:"false",selectedDuration:"",checkedMailingAddress:!0,indexPremise:"",premiseAddress:"premiseAddress",flag:!0,durationflag:!1,serviceflag:!1,states:null,mailingState:"NY"}},t.prototype.mounted=function(){var n=this;setTimeout(function(){return n.states=["AL","AK","AZ","AR","CA","CO","CT","DE","DC","FL","GA","HI","ID","IL","IN","IA","KS","KY","LA","ME","MD","MA","MI","MN","MS","MO","MT","NE","NV","NH","NJ","NM","NY","NC","ND","OH","OK","OR","PA","RI","SC","SD","TN","TX","UT","VT","VA","WA","WV","WI","WY","PR","VI"]},3e3);$("#idZip").focus()},t.prototype.updated=function(){$("#mailingZip").mask("00000");$("#idZip").mask("00000");$("#idMeterNumber").mask("000000000");$("#idAddress").mask("ZZ",{translation:{Z:{pattern:/[a-zA-Z0-9 \-]/,recursive:!0}}})},t.prototype.searchPremiseNext=function(n){var t,i;if(n.preventDefault(),$("#updateNewServiceAddress").addClass("was-validated"),this.checkedMailingAddress===!1&&(document.forms.updateNewServiceAddress.checkValidity()?this.flag=!0:(this.flag=!1,event.preventDefault(),event.stopPropagation())),this.rented==="true"&&(this.selectedDuration==""?this.durationflag=!0:(this.durationflag=!1,this.rentDuration=this.selectedDuration==="1"?0:1)),this.picked==="streetAddress"){if(this.premiseAddressIndex==-1){this.serviceflag=!0;return}this.serviceflag=!1;t={address:{city:this.premiseSearchAddressList.serviceAddresses[this.premiseAddressIndex].address.city,zip:this.premiseSearchAddressList.serviceAddresses[this.premiseAddressIndex].address.zip,houseNumber:this.premiseSearchAddressList.serviceAddresses[this.premiseAddressIndex].address.houseNumber,street:this.premiseSearchAddressList.serviceAddresses[this.premiseAddressIndex].address.street,houseSupplement:this.premiseSearchAddressList.serviceAddresses[this.premiseAddressIndex].address.houseSupplement,state:this.premiseSearchAddressList.serviceAddresses[this.premiseAddressIndex].address.state},premiseId:this.premiseSearchAddressList.serviceAddresses[this.premiseAddressIndex].premiseId};this.sAddress=t}else this.serviceflag=!1,t={address:{city:this.meterNumberPremiseResult.address.city,zip:this.meterNumberPremiseResult.address.zip,houseNumber:this.meterNumberPremiseResult.address.houseNumber,street:this.meterNumberPremiseResult.address.street,houseSupplement:this.meterNumberPremiseResult.address.houseSupplement,state:this.meterNumberPremiseResult.address.state},premiseId:this.meterNumberPremiseResult.premiseId},this.sAddress=t;this.mAddress=this.checkedMailingAddress===!1?{city:this.mailingCity,zip:this.mailingZip,houseNumber:this.mailingHouseNo,street:this.mailingStreetAddress,houseSupplement:this.mailingHouseSupplement,state:this.mailingState}:this.content.mailingAddress;i={serviceAddress:this.sAddress,mailingAddress:this.mAddress,isRenting:this.rented==="true",rentDuration:this.rentDuration,isMailingAddressSameAsServiceAddress:this.checkedMailingAddress};this.flag&&this.serviceflag==!1&&this.durationflag==!1&&r["default"].$emit("next-step",{step:"NewAddress",formInfo:i})},t.prototype.onGetSearchByPremiseComplete=function(n){this.meterNumberPremiseResult=n;n!=null?(this.address=this.meterNumberPremiseResult.address.houseNumber+" "+this.meterNumberPremiseResult.address.street+" "+this.meterNumberPremiseResult.address.city+", "+this.meterNumberPremiseResult.address.state+" "+this.meterNumberPremiseResult.address.zip,this.showPremiseResult=!0,this.showAddressResult=!1,this.showSearchBtn=!1,this.showResetBtn=!0):this.noResultPremiseMeterSearch=!0;$(".new-address-form").waitMe("hide")},t.prototype.searchPremise=function(n){n.preventDefault();this.noResultPremiseMeterSearch=!1;this.noResultPremiseAddressSearch=!1;this.premiseAddressIndex=-1;$("#searchNewServiceAddress").addClass("was-validated");document.forms.searchNewServiceAddress.checkValidity()?($(".new-address-form").waitMe({effect:"rotation"}),this.picked==="streetAddress"?(this.premiseSearchAddressInput={zip:this.zip,active:this.content.searchAddressIsActive,address:this.address},this.moveService.searchPremiseByAddress(this.premiseSearchAddressInput,this.onGetSearchByAddressPremiseComplete,this.onGetSearchAddressByPremiseError)):(this.meterNumberInput={meterNumber:this.meterNumber},this.moveService.searchPremiseByMeterNumber(this.meterNumberInput,this.onGetSearchByPremiseComplete,this.onGetSearchByPremiseError))):(event.preventDefault(),event.stopPropagation())},t.prototype.onGetSearchByPremiseError=function(){this.noResultPremiseAddressSearch=!0;$(".new-address-form").waitMe("hide")},t.prototype.onGetSearchAddressByPremiseError=function(){this.noResultPremiseAddressSearch=!0;$(".new-address-form").waitMe("hide")},t.prototype.onGetSearchByAddressPremiseComplete=function(n){this.premiseSearchAddressList=n;this.premiseSearchAddressList&&this.premiseSearchAddressList.serviceAddresses?(this.premiseSearchAddressList.serviceAddresses.length==1&&(this.premiseAddressIndex=0),this.premiseSearchAddressList!=null&&this.premiseSearchAddressList.serviceAddresses.length>0&&(this.showSearchBtn=!1,this.showResetBtn=!0,this.showPremiseResult=!1,this.showAddressResult=!0,this.resultPremiseAddressSearch=!0)):this.noResultPremiseAddressSearch=!0;$(".new-address-form").waitMe("hide")},t.prototype.clearAndDefault=function(){$("#updateNewServiceAddress").removeClass("was-validated");$("#searchNewServiceAddress").removeClass("was-validated");this.premiseSearchAddressList=null;this.meterNumberPremiseResult=null;this.resultPremiseAddressSearch=!1;this.showSearchBtn=!0;this.showResetBtn=!1;this.showPremiseResult=!1;this.showAddressResult=!1;this.zip="";this.address="";this.meterNumber="";this.noResultPremiseMeterSearch=!1;this.noResultPremiseAddressSearch=!1;this.serviceflag=!1;this.durationflag=!1},t.prototype.resetDuration=function(){this.durationflag=!1;this.selectedDuration=""},__decorate([i.Prop(Object)],t.prototype,"content",void 0),__decorate([i.Prop(Object)],t.prototype,"moveService",void 0),__decorate([i.Component({template:'\n<div class="new-address-form">\n\t<form id="searchNewServiceAddress" class="needs-validation" novalidate @submit.prevent="searchPremise">\n\t\t<h3 class="text-center move-app__heading mb-3">{{content.newAddressHeading}}<\/h3>\n\n        <!-- S t r e e t  or  M e t e r -->\n\t\t<div class=" form-group move-app__innerbox-div">\n            <div class="mt-2 ml-2">\n\t\t        <label class="radio-label move-app__text">\n\t\t\t        <input type="radio" id="streetAddress" v-on:change="clearAndDefault" value="streetAddress" v-model="picked" />\n                    {{content.radioButtonStreetAddressLabel}}\n\t\t\t    <\/label>\n                <br />\n\t\t\t    <label class="radio-label move-app__text">\n    \t\t\t    <input type="radio" id="meterNumber" v-on:change="clearAndDefault" value="meterNumber" v-model="picked" />\n                    {{content.radioButtonMeterNumberLabel}}\n\t\t        <\/label>\n            <\/div>\n\t\t<\/div>\n\t\t<div v-if="picked===\'streetAddress\'">\n\t\t\t<div class="col-12 form-group">\n\t\t\t\t<label class="move-app__label">{{content.zipCodeLabel}}<\/label>\n                <div class="text-secondary">{{content.zipCodeHint}}<\/div>\n\t\t\t\t<input id="idZip" type="text" class="form-control" name="zip" v-model="zip" required/>\n\t\t\t\t<div class="invalid-feedback">\n\t\t        {{content.zipErrorMessage}}\n\t\t\t<\/div>\n\t\t\t<\/div>\n\t\t\t<div class="col-12 form-group">\n\t\t\t\t<label class="move-app__label">{{content.addressLabel}}<\/label>\n                <div class="text-secondary">\n                    {{content.addressHint}}\n                    <span class="tooltip fa fa-info-circle"><div class="tooltiptext" v-html=content.addressTooltip><\/div> <\/span>    \n                <\/div>\n\t\t\t\t<input id="idAddress" type="text" class="form-control" name="address" v-model="address" required/>\n\t\t\t\t<div class="invalid-feedback">\n\t\t\t\t{{content.streetAddressErrorMessage}}\n\t\t\t<\/div>\n\t\t\t<\/div>\n\t\t<\/div>\n\t\t<div v-else>\n\t\t\t<div class="col-12 form-group">\n\t\t\t\t<label class="move-app__label">{{content.meterNumberLabel}}<\/label>\n\t\t\t\t<input id="idMeterNumber" type="text" class="form-control" name="meterNumber" v-model="meterNumber" required/>\n\t\t\t\t<div class="invalid-feedback">\n\t\t\t{{content.meterNumberErrorMessage}}\n\t\t\t<\/div>\n\t\t\t<\/div>\n\t\t<\/div>\n\t\t<div class="col-12 text-center form-group" v-if="showSearchBtn">\n\t\t\t<button type="submit" class="button button--default mt-4">{{content.searchButtonLabel}}<\/button>\n\t\t<\/div>\n        <div v-if="showResetBtn" class="col-12 text-right">\n            <button type="button" class="button button--default mt-4" v-on:click="clearAndDefault">{{content.resetButtonLabel}}<\/button>\n        <\/div>\n\t<\/form>\n    <div class="col-12 form-group text-danger" v-if="noResultPremiseMeterSearch || noResultPremiseAddressSearch">\n        {{content.noAddressFoundMessage}}\n    <\/div>\n\n    <form v-if="showPremiseResult || showAddressResult" id="updateNewServiceAddress" class="needs-validation" novalidate @submit.prevent="searchPremiseNext">\n\t    <h3 class="text-center move-app__heading">{{content.confirmYourNewAddressLabel}}<\/h3>\n\t    <div class="col-12 form-group mt-3 text-center move-app__text" v-if="resultPremiseAddressSearch">\n\t\t    <ul class="mb-1">\n\t\t    {{content.multipleMatchesLabel}}\n\t\t    <\/ul>\n\t\t    <ul class="mb-1 font-weight-bold">\n\t\t    {{content.selectfromOptionsLabel}}\n\t\t    <\/ul>\n\t    <\/div>\n\n    \t<div class="col-12 form-group move-app__innerbox-div" v-if="resultPremiseAddressSearch" >\n\t    \t<div class="col-12 form-group mt-3" v-for="(serviceAddress,indexPremise) in premiseSearchAddressList.serviceAddresses">\n\t\t        <input class="form-check-input" type="radio" name="premiseAddress+indexPremise" id="premiseAddress+indexPremise" :value="indexPremise" v-model="premiseAddressIndex" required />\n                <div>\n                    {{serviceAddress.address.houseNumber}} {{serviceAddress.address.street}} {{serviceAddress.address.houseSupplement}} {{serviceAddress.address.city}} {{serviceAddress.address.state}} {{serviceAddress.address.zip}}\n                <\/div>\n\t\t    <\/div>\n\t\t    <div class="invalid-feedback-service" v-if="serviceflag">\n                {{content.serviceAddressErrorMessage}}\n            <\/div>\n\t    <\/div>\n\t\t<div class="mt-2 move-app__text" v-if="showPremiseResult">\n            <ul class="mt-1">\n\t\t\t{{content.serviceAddressFoundMeterNumberLabel}}\n            <\/ul>\n\t\t\t<ul class="mt-1">\n\t\t\t{{this.address}}\n\t\t\t<\/ul>\n\t\t<\/div>\n\n\t    <div class="move-app" v-if="showPremiseResult || showAddressResult">\n\n\t\t    <!-- O W N  vs  R E N T -->\n            <label class="move-app__label">{{content.rentorOwnLabel}}<\/label>\n\t\t    <div class="col-12 mb-3 move-app__innerbox-div">\n                <div class="mt-2">\n\t\t\t        <label for="own" class="radio-label move-app__text">\n                        <input type="radio" id="own" value="false" v-model="rented" v-on:change="resetDuration" required checked />\n                        {{content.radioButtonOwnLabel}}\n                    <\/label>\n                    <br />\n                    <label for="rent"class="radio-label move-app__text">\n        \t\t\t    <input type="radio" id="rent" value="true" v-model="rented" required />\n    \t\t\t        {{content.radioButtonRentLabel}}\n                    <\/label>\n                <\/div>\n            <\/div>\n\n            <!-- D u r a t i o n -->\n            <div class="row">\n\t\t\t    <div class="col-12 form-group" v-if="rented === \'true\'">\n    \t\t\t\t<label for="durationOfstay" class="move-app__label">{{content.durationOfStayMessage}}<\/label>\n\t    \t\t\t<select v-model="selectedDuration" required class="custom-select">\n\t\t    \t\t\t<option value="">{{content.durationOfStaySelectOne}}<\/option>\n\t\t\t    \t\t<option value="1">{{content.durationOfStayLessThan12}}<\/option>\n\t\t\t\t    \t<option value="2">{{content.durationOfStayMoreThan12}}<\/option>\n\t\t\t\t    <\/select>\n\t\t\t\t\t<div class="invalid-feedback-duration" v-if="durationflag">\n                        {{content.durationOfStayErrorMessage}}\n                    <\/div>\n    \t\t\t<\/div>\n\t\t    <\/div>\n\n\t\t    <!-- Mailing Addr Heading -->\n\t\t    <h3 class="text-center move-app__heading mb-3">{{content.mailingAddressLabel}}<\/h3>\n\t\t    <div class="col-md-12 move-app move-app__innerbox-div">\n                <label class="move-app__text radio-label mt-2">\n\t\t\t        <input type="checkbox" id="checkbox" v-model="checkedMailingAddress" />\n\t\t\t        {{content.sameAsMailingAddressMessage}}\n                <\/label>\n\t\t\t    <div v-if="checkedMailingAddress==false">\n\t\t\t\t<div class="form-row px-3 mb-3">\n\t\t\t\t\t<div class="col-md-6">\n\t\t\t\t\t\t<label class="move-app__label" for="mailingHouseNo">{{content.houseNoLabel}}<\/label>\n\t\t\t\t\t\t<input type="text" class="form-control" id="mailingHouseNo" name="mailingHouseNo" v-model="mailingHouseNo" maxlength="10" pattern=".*[0-9].*" required/>\n\t\t\t\t\t\t<div class="invalid-feedback">\n\t\t\t\t\t\t\t{{content.houseNoErrorMessage}}\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t\t<div class="col-md-6">\n\t\t\t\t\t\t<label class="move-app__label" for="mailingStreetAddress">{{content.streetAddressLabel}}<\/label>\n\t\t\t\t\t\t<input type="text" class="form-control" name="mailingStreetAddress" v-model="mailingStreetAddress" required />\n\t\t\t\t\t\t<div class="invalid-feedback">\n\t\t\t\t\t\t\t{{content.mailingStreetAddressErrorMessage}}\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class="form-row px-3 mb-3">\n\t\t\t\t\t<div class="col-md-6">\n\t\t\t\t\t\t<label class="move-app__label" for="mailingCity">{{content.cityLabel}}<\/label>\n\t\t\t\t\t\t<input type="text" class="form-control" name="mailingCity" v-model="mailingCity" required/>\n\t\t\t\t\t\t<div class="invalid-feedback">\n\t\t\t\t\t\t    {{content.cityErrorMessage}}\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t\t<div class="col-md-3">\n\t\t\t\t\t\t<label class="move-app__label" for="mailingState">{{content.stateLabel}}<\/label>\n                        <select v-model="mailingState" required class="custom-select">\n                            <option v-for="state in states" :value="state">{{state}}<\/option>\n                        <\/select>\t\t\t\t\t\t\n\t\t\t\t\t\t<div class="invalid-feedback">\n\t\t\t\t\t\t    {{content.stateErrorMessage}}\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t\t<div class="col-md-3">\n\t\t\t\t\t\t<label class="move-app__label" for="mailingZip">{{content.zipCodeLabel}}<\/label>\n\t\t\t\t\t\t<input id="mailingZip" type="text" class="form-control" name="mailingZip" v-model="mailingZip" required/>\n\t\t\t\t\t\t<div class="invalid-feedback">\n\t\t\t\t\t\t    {{content.mailingZipCodeErrorMessage}}\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t    <\/div>\n\t\t    <\/div>\n\n            <div class="form-group">\n                <div class="row">                                  \n                    <div class="col-12 text-right">\n                        <button type="submit" class="button button--default mt-4"> {{content.nextButtonLabel}} <\/button>\n                    <\/div>\n                <\/div>\n            <\/div>\n        <\/div>\n    <\/form>\n<\/div>\n'})],t)}(i.Vue);t["default"]=u});define("apps/start-service/personal-info",["require","exports","vue-property-decorator","utils/form-validator","apps/utils/event-bus","utils/mask"],function(n,t,i,r,u,f){Object.defineProperty(t,"__esModule",{value:!0});var e=function(n){function t(){var t=n!==null&&n.apply(this,arguments)||this;return t.findCustomerInput=null,t.firstName="",t.lastName="",t.lastNameSSN="",t.phone="",t.mobile="",t.primaryPhone=2,t.email="",t.houseNumber="",t.streetName="",t.houseSupplement="",t.city="",t.state="",t.zip="",t.dob="",t.idType=4,t.ss="",t.dl="",t.pp="",t.idNumber="",t.zipCode="",t.accountNumber="",t.ssNumber="",t.phoneNumber="",t.userEmail="",t.findCustEmail="",t.customerFound=!1,t.customerNumber="",t.customerToken="",t.requestToken="",t.otpOptions=null,t.selectedOtpOption=null,t.origPhone="",t.origMobile="",t.isDisabled=!0,t.showCustomerNo=!1,t.nextBtnClicked=!1,t.states=["NY","AL","AK","AZ","AR","CA","CO","CT","DE","DC","FL","GA","HI","ID","IL","IN","IA","KS","KY","LA","ME","MD","MA","MI","MN","MS","MO","MT","NE","NV","NH","NJ","NM","NC","ND","OH","OK","OR","PA","RI","SC","SD","TN","TX","UT","VT","VA","WA","WV","WI","WY","PR","VI"],t}return __extends(t,n),t.prototype.mounted=function(){var n=this;n.prepForm(n);this.isUserAuthenticated&&this.customerDetails.customerNumber!=null&&(this.customerNumber=this.customerDetails.customerNumber,this.firstName=this.customerDetails.firstName,this.lastName=this.customerDetails.lastName,this.phone=this.customerDetails.telephone,this.email=this.customerDetails.email,$("#idSSN").prop("required",!1),$("#idDob").prop("required",!1),$("#idFirstName").prop("required",!1),$("#idLastName").prop("required",!1),$("#idEmail").prop("required",!1),$("#idPhone").prop("required",!1),$("#idHouseNumber").prop("required",!1),$("#idStreetName").prop("required",!1),$("#idCity").prop("required",!1),$("#idState").prop("required",!1),$("#idZip").prop("required",!1),$("#idFirstName").prop("readonly",!0),$("#idLastName").prop("readonly",!0),$("#idEmail").prop("readonly",!0),($("#idOptPhone").is(":checked")&&this.phone!=""||$("#idOptMobile").is(":checked")&&this.mobile!="")&&(this.isDisabled=!1),this.origPhone=this.phone,this.origMobile=this.mobile);$("#collapseOne").on("hidden.bs.collapse",function(){$("#sectionIcon1").addClass("fa-chevron-down");$("#sectionIcon1").removeClass("fa-chevron-up")});$("#collapseOne").on("shown.bs.collapse",function(){$("#sectionIcon1").addClass("fa-chevron-up");$("#sectionIcon1").removeClass("fa-chevron-down")});$("#collapseTwo").on("hidden.bs.collapse",function(){$("#sectionIcon2").addClass("fa-chevron-down");$("#sectionIcon2").removeClass("fa-chevron-up")});$("#collapseTwo").on("shown.bs.collapse",function(){$("#sectionIcon2").addClass("fa-chevron-up");$("#sectionIcon2").removeClass("fa-chevron-down")});$("#collapseThree").on("hidden.bs.collapse",function(){$("#sectionIcon3").addClass("fa-chevron-down");$("#sectionIcon3").removeClass("fa-chevron-up")});$("#collapseThree").on("shown.bs.collapse",function(){$("#sectionIcon3").addClass("fa-chevron-up");$("#sectionIcon3").removeClass("fa-chevron-down")});$("#idOptPhone, #idOptMobile").change(function(){$("#idOptPhone").is(":checked")?($("#idPhone").attr("required","required"),$("#idMobile").prop("required",!1),n.primaryPhone=0):($("#idPhone").prop("required",!1),$("#idMobile").attr("required","required"),n.primaryPhone=1);n.isDisabled=!1;$("[required=required]").each(function(){$(this).val()==""&&(n.isDisabled=!0)})});r["default"].updateVisibiltyFromRadioGroup("input:radio[name='idOtpOpts']",new Map([["SSN","#idNumSSN"],["DL","#idNumDL"],["PP","#idNumPP"]]));$("#idOptSSN, #idOptDL, #idOptPP").change(function(){$("#idOptSSN").is(":checked")?($("#idSSN").attr("required","required"),$("#idDL").prop("required",!1),$("#idPP").prop("required",!1),n.idType=3,n.idNumber=n.ss,$("#idSSN").val()!=""||n.isDisabled?$("#idSSN").val()!=""&&n.isDisabled&&(n.isDisabled=!1):n.isDisabled=!0):$("#idOptDL").is(":checked")?($("#idSSN").prop("required",!1),$("#idDL").attr("required","required"),$("#idPP").prop("required",!1),n.idType=0,n.idNumber=n.dl,$("#idDL").val()!=""||n.isDisabled?$("#idDL").val()!=""&&n.isDisabled&&(n.isDisabled=!1):n.isDisabled=!0):$("#idOptPP").is(":checked")&&($("#idSSN").prop("required",!1),$("#idDL").prop("required",!1),$("#idPP").attr("required","required"),n.idType=2,n.idNumber=n.pp,$("#idPP").val()!=""||n.isDisabled?$("#idPP").val()!=""&&n.isDisabled&&(n.isDisabled=!1):n.isDisabled=!0)});$("input[name='customerBefore']").change(function(){n.showCustomerNo=!1;$("input[name='customerBefore']:checked").val()=="true"?(n.firstName=n.lastName=n.email=n.phone=n.mobile="",$("#searchDiv").show(),$("#idSearchForm").show(),$("#idOtpOptionsForm").hide(),$("#idOtpCodeForm").hide(),$("#idAndDob").hide(),$("#idSSN").prop("required",!1),$("#idZipcode").attr("required","required"),$("#idFirstName").prop("required",!1),$("#idLastName").prop("required",!1),$("#idEmail").prop("required",!1),$("#idPhone").prop("required",!1),$("#idMobile").prop("required",!1),$("#idHouseNumber").prop("required",!1),$("#idStreetName").prop("required",!1),$("#idCity").prop("required",!1),$("#idState").prop("required",!1),$("#idZip").prop("required",!1),$("#idFirstName").prop("readonly",!0),$("#idLastName").prop("readonly",!0),$("#idEmail").prop("readonly",!0),$("#idHouseNumber").prop("readonly",!0),$("#idStreetName").prop("readonly",!0),$("#idCity").prop("readonly",!0),$("#idState").prop("disabled",!0),$("#idZip").prop("readonly",!0)):(n.customerNumber="",$("#searchDiv").hide(),$("#idAndDob").show(),$("#idSSN").prop("required","required"),$("#idFirstName").attr("required","required"),$("#idLastName").attr("required","required"),$("#idEmail").attr("required","required"),$("#idPhone").attr("required","required"),$("#idMobile").prop("required",!1),$("#idHouseNumber").attr("required","required"),$("#idStreetName").attr("required","required"),$("#idCity").attr("required","required"),$("#idState").attr("required","required"),$("#idZip").attr("required","required"),$("#idFirstName").prop("readonly",!1),$("#idLastName").prop("readonly",!1),$("#idEmail").prop("readonly",!1),$("#idHouseNumber").prop("readonly",!1),$("#idStreetName").prop("readonly",!1),$("#idCity").prop("readonly",!1),$("#idState").prop("disabled",!1),$("#idZip").prop("readonly",!1))});$("#idSearchBy").change(function(){var t=$("#idSearchBy").find(":selected").val();n.showCustomerNo=!1;t=="custNum"?($("#lastNameSearch").hide(),$("#custNumSelect").show(),$("#userEmailSelect").hide(),$("#acctNumSelect").hide(),$("#ssNumSelect").hide(),$("#phoneNumSelect").hide()):t=="userEmail"?($("#lastNameSearch").hide(),$("#custNumSelect").hide(),$("#userEmailSelect").show(),$("#acctNumSelect").hide(),$("#ssNumSelect").hide(),$("#phoneNumSelect").hide()):t=="acctNum"?($("#lastNameSearch").hide(),$("#custNumSelect").hide(),$("#userEmailSelect").hide(),$("#acctNumSelect").show(),$("#ssNumSelect").hide(),$("#phoneNumSelect").hide()):t=="ssNum"?($("#lastNameSearch").show(),$("#custNumSelect").hide(),$("#userEmailSelect").hide(),$("#acctNumSelect").hide(),$("#ssNumSelect").show(),$("#phoneNumSelect").hide()):($("#lastNameSearch").hide(),$("#custNumSelect").hide(),$("#userEmailSelect").hide(),$("#acctNumSelect").hide(),$("#ssNumSelect").hide(),$("#phoneNumSelect").show())});$("#findCustomerBtn").click(function(){$("#searchDiv").waitMe({effect:"rotation"});$("#idFindErrorMsg").html("");$("#idFindError").hide();n.showCustomerNo=!1;n.firstName=n.lastName=n.email=n.phone=n.mobile="";var t=$("#idSearchBy").find(":selected").val();if(t=="custNum"){if(n.customerNumber==""||n.zipCode==""){$("#idFindErrorMsg").html("Missing Customer Number or Zip Code");$("#idFindError").show();$("#searchDiv").waitMe("hide");return}n.setFindCustomerInput(n.zipCode,n.customerNumber,"","","","","")}else if(t=="userEmail"){if(!r["default"].validateEmail(n.findCustEmail)){$("#idFindErrorMsg").html("Missing or invalid Email");$("#idFindError").show();$("#searchDiv").waitMe("hide");return}n.setFindCustomerInput(n.zipCode,"","","","",n.findCustEmail,"")}else if(t=="acctNum"){if(n.accountNumber==""||n.zipCode==""){$("#idFindErrorMsg").html("Missing Account Number or Zip Code");$("#idFindError").show();$("#searchDiv").waitMe("hide");return}n.setFindCustomerInput(n.zipCode,"",n.accountNumber,"","","","")}else if(t=="ssNum"){if(n.lastNameSSN==""||n.ssNumber==""||n.zipCode==""){$("#idFindErrorMsg").html("Missing Last Name, SSN or Zip Code");$("#idFindError").show();$("#searchDiv").waitMe("hide");return}n.setFindCustomerInput(n.zipCode,"","",n.lastNameSSN,n.ssNumber,"","")}else{if(n.phoneNumber==""||n.zipCode==""){$("#idFindErrorMsg").html("Missing Phone Number or Zip Code");$("#idFindError").show();$("#searchDiv").waitMe("hide");return}n.setFindCustomerInput(n.zipCode,"","","","","",n.phoneNumber)}n.moveService.findCustomers(n.findCustomerInput,n.onFindCustomerComplete,n.onFindCustomerError)});$("#idNextBtn").click(function(){n.nextBtnClicked=!0});$("#idOtpBackBtn").click(function(){$("#idOtpOptionsForm").hide();$("#idSearchForm").show();$("#searchDiv").waitMe("hide")});$("#idOtpSendCodeBtn").click(function(){$("#searchDiv").waitMe({effect:"rotation"});var t=$("#idOtpOptions").find(":selected").val().toString();n.moveService.sendCustomerOtpCode({token:n.customerToken,optionId:t},n.onSendCustomerOtpComplete)});$("#idOtpCancelCodeBtn").click(function(){$("#idOtpCodeForm").hide();$("#idOtpOptionsForm").show();$("#searchDiv").waitMe("hide")});$("#idOtpVerifyCodeBtn").click(function(){$("#searchDiv").waitMe({effect:"rotation"});var t={requestToken:n.requestToken,code:$("#idOtpCode").val().toString()};$("#idOtpCodeErrorMsg").html("");n.moveService.verifyCustomerOtpCode(t,n.onVerifyCustomerOtpCodeComplete,n.onOtpError)});$("[required=required]").change(function(){n.isDisabled=!1;$("[required=required]").each(function(){$(this).val()==""&&(n.isDisabled=!0)})});$("#idDob").mask("00/00/0000");$("#idSSNNum").mask("0000");$("#idSSN").mask("000-00-0000");$("#idZipcode").mask("00000");$("#idZip").mask("00000");$("#customerNumber").mask("000000000");$("#acctNum").mask("0000-0000-00-0")},t.prototype.onPhoneChanged=function(n){this.phone=f["default"].getMaskedPhoneNumber(n)},t.prototype.onMobileChanged=function(n){this.mobile=f["default"].getMaskedPhoneNumber(n)},t.prototype.onPhoneNumberChanged=function(n){this.phoneNumber=f["default"].getMaskedPhoneNumber(n)},t.prototype.emitForm=function(){var n,t,i;this.nextBtnClicked&&(document.forms.formStep3.checkValidity()&&(n=null,n=!this.isUserAuthenticated||this.isUserAuthenticated&&(this.customerNumber==null||this.customerNumber=="")?{houseNumber:this.houseNumber,street:this.streetName,houseSupplement:this.houseSupplement,city:this.city,state:this.state,zip:this.zip}:this.customerDetails.mailingAddress,$("#idOptSSN").is(":checked")?(this.idType=3,this.idNumber=this.ss):$("#idOptDL").is(":checked")?(this.idType=0,this.idNumber=this.dl):(this.idType=2,this.idNumber=this.pp),this.primaryPhone=$("#idOptPhone").is(":checked")?0:1,t=this.customerDetails.customerNumber!=undefined?this.customerDetails.customerNumber:this.customerNumber,i={isNewCustomer:t==""?!0:!1,customerNumber:t,firstName:this.firstName,lastName:this.lastName,email:this.email,phone:this.phone,mobile:this.mobile,primaryPhone:this.primaryPhone,idType:this.idType,idNumber:this.idNumber,dob:this.dob,ein:"",currentAddress:n,isNonResidentialCustomer:!1,isUpdatedPersonalInfo:this.origPhone!=this.phone||this.origMobile!=this.mobile?!0:!1},u["default"].$emit("next-step",{step:"PersonalInfo",formInfo:i})),$("#formStep3").addClass("was-validated"),this.nextBtnClicked=!1)},t.prototype.emitBack=function(n){n.preventDefault();$("#formStep3").removeClass("was-validated");u["default"].$emit("previous-step",{})},t.prototype.onFindCustomerComplete=function(n){n.customers.length==1?(this.customerToken=n.customers[0].token,this.moveService.getCustomerOtpOptions({token:this.customerToken},this.onGetCustomerOtpOptionsComplete,this.onGetCustomerOtpOptionsError)):n.customers.length>1?($("#idFindErrorMsg").html("More than one customer matches; please contact Customer Service."),$("#idFindError").show(),$("#searchDiv").waitMe("hide")):($("#idFindErrorMsg").html("Unable to find customer"),$("#idFindError").show(),$("#searchDiv").waitMe("hide"))},t.prototype.onFindCustomerError=function(n){$("errorMessage:contains(server error)")?$("#idFindErrorMsg").html("An unexpected error occurred, please try again or let us know by using <a href='https://www.cenhud.com/en/customer-service/contact-us/contact-us-by-email/website-feedback-or-technical-issue/'> this form<\/a>."):$("#idFindErrorMsg").html(n);$("#idFindError").show();$("#searchDiv").waitMe("hide")},t.prototype.onGetCustomerOtpOptionsComplete=function(n){$("#idSearchForm").hide();this.otpOptions=n.options;$("#idOtpOptionsForm").show();$("#idFirstName").prop("required",!1);$("#idLastName").prop("required",!1);$("#idEmail").prop("required",!1);$("#idPhone").prop("required","required");$("#idHouseNumber").prop("required",!1);$("#idStreetName").prop("required",!1);$("#idCity").prop("required",!1);$("#idState").prop("required",!1);$("#idZip").prop("required",!1);$("#idFirstName").prop("readonly",!0);$("#idLastName").prop("readonly",!0);$("#idEmail").prop("readonly",!0);$("#idHouseNumber").prop("readonly",!0);$("#idStreetName").prop("readonly",!0);$("#idCity").prop("readonly",!0);$("#idState").prop("disabled",!0);$("#idZip").prop("readonly",!0);$("#searchDiv").waitMe("hide")},t.prototype.onGetCustomerOtpOptionsError=function(n){$("#idFindErrorMsg").html(n);$("#idFindError").show();$("#searchDiv").waitMe("hide")},t.prototype.onSendCustomerOtpComplete=function(n){$("#searchDiv").waitMe("hide");this.requestToken=n.requestToken;$("#idOtpOptionsForm").hide();$("#idOtpCodeForm").show();$("#idOtpCode").focus()},t.prototype.onVerifyCustomerOtpCodeComplete=function(n){$("#idOtpCode").val("");console.log("customerNumber: "+n.customerNumber);this.moveService.getCustomer({customerToken:n.accessToken},this.onGetCustomerComplete,this.onGetCustomerError)},t.prototype.onOtpError=function(n){$("#idOtpCodeErrorMsg").html(n);$("#idOtpCodeError").show();$("#searchDiv").waitMe("hide")},t.prototype.onGetCustomerComplete=function(n){$("#searchDiv").waitMe("hide");console.log("Customer Name: "+n.firstName+" "+n.lastName);this.customerFound=!0;this.firstName=n.firstName;this.lastName=n.lastName;this.email=n.userEmail;n.telephone!==undefined&&n.telephone.length==10&&(this.phone=n.telephone.substr(0,3)+"-"+n.telephone.substr(3,3)+"-"+n.telephone.substr(6,4));n.mobile!==undefined&&n.mobile.length==10&&(this.phone=n.mobile.substr(0,3)+"-"+n.mobile.substr(3,3)+"-"+n.mobile.substr(6,4));this.origPhone=this.phone;this.origMobile=this.mobile;this.primaryPhone=n.primaryPhone;this.primaryPhone==1?($("#idOptPhone").prop("checked",!1),$("#idOptMobile").attr("checked","checked")):($("#idOptPhone").attr("checked","checked"),$("#idOptMobile").prop("checked",!1));($("#idOptPhone").is(":checked")&&$("#idPhone").val()!=""||$("#idOptMobile").is(":checked")&&$("#idMobile").val()!="")&&(this.isDisabled=!1);n.mailingAddress!=null&&(this.houseNumber=n.mailingAddress.houseNumber,this.streetName=n.mailingAddress.street,this.houseSupplement=n.mailingAddress.houseSupplement,this.city=n.mailingAddress.city,this.state=n.mailingAddress.state,this.zip=n.mailingAddress.zip);$("#idOtpCodeForm").hide();$("#idSearchForm").show();this.showCustomerNo=!0;this.isDisabled=!1},t.prototype.onGetCustomerError=function(n){$("#idOtpCodeErrorMsg").html(n);$("#idOtpCodeError").show();$("#searchDiv").waitMe("hide")},t.prototype.setFindCustomerInput=function(n,t,i,r,u,f,e){n===void 0&&(n="");t===void 0&&(t="");i===void 0&&(i="");r===void 0&&(r="");u===void 0&&(u="");f===void 0&&(f="");e===void 0&&(e="");this.findCustomerInput={zip:n,customerNumber:t,accountNumber:i,lastName:r,ssn:u,email:f,phoneNumber:e}},t.prototype.prepForm=function(n){var t=this;$(".date").datepicker({format:"mm/dd/yyyy",endDate:"-18y"}).on("changeDate",function(i){i.date!==undefined&&(n.dob=t.getDateStr(i.date))})},t.prototype.getDateStr=function(n){return n.toLocaleDateString("en-US",{year:"numeric",month:"2-digit",day:"2-digit"})},__decorate([i.Prop(Object)],t.prototype,"content",void 0),__decorate([i.Prop(Object)],t.prototype,"customerDetails",void 0),__decorate([i.Prop(Object)],t.prototype,"isUserAuthenticated",void 0),__decorate([i.Prop(Object)],t.prototype,"moveService",void 0),__decorate([i.Watch("phone")],t.prototype,"onPhoneChanged",null),__decorate([i.Watch("mobile")],t.prototype,"onMobileChanged",null),__decorate([i.Watch("phoneNumber")],t.prototype,"onPhoneNumberChanged",null),__decorate([i.Component({template:'<form id="formStep3" @submit.prevent="emitForm" class="needs-validation" novalidate>\n            <h3 class="text-center move-app__heading">{{content.personalInfoTitle}}<\/h3>\n            \n            <div v-if="isUserAuthenticated && this.customerDetails.customerNumber != null">\n                <div class="col-12 form-group text-center">\n                    <p class="move-app__text">{{content.PersonalInfoSubtitle}}<\/p>\n                    <span class="move-app__text"><b>{{content.customerNumberLabel}}<\/b> {{this.customerNumber}}<\/span>\n                <\/div>\n            <\/div>\n\n            <div v-else>\n                <!-- YES or NO -->\n                <!-- <div v-if="!customerFound" class="col-12 form-group text-center"> -->\n                <div class="col-12 form-group text-center">\n                    <p class="move-app__text">{{content.customerBeforeQuestion}}<\/p>\n                    <span class="move-app__radio-buttons">\n                    <label class="radio-label px-3" for="customer_yes">\n                        <input name="customerBefore"\n                            type="radio"\n                            id="customer_yes"\n                            :value="true" />\n                        <span>{{content.radioButtonYesText}}<\/span>\n                    <\/label>\n\n                    <label class="radio-label px-3" for="customer_no">\n                        <input name="customerBefore"\n                            type="radio"\n                            id="customer_no"\n                            :value="false" checked />\n                        <span>{{content.radioButtonNoText}}<\/span>\n                    <\/label>\n                    <\/span>\n                <\/div>\n\n                <!-- SEARCH FIELDS -->\n                <div id="searchDiv" style="display: none">\n                    <div id="idSearchForm">\n                    <div class="col-12 form-group">\n                        <label class="move-app__label" for="idSearchBy">{{content.searchByLabel}}<\/label>\n                        <select id="idSearchBy">\n                            <option value="custNum">{{content.customerNumberChoiceText}}<\/option>\n                            <option value="userEmail">{{content.userEmailChoiceText}}<\/option>\n                            <option value="acctNum">{{content.accountNumberChoiceText}}<\/option>\n                            <option value="ssNum">{{content.socSecNumChoiceText}}<\/option>\n                            <option value="phoneNum">{{content.phoneNumberChoiceText}}<\/option>\n                        <\/select>\n                    <\/div>\n                    <div class="col-12 form-group">\n                        <div id="custNumSelect">\n                            <label class="move-app__label" for="customerNumber">{{content.customerNumberLabel}}<\/label>\n                            <input type="text" id="customerNumber" v-model="customerNumber" />\n                        <\/div>\n                        <div id="userEmailSelect" style="display: none">\n                            <label class="move-app__label" for="idUserEmail">{{content.userEmailLabel}}<\/label>\n                            <input type="text" id="idUserEmail" name="userEmail" v-model="findCustEmail" />\n                        <\/div>\n                        <div id="acctNumSelect" style="display: none">\n                            <label class="move-app__label" for="acctNum">{{content.accountNumberLabel}}<\/label>\n                            <input type="text" id="acctNum" v-model="accountNumber" />\n                        <\/div>\n                        <div id="ssNumSelect" style="display: none">\n                            <label class="move-app__label" for="idSSNNum">{{content.socSecNumberLabel}}<\/label>\n                            <input type="text" id="idSSNNum" v-model="ssNumber" />\n                        <\/div>\n                        <div id="lastNameSearch" style="display: none" class="mt-3">\n                            <label class="move-app__label" for="lastNameSearch">{{content.lastNameLabel}}<\/label>\n                            <input type="text" id="lastNameSearch" v-model="lastNameSSN" />\n                        <\/div>\n                        <div id="phoneNumSelect" style="display: none">\n                            <label class="move-app__label" for="idPhoneNum">{{content.phoneNumberLabel}}<\/label>\n                             <div class="text-secondary"><i>### - ### - ####<\/i><\/div>\n                            <input type="text" id="idPhoneNum" v-model="phoneNumber" />\n                        <\/div>\n                    <\/div>\n                    <div class="col-12 form-group">\n                        <label class="move-app__label" for="idZipcode">{{content.zipLabel}}<\/label>\n                        <input type="text" id="idZipcode" v-model="zipCode" />\n                    <\/div>\n                    <div id="idFindError" class="col-12 text-danger" style="display: none">\n                        <span id="idFindErrorMsg"><\/span>\n                    <\/div>\n                    <div class="col-12 form-group text-right">\n                        <button id="findCustomerBtn" class="button button--default">{{content.findCustomerButton}}<\/button>\n                    <\/div>\n                    <\/div>  <!-- idSearchForm -->\n\n                    <div id="idOtpOptionsForm" style="display: none">\n                        <div class="col-12 form-group">\n                            <label class="move-app__label" for="idOtpOptions">{{content.selectOtpMethodLabel}}<\/label>\n                            <select id="idOtpOptions" v-model="selectedOtpOption">\n                                <option v-for="(item, index) in otpOptions" :value="item.id" :key="index">{{ item.method }} at {{ item.text }}<\/option>\n                            <\/select>\n                        <\/div>\n                        <div class="col-12 form-group text-right">\n                            <button id="idOtpBackBtn" class="button button--default">Back<\/button>\n                            <button id="idOtpSendCodeBtn" class="button button--default">{{content.sendOtpCodeButton}}<\/button>\n                        <\/div>\n                    <\/div>  <!-- idOtpOptionsForm -->\n\n                    <div id="idOtpCodeForm" style="display: none">\n                        <div class="col-12 form-group">\n                            <label class="move-app__label" for="idOtpCode">{{content.enterOtpLabel}}<\/label>\n                            <input type="text" id="idOtpCode" />\n                        <\/div>\n                        <div class="col-12" style="display: none" id="idOtpCodeError">\n                            <span id="idOtpCodeErrorMsg" class="text-danger"><\/span>\n                        <\/div>\n                        <div class="col-12 form-group text-right">\n                            <button id="idOtpCancelCodeBtn" class="button button--default">Cancel<\/button>\n                            <button id="idOtpVerifyCodeBtn" class="button button--default">{{content.verifyOtpCodeButton}}<\/button>\n                        <\/div>\n                    <\/div>  <!-- idOtpCodeForm -->\n\n                    <div v-if="showCustomerNo" class="col-12 text-center">\n                        <p class="move-app__text"><b>Customer Number:<\/b> <span>{{this.customerNumber}}<\/span><\/p>\n                    <\/div>\n                    <hr />\n                <\/div>  <!-- searchDiv -->\n            <\/div> <!-- v - else -->\n\n            <div class="col-12 form-group">\n                <label class="move-app__label">{{content.firstNameLabel}}<\/label>\n                <input type="text" class="form-control" id="idFirstName" v-model="firstName" required />\n                <div class="invalid-feedback">\n                    Please provide a {{content.firstNameLabel}}\n                <\/div>\n            <\/div>\n\n            <div class="col-12 form-group">\n                <label class="move-app__label">{{content.lastNameLabel}}<\/label>\n                <input type="text" class="form-control" id="idLastName" v-model="lastName" required />\n                <div class="invalid-feedback">\n                    Please provide a {{content.lastNameLabel}}\n                <\/div>\n            <\/div>\n\n            <div class="col-12 form-group">\n                <label class="move-app__label">{{content.emailLabel}}<\/label>\n                <input type="email" class="form-control required" id="idEmail" v-model="email" required />\n                <div class="invalid-feedback">\n                    Please provide an {{content.emailLabel}}\n                <\/div>\n            <\/div>\n\n            <!-- Phone or Mobile -->\n            <div class="col-12 form-group">\n                <label class="move-app__label mb-0">{{content.primaryPhoneLabel}}<\/label>\n                <div class="text-secondary">{{content.primaryPhoneDescription}}<\/div>\n                <div class="btn-group btn-group-toggle move-app__btn-group" data-toggle="buttons">\n                    <label class="btn btn-outline-secondary rounded-left active">\n                        <input type="radio" name="idPhoneOpts" id="idOptPhone" autocomplete="off" checked>{{content.homePhoneButton}}\n                    <\/label>\n                    <label class="btn btn-outline-secondary rounded-right">\n                        <input type="radio" name="idPhoneOpts" id="idOptMobile" autocomplete="off">{{content.cellPhoneButton}}\n                    <\/label>\n                <\/div>\n            <\/div>\n            <div class="col-12 form-group">\n                <label class="move-app__label">{{content.homePhoneLabel}}<\/label>\n                <div class="text-secondary"><i>### - ### - ####<\/i><\/div>\n                <input type="text" class="form-control" id="idPhone" v-model="phone" required />\n                <div class="invalid-feedback">\n                    Missing Phone number\n                <\/div>\n            <\/div>\n            <div class="col-12 form-group">\n                <label class="move-app__label">{{content.cellPhoneLabel}}<\/label>\n                <div class="text-secondary"><i>### - ### - ####<\/i><\/div>\n                <input type="text" class="form-control" id="idMobile" v-model="mobile" />\n                <div class="invalid-feedback">\n                    Missing Mobile number\n                <\/div>\n            <\/div>\n\n            <div v-if="isUserAuthenticated && this.customerDetails.customerNumber != null">\n              <\/div>\n            <div v-else id="idAndDob">\n            <div class="col-12 form-group">\n                <label class="move-app__label mb-0">{{content.identificationLabel}}<\/label>\n                <div class="text-secondary">{{content.identificationHint}}<\/div>\n                <div class="btn-group btn-group-toggle move-app__btn-group" data-toggle="buttons">\n                    <label class="btn btn-outline-secondary active rounded-left">\n                        <input type="radio" name="idOtpOpts" id="idOptSSN" value="SSN" autocomplete="off" checked> {{content.ssnIdButton}}\n                    <\/label>\n                    <label class="btn btn-outline-secondary">\n                        <input type="radio" name="idOtpOpts" id="idOptDL" value="DL" autocomplete="off"> {{content.driversLicenseIdButton}}\n                    <\/label>\n                    <label class="btn btn-outline-secondary rounded-right">\n                        <input type="radio" name="idOtpOpts" id="idOptPP" value="PP" autocomplete="off"> {{content.passportIdButton}}\n                    <\/label>\n                <\/div>\n            <\/div>\n\n            <div class="col-12 form-group" id="idNumSSN">\n                <label class="move-app__label mb-0">{{content.ssnIdLabel}}<\/label>\n                <div class="text-secondary">### - ## - ####<\/div>\n                <input type="text" class="form-control ss-number" id="idSSN" v-model="ss" required />\n                <div class="invalid-feedback">\n                    Please provide a Social Security number.\n                <\/div>\n            <\/div>\n            <div class="col-12 form-group d-none" id="idNumDL">\n                <label class="move-app__label mb-0">{{content.driversLicenseIdLabel}}<\/label>\n                <div class="text-secondary">#########<\/div>\n                <input type="text" class="form-control drivers-license" id="idDL" v-model="dl" />\n                <div class="invalid-feedback">\n                    Please provide a Drivers License number.\n                <\/div>\n            <\/div>\n            <div class="col-12 form-group d-none" id="idNumPP">\n                <label class="move-app__label mb-0">{{content.passportIdLabel}}<\/label>\n                <div class="text-secondary">##########<\/div>\n                <input type="text" class="form-control passport" id="idPP" v-model="pp" />\n                <div class="invalid-feedback">\n                    Please provide a Passport number.\n                <\/div>\n            <\/div>\n\n            <div class="col-12 form-group">\n                <label class="move-app__label mb-0">{{content.dateOfBirthLabel}}<\/label>\n                <div class="text-secondary">MM / DD / YYYY<\/div>\n                <div class="input-group date">\n                    <input id="idDob" type="text" class="inline form-control-plaintext" v-model="dob">\n                    <div class="input-group-append">\n                        <span class="move-app__calendarIcon input-group-text bg-transparent"><i class="fa fa-calendar"><\/i><\/span>\n                    <\/div>\n                <\/div>\n                <div class="invalid-feedback">\n                    Please provide your Date of Birth.\n                <\/div>\n            <\/div>\n\n            <h3 class="text-center move-app__heading mt-3">{{content.prevCurrAddressSection}}<\/h3>\n            <!-- --------------------------------------------------- -->\n            <div class="form-row px-3">\n                <div class="col-md-3 mt-3">\n                    <label for="idHouseNumber" class="move-app__label">{{content.houseNumberLabel}}<\/label>\n                    <input type="text" class="form-control" id="idHouseNumber" v-model="houseNumber" maxlength="10" required />\n                    <div class="invalid-feedback">\n                        Please provide a valid house number.\n                    <\/div>\n                <\/div>\n                <div class="col-md-9 mt-3">\n                    <label for="idStreetName" class="move-app__label">{{content.streetNameLabel}}<\/label>\n                    <input type="text" class="form-control" id="idStreetName" v-model="streetName" required />\n                    <div class="invalid-feedback">\n                        Please provide a street name.\n                    <\/div>\n                <\/div>\n            <\/div>\n\n            <div class="form-row px-3">\n                <div class="col-md-6 mt-3">\n                    <label for="idCity" class="move-app__label">{{content.cityLabel}}<\/label>\n                    <input type="text" class="form-control" id="idCity" v-model="city" required>\n                    <div class="invalid-feedback">\n                        Please provide a valid city.\n                    <\/div>\n                <\/div>\n                <div class="col-md-3 mt-3">\n                    <label for="idState" class="move-app__label">{{content.stateLabel}}<\/label>\n                    <!-- <input type="text" class="form-control" id="idState" v-model="state" required> -->\n                    <select id="idState" v-model="state" required class="custom-select">\n                            <option v-for="state in states" :value="state">{{state}}<\/option>\n                        <\/select>\n                    <div class="invalid-feedback">\n                        Please provide a valid state.\n                    <\/div>\n                <\/div>\n                <div class="col-md-3 mt-3">\n                    <label for="idZip" class="move-app__label">{{content.zipLabel}}<\/label>\n                    <input type="text" class="form-control" id="idZip" v-model="zip" required>\n                    <div class="invalid-feedback">\n                        Please provide a valid zip.\n                    <\/div>\n                <\/div>\n            <\/div>\n            <\/div>  <!-- end v - else -->\n\n\n<!--\n            <h3 class="text-center move-app__heading">Additional Information<\/h3>\n            ---------------------------------------------\n            <div class="col-12 form-group">\n            <div class="accordion" id="accordionExample">\n  <div class="card">\n    <div class="card-header" id="headingOne">\n        <i id="sectionIcon1" class="fas fa-chevron-down float-right"><\/i>\n      <h2 class="mb-0">\n        <button class="btn btn-link collapsed" type="button" data-toggle="collapse" data-target="#collapseOne" aria-expanded="true" aria-controls="collapseOne">\n          Employment Information\n        <\/button>\n      <\/h2>\n    <\/div>\n\n    <div id="collapseOne" class="collapse" aria-labelledby="headingOne" data-parent="#accordionExample">\n      <div class="card-body">\n        Employed / Student / Unemployed, etc...\n      <\/div>\n    <\/div>\n  <\/div>\n  <div class="card">\n    <div class="card-header" id="headingTwo">\n        <i id="sectionIcon2" class="fas fa-chevron-down float-right"><\/i>\n      <h2 class="mb-0">\n        <button class="btn btn-link collapsed" type="button" data-toggle="collapse" data-target="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo">\n          Emergency Contact Information\n        <\/button>\n      <\/h2>\n    <\/div>\n    <div id="collapseTwo" class="collapse" aria-labelledby="headingTwo" data-parent="#accordionExample">\n      <div class="card-body">\n        Name, Address and Phone of an contact person, in case of emergency.\n      <\/div>\n    <\/div>\n  <\/div>\n  <div class="card">\n    <div class="card-header" id="headingThree">\n        <i id="sectionIcon3" class="fas fa-chevron-down float-right"><\/i>\n      <h2 class="mb-0">\n        <button class="btn btn-link collapsed" type="button" data-toggle="collapse" data-target="#collapseThree" aria-expanded="false" aria-controls="collapseThree">\n          File Upload\n        <\/button>\n      <\/h2>\n    <\/div>\n    <div id="collapseThree" class="collapse" aria-labelledby="headingThree" data-parent="#accordionExample">\n      <div class="card-body">\n        File upload controls for required documentation...\n      <\/div>\n    <\/div>\n  <\/div>\n<\/div>\n            <\/div>\n-->\n\n            <div class="col-12 text-right form-group">\n                <a href="#" value="" v-on:click="emitBack" class="button button--default backButton mr-4">{{content.backButtonLabel}}<\/a>\n                <button id="idNextBtn" type="submit" class="button button--default mt-4" v-bind:class="{disabled: isDisabled}">{{content.nextButtonLabel}}<\/button>\n            <\/div>\n        <\/form>'})],t)}(i.Vue);t["default"]=e});define("apps/start-service/review-submit",["require","exports","vue-property-decorator","apps/utils/event-bus"],function(n,t,i,r){Object.defineProperty(t,"__esModule",{value:!0});var u=function(n){function t(){var t=n!==null&&n.apply(this,arguments)||this;return t.textAlerts=!1,t.signUpForAccount=!1,t.email="",t.phoneNumber="",t.mailingAddress=null,t.uselifeSupportEquipment=!1,t}return __extends(t,n),t.prototype.data=function(){return{textAlerts:!1,signUpForAccount:!1,uselifeSupportEquipment:this.startServiceInfo.startDateInfo.useLifeSupport,email:this.startServiceInfo.personalInfo.email,phoneNumber:this.startServiceInfo.personalInfo.primaryPhone==0?this.startServiceInfo.personalInfo.phone:this.startServiceInfo.personalInfo.mobile}},t.prototype.mounted=function(){this.getAddress()},t.prototype.getAddress=function(){this.mailingAddress=this.isUserAuthenticated&&this.startServiceInfo.personalInfo.customerNumber!==null&&this.startServiceInfo.personalInfo.customerNumber!==""?this.startServiceInfo.newAddressInfo.mailingAddress:this.startServiceInfo.personalInfo.currentAddress;this.mailingAddress!=null&&(this.mailingAddress.houseNumber=="undefined"&&(this.mailingAddress.houseNumber=""),this.mailingAddress.houseSupplement=="undefined"&&(this.mailingAddress.houseSupplement=""))},t.prototype.OnStartServiceInfoChanged=function(){this.uselifeSupportEquipment=this.startServiceInfo.startDateInfo.useLifeSupport;this.email=this.startServiceInfo.personalInfo.email;this.phoneNumber=this.startServiceInfo.personalInfo.primaryPhone==0?this.startServiceInfo.personalInfo.phone:this.startServiceInfo.personalInfo.mobile;this.getAddress()},t.prototype.emitForm=function(n){n.preventDefault();var t={email:this.email,phoneNumber:this.phoneNumber,signUpForMyAccount:this.signUpForAccount,signUpForTextAlerts:this.textAlerts};r["default"].$emit("next-step",{step:"ReviewSubmit",formInfo:t})},t.prototype.emitBack=function(n){n.preventDefault();r["default"].$emit("previous-step",{})},__decorate([i.Prop(Object)],t.prototype,"content",void 0),__decorate([i.Prop(Object)],t.prototype,"startServiceInfo",void 0),__decorate([i.Prop(Object)],t.prototype,"isUserAuthenticated",void 0),__decorate([i.Watch("startServiceInfo")],t.prototype,"OnStartServiceInfoChanged",null),__decorate([i.Component({template:'<form @submit.prevent="emitForm">\n            <h3 class="text-center move-app__heading">{{content.reviewSubmitHeading}}<\/h3>\n            <div class="col-12 form-group mt-3">\n                <label class="move-app__label">{{content.serviceAddressLabel}}<\/label>\n                <div>{{startServiceInfo.newAddressInfo.serviceAddress.address.houseNumber}} {{startServiceInfo.newAddressInfo.serviceAddress.address.street}} {{startServiceInfo.newAddressInfo.serviceAddress.address.houseSupplement}}<\/div>\n                <div>{{startServiceInfo.newAddressInfo.serviceAddress.address.city}}, {{startServiceInfo.newAddressInfo.serviceAddress.address.state}} {{startServiceInfo.newAddressInfo.serviceAddress.address.zip}}<\/div>\n            <\/div>\n            <div class="col-12 form-group">\n                <label class="move-app__label">{{content.startDateLabel}}<\/label>\n                <div>{{startServiceInfo.startDateInfo.appointmentStartDate}}<\/div>\n            <\/div>\n             <div class="col-12 form-group">\n               <label class="move-app__label">{{content.emailAddressLabel}}<\/label>\n                <input type="text" class="form-control" name="email" v-model="email"  required/>\n\t\t\t\t<div class="invalid-feedback">\n\t\t        Please provide valid email\n\t\t\t    <\/div>\n            <\/div>\n            <div class="col-12 form-group">\n                <label class="move-app__label">{{content.phoneNumberLabel}}<\/label>\n                <input type="text" class="form-control" name="phoneNumber" v-model="phoneNumber" required/>\n                <div class="invalid-feedback">\n\t\t        Please provide valid phonenumber\n\t\t\t    <\/div>\n            <\/div>\n                <div class="col-12 form-group move-app">\n                 <label class="move-app__label">{{content.lifeSupportEquipmentLabel}}<\/label>\n                <div class="col-12 form-group move-app__innerbox-div">\n                    <div class="mt-2">\n                        <label>\n                            <input type="radio" id="lifeSupportEquipmentYes" value="true" v-model="uselifeSupportEquipment" disabled/>\n                            <span>{{content.radioButtonYesText}}<\/span>\n                        <\/label>\n                        <br />\n                        <label>\n                            <input type="radio" id="lifeSupportEquipmentNo"  value="false" v-model="uselifeSupportEquipment" disabled/>\n                            <span>{{content.radioButtonNoText}}<\/span>\n                        <\/label>\n                    <\/div>\n                <\/div>\n                <\/div>\n            <div class="col-12 form-group">               \n                <label class="move-app__label">{{content.prevCurrAddrLabel}}<\/label>\n                <div>{{mailingAddress.houseNumber}} {{mailingAddress.street}} {{mailingAddress.houseSupplement}}<\/div>\n                <div>{{mailingAddress.city}}, {{mailingAddress.state}} {{mailingAddress.zip}}<\/div>\n            <\/div>\n            \n            <div class="col-12 form-group">\n  <hr>\n            <label class="move-app__label">{{content.preferencesLabel}}<\/label>\n            <ul class="list-inline">            \n                <input type="checkbox" id="checkbox" v-model="signUpForAccount" />\n\t\t\t    <label class="move-app__text">\n                    {{content.myAccountOption}}              \n                    <span class="tooltip fa fa-question-circle"><div class="tooltiptext" v-html=content.accountSignUpToolTipText><\/div> <\/span>\n                <\/label>\n            <\/ul>\n            <ul class="list-inline">\n            <input type="checkbox" id="checkbox" v-model="textAlerts" />\n\t\t\t<label class="move-app__text">\n                {{content.textAlertsOption}}\n                <span class="tooltip fa fa-question-circle"><div class="tooltiptext" v-html=content.textAlertToolTipText><\/div> <\/span>\n            <\/label>\n                   \n            <\/ul>\n            <\/div>\n            <div class="col-12 text-right form-group">\n                 <a href="#" value="" v-on:click="emitBack" class="button button--default backButton mr-4">{{content.backButtonLabel}}<\/a>\n                <button type="submit" class="button button--default mt-4">{{content.submitButtonLabel}}<\/button>\n            <\/div>\n        <\/form>'})],t)}(i.Vue);t["default"]=u});define("apps/start-service/start-date",["require","exports","vue-property-decorator","utils/form-validator","utils/mask","apps/utils/event-bus"],function(n,t,i,r,u,f){Object.defineProperty(t,"__esModule",{value:!0});var e=function(n){function t(){var t=n!==null&&n.apply(this,arguments)||this;return t.startDateAppointmentResult=null,t.show=!1,t.selectedDate="",t.selectedTime={startTime:"",duration:0,endTime:""},t.currErrorMessage="",t.useLifeSupport=!1,t.coTenantExists=!1,t.coTenantName="",t.coTenantPhone="",t.hasUserSubmitted=!1,t.isErtOptOut=!1,t.isErtMeter=!1,t.isErtTermsChecked=!1,t}return __extends(t,n),t.prototype.created=function(){document.body.addEventListener("scroll",this.handleScroll);this.startDateAppointmentInput={serviceAddress:this.serviceAddress,moveInStartDateDelay:this.content.moveInStartDelay};this.moveService.getAppointmentScheduleSlots(this.startDateAppointmentInput,this.onGetAppointmentScheduleSlotsComplete,this.onGetAppointmentScheduleSlotsError)},t.prototype.mounted=function(){$(".start-date-form").waitMe({effect:"rotation"});var n=this;n.prepForm(n)},t.prototype.destroyed=function(){document.body.removeEventListener("scroll",this.handleScroll)},t.prototype.OnServiceAddressChanged=function(n,t){this.isEqual(n.address,t.address)||($(".start-date-form").waitMe({effect:"rotation"}),this.startDateAppointmentInput={serviceAddress:n,moveInStartDateDelay:this.content.moveInStartDelay},this.moveService.getAppointmentScheduleSlots(this.startDateAppointmentInput,this.onGetAppointmentScheduleSlotsComplete,this.onGetAppointmentScheduleSlotsError))},t.prototype.handleScroll=function(){$(".date").datepicker("hide");$(".date").blur()},t.prototype.beforeUpdate=function(){$("#phoneNumber").mask("000-000-0000")},Object.defineProperty(t.prototype,"isValid",{get:function(){if(this.coTenantExists){var n=this.coTenantName!=="",t=this.coTenantPhone!==""&&r["default"].validatePhoneNumber(u["default"].getRawValue(this.coTenantPhone));return t&&n}return this.isErtOptOut&&!this.isErtTermsChecked?!1:!0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"showCoTenantNameError",{get:function(){return this.coTenantName==""&&this.hasUserSubmitted},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"showCoTenantPhoneError",{get:function(){return!r["default"].validatePhoneNumber(u["default"].getRawValue(this.coTenantPhone))&&this.hasUserSubmitted},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"showErtTermsNotCheckedError",{get:function(){return this.isErtOptOut&&!this.isErtTermsChecked&&this.hasUserSubmitted},enumerable:!0,configurable:!0}),t.prototype.isEqual=function(n,t){var f=Object.keys(n),e=Object.keys(t),i,r,u;if(f.length!==e.length)return!1;for(i=0,r=f;i<r.length;i++)if(u=r[i],n[u]!==t[u])return!1;return!0},t.prototype.emitForm=function(n){var u,t,e,i,r,o,s;if(n.preventDefault(),this.isValid){for(this.isErtOptOut&&this.startDateAppointmentResult.selectedMeters.forEach(function(n){return n.isErtOptOut=!0}),this.coTenantExists||(this.coTenantName="",this.coTenantPhone=""),u=[],t=0,e=this.startDateAppointmentResult.selectedMeters;t<e.length;t++)i=e[t],r="",i.serviceType=="Electric"?r="EL":i.serviceType=="Gas"&&(r="GS"),o={installationId:i.installationId,divisionId:r,ertOptOut:!1,premiseId:this.serviceAddress.premiseId},u.push(o);s={moveInInstallations:u,isAppointmentRequired:this.startDateAppointmentResult.isAppointmentRequired,isAllDayAppointment:this.startDateAppointmentResult.isAllDayAppointment,appointmentStartDate:this.selectedDate,appointmentEndDate:this.selectedDate,appointmentStartTime:this.startDateAppointmentResult.isAppointmentRequired&&!this.startDateAppointmentResult.isAllDayAppointment?this.selectedTime.startTime:this.availableTimeSlots&&this.availableTimeSlots.length>0?this.availableTimeSlots[0].startTime:"",appointmentEndTime:this.startDateAppointmentResult.isAppointmentRequired&&!this.startDateAppointmentResult.isAllDayAppointment?this.selectedTime.endTime:this.availableTimeSlots&&this.availableTimeSlots.length>0?this.availableTimeSlots[0].endTime:"",useLifeSupport:this.useLifeSupport,coTenantExist:this.coTenantExists,coTenantName:this.coTenantName,coTenantPhone:this.coTenantPhone};f["default"].$emit("next-step",{step:"StartDate",formInfo:s})}else this.hasUserSubmitted=!0},t.prototype.emitBack=function(n){n.preventDefault();f["default"].$emit("previous-step",{})},t.prototype.prepForm=function(n){var r=this,t=new Date,i;t.setDate(t.getDate()+90);i=t.getMonth()+1+"/"+t.getDate()+"/"+t.getFullYear();$(".date").datepicker({format:"mm/dd/yyyy",startDate:"0",endDate:i,autoclose:!0}).on("changeDate",function(t){t.date!==undefined&&(n.selectedDate=r.getDateStr(t.date))})},t.prototype.getDateStr=function(n){return n.toLocaleDateString("en-US",{year:"numeric",month:"2-digit",day:"2-digit"})},Object.defineProperty(t.prototype,"availableTimeSlots",{get:function(){var n=this,t=this.startDateAppointmentResult.schedules.filter(function(t){var i=n.getDateStr(new Date(t.date));return i==n.selectedDate});return this.selectedTime=t[0].availableTimeSlots[0],t[0].availableTimeSlots},enumerable:!0,configurable:!0}),t.prototype.onGetAppointmentScheduleSlotsComplete=function(n){var t,i,r,u;for(this.show=!0,this.startDateAppointmentResult=n,this.selectedDate=n.schedules[0].date,t=0,i=this.startDateAppointmentResult.selectedMeters;t<i.length;t++)if(r=i[t],r.isMeterErt){this.isErtMeter=!0;break}$(".date").datepicker("setDate",new Date(this.selectedDate));$(".date").datepicker("setDatesDisabled",n.datesNotAvailable);$(".start-date-form").waitMe("hide");this.startDateAppointmentResult.selectedMeters&&Array.isArray(this.startDateAppointmentResult.selectedMeters)&&this.startDateAppointmentResult.selectedMeters.length===0&&(u={selectedMeters:[],is90DaysSlotsAvailable:!1,isAppointmentRequired:!1,isAllDayAppointment:!1,isCustomerMustBePresent:!1,schedules:[],datesNotAvailable:[]},f["default"].$emit("next-step",{step:"Confirmation",formInfo:u}))},t.prototype.onGetAppointmentScheduleSlotsError=function(n){$(".start-date-form").waitMe("hide");this.currErrorMessage=n},__decorate([i.Prop(Object)],t.prototype,"content",void 0),__decorate([i.Prop(Object)],t.prototype,"serviceAddress",void 0),__decorate([i.Prop(Object)],t.prototype,"moveService",void 0),__decorate([i.Watch("serviceAddress")],t.prototype,"OnServiceAddressChanged",null),__decorate([i.Component({template:'                \n                <div class="start-date-form">\n                   <div v-if="!currErrorMessage">\n                        <form action="#" @submit.prevent="emitForm">\n                            <h4 class="text-center move-app__heading">{{content.startDateHeading}}<\/h4>\n                            <div v-if="show" class="col-12 mt-3" >\n                                <p class="move-app__info-box"><b>{{content.noteLabel}}:<\/b>\n                                        <span v-if="startDateAppointmentResult.isCustomerMustBePresent">{{content.customerMustBePresentText}}<\/span>\n                                        <span v-else>{{content.customerNeedNotBePresentText}}<\/span>\n                                <\/p>\n                            <\/div>\n                            <div class="col-12 mt-2">\n                                <label class="move-app__label">{{content.startDateLabel}}:<\/label>                        \n                                <div class="input-group date mb-3">\n                                    <input type="text" readonly class="form-control-plaintext" v-model="selectedDate">\n                                    <div class="input-group-append">\n                                        <span class="move-app__calendarIcon input-group-text bg-transparent"><i class="fa fa-calendar"><\/i><\/span>\n                                    <\/div>\n                                <\/div>\n\n                                <div v-if="show && startDateAppointmentResult.isAppointmentRequired && !startDateAppointmentResult.isAllDayAppointment " class="row mt-2">\n                                    <div class="col-md-12">                                        \n                                        <label class="move-app__label">{{content.timeSlotLabel}}:<\/label>\n                                        <select v-model="selectedTime">\n                                            <option v-for="timeSlot in availableTimeSlots" v-bind:value="timeSlot">                                                \n                                                {{timeSlot.startTime}} - {{timeSlot.endTime}}\n                                            <\/option>\n                                        <\/select>                                \n                                    <\/div>                                                                                     \n                                <\/div>\n\n                                <hr>\n                                <div class="row mt-2">\n                                    <div class="col-md-12 move-app">\n                                        <div v-if="show">\n                                            <h5 class="text-center move-app__heading">{{content.meterActivationHeading}}<\/h5>\n                                            <div class="mt-2 move-app__text">{{content.meterActivationDescription}}<\/div>\n                                            <ul class="mt-1">\n                                                <li v-for="item in startDateAppointmentResult.selectedMeters">\n                                                    {{item.serviceType}} {{item.meterNumber}}                                                \n                                                <\/li>\n                                            <\/ul>\n                                            <div v-if="isErtMeter">\n                                                <span style="font-size:12px" v-html=content.ertExplanationContent><\/span>\n                                                <div class="mt-2 move-app__text">{{content.ertOptOutChoiceLabel}}<\/div>\n                                                  <div class="col-5 border rounded">\n                                                    <div class="mt-2">\n                                                        <input type="radio" v-model="isErtOptOut" v-bind:value="true" name="isErtOptOut">\n                                                        <label class="form-check-label">{{content.radioButtonYesText}}<\/label>\n                                                        <br />\n                                                        <input type="radio" v-model="isErtOptOut" v-bind:value="false" name="isErtOptOut">\n                                                        <label class="form-check-label">{{content.radioButtonNoText}}<\/label>\n                                                   <\/div>\n                                                <\/div>\n                                                <div class="mt-3" v-if="isErtOptOut">\n                                                    <input type="checkbox" class="formcontrol" v-model="isErtTermsChecked"> {{content.ertOptOutAgreementStatementText}}\n                                                    <p v-show="showErtTermsNotCheckedError" class="form__error mt-0 mb-0">{{content.ertTermsAcceptRequiredText}}<\/p>\n                                                <\/div>\n                                            <\/div>\n                                        <\/div>\n                                    <\/div>\n                                <\/div>\n\n                                <hr>\n                                <div class="row mt-2">\n                                <div class="col-md-12 move-app">\n                                    <div v-if="show">\n                                        <h5 class="text-center move-app__heading">{{content.lifeSupportEquipmentHeading}}<\/h5>                                         \n                                        <div class="mt-2 move-app__text">\n                                            {{content.lifeSupportEquipmentQuestion}}\n                                            <span class="tooltip fa fa-question-circle"><div class="tooltiptext" v-html=content.lifeSupportToolTipText><\/div> <\/span>                                                       \n                                        <\/div>\n                                        <div class="col-5 border rounded">\n                                             <div class="mt-2">\n                                                <input type="radio" v-model="useLifeSupport" v-bind:value="true" name="useLifeSupport">\n                                                <label class="form-check-label">{{content.radioButtonYesText}}<\/label>                                           \n                                                 <br />\n                                                <input type="radio" v-model="useLifeSupport" v-bind:value="false" name="useLifeSupport">\n                                                <label class="form-check-label">{{content.radioButtonNoText}}<\/label>\n                                            <\/div>\n                                        <\/div>\n                                    <\/div>\n                                <\/div>\n                                <\/div>\n\n                                <hr>\n                                <div class="row mt-2">\n                                <div class="col-md-12 move-app">\n                                    <div v-if="show">\n                                        <h5 class="text-center move-app__heading">{{content.coTenantHeading}}<\/h5>\n                                        <div class="mt-2 move-app__text">{{content.coTenantQuestion}}<\/div>\n                                        <div class="col-5 border rounded">\n                                            <div class="col-10 mt-2">\n                                                <input class="form-check-input" type="radio" v-model="coTenantExists" v-bind:value="true" name="coTenantExists">\n                                                <label class="form-check-label">{{content.radioButtonYesText}}<\/label>\n                                                <br />                                  \n                                                <input class="form-check-input" type="radio" v-model="coTenantExists" v-bind:value="false" name="coTenantExists">\n                                                <label class="form-check-label">{{content.radioButtonNoText}}<\/label>\n                                            <\/div>\n                                        <\/div>\n                                    <\/div>\n                                <\/div>\n                                <\/div>\n\n                                <div v-if="coTenantExists">\n                                    <div class="row mt-2">\n                                        <div class="col-md-12 move-app">\n                                            <label class="move-app__label">{{content.coTenantNameLabel}}:<\/label>\n                                            <input type="text" class="form-control" v-model="coTenantName"/>\n                                            <p v-show="showCoTenantNameError" class="form__error mt-0 mb-0">{{content.nameRequiredText}}<\/p>\n                                        <\/div>\n                                    <\/div>\n                                    <div class="row mt-2">\n                                        <div class="col-md-12 move-app">\n                                            <label class="move-app__label">{{content.coTenantPhoneLabel}}:<\/label>\n                                            <input type="text"  id="phoneNumber"                                           \n                                                :class="{                                                \n                                                        \'input--error\': showCoTenantPhoneError\n                                                    }"                                       \n                                                v-model="coTenantPhone"                                    \n                                                />\n                                            <p v-show="showCoTenantPhoneError" class="form__error mt-0 mb-0">{{content.inValidPhoneNumberText}}<\/p>\n                                        <\/div>\n                                    <\/div>\n                                <\/div>\n                            <\/div>\n\n                            <div class="col-12 form-group text-right">\n                                <a href="#" value="" v-on:click="emitBack" class="button button--default backButton mr-4">{{content.backButtonLabel}}<\/a>\n                                <button type="submit" class="button button--default mt-4">{{content.nextButtonLabel}}<\/button>\n                            <\/div>                      \n                        <\/form>\n                   <\/div>\n\n                   <div v-else>\n                    <div class="row mt-3 mx-1">\n                        <div class="col">\n                            <div class="alert alert-danger">{{currErrorMessage}}<\/div>\n                        <\/div>\n                   <\/div>\n                <\/div>\n               <\/div>\n            '})],t)}(i.Vue);t["default"]=e});define("apps/start-service/start-service-app",["require","exports","vue-property-decorator","apps/start-service/new-address","apps/start-service/start-date","apps/start-service/personal-info","apps/start-service/review-submit","apps/start-service/confirmation","utils/stack","apps/utils/event-bus","services/move-service"],function(n,t,i,r,u,f,e,o,s,h,c){function a(n,t){var r=new i.Vue({el:"#"+n,data:{startServiceAppOptions:t},components:{StartServiceApp:l}})}Object.defineProperty(t,"__esModule",{value:!0});t.init=a;var l=function(n){function t(){var t=n.call(this)||this;return t.navstack=new s["default"],t.step="",t.currentStep=1,t.moveInSubmissionResult=null,t.currErrorMessage="",t.confirmationDivHeight="",t.desktopActiveStepCssClass="pbardesktop pbardesktop_activeblock",t.desktopInactiveStepCssClass="pbardesktop pbardesktop_inactiveblock",t.mobileActiveStepCssClass="pbarmobile pbarmobile_activeblock",t.mobileInactiveStepCssClass="pbarmobile pbarmobile_inactiveblock",t.moveService=new c["default"](t.options.apiUrl),t}return __extends(t,n),t.prototype.created=function(){h["default"].$on("next-step",this.handleNext);h["default"].$on("previous-step",this.handleBack);this.step="NewAddress";this.navstack.push(this.step)},t.prototype.handleNext=function(n){document.body.scrollTop=0;var t;if(this.currentStep+=1,n.step=="NewAddress")this.newAddressFormInfo=n.formInfo,t="StartDate";else if(n.step=="StartDate")this.startDateFormInfo=n.formInfo,t="PersonalInfo";else if(n.step=="PersonalInfo")this.personalDetailsFormInfo=n.formInfo,t="ReviewSubmit";else{if(n.step=="ReviewSubmit"){this.reviewConfirmFormInfo=n.formInfo;this.step="Confirmation";this.confirmationDivHeight="300px";this.moveService.submitStartService(this.getStartServiceInfo(),this.onSubmitStartServiceComplete,this.onSubmitStartServiceError);return}if(n.step=="Confirmation"){this.confirmationContentOptions=n.formInfo;this.confirmationDivHeight="300px";t="Confirmation";this.onSubmitStartServiceError("");setTimeout(function(){$(".move-app").waitMe("hide")},10)}else console.error("Invalid Step.")}this.navstack.push(t);this.step=t},t.prototype.handleBack=function(){document.body.scrollTop=0;this.currentStep-=1;this.navstack.pop();this.step=this.navstack.peek()},t.prototype.getStartServiceInfo=function(){return{newAddressInfo:this.newAddressFormInfo,startDateInfo:this.startDateFormInfo,personalInfo:this.personalDetailsFormInfo,reviewConfirmFormInfo:this.reviewConfirmFormInfo,bpemIgnoreList:this.options.bpemIgnoreList}},Object.defineProperty(t.prototype,"stepHeading",{get:function(){var n=null;switch(this.currentStep){case 1:n=this.options.newAddressText;break;case 2:n=this.options.startDateText;break;case 3:n=this.options.personalInfoText;break;case 4:n=this.options.reviewSubmitText}return n},enumerable:!0,configurable:!0}),t.prototype.onSubmitStartServiceComplete=function(n){this.moveInSubmissionResult=n;this.confirmationDivHeight="auto"},t.prototype.onSubmitStartServiceError=function(){this.moveInSubmissionResult={IsSuccess:!1,AccountNumber:"",bpems:null,CustomerNumber:"",MoveInDocId:"",ServiceAddress:null,ServiceDate:"",selectedTimeSlot:"",isAppointmentRequired:!1,WereBPEMsRaised:!1,moveFailureError:"None"}},__decorate([i.Prop(Object)],t.prototype,"options",void 0),__decorate([i.Component({name:"StartServiceApp",components:{NewAddressForm:r["default"],StartDateForm:u["default"],PersonalInfoForm:f["default"],ReviewSubmitForm:e["default"],Confirmation:o["default"]},template:'<div class="move-app mt-2">\n                   <div v-if="step !== \'Confirmation\'">\n                        <div class="text-center progress_desktop">\n                            <div v-bind:class="[currentStep == 1 ? desktopActiveStepCssClass: desktopInactiveStepCssClass ]">\n                                <div class="circle">1<\/div>\n                                {{options.newAddressText}}\n                            <\/div>\n                            <div v-bind:class="[currentStep == 2 ? desktopActiveStepCssClass: desktopInactiveStepCssClass ]">\n                                <div class="circle">2<\/div>\n                                {{options.startDateText}}\n                            <\/div>\n                            <div v-bind:class="[currentStep == 3 ? desktopActiveStepCssClass: desktopInactiveStepCssClass ]">\n                                <div class="circle">3<\/div>\n                               {{options.personalInfoText}}\n                            <\/div>\n                            <div v-bind:class="[currentStep == 4 ? desktopActiveStepCssClass: desktopInactiveStepCssClass ]">\n                                <div class="circle">4<\/div>\n                                {{options.reviewSubmitText}}\n                            <\/div>                           \n                        <\/div>\n\n                        <div class="text-center progress_mobile">\n                            <div class="pbarmobilecontainer">\n                                <p>Step {{currentStep}} of 4: <strong>{{stepHeading}}<\/strong><\/p>\n                                <div style="padding-left:auto; padding-right:auto;">\n                                    <div v-bind:class="[currentStep == 1 ? mobileActiveStepCssClass : mobileInactiveStepCssClass ]"><\/div>\n                                    <div v-bind:class="[currentStep == 2 ? mobileActiveStepCssClass : mobileInactiveStepCssClass ]"><\/div>\n                                    <div v-bind:class="[currentStep == 3 ? mobileActiveStepCssClass : mobileInactiveStepCssClass ]"><\/div>\n                                    <div v-bind:class="[currentStep == 4 ? mobileActiveStepCssClass : mobileInactiveStepCssClass ]"><\/div>\n                               <\/div>\n                           <\/div>\n                       <\/div>\n\n                        <div class="mt-5 mb-5 move-app__outer_div">\n                            <keep-alive>\n                                <NewAddressForm v-if="step === \'NewAddress\'"\n                                            :content=options.newAddressFormContent\n                                            :moveService=moveService>\n                                <\/NewAddressForm>\n                                <StartDateForm v-if="step === \'StartDate\'"\n                                        :content=options.startDateFormContent\n                                        :serviceAddress=newAddressFormInfo.serviceAddress\n                                        :moveService=moveService>\n                                <\/StartDateForm>\n                                <PersonalInfoForm v-if="step === \'PersonalInfo\'"\n                                        :content=options.personalInfoFormContent\n                                        :customerDetails=options.customerDetails\n                                        :isUserAuthenticated=options.isUserAuthenticated\n                                        :moveService=moveService><\/PersonalInfoForm>\n                                <ReviewSubmitForm v-if="step === \'ReviewSubmit\'"\n                                        :content=options.reviewSubmitFormContent\n                                        :isUserAuthenticated = options.isUserAuthenticated\n                                        :startServiceInfo="getStartServiceInfo()"><\/ReviewSubmitForm>\n                            <\/keep-alive>                        \n                        <\/div>\n                    <\/div>\n                    <div v-else :style="{height: confirmationDivHeight}">                        \n                        <Confirmation :result="moveInSubmissionResult"  :content=options.confirmationPageContent><\/Confirmation>\n                    <\/div>                   \n                <\/div>'})],t)}(i.Vue);t["default"]=l});define("apps/stop-service/confirmation",["require","exports","vue-property-decorator"],function(n,t,i){Object.defineProperty(t,"__esModule",{value:!0});var r=function(n){function t(){var t=n!==null&&n.apply(this,arguments)||this;return t.requestAlreadyExistsError=!1,t.showTimeSlot=!1,t}return __extends(t,n),t.prototype.mounted=function(){$(".move-app").waitMe({effect:"rotation",text:this.content.requestProcessingStatusText,fontSize:"24px",color:"darkblue"});this.showTimeSlot=this.info.moveOutStartTime!==""||this.info.moveOutEndTime!==""},t.prototype.OnInfoReceived=function(n){n!=null&&(this.info.submissionResult.moveFailureError==="RequestAlreadyExists"&&(this.requestAlreadyExistsError=!0),$(".move-app").waitMe("hide"))},__decorate([i.Prop(Object)],t.prototype,"info",void 0),__decorate([i.Prop(Object)],t.prototype,"content",void 0),__decorate([i.Watch("info")],t.prototype,"OnInfoReceived",null),__decorate([i.Component({template:'<div class="move-app confirmation_moveout_text">\n                <div v-if="info && info.submissionResult">\n                   <div v-if="info.submissionResult.isSuccess">\n                       <h5 class="text-center font-weight-bold">{{content.stopServiceApprovalText}}<\/h5>\n                       <div class="move-app__moveout_confirmation_page confirmation_moveout_appt_details text-center px-3 py-3">\n                             <p>{{content.appointmentAtText}}:<\/p>\n                             <div class="mb-2 font-weight-bold">\n                                 <div>{{info.serviceAddress.houseNumber}} {{info.serviceAddress.street}} {{info.serviceAddress.houseSupplement}}<\/div>\n                                 <div>{{info.serviceAddress.city}}, {{info.serviceAddress.state}} {{info.serviceAddress.zip}}<\/div>\n                             <\/div>\n                             <p>{{content.scheduledForText}}:<\/p>\n                             <div class="font-weight-bold">\n                                 <div>{{info.moveOutDate}}<\/div>\n                                 <div v-if="showTimeSlot">{{info.moveOutStartTime}}-{{info.moveOutEndTime}}<\/div>\n                             <\/div>\n                             <div class="text-center font-weight-bold mt-3">\n                                 <div v-if="info.isCustomerMustBePresent" v-html=content.customerMustBePresentText><\/div>\n                                 <div v-else v-html=content.customerNeedNotBePresentText><\/div>\n                             <\/div>\n                       <\/div>\n                   <\/div>\n                   <div v-else-if="requestAlreadyExistsError" class="text-center">\n                        <h5 class="font-weight-bold">{{content.moveOutAlreadyCreatedText}}<\/h5>\n                   <\/div>\n                    <div v-else class="text-center">\n                        <h5 class="font-weight-bold">{{content.additionalReviewText}}<\/h5>\n                        <div class="move-app__moveout_confirmation_page confirmation_moveout_appt_details text-center mt-3 mb-3">                            \n                            <h5>{{content.callContactCenterText}}:<\/h5>\n                            <h3 class="text-primary">845-452-2700<\/h3>\n                            <p>\n                                <div>Monday-Friday: 8am-6pm <\/div>\n                                <div>Saturday: 9am-1pm <\/div>\n                            <\/p>\n                        <\/div>\n                    <\/div>\n\n                    <div v-if="info.submissionResult.isSuccess" class="move-app__moveout_confirmation_page mt-3 mb-3 px-3 py-3">\n                        <p><label>{{content.customerNumberLabel}}:<\/label> {{info.submissionResult.customerNumber}}<\/p>\n                        <p><label>{{content.accountNumberLabel}}:<\/label> {{info.accountDisplayNumber}}<\/p>\n                    <\/div>\n                    <h5 class="text-center mb-3 font-weight-bold">{{content.thankYouText}}<\/h5>\n                    <div class="move-app__moveout_confirmation_page mt-3 mb-3">\n                        <h5 class="font-weight-bold">{{content.noteHeading}}:<\/h5>\n                        <div class="mb-3">{{content.noteText}}<\/div>\n                        <h5 class="font-weight-bold">{{content.winterWarningHeading}}:<\/h5>\n                        <div class="mb-3">{{content.winterWarningText}}  <\/div>\n                    <\/div>\n                 <\/div>\n               <\/div>'})],t)}(i.Vue);t["default"]=r});define("apps/stop-service/contact-info",["require","exports","vue-property-decorator","utils/form-validator","utils/mask","apps/utils/event-bus","apps/components/account-chooser/account-chooser","services/accounts-service"],function(n,t,i,r,u,f,e,o){Object.defineProperty(t,"__esModule",{value:!0});var s=function(n){function t(){var t=n.call(this)||this;return t.account=null,t.customerNumber="",t.firstName="",t.lastName="",t.email="",t.phone="",t.primaryPhone=1,t.houseNo="",t.street="",t.city="",t.state="NY",t.zip="",t.accountNumber="",t.accountDisplayNumber="",t.countryList=[],t.selectedCountry="United States",t.hasUserSubmitted=!1,t.isAuthenticated=!1,t.canStopService=!1,t.showCannotBeStoppedMsg=!1,t.currErrorMessage="",t.allRelatedAccounts=[],t.accountChooserMode=0,t.states=["NY","AL","AK","AZ","AR","CA","CO","CT","DE","DC","FL","GA","HI","ID","IL","IN","IA","KS","KY","LA","ME","MD","MA","MI","MN","MS","MO","MT","NE","NV","NH","NJ","NM","NC","ND","OH","OK","OR","PA","RI","SC","SD","TN","TX","UT","VT","VA","WA","WV","WI","WY","PR","VI"],t.accountsService=new o["default"](null),t}return __extends(t,n),t.prototype.created=function(){this.accountsService.getActiveAccount(this.checkUserAuthenticatedStatus)},t.prototype.mounted=function(){this.customerNumber=this.content.customerNumber;this.firstName=this.content.firstName;this.lastName=this.content.lastName;this.email=this.content.email;this.phone=this.content.primaryPhone==0?this.content.telePhone:this.content.mobile;this.countryList=this.content.countryList},t.prototype.beforeUpdate=function(){$("#phoneNumber").mask("000-000-0000");$("#zip").mask("00000")},Object.defineProperty(t.prototype,"showPhoneError",{get:function(){return this.phone==null?($("#serverErrorMessage").waitMe("hide"),!0):!r["default"].validatePhoneNumber(u["default"].getRawValue(this.phone))&&this.hasUserSubmitted},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"showZipError",{get:function(){return(this.zip===null||isNaN(parseInt(this.zip)))&&this.hasUserSubmitted},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"showHouseNoError",{get:function(){return!/.*[0-9].*/.test(this.houseNo)&&this.hasUserSubmitted},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isValid",{get:function(){var n=r["default"].validatePhoneNumber(u["default"].getRawValue(this.phone)),t=/.*[0-9].*/.test(this.houseNo),i=this.street!=="",f=this.city!=="",e=this.state!=="",o=this.zip!==""&&!isNaN(parseInt(this.zip));return n&&t&&i&&f&&e&&o},enumerable:!0,configurable:!0}),t.prototype.checkUserAuthenticatedStatus=function(n){if(n.result){this.isAuthenticated=!0;this.allRelatedAccounts=n.accounts;this.accountNumber=n.activeAccount.accountNumber;this.accountDisplayNumber=n.activeAccount.accountDisplayNumber;this.onAccountFound(__assign({},n.activeAccount,{accountNumber:n.activeAccount.accountNumber}))}},t.prototype.emitForm=function(n){if(n.preventDefault(),this.isValid){var t={customerNumber:this.customerNumber,firstName:this.firstName,lastName:this.lastName,email:this.email,telePhone:this.content.primaryPhone==0?this.phone:this.content.telePhone,mobile:this.content.primaryPhone==1?this.phone:this.content.mobile,primaryPhone:this.content.primaryPhone,accountNumber:this.accountNumber,accountDisplayNumber:this.accountDisplayNumber,mailingAddress:{houseNumber:this.houseNo,houseSupplement:"",street:this.street,city:this.city,state:this.state,zip:this.zip}};f["default"].$emit("next-step",{step:"ContactInfo",formInfo:t})}else this.hasUserSubmitted=!0},t.prototype.emitBack=function(n){n.preventDefault();f["default"].$emit("previous-step",{})},t.prototype.onAccountFound=function(n){$(".contact-info-form").waitMe({effect:"rotation"});this.account=n;this.moveOutService.canStopService(n.accountNumber,this.onCanStopServiceComplete,this.onCanStopServiceError)},t.prototype.onCanStopServiceComplete=function(n){this.canStopService=n;n==!1&&(this.showCannotBeStoppedMsg=!0);$(".contact-info-form").waitMe("hide")},t.prototype.onCanStopServiceError=function(n){this.currErrorMessage=n;$(".contact-info-form").waitMe("hide")},__decorate([i.Prop(Object)],t.prototype,"content",void 0),__decorate([i.Prop(Object)],t.prototype,"moveOutService",void 0),__decorate([i.Component({name:"ContactInfo",components:{AccountChooser:e["default"]},template:'\n                 <div class="contact-info-form">\n                     <form action="#" @submit.prevent="emitForm">\n                        <h4 class="text-center move-app__heading">{{content.stopServiceAddressHeading}} <\/h4>\n                        <account-chooser v-if="isAuthenticated && allRelatedAccounts.length > 1"\n                                :activeAccount="account"\n                                :accounts="allRelatedAccounts"\n                                :accountChooserOptions="content.accountChooser"\n                                :selectMode="accountChooserMode"\n                                v-on:account-found="onAccountFound"\n                            ><\/account-chooser>\n                      <div v-if="canStopService">\n                        <div class="mt-3">\n                            <h5 class="text-center move-app__heading">{{content.reviewContactInfoHeading}}<\/h5>\n                            <div class="col-12 mt-2">\n                                 <label class="move-app__label move-app__text">{{content.firstNameLabel}}<\/label>\n                                 <input type="text" readonly class="form-control" v-model="firstName"/>\n                            <\/div>\n                             <div class="col-12 mt-3">\n                                 <label class="move-app__label move-app__text">{{content.lastNameLabel}}<\/label>\n                                 <input type="text" readonly class="form-control" v-model="lastName"/>\n                            <\/div>\n                             <div class="col-12 mt-3">\n                                 <label class="move-app__label move-app__text">{{content.emailLabel}}<\/label>\n                                 <input type="text" readonly class="form-control" v-model="email"/>\n                            <\/div>\n                            <div class="col-12 mt-3">\n                                 <label v-if="content.primaryPhone === 0" class="move-app__label move-app__text">{{content.phoneNumberLabel}}<\/label>\n                                 <label v-else class="move-app__label move-app__text">{{content.cellNumberLabel}}<\/label>\n                                 <div class="text-secondary"><i>### - ### - ####<\/i><\/div>\n                                 <input type="text" id="phoneNumber" class="form-control" v-model="phone"/>\n                                 <p v-show="showPhoneError" class="form__error mt-0 mb-0">{{content.enterValidPhoneNumberText}}<\/p>\n                            <\/div>\n                        <\/div>\n\n                        <!-- M A I L I N G   A D D R E S S -->\n                        <div class="mt-5 px-3">\n                            <h5 class="text-center move-app__heading">{{content.mailingAddressHeading}}<\/h5>\n\n                            <div class="row mt-3">\n                                <div class="col-md-6 form-group">\n\t\t\t                        <label class="move-app__label move-app__text" for="houseNo">{{content.houseNoLabel}}<\/label>\n    \t\t\t                    <input type="text" class="form-control" v-model="houseNo" maxlength="10"/>\n\t\t\t                        <p v-show="showHouseNoError" class="form__error mt-0 mb-0">{{content.enterValidHouseNoText}}<\/p>\n    \t\t                    <\/div>\n                                <div class="col-md-6 form-group">\n                                    <label class="move-app__label move-app__text">{{content.addressLabel}}<\/label>\n                                    <input type="text" class="form-control" v-model="street"/>\n                                    <p v-show="street==\'\' && hasUserSubmitted" class="form__error mt-0 mb-0">{{content.enterValidAddressText}}<\/p>\n                                <\/div>\n                            <\/div>\n\n                            <div class="row mt-3">\n                                <div class="col-md-6 form-group">\n                                    <label class="move-app__label move-app__text">{{content.cityLabel}}<\/label>\n                                    <input type="text" class="form-control" v-model="city" />\n                                    <p v-show="city==\'\' && hasUserSubmitted" class="form__error mt-0 mb-0">{{content.enterValidCityText}}<\/p>\n                                <\/div>\n                                <div class="col-md-3 form-group">\n                                    <label class="move-app__label move-app__text">{{content.stateLabel}}<\/label>\n                                   <select id="idState" v-model="state" required class="custom-select">\n                                    <option v-for="state in states" :value="state">{{state}}<\/option>\n                                    <\/select>\n                                     <div class="invalid-feedback">\n                                        Please provide a valid state.\n                                    <\/div>\n                                <\/div>                \n                                <div class="col-md-3 form-group">\n                                    <label class="move-app__label move-app__text">{{content.zipCodeLabel}}<\/label>\n                                    <input type="text" class="form-control" v-model="zip" id="zip" />\n                                    <p v-show="showZipError" class="form__error mt-0 mb-0">{{content.enterValidZipText}}<\/p>\n                                <\/div>\n                            <\/div>\n                            \n                            <div class="row mt-3 d-none">\n                                <div class="col-6">\n                                    <label class="move-app__label move-app__text">{{content.countryLabel}}<\/label>\n                                    <select v-model="selectedCountry">\n                                        <option v-for="country in countryList" v-bind:value="country">\n                                            {{country}}\n                                        <\/option>\n                                   <\/select>\n                               <\/div>\n                            <\/div>\n                        <\/div>\n\n                        <div class="col-12 text-right form-group">                               \n                            <button type="submit" class="button button--default mt-4"> {{content.nextButtonLabel}} <\/button>\n                        <\/div>\n                    <\/div>\n                    <div v-if="showCannotBeStoppedMsg" class="mt-3">\n                        <div class="alert alert-danger">{{content.serviceCannotBeStoppedText}}<\/div>\n                    <\/div>\n                    <div v-if="currErrorMessage" class="mt-3" id="serverErrorMessage">\n                        <div class="alert alert-danger">{{currErrorMessage}}<\/div>\n                    <\/div>\n                <\/form>\n            <\/div>\n                '})],t)}(i.Vue);t["default"]=s});define("apps/stop-service/review-submit",["require","exports","vue-property-decorator","apps/utils/event-bus"],function(n,t,i,r){Object.defineProperty(t,"__esModule",{value:!0});var u=function(n){function t(){var t=n!==null&&n.apply(this,arguments)||this;return t.serviceAddress=null,t.showTimeSlot=!1,t}return __extends(t,n),t.prototype.mounted=function(){this.getAddress();this.showTimeSlot=this.stopServiceInfo.stopDateInfo.moveOutStartTime!==""||this.stopServiceInfo.stopDateInfo.moveOutEndTime!==""},t.prototype.getAddress=function(){this.serviceAddress=this.stopServiceInfo.stopDateInfo.serviceAddress;this.serviceAddress!=null&&(this.serviceAddress.houseNumber=="undefined"&&(this.serviceAddress.houseNumber=""),this.serviceAddress.houseSupplement=="undefined"&&(this.serviceAddress.houseSupplement=""))},t.prototype.emitForm=function(n){n.preventDefault();r["default"].$emit("next-step",{step:"ReviewSubmit"})},t.prototype.emitBack=function(n){n.preventDefault();r["default"].$emit("previous-step",{})},__decorate([i.Prop(Object)],t.prototype,"content",void 0),__decorate([i.Prop(Object)],t.prototype,"stopServiceInfo",void 0),__decorate([i.Component({template:'\n                 <div class="review-submit-form">                   \n                     <form action="#" @submit.prevent="emitForm">\n                        <h4 class="text-center move-app__heading">{{content.reviewSubmitHeading}} <\/h4>\n                       \n                        <div v-if="serviceAddress" class="col-12 form-group mt-5">\n                            <label class="move-app__label">{{content.serviceAddressLabel}}<\/label>\n                            <div>{{serviceAddress.houseNumber}} {{serviceAddress.street}} {{serviceAddress.houseSupplement}}<\/div>\n                            <div>{{serviceAddress.city}}, {{serviceAddress.state}} {{serviceAddress.zip}}<\/div>\n                        <\/div>\n                         <div class="col-12 form-group mt-3">\n                            <label class="move-app__label">{{content.stopDateLabel}}<\/label>\n                            <div>{{stopServiceInfo.stopDateInfo.moveOutDate}}<\/div>\n                            <div v-if="showTimeSlot">\n                                  {{stopServiceInfo.stopDateInfo.moveOutStartTime}}-{{stopServiceInfo.stopDateInfo.moveOutEndTime}}\n                            <\/div>\n                        <\/div>\n                        <hr>\n                         <div class="col-12 form-group mt-5">\n                            <label class="move-app__label">{{content.newMailingAddressLabel}}<\/label>\n                            <div>{{stopServiceInfo.contactInfo.mailingAddress.houseNumber}} {{stopServiceInfo.contactInfo.mailingAddress.street}}<\/div>\n                            <div>{{stopServiceInfo.contactInfo.mailingAddress.city}}, {{stopServiceInfo.contactInfo.mailingAddress.state}} {{stopServiceInfo.contactInfo.mailingAddress.zip}}<\/div>\n                        <\/div>\n                        <div class="col-12 form-group mt-3">\n                            <label class="move-app__label">{{content.finalBillLabel}}<\/label>\n                            <div v-if="stopServiceInfo.stopDateInfo.finalBillCalculation === \'SendSomeOneForMeterRead\'">\n                                {{content.sendSomeoneToReadMeterText}}\n                            <\/div>\n                            <div v-else>\n                                {{content.sendEstimatedBillText}}\n                            <\/div>\n                        <\/div>\n                        <div class="col-12 text-right form-group">\n                                 <a href="#" value="" v-on:click="emitBack" class="button button--default backButton mr-4">{{content.backButtonLabel}}<\/a>\n                                <button type="submit" class="button button--default mt-4"> {{content.submitButtonLabel}} <\/button>\n                        <\/div>\n                     <\/form>                  \n                 <\/div>\n            '})],t)}(i.Vue);t["default"]=u});define("apps/stop-service/stop-date",["require","exports","vue-property-decorator","apps/utils/event-bus"],function(n,t,i,r){Object.defineProperty(t,"__esModule",{value:!0});var u=function(n){function t(){var t=n!==null&&n.apply(this,arguments)||this;return t.isCustomerMustBePresent=!1,t.stopDateAppointmentResult=null,t.showTimeSlots=!1,t.selectedDate="",t.selectedTime={startTime:"",duration:0,endTime:""},t.selectOne={startTime:"",duration:0,endTime:""},t.currErrorMessage="",t.finalBillCalc="estimate",t}return __extends(t,n),t.prototype.created=function(){document.body.addEventListener("scroll",this.handleScroll);this.stopDateAppointmentInput={accountNumber:this.accountNumber,moveOutStopDateDelay:this.moveOutStopDateDelay};this.moveOutService.getAppointmentScheduleSlots(this.stopDateAppointmentInput,this.onGetAppointmentScheduleSlotsComplete,this.onGetAppointmentScheduleSlotsError)},t.prototype.mounted=function(){var n=this;n.prepForm(n);$("#idStopDate").mask("00/00/0000");$(".stop-date-form").waitMe({effect:"rotation"})},t.prototype.destroyed=function(){document.body.removeEventListener("scroll",this.handleScroll)},Object.defineProperty(t.prototype,"availableTimeSlots",{get:function(){var t=this,n;return this.selectedDate!=""?(n=this.stopDateAppointmentResult.schedules.filter(function(n){var i=t.getDateStr(new Date(n.date));return i==t.selectedDate}),this.selectedTime=this.selectOne,n.length>0?n[0].availableTimeSlots:null):null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isDisabled",{get:function(){return this.selectedDate==""||this.showTimeSlots&&this.selectedTime.startTime==""||this.finalBillCalc==""?!0:!1},enumerable:!0,configurable:!0}),t.prototype.OnAccountNumberChanged=function(n,t){n!==t&&($(".stop-date-form").waitMe({effect:"rotation"}),this.stopDateAppointmentInput.accountNumber=n,console.log("newAccountNo: "+n),this.moveOutService.getAppointmentScheduleSlots(this.stopDateAppointmentInput,this.onGetAppointmentScheduleSlotsComplete,this.onGetAppointmentScheduleSlotsError))},t.prototype.prepForm=function(n){var t=this,i="+"+this.moveOutStopDateDelay.toString()+"d",r="+"+(this.moveOutStopDateDelay+30).toString()+"d";$(".date").datepicker({format:"mm/dd/yyyy",startDate:i,endDate:r}).on("changeDate",function(i){i.date!==undefined&&(n.selectedDate=t.getDateStr(i.date))})},t.prototype.getDateStr=function(n){return n.toLocaleDateString("en-US",{year:"numeric",month:"2-digit",day:"2-digit"})},t.prototype.handleScroll=function(){$(".date").datepicker("hide");$(".date").blur()},t.prototype.emitForm=function(){if(!this.isDisabled){if(document.forms.formStep2.checkValidity()){var n={moveOutDate:this.selectedDate,moveOutStartTime:this.selectedTime.startTime,moveOutEndTime:this.selectedTime.endTime,isAppointmentRequired:this.stopDateAppointmentResult.isAppointmentRequired,isCustomerMustBePresent:this.isCustomerMustBePresent,serviceAddress:this.stopDateAppointmentResult.serviceAddress,finalBillCalculation:this.finalBillCalc=="read"?"SendSomeOneForMeterRead":"SendEstimatedBill"};r["default"].$emit("next-step",{step:"StopDate",formInfo:n})}$("#formStep2").addClass("was-validated")}},t.prototype.emitBack=function(n){n.preventDefault();$("#formStep2").removeClass("was-validated");r["default"].$emit("previous-step",{})},t.prototype.onGetAppointmentScheduleSlotsComplete=function(n){this.stopDateAppointmentResult=n;this.isCustomerMustBePresent=n.isCustomerMustBePresent;this.selectedTime=this.selectOne;n.schedules.length>0&&(this.selectedDate=n.schedules[0].date,n.schedules[0].availableTimeSlots[0].duration!=0&&(this.showTimeSlots=!0));$(".date").datepicker("setDate",new Date(this.selectedDate));$(".date").datepicker("setDatesDisabled",n.datesNotAvailable);$(".stop-date-form").waitMe("hide")},t.prototype.onGetAppointmentScheduleSlotsError=function(n){$(".stop-date-form").waitMe("hide");this.currErrorMessage=n},__decorate([i.Prop(Object)],t.prototype,"content",void 0),__decorate([i.Prop(String)],t.prototype,"accountNumber",void 0),__decorate([i.Prop(Number)],t.prototype,"moveOutStopDateDelay",void 0),__decorate([i.Prop(Object)],t.prototype,"moveOutService",void 0),__decorate([i.Watch("accountNumber")],t.prototype,"OnAccountNumberChanged",null),__decorate([i.Component({template:'\n                <div class="stop-date-form">\n                     <form id="formStep2" action="#" @submit.prevent="emitForm" class="needs-validation" novalidate>\n\n                        <!-- H E A D I N G -->\n                        <h4 class="text-center move-app__heading mb-3">{{content.serviceEndQuestionHeading}}<\/h4>\n\n                        <!-- D E S C R I P T I O N -->\n                        <div class="row mb-3">\n                            <div class="col-1" />\n                            <div class="col-10 move-app__info-box">\n                                {{content.serviceEndQuestionDescription}}\n                            <\/div>\n                            <div class="col-1" />\n                        <\/div>\n\n                        <!-- D A T E -->\n                        <div class="row mb-3">\n                            <div class="col-1" />\n                            <div class="col-10">\n                                <label class="move-app__label">{{content.stopDateLabel}}<\/label>\n                                <div class="text-secondary">MM / DD / YYYY<\/div>\n                                <div class="input-group date mb-3">\n                                    <input id="idStopDate" type="text" class="inline form-control-plaintext" v-model="selectedDate" required>\n                                    <div class="input-group-append">\n                                        <span class="move-app__calendarIcon input-group-text bg-transparent"><i class="fa fa-calendar"><\/i><\/span>\n                                    <\/div>\n                                    <div class="invalid-feedback">{{content.missingStopDateText}}<\/div>\n                                <\/div>\n                            <\/div>\n                            <div class="col-1" />\n                        <\/div>\n\n                        <!-- T I M E -->\n                        <div class="row mb-3">\n                            <div class="col-1" />\n                            <div class="col-10">\n                                <div v-if="showTimeSlots">\n                                    <label class="move-app__label">{{content.stopTimeLabel}}<\/label>\n                                    <select v-model="selectedTime">\n                                        <option v-bind:value="this.selectOne">-- Select one --<\/option>\n                                        <option v-for="timeSlot in availableTimeSlots" v-bind:value="timeSlot">\n                                            {{timeSlot.startTime}} - {{timeSlot.endTime}}\n                                        <\/option>\n                                    <\/select>\n                                <\/div>\n                            <\/div>             \n                            <div class="col-1" />\n                        <\/div>\n\n                        <!-- P R E S E N T -->\n                        <p class="col-12 mb-3 text-center move-app__text">\n                            <span v-if="isCustomerMustBePresent" v-html=content.customerMustBePresentText><\/span>\n                            <span v-else v-html=content.customerNeedNotBePresentText><\/span>\n                        <\/p>\n\n                        <!-- F I N A L . . B I L L . . H E A D I N G -->\n                        <h5 class="text-center move-app__heading mb-3">{{content.calcFinalBillHeading}}<\/h5>\n\n                        <!-- R A D I O . . B U T T O N S -->\n                        <div class="row mb-3">\n                            <div class="col-md-1" />\n                            <div class="col-md-10 move-app__radio-buttons">\n                                <div class="mt-2">\n                                    <label class="radio-label move-app__radio-button-label px-3" for="idFinalBillRead">\n                                        <input name="finalBill" type="radio" id="idFinalBillRead" value="read" v-model="finalBillCalc" />\n                                        <span>{{content.finalBillReadText}}<\/span>\n                                    <\/label>\n                                    <!-- <br /> -->\n                                    <label class="radio-label move-app__radio-button-label px-3" for="idFinalBillEstimate">\n                                        <input name="finalBill" type="radio" id="idFinalBillEstimate" value="estimate" v-model="finalBillCalc" />\n                                        <span>{{content.finalBillEstimateText}}<\/span>\n                                    <\/label>\n                                    <div class="invalid-feedback">{{content.missingFinalBillText}}<\/div>\n                                <\/div>\n                            <\/div>\n                            <div class="col-md-1" />\n                        <\/div>\n\n                        <!-- [B A C K] . . [N E X T] -->\n                        <div class="col-12 text-right form-group">\n                            <a href="#" value="" v-on:click="emitBack" class="button button--default backButton mr-4">{{content.backButtonLabel}}<\/a>\n                            <button id="idNextBtn" type="submit" class="button button--default mt-4" v-bind:class="{disabled: isDisabled}">{{content.nextButtonLabel}}<\/button>\n                        <\/div>\n\n                        <div v-show="currErrorMessage!=\'\'" class="row mt-3 mx-1">\n                            <div class="col">\n                                <div class="alert alert-danger">{{currErrorMessage}}<\/div>\n                            <\/div>\n                        <\/div>\n                     <\/form>\n                <\/div>\n              '})],t)}(i.Vue);t["default"]=u});define("apps/stop-service/stop-service-app",["require","exports","vue-property-decorator","services/move-out-service","utils/stack","apps/utils/event-bus","apps/stop-service/confirmation","apps/stop-service/contact-info","apps/stop-service/review-submit","apps/stop-service/stop-date"],function(n,t,i,r,u,f,e,o,s,h){function l(n,t){var r=new i.Vue({el:"#"+n,data:{stopServiceAppOptions:t},components:{StopServiceApp:c}})}Object.defineProperty(t,"__esModule",{value:!0});t.init=l;var c=function(n){function t(){var t=n.call(this)||this;return t.navstack=new u["default"],t.step="",t.currentStep=1,t.currErrorMessage="",t.confirmationDivHeight="",t.moveOutSubmissionResult=null,t.desktopActiveStepCssClass="pbardesktop pbardesktop_activeblock",t.desktopInactiveStepCssClass="pbardesktop pbardesktop_inactiveblock",t.mobileActiveStepCssClass="pbarmobile pbarmobile_activeblock",t.mobileInactiveStepCssClass="pbarmobile pbarmobile_inactiveblock",t.moveOutService=new r["default"](t.options.apiUrl),t}return __extends(t,n),t.prototype.created=function(){f["default"].$on("next-step",this.handleNext);f["default"].$on("previous-step",this.handleBack);this.step="ContactInfo";this.navstack.push(this.step)},t.prototype.handleNext=function(n){var t;if(this.currentStep+=1,n.step=="ContactInfo")this.contactInfoFormInfo=n.formInfo,t="StopDate";else if(n.step=="StopDate")this.stopDateFormInfo=n.formInfo,t="ReviewSubmit";else{if(n.step=="ReviewSubmit"){this.step="Confirmation";this.confirmationDivHeight="300px";this.moveOutService.submitStopService(this.getStopServiceInfo(),this.onSubmitStopServiceComplete,this.onSubmitStopServiceError);return}console.error("Invalid Step.")}this.navstack.push(t);this.step=t},t.prototype.handleBack=function(){this.currentStep-=1;this.navstack.pop();this.step=this.navstack.peek()},Object.defineProperty(t.prototype,"stepHeading",{get:function(){var n=null;switch(this.currentStep){case 1:n=this.options.contactInfoText;break;case 2:n=this.options.stopDateText;break;case 3:n=this.options.reviewSubmitText}return n},enumerable:!0,configurable:!0}),t.prototype.getStopServiceInfo=function(){return{contactInfo:this.contactInfoFormInfo,stopDateInfo:this.stopDateFormInfo}},t.prototype.getConfirmationInfo=function(){return{submissionResult:this.moveOutSubmissionResult,accountDisplayNumber:this.contactInfoFormInfo.accountDisplayNumber,moveOutDate:this.stopDateFormInfo.moveOutDate,moveOutStartTime:this.stopDateFormInfo.moveOutStartTime,moveOutEndTime:this.stopDateFormInfo.moveOutEndTime,isAppointmentRequired:this.stopDateFormInfo.isAppointmentRequired,serviceAddress:this.stopDateFormInfo.serviceAddress}},t.prototype.onSubmitStopServiceComplete=function(n){this.moveOutSubmissionResult=n;this.confirmationDivHeight="auto"},t.prototype.onSubmitStopServiceError=function(){this.moveOutSubmissionResult={isSuccess:!1,bpems:null,customerNumber:"",moveOutDocId:"",wereBPEMsRaised:!1,moveFailureError:"None"};this.confirmationDivHeight="auto"},__decorate([i.Prop(Object)],t.prototype,"options",void 0),__decorate([i.Component({name:"StopServiceApp",components:{ContactInfoForm:o["default"],StopDateForm:h["default"],ReviewSubmitForm:s["default"],Confirmation:e["default"]},template:'<div class="move-app mt-2">\n                   <div v-if="step !== \'Confirmation\'">\n                        <div class="text-center progress_desktop">\n                            <div v-bind:class="[currentStep == 1 ? desktopActiveStepCssClass: desktopInactiveStepCssClass ]">\n                                <div class="circle">1<\/div>\n                                {{options.contactInfoText}}\n                            <\/div>\n                            <div v-bind:class="[currentStep == 2 ? desktopActiveStepCssClass: desktopInactiveStepCssClass ]">\n                                <div class="circle">2<\/div>\n                                {{options.stopDateText}}\n                            <\/div>\n                            <div v-bind:class="[currentStep == 3 ? desktopActiveStepCssClass: desktopInactiveStepCssClass ]">\n                                <div class="circle">3<\/div>\n                                {{options.reviewSubmitText}}\n                            <\/div>\n                        <\/div>\n\n                        <div class="text-center progress_mobile">\n                            <div class="pbarmobilecontainer">\n                                <p>Step {{currentStep}} of 3: <strong>{{stepHeading}}<\/strong><\/p>\n                                <div>\n                                    <div v-bind:class="[currentStep == 1 ? mobileActiveStepCssClass : mobileInactiveStepCssClass ]"><\/div>\n                                    <div v-bind:class="[currentStep == 2 ? mobileActiveStepCssClass : mobileInactiveStepCssClass ]"><\/div>\n                                    <div v-bind:class="[currentStep == 3 ? mobileActiveStepCssClass : mobileInactiveStepCssClass ]"><\/div>\n                               <\/div>\n                           <\/div>\n                       <\/div>\n\n                        <div class="mt-5 mb-5 move-app__moveout_outer_div">\n                            <keep-alive>\n                                <ContactInfoForm v-if="step === \'ContactInfo\'"\n                                    :content=options.contactInfoFormVm\n                                    :moveOutService=moveOutService>\n                                <\/ContactInfoForm>\n                                <StopDateForm v-if="step === \'StopDate\'"\n                                    :content=options.stopDateFormVm\n                                    :accountNumber=contactInfoFormInfo.accountNumber\n                                    :moveOutStopDateDelay=options.stopDateFormVm.moveOutStopDateDelay\n                                    :moveOutService=moveOutService>\n                                <\/StopDateForm>\n                                <ReviewSubmitForm v-if="step === \'ReviewSubmit\'"\n                                    :content=options.reviewSubmitFormVm\n                                    :stopServiceInfo="getStopServiceInfo()"><\/ReviewSubmitForm>\n                            <\/keep-alive>\n                        <\/div>\n                    <\/div>\n                    <div v-else :style="{height: confirmationDivHeight}">\n                        <Confirmation :info="getConfirmationInfo()"  :content=options.confirmationPageVm><\/Confirmation>\n                    <\/div>\n                <\/div>'})],t)}(i.Vue);t["default"]=c});define("apps/transfer-service/confirmation",["require","exports","vue-property-decorator"],function(n,t,i){Object.defineProperty(t,"__esModule",{value:!0});var r=function(n){function t(){var t=n!==null&&n.apply(this,arguments)||this;return t.requestAlreadyExistsError=!1,t}return __extends(t,n),t.prototype.mounted=function(){$(".move-app").waitMe({effect:"rotation",text:this.content.requestProcessingStatusText,fontSize:"24px",color:"darkblue"})},t.prototype.OnInfoReceived=function(n){n!=null&&(this.info.submissionResult.moveFailureError==="RequestAlreadyExists"&&(this.requestAlreadyExistsError=!0),$(".move-app").waitMe("hide"))},__decorate([i.Prop(Object)],t.prototype,"info",void 0),__decorate([i.Prop(Object)],t.prototype,"content",void 0),__decorate([i.Watch("info")],t.prototype,"OnInfoReceived",null),__decorate([i.Component({template:'<div class="move-app">\n                <div v-if="info && info.submissionResult">\n                   <div v-if="info.submissionResult.isSuccess">\n                       <h5 class="text-center font-weight-bold">{{content.transferServiceApprovalText}}<\/h5>                      \n                       <div class="move-app__confirmation_page confirmation_appt_details px-3 py-3">\n                             <h5 class="text-center">{{content.startServiceAppointmentDetailsHeading}}<\/h5>\n                             <label>{{content.startServiceLocationLabel}}<\/label>                            \n                             <div class="mb-2">\n                                 <div>{{info.startServiceAddress.houseNumber}} {{info.startServiceAddress.street}} {{info.startServiceAddress.houseSupplement}}<\/div>\n                                 <div>{{info.startServiceAddress.city}}, {{info.startServiceAddress.state}} {{info.startServiceAddress.zip}}<\/div>\n                             <\/div>\n                             <label>{{content.dateLabel}}<\/label>                            \n                             <div class="mb-2">{{info.startServiceDate}}<\/div>\n                             <label>{{content.timeSlotLabel}}<\/label>                            \n                             <div>{{info.submissionResult.selectedTimeSlot}}<\/div>\n                             <div v-if="info.isStartServiceAppointmentRequired" class="text-center font-weight-bold" v-html=content.customerMustBePresentText><\/div>\n                             <div v-else class="text-center font-weight-bold" v-html=content.customerNeedNotBePresentText><\/div>\n                       <\/div>\n                       <div class="move-app__confirmation_page confirmation_transfer_stop_appt_details px-3 py-3 mt-3">\n                             <h5 class="text-center">{{content.stopServiceAppointmentDetailsHeading}}<\/h5>\n                             <label>{{content.stopServiceLocationLabel}}<\/label>\n                             <div class="mb-2">\n                                 <div>{{info.stopServiceAddress.houseNumber}} {{info.stopServiceAddress.street}} {{info.stopServiceAddress.houseSupplement}}<\/div>\n                                 <div>{{info.stopServiceAddress.city}}, {{info.stopServiceAddress.state}} {{info.stopServiceAddress.zip}}<\/div>\n                             <\/div>\n                             <label>{{content.dateLabel}}<\/label>                            \n                             <div>{{info.stopServiceDate}}<\/div>\n                             <div v-if="info.isStopServiceAppointmentRequired" class="text-center font-weight-bold" v-html=content.customerMustBePresentText><\/div>\n                             <div v-else class="text-center font-weight-bold" v-html=content.customerNeedNotBePresentText><\/div>\n                       <\/div>\n                   <\/div>\n                   <div v-else-if="requestAlreadyExistsError" class="text-center">\n                        <h5 class="font-weight-bold">{{content.moveInAlreadyCreatedText}}<\/h5>\n                   <\/div>\n                   <div v-else class="text-center">\n                        <h5 class="font-weight-bold">{{content.additionalReviewText}}<\/h5>\n                        <div class="move-app__confirmation_page confirmation_additional_review text-center">\n                            <h5 class="font-weight-bold">{{content.callContactCenterText}}<\/h5>\n                        <\/div>\n                        <h3 class="text-primary mt-3">845-452-2700<\/h3>\n                        <p>\n                            <div>Monday-Friday: 8am-6pm <\/div>\n                            <div>Saturday: 9am-1pm <\/div>\n                        <\/p>\n                   <\/div>\n\n                    <div v-if="info.submissionResult.isSuccess">\n                        <div class="move-app__confirmation_page confirmation_acct_details mt-3 mb-3 px-3 py-3">\n                            <h5 class="text-center">{{content.accountInformationHeader}}<\/h5>                        \n                            <p><label>{{content.customerNumberLabel}}<\/label> {{info.submissionResult.customerNumber}}<\/p>\n                            <p><label>{{content.accountNumberLabel}}<\/label> {{info.submissionResult.moveInAccountNumber}}<\/p>\n                        <\/div>\n                        <div class="text-center mb-3">{{content.emailConfirmationFollowText}}<\/div>\n                    <\/div>\n\n                    <div class="text-center mb-3 font-weight-bold">{{content.thankYouText}}<\/div>                   \n                 <\/div>\n               <\/div>'})],t)}(i.Vue);t["default"]=r});define("apps/transfer-service/current-address",["require","exports","vue-property-decorator","apps/utils/event-bus","apps/components/account-chooser/account-chooser","services/accounts-service"],function(n,t,i,r,u,f){Object.defineProperty(t,"__esModule",{value:!0});var e=function(n){function t(){var t=n.call(this)||this;return t.account=null,t.isCustomerMustBePresent=!1,t.isAppointmentRequired=!1,t.stopDateAppointmentResult=null,t.showTimeSlots=!1,t.nextBtnClicked=!1,t.selectedDate="",t.selectedTime={startTime:"",duration:0,endTime:""},t.selectOne={startTime:"",duration:0,endTime:""},t.currErrorMessage="",t.finalBillCalc="estimate",t.accountNumber="",t.isAuthenticated=!1,t.activeAccounts=[],t.accountChooserMode=0,t.canStopService=!1,t.showCannotBeStoppedMsg=!1,t.showCurrErrorMsg=!1,t.accountsService=new f["default"](null),t}return __extends(t,n),t.prototype.created=function(){document.body.addEventListener("scroll",this.handleScroll);this.accountsService.getActiveAccount(this.checkUserAuthenticatedStatus)},t.prototype.mounted=function(){$(".current-address-form").waitMe({effect:"rotation"});var n=this;n.prepForm(n)},Object.defineProperty(t.prototype,"availableTimeSlots",{get:function(){var t=this,n;return this.selectedDate!=""?(n=this.stopDateAppointmentResult.schedules.filter(function(n){var i=t.getDateStr(new Date(n.date));return i==t.selectedDate}),this.selectedTime=this.selectOne,n.length>0?n[0].availableTimeSlots:null):null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isDisabled",{get:function(){return this.selectedDate==""||this.showTimeSlots&&this.selectedTime.startTime==""||this.finalBillCalc==""||this.showCannotBeStoppedMsg?!0:!1},enumerable:!0,configurable:!0}),t.prototype.handleScroll=function(){$(".date").datepicker("hide");$(".date").blur()},t.prototype.checkUserAuthenticatedStatus=function(n){if(n.result){if(this.isAuthenticated=!0,this.activeAccounts=n.accounts.filter(function(n){return n.isActive==!0}),n.activeAccount.isActive){this.accountNumber=n.activeAccount.accountNumber;this.onAccountFound(__assign({},n.activeAccount,{accountNumber:n.activeAccount.accountNumber}))}else{this.accountNumber=this.activeAccounts[0].accountNumber;this.onAccountFound(__assign({},this.activeAccounts[0],{accountNumber:this.activeAccounts[0].accountNumber}))}console.log("accountNumber: "+this.accountNumber);this.stopService.getAppointmentScheduleSlots({accountNumber:this.accountNumber,moveOutStopDateDelay:this.transferStopDateDelay},this.onGetAppointmentScheduleSlotsComplete,this.onGetAppointmentScheduleSlotsError)}},t.prototype.emitForm=function(){if(!this.isDisabled){var n={moveOutDate:this.selectedDate,moveOutStartTime:this.selectedTime.startTime,moveOutEndTime:this.selectedTime.endTime,isCustomerMustBePresent:this.isCustomerMustBePresent,isAppointmentRequired:this.isAppointmentRequired,finalBillCalculation:this.finalBillCalc=="read"?"SendSomeOneForMeterRead":"SendEstimatedBill",accountNumber:this.accountNumber,serviceAddress:this.stopDateAppointmentResult.serviceAddress};r["default"].$emit("next-step",{step:"CurrentAddress",formInfo:n})}this.nextBtnClicked=!0},t.prototype.prepForm=function(n){var t=this,i="+"+this.transferStopDateDelay.toString()+"d",r="+"+(this.transferStopDateDelay+30).toString()+"d";$(".date").datepicker({format:"mm/dd/yyyy",startDate:i,endDate:r,autoclose:!0}).on("changeDate",function(i){i.date!==undefined&&(n.selectedDate=t.getDateStr(i.date))})},t.prototype.getDateStr=function(n){return n.toLocaleDateString("en-US",{year:"numeric",month:"2-digit",day:"2-digit"})},t.prototype.onGetAppointmentScheduleSlotsComplete=function(n){this.showCurrErrorMsg=!1;this.stopDateAppointmentResult=n;this.isCustomerMustBePresent=n.isCustomerMustBePresent;this.isAppointmentRequired=n.isAppointmentRequired;this.selectedTime=this.selectOne;n.schedules.length>0&&(this.selectedDate=n.schedules[0].date,n.schedules[0].availableTimeSlots[0].duration!=0&&(this.showTimeSlots=!0));$(".date").datepicker("setDate",new Date(this.selectedDate));$(".date").datepicker("setDatesDisabled",n.datesNotAvailable);$(".current-address-form").waitMe("hide")},t.prototype.onGetAppointmentScheduleSlotsError=function(n){$(".current-address-form").waitMe("hide");this.currErrorMessage=n;this.showCurrErrorMsg=!0},t.prototype.onAccountFound=function(n){$(".current-address-form").waitMe({effect:"rotation"});this.account=n;this.stopService.canStopService(n.accountNumber,this.onCanStopServiceComplete,this.onCanStopServiceError)},t.prototype.onCanStopServiceComplete=function(n){this.canStopService=n;n==!1&&(this.showCannotBeStoppedMsg=!0);this.showCurrErrorMsg=!1;$(".current-address-form").waitMe("hide")},t.prototype.onCanStopServiceError=function(n){this.currErrorMessage=n;this.showCurrErrorMsg=!0;$(".current-address-form").waitMe("hide")},__decorate([i.Prop(Object)],t.prototype,"content",void 0),__decorate([i.Prop(Number)],t.prototype,"transferStopDateDelay",void 0),__decorate([i.Prop(Object)],t.prototype,"stopService",void 0),__decorate([i.Component({name:"CurrentAddress",components:{AccountChooser:u["default"]},template:'\n    <div class="current-address-form">\n        <form action="#" @submit.prevent="emitForm">\n\n            <!-- A C C O U N T   P I C K E R -->\n            <account-chooser v-if="isAuthenticated && activeAccounts.length > 1" v-on:account-found="onAccountFound"\n                :accountChooserOptions="content.accountChooser"\n                :selectMode="accountChooserMode"\n                :activeAccount="account"\n                :accounts="activeAccounts"><\/account-chooser>\n\n            <!-- H E A D I N G -->\n            <h4 class="text-center move-app__heading mb-3">{{content.serviceEndQuestion}}<\/h4>\n\n            <!-- D E S C R I P T I O N -->\n            <div class="row mb-3">                \n                <div class="col-10 move-app__info-box mx-auto">\n                    {{content.serviceEndQuestionDescription}}\n                <\/div>                \n            <\/div>\n\n            <!-- D A T E -->\n            <div class="row mb-3">\n                <div class="col-1" />\n                <div class="col-10">\n                    <label class="move-app__label">{{content.stopDateLabel}}<\/label>\n                    <div class="text-secondary">MM / DD / YYYY<\/div>\n                    <div class="input-group date mb-3">\n                        <input id="idStopDate" type="text" class="inline form-control-plaintext" v-model="selectedDate" required>\n                        <div class="input-group-append">\n                            <span class="move-app__calendarIcon input-group-text bg-transparent"><i class="fa fa-calendar"><\/i><\/span>\n                        <\/div>\n                    <\/div>\n                    <p v-show="selectedDate==\'\' && nextBtnClicked" class="form__error mt-0 mb-0">{{content.missingStopDateText}}<\/p>\n                <\/div>\n                <div class="col-1" />\n            <\/div>\n\n            <!-- T I M E -->\n            <div v-if="showTimeSlots" class="row mb-3">\n                <div class="col-1" />\n                <div class="col-10">\n                    <label class="move-app__label">{{content.stopTimeLabel}}<\/label>\n                    <select v-model="selectedTime">\n                        <option v-bind:value="this.selectOne">-- Select one --<\/option>\n                        <option v-for="timeSlot in availableTimeSlots" v-bind:value="timeSlot">\n                            {{timeSlot.startTime}}, {{content.durationText}}: {{timeSlot.duration}} {{content.hoursText}}\n                        <\/option>\n                    <\/select>\n                    <p v-show="selectedTime==this.selectOne && nextBtnClicked" class="form__error mt-0 mb-0">{{content.missingStopTimeText}}<\/p>\n                <\/div>             \n                <div class="col-1" />\n            <\/div>\n\n            <!-- P R E S E N T -->\n            <p class="col-12 mb-3 text-center move-app__text">\n                <span v-if="isCustomerMustBePresent" v-html=content.customerMustBePresentText><\/span>\n                <span v-else v-html=content.customerNeedNotBePresentText><\/span>\n            <\/p>\n\n            <!-- F I N A L . . B I L L . . H E A D I N G -->\n            <h5 class="text-center move-app__heading mb-3">{{content.calcFinalBillHeading}}<\/h5>\n\n            <!-- R A D I O . . B U T T O N S -->\n            <div class="row mb-3">                \n                <div class="col-10 move-app__radio-buttons mx-auto">\n                    <div class="mt-2">\n                        <label class="radio-label move-app__radio-button-label px-3" for="idFinalBillEstimate">\n                            <input name="finalBill" type="radio" id="idFinalBillEstimate" value="estimate" v-model="finalBillCalc" />\n                            <span>{{content.finalBillEstimateText}}<\/span>\n                        <\/label>\n                        <!-- <br /> -->\n                        <label class="radio-label move-app__radio-button-label px-3" for="idFinalBillRead">\n                            <input name="finalBill" type="radio" id="idFinalBillRead" value="read" v-model="finalBillCalc" />\n                            <span>{{content.finalBillReadText}}<\/span>\n                        <\/label>\n                        <p v-show="finalBillCalc==\'\' && nextBtnClicked" class="form__error mt-0 mb-0">{{content.missingFinalBillText}}<\/p>\n                    <\/div>\n                <\/div>                \n            <\/div>\n\n            <!-- [N E X T] -->\n            <div class="col-12 form-group text-right">                            \n                <button type="submit" class="button button--default mt-4" v-bind:class="{disabled: isDisabled}">{{content.nextButtonLabel}}<\/button>\n            <\/div>\n\n            <div v-if="showCannotBeStoppedMsg" class="mt-3">\n                <div class="alert alert-danger">{{content.serviceCannotBeStoppedText}}<\/div>\n            <\/div>\n            <div v-if="showCurrErrorMsg" class="mt-3 mx-1">\n                <div class="alert alert-danger">{{currErrorMessage}}<\/div>\n            <\/div>\n        <\/form>\n    <\/div>\n    '})],t)}(i.Vue);t["default"]=e});define("apps/transfer-service/new-address",["require","exports","vue-property-decorator","apps/utils/event-bus"],function(n,t,i,r){Object.defineProperty(t,"__esModule",{value:!0});var u=function(n){function t(){var t=n!==null&&n.apply(this,arguments)||this;return t.zip="",t.streetAddress="",t.meterNumber="",t.address="",t.premiseAddress=null,t.meterNumberPremiseResult=null,t.premiseSearchAddressList=null,t.picked="streetAddress",t.showPremiseResult=!1,t.showAddressResult=!1,t.showSingleAddress=!1,t.serviceflag=!1,t.showSearchBtn=!0,t.sameAsServiceAddress=!0,t.noResultPremiseAddressSearch=!1,t.noResultPremiseMeterSearch=!1,t.nextBtnClicked=!1,t.searchBtnClicked=!1,t.mailingHouseNo="",t.mailingStreet="",t.mailingHouseSupp="",t.mailingCity="",t.mailingState="NY",t.mailingZip="",t.mailingAddressFlag=!1,t.indexPremise="",t.rent="false",t.durationflag=!1,t.selectedDuration="",t.states=["AL","AK","AZ","AR","CA","CO","CT","DE","DC","FL","GA","HI","ID","IL","IN","IA","KS","KY","LA","ME","MD","MA","MI","MN","MS","MO","MT","NE","NV","NH","NJ","NM","NY","NC","ND","OH","OK","OR","PA","RI","SC","SD","TN","TX","UT","VT","VA","WA","WV","WI","WY","PR","VI"],t}return __extends(t,n),t.prototype.mounted=function(){$("#idZip").focus()},t.prototype.updated=function(){$("#mailingZip").mask("00000");$("#idZip").mask("00000");$("#idMeterNumber").mask("000000000");$("#idAddress").mask("ZZ",{translation:{Z:{pattern:/[a-zA-Z0-9 \-]/,recursive:!0}}})},t.prototype.isValidZip=function(n){return!isNaN(parseInt(n))&&n.length==5},t.prototype.isValidHouseNo=function(n){return/.*[0-9].*/.test(n)},Object.defineProperty(t.prototype,"isDisabled",{get:function(){return this.picked==="streetAddress"&&this.showAddressResult&&(this.serviceflag=this.premiseAddress==null?!0:!1),this.rent=="true"&&(this.durationflag=this.selectedDuration==""?!0:!1),this.sameAsServiceAddress==!1&&(this.mailingAddressFlag=this.mailingHouseNo.trim()==""||this.mailingStreet.trim()==""||this.mailingCity.trim()==""||this.mailingState.trim()==""||this.mailingZip.trim()==""?!0:!1),this.serviceflag||this.durationflag||this.sameAsServiceAddress==!1&&this.mailingAddressFlag?!0:!1},enumerable:!0,configurable:!0}),t.prototype.emitForm=function(n){if(n.preventDefault(),this.nextBtnClicked=!0,!this.isDisabled){if(this.picked=="streetAddress"?this.showAddressResult&&(this.servAddress={address:{city:this.premiseSearchAddressList.serviceAddresses[this.premiseAddress].address.city,zip:this.premiseSearchAddressList.serviceAddresses[this.premiseAddress].address.zip,houseNumber:this.premiseSearchAddressList.serviceAddresses[this.premiseAddress].address.houseNumber,street:this.premiseSearchAddressList.serviceAddresses[this.premiseAddress].address.street,houseSupplement:this.premiseSearchAddressList.serviceAddresses[this.premiseAddress].address.houseSupplement,state:this.premiseSearchAddressList.serviceAddresses[this.premiseAddress].address.state},premiseId:this.premiseSearchAddressList.serviceAddresses[this.premiseAddress].premiseId}):this.servAddress={address:{city:this.meterNumberPremiseResult.address.city,zip:this.meterNumberPremiseResult.address.zip,houseNumber:this.meterNumberPremiseResult.address.houseNumber,street:this.meterNumberPremiseResult.address.street,houseSupplement:this.meterNumberPremiseResult.address.houseSupplement,state:this.meterNumberPremiseResult.address.state},premiseId:this.meterNumberPremiseResult.premiseId},this.rentDuration=this.selectedDuration=="1"?0:1,this.sameAsServiceAddress===!1){if(!this.isValidZip(this.mailingZip)||!this.isValidHouseNo(this.mailingHouseNo))return;this.mailAddress={city:this.mailingCity,zip:this.mailingZip,houseNumber:this.mailingHouseNo,street:this.mailingStreet,houseSupplement:this.mailingHouseSupp,state:this.mailingState}}else this.mailAddress=this.servAddress.address;var t={serviceAddress:this.servAddress,mailingAddress:this.mailAddress,isRenting:this.rent=="true",rentDuration:this.rentDuration,isMailingAddressSameAsServiceAddress:this.sameAsServiceAddress};r["default"].$emit("next-step",{step:"NewAddress",formInfo:t})}},t.prototype.emitBack=function(n){n.preventDefault();r["default"].$emit("previous-step",{})},t.prototype.searchPremise=function(){(this.searchBtnClicked=!0,this.picked!="streetAddress"||this.isValidZip(this.zip))&&(this.noResultPremiseMeterSearch=!1,this.noResultPremiseAddressSearch=!1,this.premiseAddress=null,$(".new-address-form").waitMe({effect:"rotation"}),this.picked=="streetAddress"&&this.address!=""&&this.zip!=""?(this.searchBtnClicked=!1,this.premiseSearchAddressInput={zip:this.zip,active:this.content.searchAddressIsActive,address:this.address},this.startService.searchPremiseByAddress(this.premiseSearchAddressInput,this.onGetSearchByAddressPremiseComplete,this.onGetSearchAddressByPremiseError)):this.meterNumber!=""?(this.searchBtnClicked=!1,this.meterNumberInput={meterNumber:this.meterNumber},this.startService.searchPremiseByMeterNumber(this.meterNumberInput,this.onGetSearchByPremiseComplete,this.onGetSearchByPremiseError)):$(".new-address-form").waitMe("hide"))},t.prototype.onGetSearchByPremiseError=function(){this.noResultPremiseAddressSearch=!0;$(".new-address-form").waitMe("hide")},t.prototype.onGetSearchAddressByPremiseError=function(){this.noResultPremiseAddressSearch=!0;$(".new-address-form").waitMe("hide")},t.prototype.onGetSearchByAddressPremiseComplete=function(n){this.premiseSearchAddressList=n;this.premiseSearchAddressList!=null&&this.premiseSearchAddressList.serviceAddresses.length>0?(this.premiseSearchAddressList.serviceAddresses.length==1?(this.servAddress={address:{city:this.premiseSearchAddressList.serviceAddresses[0].address.city,zip:this.premiseSearchAddressList.serviceAddresses[0].address.zip,houseNumber:this.premiseSearchAddressList.serviceAddresses[0].address.houseNumber,street:this.premiseSearchAddressList.serviceAddresses[0].address.street,houseSupplement:this.premiseSearchAddressList.serviceAddresses[0].address.houseSupplement,state:this.premiseSearchAddressList.serviceAddresses[0].address.state},premiseId:this.premiseSearchAddressList.serviceAddresses[0].premiseId},this.address=this.servAddress.address.houseNumber+" "+this.servAddress.address.street+" "+this.servAddress.address.city+", "+this.servAddress.address.state+" "+this.servAddress.address.zip,this.showSingleAddress=!0):this.showAddressResult=!0,this.showSearchBtn=!1,this.showPremiseResult=!1):this.noResultPremiseAddressSearch=!0;$(".new-address-form").waitMe("hide")},t.prototype.onGetSearchByPremiseComplete=function(n){this.meterNumberPremiseResult=n;n!=null?(this.address=this.meterNumberPremiseResult.address.houseNumber+" "+this.meterNumberPremiseResult.address.street+" "+this.meterNumberPremiseResult.address.city+", "+this.meterNumberPremiseResult.address.state+" "+this.meterNumberPremiseResult.address.zip,this.showPremiseResult=!0,this.showAddressResult=!1,this.showSingleAddress=!1,this.showSearchBtn=!1):this.noResultPremiseMeterSearch=!0;$(".new-address-form").waitMe("hide")},t.prototype.clearAndDefault=function(){this.premiseSearchAddressList=null;this.meterNumberPremiseResult=null;this.showSearchBtn=!0;this.showPremiseResult=!1;this.showAddressResult=!1;this.showSingleAddress=!1;this.zip="";this.address="";this.meterNumber="";this.noResultPremiseMeterSearch=!1;this.noResultPremiseAddressSearch=!1;this.serviceflag=!1;this.durationflag=!1},t.prototype.resetDuration=function(){this.durationflag=!1;this.selectedDuration=""},__decorate([i.Prop(Object)],t.prototype,"content",void 0),__decorate([i.Prop(Object)],t.prototype,"mailingAddress",void 0),__decorate([i.Prop(Object)],t.prototype,"startService",void 0),__decorate([i.Component({template:'\n<div class="new-address-form">\n\t<form id="searchForm" @submit.prevent="searchPremise">\n\t\t<h3 class="text-center move-app__heading mb-3">{{content.findNewAddressHeading}}<\/h3>\n\n        <!-- S T R E E T  or  M E T E R -->\n\t\t<div class=" form-group move-app__innerbox-div">\n            <div class="mt-2 ml-2">\n\t\t        <label class="radio-label move-app__text">\n\t\t\t        <input type="radio" id="streetAddress" v-on:change="clearAndDefault" value="streetAddress" v-model="picked" />\n                    {{content.streetAddressRadioBtn}}\n\t\t\t    <\/label>\n                <br />\n\t\t\t    <label class="radio-label move-app__text">\n    \t\t\t    <input type="radio" id="meterNumber" v-on:change="clearAndDefault" value="meterNumber" v-model="picked" />\n                    {{content.meterNumberRadioBtn}}\n\t\t        <\/label>\n            <\/div>\n\t\t<\/div>\n\t\t<div v-if="picked===\'streetAddress\'">\n            <div class="col-12 form-group">\n\t\t\t\t<label class="move-app__label">{{content.zipCodeLabel}}<\/label>\n                <div class="text-secondary">{{content.zipCodeHint}}<\/div>\n\t\t\t\t<input id="idZip" type="text" class="form-control" name="zip" v-model="zip" />\n\t\t\t\t<p v-show="!isValidZip(zip) && searchBtnClicked" class="form__error mt-0 mb-0">{{content.zipCodeErrorMsg}}<\/p>\n\t\t\t<\/div>\n\t\t\t<div class="col-12 form-group">\n\t\t\t\t<label class="move-app__label">{{content.streetAddressLabel}}<\/label>\n                <div class="text-secondary">{{content.streetAddressHint}}<\/div>\n\t\t\t\t<input id="idAddress" type="text" class="form-control" name="address" v-model="address" />\n\t\t\t\t<p v-show="address==\'\' && searchBtnClicked" class="form__error mt-0 mb-0">{{content.streetAddressErrorMsg}}<\/p>\n\t\t\t<\/div>\n\t\t<\/div>\n\t\t<div v-else>\n\t\t\t<div class="col-12 form-group">\n\t\t\t\t<label class="move-app__label">{{content.meterNumberLabel}}<\/label>\n\t\t\t\t<input id="idMeterNumber" type="text" class="form-control" name="meterNumber" v-model="meterNumber"/>\n\t\t\t\t<p v-show="meterNumber==\'\' && searchBtnClicked" class="form__error mt-0 mb-0">{{content.meterNumberErrorMsg}}<\/p>\n\t\t\t<\/div>\n\t\t<\/div>\n\t\t<div class="col-12 text-right form-group" v-if="showSearchBtn">\n            <a href="#" value="" v-on:click="emitBack" class="button button--default backButton mr-4">{{content.backButtonLabel}}<\/a>\n\t\t\t<button type="submit" class="button button--default mt-4">{{content.searchBtn}}<\/button>\n\t\t<\/div>       \n\t<\/form>\n    <div class="col-12 form-group text-danger" v-if="noResultPremiseMeterSearch || noResultPremiseAddressSearch">\n        {{content.noAddressFoundMsg}}\n    <\/div>\n\n    <!-- S E A R C H   R E S U L T S -->\n    <form v-if="showPremiseResult || showAddressResult || showSingleAddress" id="submitForm" @submit.prevent="emitForm">\n\t    <h3 class="text-center move-app__heading">{{content.confirmNewAddressHeading}}<\/h3>\n\n        <!-- A D D R E S S   S E A R C H   R E S U L T S -->\n\t    <div v-if="showAddressResult" class="col-12 form-group mt-3 text-center move-app__text">\n\t\t    <ul class="mb-1">\n\t\t    {{content.multipleMatchesText}}\n\t\t    <\/ul>\n\t\t    <ul class="mb-1 font-weight-bold">\n\t\t    {{content.selectfromOptionsText}}\n\t\t    <\/ul>\n\t    <\/div>\n    \t<div v-if="showAddressResult" class="col-12 form-group move-app__innerbox-div" >\n\t    \t<div class="col-12 form-group mt-3" v-for="(serviceAddress,indexPremise) in premiseSearchAddressList.serviceAddresses">\n\t\t        <input class="form-check-input" type="radio" id="premiseAddress+indexPremise" :value="indexPremise" v-model="premiseAddress" />\n                <div>\n                    {{serviceAddress.address.houseNumber}} {{serviceAddress.address.street}} {{serviceAddress.address.houseSupplement}} {{serviceAddress.address.city}} {{serviceAddress.address.state}} {{serviceAddress.address.zip}}\n                <\/div>\n\t\t    <\/div>\n            <p v-show="serviceflag && nextBtnClicked" class="form__error mt-0 mb-0">{{content.serviceAddressErrorMsg}}<\/p>\n\t    <\/div>\n\n        <!-- S I N G L E   A D D R E S S -->\n\t\t<div class="mt-2 text-center move-app__text" v-if="showSingleAddress">\n            <div class="mt-1">\n\t\t\t{{content.singleAddressFoundText}}\n            <\/div>\n\t\t\t<div class="mt-1">\n\t\t\t{{this.address}}\n\t\t\t<\/div>\n\t\t<\/div>\n\n        <!-- M E T E R   N U M B E R   R E S U L T S -->\n\t\t<div class="mt-2 move-app__text" v-if="showPremiseResult">\n            <div class="mt-1">\n\t\t\t{{content.serviceAddressFoundMeterNumberText}}\n            <\/div>\n\t\t\t<div class="mt-1">\n\t\t\t{{this.address}}\n\t\t\t<\/div>\n\t\t<\/div>\n\n\t    <div class="move-app mt-2" v-if="showPremiseResult || showAddressResult || showSingleAddress">\n\n\t\t    <!-- O W N  vs  R E N T -->\n            <label class="move-app__label">{{content.ownOrRentLabel}}<\/label>\n\t\t    <div class="col-12 mb-3 move-app__innerbox-div">\n                <div class="mt-2">\n\t\t\t        <label for="own" class="radio-label move-app__text">\n                        <input type="radio" id="own" value="false" v-model="rent" v-on:change="resetDuration" checked />\n                        {{content.ownRadioBtn}}\n                    <\/label>\n                    <br />\n                    <label for="rent"class="radio-label move-app__text">\n        \t\t\t    <input type="radio" id="rent" value="true" v-model="rent" />\n    \t\t\t        {{content.rentRadioBtn}}\n                    <\/label>\n                <\/div>\n            <\/div>\n\n            <!-- D u r a t i o n -->\n            <div class="row">\n\t\t\t    <div class="col-12 form-group" v-if="rent == \'true\'">\n    \t\t\t\t<label for="durationOfstay" class="move-app__label">{{content.durationLabel}}<\/label>\n\t    \t\t\t<select v-model="selectedDuration" class="custom-select">\n\t\t    \t\t\t<option value="">{{content.durationSelectOne}}<\/option>\n\t\t\t    \t\t<option value="1">{{content.durationLessThan12}}<\/option>\n\t\t\t\t    \t<option value="2">{{content.durationMoreThan12}}<\/option>\n\t\t\t\t    <\/select>\n                    <p v-show="durationflag && nextBtnClicked" class="form__error mt-0 mb-0">{{content.durationErrorMsg}}<\/p>\n    \t\t\t<\/div>\n\t\t    <\/div>\n\n\t\t    <!-- M A I L I N G   A D D R E S S -->\n\t\t    <div class="col-md-12 move-app move-app__innerbox-div">\n                <div class="move-app__label">{{content.mailingAddressLabel}}<\/div>\n                <label class="move-app__text radio-label mt-2">\n\t\t\t        <input type="checkbox" id="checkbox" v-model="sameAsServiceAddress" />\n\t\t\t        {{content.sameAsServiceAddressText}}\n                <\/label>\n\t\t\t    <div v-if="sameAsServiceAddress==false">\n\t\t\t\t<div class="form-row px-3 mb-3">\n\t\t\t\t\t<div class="col-md-6">\n\t\t\t\t\t\t<label class="move-app__label" for="mailingHouseNo">{{content.mailHouseNoLabel}}<\/label>\n\t\t\t\t\t\t<input type="text" class="form-control" name="mailingHouseNo" v-model="mailingHouseNo" />\n                        <p v-show="!isValidHouseNo(mailingHouseNo) && nextBtnClicked" class="form__error mt-0 mb-0">{{content.mailHouseNoErrorMsg}}<\/p>\n\t\t\t\t\t<\/div>\n\t\t\t\t\t<div class="col-md-6">\n\t\t\t\t\t\t<label class="move-app__label" for="mailingStreetAddress">{{content.mailStreetLabel}}<\/label>\n\t\t\t\t\t\t<input type="text" class="form-control" name="mailingStreet" v-model="mailingStreet" />\n                        <p v-show="mailingStreet==\'\' && nextBtnClicked" class="form__error mt-0 mb-0">{{content.mailStreetErrorMsg}}<\/p>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class="form-row px-3 mb-3">\n\t\t\t\t\t<div class="col-md-6">\n\t\t\t\t\t\t<label class="move-app__label" for="mailingCity">{{content.mailCityLabel}}<\/label>\n\t\t\t\t\t\t<input type="text" class="form-control" name="mailingCity" v-model="mailingCity" />\n\t\t\t\t\t\t<p v-show="mailingCity==\'\' && nextBtnClicked" class="form__error mt-0 mb-0">{{content.mailCityErrorMsg}}<\/p>\n\t\t\t\t\t<\/div>\n\t\t\t\t\t<div class="col-md-3">\n\t\t\t\t\t\t<label class="move-app__label" for="mailingState">{{content.mailStateLabel}}<\/label>\n                        <select v-model="mailingState" class="custom-select">\n                            <option v-for="state in states" :value="state">{{state}}<\/option>\n                        <\/select>\t\t\t\t\t\t\n\t\t\t\t\t\t<p v-show="mailingState==\'\' && nextBtnClicked" class="form__error mt-0 mb-0">{{content.mailStateErrorMsg}}<\/p>\n\t\t\t\t\t<\/div>\n\t\t\t\t\t<div class="col-md-3">\n\t\t\t\t\t\t<label class="move-app__label" for="mailingZip">{{content.mailZipLabel}}<\/label>\n\t\t\t\t\t\t<input id="mailingZip" type="text" class="form-control" name="mailingZip" v-model="mailingZip"/>\n\t\t\t\t\t\t<p v-show="!isValidZip(mailingZip) && nextBtnClicked" class="form__error mt-0 mb-0">{{content.mailZipErrorMsg}}<\/p>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t    <\/div>\n\t\t    <\/div>\n\n            <!-- B A C K  and  N E X T -->\n            <div class="row mt-4">\n                <div class="col-3"><\/div>\n                <div class="col-4 text-center mt-4">\n                    <button type="button" class="button button--default" v-on:click="clearAndDefault">{{content.resetBtn}}<\/button>\n                <\/div>\n                <div class="col-5 text-right">\n                    <a href="#" value="" v-on:click="emitBack" class="button button--default backButton mr-4">{{content.backButtonLabel}}<\/a>\n                    <button id="idNextBtn" type="submit" class="button button--default mt-4" v-bind:class="{disabled: isDisabled}">{{content.nextButtonLabel}}<\/button>\n                <\/div>                \n            <\/div>\n        <\/div>\n    <\/form>\n<\/div>\n'})],t)}(i.Vue);t["default"]=u});define("apps/transfer-service/personal-info",["require","exports","vue-property-decorator","apps/utils/event-bus","utils/form-validator","utils/mask"],function(n,t,i,r,u,f){Object.defineProperty(t,"__esModule",{value:!0});var e=function(n){function t(){var t=n!==null&&n.apply(this,arguments)||this;return t.customerPhone="",t.coTenantBusinessPartnerId="",t.coTenantFirstName="",t.coTenantLastName="",t.coTenantPhone="",t.employerName="",t.employerAddress="",t.employerCity="",t.employerState="",t.employerZip="",t.employerPhone="",t.emergencyBusinessPartnerId="",t.emergencyFirstName="",t.emergencyLastName="",t.emergencyPhone="",t.emergencyAddress="",t.emergencyCity="",t.emergencyState="",t.emergencyZip="",t.primaryPhone=1,t.states=["NY","AL","AK","AZ","AR","CA","CO","CT","DE","DC","FL","GA","HI","ID","IL","IN","IA","KS","KY","LA","ME","MD","MA","MI","MN","MS","MO","MT","NE","NV","NH","NJ","NM","NC","ND","OH","OK","OR","PA","RI","SC","SD","TN","TX","UT","VT","VA","WA","WV","WI","WY","PR","VI"],t.hasUserSubmitted=!1,t}return __extends(t,n),t.prototype.mounted=function(){$("#emergencyZip").mask("00000");$("#employerZip").mask("00000");this.customerDetails.primaryPhone!==undefined&&(this.primaryPhone=this.customerDetails.primaryPhone,this.customerPhone=this.customerDetails.primaryPhone==0?this.customerDetails.phone:this.customerDetails.mobile);this.customerDetails.coTenantInfo!==undefined&&(this.coTenantBusinessPartnerId=this.customerDetails.coTenantInfo.businessPartnerId,this.coTenantFirstName=this.customerDetails.coTenantInfo.firstName,this.coTenantLastName=this.customerDetails.coTenantInfo.lastName,this.coTenantPhone=this.customerDetails.coTenantInfo.phone);this.customerDetails.employerInfo!==undefined&&(this.employerName=this.customerDetails.employerInfo.employerName,this.employerAddress=this.customerDetails.employerInfo.employerAddress.line1,this.employerCity=this.customerDetails.employerInfo.employerAddress.city,this.employerState=this.customerDetails.employerInfo.employerAddress.state,this.employerZip=this.customerDetails.employerInfo.employerAddress.zip,this.employerPhone=this.customerDetails.employerInfo.employerPhone);this.customerDetails.emergencyContactInfo!==undefined&&(this.emergencyFirstName=this.customerDetails.emergencyContactInfo.firstName,this.emergencyLastName=this.customerDetails.emergencyContactInfo.lastName,this.emergencyPhone=this.customerDetails.emergencyContactInfo.phone,this.emergencyAddress=this.customerDetails.emergencyContactInfo.address.line1,this.emergencyCity=this.customerDetails.emergencyContactInfo.address.city,this.emergencyState=this.customerDetails.emergencyContactInfo.address.state,this.emergencyZip=this.customerDetails.emergencyContactInfo.address.zip)},t.prototype.onCustomerPhoneChanged=function(n){this.customerPhone=f["default"].getMaskedPhoneNumber(n)},t.prototype.onCoTenantPhoneChanged=function(n){this.coTenantPhone=f["default"].getMaskedPhoneNumber(n)},t.prototype.onEmployerPhoneChanged=function(n){this.employerPhone=f["default"].getMaskedPhoneNumber(n)},t.prototype.onEmergencyPhoneChanged=function(n){this.emergencyPhone=f["default"].getMaskedPhoneNumber(n)},t.prototype.isValidPhone=function(n){return u["default"].validatePhoneNumber(f["default"].getRawValue(n))},t.prototype.isValidZip=function(n){return!isNaN(parseInt(n))&&n.length==5},Object.defineProperty(t.prototype,"isValid",{get:function(){var n=u["default"].validatePhoneNumber(f["default"].getRawValue(this.customerPhone));return n&&this.isValidCoTenantInfo&&this.isValidEmployerInfo&&this.isValidEmergencyContact},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isValidCoTenantInfo",{get:function(){var n=0;return(this.coTenantFirstName||n++,this.coTenantLastName||n++,this.coTenantPhone||n++,this.coTenantPhone.trim()!==""&&!this.isValidPhone(this.coTenantPhone))?!1:n==3||n==0?!0:!1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isValidEmployerInfo",{get:function(){var n=0;return(this.employerName||n++,this.employerAddress||n++,this.employerCity||n++,this.employerZip||n++,this.employerPhone||n++,this.employerZip.trim()!==""&&!this.isValidZip(this.employerZip))?!1:this.employerPhone.trim()!==""&&!this.isValidPhone(this.employerPhone)?!1:n==5||n==0?!0:!1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isValidEmergencyContact",{get:function(){var n=0;return(this.emergencyFirstName||n++,this.emergencyLastName||n++,this.emergencyPhone||n++,this.emergencyAddress||n++,this.emergencyCity||n++,this.emergencyZip||n++,this.emergencyZip.trim()!==""&&!this.isValidZip(this.emergencyZip))?!1:this.emergencyPhone.trim()!==""&&!this.isValidPhone(this.emergencyPhone)?!1:n==6||n==0?!0:!1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isCoTenantInfoUpdated",{get:function(){return this.customerDetails.coTenantInfo!==undefined?this.coTenantFirstName!==this.customerDetails.coTenantInfo.firstName||this.coTenantLastName!==this.customerDetails.coTenantInfo.lastName||this.coTenantPhone!==this.customerDetails.coTenantInfo.phone:this.coTenantFirstName.trim()!==""&&this.coTenantLastName.trim()!==""&&this.coTenantPhone.trim()!==""},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isEmployerInfoUpdated",{get:function(){return this.customerDetails.employerInfo!==undefined?this.employerName!==this.customerDetails.employerInfo.employerName||this.employerAddress!==this.customerDetails.employerInfo.employerAddress.line1||this.employerCity!==this.customerDetails.employerInfo.employerAddress.city||this.employerState!==this.customerDetails.employerInfo.employerAddress.state||this.employerZip!==this.customerDetails.employerInfo.employerAddress.zip:this.employerName.trim()!==""&&this.employerAddress.trim()!==""&&this.employerCity.trim()!==""&&this.employerZip.trim()!==""},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isEmergencyContactInfoUpdated",{get:function(){return this.customerDetails.emergencyContactInfo!==undefined?this.emergencyFirstName!==this.customerDetails.emergencyContactInfo.firstName||this.emergencyLastName!==this.customerDetails.emergencyContactInfo.lastName||this.emergencyAddress!==this.customerDetails.emergencyContactInfo.address.line1||this.emergencyCity!==this.customerDetails.emergencyContactInfo.address.city||this.emergencyState!==this.customerDetails.emergencyContactInfo.address.state||this.emergencyZip!==this.customerDetails.emergencyContactInfo.address.zip:this.emergencyFirstName.trim()!==""&&this.emergencyLastName.trim()!==""&&this.emergencyAddress.trim()!==""&&this.emergencyCity.trim()!==""&&this.emergencyZip.trim()!==""},enumerable:!0,configurable:!0}),t.prototype.emitForm=function(n){var t,i,u;n.preventDefault();this.isValid?(t=new FormData,i=!1,this.content.fileUpload1Label&&this.$refs.fileUpload1.files[0]!=null&&(t.append("fileUpload1",this.$refs.fileUpload1.files[0]),i=!0),this.content.fileUpload2Label&&this.$refs.fileUpload2.files[0]!=null&&(t.append("fileUpload2",this.$refs.fileUpload2.files[0]),i=!0),this.content.fileUpload3Label&&this.$refs.fileUpload3.files[0]!=null&&(t.append("fileUpload3",this.$refs.fileUpload3.files[0]),i=!0),this.content.fileUpload4Label&&this.$refs.fileUpload4.files[0]!=null&&(t.append("fileUpload4",this.$refs.fileUpload4.files[0]),i=!0),u={customerNumber:this.customerDetails.customerNumber,customerFirstName:this.customerDetails.firstName,customerLastName:this.customerDetails.lastName,customerEmail:this.customerDetails.email,customerPhone:this.primaryPhone==0?this.customerPhone:this.customerDetails.phone,customerCell:this.primaryPhone==1?this.customerPhone:this.customerDetails.mobile,primaryPhone:this.primaryPhone,coTenantBusinessPartnerId:this.coTenantBusinessPartnerId,coTenantFirstName:this.coTenantFirstName,coTenantLastName:this.coTenantLastName,coTenantPhone:this.coTenantPhone,employerName:this.employerName,employerAddress:this.employerAddress,employerCity:this.employerCity,employerState:this.employerState,employerZip:this.employerZip,employerPhone:this.employerPhone,emergencyBusinessPartnerId:this.emergencyBusinessPartnerId,emergencyFirstName:this.emergencyFirstName,emergencyLastName:this.emergencyLastName,emergencyPhone:this.emergencyPhone,emergencyAddress:this.emergencyAddress,emergencyCity:this.emergencyCity,emergencyState:this.emergencyState,emergencyZip:this.emergencyZip,uploadedFiles:t,areFilesUploaded:i,isCoTenantInfoUpdated:this.isCoTenantInfoUpdated,isEmployerInfoUpdated:this.isEmployerInfoUpdated,isEmergencyContactInfoUpdated:this.isEmergencyContactInfoUpdated},r["default"].$emit("next-step",{step:"PersonalInfo",formInfo:u})):this.hasUserSubmitted=!0},t.prototype.emitBack=function(n){n.preventDefault();r["default"].$emit("previous-step",{})},__decorate([i.Prop(Object)],t.prototype,"content",void 0),__decorate([i.Prop(Object)],t.prototype,"customerDetails",void 0),__decorate([i.Watch("customerPhone")],t.prototype,"onCustomerPhoneChanged",null),__decorate([i.Watch("coTenantPhone")],t.prototype,"onCoTenantPhoneChanged",null),__decorate([i.Watch("employerPhone")],t.prototype,"onEmployerPhoneChanged",null),__decorate([i.Watch("emergencyPhone")],t.prototype,"onEmergencyPhoneChanged",null),__decorate([i.Component({template:'\n                 <div class="personal-info-form">\n                     <form action="#" enctype="multipart/form-data" @submit.prevent="emitForm">                       \n                        <h4 class="text-center move-app__heading">{{content.personalDetailsReviewInfoHeading}}<\/h4>\n                        <div v-if="customerDetails.firstName" class="col-12 mt-2">\n                            <label class="move-app__label move-app__text">{{content.firstNameLabel}}<\/label>\n                            <input type="text" readonly class="form-control" :value="customerDetails.firstName"/>\n                        <\/div>\n\n                        <div class="col-12 mt-3">\n                            <label class="move-app__label move-app__text">{{content.lastNameLabel}}<\/label>\n                            <input type="text" readonly class="form-control" :value="customerDetails.lastName"/>\n                        <\/div>\n\n                        <div class="col-12 mt-3">\n                            <label class="move-app__label move-app__text">{{content.emailLabel}}<\/label>\n                            <input type="text" readonly class="form-control" :value="customerDetails.email"/>\n                        <\/div>\n\n                        <div class="col-12 mt-3">\n                            <label v-if="primaryPhone === 0" class="move-app__label move-app__text">{{content.phoneNumberLabel}}<\/label>\n                            <label v-else class="move-app__label move-app__text">{{content.cellNumberLabel}}<\/label>\n                            <div class="text-secondary"><i>### - ### - ####<\/i><\/div>\n                            <input type="text" id="customerPhone" class="form-control" v-model="customerPhone"/>\n                            <p v-show="!isValidPhone(customerPhone)" class="form__error mt-0 mb-0">{{content.enterValidPhoneNumberText}}<\/p>\n                        <\/div>              \n\n                        <h4 class="text-center move-app__heading mt-3 mb-3">{{content.additionalInfoHeading}}<\/h4>\n                        <div class="col-12">\n                            <div class="accordion" id="accordionExample">\n                                <div class="card">\n                                    <div class="card-header collapsed" data-toggle="collapse" data-target="#collapseOne" aria-expanded="false" aria-controls="collapseOne">\n                                        <span class="accicon"><i class="fas fa-angle-down rotate-icon"><\/i><\/span>\n                                        <h6 class="text-primary"> {{content.coTenantTitle}} <\/h6>\n                                    <\/div>\n\n                                    <div id="collapseOne" class="collapse" aria-labelledby="headingOne" data-parent="#accordionExample">                                                                            \n                                        <div class="card-body">\n                                             <div class="font-weight-bold">{{content.coTenantDescription}}<\/div>\n                                             <div class="mt-3">\n                                                <label class="move-app__label move-app__text">{{content.firstNameLabel}}<\/label>\n                                                <input type="text" class="form-control" v-model="coTenantFirstName"/>\n                                            <\/div>\n                                            <div class="mt-3">\n                                                <label class="move-app__label move-app__text mt-3">{{content.lastNameLabel}}<\/label>\n                                                <input type="text" class="form-control" v-model="coTenantLastName"/>\n                                            <\/div>\n                                            <div class="mt-3">\n                                                <label v-if="primaryPhone === 0" class="move-app__label move-app__text">{{content.phoneNumberLabel}}<\/label>\n                                                <label v-else class="move-app__label move-app__text">{{content.cellNumberLabel}}<\/label>\n                                                <div class="text-secondary"><i>### - ### - ####<\/i><\/div>\n                                                <input type="text" id="coTenantPhone" class="form-control" v-model="coTenantPhone"/>\n                                                <p v-show="coTenantPhone.trim() !== \'\' && !isValidPhone(coTenantPhone)" class="form__error mt-0 mb-0">{{content.enterValidPhoneNumberText}}<\/p>\n                                            <\/div>\n                                        <\/div>\n                                    <\/div>\n                                <\/div>\n\n                                <div class="card">\n                                    <div class="card-header collapsed" data-toggle="collapse" data-target="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo">\n                                        <span class="accicon"><i class="fas fa-angle-down rotate-icon"><\/i><\/span>\n                                        <h6 class="text-primary">{{content.employmentTitle}}<\/h6>\n                                    <\/div>\n                                    <div id="collapseTwo" class="collapse" aria-labelledby="headingTwo" data-parent="#accordionExample">                                           \n                                        <div class="card-body">\n                                            <div class="font-weight-bold">{{content.employerDescription}}<\/div>\n                                            <div class="mt-3">\n                                                <label class="move-app__label move-app__text">Employer Name<\/label>\n                                                <input type="text" class="form-control" v-model="employerName"/>\n                                            <\/div>\n                                            <div class="mt-3">\n                                                <label class="move-app__label move-app__text">{{content.addressLabel}}<\/label>\n                                                <input type="text" class="form-control" v-model="employerAddress"/>                                                \n                                            <\/div>\n                                            <div class="mt-3">\n                                                <div class="row">\n                                                    <div class="col-md-6">\n                                                        <label class="move-app__label move-app__text">{{content.cityLabel}}<\/label>\n                                                        <input type="text" class="form-control" v-model="employerCity" />                                                        \n                                                    <\/div>\n                                                    <div class="col-md-3">\n                                                        <label class="move-app__label move-app__text">{{content.stateLabel}}<\/label>\n                                                        <select id="idState" v-model="employerState" class="custom-select">\n                                                            <option v-for="state in states" :value="state">{{state}}<\/option>\n                                                        <\/select>                                                        \n                                                    <\/div>\n                                                    <div class="col-md-3">\n                                                        <label class="move-app__label move-app__text">{{content.zipLabel}}<\/label>\n                                                        <input id="employerZip" type="text" class="form-control" v-model="employerZip" />\n                                                        <p v-show="employerZip.trim() !== \'\' && !isValidZip(employerZip)" class="form__error mt-0 mb-0">{{content.enterValidZipText}}<\/p>\n                                                    <\/div>\n                                                <\/div>\n                                            <\/div>\n                                            <div class="mt-3">\n                                                <label class="move-app__label move-app__text">{{content.phoneNumberLabel}}<\/label>\n                                                <div class="text-secondary"><i>### - ### - ####<\/i><\/div>\n                                                <input type="text" id="employerPhone" class="form-control" v-model="employerPhone"/>\n                                                <p v-show="employerPhone.trim() !== \'\' && !isValidPhone(employerPhone)" class="form__error mt-0 mb-0">{{content.enterValidPhoneNumberText}}<\/p>\n                                            <\/div>\n                                        <\/div>\n                                    <\/div>\n                                <\/div>\n\n                                <div class="card">\n                                     <div class="card-header collapsed" data-toggle="collapse" data-target="#collapseThree" aria-expanded="false" aria-controls="collapseThree">\n                                        <span class="accicon"><i class="fas fa-angle-down rotate-icon"><\/i><\/span>\n                                        <h6 class="text-primary">{{content.emergencyContactTitle}}<\/h6>\n                                    <\/div>\n                                    <div id="collapseThree" class="collapse" aria-labelledby="headingThree" data-parent="#accordionExample">\n                                        <div class="card-body">\n                                             <div class="mt-2 font-weight-bold">{{content.emergencyContactDescription}}<\/div>\n                                             <div class="mt-2">\n                                                <label class="move-app__label move-app__text">{{content.firstNameLabel}}<\/label>\n                                                <input type="text" class="form-control" v-model="emergencyFirstName"/>\n                                            <\/div>\n\n                                            <div class="mt-3">\n                                                <label class="move-app__label move-app__text">{{content.lastNameLabel}}<\/label>\n                                                <input type="text" class="form-control" v-model="emergencyLastName"/>\n                                            <\/div>\n\n                                            <div class="mt-3">\n                                                <label class="move-app__label move-app__text">{{content.phoneNumberLabel}}<\/label>\n                                                <div class="text-secondary"><i>### - ### - ####<\/i><\/div>\n                                                <input type="text" id="emergencyPhone" class="form-control" v-model="emergencyPhone"/>\n                                                <p v-show="emergencyPhone.trim() !== \'\' && !isValidPhone(emergencyPhone)" class="form__error mt-0 mb-0">{{content.enterValidPhoneNumberText}}<\/p>\n                                            <\/div>\n\n                                             <div class="mt-3">\n                                                <label class="move-app__label move-app__text">{{content.addressLabel}}<\/label>\n                                                <input type="text" class="form-control" v-model="emergencyAddress"/>                                                \n                                            <\/div>\n                                            <div class="mt-3">\n                                                <div class="row">\n                                                    <div class="col-md-6">\n                                                        <label class="move-app__label move-app__text">{{content.cityLabel}}<\/label>\n                                                        <input type="text" class="form-control" v-model="emergencyCity" />                                                       \n                                                    <\/div>\n                                                    <div class="col-md-3">\n                                                        <label class="move-app__label move-app__text">{{content.stateLabel}}<\/label>\n                                                        <select id="idState" v-model="emergencyState" class="custom-select">\n                                                            <option v-for="state in states" :value="state">{{state}}<\/option>\n                                                        <\/select>                                                       \n                                                    <\/div>\n                                                    <div class="col-md-3">\n                                                        <label class="move-app__label move-app__text">{{content.zipLabel}}<\/label>\n                                                        <input id="emergencyZip" type="text" class="form-control" v-model="emergencyZip" />\n                                                        <p v-show="emergencyZip.trim() !== \'\' && !isValidZip(emergencyZip)"\n                                                          class="form__error mt-0 mb-0">\n                                                            {{content.enterValidZipText}}\n                                                        <\/p>\n                                                    <\/div>\n                                                <\/div>\n                                            <\/div>                                            \n                                        <\/div>\n                                    <\/div>\n                                <\/div>\n                                 <div class="card">\n                                    <div class="card-header collapsed" data-toggle="collapse" data-target="#collapseFour" aria-expanded="false" aria-controls="collapseFour">\n                                        <span class="accicon"><i class="fas fa-angle-down rotate-icon"><\/i><\/span>\n                                        <h6 class="text-primary">{{content.fileUploadTitle}}<\/h6>\n                                    <\/div>\n                                    <div id="collapseFour" class="collapse" aria-labelledby="headingTwo" data-parent="#accordionExample">                                       \n                                        <div class="card-body">\n                                            <div class="mt-2 mb-2 font-weight-bold">{{content.fileUploadDescription}}<\/div>\n                                            <div v-if="content.fileUpload1Label">\n                                                <label class="move-app__label move-app__text">{{content.fileUpload1Label}}<\/label>\n                                                 <div>\n                                                    <input name="fileUpload1" type="file" ref="fileUpload1" accept=".gif, .png, .jpg, .pdf, .doc, .docx">\n                                                 <\/div>\n                                            <\/div>\n                                            <div v-if="content.fileUpload2Label" class="mt-3">\n                                                <label class="move-app__label move-app__text">{{content.fileUpload2Label}}<\/label>\n                                                <div>\n                                                    <input name="fileUpload2" type="file" ref="fileUpload2" accept=".gif, .png, .jpg, .pdf, .doc, .docx">\n                                                <\/div>\n                                            <\/div>\n                                            <div v-if="content.fileUpload3Label" class="mt-3">\n                                                <label class="move-app__label move-app__text">{{content.fileUpload3Label}}<\/label>\n                                                <div>\n                                                    <input name="fileUpload3" type="file" ref="fileUpload3" accept=".gif, .png, .jpg, .pdf, .doc, .docx">\n                                                <\/div>\n                                            <\/div>\n                                            <div v-if="content.fileUpload4Label" class="mt-3">\n                                                <label class="move-app__label move-app__text">{{content.fileUpload4Label}}<\/label>\n                                                <div>\n                                                    <input name="fileUpload4" type="file" ref="fileUpload4" accept=".gif, .png, .jpg, .pdf, .doc, .docx">\n                                                <\/div>\n                                            <\/div>\n                                        <\/div>\n                                    <\/div>\n                                <\/div>\n                            <\/div>\n                        <\/div>\n                        <div class="mt-3">                            \n                            <p v-show="!isValidCoTenantInfo && hasUserSubmitted" class="form__error mt-0 mb-0">{{content.completeCoTenantInfoErrorText}}<\/p>\n                            <p v-show="!isValidEmployerInfo && hasUserSubmitted" class="form__error mt-0 mb-0">{{content.completeEmployerInfoErrorText}}<\/p>\n                            <p v-show="!isValidEmergencyContact && hasUserSubmitted" class="form__error mt-0 mb-0">{{content.completeEmergencyContactErrorText}}<\/p>\n                        <\/div>\n                        <div class="col-12 form-group text-right">\n                            <a href="#" value="" v-on:click="emitBack" class="button button--default backButton mr-4">{{content.backButtonLabel}}<\/a>\n                            <button type="submit" class="button button--default mt-4">{{content.nextButtonLabel}}<\/button>\n                        <\/div>                       \n                    <\/form>\n                 <\/div>\n                '})],t)}(i.Vue);t["default"]=e});define("apps/transfer-service/review-submit",["require","exports","vue-property-decorator","apps/utils/event-bus"],function(n,t,i,r){Object.defineProperty(t,"__esModule",{value:!0});var u=function(n){function t(){var t=n!==null&&n.apply(this,arguments)||this;return t.showTimeSlot=!1,t.currentAddress=null,t.newAddress=null,t}return __extends(t,n),t.prototype.mounted=function(){this.getAddress();this.showTimeSlot=this.transferServiceInfo.currentAddressInfo.moveOutStartTime!==""||this.transferServiceInfo.currentAddressInfo.moveOutEndTime!==""},t.prototype.getAddress=function(){this.currentAddress=this.transferServiceInfo.currentAddressInfo.serviceAddress;this.newAddress=this.transferServiceInfo.newAddressInfo.serviceAddress.address;this.currentAddress!=null&&(this.currentAddress.houseNumber=="undefined"&&(this.currentAddress.houseNumber=""),this.currentAddress.houseSupplement=="undefined"&&(this.currentAddress.houseSupplement=""));this.newAddress!=null&&(this.newAddress.houseNumber=="undefined"&&(this.newAddress.houseNumber=""),this.newAddress.houseSupplement=="undefined"&&(this.newAddress.houseSupplement=""))},t.prototype.emitForm=function(n){n.preventDefault();r["default"].$emit("next-step",{step:"ReviewSubmit"})},t.prototype.emitBack=function(n){n.preventDefault();r["default"].$emit("previous-step",{})},__decorate([i.Prop(Object)],t.prototype,"content",void 0),__decorate([i.Prop(Object)],t.prototype,"transferServiceInfo",void 0),__decorate([i.Component({template:'\n                 <div class="review-submit-form">\n                     <form action="#" @submit.prevent="emitForm">\n                        <h4 class="text-center move-app__heading mb-5">{{content.reviewSubmitHeading}}<\/h4>\n                        \n                         <div v-if="currentAddress" class="col-12 form-group mt-3">\n                            <h5 class="move-app__heading mb-2">{{content.currentAddressHeading}}<\/h5>                            \n                            <div>{{currentAddress.houseNumber}} {{currentAddress.street}} {{currentAddress.houseSupplement}}<\/div>\n                            <div>{{currentAddress.city}}, {{currentAddress.state}} {{currentAddress.zip}}<\/div>\n                        <\/div>\n                        \n                         <div class="col-12 form-group mt-3">\n                             <h5 class="move-app__heading mb-2">{{content.stopDateHeading}}<\/h5>\n                            <div>{{transferServiceInfo.currentAddressInfo.moveOutDate}}<\/div>\n                            <div v-if="showTimeSlot">\n                                  {{stopServiceInfo.stopDateInfo.moveOutStartTime}}-{{stopServiceInfo.stopDateInfo.moveOutEndTime}}\n                            <\/div>\n                        <\/div>\n\n                        <hr>\n\n                         <div v-if="newAddress" class="col-12 form-group mt-3">\n                            <h5 class="move-app__heading mb-2">{{content.newAddressHeading}}<\/h5>\n                            <div>{{newAddress.houseNumber}} {{newAddress.street}} {{newAddress.houseSupplement}}<\/div>\n                            <div>{{newAddress.city}}, {{newAddress.state}} {{newAddress.zip}}<\/div>\n                        <\/div>\n\n                         <div class="col-12 form-group mt-3">\n                             <h5 class="move-app__heading mb-2">{{content.startDateHeading}}<\/h5>\n                            <div>{{transferServiceInfo.startDateInfo.appointmentStartDate}}<\/div>                            \n                        <\/div>\n\n                        <hr>\n\n                        <div class="col-12 form-group mt-3">\n                            <h5 class="move-app__heading mb-2">{{content.finalBillHeading}}<\/h5>\n                            <div v-if="transferServiceInfo.currentAddressInfo.finalBillCalculation === \'SendSomeOneForMeterRead\'">{{content.finalBillReadText}}<\/div>\n                            <div v-else>{{content.finalBillEstimateText}}<\/div>\n                        <\/div>\n                        <div class="col-12 form-group text-right">\n                            <a href="#" value="" v-on:click="emitBack" class="button button--default backButton mr-4">{{content.backButtonLabel}}<\/a>\n                            <button type="submit" class="button button--default mt-4">{{content.submitButtonLabel}}<\/button>\n                        <\/div>\n                    <\/form>\n                 <\/div>\n                '})],t)}(i.Vue);t["default"]=u});define("apps/transfer-service/start-date",["require","exports","vue-property-decorator","apps/utils/event-bus"],function(n,t,i,r){Object.defineProperty(t,"__esModule",{value:!0});var u=function(n){function t(){var t=n!==null&&n.apply(this,arguments)||this;return t.startDateAppointmentResult=null,t.selectedDate="",t.selectedTime={startTime:"",duration:0,endTime:""},t.currErrorMessage="",t.useLifeSupport=!1,t.hasUserSubmitted=!1,t.isErtOptOut=!1,t.isErtMeter=!1,t.isErtTermsChecked=!1,t}return __extends(t,n),t.prototype.created=function(){document.body.addEventListener("scroll",this.handleScroll);this.startDateAppointmentInput={serviceAddress:this.serviceAddress,moveInStartDateDelay:this.transferStartDateDelay};this.startService.getAppointmentScheduleSlots(this.startDateAppointmentInput,this.onGetAppointmentScheduleSlotsComplete,this.onGetAppointmentScheduleSlotsError)},t.prototype.mounted=function(){$(".start-date-form").waitMe({effect:"rotation"});var n=this;n.prepForm(n)},t.prototype.destroyed=function(){document.body.removeEventListener("scroll",this.handleScroll)},t.prototype.OnServiceAddressChanged=function(n,t){this.isEqual(n.address,t.address)||($(".start-date-form").waitMe({effect:"rotation"}),this.startDateAppointmentInput={serviceAddress:n,moveInStartDateDelay:this.transferStartDateDelay},this.startService.getAppointmentScheduleSlots(this.startDateAppointmentInput,this.onGetAppointmentScheduleSlotsComplete,this.onGetAppointmentScheduleSlotsError))},t.prototype.handleScroll=function(){$(".date").datepicker("hide");$(".date").blur()},Object.defineProperty(t.prototype,"isValid",{get:function(){return this.isErtOptOut&&!this.isErtTermsChecked?!1:!0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"showErtTermsNotCheckedError",{get:function(){return this.isErtOptOut&&!this.isErtTermsChecked&&this.hasUserSubmitted},enumerable:!0,configurable:!0}),t.prototype.isEqual=function(n,t){var f=Object.keys(n),e=Object.keys(t),i,r,u;if(f.length!==e.length)return!1;for(i=0,r=f;i<r.length;i++)if(u=r[i],n[u]!==t[u])return!1;return!0},t.prototype.emitForm=function(n){var f,t,e,i,u,o,s;if(n.preventDefault(),this.isValid){for(this.isErtOptOut&&this.startDateAppointmentResult.selectedMeters.forEach(function(n){return n.isErtOptOut=!0}),f=[],t=0,e=this.startDateAppointmentResult.selectedMeters;t<e.length;t++)i=e[t],u="",i.serviceType=="Electric"?u="EL":i.serviceType=="Gas"&&(u="GS"),o={installationId:i.installationId,divisionId:u,ertOptOut:!1,premiseId:this.serviceAddress.premiseId},f.push(o);s={moveInInstallations:f,isAppointmentRequired:this.startDateAppointmentResult.isAppointmentRequired,isAllDayAppointment:this.startDateAppointmentResult.isAllDayAppointment,appointmentStartDate:this.selectedDate,appointmentEndDate:this.selectedDate,appointmentStartTime:this.selectedTime.startTime,appointmentEndTime:this.selectedTime.endTime,useLifeSupport:this.useLifeSupport,coTenantExist:null,coTenantName:"",coTenantPhone:""};r["default"].$emit("next-step",{step:"StartDate",formInfo:s})}else this.hasUserSubmitted=!0},t.prototype.emitBack=function(n){n.preventDefault();r["default"].$emit("previous-step",{})},t.prototype.prepForm=function(n){var t=this,i="+"+this.transferStartDateDelay.toString()+"d",r="+"+(this.transferStartDateDelay+30).toString()+"d";$(".date").datepicker({format:"mm/dd/yyyy",startDate:i,endDate:r,autoclose:!0}).on("changeDate",function(i){i.date!==undefined&&(n.selectedDate=t.getDateStr(i.date))})},t.prototype.getDateStr=function(n){return n.toLocaleDateString("en-US",{year:"numeric",month:"2-digit",day:"2-digit"})},Object.defineProperty(t.prototype,"availableTimeSlots",{get:function(){var n=this,t=this.startDateAppointmentResult.schedules.filter(function(t){var i=n.getDateStr(new Date(t.date));return i==n.selectedDate});return this.selectedTime=t[0].availableTimeSlots[0],t[0].availableTimeSlots},enumerable:!0,configurable:!0}),t.prototype.onGetAppointmentScheduleSlotsComplete=function(n){var t,i,r;for(this.startDateAppointmentResult=n,this.selectedDate=n.schedules[0].date,t=0,i=this.startDateAppointmentResult.selectedMeters;t<i.length;t++)if(r=i[t],r.isMeterErt){this.isErtMeter=!0;break}$(".date").datepicker("setDate",new Date(this.selectedDate));$(".date").datepicker("setDatesDisabled",n.datesNotAvailable);$(".start-date-form").waitMe("hide")},t.prototype.onGetAppointmentScheduleSlotsError=function(n){$(".start-date-form").waitMe("hide");this.currErrorMessage=n},__decorate([i.Prop(Object)],t.prototype,"content",void 0),__decorate([i.Prop(Number)],t.prototype,"transferStartDateDelay",void 0),__decorate([i.Prop(Object)],t.prototype,"serviceAddress",void 0),__decorate([i.Prop(Object)],t.prototype,"startService",void 0),__decorate([i.Watch("serviceAddress")],t.prototype,"OnServiceAddressChanged",null),__decorate([i.Component({template:'                \n                <div class="start-date-form">\n                   <div v-if="!currErrorMessage">\n                        <form action="#" @submit.prevent="emitForm">\n                            <h4 class="text-center move-app__heading">{{content.startDateHeading}}<\/h4>\n                            <div v-if="startDateAppointmentResult" class="col-12 mt-3 move-app__info-box">\n                                <span v-if="startDateAppointmentResult.isCustomerMustBePresent" v-html=content.customerMustBePresentText><\/span>\n                                <span v-else v-html=content.customerNeedNotBePresentText><\/span>                                \n                            <\/div>\n\n                            <div class="col-12 mt-2">                                                    \n                                <div class="input-group date mb-3">\n                                    <input type="text" readonly class="form-control-plaintext" v-model="selectedDate">\n                                    <div class="input-group-append">\n                                        <span class="move-app__calendarIcon input-group-text bg-transparent"><i class="fa fa-calendar"><\/i><\/span>\n                                    <\/div>\n                                <\/div>\n\n                                <div v-if="startDateAppointmentResult && startDateAppointmentResult.isAppointmentRequired" class="row mt-2">\n                                    <div class="col-md-12">                                        \n                                        <label class="move-app__label">{{content.timeSlotLabel}}:<\/label>\n                                        <select v-model="selectedTime">\n                                            <option v-for="timeSlot in availableTimeSlots" v-bind:value="timeSlot">                                                \n                                                {{timeSlot.startTime}} - {{timeSlot.endTime}}\n                                            <\/option>\n                                        <\/select>                                \n                                    <\/div>                                                                                     \n                                <\/div>\n                            <\/div>\n\n                            <hr>\n                            <div class="mt-2">\n                                <div class="col-md-12 move-app">\n                                    <div v-if="startDateAppointmentResult">\n                                        <h5 class="text-center move-app__heading">{{content.meterActivationHeading}}<\/h5>\n                                        <div class="mt-2 move-app__text">{{content.meterActivationDescription}}<\/div>\n                                        <ul class="mt-1">\n                                            <li v-for="item in startDateAppointmentResult.selectedMeters">\n                                                {{item.serviceType}} {{item.meterNumber}}                                                \n                                            <\/li>\n                                        <\/ul>\n                                        <div v-if="isErtMeter">\n                                            <span style="font-size:12px" v-html=content.ertExplanationContent><\/span>\n                                            <div class="mt-2 move-app__text">{{content.ertOptOutChoiceLabel}}<\/div>\n                                                <div class="col-5 border rounded">\n                                                <div class="mt-2">\n                                                    <input type="radio" v-model="isErtOptOut" v-bind:value="true" name="isErtOptOut">\n                                                    <label class="form-check-label">{{content.radioButtonYesText}}<\/label>\n                                                    <br />\n                                                    <input type="radio" v-model="isErtOptOut" v-bind:value="false" name="isErtOptOut">\n                                                    <label class="form-check-label">{{content.radioButtonNoText}}<\/label>\n                                                <\/div>\n                                            <\/div>\n                                            <div class="mt-3" v-if="isErtOptOut">\n                                                <input type="checkbox" class="formcontrol" v-model="isErtTermsChecked"> {{content.ertOptOutAgreementStatementText}}\n                                                <p v-show="showErtTermsNotCheckedError" class="form__error mt-0 mb-0">{{content.ertTermsAcceptRequiredText}}<\/p>\n                                            <\/div>\n                                        <\/div>\n                                    <\/div>\n                                <\/div>\n                            <\/div>\n\n                            <hr>\n                            <div class="row mt-2">\n                                <div class="col-md-12 move-app">\n                                    <div>\n                                        <h5 class="text-center move-app__heading">{{content.lifeSupportEquipmentHeading}}<\/h5>                                         \n                                        <div class="mt-2 move-app__text">\n                                            {{content.lifeSupportEquipmentQuestion}}\n                                            <span class="tooltip fa fa-question-circle"><div class="tooltiptext" v-html=content.lifeSupportToolTipText><\/div> <\/span>\n                                        <\/div>\n                                        <div class="col-5 border rounded">\n                                                <div class="mt-2">\n                                                <input type="radio" v-model="useLifeSupport" v-bind:value="true" name="useLifeSupport">\n                                                <label class="form-check-label">{{content.radioButtonYesText}}<\/label>                                           \n                                                <br/>\n                                                <input type="radio" v-model="useLifeSupport" v-bind:value="false" name="useLifeSupport">\n                                                <label class="form-check-label">{{content.radioButtonNoText}}<\/label>\n                                            <\/div>\n                                        <\/div>\n                                    <\/div>\n                                <\/div>\n                            <\/div>                       \n\n                            <div class="col-12 form-group text-right">\n                                <a href="#" value="" v-on:click="emitBack" class="button button--default backButton mr-4">{{content.backButtonLabel}}<\/a>\n                                <button type="submit" class="button button--default mt-4">{{content.nextButtonLabel}}<\/button>\n                            <\/div>                      \n                        <\/form>\n                   <\/div>\n\n                   <div v-else>\n                    <div class="row mt-3 mx-1">\n                        <div class="col">\n                            <div class="alert alert-danger">{{currErrorMessage}}<\/div>\n                        <\/div>\n                   <\/div>\n                <\/div>\n               <\/div>           \n            '})],t)}(i.Vue);t["default"]=u});define("apps/transfer-service/transfer-service-app",["require","exports","vue-property-decorator","apps/transfer-service/current-address","apps/transfer-service/new-address","apps/transfer-service/start-date","apps/transfer-service/personal-info","apps/transfer-service/review-submit","apps/transfer-service/confirmation","utils/stack","apps/utils/event-bus","services/transfer-service","services/move-out-service","services/move-service"],function(n,t,i,r,u,f,e,o,s,h,c,l,a,v){function p(n,t){var r=new i.Vue({el:"#"+n,data:{transferServiceAppOptions:t},components:{TransferServiceApp:y}})}Object.defineProperty(t,"__esModule",{value:!0});t.init=p;var y=function(n){function t(){var t=n.call(this)||this;return t.navstack=new h["default"],t.step="",t.currentStep=1,t.transferSubmissionResult=null,t.currErrorMessage="",t.confirmationDivHeight="",t.desktopActiveStepCssClass="pbardesktop pbardesktop_activeblock",t.desktopInactiveStepCssClass="pbardesktop pbardesktop_inactiveblock",t.mobileActiveStepCssClass="pbarmobile pbarmobile_activeblock",t.mobileInactiveStepCssClass="pbarmobile pbarmobile_inactiveblock",t.transferService=new l["default"](t.options.apiUrl),t.stopService=new a["default"](t.options.apiUrl),t.startService=new v["default"](t.options.apiUrl),t}return __extends(t,n),t.prototype.created=function(){c["default"].$on("next-step",this.handleNext);c["default"].$on("previous-step",this.handleBack);this.step="CurrentAddress";this.navstack.push(this.step)},t.prototype.handleNext=function(n){var t;if(this.currentStep+=1,n.step=="CurrentAddress")this.currentAddressFormInfo=n.formInfo,t="NewAddress";else if(n.step=="NewAddress")this.newAddressFormInfo=n.formInfo,t="StartDate";else if(n.step=="StartDate")this.startDateFormInfo=n.formInfo,t="PersonalInfo";else if(n.step=="PersonalInfo")this.personalDetailsFormInfo=n.formInfo,t="ReviewSubmit";else{if(n.step=="ReviewSubmit"){this.step="Confirmation";this.confirmationDivHeight="300px";this.transferService.submitTransferService(this.getTransferServiceInfo(),this.onSubmitTransferServiceComplete,this.onSubmitTransferServiceError);return}console.error("Invalid Step.")}this.navstack.push(t);this.step=t},t.prototype.handleBack=function(){this.currentStep-=1;this.navstack.pop();this.step=this.navstack.peek()},t.prototype.getTransferServiceInfo=function(){return{currentAddressInfo:this.currentAddressFormInfo,newAddressInfo:this.newAddressFormInfo,startDateInfo:this.startDateFormInfo,personalInfo:this.personalDetailsFormInfo}},Object.defineProperty(t.prototype,"stepHeading",{get:function(){var n=null;switch(this.currentStep){case 1:n=this.options.newAddressText;break;case 2:n=this.options.startDateText;break;case 3:n=this.options.personalInfoText;break;case 4:n=this.options.reviewSubmitText}return n},enumerable:!0,configurable:!0}),t.prototype.onSubmitTransferServiceComplete=function(n){if(this.transferSubmissionResult=n,this.confirmationDivHeight="auto",this.personalDetailsFormInfo.areFilesUploaded){var t=this.personalDetailsFormInfo.uploadedFiles;t.append("accountNumber",n.moveInAccountNumber);t.append("moveInConfirmationNumber",n.moveInDocId);this.startService.sendFiles(t)}},t.prototype.getConfirmationInfo=function(){return{submissionResult:this.transferSubmissionResult,startServiceAddress:this.newAddressFormInfo.serviceAddress.address,startServiceDate:this.startDateFormInfo.appointmentStartDate,startServiceStartTime:this.startDateFormInfo.appointmentStartTime,startServiceEndTime:this.startDateFormInfo.appointmentEndTime,isStartServiceAppointmentRequired:this.startDateFormInfo.isAppointmentRequired,stopServiceAddress:this.currentAddressFormInfo.serviceAddress,stopServiceDate:this.currentAddressFormInfo.moveOutDate,stopServiceStartTime:this.currentAddressFormInfo.moveOutStartTime,stopServiceEndTime:this.currentAddressFormInfo.moveOutEndTime,isStopServiceAppointmentRequired:this.currentAddressFormInfo.isAppointmentRequired}},t.prototype.onSubmitTransferServiceError=function(n){this.transferSubmissionResult={isSuccess:!1,customerNumber:"",moveInAccountNumber:"",moveInDocId:"",moveOutDocId:"",selectedTimeSlot:"",securityDepositAmount:0,wereBPEMsRaised:!1,bpems:null,moveFailureError:"None"};this.currErrorMessage=n},__decorate([i.Prop(Object)],t.prototype,"options",void 0),__decorate([i.Component({name:"TransferServiceApp",components:{CurrentAddressForm:r["default"],NewAddressForm:u["default"],StartDateForm:f["default"],PersonalInfoForm:e["default"],ReviewSubmitForm:o["default"],Confirmation:s["default"]},template:'\n                <div class="move-app mt-2">\n                   <div v-if="step !== \'Confirmation\'">\n                        <div class="text-center progress_desktop">\n                             <div v-bind:class="[currentStep == 1 ? desktopActiveStepCssClass: desktopInactiveStepCssClass ]">\n                                <div class="circle">1<\/div>\n                                {{options.currentAddressText}}\n                            <\/div>\n                            <div v-bind:class="[currentStep == 2 ? desktopActiveStepCssClass: desktopInactiveStepCssClass ]">\n                                <div class="circle">2<\/div>\n                                {{options.newAddressText}}\n                            <\/div>\n                            <div v-bind:class="[currentStep == 3 ? desktopActiveStepCssClass: desktopInactiveStepCssClass ]">\n                                <div class="circle">3<\/div>\n                                {{options.startDateText}}\n                            <\/div>\n                            <div v-bind:class="[currentStep == 4 ? desktopActiveStepCssClass: desktopInactiveStepCssClass ]">\n                                <div class="circle">4<\/div>\n                                {{options.personalInfoText}}\n                            <\/div>\n                            <div v-bind:class="[currentStep == 5 ? desktopActiveStepCssClass: desktopInactiveStepCssClass ]">\n                                <div class="circle">5<\/div>\n                                {{options.reviewSubmitText}}\n                            <\/div>\n                        <\/div>\n\n                        <div class="text-center progress_mobile">\n                            <div class="pbarmobilecontainer">\n                                <p>Step {{currentStep}} of 5: <strong>{{stepHeading}}<\/strong><\/p>\n                                <div style="padding-left:auto; padding-right:auto;">\n                                    <div v-bind:class="[currentStep == 1 ? mobileActiveStepCssClass : mobileInactiveStepCssClass ]"><\/div>\n                                    <div v-bind:class="[currentStep == 2 ? mobileActiveStepCssClass : mobileInactiveStepCssClass ]"><\/div>\n                                    <div v-bind:class="[currentStep == 3 ? mobileActiveStepCssClass : mobileInactiveStepCssClass ]"><\/div>\n                                    <div v-bind:class="[currentStep == 4 ? mobileActiveStepCssClass : mobileInactiveStepCssClass ]"><\/div>\n                                    <div v-bind:class="[currentStep == 5 ? mobileActiveStepCssClass : mobileInactiveStepCssClass ]"><\/div>\n                               <\/div>\n                           <\/div>\n                       <\/div>\n\n                        <div class="mt-5 mb-5 move-app__outer_div">\n                            <keep-alive>\n                                <CurrentAddressForm v-if="step === \'CurrentAddress\'"\n                                    :content=options.currentAddressFormVm\n                                    :transferStopDateDelay=options.currentAddressFormVm.transferStopDateDelay\n                                    :stopService=stopService>\n                                <\/CurrentAddressForm>\n                                <NewAddressForm v-if="step === \'NewAddress\'"\n                                    :content=options.newAddressFormVm\n                                    :mailingAddress=options.customerDetails.mailingAddress\n                                    :startService=startService>\n                                <\/NewAddressForm>\n                                <StartDateForm v-if="step === \'StartDate\'"\n                                    :content=options.startDateFormVm                                      \n                                    :transferStartDateDelay=options.startDateFormVm.transferStartDateDelay\n                                    :serviceAddress=newAddressFormInfo.serviceAddress\n                                    :startService=startService>\n                                <\/StartDateForm>\n                                <PersonalInfoForm v-if="step === \'PersonalInfo\'"\n                                    :content=options.personalInfoFormVm\n                                    :customerDetails=options.customerDetails                                       \n                                    :transferService=transferService><\/PersonalInfoForm>\n                                <ReviewSubmitForm v-if="step === \'ReviewSubmit\'"\n                                    :content=options.reviewSubmitFormVm                                      \n                                    :transferServiceInfo="getTransferServiceInfo()">\n                                <\/ReviewSubmitForm>\n                            <\/keep-alive>\n                        <\/div>\n                    <\/div>\n                    <div v-else :style="{height: confirmationDivHeight}">\n                        <Confirmation :info="getConfirmationInfo()"  :content=options.confirmationPageVm><\/Confirmation>\n                    <\/div>\n                <\/div>\n                '})],t)}(i.Vue);t["default"]=y})