File: /home/houseofayushjain/public_html/wp-content/plugins/seraphinite-accelerator/Admin.js
function asyncGeneratorStep(z,y,K,J,G,E,B){try{var H=z[E](B),C=H.value}catch(L){K(L);return}H.done?y(C):Promise.resolve(C).then(J,G)}function _asyncToGenerator(z){return function(){var y=this,K=arguments;return new Promise(function(J,G){function E(C){asyncGeneratorStep(H,J,G,E,B,"next",C)}function B(C){asyncGeneratorStep(H,J,G,E,B,"throw",C)}var H=z.apply(y,K);E(void 0)})}}
function _typeof(z){_typeof="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(y){return typeof y}:function(y){return y&&"function"===typeof Symbol&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y};return _typeof(z)}var _regenerator;
(function(){var z=function(y){function K(a,b,c,m){b=Object.create((b&&b.prototype instanceof G?b:G).prototype);m=new M(m||[]);b._invoke=L(a,c,m);return b}function J(a,b,c){try{return{type:"normal",arg:a.call(b,c)}}catch(m){return{type:"throw",arg:m}}}function G(){}function E(){}function B(){}function H(a){["next","throw","return"].forEach(function(b){a[b]=function(c){return this._invoke(b,c)}})}function C(a,b){function c(d,q,v,x){d=J(a[d],a,q);if("throw"===d.type)x(d.arg);else{var r=d.arg;return(d=
r.value)&&"object"===_typeof(d)&&D.call(d,"__await")?b.resolve(d.__await).then(function(A){c("next",A,v,x)},function(A){c("throw",A,v,x)}):b.resolve(d).then(function(A){r.value=A;v(r)},function(A){return c("throw",A,v,x)})}}var m;this._invoke=function(d,q){function v(){return new b(function(x,r){c(d,q,x,r)})}return m=m?m.then(v,v):v()}}function L(a,b,c){var m=l;return function(d,q){if(m===u)throw Error("Generator is already running");if(m===e){if("throw"===d)throw q;return P()}c.method=d;for(c.arg=
q;;){if(d=c.delegate)if(d=Q(d,c)){if(d===h)continue;return d}if("next"===c.method)c.sent=c._sent=c.arg;else if("throw"===c.method){if(m===l)throw m=e,c.arg;c.dispatchException(c.arg)}else"return"===c.method&&c.abrupt("return",c.arg);m=u;d=J(a,b,c);if("normal"===d.type){m=c.done?e:g;if(d.arg===h)continue;return{value:d.arg,done:c.done}}"throw"===d.type&&(m=e,c.method="throw",c.arg=d.arg)}}}function Q(a,b){var c=a.iterator[b.method];if(c===F){b.delegate=null;if("throw"===b.method){if(a.iterator["return"]&&
(b.method="return",b.arg=F,Q(a,b),"throw"===b.method))return h;b.method="throw";b.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}c=J(c,a.iterator,b.arg);if("throw"===c.type)return b.method="throw",b.arg=c.arg,b.delegate=null,h;c=c.arg;if(!c)return b.method="throw",b.arg=new TypeError("iterator result is not an object"),b.delegate=null,h;if(c.done)b[a.resultName]=c.value,b.next=a.nextLoc,"return"!==b.method&&(b.method="next",b.arg=F);else return c;b.delegate=null;return h}
function R(a){var b={tryLoc:a[0]};1 in a&&(b.catchLoc=a[1]);2 in a&&(b.finallyLoc=a[2],b.afterLoc=a[3]);this.tryEntries.push(b)}function N(a){var b=a.completion||{};b.type="normal";delete b.arg;a.completion=b}function M(a){this.tryEntries=[{tryLoc:"root"}];a.forEach(R,this);this.reset(!0)}function O(a){if(a){var b=a[n];if(b)return b.call(a);if("function"===typeof a.next)return a;if(!isNaN(a.length)){var c=-1;b=function d(){for(;++c<a.length;)if(D.call(a,c))return d.value=a[c],d.done=!1,d;d.value=
F;d.done=!0;return d};return b.next=b}}return{next:P}}function P(){return{value:F,done:!0}}var S=Object.prototype,D=S.hasOwnProperty,F,w="function"===typeof Symbol?Symbol:{},n=w.iterator||"@@iterator",t=w.asyncIterator||"@@asyncIterator",k=w.toStringTag||"@@toStringTag";y.wrap=K;var l="suspendedStart",g="suspendedYield",u="executing",e="completed",h={};w={};w[n]=function(){return this};var f=Object.getPrototypeOf;(f=f&&f(f(O([]))))&&f!==S&&D.call(f,n)&&(w=f);var p=B.prototype=G.prototype=Object.create(w);
E.prototype=p.constructor=B;B.constructor=E;B[k]=E.displayName="GeneratorFunction";y.isGeneratorFunction=function(a){return(a="function"===typeof a&&a.constructor)?a===E||"GeneratorFunction"===(a.displayName||a.name):!1};y.mark=function(a){Object.setPrototypeOf?Object.setPrototypeOf(a,B):(a.__proto__=B,k in a||(a[k]="GeneratorFunction"));a.prototype=Object.create(p);return a};y.awrap=function(a){return{__await:a}};H(C.prototype);C.prototype[t]=function(){return this};y.AsyncIterator=C;y.async=function(a,
b,c,m,d){void 0===d&&(d=Promise);var q=new C(K(a,b,c,m),d);return y.isGeneratorFunction(b)?q:q.next().then(function(v){return v.done?v.value:q.next()})};H(p);p[k]="Generator";p[n]=function(){return this};p.toString=function(){return"[object Generator]"};y.keys=function(a){var b=[],c;for(c in a)b.push(c);b.reverse();return function d(){for(;b.length;){var q=b.pop();if(q in a)return d.value=q,d.done=!1,d}d.done=!0;return d}};y.values=O;M.prototype={constructor:M,reset:function(a){this.next=this.prev=
0;this.sent=this._sent=F;this.done=!1;this.delegate=null;this.method="next";this.arg=F;this.tryEntries.forEach(N);if(!a)for(var b in this)"t"===b.charAt(0)&&D.call(this,b)&&!isNaN(+b.slice(1))&&(this[b]=F)},stop:function(){this.done=!0;var a=this.tryEntries[0].completion;if("throw"===a.type)throw a.arg;return this.rval},dispatchException:function(a){function b(r,A){q.type="throw";q.arg=a;c.next=r;A&&(c.method="next",c.arg=F);return!!A}if(this.done)throw a;for(var c=this,m=this.tryEntries.length-1;0<=
m;--m){var d=this.tryEntries[m],q=d.completion;if("root"===d.tryLoc)return b("end");if(d.tryLoc<=this.prev){var v=D.call(d,"catchLoc"),x=D.call(d,"finallyLoc");if(v&&x){if(this.prev<d.catchLoc)return b(d.catchLoc,!0);if(this.prev<d.finallyLoc)return b(d.finallyLoc)}else if(v){if(this.prev<d.catchLoc)return b(d.catchLoc,!0)}else if(x){if(this.prev<d.finallyLoc)return b(d.finallyLoc)}else throw Error("try statement without catch or finally");}}},abrupt:function(a,b){for(var c=this.tryEntries.length-
1;0<=c;--c){var m=this.tryEntries[c];if(m.tryLoc<=this.prev&&D.call(m,"finallyLoc")&&this.prev<m.finallyLoc){var d=m;break}}d&&("break"===a||"continue"===a)&&d.tryLoc<=b&&b<=d.finallyLoc&&(d=null);c=d?d.completion:{};c.type=a;c.arg=b;return d?(this.method="next",this.next=d.finallyLoc,h):this.complete(c)},complete:function(a,b){if("throw"===a.type)throw a.arg;"break"===a.type||"continue"===a.type?this.next=a.arg:"return"===a.type?(this.rval=this.arg=a.arg,this.method="return",this.next="end"):"normal"===
a.type&&b&&(this.next=b);return h},finish:function(a){for(var b=this.tryEntries.length-1;0<=b;--b){var c=this.tryEntries[b];if(c.finallyLoc===a)return this.complete(c.completion,c.afterLoc),N(c),h}},"catch":function(a){for(var b=this.tryEntries.length-1;0<=b;--b){var c=this.tryEntries[b];if(c.tryLoc===a){a=c.completion;if("throw"===a.type){var m=a.arg;N(c)}return m}}throw Error("illegal catch attempt");},delegateYield:function(a,b,c){this.delegate={iterator:O(a),resultName:b,nextLoc:c};"next"===this.method&&
(this.arg=F);return h}};return y}("object"===("undefined"===typeof module?"undefined":_typeof(module))?module.exports:{});try{_regenerator=z}catch(y){Function("r","_regenerator = r")(z)}})();
(function(){function z(w){var n=null;w==seraph_accel.Gen.hr.E_CONTEXT_EXPIRED?n=D("OpSrvCtxExpired","admin.Manage","seraphinite-accelerator"):seraph_accel.Gen.hr.Fail(w)&&(n=F(D("OpSrvErr_%1$08X","admin.Manage","seraphinite-accelerator"),w));return n}function y(){y=_asyncToGenerator(_regenerator.mark(function t(n){return _regenerator.wrap(function(k){for(;;)switch(k.prev=k.next){case 0:return jQuery(n).attr("disabled",!0),k.prev=1,k.next=4,jQuery.ajax({url:seraph_accel.Net.UpdateQueryArgs(seraph_accel.Plugin.GetAdminApiUrl()+
"LogClear",{}),type:"POST",data:"",dataType:"json",cache:!1});case 4:k.next=8;break;case 6:k.prev=6,k.t0=k["catch"](1);case 8:jQuery(n).attr("disabled",!1);case 9:case "end":return k.stop()}},t,this,[[1,6]])}));return y.apply(this,arguments)}function K(){K=_asyncToGenerator(_regenerator.mark(function k(n,t){var l,g,u,e,h,f;return _regenerator.wrap(function(p){for(;;)switch(p.prev=p.next){case 0:l=jQuery(n.parentNode).closest(".blck").first();g=l.find(".seraph_accel_spinner");l.find(".content");u=
l.find('input[type="button"]:not(.cancel)');e=l.find('input[type="button"].cancel');if(!t){p.next=23;break}u.prop("disabled",!0);g.show();seraph_accel.Manager._int.notRefreshStat=!0;h=null;p.prev=10;p.next=13;return jQuery.ajax({url:seraph_accel.Net.UpdateQueryArgs(seraph_accel.Plugin.GetAdminApiUrl()+"UpdateStatBegin",{}),cache:!1,dataType:"json"});case 13:f=p.sent;seraph_accel.Gen.hr.Fail(f)&&(h=F(D("OpSrvErr_%1$08X","admin.Manage","seraphinite-accelerator"),f));p.next=20;break;case 17:p.prev=17,
p.t0=p["catch"](10),h="HTTP "+p.t0.status;case 20:return h&&(alert(h),u.prop("disabled",!1),g.hide()),delete seraph_accel.Manager._int.notRefreshStat,p.abrupt("return");case 23:return e.prop("disabled",!0),seraph_accel.Manager._int.notRefreshStat=!0,h=null,p.prev=26,p.next=29,jQuery.ajax({url:seraph_accel.Net.UpdateQueryArgs(seraph_accel.Plugin.GetAdminApiUrl()+"UpdateStatCancel",{}),type:"POST",data:"",cache:!1,dataType:"json"});case 29:f=p.sent;h=z(f);p.next=37;break;case 33:p.prev=33,p.t1=p["catch"](26),
h="HTTP "+p.t1.status,e.prop("disabled",!1);case 37:h&&alert(h),delete seraph_accel.Manager._int.notRefreshStat;case 39:case "end":return p.stop()}},k,this,[[10,17],[26,33]])}));return K.apply(this,arguments)}function J(w){switch(w){case 0:return D("OpDescr_Invalidate","admin.Manage","seraphinite-accelerator");case 3:return D("OpDescr_CheckInvalidate","admin.Manage","seraphinite-accelerator");case 2:return D("OpDescr_Delete","admin.Manage","seraphinite-accelerator");case 10:return D("OpDescr_SrvDel",
"admin.Manage","seraphinite-accelerator")}return""+w}function G(){G=_asyncToGenerator(_regenerator.mark(function t(n){var k,l,g,u;return _regenerator.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return k=jQuery(n.parentNode).closest(".blck").first(),l=k.find('input[type="button"].cancel'),l.prop("disabled",!0),g=null,e.prev=4,e.next=7,jQuery.ajax({url:seraph_accel.Net.UpdateQueryArgs(seraph_accel.Plugin.GetAdminApiUrl()+"PostUpdCancel",{}),type:"POST",data:"",cache:!1,dataType:"json"});case 7:u=
e.sent;g=z(u);e.next=14;break;case 11:e.prev=11,e.t0=e["catch"](4),g="HTTP "+e.t0.status;case 14:g&&alert(g);case 15:case "end":return e.stop()}},t,this,[[4,11]])}));return G.apply(this,arguments)}function E(){E=_asyncToGenerator(_regenerator.mark(function t(n){var k,l,g,u;return _regenerator.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return k=jQuery(n.parentNode).closest(".blck").first(),l=k.find('input[type="button"].cancel'),l.prop("disabled",!0),g=null,e.prev=4,e.next=7,jQuery.ajax({url:seraph_accel.Net.UpdateQueryArgs(seraph_accel.Plugin.GetAdminApiUrl()+
"ScheUpdCancel",{}),type:"POST",data:"",cache:!1,dataType:"json"});case 7:u=e.sent;g=z(u);e.next=14;break;case 11:e.prev=11,e.t0=e["catch"](4),g="HTTP "+e.t0.status;case 14:g&&alert(g);case 15:case "end":return e.stop()}},t,this,[[4,11]])}));return E.apply(this,arguments)}function B(){B=_asyncToGenerator(_regenerator.mark(function t(n){var k,l,g,u,e,h;return _regenerator.wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return k=jQuery(n.parentNode).closest(".blck").first(),l=k.find(".seraph_accel_spinner"),
g=k.find('input[type="button"]:not(.cancel)'),u=k.find('input[type="button"].cancel'),l.show(),g.prop("disabled",!0),u.prop("disabled",!1),seraph_accel.Manager._int.notRefreshExtDp=!0,e=null,f.prev=9,f.next=12,jQuery.ajax({url:seraph_accel.Net.UpdateQueryArgs(seraph_accel.Plugin.GetAdminApiUrl()+"ExtDbUpdBegin",{}),type:"POST",data:"",cache:!1,dataType:"json"});case 12:h=f.sent;e=z(h);f.next=19;break;case 16:f.prev=16,f.t0=f["catch"](9),e="HTTP "+f.t0.status;case 19:e&&alert(e),delete seraph_accel.Manager._int.notRefreshExtDp;
case 21:case "end":return f.stop()}},t,this,[[9,16]])}));return B.apply(this,arguments)}function H(){H=_asyncToGenerator(_regenerator.mark(function t(n){var k,l,g,u;return _regenerator.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return k=jQuery(n.parentNode).closest(".blck").first(),l=k.find('input[type="button"].cancel'),l.prop("disabled",!0),g=null,e.prev=4,e.next=7,jQuery.ajax({url:seraph_accel.Net.UpdateQueryArgs(seraph_accel.Plugin.GetAdminApiUrl()+"ExtDbUpdCancel",{}),type:"POST",data:"",
cache:!1,dataType:"json"});case 7:u=e.sent;g=z(u);e.next=14;break;case 11:e.prev=11,e.t0=e["catch"](4),g="HTTP "+e.t0.status;case 14:g&&alert(g);case 15:case "end":return e.stop()}},t,this,[[4,11]])}));return H.apply(this,arguments)}function C(){C=_asyncToGenerator(_regenerator.mark(function l(n,t,k){var g,u,e,h,f,p,a,b,c,m,d,q,v,x;return _regenerator.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return g=jQuery(n.parentNode).closest(".blck").first(),u=g.find(".seraph_accel_spinner"),e=g.find(".descr"),
h=g.find('input[type="button"]:not(.cancel)'),f=g.find('input[type="button"].cancel'),p=g.find("#seraph_accel_views"),a=g.find("#seraph_accel_geos"),b=[],p.get()&&(seraph_accel.Ui.TokensMetaTree.Apply(p.get()),b=seraph_accel.Ui.TokensList.GetVal(p.get())),c=[],a.get()&&(seraph_accel.Ui.TokensMetaTree.Apply(a.get()),c=seraph_accel.Ui.TokensList.GetVal(a.get()).filter(function(A){return"_"!==A})),d=String(g.find(".type").val()),"uri"===d?m=g.find(".uri").val():0===d.indexOf("uri:")&&(m=d.substr(4),
d="uri"),m=seraph_accel.Gen.StrReplaceAll(String(m),["\r","\n","*"],["",";","{ASTRSK}"]),u.show(),e.show(),e.text(J(t)),h.prop("disabled",!0),f.prop("disabled",!1),seraph_accel.Manager._int.notRefreshOp=!0,q={cache:!1,dataType:"json"},512>m.length?q.url=seraph_accel.Net.UpdateQueryArgs(seraph_accel.Plugin.GetAdminApiUrl()+"CacheOpBegin",{type:d,op:t,uri:m,v:b.join(),g:c.length?c.join():void 0,_wpnonce:k}):(q.url=seraph_accel.Net.UpdateQueryArgs(seraph_accel.Plugin.GetAdminApiUrl()+"CacheOpBegin",
{type:d,op:t,v:b.join(),g:c.length?c.join():void 0,_wpnonce:k}),q.type="POST",q.contentType="application/x-www-form-urlencoded",q.data="uri="+encodeURIComponent(m)),v=null,r.prev=23,r.next=26,jQuery.ajax(q);case 26:x=r.sent;v=z(x);r.next=33;break;case 30:r.prev=30,r.t0=r["catch"](23),v="HTTP "+r.t0.status;case 33:v&&alert(v),delete seraph_accel.Manager._int.notRefreshOp;case 35:case "end":return r.stop()}},l,this,[[23,30]])}));return C.apply(this,arguments)}function L(){L=_asyncToGenerator(_regenerator.mark(function l(n,
t,k){var g,u,e,h;return _regenerator.wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return g=jQuery(n.parentNode).closest(".blck").first(),u=g.find('input[type="button"].cancel'),u.prop("disabled",!0),e=null,f.prev=4,f.next=7,jQuery.ajax({url:seraph_accel.Net.UpdateQueryArgs(seraph_accel.Plugin.GetAdminApiUrl()+"CacheOpCancel",{op:t,_wpnonce:k}),type:"POST",data:"",cache:!1,dataType:"json"});case 7:h=f.sent;e=z(h);f.next=14;break;case 11:f.prev=11,f.t0=f["catch"](4),e="HTTP "+f.t0.status;case 14:e&&
alert(e);case 15:case "end":return f.stop()}},l,this,[[4,11]])}));return L.apply(this,arguments)}function Q(){Q=_asyncToGenerator(_regenerator.mark(function l(n,t,k){return _regenerator.wrap(function(g){for(;;)switch(g.prev=g.next){case 0:case "end":return g.stop()}},l,this)}));return Q.apply(this,arguments)}function R(){R=_asyncToGenerator(_regenerator.mark(function l(n,t,k){return _regenerator.wrap(function(g){for(;;)switch(g.prev=g.next){case 0:case "end":return g.stop()}},l,this)}));return R.apply(this,
arguments)}function N(){N=_asyncToGenerator(_regenerator.mark(function l(n,t,k){return _regenerator.wrap(function(g){for(;;)switch(g.prev=g.next){case 0:case "end":return g.stop()}},l,this)}));return N.apply(this,arguments)}function M(){M=_asyncToGenerator(_regenerator.mark(function k(n,t){var l,g,u,e;return _regenerator.wrap(function(h){for(;;)switch(h.prev=h.next){case 0:e=function(){e=_asyncToGenerator(_regenerator.mark(function p(){return _regenerator.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=
2,seraph_accel.Manager._int.OnDataRefresh(n,t);case 2:g();case 3:case "end":return a.stop()}},p,this)}));return e.apply(this,arguments)},u=function(){return e.apply(this,arguments)},g=function(){var f=1E3*parseInt(l.val(),10);100>f&&(f=100);clearTimeout(seraph_accel.Manager._int.refreshTimer);seraph_accel.Manager._int.refreshTimer=setTimeout(u,f)},l=jQuery(n).find("#operate .tmDataRefresh"),l.on("change",g),u();case 6:case "end":return h.stop()}},k,this)}));return M.apply(this,arguments)}function O(){O=
_asyncToGenerator(_regenerator.mark(function k(n,t){var l,g,u,e,h,f,p,a,b,c,m,d,q,v,x,r,A;return _regenerator.wrap(function(I){for(;;)switch(I.prev=I.next){case 0:return l=jQuery(n).find("#status").first(),g=jQuery(n).find("#stat").first(),u=g.find(".seraph_accel_spinner"),e=g.find('input[type="button"]:not(.cancel)'),h=g.find('input[type="button"].cancel'),f=jQuery(n).find("#operate").first(),p=f.find(".seraph_accel_spinner"),a=f.find(".descr"),b=f.find('input[type="button"]:not(.cancel)'),c=f.find('input[type="button"].cancel'),
m=jQuery(n).find("#queue").first(),m.find(".content"),d=m.find(".maxItems"),m.find(".seraph_accel_spinner"),m.find('input[type="button"]'),m.find(".descrNums"),I.prev=16,I.next=19,jQuery.ajax({url:seraph_accel.Net.UpdateQueryArgs(seraph_accel.Plugin.GetAdminApiUrl()+"GetData",{nMaxQueueItems:d.val(),allSites:t?!0:void 0}),type:"GET",cache:!1,dataType:"json"});case 19:r=I.sent;I.next=24;break;case 22:I.prev=22,I.t0=I["catch"](16);case 24:if(r){I.next=26;break}return I.abrupt("return");case 26:if(!t){for(A in r.status.cont)l.find('[data-id-cont="'+
A+'"]').html(r.status.cont[A]);seraph_accel.Manager._int.notRefreshPostUpd||(q=l.find(".blck.postupd .seraph_accel_spinner"),v=l.find('.blck.postupd input[type="button"]:not(.cancel)'),x=l.find('.blck.postupd input[type="button"].cancel'),r.status.postUpd?(q.show(),v.prop("disabled",!0),x.prop("disabled",!1)):(q.hide(),v.prop("disabled",!1),x.prop("disabled",!0)));seraph_accel.Manager._int.notRefreshScheUpd||(q=l.find(".blck.scheupd .seraph_accel_spinner"),v=l.find('.blck.scheupd input[type="button"]:not(.cancel)'),
x=l.find('.blck.scheupd input[type="button"].cancel'),r.status.scheUpd?(q.show(),v.prop("disabled",!0),x.prop("disabled",!1)):(q.hide(),v.prop("disabled",!1),x.prop("disabled",!0)));seraph_accel.Manager._int.notRefreshCleanup||(q=l.find(".blck.cleanup .seraph_accel_spinner"),v=l.find('.blck.cleanup input[type="button"]:not(.cancel)'),x=l.find('.blck.cleanup input[type="button"].cancel'),r.status.cleanUp?(q.show(),v.prop("disabled",!0),x.prop("disabled",!1)):(q.hide(),v.prop("disabled",!1),x.prop("disabled",
!0)))}t||seraph_accel.Manager._int.notRefreshExtDp||(q=l.find(".blck.extdb .seraph_accel_spinner"),v=l.find('.blck.extdb input[type="button"]:not(.cancel)'),x=l.find('.blck.extdb input[type="button"].cancel'),r.extDb.isUpdating?(q.show(),v.prop("disabled",!0),x.prop("disabled",!1)):(q.hide(),v.prop("disabled",!1),x.prop("disabled",!0)));t||seraph_accel.Manager._int.notRefreshStat||(r.stat.isUpdating?(u.show(),e.prop("disabled",!0),h.prop("disabled",!1)):(u.hide(),e.prop("disabled",!1),h.prop("disabled",
!0)),g.find('[data-id-cont="stat"]').html(r.stat.cont));t||seraph_accel.Manager._int.notRefreshOp||(null===r.curOp&&(r.curOp=void 0),void 0!==r.curOp?(p.show(),a.show(),a.text(J(r.curOp)),b.prop("disabled",!0),c.prop("disabled",!1)):(p.hide(),a.hide(),b.prop("disabled",!1),c.prop("disabled",!0),a.text("")));case 30:case "end":return I.stop()}},k,this,[[16,22]])}));return O.apply(this,arguments)}function P(){P=_asyncToGenerator(_regenerator.mark(function t(n){var k,l,g,u,e,h,f,p;return _regenerator.wrap(function(a){for(;;)switch(a.prev=
a.next){case 0:return k=jQuery(n.parentNode).closest(".blck").first(),l=k.find(".url"),g=k.find(".messages"),u=k.find(".seraph_accel_spinner"),e=k.find('input[type="button"]'),h=0,k.find(".liteChk").prop("checked")&&(h|=1),k.find(".medChk").prop("checked")&&(h|=2),k.find(".tidyChk").prop("checked")&&(h|=524288),g.empty(),u.show(),e.prop("disabled",!0),a.prev=12,a.next=15,jQuery.ajax({url:seraph_accel.Net.UpdateQueryArgs(seraph_accel.Plugin.GetAdminApiUrl()+"HtmlCheck",{url:l.val(),norm:h}),type:"POST",
data:"",dataType:"json",cache:!1});case 15:f=a.sent;a.next=21;break;case 18:a.prev=18,a.t0=a["catch"](12),f={err:a.t0.statusText};case 21:u.hide();e.prop("disabled",!1);if(!f.err){a.next=26;break}g.append(seraph_accel.Ui.LogItem("error",f.err));return a.abrupt("return");case 26:for(p in f.list)p=f.list[p],g.append(seraph_accel.Ui.LogItem(p.severity,p.text));case 27:case "end":return a.stop()}},t,this,[[12,18]])}));return P.apply(this,arguments)}var S=seraph_accel.Wp.Loc.GetApi(),D=S._x,F=S.sprintf;
seraph_accel.Settings={_int:{OnUpdateCssAuto:function(w){seraph_accel.Ui.ComboShowDependedItems(w,jQuery(w.parentNode).closest(".blck").first().get(0))},OnLogClear:function(w){return y.apply(this,arguments)}}};seraph_accel.Manager={_int:{OnStatOp:function(w,n){return K.apply(this,arguments)},OnCacheOp:function(w,n,t){return C.apply(this,arguments)},OnCacheOpCancel:function(w,n,t){return L.apply(this,arguments)},OnPostUpdCancel:function(w){return G.apply(this,arguments)},OnScheUpdCancel:function(w){return E.apply(this,
arguments)},OnExtDbUpdBegin:function(w){return B.apply(this,arguments)},OnExtDbUpdCancel:function(w){return H.apply(this,arguments)},OnQueueDel:function(w,n,t){return Q.apply(this,arguments)},OnQueuePause:function(w,n,t){return R.apply(this,arguments)},OnQueueItemCancel:function(w,n,t){return N.apply(this,arguments)},OnDataRefreshInit:function(w,n){return M.apply(this,arguments)},OnDataRefresh:function(w,n){return O.apply(this,arguments)},OnHtmlCheck:function(w){return P.apply(this,arguments)}}};
(function(){function w(l){return n.apply(this,arguments)}function n(){n=_asyncToGenerator(_regenerator.mark(function u(g){var e,h;return _regenerator.wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return e={},f.prev=1,seraph_accel.SelfDiag._int.curAjax=jQuery.ajax({url:seraph_accel.Net.UpdateQueryArgs(seraph_accel.Plugin.GetAdminApiUrl()+"SelfDiag_"+g,{}),cache:!1,dataType:"json"}),f.next=5,seraph_accel.SelfDiag._int.curAjax;case 5:e=f.sent;delete seraph_accel.SelfDiag._int.curAjax;f.next=14;
break;case 9:f.prev=9,f.t0=f["catch"](1),delete seraph_accel.SelfDiag._int.curAjax,0===f.t0.status?e.hr=seraph_accel.Gen.hr.S_ABORTED:(e.hr=seraph_accel.Gen.hr.E_FAIL,e.descr="HTTP "+f.t0.status),500==f.t0.status&&(h=document.implementation.createHTMLDocument(""),h.documentElement.innerHTML=f.t0.responseText,h=h.body.textContent,h=seraph_accel.Gen.StrReplaceAll(h,"\r",""),h=seraph_accel.Gen.StrReplaceAll(h,["\t","\v"]," "),h=seraph_accel.Gen.StrReplaceAll(h,"\n",". "),(h=seraph_accel.Gen.StrReplaceAllWhileChanging(h,
[" ",". . "],[" ",". "]).trim())&&"."!=h&&(e.descr+="<br>"+h));case 14:return f.abrupt("return",e);case 15:case "end":return f.stop()}},u,this,[[1,9]])}));return n.apply(this,arguments)}function t(){t=_asyncToGenerator(_regenerator.mark(function u(g){var e,h,f,p,a,b,c,m,d,q,v,x=arguments;return _regenerator.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:e=1<x.length&&void 0!==x[1]?x[1]:!1;h=jQuery(g.parentNode).closest(".blck").first();f=h.find(".seraph_accel_spinner");p=h.find('input[type="button"]:not(.cancel)');
a=h.find('input[type="button"].cancel');b=h.find(".log");c=[{id:"3rdPartySettCompat",name:k("TestName_3rdPartySettCompat","admin.SelfDiag","seraphinite-accelerator")},{id:"AsyncRequest",name:k("TestName_AsyncRequest","admin.SelfDiag","seraphinite-accelerator")},{id:"SetMaxExecTime",name:k("TestName_SetMaxExecTime","admin.SelfDiag","seraphinite-accelerator")},{id:"PageOptimize",name:k("TestName_PageOptimize","admin.SelfDiag","seraphinite-accelerator")},{id:"VendorSrv",name:k("TestName_VendorSrv","admin.SelfDiag",
"seraphinite-accelerator")},{id:"ExtCache",name:k("TestName_ExtCache","admin.SelfDiag","seraphinite-accelerator")}];b.empty();for(m=0;m<c.length;m++)d=c[m],b.append(seraph_accel.Ui.LogItem("none",seraph_accel.Ui.Tag("strong",d.name?d.name:d.id),!1));if(!e){r.next=11;break}return r.abrupt("return");case 11:f.show(),p.prop("disabled",!0),a.prop("disabled",!1),seraph_accel.SelfDiag._int.inProgress=!0,m=0;case 16:if(!(m<c.length)){r.next=31;break}d=c[m];jQuery(b.children().get(m)).replaceWith(seraph_accel.Ui.LogItem("info",
seraph_accel.Ui.Tag("strong",d.name?d.name:d.id)+k("TestRunning","admin.SelfDiag","seraphinite-accelerator"),!1));r.next=21;return w(d.id);case 21:q=r.sent;v=k("TestSucc","admin.SelfDiag","seraphinite-accelerator");q.hr!=seraph_accel.Gen.hr.S_OK&&(v=seraph_accel.Gen.hr.Succ(q.hr)?q.hr==seraph_accel.Gen.hr.S_ABORTED?k("TestAbort","admin.SelfDiag","seraphinite-accelerator"):q.hr==seraph_accel.Gen.hr.S_FALSE?k("TestNotice","admin.SelfDiag","seraphinite-accelerator"):k("TestWarn","admin.SelfDiag","seraphinite-accelerator"):
k("TestError","admin.SelfDiag","seraphinite-accelerator"));q.descr&&(v+="<br>"+q.descr);jQuery(b.children().get(m)).replaceWith(seraph_accel.Ui.LogItem(q.hr==seraph_accel.Gen.hr.S_OK?"success":seraph_accel.Gen.hr.Succ(q.hr)?q.hr==seraph_accel.Gen.hr.S_FALSE?"normal":"warning":"error",seraph_accel.Ui.Tag("strong",d.name?d.name:d.id)+v,!1));if(seraph_accel.SelfDiag._int.inProgress){r.next=28;break}return r.abrupt("break",31);case 28:m++;r.next=16;break;case 31:f.hide(),p.prop("disabled",!1),a.prop("disabled",
!0);case 34:case "end":return r.stop()}},u,this)}));return t.apply(this,arguments)}var k=seraph_accel.Wp.Loc.GetApi()._x;seraph_accel.SelfDiag={_int:{OnStart:function(l){return t.apply(this,arguments)},OnCancel:function(l){l=jQuery(l.parentNode).closest(".blck").first();l.find(".seraph_accel_spinner");l.find('input[type="button"]:not(.cancel)');l.find('input[type="button"].cancel').prop("disabled",!0);seraph_accel.SelfDiag._int.inProgress=!1;seraph_accel.SelfDiag._int.curAjax&&seraph_accel.SelfDiag._int.curAjax.abort()},
inProgress:!1}}})()})();