/*!CK:262870953!*//*1459362460,*/

if (self.CavalryLogger) { CavalryLogger.start_js(["u3h29"]); }

__d("ChatReliabilityEvents",[],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports={ERROR:"error",CHANNEL_DISCONNECT:"channel_disconnect",CHANNEL_CONNECT:"channel_connect",CHANNEL_INIT:"channel_init",CHANNEL_NOCONFIG:"channel_noconfig",CHANNEL_HISTORY_INVALID:"channel_history_invalid",CHANNEL_STALLED:"channel_stalled",MESSAGE_RECEIVED:"msg_received"};},null);
__d("ChatSidebarSections",[],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports={MORE_ONLINE_FRIENDS:"more_online_friends",MORE_ONLINE_COWORKERS:"more_online_coworkers",OFFLINE_USERS:"offline_users",ORDERED_LIST:"ordered_list",ORDERED_COWORKERS:"ordered_coworkers",TYPEAHEAD:"typeahead",NOW_PINNED_LIST:"now_pinned_list"};},null);
__d("SidebarType",[],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports={SIDEBAR:"sidebar",BUDDYLIST:"buddylist",BUDDYLIST_NUB:"buddylist_nub"};},null);
__d("SyncRequestStatusEnum",[],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports={PENDING:0,ACCEPTED:1,REJECTED:2,EXPIRED:3,CANCELED:4,namesByValue:["PENDING","ACCEPTED","REJECTED","EXPIRED","CANCELED"]};},null);
__d('AvailableListConstants',[],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h={ON_AVAILABILITY_CHANGED:'buddylist/availability-changed',ON_UPDATE_ERROR:'buddylist/update-error',ON_UPDATED:'buddylist/updated',ON_CHAT_NOTIFICATION_CHANGED:'chat-notification-changed',OFFLINE:0,IDLE:1,ACTIVE:2,MOBILE:3,WEB_STATUS:'webStatus',FB_APP_STATUS:'fbAppStatus',MESSENGER_STATUS:'messengerStatus',OTHER_STATUS:'otherStatus',STATUS_ACTIVE:'active',STATUS_IDLE:'idle',STATUS_OFFLINE:'offline'};f.exports=h;},null);
__d('LastActiveTimes',['fbt','ServerTime'],function a(b,c,d,e,f,g,h){if(c.__markCompiled)c.__markCompiled();var i={};function j(n){if(!n||n<0)return '';var o=c('ServerTime').get()/1000-n,p=Math.floor(o/60),q=Math.floor(p/60),r=Math.floor(q/24);if(p<=1){return h._("{count}m",[h.param('count',1)]);}else if(p<60){return h._("{count}m",[h.param('count',p)]);}else if(q<24){return h._("{count}h",[h.param('count',q)]);}else if(r<3){return h._("{count}d",[h.param('count',r)]);}else return '';}function k(n,o){if(!(n in i)||i[n]<o)i[n]=o;}function l(n){if(n in i){return i[n];}else return 0;}var m={update:function(n){for(var o in n)k(o,n[o]);},getShortDisplay:function(n){return j(l(n));},get:function(n){return l(n);},getDebugData:function(){return i;}};f.exports=m;},null);
__d('PresenceUtil',['CurrentUser','randomInt'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h=c('randomInt')(0,4294967295)+1;function i(){return h;}function j(){return c('CurrentUser').isLoggedInNow();}f.exports={getSessionID:i,hasUserCookie:j};},null);
__d('PresencePrivacy',['Arbiter','AsyncRequest','ChannelConstants','CurrentUser','PresencePrivacyInitialData','JSLogger','PresenceUtil'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h='/ajax/chat/privacy/settings.php',i='/ajax/chat/privacy/online_policy.php',j='/ajax/chat/privacy/visibility.php',k='friend_visibility',l='visibility',m='online_policy',n=babelHelpers['extends']({},c('PresencePrivacyInitialData').privacyData),o=c('PresencePrivacyInitialData').visibility,p=babelHelpers['extends']({},c('PresencePrivacyInitialData').privacyData),q=o,r=c('PresencePrivacyInitialData').onlinePolicy,s=r,t=[],u=false;function v(){return c('JSLogger').create('blackbird');}var w=Object.assign(new (c('Arbiter'))(),{WHITELISTED:1,BLACKLISTED:-1,UNLISTED:0,ONLINE:1,OFFLINE:0,ONLINE_TO_WHITELIST:0,ONLINE_TO_BLACKLIST:1});function x(ja){var ka;for(ka in ja){var la=ja[ka];if(ka==c('CurrentUser').getID()){v().error('set_viewer_visibility');throw new Error("Invalid to set current user's visibility");}switch(la){case w.WHITELISTED:case w.BLACKLISTED:case w.UNLISTED:break;default:v().error('set_invalid_friend_visibility',{id:ka,value:la});throw new Error("Invalid state: "+la);}}for(ka in ja)n[ka]=ja[ka];w.inform('privacy-changed');}function y(ja,ka){var la={};la[ja]=ka;x(la);}function z(ja){switch(ja){case w.ONLINE:case w.OFFLINE:break;default:v().error('set_invalid_visibility',{value:ja});throw new Error("Invalid visibility: "+ja);}o=ja;w.inform('privacy-changed');w.inform('privacy-user-presence-changed');}function aa(ja){switch(ja){case w.ONLINE_TO_WHITELIST:case w.ONLINE_TO_BLACKLIST:break;default:throw new Error("Invalid default online policy: "+ja);}r=ja;w.inform('privacy-user-presence-changed');w.inform('privacy-changed');}function ba(ja,ka){u=true;ja.send();}function ca(ja,ka){t.push({request:ja,data:ka});if(!u){var la=t.shift();ba(la.request,la.data);}}function da(ja,ka){var la=ja.type;if(la===k){var ma=ka.payload.user_availabilities;if(!Array.isArray(ma)){w.inform('privacy-availability-changed',{user_availabilities:ma});for(var na in ja.settings)p[na]=ja.settings[na];}}else{if(la===l){q=ja.visibility;}else if(la===m)s=ja.online_policy;w.inform('privacy-user-presence-response');}v().log('set_update_response',{data:ja,response:ka});}function ea(ja,ka){if(o!==q)z(q);if(r!==s)aa(s);Object.assign(n,p);w.inform('privacy-changed');t=[];v().log('set_error_response',{data:ja,response:ka});}function fa(ja){u=false;if(t.length>0){var ka=t.shift();ba(ka.request,ka.data);}}function ga(ja,ka){if(c('PresenceUtil')!=null){var la=ja.getData();la.window_id=c('PresenceUtil').getSessionID();ja.setData(la);}ja.setHandler(da.bind(this,ka)).setErrorHandler(ea.bind(this,ka)).setTransportErrorHandler(ea.bind(this,ka)).setFinallyHandler(fa.bind(this)).setAllowCrossPageTransition(true);return ja;}function ha(ja,ka,la){return ga(new (c('AsyncRequest'))(ja).setData(ka),la);}function ia(ja,ka){var la=ka.obj;if(la.viewer_id!=c('CurrentUser').getID()){v().error('invalid_viewer_for_channel_message',{type:ja,data:ka});throw new Error("Viewer got from the channel is not the real viewer");}if(la.window_id===c('PresenceUtil').getSessionID())return;var ma=la.data;if(la.event=='access_control_entry'){ma.target_ids.forEach(function(oa){y(oa,ma.setting);p[oa]=ma.setting;});}else{if(la.event=='visibility_update'){var na=!!ma.visibility?w.ONLINE:w.OFFLINE;z(na);q=na;}else if(la.event=='online_policy_update'){aa(ma.online_policy);s=ma.online_policy;}w.inform('privacy-user-presence-response');}v().log('channel_message_received',{data:ka.obj});}Object.assign(w,{WHITELISTED:1,BLACKLISTED:-1,UNLISTED:0,ONLINE:1,OFFLINE:0,ONLINE_TO_WHITELIST:0,ONLINE_TO_BLACKLIST:1,init:function(ja,ka,la){},setVisibility:function(ja){q=o;z(ja);var ka={visibility:ja},la={type:l,visibility:ja},ma=ha(j,ka,la);ca(ma,la);v().log('set_visibility',{data:ka});return ja;},getVisibility:function(){return o;},setOnlinePolicy:function(ja){s=r;aa(ja);var ka={online_policy:ja},la={type:m,online_policy:ja},ma=ha(i,ka,la);ca(ma,la);v().log('set_online_policy',{data:ka});return ja;},getOnlinePolicy:function(){return r;},getFriendVisibility:function(ja){return n[ja]||w.UNLISTED;},isUserOffline:function(){return this.getVisibility()===w.OFFLINE;},allows:function(ja){if(this.isUserOffline())return false;var ka=this.getOnlinePolicy();return ka===w.ONLINE_TO_WHITELIST?n[ja]==w.WHITELISTED:n[ja]!=w.BLACKLISTED;},setFriendsVisibility:function(ja,ka){if(ja.length>0){var la={};for(var ma=0;ma<ja.length;ma++){var na=ja[ma];p[na]=n[na];la[na]=ka;}x(la);var oa=ka;if(oa==w.UNLISTED)oa=p[ja[0]];var pa={users:ja,setting:ka,setting_type:oa},qa={type:k,settings:la},ra=ha(h,pa,qa);ca(ra,qa);v().log('set_friend_visibility',{data:pa});}return ka;},setFriendVisibilityMap:function(ja,ka){for(var la in ja)p[la]=n[la];x(ja);var ma={type:k,settings:ja};ca(ga(ka,ma),ma);v().log('set_friend_visibility_from_map',{data:ja});},allow:function(ja){if(this.allows(ja)){v().error('allow_already_allowed');throw new Error("allow() should only be called for users that "+"are not already allowed");}if(this.getVisibility()===w.OFFLINE){v().error('allow_called_while_offline');throw new Error("allow() should only be called when the user is already online");}var ka=this.getOnlinePolicy()===w.ONLINE_TO_WHITELIST?w.WHITELISTED:w.UNLISTED;return this.setFriendsVisibility([ja],ka);},disallow:function(ja){if(!this.allows(ja)){v().error('disallow_already_disallowed');throw new Error("disallow() should only be called for users that "+"are not already disallowed");}if(this.getVisibility()===w.OFFLINE){v().error('disallow_called_while_offline');throw new Error("disallow() should only be called when the user is already online");}var ka=this.getOnlinePolicy()===w.ONLINE_TO_BLACKLIST?w.BLACKLISTED:w.UNLISTED;return this.setFriendsVisibility([ja],ka);},getBlacklist:function(){var ja=[];for(var ka in n)if(n[ka]===w.BLACKLISTED)ja.push(ka);return ja;},getWhitelist:function(){var ja=[];for(var ka in n)if(n[ka]===w.WHITELISTED)ja.push(ka);return ja;},getMapForTest:function(){return n;},setMapForTest:function(ja){n=ja;}});w.inform('privacy-changed');w.inform('privacy-user-presence-changed',c('Arbiter').BEHAVIOR_STATE);v().log('initialized',{visibility:o,policy:r});c('Arbiter').subscribe(c('JSLogger').DUMP_EVENT,function(ja,ka){ka.presence_privacy={initial:c('PresencePrivacyInitialData').privacyData,current:n};});c('Arbiter').subscribe(c('ChannelConstants').getArbiterType('privacy_changed'),ia.bind(this));c('Arbiter').subscribe(c('ChannelConstants').ON_CONFIG,function(ja,ka){var la=ka.getConfig('visibility',null);if(la!==null&&typeof la!=='undefined'){var ma=la?w.ONLINE:w.OFFLINE;z(ma);v().log('config_visibility',{vis:ma});}}.bind(this));f.exports=w;},null);
__d('ChatVisibility',['Arbiter','JSLogger','PresencePrivacy'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h={isOnline:function(){return c('PresencePrivacy').getVisibility()===c('PresencePrivacy').ONLINE;},hasBlackbirdEnabled:function(){return this.isVisibleToMostFriends()||this.isVisibleToSomeFriends();},isVisibleToMostFriends:function(){return c('PresencePrivacy').getOnlinePolicy()===c('PresencePrivacy').ONLINE_TO_BLACKLIST&&c('PresencePrivacy').getBlacklist().length>0;},isVisibleToSomeFriends:function(){return c('PresencePrivacy').getOnlinePolicy()===c('PresencePrivacy').ONLINE_TO_WHITELIST&&c('PresencePrivacy').getWhitelist().length>0;},goOnline:function(i){if(c('PresencePrivacy').getVisibility()===c('PresencePrivacy').OFFLINE){c('JSLogger').create('blackbird').log('chat_go_online');c('PresencePrivacy').setVisibility(c('PresencePrivacy').ONLINE);c('Arbiter').inform('chat-visibility/go-online');}i&&i();},goOffline:function(i){if(c('PresencePrivacy').getVisibility()===c('PresencePrivacy').ONLINE){c('JSLogger').create('blackbird').log('chat_go_offline');c('PresencePrivacy').setVisibility(c('PresencePrivacy').OFFLINE);c('Arbiter').inform('chat-visibility/go-offline');}i&&i();},toggleVisibility:function(){if(h.isOnline()){h.goOffline();}else h.goOnline();}};f.exports=h;},null);
__d('PresenceStatus',['ArbiterMixin','AvailableListConstants','BanzaiODS','ChatVisibility','CurrentUser','LastActiveTimes','Set','PresencePrivacy','ServerTime','createObjectFrom','debounceAcrossTransitions'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();c('BanzaiODS').setEntitySample('presence',.0001);var h={},i={},j={},k=Object.assign({},c('ArbiterMixin')),l=c('debounceAcrossTransitions')(function(){return k.inform('change');},0);Object.assign(k,{resetPresenceData:function(){h={};i={};},reset:function(){k.resetPresenceData();j={};},get:function(m){if(m==c('CurrentUser').getID())return c('ChatVisibility').isOnline()?c('AvailableListConstants').ACTIVE:c('AvailableListConstants').OFFLINE;var n=c('AvailableListConstants').OFFLINE;if(m in h)n=h[m];if(!c('PresencePrivacy').allows(m))n=c('AvailableListConstants').OFFLINE;return n;},getCapabilities:function(m){var n=k.get(m);if(n==c('AvailableListConstants').OFFLINE)return 0;var o=i[m];return o?o:0;},isPlayingCanvasGameUser:function(m){return !!j[m];},getGroup:function(m){return m.some(function(n){if(n==c('CurrentUser').getID())return false;return k.get(n)===c('AvailableListConstants').ACTIVE;})?c('AvailableListConstants').ACTIVE:c('AvailableListConstants').OFFLINE;},set:function(m,n,o,p,q,r){if(m==c('CurrentUser').getID())return false;var s;if(n!==null&&n!==undefined){n=n==c('AvailableListConstants').ACTIVE?c('AvailableListConstants').ACTIVE:c('AvailableListConstants').OFFLINE;var t=k.get(m);s=t!=n;if(s&&t==c('AvailableListConstants').ACTIVE||n==c('AvailableListConstants').ACTIVE){var u={};u[m]=c('ServerTime').get()/1000;c('LastActiveTimes').update(u);}h[m]=n;}var v=false;if(q){v=k.getCapabilities(m)!=q;i[m]=q;}var w=s||v;if(w&&!r)l();return w;},setPlayingCanvasGameFriends:function(m){j=c('createObjectFrom')(m);},getOnlineIDs:function(){var m,n=[];for(m in h)if(k.get(m)===c('AvailableListConstants').ACTIVE)n.push(m);return n;},getOnlineCount:function(){return k.getOnlineIDs().length;},getPresenceStats:function(){var m=0,n=0,o=0;for(var p in h){m+=1;switch(k.get(p)){case c('AvailableListConstants').OFFLINE:n+=1;break;case c('AvailableListConstants').ACTIVE:o+=1;break;default:break;}}return {total:m,offline:n,active:o};},getDebugInfo:function(m){return {id:m,presence:h[m]};},getAllDebugInfo:function(){return {presence:h};},setMulti:function(m,n){var o=false;for(var p in m)k.set(p,m[p].a,false,n,m[p].c,true)&&(o=true);if(o)l();},setMultiChatproxy:function(m){var n={};for(var o in m){if(m[o].lat)n[o]=m[o].lat;var p=m[o].p;if(p!==undefined)k.set(o,p,false,'chatproxy',m[o].vc,true);}c('LastActiveTimes').update(n);l();},setMultiActive:function(m,n){var o=false;m.forEach(function(p){k.set(p,c('AvailableListConstants').ACTIVE,false,n,null,true)&&(o=true);});if(o)l();}});f.exports=k;},null);
__d('ChatproxyPresence',['Arbiter','AvailableListConstants','AvailableListInitialData','ChannelConstants','CurrentUser','LastActiveTimes','PresenceStatus','debounceAcrossTransitions'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();function h(i){'use strict';this.$ChatproxyPresence1=i;this.$ChatproxyPresence2=false;this.$ChatproxyPresence3=c('AvailableListInitialData').chatNotif;var j=c('AvailableListInitialData').activeList,k=c('AvailableListInitialData').lastActiveTimes;if(j)c('PresenceStatus').setMultiActive(j,'available_list_active');if(k&&!Array.isArray(k))c('LastActiveTimes').update(k);}h.prototype.subscribe=function(){'use strict';c('Arbiter').subscribe(c('ChannelConstants').getArbiterType('chatproxy-presence'),this.updatePresenceInfo.bind(this));c('Arbiter').subscribe(c('ChannelConstants').ON_INVALID_HISTORY,function(){this.$ChatproxyPresence2=true;}.bind(this));};h.prototype.updatePresenceInfo=function(i,j){'use strict';if(this.$ChatproxyPresence2){this.$ChatproxyPresence2=false;c('PresenceStatus').resetPresenceData();}j=j.obj;var k=j.buddyList;c('PresenceStatus').setMultiChatproxy(k);var l=false;if(j.chatNotif!==undefined)l=this.$ChatproxyPresence3!==j.chatNotif;if(l)this.$ChatproxyPresence3=j.chatNotif;if(j.gamers)c('PresenceStatus').setPlayingCanvasGameFriends(j.gamers);if(l)this.$ChatproxyPresence1(c('AvailableListConstants').ON_CHAT_NOTIFICATION_CHANGED,this.$ChatproxyPresence3);c('debounceAcrossTransitions')(function(){this.$ChatproxyPresence1(c('AvailableListConstants').ON_AVAILABILITY_CHANGED);}.bind(this),0)();};h.prototype.getWebChatNotification=function(){'use strict';return this.$ChatproxyPresence3;};f.exports=h;},null);
__d('ChatConfig',['ChatConfigInitialData'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h={},i={get:function(j,k){return j in h?h[j]:k;},set:function(j){if(arguments.length>1){var k={};k[j]=arguments[1];j=k;}Object.assign(h,j);},getDebugInfo:function(){return h;}};i.set(c('ChatConfigInitialData'));f.exports=i;},null);
__d('ChatReliabilityTypedLogger',['Banzai','GeneratedLoggerUtils','nullthrows'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();function h(){this.clear();}h.prototype.log=function(){c('GeneratedLoggerUtils').log('logger:ChatReliabilityLoggerConfig',this.$ChatReliabilityTypedLogger1,c('Banzai').BASIC);};h.prototype.logVital=function(){c('GeneratedLoggerUtils').log('logger:ChatReliabilityLoggerConfig',this.$ChatReliabilityTypedLogger1,c('Banzai').VITAL);};h.prototype.clear=function(){this.$ChatReliabilityTypedLogger1={};return this;};h.prototype.updateData=function(j){this.$ChatReliabilityTypedLogger1=babelHelpers['extends']({},this.$ChatReliabilityTypedLogger1,j);return this;};h.prototype.setEvent=function(j){this.$ChatReliabilityTypedLogger1.event=j;return this;};h.prototype.setEventData=function(j){this.$ChatReliabilityTypedLogger1.event_data=j;return this;};var i={event:true,event_data:true};f.exports=h;},null);
__d('ChatReliabilityInstrumentation',['ChatReliabilityEvents','ChatReliabilityTypedLogger','MercuryConfig'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();var h=function(event,j){if(!c('MercuryConfig').EnableReliabilityLogging)return;new (c('ChatReliabilityTypedLogger'))().setEvent(event).setEventData(j).log();},i={logERROR:function(j){h(c('ChatReliabilityEvents').ERROR,j);},logCHANNEL_DISCONNECT:function(j){h(c('ChatReliabilityEvents').CHANNEL_DISCONNECT,j);},logCHANNEL_CONNECT:function(j){h(c('ChatReliabilityEvents').CHANNEL_CONNECT,j);},logCHANNEL_HISTORY_INVALID:function(j){h(c('ChatReliabilityEvents').CHANNEL_HISTORY_INVALID,j);},logMESSAGE_RECEIVED:function(j){h(c('ChatReliabilityEvents').MESSAGE_RECEIVED,j);},logCHANNEL_STALLED:function(j){h(c('ChatReliabilityEvents').CHANNEL_STALLED,j);},logCHANNEL_INIT:function(j){h(c('ChatReliabilityEvents').CHANNEL_INIT,j);},logCHANNEL_NOCONFIG:function(j){h(c('ChatReliabilityEvents').CHANNEL_NOCONFIG,j);}};f.exports=i;},null);
__d("TypingStates",[],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h={INACTIVE:0,TYPING:1,QUITTING:2};f.exports=h;},null);
__d('AvailableList',['Arbiter','ArbiterMixin','AsyncRequest','AvailableListConstants','AvailableListInitialData','BanzaiODS','Bootloader','ChannelConstants','ChatConfig','ChatproxyPresence','ChatReliabilityInstrumentation','ChatVisibility','ErrorUtils','JSLogger','LastActiveTimes','PresencePrivacy','PresenceStatus','Run','ServerTime','ShortProfiles','TypingStates','debounceAcrossTransitions','emptyFunction','requireWeak'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();c('BanzaiODS').setEntitySample('presence',.0001);var h=babelHelpers['extends']({},c('AvailableListConstants'),c('ArbiterMixin'));h.subscribe([c('AvailableListConstants').ON_AVAILABILITY_CHANGED,c('AvailableListConstants').ON_UPDATE_ERROR],function(p,q){c('Arbiter').inform(p,q);});var i=c('debounceAcrossTransitions')(function(){return h.inform(c('AvailableListConstants').ON_AVAILABILITY_CHANGED);},0);function j(p,q,r,s,t){var u=c('PresenceStatus').set(p,q,r,s,t);if(u){var v=c('debounceAcrossTransitions')(function(){return h.inform(c('AvailableListConstants').ON_AVAILABILITY_CHANGED,p);},0);v();}}function k(p){var q=p.payload.availability||{};for(var r in q)j(r&&r.toString(),q[r].a,true,'mercury_tabs',q[r].c,q[r].p);}function l(p){var q=h.getDebugInfo(p),r=q.presence==c('AvailableListConstants').ACTIVE;new (c('AsyncRequest'))('/ajax/mercury/tabs_presence.php').setData({target_id:p,to_online:r,presence_source:q.overlaySource,presence_time:q.overlayTime}).setHandler(k).setErrorHandler(c('emptyFunction')).setAllowCrossPageTransition(true).send();}function m(p,q){q.chat_config=c('ChatConfig').getDebugInfo();q.available_list_debug_info={count:c('PresenceStatus').getOnlineIDs().length};}var n=undefined;try{n=new (c('ChatproxyPresence'))(function(event){h.inform(event);});n.subscribe();}catch(o){c('ErrorUtils').reportError&&c('ErrorUtils').reportError(o,false);c('ChatReliabilityInstrumentation').logERROR(o.getMessage());}Object.assign(h,{getChatproxyPresenceObject:function(){return n;},get:function(p){return c('PresenceStatus').get(p);},updateForID:function(p){l(p);if(c('PresencePrivacy').getVisibility()==c('PresencePrivacy').ONLINE)c('Run').onAfterLoad(function(){return (c('Bootloader').loadModules(["ChannelManager","ChannelTransport"],function(q,r){r.sendAdditionalBuddyRequest(q.getCompleteConfig(),p);}));});},getWebChatNotification:function(){return n&&n.getWebChatNotification();},isReady:function(){return !!n;},set:function(p,q,r,s){j(p,q,true,r,s);},getDebugInfo:function(p){var q=c('PresenceStatus').getDebugInfo(p),r=c('ShortProfiles').getNow(p);if(r)q.name=r.name;return q;}});c('Arbiter').subscribe(c('JSLogger').DUMP_EVENT,m);c('PresencePrivacy').subscribe(['privacy-changed','privacy-availability-changed','privacy-user-presence-response'],i);c('requireWeak')('ChannelConnection',function(p){return (p.subscribe([p.CONNECTED,p.RECONNECTING,p.SHUTDOWN,p.MUTE_WARNING,p.UNMUTE_WARNING],i));});c('Arbiter').subscribe(c('ChannelConstants').getArbiterType('buddylist_overlay'),function(p,q){var r={},s=q.obj.overlay;for(var t in s){h.set(t,s[t].a,s[t].s||'channel',s[t].vc);if(s[t].la)r[t]=s[t].la;}c('LastActiveTimes').update(r);});c('Arbiter').subscribe([c('ChannelConstants').getArbiterType('typ'),c('ChannelConstants').getArbiterType('ttyp')],function(p,q){var r=q.obj;if(r.st===c('TypingStates').TYPING){var s=r.from;if(c('ChatVisibility').isOnline()){c('BanzaiODS').bumpEntityKey('presence','stale_presence_check_typing');var t=c('PresenceStatus').get(s);if(t!=c('AvailableListConstants').ACTIVE){var u=c('LastActiveTimes').get(s)*1000,v=c('ServerTime').get();if(!u){c('BanzaiODS').bumpEntityKey('presence','no_detailed_presence_typing');}else if(v-u>5*60*1000){var w='stale_presence_typing',x=v-u;if(x<10*60*1000){w+='600';}else if(x<60*60*1000)w+='3600';c('BanzaiODS').bumpEntityKey('presence',w);}}}h.set(s&&s.toString(),c('AvailableListConstants').ACTIVE,'channel-typing');}});c('Arbiter').subscribe(c('ChannelConstants').getArbiterType('messaging'),function(p,q){if(!c('ChatVisibility').isOnline())return;var r=q.obj;if(r.message&&r.message.timestamp&&r.message.sender_fbid){var s=c('ServerTime').get(),t=r.message.timestamp;if(s-t<2*60*1000){c('BanzaiODS').bumpEntityKey('presence','stale_presence_check');var u=r.message.sender_fbid,v=c('PresenceStatus').get(u);if(v==c('AvailableListConstants').ACTIVE)return;var w=c('LastActiveTimes').get(u)*1000;if(!w){c('BanzaiODS').bumpEntityKey('presence','no_detailed_presence');}else if(t-w>5*60*1000){var x='stale_presence',y=t-w;if(y<10*60*1000){x+='600';}else if(y<60*60*1000)x+='3600';c('BanzaiODS').bumpEntityKey('presence',x);}}}});f.exports=h;},null);
__d('Poller',['ArbiterMixin','AsyncRequest','CurrentUser','emptyFunction','mixin','setTimeoutAcrossTransitions','setTimeout'],function a(b,c,d,e,f,g){var h,i;if(c.__markCompiled)c.__markCompiled();h=babelHelpers.inherits(j,c('mixin')(c('ArbiterMixin')));i=h&&h.prototype;function j(l){'use strict';i.constructor.call(this);this._config=babelHelpers['extends']({clearOnQuicklingEvents:true,setupRequest:c('emptyFunction'),interval:null,maxRequests:Infinity,dontStart:false},l);this._handle=null;this._isSkipIndefinitely=false;this._requests=0;this._muted=false;this._polling=false;this._skip=false;this._cancelRequest=c('emptyFunction');if(!this._config.dontStart)this.start();}j.prototype.start=function(){'use strict';if(this._polling)return this;this._requests=0;this.request();return this;};j.prototype.stop=function(){'use strict';this._cancelRequest();return this;};j.prototype.mute=function(){'use strict';this._muted=true;return this;};j.prototype.resume=function(){'use strict';if(this._muted){this._muted=false;if(this._handle===null&&this._polling)return this.request();}if(this._isSkipIndefinitely){this._isSkipIndefinitely=false;return this.request();}return this;};j.prototype.skip=function(){'use strict';this._skip=true;return this;};j.prototype.startSkipIndefinitely=function(){'use strict';this._isSkipIndefinitely=true;return this;};j.prototype.stopSkipIndefinitely=function(){'use strict';this._isSkipIndefinitely=false;return this;};j.prototype.isSkipIndefinitely=function(){'use strict';return this._isSkipIndefinitely;};j.prototype.reset=function(){'use strict';return this.stop().start();};j.prototype.request=function(){'use strict';this._cancelRequest();this._polling=true;if(!k())return this._done();if(this._muted)return this;var l=false;this._cancelRequest=function(){l=true;this._cleanup();}.bind(this);if(this._isSkipIndefinitely){this._deferRequest();return this;}if(++this._requests>this._config.maxRequests)return this._done();var m=new (c('AsyncRequest'))();m.setIsBackgroundRequest(true);m.setInitialHandler(function(){return !l;});m.setFinallyHandler(this._deferRequest.bind(this));m.setInitialHandler=c('emptyFunction');m.setFinallyHandler=c('emptyFunction');this._config.setupRequest(m,this);if(this._skip){this._skip=false;c('setTimeoutAcrossTransitions')(this._deferRequest.bind(this),0);}else m.send();return this;};j.prototype.isPolling=function(){'use strict';return this._polling;};j.prototype.isMuted=function(){'use strict';return this._muted;};j.prototype.setInterval=function(l){'use strict';if(l){this._config.interval=l;this.start();}};j.prototype.getInterval=function(){'use strict';return this._config.interval;};j.prototype._cleanup=function(){'use strict';if(this._handle!==null)clearTimeout(this._handle);this._handle=null;this._cancelRequest=c('emptyFunction');this._polling=false;};j.prototype._done=function(){'use strict';this._cleanup();this.inform('done',{sender:this});return this;};j.prototype._deferRequest=function(){'use strict';if(!this._polling)return;if(this._requests<this._config.maxRequests){var l=this._config.interval;l=typeof l==='function'?l(this._requests):l;l=l>j.MIN_INTERVAL?l:j.MIN_INTERVAL;if(this._config.clearOnQuicklingEvents){this._handle=c('setTimeout')(this.request.bind(this),l);}else this._handle=c('setTimeoutAcrossTransitions')(this.request.bind(this),l);}else this._done();};j.MIN_INTERVAL=2000;function k(){return c('CurrentUser').isLoggedInNow();}f.exports=j;},null);
__d('ChatImpressionLogger',['AsyncSignal','ChatConfig','ChatVisibility','Poller','PresencePrivacy','PresenceStatus','requireWeak','debounceAcrossTransitions'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h=null;c('requireWeak')('AvailableList',function(n){return h=n;});var i=null;function j(){if(!i)return '';return Array.from(i.getSortedList()).toString();}function k(){if(!i||!h)return '';var n=[],o=Array.from(i.getSortedList());for(var p=0;p<o.length;p++)n[p]=h.get(o[p]);return n.toString();}function l(n){n.setURI('/ajax/chat/imps_logging.php').setData({list_availability:k(),sorted_list:j(),source:'periodical_imps'});}var m={init:function(n){i=n;var o=c('ChatConfig').get('chat_impression_logging_periodical',0);if(o){var p=c('ChatConfig').get('periodical_impression_logging_config.interval'),q=new (c('Poller'))({interval:p,setupRequest:l,clearOnQuicklingEvents:false,dontStart:true});c('PresencePrivacy').subscribe('privacy-user-presence-changed',c('debounceAcrossTransitions')(function(){if(c('ChatVisibility').isOnline()){q.start();}else q.stop();}));}this.init=function(){};},logImpression:function(n,o,p){var q=c('ChatConfig').get('chat_impression_logging_with_click'),r={list_availability:q?k():'',sorted_list:q?j():'',source:n,target:o,target_presence:c('PresenceStatus').get(o),viewport_width:document.body.clientWidth};new (c('AsyncSignal'))('/ajax/chat/ct.php',Object.assign(r,p)).send();}};f.exports=m;},null);
__d('ExplicitRegistrationDispatcherUtils',['ErrorUtils','FluxInternalConfig','emptyFunction','monitorCodeUse','setImmediate'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();var h=c('emptyFunction'),i=false,j=c('emptyFunction');f.exports={guessStoreName:h,warn:j,inlineRequiresEnabled:i};},null);
__d('ExplicitRegistrationDispatcher',['Dispatcher_DEPRECATED','ExplicitRegistrationDispatcherUtils','setImmediate'],function a(b,c,d,e,f,g){'use strict';var h,i;if(c.__markCompiled)c.__markCompiled();h=babelHelpers.inherits(j,c('Dispatcher_DEPRECATED'));i=h&&h.prototype;function j(k){var l=k.strict;i.constructor.call(this);this.$ExplicitRegistrationDispatcher5=l;this.$ExplicitRegistrationDispatcher4=1;this.$ExplicitRegistrationDispatcher1={};this.$ExplicitRegistrationDispatcher2={};this.$ExplicitRegistrationDispatcher3={};}j.prototype.explicitlyRegisterStore=function(k){var l=k.getDispatchToken(),m=this.$ExplicitRegistrationDispatcher2[l];this.$ExplicitRegistrationDispatcher3[m]=true;};j.prototype.explicitlyRegisterStores=function(k){k.forEach(function(l){return this.explicitlyRegisterStore(l);}.bind(this));};j.prototype.register=function(k){var l=this.$ExplicitRegistrationDispatcher4++;this.$ExplicitRegistrationDispatcher1[l]=k;this.$ExplicitRegistrationDispatcher3[l]=false;var m=i.register.call(this,this.$ExplicitRegistrationDispatcher7.bind(this,l));this.$ExplicitRegistrationDispatcher2[m]=l;return m;};j.prototype.$ExplicitRegistrationDispatcher7=function(k,l){if(this.$ExplicitRegistrationDispatcher3[k]||!this.$ExplicitRegistrationDispatcher5)this.$ExplicitRegistrationDispatcher1[k](l);};f.exports=j;},null);
__d('ChatDispatcher',['ExplicitRegistrationDispatcher','LogHistory'],function a(b,c,d,e,f,g){'use strict';var h,i;if(c.__markCompiled)c.__markCompiled();var j=c('LogHistory').getInstance('chat_dispatcher');h=babelHelpers.inherits(k,c('ExplicitRegistrationDispatcher'));i=h&&h.prototype;k.prototype.dispatch=function(l){j.debug('action',l.type);i.dispatch.call(this,l);};function k(){h.apply(this,arguments);}f.exports=new k({strict:false});},null);
__d('ChatSidebarActionTypes',['keyMirror'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();f.exports=c('keyMirror')({INIT:null,LOADED:null,SET_ENABLED:null,SHOW:null,TOGGLE:null});},null);
__d('ChatSidebarStore',['ChatDispatcher','ChatOptionsInitialData','ChatSidebarActionTypes','FluxStore','SidebarType','performanceAbsoluteNow'],function a(b,c,d,e,f,g){'use strict';var h,i;if(c.__markCompiled)c.__markCompiled();h=babelHelpers.inherits(j,c('FluxStore'));i=h&&h.prototype;function j(){i.constructor.call(this,c('ChatDispatcher'));this.$ChatSidebarStore2={initialized:false,initTime:c('performanceAbsoluteNow')(),loaded:false,enabled:!!c('ChatOptionsInitialData').sidebar_mode,visible:null};this.$ChatSidebarStore1={};}j.prototype.__onDispatch=function(k){var l=k.type;this.$ChatSidebarStore1=babelHelpers['extends']({},this.$ChatSidebarStore2);switch(l){case c('ChatSidebarActionTypes').INIT:if(!this.$ChatSidebarStore1.initialized)this.$ChatSidebarStore2.initTime=c('performanceAbsoluteNow')();this.$ChatSidebarStore2.initialized=true;break;case c('ChatSidebarActionTypes').LOADED:this.$ChatSidebarStore2.loaded=true;break;case c('ChatSidebarActionTypes').SHOW:this.$ChatSidebarStore2.visible=k.sidebarType;break;case c('ChatSidebarActionTypes').SET_ENABLED:this.$ChatSidebarStore2.enabled=k.enabled;this.$ChatSidebarStore2.visible=k.sidebarType;break;case c('ChatSidebarActionTypes').TOGGLE:this.$ChatSidebarStore2.enabled=!this.$ChatSidebarStore2.enabled;this.$ChatSidebarStore2.visible=this.$ChatSidebarStore2.enabled?k.visible:c('SidebarType').BUDDYLIST;break;}for(var m in this.$ChatSidebarStore2)if(this.$ChatSidebarStore2.hasOwnProperty(m))if(this.$ChatSidebarStore2[m]!==this.$ChatSidebarStore1[m]){this.__emitChange();break;}};j.prototype.getPrevState=function(){return this.$ChatSidebarStore1;};j.prototype.getState=function(){return this.$ChatSidebarStore2;};j.prototype.isInitialized=function(){return this.$ChatSidebarStore2.initialized;};j.prototype.isLoaded=function(){return this.$ChatSidebarStore2.loaded;};j.prototype.isEnabled=function(){return this.$ChatSidebarStore2.enabled;};j.prototype.getInitTime=function(){return this.$ChatSidebarStore2.initTime;};j.prototype.getVisibleType=function(){return this.$ChatSidebarStore2.visible;};f.exports=new j();},null);
__d('OrderedFriendsList',['AvailableListConstants','MercuryIDs','PresenceStatus','SearchableEntry','ShortProfiles','WorkModeConfig','createArrayFromMixed','isValidUniqueID','InitialChatFriendsList'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();var h=[],i=[],j={},k=[],l={},m=[];function n(p){p=String(p);return c('MercuryIDs').isValid(p)?p:c('MercuryIDs').getParticipantIDFromUserID(p);}var o={contains:function(p){return p in j;},getList:function(){if(c('WorkModeConfig').is_work_user)return c('createArrayFromMixed')(h);o.reRank();var p=c('createArrayFromMixed')(h);p=p.filter(function(q){var r=c('ShortProfiles').getNow(q);return !r||r.type=='friend'||r.is_nonfriend_messenger_contact;});return p;},getSearchableEntries:function(p,q){var r=o.getList();c('ShortProfiles').getMulti(r.slice(0,p),function(s){var t=[];for(var u in s)t.push(o.normalizeProfileEntry(s[u],u));var v=o.getGroups().map(o.normalizeThreadEntry);q(t.concat(v).filter(function(w){return !!w;}).sort(function(w,x){return w.getOrder()-x.getOrder();}));});},normalizeProfileEntry:function(p,q){var r=p.searchTokens||[],s=p.name,t=null;if(p.threadNickname){s=p.threadNickname;t=p.name;}return new (c('SearchableEntry'))({uniqueID:p.id||q,keywordString:r.join(' '),order:o.getRank(p.id||q),photo:p.thumbSrc,title:s,subtitle:t,type:p.type,uri:p.uri,auxiliaryData:{isMessengerUser:p.is_messenger_user}});},normalizeThreadEntry:function(p,q){var r=p.mercury_thread,s=p.participants_to_render.map(function(x){return babelHelpers['extends']({},x,{id:n(x.id)});});r.participants=r.participants.map(n);var t=p.text,u=null;if(!t)t=r.name;var v=s.map(function(x){return x.name;}).join(', ');if(!t){t=v;}else u=v;var w=p.uid;if(!t||!c('isValidUniqueID')(w))return null;return new (c('SearchableEntry'))({uniqueID:w,order:q,photo:r.image_src,title:t,subtitle:u,type:'thread',auxiliaryData:{participantsToRender:s,thread:r}});},getRank:function(p){return p in j?j[p]:h.length;},getActiveList:function(){if(k.length>0)return k;return o.getList();},getActiveRank:function(p){return p in l?l[p]:o.getRank(p);},reRank:function(){h=[];var p=0;m.forEach(function(q){var r=q.slice(0,-2),s=q.slice(-1);if(c('PresenceStatus').get(r)==s){h[p]=r;j[r]=p++;}});},rankActive:function(){var p=0;m.forEach(function(q){var r=q.slice(0,-2),s=q.slice(-1);if(s==c('AvailableListConstants').ACTIVE){k[p]=r;l[r]=p++;}});},getGroups:function(){return i;}};(function(){var p=c('InitialChatFriendsList');h=p.list.length?p.list:[];i=p.groups||[];if(p.shortProfiles)c('ShortProfiles').setMulti(p.shortProfiles);if(!c('WorkModeConfig').is_work_user){m=h.slice();o.rankActive();o.reRank();}else h.forEach(function(q,r){j[q]=r;});})();f.exports=b.OrderedFriendsList||o;},null);
__d('ChatSidebarVisibility',['ChatConfig','ChatSidebarStore','OrderedFriendsList','getViewportDimensions'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();var h=c('ChatConfig').get('sidebar.min_friends'),i=c('ChatConfig').get('sidebar.minimum_width'),j={getViewport:function(){return c('getViewportDimensions').withoutScrollbars();},hasLowFriendCount:function(){return c('OrderedFriendsList').getActiveList().length<=h;},isViewportCapable:function(k){k=k||j.getViewport();return k.width>i;},shouldShowSidebar:function(k){return c('ChatSidebarStore').isEnabled()&&j.shouldShowSidebarIgnoreEnabled(k);},shouldShowSidebarIgnoreEnabled:function(k){return j.isViewportCapable(k)&&!j.hasLowFriendCount();}};f.exports=j;},null);
__d('ChatSidebarActions',['ChatDispatcher','ChatSidebarActionTypes','ChatSidebarVisibility','SidebarType'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();function h(k){if(c('ChatSidebarVisibility').shouldShowSidebar(k))return c('SidebarType').SIDEBAR;return c('SidebarType').BUDDYLIST;}function i(){if(c('ChatSidebarVisibility').shouldShowSidebarIgnoreEnabled())return c('SidebarType').SIDEBAR;return c('SidebarType').BUDDYLIST;}var j={init:function(){c('ChatDispatcher').dispatch({type:c('ChatSidebarActionTypes').INIT});},loaded:function(){c('ChatDispatcher').dispatch({type:c('ChatSidebarActionTypes').LOADED});},disable:function(){c('ChatDispatcher').dispatch({type:c('ChatSidebarActionTypes').SET_ENABLED,enabled:false,sidebarType:c('SidebarType').BUDDYLIST});},enable:function(){c('ChatDispatcher').dispatch({type:c('ChatSidebarActionTypes').SET_ENABLED,enabled:true,sidebarType:i()});},show:function(k){c('ChatDispatcher').dispatch({type:c('ChatSidebarActionTypes').SHOW,sidebarType:h(k)});},toggle:function(){c('ChatDispatcher').dispatch({type:c('ChatSidebarActionTypes').TOGGLE,sidebarType:h()});}};f.exports=j;},null);
__d('FBRTCDispatcher',['Dispatcher_DEPRECATED'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();f.exports=new (c('Dispatcher_DEPRECATED'))();},null);
__d('FBRTCStore',['FBRTCDispatcher','FluxStore'],function a(b,c,d,e,f,g){'use strict';var h,i;if(c.__markCompiled)c.__markCompiled();h=babelHelpers.inherits(j,c('FluxStore'));i=h&&h.prototype;function j(){i.constructor.call(this,c('FBRTCDispatcher'));}j.prototype.__emitChange=function(){this.__emitter.emit(this.__changeEvent);};f.exports=j;},null);
__d('FBRTCCallBlockingStore',['Arbiter','AsyncRequest','BanzaiLogger','ChannelConstants','FBRTCDispatcher','FBRTCStore','setTimeoutAcrossTransitions'],function a(b,c,d,e,f,g){'use strict';var h,i;if(c.__markCompiled)c.__markCompiled();var j=false,k=0,l=null,m='call_block_setting_changed';h=babelHelpers.inherits(n,c('FBRTCStore'));i=h&&h.prototype;n.prototype.init=function(o){this.$FBRTCCallBlockingStore1(o);c('Arbiter').subscribe(c('ChannelConstants').getArbiterType('videocall_block_setting'),this.$FBRTCCallBlockingStore2.bind(this));};n.prototype.__onDispatch=function(o){if(o.type!==m)return;this.$FBRTCCallBlockingStore1(o.data);};n.prototype.$FBRTCCallBlockingStore1=function(o){switch(o){case 0:j=false;this.$FBRTCCallBlockingStore3();break;case -1:j=true;this.$FBRTCCallBlockingStore3();break;default:j=true;this.$FBRTCCallBlockingStore4(o);}this.__emitChange();};n.prototype.$FBRTCCallBlockingStore4=function(o){if(l===null)l=c('setTimeoutAcrossTransitions')(this.turnOnVideoCalling.bind(this),o*1000);};n.prototype.getBlockingStatus=function(){return j;};n.prototype.turnOnVideoCalling=function(){new (c('AsyncRequest'))('/ajax/chat/settings.php').setHandler(this.$FBRTCCallBlockingStore5.bind(this)).setData({call_blocked_until:0}).send();};n.prototype.turnOffVideoCalling=function(o){k=o;new (c('AsyncRequest'))('/ajax/chat/settings.php').setHandler(this.$FBRTCCallBlockingStore6.bind(this)).setData({call_blocked_until:o}).send();};n.prototype.$FBRTCCallBlockingStore3=function(){if(l){clearTimeout(l);l=null;}};n.prototype.$FBRTCCallBlockingStore5=function(){c('FBRTCDispatcher').dispatch({type:m,data:0});c('BanzaiLogger').log('VideoCallLoggerConfig',{event:m,message:'enable'});};n.prototype.$FBRTCCallBlockingStore6=function(){c('FBRTCDispatcher').dispatch({type:m,data:k});c('BanzaiLogger').log('VideoCallLoggerConfig',{event:m,message:'disable_'+k});};n.prototype.$FBRTCCallBlockingStore2=function(o,p){c('FBRTCDispatcher').dispatch({type:m,data:p.obj.value});};function n(){h.apply(this,arguments);}f.exports=new n();},null);
__d('ChatOptions',['Arbiter','ChannelConstants','ChatSidebarActions','FBRTCCallBlockingStore','JSLogger','PresenceUtil','ChatOptionsInitialData'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h=c('JSLogger').create('chat_options'),i={};(function(){var k=c('ChatOptionsInitialData');for(var l in k){var m=k[l];if(l==='call_blocked_until'){c('FBRTCCallBlockingStore').init(m);}else i[l]=!!m;}})();var j=Object.assign(new (c('Arbiter'))(),{getSetting:function(k){return i[k];},setSetting:function(k,l,m){if(k==='sidebar_mode'){l?c('ChatSidebarActions').enable():c('ChatSidebarActions').disable();return;}if(this.getSetting(k)==l)return;if(m){m='from_'+m;h.log(m,{name:k,new_value:l,old_value:this.getSetting(k)});}i[k]=!!l;c('Arbiter').inform('chat/option-changed',{name:k,value:l});}});c('Arbiter').subscribe(c('ChannelConstants').getArbiterType('setting'),function(k,l){var m=l.obj;if(m.window_id===c('PresenceUtil').getSessionID())return;j.setSetting(m.setting,!!m.value,'channel');});c('Arbiter').subscribe(c('JSLogger').DUMP_EVENT,function(k,l){l.chat_options=i;});f.exports=j;},null);
__d('ChatQuietLinks',['DataStore','DOM','Event','Parent','UserAgent_DEPRECATED','getOrCreateDOMID'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h={},i={silenceLinks:function(m){j(m,this.removeEmptyHrefs.bind(this));},nukeLinks:function(m){j(m,this.removeAllHrefs.bind(this));},removeEmptyHrefs:function(m){k(m,function(n){return !n||n==='#';});},removeAllHrefs:function(m){k(m);}};function j(m,n){var o=!!c('UserAgent_DEPRECATED').chrome(),p=!!c('UserAgent_DEPRECATED').chrome()||c('UserAgent_DEPRECATED').ie()>=9||c('UserAgent_DEPRECATED').firefox()>=4;if(h[c('getOrCreateDOMID')(m)])return;h[c('getOrCreateDOMID')(m)]=true;if(!p)return;if(!o){n&&n(m);return;}c('Event').listen(m,'mouseover',function q(r){var s=c('Parent').byTag(r.getTarget(),'a');if(s){var t=s.getAttribute('href');if(l(t)){c('DataStore').set(s,'stashedHref',s.getAttribute('href'));s.removeAttribute('href');}}});c('Event').listen(m,'mouseout',function q(r){var s=c('Parent').byTag(r.getTarget(),'a'),t=s&&c('DataStore').remove(s,'stashedHref');if(l(t))s.setAttribute('href',t);});c('Event').listen(m,'mousedown',function(q){if(!q.isDefaultRequested())return true;var r=c('Parent').byTag(q.getTarget(),'a'),s=r&&c('DataStore').get(r,'stashedHref');if(l(s))r.setAttribute('href',s);});}function k(m,n){var o=c('DOM').scry(m,'a');if(n)o=o.filter(function(p){return n(p.getAttribute('href'));});o.forEach(function(p){p.removeAttribute('href');if(!p.tabIndex)p.setAttribute('tabindex',0);});}function l(m){return m&&m!=='#';}f.exports=i;},null);
__d('SplitImage.react',['cx','React','Image.react','joinClasses'],function a(b,c,d,e,f,g,h){if(c.__markCompiled)c.__markCompiled();var i=c('React').createClass({displayName:'SplitImage',render:function(){var j=this.props.size;return (c('React').createElement('div',babelHelpers['extends']({},this.props,{className:c('joinClasses')(this.props.className,"_55lt"),style:babelHelpers['extends']({},this.props.style||{},{width:j,height:j})}),this.renderImages()));},renderImages:function(){if(!this.props.srcs)return null;var j=this.props.srcs,k=Array.isArray(j);if(k){j=j.filter(function(l){return l!==null;});if(!j.length)return null;}if(!k||j.length==1)return this.renderOne(k?j[0]:j);return j.length==2?this.renderTwo(j):this.renderThree(j);},renderOne:function(j){return (c('React').createElement(c('Image.react'),{src:j,width:this.props.size,height:this.props.size,alt:''}));},renderTwo:function(j){var k=this.props.size,l=Math.floor(k/2),m=-Math.floor(l/2),n="_55lu"+(this.props.border?' '+"_57xo":'');return (c('React').createElement('div',null,c('React').createElement('div',{className:"_55lu",style:{width:l}},c('React').createElement(c('Image.react'),{src:j[0],width:k,height:k,style:{marginLeft:m},alt:''})),c('React').createElement('div',{className:n,style:{width:l}},c('React').createElement(c('Image.react'),{src:j[1],width:k,height:k,style:{marginLeft:m},alt:''}))));},renderThree:function(j){var k=this.props.size,l=Math.floor(k/3*2),m=-Math.floor((k-l)/2),n=Math.floor(k/2),o=k-l,p=-Math.floor((n-o)/2),q="_55lu"+(this.props.border?' '+"_57pl":''),r="_55lu"+(this.props.border?' '+"_57pm":'');return (c('React').createElement('div',null,c('React').createElement('div',{className:q,style:{width:l}},c('React').createElement(c('Image.react'),{src:j[0],width:k,height:k,style:{marginLeft:m},alt:''})),c('React').createElement('div',{className:r,style:{width:o,height:n}},c('React').createElement(c('Image.react'),{src:j[1],width:n,height:n,style:{marginLeft:p},alt:''})),c('React').createElement('div',{className:"_55lu",style:{width:o,height:n}},c('React').createElement(c('Image.react'),{src:j[2],width:n,height:n,style:{marginLeft:p},alt:''}))));}});f.exports=i;},null);
__d('getNormalizedClientRect',['getDocumentScrollElement'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();function h(i){var j=i.getBoundingClientRect(),k=0,l=0,m=c('getDocumentScrollElement')(i.ownerDocument),n=m.getBoundingClientRect();if(n.left>0){k=-n.left;}else{var o=m.scrollWidth+n.left,p=n.width;if(p>o)k=p-o;}if(n.top>0)l=-n.top;return {bottom:j.bottom+l,height:j.height,left:j.left+k,right:j.right+k,top:j.top+l,width:j.width};}f.exports=h;},null);
__d('ChatPerfInstrumentation',['Promise','BanzaiLogger','BaseEventEmitter','ChatPerfEvent','emptyFunction','performanceAbsoluteNow'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();var h=void 0,i={_startTime:(Number),_sidebarStartTime:(Number),init:function(){this._startTime=c('performanceAbsoluteNow')();return new (c('Promise'))(function(j){return j();});},initDivebar:function(){this._sidebarStartTime=c('performanceAbsoluteNow')();},_log:function(event,j){var k=c('performanceAbsoluteNow')()-(j||this._startTime);if(h)h.emit(event,k);c('BanzaiLogger').log('ChatPerfLoggerConfig',{event:event,duration:k});},addPerfTimingsListener:function(event,j){if(!h)h=new (c('BaseEventEmitter'))();return h.once(event,j);},logInitStores:function(){this.logInitStores=c('emptyFunction');this._log(c('ChatPerfEvent').CHAT_INIT_STORES);},logInitData:function(){this.logInitData=c('emptyFunction');this._log(c('ChatPerfEvent').CHAT_INIT_DATA);},logInitUI:function(){this.logInitUI=c('emptyFunction');this._log(c('ChatPerfEvent').CHAT_INIT_UI);},logInitSound:function(){this.logInitSound=c('emptyFunction');this._log(c('ChatPerfEvent').CHAT_INIT_SOUND);},logDisplayDone:function(){this.logDisplayDone=c('emptyFunction');this._log(c('ChatPerfEvent').CHAT_DISPLAY_DONE);},logTTI:function(){this.logTTI=c('emptyFunction');this._log(c('ChatPerfEvent').TTI);},logCHAT_CONVERSATION_TTI:function(){this.logCHAT_CONVERSATION_TTI=c('emptyFunction');this._log(c('ChatPerfEvent').CHAT_CONVERSATION_TTI);},logSIDEBAR_FROM_CLIENT_TTI:function(){this.logSIDEBAR_FROM_CLIENT_TTI=c('emptyFunction');this._log(c('ChatPerfEvent').SIDEBAR_FROM_CLIENT_TTI,this._sidebarStartTime);},logSIDEBAR_DISPLAY_DONE:function(){this.logSIDEBAR_DISPLAY_DONE=c('emptyFunction');this._log(c('ChatPerfEvent').SIDEBAR_DISPLAY_DONE,this._sidebarStartTime);}};f.exports=i;},null);
__d('ChatSidebar',['csx','Arbiter','AsyncRequest','ChatDispatcher','ChatImpressionLogger','ChatPerfInstrumentation','ChatSidebarActions','ChatSidebarStore','ChatSidebarVisibility','CSS','DOM','DOMDimensions','Event','LogHistory','KeyEventController','LitestandClassicPlaceHolders','Parent','PresencePrivacy','PresenceUtil','ScrollableArea','SidebarType','Style','TimeSlice','ViewportBounds','debounce','emptyFunction','ge'],function a(b,c,d,e,f,g,h){if(c.__markCompiled)c.__markCompiled();var i,j,k,l,m,n,o=false,p,q=true,r=null,s=c('LogHistory').getInstance('chat_sidebar');function t(){return c('ChatSidebarStore').getVisibleType()===c('SidebarType').SIDEBAR;}function u(ea,fa){if(!t())return;if(fa){m.hide();}else{m.show();x();}}function v(){return !t()||!l?0:206;}function w(){c('CSS').removeClass(document.documentElement,'sidebarMode');if(!c('ChatSidebarStore').isInitialized()){c('Arbiter').inform('reflow');c('ViewportBounds').inform('change');return;}m.hide();c('CSS').hide(l);c('CSS').hide(k);c('Arbiter').inform('sidebar/visibility',false,c('Arbiter').BEHAVIOR_STATE);c('Arbiter').inform('reflow');c('ViewportBounds').inform('change');}function x(ea){if(!ea||ea.width!==r.width)c('ChatSidebarActions').show(r);if(!ea||ea.height!==r.height)aa();}function y(ea){var fa=r||c('ChatSidebarVisibility').getViewport(),ga=fa.height;ea.forEach(function(ha){if(ha&&ha!==i&&!c('CSS').hasClass(ha,'hidden_elem'))ga-=c('DOMDimensions').getElementDimensions(ha).height;});if(p)ga-=p.getOffset();if(n)ga-=c('DOMDimensions').getElementDimensions(n).height;return Math.max(0,ga);}function z(){c('CSS').show(k);c('CSS').show(l);c('CSS').addClass(document.documentElement,'sidebarMode');m.show();s.log('sidebar_show','{}');c('Arbiter').inform('sidebar/visibility',true,c('Arbiter').BEHAVIOR_STATE);c('LitestandClassicPlaceHolders').destroy('sidebar');c('ViewportBounds').inform('change');if(!o){aa();o=true;}}function aa(){if(c('ChatSidebarStore').getVisibleType()!==c('SidebarType').SIDEBAR)return;var ea=da.getBodyHeight(),fa=m.getItemHeight(),ga=8;c('Style').set(i,'height',ea+'px');var ha=Math.floor((ea-ga)/fa);m.setNumTopFriends(ha,q);q=false;var ia=Math.floor(ea-ga);c('Arbiter').inform('sidebar/resized',ia,c('Arbiter').BEHAVIOR_STATE);c('Arbiter').inform('reflow');}function ba(){new (c('AsyncRequest'))('/ajax/chat/settings.php').setHandler(c('emptyFunction')).setErrorHandler(c('emptyFunction')).setData({sidebar_mode:c('ChatSidebarStore').isEnabled(),window_id:c('PresenceUtil').getSessionID()}).setAllowCrossPageTransition(true).send();}function ca(){var ea=true;if(!c('ChatSidebarStore').isEnabled()){s.log('state_not_enabled','{}');ea=false;}if(c('ChatSidebarVisibility').hasLowFriendCount()){s.log('state_not_shown_num_friends','{}');ea=false;}if(!c('ChatSidebarVisibility').isViewportCapable(r))ea=false;var fa=ea?'state_shown':'state_not_shown';s.log(fa,'{}');c('ChatPerfInstrumentation').logSIDEBAR_FROM_CLIENT_TTI();}var da={init:function(ea,fa){da.init=c('emptyFunction');c('ChatPerfInstrumentation').initDivebar();c('ChatDispatcher').explicitlyRegisterStore(c('ChatSidebarStore'));c('ChatSidebarActions').loaded();l=ea;m=fa;i=c('DOM').find(ea,'div.fbChatSidebarBody');k=c('DOM').find(ea,"._51x_");n=c('DOM').find(ea,"._5qqe");c('Event').listen(window,'resize',function(){var ga=babelHelpers['extends']({},r)||{};this._cacheViewport();x(ga);}.bind(this));c('KeyEventController').registerKey('q',function(event){if(c('ChatSidebarStore').getVisibleType()!==c('SidebarType').SIDEBAR)return;if(!j){var ga=c('DOM').scry(ea,"._3rhb input");if(ga.length>0)j=ga[0];}if(j){j.focus();event.prevent();}});m.setScrollContainer(c('Parent').byClass(m.getRoot(),'uiScrollableAreaWrap'));m.subscribe(['render','show','hide'],c('debounce')(function(ga){var ha=c('ScrollableArea').getInstance(m.getRoot());ha&&ha.adjustGripper();}));c('Arbiter').subscribe('chat/option-changed',function(ga,ha){if(ha.name==='hide_groups')aa();});c('Arbiter').subscribe(['AppsDivebar/show-apps','AppsDivebar/hide-apps','Ticker/resized'],aa);c('Arbiter').subscribe('sidebar/typeahead/active',u);c('PresencePrivacy').subscribe('privacy-user-presence-changed',x);c('ChatSidebarStore').addListener(function(){var ga=c('ChatSidebarStore').getState(),ha=c('ChatSidebarStore').getPrevState();if(ga.visible!==ha.visible)switch(ga.visible){case c('SidebarType').SIDEBAR:z();break;case c('SidebarType').BUDDYLIST:w();break;}if(ga.enabled!==ha.enabled)ba();});this._cacheViewport();x();c('ChatImpressionLogger').init(m);c('ViewportBounds').addPersistentRight(v);c('Arbiter').inform('sidebar/initialized',da,c('Arbiter').BEHAVIOR_STATE);c('ChatSidebarActions').init();ca();},ensureLoaded:function(){if(!c('ChatSidebarStore').isEnabled())return;if(c('ChatSidebarStore').isLoaded())return;if(c('ge')('pagelet_sidebar'))return;e(['UIPagelet'],function(ea){var fa=c('DOM').create('div',{id:'pagelet_sidebar'});c('DOM').appendContent(document.body,fa);ea.loadFromEndpoint('SidebarPagelet','pagelet_sidebar');});c('ChatSidebarActions').loaded();},hide:function(){if(!c('ChatSidebarStore').isEnabled())return;c('ChatSidebarActions').disable();},unhide:function(){if(c('ChatSidebarStore').isEnabled())return;c('ChatSidebarActions').enable();},_cacheViewport:function(){r=c('ChatSidebarVisibility').getViewport();},getBodyHeight:function(){return y(Array.from(k.childNodes));}};da.init=c('TimeSlice').guard(da.init,'ChatSidebar init');f.exports=da;},null);
__d('MercuryParticipantListRenderer',['fbt','MercuryIDs'],function a(b,c,d,e,f,g,h){'use strict';if(c.__markCompiled)c.__markCompiled();function i(){this.$MercuryParticipantListRenderer1=false;this.$MercuryParticipantListRenderer2=false;this.$MercuryParticipantListRenderer3=false;this.$MercuryParticipantListRenderer4=0;this.$MercuryParticipantListRenderer5=null;this.$MercuryParticipantListRenderer6=function(s){if(this.$MercuryParticipantListRenderer5){var t=c('MercuryIDs').getUserIDFromParticipantID(s.id);if(this.$MercuryParticipantListRenderer5[t])return this.$MercuryParticipantListRenderer5[t];}return this.$MercuryParticipantListRenderer2?s.short_name:s.name;}.bind(this);}i.prototype.renderParticipantList=function(s){var t=s.map(this.$MercuryParticipantListRenderer6);switch(t.length){case 0:return j(this.$MercuryParticipantListRenderer1);case 1:return k(t);case 2:return this.$MercuryParticipantListRenderer3?m(t):l(t);case 3:return this.$MercuryParticipantListRenderer3?o(t):n(t);default:return this.$MercuryParticipantListRenderer3?q(t,this.$MercuryParticipantListRenderer4):p(t,this.$MercuryParticipantListRenderer4);}};i.prototype.setIsNewThread=function(s){this.$MercuryParticipantListRenderer1=s;return this;};i.prototype.setNameRenderer=function(s){this.$MercuryParticipantListRenderer6=s;return this;};i.prototype.setUseShortName=function(s){this.$MercuryParticipantListRenderer2=s;return this;};i.prototype.setNickname=function(s){this.$MercuryParticipantListRenderer5=s;return this;};i.prototype.setUseAndSeparator=function(s){this.$MercuryParticipantListRenderer3=s;return this;};i.prototype.setTotalParticipantCount=function(s){this.$MercuryParticipantListRenderer4=s;return this;};function j(s){if(s){return h._("New Message");}else return h._("No Participants");}function k(s){return s[0];}function l(s){return h._("{participant1}, {participant2}",[h.param('participant1',s[0]),h.param('participant2',s[1])]);}function m(s){return h._("{participant1} and {participant2}",[h.param('participant1',s[0]),h.param('participant2',s[1])]);}function n(s){return h._("{participant1}, {participant2}, {participant3}",[h.param('participant1',s[0]),h.param('participant2',s[1]),h.param('participant3',s[2])]);}function o(s){return h._("{participant1}, {participant2} and {participant3}",[h.param('participant1',s[0]),h.param('participant2',s[1]),h.param('participant3',s[2])]);}function p(s,t){return h._("{participant1}, {participant2}, {participant3}, {others_link}",[h.param('participant1',s[0]),h.param('participant2',s[1]),h.param('participant3',s[2]),h.param('others_link',r((t||s.length)-3))]);}function q(s,t){return h._("{participant1}, {participant2} and {others_link}",[h.param('participant1',s[0]),h.param('participant2',s[1]),h.param('others_link',r((t||s.length)-2))]);}function r(s){if(s>1){return h._({"*":"{others_count} others"},[h.param('others_count',s,[0])]);}else return h._("1 other");}f.exports=i;},null);