!function(){"use strict";document.addEventListener("DOMContentLoaded",(function(){const e=wpmtk_global_admin_object&&void 0!==wpmtk_global_admin_object.use_wp_submenu&&"0"==wpmtk_global_admin_object.use_wp_submenu;e&&document.querySelectorAll("#toplevel_page_wp-mastertoolkit-settings .wp-submenu.wp-submenu-wrap li:not(.wp-first-item)").forEach((function(e){const t=e.querySelector("a");if(t){const n=new URL(t.href).searchParams.get("page");"wpmastertoolkit-manage-license"!==n&&"wpmastertoolkit-credits"!==n&&(e.style.display="none")}}));const t=document.querySelector("#toplevel_page_wp-mastertoolkit-settings .wp-submenu.wp-submenu-wrap");if(!e&&t&&t.querySelectorAll("li").length>3){const e=t.querySelector("li.wp-first-item");if(e){const t=document.createElement("li");t.className="wpmtk-module-submenu-separator",t.innerHTML=`<span class="wpmtk-module-separator-text">${wpmtk_global_admin_object.i18n.Modules}</span>`,e.insertAdjacentElement("afterend",t)}const n=t.querySelectorAll("li");if(n.length>2){const e=n[n.length-1],t=document.createElement("li");t.className="wpmtk-module-submenu-separator",e.insertAdjacentElement("beforebegin",t)}}}))}();