(function(){"use strict";/**
 * @copyright  (C) 2019 Open Source Matters, Inc. <https://www.joomla.org>
 * @license    GNU General Public License version 2 or later; see LICENSE.txt
 */(function(n){n.addEventListener("DOMContentLoaded",function(){window.jSelectModuleType=function(){var e=n.querySelectorAll("#moduleDashboardAddModal .modal-footer .btn.hidden");e.length&&setTimeout(function(){e.forEach(function(t){t.classList.remove("hidden")})},1e3)};var i=n.querySelectorAll("#moduleDashboardAddModal .modal-footer .btn"),r=[],d=!1;i.length&&i.forEach(function(e){e.classList.contains("hidden")&&r.push(e),e.addEventListener("click",function(t){var o=t.currentTarget;if(o||(o=t.target),o){var l=o.dataset.bsTarget;d=l==="#saveBtn",setTimeout(function(){d=!1},1500);var s=n.querySelector("#moduleDashboardAddModal iframe"),f=s.contentDocument||s.contentWindow.document,c=f.querySelector(l);c&&c.click()}})});var a=n.querySelector("#moduleDashboardAddModal");a&&(a.addEventListener("hide.bs.modal",function(){r.forEach(function(e){e.classList.add("hidden")})}),a.addEventListener("hidden.bs.modal",function(){d&&setTimeout(function(){window.parent.location.reload()},1e3)}))})})(document)})();
