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

__d("MessengerDotComPromotionActionURL",[],(function a(b,c,d,e,f,g){f.exports={turn_on_notification:"TurnOnNotification",messengerdotcom_cell_cutover_qp:"messengerdotcomCellCutoverQp"}}),null);
__d("MessengerSharedFilesContainerRefetchQuery.graphql",[],(function a(b,c,d,e,f,g){"use strict";var h=function(){var i=[{kind:"LocalArgument",name:"count",type:"Int!",defaultValue:null},{kind:"LocalArgument",name:"threadFBID",type:"ID!",defaultValue:null}],j=[{kind:"Variable",name:"id",variableName:"threadFBID",type:"ID!"}],k={kind:"ScalarField",alias:null,name:"id",args:null,storageKey:null};return{kind:"Request",operationKind:"query",name:"MessengerSharedFilesContainerRefetchQuery",id:"1601862109872360",text:null,metadata:{},fragment:{kind:"Fragment",name:"MessengerSharedFilesContainerRefetchQuery",type:"Query",metadata:null,argumentDefinitions:i,selections:[{kind:"LinkedField",alias:null,name:"message_thread",storageKey:null,args:j,concreteType:"MessageThread",plural:false,selections:[{kind:"FragmentSpread",name:"MessengerSharedFilesContainer_sharedFiles",args:[{kind:"Variable",name:"count",variableName:"count",type:null}]}]}]},operation:{kind:"Operation",name:"MessengerSharedFilesContainerRefetchQuery",argumentDefinitions:i,selections:[{kind:"LinkedField",alias:null,name:"message_thread",storageKey:null,args:j,concreteType:"MessageThread",plural:false,selections:[{kind:"LinkedField",alias:null,name:"message_shared_media",storageKey:null,args:[{kind:"Variable",name:"first",variableName:"count",type:"Int"},{kind:"Literal",name:"message_shared_media_type",value:"FILE",type:"MessageMediaType"}],concreteType:"MessageSharedMediaConnection",plural:false,selections:[{kind:"LinkedField",alias:null,name:"edges",storageKey:null,args:null,concreteType:"MessageSharedMediaEdge",plural:true,selections:[{kind:"LinkedField",alias:null,name:"node",storageKey:null,args:null,concreteType:null,plural:false,selections:[{kind:"ScalarField",alias:null,name:"__typename",args:null,storageKey:null},k,{kind:"InlineFragment",type:"MessageFile",selections:[{kind:"ScalarField",alias:null,name:"legacy_attachment_id",args:null,storageKey:null},{kind:"ScalarField",alias:null,name:"url",args:[{kind:"Literal",name:"site",value:"www",type:"SiteEnum"}],storageKey:'url(site:"www")'},{kind:"ScalarField",alias:null,name:"filename",args:null,storageKey:null},{kind:"ScalarField",alias:null,name:"mimetype",args:null,storageKey:null}]}]}]},{kind:"ScalarField",alias:null,name:"count",args:null,storageKey:null}]},k]}]}}}();f.exports=h}),null);
__d("MessengerSharedFilesContainer_sharedFiles.graphql",[],(function a(b,c,d,e,f,g){"use strict";var h={kind:"Fragment",name:"MessengerSharedFilesContainer_sharedFiles",type:"MessageThread",metadata:null,argumentDefinitions:[{kind:"LocalArgument",name:"count",type:"Int",defaultValue:10}],selections:[{kind:"LinkedField",alias:null,name:"message_shared_media",storageKey:null,args:[{kind:"Variable",name:"first",variableName:"count",type:"Int"},{kind:"Literal",name:"message_shared_media_type",value:"FILE",type:"MessageMediaType"}],concreteType:"MessageSharedMediaConnection",plural:false,selections:[{kind:"FragmentSpread",name:"MessengerSharedFiles_sharedFiles",args:null},{kind:"ScalarField",alias:null,name:"count",args:null,storageKey:null}]}]};f.exports=h}),null);
__d("MessengerSharedFiles_sharedFiles.graphql",[],(function a(b,c,d,e,f,g){"use strict";var h={kind:"Fragment",name:"MessengerSharedFiles_sharedFiles",type:"MessageSharedMediaConnection",metadata:null,argumentDefinitions:[],selections:[{kind:"LinkedField",alias:null,name:"edges",storageKey:null,args:null,concreteType:"MessageSharedMediaEdge",plural:true,selections:[{kind:"LinkedField",alias:null,name:"node",storageKey:null,args:null,concreteType:null,plural:false,selections:[{kind:"InlineFragment",type:"MessageFile",selections:[{kind:"ScalarField",alias:null,name:"legacy_attachment_id",args:null,storageKey:null},{kind:"ScalarField",alias:null,name:"url",args:[{kind:"Literal",name:"site",value:"www",type:"SiteEnum"}],storageKey:'url(site:"www")'},{kind:"ScalarField",alias:null,name:"filename",args:null,storageKey:null},{kind:"ScalarField",alias:null,name:"mimetype",args:null,storageKey:null}]}]}]}]};f.exports=h}),null);
__d("MessengerThreadInfoPanelSharedFilesQuery.graphql",[],(function a(b,c,d,e,f,g){"use strict";var h=function(){var i=[{kind:"LocalArgument",name:"threadFBID",type:"ID!",defaultValue:null}],j=[{kind:"Variable",name:"id",variableName:"threadFBID",type:"ID!"}],k={kind:"ScalarField",alias:null,name:"id",args:null,storageKey:null};return{kind:"Request",operationKind:"query",name:"MessengerThreadInfoPanelSharedFilesQuery",id:"1501268233260002",text:null,metadata:{},fragment:{kind:"Fragment",name:"MessengerThreadInfoPanelSharedFilesQuery",type:"Query",metadata:null,argumentDefinitions:i,selections:[{kind:"LinkedField",alias:null,name:"message_thread",storageKey:null,args:j,concreteType:"MessageThread",plural:false,selections:[{kind:"FragmentSpread",name:"MessengerSharedFilesContainer_sharedFiles",args:null}]}]},operation:{kind:"Operation",name:"MessengerThreadInfoPanelSharedFilesQuery",argumentDefinitions:i,selections:[{kind:"LinkedField",alias:null,name:"message_thread",storageKey:null,args:j,concreteType:"MessageThread",plural:false,selections:[{kind:"LinkedField",alias:null,name:"message_shared_media",storageKey:'message_shared_media(first:10,message_shared_media_type:"FILE")',args:[{kind:"Literal",name:"first",value:10,type:"Int"},{kind:"Literal",name:"message_shared_media_type",value:"FILE",type:"MessageMediaType"}],concreteType:"MessageSharedMediaConnection",plural:false,selections:[{kind:"LinkedField",alias:null,name:"edges",storageKey:null,args:null,concreteType:"MessageSharedMediaEdge",plural:true,selections:[{kind:"LinkedField",alias:null,name:"node",storageKey:null,args:null,concreteType:null,plural:false,selections:[{kind:"ScalarField",alias:null,name:"__typename",args:null,storageKey:null},k,{kind:"InlineFragment",type:"MessageFile",selections:[{kind:"ScalarField",alias:null,name:"legacy_attachment_id",args:null,storageKey:null},{kind:"ScalarField",alias:null,name:"url",args:[{kind:"Literal",name:"site",value:"www",type:"SiteEnum"}],storageKey:'url(site:"www")'},{kind:"ScalarField",alias:null,name:"filename",args:null,storageKey:null},{kind:"ScalarField",alias:null,name:"mimetype",args:null,storageKey:null}]}]}]},{kind:"ScalarField",alias:null,name:"count",args:null,storageKey:null}]},k]}]}}}();f.exports=h}),null);
__d("MessengerBotsWebTypedLogger",["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:MessengerBotsWebLoggerConfig",this.$MessengerBotsWebTypedLogger1,c("Banzai").BASIC)};h.prototype.logVital=function(){c("GeneratedLoggerUtils").log("logger:MessengerBotsWebLoggerConfig",this.$MessengerBotsWebTypedLogger1,c("Banzai").VITAL)};h.prototype.clear=function(){this.$MessengerBotsWebTypedLogger1={};return this};h.prototype.updateData=function(j){this.$MessengerBotsWebTypedLogger1=babelHelpers["extends"]({},this.$MessengerBotsWebTypedLogger1,j);return this};h.prototype.setCount=function(j){this.$MessengerBotsWebTypedLogger1.count=j;return this};h.prototype.setEvent=function(j){this.$MessengerBotsWebTypedLogger1.event=j;return this};h.prototype.setIndex=function(j){this.$MessengerBotsWebTypedLogger1.index=j;return this};h.prototype.setPageID=function(j){this.$MessengerBotsWebTypedLogger1.page_id=j;return this};h.prototype.setPayload=function(j){this.$MessengerBotsWebTypedLogger1.payload=j;return this};h.prototype.setQrContentType=function(j){this.$MessengerBotsWebTypedLogger1.qr_content_type=j;return this};h.prototype.setTitle=function(j){this.$MessengerBotsWebTypedLogger1.title=j;return this};h.prototype.setTitles=function(j){this.$MessengerBotsWebTypedLogger1.titles=c("GeneratedLoggerUtils").serializeVector(j);return this};h.prototype.setType=function(j){this.$MessengerBotsWebTypedLogger1.type=j;return this};h.prototype.setURL=function(j){this.$MessengerBotsWebTypedLogger1.url=j;return this};h.prototype.setVC=function(j){this.$MessengerBotsWebTypedLogger1.vc=j;return this};var i={count:true,event:true,index:true,page_id:true,payload:true,qr_content_type:true,title:true,titles:true,type:true,url:true,vc:true};f.exports=h}),null);
__d("MercurySendMessageHandler",["MercuryMessageActions","MercuryMessageObject","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.$MercurySendMessageHandler1=j;this.$MercurySendMessageHandler2=c("MercuryMessageActions").getForFBID(this.$MercurySendMessageHandler1);this.$MercurySendMessageHandler3=c("MercuryMessageObject").getForFBID(this.$MercurySendMessageHandler1)}h.prototype.sendPlainTextMessage=function(j,k,l){var m=this.$MercurySendMessageHandler3.constructUserGeneratedMessageObject(k,l,j);this.$MercurySendMessageHandler2.send(m)};h.prototype.sendSticker=function(j,k,l){var m=this.$MercurySendMessageHandler3.constructStickerMessageObject(k,l,j);this.$MercurySendMessageHandler2.send(m)};h.prototype.sendAttachment=function(j,k,l){var m=this.$MercurySendMessageHandler3.constructAttachmentMessageObject(l,j);this.$MercurySendMessageHandler2.addAttachmentPlaceholder(m,k.upload_id,k)};var i=new(c("MercurySingletonProvider"))(h);f.exports=h}),null);
__d("MessengerAsyncWrapper",["React","gkx"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h=void 0;if(c("gkx")("AT6uOpHsaIuXW82MiVMSo_xgA_Dx0-Ld7p3DjaI-6h1npleIfo2Ysa-KTi2_I4jhSTW9dTVJIrfmoYCZy4z-M8VA"))h=c("React").unstable_AsyncMode;else h=function(){__p&&__p();var i,j;i=babelHelpers.inherits(h,c("React").Component);j=i&&i.prototype;h.prototype.render=function(){"use strict";return this.props.children};function h(){"use strict";i.apply(this,arguments)}return h}();f.exports=h}),null);
__d("XMessengerDotComNUXLoggingController",["XController"],(function a(b,c,d,e,f,g){f.exports=c("XController").create("/logging/promotion/",{promotion_id:{type:"Int",required:true},instance_log_data:{type:"StringToStringMap",defaultValue:{}}})}),null);
__d("MessengerNotificationBanner.react",["cx","ix","AsyncRequest","CurrentUser","Image.react","MessengerButtonReact.bs","MessengerDesktopNotifications","MessengerDotComPromotionActionURL","MessengerSettingsActions","MessengerSignals.bs","React","XMessengerDotComNUXLoggingController","XQuickPromotionSimpleLoggingController","goURI"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j,k,l=c("MessengerButtonReact.bs").jsComponent,m=c("React").PropTypes,n=i("86832"),o=i("86833");j=babelHelpers.inherits(p,c("React").Component);k=j&&j.prototype;function p(){__p&&__p();var q,r;for(var s=arguments.length,t=Array(s),u=0;u<s;u++)t[u]=arguments[u];return r=(q=k.constructor).call.apply(q,[this].concat(t)),this.state={bannerClosed:false},this.$MessengerNotificationBanner3=function(){return c("React").createElement(l,{className:"_2cim",label:this.props.primaryActionTitle,onClick:this.$MessengerNotificationBanner4,type:"primary"})}.bind(this),this.$MessengerNotificationBanner4=function(){this.$MessengerNotificationBanner5();if(this.props.promotionID){new(c("AsyncRequest"))().setURI(c("XQuickPromotionSimpleLoggingController").getURIBuilder().setInt("qp_id",this.props.promotionID).setEnum("qp_action","primary").setStringToStringMap("qp_instance_log_data",this.props.instanceLogData).getURI()).send();if(this.props.primaryActionURI===c("MessengerDotComPromotionActionURL").turn_on_notification)c("MessengerSettingsActions").changeDesktopNotifs(true);else window.open(this.props.primaryActionURI)}else if(this.props.primaryActionURI)c("goURI")(this.props.primaryActionURI,true)}.bind(this),this.$MessengerNotificationBanner2=function(){this.$MessengerNotificationBanner5();if(this.props.promotionID)new(c("AsyncRequest"))().setURI(c("XQuickPromotionSimpleLoggingController").getURIBuilder().setInt("qp_id",this.props.promotionID).setEnum("qp_action","dismiss").setStringToStringMap("qp_instance_log_data",this.props.instanceLogData).getURI()).send()}.bind(this),this.$MessengerNotificationBanner5=function(){this.setState({bannerClosed:true},function(){c("MessengerSignals.bs").resize()})}.bind(this),r}p.prototype.componentWillReceiveProps=function(q){if(!q.promotionID)this.setState({bannerClosed:false})};p.prototype.componentDidMount=function(){if(this.$MessengerNotificationBanner1()||!this.props.promotionID||c("CurrentUser").isWorkUser())return;new(c("AsyncRequest"))().setURI(c("XMessengerDotComNUXLoggingController").getURIBuilder().setInt("promotion_id",this.props.promotionID).setStringToStringMap("instance_log_data",this.props.instanceLogData).getURI()).send()};p.prototype.componentDidUpdate=function(){window.dispatchEvent(new Event("resize"))};p.prototype.render=function(){if(this.$MessengerNotificationBanner1())return null;return c("React").createElement("div",{className:"_2cij"},c("React").createElement(c("Image.react"),{className:"_2cik",onClick:this.$MessengerNotificationBanner2,src:n}),c("React").createElement(c("Image.react"),{className:"_2cil",src:o}),this.props.promotionContent," ",this.$MessengerNotificationBanner3())};p.prototype.$MessengerNotificationBanner1=function(){return c("MessengerDesktopNotifications").isGranted()||c("MessengerDesktopNotifications").isDenied()||this.state.bannerClosed};p.propTypes={promotionID:m.number,promotionContent:m.string,primaryActionTitle:m.string,primaryActionURI:m.string,instanceLogData:m.object};f.exports=p}),null);
__d("MessengerRefreshPrompt",["fbt","Visibility","setIntervalAcrossTransitions"],(function a(b,c,d,e,f,g,h){var i=1e3*60*60,j=1e3*60*60*24*3,k=function k(l){var m=Date.now();c("setIntervalAcrossTransitions")(function(){if(Date.now()-m>j)c("Visibility").once(c("Visibility").VISIBLE,function(){l({promotionID:null,promotionContent:h._("A new version of Messenger is available."),primaryActionTitle:h._("Refresh"),instanceLogData:{},primaryActionURI:window.location.href});m=Date.now()})},i)};f.exports=k}),null);
__d("WorkNuxID",[],(function a(b,c,d,e,f,g){f.exports=Object.freeze({WORK_CHAT_DOWNLOAD_UPSELL_BANNER:5468})}),null);
__d("XWorkplaceDesktopDownloadController",["XController"],(function a(b,c,d,e,f,g){f.exports=c("XController").create("/work/desktop/download/{file}/",{file:{type:"String",required:true},ref:{type:"String"}})}),null);
__d("WorkplaceChatUpsellBanner.react",["ix","cx","fbt","Promise","Bootloader","Event","Image.react","Link.react","React","UserAgent","WorkNuxID","XUIButton.react","BasicFBNux","XWorkplaceDesktopDownloadController","fbglyph"],(function a(b,c,d,e,f,g,h,i,j){"use strict";__p&&__p();var k,l,m="https://play.google.com/store/apps/details?id=com.facebook.workchat",n="https://itunes.apple.com/app/work-chat/id958124798";k=babelHelpers.inherits(o,c("React").PureComponent);l=k&&k.prototype;function o(){l.constructor.call(this);this.state={xOutAppUpsell:false}}o.prototype.componentDidMount=function(){this.$WorkplaceChatUpsellBanner2()};o.prototype.render=function(){return c("React").createElement("div",{className:"_3ej0"+(this.state.xOutAppUpsell?" _3ej2":"")},j._("Get the app and chat anywhere, anytime"),this.$WorkplaceChatUpsellBanner3(),this.$WorkplaceChatUpsellBanner4())};o.prototype.$WorkplaceChatUpsellBanner3=function(){var p=null;if(c("UserAgent").isPlatform("Mac OS X"))p=c("XWorkplaceDesktopDownloadController").getURIBuilder().setString("file","mac").setString("ref","chat_upsell").getURI();else if(c("UserAgent").isPlatform("Windows"))p=c("XWorkplaceDesktopDownloadController").getURIBuilder().setString("file","win").setString("ref","chat_upsell").getURI();return c("React").createElement("div",{className:"_3-9a"},p?this.$WorkplaceChatUpsellBanner5(p.toString(),j._("Desktop App")):null,this.$WorkplaceChatUpsellBanner5(n,j._("iOS")),this.$WorkplaceChatUpsellBanner5(m,j._("Android")))};o.prototype.$WorkplaceChatUpsellBanner5=function(p,q){return c("React").createElement(c("XUIButton.react"),{target:"_blank",className:"_3ej4",label:q,href:p,onClick:function(){return this.$WorkplaceChatUpsellBanner6(q)}.bind(this)})};o.prototype.$WorkplaceChatUpsellBanner4=function(){return c("React").createElement(c("Link.react"),{onClick:function(){return this.$WorkplaceChatUpsellBanner7()}.bind(this)},c("React").createElement(c("Image.react"),{className:"_3-8w _3-90 _3ej3",alt:"X",src:h("114703")}))};o.prototype.$WorkplaceChatUpsellBanner7=function(){this.$WorkplaceChatUpsellBanner8();this.setState({xOutAppUpsell:true});setTimeout(function(){return c("Event").fire(window,"resize")},300)};o.prototype.$WorkplaceChatUpsellBanner6=function(p){this.$WorkplaceChatUpsellBanner9().done(function(q){var r=q.logger,s=q.actions;r.clear();r.setAction(s.CHAT_APP_UPSELL_BANNER_BUTTON_CLICKED).addToExtraData("button",p.toString()).log()})};o.prototype.$WorkplaceChatUpsellBanner8=function(){this.$WorkplaceChatUpsellBanner9().done(function(p){var q=p.logger,r=p.actions;q.clear();q.setAction(r.CHAT_APP_UPSELL_BANNER_DISMISSED).log()})};o.prototype.$WorkplaceChatUpsellBanner2=function(){c("BasicFBNux").onView(c("WorkNuxID").WORK_CHAT_DOWNLOAD_UPSELL_BANNER);this.$WorkplaceChatUpsellBanner9().done(function(p){var q=p.logger,r=p.actions;q.clear();q.setAction(r.CHAT_APP_UPSELL_BANNER_SHOWN).log()})};o.prototype.$WorkplaceChatUpsellBanner9=function(){if(!this.$WorkplaceChatUpsellBanner1)this.$WorkplaceChatUpsellBanner1=new(c("Promise"))(function(p,q){c("Bootloader").loadModules(["WorkOnboardingTypedLogger","WorkOnboardingLogAction"],function(r,s){var t=new r();p({logger:t,actions:s})},"WorkplaceChatUpsellBanner.react")});return this.$WorkplaceChatUpsellBanner1};f.exports=o}),null);
__d("MessengerBanner.react",["MessengerNotificationBanner.react","MessengerRefreshPrompt","React","WorkplaceChatUpsellBanner.react"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h,i,j=c("React").PropTypes;h=babelHelpers.inherits(k,c("React").PureComponent);i=h&&h.prototype;function k(){var l,m;for(var n=arguments.length,o=Array(n),p=0;p<n;p++)o[p]=arguments[p];return m=(l=i.constructor).call.apply(l,[this].concat(o)),this.state={promotionData:this.props.initialPromotionData},m}k.prototype.componentDidMount=function(){c("MessengerRefreshPrompt")(function(l){return this.setState({promotionData:l})}.bind(this))};k.prototype.render=function(){var l=this.state.promotionData;if(this.props.showWorkchatUpsellBanner)return c("React").createElement(c("WorkplaceChatUpsellBanner.react"),null);if(l&&l.primaryActionURI)return c("React").createElement(c("MessengerNotificationBanner.react"),{promotionID:l.promotionID,promotionContent:l.promotionContent,primaryActionTitle:l.primaryActionTitle,primaryActionURI:l.primaryActionURI,instanceLogData:l.instanceLogData});return null};k.propTypes={showWorkchatUpsellBanner:j.bool,initialPromotionData:j.object,isFirstRedirect:j.bool};f.exports=k}),null);
__d("MessengerBrowserAlerts",["fbt","DocumentTitle","Event","ImageSourceRequest","ImageSourceType","Map","MercuryAttachmentSnippetRenderer","MercuryBlockedParticipants.bs","MercuryIDs","MercuryLogMessageType","MercuryParticipants","MercuryThreadInfo","MercuryThreadInformer","MercuryThreads","MercuryUnseenState","MessagingTag","MessengerActions","MessengerConfig","MessengerDesktopNotifications","MessengerEnvironment","MessengerFaviconUrls","MessengerSettingsStore","MessengerStateStore","MercuryNotificationRenderer","PhotoResizeModeConst","Sound","UserActivity"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i=c("MercuryBlockedParticipants.bs").get(),j=8e3,k=80,l=3,m=6e5,n=new(c("Map"))(),o=null,p=null;function q(){n=new(c("Map"))()}function r(u){if(c("MessengerSettingsStore").getSettings().sound_enabled)c("Sound").play([c("MessengerConfig")["sound.notif_ogg_url"],c("MessengerConfig")["sound.notif_mp3_url"]],u,false)}function s(u,v,w){__p&&__p();if(!u.snippet_sender)return;var x=n.get(u.thread_id)||0;if(x>=l)return;n.set(u.thread_id,x+1);c("MercuryParticipants").get(u.snippet_sender,function(y){__p&&__p();var z=u.snippet,A=u.custom_nickname&&u.custom_nickname[c("MercuryIDs").getUserIDFromParticipantID(y.id)],B=A?A:y.short_name;if(!z&&u.snippet_attachments&&u.snippet_attachments.length>0)z=c("MercuryAttachmentSnippetRenderer").renderAttachmentSnippetText(c("MercuryAttachmentSnippetRenderer").getAttachmentSnippetType(u.snippet_attachments),false,B,u.snippet_attachments);var C=A?A:y.name;if(!u.is_canonical)C=u.name?h._("{sender's name} to {group name}",[h.param("sender's name",B),h.param("group name",u.name)]):h._("{sender's name} to your group",[h.param("sender's name",B)]);c("MessengerDesktopNotifications").showNotification({title:C,body:z,icon:u.image_src||v||y.big_image_src||y.image_src,closeTime:null,onClick:function D(){window.focus();c("MessengerActions").selectThread(u.thread_id)},tag:w.message_id,silent:!c("MessengerSettingsStore").getSettings().sound_enabled});if(!c("MessengerDesktopNotifications").hasDefaultSound())r(w.timestamp)})}var t={init:function u(v){__p&&__p();this._viewer=v;this._threadInformer=c("MercuryThreadInformer").getForFBID(this._viewer);this._threads=c("MercuryThreads").getForFBID(this._viewer);this._unseenState=c("MercuryUnseenState").getForFBID(this._viewer);this._highResImageMap=new(c("Map"))();c("Event").listen(window,"focus",function(){q();clearInterval(o)});c("Event").listen(window,"blur",function(){o=setInterval(q,m)});this._threadInformer.subscribe("messages-received",function(w,x){for(var y in x)x[y].forEach(function(z){this.handleMessageReceived(z)}.bind(this))}.bind(this));this._threadInformer.subscribe("unseen-updated",this._handleUnseenUpdated.bind(this))},handleMessageReceived:function u(v){__p&&__p();if(v.author===this._viewer||!v.is_unread||v.thread_id===c("MessengerStateStore").getState().activeThreadID&&c("UserActivity").isOnTab()||v.folder!=c("MessagingTag").INBOX&&v.folder!=c("MessagingTag").ARCHIVED)return;this._threads.getThreadMeta(v.thread_id,function(w){__p&&__p();if(c("MercuryThreadInfo").isMuted(w))if(!c("MercuryThreadInfo").areMentionsMuted(w)){if(!v.profile_ranges||!v.profile_ranges.some||!v.profile_ranges.some(function(x){return x.id===this._viewer}.bind(this)))return}else return;if(i.isPresentInGroupThread(w))return;if(c("MessengerSettingsStore").getSettings().desktopNotifsEnabled&&!c("UserActivity").isOnTab())this._attemptDesktopNotification(w,v);else if(v.log_message_type!==c("MercuryLogMessageType").UNSUBSCRIBE)r(v.timestamp);if(!c("UserActivity").isOnTab()&&this._unseenState.getUnseenCount()>0)c("MercuryNotificationRenderer").renderDocumentTitle(v.thread_id,function(x){if(!p)p=c("DocumentTitle").blink(x)})}.bind(this))},showRTCNotification:function u(v,w){__p&&__p();if(c("UserActivity").isOnTab()){w(null);return}var x=v.peerID;if(!this._highResImageMap.has(x)){var y=function(z,A){this._highResImageMap.set(x.toString(),A.uri);this._displayRTCDesktopNotification(A.uri,v,w)}.bind(this);new(c("ImageSourceRequest"))().setFBID(x).setType(c("ImageSourceType").PROFILE_PICTURE).setDimensions(k,k).setResizeMode(c("PhotoResizeModeConst").COVER).setCallback(y.bind(null,x)).send()}else this._displayRTCDesktopNotification(this._highResImageMap.get(x),v,w)},_updateFavicon:function u(v){var w=document.querySelector('link[rel*=icon][href*=".ico"]');if(!w)return;if(v===0)w.href=c("MessengerFaviconUrls")["default"];else w.href=c("MessengerFaviconUrls").unread},_displayRTCDesktopNotification:function u(v,w,x){__p&&__p();var y=c("MercuryIDs").getParticipantIDFromUserID(w.peerID),z=null;c("MercuryParticipants").get(y,function(A){__p&&__p();var B=void 0;if(w.isVideoCall)if(w.isGroupCall)B=h._("Incoming Group Video Chat");else B=h._("Incoming Video Call");else if(w.isGroupCall)B=h._("Incoming Group Call");else B=h._("Incoming Audio Call");var C=h._("{caller} is calling you. Click to answer.",[h.param("caller",A.short_name)]);z=c("MessengerDesktopNotifications").showNotification({title:B,body:C,icon:v,closeTime:j,onClick:function D(){window.focus();w.onNotificationClicked()}});x(z)})},_handleUnseenUpdated:function u(){__p&&__p();var v=this._unseenState.getUnseenCount();if(c("UserActivity").isOnTab()&&c("UserActivity").isActive()&&v>0){this._updateFavicon(0);this._unseenState.markAsSeen();return}var w=c("DocumentTitle").get(),x=v?"("+v+") "+w:w;c("DocumentTitle").set(x,true);this._updateFavicon(v);if(p&&v===0){p.stop();p=null}if(!this._focusToken&&v>0)this._focusToken=c("UserActivity").subscribe(function(){if(c("UserActivity").isOnTab()){this._focusToken&&this._focusToken.unsubscribe();this._focusToken=null;this._unseenState.markAsSeen()}}.bind(this))},_attemptDesktopNotification:function u(v,w){if(!v.snippet_sender)return;if(!this._highResImageMap.has(v.snippet_sender)){var x=function(y,z){this._highResImageMap.set(v.snippet_sender,z.uri);s(v,z.uri,w)}.bind(this);new(c("ImageSourceRequest"))().setFBID(c("MercuryIDs").getUserIDFromParticipantID(v.snippet_sender)).setType(c("ImageSourceType").PROFILE_PICTURE).setDimensions(k,k).setResizeMode(c("PhotoResizeModeConst").COVER).setCallback(x.bind(null,v.snippet_sender)).send()}else s(v,this._highResImageMap.get(v.snippet_sender),w)}};f.exports=t}),null);
__d("MessengerThreadlistWebGraphQLQuery",["WebGraphQLQueryBase"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();f.exports=function(){__p&&__p();var h,i;h=babelHelpers.inherits(j,c("WebGraphQLQueryBase"));i=h&&h.prototype;j.__getDocID=function(){"use strict";return"1546145438833129"};j.getQueryID=function(){"use strict";return"469140310149230"};function j(){"use strict";h.apply(this,arguments)}return j}()}),null);
__d("MessengerGraphQLThreadlistFetcher.bs",["Promise","bs_array","bs_js_dict","BanzaiODS","bs_caml_array","WebGraphQL","bs_caml_format","MessengerServerPayloadTransformer.bs","MessengerThreadlistWebGraphQLQuery"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();function h(k){return new(c("MessengerThreadlistWebGraphQLQuery"))({limit:k.limit,before:k.timestamp,tags:k.tags,includeDeliveryReceipts:k.includeDeliveryReceipts,includeSeqID:k.includeSeqID})}function i(k,l,m,n){__p&&__p();var o=[],p=[],q={},r=[],s={},t=[undefined];c("bs_array").iteri(function(u,v){__p&&__p();var w=c("bs_caml_array").caml_array_get(l,u),x=[],y=[],z=[];c("bs_array").iter(function(C){__p&&__p();if(C==null)return 0;else{var D=c("MessengerServerPayloadTransformer.bs").transformThread(k,C,m),E=c("MessengerServerPayloadTransformer.bs").transformParticipants(C);c("bs_array").iter(function(J){s[J.fbid]=J;return 0},E);var F;if(D.is_canonical){var A=D.other_user_fbid;if(A==null)F=null;else{x.push(A);F=A}}else{var B=D.thread_fbid;if(B==null)F=null;else{y.push(B);F=B}}z.push(D.thread_id);o.push(D);if(!(F==null)){var G=c("MessengerServerPayloadTransformer.bs").transformReadReceipts(k,C);if(G)q[F]=G[0]}if(F==null)return 0;else{var H=c("MessengerServerPayloadTransformer.bs").transformDeliveryReceipts(C);if(H.length<1)return 0;else{var I=c("bs_caml_array").caml_array_get(H,0);if(D.is_canonical){r.push({other_user_fbid:F,thread_fbid:null,time:c("bs_caml_format").caml_float_of_string(I.timestamp_precise)});return 0}else{r.push({other_user_fbid:null,thread_fbid:F,time:c("bs_caml_format").caml_float_of_string(I.timestamp_precise)});return 0}}}}},v.viewer.message_threads.nodes);var A=v.viewer.message_threads.sync_sequence_id;if(!(A==null))t[0]=c("bs_caml_format").caml_int_of_string(A);var B=w.timestamp;p.push({start:w.offset,end:B==null?w.offset+w.limit|0:(w.offset+w.limit|0)-1|0,folder:w.folder,other_user_fbids:x,thread_fbids:y,thread_ids:z,filter:w.filter});return 0},n);return{threads:o,ordered_threadlists:p,roger:q,delivery_receipts:r,participants:c("bs_js_dict").values(s),sequence_id:t[0]}}function j(k,l,m){var n=c("bs_array").map(h,l);return c("Promise").all(c("WebGraphQL").execAll(n,{actorID:m?k:null,batchName:"MessengerGraphQLThreadlistFetcher"}))["catch"](function(o){c("BanzaiODS").bumpEntityKey("messenger_webgraphql","fetch_threadlist.failure");return c("Promise").reject(o)}).then(function(o){c("BanzaiODS").bumpEntityKey("messenger_webgraphql","fetch_threadlist.success");return i(k,l,m,o)})}g._getQuery=h;g.transform=i;g.fetchAll=j}),null);
__d("MessengerInitialDataTransformer.bs",["bs_array","bs_caml_array","MercuryThreadlistConstants","MessengerGraphQLThreadlistFetcher.bs","MessengerServerPayloadTransformer.bs"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();function h(i){__p&&__p();var j=i.viewer,k=i.is_page,l=i.additional_participant,m;if(l==null)m=[];else{var n=[];c("bs_array").iter(function(B){if(B==null)return 0;else{n.push(c("MessengerServerPayloadTransformer.bs").transformParticipant(B));return 0}},l.nodes);m=n}var o=i.thread_list,p=o==null?null:c("MessengerGraphQLThreadlistFetcher.bs").transform(j,[{limit:c("MercuryThreadlistConstants").WEBMESSENGER_THREAD_COUNT+1|0,folder:"inbox",timestamp:null,offset:0,filter:null}],+k,[o]),q=i.work_top_named_threads,r=q==null?null:c("MessengerGraphQLThreadlistFetcher.bs").transform(j,[{limit:c("MercuryThreadlistConstants").WEBMESSENGER_THREAD_COUNT+1|0,folder:"inbox",timestamp:null,offset:0,filter:null}],0,[q]),s=i.current_thread,t;if(s==null)t=null;else{var u=s.message_thread;t=u==null?null:c("MessengerServerPayloadTransformer.bs").transformThread(j,u,+k)}var v=p==null?[[],[],{},[],[]]:[p.ordered_threadlists,p.threads,p.roger,p.participants,p.delivery_receipts],w=v[1],x=r==null?[]:r.threads,y=i.thread_key,z=y==null?w.filter(function(B){return+(B.unread_count===0)}):[],A=z.length?c("bs_caml_array").caml_array_get(z,0).thread_fbid:null;if(!(t==null))w.push(t);return[{ordered_threadlists:v[0],threads:w,roger:v[2],participants:v[3].concat(m),delivery_receipts:v[4],payload_source:"server_initial_data",work_top_named_threads:x},A]}g.transform=h}),null);
__d("MessengerRTCMessageHandler",["Bootloader","FBRTCCallSummaryUploader","FBRTCMessageListener","FBRTCSupport"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h=null,i=null,j={init:function m(){if(c("FBRTCSupport").isReceiveWebrtcSupported()){c("FBRTCCallSummaryUploader").init();c("FBRTCMessageListener").init(false);c("FBRTCMessageListener").once("messageReceived",function(n){k()});c("FBRTCMessageListener").once("multiwayMessageReceived",function(n){l(n)})}}};function k(){if(!h)c("Bootloader").loadModules(["FBRTCIncomingCallController","MessengerRTCIncomingDialogController","MessengerRTCMissedCallDialogController","MessengerRTCUnsupportedBrowserDialogController"],function(m,n,o,p){h=new m(n,p,o);c("FBRTCMessageListener").setMessageHandler(h.onMessageReceived,h)},"MessengerRTCMessageHandler")}function l(m){if(!i)c("Bootloader").loadModules(["FBRTCGroupCallIncomingController","MessengerRTCGroupCallIncomingDialogController"],function(n,o){i=new n(o);c("FBRTCMessageListener").setMultiwayMessageHandler(i.onMessageReceived,i);i.onMessageReceived(m)},"MessengerRTCMessageHandler")}f.exports=j}),null);
__d("FBPaymentsDialogContainerReact.bs",["ReasonReact.bs","FBPaymentsDialogContainer.react"],(function a(b,c,d,e,f,g){"use strict";function h(i){return c("ReasonReact.bs").wrapJsForReason(c("FBPaymentsDialogContainer.react"),{},i)}g.make=h}),null);
__d("MNCommerceDialogContainerReact.bs",["ReasonReact.bs","MNCommerceDialogContainer.react"],(function a(b,c,d,e,f,g){"use strict";function h(i){return c("ReasonReact.bs").wrapJsForReason(c("MNCommerceDialogContainer.react"),{},i)}g.make=h}),null);
__d("MessengerBannerReact.bs",["Utils.bs","bs_js_boolean","ReasonReact.bs","bs_js_null_undefined","MessengerBanner.react"],(function a(b,c,d,e,f,g){"use strict";function h(i,j,k,l){return c("ReasonReact.bs").wrapJsForReason(c("MessengerBanner.react"),{showWorkchatUpsellBanner:c("bs_js_boolean").to_js_boolean(i),initialPromotionData:c("bs_js_null_undefined").from_opt(j),isFirstRedirect:c("Utils.bs").optionBoolToNullUndefinedBoolean(k)},l)}g.make=h}),null);
__d("MessengerBugNubReact.bs",["Utils.bs","ReasonReact.bs","bs_js_null_undefined","MessengerBugNub.react"],(function a(b,c,d,e,f,g){"use strict";function h(i,j,k){return c("ReasonReact.bs").wrapJsForReason(c("MessengerBugNub.react"),{isBetaEnabled:c("Utils.bs").optionBoolToNullUndefinedBoolean(i),unixName:c("bs_js_null_undefined").from_opt(j)},k)}g.make=h}),null);
__d("MercuryCanonicalGroupThreadActionTypes",["keyMirror"],(function a(b,c,d,e,f,g){"use strict";f.exports=c("keyMirror")({THREAD_SEARCH_UPDATED:null})}),null);
__d("MercuryCanonicalGroupThreadStore",["MercuryCanonicalGroupThreadActionTypes","FluxStore","MercuryCanonicalGroupThreadManager","MessengerDispatcher"],(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.$MercuryCanonicalGroupThreadStore1=c("MercuryCanonicalGroupThreadManager").get()}j.prototype.__onDispatch=function(k){var l=k.type;switch(l){case c("MercuryCanonicalGroupThreadActionTypes").THREAD_SEARCH_UPDATED:this.__emitChange();break;default:break}};j.prototype.getOrFetch=function(k){var l=this.$MercuryCanonicalGroupThreadStore1.getNow(k);if(!l)this.$MercuryCanonicalGroupThreadStore1.getCanonicalGroupThreadIDForParticipants(k,function(){c("MessengerDispatcher").dispatch({type:c("MercuryCanonicalGroupThreadActionTypes").THREAD_SEARCH_UPDATED})});return l};f.exports=new j()}),null);
__d("MercuryReadOnlyReason",["fbt","Link.react","MercuryConfig","React","URI"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i={getReason:function j(){__p&&__p();var k=arguments.length<=0||arguments[0]===undefined?false:arguments[0];if(k){var l=c("MercuryConfig").DYIDeepLink;return h._("Sorry, this conversation isn't active anymore because messages can no longer be sent to email addresses. After May 1st 2016, conversations with email addresses will only be available in a copy of your Facebook data. {download your information}",[h.param("download your information",c("React").createElement("a",{href:l},h._("Learn More")))])}else if(c("MercuryConfig").ViewerIsReadOnly)return h._("You're temporarily blocked from sending messages. {learn more about blocks}",[h.param("learn more about blocks",c("React").createElement(c("Link.react"),{href:new(c("URI"))("https://www.facebook.com/help/181183045316843"),target:"_blank"},"Learn more"))]);else if(c("MercuryConfig").ColdOpenBlock)return h._("You're temporarily blocked from starting new conversations. {learn more about blocks}",[h.param("learn more about blocks",c("React").createElement(c("Link.react"),{href:new(c("URI"))("https://www.facebook.com/help/181183045316843"),target:"_blank"},"Learn more"))]);else return h._("You cannot reply to this conversation.")}};f.exports=i}),null);
__d("DebouncedMentionsTextEditor.react",["AbstractMentionsTextEditor.react","clearImmediate","debounce","setImmediate"],(function a(b,c,d,e,f,g){__p&&__p();var h,i;h=babelHelpers.inherits(j,c("AbstractMentionsTextEditor.react"));i=h&&h.prototype;function j(k){"use strict";__p&&__p();i.constructor.call(this,k);this.__maybeSearch=function(){__p&&__p();var l,m=this,n=this.props.editorState,o=n.getSelection();if(o.getHasFocus()&&o.isCollapsed())(function(){var p=n.getCurrentContent(),q=m.props.mentionsSource;if(q){if(m.$DebouncedMentionsTextEditor1)c("clearImmediate")(m.$DebouncedMentionsTextEditor1);m.$DebouncedMentionsTextEditor1=c("setImmediate")(function(){q.search(p,o,this.__onShowMentions)}.bind(m))}})()}.bind(this);this.__debouncedSearch=c("debounce")(this.__maybeSearch,50)}j.prototype.componentDidUpdate=function(k){"use strict";if(this.props.editorState!==k.editorState)this.__debouncedSearch()};j.prototype.componentWillUnmount=function(){"use strict";if(this.$DebouncedMentionsTextEditor1)c("clearImmediate")(this.$DebouncedMentionsTextEditor1);i.componentWillUnmount.call(this)};f.exports=j}),null);
__d("MNBotsLoggerEvents",[],(function a(b,c,d,e,f,g){f.exports=Object.freeze({BOT_COMPOSER_MENU_ICON_DISPLAYED:"bot_composer_menu_icon_displayed",BOT_COMPOSER_MENU_ICON_TAPPED:"bot_composer_menu_icon_tapped",BOT_COMPOSER_MENU_ITEM_DID_SELECT:"bot_composer_menu_item_did_select",BOT_COMPOSER_QUICK_REPLY_DISPLAYED:"bot_composer_quick_reply_displayed",BOT_COMPOSER_QUICK_REPLY_TAPPED:"bot_composer_quick_reply_tapped"})}),null);
__d("MessengerBotMenuButton.react",["BootloadOnRender.react","ChatFlyoutPlaceholder.react","JSResource","LazyComponent.react","AutoFocusableLink.react","MessengerBotMenuDataFetcher","MessengerBotsWebTypedLogger","MessengerContextualDialog.react","MessengerEnvironment","MNBotsLoggerEvents","React","XUIContextualDialog.react"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h,i,j=c("React").PropTypes,k=302,l=280;h=babelHelpers.inherits(m,c("React").Component);i=h&&h.prototype;function m(){__p&&__p();var n,o;for(var p=arguments.length,q=Array(p),r=0;r<p;r++)q[r]=arguments[r];return o=(n=i.constructor).call.apply(n,[this].concat(q)),this.$MessengerBotMenuButton1=false,this.state={flyoutOpen:!!this.props.clicked,isLoading:false,menuItems:null},this.$MessengerBotMenuButton3=function(){this.setState({flyoutOpen:false})}.bind(this),this.$MessengerBotMenuButton7=function(){if(this.state.flyoutOpen)this.$MessengerBotMenuButton3()}.bind(this),this.$MessengerBotMenuButton5=function(){this.$MessengerBotMenuButton1=this.state.flyoutOpen}.bind(this),this.$MessengerBotMenuButton4=function(event){event.stopPropagation();if(this.state.flyoutOpen||this.$MessengerBotMenuButton1)return;if(this.state.menuItems===null){this.setState({isLoading:true});this.$MessengerBotMenuButton2()}this.setState({flyoutOpen:!this.state.flyoutOpen})}.bind(this),o}m.prototype.componentWillMount=function(){if(this.state.flyoutOpen&&this.state.menuItems===null){this.setState({isLoading:true});this.$MessengerBotMenuButton2()}};m.prototype.componentDidMount=function(){new(c("MessengerBotsWebTypedLogger"))().setEvent(c("MNBotsLoggerEvents").BOT_COMPOSER_MENU_ICON_DISPLAYED).setPageID(this.props.pageID).log()};m.prototype.componentWillUnmount=function(){if(this.state.flyoutOpen)this.$MessengerBotMenuButton3()};m.prototype.render=function(){return c("React").createElement("span",null,c("React").createElement(c("AutoFocusableLink.react"),{autoFocus:this.props.autoFocus,className:this.props.className,href:"#",onClick:this.$MessengerBotMenuButton4,onMouseDown:this.$MessengerBotMenuButton5,role:"button",ref:"link"}),this.$MessengerBotMenuButton6())};m.prototype.$MessengerBotMenuButton6=function(){if(!this.state.flyoutOpen)return null;var n=c("MessengerEnvironment").messengerui,o=n?k:l,p=n?c("MessengerContextualDialog.react"):c("XUIContextualDialog.react");return c("React").createElement(p,babelHelpers["extends"]({alignment:this.props.flyoutAlignment,width:o,position:"above",contextRef:function(){return this.refs.link}.bind(this),onBeforeHide:this.$MessengerBotMenuButton7,onBlur:this.$MessengerBotMenuButton3,shown:this.state.flyoutOpen},this.props,{key:"contextualDialog"}),c("React").createElement(c("BootloadOnRender.react"),{component:c("React").createElement(c("LazyComponent.react"),{onEscKeyDown:this.$MessengerBotMenuButton3,shown:this.state.flyoutOpen,isLoading:this.state.isLoading,menuItems:this.state.menuItems,pageID:this.props.pageID,threadID:this.props.threadID,onClick:this.$MessengerBotMenuButton3}),loader:c("JSResource")("MessengerBotMenuDialog.react").__setRef("MessengerBotMenuButton.react"),placeholder:c("React").createElement(c("ChatFlyoutPlaceholder.react"),null)}))};m.prototype.$MessengerBotMenuButton2=function(){c("MessengerBotMenuDataFetcher").getMenuItems(this.props.pageID,function(n){this.setState({menuItems:n,isLoading:false})}.bind(this),function(){this.setState({menuItems:[],isLoading:false})}.bind(this))};m.propTypes={autoFocus:j.bool,className:j.string,clicked:j.bool,flyoutAlignment:j.string.isRequired,threadID:j.string.isRequired,pageID:j.string.isRequired};f.exports=m}),null);
__d("MessengerSingleSectionContactList.react",["cx","MessengerContactAdapters","MessengerContactList.react","MessengerTypeaheadUtils","React","TypeaheadViewPropTypes","joinClasses","wrapNullableForReact"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i,j;i=babelHelpers.inherits(k,c("React").PureComponent);j=i&&i.prototype;k.prototype.render=function(){var l=this.props,m=l.entries,n=l.viewProps,o=(!m.length?"_599s":"")+" _29hl _8i1 _11_d _4p-s";return c("React").createElement(c("MessengerContactList.react"),{controlleeID:this.props.controlleeID,className:c("joinClasses")(this.props.className,o,n.className),contactAdapter:c("MessengerContactAdapters").fromSearchableEntry,hasHoverState:true,highlightedEntry:c("wrapNullableForReact")(this.props.highlightedEntry),isLoading:false,listSections:c("MessengerTypeaheadUtils").buildSingleSection(m),onRenderHighlight:this.props.onRenderHighlight,onHighlight:this.props.onHighlight,onScrollIntoView:this.props.onScrollIntoView,onSelect:this.props.onSelect,viewer:n.viewer})};function k(){i.apply(this,arguments)}k.propTypes=c("TypeaheadViewPropTypes");k.defaultProps={role:"listbox"};f.exports=k}),null);
__d("XShareScrapeAttachmentAsyncController",["XController"],(function a(b,c,d,e,f,g){f.exports=c("XController").create("/message_share_attachment/fromURI/",{})}),null);
__d("MessengerURLUploader",["AsyncRequest","Event","MessengerActions","SubscriptionsHandler","URLMatcher","XShareScrapeAttachmentAsyncController","debounce","gkx"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h=c("XShareScrapeAttachmentAsyncController").getURIBuilder().getURI(),i=920,j=920;function k(l,m,n){__p&&__p();this.handleInputValueChange=function(o){__p&&__p();var p=this.$MessengerURLUploader3(),q=c("URLMatcher").match(p);if(!!q){if(this.$MessengerURLUploader5!==q){this.$MessengerURLUploader5=q;this.$MessengerURLUploader2=null;if(c("gkx")("AT5M-KOnq98igVULtzbIXLLujZOrcPEb_vzPxIrrMO4yDC59FjeQpdoZs2nMsaoB9WIY9SOWsfOkycr87iOYdoQQ"))c("MessengerActions").loadingPreview(this.$MessengerURLUploader7,q);this.loadShare()}}else if(!c("gkx")("AT5M-KOnq98igVULtzbIXLLujZOrcPEb_vzPxIrrMO4yDC59FjeQpdoZs2nMsaoB9WIY9SOWsfOkycr87iOYdoQQ")){this.$MessengerURLUploader5=null;this.$MessengerURLUploader2=null}}.bind(this);this.$MessengerURLUploader3=l;this.$MessengerURLUploader6=new(c("SubscriptionsHandler"))();this.$MessengerURLUploader7=n;this.$MessengerURLUploader4=c("debounce")(this.handleInputValueChange,200);this.initInput(m)}k.prototype.getData=function(){return this.$MessengerURLUploader2};k.prototype.getMatchedURL=function(){return this.$MessengerURLUploader5};k.prototype.initInput=function(l){this.$MessengerURLUploader6.addSubscriptions(c("Event").listen(l,"keyup",this.$MessengerURLUploader4),c("Event").listen(l,"paste",this.$MessengerURLUploader4))};k.prototype.loadShare=function(){if(this.$MessengerURLUploader1&&this.$MessengerURLUploader1.abort)this.$MessengerURLUploader1.abort();var l=this.$MessengerURLUploader5;if(l)this.$MessengerURLUploader1=new(c("AsyncRequest"))().setMethod("POST").setURI(h).setData({uri:l,image_width:j,image_height:i,disallow_delayed:true}).setHandler(this.handleShareLoad.bind(this,l)).send()};k.prototype.handleShareLoad=function(l,m){if(l===this.$MessengerURLUploader5)this.$MessengerURLUploader2=(m.payload||0).share_data};k.prototype.setThreadID=function(l){this.$MessengerURLUploader7=l};k.prototype.clearShareData=function(){this.$MessengerURLUploader5=null;this.$MessengerURLUploader2=null};f.exports=k}),null);
__d("AtSignAllowEmptyMentionsStrategy",["DocumentMentionsRegex"],(function a(b,c,d,e,f,g){var h=c("DocumentMentionsRegex").PUNCTUATION,i=["@","\\uff20"].join(""),j="[^"+i+h+"\\s]",k="(?:\\.[ |$]| |["+h+"]|)",l=new RegExp("(?:^|\\s|\\()(["+i+"]((?:"+j+k+"){0,20}))$"),m={name:"AtSignAllowEmptyMentionsStrategy",findMentionableString:function n(o){var p=l.exec(o);if(p!==null){var q=p[2];return{matchingString:q,leadOffset:p[1].length}}return null}};f.exports=m}),null);
__d("FourLetterMentionsStrategy",["DocumentMentionsRegex"],(function a(b,c,d,e,f,g){"use strict";var h=3,i="\\b[a-z][^\\s"+c("DocumentMentionsRegex").PUNCTUATION+"]",j=new RegExp("(^|[^#])((?:"+i+"{"+h+",})$)"),k={name:"FourLetterMentionsStrategy",findMentionableString:function l(m){var n=j.exec(m);if(n!==null)return{matchingString:n[2],leadOffset:n[2].length};return null}};f.exports=k}),null);
__d("createMentionsSearchSourceFromParticipants",["fbt","ix","AtSignAllowEmptyMentionsStrategy","CapitalizedNameMentionsStrategy","DocumentCompositeMentionsSource","DocumentMentionsSource","FourLetterMentionsStrategy","LogHistory","SearchableEntry","StaticSearchSource","nullthrows"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j=c("LogHistory").getInstance("messenger_mentions"),k=i("91674").uri;function l(n,o,p,q){__p&&__p();if(!n||!o||o.length<=2)return null;var r=o.reduce(function(t,u){if(!u||u.fbid===n)return t;var v=p&&p.custom_nickname&&p.custom_nickname[u.fbid]?p.custom_nickname[u.fbid]:"";t.push(new(c("SearchableEntry"))({uniqueID:u.fbid,title:"@"+u.name,subtitle:v,photo:u.image_src,keywordString:v}));return t},[]);if(q&&p&&p.thread_fbid)r.push(m(p.thread_fbid));var s=new(c("StaticSearchSource"))(r);j.debug("constructed_search_source",JSON.stringify({participants:o.map(function(t){return t&&t.fbid})}));return new(c("DocumentCompositeMentionsSource"))([new(c("DocumentMentionsSource"))(c("AtSignAllowEmptyMentionsStrategy"),s),new(c("DocumentMentionsSource"))(c("CapitalizedNameMentionsStrategy"),s),new(c("DocumentMentionsSource"))(c("FourLetterMentionsStrategy"),s)])}function m(n){var o=h._("everyone").toString(),p=h._("Mention everyone in this chat").toString();return new(c("SearchableEntry"))({photo:k,title:"@"+o,uniqueID:c("nullthrows")(n),subtitle:p})}f.exports=l}),null);
__d("MessengerComposerInput.react",["cx","fbt","Bootloader","CompositeDraftDecorator","DebouncedMentionsTextEditor.react","DraftModifier","DOMDimensions","EditorState","EmojiFormat","MessengerActions","MessengerDialog.react","MessengerDialogBodyReact.bs","MessengerDialogButton.react","MessengerDialogFooter.react","MessengerDialogHeader.react","MessengerEmojiSpan.react","MessengerEmoticonSpan.react","MessengerMentionsEntityDecorator.react","MessengerSingleSectionContactList.react","Event","immutable","MentionsLayer.react","MercuryIDs","MercuryThreadIDMap","MercuryThreadSnippet.react","MercuryThreadTitle.react","MercuryTimestamp","MercuryTriodeSourceUtil","MessengerBotMenuButton.react","MessengerConstants","MessengerDomIDs.bs","MessengerEditorStateManager","MessengerMentionSource","MessengerTabIndices","MessengerUploadFilesUtil.bs","MessengerURLUploader","React","ReactDOM","Run","TypingDetectorController","URLMatcher","clearImmediate","createMessengerMentionDraftEntity","createMentionsSearchSourceFromParticipants","debounce","getEntityMatcher","getEveryoneMentionIndex","getProfileRangesForContentState","getThreadTypeNameFromThreadType","getVisibleValueForContentStateWithMessengerEmoji","gkx","handleBeforeInputForMessengerEmoji","handleBeforeInputForMessengerEmoticon","handleSoftNewlineForMessengerEmoticon","insertEmoticonIntoEditorState","insertMentionIntoEditorState","insertMessengerEmojiIntoContentState","isSoftNewlineEvent","setImmediate","shouldNotRenderSegoe","throttle"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j,k,l=c("MessengerDialogBodyReact.bs").jsComponent,m=c("MessengerDomIDs.bs").ids,n=c("React").PropTypes,o=1,p=/^image\//,q="handled",r=8,s="not-handled";j=babelHelpers.inherits(t,c("React").PureComponent);k=j&&j.prototype;function t(w){__p&&__p();k.constructor.call(this,w);u.call(this);this.$MessengerInput11=this.$MessengerInput11.bind(this);this.state=this.$MessengerInput12();this.$MessengerInput6=c("debounce")(function(x){if(this.props.isComposing&&x.isComposing)return;if(!this.props.thread||!x.thread||v(this.props,x))this.$MessengerInput13()}.bind(this),300);this.$MessengerInput7=c("throttle")(function(){if(this.$MessengerInput10){var x=c("DOMDimensions").getElementDimensions(c("ReactDOM").findDOMNode(this)).height;if(this.$MessengerInput1!==x)this.props.onResize&&this.props.onResize();this.$MessengerInput1=x}}.bind(this),100)}t.prototype.$MessengerInput12=function(w){return{editorState:this.$MessengerInput14(c("MessengerEditorStateManager").get(this.props.threadID),w)}};t.prototype.componentDidMount=function(){this.$MessengerInput10=true;this.$MessengerInput1=c("DOMDimensions").getElementDimensions(c("ReactDOM").findDOMNode(this)).height;this.$MessengerInput13();this.$MessengerInput2=new(c("MessengerURLUploader"))(this.getValue,c("ReactDOM").findDOMNode(this.refs.input),this.props.threadID);c("Run").onUnload(this.$MessengerInput15);this.$MessengerInput3=c("Event").listen(window,"blur",this.$MessengerInput15);this.$MessengerInput4=c("Event").listen(window,"focus",this.$MessengerInput16);this.$MessengerInput5=c("debounce")(function(){this.$MessengerInput17()}.bind(this),1e3)};t.prototype.componentWillUpdate=function(w){if(this.props.threadID!==w.threadID)this.$MessengerInput17()};t.prototype.componentDidUpdate=function(w,x){this.$MessengerInput9=c("setImmediate")(this.$MessengerInput7);if(this.props.threadID!==w.threadID)this.$MessengerInput13();else this.$MessengerInput6(w);if(x.editorState!==this.state.editorState)this.props.onChange&&this.props.onChange(this.getValue())};t.prototype.componentWillUnmount=function(){this.$MessengerInput10=false;this.$MessengerInput8&&this.$MessengerInput8.destroy();this.props.threadID&&this.$MessengerInput17();this.$MessengerInput9&&c("clearImmediate")(this.$MessengerInput9);this.$MessengerInput3&&this.$MessengerInput3.remove();this.$MessengerInput4&&this.$MessengerInput4.remove()};t.prototype.insertEmoticon=function(w){var x=c("insertEmoticonIntoEditorState")(w,this.state.editorState);if(x!==this.state.editorState)this.$MessengerInput18(x)};t.prototype.insertEmoji=function(w){var x=this.state.editorState,y=c("insertMessengerEmojiIntoContentState")(c("EmojiFormat").codeArrayToCodeString(w),x.getCurrentContent(),x.getSelection(),x.getCurrentInlineStyle()),z=c("EditorState").push(x,y,"insert-characters");if(z!==this.state.editorState)this.$MessengerInput18(c("EditorState").forceSelection(z,y.getSelectionAfter()))};t.prototype.$MessengerInput20=function(){var w=this.props.fileUploader;return Boolean(w&&w.get("uploadedFiles").size>0)};t.prototype.$MessengerInput13=function(){__p&&__p();if(!this.$MessengerInput10)return;this.$MessengerInput21();this.$MessengerInput22();if(this.$MessengerInput2){this.$MessengerInput2.setThreadID(this.props.threadID);this.$MessengerInput2.clearShareData()}var w=this.$MessengerInput12();if(this.props.mentionsEnabled){var x=this.props,y=x.participants,z=x.viewer,A=x.thread;w.mentionsSource=c("createMentionsSearchSourceFromParticipants")(z,y&&y.toArray(),A,c("gkx")("AT49sw5n0nlIyoqYGYpRJXtOnRzCLqSpsmIoWA7hmyYTaoQcU5JHlDW_AWGZ_laa8hQ933FOWyuLNLlpGxYhTnOb"))}this.setState(w,function(){if(this.props.threadID!==c("MessengerConstants").NEW_THREAD_KEY)c("setImmediate")(function(){if(!this.props.disableAutofocus)this.focus()}.bind(this))}.bind(this))};t.prototype.$MessengerInput17=function(){if(!this.props.threadID)return;c("MessengerEditorStateManager").set(this.props.threadID,this.state.editorState)};t.prototype.$MessengerInput21=function(w){if(this.$MessengerInput2)this.$MessengerInput2.clearShareData();this.setState({editorState:this.$MessengerInput14(c("EditorState").createEmpty()),addedMentionsCount:0,mentionsTriggeredCount:0,mentionsTriggerSource:null,showEveryoneMentionDialog:false},w)};t.prototype.$MessengerInput22=function(){this.$MessengerInput8&&this.$MessengerInput8.destroy();this.$MessengerInput8=null;var w=this.props.viewer;if(!w)return;var x=c("ReactDOM").findDOMNode(this.refs.input);if(this.props.threadID!==c("MessengerConstants").NEW_THREAD_KEY&&x)this.$MessengerInput8=new(c("TypingDetectorController"))(c("MercuryIDs").getUserIDFromThreadID(this.props.threadID),x,c("MercuryTriodeSourceUtil").getMercuryTriodeSource(),null,c("MercuryThreadIDMap").getForFBID(w).getServerIDFromClientIDNow(this.props.threadID),this.getValue)};t.prototype.$MessengerInput23=function(){var w=this.props.fileUploader;if(w){c("MessengerUploadFilesUtil.bs").sendAttchments(w,this.props.onFileUpload);c("MessengerActions").cleanFiles(this.props.threadID)}};t.prototype.onEveryoneWarningAccept=function(){this.setState({showEveryoneMentionDialog:false},function(){if(this.props.thread){var w=this.getMentions(this.props.thread.thread_fbid);this.$MessengerInput24(w)}}.bind(this))};t.prototype.hideWarningDialog=function(){this.setState({showEveryoneMentionDialog:false})};t.prototype.getEveryoneMentionWarningDialog=function(){var w=i._("Mention everyone?").toString(),x=i._("Doing so will send a mention to everyone in this group.").toString();return c("React").createElement(c("MessengerDialog.react"),{onToggle:function(y){if(!y)this.hideWarningDialog()}.bind(this)},c("React").createElement(c("MessengerDialogHeader.react"),null,w),c("React").createElement(l,null,x),c("React").createElement(c("MessengerDialogFooter.react"),null,c("React").createElement(c("MessengerDialogButton.react"),{action:"cancel",label:i._("Cancel"),type:"secondary",onClick:function(){return this.hideWarningDialog()}.bind(this)}),c("React").createElement(c("MessengerDialogButton.react"),{label:i._("OK"),type:"primary",use:"default",onClick:function(){return this.onEveryoneWarningAccept()}.bind(this)})))};t.prototype.$MessengerInput25=function(){if(this.props.thread){var w=this.getMentions(this.props.thread.thread_fbid),x=c("getEveryoneMentionIndex")(w)>-1;if(x)this.setState({showEveryoneMentionDialog:x});else this.$MessengerInput24(w)}else this.$MessengerInput24()};t.prototype.$MessengerInput24=function(w){__p&&__p();if(this.props.onMessageSend&&this.props.onMessageSend(this.getValue(),{shareable_attachment:this.getShareData(),profile_ranges:w},function(x){var y,z=this;if(c("gkx")("AT5M-KOnq98igVULtzbIXLLujZOrcPEb_vzPxIrrMO4yDC59FjeQpdoZs2nMsaoB9WIY9SOWsfOkycr87iOYdoQQ"))c("MessengerActions").removeSharePreview(this.props.threadID);if(x&&this.props.mentionsEnabled&&(w&&w.length||this.state.addedMentionsCount||this.state.mentionsTriggeredCount||this.state.mentionsTriggerSource))(function(){var A=z.state,B=A.addedMentionsCount,C=A.mentionsTriggeredCount,D=A.mentionsTriggerSource,E=z.props,F=E.thread,G=E.participants,H=x;c("Bootloader").loadModules(["MessengerMentionsTypedLogger","MessengerMentionsLoggerEvents"],function(I,J){new I().setEvent(J.MENTION).setGroupSize(G&&G.size).setNumDelivered(w&&w.length||0).setNumSelects(B).setNumTriggers(C).setThreadid(F&&F.thread_id).setThreadType(c("getThreadTypeNameFromThreadType")(F&&F.thread_type)).setOfflineThreadid(H.offline_threading_id).updateExtraData({source:D}).log()},"MessengerComposerInput.react")})()}.bind(this)))this.$MessengerInput21(function(){this.$MessengerInput17();this.$MessengerInput8&&this.$MessengerInput8.resetState()}.bind(this))};t.prototype.getMentions=function(w){return c("getProfileRangesForContentState")(this.state.editorState.getCurrentContent(),w)};t.prototype.getInput=function(){return this.refs.input};t.prototype.render=function(){__p&&__p();var w=this.props,x=w.participants,y=w.thread,z=w.viewer,A=null;if(x&&y&&z)A=i._("Conversation with {participantListAsShownInThreadList}. Updated {lastUpdatedTime} by {recentUpdateStringAsShownInThreadList}",[i.param("participantListAsShownInThreadList",this.$MessengerInput26(y,z)),i.param("lastUpdatedTime",c("MercuryTimestamp").getAbsoluteTimestamp(y.timestamp)),i.param("recentUpdateStringAsShownInThreadList",this.$MessengerInput27(x,y,z))]);else A=i._("Composing a new message");var B=null;if(this.props.threadID&&this.props.pageID)B=c("React").createElement("div",{ref:"botsMenuContainer",className:"_3km1"},c("React").createElement(c("MessengerBotMenuButton.react"),{flyoutAlignment:"left",threadID:this.props.threadID,pageID:this.props.pageID,className:"_3km2"}));var C="";if(this.props.disableInput)C=i._("Composer is disabled for this thread.").toString();else if(this.props.thread&&!this.props.thread.is_canonical)C=i._("Type a message, \u0040name...").toString();else C=i._("Type a message...").toString();var D=this.getEveryoneMentionWarningDialog();return c("React").createElement("div",{className:"_kmc"+(this.props.smallerEqual640?" _2swd":"")+(c("shouldNotRenderSegoe")(this.state.editorState.getCurrentContent().getPlainText())?" _2por":"")+" navigationFocus",onClick:this.focus,role:"presentation"},this.state.showEveryoneMentionDialog?D:null,this.props.showMenu?B:null,c("React").createElement("div",{className:"_3-8x"+(this.props.showMenu?" _3km3":"")+" _3oh-"},c("React").createElement(c("DebouncedMentionsTextEditor.react"),{autoHighlight:true,ariaControls:m.CONVERSATION,ariaDescribedBy:m.COMPOSER_INPUT_DESCRIPTION,ariaLabel:C,editorState:this.state.editorState,handleBeforeInput:this.$MessengerInput28,handleContentReturn:this.$MessengerInput19,handlePastedFiles:this.$MessengerInput11,handleReturn:this.$MessengerInput19,maxResults:r,readOnly:this.props.disableInput,mentionCreationForContentStateFn:c("createMessengerMentionDraftEntity"),mentionResultsComponent:c("MentionsLayer.react"),mentionResultsProps:{typeaheadView:c("MessengerSingleSectionContactList.react"),typeaheadViewProps:{className:"_13iv",viewer:this.props.viewer},position:"above",autoflip:true},mentionsSource:this.state.mentionsSource,onChange:this.$MessengerInput18,placeholder:C,ref:"input",spellCheck:true,stripPastedStyles:true,tabIndex:this.props.threadID===c("MessengerConstants").NEW_THREAD_KEY?c("MessengerTabIndices").COMPOSER_INPUT:0,textAlignment:"left",onAddMention:this.$MessengerInput29,onShowMentions:this.$MessengerInput30}),c("React").createElement("div",{className:"_5ca7",id:m.COMPOSER_INPUT_DESCRIPTION},A)))};t.prototype.$MessengerInput26=function(w,x){return c("React").createElement(c("MercuryThreadTitle.react"),{thread:w,viewer:x})};t.prototype.$MessengerInput27=function(w,x,y){return c("React").createElement(c("MercuryThreadSnippet.react"),{participants:w,shouldAlwaysRenderSender:true,shouldRenderYou:true,thread:x,viewer:y})};t.prototype.$MessengerInput14=function(w,x){var y=this.$MessengerInput31(w),z=c("EditorState").set(w,{decorator:y});return x||this.props.disableAutofocus?z:c("EditorState").moveFocusToEnd(z)};t.prototype.$MessengerInput31=function(w){var x=c("MessengerEmoticonSpan.react"),y=w.getCurrentContent(),z=[{strategy:c("getEntityMatcher")(function(A){return A.getType()==="EMOTICON"},y.getEntity),component:x}];z.push({strategy:c("getEntityMatcher")(function(A){return A.getType()==="EMOJI"},y.getEntity),component:c("MessengerEmojiSpan.react")});z.push({strategy:c("getEntityMatcher")(function(A){return A.getType()==="MENTION"},y.getEntity),component:c("MessengerMentionsEntityDecorator.react")});return new(c("CompositeDraftDecorator"))(z)};t.prototype.$MessengerInput32=function(w,x){var y=c("handleBeforeInputForMessengerEmoticon")(x,w);if(y===x)return false;this.setState({editorState:y});return true};t.prototype.$MessengerInput33=function(w,x){var y=c("handleBeforeInputForMessengerEmoji")(x,w);if(y===x)return false;this.setState({editorState:y});return true};t.prototype.handleTextDropped=function(w){var x=this.state.editorState,y=x.getSelection();if(y.get("hasFocus"))return;var z=c("DraftModifier").replaceText(x.getCurrentContent(),y,w,x.getCurrentInlineStyle()),A=c("EditorState").push(x,z,"insert-fragment");this.$MessengerInput18(A)};t.prototype.getShareData=function(){__p&&__p();if(c("gkx")("AT5M-KOnq98igVULtzbIXLLujZOrcPEb_vzPxIrrMO4yDC59FjeQpdoZs2nMsaoB9WIY9SOWsfOkycr87iOYdoQQ")){var w=this.props.sharePreview;if(w&&w.type&&w.params)return{share_type:w.type,share_params:w.params.get("data")};return null}var x=c("URLMatcher").match(this.getValue());if(x===this.$MessengerInput2.getMatchedURL())return this.$MessengerInput2.getData();return null};t.prototype.exitCurrentMode=function(){this.refs.input&&this.refs.input.exitCurrentMode()};t.prototype.$MessengerInput34=function(){var w=this.props.sharePreview;return!!(w&&w.params&&w.type)};t.prototype.addMention=function(w){var x=c("insertMentionIntoEditorState")(w,this.state.editorState,0,c("createMessengerMentionDraftEntity"));if(!this.state.mentionsTriggerSource)this.setState({mentionsTriggerSource:c("MessengerMentionSource").REPLY});this.$MessengerInput18(x);this.$MessengerInput29()};t.propTypes={disableAutofocus:n.bool,fileUploader:n.object,handleOnlyImageUploads:n.bool.isRequired,isComposing:n.bool,mentionsEnabled:n.bool,pageID:n.string,participants:n.instanceOf(c("immutable").Map),sharePreview:n.object,showMenu:n.bool,disableInput:n.bool,smallerEqual640:n.bool,thread:n.object,threadID:n.string,viewer:n.string,onBeforeInput:n.func,onChange:n.func,onFileUpload:n.func,onResize:n.func,onMessageSend:n.func};var u=function u(){__p&&__p();this.$MessengerInput10=false;this.$MessengerInput18=function(w){if(w!==this.state.editorState)this.setState({editorState:w},function(){this.$MessengerInput5()}.bind(this))}.bind(this);this.$MessengerInput19=function(event,w){if(c("isSoftNewlineEvent")(event)){var x=c("handleSoftNewlineForMessengerEmoticon");this.setState({editorState:x(w)});return q}this.setState({},this.triggerSend);return q}.bind(this);this.getValue=function(){return c("getVisibleValueForContentStateWithMessengerEmoji")(this.state.editorState.getCurrentContent())}.bind(this);this.focus=function(){this.refs.input&&this.refs.input.focus()}.bind(this);this.$MessengerInput28=function(w,x){this.props.onBeforeInput&&this.props.onBeforeInput(w,x);var y=this.$MessengerInput32(w,x),z=this.$MessengerInput33(w,x);return y||z?q:s}.bind(this);this.$MessengerInput11=function(w){var x=this.props.handleOnlyImageUploads?w.filter(function(y){return y&&p.test(y.type)}):w;if(x.length){c("gkx")("AT5V6GuV7OE1f4CNmq1NUhZOeDrgnZF-AQ7WoOvZA8jFMJsYzyghwU79Bm31vgH-mi9DAlUGSFnfYvhwjhMfTolYEEzHhgUrhLD2UxTqbooHHw")?c("MessengerActions").prepareFilesForSend(this.props.threadID,x):this.props.onFileUpload(x);return q}return s}.bind(this);this.$MessengerInput15=function(){this.$MessengerInput17()}.bind(this);this.$MessengerInput16=function(){this.setState(this.$MessengerInput12(true))}.bind(this);this.triggerSend=function(){if(this.$MessengerInput20())this.$MessengerInput23();if(this.getValue().trim().length>0||this.$MessengerInput34())this.$MessengerInput25()}.bind(this);this.$MessengerInput29=function(){var w=(this.state.addedMentionsCount||0)+1;this.setState({addedMentionsCount:w})}.bind(this);this.$MessengerInput30=function(w,x){var y=(this.state.mentionsTriggeredCount||0)+1,z={mentionsTriggeredCount:y};if(!this.state.mentionsTriggerSource)z.mentionsTriggerSource=x===o?c("MessengerMentionSource").ATSIGN:c("MessengerMentionSource").TYPEAHEAD;this.setState(z)}.bind(this)};function v(w,x){var y=w.participants,z=x.participants;if(!y||!z)return true;var A=y.filter(Boolean),B=z.filter(Boolean);return A.size!==B.size||!A.equals(B)}f.exports=t}),null);
__d("MessengerFileSizeErrorDialogReact.bs",["fbt","ReasonReact.bs","MessengerDialogs.bs","MessengerDialogReact.bs","MessengerDialogBodyReact.bs"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();function i(o){switch(o){case"size-exceeded":return 1;case"wrong-type":return 0;default:return 2}}var j=c("ReasonReact.bs").statelessComponent("MessengerFileSizeErrorDialogReact");function k(o){if(o)return 0;else return c("MessengerDialogs.bs").removeDialog(0)}function l(o){switch(o){case 0:return h._("The type of file you're trying to attach isn't allowed. Please try again with a different format.");case 1:return h._("The file you have selected is too large. The maximum size is 25MB.");case 2:return null}}function m(o,p){var q=j.slice();q[9]=function(){return c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Dialog[0](0,k,0,0,0,0,0,[c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Header[0](0,0,h._("Failed to upload files"))),c("ReasonReact.bs").element(0,0,c("MessengerDialogBodyReact.bs").make(0,[l(o)])),c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Footer[0](0,0,[c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Button[0]([0],[h._("OK")],0,0,0,[0],0,0,[]))]))]))};return q}var n=c("ReasonReact.bs").wrapReasonForJs(j,function(o){return m(i(o.error),[])});g.errorOfString=i;g.component=j;g.handleToggle=k;g.renderDialogBody=l;g.make=m;g.jsComponent=n}),null);
__d("bs_marshal",["bs_caml_string","bs_caml_missing_polyfill","bs_caml_builtin_exceptions"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();function h(p,q,r,s,t){if(q<0||r<0||q>(p.length-r|0))throw[c("bs_caml_builtin_exceptions").invalid_argument,"Marshal.to_buffer: substring out of bounds"];else return c("bs_caml_missing_polyfill").not_implemented("caml_output_value_to_buffer not implemented by bucklescript yet\n")}function i(p,q){if(q<0||q>(p.length-20|0))throw[c("bs_caml_builtin_exceptions").invalid_argument,"Marshal.data_size"];else return c("bs_caml_missing_polyfill").not_implemented("caml_marshal_data_size not implemented by bucklescript yet\n")}function j(p,q){return 20+i(p,q)|0}function k(p,q){if(q<0||q>(p.length-20|0))throw[c("bs_caml_builtin_exceptions").invalid_argument,"Marshal.from_bytes"];else{var r=c("bs_caml_missing_polyfill").not_implemented("caml_marshal_data_size not implemented by bucklescript yet\n");if(q>(p.length-(20+r|0)|0))throw[c("bs_caml_builtin_exceptions").invalid_argument,"Marshal.from_bytes"];else return c("bs_caml_missing_polyfill").not_implemented("caml_input_value_from_string not implemented by bucklescript yet\n")}}function l(p,q){return k(c("bs_caml_string").bytes_of_string(p),q)}function m(p,q,r){return c("bs_caml_missing_polyfill").not_implemented("caml_output_value not implemented by bucklescript yet\n")}function n(){return c("bs_caml_missing_polyfill").not_implemented("caml_input_value not implemented by bucklescript yet\n")}var o=20;g.to_channel=m;g.to_buffer=h;g.from_channel=n;g.from_bytes=k;g.from_string=l;g.header_size=o;g.data_size=i;g.total_size=j}),null);
__d("bs_obj",["bs_marshal","bs_caml_array","bs_caml_missing_polyfill","bs_caml_builtin_exceptions"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h=c("bs_caml_array").caml_array_get,i=c("bs_caml_array").caml_array_set;function j(){return c("bs_caml_missing_polyfill").not_implemented("caml_output_value_to_string not implemented by bucklescript yet\n")}function k(G,H){return[c("bs_marshal").from_bytes(G,H),H+c("bs_marshal").total_size(G,H)|0]}function l(G){var H=G.length!==undefined&&(G.tag|0)!==248&&G.length>=1?G[0]:G,I;if(H.length!==undefined&&H.tag===248)I=H[0];else throw c("bs_caml_builtin_exceptions").not_found;if(I.tag===252)return H;else throw c("bs_caml_builtin_exceptions").not_found}function m(G){try{var H=l(G);return H[0]}catch(I){if(I===c("bs_caml_builtin_exceptions").not_found)throw[c("bs_caml_builtin_exceptions").invalid_argument,"Obj.extension_name"];else throw I}}function n(G){try{var H=l(G);return H[1]}catch(I){if(I===c("bs_caml_builtin_exceptions").not_found)throw[c("bs_caml_builtin_exceptions").invalid_argument,"Obj.extension_id"];else throw I}}function o(G){try{return l(G)}catch(H){if(H===c("bs_caml_builtin_exceptions").not_found)throw[c("bs_caml_builtin_exceptions").invalid_argument,"Obj.extension_slot"];else throw H}}var p=0,q=245,r=246,s=247,t=248,u=249,v=250,w=251,x=251,y=252,z=253,A=254,B=255,C=255,D=1e3,E=1001,F=1002;g.double_field=h;g.set_double_field=i;g.first_non_constant_constructor_tag=p;g.last_non_constant_constructor_tag=q;g.lazy_tag=r;g.closure_tag=s;g.object_tag=t;g.infix_tag=u;g.forward_tag=v;g.no_scan_tag=w;g.abstract_tag=x;g.string_tag=y;g.double_tag=z;g.double_array_tag=A;g.custom_tag=B;g.final_tag=C;g.int_tag=D;g.out_of_heap_tag=E;g.unaligned_tag=F;g.extension_name=m;g.extension_id=n;g.extension_slot=o;g.marshal=j;g.unmarshal=k}),null);
__d("bs_camlinternalLazy",["bs_obj","bs_curry","bs_caml_exceptions"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h=c("bs_caml_exceptions").create("CamlinternalLazy.Undefined");function i(){throw h}function j(n){__p&&__p();var o=n[0];n[0]=i;try{var p=c("bs_curry")._1(o,0);n[0]=p;n.tag=c("bs_obj").forward_tag;return p}catch(q){n[0]=function(){throw q};throw q}}function k(n){var o=n[0];n[0]=i;var p=c("bs_curry")._1(o,0);n[0]=p;n.tag=c("bs_obj").forward_tag;return p}function l(n){var o=n.tag|0;if(o===c("bs_obj").forward_tag)return n[0];else if(o!==c("bs_obj").lazy_tag)return n;else return j(n)}function m(n){var o=n.tag|0;if(o===c("bs_obj").forward_tag)return n[0];else if(o!==c("bs_obj").lazy_tag)return n;else return k(n)}g.Undefined=h;g.force_lazy_block=j;g.force_val_lazy_block=k;g.force=l;g.force_val=m}),null);
__d("MessengerSendButtonReact.bs",["fbt","bs_block","LinkReact.bs","ReasonReact.bs","bs_js_primitive","bs_camlinternalLazy"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i=c("ReasonReact.bs").statelessComponent("MessengerSendButtonReact"),j=c("bs_block").__(246,[function(){return h._("Press Enter to send")+("\n"+h._("Press Shift+Enter to add a new paragraph"))}]);function k(m,n,o,p){var q=i.slice();q[9]=function(){var r=n?[{color:n[0]}]:0,s=j.tag|0;return c("ReasonReact.bs").element(0,0,c("LinkReact.bs").make(0,[m],["tooltip"],[s===250?j[0]:s===246?c("bs_camlinternalLazy").force_lazy_block(j):j],0,0,0,0,[o],0,0,0,r,0,0,0,h._("Send")))};return q}var l=c("ReasonReact.bs").wrapReasonForJs(i,function(m){return k(m.className,c("bs_js_primitive").null_undefined_to_opt(m.customColor),m.onClick,[])});g.component=i;g.title=j;g.make=k;g.jsComponent=l}),null);
__d("XMNCommercePageNullStateCTAController",["XController"],(function a(b,c,d,e,f,g){f.exports=c("XController").create("/messages/commerce/page/nullstate/",{})}),null);
__d("MessengerComposer.react",["cx","cssVar","fbt","invariant","AsyncRequest","AutoFocusableLink.react","BootloadedComponent.react","MercuryBootloadOnInteraction.react","BootloadOnRender.react","Bootloader","ChatPhotoUploader.react","CurrentUser","EmoticonsList","immutable","JSResource","LazyComponent.react","MercuryConfig","MercuryIDs","MercuryReadOnlyReason","MercuryParticipants","MercuryThreadActions","MessageRequestUtils","MessagingTag","MessengerStateStore","MessengerActions","MessengerBotMenuDataFetcher","MessengerBlockDialogReact.bs","MessengerConfirmBlockThreadDialogReact.bs","MessengerButtonReact.bs","MessengerComposerInput.react","MessengerConstants","MessengerContextualDialog.react","MessengerDialogs.bs","MessengerMessageRequestsTypedLogger","MessengerFileSizeErrorDialogReact.bs","MessengerHotLikeButton.react","MessengerHotLikeUtils","MessengerQuickCamOrigins","MessengerResponsiveBlock.react","MessengerSendButtonReact.bs","MessengerView","MNCommerceCallToActionType","MNCommercePageSetting","MNCommercePostbackCTADataManager","MNCommercePostbackRefSendManager","P2PGKValues","React","MercuryShareAttachmentRenderLocations","XMessagingUnblockMessagesController","XMNCommercePageNullStateCTAController","XUISpinner.react","getPageIDFromThreadID","gkx","isWebGLEnabled","idx"],(function a(b,c,d,e,f,g,h,i,j,k){"use strict";__p&&__p();var l,m,n=c("MessengerBlockDialogReact.bs").jsComponent,o=c("MessengerConfirmBlockThreadDialogReact.bs").jsComponent,p=c("MessengerButtonReact.bs").jsComponent,q=c("MessengerFileSizeErrorDialogReact.bs").jsComponent,r=c("MessengerSendButtonReact.bs").jsComponent,s=c("React").PropTypes,t=640,u=360,v=navigator.mediaDevices&&navigator.mediaDevices.getUserMedia||navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia;l=babelHelpers.inherits(w,c("React").PureComponent);m=l&&l.prototype;function w(x){__p&&__p();m.constructor.call(this,x);this.handleFileUpload=function(y){this.refsUploader&&this.refsUploader.uploadFiles(y);this.exitCurrentMode()}.bind(this);this.$MessengerComposer30=function(y){var z=c("EmoticonsList").symbols[y];if(!z)return;this.refsInput&&this.refsInput.insertEmoticon(z)}.bind(this);this.focusInput=function(){this.refsInput&&this.refsInput.focus()}.bind(this);this.$MessengerComposer46=function(){var y=c("XMessagingUnblockMessagesController").getURIBuilder().getURI(),z=this.props.threadID;new(c("AsyncRequest"))(y).setMethod("POST").setData({fbid:c("MercuryIDs").getUserIDFromThreadID(z)}).send()}.bind(this);this.$MessengerComposer44=function(){__p&&__p();var y=this.props.thread,z=!!y&&c("MessageRequestUtils").isFiltered(y),A=c("MessengerStateStore").getState().threadIDs;if(A){var B=A.filter(function(E){return this.props.threadID!==E}.bind(this));c("MessengerActions").selectAggregation(B)}var C=c("CurrentUser").getID(),D=c("MercuryIDs").getThreadKeyfromThreadIDUserID(this.props.threadID,C);this.$MessengerComposer42()["delete"](this.props.threadID);c("MessengerActions").selectThread(null);new(c("MessengerMessageRequestsTypedLogger"))().setAction("message_requests_delete_request").setThreadID(c("MercuryIDs").getThreadFBIDFromThreadID(this.props.threadID)).setSurface("thread").setFolderType(z?"other":"pending").setThreadKey(D).setEntryPoint("inbox_banner").log()}.bind(this);this.$MessengerComposer48=function(){if(c("MercuryConfig").WMBF)this.$MessengerComposer43();else{this.$MessengerComposer42().archive(this.props.threadID);c("MessengerActions").selectThread(null)}}.bind(this);this.$MessengerComposer43=function(){__p&&__p();var y,z,A=this,B=(y=this.props)!=null?(y=y.thread)!=null?y.thread_id:y:y,C=c("MercuryIDs").isGroupChat(B);if(C)this.$MessengerComposer49();else{var D;(function(){var E=(D=A.props)!=null?(D=D.thread)!=null?D.other_user_fbid:D:D,F=E?c("MercuryParticipants").getNow(c("MercuryIDs").getParticipantIDFromUserID(E)):null,G=F&&F.short_name;if(G)c("MessengerDialogs.bs").showDialog(function(){return c("React").createElement(n,{onBlock:function(){this.$MessengerComposer50(G)}.bind(this),contact:F,onToggle:this.$MessengerComposer51})}.bind(A))})()}}.bind(this);this.$MessengerComposer45=function(y){var z=this.props.thread,A=c("CurrentUser").getID(),B=c("MercuryIDs").getThreadKeyfromThreadIDUserID(this.props.threadID,A),C=!!z&&c("MessageRequestUtils").isFiltered(z);if(!y)new(c("MessengerMessageRequestsTypedLogger"))().setAction("message_requests_decline_cancel").setThreadID(c("MercuryIDs").getThreadFBIDFromThreadID(this.props.threadID)).setSurface("thread").setFolderType(C?c("MessagingTag").OTHER:c("MessagingTag").PENDING).setThreadKey(B).setEntryPoint("inbox_banner").log()}.bind(this);this.$MessengerComposer40=function(y,z){if(y.platformFBID.toString()===c("MercuryConfig").MessengerAppID)this.props.onStickerSelect(y.resultID.toString());else this.refsGifUploader&&this.refsGifUploader.uploadURL({attribution_app_id:y.platformFBID,external_image_url:y.source.url,preview_url:y.media.preview?y.media.preview.url:y.media.thumbnail.url,source:y.source})}.bind(this);this.$MessengerComposer41=function(y){this.focusInput();this.refsInput&&this.refsInput.insertEmoji(y)}.bind(this);this.$MessengerComposer14=function(y){this.setState({currentValue:y})}.bind(this);this.$MessengerComposer13=function(y,z,A){this.refsEmojiButton&&this.refsEmojiButton.hideFlyout();return this.props.onMessageSend&&this.props.onMessageSend(y,z,A)}.bind(this);this.$MessengerComposer39=function(y){this.refsInput&&this.refsInput.triggerSend()}.bind(this);this.$MessengerComposer10=function(){__p&&__p();if(this.state.nullStateCTA!==null)switch(this.state.nullStateCTA.action_type){case c("MNCommerceCallToActionType").OPEN_NATIVE:break;case c("MNCommerceCallToActionType").POSTBACK:default:this.setState({disableNullState:true});if(c("MNCommercePostbackRefSendManager").hasMDotMeRef(this.$MessengerComposer4())){c("MNCommercePostbackCTADataManager").sendAndConfirm(this.state.nullStateCTA.id,this.state.nullStateCTA.title,this.props.threadID,null,this.$MessengerComposer1,c("MNCommercePostbackRefSendManager").getMdotMeRef());c("MessengerActions").changeMDotMeReferral()}else c("MNCommercePostbackCTADataManager").sendAndConfirm(this.state.nullStateCTA.id,this.state.nullStateCTA.title,this.props.threadID,null,this.$MessengerComposer1);break}}.bind(this);this.$MessengerComposer1=function(){this.setState({showNullState:true,disableNullState:false})}.bind(this);this.$MessengerComposer1=this.$MessengerComposer1.bind(this);this.state=this.$MessengerComposer2()}w.prototype.componentWillReceiveProps=function(x){if(x.threadID!==this.props.threadID){this.setState(this.$MessengerComposer2());if(x.thread)this.$MessengerComposer3(x.thread.message_count,c("getPageIDFromThreadID")(x.threadID))}if(x.thread&&x.thread.message_count>0)this.setState({showNullState:false})};w.prototype.componentWillMount=function(){if(this.props.thread)this.$MessengerComposer3(this.props.thread.message_count,this.$MessengerComposer4())};w.prototype.componentDidUpdate=function(x){if(x.canReply!==this.props.canReply)this.props.onResize&&this.props.onResize();if(this.props.thread){this.$MessengerComposer5();this.$MessengerComposer6()}};w.prototype.render=function(){__p&&__p();if(!this.props.canReply)return this.$MessengerComposer7();else if(this.props.thread&&c("MessageRequestUtils").isMessageRequest(this.props.thread)&&!this.state.pendingActionsBypassed)return this.$MessengerComposer8();var x=this.props.thread&&this.props.thread.message_count;c("MNCommercePostbackRefSendManager").sendMDotMeRef(this.$MessengerComposer4(),x);if(this.state.showNullState&&this.state.nullStateCTA!==null)return c("React").createElement("div",{className:"_2xh0"},this.$MessengerComposer9(),c("React").createElement("div",{className:"_2xh4 _59w_"},c("React").createElement(c("BootloadOnRender.react"),{component:c("React").createElement(c("LazyComponent.react"),{cta:this.state.nullStateCTA,onClick:this.$MessengerComposer10,disabled:this.state.disableNullState,threadID:this.props.threadID}),loader:c("JSResource")("ChatPageComposerNullState.react").__setRef("MessengerComposer.react"),placeholder:c("React").createElement(c("XUISpinner.react"),{size:"small"})})));var y=this.$MessengerComposer11();return c("React").createElement(c("MessengerResponsiveBlock.react"),{breakpointsToggles:function z(A){return[A!=null&&A<=t,A]}},function(z){var A=z[0],B=z[1];return c("React").createElement("div",{"aria-label":j._("New message"),className:"_4rv3",role:"region"},c("gkx")("AT5V6GuV7OE1f4CNmq1NUhZOeDrgnZF-AQ7WoOvZA8jFMJsYzyghwU79Bm31vgH-mi9DAlUGSFnfYvhwjhMfTolYEEzHhgUrhLD2UxTqbooHHw")&&this.$MessengerComposer12(this.props.threadID),c("React").createElement("div",{className:"_5irm"+(A?" _1_73":"")},c("React").createElement(c("MessengerComposerInput.react"),{disableAutofocus:!!this.props.disableAutofocus,fileUploader:this.props.fileUploader,handleOnlyImageUploads:false,isComposing:y,mentionsEnabled:this.props.mentionsEnabled,ref:function(C){return this.refsInput=C}.bind(this),onBeforeInput:function(){return this.refsEmojiButton&&this.refsEmojiButton.hideFlyout()}.bind(this),onResize:this.props.onResize,onMessageSend:this.$MessengerComposer13,participants:this.props.participants,sharePreview:this.props.sharePreview,smallerEqual640:A,thread:this.props.thread,threadID:y?c("MessengerConstants").NEW_THREAD_KEY:this.props.threadID,pageID:this.$MessengerComposer4(),viewer:this.props.viewer,onFileUpload:this.handleFileUpload,onChange:this.$MessengerComposer14,showMenu:this.state.showMenu,disableInput:this.state.disableInput}),this.$MessengerComposer15(B)))}.bind(this))};w.prototype.$MessengerComposer12=function(x){__p&&__p();if(!x)return null;var y=this.props.fileUploader;if(!y)return null;var z=y.get("uploadedFiles");if(z.size==0)return null;var A=this.props.thread,B=A&&A.custom_color?A.custom_color:"#0084ff";return c("React").createElement(c("BootloadOnRender.react"),{component:c("React").createElement(c("LazyComponent.react"),{files:z,small:false,threadID:x,threadCustomColor:B,onClick:this.$MessengerComposer16,onResize:this.props.onResize}),loader:c("JSResource")("MercuryStageFilePreviewReactComponent").__setRef("MessengerComposer.react"),placeholder:c("React").createElement(c("XUISpinner.react"),{className:"_2qf"})})};w.prototype.$MessengerComposer16=function(x,y){c("MessengerActions").cancelFileUpload(x,y)};w.prototype.$MessengerComposer15=function(x){return this.state.disableInput===true?null:c("React").createElement("div",{ref:function(y){this.refsButtonsContainer=y}.bind(this),className:"_4rv4"},this.$MessengerComposer17(x),this.$MessengerComposer18())};w.prototype.$MessengerComposer17=function(x){if(this.props.hideActions)return null;if(x&&x<u)return c("React").createElement("div",null,c("React").createElement("ul",{className:"_39bj"},this.$MessengerComposer19(),this.$MessengerComposer20(),this.$MessengerComposer21(),this.$MessengerComposer22()),c("React").createElement("ul",{className:"_39bj"},this.$MessengerComposer23(),this.$MessengerComposer24(),this.$MessengerComposer25(),this.$MessengerComposer26(),this.$MessengerComposer27()));return c("React").createElement("ul",{className:"_39bj"},c("CurrentUser").isWorkUser()?this.$MessengerComposer28():null,this.$MessengerComposer19(),this.$MessengerComposer20(),this.$MessengerComposer21(),this.$MessengerComposer22(),this.$MessengerComposer23(),this.$MessengerComposer24(),this.$MessengerComposer25(),this.$MessengerComposer26(),this.$MessengerComposer27())};w.prototype.$MessengerComposer29=function(x){c("MessengerDialogs.bs").showDialog(function(){return c("React").createElement(q,{error:x.error})})};w.prototype.handleTextDropped=function(x){this.refsInput&&this.refsInput.handleTextDropped(x)};w.prototype.$MessengerComposer24=function(){return c("React").createElement("li",null,this.$MessengerComposer31())};w.prototype.$MessengerComposer31=function(){if(!c("P2PGKValues").P2PVisible||!this.props.threadID||this.$MessengerComposer32()||!this.props.p2pPaymentConfig)return null;var x="_30yy _25pc _39bk";return c("React").createElement(c("BootloadOnRender.react"),{component:c("React").createElement(c("LazyComponent.react"),{className:x,ContextualDialog:c("MessengerContextualDialog.react"),threadID:this.props.threadID,p2pPaymentConfig:this.props.p2pPaymentConfig}),loader:c("JSResource")("P2PSendMoneyContainerBootloader.react").__setRef("MessengerComposer.react"),placeholder:c("React").createElement(c("AutoFocusableLink.react"),{className:x,role:"button"})})};w.prototype.$MessengerComposer27=function(){if(c("gkx")("AT7NMH8Fy3EgTAU92jLm_-e65sqgQK-sAjecOeMqKm7I8DjgqesO35iaJSaySvKNghUUIX8H61oA8oRMnPMYOfvy")&&c("gkx")("AT44XpsdaaEfcz2GrZ0m8RNEjrTHpQedGRhxmeB3oGdMvETdQ7vdyzqg8MlOqQGInNDXydDTyvvVR5lvi3VlBp7t")&&this.props.threadID)return c("React").createElement(c("MercuryBootloadOnInteraction.react"),{component:c("React").createElement(c("LazyComponent.react"),{className:"_4rv5 _39bk"+(this.state.flyoutOpen?" _5jhb":""),location:c("MessengerQuickCamOrigins").MESSENGER,threadID:this.props.threadID,viewer:this.props.viewer}),loader:c("JSResource")("MessengerQuickCamButtonHTML5.react").__setRef("MessengerComposer.react"),placeholder:c("React").createElement(c("AutoFocusableLink.react"),{className:"_4rv5 _39bk",role:"button"})});return null};w.prototype.$MessengerComposer23=function(){if(!v)return null;return c("React").createElement("li",null,c("React").createElement(c("MercuryBootloadOnInteraction.react"),{component:c("React").createElement(c("LazyComponent.react"),{onVoiceClipCreate:this.props.onVoiceClipCreate}),loader:c("JSResource")("MessengerVoiceClipButton.react").__setRef("MessengerComposer.react"),placeholder:c("React").createElement(c("AutoFocusableLink.react"),{className:"_4rv7 _39bk _30yy",role:"button"})}))};w.prototype.$MessengerComposer25=function(){if(this.props.thread&&this.props.thread.is_canonical)return null;if(!this.props.threadFBID)return null;return c("React").createElement("li",null,c("React").createElement(c("MercuryBootloadOnInteraction.react"),{component:c("React").createElement(c("LazyComponent.react"),{customColor:this.props.thread&&this.props.thread.custom_color,threadFBID:this.props.threadFBID}),loader:c("JSResource")("MessengerGroupPollingButton.react").__setRef("MessengerComposer.react"),placeholder:c("React").createElement(c("AutoFocusableLink.react"),{className:"_39bk _30yy _2o-b",role:"button"})}))};w.prototype.$MessengerComposer26=function(){var x=c("gkx")("AT4VU3LTU_m0y3MeJeai7hJytsOcRy63JbTrv7QtkGDcMH9aN_sV8sDNC1ebrhVq0RfT0H4FEgW5UVoJHsOiHpnF")&&c("isWebGLEnabled")();return x&&this.props.threadFBID&&!this.$MessengerComposer32()?c("React").createElement("li",null,c("React").createElement(c("MercuryBootloadOnInteraction.react"),{component:c("React").createElement(c("LazyComponent.react"),{customColor:this.props.thread&&this.props.thread.custom_color,threadFBID:this.props.threadFBID}),loader:c("JSResource")("MessengerGamesButton.react").__setRef("MessengerComposer.react"),placeholder:c("React").createElement(c("AutoFocusableLink.react"),{className:"_39bk _30yy _4ce_",role:"button"})})):null};w.prototype.$MessengerComposer33=function(x){return c("React").createElement("li",{className:"_39bk"},c("React").createElement(c("ChatPhotoUploader.react"),{allowCrossPage:true,disabled:!(this.props.threadID||this.$MessengerComposer34()),ref:function(y){return this.refsUploader=y}.bind(this),imageClassName:(x=="files"?"_5vn8":"")+(x=="attachment"?" _46si":""),imagesOnly:x==="files",inputClassname:"_260t",linkClassName:"_30yy _260u",focusInput:this.focusInput,onAllUploadsComplete:this.props.onPhotoUploadComplete,onLastUploadFail:this.props.onPhotoUploadFail,onLastUploadCancel:this.props.onPhotoUploadCancel,onSubmit:this.props.onPhotoUploadSubmit,onUploadError:this.$MessengerComposer29,threadID:this.props.threadID}))};w.prototype.$MessengerComposer19=function(){return this.$MessengerComposer33("files")};w.prototype.$MessengerComposer28=function(){return this.$MessengerComposer33("attachment")};w.prototype.$MessengerComposer35=function(){return this.state.currentValue.length>0||this.$MessengerComposer36()||this.$MessengerComposer37()};w.prototype.$MessengerComposer36=function(){var x=this.props.fileUploader;return Boolean(x&&x.get("uploadedFiles").size>0)};w.prototype.$MessengerComposer37=function(){var x=this.props.sharePreview;return!!(x&&x.params&&x.type)};w.prototype.$MessengerComposer38=function(){var x=this.props.fileUploader;return Boolean(x&&x.get("uploadingFiles").size>0)};w.prototype.$MessengerComposer18=function(){var x=!(this.props.threadID||this.$MessengerComposer34());if(!x&&this.$MessengerComposer35()&&!this.$MessengerComposer38())return c("React").createElement(r,{className:(this.props.threadID?"_30yy":"")+" _38lh _39bl",customColor:this.props.thread&&this.props.thread.custom_color,onClick:this.$MessengerComposer39});return c("React").createElement(c("MessengerHotLikeButton.react"),{className:"_4rv9"+(this.props.threadID?" _30yy":"")+" _39bl",disabled:x,customColor:this.props.thread&&this.props.thread.custom_color,customLike:c("MessengerHotLikeUtils").getCustomEmojiFromThread(this.props.thread)||undefined,sendSticker:this.props.onStickerSelect,sendCustomLike:this.props.onCustomLikeSelect,threadID:this.props.threadID,renderSize:24})};w.prototype.$MessengerComposer20=function(){var x=(this.props.threadID?"_30yy":"")+" _4rv6 _39bk";return c("React").createElement("li",null,c("React").createElement(c("MercuryBootloadOnInteraction.react"),{component:c("React").createElement(c("LazyComponent.react"),{className:x,ContextualDialogClass:c("MessengerContextualDialog.react"),disabled:!(this.props.threadID||this.$MessengerComposer34()),getInput:function(){return this.refsInput}.bind(this),flyoutAlignment:"right",flyoutClassName:"_293j",flyoutWidth:285,onStickerSelect:this.props.onStickerSelect,onEmoticonSelect:this.$MessengerComposer30,threadID:this.props.threadID}),loader:c("JSResource")("ChatStickerButton.react").__setRef("MessengerComposer.react"),placeholder:c("React").createElement(c("AutoFocusableLink.react"),{className:x,role:"button"})}))};w.prototype.$MessengerComposer9=function(){__p&&__p();var x,y=(x=this.props)!=null?(x=x.thread)!=null?x.other_user_fbid:x:x,z=y?c("MercuryParticipants").getNow(c("MercuryIDs").getParticipantIDFromUserID(y)):null,A=z&&z.name||"page";if(this.state.nullStateCTA!==null)switch(this.state.nullStateCTA.action_type){case c("MNCommerceCallToActionType").OPEN_NATIVE:return null;case c("MNCommerceCallToActionType").POSTBACK:if(!c("MNCommercePostbackRefSendManager").hasMDotMeRef(this.$MessengerComposer4())&&!this.state.nullStateCTA.instantgame_metadata)return c("React").createElement("div",{className:"_3zc8"},j._("When you tap {cta title}, {name} will see your public info.",[j.param("cta title",this.state.nullStateCTA.title),j.param("name",A)]));else if(c("MNCommercePostbackRefSendManager").hasMDotMeRef(this.$MessengerComposer4())){var B=this.$MessengerComposer4(),C=z&&z.vanity?"m.me/"+z.vanity:B?"m.me/"+B:"m.me";return c("React").createElement("div",{className:"_3zc8"},j._("When you tap {cta title}, {name} will see your public info and that you opened their {link} link.",[j.param("cta title",this.state.nullStateCTA.title),j.param("name",A),j.param("link",C)]))}break;default:return null}return null};w.prototype.$MessengerComposer21=function(){var x=(this.props.threadID?"_30yy":"")+" _yht _39bk";return c("React").createElement("li",null,c("React").createElement("div",{style:{display:"none"}},c("React").createElement(c("ChatPhotoUploader.react"),{allowCrossPage:true,disabled:false,ref:function(y){return this.refsGifUploader=y}.bind(this),imagesOnly:false,focusInput:this.focusInput,onAllUploadsComplete:this.props.onPhotoUploadComplete,onLastUploadFail:this.props.onPhotoUploadFail,onLastUploadCancel:this.props.onPhotoUploadCancel,onSubmit:this.props.onPhotoUploadSubmit,onUploadError:this.$MessengerComposer29})),c("React").createElement(c("MercuryBootloadOnInteraction.react"),{component:c("React").createElement(c("LazyComponent.react"),{className:x,ContextualDialogClass:c("MessengerContextualDialog.react"),getInput:function(){return this.refsInput}.bind(this),getQuery:function(){return this.refsInput?this.refsInput.getValue():""}.bind(this),location:c("MercuryShareAttachmentRenderLocations").MESSENGER,onSelect:this.$MessengerComposer40}),loader:c("JSResource")("ChatContentSearchButton.react").__setRef("MessengerComposer.react"),placeholder:c("React").createElement(c("AutoFocusableLink.react"),{className:x,role:"button"})}))};w.prototype.$MessengerComposer22=function(){var x=(this.props.threadID?"_30yy":"")+" _5s2p _39bk";return c("React").createElement("li",null,c("React").createElement(c("MercuryBootloadOnInteraction.react"),{component:c("React").createElement(c("LazyComponent.react"),{className:x,ContextualDialogClass:c("MessengerContextualDialog.react"),flyoutAlignment:"right",getInput:function(){return this.refsInput}.bind(this),onSelect:this.$MessengerComposer41,onMount:function(y){return this.refsEmojiButton=y}.bind(this),sendCustomEmoji:this.props.onCustomLikeSelect,threadID:this.props.threadID}),loader:c("JSResource")("ChatEmojiButton.react").__setRef("MessengerComposer.react"),placeholder:c("React").createElement(c("AutoFocusableLink.react"),{className:x,role:"button"})}))};w.prototype.$MessengerComposer8=function(){__p&&__p();var x=this.props.thread,y=!!x&&c("MessageRequestUtils").isFiltered(x),z=c("CurrentUser").getID(),A=c("MercuryIDs").getThreadKeyfromThreadIDUserID(this.props.threadID,z);return c("React").createElement(c("BootloadedComponent.react"),{bootloadPlaceholder:c("React").createElement("div",{style:{height:51}}),bootloadLoader:c("JSResource")("MessengerPendingActions.react").__setRef("MessengerComposer.react"),folder:this.props.thread&&this.props.thread.folder,onAcceptClick:function(){this.$MessengerComposer42().changeFolder(this.props.threadID,c("MessagingTag").INBOX);var B=c("MessengerStateStore").getState().threadIDs;if(B){var C=B.filter(function(D){return this.props.threadID!==D}.bind(this));c("MessengerActions").selectAggregation(C)}this.setState({pendingActionsBypassed:true},function(){return new(c("MessengerMessageRequestsTypedLogger"))().setAction("message_requests_accept_request").setThreadID(c("MercuryIDs").getThreadFBIDFromThreadID(this.props.threadID)).setSurface("thread").setFolderType(y?"other":"pending").setThreadKey(A).setEntryPoint(null).log()}.bind(this))}.bind(this),onDeclineClick:function(){var B=c("MercuryIDs").isGroupChat(this.props.threadID);c("Bootloader").loadModules(["MessengerDeclineDialogReact.bs"],function(C){var D=C.jsComponent;c("MessengerDialogs.bs").showDialog(function(){return c("React").createElement(D,{onBlock:this.$MessengerComposer43,onDelete:this.$MessengerComposer44,onToggle:this.$MessengerComposer45,isGroupChat:B})}.bind(this));new(c("MessengerMessageRequestsTypedLogger"))().setAction("message_requests_decline_attempt").setThreadID(c("MercuryIDs").getThreadFBIDFromThreadID(this.props.threadID)).setSurface("thread").setFolderType("pending").setThreadKey(A).setEntryPoint("inbox_banner").log()}.bind(this),"MessengerComposer.react")}.bind(this),onDeleteClick:function(){c("Bootloader").loadModules(["MessengerFilteredDeleteDialogReact.bs"],function(B){var C=B.jsComponent;c("MessengerDialogs.bs").showDialog(function(){return c("React").createElement(C,{onDelete:this.$MessengerComposer44,onToggle:this.$MessengerComposer45})}.bind(this))}.bind(this),"MessengerComposer.react");new(c("MessengerMessageRequestsTypedLogger"))().setAction("message_requests_decline_attempt").setThreadID(c("MercuryIDs").getThreadFBIDFromThreadID(this.props.threadID)).setSurface("thread").setFolderType("other").setThreadKey(A).setEntryPoint("inbox_banner").log()}.bind(this)})};w.prototype.$MessengerComposer7=function(){__p&&__p();if(!this.props.thread||this.props.view===c("MessengerView").DETAIL.COMPOSE)return null;var x=this.props.thread,y=this.props.participants,z=false,A=false;if(x.cannot_reply_reason==="blocked"){z=true;x.is_canonical===true||k(0);y!=null||k(0);var B=x.other_user_fbid;B!=null||k(0);var C=y.get(c("MercuryIDs").getParticipantIDFromUserID(B));C!=null||k(0);if(C.is_messenger_blocked)A=true}if(z)if(A)return c("React").createElement("div",{className:"_4rv3"},c("React").createElement("div",{className:"_2wy4"},j._("You've blocked messages from this person. {unblock_now_button}",[j.param("unblock_now_button",c("React").createElement(p,{label:j._("Unblock Now"),onClick:this.$MessengerComposer46,type:"secondary"}))])));else return c("React").createElement("div",{className:"_4rv3"},c("React").createElement("div",{className:"_2wy4"},j._("This person isn't available right now.")));return c("React").createElement("div",{className:"_4rv3"},c("React").createElement("div",{className:"_2wy4"},c("MercuryReadOnlyReason").getReason(x.has_email_participant)))};w.prototype.$MessengerComposer47=function(){return c("MercuryThreadActions").getForFBID(this.props.viewer)};w.prototype.$MessengerComposer49=function(){var x,y=(x=this.props)!=null?(x=x.thread)!=null?x.thread_id:x:x;if(y){var z=c("MessengerStateStore").getState().activeThreadID===y;this.$MessengerComposer47().changeFolder(y,"other");z&&c("MessengerActions").selectThread(null)}};w.prototype.$MessengerComposer51=function(){c("MessengerDialogs.bs").removeDialog()};w.prototype.$MessengerComposer50=function(x){var y=this.props.threadID,z=y===c("MessengerStateStore").getState().activeThreadID;this.$MessengerComposer47().blockIgnoreOnMessengerDotCom(z,y,function(){this.$MessengerComposer52(x)}.bind(this))};w.prototype.$MessengerComposer52=function(x){var y=this.props,z=y.threadID,A=y.thread;c("MessengerDialogs.bs").showDialog(function(){return c("React").createElement(o,{participantName:x})});var B=c("CurrentUser").getID(),C=c("MercuryIDs").getThreadKeyfromThreadIDUserID(z,B),D=!!A&&c("MessageRequestUtils").isFiltered(A);new(c("MessengerMessageRequestsTypedLogger"))().setAction("message_requests_block_request").setThreadID(c("MercuryIDs").getThreadFBIDFromThreadID(z)).setSurface("thread").setFolderType(D?c("MessagingTag").OTHER:c("MessagingTag").PENDING).setThreadKey(C).setEntryPoint(null).log()};w.prototype.exitCurrentMode=function(){this.refsInput&&this.refsInput.exitCurrentMode()};w.prototype.$MessengerComposer11=function(){return this.props.view===c("MessengerView").DETAIL.COMPOSE};w.prototype.$MessengerComposer34=function(){return!!(this.$MessengerComposer11()&&this.props.recipients&&this.props.recipients.size)};w.prototype.$MessengerComposer32=function(){return!!this.$MessengerComposer4()};w.prototype.$MessengerComposer4=function(){return c("getPageIDFromThreadID")(this.props.threadID)};w.prototype.$MessengerComposer5=function(){var x=this.$MessengerComposer4();if(x)c("MessengerBotMenuDataFetcher").getHasPageSetting(x,function(y){this.setState({showMenu:y})}.bind(this),function(){this.setState({showMenu:false})}.bind(this),c("MNCommercePageSetting").STRUCTURED_MENU_ENABLED);else this.setState({showMenu:false})};w.prototype.$MessengerComposer6=function(){var x=this.$MessengerComposer4();if(x)c("MessengerBotMenuDataFetcher").getHasPageSetting(x,function(y){this.setState({disableInput:y})}.bind(this),function(){this.setState({disableInput:false})}.bind(this),c("MNCommercePageSetting").COMPOSER_INPUT_DISABLED);else this.setState({disableInput:false})};w.prototype.$MessengerComposer3=function(x,y){var z=x===0,A=!!y;if(A&&z){var B=c("XMNCommercePageNullStateCTAController").getURIBuilder();new(c("AsyncRequest"))().setURI(B.getURI()).setMethod("POST").setData({page_id:y}).setHandler(function(C){if(C&&C.payload)this.setState({showNullState:true,nullStateCTA:C.payload});else this.setState({showNullState:false,disableNullState:false})}.bind(this)).send()}else this.setState({showNullState:false,disableNullState:false})};w.prototype.$MessengerComposer2=function(){return{pendingActionsBypassed:false,currentValue:"",nullStateCTA:null,showMenu:false,disableInput:false,showNullState:false,disableNullState:false}};w.prototype.$MessengerComposer42=function(){return c("MercuryThreadActions").getForFBID(this.props.viewer)};w.prototype.testUtils_renderRawP2PSendMoneyButton=function(){return this.$MessengerComposer31()};w.prototype.replyToMention=function(x){this.refsInput&&this.refsInput.addMention&&this.refsInput.addMention(x)};w.propTypes={canReply:s.bool,disableAutofocus:s.bool,fileUploader:s.object,hideActions:s.bool,mentionsEnabled:s.bool,onCustomLikeSelect:s.func,onMessageSend:s.func,onPhotoUploadComplete:s.func,onPhotoUploadCancel:s.func,onPhotoUploadFail:s.func,onPhotoUploadSubmit:s.func,onResize:s.func,onStickerSelect:s.func.isRequired,onVoiceClipCreate:s.func,p2pPaymentConfig:s.object,participants:s.instanceOf(c("immutable").Map),recipients:s.instanceOf(c("immutable").List),sharePreview:s.object,threadID:s.string,threadFBID:s.string,thread:s.object,view:s.string,viewer:s.string};f.exports=w}),null);
__d("MessengerEmojiUsageUtils",["MessengerSupportedEmojiUtils","Utf16"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h=65039,i={findAllEmojis:function j(k){__p&&__p();var l=[],m=c("MessengerSupportedEmojiUtils").parse(k);m.forEach(function(n){var o=[];n.emoji.forEach(function(p){var q=c("Utf16").decode(p);if(q)o.push(q)});o[o.length-1]===h&&o.pop();l.push(o)});return l}};f.exports=i}),null);
__d("MessengerSimpleDialogReact.bs",["fbt","ReasonReact.bs","MessengerDialogs.bs","MessengerDialogReact.bs","MessengerDialogBodyReact.bs"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i=c("ReasonReact.bs").statelessComponent("MessengerSimpleDialogReact");function j(m){if(m)return 0;else return c("MessengerDialogs.bs").removeDialog(0)}function k(m,n,o){var p=i.slice();p[9]=function(){return c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Dialog[0](0,j,0,0,0,0,0,[c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Header[0](0,0,m)),c("ReasonReact.bs").element(0,0,c("MessengerDialogBodyReact.bs").make(0,[n])),c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Footer[0](0,0,[c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Button[0]([0],[h._("OK")],0,0,0,[0],0,0,[]))]))]))};return p}var l=c("ReasonReact.bs").wrapReasonForJs(i,function(m){return k(m.title,m.body,[])});g.component=i;g.handleToggle=j;g.make=k;g.jsComponent=l}),null);
__d("MessengerComposerContainer.react",["fbt","AsyncUploadRequest","EmojiLikeUtils","EmojiState","EmojiDispatcher","immutable","MercuryAttachment","MercuryAttachmentType","MercuryConfig","MercuryThreadIDMap","MercuryThreadInformer","MercuryIDs","MercuryLocalIDs","MercuryMessageActions","MercuryMessageObject","MercurySendMessageHandler","MercuryThreads","MercuryThreadActions","MercuryTriodeSourceUtil","MessageRequestUtils","MessengerActions","MessengerComposer.react","MessengerComposerActions","MessengerDialogs.bs","MessengerEmojiUsageUtils","MessengerSimpleDialogReact.bs","MessengerView","MNPlatformTagsDataManager","P2PPaymentConfig","PhotosUploadID","React","ReactDOM","SubscriptionsHandler","EmojiStateStore"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i,j,k=c("MessengerSimpleDialogReact.bs").jsComponent,l=c("React").PropTypes;i=babelHelpers.inherits(m,c("React").PureComponent);j=i&&i.prototype;function m(){__p&&__p();var o,p;for(var q=arguments.length,r=Array(q),s=0;s<q;s++)r[s]=arguments[s];return p=(o=j.constructor).call.apply(o,[this].concat(r)),this.$MessengerComposerContainer7=function(t,u,v){__p&&__p();c("EmojiState").updateRecentlyUsed(c("MessengerEmojiUsageUtils").findAllEmojis(t));if(!this.props.canReply){v&&v(null);return false}var w=null,x=false;if(!this.$MessengerComposerContainer14(t,u))x=this.$MessengerComposerContainer15(function(y){__p&&__p();var z=this.$MessengerComposerContainer2.constructUserGeneratedMessageObject(t,c("MercuryTriodeSourceUtil").getMercuryTriodeSource(),y),A=c("MercuryIDs").getUserIDFromThreadID(y);if(c("MNPlatformTagsDataManager").hasThreadTags(A)){var B=c("MNPlatformTagsDataManager").getThreadTags();z.tags=B}if(u){if(u.shareable_attachment)z.shareable_attachment=u.shareable_attachment;if(u.profile_ranges)z.profile_ranges=z.profile_xmd=u.profile_ranges}w=z;return z}.bind(this));v&&v(x?w:null);w=null;return x}.bind(this),this.$MessengerComposerContainer9=function(t,u){this.$MessengerComposerContainer3.cancelAttachmentPlaceholder(u.upload_id,u)}.bind(this),this.$MessengerComposerContainer8=function(t,u){this.$MessengerComposerContainer3.confirmAttachmentPlaceholder(u.upload_id,u)}.bind(this),this.$MessengerComposerContainer10=function(t,u){this.$MessengerComposerContainer3.cancelAttachmentPlaceholder(u.upload_id,u);var v=h._("Upload failed"),w=h._("Please try again. Make sure you are uploading a valid file.");if(u.errorDialogParams){v=u.errorDialogParams.title||v;w=u.errorDialogParams.body||w}this.$MessengerComposerContainer16(v,w)}.bind(this),this.$MessengerComposerContainer11=function(t,u){this.$MessengerComposerContainer15(function(v){return this.$MessengerComposerContainer2.constructAttachmentMessageObject(c("MercuryTriodeSourceUtil").getMercuryTriodeSource(),v)}.bind(this),function(v){this.$MessengerComposerContainer3.addAttachmentPlaceholder(v,u.upload_id,u);this.handleMessageSentToPendingThread()}.bind(this))}.bind(this),this.handleAudioUpload=function(t){var u="upload_"+c("PhotosUploadID").getNewID();this.$MessengerComposerContainer1.sendAttachment(this.props.threadID,n(u),c("MercuryTriodeSourceUtil").getMercuryTriodeSource());var v={};v[u]=t;var w=new(c("AsyncUploadRequest"))(c("MercuryConfig").upload_url).setAllowCrossOrigin(true).setRelativeTo(c("ReactDOM").findDOMNode(this)).setData({voice_clip:true}).setFiles(v);this.$MessengerComposerContainer4.addSubscriptions(w.subscribe("success",function(x,y){return this.$MessengerComposerContainer17(y)}.bind(this)));w.send()}.bind(this),this.$MessengerComposerContainer12=function(t){return this.$MessengerComposerContainer15(function(u){return this.$MessengerComposerContainer2.constructStickerMessageObject(t,c("MercuryTriodeSourceUtil").getMercuryTriodeSource(),u)}.bind(this))}.bind(this),this.$MessengerComposerContainer13=function(t,u,v){var w=this.props.threadID,x=this.$MessengerComposerContainer2.constructUserGeneratedMessageObject(t.emoji,c("MercuryTriodeSourceUtil").getMercuryTriodeSource(),w);x.has_attachment=false;return this.$MessengerComposerContainer15(function(w){c("EmojiLikeUtils").setEmojiSize(x,u);return c("EmojiLikeUtils").setEmojiSource(x,v)})}.bind(this),this.handleMessageSentToPendingThread=function(){if(this.props.thread&&c("MessageRequestUtils").isMessageRequest(this.props.thread))c("MercuryThreadActions").getForFBID(this.props.viewer).movePendingToInbox(this.props.threadID)}.bind(this),p}m.prototype.componentDidMount=function(){this.$MessengerComposerContainer1=c("MercurySendMessageHandler").getForFBID(this.props.viewer);this.$MessengerComposerContainer3=c("MercuryMessageActions").getForFBID(this.props.viewer);this.$MessengerComposerContainer5=c("MercuryThreads").getForFBID(this.props.viewer);this.$MessengerComposerContainer2=c("MercuryMessageObject").getForFBID(this.props.viewer);this.$MessengerComposerContainer6=c("MercuryThreadInformer").getForFBID(this.props.viewer);this.$MessengerComposerContainer4=new(c("SubscriptionsHandler"))();c("EmojiDispatcher").explicitlyRegisterStores([c("EmojiStateStore")]);this.props.onMount&&this.props.onMount(this)};m.prototype.componentWillUnmount=function(){this.$MessengerComposerContainer4.release()};m.prototype.focusInput=function(){this.refsComposer&&this.refsComposer.focusInput&&this.refsComposer.focusInput()};m.prototype.render=function(){return c("React").createElement(c("MessengerComposer.react"),{canReply:this.props.canReply,fileUploader:this.props.fileUploader,mentionsEnabled:true,onMessageSend:this.$MessengerComposerContainer7,onPhotoUploadComplete:this.$MessengerComposerContainer8,onPhotoUploadCancel:this.$MessengerComposerContainer9,onPhotoUploadFail:this.$MessengerComposerContainer10,onPhotoUploadSubmit:this.$MessengerComposerContainer11,onResize:this.props.onResize,onStickerSelect:this.$MessengerComposerContainer12,onCustomLikeSelect:this.$MessengerComposerContainer13,onVoiceClipCreate:this.handleAudioUpload,p2pPaymentConfig:c("P2PPaymentConfig").config,participants:this.props.participants,recipients:this.props.recipients,ref:function(o){return this.refsComposer=o}.bind(this),sharePreview:this.props.sharePreview,threadID:this.props.threadID,threadFBID:this.props.threadFBID,thread:this.props.thread,view:this.props.view,viewer:this.props.viewer})};m.prototype.$MessengerComposerContainer14=function(o,p){if(o)return false;return!(p&&(p.shareable_attachment||p.profile_ranges.length>0))};m.prototype.$MessengerComposerContainer17=function(o){var p=o.getName(),q=o.getResponse().payload.metadata[0].audio_id;this.$MessengerComposerContainer3.confirmAttachmentPlaceholder(p,{upload_id:p,audio_ids:[q]})};m.prototype.handleFileUpload=function(o){__p&&__p();var p=o.reduce(function(p,q){var r=q.type.split("/")[0];if(p[r])p[r].push(q);else p.other.push(q);return p},{audio:[],image:[],other:[]});p.audio.forEach(function(q){return this.handleAudioUpload(q)}.bind(this));if(this.refsComposer)this.refsComposer.handleFileUpload(p.image.concat(p.other))};m.prototype.handleTextDropped=function(o){if(this.refsComposer)this.refsComposer.handleTextDropped(o)};m.prototype.$MessengerComposerContainer15=function(o,p){__p&&__p();var q=this.props.threadID,r=this.props.recipients,s=false;if(!q&&r&&r.size>1){q=c("MercuryLocalIDs").generateThreadID();s=true}if(!q)return false;var t=o(q);if(s){var u=r.map(function(v){return c("MercuryIDs").getParticipantIDFromUserID(v.getUniqueID())}).toArray();this.$MessengerComposerContainer5.createNewLocalThread(q,u);t.offline_threading_id=c("MercuryIDs").tokenize(q).value;t.specific_to_list=u}if(p)p(t);else this.$MessengerComposerContainer3.send(t,this.handleMessageSentToPendingThread);if(this.props.view===c("MessengerView").DETAIL.COMPOSE){if(c("MercuryAttachment").get(t).length>0)c("MessengerComposerActions").moveDraftToNextThread(q);c("MessengerComposerActions").exitComposeState();if(c("MercuryIDs").isLocalThread(q))this.$MessengerComposerContainer6.subscribeOnce("messages-updated",function(v,w){var x=c("MercuryThreadIDMap").get();if(x.canLinkExternally(q))c("MessengerActions").selectThread(q)});else c("MessengerActions").selectThread(q)}this.focusInput();return true};m.prototype.resetDrag=function(){if(this.refsComposer)this.refsComposer.exitCurrentMode()};m.prototype.$MessengerComposerContainer16=function(o,p){c("MessengerDialogs.bs").showDialog(function(){return c("React").createElement(k,{title:o,body:p})})};m.propTypes={canReply:l.bool,fileUploader:l.object,onMount:l.func,onResize:l.func,participants:l.instanceOf(c("immutable").Map),recipients:l.instanceOf(c("immutable").List),sharePreview:l.object,threadID:l.string,threadFBID:l.string,thread:l.object,view:l.string,viewer:l.string};function n(o){return{upload_id:o,preview_attachments:[{upload_id:o,attach_type:c("MercuryAttachmentType").PHOTO,preview_uploading:true}]}}f.exports=m}),null);
__d("MessengerBlockedGroupThreadWarningDialogReact.bs",["fbt","bs_curry","ReasonReact.bs","CacheStorage","MessengerDialogs.bs","MessengerDialogReact.bs","MessengerDialogBodyReact.bs"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i=h._("People you've blocked are in this conversation. If you see this conversation, you'll get each other's messages to the group."),j=h._("See Conversation?"),k=h._("Cancel"),l=h._("Leave Group"),m=h._("See Conversation"),n=new(c("CacheStorage"))("localstorage");function o(v){return"see_blocked_group:"+v}function p(v,w){n.set("see_blocked_group:"+v,w,true);return 0}function q(v){return n.get("see_blocked_group:"+v,false)}var r=c("ReasonReact.bs").statelessComponent("MessengerBlockedGroupThreadWarningDialogReact");function s(v){if(v)return 0;else return c("MessengerDialogs.bs").removeDialog(0)}function t(v,w,x,y,z){__p&&__p();var A=function A(E){E.stopPropagation();c("bs_curry")._1(v,0);return c("MessengerDialogs.bs").removeDialog(0)},B=function B(E){E.stopPropagation();c("bs_curry")._1(w,y);return c("MessengerDialogs.bs").removeDialog(0)},C=function C(E){E.stopPropagation();c("bs_curry")._1(x,y);return c("MessengerDialogs.bs").removeDialog(0)},D=r.slice();D[9]=function(){return c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Dialog[0](0,s,0,0,0,0,0,[c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Header[0](0,0,c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Title[0](0,j)))),c("ReasonReact.bs").element(0,0,c("MessengerDialogBodyReact.bs").make(0,[i])),c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Footer[0](0,0,[c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Button[0]([1],[k],0,0,[C],[1],0,0,[])),c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Button[0]([1],[l],0,0,[B],[1],0,0,[])),c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Button[0]([1],[m],0,["danger"],[A],[0],0,0,[]))]))]))};return D}var u=c("ReasonReact.bs").wrapReasonForJs(r,function(v){return t(v.onSee,v.onLeave,v.onCancel,v.prevThreadID,[])});g.bodyText=i;g.titleText=j;g.cancelText=k;g.leaveText=l;g.seeConvoText=m;g.storage=n;g.getSeeConversationCacheKey=o;g.setWantsToSee=p;g.getWantsToSee=q;g.component=r;g.handleToggle=s;g.make=t;g.jsComponent=u}),null);
__d("MessengerIgnoredGroupThreadWarningDialogReact.bs",["cx","fbt","bs_curry","React","ReasonReact.bs","CacheStorage","MessengerDialogs.bs","MessengerDialogReact.bs","MessengerDialogBodyReact.bs","IgnoreMessagesTypedLogger"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j=i._("People you've ignored are in this group."),k=i._("If you ignore this group, you can find it in Filtered Messages."),l=i._("Ignore group?"),m=i._("Cancel"),n=i._("Ignore Group"),o=i._("See Group"),p=new(c("CacheStorage"))("localstorage");function q(x){return"see_ignored_group:"+x}function r(x,y){p.set("see_ignored_group:"+x,y,true);return 0}function s(x){return p.get("see_ignored_group:"+x,false)}var t=c("ReasonReact.bs").statelessComponent("MessengerIgnoredGroupThreadWarningDialogReact");function u(x){if(x)return 0;else return c("MessengerDialogs.bs").removeDialog(0)}function v(x,y,z,A,B,C){__p&&__p();var D=function D(H){H.stopPropagation();c("bs_curry")._1(x,0);return c("MessengerDialogs.bs").removeDialog(0)},E=function E(H){H.stopPropagation();c("bs_curry")._1(y,A);return c("MessengerDialogs.bs").removeDialog(0)},F=function F(H){H.stopPropagation();c("bs_curry")._1(z,A);return c("MessengerDialogs.bs").removeDialog(0)},G=t.slice();G[9]=function(){var H=new(c("IgnoreMessagesTypedLogger"))().setEvent("group_with_ignored_person_warning").setThreadID(B).setPlatform("messengerdotcom");H.log();return c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Dialog[0](0,u,0,0,0,0,0,[c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Header[0](0,0,c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Title[0](0,[l])))),c("ReasonReact.bs").element(0,0,c("MessengerDialogBodyReact.bs").make(0,[c("React").createElement("div",undefined,j),c("React").createElement("div",{className:"_3-8x"},k)])),c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Footer[0](0,0,[c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Button[0]([1],[m],0,0,[F],[1],0,0,[])),c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Button[0]([1],[o],0,0,[D],[1],0,0,[])),c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Button[0]([1],[n],0,["danger"],[E],[0],0,0,[]))]))]))};return G}var w=c("ReasonReact.bs").wrapReasonForJs(t,function(x){return v(x.onSee,x.onIgnore,x.onCancel,x.prevThreadID,x.threadID,[])});g.bodyTextPeopleInGroup=j;g.bodyTextEffects=k;g.titleText=l;g.cancelText=m;g.ignoreText=n;g.seeConvoText=o;g.storage=p;g.getSeeConversationCacheKey=q;g.setWantsToSee=r;g.getWantsToSee=s;g.component=t;g.handleToggle=u;g.make=v;g.jsComponent=w}),null);
__d("MessengerLeaveGroupAction",["MercuryIDs","MercuryLogMessageType","MercuryMessageActions","MercuryMessageObject","MercuryThreadInfo","MercuryTriodeSourceUtil"],(function a(b,c,d,e,f,g){var h={leaveGroup:function i(j,k){if(c("MercuryThreadInfo").isEmptyLocalThread(j))return;var l=c("MercuryMessageObject").getForFBID(k),m=l.constructLogMessageObject(c("MercuryTriodeSourceUtil").getMercuryTriodeSource(),j.thread_id,c("MercuryLogMessageType").UNSUBSCRIBE,{removed_participants:[c("MercuryIDs").getParticipantIDFromUserID(k)]}),n=c("MercuryMessageActions").getForFBID(k);n.send(m)}};f.exports=h}),null);
__d("MessengerServerErrorDialogReact.bs",["fbt","bs_curry","ReasonReact.bs","MessengerDialogs.bs","MessengerDialogReact.bs","MessengerDialogBodyReact.bs"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i=c("ReasonReact.bs").statelessComponent("MessengerServerErrorDialog");function j(o){if(o)return 0;else return c("MessengerDialogs.bs").removeDialog(0)}var k=h._("An unexpected problem was encountered. Please try again later."),l=h._("Temporary Failure");function m(o,p){var q=i.slice();q[4]=function(){c("bs_curry")._1(o,0);return 0};q[9]=function(){return c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Dialog[0](0,j,0,0,0,0,0,[c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Header[0](0,0,l)),c("ReasonReact.bs").element(0,0,c("MessengerDialogBodyReact.bs").make(0,[k])),c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Footer[0](0,0,[c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Button[0]([0],[h._("OK")],0,0,0,[0],0,0,[]))]))]))};return q}var n=c("ReasonReact.bs").wrapReasonForJs(i,function(o){return m(o.onMount,[])});g.component=i;g.handleToggle=j;g.message=k;g.title=l;g.make=m;g.jsComponent=n}),null);
__d("MessengerConversationContainer.react",["Bootloader","immutable","ImmutableObject","MercuryBlockedParticipants.bs","MercuryIgnoredParticipants.bs","MercuryIDs","MercuryLogMessageType","MercuryMessageStore","MercuryThreadActions","MessagingTagConstants","MessengerActions","MessengerBlockedGroupThreadWarningDialogReact.bs","MessengerConfig","MessengerConversation.react","MessengerDialogs.bs","MessengerHotLikePreviewEvents","MessengerIgnoredGroupThreadWarningDialogReact.bs","MessengerLeaveGroupAction","React","SubscriptionsHandler","MessengerServerErrorDialogReact.bs","gkx"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h,i,j=c("MercuryBlockedParticipants.bs").get(),k=c("MercuryIgnoredParticipants.bs").get(),l=c("MercuryThreadActions").get(),m=c("MessengerServerErrorDialogReact.bs").jsComponent,n=c("React").PropTypes,o=c("MessengerBlockedGroupThreadWarningDialogReact.bs").jsComponent,p=c("MessengerIgnoredGroupThreadWarningDialogReact.bs").jsComponent;h=babelHelpers.inherits(q,c("React").PureComponent);i=h&&h.prototype;function q(){__p&&__p();var r,s;for(var t=arguments.length,u=Array(t),v=0;v<t;v++)u[v]=arguments[v];return s=(r=i.constructor).call.apply(r,[this].concat(u)),this.state={isLoaded:false,isLoading:true,messages:c("immutable").List()},this.$MessengerConversationContainer2=undefined,this.$MessengerConversationContainer3=false,this.$MessengerConversationContainer4=undefined,this.$MessengerConversationContainer5=undefined,this.$MessengerConversationContainer6=undefined,this.$MessengerConversationContainer7=false,this.$MessengerConversationContainer15=function(){var w=this.props.thread;if(w==null)return;c("MessengerBlockedGroupThreadWarningDialogReact.bs").setWantsToSee(w.thread_id,true)}.bind(this),this.$MessengerConversationContainer18=function(){var w=this.props.thread;if(w==null)return;c("MessengerIgnoredGroupThreadWarningDialogReact.bs").setWantsToSee(w.thread_id,true)}.bind(this),this.$MessengerConversationContainer16=function(w){var x=this.props.thread;if(x==null)return;c("MessengerLeaveGroupAction").leaveGroup(x,this.props.viewer);this.$MessengerConversationContainer20(w)}.bind(this),this.$MessengerConversationContainer19=function(w){var x=this.props.thread;if(x==null)return;var y=x.thread_id;l.changeFolder(y,c("MessagingTagConstants").other);c("Bootloader").loadModules(["IgnoreMessagesTypedLogger","IgnoreMessagesLoggingEvent","IgnoreMessagesPlatforms"],function(z,A,B){new z().setEvent(A.IGNORE_CONFIRMED).setThreadID(c("MercuryIDs").getThreadFBIDFromThreadID(y)).setPlatform(B.MESSENGERDOTCOM).log()},"MessengerConversationContainer.react");this.$MessengerConversationContainer20(w)}.bind(this),this.$MessengerConversationContainer17=function(w){this.$MessengerConversationContainer20(w)}.bind(this),this.$MessengerConversationContainer13=function(){if(this.state.isLoading||this.state.isLoaded)return;this.setState({isLoading:true});if(!this.$MessengerConversationContainer1.fetchMoreMessages())this.setState({isLoading:false,isLoaded:true})}.bind(this),s}q.prototype.componentWillUnmount=function(){this.$MessengerConversationContainer2&&this.$MessengerConversationContainer2.release();clearTimeout(this.$MessengerConversationContainer6)};q.prototype.componentDidMount=function(){this.$MessengerConversationContainer8(this.props.threadID);if(this.$MessengerConversationContainer9())this.$MessengerConversationContainer10();else if(this.$MessengerConversationContainer11())this.$MessengerConversationContainer12()};q.prototype.componentDidUpdate=function(r){var s=this.props.threadID!==r.threadID;if(s)if(this.$MessengerConversationContainer9())this.$MessengerConversationContainer10(r.threadID);else if(this.$MessengerConversationContainer11())this.$MessengerConversationContainer12(r.threadID)};q.prototype.componentWillReceiveProps=function(r){if(this.props.threadID!==r.threadID){this.setState({isLoading:true,messages:c("immutable").List()});this.$MessengerConversationContainer8(r.threadID)}};q.prototype.render=function(){var r=this.state.messages,s=r.some(function(t){return t.log_message_type===c("MercuryLogMessageType").SERVER_ERROR});if(c("MessengerConfig").ErrorDialog&&s&&!this.$MessengerConversationContainer7)c("MessengerDialogs.bs").showDialog(function(){return c("React").createElement(m,{onMount:function(){return this.$MessengerConversationContainer7=true}.bind(this)})}.bind(this));return c("React").createElement(c("MessengerConversation.react"),{className:this.props.className,contact:this.props.contact,deliveryReceipts:this.props.deliveryReceipts,fetchMessages:this.$MessengerConversationContainer13,isCanonical:c("MercuryIDs").isCanonical(this.props.threadID),isLoading:this.state.isLoading,isLoaded:this.state.isLoaded,messages:this.state.messages,onRead:this.props.onMarkRead,onVoiceClipCreate:this.props.onVoiceClipCreate,participants:this.props.participants,ref:"conversation",thread:this.props.thread,threadID:this.props.threadID,viewer:this.props.viewer})};q.prototype.handleResize=function(){this.refs.conversation.handleResize()};q.prototype.isScrolledToBottom=function(){return!!(this.refs.conversation&&this.refs.conversation.isScrolledToBottom())};q.prototype.$MessengerConversationContainer9=function(){__p&&__p();var r=this.props.thread;if(r==null)return false;var s=r.thread_id;if(!this.$MessengerConversationContainer14())return false;if(!j.isPresentInGroupThread(r))return false;var t=c("MessengerBlockedGroupThreadWarningDialogReact.bs").getWantsToSee(s);if(t)return false;return true};q.prototype.$MessengerConversationContainer11=function(){__p&&__p();var r=this.props.thread;if(r==null)return false;var s=r.thread_id;if(!this.$MessengerConversationContainer14())return false;if(r.folder!=="inbox")return false;if(!k.isPresentInGroupThread(r))return false;var t=c("MessengerIgnoredGroupThreadWarningDialogReact.bs").getWantsToSee(s);if(t)return false;return c("gkx")("AT4mycXtTvfXJMAqrd_BSmI0_EEB-8pOs_AaNI2VArui1ThGLeffrrAudIg_2uctK6Ji6Zom3olu5BpcCU5_nD4U")};q.prototype.$MessengerConversationContainer14=function(){var r=this.props.thread;if(r==null)return false;if(c("MercuryIDs").isCanonical(this.props.threadID))return false;if(!r.is_subscribed)return false;return true};q.prototype.$MessengerConversationContainer10=function(r){c("MessengerDialogs.bs").showDialog(function(){return c("React").createElement(o,{onSee:this.$MessengerConversationContainer15,onLeave:this.$MessengerConversationContainer16,onCancel:this.$MessengerConversationContainer17,prevThreadID:r})}.bind(this))};q.prototype.$MessengerConversationContainer12=function(r){c("MessengerDialogs.bs").showDialog(function(){return c("React").createElement(p,{onSee:this.$MessengerConversationContainer18,onIgnore:this.$MessengerConversationContainer19,onCancel:this.$MessengerConversationContainer17,prevThreadID:r,threadID:c("MercuryIDs").getThreadFBIDFromThreadID(this.props.threadID)})}.bind(this))};q.prototype.$MessengerConversationContainer20=function(r){if(r==null)c("MessengerActions").selectThread(null);c("MessengerActions").selectThread(r)};q.prototype.$MessengerConversationContainer8=function(r){__p&&__p();if(!r)return;this.setState({isLoaded:false});this.$MessengerConversationContainer1&&this.$MessengerConversationContainer1.destroy();this.$MessengerConversationContainer7=false;this.$MessengerConversationContainer1=new(c("MercuryMessageStore"))(r,c("MessengerConfig").MessageLoadCount);clearTimeout(this.$MessengerConversationContainer6);this.$MessengerConversationContainer6=setTimeout(function(){if(this.props.thread&&this.props.thread.message_count<1)this.setState({isLoaded:true,isLoading:false})}.bind(this),6e3);this.$MessengerConversationContainer2&&this.$MessengerConversationContainer2.release();this.$MessengerConversationContainer2=new(c("SubscriptionsHandler"))();this.$MessengerConversationContainer2.addSubscriptions(this.$MessengerConversationContainer1.subscribe(function(s){this.setState({messages:this.$MessengerConversationContainer21(c("immutable").List(s.messages)),isLoading:false})}.bind(this)),c("MessengerHotLikePreviewEvents").addListener(c("MessengerHotLikePreviewEvents").START,function(s){this.$MessengerConversationContainer3=true;this.$MessengerConversationContainer4=s;this.setState({messages:this.$MessengerConversationContainer21(this.state.messages)});clearInterval(this.$MessengerConversationContainer5);this.$MessengerConversationContainer5=setInterval(this.refs.conversation.scrollToBottom,50)}.bind(this)),c("MessengerHotLikePreviewEvents").addListener(c("MessengerHotLikePreviewEvents").FINISH_ANIMATION,function(r){clearInterval(this.$MessengerConversationContainer5)}.bind(this)),c("MessengerHotLikePreviewEvents").addListener(c("MessengerHotLikePreviewEvents").FINISH_EMOJI_ANIMATION,function(r){clearInterval(this.$MessengerConversationContainer5)}.bind(this)),c("MessengerHotLikePreviewEvents").addListener(c("MessengerHotLikePreviewEvents").STOP,function(){this.$MessengerConversationContainer3=false;this.$MessengerConversationContainer4=null}.bind(this)),c("MessengerHotLikePreviewEvents").addListener(c("MessengerHotLikePreviewEvents").STOP_EMOJI,function(){this.$MessengerConversationContainer3=false;this.$MessengerConversationContainer4=null}.bind(this)),c("MessengerHotLikePreviewEvents").addListener(c("MessengerHotLikePreviewEvents").REMOVE,function(){clearInterval(this.$MessengerConversationContainer5);this.$MessengerConversationContainer3=false;this.setState({messages:this.$MessengerConversationContainer21(this.state.messages)})}.bind(this)))};q.prototype.$MessengerConversationContainer21=function(r){if(this.$MessengerConversationContainer3)r=r.set(r.size,this.$MessengerConversationContainer4);else{r=r.filterNot(function(s){return s.is_like_preview});this.$MessengerConversationContainer4=null}return r};q.propTypes={contact:n.instanceOf(c("ImmutableObject")),deliveryReceipts:n.object,onMarkRead:n.func.isRequired,onVoiceClipCreate:n.func,participants:n.instanceOf(c("immutable").Map),thread:n.object,threadID:n.string.isRequired,viewer:n.string.isRequired};f.exports=q}),null);
__d("MessengerDetailViewHeaderContainer.react",["immutable","ImmutableObject","MercuryIDs","MercuryThreadIDMap","MercuryTypeaheadConstants","MessengerActions","MessengerComposerActions","MessengerComposeViewHeader.react","MessengerDetailViewHeaderReact.bs","MessengerView","React","shallowEqual"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h,i,j=c("MessengerDetailViewHeaderReact.bs").jsComponent,k=c("React").PropTypes;h=babelHelpers.inherits(l,c("React").Component);i=h&&h.prototype;function l(){__p&&__p();var m,n;for(var o=arguments.length,p=Array(o),q=0;q<o;q++)p[q]=arguments[q];return n=(m=i.constructor).call.apply(m,[this].concat(p)),this.$MessengerDetailViewHeaderContainer1=function(r){__p&&__p();var s=r.getUniqueID(),t=r.getType();if(t===c("MercuryTypeaheadConstants").THREAD_TYPE){var u=c("MercuryThreadIDMap").getForFBID(this.props.viewer);u.getClientIDFromServerID(s,function(v){c("MessengerComposerActions").moveDraftToNextThread(v);c("MessengerActions").selectThread(v)});c("MessengerComposerActions").exitComposeState()}else if(s===this.props.viewer||t===c("MercuryTypeaheadConstants").PAGE_TYPE){c("MessengerComposerActions").moveDraftToNextThread(c("MercuryIDs").getThreadIDFromUserID(s));c("MessengerComposerActions").exitComposeState();c("MessengerActions").selectThread(c("MercuryIDs").getThreadIDFromUserID(s))}else c("MessengerComposerActions").addToken(r)}.bind(this),this.$MessengerDetailViewHeaderContainer2=function(r){c("MessengerComposerActions").removeToken(r)},n}l.prototype.shouldComponentUpdate=function(m){var n=m.contactData,o=babelHelpers.objectWithoutProperties(m,["contactData"]),p=this.props,q=p.contactData,r=babelHelpers.objectWithoutProperties(p,["contactData"]);return!c("shallowEqual")(o,r)||!c("shallowEqual")(n,q)};l.prototype.render=function(){return this.props.view===c("MessengerView").DETAIL.COMPOSE?c("React").createElement(c("MessengerComposeViewHeader.react"),{forceHideClearButton:true,onAddRecipient:this.$MessengerDetailViewHeaderContainer1,onRemoveRecipient:this.$MessengerDetailViewHeaderContainer2,onResize:this.props.onResize,recipients:this.props.recipients,viewer:this.props.viewer}):c("React").createElement(j,{contactData:this.props.contactData,infoPanelCollapsed:this.props.infoPanelCollapsed,onInfoPanelToggle:this.props.onInfoPanelToggle,participants:this.props.participants,thread:this.props.thread,viewer:this.props.viewer})};l.propTypes={contactData:k.object,infoPanelCollapsed:k.bool.isRequired,onInfoPanelToggle:k.func.isRequired,onResize:k.func.isRequired,participants:k.instanceOf(c("immutable").Map).isRequired,recipients:k.instanceOf(c("immutable").List).isRequired,thread:k.instanceOf(c("ImmutableObject")),view:k.string,viewer:k.string.isRequired};f.exports=l}),null);
__d("MessengerGraphQLTokenizerReact.bs",["Utils.bs","bs_js_boolean","ReasonReact.bs","bs_js_null_undefined","MessengerGraphQLTokenizer.react"],(function a(b,c,d,e,f,g){"use strict";function h(i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H){return c("ReasonReact.bs").wrapJsForReason(c("MessengerGraphQLTokenizer.react"),{autoFocus:c("bs_js_boolean").to_js_boolean(i),className:c("bs_js_null_undefined").from_opt(j),context:c("bs_js_null_undefined").from_opt(k),defaultEntries:c("bs_js_null_undefined").from_opt(l),enableMessageSearch:c("bs_js_boolean").to_js_boolean(m),includeExistingParticipantIDs:c("bs_js_boolean").to_js_boolean(n),entries:o,excludeGroups:c("bs_js_boolean").to_js_boolean(p),excludePages:c("bs_js_boolean").to_js_boolean(q),forceHideClearButton:c("Utils.bs").optionBoolToNullUndefinedBoolean(r),hasHoverState:c("bs_js_boolean").to_js_boolean(s),onAddEntryAttempt:t,onClear:c("bs_js_null_undefined").from_opt(u),onRemoveEntryAttempt:v,originalEntryIDs:w,placeholder:x,roomAssociatedObject:c("bs_js_null_undefined").from_opt(y),scrollableViewClassName:c("bs_js_null_undefined").from_opt(z),shouldQueryInternalBot:c("bs_js_boolean").to_js_boolean(A),shouldQueryVCEndpoint:c("bs_js_boolean").to_js_boolean(B),tabIndex:c("bs_js_null_undefined").from_opt(C),threadFBID:c("bs_js_null_undefined").from_opt(D),useLayer:c("bs_js_boolean").to_js_boolean(E),viewer:F,width:G},H)}g.make=h}),null);
__d("MessengerAddToConversationDialogReact.bs",["cx","fbt","bs_array","bs_block","bs_curry","React","Utils.bs","immutable","bs_js_boolean","MercuryIDs","bs_pervasives","ReasonReact.bs","bs_js_primitive","MessengerDialogs.bs","MercuryMessageObject","MessengerDialogReact.bs","MercuryLogMessageType","MercuryMessageActions","MercuryTriodeSourceUtil","MessengerAdminGroupUtils","MessengerGraphQLTokenizerReact.bs"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();function j(p,q){if(typeof p==="number")return c("bs_block").__(0,[[c("immutable").List([])]]);else if(p.tag){var r=p[0];return c("bs_block").__(0,[[q[0].filter(function(s){return c("bs_js_boolean").to_js_boolean(+(s.getUniqueID()!==r))})]])}else return c("bs_block").__(0,[[q[0].push(p[0])]])}var k=c("ReasonReact.bs").reducerComponent("MessengerAddToConversationDialogReact");function l(p){if(p)return 0;else return c("MessengerDialogs.bs").removeDialog(0)}function m(p,q,r){__p&&__p();var s=function s(u,v){__p&&__p();var w=v[2],x=w[0].count(),y=+c("MessengerAdminGroupUtils").isJoinableThread(p),z=+c("MessengerAdminGroupUtils").shouldInvite(p),A=0;if(x!==0)if(y!==0)if(z!==0)w[0].forEach(function(B,r,C){var D=c("MercuryIDs").getThreadIDFromUserID(B.getUniqueID());c("MercuryMessageActions").getForFBID(q).send(c("MercuryMessageObject").getForFBID(q).constructUserGeneratedMessageObject(p.joinable_mode.link,c("MercuryTriodeSourceUtil").getMercuryTriodeSource(),D,[]),undefined,undefined);return true});else A=1;else if(z!==0)throw c("bs_pervasives").invalid_arg("Only joinable threads can invite");else A=1;if(A===1)c("MercuryMessageActions").getForFBID(q).send(c("MercuryMessageObject").getForFBID(q).constructLogMessageObject(c("MercuryTriodeSourceUtil").getMercuryTriodeSource(),p.thread_id,c("MercuryLogMessageType").SUBSCRIBE,{added_participants:w[0].map(function(B,r,C){return c("MercuryIDs").getParticipantIDFromUserID(B.getUniqueID())}).toArray()}),undefined,undefined);u.preventDefault();return c("MessengerDialogs.bs").removeDialog(0)},t=k.slice();t[9]=function(u){var v=+c("MessengerAdminGroupUtils").shouldInvite(p),w=c("immutable").Set(c("Utils.bs").arrayCompact(c("bs_array").map(function(x){return c("bs_js_primitive").null_undefined_to_opt(c("MercuryIDs").getUserIDFromParticipantID(x))},p.participants)));return c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Dialog[0](0,l,0,[1],0,["default"],[460],[c("React").createElement("div",{className:"_4jgp"},c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Header[0](0,0,[c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").CancelButton[0](0,[])),c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Title[0](0,[v!==0?i._("Invite More People"):i._("Add More People")])),c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Button[0](0,[i._("Done")],0,0,[c("bs_curry")._1(u[0],s)],[0],0,0,[]))])),c("ReasonReact.bs").element(0,0,c("MessengerGraphQLTokenizerReact.bs").make(1,["_4jgt"],0,0,0,+c("MessengerAdminGroupUtils").useNewGroupMemberSuggestionRanking(),u[2][0],1,1-+c("MessengerAdminGroupUtils").canSeeBotsInGroupTypeahead(),[1],0,function(x){return c("bs_curry")._1(u[4],c("bs_block").__(0,[x]))},[function(){return c("bs_curry")._1(u[4],0)}],function(x){return c("bs_curry")._1(u[4],c("bs_block").__(1,[x.getUniqueID()]))},w,v!==0?i._("Invite to group:"):i._("Add to group:"),c("bs_js_primitive").null_undefined_to_opt(p.associated_object),["_4jgu"],0,0,0,c("bs_js_primitive").null_undefined_to_opt(p.thread_fbid),0,q,460,[])))]))};t[10]=function(){return[c("immutable").List([])]};t[12]=j;return t}var n=c("ReasonReact.bs").wrapReasonForJs(k,function(p){return m(p.thread,p.viewer,[])}),o=460;g.reducer=j;g.component=k;g.dialogWidth=o;g.handleToggle=l;g.make=m;g.jsComponent=n}),null);
__d("CustomColorHighlightingReact.bs",["ReasonReact.bs","bs_js_null_undefined","CustomColorHighlighting.react"],(function a(b,c,d,e,f,g){"use strict";function h(i,j){return c("ReasonReact.bs").wrapJsForReason(c("CustomColorHighlighting.react"),{customColor:c("bs_js_null_undefined").from_opt(i)},j)}g.make=h}),null);
__d("MessengerInfoPanelSectionReact.bs",["cx","fbt","React","Utils.bs","bs_js_boolean","Link.react","ReasonReact.bs","bs_js_primitive","bs_js_null_undefined","MessengerMenuReact.bs","MessengerMenu.react","MessengerPopoverMenuReact.bs","MessengerWebDriverTestIDs","CustomColorHighlightingReact.bs"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j=c("ReasonReact.bs").statelessComponent("MessengerInfoPanelSectionReact");function k(o,p){var q=c("Utils.bs").isSomeTrue(o),r=q!==0?i._("Show section"):i._("Hide section");return c("ReasonReact.bs").element(0,0,c("MessengerMenuReact.bs").Menu[0]([c("React").createElement(c("MessengerMenu.react").Item,{"data-testid":c("MessengerWebDriverTestIDs").INFO_PANEL_TOGGLER_OPTION,label:r,onclick:c("bs_js_null_undefined").from_opt(p)},r)]))}function l(o,p,q,r){var s=c("Utils.bs").isSomeTrue(o);if(s!==0)return c("ReasonReact.bs").element(0,0,c("MessengerPopoverMenuReact.bs").make(0,0,0,k(p,q),0,0,[c("React").createElement(c("Link.react"),{"aria-haspopup":1,"aria-label":i._("Info panel options for {sectionName}",[i.param("sectionName",r)]),className:"_1lj1",role:"button"})]));else return null}function m(o,p,q,r,s,t){__p&&__p();var u=j.slice();u[9]=function(){var v;if(s){var w=s[0];v=c("React").createElement("h4",{className:"_1lj0"},w,l(p,q,r,w))}else v=null;return c("React").createElement("div",{className:"_1lix"+(c("bs_js_boolean").to_js_boolean(c("Utils.bs").isSomeTrue(p))?" _1liy":"")+(c("bs_js_boolean").to_js_boolean(c("Utils.bs").isSomeTrue(p)&&c("Utils.bs").isSomeTrue(q))?" _1liz":"")},c("React").createElement("div",{className:"_1li-"}),v,c("React").createElement("div",{className:"_1li_"},c("ReasonReact.bs").element(0,0,c("CustomColorHighlightingReact.bs").make(o,t))))};return u}var n=c("ReasonReact.bs").wrapReasonForJs(j,function(o){return m(c("bs_js_primitive").null_undefined_to_opt(o.customColor),c("Utils.bs").nullUndefinedBooleanToOptionBool(o.isCollapsible),c("Utils.bs").nullUndefinedBooleanToOptionBool(o.isCollapsed),c("bs_js_primitive").null_undefined_to_opt(o.onToggle),c("bs_js_primitive").null_undefined_to_opt(o.title),o.children)});g.component=j;g.renderMenu=k;g.renderToggle=l;g.make=m;g.jsComponent=n}),null);
__d("MessengerInfoPanelAssociatedObjectSection.react",["cx","fbt","CurrentUser","Image.react","Link.react","MessageThreadAssociatedObjectKey","MessengerInfoPanelSectionReact.bs","React","TimeSpentRoomTypeEnum","TimeSpentRoomTypeEnum$FbtEnum"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j,k,l=c("MessengerInfoPanelSectionReact.bs").jsComponent,m=c("React").PropTypes;j=babelHelpers.inherits(n,c("React").PureComponent);k=j&&j.prototype;n.prototype.render=function(){var o=this.props,p=o.isCollapsed,q=o.onToggle,r=o.associatedObject,s=o.customColor,t=r[c("MessageThreadAssociatedObjectKey").ACTION_LINK];return c("React").createElement(l,{customColor:s,isCollapsible:true,isCollapsed:p,onToggle:q,title:i._("Part of")},c("React").createElement(c("Link.react"),{href:t,target:"_blank",style:{textDecoration:"none"},className:"_35-k"},this.$MessengerInfoPanelAssociatedObjectSection1(),this.$MessengerInfoPanelAssociatedObjectSection2()))};n.prototype.$MessengerInfoPanelAssociatedObjectSection1=function(){var o=this.props.associatedObject,p=o[c("MessageThreadAssociatedObjectKey").PROFILE_PICTURE];return c("React").createElement("div",null,c("React").createElement(c("Image.react"),{className:"_35-n",src:p}))};n.prototype.$MessengerInfoPanelAssociatedObjectSection2=function(){var o=this.props.associatedObject,p=o[c("MessageThreadAssociatedObjectKey").NAME],q=c("TimeSpentRoomTypeEnum")[o[c("MessageThreadAssociatedObjectKey").ROOM_TYPE]],r=c("CurrentUser").isWorkUser()?"Workplace":"Facebook";return c("React").createElement("div",{className:"_35-o"},c("React").createElement("div",{className:"_35-p"},p),c("React").createElement("div",{className:"_35-q"},i._({"EVENT":"Go to {productName} Event","GROUP":"Go to {productName} Group"},[i.param("productName",r),i["enum"](q,c("TimeSpentRoomTypeEnum$FbtEnum"))])))};function n(){j.apply(this,arguments)}n.propTypes={isCollapsed:m.bool.isRequired,onToggle:m.func.isRequired,customColor:m.string,associatedObject:m.instanceOf(Object).isRequired};f.exports=n}),null);
__d("MessengerApprovalRequester.react",["cx","fbt","Link.react","MercuryThreadActions","MessengerContactImageReact.bs","MessengerTextWithEmoticons.react","React"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j,k,l=c("MercuryThreadActions").get(),m=c("MessengerContactImageReact.bs").jsComponent,n=32;j=babelHelpers.inherits(o,c("React").Component);k=j&&j.prototype;o.prototype.render=function(){var p=this.props,q=p.isMessengerUser,r=p.imageSRC,s=p.name,t=c("React").createElement(c("MessengerTextWithEmoticons.react"),{renderEmoticons:true,renderEmoji:true,text:s});return c("React").createElement("div",{className:"_3szn _3szo"},c("React").createElement("div",{className:"_3szq _4fq"},c("React").createElement(m,{className:"_5l39 _5rmm",isMessengerUser:q,size:n,src:r}),c("React").createElement("span",{className:"_3tkx"},t)),c("React").createElement("div",{className:"_3ihq _4fs"},c("React").createElement(c("Link.react"),{className:"_5a73",href:"#",onClick:this.$MessengerApprovalRequester1.bind(this)},i._("Accept")),c("React").createElement(c("Link.react"),{className:"_5a73",href:"#",onClick:this.$MessengerApprovalRequester2.bind(this)},i._("Ignore"))))};o.prototype.$MessengerApprovalRequester1=function(event){var p=this.props,q=p.threadFBID,r=p.userID;l.acceptToJoinableGroup(q,r)};o.prototype.$MessengerApprovalRequester2=function(event){var p=this.props,q=p.threadFBID,r=p.userID;l.rejectToJoinableGroup(q,r)};function o(){j.apply(this,arguments)}f.exports=o}),null);
__d("MessengerInfoPanelGroupSection.react",["cx","fbt","FBToggleSwitch.react","immutable","MercuryIDs","MercuryParticipants","MercuryThreadActions","MessengerAdminGroupUtils","MessengerApprovalModeTypes","MessengerApprovalRequester.react","MessengerInfoPanelSectionReact.bs","React"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j,k,l=c("MercuryThreadActions").get(),m=c("MessengerInfoPanelSectionReact.bs").jsComponent;j=babelHelpers.inherits(n,c("React").Component);k=j&&j.prototype;function n(o){k.constructor.call(this,o);this.state={approvalQueue:c("immutable").Map()}}n.prototype.componentDidMount=function(){this.$MessengerInfoPanelGroupSection1(this.props.thread)};n.prototype.render=function(){return c("React").createElement("div",null,c("React").createElement(m,{customColor:this.props.thread.custom_color,isCollapsible:true,isCollapsed:this.props.isOptionsCollapsed,onToggle:this.props.onOptionsToggle,title:i._("Group Options")},c("React").createElement("div",{className:"_3iho"},this.$MessengerInfoPanelGroupSection2(),this.$MessengerInfoPanelGroupSection3())),this.$MessengerInfoPanelGroupSection4())};n.prototype.componentWillReceiveProps=function(o){this.$MessengerInfoPanelGroupSection1(o.thread)};n.prototype.$MessengerInfoPanelGroupSection1=function(o){var p=o&&o.approval_queue_ids;if(p)c("MercuryParticipants").getMulti(p,function(q){this.setState({approvalQueue:c("immutable").Map(q)})}.bind(this))};n.prototype.$MessengerInfoPanelGroupSection2=function(){var o=this.props.thread,p=o.joinable_mode.link;if(!c("MessengerAdminGroupUtils").showJoinableLink(o))return null;return c("React").createElement("div",{className:"_3szn _3szo"},c("React").createElement("div",{className:"_3szq"},i._("Share the link"),c("React").createElement("div",{className:"_3ihp _3oh-"},p)))};n.prototype.$MessengerInfoPanelGroupSection3=function(){var o=this.props,p=o.viewer,q=o.thread,r=c("MessengerAdminGroupUtils").isApprovalOpenThread(q);if(!c("MessengerAdminGroupUtils").showJoinableApprovalToggle(q,p))return null;return c("React").createElement("div",{className:"_3szn _3szo"},c("React").createElement("div",{className:"_3szq"},i._("New member approval"),c("React").createElement("div",{className:"_3ihp"},i._("Approve who can join the group"))),c("React").createElement("div",{className:"_3ihq"},c("React").createElement(c("FBToggleSwitch.react"),{animate:true,checked:!r,onToggle:function s(t){return l.setApprovalMode(t?c("MessengerApprovalModeTypes").APPROVALS:c("MessengerApprovalModeTypes").OPEN,q)}})))};n.prototype.$MessengerInfoPanelGroupSection4=function(){var o=this.props,p=o.viewer,q=o.thread,r=0;if(q&&q.approval_queue_ids&&q.approval_queue_ids.length)r=q.approval_queue_ids.length;if(!c("MessengerAdminGroupUtils").showApprovalQueue(q,p))return null;return c("React").createElement(m,{customColor:this.props.thread.custom_color,isCollapsible:true,isCollapsed:this.props.isApprovalsCollapsed,onToggle:this.props.onApprovalToggle,title:i._("Pending Requests ({pendingRequestCount})",[i.param("pendingRequestCount",r)])},c("React").createElement("div",{className:"_3iho _3oh-"},this.state.approvalQueue.map(function(s){return c("React").createElement(c("MessengerApprovalRequester.react"),{key:s.id,imageSRC:s.image_src,isMessengerUser:s.is_messenger_user,name:s.name,threadFBID:this.props.thread.thread_fbid,userID:c("MercuryIDs").getUserIDFromParticipantID(s.id)})}.bind(this)).toArray()))};f.exports=n}),null);
__d("MessengerInfoPanelContactNameSectionReact.bs",["cx","React","ReasonReact.bs","bs_js_primitive","MessengerLocalTimeReact.bs","MessengerPresenceStatusReact.bs"],(function a(b,c,d,e,f,g,h){"use strict";var i=c("ReasonReact.bs").statelessComponent("MessengerInfoPanelContactNameSectionReact");function j(k,l,m,n,o,p){var q=i.slice();q[9]=function(){return c("React").createElement("div",{className:"_2jnq"},o,c("React").createElement("div",{className:"_2jnt"},c("React").createElement("div",{className:"_3eur"},c("React").createElement("span",{className:"_3oh-"},k.name)),c("React").createElement("div",{className:"_3eus"},c("ReasonReact.bs").element(0,0,c("MessengerPresenceStatusReact.bs").make(0,l,m,n,[]))),c("React").createElement("div",undefined,c("ReasonReact.bs").element(0,0,c("MessengerLocalTimeReact.bs").make("_5uh",c("bs_js_primitive").null_undefined_to_opt(k.timezone),[])))))};return q}g.component=i;g.make=j}),null);
__d("MercuryGenericConstants",[],(function a(b,c,d,e,f,g){f.exports=Object.freeze({MAX_THREAD_NAME_LENGTH:250})}),null);
__d("createContentStateForTextWithMessengerEmoji",["ContentState","DraftModifier","MessengerSupportedEmojiUtils","insertMessengerEmojiIntoContentState"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();function h(i){__p&&__p();var j=c("ContentState").createFromText("");while(i){var k=c("MessengerSupportedEmojiUtils").getEmojiMatchObj(i);if(k){var l=k.offset+k.length,m=i.substr(0,k.is_supported?k.offset:l),n=i.substr(l);j=c("DraftModifier").insertText(j,j.getSelectionAfter(),m);if(k.is_supported)j=c("insertMessengerEmojiIntoContentState")(k.emoji_key,j,j.getSelectionAfter(),j.getFirstBlock().getInlineStyleAt(0));i=n}else break}if(i)j=c("DraftModifier").insertText(j,j.getSelectionAfter(),i);return j}f.exports=h}),null);
__d("getVisibleValueForContentState",["DraftEntity","emptyFunction"],(function a(b,c,d,e,f,g){__p&&__p();function h(i){__p&&__p();var j=i.getBlockMap().map(function(k){__p&&__p();var l=k.getText(),m="";k.findEntityRanges(c("emptyFunction").thatReturnsTrue,function(n,o){__p&&__p();var p=k.getEntityAt(n);if(p===null)m+=l.slice(n,o);else{var q=c("DraftEntity").get(p);if(q.getType()==="EMOTICON")m+=q.getData().originalEmoticon;else if(q.getType()==="EMOJI")m+=q.getData().emoji.join("");else m+=l.slice(n,o)}});return m});return j.join("\n")}f.exports=h}),null);
__d("MessengerTextWithEmojiInput.react",["cx","CompositeDraftDecorator","ContentState","DraftEditor.react","EditorState","MessengerEmojiSpan.react","React","XUICloseButton.react","createContentStateForTextWithMessengerEmoji","getEntityMatcher","getVisibleValueForContentState","getVisibleValueForContentStateWithMessengerEmoji","handleBeforeInputForMessengerEmoji","joinClasses"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i,j,k=c("React").PropTypes;i=babelHelpers.inherits(l,c("React").PureComponent);j=i&&i.prototype;function l(){__p&&__p();var m,n;for(var o=arguments.length,p=Array(o),q=0;q<o;q++)p[q]=arguments[q];return n=(m=j.constructor).call.apply(m,[this].concat(p)),this.$MessengerTextWithEmojiInput5=function(r){if(r!==this.state.editorState){var s=!r.getCurrentContent().hasText();this.setState({editorState:r,isEmpty:s});this.props.onChange&&this.props.onChange(r)}}.bind(this),this.$MessengerTextWithEmojiInput2=function(){return new(c("CompositeDraftDecorator"))([{strategy:c("getEntityMatcher")(function(r){return r.getType()==="EMOJI"}),component:c("MessengerEmojiSpan.react")}])},this.focusInput=function(){this.refs.input.focus();this.$MessengerTextWithEmojiInput5(c("EditorState").moveFocusToEnd(this.state.editorState))}.bind(this),this.$MessengerTextWithEmojiInput3=function(r,s){if(this.props.maxLength&&this.props.maxLength<=this.getValue().length)return"handled";var t=c("handleBeforeInputForMessengerEmoji")(s,r);if(t===s)return"not-handled";this.setState({editorState:t});return"handled"}.bind(this),this.$MessengerTextWithEmojiInput4=function(r,s){this.props.onReturn&&this.props.onReturn(r,s);return"handled"}.bind(this),this.$MessengerTextWithEmojiInput6=function(){this.setState({editorState:this.$MessengerTextWithEmojiInput1("")})}.bind(this),this.state={editorState:this.$MessengerTextWithEmojiInput1(this.props.initialValue),isEmpty:!this.props.initialValue||this.props.initialValue.length===0},n}l.prototype.$MessengerTextWithEmojiInput1=function(m){return c("EditorState").createWithContent(c("createContentStateForTextWithMessengerEmoji")(m||""),this.$MessengerTextWithEmojiInput2())};l.prototype.componentDidMount=function(){this.focusInput()};l.prototype.render=function(){var m=this.props.placeholder&&this.props.placeholder.toString();return c("React").createElement("div",{className:c("joinClasses")(this.props.className,"_30e7")},c("React").createElement("div",{className:"_5j5f _3oh-"},c("React").createElement(c("DraftEditor.react"),{editorState:this.state.editorState,handleBeforeInput:this.$MessengerTextWithEmojiInput3,handleReturn:this.$MessengerTextWithEmojiInput4,onChange:this.$MessengerTextWithEmojiInput5,placeholder:m,ref:"input",spellCheck:false,stripPastedStyles:true,textAlignment:"left"})),c("React").createElement(c("XUICloseButton.react"),{size:"small",onMouseDown:this.$MessengerTextWithEmojiInput6,className:(this.state.isEmpty?"hidden_elem":"")+" _5j5l"}))};l.prototype.getValue=function(){var m=this.state.editorState.getCurrentContent();return c("getVisibleValueForContentStateWithMessengerEmoji")(m)};l.propTypes={onReturn:k.func,maxLength:k.number,onChange:k.func,placeholder:k.node,initialValue:k.string};f.exports=l}),null);
__d("MessengerTextWithEmojiInputReact.bs",["ReasonReact.bs","bs_js_null_undefined","MessengerTextWithEmojiInput.react"],(function a(b,c,d,e,f,g){"use strict";function h(i,j,k,l,m,n,o){return c("ReasonReact.bs").wrapJsForReason(c("MessengerTextWithEmojiInput.react"),{className:c("bs_js_null_undefined").from_opt(i),onReturn:c("bs_js_null_undefined").from_opt(j),maxLength:c("bs_js_null_undefined").from_opt(k),onChange:c("bs_js_null_undefined").from_opt(l),placeholder:c("bs_js_null_undefined").from_opt(m),initialValue:c("bs_js_null_undefined").from_opt(n)},o)}g.make=h}),null);
__d("MessengerThreadPhotoUploader.react",["cx","fbt","FileInput","FileInputUploader","Link.react","MercuryConfig","React","ReactDOM","SubscriptionsHandler"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j=c("React").PropTypes,k=c("React").createClass({displayName:"MessengerThreadPhotoUploader",_fileInput:null,_subscriptions:null,_uploader:null,_uploadIsInProgress:false,propTypes:{onComplete:j.func.isRequired,onFail:j.func,onStart:j.func,uri:j.string},getDefaultProps:function l(){return{uri:c("MercuryConfig").upload_url}},componentDidMount:function l(){var m=c("ReactDOM").findDOMNode(this.refs.input),n=new(c("FileInput"))(c("ReactDOM").findDOMNode(this.refs.form),c("ReactDOM").findDOMNode(this.refs.uploadButton),m),o=new(c("FileInputUploader"))(m).setURI(this.props.uri).setAllowCrossOrigin(true).setAllowCrossPageTransition(true).setData({images_only:true}),p=new(c("SubscriptionsHandler"))();p.addSubscriptions(o.subscribe("success",this._handleAllUploadsCompleted),o.subscribe("failure",this._handleLastUploadFailed));this._subscriptions=p;this._uploader=o;this._fileInput=n},componentWillUnmount:function l(){if(!this._uploadIsInProgress)this._doUnmountComponents()},render:function l(){var m=i._("Click to change the image");return c("React").createElement("form",{action:this.props.uri,method:"post",ref:"form"},c("React").createElement("input",{type:"hidden",name:"attach_id",ref:"attachID"}),c("React").createElement("input",{type:"hidden",name:"images_only",value:"true"}),c("React").createElement("div",{className:"_m _4q60 _2lyy"},c("React").createElement(c("Link.react"),{className:"_4q61 _2lyz",ref:"uploadButton"},i._("edit")),c("React").createElement("input",{type:"file",className:"_n",name:"attachment[]",accept:".jpg,.png,.jpeg,.bmp,.tif,.tiff",ref:"input",onChange:this._handleFileInputChange,title:m})))},_handleAllUploadsCompleted:function l(m,n){this._uploadIsInProgress=false;this.props.onComplete&&this.props.onComplete(n.response.payload);if(!this.isMounted())this._doUnmountComponents()},_handleLastUploadFailed:function l(m,n){this._uploadIsInProgress=false;this.props.onFail&&this.props.onFail(n);if(!this.isMounted())this._doUnmountComponents()},_handleFileInputChange:function l(m){if(m.target.value&&this._uploader){this._uploader.send();this._uploadIsInProgress=true;this.props.onStart&&this.props.onStart()}},_doUnmountComponents:function l(){this._subscriptions&&this._subscriptions.release();this._fileInput&&this._fileInput.destroy();delete this._subscriptions;delete this._uploader}});f.exports=k}),null);
__d("MessengerThreadPhotoUploaderReact.bs",["ReasonReact.bs","bs_js_null_undefined","MessengerThreadPhotoUploader.react"],(function a(b,c,d,e,f,g){"use strict";function h(i,j,k,l,m){return c("ReasonReact.bs").wrapJsForReason(c("MessengerThreadPhotoUploader.react"),{onComplete:i,onFail:c("bs_js_null_undefined").from_opt(j),onStart:c("bs_js_null_undefined").from_opt(k),uri:c("bs_js_null_undefined").from_opt(l)},m)}g.make=h}),null);
__d("MessengerInfoPanelThreadNameSectionReact.bs",["cx","fbt","Keys.bs","bs_block","bs_curry","React","bs_string","bs_js_boolean","ReasonReact.bs","MessagingTag","setImmediate","MessengerButtonReact.bs","MessengerSpinnerReact.bs","MercuryGenericConstants","MercuryThreadTitleReact.bs","MessengerTextWithEmojiInputReact.bs","MessengerThreadPhotoUploaderReact.bs"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();function j(q,r){var s=r[2][1][0];if(s)return s[0].focusInput();else return 0}function k(){return c("React").createElement("div",{className:"_2jnw"},c("ReasonReact.bs").element(0,0,c("MessengerSpinnerReact.bs").make(0,0,0,[])))}function l(q,r){var s=r[2][2][0];if(s)return s[0].focus();else return 0}function m(q,r){r[2][1][0]=q==null?0:[q];return 0}function n(q,r){r[2][2][0]=q==null?0:[q];return 0}var o=c("ReasonReact.bs").reducerComponentWithRetainedProps("MessengerInfoPanelThreadNameSectionReact");function p(q,r,s,t,u,v,w,x,y){__p&&__p();var z=function z(E,F){E.stopPropagation();var G=F[2][1][0];if(G)c("bs_curry")._1(r,c("bs_string").trim(G[0].getValue()));return c("bs_curry")._1(c("setImmediate"),c("bs_curry")._1(F[0],l))},A=function A(E,y){if(E.currentTarget.contains(E.relatedTarget)){E.stopPropagation();return 0}else if(w>=2)return c("bs_curry")._1(v,0);else return c("bs_curry")._1(v,1)},B=function B(E){return c("React").createElement("div",{className:"_2jnx",onBlur:c("bs_curry")._1(E[0],A)},c("React").createElement("div",{className:"_2jny"},c("ReasonReact.bs").element(0,[c("bs_curry")._1(E[0],m)],c("MessengerTextWithEmojiInputReact.bs").make(["_2jnz"],[c("bs_curry")._1(E[0],z)],[c("MercuryGenericConstants").MAX_THREAD_NAME_LENGTH],0,[i._("Name This Conversation")],[u.name],[]))),c("React").createElement("div",{className:"_2jn-"},c("ReasonReact.bs").element(0,0,c("MessengerButtonReact.bs").make(0,["button"],0,0,[c("bs_curry")._1(E[0],z)],0,0,0,0,i._("Done"),0,0,0,0,[]))))},C=function C(E,y){E.stopPropagation();if(q!==0&&w===1)return c("bs_curry")._1(v,0);else return 0},D=function D(E,y){var F=E.charCode;if(w!==1||!(F===c("Keys.bs").$$return||F===c("Keys.bs").space))return 0;else{E.preventDefault();E.stopPropagation();if(q)return c("bs_curry")._1(v,0);else return 0}};return[o[0],o[1],o[2],function(E){var F=E[2],G=+(E[3][1]!==u);return[G!==0?0:F[0],F[1],F[2]]},o[4],function(E){var F=E[0],G=F[3][0];if(G!==1||w===1)return 0;else{setTimeout(c("bs_curry")._1(F[0],j),1);return 0}},o[6],o[7],o[8],function(E){var F=E[4],G=E[2],H=E[0],I=w!==1?1:0,J=G[0],K=q&&+(u.folder===c("MessagingTag").INBOX);return c("React").createElement("div",{className:"_2jnq"},c("React").createElement("div",{className:"_2jnr"+(c("bs_js_boolean").to_js_boolean(G[0])?" _2jns":"")},t,J!==0?k(0):null,K!==0?c("ReasonReact.bs").element(0,0,c("MessengerThreadPhotoUploaderReact.bs").make(function(L){return c("bs_curry")._1(F,[L])},[function(){return c("bs_curry")._1(F,0)}],[function(){return c("bs_curry")._1(F,1)}],0,[])):null),c("React").createElement("div",{ref:c("bs_curry")._1(H,n),className:"_2jnt"+(c("bs_js_boolean").to_js_boolean(1-I)?" _1sw_":"")+(c("bs_js_boolean").to_js_boolean(1-q)?" disabled":""),role:I!==0?"":"button",tabIndex:0,onKeyPress:c("bs_curry")._1(H,D),onClick:c("bs_curry")._1(H,C)},c("React").createElement("div",{className:"_2jnu"},I!==0?B(E):c("ReasonReact.bs").element(0,0,c("MercuryThreadTitleReact.bs").make(["_2jnv"],0,u,x,0,[0],[0],0,[])))))},function(){return[0,[0],[0]]},[w,u],function(E){__p&&__p();if(typeof E==="number")if(E!==0)return function(F){return c("bs_block").__(0,[[1,F[1],F[2]]])};else return function(F){return c("bs_block").__(0,[[0,F[1],F[2]]])};else{c("bs_curry")._1(s,[u.thread_id,E[0]]);return function(F){return c("bs_block").__(0,[[0,F[1],F[2]]])}}},o[13],o[14]]}g.focusThreadNameInput=j;g.renderSpinner=k;g.focusEditThreadNameButton=l;g.setRefThreadNameInput=m;g.setRefEditThreadNameButton=n;g.component=o;g.make=p}),null);
__d("MessengerInfoPanelNameSectionReact.bs",["cx","bs_block","bs_curry","React","ReasonReact.bs","bs_js_primitive","MercuryThreadInfo","MessengerAdminGroupUtils","MessengerThreadImageReact.bs","MessengerThreadlistRowActionsReact.bs","MessengerInfoPanelThreadNameSectionReact.bs","MessengerInfoPanelContactNameSectionReact.bs"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i=c("ReasonReact.bs").reducerComponentWithRetainedProps("MessengerInfoPanelNameSectionReact");function j(o,p){p[2][2][0]=o==null?0:[o];return 0}function k(o,p,q){return c("React").createElement("div",{className:"_1jt8"},c("ReasonReact.bs").element(0,0,c("MessengerThreadImageReact.bs").make(0,0,0,[50],o,p,q,[])))}function l(o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M){__p&&__p();var N=function N(Q){var R=Q[4],S=+K.is_subscribed&&1-+K.is_canonical&&+c("MessengerAdminGroupUtils").canUpdateThreadCustomization(K,L);return c("React").createElement("div",{className:"_3-ne"},c("ReasonReact.bs").element(0,0,c("MessengerThreadlistRowActionsReact.bs").make(0,o,+c("MessengerAdminGroupUtils").isGroupChat(K),+c("MessengerAdminGroupUtils").isJoinableThread(K),+c("MercuryThreadInfo").isMuted(K),Q[2][0],+(K.unread_count>0),q,y,s,t,u,v,w,x,[function(){return c("bs_curry")._1(R,0)}],function(T){return c("bs_curry")._1(R,c("bs_block").__(1,[+T]))},B,C,D,E,I,0,F,[S],[J],0,K,[])))},O=function O(Q){return c("bs_curry")._2(A,Q[0],Q[1])},P=i.slice();P[3]=function(Q){var R=Q[2],S=+(Q[3]===K);return[R[0],S!==0?R[1]:1,R[2]]};P[9]=function(Q){__p&&__p();var R=+(K.is_subscribed||K.is_canonical),S;if(o)S=c("ReasonReact.bs").element(0,0,c("MessengerInfoPanelContactNameSectionReact.bs").make(o[0],p,r,H,k(G,K,L),[]));else{var T=+c("MessengerAdminGroupUtils").canUpdateThreadCustomization(K,L);S=c("ReasonReact.bs").element(0,[c("bs_curry")._1(Q[0],j)],c("MessengerInfoPanelThreadNameSectionReact.bs").make(T,function(U){if(U!==K.name)c("bs_curry")._1(z,U);return c("bs_curry")._1(Q[4],1)},O,k(G,K,L),K,function(U){return c("bs_curry")._1(Q[4],c("bs_block").__(0,[U]))},Q[2][1],L,[]))}return c("React").createElement("div",{className:"_1jt6"},S,R!==0?N(Q):null)};P[10]=function(){return[0,1,[0]]};P[11]=K;P[12]=function(Q,R){__p&&__p();if(typeof Q==="number")if(Q)return c("bs_block").__(0,[[R[0],1,R[2]]]);else{var S=R[2][0];if(S)return c("bs_block").__(0,[[R[0],0,R[2]]]);else return 0}else if(Q.tag)return c("bs_block").__(0,[[Q[0],R[1],R[2]]]);else return c("bs_block").__(0,[[R[0],Q[0],R[2]]])};return P}var m=c("ReasonReact.bs").wrapReasonForJs(i,function(o){return l(c("bs_js_primitive").null_undefined_to_opt(o.contact),+o.isUserActive,+o.isBlocked,c("bs_js_primitive").null_undefined_to_opt(o.lastActive),o.onDelete,c("bs_js_primitive").null_undefined_to_opt(o.onLeaveGroup),o.onMarkRead,o.onMarkSpam,o.onMarkUnread,o.onMute,o.onArchive,o.onThreadNameChange,o.onThreadPhotoChange,o.onUnmute,o.onIgnore,o.onBlock,o.onUnblock,+o.showBlock,o.participants,c("bs_js_primitive").null_undefined_to_opt(o.platform),+o.showLeaveGroup,+o.showReport,o.thread,o.viewer,[])}),n=50;g.component=i;g.imageSize=n;g.setThreadSectionRef=j;g.renderImage=k;g.make=l;g.jsComponent=m}),null);
__d("MessengerMakeAsOwnerDialogReact.bs",["bs_curry","bs_js_boolean","ReasonReact.bs","bs_js_primitive","MessengerDialogReact.bs","MessengerAdminGroupUtils","MessengerDialogBodyReact.bs"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h=c("ReasonReact.bs").statelessComponent("MessengerMakeAsOwnerDialogReact");function i(k,l,m,n,o){var p=function p(r){c("bs_curry")._1(l,false);if(k)return c("bs_curry")._1(k[0],r);else return 0},q=h.slice();q[9]=function(){var r=c("bs_js_boolean").to_js_boolean(n),s=c("MessengerAdminGroupUtils").getMakeOwnerTitleText(r,m),t=c("MessengerAdminGroupUtils").getMakeOwnerBodyText(r,m),u=c("MessengerAdminGroupUtils").getMakeOwnerButtonText(r,m);return c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Dialog[0](0,l,0,0,0,0,0,[c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Header[0](0,0,s)),c("ReasonReact.bs").element(0,0,c("MessengerDialogBodyReact.bs").make(0,[t])),c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Footer[0](0,0,[c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").CancelButton[0](0,[])),c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Button[0](0,[u],0,["danger"],[p],[0],0,0,[]))]))]))};return q}var j=c("ReasonReact.bs").wrapReasonForJs(h,function(k){return i(c("bs_js_primitive").null_undefined_to_opt(k.onMakeOwner),k.onToggle,k.name,+k.isUserViewer,[])});g.component=h;g.make=i;g.jsComponent=j}),null);
__d("MessengerRemoveAsOwnerDialogReact.bs",["fbt","bs_curry","bs_js_boolean","ReasonReact.bs","bs_js_primitive","MessengerDialogReact.bs","MessengerAdminGroupUtils","MessengerDialogBodyReact.bs"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i=c("ReasonReact.bs").statelessComponent("MessengerRemoveAsOwnerDialogReact");function j(l,m,n,o,p,q){var r=function r(t){c("bs_curry")._1(m,false);if(l)return c("bs_curry")._1(l[0],t);else return 0},s=i.slice();s[9]=function(){var t=c("MessengerAdminGroupUtils").getRemoveOwnerBodyText(c("bs_js_boolean").to_js_boolean(o),c("bs_js_boolean").to_js_boolean(p),n);return c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Dialog[0](0,m,0,0,0,0,0,[c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Header[0](0,0,h._("Remove as group owner?"))),c("ReasonReact.bs").element(0,0,c("MessengerDialogBodyReact.bs").make(0,[t])),c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Footer[0](0,0,[c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").CancelButton[0](0,[])),c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Button[0](0,[h._("Remove owner")],0,["danger"],[r],[0],0,0,[]))]))]))};return s}var k=c("ReasonReact.bs").wrapReasonForJs(i,function(l){return j(c("bs_js_primitive").null_undefined_to_opt(l.onRemove),l.onToggle,l.name,+l.isUserViewer,+l.isLastAdminInThread,[])});g.component=i;g.make=j;g.jsComponent=k}),null);
__d("MessengerRemoveFromGroupDialogReact.bs",["fbt","bs_curry","ReasonReact.bs","bs_js_primitive","MessengerDialogReact.bs","MessengerDialogBodyReact.bs"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i=c("ReasonReact.bs").statelessComponent("MessengerRemoveFromGroupDialogReact");function j(l,m,n){var o=function o(q){c("bs_curry")._1(m,false);if(l)return c("bs_curry")._1(l[0],q);else return 0},p=i.slice();p[9]=function(){return c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Dialog[0](0,m,0,0,0,0,0,[c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Header[0](0,0,h._("Remove from Group"))),c("ReasonReact.bs").element(0,0,c("MessengerDialogBodyReact.bs").make(0,[h._("Are you sure you want to remove this person from the group? They will no longer be able to send or receive new messages")])),c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Footer[0](0,0,[c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").CancelButton[0](0,[])),c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Button[0](0,[h._("Remove")],0,["danger"],[o],[0],0,0,[]))]))]))};return p}var k=c("ReasonReact.bs").wrapReasonForJs(i,function(l){return j(c("bs_js_primitive").null_undefined_to_opt(l.onRemove),l.onToggle,[])});g.component=i;g.make=j;g.jsComponent=k}),null);
__d("MessengerInfoPanelContactActions.react",["cx","fbt","ImmutableObject","MercuryIDs","MercuryParticipants","MercuryThreads","MessengerAdminGroupUtils","MessengerContactActions.bs","MessengerDialogs.bs","MessengerMakeAsOwnerDialogReact.bs","MessengerMenu.react","MessengerPopoverMenu.react","MessengerRemoveAsOwnerDialogReact.bs","MessengerRemoveFromGroupDialogReact.bs","MessengerStateStore","ReactComponentWithPureRenderMixin","React","ShimButton.react","StoreAndPropBasedStateMixin","joinClasses"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j=c("MessengerContactActions.bs").actions,k=c("MessengerMakeAsOwnerDialogReact.bs").jsComponent,l=c("MessengerRemoveAsOwnerDialogReact.bs").jsComponent,m=c("MessengerRemoveFromGroupDialogReact.bs").jsComponent,n=c("MessengerMenu.react").Item,o=c("MessengerMenu.react").Separator,p=c("React").PropTypes,q=c("React").createClass({displayName:"MessengerInfoPanelContactActions",mixins:[c("ReactComponentWithPureRenderMixin"),c("StoreAndPropBasedStateMixin")(c("MessengerStateStore"))],propTypes:{adminIds:p.arrayOf(p.string),extrasEnabled:p.bool.isRequired,contact:p.instanceOf(c("ImmutableObject")).isRequired,isOpen:p.bool,onAction:p.func.isRequired,onToggle:p.func.isRequired,viewer:p.string.isRequired},statics:{calculateState:function r(s){var t=c("MercuryThreads").getForFBID(s.viewer),u=c("MessengerStateStore").getState().activeThreadID,v=u?t.getOrFetch(u):null;return{thread:v}}},render:function r(){__p&&__p();var s=this._isViewerAdmin(),t=c("MessengerAdminGroupUtils").isAdmin(this.props.adminIds,this.props.contact.uid),u=this._isUserViewer(),v=c("MessengerAdminGroupUtils").canRemoveAdmin(s,t,this.state.thread)?c("React").createElement(n,{label:i._("Remove As Admin"),onclick:this._handleRemoveAsOwnerClick}):null,w=null,x=c("MessengerAdminGroupUtils").canMakeOthersAdmins(s,t,this.state.thread),y=c("MessengerAdminGroupUtils").canMakeSelfAdmin(u,this.state.thread);if(x||y)w=c("React").createElement(n,{label:i._("Make Admin"),onclick:this._hanleMakeOwnerClick});var z=void 0;if(u)if(w||v)z=c("React").createElement(c("MessengerMenu.react"),null,w,v);else return null;else z=c("React").createElement(c("MessengerMenu.react"),null,c("React").createElement(n,{label:i._("Message"),onclick:this._makeActionHandler(j.MESSAGE)}),this.props.contact.href?c("React").createElement(n,{label:i._("View Profile"),onclick:this._makeActionHandler(j.PROFILE)}):null,w,v,this._renderExtras());return c("React").createElement(c("MessengerPopoverMenu.react"),{menu:z,onHide:function(){return this.props.onToggle(false)}.bind(this),onShow:function(){return this.props.onToggle(true)}.bind(this)},c("React").createElement(c("ShimButton.react"),{className:c("joinClasses")(this.props.className,"_57gs"+(this.props.isOpen?" _57gt":"")),onClick:this._handleClick}))},_renderExtras:function r(){if(!this.props.extrasEnabled)return null;var s=[c("React").createElement(o,{key:"separator"})],t=this._isViewerAdmin();if(c("MessengerAdminGroupUtils").canRemoveFromGroup(t,this.state.thread))s.push(c("React").createElement(n,{key:"remove-from-group",label:i._("Remove from Group"),onclick:this._handleRemoveClick}));return s.length>=2?s:null},_handleClick:function r(s){s.stopPropagation();s.preventDefault()},_makeActionHandler:function r(s){return function(t){this._handleClick(t);this.props.onAction(s,t)}.bind(this)},_handleRemoveClick:function r(s){this._handleClick(s);c("MessengerDialogs.bs").showDialog(function(){return c("React").createElement(m,{onToggle:this._handleDialogToggle,onRemove:this._handleDialogRemoveClick})}.bind(this))},_handleRemoveAsOwnerClick:function r(s){this._handleClick(s);var t=c("MercuryParticipants").getNow(this.props.contact.uid);c("MessengerDialogs.bs").showDialog(function(){return c("React").createElement(l,{onToggle:this._handleDialogToggle,onRemove:this._handleOwnerRemoveClick,name:t&&t.name,isUserViewer:this._isUserViewer(),isLastAdminInThread:this.props.adminIds&&this.props.adminIds.length===1})}.bind(this))},_handleDialogRemoveClick:function r(s){this.props.onAction(j.REMOVE,s)},_handleOwnerRemoveClick:function r(s){this.props.onAction(j.REMOVE_OWNER,s)},_hanleMakeOwnerClick:function r(s){this._handleClick(s);var t=c("MercuryParticipants").getNow(this.props.contact.uid);c("MessengerDialogs.bs").showDialog(function(){return c("React").createElement(k,{onToggle:this._handleDialogToggle,onMakeOwner:this._handleOwnerAddClick,name:t&&t.name,isUserViewer:this._isUserViewer()})}.bind(this))},_handleOwnerAddClick:function r(s){this.props.onAction(j.ADD_OWNER,s)},_handleDialogToggle:function r(s){if(!s)c("MessengerDialogs.bs").removeDialog()},_isUserViewer:function r(){return c("MercuryIDs").getParticipantIDFromUserID(this.props.viewer)===this.props.contact.uid},_isViewerAdmin:function r(){return c("MessengerAdminGroupUtils").isViewerAdmin(this.props.adminIds,this.props.viewer)}});f.exports=q}),null);
__d("MessengerSortParticipants",[],(function a(b,c,d,e,f,g){var h={sortAlphabeticalWithAdmins:function i(j,k){var l=k.filter(function(n){return!!n&&j&&j.indexOf(n.id)!==-1}).toArray().sort(function(n,o){return n.name.localeCompare(o.name)}),m=k.filter(function(n){return!!n&&(!j||j.indexOf(n.id)===-1)}).toArray().sort(function(n,o){return n.name.localeCompare(o.name)});return l.concat(m)}};f.exports=h}),null);
__d("MessengerInfoPanelPeopleSection.react",["cssVar","cx","fbt","immutable","ImmutableObject","Link.react","MessagingTag","MessengerAddIconSVG.react","MessengerAdminGroupUtils","MessengerContactList.react","MessengerInfoPanelContactActions.react","MessengerInfoPanelSectionReact.bs","MessengerSortParticipants","React"],(function a(b,c,d,e,f,g,h,i,j){"use strict";__p&&__p();var k,l,m=c("MessengerInfoPanelSectionReact.bs").jsComponent,n=c("React").PropTypes;k=babelHelpers.inherits(o,c("React").PureComponent);l=k&&k.prototype;o.prototype.render=function(){var p=this.props,q=p.adminIds,r=p.contactAdapter,s=p.isCollapsed,t=p.isViewerSubscribed,u=p.onContactAction,v=p.onContactSelect,w=p.onToggle,x=p.participants,y=p.thread,z=p.viewer;return c("React").createElement(m,{customColor:this.props.thread.custom_color,isCollapsible:true,isCollapsed:s,onToggle:w,title:j._("People")},this.$MessengerInfoPanelPeopleSection1(),c("React").createElement(c("MessengerContactList.react"),{actionsClass:c("MessengerInfoPanelContactActions.react"),className:"_4wc-",contactAdapter:r,disableRole:true,extraActionsEnabled:t,listSections:c("immutable").OrderedMap([[null,c("MessengerSortParticipants").sortAlphabeticalWithAdmins(q,x)]]),onSelect:v,onAction:u,viewer:z,adminIds:q,thread:y}))};o.prototype.$MessengerInfoPanelPeopleSection1=function(){if(!this.props.canViewerReply||this.props.thread.folder!==c("MessagingTag").INBOX)return null;var p=c("MessengerAdminGroupUtils").shouldInvite(this.props.thread)?j._("Invite"):j._("Add People"),q=this.props.thread.custom_color||"#0084ff";return c("React").createElement(c("Link.react"),{className:"_4rph",onClick:this.props.onAddPeopleClick},c("React").createElement(c("MessengerAddIconSVG.react"),{className:"_4rpi",customColor:q}),c("React").createElement("div",{className:"_4rpj"},p))};function o(){k.apply(this,arguments)}o.propTypes={adminIds:n.arrayOf(n.string),canViewerReply:n.bool.isRequired,contactAdapter:n.func.isRequired,isCollapsed:n.bool.isRequired,isViewerSubscribed:n.bool.isRequired,onAddPeopleClick:n.func.isRequired,onContactAction:n.func.isRequired,onContactSelect:n.func.isRequired,onToggle:n.func.isRequired,participants:n.instanceOf(c("immutable").Map).isRequired,thread:n.instanceOf(c("ImmutableObject")).isRequired,viewer:n.string.isRequired};f.exports=o}),null);
__d("MessagingThreadCustomizationSource",[],(function a(b,c,d,e,f,g){f.exports=Object.freeze({ADMIN_MSG_CHANGE_LINK:"admin_msg",THREAD_INLINE:"thread_inline",JOURNEY_PROMPT:"journey_prompt",JOURNEY_PROMPT_WRITE_IN:"journey_prompt_write_in",PROMO_LINK:"promo_link",SETTINGS:"thread_settings",USER_INFO_ACTION_SHEET:"user_info_action_sheet",ROOM_CREATION:"room_creation",DELETE_ALL_SETTING:"delete_all_setting",RELATIONSHIP_STATUS_UPDATE:"relationship_status_update"})}),null);
__d("GridReact.bs",["Utils.bs","Grid.react","ReasonReact.bs","bs_js_null_undefined"],(function a(b,c,d,e,f,g){"use strict";function h(l,m,n,o,p,q,r,s){return c("ReasonReact.bs").wrapJsForReason(c("Grid.react"),{className:c("bs_js_null_undefined").from_opt(l),cols:m,fixed:c("Utils.bs").optionBoolToNullUndefinedBoolean(n),alignv:c("bs_js_null_undefined").from_opt(o),alignh:c("bs_js_null_undefined").from_opt(p),spacing:c("bs_js_null_undefined").from_opt(q),style:c("bs_js_null_undefined").from_opt(r)},s)}var i=[h];function j(l,m,n,o){return c("ReasonReact.bs").wrapJsForReason(c("Grid.react").GridItem,{className:c("bs_js_null_undefined").from_opt(l),alignv:c("bs_js_null_undefined").from_opt(m),alignh:c("bs_js_null_undefined").from_opt(n)},o)}var k=[j];g.Grid=i;g.Item=k}),null);
__d("MessengerCustomThreadColorButtonReact.bs",["cx","Keys.bs","bs_curry","React","ReasonReact.bs"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i=c("ReasonReact.bs").statelessComponent("MessengerCustomThreadColorButton");function j(l,m,n,o,p){__p&&__p();var q=function q(t,p){t.preventDefault();return c("bs_curry")._1(o,l)},r=function r(t,p){if(t.keyCode===c("Keys.bs").$$return){t.preventDefault();return c("bs_curry")._1(o,l)}else return 0},s=i.slice();s[9]=function(t){return c("React").cloneElement(c("React").createElement("div",{className:"_5dr3",role:"button",tabIndex:0,onKeyDown:c("bs_curry")._1(t[0],r),onClick:c("bs_curry")._1(t[0],q)},c("React").createElement("div",{className:"_5dr4",style:{backgroundColor:l}})),{"aria-label":m,"aria-pressed":n})};return s}var k=c("ReasonReact.bs").wrapReasonForJs(i,function(l){return j(l.colorChoice,l.colorName,l.isSelected,l.onChoose,[])});g.component=i;g.make=j;g.jsComponent=k}),null);
__d("MessengerChangeColorDialogReact.bs",["ix","cx","fbt","cssVar","bs_array","bs_curry","React","bs_string","GridReact.bs","ImageReact.bs","fbglyph","ReasonReact.bs","MessengerDialogs.bs","MessengerDialogReact.bs","MessengerDialogBodyReact.bs","MessagingThreadCustomizationConfig","MessengerCustomThreadColorButtonReact.bs"],(function a(b,c,d,e,f,g,h,i,j,k){"use strict";__p&&__p();var l=c("ReasonReact.bs").statelessComponent("MessengerChangeColorDialogReact"),m="Unknown Color";function n(o,p,q,r){__p&&__p();var s=function s(v){if(v)return 0;else{if(q)c("bs_curry")._1(q[0],0);return c("MessengerDialogs.bs").removeDialog(0)}},t=function t(v){var w=+(v===o);if(!w)if(p)c("bs_curry")._1(p[0],v);return s(false)},u=l.slice();u[9]=function(){var v=c("bs_array").concat([["#0084ff"],[c("MessagingThreadCustomizationConfig").colorChoices,0]]),w=c("bs_array").map(function(x){var y=c("MessagingThreadCustomizationConfig").colorNames[x],z=y!==undefined?y:m,A=+(c("bs_string").lowercase(x)===c("bs_string").lowercase(o));return c("ReasonReact.bs").element([x],0,c("GridReact.bs").Item[0](["_gs0"],0,0,[c("React").createElement("div",undefined,A!==0?c("ReasonReact.bs").element(0,0,c("ImageReact.bs").make(["_gs2"],0,[h("140201")],0,0,0,0,[])):null,c("ReasonReact.bs").element(0,0,c("MessengerCustomThreadColorButtonReact.bs").make(x,z,+(x===o),t,[])))]))},v);return c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Dialog[0](["_gs3"],s,0,0,0,0,[335],[c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Header[0](0,0,j._("Pick a color for this conversation"))),c("ReasonReact.bs").element(0,0,c("MessengerDialogBodyReact.bs").make(0,[c("React").createElement("div",{className:"_28he"},j._("Everyone in this conversation will see this.")),c("ReasonReact.bs").element(0,0,c("GridReact.bs").Grid[0](["_gs4"],5,0,0,0,0,0,w))])),c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Footer[0](0,0,[c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").CancelButton[0](0,[]))]))]))};return u}g.component=l;g.unknownColor=m;g.make=n}),null);
__d("MessengerChangeColorIconSVGReact.bs",["React"],(function a(b,c,d,e,f,g){"use strict";function h(i,j){return c("React").createElement("div",{className:i},c("React").createElement("svg",{viewBox:"-1 -1 47 47"},c("React").createElement("title",undefined,"colors@2x"),c("React").createElement("path",{d:"M912,1569a3,3,0,1,1-3,3A3,3,0,0,1,912,1569Z",fill:j,transform:"translate(-895.5 -1561.5)"}),c("React").createElement("path",{d:"M924,1569a3,3,0,1,1-3,3A3,3,0,0,1,924,1569Z",fill:j,transform:"translate(-895.5 -1561.5)"}),c("React").createElement("path",{d:"M931,1579a3,3,0,1,1-3,3A3,3,0,0,1,931,1579Z",fill:j,transform:"translate(-895.5 -1561.5)"}),c("React").createElement("path",{d:"M905,1579a3,3,0,1,1-3,3A3,3,0,0,1,905,1579Z",fill:j,transform:"translate(-895.5 -1561.5)"}),c("React").createElement("path",{d:"M918,1562a22,22,0,0,0,0,44,3.67,3.67,0,0,0,2.71-6.14,3.65,3.65,0,0,1,2.74-6.09h4.33A12.23,12.23,0,0,0,940,1581.56C940,1570.75,930.15,1562,918,1562Z",fill:"transparent",stroke:j,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"4%",transform:"translate(-895.5 -1561.5)"})))}g.make=h}),null);
__d("MessengerInfoPanelCustomColorReact.bs",["cx","fbt","Keys.bs","bs_curry","React","ReasonReact.bs","MessengerDialogs.bs","MessengerCustomColorUtils.bs","MessengerChangeColorDialogReact.bs","MessengerChangeColorIconSVGReact.bs"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j=c("ReasonReact.bs").reducerComponent("MessengerInfoPanelCustomColorReact");function k(n,o){var p=o[2][0][0];if(p)return p[0].focus();else return 0}function l(n,o){o[2][0][0]=n==null?0:[n];return 0}function m(n,o,p){__p&&__p();var q=function q(u){return c("MessengerDialogs.bs").showDialog(function(){return c("ReasonReact.bs").element(0,0,c("MessengerChangeColorDialogReact.bs").make(c("MessengerCustomColorUtils.bs").customColorOrBlue(n),[o],[c("bs_curry")._1(u,k)],[]))})},r=function r(u,v){u.preventDefault();return q(v[0])},s=function s(u,v){if(u.keyCode===c("Keys.bs").$$return){u.preventDefault();return q(v[0])}else return 0},t=j.slice();t[9]=function(u){if(n.customization_enabled){var v=c("MessengerCustomColorUtils.bs").customColorOrBlue(n);return c("React").createElement("div",{ref:c("bs_curry")._1(u[0],l),className:"_3szn _3szo",tabIndex:0,onKeyDown:c("bs_curry")._1(u[0],s),onClick:c("bs_curry")._1(u[0],r)},c("React").createElement("div",{className:"_3szp"},c("MessengerChangeColorIconSVGReact.bs").make("_17vc",v)),c("React").createElement("div",{className:"_3szq"},i._("Change Color")))}else return null};t[10]=function(){return[[0]]};t[12]=function(p,u){return 0};return t}g.component=j;g.handleDialogClose=k;g.setTheRef=l;g.make=m}),null);
__d("MessengerInfoPanelEmoji.react",["cx","fbt","Bootloader","EmojiLikeConstants","Image.react","ImmutableObject","Keys","MercuryShareAttachmentRenderLocations","MessengerHotLikeOutlineSVG.react","MessengerSupportedEmojiUtils","React","MessengerDialogs.bs"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j,k,l=c("React").PropTypes;j=babelHelpers.inherits(m,c("React").PureComponent);k=j&&j.prototype;function m(){__p&&__p();var n,o;for(var p=arguments.length,q=Array(p),r=0;r<p;r++)q[r]=arguments[r];return o=(n=k.constructor).call.apply(n,[this].concat(q)),this.$MessengerInfoPanelEmoji2=function(event){event.preventDefault();this.$MessengerInfoPanelEmoji5()}.bind(this),this.$MessengerInfoPanelEmoji3=function(event){if(event.keyCode===c("Keys").RETURN){event.preventDefault();this.$MessengerInfoPanelEmoji5()}}.bind(this),this.$MessengerInfoPanelEmoji6=function(){if(this.$MessengerInfoPanelEmoji1)this.$MessengerInfoPanelEmoji1.focus()}.bind(this),this.$MessengerInfoPanelEmoji4=function(s){this.$MessengerInfoPanelEmoji1=s}.bind(this),o}m.prototype.render=function(){if(!this.props.thread.customization_enabled)return null;var n=this.props.thread.custom_like_icon&&this.props.thread.custom_like_icon.emoji?c("MessengerSupportedEmojiUtils").getNewEmojiData(this.props.thread.custom_like_icon.emoji,c("EmojiLikeConstants").size.SMALL):null,o=n&&n.url?c("React").createElement(c("Image.react"),{src:n.url,className:"_12cp"}):c("React").createElement(c("MessengerHotLikeOutlineSVG.react"),{className:"_12cq",color:this.props.thread.custom_color?this.props.thread.custom_color:"",height:"60%",location:c("MercuryShareAttachmentRenderLocations").MESSENGER});return c("React").createElement("div",{className:"_3szn _3szo",onClick:this.$MessengerInfoPanelEmoji2,onKeyDown:this.$MessengerInfoPanelEmoji3,ref:this.$MessengerInfoPanelEmoji4,role:"button",tabIndex:"0"},c("React").createElement("div",{className:"_3szp"},o),c("React").createElement("div",{className:"_3szq"},i._("Change Emoji")))};m.prototype.$MessengerInfoPanelEmoji5=function(){c("Bootloader").loadModules(["MessengerChangeEmojiDialogReact.bs"],function(n){var o=n.jsComponent;c("MessengerDialogs.bs").showDialog(function(){return c("React").createElement(o,{currentEmoji:this.props.thread.custom_like_icon?this.props.thread.custom_like_icon.emoji:String.fromCodePoint.apply(String,c("EmojiLikeConstants").FB_THUMBS_UP_EMOJI),onClose:this.$MessengerInfoPanelEmoji6,onSave:this.props.onChange})}.bind(this))}.bind(this),"MessengerInfoPanelEmoji.react")};m.propTypes={thread:l.instanceOf(c("ImmutableObject")).isRequired,viewer:l.string.isRequired,onChange:l.func.isRequired};f.exports=m}),null);
__d("MessengerInfoPanelEmojiReact.bs",["ReasonReact.bs","MessengerInfoPanelEmoji.react"],(function a(b,c,d,e,f,g){"use strict";function h(i,j,k,l){return c("ReasonReact.bs").wrapJsForReason(c("MessengerInfoPanelEmoji.react"),{thread:i,viewer:j,onChange:k},l)}g.make=h}),null);
__d("MNCommercePromotionManageBlockDialogBootloader.react",["BootloadOnRender.react","JSResource","LazyComponent.react","React"],(function a(b,c,d,e,f,g){"use strict";var h,i;h=babelHelpers.inherits(j,c("React").PureComponent);i=h&&h.prototype;j.prototype.render=function(){return c("React").createElement(c("BootloadOnRender.react"),{component:c("React").createElement(c("LazyComponent.react"),this.props),loader:c("JSResource")("MNCommercePromotionManageBlockDialogContainer.react").__setRef("MNCommercePromotionManageBlockDialogBootloader.react"),placeholder:c("React").createElement("div",null)})};function j(){h.apply(this,arguments)}f.exports=j}),null);
__d("ShimButtonReact.bs",["Utils.bs","ReasonReact.bs","ShimButton.react","bs_js_null_undefined"],(function a(b,c,d,e,f,g){"use strict";function h(i,j,k,l){return c("ReasonReact.bs").wrapJsForReason(c("ShimButton.react"),{className:c("bs_js_null_undefined").from_opt(i),inline:c("Utils.bs").optionBoolToNullUndefinedBoolean(j),onClick:c("bs_js_null_undefined").from_opt(k)},l)}g.make=h}),null);
__d("MessengerInfoPanelManageMessagesReact.bs",["cx","fbt","React","Utils.bs","MercuryIDs","ReasonReact.bs","ShimButtonReact.bs","MercuryParticipants","MNCommerceDialogStateActions","MNCommercePromotionManageBlockDialogBootloader.react"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j=c("ReasonReact.bs").statelessComponent("MessengerInfoPanelManageMessagesReact");function k(m){var n=c("MercuryIDs").getParticipantIDFromFromThreadID(m.thread_id);if(n==null)return 0;else{var o=c("MercuryParticipants").getNow(n);if(o==null)return 0;else return c("Utils.bs").isTruthy(o.is_business_enabled)}}function l(m,n,o){__p&&__p();var p=function p(r){r.preventDefault();r.stopPropagation();c("MNCommerceDialogStateActions").showDialog(c("MNCommercePromotionManageBlockDialogBootloader.react"),{pageID:m.other_user_fbid});return 0},q=j.slice();q[9]=function(){if(k(m))return c("React").createElement("div",{className:"_3szn _3szo"},c("React").createElement("div",{className:"_3szp"}),c("ReasonReact.bs").element(0,0,c("ShimButtonReact.bs").make(["_3szq"],[1],[p],[i._("Manage Messages")])));else return null};return q}g.component=j;g.isBusinessEnabled=k;g.make=l}),null);
__d("MessengerInfoPanelManageReview.react",["cx","fbt","Bootloader","ImmutableObject","MercuryIDs","MercuryParticipants","MNCommerceDialogStateActions","React","ShimButton.react"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j,k,l=c("React").PropTypes;j=babelHelpers.inherits(m,c("React").PureComponent);k=j&&j.prototype;function m(){var n,o;for(var p=arguments.length,q=Array(p),r=0;r<p;r++)q[r]=arguments[r];return o=(n=k.constructor).call.apply(n,[this].concat(q)),this.$MessengerInfoPanelManageReview2=function(event){event.preventDefault();c("Bootloader").loadModules(["MNCommerceReviewDialogContainer.react"],function(s){c("MNCommerceDialogStateActions").showDialog(s,{pageID:this.props.thread.other_user_fbid,onConfirmButtonClick:this.$MessengerInfoPanelManageReview3})}.bind(this),"MessengerInfoPanelManageReview.react")}.bind(this),o}m.prototype.render=function(){if(!this.$MessengerInfoPanelManageReview1())return null;return c("React").createElement("div",{className:"_3szn _3szo"},c("React").createElement("div",{className:"_3szp"}),c("React").createElement(c("ShimButton.react"),{className:"_3szq",inline:true,onClick:this.$MessengerInfoPanelManageReview2},i._("Leave Feedback")))};m.prototype.$MessengerInfoPanelManageReview1=function(){var n=c("MercuryIDs").getParticipantIDFromFromThreadID(this.props.thread.thread_id);if(!n)return false;var o=c("MercuryParticipants").getNow(n);return!!(o&&o.accepts_messenger_user_feedback)};m.prototype.$MessengerInfoPanelManageReview3=function(n,o,p){if(o===0)return;c("Bootloader").loadModules(["MessengerPlatformBotReviewWriteDataManager"],function(q){q.review(n,o,p.trim())},"MessengerInfoPanelManageReview.react")};m.propTypes={thread:l.instanceOf(c("ImmutableObject")).isRequired,viewer:l.string.isRequired};f.exports=m}),null);
__d("MessengerInfoPanelManageReviewReact.bs",["ReasonReact.bs","MessengerInfoPanelManageReview.react"],(function a(b,c,d,e,f,g){"use strict";function h(i,j,k){return c("ReasonReact.bs").wrapJsForReason(c("MessengerInfoPanelManageReview.react"),{thread:i,viewer:j},k)}g.make=h}),null);
__d("MessengerContactListReact.bs",["Utils.bs","ReasonReact.bs","bs_js_null_undefined","MessengerContactList.react"],(function a(b,c,d,e,f,g){"use strict";function h(i,j,k,l,m,n,o,p){return c("ReasonReact.bs").wrapJsForReason(c("MessengerContactList.react"),{contactAdapter:c("bs_js_null_undefined").from_opt(i),disableRole:c("Utils.bs").optionBoolToNullUndefinedBoolean(j),listSections:k,onSelect:l,rowClassName:c("bs_js_null_undefined").from_opt(m),viewer:n,thread:c("bs_js_null_undefined").from_opt(o)},p)}g.make=h}),null);
__d("MessengerEditNicknameDialogReact.bs",["cx","fbt","bs_curry","React","MercuryIDs","ReasonReact.bs","MessengerDialogReact.bs","MessengerDialogBodyReact.bs","MessengerTextWithEmojiInputReact.bs","MessagingThreadCustomizationConfig"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j=c("ReasonReact.bs").reducerComponent("MessengerEditNicknameDialogReact");function k(m,n){n[2][0][0]=m==null?0:[m];return 0}function l(m,n,o,p,q,r){__p&&__p();var s=function s(r,u){__p&&__p();var v=u[2][0][0],w=v?[v[0].getValue()]:0,x=0;if(w)if(w[0]===""){if(n)x=1}else x=1;if(x===1)if(w!==n){var y=c("MercuryIDs").getUserIDFromParticipantID(m.id);if(!(y==null))c("bs_curry")._1(o,[y,w[0]])}return c("bs_curry")._1(p,false)},t=j.slice();t[9]=function(u){var v=m.name,w=c("MercuryIDs").getUserIDFromParticipantID(m.id),x,y=0;if(!(w==null)&&w===q)x=i._("Edit Your Nickname");else y=1;if(y===1)x=i._("Edit Nickname for {personName}",[i.param("personName",v)]);return c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Dialog[0](["_2c1u"],p,0,0,0,0,[400],[c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Header[0](0,0,x)),c("ReasonReact.bs").element(0,0,c("MessengerDialogBodyReact.bs").make(0,[c("React").createElement("div",{className:"_-bo"},i._("Everyone in this conversation will see this.")),c("ReasonReact.bs").element(0,[c("bs_curry")._1(u[0],k)],c("MessengerTextWithEmojiInputReact.bs").make(["_2c1v"],[c("bs_curry")._1(u[0],s)],[c("MessagingThreadCustomizationConfig").maxNicknameLength],0,[v],n,[]))])),c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Footer[0](0,0,[c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").CancelButton[0](0,[])),c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Button[0](0,[i._("Save")],0,0,[c("bs_curry")._1(u[0],s)],[0],0,0,[]))]))]))};t[10]=function(){return[[0]]};t[12]=function(r,u){return 0};return t}g.component=j;g.setInput=k;g.make=l}),null);
__d("MessengerScrollableAreaReact.bs",["ReasonReact.bs","bs_js_null_undefined","MessengerScrollableArea.react"],(function a(b,c,d,e,f,g){"use strict";function h(i,j){return c("ReasonReact.bs").wrapJsForReason(c("MessengerScrollableArea.react"),{height:c("bs_js_null_undefined").from_opt(i)},j)}g.make=h}),null);
__d("MessengerEditNicknamesDialogReact.bs",["cx","fbt","bs_curry","immutable","MercuryIDs","ReasonReact.bs","bs_js_primitive","ImmutableObject","MessengerDialogs.bs","MessengerDialogReact.bs","MessengerAdminGroupUtils","MessengerDialogBodyReact.bs","MessengerContactListReact.bs","MessengerScrollableAreaReact.bs","MessengerEditNicknameDialogReact.bs"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();function j(m,n){var o=c("MercuryIDs").getUserIDFromParticipantID(n.id),p;if(o==null)p=[n.name,""];else if(m==null)p=[n.name,""];else{var q=m[o];p=q!==undefined?[q,n.name]:[n.name,""]}return new(c("ImmutableObject"))({alias:n.alias,uid:n.id,photo:n.image_src,title:p[0],subtitle:p[1],type:n.type,isMessengerUser:n.is_messenger_user,href:n.href,isWorkUser:undefined,timezone:undefined,participants:undefined,thread:undefined})}var k=c("ReasonReact.bs").statelessComponent("MessengerEditNicknamesDialogReact");function l(m,n,o,p,q,r){__p&&__p();var s=function s(v){if(v)return 0;else{c("bs_curry")._1(p,0);return c("MessengerDialogs.bs").removeAllDialogs(0)}},t=function t(v,r){var w=c("MercuryIDs").getUserIDFromParticipantID(v.id),x=n.custom_nickname,y=!(w==null)&&!(x==null)?c("bs_js_primitive").undefined_to_opt(x[w]):0;return c("MessengerDialogs.bs").showDialog(function(){return c("ReasonReact.bs").element(0,0,c("MessengerEditNicknameDialogReact.bs").make(v,y,o,s,q,[]))})},u=k.slice();u[9]=function(){__p&&__p();var v=m.filter(function(x,r,y){if(x==null)return false;else{var z=+c("MessengerAdminGroupUtils").isJoinableThread(n),A=c("MercuryIDs").getUserIDFromParticipantID(x.id);if(z!==0&&!(!(A==null)&&A===q))return false;else return true}}).toArray(),w=n.custom_nickname;return c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Dialog[0](["_4h9n"],s,0,0,0,["default"],[350],[c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Header[0](0,0,[c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").CancelButton[0](0,[])),c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Title[0](0,[i._("Edit Nicknames")]))])),c("ReasonReact.bs").element(0,0,c("MessengerDialogBodyReact.bs").make(["_4h9o"],[c("ReasonReact.bs").element(0,0,c("MessengerScrollableAreaReact.bs").make(["100%"],[c("ReasonReact.bs").element(0,0,c("MessengerContactListReact.bs").make([function(x){return j(w,x)}],[1],c("immutable").OrderedMap([[null,v]]),t,["_44kr"],q,[n],[]))]))]))]))};return u}g.fromMercuryParticipant=j;g.component=k;g.make=l}),null);
__d("MessengerEditNicknamesIconSVGReact.bs",["React"],(function a(b,c,d,e,f,g){"use strict";function h(i,j){return c("React").createElement("div",{className:i},c("React").createElement("svg",{viewBox:"0 0 38 37.01"},c("React").createElement("title",undefined,"nicknames"),c("React").createElement("path",{d:"M899,1204h38v2H899v-2Z",fill:j,fillRule:"evenodd",transform:"translate(-898.99 -1168.99)"}),c("React").createElement("path",{d:"M927.57,1172.17l-22.32,22.36-0.72,5,5-.72,22.32-22.36ZM908.8,1196.6l-1.41-1.41L929,1173.61l1.41,1.41Z",fill:j,fillRule:"evenodd",transform:"translate(-898.99 -1168.99)"}),c("React").createElement("path",{d:"M932.93,1175.36l2.07-2.13a6,6,0,0,0-1.33-3,5.72,5.72,0,0,0-2.91-1.28l-2.07,2.13Z",fill:j,fillRule:"evenodd",transform:"translate(-898.99 -1168.99)"})))}g.make=h}),null);
__d("MessengerInfoPanelNicknamesReact.bs",["cx","fbt","Keys.bs","bs_curry","React","ReasonReact.bs","MessengerDialogs.bs","MessengerCustomColorUtils.bs","MessengerEditNicknamesDialogReact.bs","MessengerEditNicknamesIconSVGReact.bs"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();function j(n,o){var p=o[2][0][0];if(p)return p[0].focus();else return 0}function k(n,o){o[2][0][0]=n==null?0:[n];return 0}var l=c("ReasonReact.bs").reducerComponent("MessengerInfoPanelNicknamesReact");function m(n,o,p,q,r){__p&&__p();var s=function s(w){return c("MessengerDialogs.bs").showDialog(function(){return c("ReasonReact.bs").element(0,0,c("MessengerEditNicknamesDialogReact.bs").make(n,o,q,c("bs_curry")._1(w[0],j),p,[]))})},t=function t(w,x){w.preventDefault();return s(x)},u=function u(w,x){if(w.keyCode===c("Keys.bs").$$return){w.preventDefault();return s(x)}else return 0},v=l.slice();v[9]=function(w){if(o.customization_enabled){var x=c("MessengerCustomColorUtils.bs").customColorOrBlue(o);return c("React").createElement("div",{ref:c("bs_curry")._1(w[0],k),className:"_3szn _3szo",role:"button",tabIndex:0,onKeyDown:c("bs_curry")._1(w[0],u),onClick:c("bs_curry")._1(w[0],t)},c("React").createElement("div",{className:"_3szp"},c("MessengerEditNicknamesIconSVGReact.bs").make("_5odt",x)),c("React").createElement("div",{className:"_3szq"},i._("Edit Nicknames")))}else return null};v[10]=function(){return[[0]]};v[12]=function(r,w){return 0};return v}g.handleDialogClose=j;g.setHandleRef=k;g.component=l;g.make=m}),null);
__d("MessengerContentSearchFunnelLoggerConstants",[],(function a(b,c,d,e,f,g){"use strict";var h=Object.freeze({BROWSE_MESSAGE_IN_THREAD:"browse_message_in_thread",END_CONTENT_SEARCH:"end_content_search",INITIATE_CONTENT_SEARCH:"initiate_content_search",LOAD_MORE_THREADS:"load_more_threads",NUM_BROWSE_ACTIONS_WITHIN_THREAD:"num_browse_actions_within_thread",SELECT_THREAD:"select_thread",THREAD_IMPRESSIONS:"thread_impressions",LOAD_MESSAGE_IN_THREAD:"load_message_in_thread",BROWSE_CONTEXT:"browse_context"}),i=Object.freeze({SEARCH_WITHIN_THREAD:"search_within_thread",SEARCH_ALL_THREADS:"search_all_threads",END_WITH_NEW_SEARCH:"end_with_new_search",END_WITH_DONE_BUTTON:"end_with_done_button",END_WITH_X_BUTTON:"end_with_x_button",END_WITH_BACK_BUTTON:"end_with_back_button"});f.exports={FUNNEL_NAME:"WWW_MESSENGER_CONTENT_SEARCH_FUNNEL",FUNNEL_LOGGER_EVENTS:h,FUNNEL_LOGGER_TAGS:i}}),null);
__d("MessengerContentSearchFunnelLogger",["FunnelLogger","MessengerContentSearchFunnelLoggerConstants"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h=c("MessengerContentSearchFunnelLoggerConstants").FUNNEL_NAME,i=c("MessengerContentSearchFunnelLoggerConstants").FUNNEL_LOGGER_EVENTS,j=null,k=0,l=0,m=new Set(),n=0,o=0;function p(x,y){__p&&__p();if(j!==null)c("FunnelLogger").appendActionWithPayload(h,i.NUM_BROWSE_ACTIONS_WITHIN_THREAD,{threadID:j,numBrowseActions:k,numContextBrowse:o,msgs:Array.from(m)});j=null;k=0;l=0;o=0;m.clear();n=Date.now();c("FunnelLogger").startFunnel(h);if(y)c("FunnelLogger").addFunnelTag(h,y);c("FunnelLogger").appendActionWithPayloadIfNew(h,i.INITIATE_CONTENT_SEARCH,{query:x})}function q(x){c("FunnelLogger").appendActionWithPayload(h,i.THREAD_IMPRESSIONS,{impressionList:x,latency:Date.now()-n})}function r(x,y){c("FunnelLogger").appendActionWithPayload(h,i.LOAD_MORE_THREADS,{impressionList:x,latency:y})}function s(){o+=1}function t(x){if(j!==null)c("FunnelLogger").appendActionWithPayload(h,i.NUM_BROWSE_ACTIONS_WITHIN_THREAD,{threadID:j,numBrowseActions:k,numContextBrowse:o,msgs:Array.from(m)});j=x;k=0;o=0;m.clear();c("FunnelLogger").appendActionWithPayload(h,i.SELECT_THREAD,x)}function u(x){k+=1;l+=1}function v(x,y,z){j=y;m.add(x);c("FunnelLogger").appendActionWithPayload(h,i.LOAD_MESSAGE_IN_THREAD,{latency:z})}function w(x){if(j!==null)c("FunnelLogger").appendActionWithPayload(h,i.NUM_BROWSE_ACTIONS_WITHIN_THREAD,{threadID:j,numBrowseActions:k,numContextBrowse:o,msgs:Array.from(m)});if(x)c("FunnelLogger").appendActionWithTagAndPayloadIfNew(h,i.END_CONTENT_SEARCH,x,{totalBrowseActions:l});else c("FunnelLogger").appendActionWithPayloadIfNew(h,i.END_CONTENT_SEARCH,{totalBrowseActions:l});c("FunnelLogger").endFunnel(h)}f.exports={browseMessageInThread:u,endFunnel:w,loadMessageInThread:v,logContextBrowse:s,logLoadMoreThreads:r,logThreadImpressions:q,logThreadSelect:t,startFunnel:p}}),null);
__d("MessengerThreadSearchIconSVGReact.bs",["React"],(function a(b,c,d,e,f,g){"use strict";function h(i,j){return c("React").createElement("div",{className:i},c("React").createElement("svg",{viewBox:"8 8 48 48"},c("React").createElement("title",undefined,"search conversation"),c("React").createElement("circle",{cx:"28",cy:"28",fill:"none",r:"14",stroke:j,strokeMiterlimit:"10",strokeWidth:"2"}),c("React").createElement("path",{clipRule:"evenodd",d:"M50,50L37.9,37.9",fill:"none",fillRule:"evenodd",stroke:j,strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"2"})))}g.make=h}),null);
__d("MessengerInfoPanelSearchReact.bs",["cx","fbt","Keys.bs","bs_curry","React","Bootload.bs","Bootloader","ReasonReact.bs","MessengerActions","MessengerStateStore","MessengerCustomColorUtils.bs","MessengerThreadSearchIconSVGReact.bs","MessengerContentSearchFunnelLogger","MessengerContentSearchFunnelLoggerConstants"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j=c("ReasonReact.bs").statelessComponent("MessengerInfoPanelSearchReact");function k(s){c("Bootloader").loadModules(["BootloadableMessengerContentSearchFunnelLogger.bs"],s,"MessengerInfoPanelSearchReact.bs");return 0}var l=[k],m=c("Bootload.bs").Create(l);function n(s,t){c("MessengerContentSearchFunnelLogger").startFunnel(s,c("MessengerContentSearchFunnelLoggerConstants").SEARCH_WITHIN_THREAD);return 0}function o(){var s=c("MessengerStateStore").getState().query,t=+(s==null);c("MessengerActions").changeQuery(t!==0?"":undefined);return 0}function p(s){var t=c("MessengerStateStore").getState().query,u=t==null?"":t;s.preventDefault();c("bs_curry")._1(m[0],function(v){return n(u,v)});return o(0)}function q(s){if(s.keyCode===c("Keys.bs").$$return){s.preventDefault();return o(0)}else return 0}function r(s,t){var u=j.slice();u[9]=function(){var v=c("MessengerCustomColorUtils.bs").customColorOrBlue(s);return c("React").createElement("div",{className:"_3szn _3szo",tabIndex:0,onKeyDown:q,onClick:p},c("React").createElement("div",{className:"_3szp"},c("MessengerThreadSearchIconSVGReact.bs").make("_5odt",v)),c("React").createElement("div",{className:"_3szq"},i._("Search in Conversation")))};return u}g.component=j;g.BootloadableMessengerContentSearchFunnelLogger=l;g.LoadableMessengerContentSearchFunnelLoggerRe=m;g.handleLoggerLoad=n;g.showQuery=o;g.handleSearchThreadClick=p;g.handleSearchThreadKeyDown=q;g.make=r}),null);
__d("LeftRightReact.bs",["ReasonReact.bs","LeftRight.react","bs_js_null_undefined"],(function a(b,c,d,e,f,g){"use strict";function h(i,j){return c("ReasonReact.bs").wrapJsForReason(c("LeftRight.react"),{className:c("bs_js_null_undefined").from_opt(i)},j)}g.make=h}),null);
__d("MessengerCompositeMuteSettingsDialogBootloader.react",["BootloadOnRender.react","JSResource","LazyComponent.react","React"],(function a(b,c,d,e,f,g){"use strict";var h,i;h=babelHelpers.inherits(j,c("React").PureComponent);i=h&&h.prototype;j.prototype.render=function(){return c("React").createElement(c("BootloadOnRender.react"),{component:c("React").createElement(c("LazyComponent.react"),this.props),loader:c("JSResource")("messengerCompositeMuteSettingsDialogReactComponent").__setRef("MessengerCompositeMuteSettingsDialogBootloader.react"),placeholder:c("React").createElement("div",null)})};function j(){h.apply(this,arguments)}f.exports=j}),null);
__d("MessengerCompositeMuteSettingsDialogBootloaderReact.bs",["ReasonReact.bs","MessengerCompositeMuteSettingsDialogBootloader.react"],(function a(b,c,d,e,f,g){"use strict";function h(i,j,k,l,m,n,o,p,q){return c("ReasonReact.bs").wrapJsForReason(c("MessengerCompositeMuteSettingsDialogBootloader.react"),{isMuted:i,mentionsMuted:j,reactionsMuted:k,showMentions:l,onMentionsMute:m,onReactionsMute:n,onMute:o,onToggle:p},q)}g.make=h}),null);
__d("MessengerNotificationsIconSVGReact.bs",["React"],(function a(b,c,d,e,f,g){"use strict";function h(i,j){return c("React").createElement("div",{className:i},c("React").createElement("svg",{height:"24",width:"24",viewBox:"0 0 18 18"},c("React").createElement("defs",undefined,c("React").createElement("circle",{id:"path-1",cx:"1",cy:"1",r:"1"})),c("React").createElement("g",{fill:"none",fillRule:"evenodd"},c("React").createElement("rect",{id:"Bounds",height:"18",width:"18",x:"0",y:"0"}),c("React").createElement("path",{d:"M9,16.5 C9.828,16.5 10.5,15.828 10.5,15 L7.5,15\nC7.5,15.828 8.172,16.5 9,16.5",fill:j}),c("React").createElement("path",{d:"M13,10 L13,7.5 C13,5.562 11.622,3.948 9.793,3.58\nC9.914,3.414 10,3.221 10,3 C10,2.448 9.552,2 9,2 C8.448,2\n8,2.448 8,3 C8,3.221 8.086,3.414 8.207,3.58 C6.378,3.948\n5,5.562 5,7.5 L5,10 C5,11.105 4,12 4,12 L3.70537567,12.2946243\nC3.31580745,12.6841926 3.31640625,13.3164062\n3.70537567,13.7053757 L4,14 L14,14 L14.2946243,13.7053757\nC14.6841926,13.3158074 14.6835937,12.6835938\n14.2946243,12.2946243 L14,12 C14,12 13,11.105 13,10 Z",stroke:j}))))}g.make=h}),null);
__d("MessengerNotificationsButtonReact.bs",["cx","fbt","Keys.bs","bs_curry","React","formatDate","ReasonReact.bs","LeftRightReact.bs","MessengerDialogs.bs","MessengerCustomColorUtils.bs","MessengerNotificationsIconSVGReact.bs","MessengerCompositeMuteSettingsDialogBootloaderReact.bs"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();function j(n,o){if(n)return 0;else{c("MessengerDialogs.bs").removeDialog(0);var p=o[2][0][0];if(p)return p[0].focus();else return 0}}function k(n,o){o[2][0][0]=n==null?0:[n];return 0}var l=c("ReasonReact.bs").reducerComponent("MessengerNotificationsButtonReact");function m(n,o,p,q,r,s,t,u,v){__p&&__p();var w=function w(B){return c("MessengerDialogs.bs").showDialog(function(){return c("ReasonReact.bs").element(0,0,c("MessengerCompositeMuteSettingsDialogBootloaderReact.bs").make(n,o,q,1-+u.is_canonical,r,t,s,c("bs_curry")._1(B[0],j),[]))})},x=function x(B,C){B.preventDefault();B.stopPropagation();return w(C)},y=function y(B,C){if(B.keyCode===c("Keys.bs").$$return){B.preventDefault();B.stopPropagation();return w(C)}else return 0},z=function z(){__p&&__p();if(p){var B=p[0];if(B!==0){var C;if(B>0)if(B<86401)C=0;else{var D=+(new Date(B*1e3).getDay()===new Date().getDay());C=D?[i._("Off until {time}",[i.param("time",c("formatDate")(B,"g:ia"))])]:[i._("Off until {time} tomorrow",[i.param("time",c("formatDate")(B,"g:ia"))])]}else C=B===-1?[i._("Off indefinitely")]:0;if(C)return c("React").createElement("span",{className:"_3x6v"},C[0]);else return null}else return null}else return null},A=l.slice();A[9]=function(B){var C=i._("Notifications"),D=c("MessengerCustomColorUtils.bs").customColorOrBlue(u);return c("React").createElement("div",{ref:c("bs_curry")._1(B[0],k),className:"_3szn _3szo",role:"button",tabIndex:0,onKeyDown:c("bs_curry")._1(B[0],y),onClick:c("bs_curry")._1(B[0],x)},c("React").createElement("div",{className:"_3szp"},c("MessengerNotificationsIconSVGReact.bs").make("_3wh2",D)),c("ReasonReact.bs").element(0,0,c("LeftRightReact.bs").make(["_3szq"],[C,z(0)])))};A[10]=function(){return[[0]]};A[12]=function(v,B){return 0};return A}g.handleDialogToggle=j;g.setRef=k;g.component=l;g.make=m}),null);
__d("MessengerMuteButtonContainerReact.bs",["bs_curry","bs_js_boolean","ReasonReact.bs","MercuryThreadInfo","MercuryThreadActions","MessengerNotificationsButtonReact.bs"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h=c("ReasonReact.bs").statelessComponent("MessengerMuteButtonContainerReact");function i(j,k,l){__p&&__p();var m=function m(q,l){c("MercuryThreadActions").getForFBID(k).updateMuteSetting(j.thread_id,q);return 0},n=function n(q,l){c("MercuryThreadActions").getForFBID(k).updateMentionsMuteSetting(j.thread_id,c("bs_js_boolean").to_js_boolean(q));return 0},o=function o(q,l){c("MercuryThreadActions").getForFBID(k).updateReactionsMuteSetting(j.thread_id,c("bs_js_boolean").to_js_boolean(q));return 0},p=h.slice();p[9]=function(q){var r=+c("MercuryThreadInfo").isMuted(j),s=c("MercuryThreadInfo").getMuteSetting(j);return c("ReasonReact.bs").element(0,0,c("MessengerNotificationsButtonReact.bs").make(r,+c("MercuryThreadInfo").areMentionsMuted(j),s==null?0:[s],+c("MercuryThreadInfo").areReactionsMuted(j),c("bs_curry")._1(q[0],n),c("bs_curry")._1(q[0],m),c("bs_curry")._1(q[0],o),j,[]))};return p}g.component=h;g.make=i}),null);
__d("MessengerInfoPanelThreadOptionsContainerReact.bs",["fbt","bs_curry","gkx","WorkGKs","CurrentUser","ReasonReact.bs","bs_js_primitive","MessagingTag","MercuryThreadActions","MessengerAdminGroupUtils","MessengerInfoPanelEmojiReact.bs","MessengerInfoPanelSearchReact.bs","MessengerInfoPanelSectionReact.bs","MessengerInfoPanelNicknamesReact.bs","MessengerMuteButtonContainerReact.bs","MessagingThreadCustomizationSource","MessengerInfoPanelCustomColorReact.bs","MessengerInfoPanelManageReviewReact.bs","MessengerInfoPanelManageMessagesReact.bs"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i=c("ReasonReact.bs").statelessComponent("MessengerInfoPanelThreadOptionsContainerReact");function j(l,m,n,o,p,q){__p&&__p();var r=function r(v,q){c("MercuryThreadActions").getForFBID(o).changeThreadColor(n.thread_id,v,c("MessagingThreadCustomizationSource").SETTINGS);return 0},s=function s(v,q){c("MercuryThreadActions").getForFBID(o).changeThreadEmoji(n.thread_id,v,c("MessagingThreadCustomizationSource").SETTINGS);return 0},t=function t(v,q){c("MercuryThreadActions").getForFBID(o).changeThreadNicknames(n.thread_id,v[0],v[1],c("MessagingThreadCustomizationSource").SETTINGS);return 0},u=i.slice();u[9]=function(v){if(!n.is_subscribed||n.folder!==c("MessagingTag").INBOX)return null;else{var w=+c("CurrentUser").isWorkUser(),x=+c("MessengerAdminGroupUtils").canUpdateThreadCustomization(n,o),y=x&&(1-w||+c("WorkGKs").workchat_thread_color_customization),z=y!==0?c("ReasonReact.bs").element(0,0,c("MessengerInfoPanelCustomColorReact.bs").make(n,c("bs_curry")._1(v[0],r),[])):null,A=x&&(1-w||+c("WorkGKs").workchat_thread_emoji_customization),B=A!==0?c("ReasonReact.bs").element(0,0,c("MessengerInfoPanelEmojiReact.bs").make(n,o,c("bs_curry")._1(v[0],s),[])):null,C=c("ReasonReact.bs").element(0,0,c("MessengerInfoPanelSearchReact.bs").make(n,[])),D=1-w||+c("WorkGKs").workchat_thread_nickname_customization,E=D!==0?c("ReasonReact.bs").element(0,0,c("MessengerInfoPanelNicknamesReact.bs").make(m,n,o,c("bs_curry")._1(v[0],t),[])):null,F=+c("gkx")("AT6mUVDD74IWOTG0apJZF1LePh7SrhTQTrb19q8AoflSv5-DHG9ZPR3YfgtHmrA5yQIw4oTG7io_Cp0zzeQ4tvCvUxrq6ExcZIsaJQRg7A8JWA"),G=F!==0?null:c("ReasonReact.bs").element(0,0,c("MessengerInfoPanelManageMessagesReact.bs").make(n,o,[])),H=c("ReasonReact.bs").element(0,0,c("MessengerInfoPanelManageReviewReact.bs").make(n,o,[])),I=c("ReasonReact.bs").element(0,0,c("MessengerMuteButtonContainerReact.bs").make(n,o,[]));return c("ReasonReact.bs").element(0,0,c("MessengerInfoPanelSectionReact.bs").make(c("bs_js_primitive").null_undefined_to_opt(n.custom_color),[1],[l],[p],[h._("Options")],[C,E,z,B,G,H,I]))}};return u}var k=c("ReasonReact.bs").wrapReasonForJs(i,function(l){return j(+l.isCollapsed,l.participants,l.thread,l.viewer,l.onToggle,[])});g.component=i;g.make=j;g.jsComponent=k}),null);
__d("Number.bs",["ReasonReact.bs","Number.react"],(function a(b,c,d,e,f,g){"use strict";function h(i,j){return c("ReasonReact.bs").wrapJsForReason(c("Number.react"),{value:i},j)}g.make=h}),null);
__d("MessengerMessageCountReact.bs",["cx","fbt","bs_block","bs_curry","React","Number.bs","ReasonReact.bs","bs_js_primitive","MercuryThreadInformer"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();function j(p){return c("bs_block").__(0,[p])}function k(p){return c("bs_block").__(1,[p])}var l=c("ReasonReact.bs").reducerComponentWithRetainedProps("MessengerMessageCountReact");function m(p,q){if(p==null)return 0;else return c("bs_js_primitive").undefined_to_opt(p[q])}function n(p,q,r){__p&&__p();return[l[0],l[1],l[2],function(s){var t=+(s[3][0]===p.thread_id);if(t!==0)return s[2];else return p.message_count},l[4],l[5],l[6],l[7],l[8],function(s){return c("React").createElement("div",{className:"_60oa"},i._("Messages Sent:"),c("React").createElement("div",{className:"_397l"},c("ReasonReact.bs").element(0,0,c("Number.bs").make(s[2],[]))))},function(){return p.message_count},[p.thread_id],function(s,t){__p&&__p();if(s.tag){var u=m(s[0],p.thread_id);if(u&&u[0].source==="client_delete_messages")return c("bs_block").__(0,[t-1|0]);else return 0}else{var v=m(s[0],p.thread_id);if(v)return c("bs_block").__(0,[t+v[0].length|0]);else return 0}},function(s){__p&&__p();var t=s[1],u=c("MercuryThreadInformer").getForFBID(q);return[[function(){return u.subscribe("messages-received",function(r,v){return c("bs_curry")._2(t,j,v)})},function(v){v.unsubscribe();return 0}],[[function(){return u.subscribe("messages-reordered",function(r,v){return c("bs_curry")._2(t,k,v)})},function(v){v.unsubscribe();return 0}],0]]},l[14]]}var o=c("ReasonReact.bs").wrapReasonForJs(l,function(p){return n(p.thread,p.viewer,[])});g.received=j;g.deleted=k;g.component=l;g.getThreadPayloadFromInform=m;g.make=n;g.jsComponent=o}),null);
__d("MessengerInfoPanelThreadStatsContainerReact.bs",["fbt","ReasonReact.bs","bs_js_primitive","MessengerConfig","MessengerMessageCountReact.bs","MessengerInfoPanelSectionReact.bs"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i=c("ReasonReact.bs").statelessComponent("MessengerInfoPanelThreadStatsContainerReact");function j(m){return+(m.message_count<10)}function k(m,n,o,p,q){var r=i.slice();r[9]=function(){if(!n.is_subscribed||n.message_count<10||!c("MessengerConfig").ThreadStatsMessageCount)return null;else{var s=+c("MessengerConfig").ThreadStatsMessageCount,t=s!==0?c("ReasonReact.bs").element(0,0,c("MessengerMessageCountReact.bs").make(n,o,[])):null;return c("ReasonReact.bs").element(0,0,c("MessengerInfoPanelSectionReact.bs").make(c("bs_js_primitive").null_undefined_to_opt(n.custom_color),[1],[m],[p],[h._("Conversation Details")],[t]))}};return r}var l=c("ReasonReact.bs").wrapReasonForJs(i,function(m){return k(+m.isCollapsed,m.thread,m.viewer,m.onToggle,[])});g.component=i;g.isNewThread=j;g.make=k;g.jsComponent=l}),null);
__d("MessengerSharedFile.react",["cx","Link.react","MercuryAttachment","React","joinClasses"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i,j,k=c("React").PropTypes;i=babelHelpers.inherits(l,c("React").PureComponent);j=i&&i.prototype;l.prototype.render=function(){var m=this.props,n=m.filename,o=m.url,p=m.mimetype,q=c("MercuryAttachment").getAttachIconClassByMime(p);return c("React").createElement("li",{className:"_2a42"},c("React").createElement(c("Link.react"),{className:c("joinClasses")("_2a43",q),target:"_blank",href:o},c("React").createElement("div",{className:"_2a44"},c("React").createElement("i",{className:"img"}),c("React").createElement("span",{className:"_2a45 _fy2"},n))))};function l(){i.apply(this,arguments)}l.propTypes={filename:k.string.isRequired,url:k.string.isRequired,mimetype:k.string.isRequired};f.exports=l}),null);
__d("MessengerSharedFiles.react",["cx","fbt","Link.react","MessengerSharedFile.react","MessengerSpinner.react","React","RelayModern","MessengerSharedFiles_sharedFiles.graphql"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j,k,l=c("RelayModern").createFragmentContainer,m=c("RelayModern").graphql,n=c("React").PropTypes;j=babelHelpers.inherits(o,c("React").Component);k=j&&j.prototype;o.prototype.$MessengerSharedFiles1=function(){return c("React").createElement("div",{className:"_omn"},c("React").createElement(c("MessengerSpinner.react"),null))};o.prototype.$MessengerSharedFiles2=function(){return i._("Show All")};o.prototype.$MessengerSharedFiles3=function(){return i._("Show Less")};o.prototype.$MessengerSharedFiles4=function(){var p=this.props.isLoadingFiles?this.$MessengerSharedFiles1():null,q=this.props.isExpanded?this.$MessengerSharedFiles3():this.$MessengerSharedFiles2();return c("React").createElement("li",{className:"_2a42 _omo"},c("React").createElement(c("Link.react"),{className:"_2a43",target:"_blank",onClick:this.props.toggleExpand},c("React").createElement("div",{className:"_2a44"},p,q)))};o.prototype.render=function(){var p=this.props.sharedFiles,q=p.edges,r=this.props.hasOverflow?this.$MessengerSharedFiles4():null;return c("React").createElement("ul",{className:"_2o39"},q.map(function(s){var t=s.node;return c("React").createElement(c("MessengerSharedFile.react"),{key:t.legacy_attachment_id,filename:t.filename,url:t.url,mimetype:t.mimetype})}),r)};function o(){j.apply(this,arguments)}o.propTypes={sharedFiles:n.object.isRequired,threadFBID:n.string.isRequired,toggleExpand:n.func.isRequired};f.exports=l(o,{sharedFiles:function p(){return c("MessengerSharedFiles_sharedFiles.graphql")}})}),null);
__d("MessengerSharedFilesContainer.react",["fbt","MessengerInfoPanelSectionReact.bs","MessengerSharedFiles.react","React","RelayModern","MessengerSharedFilesContainer_sharedFiles.graphql","MessengerSharedFilesContainerRefetchQuery.graphql"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i=c("MessengerInfoPanelSectionReact.bs").jsComponent,j=c("RelayModern").createRefetchContainer,k=c("RelayModern").graphql,l=c("React").PropTypes,m=10,n=c("React").createClass({displayName:"MessengerSharedFilesContainer",propTypes:{sharedFiles:l.object,threadFBID:l.string,isCollapsed:l.bool,onToggle:l.func,relay:l.object},getInitialState:function o(){var p=true;if(this.props.sharedFiles)p=this.props.sharedFiles.message_shared_media.count<=m;return{isAllFilesShown:p,isLoadingFiles:false}},_toggleExpand:function o(){if(this.state.isLoadingFiles||!this.props.sharedFiles)return;var p=this.props.sharedFiles.message_shared_media,q=p.count,r=this.state.isAllFilesShown;this.setState({isLoadingFiles:true},function(){if(this.props.relay)this.props.relay.refetch({count:r?m:q,threadFBID:this.props.threadFBID},null,function(){this.setState({isAllFilesShown:!r,isLoadingFiles:false})}.bind(this))}.bind(this))},render:function o(){var p=this.props,q=p.sharedFiles,r=p.threadFBID,s=p.isCollapsed,t=p.onToggle;if(!r||!q)return null;var u=q.message_shared_media;if(!u||u.count===0)return null;return c("React").createElement(i,{isCollapsible:true,isCollapsed:s,onToggle:t,title:h._("Shared Files")},c("React").createElement(c("MessengerSharedFiles.react"),{isExpanded:this.state.isAllFilesShown,hasOverflow:u.count>m,isLoadingFiles:this.state.isLoadingFiles,toggleExpand:this._toggleExpand,sharedFiles:u,threadFBID:r}))}});f.exports=j(n,{sharedFiles:function o(){return c("MessengerSharedFilesContainer_sharedFiles.graphql")}},function(){return c("MessengerSharedFilesContainerRefetchQuery.graphql")})}),null);
__d("MessengerSharedLinks.react",["cx","fbt","Link.react","MessengerSpinner.react","Image.react","Tooltip.react","React","RelayClassic_DEPRECATED","isLinkshimURI","URI"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j,k,l=c("React").PropTypes;j=babelHelpers.inherits(m,c("React").PureComponent);k=j&&j.prototype;m.prototype.render=function(){return c("React").createElement("div",{className:"_2wjt"},this.props.sharedLinks.map(function(n,o){return this.$MessengerSharedLinks1(n,o)}.bind(this)),this.$MessengerSharedLinks2())};m.prototype.$MessengerSharedLinks1=function(n,o){var p=n.media&&n.media.image&&n.media.image.uri?c("React").createElement(c("Image.react"),{className:"_2wjy",src:n.media.image.uri,style:{height:80,width:80}}):null;return c("React").createElement(c("Tooltip.react"),{key:o,tooltip:c("React").createElement("div",{className:"_2wjx"},p,c("React").createElement("div",{className:"_2wjz"},c("React").createElement("div",{className:"_2wj-"},n.title),c("React").createElement("div",{className:"_2wj_"},n.description?n.description.text:"")))},c("React").createElement(c("Link.react"),{className:"_3oh- _2wju",href:n.url,key:o,style:{color:this.props.customColor},target:"_blank"},this.$MessengerSharedLinks3(n.url)))};m.prototype.$MessengerSharedLinks3=function(n){if(n==null)return"";var o=new(c("URI"))(n);if(!c("isLinkshimURI")(o))return n;var p=o.getQueryData().u;if(!p)return n;return p};m.prototype.$MessengerSharedLinks2=function(){if(!this.props.canShowMore)return null;if(this.props.isFetchingMore)return c("React").createElement("div",{className:"_2n20",style:{flex:0}},c("React").createElement(c("MessengerSpinner.react"),null));return c("React").createElement(c("Link.react"),{className:"_3oh- _2wjv",style:{color:this.props.customColor},onClick:this.props.onClickShowMore},i._("Show More..."))};m.getShareLinkFragment=function(){return function(){return{children:[{fieldName:"title",kind:"Field",metadata:{},type:"String"},{children:[{fieldName:"text",kind:"Field",metadata:{},type:"String"}],fieldName:"description",kind:"Field",metadata:{canHaveSubselections:true},type:"TextWithEntities"},{fieldName:"url",kind:"Field",metadata:{},type:"Url"},{children:[{calls:[{kind:"Call",metadata:{type:"Int"},name:"width",value:{kind:"CallValue",callValue:80}},{kind:"Call",metadata:{type:"Int"},name:"height",value:{kind:"CallValue",callValue:80}}],children:[{fieldName:"uri",kind:"Field",metadata:{},type:"Url"}],fieldName:"image",kind:"Field",metadata:{canHaveSubselections:true},type:"Image"},{fieldName:"__typename",kind:"Field",metadata:{isGenerated:true,isRequisite:true},type:"String"},{children:[{fieldName:"id",kind:"Field",metadata:{isGenerated:true,isRequisite:true},type:"ID"},{fieldName:"__typename",kind:"Field",metadata:{isGenerated:true,isRequisite:true},type:"String"}],id:c("RelayClassic_DEPRECATED").QL.__id(),kind:"Fragment",metadata:{isAbstract:true},name:"IdFragment",type:"Node"}],fieldName:"media",kind:"Field",metadata:{canHaveSubselections:true,isAbstract:true},type:"Media"}],id:c("RelayClassic_DEPRECATED").QL.__id(),kind:"Fragment",metadata:{},name:"MessengerSharedLinks_reactRelayQL",type:"StoryAttachment"}}()};function m(){j.apply(this,arguments)}m.propTypes={customColor:l.string,isFetchingMore:l.bool.isRequired,sharedLinks:l.array.isRequired,threadFBID:l.string.isRequired,onClickShowMore:l.func.isRequired};f.exports=m}),null);
__d("MessengerSharedLinksContainer.react",["fbt","MessengerInfoPanelSectionReact.bs","MessengerSharedLinks.react","React","RelayClassic_DEPRECATED"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i,j,k=c("MessengerInfoPanelSectionReact.bs").jsComponent,l=c("React").PropTypes,m=10;i=babelHelpers.inherits(n,c("React").PureComponent);j=i&&i.prototype;function n(o){__p&&__p();j.constructor.call(this,o);this.state={canShowMore:false,isFetchingMore:false,numLinks:0,fetchCount:m};this.$MessengerSharedLinksContainer1=function(){this.props.relay.setVariables({count:this.props.relay.variables.count+m},function(p){if(p.done||p.aborted){this.setState({isFetchingMore:false});if(p.done)this.setState({canShowMore:this.props.sharedLinks.shared_links.length>=this.state.fetchCount})}}.bind(this));this.setState({isFetchingMore:true,fetchCount:this.state.fetchCount+m})}.bind(this)}n.prototype.componentWillUpdate=function(o){if(o.sharedLinks&&this.state.numLinks!==o.sharedLinks.shared_links.length){var p=o.sharedLinks.shared_links.length;this.setState({canShowMore:p>=this.state.fetchCount,isFetchingMore:false,numLinks:p})}};n.prototype.componentDidMount=function(){var o=this.props.sharedLinks,p=o&&o.shared_links?o.shared_links.length:0;this.setState({canShowMore:p>=this.state.fetchCount,isFetchingMore:false,numLinks:p})};n.prototype.render=function(){if(!this.props.threadFBID||!this.props.sharedLinks||!this.props.sharedLinks.shared_links||this.props.sharedLinks.shared_links.length===0)return null;return c("React").createElement(k,{isCollapsible:true,isCollapsed:this.props.isCollapsed,customColor:this.props.customColor,onToggle:this.props.onToggle,title:h._("Shared Links")},c("React").createElement(c("MessengerSharedLinks.react"),{canShowMore:this.state.canShowMore,customColor:this.props.customColor,isFetchingMore:this.state.isFetchingMore,sharedLinks:this.props.sharedLinks.shared_links,threadFBID:this.props.threadFBID,onClickShowMore:this.$MessengerSharedLinksContainer1}))};n.propTypes={customColor:l.string,isCollapsed:l.bool.isRequired,sharedLinks:l.object,threadFBID:l.string,onToggle:l.func.isRequired};f.exports=c("RelayClassic_DEPRECATED").createContainer(n,{initialVariables:{count:m},fragments:{sharedLinks:function o(){return function(p){return{children:[{calls:[{kind:"Call",metadata:{type:"Int"},name:"first",value:{kind:"CallVariable",callVariableName:"count"}}],children:[].concat.apply([],[c("RelayClassic_DEPRECATED").QL.__frag(p)]),fieldName:"shared_links",kind:"Field",metadata:{canHaveSubselections:true,isPlural:true},type:"StoryAttachment"},{fieldName:"id",kind:"Field",metadata:{isGenerated:true,isRequisite:true},type:"ID"}],id:c("RelayClassic_DEPRECATED").QL.__id(),kind:"Fragment",metadata:{},name:"MessengerSharedLinksContainer_react_SharedLinksRelayQL",type:"MessageThread"}}(c("MessengerSharedLinks.react").getShareLinkFragment())}}})}),null);
__d("MessengerSharedLinksContainerRoute",["RelayClassic_DEPRECATED"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h,i;h=babelHelpers.inherits(j,c("RelayClassic_DEPRECATED").Route);i=h&&h.prototype;function j(){h.apply(this,arguments)}j.routeName="MessengerSharedLinksContainerRoute";j.paramDefinitions={threadFBID:{type:"String",required:true}};j.queries={sharedLinks:function k(l){return function(m){return{calls:[{kind:"Call",metadata:{type:"ID!"},name:"id",value:{kind:"CallVariable",callVariableName:"threadFBID"}}],children:[].concat.apply([],[{fieldName:"id",kind:"Field",metadata:{isGenerated:true,isRequisite:true},type:"ID"},c("RelayClassic_DEPRECATED").QL.__frag(m)]),fieldName:"message_thread",kind:"Query",metadata:{identifyingArgName:"id",identifyingArgType:"ID!"},name:"MessengerSharedLinksContainerRoute",type:"MessageThread"}}(l.getFragment("sharedLinks"))}};f.exports=j}),null);
__d("MessengerSharedPhotoReact.bs",["bs_js_boolean","ReasonReact.bs","MessengerSharedPhoto.react"],(function a(b,c,d,e,f,g){"use strict";function h(i,j,k,l,m,n,o){return c("ReasonReact.bs").wrapJsForReason(c("MessengerSharedPhoto.react"),{className:i,fbid:j,onClick:k,photoID:l,uri:m,isSpherical:c("bs_js_boolean").to_js_boolean(n)},[])}g.make=h}),null);
__d("MessengerSharedPhotosAlbumViewContainerReact.bs",["ReasonReact.bs","MessengerSharedPhotosAlbumViewContainer.react"],(function a(b,c,d,e,f,g){"use strict";function h(i,j,k,l,m){return c("ReasonReact.bs").wrapJsForReason(c("MessengerSharedPhotosAlbumViewContainer.react"),{onClick:i,onCloseSharedPhotos:j,threadID:k,viewedPhoto:l},[])}g.make=h}),null);
__d("MessengerSharedPhotosVideosData.bs",["bs_curry","bs_js_dict","bs_caml_array","bs_js_primitive","MessengerThreadSharedMediaHelper"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();function h(t){return{edges:t[0],page_info:t[1]}}function i(t){return[t.edges,t.page_info]}var j={};function k(t){return c("bs_js_primitive").undefined_to_opt(j[t])}function l(t,u){j[t]=u;return 0}function m(t){var u=t[0];if(u.length!==0)return 1;else return 0}function n(t){return i(c("bs_caml_array").caml_array_get(c("bs_js_dict").values(t),0).message_shared_media)}function o(t,u){return+(t[0].length<u)}function p(t,u,v,w,x){var y=n(t),z=w[0],A=o(y,u)?2:1,B=z[1],C=[A,B],D=w[1],E=D?[C,[[y[0].concat(D[0][0]),y[1]]]]:[C,[y]];l(x,E);return c("bs_curry")._1(v,0)}function q(t,u,v,w){__p&&__p();var x=j[v],y=0;if(x!==undefined)if(x[0][0]!==0)y=1;else return 0;else y=1;if(y===1){var z;if(x!==undefined){var A=x[1],B=x[0],C=0;if(A){var D=A[0][0];if(D.length!==0)z=[[[0,B[1]],x[1]],[c("bs_caml_array").caml_array_get(D,0).cursor]];else C=2}else C=2;if(C===2)z=[[[0,B[1]],x[1]],0]}else z=[[[0,1],0],0];l(v,z[0]);c("MessengerThreadSharedMediaHelper").loadMoreLatest(u,c("bs_js_primitive").option_get(z[1]),t,function(E){var z=j[v];if(z!==undefined)return p(E,t,w,z,v);else return 0});return 0}}function r(t,u,v,w,x){var y=n(t),z=w[0],A=z[0],B=o(y,u)?2:1,C=[A,B],D=w[1],E=D?[C,[[D[0][0].concat(y[0]),y[1]]]]:[C,[y]];l(x,E);return c("bs_curry")._1(v,0)}function s(t,u,v,w){__p&&__p();var x=j[v],y=0;if(x!==undefined)if(x[0][1]!==1)return 0;else y=1;else y=1;if(y===1){var z;if(x!==undefined){var A=x[1],B=x[0],C=0;if(A){var D=A[0][0];if(D.length!==0)z=[[[B[0],0],x[1]],[c("bs_caml_array").caml_array_get(D,D.length-1|0).cursor]];else C=2}else C=2;if(C===2)z=[[[B[0],0],x[1]],0]}else z=[[[1,0],0],0];l(v,z[0]);c("MessengerThreadSharedMediaHelper").loadMorePrevious(u,c("bs_js_primitive").option_get(z[1]),t,function(E){var z=j[v];if(z!==undefined)return r(E,t,w,z,v);else return 0});return 0}}g.actualDataToJs=h;g.actualDataFromJs=i;g.data=j;g.get=k;g.set=l;g.actuallyHasPhotosAndVideosThatCanBeDisplayed=m;g.accessValueFromPayload=n;g.noMoreMediaToFetchForNow=o;g.onFetchNewerDone=p;g.fetchNewer=q;g.onFetchOlderDone=r;g.fetchOlder=s}),null);
__d("SpotlightMessengerSharedMediaViewerContainerReact.bs",["bs_js_boolean","ReasonReact.bs","SpotlightMessengerSharedMediaViewerContainer.react"],(function a(b,c,d,e,f,g){"use strict";function h(i,j,k,l,m,n,o){return c("ReasonReact.bs").wrapJsForReason(c("SpotlightMessengerSharedMediaViewerContainer.react"),{onClosePhotoView:i,openAlbum:j,photoID:k,rootClassName:l,threadID:m,disableForward:c("bs_js_boolean").to_js_boolean(n)},[])}g.make=h}),null);
__d("SpotlightViewerReact.bs",["bs_js_boolean","ReasonReact.bs","SpotlightViewer"],(function a(b,c,d,e,f,g){"use strict";function h(i,j,k,l){return c("ReasonReact.bs").wrapJsForReason(c("SpotlightViewer"),{className:i,onHide:j,open:c("bs_js_boolean").to_js_boolean(k)},l)}g.make=h}),null);
__d("MessengerSharedPhotosReact.bs",["cx","fbt","bs_array","bs_block","bs_curry","React","bs_caml_array","ReasonReact.bs","bs_js_primitive","MercuryAttachment","MercuryMessageStore","SphericalPhotoUtils","SpotlightViewerReact.bs","MessengerSharedPhotoReact.bs","MessengerInfoPanelSectionReact.bs","MessengerSharedPhotosVideosData.bs","MessengerSharedPhotosAlbumViewContainerReact.bs","SpotlightMessengerSharedMediaViewerContainerReact.bs"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();function j(o,p,q){__p&&__p();var r=new(c("MercuryMessageStore"))(p);r.subscribe(function(s){__p&&__p();var t=s.messages,u=s.eventType;if(t.length!==0)if(u!==c("MercuryMessageStore").MESSAGES_CHANGED)return 0;else{var v=c("bs_caml_array").caml_array_get(t,t.length-1|0),w=+v.attachments.some(function(x){if(c("MercuryAttachment").isPhotoAttachment(x))return 1;else return+c("MercuryAttachment").isVideoAttachment(x)});if(w)return c("MessengerSharedPhotosVideosData.bs").fetchNewer(Math.max(v.attachments.length,10),o,p,function(){return c("bs_curry")._1(q[4],0)});else return 0}else return 0});return r}var k=c("React").createElement("div",{className:"_4dfu"}),l=c("ReasonReact.bs").reducerComponentWithRetainedProps("MessengerSharedPhotosReact");function m(o,p,q,r,s,t,u){__p&&__p();var v=function v(w){__p&&__p();var x=c("MessengerSharedPhotosVideosData.bs").get(s);if(t){var y=t[0];if(x)if(x[0][0][1]!==1||q||!c("bs_curry")._1(o,0)||c("bs_curry")._1(p,0)===0)return 0;else return c("MessengerSharedPhotosVideosData.bs").fetchOlder(12,y,s,function(){return c("bs_curry")._1(w[4],0)});else return c("MessengerSharedPhotosVideosData.bs").fetchOlder(12,y,s,function(){return c("bs_curry")._1(w[4],0)})}else return 0};return[l[0],l[1],l[2],function(w){__p&&__p();var x=w[3],y=w[2][2][0];if(x!==s)if(y){var z=y[0];if(t){z.destroy();w[2][2][0]=[j(t[0],s,w)]}else z.destroy()}else if(t)w[2][2][0]=[j(t[0],s,w)];return w[2]},function(w){v(w);if(t)w[2][2][0]=[j(t[0],s,w)];return 0},function(w){return v(w[0])},function(w){var x=w[2][2][0];if(x){x[0].destroy();return 0}else return 0},l[7],l[8],function(w){__p&&__p();var x=c("MessengerSharedPhotosVideosData.bs").get(s);if(t)if(x){var y=x[0],z=y[1];if(z){var A=z[0],B=t[0];if(c("MessengerSharedPhotosVideosData.bs").actuallyHasPhotosAndVideosThatCanBeDisplayed(A)){var C=w[2][1],D=C?c("ReasonReact.bs").element(0,0,c("SpotlightMessengerSharedMediaViewerContainerReact.bs").make(function(){return c("bs_curry")._1(w[4],1)},function(I){return c("bs_curry")._1(w[4],c("bs_block").__(0,[I]))},C[0],"",B,0,[])):null,E=w[2][0],F=E?c("ReasonReact.bs").element(0,["spotlightViewer"],c("SpotlightViewerReact.bs").make("_3ode",function(){return c("bs_curry")._1(w[4],2)},1,[c("ReasonReact.bs").element(0,0,c("MessengerSharedPhotosAlbumViewContainerReact.bs").make(function(I){return c("bs_curry")._1(w[4],c("bs_block").__(1,[I]))},function(){return c("bs_curry")._1(w[4],2)},B,E[0],[]))])):null,G="_3m31",H=i._("Shared Photos");return c("ReasonReact.bs").element(0,0,c("MessengerInfoPanelSectionReact.bs").make(0,[1],[q],[r],[H],[D,F,c("React").createElement("div",{className:"_40jj _5l-3"},c("bs_array").map(function(I){__p&&__p();var J=I.node.image,K=I.node,x=K.photo_encodings,y;if(x==null)y=[0,J.uri];else if(x.length!==0){var L=c("SphericalPhotoUtils").getThumbnailsFromPhotoEncodings(x).smallThumbnail,M=L==null?J.uri:L;y=[1,M]}else y=[0,J.uri];return c("ReasonReact.bs").element([K.legacy_attachment_id],0,c("MessengerSharedPhotoReact.bs").make(G,K.legacy_attachment_id,function(N){return c("bs_curry")._1(w[4],c("bs_block").__(2,[N]))},K.id,y[1],y[0],[]))},A[0])),y[0][1]>=2?k:null]))}else return null}else return null}else return null;else return null},function(){return[0,0,[0]]},s,function(w,x){if(typeof w==="number")switch(w){case 0:return c("bs_block").__(0,[x]);case 1:return c("bs_block").__(0,[[x[0],0,x[2]]]);case 2:return c("bs_block").__(0,[[0,x[1],x[2]]])}else switch(w.tag|0){case 0:return c("bs_block").__(0,[[[w[0]],0,x[2]]]);case 1:return c("bs_block").__(0,[[0,[w[0]],x[2]]]);case 2:return c("bs_block").__(0,[[x[0],[w[0]],x[2]]])}},l[13],l[14]]}var n=c("ReasonReact.bs").wrapReasonForJs(l,function(o){return m(o.getIsScrolledToBottom,o.getScrollableHeight,+o.isCollapsed,o.onToggle,o.threadID,c("bs_js_primitive").null_undefined_to_opt(o.threadFBID),[])});g.subscribeStoreUpdate=j;g.endOfMediaIndicator=k;g.component=l;g.make=m;g.jsComponent=n}),null);
__d("MessengerThreadInfoPanel.react",["cx","fbt","CurrentUser","immutable","ImmutableObject","Link.react","MercuryAttachment","MercuryIDs","MercuryThreadInfo","MercuryMessageStore","MessageThreadAssociatedObjectUtils","MessengerAddToConversationDialogReact.bs","MessengerAdminGroupUtils","MessengerConfig","MessengerContactAdapters","MessengerDialogs.bs","MessengerDomIDs.bs","MessengerInfoPanelAssociatedObjectSection.react","MessengerInfoPanelGroupSection.react","MessengerInfoPanelNameSectionReact.bs","MessengerInfoPanelPeopleSection.react","MessengerInfoPanelSectionReact.bs","MessengerInfoPanelThreadOptionsContainerReact.bs","MessengerInfoPanelThreadStatsContainerReact.bs","MessengerSharedLinksContainer.react","MessengerSharedLinksContainerRoute","MessengerSharedPhotosReact.bs","MessengerSharedFilesContainer.react","MercuryBlockedParticipants.bs","React","RelayFBEnvironment","RelayModern","react-relay/classic/container/RelayRootContainer","SubscriptionsHandler","gkx","MessengerThreadInfoPanelSharedFilesQuery.graphql"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j,k,l,m=c("MessengerAddToConversationDialogReact.bs").jsComponent,n=c("MessengerDomIDs.bs").ids,o=c("MessengerInfoPanelNameSectionReact.bs").jsComponent,p=c("MessengerInfoPanelSectionReact.bs").jsComponent,q=c("MessengerInfoPanelThreadOptionsContainerReact.bs").jsComponent,r=c("MessengerInfoPanelThreadStatsContainerReact.bs").jsComponent,s=c("MessengerSharedPhotosReact.bs").jsComponent,t=c("MercuryBlockedParticipants.bs").get(),u=c("RelayModern").QueryRenderer,v=c("RelayModern").graphql,w=c("React").PropTypes;k=babelHelpers.inherits(x,c("React").PureComponent);l=k&&k.prototype;function x(){__p&&__p();var y,z;for(var A=arguments.length,B=Array(A),C=0;C<A;C++)B[C]=arguments[C];return z=(y=l.constructor).call.apply(y,[this].concat(B)),this.$MessengerThreadInfoPanel2=undefined,this.$MessengerThreadInfoPanel3=false,this.state={sharedFilesSection:null,sharedLinksSection:null},this.$MessengerThreadInfoPanel11=function(){this.$MessengerThreadInfoPanel3=false}.bind(this),this.$MessengerThreadInfoPanel14=function(D,event){this.props.onContactSelect(c("MessengerContactAdapters").fromMercuryParticipant(D))}.bind(this),this.$MessengerThreadInfoPanel13=function(D,E){this.props.onContactAction(D,c("MessengerContactAdapters").fromMercuryParticipant(E))}.bind(this),this.$MessengerThreadInfoPanel12=function(event){event.preventDefault();c("MessengerDialogs.bs").showDialog(function(){return c("React").createElement(m,{thread:this.props.thread,viewer:this.props.viewer})}.bind(this))}.bind(this),z}x.prototype.componentWillMount=function(){this.subscribeStoreUpdate(this.props.thread.thread_id)};x.prototype.componentWillReceiveProps=function(y){if(y.thread.thread_id!==this.props.thread.thread_id||y.photosSectionCollapsed!==this.props.photosSectionCollapsed||y.filesSectionCollapsed!==this.props.filesSectionCollapsed||y.linksSectionCollapsed!==this.props.linksSectionCollapsed){this.$MessengerThreadInfoPanel2&&this.$MessengerThreadInfoPanel2.release();this.subscribeStoreUpdate(y.thread.thread_id);this.$MessengerThreadInfoPanel3=true;setTimeout(function(){return this.setState({sharedFilesSection:this.$MessengerThreadInfoPanel4(true),sharedLinksSection:this.$MessengerThreadInfoPanel5(true)})}.bind(this),1e3)}};x.prototype.subscribeStoreUpdate=function(y){__p&&__p();this.$MessengerThreadInfoPanel1=new(c("MercuryMessageStore"))(y);this.$MessengerThreadInfoPanel2=new(c("SubscriptionsHandler"))();this.$MessengerThreadInfoPanel2.addSubscriptions(this.$MessengerThreadInfoPanel1.subscribe(function(z){__p&&__p();if(z.messages.length<1)return;var A=z.eventType==c("MercuryMessageStore").MESSAGES_RECEIVED,B=z.eventType==c("MercuryMessageStore").MESSAGES_CHANGED,C=z.messages[z.messages.length-1];if(!A&&!B)return;if(C.has_attachment&&C.attachments.length>0){var D=C.attachments.find(function(E){return c("MercuryAttachment").isPhotoAttachment(E)||c("MercuryAttachment").isVideoAttachment(E)});this.$MessengerThreadInfoPanel3=true;if(D)setTimeout(function(){return this.setState({sharedFilesSection:this.$MessengerThreadInfoPanel4(true)})}.bind(this),1e3)}if(C.attachments&&C.attachments.length>0){this.$MessengerThreadInfoPanel3=true;setTimeout(function(){return this.setState({sharedLinksSection:this.$MessengerThreadInfoPanel5(true)})}.bind(this),1e3)}}.bind(this)))};x.prototype.componentWillUnmount=function(){this.$MessengerThreadInfoPanel2&&this.$MessengerThreadInfoPanel2.release()};x.prototype.componentDidUpdate=function(){if(!this.$MessengerThreadInfoPanel3)this.setState({sharedFilesSection:null,sharedLinksSection:null})};x.prototype.render=function(){var y=this.props,z=y.viewer,A=y.thread,B=c("MercuryIDs").getParticipantIDFromUserID(z),C=A.participants&&A.participants.indexOf(B)!==-1,D=this.$MessengerThreadInfoPanel3?this.state.sharedFilesSection:this.$MessengerThreadInfoPanel4(false),E=this.$MessengerThreadInfoPanel3?this.state.sharedLinksSection:this.$MessengerThreadInfoPanel5(false),F=t.isMessageBlocked(A);return c("React").createElement("div",{className:"_3tkv",id:n.THREAD_INFO_PANEL},c("React").createElement("h3",{className:"accessible_elem"},i._("Conversation Information")),c("React").createElement(o,{contact:this.props.contact,isUnread:this.props.isUnread,isUserActive:this.props.isUserActive,isBlocked:F,lastActive:this.props.lastActive,onArchive:this.props.onArchive,onDelete:this.props.onDelete,onLeaveGroup:this.props.onLeaveGroup,onMarkRead:this.props.onMarkRead,onMarkSpam:this.props.onMarkSpam,onMarkUnread:this.props.onMarkUnread,onMute:this.props.onMute,onThreadNameChange:this.props.onThreadNameChange,onThreadPhotoChange:this.props.onThreadPhotoChange,onUnmute:this.props.onUnmute,onIgnore:this.props.onIgnore,onBlock:this.props.onBlock,onUnblock:this.props.onUnblock,showIgnoreGroup:c("gkx")("AT4mycXtTvfXJMAqrd_BSmI0_EEB-8pOs_AaNI2VArui1ThGLeffrrAudIg_2uctK6Ji6Zom3olu5BpcCU5_nD4U"),showBlock:this.props.showBlock,participants:this.props.participants,platform:this.props.platform,showLeaveGroup:this.props.showLeaveGroup,showReport:this.props.showReport,thread:this.props.thread,viewer:this.props.viewer}),this.$MessengerThreadInfoPanel6(),c("React").createElement(q,{isCollapsed:this.props.threadOptionsSectionCollapsed,participants:this.props.participants,thread:this.props.thread,viewer:this.props.viewer,onToggle:this.props.onThreadOptionsSectionToggle}),this.$MessengerThreadInfoPanel7(),c("MessengerAdminGroupUtils").canSeeGroupOptions(C,A,z)?this.$MessengerThreadInfoPanel8():null,this.props.thread.is_canonical?this.$MessengerThreadInfoPanel9():this.$MessengerThreadInfoPanel10(),E,D,c("React").createElement(s,{getIsScrolledToBottom:this.props.getIsScrolledToBottom,getScrollableHeight:this.props.getScrollableHeight,isCollapsed:this.props.photosSectionCollapsed,onToggle:this.props.onPhotosSectionToggle,threadID:A.thread_id,threadFBID:A.thread_fbid}))};x.prototype.$MessengerThreadInfoPanel5=function(y){if(!c("gkx")("AT67ptDj-ZaeW3Tyo9vbms2vYK1iy8t_jMuVqoEuGQXOqT3WIH9DEYXNBElJniUDVETCVboaIbfUes068dlrYLZO"))return null;var z=new(c("MessengerSharedLinksContainerRoute"))({threadFBID:this.props.thread.thread_id});return c("React").createElement(c("react-relay/classic/container/RelayRootContainer"),{Component:c("MessengerSharedLinksContainer.react"),renderLoading:function A(){return null},route:z,forceFetch:y,renderFetched:function(A){return c("React").createElement(c("MessengerSharedLinksContainer.react"),babelHelpers["extends"]({},A,{customColor:this.props.thread.custom_color,clearForceFetch:this.$MessengerThreadInfoPanel11,getIsScrolledToBottom:this.props.getIsScrolledToBottom,getScrollableHeight:this.props.getScrollableHeight,isCollapsed:this.props.linksSectionCollapsed,threadFBID:this.props.thread.thread_fbid,onToggle:this.props.onLinksSectionToggle}))}.bind(this)})};x.prototype.$MessengerThreadInfoPanel6=function(){var y=c("MessageThreadAssociatedObjectUtils").shouldRender(this.props.thread.associated_object);if(!y)return null;return c("React").createElement(c("MessengerInfoPanelAssociatedObjectSection.react"),{isCollapsed:this.props.associatedObjectSectionCollapsed,onToggle:this.props.onAssociatedObjectSectionToggle,customColor:this.props.thread.custom_color,associatedObject:this.props.thread.associated_object})};x.prototype.$MessengerThreadInfoPanel8=function(){return c("React").createElement(c("MessengerInfoPanelGroupSection.react"),{isOptionsCollapsed:this.props.groupOptionsSectionCollapsed,onOptionsToggle:this.props.onGroupOptionsSectionToggle,isApprovalsCollapsed:this.props.groupOptionsApprovalsSectionCollapsed,onApprovalToggle:this.props.onGroupApprovalOptionsSectionToggle,onToggle:this.props.onThreadOptionsSectionToggle,participants:this.props.participants,viewer:this.props.viewer,thread:this.props.thread})};x.prototype.$MessengerThreadInfoPanel7=function(){if(c("gkx")("AT5MgEQ2BX9EoYtDecXLd_H4PLe0dbm4AiKTfhaDnASNmsTXiM4GP6YZuoppqRP_9-lprti-5sdwbLUtVdnK9mMY"))return c("React").createElement(r,{isCollapsed:this.props.threadStatsSectionCollapsed,thread:this.props.thread,viewer:this.props.viewer,onToggle:this.props.onThreadStatsSectionToggle});return null};x.prototype.$MessengerThreadInfoPanel4=function(y){var z=this.props,A=z.filesSectionCollapsed,B=z.thread;return c("React").createElement(u,{cacheConfig:{force:y},environment:c("RelayFBEnvironment"),query:j||(j=function j(){return c("MessengerThreadInfoPanelSharedFilesQuery.graphql")}),variables:{threadFBID:B.thread_fbid},render:function(C){var D=C.error,E=C.props;if(D)return null;if(!E)return null;return c("React").createElement(c("MessengerSharedFilesContainer.react"),{threadFBID:B.thread_fbid,sharedFiles:E.message_thread,isCollapsed:A,onToggle:this.props.onFilesSectionToggle})}.bind(this)})};x.prototype.$MessengerThreadInfoPanel10=function(){return c("React").createElement(c("MessengerInfoPanelPeopleSection.react"),{canViewerReply:c("MercuryThreadInfo").canReply(this.props.thread),contactAdapter:c("MessengerContactAdapters").fromMercuryParticipant,isCollapsed:this.props.peopleSectionCollapsed,isViewerSubscribed:this.props.thread.is_subscribed,onAddPeopleClick:this.$MessengerThreadInfoPanel12,onContactAction:this.$MessengerThreadInfoPanel13,onContactSelect:this.$MessengerThreadInfoPanel14,onToggle:this.props.onPeopleSectionToggle,participants:this.props.participants,viewer:this.props.viewer,adminIds:this.props.thread.admin_ids,thread:this.props.thread})};x.prototype.$MessengerThreadInfoPanel9=function(){var y=this.props.contact;if(!y||!y.href||y.fbid.toString()===c("MessengerConfig").MoneyPennyFBID)return null;var z=y.href,A=c("CurrentUser").isWorkUser()?"Workplace":"Facebook",B=y.type==="page"?i._("{productName} Page",[i.param("productName",A)]):i._("{productName} Profile",[i.param("productName",A)]);return c("React").createElement(p,{customColor:this.props.thread.custom_color,title:B},c("React").createElement("div",{className:"_4v0l"},c("React").createElement(c("Link.react"),{className:"_3oh-",style:{color:this.props.thread.custom_color},href:z,target:"_blank"},z.replace("www.",""))))};x.propTypes={contact:w.instanceOf(c("ImmutableObject")),getIsScrolledToBottom:w.func.isRequired,getScrollableHeight:w.func.isRequired,isUserActive:w.bool.isRequired,isBusinessEnabled:w.bool,lastActive:w.string,linksSectionCollapsed:w.bool.isRequired,onArchive:w.func.isRequired,onContactAction:w.func.isRequired,onContactSelect:w.func.isRequired,onDelete:w.func.isRequired,onLeaveGroup:w.func,onLinksSectionToggle:w.func.isRequired,onMarkRead:w.func.isRequired,onMarkSpam:w.func.isRequired,onMarkUnread:w.func.isRequired,onMute:w.func.isRequired,onAssociatedObjectSectionToggle:w.func.isRequired,onPeopleSectionToggle:w.func.isRequired,onPhotosSectionToggle:w.func.isRequired,onFilesSectionToggle:w.func.isRequired,onThreadOptionsSectionToggle:w.func.isRequired,onThreadStatsSectionToggle:w.func.isRequired,onGroupOptionsSectionToggle:w.func.isRequired,onGroupApprovalOptionsSectionToggle:w.func.isRequired,onThreadNameChange:w.func.isRequired,onThreadPhotoChange:w.func.isRequired,onUnmute:w.func.isRequired,onIgnore:w.func.isRequired,onBlock:w.func.isRequired,onUnblock:w.func.isRequired,showBlock:w.bool.isRequired,participants:w.instanceOf(c("immutable").Map).isRequired,associatedObjectSectionCollapsed:w.bool.isRequired,peopleSectionCollapsed:w.bool.isRequired,photosSectionCollapsed:w.bool.isRequired,filesSectionCollapsed:w.bool.isRequired,platform:w.string,prevIsScrolledToBottom:w.bool.isRequired,prevScrollableHeight:w.number.isRequired,showLeaveGroup:w.bool.isRequired,thread:w.instanceOf(c("ImmutableObject")).isRequired,threadOptionsSectionCollapsed:w.bool.isRequired,threadStatsSectionCollapsed:w.bool.isRequired,groupOptionsSectionCollapsed:w.bool.isRequired,groupOptionsApprovalsSectionCollapsed:w.bool.isRequired,viewer:w.string.isRequired};f.exports=x}),null);
__d("MessengerThreadInfoPanelScrollableArea.react",["MessengerFlexArea.react","MessengerScrollableArea.react","React","ReactDOM"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h,i,j=c("React").PropTypes;h=babelHelpers.inherits(k,c("React").Component);i=h&&h.prototype;function k(){__p&&__p();var l,m;for(var n=arguments.length,o=Array(n),p=0;p<n;p++)o[p]=arguments[p];return m=(l=i.constructor).call.apply(l,[this].concat(o)),this.state={prevHeight:-1,prevIsScrolledToBottom:false},this.$MessengerThreadInfoPanelScrollableArea1=null,this.isScrolledToBottom=function(){if(this.refs.scrollable)return this.refs.scrollable.isScrolledToBottom();else return true}.bind(this),this.getHeight=function(){if(this.refs.scrollable)return c("ReactDOM").findDOMNode(this.refs.scrollable).offsetHeight;else return 0}.bind(this),this.$MessengerThreadInfoPanelScrollableArea2=function(){var q=this.isScrolledToBottom(),r=this.getHeight();if(this.state.prevIsScrolledToBottom!==q||this.state.prevHeight!==r)this.setState({prevHeight:r,prevIsScrolledToBottom:q})}.bind(this),m}k.prototype.render=function(){return c("React").createElement(c("MessengerFlexArea.react"),{className:this.props.className,onResize:this.$MessengerThreadInfoPanelScrollableArea2},c("React").createElement(c("MessengerScrollableArea.react"),{height:"100%",onScroll:this.$MessengerThreadInfoPanelScrollableArea2,ref:"scrollable"},this.props.children(this.state.prevHeight,this.state.prevIsScrolledToBottom,this.isScrolledToBottom,this.getHeight)))};k.propTypes={children:j.func.isRequired};f.exports=k}),null);
__d("XMessagingSetThreadStateController",["XController"],(function a(b,c,d,e,f,g){f.exports=c("XController").create("/messaging/set_thread_state/",{})}),null);
__d("MessengerThreadInfoPanelContainer.react",["fbt","AsyncRequest","IgnoreMessagesTypedLogger","MercuryConfig","MessengerMessageRequestsTypedLogger","immutable","ImmutableObject","MercuryAPIArgsSource","MercuryIDs","MercuryLogMessageType","MercuryMessageActions","MercuryMessageObject","MercuryThreadActions","MercuryThreadInfo","MercuryTriodeSourceUtil","MessagingTag","MessengerActions","MessengerDialogs.bs","MessengerConfirmBlockThreadDialogReact.bs","MessengerConfirmLeaveGroupDialogReact.bs","MessengerContactActions.bs","MessengerAdminGroupUtils","MessengerLeaveGroupAction","MessengerThreadInfoPanelScrollableArea.react","MessengerSettingsActions","MessengerSettingsStore","MessengerThreadInfoPanel.react","ReactComponentWithPureRenderMixin","React","StoreAndPropBasedStateMixin","URI","XMessagingSetThreadStateController","getPageIDFromThreadID"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i=c("MessengerConfirmBlockThreadDialogReact.bs").jsComponent,j=c("MessengerConfirmLeaveGroupDialogReact.bs").jsComponent,k=c("MessengerContactActions.bs").actions,l=c("React").PropTypes,m=c("React").createClass({displayName:"MessengerThreadInfoPanelContainer",mixins:[c("ReactComponentWithPureRenderMixin"),c("StoreAndPropBasedStateMixin")(c("MessengerSettingsStore"))],propTypes:{contactData:l.object,participants:l.instanceOf(c("immutable").Map).isRequired,thread:l.instanceOf(c("ImmutableObject")).isRequired,viewer:l.string.isRequired},statics:{calculateState:function n(){var o=c("MessengerSettingsStore").getSettings(),p=o.links_section_collapsed,q=o.associated_object_section_collapsed,r=o.people_section_collapsed,s=o.photos_section_collapsed,t=o.files_section_collapsed,u=o.thread_section_collapsed,v=o.thread_stats_section_collapsed,w=o.group_section_collapsed,x=o.group_approval_section_collapsed;return{links_section_collapsed:p,associated_object_section_collapsed:q,people_section_collapsed:r,photos_section_collapsed:s,files_section_collapsed:t,thread_section_collapsed:u,thread_stats_section_collapsed:v,group_section_collapsed:w,group_approval_section_collapsed:x}}},render:function n(){var o=this.props.contactData||{},p=this.state,q=p.links_section_collapsed,r=p.associated_object_section_collapsed,s=p.people_section_collapsed,t=p.photos_section_collapsed,u=p.files_section_collapsed,v=p.thread_section_collapsed,w=p.thread_stats_section_collapsed,x=p.group_section_collapsed,y=p.group_approval_section_collapsed;return c("React").createElement(c("MessengerThreadInfoPanelScrollableArea.react"),{className:this.props.className},function(z,A,B,C){return c("React").createElement(c("MessengerThreadInfoPanel.react"),{contact:o.contact,getIsScrolledToBottom:B,getScrollableHeight:C,isUserActive:o.isUserActive||false,lastActive:o.lastActive,linksSectionCollapsed:q,onArchive:this._handleArchive,onContactAction:this._handleContactAction,onContactSelect:this._handleContactSelect,onDelete:this._handleDelete,onLeaveGroup:this._handleLeaveGroup,onLinksSectionToggle:this._handleLinksSectionToggle,onMarkRead:this._handleMarkRead,onMarkSpam:this._handleMarkSpam,onMarkUnread:this._handleMarkUnread,onMute:this._handleMute,onMuteChange:this._handleMuteChange,onAssociatedObjectSectionToggle:this._handleAssociatedObjectSectionToggle,onPeopleSectionToggle:this._handlePeopleSectionToggle,onPhotosSectionToggle:this._handlePhotosSectionToggle,onFilesSectionToggle:this._handleFilesSectionToggle,onThreadOptionsSectionToggle:this._handleThreadSectionToggle,onThreadStatsSectionToggle:this._handleThreadStatsSectionToggle,onGroupOptionsSectionToggle:this._handleGroupOptionsSectionToggle,onGroupApprovalOptionsSectionToggle:this._handleGroupOptionsApprovalSectionToggle,onThreadNameChange:this._handleThreadNameChange,onThreadPhotoChange:this._handleThreadPhotoChange,onUnmute:this._handleUnmute,onIgnore:this._handleIgnore,onBlock:this._handleBlock,onUnblock:this._handleUnblock,showBlock:this.props.thread.is_canonical_user&&this.props.thread.other_user_fbid&&this.props.viewer!==this.props.thread.other_user_fbid,participants:this.props.participants,associatedObjectSectionCollapsed:r,peopleSectionCollapsed:s,photosSectionCollapsed:t,filesSectionCollapsed:u,platform:o.platform,prevIsScrolledToBottom:A,prevScrollableHeight:z,showLeaveGroup:this.props.thread.is_subscribed&&!this.props.thread.is_canonical,showReport:this._isPageChat(),thread:this.props.thread,threadOptionsSectionCollapsed:v,threadStatsSectionCollapsed:w,groupOptionsSectionCollapsed:x,groupOptionsApprovalsSectionCollapsed:y,viewer:this.props.viewer})}.bind(this))},_handleArchive:function n(){this._getThreadActions().archive(this.props.thread.thread_id);c("MessengerActions").selectThread(null)},_handleDelete:function n(){this._getThreadActions()["delete"](this.props.thread.thread_id);c("MessengerActions").selectThread(null)},_handleMarkRead:function n(){this._getThreadActions().markRead(this.props.thread.thread_id)},_handleMarkSpam:function n(){this._getThreadActions().markSpam(this.props.thread.thread_id);c("MessengerActions").selectThread(null)},_handleMarkUnread:function n(){this._getThreadActions().markUnread(this.props.thread.thread_id)},_handleMute:function n(o){this._getThreadActions().updateMuteSetting(this.props.thread.thread_id,o)},_handleUnmute:function n(){this._getThreadActions().unmute(this.props.thread.thread_id)},_handleIgnore:function n(){this._getThreadActions().changeFolder(this.props.thread.thread_id,"other");c("MessengerActions").selectThread(null);new(c("IgnoreMessagesTypedLogger"))().setEvent("ignore_confirmed").setThreadID(this.props.thread.thread_fbid).setPlatform("messengerdotcom").log()},_handleBlock:function n(){var o,p=this,q=this.props.thread,r=q.thread_id;if(c("MercuryConfig").WMBF)(function(){var s=p.props.contactData&&p.props.contactData.contact.short_name||h._("sender");if(r)p._getThreadActions().blockIgnoreOnMessengerDotCom(true,r,function(){this._handleAfterBlock(s)}.bind(p))})();else this._getThreadActions().blockOnMessengerDotCom(r)},_handleAfterBlock:function n(o){var p=this.props,q=p.thread,r=p.viewer;c("MessengerDialogs.bs").showDialog(function(){return c("React").createElement(i,{participantName:o})});var s=c("MercuryIDs").getThreadKeyfromThreadIDUserID(q.thread_id,c("MercuryIDs").getParticipantIDFromUserID(r));if(q.folder===c("MessagingTag").PENDING)new(c("MessengerMessageRequestsTypedLogger"))().setAction("message_requests_block_request").setThreadID(c("MercuryIDs").getThreadFBIDFromThreadID(q.thread_id)).setSurface("thread").setFolderType(c("MessagingTag").PENDING).setThreadKey(s).setEntryPoint("settings").log()},_handleUnblock:function n(){this._getThreadActions().unblockOnMessengerDotCom(this.props.thread.thread_id)},_handleMuteChange:function n(o){this._getThreadActions().updateMuteSetting(this.props.thread.thread_id,o)},_handleContactSelect:function n(o,event){var p=c("MercuryIDs").getThreadIDFromParticipantID(o.uid);p&&c("MessengerActions").selectThread(p)},_handleContactAction:function n(o,p){__p&&__p();if(c("MercuryIDs").getUserIDFromParticipantID(p.uid)!==this.props.viewer)switch(o){case k.MESSAGE:this._handleContactSelect(p);break;case k.PROFILE:var q=this.props.participants.get(p.uid);if(q&&q.href)window.open(q.href);else this._handleContactSelect(p);break;case k.REMOVE:if(!c("MercuryThreadInfo").isEmptyLocalThread(this.props.thread)){var r=new(c("URI"))("/chat/remove_participants/");r.addQueryData({uid:c("MercuryIDs").getUserIDFromParticipantID(p.uid),tid:this.props.thread.thread_fbid});var s=new(c("AsyncRequest"))(r);s.send()}break}switch(o){case k.REMOVE_OWNER:if(!c("MercuryThreadInfo").isEmptyLocalThread(this.props.thread))this._getThreadActions().changeGroupAdmins(this.props.thread.thread_fbid,[c("MercuryIDs").getUserIDFromParticipantID(p.uid)],false);break;case k.ADD_OWNER:if(!c("MercuryThreadInfo").isEmptyLocalThread(this.props.thread))this._getThreadActions().changeGroupAdmins(this.props.thread.thread_fbid,[c("MercuryIDs").getUserIDFromParticipantID(p.uid)],true);break}},_handleLeaveGroup:function n(){var o,p=this;if(this.props.viewer)(function(){var q=c("MessengerAdminGroupUtils").isViewerAdmin(p.props.thread.admin_ids,p.props.viewer);c("MessengerDialogs.bs").showDialog(function(){return c("React").createElement(j,{onLeave:this._onLeaveGroupConfirm,isViewerAdmin:q,thread:this.props.thread})}.bind(p))})()},_onLeaveGroupConfirm:function n(){c("MessengerLeaveGroupAction").leaveGroup(this.props.thread,this.props.viewer)},_handleThreadNameChange:function n(o){var p=c("MessengerAdminGroupUtils").isJoinableThread(this.props.thread);if(!p)this._getMessageActions().send(this._getMessageObject().constructLogMessageObject(c("MercuryTriodeSourceUtil").getMercuryTriodeSource(),this.props.thread.thread_id,c("MercuryLogMessageType").THREAD_NAME,{name:o}),null,c("MercuryAPIArgsSource").MESSENGER);else{var q=c("XMessagingSetThreadStateController").getURIBuilder().getURI();new(c("AsyncRequest"))().setURI(q).setData({thread_id:this.props.thread.thread_fbid,thread_name:o}).send()}},_handleThreadPhotoChange:function n(o,p){this._getMessageActions().send(this._getMessageObject().constructLogMessageObject(c("MercuryTriodeSourceUtil").getMercuryTriodeSource(),o,c("MercuryLogMessageType").THREAD_IMAGE,{image:p.metadata[0]}))},_handleAssociatedObjectSectionToggle:function n(){c("MessengerSettingsActions").changeSettings({associated_object_section_collapsed:!this.state.associated_object_section_collapsed})},_handlePeopleSectionToggle:function n(){c("MessengerSettingsActions").changeSettings({people_section_collapsed:!this.state.people_section_collapsed})},_handlePhotosSectionToggle:function n(){c("MessengerSettingsActions").changeSettings({photos_section_collapsed:!this.state.photos_section_collapsed})},_handleFilesSectionToggle:function n(){c("MessengerSettingsActions").changeSettings({files_section_collapsed:!this.state.files_section_collapsed})},_handleThreadSectionToggle:function n(){c("MessengerSettingsActions").changeSettings({thread_section_collapsed:!this.state.thread_section_collapsed})},_handleThreadStatsSectionToggle:function n(){c("MessengerSettingsActions").changeSettings({thread_stats_section_collapsed:!this.state.thread_stats_section_collapsed})},_handleGroupOptionsSectionToggle:function n(){c("MessengerSettingsActions").changeSettings({group_section_collapsed:!this.state.group_section_collapsed})},_handleGroupOptionsApprovalSectionToggle:function n(){c("MessengerSettingsActions").changeSettings({group_approval_section_collapsed:!this.state.group_approval_section_collapsed})},_handleLinksSectionToggle:function n(){c("MessengerSettingsActions").changeSettings({links_section_collapsed:!this.state.links_section_collapsed})},_getThreadActions:function n(){return c("MercuryThreadActions").getForFBID(this.props.viewer)},_getMessageActions:function n(){return c("MercuryMessageActions").getForFBID(this.props.viewer)},_getMessageObject:function n(){return c("MercuryMessageObject").getForFBID(this.props.viewer)},_isPageChat:function n(){return!!c("getPageIDFromThreadID")(this.props.thread.thread_id)}});f.exports=m}),null);
__d("MessengerThreadSearchActions",["MessengerDispatcher","keyMirror"],(function a(b,c,d,e,f,g){"use strict";var h=c("keyMirror")({CHANGE_RESULT_INDEX:null,GET_MORE_CONTEXT:null,GET_MORE_THREADS:null}),i={Types:h,selectPrevious:function j(){c("MessengerDispatcher").dispatch({type:h.CHANGE_RESULT_INDEX,delta:1})},selectNext:function j(){c("MessengerDispatcher").dispatch({type:h.CHANGE_RESULT_INDEX,delta:-1})},getMoreSearchContext:function j(k){c("MessengerDispatcher").dispatch({type:h.GET_MORE_CONTEXT,direction:k})},loadMoreThreads:function j(){c("MessengerDispatcher").dispatch({type:h.GET_MORE_THREADS})}};f.exports=i}),null);
__d("MercurySearchContextResults",["KeyedCallbackManager","MercuryAPIArgsSource","MercuryIDs","MercuryPayloadSource","MercuryThreadlistConstants","MercuryThreadIDMap","RangedCallbackManager","MercuryServerDispatcher","MercuryServerPayloadPreprocessor","MessengerMessageTransformer.bs","WebMessengerConstants"],(function a(b,c,d,e,f,g){__p&&__p();var h=c("MercuryThreadIDMap").get(),i=c("MercuryServerPayloadPreprocessor").get(),j=new(c("KeyedCallbackManager"))(),k=c("MercuryThreadlistConstants").WEBMESSENGER_SEARCH_SNIPPET_COUNT,l=c("WebMessengerConstants").MORE_SEARCH_CONTEXT_COUNT,m={getSearchContext:function q(r,s,t){__p&&__p();if(r){var u=j.executeOrEnqueue(r,function(z){var A=o(z,r);t(A)}),v=j.getUnavailableResources(u);if(v.length){var w={message_id:r,limit:k+1},x=h.getServerIDFromClientIDNow(s),y=c("MercuryIDs").tokenize(s);if(y.type=="user")w.other_user_fbid=x;else w.thread_fbid=x;p(w)}return u}},getMoreSearchContext:function q(r,s,t,u){__p&&__p();if(r){var v=j.getResource(r);if(v){var w=t==c("WebMessengerConstants").MORE_SEARCH_CONTEXT_UP?v.up_message_ids:v.down_message_ids,x=w.getCurrentArraySize()+l,y=w.executeOrEnqueue(0,x,function(){var D=o(v,r);u(D)}),z=w.getUnavailableResources(y);if(z.length){var A={message_id:r,limit:x,direction:t},B=h.getServerIDFromClientIDNow(s),C=c("MercuryIDs").tokenize(s);if(C.type=="user")A.other_user_fbid=B;else A.thread_fbid=B;p(A)}return y}}},handleUpdate:function q(r){__p&&__p();if(r.graphql_payload){var s=r.graphql_payload.map(function(B){return c("MessengerMessageTransformer.bs").transformMessage(r.viewer,B,r.thread_data,r.for_page)});i.handleUpdate({actions:s,payload_source:c("MercuryPayloadSource").SERVER_SEARCH})}var t=r.search_context||{};for(var u in t){var v=t[u],w=v.other_user_fbid||v.thread_fbid,x=h.getClientIDFromServerIDNow(w),y=!j.getResource(u),z=y?{thread_id:x,up_message_ids:new(c("RangedCallbackManager"))(),down_message_ids:new(c("RangedCallbackManager"))()}:j.getResource(u),A=y?k+1:l;if(v.up_message_ids&&(z.up_message_ids.getCurrentArraySize()===0||v.up_message_ids.length>=z.up_message_ids.getCurrentArraySize()))n(z.up_message_ids,v.up_message_ids,A);if(v.down_message_ids&&(z.down_message_ids.getCurrentArraySize()===0||v.down_message_ids.length>=z.down_message_ids.getCurrentArraySize()))n(z.down_message_ids,v.down_message_ids,A);if(y)j.setResource(u,z)}},unsubscribe:function q(r,s,t){if(s){var u=j.getResource(s);if(u)if(t==c("WebMessengerConstants").MORE_SEARCH_CONTEXT_UP)u.up_message_ids.unsubscribe(r);else u.down_message_ids.unsubscribe(r);else j.unsubscribe(r)}}};function n(q,r,s){var t=q.getCurrentArraySize(),u=r.length<t+s;if(r.length){q.removeAllResources();q.addResourcesWithoutSorting(r,0)}if(u)q.setReachedEndOfArray()}function o(q,r){var s=q.up_message_ids.hasReachedEndOfArray(),t=q.up_message_ids.getAllResources();if(!s)t.shift();var u=q.down_message_ids.hasReachedEndOfArray(),v=q.down_message_ids.getAllResources();if(!u)v.pop();return{thread_id:q.thread_id,message_id:r,up_message_ids:t,up_exhausted:s,down_message_ids:v,down_exhausted:u}}function p(q){q.client=c("MercuryAPIArgsSource").WEBMESSENGER;c("MercuryServerDispatcher").trySend("/ajax/mercury/search_context.php",q)}c("MercuryServerDispatcher").registerEndpoints({"/ajax/mercury/search_context.php":{mode:c("MercuryServerDispatcher").IMMEDIATE,handler:m.handleUpdate}});f.exports=m}),null);
__d("MessengerThreadSearchStore",["cx","immutable","Bootloader","ImmutableObject","MercuryIDs","MercuryMessages","MercurySearchContextResults","MercurySearchSnippetResults","MercuryThreads","MessengerContentSearchFunnelLoggerConstants","MessengerDispatcher","MessengerStateStore","MessengerStore","MessengerActions","MessengerThreadSearchActions","MessengerView"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i,j,k=c("immutable").List,l=c("immutable").Record,m=c("MessengerContentSearchFunnelLoggerConstants").FUNNEL_LOGGER_EVENTS,n=m.BROWSE_CONTEXT,o=m.BROWSE_MESSAGE_IN_THREAD,p=m.LOAD_MORE_THREADS,q=m.LOAD_MESSAGE_IN_THREAD,r=m.SELECT_THREAD,s=m.THREAD_IMPRESSIONS,t=l({downExhausted:null,loading:false,messages:null,query:null,results:k(),selectedIndex:0,threadID:null,totalCount:0,upExhausted:null,threads:null,threadsExhausted:null,mid:null});i=babelHelpers.inherits(u,c("MessengerStore"));j=i&&i.prototype;function u(){j.constructor.call(this);this.$MessengerThreadSearchStore3=new t()}u.prototype.getForFBID=function(v){this.$MessengerThreadSearchStore4=new(c("MercurySearchSnippetResults"))(v);this.$MessengerThreadSearchStore1=c("MercuryMessages").getForFBID(v);this.$MessengerThreadSearchStore2=c("MercuryThreads").getForFBID(v)};u.prototype.getState=function(){return this.$MessengerThreadSearchStore3};u.prototype.__onDispatch=function(v){__p&&__p();if(!this.$MessengerThreadSearchStore4)return;c("MessengerDispatcher").waitFor([c("MessengerStateStore").getDispatchToken()]);var w=c("MessengerStateStore").getState(),x=w.activeThreadID,y=w.masterView,z=w.mid,A=w.query,B=y===c("MessengerView").MASTER.SEARCH;switch(v.type){case c("MessengerActions").Types.REPLACE_STATE:if(z!=this.$MessengerThreadSearchStore3.mid&&x!=this.$MessengerThreadSearchStore3.activeThreadID){if(z&&x){this.$MessengerThreadSearchStore3=this.$MessengerThreadSearchStore3.merge({threadID:x,mid:z});c("MercurySearchContextResults").getSearchContext(this.$MessengerThreadSearchStore7(),this.$MessengerThreadSearchStore3.threadID,function(E){return this.setMessages(E)}.bind(this))}else this.$MessengerThreadSearchStore3=new t();return}else if(this.$MessengerThreadSearchStore3.query!==A||this.$MessengerThreadSearchStore3.threadID!==x){if(A&&!z){this.$MessengerThreadSearchStore3=this.$MessengerThreadSearchStore3.set("loading",true);this.$MessengerThreadSearchStore4.getSingleThreadSearchResults(A,x,function(){for(var E=arguments.length,F=Array(E),G=0;G<E;G++)F[G]=arguments[G];return this.accumulateSearchResultsAndEmitChange.apply(this,[A,x,0].concat(F))}.bind(this))}else this.$MessengerThreadSearchStore8();if(B){this.$MessengerThreadSearchStore3=this.$MessengerThreadSearchStore3.set("loading",true);if(A!==this.$MessengerThreadSearchStore3.query){this.$MessengerThreadSearchStore6=Date.now();this.$MessengerThreadSearchStore4.getAllThreadSearchResults(A,function(E,F){this.setAllThreadResults(E,F);this.$MessengerThreadSearchStore9({name:s,threads:Object.keys(E)})}.bind(this))}else{this.$MessengerThreadSearchStore6=Date.now();this.$MessengerThreadSearchStore9({name:r,thread_id:this.$MessengerThreadSearchStore3.threadID});this.$MessengerThreadSearchStore4.getAllLocalThreadSearchResults(A,function(E,F){return this.setAllThreadResults(E,F)}.bind(this))}}else this.$MessengerThreadSearchStore10();this.emitChange()}break;case c("MessengerThreadSearchActions").Types.CHANGE_RESULT_INDEX:var C=Math.max(Math.min(this.$MessengerThreadSearchStore3.totalCount-1,this.$MessengerThreadSearchStore3.selectedIndex+v.delta),0);if(C===this.$MessengerThreadSearchStore3.selectedIndex)break;if(C>=this.$MessengerThreadSearchStore3.results.size){this.$MessengerThreadSearchStore9({name:o,thread_id:this.$MessengerThreadSearchStore3.threadID});this.$MessengerThreadSearchStore6=Date.now();this.$MessengerThreadSearchStore3=this.$MessengerThreadSearchStore3.set("loading",true);this.$MessengerThreadSearchStore4.getSingleThreadSearchMoreResults(A,x,function(){for(var E=arguments.length,F=Array(E),G=0;G<E;G++)F[G]=arguments[G];this.accumulateSearchResultsAndEmitChange.apply(this,[A,x,C].concat(F))}.bind(this))}else{this.$MessengerThreadSearchStore6=Date.now();this.$MessengerThreadSearchStore9({name:o,thread_id:this.$MessengerThreadSearchStore3.threadID});this.$MessengerThreadSearchStore3=this.$MessengerThreadSearchStore3.merge({loading:true,selectedIndex:C});c("MercurySearchContextResults").getSearchContext(this.$MessengerThreadSearchStore7(),this.$MessengerThreadSearchStore3.threadID,function(E){return this.setMessages(E)}.bind(this))}this.emitChange();var D=this.$MessengerThreadSearchStore3.results.get(C).toObject();this.$MessengerThreadSearchStore9({name:q,mid:D.message_id,thread_id:this.$MessengerThreadSearchStore3.threadID,latency:Date.now()-this.$MessengerThreadSearchStore6});break;case c("MessengerThreadSearchActions").Types.GET_MORE_CONTEXT:this.$MessengerThreadSearchStore3=this.$MessengerThreadSearchStore3.set("loading",true);c("MercurySearchContextResults").getMoreSearchContext(this.$MessengerThreadSearchStore7(),this.$MessengerThreadSearchStore3.threadID,v.direction,function(E){this.setMessages(E);this.$MessengerThreadSearchStore9({name:n})}.bind(this));this.emitChange();break;case c("MessengerThreadSearchActions").Types.GET_MORE_THREADS:this.$MessengerThreadSearchStore5=Date.now();this.$MessengerThreadSearchStore3=this.$MessengerThreadSearchStore3.set("loading",true);this.$MessengerThreadSearchStore4.getAllThreadSearchMoreResults(A,function(E,F){this.$MessengerThreadSearchStore9({name:p,threads:Object.keys(E),latency:Date.now()-this.$MessengerThreadSearchStore5});this.setAllThreadResults(E,F)}.bind(this));this.emitChange();break}};u.prototype.setAllThreadResults=function(v,w){__p&&__p();var x=Object.keys(v),y=x.map(function(z){var A=this.$MessengerThreadSearchStore2.getThreadMetaNow(z);if(!A)return;var B=v[A.thread_id];if(!B)return;return new(c("ImmutableObject"))(babelHelpers["extends"]({},A,{snippetCount:B.num_total_snippets}))}.bind(this)).filter(function(z){return z});this.$MessengerThreadSearchStore3=this.$MessengerThreadSearchStore3.merge({threads:y,threadsExhausted:w,loading:false});this.emitChange()};u.prototype.$MessengerThreadSearchStore10=function(){this.$MessengerThreadSearchStore11(["threads","threadsExhausted","loading"])};u.prototype.accumulateSearchResultsAndEmitChange=function(v,w,x,y,z){this.$MessengerThreadSearchStore3=this.$MessengerThreadSearchStore3.merge({query:v,threadID:w,selectedIndex:x,results:y,totalCount:z});if(this.$MessengerThreadSearchStore3.results.size){c("MercurySearchContextResults").getSearchContext(this.$MessengerThreadSearchStore7(),this.$MessengerThreadSearchStore3.threadID,function(y){return this.setMessages(y)}.bind(this));var A=this.$MessengerThreadSearchStore3.results.get(this.$MessengerThreadSearchStore3.selectedIndex);this.$MessengerThreadSearchStore9({name:q,mid:A.toObject().message_id,thread_id:this.$MessengerThreadSearchStore3.threadID,latency:Date.now()-this.$MessengerThreadSearchStore6})}else this.$MessengerThreadSearchStore3=this.$MessengerThreadSearchStore3.merge({messages:null});this.emitChange()};u.prototype.$MessengerThreadSearchStore8=function(){this.$MessengerThreadSearchStore11(["query","threadID","selectedIndex","results","totalCount","downExhausted","loading","messages","upExhausted"])};u.prototype.$MessengerThreadSearchStore11=function(v){this.$MessengerThreadSearchStore3=this.$MessengerThreadSearchStore3.withMutations(function(w){v.forEach(function(x){return w.remove(x)})})};u.prototype.setMessages=function(v){__p&&__p();var w=this.$MessengerThreadSearchStore1.getMessagesFromIDs([].concat(v.up_message_ids,v.message_id,v.down_message_ids)).map(function(x){__p&&__p();var y,z=this;if(x&&x.message_id===v.message_id)if(!this.$MessengerThreadSearchStore3.results.isEmpty()){var y=function(){var A=z.$MessengerThreadSearchStore3.results.get(z.$MessengerThreadSearchStore3.selectedIndex).toJS(),B=A.matched_keywords,C=x.body.indexOf(A.body),D=Object.keys(A.matched_keywords).map(function(E){return{offset:C+Number(E),length:B[E].length,entity:{url:""},className:"__in"}});return{v:new(c("ImmutableObject"))(babelHelpers["extends"]({},x,{ranges:x.ranges?x.ranges.concat(D):D}))}}();if(typeof y==="object")return y.v}else return new(c("ImmutableObject"))(babelHelpers["extends"]({},x,{isSelected:true}));return x}.bind(this));this.$MessengerThreadSearchStore3=this.$MessengerThreadSearchStore3.merge({downExhausted:v.down_exhausted,loading:false,messages:w,upExhausted:v.up_exhausted});this.emitChange()};u.prototype.$MessengerThreadSearchStore7=function(){return this.$MessengerThreadSearchStore3.mid||this.$MessengerThreadSearchStore3.results.getIn([this.$MessengerThreadSearchStore3.selectedIndex,"message_id"])};u.prototype.$MessengerThreadSearchStore9=function(event){__p&&__p();c("Bootloader").loadModules(["MessengerContentSearchFunnelLogger"],function(v){__p&&__p();if(v&&event)switch(event.name){case o:v.browseMessageInThread(event.thread_id);break;case p:v.logLoadMoreThreads(event.threads,event.latency);break;case r:v.logThreadSelect(event.thread_id);break;case q:v.loadMessageInThread(event.mid,event.thread_id,event.latency);break;case s:v.logThreadImpressions(event.threads);break;case n:v.logContextBrowse();break}},"MessengerThreadSearchStore")};f.exports=new u()}),null);
__d("MessengerDetailView.react",["cx","fbt","invariant","Bootloader","BootloadOnRender.react","CustomColorHighlighting.react","DataTransfer","EventReminderActions","EventRemindersGating","EventReminderStateStore","immutable","JSResource","LazyComponent.react","MercuryIDs","MercuryConfig","MercuryCanonicalGroupThreadStore","MercuryParticipants","MercuryThreadActions","MercuryThreadInfo","MercuryThreads","MessengerActions","MessengerComposerStore","MessengerComposerContainer.react","MessengerConversation.react","MessengerConversationContainer.react","MessengerDetailViewHeaderContainer.react","MessengerDomIDs.bs","MessengerErrorBoundary.react","MessengerPresenceStatusUtils","MessengerSettingsActions","MessengerSettingsStore","MessengerStateStore","MessengerThreadSearchStore","MessengerThreadInfoPanelContainer.react","MessengerThreadSearchActions","MessengerView","MessengerWebDriverTestIDs","Parent","PresenceStatus","React","SubscriptionsHandler","AvailableList","emptyFunction","gkx","ifRequired","shallowCompare"],(function a(b,c,d,e,f,g,h,i,j){"use strict";__p&&__p();var k=c("MessengerDomIDs.bs").ids;c("AvailableList");var l=c("React").PropTypes;function m(event,o,p,q){if(!c("EventRemindersGating").shouldShowPlansOnMessengerCom)return null;if(!o)return null;if(!event)return null;return c("React").createElement(c("BootloadOnRender.react"),{loader:c("JSResource")("MessengerEventPlanContainer.react").__setRef("MessengerDetailView.react"),placeholder:c("React").createElement("div",null),component:c("React").createElement(c("LazyComponent.react"),{threadID:o,participants:p,viewer:q})})}var n=c("React").createClass({displayName:"MessengerDetailView",_composer:undefined,_refsConversationContainer:null,_subscriptionsHandler:new(c("SubscriptionsHandler"))(),propTypes:{activeThreadID:l.string,deliveryReceipts:l.object,view:l.string,viewer:l.string.isRequired},calculateState:function o(p){__p&&__p();var q=p.activeThreadID,r=c("MercuryThreads").getForFBID(p.viewer),s=c("MessengerComposerStore").getState();if(p.view===c("MessengerView").DETAIL.COMPOSE){!!s.recipients||j(0);var t=s.recipients;if(t.size===1)q=c("MercuryIDs").getThreadIDFromUserID(t.first().getUniqueID().toString());else if(t.size>1)q=c("MercuryCanonicalGroupThreadStore").getOrFetch(Array.from(t).map(function(z){return z.getUniqueID().toString()}))}var u=q?r.getOrFetch(q):null,v=c("immutable").Map();if(u&&q){v=v.withMutations(function(z){u.participants&&u.participants.forEach(function(A){z.set(A,c("MercuryParticipants").getOrFetch(A))});u.is_subscribed&&z.set(c("MercuryIDs").getParticipantIDFromUserID(p.viewer),c("MercuryParticipants").getOrFetch(c("MercuryIDs").getParticipantIDFromUserID(p.viewer)))});if(c("EventRemindersGating").shouldShowPlansOnMessengerCom){var event=u?u.lightweight_event:null;if(event)c("EventReminderActions").updateEventReminder(q,event);else{var w=c("EventReminderStateStore").getEvent(q);if(w&&w.exists)c("EventReminderActions").deleteEventReminder(q)}}}var x=c("ifRequired")("MessengerUploadFilesStore",function(z){return z.getState()},function(){return c("immutable").Map({})}),y=c("ifRequired")("MessengerSharePreviewStore",function(z){return z.getState()},function(){return c("immutable").Map({})});return{infoPanelCollapsed:c("MessengerSettingsStore").getSettings().info_sidebar_collapsed,activeThreadID:q,composerState:s,messengerState:c("MessengerStateStore").getState(),contactData:c("MessengerPresenceStatusUtils").getStatusFromCanonicalThread(v,u),activeThread:u,participants:v,searchResults:c("MessengerThreadSearchStore").getState(),uploadFilesState:x,sharePreivewState:y}},getInitialState:function o(){return babelHelpers["extends"]({dropTargetOverlayVisible:false},this.calculateState(this.props))},componentDidMount:function o(){this._subscribeToSubscrptionHandler([c("MessengerComposerStore"),c("MessengerStateStore"),c("MessengerThreadSearchStore"),c("MercuryCanonicalGroupThreadStore"),c("MercuryThreads"),c("MercuryParticipants"),c("PresenceStatus")]);if(c("gkx")("AT5V6GuV7OE1f4CNmq1NUhZOeDrgnZF-AQ7WoOvZA8jFMJsYzyghwU79Bm31vgH-mi9DAlUGSFnfYvhwjhMfTolYEEzHhgUrhLD2UxTqbooHHw"))c("Bootloader").loadModules(["MessengerUploadFilesStore"],function(p){this._subscribeToSubscrptionHandler([p])}.bind(this),"MessengerDetailView.react");if(c("gkx")("AT5M-KOnq98igVULtzbIXLLujZOrcPEb_vzPxIrrMO4yDC59FjeQpdoZs2nMsaoB9WIY9SOWsfOkycr87iOYdoQQ"))c("Bootloader").loadModules(["MessengerSharePreviewStore"],function(p){this._subscribeToSubscrptionHandler([p])}.bind(this),"MessengerDetailView.react")},_subscribeToSubscrptionHandler:function o(p){__p&&__p();var q=function(){this.setState(this.calculateState(this.props))}.bind(this),r=[];p.forEach(function(t){if(t.hasChanged&&t.getDispatchToken&&t.addListener)r.push(t.addListener(q));else if(t.subscribe)r.push(t.subscribe("change",q));else if(t.addListener)r.push(t.addListener("change",q));else j(0)});if(r.length>0){var s;this._subscriptionsHandler&&(s=this._subscriptionsHandler).addSubscriptions.apply(s,r)}},shouldComponentUpdate:function o(p,q){return c("shallowCompare")(this,p,q)},componentDidUpdate:function o(){this._handleResize()},componentWillUnmount:function o(){this._subscriptionsHandler&&this._subscriptionsHandler.release();this._subscriptionsHandler=null},componentWillReceiveProps:function o(p){this.setState(this.calculateState(p))},render:function o(){var p=this.state.activeThreadID,q=this._getMainLabelDetails(),r=void 0;if(this.state.activeThread)r=this.props.query==null?m(this.state.activeThread.lightweight_event,p,this.state.participants,this.props.viewer):null;return c("React").createElement("div",{"aria-labelledby":q.labelIDs,className:"_1q5-",role:"main"},c("React").createElement("div",{className:"hidden_elem",id:k.MAIN_LABEL},q.labelText),c("React").createElement(c("CustomColorHighlighting.react"),{className:"_wsc",customColor:this.state.activeThread&&this.state.activeThread.custom_color},c("React").createElement(c("MessengerDetailViewHeaderContainer.react"),{contactData:this.state.contactData,recipients:this.state.composerState.recipients,participants:this.state.participants,thread:this.state.activeThread,view:this.props.view,viewer:this.props.viewer,onResize:this._handleResize,onInfoPanelToggle:this._handleInfoPanelToggle,infoPanelCollapsed:this.state.infoPanelCollapsed}),c("React").createElement("div",{className:"_20bp"},this._renderInfoPanel(),c("React").createElement("div",{className:"_4_j4",onClick:this._handleConversationClick,onDragEnter:this._showDropTargetOverlay,onDragLeave:this._hideDropTargetOverlay,onDragOver:this._showDropTargetOverlay,onDrop:this._handleDrop,role:"presentation"},this._renderMainView(p),r,this._renderSearchView(p),this._renderFooterView(p),c("React").createElement("div",{className:(!this.state.dropTargetOverlayVisible?"hidden_elem":"")+" _2fg6"}),(c("gkx")("AT5V6GuV7OE1f4CNmq1NUhZOeDrgnZF-AQ7WoOvZA8jFMJsYzyghwU79Bm31vgH-mi9DAlUGSFnfYvhwjhMfTolYEEzHhgUrhLD2UxTqbooHHw")||c("gkx")("AT5M-KOnq98igVULtzbIXLLujZOrcPEb_vzPxIrrMO4yDC59FjeQpdoZs2nMsaoB9WIY9SOWsfOkycr87iOYdoQQ"))&&this._renderUploadFiles(p)))))},_renderUploadFiles:function o(p){if(!p)return null;var q=this.state.uploadFilesState.get(p)||{},r=this.state.sharePreivewState.get(p);return c("React").createElement(c("BootloadOnRender.react"),{loader:c("JSResource")("MessengerDragAndDrop.react").__setRef("MessengerDetailView.react"),placeholder:c("React").createElement("div",null),component:c("React").createElement(c("LazyComponent.react"),{threadID:p,uploadedFiles:q.uploadedFiles,uploadingFiles:q.uploadingFiles,sharePreview:r})})},_renderSearchView:function o(p){return p&&!this.props.mid&&this.props.query!=null?c("React").createElement(c("BootloadOnRender.react"),{loader:c("JSResource")("MessengerThreadSearchContainer.react").__setRef("MessengerDetailView.react"),placeholder:c("React").createElement("div",{className:"_33p7 _5iwm"}),component:c("React").createElement(c("LazyComponent.react"),{loading:this.state.searchResults.loading,query:this.state.searchResults.query,selectedIndex:this.state.searchResults.selectedIndex,totalCount:this.state.searchResults.totalCount})}):null},_assignConversationContainerRef:function o(p){this._refsConversationContainer=p},_renderMainView:function o(p){if(!p)return c("React").createElement("div",{className:"_1ut7"});var q=this.state.contactData?this.state.contactData.contact:null;if(this.state.searchResults.messages)return c("React").createElement(c("MessengerErrorBoundary.react"),{component:"conversation"},c("React").createElement(c("MessengerConversation.react"),{className:"_1wfr",contact:q,deliveryReceipts:this.props.deliveryReceipts,downExhausted:this.state.searchResults.downExhausted,fetchMessages:c("MessengerThreadSearchActions").getMoreSearchContext,onVoiceClipCreate:this.handleAudioUpload,innerClassName:"_1r_-",isCanonical:c("MercuryIDs").isCanonical(p),isLoaded:true,isLoading:false,messages:this.state.searchResults.messages,onRead:c("emptyFunction"),participants:this.state.participants,thread:this.state.activeThread,threadID:p,upExhausted:this.state.searchResults.upExhausted,useManualFetch:true,viewer:this.props.viewer}));return c("React").createElement(c("MessengerErrorBoundary.react"),{component:"conversation"},c("React").createElement(c("MessengerConversationContainer.react"),{className:"_1wfr",contact:q,deliveryReceipts:this.props.deliveryReceipts,onVoiceClipCreate:this.handleAudioUpload,onMarkRead:this._handleMarkRead,participants:this.state.participants,ref:this._assignConversationContainerRef,thread:this.state.activeThread,threadID:p,viewer:this.props.viewer}))},_renderFooterView:function o(p){var q=c("MercuryConfig").ColdOpenBlock&&this.state.activeThread&&c("MercuryThreadInfo").isColdOpen(this.state.activeThread);return c("React").createElement(c("MessengerErrorBoundary.react"),{className:"_4rv3 _2pen",component:"composer"},c("React").createElement(c("MessengerComposerContainer.react"),{canReply:!!(!q&&(this.props.view===c("MessengerView").DETAIL.COMPOSE||this.state.activeThread&&c("MercuryThreadInfo").canReply(this.state.activeThread)&&!c("MercuryConfig").ViewerIsReadOnly)),fileUploader:this.state.uploadFilesState.get(p),onMount:function(r){return this._composer=r}.bind(this),onResize:this._handleResize,participants:this.state.participants,recipients:this.state.composerState.recipients,sharePreview:this.state.sharePreivewState.get(p),threadID:p,threadFBID:this.state.activeThread?this.state.activeThread.thread_fbid:null,thread:this.state.activeThread,view:this.props.view,viewer:this.props.viewer}))},_renderInfoPanel:function o(){var p=this.state,q=p.activeThread,r=p.contactData,s=p.infoPanelCollapsed,t=p.participants,u=this.props.view;if(!q||!t||u===c("MessengerView").DETAIL.COMPOSE)return null;return c("React").createElement("div",{className:(s?"hidden_elem":"")+" _4_j5","data-testid":c("MessengerWebDriverTestIDs").INFO_PANEL},c("React").createElement(c("MessengerErrorBoundary.react"),{className:"_4rv3",component:"conversation information"},c("React").createElement(c("MessengerThreadInfoPanelContainer.react"),{className:"_4_j9",contactData:r,participants:t,thread:q,viewer:this.props.viewer})))},_getMainLabelDetails:function o(){if(this.props.view===c("MessengerView").DETAIL.COMPOSE)return{labelText:i._("New Message"),labelIDs:k.MAIN_LABEL};return{labelText:i._("Conversation with"),labelIDs:k.MAIN_LABEL+" "+k.THREAD_TITLE}},_handleConversationClick:function o(p){__p&&__p();var q=this.props.activeThreadID;if(q&&this._refsConversationContainer&&this._refsConversationContainer.isScrolledToBottom())this._handleMarkRead(q);if(window.getSelection().toString()!=="")return;var r=p.target;if(r instanceof Node&&c("Parent").byTag(r,"a")!=null)return;var s=this._getComposer();s&&s.focusInput()},handleAudioUpload:function o(p){var q=this._getComposer();if(q!=null&&p!=null){q.handleAudioUpload(p);q.focusInput()}},_showDropTargetOverlay:function o(p){p&&p.preventDefault();this.setState({dropTargetOverlayVisible:true})},_hideDropTargetOverlay:function o(p){p&&p.preventDefault();this.setState({dropTargetOverlayVisible:false});var q=this._getComposer();q&&q.resetDrag()},_handleDrop:function o(p){__p&&__p();this._hideDropTargetOverlay(p);var q=this._getComposer();if(!q)return;p.nativeEvent.dataTransfer instanceof Object||j(0);if(c("gkx")("AT5V6GuV7OE1f4CNmq1NUhZOeDrgnZF-AQ7WoOvZA8jFMJsYzyghwU79Bm31vgH-mi9DAlUGSFnfYvhwjhMfTolYEEzHhgUrhLD2UxTqbooHHw")){c("MessengerActions").prepareFilesForSend(this.state.activeThreadID,p.nativeEvent.dataTransfer.files);return}var r=new(c("DataTransfer"))(p.nativeEvent.dataTransfer),s=r.getFiles();if(s.length)q.handleFileUpload(s);else{var t=r.getText();if(t)q.handleTextDropped(t)}},_handleResize:function o(){var p=this._refsConversationContainer;if(p)p.handleResize()},_handleInfoPanelToggle:function o(){var p=!this.state.infoPanelCollapsed;this.setState({infoPanelCollapsed:p},function(){c("MessengerSettingsActions").changeSettings({info_sidebar_collapsed:p})})},_handleMarkRead:function o(p){c("MercuryThreadActions").getForFBID(this.props.viewer).markRead(p)},_getComposer:function o(){return this._composer}});f.exports=n}),null);
__d("MessengerDetailViewReact.bs",["ReasonReact.bs","bs_js_null_undefined","MessengerDetailView.react"],(function a(b,c,d,e,f,g){"use strict";function h(i,j,k,l,m,n,o){return c("ReasonReact.bs").wrapJsForReason(c("MessengerDetailView.react"),{activeThreadID:c("bs_js_null_undefined").from_opt(i),deliveryReceipts:j,mid:c("bs_js_null_undefined").from_opt(k),query:c("bs_js_null_undefined").from_opt(l),view:c("bs_js_null_undefined").from_opt(m),viewer:n},o)}g.make=h}),null);
__d("MessengerErrorBoundaryReact.bs",["ReasonReact.bs","bs_js_null_undefined","MessengerErrorBoundary.react"],(function a(b,c,d,e,f,g){"use strict";function h(i,j,k){return c("ReasonReact.bs").wrapJsForReason(c("MessengerErrorBoundary.react"),{className:c("bs_js_null_undefined").from_opt(i),component:c("bs_js_null_undefined").from_opt(j)},k)}g.make=h}),null);
__d("P2PBannerStore",["invariant","EventEmitter","P2PActionConstants","P2PAPI","P2PDispatcher"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i,j,k=void 0,l={},m=false,n=false;i=babelHelpers.inherits(o,c("EventEmitter"));j=i&&i.prototype;function o(){j.constructor.call(this);k=c("P2PDispatcher").register(this.onEventDispatched.bind(this))}o.prototype.onEventDispatched=function(p){__p&&__p();var q=p.type,r=p.data;switch(q){case c("P2PActionConstants").BANNER_STATES_UPDATED:this.handleBannerStatesUpdated(r);this.emit("change");break;case c("P2PActionConstants").BANNER_DISMISSED:this.handleBannerDismissed(r);this.emit("change");break;case c("P2PActionConstants").BANNER_COMPLETED:this.handleBannerCompleted(r);this.emit("change");break}};o.prototype.handleBannerStatesUpdated=function(p){m=true;l=p};o.prototype.handleBannerDismissed=function(p){var q=this.getBannerState(p);q.hasBeenDismissed=true};o.prototype.shouldShowBanner=function(p){__p&&__p();var q=void 0;if(!n){c("P2PAPI").getBannerStates();n=true;return false}if(!m)return false;q=this.getBannerState(p);return q.eligible&&!q.hasBeenDismissed};o.prototype.handleBannerCompleted=function(p){var q=this.getBannerState(p);q.eligible=false};o.prototype.getBannerState=function(p){var q=l[p];q||h(0);return q};f.exports=new o()}),null);
__d("P2PPaymentRequest",["P2PPaymentRequestStatus","immutable"],(function a(b,c,d,e,f,g){"use strict";var h,i,j=Math.round(Date.now()/1e3);h=babelHelpers.inherits(k,c("immutable").Record({amount:"",amountWithSymbol:"",creationTime:j,currency:"",currentStatus:c("P2PPaymentRequestStatus").INITED,groupThreadFBID:"",id:"",individualRequests:[],memoText:"",requestee:{},requester:{},statusDescription:"",transfer:{},transferID:"",updatedTime:j}));i=h&&h.prototype;function k(){h.apply(this,arguments)}f.exports=k}),null);
__d("P2PPaymentRequestsStore",["P2PActionConstants","Arbiter","ChannelConstants","CurrentUser","EventEmitter","immutable","ImmutableObject","P2PActions","P2PAPI","P2PChannelType","P2PDispatcher","P2PPaymentRequest","P2PPaymentRequestStatus"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h,i,j=c("immutable").List,k=null,l=false,m=null,n=false,o=null,p=j(),q=false,r=false;h=babelHelpers.inherits(s,c("EventEmitter"));i=h&&h.prototype;function s(){i.constructor.call(this);c("Arbiter").subscribe(c("ChannelConstants").getArbiterType(c("P2PChannelType").PAYMENT_REQUEST_STATUS_CHANGED),this.handleChannelPaymentRequestStatusChanged.bind(this));c("P2PDispatcher").register(this.onEventDispatched.bind(this))}s.prototype.onEventDispatched=function(t){__p&&__p();var u=t.data,v=t.type;switch(v){case c("P2PActionConstants").PAYMENT_REQUEST_INITIATED:q=true;o=null;this.emit("change");break;case c("P2PActionConstants").PAYMENT_REQUEST_INITIATED_COMPLETE:q=false;this.emit("change");break;case c("P2PActionConstants").PAYMENT_REQUEST_CREATED:this.handlePaymentRequestCreated(u);this.emit("change");break;case c("P2PActionConstants").PAYMENT_REQUEST_CREATED_ERROR:o=new(c("ImmutableObject"))(u.error);this.emit("change");break;case c("P2PActionConstants").PAYMENT_REQUEST_UPDATED:this.handlePaymentRequestUpdated(u);this.emit("change");break;case c("P2PActionConstants").PAYMENT_REQUEST_DECLINE_INITIATED:n=true;m=null;this.emit("change");break;case c("P2PActionConstants").PAYMENT_REQUEST_DECLINED:n=false;m=null;this.handlePaymentRequestDeclined(u);this.emit("change");break;case c("P2PActionConstants").PAYMENT_REQUEST_DECLINE_ERROR:n=false;m=new(c("ImmutableObject"))(u.error);this.emit("change");break;case c("P2PActionConstants").PAYMENT_REQUEST_CANCEL_INITIATED:l=true;k=null;this.emit("change");break;case c("P2PActionConstants").PAYMENT_REQUEST_CANCELED:l=false;k=null;this.handlePaymentRequestCanceled(u);this.emit("change");break;case c("P2PActionConstants").PAYMENT_REQUEST_CANCEL_ERROR:l=false;k=new(c("ImmutableObject"))(u.error);this.emit("change");break;case c("P2PActionConstants").DIALOG_CLOSED:m=null;this.emit("change");break;case c("P2PActionConstants").PAYMENT_REQUESTS_FETCHED:this.handlePaymentRequestsFetched(u);this.emit("change");break}};s.prototype.handlePaymentRequestCreated=function(t){var u=p.toArray();u.push(new(c("P2PPaymentRequest"))(t));u.sort(function(v,w){return v.creationTime-w.creationTime});p=j(u)};s.prototype.handlePaymentRequestUpdated=function(t){if(t.groupRequestID)this.updateIndividualRequest(t);delete t.groupRequestID;this.updateRequest(t.id,t)};s.prototype.handlePaymentRequestDeclined=function(t){this.updateRequest(t,{currentStatus:c("P2PPaymentRequestStatus").DECLINED})};s.prototype.handlePaymentRequestCanceled=function(t){this.updateRequest(t,{currentStatus:c("P2PPaymentRequestStatus").CANCELED})};s.prototype.handleChannelPaymentRequestStatusChanged=function(t,u){var v=u.obj;c("P2PActions").paymentRequestUpdated({id:v.id,currentStatus:v.current_status,groupRequestID:v.group_request_id,transfer:v.transfer})};s.prototype.handlePaymentRequestsFetched=function(t){this.$P2PPaymentRequestsStore1(t)};s.prototype.$P2PPaymentRequestsStore1=function(t){t=t.sort(function(v,w){return v.creationTime-w.creationTime});t.forEach(function(v,w){if(!this.getPaymentRequestByID(v.id))p=p.push(new(c("P2PPaymentRequest"))(v))}.bind(this));var u=p.toArray();u.sort(function(v,w){return v.creationTime-w.creationTime});p=j(u)};s.prototype.isPaymentRequestInitiated=function(){return q};s.prototype.isPaymentRequestDeclining=function(){return n};s.prototype.isPaymentRequestCanceling=function(){return l};s.prototype.getPaymentRequestByID=function(t){return p.find(function(u){return t===u.id})};s.prototype.getPaymentRequestError=function(){return o};s.prototype.getPaymentRequestDeclineError=function(){return m};s.prototype.getPaymentRequestCancelError=function(){return k};s.prototype.getPendingPaymentRequest=function(){if(!r){r=true;c("P2PAPI").getPendingPaymentRequests()}return p.filter(function(t){return t.requestee.id===c("CurrentUser").getID()&&t.currentStatus===c("P2PPaymentRequestStatus").INITED}).last()};s.prototype.updateRequest=function(t,u){p.forEach(function(v,w){if(t===v.id)p=p.set(w,v.merge(v,u))})};s.prototype.updateIndividualRequest=function(t){var u=t.id,v=t.groupRequestID,w=p.findIndex(function(C){return v===C.id}),x=p.get(w),y=x.individualRequests.findIndex(function(C){return u===C.id}),z=x.individualRequests.slice(0),A=z[y],B=babelHelpers["extends"]({},A,t);z[y]=B;x=x.set("individualRequests",z);p=p.set(w,x)};s.prototype.getPaymentRequests=function(){return p};f.exports=new s()}),null);
__d("P2PJewelBanner.react",["cx","fbt","ix","Image.react","Layout.react","P2PButton.react","React","TooltipLink.react","URI","XUIGrayText.react"],(function a(b,c,d,e,f,g,h,i,j){"use strict";__p&&__p();var k,l,m=c("Layout.react").FillColumn,n=c("Layout.react").Column,o=c("React").PropTypes;k=babelHelpers.inherits(p,c("React").Component);l=k&&k.prototype;function p(){__p&&__p();var q,r;for(var s=arguments.length,t=Array(s),u=0;u<s;u++)t[u]=arguments[u];return r=(q=l.constructor).call.apply(q,[this].concat(t)),this.handleCloseClick=function(v){v.stopPropagation();if(this.props.onClose)this.props.onClose()}.bind(this),this.handleClick=function(){this.execPrimaryClick()}.bind(this),this.handlePrimaryClick=function(v){v.stopPropagation();this.execPrimaryClick()}.bind(this),this.execPrimaryClick=function(){if(this.props.primaryActionConfig.uri)new(c("URI"))(this.props.primaryActionConfig.uri).go();this.props.primaryActionConfig.onClick&&this.props.primaryActionConfig.onClick()}.bind(this),this.handleSecondaryActionClick=function(v){v.stopPropagation();this.props.secondaryActionConfig&&this.props.secondaryActionConfig.onClick&&this.props.secondaryActionConfig.onClick()}.bind(this),this.renderCloseButton=function(){return c("React").createElement(c("TooltipLink.react"),{alignH:"center",className:"_47d8",href:"#",onClick:this.handleCloseClick,position:"above",tooltip:i._("Dismiss")},c("React").createElement(c("Image.react"),{className:"_47dg",height:7,src:j("94375"),width:7}))}.bind(this),this.renderActions=function(){var v=this.props.primaryActionConfig,w=void 0,x=this.props.secondaryActionConfig;if(x)w=c("React").createElement(c("P2PButton.react"),{className:"_5d0t",href:"#",label:x.text,onClick:this.handleSecondaryActionClick,size:"large",target:"_blank",type:"primary"});return c("React").createElement("div",null,w,c("React").createElement(c("P2PButton.react"),{className:"_5d0t",href:v.uri||"#",label:v.text,onClick:this.handlePrimaryClick,size:"large",target:"_blank",type:"primary",use:"confirm"}))}.bind(this),r}p.prototype.render=function(){var q=void 0;if(this.props.isDismissable)q=this.renderCloseButton();return c("React").createElement("div",{className:"_5d0n",onClick:this.handleClick,role:"presentation"},q,c("React").createElement(c("Layout.react"),null,c("React").createElement(n,{className:"_400i"},c("React").createElement("div",{className:"_400j"},c("React").createElement(c("Image.react"),{className:"_5d0q",height:50,src:j("94376"),width:50}))),c("React").createElement(m,{className:"_47di"},c("React").createElement("div",{className:"_400j"},c("React").createElement(c("XUIGrayText.react"),{display:"block",shade:"dark",weight:"bold"},this.props.titleText),c("React").createElement(c("XUIGrayText.react"),{display:"block",shade:"light"},this.props.bodyText))),c("React").createElement(n,{className:"_400k"},c("React").createElement("div",{className:"_400j"},this.renderActions()))))};p.propTypes={bodyText:o.node,isDismissable:o.bool,onClose:o.func,primaryActionConfig:o.shape({onClick:o.func,text:o.node.isRequired,uri:o.oneOfType([o.string,o.object])}).isRequired,secondaryActionConfig:o.shape({onClick:o.func.isRequired,text:o.node.isRequired}),titleText:o.node.isRequired};p.defaultProps={isDismissable:false};f.exports=p}),null);
__d("P2PSimpleDialog.react",["fbt","FBPaymentsErrorNotice_DEPRECATED.react","P2PButton.react","P2PDialog.react","P2PDialogBody.react","P2PDialogFooter.react","P2PDialogTitle.react","P2PLoadingMask.react","React"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i,j,k=c("React").PropTypes;i=babelHelpers.inherits(l,c("React").Component);j=i&&i.prototype;function l(){var m,n;for(var o=arguments.length,p=Array(o),q=0;q<o;q++)p[q]=arguments[q];return n=(m=j.constructor).call.apply(m,[this].concat(p)),this.handleToggle=function(r){if(!r)this.props.onCancel()}.bind(this),n}l.prototype.render=function(){var m=void 0;if(this.props.error)m=c("React").createElement(c("FBPaymentsErrorNotice_DEPRECATED.react"),{error:this.props.error});return c("React").createElement(c("P2PDialog.react"),{behaviors:this.props.behaviors,layerHideOnBlur:false,onToggle:this.handleToggle,repositionOnUpdate:true,shown:true,width:this.props.width},c("React").createElement(c("P2PDialogTitle.react"),null,this.props.title),c("React").createElement(c("P2PDialogBody.react"),null,m,this.props.bodyText,c("React").createElement(c("P2PLoadingMask.react"),{visible:this.props.loading})),c("React").createElement(c("P2PDialogFooter.react"),null,c("React").createElement(c("P2PButton.react"),{disabled:this.props.loading,label:this.props.cancelButtonText,onClick:this.props.onCancel,size:"medium"}),c("React").createElement(c("P2PButton.react"),{disabled:this.props.loading,label:this.props.confirmButtonText,onClick:this.props.onConfirm,size:"medium",use:"confirm"})))};l.propTypes={bodyText:k.string.isRequired,cancelButtonText:k.string,confirmButtonText:k.string,error:k.object,loading:k.bool,onCancel:k.func.isRequired,onConfirm:k.func.isRequired,title:k.string.isRequired,width:k.number};l.defaultProps={cancelButtonText:h._("Cancel"),confirmButtonText:h._("Confirm"),width:300};f.exports=l}),null);
__d("P2PPaymentRequestCancelDialogContainer.react",["fbt","P2PActions","P2PAPI","P2PLogger","P2PPaymentLoggerEvent","P2PPaymentLoggerEventFlow","P2PPaymentRequest","P2PPaymentRequestsStore","P2PSimpleDialog.react","React","StoreAndPropBasedStateMixin"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i=c("React").PropTypes,j=c("React").createClass({displayName:"P2PPaymentRequestCancelDialogContainer",mixins:[c("StoreAndPropBasedStateMixin")(c("P2PPaymentRequestsStore"))],propTypes:{paymentRequest:i.instanceOf(c("P2PPaymentRequest")).isRequired},statics:{calculateState:function k(l){return{error:c("P2PPaymentRequestsStore").getPaymentRequestCancelError(),loading:c("P2PPaymentRequestsStore").isPaymentRequestCanceling()}}},log:function k(l,m){c("P2PLogger").log(l,{www_event_flow:c("P2PPaymentLoggerEventFlow").UI_FLOW_P2P_REQUEST,request_id:this.props.paymentRequest.id})},componentDidMount:function k(){this.log(c("P2PPaymentLoggerEvent").UI_ACTN_INITIATE_CANCEL_REQUEST)},handleCancel:function k(){c("P2PActions").hideDialog()},handleConfirm:function k(){c("P2PAPI").cancelPaymentRequest({error:function(){this.log(c("P2PPaymentLoggerEvent").UI_ACTN_CANCEL_REQUEST_FAIL)}.bind(this),paymentRequestID:this.props.paymentRequest.id,success:function(){this.log(c("P2PPaymentLoggerEvent").UI_ACTN_CANCEL_REQUEST_SUCCESS)}.bind(this)});this.log(c("P2PPaymentLoggerEvent").UI_ACTN_CONFIRM_CANCEL_REQUEST)},renderBodyText:function k(){var l=this.props.paymentRequest.requestee.name;return h._("{Name of requestee} will be notified that the request was canceled.",[h.param("Name of requestee",l)])},render:function k(){return c("React").createElement(c("P2PSimpleDialog.react"),{bodyText:this.renderBodyText(),error:this.state.error,loading:this.state.loading,cancelButtonText:h._("Back"),confirmButtonText:h._("Cancel"),onCancel:this.handleCancel,onConfirm:this.handleConfirm,title:h._("Cancel Request?")})}});f.exports=j}),null);
__d("P2PPaymentRequestDeclineDialogContainer.react",["fbt","P2PActions","P2PAPI","P2PLogger","P2PPaymentLoggerEvent","P2PPaymentLoggerEventFlow","P2PPaymentRequest","P2PPaymentRequestsStore","P2PSimpleDialog.react","React","StoreAndPropBasedStateMixin"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i=c("React").PropTypes,j=c("React").createClass({displayName:"P2PPaymentRequestDeclineDialogContainer",mixins:[c("StoreAndPropBasedStateMixin")(c("P2PPaymentRequestsStore"))],propTypes:{paymentRequest:i.instanceOf(c("P2PPaymentRequest")).isRequired},statics:{calculateState:function k(l){return{error:c("P2PPaymentRequestsStore").getPaymentRequestDeclineError(),loading:c("P2PPaymentRequestsStore").isPaymentRequestDeclining()}}},log:function k(l,m){c("P2PLogger").log(l,{www_event_flow:c("P2PPaymentLoggerEventFlow").UI_FLOW_P2P_REQUEST,request_id:this.props.paymentRequest.id})},componentDidMount:function k(){this.log(c("P2PPaymentLoggerEvent").UI_ACTN_INITIATE_DECLINE_REQUEST)},handleCancel:function k(){c("P2PActions").hideDialog()},handleConfirm:function k(){c("P2PAPI").declinePaymentRequest({error:function(){this.log(c("P2PPaymentLoggerEvent").UI_ACTN_DECLINE_REQUEST_FAIL)}.bind(this),paymentRequestID:this.props.paymentRequest.id,success:function(){this.log(c("P2PPaymentLoggerEvent").UI_ACTN_DECLINE_REQUEST_SUCCESS)}.bind(this)});this.log(c("P2PPaymentLoggerEvent").UI_ACTN_CONFIRM_DECLINE_REQUEST)},renderBodyText:function k(){var l=this.props.paymentRequest.requester.name;return h._("{Name of requester} will be notified that the request was declined.",[h.param("Name of requester",l)])},render:function k(){return c("React").createElement(c("P2PSimpleDialog.react"),{bodyText:this.renderBodyText(),error:this.state.error,loading:this.state.loading,cancelButtonText:h._("Back"),confirmButtonText:h._("Decline"),onCancel:this.handleCancel,onConfirm:this.handleConfirm,title:h._("Decline Request?")})}});f.exports=j}),null);
__d("P2PPaymentRequestActionHelper",["fbt","MercuryIDs","P2PActions","P2PPaymentRequest","P2PPaymentRequestCancelDialogContainer.react","P2PPaymentRequestStatus","P2PPaymentRequestDeclineDialogContainer.react","P2PTransferParam","P2PTransferStatus"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i=function i(k){switch(k){case c("P2PTransferStatus").CANCELED_DECLINED:return c("P2PPaymentRequestStatus").DECLINED;case c("P2PTransferStatus").CANCELED_EXPIRED:return c("P2PPaymentRequestStatus").EXPIRED;case c("P2PTransferStatus").CANCELED_RECIPIENT_RISK:case c("P2PTransferStatus").CANCELED_SAME_CARD:case c("P2PTransferStatus").CANCELED_SENDER_RISK:case c("P2PTransferStatus").CANCELED_SYSTEM_FAIL:return c("P2PPaymentRequestStatus").CANCELED;case c("P2PTransferStatus").COMPLETED:return c("P2PPaymentRequestStatus").TRANSFER_COMPLETED;case c("P2PTransferStatus").INTERMEDIATE_PROCESSING:case c("P2PTransferStatus").PENDING_PUSH_FAIL:case c("P2PTransferStatus").PENDING_SENDER_INITED:case c("P2PTransferStatus").PENDING_RECIPIENT_NUX:case c("P2PTransferStatus").PENDING_SENDER_VERIFICATION:case c("P2PTransferStatus").PENDING_SENDER_MANUAL_REVIEW:case c("P2PTransferStatus").PENDING_RECIPIENT_PROCESSING:case c("P2PTransferStatus").PENDING_RECIPIENT_VERIFICATION:case c("P2PTransferStatus").PENDING_RECIPIENT_MANUAL_REVIEW:case c("P2PTransferStatus").PENDING_SENDER_VERIFICATION_PROCESSING:case c("P2PTransferStatus").PENDING_RECIPIENT_VERIFICATION_PROCESSING:default:return c("P2PPaymentRequestStatus").TRANSFER_INITED}},j={initDeclinePaymentRequestFlow:function k(l){c("P2PActions").showDialog(c("P2PPaymentRequestDeclineDialogContainer.react"),{paymentRequest:l})},initPayForPaymentRequestFlow:function k(l,m){var n=[],o=l.groupThreadFBID,p=void 0;if(o){n.push(l.requester.id);p=c("MercuryIDs").getThreadIDFromThreadFBID(o)}else p=c("MercuryIDs").getThreadIDFromUserID(l.requester.id);c("P2PActions").chatSendViewOpened({amount:l.amount,memoText:l.memoText,paymentRequestID:l.id,threadID:p,useModal:true,referrer:m,groupSendRecipientUserIDs:n,groupThreadFBID:o})},initCancelPaymentRequestFlow:function k(l){c("P2PActions").showDialog(c("P2PPaymentRequestCancelDialogContainer.react"),{paymentRequest:l})},getPaymentRequest:function k(l){return new(c("P2PPaymentRequest"))({amount:l.amount,amountWithSymbol:l.amountWithSymbol,creationTime:l.creationTime,currency:l.currency,currentStatus:i(l[c("P2PTransferParam").STATUS]),groupThreadFBID:l.groupThreadFBID,individualRequests:[],memoText:l.memoText,requestee:l.sender,requester:l.receiver,statusDescription:l.statusDescription,trnasfer:l,transferID:l[c("P2PTransferParam").TRANSFER_ID],updatedTime:l.updatedTime})},getStatusText:function k(l){__p&&__p();var m=l.currentStatus,n=h._("Canceled"),o=h._("Paid"),p=h._("Declined"),q=h._("Pending"),r=void 0;switch(m){case c("P2PPaymentRequestStatus").DECLINED:r=p;break;case c("P2PPaymentRequestStatus").CANCELED:case c("P2PPaymentRequestStatus").TRANSFER_FAILED:r=n;break;case c("P2PPaymentRequestStatus").TRANSFER_COMPLETED:r=o;break;default:r=q;break}return r}};f.exports=j}),null);
__d("P2PPendingPaymentRequestJewelBanner.react",["fbt","P2PJewelBanner.react","P2PPaymentRequest","P2PPaymentRequestActionHelper","React"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i,j,k=c("React").PropTypes;i=babelHelpers.inherits(l,c("React").Component);j=i&&i.prototype;function l(){__p&&__p();var m,n;for(var o=arguments.length,p=Array(o),q=0;q<o;q++)p[q]=arguments[q];return n=(m=j.constructor).call.apply(m,[this].concat(p)),this.handleDeclineClick=function(){c("P2PPaymentRequestActionHelper").initDeclinePaymentRequestFlow(this.props.paymentRequest)}.bind(this),this.handlePayClick=function(){c("P2PPaymentRequestActionHelper").initPayForPaymentRequestFlow(this.props.paymentRequest,"banner")}.bind(this),this.renderBodyText=function(){var r=this.props.paymentRequest,s=r.memoText;if(!s)return null;return h._("For {What the user paid for}",[h.param("What the user paid for",s)])}.bind(this),n}l.prototype.render=function(){var m=this.props.paymentRequest;return c("React").createElement(c("P2PJewelBanner.react"),{bodyText:this.renderBodyText(),primaryActionConfig:{onClick:this.handlePayClick,text:h._("Pay")},secondaryActionConfig:{onClick:this.handleDeclineClick,text:h._("Decline")},titleText:h._("{requester_name} requested {amount}",[h.param("requester_name",m.requester.name),h.param("amount",m.amountWithSymbol)])})};l.propTypes={paymentRequest:k.instanceOf(c("P2PPaymentRequest")).isRequired};f.exports=l}),null);
__d("P2PPendingPushFailJewelBanner.react",["fbt","P2PJewelBanner.react","P2PLinkConstants","React"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i,j,k=c("React").PropTypes;i=babelHelpers.inherits(l,c("React").Component);j=i&&i.prototype;function l(){var m,n;for(var o=arguments.length,p=Array(o),q=0;q<o;q++)p[q]=arguments[q];return n=(m=j.constructor).call.apply(m,[this].concat(p)),this.getActionText=function(){return h._("Learn More")},this.getBodyText=function(){var r=this.props.transfer;return h._("{currency}{amount} from {sender_name} couldn't be deposited using your debit card.",[h.param("currency",r.currency),h.param("amount",r.amount),h.param("sender_name",r.sender.name)])}.bind(this),n}l.prototype.render=function(){return c("React").createElement(c("P2PJewelBanner.react"),{bodyText:this.getBodyText(),primaryActionConfig:{text:this.getActionText(),uri:c("P2PLinkConstants").helpTransferPushFailURI},titleText:h._("Update Your Card")})};l.propTypes={transfer:k.object.isRequired};f.exports=l}),null);
__d("P2PAcceptMoneyDialog.react",["cx","BootloadedComponent.react","Bootloader","MessengerEnvironment","P2PDialog.react","P2PLoadingMask.react","JSResource","React","Run"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i,j,k=c("React").PropTypes,l=c("MessengerEnvironment").messengerui;i=babelHelpers.inherits(m,c("React").Component);j=i&&i.prototype;function m(){var n,o;for(var p=arguments.length,q=Array(p),r=0;r<p;r++)q[r]=arguments[r];return o=(n=j.constructor).call.apply(n,[this].concat(q)),this.$P2PAcceptMoneyDialog1=function(){return c("React").createElement(c("P2PDialog.react"),{className:"_309"+(l?" _5ktw":""),layerHideOnBlur:false,repositionOnUpdate:true,shown:true,width:l?400:350},c("React").createElement("div",{className:"_3w2b"},c("React").createElement(c("P2PLoadingMask.react"),{visible:true})))},o}m.preload=function(){c("Run").onAfterLoad(function(){c("Bootloader").loadModules(["P2PAcceptMoneyDialogImpl.react"],function(){},"P2PAcceptMoneyDialog.react")})};m.prototype.render=function(){return c("React").createElement(c("BootloadedComponent.react"),babelHelpers["extends"]({bootloadLoader:c("JSResource")("P2PAcceptMoneyDialogImpl.react").__setRef("P2PAcceptMoneyDialog.react"),bootloadPlaceholder:this.$P2PAcceptMoneyDialog1()},this.props))};m.propTypes={creditCards:k.array.isRequired,useRedesignForm:k.bool,onClose:k.func,transfer:k.object};f.exports=m}),null);
__d("MessengerPaymentProductType",[],(function a(b,c,d,e,f,g){f.exports=Object.freeze({P2P:"p2p",PAGES_COMMERCE:"pages_commerce",NMOR_PAGES_COMMERCE:"nmor_pages_commerce",MESSENGER_COMMERCE:"messenger_commerce"})}),null);
__d("P2PCreditCardStore",["P2PActionConstants","Arbiter","CreditCardFormParam","ChannelConstants","EventEmitter","ImmutableObject","MessengerPaymentProductType","P2PActions","P2PAPI","P2PChannelType","P2PCreditCard","P2PDispatcher"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h,i,j=void 0,k=void 0,l=void 0,m=void 0,n=void 0,o=void 0,p=null,q=false,r=false;function s(v,w){if(v)o[v]=new(c("ImmutableObject"))(w)}function t(v,w){p=w;if(v)o[v]={error:w}}h=babelHelpers.inherits(u,c("EventEmitter"));i=h&&h.prototype;function u(){i.constructor.call(this);l=false;m=false;j=[];n=true;o={};k=c("P2PDispatcher").register(this.onEventDispatched.bind(this));c("Arbiter").subscribe(c("ChannelConstants").getArbiterType(c("P2PChannelType").CREDIT_CARD_CHANGED),this.handleChannelCreditCardChanged.bind(this));c("Arbiter").subscribe(c("ChannelConstants").getArbiterType(c("P2PChannelType").CREDIT_CARD_DELETED),this.handleChannelCreditCardDeleted.bind(this))}u.prototype.onEventDispatched=function(v){__p&&__p();var w=v.data,x=v.type;switch(x){case c("P2PActionConstants").CREDIT_CARD_SAVING:this.handleCreditCardSaving();this.emit("change");break;case c("P2PActionConstants").CREDIT_CARDS_UPDATED:this.handleCreditCardsUpdated(w);this.emit("change");break;case c("P2PActionConstants").CREDIT_CARDS_UPDATED_ERROR:this.handleCreditCardsUpdatedError();this.emit("change");break;case c("P2PActionConstants").CHANNEL_EVENTS_ALLOWED:this.handleChannelEventsAllowed();break;case c("P2PActionConstants").CHANNEL_EVENTS_IGNORED:this.handleChannelEventsIgnored();break;case c("P2PActionConstants").CREDIT_CARD_ADDED:this.handleCreditCardAdded(w);this.emit("change");break;case c("P2PActionConstants").CREDIT_CARD_ADDED_ERROR:this.handleCreditCardAddedError(w);this.emit("change");break;case c("P2PActionConstants").CREDIT_CARD_ADDED_ERROR_CLEARED:this.handleCreditCardAddedErrorCleared();this.emit("change");break;case c("P2PActionConstants").CREDIT_CARD_DELETED:this.handleCreditCardDeleted(w);this.emit("change");break;case c("P2PActionConstants").CREDIT_CARD_DELETED_ERROR:this.handleCreditCardDeletedError(w);this.emit("change");break;case c("P2PActionConstants").CREDIT_CARD_UPDATED:this.handleCreditCardUpdated(w);this.emit("change");break;case c("P2PActionConstants").CREDIT_CARD_UPDATED_ERROR:this.handleCreditCardUpdatedError(w);this.emit("change");break;case c("P2PActionConstants").PRESET_CREDIT_CARD_UPDATED:this.handlePresetCreditCardUpdated(w);this.emit("change");break;case c("P2PActionConstants").PRESET_CREDIT_CARD_UPDATED_ERROR:this.handlePresetCreditCardUpdatedError(w);this.emit("change");break;case c("P2PActionConstants").CREDIT_CARD_VERIFIED:this.handleCreditCardVerified(w);this.emit("change");break;case c("P2PActionConstants").CREDIT_CARD_VERIFIED_ERROR:this.handleCreditCardVerifiedError(w);this.emit("change");break;case c("P2PActionConstants").BIN_NUMBER_VALIDATED:this.handleBINNumberValidated(w);this.emit("change");break;case c("P2PActionConstants").BIN_NUMBER_VALIDATED_ERROR:this.handleBINNumberValidatedError(w);this.emit("change");break}};u.prototype.handleCreditCardSaving=function(){q=true;p=null};u.prototype.getAsyncRequestState=function(){return o};u.prototype.isCreditCardsFetchComplete=function(){return l};u.prototype.handleCreditCardsUpdated=function(v){l=true;r=false;j=v.map(function(w){return new(c("P2PCreditCard"))(w)})};u.prototype.handleCreditCardsUpdatedError=function(){l=true;r=true};u.prototype.handleCreditCardAdded=function(v){q=false;s(v.requestID,v);if(!this.getCreditCardByCredentialID(v[c("CreditCardFormParam").CREDENTIAL_ID]))j.push(new(c("P2PCreditCard"))(v))};u.prototype.handleChannelEventsIgnored=function(){n=false};u.prototype.handleChannelEventsAllowed=function(){n=true};u.prototype.handleChannelCreditCardChanged=function(v,w){if(n&&!this.getCreditCardByCredentialID(w[c("CreditCardFormParam").CREDENTIAL_ID]))c("P2PAPI").getAllCreditCards()};u.prototype.handleCreditCardAddedError=function(v){q=false;t(v.requestID,v.errors)};u.prototype.handleCreditCardAddedErrorCleared=function(){p=null};u.prototype.handleCreditCardDeleted=function(v){var w=v[c("CreditCardFormParam").CREDENTIAL_ID];s(v.requestID,v);j=j.filter(function(x){return x.getCredentialId()!==w})};u.prototype.handleChannelCreditCardDeleted=function(v,w){w=w.obj;c("P2PActions").deleteCreditCard(w)};u.prototype.handleCreditCardDeletedError=function(v){t(v.requestID,v.error)};u.prototype.handleCreditCardUpdated=function(v){s(v.requestID,v);var w=this.getCreditCardByCredentialID(v[c("CreditCardFormParam").CREDENTIAL_ID]);if(w){w.setExp(v[c("CreditCardFormParam").CARD_EXPIRATION]);w.setZipCode(v[c("CreditCardFormParam").ZIP])}};u.prototype.handleCreditCardUpdatedError=function(v){t(v.requestID,v.errors)};u.prototype.handlePresetCreditCardUpdated=function(v){var w=v[c("CreditCardFormParam").CREDENTIAL_ID];s(v.requestID,v);var x=j.filter(function(z){return z.getIsPreset()})[0];if(x)x.setIsPreset(false);var y=this.getCreditCardByCredentialID(w);if(y)y.setIsPreset(true)};u.prototype.handlePresetCreditCardUpdatedError=function(v){t(v.requestID,v.error)};u.prototype.handleCreditCardVerified=function(v){s(v.requestID,v);var w=this.getCreditCardByCredentialID(v[c("CreditCardFormParam").CREDENTIAL_ID]);if(w)w.setIsVerified(true)};u.prototype.handleCreditCardVerifiedError=function(v){t(v.requestID,v.error)};u.prototype.handleBINNumberValidated=function(v){s(v.requestID,v)};u.prototype.handleBINNumberValidatedError=function(v){t(v.requestID,v.error)};u.prototype.getAll=function(v){v=v===undefined?c("MessengerPaymentProductType").P2P:v;if(!m){m=true;c("P2PAPI").getAllCreditCards()}return j.filter(function(w){if(v===c("MessengerPaymentProductType").P2P)return w.getIsPersonalTransferEligible();return w})};u.prototype.getCreditCardByCredentialID=function(v){return j.filter(function(w){return w.getCredentialId()===v})[0]};u.prototype.getDispatchToken=function(){return k};u.prototype.getSaveErrors=function(){return p};u.prototype.isSaving=function(){return q};u.prototype.failedCreditCardFetch=function(){return r};f.exports=new u()}),null);
__d("P2PTimeBasedAcceptMessage.react",["fbt","React"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i,j,k=c("React").PropTypes;i=babelHelpers.inherits(l,c("React").Component);j=i&&i.prototype;l.prototype.render=function(){var m=this.props.transfer,n=m.creationTime*1e3,o=1e3*60*60*24,p=Date.now(),q=(p-n)/o,r=m.expirationTimestamp*1e3-p,s=Math.round(Math.max(r/o,1)),t=void 0;if(q<=2)t=h._("Add a debit card and it'll go straight to your bank.");else if(q<=4)t=h._("This money will be sent back in {days left} days. Add a debit card to accept it.",[h.param("days left",s)]);else if(q<=5)t=h._({"day":"You have {days left} day to add a debit card before the money is sent back to {sender_name}.","days":"You have {days left} days to add a debit card before the money is sent back to {sender_name}."},[h.param("days left",s),h["enum"](s===1?"day":"days",{day:"day",days:"days"}),h.param("sender_name",m.sender.name)]);else t=h._("You have 24 hours to add a debit card before the money is sent back to {sender_name}.",[h.param("sender_name",m.sender.name)]);return c("React").createElement("div",null,t)};function l(){i.apply(this,arguments)}l.propTypes={transfer:k.object.isRequired};f.exports=l}),null);
__d("P2PPendingRecipientNUXJewelBanner.react",["fbt","P2PAcceptMoneyDialog.react","P2PActions","P2PCreditCardStore","P2PJewelBanner.react","P2PTimeBasedAcceptMessage.react","React"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i=c("React").PropTypes,j=c("React").createClass({displayName:"P2PPendingRecipientNUXJewelBanner",propTypes:{transfer:i.object.isRequired},getInitialState:function k(){return{creditCards:c("P2PCreditCardStore").getAll()}},creditCardStoreSub:null,componentDidMount:function k(){this.creditCardStoreSub=c("P2PCreditCardStore").addListener("change",this.onCreditCardStoreChange)},componentWillUnmount:function k(){if(this.creditCardStoreSub){this.creditCardStoreSub.remove();this.creditCardStoreSub=null}},onCreditCardStoreChange:function k(){var l={creditCards:c("P2PCreditCardStore").getAll()};if(this.isMounted())this.setState(l)},handleClick:function k(){this.showAcceptMoneyDialog()},showAcceptMoneyDialog:function k(){c("P2PActions").showDialog(c("P2PAcceptMoneyDialog.react"),{creditCards:this.state.creditCards,onClose:c("P2PActions").hideDialog,transfer:this.props.transfer})},renderTimeBasedMessage:function k(){return c("React").createElement(c("P2PTimeBasedAcceptMessage.react"),{transfer:this.props.transfer})},render:function k(){var l=this.props.transfer;if(!c("P2PCreditCardStore").isCreditCardsFetchComplete())return null;return c("React").createElement(c("P2PJewelBanner.react"),{bodyText:this.renderTimeBasedMessage(),primaryActionConfig:{onClick:this.handleClick,text:h._("Add Card")},titleText:h._("Accept {currency}{amount} from {sender_name}.",[h.param("currency",l.currency),h.param("amount",l.amount),h.param("sender_name",l.sender.name)])})}});f.exports=j}),null);
__d("P2PVerificationFlowHelper",["AsyncDialog","AsyncRequest","P2PAPI","P2PTransferParam","emptyFunction"],(function a(b,c,d,e,f,g){__p&&__p();var h=null,i=null,j=null,k={startVerificationFlow:function l(m,n,o){h=m;i=n;j=o||c("emptyFunction");c("AsyncDialog").send(new(c("AsyncRequest"))("/p2p/verify/dialog/?id="+m))},setupFlowExitHandler:function l(m,n,o,p){__p&&__p();var q=function q(t){j(t);h=null;i=null;j=null;m.destroy();n.destroy()};if(o)m.subscribe("hide",function(){q(p)});else{var r=false,s=false;m.subscribe("confirm",function(){r=true});m.subscribe("hide",function(){if(r){m.destroy();n.destroy()}else if(i)n.show();else q(false)});n.subscribe("confirm",function(){s=true;var t={};t[c("P2PTransferParam").TRANSFER_ID]=h;c("P2PAPI").cancelTransaction({formData:t});q(false)});n.subscribe("hide",function(){if(!s)m.show()})}}};f.exports=k}),null);
__d("P2PPendingRecipientVerificationJewelBanner.react",["fbt","P2PJewelBanner.react","P2PTransferParam","P2PVerificationFlowHelper","React"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i,j,k=c("React").PropTypes;i=babelHelpers.inherits(l,c("React").Component);j=i&&i.prototype;function l(){var m,n;for(var o=arguments.length,p=Array(o),q=0;q<o;q++)p[q]=arguments[q];return n=(m=j.constructor).call.apply(m,[this].concat(p)),this.handleClick=function(){c("P2PVerificationFlowHelper").startVerificationFlow(this.props.transfer[c("P2PTransferParam").TRANSFER_ID],false)}.bind(this),n}l.prototype.render=function(){return c("React").createElement(c("P2PJewelBanner.react"),{bodyText:h._("To accept the money {sender_name} sent you, please confirm your information.",[h.param("sender_name",this.props.transfer.sender.name)]),primaryActionConfig:{onClick:this.handleClick,text:h._("Confirm Info")},titleText:h._("Please Confirm Your Info")})};l.propTypes={transfer:k.object.isRequired};f.exports=l}),null);
__d("P2PJewelBannerContainer.react",["cx","CurrentUser","P2PBannerStore","P2PPaymentRequestsStore","P2PPendingPaymentRequestJewelBanner.react","P2PPendingPushFailJewelBanner.react","P2PPendingRecipientNUXJewelBanner.react","P2PPendingRecipientVerificationJewelBanner.react","P2PTransferParam","P2PTransferStatus","P2PTransferStore","PureStoreBasedStateMixin","React","gkx"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i=c("React").createClass({displayName:"P2PJewelBannerContainer",mixins:[c("PureStoreBasedStateMixin")(c("P2PBannerStore"),c("P2PPaymentRequestsStore"),c("P2PTransferStore"))],statics:{calculateState:function j(){var k=c("P2PTransferStore").getNUXTransfer(),l=c("P2PPaymentRequestsStore").getPendingPaymentRequest(),m=c("gkx")("AT7KSMdBbHFSBSJn1JWZUBa76yZr8D9pobYWWvzliNi0RZQsDI29awNxAAPfpbtiIQHouKzRc3uiaxxHhFXpGQGFiE6SMOOJwNKziF0lagOtKg");return{paymentRequest:l,paymentRequestBannerShown:!!l,transfer:k,transferBannerShown:m&&k&&k.receiver.id===c("CurrentUser").getID()}}},renderTransferBanner:function j(){var k=this.state.transfer,l=k[c("P2PTransferParam").STATUS];switch(l){case c("P2PTransferStatus").PENDING_RECIPIENT_NUX:return c("React").createElement(c("P2PPendingRecipientNUXJewelBanner.react"),{transfer:k});case c("P2PTransferStatus").PENDING_RECIPIENT_VERIFICATION:return c("React").createElement(c("P2PPendingRecipientVerificationJewelBanner.react"),{transfer:k});case c("P2PTransferStatus").PENDING_PUSH_FAIL:return c("React").createElement(c("P2PPendingPushFailJewelBanner.react"),{transfer:k})}},renderPaymentRequestBanner:function j(){return c("React").createElement(c("P2PPendingPaymentRequestJewelBanner.react"),{paymentRequest:this.state.paymentRequest})},render:function j(){var k=void 0;if(this.state.transferBannerShown)k=this.renderTransferBanner();else if(this.state.paymentRequestBannerShown)k=this.renderPaymentRequestBanner();return c("React").createElement("div",{className:"_1xfk"},k)}});f.exports=i}),null);
__d("MercuryThreadlistContainer.react",["Bootloader","emptyFunction","immutable","MercuryAPIArgsSource","MercuryConfig","MercuryFilters","MercuryIDs","MercuryThreadlistConstants","MessagingTag","P2PJewelBannerContainer.react","QE2Logger","React","SubscriptionsHandler","gkx","setImmediate","MessengerStateStore","MessengerMessageRequestsTypedLogger"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h,i,j=c("React").PropTypes,k="search",l="www_messenger_jewel_perf_h2_2017",m=3,n=5e3;h=babelHelpers.inherits(o,c("React").Component);i=h&&h.prototype;function o(){__p&&__p();var p,q;for(var r=arguments.length,s=Array(r),t=0;t<r;t++)s[t]=arguments[t];return q=(p=i.constructor).call.apply(p,[this].concat(s)),this.state={aggregatedThreads:null,showAggregation:false,isLoading:true,isSearching:false,unreadMessageRequestThreads:[],threads:c("immutable").Map()},this.threadListReqsInFlight=0,this.$MercuryThreadlistContainer13=function(){__p&&__p();var u=function(){this.setState({suspended:false});this.handleThreadListUpdate()}.bind(this);if(c("MercuryConfig").deferJewelUpdateOnChatOpen&&c("MercuryConfig").deferJewelUpdateOnChatOpen==="setTimeout"){this.setState({suspended:true});setTimeout(u,n)}else if(c("MercuryConfig").deferJewelUpdateOnChatOpen&&c("MercuryConfig").deferJewelUpdateOnChatOpen==="requestIdleCallback"){this.setState({suspended:true});requestIdleCallback(u,{timeout:n})}}.bind(this),this.$MercuryThreadlistContainer14=function(){if(this.props.folder!=="aggregation"&&!this.state.isSearching&&!this.state.isLoading&&!this.$MercuryThreadlistContainer1.hasLoadedThreadlist(this.props.folder,this.props.filter))this.$MercuryThreadlistContainer7(this.props.folder,this.props.filter,this.$MercuryThreadlistContainer8(this.props.folder)+c("MercuryThreadlistConstants").JEWEL_MORE_COUNT+1)}.bind(this),this.$MercuryThreadlistContainer21=function(){if(!this.$MercuryThreadlistContainer1||!this.$MercuryThreadlistContainer2)return;var u=this.$MercuryThreadlistContainer1.getAvailableThreadlistNow(c("MessagingTag").PENDING,c("MercuryFilters").UNREAD);this.$MercuryThreadlistContainer2.getMultiThreadMeta(u,function(v){this.setState({unreadMessageRequestThreads:u.map(function(w){return v[w]})})}.bind(this))}.bind(this),this.$MercuryThreadlistContainer16=function(u,v){this.setState({isLoading:v,searchThreads:[]},function(){return this.$MercuryThreadlistContainer12(k,c("MercuryFilters").ALL,u)}.bind(this))}.bind(this),this.$MercuryThreadlistContainer15=function(u){this.setState({isSearching:!!u})}.bind(this),this.$MercuryThreadlistContainer17=function(u,v){this.setState({showAggregation:true,aggregatedThreads:v});var w=c("MercuryIDs").getParticipantIDFromUserID(this.props.viewer),x=[],y=v.map(function(z){x.push(c("MercuryIDs").getThreadKeyfromThreadIDUserID(z.thread_id,c("MercuryIDs").tokenize(w).value));return z.thread_id});this.props.onAggregationClick&&this.props.onAggregationClick(u,y);new(c("MessengerMessageRequestsTypedLogger"))().setAction("aggregation_entrypoint_tap").setEntryPoint("inbox_aggregation").setSurface("inbox").setFolderType("pending").setThreadKeyList(x.filter(function(z){return z}).join(", ")).log()}.bind(this),q}o.prototype.componentWillMount=function(){this.setState({showAggregation:c("MessengerStateStore").getState()&&c("MessengerStateStore").getState().threadIDs!==null})};o.prototype.componentDidMount=function(){__p&&__p();c("QE2Logger").logExposureForUser(l);c("Bootloader").loadModules(["MercuryOrderedThreadlist","MercuryThreadInformer","MercuryThreads"],function(p,q,r){__p&&__p();if(this.props.resetAggregatedThreads)this.setState({showAggregation:false,aggregatedThreads:null});this.$MercuryThreadlistContainer1=p.getForFBID(this.props.viewer);this.$MercuryThreadlistContainer2=r.getForFBID(this.props.viewer);this.$MercuryThreadlistContainer3=function(s){__p&&__p();var t=this.$MercuryThreadlistContainer1.getAvailableThreadlistNow(c("MessagingTag").INBOX,s);if(t.length===0)return t;var u=this.$MercuryThreadlistContainer2.getThreadMetaNow(t[t.length-1]);if(!u)return t;var v=u.timestamp,w=this.$MercuryThreadlistContainer1.getThreadlistUntilTimestamp(v,c("MessagingTag").PENDING,s);w.sort(function(y,z){var A=this.$MercuryThreadlistContainer2.getThreadMetaNow(y),B=this.$MercuryThreadlistContainer2.getThreadMetaNow(z);return(B&&B.timestamp)-(A&&A.timestamp)}.bind(this));var x=c("MercuryConfig").MCMA?this.$MercuryThreadlistContainer4(w):w;return t.concat(x).sort(function(y,z){var A=typeof y==="string"?this.$MercuryThreadlistContainer2.getThreadMetaNow(y):this.$MercuryThreadlistContainer2.getThreadMetaNow(y[0]),B=typeof z==="string"?this.$MercuryThreadlistContainer2.getThreadMetaNow(z):this.$MercuryThreadlistContainer2.getThreadMetaNow(z[0]);return(B&&B.timestamp)-(A&&A.timestamp)}.bind(this))}.bind(this);this.$MercuryThreadlistContainer5=q.getForFBID(this.props.viewer);this.$MercuryThreadlistContainer6=new(c("SubscriptionsHandler"))();this.$MercuryThreadlistContainer6.addSubscriptions(this.$MercuryThreadlistContainer5.subscribe("threadlist-updated",function(s,t){if(!this.state.suspended)this.handleThreadListUpdate()}.bind(this)));if(c("MercuryConfig").MessengerInboxRequests)this.$MercuryThreadlistContainer7(c("MessagingTag").PENDING,this.props.filter,this.$MercuryThreadlistContainer8(c("MessagingTag").PENDING)+c("MercuryThreadlistConstants").CONNECTION_REQUEST);this.$MercuryThreadlistContainer9(this.props.folder,this.props.filter)}.bind(this),"MercuryThreadlistContainer.react")};o.prototype.componentWillReceiveProps=function(p){if(p.resetAggregatedThreads!==this.props.resetAggregatedThreads||p.folder!==this.props.folder||p.filter!==this.props.filter||p.folder===c("MessagingTag").INBOX&&this.state.showAggregation==true)this.$MercuryThreadlistContainer9(p.folder,p.filter)};o.prototype.componentDidUpdate=function(){if(this.props.resetAggregatedThreads&&this.state.showAggregation)this.setState({showAggregation:false,aggregatedThreads:null})};o.prototype.componentWillUnmount=function(){this.$MercuryThreadlistContainer10();this.$MercuryThreadlistContainer11();this.$MercuryThreadlistContainer6&&this.$MercuryThreadlistContainer6.release()};o.prototype.handleThreadListUpdate=function(){this.$MercuryThreadlistContainer12(this.props.folder,this.props.filter);if(c("MercuryConfig").MessengerInboxRequests){this.props.folder===c("MessagingTag").INBOX&&this.$MercuryThreadlistContainer12(c("MessagingTag").PENDING,this.props.filter);this.props.folder===c("MessagingTag").PENDING&&this.$MercuryThreadlistContainer12(c("MessagingTag").INBOX,this.props.filter)}};o.prototype.render=function(){var p=this.props,q=p.ChildClass,r=p.folder,s=p.filter,t=babelHelpers.objectWithoutProperties(p,["ChildClass","folder","filter"]),u=this.state.isSearching?this.state.threads.get(k)||[]:this.state.threads.get(r)||[];return c("React").createElement(q,babelHelpers["extends"]({},t,{filter:s,folder:r,isLoaded:r==="aggregation"||!!this.$MercuryThreadlistContainer1&&this.$MercuryThreadlistContainer1.hasLoadedThreadlist(r,s),isLoading:this.state.isLoading,isSearching:this.state.isSearching,newMessageRequestThreads:this.state.unreadMessageRequestThreads,onRenderThreads:this.props.onRenderThreads,onMessageRequestsClick:this.props.onMessageRequestsClick,showAggregation:this.state.showAggregation,threads:this.state.aggregatedThreads||u,onLoadMoreRequest:this.$MercuryThreadlistContainer14,onQuery:this.$MercuryThreadlistContainer15,onSearchResults:this.$MercuryThreadlistContainer16,onAggregationClick:this.$MercuryThreadlistContainer17,p2pJewelBannerContainer:this.$MercuryThreadlistContainer18(),maxInitialThreadCount:this.props.threadCount,handleChatTabOpen:this.props.source==="jewel"&&c("MercuryConfig").deferJewelUpdateOnChatOpen&&c("MercuryConfig").deferJewelUpdateOnChatOpen!=="none"?this.$MercuryThreadlistContainer13:c("emptyFunction")}))};o.prototype.$MercuryThreadlistContainer4=function(p){__p&&__p();var q=c("MercuryConfig").Unit||3,r=(c("MercuryConfig").Duration||3)*1e3*60*60*24,s=p.map(function(A){return this.$MercuryThreadlistContainer2.getThreadMetaNow(A).timestamp}.bind(this)),t=[];for(var u=0;u<s.length;u++){var v=s[u],w=s[u+q-1];if(w&&v-w<r){var x=[p[u]];for(var y=u+1;y<s.length;y++){var z=s[y];if(z&&v-z<r){x.push(p[y]);u++}else break}t.push(x)}else t.push(p[u])}return t};o.prototype.$MercuryThreadlistContainer18=function(){return c("gkx")("AT7cgeSh9oAiqKXsZQMaQ0v7FtvEHhwTCbBqQoShv2Z1PYB6xIXtB41izv6pn31yyYHiuLVko2wBqrvyvW5pK7u0")&&!c("gkx")("AT7KSMdBbHFSBSJn1JWZUBa76yZr8D9pobYWWvzliNi0RZQsDI29awNxAAPfpbtiIQHouKzRc3uiaxxHhFXpGQGFiE6SMOOJwNKziF0lagOtKg")?null:c("React").createElement(c("P2PJewelBannerContainer.react"),null)};o.prototype.$MercuryThreadlistContainer9=function(p,q){__p&&__p();if(p==="aggregation")return;var r=c("MessengerStateStore").getState()&&c("MessengerStateStore").getState().threadIDs||this.props.threadIDs;if(!r)this.setState({showAggregation:false,aggregatedThreads:null});if(!c("MercuryConfig").MessengerInboxRequests&&p===c("MessagingTag").INBOX&&(c("gkx")("AT6h5--3KUdxbat1rL4n2mVcPcg9eZ8bwokXjpPZS-_sSShoFlPyHXdioNqIwODAz2vH7270MK0r4x8XFkaYt6-h")||this.props.source!==c("MercuryAPIArgsSource").JEWEL))this.$MercuryThreadlistContainer19();if(!this.$MercuryThreadlistContainer20(p,q))this.$MercuryThreadlistContainer7(p,q,this.props.threadCount||c("MercuryThreadlistConstants").JEWEL_THREAD_COUNT+m);else if(this.state.isLoading)this.setState({isLoading:false},function(){this.$MercuryThreadlistContainer12(p,q)}.bind(this));else this.$MercuryThreadlistContainer12(p,q)};o.prototype.$MercuryThreadlistContainer19=function(){this.$MercuryThreadlistContainer1.getFilteredThreadlist(c("MercuryThreadlistConstants").RECENT_THREAD_OFFSET,c("MercuryThreadlistConstants").MAX_UNREAD_COUNT,c("MessagingTag").PENDING,c("MercuryFilters").UNREAD,this.$MercuryThreadlistContainer21,true,this.props.source)};o.prototype.$MercuryThreadlistContainer7=function(p,q,r){__p&&__p();if(!this.$MercuryThreadlistContainer1)return;this.$MercuryThreadlistContainer11();this.threadListReqsInFlight++;var s=function(){this.props.onDataFetchStart&&this.props.onDataFetchStart();var t=this.$MercuryThreadlistContainer1.getFilteredThreadlist(c("MercuryThreadlistConstants").RECENT_THREAD_OFFSET,r,p,q||c("MercuryFilters").ALL,function(u){this.threadListReqsInFlight--;if(this.threadListReqsInFlight===0){this.props.onDataFetchEnd&&this.props.onDataFetchEnd();this.setState({isLoading:false})}}.bind(this),true,this.props.source);this.$MercuryThreadlistContainer22={subscriberID:t,folder:p,filter:q}}.bind(this);if(c("gkx")("AT5u5y_2tbhjuTdh4Kg2TdttLGS73_JvpjKP4T3yUcEdoy0MQDkxKReXeNqyeJEnucpDEVsNLY6wuulEjaRK0PN7")&&this.state.isLoading)c("setImmediate")(s);else this.setState({isLoading:true},s)};o.prototype.$MercuryThreadlistContainer12=function(p,q,r){__p&&__p();if(!this.$MercuryThreadlistContainer1||!this.$MercuryThreadlistContainer2)return;this.$MercuryThreadlistContainer10();var s=void 0;if(c("MercuryConfig").MessengerInboxRequests&&p===c("MessagingTag").INBOX)s=this.$MercuryThreadlistContainer3(q);else if(p==="aggregation"||this.state.showAggregation){s=c("MessengerStateStore").getState()&&c("MessengerStateStore").getState().threadIDs||this.props.threadIDs;this.$MercuryThreadlistContainer23(s)}else s=r||this.$MercuryThreadlistContainer1.getAvailableThreadlistNow(p,q);var t=[].concat.apply([],s);this.$MercuryThreadlistContainer24=this.$MercuryThreadlistContainer2.getMultiThreadMeta(t,function(r){this.setState({threads:this.state.threads.set(p,this.$MercuryThreadlistContainer25(s,r))})}.bind(this))};o.prototype.$MercuryThreadlistContainer23=function(p){__p&&__p();var q=this.$MercuryThreadlistContainer1.getAvailableThreadlistNow(c("MessagingTag").PENDING,this.props.filter);if(p&&p.length>0){var r=p.filter(function(s){return q.indexOf(s)!==-1});this.$MercuryThreadlistContainer2.getMultiThreadMeta(r,function(s){if(!Array.isArray(s))s=Object.values(s);this.setState({aggregatedThreads:s})}.bind(this))}else this.setState({aggregatedThreads:null})};o.prototype.$MercuryThreadlistContainer25=function(p,q){return p.map(function(r){if(Array.isArray(r))return r.map(function(s){return q[s]});else return q[r]})};o.prototype.$MercuryThreadlistContainer20=function(p,q){var r=this.props.threadCount||c("MercuryThreadlistConstants").JEWEL_THREAD_COUNT+m;return!!(this.$MercuryThreadlistContainer1&&(this.$MercuryThreadlistContainer1.getThreadCount(p,q)>=r||this.$MercuryThreadlistContainer1.hasLoadedThreadlist(p,q)))};o.prototype.$MercuryThreadlistContainer8=function(p){var q=this.state.threads.get(p);return q?q.length:0};o.prototype.$MercuryThreadlistContainer10=function(){this.$MercuryThreadlistContainer2&&this.$MercuryThreadlistContainer24&&this.$MercuryThreadlistContainer2.unsubscribe(this.$MercuryThreadlistContainer24)};o.prototype.$MercuryThreadlistContainer11=function(){this.$MercuryThreadlistContainer1&&this.$MercuryThreadlistContainer22&&this.$MercuryThreadlistContainer1.unsubscribe(this.$MercuryThreadlistContainer22.subscriberID,this.$MercuryThreadlistContainer22.folder,this.$MercuryThreadlistContainer22.filter)};o.propTypes={ChildClass:j.func.isRequired,filter:j.string.isRequired,folder:j.string.isRequired,onMessageRequestsClick:j.func,onRenderThreads:j.func,onDataFetchStart:j.func,onDataFetchEnd:j.func,onAggregationClick:j.func,showCount:j.bool,showPresence:j.bool,source:j.string,threadCount:j.number,threadIDs:j.array,viewer:j.string.isRequired,onRenderBackArrow:j.func,resetAggregatedThreads:j.bool};o.defaultProps={source:c("MercuryAPIArgsSource").JEWEL};f.exports=o}),null);
__d("MessengerRecentContainer.react",["MercuryAPIArgsSource","MercuryThreadlistContainer.react","MessengerComposerSteps","MessengerComposerStore","MessengerThreadlistReact.bs","PureStoreBasedStateMixin","React"],(function a(b,c,d,e,f,g){"use strict";var h=c("MessengerThreadlistReact.bs").jsComponent,i=c("React").PropTypes,j=c("React").createClass({displayName:"MessengerRecentContainer",mixins:[c("PureStoreBasedStateMixin")(c("MessengerComposerStore"))],propTypes:{activeThreadID:i.string,filter:i.string.isRequired,folder:i.string.isRequired,viewer:i.string.isRequired,onAggregationClick:i.func,onRenderBackArrow:i.func,resetAggregatedThreads:i.bool},statics:{calculateState:function k(){return{isComposing:c("MessengerComposerStore").getState().step!==c("MessengerComposerSteps").NULL}}},render:function k(){return c("React").createElement(c("MercuryThreadlistContainer.react"),{ChildClass:h,activeThreadID:this.props.activeThreadID,filter:this.props.filter,folder:this.props.folder,isComposing:this.state.isComposing,onAggregationClick:this.props.onAggregationClick,onRenderBackArrow:this.props.onRenderBackArrow,resetAggregatedThreads:this.props.resetAggregatedThreads,isNewMessageActive:this.props.isNewMessageActive,source:c("MercuryAPIArgsSource").WEBMESSENGER,viewer:this.props.viewer})}});f.exports=j}),null);
__d("MessengerSearchContainer.react",["cx","fbt","Link.react","MessengerActions","MessengerSpinner.react","MessengerThreadlistReact.bs","MessengerThreadSearchActions","MessengerThreadSearchStore","MessengerView","React","StoreAndPropBasedStateMixin","emptyFunction"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j=c("MessengerThreadlistReact.bs").jsComponent,k=c("React").PropTypes,l=c("React").createClass({displayName:"MessengerSearchContainer",mixins:[c("StoreAndPropBasedStateMixin")(c("MessengerThreadSearchStore"))],propTypes:{activeThreadID:k.string,filter:k.string.isRequired,folder:k.string.isRequired,isComposing:k.bool,isLoaded:k.bool,isLoading:k.bool,isNewMessageActive:k.bool,viewer:k.string.isRequired},statics:{calculateState:function m(n){var o=c("MessengerThreadSearchStore").getState();return{threads:o.threads?o.threads.toArray():[],threadsExhausted:o.threadsExhausted,loading:o.loading,query:o.query}}},_subscriptions:null,render:function m(){return c("React").createElement(j,babelHelpers["extends"]({},this.props,{clearQuery:this._handleClear,isLoaded:!this.state.loading&&!!this.state.threads,isLoading:this.state.loading,isSearching:false,newMessageRequestThreads:[],onLoadMoreRequest:c("MessengerThreadSearchActions").loadMoreThreads,onQuery:c("MessengerActions").changeQueryAll,onSearchResults:c("emptyFunction"),p2pJewelBannerContainer:null,queryString:this.state.query,renderLoadMore:this._renderLoadMoreLink,threads:this.state.threads}))},_renderLoadMoreLink:function m(){if(this.state.threadsExhausted)return c("React").createElement("div",{className:"_19hf"},c("React").createElement(c("Link.react"),{href:"#",onClick:this._handleClear},i._("No conversations found")));if(this.state.loading)return c("React").createElement("div",{className:"_19hf"},c("React").createElement(c("MessengerSpinner.react"),null));return c("React").createElement("div",{className:"_19hf"},c("React").createElement(c("Link.react"),{href:"#",onClick:c("MessengerThreadSearchActions").loadMoreThreads,tabIndex:-1},i._("Load More")))},_handleClear:function m(){c("MessengerActions").changeMasterView(c("MessengerView").MASTER.RECENT)}});f.exports=l}),null);
__d("MessengerMasterView.react",["cx","BootloadOnRender.react","JSResource","LazyComponent.react","MessengerActions","MessengerRecentContainer.react","MessengerSearchContainer.react","MessengerSpinner.react","MessengerStateStore","MessengerView","React","MessengerMasterViewHeaderReact.bs"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i,j,k=c("MessengerMasterViewHeaderReact.bs").jsComponent,l=c("React").PropTypes;i=babelHelpers.inherits(m,c("React").PureComponent);j=i&&i.prototype;function m(){var n,o;for(var p=arguments.length,q=Array(p),r=0;r<p;r++)q[r]=arguments[r];return o=(n=j.constructor).call.apply(n,[this].concat(q)),this.state={aggregationView:false,resetAggregatedThreads:false,threadIDs:[]},this.$MessengerMasterView1=function(s,t){this.setState({aggregationView:true,resetAggregatedThreads:false,threadIDs:t})}.bind(this),this.$MessengerMasterView2=function(){this.setState({aggregationView:false,resetAggregatedThreads:true},function(){c("MessengerActions").selectAggregation(null)})}.bind(this),this.$MessengerMasterView3=function(){this.setState({aggregationView:true,resetAggregatedThreads:false})}.bind(this),o}m.prototype.componentDidMount=function(){var n=c("MessengerStateStore").getState().threadIDs;if(n)this.setState({threadIDs:n,aggregationView:true})};m.prototype.$MessengerMasterView4=function(){var n=this.props.detailView===c("MessengerView").DETAIL.COMPOSE;switch(this.props.view){case c("MessengerView").MASTER.PEOPLE:return c("React").createElement(c("BootloadOnRender.react"),{component:c("React").createElement(c("LazyComponent.react"),{activeThreadID:n?null:this.props.activeThreadID,viewer:this.props.viewer}),loader:c("JSResource")("MessengerPeopleList.react").__setRef("MessengerMasterView.react"),placeholder:c("React").createElement("div",{className:"_2pif",style:{textAlign:"center"}},c("React").createElement(c("MessengerSpinner.react"),null))});case c("MessengerView").MASTER.PAYMENT:case c("MessengerView").MASTER.RECENT:return c("React").createElement(c("MessengerRecentContainer.react"),{activeThreadID:this.props.activeThreadID,filter:this.props.filter,folder:this.props.folder,isNewMessageActive:n,onAggregationClick:this.$MessengerMasterView1,onRenderBackArrow:this.$MessengerMasterView3,resetAggregatedThreads:this.state.resetAggregatedThreads,viewer:this.props.viewer});case c("MessengerView").MASTER.SEARCH:return c("React").createElement(c("MessengerSearchContainer.react"),{activeThreadID:this.props.activeThreadID,filter:this.props.filter,folder:this.props.folder,isNewMessageActive:n,viewer:this.props.viewer});default:throw new Error("Unknown master view: "+this.props.view)}};m.prototype.render=function(){return c("React").createElement("div",null,c("React").createElement(k,{aggregationView:this.state.aggregationView,filter:this.props.filter,folder:this.props.folder,onBackToRecent:this.$MessengerMasterView2,threadIDs:this.state.threadIDs,view:this.props.view,viewer:this.props.viewer}),this.$MessengerMasterView4())};m.propTypes={activeThreadID:l.string,detailView:l.string,filter:l.string,folder:l.string.isRequired,view:l.string.isRequired,viewer:l.string.isRequired};f.exports=m}),null);
__d("MessengerMasterViewReact.bs",["ReasonReact.bs","bs_js_null_undefined","MessengerMasterView.react"],(function a(b,c,d,e,f,g){"use strict";function h(i,j,k,l,m,n,o){return c("ReasonReact.bs").wrapJsForReason(c("MessengerMasterView.react"),{activeThreadID:c("bs_js_null_undefined").from_opt(i),detailView:c("bs_js_null_undefined").from_opt(j),filter:c("bs_js_null_undefined").from_opt(k),folder:l,view:m,viewer:n},o)}g.make=h}),null);
__d("P2PPaymentPickerDialog.react",["cx","fbt","immutable","MessengerDialog.react","MessengerDialogButton.react","MessengerDialogCancelButton.react","MessengerDialogHeader.react","MessengerDialogTitle.react","MessengerGraphQLTokenizer.react","React"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j,k,l=c("React").PropTypes,m=460,n=c("immutable").Set();j=babelHelpers.inherits(o,c("React").Component);k=j&&j.prototype;function o(){__p&&__p();var p,q;for(var r=arguments.length,s=Array(r),t=0;t<r;t++)s[t]=arguments[t];return q=(p=k.constructor).call.apply(p,[this].concat(s)),this.state={entries:c("immutable").Set()},this.$P2PPaymentPickerDialog1=function(){var u=this.state.entries;this.props.handleContinue(u)}.bind(this),this.$P2PPaymentPickerDialog2=function(){var u=this.state.entries;this.props.handleCancel(u)}.bind(this),this.handleAddEntryAttempt=function(u){if(this.props.multiSelect)this.setState({entries:this.state.entries.add(u)});else this.setState({entries:c("immutable").Set.of(u)})}.bind(this),this.handleRemoveEntryAttempt=function(u){this.setState({entries:this.state.entries["delete"](u)})}.bind(this),q}o.prototype.renderHeader=function(){return c("React").createElement(c("MessengerDialogHeader.react"),null,c("React").createElement(c("MessengerDialogCancelButton.react"),null),c("React").createElement(c("MessengerDialogTitle.react"),null,i._("Send Money")),c("React").createElement(c("MessengerDialogButton.react"),{disabled:!this.state.entries.size,label:i._("Continue"),type:"primary",onClick:this.$P2PPaymentPickerDialog1}))};o.prototype.renderTokenizer=function(){return c("React").createElement(c("MessengerGraphQLTokenizer.react"),{autoFocus:true,canViewerSendMoneyFilter:true,className:"_2wsl",context:null,enableMessageSearch:false,entries:this.state.entries.toList(),excludeGroups:true,excludePages:true,forceHideClearButton:true,hasHoverState:false,originalEntryIDs:n,placeholder:i._("Type the name of a person"),scrollableViewClassName:"_2wsm",shouldQueryInternalBot:false,shouldQueryVCEndpoint:false,useLayer:false,viewer:this.props.viewer,width:m,onAddEntryAttempt:this.handleAddEntryAttempt,onClear:null,onRemoveEntryAttempt:this.handleRemoveEntryAttempt})};o.prototype.render=function(){return c("React").createElement(c("MessengerDialog.react"),{className:"_2wsn",type:"default",width:m,onToggle:this.$P2PPaymentPickerDialog2},this.renderHeader(),this.renderTokenizer())};o.propTypes={viewer:l.string.isRequired,handleContinue:l.func.isRequired,handleCancel:l.func.isRequired,multiSelect:l.bool.isRequired};f.exports=o}),null);
__d("MessengerP2PDialogContainer.react",["Bootloader","immutable","MercuryIDs","MercuryOrderedThreadlist","MessagingTag","MessengerActions","MessengerStateStore","MessengerView","P2PActions","P2PDialogContainer.react","P2PPaymentPickerDialog.react","React"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h,i,j=c("React").PropTypes;h=babelHelpers.inherits(k,c("React").Component);i=h&&h.prototype;k.prototype.componentDidMount=function(){var l=c("MessengerStateStore").getState();if(l.detailView===c("MessengerView").DETAIL.PAYFRIENDPICKER)this.$MessengerP2PDialogContainer1();var m=l.extraQueryParams;if(m&&m.id)c("Bootloader").loadModules(["P2PSendMoneyDialogStore"],function(){this.$MessengerP2PDialogContainer2(m)}.bind(this),"MessengerP2PDialogContainer.react")};k.prototype.componentDidUpdate=function(){var l=c("MessengerStateStore").getState();if(l.detailView===c("MessengerView").DETAIL.PAYFRIENDPICKER)this.$MessengerP2PDialogContainer1();var m=c("MessengerStateStore").getState().extraQueryParams;if(m&&m.id)this.$MessengerP2PDialogContainer2(m)};k.prototype.$MessengerP2PDialogContainer1=function(){var l=function l(n){c("P2PActions").hideDialog();var o=n.first().getUniqueID();c("MessengerActions").changeID(o)},m=function(n){c("P2PActions").hideDialog();c("MercuryOrderedThreadlist").getForFBID(this.props.viewer).getThreadlist(0,1,c("MessagingTag").INBOX,function(o){c("MessengerActions").selectThread(o[0])})}.bind(this);c("P2PActions").showDialog(c("P2PPaymentPickerDialog.react"),{viewer:this.props.viewer,handleContinue:l,handleCancel:m,multiSelect:false})};k.prototype.$MessengerP2PDialogContainer2=function(l){var m=c("MercuryIDs").getThreadIDFromUserID(l.id);c("P2PActions").chatSendViewOpened({referrer:"chat",threadID:m,amount:l.a,memoText:l.m})};k.prototype.render=function(){return c("React").createElement(c("P2PDialogContainer.react"),null)};function k(){h.apply(this,arguments)}k.propTypes={viewer:j.string.isRequired};f.exports=k}),null);
__d("MessengerP2PDialogContainerReact.bs",["ReasonReact.bs","MessengerP2PDialogContainer.react"],(function a(b,c,d,e,f,g){"use strict";function h(i,j){return c("ReasonReact.bs").wrapJsForReason(c("MessengerP2PDialogContainer.react"),{viewer:i},j)}g.make=h}),null);
__d("MessengerReasonDialogContainerReact.bs",["bs_list","bs_array","bs_block","bs_curry","React","bs_pervasives","ReasonReact.bs","MessengerDialogs.bs"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h=c("ReasonReact.bs").reducerComponent("MessengerReasonDialogContainer");function i(){__p&&__p();var k=h.slice();k[4]=function(l){c("MessengerDialogs.bs").addHandler(function(m){return c("bs_curry")._1(l[4],[m])});return 0};k[9]=function(l){var m=l[2];if(m)return c("React").createElement("div",undefined,c("bs_array").of_list(c("bs_list").mapi(function(n,o){return c("React").createElement("span",{key:c("bs_pervasives").string_of_int(n)},c("bs_curry")._1(o,0))},c("bs_list").rev(m[0]))));else return null};k[10]=function(){return 0};k[12]=function(l,m){return c("bs_block").__(0,[l[0]])};return k}var j=c("ReasonReact.bs").wrapReasonForJs(h,function(){return i([])});g.component=h;g.make=i;g.jsComponent=j}),null);
__d("PagesPlatformDialogContainerReact.bs",["ReasonReact.bs","PagesPlatformDialogContainer.react"],(function a(b,c,d,e,f,g){"use strict";function h(i){return c("ReasonReact.bs").wrapJsForReason(c("PagesPlatformDialogContainer.react"),{},i)}g.make=h}),null);
__d("MessengerReact.bs",["cx","bs_block","bs_curry","React","Utils.bs","CurrentUser","ReasonReact.bs","bs_js_primitive","MessengerState.bs","MessengerStateStore","MessengerBannerReact.bs","MessengerBugNubReact.bs","MessengerDetailViewReact.bs","MessengerMasterViewReact.bs","MessengerErrorBoundaryReact.bs","FBPaymentsDialogContainerReact.bs","MNCommerceDialogContainerReact.bs","MessengerP2PDialogContainerReact.bs","PagesPlatformDialogContainerReact.bs","MessengerReasonDialogContainerReact.bs"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();function i(m){m.preventDefault();return 0}var j=c("ReasonReact.bs").reducerComponent("MessengerReact");function k(m,n,o,p,q,r){__p&&__p();var s=j.slice();s[4]=function(){c("bs_curry")._1(q,0);return 0};s[9]=function(t){var u=t[2];return c("ReasonReact.bs").element(0,0,c("MessengerState.bs").Root[0](c("CurrentUser").getID(),function(t){var v=+c("CurrentUser").isEmployee();return c("React").createElement("div",{className:"_li"},c("ReasonReact.bs").element(0,0,c("MessengerBannerReact.bs").make(n,p,o,[])),c("React").createElement("div",{className:"_4sp8",onDragEnter:i,onDragOver:i,onDrop:i},c("React").createElement("div",{className:"_1enh"},c("ReasonReact.bs").element(0,0,c("MessengerErrorBoundaryReact.bs").make(0,["conversation list"],[c("ReasonReact.bs").element(0,0,c("MessengerMasterViewReact.bs").make(c("bs_js_primitive").null_undefined_to_opt(u.activeThreadID),c("bs_js_primitive").null_undefined_to_opt(u.detailView),[u.filter],u.folder,u.masterView,c("CurrentUser").getID(),[]))])),v!==0?c("ReasonReact.bs").element(0,0,c("MessengerBugNubReact.bs").make([m?c("Utils.bs").isTruthy(m[0].isBetaEnabled):0],m?[m[0].unixName]:0,[])):null),c("ReasonReact.bs").element(0,0,c("MessengerDetailViewReact.bs").make(c("bs_js_primitive").null_undefined_to_opt(u.activeThreadID),t[0],c("bs_js_primitive").null_undefined_to_opt(u.mid),c("bs_js_primitive").null_undefined_to_opt(u.query),c("bs_js_primitive").null_undefined_to_opt(u.detailView),c("CurrentUser").getID(),[]))),c("ReasonReact.bs").element(0,0,c("MessengerReasonDialogContainerReact.bs").make([])),c("ReasonReact.bs").element(0,0,c("MNCommerceDialogContainerReact.bs").make([])),c("ReasonReact.bs").element(0,0,c("MessengerP2PDialogContainerReact.bs").make(c("CurrentUser").getID(),[])),c("ReasonReact.bs").element(0,0,c("PagesPlatformDialogContainerReact.bs").make([])),c("ReasonReact.bs").element(0,0,c("FBPaymentsDialogContainerReact.bs").make([])))}))};s[10]=function(){return c("MessengerStateStore").getState()};s[12]=function(r,t){return c("bs_block").__(0,[c("MessengerStateStore").getState()])};s[13]=function(t){return[[function(){c("MessengerStateStore").addListener("change",function(){return c("bs_curry")._1(t[4],0)});return 0},function(){c("MessengerStateStore").destroy();return 0}],0]};return s}var l=c("ReasonReact.bs").wrapReasonForJs(j,function(m){return k(c("bs_js_primitive").null_undefined_to_opt(m.employeeData),+m.showWorkchatUpsellBanner,c("Utils.bs").nullUndefinedBooleanToOptionBool(m.isFirstRedirect),c("bs_js_primitive").null_undefined_to_opt(m.promotionData),m.onMount,[])});g.preventDefault=i;g.component=j;g.make=k;g.jsComponent=l}),null);
__d("MessengerSearchConfirmationDialogReact.bs",["fbt","ReasonReact.bs","MessengerDialogs.bs","MessengerDialogReact.bs"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i=c("ReasonReact.bs").statelessComponent("MessengerSearchConfirmationDialog");function j(m){if(m)return 0;else return c("MessengerDialogs.bs").removeDialog(0)}function k(m,n,o){var p=i.slice();p[9]=function(){return c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Dialog[0](0,j,0,0,0,0,0,[c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Header[0](0,0,h._("Search for \"{term}\"?",[h.param("term",n)]))),c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Footer[0](0,0,[c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Button[0]([2],[h._("OK")],0,0,[m],[0],0,0,[])),c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").CancelButton[0](0,[]))]))]))};return p}var l=c("ReasonReact.bs").wrapReasonForJs(i,function(m){return k(m.onSearch,m.term,[])});g.component=i;g.handleToggle=j;g.make=k;g.jsComponent=l}),null);
__d("MessengerURIListener",["MessengerActions","MessengerURISerializer","PageTransitions"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h=false,i={start:function k(){if(!h)c("PageTransitions").registerHandler(j,6);h=true},stop:function k(){c("PageTransitions").removeHandler(j,6);h=false}};function j(k){var l=c("MessengerURISerializer").deserialize(k);if(l.notMessenger)return false;c("PageTransitions").transitionComplete();c("MessengerActions").changeState(l);return true}f.exports=i}),null);
__d("MessengerMount",["cx","Bootloader","CSS","ChannelConnection","ChannelManager","CurrentUser","HotLikeSound","InstantGamesGateKeepers","MercuryWorkTopGroupThreads","MercuryBlockedParticipants.bs","MercuryIgnoredParticipants.bs","MercuryDelayedRoger","MercuryDeliveryState","MercuryOrderedThreadlist","MercuryParticipants","MercuryServerPayloadPreprocessor","MercurySyncEnvironment","MercuryThreads","MercuryThreadIDMap","MercuryUnreadState","MercuryUnseenState","MessengerReact.bs","MessengerActions","MessengerAsyncWrapper","MessengerDialogs.bs","MessengerAttributionTagsStore","MessengerComposerActions","MessengerBrowserAlerts","MessengerComposerStore","MessengerConfig","MessengerEnvironment","MessengerInitialDataTransformer.bs","MessengerMDotMeReferralStore","MessengerPage","MessengerRTCMessageHandler","MessengerSettingsStore","MessengerSearchConfirmationDialogReact.bs","MessengerStateStore","MessengerThreadSearchStore","MessengerURIListener","MessengerURIConstants","MessengerURISerializer","MessengerView","MNPlatformTagsDataManager","React","ReactDOM","URI","gkx","goURI","OrderedFriendsList","PageHooks"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i=c("MercuryDelayedRoger").get(),j=c("MessengerReact.bs").jsComponent,k=c("MessengerSearchConfirmationDialogReact.bs").jsComponent;c("OrderedFriendsList");c("PageHooks");c("ChannelManager").startChannelManager();var l={mount:function q(r,s){__p&&__p();c("MessengerEnvironment").setMessengerUI(true);c("MessengerPage").emit(c("MessengerPage").Events.JS_LOADED);var t=c("CurrentUser").getID();m(t);n(t);o(t,s);c("MessengerPage").emit(c("MessengerPage").Events.DATA_INITIALIZED);var u=document.documentElement;if(u)c("CSS").addClass(u,"_51l0");if(document.body){var v=document.body;c("CSS").addClass(v,"_z4_");if(c("MessengerConfig").SFFontEnabled)c("CSS").addClass(v,"__6g");if(c("MessengerConfig").SegoeUIDisabled)c("CSS").addClass(v,"_2por");if(c("MessengerEnvironment").facebookdotcom)c("CSS").addClass(v,"_mvg")}c("HotLikeSound").setCheckSoundEnabledFunc(function(){return c("MessengerSettingsStore").getSettings().sound_enabled});c("ReactDOM").render(c("React").createElement(c("MessengerAsyncWrapper"),null,c("React").createElement(j,{employeeData:s.employeeData,facebookNotificationTokens:s.facebookNotificationTokens,showWorkchatUpsellBanner:s.showWorkchatUpsellBanner,promotionData:s.promotionData,isFirstRedirect:!c("gkx")("AT71LRcbgltkBEoVFCCCdNV29c5_0WezosqmKxl4WEXk8XQNpOgP_oLFicsbGWor0e-3lTCNH9el3cQIDbyD2Ry3"),viewer:t,onMount:function w(){return p(s)}})),r)}};function m(q){__p&&__p();i;c("MercuryDeliveryState").getForFBID(q);c("MercuryOrderedThreadlist").getForFBID(q);c("MercuryParticipants");c("MercuryBlockedParticipants.bs").getForFBID(q);c("MercuryIgnoredParticipants.bs").getForFBID(q);c("MercuryThreads").getForFBID(q);c("MercuryUnreadState").getForFBID(q);c("MercuryUnseenState").getForFBID(q);if(c("gkx")("AT58O0ueTgrNywfhkMH9fYHs8_paoL8Uj3nAzEseDtJbi75rIYW1Jld0CDq2Sj1iPDsNcWsScyu5Jv7kTxxdRT_i"))c("MercuryWorkTopGroupThreads").getForFBID(q);c("MessengerAttributionTagsStore");c("MessengerComposerStore");c("MessengerMDotMeReferralStore");c("MessengerSettingsStore");c("MessengerStateStore");c("MessengerThreadSearchStore").getForFBID(q)}function n(q){c("MessengerURIListener").start();c("MercurySyncEnvironment").setUp();c("MessengerBrowserAlerts").init(q);c("MessengerRTCMessageHandler").init();c("ChannelConnection")}function o(q,r){__p&&__p();var s,t=c("MercuryServerPayloadPreprocessor").getForFBID(q),u=r.lastReadThreadKey;if(r.graphqlPayload){var v=c("MessengerInitialDataTransformer.bs").transform(r.graphqlPayload),w=v[0];u=v[1];w.message_blocked_ids=r.mercuryPayload.message_blocked_ids;w.message_ignored_ids=r.mercuryPayload.message_ignored_ids;t.handleUpdate(w)}else t.handleUpdate(r.mercuryPayload);var x=new(c("URI"))(window.location.href),y=c("MessengerURISerializer").deserialize(x);if(y.query)(function(){var B=y.masterView===c("MessengerView").MASTER.SEARCH,C=y.query;y.query=null;y.masterView=c("MessengerView").MASTER.RECENT;c("MessengerDialogs.bs").showDialog(function(){return c("React").createElement(k,{term:C,onSearch:function D(){c("MessengerDialogs.bs").removeAllDialogs();B?c("MessengerActions").changeQueryAll(C):c("MessengerActions").changeQuery(C)}})})})();c("goURI")(c("MessengerURISerializer").serialize(y),false,true);if(x.getPath().match(c("MessengerURIConstants").COMPOSE_SUBPATH+"/?$"))return;if(y.masterView===c("MessengerView").MASTER.PAYMENT)return;c("MessengerActions").changeMDotMeReferral(r.mDotMeReferral,r.mDotMeReferralThreadKey);var z=c("MercuryThreadIDMap").get(),A=z.getClientIDFromServerIDNow(u);if(A){c("MessengerComposerActions").exitComposeState();c("MessengerActions").selectThread(A)}else if(x.getPath()==="/")c("MessengerActions").changeDetailView(c("MessengerView").DETAIL.COMPOSE);c("MNPlatformTagsDataManager").updateThreadTabAfterSelectThread(r.messagingSource,r.mDotMeReferralThreadKey&&r.mDotMeReferralThreadKey.toString())}function p(q){__p&&__p();c("MessengerPage").emit(c("MessengerPage").Events.APP_MOUNTED);if(q.gameData&&q.gameData.gameID&&c("InstantGamesGateKeepers").messenger_dot_com_shareable_link_open_game)c("Bootloader").loadModules(["MessengerGamesQuicksilverPlayerContainer.react","InstantGameContextType","QuicksilverSources"],function(r,s,t){var u=null,v=s.SOLO;if(q.gameData.contextSourceID){u=q.gameData.contextSourceID;v=s.THREAD}c("MessengerDialogs.bs").showDialog(function(){return c("React").createElement(r,{contextSourceID:u,contextType:v,onHide:function w(){return c("MessengerDialogs.bs").removeAllDialogs()},gameID:q.gameData.gameID,source:t.M_ME_LINK,sourceID:null})})},"MessengerMount")}f.exports=l}),null);