"use strict";this.default_IdentityRotateCookiesHttp=this.default_IdentityRotateCookiesHttp||{};(function(_){var window=this; try{ _._F_toggles_initialize=function(a){(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this)._F_toggles=a||[]};(0,_._F_toggles_initialize)([0x183e, ]); /* Copyright The Closure Library Authors. SPDX-License-Identifier: Apache-2.0 */ var q=function(a){return aa?n?n.brands.some(function(b){return(b=b.brand)&&b.indexOf(a)!=-1}):!1:!1},v=function(a){var b;a:{if(b=r.navigator)if(b=b.userAgent)break a;b=""}return b.indexOf(a)!=-1},w=function(){return aa?!!n&&n.brands.length>0:!1},x=function(){return w()?q("Chromium"):(v("Chrome")||v("CriOS"))&&!(w()?0:v("Edge"))||v("Silk")},y=function(a){a=Error(a);a.__closure__error__context__984382||(a.__closure__error__context__984382={});a.__closure__error__context__984382.severity="warning";return a}, z=function(){return typeof BigInt==="function"},ea=function(a){return!(!a||typeof a!=="object"||a.g!==da)},A=function(a){return a!==null&&typeof a==="object"&&!Array.isArray(a)&&a.constructor===Object},D=function(a,b,c){if(!Array.isArray(a)||a.length)return!1;var e=B(a);if(e&1)return!0;if(!(b&&(Array.isArray(b)?b.includes(c):b.has(c))))return!1;C(a,e|1);return!0},fa=function(a){var b=a>>>0;E=b;F=(a-b)/4294967296>>>0},I=function(a){if(a<0){fa(-a);var b=G(H(E,F));a=b.next().value;b=b.next().value;E= a>>>0;F=b>>>0}else fa(a)},ia=function(a,b){b>>>=0;a>>>=0;if(b<=2097151)var c=""+(4294967296*b+a);else z()?c=""+(BigInt(b)<>>24|b<<8)&16777215,b=b>>16&65535,a=(a&16777215)+c*6777216+b*6710656,c+=b*8147497,b*=2,a>=1E7&&(c+=a/1E7>>>0,a%=1E7),c>=1E7&&(b+=c/1E7>>>0,c%=1E7),c=b+ha(c)+ha(a));return c},ha=function(a){a=String(a);return"0000000".slice(a.length)+a},ja=function(){var a=E,b=F;b&2147483648?z()?a=""+(BigInt(b|0)<>>0)):(b=G(H(a,b)),a=b.next().value, b=b.next().value,a="-"+ia(a,b)):a=ia(a,b);return a},H=function(a,b){b=~b;a?a=~a+1:b+=1;return[a,b]},la=function(a){var b=typeof a;return b==="number"?Number.isFinite(a):b!=="string"?!1:ka.test(a)},ma=function(a){return a[0]==="-"?a.length<20?!0:a.length===20&&Number(a.substring(0,7))>-922337:a.length<19?!0:a.length===19&&Number(a.substring(0,6))<922337},na=function(a){a=Math.trunc(a);if(!Number.isSafeInteger(a)){I(a);var b=E,c=F;if(a=c&2147483648)b=~b+1>>>0,c=~c>>>0,b==0&&(c=c+1>>>0);b=c*4294967296+ (b>>>0);a=a?-b:b}return a},oa=function(a){var b=Math.trunc(Number(a));if(Number.isSafeInteger(b))return String(b);b=a.indexOf(".");b!==-1&&(a=a.substring(0,b));if(!ma(a)){if(a.length<16)I(Number(a));else if(z())a=BigInt(a),E=Number(a&BigInt(4294967295))>>>0,F=Number(a>>BigInt(32)&BigInt(4294967295));else{b=+(a[0]==="-");F=E=0;for(var c=a.length,e=b,f=(c-b)%6+b;f<=c;e=f,f+=6)e=Number(a.slice(e,f)),F*=1E6,E=E*1E6+e,E>=4294967296&&(F+=Math.trunc(E/4294967296),F>>>=0,E>>>=0);b&&(b=G(H(E,F)),a=b.next().value, b=b.next().value,E=a,F=b)}a=ja()}return a},K=function(a,b,c){a==null&&(a=J);J=void 0;if(a==null){var e=96;c?(a=[c],e|=512):a=[];b&&(e=e&-16760833|(b&1023)<<14)}else{if(!Array.isArray(a))throw Error("i");e=B(a);if(e&2048)throw Error("j");if(e&64)return a;e|=64;if(c&&(e|=512,c!==a[0]))throw Error("k");a:{c=a;var f=c.length;if(f){var k=f-1;if(A(c[k])){e|=256;b=k-(+!!(e&512)-1);if(b>=1024)throw Error("l");e=e&-16760833|(b&1023)<<14;break a}}if(b){b=Math.max(b,f-(+!!(e&512)-1));if(b>1024)throw Error("m"); e=e&-16760833|(b&1023)<<14}}}C(a,e);return a},qa=function(a,b){return pa(b)},pa=function(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)){if(D(a,void 0,0))return}else if(ra&&a!=null&&a instanceof Uint8Array){if(sa){for(var b="",c=0,e=a.length-10240;c>2];h=b[(h&3)<<4|l>>4];l=b[(l&15)<<2|g>>6];g=b[g&63];c[f++]=d+h+l+g}d=0;g=e;switch(a.length-k){case 2:d=a[k+1],g=b[(d&15)<<2]||e;case 1:a=a[k],c[f]=b[a>>2]+b[(a&3)<<4|d>>4]+g+e}a=c.join("")}return a}}return a},va=function(a,b,c, e,f){if(a!=null){if(Array.isArray(a))a=D(a,void 0,0)?void 0:f&&B(a)&2?a:ua(a,b,c,e!==void 0,f);else if(A(a)){var k={},d;for(d in a)k[d]=va(a[d],b,c,e,f);a=k}else a=b(a,e);return a}},ua=function(a,b,c,e,f){var k=e||c?B(a):0;e=e?!!(k&32):void 0;a=Array.prototype.slice.call(a);for(var d=0;d0;a--){p=a-1;m=g[p];p-=f;if(!(m==null||D(m,e,p)||ea(m)&&m.size===0))break;u=!0}if(g!==b||h||u){if(!c)g=Array.prototype.slice.call(g,0,a);else if(u||h||l)g.length= a;l&&g.push(l)}b=g}return b},za=function(a){var b=0;return function(){return b>14&1023||536870912;if(b>=k){var d=f;if(f&256)var g=e[e.length-1];else{if(c==null)break a;g=e[k+(+!!(f&512)-1)]={};d|=256}g[b]=c;b>14&1023||536870912;1>=e?a=c&256?a[a.length-1][1]:void 0:(c=1+(+!!(c&512)-1),a=c<0||c>=a.length||c>=e?void 0:a[c]); a=a==null?a:la(a)?typeof a==="number"?na(a):oa(a):void 0;return a!=null?a:b},Sa=function(a,b,c){if(c!=null){if(typeof c!=="number")throw y("int32");if(!Number.isFinite(c))throw y("int32");c|=0}Qa(a,b,c)};var M,V=function(a,b,c){this.l=K(a,b,c)};V.prototype.toJSON=function(){return O(this)};var Ta=function(a){try{return M=!0,JSON.stringify(O(a),qa)}finally{M=!1}};V.prototype.G=wa;V.prototype.toString=function(){try{return M=!0,O(this).toString()}finally{M=!1}};var Ua=function(a){this.l=K(a)};Ha(Ua,V);var Va=function(a){this.l=K(a,0,"identity.hfcr")};Ha(Va,V);var Wa=function(a){return function(b){if(b==null||b=="")b=new a;else{b=JSON.parse(b);if(!Array.isArray(b))throw Error("n");Pa(b,32);J=b;b=new a(b);J=void 0}return b}}(Va);var Xa=function(a,b,c,e,f){this.m=a;this.i=b;this.j=c;this.h=e;this.g=f};Xa.prototype.start=function(){var a=this;if(typeof fetch!=="undefined")if(Ya()){var b=Za(),c=Date.now();b&&b>c+this.g*1E3&&(b=Date.now()+this.g*1E3,W(b));var e=function(){$a(a).then(function(){setTimeout(e,a.g*1E3)})};setTimeout(function(){e()},b&&b>c?b-c:0)}else ab(this)}; var ab=function(a){bb(a).then(function(){var b=function(){bb(a).then(function(){setTimeout(b,a.g*1E3)})};setTimeout(function(){b()},a.g*1E3)})},bb=function(a){var b=cb(a);return db(b).then(function(c){c=eb(Ra(c));c!==a.g&&(a.g=c)}).catch(function(){a.g*=2})},$a=function(a){var b=Za();if(!b||Date.now()>=b){var c=Math.floor(Math.random()*1E3);return new Promise(function(e){setTimeout(function(){var f=Za();!f||Date.now()>=f?e(fb(a)):e()},c)})}return Promise.resolve()},db=function(a){a={method:"POST", credentials:"same-origin",cache:"no-store",mode:"same-origin",headers:{"Content-Type":"application/json"},body:Ta(a)};if(typeof AbortController!=="undefined"){var b=new AbortController;setTimeout(function(){b.abort()},3E4);a.signal=b.signal}return fetch(new Request("/RotateCookies",a)).then(function(c){return c.text()}).then(function(c){return Wa(JSON.stringify(JSON.parse(c.substring(5))[0]))})},cb=function(a){var b=new Ua;var c=a.m;if(c!=null){var e=!!e;if(!la(c))throw y("int64");typeof c==="string"? c=oa(c):e?(c=Math.trunc(c),Number.isSafeInteger(c)?c=String(c):(e=String(c),ma(e)?c=e:(I(c),c=ja()))):c=na(c)}b=Qa(b,2,c);a.i!==0&&Sa(b,1,a.i);a.j!==0&&Sa(b,3,a.j);a.h!==0&&Sa(b,4,a.h);return b},fb=function(a){W(Date.now()+a.g*1E3);var b=cb(a);return db(b).then(function(c){c=eb(Ra(c));c!==a.g&&(W(Date.now()+c*1E3),a.g=c)}).catch(function(){a.g*=2;W(Date.now()+a.g*1E3)})},Ya=function(){try{var a=window.localStorage;if(!a)return!1;a.setItem("cookieRotationStorageAccessTest","1");a.removeItem("cookieRotationStorageAccessTest"); return!0}catch(b){return!1}},eb=function(a){a<60&&(a=60);return a},Za=function(){try{var a=window.localStorage.getItem("nextRotationAttemptTs");if(!a)return null;var b=Math.floor(Number(a));return Number.isNaN(b)?null:b}catch(c){return null}},W=function(a){try{window.localStorage.setItem("nextRotationAttemptTs",a.toString())}catch(b){}};var gb=function(a,b,c,e,f){(new Xa(a,b,c,e,f)).start()},X=["init"],Y=r;X[0]in Y||typeof Y.execScript=="undefined"||Y.execScript("var "+X[0]);for(var Z;X.length&&(Z=X.shift());)X.length||gb===void 0?Y[Z]&&Y[Z]!==Object.prototype[Z]?Y=Y[Z]:Y=Y[Z]={}:Y[Z]=gb; }catch(e){_._DumpException(e)} }).call(this,this.default_IdentityRotateCookiesHttp); // Google Inc.