text: /*!CK:1066620420!*//*1445224347,*/
  
  if (self.CavalryLogger) { CavalryLogger.start_js(["Eff5J"]); }
  
  __d('CavalryLoggerImpl',['Arbiter','Banzai','ImageTimingHelper','ISB','NavigationTimingHelper','PageEvents','PageletEventConstsJS','PageletEventsHelper','PerfXLogger','ScriptPath','TimeSliceHelper','URI','performance','performanceAbsoluteNow','KillAByteHTMLProfilerConfig'],function a(b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u){if(c.__markCompiled)c.__markCompiled();var v=c('KillAByteHTMLProfilerConfig').module,w='cavalry',x=['t_start','t_paint','t_cstart'],y=window.CavalryLogger;Object.assign(y.prototype,{initializeInstrumentation:function(){if(this.instrumentation_started)return;var z=t.setResourceTimingBufferSize||t.webkitSetResourceTimingBufferSize;if(typeof z==='function')z.call(t,700);var aa=this;h.subscribe('BigPipe/init',function(event,ba){if(ba.lid==aa.lid&&ba.arbiter){aa.recordTTIEvent(ba.arbiter);aa.recordE2EEvent(ba.arbiter);aa.recordPageletEventsTime(ba.arbiter);}});h.subscribe(m.BIGPIPE_ONLOAD,function(event,ba){if(b.bigPipe&&aa.lid===b.bigPipe.lid)aa.addPiggyback('cjs_factory_count_e2e',c.__getTotalFactories()).addPiggyback('cjs_compile_time_e2e',c.__getCompileTime()).addPiggyback('cjs_factory_time_e2e',c.__getFactoryTime());});aa.addPiggyback('script_path',q.getScriptPath());if(this.is_detailed_profiler)o.init();this.instrumentation_started=true;},recordTTIEvent:function(z){var aa=this;z.subscribe('tti_bigpipe',function(event,ba){if(ba.lid==aa.lid){if(ba.metrics)for(var ca in ba.metrics)aa.addPiggyback(ca,ba.metrics[ca]);if(ba.extraProfilingData)aa.ttiProfilingData=ba.extraProfilingData;aa.setTTIPhase(ba.phase).measurePageLoad(true,ba.ts);aa.setAbsTimeStamp('t_bigpipe_tti',ba.ts,true);}});},recordE2EEvent:function(z){var aa=this;z.subscribe('pagelet_loaded_all',function(event,ba){if(ba.lid===aa.lid)aa.setAbsTimeStamp('t_marker_bigpipe_e2e',ba.ts,true);});},recordPageletEventsTime:function(z){if(this.is_detailed_profiler){var aa=this;z.subscribe('pagelet_event',function(event,ba){if(ba.lid==aa.lid){var ca=ba.id;aa.events[ca]=aa.events[ca]||{};aa.events[ca][ba.event]=ba.ts-window._cstart;if(ba.event===n.ARRIVE_END)aa.events[ca].phase=ba.phase;}});}},setTTIPhase:function(z){this.addPiggyback('tti_phase',z);return this;},setTimeStamp:function(z,aa,ba,ca){var da=this.values.t_cstart||this.values.t_start,ea=ca?da+ca:u();this.setValue(z,ea,aa,ba);if(this.tti_event&&z==this.tti_event)this.measurePageLoad(aa);return this;},setAbsTimeStamp:function(z,aa,ba,ca){this.setValue(z,aa,ba,ca);if(this.tti_event&&z==this.tti_event)this.measurePageLoad(ba,aa);return this;},logE2E:function(){var z={lid:this.lid,t_creport:u(),cavalry_e2e:true};if(k.token)z.fb_isb=k.token;for(var aa=0;aa<x.length;aa++)z[x[aa]]=this.values[x[aa]];i.post(w,z,{signal:true,retry:false});this.e2eLogged=true;},log:function(){if(!this.e2eLogged)this.logE2E();var z={lid:this.lid};if(k.token)z.fb_isb=k.token;this.addPiggyback('pagelet_events',o.getMetrics(this.lid));var aa=babelHelpers._extends({t_creport:u()},z,this.values,this.piggy_values),ba=this.ttiProfilingData||{},ca=window.__bodyWrapper;if(ca.getCodeUsage){var da={};for(var ea=0;ea<document.styleSheets.length;ea++)if(document.styleSheets[ea].href)da[document.styleSheets[ea].href]=true;var fa=JSON.stringify(ba.js_calls_tti||{}),ga=JSON.stringify(ca.getCodeUsage()),ha=document.createElement('iframe');ha.style.display='none';document.body.appendChild(ha);var ia=ba.tti_html;ha.contentWindow.document.body.outerHTML=ia;var ja=ha.contentWindow.document,ka=ba.tti_styleSheets||{},la=this.findUsedCSSSelectors(ja,ka),ma=JSON.stringify(la);document.body.removeChild(ha);var na=this.findUsedCSSSelectors(document,da),oa=JSON.stringify(na),pa={js_calls_tti:fa,js_calls_e2e:ga,used_css_selectors_tti:ma,used_css_selectors_e2e:oa};if(v)pa.kb_html_e2e=JSON.stringify(v.getKillAByteHTMLData());h.inform('cavalry_usage_data_collected',{usageData:pa,lid:this.lid},h.BEHAVIOR_STATE);ca.clearCodeUsage();}var qa=p.getPayload(aa.lid);if(qa)this.logPerfXPiggybacks(aa,qa);i.post(w,aa,i.VITAL);var ra=this.values;this.values={};this.piggy_values={};for(var ea=0;ea<x.length;ea++)this.values[x[ea]]=ra[x[ea]];h.inform('cavalry_log_sent',aa,h.BEHAVIOR_STATE);},logPerfXPiggybacks:function(z,aa){z.perfx_page=aa.perfx_page;z.perfx_page_type=aa.perfx_page_type;z.perfx_tti=aa.tti;z.perfx_e2e=aa.e2e;},logPiggybacks:function(){var z=babelHelpers._extends({lid:this.lid},this.piggy_values);this.piggy_values={};i.post(w,z,i.VITAL);},collectMetrics:function(z){if(!this.metric_collected||z){this.metric_collected=true;this.addPiggyback('tag',document.getElementsByTagName('*').length);this.addPiggyback('htmlsize_client',document.body.innerHTML.length);}},findUsedCSSSelectors:function(z,aa){var ba={},ca=[':link',':visited',':hover',':active',':focus',':enabled',':disabled',':checked',':indeterminate','::first-line','::first-letter','::selection','::before','::after',':target',':before',':after'],da=new RegExp(ca.join('|'),'g');for(var ea=0;ea<document.styleSheets.length;ea++){var fa=document.styleSheets[ea];if(!fa.href||!fa.href.match(/rsrc/)||!(fa.href in aa))continue;if(fa.ownerNode.crossOrigin!=='anonymous'){continue;}else !fa.cssRules;for(var ga=0;ga<fa.cssRules.length;ga++){var ha=fa.cssRules[ga].selectorText;if(!ha)continue;var ia=ha.split(',');for(var ja=0;ja<ia.length;ja++){var ka=ia[ja];if(!ka||ka.match(/:not/))continue;ka=ka.replace(da,'').trim();var la=z.querySelectorAll(ka);if(la.length!==0)ba[ka]=la.length;}}}return ba;},measurePageLoad:function(z,aa){if(aa){this.setAbsTimeStamp('t_tti',aa,z);}else this.setTimeStamp('t_tti',z);this.collectMetrics(z);},collectBrowserTiming:function(z){if(t.timing){var aa=l.getNavTimings();this.addPiggyback('navigation_timing',aa);this.addPiggyback('time_slice',r.getMetrics(t.timing.navigationStart,this.values.t_onload,1,1));this.collectResourceTiming(z);}},collectTimingForAsync:function(z,aa){if(!aa)return;if(t.timing&&t.getEntriesByName){var ba=t.getEntriesByName(aa);if(ba.length===0)return;var ca=l.getAsyncRequestTimings(aa);this.addPiggyback('navigation_timing',ca);this.addPiggyback('time_slice',r.getMetrics(t.timing.navigationStart+ba[0].startTime,this.values.t_onload,1,1));this.collectResourceTiming(z);}},collectResourceTiming:function(z){if(!t.timing||!t.getEntriesByType||!this.log_resources)return;var aa=t.timing.navigationStart,ba=t.getEntriesByType("resource"),ca=z.Bootloader?z.Bootloader.__debug.resources:[],da={};for(var ea in ca)da[ca[ea].src]=ea;var fa=0,ga=0,ha=this.values.t_bigpipe_tti,ia=this.values.t_marker_bigpipe_e2e,ja=ha-aa,ka=ia-aa,la=j.getImageTimings(this.lid),ma=la.filter(function(ua){return ua.ts<=ha;}).map(function(ua){return ua.uri;}).reduce(function(ua,va){ua[va]=true;return ua;},{}),na=la.map(function(ua){return ua.uri;}).reduce(function(ua,va){ua[va]=true;return ua;},{});for(ea=0;ea<ba.length;ea++){var oa=ba[ea];if(oa.duration<=0)continue;var pa;switch(oa.initiatorType){case 'css':case 'link':case 'script':var qa=/\/rsrc\.php\/.*\/([^\?/]*)(\?.*)?$/,ra=oa.name.match(qa);if(!ra||!ra[1])continue;var sa=da[oa.name]||ga++;pa='t_rsrc_'+sa+'_'+ra[1]+'_';break;case 'img':var ta=new s(oa.name).getDomain();pa='t_img_'+fa+++'_'+ta+'_';if(ma[oa.name])ja=Math.max(ja,oa.responseEnd);if(na[oa.name])ka=Math.max(ka,oa.responseEnd);break;default:continue;}this.collectTiming(pa,oa,aa);}if(ja)this.setAbsTimeStamp('t_tti_with_images',ja+aa);if(ka)this.setAbsTimeStamp('t_marker_bigpipe_e2e_with_images',ka+aa);},collectTiming:function(z,aa,ba){var ca=['connectEnd','connectStart','domComplete','domContentLoadedEventEnd','domContentLoadedEventStart','domInteractive','domLoading','domainLookupEnd','domainLookupStart','fetchStart','loadEventEnd','loadEventStart','navigationStart','redirectEnd','redirectStart','requestStart','responseEnd','responseStart','secureConnectionStart','startTime','unloadEventEnd','unloadEventStart'];for(var da=0;da<ca.length;da++){var ea=ca[da];if(aa[ea])this.setAbsTimeStamp(z+ea,aa[ea]+ba,true);}}});Object.assign(y,{startInstrumentation:function(){for(var z in y.instances){var aa=y.instances[z];aa.initializeInstrumentation();if('t_tti' in aa.values)aa.measurePageLoad(false,aa.values.t_tti);}}});f.exports=y;},null);