"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)([0xc000, ]); /* Copyright The Closure Library Authors. SPDX-License-Identifier: Apache-2.0 */ var aa=function(a){p.setTimeout(function(){throw a;},0)},ba=function(a,b){a.__closure__error__context__984382||(a.__closure__error__context__984382={});a.__closure__error__context__984382.severity=b},q=function(a){a=Error(a);ba(a,"warning");return a},r=function(a,b,c){return typeof Symbol==="function"&&typeof Symbol()==="symbol"?(c===void 0?0:c)&&Symbol.for&&a?Symbol.for(a):a!=null?Symbol(a):Symbol():b},y=function(a,b){u||w in a||ca(a,da);a[w]|=b},z=function(a,b){u||w in a||ca(a,da);a[w]=b},A=function(){return typeof BigInt=== "function"},ea=function(a,b){return b===void 0?a.s!==C&&!!(2&(a.j[w]|0)):!!(2&b)&&a.s!==C},D=function(a){a.L=!0;return a},F=function(a){var b=a;if(fa(b)){if(!/^\s*(?:-?[1-9]\d*|0)?\s*$/.test(b))throw Error(String(b));}else if(ha(b)&&!Number.isSafeInteger(b))throw Error(String(b));return E?BigInt(a):a=ia(a)?a?"1":"0":fa(a)?a.trim()||"0":String(a)},ja=function(a,b){if(a.length>b.length)return!1;if(a.lengthe)return!1;if(f>>0;G=b;H=(a-b)/4294967296>>>0},K=function(a){if(a<0){ka(-a);var b=I(J(G,H));a=b.next().value;b=b.next().value;G=a>>>0;H=b>>>0}else ka(a)},L=function(a,b){b>>>=0;a>>>=0;if(b<=2097151)var c=""+(4294967296*b+a);else A()?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+la(c)+la(a));return c},la=function(a){a=String(a);return"0000000".slice(a.length)+ a},ma=function(){var a=G,b=H;b&2147483648?A()?a=""+(BigInt(b|0)<>>0)):(b=I(J(a,b)),a=b.next().value,b=b.next().value,a="-"+L(a,b)):a=L(a,b);return a},J=function(a,b){b=~b;a?a=~a+1:b+=1;return[a,b]},pa=function(a){switch(typeof a){case "bigint":return!0;case "number":return na(a);case "string":return oa.test(a);default:return!1}},va=function(a){var b=0;b=b===void 0?0:b;if(!pa(a))throw q("int64");var c=typeof a;switch(b){case 512:switch(c){case "string":return qa(a);case "bigint":return String(M(64, a));default:return ra(a)}case 1024:switch(c){case "string":return sa(a);case "bigint":return F(M(64,a));default:return ta(a)}case 0:switch(c){case "string":return qa(a);case "bigint":return F(M(64,a));default:return ua(a)}default:throw Error("Unknown format requested type for int64");}},wa=function(a){var b=a.length;return a[0]==="-"?b<20?!0:b===20&&Number(a.substring(0,7))>-922337:b<19?!0:b===19&&Number(a.substring(0,6))<922337},xa=function(a){if(wa(a))return a;if(a.length<16)K(Number(a));else if(A())a= BigInt(a),G=Number(a&BigInt(4294967295))>>>0,H=Number(a>>BigInt(32)&BigInt(4294967295));else{var b=+(a[0]==="-");H=G=0;for(var c=a.length,f=b,e=(c-b)%6+b;e<=c;f=e,e+=6)f=Number(a.slice(f,e)),H*=1E6,G=G*1E6+f,G>=4294967296&&(H+=Math.trunc(G/4294967296),H>>>=0,G>>>=0);b&&(b=I(J(G,H)),a=b.next().value,b=b.next().value,G=a,H=b)}return ma()},ua=function(a){a=N(a);if(!O(a)){K(a);var b=G,c=H;if(a=c&2147483648)b=~b+1>>>0,c=~c>>>0,b==0&&(c=c+1>>>0);var f=c*4294967296+(b>>>0);b=Number.isSafeInteger(f)?f:L(b, c);a=typeof b==="number"?a?-b:b:a?"-"+b:b}return a},ra=function(a){a=N(a);if(O(a))a=String(a);else{var b=String(a);wa(b)?a=b:(K(a),a=ma())}return a},qa=function(a){var b=N(Number(a));if(O(b))return String(b);b=a.indexOf(".");b!==-1&&(a=a.substring(0,b));return xa(a)},sa=function(a){var b=N(Number(a));if(O(b))return F(b);b=a.indexOf(".");b!==-1&&(a=a.substring(0,b));return A()?F(M(64,BigInt(a))):F(xa(a))},ta=function(a){return O(a)?F(ua(a)):F(ra(a))},ya=function(a){return a},P=function(a,b,c,f){var e= f!==void 0;f=!!f;var l=[],d=a.length,g=4294967295,h=!1,k=!!(b&64),n=k?b&128?0:-1:void 0;if(!(b&1)){var t=d&&a[d-1];t!=null&&typeof t==="object"&&t.constructor===Object?(d--,g=d):t=void 0;if(k&&!(b&128)&&!e){h=!0;var m;g=((m=za)!=null?m:ya)(g-n,n,a,t)+n}}b=void 0;for(e=0;e=g){var v=e-n,B=void 0;((B=b)!=null?B:b={})[v]=m}else l[e]=m;if(t)for(var x in t)a=t[x],a!=null&&(a=c(a,f))!=null&&(d=+x,e=void 0,k&&!Number.isNaN(d)&&(e=d+n)=1024)throw Error("l");for(var h in g)l=+h,l1024)throw Error("m");e=e&-8380417| (h&1023)<<13}}}e|=64;f===0&&(e|=2048);z(a,e);return a},Ca=function(){if(Da!=null){var a;var b=(a=Ea)!=null?a:Ea={};a=b[Da]||0;a>=5||(b[Da]=a+1,b=Error(),ba(b,"incident"),aa(b))}},Ga=function(a,b){if(typeof a!=="object")return a;if(Array.isArray(a)){var c=a[w]|0;a.length===0&&c&1?a=void 0:c&2||(!b||4096&c||16&c?a=Fa(a,c,!1,b&&!(c&16)):(y(a,34),c&4&&Object.freeze(a)));return a}if(a!=null&&a[Q]===R){b=a.j;c=b[w]|0;if(!ea(a,c)){if(c&2)var f=!0;else c&32&&!(c&4096)?(z(b,c|2),a.s=C,f=!0):f=!1;f?(a=new a.constructor(b), a.I=C):a=Fa(b,c)}return a}},Fa=function(a,b,c,f){f!=null||(f=!!(34&b));a=P(a,b,Ga,f);f=32;c&&(f|=2);b=b&8380609|f;z(a,b);return a},Ha=function(a){return Aa(a)?Number(a):String(a)},Ia=function(a){var b=0;return function(){return b=Ua&&a<=Va:a[0]==="-"?ja(a,Wa):ja(a,Xa)}),Wa=Number.MIN_SAFE_INTEGER.toString(),Ua=E?BigInt(Number.MIN_SAFE_INTEGER):void 0,Xa=Number.MAX_SAFE_INTEGER.toString(),Va=E?BigInt(Number.MAX_SAFE_INTEGER):void 0;var G=0,H=0;var M=typeof BigInt==="function"?BigInt.asIntN:void 0,O=Number.isSafeInteger,na=Number.isFinite,N=Math.trunc,oa=/^-?([1-9][0-9]*|0)(\.[0-9]+)?$/;var za;var Ya=F(0),Za=function(a,b,c){if(a.s===C){var f=a.j;f=Fa(f,f[w]|0);y(f,2048);a.j=f;a.s=void 0;a.I=void 0;f=!0}else f=!1;if(!f&&ea(a,a.j[w]|0))throw Error();f=a.j;a:{var e=f[w]|0,l=b+-1,d=f.length-1;if(d>=0&&l>=d){var g=f[d];if(g!=null&&typeof g==="object"&&g.constructor===Object){g[b]=c;break a}}l<=d?f[l]=c:c!==void 0&&(e=(e!=null?e:f[w]|0)>>13&1023||536870912,b>=e?c!=null&&(l={},f[e+-1]=(l[b]=c,l)):f[l]=c)}return a},$a=function(a){var b=void 0;b=b===void 0?Ya:b;var c=a.j;a=1+(Ta?0:-1);var f=c.length- 1;f<1+(Ta?0:-1)?a=void 0:a>=f?(c=c[f],c!=null&&typeof c==="object"&&c.constructor===Object?a=c[1]:a===f?a=c:a=void 0):a=c[a];a=a!==null?a:void 0;f=typeof a;a=a==null?a:f==="bigint"?F(M(64,a)):pa(a)?f==="string"?sa(a):ta(a):void 0;return a!=null?a:b},ab=function(a,b,c){if(c!=null){if(typeof c!=="number")throw q("int32");if(!na(c))throw q("int32");c|=0}Za(a,b,c)};var W=function(a,b,c){this.j=T(a,b,c)};W.prototype.toJSON=function(){return S(this)};W.prototype[Q]=R;W.prototype.toString=function(){return this.j.toString()};var bb=function(a){this.j=T(a)};Ra(bb,W);var cb=function(a){this.j=T(a,0,"identity.hfcr")};Ra(cb,W);var db=function(a){return function(b){if(b==null||b=="")b=new a;else{b=JSON.parse(b);if(!Array.isArray(b))throw Error("n");y(b,32);b=new a(b)}return b}}(cb);var eb=function(a,b,c,f,e){this.m=a;this.i=b;this.l=c;this.h=f;this.g=e};eb.prototype.start=function(){var a=this;if(typeof fetch!=="undefined")if(fb()){var b=gb(),c=Date.now();b&&b>c+this.g*1E3&&(b=Date.now()+this.g*1E3,X(b));var f=function(){hb(a).then(function(){setTimeout(f,a.g*1E3)})};setTimeout(function(){f()},b&&b>c?b-c:0)}else ib(this)}; var ib=function(a){jb(a).then(function(){var b=function(){jb(a).then(function(){setTimeout(b,a.g*1E3)})};setTimeout(function(){b()},a.g*1E3)})},jb=function(a){var b=kb(a);return lb(b).then(function(c){c=mb(Ha($a(c)));c!==a.g&&(a.g=c)}).catch(function(){a.g*=2})},hb=function(a){var b=gb();if(!b||Date.now()>=b){var c=Math.floor(Math.random()*1E3);return new Promise(function(f){setTimeout(function(){var e=gb();!e||Date.now()>=e?f(nb(a)):f()},c)})}return Promise.resolve()},lb=function(a){a={method:"POST", credentials:"same-origin",cache:"no-store",mode:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify(S(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 db(JSON.stringify(JSON.parse(c.substring(5))[0]))})},kb=function(a){var b=new bb;var c=a.m;c=c==null?c:va(c);b=Za(b,2,c);a.i!==0&&ab(b,1,a.i); a.l!==0&&ab(b,3,a.l);a.h!==0&&ab(b,4,a.h);return b},nb=function(a){X(Date.now()+a.g*1E3);var b=kb(a);return lb(b).then(function(c){c=mb(Ha($a(c)));c!==a.g&&(X(Date.now()+c*1E3),a.g=c)}).catch(function(){a.g*=2;X(Date.now()+a.g*1E3)})},fb=function(){try{var a=window.localStorage;if(!a)return!1;a.setItem("cookieRotationStorageAccessTest","1");a.removeItem("cookieRotationStorageAccessTest");return!0}catch(b){return!1}},mb=function(a){a<60&&(a=60);return a},gb=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}},X=function(a){try{window.localStorage.setItem("nextRotationAttemptTs",a.toString())}catch(b){}};for(var ob=function(a,b,c,f,e){(new eb(a,b,c,f,e)).start()},pb=["init"],Y=p,Z;pb.length&&(Z=pb.shift());)pb.length||ob===void 0?Y[Z]&&Y[Z]!==Object.prototype[Z]?Y=Y[Z]:Y=Y[Z]={}:Y[Z]=ob; }catch(e){_._DumpException(e)} }).call(this,this.default_IdentityRotateCookiesHttp); // Google Inc.