{"size": 4733, "ext": "js", "max_stars_repo_path": "src/joomla/media/com_akeeba/js/Restore.min.js", "max_stars_repo_name": "saintcode/grandloo", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/joomla/media/com_akeeba/js/Restore.min.js", "max_issues_repo_name": "saintcode/grandloo", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/joomla/media/com_akeeba/js/Restore.min.js", "max_forks_repo_name": "saintcode/grandloo", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 295.8125, "max_line_length": 523, "alphanum_fraction": 0.7893513628}
/*
 Copyright (c)2006-2018 Nicholas K. Dionysopoulos / Akeeba Ltd
 @license   GNU General Public License version 3, or later
*/
if("undefined"==typeof akeeba)var akeeba={};"undefined"==typeof akeeba.Restore&&(akeeba.Restore={lastResponseSeconds:0,timer:0,errorCallback:null,statistics:{inbytes:0,outbytes:0,files:0},factory:null,password:null,ajaxURL:null,mainURL:null});akeeba.Restore.errorCallbackDefault=function(a){document.getElementById("restoration-progress").style.display="none";document.getElementById("restoration-error").style.display="block";document.getElementById("backup-error-message").innerHTML=a};
akeeba.Restore.doAjax=function(a,b,e){json=JSON.stringify(a);a={json:json};0<akeeba.Restore.password.length&&(a.password=akeeba.Restore.password);var g=(new Date).getTime()/1E3,h=parseInt(g,10);a._cacheBustingJunk=Math.round(1E3*(g-h));akeeba.Ajax.ajax({type:"POST",url:akeeba.Restore.ajaxURL,cache:!1,data:a,timeout:6E5,success:function(a){var c="",f=a.indexOf("###");if(-1==f)a="Invalid AJAX data: "+a,null==e?null!=akeeba.Restore.errorCallback?akeeba.Restore.errorCallback(a):akeeba.Restore.errorCallbackDefault(a):
e(a);else{0!=f?(a.substr(0,f),c=a.substr(f)):c=a;c=c.substr(3);f=c.lastIndexOf("###");c=c.substr(0,f);try{var d=JSON.parse(c)}catch(g){errorMessage=g.message+"\n<br/>\n<pre>\n"+c+"\n</pre>";null==e?null!=akeeba.Restore.errorCallback?akeeba.Restore.errorCallback(errorMessage):akeeba.Restore.errorCallbackDefault(errorMessage):e(errorMessage);return}b(d)}},error:function(a,c,b){b=a.responseText?a.responseText:"";var d="<strong>AJAX Loading Error</strong><br/>HTTP Status: "+a.status+" ("+a.statusText+
")<br/>",d=d+"Internal status: "+c+"<br/>XHR ReadyState: "+a.readyState+"<br/>",d=d+"Raw server response:<br/>"+akeeba.System.sanitizeErrorMessage(b);null==e?null!=akeeba.Restore.errorCallback?akeeba.Restore.errorCallback(d):akeeba.Restore.errorCallbackDefault(d):e(d)}})};
akeeba.Restore.startTimeoutBar=function(a,b){akeeba.Restore.resetTimeoutBar();akeeba.Restore.timer=setInterval(function(){akeeba.Restore.lastResponseSeconds++;var a=Joomla.JText._("COM_AKEEBA_BACKUP_TEXT_LASTRESPONSE").replace("%s",akeeba.Restore.lastResponseSeconds.toFixed(0));try{document.getElementById("response-timer div.text").textContent=a}catch(b){}},1E3)};
akeeba.Restore.resetTimeoutBar=function(){akeeba.Restore.lastResponseSeconds=0;if(0!=akeeba.Restore.timer){clearInterval(akeeba.Restore.timer);akeeba.Restore.timer=0;var a=document.getElementById("response-timer").querySelector("div.text"),b=Joomla.JText._("COM_AKEEBA_BACKUP_TEXT_LASTRESPONSE").replace("%s","0");try{a.textContent=b}catch(e){}}};
akeeba.Restore.pingRestoration=function(){akeeba.Restore.statistics.inbytes=0;akeeba.Restore.statistics.outbytes=0;akeeba.Restore.statistics.files=0;akeeba.Restore.startTimeoutBar(5E3,80);akeeba.Restore.doAjax({task:"ping"},function(a){akeeba.Restore.start(a)})};akeeba.Restore.start=function(){akeeba.Restore.statistics.inbytes=0;akeeba.Restore.statistics.outbytes=0;akeeba.Restore.statistics.files=0;akeeba.Restore.startTimeoutBar(5E3,80);akeeba.Restore.doAjax({task:"startRestore"},function(a){akeeba.Restore.step(a)})};
akeeba.Restore.step=function(a){akeeba.Restore.resetTimeoutBar();if(!1==a.status)akeeba.Restore.errorCallbackDefault(a.message);else if(a.done)akeeba.Restore.factory=a.factory,document.getElementById("restoration-progress").style.display="none",document.getElementById("restoration-extract-ok").style.display="block";else{akeeba.Restore.statistics.inbytes+=a.bytesIn;akeeba.Restore.statistics.outbytes+=a.bytesOut;akeeba.Restore.statistics.files+=a.files;try{document.getElementById("extbytesin").textContent=
akeeba.Restore.statistics.inbytes,document.getElementById("extbytesout").textContent=akeeba.Restore.statistics.outbytes,document.getElementById("extfiles").textContent=akeeba.Restore.statistics.files}catch(b){}post={task:"stepRestore",factory:a.factory};akeeba.Restore.startTimeoutBar(5E3,80);akeeba.Restore.doAjax(post,function(a){akeeba.Restore.step(a)})}};
akeeba.Restore.finalize=function(){var a={task:"finalizeRestore",factory:akeeba.Restore.factory};akeeba.Restore.startTimeoutBar(5E3,80);akeeba.Restore.doAjax(a,function(a){akeeba.Restore.finished(a)})};akeeba.Restore.finished=function(){window.location=akeeba.Restore.mainURL};
akeeba.Restore.runInstaller=function(){window.open("../installation/index.php","abiinstaller");var a=document.getElementById("restoration-runinstaller"),b=document.getElementById("restoration-finalize");a.className="akeeba-btn--grey--small";b.style.display="block"};akeeba.Restore.restoreDefaultOptions=function(){var a=document.getElementById("jps_key");a&&(a.value="ChromeIsDumb",a.value="")}; //# sourceMappingURL=Restore.min.map
