0% found this document useful (0 votes)
26 views

F

This document contains code for logging performance metrics and timing events in JavaScript. It defines classes and functions for starting and stopping timers, collecting metrics, and reporting the results. Event timing and metrics collection is optimized to only run when certain conditions are met.

Uploaded by

pedrinho gamer
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views

F

This document contains code for logging performance metrics and timing events in JavaScript. It defines classes and functions for starting and stopping timers, collecting metrics, and reporting the results. Event timing and metrics collection is optimized to only run when certain conditions are met.

Uploaded by

pedrinho gamer
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 5

(function(){/*

Copyright The Closure Library Authors.


SPDX-License-Identifier: Apache-2.0
*/
function aa(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:
{done:!0}}}var ba="function"==typeof Object.defineProperties?
Object.defineProperty:function(a,b,c){if(a==Array.prototype||
a==Object.prototype)return a;a[b]=c.value;return a};
function ca(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof
window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var
b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}throw Error("Cannot find
global object");}var da=ca(this);function ea(a,b){if(b)a:{var
c=da;a=a.split(".");for(var d=0;d<a.length-1;d++){var e=a[d];if(!(e in c))break
a;c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&ba(c,a,{configurable:!
0,writable:!0,value:b})}}
function k(a){var b="undefined"!=typeof
Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):
{next:aa(a)}}function fa(a){if(!(a instanceof Array)){a=k(a);for(var b,c=[];!
(b=a.next()).done;)c.push(b.value);a=c}return a}var ha="function"==typeof
Object.create?Object.create:function(a){function b(){}b.prototype=a;return new
b},ia;
if("function"==typeof Object.setPrototypeOf)ia=Object.setPrototypeOf;else{var ja;a:
{var ka={a:!0},la={};try{la.__proto__=ka;ja=la.a;break a}catch(a){}ja=!1}ia=ja?
function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not
extensible");return a}:null}var ma=ia;
function p(a,b)
{a.prototype=ha(b.prototype);a.prototype.constructor=a;if(ma)ma(a,b);else for(var c
in b)if("prototype"!=c)if(Object.defineProperties){var
d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else
a[c]=b[c];a.G=b.prototype}var na="function"==typeof Object.assign?
Object.assign:function(a,b){for(var c=1;c<arguments.length;c++){var
d=arguments[c];if(d)for(var e in
d)Object.prototype.hasOwnProperty.call(d,e)&&(a[e]=d[e])}return a};
ea("Object.assign",function(a){return a||na});var q=this||self;function oa()
{}function pa(a,b,c){return a.call.apply(a.bind,arguments)}function qa(a,b,c){if(!
a)throw Error();if(2<arguments.length){var
d=Array.prototype.slice.call(arguments,2);return function(){var
e=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(e,d);return
a.apply(b,e)}}return function(){return a.apply(b,arguments)}}
function u(a,b,c){Function.prototype.bind&&-1!
=Function.prototype.bind.toString().indexOf("native code")?u=pa:u=qa;return
u.apply(null,arguments)}function ra(a,b){function c()
{}c.prototype=b.prototype;a.G=b.prototype;a.prototype=new
c;a.prototype.constructor=a;a.J=function(d,e,n){for(var g=Array(arguments.length-
2),f=2;f<arguments.length;f++)g[f-2]=arguments[f];return
b.prototype[e].apply(d,g)}};var sa=Array.prototype.forEach?function(a,b)
{Array.prototype.forEach.call(a,b,void 0)}:function(a,b){for(var
c=a.length,d="string"===typeof a?a.split(""):a,e=0;e<c;e++)e in d&&b.call(void
0,d[e],e,a)};function ta(a){var b=!1,c;return function(){b||(c=a(),b=!0);return
c}};function w(a,b){this.g=b===ua?a:""}w.prototype.i=!0;w.prototype.h=function()
{return this.g.toString()};w.prototype.toString=function(){return
this.g.toString()};function va(a){return a instanceof w&&a.constructor===w?
a.g:"type_error:SafeUrl"}var
wa=/^(?:(?:https?|mailto|ftp):|[^:/?#]*(?:[/?#]|$))/i,ua={};function xa(a){xa[" "]
(a);return a}xa[" "]=oa;var ya="function"===typeof Uint8Array,za={L:{value:!
0,configurable:!0}};function x(a){Array.isArray(a)&&!
Object.isFrozen(a)&&Object.defineProperties(a,za);return a};function y(){}var
Aa;function Ba(a,b,c){a.g=null;Aa&&(b||(b=Aa),Aa=null);var
d=a.constructor.M,e=a.constructor.K;e=d||e;b||(b=e?[d]:[]);a.j=e?0:-1;a.h=b;a:
{if(b=a.h.length)if(--b,d=a.h[b],!(null===d||"object"!=typeof d||Array.isArray(d)||
ya&&d instanceof Uint8Array)){a.l=b-a.j;a.i=d;break
a}a.l=Number.MAX_VALUE}a.o={};if(c)for(b=0;b<c.length;b++)d=c[b],d<a.l?(d+=a.j,
(e=a.h[d])?x(e):a.h[d]=z):(e=a.l+a.j,a.h[e]||(a.i=a.h[e]={}),(e=a.i[d])?
x(e):a.i[d]=z)}var z=Object.freeze(x([]));
function C(a,b){if(b<a.l){b+=a.j;var c=a.h[b];return c!==z?
c:a.h[b]=x([])}if(a.i)return c=a.i[b],c!==z?c:a.i[b]=x([])}function D(a,b,c)
{a=C(a,b);return null==a?c:a}function F(a,b){var c=void 0===c?!
1:c;a=C(a,b);a=null==a?a:!!a;return null==a?c:a}function Ca(a){var b=Da;a.g||
(a.g={});if(!a.g[1]){var c=C(a,1);c&&(a.g[1]=new b(c))}return a.g[1]}function Ea(a)
{var b=Fa;a.g||(a.g={});if(!a.g[1]){for(var c=C(a,1),d=[],e=0;e<c.length;e+
+)d[e]=new b(c[e]);a.g[1]=d}b=a.g[1];b==z&&(b=a.g[1]=[]);return b}
function G(a){if(a.g)for(var b in a.g){var c=a.g[b];if(Array.isArray(c))for(var
d=0;d<c.length;d++)c[d]&&G(c[d]);else c&&G(c)}return
a.h}y.prototype.toString=function(){return G(this).toString()};function Da(a)
{Ba(this,a,Ga)}p(Da,y);function Fa(a){Ba(this,a,null)}p(Fa,y);var Ga=[1];function
Ha(a){Ba(this,a,null)}p(Ha,y);var Ia={};function Ja(){}function H(a,b){if(b!
==Ia)throw Error("Bad secret");this.g=a}p(H,Ja);H.prototype.toString=function()
{return this.g};var Ka=new H("about:invalid#zTSz",Ia);function La(a){if(a
instanceof Ja)if(a instanceof H)a=a.g;else throw Error("wrong type");else
a=va(a);return a};var Ma={capture:!0},Na={passive:!0},Pa=ta(function(){var a=!
1;try{var b=Object.defineProperty({},"passive",{get:function(){a=!
0}});q.addEventListener("test",null,b)}catch(c){}return a});function I(a,b,c,d)
{if(a.addEventListener){var e=a.addEventListener;d=d?d.passive&&Pa()?d:d.capture||!
1:!1;e.call(a,b,c,d)}};function Qa(a,b,c){if(Array.isArray(b))for(var
d=0;d<b.length;d++)Qa(a,String(b[d]),c);else null!=b&&c.push(a+
(""===b?"":"="+encodeURIComponent(String(b))))};function Ra(){var a=J;try{var
b;if(b=!!a&&null!=a.location.href)a:{try{xa(a.foo);b=!0;break a}catch(c){}b=!
1}return b}catch(c){return!1}}var K=[];function Sa(){var a=K;K=[];a=k(a);for(var
b=a.next();!b.done;b=a.next()){b=b.value;try{b()}catch(c){}}}function Ta(a){var
b=L;"complete"===b.readyState||"interactive"===b.readyState?
(K.push(a),1==K.length&&(window.Promise?
Promise.resolve().then(Sa):window.setImmediate?
setImmediate(Sa):setTimeout(Sa,0))):b.addEventListener("DOMContentLoaded",a)};funct
ion Ua(){var a=void 0===a?.01:a;if(!(Math.random()>a)){var
b=document.currentScript;b=(b=void 0===b?null:b)&&"23"===b.getAttribute("data-jc")?
b:document.querySelector('[data-jc="23"]');a="https://
pagead2.googlesyndication.com/pagead/gen_204?id=jca&jc=23&version="+
(b&&b.getAttribute("data-jc-version")||"unknown")+"&sample="+a;b=window;var
c;if(c=b.navigator)c=b.navigator.userAgent,c=/Chrome/.test(c)&&!/Edge/.test(c)?!0:!
1;c&&b.navigator.sendBeacon?b.navigator.sendBeacon(a):(b.google_image_requests||
(b.google_image_requests=[]),c=b.document.createElement("img"),c.src=a,b.google_ima
ge_requests.push(c))}};var L=document,M=window;function Va(a){this.H=a}function
N(a){return new Va(function(b){return
b.substr(0,a.length+1).toLowerCase()===a+":"})}var Wa=new
Va(function(a){return/^[^:]*([/?#]|
$)/.test(a)}),Xa=N("http"),Ya=N("https"),Za=N("ftp"),
$a=N("mailto"),ab=[N("data"),Xa,Ya,$a,Za,Wa];var bb=[Xa,Ya,
$a,Za,Wa,N("market"),N("itms"),N("intent"),N("itms-appss")];
function cb(){var
a=(db()?"http:":"https:")+"//pagead2.googlesyndication.com/pagead/gen_204";return
function(b){b={id:"unsafeurl",ctx:625,url:b};var c=[];for(d in b)Qa(d,b[d],c);var
d=c.join("&");if(d){b=a.indexOf("#");0>b&&(b=a.length);c=a.indexOf("?");if(0>c||
c>b){c=b;var e=""}else
e=a.substring(c+1,b);b=[a.substr(0,c),e,a.substr(b)];c=b[1];b[1]=d?c?
c+"&"+d:d:c;d=b[0]+(b[1]?"?"+b[1]:"")+b[2]}else
d=a;navigator.sendBeacon&&navigator.sendBeacon(d,"")}};function eb(a,b)
{if(a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&b.call(void
0,a[c],c,a)}function db(){var a=void 0===a?
M:a;return"http:"===a.location.protocol}var fb=!!
window.google_async_iframe_id,J=fb&&window.parent||window;function gb(){var
a=L;try{return a.querySelectorAll("*[data-ifc]")}catch(b){return[]}}function
hb(a,b){a&&eb(b,function(c,d){a.style[d]=c})}
function ib(a){for(var
b=L.body,c=document.createDocumentFragment(),d=a.length,e=0;e<d;+
+e)c.appendChild(a[e]);b.appendChild(c)};function jb(a){a=void 0===a?
[]:a;q.google_logging_queue||
(q.google_logging_queue=[]);q.google_logging_queue.push([12,a])};var
O=null;function kb(){var a=q.performance;return a&&a.now&&a.timing?
Math.floor(a.now()+a.timing.navigationStart):Date.now()}function lb(){var a=void
0===a?q:a;return(a=a.performance)&&a.now?a.now():null};function mb(a,b){var
c=lb()||
kb();this.label=a;this.type=b;this.value=c;this.duration=0;this.uniqueId=Math.rando
m();this.slotId=void 0};var Q=q.performance,nb=!!
(Q&&Q.mark&&Q.measure&&Q.clearMarks),R=ta(function(){var a;if(a=nb){var
b;if(null===O){O="";try{a="";try{a=q.top.location.hash}catch(c)
{a=q.location.hash}a&&(O=(b=a.match(/\bdeid=([\d,]+)/))?b[1]:"")}catch(c)
{}}b=O;a=!!b.indexOf&&0<=b.indexOf("1337")}return a});
function ob(){var a=S;this.g=[];this.i=a||q;var
b=null;a&&(a.google_js_reporting_queue=a.google_js_reporting_queue||
[],this.g=a.google_js_reporting_queue,b=a.google_measure_js_timing);this.h=R()||
(null!=b?b:1>Math.random())}function pb(a)
{a&&Q&&R()&&(Q.clearMarks("goog_"+a.label+"_"+a.uniqueId+"_start"),Q.clearMarks("go
og_"+a.label+"_"+a.uniqueId+"_end"))}ob.prototype.start=function(a,b){if(!
this.h)return null;a=new
mb(a,b);b="goog_"+a.label+"_"+a.uniqueId+"_start";Q&&R()&&Q.mark(b);return a};
ob.prototype.end=function(a){if(this.h&&"number"===typeof a.value)
{a.duration=(lb()||kb())-a.value;var
b="goog_"+a.label+"_"+a.uniqueId+"_end";Q&&R()&&Q.mark(b);!this.h||
2048<this.g.length||this.g.push(a)}};if(fb&&!Ra()){var
T="."+L.domain;try{for(;2<T.split(".").length&&!
Ra();)L.domain=T=T.substr(T.indexOf(".")+1),J=window.parent}catch(a){}Ra()||
(J=window)}var S=J,U=new ob;function qb(){S.google_measure_js_timing||(U.h=!1,U.g!
=U.i.google_js_reporting_queue&&(R()&&sa(U.g,pb),U.g.length=0))}"number"!==typeof
S.google_srt&&(S.google_srt=Math.random());"complete"==S.document.readyState?
qb():U.h&&I(S,"load",function(){qb()});function rb(a){var b=void 0===b?
null:b;I(M,"message",function(c){try{var d=JSON.parse(c.data)}catch(e){return}!
d||"ig"!==d.googMsgType||b&&/[:|%3A]javascript\(/i.test(c.data)&&!b(d,c)||
a(d,c)})};function V(){this.h=this.h;this.i=this.i}V.prototype.h=!1;function sb(a)
{a.h||(a.h=!0,a.j())}V.prototype.j=function()
{if(this.i)for(;this.i.length;)this.i.shift()()};function W(a,b,c)
{V.call(this);this.l=a;this.C=b||
0;this.o=c;this.v=u(this.B,this)}ra(W,V);W.prototype.g=0;W.prototype.j=function()
{W.G.j.call(this);0!=this.g&&q.clearTimeout(this.g);this.g=0;delete this.l;delete
this.o};
W.prototype.start=function(a){0!=this.g&&q.clearTimeout(this.g);this.g=0;var
b=this.v;a=void 0!==a?a:this.C;if("function"!==typeof b)if(b&&"function"==typeof
b.handleEvent)b=u(b.handleEvent,b);else throw Error("Invalid listener
argument");this.g=2147483647<Number(a)?-1:q.setTimeout(b,a||
0)};W.prototype.B=function(){this.g=0;this.l&&this.l.call(this.o)};var
tb={display:"inline-
block",position:"absolute"},ub={display:"none",width:"100%",height:"100%",top:"0",l
eft:"0"};function X(a,b){a&&(a.style.display=b?"inline-block":"none")}function
vb(a,b){if(a)return M.getComputedStyle(a).getPropertyValue(b)}function wb()
{this.i=[];this.j=this.g=null;this.C=[];this.data=null;this.B=[];this.h=[];this.o=[
];this.v={};this.I=[];this.l=null}
wb.prototype.init=function(a){var b=this;jb([a]);this.data=new
Ha(a);a=Ca(this.data);sa(Ea(a),function(g){b.o.push({D:0,u:!1,F:0,m:g,A:-
1})});this.h=gb();var c=!1;a=this.h.length;for(var d={s:0};d.s<a;d={s:d.s},++d.s)
{var e=new Da(JSON.parse(this.h[d.s].getAttribute("data-
ifc")||"[]"));sa(Ea(e),function(g){return function(f){b.o.push({D:0,u:!
1,F:0,m:f,A:g.s});1===D(f,4,1)&&(c=!0)}}(d))}a=!1;d=k(this.o);for(e=d.next();!
e.done;e=d.next()){e=e.value;var n=e.m;0<D(n,2,0)&&0<D(n,5,1)?(!this.g&&F(n,9)&&
(this.g=xb(this,ub)),yb(this,e)):D(n,1,"")&&F(n,9)&&zb(this,D(n,1,""));D(n,1,"")&&(
a=!0)}d=[];this.g&&d.push(this.g);!
c&&d.push.apply(d,fa(this.i));L.body&&ib(d);F(this.data,13)&&Ta(function(){for(var
g=L.body.querySelectorAll(".amp-fcp, .amp-bcp"),f=0;f<g.length;+
+f)"absolute"===vb(g[f],"position")&&X(g[f],!1)});I(L,"click",function(g){if(!
1===g.isTrusted&&F(b.data,15))Ab(g),g.stopImmediatePropagation(),Ua();else{for(var
f,v=-1,m=[],Oa=k(b.o),r=Oa.next();!r.done;r=Oa.next()){r=r.value;var h=r.A,
l=-1!==h;if(!(D(r.m,3,0)<=v||r.u||l&&!1===m[h])){var E=!l||m[h]||
b.h[h].contains(g.target);l&&E&&(m[h]=!
0);if(h=E)if(h=g,l=r.m,0<D(l,2,0)&&0<D(l,5,1))h=b.v[D(l,5,1)],h=void 0!
==h&&Date.now()<h+D(l,2,0);else if(D(l,1,"")){l=(0<=r.A?
b.h[r.A]:L.body).getBoundingClientRect();E=Number(vb(L.body,"zoom")||"1");var
t=k([h.clientX,h.clientY]),P=t.next().value;t=t.next().value;t=k([P/E-l.left,t/E-
l.top,l.width,l.height]);var
A=t.next().value,Z=t.next().value;P=t.next().value;t=t.next().value;if(!
(0<P&&0<t)||
isNaN(A)||isNaN(Z)||0>A||0>Z)h=!1;else{var B=Bb(D(r.m,1,""));A=!(A>=B.left&&P-
A>B.right&&Z>=B.top&&t-Z>B.bottom);b.l&&F(b.data,12)&&300>h.timeStamp-
b.l.timeStamp&&(h=b.l.changedTouches[0],l=k([h.clientX/E-l.left,h.clientY/E-
l.top]),h=l.next().value,l=l.next().value,!isNaN(h)&&!isNaN(l)&&0<=h&&0<=l&&(A=A||!
(h>=B.left&&P-h>B.right&&l>=B.top&&t-l>B.bottom)));h=A}}else h=!
0;h&&(f=r,v=D(r.m,3,0))}}if(f)switch(v=f.m,D(v,4,1)){case 2:case
3:Ab(g);m=Date.now();500<m-f.F&&(f.F=m,++f.D);m=f.m;if(D(m,8,0)&&
f.D>=D(m,8,0))if(f.u=!0,b.g&&0<D(m,2,0))Cb(b);else
if(0<b.i.length&&D(m,1,""))for(f=k(b.i),m=f.next();!m.done;m=f.next())X(m.value,!
1);Ua();f=G(v);v=k(b.B);for(m=v.next();!
m.done;m=v.next())m=m.value,m(g,f)}}},Ma);a&&F(this.data,12)&&I(L,"touchend",functi
on(g){b.l=g},Na)};wb.prototype.registerCallback=function(a){this.B.push(a)};
function zb(a,b){b=Bb(b);var
c=D(a.data,9,0);a.i=[{width:"100%",height:b.top+c+"px",top:-c+"px",left:"0"},
{width:b.right+c+"px",height:"100%",top:"0",right:-c+"px"},
{width:"100%",height:b.bottom+c+"px",bottom:-c+"px",left:"0"},
{width:b.left+c+"px",height:"100%",top:"0",left:-c+"px"}].map(function(d){return
xb(a,d,9019)})}function Y(a,b){if(!b.u){var
c=D(b.m,5,1);a.v[c]=Date.now();F(b.m,9)&&(a.C.push(b),Cb(a))}}
function yb(a,b){var c,d,e,n,g=window;switch(D(b.m,5,1)){case
2:null===(d=null===(c=g.AFMA_Communicator)||void 0===c?void 0:c.addEventListener)||
void 0===d?void 0:d.call(c,"onshow",function(){Y(a,b)});break;case 10:I(M,"i-
creative-view",function(){Y(a,b)});break;case 4:I(L,"DOMContentLoaded",function()
{Y(a,b)});break;case 8:rb(function(f){f.rr&&Y(a,b)});break;case
9:"IntersectionObserver"in M&&(g=new IntersectionObserver(function(f)
{f=k(f);for(var v=f.next();!v.done;v=f.next())if(0<v.value.intersectionRatio){Y(a,
b);break}}),g.observe(L.body),a.I.push(g));break;case
11:null===(n=null===(e=g.AFMA_Communicator)||void 0===e?void
0:e.addEventListener)||void 0===n?void
0:n.call(e,"onAdVisibilityChanged",function(){Y(a,b)})}}function Ab(a){var b=void
0===b?!1:b;a.preventDefault?a.preventDefault():a.returnValue=!
1;b&&a.stopPropagation()}
function Cb(a){for(var b=0,c=k(a.C),d=c.next();!d.done;d=c.next()){d=d.value;var
e=d.m,n=a.v[D(e,5,1)];d.u||void 0===n||(b=Math.max(b,n+D(e,2,0)))}a.j&&sb(a.j);b-
=Date.now();var g=a.g;0<b?(X(g,!0),a.j=new W(function(){X(g,!
1)},b),a.j.start()):X(g,!1)}
function xb(a,b,c){c=void 0===c?2147483647:c;var
d=L.createElement("div");hb(d,Object.assign(Object.assign(Object.assign({},tb),{"z-
index":String(c)}),b));F(a.data,10)&&I(d,"click",oa);if(F(a.data,11))
{a=L.createElement("a");b=cb();c=bb;c=void 0===c?ab:c;a:{c=void 0===c?ab:c;for(var
e=0;e<c.length;++e){var n=c[e];if(n instanceof Va&&n.H("#")){c=new H("#",Ia);break
a}}c=void 0}c=c||Ka;c===Ka&&b("#");b=new w(La(c),ua);b instanceof w||b instanceof
w||(b="object"==typeof b&&b.i?b.h():String(b),wa.test(b)||
(b="about:invalid#zClosurez"),b=new w(b,ua));a.href=va(b);a.appendChild(d);return
a}return d}function Bb(a){a=void 0===a?"":a;var
b={top:0,right:0,bottom:0,left:0};a&&(a=a.split(","),4===a.length&&a.reduce(functio
n(c,d){return c&&!isNaN(+d)},!0)&&(a=k(a.map(function(c)
{return+c})),b.top=a.next().value,b.right=a.next().value,b.bottom=a.next().value,b.
left=a.next().value));return b};window.googqscp=new wb;}).call(this);

You might also like