!function(){"use strict";var e=function(e,t,n){t.forEach((function(t){return e.addEventListener(t,n)}))};var t=function(e){e.forEach((function(e){e.addEventListener("mouseover",(function(){var t=this;e.classList.contains("removing-hover")||"none"!==window.getComputedStyle(document.getElementById("main_navigation_toggle"),null).getPropertyValue("display")||(this.classList.add("hover-intent"),this.classList.add("hovering"),this.parentNode.classList.add("hover-intent"),this.parentNode.classList.add("hovering"),setTimeout((function(){t.classList.remove("hovering"),t.parentNode.classList.remove("hovering")}),500),setTimeout((function(){t.classList.remove("removing-hover"),t.parentNode.classList.remove("removing-hover")}),500))})),e.addEventListener("mouseleave",(function(){var e=this;setTimeout((function(){e.classList.remove("hover-intent"),e.parentNode.classList.remove("hover-intent")}),0),setTimeout((function(){e.classList.remove("removing-hover"),e.parentNode.classList.remove("removing-hover")}),500)}))}))};var n=function(e){e?e.forEach((function(e){var t=e.querySelectorAll(".sub-menu");t.forEach((function(e){var n,o;void 0!==t&&((n=e.getBoundingClientRect(),(o={}).top=n.top<0,o.left=n.left<0,o.bottom=n.bottom>=(document.documentElement.clientHeight||document.body.clientHeight),o.right=n.right>=(document.documentElement.clientWidth||document.body.clientWidth),o.any=o.top||o.left||o.bottom||o.right,o).right&&e.classList.add("is-out-of-viewport"))}))})):console.log("Warning: No items for sub-menus found.")};console.log("%cStand by for action...","color: #043D5D");var o=function(){var o=document.getElementById("main_navigation_toggle");if(o){var s,i=document.body,a=document.getElementById("primary_menu"),r=document.getElementById("utility_menu"),l=document.getElementById("site_search_toggle"),c=document.getElementById("site_search_form");console.log("Nav JS loaded!"),s=null,window.addEventListener("resize",(function(){n(d),s?(clearTimeout(s),s=null):(a.classList.add("stop-transition"),v()||m()&&p()),s=setTimeout((function(){a.classList.remove("stop-transition"),s=null}),100)})),r&&a&&function(e,t){var n=document.createElement("li"),o=e.cloneNode(!0);o.id="mobile_utility_menu",o.classList.remove("maxw","utility-menu-items"),o.classList.add("utility-subnav"),o.querySelectorAll(".menu-item").forEach((function(e){e.id="util-subnav-"+e.id})),n.classList.add("menu-item","menu-item-type-subnav","menu-item-is-sub-nav"),n.appendChild(o),t.appendChild(n)}(r,a),o.addEventListener("click",(function(e){e.preventDefault(),m()?p():h()}));var d=document.querySelectorAll("#primary_menu .menu-item");t(d),n(d),document.querySelectorAll(".dropdown-toggle").forEach((function(t){e(t,["click"],f)})),document.addEventListener("keydown",(function(e){if("Escape"===e.key||27===e.keyCode)if(v()&&m()){var t=document.activeElement;if(d=t,a.contains(d)){var n=t.closest(".dropdown-toggle"),s=t.parentNode,i=s.parentNode,r=s.querySelector(".dropdown-toggle");if(n&&n.classList.contains("opened"))f({target:n}),n.focus();else if(null!==r&&r.classList.contains("opened"))f({target:r}),r.focus();else if(s){var l=s.closest(".menu-item-has-children");if(null!==(r=l?l.querySelector(".dropdown-toggle"):null)&&r.classList.contains("opened"))f({target:r}),r.focus();else if(null!==l&&"primary_menu"!==i.id){var c=l.parentNode.closest(".menu-item-has-children").querySelector(".dropdown-toggle");null!==c&&c.classList.contains("opened")?(f({target:c}),c.focus()):(p(),o.focus())}else p(),o.focus()}else p(),o.focus()}}else p();var d})),a.addEventListener("focusout",(function(e){a.contains(e.relatedTarget)||(y(),v()&&p())})),window.addEventListener("click",(function(e){m()&&v()&&(document.getElementById("site_navigation").contains(e.target)||(y(),p()))})),a.querySelectorAll(".sub-menu").forEach((function(e){e.addEventListener("focusout",(function(t){e.contains(t.relatedTarget)||f({target:e.parentNode.querySelector(".dropdown-toggle")})}))})),a.querySelectorAll(".nav-item--text").forEach((function(e){e.addEventListener("click",(function(e){e.target.parentNode.querySelector(".dropdown-toggle").click()}))})),l&&c&&(l.onclick=function(e){e.preventDefault(),l&&l.classList.contains("opened")?u("close"):u("open")},c.addEventListener("focusout",(function(e){c.contains(e.relatedTarget)||u("close")})))}function u(e){m()&&v()&&p(),"close"===e?(l.classList.remove("opened"),i.classList.remove("search-is-open"),l.setAttribute("aria-expanded","false"),c.classList.remove("is-visible")):(l.classList.add("opened"),i.classList.add("search-is-open"),l.setAttribute("aria-expanded","true"),c.classList.add("is-visible"))}function m(){return!!o.classList.contains("opened")}function v(){return"none"!==window.getComputedStyle(document.getElementById("main_navigation_toggle"),null).getPropertyValue("display")}function h(){l&&l.classList.contains("opened")&&v()&&u("close"),o.setAttribute("aria-label","Close Menu"),o.classList.add("opened"),i.classList.add("menu-is-open"),o.setAttribute("aria-expanded","true")}function p(){o.setAttribute("aria-label","Open Menu"),o.classList.remove("opened"),i.classList.remove("menu-is-open"),o.setAttribute("aria-expanded","false")}function f(e){var t=e.target,n=t.parentNode,o=n.querySelector(".sub-menu");o.classList.contains("menu-is-open")?(o.classList.remove("menu-is-open"),t.classList.remove("opened"),t.setAttribute("aria-expanded",!1),n.classList.contains("menu-item")&&n.classList.remove("sub-opened")):(o.classList.add("menu-is-open"),t.classList.add("opened"),t.setAttribute("aria-expanded",!0),n.classList.contains("menu-item")&&n.classList.add("sub-opened"))}function y(){a.querySelectorAll(".sub-menu").forEach((function(e){e.classList.contains("menu-is-open")&&f({target:e.parentNode.querySelector(".dropdown-toggle")})}))}},s=document.getElementById("back_to_top"),i=document.getElementById("site_logo_link"),a="scrollBehavior"in document.documentElement.style,r={top:0,left:0,behavior:"smooth"},l=window.matchMedia("(prefers-reduced-motion: reduce)"),c=function(){if(s){var e=document.body.scrollHeight,t=1.25*document.documentElement.clientHeight;t>e&&(t=e-e/2),console.log("Back to Top is go! Will start at "+t+"px of total "+e+"px"),window.addEventListener("scroll",(function(){var e=window.pageYOffset;e>t&&s.classList.add("is-visible"),e0&&c.forEach((function(e){if(e!==l&&e.classList.contains("expanded")){var n=e.querySelector(".expand-btn"),o=e.querySelector(".expand-content");t(e,n,o)}})),n(e,o,s)):e.classList.contains("expanded")?(t(e,o,s),setTimeout(a,500)):n(e,o,s)}))})))},m=12;function v(e){return"string"==typeof e&&(!isNaN(e)&&!isNaN(parseFloat(e)))}function h(e){return e.toFixed(2).replace(/\d(?=(\d{3})+\.)/g,"$&,")}function p(e){return e/100/m}function f(e,t,n){return e*t/(1-Math.pow(1/(1+t),n))}function y(e,t,n){var o=Math.floor(Math.log(1-e*t/n)/Math.log(1/(1+t))),s=n*((1-Math.pow(1/(1+t),o))/t),i=e-s;return{termNew:o,pvPayments:s,pvLastPayment:i,lastPayment:i*Math.pow(1+t,o+1)}}function g(e,t){var n=document.createElement("span");return n.id="err_alert",n.innerHTML="zero"===t?"Error: All values must be greater than zero. Please correct errors on any fields marked and highlighted in red.":"prepay_term"===t?"Error: Term must be between 5 - 29 years. Please correct errors on any fields marked and highlighted in red.":"Error: Value is not a valid number. Please correct errors on any fields marked and highlighted in red.",n.classList.add("error"),n.setAttribute("role","alert"),e.setAttribute("aria-invalid",!0),e.setAttribute("aria-errormessage","err_alert"),n}function L(e,t){var n=document.getElementById("error"),o=e.value,s=!1;n.innerHTML="",n.classList.remove("is-visible"),e.parentNode.classList.remove("validated","invalidated"),null==o||""==o?(e.parentNode.classList.add("invalidated"),s=g(e,"invalid")):v(o)?o<=0&&(e.parentNode.classList.add("invalidated"),s=g(e,"zero")):(e.parentNode.classList.add("invalidated"),s=g(e,"invalid")),"term"===e.id&&"prepay_calc"===t.id&&(o>29||o<5)&&(e.parentNode.classList.add("invalidated"),s=g(e,"prepay_term")),s&&(n.innerHTML="",n.appendChild(s),n.classList.add("is-visible"))}function b(e){var t,n=e.querySelectorAll(".validate-this"),o=document.getElementById("error"),s=!1;return o.innerHTML="",o.classList.remove("is-visible"),n.forEach((function(e){var n=e.value,i=!0;e.parentNode.classList.remove("validated","invalidated"),null==n||""==n?(e.parentNode.classList.add("invalidated"),t=g(e,"invalid"),s=!0,i=!1):v(n)?n<=0&&(e.parentNode.classList.add("invalidated"),t=g(e,"zero"),s=!0,i=!1):(e.parentNode.classList.add("invalidated"),t=g(e,"invalid"),s=!0,i=!1),"term"===e.id&&I&&(n>29||n<5)&&(e.parentNode.classList.add("invalidated"),t=g(e,"prepay_term"),s=!0,i=!1),i?(e.parentNode.classList.add("validated"),e.setAttribute("aria-invalid",!1),e.removeAttribute("aria-errormessage")):(o.innerHTML="",o.appendChild(t),o.classList.add("is-visible"))})),!s}function E(e){var t=e.querySelectorAll(".input"),n=document.getElementById("err_alert");t.forEach((function(e){var t=e.dataset.default;e.value=t,e.parentNode.classList.remove("validated","invalidated")})),n&&(n.innerHTML="")}function _(e){var t=e.querySelector(".results-chart");t&&e.removeChild(t),e.classList.remove("is-visible")}function w(e,t,n,o,s){var i={numOfPayments:[0,"Number of Payments"],monthlyPaymentAmount:[0,"Monthly Payment Amount"],totalPayment:[0,"Total Payment"],interestPaid:[0,"Interest Paid"],interestPercent:[0,"Interest Percentage"]};console.log(e+" "+t+" "+n+" "+o);var a=p(t),r=n*m,l=Number(f(e,a,r)),c="",d=0,u=0;if(l0&&(c=" (plus 1 additional final payment of: $"+h(u)+")"),d=r*o+u}else d=l*r,o=l,c=" (minimum required)",s.value=l.toFixed(2);var g=(d-e)/d*100;i.numOfPayments[0]=r,i.monthlyPaymentAmount[0]="$"+h(o)+c,i.totalPayment[0]="$"+h(d),i.interestPaid[0]="$"+h(d-e),i.interestPercent[0]=h(g)+"%",function(e){var t=document.getElementById("results"),n=t.querySelector(".results-title");_(t);var o=function(e){var t=document.createElement("div");for(var n in t.classList.add("results-chart","lcb__chart"),e){var o=document.createElement("div"),s=document.createElement("span"),i=document.createElement("span");o.classList.add("chart-row","lcb__row",n),"title-row"===n?(s.classList.add("title-header","chart-col","lcb__th"),i.classList.add("numbers-header","chart-col","lcb__th")):(s.classList.add("row-title","chart-col","lcb__rowtitle"),i.classList.add("row-number","chart-col","lcb__data")),s.innerHTML=e[n][1],i.innerHTML=e[n][0],o.append(s,i),t.appendChild(o)}return t}(e);console.log(o),n.after(o),t.classList.add("is-visible")}(i)}function S(e,t){var n=document.getElementById("results"),o=n.querySelector(".subtitle");_(n),o.innerHTML="",o.append(t);var s=function(e){var t=document.createElement("div"),n=document.getElementById("prepayment"),o=document.createElement("span"),s=document.createElement("span");for(var i in t.classList.add("results-chart","results-chart--prepay","pcb__chart"),o.classList.add("presavings-text","pcb__pretext"),s.classList.add("presavings-amt","pcb__preamt"),o.innerHTML="Prepayment Savings:",e){var a=document.createElement("div"),r=document.createElement("span"),l=document.createElement("span"),c=document.createElement("span");a.classList.add("chart-row","pcb__row",i),"title-row"===i?(r.classList.add("title-header","prepay-col","pcb__th"),l.classList.add("standard-header","prepay-col","pcb__th"),c.classList.add("prepay-header","prepay-col","pcb__th")):"prepaymentSavings"===i?s.classList.add("prepay-savings","pcb__savings"):(r.classList.add("row-title","prepay-col","pcb__rowtitle"),l.classList.add("row-standard","prepay-col","pcb__data"),c.classList.add("row-prepay","prepay-col","pcb__data")),"prepaymentSavings"!==i?(l.innerHTML=e[i][0],c.innerHTML=e[i][1],r.innerHTML=e[i][2],a.append(r,l,c),t.appendChild(a)):s.innerHTML=e[i][0]}return n.innerHTML="",n.append(o,s),t}(e);o.after(s),n.classList.add("is-visible")}var q=document.getElementById("loan_calc"),I=document.getElementById("prepay_calc"),A=document.querySelectorAll(".validate-this"),x=function(){if(q){var e=document.getElementById("principal"),t=document.getElementById("rate"),n=document.getElementById("term"),o=document.getElementById("min-pay"),s=document.getElementById("calculate"),i=document.getElementById("results");document.getElementById("reset").addEventListener("click",(function(e){e.preventDefault(),E(q),_(i)})),s.addEventListener("click",(function(s){s.preventDefault(),b(q)&&w(Number(e.value),Number(t.value),Number(n.value),Number(o.value),o)})),A&&A.forEach((function(e){e.addEventListener("blur",(function(t){L(e,q)}))}))}if(I){var a=document.getElementById("principal"),r=document.getElementById("rate"),l=document.getElementById("term"),c=document.getElementById("stnd-pay"),d=document.getElementById("alt-pay"),u=document.getElementById("calculate"),v=document.getElementById("results");document.getElementById("reset").addEventListener("click",(function(e){e.preventDefault(),E(I),_(v)})),u.addEventListener("click",(function(e){e.preventDefault(),b(I)&&function(e,t,n,o,s){var i={"title-row":["Standard Payment","Prepayment","Loan Parameter"],monthlyPayment:[0,0,"Monthly Payment"],numOfPayments:[0,0,"# of Payments"],paymentPeriod:[0,0,"Payment Period (Yrs)"],interestPaid:[0,0,"Interest Paid"],percentToInterest:[0,0,"% Paid to Interest"],totalPaid:[0,0,"Total Paid"],prepaymentSavings:[0,"Prepayment Savings"]};console.log(e+" "+t+" "+n+" "+o);var a=p(t),r=n*m,l=Number(f(e,a,r));if(l=!Number.isNaN(l)&&Number.isFinite(l)?l:0,s.value=l.toFixed(2),l>0&&o>l){var c=l*r,d=c-e,u=d/c*100;i.monthlyPayment[0]="$"+h(l),i.numOfPayments[0]=r,i.paymentPeriod[0]=n,i.interestPaid[0]="$"+h(d),i.percentToInterest[0]=u.toFixed(2)+"%",i.totalPaid[0]="$"+h(c);var v=y(e,a,o),g=o*v.termNew+v.lastPayment,L=g-e,b=L/g*100;i.monthlyPayment[1]="$"+h(o),i.numOfPayments[1]=v.lastPayment>0?v.termNew+1:v.termNew,i.paymentPeriod[1]=(i.numOfPayments[1]/m).toFixed(2),i.interestPaid[1]="$"+h(L),i.percentToInterest[1]=b.toFixed(2)+"%",i.totalPaid[1]="$"+h(g);var E=c-g,_="Comparing Standard vs. Prepayment secenarios on a $"+h(e)+" loan:";i.prepaymentSavings[0]="$"+h(E),S(i,_)}}(Number(a.value),Number(r.value),Number(l.value),Number(d.value),c)})),A&&A.forEach((function(e){e.addEventListener("blur",(function(t){L(e,I)}))}))}},k=['a[href]:not([tabindex^="-"])','area[href]:not([tabindex^="-"])','input:not([type="hidden"]):not([type="radio"]):not([disabled]):not([tabindex^="-"])','input[type="radio"]:not([disabled]):not([tabindex^="-"])','select:not([disabled]):not([tabindex^="-"])','textarea:not([disabled]):not([tabindex^="-"])','button:not([disabled]):not([tabindex^="-"])','iframe:not([tabindex^="-"])','audio[controls]:not([tabindex^="-"])','video[controls]:not([tabindex^="-"])','[contenteditable]:not([tabindex^="-"])','[tabindex]:not([tabindex^="-"])'];function B(e){this._show=this.show.bind(this),this._hide=this.hide.bind(this),this._maintainFocus=this._maintainFocus.bind(this),this._bindKeypress=this._bindKeypress.bind(this),this.$el=e,this.shown=!1,this._id=this.$el.getAttribute("data-a11y-dialog")||this.$el.id,this._previouslyFocused=null,this._listeners={},this.create()}function N(e,t){return n=(t||document).querySelectorAll(e),Array.prototype.slice.call(n);var n}function P(e){(e.querySelector("[autofocus]")||e).focus()}function T(){N("[data-a11y-dialog]").forEach((function(e){new B(e)}))}B.prototype.create=function(){this.$el.setAttribute("aria-hidden",!0),this.$el.setAttribute("aria-modal",!0),this.$el.setAttribute("tabindex",-1),this.$el.hasAttribute("role")||this.$el.setAttribute("role","dialog"),this._openers=N('[data-a11y-dialog-show="'+this._id+'"]'),this._openers.forEach(function(e){e.addEventListener("click",this._show)}.bind(this));const e=this.$el;return this._closers=N("[data-a11y-dialog-hide]",this.$el).filter((function(t){return t.closest('[aria-modal="true"], [data-a11y-dialog]')===e})).concat(N('[data-a11y-dialog-hide="'+this._id+'"]')),this._closers.forEach(function(e){e.addEventListener("click",this._hide)}.bind(this)),this._fire("create"),this},B.prototype.show=function(e){return this.shown||(this._previouslyFocused=document.activeElement,this.$el.removeAttribute("aria-hidden"),this.shown=!0,P(this.$el),document.body.addEventListener("focus",this._maintainFocus,!0),document.addEventListener("keydown",this._bindKeypress),this._fire("show",e)),this},B.prototype.hide=function(e){return this.shown?(this.shown=!1,this.$el.setAttribute("aria-hidden","true"),this._previouslyFocused&&this._previouslyFocused.focus&&this._previouslyFocused.focus(),document.body.removeEventListener("focus",this._maintainFocus,!0),document.removeEventListener("keydown",this._bindKeypress),this._fire("hide",e),this):this},B.prototype.destroy=function(){return this.hide(),this._openers.forEach(function(e){e.removeEventListener("click",this._show)}.bind(this)),this._closers.forEach(function(e){e.removeEventListener("click",this._hide)}.bind(this)),this._fire("destroy"),this._listeners={},this},B.prototype.on=function(e,t){return void 0===this._listeners[e]&&(this._listeners[e]=[]),this._listeners[e].push(t),this},B.prototype.off=function(e,t){var n=(this._listeners[e]||[]).indexOf(t);return n>-1&&this._listeners[e].splice(n,1),this},B.prototype._fire=function(e,t){var n=this._listeners[e]||[],o=new CustomEvent(e,{detail:t});this.$el.dispatchEvent(o),n.forEach(function(e){e(this.$el,t)}.bind(this))},B.prototype._bindKeypress=function(e){const t=document.activeElement;t&&t.closest('[aria-modal="true"]')!==this.$el||(this.shown&&"Escape"===e.key&&"alertdialog"!==this.$el.getAttribute("role")&&(e.preventDefault(),this.hide(e)),this.shown&&"Tab"===e.key&&function(e,t){var n=function(e){return N(k.join(","),e).filter((function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}))}(e),o=n.indexOf(document.activeElement);t.shiftKey&&0===o?(n[n.length-1].focus(),t.preventDefault()):t.shiftKey||o!==n.length-1||(n[0].focus(),t.preventDefault())}(this.$el,e))},B.prototype._maintainFocus=function(e){!this.shown||e.target.closest('[aria-modal="true"]')||e.target.closest("[data-a11y-dialog-ignore-focus-trap]")||P(this.$el)},"undefined"!=typeof document&&("loading"===document.readyState?document.addEventListener("DOMContentLoaded",T):window.requestAnimationFrame?window.requestAnimationFrame(T):window.setTimeout(T,16));var D,M,H=function(){var e=document.getElementById("school_lookup");if(e){var t=document.getElementById("school_search"),n=e.querySelector(".schools-list"),o=n.querySelectorAll(".school"),s=document.getElementById("lookup_results");o.length>7?n.classList.add("more-than-7"):n.classList.add("less-than-7"),t.addEventListener("input",(function(){var e=this.value.toLowerCase(),t=0;e.length<=1||!n?n.classList.contains("searched")&&function(e,t){var n=document.getElementById("lookup_results");e.forEach((function(e){e.classList.contains("no-results")||e.classList.remove("search-result","hidden")})),t.classList.remove("searched","no-results-found","has-results","less-than-7","more-than-7"),e.length>7?t.classList.add("more-than-7"):t.classList.add("less-than-7"),n&&(n.innerHTML="")}(o,n):(n.classList.add("searched"),o.forEach((function(n){var o=n.dataset.name;"false"!==o&&o.indexOf(e)>-1?(n.classList.remove("hidden"),n.classList.add("search-result"),t++):(n.classList.remove("search-result"),n.classList.add("hidden"))})),0===t?(n.classList.remove("has-results"),n.classList.add("no-results-found")):(n.classList.add("has-results"),n.classList.remove("no-results-found")),t>7?(n.classList.remove("less-than-7"),n.classList.add("more-than-7")):(n.classList.remove("more-than-7"),n.classList.add("less-than-7")),s&&(s.innerHTML=t>0?t+" results found":"0 results found"))})),t.addEventListener("keyup",(function(e){if("Enter"===e.key&&n.classList.contains("searched")){var t=n.querySelector(".search-result");if(t)t.querySelector(".school-link").focus()}}))}},C=function(){var e=document.querySelectorAll(".js-people-grid");function t(e){return e.closest(".the-grid")}function n(e){return e.closest(".person")}0!==e.length&&(console.log("%cPeople grid located. Stand by to view bios.","color: #043D5D"),e.forEach((function(e){var o=e.querySelectorAll(".view-bio"),s=e.querySelectorAll(".close-btn");o.forEach((function(e){e.addEventListener("click",(function(o){var s,i=n(e),a=t(e),r=i.querySelector(".person-data");((s=a).querySelectorAll(".viewing-bio").length||s.classList.contains("has-open-bio"))&&function(e){var t=e.querySelectorAll(".viewing-bio");e.classList.remove("has-open-bio"),t.forEach((function(e){e.classList.remove("viewing-bio")}))}(a),e.setAttribute("aria-expanded",!0),r.setAttribute("aria-hidden",!1),a.classList.add("has-open-bio"),i.classList.add("viewing-bio")}))})),s.forEach((function(e){e.addEventListener("click",(function(o){var s=n(e),i=t(e),a=n(e).querySelector(".view-bio"),r=s.querySelector(".person-data");a.setAttribute("aria-expanded",!1),r.setAttribute("aria-hidden",!0),i.classList.remove("has-open-bio"),s.classList.remove("viewing-bio")}))}))})))},$=document.getElementById("jump_menu");function F(){return document.documentElement.scrollTop||document.body.scrollTop}function O(e){if(e){var t=e.getAttribute("id"),n=document.querySelector('[href="#'.concat(t,'"]')),o=document.querySelector(".is-active");o&&o.classList.remove("is-active"),n.classList.add("is-active")}}function j(){var e,t=document.querySelectorAll(".js-section"),n=window.scrollY,o=(window.scrollY,window.innerHeight,window.scrollY+window.innerHeight),s=F();M!=s&&(console.log(M,s),t.forEach((function(t){var i=t.offsetTop;M>s&&n>i&&(e=t),Mi&&(e=t)})),O(e))}var U=function(){if($){console.log("%cJump menu is go. Readying for takeoff.","color: #043D5D");var e=new IntersectionObserver((function(e,t){e.forEach((function(e){e.isIntersecting&&(D&&clearTimeout(D),M=F(),D=setTimeout(j,500),O(e.target))}))}),{threshold:.1}),t=new IntersectionObserver((function(){var e=document.querySelector(".jump-menu-link"),t=document.querySelector(".is-active"),n=document.getElementById("masthead"),o=n.offsetTop+n.offsetHeight;t&&F()=200&&this.status<400){if(r.classList.remove("is-visible"),"wharrgarbl"===this.response)return void G(d,!0);if("all"===e)c.insertAdjacentHTML("beforeend",this.response),G(l,!1);else if("new"!==m){d.querySelector(".posts-list").insertAdjacentHTML("beforeend",this.response),G(d,!1)}else{l.insertAdjacentHTML("afterend",this.response);var t=document.getElementById(e+"_query");G(t,!1),z(t.querySelector(".load-more-btn"),t,e)}}else console.log(this.response),console.log(this.responseText)},s.onerror=function(){console.log("Connection error!")},s.send("action=blog_update&nonce="+a+"&grab="+t+"¤t="+n+"&query="+m+"&cat="+e)}}function V(){document.getElementById("blog_posts").querySelectorAll(".query").forEach((function(e){e.classList.remove("active")}))}var X=function(){if(R){console.log("%cCat Select located. Be ready for anything.","color: #043D5D");var e=document.getElementById("blog_controls"),t=document.getElementById("blog_posts"),n=e.dataset.siteUrl,o=!1,s=e.dataset.context;if(R.querySelector('[value="-1"]').disabled=!0,"blog"===s)R.addEventListener("change",(function(e){var t=e.target.value;console.log(t),"-1"!==t||-1!==t?(!function(){if(R&&!R.querySelector('[value="all"]')){var e=document.createElement("option");e.text="Show All Posts",e.value="all",R.add(e)}}(),Y(t)):Y("all")}));else{var i=e.dataset.category;i&&(R.value=i),R.addEventListener("change",(function(e){var t=e.target.value,o=n+"/blog/category/"+t+"/";"-1"===t&&-1===t||(location.href=o)}))}if(t){var a=t.querySelector(".query.active"),r=a.querySelector(".post-controls"),l=parseInt(a.dataset.posts);(o=parseInt(a.dataset.postnum))&&o,l0&&a.nhUrl&&(console.log("NH Links found: "+r.length),n=r,(o=a.nhUrl)&&n.forEach((function(e){e.href=o})))}var l={};l.cid=e("partner_flow"),l.nh=e("nh_url"),l&&(l.cid!=a.cid?(console.log("Ew, bad cookie."),t("partner_flow",a.cid,30),a.nhUrl?t("nh_url",a.nhUrl,30):t("nh_url","",30)):console.log("And the cookies are good - om nom nom nom!"))}},Z=function(){var e=document.querySelectorAll(".is-inter-btn"),t=document.body.dataset.leaving,n=window.location.href,o=Date.now();document.getElementById("exit_page");e&&e.forEach((function(e){var s=e.getAttribute("href"),i=t+"?url="+encodeURIComponent(s)+"&cachebuster="+o+"&return="+encodeURIComponent(n);e.setAttribute("href",i)}))};document.body.classList.remove("no-js"),document.body.classList.add("js"),document.addEventListener("DOMContentLoaded",(function(){console.log("%cGRANED JS loaded - Theme Version 1.0.8","color: #043D5D"),d(),c(),U(),u(),x(),H(),C(),X(),Q(),Z(),o();var e=document.querySelectorAll(".block-has-dialog");e.length>0?(console.log("%ca11y Dialog detected in blocks - standby for action!","color: #043D5D"),e.forEach((function(e){var t=e.querySelector(".dialog-container"),n=t.querySelector(".dialog-close"),o=e.querySelector(".open-dialog-btn"),s=new B(t);o.addEventListener("click",(function(e){console.log("Now opening "+t.id),s.show()})),n.addEventListener("click",(function(e){console.log("Now closing "+t.id),s.hide()})),s.on("show",(function(e){document.body.classList.add("dialog-is-open","dialog-is-open--"+t.id)})),s.on("hide",(function(e){document.body.classList.remove("dialog-is-open","dialog-is-open--"+t.id)}))}))):console.log("No block modals found - standing down.")}))}(); ; /*! iFrame Resizer (iframeSizer.min.js ) - v4.3.7 - 2023-09-14 * Desc: Force cross domain iframes to size to content. * Requires: iframeResizer.contentWindow.min.js to be loaded into the target frame. * Copyright: (c) 2023 David J. Bradshaw - dave@bradshaw.net * License: MIT */ !function(d){var c,u,a,v,x,I,M,r,f,k,i,l,z;function m(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}function F(e,n,i){e.addEventListener(n,i,!1)}function B(e,n,i){e.removeEventListener(n,i,!1)}function p(e){return x+"["+(n="Host page: "+(e=e),n=window.top!==window.self?window.parentIFrame&&window.parentIFrame.getId?window.parentIFrame.getId()+": "+e:"Nested host page: "+e:n)+"]";var n}function t(e){return k[e]?k[e].log:u}function O(e,n){o("log",e,n,t(e))}function E(e,n){o("info",e,n,t(e))}function R(e,n){o("warn",e,n,!0)}function o(e,n,i,t){!0===t&&"object"==typeof window.console&&console[e](p(n),i)}function w(e){function i(){t("Height"),t("Width"),P(function(){H(w),C(b),l("onResized",w)},w,"init")}function n(){var e=p.slice(I).split(":"),n=e[1]?parseInt(e[1],10):0,i=k[e[0]]&&k[e[0]].iframe,t=getComputedStyle(i);return{iframe:i,id:e[0],height:n+function(e){if("border-box"!==e.boxSizing)return 0;var n=e.paddingTop?parseInt(e.paddingTop,10):0,e=e.paddingBottom?parseInt(e.paddingBottom,10):0;return n+e}(t)+function(e){if("border-box"!==e.boxSizing)return 0;var n=e.borderTopWidth?parseInt(e.borderTopWidth,10):0,e=e.borderBottomWidth?parseInt(e.borderBottomWidth,10):0;return n+e}(t),width:e[2],type:e[3]}}function t(e){var n=Number(k[b]["max"+e]),i=Number(k[b]["min"+e]),e=e.toLowerCase(),t=Number(w[e]);O(b,"Checking "+e+" is in range "+i+"-"+n),tk[r]["max"+e])throw new Error("Value for min"+e+" can not be greater than max"+e)}}function h(e,n){null===i&&(i=setTimeout(function(){i=null,e()},n))}function e(){"hidden"!==document.visibilityState&&(O("document","Trigger event: Visibility change"),h(function(){b("Tab Visible","resize")},16))}function b(i,t){Object.keys(k).forEach(function(e){var n;k[n=e]&&"parent"===k[n].resizeFrom&&k[n].autoResize&&!k[n].firstRun&&A(i,t,k[e].iframe,e)})}function y(){F(window,"message",w),F(window,"resize",function(){var e;O("window","Trigger event: "+(e="resize")),h(function(){b("Window "+e,"resize")},16)}),F(document,"visibilitychange",e),F(document,"-webkit-visibilitychange",e)}function n(){function t(e,n){if(n){if(!n.tagName)throw new TypeError("Object is not a valid DOM element");if("IFRAME"!==n.tagName.toUpperCase())throw new TypeError("Expected