blob: 873f62e4627ce0190f2fe66ce431891713e6a32d [file] [log] [blame]
(function(){window.pagespeed=window.pagespeed||{};var f=window.pagespeed;function l(){this.o=!1;this.f=null;this.l={};this.m=!1;this.a={};this.i=0;this.b={time:{},size:{}};this.c=0;this.j=!1;this.u=window.performance?window.performance.timing.navigationStart:window.mod_pagespeed_start;n(this,"cdl",0)}
l.prototype.g=function(){if(this.m&&this.o&&"ncl"!=this.state){v(this.l);for(var a in this.a)if(this.a.hasOwnProperty(a))for(var b=this.a[a],c=0;c<b.length;++c)b[c][w]=!1;v(this.a);n(this,"ncl");(a=window.location.hash)&&"#"==a[0]&&document.getElementById(a.slice(1))&&window.location.replace(a);window.pagespeed&&window.pagespeed.deferJs&&(window.pagespeed.deferJs.registerScriptTags(),setTimeout(function(){window.pagespeed.deferJs.run()},1))}};l.prototype.loadData=l.prototype.g;
l.prototype.A=function(){var a="",b;for(b in this.b.time)a+=b+"."+this.b.time[b]+",";for(b in this.b.size)a+=b+"_sz."+this.b.size[b]+",";return a};l.prototype.getCsiTimingsString=l.prototype.A;
function n(a,b,c){a.state=b;var d=new Date-a.u;a.b.time[b]=d;c&&(a.b.size[b]=c);"cdl"==b&&(a.c+=c?c/1024:0,a.i=d);b=new Date;c=document.getElementById("dashboard_area")||window.dashboard_area;if(a.j||window.localStorage&&"1"==window.localStorage.psa_debug)c||(c=document.createElement("div"),c.id="dashboard_area",c.style.color="gray",c.style.fontSize="10px",c.style.a="Arial",c.style.backgroundColor="white",document.body.insertBefore(c,document.body.childNodes[0])),d="TIME:\n"+JSON.stringify(a.b.time).replace(/["{}]/g,
"").replace(/,/g," "),d+="\nSIZE:\n"+JSON.stringify(a.b.size).replace(/["{}]/g,"").replace(/,/g," "),c.innerHTML='<span title="'+d+'">'+a.i+"ms; "+a.c.toFixed()+"KB;"+b.toGMTString()+"</span>"}function x(a){window.pagespeed&&window.pagespeed.deferJs&&(window.pagespeed.deferJs.registerScriptTags(function(){a.h()},f.lastScriptIndexBeforePanelStub),window.pagespeed.deferJs.run())}l.prototype.s=function(){this.j=!0};l.prototype.setRequestFromInternalIp=l.prototype.s;
l.prototype.B=function(a){for(var b=0;b<a.length;b++)document.cookie=a[b]};l.prototype.loadCookies=l.prototype.B;l.prototype.C=function(a){if("ncl"!=this.state)for(var b in a)a.hasOwnProperty(b)&&(this.a[b]=this.a[b]||[],this.a[b].push(a[b]),0<y(document.documentElement,document.documentElement,b).length?(v(this.a),this.a[b].pop(),this.a[b].push({})):a[b][w]=!0)};l.prototype.loadNonCacheableObject=l.prototype.C;l.prototype.h=function(){this.o=!0;this.g()};l.prototype.criticalScriptsDone=l.prototype.h;
l.prototype.w=function(a,b){b?this.f=a:(this.f&&(a=this.f),"ncl"!=this.state&&(this.l=a,this.m=!0,this.g()))};l.prototype.bufferNonCriticalData=l.prototype.w;f.v=function(){if(!f.panelLoader){var a=new l;f.panelLoader=a;x(a)}};f.panelLoaderInit=f.v;var z="GooglePanel end ",w="dont_bind";function A(a){if(!a)throw"CHECK failed";}function y(a,b,c){A(a.parentNode==b.parentNode);for(var d=[];a!=b.nextSibling;a=a.nextSibling)8==a.nodeType&&(new RegExp(z+c+"$")).test(a.data)?d.push(a):a.tagName&&a.firstChild&&(d=d.concat(y(a.firstChild,a.lastChild,c)));return d}
function C(a,b,c){for(var d in c)if(c.hasOwnProperty(d)&&"xpath"!=d&&d!=w&&"instance_html"!=d&&"images"!=d&&"contiguous"!=d){var k=c[d],D=y(a,b,d);A(!k.length||!k[0].contiguous);for(var r=0,B=0;r<k.length;r++){0<r&&!k[r].contiguous&&B++;var h=D[B],m=k[r],e=d;if(m&&!m[w]){if(!h){A(m.xpath);a:{for(var h=e,e=m.xpath.split("/"),g=/(?:.*\[@id=")(.*)(?:"\])/,p=/(?:.*\[)(\d+)(?:\])/,q=document.body,t=2;t<e.length;++t){var u=g.exec(e[t]);if(u)q=document.getElementById(u[1]),A(q);else if(u=p.exec(e[t])){if(t==
e.length-1){e=q;g=Number(u[1]);A(e&&0<g);g=e.children[g-1]||null;e.insertBefore(document.createComment("GooglePanel begin "+h),g);h=document.createComment(z+h);e.insertBefore(h,g);break a}q=q.children[u[1]-1];A(q)}else A(0)}h=void 0}A(h)}if(m.instance_html){g=h.parentNode.tagName;p=m.instance_html;"HEAD"==g&&(g="div");e=void 0;"Microsoft Internet Explorer"!=navigator.appName||"TABLE"!=g&&"TBODY"!=g?(e=document.createElement(g),e.innerHTML=p):(e=document.createElement("div"),e.innerHTML="<table>"+
p+"</table>",e=e.getElementsByTagName("tbody")[0]);for(g=document.createDocumentFragment();0<e.childNodes.length;)e.childNodes[0].tagName&&(e.setAttribute("psa_not_processed",""),e.setAttribute("priority_psa_not_processed","")),g.appendChild(e.childNodes[0]);e=g;g=e.firstChild;p=e.lastChild;h.parentNode.insertBefore(e,h);C(g,p,m)}else C(h.parentNode,h.parentNode,m)}}}}
function v(a){var b=document.documentElement;C(b.firstChild,b.lastChild,a);b=document.documentElement.getElementsByTagName("img");a=[];for(var c=0;c<b.length;c++){var d=b[c];d.hasAttribute("data-pagespeed-high-res-src")&&a.push(d)}b={};if(a)for(c=0;c<a.length;c++){var d=a[c],k=d.getAttribute("data-pagespeed-high-res-src");k&&(void 0==b[k]&&(b[k]=[]),b[k].push(d))}};})();