0% found this document useful (0 votes)
22 views9 pages

F

This document defines a Promise polyfill that provides Promise functionality for environments that do not natively support Promises. The polyfill defines a Promise constructor and prototype methods like then(), catch(), resolve(), and reject() to mimic the standard Promise API. It uses closures, sets flags on objects to track state, and queues jobs to the event loop to handle asynchronous behavior like callbacks.

Uploaded by

Sándor Horváth
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)
22 views9 pages

F

This document defines a Promise polyfill that provides Promise functionality for environments that do not natively support Promises. The polyfill defines a Promise constructor and prototype methods like then(), catch(), resolve(), and reject() to mimic the standard Promise API. It uses closures, sets flags on objects to track state, and queues jobs to the event loop to handle asynchronous behavior like callbacks.

Uploaded by

Sándor Horváth
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/ 9

(function(){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 q=ca(this);function u(a,b){if(b)a:{var
c=q;a=a.split(".");for(var d=0;d<a.length-1;d++){var f=a[d];if(!(f in c))break
a;c=c[f]}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 da(a){var b="undefined"!=typeof
Symbol&&Symbol.iterator&&a[Symbol.iterator];if(b)return
b.call(a);if("number"==typeof a.length)return{next:aa(a)};throw Error(String(a)+"
is not an iterable or ArrayLike");}var ea="function"==typeof Object.create?
Object.create:function(a){function b(){}b.prototype=a;return new b},fa;
if("function"==typeof Object.setPrototypeOf)fa=Object.setPrototypeOf;else{var ha;a:
{var ia={a:!0},ja={};try{ja.__proto__=ia;ha=ja.a;break a}catch(a){}ha=!1}fa=ha?
function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not
extensible");return a}:null}var ka=fa;
function la(a,b)
{a.prototype=ea(b.prototype);a.prototype.constructor=a;if(ka)ka(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.ea=b.prototype}function ma(){for(var
a=Number(this),b=[],c=a;c<arguments.length;c++)b[c-a]=arguments[c];return b}
u("Promise",function(a){function b(e){this.h=0;this.i=void 0;this.g=[];this.u=!
1;var h=this.j();try{e(h.resolve,h.reject)}catch(k){h.reject(k)}}function c()
{this.g=null}function d(e){return e instanceof b?e:new b(function(h)
{h(e)})}if(a)return a;c.prototype.h=function(e){if(null==this.g){this.g=[];var
h=this;this.i(function(){h.m()})}this.g.push(e)};var
f=q.setTimeout;c.prototype.i=function(e){f(e,0)};c.prototype.m=function()
{for(;this.g&&this.g.length;){var e=this.g;this.g=[];for(var h=0;h<e.length;++h)
{var k=
e[h];e[h]=null;try{k()}catch(l){this.j(l)}}}this.g=null};c.prototype.j=function(e)
{this.i(function(){throw e;})};b.prototype.j=function(){function e(l){return
function(m){k||(k=!0,l.call(h,m))}}var h=this,k=!
1;return{resolve:e(this.D),reject:e(this.m)}};b.prototype.D=function(e)
{if(e===this)this.m(new TypeError("A Promise cannot resolve to itself"));else if(e
instanceof b)this.G(e);else{a:switch(typeof e){case "object":var h=null!=e;break
a;case "function":h=!0;break a;default:h=!1}h?this.A(e):this.o(e)}};
b.prototype.A=function(e){var h=void 0;try{h=e.then}catch(k)
{this.m(k);return}"function"==typeof h?
this.H(h,e):this.o(e)};b.prototype.m=function(e)
{this.v(2,e)};b.prototype.o=function(e){this.v(1,e)};b.prototype.v=function(e,h)
{if(0!=this.h)throw Error("Cannot settle("+e+", "+h+"): Promise already settled in
state"+this.h);this.h=e;this.i=h;2===this.h&&this.F();this.B()};b.prototype.F=funct
ion(){var e=this;f(function(){if(e.C()){var h=q.console;"undefined"!==typeof
h&&h.error(e.i)}},1)};b.prototype.C=
function(){if(this.u)return!1;var
e=q.CustomEvent,h=q.Event,k=q.dispatchEvent;if("undefined"===typeof k)return!
0;"function"===typeof e?e=new e("unhandledrejection",{cancelable:!
0}):"function"===typeof h?e=new h("unhandledrejection",{cancelable:!0}):
(e=q.document.createEvent("CustomEvent"),e.initCustomEvent("unhandledrejection",!
1,!0,e));e.promise=this;e.reason=this.i;return k(e)};b.prototype.B=function()
{if(null!=this.g){for(var e=0;e<this.g.length;++e)g.h(this.g[e]);this.g=null}};var
g=new c;b.prototype.G=
function(e){var h=this.j();e.I(h.resolve,h.reject)};b.prototype.H=function(e,h){var
k=this.j();try{e.call(h,k.resolve,k.reject)}catch(l)
{k.reject(l)}};b.prototype.then=function(e,h){function k(r,n)
{return"function"==typeof r?function(t){try{l(r(t))}catch(D){m(D)}}:n}var l,m,p=new
b(function(r,n){l=r;m=n});this.I(k(e,l),k(h,m));return
p};b.prototype.catch=function(e){return this.then(void
0,e)};b.prototype.I=function(e,h){function k(){switch(l.h){case 1:e(l.i);break;case
2:h(l.i);break;default:throw Error("Unexpected state: "+
l.h);}}var l=this;null==this.g?g.h(k):this.g.push(k);this.u=!
0};b.resolve=d;b.reject=function(e){return new b(function(h,k)
{k(e)})};b.race=function(e){return new b(function(h,k){for(var l=da(e),m=l.next();!
m.done;m=l.next())d(m.value).I(h,k)})};b.all=function(e){var
h=da(e),k=h.next();return k.done?d([]):new b(function(l,m){function p(t){return
function(D){r[t]=D;n--;0==n&&l(r)}}var r=[],n=0;do r.push(void 0),n+
+,d(k.value).I(p(r.length-1),m),k=h.next();while(!k.done)})};return b});
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 f in
d)Object.prototype.hasOwnProperty.call(d,f)&&(a[f]=d[f])}return
a};u("Object.assign",function(a){return a||na});u("Object.is",function(a){return a?
a:function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c}});
u("Array.prototype.includes",function(a){return a?a:function(b,c){var d=this;d
instanceof String&&(d=String(d));var f=d.length;c=c||
0;for(0>c&&(c=Math.max(c+f,0));c<f;c++){var g=d[c];if(g===b||Object.is(g,b))return!
0}return!1}});
u("String.prototype.includes",function(a){return a?a:function(b,c)
{if(null==this)throw new TypeError("The 'this' value for String.prototype.includes
must not be null or undefined");if(b instanceof RegExp)throw new TypeError("First
argument to String.prototype.includes must not be a regular expression");return-1!
==this.indexOf(b,c||0)}});/*

Copyright The Closure Library Authors.


SPDX-License-Identifier: Apache-2.0
*/
var v=this||self;function oa(a,b){a:{var c=["CLOSURE_FLAGS"];for(var
d=v,f=0;f<c.length;f++)if(d=d[c[f]],null==d){c=null;break a}c=d}a=c&&c[a];return
null!=a?a:b}function pa(a){return a};var qa=oa(610401301,!1),ra=oa(572417392,oa(1,!
0));var w,sa=v.navigator;w=sa?sa.userAgentData||null:null;function ta(a){return qa?
w?w.brands.some(function(b){return(b=b.brand)&&-1!=b.indexOf(a)}):!1:!1}function
x(a){var b;a:{if(b=v.navigator)if(b=b.userAgent)break a;b=""}return-1!
=b.indexOf(a)};function z(){return qa?!!w&&0<w.brands.length:!1}function ua()
{return z()?ta("Chromium"):(x("Chrome")||x("CriOS"))&&!(z()?0:x("Edge"))||
x("Silk")};var va=Array.prototype.indexOf?function(a,b){return
Array.prototype.indexOf.call(a,b,void 0)}:function(a,b){if("string"===typeof
a)return"string"!==typeof b||1!=b.length?-1:a.indexOf(b,0);for(var
c=0;c<a.length;c++)if(c in a&&a[c]===b)return c;return-
1},wa=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,f=0;f<c;f+
+)f in d&&b.call(void 0,d[f],f,a)};function xa(a){xa[" "](a);return a}xa["
"]=function(){};var ya=z()?!1:x("Trident")||x("MSIE");!x("Android")||
ua();ua();x("Safari")&&(ua()||(z()?0:x("Coast"))||(z()?0:x("Opera"))||(z()?
0:x("Edge"))||(z()?ta("Microsoft Edge"):x("Edg/"))||z()&&ta("Opera"));var
za={},Aa=null;var Ba="undefined"!==typeof Uint8Array,Ca=!ya&&"function"===typeof
btoa;var Da=!ra,Ea=!ra;var A="function"===typeof Symbol&&"symbol"===typeof
Symbol()?Symbol():void 0,Fa=A?function(a,b){a[A]|=b}:function(a,b){void 0!==a.s?
a.s|=b:Object.defineProperties(a,{s:{value:b,configurable:!0,writable:!
0,enumerable:!1}})};function Ga(a){var b=B(a);1!
==(b&1)&&(Object.isFrozen(a)&&(a=Array.prototype.slice.call(a)),C(a,b|1))}
var B=A?function(a){return a[A]|0}:function(a){return a.s|0},E=A?function(a){return
a[A]}:function(a){return a.s},C=A?function(a,b){a[A]=b}:function(a,b){void 0!==a.s?
a.s=b:Object.defineProperties(a,{s:{value:b,configurable:!0,writable:!
0,enumerable:!1}})};function Ha(){var a=[];Fa(a,1);return a}function Ia(a,b){C(b,
(a|0)&-14591)}function Ja(a,b){C(b,(a|34)&-14557)}function Ka(a)
{a=a>>14&1023;return 0===a?536870912:a};var La={},Ma={};function Na(a){return!(!
a||"object"!==typeof a||a.da!==Ma)}function F(a){return null!==a&&"object"===typeof
a&&!Array.isArray(a)&&a.constructor===Object}var Oa,Pa=!ra;function Qa(a,b,c){if(!
Array.isArray(a)||a.length)return!1;var d=B(a);if(d&1)return!0;if(!
(b&&(Array.isArray(b)?b.includes(c):b.has(c))))return!1;C(a,d|1);return!0}var
G,Ra=[];C(Ra,55);G=Object.freeze(Ra);function Sa(a){if(null==a)return
a;if("string"===typeof a){if(!a)return;a=+a}if("number"===typeof a)return a};var
Ta;function Wa(a,b){Ta=b;a=new a(b);Ta=void 0;return a}
function Xa(a,b,c){null==a&&(a=Ta);Ta=void 0;if(null==a){var d=96;c?(a=[c],d|
=512):a=[];b&&(d=d&-16760833|(b&1023)<<14)}else{if(!Array.isArray(a))throw
Error();d=B(a);if(d&64)return a;d|=64;if(c&&(d|=512,c!==a[0]))throw Error();a:
{c=a;var f=c.length;if(f){var g=f-1,e=c[g];if(F(e)){d|=256;b=+!!(d&512)-1;f=g-
b;1024<=f&&(Ya(c,b,e),f=1023);d=d&-16760833|(f&1023)<<14;break a}}b&&(e=+!!(d&512)-
1,b=Math.max(b,f-e),1024<b&&(Ya(c,e,{}),d|=256,b=1023),d=d&-16760833|
(b&1023)<<14)}}C(a,d);return a}
function Ya(a,b,c){for(var d=1023+b,f=a.length,g=d;g<f;g++){var e=a[g];null!=e&&e!
==c&&(c[g-b]=e)}a.length=d+1;a[d]=c};function Za(a,b){return $a(b)}
function $a(a){switch(typeof a){case "number":return isFinite(a)?a:String(a);case
"boolean":return a?1:0;case "object":if(a){if(Array.isArray(a))return Pa||!
Qa(a,void 0,9999)?a:void 0;if(Ba&&null!=a&&a instanceof Uint8Array){if(Ca){for(var
b="",c=0,d=a.length-
10240;c<d;)b+=String.fromCharCode.apply(null,a.subarray(c,c+=10240));b+=String.from
CharCode.apply(null,c?a.subarray(c):a);a=btoa(b)}else{void 0===b&&(b=0);if(!Aa)
{Aa={};c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split("")
;d=
["+/=","+/","-_=","-_.","-_"];for(var f=0;5>f;f++){var
g=c.concat(d[f].split(""));za[f]=g;for(var e=0;e<g.length;e++){var h=g[e];void
0===Aa[h]&&(Aa[h]=e)}}}b=za[b];c=Array(Math.floor(a.length/3));d=b[64]||"";for(f=g=
0;g<a.length-2;g+=3){var k=a[g],l=a[g+1];h=a[g+2];e=b[k>>2];k=b[(k&3)<<4|
l>>4];l=b[(l&15)<<2|h>>6];h=b[h&63];c[f++]=e+k+l+h}e=0;h=d;switch(a.length-g){case
2:e=a[g+1],h=b[(e&15)<<2]||d;case 1:a=a[g],c[f]=b[a>>2]+b[(a&3)<<4|
e>>4]+h+d}a=c.join("")}return a}}}return a};function ab(a,b,c)
{a=Array.prototype.slice.call(a);var d=a.length,f=b&256?a[d-1]:void 0;d+=f?-
1:0;for(b=b&512?1:0;b<d;b++)a[b]=c(a[b]);if(f){b=a[b]={};for(var g in
f)b[g]=c(f[g])}return a}function bb(a,b,c,d,f,g){if(null!=a)
{if(Array.isArray(a))a=f&&0==a.length&&B(a)&1?void 0:g&&B(a)&2?a:cb(a,b,c,void 0!
==d,f,g);else if(F(a)){var e={},h;for(h in a)e[h]=bb(a[h],b,c,d,f,g);a=e}else
a=b(a,d);return a}}
function cb(a,b,c,d,f,g){var e=d||c?B(a):0;d=d?!!(e&32):void
0;a=Array.prototype.slice.call(a);for(var h=0;h<a.length;h+
+)a[h]=bb(a[h],b,c,d,f,g);c&&c(e,a);return a}function db(a){return a.J===La?
a.toJSON():$a(a)};function eb(a,b,c){c=void 0===c?Ja:c;if(null!=a){if(Ba&&a
instanceof Uint8Array)return b?a:new Uint8Array(a);if(Array.isArray(a)){var
d=B(a);if(d&2)return a;b&&(b=0===d||!!(d&32)&&!(d&64||!(d&16)));return b?(C(a,(d|
34)&-12293),a):cb(a,eb,d&4?Ja:c,!0,!1,!0)}a.J===La&&(c=a.l,d=E(c),a=d&2?
a:Wa(a.constructor,fb(c,d,!0)));return a}}function fb(a,b,c){var d=c||b&2?
Ja:Ia,f=!!(b&32);a=ab(a,b,function(g){return eb(g,f,d)});Fa(a,32|(c?2:0));return
a};Object.freeze({});function gb(a,b){a=a.l;return hb(a,E(a),b)}function
hb(a,b,c,d){if(-1===c)return null;if(c>=Ka(b)){if(b&256)return a[a.length-1]
[c]}else{var f=a.length;if(d&&b&256&&(d=a[f-1][c],null!=d))return d;b=c+(+!!
(b&512)-1);if(b<f)return a[b]}}function ib(a,b,c,d,f){var g=Ka(b);if(c>=g||f)
{f=b;if(b&256)g=a[a.length-1];else{if(null==d)return;g=a[g+(+!!(b&512)-1)]={};f|
=256}g[c]=d;f!==b&&C(a,f)}else a[c+(+!!(b&512)-1)]=d,b&256&&(a=a[a.length-1],c in
a&&delete a[c])}
function jb(a,b,c){a=a.l;var d=E(a),f=hb(a,d,1,c);if(null!=f&&"object"===typeof
f&&f.J===La)b=f;else if(Array.isArray(f)){var g=B(f),e=g;0===e&&(e|=d&32);e|=d&2;e!
==g&&C(f,e);b=new b(f)}else b=void 0;b!==f&&null!=b&&ib(a,d,1,b,c);return
b}function kb(a){var b=H;var c=void 0===c?!1:c;b=jb(a,b,c);if(null==b)return
b;a=a.l;var d=E(a);if(!(d&2)){var f=b;var g=f.l,e=E(g);f=e&2?
Wa(f.constructor,fb(g,e,!1)):f;f!==b&&(b=f,ib(a,d,1,b,c))}return b}
function I(a,b){a=gb(a,b);return null==a||"string"===typeof a?a:void 0}function
J(a,b){return null!=a?a:b}function K(a,b){a=gb(a,b);return J(null==a?
a:"boolean"===typeof a||"number"===typeof a?!!a:void 0,!1)}function lb(a,b){var
c=void 0===c?0:c;return J(Sa(gb(a,b)),c)}function M(a,b,c){if(null!=c&&"string"!
==typeof c)throw Error();a=a.l;var d=E(a);if(d&2)throw
Error();ib(a,d,b,c)};function N(a,b,c)
{this.l=Xa(a,b,c)}N.prototype.toJSON=function(){if(Oa)var a=mb(this,this.l,!1);else
a=cb(this.l,db,void 0,void 0,!1,!1),a=mb(this,a,!0);return a};N.prototype.J=La;
function mb(a,b,c){var d=a.constructor.P,f=E(c?a.l:b),g=Ka(f),e=!1;if(d&&Pa){if(!c)
{b=Array.prototype.slice.call(b);var h;if(b.length&&F(h=b[b.length-
1]))for(e=0;e<d.length;e++)if(d[e]>=g){Object.assign(b[b.length-1]={},h);break}e=!
0}g=b;c=!c;h=E(a.l);a=Ka(h);h=+!!(h&512)-1;for(var k,l,m=0;m<d.length;m+
+)if(l=d[m],l<a){l+=h;var p=g[l];null==p?g[l]=c?G:Ha():c&&p!==G&&Ga(p)}else k||
(p=void 0,g.length&&F(p=g[g.length-1])?k=p:g.push(k={})),p=k[l],null==k[l]?k[l]=c?
G:Ha():c&&p!==G&&Ga(p)}k=b.length;if(!k)return b;
var r;if(F(g=b[k-1])){a:{var n=g;c={};a=!1;for(var t in n)
{h=n[t];if(Array.isArray(h)){m=h;if(!Ea&&Qa(h,d,+t)||!
Da&&Na(h)&&0===h.size)h=null;h!=m&&(a=!0)}null!=h?c[t]=h:a=!0}if(a){for(var D in c)
{n=c;break a}n=null}}n!=g&&(r=!0);k--}for(f=+!!(f&512)-1;0<k;k--){t=k-1;g=b[t];if(!
(null==g||!Ea&&Qa(g,d,t-f)||!Da&&Na(g)&&0===g.size))break;var y=!0}if(!r&&!y)return
b;var X;e?
X=b:X=Array.prototype.slice.call(b,0,k);b=X;e&&(b.length=k);n&&b.push(n);return
b};function H(a){this.l=Xa(a)}la(H,N);H.P=[28];function nb(a)
{this.l=Xa(a)}la(nb,N);var ob=function(a){return function(b)
{if(null==b||""==b)b=new a;else{b=JSON.parse(b);if(!Array.isArray(b))throw
Error(void 0);Fa(b,32);b=Wa(a,b)}return b}}(nb);nb.P=[21];function pb(a)
{this.l=Xa(a)}la(pb,N);function qb(a){return a=void 0===a?window:a};function rb(a)
{var b=!1,c;return function(){b||(c=a(),b=!0);return c}};var sb={passive:!
0},tb=rb(function(){var a=!1;try{var b=Object.defineProperty({},"passive",
{get:function(){a=!0}});v.addEventListener("test",null,b)}catch(c){}return
a});function ub(a){return a?a.passive&&tb()?a:a.capture||!1:!1}function O(a,b,c,d)
{a.addEventListener&&a.addEventListener(b,c,ub(d))};var vb;function wb(a)
{this.g=a}wb.prototype.toString=function(){return this.g+""};var xb={};function
Q(a){var b=document;return"string"===typeof a?b.getElementById(a):a}function yb(a)
{var b=document;b.getElementsByClassName?a=b.getElementsByClassName(a)[0]:
(b=document,a=b.querySelectorAll&&b.querySelector&&a?
b.querySelector(a?"."+a:""):zb(b,a)[0]||null);return a||null}
function zb(a,b){var c,d;if(a.querySelectorAll&&a.querySelector&&b)return
a.querySelectorAll(b?"."+b:"");if(b&&a.getElementsByClassName){var
f=a.getElementsByClassName(b);return f}f=a.getElementsByTagName("*");if(b){var
g={};for(c=d=0;a=f[c];c++){var e=a.className,h;if(h="function"==typeof
e.split)h=0<=va(e.split(/\s+/),b);h&&(g[d++]=a)}g.length=d;return g}return
f}function Ab(a){a&&a.parentNode&&a.parentNode.removeChild(a)};var Bb=RegExp("^(?:
([^:/?#.]+):)?(?://(?:([^\\\\/?#]*)@)?([^\\\\/?#]*?)(?::([0-9]+))?(?=[\\\\/?#]|$))?
([^?#]+)?(?:\\?([^#]*))?(?:#([\\s\\S]*))?$"),Cb=/#|$/;function Db(a,b){if(a)for(var
c in a)Object.prototype.hasOwnProperty.call(a,c)&&b(a[c],c,a)}function R(a)
{a.preventDefault?a.preventDefault():a.returnValue=!1}function Eb(a,b){b=void
0===b?document:b;return b.createElement(String(a).toLowerCase())};function
Fb(a,b,c,d){Gb(a,b,void 0===c?null:c,void 0===d?!1:d)}
function Gb(a,b,c,d){var f=!1;f=void 0===f?!1:f;a.google_image_requests||
(a.google_image_requests=[]);var g=Eb("IMG",a.document);if(c||d){var e=function(h)
{c&&c(h);if(d){h=a.google_image_requests;var
k=va(h,g);0<=k&&Array.prototype.splice.call(h,k,1)}g.removeEventListener&&g.removeE
ventListener("load",e,ub());g.removeEventListener&&g.removeEventListener("error",e,
ub())};O(g,"load",e);O(g,"error",e)}f&&(g.attributionSrc="");g.src=b;a.google_image
_requests.push(g)};var Hb=0;function Ib(a){return(a=Jb(a))&&a.getAttribute("data-
jc-version")||"unknown"}function Jb(a){var b=document.currentScript;return(b=void
0===b?null:b)&&b.getAttribute("data-jc")===String(a)?
b:document.querySelector('[data-jc="'+a+'"]')}
function Kb(){var a=void 0===a?.01:a;if(!(Math.random()>a)){var
b=Jb(60);a="https://"+(b&&"true"===b.getAttribute("data-jc-
rcd")?"pagead2.googlesyndication-cn.com":"pagead2.googlesyndication.com")+"/
pagead/gen_204?id=jca&jc=60&version="+Ib(60)+"&sample="+a;b=window;var c=void
0===c?!1:c;var
d;if(d=b.navigator)d=b.navigator.userAgent,d=/Chrome/.test(d)&&!/Edge/.test(d)?!0:!
1;d&&b.navigator.sendBeacon?b.navigator.sendBeacon(a):Fb(b,a,void 0,c)}};var
Lb=document,S=window;function Mb(a){return"string"==typeof a.className?
a.className:a.getAttribute&&a.getAttribute("class")||""}function Rb(a,b)
{a.classList?b=a.classList.contains(b):(a=a.classList?a.classList:Mb(a).match(/\
S+/g)||[],b=0<=va(a,b));return b}function T(a,b)
{if(a.classList)a.classList.add(b);else if(!Rb(a,b)){var c=Mb(a);b=c+(0<c.length?"
"+b:b);"string"==typeof a.className?
a.className=b:a.setAttribute&&a.setAttribute("class",b)}};function Sb(a)
{this.serializedAttributionData=a.toJSON();var
b=a.l;this.g=Wa(a.constructor,fb(b,E(b),!1));this.isMutableImpression=void 0!
==jb(this.g,H,!1)&&!!K(kb(this.g),33);this.Z=!!
K(this.g,11);this.hasUserFeedbackData=!!this.g&&void 0!==jb(this.g,H,!1);this.T=!!
K(this.g,4);this.W=!!K(this.g,6);this.S=!!
K(this.g,13);lb(this.g,8);this.creativeIndexSuffix=1<lb(this.g,8)?
lb(this.g,7).toString():"";null!
=I(this.g,34)&&(this.creativeIndexSuffix=J(I(this.g,34),"")
+"_"+this.creativeIndexSuffix);this.aa=
!!K(this.g,17);this.Y=!!K(this.g,18);this.R=!!K(this.g,14);this.F=!!
K(this.g,15);this.ba=!!
K(this.g,31);this.X=1==K(this.g,9);this.openAttributionInline=1==K(this.g,10);this.
isMobileDevice=!!K(this.g,12);this.A=null;this.V=(a=Lb.querySelector("[data-
slide]"))?"true"===a.getAttribute("data-slide"):!1;(this.H=1<lb(this.g,8))&&void
0===S.goog_multislot_cache&&(S.goog_multislot_cache={});if(this.H&&!this.V)
{if(a=S.goog_multislot_cache.hd,void 0===a){a=!1;if(b=Lb.querySelector("[data-
dim]"))if(b=b.getBoundingClientRect(),
150<=b.right-b.left&&150<=b.bottom-b.top)a=!1;else{var
c=document.body.getBoundingClientRect();150>(1>=Math.abs(c.left-
b.left)&&1>=Math.abs(c.right-b.right)?b.bottom-b.top:b.right-b.left)&&(a=!0)}else
a=!1;window.goog_multislot_cache.hd=a}}else a=!
1;this.G=a;this.B=Q("abgcp"+this.creativeIndexSuffix);this.v=Q("abgc"+this.creative
IndexSuffix);this.h=Q("abgs"+this.creativeIndexSuffix);Q("abgl"+this.creativeIndexS
uffix);this.u=Q("abgb"+this.creativeIndexSuffix);this.D=Q("abgac"+this.creativeInde
xSuffix);
Q("mute_panel"+this.creativeIndexSuffix);this.C=yb("goog_delegate_attribution"+this
.creativeIndexSuffix);this.isDelegateAttributionActive=!!this.C&&!!this.R&&!
yb("goog_delegate_disabled")&&!
this.F;if(this.h)a:for(a=this.h,b=a.childNodes,c=0;c<b.length;c++){var
d=b.item(c);if("undefined"!=typeof d.tagName&&"A"==d.tagName.toUpperCase())
{a=d;break a}}else a=null;this.m=a;this.j=this.isDelegateAttributionActive?
this.C:Q("cbb"+this.creativeIndexSuffix);this.U=this.G?"0"===this.creativeIndexSuff
ix:!0;this.enableDelegateDismissableMenu=
!!
this.j&&Rb(this.j,"goog_dismissable_menu");this.o=null;this.K=0;this.i=this.isDeleg
ateAttributionActive?this.C:this.W&&this.B?this.B:this.v;this.autoExpandOnLoad=!!
K(this.g,19);this.adbadgeEnabled=!!K(this.g,24);this.enableNativeJakeUi=!!
K(this.g,27)};function Tb(a,b){if(!a)throw Error("bad conv util ctor
args");this.g=a;this.h=b};function U(a,b){a&&Db(b,function(c,d)
{a.style[d]=c})};function Ub(a,b){var c=void 0===c?
{}:c;this.error=a;this.context=b.context;this.msg=b.message||"";this.id=b.id||"jser
ror";this.meta=c};var Vb=RegExp("^https?://(\\w|-)+\\.cdn\\.ampproject\\.(net|org)
(\\?|/|$)");function Wb(a,b){this.g=a;this.h=b}function Xb(a,b)
{this.url=a;this.N=!!b;this.depth=null};var Yb=null;function Zb(){var a=void 0===a?
v:a;return(a=a.performance)&&a.now&&a.timing?Math.floor(a.now()
+a.timing.navigationStart):Date.now()}function $b(){var a=void 0===a?
v:a;return(a=a.performance)&&a.now?a.now():null};function ac(a,b){var c=$b()||
Zb();this.label=a;this.type=b;this.value=c;this.duration=0;this.taskId=this.slotId=
void 0;this.uniqueId=Math.random()};var V=v.performance,bc=!!
(V&&V.mark&&V.measure&&V.clearMarks),cc=rb(function(){var a;if(a=bc){var
b;if(null===Yb){Yb="";try{a="";try{a=v.top.location.hash}catch(c)
{a=v.location.hash}a&&(Yb=(b=a.match(/\bdeid=([\d,]+)/))?b[1]:"")}catch(c)
{}}b=Yb;a=!!b.indexOf&&0<=b.indexOf("1337")}return a});
function dc(){var a=window;this.h=[];this.i=a||v;var
b=null;a&&(a.google_js_reporting_queue=a.google_js_reporting_queue||
[],this.h=a.google_js_reporting_queue,b=a.google_measure_js_timing);this.g=cc()||
(null!=b?b:1>Math.random())}function ec(a)
{a&&V&&cc()&&(V.clearMarks("goog_"+a.label+"_"+a.uniqueId+"_start"),V.clearMarks("g
oog_"+a.label+"_"+a.uniqueId+"_end"))}dc.prototype.start=function(a,b){if(!
this.g)return null;a=new
ac(a,b);b="goog_"+a.label+"_"+a.uniqueId+"_start";V&&cc()&&V.mark(b);return a};
dc.prototype.end=function(a){if(this.g&&"number"===typeof a.value)
{a.duration=($b()||Zb())-a.value;var
b="goog_"+a.label+"_"+a.uniqueId+"_end";V&&cc()&&V.mark(b);!this.g||
2048<this.h.length||this.h.push(a)}};function fc()
{this.i="&";this.h={};this.j=0;this.g=[]}function gc(a,b){var
c={};c[a]=b;return[c]}function hc(a,b,c,d,f){var g=[];Db(a,function(e,h)
{(e=ic(e,b,c,d,f))&&g.push(h+"="+e)});return g.join(b)}
function ic(a,b,c,d,f){if(null==a)return"";b=b||"&";c=c||",$";"string"==typeof
c&&(c=c.split(""));if(a instanceof Array){if(d=d||0,d<c.length){for(var
g=[],e=0;e<a.length;e++)g.push(ic(a[e],b,c,d+1,f));return g.join(c[d])}}else
if("object"==typeof a)return f=f||0,2>f?
encodeURIComponent(hc(a,b,c,d,f+1)):"...";return encodeURIComponent(String(a))}
function jc(a,b){var c="https://pagead2.googlesyndication.com"+b,d=kc(a)-
b.length;if(0>d)return"";a.g.sort(function(m,p){return m-p});b=null;for(var
f="",g=0;g<a.g.length;g++)for(var e=a.g[g],h=a.h[e],k=0;k<h.length;k++){if(!d)
{b=null==b?e:b;break}var l=hc(h[k],a.i,",$");if(l){l=f+l;if(d>=l.length){d-
=l.length;c+=l;f=a.i;break}b=null==b?e:b}}a="";null!=b&&(a=f+"trn="+b);return
c+a}function kc(a){var b=1,c;for(c in a.h)b=c.length>b?c.length:b;return 3997-b-
a.i.length-1};function lc(){var a=mc;this.pinger=nc;this.g=void 0===a?
null:a;this.h=null;this.i=!1;this.m=this.j}function oc(a,b){var
c=pc;try{if(c.g&&c.g.g){var d=c.g.start(a.toString(),3);var f=b();c.g.end(d)}else
f=b()}catch(h){b=!0;try{ec(d),b=c.m(a,new Ub(h,{message:qc(h)}),void 0,void
0)}catch(k){c.j(217,k)}if(b){var g,e;null==(g=window.console)||null==(e=g.error)||
e.call(g,h)}else throw h;}return f}
function rc(a,b){return function(){var c=ma.apply(0,arguments);return
oc(a,function(){return b.apply(void 0,c)})}}
lc.prototype.j=function(a,b,c,d,f){f=f||"jserror";try{var g=new
fc;g.g.push(1);g.h[1]=gc("context",a);b.error&&b.meta&&b.id||(b=new Ub(b,
{message:qc(b)}));if(b.msg){var
e=b.msg.substring(0,512);g.g.push(2);g.h[2]=gc("msg",e)}var h=b.meta||
{};if(this.h)try{this.h(h)}catch(P){}if(d)try{d(h)}catch(P)
{}b=[h];g.g.push(3);g.h[3]=b;d=v;b=[];e=null;do{var k=d;try{var l;if(l=!!k&&null!
=k.location.href)b:{try{xa(k.foo);l=!0;break b}catch(P){}l=!1}var m=l}catch(P){m=!
1}if(m){var p=k.location.href;e=k.document&&
k.document.referrer||null}else p=e,e=null;b.push(new
Xb(p||""));try{d=k.parent}catch(P){d=null}}while(d&&k!=d);p=0;for(var r=b.length-
1;p<=r;++p)b[p].depth=r-
p;k=v;if(k.location&&k.location.ancestorOrigins&&k.location.ancestorOrigins.length=
=b.length-1)for(r=1;r<b.length;++r){var n=b[r];n.url||
(n.url=k.location.ancestorOrigins[r-1]||"",n.N=!0)}var t=new Xb(v.location.href,!
1);k=null;var D=b.length-1;for(n=D;0<=n;--n){var y=b[n];!
k&&Vb.test(y.url)&&(k=y);if(y.url&&!y.N){t=y;break}}y=null;var X=b.length&&
b[D].url;0!=t.depth&&X&&(y=b[D]);var L=new Wb(t,y);if(L.h){var
Gc=L.h.url||"";g.g.push(4);g.h[4]=gc("top",Gc)}var Ua={url:L.g.url||""};if(L.g.url)
{var
Va=L.g.url.match(Bb),Nb=Va[1],Ob=Va[3],Pb=Va[4];t="";Nb&&(t+=Nb+":");Ob&&(t+="//",t
+=Ob,Pb&&(t+=":"+Pb));var Qb=t}else Qb="";Ua=[Ua,
{url:Qb}];g.g.push(5);g.h[5]=Ua;sc(this.pinger,f,g,this.i,c)}catch(P)
{try{sc(this.pinger,f,
{context:"ecmserr",rctx:a,msg:qc(P),url:L&&L.g.url},this.i,c)}catch(Uc){}}return!
0};
function qc(a){var b=a.toString();a.name&&-1==b.indexOf(a.name)&&(b+=":
"+a.name);a.message&&-1==b.indexOf(a.message)&&(b+=": "+a.message);if(a.stack)
{a=a.stack;var c=b;try{-1==a.indexOf(c)&&(a=c+"\n"+a);for(var d;a!
=d;)d=a,a=a.replace(RegExp("((https?:/..*/)[^/:]*:\\d+(?:.|\n)*)\\
2"),"$1");b=a.replace(RegExp("\n *","g"),"\n")}catch(f){b=c}}return b};function
tc(){this.g=Math.random()}function uc(){var
a=nc,b=window.google_srt;0<=b&&1>=b&&(a.g=b)}function sc(a,b,c,d,f){if(((void
0===d?0:d)?a.g:Math.random())<(f||.01))try{if(c instanceof fc)var g=c;else g=new
fc,Db(c,function(h,k){var l=g,m=l.j++;h=gc(k,h);l.g.push(m);l.h[m]=h});var
e=jc(g,"/pagead/gen_204?id="+b+"&");e&&Fb(v,e)}catch(h){}};var nc,pc,mc=new
dc;function vc(){if(!window.google_measure_js_timing){var a=mc;a.g=!1;a.h!
=a.i.google_js_reporting_queue&&(cc()&&wa(a.h,ec),a.h.length=0)}}(function(a)
{nc=null!=a?a:new tc;"number"!==typeof
window.google_srt&&(window.google_srt=Math.random());uc();pc=new
lc;pc.h=function(b){var c=Hb;0!==c&&(b.jc=String(c),b.shv=Ib(c))};pc.i=!
0;"complete"==window.document.readyState?vc():mc.g&&O(window,"load",function()
{vc()})})();function W(a,b){return rc(a,b)};function wc(a,b){var
c=this;this.g=a;this.h=b;this.g.aa||(this.j=!1,this.i=null,!this.g.G||
this.g.adbadgeEnabled||this.g.U?xc(this):
(a={display:"none"},b={width:"15px",height:"15px"},this.g.isMobileDevice?
(U(this.g.u,a),U(this.g.h,a),U(this.g.B,b),U(this.g.v,b)):U(this.g.v,a)),yc(this),t
his.g.enableNativeJakeUi&&T(this.g.D,"abgnac"),this.g.isDelegateAttributionActive?
(T(document.body,"goog_delegate_active"),T(document.body,"jaa")):(!
this.g.isMutableImpression&&this.g.j&&Ab(this.g.j),setTimeout(function()
{T(document.body,
"jar")},this.g.S?
750:100)),this.g.F&&T(document.body,"goog_delegate_disabled"),this.g.autoExpandOnLo
ad&&S.addEventListener("load",function(){return c.h()}))}
function yc(a){if(a.g.Z)O(a.g.i,"click",W(365,function(c){var
d=S.goog_interstitial_display;d&&(d(c),c&&(c.stopPropagation(),c.preventDefault()))
}));else if(a.g.isMutableImpression&&a.g.isMobileDevice)O(a.g.i,"click",function()
{return a.h()});else if(a.g.isMutableImpression&&!
a.g.isMobileDevice&&(a.g.j&&(O(a.g.j,"click",function(){return
a.h()}),O(a.g.j,"keydown",function(c){"Enter"!==c.code&&"Space"!==c.code||
a.h()})),a.g.ba&&a.g.h&&O(a.g.h,"click",function(){return
a.h()})),a.g.T)zc(a);else{O(a.g.i,
"mouseover",W(367,function(){return zc(a)}));O(a.g.i,"mouseout",W(369,function()
{return Ac(a,500)}));O(a.g.i,"touchstart",W(368,function(){return zc(a)}),sb);var
b=W(370,function(){return
Ac(a,4E3)});O(a.g.i,"mouseup",b);O(a.g.i,"touchend",b);O(a.g.i,"touchcancel",b);a.g
.m&&O(a.g.m,"click",W(371,function(c){return a.preventDefault(c)}))}}
function xc(a){if(a.g.m&&a.g.Y){var b=kb(a.g.g);b&&null!=I(b,5)&&null!
=I(b,6)&&(a.i=new Tb(J(I(b,5),""),J(I(b,19),"")));O(a.g.m,"click",W(452,function()
{if(!a.j&&(a.j=!0,a.i)){var c=a.i;var d=c.g;var f=d.search(Cb),g;b:
{for(g=0;0<=(g=d.indexOf("ad_signals",g))&&g<f;){var e=d.charCodeAt(g-1);if(38==e||
63==e)if(e=d.charCodeAt(g+10),!e||61==e||38==e||35==e)break b;g+=11}g=-
1}if(0>g)d=null;else{e=d.indexOf("&",g);if(0>e||
e>f)e=f;d=decodeURIComponent(d.slice(g+11,-1!==e?e:0).replace(/\+/g," "))}if(d){d=
{L:d,label:"closebutton_whythisad_click",O:"1",M:""};var h=void 0===h?v:h;c=new
pb;null!=d&&(null!=d.L&&M(c,1,d.L),null!=d.ca&&M(c,3,d.ca),null!
=d.label&&M(c,6,d.label),null!=d.O&&M(c,7,d.O),null!=d.M&&M(c,8,d.M));if(null!
=(h=qb(h).fence)){d=h.reportEvent;a:{Oa=!0;try{var
k=JSON.stringify(c.toJSON(),Za);break a}finally{Oa=!1}k=void 0}d.call(h,
{eventType:"interaction",eventData:k,destination:["buyer"]})}}else
k=c.g+"&label=closebutton_whythisad_click",k+="&label_instance=1",c.h&&(k+="&cid="+
c.h),Fb(window,
k)}}))}}function Bc(a){var b=a.g.D;void 0!
==b&&(b.style.display="block",a.g.enableNativeJakeUi&&window.requestAnimationFrame(
function(){T(b,"abgacfo")}))}function zc(a)
{window.clearTimeout(a.g.o);a.g.o=null;a.g.h&&"block"==a.g.h.style.display||
(a.g.K=Date.now(),a.g.u&&a.g.h&&(a.g.u.style.display="none",a.g.h.style.display="bl
ock"))}function Ac(a,b)
{window.clearTimeout(a.g.o);a.g.o=window.setTimeout(function(){return Cc(a)},b)}
function Cc(a)
{window.clearTimeout(a.g.o);a.g.o=null;a.g.u&&a.g.h&&(a.g.u.style.display="block",a
.g.h.style.display="none")}
wc.prototype.preventDefault=function(a)
{if(this.g.h&&"block"==this.g.h.style.display&&500>Date.now()-this.g.K)R(a);else
if(this.g.openAttributionInline){var b=this.g.m.getAttribute("href");window.adSlot?
window.adSlot.openAttribution(b)&&R(a):window.openAttribution&&(window.openAttribut
ion(b),R(a))}else this.g.X&&(b=this.g.m.getAttribute("href"),window.adSlot?
window.adSlot.openSystemBrowser(b)&&R(a):window.openSystemBrowser&&(window.openSyst
emBrowser(b),R(a)))};function Dc(a){var b=Ec,c=this;if(!b)throw Error("bad
ctor");this.i=b;this.h=a;this.g=!1;yb("goog_delegate_deferred")?void 0!
==S.goog_delegate_deferred_token?Fc(this):(a=function()
{Fc(c)},S.goog_delegate_deferred_token=a,setTimeout(a,5E3)):Fc(this)}function Fc(a)
{if(!a.g&&(a.g=!0,S.goog_delegate_deferred_token=void 0,a.h)){var
b=a.i;a=ob(JSON.stringify(a.h));if(!a)throw Error("bad attrdata");a=new Sb(a);new
b(a)}};function Hc(){var a=this;this.promise=new Promise(function(b,c)
{a.resolve=b;a.reject=c})};function Ic(){var a=new
Hc;return{promise:a.promise,resolve:a.resolve}};/*

SPDX-License-Identifier: Apache-2.0
*/
function Jc(a,b){b=void 0===b?function(){}:b;a.google_llp||
(a.google_llp={});a=a.google_llp;var c=a[5];if(c)return c;c=Ic();a[5]=c;b();return
c}
function Kc(a,b){return Jc(a,function(){var c=a.document,d=Eb("SCRIPT",c);d.src=b
instanceof wb&&b.constructor===wb?b.g:"type_error:TrustedResourceUrl";var
f,g,e=null==(g=(f=(d.ownerDocument&&d.ownerDocument.defaultView||
window).document).querySelector)?void 0:g.call(f,"script[nonce]");(f=e?e.nonce||
e.getAttribute("nonce")||"":"")&&d.setAttribute("nonce",f);
(c=c.getElementsByTagName("script")
[0])&&c.parentNode&&c.parentNode.insertBefore(d,c)}).promise};function Lc(a)
{a=null===a?"null":void 0===a?"undefined":a;if(void 0===vb){var b=null;var
c=v.trustedTypes;if(c&&c.createPolicy){try{b=c.createPolicy("goog#html",
{createHTML:pa,createScript:pa,createScriptURL:pa})}catch(d)
{v.console&&v.console.error(d.message)}vb=b}else vb=b}a=(b=vb)?
b.createScriptURL(a):a;return new wb(a,xb)};function Ec(a){var
b=this;this.g=a;this.h=new wc(this.g,W(359,function(){return Mc(b)}))}
function Mc(a){var
b=qb();b.fence&&b.fence.setReportEventDataForAutomaticBeacons&&b.fence.setReportEve
ntDataForAutomaticBeacons({eventType:"reserved.top_navigation",eventData:"mute_butt
on_click",destination:[]});a.g.A?a.g.A.expandAttributionCard():(oc(373,function()
{Cc(a.h);Bc(a.h)}),Kc(window,Lc("https://pagead2.googlesyndication.com/pagead/js/"+
(J(I(a.g.g,33),"")+"/abg_survey.js"))).then(function(c)
{c.createAttributionCard(a.g);a.g.A=c;c.expandAttributionCard()}),Kb())}
function Nc(a){var b=[a];b=void 0===b?[]:b;v.google_logging_queue||
(v.google_logging_queue=[]);v.google_logging_queue.push([11,b]);new
Dc(a)};Hb=60;var Oc=Jb(60);if(null==Oc)throw Error("JSC not found 60");for(var
Pc={},Qc=Oc.attributes,Rc=Qc.length-1;0<=Rc;Rc--){var
Sc=Qc[Rc].name;0===Sc.indexOf("data-
jcp-")&&(Pc[Sc.substring(9)]=Qc[Rc].value)}if(Pc["attribution-
data"])Nc(JSON.parse(Pc["attribution-data"]));else{var
Tc=["buildAttribution"],Y=v;Tc[0]in Y||"undefined"==typeof Y.execScript||
Y.execScript("var "+Tc[0]);for(var Z;Tc.length&&(Z=Tc.shift());)Tc.length||void
0===Nc?Y[Z]&&Y[Z]!==Object.prototype[Z]?Y=Y[Z]:Y=Y[Z]={}:Y[Z]=Nc};}).call(this);

You might also like