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

__d("EventPlanExperiment",["EventRemindersGating","QE2Logger"],(function a(b,c,d,e,f,g){"use strict";var h="event_plan_entry_point_nux",i={shouldShowEntryPointNuxWithExposure:function j(){c("QE2Logger").logExposureForUser(h);return c("EventRemindersGating").shouldShowEntryPointNux}};f.exports=i}),null);
__d("StickersTypedLogger",["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:StickersLoggerConfig",this.$StickersTypedLogger1,c("Banzai").BASIC)};h.prototype.logVital=function(){c("GeneratedLoggerUtils").log("logger:StickersLoggerConfig",this.$StickersTypedLogger1,c("Banzai").VITAL)};h.prototype.clear=function(){this.$StickersTypedLogger1={};return this};h.prototype.updateData=function(j){this.$StickersTypedLogger1=babelHelpers["extends"]({},this.$StickersTypedLogger1,j);return this};h.prototype.setEvent=function(j){this.$StickersTypedLogger1.event=j;return this};h.prototype.setNumsearchresults=function(j){this.$StickersTypedLogger1.numsearchresults=j;return this};h.prototype.setPackid=function(j){this.$StickersTypedLogger1.packid=j;return this};h.prototype.setPackids=function(j){this.$StickersTypedLogger1.packids=c("GeneratedLoggerUtils").serializeVector(j);return this};h.prototype.setSearchtoken=function(j){this.$StickersTypedLogger1.searchtoken=j;return this};h.prototype.setStickerid=function(j){this.$StickersTypedLogger1.stickerid=j;return this};h.prototype.setTagid=function(j){this.$StickersTypedLogger1.tagid=j;return this};h.prototype.setTriggeredword=function(j){this.$StickersTypedLogger1.triggeredword=j;return this};h.prototype.setTriggerused=function(j){this.$StickersTypedLogger1.triggerused=j;return this};var i={event:true,numsearchresults:true,packid:true,packids:true,searchtoken:true,stickerid:true,tagid:true,triggeredword:true,triggerused:true};f.exports=h}),null);
__d("ChatAnimatedGifs",["URI"],(function a(b,c,d,e,f,g){__p&&__p();var h={shouldHideBody:function i(j){__p&&__p();if(!j.has_attachment)return false;for(var k=0;k<j.attachments.length;k++){var l=j.attachments[k];if(l.preview_url){var m=h.getRawUrlFromSafeUrl(l.preview_url);if(j.body==m)return true}}return false},getRawUrlFromSafeUrl:function i(j){return new(c("URI"))(j).getQueryData().url}};f.exports=h}),null);
__d("ChatBubble.react",["cx","DOMDimensions","EmojiOnlyMessage.react","MercuryMessageBody.react","MercuryMessageRenderLocations","MessagingGiftWrap.react","MessengerMathUtils","MessengerSupportedEmojiUtils","React","ReactDOM","joinClasses","messengerCustomColorUtils"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i=c("React").PropTypes,j=2,k=c("React").createClass({displayName:"ChatBubble",_boxWidth:0,propTypes:{insideDecorators:i.arrayOf(i.object),attachments:i.node,body:i.string,className:i.string,customColor:i.string,customLike:i.object,isEmojiLike:i.bool,isFromViewer:i.bool,isGiftWrapped:i.bool,maxWidth:i.number.isRequired,message:i.object,metaRanges:i.array,onUnwrap:i.func,ranges:i.array,threadCustomColor:i.string,threadID:i.string},getInitialState:function l(){return{emojis:undefined,bubbleWidth:null}},componentDidMount:function l(){if(this.props.attachments&&!this.props.isEmojiLike)return;if(!this.props.emojis){var m=this.props.body||"",n=c("MessengerSupportedEmojiUtils").getEmojiOnlyContents(m);if(n&&n.length)this.setState({emojis:n})}this._restyleBubble(this.props)},componentDidUpdate:function l(m){if(m.maxWidth!==this.props.maxWidth||m.body!==this.props.body||!m.attachments&&this.props.attachments)this._restyleBubble(m)},render:function l(){__p&&__p();var m=this.props,n=m.attachments,o=m.body,p=o===undefined?"":o,q=m.className,r=m.insideDecorators,s=m.maxWidth,t=babelHelpers.objectWithoutProperties(m,["attachments","body","className","insideDecorators","maxWidth"]),u=Object.assign({},t);delete u.customColor;delete u.customLike;delete u.isEmojiLike;delete u.isFromViewer;delete u.message;delete u.metaRanges;delete u.ranges;delete u.threadCustomColor;delete u.threadID;return c("React").createElement("div",babelHelpers["extends"]({},u,{className:c("joinClasses")("_5w1r"+(!this.state.emojis?" _3_om":"")+(!!this.state.emojis?" _31xx":""),q),ref:"bubble",style:{maxWidth:s,width:this.state.emojis?null:this.state.bubbleWidth,wordWrap:p.length>=15?"break-word":"inherit"}}),c("React").createElement("div",{className:"_4gx_",ref:"inner"},this._renderContent(),n),r,this.props.isGiftWrapped?c("React").createElement(c("MessagingGiftWrap.react"),{onUnwrap:this.props.onUnwrap}):null)},_renderContent:function l(){__p&&__p();if(!this.props.body||this.props.isEmojiLike)return null;var m={},n=null;if(this.state.emojis)n=c("React").createElement(c("EmojiOnlyMessage.react"),{contents:this.state.emojis});else{n=c("React").createElement(c("MercuryMessageBody.react"),{body:this.props.body,ranges:this.props.ranges,metaRanges:this.props.metaRanges,threadID:this.props.threadID,customLike:this.props.customLike,threadCustomColor:this.props.threadCustomColor,isFromViewer:this.props.isFromViewer,renderLocation:c("MercuryMessageRenderLocations").CHAT});if(this.props.customColor)m=c("messengerCustomColorUtils").customBubbleStyle(this.props.customColor,m)}return c("React").createElement("div",{className:"_d97"+(!!this.state.emojis?" _31xy":""),ref:"contentWrapper",style:m},c("React").createElement("span",{className:"_5yl5",ref:"content"},n))},_restyleBubble:function l(m){__p&&__p();if(this.props.attachments||this.props.body!=null&&c("MessengerMathUtils").isMathBlock(this.props.body.trim())){this.setState({bubbleWidth:null});return}var n=c("ReactDOM").findDOMNode(this.refs.bubble);if(m.maxWidth!==this.props.maxWidth||c("DOMDimensions").getElementDimensions(n).width>this.props.maxWidth){var o=this.props.maxWidth;this.setState({bubbleWidth:o},this._shrinkBubble);return}this._shrinkBubble()},_shrinkBubble:function l(){var m=c("ReactDOM").findDOMNode(this.refs.bubble),n=c("DOMDimensions").getElementDimensions(m).width,o=c("ReactDOM").findDOMNode(this.refs.content),p=o?c("DOMDimensions").getElementDimensions(o).width+c("DOMDimensions").measureElementBox(c("ReactDOM").findDOMNode(this.refs.contentWrapper),"width",true,false,false):0,q=p+j;if(p>0&&q<this.props.maxWidth&&n-q-this.getBoxWidth()>0)this.setState({bubbleWidth:q})},contentWraps:function l(){var m=c("ReactDOM").findDOMNode(this.refs.content);if(!m)return false;var n=m.getClientRects(),o=c("DOMDimensions").getElementDimensions(m).height;return n&&n.length>1&&n[0].height<o},getBoxWidth:function l(){if(!this._boxWidth)this._boxWidth=c("DOMDimensions").measureElementBox(c("ReactDOM").findDOMNode(this.refs.bubble),"width",true,true,false);return this._boxWidth}});f.exports=k}),null);
__d("ChatCodePasteUtils",["cx","BanzaiODS","ChatBubble.react","React"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i=/`{3,}/;function j(l){return!!(l&&i.test(l)&&l.split("\n").length>1)}function k(l,m,n,o,p){__p&&__p();var q=l.split(i),r=[];for(var s=0;s<q.length;s+=2){var t=q[s].trim();if(t)r.push(c("React").createElement("div",{key:s,className:"_5wde _n4o"},c("React").createElement(c("ChatBubble.react"),{body:t,customColor:p||undefined,className:"clearfix _5wdf",maxWidth:m,ranges:n||undefined,threadID:o||undefined})));if(s+1<q.length&&q[s+1]){var u=q[s+1].split("\n"),v=u[0].replace(/[^a-zA-Z]+/g,""),w=u.slice(1).join("\n");c("BanzaiODS").bumpEntityKey("chat_code_paste","render_bubble");r.push(c("React").createElement("div",{key:s+1,className:"_5wde _n4o"},c("React").createElement("div",{ref:"bubble",className:"_3_om _4yng _5wdf"},c("React").createElement("div",{ref:"syntaxTarget"+s,className:"language-"+v},w))))}}return r}f.exports={containsCodeBlock:j,getCodeAndMessageBubbles:k}}),null);
__d("ChatTabBlinking",["cx","CSS","setIntervalAcrossTransitions"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i=600,j="highlightTitle",k={_blinkMap:{},_interval:null,_isHighlighting:false,blinkTab:function l(m,n){if(!this._blinkMap[m])this._blinkMap[m]={view:n,elem:n.getTabElem()};this.checkInterval()},unblinkTab:function l(m){if(this._blinkMap[m]){var n=this._blinkMap[m].elem;if(n)c("CSS").removeClass(n,j);delete this._blinkMap[m]}this.checkInterval()},checkInterval:function l(){var m=Object.keys(this._blinkMap).length;if(m>0){if(!this._interval)this._interval=c("setIntervalAcrossTransitions")(this._toggleBlinkHighlight.bind(this),i)}else if(this._interval){clearInterval(this._interval);this._interval=null}},_toggleBlinkHighlight:function l(){this._isHighlighting=!this._isHighlighting;for(var m in this._blinkMap)if(Object.prototype.hasOwnProperty.call(this._blinkMap,m)){var n=this._blinkMap[m],o=n.elem,p=n.view;if(o&&o.parentNode&&!p.isFocused()&&!p.isHovered())c("CSS").conditionClass(o,j,this._isHighlighting);else this.unblinkTab(m)}}};f.exports=k}),null);
__d("ChatCloseButton.react",["cx","fbt","Link.react","React","TrackingNodes","joinClasses"],(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(){var n=c("TrackingNodes").getTrackingInfo(c("TrackingNodes").types.CLOSE_BUTTON),o=i._("Press Esc to close"),p=i._("Close tab"),q="_4vu4";return c("React").createElement(c("Link.react"),{"aria-label":this.props.active?o:p,className:c("joinClasses")(this.props.className,"close","button",q),"data-ft":n,"data-hover":"tooltip","data-tooltip-content":this.props.active?o:p,"data-tooltip-position":"above",onClick:this.props.onClick,onKeyUp:this.props.onKeyUp,onMouseDown:this.props.onMouseDown})};function m(){j.apply(this,arguments)}m.propTypes={onClick:l.func,onKeyUp:l.func,onMouseDown:l.func,active:l.bool};m.defaultProps={active:false};f.exports=m}),null);
__d("ChatCollapsedLogMessageGroup.react",["cx","fbt","Link.react","React"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j,k;j=babelHelpers.inherits(l,c("React").PureComponent);k=j&&j.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=k.constructor).call.apply(m,[this].concat(p)),this.state={collapsed:true},n}l.prototype.render=function(){var m=i._("See Latest Activity"),n=i._("See Less Activity");return c("React").createElement("div",{className:"_5w0o"},c("React").createElement(c("Link.react"),{className:"_4ea1",onClick:function(){return this.setState({collapsed:!this.state.collapsed})}.bind(this)},this.state.collapsed?m:n),!this.state.collapsed?c("React").createElement("div",null,c("React").createElement("div",{className:"_2zsu"}),this.props.children,c("React").createElement("div",{className:"_2zsu"})):null)};f.exports=l}),null);
__d("ChatComposerFlyoutButtonBootLoader.react",["MercuryBootloadOnInteraction.react","JSResource","LazyComponent.react","AutoFocusableLink.react","React"],(function a(b,c,d,e,f,g){"use strict";var h=function h(i){return c("React").createElement("li",{className:i.interactionClassName},c("React").createElement(c("MercuryBootloadOnInteraction.react"),{component:c("React").createElement(c("LazyComponent.react"),babelHelpers["extends"]({},i,{className:i.iconClassName})),loader:c("JSResource")("MessengerComposerFlyoutButton.react").__setRef("ChatComposerFlyoutButtonBootLoader.react"),placeholder:c("React").createElement(c("AutoFocusableLink.react"),{label:"flyout button",className:i.iconClassName})}))};f.exports=h}),null);
__d("ChatDateBreak.react",["cx","React","formatDate","joinClasses"],(function a(b,c,d,e,f,g,h){__p&&__p();var i,j,k=c("React").PropTypes;i=babelHelpers.inherits(l,c("React").Component);j=i&&i.prototype;l.prototype.shouldComponentUpdate=function(m){"use strict";return this.props.date.getTime()!==m.date.getTime()};l.prototype.render=function(){"use strict";var m=c("formatDate")(this.props.date,{today:"g:ia",withinWeek:"D g:ia",thisYear:"M jS, g:ia",older:"m/d/Y g:ia"});return c("React").createElement("time",{className:c("joinClasses")(this.props.className,"_5w-5")},c("React").createElement("span",{className:"_5w-6"},m))};function l(){"use strict";i.apply(this,arguments)}l.propTypes={date:k.instanceOf(Date).isRequired};f.exports=l}),null);
__d("ChatMessage.react",["cx","fbt","BootloadedComponent.react","ChatAnimatedGifs","ChatBubble.react","EmojiLikeUtils","FluxContainer","MercuryTimestamp","CSS","immutable","ImmutableObject","Locale","JSResource","MercuryAttachment","MercuryConfig","MercuryErrorInfo","MercuryIDs","MercuryMessageCustomizations","MercuryMessageError.react","MercuryMessageInfo","MessageBorderType","MessageCustomizationType","MessagingGiftWrapChecker","MessengerDecorator","MessengerInnerDecorators.react","MessengerVideoAutoplayStore","ChatCodePasteUtils","MNCommerceMessageType","MercuryDisplayTimeFilterMessageRenderer","React","ReactDOM","TooltipData","XUISpinner.react","convertMIGColorToFIGColor","isRTL","joinClasses","gkx"],(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").Component);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.state={isVisible:false},this.$ChatMessage1=function(){return this.setState({hovered:true})}.bind(this),this.$ChatMessage2=function(){return this.setState({hovered:false})}.bind(this),o}m.getStores=function(){return[c("MessengerVideoAutoplayStore")]};m.calculateState=function(n,o){return{isVisible:c("MessengerVideoAutoplayStore").isVisible(o.message.thread_id,o.message.message_id)}};m.prototype.componentDidMount=function(){c("CSS").conditionClass(c("ReactDOM").findDOMNode(this),"_2cnu",this.isOneLine())};m.prototype.isOneLine=function(){var n=this.props.message;return c("MercuryMessageInfo").isInbound(n)&&!this.refs.attachmentsInside&&this.refs.bubble&&!this.refs.bubble.contentWraps()};m.prototype.shouldComponentUpdate=function(n,o){var p=n.message!==this.props.message,q=false,r=false,s=this.props.thread;if(s){q=s.custom_like_icon!==n.thread.custom_like_icon;r=s.custom_color!==n.thread.custom_color}else if(n.thread)return true;return p||q||r||o.isVisible!==this.state.isVisible};m.prototype.render=function(){var n=this.props.message,o=c("MercuryAttachment").get(n).length>0,p=c("MercuryMessageInfo").isInbound(n),q=c("MercuryIDs").isGroupChat(n.thread_id),r=c("MercuryErrorInfo").hasErrorStatus(n),s="_5wd4"+(p?" _1nc7":"")+(!p?" _1nc6":"")+(o?" _2_-t":"")+(p&&q?" _5ysy":"")+(r?" _1zcs":""),t=this.props,u=t.isFromViewer,v=t.participants,w=[],x=n;if(x)c("MessengerDecorator").getBeforeDecorators().forEach(function(y){if(y.check(x))w.push(y.render(x,u))});return c("React").createElement("div",{className:c("joinClasses")(this.props.className,s),onMouseEnter:this.$ChatMessage1,onMouseLeave:this.$ChatMessage2},c("React").createElement("div",{className:"_h8t"},w,this.$ChatMessage3()),c("React").createElement(c("MessengerInnerDecorators.react"),{message:n,isFromViewer:this.props.isFromViewer||false,hovered:this.state.hovered,messageProps:this.props}),this.$ChatMessage4(x,u),this.$ChatMessage5())};m.prototype.$ChatMessage3=function(){var n=this.props.message,o={};if(c("MercuryMessageInfo").isOutbound(n)){var p=i._("{time}",[i.param("time",c("MercuryTimestamp").getPreciseTimestamp(n.timestamp))]);Object.assign(o,c("TooltipData").propsFor(p,"right"))}if(n.is_filtered_content)return c("React").createElement("div",babelHelpers["extends"]({className:"_5wd9 _5wdc uiBoxYellow clearfix",ref:"inner"},o),c("MercuryDisplayTimeFilterMessageRenderer").renderFilteredContent(n));var q=this.$ChatMessage6("outside"),r=n.body&&n.body!==""?c("isRTL")(n.body):c("Locale").isRTL();return c("React").createElement("div",babelHelpers["extends"]({className:"_5wd9"+(r?" direction_rtl":"")+(!r?" direction_ltr":""),ref:"inner"},o),this.$ChatMessage7(!q),q)};m.prototype.$ChatMessage4=function(n,o){__p&&__p();var p,q=this;if(n){var p=function(){__p&&__p();var r=[],s=[];c("MessengerDecorator").getAfterExternalDecorators().forEach(function(u){if(n&&u.check(n)){r.push(u.render(n,o,this.props));s.push(u.getAdditionalClassNames())}}.bind(q));if(s.length===0&&r.length===0)return{v:null};var t=s.join(" ");return{v:c("React").createElement("div",{className:c("joinClasses")(t,"_5ijz"+(!o?" isFromOther":""))},r)}}();if(typeof p==="object")return p.v}return null};m.prototype.$ChatMessage5=function(){var n=this.props.message;if(n.is_filtered_content||!c("MercuryMessageInfo").hasError(n))return null;return c("React").createElement("div",{className:"_3ry4",ref:"undertext"},c("React").createElement(c("MercuryMessageError.react"),{className:"_5wda clearfix",message:n,ref:"status"}),this.$ChatMessage8())};m.prototype.$ChatMessage8=function(){return this.props.message.is_spoof_warning?c("React").createElement(c("BootloadedComponent.react"),{bootloadPlaceholder:c("React").createElement("span",null),bootloadLoader:c("JSResource")("MercurySpoofWarning.react").__setRef("ChatMessage.react"),authorID:this.props.message.author,className:"_5wdb"}):null};m.prototype.$ChatMessage9=function(){return c("React").createElement("div",{style:{padding:"20px",text_align:"center"}},c("React").createElement(c("XUISpinner.react"),null))};m.prototype.$ChatMessage6=function(n){__p&&__p();if(this.props.message.commerce_message_type===c("MNCommerceMessageType").RIDE_INTENT)return null;var o=this.props.message,p=this.props.thread?this.props.thread.custom_like_icon:null,q=n=="inside"?"attachmentsInside":"attachmentsOutside",r=c("MercuryAttachment").get(o).filter(function(v){var w=c("MercuryAttachment").isBubblePreferred(v);return w&&n==="inside"||!w&&n==="outside"}),s=this.props.thread?c("convertMIGColorToFIGColor")(this.props.thread.custom_color):"",t=[],u=[];if(n==="outside"&&o)c("MessengerDecorator").getAfterDecorators().forEach(function(v){if(v.check(o,this.props.isFromViewer)){t.push(v.render(o,this.props.isFromViewer,this.props,this.state.hovered));u.push(v.getAdditionalClassNames())}}.bind(this));if(r.length>0)return c("React").createElement(c("BootloadedComponent.react"),{bootloadPlaceholder:this.$ChatMessage9(),bootloadLoader:c("JSResource")("MercuryAttachments.react").__setRef("ChatMessage.react"),className:c("joinClasses")((n==="outside"?"_3e7u":"")+(!!o.body?" _16ys":"")+(!!s?" _3al":"")+" _n4o",u),attachments:r,customLike:p,customColor:s,hasFlowerBorder:c("gkx")("AT7rTubr3N_DsfglfGkvVFG3tMrhGme9-eELltAXoSOKkQuD-9JepjOeFPMl1e8XndLLgVmcw1EaaNThD3K6r4QJpohV9bITGr6_ur1k_X_RGQ")&&c("MercuryMessageCustomizations").getCustomizationValue(o,c("MessageCustomizationType").BORDER)===c("MessageBorderType").FLOWERS&&n==="outside",isChat:true,isGiftWrapped:c("MessagingGiftWrapChecker").shouldRenderWithGiftWrap(o)&&n==="outside",afterDecorators:t,isVisible:this.state.isVisible,maxWidth:this.props.maxBubbleWidth,message:o,onUnwrap:this.$ChatMessage10,onAttachmentLoad:this.props.onAttachmentLoad,onStickerClick:this.props.onStickerClick,ref:q});return null};m.prototype.$ChatMessage7=function(n){__p&&__p();var o=this.props,p=o.isFromViewer,q=o.message,r=o.thread,s=q.body,t=this.$ChatMessage6("inside"),u=[],v=[],w=[],x=q;if(x){if(n)c("MessengerDecorator").getAfterDecorators().forEach(function(B){if(B.check(x,p)){u.push(B.render(x,p,this.props));v.push(B.getAdditionalClassNames())}}.bind(this));c("MessengerDecorator").getInsideDecorators().forEach(function(B){if(B.check(x,p)){w.push(B.render(x,p,this.props));v.push(B.getAdditionalClassNames())}}.bind(this));c("MessengerDecorator").getBeforeDecorators().forEach(function(B){if(B.check(x,p))v.push(B.getAdditionalClassNames())})}var y=v.join(" ");if(c("ChatAnimatedGifs").shouldHideBody(q))s="";var z=q.ranges;if(q.profile_ranges&&q.profile_ranges.length)z=(z||[]).concat(q.profile_ranges.map(function(B){return babelHelpers["extends"]({},B,{url:"/"+B.id})}));var A=c("ChatCodePasteUtils").containsCodeBlock(s);if(s||t)return c("React").createElement("div",{className:c("joinClasses")(y,"_5wde _n4o")},!A?c("React").createElement(c("ChatBubble.react"),{attachments:t,body:s,className:"_5wdf",insideDecorators:w,isEmojiLike:c("EmojiLikeUtils").isEmojiLike(q),isFromViewer:this.props.isFromViewer,metaRanges:q.meta_ranges,message:q,maxWidth:this.props.maxBubbleWidth,ranges:z,ref:"bubble",threadID:q.thread_id,customLike:q.customLike,customColor:r&&p?c("convertMIGColorToFIGColor")(r.custom_color):"",threadCustomColor:r&&c("convertMIGColorToFIGColor")(r.custom_color)}):c("React").createElement(c("BootloadedComponent.react"),{bootloadPlaceholder:c("React").createElement("div",{style:{height:22}}),bootloadLoader:c("JSResource")("ChatCodeBubble.react").__setRef("ChatMessage.react"),body:s,className:"_5wdf",maxWidth:this.props.maxBubbleWidth,ranges:z,threadID:q.thread_id,customColor:r&&p?c("convertMIGColorToFIGColor")(r.custom_color):""}),u);return null};m.propTypes={message:l.instanceOf(c("ImmutableObject")).isRequired,maxBubbleWidth:l.number.isRequired,onAttachmentLoad:l.func,onStickerClick:l.func,participants:l.instanceOf(c("immutable").Map).isRequired,readReceipts:l.instanceOf(c("immutable").OrderedMap).isRequired,thread:l.instanceOf(c("ImmutableObject"))};f.exports=c("FluxContainer").create(m,{withProps:true})}),null);
__d("ChatMessageGroup.react",["cx","fbt","ChatConfig","ChatDateBreak.react","ChatMessage.react","CurrentUser","Image.react","immutable","ImmutableObject","MercuryConfig","MercuryIDs","MercuryParticipants","MercuryTimestamp","MessengerTextWithEmoticons.react","React","ReactDOM","StoreAndPropBasedStateMixin","QE2Logger"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j=c("immutable").OrderedMap,k=c("React").PropTypes,l=new(c("ImmutableObject"))({name:"",href:"#",image_src:""}),m=c("ChatConfig").get("chattab_rounded_profile",false),n=c("React").createClass({displayName:"ChatMessageGroup",mixins:[c("StoreAndPropBasedStateMixin")(c("MercuryParticipants"))],propTypes:{activeMessageID:k.string,author:k.string,hasDateBreak:k.bool,isCanonical:k.bool,isFromViewer:k.bool,isPageMessage:k.bool,isOnline:k.bool,maxBubbleWidth:k.number,messages:k.instanceOf(c("immutable").List).isRequired,readReceipts:k.instanceOf(j).isRequired,onAttachmentLoad:k.func,onStickerClick:k.func,thread:k.instanceOf(c("ImmutableObject")),threadID:k.string},statics:{calculateState:function p(q){return{participants:o(q)}}},componentDidMount:function p(){c("QE2Logger").logExposureForUser("messenger_growth_tombstone")},shouldComponentUpdate:function p(q,r){return this.props.isOnline!==q.isOnline||this.props.activeMessageID!==q.activeMessageID||this.props.isFromViewer!==q.isFromViewer||!c("immutable").is(this.props.messages,q.messages)||!c("immutable").is(this.state.participants,r.participants)||!c("immutable").is(this.props.thread,q.thread)},render:function p(){return c("React").createElement("div",{className:"_4tdt"+(this.props.isFromViewer?" _ua0":"")+(!this.props.isFromViewer?" _ua1":"")+(this._hasSeenHeadsAtBottom()?" _3lil":"")},this._renderProfileColumn(),c("React").createElement("div",{className:"_ua2"},this._renderName(),c("React").createElement("div",{className:"_4tdv"},this._renderMessages())))},_renderProfileColumn:function p(){if(this.props.isFromViewer)return null;var q=this.state.participants.get(this.props.author)||l,r=i._("{name} {time}",[i.param("name",q.name),i.param("time",c("MercuryTimestamp").getPreciseTimestamp(this.props.messages.last().timestamp))]),s=q.image_src?c("React").createElement(c("Image.react"),{src:q.image_src}):null,t=c("MercuryConfig").GDWC&&this.props.isOnline,u=c("CurrentUser").isWorkUser()&&q.is_coworker===false;return c("React").createElement("div",{className:"_31o4"+(m?" _3njy":"")},c("React").createElement("a",{"aria-label":r,className:"_4tdw","data-hover":"tooltip","data-tooltip-content":r,"data-tooltip-position":"left",href:q.href,ref:"link"},s),u?c("React").createElement("div",{className:"_4rwx _4rwy"}):t?c("React").createElement("div",{className:"_sce"}):null)},_renderName:function p(){__p&&__p();if(this.props.isCanonical||this.props.isFromViewer)return null;var q=this.state.participants.get(this.props.messages.first().author);if(!q)return null;var r=q.short_name;if(this.props.thread&&this.props.thread.custom_nickname){var s=c("MercuryIDs").getUserIDFromParticipantID(q.id);if(this.props.thread.custom_nickname[s])r=c("React").createElement(c("MessengerTextWithEmoticons.react"),{renderEmoticons:true,renderEmoji:true,text:this.props.thread.custom_nickname[s]})}return c("React").createElement("div",{className:"_4tdx"},r)},_renderMessages:function p(){var q=this.props.messages.size,r=[];this.props.messages.forEach(function(s,t,u){var v=s.message_id===this.props.activeMessageID;if(v&&!(t===0&&this.props.hasDateBreak))r.push(c("React").createElement(c("ChatDateBreak.react"),{date:new Date(s.timestamp),key:"db:"+s.message_id}));r.push(c("React").createElement(c("ChatMessage.react"),{isFromViewer:this.props.isFromViewer,key:s.message_id,maxBubbleWidth:this.props.maxBubbleWidth,message:s,participants:this.state.participants,readReceipts:this.props.readReceipts,ref:s.message_id,nextTimestamp:this._getNextTimestamp(u,q,t),onAttachmentLoad:this.props.onAttachmentLoad,onStickerClick:this.props.onStickerClick,thread:this.props.thread}))}.bind(this));return r},_hasSeenHeadsAtBottom:function p(){var q=this.props,r=q.messages,s=q.nextTimestamp,t=q.readReceipts,u=r.last().timestamp,v=0;t.forEach(function(w){if(w>=u&&w<s)if(++v===2)return false;return null});return v===2},_getNextTimestamp:function p(q,r,s){return s<r-1?q.get(s+1).timestamp:this.props.nextTimestamp},getMessageElement:function p(q){return c("ReactDOM").findDOMNode(this.refs[q])}});function o(p){return c("immutable").Map().withMutations(function(q){p.readReceipts.forEach(function(r,s){q.set(s,c("MercuryParticipants").getOrFetch(s))});q.set(p.author,c("MercuryParticipants").getOrFetch(p.author))})}f.exports=n}),null);
__d("MercuryMessageRendererUtils",["cx","invariant","HovercardLink","MercuryViewer","MessengerTextWithEmoticons.react","React"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j={getLinkToParticipant:function k(l,m){var n=l.fbid,o=c("HovercardLink").constructEndpoint({id:n}),p=m&&m.custom_nickname&&m.custom_nickname[n];if(p)p=c("React").createElement(c("MessengerTextWithEmoticons.react"),{renderEmoticons:true,renderEmoji:true,text:p});var q=p?p:l.name;if(l.href)return c("React").createElement("a",{className:"_5wzt",href:l.href,"data-hovercard":o},q);return q},moveCurrentUserToFront:function k(){var l=arguments.length<=0||arguments[0]===undefined?[]:arguments[0];l||i(0);var m=l.indexOf(c("MercuryViewer").getID());if(m>0){var n=l.filter(function(o){return o!==c("MercuryViewer").getID()});return[c("MercuryViewer").getID()].concat(n)}return l}};f.exports=j}),null);
__d("MercuryLogMessageRenderer",["cx","fbt","invariant","ix","Bootloader","CSS","Image.react","MercuryAttachmentViewer","MercuryViewer","MercuryLogMessageType","MessagingSourceEnum","MessengerAdminGroupUtils","MessengerLightweightActionUtils","MessengerTextWithEmoticons.react","MercuryParticipants","React","ReactDOM","MercuryMessageRendererUtils","MercuryThreads","TooltipLink.react","UserAgent","convertMIGColorToFIGColor"],(function a(b,c,d,e,f,g,h,i,j,k){"use strict";__p&&__p();var l=c("MercuryThreads").get(),m={renderText:function F(G,H,I,J){__p&&__p();H=H||l.getThreadMetaNow(G.thread_id);if(c("MessengerLightweightActionUtils").isLWAMessage(G)){J(c("MessengerLightweightActionUtils").getCollapsedLWAText(G));return}switch(G.log_message_type){case c("MercuryLogMessageType").SUBSCRIBE:var K=G.author;G.log_message_data||j(0);var L=G.log_message_data.added_participants;L||j(0);var M=L.length===1&&K===L[0];if(M)c("Bootloader").loadModules(["MercuryJoinableMessageRenderer"],function(O){O.renderText(G,H,J)},"MercuryLogMessageRenderer");else p(G,J);break;case c("MercuryLogMessageType").UNSUBSCRIBE:if(c("MessengerAdminGroupUtils").isJoinableThread(H))c("MessengerAdminGroupUtils").isGroupChat(H)?C(G,J):v(G,J);else u(G,J);break;case c("MercuryLogMessageType").THREAD_NAME:if(H&&c("MessengerAdminGroupUtils").isJoinableThread(H))c("MessengerAdminGroupUtils").isGroupChat(H)?D(G,H,J):w(G,H,J);else y(G,H,J);break;case c("MercuryLogMessageType").THREAD_IMAGE:if(H&&c("MessengerAdminGroupUtils").isJoinableThread(H))c("MessengerAdminGroupUtils").isGroupChat(H)?E(G,H,J):z(G,H,J);else A(G,H,J);break;case c("MercuryLogMessageType").WALLPAPER:B(G,J);break;case c("MercuryLogMessageType").GENERIC_ADMIN_TEXT:var N=c("convertMIGColorToFIGColor")(H&&H.custom_color);c("Bootloader").loadModules(["MercuryXMATRenderer"],function(O){J(O.renderText(N,G,I))},"MercuryLogMessageRenderer");break;default:c("Bootloader").loadModules(["MercurySpecialLogMessageRenderer"],function(O){O.renderText(G,J)},"MercuryLogMessageRenderer");break}},renderIcon:function F(G){return c("React").createElement(c("Image.react"),{className:n(G.log_message_type,G.log_message_data),src:k("99239")})},renderLegacy:function F(G,H,I,J){n(J.log_message_type,J.log_message_data).split(" ").forEach(function(K){return K&&c("CSS").addClass(G,K)});this.renderText(J,null,false,function(K){c("ReactDOM").render(c("React").createElement("span",null,K),H)});this.renderAttachmentLegacy(I,J)},renderAttachmentLegacy:function F(G,H){__p&&__p();var I;if(H.log_message_type===c("MercuryLogMessageType").THREAD_IMAGE)(function(){H.log_message_data||j(0);var J=H.log_message_data.image;if(J&&J.preview_url){c("ReactDOM").render(c("React").createElement(c("Image.react"),{className:"_z6a",onClick:function K(){return o(J)},src:J.preview_url}),G);c("CSS").show(G)}})()}};f.exports=m;function n(F,G){var H=!!(G&&G.answered);return"_5wzu"+(F===c("MercuryLogMessageType").SUBSCRIBE?" _5wzj":"")+(F===c("MercuryLogMessageType").UNSUBSCRIBE?" _5wzk":"")+(F===c("MercuryLogMessageType").THREAD_NAME?" _5wzl":"")+(F===c("MercuryLogMessageType").THREAD_IMAGE?" _5wzm":"")+(F===c("MercuryLogMessageType").VIDEO_CALL&&H?" _5wzn":"")+(F===c("MercuryLogMessageType").VIDEO_CALL&&!H?" _5wzo":"")+(F===c("MercuryLogMessageType").PHONE_CALL&&H?" _5wzp":"")+(F===c("MercuryLogMessageType").PHONE_CALL&&!H?" _5wzq":"")+(F===c("MercuryLogMessageType").SERVER_ERROR?" _5wzr":"")+(!F?" _2r5l":"")}function o(F){c("MercuryAttachmentViewer").bootstrapWithConfig({src:F.preview_url,endpoint:F.url,fbid:F.metadata.fbid,dimensions:F.metadata.dimensions,disablePaging:true},null)}function p(F,G){__p&&__p();F.log_message_data||j(0);var H=c("MercuryMessageRendererUtils").moveCurrentUserToFront(F.log_message_data.added_participants);H||j(0);switch(H.length){case 1:q(F,G,H);break;case 2:r(F,G,H);break;case 3:s(F,G,H);break;default:t(F,G,H);break}}function q(F,G,H){var I=[F.author,H[0]];c("MercuryParticipants").getMulti(I,function(J){if(F.author===c("MercuryViewer").getID())G(i._("You added {subscriber1}.",[i.param("subscriber1",c("MercuryMessageRendererUtils").getLinkToParticipant(J[H[0]]))]));else if(H[0]===c("MercuryViewer").getID())G(i._("{actor} added you.",[i.param("actor",c("MercuryMessageRendererUtils").getLinkToParticipant(J[F.author]))]));else G(i._("{actor} added {subscriber1}.",[i.param("actor",c("MercuryMessageRendererUtils").getLinkToParticipant(J[F.author])),i.param("subscriber1",c("MercuryMessageRendererUtils").getLinkToParticipant(J[H[0]]))]))})}function r(F,G,H){var I=[F.author].concat(H);c("MercuryParticipants").getMulti(I,function(J){if(F.author===c("MercuryViewer").getID())G(i._("You added {subscriber1} and {subscriber2}.",[i.param("subscriber1",c("MercuryMessageRendererUtils").getLinkToParticipant(J[H[0]])),i.param("subscriber2",c("MercuryMessageRendererUtils").getLinkToParticipant(J[H[1]]))]));else if(H[0]===c("MercuryViewer").getID())G(i._("{actor} added you and {subscriber2}.",[i.param("actor",c("MercuryMessageRendererUtils").getLinkToParticipant(J[F.author])),i.param("subscriber2",c("MercuryMessageRendererUtils").getLinkToParticipant(J[H[1]]))]));else G(i._("{actor} added {subscriber1} and {subscriber2}.",[i.param("actor",c("MercuryMessageRendererUtils").getLinkToParticipant(J[F.author])),i.param("subscriber1",c("MercuryMessageRendererUtils").getLinkToParticipant(J[H[0]])),i.param("subscriber2",c("MercuryMessageRendererUtils").getLinkToParticipant(J[H[1]]))]))})}function s(F,G,H){var I=[F.author].concat(H);c("MercuryParticipants").getMulti(I,function(J){if(F.author===c("MercuryViewer").getID())G(i._("You added {subscriber1}, {subscriber2} and {subscriber3}.",[i.param("subscriber1",c("MercuryMessageRendererUtils").getLinkToParticipant(J[H[0]])),i.param("subscriber2",c("MercuryMessageRendererUtils").getLinkToParticipant(J[H[1]])),i.param("subscriber3",c("MercuryMessageRendererUtils").getLinkToParticipant(J[H[2]]))]));else if(H[0]===c("MercuryViewer").getID())G(i._("{actor} added you, {subscriber2} and {subscriber3}.",[i.param("actor",c("MercuryMessageRendererUtils").getLinkToParticipant(J[F.author])),i.param("subscriber2",c("MercuryMessageRendererUtils").getLinkToParticipant(J[H[1]])),i.param("subscriber3",c("MercuryMessageRendererUtils").getLinkToParticipant(J[H[2]]))]));else G(i._("{actor} added {subscriber1}, {subscriber2} and {subscriber3}.",[i.param("actor",c("MercuryMessageRendererUtils").getLinkToParticipant(J[F.author])),i.param("subscriber1",c("MercuryMessageRendererUtils").getLinkToParticipant(J[H[0]])),i.param("subscriber2",c("MercuryMessageRendererUtils").getLinkToParticipant(J[H[1]])),i.param("subscriber3",c("MercuryMessageRendererUtils").getLinkToParticipant(J[H[2]]))]))})}function t(F,G,H){__p&&__p();var I=[F.author].concat(H);c("MercuryParticipants").getMulti(I,function(J){__p&&__p();function K(M){var N=c("React").createElement("div",null,M.map(function(O){return c("React").createElement("div",null,O.name)}));return c("React").createElement(c("TooltipLink.react"),{alignH:"center",position:"above",tooltip:N},i._({"*":"{num} more"},[i.param("num",M.length,[0])]))}var L=H.map(function(M){return J[M]});if(F.author===c("MercuryViewer").getID())G(i._("You added {subscriber1}, {subscriber2} and {more_people}.",[i.param("subscriber1",c("MercuryMessageRendererUtils").getLinkToParticipant(L[0])),i.param("subscriber2",c("MercuryMessageRendererUtils").getLinkToParticipant(L[1])),i.param("more_people",K(L.slice(2)))]));else if(H[0]===c("MercuryViewer").getID())G(i._("{actor} added you, {subscriber2} and {more_people}.",[i.param("actor",c("MercuryMessageRendererUtils").getLinkToParticipant(J[F.author])),i.param("subscriber2",c("MercuryMessageRendererUtils").getLinkToParticipant(L[1])),i.param("more_people",K(L.slice(2)))]));else G(i._("{actor} added {subscriber1}, {subscriber2} and {more_people}.",[i.param("actor",c("MercuryMessageRendererUtils").getLinkToParticipant(J[F.author])),i.param("subscriber1",c("MercuryMessageRendererUtils").getLinkToParticipant(L[0])),i.param("subscriber2",c("MercuryMessageRendererUtils").getLinkToParticipant(L[1])),i.param("more_people",K(L.slice(2)))]))})}function u(F,G){__p&&__p();var H=[F.author];F.log_message_data||j(0);var I=F.log_message_data.removed_participants;I||j(0);var J=void 0;if(I.length===1){J=I[0];H.push(J)}c("MercuryParticipants").getMulti(H,function(K){__p&&__p();var L=K[F.author],M=K[J];if(F.author===c("MercuryViewer").getID())if(!J||J===F.author)G(i._("You left the conversation."));else G(i._("You removed {name} from the conversation.",[i.param("name",c("MercuryMessageRendererUtils").getLinkToParticipant(M))]));else if(!J||J===F.author)G(i._("{actor} left the conversation.",[i.param("actor",c("MercuryMessageRendererUtils").getLinkToParticipant(L))]));else if(J===c("MercuryViewer").getID())G(i._("{actor} removed you from the conversation.",[i.param("actor",c("MercuryMessageRendererUtils").getLinkToParticipant(L))]));else G(i._("{actor} removed {name} from the conversation.",[i.param("actor",c("MercuryMessageRendererUtils").getLinkToParticipant(L)),i.param("name",c("MercuryMessageRendererUtils").getLinkToParticipant(M))]))})}function v(F,G){__p&&__p();var H=[F.author];F.log_message_data||j(0);var I=F.log_message_data.removed_participants;I||j(0);var J=void 0;if(I.length===1){J=I[0];H.push(J)}c("MercuryParticipants").getMulti(H,function(K){__p&&__p();var L=K[F.author],M=K[J];if(F.author===c("MercuryViewer").getID())if(!J||J===F.author)G(i._("You left the room."));else G(i._("You removed {name} from the room.",[i.param("name",c("MercuryMessageRendererUtils").getLinkToParticipant(M))]));else if(!J||J===F.author)G(i._("{actor} left the room.",[i.param("actor",c("MercuryMessageRendererUtils").getLinkToParticipant(L))]));else if(J===c("MercuryViewer").getID())G(i._("{actor} removed you from the room.",[i.param("actor",c("MercuryMessageRendererUtils").getLinkToParticipant(L))]));else G(i._("{actor} removed {name} from the room.",[i.param("actor",c("MercuryMessageRendererUtils").getLinkToParticipant(L)),i.param("name",c("MercuryMessageRendererUtils").getLinkToParticipant(M))]))})}function w(F,G,H){__p&&__p();F.log_message_data||j(0);var I=F.log_message_data.name,J="_5wzs"+(c("UserAgent").isBrowser("Chrome")?" _4fbd":"");if(F.author===c("MercuryViewer").getID())if(I){var K=c("React").createElement(c("MessengerTextWithEmoticons.react"),{renderEmoticons:true,renderEmoji:true,text:I});H(i._("You named the room: {name}.",[i.param("name",c("React").createElement("span",{className:J},K))]))}else H(i._("You removed the room name."));else c("MercuryParticipants").get(F.author,function(L){var M=c("MercuryMessageRendererUtils").getLinkToParticipant(L,G);if(I){var N=c("React").createElement(c("MessengerTextWithEmoticons.react"),{renderEmoticons:true,renderEmoji:true,text:I});H(i._("{actor} named the room: {name}.",[i.param("actor",M),i.param("name",c("React").createElement("span",{className:J},N))]))}else H(i._("{actor} removed the room name.",[i.param("actor",M)]))})}function x(F,G,H,I,J){if(F.author===c("MercuryViewer").getID())J(i._("You named the group {thread_name}. Your group is also on Facebook.",[i.param("thread_name",c("React").createElement("span",{className:I},c("React").createElement(c("MessengerTextWithEmoticons.react"),{renderEmoticons:true,renderEmoji:true,text:H})))]));else c("MercuryParticipants").get(F.author,function(K){var L=c("MercuryMessageRendererUtils").getLinkToParticipant(K,G);J(i._("{actor} named the group {thread_name}. Your group is also on Facebook.",[i.param("actor",L),i.param("thread_name",c("React").createElement("span",{className:I},c("React").createElement(c("MessengerTextWithEmoticons.react"),{renderEmoticons:true,renderEmoji:true,text:H})))]))})}function y(F,G,H){__p&&__p();F.log_message_data||j(0);var I=F.log_message_data.name,J="_5wzs"+(c("UserAgent").isBrowser("Chrome")?" _4fbd":"");if(I&&F.tags&&F.tags.indexOf(c("MessagingSourceEnum").EVENT_UPCOMING_BUMP)!==-1)H(i._("The group has been named {name}.",[i.param("name",c("React").createElement("span",{className:J},c("React").createElement(c("MessengerTextWithEmoticons.react"),{renderEmoticons:true,renderEmoji:true,text:I})))]));else if(I&&F.tags&&F.tags.indexOf(c("MessagingSourceEnum").GROUPSYNC_NAMING)!==-1)x(F,G,I,J,H);else if(F.author===c("MercuryViewer").getID())if(I){var K=c("React").createElement(c("MessengerTextWithEmoticons.react"),{renderEmoticons:true,renderEmoji:true,text:I});H(i._("You named the conversation: {name}.",[i.param("name",c("React").createElement("span",{className:J},K))]))}else H(i._("You removed the conversation name."));else c("MercuryParticipants").get(F.author,function(L){var M=c("MercuryMessageRendererUtils").getLinkToParticipant(L,G);if(I){var N=c("React").createElement(c("MessengerTextWithEmoticons.react"),{renderEmoticons:true,renderEmoji:true,text:I});H(i._("{actor} named the conversation: {name}.",[i.param("actor",M),i.param("name",c("React").createElement("span",{className:J},N))]))}else H(i._("{actor} removed the conversation name.",[i.param("actor",M)]))})}function z(F,G,H){__p&&__p();if(F.author===c("MercuryViewer").getID()){F.log_message_data||j(0);if(F.log_message_data.image)H(i._("You changed the room picture."));else H(i._("You removed the room picture."))}else c("MercuryParticipants").get(F.author,function(I){var J=c("MercuryMessageRendererUtils").getLinkToParticipant(I,G);F.log_message_data||j(0);if(F.log_message_data.image)H(i._("{actor} changed the room picture.",[i.param("actor",J)]));else H(i._("{actor} removed the room picture.",[i.param("actor",J)]))})}function A(F,G,H){__p&&__p();if(F.tags!==undefined&&F.tags.indexOf(c("MessagingSourceEnum").EVENT_UPCOMING_BUMP)!==-1)H(i._("The conversation picture has been set."));else if(F.author===c("MercuryViewer").getID()){F.log_message_data||j(0);if(F.log_message_data.image)H(i._("You changed the conversation picture."));else H(i._("You removed the conversation picture."))}else c("MercuryParticipants").get(F.author,function(I){var J=c("MercuryMessageRendererUtils").getLinkToParticipant(I,G);F.log_message_data||j(0);if(F.log_message_data.image)H(i._("{actor} changed the conversation picture.",[i.param("actor",J)]));else H(i._("{actor} removed the conversation picture.",[i.param("actor",J)]))})}function B(F,G){if(F.author===c("MercuryViewer").getID())G(i._("You changed the wallpaper."));else c("MercuryParticipants").get(F.author,function(H){var I=c("MercuryMessageRendererUtils").getLinkToParticipant(H);G(i._("{actor} changed the wallpaper.",[i.param("actor",I)]))})}function C(F,G){__p&&__p();var H=[F.author];F.log_message_data||j(0);var I=F.log_message_data.removed_participants;I||j(0);var J=void 0;if(I.length===1){J=I[0];H.push(J)}c("MercuryParticipants").getMulti(H,function(K){__p&&__p();var L=K[F.author],M=K[J];if(F.author===c("MercuryViewer").getID())if(!J||J===F.author)G(i._("You left the chat."));else G(i._("You removed {name} from the chat.",[i.param("name",c("MercuryMessageRendererUtils").getLinkToParticipant(M))]));else if(!J||J===F.author)G(i._("{actor} left the chat.",[i.param("actor",c("MercuryMessageRendererUtils").getLinkToParticipant(L))]));else if(J===c("MercuryViewer").getID())G(i._("{actor} removed you from the chat.",[i.param("actor",c("MercuryMessageRendererUtils").getLinkToParticipant(L))]));else G(i._("{actor} removed {name} from the chat.",[i.param("actor",c("MercuryMessageRendererUtils").getLinkToParticipant(L)),i.param("name",c("MercuryMessageRendererUtils").getLinkToParticipant(M))]))})}function D(F,G,H){__p&&__p();F.log_message_data||j(0);var I=F.log_message_data.name,J="_5wzs"+(c("UserAgent").isBrowser("Chrome")?" _4fbd":"");if(F.author===c("MercuryViewer").getID())if(I){var K=c("React").createElement(c("MessengerTextWithEmoticons.react"),{renderEmoticons:true,renderEmoji:true,text:I});H(i._("You named the chat: {name}.",[i.param("name",c("React").createElement("span",{className:J},K))]))}else H(i._("You removed the chat name."));else c("MercuryParticipants").get(F.author,function(L){var M=c("MercuryMessageRendererUtils").getLinkToParticipant(L,G);if(I){var N=c("React").createElement(c("MessengerTextWithEmoticons.react"),{renderEmoticons:true,renderEmoji:true,text:I});H(i._("{actor} named the chat: {name}.",[i.param("actor",M),i.param("name",c("React").createElement("span",{className:J},N))]))}else H(i._("{actor} removed the chat name.",[i.param("actor",M)]))})}function E(F,G,H){__p&&__p();if(F.author===c("MercuryViewer").getID()){F.log_message_data||j(0);if(F.log_message_data.image)H(i._("You changed the chat picture."));else H(i._("You removed the chat picture."))}else c("MercuryParticipants").get(F.author,function(I){var J=c("MercuryMessageRendererUtils").getLinkToParticipant(I,G);F.log_message_data||j(0);if(F.log_message_data.image)H(i._("{actor} changed the chat picture.",[i.param("actor",J)]));else H(i._("{actor} removed the chat picture.",[i.param("actor",J)]))})}}),null);
__d("MercuryLogMessage.react",["cx","fbt","DOM","DOMDimensions","Event","EventReminderRequestHelper","ImmutableObject","MercuryLogMessageRenderer","MercuryLogMessageType","MessagingGenericAdminTextType","React","ReactDOM","ShimButton.react","cancelAnimationFrame","emptyFunction","formatDate","joinClasses","requestAnimationFrame","requireWeak"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j,k,l=c("React").PropTypes,m=266;j=babelHelpers.inherits(n,c("React").Component);k=j&&j.prototype;function n(){__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=k.constructor).call.apply(o,[this].concat(r)),this.state={messageText:null,showEventReminderFlyout:false},this.$MercuryLogMessage4=function(){this.$MercuryLogMessage5()}.bind(this),this.$MercuryLogMessage9=function(){if(!this.state.showEventReminderFlyout)c("EventReminderRequestHelper").fetchEventReminder(this.props.thread.thread_id,this.props.thread.lightweight_event.oid,function(){this.$MercuryLogMessage1&&this.setState({showEventReminderFlyout:true})}.bind(this));else this.setState({showEventReminderFlyout:false})}.bind(this),this.$MercuryLogMessage11=function(t){if(t!==this.state.showEventReminderFlyout)this.setState({showEventReminderFlyout:t})}.bind(this),p}n.prototype.componentDidMount=function(){this.$MercuryLogMessage1=true;this.componentWillReceiveProps(this.props)};n.prototype.componentWillUnmount=function(){this.$MercuryLogMessage1=false;if(this.$MercuryLogMessage2)c("cancelAnimationFrame")(this.$MercuryLogMessage2)};n.prototype.$MercuryLogMessage3=function(){return c("React").createElement(c("ShimButton.react"),{form:"link",onClick:this.$MercuryLogMessage4},i._("Show previous messages."))};n.prototype.$MercuryLogMessage5=function(){var o=this.props.loadMoreMessages&&this.props.loadMoreMessages();if(!this.$MercuryLogMessage1)return;if(o)this.setState({messageText:this.$MercuryLogMessage3()});else{var p=i._("Couldn't find previous messages.");this.setState({messageText:p})}};n.prototype.componentWillReceiveProps=function(o){if(o.message.log_message_type===c("MercuryLogMessageType").SERVER_ERROR)return;c("MercuryLogMessageRenderer").renderText(o.message,o.thread,o.isLastOfType,function(p){this.$MercuryLogMessage1&&this.setState({messageText:p})}.bind(this))};n.prototype.shouldComponentUpdate=function(o,p){return this.state.messageText!=p.messageText||o.maxWidth!==this.props.maxWidth||this.state.showEventReminderFlyout!==p.showEventReminderFlyout};n.prototype.componentDidUpdate=function(){this.$MercuryLogMessage6();if(!this.refs.attachment)return;c("MercuryLogMessageRenderer").renderAttachmentLegacy(this.refs.attachment,this.props.message);c("DOM").scry(this.refs.wrap,"img").forEach(function(o){var p=c("Event").listen(o,"load",function(){this.$MercuryLogMessage6();p.remove()}.bind(this))}.bind(this))};n.prototype.render=function(){return c("React").createElement("div",babelHelpers["extends"]({},this.props,{className:c("joinClasses")(this.props.className,"_5ye6"),ref:"wrap",style:babelHelpers["extends"]({},this.props.style,this.$MercuryLogMessage7()),title:c("formatDate")(new Date(this.props.message.timestamp),"g:ia")}),c("React").createElement("div",{className:"_5ye7"},c("MercuryLogMessageRenderer").renderIcon(this.props.message),this.state.messageText),c("React").createElement("div",{className:"_5ye8",ref:"attachment"},this.$MercuryLogMessage8()))};n.prototype.$MercuryLogMessage8=function(){__p&&__p();if(this.props.thread&&!this.props.thread.lightweight_event||!this.props.message.log_message_data)return null;var o=void 0;c("requireWeak")("EventReminderStateStore",function(s){o=s.getEvent(this.props.thread.thread_id)}.bind(this));if(!o||!o.exists)return null;var p;c("requireWeak")("Link.react",function(s){p=s});var q=void 0;switch(this.props.message.log_message_data.message_type){case c("MessagingGenericAdminTextType").LIGHTWEIGHT_EVENT_CREATE:case c("MessagingGenericAdminTextType").LIGHTWEIGHT_EVENT_UPDATE_TIME:case c("MessagingGenericAdminTextType").LIGHTWEIGHT_EVENT_UPDATE_TITLE:case c("MessagingGenericAdminTextType").LIGHTWEIGHT_EVENT_UPDATE_LOCATION:case c("MessagingGenericAdminTextType").LIGHTWEIGHT_EVENT_UPDATE:q=i._("Change");break;default:q=null}var r=c("React").createElement(p,{href:"#",onClick:this.$MercuryLogMessage9,title:i._("Edit Event"),ref:"event_rem_link"},q);if(this.props.displayItems)r=null;return c("React").createElement("span",null,r,this.$MercuryLogMessage10())};n.prototype.$MercuryLogMessage10=function(){__p&&__p();if(!this.state.showEventReminderFlyout)return null;var o="right",p=c("ReactDOM").findDOMNode(this.refs.wrap);if(p&&p instanceof Element&&p.getBoundingClientRect().left<m)o="left";var q={alignment:o,position:"above",contextRef:function(){return this.refs.event_rem_link}.bind(this),shown:this.state.showEventReminderFlyout,onToggle:this.$MercuryLogMessage11},r=void 0;c("requireWeak")("EventsActionsLogger",function(v){r=v});var s={action_history:[{surface:r.Surface.MESSENGER_CHAT_TAB,mechanism:r.Mechanism.REMINDER_ADMIN_TEXT}]},t={threadID:this.props.thread.thread_id,dialogProps:q,flyoutNoSheet:true,isEditing:true,actionContext:s},u;c("requireWeak")("ChatEventReminderContainer.react",function(v){u=v});return c("React").createElement(u,t)};n.prototype.$MercuryLogMessage7=function(){return this.props.maxWidth?{maxWidth:this.props.maxWidth}:null};n.prototype.$MercuryLogMessage6=function(){if(this.$MercuryLogMessage2)c("cancelAnimationFrame")(this.$MercuryLogMessage2);this.$MercuryLogMessage2=c("requestAnimationFrame")(function(){this.props.onImageLoad&&this.props.onImageLoad(c("DOMDimensions").getElementDimensions(this.refs.wrap).height);delete this.$MercuryLogMessage2}.bind(this))};n.propTypes={loadMoreMessages:l.func,maxWidth:l.number,message:l.instanceOf(c("ImmutableObject")).isRequired,onImageLoad:l.func,thread:l.object};n.defaultProps={onImageLoad:c("emptyFunction")};f.exports=n}),null);
__d("ChatConversation.react",["ChatCollapsedLogMessageGroup.react","ChatDateBreak.react","ChatMessageGroup.react","immutable","MercuryLogMessage.react","MercuryIDs","MercuryRoger.bs","MessageList.react","React","Set","MercuryShareAttachmentRenderLocations","cancelAnimationFrame","requestAnimationFrame"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h=c("MercuryRoger.bs").get(),i=c("immutable").OrderedMap,j=c("React").PropTypes,k=c("React").createClass({displayName:"ChatConversation",_raf:undefined,_onMountTimeout:undefined,propTypes:{contextBanner:j.object,isCanonical:j.bool.isRequired,loadMoreMessages:j.func,maxBubbleWidth:j.number.isRequired,messages:j.instanceOf(c("immutable").List).isRequired,onAttachmentLoad:j.func,onMount:j.func,onlineUsers:j.instanceOf(c("immutable").List).isRequired,onStickerClick:j.func,viewer:j.string.isRequired,thread:j.object,threadID:j.string.isRequired},componentDidMount:function l(){this._raf=c("requestAnimationFrame")(function(){this._onMountTimeout=setTimeout(function(){this.props.onMount&&this.props.onMount();delete this._onMountTimeout}.bind(this),0);delete this._raf}.bind(this))},componentWillUnmount:function l(){if(this._raf)c("cancelAnimationFrame")(this._raf);clearTimeout(this._onMountTimeout)},render:function l(){return c("React").createElement("div",null,this.props.contextBanner,c("React").createElement(c("MessageList.react"),{DateBreak:c("ChatDateBreak.react"),LogMessage:c("MercuryLogMessage.react"),MessageGroup:c("ChatMessageGroup.react"),deliveryTimestamp:0,isCanonical:this.props.isCanonical,location:c("MercuryShareAttachmentRenderLocations").CHAT,loadMoreMessages:this.props.loadMoreMessages,maxBubbleWidth:this.props.maxBubbleWidth,CollapsedLogMessageGroup:c("ChatCollapsedLogMessageGroup.react"),messages:this.props.messages,onAttachmentLoad:this.props.onAttachmentLoad,onlineUsers:this.props.onlineUsers,onStickerClick:this.props.onStickerClick,readReceipts:this._calculateReceipts(this.props),ref:"messageList",viewer:this.props.viewer,thread:this.props.thread,threadID:this.props.threadID}))},_calculateReceipts:function l(m){__p&&__p();var n=c("MercuryIDs").getParticipantIDFromUserID(m.viewer),o=h.getSeenTimestamps(m.threadID),p=new(c("Set"))(m.thread?m.thread.participants:o.keys());p["delete"](n);return o.withMutations(function(o){__p&&__p();c("immutable").Seq(m.messages).reverse().forEach(function(q){__p&&__p();if(p.size===0)return false;if(!p.has(q.author))return null;o.update(q.author,function(r){if(!r||r.watermark<=q.timestamp)return{watermark:q.timestamp,action:q.timestamp};return r});p["delete"](q.author);return null})})},getMessageList:function l(){return this.refs.messageList}});f.exports=k}),null);
__d("ChatEditParticipantsUtils",["AsyncDialog","AsyncRequest","MercuryIDs","MercuryThreadIDMap","URI"],(function a(b,c,d,e,f,g){"use strict";var h=c("MercuryThreadIDMap").get(),i={showParticipantsModal:function j(k){if(!c("MercuryIDs").isGroupChat(k))return;h.getServerIDFromClientID(k,function(l){c("AsyncDialog").send(new(c("AsyncRequest"))(new(c("URI"))("/ajax/browser/dialog/multichat_members/").addQueryData({id:l})))})}};f.exports=i}),null);
__d("ChatInput.react",["AbstractMentionsTextEditor.react","BootloadedComponent.react","Bootloader","CompositeDraftDecorator","ContentState","DraftModifier","EditorState","EmojiFormat","ifRequired","JSResource","MessengerEmojiSpan.react","MessengerEmoticonSpan.react","MessengerMentionsEntityDecorator.react","MessengerMentionSource","MessengerUploadFilesUtil.bs","React","ReactDOM","cancelAnimationFrame","clearImmediate","createMessengerMentionDraftEntity","createCancelableFunction","debounce","emptyFunction","getDefaultKeyBinding","getEntityMatcher","getProfileRangesForContentState","getThreadTypeNameFromThreadType","getVisibleValueForContentStateWithMessengerEmoji","handleBeforeInputForMessengerEmoji","handleBeforeInputForMessengerEmoticon","handleSoftNewlineForMessengerEmoticon","insertEmoticonIntoEditorState","insertMentionIntoEditorState","insertMessengerEmojiIntoContentState","isSoftNewlineEvent","setImmediate","requestAnimationFrame","gkx"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h,i,j=c("React").PropTypes,k=c("emptyFunction").thatReturnsNull,l=1,m="handled",n=8,o="not-handled";h=babelHelpers.inherits(p,c("React").Component);i=h&&h.prototype;function p(){__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.$ChatInput4=c("createCancelableFunction")(function(w,x){var y=w.participants,z=w.viewer,A=w.thread;this.setState({mentionsSource:x(z,y,A,c("gkx")("AT49sw5n0nlIyoqYGYpRJXtOnRzCLqSpsmIoWA7hmyYTaoQcU5JHlDW_AWGZ_laa8hQ933FOWyuLNLlpGxYhTnOb"))})}.bind(this)),this.$ChatInput6=function(){var w=this.$ChatInput9(this.state.editorState.getCurrentContent());this.$ChatInput1=c("setImmediate")(function(){this.$ChatInput1=null;var x=c("EditorState").set(this.state.editorState,{decorator:w});this.setState({editorState:x})}.bind(this))}.bind(this),this.onChange=function(w){if(w!==this.state.editorState){this.setState({editorState:w});this.$ChatInput7(w,this.props.composer)}}.bind(this),this.onReturn=function(event,w){__p&&__p();if(c("isSoftNewlineEvent")(event)){var x=c("handleSoftNewlineForMessengerEmoticon");this.setState({editorState:x(w)});return m}event.persist();this.setState({},function(){if(c("gkx")("AT5V6GuV7OE1f4CNmq1NUhZOeDrgnZF-AQ7WoOvZA8jFMJsYzyghwU79Bm31vgH-mi9DAlUGSFnfYvhwjhMfTolYEEzHhgUrhLD2UxTqbooHHw"))c("MessengerUploadFilesUtil.bs").sendAttchments(this.props.fileUploader,this.props.uploadPhotoFn);this.props.inputKeyDown(event,this.getValue())}.bind(this));return m}.bind(this),this.getValue=function(){return this.getValueFromEditorState(this.state.editorState)}.bind(this),this.$ChatInput10=function(w,x){this.props.onBeforeInput&&this.props.onBeforeInput();var y=this.$ChatInput11(w,x),z=this.$ChatInput12(w,x);return y||z?m:o}.bind(this),this.$ChatInput14=function(w){return this.$ChatInput13(w)}.bind(this),this.$ChatInput15=function(w,x){return this.$ChatInput13(x)}.bind(this),this.state={editorState:this.$ChatInput8(this.props.defaultText)},this.$ChatInput17=function(){var w=(this.state.addedMentionsCount||0)+1;this.setState({addedMentionsCount:w})}.bind(this),this.$ChatInput19=function(w,x){var y=(this.state.mentionsTriggeredCount||0)+1,z={mentionsTriggeredCount:y};if(!this.state.mentionsTriggerSource)z.mentionsTriggerSource=x===l?c("MessengerMentionSource").ATSIGN:c("MessengerMentionSource").TYPEAHEAD;this.setState(z)}.bind(this),this.$ChatInput18=function(w){if(!this.refs.input.isShowingMentionables())this.props.onEscape&&this.props.onEscape(w)}.bind(this),s}p.prototype.componentDidMount=function(){this.$ChatInput2=c("ReactDOM").findDOMNode(this).getBoundingClientRect().height;this.props.resizeFn(this.$ChatInput2);this.props.initializeThingsWithInputFn(c("ReactDOM").findDOMNode(this.refs.input),this.getValue);this.setState({triggeredWord:this.props.triggeredWord});this.$ChatInput3();c("Bootloader").loadModules(["createMentionsSearchSourceFromParticipants"],this.$ChatInput4.bind(this,this.props),"ChatInput.react");if(c("gkx")("AT5V6GuV7OE1f4CNmq1NUhZOeDrgnZF-AQ7WoOvZA8jFMJsYzyghwU79Bm31vgH-mi9DAlUGSFnfYvhwjhMfTolYEEzHhgUrhLD2UxTqbooHHw"))c("Bootloader").loadModules(["FantaMessageActions"],c("emptyFunction"),"ChatInput.react")};p.prototype.componentWillUnmount=function(){if(this.$ChatInput1)c("clearImmediate")(this.$ChatInput1);if(this.$ChatInput5)c("cancelAnimationFrame")(this.$ChatInput5);this.$ChatInput4.cancel();this.$ChatInput5=null};p.prototype.componentWillReceiveProps=function(r){if(this.state.triggeredWord!==r.triggeredWord)this.setState({triggeredWord:r.triggeredWord},this.$ChatInput6);if(!this.props.thread||!r.thread||q(r,this.props))c("Bootloader").loadModules(["createMentionsSearchSourceFromParticipants"],this.$ChatInput4.bind(this,r),"ChatInput.react");if(r.composer.version!==this.props.composer.version)this.resetState()};p.prototype.componentDidUpdate=function(){this.$ChatInput3();this.$ChatInput5=c("requestAnimationFrame")(function(){if(!this.$ChatInput5)return;this.$ChatInput5=null;var r=c("ReactDOM").findDOMNode(this).getBoundingClientRect(),s=r.height;if(this.$ChatInput2!==s)this.props.resizeFn(s);this.$ChatInput2=s}.bind(this))};p.prototype.$ChatInput3=function(){var r=this.props.composer,s=this.props.onTextChange;this.$ChatInput7=s?c("debounce")(function(t){s(this.getValueFromEditorState(t),r,200)}.bind(this),200):c("emptyFunction")};p.prototype.$ChatInput8=function(r){var s=c("ContentState").createFromText(r);return c("EditorState").createWithContent(s,this.$ChatInput9(s))};p.prototype.resetState=function(){if(this.state.typeaheadReporter){this.state.typeaheadReporter.sessionEnd();this.state.typeaheadReporter.sessionStart()}this.setState({editorState:c("EditorState").moveFocusToEnd(this.$ChatInput8("")),triggeredWord:null,addedMentionsCount:0,mentionsTriggeredCount:0,mentionsTriggerSource:null})};p.prototype.onSend=function(r){var s,t=this,u=this.getMentions();if(r&&(u&&u.length||this.state.addedMentionsCount||this.state.mentionsTriggeredCount||this.state.mentionsTriggerSource))(function(){var v=t.state,w=v.addedMentionsCount,x=v.mentionsTriggeredCount,y=v.mentionsTriggerSource,z=t.props,A=z.thread,B=z.participants;c("Bootloader").loadModules(["MessengerMentionsTypedLogger","MessengerMentionsLoggerEvents"],function(C,D){new C().setEvent(D.MENTION).setGroupSize(B&&B.length).setNumDelivered(u?u.length:0).setNumSelects(w).setNumTriggers(x).setThreadid(A&&A.thread_id).setThreadType(c("getThreadTypeNameFromThreadType")(A&&A.thread_type)).setOfflineThreadid(r.offline_threading_id).updateExtraData({source:y}).log()},"ChatInput.react")})()};p.prototype.$ChatInput9=function(r){var s=[{strategy:c("getEntityMatcher")(function(t){return t.getType()==="EMOTICON"},r.getEntity),component:c("MessengerEmoticonSpan.react")}];s.push({strategy:c("getEntityMatcher")(function(t){return t.getType()==="EMOJI"},r.getEntity),component:c("MessengerEmojiSpan.react")});s.push({strategy:c("getEntityMatcher")(function(t){return t.getType()==="MENTION"},r.getEntity),component:c("MessengerMentionsEntityDecorator.react")});return new(c("CompositeDraftDecorator"))(s)};p.prototype.getValueFromEditorState=function(r){var s=r.getCurrentContent();return c("getVisibleValueForContentStateWithMessengerEmoji")(s)};p.prototype.getMentions=function(){var r=this.props.thread;return c("getProfileRangesForContentState")(this.state.editorState.getCurrentContent(),r?r.thread_fbid:null)};p.prototype.focus=function(){this.refs.input&&this.refs.input.focus&&this.refs.input.focus()};p.prototype.$ChatInput11=function(r,s){var t=c("handleBeforeInputForMessengerEmoticon")(s,r);if(t===s)return false;this.setState({editorState:t});return true};p.prototype.$ChatInput12=function(r,s){var t=c("handleBeforeInputForMessengerEmoji")(s,r);if(t===s)return false;this.setState({editorState:t});return true};p.prototype.$ChatInput13=function(r){__p&&__p();var s,t=this,u=/^image\//,v=r.filter(function(w){return u.test(w.type)});if(v.length){var s=function(){var w=t.props.composer;if(c("gkx")("AT5V6GuV7OE1f4CNmq1NUhZOeDrgnZF-AQ7WoOvZA8jFMJsYzyghwU79Bm31vgH-mi9DAlUGSFnfYvhwjhMfTolYEEzHhgUrhLD2UxTqbooHHw"))c("ifRequired")("FantaMessageActions",function(x){x.prepareFilesForSend(this.props.threadID,v,w)}.bind(t),function(){c("Bootloader").loadModules(["FantaMessageActions"],function(x){x.prepareFilesForSend(this.props.threadID,v,w)}.bind(this),"ChatInput.react")}.bind(t));else t.props.uploadPhotoFn(v[0]);return{v:true}}();if(typeof s==="object")return s.v}return false};p.prototype.insertEmoticon=function(r){var s=c("insertEmoticonIntoEditorState")(r,this.state.editorState);if(s!==this.state.editorState)this.setState({editorState:s})};p.prototype.insertEmoji=function(r){var s=this.state.editorState,t=c("insertMessengerEmojiIntoContentState")(c("EmojiFormat").codeArrayToCodeString(r),s.getCurrentContent(),s.getSelection(),s.getCurrentInlineStyle()),u=c("EditorState").push(s,t,"insert-characters");if(u!==this.state.editorState)this.setState({editorState:c("EditorState").forceSelection(u,t.getSelectionAfter())})};p.prototype.appendText=function(r){var s=this.state.editorState,t=s.getSelection(),u=s.getCurrentContent();u=c("DraftModifier").insertText(u,t,r);s=c("EditorState").push(s,u,"insert-characters");this.setState({editorState:s})};p.prototype.render=function(){var r=babelHelpers["extends"]({},this.props,this.$ChatInput16());return c("React").createElement(c("AbstractMentionsTextEditor.react"),babelHelpers["extends"]({ref:"input"},r,{editorState:this.state.editorState,onChange:this.onChange,handleBeforeInput:this.$ChatInput10,handlePastedFiles:this.$ChatInput14,handleDroppedFiles:this.$ChatInput15,handleReturn:this.onReturn,spellCheck:true,stripPastedStyles:true,textAlignment:"left"}))};p.prototype.$ChatInput16=function(){return{autoHighlight:true,handleContentReturn:this.onReturn,maxResults:n,mentionResultsProps:{typeaheadView:c("BootloadedComponent.react").create(c("JSResource")("ChatMentionsInputTypeaheadView.react").__setRef("ChatInput.react")),typeaheadViewProps:{},position:"above",autoflip:true},mentionResultsComponent:c("BootloadedComponent.react").create(c("JSResource")("MentionsLayer.react").__setRef("ChatInput.react")),mentionCreationForContentStateFn:c("createMessengerMentionDraftEntity"),mentionsSource:this.state.mentionsSource,onAddMention:this.$ChatInput17,onEscape:this.$ChatInput18,onShowMentions:this.$ChatInput19}};p.prototype.addMention=function(r){var s=c("insertMentionIntoEditorState")(r,this.state.editorState,0,c("createMessengerMentionDraftEntity"));if(!this.state.mentionsTriggerSource)this.setState({mentionsTriggerSource:c("MessengerMentionSource").REPLY});this.onChange(s);this.$ChatInput17()};p.propTypes={composer:j.object.isRequired,blockStyleFn:j.func,fileUploader:j.object,initializeThingsWithInputFn:j.func,inputKeyDown:j.func,keyBindingFn:j.func,onBeforeInput:j.func,onBlur:j.func,onEscape:j.func,onFocus:j.func,onTab:j.func,resizeFn:j.func,thread:j.object,threadID:j.string,viewer:j.string};p.defaultProps={blockStyleFn:k,keyBindingFn:c("getDefaultKeyBinding")};function q(r,s){var t=r.participants,u=s.participants;if(!t||!u)return true;var v=t.filter(Boolean),w=u.filter(Boolean);return v.length!==w.length}f.exports=p}),null);
__d("ChatEventPlanButton.react",["cx","fbt","Bootloader","BootloadOnRender.react","ChatFlyoutPlaceholder.react","EventsActionsLogger","JSResource","LazyComponent.react","Link.react","React"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j,k;j=babelHelpers.inherits(l,c("React").PureComponent);k=j&&j.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=k.constructor).call.apply(m,[this].concat(p)),this.state={showFlyout:false},this.$ChatEventPlanButton2=false,this.$ChatEventPlanButton3=function(){__p&&__p();c("Bootloader").loadModules(["EventReminderStateStore","EventReminderRequestHelper","EventReminderActionsLogger"],function(r,s,t){__p&&__p();t.logClickOnEntryPoint();var u=r.getEvent(this.props.threadID);if(!this.$ChatEventPlanButton2)return;if(u&&u.exists){this.$ChatEventPlanButton1=true;if(!this.state.showFlyout)s.fetchEventReminder(this.props.threadID,u.eventID,function(){if(!this.$ChatEventPlanButton2)return;this.setState({showFlyout:true})}.bind(this));else this.setState({showFlyout:false})}else{this.$ChatEventPlanButton1=false;this.setState({showFlyout:!this.state.showFlyout})}}.bind(this),"ChatEventPlanButton.react")}.bind(this),this.onToggle=function(r){if(r!==this.state.showFlyout)this.setState({showFlyout:r})}.bind(this),n}l.prototype.componentDidMount=function(){this.$ChatEventPlanButton2=true};l.prototype.componentWillUnmount=function(){this.$ChatEventPlanButton2=false};l.prototype.render=function(){var m="_6gb _3k_u";return c("React").createElement("div",null,c("React").createElement(c("Link.react"),{className:m,onClick:this.$ChatEventPlanButton3,ref:"event_plan",role:"button",title:i._("Start a plan")},this.$ChatEventPlanButton4()))};l.prototype.$ChatEventPlanButton4=function(){if(!this.state.showFlyout)return null;var m={alignment:"right",position:"above",contextRef:function(){return this.refs.event_plan}.bind(this),shown:this.state.showFlyout,onToggle:this.onToggle},n={action_history:[{surface:c("EventsActionsLogger").Surface.MESSENGER_CHAT_TAB,mechanism:c("EventsActionsLogger").Mechanism.MESSENGER_COMPOSER}]};return c("React").createElement(c("BootloadOnRender.react"),{component:c("React").createElement(c("LazyComponent.react"),{actionContext:n,dialogProps:m,flyoutNoSheet:true,isEditing:this.$ChatEventPlanButton1,threadID:this.props.threadID}),loader:c("JSResource")("ChatEventReminderContainer.react").__setRef("ChatEventPlanButton.react"),placeholder:c("React").createElement(c("ChatFlyoutPlaceholder.react"),null)})};f.exports=l}),null);
__d("MessengerHotLikeChatSVGIcon.react",["cssVar","fbt","React","gkx","uniqueID"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j,k,l=c("gkx")("AT5ZvVwuqKWcfrio0AdnNomF7UAfIh6xykST_qUQlvhzlEwa0D-O1yjSaPSHOODgL1U"),m=c("React").PropTypes,n="transparent",o=i._("Thumbs Up Sign");j=babelHelpers.inherits(p,c("React").Component);k=j&&j.prototype;function 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={titleId:c("uniqueID")()},r}p.prototype.render=function(){var q=this.props.color||"#0084ff",r=this.props.renderSize,s=r?{height:r.toString(),width:r.toString()}:undefined,t=l?{fill:n,stroke:q,opacity:.2}:{fill:q,opacity:.2},u="bounds_"+this.state.titleId;return l?c("React").createElement("svg",babelHelpers["extends"]({width:"32px",height:"31px","aria-labelledby":this.state.titleId,preserveAspectRatio:"xMinYMax meet",version:"1.1",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg"},s),c("React").createElement("title",{id:this.state.titleId},o),c("React").createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},c("React").createElement("rect",{id:u,fill:n,width:"32",height:"32"}),c("React").createElement("g",{style:t},c("React").createElement("path",{d:"M670.93,460a0.08,0.08,0,0,0,0,.15,1.75,1.75,0,0,1,1.29,1.66c0,1.45-1.2,1.66-2,1.75a0.06,0.06,0,0,0,0,.12,1.54,1.54,0,0,1,.88,1.68C671,467,669.17,467,668,467H658a5.63,5.63,0,0,1-5-2.5V455l2.19-1.59a4.39,4.39,0,0,0,1.21-1.75l1.48-5.59v-0.43l-0.41-3.81a0.45,0.45,0,0,1,.16-0.41c1.34-1,3.07-.23,4,2.6a12.83,12.83,0,0,1,0,6.33,0.55,0.55,0,0,0,.54.66c1.77,0,6.77,0,6.77,0,2,0,3.31.62,3.54,2.5a2.39,2.39,0,0,1-1.23,2.4,0.08,0.08,0,0,0,0,.14,1.87,1.87,0,0,1,1.71,2A2,2,0,0,1,670.93,460Zm-20.13-7h-5.6a0.2,0.2,0,0,0-.2.2v15.6a0.2,0.2,0,0,0,.2.2h5.6a0.2,0.2,0,0,0,.2-0.2V453.2A0.2,0.2,0,0,0,650.8,453Z",transform:"translate(-643 -439)"})),c("React").createElement("g",{transform:"translate(1.000000, 0.000000)"},c("React").createElement("path",{d:"M7.195,29.2559 L0.804,29.2559 C0.362,29.2559 0,28.8939 0,28.4509 L0,13.0609 C0,12.6179 0.362,12.2559 0.804,12.2559 L7.195,12.2559 C7.637,12.2559 8,12.6179 8,13.0609 L8,28.4509 C8,28.8939 7.637,29.2559 7.195,29.2559 Z",id:"Stroke-172",stroke:q,strokeWidth:"2"}),c("React").createElement("path",{d:"M15.9694,0 L15.9694,0 C14.6414,0 13.5214,0.568 13.0414,1.097 L12.4654,1.732 L12.5184,2.63 L12.8154,6.635 C12.8204,6.692 12.8074,6.749 12.7804,6.8 L9.5534,12.791 L8.1544,13.443 L6.9994,13.982 L6.9994,15.256 L6.9994,25.256 L6.9994,27.256 L8.5914,27.256 C8.7024,27.35 8.8354,27.47 8.9364,27.562 C9.1404,27.747 9.3424,27.928 9.5324,28.078 C10.4784,28.825 11.8634,29.174 12.8444,29.25 L12.9214,29.256 L12.9994,29.256 L23.3374,29.256 C25.3594,29.256 26.7824,28.521 27.5704,27.072 C28.0124,26.258 28.1384,25.438 28.0904,24.695 C28.9084,24.168 29.5624,23.33 29.7984,22.148 C29.9184,21.549 29.8984,20.985 29.7854,20.474 C30.4514,19.814 30.9374,18.865 30.9374,17.581 C30.9374,16.549 30.6654,15.739 30.2574,15.123 C30.4314,14.637 30.5364,14.081 30.5364,13.459 C30.5364,10.906 28.4954,9.256 25.3374,9.256 L21.0124,9.256 C21.1474,8.379 21.2494,7.521 21.2494,6.931 C21.2494,4.646 20.4484,1.775 18.2014,0.569 C17.4974,0.191 16.7464,0 15.9694,0 M15.9694,2 C16.3574,2 16.7974,2.085 17.2564,2.332 C18.6054,3.056 19.2494,5.021 19.2494,6.931 C19.2494,7.863 18.8974,9.829 18.7254,10.731 C18.6784,10.978 18.8684,11.256 19.1184,11.256 L25.3374,11.256 C26.2704,11.256 28.5364,11.456 28.5364,13.459 C28.5364,14.979 27.5584,15.534 27.5584,15.534 C27.5584,15.534 28.9374,15.673 28.9374,17.581 C28.9374,19.489 27.0854,19.682 27.0854,19.682 C27.0854,19.682 28.0924,20.481 27.8374,21.756 C27.5284,23.3 26.0264,23.391 25.6764,23.391 C25.6294,23.391 25.6044,23.389 25.6044,23.389 C25.6044,23.389 26.5714,24.723 25.8124,26.118 C25.5674,26.57 25.0414,27.256 23.3374,27.256 L12.9994,27.256 C12.2824,27.2 11.3154,26.937 10.7734,26.51 C10.1994,26.056 9.5134,25.256 8.9994,25.256 L8.9994,15.256 L10.6304,14.494 C10.8704,14.383 11.0674,14.197 11.1934,13.965 L14.5404,7.748 C14.7494,7.362 14.8424,6.924 14.8104,6.486 L14.5124,2.482 C14.5114,2.465 14.5114,2.453 14.5234,2.44 C14.5964,2.359 15.1744,2 15.9694,2",id:"Fill-174",fill:q})))):c("React").createElement("svg",babelHelpers["extends"]({"aria-labelledby":this.state.titleId,preserveAspectRatio:"xMinYMax meet",version:"1.1",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg"},s),c("React").createElement("title",{id:this.state.titleId},o),c("React").createElement("g",null,c("React").createElement("rect",{id:u,fill:n,width:"32",height:"32"}),c("React").createElement("g",{style:t},c("React").createElement("path",{d:"M670.93,460a0.08,0.08,0,0,0,0,.15,1.75,1.75,0,0,1,1.29,1.66c0,1.45-1.2,1.66-2,1.75a0.06,0.06,0,0,0,0,.12,1.54,1.54,0,0,1,.88,1.68C671,467,669.17,467,668,467H658a5.63,5.63,0,0,1-5-2.5V455l2.19-1.59a4.39,4.39,0,0,0,1.21-1.75l1.48-5.59v-0.43l-0.41-3.81a0.45,0.45,0,0,1,.16-0.41c1.34-1,3.07-.23,4,2.6a12.83,12.83,0,0,1,0,6.33,0.55,0.55,0,0,0,.54.66c1.77,0,6.77,0,6.77,0,2,0,3.31.62,3.54,2.5a2.39,2.39,0,0,1-1.23,2.4,0.08,0.08,0,0,0,0,.14,1.87,1.87,0,0,1,1.71,2A2,2,0,0,1,670.93,460Zm-20.13-7h-5.6a0.2,0.2,0,0,0-.2.2v15.6a0.2,0.2,0,0,0,.2.2h5.6a0.2,0.2,0,0,0,.2-0.2V453.2A0.2,0.2,0,0,0,650.8,453Z",transform:"translate(-643 -439)"})),c("React").createElement("g",{style:t},c("React").createElement("rect",{x:"2",y:"14",width:"6",height:"16",rx:"0.2",ry:"0.2"})),c("React").createElement("path",{fill:q,d:"M650.8,453a0.2,0.2,0,0,1,.2.2v15.6a0.2,0.2,0,0,1-.2.2h-5.6a0.2,0.2,0,0,1-.2-0.2V453.2a0.2,0.2,0,0,1,.2-0.2h5.6m0-2h-5.6a2.2,2.2,0,0,0-2.2,2.2v15.6a2.2,2.2,0,0,0,2.2,2.2h5.6a2.2,2.2,0,0,0,2.2-2.2V453.2a2.2,2.2,0,0,0-2.2-2.2h0Z",transform:"translate(-643 -439)"}),c("React").createElement("path",{fill:q,"data-name":"stroke",d:"M658.83,441c1.06,0,2.16,1,2.83,3a12.83,12.83,0,0,1,0,6.33,0.55,0.55,0,0,0,.54.66h1.18l5.59,0c2,0,3.31.62,3.54,2.5a2.39,2.39,0,0,1-1.23,2.4,0.08,0.08,0,0,0,0,.14,1.87,1.87,0,0,1,1.71,2,2,2,0,0,1-2.07,1.91,0.08,0.08,0,0,0,0,.15,1.75,1.75,0,0,1,1.29,1.66c0,1.45-1.2,1.66-2,1.75a0.06,0.06,0,0,0,0,.12,1.54,1.54,0,0,1,.88,1.68C671,467,669.24,467,668.07,467H658a5.63,5.63,0,0,1-5-2.5V455l2.19-1.59a4.39,4.39,0,0,0,1.21-1.75l1.48-5.59v-0.43l-0.41-3.81a0.45,0.45,0,0,1,.16-0.41,2,2,0,0,1,1.17-.41m0-2h0a4,4,0,0,0-2.36.8,2.45,2.45,0,0,0-1,2.23l0.39,3.67h0v0.05l-1.41,5.32a3.64,3.64,0,0,1-.47.69l-2.19,1.59L651,454v11.15l0.36,0.52A7.58,7.58,0,0,0,658,469h10.07c3.25,0,4.95-1.21,5-3.59a4.54,4.54,0,0,0-.05-0.93,3.59,3.59,0,0,0,1.14-2.71,3.77,3.77,0,0,0-.18-1.15,3.85,3.85,0,0,0,1-2.57,4,4,0,0,0-.82-2.55,4.38,4.38,0,0,0,.31-2.25c-0.2-1.59-1.18-4.25-5.53-4.25l-5,0a12.65,12.65,0,0,0-.35-5.63c-0.91-2.75-2.67-4.38-4.73-4.38h0Z",transform:"translate(-643 -439)"})))};p.propTypes={color:m.string,location:m.string,renderSize:m.number};f.exports=p}),null);
__d("XMessagingQuickCamController",["XController"],(function a(b,c,d,e,f,g){f.exports=c("XController").create("/messages/quick-cam/",{thread_id:{type:"String",required:true},__asyncDialog:{type:"Int"}})}),null);
__d("MessengerQuickCamButton.react",["fbt","AsyncRequest","BootloadOnRender.react","ChatConfig","JSResource","LazyComponent.react","Link.react","React","XMessagingQuickCamController"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i,j,k=c("React").PropTypes,l="seen_cam_button_nux";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.state={nuxOpen:false,nuxShown:!!c("ChatConfig").get(l)},this.$MessengerQuickCamButton2=function(){this.setState({nuxShown:true,nuxOpen:false},function(){return this.$MessengerQuickCamButton3()}.bind(this))}.bind(this),this.$MessengerQuickCamButton1=function(){if(!this.state.nuxShown)this.setState({nuxOpen:true});else this.$MessengerQuickCamButton3()}.bind(this),o}m.prototype.render=function(){return c("React").createElement("div",null,c("React").createElement(c("Link.react"),{className:this.props.className,onClick:this.$MessengerQuickCamButton1,ref:"photoButton",role:"button",title:h._("Take a picture using quick cam")}),c("React").createElement(c("BootloadOnRender.react"),{loader:c("JSResource")("MessagingShowNUX.react").__setRef("MessengerQuickCamButton.react"),component:c("React").createElement(c("LazyComponent.react"),{contextRef:function(){return this.refs.photoButton}.bind(this),settingName:l,shown:this.state.nuxOpen,onHidden:this.$MessengerQuickCamButton2,ref:"camNUX"},h._("Send photos from your computer's camera.")),placeholder:c("React").createElement("span",null)}))};m.prototype.$MessengerQuickCamButton3=function(){var n=c("XMessagingQuickCamController").getURIBuilder().setString("thread_id",this.props.threadID).getURI();new(c("AsyncRequest"))().setMethod("GET").setURI(n).setRelativeTo(this).setReadOnly(true).send()};m.propTypes={className:k.string.isRequired,threadID:k.string.isRequired};f.exports=m}),null);
__d("P2PAbstractSendMoneyButton.react",["cx","fbt","React","TooltipLink.react","joinClasses"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j,k;j=babelHelpers.inherits(l,c("React").Component);k=j&&j.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=k.constructor).call.apply(m,[this].concat(p)),this.$P2PAbstractSendMoneyButton1=false,this.$P2PAbstractSendMoneyButton3=function(){this.props.onMouseDown&&this.props.onMouseDown();this.$P2PAbstractSendMoneyButton1=this.props.isActive}.bind(this),this.$P2PAbstractSendMoneyButton2=function(r){r.stopPropagation();if(this.$P2PAbstractSendMoneyButton1){this.$P2PAbstractSendMoneyButton1=false;return}this.props.onClick()}.bind(this),n}l.prototype.render=function(){return c("React").createElement(c("TooltipLink.react"),{alignH:"center",className:c("joinClasses")(this.props.className,(this.props.isActive?"open":"")+(this.props.isDisabled?" disabled":"")+(this.props.isActive?" _10gz":"")+(this.props.isDisabled?" _10g-":"")+(!this.props.isMessenger&&!this.props.className?" _5uqy":"")+(this.props.isMessenger?" _3ggc":"")),href:"#",onClick:this.$P2PAbstractSendMoneyButton2,onMouseDown:this.$P2PAbstractSendMoneyButton3,onMouseOver:this.props.onMouseOver,position:"above",role:"button",title:this.$P2PAbstractSendMoneyButton4()},this.getButton())};l.prototype.getButton=function(){if(this.props.button)return this.props.button;return c("React").createElement("i",{className:"_5s8l"})};l.prototype.$P2PAbstractSendMoneyButton4=function(){if(this.props.isDisabled)return null;return i._("Send Money")};f.exports=l}),null);
__d("P2PSendMoneyContainerBootloader.react",["cx","Bootloader","MessengerEnvironment","DeferredComponent.react","MercuryIDs","P2PAbstractSendMoneyButton.react","P2PActions","P2PLoadingMask.react","P2PLogger","P2PPaymentLoggerEvent","P2PPaymentLoggerEventFlow","P2PSendMoneyDialogStore","React","ReactLayeredComponentMixin_DEPRECATED","XUIContextualDialog.react","emptyFunction","getPageIDFromThreadID"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i=c("React").PropTypes,j=c("MessengerEnvironment").messengerui,k=j?282:260,l=c("React").createClass({displayName:"P2PSendMoneyContainerBootloader",propTypes:{button:i.node,className:i.string,ContextualDialog:i.func,flyoutAlignment:i.oneOf(["left","center","right"]),onTrigger:i.func,participantIDs:i.array,referrer:i.string,threadID:i.string},getInitialState:function m(){return{showPlaceholderDialog:false,shouldBootloadImmediately:c("P2PSendMoneyDialogStore").isAnyChatSendViewOpen()}},mixins:[c("ReactLayeredComponentMixin_DEPRECATED")],_clicked:false,_onComponentLoad:c("emptyFunction"),_bootloadCalled:false,_sendMoneyDialogStoreSub:null,log:function m(n,o){c("P2PLogger").log(n,babelHelpers["extends"]({www_event_referrer:this.props.referrer,www_event_flow:c("P2PPaymentLoggerEventFlow").UI_FLOW_P2P_SEND},o))},componentWillUnmount:function m(){this.removeDialogStoreSub()},onDialogStoreChange:function m(){this._bootloadComponentNow();this.removeDialogStoreSub()},removeDialogStoreSub:function m(){if(this._sendMoneyDialogStoreSub){this._sendMoneyDialogStoreSub.remove();this._sendMoneyDialogStoreSub=null}},onPlaceholderClick:function m(){var n=this.props.threadID?c("MercuryIDs").tokenize(this.props.threadID).value:null;this._handleDialogVisibility(!this.state.showPlaceholderDialog);this.log(c("P2PPaymentLoggerEvent").UI_ACTN_SEND_MONEY_BUTTON_PLACEHOLDER_CLICKED,{object_id:n});this._bootloadComponentNow();this._clicked=false},_handleDialogVisibility:function m(n){if(!n)c("P2PActions").chatSendViewClosed({threadID:this.props.threadID});else c("P2PActions").chatSendViewOpened({referrer:this.props.referrer,threadID:this.props.threadID});this.setState({showPlaceholderDialog:n})},renderLayers:function m(){__p&&__p();var n={};if(this.state.showPlaceholderDialog){var o=this.props.ContextualDialog||c("XUIContextualDialog.react");n.placeholderDialog=c("React").createElement(o,{alignment:this.props.flyoutAlignment?this.props.flyoutAlignment:j?"right":"left",contextRef:function(){return this.refs.placeholderButton}.bind(this),onBlur:function(){if(!this._clicked)this._handleDialogVisibility(false);this._clicked=false}.bind(this),ref:"dialog",shown:true,width:k,position:"above"},c("React").createElement("div",{className:"_c_5"},c("React").createElement(c("P2PLoadingMask.react"),{visible:true})))}return n},render:function m(){if(this._isPageChat())return null;return c("React").createElement(c("DeferredComponent.react"),babelHelpers["extends"]({deferredComponent:this._bootloadComponent,deferredPlaceholder:this._renderPlaceholder()},this.props))},_renderPlaceholder:function m(){return c("React").createElement(c("P2PAbstractSendMoneyButton.react"),{button:this.props.button,className:this.props.className,isActive:false,isDisabled:false,isMessenger:j,onClick:this.onPlaceholderClick,onMouseDown:function(){this._clicked=true}.bind(this),onMouseOver:this._bootloadComponentNow,ref:"placeholderButton"})},_bootloadComponent:function m(n){this._onComponentLoad=n.bind(this);if(this.state.shouldBootloadImmediately)this._bootloadComponentNow();else this._sendMoneyDialogStoreSub=c("P2PSendMoneyDialogStore").addListener("change",this.onDialogStoreChange)},_bootloadComponentNow:function m(){if(this._bootloadCalled)return;this._bootloadCalled=true;c("Bootloader").loadModules(["P2PSendMoneyContainer.react"],function(n){this.removeDialogStoreSub();this._onComponentLoad(n);this.setState({showPlaceholderDialog:false})}.bind(this),"P2PSendMoneyContainerBootloader.react")},_isPageChat:function m(){return!!this._getPageID()},_getPageID:function m(){return c("getPageIDFromThreadID")(this.props.threadID)}});f.exports=l}),null);
__d("ChatTabComposer.react",["cssVar","csx","cx","fbt","MercuryBootloadOnInteraction.react","BootloadOnRender.react","ChatComposerFlyoutButtonBootLoader.react","ChatConfig","ChatEventPlanButton.react","ChatInput.react","ChatPhotoUploader.react","CSS","CustomColorHighlighting.react","EventRemindersGating","FantaMessageActions","FantaTypeComposer","JSResource","Keys","LazyComponent.react","MercuryConfig","MercuryIDs","MessengerHotLikeButton.react","MessengerHotLikeChatSVGIcon.react","MessengerHotLikeUtils","MessengerQuickCamButton.react","MessengerQuickCamOrigins","P2PPaymentConfig","P2PSendMoneyContainerBootloader.react","React","MercuryShareAttachmentRenderLocations","StickersActions","XUISpinner.react","clearImmediate","convertMIGColorToFIGColor","getPageIDFromThreadID","gkx","isWebGLEnabled","requireWeak","setImmediate"],(function a(b,c,d,e,f,g,h,i,j,k){"use strict";__p&&__p();var l,m,n=c("React").PropTypes,o=77,p=9,q=c("ChatConfig").get("chat_basic_input_module")||c("ChatInput.react"),r=null;c("requireWeak")("FantaAppStore",function(t){return r=t});l=babelHelpers.inherits(s,c("React").PureComponent);m=l&&l.prototype;function s(){__p&&__p();var t,u;for(var v=arguments.length,w=Array(v),x=0;x<v;x++)w[x]=arguments[x];return u=(t=m.constructor).call.apply(t,[this].concat(w)),this.state={inputHeight:0,p2pPaymentConfig:c("P2PPaymentConfig").config,stickerFlyoutShown:false},this.$ChatTabComposer2=null,this.$ChatTabComposer3=null,this.$ChatTabComposer10=function(y,z){var A=this.props.threadID;if(A)this.$ChatTabComposer1=c("setImmediate")(function(){this.$ChatTabComposer1=null;c("FantaMessageActions").composerTextUpdate(A,y,z)}.bind(this))}.bind(this),this.$ChatTabComposer8=function(y){if(y.keyCode===c("Keys").RETURN)this.refs.emojiButton&&this.refs.emojiButton.hideFlyout();this.props.inputKeyDown&&this.props.inputKeyDown(y)}.bind(this),this.$ChatTabComposer5=function(y){var z=y.target;if(z instanceof Element&&(c("CSS").matchesSelector(z,"._1d4_")||c("CSS").matchesSelector(z,"._552h")||c("CSS").matchesSelector(z,"._552n")))this.refs.input.focus()}.bind(this),this.$ChatTabComposer9=function(y){if(this.state.stickerFlyoutShown)c("StickersActions").hideStickerFlyout();this.props.onEscape&&this.props.onEscape(y)}.bind(this),this.$ChatTabComposer28=function(y,z){if(y.platformFBID.toString()!==c("MercuryConfig").MessengerAppID)this.uploadURL({attribution_app_id:y.platformFBID,errorDialogParams:{body:k._("There was a problem sending this GIF. Choose another one and try again."),title:k._("Couldn't Send GIF")},external_image_url:y.source.url,preview_url:y.media.preview?y.media.preview.url:y.media.thumbnail.url,source:y.source});else this.props.stickerButtonProps&&this.props.stickerButtonProps.onStickerSelect&&this.props.stickerButtonProps.onStickerSelect(y.resultID.toString)}.bind(this),this.$ChatTabComposer29=function(y){this.refs.input&&this.refs.input.insertEmoji&&this.refs.input.insertEmoji(y)}.bind(this),u}s.prototype.render=function(){var t=this.props.disableInput?null:c("React").createElement("ul",{className:"_552n"+(c("gkx")("AT5ZvVwuqKWcfrio0AdnNomF7UAfIh6xykST_qUQlvhzlEwa0D-O1yjSaPSHOODgL1U")?" _22v_":"")},this.$ChatTabComposer4());return c("React").createElement("div",{className:"_1d4_",onClick:this.$ChatTabComposer5,role:"presentation"},this.$ChatTabComposer6(),t)};s.prototype.componentWillUnmount=function(){if(this.$ChatTabComposer1)c("clearImmediate")(this.$ChatTabComposer1)};s.prototype.onSend=function(t){this.refs.input.onSend(t)};s.prototype.uploadURL=function(t){var u=this.$ChatTabComposer2||this.$ChatTabComposer3;if(!u)return;u.uploadURL(t)};s.prototype.isUploading=function(){return!!(this.$ChatTabComposer2&&this.$ChatTabComposer2.isUploading()||this.$ChatTabComposer3&&this.$ChatTabComposer3.isUploading())};s.prototype.getInput=function(){return this.refs.input};s.prototype.$ChatTabComposer6=function(){__p&&__p();var t={};if(this.state.inputHeight)t.minHeight=this.state.inputHeight;var u=null;if(this.props.showStructuredMenu)u=c("React").createElement("div",{className:"_5c6-"},c("React").createElement(c("MercuryBootloadOnInteraction.react"),{component:c("React").createElement(c("LazyComponent.react"),{flyoutAlignment:"left",threadID:this.props.threadID,pageID:this.props.pageID,className:"_5c6_"}),loader:c("JSResource")("MessengerBotMenuButton.react").__setRef("ChatTabComposer.react"),placeholder:c("React").createElement("span",{className:"_5c6_"})}));var v="",w=this.props.threadID,x=void 0;if(w&&r){x=r.getState().mercury.tabContents.get(w);v=x&&x.composer.text||""}var y="";if(this.props.disableInput)y=k._("Composer is disabled for this thread.");else if(this.props.thread&&!this.props.thread.is_canonical)y=k._("Type a message, \u0040name...");else y=k._("Type a message...");return c("React").createElement("div",{className:"_552h",style:t},u,c("React").createElement("div",{className:this.props.showStructuredMenu?"_4yzj":""},c("React").createElement(c("CustomColorHighlighting.react"),{customColor:this.props.thread&&this.props.thread.custom_color},c("gkx")("AT5V6GuV7OE1f4CNmq1NUhZOeDrgnZF-AQ7WoOvZA8jFMJsYzyghwU79Bm31vgH-mi9DAlUGSFnfYvhwjhMfTolYEEzHhgUrhLD2UxTqbooHHw")&&this.$ChatTabComposer7(this.props.threadID),c("React").createElement(q,{composer:this.props.composer,defaultText:v,fileUploader:this.props.fileUploader,initializeThingsWithInputFn:this.props.initializeThingsWithInputFn,inputKeyDown:this.$ChatTabComposer8,onBeforeInput:function(){return this.refs.emojiButton&&this.refs.emojiButton.hideFlyout()}.bind(this),onBlur:this.props.onBlur,onEscape:this.$ChatTabComposer9,onFocus:this.props.onFocus,onTab:this.props.onTab,readOnly:this.props.disableInput,ref:"input",resizeFn:function(z){z=Math.min(z,o);this.setState({inputHeight:z});this.props.resizeFn&&this.props.resizeFn(z)}.bind(this),thread:this.props.thread,threadID:this.props.threadID,onTextChange:this.$ChatTabComposer10,uploadPhotoFn:function(z){this.$ChatTabComposer3&&this.$ChatTabComposer3.uploadFiles([].concat(z))}.bind(this),participants:this.props.participants,placeholder:y,viewer:this.props.viewer}))))};s.prototype.$ChatTabComposer7=function(t){__p&&__p();if(!t)return null;var u=this.props.fileUploader;if(!u)return null;var v=u.get("uploadedFiles");if(v.size==0)return null;var w=this.props.thread,x=w&&w.custom_color?w.custom_color:"#0084ff";return c("React").createElement(c("BootloadOnRender.react"),{component:c("React").createElement(c("LazyComponent.react"),{files:v,small:true,threadID:t,threadCustomColor:x,onClick:this.$ChatTabComposer11}),loader:c("JSResource")("MercuryStageFilePreviewReactComponent").__setRef("ChatTabComposer.react"),placeholder:c("React").createElement(c("XUISpinner.react"),{className:"_2qf"})})};s.prototype.$ChatTabComposer11=function(t,u){c("FantaMessageActions").cancelFileUpload(t,u)};s.prototype.$ChatTabComposer4=function(){__p&&__p();var t=[this.$ChatTabComposer12(),this.$ChatTabComposer13(),this.$ChatTabComposer14(),this.$ChatTabComposer15(),this.$ChatTabComposer16(),this.$ChatTabComposer17(),this.$ChatTabComposer18(),this.$ChatTabComposer19(),this.$ChatTabComposer20()],u=t.filter(Boolean);if(u.length<p){var v=this.$ChatTabComposer21();if(v)u.push(v)}if(u.length<p&&c("EventRemindersGating").shouldShowComposer){var w=this.$ChatTabComposer22();if(w)u.push(w)}return u};s.prototype.$ChatTabComposer12=function(){var t=this.props.photoUploaderProps||{};return c("React").createElement("li",{className:"_13f-",key:"photos"},c("React").createElement(c("ChatPhotoUploader.react"),babelHelpers["extends"]({composer:this.props.composer,onMount:function(u){return this.$ChatTabComposer3=u}.bind(this),imagesOnly:true},t)))};s.prototype.$ChatTabComposer21=function(){var t=c("convertMIGColorToFIGColor")(this.props.thread&&this.props.thread.custom_color),u=this.$ChatTabComposer23();if(u&&this.props.thread&&!this.props.thread.is_canonical)return this.$ChatTabComposer24(t,u);return null};s.prototype.$ChatTabComposer24=function(t,u){return c("React").createElement(c("ChatComposerFlyoutButtonBootLoader.react"),{key:"grouppolling",interactionClassName:"_6gd _13f_",flyoutProps:{customColor:t,threadFBID:u},flyoutAlignment:"left",iconClassName:"_6gb _4tjk",flyoutLoader:c("JSResource")("MessengerGroupPollingFlyoutWrapper.react").__setRef("ChatTabComposer.react"),title:k._("Create a poll")})};s.prototype.$ChatTabComposer18=function(){var t=c("gkx")("AT4VU3LTU_m0y3MeJeai7hJytsOcRy63JbTrv7QtkGDcMH9aN_sV8sDNC1ebrhVq0RfT0H4FEgW5UVoJHsOiHpnF")&&c("isWebGLEnabled")(),u=this.$ChatTabComposer23();return t&&u&&!this.$ChatTabComposer25()?this.$ChatTabComposer26():null};s.prototype.$ChatTabComposer26=function(){return c("React").createElement(c("ChatComposerFlyoutButtonBootLoader.react"),{key:"games",interactionClassName:"_6gd _13ga",flyoutAlignment:"left",iconClassName:"_6gb _4cf0",flyoutProps:{threadFBID:this.$ChatTabComposer23()},flyoutLoader:c("JSResource")("MessengerGamesFlyout.react").__setRef("ChatTabComposer.react"),title:k._("Play a game")})};s.prototype.$ChatTabComposer22=function(){return this.props.threadID&&!this.$ChatTabComposer25()?c("React").createElement("li",{className:"_6gd _13gb",key:"eventPlan"},c("React").createElement(c("ChatEventPlanButton.react"),{threadID:this.props.threadID})):null};s.prototype.$ChatTabComposer17=function(){if(this.props.disableFileUploads)return null;var t=this.props.fileUploaderProps||{};return c("React").createElement("li",{className:"_13gd",key:"files"},c("React").createElement(c("ChatPhotoUploader.react"),babelHelpers["extends"]({composer:this.props.composer,onMount:function(u){return this.$ChatTabComposer2=u}.bind(this)},t)))};s.prototype.$ChatTabComposer13=function(){var t=this.props.stickerButtonProps;if(!t)return null;return this.$ChatTabComposer27()};s.prototype.$ChatTabComposer27=function(){var t=this.props.stickerButtonProps;if(!t)return null;var u={className:"_5e-r",position:"above"};return c("React").createElement(c("ChatComposerFlyoutButtonBootLoader.react"),{flyoutProps:t,dialogProps:u,flyoutAlignment:"right",key:"sticker",interactionClassName:"_6gd _13ge",iconClassName:"_6gb _6gf",flyoutLoader:c("JSResource")("StickersFlyoutWrapper.react").__setRef("ChatTabComposer.react"),title:k._("Choose a sticker")})};s.prototype.$ChatTabComposer14=function(){var t={getQuery:function(){return this.refs.input.getValue()}.bind(this),onSelect:this.$ChatTabComposer28};return c("React").createElement(c("ChatComposerFlyoutButtonBootLoader.react"),{threadID:this.props.threadID,key:"contentSearch",interactionClassName:"_6gd _13gf",flyoutProps:t,flyoutAlignment:"left",iconClassName:"_6gb _6gs",threadFBID:this.$ChatTabComposer23(),flyoutLoader:c("JSResource")("ChatContentSearchFlyoutWrapper.react").__setRef("ChatTabComposer.react"),title:k._("Choose a gif")})};s.prototype.$ChatTabComposer15=function(){var t={onSelect:this.$ChatTabComposer29,getInput:function(){return this.refs.input}.bind(this)};return c("React").createElement(c("ChatComposerFlyoutButtonBootLoader.react"),{threadID:this.props.threadID,key:"emoji",interactionClassName:"_6gd _13gg",flyoutAlignment:"left",iconClassName:"_6gb _3oxr",threadFBID:this.$ChatTabComposer23(),flyoutLoader:c("JSResource")("ChatEmojiFlyout.react").__setRef("ChatTabComposer.react"),dialogProps:{offsetY:10},flyoutProps:t,title:k._("Choose an emoji")})};s.prototype.$ChatTabComposer20=function(){var t=this.props.thread,u=c("convertMIGColorToFIGColor")(t&&t.custom_color)||"",v=c("MessengerHotLikeChatSVGIcon.react"),w="_6gb";return c("React").createElement("li",{className:"_6gd _5ep3 _13gi",key:"like"},c("React").createElement(c("MessengerHotLikeButton.react"),{className:w,customColor:u,customLike:c("MessengerHotLikeUtils").getCustomEmojiFromThread(t)||undefined,CustomRenderer:v,location:c("MercuryShareAttachmentRenderLocations").CHAT,renderSize:16,sendSticker:this.props.stickerButtonProps&&this.props.stickerButtonProps.onStickerSelect,sendCustomLike:this.props.onCustomLikeSelect,threadID:this.props.threadID}))};s.prototype.$ChatTabComposer16=function(){if(!this.props.p2pProps||!this.props.showP2PButton||this.$ChatTabComposer25())return null;var t=this.props.p2pProps;t.threadID=this.props.threadID;t.p2pPaymentConfig=this.state.p2pPaymentConfig;if(this.props.participantIDs&&this.props.participantIDs.length)t.participantIDs=this.props.participantIDs;return c("React").createElement("li",{className:"_6gd _13gj",key:"p2p"},c("React").createElement(c("P2PSendMoneyContainerBootloader.react"),t))};s.prototype.$ChatTabComposer19=function(){__p&&__p();var t=this.props.threadID;if(c("MercuryIDs").isLocalThread(this.props.threadID)||!t)return null;var u={className:"_6gb _5yhk",threadID:t,location:undefined,viewer:undefined},v=c("gkx")("AT44XpsdaaEfcz2GrZ0m8RNEjrTHpQedGRhxmeB3oGdMvETdQ7vdyzqg8MlOqQGInNDXydDTyvvVR5lvi3VlBp7t");if(v){u.location=c("MessengerQuickCamOrigins").CHAT_TAB;u.viewer=this.props.viewer}var w=!v?c("React").createElement(c("MessengerQuickCamButton.react"),u):c("React").createElement(c("MercuryBootloadOnInteraction.react"),{component:c("React").createElement(c("LazyComponent.react"),u),loader:c("JSResource")("MessengerQuickCamButtonHTML5.react").__setRef("ChatTabComposer.react"),placeholder:c("React").createElement("span",{className:u.className})});return c("React").createElement("li",{className:"_6gd _13gk",key:"quickcam"},w)};s.prototype.$ChatTabComposer25=function(){return!!this.$ChatTabComposer30()};s.prototype.$ChatTabComposer30=function(){return c("getPageIDFromThreadID")(this.props.threadID)};s.prototype.$ChatTabComposer23=function(){if(this.props.threadID&&!c("MercuryIDs").isLocalThread(this.props.threadID))return c("MercuryIDs").getThreadFBIDFromThreadID(this.props.threadID);if(this.props.thread&&this.props.thread.thread_fbid)return this.props.thread.thread_fbid;return null};s.prototype.replyToMention=function(t){this.refs.input&&this.refs.input.addMention&&this.refs.input.addMention(t)};s.propTypes={composer:n.object.isRequired,disableInput:n.bool.isRequired,disableFileUploads:n.bool,fileUploaderProps:n.object,initializeThingsWithInputFn:n.func,inputKeyDown:n.func,onBlur:n.func,onCustomLikeSelect:n.func,onEmojiSelect:n.func,onEscape:n.func,onFocus:n.func,onTab:n.func,p2pProps:n.object,pageID:n.string,participantIDs:n.arrayOf(n.string),photoUploaderProps:n.object,resizeFn:n.func,showP2PButton:n.bool,showStructuredMenu:n.bool.isRequired,stickerButtonProps:n.object,thread:n.object,threadID:n.string,uploadPhotoFn:n.func,viewer:n.string};f.exports=s}),null);
__d("ChatTabComposerContainer.react",["cx","fbt","Bootloader","ChatTabComposer.react","MercuryIDs","MercuryThreads","MercuryMessageActions","MessengerBotMenuDataFetcher","MercuryParticipants","MNCommercePageSetting","P2PGKValues","ReactComponentWithPureRenderMixin","React","MercuryShareAttachmentRenderLocations","SearchableEntry","SimpleXUIDialog","StoreAndPropBasedStateMixin","getPageIDFromThreadID","getThreadTypeNameFromThreadType","nullthrows","setImmediate"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j="right",k=c("React").PropTypes,l=c("React").createClass({displayName:"ChatTabComposerContainer",mixins:[c("ReactComponentWithPureRenderMixin"),c("StoreAndPropBasedStateMixin")(c("MercuryThreads"),c("MercuryParticipants"))],propTypes:{composer:k.object.isRequired,disableInput:k.bool.isRequired,fileUploader:k.object,threadID:k.string,viewer:k.string.isRequired,onFileUploadFail:k.func,onPhotoUploadFail:k.func,onStickerSelect:k.func,onUploadCancel:k.func,onUploadComplete:k.func,onUploadSubmit:k.func},statics:{calculateState:function m(n){var o=c("MercuryThreads").getForFBID(n.viewer),p=n.threadID?o.getOrFetch(n.threadID):null,q=c("P2PGKValues").P2PVisible&&n.viewer!==c("MercuryIDs").getUserIDFromThreadID(n.threadID),r=c("getPageIDFromThreadID")(n.threadID),s=r===null||r===undefined?false:c("MessengerBotMenuDataFetcher").getHasPageSetting(r,function(){},function(){},c("MNCommercePageSetting").STRUCTURED_MENU_ENABLED),t=p&&p.participants?p.participants.map(c("MercuryParticipants").getOrFetch,c("MercuryParticipants")):[];return{thread:p,participants:t,showP2PButton:q,pageID:r,showStructuredMenu:s}}},componentDidMount:function m(){this.props.onMount(this);if(this.state.pageID)c("MessengerBotMenuDataFetcher").getHasPageSetting(this.state.pageID,function(n){this.setState({showStructuredMenu:n})}.bind(this),function(){this.setState({showStructuredMenu:false})}.bind(this),c("MNCommercePageSetting").STRUCTURED_MENU_ENABLED)},componentWillReceiveProps:function m(n){if(n.threadID!==this.props.threadID)this.setState({participantIDs:[],participants:[]})},render:function m(){return c("React").createElement(c("ChatTabComposer.react"),babelHelpers["extends"]({composer:this.props.composer,fileUploader:this.props.fileUploader,fileUploaderProps:this._getFileUploaderProps(),ref:"composer",thread:this.state.thread},this.props,{disableInput:this.props.disableInput,p2pProps:this._getP2PProps(),pageID:this.state.pageID,participantIDs:this.state.participantIDs,participants:this.state.participants,photoUploaderProps:this._getPhotoUploaderProps(),showP2PButton:this.state.showP2PButton,showStructuredMenu:this.state.showStructuredMenu,stickerButtonProps:this._getStickerButtonProps()}))},onSend:function m(n){var o,p=this;if(n&&n.profile_ranges&&n.profile_ranges.length)(function(){var q=n,r=p.state,s=r.thread,t=r.participants;c("Bootloader").loadModules(["MessengerMentionsTypedLogger","MessengerMentionsLoggerEvents"],function(u,v){new u().setEvent(v.MENTION).setGroupSize(t&&t.length).setNumDelivered((q.profile_ranges||[]).length).setThreadid(s&&s.thread_id).setThreadType(c("getThreadTypeNameFromThreadType")(s&&s.thread_type)).setOfflineThreadid(q.offline_threading_id).log()},"ChatTabComposerContainer.react")})();if(this.refs.composer)this.refs.composer.onSend(n)},setParticipantIDs:function m(n){n=n||[];this.setState({participantIDs:n})},getInput:function m(){return this.refs.composer.getInput()},isUploading:function m(){return this.refs.composer.isUploading()},_getP2PProps:function m(){if(!this.state.showP2PButton)return{};return{button:c("React").createElement("i",{className:"hidden_elem"}),className:"_6ga _6gb",flyoutAlignment:j,referrer:c("MercuryShareAttachmentRenderLocations").CHAT,threadID:this.props.threadID,onTrigger:this.props.onP2PTrigger}},_getStickerButtonProps:function m(){var n={className:"_6gb _6gf",flyoutAlignment:j,threadID:this.props.threadID,onStickerSelect:this.props.onStickerSelect};return n},_getPhotoUploaderProps:function m(){var n={className:"_6gd",customUI:true,imageClassName:"hidden_elem",linkClassName:"_6gb _6ge",threadID:this.props.threadID,onLastUploadCancel:this._handleUploadCancel,onAllUploadsComplete:this._handleUploadComplete,onLastUploadFail:this._handlePhotoUploadFail,onUploadError:this._handleUploadError,onSubmit:this._handleUploadSubmit};return n},_getFileUploaderProps:function m(){var n=this._getPhotoUploaderProps();n.linkClassName="_6gb _6gg";n.imagesOnly=false;n.onLastUploadFail=this._handleFileUploadFail;return n},_handleUploadComplete:function m(n,o){c("MercuryMessageActions").getForFBID(this.props.viewer).confirmAttachmentPlaceholder(o.upload_id,o);this.props.onUploadComplete&&this.props.onUploadComplete(o)},_handleUploadError:function m(n){var o=void 0,p=void 0;switch(n.error){case"size-exceeded":o=i._("The file you have selected is too large");p=i._("The file you have selected is too large. The maximum size is 25MB.");break;default:o=i._("File Upload Failed");p=i._("There was a problem uploading the file.")}this._showErrorDialog(o,p);this.props.onFileUploadFail&&this.props.onFileUploadFail(n)},_handleUploadCancel:function m(n,o){c("MercuryMessageActions").getForFBID(this.props.viewer).cancelAttachmentPlaceholder(o.upload_id,o);this.props.onUploadCancel&&this.props.onUploadCancel(o)},_handleFileUploadFail:function m(n,o){c("MercuryMessageActions").getForFBID(this.props.viewer).cancelAttachmentPlaceholder(o.upload_id,o);var p=i._("File Upload Failed"),q=i._("There was a problem uploading the file.");if(o.errorDialogParams){p=o.errorDialogParams.title||p;q=o.errorDialogParams.body||q}this._showErrorDialog(p,q);this.props.onFileUploadFail&&this.props.onFileUploadFail(o)},_handlePhotoUploadFail:function m(n,o){c("MercuryMessageActions").getForFBID(this.props.viewer).cancelAttachmentPlaceholder(o.upload_id,o);var p=i._("Upload Failed"),q=i._("Please try again. Make sure you are uploading a valid file.");if(o.errorDialogParams){p=o.errorDialogParams.title||p;q=o.errorDialogParams.body||q}this._showErrorDialog(p,q);this.props.onPhotoUploadFail&&this.props.onPhotoUploadFail(o)},_handleUploadSubmit:function m(n,o){this.props.onUploadSubmit&&this.props.onUploadSubmit(o)},_showErrorDialog:function m(n,o){c("SimpleXUIDialog").show(o,n)},_handleReplyToMention:function m(n,event){if(event.threadID===this.props.threadID)c("MercuryParticipants").get(event.participantID,function(o){if(!o||!this.refs.composer)return;var p=new(c("SearchableEntry"))({uniqueID:c("nullthrows")(o.fbid),title:"@"+o.name});c("setImmediate")(function(){this.refs.composer.getInput().focus();this.refs.composer.replyToMention&&this.refs.composer.replyToMention(p)}.bind(this))}.bind(this))}});f.exports=l}),null);
__d("ChatTitleLink.react",["cx","ChatEditParticipantsUtils","Link.react","MercuryThreads","MercuryThreadTitle.react","MessengerAdminGroupUtils","React","TrackingNodes","UserAgent","goURI"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i=c("MercuryThreads").get(),j=c("React").PropTypes,k=c("React").createClass({displayName:"ChatTitleLink",propTypes:{href:j.string,thread:j.object,viewer:j.string},getDefaultProps:function m(){return{href:null}},getTitle:function m(){return this.refs.threadTitle.getTitle()},render:function m(){if(!this.props.thread)return null;var n=this.props,o=n.href,p=n.thread,q=n.viewer,r=babelHelpers.objectWithoutProperties(n,["href","thread","viewer"]);return c("React").createElement(l,babelHelpers["extends"]({className:"titlebarText"+(c("UserAgent").isBrowser("Chrome")&&!c("UserAgent").isPlatform("Windows")?" fixemoji":"")+(o===null?" noLink":""),"data-ft":c("TrackingNodes").getTrackingInfo(c("TrackingNodes").types.TITLE),"data-hover":"tooltip",onClick:function(s){return this._handleClick(s)}.bind(this),href:o},r),c("React").createElement(c("MercuryThreadTitle.react"),{ref:"threadTitle",isNewThread:i.isNewEmptyLocalThread(p.thread_id),thread:p,useAndSeparator:true,useShortName:!p.is_canonical,viewer:q}))},_handleClick:function m(n){var o=this.props,p=o.href,q=o.thread;if(!p)return;if(q&&q.associated_object)c("goURI")(p);else if(c("MessengerAdminGroupUtils").showParticipantsModal(q.is_canonical,i.isEmptyLocalThread(q.thread_id),q)){c("ChatEditParticipantsUtils").showParticipantsModal(q.thread_id);n.preventDefault()}}}),l=function l(m){return m.href?c("React").createElement(c("Link.react"),m):c("React").createElement("span",m)};f.exports=k}),null);
__d("ChatTabHeader.react",["cx","fbt","AutoFocusableLink.react","Bootloader","MercuryBootloadOnInteraction.react","BootloadOnRender.react","ChatCloseButton.react","ChatConfig","ChatTitleLink.react","EventPlanExperiment","EventReminderStateStore","FantaTypeComposer","JSResource","LayerFadeOnHide","LazyComponent.react","LoadOnRender.react","MercuryThreadInfo","MercuryTypingAnimation.react","MessengerAdminGroupUtils","MessengerJoinableModeType","React","SimpleNUXMessage","TooltipData","XUIAmbientNUX.react","requireWeak","gkx"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j,k,l=c("React").PropTypes,m="118809038721180",n=function n(q){c("Bootloader").loadModules(["ArchiveWarningReact.bs"],function(r){var s=r.jsComponent;return q(s)},"ChatTabHeader.react")},o=c("gkx")("AT7esXHVKl_rB1r5C-zEkmCVhZJMRd4NQJBo-b1EyRH6vUNk2XZEcNJ3WOEvumLbmsR6a_bwkl5o0d60WUY3jm1v");j=babelHelpers.inherits(p,c("React").PureComponent);k=j&&j.prototype;function p(q){__p&&__p();k.constructor.call(this,q);this.$ChatTabHeader1=false;this.$ChatTabHeader4=function(){for(var r=arguments.length,s=Array(r),t=0;t<r;t++)s[t]=arguments[t];this.props.onClick.apply(null,s)}.bind(this);this.$ChatTabHeader14=function(){return this.refs.menu}.bind(this);this.$ChatTabHeader15=function(){c("SimpleNUXMessage").markMessageSeenByUser(m);this.setState({eventPlanNuxSeen:true})}.bind(this);this.state={eventPlanNuxSeen:c("SimpleNUXMessage").hasUserSeenMessage(m)}}p.prototype.componentDidMount=function(){this.$ChatTabHeader1=true;c("requireWeak")("ChatVideoCallButton.react",function(q){if(this.$ChatTabHeader1)this.setState({RTCComponent:q})}.bind(this))};p.prototype.componentWillUnmount=function(){this.$ChatTabHeader1=false};p.prototype.render=function(){var q=this.$ChatTabHeader3(),r=this.props.isRaised;return c("React").createElement("div",{className:"_15p4"+(!this.props.isRaised?" _15p5":"")+(r||!q?" _2pis":""),onMouseUp:this.$ChatTabHeader4,ref:"root"},c("React").createElement("div",{"aria-level":"2",className:"titlebarTextWrapper _15p6",role:"heading"},c("React").createElement("div",{className:"_61td",role:r?"presentation":"button",tabIndex:r?-1:0},q,this.$ChatTabHeader5()),this.props.isTyping&&!this.props.isRaised?c("React").createElement(c("MercuryTypingAnimation.react"),{className:"_15p8",color:"dark"}):null),c("React").createElement("ul",{className:"_32ca"+(o?" _2qi8":"")},this.$ChatTabHeader6(),c("React").createElement("li",{className:"_32cb"},c("React").createElement(c("ChatCloseButton.react"),{active:this.props.isActive,className:"_3olu _3olv",onClick:this.props.onCloseClick}))))};p.prototype.focus=function(){this.refs.root&&this.refs.root.focus()};p.prototype.$ChatTabHeader6=function(){if(!this.props.isRaised)return null;var q=[this.$ChatTabHeader7(),this.$ChatTabHeader8(),this.$ChatTabHeader9(),this.$ChatTabHeader10(),this.$ChatTabHeader11(),this.$ChatTabHeader12()];return q.filter(Boolean)};p.prototype.$ChatTabHeader11=function(){return this.$ChatTabHeader13({isAudio:true})};p.prototype.$ChatTabHeader10=function(){return this.$ChatTabHeader13({isAudio:false})};p.prototype.$ChatTabHeader13=function(q){__p&&__p();if(this.props.isEmptyChat)return null;var r=this.props,s=r.isGroupChat,t=r.onRTCNuxCloseButtonClick,u=r.rtcNuxShown,v=r.thread,w=r.threadID,x=r.viewer;if(s){if(!v||v.participants.length<=1||!c("MercuryThreadInfo").canReply(v))return null;if(v.joinable_mode&&v.joinable_mode.mode===c("MessengerJoinableModeType").JOINABLE)return null;if(q.isAudio){if(!c("ChatConfig").get("rtc_conferencing_www"))return null}else if(!c("ChatConfig").get("rtc_conferencing_www_video"))return null}var y=babelHelpers["extends"]({isGroupChat:s,onRTCNuxCloseButtonClick:t,rtcCallData:v&&v.rtc_call_data,rtcNuxShown:u&&q.isAudio,threadID:w,thread:v,viewer:x},q);y.className="_3olv"+(y.isAudio?" _2fpc":"")+(!y.isAudio?" _2fpd":"");var z=this.state.RTCComponent;return c("React").createElement("li",{className:"_3a61"+(y.isAudio?" _461a":"")+(!y.isAudio?" _461b":""),key:"rtc"+(y.isAudio?"audio":"video")},z?c("React").createElement(z,y):c("React").createElement(c("MercuryBootloadOnInteraction.react"),{component:c("React").createElement(c("LazyComponent.react"),y),loader:c("JSResource")("ChatVideoCallButton.react").__setRef("ChatTabHeader.react"),placeholder:c("React").createElement(c("AutoFocusableLink.react"),{className:y.className,role:"button"})}))};p.prototype.$ChatTabHeader12=function(){__p&&__p();if(this.props.isEmptyChat)return null;var q=babelHelpers["extends"]({attachmentsShelf:this.props.attachmentsShelf,composer:this.props.composer,isEmptyChat:this.props.isEmptyChat,isGroupChat:this.props.isGroupChat,isMultiCompany:this.props.isMultiCompany,isMuted:this.props.isMuted,isPageChat:this.props.isPageChat,nameConversationFunc:this.props.nameConversationFunc,otherUserID:this.props.otherUserID,participants:this.props.participants,sheetController:this.props.sheetController,showAddFriend:this.props.showAddFriend,thread:this.props.thread,threadID:this.props.threadID,viewer:this.props.viewer},this.props.additionalMenuProps);q.className="_3olv _1ll-";var r=i._("Options"),s=false;if(this.props.threadID){var t=c("EventReminderStateStore").getEvent(this.props.threadID);s=t&&!t.exists&&!this.state.eventPlanNuxSeen&&c("EventPlanExperiment").shouldShowEntryPointNuxWithExposure()}return c("React").createElement("div",{key:"menu"},c("React").createElement("li",{className:"_3a61 _461_",ref:"menu"},c("React").createElement(c("MercuryBootloadOnInteraction.react"),{component:c("React").createElement(c("LazyComponent.react"),q),loader:c("JSResource")("ChatTabMenu.react").__setRef("ChatTabHeader.react"),placeholder:c("React").createElement(c("AutoFocusableLink.react"),{className:q.className,"aria-label":r,role:"button"})})),c("React").createElement(c("XUIAmbientNUX.react"),{alignment:"right",behaviors:{LayerFadeOnHide:c("LayerFadeOnHide")},contextRef:this.$ChatTabHeader14,onCloseButtonClick:this.$ChatTabHeader15,shown:s,width:"auto"},i._("Click here to start a new plan.")))};p.prototype.$ChatTabHeader9=function(){if(this.props.isPageChat||this.props.isEmptyChat||this.props.isMultiCompany&&!this.props.isGroupChat)return null;var q={className:"_3olv _3jyj",isFBAtWork:this.props.isWorkUser,shouldAddToApprovalQueue:c("MessengerAdminGroupUtils").shouldAddToApprovalQueue(this.props.thread,this.props.viewer),shown:true,onClick:function(){return this.props.sheetController.openAddFriendsSheet()}.bind(this)},r=i._("Add");return c("React").createElement("li",{className:"_3a61 _4620",key:"add"},c("React").createElement(c("MercuryBootloadOnInteraction.react"),{component:c("React").createElement(c("LazyComponent.react"),q),loader:c("JSResource")("ChatAddToThreadButton.react").__setRef("ChatTabHeader.react"),placeholder:c("React").createElement(c("AutoFocusableLink.react"),{"aria-label":r,className:q.className,role:"button"})}))};p.prototype.$ChatTabHeader7=function(){if(!this.props.isViewerEmployee)return null;var q=this.props.participants,r=q?q.length>0&&q.every(function(s){return!!(s&&s.employee)}):false;if(!r)return null;return c("React").createElement("li",{key:"archiveWarning"},c("React").createElement(c("LoadOnRender.react"),{component:c("React").createElement(c("LazyComponent.react"),{shown:true}),loader:n,placeholder:c("React").createElement("div",null)}))};p.prototype.$ChatTabHeader8=function(){if(!this.props.isWorkUser||!this.props.isMultiCompany)return null;var q=i._("Multi company chat");return c("React").createElement("li",{key:"multiCompanyBadge"},c("React").createElement("div",{className:"_3olv"},c("React").createElement(c("AutoFocusableLink.react"),babelHelpers["extends"]({className:"_kp6",onClick:this.props.onClick,lable:q,role:"presentation"},c("TooltipData").propsFor(q,"above")))))};p.prototype.$ChatTabHeader16=function(){return c("React").createElement("span",{className:"_3a61"+(!this.props.isRaised?" _3-99":"")},c("React").createElement("span",{className:"_3olv _2nlt"}))};p.prototype.$ChatTabHeader5=function(){return c("React").createElement(c("ChatTitleLink.react"),babelHelpers["extends"]({href:this.props.isRaised?this.props.href:undefined,thread:this.props.thread,viewer:this.props.viewer},c("TooltipData").propsFor(this.props.tooltip,"above")))};p.prototype.$ChatTabHeader3=function(){var q=this.props,r=q.isRaised,s=q.thread;if(!r&&s&&s.unread_count>0)return c("React").createElement(c("BootloadOnRender.react"),{component:c("React").createElement(c("LazyComponent.react"),{className:"_3-8_ _3-99",count:s.unread_count,type:"special"}),loader:c("JSResource")("XUIBadge.react").__setRef("ChatTabHeader.react"),placeholder:c("React").createElement("span",null)});return this.$ChatTabHeader16()};p.propTypes={additionalMenuProps:l.object,attachmentsShelf:l.object.isRequired,composer:l.object,href:l.string,isActive:l.bool.isRequired,isEmptyChat:l.bool,isGroupChat:l.bool,isMuted:l.bool,isPageChat:l.bool,isRaised:l.bool,isTyping:l.bool,isViewerEmployee:l.bool,isWorkUser:l.bool,nameConversationFunc:l.func.isRequired,onClick:l.func.isRequired,onCloseClick:l.func.isRequired,onRTCNuxCloseButtonClick:l.func.isRequired,otherUserID:l.string,participants:l.arrayOf(l.object),rtcNuxShown:l.bool.isRequired,sheetController:l.object.isRequired,showAddFriend:l.func.isRequired,thread:l.object,threadID:l.string,tooltip:l.string,viewer:l.string.isRequired};f.exports=p}),null);
__d("getGroupNameTooltipFromParticipantIDs",["fbt","MercuryParticipants","MercuryViewer"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i=10,j="\n";function k(m,n){__p&&__p();var o=[],p=c("MercuryViewer").getID();m=m&&m.filter(function(s){return s!==p});if(!m||!m.length){n(null);return}var q=m.length,r=q-i;if(r>1)m=m.slice(0,i);c("MercuryParticipants").getMulti(m,function(s){for(var t in s){var u=s[t];o.push(u.name)}if(r>1){var v=h._("and {number of hidden chat participants} more.",[h.param("number of hidden chat participants",r)]);o.push(v)}n(o.join(j))})}function l(m){__p&&__p();var n=[],o=c("MercuryViewer").getID();m=m&&m.filter(function(r){return r!==o});if(!m||!m.length)return null;n=m.map(function(r){var s=c("MercuryParticipants").getOrFetch(r);return s&&s.name}).filter(function(r){return!!r});var p=m.length-(m.length-n.length)-i;if(p>1){n=n.slice(0,i);var q=h._("and {number of hidden chat participants} more.",[h.param("number of hidden chat participants",p)]);n.push(q)}return n.join(j)}f.exports={getGroupNameTooltipFromParticipantIDs:l,getGroupNameTooltipFromParticipantIDsAsync:k}}),null);
__d("getTitleHrefFromThreadID",["MercuryIDs","MercuryParticipants","WebMessengerThreadPermalinks"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();function h(i,j){__p&&__p();if(c("MercuryIDs").isLocalThread(i)){j();return}var k=c("MercuryIDs").getUserIDFromThreadID(i);if(k)c("MercuryParticipants").get(c("MercuryIDs").getParticipantIDFromUserID(k),function(l){if(l.href)j(l.href);else j(c("WebMessengerThreadPermalinks").getThreadURIFromUserID(k))});else c("WebMessengerThreadPermalinks").getThreadURI(i,j)}f.exports=h}),null);
__d("ChatTabHeaderContainer.react",["ChatTabHeader.react","CurrentUser","FantaTypeComposer","MercuryIDs","MercuryParticipants","MercuryThreadInfo","MercuryThreads","React","SubscriptionsHandler","WorkModeConfig","getPageIDFromThreadID","getGroupNameTooltipFromParticipantIDs","getTitleHrefFromThreadID"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h,i,j=c("getGroupNameTooltipFromParticipantIDs").getGroupNameTooltipFromParticipantIDs,k=c("React").PropTypes;h=babelHelpers.inherits(l,c("React").PureComponent);i=h&&h.prototype;function l(m){i.constructor.call(this,m);this.$ChatTabHeaderContainer1=new(c("SubscriptionsHandler"))();this.state=this.calculateState(m)}l.prototype.calculateState=function(m){__p&&__p();var n=false,o=true,p=false,q=void 0,r=void 0,s=void 0,t=void 0,u=void 0;if(m.threadID){var v=c("MercuryThreads").getForFBID(m.viewer);t=v.getOrFetch(m.threadID);n=c("MercuryIDs").isGroupChat(m.threadID);o=v.isNewEmptyLocalThread(m.threadID);p=!!t&&c("MercuryThreadInfo").isMuted(t);q=c("MercuryIDs").getUserIDFromThreadID(m.threadID);r=c("getPageIDFromThreadID")(m.threadID);if(t){s=t.participants.map(c("MercuryParticipants").getOrFetch,c("MercuryParticipants"));u=j(t.participants)}}var w=this.state&&this.state.additionalMenuProps||{};if(m)w=babelHelpers["extends"]({},w,m.additionalMenuProps);return{additionalMenuProps:w,isEmptyChat:o,isGroupChat:n,isMuted:p,otherUserID:q,pageID:r,participants:s,thread:t,tooltip:u}};l.prototype.componentWillMount=function(){this.$ChatTabHeaderContainer1.addSubscriptions(c("MercuryThreads").addListener("change",function(){this.setState(this.calculateState(this.props))}.bind(this)),c("MercuryParticipants").addListener("change",function(){this.setState(this.calculateState(this.props))}.bind(this)))};l.prototype.componentDidMount=function(){this.$ChatTabHeaderContainer2();this.props.onMount&&this.props.onMount(this)};l.prototype.componentWillReceiveProps=function(m){if(m.threadID!==this.props.threadID)this.$ChatTabHeaderContainer2();this.setState(this.calculateState(m))};l.prototype.componentWillUnmount=function(){this.$ChatTabHeaderContainer1.release()};l.prototype.render=function(){return c("React").createElement(c("ChatTabHeader.react"),{additionalMenuProps:this.state.additionalMenuProps,attachmentsShelf:this.props.attachmentsShelf,composer:this.props.composer,href:this.state.href,isActive:this.props.isActive,isEmptyChat:this.state.isEmptyChat,isGroupChat:this.state.isGroupChat,isMultiCompany:this.props.isMultiCompany,isMuted:this.state.isMuted,isPageChat:!!this.state.pageID,isRaised:this.props.isRaised,isTyping:this.props.isTyping,isViewerEmployee:c("CurrentUser").isEmployee(),isWorkUser:!!c("WorkModeConfig").is_work_user,nameConversationFunc:this.props.nameConversationFunc,onClick:this.props.onClick,onCloseClick:this.props.onCloseClick,onRTCNuxCloseButtonClick:this.props.onRTCNuxCloseButtonClick,otherUserID:this.state.otherUserID,participants:this.state.participants,ref:"header",rtcNuxShown:this.props.rtcNuxShown,sheetController:this.props.sheetController,showAddFriend:this.props.showAddFriend,thread:this.state.thread,threadID:this.props.threadID,tooltip:this.state.tooltip,viewer:this.props.viewer})};l.prototype.focus=function(){this.refs.header.focus()};l.prototype.setAdditionalMenuProps=function(m){var n=babelHelpers["extends"]({},this.state.additionalMenuProps,m);this.setState({additionalMenuProps:n})};l.prototype.$ChatTabHeaderContainer2=function(){c("getTitleHrefFromThreadID")(this.props.threadID,function(m){return this.setState({href:m})}.bind(this))};l.propTypes={additionalMenuProps:k.object,attachmentsShelf:k.object.isRequired,composer:k.object,isActive:k.bool.isRequired,isRaised:k.bool,isTyping:k.bool,nameConversationFunc:k.func.isRequired,onClick:k.func.isRequired,onCloseClick:k.func.isRequired,onMount:k.func,onRTCNuxCloseButtonClick:k.func.isRequired,rtcNuxShown:k.bool.isRequired,sheetController:k.object.isRequired,showAddFriend:k.func.isRequired,threadID:k.string,viewer:k.string.isRequired};f.exports=l}),null);
__d("XGroupCallNuxController",["XController"],(function a(b,c,d,e,f,g){f.exports=c("XController").create("/groupcall/nux/",{action:{type:"String",required:true}})}),null);
__d("FantaChatHeaderContainer.react",["cx","AsyncRequest","ChatTabHeaderContainer.react","FantaTabActions","FantaTabSheetActions","FantaTypeComposer","MercuryBlockedParticipants.bs","MercuryConfig","MercuryIDs","MercuryParticipants","MercuryThreadInfo","MercuryThreads","MessageRequestUtils","React","XGroupCallNuxController","isEmpty"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i,j,k=c("MercuryThreads").get(),l=c("React").PropTypes;i=babelHelpers.inherits(m,c("React").Component);j=i&&i.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=j.constructor).call.apply(n,[this].concat(q)),this.$FantaChatHeaderContainer1=false,this.state={rtcNuxShown:false},this.$FantaChatHeaderContainer5=function(){var s=this.props.threadID;c("FantaTabSheetActions").openAddMoreFriendsSheet(s)}.bind(this),this.$FantaChatHeaderContainer4=function(){var s=this.props.threadID;c("FantaTabSheetActions").openNameConversationSheet(s)}.bind(this),this.$FantaChatHeaderContainer6=function(){var s=this.props.threadID;c("FantaTabSheetActions").openAddMoreFriendsSheet(s)}.bind(this),this.$FantaChatHeaderContainer8=function(){this.props.onClose&&this.props.onClose()}.bind(this),this.$FantaChatHeaderContainer7=function(event){this.$FantaChatHeaderContainer3();var s=event.target;if(!s)return;if(s.getAttribute("role")==="presentation"||s.classList&&(s.classList.contains("_15p6")||s.classList.contains("_2nlt")||s.classList.contains("_14lt"))){event.preventDefault();c("FantaTabActions").minimizeTab(this.props.threadID)}}.bind(this),this.$FantaChatHeaderContainer3=function(){if(this.state.rtcNuxShown&&this.$FantaChatHeaderContainer1){this.setState({rtcNuxShown:false});var s=c("XGroupCallNuxController").getURIBuilder().setString("action","dismiss").getURI();new(c("AsyncRequest"))(s).send()}}.bind(this),o}m.prototype.shouldComponentUpdate=function(n,o){var p=this.props,q=this.state;return p.viewer!==n.viewer||p.threadID!==n.threadID||p.isLastGroupTab!==n.isLastGroupTab||p.thread!==n.thread||q.rtcNuxShown!==o.rtcNuxShown||p.customColor!==n.customColor};m.prototype.componentDidMount=function(){this.$FantaChatHeaderContainer1=true;this.$FantaChatHeaderContainer2()};m.prototype.componentWillUnmount=function(){this.$FantaChatHeaderContainer3();this.$FantaChatHeaderContainer1=false};m.prototype.render=function(){var n=this.props,o=n.isFocused,p=n.thread,q=n.threadID,r=n.viewer,s=n.customColor,t=this.state.rtcNuxShown,u=!!p&&c("MercuryThreadInfo").isMuted(p),v=c("MercuryIDs").getParticipantIDFromFromThreadID(q),w=v?c("MercuryParticipants").getNow(v):null,x=w&&w.is_business_enabled,y=p&&c("MercuryThreadInfo").showComposer(p)&&!c("isEmpty")(p.participants)&&!c("MessageRequestUtils").isMessageRequest(p)&&!c("MercuryConfig").ViewerIsReadOnly&&!(c("MercuryConfig").ColdOpenBlock&&(c("MercuryThreadInfo").isColdOpen(p)||c("MercuryThreadInfo").isEmptyLocalThread(p))),z=p&&c("MercuryBlockedParticipants.bs").get().isMessageBlocked(p),A=k.isNewEmptyLocalThread(q),B=p&&p.message_count===0,C={hasMessageBlocked:z,isBusinessEnabled:x,isEmptyChat:A,isEmptyConversation:B,isMuted:u,show:y},D=s?{color:s}:null;return c("React").createElement("div",{className:"clearfix fbNubFlyoutTitlebar titlebar"+(!!s?" _1m34":""),style:D},c("React").createElement(c("ChatTabHeaderContainer.react"),{composer:this.props.composer,additionalMenuProps:C,attachmentsShelf:document.createElement("div"),isActive:o,isRaised:true,isTyping:false,nameConversationFunc:this.$FantaChatHeaderContainer4,rtcNuxShown:t,sheetController:{openAddFriendsSheet:this.$FantaChatHeaderContainer5},showAddFriend:this.$FantaChatHeaderContainer6,threadID:q,viewer:r,onClick:this.$FantaChatHeaderContainer7,onCloseClick:this.$FantaChatHeaderContainer8,onRTCNuxCloseButtonClick:this.$FantaChatHeaderContainer3,isMultiCompany:this.props.isMultiCompany}))};m.prototype.$FantaChatHeaderContainer9=function(n){return n.length>0&&n.every(function(o){var p=c("MercuryParticipants").getNow(o);return!!(p&&p.employee)})};m.prototype.$FantaChatHeaderContainer2=function(){if(this.props.isLastGroupTab){var n=c("XGroupCallNuxController").getURIBuilder().setString("action","should_show").getURI();new(c("AsyncRequest"))(n).setHandler(function(o){var p=o.payload.shouldShow;if(this.$FantaChatHeaderContainer1)this.setState({rtcNuxShown:p})}.bind(this)).send()}};m.propTypes={customColor:l.string,isFocused:l.bool.isRequired,isLastGroupTab:l.bool.isRequired,onClose:l.func.isRequired,thread:l.object,threadID:l.string.isRequired,viewer:l.string.isRequired};f.exports=m}),null);
__d("FantaConversation.react",["Bootloader","ChatConversation.react","CurrentUser","EventProfiler","MercuryIDs","MessengerHotLikePreviewEvents","React","StickerInterfaces","StickersTypedLogger","SubscriptionsHandler","emptyFunction"],(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(l){__p&&__p();i.constructor.call(this,l);this.$FantaConversation4=function(m){if(this.props.threadID===m)this.setState({likePreview:null})}.bind(this);this.$FantaConversation5=function(m,n){__p&&__p();if(!m)return;new(c("StickersTypedLogger"))().setEvent("click_sticker").setPackid(m).setStickerid(n).log();c("Bootloader").loadModules(["StickersPackInTray","StickersActions","StickersStoreController"],function(o,p,q){o.onIsPackInTray(m,c("StickerInterfaces").MESSAGES,function(r){if(r.in_sticker_tray){p.selectTrayPack(m);p.showStickerFlyout(this.props.threadID)}else q.showStore(m)}.bind(this))}.bind(this),"FantaConversation.react")}.bind(this);this.state={likePreview:null};this.$FantaConversation1=new(c("SubscriptionsHandler"))()}k.prototype.shouldComponentUpdate=function(l,m){var n=this.props,o=this.state;return!n.onlineUsers.equals(l.onlineUsers)||!n.messages.equals(l.messages)||n.threadID!==l.threadID||n.thread!==l.thread||o.likePreview!==m.likePreview};k.prototype.componentDidMount=function(){this.$FantaConversation2();this.$FantaConversation3()};k.prototype.componentDidUpdate=function(){this.$FantaConversation3()};k.prototype.componentWillUnmount=function(){this.$FantaConversation1.release()};k.prototype.$FantaConversation3=function(){c("EventProfiler").informManualInteractionTimestamp(["MessageJewelListItem","ChatSideBarLink"],true,"click")};k.prototype.$FantaConversation2=function(){this.$FantaConversation1.addSubscriptions(c("MessengerHotLikePreviewEvents").addListener(c("MessengerHotLikePreviewEvents").START,function(l,m){if(this.props.threadID===m)this.setState({likePreview:l})}.bind(this)),c("MessengerHotLikePreviewEvents").addListener(c("MessengerHotLikePreviewEvents").STOP,this.$FantaConversation4),c("MessengerHotLikePreviewEvents").addListener(c("MessengerHotLikePreviewEvents").STOP_EMOJI,this.$FantaConversation4),c("MessengerHotLikePreviewEvents").addListener(c("MessengerHotLikePreviewEvents").REMOVE,this.$FantaConversation4))};k.prototype.render=function(){var l=this.props.messages,m=this.props,n=m.onLoadMoreMessages,o=m.thread,p=m.threadID,q=this.state.likePreview,r=c("CurrentUser").getID();if(q)l=l.push(q);return o?c("React").createElement(c("ChatConversation.react"),{isCanonical:c("MercuryIDs").isCanonical(p),loadMoreMessages:n,maxBubbleWidth:181-this.props.scrollbarPadding,messages:l,onAttachmentLoad:function(){return this.props.onAttachmentLoad()}.bind(this),onMount:c("emptyFunction"),onStickerClick:this.$FantaConversation5,onlineUsers:this.props.onlineUsers,ref:"conversation",thread:o,threadID:p,viewer:r}):c("React").createElement("div",null)};k.prototype.getMessageList=function(){return this.refs.conversation&&this.refs.conversation.getMessageList()};k.propTypes={messages:j.object.isRequired,onLoadMoreMessages:j.func.isRequired,onlineUsers:j.object.isRequired,scrollbarPadding:j.number,thread:j.object,threadID:j.string.isRequired};f.exports=k}),null);
__d("FantaPageGreetingLoader.react",["cx","BootloadOnRender.react","JSResource","LazyComponent.react","React","getPageIDFromThreadID","idx"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i=function i(j){var k=j.thread,l=j.threadID;if(k!=null){var m,n=((m=k)!=null?m.is_canonical_neo_user:m)||false;if(n)return null}else return null;return c("getPageIDFromThreadID")(l)?c("React").createElement("div",{className:"_av1"},c("React").createElement(c("BootloadOnRender.react"),{loader:c("JSResource")("MercuryChatTabPagesGreetingContainer.react").__setRef("FantaPageGreetingLoader.react"),placeholder:c("React").createElement("div",null),component:c("React").createElement(c("LazyComponent.react"),{threadID:l})})):null};f.exports=i}),null);
__d("MercuryCamQuickReply.react",["cx","fbt","BootloadedComponent.react","JSResource","MercuryIDs","MercuryThreads","MessengerQuickCamOrigins","React","XUISpinner.react","convertMIGColorToFIGColor"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j,k,l=c("MercuryThreads").get(),m=c("React").PropTypes;j=babelHelpers.inherits(n,c("React").PureComponent);k=j&&j.prototype;n.prototype.componentWillUpdate=function(o,p){if(o&&this.props.lastMessage!==o.lastMessage&&this.props.camQuickReplyWillShow)this.props.camQuickReplyWillShow()};n.prototype.componentDidUpdate=function(o,p){if(o&&this.props.lastMessage!==o.lastMessage&&this.props.camQuickReplyDidShow)this.props.camQuickReplyDidShow()};n.prototype.render=function(){var o=this.props.lastMessage,p=c("MercuryIDs").getParticipantIDFromUserID(this.props.viewer);if(!(o&&o.message_source&&o.author!==p&&o.message_source==="camera"))return null;var q=l.getThreadMetaNow(this.props.threadID),r=q?c("convertMIGColorToFIGColor")(q.custom_color):null,s=c("React").createElement("div",{className:"_zdf",style:r&&{color:r}},i._("Send a photo reply"));return c("React").createElement("div",{className:"_zdg"},c("React").createElement(c("BootloadedComponent.react"),{bootloadLoader:c("JSResource")("MessengerQuickCamButtonHTML5.react").__setRef("MercuryCamQuickReply.react"),bootloadPlaceholder:c("React").createElement(c("XUISpinner.react"),{className:"_5h-9"}),className:"_5yhk _6gb",location:c("MessengerQuickCamOrigins").CHAT_TAB,threadID:this.props.threadID,viewer:this.props.viewer,textChild:s}))};function n(){j.apply(this,arguments)}n.propTypes={camQuickReplyWillShow:m.func,camQuickReplyDidShow:m.func,lastMessage:m.object,threadID:m.string.isRequired,viewer:m.string.isRequired};f.exports=n}),null);
__d("MercuryIndicatorController",["fbt","ArbiterMixin","DOM","MercuryActionType","MercuryDelayedRoger","MercuryIDs","MercuryMessageSourceTags","MercuryParticipants","MercuryRoger.bs","MercurySourceType","MercuryThreads","MercuryTypingReceiver","MercuryViewer","WorkModeConfig","formatDate","removeFromArray"],(function a(b,c,d,e,f,g,h){__p&&__p();var i=c("MercuryDelayedRoger").get(),j=c("MercuryRoger.bs").get(),k=c("MercuryThreads").get(),l=c("MercuryTypingReceiver").get(),m=[];function n(o){this._threadID=o;this._canonicalUser=c("MercuryIDs").getUserIDFromThreadID(o);m.push(this)}Object.assign(n.prototype,c("ArbiterMixin"),{destroy:function o(){c("removeFromArray")(m,this)},setLastMessage:function o(p){this._lastMsg=p;this._handleStateChange()},_informStateChanged:function o(p){if(p.activity=="none"&&this._currentActivity=="none")return;if(this._lastMsg&&this._lastMsg.author&&c("MercuryViewer").isViewer(this._lastMsg.author))p.self_authored=true;this._currentActivity=p.activity;this.inform("state-changed",p)},_notifySentFrom:function o(){__p&&__p();var p,q,r=this._lastMsg.source_tags||this._lastMsg.tags||[];if(r.includes(c("MercuryMessageSourceTags").MESSENGER)){if(!c("WorkModeConfig").is_work_user)p=c("DOM").create("a",{href:"/mobile/messenger","class":"fcg",target:"_blank"},h._("Sent from Messenger"));else p=c("DOM").create("a",{href:"https://www.facebook.com/workplace/mobile/","class":"fcg",target:"_blank"},h._("Sent from Workplace Chat"));q="sentFromMobile"}else if(r.includes(c("MercuryMessageSourceTags").MOBILE)){var s=c("WorkModeConfig").is_work_user?"/workplace/mobile":"/mobile";p=c("DOM").create("a",{href:s,"class":"fcg",target:"_blank"},h._("Sent from Mobile"));q="sentFromMobile"}else if(r.includes(c("MercuryMessageSourceTags").EMAIL)){p=h._("Sent from email");q="sentFromEmail"}else if(r.includes(c("MercurySourceType").MESSENGER_COMMERCE))q="sentFromMessengerCommerce";else{this._informStateChanged({activity:"none"});return}this._informStateChanged({activity:q,text:p})},_notifySeenTimestamp:function o(p){var q=Date.now()*.001,r=j.getSeenTimestamp(this._threadID,p[0]),s=r.action*.001,t;if(s<q-518400)t="M j";else if(s<q-86400)t="D g:ia";else t="g:ia";this._informStateChanged({activity:"seen-timestamp",text:h._("Seen {timestamp}",[h.param("timestamp",c("formatDate")(s,t))])})},_nameNormalizer:function o(p){__p&&__p();var q;c("MercuryParticipants").getMulti(p,function(r){function s(u){if(r[u]!==undefined&&r[u].short_name)return r[u].short_name.toLowerCase();else return u}var t=p.map(s);q=function q(u){var v=s(u),w=t.indexOf(v)!==t.lastIndexOf(v);return w?r[u].name:r[u].short_name}});return q},_seenByEveryone:function o(p,q,r){var s=r?r.participants.length:0,t=p.length;if(q.author!=c("MercuryViewer").getID()&&(!r||r.participants.indexOf(q.author)>-1))t++;return s>2&&t>=s-1},_notifySeenBy:function o(p){__p&&__p();var q=this._lastMsg,r=true;c("MercuryParticipants").getMulti(p,function(s){__p&&__p();r=false;if(this._lastMsg!=q)return;var t=k.getThreadMetaNow(this._threadID),u=null;if(t&&t.custom_nickname)u=t.custom_nickname;var v=[];for(var w in s){var x=s[w],y=x.short_name;if(u&&u[x.fbid])y=u[x.fbid];v[w]=y}var z,A=false;if(this._seenByEveryone(p,q,t))z={prefix:"Seen by everyone"};else if(p.length==1)z={prefix:"Seen by ",names:" "+v[p[0]]};else if(p.length==2)z={prefix:"Seen by ",names:" "+v[p[0]]+", "+v[p[1]]};else if(p.length==3)z={prefix:"Seen by ",names:" "+v[p[0]]+", "+v[p[1]]+", "+v[p[2]]};else if(p.length>3){z={prefix:"Seen by ",names:" "+v[p[0]]+", "+v[p[1]]+", "};A=true}this._informStateChanged({activity:"seen-by",text:z,seenBy:p,showTooltip:A})}.bind(this));r&&this._informStateChanged({activity:"none"})},_handleStateChange:function o(){__p&&__p();var p=c("MercuryActionType").LOG_MESSAGE;if(!this._lastMsg||this._lastMsg.action_type==p){this._informStateChanged({activity:"none"});return}if(this._typing&&this._typing.length){this._informStateChanged({activity:"none"});return}if(this._canonicalUser&&this._lastMsg.author!=c("MercuryViewer").getID()){this._notifySentFrom();return}var q=i.getSeenBy(this._threadID,true);if(q.length)if(this._canonicalUser){this._notifySeenTimestamp(q);return}else{this._notifySeenBy(q);return}this._informStateChanged({activity:"none"})}});l.addRetroactiveListener("state-changed",function(o){m.forEach(function(p){var q=o[p._threadID];if(q!==undefined){p._typing=q;p._handleStateChange()}})});i.subscribe("state-changed",function(o,p){m.forEach(function(q){p[q._threadID]&&q._handleStateChange()})});f.exports=n}),null);
__d("MercuryLastMessageIndicator.react",["cx","fbt","DOM","MercuryIndicatorController","MessengerTextWithEmoticons.react","MercuryParticipants","React","ReactDOM","TooltipData","emptyFunction","joinClasses"],(function a(b,c,d,e,f,g,h,i){__p&&__p();var j,k,l=c("React").PropTypes;j=babelHelpers.inherits(m,c("React").Component);k=j&&j.prototype;function m(){__p&&__p();var n,o;"use strict";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.state={data:{}},this.getRootClass=function(){var s="_510g"+(this.state.data.self_authored?" _510e":""),t=this.state.data.activity,u=null;if(String(t).startsWith("seen"))u="seen";else if(t=="typing")u=this.props.hideTyping?null:t;else u=t;return c("joinClasses")(s,u,this.props.className)}.bind(this),this.isVisible=function(s,t){s=s||this.props;t=t||this.state;return t.data&&t.data.activity!="none"&&!(s.hideTyping&&t.data.activity=="typing")}.bind(this),this.$MercuryLastMessageIndicator2=function(){this.$MercuryLastMessageIndicator6.unsubscribe();this.$MercuryLastMessageIndicator3.destroy()}.bind(this),o}m.prototype.componentDidMount=function(){"use strict";this.$MercuryLastMessageIndicator1(this.props)};m.prototype.componentWillReceiveProps=function(n){"use strict";if(n.threadID!=this.props.threadID){this.$MercuryLastMessageIndicator2();this.$MercuryLastMessageIndicator1(n)}else if(n.lastMessage!=this.props.lastMessage)this.$MercuryLastMessageIndicator3.setLastMessage(n.lastMessage)};m.prototype.componentWillUpdate=function(n,o){"use strict";if(this.isVisible(n,o))this.props.indicatorWillShow()};m.prototype.componentDidUpdate=function(){"use strict";if(!this.isVisible())return;if(!this.isSeenBy()){this.setText();this.setTooltip()}this.props.indicatorDidShow()};m.prototype.componentWillUnmount=function(){"use strict";this.$MercuryLastMessageIndicator2()};m.prototype.render=function(){"use strict";if(this.isSeenBy()){var n=this.$MercuryLastMessageIndicator4(this.state.data);return c("React").createElement("div",{className:this.getRootClass()},c("React").createElement("div",{className:"_510h"}),c("React").createElement("span",{className:"_510f"},n))}else return c("React").createElement("div",{className:this.getRootClass()},c("React").createElement("div",{className:"_510h"}),c("React").createElement("span",{className:"_510f",ref:"text"},"\xa0"))};m.prototype.isSeenBy=function(n,o){"use strict";n=n||this.props;o=o||this.state;return o.data&&o.data.activity==="seen-by"};m.prototype.setText=function(){"use strict";if(this.state.data.text)c("DOM").setContent(c("ReactDOM").findDOMNode(this.refs.text),this.state.data.text)};m.prototype.setTooltip=function(){"use strict";if(this.state.data.activity==="seen-by"&&this.state.data.showTooltip)c("MercuryParticipants").getMulti(this.state.data.seenBy,function(n){var o=c("DOM").create("div",null,this.state.data.seenBy.map(function(p){return c("DOM").create("div",null,n[p].name)}));c("TooltipData").set(c("DOM").find(c("ReactDOM").findDOMNode(this),"span.more"),o,"above","center")}.bind(this))};m.prototype.$MercuryLastMessageIndicator4=function(n){"use strict";__p&&__p();var o=n&&n.text;if(!o)return null;if(!o.names)return i._("Seen by everyone");else{var p=c("React").createElement(c("MessengerTextWithEmoticons.react"),{renderEmoji:true,renderEmoticons:true,text:o.names});if(!n.showTooltip)return i._("Seen by {names}",[i.param("names",p)]);else{var q=this.$MercuryLastMessageIndicator5(n);return i._("Seen by {names}{=num more link}",[i.param("names",p),i.param("=num more link",q)])}}};m.prototype.$MercuryLastMessageIndicator5=function(n){"use strict";__p&&__p();if(!n||!n.text||!n.showTooltip)return null;var o={},p=0;if(n.activity==="seen-by"){var q=null;c("MercuryParticipants").getMulti(n.seenBy,function(s){q=n.seenBy.map(function(t){return s[t].name}).join("\r\n");p=Object.keys(s).length-2});o=Object.assign({"data-tooltip-alignh":"center"},c("TooltipData").propsFor(q,"above"))}var r=i._({"*":"{num} more"},[i.param("num",p,[0])]);return c("React").createElement("span",babelHelpers["extends"]({className:"more"},o),r)};m.prototype.$MercuryLastMessageIndicator1=function(n){"use strict";this.$MercuryLastMessageIndicator3=new(c("MercuryIndicatorController"))(n.threadID);this.$MercuryLastMessageIndicator6=this.$MercuryLastMessageIndicator3.subscribe("state-changed",function(o,p){return this.setState({data:p})}.bind(this));n.lastMessage&&this.$MercuryLastMessageIndicator3.setLastMessage(n.lastMessage)};m.propTypes={hideTyping:l.bool,indicatorWillShow:l.func,indicatorDidShow:l.func,lastMessage:l.object,threadID:l.string.isRequired};m.defaultProps={indicatorWillShow:c("emptyFunction"),indicatorDidShow:c("emptyFunction")};f.exports=m}),null);
__d("MercuryQuickReply.react",["cx","BootloadedComponent.react","JSResource","MercuryIDs","MessengerQuickCamOrigins","MessengerViewerContactMethodsWebGraphQLQuery","React","WebGraphQL","XUISpinner.react","gkx","idx"],(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(){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.state={viewerEmail:null,viewerPhone:null},n}l.prototype.componentDidMount=function(){if(this.$MercuryQuickReply1(this.props.lastMessage)!==null)this.props.quickReplyDidShow()};l.prototype.componentDidUpdate=function(m){if(this.$MercuryQuickReply1(this.props.lastMessage)!==null&&this.$MercuryQuickReply1(m.lastMessage)===null)this.props.quickReplyDidShow();this.$MercuryQuickReply2(this.props.lastMessage)};l.prototype.render=function(){__p&&__p();var m=this.props.lastMessage,n=c("MercuryIDs").getParticipantIDFromUserID(this.props.viewer);if(!m||m.author===n)return null;var o=this.$MercuryQuickReply1(m);if(Array.isArray(o)){var p=o.every(function(q){return q.content_type==="user_email"&&this.state.viewerEmail===null||q.content_type==="user_phone_number"&&this.state.viewerPhone===null}.bind(this));if(!p)return c("React").createElement("div",{className:"_419m"},c("React").createElement(c("BootloadedComponent.react"),{bootloadLoader:c("JSResource")("MessengerBotsQuickReplyButtonList.react").__setRef("MercuryQuickReply.react"),bootloadPlaceholder:c("React").createElement(c("XUISpinner.react"),{className:"_5h-9"}),isSponsored:m.is_sponsored,messageId:m.message_id,options:o,pageId:c("MercuryIDs").getUserIDFromParticipantID(m.author),threadID:m.thread_id,quickCamOriginLocation:this.props.quickCamOriginLocation,viewer:this.props.viewer,viewerEmail:this.state.viewerEmail,viewerPhone:this.state.viewerPhone}))}return null};l.prototype.$MercuryQuickReply1=function(m){var n=m&&m.platform_xmd&&JSON.parse(m.platform_xmd);return Array.isArray(n&&n.quick_replies)?n&&n.quick_replies:null};l.prototype.$MercuryQuickReply2=function(m){__p&&__p();var n=this.$MercuryQuickReply1(m);if(!n||n.length===0)return;var o=c("gkx")("AT6b68OqbLsWJQlJTGZqwlCTZJ0z0taRGUXqOzuQVRDoLPO2Dnjh-maTANaNF_FUgpVzi4qt9-S_T7GMqZpzzd99"),p=c("gkx")("AT70ApPO8u4r9N24CdWkIiFYZMdcnAaeV9BaXzLxdBmkmVf60X7teW8bfJTrYYnPlB7TPT4_aBOsOQDbCdO-mpJj4JY2rmmLkTH2jaDU2xAiSg");if(n.some(function(q){return q.content_type==="user_email"&&o||q.content_type==="user_phone_number"&&p}))c("WebGraphQL").exec(new(c("MessengerViewerContactMethodsWebGraphQLQuery"))({})).done(function(q){var r,s,t,u,v=p?(r=q)!=null?(r=r.viewer)!=null?(r=r.user)!=null?r.all_phones:r:r:r:null,w=o?(s=q)!=null?(s=s.viewer)!=null?s.all_emails:s:s:null,x=!v?null:v.find(function(z){return z.is_preferred});if(!x&&v)x=v[0];var y=!w?null:w.find(function(z){return z.is_primary});this.setState({viewerEmail:(t=y)!=null?(t=t.email_address)!=null?t.deduplicated_email_address:t:t,viewerPhone:(u=x)!=null?(u=u.phone_number)!=null?u.universal_number:u:u})}.bind(this))};l.propTypes={quickReplyDidShow:k.func.isRequired,lastMessage:k.object,quickCamOriginLocation:k.oneOf(c("MessengerQuickCamOrigins").getValues()).isRequired,threadID:k.string.isRequired,viewer:k.string.isRequired};f.exports=l}),null);
__d("FantaConversationScroller.react",["csx","cx","fbt","Animation","Arbiter","BootloadedComponent.react","Bootloader","ChatTypingIndicators.react","CurrentUser","DOM","Event","FantaConversation.react","FantaPageGreetingLoader.react","FantaTabActions","Grid.react","immutable","JSResource","MercuryLastMessageIndicator.react","MercuryAttachment","MercuryCamQuickReply.react","MercuryConfig","MercuryIDs","MercuryQuickReply.react","MercuryThreads","MessengerHotLikePreviewEvents","MessengerQuickCamOrigins","MessengerVideoAutoplayActions","MessengerVideoAutoplayStore","MutationObserver","Parent","React","ReactDOM","MercuryShareAttachmentRenderLocations","Scroll","ScrollBoundaryContain","Style","SubscriptionsHandler","TimeSlice","XUISpinner.react","clearImmediate","emptyFunction","getElementPosition","getPageIDFromThreadID","gkx","isEventSupported","setImmediate","throttle"],(function a(b,c,d,e,f,g,h,i,j){"use strict";__p&&__p();var k,l,m=c("MercuryThreads").get(),n=c("Grid.react").GridItem,o=c("React").PropTypes,p=".img:not(.loaded)",q="loaded",r="._59go",s=15,t=null,u=20,v=1e3;function w(y){__p&&__p();if(t===null){var z=y.firstElementChild;if(z){c("Style").set(y,"overflow","scroll");var A=z.clientWidth;c("Style").set(y,"overflow","hidden");var B=z.clientWidth;t=Math.max(B-A,0);c("Style").set(y,"overflow","")}else t=0}return t}k=babelHelpers.inherits(x,c("React").Component);l=k&&k.prototype;function x(y){__p&&__p();l.constructor.call(this,y);this.$FantaConversationScroller10=[];this.state={loadingMessages:!m.isEmptyLocalThread(this.props.threadID),scrollbarPadding:t===null?s:t};this.$FantaConversationScroller12=function(z){if(!c("gkx")("AT41s5nc5usyR3AxF6JSJYEGfAY8tyQMohn4tHD5EBNPLj9IR60HLUM8XbLkhkanQ0whco6up8j9rPvwA-GdPWr0"))return;z.forEach(function(A){if(A.addedNodes.length>0){A.addedNodes.forEach(function(B){this.$FantaConversationScroller13(B)}.bind(this));this.$FantaConversationScroller17()}}.bind(this))}.bind(this);this.$FantaConversationScroller22=function(z){__p&&__p();var A=c("ReactDOM").findDOMNode(this.refs.scrollContainer);if(A){this.$FantaConversationScroller23();if(this.$FantaConversationScroller24()&&!this.$FantaConversationScroller25()&&!this.$FantaConversationScroller4&&!this.props.hasFetchedAll){this.setState({loadingMessages:true});this.props.onLoadMoreMessages()}this.$FantaConversationScroller26();this.$FantaConversationScroller11()}}.bind(this);this.$FantaConversationScroller19=function(){__p&&__p();if(!this.refs||this.state.loadingMessages||!this.props.thread){this.$FantaConversationScroller10=[];return}var z=c("ReactDOM").findDOMNode(this.refs.scrollContainer),A=c("getPageIDFromThreadID")(this.props.threadID);if(!z||!A){this.$FantaConversationScroller10=[];return}var B=10,C=void 0,D=void 0;try{C=z.getBoundingClientRect();D=this.refs.conversation?this.refs.conversation.getMessageList():null}catch(E){return}if(!D||!C)return;var F=[];this.$FantaConversationScroller9.forEach(function(G){__p&&__p();if(!D)return;var H=G.message_id,I=D.getMessageElement(H);if(I){var J=I.getBoundingClientRect();if(J.top>C.top-B&&J.bottom<C.bottom+B){F.push(H);if(!this.$FantaConversationScroller10.includes(H))c("Bootloader").loadModules(["MessengerAdsWebLogger","MNAdsLoggerEventEnum"],function(K,L){K.log(G.ad_client_token,G.ad_id,L.MESSAGE_SEEN_THREAD,true,H,A)},"FantaConversationScroller.react")}}}.bind(this),this);this.$FantaConversationScroller10=F}.bind(this);this.$FantaConversationScroller27=function(){this.$FantaConversationScroller1=null;c("FantaTabActions").scrollBottomChanged(this.props.threadID,this.$FantaConversationScroller7,this.$FantaConversationScroller28)}.bind(this);this.$FantaConversationScroller28=function(){this.$FantaConversationScroller29(false);this.$FantaConversationScroller20()}.bind(this);this.$FantaConversationScroller3=new(c("MutationObserver"))(this.$FantaConversationScroller12);this.$FantaConversationScroller7=true}x.prototype.shouldComponentUpdate=function(y,z){var A=this.props,B=this.state;return!A.onlineUsers.equals(y.onlineUsers)||A.hasFetchedAll!==y.hasFetchedAll||A.isFocused!==y.isFocused||!A.messages.equals(y.messages)||A.showContextBanner!==y.showContextBanner||A.thread!==y.thread||A.threadID!==y.threadID||B.loadingMessages!==z.loadingMessages};x.prototype.componentDidMount=function(){__p&&__p();this.$FantaConversationScroller13(c("ReactDOM").findDOMNode(this.refs.scrollContainer));this.$FantaConversationScroller14();this.$FantaConversationScroller8=new(c("SubscriptionsHandler"))();this.$FantaConversationScroller15();this.$FantaConversationScroller16();this.$FantaConversationScroller17();c("MessengerVideoAutoplayActions").updateStore(this.props.threadID,this.$FantaConversationScroller18());this.setState({scrollbarPadding:w(this.refs.scrollContainer)});this.$FantaConversationScroller11=c("throttle")(this.$FantaConversationScroller19,v);this.$FantaConversationScroller9=this.props.messages.filter(function(y){return y.is_sponsored});this.$FantaConversationScroller11()};x.prototype.componentDidUpdate=function(y){__p&&__p();this.$FantaConversationScroller17();if(this.$FantaConversationScroller4){var z=c("ReactDOM").findDOMNode(this.refs.scrollContainer),A=this.$FantaConversationScroller4||0,B=z.scrollHeight-A;this.scrollToPosition(B,false);this.$FantaConversationScroller4=null}if(!y.messages.equals(this.props.messages)){c("MessengerVideoAutoplayActions").updateStore(this.props.threadID,this.$FantaConversationScroller18());var C=y.messages.last(),D=this.props.messages.last();if(C!==D&&D&&D.author){var E=c("MercuryIDs").getUserIDFromParticipantID(D.author);if(E===c("CurrentUser").getID()){this.scrollToBottom(false);this.$FantaConversationScroller20()}}}this.$FantaConversationScroller11()};x.prototype.componentWillUnmount=function(){this.$FantaConversationScroller1&&c("clearImmediate")(this.$FantaConversationScroller1);this.$FantaConversationScroller8.release()};x.prototype.componentWillReceiveProps=function(y){var z=this.state.loadingMessages&&y.messages.size>0&&!y.messages.equals(this.props.messages);if(z||y.hasFetchedAll||y.showContextBanner){this.setState({loadingMessages:false});var A=c("ReactDOM").findDOMNode(this.refs.scrollContainer),B=A.scrollHeight,C=c("Scroll").getTop(A);this.$FantaConversationScroller4=B-C}this.$FantaConversationScroller9=y.messages.filter(function(D){return D.is_sponsored})};x.prototype.$FantaConversationScroller14=function(){if(!c("gkx")("AT41s5nc5usyR3AxF6JSJYEGfAY8tyQMohn4tHD5EBNPLj9IR60HLUM8XbLkhkanQ0whco6up8j9rPvwA-GdPWr0"))return;var y=c("ReactDOM").findDOMNode(this.refs.scrollContainer);this.$FantaConversationScroller3.observe(y,{childList:true,subtree:true})};x.prototype.$FantaConversationScroller13=function(y){__p&&__p();if(!c("gkx")("AT41s5nc5usyR3AxF6JSJYEGfAY8tyQMohn4tHD5EBNPLj9IR60HLUM8XbLkhkanQ0whco6up8j9rPvwA-GdPWr0"))return;this.$FantaConversationScroller21(y).forEach(function(z){c("DOM").scry(z,p).forEach(function(A){if(A.complete){A.classList.add(q);return}var B=c("Event").listen(A,"load",function(){A.classList.add(q);this.$FantaConversationScroller17();B.remove()}.bind(this))}.bind(this))}.bind(this))};x.prototype.$FantaConversationScroller21=function(y){var z=c("DOM").scry(y,r);if(z.length===0){var A=c("Parent").bySelector(y,r);if(A)z=z.concat(A)}return z};x.prototype.$FantaConversationScroller17=function(){var y=arguments.length<=0||arguments[0]===undefined?false:arguments[0];if(this.$FantaConversationScroller7)if(c("gkx")("AT45Q0YAtTF77a1x8ZT9-rWfsF83gTI5tMuldZujY0KaNI6icTW09jBEE5BSuvPKdZtVIIdleK4appEhrvQPrVOyhvdXTeLDSdYEXUe9KmbS3Q"))c("TimeSlice").guard(function(){this.scrollToBottom(y)}.bind(this),"post load chat animations",{propagationType:c("TimeSlice").PropagationType.ORPHAN})();else this.scrollToBottom(y)};x.prototype.renderGroupWave=function(){var y=this.props.thread;if(c("MercuryIDs").isLocalThread(this.props.threadID)&&c("gkx")("AT7uCGaYk4KWBCIq3SurfBIwk1DjmbU_QXgSqcY73Sdnw3DJhbzA4qigZjhm4wwYtWnHVZcxghHN6RO33C1W8YjG")&&y&&!y.is_canonical&&!y.thread_fbid)return c("React").createElement(c("BootloadedComponent.react"),{bootloadPlaceholder:c("React").createElement(c("XUISpinner.react"),{background:"light",className:"loading",size:"small"}),bootloadLoader:c("JSResource")("ChatWaveImage.react").__setRef("FantaConversationScroller.react"),thread:y});return null};x.prototype.$FantaConversationScroller26=function(){__p&&__p();var y=this.props.threadID,z=c("ReactDOM").findDOMNode(this.refs.scrollContainer);if(!z)return;var A=void 0,B=void 0;try{A=z.getBoundingClientRect();B=this.refs.conversation?this.refs.conversation.getMessageList():null}catch(C){return}if(!B||!A)return;var D=[],E=c("MessengerVideoAutoplayStore").getMessageIDs(y),F=E||this.$FantaConversationScroller18()||c("immutable").List();F.map(function(G){var H=c("MercuryAttachment").getVideoElem(G,B);if(H)D.push([G,H.getBoundingClientRect()])});if(D.length)c("MessengerVideoAutoplayActions").onScroll(y,E?null:F,c("immutable").Map(D),A)};x.prototype.$FantaConversationScroller18=function(){return this.props.messages.filter(function(y){return c("MercuryAttachment").isSingleVideoAttachment(y)||c("MercuryAttachment").isSharedVideoAttachmentMessage(y)}).reverse().map(function(y){return y.message_id})};x.prototype.scrollToBottom=function(y){var z=c("ReactDOM").findDOMNode(this.refs.scrollContainer);if(z)this.scrollToPosition(z.scrollHeight,y)};x.prototype.scrollToPosition=function(y,z){var A=c("ReactDOM").findDOMNode(this.refs.scrollContainer);this.$FantaConversationScroller6&&this.$FantaConversationScroller6.stop();if(z)this.$FantaConversationScroller6=new(c("Animation"))(A).to("scrollTop",y).ease(c("Animation").ease.end).duration(400).go();else c("Scroll").setTop(A,y)};x.prototype.$FantaConversationScroller25=function(y){var z=c("ReactDOM").findDOMNode(this.refs.scrollContainer);y=y===0?0:y||u;return c("Scroll").getTop(z)+z.clientHeight>=z.scrollHeight-y};x.prototype.$FantaConversationScroller24=function(){var y=c("ReactDOM").findDOMNode(this.refs.scrollContainer);return c("Scroll").getTop(y)<y.clientHeight};x.prototype.$FantaConversationScroller20=function(){var y=this.$FantaConversationScroller7;if(this.$FantaConversationScroller25())this.$FantaConversationScroller7=true;else this.$FantaConversationScroller7=false;if(y!==this.$FantaConversationScroller7)this.$FantaConversationScroller1=c("setImmediate")(this.$FantaConversationScroller27)};x.prototype.$FantaConversationScroller15=function(){__p&&__p();var y=c("ReactDOM").findDOMNode(this.refs.scrollContainer);if(!y)return;var z=c("isEventSupported")("mousewheel")?"mousewheel":c("isEventSupported")("wheel")?"wheel":"DOMMouseScroll",A=function(){this.$FantaConversationScroller20()}.bind(this),B=function B(){y.addEventListener(z,A,{passive:true})},C=function C(){y.removeEventListener(z,A,{passive:true})};this.$FantaConversationScroller8.addSubscriptions(c("Arbiter").subscribe("overflow-applied-to-body",function(){return this.$FantaConversationScroller17()}.bind(this)),c("Event").listen(y,"mousedown",A),c("Event").listen(y,"mouseup",A),c("Event").listen(y,"mouseenter",B),c("Event").listen(y,"mouseleave",C),{cancel:C},c("Event").listen(y,"scroll",c("throttle")(this.$FantaConversationScroller22,50)));var D=c("ScrollBoundaryContain").applyToElem(y);if(D)this.$FantaConversationScroller8.addSubscriptions(D)};x.prototype.$FantaConversationScroller16=function(){__p&&__p();this.$FantaConversationScroller8.addSubscriptions(c("MessengerHotLikePreviewEvents").addListener(c("MessengerHotLikePreviewEvents").START,function(y,z){if(this.props.threadID===z){this.$FantaConversationScroller29(false);clearInterval(this.$FantaConversationScroller5);this.$FantaConversationScroller5=setInterval(function(){this.$FantaConversationScroller29(false)}.bind(this),50)}}.bind(this)),c("MessengerHotLikePreviewEvents").addListener(c("MessengerHotLikePreviewEvents").FINISH_ANIMATION,function(y){clearInterval(this.$FantaConversationScroller5)}.bind(this)),c("MessengerHotLikePreviewEvents").addListener(c("MessengerHotLikePreviewEvents").FINISH_EMOJI_ANIMATION,function(y){clearInterval(this.$FantaConversationScroller5)}.bind(this)),c("MessengerHotLikePreviewEvents").addListener(c("MessengerHotLikePreviewEvents").REMOVE,function(y){if(this.props.threadID===y)clearInterval(this.$FantaConversationScroller5)}.bind(this)))};x.prototype.render=function(){var y=this.props,z=y.hasFetchedAll,A=y.messages,B=y.showContextBanner,C=y.thread,D=y.threadID,E=c("CurrentUser").getID(),F=c("gkx")("AT572SLwCLmZDDTsXg5I9LZsOQ15AFaFyPW6mF-2-OPcT86erU7KYs2R9o67DUyJwQ6AK0Y7upy2o2--jlRi_7EZ"),G=F&&(m.isEmptyLocalThread(D)||z||B),H=!c("MercuryConfig").ChatSeenHeadsEnabled,I=this.state.loadingMessages||!C?c("React").createElement(c("XUISpinner.react"),{background:"light",className:"loading",size:"small"}):null,J=c("gkx")("AT41s5nc5usyR3AxF6JSJYEGfAY8tyQMohn4tHD5EBNPLj9IR60HLUM8XbLkhkanQ0whco6up8j9rPvwA-GdPWr0")?c("emptyFunction"):function(){return this.$FantaConversationScroller17()}.bind(this);return c("React").createElement("div",{className:"_2v5j"},c("React").createElement("div",{className:"fbNubFlyoutBody scrollable",onClick:function(K){if(K.target&&K.target.classList&&K.target.classList.contains("_5wd4"))this.props.onFocus&&this.props.onFocus()}.bind(this),ref:"scrollContainer",role:"button",tabIndex:"0"},c("React").createElement("div",{className:"fbNubFlyoutBodyContent"},c("React").createElement(c("FantaPageGreetingLoader.react"),{thread:C,threadID:D}),c("React").createElement(c("Grid.react"),{className:"conversationContainer",role:"log",cols:1},c("React").createElement(n,{alignv:"bottom"},c("React").createElement("div",{className:"accessible_elem"},j._("Chat Conversation Start")),G?c("React").createElement(c("BootloadedComponent.react"),{bootloadPlaceholder:c("React").createElement("div",null),bootloadLoader:c("JSResource")("MessengerContextBannerContainer.react").__setRef("FantaConversationScroller.react"),isContinuation:false,location:c("MercuryShareAttachmentRenderLocations").CHAT,viewer:E,threadID:D}):null,I,c("React").createElement("div",{style:A.size>0?{height:"176px"}:I?{height:"168px"}:{height:"192px"}},c("React").createElement(c("FantaConversation.react"),babelHelpers["extends"]({onAttachmentLoad:J,scrollbarPadding:this.state.scrollbarPadding,ref:"conversation"},this.props)),c("gkx")("AT7Fdvvof3gB21NGh8Fo7o5af68El03cTnUDtqQrI_yHQbziWN3MyQvvj6iMavHBZ0fTg3S3rpHTM9337zgjjUnM")?c("React").createElement(c("MercuryCamQuickReply.react"),{camQuickReplyWillShow:c("emptyFunction"),camQuickReplyDidShow:function(){return this.$FantaConversationScroller17(true)}.bind(this),lastMessage:A.size>0?A.last():undefined,threadID:D,viewer:E}):null,c("React").createElement(c("ChatTypingIndicators.react"),{threadID:D,indicatorsWillShow:c("emptyFunction"),indicatorsDidShow:function(){return this.$FantaConversationScroller17(true)}.bind(this),viewer:E,onlineUsers:this.props.onlineUsers}),this.renderGroupWave(),H?c("React").createElement(c("MercuryLastMessageIndicator.react"),{hideTyping:true,indicatorDidShow:function(){return this.$FantaConversationScroller17(true)}.bind(this),indicatorWillShow:c("emptyFunction"),lastMessage:A.size>0?A.last():null,threadID:D}):null,c("React").createElement(c("MercuryQuickReply.react"),{lastMessage:A.size>0?A.last():undefined,threadID:D,quickReplyDidShow:function(){return this.$FantaConversationScroller17(true)}.bind(this),viewer:E,quickCamOriginLocation:c("MessengerQuickCamOrigins").CHAT_TAB})),c("React").createElement("div",{className:"accessible_elem"},j._("Chat Conversation End")))))))};x.prototype.$FantaConversationScroller23=function(){var y=c("ReactDOM").findDOMNode(this.refs.scrollContainer),z=c("getElementPosition")(y);c("Arbiter").inform("chatScrolled/"+this.props.threadID,{scrollTop:c("Scroll").getTop(y),top:z.y,viewHeight:z.height})};x.prototype.$FantaConversationScroller29=function(y){var z=c("ReactDOM").findDOMNode(this.refs.scrollContainer);if(z)this.$FantaConversationScroller30(z.scrollHeight,y)};x.prototype.$FantaConversationScroller30=function(y,z){var A=c("ReactDOM").findDOMNode(this.refs.scrollContainer);this.$FantaConversationScroller6&&this.$FantaConversationScroller6.stop();if(z===true)this.$FantaConversationScroller6=new(c("Animation"))(A).to("scrollTop",y).ease(c("Animation").ease.end).duration(400).go();else c("Scroll").setTop(A,y)};x.propTypes={hasFetchedAll:o.bool.isRequired,isFocused:o.bool.isRequired,messages:o.object.isRequired,onFocus:o.func,onLoadMoreMessages:o.func.isRequired,onlineUsers:o.instanceOf(c("immutable").List).isRequired,showContextBanner:o.bool,thread:o.object,threadID:o.string.isRequired};f.exports=x}),null);
__d("FantaDragAndDropRow.react",["cx","fbt","ix","Bootloader","Image.react","MessengerEnvironment","MercuryAttachment","React","XUICloseButton.react","XUISpinner.react","emptyFunction","ifRequired","joinClasses"],(function a(b,c,d,e,f,g,h,i,j){"use strict";__p&&__p();var k,l;k=babelHelpers.inherits(m,c("React").Component);l=k&&k.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=l.constructor).call.apply(n,[this].concat(q)),this.$FantaDragAndDropRow1=function(){var s=this.props,t=s.threadID,u=s.fileData;c("MessengerEnvironment").messengerui?c("ifRequired")("MessengerActions",function(v){v.cancelFileUpload(t,u.id)},function(){c("Bootloader").loadModules(["MessengerActions"],function(v){v.cancelFileUpload(t,u.id)},"FantaDragAndDropRow.react")}):c("ifRequired")("FantaMessageActions",function(v){v.cancelFileUpload(t,u.id)},function(){c("Bootloader").loadModules(["FantaMessageActions"],function(v){v.cancelFileUpload(t,u.id)},"FantaDragAndDropRow.react")})}.bind(this),o}m.prototype.componentDidMount=function(){c("MessengerEnvironment").messengerui?c("Bootloader").loadModules(["MessengerActions"],c("emptyFunction"),"FantaDragAndDropRow.react"):c("Bootloader").loadModules(["FantaMessageActions"],c("emptyFunction"),"FantaDragAndDropRow.react")};m.prototype.render=function(){var n=this.props,o=n.fileData,p=n.isUploaded,q=o.file,r="";if(q.type)r=c("MercuryAttachment").getAttachIconClassByMime(q.type);var s=c("joinClasses")(r,"_3tn"),t=p?"done":"",u=c("joinClasses")(t,"_2qh _2qe uploadFileRow");return c("React").createElement("div",{className:u},c("React").createElement(c("XUISpinner.react"),{className:"_2qf"}),c("React").createElement(c("XUICloseButton.react"),{"aria-label":i._("Remove file"),className:"_2qg",shade:"dark",size:"small",onClick:this.$FantaDragAndDropRow1}),c("React").createElement("div",{className:"_4-te"},c("React").createElement("span",{className:s},c("React").createElement(c("Image.react"),{src:j("86988")})),q.name))};f.exports=m}),null);
__d("FantaDragAndDrop.react",["Bootloader","BootloadOnRender.react","FantaDragAndDropRow.react","FantaTypeComposer","JSResource","LazyComponent.react","MercuryShareAttachmentRenderLocations","MessengerEnvironment","React","emptyFunction","gkx","ifRequired"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h,i,j=960,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.$FantaDragAndDrop3=function(r){var s=this.props.composer;this.$FantaDragAndDrop7(function(t){t.removeSharePreview(r,s)})}.bind(this),this.$FantaDragAndDrop4=function(r,s){var t=this.props.composer;this.$FantaDragAndDrop7(function(u){u.loadedShareData(r,s,t)})}.bind(this),this.$FantaDragAndDrop5=function(r){var s=this.props.composer;this.$FantaDragAndDrop7(function(t){t.loadingShareData(r,s)})}.bind(this),n}l.prototype.componentDidMount=function(){c("MessengerEnvironment").messengerui?c("Bootloader").loadModules(["MessengerActions"],c("emptyFunction"),"FantaDragAndDrop.react"):c("Bootloader").loadModules(["FantaMessageActions"],c("emptyFunction"),"FantaDragAndDrop.react")};l.prototype.shouldComponentUpdate=function(m){var n=this.props,o=n.composer,p=m.composer,q=o.fileUploader,r=q.uploadingFiles,s=q.uploadedFiles,t=p.fileUploader.uploadingFiles,u=p.fileUploader.uploadedFiles,v=o.sharePreview,w=p.sharePreview;return n.threadID!==m.threadID||!!(!r&&t)||!!(r&&t&&!r.equals(t))||!!(!s&&u)||!!(s&&u&&!s.equals(u))||!!(!v&&w)||!!(v&&w&&!v.equals(w))};l.prototype.render=function(){var m=this.props,n=m.composer,o=m.threadID,p=n.sharePreview,q=p.share,r=p.uri,s=n.fileUploader,t=s.uploadingFiles,u=s.uploadedFiles;return c("React").createElement("div",{className:"fbNubFlyoutAttachments"},c("React").createElement("div",{className:"chatAttachmentShelf"},q||r?c("React").createElement(c("BootloadOnRender.react"),{loader:c("JSResource")("MercurySharePreview.react").__setRef("FantaDragAndDrop.react"),placeholder:c("React").createElement("div",null),component:c("React").createElement(c("LazyComponent.react"),{onClose:this.$FantaDragAndDrop3,onLoaded:this.$FantaDragAndDrop4,onLoading:this.$FantaDragAndDrop5,threadID:o,imageSize:{width:j,height:j},location:c("MercuryShareAttachmentRenderLocations").CHAT_PREVIEW,share:q,uri:r})}):null,!c("gkx")("AT5V6GuV7OE1f4CNmq1NUhZOeDrgnZF-AQ7WoOvZA8jFMJsYzyghwU79Bm31vgH-mi9DAlUGSFnfYvhwjhMfTolYEEzHhgUrhLD2UxTqbooHHw")&&c("React").createElement("div",{ref:function(v){this.$FantaDragAndDrop1=v}.bind(this)},this.$FantaDragAndDrop6(t,false),this.$FantaDragAndDrop6(u,true))))};l.prototype.$FantaDragAndDrop7=function(m){c("MessengerEnvironment").messengerui?c("ifRequired")("MessengerActions",function(n){m(n)},function(){c("Bootloader").loadModules(["MessengerActions"],function(n){m(n)},"FantaDragAndDrop.react")}):c("ifRequired")("FantaMessageActions",function(n){m(n)},function(){c("Bootloader").loadModules(["FantaMessageActions"],function(n){m(n)},"FantaDragAndDrop.react")})};l.prototype.$FantaDragAndDrop6=function(m,n){var o=this.props.threadID;return m&&m.map(function(p){return c("React").createElement(c("FantaDragAndDropRow.react"),{fileData:p,isUploaded:n,key:n?"uped-"+p.id:"uping-"+p.id,threadID:o})}).toArray()};l.propTypes={composer:k.object.isRequired,threadID:k.string.isRequired};f.exports=l}),null);
__d("FantaMercuryTabOverflowBootloader.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").Component);i=h&&h.prototype;j.prototype.render=function(){return c("React").createElement(c("BootloadOnRender.react"),{component:c("React").createElement(c("LazyComponent.react"),{items:this.props.items}),loader:c("JSResource")("FantaMercuryTabOverflow.react").__setRef("FantaMercuryTabOverflowBootloader.react"),placeholder:c("React").createElement("div",null)})};function j(){h.apply(this,arguments)}f.exports=j}),null);
__d("FantaTab.react",["cx","EventProfiler","React"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i,j;i=babelHelpers.inherits(k,c("React").Component);j=i&&i.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=j.constructor).call.apply(l,[this].concat(o)),this.$FantaTab1=false,m}k.prototype.componentDidMount=function(){c("EventProfiler").informManualInteractionTimestamp(["MessageJewelListItem","ChatSideBarLink"],true,"click")};k.prototype.render=function(){var l=this.props,m=l.isFocused,n=l.isLastTab,o=l.isLastTabOfType,p=l.MainComponent,q=l.MinimizedComponent,r=l.raisedTabCount,s=l.tab,t=l.tabContent,u=s.isMinimized?q:p,v=s.id+(s.isMinimized?"-minimized":"-maximized"),w=this.$FantaTab1&&!s.isMinimized;this.$FantaTab1=s.isMinimized;return c("React").createElement("div",{className:"_5qi9 _5qib"+(this.props.isFocused?" _5qic":"")+(s.isMinimized?" _3001":"")},c("React").createElement(u,{isFocused:m,isHovered:s.isHovered||w,isLastTab:n,isLastTabOfType:o,key:v,raisedTabCount:r,tab:s,tabContent:t}))};f.exports=k}),null);
__d("FantaTabGroup.react",["cx","FantaTab.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;l.prototype.shouldComponentUpdate=function(m){return!this.props.tabGroup.equals(m.tabGroup)||!!(!this.props.tabContents&&m.tabContents)||!!(this.props.tabContents&&m.tabContents&&!this.props.tabContents.equals(m.tabContents))};l.prototype.render=function(){var m=this.props,n=m.isLastOfTypeChecker,o=m.MainComponent,p=m.MinimizedComponent,q=m.OverflowComponent,r=m.tabContents,s=m.tabGroup,t=s.focusedTabID,u=s.getRaisedandUnraisedTabs(),v=u.raisedTabs,w=u.unraisedTabs,x=void 0;if(n)x=v.findLastKey(function(A){return n(A)&&A.id});var y=s.allowedRaisedTabs===0?null:this.$FantaTabGroup1(w,q),z=v.count();return c("React").createElement("div",{className:"_59v1"},y,v.map(function(A){return c("React").createElement(c("FantaTab.react"),{isFocused:A.id===t,isLastTab:A===v.last(),isLastTabOfType:A.id===x,key:A.id,MainComponent:o,MinimizedComponent:p,raisedTabCount:z,tab:A,tabContent:r&&r.get(A.id)})}).toArray())};l.prototype.$FantaTabGroup1=function(m,n){if(!m.isEmpty())return c("React").createElement("div",{className:"_1kws"},c("React").createElement(n,{items:m}));return null};function l(){i.apply(this,arguments)}l.propTypes={MainComponent:k.func.isRequired,MinimizedComponent:k.func.isRequired,OverflowComponent:k.func.isRequired,tabContents:k.object,tabGroup:k.object.isRequired};f.exports=l}),null);
__d("FantaPageComposerNullState.react",["cx","fbt","BootloadOnRender.react","JSResource","LazyComponent.react","MNCommerceCallToActionType","MNCommercePostbackCTADataManager","MNCommercePostbackRefSendManager","React","XUISpinner.react","getPageIDFromThreadID"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j,k;j=babelHelpers.inherits(l,c("React").PureComponent);k=j&&j.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=k.constructor).call.apply(m,[this].concat(p)),this.$FantaPageComposerNullState2=function(){var r=this.props,s=r.threadID,t=r.nullStateCTA;switch(t.action_type){case c("MNCommerceCallToActionType").OPEN_NATIVE:break;case c("MNCommerceCallToActionType").POSTBACK:default:c("MNCommercePostbackCTADataManager").sendAndConfirm(t.id,t.title,s);break}}.bind(this),n}l.prototype.render=function(){return c("React").createElement("div",{className:"_2xh0"},this.$FantaPageComposerNullState1(),c("React").createElement("div",{className:"_2xh4 _59w_"},c("React").createElement(c("BootloadOnRender.react"),{component:c("React").createElement(c("LazyComponent.react"),{cta:this.props.nullStateCTA,onClick:this.$FantaPageComposerNullState2,threadID:this.props.threadID}),loader:c("JSResource")("ChatPageComposerNullState.react").__setRef("FantaPageComposerNullState.react"),placeholder:c("React").createElement(c("XUISpinner.react"),{size:"small"})})))};l.prototype.$FantaPageComposerNullState1=function(){if(this.props.nullStateCTA!==null)switch(this.props.nullStateCTA.action_type){case c("MNCommerceCallToActionType").OPEN_NATIVE:return null;case c("MNCommerceCallToActionType").POSTBACK:if(!c("MNCommercePostbackRefSendManager").hasMDotMeRef(c("getPageIDFromThreadID")(this.props.threadID))&&!this.props.nullStateCTA.instantgame_metadata)return c("React").createElement("div",{className:"_4teq"},i._("When you tap {cta title}, {name} will see your public info.",[i.param("cta title",this.props.nullStateCTA.title),i.param("name",this.props.pageName)]));break;default:return null}return null};f.exports=l}),null);
__d("FantaPendingActions.react",["Bootloader","BootloadOnRender.react","FantaTabActions","JSResource","LazyComponent.react","MercuryThreadActions","MessengerMessageRequestsTypedLogger","MessageRequestUtils","MessagingTag","React","MercuryIDs","CurrentUser"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h,i,j=c("MercuryThreadActions").get();h=babelHelpers.inherits(k,c("React").PureComponent);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.$FantaPendingActions3=function(){var q=this.props.thread,r=!!q&&c("MessageRequestUtils").isFiltered(q),s=c("CurrentUser").getID(),t=c("MercuryIDs").getThreadKeyfromThreadIDUserID(this.props.threadID,s);new(c("MessengerMessageRequestsTypedLogger"))().setAction("message_requests_delete_request").setThreadID(c("MercuryIDs").getThreadFBIDFromThreadID(this.props.threadID)).setSurface("thread").setFolderType(r?"other":"pending").setThreadKey(t).setEntryPoint(null).log()}.bind(this),this.$FantaPendingActions4=function(q){var r=this.props.thread,s=!!r&&c("MessageRequestUtils").isFiltered(r),t=c("CurrentUser").getID(),u=c("MercuryIDs").getThreadKeyfromThreadIDUserID(this.props.threadID,t);if(q==="hide")new(c("MessengerMessageRequestsTypedLogger"))().setAction("message_requests_decline_cancel").setThreadID(c("MercuryIDs").getThreadFBIDFromThreadID(this.props.threadID)).setSurface("thread").setFolderType(s?"other":"pending").setThreadKey(u).setEntryPoint("inbox_banner").log()}.bind(this),this.$FantaPendingActions1=function(){__p&&__p();var q,r=this.props,s=r.thread,t=r.threadID,u=!!s&&c("MessageRequestUtils").isFiltered(s),v=c("CurrentUser").getID(),w=c("MercuryIDs").getThreadKeyfromThreadIDUserID(this.props.threadID,v);if(u)c("Bootloader").loadModules(["WebMessengerDeleteThreadDialog"],function(x){x.show(t,this.$FantaPendingActions3,this.$FantaPendingActions4,function(){return c("FantaTabActions").closeTab(t)})}.bind(this),"FantaPendingActions.react");else(function(){var x=c("MercuryIDs").isGroupChat(t);c("Bootloader").loadModules(["WebMessengerDeclineMRDialog"],function(y){y.show(s,t,function(){return c("FantaTabActions").closeTab(t)},x)},"FantaPendingActions.react")})();new(c("MessengerMessageRequestsTypedLogger"))().setAction("message_requests_decline_attempt").setThreadID(c("MercuryIDs").getThreadFBIDFromThreadID(this.props.threadID)).setSurface("thread").setFolderType(u?"other":"pending").setThreadKey(w).setEntryPoint(null).log()}.bind(this),this.$FantaPendingActions2=function(){var q=this.props.thread,r=!!q&&c("MessageRequestUtils").isFiltered(q),s=c("CurrentUser").getID(),t=c("MercuryIDs").getThreadKeyfromThreadIDUserID(this.props.threadID,s);j.changeFolder(this.props.threadID,c("MessagingTag").INBOX);new(c("MessengerMessageRequestsTypedLogger"))().setAction("message_requests_accept_request").setThreadID(c("MercuryIDs").getThreadFBIDFromThreadID(this.props.threadID)).setSurface("thread").setFolderType(r?"other":"pending").setThreadKey(t).setEntryPoint(null).log()}.bind(this),m}k.prototype.render=function(){var l=this.props.thread,m=!!l&&c("MessageRequestUtils").isFiltered(l);return c("React").createElement(c("BootloadOnRender.react"),{loader:c("JSResource")("ChatPendingActions.react").__setRef("FantaPendingActions.react"),placeholder:c("React").createElement("div",{style:{height:27}}),component:c("React").createElement(c("LazyComponent.react"),{isFiltered:m,onDeleteClick:this.$FantaPendingActions1,onReplyClick:this.$FantaPendingActions2})})};f.exports=k}),null);
__d("FantaTabComposer.react",["fbt","ChatTabComposerContainer.react","FantaTabActions","FantaTypeComposer","Keys","LogHistory","MercuryIDs","MercuryThreadIDMap","MercuryThreads","PhotosUploadWaterfall","React","SimpleXUIDialog","TypingDetectorController","WaterfallIDGenerator","WorkFileUploadsGating","XUIDialogButton.react","XUIDialogCancelButton.react","emptyFunction","getEveryoneMentionIndex"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i,j,k=c("MercuryThreadIDMap").get(),l=c("MercuryThreads").get(),m=c("LogHistory").getInstance("chat_tab_view"),n=c("React").PropTypes,o=/^\s*$/;i=babelHelpers.inherits(p,c("React").Component);j=i&&i.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=j.constructor).call.apply(q,[this].concat(t)),this.$FantaTabComposer3=c("WaterfallIDGenerator").generate(),this.$FantaTabComposer4=function(v,w){var x=this.props.threadID;k.getServerIDFromClientID(x,function(y){this.$FantaTabComposer2=new(c("TypingDetectorController"))(c("MercuryIDs").getUserIDFromThreadID(x),v,"mercury-chat",null,y,w)}.bind(this))}.bind(this),this.$FantaTabComposer14=function(v){this.$FantaTabComposer15(c("PhotosUploadWaterfall").UPLOAD_START,v);this.props.onSendPhoto(v,this.$FantaTabComposer1.onSend);this.$FantaTabComposer16("submit",v);this.focusInput()}.bind(this),this.$FantaTabComposer8=function(v){this.$FantaTabComposer15(c("PhotosUploadWaterfall").CLIENT_ERROR,v);this.$FantaTabComposer16("failed",v)}.bind(this),this.$FantaTabComposer10=function(v){this.$FantaTabComposer15(c("PhotosUploadWaterfall").CLIENT_ERROR,v);this.$FantaTabComposer16("failed",v)}.bind(this),this.$FantaTabComposer12=function(v){this.$FantaTabComposer15(c("PhotosUploadWaterfall").CANCEL_DURING_UPLOAD,v);this.$FantaTabComposer16("canceled",v)}.bind(this),this.$FantaTabComposer13=function(v){this.$FantaTabComposer15(c("PhotosUploadWaterfall").ALL_UPLOADS_DONE,v);this.$FantaTabComposer16("completed",v);var w=v.image_ids.length||v.attachments.length;this.$FantaTabComposer17(w)}.bind(this),this.$FantaTabComposer9=function(){this.props.onSendMessage("",this.props.composer,this.$FantaTabComposer1.onSend)}.bind(this),this.$FantaTabComposer11=function(v){this.props.onSelectSticker(v,function(){return this.$FantaTabComposer1.getInput().focus()}.bind(this))}.bind(this),this.$FantaTabComposer6=function(v,w,x){this.props.onSendHotLike(v.emoji,w,x,function(){return this.$FantaTabComposer1.getInput().focus()}.bind(this))}.bind(this),this.$FantaTabComposer7=function(v){this.$FantaTabComposer1.getInput().insertEmoji(v)}.bind(this),this.$FantaTabComposer5=function(event){__p&&__p();var v=this.props.threadID;if(event.keyCode===c("Keys").RETURN&&!event.shiftKey){event.preventDefault();var w=this.$FantaTabComposer20().trim(),x=this.$FantaTabComposer21();if(x){var y=c("getEveryoneMentionIndex")(x)>-1;if(y)this.$FantaTabComposer18(w,x);else this.$FantaTabComposer19(w,x)}else this.$FantaTabComposer19(w,[])}if(event.keyCode===c("Keys").DOWN&&event.shiftKey&&this.hasEmptyInput()){c("FantaTabActions").minimizeTab(v);return}}.bind(this),r}p.prototype.componentDidMount=function(){var q=this.props,r=q.threadID,s=q.participants;if(this.props.isFocused&&s.length>0&&!l.isEmptyLocalThread(r))this.focusInput()};p.prototype.componentDidUpdate=function(q){if(this.props.isFocused&&this.props.isFocused!==q.isFocused&&!l.isEmptyLocalThread(this.props.threadID))this.focusInput()};p.prototype.componentWillUnmount=function(){this.$FantaTabComposer2&&this.$FantaTabComposer2.destroy()};p.prototype.render=function(){var q=this.props,r=q.participants,s=q.threadID,t=q.viewer;if(r.length===0)return c("React").createElement("div",null);return c("React").createElement(c("ChatTabComposerContainer.react"),{composer:this.props.composer,disableInput:this.props.disableInput,disableFileUploads:!c("WorkFileUploadsGating").canUploadFiles,fileUploader:this.props.fileUploader,initializeThingsWithInputFn:this.$FantaTabComposer4,inputKeyDown:this.$FantaTabComposer5,onBlur:c("emptyFunction"),onCustomLikeSelect:this.$FantaTabComposer6,onEmojiSelect:this.$FantaTabComposer7,onEscape:this.props.onEscape,onFileUploadFail:this.$FantaTabComposer8,onMount:function u(){},onP2PTrigger:this.$FantaTabComposer9,onPhotoUploadFail:this.$FantaTabComposer10,onStickerSelect:this.$FantaTabComposer11,onTab:this.props.onTab,onUploadCancel:this.$FantaTabComposer12,onUploadComplete:this.$FantaTabComposer13,onUploadSubmit:this.$FantaTabComposer14,placeholder:h._("Type a message..."),ref:function(u){this.$FantaTabComposer1=u;if(this.props.isFocused&&!l.isEmptyLocalThread(this.props.threadID))this.focusInput()}.bind(this),resizeFn:function u(){},threadID:s,viewer:t})};p.prototype.$FantaTabComposer15=function(q,r){c("PhotosUploadWaterfall").sendSignal(babelHelpers["extends"]({qn:this.$FantaTabComposer3,step:q,uploader:c("PhotosUploadWaterfall").APP_CHAT},r||{}))};p.prototype.$FantaTabComposer17=function(q){if(q===0)return;this.$FantaTabComposer15(c("PhotosUploadWaterfall").POST_PUBLISHED,{count:q});this.$FantaTabComposer3=c("WaterfallIDGenerator").generate()};p.prototype.$FantaTabComposer16=function(q,r){m.debug("photo_uploader:"+q,"{}")};p.prototype.$FantaTabComposer18=function(q,r){var s=h._("Mention everyone?").toString(),t=h._("Doing so will send a mention to everyone in this group.").toString(),u=h._("Mention \u0040everyone!").toString(),v=c("React").createElement("div",null,c("React").createElement(c("XUIDialogCancelButton.react"),null),c("React").createElement(c("XUIDialogButton.react"),{action:"cancel",label:u,use:"confirm",onClick:function(){this.$FantaTabComposer19(q,r)}.bind(this)}));c("SimpleXUIDialog").showEx(t,s,v,null,null)};p.prototype.$FantaTabComposer19=function(q,r){this.props.onSendMessage({message:q,mentions:r},this.props.composer,this.$FantaTabComposer1.onSend);return};p.prototype.focusInput=function(){this.$FantaTabComposer1&&this.$FantaTabComposer1.getInput().focus()};p.prototype.$FantaTabComposer20=function(){return this.$FantaTabComposer1&&this.$FantaTabComposer1.getInput().getValue()||""};p.prototype.$FantaTabComposer21=function(){if(!this.$FantaTabComposer1)return null;var q=this.$FantaTabComposer1.getInput();return q.getMentions?q.getMentions():null};p.prototype.hasEmptyInput=function(){return o.test(this.$FantaTabComposer20())};p.propTypes={fileUploader:n.object,isFocused:n.bool.isRequired,onEscape:n.func.isRequired,onSelectSticker:n.func.isRequired,onSendHotLike:n.func.isRequired,onSendMessage:n.func.isRequired,onSendPhoto:n.func.isRequired,onTab:n.func.isRequired,participants:n.array.isRequired,threadID:n.string.isRequired,viewer:n.string.isRequired};f.exports=p}),null);
__d("FantaTabSheetPlaceholder.react",["cx","React","XUISpinner.react"],(function a(b,c,d,e,f,g,h){"use strict";var i=function i(){return c("React").createElement("div",{className:"_w_z"},c("React").createElement(c("XUISpinner.react"),null))};f.exports=i}),null);
__d("FantaTabSheet.react",["cx","BootloadedComponent.react","CurrentUser","FantaTabSheetActions","FantaTabSheetPlaceholder.react","JSResource","MercuryIDs","MercuryMessages","MercuryParticipants","MercurySheetPolicy","React","emptyFunction"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i,j,k=c("MercuryMessages").get(),l=c("React").PropTypes;i=babelHelpers.inherits(m,c("React").Component);j=i&&i.prototype;m.prototype.shouldComponentUpdate=function(n){var o=this.props;return o.threadID!==n.threadID||!o.tabContent.equals(n.tabContent)};m.prototype.render=function(){__p&&__p();var n=this.props,o=n.threadID,p=n.tabContent,q=p.openSheet,r=p.privacyController,s=p.thread,t=p.typeahead,u=void 0;switch(q){case c("MercurySheetPolicy").sheets.ChatThreadIsMutedTabSheet:u=c("React").createElement(c("BootloadedComponent.react"),{bootloadLoader:c("JSResource")("FantaTabSheetChatThreadIsMuted.react").__setRef("FantaTabSheet.react"),bootloadPlaceholder:c("React").createElement("div",null),key:q,threadID:o});break;case c("MercurySheetPolicy").sheets.ChatNameConversationTabSheet:u=c("React").createElement(c("BootloadedComponent.react"),{bootloadLoader:c("JSResource")("FantaTabSheetNameConversation.react").__setRef("FantaTabSheet.react"),bootloadPlaceholder:c("React").createElement(c("FantaTabSheetPlaceholder.react"),null),key:q,thread:s,threadID:o});break;case c("MercurySheetPolicy").sheets.ChatUserBlockedTabSheet:var v=c("MercuryIDs").getUserIDFromThreadID(o);if(v){var w=c("MercuryParticipants").getNow(c("MercuryIDs").getParticipantIDFromUserID(v));if(w&&r)u=c("React").createElement(c("BootloadedComponent.react"),{bootloadLoader:c("JSResource")("ChatUserBlockedTabSheet.react").__setRef("FantaTabSheet.react"),bootloadPlaceholder:c("React").createElement("div",null),gender:w.gender,key:q,privacyActionController:r,shortName:w.short_name})}break;case c("MercurySheetPolicy").sheets.ChatOfflineTabSheet:u=c("React").createElement(c("BootloadedComponent.react"),{bootloadLoader:c("JSResource")("FantaTabSheetOffline.react").__setRef("FantaTabSheet.react"),bootloadPlaceholder:c("React").createElement("div",null),key:q,privacyController:r,threadID:o});break;case c("MercurySheetPolicy").sheets.ChatReadOnlyTabSheet:case c("MercurySheetPolicy").sheets.ChatReadOnlyPermanentTabSheet:u=c("React").createElement(c("BootloadedComponent.react"),{bootloadLoader:c("JSResource")("FantaTabSheetReadOnly.react").__setRef("FantaTabSheet.react"),bootloadPlaceholder:c("React").createElement("div",null),key:q,threadID:o});break;case c("MercurySheetPolicy").sheets.FantaAddFriendsSheet:u=c("React").createElement(c("BootloadedComponent.react"),{bootloadLoader:c("JSResource")("FantaTabSheetAddFriends.react").__setRef("FantaTabSheet.react"),bootloadPlaceholder:c("React").createElement(c("FantaTabSheetPlaceholder.react"),null),key:q,thread:s,threadID:o,typeahead:t});break;case c("MercurySheetPolicy").sheets.FantaAddMoreFriendsSheet:u=c("React").createElement(c("BootloadedComponent.react"),{bootloadLoader:c("JSResource")("FantaTabSheetAddMoreFriends.react").__setRef("FantaTabSheet.react"),bootloadPlaceholder:c("React").createElement(c("FantaTabSheetPlaceholder.react"),null),key:q,thread:s,threadID:o,typeahead:t});break;case c("MercurySheetPolicy").sheets.ChatThreadIsMessageBlockedSheet:u=c("React").createElement(c("BootloadedComponent.react"),{bootloadLoader:c("JSResource")("FantaTabSheetMessageBlocked.react").__setRef("FantaTabSheet.react"),bootloadPlaceholder:c("React").createElement("div",null),key:q,threadID:o});break;case c("MercurySheetPolicy").sheets.ChatUserFocusSheet:u=c("React").createElement(c("BootloadedComponent.react"),{bootloadLoader:c("JSResource")("ChatUserFocusSheet.react").__setRef("FantaTabSheet.react"),bootloadPlaceholder:c("React").createElement("div",null),key:q,thread:s,threadID:o});break;case c("MercurySheetPolicy").sheets.ChatUserFocusBypassSheet:u=c("React").createElement(c("BootloadedComponent.react"),{bootloadLoader:c("JSResource")("ChatUserFocusBypassSheet.react").__setRef("FantaTabSheet.react"),bootloadPlaceholder:c("React").createElement("div",null),key:q});break;case c("MercurySheetPolicy").sheets.ChatUserTimezoneSheet:u=c("React").createElement(c("BootloadedComponent.react"),{bootloadLoader:c("JSResource")("ChatUserTimezoneSheet.react").__setRef("FantaTabSheet.react"),bootloadPlaceholder:c("React").createElement("div",null),data:p.timezoneInfo,key:q,onDismiss:function B(){return c("FantaTabSheetActions").closeUserTimezoneSheet(o)},resize:c("emptyFunction"),threadID:o});break;case c("MercurySheetPolicy").sheets.ChatUploadWarningTabSheet:u=c("React").createElement(c("BootloadedComponent.react"),{bootloadLoader:c("JSResource")("ChatUploadWarningTabSheet.react").__setRef("FantaTabSheet.react"),bootloadPlaceholder:c("React").createElement("div",null),key:q});break;case c("MercurySheetPolicy").sheets.ChatNoRecipientsTabSheet:if(!c("MercuryIDs").isCanonical(o))u=c("React").createElement(c("BootloadedComponent.react"),{bootloadLoader:c("JSResource")("ChatNoRecipientsTabSheet.react").__setRef("FantaTabSheet.react"),bootloadPlaceholder:c("React").createElement("div",null),key:q});break;case c("MercurySheetPolicy").sheets.ChatNewMessagesTabSheet:u=c("React").createElement(c("BootloadedComponent.react"),{bootloadLoader:c("JSResource")("FantaNewMessagesTabSheet.react").__setRef("FantaTabSheet.react"),bootloadPlaceholder:c("React").createElement("div",null),key:q,threadID:o});break;case c("MercurySheetPolicy").sheets.ChatEmployeeAwaySheet:u=c("React").createElement(c("BootloadedComponent.react"),{bootloadLoader:c("JSResource")("ChatEmployeeAwaySheet.react").__setRef("FantaTabSheet.react"),bootloadPlaceholder:c("React").createElement("div",null),key:q});break;case c("MercurySheetPolicy").sheets.ChatEventReminderTabSheet:u=c("React").createElement(c("BootloadedComponent.react"),{bootloadLoader:c("JSResource")("FantaEventReminderTabSheet.react").__setRef("FantaTabSheet.react"),bootloadPlaceholder:c("React").createElement("div",null),key:q,threadID:o});break;case c("MercurySheetPolicy").sheets.ChatAppointmentBanner:if(s){var x=k.getCurrentlyLoadedMessages(o);u=c("React").createElement(c("BootloadedComponent.react"),{bootloadLoader:c("JSResource")("ChatAppointmentBannerRoot.react").__setRef("FantaTabSheet.react"),bootloadPlaceholder:c("React").createElement("div",null),pageID:s.other_user_fbid,userID:c("CurrentUser").getID(),count:100,messageList:x,appointmentBannerDidUpdate:c("emptyFunction"),key:q,threadID:o})}break;case c("MercurySheetPolicy").sheets.ChatMontageSheet:u=c("React").createElement(c("BootloadedComponent.react"),{bootloadLoader:c("JSResource")("ChatMontageSheet.react").__setRef("FantaTabSheet.react"),bootloadPlaceholder:c("React").createElement("div",null),key:q,threadID:o,onResize:c("emptyFunction")});break;case c("MercurySheetPolicy").sheets.ChatJoinCallSheet:if(s){var y=s.rtc_call_data,z=s.thread_fbid;u=c("React").createElement(c("BootloadedComponent.react"),{bootloadLoader:c("JSResource")("ChatJoinCallSheet.react").__setRef("FantaTabSheet.react"),bootloadPlaceholder:c("React").createElement("div",null),key:q,rtcCallData:y,threadFBID:z})}break;case c("MercurySheetPolicy").sheets.ChatRoomAssociatedObjectSheet:if(s){var A=s.associated_object;u=c("React").createElement(c("BootloadedComponent.react"),{bootloadLoader:c("JSResource")("ChatRoomAssociatedObjectSheet.react").__setRef("FantaTabSheet.react"),bootloadPlaceholder:c("React").createElement("div",null),key:q,associatedObject:A})}break;case c("MercurySheetPolicy").sheets.ChatWorkDoNotDisturbSheet:u=c("React").createElement(c("BootloadedComponent.react"),{bootloadLoader:c("JSResource")("ChatWorkDoNotDisturbSheet.react").__setRef("FantaTabSheet.react"),bootloadPlaceholder:c("React").createElement("div",null),key:q,description:p.workAvailabilityHumanReadable});break;case c("MercurySheetPolicy").sheets.ChatMentorshipProgramSheet:u=c("React").createElement(c("BootloadedComponent.react"),{bootloadLoader:c("JSResource")("MentorshipProgramSheet.react").__setRef("FantaTabSheet.react"),bootloadPlaceholder:c("React").createElement("div",null),key:q,programName:p.mentorshipProgramName,groupID:p.mentorshipGroupID});break}if(u)return c("React").createElement("div",{className:"_1sk5"},c("React").createElement("div",{className:"_1sk6"},u));return null};function m(){i.apply(this,arguments)}m.propTypes={threadID:l.string.isRequired,tabContent:l.object.isRequired};f.exports=m}),null);
__d("FantaTabMain.react",["cx","fbt","invariant","Bootloader","BootloadOnRender.react","ChatBehavior","ChatTabBlinking","CurrentUser","DragDropTarget","Event","FantaAvailableStatus","FantaChatHeaderContainer.react","FantaConversationScroller.react","FantaDragAndDrop.react","FantaDispatcher","FantaMessageActions","FantaPageComposerNullState.react","FantaPendingActions.react","FantaTabActions","FantaTabComposer.react","FantaTabSheet.react","immutable","JSResource","Keys","LazyComponent.react","MercuryIDs","MercuryParticipants","MessageRequestUtils","MessengerBotMenuDataFetcher","MNCommercePageSetting","Parent","React","ReactDOM","SimpleXUIDialog","WorkFileUploadsGating","WorkFocusMode","convertMIGColorToFIGColor","FBIDCheck","getPageIDFromThreadID","getVendorPrefixedEventName","gkx","idx","ifRequired","joinClasses","throttle","MarketplaceWWWFeatureGating","QE2Logger"],(function aa(ba,a,ca,da,b,ea,fa,c,d){"use strict";__p&&__p();var e,f,g=/\D+/g,h=a("React").PropTypes;e=babelHelpers.inherits(i,a("React").Component);f=e&&e.prototype;function i(){__p&&__p();var j,k;for(var l=arguments.length,m=Array(l),n=0;n<l;n++)m[n]=arguments[n];return k=(j=f.constructor).call.apply(j,[this].concat(m)),this.state={closing:false,disableInput:false},this.$FantaTabMain19=function(event){var o=!!a("Parent").byClass(event.target,"fantaTabMain-"+this.props.tab.id),p=!!a("Parent").byClass(event.relatedTarget,"fantaTabMain-"+this.props.tab.id);if(!o||!p){if(this.$FantaTabMain9){clearTimeout(this.$FantaTabMain9);this.$FantaTabMain9=null;return}a("FantaTabActions").hoveredTab(this.props.tab.id)}}.bind(this),this.$FantaTabMain20=function(event){var o=!!a("Parent").byClass(event.target,"fantaTabMain-"+this.props.tab.id),p=!!a("Parent").byClass(event.relatedTarget,"fantaTabMain-"+this.props.tab.id);if(!o||!p){if(this.$FantaTabMain9)clearTimeout(this.$FantaTabMain9);this.$FantaTabMain9=setTimeout(function(){this.$FantaTabMain9=null;a("FantaTabActions").unhoveredTab(this.props.tab.id)}.bind(this),500)}}.bind(this),this.$FantaTabMain17=function(event){var o=!!a("Parent").byClass(event.target,"fantaTabMain-"+this.props.tab.id),p=!!a("Parent").byClass(event.relatedTarget,"fantaTabMain-"+this.props.tab.id);if(!o||!p)if(!event.relatedTarget||!event.target)this.$FantaTabMain7=setTimeout(function(){this.$FantaTabMain7=null;this.$FantaTabMain21(this.props.tab.id)}.bind(this),100);else this.$FantaTabMain21(this.props.tab.id)}.bind(this),this.$FantaTabMain18=function(event){__p&&__p();if(this.$FantaTabMain7){clearTimeout(this.$FantaTabMain7);this.$FantaTabMain7=null;return}var o=!!a("Parent").byClass(event.target,"fantaTabMain-"+this.props.tab.id),p=!!a("Parent").byClass(event.relatedTarget,"fantaTabMain-"+this.props.tab.id),q=event.target;if(!(q&&q.classList&&(q.classList.contains("_3olu")||q.classList.contains("_61td"))))if(!o||!p)if(!a("FantaDispatcher").isDispatching())a("FantaTabActions").focusTab(this.props.tab.id)}.bind(this),this.$FantaTabMain23=function(o){a("FantaMessageActions").linkPreview(this.props.tab.id,o)}.bind(this),this.$FantaTabMain22=function(o){var p=this.props.tabContent,q=p||{},r=q.composer;if(r)a("FantaMessageActions").prepareFilesForSend(this.props.tab.id,o,r)}.bind(this),this.$FantaTabMain14=function(o){if(o.keyCode===a("Keys").ESC){this.$FantaTabMain2(true);o.preventDefault();o.stopPropagation()}}.bind(this),this.$FantaTabMain15=function(o){if(o.keyCode===a("Keys").TAB)this.$FantaTabMain16(o)}.bind(this),this.$FantaTabMain16=function(event){var o=this.props.raisedTabCount;if(o>1){event.preventDefault();this.$FantaTabMain3(event.ctrlKey,event.shiftKey)}}.bind(this),this.$FantaTabMain2=function(o){if(!this.refs.composer||this.refs.composer.hasEmptyInput()&&!this.$FantaTabMain24())this.$FantaTabMain25(o);else this.$FantaTabMain26(o)}.bind(this),k}i.prototype.componentWillMount=function(){this.$FantaTabMain2=a("throttle")(this.$FantaTabMain2,100);this.$FantaTabMain3=a("throttle")(this.$FantaTabMain3,100)};i.prototype.componentDidMount=function(){this.$FantaTabMain10();this.$FantaTabMain11();this.$FantaTabMain12();this.$FantaTabMain13()};i.prototype.componentDidUpdate=function(){this.$FantaTabMain11()};i.prototype.componentWillUnmount=function(){this.$FantaTabMain4&&this.$FantaTabMain4.disable()};i.prototype.shouldComponentUpdate=function(j,k){var l=this.props,m=this.state;return l.hasFetchedAll!==j.hasFetchedAll||l.isFocused!==j.isFocused||l.isHovered!==j.isHovered||l.isLastGroupTab!==j.isLastGroupTab||!l.messages.equals(j.messages)||!l.tab.equals(j.tab)||!l.tabContent&&!!j.tabContent||l.tabContent&&!l.tabContent.equals(j.tabContent)||l.thread!==j.thread||m.closing!==k.closing||m.disableInput!==k.disableInput||!l.onlineUsers.equals(j.onlineUsers)};i.prototype.$FantaTabMain11=function(){__p&&__p();var j=this.props,k=j.tab,l=j.thread,m=k.id;if(!l)return;var n=this.refs.root&&a("ReactDOM").findDOMNode(this.refs.root);if(!n)return;var o=l.unread_count;if(a("WorkFocusMode")&&a("WorkFocusMode").currentViewerInFocusMode(m))return;if(o!==undefined){var p=!!o&&(!a("ChatBehavior").showsTabUnreadUI||a("ChatBehavior").showsTabUnreadUI());if(p)a("ChatTabBlinking").blinkTab(m,{getTabElem:function q(){return n},isFocused:function(){return this.props.isFocused}.bind(this),isHovered:function q(){return false}});else a("ChatTabBlinking").unblinkTab(m)}};i.prototype.render=function(){__p&&__p();var j,k,l,m,n,o=this.props,p=o.hasFetchedAll,q=o.isFocused,r=o.isHovered,s=o.isLastGroupTab,t=o.messages,u=o.onLoadMoreMessages,v=o.onSelectSticker,w=o.onSendHotLike,x=o.onSendMessage,y=o.onSendPhoto,z=o.showContextBanner,A=o.tab,B=o.tabContent,C=o.thread,D=A.id,E=a("CurrentUser").getID(),F=B&&B.composer.fileUploader,G=B&&B.composer.sharePreview,H=F&&F.uploadingFiles,I=F&&F.uploadedFiles,J=C&&a("convertMIGColorToFIGColor")(C.custom_color),K=B&&B.nullStateCTA,L=K&&C&&C.message_count===0,M=C&&C.participants||[],N=B&&B.threadPreviewRecipients||a("immutable").List(),O=M.length>0?M:N.toArray(),P=(j=this.props)!=null?(j=j.thread)!=null?j.other_user_fbid:j:j,Q=P?a("MercuryParticipants").getNow(a("MercuryIDs").getParticipantIDFromUserID(P)):null,R=Q&&Q.short_name||"page",S=C&&a("MessageRequestUtils").isMessageRequest(C)?a("React").createElement(a("FantaPendingActions.react"),{thread:C,threadID:D}):L&&K?a("React").createElement(a("FantaPageComposerNullState.react"),{threadID:D,nullStateCTA:K,pageName:R}):B?a("React").createElement("div",{className:"fbNubFlyoutFooter"+(this.state.disableInput?" fbNubFlyoutComposerDisabled":"")},a("React").createElement(a("FantaTabComposer.react"),{composer:B.composer,disableInput:this.state.disableInput,fileUploader:F,isFocused:q,onEscape:this.$FantaTabMain14,onKeyDown:this.$FantaTabMain14,onKeyPress:this.$FantaTabMain15,onSelectSticker:v,onSendHotLike:w,onSendMessage:x,onSendPhoto:y,onTab:this.$FantaTabMain16,ref:"composer",participants:O,threadID:D,viewer:E})):null,T=a("FantaAvailableStatus").isAvailable(C,D);!!B||d(0);var U=a("React").createElement(a("FantaTabSheet.react"),{tabContent:B,threadID:D}),V=(k=C)!=null?k.marketplace_thread_data:k,W=(l=V)!=null?l.for_sale_item_fbid:l,X=(m=V)!=null?m.buyer_fbid:m,Y=(n=V)!=null?n.seller_fbid:n,Z=void 0;if(W&&X&&Y){var $=a("MarketplaceWWWFeatureGating").marketplaceWWWMessengerBanner;if($!=null)a("QE2Logger").logExposureForUser("marketplace_www_messenger");Z=$?a("React").createElement(a("BootloadOnRender.react"),{loader:a("JSResource")("MarketplaceMessengerContextBanner.react").__setRef("FantaTabMain.react"),placeholder:a("React").createElement("div",null),component:a("React").createElement(a("LazyComponent.react"),{buyerID:X,forSaleItemID:W,sellerID:Y})}):null}var ga=B&&B.isMultiCompany,ha=B&&B.joinableInterstitialData?a("React").createElement(a("BootloadOnRender.react"),{loader:a("JSResource")("ChatJoinableInterstitialPreview.react").__setRef("FantaTabMain.react"),placeholder:a("React").createElement("div",null),component:a("React").createElement(a("LazyComponent.react"),{data:B.joinableInterstitialData,isActive:q,onClose:this.$FantaTabMain2})}):a("React").createElement("div",{className:"fbNubFlyoutInner"},a("React").createElement(a("FantaChatHeaderContainer.react"),{composer:B.composer,customColor:J,isFocused:q,isLastGroupTab:s,isMultiCompany:ga,onClose:this.$FantaTabMain2,thread:C,threadID:D,viewer:E}),Z,a("React").createElement("div",{className:"_1ia _2sz2",ref:function(ia){this.$FantaTabMain5=ia}.bind(this)},U,a("React").createElement(a("FantaConversationScroller.react"),{hasFetchedAll:p,isFocused:q,messages:t,onFocus:function(){return this.refs.composer&&this.refs.composer.focusInput()}.bind(this),onLoadMoreMessages:u,onlineUsers:this.props.onlineUsers,showContextBanner:z,thread:C,threadID:D,viewer:E}),a("React").createElement("div",{className:"_3bpu"}),a("React").createElement("div",{className:"_2hc2"},a("React").createElement(a("BootloadOnRender.react"),{loader:a("JSResource")("P2PChatThreadBannerContainer.react").__setRef("FantaTabMain.react"),placeholder:a("React").createElement("div",null),component:a("React").createElement(a("LazyComponent.react"),{isVisible:true,otherUserID:a("MercuryIDs").getUserIDFromThreadID(D),threadID:D})})),a("React").createElement("div",{className:"_4g6x"},a("React").createElement("div",{className:"_4g6y"},a("React").createElement("div",{className:"_4g6z _4g71"},c._("Drag Link\/Files Here")),a("React").createElement("div",{className:"_4g6z _4g6- _4g6_"},c._("Drop Files Here")),a("React").createElement("div",{className:"_4g6z _4g6- _4g70"},c._("Drop Link Here")))),S,a("React").createElement(a("FantaDragAndDrop.react"),{composer:B.composer,threadID:D,uploadedFiles:I,uploadingFiles:H,sharePreview:G})));return a("React").createElement("div",{className:a("joinClasses")((this.state.closing?"_2suj":"")+" _3_9e _s0f _50mz _50m_"+(T?" _4-0b":"")+" fbNub _50-v"+(q?" focusedTab":"")+(r?" hoveredTab":"")+" opened _27_3"+(a("gkx")("AT41s5nc5usyR3AxF6JSJYEGfAY8tyQMohn4tHD5EBNPLj9IR60HLUM8XbLkhkanQ0whco6up8j9rPvwA-GdPWr0")?" _64ko":""),"fantaTabMain-"+D),onBlur:this.$FantaTabMain17,onFocus:this.$FantaTabMain18,onKeyDown:this.$FantaTabMain14,onKeyPress:this.$FantaTabMain15,onMouseEnter:this.$FantaTabMain19,onMouseLeave:this.$FantaTabMain20,ref:"root"},a("React").createElement("div",{className:"fbNubFlyout fbDockChatTabFlyout uiContextualLayerParent",role:"complementary"},a("React").createElement("div",{className:"fbNubFlyoutOuter"},ha)))};i.prototype.$FantaTabMain21=function(j){if(!a("FantaDispatcher").isDispatching())a("FantaTabActions").blurTab(this.props.tab.id);if(this.$FantaTabMain9){clearTimeout(this.$FantaTabMain9);this.$FantaTabMain9=null}a("FantaTabActions").unhoveredTab(j)};i.prototype.$FantaTabMain13=function(){var j=a("getPageIDFromThreadID")(this.props.tab.id);if(j)a("MessengerBotMenuDataFetcher").getHasPageSetting(j,function(k){this.setState({disableInput:k})}.bind(this),function(){this.setState({disableInput:false})}.bind(this),a("MNCommercePageSetting").COMPOSER_INPUT_DISABLED)};i.prototype.$FantaTabMain10=function(){__p&&__p();if(a("WorkFileUploadsGating").canUploadFiles&&!this.$FantaTabMain4){var j=a("ReactDOM").findDOMNode(this.$FantaTabMain5);if(j){var k=new(a("DragDropTarget"))(j);this.$FantaTabMain4=k;k.setOnFilesDropCallback(this.$FantaTabMain22);k.setOnURLDropCallback(this.$FantaTabMain23);k.enable()}}};i.prototype.$FantaTabMain3=function(j,k){if(!j)if(k)a("FantaTabActions").focusPreviousTab();else a("FantaTabActions").focusNextTab()};i.prototype.$FantaTabMain24=function(){return this.$FantaTabMain27()||this.$FantaTabMain28()};i.prototype.$FantaTabMain27=function(){var j,k,l=this.props.tabContent,m=((j=l)!=null?(j=j.composer)!=null?(j=j.fileUploader)!=null?j.uploadedFiles:j:j:j)||{size:0},n=((k=l)!=null?(k=k.composer)!=null?(k=k.fileUploader)!=null?k.uploadingFiles:k:k:k)||{size:0};return m.size>0||n.size>0};i.prototype.$FantaTabMain28=function(){var j,k=this.props.tabContent,l=(j=k)!=null?(j=j.composer)!=null?j.sharePreview:j:j;return!!(l&&l.params&&l.type)};i.prototype.$FantaTabMain25=function(j){__p&&__p();var k=this.props.tab,l=a("ReactDOM").findDOMNode(this.refs.root);this.$FantaTabMain1=setTimeout(function(){return j?a("FantaTabActions").closeAndTabNext(k.id):a("FantaTabActions").closeTab(k.id)},1.2*a("ifRequired")("cssVar",function(n){return"200ms".replace(g,"")},function(){return 200}));var m=a("Event").listen(l,a("getVendorPrefixedEventName")("animationend"),function(n){if(n.animationName==="closeChatTab"){j?a("FantaTabActions").closeAndTabNext(k.id):a("FantaTabActions").closeTab(k.id);clearTimeout(this.$FantaTabMain1);m.remove()}}.bind(this));this.$FantaTabMain29();this.setState({closing:true})};i.prototype.$FantaTabMain26=function(j){var k=this.props.tab,l=k.id;a("FantaTabActions").blurTab(l);var m=c._("Are you sure you want to close this chat window?"),n=c._("You haven't sent your message.");a("SimpleXUIDialog").showConfirm(m,n,function(o){if(o)j?a("FantaTabActions").closeAndTabNext(l):a("FantaTabActions").closeTab(l);else a("FantaTabActions").focusTab(l)},{autofocusConfirm:true,useReactFocusBehavior:true})};i.prototype.$FantaTabMain12=function(){this.$FantaTabMain8=Math.floor(Date.now()/1e3)};i.prototype.$FantaTabMain29=function(){var j=this.props.thread,k=j?j.other_user_fbid:null,l=Math.floor(Date.now()/1e3),m=this.$FantaTabMain8;if(j&&k&&!a("FBIDCheck").isUser_deprecated(k))a("Bootloader").loadModules(["PagesLogger","PagesLoggerEventEnum","PagesLoggerEventTargetEnum","PagesEventObserver","PagesEventType"],function(n,o,p,q,r){n.log(k,o.CLICK,p.MESSAGE_FANTA_TAB_CLOSE,"",["pages_surface_team"],{open_tab_timestamp:m,close_tab_timestamp:l,last_message_timestamp:j.last_message_timestamp,message_count:j.message_count,snippet_sender:j.snippet_sender,participants:j.participants});q.notify(r.MESSAGES_FANTA_TAB_CLOSE,k,{open_tab_timestamp:m,close_tab_timestamp:l,last_message_timestamp:j.last_message_timestamp,message_count:j.message_count,snippet_sender:j.snippet_sender,participants:j.participants})},"FantaTabMain.react")};i.propTypes={hasFetchedAll:h.bool.isRequired,isFocused:h.bool.isRequired,isHovered:h.bool.isRequired,isLastGroupTab:h.bool.isRequired,messages:h.object,onlineUsers:h.instanceOf(a("immutable").List).isRequired,onLoadMoreMessages:h.func.isRequired,onSelectSticker:h.func.isRequired,onSendHotLike:h.func.isRequired,onSendMessage:h.func.isRequired,onSendPhoto:h.func.isRequired,raisedTabCount:h.number,showContextBanner:h.bool,tab:h.object.isRequired,tabContent:h.object,thread:h.object};b.exports=i}),null);
__d("FantaTabMainLoader.react",["Bootloader","FantaAppStore","FantaAvailableStatus","FantaGetMessageActions","FantaMessageActions","FantaTabMain.react","immutable","MercuryConfig","MercuryIDs","React","TimeSlice","emptyFunction","idx","gkx","requestIdleCallback","setImmediate"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h,i,j=c("React").PropTypes,k=function m(n){__p&&__p();var o,p;c("FantaAppStore").addReducers(n);var q=c("FantaAppStore").getState(),r=(o=q)!=null?(o=o.mercury)!=null?o.tabContents:o:o;if(r)(function(){var s=r.reduce(function(s,t){var u=t.thread;if(u)s.push(u);return s},[]);c("setImmediate")(function(){return c("FantaGetMessageActions").threadsUpdated(s)})})();k=c("emptyFunction")};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.$FantaTabMainLoader2=function(){var r=this.props.tab;c("FantaGetMessageActions").fetchMoreMessages(r.id)}.bind(this),this.$FantaTabMainLoader3=function(r,s){var t=this.props.tab;c("FantaMessageActions").sendSticker(t.id,r,s)}.bind(this),this.$FantaTabMainLoader4=function(r,s,t,u){var v=this.props.tab;c("FantaMessageActions").sendHotLike(v.id,r,s,t,u)}.bind(this),this.$FantaTabMainLoader5=function(r,s,t){var u=this.props.tab;c("FantaMessageActions").sendMessage(u.id,r,s,t)}.bind(this),this.$FantaTabMainLoader6=function(r,s){var t=this.props.tab;c("FantaMessageActions").sendPhoto(t.id,r,s)}.bind(this),n}l.prototype.shouldComponentUpdate=function(m){var n=this.props;return n.isFocused!==m.isFocused||n.isHovered!==m.isHovered||n.isLastTabOfType!==m.isLastTabOfType||!n.tab.equals(m.tab)||!n.tabContent.equals(m.tabContent)};l.prototype.componentDidMount=function(){var m=function m(){c("Bootloader").loadModules(["FantaReducersTabSheets"],k,"FantaTabMainLoader.react")};if(c("gkx")("AT45Q0YAtTF77a1x8ZT9-rWfsF83gTI5tMuldZujY0KaNI6icTW09jBEE5BSuvPKdZtVIIdleK4appEhrvQPrVOyhvdXTeLDSdYEXUe9KmbS3Q"))c("TimeSlice").guard(function(){c("requestIdleCallback")(m)},"additional request not needed for initial display",{propagationType:c("TimeSlice").PropagationType.ORPHAN})();else m()};l.prototype.render=function(){var m=this.props,n=m.isFocused,o=m.isHovered,p=m.isLastTabOfType,q=m.raisedTabCount,r=m.tab,s=m.tabContent,t=s.hasFetchedAll,u=s.showContextBanner,v=s.thread,w=s.threadPreviewID,x=s.messages,y=w?r.id+"-"+w:r.id;if(!s)return c("React").createElement("div",{key:"noContent-"+y});if(!x)x=c("immutable").List();var z=c("immutable").List([]);if(c("MercuryConfig").GDWC)z=this.$FantaTabMainLoader1(v,r);return c("React").createElement(c("FantaTabMain.react"),{hasFetchedAll:t,isFocused:n,isHovered:o,isLastGroupTab:p,key:y,messages:x,onlineUsers:z,onLoadMoreMessages:this.$FantaTabMainLoader2,onSelectSticker:this.$FantaTabMainLoader3,onSendHotLike:this.$FantaTabMainLoader4,onSendMessage:this.$FantaTabMainLoader5,onSendPhoto:this.$FantaTabMainLoader6,raisedTabCount:q,showContextBanner:u,tab:r,tabContent:s,thread:v})};l.prototype.$FantaTabMainLoader1=function(m,n){__p&&__p();var o=c("MercuryIDs").getUserIDFromThreadID(n.id),p=[];if(o)p=c("FantaAvailableStatus").isAvailable(m,n.id)?[o]:[];else if(m){p=m.participants.filter(function(q){if(!q)return false;var r=c("MercuryIDs").getThreadIDFromParticipantID(q);if(!r)return false;var s=c("FantaAvailableStatus").isAvailable(null,r);return s});p=p.map(function(q){return c("MercuryIDs").getUserIDFromParticipantID(q)||""})}return c("immutable").List(p)};l.propTypes={isFocused:j.bool.isRequired,isHovered:j.bool.isRequired,isLastTabOfType:j.bool.isRequired,raisedTabCount:j.number,tab:j.object.isRequired,tabContent:j.object};f.exports=l}),null);
__d("FantaTabMinimized.react",["cx","fbt","ChatBehavior","ChatTabBlinking","ChatTabHeaderContainer.react","CurrentUser","Event","FantaAvailableStatus","FantaTabActions","React","ReactDOM","SimpleXUIDialog","WorkFocusMode","emptyFunction","getVendorPrefixedEventName","ifRequired"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j,k,l=/\D+/g,m=c("React").PropTypes;j=babelHelpers.inherits(n,c("React").Component);k=j&&j.prototype;function n(){__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=k.constructor).call.apply(o,[this].concat(r)),this.state={closing:false},this.$FantaTabMinimized4=function(){var t=this.props.tabContent;if(!t||t&&t.composer.text.length===0)this.$FantaTabMinimized5();else this.$FantaTabMinimized6()}.bind(this),this.$FantaTabMinimized3=function(event){var t=event.target;if(t&&t.classList&&!t.classList.contains("button")){event.preventDefault();c("FantaTabActions").unminimizeTab(this.props.tab.id);c("FantaTabActions").focusTab(this.props.tab.id)}}.bind(this),p}n.prototype.componentDidMount=function(){this.$FantaTabMinimized2()};n.prototype.componentDidUpdate=function(){this.$FantaTabMinimized2()};n.prototype.shouldComponentUpdate=function(o){var p=this.props;return!p.tab.equals(o.tab)||!p.tabContent&&!!o.tabContent||!!p.tabContent&&!p.tabContent.equals(o.tabContent)};n.prototype.$FantaTabMinimized2=function(){__p&&__p();var o=this.props,p=o.tab,q=o.tabContent,r=p.id;if(!q)return;var s=q.thread;if(!s)return;var t=this.refs.root&&c("ReactDOM").findDOMNode(this.refs.root);if(!t)return;var u=s.unread_count;if(c("WorkFocusMode")&&c("WorkFocusMode").currentViewerInFocusMode(r))return;if(u!==undefined){var v=!!u&&(!c("ChatBehavior").showsTabUnreadUI||c("ChatBehavior").showsTabUnreadUI());if(v)c("ChatTabBlinking").blinkTab(r,{getTabElem:function w(){return t},isFocused:function w(){return false},isHovered:function w(){return false}});else c("ChatTabBlinking").unblinkTab(r)}};n.prototype.render=function(){var o=this.props,p=o.tab,q=o.tabContent,r=q&&q.thread&&q.thread.custom_color,s=r?{color:r}:null,t=p.id,u=q&&!!q.thread&&c("FantaAvailableStatus").isAvailable(q.thread,t);return c("React").createElement("div",{className:"_4cd8 _50mz _50m_ fbNub _50-v"+(u?" _4-0b":"")+" _27_3",ref:"root"},c("React").createElement("div",{className:(this.state.closing?"_2suj":"")+" clearfix fbNubFlyoutTitlebar titlebar"+(!!r?" _1m34":""),style:s},c("React").createElement(c("ChatTabHeaderContainer.react"),{attachmentsShelf:document.createElement("div"),composer:q&&q.composer,isActive:false,isRaised:false,isTyping:false,nameConversationFunc:c("emptyFunction"),onClick:this.$FantaTabMinimized3,onCloseClick:this.$FantaTabMinimized4,onRTCNuxCloseButtonClick:c("emptyFunction"),rtcNuxShown:false,sheetController:{},showAddFriend:c("emptyFunction"),threadID:this.props.tab.id,viewer:c("CurrentUser").getID()})))};n.prototype.$FantaTabMinimized5=function(){__p&&__p();var o=this.props.tab,p=c("ReactDOM").findDOMNode(this.refs.root);this.$FantaTabMinimized1=setTimeout(function(){return c("FantaTabActions").closeAndTabNext(o.id)},1.2*c("ifRequired")("cssVar",function(r){return"200ms".replace(l,"")},function(){return 200}));var q=c("Event").listen(p,c("getVendorPrefixedEventName")("animationend"),function(r){if(r.animationName==="closeChatTab"){c("FantaTabActions").closeAndTabNext(o.id);clearTimeout(this.$FantaTabMinimized1);q.remove()}}.bind(this));this.setState({closing:true})};n.prototype.$FantaTabMinimized6=function(){var o=this.props.tab,p=i._("Are you sure you want to close this chat window?");c("FantaTabActions").blurTab(o.id);var q=i._("You haven't sent your message.");c("SimpleXUIDialog").showConfirm(p,q,function(r){if(r)c("FantaTabActions").closeAndTabNext(o.id);else c("FantaTabActions").focusTab(o.id)},{autofocusConfirm:true,useReactFocusBehavior:true})};n.propTypes={tab:m.object.isRequired,tabContent:m.object};f.exports=n}),null);
__d("FantaMercuryTabsWithMain.react",["Bootloader","FantaAppStore","FantaCookieUtil","FantaMercuryTabOverflowBootloader.react","FantaTabActions","FantaTabGroup.react","FantaTabMainLoader.react","FantaTabMinimized.react","FluxContainer","LazyComponent.react","LoadOnRender.react","MercuryIDs","PresenceState","React"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h,i,j=function j(l){c("Bootloader").loadModules(["MessengerReasonDialogContainerReact.bs"],function(m){var n=m.jsComponent;return l(n)},"FantaMercuryTabsWithMain.react")};h=babelHelpers.inherits(k,c("React").PureComponent);i=h&&h.prototype;k.getStores=function(){return[c("FantaAppStore")]};k.calculateState=function(){return{tabGroup:c("FantaAppStore").getState().tabGroup,tabContents:c("FantaAppStore").getState().mercury.tabContents}};k.prototype.componentDidMount=function(){if(this.props.loadDataOnMount)c("FantaTabActions").loadFromData(c("FantaCookieUtil").convertCookieData(c("PresenceState").get()))};k.prototype.render=function(){return[c("React").createElement(c("FantaTabGroup.react"),{key:"tabgroup",MainComponent:c("FantaTabMainLoader.react"),MinimizedComponent:c("FantaTabMinimized.react"),OverflowComponent:c("FantaMercuryTabOverflowBootloader.react"),tabGroup:this.state.tabGroup,tabContents:this.state.tabContents,isLastOfTypeChecker:this.$FantaMercuryTabsWithMain1}),c("React").createElement(c("LoadOnRender.react"),{key:"dialog",component:c("React").createElement(c("LazyComponent.react"),null),loader:j,placeholder:c("React").createElement("span",null)})]};k.prototype.$FantaMercuryTabsWithMain1=function(l){return c("MercuryIDs").isGroupChat(l.id)};function k(){h.apply(this,arguments)}f.exports=c("FluxContainer").create(k)}),null);
__d("FantaTabsReactApp",["ChatPerfInstrumentation","FantaMercuryTabsWithMain.react","FantaTabsAppBase","Map","React","ReactDOM","setImmediate"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h,i,j=void 0;h=babelHelpers.inherits(k,c("FantaTabsAppBase"));i=h&&h.prototype;k.prototype.initializeFantaData=function(l){__p&&__p();e(["FantaAppStore","FantaCookieUtil","FantaGetMessageActions","FantaTabActions","MercuryThreadInformer","PresenceState"],function(m,n,o,p,q,r){__p&&__p();p.loadFromData(n.convertCookieData(r.get(),null,l));r.registerStateLoader(function(s){p.loadFromData(n.convertCookieData(s,m.getState().tabGroup,l))});r.registerStateStorer(function(s){var t=m.getState().tabGroup;if(!j||j&&!j.equals(t)){j=t;return n.createCookieData(t,s)}else return s});q.get().subscribe("threads-updated",function(s,t){Object.keys(t).forEach(function(u){c("setImmediate")(function(){o.refreshThread(u)})})});c("ChatPerfInstrumentation").logInitData()})};k.prototype.initializeFantaUI=function(){__p&&__p();e(["FantaAppStore","FantaMercuryThreadEventsBootloaded","FantaMessageActions","FantaTabActions","FantaTabViewportManager","FBRTCMessageHandler","MercuryBrowserAlerts"],function(l,m,n,o,p,q,r){__p&&__p();q.init();r.init();c("ReactDOM").render(this.getViewComponent(),this.tabsElem);m.onMessagesReceived(function(t,u){c("setImmediate")(function(){n.receivedNewMessage(t,u)})});p.init(this.tabsElem);c("ChatPerfInstrumentation").logInitUI();var s=l.getState().tabGroup.tabs;if(s.toArray().length===0)c("ChatPerfInstrumentation").logDisplayDone()}.bind(this))};k.prototype.getViewComponent=function(){return c("React").createElement(c("FantaMercuryTabsWithMain.react"),{loadDataOnMount:false})};function k(){h.apply(this,arguments)}f.exports=new k()}),null);
__d("ChatInitialDataTransformer.bs",["bs_array","bs_js_dict","bs_caml_array","bs_caml_format","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=[],m=[],n={},o=[],p={},q=[];c("bs_array").iter(function(r){__p&&__p();if(r==null)return 0;else{var s=c("MessengerServerPayloadTransformer.bs").getThreadFBID(r),t=c("MessengerServerPayloadTransformer.bs").getOtherUserID(r),u=c("MessengerServerPayloadTransformer.bs").transformThread(j,r,k);l.push(u);var v=c("MessengerServerPayloadTransformer.bs").transformMessages(j,r,k);if(v)c("bs_array").iter(function(E){m.push(E);return 0},v[0]);var w=c("MessengerServerPayloadTransformer.bs").getMessagePageInfo(r);if(w)if(!w[0].has_previous_page)if(s==null){if(!(t==null))q.push({type:"thread",fbid:t})}else q.push({type:"thread",fbid:s});var x=c("MessengerServerPayloadTransformer.bs").transformReadReceipts(j,r);if(x){var y=x[0];if(!(s==null))n[s]=y;if(!(t==null))n[t]=y}var z=c("MessengerServerPayloadTransformer.bs").transformDeliveryReceipts(r);if(z.length>=1){var A=c("bs_caml_array").caml_array_get(z,0);if(u.is_canonical){var B=u.other_user_fbid;if(!(B==null))o.push({other_user_fbid:B,thread_fbid:null,time:c("bs_caml_format").caml_float_of_string(A.timestamp_precise)})}else{var C=u.thread_fbid;if(!(C==null))o.push({other_user_fbid:null,thread_fbid:C,time:c("bs_caml_format").caml_float_of_string(A.timestamp_precise)})}}var D=c("MessengerServerPayloadTransformer.bs").transformParticipants(r);return c("bs_array").iter(function(E){p[E.fbid]=E;return 0},D)}},i.threads);return{threads:l,actions:m,roger:n,delivery_receipts:o,participants:c("bs_js_dict").values(p),end_of_history:q}}g.transform=h}),null);