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

__d("IrisProtocolMessageLifetime",[],(function a(b,c,d,e,f,g){f.exports={TTL_OFF:0,TTL_ON_UNKNOWN:1,TTL_30SECONDS:3e4,TTL_1MINUTE:6e4,TTL_3MINUTES:18e4,TTL_5MINUTES:3e5,TTL_10MINUTES:6e5,TTL_15MINUTES:9e5,TTL_30MINUTES:18e5,TTL_1HOUR:36e5,TTL_2HOURS:72e5,TTL_4HOURS:144e5,TTL_8HOURS:288e5,TTL_12HOURS:432e5,TTL_24HOURS:864e5}}),null);
__d("MessageLiveLocationClientSyncProtocolStopReason",[],(function a(b,c,d,e,f,g){f.exports={EXPIRED:1,CANCELED:2,ARRIVED:3}}),null);
__d("WorkUserAvailabilityStatusType",[],(function a(b,c,d,e,f,g){f.exports={NONE:"None",AVAILABLE:"Available",SPORADIC:"Sporadic",TENTATIVE:"Tentative",BUSY:"Busy",DO_NOT_DISTURB:"Do Not Disturb",FOCUS:"Focus"}}),null);
__d("isInFocusMode",["WorkFocusModeController"],(function a(b,c,d,e,f,g){var h=c("WorkFocusModeController").WorkFocusMode,i=function i(j){return!!(h&&h.currentViewerInFocusMode(j))};f.exports=i}),null);
__d("ChatUnreadCount",["ChatConfig","ChatDispatcher","ChatUnreadCountActionTypes","Map","MercuryIDs","MercurySingletonProvider","MercuryThreadInformer","MercuryThreads","MercuryUnreadState","isInFocusMode"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();h.getForFBID=function(j){return i.getForFBID(j)};h.get=function(){return i.get()};function h(j){this.$ChatUnreadCount1=j;this.$ChatUnreadCount2=c("MercuryThreadInformer").getForFBID(j);this.$ChatUnreadCount3=c("MercuryThreads").getForFBID(j);this.$ChatUnreadCount4=new(c("Map"))();this.$ChatUnreadCount5=c("MercuryUnreadState").getForFBID(j);this.setupSubscriptions()}h.prototype.getUnreadCountForUID=function(j){__p&&__p();if(!j)return null;var k=c("MercuryIDs").getThreadIDFromUserID(j);if(!this.$ChatUnreadCount5.getIsThreadUnread(k)&&!c("ChatConfig").get("unread_count_fix")){this.$ChatUnreadCount4["delete"](j);return 0}var l=this.$ChatUnreadCount3.getOrFetch(k),m=l&&l.unread_count;if(!m&&c("ChatConfig").get("unread_count_fix"))this.$ChatUnreadCount4["delete"](j);else this.$ChatUnreadCount4.set(j,m);if(c("isInFocusMode")(k))return 0;return m};h.prototype.setupSubscriptions=function(){__p&&__p();this.$ChatUnreadCount2.subscribe("threads-updated",function(j,k){var l=Object.keys(k).some(function(m){var n=c("MercuryIDs").getUserIDFromThreadID(m);if(!n)return false;var o=this.getUnreadCountForUID(n),p=this.$ChatUnreadCount4.get(n)||0;return o!==p}.bind(this));if(l)c("ChatDispatcher").dispatch({type:c("ChatUnreadCountActionTypes").COUNT_UPDATED})}.bind(this));this.$ChatUnreadCount2.subscribe("unread-updated",function(){return c("ChatDispatcher").dispatch({type:c("ChatUnreadCountActionTypes").COUNT_UPDATED})})};var i=new(c("MercurySingletonProvider"))(h);f.exports=h}),null);
__d("FBPaymentsDialogStore",["FBPaymentsDialogActions","FBPaymentsDispatcher","FluxStore"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h,i;h=babelHelpers.inherits(j,c("FluxStore"));i=h&&h.prototype;function j(){i.constructor.call(this,c("FBPaymentsDispatcher"));this.$FBPaymentsDialogStore1={dialogClass:null,dialogProps:null}}j.prototype.__onDispatch=function(k){var l=k.type,m=k.data;switch(l){case c("FBPaymentsDialogActions").types.SHOW_DIALOG:this.$FBPaymentsDialogStore1={dialogClass:m.dialogClass,dialogProps:m.dialogProps};this.__emitChange();break;case c("FBPaymentsDialogActions").types.HIDE_DIALOG:this.$FBPaymentsDialogStore1={dialogClass:null,dialogProps:null};this.__emitChange();break}};j.prototype.getState=function(){return this.$FBPaymentsDialogStore1};f.exports=new j()}),null);
__d("FBPaymentsDialogContainer.react",["FBPaymentsDialogStore","FBPaymentsDispatcher","FluxContainer","React"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h,i;h=babelHelpers.inherits(j,c("React").Component);i=h&&h.prototype;j.calculateState=function(){return c("FBPaymentsDialogStore").getState()};j.getStores=function(){return[c("FBPaymentsDialogStore")]};j.prototype.componentWillMount=function(){c("FBPaymentsDispatcher").explicitlyRegisterStore(c("FBPaymentsDialogStore"))};j.prototype.render=function(){if(!this.state.dialogClass)return null;var k=this.state.dialogClass;return c("React").createElement(k,babelHelpers["extends"]({},this.state.dialogProps,{key:"dialog"}))};function j(){h.apply(this,arguments)}f.exports=c("FluxContainer").create(j)}),null);
__d("FBPaymentsDialogContainerMount",["FBPaymentsDialogContainer.react","React","ReactDOM"],(function a(b,c,d,e,f,g){"use strict";var h={mount:function i(j){c("ReactDOM").render(c("React").createElement(c("FBPaymentsDialogContainer.react"),null),j)}};f.exports=h}),null);
__d("MercurySyncHolesTypedLogger",["Banzai","GeneratedLoggerUtils","nullthrows"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();function h(){this.clear()}h.prototype.log=function(){c("GeneratedLoggerUtils").log("logger:MercurySyncHolesLoggerConfig",this.$MercurySyncHolesTypedLogger1,c("Banzai").BASIC)};h.prototype.logVital=function(){c("GeneratedLoggerUtils").log("logger:MercurySyncHolesLoggerConfig",this.$MercurySyncHolesTypedLogger1,c("Banzai").VITAL)};h.prototype.clear=function(){this.$MercurySyncHolesTypedLogger1={};return this};h.prototype.updateData=function(j){this.$MercurySyncHolesTypedLogger1=babelHelpers["extends"]({},this.$MercurySyncHolesTypedLogger1,j);return this};h.prototype.setDifference=function(j){this.$MercurySyncHolesTypedLogger1.difference=j;return this};h.prototype.setSeqID=function(j){this.$MercurySyncHolesTypedLogger1.seq_id=j;return this};h.prototype.setTopicType=function(j){this.$MercurySyncHolesTypedLogger1.topic_type=j;return this};h.prototype.setVC=function(j){this.$MercurySyncHolesTypedLogger1.vc=j;return this};var i={difference:true,seq_id:true,topic_type:true,vc:true};f.exports=h}),null);
__d("ChatActivity",["Arbiter","Event","JSLogger","MercuryConfig","PresenceState","UserActivity"],(function a(b,c,d,e,f,g){__p&&__p();var h=c("MercuryConfig").activity_limit||6e4,i=c("MercuryConfig").idle_limit||18e5,j=c("MercuryConfig").idle_poll_interval||3e5,k=c("JSLogger").create("chat_activity"),l=Date.now(),m=true;function n(){var r=Date.now();return!!(m&&r-l<h)}var o=Object.assign(new(c("Arbiter"))(),{isActive:n});function p(){var r=l;l=Date.now();if(l-r>i){k.debug("idle_to_active",r);c("PresenceState").doSync()}o.inform("activity")}c("Event").listen(window,"focus",function(){m=true;p()});c("Event").listen(window,"blur",function(){m=false});c("UserActivity").subscribe(function(){p()});function q(r){var s=r&&r.at&&c("PresenceState").verifyNumber(r.at);if(typeof s!=="number")s=null;return s||0}setInterval(function(){var r=Date.now(),s=q(c("PresenceState").get()),t=Math.max(l,s);if(r-t>i){k.debug("idle",{cookie:s,local:l});o.inform("idle",r-t)}},j);c("PresenceState").registerStateStorer(function(r){var s=q(r);if(s<l)r.at=l;return r});c("Arbiter").subscribe(c("JSLogger").DUMP_EVENT,function(r,s){s.chat_activity={activity_limit:h,idle_limit:i,idle_poll_interval:j,last_active_time:l}});f.exports=o}),null);
__d("MercuryNotificationRenderer",["fbt","MercuryAssert","MercuryIDs","MercuryMessages","MercuryParticipants","MercuryThreads","MercuryViewer","MessagingGenericAdminTextType"],(function a(b,c,d,e,f,g,h){__p&&__p();var i=c("MercuryMessages").get(),j=c("MercuryThreads").get(),k="source:messenger_growth:event_upcoming_bump";function l(m,n){__p&&__p();c("MercuryAssert").isThreadID(m);j.getThreadMeta(m,function(o){__p&&__p();i.getThreadMessagesRange(m,0,1,function(p){__p&&__p();var q=p.length&&p[p.length-1],r=[];if(q.tags!==undefined)r=r.concat(q.tags);if(q.log_message_data&&(q.log_message_data.message_type==c("MessagingGenericAdminTextType").CONFIRM_FRIEND_REQUEST||q.log_message_data.message_type==c("MessagingGenericAdminTextType").WORK_INVITE_CLAIMED))n(h._("New contact added"));else if(r.indexOf(k)!==-1)n(h._("You have an upcoming event."));else if(q&&q.author!=c("MercuryViewer").getID())c("MercuryParticipants").get(q.author,function(s){__p&&__p();var t=s.short_name,u=o.custom_nickname;if(u){var v=c("MercuryIDs").getUserIDFromParticipantID(s.id);if(u[v])t=u[v]}if(o.name)n(h._("{senderName} messaged {groupName}",[h.param("senderName",t),h.param("groupName",o.name)]));else if(c("MercuryIDs").isGroupChat(m))n(h._("{name} messaged your group",[h.param("name",t)]));else n(h._("{name} messaged you",[h.param("name",t)]))});else n(h._("New message!"))})})}f.exports={renderDocumentTitle:l}}),null);
__d("MercuryTimestampTracker",["MercuryActionType","MercuryDispatcher","MercuryPayloadSource","MercurySingletonProvider"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();h.getForFBID=function(j){return i.getForFBID(j)};h.get=function(){return i.get()};function h(j){this.$MercuryTimestampTracker1=j;this.$MercuryTimestampTracker3=0;this.$MercuryTimestampTracker2=c("MercuryDispatcher").getForFBID(this.$MercuryTimestampTracker1);this.$MercuryTimestampTracker2.subscribe("update-messages",this.$MercuryTimestampTracker4.bind(this))}h.prototype.$MercuryTimestampTracker4=function(j,k){if(!k.actions||!k.actions.length)return;if(k.payload_source===c("MercuryPayloadSource").CLIENT_SEND_MESSAGE||k.payload_source===c("MercuryPayloadSource").UNKNOWN)return;for(var l=0;l<k.actions.length;l++){var m=k.actions[l],n=m.action_type;if(n==c("MercuryActionType").USER_GENERATED_MESSAGE&&m.thread_id&&m.timestamp>this.$MercuryTimestampTracker3)this.$MercuryTimestampTracker3=m.timestamp}};h.prototype.getLastUserMessageTimestamp=function(){return this.$MercuryTimestampTracker3};var i=new(c("MercurySingletonProvider"))(h);f.exports=h}),null);
__d("ChatTitleBarBlinker",["ChatActivity","DocumentTitle","JSLogger","MercuryThreadInformer","MercuryNotificationRenderer","PresenceState","MercuryTimestampTracker"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h=c("MercuryThreadInformer").get(),i=c("MercuryTimestampTracker").get(),j=c("JSLogger").create("chat_title"),k=null,l=0,m=false;function n(){if(k){k.stop();k=null;return true}return false}function o(u){var v=u||i.getLastUserMessageTimestamp();if(l<=v){l=v;if(n()||m)c("PresenceState").doSync()}}var p={blink:function u(v,w){if(!k&&l<w)c("MercuryNotificationRenderer").renderDocumentTitle(v,function(x){if(!k)k=c("DocumentTitle").blink(x)})},stopBlinking:function u(){o()},blinkingElsewhere:function u(){m=true}};function q(u){var v=c("PresenceState").verifyNumber(u.sb2);if(!v||v<=l)return null;return v}function r(u){var v=u&&q(u);if(v){l=v;j.debug("load",l);n();m=false}}function s(u){var v=q(u);if(!v){j.debug("store",l);u.sb2=l;m=false}return u}c("PresenceState").registerStateStorer(s);c("PresenceState").registerStateLoader(r);h.subscribe("thread-read-changed",function(u,v){var w=i.getLastUserMessageTimestamp(),x=0;for(var y in v)if(v[y].mark_as_read&&v[y].timestamp>=w&&v[y].timestamp>x)x=v[y].timestamp;x&&o(x)});c("ChatActivity").subscribe("activity",function(){return o()});var t=c("PresenceState").getInitial();if(t)l=q(t)||0;f.exports=p}),null);
__d("MercuryIgnoredBlockedParticipants.bs",["bs_caml_obj","bs_js_boolean","MercuryIDs"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();function h(l,m,n){var o=n.participants.filter(function(p){return+(p!==c("MercuryIDs").getParticipantIDFromUserID(l))});return o.filter(function(p){return+(+m.has(p)!==0)})}function i(l,m,n){return c("bs_js_boolean").to_js_boolean(1-+n.is_canonical&&+(h(l,m,n).length>0))}function j(l,m,n){if(n.is_canonical)return[];else return h(l,m,n)}function k(l,m,n){var o=+n.is_canonical;if(o!==0){var p=n.participants.filter(function(q){return c("bs_caml_obj").caml_notequal(q,c("MercuryIDs").getParticipantIDFromUserID(l))});return c("bs_js_boolean").to_js_boolean(1-+p.every(function(q){return 1-+m.has(q)}))}else return false}g.findIntersection=h;g.isPresentInGroupThread=i;g.participantsInGroupThread=j;g.qualifiesAs=k}),null);
__d("MercuryBlockedParticipants.bs",["Set","Utils.bs","MercuryIDs","bs_js_primitive","MercuryDispatcher","MercurySingletonProvider.bs","MercuryIgnoredBlockedParticipants.bs"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();function h(m,n){__p&&__p();var o=n.message_blocked_ids;if(o==null)return 0;else{o.forEach(function(p){if(m.has(p)){+m["delete"](p);return 0}else{m.add(p);return 0}});return 0}}function i(m){__p&&__p();var n=new(c("Set"))(),o=c("MercuryDispatcher").getForFBID(m);o.subscribe("update-blocked-users",function(p,q){__p&&__p();var r=q.actions;if(!(r==null))r.forEach(function(t){return h(n,t)});h(n,q);var s=c("Utils.bs").$pipe$unknown(c("bs_js_primitive").null_undefined_to_opt(q.participants),[]);s.forEach(function(t){__p&&__p();var r=c("Utils.bs").nullUndefinedBooleanToOptionBool(t.is_messenger_blocked),u=t.fbid;if(r)if(r[0]!==0)if(u==null)return 0;else{n.add(c("MercuryIDs").getParticipantIDFromUserID(u));return 0}else if(u==null)return 0;else{+n["delete"](c("MercuryIDs").getParticipantIDFromUserID(u));return 0}else return 0});return 0});return{findIntersection:function p(q){return c("MercuryIgnoredBlockedParticipants.bs").findIntersection(m,n,q)},isPresentInGroupThread:function p(q){return c("MercuryIgnoredBlockedParticipants.bs").isPresentInGroupThread(m,n,q)},blockedParticipantsInGroupThread:function p(q){return c("MercuryIgnoredBlockedParticipants.bs").participantsInGroupThread(m,n,q)},isMessageBlocked:function p(q){return c("MercuryIgnoredBlockedParticipants.bs").qualifiesAs(m,n,q)},__fbid:m}}var j=c("MercurySingletonProvider.bs").Provider([i]),k=j[0],l=j[1];g.getForFBID=k;g.get=l}),null);
__d("MercuryBrowserAlerts",["ArbiterMixin","ChatActivity","ChatConfig","ChatOptions","ChatTitleBarBlinker","Event","Map","MercuryBlockedParticipants.bs","MercuryIDs","MercuryThreadInfo","MercuryThreads","MercuryViewer","MessagingTag","Sound","UserActivity"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h=c("MercuryBlockedParticipants.bs").get(),i=c("MercuryThreads").get(),j=3,k=6e5,l=new(c("Map"))(),m=null;function n(){return!c("UserActivity").isOnTab()&&!c("UserActivity").hasBeenInactive()}function o(){l=new(c("Map"))()}function p(r){if(c("ChatOptions").getSetting("sound")&&!n())c("Sound").play([c("ChatConfig").get("sound.notif_ogg_url"),c("ChatConfig").get("sound.notif_mp3_url")],r,false)}var q=Object.assign({init:function r(){c("Event").listen(window,"focus",function(){o();clearInterval(m)});c("Event").listen(window,"blur",function(){m=setInterval(o,k)})},messageReceived:function r(s){__p&&__p();if(s.author&&c("MercuryViewer").isViewer(s.author)||!s.is_unread||s.folder!=c("MessagingTag").INBOX&&s.folder!=c("MessagingTag").ARCHIVED)return;var t=s.thread_id,u=c("ChatActivity").isActive();if(u){var v=false;q.inform("before-alert",{threadID:t,cancelAlert:function w(){v=true}})}i.getThreadMeta(t,function(w){__p&&__p();var x=c("MercuryThreadInfo").isMuted(w),y=c("MercuryIDs").getUserIDFromParticipantID(c("MercuryViewer").getID());if(x)if(!c("MercuryThreadInfo").areMentionsMuted(w)){if(!s.profile_ranges||!s.profile_ranges.some||!s.profile_ranges.some(function(B){return B.id===y}))return}else return;if(h.isPresentInGroupThread(w))return;var z=s.timestamp;if(u)!v&&p(z);else{c("ChatTitleBarBlinker").blink(t,z);var A=l.get(t)||0;if(A<j){l.set(t,A+1);p(z)}}c("ChatTitleBarBlinker").blinkingElsewhere()})}},c("ArbiterMixin"));f.exports=q}),null);
__d("ChatAppActionTypes",["keyMirror"],(function a(b,c,d,e,f,g){"use strict";f.exports=c("keyMirror")({INITIAL_DISPLAY_DONE:null,HIDE:null,LOAD:null,TTI:null,UNHIDE:null})}),null);
__d("ChatAppActions",["ChatDispatcher","ChatAppActionTypes"],(function a(b,c,d,e,f,g){"use strict";var h={tti:function i(){c("ChatDispatcher").dispatch({type:c("ChatAppActionTypes").TTI})},hide:function i(){c("ChatDispatcher").dispatch({type:c("ChatAppActionTypes").HIDE})},unhide:function i(){c("ChatDispatcher").dispatch({type:c("ChatAppActionTypes").UNHIDE})},setInitialDisplayDone:function i(){c("ChatDispatcher").dispatch({type:c("ChatAppActionTypes").INITIAL_DISPLAY_DONE})},load:function i(){c("ChatDispatcher").dispatch({type:c("ChatAppActionTypes").LOAD})}};f.exports=h}),null);
__d("ChatAppStore",["ChatAppActionTypes","ChatDispatcher","FluxStore"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h,i;h=babelHelpers.inherits(j,c("FluxStore"));i=h&&h.prototype;function j(){i.constructor.call(this,c("ChatDispatcher"));this.$ChatAppStore2={initialDisplayDone:false,isHidden:false,isInitialized:false,isLoaded:false};this.$ChatAppStore1=babelHelpers["extends"]({},this.$ChatAppStore2)}j.prototype.__onDispatch=function(k){__p&&__p();var l=k.type;this.$ChatAppStore1=babelHelpers["extends"]({},this.$ChatAppStore2);switch(l){case c("ChatAppActionTypes").INITIAL_DISPLAY_DONE:this.$ChatAppStore2.initialDisplayDone=true;this.__emitChange();break;case c("ChatAppActionTypes").HIDE:this.$ChatAppStore2.isHidden=true;this.__emitChange();break;case c("ChatAppActionTypes").UNHIDE:this.$ChatAppStore2.isHidden=false;this.__emitChange();break;case c("ChatAppActionTypes").TTI:this.$ChatAppStore2.isInitialized=this.$ChatAppStore2.isLoaded=true;this.__emitChange();break;case c("ChatAppActionTypes").LOAD:this.$ChatAppStore2.isLoaded=true;this.__emitChange();break}};j.prototype.getPreviousState=function(){return this.$ChatAppStore1};j.prototype.getState=function(){return this.$ChatAppStore2};f.exports=new j()}),null);
__d("ChatPrivacyActionController",["ChatVisibility","JSLogger","PresencePrivacy"],(function a(b,c,d,e,f,g){__p&&__p();var h=function h(i,j){__p&&__p();this._userID=i;this._logger=c("JSLogger").create("blackbird");this._getState=function(){if(c("ChatVisibility").isOnline())return c("PresencePrivacy").allows(this._userID)?h.NORMAL:h.BLOCKED;return h.OFFLINE};this._togglePrivacy=function(){__p&&__p();var l=this._getState();switch(this._getState()){case h.OFFLINE:if(c("ChatVisibility").isOnline()){this._logger.error("tabs_already_online");break}this._logger.log("tabs_go_online",{tab_id:this._userID});c("ChatVisibility").goOnline(function(){if(!c("PresencePrivacy").allows(this._userID)){if(this._getState()!==h.BLOCKED)this._logger.error("privacy_action_controller_blocked_inconsistency");this._togglePrivacy()}}.bind(this));break;case h.BLOCKED:c("PresencePrivacy").allow(this._userID);this._logger.log("tabs_unblock",{tab_id:this._userID});break;case h.NORMAL:c("PresencePrivacy").disallow(this._userID);this._logger.log("tabs_block",{tab_id:this._userID});break}};var k=function(){j&&j(this._getState())}.bind(this);k();this._subscribeToken=c("PresencePrivacy").subscribe("privacy-changed",k)};h.OFFLINE="offline";h.BLOCKED="blocked";h.NORMAL="normal";Object.assign(h.prototype,{togglePrivacy:function i(){this._logger.log("gear_menu_toggle_privacy",{tab_id:this._userID});this._togglePrivacy()},destroy:function i(){this._subscribeToken&&c("PresencePrivacy").unsubscribe(this._subscribeToken)}});f.exports=h}),null);
__d("ChatTimezoneWarning",["MercuryParticipants","MercuryViewer","MessengerBotIDs"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h=1,i={updateUserTimezoneWarning:function j(k,l,m){__p&&__p();c("MercuryParticipants").get(c("MercuryViewer").getID(),function(n){__p&&__p();var o=n.employee,p=n.timezone,q=0;if(k.timezone_warning_dismiss_count!==undefined){var r=k.timezone_warning_dismiss_count;for(var s=Object.entries(r),t=Array.isArray(s),u=0,s=t?s:s[typeof Symbol==="function"?Symbol.iterator:"@@iterator"]();;){var v;if(t){if(u>=s.length)break;v=s[u++]}else{u=s.next();if(u.done)break;v=u.value}var w=v,x=w[0],y=w[1];if(x===n.fbid)q=Number(y)}}else return;if(o&&p&&q<h)c("MercuryParticipants").getMulti(k.participants,function(z){__p&&__p();var A={},B=true;for(var C in z){B=B&&z[C].employee;var D=!!c("MessengerBotIDs")[z[C].fbid];if(z[C].timezone!==undefined&&z[C].timezone!==null&&p!==z[C].timezone&&!D){var E=z[C].fbid;A[E]=z[C]}}if(Object.keys(A).length>0&&B){A.self=n;l(A)}else m()})})}};f.exports=i}),null);
__d("ChatVideoCallButton.react",["cx","fbt","invariant","Bootloader","FantaAvailableStatus","FBIDCheck","FBRTCCallabilityStore","FBRTCCore","immutable","ImmutableObject","Keys","LayerFadeOnHide","Link.react","MercuryIDs","MercuryParticipants","MercuryThreadIDMap","MessengerRTCFunnelLogger","ReactComponentWithPureRenderMixin","React","RTCCallState","StoreAndPropBasedStateMixin","TrackingNodes","FBRTCLogger","VideoCallTypedLogger","XUIAmbientNUX.react"],(function a(b,c,d,e,f,g,h,i,j){"use strict";__p&&__p();var k=c("MercuryThreadIDMap").get(),l=c("FBRTCLogger").Trigger,m=c("React").PropTypes,n={isCallable:false,shown:false,user:null},o=c("React").createClass({displayName:"ChatVideoCallButton",mixins:[c("ReactComponentWithPureRenderMixin"),c("StoreAndPropBasedStateMixin")(c("FBRTCCallabilityStore"),c("MercuryParticipants"))],propTypes:{isAudio:m.bool,isGroupChat:m.bool,onRTCNuxCloseButtonClick:m.func.isRequired,rtcNuxShown:m.bool.isRequired,threadID:m.string,thread:m.object,viewer:m.string.isRequired,shown:m.bool,rtcCallData:m.object.isRequired},getDefaultProps:function p(){return{shown:true,rtcCallData:{call_state:"NO_ONGOING_CALL"}}},statics:{calculateState:function p(q){__p&&__p();if(!q.threadID)return babelHelpers["extends"]({},n);if(q.isGroupChat)return{isCallable:true,shown:q.shown,user:null};var r=c("MercuryIDs").getUserIDFromThreadID(q.threadID);if(r===q.viewer||!c("FBIDCheck").isUser_deprecated(r))return babelHelpers["extends"]({},n);r&&c("FBIDCheck").isUser_deprecated(r)||j(0);var s=c("MercuryIDs").getParticipantIDFromUserID(r),t=c("MercuryParticipants").getOrFetch(s);return{isCallable:c("FBRTCCallabilityStore").isCallable(r,q.thread),shown:q.shown,user:t}}},getTooltipLabel:function p(){if(this.props.isGroupChat)return this.props.isAudio?i._("Start a group call"):i._("Start a group video chat");var q=this.state.user;if(!q)return undefined;return this.props.isAudio?c("FBRTCCallabilityStore").voiceCallButtonTooltip(q.fbid,q.short_name,this.state.isCallable):c("FBRTCCallabilityStore").callButtonTooltip(q.fbid,q.short_name,this.state.isCallable)},render:function p(){if(!this.state.shown)return null;var q=c("TrackingNodes").getTrackingInfo(this.props.isAudio?c("TrackingNodes").types.VIDEOCHAT:c("TrackingNodes").types.VOICECHAT),r=JSON.stringify({videochat:"call_clicked_bhat_tab"}),s=this.props.threadID&&c("FantaAvailableStatus").isAvailable(this.props.thread,this.props.threadID),t=s&&this.state.isCallable;return c("React").createElement("div",null,c("React").createElement(c("Link.react"),{"aria-label":this.getTooltipLabel(),className:"button _3olv"+(this.props.isAudio?" _2fpc":"")+(!this.props.isAudio?" _2fpd":"")+(this.state.isCallable?" enabled":""),"data-ft":q,"data-gt":r,"data-hover":"tooltip","data-tooltip-content":this.getTooltipLabel(),"data-tooltip-position":"above",onClick:this._handleClick,onKeyUp:this._handleKeyUp,ref:"button"}),c("React").createElement("div",{className:t&&!this.props.isAudio?"_18pe":""}),c("React").createElement(c("XUIAmbientNUX.react"),{alignment:"right",behaviors:{LayerFadeOnHide:c("LayerFadeOnHide")},contextRef:function(){return this.refs.button}.bind(this),onCloseButtonClick:this.props.onRTCNuxCloseButtonClick,shown:this.props.rtcNuxShown,width:"auto"},i._("You can now make a group call.")))},_handleClick:function p(q){q.preventDefault();this._startCall()},_handleKeyUp:function p(q){q.preventDefault();if(q.keyCode!==c("Keys").RETURN)return;if(q.target){q.target instanceof HTMLElement||j(0);q.target.blur()}this._startCall()},_startCall:function p(){c("MessengerRTCFunnelLogger").startFunnel("ChatTab");if(!this.state.isCallable){c("MessengerRTCFunnelLogger").endFunnel("callee_not_callable");return}this.props.onRTCNuxCloseButtonClick();this._initiateCall()},_initiateCall:function p(){__p&&__p();var q=this.props,r=q.isAudio,s=q.isGroupChat,t=q.threadID;!!t||j(0);var u=r?"audio":"video";if(s)if(c("MercuryIDs").isLocalThread(t))k.getServerIDFromClientID(t,function(v){return this._initiateGroupCall(v)}.bind(this));else{c("MessengerRTCFunnelLogger").appendAction("start_in_group_thread");this._initiateGroupCall(c("MercuryIDs").getThreadFBIDFromThreadID(t))}else{c("MessengerRTCFunnelLogger").appendAction("start_in_p2p_thread");c("FBRTCCore").startOutgoingCall(this.state.user.fbid,u,!!r);new(c("VideoCallTypedLogger"))().setEvent("chat_tab_call_click").log()}},_initiateGroupCall:function p(q){__p&&__p();var r=this.props,s=r.isAudio,t=r.rtcCallData,u=t.call_state,v=t.server_info_data;if(u!=="NO_ONGOING_CALL"&&v){c("MessengerRTCFunnelLogger").appendAction("join_existing_call");c("FBRTCCore").startGroupCall({conferenceName:"GROUP:"+q,hasVideo:!s,serverInfoData:v,trigger:u!==c("RTCCallState").AUDIO_GROUP_CALL?s?l.MULTIWAY_THREAD_HEADER_JOIN_AUDIO_CALL_AUDIO_BUTTON:l.MULTIWAY_THREAD_HEADER_JOIN_AUDIO_CALL_VIDEO_BUTTON:s?l.MULTIWAY_THREAD_HEADER_JOIN_VIDEO_CALL_AUDIO_BUTTON:l.MULTIWAY_THREAD_HEADER_JOIN_VIDEO_CALL_VIDEO_BUTTON});return}c("Bootloader").loadModules(["FBRTCSupport","MercuryThreads","MessengerParticipantsFetcher.bs","MessengerRTCGroupCallUnsupportedBrowserDialogController","MessengerRTCGroupCallParticipantsPickerDialogController"],function(w,x,y,z,A){__p&&__p();if(!w.isGroupCallWebtrcSupported()){c("MessengerRTCFunnelLogger").endFunnel("unsupported_browser");z.render({hasVideo:!this.props.isAudio});return}x.get().getThreadMeta(this.props.threadID,function(B){var C=B.participants?B.participants.filter(function(D){return D!==c("MercuryIDs").getParticipantIDFromUserID(this.props.viewer)}.bind(this)).map(function(D){return c("MercuryIDs").getUserIDFromParticipantID(D)}):[];if(C.length>0)y.fetch({ids:C}).done(function(C){c("MessengerRTCFunnelLogger").appendAction("render_participant_picker");A.render({participants:c("immutable").Map(C.map(function(D){return[D.id,new(c("ImmutableObject"))(D)]})),thread:B,viewerID:this.props.viewer,trigger:this.props.isAudio?l.MULTIWAY_THREAD_HEADER_AUDIO_BUTTON:l.MULTIWAY_THREAD_HEADER_VIDEO_BUTTON,conferenceName:"GROUP:"+q,hasVideo:!this.props.isAudio})}.bind(this))}.bind(this))}.bind(this),"ChatVideoCallButton.react")}});f.exports=o}),null);
__d("MontageDispatcher",["ExplicitRegistrationDispatcher"],(function a(b,c,d,e,f,g){"use strict";var h,i;h=babelHelpers.inherits(j,c("ExplicitRegistrationDispatcher"));i=h&&h.prototype;function j(){h.apply(this,arguments)}f.exports=new j({strict:false})}),null);
__d("MontageActions",["MontageDispatcher","keyMirror"],(function a(b,c,d,e,f,g){"use strict";var h=c("keyMirror")({REQUEST_UPDATE:null,HAS_UPDATED:null}),i={Types:h,requestUpdate:function j(k){c("MontageDispatcher").dispatch({type:h.REQUEST_UPDATE,threadFBID:k})},hasUpdated:function j(k){c("MontageDispatcher").dispatch({type:h.HAS_UPDATED,threadFBID:k})}};f.exports=i}),null);
__d("MercuryTypeaheadDataSource",["CurrentUser","DataSource","MercuryParticipantTypes","MercuryTypeaheadConstants","OrderedFriendsList","ShortProfiles","WorkModeConfig"],(function a(b,c,d,e,f,g){__p&&__p();var h,i,j=[],k={},l={},m={},n=[],o=false,p=false;h=babelHelpers.inherits(q,c("DataSource"));i=h&&h.prototype;function q(r){"use strict";r=r||{};r.kanaNormalization=true;i.constructor.call(this,r);this.showDefaultList=r.showDefaultList||false}q.prototype.dirty=function(){"use strict";this.$MercuryTypeaheadDataSource1=j;this.localCache=l;this.queryCache=k;this.queryIDs=m;this.defaultList=n;return this};q.prototype.bootstrap=function(){"use strict";__p&&__p();if(o||p)return false;p=true;c("ShortProfiles").fetchAll().then(function(){this.updateBootstrapData();p=false;o=true;if(this.showDefaultList)this.inform("show-default")}.bind(this),function(){}.bind(this));return true};q.prototype.updateBootstrapData=function(){"use strict";__p&&__p();var r=this.getCachedShortProfileIDs(),s=c("WorkModeConfig").is_work_user?c("MercuryParticipantTypes").FB4C:c("MercuryParticipantTypes").FRIEND,t=r.map(function(v){var w=c("ShortProfiles").getNow(v),x=v==c("CurrentUser").getID()?s:w.type,y=[w.additionalName,w.alternateName].concat(w.searchTokens||[]).join(" "),z=w.name,A=null;return{uid:v,index:c("OrderedFriendsList").getActiveRank(v),text:z,subtext:A,tokens:y,localized_text:w.name,additional_text:w.additionalName,photo:w.thumbSrc,render_type:x,type:c("MercuryTypeaheadConstants").USER_TYPE}});if(t.length)this.addEntries(t);if(!this.showDefaultList)return;var u=t.sort(function(v,w){return v.index-w.index}).slice(0,5);n=this.buildData(u.map(function(v){return v.uid}));this.defaultList=n};q.prototype.query=function(r,s,t,u){"use strict";var v=s||r.length===1;return i.query.call(this,r,v,t,u)};q.prototype.getQueryData=function(r,s){"use strict";return babelHelpers["extends"]({},i.getQueryData.call(this,r,s))};q.prototype.setEntry=function(r,s){"use strict";this.$MercuryTypeaheadDataSource1[r]=s};q.prototype.getEntry=function(r){"use strict";return this.$MercuryTypeaheadDataSource1[r]||null};q.prototype.getCachedShortProfileIDs=function(){"use strict";var r=c("ShortProfiles").getCachedProfileIDs(),s=r.filter(function(t){var u=c("ShortProfiles").getNow(t);return t==c("CurrentUser").getID()||u.type===c("MercuryParticipantTypes").FRIEND||u.type===c("MercuryParticipantTypes").FB4C});return s};q.prototype.isBootstrapped=function(){"use strict";return o};q.prototype.isBootstrapping=function(){"use strict";return p};q.prototype.processEntries=function(r,s){"use strict";r=r.map(function(t){if(t.index==null&&(t.render_type===c("MercuryParticipantTypes").FRIEND||t.render_type===c("MercuryParticipantTypes").FB4C))t.index=c("OrderedFriendsList").getActiveRank(t.uid);return t});return i.processEntries.call(this,r)};q.prototype.mergeUids=function(r,s,t,u){"use strict";var v=s.sort(function(w,x){return this.getEntry(w).index-this.getEntry(x).index}.bind(this));return i.mergeUids.call(this,r,v,t,u)};q.prototype.setShowDefaultList=function(r){"use strict";this.showDefaultList=r};f.exports=q}),null);
__d("ChatTabTypeaheadDataSource",["MercuryTypeaheadConstants","MercuryTypeaheadDataSource"],(function a(b,c,d,e,f,g){__p&&__p();var h,i;h=babelHelpers.inherits(j,c("MercuryTypeaheadDataSource"));i=h&&h.prototype;function j(k){"use strict";k=k||{};k.maxResults=c("MercuryTypeaheadConstants").COMPOSER_CHATTAB_MAX;i.constructor.call(this,k);this.$ChatTabTypeaheadDataSource1=true}j.prototype.buildData=function(k){"use strict";__p&&__p();var l=[],m=[],n=[],o=[],p=[],q=[],r=[];k.forEach(function(t){__p&&__p();var u=i.getEntry.call(this,t);switch(u.render_type){case c("MercuryTypeaheadConstants").FRIEND_TYPE:l.push(t);break;case c("MercuryTypeaheadConstants").THREAD_TYPE:if(this.$ChatTabTypeaheadDataSource1)m.push(t);break;case c("MercuryTypeaheadConstants").NON_FRIEND_TYPE:n.push(t);break;case c("MercuryTypeaheadConstants").FB4C_TYPE:o.push(t);break;case c("MercuryTypeaheadConstants").PAGE_TYPE:if(this.$ChatTabTypeaheadDataSource1)p.push(t);break;case c("MercuryTypeaheadConstants").INTERNAL_BOT_PAGE_TYPE:r.push(t);break;default:break}}.bind(this),this);var s=q.concat(l,o,m,p,n,r);return i.buildData.call(this,s)};j.prototype.query=function(k,l,m,n){"use strict";return i.query.call(this,k,l,m,n)};j.prototype.respond=function(k,l,m){"use strict";return i.respond.call(this,k,l,m)};j.prototype.setShowThreads=function(k){"use strict";this.$ChatTabTypeaheadDataSource1=k};f.exports=j}),null);
__d("DisplayGenderConst",[],(function a(b,c,d,e,f,g){f.exports=Object.freeze({UNKNOWN:"UNKNOWN",FEMALE:"FEMALE",MALE:"MALE",NEUTER:"NEUTER"})}),null);
__d("MessengerServerPayloadTransformer.bs",["URI","bs_array","Utils.bs","bs_string","getByPath","bs_caml_array","bs_js_boolean","MercuryIDs","bs_caml_format","GenderConst","bs_js_primitive","WorkModeConfig","bs_js_null_undefined","DisplayGenderConst","MessagingThreadType","MessengerMessageTransformer.bs","MessengerAttachmentTransformer.bs","MessengerThreadCannotReplyReason"],(function aa(ba,a,ca,da,ea,b){"use strict";__p&&__p();function c(l){__p&&__p();var m=l.location_coordinates,n=m==null?[null,null]:[m.latitude,m.longitude],o=l.location_page,p;if(o==null)p=null;else{var q=o.address;p=q==null?null:q.full_address}var r=l.allows_rsvp,s=r!==0?1:0,t=a("bs_array").fold_left(function(v,w){v[w.node.id]=w.guest_list_state;return v},{},l.event_reminder_members.edges),u=l.lightweight_event_creator;return{creator_id:u==null?null:u.id,event_members:t,event_time:l.time,event_type:l.lightweight_event_type,latitude:n[0],longitude:n[1],location_address:p,location_name:l.location_name,note:l.note,oid:l.id,related_event:l.related_event,repeat_mode:l.repeat_mode,seconds_to_notify_before:l.seconds_to_notify_before,status:l.lightweight_event_status,title:l.event_title,track_rsvp:s}}function d(l){__p&&__p();var m=l.associated_object;if(m==null)return null;else{var n=m.action_link,o;if(n==null)o=null;else{var p=+a("WorkModeConfig").is_work_user,q=p!==0?a("WorkModeConfig").company_subdomain+".facebook.com":"www.facebook.com";o=new(a("URI"))(n).setDomain(q)}var r=m.profile_picture;return{id:m.id,name:m.name,action_link:o,profile_picture:r==null?null:{uri:r.uri},room_type:m.room_type,privacy_mode:m.privacy_mode,approval_mode_toggleable:m.approval_mode_toggleable,start_timestamp:m.start_timestamp,event_place:m.event_place,mentorship_program:m.mentorship_program}}}function e(l){var m=l.related_page_thread;if(m==null)return null;else{var n=a("bs_array").map(function(q){return q.name},m.custom_thread_tags.nodes),o=m.page,p=o==null?null:o.id;return{flagged:m.is_flagged,pageID:p,customTagNames:n}}}function f(l){__p&&__p();var m=l.thread_key.other_user_id;if(m==null)return 0;else{var n=l.all_participants.nodes;return a("bs_array").fold_left(function(o,p){var q=p.messaging_actor;if(q.id===m)return+(q.__typename==="User");else return o},0,n)}}function g(l){__p&&__p();if(l.length){var m={};a("bs_array").iter(function(n){var o=n.nickname;if(o==null)return 0;else{m[n.participant_id]=o;return 0}},l);return m}else return null}function h(l){if(!(l==null)&&l!=="")return"#"+a("bs_string").sub(l,2,l.length-2|0);else return null}function i(l){return l.thread_key.thread_fbid}function j(l){return l.thread_key.other_user_id}function fa(l){return a("bs_js_primitive").null_undefined_to_opt(a("getByPath")(l,["messages","page_info"]))}function k(l){__p&&__p();var m=l.gender,n=l.url,o;if(n==null)o=null;else{var p=+a("WorkModeConfig").is_work_user,q=p!==0?a("WorkModeConfig").company_subdomain+".facebook.com":"www.facebook.com";o=new(a("URI"))(n).getUnqualifiedURI().setDomain(q).setProtocol("https").toString()}var r=l.big_image_src,s=l.big_image_src,t=l.__typename,u;switch(t){case"Page":u="page";break;case"User":u="user";break;default:u=null}var v=l.accepts_messenger_user_feedback,w=l.is_viewer_friend,x=l.is_messenger_user,y=l.is_verified,z=l.is_messenger_platform_bot,A=l.is_message_blocked_by_viewer,B=l.is_viewer_subscribed_to_message_updates,C=l.is_viewer_coworker,D=l.is_employee;return{id:"fbid:"+l.id,fbid:l.id,gender:m==null?a("GenderConst").NOT_A_PERSON:m===a("DisplayGenderConst").MALE?a("GenderConst").MALE_SINGULAR:m===a("DisplayGenderConst").FEMALE?a("GenderConst").FEMALE_SINGULAR:a("GenderConst").NOT_A_PERSON,href:o,image_src:r==null?null:r.uri,big_image_src:s==null?null:s.uri,name:l.name,short_name:a("Utils.bs").$pipe$unknown(a("bs_js_primitive").null_undefined_to_opt(l.short_name),l.name),type:u,vanity:l.username,accepts_messenger_user_feedback:v==null?false:v,is_friend:w==null?false:w,is_messenger_user:x==null?false:x,is_business_enabled:l.__typename==="Page"?true:false,is_verified:y==null?false:y,is_messenger_platform_bot:z==null?false:z,is_messenger_blocked:A==null?false:A,is_subscribed_to_page_updates:B==null?true:B,is_coworker:C==null?true:C,employee:D==null?false:D}}function ga(l){return a("bs_array").map(function(m){return k(m.messaging_actor)},l.all_participants.nodes)}function ha(l,m){__p&&__p();var n=m.read_receipts;if(n==null)return 0;else{var o={};a("bs_array").iter(function(p){var n=p.actor;if(!(n==null)&&l!==n.id){o[n.id]={action:a("bs_caml_format").caml_float_of_string(p.action),watermark:a("bs_caml_format").caml_float_of_string(p.watermark)};return 0}else return 0},n.nodes);return[o]}}function ia(l){__p&&__p();var m=l.delivery_receipts;if(m==null)return[];else return m.nodes.sort(function(n,o){var p=a("bs_caml_format").caml_float_of_string(n.timestamp_precise),q=a("bs_caml_format").caml_float_of_string(o.timestamp_precise);if(p>q)return-1;else if(p===q)return 0;else return 1})}function ja(l,m,n){var o=m.messages;if(o==null)return 0;else return[a("bs_array").map(function(p){return a("MessengerMessageTransformer.bs").transformMessage(l,p,{thread_id:null,thread_fbid:m.thread_key.thread_fbid,other_user_fbid:m.thread_key.other_user_id,folder:a("bs_string").lowercase(m.folder)},n)},o.nodes)]}function ka(l,m,n){__p&&__p();var o=a("bs_array").map(function(Z){var na=a("MessengerMessageTransformer.bs").unsafeCastBlobAttachments(Z),q=Z.extensible_attachment,$;if(q==null)$=null;else{var r=q.story_attachment;$={legacy_attachment_id:q.legacy_attachment_id,story_attachment:r==null?null:a("MessengerMessageTransformer.bs").unsafeCastExtensibleAttachment(r)}}return{snippet:Z.snippet,message_sender:Z.message_sender,timestamp_precise:Z.timestamp_precise,commerce_message_type:Z.commerce_message_type,extensible_attachment:$,blob_attachments:na,sticker:Z.sticker}},m.last_message.nodes),p={thread_key:m.thread_key,name:m.name,all_participants:m.all_participants,last_message:{nodes:o},unread_count:m.unread_count,message_count:m.messages_count,image:m.image,updated_time_precise:m.updated_time_precise,mute_until:m.mute_until,is_pin_protected:m.is_pin_protected,is_viewer_subscribed:m.is_viewer_subscribed,is_canonical_neo_user:m.is_canonical_neo_user,thread_queue_enabled:m.thread_queue_enabled,folder:m.folder,has_viewer_archived:m.has_viewer_archived,is_page_follow_up:m.is_page_follow_up,cannot_reply_reason:m.cannot_reply_reason,ephemeral_ttl_mode:m.ephemeral_ttl_mode,customization_info:m.customization_info,thread_admins:m.thread_admins,approval_mode:m.approval_mode,joinable_mode:m.joinable_mode,thread_queue_metadata:m.thread_queue_metadata,event_reminders:m.event_reminders,montage_thread:m.montage_thread,last_read_receipt:m.last_read_receipt,related_page_thread:m.related_page_thread,rtc_call_data:m.rtc_call_data,associated_object:m.associated_object,reactions_mute_mode:m.reactions_mute_mode,mentions_mute_mode:m.mentions_mute_mode,privacy_mode:m.privacy_mode,customization_enabled:m.customization_enabled,thread_type:m.thread_type,participant_add_mode_as_string:m.participant_add_mode_as_string,participants_event_status:m.participants_event_status,marketplace_thread_data:m.marketplace_thread_data,page_comm_item:m.page_comm_item},q=p.customization_info,r;if(q==null)r=[null,null,null];else{var s=q.emoji;r=[h(q.outgoing_bubble_color),s==null?null:{emoji:s},g(q.participant_customizations)]}var t=p.page_comm_item,u=t==null?[null,null,null,null,null]:[t.comm_status,t.comm_source_id,t.id,t.subtitle,t.comm_item_owners],v=p.last_message.nodes.length?[a("bs_caml_array").caml_array_get(p.last_message.nodes,0)]:0,w=p.last_read_receipt.nodes.length?[a("bs_caml_array").caml_array_get(p.last_read_receipt.nodes,0)]:0,x;if(v){var y=v[0];x=a("MessengerAttachmentTransformer.bs").transformAttachment(l,{extensible_attachment:y.extensible_attachment,blob_attachments:y.blob_attachments,sticker:y.sticker},n)}else x=[];var z=p.cannot_reply_reason,A=p.thread_queue_metadata,B=p.thread_type,C=p.montage_thread,D=p.image,la=p.thread_key.other_user_id,ma=p.thread_queue_metadata,E=p.name,F=p.thread_key.other_user_id,G;if(F==null){var H=p.thread_key.thread_fbid;G=H==null?null:H}else G=F;var I=p.rtc_call_data,J;if(I==null)J=null;else{var K=I.initiator;J={call_state:I.call_state,server_info_data:I.server_info_data,initiator_fbid:K==null?0:a("bs_caml_format").caml_float_of_string(K.id)}}var L=p.marketplace_thread_data,M;if(L==null)M=null;else{var N=L.for_sale_item,O;if(N==null)O=null;else{var P=N.id,Q=N.formatted_price,R=N.location,S;if(R==null)S=null;else{var T=R.reverse_geocode;S={reverse_geocode:T==null?null:{city:T.city,state:T.state}}}var U=N.primary_photo,V;if(U==null)V=null;else{var W=U.image;V=W==null?null:W.uri}O={id:P==null?0:a("bs_caml_format").caml_float_of_string(P),title:N.group_commerce_item_title,price:Q==null?null:Q.text,location:S,is_sold:N.is_sold,image_uri:V}}var X=L.buyer,Y=L.seller;M={for_sale_item:O,buyer_fbid:X==null?0:a("bs_caml_format").caml_float_of_string(X.id),seller_fbid:Y==null?0:a("bs_caml_format").caml_float_of_string(Y.id)}}return{admin_ids:a("bs_array").map(function(Z){return Z.id},p.thread_admins),approval_mode:p.approval_mode,approval_queue_ids:A==null?[]:a("bs_array").map(function(Z){return a("MercuryIDs").getParticipantIDFromUserID(Z.id)},A.approval_requests.nodes),can_reply:z==null?true:false,cannot_reply_reason:p.cannot_reply_reason,custom_color:r[0],custom_like_icon:r[1],custom_nickname:r[2],customization_enabled:p.customization_enabled,thread_type:B==null?null:a("bs_js_null_undefined").from_opt(a("bs_js_primitive").undefined_to_opt(a("MessagingThreadType")[B])),participant_add_mode:p.participant_add_mode_as_string,ephemeral_ttl_mode:p.ephemeral_ttl_mode,folder:a("bs_string").lowercase(p.folder),has_email_participant:z==null?false:a("bs_js_boolean").to_js_boolean(+(z===a("MessengerThreadCannotReplyReason").HAS_EMAIL_PARTICIPANT)),has_montage:C==null?false:true,image_src:D==null?null:D.uri,is_archived:a("bs_js_boolean").to_js_boolean(p.has_viewer_archived),is_page_follow_up:a("bs_js_boolean").to_js_boolean(p.is_page_follow_up),is_canonical_user:a("bs_js_boolean").to_js_boolean(f(p)),is_canonical:la==null?false:true,is_pin_protected:a("bs_js_boolean").to_js_boolean(p.is_pin_protected),is_subscribed:a("bs_js_boolean").to_js_boolean(p.is_viewer_subscribed),is_canonical_neo_user:a("bs_js_boolean").to_js_boolean(p.is_canonical_neo_user),is_thread_queue_enabled:ma==null?false:true,joinable_mode:{mode:a("bs_caml_format").caml_int_of_string(p.joinable_mode.mode),link:p.joinable_mode.link},last_message_timestamp:v?a("bs_caml_format").caml_float_of_string(v[0].timestamp_precise):0,last_message_type:v?v[0].commerce_message_type:null,last_read_timestamp:w?a("bs_caml_format").caml_float_of_string(w[0].timestamp_precise):0,lightweight_event:p.event_reminders.nodes.length?c(a("bs_caml_array").caml_array_get(p.event_reminders.nodes,0)):null,message_count:p.message_count,mute_until:p.mute_until,name:E==null?"":E,other_user_fbid:p.thread_key.other_user_id,page_thread_info:e(p),participants:a("bs_array").map(function(Z){return a("MercuryIDs").getParticipantIDFromUserID(Z.messaging_actor.id)},p.all_participants.nodes),participants_event_status:p.participants_event_status,read_only:z==null?false:a("bs_js_boolean").to_js_boolean(+(z===a("MessengerThreadCannotReplyReason").READ_ONLY)),recipients_loadable:z==null?true:a("bs_js_boolean").to_js_boolean(+(z!==a("MessengerThreadCannotReplyReason").RECIPIENTS_NOT_LOADABLE)),server_timestamp:a("bs_caml_format").caml_float_of_string(p.updated_time_precise),snippet_attachments:x,snippet_sender:v?a("MercuryIDs").getParticipantIDFromUserID(v[0].message_sender.messaging_actor.id):null,snippet:v?v[0].snippet:null,thread_fbid:G,thread_id:"",timestamp:a("bs_caml_format").caml_float_of_string(p.updated_time_precise),unread_count:p.unread_count,rtc_call_data:J,marketplace_thread_data:M,associated_object:d(p),reactions_mute_mode:p.reactions_mute_mode==="REACTIONS_NOT_MUTED"?0:1,mentions_mute_mode:p.mentions_mute_mode==="MENTIONS_NOT_MUTED"?0:1,comm_status:u[0],page_comm_item_id:u[2],comm_source_id:u[1],subtitle:u[3],comm_item_owners:u[4]}}b.getThreadFBID=i;b.getOtherUserID=j;b.getMessagePageInfo=fa;b.transformParticipant=k;b.transformParticipants=ga;b.transformReadReceipts=ha;b.transformDeliveryReceipts=ia;b.transformMessages=ja;b.transformThread=ka}),null);
__d("MercuryCanonicalGroupThreadManager",["Bootloader","KeyedCallbackManager","MercuryIDs","MercuryPayloadSource","MercuryServerPayloadPreprocessor","MercurySingletonProvider","MercuryThreads","MessengerServerPayloadTransformer.bs","MercuryServerDispatcher","SubscriptionsHandler"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();function h(j){this.$MercuryCanonicalGroupThreadManager1=j;this.$MercuryCanonicalGroupThreadManager2=new(c("KeyedCallbackManager"))();this.$MercuryCanonicalGroupThreadManager3=c("MercuryServerPayloadPreprocessor").getForFBID(this.$MercuryCanonicalGroupThreadManager1);this.$MercuryCanonicalGroupThreadManager6=c("MercuryThreads").getForFBID(this.$MercuryCanonicalGroupThreadManager1);this.$MercuryCanonicalGroupThreadManager4={};this.$MercuryCanonicalGroupThreadManager8();this.$MercuryCanonicalGroupThreadManager9();this.$MercuryCanonicalGroupThreadManager7={}}h.getForFBID=function(j){return i.getForFBID(j)};h.get=function(){return i.get()};h.prototype.getCanonicalGroupThreadIDForParticipants=function(j,k){j=this.$MercuryCanonicalGroupThreadManager10(j);var l=this.$MercuryCanonicalGroupThreadManager11(j),m=this.$MercuryCanonicalGroupThreadManager2.executeOrEnqueue(l,k);this.$MercuryCanonicalGroupThreadManager12(j);return m};h.prototype.unsubscribe=function(j){if(j)this.$MercuryCanonicalGroupThreadManager2.unsubscribe(j)};h.prototype.$MercuryCanonicalGroupThreadManager11=function(j){return j.sort().join(",")};h.prototype.$MercuryCanonicalGroupThreadManager13=function(j,k){var l=c("MercuryIDs").getThreadIDFromThreadFBID(k);this.$MercuryCanonicalGroupThreadManager2.setResource(j,l);this.$MercuryCanonicalGroupThreadManager4[l]=j};h.prototype.$MercuryCanonicalGroupThreadManager12=function(j){var k=this.$MercuryCanonicalGroupThreadManager11(j),l={canonical_group_key:k,participants:j};c("MercuryServerDispatcher").trySend("/ajax/mercury/search_canonical_groups.php",l,null,this.$MercuryCanonicalGroupThreadManager1)};h.prototype.$MercuryCanonicalGroupThreadManager8=function(){c("MercuryServerDispatcher").registerEndpoints({"/ajax/mercury/search_canonical_groups.php":{request_user_id:this.$MercuryCanonicalGroupThreadManager1,mode:c("MercuryServerDispatcher").IMMEDIATE,handler:function(j){this.handleUpdate(j)}.bind(this)}})};h.prototype.$MercuryCanonicalGroupThreadManager10=function(j){if(j.indexOf(this.$MercuryCanonicalGroupThreadManager1)===-1)j.push(this.$MercuryCanonicalGroupThreadManager1);return j};h.prototype.handleUpdate=function(j){if(j.graphql_payload){var k=c("MessengerServerPayloadTransformer.bs").transformThread(j.viewer,j.graphql_payload,j.for_page);this.$MercuryCanonicalGroupThreadManager3.handleUpdate({threads:[k],payload_source:c("MercuryPayloadSource").SERVER_SEARCH})}var l=j.canonical_group;if(l)for(var m in l)this.$MercuryCanonicalGroupThreadManager13(m,l[m])};h.prototype.getNow=function(j){var k=this.$MercuryCanonicalGroupThreadManager11(this.$MercuryCanonicalGroupThreadManager10(j));return this.$MercuryCanonicalGroupThreadManager2.getResource(k)};h.prototype.$MercuryCanonicalGroupThreadManager9=function(){c("Bootloader").loadModules(["MercuryThreadInformer"],function(j){var k=j.getForFBID(this.$MercuryCanonicalGroupThreadManager1),l=new(c("SubscriptionsHandler"))();l.addSubscriptions(k.subscribe("threads-deleted",function(m,n){for(var o in n)if(this.$MercuryCanonicalGroupThreadManager4[o]){this.$MercuryCanonicalGroupThreadManager2.setResource(this.$MercuryCanonicalGroupThreadManager4[o],undefined);delete this.$MercuryCanonicalGroupThreadManager4[o]}}.bind(this)));this.$MercuryCanonicalGroupThreadManager5=l}.bind(this),"MercuryCanonicalGroupThreadManager")};var i=new(c("MercurySingletonProvider"))(h);f.exports=h}),null);
__d("FantaGetMessageActions",["FantaDispatcher","MercuryCanonicalGroupThreadManager","MercuryIDs","MercuryTypeaheadConstants","keyMirror"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h=c("keyMirror")({ADD_PARTICIPANTS:null,CLEAR_PARTICIPANTS:null,CLEAR_PREVIEW:null,FETCH_MORE_MESSAGES:null,ON_BOOTLOAD_TYPEAHEAD:null,ON_GET_THREAD_PREVIEW_RESPONSE:null,ON_GET_THREAD_RESPONSE:null,ON_MESSAGE_STORE_RESPONSE:null,ON_PAGE_NULL_RESPONSE:null,ON_PRIVACY_STATE_CHANGE:null,ON_SHOW_CONTEXT_BANNER_TIMER:null,REFRESH_THREAD:null,THREADS_UPDATED:null}),i={Types:h,addParticipants:function j(k,l){__p&&__p();var m,n=l.length===1&&l[0].getInfo().render_type===c("MercuryTypeaheadConstants").THREAD_TYPE,o=void 0;if(n){var p=l[0].getInfo().mercury_thread;if(p)o=c("MercuryIDs").getThreadIDFromThreadFBID(p.thread_fbid)}else if(l.length===1){var q=l[0].info&&l[0].info.uid;if(q)o=c("MercuryIDs").getThreadIDFromUserID(q)}else if(l.length===0){c("FantaDispatcher").dispatch({type:h.CLEAR_PARTICIPANTS,tabID:k});return}else(function(){var r=c("MercuryCanonicalGroupThreadManager").get(),s=l.map(function(u){return u.info.uid});c("FantaDispatcher").dispatch({type:h.CLEAR_PREVIEW,tabID:k,tokens:l});var t=r.getCanonicalGroupThreadIDForParticipants(Array.from(s),function(o){r.unsubscribe(t);if(o)c("FantaDispatcher").dispatch({type:h.ADD_PARTICIPANTS,previewTabID:o,tabID:k,tokens:l})})})();if(o)c("FantaDispatcher").dispatch({type:h.ADD_PARTICIPANTS,previewTabID:o,tabID:k,tokens:l})},onBootloadTypeahead:function j(k,l){c("FantaDispatcher").dispatch({type:h.ON_BOOTLOAD_TYPEAHEAD,tabID:k,thread:l})},fetchMoreMessages:function j(k){c("FantaDispatcher").dispatch({type:h.FETCH_MORE_MESSAGES,threadID:k})},refreshThread:function j(k){c("FantaDispatcher").dispatch({type:h.REFRESH_THREAD,threadID:k})},onGetThreadResponse:function j(k){c("FantaDispatcher").dispatch({type:h.ON_GET_THREAD_RESPONSE,thread:k})},onGetThreadPreviewResponse:function j(k,l){c("FantaDispatcher").dispatch({type:h.ON_GET_THREAD_PREVIEW_RESPONSE,tabID:k,thread:l})},onShowContextBannerTimer:function j(k){c("FantaDispatcher").dispatch({type:h.ON_SHOW_CONTEXT_BANNER_TIMER,threadID:k})},onMessageStoreResponse:function j(k,l){c("FantaDispatcher").dispatch({type:h.ON_MESSAGE_STORE_RESPONSE,messages:k,tabID:l})},threadsUpdated:function j(k){c("FantaDispatcher").dispatch({type:h.THREADS_UPDATED,threads:k})},onPrivacyStateChange:function j(k,l){c("FantaDispatcher").dispatch({type:h.ON_PRIVACY_STATE_CHANGE,threadID:k,privacyState:l})},onPageNullResponse:function j(k,l){c("FantaDispatcher").dispatch({type:h.ON_PAGE_NULL_RESPONSE,threadID:k,nullStateCTA:l})}};f.exports=i}),null);
__d("FantaTabSheetActions",["FantaDispatcher","LogHistory","keyMirror"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h=c("keyMirror")({CLOSE_ADD_FRIENDS_SHEET:null,CLOSE_ADD_MORE_FRIENDS_SHEET:null,CLOSE_EMPLOYEE_PERSONAL_USER_SHEET:null,CLOSE_EMPLOYEE_WORK_USER_SHEET:null,CLOSE_NAME_CONVERSATION_TAB_SHEET:null,CLOSE_PAGE_INDICATOR_SHEET:null,CLOSE_READ_ONLY_PERMANENT_SHEET:null,CLOSE_READ_ONLY_SHEET:null,CLOSE_USER_FOCUS_AND_BYPASS_SHEET:null,CLOSE_USER_TIMEZONE_SHEET:null,ON_BOOTLOAD_EVENT_REMINDER:null,ON_WORK_DO_NOT_DISTURB_RESPONSE:null,ON_MENTORSHIP_PROGRAM_RESPONSE:null,ON_IS_PAGE_TAB:null,OPEN_ADD_MORE_FRIENDS_SHEET:null,OPEN_APPOINTMENT_SHEET:null,OPEN_BYPASS_FOCUS_SHEET:null,OPEN_EMPLOYEE_AWAY_SHEET:null,OPEN_EMPLOYEE_PERSONAL_USER_SHEET:null,OPEN_EMPLOYEE_WORK_USER_SHEET:null,OPEN_NAME_CONVERSATION_TAB_SHEET:null,OPEN_PAGE_INDICATOR_SHEET:null,OPEN_READ_ONLY_PERMANENT_SHEET:null,OPEN_READ_ONLY_SHEET:null,OPEN_USER_FOCUS_SHEET:null,OPEN_USER_TIMEZONE_SHEET:null,OPEN_WORK_DO_NOT_DISTURB_SHEET:null,OPEN_MENTORSHIP_PROGRAM_SHEET:null}),i=c("LogHistory").getInstance("fanta_sheets");function j(l){c("FantaDispatcher").dispatch(l);i.log(l.type,l.tabID)}var k={Types:h,openUserFocusSheet:function l(m){j({type:h.OPEN_USER_FOCUS_SHEET,tabID:m})},openBypassFocusSheet:function l(m){j({type:h.OPEN_BYPASS_FOCUS_SHEET,tabID:m})},closeUserFocusAndBypassSheet:function l(m){j({type:h.CLOSE_USER_FOCUS_AND_BYPASS_SHEET,tabID:m})},openUserTimezoneSheet:function l(m,n){j({type:h.OPEN_USER_TIMEZONE_SHEET,tabID:m,timezoneInfo:n})},closeUserTimezoneSheet:function l(m){j({type:h.CLOSE_USER_TIMEZONE_SHEET,tabID:m})},openAddMoreFriendsSheet:function l(m){j({type:h.OPEN_ADD_MORE_FRIENDS_SHEET,tabID:m})},closeAddMoreFriendsSheet:function l(m){j({type:h.CLOSE_ADD_MORE_FRIENDS_SHEET,tabID:m})},closeAddFriendsSheet:function l(m){j({type:h.CLOSE_ADD_FRIENDS_SHEET,tabID:m})},openNameConversationSheet:function l(m){j({type:h.OPEN_NAME_CONVERSATION_TAB_SHEET,tabID:m})},closeNameConversationSheet:function l(m){j({type:h.CLOSE_NAME_CONVERSATION_TAB_SHEET,tabID:m})},openReadOnlySheet:function l(m){j({type:h.OPEN_READ_ONLY_SHEET,tabID:m})},closeReadOnlySheet:function l(m){j({type:h.CLOSE_READ_ONLY_SHEET,tabID:m})},openReadOnlyPermanentSheet:function l(m){j({type:h.OPEN_READ_ONLY_PERMANENT_SHEET,tabID:m})},closeReadOnlyPermanentSheet:function l(m){j({type:h.CLOSE_READ_ONLY_PERMANENT_SHEET,tabID:m})},openEmployeeAwaySheet:function l(m){j({type:h.OPEN_EMPLOYEE_AWAY_SHEET,tabID:m})},openEmployeePersonalUserSheet:function l(m){j({type:h.OPEN_EMPLOYEE_PERSONAL_USER_SHEET,tabID:m})},closeEmployeePersonalUserSheet:function l(m){j({type:h.CLOSE_EMPLOYEE_PERSONAL_USER_SHEET,tabID:m})},openEmployeeWorkUserSheet:function l(m){j({type:h.OPEN_EMPLOYEE_WORK_USER_SHEET,tabID:m})},closeEmployeeWorkUserSheet:function l(m){j({type:h.CLOSE_EMPLOYEE_WORK_USER_SHEET,tabID:m})},openPageIndicatorSheet:function l(m,n){j({type:h.OPEN_PAGE_INDICATOR_SHEET,description:n,tabID:m})},closePageIndicatorSheet:function l(m){j({type:h.CLOSE_PAGE_INDICATOR_SHEET,tabID:m})},openWorkDoNotDisturbSheet:function l(m,n){j({type:h.OPEN_WORK_DO_NOT_DISTURB_SHEET,description:n,tabID:m})},openMentorshipProgramSheet:function l(m){j({type:h.OPEN_MENTORSHIP_PROGRAM_SHEET,tabID:m})},onIsPageTab:function l(m,n){j({type:h.ON_IS_PAGE_TAB,pageIndicator:n,tabID:m})},onBootloadEventReminder:function l(m){j({type:h.ON_BOOTLOAD_EVENT_REMINDER,tabID:m})},openAppointmentBannerSheet:function l(m){j({type:h.OPEN_APPOINTMENT_SHEET,tabID:m})},onWorkDoNotDisturbResponse:function l(m,n,o){j({type:h.ON_WORK_DO_NOT_DISTURB_RESPONSE,tabID:m,status:n,description:o})},onMentorshipProgramResponse:function l(m,n,o){j({type:h.ON_MENTORSHIP_PROGRAM_RESPONSE,tabID:m,groupID:o,programName:n})}};f.exports=k}),null);
__d("MercurySheetPolicy",["keyMirror"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h={ChatThreadIsMutedTabSheet:{isPermanent:false,isSheetWithInput:false},ChatUserFocusSheet:{isPermanent:true,isSheetWithInput:true},ChatUserFocusBypassSheet:{isPermanent:true,isSheetWithInput:true},ChatUserTimezoneSheet:{isPermanent:true,isSheetWithInput:true},ChatUserBlockedTabSheet:{isPermanent:true,isSheetWithInput:false},ChatUploadWarningTabSheet:{isPermanent:false,isSheetWithInput:false},ChatThreadIsMessageBlockedSheet:{isPermanent:true,isSheetWithInput:false},ChatReadOnlyTabSheet:{isPermanent:false,isSheetWithInput:false},ChatReadOnlyPermanentTabSheet:{isPermanent:true,isSheetWithInput:false},ChatOfflineTabSheet:{isPermanent:true,isSheetWithInput:false},ChatNoRecipientsTabSheet:{isPermanent:true,isSheetWithInput:false},ChatNewMessagesTabSheet:{isPermanent:true,isSheetWithInput:true},ChatNameConversationTabSheet:{isPermanent:true,isSheetWithInput:true},ChatEmployeeAwaySheet:{isPermanent:true,isSheetWithInput:false},ChatEventReminderTabSheet:{isPermanent:true,isSheetWithInput:false},ChatAppointmentBanner:{isPermanent:true,isSheetWithInput:false},ChatMontageSheet:{isPermanent:false,isSheetWithInput:false},ChatJoinCallSheet:{isPermanent:true,isSheetWithInput:false},FantaAddFriendsSheet:{isPermanent:true,isSheetWithInput:true},FantaAddMoreFriendsSheet:{isPermanent:true,isSheetWithInput:true},ChatRoomAssociatedObjectSheet:{isPermanent:false,isSheetWithInput:false},ChatWorkDoNotDisturbSheet:{isPermanent:false,isSheetWithInput:false},ChatMentorshipProgramSheet:{isPermanent:false,isSheetWithInput:false}},i={canReplaceOpenSheet:function j(k,l){var m=this.getType(l),n=this.isPermanent(l),o=this.isSheetWithInput(l),p=this.getType(k),q=this.isPermanent(k),r=this.isSheetWithInput(k);if(r)return!!(m!==p&&o);if(q&&!n)return false;if(p===this.sheets.ChatThreadIsMessageBlockedSheet)return false;return true},getType:function j(k){var l=k.getType||k.type&&k.type.getType||function(){return k},m=l.call(k);return m},isPermanent:function j(k){if(typeof k==="string"&&h[k])return h[k].isPermanent;var l=k.isPermanent||k.type&&k.type.isPermanent||function(){return false},j=l.call(k);return j},isSheetWithInput:function j(k){if(typeof k==="string"&&h[k])return h[k].isSheetWithInput;var l=k.isSheetWithInput||k.type&&k.type.isSheetWithInput||function(){return false},j=l.call(k);return j},sheets:c("keyMirror")(h)};f.exports=i}),null);
__d("TimeSpentRoomTypeEnum",[],(function a(b,c,d,e,f,g){f.exports=Object.freeze({GROUP:"GROUP",EVENT:"EVENT"})}),null);
__d("MessageThreadAssociatedObjectUtils",["TimeSpentRoomTypeEnum"],(function a(b,c,d,e,f,g){"use strict";var h={shouldRender:function i(j){return j&&j.room_type===c("TimeSpentRoomTypeEnum").GROUP&&!j.is_workplace_community},isLinkedToGroupChat:function i(j){return j&&j.room_type===c("TimeSpentRoomTypeEnum").GROUP&&!j.is_workplace_community}};f.exports=h}),null);
__d("MessengerApprovalModeTypes",[],(function a(b,c,d,e,f,g){f.exports=Object.freeze({OPEN:0,APPROVALS:1})}),null);
__d("MessengerJoinableModeType",[],(function a(b,c,d,e,f,g){f.exports=Object.freeze({PRIVATE:0,JOINABLE:1})}),null);
__d("MessengerParticipantAddModeTypes",[],(function a(b,c,d,e,f,g){f.exports=Object.freeze({ADD:"ADD",INVITE:"INVITE",ADD_INVITE:"ADD_INVITE"})}),null);
__d("MessengerAdminGroupUtils",["fbt","MercuryConfig","MercuryIDs","MessageThreadAssociatedObjectUtils","MessengerApprovalModeTypes","MessengerJoinableModeType","MessengerParticipantAddModeTypes","WorkModeConfig","CurrentUser","QE2Logger","gkx"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i="messenger_use_new_group_participant_suggestion_ranking",j="show_nullstate_chat_tab_composer",k="show_nullstate_chat_tab_group_chat",l={isJoinableAndOpenThread:function m(n){return this.isJoinableThread(n)&&this.isApprovalOpenThread(n)},isJoinableAndApprovalRequiredThread:function m(n){return!!(this.isJoinableThread(n)&&n&&n.approval_mode===c("MessengerApprovalModeTypes").APPROVALS)},shouldAddToApprovalQueue:function m(n,o){return!!(this.isJoinableAndApprovalRequiredThread(n)&&n&&!l.isViewerAdmin(n.admin_ids,o))},isJoinableThread:function m(n){return!!(c("gkx")("AT5xrCi08i7kM3hip_Bf4sUgmdKPV1QphRx_J6kDVSso_LwnuXnsPyhq98JRQV_MqHjleZ_pelk8UHK4mDklEDU4gdH-DgPi3glxyQ2_7CHTgw")&&n&&n.is_thread_queue_enabled===true&&n.joinable_mode&&n.joinable_mode.mode===c("MessengerJoinableModeType").JOINABLE)},isGroupChat:function m(n){return!!(n&&c("MessageThreadAssociatedObjectUtils").isLinkedToGroupChat(n.associated_object))},shouldInvite:function m(n){return!!(c("gkx")("AT5xrCi08i7kM3hip_Bf4sUgmdKPV1QphRx_J6kDVSso_LwnuXnsPyhq98JRQV_MqHjleZ_pelk8UHK4mDklEDU4gdH-DgPi3glxyQ2_7CHTgw")&&n&&n.participant_add_mode===c("MessengerParticipantAddModeTypes").INVITE)},isApprovalOpenThread:function m(n){return!!(c("gkx")("AT5xrCi08i7kM3hip_Bf4sUgmdKPV1QphRx_J6kDVSso_LwnuXnsPyhq98JRQV_MqHjleZ_pelk8UHK4mDklEDU4gdH-DgPi3glxyQ2_7CHTgw")&&n&&n.approval_mode===c("MessengerApprovalModeTypes").OPEN)},isOwner:function m(n,o){return n&&this.isJoinableThread(o)},canSeeGroupOptions:function m(n,o,p){var q=c("WorkModeConfig").is_work_user;return!q&&this.isJoinableThread(o)},canSeeBotsInGroupTypeahead:function m(){var n=c("CurrentUser").isWorkUser();return n&&c("gkx")("AT5GhC4rylRpYKpnZf2oEtsedOSc0WCJLB5V8z6-mqCNieSKORSJnqenUlgYVRpQaRNASrJq2SeIYY3m4QNhPBlK")},canMakeOthersAdmins:function m(n,o,p){return this.isOwner(n,p)&&!o},canMakeSelfAdmin:function m(n,o){return this.isJoinableThread(o)&&o.admin_ids.length===0&&n},canRemoveAdmin:function m(n,o,p){return this.isOwner(n,p)&&o},canRemoveFromGroup:function m(n,o){return this.isOwner(n,o)||!this.isJoinableThread(o)},showJoinableLink:function m(n){var o=!!(n&&n.joinable_mode&&n.joinable_mode.link),p=l.isJoinableThread(n);return p&&o},showJoinableApprovalToggle:function m(n,o){if(n.associated_object&&!n.associated_object.approval_mode_toggleable)return false;var p=l.isViewerAdmin(n.admin_ids,o);return l.isOwner(p,n)},showApprovalQueue:function m(n,o){var p=l.isViewerAdmin(n.admin_ids,o),q=l.isOwner(p,n),r=0;if(n&&n.approval_queue_ids&&n.approval_queue_ids.length)r=n.approval_queue_ids.length;var s=l.isJoinableAndApprovalRequiredThread(n);return s&&q&&r>0},showParticipantsModal:function m(n,o,p){return this.isJoinableThread(p)&&!n&&!o},useNewGroupMemberSuggestionRanking:function m(){c("QE2Logger").logExposureForUser(i);return c("MercuryConfig").MessengerNewGroupParticipantSuggestionQE},showDefaultListForNewPersonAddChatTab:function m(){c("QE2Logger").logExposureForUser(k);return c("MercuryConfig").ChatGroupChat},showDefaultListForNewChatTab:function m(){c("QE2Logger").logExposureForUser(j);return c("MercuryConfig").ChatComposer},canUpdateThreadCustomization:function m(n,o){var p=l.isJoinableThread(n),q=l.isViewerAdmin(n.admin_ids,o);return n.is_subscribed&&(!p||q)},isViewerAdmin:function m(n,o){return this.isAdmin(n,c("MercuryIDs").getParticipantIDFromUserID(o))},isAdmin:function m(n,o){return n!==null&&n!==undefined&&n.indexOf(o)!==-1},getLeaveGroupBodyText:function m(n,o){return this.isOwner(n,o)?h._("Leaving this group will remove you as an owner and allow other members to manage the group. You will no longer be able to send or receive new messages."):h._("You will stop receiving messages from this conversation and people will see that you left.")},getLeaveGroupTitleText:function m(n,o){return this.isOwner(n,o)?h._("Leave this conversation?"):h._("Leave Conversation?")},getLeaveGroupButtonText:function m(n,o){return this.isOwner(n,o)?h._("Leave converstaion"):h._("Leave")},getMakeOwnerBodyText:function m(n,o){return n?h._("As a group owner, you will be able to manage group ownership and remove members from the conversation. Only owners will be able to add other owners."):h._("As a group owner, \"{owner's name}\" will be able to manage group ownership and remove members from the conversation. They will be able to remove ownership from other owners.",[h.param("owner's name",o)])},getMakeOwnerTitleText:function m(n){return n?h._("Become group owner?"):h._("Add group owner?")},getMakeOwnerButtonText:function m(n){return n?h._("Become owner"):h._("Make owner")},getRemoveOwnerBodyText:function m(n,o,p){var q=void 0;if(n&&o)q=h._("You will no longer manage group ownership and remove members from this conversation. You will still be a participant in the group. Any other member will be able to own the group.");else if(n&&!o)q=h._("You will no longer manage group ownership and remove members from this conversation. You will still be a participant in the group.");else q=h._("\"{owner's name}\" will no longer manage group ownership and remove members from the conversation. They will still be a participant in the group.",[h.param("owner's name",p)]);return q}};f.exports=l}),null);
__d("MessengerRoomPrivacyMode",[],(function a(b,c,d,e,f,g){f.exports=Object.freeze({WHITELISTED_MODE:0,PUBLIC_MODE:1})}),null);
__d("FantaComposeViewReducers",["Bootloader","FantaGetMessageActions","FantaTabSheetActions","MercuryDataSourceWrapper","MercurySheetPolicy","MercuryTypeaheadConstants","MessengerRoomPrivacyMode","MessengerAdminGroupUtils","ifRequired"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h=c("FantaGetMessageActions").Types,i=c("FantaTabSheetActions").Types;function j(r,s){switch(s.type){case h.ON_GET_THREAD_RESPONSE:case h.ON_GET_THREAD_PREVIEW_RESPONSE:var t=s.thread,u=s.tabID||t.thread_id;r=k(r,t,u)}return r}function k(r,s,t){if(s.participants.length===0){r=m(r,t,s);r=p(r,t,c("MercurySheetPolicy").sheets.FantaAddFriendsSheet)}return r}function l(r,s){switch(s.type){case h.ON_BOOTLOAD_TYPEAHEAD:var t=s.thread,u=t.thread_id;r=m(r,u,t)}return r}function m(r,s,t){__p&&__p();var u=r.mercury.tabContents.get(s);if(!u||u.typeahead)return r;c("ifRequired")("ChatTabTypeaheadRenderer",function(v){__p&&__p();c("ifRequired")("ContextualTypeaheadView",function(w){__p&&__p();c("ifRequired")("MercuryTypeahead",function(x){__p&&__p();if(!r.mercury.tabContents.get(s))return;var y=!!(t&&t.participants&&t.participants.length===0),z=!!(t&&t.associated_object&&t.associated_object.privacy_mode===c("MessengerRoomPrivacyMode").WHITELISTED_MODE),A=y?c("MercuryDataSourceWrapper").chat_typeahead_source:z?c("MercuryDataSourceWrapper").chat_add_people_froup_source:c("MercuryDataSourceWrapper").chat_add_people_source;A.setShowThreads(y);if(y)A.setShowDefaultList(c("MessengerAdminGroupUtils").showDefaultListForNewChatTab());else if(!z)A.setShowDefaultList(c("MessengerAdminGroupUtils").showDefaultListForNewPersonAddChatTab());if(z)A.setQueryData({thread_id:t.thread_fbid});var B=new x(A,w);B.setViewOption("renderer",v);B.setExcludedParticipantsFromThreadMeta(t);u=u.merge({typeahead:B});r=r.setIn(["mercury","tabContents",s],u)},function(){return o(s,t)})},function(){return o(s,t)})},function(){return o(s,t)});return r}function n(r,s){switch(s.type){case i.OPEN_ADD_MORE_FRIENDS_SHEET:var t=s.tabID,u=r.mercury.tabContents.get(t).thread;if(u){r=m(r,t,u);return p(r,s.tabID,c("MercurySheetPolicy").sheets.FantaAddMoreFriendsSheet)}}return r}function o(r,s){c("Bootloader").loadModules(["ChatTabTypeaheadRenderer","ContextualTypeaheadView","MercuryTypeahead"],function(t,u,v){c("FantaGetMessageActions").onBootloadTypeahead(r,s)},"FantaComposeViewReducers")}function p(r,s,t){var u=r.mercury.tabContents.get(s),v=r.tabGroup.tabs.get(s);if(!v||!u)return r;var w=u,x=w.openSheet;if(x&&!c("MercurySheetPolicy").canReplaceOpenSheet(x,t))return r;u=u.merge({openSheet:t});r=r.setIn(["mercury","tabContents",s],u);return r}function q(r,s){switch(s.type){case h.ADD_PARTICIPANTS:var t=s.tokens,u=s.tabID,v=t.length===1&&t[0].getInfo().render_type===c("MercuryTypeaheadConstants").THREAD_TYPE;if(!v)return p(r,u,c("MercurySheetPolicy").sheets.FantaAddFriendsSheet)}return r}f.exports={addParticipants:q,onBootloadTypeahead:l,onGetThreadResponse:j,openAddMoreFriends:n}}),null);
__d("FantaTypeFileUploader",["immutable"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h,i,j=Object.freeze({ANIMATED_IMAGE:"animated_image",AUDIO:"audio",FILE:"file",GENERIC_ATTACHMENT:"generic_attachment",IMAGE:"image",VIDEO:"video"}),k={uploadedFiles:c("immutable").Map(),uploadingFiles:c("immutable").Map()};h=babelHelpers.inherits(l,c("immutable").Record(k));i=h&&h.prototype;l.prototype.getTypeIDs=function(m){return this.uploadedFiles.reduce(function(n,o){if(o.type===m&&o.uploadedID)n=n.concat(o.uploadedID);return n},[])};function l(){h.apply(this,arguments)}l.fileTypes=j;f.exports=l}),null);
__d("FantaTypeSharePreview",["immutable"],(function a(b,c,d,e,f,g){"use strict";var h,i,j={isLoading:false,params:null,type:null,uri:null};h=babelHelpers.inherits(k,c("immutable").Record(j));i=h&&h.prototype;function k(){h.apply(this,arguments)}f.exports=k}),null);
__d("FantaTypeComposer",["FantaTypeFileUploader","FantaTypeSharePreview","immutable"],(function a(b,c,d,e,f,g){"use strict";var h,i,j=0,k={fileUploader:new(c("FantaTypeFileUploader"))(),sharePreview:new(c("FantaTypeSharePreview"))(),text:"",version:j};h=babelHelpers.inherits(l,c("immutable").Record(k));i=h&&h.prototype;function l(){i.constructor.call(this,{version:++j})}f.exports=l}),null);
__d("FantaMessageActions",["Bootloader","FantaDispatcher","FantaTypeComposer","MercuryConfig","ifRequired","keyMirror","emptyFunction","setImmediate"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h=c("keyMirror")({CANCEL_FILE_UPLOAD:null,COMPOSER_TEXT_UPDATE:null,LINK_PREVIEW:null,LOADED_SHARE_DATA:null,LOADING_SHARE_DATA:null,PREPARE_FILES_FOR_SEND:null,RECEIVED_NEW_MESSAGE:null,REMOVE_SHARE_PREVIEW:null,SEND_GROUP_MESSAGE:null,SEND_HOT_LIKE:null,SEND_MESSAGE:null,SEND_PHOTO:null,SEND_STICKER:null,UPDATE_GROUP_NAME:null,UPLOAD_FILE_FAILED:null,UPLOADED_FILE:null});function i(){var l=document.createElement("form");l.action=c("MercuryConfig").upload_url;l.method="post";return l}function j(l,m){var n=document.createElement("input");n.type="file";n.name="attachment[]";n.multiple=true;if(m)n.onchange=m;l.appendChild(n);return n}var k={Types:h,prepareFilesForSend:function l(m,n,o){this.dispatchOrBootloadUploader(function(){c("FantaDispatcher").dispatch({type:h.PREPARE_FILES_FOR_SEND,tabID:m,files:n,composer:o})})},openUploadFilePicker:function l(m,n){var o=i(),p=j(o,function(){k.prepareFilesForSend(m,this.files,n)});p.click()},uploadedFile:function l(m,n,o){this.dispatchOrBootloadUploader(function(){c("FantaDispatcher").dispatch({type:h.UPLOADED_FILE,tabID:m,uploadID:n,payload:o})})},uploadFileFailed:function l(m,n){this.dispatchOrBootloadUploader(function(){c("FantaDispatcher").dispatch({type:h.UPLOAD_FILE_FAILED,tabID:m,uploadID:n})})},cancelFileUpload:function l(m,n){this.dispatchOrBootloadUploader(function(){c("FantaDispatcher").dispatch({type:h.CANCEL_FILE_UPLOAD,tabID:m,uploadID:n})})},linkPreview:function l(m,n){this.dispatchOrBootloadSharePreview(function(){c("FantaDispatcher").dispatch({type:h.LINK_PREVIEW,tabID:m,uri:n})})},loadedShareData:function l(m,n,o){this.dispatchOrBootloadSharePreview(function(){c("FantaDispatcher").dispatch({type:h.LOADED_SHARE_DATA,tabID:m,attachmentData:n,composer:o})})},loadingShareData:function l(m,n){this.dispatchOrBootloadSharePreview(function(){c("FantaDispatcher").dispatch({type:h.LOADING_SHARE_DATA,composer:n,tabID:m})})},removeSharePreview:function l(m,n){this.dispatchOrBootloadSharePreview(function(){c("FantaDispatcher").dispatch({type:h.REMOVE_SHARE_PREVIEW,tabID:m,composer:n})})},receivedNewMessage:function l(m,n){c("FantaDispatcher").dispatch({type:h.RECEIVED_NEW_MESSAGE,tabID:m,message:n})},updateGroupName:function l(m,n){this.dispatchOrBootloadSendMessages(function(){c("FantaDispatcher").dispatch({type:h.UPDATE_GROUP_NAME,threadID:m,newName:n})})},sendGroupMessage:function l(m,n){this.dispatchOrBootloadSendMessages(function(){c("FantaDispatcher").dispatch({type:h.SEND_GROUP_MESSAGE,threadID:m,onSendSuccess:n})})},sendMessage:function l(m,n,o,p){this.dispatchOrBootloadSendMessages(function(){c("FantaDispatcher").dispatch({type:h.SEND_MESSAGE,threadID:m,message:n,composer:o,onSendSuccess:p})})},sendPhoto:function l(m,n,o){this.dispatchOrBootloadSendMessages(function(){c("FantaDispatcher").dispatch({type:h.SEND_PHOTO,onSendSuccess:o,photoData:n,threadID:m})})},sendHotLike:function l(m,n,o,p,q){this.dispatchOrBootloadSendMessages(function(){c("FantaDispatcher").dispatch({type:h.SEND_HOT_LIKE,emoji:n,onSendSuccess:q,size:o,source:p,threadID:m})})},sendSticker:function l(m,n,o){this.dispatchOrBootloadSendMessages(function(){c("FantaDispatcher").dispatch({type:h.SEND_STICKER,threadID:m,stickerID:n,onSendSuccess:o})})},composerTextUpdate:function l(m,n,o){if(n.length>0)c("ifRequired")("FantaReducersSendMessages",c("emptyFunction"),function(){return this.dispatchOrBootloadSendMessages(c("emptyFunction"))}.bind(this));this.dispatchOrBootloadSharePreview(function(){c("FantaDispatcher").dispatch({type:h.COMPOSER_TEXT_UPDATE,composer:o,message:n,threadID:m})})},dispatchOrBootloadSendMessages:function l(m){c("ifRequired")("FantaReducersSendMessages",function(){c("setImmediate")(m)},function(){c("Bootloader").loadModules(["FantaAppStore","FantaReducersSendMessages"],function(n,o){n.addReducers(o);c("setImmediate")(m)},"FantaMessageActions")})},dispatchOrBootloadUploader:function l(m){c("ifRequired")("FantaReducersFileUploader",function(){m()},function(){c("Bootloader").loadModules(["FantaAppStore","FantaReducersFileUploader"],function(n,o){n.addReducers(o);m()},"FantaMessageActions")})},dispatchOrBootloadSharePreview:function l(m){c("ifRequired")("FantaReducersSharePreview",function(){m()},function(){c("Bootloader").loadModules(["FantaAppStore","FantaReducersSharePreview"],function(n,o){n.addReducers(o);m()},"FantaMessageActions")})}};f.exports=k}),null);
__d("FantaReducersCookie",["FantaMessageActions","FantaTabActions","PresenceState","emptyFunction","throttle","gkx"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h=c("FantaMessageActions").Types,i=c("FantaTabActions").Types,j=c("gkx")("AT7GEM_Bk6j5oGIkj34d9qm70CejWGUjCaOEQ_zb6oT8Z0SFosMbKeMY0NUporco3a4nlVgYlJ0f1Hlwi6t_P31q")?c("throttle").acrossTransitions(c("PresenceState").doSync,500):c("emptyFunction");function k(n,o){switch(o.type){case h.RECEIVED_NEW_MESSAGE:case i.CLOSE_ALL_TABS:case i.CLOSE_AND_TAB_NEXT:case i.CLOSE_TAB:case i.DELETE_TAB:case i.MINIMIZE_ALL_TABS:case i.MINIMIZE_TAB:case i.OPEN_TAB:case i.OPEN_TAB_WITH_INTERSTITIAL_DATA:case i.REPLACE_TAB:case i.UNMINIMIZE_TAB:j();return m(n)}return n}function l(n,o){switch(o.type){case i.LOAD_FROM_DATA:var p=n.tabGroup,q=o.tabData,r=p.updatedTime,s=r>=q.updatedTime||q.updatedTime===undefined?r:q.updatedTime;return n.mergeIn(["tabGroup"],{updatedTime:s})}return n}function m(n){return n.mergeIn(["tabGroup"],{updatedTime:Date.now()})}f.exports={updateCookie:k,loadFromData:l}}),null);
__d("FantaReducersDockCalculator",["Arbiter","FantaTabActions","FantaMessageActions","setImmediate"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h=c("FantaTabActions").Types,i=c("FantaMessageActions").Types,j=null;function k(n){j=n;c("setImmediate")(function(){c("Arbiter").inform("FantaReducersDockCalculator/shouldRecalculate")})}function l(n){__p&&__p();if(!j||n.size!==j.size)k(n);else{var o=false;n.forEach(function(p){var q=j&&j.get(p.id);if(!q||p.isMinimized!==q.isMinimized)o=true});if(o)k(n)}}function m(n,o){var p=n.tabGroup.tabs;switch(o.type){case h.CLOSE_ALL_TABS:case h.CLOSE_AND_TAB_NEXT:case h.CLOSE_TAB:case h.DELETE_TAB:case h.MINIMIZE_ALL_TABS:case h.MINIMIZE_TAB:case h.OPEN_TAB:case h.OPEN_TAB_WITH_INTERSTITIAL_DATA:case h.UNMINIMIZE_TAB:k(p);break;case h.LOAD_FROM_DATA:case i.RECEIVED_NEW_MESSAGE:l(p);break}return n}f.exports={recalculateDock:m}}),null);
__d("FantaReducersLogging",["Bootloader","FantaMessageActions","FantaTabActions"],(function a(b,c,d,e,f,g){"use strict";var h=c("FantaMessageActions").Types,i=c("FantaTabActions").Types;function j(k,l){switch(l.type){case i.CLOSE_ALL_TABS:case i.CLOSE_AND_TAB_NEXT:case i.CLOSE_TAB:case i.DELETE_TAB:case i.OPEN_TAB:case i.OPEN_TAB_WITH_INTERSTITIAL_DATA:var m=k.tabGroup.allowedRaisedTabs,n=k.tabGroup.getRaisedandUnraisedTabs(),o=n.raisedTabs,p=n.unraisedTabs,q=o.count(),r=q+p.count();c("Bootloader").loadModules(["FantaTabsVisibleTypedLogger"],function(s){new s().setAllowedRaisedTabs(m).setOpenTabs(r).setVisibleTabs(q).log()},"FantaReducersLogging")}return k}f.exports={updateVisibleTabs:j}}),null);
__d("FantaTypeJoinableThread",["immutable"],(function a(b,c,d,e,f,g){"use strict";var h,i,j={admins:[],approvalMode:0,associatedObject:null,description:null,friendsInParticipants:[],imageURL:null,isViewerSubscribed:false,isWorkpaceChat:false,joinableMode:{mode:0,link:""},linkHash:"",participants:[],threadID:null,threadFBID:null,threadName:null};h=babelHelpers.inherits(k,c("immutable").Record(j));i=h&&h.prototype;function k(){h.apply(this,arguments)}f.exports=k}),null);
__d("FantaTypeTabContents",["ChatPrivacyActionController","FantaGetMessageActions","FantaTypeComposer","immutable","MercuryIDs","emptyFunction","setImmediate"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h,i,j={composer:new(c("FantaTypeComposer"))(),hasFetchedAll:false,id:"",isScrolledToBottom:true,messages:c("immutable").List(),messageStore:null,nullStateCTA:null,openSheet:null,pageIndicator:null,pageIndicatorDescription:null,privacyController:null,showContextBanner:false,showUnseenMessages:c("emptyFunction"),signatureID:null,joinableInterstitialData:null,thread:null,threadPreviewID:null,threadPreviewRecipients:null,timezoneInfo:null,typeahead:null,workAvailabilityHumanReadable:null,workAvailabilityStatus:null,isMultiCompany:null,mentorshipProgramName:null,mentorshipGroupID:null};h=babelHelpers.inherits(k,c("immutable").Record(j));i=h&&h.prototype;function k(l){var m=void 0,n=c("MercuryIDs").getUserIDFromThreadID(l.id);if(n)m=new(c("ChatPrivacyActionController"))(n,function(o){c("setImmediate")(function(){c("FantaGetMessageActions").onPrivacyStateChange(l.id,o)})});i.constructor.call(this,babelHelpers["extends"]({privacyController:m},l))}f.exports=k}),null);
__d("WorkFocusMode",["invariant","WorkModeConfig","WorkUserAvailabilityStatusType","emptyFunction","ifRequired"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i={},j={status:"AVAILABLE",end_date:0};if(c("WorkModeConfig").availability){j.status=c("WorkModeConfig").availability.status;j.end_date=c("WorkModeConfig").availability.end_date}f.exports={updateAvailability:function k(l,m){var n=Object.keys(c("WorkUserAvailabilityStatusType")).find(function(o){return c("WorkUserAvailabilityStatusType")[o]===l});typeof n==="string"||h(0);j.status=n;j.end_date=m},currentViewerInFocusMode:function k(l){__p&&__p();if(!c("WorkModeConfig").focus_messaging_enabled)return false;if(l){if(i[l])return false;var m=null;c("ifRequired")("MercuryThreads",function(o){m=o.get().getThreadMetaNow(l)},c("emptyFunction"));if(m&&m.bypass_focus_mode_until&&m.bypass_focus_mode_until>Date.now()/1e3)return false}var n=c("WorkUserAvailabilityStatusType")[j.status];if(n===c("WorkUserAvailabilityStatusType").FOCUS&&j.end_date*1e3>Date.now())return true;return false},addBypassFocusModeForThread:function k(l){i[l]=true},removeBypassFocusModeForThread:function k(l){i[l]=false}}}),null);
__d("FantaReducersMercury",["Arbiter","AsyncSignal","AvailableList","AvailableListConstants","Bootloader","FantaAvailableStatus","FantaGetMessageActions","FantaMessageActions","FantaTabActions","FantaTabSheetActions","FantaTypeJoinableThread","FantaTypeTabContents","JSLogger","MercuryIDs","MercuryThreadIDMap","MessagingTagConstants","TimeSlice","WorkFocusMode","getPageIDFromThreadID","gkx","ifRequired","setImmediate"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h=c("MercuryThreadIDMap").get(),i=c("JSLogger").create("FantaReducersMercury"),j=c("FantaMessageActions").Types,k=c("FantaTabActions").Types,l=c("FantaGetMessageActions").Types;function m(){return Math.floor(Math.random()*2147483648).toString(16)}function n(H,I){__p&&__p();switch(I.type){case k.OPEN_TAB:case k.OPEN_TAB_WITH_INTERSTITIAL_DATA:var J=I.tabID;c("ifRequired")("FantaTabsReactApp",function(N){if(!c("MercuryIDs").isValidThreadID(J)){H=H.deleteIn(["tabGroup","tabs",J]);v(J)}else{D(H,J);E(J)}},function(){return H=o(H,I.tabID)});H=q(H,J);var K=m(),L=H.mercury.tabContents.get(J);L=L.merge({signatureID:K});H=H.setIn(["mercury","tabContents",J],L);new(c("AsyncSignal"))("/ajax/chat/opentab_tracking.php",{threadID:J,userID:c("MercuryIDs").getUserIDFromThreadID(J),signatureID:K}).send();if(I.interstitialData){var M=new(c("FantaTypeJoinableThread"))(I.interstitialData);L=L.merge({joinableInterstitialData:M});H=H.setIn(["mercury","tabContents",J],L)}c("Arbiter").inform("jewel/hide");return H}return H}function o(H,I){__p&&__p();c("ifRequired")("FantaTabsSlimApp",function(J){if(!c("MercuryIDs").isValidThreadID(I)){H=H.deleteIn(["tabGroup","tabs",I]);v(I)}else{D(H,I);E(I)}},function(){D(H,I);E(I)});return H}function p(H,I){switch(I.type){case j.RECEIVED_NEW_MESSAGE:H=q(H,I.tabID)}return H}function q(H,I){__p&&__p();var J,K=H.mercury.tabContents.get(I);if(!K){var J=function(){__p&&__p();var L=c("getPageIDFromThreadID")(I);if(L)c("Bootloader").loadModules(["PagesMercuryChatTabIndicatorHandler"],function(M){var N=c("AvailableListConstants").OFFLINE,O=new M(L,N,function(P){c("setImmediate")(function(){c("FantaTabSheetActions").openPageIndicatorSheet(I,P)})},function(){c("setImmediate")(function(){return c("FantaTabSheetActions").closePageIndicatorSheet(I)})});c("setImmediate")(function(){c("FantaTabSheetActions").onIsPageTab(I,O)});O.checkResponsiveness()},"FantaReducersMercury");return{v:H.setIn(["mercury","tabContents",I],new(c("FantaTypeTabContents"))({id:I}))}}();if(typeof J==="object")return J.v}return H}function r(H,I){switch(I.type){case k.REPLACE_TAB:H=u(H,I.newTabID);H=q(H,I.newTabID);return H}return H}function s(H,I){switch(I.type){case l.ADD_PARTICIPANTS:var J=I.tabID,K=I.previewTabID,L=H.mercury.tabContents.get(J);if(!L)return H;L=L.merge({threadPreviewID:K});H=H.setIn(["mercury","tabContents",J],L);return H}return H}function t(H,I){switch(I.type){case l.CLEAR_PARTICIPANTS:var J=I.tabID;H=H.setIn(["mercury","tabContents",J],new(c("FantaTypeTabContents"))({id:J}))}return H}function u(H,I){__p&&__p();c("ifRequired")("FantaTabsReactApp",function(J){if(!c("MercuryIDs").isValidThreadID(I)){H=H.deleteIn(["tabGroup","tabs",I]);v(I)}},function(){c("ifRequired")("FantaTabsSlimApp",function(J){if(!c("MercuryIDs").isValidThreadID(I)){H=H.deleteIn(["tabGroup","tabs",I]);v(I)}})});return H}function v(H){h.getClientIDFromServerID(H,function(I){return c("setImmediate")(function(){if(c("MercuryIDs").isValidThreadID(I))c("FantaTabActions").openTab(I);else i.error("invalid id",H)})})}function w(H,I){switch(I.type){case k.FOCUS_TAB:D(H,I.tabID)}return H}function x(H,I){switch(I.type){case k.CLOSE_TAB:var J=I.tabID;H=z(H,J)}return H}function y(H,I){switch(I.type){case k.DELETE_TAB:var J=I.tabID;H=z(H,J);H=H.deleteIn(["mercury","tabContents",J])}return H}function z(H,I){c("ifRequired")("MessengerVideoAutoplayActions",function(J){J.deleteThread(I)});c("WorkFocusMode")&&c("WorkFocusMode").removeBypassFocusModeForThread(I);return H}function A(H,I){switch(I.type){case k.CLOSE_ALL_TABS:c("ifRequired")("MessengerVideoAutoplayActions",function(J){J.deleteAllThreads()});return H}return H}function B(H,I){switch(I.type){case k.FOCUS_NEXT_TAB:case k.FOCUS_PREVIOUS_TAB:case k.CLOSE_AND_TAB_NEXT:var J=H.tabGroup.focusedTabID;if(J)D(H,J)}return H}function C(H,I){switch(I.type){case k.CLOSE_AND_TAB_NEXT:var J=I.tabID;c("WorkFocusMode")&&c("WorkFocusMode").removeBypassFocusModeForThread(J)}return H}function D(H,I){__p&&__p();var J=c("MercuryIDs").getUserIDFromThreadID(I);if(J){var K=function K(){c("AvailableList").updateForID(J)};if(c("gkx")("AT45Q0YAtTF77a1x8ZT9-rWfsF83gTI5tMuldZujY0KaNI6icTW09jBEE5BSuvPKdZtVIIdleK4appEhrvQPrVOyhvdXTeLDSdYEXUe9KmbS3Q"))c("TimeSlice").guard(K,"superfluous request to first open DD",{propagationType:c("TimeSlice").PropagationType.ORPHAN})();else K()}var L=H.mercury.tabContents.get(I);if(L){var M=L.thread,N=L.pageIndicator;if(N)N.notifyPageOnlineStatusChanged(c("FantaAvailableStatus").getStatus(M,I))}}function E(H){__p&&__p();if(!c("MercuryIDs").isValidThreadID(H))return;c("Bootloader").loadModules(["GroupChatMessageBlockAlert","GroupChatMessageIgnoreAlert","MercuryBlockedParticipants.bs","MercuryIgnoredParticipants.bs","MercuryThreadActions","MercuryThreads"],function(I,J,K,L,M,N){__p&&__p();var O=M.get(),P=N.get(),Q=K.get(),R=L.get();P.getThreadMeta(H,function(S){__p&&__p();if(Q.isPresentInGroupThread(S))I.show(Q.blockedParticipantsInGroupThread(S),function(){c("FantaTabActions").focusTab(H)},function(){c("FantaTabActions").closeTab(H);O.leaveGroup(H)});else if(R.isPresentInGroupThread(S)&&S.folder==="inbox"&&c("gkx")("AT6sQjs7GRVhEipNW3TkmIJi_BHZa2KKyD-Mi9QicLxYmeTJYm7WWpq-_Rh-wyDoXW1BNvzANnO7tf1hMqNgPGMF"))J.show(R.ignoredParticipantsInGroupThread(S),c("MercuryIDs").getThreadFBIDFromThreadID(H),function(){c("FantaTabActions").focusTab(H)},function(){c("FantaTabActions").closeTab(H);c("Bootloader").loadModules(["IgnoreMessagesTypedLogger","IgnoreMessagesLoggingEvent","IgnoreMessagesPlatforms"],function(T,U,V){O.changeFolder(H,c("MessagingTagConstants").other);new T().setEvent(U.IGNORE_CONFIRMED).setThreadID(c("MercuryIDs").getThreadFBIDFromThreadID(H)).setPlatform(V.CHAT_TABS).log()},"FantaReducersMercury")})})},"FantaReducersMercury")}function F(H,I){switch(I.type){case k.UNMINIMIZE_TAB:D(H,I.tabID)}return H}function G(H,I){__p&&__p();switch(I.type){case k.LOAD_FROM_DATA:for(var J=H.tabGroup.tabs.keys(),K=Array.isArray(J),L=0,J=K?J:J[typeof Symbol==="function"?Symbol.iterator:"@@iterator"]();;){var M;if(K){if(L>=J.length)break;M=J[L++]}else{L=J.next();if(L.done)break;M=L.value}var N=M;H=q(H,N)}}return H}f.exports={addParticipants:s,clearParticipants:t,closeAllTabs:A,closeAndTabNext:C,closeTab:x,deleteTab:y,focusTab:w,focusTabEvents:B,loadFromData:G,openTab:n,receivedNewMessage:p,replaceTab:r,unminimizeTab:F}}),null);
__d("FantaReducersMessages",["CurrentUser","FantaGetMessageActions","FantaMessageActions","FantaTabActions","FantaTypeComposer","MercuryBrowserAlerts","MercuryParticipants"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h=c("FantaMessageActions").Types,i=c("FantaTabActions").Types,j=c("FantaGetMessageActions").Types;function k(r,s){switch(s.type){case h.RECEIVED_NEW_MESSAGE:var t=s.message;c("MercuryBrowserAlerts").messageReceived(t);return r}return r}function l(r,s){switch(s.type){case h.COMPOSER_TEXT_UPDATE:var t=s.composer,u=s.message,v=s.threadID,w=r.mercury.tabContents.get(v);if(!w||w&&w.composer.version!==t.version)return r;return r.mergeIn(["mercury","tabContents",v,"composer"],{text:u})}return r}function m(r,s){switch(s.type){case i.CLOSE_TAB:case i.CLOSE_AND_TAB_NEXT:if(!r.mercury.tabContents.get(s.tabID))return r;return r.setIn(["mercury","tabContents",s.tabID,"composer"],new(c("FantaTypeComposer"))())}return r}function n(r,s){switch(s.type){case i.CLOSE_ALL_TABS:var t=r.mercury.tabContents;t.forEach(function(u){var v=u.id;r=r.setIn(["mercury","tabContents",v,"composer"],new(c("FantaTypeComposer"))())});return r}return r}function o(r,s){switch(s.type){case i.SCROLL_BOTTOM_CHANGED:var t=s.tabID,u=s.isScrolledToBottom,p=s.showUnseenMessages,v=r.mercury.tabContents.get(t);if(!v)return r;v=v.merge({isScrolledToBottom:u,showUnseenMessages:p});r=r.setIn(["mercury","tabContents",t],v)}return r}function p(r,s){switch(s.type){case i.SHOW_UNSEEN_MESSAGES:var t=s.tabID,u=r.mercury.tabContents.get(t);if(u)u.showUnseenMessages()}return r}function q(r,s){__p&&__p();switch(s.type){case j.ON_GET_THREAD_RESPONSE:var t=s.thread,u=t.thread_id,v=r.mercury.tabContents.get(u);if(!v)return r;var w=null;if(c("CurrentUser").isWorkUser()&&t.participants)w=t.participants.map(c("MercuryParticipants").getOrFetch,c("MercuryParticipants")).find(function(x){return x&&x.is_coworker===false})!==undefined;v=v.merge({thread:t,isMultiCompany:w});r=r.setIn(["mercury","tabContents",u],v);break}return r}f.exports={closeAllTabs:n,closeTab:m,composerTextUpdate:l,onGetThreadResponse:q,receivedNewMessage:k,scrollBottomChanged:o,showUnseenMessages:p}}),null);
__d("FantaTypeTab",["immutable"],(function a(b,c,d,e,f,g){"use strict";var h,i,j={focusCounter:0,id:"",isHovered:false,isMinimized:false,openCounter:0,entryPoint:"unknown"};h=babelHelpers.inherits(k,c("immutable").Record(j));i=h&&h.prototype;function k(){h.apply(this,arguments)}f.exports=k}),null);
__d("FantaTypeTabGroup",["FantaConst","immutable"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h,i,j={allowedRaisedTabs:c("FantaConst").DEFAULT_ALLOWED_RAISED_TABS,focusedTabID:null,tabs:c("immutable").Map({}),updatedTime:0},k=function k(n){return n.openCounter*-1},l=function l(n){return n.focusCounter*-1};h=babelHelpers.inherits(m,c("immutable").Record(j));i=h&&h.prototype;m.prototype.getRaisedandUnraisedTabs=function(){var n=this.tabs.sortBy(l),o=n.slice(this.allowedRaisedTabs),p=n.take(this.allowedRaisedTabs).sortBy(k);return{raisedTabs:p,unraisedTabs:o}};function m(){h.apply(this,arguments)}f.exports=m}),null);
__d("isWebMessengerURI",[],(function a(b,c,d,e,f,g){function h(i){return/^(\/messages)/.test(i.getPath())}f.exports=h}),null);
__d("FantaReducersTabs",["Bootloader","EventProfiler","FantaConst","FantaMessageActions","FantaTabActions","FantaTypeTab","FantaTypeTabGroup","LogHistory","MercuryIDs","MercuryThreads","PinnedConversationNubsConfig","TimeSlice","URI","isWebMessengerURI"],(function a(b,c,d,e,f,aa){"use strict";__p&&__p();var g=c("MercuryThreads").get(),h=c("FantaMessageActions").Types,i=c("FantaTabActions").Types,j="tab_",k=c("LogHistory").getInstance("fanta_tabs"),l=1,m=1,n=1;function o(O,P){switch(P.type){case i.OPEN_TAB:case i.OPEN_TAB_WITH_INTERSTITIAL_DATA:k.debug(P.type,JSON.stringify({id:P.tabID}));if(m===1)c("EventProfiler").tagCurrentActiveInteractionsAs("FirstChatTabOpen");return v(O,P.tabID||j+n++,true,P.entryPoint)}return O}function p(O,P){__p&&__p();switch(P.type){case i.REPLACE_TAB:var Q=P.tabID,R=P.newTabID,S=O.tabGroup,T=S.tabs,U=T.get(Q);k.debug(P.type,JSON.stringify({id:Q,isExisting:!!U,newID:R}));if(U){var V=U.id===O.tabGroup.focusedTabID;O=O.setIn(["tabGroup","tabs",R],U.merge({id:R})).deleteIn(["tabGroup","tabs",Q]);return v(O,R,V,"replace_tab")}return v(O,R,false,"replace_tab")}return O}function q(O,P){switch(P.type){case i.MINIMIZE_TAB:return w(O,P.tabID,true)}return O}function r(O,P){switch(P.type){case i.UNMINIMIZE_TAB:return w(O,P.tabID,false)}return O}function s(O,P){switch(P.type){case i.FOCUS_TAB:var Q=P.tabID;return D(O,Q)}return O}function t(O,P){switch(P.type){case i.BLUR_TAB:return E(O,P.tabID)}return O}function u(O,P){__p&&__p();var Q;switch(P.type){case h.RECEIVED_NEW_MESSAGE:var R=P.tabID,o=O.tabGroup.tabs.get(R);k.debug(P.type,JSON.stringify({id:R,isOpen:!!o}));if(!o){var Q=function(){__p&&__p();var S=O.tabGroup.focusedTabID;O=v(O,R,false,"message_received");var T=O.tabGroup.allowedRaisedTabs,U=O.tabGroup.getRaisedandUnraisedTabs(),V=U.raisedTabs,W=U.unraisedTabs,X=V.count(),Y=X+W.count();c("TimeSlice").guard(function(){c("Bootloader").loadModules(["FantaTabsVisibleTypedLogger"],function($){new $().setAllowedRaisedTabs(T).setOpenTabs(Y).setVisibleTabs(X).log()},"FantaReducersTabs")},"name",{propagationType:c("TimeSlice").PropagationType.ORPHAN})();var Z=c("URI").getNextURI();if(c("isWebMessengerURI")(Z))return{v:O=w(O,R,true)};else if(S)return{v:D(O,S)}}();if(typeof Q==="object")return Q.v}}return O}function v(O,P,Q){__p&&__p();var R=arguments.length<=3||arguments[3]===undefined?"unknown":arguments[3],S=O.tabGroup,T=S.tabs,U=T.get(P);if(!U){U=new(c("FantaTypeTab"))({id:P,focusCounter:l,openCounter:m++,entryPoint:R});O=O.setIn(["tabGroup","tabs",P],U)}else if(U.isMinimized&&Q)O=w(O,P,false);if(Q)return D(O,P);return O}function w(O,P,Q){var R=O.tabGroup,S=R.tabs.get(P);if(S)O=O.mergeIn(["tabGroup","tabs",P],{isMinimized:Q});return O}function x(O,P){__p&&__p();switch(P.type){case i.MINIMIZE_ALL_TABS:for(var Q=O.tabGroup.tabs.keys(),R=Array.isArray(Q),S=0,Q=R?Q:Q[typeof Symbol==="function"?Symbol.iterator:"@@iterator"]();;){var T;if(R){if(S>=Q.length)break;T=Q[S++]}else{S=Q.next();if(S.done)break;T=S.value}var U=T;O=w(O,U,true)}return O}return O}function y(O,P){switch(P.type){case i.CLOSE_TAB:case i.DELETE_TAB:var Q=P.tabID;k.debug(P.type,JSON.stringify({id:Q}));return A(O,Q)}return O}function z(O,P){switch(P.type){case h.SEND_GROUP_MESSAGE:var Q=P.threadID,R=g.isEmptyLocalThread(Q);if(R)return A(O,Q)}return O}function A(O,P){O=E(O,P);return O.deleteIn(["tabGroup","tabs",P])}function B(O,P){switch(P.type){case i.CLOSE_ALL_TABS:k.debug(P.type);O=E(O,O.tabGroup.focusedTabID);return O.setIn(["tabGroup","tabs"],O.tabGroup.tabs.clear())}return O}function C(O,P){switch(P.type){case i.CLOSE_AND_TAB_NEXT:k.debug(P.type,JSON.stringify({id:P.tabID}));O=A(O,P.tabID);return M(O)}return O}function D(O,P){var Q=arguments.length<=2||arguments[2]===undefined?false:arguments[2],R=O.tabGroup,S=R.tabs.get(P);if(S)O=O.mergeIn(["tabGroup","tabs",P],{focusCounter:l++});var T=Q?null:P;O=O.mergeIn(["tabGroup"],{focusedTabID:T});return O}function E(O,P){if(O.tabGroup.focusedTabID===P)return O.mergeIn(["tabGroup"],{focusedTabID:null});return O}function F(O,P){switch(P.type){case i.HOVERED_TAB:var Q=P.tabID;return H(O,Q,true)}return O}function G(O,P){switch(P.type){case i.UNHOVERED_TAB:var Q=P.tabID;return H(O,Q,false)}return O}function H(O,P,Q){var R=O.tabGroup,S=R.tabs.get(P);if(S)O=O.mergeIn(["tabGroup","tabs",P],{isHovered:Q});return O}function I(O,P){__p&&__p();var Q;switch(P.type){case i.SET_ALLOWED_RAISED_TABS:var R=P.allowedRaisedTabs,S=O.tabGroup.allowedRaisedTabs;if(R!==S)(function(){k.debug(P.type,JSON.stringify({count:R}));if(!c("PinnedConversationNubsConfig").chatTabTypingPriority)R=Math.max(1,R);var T=O.tabGroup.tabs.count(),U=T>R?R:T,V=R>S&&T>S,W=R<S&&T>R;if(V||W)c("Bootloader").loadModules(["FantaTabsVisibleTypedLogger"],function(X){new X().setAllowedRaisedTabs(R).setOpenTabs(T).setVisibleTabs(U).log()},"FantaReducersTabs")})();return J(O,R)}return O}function J(O){var P=arguments.length<=1||arguments[1]===undefined?c("FantaConst").DEFAULT_ALLOWED_RAISED_TABS:arguments[1];if(P===O.tabGroup.allowedRaisedTabs)return O;if(!c("PinnedConversationNubsConfig").chatTabTypingPriority)P=Math.max(1,P);return O.mergeIn(["tabGroup"],{allowedRaisedTabs:P})}function K(O,P){__p&&__p();switch(P.type){case i.LOAD_FROM_DATA:var Q=O.tabGroup,R=P.tabData,S=Q.updatedTime;if(S>=R.updatedTime||R.updatedTime===undefined)return O;O=J(O.set("tabGroup",new(c("FantaTypeTabGroup"))()),Q.allowedRaisedTabs);var T=[];R.tabs.sort(function(U,V){return U.openCounter-V.openCounter}).forEach(function(U){T.push(U.id);O=v(O,U.id,false,"loaded_from_data");if(U.isMinimized)O=w(O,U.id,U.isMinimized)});R.tabs.sort(function(U,V){return U.focusCounter-V.focusCounter}).forEach(function(U){O=D(O,U.id,true)});k.debug(P.type,JSON.stringify({updatedTime:S,newerTime:R.updatedTime,opened:T}));O=R.focusedTabID?D(O,R.focusedTabID,true):E(O)}return O}function L(O,P){switch(P.type){case i.FOCUS_NEXT_TAB:return M(O)}return O}function M(O){__p&&__p();var P=O.tabGroup.focusedTabID,Q=O.tabGroup.getRaisedandUnraisedTabs(),R=Q.raisedTabs,S=R.count();if(S===0)return O;else if(R.count()===1)return D(O,R.first().id);var T=R.skipUntil(function(U){return U.id===P}).rest();if(T.count()===0)return D(O,R.first().id);else return D(O,T.first().id)}function N(O,P){__p&&__p();switch(P.type){case i.FOCUS_PREVIOUS_TAB:var Q=O.tabGroup.focusedTabID,R=O.tabGroup.getRaisedandUnraisedTabs(),S=R.raisedTabs;if(S.count()<2)return O;var T=S.reverse().skipUntil(function(U){return U.id===Q}).rest();if(T.count()===0)return D(O,S.last().id);else return D(O,T.first().id)}return O}f.exports={addParticipantsToLocalGroup:z,blurTab:t,closeAllTabs:B,closeAndTabNext:C,closeTab:y,focusNextTab:L,focusPreviousTab:N,focusTab:s,hoveredTab:F,loadFromData:K,minimizAllTabs:x,minimizeTab:q,openTab:o,receivedNewMessage:u,replaceTab:p,setAllowedRaisedTabs:I,unhoveredTab:G,unminimizeTab:r}}),null);
__d("FantaTypeMercuryState",["immutable"],(function a(b,c,d,e,f,g){"use strict";var h,i,j={tabContents:c("immutable").Map({})};h=babelHelpers.inherits(k,c("immutable").Record(j));i=h&&h.prototype;function k(){h.apply(this,arguments)}f.exports=k}),null);
__d("FantaTypeAppState",["FantaTypeMercuryState","FantaTypeTabGroup","immutable"],(function a(b,c,d,e,f,g){"use strict";var h,i,j={tabGroup:new(c("FantaTypeTabGroup"))(),mercury:new(c("FantaTypeMercuryState"))()};h=babelHelpers.inherits(k,c("immutable").Record(j));i=h&&h.prototype;function k(){h.apply(this,arguments)}f.exports=k}),null);
__d("FantaAppStore",["FantaComposeViewReducers","FantaDispatcher","FantaReducersCookie","FantaReducersDockCalculator","FantaReducersLogging","FantaReducersMercury","FantaReducersMessages","FantaReducersTabs","FantaTypeAppState","FluxReduceStore","PresenceState","gkx"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h,i,j=[].concat(Object.values(c("FantaReducersTabs")),Object.values(c("FantaReducersMercury")),Object.values(c("FantaReducersMessages")),Object.values(c("FantaReducersDockCalculator")),Object.values(c("FantaReducersCookie")),Object.values(c("FantaComposeViewReducers")),Object.values(c("FantaReducersLogging")));h=babelHelpers.inherits(k,c("FluxReduceStore"));i=h&&h.prototype;k.prototype.getInitialState=function(){return new(c("FantaTypeAppState"))()};k.prototype.ignoreReducer=function(m){var n=Object.values(m);j=j.filter(function(o){return!n.find(function(p){return p===o})})};k.prototype.addReducers=function(m){this.ignoreReducer(m);j=j.concat(Object.values(m))};k.prototype.reduce=function(m,n){return j.reduce(function(m,o){return o(m,n)},m)};function k(){h.apply(this,arguments)}var l=new k(c("FantaDispatcher"));if(!c("gkx")("AT7GEM_Bk6j5oGIkj34d9qm70CejWGUjCaOEQ_zb6oT8Z0SFosMbKeMY0NUporco3a4nlVgYlJ0f1Hlwi6t_P31q"))l.addListener(function(){return c("PresenceState").doSync()});f.exports=l}),null);
__d("FantaCookieUtil",["FantaConst","Map","MercuryIDs","MercuryThreads","WorkModeConfig"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h=c("MercuryThreads").get(),i={convertCookieData:function j(k,l,m){__p&&__p();var n={tabs:[],focusedTabID:null,updatedTime:0,interstitialData:m},o=[],p=this._getCookieKeys();k=k||{};if(k[p.tabs])o=k[p.tabs];o.forEach(function(u){n.tabs.push({id:u.i,isMinimized:!u.r,openCounter:u.o,focusCounter:u.f})});if(l)for(var q=l.tabs.values(),r=Array.isArray(q),s=0,q=r?q:q[typeof Symbol==="function"?Symbol.iterator:"@@iterator"]();;){var t;if(r){if(s>=q.length)break;t=q[s++]}else{s=q.next();if(s.done)break;t=s.value}var u=t;if(h.isEmptyLocalThread(u.id))n.tabs.push({id:u.id,isMinimized:u.isMinimized,openCounter:u.openCounter,focusCounter:u.focusCounter})}n.focusedTabID=k[p.focusedTabID];n.updatedTime=k[p.updatedTime];return n},createCookieData:function j(k,l){__p&&__p();var m=[],n=this._getCookieKeys();if(l[n.updatedTime]>k.updatedTime)return l;for(var o=k.tabs.values(),p=Array.isArray(o),q=0,o=p?o:o[typeof Symbol==="function"?Symbol.iterator:"@@iterator"]();;){var r;if(p){if(q>=o.length)break;r=o[q++]}else{q=o.next();if(q.done)break;r=q.value}var s=r;if(!c("MercuryIDs").isLocalThread(s.id))m.push({i:s.id,r:s.isMinimized?undefined:1,o:s.openCounter,f:s.focusCounter})}l[n.tabs]=m;l[n.focusedTabID]=k.focusedTabID;l[n.updatedTime]=k.updatedTime;return l},_getCookieKeys:function j(){var k=c("WorkModeConfig").is_work_user;return{tabs:k?c("FantaConst").cookieIDs.WORK_COOKIE_ID:c("FantaConst").cookieIDs.PERSONAL_COOKIE_ID,focusedTabID:k?c("FantaConst").cookieIDs.WORK_FOCUS_COOKIE_ID:c("FantaConst").cookieIDs.PERSONAL_FOCUS_COOKIE_ID,updatedTime:k?c("FantaConst").cookieIDs.WORK_TIME_COOKIE_ID:c("FantaConst").cookieIDs.PERSONAL_TIME_COOKIE_ID}}};f.exports=i}),null);
__d("FantaMercuryThreadEventsBootloaded",["Bootloader","MercuryThreadInformer","MercuryThreads","MercuryViewer"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h=c("MercuryThreadInformer").get(),i=c("MercuryThreads").get(),j={onMessagesReceived:function k(l){__p&&__p();h.subscribe("messages-received",function(m,n){__p&&__p();var o,p=function p(q){__p&&__p();var r,s=n[q],t=function t(u){var v=s[u];if(v.author!=c("MercuryViewer").getID()){if(!v.is_unread)return"continue";i.getThreadMeta(q,function(w){c("Bootloader").loadModules(["ChatTabPolicy"],function(x){x.messageIsAllowed(w,v,function(){l(q,v)})},"FantaMercuryThreadEventsBootloaded")})}};for(var u=0;u<s.length;u++){var r=t(u);if(r==="continue")continue}};for(var q in n)p(q)})}};f.exports=j}),null);
__d("FantaTabViewportManager",["Arbiter","DockTabsViewportCalculator","DockTabsViewportFantaTabUtils","FantaTabActions","immutable","ifRequired","isWebMessengerURI","setImmediate"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();function h(i){__p&&__p();var j=c("DockTabsViewportCalculator").getInstance(i);if(!j)return;j.registerFantaTabCallbacks({fantaTabModelStateGetter:function k(){var l=c("immutable").Map({});c("ifRequired")("FantaAppStore",function(m){l=m.getState().tabGroup.tabs});return l},onAvailableWidthChanged:function k(l){c("setImmediate")(function(){c("FantaTabActions").setAllowedRaisedTabs(c("DockTabsViewportFantaTabUtils").getTabCountToFitWidth(l))})}});c("Arbiter").subscribe("FantaReducersDockCalculator/shouldRecalculate",function(){j.forceRecalculateChatTabs()});j.forceRecalculateFBDockWidth();c("Arbiter").subscribe("page_transition",function(k,l){if(c("isWebMessengerURI")(l.uri))c("setImmediate")(function(){return c("FantaTabActions").minimizeAllTabs()})})}f.exports={init:h}}),null);
__d("HotLikeSound",["MercurySoundsConfig","SoundPlayer","StickerConstants"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h=[c("MercurySoundsConfig").hot_like_grow_mp3_url,c("MercurySoundsConfig").hot_like_grow_ogg_url],i=[c("MercurySoundsConfig").hot_like_pop_mp3_url,c("MercurySoundsConfig").hot_like_pop_ogg_url],j=[c("MercurySoundsConfig").hot_like_outgoing_small_mp3_url,c("MercurySoundsConfig").hot_like_outgoing_small_ogg_url],k=[c("MercurySoundsConfig").hot_like_outgoing_medium_mp3_url,c("MercurySoundsConfig").hot_like_outgoing_medium_ogg_url],l=[c("MercurySoundsConfig").hot_like_outgoing_large_mp3_url,c("MercurySoundsConfig").hot_like_outgoing_large_ogg_url],m=function m(){return false},n={setCheckSoundEnabledFunc:function o(p){m=p},start:function o(){this._play(h)},stop:function o(){c("SoundPlayer").stop(h)},pop:function o(){this.stop();this._play(i)},snap:function o(p){this.stop();if(p===c("StickerConstants").HOT_LIKE_SMALL_STICKER_ID)this._play(j);if(p===c("StickerConstants").HOT_LIKE_MEDIUM_STICKER_ID)this._play(k);if(p===c("StickerConstants").HOT_LIKE_LARGE_STICKER_ID)this._play(l)},_play:function o(p){if(m())c("SoundPlayer").play(p)}};f.exports=n}),null);
__d("MercuryDeliveryState",["MercuryConfig","MercuryIDs","MercuryServerRequests","MercurySingletonProvider","MercuryThreadIDMap","MercuryThreadInformer","PresencePrivacy","UserActivity","debounceAcrossTransitions","gkx"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h=c("MercuryConfig").delivery_timeout||12e4;i.getForFBID=function(k){return j.getForFBID(k)};i.get=function(){return j.get()};function i(k){__p&&__p();this.$MercuryDeliveryState8=function(){if(this.$MercuryDeliveryState5.length===0&&Object.keys(this.$MercuryDeliveryState6).length===0)return;var l=this.$MercuryDeliveryState5.map(function(m){return m.message_id});if(l)this.$MercuryDeliveryState2.sendDeliveryReceipts(l,this.$MercuryDeliveryState6);this.$MercuryDeliveryState6={};this.$MercuryDeliveryState5=[]}.bind(this);this.$MercuryDeliveryState1=k;this.$MercuryDeliveryState2=c("MercuryServerRequests").getForFBID(this.$MercuryDeliveryState1);this.$MercuryDeliveryState3=c("MercuryThreadInformer").getForFBID(this.$MercuryDeliveryState1);this.$MercuryDeliveryState4=c("MercuryThreadIDMap").getForFBID(this.$MercuryDeliveryState1);this.$MercuryDeliveryState5=[];this.$MercuryDeliveryState6={};this.$MercuryDeliveryState3.subscribe("messages-received",this.$MercuryDeliveryState7.bind(this));c("UserActivity").subscribe(c("debounceAcrossTransitions")(this.$MercuryDeliveryState8,300,this))}i.prototype.$MercuryDeliveryState7=function(k,l){__p&&__p();for(var m in l){var n=l[m];n.forEach(function(o){if(this.$MercuryDeliveryState9(o)){this.$MercuryDeliveryState5.push(o);this.$MercuryDeliveryState4.getServerIDFromClientID(m,function(p){if(!this.$MercuryDeliveryState6[p])this.$MercuryDeliveryState6[p]=[];this.$MercuryDeliveryState6[p].push(o.message_id)}.bind(this))}}.bind(this))}if(c("UserActivity").isActive(h)||c("gkx")("AT6QldQ637XMvCyugHEhjQqDDf2-wtP50HTiWZ1Ww9U3TKMTy-LCSwNJff4SK8McDFogXyIPPHKCxhkz9mFRLCX-m6fUBuF8qkM5EElKo4EzDw"))this.$MercuryDeliveryState8()};i.prototype.$MercuryDeliveryState9=function(k){var l=k.author?c("MercuryIDs").getUserIDFromParticipantID(k.author):null;if(l===this.$MercuryDeliveryState1)return false;if(!k.is_unread)return false;return true};var j=new(c("MercurySingletonProvider"))(i);f.exports=i}),null);
__d("MercuryIgnoredParticipants.bs",["Set","bs_array","Utils.bs","MercuryIDs","bs_js_primitive","MercuryDispatcher","MercurySingletonProvider.bs","MercuryIgnoredBlockedParticipants.bs"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();function h(l){__p&&__p();var m=new(c("Set"))(),n=c("MercuryDispatcher").getForFBID(l);n.subscribe("update-ignored-users",function(o,p){__p&&__p();var q=p.message_ignored_ids;if(!(q==null))c("bs_array").iter(function(s){m.add(s);return 0},q);var r=c("Utils.bs").$pipe$unknown(c("bs_js_primitive").null_undefined_to_opt(p.participants),[]);r.forEach(function(s){__p&&__p();var q=c("Utils.bs").nullUndefinedBooleanToOptionBool(s.is_messenger_ignored),t=s.fbid;if(q)if(q[0]!==0)if(t==null)return 0;else{m.add(c("MercuryIDs").getParticipantIDFromUserID(t));return 0}else if(t==null)return 0;else{+m["delete"](c("MercuryIDs").getParticipantIDFromUserID(t));return 0}else return 0});return 0});return{findIntersection:function o(p){return c("MercuryIgnoredBlockedParticipants.bs").findIntersection(l,m,p)},isPresentInGroupThread:function o(p){return c("MercuryIgnoredBlockedParticipants.bs").isPresentInGroupThread(l,m,p)},ignoredParticipantsInGroupThread:function o(p){return c("MercuryIgnoredBlockedParticipants.bs").participantsInGroupThread(l,m,p)},isMessageIgnored:function o(p){return c("MercuryIgnoredBlockedParticipants.bs").qualifiesAs(l,m,p)},__fbid:l}}var i=c("MercurySingletonProvider.bs").Provider([h]),j=i[0],k=i[1];g.getForFBID=j;g.get=k}),null);
__d("MercuryDelayedDispatcher",["MercuryDispatcher","MercuryServerPayloadPreprocessor","MercuryServerRequests","MercurySingletonProvider","MercuryThreadIDMap"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();function h(j){this.$MercuryDelayedDispatcher1=j;this.$MercuryDelayedDispatcher2=[];this.$MercuryDelayedDispatcher3=c("MercuryThreadIDMap").getForFBID(this.$MercuryDelayedDispatcher1);this.$MercuryDelayedDispatcher4=c("MercuryDispatcher").getForFBID(this.$MercuryDelayedDispatcher1);this.$MercuryDelayedDispatcher5=c("MercuryServerRequests").getForFBID(this.$MercuryDelayedDispatcher1);this.$MercuryDelayedDispatcher6=c("MercuryServerPayloadPreprocessor").getForFBID(this.$MercuryDelayedDispatcher1);this.$MercuryDelayedDispatcher4.subscribe("model-update-completed",function(k,l){return this.$MercuryDelayedDispatcher7()}.bind(this))}h.getForFBID=function(j){return i.getForFBID(j)};h.get=function(){return i.get()};h.prototype.handleUpdateWaitForThread=function(j,k){var l=this.$MercuryDelayedDispatcher3.getClientIDFromServerIDNow(k);if(l){this.$MercuryDelayedDispatcher8(j);return}this.$MercuryDelayedDispatcher3.getClientIDFromServerID(k,function(){return this.$MercuryDelayedDispatcher2.push({thread_fbid:k,payload:j})}.bind(this));this.$MercuryDelayedDispatcher5.ensureThreadIsFetched(k)};h.prototype.$MercuryDelayedDispatcher7=function(){if(this.$MercuryDelayedDispatcher2&&this.$MercuryDelayedDispatcher2.length){var j=this.$MercuryDelayedDispatcher2.shift(),k=j.thread_fbid,l=j.payload;this.handleUpdateWaitForThread(l,k)}};h.prototype.$MercuryDelayedDispatcher8=function(j){if(j.from_client)this.$MercuryDelayedDispatcher4.handleUpdate(j);else this.$MercuryDelayedDispatcher6.handleUpdate(j)};var i=new(c("MercurySingletonProvider"))(h);f.exports=h}),null);
__d("MercurySyncChannelMonitor",["Arbiter","ChannelConstants","CurrentUser","MercurySingletonProvider","MercurySyncFakeDFFSender"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();function h(j){this.handleAwfulChannelEvent=function(){if(!c("CurrentUser").isLoggedInNow()){this.killSubscriptions();return}c("MercurySyncFakeDFFSender").getForFBID(this.$MercurySyncChannelMonitor1).sendGlobalDFF()}.bind(this);this.$MercurySyncChannelMonitor1=j;this.$MercurySyncChannelMonitor2=false}h.getForFBID=function(j){return i.getForFBID(j)};h.get=function(){return i.get()};h.prototype.setupSubscriptions=function(){if(!this.$MercurySyncChannelMonitor2){this.$MercurySyncChannelMonitor4=c("Arbiter").subscribe(c("ChannelConstants").JUMPSTART,this.handleAwfulChannelEvent);this.$MercurySyncChannelMonitor3=c("Arbiter").subscribe(c("ChannelConstants").THROTTLED,this.handleAwfulChannelEvent);this.$MercurySyncChannelMonitor2=true}};h.prototype.killSubscriptions=function(){if(this.$MercurySyncChannelMonitor2){c("Arbiter").unsubscribe(this.$MercurySyncChannelMonitor4);c("Arbiter").unsubscribe(this.$MercurySyncChannelMonitor3);this.$MercurySyncChannelMonitor2=false}};var i=new(c("MercurySingletonProvider"))(h);f.exports=h}),null);
__d("MercuryMessageCustomizations",[],(function a(b,c,d,e,f,g){"use strict";__p&&__p();function h(j,k){var l=j.customizations;if(!l)return null;var m=l.filter(function(n){return n.customization_type===k});return m.length>0?m[0].customization_value:null}function i(j){var k=JSON.parse(j),l=[];Object.keys(k).forEach(function(m){l.push({customization_type:m,customization_value:k[m]})});return l}f.exports={getCustomizationValue:h,parseCustomizations:i}}),null);
__d("MercuryProfileRanges",["idx"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();function h(i){if(!i.id&&i.i)return{id:i.i,offset:i.o,length:i.l};return i}f.exports={extractFromDelta:function i(j){var k,l=(k=j)!=null?(k=k.data)!=null?k.prng:k:k;if(!l)return undefined;var m=[];try{m=JSON.parse(l);if(m.length>0)return m.map(h)}catch(n){}return m}}}),null);
__d("MessengerRealtimeAttachmentTransformer.bs",["MessengerMessageTransformer.bs","MessengerAttachmentTransformer.bs"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();function h(i,j,k){var l=c("MessengerMessageTransformer.bs").unsafeCastBlobAttachments(j),m=j.extensible_attachment,n;if(m==null)n=null;else{var o=m.story_attachment;n={legacy_attachment_id:m.legacy_attachment_id,story_attachment:o==null?null:c("MessengerMessageTransformer.bs").unsafeCastExtensibleAttachment(o)}}return c("MessengerAttachmentTransformer.bs").transformAttachment(i,{extensible_attachment:n,blob_attachments:l,sticker:j.sticker},k)}g.transform=h}),null);
__d("MercurySyncNewMessageTransformer",["FBIDCheck","IrisProtocolMessageLifetime","MercuryActionType","MercuryConfig","MercuryIDs","MercuryMessageCustomizations","MercuryProfileRanges","MercuryTimestamp","MessagingTag","PageCommItemStatus","MessengerRealtimeAttachmentTransformer.bs"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h=function h(j){var k={};try{k=JSON.parse(j)}catch(l){}return k};function i(j,k){__p&&__p();var l=parseInt(k.messageMetadata.timestamp,10),m=c("MercuryTimestamp").getFormatedTimestamp(l),n=k.messageMetadata.skipBumpThread,o=j!==k.messageMetadata.actorFbId,p=[];if(k.attachments)p=k.attachments.map(function(u){__p&&__p();var v=u.mercury,w=v.extensible_attachment,x=v.blob_attachment,y=v.sticker_attachment;if(!w&&!x&&!y)return null;var z=c("FBIDCheck").isUser_deprecated(j),A=[];if(w)A=c("MessengerRealtimeAttachmentTransformer.bs").transform(j,{extensible_attachment:w},z);else if(x)A=c("MessengerRealtimeAttachmentTransformer.bs").transform(j,{blob_attachments:[x]},z);else A=c("MessengerRealtimeAttachmentTransformer.bs").transform(j,{sticker:y});return A.length>0?A[0]:null});var q=!c("FBIDCheck").isUser_deprecated(j);p=p.filter(Boolean);var r=k.messageMetadata.tags?k.messageMetadata.tags[0]:undefined,s=null;if(k.data&&k.data.adminSignatureCreatorID){var t=k.data;s={creatorID:t.adminSignatureCreatorID||null,creatorName:t.adminSignatureCreatorName||null,creatorType:t.adminSignatureCreatorType||null,labelType:t.adminSignatureLabelType||null,pageID:t.adminSignaturePageID||null,profileURI:t.adminSignatureProfileURI||null}}return{message_id:k.messageMetadata.messageId,threading_id:null,offline_threading_id:k.messageMetadata.offlineThreadingId,author:c("MercuryIDs").getParticipantIDFromUserID(k.messageMetadata.actorFbId),author_email:k.messageMetadata.actorFbId+"@facebook.com",ephemeral_ttl_mode:k.ttl?c("IrisProtocolMessageLifetime")[k.ttl]:0,timestamp:l,is_unread:o,is_filtered_content:false,is_filtered_content_bh:false,is_filtered_content_account:false,is_filtered_content_quasar:false,is_filtered_content_invalid_app:false,source:r,tags:k.messageMetadata.tags,is_spoof_warning:false,folder:c("MessagingTag").INBOX,thread_fbid:k.messageMetadata.threadKey.threadFbId,other_user_fbid:k.messageMetadata.threadKey.otherUserFbId,body:k.body!==undefined?k.body:"",html_body:null,subject:null,has_attachment:p.length>0,attachments:p,ranges:undefined,thread_id:null,action_type:c("MercuryActionType").USER_GENERATED_MESSAGE,is_from_iris:true,is_sponsored:!!(k.data&&k.data.is_sponsored&&k.data.is_sponsored==="true")||!!(k.untypedData&&k.untypedData.is_sponsored&&k.untypedData.is_sponsored==="true"),commerce_message_type:k.data?k.data.commerce_message_type:null,customizations:k.data&&k.data.customization?c("MercuryMessageCustomizations").parseCustomizations(k.data.customization):null,platform_xmd:k.data&&k.data.platform_xmd?k.data.platform_xmd:null,profile_ranges:c("MercuryProfileRanges").extractFromDelta(k),message_source:k.data&&k.data.message_source_data?h(k.data.message_source_data).message_source:null,skip_bump_thread:n,montage_reply_data:k.data&&k.data.montage_reply_data?h(k.data.montage_reply_data):null,meta_ranges:k.data&&k.data.meta_ranges?h(k.data.meta_ranges):null,creator_info:s,comm_status:q?c("PageCommItemStatus").TODO:null}}f.exports={transform:i}}),null);
__d("MercurySyncAdminTextMessageTransformer",["MercuryActionType","MercuryLogMessageType","MercurySyncNewMessageTransformer"],(function a(b,c,d,e,f,g){"use strict";function h(i,j){var k=c("MercurySyncNewMessageTransformer").transform(i,j);k.action_type=c("MercuryActionType").LOG_MESSAGE;k.log_message_body=j.messageMetadata.adminText;k.log_message_data={message_type:j.type,untypedData:j.untypedData};k.log_message_type=c("MercuryLogMessageType").GENERIC_ADMIN_TEXT;return k}f.exports={transform:h}}),null);
__d("LiveLocationStopReason",[],(function a(b,c,d,e,f,g){f.exports=Object.freeze({EXPIRED:1,CANCELED:2,ARRIVED:3})}),null);
__d("MercurySyncClientPayloadTransformer",["DateConsts","LiveLocationStopReason","MercuryActionType","MercuryIDs","MessageLiveLocationClientSyncProtocolStopReason","PageCommItemStatus","keyMirror"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h=c("keyMirror")(c("LiveLocationStopReason")),i=8;function j(q){__p&&__p();var r=q.payload;r=JSON.parse(String.fromCharCode.apply(null,r));var s=r&&r.deltas,t=s[0];if(t.deltaMessageReaction)return l(t.deltaMessageReaction);else if(t.liveLocationData)return n(t.liveLocationData);else if(t.deltaUpdateGroupEventRSVPStatus){var u=t.deltaUpdateGroupEventRSVPStatus;return m(u)}else if(t.deltaPageThreadFollowUpData)return p(t.deltaPageThreadFollowUpData);else if(t.deltaChangeViewerStatus)return k(t.deltaChangeViewerStatus);else return o(t)}function k(q){var r=q.actorFbid,s=q.canViewerReply,t=q.reason,u=q.threadKey,v=c("MercuryIDs").getParticipantIDFromUserID(u.otherUserFbId);return{action_type:c("MercuryActionType").BLOCK_STATUS_CHANGED,actorFbid:r,canViewerReply:s,reason:t,message_blocked_ids:[v],other_user_fbid:u.otherUserFbId.toString()}}function l(q){var r=q.messageId,s=q.offlineThreadingId,t=q.reaction,u=q.senderId,v=q.userId,w=q.threadKey.threadFbId||q.threadKey.otherUserFbId;return{action_type:c("MercuryActionType").REACTION_UPDATE,messageId:r,offlineThreadingId:s,reaction:t,senderId:u,thread_fbid:w.toString(),userId:v}}function m(q){var r=q.threadKey&&q.threadKey.threadFbId;if(!r)return null;var s=q.actorFbId,t=q.rsvpStatus;if(!s)return null;return{action_type:c("MercuryActionType").EVENT_RSVP_CHANGED,thread_fbid:r.toString(),actor_fbid:s.toString(),rsvp_status:t}}function n(q){__p&&__p();var r=q.threadKey;if(!r)return null;var s=r.threadFbId||r.otherUserFbId;if(!s)return null;if(!q.messageLiveLocations||q.messageLiveLocations.length!==1)return null;var t=q.messageLiveLocations[0],u=t.expirationTime,v=t.stopReason!=null||Date.now()/c("DateConsts").MS_PER_SEC>u,w=function w(A){return A/Math.pow(10,i)},x=t.coordinate?{latitude:w(t.coordinate.latitude),longitude:w(t.coordinate.longitude)}:null,y=null;if(t.destination)y={latitude:w(t.destination.latitude),longitude:w(t.destination.longitude),label:t.destination.label};var z=null;switch(t.stopReason){case c("MessageLiveLocationClientSyncProtocolStopReason").EXPIRED:z=h.EXPIRED;break;case c("MessageLiveLocationClientSyncProtocolStopReason").CANCELED:z=h.CANCELED;break;case c("MessageLiveLocationClientSyncProtocolStopReason").ARRIVED:z=h.ARRIVED;break}return{action_type:c("MercuryActionType").LIVE_LOCATION_UPDATE,thread_fbid:s.toString(),messageId:t.messageId,liveLocation:{live_location_id:t.id.toString(),is_expired:v,expiration_time:u,sender:{id:t.senderId.toString()},coordinate:x,location_title:t.locationTitle,sender_destination:y,stop_reason:z}}}function o(q){var r=q&&q.deltaPaymentPinProtectionStatusData,s=r&&r.threadKey&&r.threadKey.otherUserFbId,t=r&&r.isPinProtected;if(!s)return null;var u=s.toString();return{action_type:c("MercuryActionType").IS_PIN_PROTECTED,thread_fbid:u,is_pin_protected:t}}function p(q){var r=q.threadKey.otherUserFbId;return{action_type:c("MercuryActionType").UPDATE_COMM_STATUS,comm_status:q.isFollowUp?c("PageCommItemStatus").FOLLOW_UP:c("PageCommItemStatus").TODO,thread_fbid:r.toString()}}f.exports={transform:j}}),null);
__d("MercurySyncDeliveryReceiptTransformer",[],(function a(b,c,d,e,f,g){"use strict";function h(i){return{delivery_receipts:[{other_user_fbid:i.threadKey.otherUserFbId?i.threadKey.otherUserFbId:"",thread_fbid:i.threadKey.threadFbId?i.threadKey.threadFbId:"",time:parseInt(i.deliveredWatermarkTimestampMs,10)}]}}f.exports={transform:h}}),null);
__d("MercurySyncMarkFolderChangeTransformer",["MercuryActionType","MessagingTag"],(function a(b,c,d,e,f,g){"use strict";function h(i){return{action_type:c("MercuryActionType").CHANGE_FOLDER,other_user_fbid:i.threadKey.otherUserFbId,new_folder:c("MessagingTag").IRIS_MAPPING[i.folder]}}f.exports={transform:h}}),null);
__d("MercurySyncMarkFolderSeenTransformer",["MercuryGlobalActionType","MessagingTag"],(function a(b,c,d,e,f,g){"use strict";function h(i){return i.folders.map(function(j){return{action_type:c("MercuryGlobalActionType").MARK_ALL_SEEN,folder:c("MessagingTag").IRIS_MAPPING[j],timestamp:parseInt(i.timestamp,10)}})}f.exports={transform:h}}),null);
__d("MercurySyncMarkReadTransformer",["MercuryActionType","MercuryGlobalActionType","MessagingTag"],(function a(b,c,d,e,f,g){"use strict";function h(i){if(i.folders&&i.folders.length>0)return i.folders.map(function(j){return{action_type:c("MercuryGlobalActionType").MARK_ALL_READ,action_id:null,folder:c("MessagingTag").IRIS_MAPPING[j],timestamp:parseInt(i.watermarkTimestamp,10)}});return i.threadKeys.map(function(j){return{action_type:c("MercuryActionType").CHANGE_READ_STATUS,other_user_fbid:j.otherUserFbId,thread_fbid:j.threadFbId,mark_as_read:true,timestamp:parseInt(i.watermarkTimestamp,10),folder:c("MessagingTag").INBOX}})}f.exports={transform:h}}),null);
__d("MercurySyncMarkUnreadTransformer",["MercuryActionType","MessagingTag"],(function a(b,c,d,e,f,g){"use strict";function h(i){return i.threadKeys.map(function(j){return{action_type:c("MercuryActionType").CHANGE_READ_STATUS,other_user_fbid:j.otherUserFbId,thread_fbid:j.threadFbId,mark_as_read:false,timestamp:parseInt(i.watermarkTimestamp,10),folder:c("MessagingTag").INBOX}})}f.exports={transform:h}}),null);
__d("MercurySyncMessageDeleteTransformer",["MercuryActionType"],(function a(b,c,d,e,f,g){"use strict";function h(i){return{action_type:c("MercuryActionType").DELETE_MESSAGES,message_ids:i.messageIds,other_user_fbid:i.threadKey.otherUserFbId,thread_fbid:i.threadKey.threadFbId}}f.exports={transform:h}}),null);
__d("PagesMessagingEventType",[],(function a(b,c,d,e,f,g){f.exports=Object.freeze({FLAG:1,CREATE_ADMIN_NOTE:2,PRIORITY_UPDATE:3})}),null);
__d("MercurySyncPagesManagerEventTransformer",["MercuryActionType","PagesMessagingEventType"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();function h(i){var j=JSON.parse(i.jsonBlob),k=j&&j.type;if(!k)return undefined;switch(k){case c("PagesMessagingEventType").FLAG:var l=!!(j&&j.flagData&&j.flagData.state),m={action_type:c("MercuryActionType").CHANGE_FLAG,mark_as_flag:l,other_user_fbid:i.threadKey.otherUserFbId,thread_fbid:i.threadKey.threadFbId};return m;default:return undefined}}f.exports={transform:h}}),null);
__d("MercurySyncParticipantLeftGroupThreadTransformer",["MercuryActionType","MercuryIDs","MercuryLogMessageType","MercurySyncNewMessageTransformer"],(function a(b,c,d,e,f,g){"use strict";function h(i,j){var k=c("MercurySyncNewMessageTransformer").transform(i,j);k.action_type=c("MercuryActionType").LOG_MESSAGE;k.log_message_body=j.messageMetadata.adminText;k.log_message_data={removed_participants:[c("MercuryIDs").getParticipantIDFromUserID(j.leftParticipantFbId)]};k.log_message_type=c("MercuryLogMessageType").UNSUBSCRIBE;return k}f.exports={transform:h}}),null);
__d("MercurySyncParticipantsAddedToGroupThreadTransformer",["MercuryActionType","MercuryIDs","MercuryLogMessageType","MercurySyncNewMessageTransformer"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();function h(i,j){var k=c("MercurySyncNewMessageTransformer").transform(i,j);k.action_type=c("MercuryActionType").LOG_MESSAGE;k.log_message_body=j.messageMetadata.adminText;k.log_message_data={added_participants:j.addedParticipants.map(function(l){return c("MercuryIDs").getParticipantIDFromUserID(l.userFbId)})};k.log_message_type=c("MercuryLogMessageType").SUBSCRIBE;return k}f.exports={transform:h}}),null);
__d("MercurySyncRTCEventLogTransformer",["MercuryActionType","MercuryIDs","MercuryLogMessageType","MercurySyncNewMessageTransformer"],(function a(b,c,d,e,f,g){"use strict";function h(i,j){var k=c("MercurySyncNewMessageTransformer").transform(i,j),l=j.messageMetadata.actorFbId,m=l===i?j.messageMetadata.threadKey.otherUserFbId:i,n=j.eventType==="VOICE_EVENT"?c("MercuryLogMessageType").PHONE_CALL:c("MercuryLogMessageType").VIDEO_CALL;k.action_type=c("MercuryActionType").LOG_MESSAGE;k.log_message_body=j.messageMetadata.adminText;k.log_message_data={answered:j.duration>0,callee:c("MercuryIDs").getParticipantIDFromUserID(m),caller:c("MercuryIDs").getParticipantIDFromUserID(l)};k.log_message_type=n;return k}f.exports={transform:h}}),null);
__d("MercurySyncReadReceiptTransformer",[],(function a(b,c,d,e,f,g){"use strict";function h(i){var j={watermark:parseInt(i.watermarkTimestampMs,10),action:parseInt(i.actionTimestampMs,10)},k=i.threadKey.otherUserFbId||i.actorFbId,l=i.threadKey.otherUserFbId||i.threadKey.threadFbId,m={roger:{}};m.roger[l]={};m.roger[l][k]=j;return m}f.exports={transform:h}}),null);
__d("MercurySyncReplaceMessageTransformer",["MercuryActionType","MercurySyncNewMessageTransformer"],(function a(b,c,d,e,f,g){"use strict";function h(i,j){j=Object.assign({},j.newMessage,j);return Object.assign(c("MercurySyncNewMessageTransformer").transform(i,j),{action_type:c("MercuryActionType").REPLACE_MESSAGE,replaced_message_id:j.replacedMessageId})}f.exports={transform:h}}),null);
__d("MercurySyncRtcCallDataTransformer",["MercuryActionType"],(function a(b,c,d,e,f,g){"use strict";function h(i){var j=i.messageMetadata.threadKey&&i.messageMetadata.threadKey.threadFbId?i.messageMetadata.threadKey.threadFbId.toString():undefined,k=i.initiator&&i.initiator.userFbId?i.initiator.userFbId.toString():undefined;return{action_type:c("MercuryActionType").UPDATE_RTC_CALL_DATA,thread_fbid:j,call_state:i.callState,server_info_data:i.serverInfoData,initiator_fbid:k}}f.exports={transform:h}}),null);
__d("MessagingThreadAction",[],(function a(b,c,d,e,f,g){f.exports=Object.freeze({ACTION_INVALID:"ACTION_INVALID",ACTION_ARCHIVED:"ACTION_ARCHIVED",ACTION_UNARCHIVED:"ACTION_UNARCHIVED"})}),null);
__d("MercurySyncThreadActionTransformer",["MercuryActionType","MessagingThreadAction"],(function a(b,c,d,e,f,g){"use strict";function h(i){var j={action_type:c("MercuryActionType").CHANGE_ARCHIVED_STATUS,thread_fbid:i.threadKey.threadFbId,other_user_fbid:i.threadKey.otherUserFbId,archived:i.action===c("MessagingThreadAction").ACTION_ARCHIVED};return j}f.exports={transform:h}}),null);
__d("MercurySyncThreadAdminsAddToGroupTransformer",["MercuryActionType","MercuryIDs"],(function a(b,c,d,e,f,g){"use strict";function h(i){return{action_type:c("MercuryActionType").ADD_GROUP_ADMINS,action_id:null,thread_fbid:i.messageMetadata.threadKey.threadFbId,added_admin_ids:i.addedAdmins.map(function(j){return c("MercuryIDs").getParticipantIDFromUserID(j.userFbId)})}}f.exports={transform:h}}),null);
__d("MercurySyncThreadAdminsRemovedFromGroupTransformer",["MercuryActionType","MercuryIDs"],(function a(b,c,d,e,f,g){"use strict";function h(i){return{action_type:c("MercuryActionType").REMOVE_GROUP_ADMINS,action_id:null,thread_fbid:i.messageMetadata.threadKey.threadFbId,removed_admin_ids:i.removedAdminFbIds.map(function(j){return c("MercuryIDs").getParticipantIDFromUserID(j)})}}f.exports={transform:h}}),null);
__d("MercurySyncThreadApprovalModeTransformer",["MercuryActionType","MessengerApprovalModeTypes"],(function a(b,c,d,e,f,g){"use strict";function h(i){return{action_type:c("MercuryActionType").APPROVAL_MODE,action_id:null,thread_fbid:i.messageMetadata.threadKey.threadFbId,approval_mode:c("MessengerApprovalModeTypes")[i.mode]}}f.exports={transform:h}}),null);
__d("MessengerApprovalQueueTypes",[],(function a(b,c,d,e,f,g){f.exports=Object.freeze({REQUESTED:"REQUESTED",REMOVED:"REMOVED"})}),null);
__d("MercurySyncThreadApprovalQueueTransformer",["MercuryActionType","MercuryIDs","MessengerApprovalQueueTypes"],(function a(b,c,d,e,f,g){"use strict";function h(i){var j=c("MercuryIDs").getParticipantIDFromUserID(i.recipientFbId);return{action_type:c("MercuryActionType").APPROVAL_QUEUE,action_id:null,thread_fbid:i.messageMetadata.threadKey.threadFbId,removed_id:i.action===c("MessengerApprovalQueueTypes").REMOVED?j:null,added_id:i.action===c("MessengerApprovalQueueTypes").REQUESTED?j:null}}f.exports={transform:h}}),null);
__d("MercurySyncThreadDeleteTransformer",["MercuryActionType"],(function a(b,c,d,e,f,g){"use strict";function h(i){return i.threadKeys.map(function(j){return{action_type:c("MercuryActionType").DELETE_THREAD,other_user_fbid:j.otherUserFbId,thread_fbid:j.threadFbId}})}f.exports={transform:h}}),null);
__d("MercurySyncThreadJoinableModeTransformer",["MercuryActionType","MessengerJoinableModeType"],(function a(b,c,d,e,f,g){"use strict";function h(i){return{action_type:c("MercuryActionType").JOINABLE_MODE,action_id:null,thread_fbid:i.messageMetadata.threadKey.threadFbId,joinable_mode:{mode:c("MessengerJoinableModeType")[i.mode],link:i.link}}}f.exports={transform:h}}),null);
__d("MercurySyncThreadMuteSettingsTransformer",["MercuryActionType"],(function a(b,c,d,e,f,g){"use strict";function h(i){var j={action_type:c("MercuryActionType").CHANGE_MUTE_SETTINGS,thread_fbid:i.threadKey.threadFbId,other_user_fbid:i.threadKey.otherUserFbId,mute_until:parseInt(i.expireTime,10)};return j}f.exports={transform:h}}),null);
__d("MercurySyncThreadNameTransformer",["MercuryActionType","MercuryLogMessageType","MercurySyncNewMessageTransformer"],(function a(b,c,d,e,f,g){"use strict";function h(i,j){var k=c("MercurySyncNewMessageTransformer").transform(i,j);k.action_type=c("MercuryActionType").LOG_MESSAGE;k.log_message_body=j.messageMetadata.adminText;k.log_message_data={name:j.name};k.log_message_type=c("MercuryLogMessageType").THREAD_NAME;return k}f.exports={transform:h}}),null);
__d("MercurySyncDispatcher",["MercuryDelayedDispatcher","MercuryGlobalActionType","MercuryPayloadSource","MercuryServerPayloadPreprocessor","MercurySyncThreadAdminsAddToGroupTransformer","MercurySyncThreadAdminsRemovedFromGroupTransformer","MercurySyncAdminTextMessageTransformer","MercurySyncClientPayloadTransformer","MercurySyncDeliveryReceiptTransformer","MercurySyncMarkFolderSeenTransformer","MercurySyncMarkReadTransformer","MercurySyncMarkUnreadTransformer","MercurySyncMessageDeleteTransformer","MercurySyncNewMessageTransformer","MercurySyncReadReceiptTransformer","MercurySyncPagesManagerEventTransformer","MercurySyncParticipantLeftGroupThreadTransformer","MercurySyncParticipantsAddedToGroupThreadTransformer","MercurySyncRTCEventLogTransformer","MercurySyncThreadDeleteTransformer","MercurySyncMarkFolderChangeTransformer","MercurySyncThreadMuteSettingsTransformer","MercurySyncThreadNameTransformer","MercurySyncThreadActionTransformer","MercurySyncReplaceMessageTransformer","MercurySyncThreadJoinableModeTransformer","MercurySyncThreadApprovalModeTransformer","MercurySyncThreadApprovalQueueTransformer","MercurySyncRtcCallDataTransformer","MercurySyncDeltaTypes","MercurySingletonProvider","MontageActions"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h="FOLDER_MONTAGE";i.getForFBID=function(k){return j.getForFBID(k)};i.get=function(){return j.get()};function i(k){this.$MercurySyncDispatcher1=k;this.$MercurySyncDispatcher2=c("MercuryDelayedDispatcher").getForFBID(this.$MercurySyncDispatcher1);this.$MercurySyncDispatcher3=c("MercuryServerPayloadPreprocessor").getForFBID(this.$MercurySyncDispatcher1)}i.prototype.process=function(k){__p&&__p();var l=void 0,m=void 0;switch(k["class"]){case c("MercurySyncDeltaTypes").NewMessage:l=c("MercurySyncNewMessageTransformer").transform(this.$MercurySyncDispatcher1,k);this.$MercurySyncDispatcher4(l);break;case c("MercurySyncDeltaTypes").ReplaceMessage:l=c("MercurySyncReplaceMessageTransformer").transform(this.$MercurySyncDispatcher1,k);this.$MercurySyncDispatcher4(l);break;case c("MercurySyncDeltaTypes").DeliveryReceipt:l=c("MercurySyncDeliveryReceiptTransformer").transform(k);this.$MercurySyncDispatcher3.handleUpdate(l);break;case c("MercurySyncDeltaTypes").MarkRead:l=c("MercurySyncMarkReadTransformer").transform(k);var n=[],o=[];l.forEach(function(p){if(p.action_type===c("MercuryGlobalActionType").MARK_ALL_READ)n.push(p);else o.push(p)});n.length&&this.$MercurySyncDispatcher5(n);o.length&&this.$MercurySyncDispatcher6(o);break;case c("MercurySyncDeltaTypes").MarkUnread:l=c("MercurySyncMarkUnreadTransformer").transform(k);this.$MercurySyncDispatcher6(l);break;case c("MercurySyncDeltaTypes").ParticipantLeftGroupThread:l=c("MercurySyncParticipantLeftGroupThreadTransformer").transform(this.$MercurySyncDispatcher1,k);this.$MercurySyncDispatcher4(l);break;case c("MercurySyncDeltaTypes").ParticipantsAddedToGroupThread:l=c("MercurySyncParticipantsAddedToGroupThreadTransformer").transform(this.$MercurySyncDispatcher1,k);this.$MercurySyncDispatcher4(l);break;case c("MercurySyncDeltaTypes").RTCEventLog:l=c("MercurySyncRTCEventLogTransformer").transform(this.$MercurySyncDispatcher1,k);this.$MercurySyncDispatcher4(l);break;case c("MercurySyncDeltaTypes").ThreadName:l=c("MercurySyncThreadNameTransformer").transform(this.$MercurySyncDispatcher1,k);this.$MercurySyncDispatcher4(l);break;case c("MercurySyncDeltaTypes").ReadReceipt:l=c("MercurySyncReadReceiptTransformer").transform(k);this.$MercurySyncDispatcher3.handleUpdate(l);break;case c("MercurySyncDeltaTypes").AdminTextMessage:l=c("MercurySyncAdminTextMessageTransformer").transform(this.$MercurySyncDispatcher1,k);this.$MercurySyncDispatcher4(l);break;case c("MercurySyncDeltaTypes").MessageDelete:m=k.threadKey.threadFbId;if(m&&k.folder&&k.folder===h)c("MontageActions").requestUpdate(m);else{l=c("MercurySyncMessageDeleteTransformer").transform(k);this.$MercurySyncDispatcher4(l)}break;case c("MercurySyncDeltaTypes").ThreadAction:l=c("MercurySyncThreadActionTransformer").transform(k);this.$MercurySyncDispatcher4(l);break;case c("MercurySyncDeltaTypes").ThreadDelete:l=c("MercurySyncThreadDeleteTransformer").transform(k);this.$MercurySyncDispatcher6(l);break;case c("MercurySyncDeltaTypes").AdminAddedToGroupThread:l=c("MercurySyncThreadAdminsAddToGroupTransformer").transform(k);this.$MercurySyncDispatcher4(l);break;case c("MercurySyncDeltaTypes").AdminRemovedFromGroupThread:l=c("MercurySyncThreadAdminsRemovedFromGroupTransformer").transform(k);this.$MercurySyncDispatcher4(l);break;case c("MercurySyncDeltaTypes").ThreadMuteSettings:l=c("MercurySyncThreadMuteSettingsTransformer").transform(k);this.$MercurySyncDispatcher6([l]);break;case c("MercurySyncDeltaTypes").PagesManagerEvent:l=c("MercurySyncPagesManagerEventTransformer").transform(k);if(!l)return;this.$MercurySyncDispatcher6([l]);break;case c("MercurySyncDeltaTypes").JoinableMode:l=c("MercurySyncThreadJoinableModeTransformer").transform(k);this.$MercurySyncDispatcher4(l);break;case c("MercurySyncDeltaTypes").ApprovalMode:l=c("MercurySyncThreadApprovalModeTransformer").transform(k);this.$MercurySyncDispatcher4(l);break;case c("MercurySyncDeltaTypes").ApprovalQueue:l=c("MercurySyncThreadApprovalQueueTransformer").transform(k);this.$MercurySyncDispatcher4(l);break;case c("MercurySyncDeltaTypes").ClientPayload:l=c("MercurySyncClientPayloadTransformer").transform(k);if(!l)return;this.$MercurySyncDispatcher4(l);break;case c("MercurySyncDeltaTypes").GenieMessage:l=c("MercurySyncNewMessageTransformer").transform(this.$MercurySyncDispatcher1,k.deltaNewMessage);this.$MercurySyncDispatcher4(l);break;case c("MercurySyncDeltaTypes").MontageMessage:m=k.newMessage.messageMetadata.actorFbId;if(m)c("MontageActions").requestUpdate(m);break;case c("MercurySyncDeltaTypes").RtcCallData:l=c("MercurySyncRtcCallDataTransformer").transform(k);this.$MercurySyncDispatcher4(l);break;case c("MercurySyncDeltaTypes").MarkFolderSeen:l=c("MercurySyncMarkFolderSeenTransformer").transform(k);this.$MercurySyncDispatcher5(l);break;case c("MercurySyncDeltaTypes").ThreadFolder:l=c("MercurySyncMarkFolderChangeTransformer").transform(k);this.$MercurySyncDispatcher6([l]);break;default:break}};i.prototype.$MercurySyncDispatcher4=function(k){var l=k.other_user_fbid||k.thread_fbid;this.$MercurySyncDispatcher2.handleUpdateWaitForThread({actions:[k],payload_source:c("MercuryPayloadSource").CLIENT_CHANNEL_MESSAGE},l)};i.prototype.$MercurySyncDispatcher5=function(k){this.$MercurySyncDispatcher3.handleUpdate({global_actions:k,payload_source:c("MercuryPayloadSource").CLIENT_CHANNEL_MESSAGE})};i.prototype.$MercurySyncDispatcher6=function(k){this.$MercurySyncDispatcher3.handleUpdate({actions:k,payload_source:c("MercuryPayloadSource").CLIENT_CHANNEL_MESSAGE})};var j=new(c("MercurySingletonProvider"))(i);f.exports=i}),null);
__d("MercurySyncDataFetcherImpl",["errorCode","Promise","AsyncResponse","Bootloader","FBIDCheck","MercuryPayloadSource","MercuryThreadlistConstants","MessagingConfig","setTimeoutAcrossTransitions"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i=c("MessagingConfig").syncFetchRequestTimeoutMs,j={limit:c("MercuryThreadlistConstants").WEBMESSENGER_THREAD_COUNT+1,folder:"inbox",tags:["INBOX"],timestamp:null,offset:c("MercuryThreadlistConstants").RECENT_THREAD_OFFSET,filter:null,includeDeliveryReceipts:false,includeSeqID:true},k={};function l(r){return new(c("Promise"))(function(s,t){m(r,s,t,0)})}function m(r,s,t,u){__p&&__p();if(u>c("MessagingConfig").syncFetchRetries){clearTimeout(k[r]);t();return}var v=u===0?0:c("MessagingConfig").syncFetchInitialTimeoutMs*Math.pow(c("MessagingConfig").syncFetchTimeoutMultiplier,u);clearTimeout(k[r]);k[r]=c("setTimeoutAcrossTransitions")(function(){__p&&__p();var w=false,x=function x(y){__p&&__p();var z;if(w)return;if(y.errors&&y.errors.length>0)(function(){var A=y.errors[0].message;if(A)c("Bootloader").loadModules(["MessengerWebGraphQLTypedLogger","MessengerWebGraphQLEvent"],function(B,C){new B().setErrorMessage(A).setEvent(C.DFF_FAILURE).log()},"MercurySyncDataFetcherImpl")})();w=true;m(r,s,t,u+1)};c("Bootloader").loadModules(["MessengerGraphQLThreadlistFetcher.bs"],function(y){return y.fetchAll(r,[j],!c("FBIDCheck").isUser_deprecated(r)).then(function(z){w=true;s(new(c("AsyncResponse"))(null,babelHelpers["extends"]({},z,{payload_source:c("MercuryPayloadSource").SERVER_INVALIDATE_GLOBAL_STATE})));clearTimeout(k[r])},x)},"MercurySyncDataFetcherImpl")},v)}function n(r,s,t){return new(c("Promise"))(function(u,v){o(r,s,t,u,v,0)})}function o(r,s,t,u,v,w){__p&&__p();if(w>c("MessagingConfig").syncFetchRetries){v();return}var x=w===0?0:c("MessagingConfig").syncFetchInitialTimeoutMs*Math.pow(c("MessagingConfig").syncFetchTimeoutMultiplier,w);c("setTimeoutAcrossTransitions")(function(){var y=false,z=function z(A){if(y)return;y=true;o(r,s,t,u,v,w+1)};c("Bootloader").loadModules(["MessengerThreadDFFFetcher.bs"],function(A){return A.fetch(r,{id:s,limit:t},!c("FBIDCheck").isUser_deprecated(r)).then(function(B){y=true;u(new(c("AsyncResponse"))(null,babelHelpers["extends"]({},B,{payload_source:c("MercuryPayloadSource").SERVER_INVALIDATE_THREAD_STATE})))},z)},"MercurySyncDataFetcherImpl")},x)}function p(r,s,t){return new(c("Promise"))(function(u,v){q(r,s,t,u,v,0)})}function q(r,s,t,u,v,w){__p&&__p();if(w>c("MessagingConfig").syncFetchRetries){v();return}var x=w===0?0:c("MessagingConfig").syncFetchInitialTimeoutMs*Math.pow(c("MessagingConfig").syncFetchTimeoutMultiplier,w);c("setTimeoutAcrossTransitions")(function(){var y=false,z=function z(A){if(y)return;y=true;q(r,s,t,u,v,w+1)};c("Bootloader").loadModules(["MessengerMessageDFFFetcher.bs"],function(A){return A.fetch(r,{thread_id:s,message_id:t},!c("FBIDCheck").isUser_deprecated(r)).then(function(B){y=true;u(new(c("AsyncResponse"))(null,babelHelpers["extends"]({},B)))},z)},"MercurySyncDataFetcherImpl")},x)}f.exports={fetchThreadlistFromGraphQL:l,fetchThreadFromGraphQL:n,fetchMessageFromGraphQL:p}}),null);
__d("MercurySyncDataFetcher",["Promise","LogHistory","MessagingConfig","MercurySyncDataFetcherImpl","WebGraphQLConfig","setTimeoutAcrossTransitions"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h=c("LogHistory").getInstance("mercury_sync_data_fetcher");function i(){var n=0;for(var o=0;o<c("MessagingConfig").syncFetchRetries;o++){var p=o===0?0:c("MessagingConfig").syncFetchInitialTimeoutMs*Math.pow(c("MessagingConfig").syncFetchTimeoutMultiplier,o);n+=p+c("MessagingConfig").syncFetchRequestTimeoutMs}return n}var j=i();function k(n){__p&&__p();var o=null;return new(c("Promise"))(function(p,q){var r=function r(s){h.error("fetch_threadlist_graphql_timeout",JSON.stringify({timeout:j}));clearTimeout(o);q(s)};o=c("setTimeoutAcrossTransitions")(r,Math.max(j,c("WebGraphQLConfig").timeout*c("MessagingConfig").syncFetchRetries));c("MercurySyncDataFetcherImpl").fetchThreadlistFromGraphQL(n).done(function(s){clearTimeout(o);p(s)},r)})}function l(n,o,p){return new(c("Promise"))(function(q,r){var s=function s(u){h.error("fetch_thread_graphql_timeout",JSON.stringify({timeout:j}));r(u)},t=c("setTimeoutAcrossTransitions")(s,j);c("MercurySyncDataFetcherImpl").fetchThreadFromGraphQL(n,o,p).done(function(u){clearTimeout(t);q(u)},s)})}function m(n,o,p){return new(c("Promise"))(function(q,r){var s=function s(u){h.error("fetch_message_graphql_timeout",JSON.stringify({timeout:j}));r(u)},t=c("setTimeoutAcrossTransitions")(s,j);c("MercurySyncDataFetcherImpl").fetchMessageFromGraphQL(n,o,p).done(function(u){clearTimeout(t);q(u)},s)})}f.exports={fetchThreadlistFromGraphQL:k,fetchThreadFromGraphQL:l,fetchMessageFromGraphQL:m,getMaxTimeoutMs:i}}),null);
__d("MercurySyncDFFDataFetcher",["Promise","CurrentUser","MercuryMessages","MercuryThreads","MercuryThreadIDMap","MercurySingletonProvider","MercurySyncDataFetcher"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();function h(j){this.$MercurySyncDFFDataFetcher1=j;this.__messages=c("MercuryMessages").getForFBID(this.$MercurySyncDFFDataFetcher1);this.__threads=c("MercuryThreads").getForFBID(this.$MercurySyncDFFDataFetcher1);this.__threadIDMap=c("MercuryThreadIDMap").getForFBID(this.$MercurySyncDFFDataFetcher1)}h.getForFBID=function(j){return i.getForFBID(j)};h.get=function(){return i.get()};h.prototype.fetchInvalidateGlobalStateForGraphQL=function(){if(this.$MercurySyncDFFDataFetcher1&&this.$MercurySyncDFFDataFetcher1!=="0"&&c("CurrentUser").isLoggedIn())return c("MercurySyncDataFetcher").fetchThreadlistFromGraphQL(this.$MercurySyncDFFDataFetcher1);return new(c("Promise"))(function(j,k){return k(true)})};h.prototype.fetchInvalidateThreadState=function(j,k){var l=11,m=3,n=j||k,o=this.__threadIDMap.getClientIDFromServerIDNow(n);if(!o)return c("Promise").resolve({getPayload:function q(){return{}}});var p=m+this.__messages.getCurrentlyLoadedMessages(o).length;if(!n)return c("Promise").resolve({getPayload:function q(){return{}}});return c("MercurySyncDataFetcher").fetchThreadFromGraphQL(this.$MercurySyncDFFDataFetcher1,n,Math.max(p,l))};h.prototype.fetchInvalidateMessage=function(j,k,l){var m=j||k;if(!m)return c("Promise").resolve({getPayload:function n(){return{}}});return c("MercurySyncDataFetcher").fetchMessageFromGraphQL(this.$MercurySyncDFFDataFetcher1,m,l)};var i=new(c("MercurySingletonProvider"))(h);f.exports=h}),null);
__d("MercurySyncForcedFetchHandler",["Promise","MercurySingletonProvider","MercurySyncDFFDataFetcher","MercuryMessages","MercuryThreadIDMap"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();function h(k){return{getPayload:function l(){return{sequence_id:k}}}}i.getForFBID=function(k){return j.getForFBID(k)};i.get=function(){return j.get()};function i(k){this.$MercurySyncForcedFetchHandler1=k;this.$MercurySyncForcedFetchHandler2=c("MercuryMessages").getForFBID(this.$MercurySyncForcedFetchHandler1);this.$MercurySyncForcedFetchHandler3=c("MercuryThreadIDMap").getForFBID(this.$MercurySyncForcedFetchHandler1);this.$MercurySyncForcedFetchHandler4=c("MercurySyncDFFDataFetcher").getForFBID(this.$MercurySyncForcedFetchHandler1)}i.prototype.processMessageDFF=function(k,l,m,n){if(n){var o=l.otherUserFbId!==undefined?l.otherUserFbId.toString():l.threadFbId.toString(),p=this.$MercurySyncForcedFetchHandler3.getClientIDFromServerIDNow(o);if(p===undefined)return c("Promise").resolve(h(k));var q=this.$MercurySyncForcedFetchHandler2.getMessagesFromIDs([m]);if(q.length===0)return c("Promise").resolve(h(k))}return this.$MercurySyncForcedFetchHandler4.fetchInvalidateMessage(l.otherUserFbId,l.threadFbId,m)};i.prototype.processThreadDFF=function(k,l,m){if(m){var n=l.otherUserFbId!==undefined?l.otherUserFbId.toString():l.threadFbId.toString(),o=this.$MercurySyncForcedFetchHandler3.getClientIDFromServerIDNow(n);if(o===undefined)return c("Promise").resolve(h(k))}return this.$MercurySyncForcedFetchHandler4.fetchInvalidateThreadState(l.otherUserFbId,l.threadFbId)};i.prototype.processGlobalDFFForGraphQL=function(){return this.$MercurySyncForcedFetchHandler4.fetchInvalidateGlobalStateForGraphQL()};var j=new(c("MercurySingletonProvider"))(i);f.exports=i}),null);
__d("MercurySyncTopicType",[],(function a(b,c,d,e,f,g){f.exports=Object.freeze({DELTA:"delta",DELTAFLOW:"deltaflow",DELTAFLOWREJECT:"deltaflowreject"})}),null);
__d("MercurySyncDeltaHandler",["invariant","Arbiter","AsyncResponse","ChannelConstants","ChatReliabilityInstrumentation","CurrentUser","FBIDCheck","LogHistory","MercuryConfig","MessagingConfig","MercuryDelayedDispatcher","MercuryPayloadSource","MercurySyncChannelMonitor","MercurySyncConstants","MercurySyncDeltaHolder","MercurySyncDeltaTypes","MercurySyncDispatcher","MercurySyncForcedFetchHandler","MercurySyncHolesTypedLogger","MercuryServerPayloadPreprocessor","MercurySyncTopicType","MercurySingletonProvider","gkx"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i=c("LogHistory").getInstance("mercury_sync_delta_handler"),j=c("MessagingConfig").syncFetchRetries||0;k.getForFBID=function(m){return l.getForFBID(m)};k.get=function(){return l.get()};function k(m){__p&&__p();this.$MercurySyncDeltaHandler1=m;this.$MercurySyncDeltaHandler2=c("MercurySyncDispatcher").getForFBID(this.$MercurySyncDeltaHandler1);this.$MercurySyncDeltaHandler3=c("MercurySyncForcedFetchHandler").getForFBID(this.$MercurySyncDeltaHandler1);this.__payloadPreprocessor=c("MercuryServerPayloadPreprocessor").getForFBID(this.$MercurySyncDeltaHandler1);this.__delayedDispatcher=c("MercuryDelayedDispatcher").getForFBID(this.$MercurySyncDeltaHandler1);this.$MercurySyncDeltaHandler4=c("MercurySyncDeltaHolder").getForFBID(this.$MercurySyncDeltaHandler1);this.$MercurySyncDeltaHandler5=false;this.$MercurySyncDeltaHandler11=c("MercurySyncChannelMonitor").getForFBID(this.$MercurySyncDeltaHandler1);this.$MercurySyncDeltaHandler6=[];this.$MercurySyncDeltaHandler13=0;i.debug("constructor",JSON.stringify({fbid:this.$MercurySyncDeltaHandler1}));c("Arbiter").subscribe("MercurySyncDeltaHandler/initSeqID",function(n,o){__p&&__p();i.debug("initSeqID",JSON.stringify(o));var p=o&&o.seqID,m=o&&o.fbid;if(!m)return;if(m!==this.$MercurySyncDeltaHandler1)return;if(p)this.$MercurySyncDeltaHandler4.updateLastSeqID(p);else this.$MercurySyncDeltaHandler4.updateLastSeqID(0);this.$MercurySyncDeltaHandler15();this.$MercurySyncDeltaHandler8=c("Arbiter").subscribe(c("ChannelConstants").getArbiterType("deltaflow"),function(n,o){if(!this.$MercurySyncDeltaHandler14)this.$MercurySyncDeltaHandler15()}.bind(this))}.bind(this))}k.prototype.$MercurySyncDeltaHandler15=function(){__p&&__p();i.debug("setUpSubscriptionsToRealTimeUpdates",JSON.stringify({fbid:this.$MercurySyncDeltaHandler1}));this.$MercurySyncDeltaHandler7=c("Arbiter").subscribe(c("ChannelConstants").getArbiterType("delta"),function(m,n){__p&&__p();var o=n&&n.obj&&n.obj.queue;if(o)if(o.toString()!==this.$MercurySyncDeltaHandler1)return;var p=n&&n.obj&&n.obj.delta,q=n&&n.obj&&n.obj.iseq;if(!p||!q)return;this.$MercurySyncDeltaHandler16(q,c("MercurySyncTopicType").DELTA);this.$MercurySyncDeltaHandler17(q,p);this.$MercurySyncDeltaHandler4.push(q,p);this.$MercurySyncDeltaHandler18()}.bind(this));this.$MercurySyncDeltaHandler12=c("Arbiter").subscribe(c("ChannelConstants").getArbiterType("deltaflowreject"),function(m,n){var o=n&&n.obj&&n.obj.queue;if(o)if(o.toString()!==this.$MercurySyncDeltaHandler1)return;if(this.$MercurySyncDeltaHandler14)this.$MercurySyncDeltaHandler19()}.bind(this));this.$MercurySyncDeltaHandler9=c("Arbiter").subscribe(c("ChannelConstants").getArbiterType(c("ChannelConstants").FAKE_DFF),function(m,n){var o=n&&n.obj&&n.obj.queue;if(o&&o.toString()!==this.$MercurySyncDeltaHandler1)return;var p=n&&n.obj&&n.obj.delta;if(!p)return;this.$MercurySyncDeltaHandler6.push(p);this.$MercurySyncDeltaHandler18()}.bind(this));this.$MercurySyncDeltaHandler11.setupSubscriptions();this.$MercurySyncDeltaHandler14=true};k.prototype.$MercurySyncDeltaHandler18=function(){__p&&__p();if(this.$MercurySyncDeltaHandler5)return;if(this.$MercurySyncDeltaHandler6.length>0){var m=this.$MercurySyncDeltaHandler6.shift();this.$MercurySyncDeltaHandler20(this.$MercurySyncDeltaHandler4.getLastSeqID(),m);this.$MercurySyncDeltaHandler18()}var n=this.$MercurySyncDeltaHandler4.peek();if(!n)return;var o=n-this.$MercurySyncDeltaHandler4.getLastSeqID();if(o===1){var p=this.$MercurySyncDeltaHandler4.pop();if(!p)return;var q=p.seqID,r=p.delta;this.$MercurySyncDeltaHandler20(q,r);this.$MercurySyncDeltaHandler18()}else if(o>1)this.$MercurySyncDeltaHandler21();else{this.$MercurySyncDeltaHandler4.pop();this.$MercurySyncDeltaHandler18()}};k.prototype.$MercurySyncDeltaHandler20=function(m,n){__p&&__p();this.$MercurySyncDeltaHandler4.updateLastSeqID(m);if(n["class"]===c("MercurySyncDeltaTypes").ForcedFetch){i.debug("DFF",JSON.stringify(n));if(n.threadKey!==undefined&&n.messageId===undefined)this.$MercurySyncDeltaHandler22(m,n);else if(n.threadKey!==undefined&&n.messageId!==undefined)this.$MercurySyncDeltaHandler23(m,n);else{c("ChatReliabilityInstrumentation").logDFF_DELTA_INIT(JSON.stringify(n));this.$MercurySyncDeltaHandler24(m)}}else this.$MercurySyncDeltaHandler2.process(n)};k.prototype.$MercurySyncDeltaHandler21=function(){var m=JSON.stringify({$MercurySyncDeltaHandler25:this.$MercurySyncDeltaHandler4.getLastSeqID(),nextSeqID:this.$MercurySyncDeltaHandler4.peek()});i.warn("hole",m);var n=this.$MercurySyncDeltaHandler4.peek();!!n||h(0);var o=n-1;c("ChatReliabilityInstrumentation").logDFF_HOLE_INIT(m);this.$MercurySyncDeltaHandler24(o)};k.prototype.$MercurySyncDeltaHandler26=function(m,n,o,p){__p&&__p();!this.$MercurySyncDeltaHandler5||h(0);this.$MercurySyncDeltaHandler5=true;i.debug("_scheduleDataFetch:start",JSON.stringify({seqID:m}));n().done(function(q){i.debug("_scheduleDataFetch:success",JSON.stringify({seqID:m}));o(m,q);this.$MercurySyncDeltaHandler5=false;this.$MercurySyncDeltaHandler18()}.bind(this),function(q){i.error("_scheduleDataFetch:failure",JSON.stringify({seqID:m}));p(m,q);this.$MercurySyncDeltaHandler5=false;this.$MercurySyncDeltaHandler18()}.bind(this))};k.prototype.$MercurySyncDeltaHandler24=function(m){__p&&__p();if(!c("CurrentUser").isLoggedInNow())return;this.$MercurySyncDeltaHandler26(undefined,function(){return this.$MercurySyncDeltaHandler3.processGlobalDFFForGraphQL()}.bind(this),function(m,n){var o=n.getPayload();this.__payloadPreprocessor.handleUpdate(o);if(o.sequence_id){i.debug("_initiateGlobalDFF:success",JSON.stringify({seqID:o.sequence_id}));this.$MercurySyncDeltaHandler4.updateLastSeqID(o.sequence_id)}this.$MercurySyncDeltaHandler13=0;c("Arbiter").inform(c("MercurySyncConstants").ARBITER_EVENT_INVALID_STATE_RECOVER)}.bind(this),function(n,o){__p&&__p();i.error("_initiateGlobalDFF:failure","");if(this.$MercurySyncDeltaHandler13>=j&&!c("gkx")("AT64J9YhwkyrHxbLybCQFLyzjkGHk3oI2YIajEOuOFur_lZPJRPR_CognCbUbaH7Kn5DndmAaaKKt6FL7dls2Aba")||o){if(this.$MercurySyncDeltaHandler14)this.$MercurySyncDeltaHandler19();if(c("gkx")("AT6T2zrYpHKRdiC2jWw79jSLuG2Ai8UAXBl4mf7UaSrzuZmkv1aboo5IByEaBzwrmKZ7i_TneQib5Fe9fVTNdQMv"))this.$MercurySyncDeltaHandler4.updateLastSeqID(m)}else{this.$MercurySyncDeltaHandler13++;c("Arbiter").inform(c("MercurySyncConstants").ARBITER_EVENT_INVALID_STATE_RETRY);i.debug("_initiateGlobalDFF:retry","");this.$MercurySyncDeltaHandler5=false;this.$MercurySyncDeltaHandler24(m)}}.bind(this))};k.prototype.$MercurySyncDeltaHandler22=function(m,n){this.$MercurySyncDeltaHandler26(m,function(){return this.$MercurySyncDeltaHandler3.processThreadDFF(m,n.threadKey,n.isLazy)}.bind(this),function(m,o){this.__payloadPreprocessor.handleUpdate(o.getPayload());this.$MercurySyncDeltaHandler4.updateLastSeqID(m)}.bind(this),function(){i.error("_initiateThreadDFF:failure",JSON.stringify(n));var o=babelHelpers["extends"]({},n);delete o.threadKey;this.$MercurySyncDeltaHandler4.updateLastSeqID(m-1);this.$MercurySyncDeltaHandler4.push(m,o)}.bind(this))};k.prototype.$MercurySyncDeltaHandler23=function(m,n){__p&&__p();this.$MercurySyncDeltaHandler26(m,function(){return this.$MercurySyncDeltaHandler3.processMessageDFF(m,n.threadKey,n.messageId,n.isLazy)}.bind(this),function(m,o){var p=o.getPayload(),q=p.other_user_fbid?p.other_user_fbid:p.thread_fbid,r=[babelHelpers["extends"]({},p)],s=c("MercuryPayloadSource").CLIENT_CHANNEL_MESSAGE;this.__delayedDispatcher.handleUpdateWaitForThread({actions:r,payload_source:s},q);this.$MercurySyncDeltaHandler4.updateLastSeqID(m)}.bind(this),function(){i.error("_initiateMessageDFF:failure",JSON.stringify(n));var o=babelHelpers["extends"]({},n);delete o.messageId;this.$MercurySyncDeltaHandler4.updateLastSeqID(m-1);this.$MercurySyncDeltaHandler4.push(m,o)}.bind(this))};k.prototype.$MercurySyncDeltaHandler16=function(m,n){var o=m-this.$MercurySyncDeltaHandler4.getLastSeqID();if(o!==1&&o!==0){if(!c("MercuryConfig").WWWSyncHolesLogging)return;new(c("MercurySyncHolesTypedLogger"))().setSeqID(m).setDifference(o).setTopicType(n).log()}};k.prototype.$MercurySyncDeltaHandler17=function(m,n){switch(n["class"]){case c("MercurySyncDeltaTypes").NewMessage:i.debug("message_delta",JSON.stringify({seqID:m,threadKey:n.messageMetadata.threadKey,messageId:n.messageMetadata.messageId}));break;case c("MercurySyncDeltaTypes").ReadReceipt:i.debug("read_receipt_delta",JSON.stringify({seqID:m,threadKey:n.threadKey,actionTimestampMs:n.actionTimestampMs,watermarkTimestampMs:n.watermarkTimestampMs}));break;case c("MercurySyncDeltaTypes").DeliveryReceipt:i.debug("delivery_receipt_delta",JSON.stringify({seqID:m,deliveredWatermarkTimestampMs:n.deliveredWatermarkTimestampMs,messageIds:n.messageIds}));break}};k.prototype.$MercurySyncDeltaHandler19=function(){this.$MercurySyncDeltaHandler14=false;c("Arbiter").unsubscribe(this.$MercurySyncDeltaHandler7);c("Arbiter").unsubscribe(this.$MercurySyncDeltaHandler9);c("Arbiter").unsubscribe(this.$MercurySyncDeltaHandler12);this.$MercurySyncDeltaHandler11.killSubscriptions();c("Arbiter").inform(c("MercurySyncConstants").ARBITER_EVENT_INVALID_STATE)};var l=new(c("MercurySingletonProvider"))(k);f.exports=k}),null);
__d("MercurySyncEnvironment",["Arbiter","ChannelInitialData","CurrentUser","MercurySyncDeltaHandler"],(function a(b,c,d,e,f,g){"use strict";function h(){if(!c("ChannelInitialData").channelConfig)return;c("MercurySyncDeltaHandler").get();c("Arbiter").inform("MercurySyncDeltaHandler/initSeqID",{fbid:c("CurrentUser").getAccountID(),seqID:c("ChannelInitialData").channelConfig.sequenceId})}f.exports={setUp:h}}),null);
__d("MercuryUnseenState",["MercuryFolders","KeyedCallbackManager","LogHistory","MercuryActionType","MercuryDispatcher","MercuryGlobalActionType","MercurySingletonProvider","MercuryThreadIDMap","MercuryThreadInfo","MercuryThreadlistConstants","MessagingTag","MercuryServerRequests","MercuryThreadInformer","MercuryThreads","createObjectFrom","isEmpty"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h=c("MercuryThreadlistConstants").MAX_UNSEEN_COUNT,i="unseen_thread_hash",j="unseen_thread_list",k=c("LogHistory").getInstance("mercury_unseen_state");l.getForFBID=function(n){return m.getForFBID(n)};l.get=function(){return m.get()};function l(n){__p&&__p();this.$MercuryUnseenState2=n;this.$MercuryUnseenState7=c("MercuryServerRequests").getForFBID(this.$MercuryUnseenState2);this.$MercuryUnseenState8=c("MercuryThreadIDMap").getForFBID(this.$MercuryUnseenState2);this.$MercuryUnseenState10=c("MercuryThreads").getForFBID(this.$MercuryUnseenState2);this.$MercuryUnseenState9=c("MercuryThreadInformer").getForFBID(this.$MercuryUnseenState2);this.$MercuryUnseenState1=c("MercuryDispatcher").getForFBID(this.$MercuryUnseenState2);this.$MercuryUnseenState3=0;this.$MercuryUnseenState4=0;this.$MercuryUnseenState5=false;this.$MercuryUnseenState6=false;this.$MercuryUnseenState11=new(c("KeyedCallbackManager"))();this.$MercuryUnseenState1.subscribe("update-unseen",function(o,p){this.$MercuryUnseenState12(p)}.bind(this));this.$MercuryUnseenState1.subscribe("update-thread-ids",function(o,p){this.$MercuryUnseenState13(p)}.bind(this))}l.prototype.getUnseenCount=function(){if(this.exceedsMaxCount()){k.error("unguarded_unseen_count_fetch","{}");return 0}return this.$MercuryUnseenState14()};l.prototype.exceedsMaxCount=function(){return this.$MercuryUnseenState5||this.$MercuryUnseenState14()>h};l.prototype.markAsSeen=function(){var n=this.$MercuryUnseenState14();if(n===null)this.$MercuryUnseenState6=true;else if(n>0||this.$MercuryUnseenState5){this.$MercuryUnseenState7.markSeen();this.$MercuryUnseenState15(this.$MercuryUnseenState7.getLastActionTimestamp(),[])}};l.prototype.$MercuryUnseenState16=function(n,o){var p;this.$MercuryUnseenState17((p={},p[n]=0,p),o)};l.prototype.$MercuryUnseenState18=function(n){this.$MercuryUnseenState11.setResource(i,n);this.$MercuryUnseenState11.setResource(j,Object.keys(n))};l.prototype.$MercuryUnseenState19=function(n){var o=this.$MercuryUnseenState11.executeOrEnqueue(i,n),p=this.$MercuryUnseenState11.getUnavailableResources(o);if(p.length)this.$MercuryUnseenState7.fetchUnseenThreadIDs()};l.prototype.$MercuryUnseenState20=function(){return this.$MercuryUnseenState11.getResource(i)};l.prototype.$MercuryUnseenState14=function(){var n=this.$MercuryUnseenState11.getResource(j);if(n)return n.length;else return this.$MercuryUnseenState3};l.prototype.$MercuryUnseenState12=function(n){__p&&__p();var o,p=this,q=this.$MercuryUnseenState21(n);if(n.unseen_thread_fbids)n.unseen_thread_fbids.forEach(function(r){if(r.folder!=c("MessagingTag").INBOX)return;var s=(r.thread_fbids||[]).concat(r.other_user_fbids||[]),t=this.$MercuryUnseenState22(s),u=q.seen_timestamp?q.seen_timestamp:this.$MercuryUnseenState4;this.$MercuryUnseenState15(u,t);if(q.unseen_count>h)this.$MercuryUnseenState5=true}.bind(this));else if(q.seen_timestamp!==undefined){this.$MercuryUnseenState4=q.seen_timestamp;if(q.unseen_count>h){this.$MercuryUnseenState5=true;this.$MercuryUnseenState18({})}else{this.$MercuryUnseenState3=q.unseen_count;if(this.$MercuryUnseenState3===0)this.$MercuryUnseenState18({})}}else{var o=function(){__p&&__p();var r;(n.global_actions||[]).forEach(function(x){if(x.action_type===c("MercuryGlobalActionType").MARK_ALL_SEEN)this.$MercuryUnseenState15(x.timestamp,[])}.bind(p));if(p.$MercuryUnseenState5)return{v:void 0};var s=n.actions;if(!s||!s.length)return{v:void 0};var t={},u={},v=function v(w){__p&&__p();var x=s[w],y=x.action_type,z=x.other_user_fbid?x.other_user_fbid:x.thread_fbid,A=x.thread_id?x.thread_id:z;if(y===c("MercuryActionType").MARK_THREAD_SEEN){p.$MercuryUnseenState16(A,x.persistent);return"continue"}if(!p.$MercuryUnseenState23(x))return"continue";if(y===c("MercuryActionType").USER_GENERATED_MESSAGE||y===c("MercuryActionType").LOG_MESSAGE){var B=t[A]?x.timestamp>t[A]:false,C=B||!t[A];if(x.is_unread&&C)p.$MercuryUnseenState10.getThreadMeta(A,function(D){if(!c("MercuryThreadInfo").isMuted(D)&&!(D&&D.last_read_timestamp>=x.timestamp))t[A]=x.timestamp})}else if(y===c("MercuryActionType").CHANGE_READ_STATUS&&x.mark_as_read)u[A]=x.timestamp};for(var w=0;w<s.length;w++){var r=v(w);if(r==="continue")continue}p.$MercuryUnseenState24(t);p.$MercuryUnseenState17(u)}();if(typeof o==="object")return o.v}if(this.$MercuryUnseenState6){this.$MercuryUnseenState6=false;this.markAsSeen()}};l.prototype.$MercuryUnseenState15=function(n,o){__p&&__p();var p=this.$MercuryUnseenState20();if(p===undefined||n>this.$MercuryUnseenState4||this.$MercuryUnseenState5){this.$MercuryUnseenState4=n;o=o||[];if(o.length<=h)this.$MercuryUnseenState5=false;var q={},r=this.$MercuryUnseenState20();for(var s in r)if(r[s]!==true){var t=r[s];if(this.$MercuryUnseenState25(t))q[s]=t}var u=Object.assign(c("createObjectFrom")(o,true),q);this.$MercuryUnseenState18(u);this.$MercuryUnseenState9.updatedUnseenState()}};l.prototype.$MercuryUnseenState24=function(n){__p&&__p();if(this.$MercuryUnseenState5)return;var o={},p=false;for(var q in n){var r=n[q];if(this.$MercuryUnseenState25(r)){o[q]=r;p=true}}if(!p)return;this.$MercuryUnseenState19(function(s){for(var t in o){var u=o[t];if(!s[t]&&this.$MercuryUnseenState25(u))s[t]=o[t]}this.$MercuryUnseenState18(s);this.$MercuryUnseenState9.updatedUnseenState()}.bind(this))};l.prototype.$MercuryUnseenState17=function(n,o){__p&&__p();if(!c("isEmpty")(n))this.$MercuryUnseenState19(function(p){__p&&__p();var q=false;for(var r in n){var s=n[r],t=s>=p[r];if(p[r]&&(!s||t)){delete p[r];q=true}}if(q){this.$MercuryUnseenState18(p);this.$MercuryUnseenState9.updatedUnseenState();if(o&&this.$MercuryUnseenState14()===0)this.$MercuryUnseenState7.markSeen()}}.bind(this))};l.prototype.$MercuryUnseenState25=function(n){return n>this.$MercuryUnseenState4};l.prototype.$MercuryUnseenState22=function(n){return n.map(this.$MercuryUnseenState8.convertThreadIDIfAvailable,this.$MercuryUnseenState8)};l.prototype.$MercuryUnseenState13=function(n){__p&&__p();var o=this.$MercuryUnseenState20();if(!o)return;for(var p in n){var q=n[p];if(o[p]){o[q]=o[p];delete o[p]}}this.$MercuryUnseenState18(o)};l.prototype.$MercuryUnseenState23=function(n){var o=n.thread_id?this.$MercuryUnseenState10.getThreadMetaNow(n.thread_id):null,p=o?c("MercuryFolders").getFromMeta(o):n.folder;return p===c("MessagingTag").INBOX||p===undefined};l.prototype.$MercuryUnseenState21=function(n){var o=n.message_counts||[];for(var p=0;p<o.length;p++)if(o[p].folder===c("MessagingTag").INBOX)return o[p];return{}};var m=new(c("MercurySingletonProvider"))(l);f.exports=l}),null);
__d("P2PSendMoneyDialogStore",["P2PActionConstants","EventEmitter","Map","P2PDispatcher"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h,i,j=36,k=void 0,l=void 0;h=babelHelpers.inherits(m,c("EventEmitter"));i=h&&h.prototype;function m(){i.constructor.call(this);l=new(c("Map"))();k=c("P2PDispatcher").register(this.onEventDispatched.bind(this))}m.prototype.onEventDispatched=function(n){var o=n.data,p=n.type;switch(p){case c("P2PActionConstants").CHAT_SEND_VIEW_OPENED:this.handleChatSendViewOpened(o);this.emit("change");break;case c("P2PActionConstants").CHAT_SEND_VIEW_CLOSED:this.handleChatSendViewClosed(o);this.emit("change");break}};m.prototype.getStateByThreadID=function(n){return l.get(n)};m.prototype.handleChatSendViewOpened=function(n){l.set(n.threadID,{amount:n.amount,groupSendRecipientUserIDs:n.groupSendRecipientUserIDs,groupSendReceiptDetails:n.groupSendReceiptDetails,groupThreadFBID:n.groupThreadFBID,onCompletion:n.onCompletion,openRequestTab:n.openRequestTab,memoText:n.memoText&&n.memoText.substr(0,j),platformData:n.platformData,referrer:n.referrer,paymentRequestID:n.paymentRequestID,sendMoneyDialogShown:true,sendMoneyNUXDismissed:n.sendMoneyNUXDismissed,useModal:n.useModal})};m.prototype.handleChatSendViewClosed=function(n){l.set(n.threadID,{amount:"",groupSendRecipientUserIDs:[],groupSendReceiptDetails:null,groupThreadFBID:"",onCompletion:null,openRequestTab:false,memoText:null,platformData:null,referrer:null,paymentRequestID:null,sendMoneyDialogShown:false,sendMoneyNUXDismissed:false,useModal:false})};m.prototype.isAnyChatSendViewOpen=function(){__p&&__p();for(var n=l.values(),o=Array.isArray(n),p=0,n=o?n:n[typeof Symbol==="function"?Symbol.iterator:"@@iterator"]();;){var q;if(o){if(p>=n.length)break;q=n[p++]}else{p=n.next();if(p.done)break;q=p.value}var r=q;if(r.sendMoneyDialogShown)return true}return false};f.exports=new m()}),null);
__d("FantaTabsAppBase",["Bootloader","ChatAppActions","ChatAppStore","ChatPerfInstrumentation","CSS","JSLogger","Map","Run","gkx"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();h.prototype.init=function(i,j,k){__p&&__p();if(this.isInitialized()){c("JSLogger").create("chat_app").error("repeated_init");return}this.$FantaTabsAppBase1=i;this.tabsElem=j;var l=c("ChatAppStore").addListener(function(){var n=c("ChatAppStore").getPreviousState(),o=c("ChatAppStore").getState();if(n.initialDisplayDone===false&&o.initialDisplayDone===true){c("ChatPerfInstrumentation").logDisplayDone();l.remove()}});c("ChatPerfInstrumentation").init();this.$FantaTabsAppBase2(k);this.initializeFantaData(k.interstitial_data);this.initializeFantaUI();var m=c("gkx")("AT7FBGrADYPEsp9qvqYtd1th6aWFd9XSwNBV43tGhyFXtrKVsfTadKZvm8LGa2YhYm4hBBmtxq-SMAAiJ9-55wql");if(!m)this.$FantaTabsAppBase3();c("ChatAppActions").tti();c("ChatPerfInstrumentation").logTTI();if(m)c("Run").onAfterLoad(function(){this.$FantaTabsAppBase4()}.bind(this))};h.prototype.isInitialized=function(){return!!c("ChatAppStore").getState().isInitialized};h.prototype.isHidden=function(){var i=c("ChatAppStore").getState();return!!(!i.isInitialized||i.isHidden)};h.prototype.hide=function(){if(this.isHidden())return;c("CSS").hide(this.$FantaTabsAppBase1);c("ChatAppActions").hide()};h.prototype.unhide=function(){__p&&__p();var i=c("ChatAppStore").getState();if(i.isInitialized){if(i.isHidden){c("CSS").show(this.$FantaTabsAppBase1);e(["Dock"],function(j){j.resizeAllFlyouts()});c("ChatAppActions").unhide()}}else if(!i.isLoaded){e(["UIPagelet"],function(j){j.loadFromEndpoint("ChatTabsPagelet","ChatTabsPagelet");j.loadFromEndpoint("BuddylistPagelet","BuddylistPagelet")});c("ChatAppActions").load()}};h.prototype.initializeFantaData=function(i){};h.prototype.initializeFantaUI=function(){};h.prototype.$FantaTabsAppBase2=function(i){__p&&__p();e(["MercuryBlockedParticipants.bs","MercuryIgnoredParticipants.bs","MercuryDelayedRoger","MercuryDeliveryState","MercuryParticipants","MercuryServerPayloadPreprocessor","MercuryThreads","MercuryUnreadState","MercuryUnseenState","MercurySyncEnvironment","P2PSendMoneyDialogStore"],function(j,k,l,m,n,o,p,q,r,s,t){__p&&__p();j.get();k.get();l.get();m.get();n;p.get();r.get();q.get();s.setUp();c("ChatPerfInstrumentation").logInitStores();if(i.graphql_payload)c("Bootloader").loadModules(["ChatInitialDataTransformer.bs"],function(u){var v=i.graphql_payload,w=u.transform(v);w.message_blocked_ids=v.message_blocked_ids;w.message_ignored_ids=v.message_ignored_ids;w.payload_source=v.payload_source;o.get().handleUpdate(w)},"FantaTabsAppBase");else o.get().handleUpdate(i.initial_data)})};h.prototype.$FantaTabsAppBase3=function(){e(["HotLikeSound","ChatOptions"],function(i,j){i.setCheckSoundEnabledFunc(function(){return j.getSetting("sound")});c("ChatPerfInstrumentation").logInitSound()})};h.prototype.$FantaTabsAppBase4=function(){e(["HotLikeSound","ChatOptions"],function(i,j){i.setCheckSoundEnabledFunc(function(){return j.getSetting("sound")});c("ChatPerfInstrumentation").logInitSound()})};function h(){}f.exports=h}),null);
__d("FantaTabsEagerBootloader",["Bootloader","ChatPerfConfig","emptyFunction","ifRequired"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h=function j(k){c("ifRequired")("FantaAppStore",function(l){return l.addReducers(k)});h=c("emptyFunction")},i={bootload:function j(){if(!c("ChatPerfConfig").eager_bootload)return;c("ifRequired")("FantaTabsSlimApp",function(k){k.silentPumpUp()});c("Bootloader").loadModules(["FantaReducersGetMessages","FantaTabsReactApp","MessengerGraphQLThreadFetcher.bs"],function(k){h(k)},"FantaTabsEagerBootloader")}};f.exports=i}),null);
__d("MNCommerceDialogContainer.react",["MNCommerceDialogStateStore","PureStoreBasedStateMixin","React"],(function a(b,c,d,e,f,g){"use strict";var h=c("React").createClass({displayName:"MNCommerceDialogContainer",mixins:[c("PureStoreBasedStateMixin")(c("MNCommerceDialogStateStore"))],statics:{calculateState:function i(){var j=c("MNCommerceDialogStateStore").getDialogContainer();return{dialogContainer:j}}},render:function i(){var j=this.state.dialogContainer;if(!j)return null;return c("React").createElement(j,null)}});f.exports=h}),null);
__d("MNCommerceDialogContainerMount",["MNCommerceDialogContainer.react","React","ReactDOM"],(function a(b,c,d,e,f,g){"use strict";var h={mount:function i(j){c("ReactDOM").render(c("React").createElement(c("MNCommerceDialogContainer.react"),null),j)}};f.exports=h}),null);
__d("FBRTCIceStatsParser",[],(function a(b,c,d,e,f,g){__p&&__p();var h=null;i.getInstance=function(){"use strict";if(!h)h=new i();return h};function i(){"use strict"}i.prototype.extractIceInfo=function(j){"use strict";var k=[],l=j.split("\r\n");for(var m=0;m<l.length;m++){var n=l[m];if(this.$FBRTCIceStatsParser1(n))k.push({gen:this.$FBRTCIceStatsParser2(n),type:this.$FBRTCIceStatsParser3(n)})}return k};i.prototype.$FBRTCIceStatsParser1=function(j){"use strict";return j.indexOf("candidate:")>-1};i.prototype.$FBRTCIceStatsParser2=function(j){"use strict";var k=0,l=j.match(/generation (\d+)/);if(l)k=parseInt(l[1],10);return k};i.prototype.$FBRTCIceStatsParser3=function(j){"use strict";var k=j.match(/typ (host|relay|srflx|prflx)/);if(k)return k[1];else return"unknown"};f.exports=i}),null);
__d("FBRTCCallSummary",["FBRTCConstants","FBRTCIceStatsParser","FBRTCLogger","FBRTCUtils","SiteData","UserAgentData","performanceNow"],(function a(b,c,d,e,f,g){__p&&__p();var h=5*60*1e3,i={CALL_STARTED:"started",POPUP_OPENED:"opened",SENT_OFFER:"s_o",RECV_OFFER:"r_o",SENT_OFFER_ACK:"s_oack",RECV_OFFER_ACK:"r_oack",SENT_RETRIED_OFFER:"s_o2",RECV_RETRIED_OFFER:"r_o2",SENT_RETRIED_OFFER_ACK:"s_oack2",RECV_RETRIED_OFFER_ACK:"r_oack2",SENT_PRANSWER:"s_pr",RECV_PRANSWER:"r_pr",NETWORK_READY:"network_ready",SENT_ANSWER:"s_a",RECV_ANSWER:"r_a",SENT_ANSWER_ACK:"s_aack",RECV_ANSWER_ACK:"r_aack",SENT_RETRIED_ANSWER:"s_a2",RECV_RETRIED_ANSWER:"r_a2",SENT_RETRIED_ANSWER_ACK:"s_aack2",RECV_RETRIED_ANSWER_ACK:"r_aack2",SENT_OK:"s_ok",RECV_OK:"r_ok",CALL_CONNECTED:"connected",CALL_ENDED:"ended"},j={ESCALATION_IS_AVAILABLE:"esc_available",USER_INITIATED_REQUEST:"out_started",RECEIVED_INCOMING_REQUEST:"inc_started",REJECTED_INVALID_P2P_STATE:"rej_invalid_state",CONNECTING_TO_MULTIWAY:"u_connecting_mw",CONNECTED_TO_MULTIWAY:"u_connected_mw",PEER_CONNECTING_TO_MULTIWAY:"p_connecting_mw",PEER_CONNECTED_TO_MULTIWAY:"p_connected_mw",READY_TO_ESCALATE:"ready_esc",PEER_FAILED_TO_CONNECT_TO_MULTIWAY:"p_fail_conn",MULTIWAY_CALL_ENDED:"mw_call_ended",TIMED_OUT:"timed_out",PEER_ABORTED:"p_aborted",INTERNAL_ERROR:"internal_err"};function k(l){"use strict";__p&&__p();this.peerID=String(l.peerID);this.callID=String(l.callID);this.$FBRTCCallSummary1=l.isCaller;this.$FBRTCCallSummary2=c("FBRTCUtils").getLocalUploadLogLevel();this.$FBRTCCallSummary11=new Date().valueOf();this.$FBRTCCallSummary3=null;this.$FBRTCCallSummary4={};this.$FBRTCCallSummary6={};this.$FBRTCCallSummary34=null;this.$FBRTCCallSummary35=null;this.$FBRTCCallSummary36=null;this.$FBRTCCallSummary13=0;this.$FBRTCCallSummary14=0;this.$FBRTCCallSummary33=false;this.$FBRTCCallSummary21={};this.$FBRTCCallSummary22={};this.$FBRTCCallSummary7={};this.$FBRTCCallSummary8={};this.$FBRTCCallSummary9={};this.$FBRTCCallSummary10={};this.$FBRTCCallSummary23=null;this.$FBRTCCallSummary16=c("performanceNow")();this.$FBRTCCallSummary12=0;this.$FBRTCCallSummary5={};this.$FBRTCCallSummary15=this.$FBRTCCallSummary16;this.$FBRTCCallSummary17=0;this.$FBRTCCallSummary18={};this.addExtraInfo(c("FBRTCLogger").Key.DEVICE_INFO,this.$FBRTCCallSummary37());this.$FBRTCCallSummary38();this.$FBRTCCallSummary20=c("FBRTCIceStatsParser").getInstance();this.$FBRTCCallSummary19=c("FBRTCLogger").getInstance()}k.prototype.toJsonString=function(){"use strict";this.$FBRTCCallSummary14=new Date().valueOf();return JSON.stringify({version:k.CURRENT_SUMMARY_VERSION,peerID:this.peerID,callID:this.callID,isCaller:this.$FBRTCCallSummary1,uploadLogLevel:this.$FBRTCCallSummary2,clientVersion:this.$FBRTCCallSummary23,callType:this.$FBRTCCallSummary28,isUsingMultiway:this.$FBRTCCallSummary24,conferenceName:this.$FBRTCCallSummary26,activeConn:this.$FBRTCCallSummary25,escP2PCallID:this.$FBRTCCallSummary27,escConfName:this.$FBRTCCallSummary30,serverInfoData:this.$FBRTCCallSummary29,localVideoDuration:this.$FBRTCCallSummary31,remoteVideoDuration:this.$FBRTCCallSummary32,startTime:this.$FBRTCCallSummary11,trigger:this.$FBRTCCallSummary3,signalingTime:this.$FBRTCCallSummary4,escStateTimes:this.$FBRTCCallSummary6,endCallReason:this.$FBRTCCallSummary34,endCallSubreason:this.$FBRTCCallSummary35,isRemoteEnded:this.$FBRTCCallSummary36,lastUpdatedTime:this.$FBRTCCallSummary13,lastSerializedTime:this.$FBRTCCallSummary14,unsetOnRetrieve:this.$FBRTCCallSummary33,openCount:this.$FBRTCCallSummary17,extraInfo:this.$FBRTCCallSummary18,pcStats:this.$FBRTCCallSummary21,captureStats:this.$FBRTCCallSummary22,gen0IceSentCount:this.$FBRTCCallSummary7,gen0IceReceivedCount:this.$FBRTCCallSummary8,iceSentCount:this.$FBRTCCallSummary9,iceReceivedCount:this.$FBRTCCallSummary10,newSignalingTime:this.$FBRTCCallSummary5,accumulatedCallTime:this.$FBRTCCallSummary39()})};k.fromJsonString=function(l){"use strict";__p&&__p();var m=void 0;try{m=JSON.parse(l)}catch(n){return null}if(m.version!==k.CURRENT_SUMMARY_VERSION)return null;if(!Object.prototype.hasOwnProperty.call(m,"peerID")||!Object.prototype.hasOwnProperty.call(m,"callID")||!Object.prototype.hasOwnProperty.call(m,"isCaller")||!Object.prototype.hasOwnProperty.call(m,"startTime")||!Object.prototype.hasOwnProperty.call(m,"trigger")||!Object.prototype.hasOwnProperty.call(m,"signalingTime")||!Object.prototype.hasOwnProperty.call(m,"endCallReason")||!Object.prototype.hasOwnProperty.call(m,"isRemoteEnded")||!Object.prototype.hasOwnProperty.call(m,"lastUpdatedTime")||!Object.prototype.hasOwnProperty.call(m,"lastSerializedTime"))return null;var o=new k({peerID:m.peerID,callID:m.callID,isCaller:m.isCaller});o.$FBRTCCallSummary2=m.uploadLogLevel;o.$FBRTCCallSummary23=m.clientVersion;o.$FBRTCCallSummary11=m.startTime;o.$FBRTCCallSummary3=m.trigger;o.$FBRTCCallSummary4=m.signalingTime;o.$FBRTCCallSummary34=m.endCallReason;o.$FBRTCCallSummary35=m.endCallSubreason;o.$FBRTCCallSummary36=m.isRemoteEnded;o.$FBRTCCallSummary13=m.lastUpdatedTime;o.$FBRTCCallSummary14=m.lastSerializedTime;if(m.callType)o.$FBRTCCallSummary28=m.callType;if(m.isUsingMultiway!=null)o.$FBRTCCallSummary24=m.isUsingMultiway;if(m.conferenceName)o.$FBRTCCallSummary26=m.conferenceName;if(m.escP2PCallID)o.$FBRTCCallSummary27=m.escP2PCallID;if(m.activeConn)o.$FBRTCCallSummary25=m.activeConn;if(m.escConfName)o.$FBRTCCallSummary30=m.escConfName;if(m.serverInfoData)o.$FBRTCCallSummary29=m.serverInfoData;if(m.localVideoDuration)o.$FBRTCCallSummary31=m.localVideoDuration;if(m.remoteVideoDuration)o.$FBRTCCallSummary32=m.remoteVideoDuration;if(m.unsetOnRetrieve)o.$FBRTCCallSummary33=m.unsetOnRetrieve;if(m.openCount)o.$FBRTCCallSummary17=m.openCount;if(m.extraInfo)o.$FBRTCCallSummary18=m.extraInfo;if(m.pcStats)o.$FBRTCCallSummary21=m.pcStats;if(m.captureStats)o.$FBRTCCallSummary22=m.captureStats;if(m.gen0IceSentCount)o.$FBRTCCallSummary7=m.gen0IceSentCount;if(m.gen0IceReceivedCount)o.$FBRTCCallSummary8=m.gen0IceReceivedCount;if(m.iceSentCount)o.$FBRTCCallSummary9=m.iceSentCount;if(m.iceReceivedCount)o.$FBRTCCallSummary10=m.iceReceivedCount;if(m.newSignalingTime)o.$FBRTCCallSummary5=m.newSignalingTime;if(m.accumulatedCallTime)o.$FBRTCCallSummary12=m.accumulatedCallTime;if(m.escStateTimes)o.$FBRTCCallSummary6=m.escStateTimes;return o};k.restoreOrInitialize=function(l,m,n,o,p,q){"use strict";__p&&__p();m=String(m);n=String(n);var r=l.retrieveCallSummary(m,n);if(!r){r=new k({peerID:m,callID:n,isCaller:o});if(p){r.onFullMessageReceived({msg:p});r.onOfferAckSent(p)}else r.onCallStarted(q||c("FBRTCLogger").Trigger.UNKNOWN);c("FBRTCLogger").getInstance().logError(m,n,"Missing call summary from storage")}else if(r.$FBRTCCallSummary33){r.$FBRTCCallSummary34=null;r.$FBRTCCallSummary35=null;r.$FBRTCCallSummary36=null;delete r.$FBRTCCallSummary4[i.CALL_ENDED];delete r.$FBRTCCallSummary5[i.CALL_ENDED];r.$FBRTCCallSummary33=null}return r};k.logSavedSummaries=function(l){"use strict";__p&&__p();var m=l.getLoggableSummaries(),n=m.length;if(n<=0)return;var o=c("FBRTCLogger").getInstance(),p=[];for(var q=0;q<n;q++){var r=m[q];o.logEndCallSummary(r);p.push({peerID:r.peerID,callID:r.callID})}l.removeCallSummaries(p);o.logToConsole("Logged pending summaries: "+n)};k.prototype.save=function(l){"use strict";var m=c("performanceNow")(),n=m-this.$FBRTCCallSummary15;if(n>h){this.$FBRTCCallSummary19.logInfo(this.peerID,this.callID,"Summary too old: "+n);return}l.storeCallSummary(this.peerID,this.callID,this);this.$FBRTCCallSummary15=m};k.prototype.getLastUpdatedTime=function(){"use strict";return this.$FBRTCCallSummary13};k.prototype.setLastUpdatedTime=function(l){"use strict";this.$FBRTCCallSummary13=l};k.prototype.getExtraInfo=function(){"use strict";return this.$FBRTCCallSummary18};k.prototype.getCallTrigger=function(){"use strict";return this.$FBRTCCallSummary3};k.prototype.addExtraInfo=function(l,m){"use strict";this.$FBRTCCallSummary18[l]=m;this.$FBRTCCallSummary38()};k.prototype.isCaller=function(){"use strict";return this.$FBRTCCallSummary1};k.prototype.isNetworkReady=function(){"use strict";if(this.$FBRTCCallSummary4[i.NETWORK_READY])return true;else return false};k.prototype.isAnswerReceived=function(){"use strict";if(this.$FBRTCCallSummary4[i.RECV_ANSWER])return true;else return false};k.prototype.onCallStarted=function(l){"use strict";this.$FBRTCCallSummary3=l;this.$FBRTCCallSummary40(i.CALL_STARTED);this.$FBRTCCallSummary38()};k.prototype.onPopupOpened=function(){"use strict";this.$FBRTCCallSummary40(i.POPUP_OPENED);this.$FBRTCCallSummary17++;this.$FBRTCCallSummary38()};k.prototype.setPcStats=function(l){"use strict";this.$FBRTCCallSummary21=l;this.$FBRTCCallSummary38()};k.prototype.setVideoCaptureStats=function(l,m){"use strict";this.$FBRTCCallSummary22={w:l,h:m};this.$FBRTCCallSummary38()};k.prototype.setVideoCaptureConstraints=function(l){"use strict";this.$FBRTCCallSummary22=l;this.$FBRTCCallSummary38()};k.prototype.setUploadLogLevel=function(l){"use strict";this.$FBRTCCallSummary2=l;this.$FBRTCCallSummary38()};k.prototype.getCallType=function(){"use strict";return this.$FBRTCCallSummary28};k.prototype.setCallType=function(l){"use strict";this.$FBRTCCallSummary28=l;this.addExtraInfo("call_type",l);this.$FBRTCCallSummary38()};k.prototype.setVideoDurations=function(l,m){"use strict";this.$FBRTCCallSummary31=l;this.$FBRTCCallSummary32=m;this.$FBRTCCallSummary38()};k.prototype.setScreenDuration=function(l){"use strict";this.addExtraInfo(c("FBRTCLogger").Key.SCREEN_DURATION,l)};k.prototype.setIsUsingMultiway=function(l){"use strict";this.$FBRTCCallSummary24=l;this.$FBRTCCallSummary38()};k.prototype.setConferenceName=function(l){"use strict";this.$FBRTCCallSummary26=l;this.$FBRTCCallSummary38()};k.prototype.setServerInfoData=function(l){"use strict";this.$FBRTCCallSummary29=l;this.$FBRTCCallSummary38()};k.prototype.setActiveConnection=function(l){"use strict";this.$FBRTCCallSummary25=l;this.$FBRTCCallSummary38()};k.prototype.setEscalationP2PCallID=function(l){"use strict";this.$FBRTCCallSummary27=l;this.$FBRTCCallSummary38()};k.prototype.setEscalationConferenceName=function(l){"use strict";this.$FBRTCCallSummary30=l;this.$FBRTCCallSummary38()};k.prototype.onOfferAckSent=function(l){"use strict";this.onMessageSent({type:c("FBRTCConstants").PayloadType.OFFER_ACK,flag:l.flag})};k.prototype.onMessageSent=function(l){"use strict";__p&&__p();var m=l.flag===1;switch(l.type){case c("FBRTCConstants").PayloadType.OFFER:this.$FBRTCCallSummary41(m,i.SENT_OFFER,i.SENT_RETRIED_OFFER);this.$FBRTCCallSummary42(l,this.$FBRTCCallSummary7,this.$FBRTCCallSummary9);break;case c("FBRTCConstants").PayloadType.ANSWER:this.$FBRTCCallSummary41(m,i.SENT_ANSWER,i.SENT_RETRIED_ANSWER);this.$FBRTCCallSummary42(l,this.$FBRTCCallSummary7,this.$FBRTCCallSummary9);break;case c("FBRTCConstants").PayloadType.OK:this.$FBRTCCallSummary40(i.SENT_OK);break;case c("FBRTCConstants").PayloadType.PRANSWER:this.$FBRTCCallSummary40(i.SENT_PRANSWER);break;case c("FBRTCConstants").PayloadType.OFFER_ACK:this.$FBRTCCallSummary41(m,i.SENT_OFFER_ACK,i.SENT_RETRIED_OFFER_ACK);break;case c("FBRTCConstants").PayloadType.ANSWER_ACK:this.$FBRTCCallSummary41(m,i.SENT_ANSWER_ACK,i.SENT_RETRIED_ANSWER_ACK);break;case c("FBRTCConstants").PayloadType.ICE_CANDIDATE:this.$FBRTCCallSummary42(l,this.$FBRTCCallSummary7,this.$FBRTCCallSummary9);break;default:}this.$FBRTCCallSummary38()};k.prototype.$FBRTCCallSummary42=function(l,m,n){"use strict";var o=null,p=null,q=this.$FBRTCCallSummary20.extractIceInfo(l.sdp);for(var r=0;r<q.length;r++){o=q[r].gen;p=q[r].type;if(o===0)this.$FBRTCCallSummary43(m,p);this.$FBRTCCallSummary43(n,p)}};k.prototype.$FBRTCCallSummary43=function(l,m){"use strict";if(!l[m])l[m]=1;else l[m]=l[m]+1};k.prototype.$FBRTCCallSummary44=function(l){"use strict";this.addExtraInfo(c("FBRTCLogger").Key.PEER_IS_MOBILE,l.isFromMobile()?"1":"0")};k.prototype.onFullMessageReceived=function(l){"use strict";__p&&__p();var m=l.msg,n=m.flag===1;switch(m.type){case c("FBRTCConstants").PayloadType.OFFER:this.$FBRTCCallSummary44(l);this.$FBRTCCallSummary41(n,i.RECV_OFFER,i.RECV_RETRIED_OFFER);this.$FBRTCCallSummary42(m,this.$FBRTCCallSummary8,this.$FBRTCCallSummary10);break;case c("FBRTCConstants").PayloadType.ANSWER:this.$FBRTCCallSummary44(l);this.$FBRTCCallSummary41(n,i.RECV_ANSWER,i.RECV_RETRIED_ANSWER);this.$FBRTCCallSummary42(m,this.$FBRTCCallSummary8,this.$FBRTCCallSummary10);break;case c("FBRTCConstants").PayloadType.OK:this.$FBRTCCallSummary40(i.RECV_OK);break;case c("FBRTCConstants").PayloadType.PRANSWER:this.$FBRTCCallSummary40(i.RECV_PRANSWER);break;case c("FBRTCConstants").PayloadType.OFFER_ACK:this.$FBRTCCallSummary41(n,i.RECV_OFFER_ACK,i.RECV_RETRIED_OFFER_ACK);break;case c("FBRTCConstants").PayloadType.ANSWER_ACK:this.$FBRTCCallSummary41(n,i.RECV_ANSWER_ACK,i.RECV_RETRIED_ANSWER_ACK);break;case c("FBRTCConstants").PayloadType.ICE_CANDIDATE:this.$FBRTCCallSummary42(m,this.$FBRTCCallSummary8,this.$FBRTCCallSummary10);break;default:}this.$FBRTCCallSummary38()};k.prototype.onMsgAckReceived=function(l,m){"use strict";var n=l.msg.flag===1;if(m)this.$FBRTCCallSummary41(n,i.RECV_OFFER_ACK,i.RECV_RETRIED_OFFER_ACK);else this.$FBRTCCallSummary41(n,i.RECV_ANSWER_ACK,i.RECV_RETRIED_ANSWER_ACK)};k.prototype.onNetworkReady=function(){"use strict";this.$FBRTCCallSummary40(i.NETWORK_READY);this.$FBRTCCallSummary38()};k.prototype.onCallConnected=function(){"use strict";this.$FBRTCCallSummary40(i.CALL_CONNECTED);this.$FBRTCCallSummary38()};k.prototype.onCallEnded=function(l,m,n,o){"use strict";this.$FBRTCCallSummary33=n;this.$FBRTCCallSummary34=String(l);this.$FBRTCCallSummary35=o;this.$FBRTCCallSummary36=m;this.$FBRTCCallSummary40(i.CALL_ENDED);this.$FBRTCCallSummary38()};k.prototype.setOfferSentTime=function(){"use strict";this.$FBRTCCallSummary40(i.SENT_OFFER)};k.prototype.setOfferAckReceivedTime=function(){"use strict";this.$FBRTCCallSummary40(i.RECV_OFFER_ACK)};k.prototype.setAnswerSentTime=function(){"use strict";this.$FBRTCCallSummary40(i.SENT_ANSWER)};k.prototype.setAnswerReceivedTime=function(){"use strict";this.$FBRTCCallSummary40(i.RECV_ANSWER)};k.prototype.setEscalationAvailable=function(){"use strict";this.$FBRTCCallSummary45(j.ESCALATION_IS_AVAILABLE)};k.prototype.setEscalationInitiated=function(){"use strict";this.$FBRTCCallSummary45(j.USER_INITIATED_REQUEST)};k.prototype.setReceivedEscalationRequest=function(){"use strict";this.$FBRTCCallSummary45(j.RECEIVED_INCOMING_REQUEST)};k.prototype.setInvalidP2PEscalationState=function(){"use strict";this.$FBRTCCallSummary45(j.REJECTED_INVALID_P2P_STATE)};k.prototype.setEscalationConnectingToMultiway=function(){"use strict";this.$FBRTCCallSummary45(j.CONNECTING_TO_MULTIWAY)};k.prototype.setEscalationConnectedToMultiway=function(){"use strict";this.$FBRTCCallSummary45(j.CONNECTED_TO_MULTIWAY)};k.prototype.setEscalationPeerConnectingToMultiway=function(){"use strict";this.$FBRTCCallSummary45(j.PEER_CONNECTING_TO_MULTIWAY)};k.prototype.setEscalationPeerConnectedToMultiway=function(){"use strict";this.$FBRTCCallSummary45(j.PEER_CONNECTED_TO_MULTIWAY)};k.prototype.setReadyToEscalate=function(){"use strict";this.$FBRTCCallSummary45(j.READY_TO_ESCALATE)};k.prototype.setEscalationPeerFailedToConnectToMultiway=function(){"use strict";this.$FBRTCCallSummary45(j.PEER_FAILED_TO_CONNECT_TO_MULTIWAY)};k.prototype.setEscalationTimedOut=function(){"use strict";this.$FBRTCCallSummary45(j.TIMED_OUT)};k.prototype.toString=function(){"use strict";var l={};l.core_metrics=this.$FBRTCCallSummary46();l.time_series=null;return JSON.stringify(l)};k.prototype.$FBRTCCallSummary46=function(){"use strict";__p&&__p();var l={};l.ver=k.CURRENT_SUMMARY_VERSION;l.log_level=c("FBRTCConstants").uploadLogLevelString(this.$FBRTCCallSummary2);l.caller=this.$FBRTCCallSummary1;l.call_type=this.$FBRTCCallSummary28;l.is_using_multiway=this.$FBRTCCallSummary24;l.active_conn=this.$FBRTCCallSummary25;l.conf_name=this.$FBRTCCallSummary26;l.esc_p2p_call_id=this.$FBRTCCallSummary27;l.esc_state_times=this.$FBRTCCallSummary6;l.esc_conf_name=this.$FBRTCCallSummary30;l.serv_info=this.$FBRTCCallSummary29;l.conn=this.$FBRTCCallSummary47();l.peer_id=this.peerID;l.has_video=true;l.open_count=this.$FBRTCCallSummary17;l.signaling=this.$FBRTCCallSummary48();l.sender=this.$FBRTCCallSummary49();l.receiver=this.$FBRTCCallSummary50();l.end=this.$FBRTCCallSummary51();l.video=this.$FBRTCCallSummary52();l.push_phase=c("SiteData").push_phase;l.client_version=this.$FBRTCCallSummary23;return l};k.prototype.$FBRTCCallSummary47=function(){"use strict";var l={dtls:1};if(this.$FBRTCCallSummary21.sender&&this.$FBRTCCallSummary21.sender.rtt)l.rtt=this.$FBRTCCallSummary21.sender.rtt;return l};k.prototype.$FBRTCCallSummary48=function(){"use strict";__p&&__p();var l={};if(this.$FBRTCCallSummary3)l.trigger=this.$FBRTCCallSummary3;l.start_time=this.$FBRTCCallSummary11;l.time_from_start=this.$FBRTCCallSummary4;var m=this.$FBRTCCallSummary4[i.CALL_CONNECTED],n=this.$FBRTCCallSummary4[i.CALL_ENDED];if(m){if(!n)if(this.$FBRTCCallSummary14)n=this.$FBRTCCallSummary14-this.$FBRTCCallSummary11;else n=this.$FBRTCCallSummary53();var o=n-m;if(o>0)l.duration=o}l.new_time_from_start=this.$FBRTCCallSummary5;m=this.$FBRTCCallSummary5[i.CALL_CONNECTED];n=this.$FBRTCCallSummary5[i.CALL_ENDED];if(m){if(!n)if(this.$FBRTCCallSummary12>0)n=this.$FBRTCCallSummary12;else n=this.$FBRTCCallSummary39();var p=n-m;if(p>0)l.new_duration=p}return l};k.prototype.$FBRTCCallSummary49=function(){"use strict";var l={};if(this.$FBRTCCallSummary7)l.ice_g0=this.$FBRTCCallSummary7;if(this.$FBRTCCallSummary9)l.ice=this.$FBRTCCallSummary9;if(this.$FBRTCCallSummary21.sender)Object.assign(l,this.$FBRTCCallSummary21.sender);return l};k.prototype.$FBRTCCallSummary50=function(){"use strict";var l={};if(this.$FBRTCCallSummary8)l.ice_g0=this.$FBRTCCallSummary8;if(this.$FBRTCCallSummary10)l.ice=this.$FBRTCCallSummary10;return l};k.prototype.$FBRTCCallSummary51=function(){"use strict";__p&&__p();var l={};if(this.$FBRTCCallSummary34!==null){l.end_call_reason_string=c("FBRTCConstants").callEndReasonString(this.$FBRTCCallSummary34);if(this.$FBRTCCallSummary35!==null)l.end_call_subreason_string=this.$FBRTCCallSummary35;l.remote_ended=this.$FBRTCCallSummary36}if(this.$FBRTCCallSummary21.end)Object.assign(l,this.$FBRTCCallSummary21.end);return l};k.prototype.$FBRTCCallSummary52=function(){"use strict";var l={capture:{}};if(this.$FBRTCCallSummary21.video&&this.$FBRTCCallSummary21.video.sender)Object.assign(l,this.$FBRTCCallSummary21.video.sender);if(this.$FBRTCCallSummary22)Object.assign(l.capture,this.$FBRTCCallSummary22);return{sender:l,ld:this.$FBRTCCallSummary31,rd:this.$FBRTCCallSummary32}};k.prototype.$FBRTCCallSummary53=function(){"use strict";return new Date().valueOf()-this.$FBRTCCallSummary11};k.prototype.$FBRTCCallSummary39=function(){"use strict";var l=c("performanceNow")()-this.$FBRTCCallSummary16;return Math.floor(this.$FBRTCCallSummary12+l)};k.prototype.$FBRTCCallSummary40=function(l){"use strict";if(this.$FBRTCCallSummary4[l])return;this.$FBRTCCallSummary4[l]=this.$FBRTCCallSummary53();this.$FBRTCCallSummary5[l]=this.$FBRTCCallSummary39()};k.prototype.$FBRTCCallSummary45=function(l){"use strict";if(this.$FBRTCCallSummary6[l])return;this.$FBRTCCallSummary6[l]=this.$FBRTCCallSummary53()};k.prototype.$FBRTCCallSummary41=function(l,m,n){"use strict";if(l)this.$FBRTCCallSummary40(n);else this.$FBRTCCallSummary40(m)};k.prototype.$FBRTCCallSummary38=function(){"use strict";this.$FBRTCCallSummary13=new Date().valueOf()};k.prototype.$FBRTCCallSummary37=function(){"use strict";return{device:c("UserAgentData").deviceName,os:c("UserAgentData").platformName,os_version:c("UserAgentData").platformFullVersion,browser:c("UserAgentData").browserName,browser_version:c("UserAgentData").browserFullVersion,screen_height:window.screen.availHeight,screen_width:window.screen.availWidth}};k.prototype.setClientVersion=function(l){"use strict";this.$FBRTCCallSummary23=l};k.CURRENT_SUMMARY_VERSION=19;f.exports=k}),null);
__d("FBRTCCallSummaryStore",["CacheStorage","FBRTCCallSummary","FBRTCLogger","areEqual"],(function a(b,c,d,e,f,g){__p&&__p();var h="localstorage",i="RTC_CALL_SUMMARY_",j="summary",k=2e3,l=3,m=3*60*1e3,n=null;o.getInstance=function(){"use strict";if(!n)n=new o();return n};function o(){"use strict";this.$FBRTCCallSummaryStore1=new(c("CacheStorage"))(h,i);this.$FBRTCCallSummaryStore2=c("FBRTCLogger").getInstance()}o.prototype.storeCallSummary=function(p,q,r){"use strict";__p&&__p();var s=this;this.$FBRTCCallSummaryStore3(function(t){__p&&__p();if(!t[p])t[p]={};var u=t[p][q];if(u){var v=s.$FBRTCCallSummaryStore4(u);if(v&&v.getLastUpdatedTime()>r.getLastUpdatedTime()){s.$FBRTCCallSummaryStore2.logToConsole("Outdated summaries");return null}}t[p][q]=s.$FBRTCCallSummaryStore5(r);return t},s.$FBRTCCallSummaryStore2.logError.bind(s.$FBRTCCallSummaryStore2,p,q))};o.prototype.retrieveCallSummary=function(p,q){"use strict";var r=this.$FBRTCCallSummaryStore6(),s=null;if(r[p])s=r[p][q];if(s)return this.$FBRTCCallSummaryStore4(s);else return null};o.prototype.removeCallSummary=function(p,q){"use strict";this.removeCallSummaries([{peerID:p,callID:q}])};o.prototype.removeCallSummaries=function(p){"use strict";__p&&__p();var q=this;this.$FBRTCCallSummaryStore3(function(r){__p&&__p();var s=p.length;for(var t=0;t<s;t++){var u=p[t].peerID,v=p[t].callID;if(r[u]&&r[u][v]){delete r[u][v];if(q.$FBRTCCallSummaryStore7(r[u]))delete r[u]}}return r},q.$FBRTCCallSummaryStore2.logError.bind(q.$FBRTCCallSummaryStore2,null,null))};o.prototype.getLoggableSummaries=function(){"use strict";__p&&__p();var p=this.$FBRTCCallSummaryStore6(),q=[];for(var r in p)if(Object.prototype.hasOwnProperty.call(p,r))for(var s in p[r])if(Object.prototype.hasOwnProperty.call(p[r],s)){var t=this.$FBRTCCallSummaryStore4(p[r][s],m);if(t)q.push(t)}return q};o.prototype.$FBRTCCallSummaryStore7=function(p){"use strict";for(var q in p)if(Object.prototype.hasOwnProperty.call(p,q))return false;return true};o.prototype.$FBRTCCallSummaryStore5=function(p){"use strict";var q={__t:Date.now(),__d:p.toJsonString()};return q};o.prototype.$FBRTCCallSummaryStore4=function(p,q){"use strict";if(p)if(!q||Date.now()-p.__t>=q)return c("FBRTCCallSummary").fromJsonString(p.__d);return null};o.prototype.$FBRTCCallSummaryStore6=function(){"use strict";var p=this.$FBRTCCallSummaryStore1.get(j)||{};return p};o.prototype.$FBRTCCallSummaryStore3=function(p,q,r,s){__p&&__p();var t,u=this;"use strict";if(r===undefined||r===null)r=l;var v=this.$FBRTCCallSummaryStore6(),w=this.$FBRTCCallSummaryStore6(),x=p(v);if(x===null)return;var y=this.$FBRTCCallSummaryStore6();if(c("areEqual")(w,y)){this.$FBRTCCallSummaryStore1.set(j,x);this.$FBRTCCallSummaryStore2.logToConsole("Updated summaries")}else if(r>0){q("Retry lock");if(s)(function(){var z=u;setTimeout(function(){z.$FBRTCCallSummaryStore3(p,q,r-1,true)},k)})();else this.$FBRTCCallSummaryStore3(p,q,r-1,true)}else q("Failed to lock")};f.exports=o}),null);
__d("FBRTCCallSummaryUploader",["Banzai","FBRTCCallSummary","FBRTCCallSummaryStore"],(function a(b,c,d,e,f,g){var h={init:function i(){var j=c("FBRTCCallSummaryStore").getInstance();c("Banzai").subscribe(c("Banzai").SEND,function(){c("FBRTCCallSummary").logSavedSummaries(j)})}};f.exports=h}),null);
__d("FBRTCMessageHandler",["Bootloader","FBRTCMessageListener","FBRTCSupport"],(function a(b,c,d,e,f,g){__p&&__p();var h=null,i=false,j=null,k={init:function n(){if(!i&&c("FBRTCSupport").isReceiveWebrtcSupported()){i=true;c("FBRTCMessageListener").init(false);c("FBRTCMessageListener").once("messageReceived",function(o){l()});c("FBRTCMessageListener").once("multiwayMessageReceived",function(o){m(o)})}}};function l(){if(!h)c("Bootloader").loadModules(["FBRTCIncomingCallController","FBRTCIncomingCallDialog","FBRTCMissedVideoCallHandler","FBRTCUnsupportedBrowserMessage"],function(n,o,p,q){h=new n(o,q,new p());c("FBRTCMessageListener").setMessageHandler(h.onMessageReceived,h)},"FBRTCMessageHandler")}function m(n){if(!j)c("Bootloader").loadModules(["FBRTCGroupCallIncomingController","FBRTCGroupCallIncomingDialog"],function(o,p){j=new o(p);c("FBRTCMessageListener").setMultiwayMessageHandler(j.onMessageReceived,j);j.onMessageReceived(n)},"FBRTCMessageHandler")}f.exports=k}),null);
__d("MercuryAudienceRestrictedTypeaheadDataSource",["CurrentUser","DataSource","MercuryParticipantTypes","MercuryTypeaheadConstants","OrderedFriendsList","ShortProfiles"],(function a(b,c,d,e,f,g){__p&&__p();var h,i;h=babelHelpers.inherits(j,c("DataSource"));i=h&&h.prototype;function j(k){"use strict";__p&&__p();k=k||{};k.kanaNormalization=true;k.maxResults=c("MercuryTypeaheadConstants").COMPOSER_CHATTAB_MAX;k.minQueryLength=2;i.constructor.call(this,k);this.$MercuryAudienceRestrictedTypeaheadDataSource1=false;this.$MercuryAudienceRestrictedTypeaheadDataSource2=false;this.$MercuryAudienceRestrictedTypeaheadDataSource3={};this.$MercuryAudienceRestrictedTypeaheadDataSource4=true;this.queryCache={};this.localCache={};this.queryIDs={}}j.prototype.dirty=function(){"use strict";return this};j.prototype.buildData=function(k){"use strict";return i.buildData.call(this,k)};j.prototype.query=function(k,l,m,n){"use strict";var o=l||k.length===1;return i.query.call(this,k,o,m,n)};j.prototype.getQueryData=function(k,l){"use strict";return babelHelpers["extends"]({},i.getQueryData.call(this,k,l))};j.prototype.setEntry=function(k,l){"use strict";this.$MercuryAudienceRestrictedTypeaheadDataSource3[k]=l};j.prototype.getEntry=function(k){"use strict";return this.$MercuryAudienceRestrictedTypeaheadDataSource3[k]||null};j.prototype.getCachedShortProfileIDs=function(){"use strict";var k=c("ShortProfiles").getCachedProfileIDs(),l=k.filter(function(m){var n=c("ShortProfiles").getNow(m);return m==c("CurrentUser").getID()||n&&(n.type===c("MercuryParticipantTypes").FRIEND||n.type===c("MercuryParticipantTypes").FB4C)});return l};j.prototype.isBootstrapped=function(){"use strict";return this.$MercuryAudienceRestrictedTypeaheadDataSource1};j.prototype.isBootstrapping=function(){"use strict";return this.$MercuryAudienceRestrictedTypeaheadDataSource2};j.prototype.processEntries=function(k,l){"use strict";k=k&&k.map(function(m){if(m.index==null&&(m.render_type===c("MercuryParticipantTypes").FRIEND||m.render_type===c("MercuryParticipantTypes").FB4C))m.index=c("OrderedFriendsList").getActiveRank(m.uid);return m});return i.processEntries.call(this,k)};j.prototype.mergeUids=function(k,l,m,n){"use strict";var o=l.sort(function(p,q){var r=this.getEntry(p),s=this.getEntry(q);return r&&r.index&&s&&s.index?r.index-s.index:0}.bind(this));return i.mergeUids.call(this,k,o,m,n)};j.prototype.setQueryData=function(k,l){"use strict";return i.setQueryData.call(this,k)};j.prototype.respond=function(k,l,m){"use strict";return i.respond.call(this,k,l,m)};j.prototype.setShowThreads=function(k){"use strict";this.$MercuryAudienceRestrictedTypeaheadDataSource4=k};f.exports=j}),null);
__d("P2PDialogStore",["EventEmitter","P2PActionConstants","P2PDispatcher"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h,i,j=void 0,k={};h=babelHelpers.inherits(l,c("EventEmitter"));i=h&&h.prototype;function l(){i.constructor.call(this);j=c("P2PDispatcher").register(this.onEventDispatched.bind(this));k={dialogClass:null,dialogProps:null}}l.prototype.getState=function(){return k};l.prototype.onEventDispatched=function(m){__p&&__p();var n=m.type,o=m.data;switch(n){case c("P2PActionConstants").DIALOG_SHOWN:k.dialogClass=o.dialogClass;k.dialogProps=o.dialogProps;this.emit("change");break;case c("P2PActionConstants").DIALOG_CLOSED:k.dialogClass=null;k.dialogProps=null;this.emit("change");break}};f.exports=new l()}),null);
__d("P2PDialogContainer.react",["P2PDialogStore","React"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h,i;h=babelHelpers.inherits(j,c("React").Component);i=h&&h.prototype;function j(){var k,l;for(var m=arguments.length,n=Array(m),o=0;o<m;o++)n[o]=arguments[o];return l=(k=i.constructor).call.apply(k,[this].concat(n)),this.state=c("P2PDialogStore").getState(),this.onDialogStoreChange=function(){this.setState(c("P2PDialogStore").getState())}.bind(this),l}j.prototype.componentDidMount=function(){this.dialogStoreSub=c("P2PDialogStore").addListener("change",this.onDialogStoreChange)};j.prototype.componentWillUnmount=function(){if(this.dialogStoreSub){this.dialogStoreSub.remove();this.dialogStoreSub=null}};j.prototype.render=function(){if(!this.state.dialogClass)return null;var k=this.state.dialogClass;return c("React").createElement(k,babelHelpers["extends"]({},this.state.dialogProps,{key:"dialog"}))};f.exports=j}),null);
__d("P2PDialogContainerMount",["P2PDialogContainer.react","React","ReactDOM"],(function a(b,c,d,e,f,g){"use strict";var h={mount:function i(j){c("ReactDOM").render(c("React").createElement(c("P2PDialogContainer.react"),null),j)}};f.exports=h}),null);
__d("PagesPlatformActionConstants",[],(function a(b,c,d,e,f,g){"use strict";var h=Object.freeze({BOOKING_REQUEST_ACCEPT_ERROR:"booking_request_accept_error",BOOKING_REQUEST_ACCEPT_INITIATED:"booking_request_accept_initiated",BOOKING_REQUEST_ACCEPTED:"booking_request_accepted",BOOKING_REQUEST_CREATED:"booking_request_created",BOOKING_REQUEST_DECLINE_ERROR:"booking_request_decline_error",BOOKING_REQUEST_DECLINE_INITIATED:"booking_request_decline_initiated",BOOKING_REQUEST_DECLINED:"booking_request_declined",BOOKING_REQUEST_RESCHEDULE_INITIATED:"booking_request_reschedule_initiated",BOOKING_REQUEST_RESCHEULED:"booking_request_reschedule",DIALOG_CLOSED:"dialog_closed",DIALOG_SHOWN:"dialog_shown",NEW_TIME_CHOSEN:"new_time_chosen"});f.exports=h}),null);
__d("PagesPlatformRequestDispatcher",["Dispatcher_DEPRECATED"],(function a(b,c,d,e,f,g){"use strict";f.exports=new(c("Dispatcher_DEPRECATED"))()}),null);
__d("PagesPlatformDialogStore",["EventEmitter","PagesPlatformActionConstants","PagesPlatformRequestDispatcher"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h,i,j={};h=babelHelpers.inherits(k,c("EventEmitter"));i=h&&h.prototype;function k(){i.constructor.call(this);c("PagesPlatformRequestDispatcher").register(this.onEventDispatched.bind(this));j={dialogClass:null,dialogProps:null}}k.prototype.getState=function(){return j};k.prototype.onEventDispatched=function(l){__p&&__p();var m=l.type,n=l.data;switch(m){case c("PagesPlatformActionConstants").DIALOG_SHOWN:j.dialogClass=n.dialogClass;j.dialogProps=n.dialogProps;this.emit("change");break;case c("PagesPlatformActionConstants").DIALOG_CLOSED:j.dialogClass=null;j.dialogProps=null;this.emit("change");break}};f.exports=new k()}),null);
__d("PagesPlatformDialogContainer.react",["PagesPlatformDialogStore","PureStoreBasedStateMixin","React"],(function a(b,c,d,e,f,g){"use strict";var h=c("React").createClass({displayName:"PagesPlatformDialogContainer",mixins:[c("PureStoreBasedStateMixin")(c("PagesPlatformDialogStore"))],statics:{calculateState:function i(){return c("PagesPlatformDialogStore").getState()}},render:function i(){if(!this.state.dialogClass)return null;var j=this.state.dialogClass;return c("React").createElement(j,babelHelpers["extends"]({},this.state.dialogProps,{key:"dialog"}))}});f.exports=h}),null);
__d("PagesPlatformDialogContainerMount",["PagesPlatformDialogContainer.react","React","ReactDOM"],(function a(b,c,d,e,f,g){"use strict";var h={mount:function i(j){c("ReactDOM").render(c("React").createElement(c("PagesPlatformDialogContainer.react"),null),j)}};f.exports=h}),null);