CoreFiles by mySites.guru
indexer.min.js1 lines, 3,423 bytes, from Joomla_4.0.0-beta2-Beta-Full_Package.zip
Raw History Compare with 4.0.0-beta
md5
43af924622f4a2fa1dee033cf55a4738
sha1
fd07e479640b12ad99835fba1894e2bb8c03692f
sha256
e82d995211717119c0fbafeb5dc1db6a1e93133e0d01e5b3259771fa1980c66f
function _typeof(a){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},_typeof(a)}(function(a,b){'use strict';if(!a)throw new Error("core.js was not properly initialised");a.finderIndexer=function(){var c,d=null,e=null,f=null,g=!1,h="&".concat(b.getElementById("finder-indexer-token").getAttribute("name"),"=1"),i=function(a){var c=b.getElementById(a);return c?c.parentNode.removeChild(c):null},j=function(c,g){f=100*(e/d);var h=b.getElementById("progress-bar"),j=b.getElementById("finder-progress-header"),k=b.getElementById("finder-progress-message");j&&(j.innerText=c),k&&(k.innerHTML=g),h&&(100>f?(h.style.width="".concat(f,"%"),h.setAttribute("aria-valuenow",f)):(h.classList.remove("bar-success"),h.classList.add("bar-warning"),h.setAttribute("aria-valuemin",100),h.setAttribute("aria-valuemax",200),h.style.width="".concat(f,"%"),h.setAttribute("aria-valuenow",f)),g===a.Text._("COM_FINDER_INDEXER_MESSAGE_COMPLETE")&&(i("progress"),window.parent.Joomla.Modal.getCurrent().close()))},k=function(f,h){var k=b.getElementById("finder-progress-header"),l=b.getElementById("finder-progress-message");try{if(null===f)throw new Error(h);if(f.error)throw new Error(f);if(f.start&&(d=f.totalItems,b.getElementById("finder-debug-data"))){var m=b.getElementById("finder-debug-data");Object.entries(f.pluginState).forEach(function(a){var b="<dt class=\"col-sm-3\">".concat(a[0],"</dt>");b+="<dd id=\"finder-".concat(a[0].replace(/\s+/g,"-").toLowerCase(),"\" class=\"col-sm-9\"></dd>"),m.insertAdjacentHTML("beforeend",b)})}e+=f.batchOffset,j(f.header,f.message),b.getElementById("finder-debug-data")&&Object.entries(f.pluginState).forEach(function(a){b.getElementById("finder-".concat(a[0].replace(/\s+/g,"-").toLowerCase())).innerHTML="".concat(f.pluginState[a[0]].offset," of ").concat(f.pluginState[a[0]].total)}),e<d?c("indexer.batch"):!g&&(g=!0,c("indexer.optimize"))}catch(b){i("progress");try{f.error&&(k&&(k.innerText=f.header,k.classList.add("finder-error")),l&&(l.innerHTML=f.message,l.classList.add("finder-error")))}catch(c){""===b&&(b=a.JText._("COM_FINDER_NO_ERROR_RETURNED")),k&&(k.innerText=a.JText._("COM_FINDER_AN_ERROR_HAS_OCCURRED"),k.classList.add("finder-error")),l&&(l.innerHTML=b,l.classList.add("finder-error"))}}return!0},l=function(c){var d=b.getElementById("finder-progress-header"),e=b.getElementById("finder-progress-message"),f="object"===_typeof(c)&&c.responseText?c.responseText:null;f=f?JSON.parse(f):null,i("progress"),f&&(f=null===f.responseText?f:f.evaluate(f.responseText,!0));var g=f?f.header:a.JText._("COM_FINDER_AN_ERROR_HAS_OCCURRED"),h=f?f.message:"".concat(a.JText._("COM_FINDER_MESSAGE_RETURNED"),"<br>").concat(f);d&&(d.innerText=g,d.classList.add("finder-error")),e&&(e.innerHTML=h,e.classList.add("finder-error"))};c=function(b){a.request({url:"".concat("index.php?option=com_finder&tmpl=component&format=json","&task=").concat(b).concat(h),method:"GET",data:"",perform:!0,headers:{"Content-Type":"application/x-www-form-urlencoded"},onSuccess:function onSuccess(a){k(JSON.parse(a))},onError:function onError(a){l(a)}})};var m=function(){e=0,f=0,c("indexer.start")};m()}})(Joomla,document),document.addEventListener("DOMContentLoaded",function(){window.Indexer=Joomla.finderIndexer()});

The same content is in 4 releases, Joomla 4.0.0-beta to 4.0.0-beta4. See them all, or every version of this file.