(function(){function h(){function h(){if(!document.querySelector("a.skip-link")){var a=document.createElement("a");a.className="skip-link";a.href="#maincontent";a.textContent="Skip to main content";document.body.insertBefore(a,document.body.firstChild);a.addEventListener("click",function(){setTimeout(function(){var a=document.getElementById("maincontent");a&&(a.setAttribute("tabindex","-1"),a.focus({preventScroll:!1}))},0)})}}function n(){h();var a=document.getElementById("maincontent");a||((a=document.querySelector("main")||
document.querySelector("main, #content, .td-main-content-wrap, .td-outer-wrap, #td-outer-wrap, .tdc-content-wrap, .td-container, .td-content-wrap, .site-content, #primary")||document.body)&&"main"!==a.tagName.toLowerCase()&&a.setAttribute("role","main"),a&&(a.id="maincontent",a.hasAttribute("tabindex")||a.setAttribute("tabindex","-1")))}function r(a){function b(a,b){a&&(b?(a.style.setProperty("display","block","important"),a.style.setProperty("opacity","1","important"),a.style.setProperty("visibility",
"visible","important"),a.style.pointerEvents="auto"):(a.style.removeProperty("display"),a.style.removeProperty("opacity"),a.style.removeProperty("visibility"),a.style.pointerEvents=""),b?(a.setAttribute("aria-hidden","false"),p&&(a.inert=!1)):(p&&(a.inert=!0),a.setAttribute("aria-hidden","true")))}function c(a){return a.classList.contains("is-open")||a.classList.contains("tdb-hover")}function l(e,c){c=void 0===c?{}:c;c=void 0===c.moveFocus?!0:c.moveFocus;var t=m(e),g=h(e);t&&g&&(d.forEach(function(b){b!==
e&&a.contains(b)&&k(b,{returnFocus:!1})}),e.classList.add("is-open","tdb-hover"),t.setAttribute("aria-expanded","true"),g.id||(g.id="mm-"+Math.random().toString(36).slice(2)),t.setAttribute("aria-controls",g.id),g.setAttribute("role","group"),b(g,!0),c&&(c=g.querySelector('a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'))&&c.focus())}function k(a,c){c=void 0===c?{}:c;c=void 0===c.returnFocus?!0:c.returnFocus;
var e=m(a),g=h(a);e&&g&&(c&&g.contains(document.activeElement)&&e.focus(),a.classList.remove("is-open","tdb-hover"),e.setAttribute("aria-expanded","false"),b(g,!1))}if(a&&!a.hasAttribute("data-a11y-menu")){a.setAttribute("data-a11y-menu","1");a.querySelectorAll(".tdb-sub-menu-icon").forEach(function(a){return a.setAttribute("aria-hidden","true")});var f=Array.from(a.querySelectorAll(":scope > li")),d=a.querySelectorAll("li.tdb-mega-menu, li.menu-item-has-children"),m=function(a){return a.querySelector(":scope > a, :scope > button")},
h=function(a){return a.querySelector(":scope > .sub-menu")};d.forEach(function(a){var e=m(a),d=h(a);e&&d&&(e.setAttribute("aria-haspopup","true"),e.setAttribute("aria-expanded","false"),d.id||(d.id="mm-"+Math.random().toString(36).slice(2)),e.setAttribute("aria-controls",d.id),b(d,!1),a.addEventListener("mouseenter",function(){l(a,{moveFocus:!1})}),a.addEventListener("mouseleave",function(){k(a,{returnFocus:!1})}),e.addEventListener("click",function(b){"#"===e.getAttribute("href")&&b.preventDefault();
c(a)?k(a):l(a)}),e.addEventListener("keydown",function(b){if("Enter"===b.key||" "===b.key)b.preventDefault(),c(a)?k(a):l(a);else if("ArrowDown"===b.key)b.preventDefault(),c(a)||l(a),b=a.querySelectorAll(':scope > .sub-menu a[href], :scope > .sub-menu button:not([disabled]), :scope > .sub-menu [tabindex]:not([tabindex="-1"])'),b.length&&b[0].focus();else if("ArrowUp"===b.key)b.preventDefault(),c(a)||l(a,{moveFocus:!1}),b=a.querySelectorAll(':scope > .sub-menu a[href], :scope > .sub-menu button:not([disabled]), :scope > .sub-menu [tabindex]:not([tabindex="-1"])'),
b.length&&b[b.length-1].focus();else if("ArrowRight"===b.key||"ArrowLeft"===b.key){b.preventDefault();var e=f.indexOf(a);-1<e&&(b=m(f["ArrowRight"===b.key?(e+1)%f.length:(e-1+f.length)%f.length]))&&b.focus()}}),d.addEventListener("keydown",function(b){"Escape"===b.key&&(b.preventDefault(),k(a));if(!("ArrowRight"!==b.key&&"ArrowLeft"!==b.key||b.altKey||b.ctrlKey||b.metaKey)){var c=f.indexOf(a);-1<c&&(b.preventDefault(),b="ArrowRight"===b.key?(c+1)%f.length:(c-1+f.length)%f.length,k(a,{returnFocus:!1}),
(b=m(f[b]))&&b.focus())}}),a.addEventListener("focusout",function(){setTimeout(function(){a.contains(document.activeElement)||k(a,{returnFocus:!1})},0)}))});a.addEventListener("focusin",function(a){(a=a.target.closest(".sub-menu"))&&(a=a.closest("li"))&&!c(a)&&l(a,{moveFocus:!1})});a.addEventListener("keydown",function(a){var b=a.target.closest(".td-next-prev-wrap a");!b||"Enter"!==a.key&&" "!==a.key||(a.preventDefault(),b.click())})}}if(document.body&&document.body.classList.contains("a11y-enabled")&&
!document.documentElement.hasAttribute("data-a11y-initialized")){document.documentElement.setAttribute("data-a11y-initialized","true");var p="inert"in HTMLElement.prototype;"loading"===document.readyState?document.addEventListener("DOMContentLoaded",n,{once:!0}):n();setTimeout(n,500);(new MutationObserver(n)).observe(document.body,{childList:!0,subtree:!0});document.querySelectorAll(".tdb-block-menu").forEach(r);(new MutationObserver(function(a){a.forEach(function(a){a.addedNodes&&a.addedNodes.forEach(function(a){a instanceof
HTMLElement&&(a.matches&&a.matches(".tdb-block-menu")&&r(a),a.querySelectorAll&&a.querySelectorAll(".tdb-block-menu").forEach(r))})})})).observe(document.body,{childList:!0,subtree:!0});var d=document.querySelectorAll(".td-icon-search, .td-header-search-button, .td-search-btn"),q=document.querySelectorAll(".td-search-wrap, .td-search-box, .td-drop-down-search");if(d.length&&q.length){var u=function(a,b){a.classList.remove("is-open");a.setAttribute("aria-hidden","true");a._untrap&&a._untrap();a._untrap=
null;v(a,!1);var c=b||a._trigger;c&&"function"===typeof c.focus&&setTimeout(function(){return c.focus()},0)},w=function(a,b){a.classList.add("is-open");a.setAttribute("aria-hidden","false");v(a,!0);var c=a.querySelector('input[type="search"], input[type="text"]')||a.querySelector('a[href], button:not([disabled]), input:not([disabled]), [tabindex]:not([tabindex="-1"])');c&&c.focus();a._untrap&&a._untrap();a._untrap=y(a,function(){return u(a,b)});a._trigger=b||a._trigger},x=function(){return Array.from(q).find(function(a){return a.classList.contains("is-open")||
"false"===a.getAttribute("aria-hidden")})||q[0]},v=function(a,b){Array.from(document.body.children).forEach(function(c){c!==a&&(b?(p&&(c.inert=!0),c.setAttribute("aria-hidden","true")):(p&&(c.inert=!1),c.removeAttribute("aria-hidden")))})},y=function(a,b){function c(c){if("Escape"===c.key)c.preventDefault(),b&&b();else if("Tab"===c.key){var d=Array.from(a.querySelectorAll('a[href], area[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])')).filter(function(a){return null!==
a.offsetParent||a===document.activeElement});if(d.length){var f=d[0];d=d[d.length-1];c.shiftKey&&document.activeElement===f?(c.preventDefault(),d.focus()):c.shiftKey||document.activeElement!==d||(c.preventDefault(),f.focus())}}}a.addEventListener("keydown",c);return function(){return a.removeEventListener("keydown",c)}};q.forEach(function(a,b){a.setAttribute("role","dialog");a.setAttribute("aria-modal","true");a.setAttribute("aria-hidden",a.classList.contains("is-open")?"false":"true");a.id||(a.id=
"search-dialog-"+(b+1));a.hasAttribute("aria-labelledby")||a.hasAttribute("aria-label")||((b=a.querySelector("h1, h2, h3, [data-dialog-title]"))&&!b.id&&(b.id=a.id+"-title"),b?a.setAttribute("aria-labelledby",b.id):a.setAttribute("aria-label","Search"))});d.forEach(function(a){a.setAttribute("aria-haspopup","dialog");a.setAttribute("aria-expanded","false");a.addEventListener("click",function(b){b.preventDefault();b=x();a.setAttribute("aria-expanded","true");w(b,a)});a.addEventListener("keydown",function(b){if("Enter"===
b.key||" "===b.key)b.preventDefault(),a.click()})});document.addEventListener("click",function(a){if(a=a.target.closest(".td-search-close, .td-icon-close, .td-icon-search-close, .js-search-close"))if(a=a.closest(".td-search-wrap, .td-search-box, .td-drop-down-search")){var b=a._trigger||Array.from(d).find(function(a){return null!==a.offsetParent});u(a,b);b&&b.setAttribute("aria-expanded","false")}});document.addEventListener("keydown",function(a){if("Escape"===a.key){var b=x();b&&(b.classList.contains("is-open")||
"false"===b.getAttribute("aria-hidden"))&&(a.preventDefault(),a=b._trigger||Array.from(d).find(function(a){return"true"===a.getAttribute("aria-expanded")}),u(b,a),a&&a.setAttribute("aria-expanded","false"))}});document.addEventListener("focusin",function(a){if((a=a.target.closest(".td-search-wrap, .td-search-box, .td-drop-down-search"))&&("true"===a.getAttribute("aria-hidden")||!a.classList.contains("is-open"))){var b=a._trigger||Array.from(d)[0];w(a,b);b&&b.setAttribute("aria-expanded","true")}})}}}
"loading"===document.readyState?document.addEventListener("DOMContentLoaded",h,{once:!0}):h()})();
