!function(){function e(){if(null===s)try{s=window.parent&&window.parent!==window?window.parent.FleekDash?.debug||window.FleekDash?.debug||!1:window.FleekDash?.debug||!1}catch{s=window.FleekDash?.debug||!1}return s}function t(){e()}function n(e){return/destination folder already exists|folder already exists/i.test(e)}function o(){document.querySelectorAll(".error, .notice-error, .update-message").forEach(function(e){if(!n(e.textContent||e.innerText||""))return;if("1"===e.dataset.fleekdashFolderExistsAnnotated)return;t();const o=document.createElement("p");o.style.marginTop="6px",o.style.fontSize="13px",o.style.opacity="0.85",o.textContent='Tip: use the "Replace current with uploaded" button below to overwrite the existing plugin. If no such button is shown, deactivate the plugin first, then try uploading again.',e.appendChild(o),e.dataset.fleekdashFolderExistsAnnotated="1"})}function i(){(window.location.href.includes("plugin-install.php")||window.location.href.includes("update.php?action=install-plugin")||document.body.classList.contains("plugin-install-php"))&&(t(),o(),new MutationObserver(function(e){let t=!1;e.forEach(function(e){e.addedNodes.length>0&&e.addedNodes.forEach(function(e){if(e.nodeType===Node.ELEMENT_NODE){const n=e;n.classList&&(n.classList.contains("error")||n.classList.contains("notice-error")||n.classList.contains("update-message"))&&(t=!0)}})}),t&&setTimeout(o,100)}).observe(document.body,{childList:!0,subtree:!0}),setTimeout(o,500),setTimeout(o,1e3),setTimeout(o,2e3))}let s=null;"loading"===document.readyState?document.addEventListener("DOMContentLoaded",i):i(),window.addEventListener("load",function(){setTimeout(o,500)}),window.fleekDashPluginInstallHandler={detectAndFixFalseFailure:o,isFolderExistsError:n,debugLog:t,debugWarn:function(){e()},debugError:function(){e()}}}();
//# sourceMappingURL=plugin-install-handler.js.map
