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

__d("IgnoreMessagesTypedLogger",["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:IgnoreMessagesLoggerConfig",this.$IgnoreMessagesTypedLogger1,c("Banzai").BASIC)};h.prototype.logVital=function(){c("GeneratedLoggerUtils").log("logger:IgnoreMessagesLoggerConfig",this.$IgnoreMessagesTypedLogger1,c("Banzai").VITAL)};h.prototype.clear=function(){this.$IgnoreMessagesTypedLogger1={};return this};h.prototype.updateData=function(j){this.$IgnoreMessagesTypedLogger1=babelHelpers["extends"]({},this.$IgnoreMessagesTypedLogger1,j);return this};h.prototype.setEvent=function(j){this.$IgnoreMessagesTypedLogger1.event=j;return this};h.prototype.setPlatform=function(j){this.$IgnoreMessagesTypedLogger1.platform=j;return this};h.prototype.setThreadID=function(j){this.$IgnoreMessagesTypedLogger1.thread_id=j;return this};h.prototype.setVC=function(j){this.$IgnoreMessagesTypedLogger1.vc=j;return this};var i={event:true,platform:true,thread_id:true,vc:true};f.exports=h}),null);
__d("MercurySendMessageFields",[],(function a(b,c,d,e,f,g){f.exports=Object.freeze({AUTO_RETRY_CNT:"auto_retry_cnt",MANUAL_RETRY_CNT:"manual_retry_cnt"})}),null);
__d("MercuryMessageObject",["BanzaiODS","MercuryActionStatus","MercuryActionType","MercuryIDs","MercuryLocalIDs","MercuryMessageClientState","MercuryMessageSourceTags","MercurySingletonProvider","MercurySourceType","MercuryThreads","MercurySendMessageFields"],(function a(b,c,d,e,f,g){__p&&__p();h.getForFBID=function(l){"use strict";return k.getForFBID(l)};h.get=function(){"use strict";return k.get()};function h(l){"use strict";this.$MercuryMessageObject1=l;this.$MercuryMessageObject2=c("MercuryThreads").getForFBID(l)}h.prototype.constructUserGeneratedMessageObject=function(l,m,n,o,p){__p&&__p();var q=arguments.length<=5||arguments[5]===undefined?null:arguments[5];"use strict";var r=i(this.$MercuryMessageObject1,c("MercuryActionType").USER_GENERATED_MESSAGE,m,n);if(typeof l=="string")l=l.replace(/^\s+/,"").replace(/\s+$/,"");r.body=l;r.has_attachment=false;r.html_body=false;r.attachments=[];r.specific_to_list=o||[];r.creator_info=p;if(q&&q.length>0)r.tags=q;return r};h.prototype.constructStickerMessageObject=function(l,m,n){__p&&__p();var o=arguments.length<=3||arguments[3]===undefined?null:arguments[3];"use strict";var p=i(this.$MercuryMessageObject1,c("MercuryActionType").USER_GENERATED_MESSAGE,m,n);p.has_attachment=true;p.html_body=false;p.attachments=[];p.sticker_id=l;p.specific_to_list=[];if(o&&o.length>0)p.tags=o;return p};h.prototype.constructAttachmentMessageObject=function(l,m){"use strict";var n=i(this.$MercuryMessageObject1,c("MercuryActionType").USER_GENERATED_MESSAGE,l,m);n.attachments=[];n.specific_to_list=[];return n};h.prototype.constructLogMessageObject=function(l,m,n,o){"use strict";var p=i(this.$MercuryMessageObject1,c("MercuryActionType").LOG_MESSAGE,l,m);p.log_message_type=n;p.log_message_data=o;if(o&&o.untypedData&&o.untypedData.ttl)p.ephemeral_ttl_mode=o.untypedData.ttl;return p};h.prototype.constructCTAConfirmationMessageObject=function(l,m,n,o){__p&&__p();var p=arguments.length<=4||arguments[4]===undefined?null:arguments[4];"use strict";var q=this.constructUserGeneratedMessageObject(l,m,n,null,null),r={};if(o)r={quick_replies:o,ignore_for_webhook:false};else r={ignore_for_webhook:true};q.platform_xmd=JSON.stringify(r);if(p&&p.length>0)q.tags=p;return q};h.prototype.normalizeNewMessage=function(l){"use strict";__p&&__p();if(l.status===undefined)l.status=c("MercuryActionStatus").UNSENT;l.offline_threading_id=l.offline_threading_id||c("MercuryLocalIDs").generateOfflineThreadingID(l.timestamp);if(!l.offline_threading_id)c("BanzaiODS").bumpEntityKey("chat.web","invalid_otid_generated");l.message_id=l.message_id||l.offline_threading_id;var m=c("MercuryIDs").getParticipantIDFromUserID(this.$MercuryMessageObject1);l.specific_to_list=l.specific_to_list||[];if(l.specific_to_list.length&&l.specific_to_list.indexOf(m)===-1)l.specific_to_list.push(m);if(!l.thread_id)l.thread_id="root:"+l.offline_threading_id;else{var n=this.$MercuryMessageObject2.getThreadMetaNow(l.thread_id);if(n&&n.ephemeral_ttl_mode!==null&&l.ephemeral_ttl_mode===undefined)l.ephemeral_ttl_mode=n.ephemeral_ttl_mode}if(l.specific_to_list.length==1)l.thread_id="user:"+this.$MercuryMessageObject1;else if(l.specific_to_list.length==2){var o=l.specific_to_list[0]==m?l.specific_to_list[1]:l.specific_to_list[0];l.thread_id=c("MercuryIDs").getThreadIDFromParticipantID(o)}if(!l.specific_to_list.length){var p=c("MercuryIDs").tokenize(l.thread_id),q=p.type,r=p.value;if(q=="user")l.specific_to_list=["fbid:"+r,m]}if(!l[c("MercurySendMessageFields").MANUAL_RETRY_CNT])l[c("MercurySendMessageFields").MANUAL_RETRY_CNT]=0};h.prototype.normalizeResendMessage=function(l){"use strict";l.status=c("MercuryActionStatus").RESENDING;l.timestamp=Date.now();l[c("MercurySendMessageFields").MANUAL_RETRY_CNT]+=1};h.prototype.normalizeAddAttachmentPlaceholder=function(l,m,n){"use strict";if(n.preview_attachments.length>0){l.has_attachment=true;l.preview_attachments=n.preview_attachments}l.client_state=c("MercuryMessageClientState").DO_NOT_SEND_TO_SERVER;l.status=c("MercuryActionStatus").RESENDING;l.upload_id=m};function i(l,m,n,o){var p=j(n)?[c("MercuryMessageSourceTags").CHAT]:[],q=Date.now(),r={action_type:m,thread_id:o,author:c("MercuryIDs").getParticipantIDFromUserID(l),author_email:null,timestamp:q,is_unread:false,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,is_spoof_warning:false,source:n,source_tags:p};return r}function j(l){switch(l){case c("MercurySourceType").CHAT_WEB:case c("MercurySourceType").CHAT_JABBER:case c("MercurySourceType").CHAT_IPHONE:case c("MercurySourceType").CHAT_MEEBO:case c("MercurySourceType").CHAT_ORCA:case c("MercurySourceType").CHAT_TEST:case c("MercurySourceType").CHAT:return true;default:return false}}var k=new(c("MercurySingletonProvider"))(h);f.exports=h}),null);
__d("MercuryMessageActions",["Bootloader","ChatConfig","MercuryActionType","MercuryDispatcher","MercuryMessageObject","MercuryPayloadSource","MercuryServerRequests","MercurySingletonMixin"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();function h(i){this.$MercuryMessageActions1=i;this.$MercuryMessageActions2=c("MercuryMessageObject").getForFBID(this.$MercuryMessageActions1);this.__serverRequests=c("MercuryServerRequests").getForFBID(this.$MercuryMessageActions1);this.__dispatcher=c("MercuryDispatcher").getForFBID(this.$MercuryMessageActions1)}h.prototype.send=function(i,j,k){j=j||Function.prototype;this.$MercuryMessageActions2.normalizeNewMessage(i);this.__dispatcher.handleUpdate(this.__constructClientSingleMessagePayload(babelHelpers["extends"]({},i),c("MercuryPayloadSource").CLIENT_SEND_MESSAGE));this.__serverRequests.sendNewMessage(i,k);j(i.thread_id);this.$MercuryMessageActions3()};h.prototype.resend=function(i,j){var k=babelHelpers["extends"]({},i);this.$MercuryMessageActions2.normalizeResendMessage(k);this.send(k,undefined,j)};h.prototype.addAttachmentPlaceholder=function(i,j,k){this.$MercuryMessageActions2.normalizeAddAttachmentPlaceholder(i,j,k);this.$MercuryMessageActions2.normalizeNewMessage(i);this.__dispatcher.handleUpdate(this.__constructClientSingleMessagePayload(babelHelpers["extends"]({},i),c("MercuryPayloadSource").CLIENT_SEND_MESSAGE))};h.prototype.cancelAttachmentPlaceholder=function(i,j){this.__dispatcher.handleUpdate(this.__constructClientSingleMessagePayload({upload_id:i,upload_data:j,action_type:c("MercuryActionType").CANCEL_ATTACHMENT_PLACEHOLDER},c("MercuryPayloadSource").CLIENT_SEND_MESSAGE))};h.prototype.confirmAttachmentPlaceholder=function(i,j){this.__dispatcher.handleUpdate(this.__constructClientSingleMessagePayload({upload_id:i,upload_data:j,action_type:c("MercuryActionType").CONFIRM_ATTACHMENT_PLACEHOLDER},c("MercuryPayloadSource").CLIENT_SEND_MESSAGE))};h.prototype["delete"]=function(i,j,k){this.__dispatcher.handleUpdate(this.$MercuryMessageActions4(i,j,c("MercuryActionType").DELETE_MESSAGES,k||c("MercuryPayloadSource").CLIENT_DELETE_MESSAGES))};h.prototype.unwrap=function(i){this.__dispatcher.handleUpdate(this.__constructClientSingleMessagePayload({thread_id:i.thread_id,unwrapped_message_id:i.message_id,action_type:c("MercuryActionType").UNWRAP_MESSAGE},c("MercuryPayloadSource").CLIENT_UNWRAP_MESSAGE))};h.prototype.__constructClientSingleMessagePayload=function(i,j){return{actions:[i],from_client:true,payload_source:j}};h.prototype.$MercuryMessageActions5=function(i,j){return{actions:[i],from_client:false,payload_source:j}};h.prototype.$MercuryMessageActions4=function(i,j,k,l){return{actions:[{action_type:k,thread_id:i,message_ids:j}],from_client:true,payload_source:l}};h.prototype.$MercuryMessageActions3=function(){if(c("ChatConfig").get("in_recents_experiment"))c("Bootloader").loadModules(["FunnelLogger"],function(i){i.appendAction("WWW_DIVEBAR_RECENTS_FUNNEL","send_message")},"MercuryMessageActions")};Object.assign(h,c("MercurySingletonMixin"));f.exports=h}),null);
__d("MercuryViewer",["CurrentUser","MercuryAssert"],(function a(b,c,d,e,f,g){"use strict";var h="fbid:"+c("CurrentUser").getID(),i={getID:function j(){return h},isViewer:function j(k){c("MercuryAssert").isParticipantID(k);return k===h}};f.exports=i}),null);
__d("XGroupsJoinChatController",["XController"],(function a(b,c,d,e,f,g){f.exports=c("XController").create("/groups/join_chat/",{link_hash:{type:"String"}})}),null);
__d("XMercuryThreadLikeIconController",["XController"],(function a(b,c,d,e,f,g){f.exports=c("XController").create("/mercury/like_icon/",{emoji:{type:"String",defaultValue:""}})}),null);
__d("XMessagingBlockMessagesController",["XController"],(function a(b,c,d,e,f,g){f.exports=c("XController").create("/messaging/block_messages/",{})}),null);
__d("XMessagingGroupJoinThroughHashController",["XController"],(function a(b,c,d,e,f,g){f.exports=c("XController").create("/messaging/join_through_hash/",{link_hash:{type:"String"}})}),null);
__d("XMessagingGroupJoinThroughPrivateLinkController",["XController"],(function a(b,c,d,e,f,g){f.exports=c("XController").create("/messaging/join_through_invite/",{link_hash:{type:"String"}})}),null);
__d("XMessagingGroupJoinableAcceptController",["XController"],(function a(b,c,d,e,f,g){f.exports=c("XController").create("/messaging/joinable_accept/",{thread_fbid:{type:"String"},user_id:{type:"Int"}})}),null);
__d("XMessagingGroupJoinableInviteController",["XController"],(function a(b,c,d,e,f,g){f.exports=c("XController").create("/messaging/joinable_invite/",{thread_fbid:{type:"String"},user_ids:{type:"IntSet"}})}),null);
__d("XMessagingGroupJoinableRejectController",["XController"],(function a(b,c,d,e,f,g){f.exports=c("XController").create("/messaging/joinable_reject/",{thread_fbid:{type:"String"},user_id:{type:"Int"}})}),null);
__d("XMessagingGroupSetApprovalController",["XController"],(function a(b,c,d,e,f,g){f.exports=c("XController").create("/messaging/set_approval_mode/",{set_mode:{type:"Enum",enumType:0},thread_fbid:{type:"String"}})}),null);
__d("XMessagingSaveAdminsController",["XController"],(function a(b,c,d,e,f,g){f.exports=c("XController").create("/messaging/save_admins/",{elem_id:{type:"String"},parent_elem_id:{type:"String"},thread_fbid:{type:"String"},admin_ids:{type:"FBIDSet"},add:{type:"Bool",defaultValue:false}})}),null);
__d("XMessagingSaveNicknameController",["XController"],(function a(b,c,d,e,f,g){f.exports=c("XController").create("/messaging/save_thread_nickname/",{source:{type:"Enum",required:true,enumType:1}})}),null);
__d("XMessagingSaveThreadColorController",["XController"],(function a(b,c,d,e,f,g){f.exports=c("XController").create("/messaging/save_thread_color/",{source:{type:"Enum",required:true,enumType:1}})}),null);
__d("XMessagingSaveThreadEmojiController",["XController"],(function a(b,c,d,e,f,g){f.exports=c("XController").create("/messaging/save_thread_emoji/",{source:{type:"Enum",required:true,enumType:1}})}),null);
__d("XMessagingUnblockMessagesController",["XController"],(function a(b,c,d,e,f,g){f.exports=c("XController").create("/messaging/unblock_messages/",{})}),null);
__d("XNFXIgnoreMessagesActionController",["XController"],(function a(b,c,d,e,f,g){f.exports=c("XController").create("/nfx/ignore_messages/",{thread_fbid:{type:"Int",required:true},location:{type:"Enum",required:true,enumType:1},__asyncDialog:{type:"Int"}})}),null);
__d("XNFXMessengerBlockActionController",["XController"],(function a(b,c,d,e,f,g){f.exports=c("XController").create("/nfx/block_messages/",{thread_fbid:{type:"Int",required:true},av:{type:"Int"},location:{type:"Enum",required:true,enumType:1},__asyncDialog:{type:"Int"}})}),null);
__d("MercuryThreadActions",["cssVar","AsyncDialog","AsyncRequest","EmojiLikeConstants","IgnoreMessagesTypedLogger","MercuryActionType","MercuryAPIArgsSource","MercuryConfig","MercuryDispatcher","MercuryIDs","MercuryLogMessageType","MercuryMessengerBlockingUtils","MercuryPayloadSource","MercuryParticipants","MercuryServerPayloadPreprocessor","MercuryServerRequests","MercurySingletonMixin","MercurySourceType","MercuryThreadIDMap","MercuryThreads","MercuryViewer","MercuryMessageActions","MessengerActions","MercuryMessageObject","MessagingTag","PageCommItemStatus","ReloadPage","URI","XGroupsJoinChatController","XMercuryThreadLikeIconController","XMessagingGroupJoinableAcceptController","XMessagingGroupJoinableInviteController","XMessagingGroupJoinableRejectController","XMessagingGroupJoinThroughHashController","XMessagingGroupJoinThroughPrivateLinkController","XMessagingGroupSetApprovalController","XMessagingSaveAdminsController","XMessagingSaveNicknameController","XMessagingSaveThreadColorController","XMessagingSaveThreadEmojiController","XNFXMessengerBlockActionController","XMessagingBlockMessagesController","XMessagingUnblockMessagesController","XNFXIgnoreMessagesActionController","ex"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i=c("MercuryThreadIDMap").get(),j=c("MercuryThreads").get(),k=c("MercuryMessageActions").get(),l=c("MercuryMessageObject").get();function m(n){this.$MercuryThreadActions1=n;this.__serverRequests=c("MercuryServerRequests").getForFBID(this.$MercuryThreadActions1);this.__dispatcher=c("MercuryDispatcher").getForFBID(this.$MercuryThreadActions1);this.__payloadPreprocessor=c("MercuryServerPayloadPreprocessor").getForFBID(this.$MercuryThreadActions1)}m.prototype.markRead=function(n,o){this.batchMarkRead([n],o)};m.prototype.batchMarkRead=function(n,o){this.__dispatcher.handleUpdate(this.$MercuryThreadActions2(n,true,o))};m.prototype.markUnread=function(n,o){this.batchMarkUnread([n],o)};m.prototype.batchMarkUnread=function(n,o){this.__dispatcher.handleUpdate(this.$MercuryThreadActions2(n,false,o))};m.prototype.markSeen=function(n,o){this.__dispatcher.handleUpdate(this.__constructClientPayload([n],c("MercuryActionType").MARK_THREAD_SEEN,c("MercuryPayloadSource").CLIENT_MARK_THREAD_SEEN,{persistent:o}))};m.prototype.archive=function(n,o){this.batchArchive([n],o)};m.prototype.batchArchive=function(n,o){n.forEach(function(p){this.__serverRequests.changeThreadArchivedStatus(p,true,o)}.bind(this));this.__dispatcher.handleUpdate(this.$MercuryThreadActions3(n,true))};m.prototype.unarchive=function(n,o){this.batchUnarchive([n],o)};m.prototype.batchUnarchive=function(n,o){n.forEach(function(p){this.__serverRequests.changeThreadArchivedStatus(p,false,o)}.bind(this));this.__dispatcher.handleUpdate(this.$MercuryThreadActions3(n,false))};m.prototype.markPageFollowUp=function(n,o){this.batchMarkPageFollowUp([n],o)};m.prototype.batchMarkPageFollowUp=function(n,o){n.forEach(function(p){this.__serverRequests.changeThreadPageFollowUpStatus(p,true,o)}.bind(this));this.__dispatcher.handleUpdate(this.$MercuryThreadActions4(n,true))};m.prototype.unmarkPageFollowUp=function(n,o){this.batchUnmarkPageFollowUp([n],o)};m.prototype.batchUnmarkPageFollowUp=function(n,o){n.forEach(function(p){this.__serverRequests.changeThreadPageFollowUpStatus(p,false,o)}.bind(this));this.__dispatcher.handleUpdate(this.$MercuryThreadActions4(n,false))};m.prototype.markSpam=function(n,o){this.batchMarkSpam([n],o)};m.prototype.batchMarkSpam=function(n,o){n.forEach(function(p){this.__serverRequests.markThreadSpam(p,o)}.bind(this));this.__dispatcher.handleUpdate(this.$MercuryThreadActions5(n,c("MessagingTag").SPAM))};m.prototype.unmarkSpam=function(n,o){this.batchUnmarkSpam([n],o)};m.prototype.batchUnmarkSpam=function(n,o){n.forEach(function(p){this.__serverRequests.unmarkThreadSpam(p,o)}.bind(this));this.__dispatcher.handleUpdate(this.$MercuryThreadActions5(n,c("MessagingTag").INBOX))};m.prototype.changeFolder=function(n,o){this.batchChangeFolder([n],o)};m.prototype.batchChangeFolder=function(n,o){n.forEach(function(p){this.__serverRequests.changeThreadFolder(p,o)}.bind(this));this.__dispatcher.handleUpdate(this.$MercuryThreadActions5(n,o))};m.prototype["delete"]=function(n,o){this.batchDelete([n],o)};m.prototype.batchDelete=function(n,o){n.forEach(function(p){this.__serverRequests.deleteThread(p,o)}.bind(this));this.__dispatcher.handleUpdate(this.__constructClientPayload(n,c("MercuryActionType").DELETE_THREAD,c("MercuryPayloadSource").CLIENT_DELETE_THREAD))};m.prototype.unmute=function(n){this.updateMuteSetting(n,0)};m.prototype.updateMuteSetting=function(n,o){this.__serverRequests.changeMutingOnThread(n,o);this.__dispatcher.handleUpdate(this.__constructClientPayload([n],c("MercuryActionType").CHANGE_MUTE_SETTINGS,c("MercuryPayloadSource").CLIENT_CHANGE_MUTE_SETTINGS,{mute_until:o}))};m.prototype.updateMentionsMuteSetting=function(n,o){var p=o?1:0;this.__serverRequests.changeMentionsMutingOnThread(n,p);this.__dispatcher.handleUpdate(this.__constructClientPayload([n],c("MercuryActionType").CHANGE_MUTE_SETTINGS,c("MercuryPayloadSource").CLIENT_CHANGE_MUTE_SETTINGS,{mentions_mute_mode:p}))};m.prototype.updateReactionsMuteSetting=function(n,o){var p=o?1:0;this.__serverRequests.changeReactionsMutingOnThread(n,p);this.__dispatcher.handleUpdate(this.__constructClientPayload([n],c("MercuryActionType").CHANGE_MUTE_SETTINGS,c("MercuryPayloadSource").CLIENT_CHANGE_MUTE_SETTINGS,{reactions_mute_mode:p}))};m.prototype.blockMessages=function(n,o){__p&&__p();var p="";if(c("MercuryConfig").WMBF)j.getThreadMeta(n,function(r){var s=c("MercuryParticipants").getNow(c("MercuryIDs").getParticipantIDFromUserID(r.other_user_fbid));p=s&&s.short_name});var q=c("XNFXMessengerBlockActionController").getURIBuilder().setInt("thread_fbid",c("MercuryIDs").getUserIDFromThreadID(n)).setEnum("location","www_chat_head").getURI();c("AsyncDialog").send(new(c("AsyncRequest"))(q),function(r){r.subscribe("confirm",function(){r.hide();o&&o(p);if(c("MercuryConfig").WMBF)this.changeFolder(n,c("MessagingTag").OTHER)}.bind(this))}.bind(this))};m.prototype.unblockMessages=function(n){var o=c("MercuryIDs").getUserIDFromThreadID(n);if(o===null)throw new Error(c("ex")("Expected user ID to unblock messages for, got null"));var p=JSON.stringify({reportable_ent_token:o,initial_action_name:c("MercuryMessengerBlockingUtils").block_messages});new(c("AsyncRequest"))(new(c("URI"))("/ajax/nfx/messenger_undo_block").addQueryData({story_location:"messenger",context:p})).send();if(c("MercuryConfig").WMBF)this.changeFolder(n,c("MessagingTag").INBOX)};m.prototype.ignoreMessages=function(n,o){var p=c("XNFXIgnoreMessagesActionController").getURIBuilder().setInt("thread_fbid",n).setEnum("location","www_chat_head").getURI();c("AsyncDialog").send(new(c("AsyncRequest"))(p))};m.prototype.blockOnMessengerDotCom=function(n){var o=c("XMessagingBlockMessagesController").getURIBuilder().getURI();new(c("IgnoreMessagesTypedLogger"))().setEvent("block_confirmed").setThreadID(c("MercuryIDs").getThreadFBIDFromThreadID(n)).setPlatform("messengerdotcom").log();new(c("AsyncRequest"))(o).setMethod("POST").setData({fbid:c("MercuryIDs").getUserIDFromThreadID(n)}).send()};m.prototype.blockIgnoreOnMessengerDotCom=function(n,o,p){n&&c("MessengerActions").selectThread(null);this.changeFolder(o,c("MessagingTag").OTHER);this.blockOnMessengerDotCom(o);p&&p()};m.prototype.unblockOnMessengerDotCom=function(n){var o=c("XMessagingUnblockMessagesController").getURIBuilder().getURI();new(c("AsyncRequest"))(o).setMethod("POST").setData({fbid:c("MercuryIDs").getUserIDFromThreadID(n)}).send();if(c("MercuryConfig").WMBF)this.changeFolder(n,c("MessagingTag").INBOX)};m.prototype.leaveGroup=function(n){if(!j.isEmptyLocalThread(n))k.send(l.constructLogMessageObject(c("MercurySourceType").TITAN_WEB,n,c("MercuryLogMessageType").UNSUBSCRIBE,{removed_participants:[c("MercuryViewer").getID()]}),null,c("MercuryAPIArgsSource").WEBMESSENGER)};m.prototype.changeThreadColor=function(n,o,p){if(j.isEmptyLocalThread(n))return;i.getServerIDFromClientID(n,function(q){var r={};if(o!="#0084ff")r.color_choice=o;r.thread_or_other_fbid=q;var s=c("XMessagingSaveThreadColorController").getURIBuilder().setEnum("source",p).getURI();new(c("AsyncRequest"))(s).setMethod("POST").setData(r).send()})};m.prototype.changeThreadEmoji=function(n,o,p){if(j.isEmptyLocalThread(n))return;i.getServerIDFromClientID(n,function(q){var r={},s=String.fromCodePoint.apply(String,o);if(s!==String.fromCodePoint(c("EmojiLikeConstants").FB_THUMBS_UP_EMOJI)&&s!==String.fromCodePoint(c("EmojiLikeConstants").THUMBS_UP_EMOJI_CODES))r.emoji_choice=s;r.thread_or_other_fbid=q;var t=c("XMessagingSaveThreadEmojiController").getURIBuilder().setEnum("source",p).getURI();new(c("AsyncRequest"))(t).setMethod("POST").setData(r).send()})};m.prototype.changeThreadNicknames=function(n,o,p,q){if(j.isEmptyLocalThread(n))return;i.getServerIDFromClientID(n,function(r){var s={thread_or_other_fbid:r,participant_id:o,nickname:p},t=c("XMessagingSaveNicknameController").getURIBuilder().setEnum("source",q).getURI();new(c("AsyncRequest"))(t).setMethod("POST").setData(s).send()})};m.prototype.setApprovalMode=function(n,o){var p=c("XMessagingGroupSetApprovalController").getURIBuilder().getURI();new(c("AsyncRequest"))(p).setMethod("POST").setData({set_mode:n,thread_fbid:o.thread_fbid}).send()};m.prototype.changeGroupAdmins=function(n,o,p){var q={thread_fbid:n,admin_ids:o,add:p},r=c("XMessagingSaveAdminsController").getURIBuilder().getURI();new(c("AsyncRequest"))(r).setMethod("POST").setData(q).send()};m.prototype.joinThroughHash=function(n){var o={link_hash:n},p=c("XMessagingGroupJoinThroughHashController").getURIBuilder().getURI();new(c("AsyncRequest"))(p).setMethod("POST").setData(o).send()};m.prototype.joinThroughPrivateLink=function(n){var o={link_hash:n},p=c("XMessagingGroupJoinThroughPrivateLinkController").getURIBuilder().getURI();new(c("AsyncRequest"))(p).setMethod("POST").setData(o).send()};m.prototype.chatJoinThroughHash=function(n){var o={link_hash:n},p=c("XGroupsJoinChatController").getURIBuilder().getURI();new(c("AsyncRequest"))(p).setMethod("POST").setData(o).setHandler(function(q){return c("ReloadPage").now()}).send()};m.prototype.inviteToJoinableGroup=function(n,o){var p={thread_fbid:n,user_ids:o},q=c("XMessagingGroupJoinableInviteController").getURIBuilder().getURI();new(c("AsyncRequest"))(q).setMethod("POST").setData(p).send()};m.prototype.acceptToJoinableGroup=function(n,o){var p={thread_fbid:n,user_id:o},q=c("XMessagingGroupJoinableAcceptController").getURIBuilder().getURI();new(c("AsyncRequest"))(q).setMethod("POST").setData(p).send()};m.prototype.rejectToJoinableGroup=function(n,o){var p={thread_fbid:n,user_id:o},q=c("XMessagingGroupJoinableRejectController").getURIBuilder().getURI();new(c("AsyncRequest"))(q).setMethod("POST").setData(p).send()};m.prototype.addParticipants=function(n,o){this.__dispatcher.handleUpdate(this.__constructClientPayload([n],c("MercuryActionType").ADD_PARTICIPANTS,c("MercuryPayloadSource").CLIENT_ADD_PARTICIPANTS,{participants:o}))};m.prototype.updateCustomLike=function(n,o){var p=c("XMercuryThreadLikeIconController").getURIBuilder().setString("emoji",o).getURI();new(c("AsyncRequest"))().setURI(p).setHandler(function(q){this.__dispatcher.handleUpdate(this.__constructClientPayload([n],c("MercuryActionType").UPDATE_CUSTOM_LIKE,c("MercuryPayloadSource").CLIENT_CHANGE_CUSTOM_LIKE,{custom_like:q.getPayload()}))}.bind(this)).send()};m.prototype.movePendingToInbox=function(n){this.__dispatcher.handleUpdate(this.__constructClientPayload([n],c("MercuryActionType").MOVE_PENDING_TO_INBOX,c("MercuryPayloadSource").CLIENT_MOVE_PENDING_TO_INBOX))};m.prototype.updateSnippet=function(n,o){this.__dispatcher.handleUpdate(this.__constructClientPayload([n],c("MercuryActionType").UPDATE_SNIPPET,c("MercuryPayloadSource").CLIENT_UPDATE_SNIPPET,{deleted_ids:o}))};m.prototype.updateCommStatus=function(n,o){this.__dispatcher.handleUpdate(this.$MercuryThreadActions6(n,o));var p=o===c("PageCommItemStatus").DONE;this.__dispatcher.handleUpdate(this.$MercuryThreadActions3(n,p))};m.prototype.updateCommItemOwner=function(n,o,p,q){this.__dispatcher.handleUpdate(this.$MercuryThreadActions7(n,o,p,q))};m.prototype.$MercuryThreadActions2=function(n,o,p){return this.__constructClientPayload(n,c("MercuryActionType").CHANGE_READ_STATUS,c("MercuryPayloadSource").CLIENT_CHANGE_READ_STATUS,{mark_as_read:o,source:p})};m.prototype.$MercuryThreadActions7=function(n,o,p,q){return this.__constructClientPayload(n,c("MercuryActionType").UPDATE_COMM_ITEM_OWNER,c("MercuryPayloadSource").UPDATE_COMM_ITEM_OWNER,{id:p,name:o,profile_pic_uri:q})};m.prototype.$MercuryThreadActions3=function(n,o){return this.__constructClientPayload(n,c("MercuryActionType").CHANGE_ARCHIVED_STATUS,c("MercuryPayloadSource").CLIENT_CHANGE_ARCHIVED_STATUS,{archived:o})};m.prototype.$MercuryThreadActions4=function(n,o){return this.__constructClientPayload(n,c("MercuryActionType").CHANGE_PAGE_FOLLOW_UP_STATUS,c("MercuryPayloadSource").CLIENT_CHANGE_PAGE_FOLLOW_UP_STATUS,{is_page_follow_up:o})};m.prototype.$MercuryThreadActions6=function(n,o){return this.__constructClientPayload(n,c("MercuryActionType").UPDATE_COMM_STATUS,c("MercuryPayloadSource").CLIENT_UPDATE_COMM_STATUS,{comm_status:o})};m.prototype.$MercuryThreadActions5=function(n,o){return this.__constructClientPayload(n,c("MercuryActionType").CHANGE_FOLDER,c("MercuryPayloadSource").CLIENT_CHANGE_FOLDER,{new_folder:o})};m.prototype.__constructClientPayload=function(n,o,p,q){return{actions:n.map(function(r){return babelHelpers["extends"]({action_type:o,thread_id:r},q)}),from_client:true,payload_source:p}};Object.assign(m,c("MercurySingletonMixin"));f.exports=m}),null);
__d("MessengerFluxReduceDispatcher",["ExplicitRegistrationReactDispatcher"],(function a(b,c,d,e,f,g){"use strict";var h,i;h=babelHelpers.inherits(j,c("ExplicitRegistrationReactDispatcher"));i=h&&h.prototype;function j(){h.apply(this,arguments)}f.exports=new j({strict:false})}),null);
__d("MNCommerceActionTypes",["keyMirrorRecursive"],(function a(b,c,d,e,f,g){"use strict";var h=c("keyMirrorRecursive")({RECEIPT:{LOADED:null,LOAD_ERROR:null,RELOAD:null},SHIPMENT:{LOADED:null,LOAD_ERROR:null,RELOAD:null},DIALOG:{SHOW:null,HIDE:null},RETAIL_ITEM:{LOADED:null,LOAD_ERROR:null,RELOAD:null},PROMOTION_STATE:{LOADED:null,LOAD_ERROR:null,RELOAD:null},TRANSACTION_INVOICE:{LOADED:null,LOAD_ERROR:null,RELOAD:null},BOT_REVIEW_STATE:{LOADED:null,LOAD_ERROR:null,RELOAD:null}});f.exports=h}),null);
__d("MessengerSharedMediaActions",["MessengerFluxReduceDispatcher","keyMirror"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h=c("keyMirror")({CURRENT_LOADED:null,DELETE_PHOTOS:null,LATEST_LOADED:null,LOAD_CURRENT:null,LOAD_MORE_LATEST:null,LOAD_MORE_PREVIOUS:null,PREVIOUS_LOADED:null}),i="MessengerSharedMedia",j={Types:h,Namespace:i,currentLoaded:function k(l){c("MessengerFluxReduceDispatcher").dispatch({type:h.CURRENT_LOADED,namespace:i,data:l})},deletePhotos:function k(l,m){c("MessengerFluxReduceDispatcher").dispatch({type:h.DELETE_PHOTOS,namespace:i,threadFBID:l,photoFBIDs:m})},loadCurrent:function k(l,m){c("MessengerFluxReduceDispatcher").dispatch({type:h.LOAD_CURRENT,namespace:i,threadFBID:l,photoID:m})},loadMorePrevious:function k(l,m,n){c("MessengerFluxReduceDispatcher").dispatch({type:h.LOAD_MORE_PREVIOUS,namespace:i,threadFBID:l,afterCursor:m,first:n})},loadMoreLatest:function k(l,m,n){c("MessengerFluxReduceDispatcher").dispatch({type:h.LOAD_MORE_LATEST,namespace:i,threadFBID:l,beforeCursor:m,last:n})},previousLoaded:function k(l){c("MessengerFluxReduceDispatcher").dispatch({type:h.PREVIOUS_LOADED,namespace:i,data:l})},latestLoaded:function k(l){c("MessengerFluxReduceDispatcher").dispatch({type:h.LATEST_LOADED,namespace:i,data:l})}};f.exports=j}),null);
__d("MercurySingletonProvider.bs",["bs_curry","CurrentUser"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();function h(i){__p&&__p();var j={},k=function k(m){var n=j[m];if(n!==undefined)return n;else{var o=c("bs_curry")._1(i[0],m);j[m]=o;return o}},l=function l(){return k(c("CurrentUser").getID())};return[k,l]}g.Provider=h}),null);
__d("MercuryRoger.bs",["bs_array","Utils.bs","Arbiter","JSLogger","immutable","bs_js_boolean","MercuryThreads","MercuryDispatcher","MercuryActionStatus","MercurySingletonProvider.bs"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();function h(m,n,o,p){__p&&__p();var q=+(n>=m.timestamp),r=m.status,s=1-p||+(o!==m.author);if(q!==0)if(r==null)if(s!==0)return 1;else return 0;else if(s!==0&&r===c("MercuryActionStatus").SUCCESS)return 1;else return 0;else return 0}function i(m){__p&&__p();var n=[{}],o=new(c("Arbiter"))(),p={__fbid:m,getSeenBy:function t(u,v){__p&&__p();var w=n,x=u,y=v;if(x==null)return[];else{var z=w[0][x.thread_id];if(z!==undefined)return z.reduce(function(A,B,C,D){if(h(x,B.watermark,C,c("Utils.bs").isTruthy(y)))return c("bs_array").append(A,[C]);else return A},[]);else return[]}},wasSeenByAll:function t(u){var v=n,w=u,x=v[0][w.thread_id];if(x!==undefined)return c("bs_js_boolean").to_js_boolean(x.reduce(function(y,z,A,B){if(y)return h(w,z.watermark,A,0);else return 0},1));else return false},getSeenTimestamp:function t(u,v){var w=n,x=u,y=v,z=w[0][x];if(z!==undefined){var A=z.get(y);if(A==null)return null;else return A}else return null},getSeenTimestamps:function t(u){var v=n,w=u,x=v[0][w];if(x!==undefined)return x;else return c("immutable").OrderedMap()},subscribe:function t(u,v){return o.subscribe(u,v)},mockInform:function t(u,v){o.inform(u,v);return 0}},q=[[]],r=c("MercuryDispatcher").getForFBID(m),s=c("MercuryThreads").getForFBID(m);r.subscribe("update-roger",function(t,u){__p&&__p();if(u==null)return 0;else{Object.keys(u).forEach(function(v){__p&&__p();var w=s.getThreadMetaNow(v);Object.keys(u[v]).forEach(function(y){__p&&__p();var x=n[0][v],z=x!==undefined?x:c("immutable").OrderedMap(),A=w==null?0:[w.participants],B=0;if(A)if(A[0].indexOf(y)===-1){q[0].push(z);return 0}else B=1;else B=1;if(B===1){var C=z.get(y),D=u[v][y],E=0;if(C==null)E=2;else if(D.watermark<=C.watermark)return 0;else E=2;if(E===2){n[0][v]=z.set(y,D);return 0}}});var x=n[0][v];if(x!==undefined){n[0][v]=x.sort(function(y,z){return y.watermark-z.watermark|0});return 0}else return 0});o.inform("change",u);return 0}});r.subscribe("invalidate-global-state",function(t,u){n[0]={};q[0]=[];return 0});c("Arbiter").subscribe(c("JSLogger").DUMP_EVENT,function(t,u){u.read_receipts={valid_receipts:n[0],bad_receipts:q[0]};return 0});return p}var j=c("MercurySingletonProvider.bs").Provider([i]),k=j[0],l=j[1];g.getForFBID=k;g.get=l}),null);
__d("MNCommerceDialogStateStore",["FluxStore","MessengerDispatcher","MNCommerceActionTypes"],(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("MessengerDispatcher"));this.$MNCommerceDialogStateStore1=null;this.$MNCommerceDialogStateStore2=null}j.prototype.__onDispatch=function(k){__p&&__p();var l=k.type;switch(l){case c("MNCommerceActionTypes").DIALOG.SHOW:this.$MNCommerceDialogStateStore1=k.dialogContainer;this.$MNCommerceDialogStateStore2=k.state;this.__emitChange();break;case c("MNCommerceActionTypes").DIALOG.HIDE:this.$MNCommerceDialogStateStore1=null;this.$MNCommerceDialogStateStore2=null;this.__emitChange();break}};j.prototype.getDialogContainer=function(){return this.$MNCommerceDialogStateStore1};j.prototype.getState=function(){return this.$MNCommerceDialogStateStore2};f.exports=new j()}),null);
__d("MercuryShareAttachmentRenderLocations",[],(function a(b,c,d,e,f,g){"use strict";var h={CHAT:"chat",CHAT_PREVIEW:"chat_preview",COMPOSER:"ufi_composer",MESSENGER:"messenger",PAGES_INBOX:"pages_inbox",getValues:function i(){return[h.CHAT,h.CHAT_PREVIEW,h.COMPOSER,h.MESSENGER,h.PAGES_INBOX]},isPreview:function i(j){return j===h.CHAT_PREVIEW}};f.exports=h}),null);
__d("MercuryMessages",["invariant","BanzaiODS","ChatReliabilityInstrumentation","EventEmitter","FBJSON","ImmutableObject","LogHistory","Map","MercuryActionStatus","MercuryActionType","MercuryAssert","MercuryAttachment","MercuryDispatcher","MercuryIDs","MercuryLogMessageType","MercuryMessageClientState","MercuryPayloadSource","MercurySingletonProvider","MercuryMessageActions","MercuryMessageIDs.bs","MessagingGiftWrapConstants","MessengerSharedMediaActions","RangedCallbackManager","MercurySendMessageFields","MercuryServerRequests","MercuryThreadActions","MercuryThreadInformer","MercuryThreads","URI","isMessengerDotComURI","setImmediate"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i=new(c("EventEmitter"))(),j=c("LogHistory").getInstance("mercury_messages");function k(p){switch(p){case c("MercuryPayloadSource").UNKNOWN:case c("MercuryPayloadSource").SERVER_INITIAL_DATA:case c("MercuryPayloadSource").SERVER_FETCH_THREAD_INFO:case c("MercuryPayloadSource").SERVER_THREAD_SYNC:return true}return false}l.getForFBID=function(p){return o.getForFBID(p)};l.get=function(){return o.get()};function l(p){__p&&__p();this.$MercuryMessages1=p;this.$MercuryMessages2=c("MercuryMessageActions").getForFBID(this.$MercuryMessages1);this.$MercuryMessages3=c("MercuryServerRequests").getForFBID(this.$MercuryMessages1);this.$MercuryMessages4=c("MercuryThreadInformer").getForFBID(this.$MercuryMessages1);this.$MercuryMessages5=c("MercuryThreads").getForFBID(this.$MercuryMessages1);this.$MercuryMessages6=c("MercuryThreadActions").getForFBID(this.$MercuryMessages1);this.$MercuryMessages7=c("MercuryDispatcher").getForFBID(this.$MercuryMessages1);this.$MercuryMessages8=false;this.$MercuryMessages9={};this.$MercuryMessages10={};this.$MercuryMessages11={};this.$MercuryMessages12=new(c("Map"))();this.$MercuryMessages13={};this.$MercuryMessages14={};this.$MercuryMessages7.subscribe("update-messages",function(q,r){__p&&__p();var s=(r.actions||[]).filter(function(u){var v=u.action_type,w=u.thread_id&&(v==c("MercuryActionType").LOG_MESSAGE||v==c("MercuryActionType").USER_GENERATED_MESSAGE||v==c("MercuryActionType").SEND_MESSAGE||v==c("MercuryActionType").DELETE_THREAD||v==c("MercuryActionType").DELETE_MESSAGES),x=u.upload_id&&u.upload_data&&(v==c("MercuryActionType").CANCEL_ATTACHMENT_PLACEHOLDER||v==c("MercuryActionType").CONFIRM_ATTACHMENT_PLACEHOLDER),y=v==c("MercuryActionType").REACTION_UPDATE,z=v==c("MercuryActionType").LIVE_LOCATION_UPDATE,A=u.replaced_message_id&&v==c("MercuryActionType").REPLACE_MESSAGE,B=u.unwrapped_message_id&&v==c("MercuryActionType").UNWRAP_MESSAGE;return w||x||y||z||A||B}),t=k(r.payload_source);this.handleUpdates(s,t,r.payload_source,r.from_client);if(r.end_of_history)this.$MercuryMessages15(r.end_of_history,r.payload_source);if(this.$MercuryMessages8){this.$MercuryMessages8=false;i.emit("change")}}.bind(this));this.$MercuryMessages7.subscribe("invalidate-thread-state",function(q,r){this.$MercuryMessages16(r)}.bind(this));this.$MercuryMessages7.subscribe("invalidate-global-state",function(){return this.invalidateGlobalState()}.bind(this));j.debug("constructed",JSON.stringify({fbid:this.$MercuryMessages1}))}l.prototype.getMessagesFromIDs=function(p){return(p||[]).map(function(q){return this.$MercuryMessages17(q)}.bind(this)).filter(function(q){return q})};l.prototype.getServerMessageID=function(p){var q=p;if(this.$MercuryMessages13[p])q=this.$MercuryMessages13[p];return q};l.prototype.hasLoadedNMessages=function(p,q){var r=this.$MercuryMessages18(p);return r.hasReachedEndOfArray()||r.getCurrentArraySize()>=q};l.prototype.hasLoadedExactlyNMessages=function(p,q){var r=this.$MercuryMessages18(p);return r.getCurrentArraySize()==q};l.prototype.invalidateGlobalState=function(){var p=Object.keys(this.$MercuryMessages10);this.$MercuryMessages9={};this.$MercuryMessages10={};this.$MercuryMessages11={};this.$MercuryMessages12=new(c("Map"))();this.$MercuryMessages13={};p.map(function(q){return this.$MercuryMessages4.invalidatedThread(q)}.bind(this))};l.prototype.getThreadMessagesRange=function(p,q,r,s,t,u){var v=this.$MercuryMessages18(p),w=function(G){s(this.$MercuryMessages19(G))}.bind(this),x=v.executeOrEnqueue(q,r,w),y=v.getUnavailableResources(x),z=this.$MercuryMessages9[p];if(y.length&&!z){var A=v.getCurrentArraySize(),B=this.$MercuryMessages11[p]||0,C=A-B,D=y.length+B,E=this.getCurrentlyLoadedMessages(p),F=E.length?E[0].timestamp:null;this.$MercuryMessages3.fetchThreadMessages(p,C,D,F,t,u)}else this.$MercuryMessages9[p]=false;return x};l.prototype.getThreadMessagesRangeNow=function(p,q,r){var s=this.$MercuryMessages18(p),t=[];for(var u=q;u<q+r;u++){var v=s.getResourceAtIndex(u),w=v&&this.$MercuryMessages17(v);w&&t.push(w)}return t};l.prototype.getThreadMessagesSinceTimestamp=function(p,q){var r=this.$MercuryMessages18(p),s=r.getElementsUntil(q);return this.$MercuryMessages19(s)};l.prototype.hasLoadedAllMessages=function(p){return this.$MercuryMessages18(p).hasReachedEndOfArray()};l.prototype.getCurrentlyLoadedMessages=function(p){var q=this.$MercuryMessages18(p).getAllResources();return this.$MercuryMessages19(q)};l.prototype.unsubscribe=function(p,q){c("MercuryAssert").isThreadID(q);var r=this.$MercuryMessages18(q);r.unsubscribe(p)};l.prototype.$MercuryMessages20=function(p,q){n(q);this.$MercuryMessages12.set(p,new(c("ImmutableObject"))(q))};l.prototype.$MercuryMessages21=function(p,q){__p&&__p();var r=this.$MercuryMessages12.get(p);if(r){var s=r.page_admin_notes?r.page_admin_notes.slice():[],t=false,u=true;for(var v=0;v<s.length;++v)if(s[v].id===q.id){t=true;u=false;break}else if((s[v].id===null||s[v].id===undefined)&&s[v].body===q.body){t=true;s[v]=q}if(!t)s.push(q);if(u){var w={};w.page_admin_notes=s;this.$MercuryMessages22(p,r,w)}}};l.prototype.$MercuryMessages22=function(p,q,r){var s=c("ImmutableObject").set(q,r);this.$MercuryMessages12.set(p,s);return s};l.prototype.$MercuryMessages23=function(p,q,r){__p&&__p();if(p==c("MercuryPayloadSource").CLIENT_CHANNEL_MESSAGE){var s=this.getThreadMessagesSinceTimestamp(q,r);if(s.length>0){c("BanzaiODS").bumpEntityKey("chat.web","channel.messages_reordered");return true}}else if(p===c("MercuryPayloadSource").SERVER_INVALIDATE_THREAD_STATE||p===c("MercuryPayloadSource").SERVER_INVALIDATE_GLOBAL_STATE)return true;return false};l.prototype.$MercuryMessages24=function(p,q){__p&&__p();var r=p.action_type;if(q==c("MercuryPayloadSource").CLIENT_CHANNEL_MESSAGE&&r==c("MercuryActionType").USER_GENERATED_MESSAGE&&p.offline_threading_id&&this.$MercuryMessages13[p.offline_threading_id]===p.offline_threading_id){p.client_message_id=p.offline_threading_id;p.status=c("MercuryActionStatus").SUCCESS;p.action_type=c("MercuryActionType").SEND_MESSAGE;r=p.action_type}if(q===c("MercuryPayloadSource").CLIENT_CHANNEL_MESSAGE&&r==c("MercuryActionType").USER_GENERATED_MESSAGE){var s=this.$MercuryMessages5.getThreadMetaNow(p.thread_id);if(s&&s.folder)p.folder=s.folder;c("ChatReliabilityInstrumentation").logMESSAGE_RECEIVED(c("FBJSON").stringify({otid:p.offline_threading_id,message_id:p.message_id,other_user_fbid:p.other_user_fbid,viewer_page_fbid:!s||!s.page_thread_info?null:s.page_thread_info.pageID}))}return p};l.prototype.handleUpdates=function(p,q,r,s){__p&&__p();var t=void 0,u={};for(var v=0;v<p.length;v++){var w=this.$MercuryMessages24(p[v],r),x=w.action_type,y=w.message_id?this.$MercuryMessages17(w.message_id):null;if(x==c("MercuryActionType").LOG_MESSAGE)if(this.isLocalMessage(w))continue;if(r==c("MercuryPayloadSource").SERVER_SEARCH){if(!this.$MercuryMessages12.has(w.message_id))this.$MercuryMessages20(w.message_id,w);continue}else if(w.client_state===c("MercuryMessageClientState").SEND_TO_SERVER){this.$MercuryMessages20(w.message_id,w);continue}else if(x==c("MercuryActionType").SEND_MESSAGE){var z=w.client_message_id,A=this.$MercuryMessages17(z);if(z&&A&&w.status){var B=A.status;if(A.status==c("MercuryActionStatus").SUCCESS)continue;if(!u[w.thread_id])u[w.thread_id]=[];this.$MercuryMessages25(w);if(typeof B!==undefined||w.status==c("MercuryActionStatus").FAILED_UNKNOWN_REASON||w.status==c("MercuryActionStatus").UNABLE_TO_CONFIRM||w.status==c("MercuryActionStatus").SUCCESS||w.status==c("MercuryActionStatus").ERROR){var C=this.$MercuryMessages17(z);if(C)this.$MercuryMessages26(w.thread_id,C.message_id,r)}}continue}else if(x==c("MercuryActionType").DELETE_THREAD){this.$MercuryMessages18(w.thread_id).removeAllResources();continue}else if(x==c("MercuryActionType").DELETE_MESSAGES){this.$MercuryMessages27(w.thread_id,w.message_ids,r);c("setImmediate")(function(){this.$MercuryMessages6.updateSnippet(w.thread_id,w.message_ids)}.bind(this));continue}else if(x===c("MercuryActionType").REACTION_UPDATE){if(this.$MercuryMessages28(w))this.$MercuryMessages29(u,w,r);continue}else if(x===c("MercuryActionType").LIVE_LOCATION_UPDATE){if(this.$MercuryMessages30(w))this.$MercuryMessages29(u,w,r);continue}else if(x==c("MercuryActionType").REPLACE_MESSAGE){if(this.$MercuryMessages31(w)){this.$MercuryMessages29(u,w,r);q=true}continue}else if(w.offline_threading_id&&this.$MercuryMessages13[w.offline_threading_id]&&(r!=c("MercuryPayloadSource").SERVER_FETCH_THREAD_INFO||this.$MercuryMessages13[w.offline_threading_id]===w.message_id)||y){if(y&&w.ranges&&w.ranges.length>0){var D=y.message_id;this.$MercuryMessages22(this.$MercuryMessages13[D]||D,y,{ranges:w.ranges});this.$MercuryMessages26(y.thread_id,y.message_id,"link_shim")}continue}else if(x===c("MercuryActionType").CONFIRM_ATTACHMENT_PLACEHOLDER){this.$MercuryMessages32(w.upload_id,w.upload_data);continue}else if(x===c("MercuryActionType").CANCEL_ATTACHMENT_PLACEHOLDER){this.$MercuryMessages33(w.upload_id,w.upload_data);continue}else if(x==c("MercuryActionType").UNWRAP_MESSAGE){if(this.$MercuryMessages34(w))this.$MercuryMessages26(w.thread_id,w.unwrapped_message_id,r)}else{if(r===c("MercuryPayloadSource").CLIENT_SEND_MESSAGE){this.$MercuryMessages13[w.message_id]=w.message_id;if(w.thread_id=="root:"+w.offline_threading_id)this.$MercuryMessages18(w.thread_id).setReachedEndOfArray()}if(x==c("MercuryActionType").LOG_MESSAGE&&w.log_message_type==c("MercuryLogMessageType").SERVER_ERROR)this.$MercuryMessages9[w.thread_id]=true;if(w.client_state===c("MercuryMessageClientState").DO_NOT_SEND_TO_SERVER&&w.upload_id)this.$MercuryMessages14[w.upload_id]=w;if(!u[w.thread_id])u[w.thread_id]=[];u[w.thread_id].push(w.message_id);this.$MercuryMessages20(w.message_id,w);if(w.offline_threading_id&&w.offline_threading_id!=w.message_id){this.$MercuryMessages13[w.offline_threading_id]=w.message_id;c("MercuryMessageIDs.bs").addServerID(w.offline_threading_id,w.message_id);if(w.threading_id)c("MercuryMessageIDs.bs").addServerID(w.threading_id,w.message_id)}if(w[c("MercurySendMessageFields").MANUAL_RETRY_CNT]>0){t=this.$MercuryMessages18(w.thread_id);t.resortResources([w.message_id]);this.$MercuryMessages35(w.thread_id,c("MercuryPayloadSource").CLIENT_SEND_MESSAGE)}q=q||this.$MercuryMessages23(r,w.thread_id,w.timestamp);if(!q){var E=this.$MercuryMessages17(w.message_id);if(E)this.$MercuryMessages36(E)}continue}}for(var F in u){t=this.$MercuryMessages18(F);var G=t.getAllResources(),H=G.filter(function(D){var I=this.$MercuryMessages12.get(D);if(!I)return true;return I.action_type==c("MercuryActionType").LOG_MESSAGE&&I.log_message_type==c("MercuryLogMessageType").SERVER_ERROR}.bind(this));t.removeResources(H);if(s)this.$MercuryMessages37(F,u[F]);if(q){t.addResources(u[F]);this.$MercuryMessages35(F,r)}else t.addResourcesWithoutSorting(u[F].reverse(),0);this.$MercuryMessages4.updatedThread(F)}};l.prototype.$MercuryMessages29=function(p,q,r){if(!p[q.thread_id])p[q.thread_id]=[];this.$MercuryMessages18(q.thread_id).removeResources([q.replaced_message_id,q.offline_threading_id]);if(q.action_type!==c("MercuryActionType").REACTION_UPDATE&&q.action_type!==c("MercuryActionType").LIVE_LOCATION_UPDATE)p[q.thread_id].push(q.message_id);if(q.replaced_message_id)this.$MercuryMessages26(q.thread_id,q.replaced_message_id,r);this.$MercuryMessages26(q.thread_id,q.message_id||q.messageId,r)};l.prototype.isFirstMessage=function(p){var q=this.$MercuryMessages18(p.thread_id);if(q.getCurrentArraySize()===0)return false;var r=q.getResourceAtIndex(q.getCurrentArraySize()-1),s=this.$MercuryMessages17(r),t=s&&s.message_id,u=this.$MercuryMessages17(p.message_id),v=u&&u.message_id;if(!t||!v)return false;return q.hasReachedEndOfArray()&&t==v};l.prototype.isLocalMessage=function(p){if(p.offline_threading_id!==null&&p.offline_threading_id===p.message_id)return true;return false};l.prototype.$MercuryMessages27=function(p,q,r){__p&&__p();if(!q.length)return;this.$MercuryMessages38(p,q,r);if(r!==c("MercuryPayloadSource").CLIENT_CHANNEL_MESSAGE)this.$MercuryMessages3.deleteMessages(p,q);var s=this.$MercuryMessages19(q);for(var t=0;t<s.length;t++){var u=s[t];if(u&&u.has_attachment){var v=u.attachments.map(function(w){if(c("MercuryAttachment").isPhotoAttachment(w)||c("MercuryAttachment").isVideoAttachment(w))return w.metadata.fbid;return null}).filter(function(w){return w!==null});c("MessengerSharedMediaActions").deletePhotos(c("MercuryIDs").getThreadFBIDFromThreadID(u.thread_id),v)}}};l.prototype.$MercuryMessages38=function(p,q,r){var s=q.map(function(u){var v=this.$MercuryMessages17(u);return v&&v.message_id}.bind(this)).filter(function(u){return!!u}),t=this.$MercuryMessages18(p);t.removeResources(s);this.$MercuryMessages35(p,r)};l.prototype.$MercuryMessages25=function(p){__p&&__p();var q=p.client_message_id;if(!q)return false;var r=this.$MercuryMessages17(q);if(!r)return false;var s={};s.status=p.status;if(p.status===c("MercuryActionStatus").SUCCESS||p.error_data)s.error_data=p.error_data;var t=p.message_id;if(this.$MercuryMessages12.has(t)){if(r)this.$MercuryMessages22(t,r,s);return false}if(p.threading_id)s.threading_id=p.threading_id;if(p.timestamp)s.timestamp=p.timestamp;if(p.log_message_data)s.log_message_data=p.log_message_data;if(p.ranges&&p.ranges.length){n(p);s.ranges=p.ranges}if(p.attachments&&p.attachments.length){s.raw_attachments=null;s.attachments=p.attachments}this.$MercuryMessages13[q]=t;c("MercuryMessageIDs.bs").addServerID(q,t);if(r){var u=this.$MercuryMessages22(t,r,s);this.$MercuryMessages12.set(q,new(c("ImmutableObject"))());if(m(u))this.$MercuryMessages11[u.thread_id]--}return true};l.prototype.$MercuryMessages28=function(p){var q,r=p.messageId,s=p.reaction,t=p.userId,u=this.$MercuryMessages17(r);if(!u)return false;var v=babelHelpers["extends"]({},u.reactions,(q={},q[t]=s,q));if(!s)delete v[t];this.$MercuryMessages22(r,u,{reactions:v});return true};l.prototype.$MercuryMessages30=function(p){__p&&__p();var q=p.messageId,r=p.liveLocation,s=this.$MercuryMessages17(q);if(!s||!s.attachments||s.attachments.length!==1)return false;var t=s.attachments[0];if(!t||!t.share)return false;var u=t.share.target;if(!u||!u.live_location_id)return false;var v=babelHelpers["extends"]({},t,{share:babelHelpers["extends"]({},t.share,{target:babelHelpers["extends"]({},r,{live_location_id:u.live_location_id})})});this.$MercuryMessages22(q,s,{attachments:[v]});return true};l.prototype.$MercuryMessages31=function(p){__p&&__p();var q=p.replaced_message_id;if(!q)return false;var r=this.$MercuryMessages17(q);if(!r)return false;var s=p.message_id,t={};if(p.status)t.status=p.status;if(p.timestamp&&s!==q)t.timestamp=p.timestamp;if(p.log_message_data)t.log_message_data=p.log_message_data;if(p.ranges&&p.ranges.length){n(p);t.ranges=p.ranges}if(p.meta_ranges)t.meta_ranges=p.meta_ranges;if(p.attachments&&p.attachments.length){t.raw_attachments=null;t.attachments=p.attachments}if(p.body&&p.body!==r.body)t.body=p.body;if(p.platform_xmd&&p.platform_xmd!==r.platform_xmd)t.platform_xmd=p.platform_xmd;if(p.profile_ranges&&p.profile_ranges!==r.profile_ranges)t.profile_ranges=p.profile_ranges;if(Object.keys(t).length===0)return false;c("MercuryMessageIDs.bs").addServerID(s,s);this.$MercuryMessages22(s,r,t);if(q!==s){this.$MercuryMessages12["delete"](q);if(r.message_id&&this.$MercuryMessages12.has(r.message_id))this.$MercuryMessages12["delete"](r.message_id)}return true};l.prototype.$MercuryMessages34=function(p){var q=this.$MercuryMessages17(p.unwrapped_message_id);if(!q||!q.tags)return false;var r=q.tags.slice(0);r.push(c("MessagingGiftWrapConstants").UNWRAPPED_TAG);var s={tags:r};this.$MercuryMessages22(p.unwrapped_message_id,q,s);return true};l.prototype.getNumberLocalMessages=function(p){return this.$MercuryMessages11[p]||0};l.prototype.$MercuryMessages32=function(p,q){var r=this.$MercuryMessages39(p,q);delete r.preview_attachments;this.$MercuryMessages3.sendNewMessage(r)};l.prototype.$MercuryMessages33=function(p,q){var r=this.$MercuryMessages39(p,q);this.$MercuryMessages38(r.thread_id,[r.message_id]);if(this.$MercuryMessages11[r.thread_id])this.$MercuryMessages11[r.thread_id]--};l.prototype.$MercuryMessages39=function(p,q){__p&&__p();var r=this.$MercuryMessages14[p];r||h(0);r.image_ids=q.image_ids;r.file_ids=q.file_ids;r.audio_ids=q.audio_ids;r.gif_ids=q.gif_ids;r.video_ids=q.video_ids;r.client_state=c("MercuryMessageClientState").SEND_TO_SERVER;delete this.$MercuryMessages14[p];return r};l.prototype.$MercuryMessages26=function(p,q,r){this.$MercuryMessages8=true;this.$MercuryMessages4.updatedMessage(p,q,r)};l.prototype.$MercuryMessages36=function(p){this.$MercuryMessages8=true;this.$MercuryMessages4.receivedMessage(p)};l.prototype.$MercuryMessages35=function(p,q){this.$MercuryMessages8=true;this.$MercuryMessages4.reorderedMessages(p,q)};l.prototype.$MercuryMessages16=function(p){__p&&__p();if(!this.$MercuryMessages10[p])return;var q=this.$MercuryMessages10[p].getAllResources();q.forEach(function(r){__p&&__p();var s=this.$MercuryMessages17(r),t=undefined;if(s)t=s.offline_threading_id;this.$MercuryMessages12["delete"](r);if(t){var u=this.$MercuryMessages13[t];if(u)this.$MercuryMessages12["delete"](u);delete this.$MercuryMessages13[t]}delete this.$MercuryMessages13[r]}.bind(this));delete this.$MercuryMessages10[p]};l.addListener=function(p,q){return i.addListener(p,q)};l.prototype.$MercuryMessages17=function(p){var q=p;if(this.$MercuryMessages13[p])q=this.$MercuryMessages13[p];return this.$MercuryMessages12.get(q)};l.prototype.$MercuryMessages18=function(p){if(!this.$MercuryMessages10[p])this.$MercuryMessages10[p]=new(c("RangedCallbackManager"))(function(q){var r=this.$MercuryMessages17(q);return r&&r.timestamp}.bind(this),function(q,r){return r-q});return this.$MercuryMessages10[p]};l.prototype.$MercuryMessages15=function(p,q){p.forEach(function(r){var s=this.$MercuryMessages18(r);s.setReachedEndOfArray();this.$MercuryMessages35(r,q)}.bind(this))};l.prototype.$MercuryMessages19=function(p){var q=p.reduce(function(r,s){var t=this.$MercuryMessages17(s);if(t)r.push(t);return r}.bind(this),[]);return q.reverse()};l.prototype.$MercuryMessages37=function(p,q){var r=q.filter(function(s){return m(this.$MercuryMessages17(s))}.bind(this));if(!this.$MercuryMessages11[p])this.$MercuryMessages11[p]=0;this.$MercuryMessages11[p]+=r.length};function m(p){var q=p.action_type;if(q==c("MercuryActionType").USER_GENERATED_MESSAGE)return true;switch(p.log_message_type){case c("MercuryLogMessageType").SUBSCRIBE:case c("MercuryLogMessageType").UNSUBSCRIBE:case c("MercuryLogMessageType").SERVER_ERROR:case c("MercuryLogMessageType").LIVE_LISTEN:return false;default:return true}}function n(p){__p&&__p();if(!p.ranges)return;p.ranges.forEach(function(q){if(!q.entity||q.entity.external||!q.entity.url)return;var r=new(c("URI"))(q.entity.url);if(c("isMessengerDotComURI")(c("URI").getRequestURI())&&!r.getDomain()){r.setProtocol("https").setDomain("www.facebook.com");q.entity.url=r.toString()}})}var o=new(c("MercurySingletonProvider"))(l);f.exports=l}),null);
__d("MercuryDelayedRoger",["ArbiterMixin","LiveTimer","MercuryActionStatus","MercuryConfig","MercuryMessages","MercuryRoger.bs","MercurySingletonProvider","MercuryThreadInformer","MercuryThreads","mixin","setTimeoutAcrossTransitions"],(function a(b,c,d,e,f,g){__p&&__p();var h,i,j=c("MercuryConfig")["roger.seen_delay"];h=babelHelpers.inherits(k,c("mixin")(c("ArbiterMixin")));i=h&&h.prototype;k.getForFBID=function(m){"use strict";return l.getForFBID(m)};k.get=function(){"use strict";return l.get()};function k(m){"use strict";__p&&__p();i.constructor.call(this);this.$MercuryDelayedRoger9=function(event,n){var o={};for(var p in n)if(this.$MercuryDelayedRoger11(p))o[p]=true;Object.keys(o).forEach(function(q){return this.$MercuryDelayedRoger12(o)}.bind(this))}.bind(this);this.$MercuryDelayedRoger1=m;this.$MercuryDelayedRoger2=c("MercuryRoger.bs").getForFBID(m);this.$MercuryDelayedRoger4={};this.$MercuryDelayedRoger5={};this.$MercuryDelayedRoger2.subscribe("change",function(n,o){for(var p in o)!this.$MercuryDelayedRoger5[p]&&this.$MercuryDelayedRoger8(p)}.bind(this));this.$MercuryDelayedRoger3=c("MercuryThreadInformer").getForFBID(m);this.$MercuryDelayedRoger6=c("MercuryMessages").getForFBID(m);this.$MercuryDelayedRoger7=c("MercuryThreads").getForFBID(m);this.$MercuryDelayedRoger3.subscribe("messages-received",this.$MercuryDelayedRoger9);this.$MercuryDelayedRoger3.subscribe("messages-reordered",this.$MercuryDelayedRoger9);this.$MercuryDelayedRoger3.subscribe("messages-updated",this.$MercuryDelayedRoger9)}k.prototype.getSeenBy=function(m,n){"use strict";if(this.$MercuryDelayedRoger5[m])return[];return this.$MercuryDelayedRoger2.getSeenBy(this.$MercuryDelayedRoger10(m),n)};k.prototype.wasSeenByAll=function(m){"use strict";if(this.$MercuryDelayedRoger5[m])return false;return this.$MercuryDelayedRoger2.wasSeenByAll(this.$MercuryDelayedRoger10(m))};k.prototype.$MercuryDelayedRoger10=function(m){"use strict";if(!this.$MercuryDelayedRoger4[m]){var n=this.$MercuryDelayedRoger7.getThreadMetaNow(m);if(n)this.$MercuryDelayedRoger4[m]={thread_id:m,author:n.participants[0],timestamp:n.timestamp}}return this.$MercuryDelayedRoger4[m]};k.prototype.$MercuryDelayedRoger11=function(m){"use strict";__p&&__p();var n=false;this.$MercuryDelayedRoger6.getThreadMessagesRange(m,0,1,function(o){__p&&__p();var p=o[0];if(!p)return;var q=p.timestamp;if(p.status===c("MercuryActionStatus").SUCCESS)q-=c("LiveTimer").getServerTimeOffset();var r=this.getSeenBy(m);if(this.$MercuryDelayedRoger5[m]){clearTimeout(this.$MercuryDelayedRoger5[m]);delete this.$MercuryDelayedRoger5[m]}var s=q+j,t=s-Date.now();if(t>0)this.$MercuryDelayedRoger5[m]=c("setTimeoutAcrossTransitions")(function(){delete this.$MercuryDelayedRoger5[m];this.$MercuryDelayedRoger8(m)}.bind(this),t);this.$MercuryDelayedRoger4[m]=p;var u=this.getSeenBy(m);if(r.length||u.length)n=true}.bind(this));return n};k.prototype.$MercuryDelayedRoger8=function(m){"use strict";var n={};n[m]=true;this.$MercuryDelayedRoger12(n)};k.prototype.$MercuryDelayedRoger12=function(m){"use strict";this.inform("state-changed",m);this.inform("change")};var l=new(c("MercurySingletonProvider"))(k);f.exports=k}),null);
__d("getPageIDFromThreadID",["FBIDCheck","MercuryIDs"],(function a(b,c,d,e,f,g){"use strict";function h(i){var j=c("MercuryIDs").getUserIDFromThreadID(i);if(!j||c("FBIDCheck").isUser_deprecated(j))return null;return j}f.exports=h}),null);
__d("P2PActionConstants",[],(function a(b,c,d,e,f,g){"use strict";var h=Object.freeze({CREDIT_CARDS_UPDATED:"credit_cards_updated",CREDIT_CARDS_UPDATED_ERROR:"credit_cards_updated_error",CHANNEL_EVENTS_ALLOWED:"channel_events_allowed",CHANNEL_EVENTS_IGNORED:"channel_events_ignored",CREDIT_CARD_SAVING:"credit_card_saving",CREDIT_CARD_ADDED:"credit_card_added",CREDIT_CARD_ADDED_ERROR:"credit_card_added_error",CREDIT_CARD_ADDED_ERROR_CLEARED:"credit_card_added_error_cleared",CREDIT_CARD_DELETED:"credit_card_deleted",CREDIT_CARD_DELETED_ERROR:"credit_card_deleted_error",CREDIT_CARD_UPDATED:"credit_card_updated",CREDIT_CARD_UPDATED_ERROR:"credit_card_updated_error",PRESET_CREDIT_CARD_UPDATED:"preset_credit_card_updated",PRESET_CREDIT_CARD_UPDATED_ERROR:"preset_credit_card_updated_error",CREDIT_CARD_VERIFIED:"credit_card_verified",CREDIT_CARD_VERIFIED_ERROR:"credit_card_verified_error",PAYMENT_METHODS_UPDATED:"payment_methods_updated",PAYMENT_METHODS_UPDATED_ERROR:"payment_methods_updated_error",TRANSFERS_UPDATED:"transfers_updated",TRANSFERS_UPDATED_ERROR:"transfers_updated_error",NUX_TRANSFERS_UPDATED:"nux_transfers_updated",TRANSFER_ADDED:"transfer_added",TRANSFER_ADDED_ERROR:"transfer_added_error",TRANSFER_UPDATED:"transfer_updated",TRANSFER_UPDATED_ERROR:"transfer_updated_error",TRANSFER_ACCEPTED:"transfer_accepted",TRANSFER_DECLINED:"transfer_declined",CHAT_SEND_VIEW_OPENED:"chat_send_view_opened",CHAT_SEND_VIEW_CLOSED:"chat_send_view_closed",BIN_NUMBER_VALIDATED:"bin_number_validated",BIN_NUMBER_VALIDATED_ERROR:"bin_number_validated_error",USER_ELIGIBILITY_UDPATED:"user_eligibility_updated",FRIENDS_LIST_UPDATED:"friends_list_updated",DIALOG_SHOWN:"dialog_shown",DIALOG_CLOSED:"dialog_closed",BANNER_STATES_UPDATED:"banner_states_updated",BANNER_DISMISSED:"banner_dismissed",BANNER_VIEWED:"banner_viewed",BANNER_COMPLETED:"banner_completed",MONEYPENNY_TRANSFER_CREATED:"moneypenny_transfer_created",MONEYPENNY_TRANSFER_CREATED_ERROR:"moneypenny_transfer_created_error",PLATFORM_CONTEXT_ADDED:"platform_context_added",PLATFORM_CONTEXT_ADDED_ERROR:"platform_context_added_error",PLATFORM_CONTEXT_SAVE_ERRORS_CLEARED:"platform_context_save_errors_cleared",PLATFORM_CONTEXT_BANNER_DISMISSED:"platform_context_banner_dismissed",PLATFORM_CONTEXT_PRODUCT_ITEM_SOLD:"platform_context_product_item_sold",PLATFORM_CONTEXT_CHANGED:"platform_context_changed",EXTENSIVE_TRANSFER_DETAILS_UPDATED:"extensive_transfer_details_updated",ADDRESS_SAVING:"address_saving",ADDRESSES_UPDATED:"addresses_updated",ADDRESS_ADDED:"address_added",ADDRESS_ADDED_ERROR:"address_added_error",ADDRESS_ADDED_ERROR_CLEARED:"address_added_error_cleared",CHECKOUT_CART_INITIATED:"checkout_cart_initiated",CHECKOUT_CART_CREATED:"checkout_cart_created",CHECKOUT_SHIPPING_OPTION_SELECTED:"checkout_shipping_option_selected",CHECKOUT_ADDRESS_SELECTED:"checkout_address_selected",CHECKOUT_CREDIT_CARD_SELECTED:"checkout_credit_card_selected",CHECKOUT_ADDRESS_FORM_TOGGLED:"checkout_address_form_toggled",CHECKOUT_CREDIT_CARD_FORM_TOGGLED:"checkout_credit_card_form_toggled",CHECKOUT_ADDRESS_EDIT_OPTIONS_TOGGLED:"checkout_address_options_toggled",CHECKOUT_CREDIT_CARD_EDIT_OPTIONS_TOGGLED:"checkout_credit_card_edit_options_toggled",CHECKOUT_PAYMENT_METHOD_EDIT_OPTIONS_TOGGLED:"checkout_payment_edit_options_toggled",CHECKOUT_PAYMENT_METHOD_SELECTED:"checkout_payment_method_selected",CHECKOUT_PAYMENT_METHOD_CONFIGURED:"checkout_payment_method_configured",CHECKOUT_PAYMENT_METHOD_CONFIRMED:"checkout_payment_method_confirmed",CHECKOUT_ADDRESS_FORM_VALIDATED:"checkout_address_form_validated",CHECKOUT_CREDIT_CARD_FORM_VALIDATED:"checkout_credit_card_form_validated",CHECKOUT_EDIT_COMPLETED:"checkout_completed",CHECKOUT_PROCESSING:"checkout_processing",CHECKOUT_BUYER_PROFILE_UPDATED:"checkout_buyer_profile_updated",CHECKOUT_MANUAL_PAYMENT_RECEIPT_UPDATED:"checkout_manual_payment_receipt_updated",PAYMENT_REQUEST_INITIATED:"payment_request_initiated",PAYMENT_REQUEST_INITIATED_COMPLETE:"payment_request_initiated_completed",PAYMENT_REQUEST_CREATED:"payment_request_created",PAYMENT_REQUEST_CREATED_ERROR:"payment_request_created_error",PAYMENT_REQUEST_UPDATED:"payment_request_updated",PAYMENT_REQUEST_DECLINE_INITIATED:"payment_request_decline_initiated",PAYMENT_REQUEST_DECLINED:"payment_request_declined",PAYMENT_REQUEST_DECLINE_ERROR:"payment_request_decline_error",PAYMENT_REQUESTS_FETCHED:"payment_requests_fetched",PAYMENT_REQUEST_CANCEL_INITIATED:"payment_request_cancel_initiated",PAYMENT_REQUEST_CANCELED:"payment_request_canceled",PAYMENT_REQUEST_CANCEL_ERROR:"payment_request_cancel_error"});f.exports=h}),null);
__d("P2PDispatcher",["ExplicitRegistrationReactDispatcher"],(function a(b,c,d,e,f,g){"use strict";var h,i;h=babelHelpers.inherits(j,c("ExplicitRegistrationReactDispatcher"));i=h&&h.prototype;function j(k){i.constructor.call(this,k);this.dispatch=this.dispatch.bind(this)}f.exports=new j({strict:false})}),null);
__d("PureStoreBasedStateMixin",["invariant","FluxMixinLegacyInstrumentation","StoreBasedStateMixinHelper","setImmediate"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i=function(){__p&&__p();for(var j=arguments.length,k=Array(j),l=0;l<j;l++)k[l]=arguments[l];return c("FluxMixinLegacyInstrumentation").addInstrumentation({_callCalculateState:function m(){return this.constructor.calculateState()},getInitialState:function m(){return this._callCalculateState()},componentWillMount:function m(){__p&&__p();this.constructor.calculateState||h(0);this._recalculateStateID=null;var n=function(){if(this.isMounted())this.setState(this._callCalculateState());this._recalculateStateID=null}.bind(this);this._mixin=new(c("StoreBasedStateMixinHelper"))(k);this._mixin.subscribeCallback(function(){if(this._recalculateStateID===null)this._recalculateStateID=c("setImmediate")(n)}.bind(this))},componentWillUnmount:function m(){this._mixin.release();this._mixin=null}})}.bind(this);f.exports=i}),null);
__d("FBPaymentsDispatcher",["ExplicitRegistrationReactDispatcher"],(function a(b,c,d,e,f,g){"use strict";var h,i;h=babelHelpers.inherits(j,c("ExplicitRegistrationReactDispatcher"));i=h&&h.prototype;function j(k){i.constructor.call(this,k);this.dispatch=this.dispatch.bind(this)}f.exports=new j({strict:false})}),null);
__d("FBPaymentsDialogActions",["FBPaymentsDispatcher","keyMirror"],(function a(b,c,d,e,f,g){"use strict";var h={types:c("keyMirror")({SHOW_DIALOG:null,HIDE_DIALOG:null}),showDialog:function i(j,k){c("FBPaymentsDispatcher").dispatch({type:h.types.SHOW_DIALOG,data:{dialogClass:j,dialogProps:k}})},hideDialog:function i(){c("FBPaymentsDispatcher").dispatch({type:h.types.HIDE_DIALOG,data:{}})}};f.exports=h}),null);
__d("MercuryTimePassed",[],(function a(b,c,d,e,f,g){f.exports=Object.freeze({TODAY:0,WEEK_AGO:1,MONTH_AGO:2,CURRENT_YEAR:3,OTHER_YEAR:4})}),null);
__d("MessagingThreadType",[],(function a(b,c,d,e,f,g){f.exports=Object.freeze({ONE_TO_ONE:1,GROUP:2,ROOM:3,MONTAGE:4,MARKETPLACE:5})}),null);
__d("RTCCallState",[],(function a(b,c,d,e,f,g){f.exports=Object.freeze({NO_ONGOING_CALL:"NO_ONGOING_CALL",AUDIO_GROUP_CALL:"AUDIO_GROUP_CALL",VIDEO_GROUP_CALL:"VIDEO_GROUP_CALL"})}),null);
__d("MercuryTimestamp",["fbt","MercuryTimePassed","formatDate"],(function a(b,c,d,e,f,g,h){__p&&__p();var i=864e5,j=6*i,k={getFormatedTimestamp:function l(m){var n=m/1e3;return k.getFormattedTimestampByBucket(n,this.getTimeBucket(m))},getAbsoluteTimestamp:function l(m){if(m==null)return null;else{var n=k.getFormatedTimestamp(m);return n.absolute}},getRelativeTimestamp:function l(m){var n=k.getFormatedTimestamp(m);return n.relative},getFormattedTimestampByBucket:function l(m,n){switch(n){case c("MercuryTimePassed").TODAY:return{absolute:h._("Today"),relative:c("formatDate")(m,"g:ia")};case c("MercuryTimePassed").WEEK_AGO:return{absolute:c("formatDate")(m,"l"),relative:c("formatDate")(m,"D")};case c("MercuryTimePassed").CURRENT_YEAR:return{absolute:c("formatDate")(m,"F j"),relative:c("formatDate")(m,"M j")};default:return{absolute:c("formatDate")(m,"F j, Y"),relative:c("formatDate")(m,"n/j/y")}}},getTimeBucket:function l(m){var n=new Date(m),o=new Date(),p=new Date(o.getFullYear(),o.getMonth(),o.getDate());if(p<n)return c("MercuryTimePassed").TODAY;else if(p-j<n)return c("MercuryTimePassed").WEEK_AGO;else if(p.getFullYear()===n.getFullYear())return c("MercuryTimePassed").CURRENT_YEAR;else return c("MercuryTimePassed").OTHER_YEAR},getPreciseTimestamp:function l(m){return c("formatDate")(new Date(m),k.getPreciseFormat(m))},getPreciseFormat:function l(m){var n=k.getTimeBucket(m);switch(n){case c("MercuryTimePassed").TODAY:return"g:ia";case c("MercuryTimePassed").WEEK_AGO:return"l g:ia";case c("MercuryTimePassed").CURRENT_YEAR:return"F jS, g:ia";case c("MercuryTimePassed").OTHER_YEAR:default:return"F j, Y g:i a"}}};f.exports=k}),null);