0% found this document useful (0 votes)
50 views5 pages

F

This document defines functions and classes for use in JavaScript applications. It includes functions like bind, mark, and measure to assist with performance monitoring. Classes like SafeUrl are also defined for working with URLs.

Uploaded by

Roberto Silvano
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)
50 views5 pages

F

This document defines functions and classes for use in JavaScript applications. It includes functions like bind, mark, and measure to assist with performance monitoring. Classes like SafeUrl are also defined for working with URLs.

Uploaded by

Roberto Silvano
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
*/
'use strict';var k=this||self;function aa(){}function ba(a,b,c){return
a.call.apply(a.bind,arguments)}function ca(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 n(a,b,c){Function.prototype.bind&&-1!
=Function.prototype.bind.toString().indexOf("native code")?n=ba:n=ca;return
n.apply(null,arguments)}function da(a,b){function c()
{}c.prototype=b.prototype;a.G=b.prototype;a.prototype=new
c;a.prototype.constructor=a;a.I=function(d,e,g){for(var h=Array(arguments.length-
2),f=2;f<arguments.length;f++)h[f-2]=arguments[f];return
b.prototype[e].apply(d,h)}};function p(a,b){Array.prototype.forEach.call(a,b,void
0)};function q(a){q[" "](a);return a}q[" "]=aa;var ia={},r=null;var
ja="function"===typeof Uint8Array;const t=Symbol(void 0);function ka(a,b)
{Object.isFrozen(a)||(t?a[t]|=b:void 0!==a.g?a.g|=b:Object.defineProperties(a,{g:
{value:b,configurable:!0,writable:!0,enumerable:!1}}))}function la(a){if(!a)return
0;let b;t?b=a[t]:b=a.g;return null==b?0:b}function u(a){if(!Array.isArray(a))return
a;ka(a,1);return a}function ma(a){if(!Array.isArray(a))throw Error("cannot mark
non-array as immutable");ka(a,2)};function na(a){return null!==a&&"object"===typeof
a&&a.constructor===Object}
function oa(a){switch(typeof a){case "number":return isFinite(a)?a:String(a);case
"object":if(ja&&null!=a&&a instanceof Uint8Array){var b;void 0===b&&(b=0);if(!r)
{r={};for(var
c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),d=["+/
=","+/","-_=","-_.","-_"],e=0;5>e;e++){var
g=c.concat(d[e].split(""));ia[e]=g;for(var h=0;h<g.length;h++){var f=g[h];void
0===r[f]&&(r[f]=h)}}}b=ia[b];c=Array(Math.floor(a.length/3));d=b[64]||"";for(e=g=0;
g<a.length-2;g+=3){var l=a[g],m=a[g+1];
f=a[g+2];h=b[l>>2];l=b[(l&3)<<4|m>>4];m=b[(m&15)<<2|f>>6];f=b[f&63];c[e+
+]=h+l+m+f}h=0;f=d;switch(a.length-g){case 2:h=a[g+1],f=b[(h&15)<<2]||d;case
1:a=a[g],c[e]=b[a>>2]+b[(a&3)<<4|h>>4]+f+d}a=c.join("")}return a;default:return
a}};function pa(a,b){if(null!=a)return Array.isArray(a)||na(a)?
qa(a,b):b(a)}function qa(a,b){if(Array.isArray(a)){var c=Array(a.length);for(var
d=0;d<a.length;d++)c[d]=pa(a[d],b);la(a)&1&&u(c);return c}c={};for(d in
a)c[d]=pa(a[d],b);return c};let ra;function x(a,b,c){var d=ra;ra=null;a||
(a=d);d=this.constructor.K;a||(a=d?[d]:[]);this.j=(d?0:-1)-(this.constructor.J||
0);this.g=null;this.h=a;a:{d=this.h.length;a=d-1;if(d&&(d=this.h[a],na(d)))
{this.l=a-this.j;this.i=d;break a}void 0!==b&&-1<b?(this.l=Math.max(b,a+1-
this.j),this.i=null):this.l=Number.MAX_VALUE}if(c)for(b=0;b<c.length;b+
+)a=c[b],a<this.l?(a+=this.j,(d=this.h[a])?u(d):this.h[a]=y):(sa(this),
(d=this.i[a])?u(d):this.i[a]=y)}const y=Object.freeze(u([]));
function sa(a){let b=a.l+a.j;a.h[b]||(a.i=a.h[b]={})}function A(a,b,c=!1){return-
1===b?null:c||b>=a.l?a.i?a.i[b]:void 0:a.h[b+a.j]}function B(a,b,c){a=A(a,b);return
null==a?c:a}function C(a,b){a=A(a,b);a=null==a?a:!!a;return null==a?!1:a}function
ta(a){var b=ua;a.g||(a.g={});const c=a.g[1];if(c)return c;let d=A(a,1,!
1);if(null==d)return c;b=new b(d);return a.g[1]=b}
function va(a){var b=wa;a.g||(a.g={});var c=a.g[1];if(!c){var d=A(a,1,!
1);null==d&&(d=y);d===y&&(c=d=u([]),1>=a.l?
(sa(a),a.i[1]=c):a.h[1+a.j]=c);c=[];const e=Array.isArray(d)?!!(la(d)&2):!1;for(let
g=0;g<d.length;g++)c[g]=new
b(d[g]),e&&ma(c[g].h);e&&(ma(c),Object.freeze(c));a.g[1]=c}return
c}x.prototype.toJSON=function(){const a=D(this);return qa(a,oa)};function D(a)
{if(a.g)for(let b in a.g){const c=a.g[b];if(Array.isArray(c))for(let
d=0;d<c.length;d++)c[d]&&D(c[d]);else c&&D(c)}return a.h}
x.prototype.toString=function(){return D(this).toString()};var ua=class extends
x{constructor(a){super(a,-1,xa)}},wa=class extends x{constructor(a)
{super(a)}},xa=[1];var ya=class extends x{constructor(a){super(a)}};var
G=class{constructor(a,b){this.g=b===F?a:""}};G.prototype.i=!
0;G.prototype.h=function(){return
this.g.toString()};G.prototype.toString=function(){return
this.g.toString()};function za(a){return a instanceof G&&a.constructor===G?
a.g:"type_error:SafeUrl"}var Aa=/^(?:(?:https?|mailto|ftp):|[^:/?#]*(?:[/?#]|
$))/i,F={};/*

SPDX-License-Identifier: Apache-2.0
*/
var Ba=class{};class Ca extends Ba{constructor(a){super();this.g=a}toString()
{return this.g}}var Da=new Ca("about:invalid#zTSz");class Ea{constructor(a)
{this.F=a}}function H(a){return new
Ea(b=>b.substr(0,a.length+1).toLowerCase()===a+":")}const Fa=new Ea(a=>/^[^:]*([/?
#]|$)/.test(a));var Ga=H("http"),Ha=H("https"),Ia=H("ftp"),Ja=H("mailto");const
Ka=[H("data"),Ga,Ha,Ja,Ia,Fa];function La(a=Ka){for(let b=0;b<a.length;++b){const
c=a[b];if(c instanceof Ea&&c.F("#"))return new Ca("#")}}function Ma(a=Ka){return
La(a)||Da};function Na(a){if(a instanceof Ba)if(a instanceof Ca)a=a.g;else throw
Error("");else a=za(a);return a};function Oa(a){let b=!1,c;return function(){b||
(c=a(),b=!0);return c}};var Pa={capture:!0},Qa={passive:!0},Ra=Oa(function(){let
a=!1;try{const b=Object.defineProperty({},"passive",{get:function(){a=!
0}});k.addEventListener("test",null,b)}catch(b){}return a});function I(a,b,c,d)
{if(a.addEventListener){var e=a.addEventListener;d=d?d.passive&&Ra()?d:d.capture||!
1:!1;e.call(a,b,c,d)}};function Sa(a,b,c){if(Array.isArray(b))for(var
d=0;d<b.length;d++)Sa(a,String(b[d]),c);else null!=b&&c.push(a+
(""===b?"":"="+encodeURIComponent(String(b))))};function Ta(){var a=J;try{var
b;if(b=!!a&&null!=a.location.href)a:{try{q(a.foo);b=!0;break a}catch(c){}b=!
1}return b}catch(c){return!1}}function Ua(a){var b={stack:Error().stack};for(const
c in b)Object.prototype.hasOwnProperty.call(b,c)&&a.call(void 0,b[c],c,b)}let
K=[];const Va=()=>{const a=K;K=[];for(const b of a)try{b()}catch(c){}};
var Wa=a=>{var b=L;"complete"===b.readyState||"interactive"===b.readyState?
(K.push(a),1==K.length&&(window.Promise?
Promise.resolve().then(Va):window.setImmediate?
setImmediate(Va):setTimeout(Va,0))):b.addEventListener("DOMContentLoaded",a)};funct
ion Xa(a,b){a.google_image_requests||(a.google_image_requests=[]);var
c=a.document;c=void 0===c?document:c;var d="IMG";let
e;"application/xhtml+xml"===(null==(e=c)?void
0:e.contentType)&&(d=d.toLowerCase());c=c.createElement(d);c.src=b;a.google_image_r
equests.push(c)}
var Za=()=>{let a="https://pagead2.googlesyndication.com/pagead/gen_204?
id=badpubwin";Ua((b,c)=>{b&&(a+=`&${c}=$
{encodeURIComponent(b)}`)});Ya(a)},Ya=a=>{var b=window;b.fetch?b.fetch(a,
{keepalive:!0,credentials:"include",redirect:"follow",method:"get",mode:"no-
cors"}):Xa(b,a)};function $a(a=null){return a&&"23"===a.getAttribute("data-jc")?
a:document.querySelector('[data-jc="23"]')}function ab(){if(!(.01<Math.random()))
{var a=$a(document.currentScript);a=`https://$
{"pagead2.googlesyndication.com"}/pagead/gen_204?id=jca&jc=${23}&version=$
{a&&a.getAttribute("data-jc-version")||"unknown"}&sample=${.01}`;var
b=window,c;if(c=b.navigator)c=b.navigator.userAgent,c=/Chrome/.test(c)&&!/Edge/.tes
t(c)?!0:!1;c&&b.navigator.sendBeacon?b.navigator.sendBeacon(a):Xa(b,a)}};var
L=document,M=window;const
bb=[Ga,Ha,Ja,Ia,Fa,H("market"),H("itms"),H("intent"),H("itms-appss")];
var db=()=>{var a=`${cb()?"http:":"https:"}//$
{"pagead2.googlesyndication.com"}/pagead/gen_204`;return
b=>{b={id:"unsafeurl",ctx:625,url:b};var c=[];for(d in b)Sa(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,"")}};var eb=(a,b)=>{if(a)for(let
c in a)Object.prototype.hasOwnProperty.call(a,c)&&b.call(void
0,a[c],c,a)},cb=()=>{var a=void 0===a?
M:a;return"http:"===a.location.protocol},fb=!!window.google_async_iframe_id;let
J=fb&&window.parent||window;var gb=()=>{var a=L;try{return
a.querySelectorAll("*[data-ifc]")}catch(b){return[]}},hb=(a,b)=>{a&&eb(b,
(c,d)=>{a.style[d]=c})},ib=a=>{var b=L.body;const
c=document.createDocumentFragment(),d=a.length;for(let e=0;e<d;+
+e)c.appendChild(a[e]);b.appendChild(c)};var jb=(a=[])=>{k.google_logging_queue||
(k.google_logging_queue=[]);k.google_logging_queue.push([12,a])};let N=null;var
kb=()=>{const a=k.performance;return a&&a.now&&a.timing?Math.floor(a.now()
+a.timing.navigationStart):Date.now()},lb=()=>{const a=k.performance;return
a&&a.now?a.now():null};class mb{constructor(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}};const O=k.performance,nb=!!
(O&&O.mark&&O.measure&&O.clearMarks),P=Oa(()=>{var a;if(a=nb){var b;if(null===N)
{N="";try{a="";try{a=k.top.location.hash}catch(c)
{a=k.location.hash}a&&(N=(b=a.match(/\bdeid=([\d,]+)/))?b[1]:"")}catch(c)
{}}b=N;a=!!b.indexOf&&0<=b.indexOf("1337")}return a});function ob(a)
{a&&O&&P()&&(O.clearMarks(`goog_${a.label}_$
{a.uniqueId}_start`),O.clearMarks(`goog_${a.label}_${a.uniqueId}_end`))}
class pb{constructor(){var a=Q;this.g=[];this.i=a||k;let
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=P()||
(null!=b?b:1>Math.random())}start(a,b){if(!this.h)return null;a=new
mb(a,b);b=`goog_${a.label}_${a.uniqueId}_start`;O&&P()&&O.mark(b);return a}end(a)
{if(this.h&&"number"===typeof a.value){a.duration=(lb()||kb())-a.value;var
b=`goog_${a.label}_${a.uniqueId}_end`;O&&P()&&O.mark(b);!this.h||
2048<this.g.length||
this.g.push(a)}}};if(fb&&!Ta()){.01>Math.random()&&Za();let
a="."+L.domain;try{for(;2<a.split(".").length&&!
Ta();)L.domain=a=a.substr(a.indexOf(".")+1),J=window.parent}catch(b){}Ta()||
(J=window)}const Q=J,R=new pb;var qb=()=>{Q.google_measure_js_timing||(R.h=!1,R.g!
=R.i.google_js_reporting_queue&&(P()&&p(R.g,ob),R.g.length=0))};"number"!==typeof
Q.google_srt&&(Q.google_srt=Math.random());"complete"==Q.document.readyState?
qb():R.h&&I(Q,"load",()=>{qb()});var rb=a=>{I(M,"message",b=>{let
c;try{c=JSON.parse(b.data)}catch(d){return}!c||"ig"!==c.googMsgType||
a(c,b)})};function S(){this.h=this.h;this.i=this.i}S.prototype.h=!1;function sb(a)
{a.h||(a.h=!0,a.j())}S.prototype.j=function()
{if(this.i)for(;this.i.length;)this.i.shift()()};function X(a,b,c)
{S.call(this);this.l=a;this.B=b||
0;this.o=c;this.u=n(this.A,this)}da(X,S);X.prototype.g=0;X.prototype.j=function()
{X.G.j.call(this);0!=this.g&&k.clearTimeout(this.g);this.g=0;delete this.l;delete
this.o};
X.prototype.start=function(a){0!=this.g&&k.clearTimeout(this.g);this.g=0;var
b=this.u;a=void 0!==a?a:this.B;if("function"!==typeof b)if(b&&"function"==typeof
b.handleEvent)b=n(b.handleEvent,b);else throw Error("Invalid listener
argument");this.g=2147483647<Number(a)?-1:k.setTimeout(b,a||
0)};X.prototype.A=function(){this.g=0;this.l&&this.l.call(this.o)};const
tb={display:"inline-
block",position:"absolute"},ub={display:"none",width:"100%",height:"100%",top:"0",l
eft:"0"},Y=(a,b)=>{a&&(a.style.display=b?"inline-block":"none")};function vb(a="")
{const
b={top:0,right:0,bottom:0,left:0};a&&(a=a.split(","),4===a.length&&a.reduce((c,d)=>
c&&!isNaN(+d),!0)&&([b.top,b.right,b.bottom,b.left]=a.map(c=>+c)));return b}
function wb(a,b,c=2147483647){const
d=L.createElement("div");hb(d,Object.assign(Object.assign(Object.assign({},tb),{"z-
index":String(c)}),b));C(a.data,10)&&I(d,"click",aa);if(C(a.data,11))
{a=b=L.createElement("a");c=db();const e=Ma(bb);e===Da&&c("#");c=new G(Na(e),F);c
instanceof G||c instanceof G||(c="object"==typeof c&&c.i?
c.h():String(c),Aa.test(c)||(c="about:invalid#zClosurez"),c=new
G(c,F));a.href=za(c);b.appendChild(d);return b}return d}
function xb(a,b){var c,d,e,g,h=window;switch(B(b.m,5,1)){case
2:null===(d=null===(c=h.AFMA_Communicator)||void 0===c?void 0:c.addEventListener)||
void 0===d?void 0:d.call(c,"onshow",()=>{Z(a,b)});break;case 10:I(M,"i-creative-
view",()=>{Z(a,b)});break;case 4:I(L,"DOMContentLoaded",()=>{Z(a,b)});break;case
8:rb(f=>{f.rr&&Z(a,b)});break;case 9:"IntersectionObserver"in M&&(h=new
IntersectionObserver(f=>{for(const l of f)if(0<l.intersectionRatio)
{Z(a,b);break}}),h.observe(L.body),a.H.push(h));break;case 11:null===
(g=null===(e=h.AFMA_Communicator)||void 0===e?void 0:e.addEventListener)||void
0===g?void 0:g.call(e,"onAdVisibilityChanged",()=>{Z(a,b)})}}function yb(a,b)
{b=vb(b);const c=B(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(d=>wb(a,d,9019))}
function zb(a){var b=0;for(const d of a.B){const e=d.m,g=a.u[B(e,5,1)];d.s||void
0===g||(b=Math.max(b,g+B(e,2,0)))}a.j&&sb(a.j);b-=Date.now();const c=a.g;0<b?(Y(c,!
0),a.j=new X(()=>{Y(c,!1)},b),a.j.start()):Y(c,!1)}function Z(a,b){b.s||
(a.u[B(b.m,5,1)]=Date.now(),C(b.m,9)&&(a.B.push(b),zb(a)))};window.googqscp=new
class{constructor()
{this.i=[];this.j=this.g=null;this.B=[];this.data=null;this.A=[];this.h=[];this.o=[
];this.u={};this.H=[];this.l=null}init(a){jb([a]);this.data=new
ya(a);a=ta(this.data);p(va(a),e=>{this.o.push({C:0,s:!1,D:0,m:e,v:-
1})});this.h=gb();let b=!1;a=this.h.length;for(let e=0;e<a;++e){var c=new
ua(JSON.parse(this.h[e].getAttribute("data-
ifc")||"[]"));p(va(c),g=>{this.o.push({C:0,s:!1,D:0,m:g,v:e});1===B(g,4,1)&&(b=!
0)})}a=!1;for(var d of this.o)c=d.m,0<B(c,2,0)&&0<B(c,
5,1)?(!
this.g&&C(c,9)&&(this.g=wb(this,ub)),xb(this,d)):B(c,1,"")&&C(c,9)&&yb(this,B(c,1,"
")),B(c,1,"")&&(a=!0);d=[];this.g&&d.push(this.g);!
b&&d.push(...this.i);L.body&&ib(d);C(this.data,13)&&Wa(()=>{const
e=L.body.querySelectorAll(".amp-fcp, .amp-bcp");for(let h=0;h<e.length;++h){var
g=(g=e[h])?M.getComputedStyle(g).getPropertyValue("position"):void
0;"absolute"===g&&Y(e[h],!1)}});I(L,"click",e=>{if(!
1===e.isTrusted&&C(this.data,15))e.preventDefault?
e.preventDefault():e.returnValue=!1,e.stopImmediatePropagation(),
ab();else{var g=-1,h=[];for(const v of this.o){var f=v.v,l=-1!==f;if(!
(B(v.m,3,0)<=g||v.s||l&&!1===h[f])){var m=!l||h[f]||
this.h[f].contains(e.target);l&&m&&(h[f]=!
0);if(f=m)if(f=e,m=v,l=m.m,0<B(l,2,0)&&0<B(l,5,1))f=this.u[B(l,5,1)],f=void 0!
==f&&Date.now()<f+B(l,2,0);else if(B(l,1,"")){{l=(0<=m.v?
this.h[m.v]:L.body).getBoundingClientRect();var E=Number;var z=(z=L.body)?
M.getComputedStyle(z).getPropertyValue("zoom"):void 0;E=E(z||"1");const
[Ab,Bb]=[f.clientX,f.clientY],[T,U,ea,fa]=[Ab/E-l.left,Bb/
E-l.top,l.width,l.height];if(!(0<ea&&0<fa)||isNaN(T)||isNaN(U)||0>T||0>U)f=!
1;else{m=vb(B(m.m,1,""));z=!(T>=m.left&&ea-T>m.right&&U>=m.top&&fa-
U>m.bottom);if(this.l&&C(this.data,12)&&300>f.timeStamp-this.l.timeStamp)
{f=this.l.changedTouches[0];const [V,W]=[f.clientX/E-l.left,f.clientY/E-l.top];!
isNaN(V)&&!isNaN(W)&&0<=V&&0<=W&&(z=z||!(V>=m.left&&ea-V>m.right&&W>=m.top&&fa-
W>m.bottom))}f=z}}}else f=!0;if(f){var
w=v;g=B(v.m,3,0)}}}if(w)switch(g=w.m,B(g,4,1)){case 2:case 3:e.preventDefault?
e.preventDefault():
e.returnValue=!1;h=Date.now();500<h-w.D&&(w.D=h,+
+w.C);h=w.m;if(B(h,8,0)&&w.C>=B(h,8,0))if(w.s=!0,this.g&&0<B(h,2,0))zb(this);else
if(0<this.i.length&&B(h,1,""))for(var ha of this.i)Y(ha,!
1);ab();ha=g.toJSON();for(const v of
this.A)v(e,ha)}}},Pa);a&&C(this.data,12)&&I(L,"touchend",e=>{this.l=e},Qa)}register
Callback(a){this.A.push(a)}};}).call(this);

You might also like