(()=>{var e,t,n={37:-1,38:-1,39:1,40:1};function i(t){e[t].addEventListener("click",function(e){r(e.target,!1)}),e[t].addEventListener("keydown",function(t){switch(t.keyCode){case 35:t.preventDefault(),r(e[e.length-1]);break;case 36:t.preventDefault(),r(e[0])}}),e[t].addEventListener("keyup",function(t){switch(t.keyCode){case 37:case 39:!function(t){for(var i=t.keyCode,r=0;r<e.length;r++)e[r].addEventListener("focus",o);if(n[i]){var a=t.target;void 0!==a.index&&(e[a.index+n[i]]?e[a.index+n[i]].focus():37===i||38===i?e[e.length-1].focus():39!==i&&40!==i||e[0].focus())}}(t)}}),e[t].index=t}function r(n,i){i=i||!0,function(){for(var n=0;n<e.length;n++)e[n].setAttribute("tabindex","-1"),e[n].setAttribute("aria-selected","false"),e[n].classList.remove("nav-tab-active"),e[n].removeEventListener("focus",o);for(var i=0;i<t.length;i++)t[i].setAttribute("hidden","hidden")}(),n.removeAttribute("tabindex"),n.setAttribute("aria-selected","true"),n.classList.add("nav-tab-active");var r=n.getAttribute("aria-controls");document.getElementById(r).removeAttribute("hidden"),i&&n.focus()}function o(e){var t;(t=e.target)===document.activeElement&&r(t,!1)}document.addEventListener("DOMContentLoaded",function(){document.querySelectorAll('#duplicate_post_settings_form [role="tablist"]')[0],e=document.querySelectorAll('#duplicate_post_settings_form [role="tab"]'),t=document.querySelectorAll('#duplicate_post_settings_form [role="tabpanel"]');for(var n=0;n<e.length;++n)i(n)}),jQuery(function(){jQuery(".taxonomy_private").hide(),jQuery(".toggle-private-taxonomies").on("click",function(){var e=jQuery(this);jQuery(".taxonomy_private").toggle(300,function(){e.attr("aria-expanded",jQuery(this).is(":visible"))})})})})();