function Xc(){this.Init()}m("AdfServerLogWriter",Xc);r.v(Xc,qa);Xc.prototype.flush=function(){this.ug();if(this.up.length){if(window.JSON){var a=q.b.eC();a&&this.AX(a,this.up)}this.lU()}};r.a("AdfServerLogWriter.prototype.flush",{flush:Xc.prototype.flush});Xc.itb=function(a){try{return JSON.stringify(a)}catch(b){return null}};Xc.z4a=["level","message","error","when","responseId"];
Xc.Fib=function(a,b){if(void 0===b)return null;var d;switch(typeof b){case "boolean":case "number":d=""+b;break;default:d='"'+b+'"'}return'"'+a+'":'+d};Xc.avb=function(a){try{for(var b=Xc.z4a,d=b.length,e=Array(d),f=0;f<d;f++){var g=b[f],h=Xc.Fib(g,a[g]);h&&e.push(h)}return"{"+e.join(",")+"}"}catch(l){return null}};
Xc.prototype.AX=function(a,b){var d=JSON.stringify(b),d="logRecords\x3d"+encodeURIComponent(d).replace(/\'/g,"%27").replace(/%20/g,"+"),e=null,f=document.forms[0];f&&(e=f.action);e||(e=document.location.href);a.open("POST",e,!0);a.setRequestHeader("Content-type","application/x-www-form-urlencoded");a.setRequestHeader("Adf-Rich-Log","true");a.send(d)};Xc.prototype.Init=function(){Xc.h.Init.call(this);this.lU()};r.a("AdfServerLogWriter.prototype.Init",{Init:Xc.prototype.Init});
Xc.prototype.lU=function(){this.up=[]};Xc.prototype.md=function(a){this.ug();u.assert(a,"null logRecord");this.up.push(a)};r.a("AdfServerLogWriter.prototype.PublishImpl",{md:Xc.prototype.md});