!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("intersect-observer",["require","exports","jquery"],e)}((function(e,t){function n(e,t){if(n=e,!(Array.isArray?Array.isArray(n):n&&"[object Array]"===Object.prototype.toString.call(n)))throw new TypeError("forEach called on a non-array type value. The given value is "+typeof e);for(var n,s,o=e.length-1;o>=0&&("boolean"!=typeof(s=t.call(e,e[o],o,e))||s);o--);}function s(e,t){void 0===e&&(e=.5),void 0===t&&(t=250),this._intersectionObserver=null,this.threshold=e,this.scrollwait=t,this._viewport=null,this._obsEl=[],this._intersected=[],this._scrolltimer=null,this._GetViewportSize(),this._OnScroll=this._OnScroll.bind(this),this._OnResize=this._OnResize.bind(this);var n=!1;try{var s=Object.defineProperty({},"passive",{get:function(){n=!0}});window.addEventListener("test",s,s),window.removeEventListener("test",s,s)}catch(e){n=!1}window.addEventListener("scroll",this._OnScroll,!!n&&{passive:!0}),window.addEventListener("resize",this._OnResize)}return s.prototype._OnScroll=function(){var e=this;clearTimeout(e._scrolltimer),e._scrolltimer=setTimeout((function(){e._intersectionObserver?(n(e._intersected,(function(t){var s;n(e._obsEl,(function(e,n){if(e&&e.el==t)return s=n,!1}));var o=e._obsEl[s];o&&(o.handler(),e._obsEl[s]=null,e._intersectionObserver.unobserve(t))})),e._intersected=[]):e.CheckInView()}),e.scrollwait)},s.prototype._OnResize=function(){var e=this;requestAnimationFrame((function(){e._GetViewportSize(),e._intersectionObserver||e.CheckInView()}))},s.prototype.Destroy=function(){this._intersected=null,this._obsEl=null,this._obs=null,window.removeEventListener("scroll",this._OnScroll),window.removeEventListener("resize",this._OnResize)},s.prototype.Observe=function(e,t){var s=this,o=-1;n(this._obsEl,(function(t,n){if(t&&t.el==e)return o=n,!1})),o<0?(this._obsEl.push({el:e,handler:t}),o=this._obsEl.length-1):this._obsEl[o].handler=t,requestAnimationFrame((function(){s._InViewport(e)?(s._obsEl[o]=null,s._intersectionObserver&&s._intersectionObserver.unobserve(e),t()):s._intersectionObserver&&(s._intersectionObserver.unobserve(e),s._intersectionObserver.unobserve(e))}))},s.prototype.Unobserve=function(e){var t;n(this._obsEl,(function(n,s){if(n&&n.el==e)return t=s,!1})),t>-1&&(this._obsEl[t]=null,this._intersectionObserver&&this._intersectionObserver.unobserve(e))},s.prototype._GetViewportSize=function(){var e=window;null!=e.innerWidth&&(this._viewport={w:e.innerWidth,h:e.innerHeight})},s.prototype._InViewport=function(e){if(!this._viewport)return!1;var t=e instanceof Element?e.getBoundingClientRect():e.boundingClientRect,n=t.height||t.bottom-t.top,s=t.width||t.right-t.left;return!(!n||!s)&&!(t.top+t.height*this.threshold>this._viewport.h||t.bottom<0)},s.prototype.CheckForIntersection=function(e){this._intersected=[];for(var t=0,n=e.length;t<n;t++){var s=e[t],o=e[t].target;!s.isIntersecting&&(null!=(i=s.isIntersecting)&&void 0!==i||!this._InViewport(s))||this._intersected.push(o)}var i},s.prototype.CheckInView=function(){var e=this,t=[];this._obsEl&&n(this._obsEl,(function(n,s){n&&e._InViewport(n.el)?n.handler():t.push(n)})),this._obsEl=t},s.prototype.PixelObserve=function(t,n,s){e(["cookie-helper","jquery"],(function(o){var i=e("jquery"),a=i.fn.Uniqid(),r=i.fn.Uniqid();this.Observe(t,(function(){i.get("/pixel.png",Object.assign({adview_id:a,adview_offer_type:n,adview_page:window.location.pathname},s))})),i(t).on("click",(function(){if("Personal_Loan_PQ_Button"==n){var e=JSON.stringify({view:a,click:r,type:n,adview_page:window.location.pathname});try{window.sessionStorage.setItem("mw_prequal_start",e)}catch(t){o.create("mw_prequal_start",e,0)}}i.get("/pixel.png",Object.assign({adview_id:a,adview_offer_type:n,adview_page:window.location.pathname,adview_click:r},s))}))}))},s})),define("stQna",["require","exports","stApp","angular","cookie-helper","wh.jsencrypt","intersect-observer"],(function(e,t){var n=e("stApp"),s=e("angular"),o=e("cookie-helper"),i=e("wh.jsencrypt"),a=e("intersect-observer"),r=s.element,l=navigator.userAgent,c=navigator.platform?navigator.platform:"";function d(){return null!=l.match(/iPhone|iPad|iPod/i)||c&&null!=c.match(/iPhone|iPad|iPod/i)}n.register.factory("$question-resolver",(function(){var e;return{set:function(t){e=t},clear:function(){e=null},get:function(){return e}}})),n.register.controller("CommunitySearchController",["$rootScope","$scope","$element","$timeout","$question-resolver","$http","$q","$window","$location",function(t,n,i,l,c,u,p,h,f){function m(e){s.forEach(e,(function(e){var t=e.ques_content,n=document.createElement("div");n.innerHTML=t,e.ques_content_label=n.innerText,s.forEach(e.answers||[],(function(e){s.isArray(e.content)&&2==e.content.length&&"[[:hellip:]]"==e.content[0]?e.content_parsed=e.content[1]||"":e.content_parsed=function(e){var t="<span class='ellipsis' aria-hidden='true' tabindex='-1'>&hellip;</span><br><span data-hm-tap='morelink($event);' class='more-link' tabindex='0' role='button'>show more <i class='af-icon-down-open' ng-aria-hidden></i></span>";return s.isArray(e.content)&&2==e.content.length?"<div class='condensed'>"+e.content[0].replace("[[:hellip:]]",t)+"</div><div class='hidden'>"+e.content[1]+"</div><span data-hm-tap='lesslink($event);' class='less-link' tabindex='0' role='button'>show less <i class='af-icon-up-open' ng-aria-hidden></i></span>":e.content.replace("[[:hellip:]]",t)}(e)}))}))}n.is_curi_left_filter_template=!1,n.hide_wh_take=!1,s.element().cssSelect("body").hasClass("curi-with-left-filter")&&(n.is_curi_left_filter_template=!0),s.element().cssSelect("body").hasClass("hide-wh-take")&&(n.hide_wh_take=!0),n.comsearch_q_link=function(e){return"/answers/"+e.ques_slug+"-"+e.id.replace(/^q/,"")+"/"},n.has_cards_disclosure=function(){return document.querySelector(".non-aff-disc")},n.go_to_cards_disclosure=function(){var e=document.getElementById("cards-disclosure");window.scrollTo(0,e.offsetTop-20)},n.morelink=function(e){r(e.target).closest(".answer-content").addClass("more")},n.lesslink=function(e){r(e.target).closest(".answer-content").removeClass("more")},n.open_sort=function(e){r(e.target).next(".popup-list").addClass("show")},n.comresults_loading=!1,n.sort_ans_opts=[["Most Popular","mp"],["Most Upvotes","mv"]],n.ans_sort="mp",n.$watch("ans_sort",(function(e,t){e!=t&&u({url:"/ajax.php",params:{action:"Answers.CommunityQASort",uri:document.location.pathname,sort_by:e}}).then((function(e){var t=e.data,s=r(i),o=s.find(".questions");o.html(t.html),o.find(".answer-user-avatar[data-src]").each((function(){var e=r(this);e.attr("src",e.attr("data-src")),e.removeAttr("data-src"),e.addClass("answer-user-avatar-load"),e.css({display:"block"})})),s.data("qp",1),n.is_curi_left_filter_template?1==t.pages?r(i).find(".ftrbtns .viewmore").addClass("ng-hide"):r(i).find(".ftrbtns .viewmore").removeClass("ng-hide"):1==t.pages?r(i).find(".ftrbtns .viewmore").remove():0==r(i).find(".ftrbtns .viewmore").length&&r("<span class='btn blank grey no-decoration viewmore'><span class='txt'>View More Questions</span><span class='af-icon-spin6 animate-spin'></span></span>").prependTo(r(i).find(".ftrbtns")),setTimeout((function(){r(i).find(".questions .question .main-q .more-info").each((function(){var e=r(this);e.prop("scrollHeight")<=e.prop("offsetHeight")+(e.find("span.match").length>0?2:0)&&e.next(".more-info-more").remove()}))}),150)}))})),n.showUserGeneratedDisc=!1,n.showMoreDisc=function(e,t){n.showUserGeneratedDisc="more"==t},n.isShowIntroQA=!1,n.showIntroQA=function(e,t){"more"==t?(n.isShowIntroQA=!0,l((function(){n.isShowIntroQA=!0}))):n.isShowIntroQA=!1},n.autoExpand=function(e){var t="object"==typeof e?e.target:document.getElementById(e),n=t.offsetHeight-t.clientHeight;t.style.height="auto",t.style.height=t.scrollHeight+n+"px"},n.live_status="",r(i).on("click",".questions .question .main-q .more-info-more span[class$=-link]",(function(){r(this).closest(".main-q").toggleClass("more")})).on("click",".questions .question .main-q .reply",(function(){var t=r(this),n=t.closest(".question"),i=n.data("id"),a=n.find(".replyform"),l=a.find(".editor-content"),c=o.read("mw_signon")||"{}",d=o.is_logged_in();function p(n){var s=l[0];l.show().trigger("focus").hide();var o=l.data("ckeditor-instance");o?o.setValue(n||""):e(["input-ckeditor"],(function(e){var o=e(s,{},n,!0);o.ready((function(e){e?l.data("ckeditor-instance",o):(s.show().focus(),t.attr("aria-expanded","true"))}))}))}c.length>2&&"{"==c.charAt(0)&&"}"==c.charAt(c.length-1)&&(c=s.fromJson(c),s.isObject(c)&&"pp"in c&&a.find(".avatar img").attr("src",c.pp)),n.addClass("show-reply"),i&&0===i.indexOf("q")&&(i=i.substring(1)),d?(a.addClass("disabled"),l.attr("disabled","disabled"),u({url:"/ajax.php",params:{action:"Answers.QuestionHasAnswered",qid:i}}).then((function(e){a.removeClass("disabled"),l.removeAttr("disabled");var t=e.data;"answer"in t?p(t.answer):p()}),(function(e){401!=e.status?(n.removeClass("disabled"),l.removeAttr("disabled"),p()):top.location.href="/join/light?lg&redirect_to="+encodeURIComponent(document.location.href)}))):p()})).on("click",".questions .question .replyform .hide-reply",(function(){r(this).closest(".question").removeClass("show-reply");var e=r(this).closest(".question").find(".main-q .reply");e.attr("aria-expanded","false"),e.trigger("focus")})).on("click",".questions .question .replyform .submit",(function(){var e=r(this).closest(".question"),t=e.find(".replyform"),s=t.find(".editor-content"),o=s.data("ckeditor-instance")&&s.data("ckeditor-instance").value||s.val();if(!t.hasClass("disabled")){if(o.length<30)return window.alert("Please add at least 30 characters."),void(s.data("ckeditor-instance")&&s.data("ckeditor-instance").view||s).focus();n.$applyAsync((function(){n.live_status="Posting Answer"})),t.addClass("disabled"),u({method:"POST",url:"/ajax.php",data:{action:"Answers.AnswerQuestion",do:"user-answer",question_id:e.data("id").replace(/^q/,""),answer:o,ref:document.location.href}}).then((function(o){t.removeClass("disabled");var i,a=o.data;if(a){if("redirect"in a)return void(top.location.href=a.redirect);if("error"in a&&!0===a.error&&"message"in a){var c=a.message.match(/^Bad word `(.+)` detected\.$/);return c&&c.length?window.alert('Profanity is not allowed, including words such as "'+c[1]+'". Please adjust.'):window.alert(a.message),void s.trigger("focus")}if("id"in a){if((i=e.find(".message[data-id="+a.id+"]")).length>0)"answer"in a&&i.find(".answer-content").html(a.answer);else{var d="<div class='message more-content show' data-id='"+a.id+"'><div class='answer-top'><div class='avatar'><img src='"+a.avatar+"' class='avatar-img' alt='user avatar' width='40' height='40'></div><div class='answer-names'><div class='full-name' tabindex='0'>"+a.fullname+"</div><div class='second-name' aria-hidden='true' tabindex='-1'>@"+a.username+'</div></div></div><span class="ng-hide" role="tooltip" id="ans-desc-'+a.id+'">Answer provided by you</span><div class="answer-content" tabindex="0" aria-describedby="ans-desc-'+a.id+'">'+a.answer+"</div><div class='thumbs' role='none'><span class='upvote bf-icon-upvote' role='button' tabindex='0' aria-label='0 up votes'><span class='upvotes'>0<i class='af-icon-spin6 animate-spin' aria-hidden='true' tabindex='-1'></i></span></span><span class='dnvote bf-icon-downvote' role='button' tabindex='0' aria-label='0 down votes'><span class='dnvotes'>0<i class='af-icon-spin6 animate-spin' aria-hidden='true' tabindex='-1'></i></span></span></div></div>";0==(i=e.find(".answers")).length&&(i=r("<div class='answers'></div>").insertAfter(e.find(".main-q"))),i.append(d),n.$applyAsync((function(){n.live_status="Answer Posted",l((function(){n.live_status="",i.find(".message").last().find(".answer-content").focus()}),1e3)}))}e.find(".main-q span.reply").hide()}e.removeClass("show-reply"),e.find(".main-q span.reply").attr("aria-expanded","false")}}),(function(e){t.removeClass("disabled"),401==e.status&&(top.location.href="/join/light?lg&redirect_to="+encodeURIComponent(document.location.href))}))}})).on("click",".questions .question .moreans",(function(){var e=r(this),t=e.closest(".question"),s=t.find(".q-title").attr("href"),o={action:"Answers.GetMoreAnswers"};o.qid=t.data("id"),o.v=2,o.answers=t.find(".answers > .message").length,e.focus(),e.addClass("loading"),n.$applyAsync((function(){n.live_status="Loading more answers"})),u({url:"/ajax.php",params:o}).then((function(o){for(var i=o.data,a=0;a<i.answers.length;a++){var r=i.answers[a],l="<div class='message more-content' data-id='"+r.id+"'><div class='answer-top'><div class='avatar'><img src='"+r.user_avatar+"' class='avatar-img' width='40' height='40' alt='user avatar' tabindex='0' /></div><div class='answer-names'>";""!=r.user_title?l+="<div class='full-name' role='text' tabindex='0'>"+r.user_fullname+"<span class='cap'>, "+r.user_title+"</span></div>":l+="<div class='full-name' role='text' tabindex='0'>"+r.user_fullname+"</div>",l+="<div class='second-name' tabindex='-1' aria-hidden='true'>@"+r.user_login+'</div></div></div><span class="ng-hide" id="ans-desc-'+r.id+'">Answer provided by user: '+r.user_fullname+"</span><div class='answer-content' tabindex='0' aria-describedby='ans-desc-"+r.id+"'>"+r.content+"</div><div class='answer-content-more'><a href='"+s+"' class='more-link' tabindex='0' rel='nofollow'>show more<span class='bf-icon-right-open-big' aria-hidden='true' tabindex='-1'></span></a></div><div class='thumbs'><span class='upvote bf-icon-upvote' role='button' tabindex='0' aria-label='"+r.upvote+" up vote"+(1!=r.upvote?"s":"")+"'><span class='upvotes'>"+r.upvote+"<i class='af-icon-spin6 animate-spin'></i></span></span><span class='dnvote bf-icon-downvote' role='button' tabindex='0' aria-label='"+r.upvote+" down vote"+(1!=r.upvote?"s":"")+"'><span class='dnvotes'>"+r.downvote+"<span class='af-icon-spin6 animate-spin'></span></span></span></div></div>",r=t.find(".answers").append(l).find(".answer-content:last")}0==i.left?e.closest(".moreans").hide():e.closest(".moreans").removeClass("loading");var c=i.answers.length;if(c){var u=document.querySelector("[data-status-ans]")||document.createElement("div");u.setAttribute("data-status-ans","status"),u.setAttribute("aria-live","polite"),u.setAttribute("role","status"),u.setAttribute("tabindex","-1"),u.setAttribute("aria-hidden","true");var p=document.querySelector('.answers .message[data-id="'+i.answers[0].id+'"]');t.find(".answers")[0].insertBefore(u,p),u.setAttribute("aria-label","");var h="Loaded "+c+" more answer"+(1!=c?"s":"");u.setAttribute("aria-label",h),d()&&n.$applyAsync((function(){n.live_status=h})),requestAnimationFrame((function(){u.focus()}))}}))})).on("click",".question-form.no-question .q-btn,.question-form .question-box .q-btn,.question-form .search-notice .btn,.ftrbtns .btn.ask-qa-btn, .ftrbtns .btn.blue",(function(){function e(){c.set(n.comsearch),r(".ask-overlay .askform").css("top",h.scrollY-55+"px"),n.$apply((function(){t.show_ask_overlay=!0}))}var s=r(document).height();s-r(document).scrollTop()<1200?(r("html,body").scrollTop(s-1200),e()):e()})).on("click",".answer-content-more span",(function(){var e=r(this).closest(".message");e.toggleClass("show"),e.hasClass("show")?e.find(".answer-content").focus():(e.find(".more-link").focus(),setTimeout((function(){e.find(".more-link").focus()})))})).on("click",".ftrbtns .viewmore",(function(){var e=r(this),t=r(i),s=!1;"p"in f.search()&&void 0===t.data("qp")&&t.data("qp",parseInt(f.search().p));var o=(t.data("qp")||1)+1;e.addClass("loading"),n.is_curi_left_filter_template&&void 0!==t.data("curi_page_data_changing")&&t.data("curi_page_data_changing")&&(s=!0,o=1,t.data("qp",1),t.data("curi_page_data_changing",!1));var a,c=document.location.href,p=e.data("url"),h=e.data("rpp");void 0!==p&&""!=p&&(c=p),void 0!==h&&""!==h&&(a=h),n.$applyAsync((function(){n.live_status="Loading more questions"}));var m={action:"Answers.GetMoreQuestions",url:c,p:o,sort_by:n.ans_sort};a&&(m.rpp=a),u({url:"/ajax.php",params:m}).then((function(a){n.$applyAsync((function(){n.live_status=""}));var c=a.data;e.removeClass("loading"),s&&(""==c.html?(r(t).find(".question-form.no-question").removeClass("ng-hide"),r(t).find(".with-question").addClass("ng-hide")):(r(t).find(".question-form.no-question").addClass("ng-hide"),r(t).find(".with-question").removeClass("ng-hide"),r(t).find(".questions").html(""),c.more&&e.removeClass("ng-hide")));var u=document.querySelectorAll(".comqa .questions .question"),p=u[u.length-1],h=u.length,f=document.createElement("div");r(f).html(c.html),r(f).find(".answer-user-avatar[data-src]").each((function(){var e=r(this);e.attr("src",e.attr("data-src")),e.removeAttr("data-src"),e.addClass("answer-user-avatar-load"),e.css({display:"block"})})),t.find(".questions").append(r(f).html()),s||(n.after_loading_more=!0,l((function(){n.after_loading_more=!1}),100));var m=(u=document.querySelectorAll(".comqa .questions .question")).length-h,v=document.querySelector("[data-status-question]")||document.createElement("div");v.setAttribute("data-status-question","status"),v.setAttribute("aria-live","polite"),v.setAttribute("role","status"),v.setAttribute("tabindex","-1"),v.setAttribute("aria-hidden","true"),p&&document.querySelector(".comqa .questions").insertBefore(v,p.nextSibling||p),v.setAttribute("aria-label","");var _="Loaded "+m+" more question"+(1!=m?"s":"");v.setAttribute("aria-label",_),d()&&n.$applyAsync((function(){n.live_status=_})),requestAnimationFrame((function(){v.focus()})),setTimeout((function(){r(i).find(".questions .question .main-q .more-info").each((function(){var e=r(this);e.prop("scrollHeight")<=e.prop("offsetHeight")+(e.find("span.match").length>0?2:0)&&e.next(".more-info-more").remove()}))}),150),!1===c.more?n.is_curi_left_filter_template?e.addClass("ng-hide"):e.remove():t.data("qp",o)}))})).on("click",".upvote,.dnvote",(function(){if(!o.is_logged_in())return top.location.href="/join/light?redirect_to="+encodeURI(document.location.href),!1;var e=r(this),t=e.closest(".question"),i=e.find("> span[class$='votes']").addClass("loading"),a="answer",l="up",c=t.data("id");e.parent().hasClass("main-q")&&(a="question"),e.hasClass("dnvote")&&(l="dn"),"answer"==a&&(c=e.closest(".message").data("id")),n.live_status="Voting "+a;var d=c.match(/^([abceq])(\d+)$/);d&&(c=d.pop(),a=d.pop(),~["q","a"].indexOf(a)||(a="q"+a)),u.post("/ajax.php?action=Answers.Vote",{dir:l,kind:a,id:c}).then((function(s){n.live_status="",i.removeClass("loading");var o,r,l=s.data;l.error?window.alert("An unknown error has ocured."):(e.attr("aria-live","polite"),setTimeout((function(){e.attr("aria-live","off")}),1e3),"q"==a.charAt(0)?(t.find("> .upvotes strong").text(l.votes_up),o=t.find(".main-q .upvotes"),r=t.find(".main-q .dnvotes"),o.parent().attr("aria-label",l.votes_up+" up vote"+(1!=l.votes_up?"s":"")),o.html(l.votes_up+"<i class='af-icon-spin6 animate-spin'></i>"),r.parent().attr("aria-label",l.votes_dn+" down vote"+(1!=l.votes_dn?"s":"")),r.html(l.votes_dn+"<i class='af-icon-spin6 animate-spin'></i>")):(o=i.closest(".thumbs").find(".upvotes"),r=i.closest(".thumbs").find(".dnvotes"),o.parent().attr("aria-label",l.votes_up+" up vote"+(1!=l.votes_up?"s":"")),o.html(l.votes_up+"<i class='af-icon-spin6 animate-spin'></i>"),r.parent().attr("aria-label",l.votes_dn+" down vote"+(1!=l.votes_dn?"s":"")),r.html(l.votes_dn+"<i class='af-icon-spin6 animate-spin'></i>")),l.upClass&&o?o.parent().attr("aria-label",o.parent().attr("aria-label")+". Pressed"):l.dnClass&&r&&r.parent().attr("aria-label",r.parent().attr("aria-label")+". Pressed"))}),(function(e){n.live_status="",i.removeClass("loading"),s.isObject(e)&&"data"in e&&(401!=e.status?window.alert("An unknown error has ocured."):top.location.href="/join/light?redirect_to="+encodeURI(document.location.href))}))})).on("change","#sorting",(function(){var e=r(this);u({url:"/ajax.php",params:{action:"Answers.CommunityQASort",uri:document.location.pathname,sort_by:e.val()}}).then((function(e){var t=e.data,s=r(i),o=s.find(".questions");o.html(t.html),o.find(".answer-user-avatar[data-src]").each((function(){var e=r(this);e.attr("src",e.attr("data-src")),e.removeAttr("data-src"),e.addClass("answer-user-avatar-load"),e.css({display:"block"})})),s.data("qp",1),n.is_curi_left_filter_template?1==t.pages?r(i).find(".ftrbtns .viewmore").addClass("ng-hide"):r(i).find(".ftrbtns .viewmore").removeClass("ng-hide"):1==t.pages?r(i).find(".ftrbtns .viewmore").remove():0==r(i).find(".ftrbtns .viewmore").length&&r("<span class='btn blank grey no-decoration viewmore'><span class='txt'>View More Questions</span><span class='af-icon-spin6 animate-spin'></span></span>").prependTo(r(i).find(".ftrbtns")),setTimeout((function(){r(i).find(".questions .question .main-q .more-info").each((function(){var e=r(this);e.prop("scrollHeight")<=e.prop("offsetHeight")+(e.find("span.match").length>0?2:0)&&e.next(".more-info-more").remove()}))}),150)}))}));var v,_=new RegExp("\\/css\\/searchtools\\/common\\.v13\\.d(_V[\\da-f]+_)?\\.css(\\.gz)?"),g=n.$watch((function(){for(var e=0;e<document.styleSheets.length;e++)if("href"in document.styleSheets[e]&&null!=document.styleSheets[e].href&&!1!==_.test(document.styleSheets[e].href))return!0;return!1}),(function(e){e&&setTimeout((function(){r(i).find(".questions .question .main-q .more-info").each((function(){var e=r(this);e.prop("scrollHeight")<=e.prop("offsetHeight")&&e.next(".more-info-more").remove()})),g()}))})),w=p.defer();function b(e){v&&l.cancel(v),v=l((()=>{!function(e){w&&w.resolve();w=p.defer();var t={action:"Answers.CommunitySearch",query:e,uri:"/credit-cards/compare/"===document.location.pathname?void 0:document.location.pathname,category:"/credit-cards/compare/"===document.location.pathname?"credit-cards":void 0};u({url:"/ajax.php",params:t,timeout:w.promise}).then((function(e){""!=n.comsearch&&n.$applyAsync((()=>{n.comresults=e.data,n.comresults_loading=!1,setTimeout((()=>{m(n.comresults||[]),function(e){const t=e.length;n.qna_result_label=`Questions results. ${t||"No"} Result${1!==t?"s":""}`}(n.comresults),r(i).find(".questions .question .main-q .more-info").each((function(){let e=r(this);e.prop("scrollHeight")<=e.prop("offsetHeight")&&e.next(".more-info-more").remove()}))}),0)}))})).catch((e=>{console.error("Failed to fetch data:",e),n.$applyAsync((()=>{n.comresults_loading=!1}))}))}(e)}),300)}n.qna_result_label="",n.$watch("comsearch",(function(e,s){if(e!=s&&(v&&l.cancel(v),t.comsearch=e,!(r(".question-form.no-question:not(.ng-hide)").length>0))){if(""==e)return w.resolve(),w=p.defer(),delete n.comresults,void(n.comresults_loading=!1);n.comresults_loading=!0,b(e)}}));var q=new a(.5,50);r(".answer-user-avatar").each((function(e){var t=this,n=t.getAttribute("data-src");q.Observe(t.parentNode,(function(){t.addEventListener("load",(function(){r(t).addClass("answer-user-avatar-load")})),t.setAttribute("src",n),t.style.display="block",t.removeAttribute("data-src")}))}))}]),n.register.controller("CommunitySearchAskFormController",["$rootScope","$scope","$element","$question-resolver","$http",function(e,t,n,s,a){var l=1,c=!1;t.question="",t.details="",t.show_one_time_code=!1,t.show_one_time_code_resend=!1,t.one_time_code_re=/^\d{6}$/,t.one_time_code={val:""},t.overlay_shown=!1,t.live_status="",e.$watch("show_ask_overlay",(function(e){e&&(t.question=s.get()),t.overlay_shown!=e&&(t.overlay_shown=e||!1)})),t.autoExpand=function(e){var t="object"==typeof e?e.target:document.getElementById(e);if(t.scrollHeight){var n=t.offsetHeight-t.clientHeight;t.style.height="auto",t.style.height=t.scrollHeight+n+"px"}};var d=140;function u(e){if(t.question)if([].concat(t.question.split(/\s+/)).length<3)t.notice="Question must have at least 3 words.";else if(t.question.length>d)t.notice="Question cannot have more than 140 characters";else if(!t.show_one_time_code||t.one_time_code_re.test(t.one_time_code.val))if(!o.is_logged_in()&&l<4)l=4;else{c=!0;var n={question:t.question,url:document.location.href+""};""!=t.details&&(n.details=t.details),t.email?(n.email=i.localencrypt(t.email),n.publickey=i.localkey):e&&(n.light="true"),t.show_one_time_code&&(n.one_time_code=t.one_time_code.val+""),t.live_status="Submitting question",a({url:"/ajax.php?action=Answers.PostQuestion",method:"POST",data:n}).then((function(n){var s=n.data;if(c=!1,t.live_status="",s.error){if(!("message"in s))return void(s.message="Unexpected error. Please contact help@evolutionfinance.com");var o=s.message.match(/^Bad word `(.+)` detected\.$/);return o&&o.length&&(s.message='Profanity is not allowed, including words such as "'+o[1]+'". Please adjust.'),"required one time code"==s.message?(s.message="Please enter the one-time code we have sent to your email.",t.show_one_time_code=!0):s.message.startsWith("You have entered a wrong code.")&&(t.show_one_time_code=!0,t.show_one_time_code_resend=!0,s.message=""),void(t.notice=s.message)}e&&"redirect"in s?top.location.href=s.redirect:(l=5,t.question="",t.details="",t.email="",r(".ask-overlay .closebtn").one("click touchend",(function(){l=1})))}))}else t.notice="Please enter the 6-digit numerical code that we sent to your email.";else t.notice="Please enter your question."}t.chars_left=d,r(n).on("click touchend",".askform > span.closebtn",(function(){t.$apply((function(){e.show_ask_overlay=!1}));var n=document.querySelector(".comqa .search-notice .btn")||document.querySelector(".question-form.no-question .q-btn,.question-form .question-box .q-btn,.question-form .search-notice .btn,.ftrbtns .btn.ask-qa-btn,.ftrbtns .btn.blue");n&&n.focus()})).on("click touchend",".askform .ask .btn.next,.askform .step4 .btn.login,.askform .step4 .btn.em",(function(){u(4==r(this).closest("section").data("step"))})),t.is_overlay_step=function(e){return l==e},t.is_additional_details_visible=function(){return t.chars_left<d},t.is_form_loading=function(){return c},t.back=function(){l=1},t.resend_code=function(){t.show_one_time_code=!1,t.show_one_time_code_resend=!1,t.one_time_code.val="",u(!1)}}]),e(["shortcode-js"],(function(e){var t="https://"+location.host;(r(".pl-rates-div").length||r(".pl-terms-box").length)&&e.SetPrsWidgets(window,t),(r(".cc-mini-box").length||r(".cc-list-buttons").length||r(".cc-editorial-box").length)&&(e.ClearBoxes(),e.SetBoxes(window,t)),r(".cc-trust").length&&(e.ClearCCTrust(),e.SetCCTrust())}),(function(e){console.error(e)})),n.pageInjector.get("$stService").setControllerReady("CommunitySearchController"),n.pageInjector.get("$stService").setControllerReady("CommunitySearchAskFormController")}));