芝麻web文件管理V1.00
编辑当前文件:/home2/sdektunc/beyondbrightenterprise.com/media/com_joomlaupdate/js/default.min.js
Joomla=window.Joomla||{},((e,t)=>{e.submitbuttonUpload=()=>{const a=t.getElementById("uploadForm");""===a.install_package.value?alert(e.Text._("COM_INSTALLER_MSG_INSTALL_PLEASE_SELECT_A_PACKAGE"),!0):a.install_package.files[0].size>a.max_upload_size.value?alert(e.Text._("COM_INSTALLER_MSG_WARNINGS_UPLOADFILETOOBIG"),!0):t.getElementById("joomlaupdate-confirm-backup").checked&&a.submit()},e.installpackageChange=()=>{const a=t.getElementById("uploadForm"),i=a.install_package.files[0].size,l=1*i/1024/1024,n=t.getElementById("file_size"),o=t.getElementById("max_upload_size_warn");""===a.install_package.value?(n.classList.add("hidden"),o.classList.add("hidden")):i&&(n.classList.remove("hidden"),n.innerHTML=e.sanitizeHtml(e.Text._("JGLOBAL_SELECTED_UPLOAD_FILE_SIZE").replace("%s",`${l.toFixed(2)} MB`)),i>a.max_upload_size.value?o.classList.remove("hidden"):o.classList.add("hidden"))},t.addEventListener("DOMContentLoaded",(()=>{const a=t.getElementById("uploadButton"),i=t.getElementById("install_package"),l=t.querySelector(".emptystate-btnadd",t.getElementById("joomlaupdate-wrapper")),n=t.getElementById("joomlaupdate-confirm-backup"),o=l?l.closest("form"):null,s=o?o.querySelector("[name=task]",o):null;a&&a.addEventListener("click",e.submitbuttonUpload),i&&i.addEventListener("change",e.installpackageChange),l&&"#"===l.getAttribute("href")&&s&&l.addEventListener("click",(e=>{e.preventDefault(),n&&!n.checked||(s.value="update.download",o.submit())}))}))})(Joomla,document),((e,t)=>{const a={config:{serverUrl:"index.php?option=com_joomlaupdate&task=update.fetchextensioncompatibility",selector:".extension-check"},STATE:{INCOMPATIBLE:0,COMPATIBLE:1,MISSING_COMPATIBILITY_TAG:2,SERVER_ERROR:3},cleanup:e=>{const a=t.querySelector("#joomlaupdate-precheck-extensions-tab .fa-spinner");let i="success",l="check";switch(e){case"danger":i="danger",l="times";break;case"warning":i="warning",l="exclamation-triangle"}a&&(a.classList.remove("fa-spinner","fa-spin","text-info"),a.classList.add(`fa-${l}`,`text-${i}`));const n=t.querySelector("#compatibilityTable0"),o=t.querySelector("#preupdateCheckWarning");n&&n.classList.add("hidden"),o&&o.classList.add("hidden")},run:()=>{a.nonCoreCriticalPlugins=e.getOptions("nonCoreCriticalPlugins",[]);const i=t.querySelectorAll(a.config.selector);if(0===i.length)return null!==t.getElementById("preupdatecheckbox")&&(t.getElementById("preupdatecheckbox").style.display="none"),null!==t.getElementById("noncoreplugins")&&(t.getElementById("noncoreplugins").checked=!0),[].slice.call(t.querySelectorAll("button.submitupdate")).forEach((e=>{e.classList.remove("disabled"),e.removeAttribute("disabled")})),void a.cleanup();const l=()=>{const a=t.getElementById("noncoreplugins");a.checked?window.confirm(e.Text._("COM_JOOMLAUPDATE_VIEW_DEFAULT_POTENTIALLY_DANGEROUS_PLUGIN_CONFIRM_MESSAGE"))?[].slice.call(t.querySelectorAll("button.submitupdate")).forEach((e=>{e.classList.remove("disabled"),e.removeAttribute("disabled")})):a.checked=!1:[].slice.call(t.querySelectorAll("button.submitupdate")).forEach((e=>{e.classList.add("disabled"),e.setAttribute("disabled","")}))};null!==t.getElementById("noncoreplugins")&&t.getElementById("noncoreplugins").addEventListener("change",l);const n=t.getElementById("joomlaupdate-wrapper");a.joomlaTargetVersion=n.getAttribute("data-joomla-target-version"),a.joomlaCurrentVersion=n.getAttribute("data-joomla-current-version"),[].slice.call(t.querySelectorAll(".compatibilitytoggle")).forEach((t=>{t.addEventListener("click",(()=>{const a=t.closest(".compatibilityTable");"closed"===t.dataset.state?(t.dataset.state="open",t.innerHTML=e.sanitizeHtml(e.Text._("COM_JOOMLAUPDATE_VIEW_DEFAULT_EXTENSIONS_SHOW_LESS_COMPATIBILITY_INFORMATION")),[].slice.call(a.querySelectorAll("table .hidden")).forEach((e=>{e.classList.remove("hidden")}))):(t.dataset.state="closed",t.innerHTML=e.sanitizeHtml(e.Text._("COM_JOOMLAUPDATE_VIEW_DEFAULT_EXTENSIONS_SHOW_MORE_COMPATIBILITY_INFORMATION")),[].slice.call(a.querySelectorAll("table .instver, table .upcomp, table .currcomp")).forEach((e=>{e.classList.add("hidden")})))}))})),[].slice.call(i).forEach((e=>{a.checkCompatibility(e,a.setResultView)}))},checkCompatibility:(t,i)=>{const l={element:t,compatibleVersion:0,serverError:1};e.request({url:`${a.config.serverUrl}&joomla-target-version=${encodeURIComponent(a.joomlaTargetVersion)}&joomla-current-version=${a.joomlaCurrentVersion}&extension-version=${t.getAttribute("data-extension-current-version")}&extension-id=${encodeURIComponent(t.getAttribute("data-extension-id"))}`,onSuccess(e){const t=JSON.parse(e);l.serverError=0,l.compatibilityData=t.data,i(l)},onError(){l.serverError=1,i(l)}})},setResultView:i=>{let l="";if(i.serverError)l=e.Text._("COM_JOOMLAUPDATE_VIEW_DEFAULT_EXTENSION_SERVER_ERROR"),i.compatibilityData={resultGroup:4};else switch(i.compatibilityData.upgradeCompatibilityStatus.state){case a.STATE.COMPATIBLE:if(i.compatibilityData.upgradeWarning){l=`
${e.sanitizeHtml(i.compatibilityData.upgradeCompatibilityStatus.compatibleVersion)}
`}else l=!1===i.compatibilityData.upgradeCompatibilityStatus.compatibleVersion?e.Text._("COM_JOOMLAUPDATE_VIEW_DEFAULT_EXTENSION_NO_COMPATIBILITY_INFORMATION"):e.sanitizeHtml(i.compatibilityData.upgradeCompatibilityStatus.compatibleVersion);break;case a.STATE.INCOMPATIBLE:case a.STATE.MISSING_COMPATIBILITY_TAG:l=e.Text._("COM_JOOMLAUPDATE_VIEW_DEFAULT_EXTENSION_NO_COMPATIBILITY_INFORMATION");break;default:l=e.Text._("COM_JOOMLAUPDATE_VIEW_DEFAULT_EXTENSION_WARNING_UNKNOWN")}if(i.element.innerHTML=l,l="",i.serverError)l=e.Text._("COM_JOOMLAUPDATE_VIEW_DEFAULT_EXTENSION_SERVER_ERROR");else switch(i.compatibilityData.currentCompatibilityStatus.state){case a.STATE.COMPATIBLE:l=!1===i.compatibilityData.currentCompatibilityStatus.compatibleVersion?e.Text._("COM_JOOMLAUPDATE_VIEW_DEFAULT_EXTENSION_NO_COMPATIBILITY_INFORMATION"):i.compatibilityData.currentCompatibilityStatus.compatibleVersion;break;case a.STATE.INCOMPATIBLE:case a.STATE.MISSING_COMPATIBILITY_TAG:l=e.Text._("COM_JOOMLAUPDATE_VIEW_DEFAULT_EXTENSION_NO_COMPATIBILITY_INFORMATION");break;default:l=e.Text._("COM_JOOMLAUPDATE_VIEW_DEFAULT_EXTENSION_WARNING_UNKNOWN")}const n=i.element.getAttribute("data-extension-id");t.getElementById(`available-version-${n}`).innerText=l;const o=t.querySelector(`#compatibilityTable${i.compatibilityData.resultGroup} tbody`);if(o&&o.appendChild(i.element.closest("tr")),t.getElementById(`compatibilityTable${i.compatibilityData.resultGroup}`).classList.remove("hidden"),3===i.compatibilityData.resultGroup&&(a.nonCoreCriticalPlugins=a.nonCoreCriticalPlugins.filter((e=>!(e.package_id.toString()===n||e.extension_id.toString()===n)))),!t.querySelector("#compatibilityTable0 tbody td")){t.getElementById("compatibilityTable0").classList.add("hidden");let i="success";a.nonCoreCriticalPlugins.forEach((a=>{let l=t.querySelector(`td[data-extension-id="${a.extension_id}"]`);if(l||(l=t.querySelector(`td[data-extension-id="${a.package_id}"]`)),l){const t=l.closest("tr");t.classList.add("error");const a=t.querySelector(".exname");a.innerHTML=`${e.sanitizeHtml(a.innerHTML)}\n
\n
\n
\n ${e.Text._("COM_JOOMLAUPDATE_VIEW_DEFAULT_POTENTIALLY_DANGEROUS_PLUGIN")}\n
\n\n
\n ${e.Text._("COM_JOOMLAUPDATE_VIEW_DEFAULT_HELP")}\n
\n
`;const n=a.querySelector(".hasPopover");n&&(n.style.cursor="pointer",new bootstrap.Popover(n,{placement:"top",html:!0,trigger:"focus"})),i="danger"}})),t.querySelector("#compatibilityTable2 tbody td")?i="danger":"danger"!==i&&t.querySelector("#compatibilityTable1 tbody td")&&(i="warning"),0===a.nonCoreCriticalPlugins.length&&"success"===i?(t.getElementById("preupdatecheckbox").style.display="none",t.getElementById("noncoreplugins").checked=!0,[].slice.call(t.querySelectorAll("button.submitupdate")).forEach((e=>{e.classList.remove("disabled"),e.removeAttribute("disabled")}))):a.nonCoreCriticalPlugins.length>0&&t.getElementById("preupdateCheckCompleteProblems").classList.remove("hidden"),a.cleanup(i)}}};null!==t.getElementById("preupdatecheck")&&t.addEventListener("DOMContentLoaded",a.run,!1)})(Joomla,document);