if (self.CavalryLogger) { CavalryLogger.start_js(["Yts98"]); } __d("BandicootSession",[],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g=Object.freeze({ACTIVE:"ACTIVE",INACTIVE:"INACTIVE",CLOSED:"CLOSED"}),h=10*60*1e3,i=14*24*60*60*1e3;function j(a){return Date.now()-a.lastUpdated}function a(a){return!!(typeof a==="object"&&a&&a.lastUpdated&&a.status)}function b(a){if(a.status===g.CLOSED)return!1;else if(a.status===g.INACTIVE&&j(a)>h)return!1;return!0}function c(a){return a.status===g.ACTIVE&&j(a)>h}function d(a){return j(a)>i}e.exports={Status:g,isValidSession:a,isTrackedSession:b,isOrphanSession:d,isCrashedSession:c}}),null); __d("Bandicoot",["invariant","BandicootSession","FBLogger"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();var h=5*1e3,i=h*2,j="Bandicoot:",k=b("BandicootSession").Status,l=b("BandicootSession").isValidSession,m=b("BandicootSession").isTrackedSession,n=b("BandicootSession").isCrashedSession,o=b("BandicootSession").isOrphanSession;function a(){__p&&__p();try{var a=window.localStorage;if(a){var c="__test"+Date.now();a.setItem(c,"");a.removeItem(c)}return a}catch(a){b("FBLogger")("bandicoot").warn("Local storage is full");return null}}var p=a();c=function(){__p&&__p();function a(a){this.$5=j+a,this.$4={},this.$1=this.$7.bind(this),this.sessionID=null,this.sessionStartTime=null,this.storage=p}var c=a.prototype;c.getCrashTimeData=function(){var a=window.performance&&window.performance.memory||{},b=this.sessionStartTime;return{duration:b?Date.now()-b:0,tabs:Object.keys(this.$8()).length,jsHeapSizeLimit:a.jsHeapSizeLimit,totalJSHeapSize:a.totalJSHeapSize,usedJSHeapSize:a.usedJSHeapSize,elementsInDOM:document.getElementsByTagName("*").length,uri:window.location.href}};c.getLogTimeData=function(){return{userAgent:window.navigator.userAgent}};c.logCrash=function(a,c,d){b("FBLogger")("bandicoot").warn("Session %s crashed at %s",a,d)};c.logBrowserUnsupported=function(){b("FBLogger")("bandicoot").warn("Browser not supported")};c.logTrackingError=function(){b("FBLogger")("bandicoot").warn("Failed to record data for current session")};c.startSession=function(){__p&&__p();var a=this;if(!this.storage){this.logBrowserUnsupported();return}if(this.$2)return;this.sessionID||(this.sessionID=Math.random().toString(36).slice(2,9));this.sessionStartTime||(this.sessionStartTime=Date.now());this.$2=setInterval(function(){a.$9()},h);this.$9();document.addEventListener&&document.addEventListener("visibilitychange",this.$1);this.$10()};c.endSession=function(){__p&&__p();if(!this.storage)return;if(!this.$2)return;clearInterval(this.$2);this.$2=null;this.$3||this.$11({status:k.CLOSED});this.sessionID=null;this.sessionStartTime=null;document.removeEventListener&&document.removeEventListener("visibilitychange",this.$1)};c.logKnownCrashes=function(){__p&&__p();var a=this;if(!this.storage)return;if(!this.$2){var b=this.$8();b=this.$12(b,function(b,c){if(n(b)){a.logCrash(c,b,a.getLogTimeData());return null}else return b});this.$13(b)}};c.$14=function(){var a=this.sessionID;a||g(0,663);return a};c.$9=function(){var a=this.$8();this.$15(a);a=this.$16(a);this.$13(a)};c.$15=function(a){var b=this.$14(),c=a[b]?a[b]:{};a[b]=babelHelpers["extends"]({},c,this.getCrashTimeData(),{lastUpdated:Date.now(),status:this.$17()})};c.$12=function(a,b){var c={};Object.keys(a).forEach(function(d){var e=a[d];if(l(e)&&m(e)&&!o(e)){e=b(e,d);e&&(c[d]=e)}});return c};c.$16=function(a){__p&&__p();var b=this;return this.$12(a,function(a,c){__p&&__p();if(n(a)){var d=a.loggerReportTime||0;if(Date.now()-d>i)a.loggerReportTime=Date.now(),a.loggerReportSession=b.$14();else if(a.loggerReportSession==b.$14()){b.logCrash(c,a,b.getLogTimeData());b.$4[c]=!0;return null}}return a})};c.$8=function(a){a=a||this.$5;var c=this.storage.getItem(a)||"{}";try{c=JSON.parse(c)}catch(d){c={},this.storage.removeItem(a),b("FBLogger")("bandicoot").catching(d).warn("Invalid JSON data")}return c};c.$11=function(a){a.lastUpdated=Date.now();var b=this.$8(),c=this.sessionID;c&&b[c]&&(Object.assign(b[c],a),this.$13(b))};c.$13=function(a){a=JSON.stringify(a);try{this.storage.setItem(this.$5,a)}catch(d){a=this.$6;var c=Date.now();(!a||c>a+h)&&(this.logTrackingError(),this.$6=c);try{this.storage.removeItem(this.$5)}catch(a){this.$3=!0,this.endSession(),b("FBLogger")("bandicoot").catching(a).warn("Removing from storage failed")}}};c.$10=function(){for(var a=0;a1?b-1:0),d=1;d0?b:g;d.$LFUCache3=c&&c>0?c:h;d.$LFUCache4();return d}var d=c.prototype;d.$LFUCache4=function(){clearTimeout(this.$LFUCache1),this.$LFUCache1=setTimeout(this.purge.bind(this),this.$LFUCache2*b("DateConsts").SEC_PER_MIN*b("DateConsts").MS_PER_SEC)};d.destroy=function(){clearTimeout(this.$LFUCache1)};d.get=function(b,c){this.has(b)&&this.$LFUCache5(b);return a.prototype.get.call(this,b,c)};d.set=function(b,c,d,e){var f=this.has(b);c=a.prototype.set.call(this,b,c,d,e);c&&(f?this.$LFUCache5(b):this.$LFUCache6(b,this.$LFUCache3));return c};d.purge=function(){var a=this,b=Array.from(this.__keys());b.forEach(function(b){a.$LFUCache7(b)