window.nodelist&&!nodelist.prototype.foreach&&(nodelist.prototype.foreach=function(e,t){var o,n=this.length;for(t=t||window,o=0;o1?1:s,o=.5*(1-math.cos(math.pi*l)),n=t.startx+(t.x-t.startx)*o,a=t.starty+(t.y-t.starty)*o,t.method.call(t.scrollable,n,a),n===t.x&&a===t.y||e.requestanimationframe(f.bind(e,t))}function g(o,n,i){var l,d,c,u,g=r();o===t.body?(l=e,d=e.scrollx||e.pagexoffset,c=e.scrolly||e.pageyoffset,u=a.scroll):(l=o,d=o.scrollleft,c=o.scrolltop,u=s),f({scrollable:l,method:u,starttime:g,startx:d,starty:c,x:n,y:i})}}"object"==typeof exports&&"undefined"!=typeof module?module.exports={polyfill:e}:e()}(),function(){"use strict";window.kadence={initoutlinetoggle:function(){document.body.addeventlistener("keydown",(function(){document.body.classlist.remove("hide-focus-outline")})),document.body.addeventlistener("mousedown",(function(){document.body.classlist.add("hide-focus-outline")}))},getoffset:function(e){if(e instanceof htmlelement){var t=e.getboundingclientrect();return{top:t.top+window.pageyoffset,left:t.left+window.pagexoffset}}return{top:null,left:null}},findparents:function(e,t){var o=[];return function e(n){var i=n.parentnode;i instanceof htmlelement&&(i.matches(t)&&o.push(i),e(i))}(e),o},toggleattribute:function(e,t,o,n){void 0===o&&(o=!0),void 0===n&&(n=!1),e.getattribute(t)!==o?e.setattribute(t,o):e.setattribute(t,n)},initnavtogglesubmenus:function(){var e=document.queryselectorall(".nav--toggle-sub");if(e.length)for(let t=0;tr)var y=math.floor(math.floor(l)-math.floor(c)+math.floor(p));else y=math.floor(l-c);else y=math.floor(l-c);var b=d.queryselector(".custom-logo"),k=d.queryselector(".kadence-sticky-logo"),l=d.queryselector(".site-main-header-inner-wrap"),s=parseint(l.getattribute("data-start-height"));if(s||(l.setattribute("data-start-height",l.offsetheight),s=l.offsetheight),window.scrolly<=y)l.style.height=s+"px",l.style.minheight=s+"px",l.style.maxheight=s+"px",b&&(b.style.maxheight="100%"),k&&(k.style.maxheight="100%");else if(window.scrolly>y){var x=math.max(v,s-(window.scrolly-(l-c)));l.style.height=x+"px",l.style.minheight=x+"px",l.style.maxheight=x+"px",b&&(b.style.maxheight=x+"px"),k&&(k.style.maxheight=x+"px")}}}if("true"===m){var e=math.floor(l-c),t=window.scrolly,a=d.offsetheight,q=r-t,m=window.getcomputedstyle(d).getpropertyvalue("transform").match(/(-?[0-9\.]+)/g);if(m&&void 0!==m[5]&&m[5])var h=parseint(m[5])+q;else h=0;var o=t>r;if(t<=e)d.style.transform="translatey(0px)";else if(o)d.classlist.add("item-hidden-above"),d.style.transform="translatey("+(math.abs(h)>a?-a:h)+"px)";else{e=math.floor(l-c);d.style.transform="translatey("+(h>0?0:h)+"px)",d.classlist.remove("item-hidden-above")}r=t}else e=math.floor(l-c);window.scrolly==e?(d.style.top=c+"px",d.classlist.add("item-is-fixed"),d.classlist.add("item-at-start"),d.classlist.remove("item-is-stuck"),h.classlist.add("child-is-fixed"),document.body.classlist.add("header-is-fixed")):window.scrolly>e?"true"===m?window.scrolly{u("updateactive")},c={root:document.documentelement},new intersectionobserver(((e,t)=>{e.foreach((e=>{d(e.intersectionratio>0)}))}),c).observe(s)}},gettopoffset:function(e="scroll"){if("load"===e)var t=document.queryselector("#main-header .kadence-sticky-header"),o=document.queryselector("#mobile-header .kadence-sticky-header");else t=document.queryselector('#main-header .kadence-sticky-header:not([data-reveal-scroll-up="true"])'),o=document.queryselector('#mobile-header .kadence-sticky-header:not([data-reveal-scroll-up="true"])');var n=0,i=0;if(kadenceconfig.breakpoints.desktop<=window.innerwidth){if(t)n="true"!==t.getattribute("data-shrink")||t.classlist.contains("site-header-inner-wrap")?math.floor(t.offsetheight):math.floor(t.getattribute("data-shrink-height"));else n=0;document.body.classlist.contains("admin-bar")&&(i=32)}else{if(o)n="true"===o.getattribute("data-shrink")?math.floor(o.getattribute("data-shrink-height")):math.floor(o.offsetheight);else n=0;document.body.classlist.contains("admin-bar")&&(i=46)}return math.floor(n+i+math.floor(kadenceconfig.scrolloffset))},scrolltoelement:function(e,t,o="scroll"){t=void 0===t||t;var n=window.kadence.gettopoffset(o),i=math.floor(e.getboundingclientrect().top)-n;window.scrollby({top:i,left:0,behavior:"smooth"}),e.tabindex="-1",e.focus({preventscroll:!0}),e.classlist.contains("kt-title-item")&&e.firstelementchild.click(),t&&window.history.pushstate("","","#"+e.id)},anchorscrolltocheck:function(e,t){if(t=void 0!==t?t:null,e.target.getattribute("href"))var o=e.target;else{if(!(o=e.target.closest("a")))return;if(!o.getattribute("href"))return}if(!o.parentnode||!o.parentnode.hasattribute("role")||"tab"!==o.parentnode.getattribute("role")){var n;n=t?t.getattribute("href").substring(t.getattribute("href").indexof("#")):o.getattribute("href").substring(o.getattribute("href").indexof("#"));var i=document.getelementbyid(n.replace("#",""));i&&(e.preventdefault(),window.kadence.scrolltoelement(i))}},initstickysidebarwidget:function(){if(document.body.classlist.contains("has-sticky-sidebar-widget")){var e=window.kadence.gettopoffset(),t=document.queryselector("#secondary .sidebar-inner-wrap .widget:last-child");t&&(t.style.top=math.floor(e+20)+"px",t.style.maxheight="calc( 100vh - "+math.floor(e+20)+"px )")}},initstickysidebar:function(){if(document.body.classlist.contains("has-sticky-sidebar")){var e=window.kadence.gettopoffset(),t=document.queryselector("#secondary .sidebar-inner-wrap");t&&(t.style.top=math.floor(e+20)+"px",t.style.maxheight="calc( 100vh - "+math.floor(e+20)+"px )")}},initanchorscrollto:function(){if(!document.body.classlist.contains("no-anchor-scroll")){if(window.onhashchange=function(){""===window.location.hash&&(window.scrollto({top:0,behavior:"smooth"}),document.activeelement.blur())},""!=window.location.hash){var e,t=location.hash.substring(1);if(!/^[a-z0-9_-]+$/.test(t))return;(e=document.getelementbyid(t))&&window.settimeout((function(){window.kadence.scrolltoelement(e,!1,"load")}),100)}var o=document.queryselectorall("a[href*=\\#]:not([href=\\#]):not(.scroll-ignore):not([data-tab]):not([data-toggle])");o.length&&o.foreach((function(e){new url(e.href).pathname===window.location.pathname&&e.addeventlistener("click",(function(e){window.kadence.anchorscrolltocheck(e)}))}))}},initscrolltotop:function(){var e=document.getelementbyid("kt-scroll-up");if(e){var t=function(){window.scrolly>100?e.classlist.add("scroll-visible"):e.classlist.remove("scroll-visible")};window.addeventlistener("scroll",t),t(),e.addeventlistener("click",(function(e){e.preventdefault(),window.scrollto({top:0,behavior:"smooth"}),document.activeelement.blur()}))}var o=document.getelementbyid("kt-scroll-up-reader");o&&o.addeventlistener("click",(function(e){e.preventdefault(),window.scrollto({top:0,behavior:"smooth"}),document.queryselector(".skip-link").focus()}))},init:function(){window.kadence.initnavtogglesubmenus(),window.kadence.inittoggledrawer(),window.kadence.initmobiletoggleanchor(),window.kadence.initmobiletogglesub(),window.kadence.initoutlinetoggle(),window.kadence.initstickyheader(),window.kadence.initstickysidebar(),window.kadence.initstickysidebarwidget(),window.kadence.inittransheaderpadding(),window.kadence.initanchorscrollto(),window.kadence.initscrolltotop()}},"loading"===document.readystate?document.addeventlistener("domcontentloaded",window.kadence.init):window.kadence.init()}();