if (self.CavalryLogger) { CavalryLogger.start_js(["sB+Rb"]); }

__d("MercuryAudioPlayer",["Arbiter","DOM","Event","Flash"],(function(a,b,c,d,e,f){__p&&__p();var g=200;function h(){var a=b("DOM").create("audio"),c=!1;try{a.canPlayType&&(a.canPlayType("video/mp4;").replace(/^no$/,"")&&(c=!0))}finally{return c}}function i(){return b("Flash").isAvailable()}var j=function(){this.interval=null,this.arbiterInstance=null,this.audio=b("DOM").create("audio"),b("Event").listen(this.audio,"playing",function(){this.informAttachment("playing",this.audio.currentTime),this.interval=setInterval(function(){this.informAttachment("playing",this.audio.currentTime)}.bind(this),g)}.bind(this)),b("Event").listen(this.audio,"ended",function(){clearInterval(this.interval),this.informAttachment("finished")}.bind(this))};Object.assign(j.prototype,{setAudio:function(a,b){this.audio.setAttribute("src",a),this.arbiterInstance=b},informAttachment:function(a,b){this.arbiterInstance&&this.arbiterInstance.inform(a,b)},play:function(){this.audio.play(),this.informAttachment("played")},resume:function(){this.audio.play(),this.informAttachment("played")},pause:function(){this.audio.pause(),clearInterval(this.interval),this.informAttachment("paused")},getType:function(){return"html5"}});var k=function(){this.src=null;this.arbiterInstance=null;var a=b("DOM").create("div");document.body.appendChild(a);this.swf=b("Flash").embed("/swf/cigars/SoundStreamPlayer.swf",a,null,{});this.interval=null;b("Arbiter").subscribe("soundstream/finished",function(){clearInterval(this.interval),this.informAttachment("finished")}.bind(this))};Object.assign(k.prototype,{setAudio:function(a,b){this.src=a,this.arbiterInstance=b},informAttachment:function(a,b){this.arbiterInstance&&this.arbiterInstance.inform(a,b)},play:function(){this.swf.playSound(this.src),this.interval=setInterval(function(){var a=this.swf.getCurrentTime();this.informAttachment("playing",a)}.bind(this),g),this.informAttachment("played")},resume:function(){this.swf.resume(),this.informAttachment("played")},pause:function(){clearInterval(this.interval),this.swf.pause(),this.informAttachment("paused")},getType:function(){return"flash"}});function l(){if(h())return new j();else if(i())return new k();return!1}var m=null,n=null,o=0;function a(a,b){this.src=a;this.arbiterInstance=b;this.audio_id=++o;m!==null||(m=l());if(!m)return!1}Object.assign(a.prototype,{getType:function(){if(!m)return!1;else return m.getType()},play:function(a){a&&n==this.audio_id?m.resume():(this.pause(),n=this.audio_id,m.setAudio(this.src,this.arbiterInstance),m.play())},pause:function(){m.pause()}});e.exports=a}),null);
__d("MercuryAttachmentAudioClip.react",["cssVar","cx","fbt","Arbiter","ArbiterMixin","CurrentUser","JSLogger","LeftRight.react","Link.react","MercuryAudioPlayer","MercuryShareAttachmentRenderLocations","React","SubscriptionsHandler","WorkModeConfig","joinClasses","messengerCustomColorUtils","shield"],(function(a,b,c,d,e,f,g,h,i){__p&&__p();a=b("React").PropTypes;var j="MercuryAttachmentAudioClip/play",k="progress-bar",l=b("JSLogger").create("mercury_audio_clip");c=b("React").createClass({displayName:"AudioClip",mixins:[b("ArbiterMixin")],propTypes:{customColor:a.string,duration:a.number,isChat:a.bool,isFromViewer:a.bool,location:a.oneOf(b("MercuryShareAttachmentRenderLocations").getValues()),onAttachmentLoad:a.func,rootClassName:a.string,showHelp:a.bool,src:a.string.isRequired,width:a.number},getInitialState:function(){this.logged=!1;return{time:0,playing:!1,started:!1,duration:this.props.duration,audioPlayer:new(b("MercuryAudioPlayer"))(this.props.src,this)}},componentDidMount:function(){this.props.onAttachmentLoad&&this.props.onAttachmentLoad(),this._subscriptionsHandler=new(b("SubscriptionsHandler"))(),this._subscriptionsHandler.addSubscriptions(this.subscribe("playing",this.updateTime),this.subscribe("played",b("shield")(this.setState,this,{playing:!0,started:!0})),this.subscribe("paused",b("shield")(this.setState,this,{playing:!1})),this.subscribe("finished",b("shield")(this.setState,this,{playing:!1,started:!1,time:this.props.duration})),b("Arbiter").subscribe(j,function(a,b){this.props.src!=b&&this.setState({time:0})}.bind(this)))},componentWillUnmount:function(){this._subscriptionsHandler&&this._subscriptionsHandler.release()},updateTime:function(a,b){this.setState({time:b})},play:function(){this.state.playing?this.state.audioPlayer.pause():(this.state.audioPlayer.play(this.state.started),b("Arbiter").inform(j,this.props.src),this.logged||(this.logged=!0,l.log("play",{uid:b("CurrentUser").getID(),duration:this.props.duration})))},_formatSeconds:function(a){if(a){a=Math.round(a);var b=a%60;b<10&&(b="0"+b);a=Math.floor(a/60);return a+":"+b}else return null},_renderPlayer:function(a,c,d){var e=this.props.isFromViewer,f=this.props.isChat,g=b("WorkModeConfig").is_work_user,h=d===k,j=f&&e&&!h,l=this.props.location===b("MercuryShareAttachmentRenderLocations").MESSENGER;g=g?"#373e4c":"#4080ff";g=d||g;a={width:a};j&&(a.backgroundColor=g);j=d&&d!==k&&!f?{color:d}:{};g={};h&&(g["aria-disabled"]=!0);return b("React").createElement(b("Link.react"),babelHelpers["extends"]({"aria-label":i._("Tin nh\u1eafn tho\u1ea1i"),className:"_1miz _2e-1"+(l?"":" _3_om")+(e&&f?" _3e5f":""),role:"button",style:a,onClick:this.play},g),b("React").createElement("span",{className:"_1mi- _2e-2"},b("React").createElement("i",{className:"_1mi_ _2e-3"})),b("React").createElement("span",{style:j,className:"_1mj0 _2e-4 _3oh-"},c),b("React").createElement("div",{className:"_1mj1 _2e-5"}))},render:function(){__p&&__p();var a=this.state.time,c=this.state.playing,d=this._formatSeconds(this.state.duration),e=this.props.location===b("MercuryShareAttachmentRenderLocations").MESSENGER,f=this.props.width||170;if(e){var g=this.props.duration;g>10?f=240:g>5?f=200:g>2?f=160:f=120}g=null;var h=Math.ceil(a*(f+2)/this.state.duration);e&&(h=Math.ceil(a*(f+24)/this.state.duration));if(this.state.audioPlayer&&this.state.audioPlayer.getType()){var j=this._renderPlayer(f,d,this.props.customColor);f=this._renderPlayer(f,d,k);c="_1mj2 _2e-6"+(c&&a!==0?" _1mj3":"")+(c&&a===0?" _4g4x":"");g=b("React").createElement("div",{className:c},j,b("React").createElement("div",{className:"_1mj4 _2e-7",style:{width:h}},f))}else g=b("React").createElement("div",{className:"_1mj2"},b("React").createElement("div",{className:"_1miz"},b("React").createElement(b("LeftRight.react"),null,b("React").createElement("a",{className:"_1mj5",href:this.props.src},b("React").createElement("span",{className:"_3qi6"},b("React").createElement("i",{className:"_1mj6"})),b("React").createElement("span",{className:"_1mj7"},i._("Tin nh\u1eafn tho\u1ea1i")),b("React").createElement("span",{className:"_1mj8"},d)),b("React").createElement("a",{href:this.props.src,className:"_1mj9"},b("React").createElement("i",{className:"_1mja"})))));return b("React").createElement("div",{className:b("joinClasses")("_1mjb"+(e?" _454y":""),this.props.rootClassName)},g)}});e.exports=c}),null);
__d("PagesMessengerCreatorInfo.react",["cx","React","UFICreatorInfo.react","XUIGrayText.react"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();a=b("React").PropTypes;c=function(a){babelHelpers.inheritsLoose(c,a);function c(){return a.apply(this,arguments)||this}var d=c.prototype;d.render=function(){return b("React").createElement(b("XUIGrayText.react"),{className:"_ajk"+(this.props.isNote?" _45l2":""),display:"inline",shade:"light",size:"meta1"},b("React").createElement(b("UFICreatorInfo.react"),{creatorID:this.props.creator_info.creatorID,creatorType:this.props.creator_info.creatorType,creatorName:this.props.creator_info.creatorName,labelType:this.props.creator_info.labelType,pageID:this.props.creator_info.pageID,profileURI:this.props.creator_info.profileURI}))};return c}(b("React").Component);c.propTypes={creator_info:a.shape({creatorID:a.string.isRequired,creatorName:a.string.isRequired,creatorType:a.string.isRequired,labelType:a.string.isRequired,pageID:a.string.isRequired,profileURI:a.string}).isRequired};e.exports=c}),null);
__d("FBRTCCallabilityActions",["keyMirror"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g=b("keyMirror")({CALLABILITY_FETCHED:null,CALLABILITY_FETCH_ERROR:null});a=function(){function a(a){this.$1=a}var b=a.prototype;b.callabilityFetched=function(a,b){this.$1.dispatch({type:g.CALLABILITY_FETCHED,userID:a,callability:b})};b.callabilityFetchError=function(a){this.$1.dispatch({type:g.CALLABILITY_FETCH_ERROR,userID:a})};return a}();a.Types=g;e.exports=a}),null);
__d("XRTCCallabilityController",["XController"],(function(a,b,c,d,e,f){e.exports=b("XController").create("/rtc/callability/",{user_id:{type:"FBID",required:!0}})}),null);
__d("FBRTCCallabilityDataManager",["AsyncRequest","FBRTCCallabilityActions","TimeSlice","XRTCCallabilityController"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a=function(){__p&&__p();function a(a){this.$1=new(b("FBRTCCallabilityActions"))(a)}var c=a.prototype;c.fetchCallability=function(a){var c=this;b("TimeSlice").guard(function(){var d=b("XRTCCallabilityController").getURIBuilder().setFBID("user_id",a).getURI(),e=c.$2.bind(c,a),f=c.$3.bind(c,a);new(b("AsyncRequest"))().setURI(d).setHandler(e).setErrorHandler(f).setAllowCrossPageTransition(!0).send()},"Chat Tab RTC Callability Check",{propagationType:b("TimeSlice").PropagationType.ORPHAN})()};c.$2=function(a,b){this.$1.callabilityFetched(a,b.payload)};c.$3=function(a,b){this.$1.callabilityFetchError(a)};return a}();e.exports=a}),null);
__d("RTCCallabilityStore",["fbt","Cache","FBRTCCallabilityActions","FBRTCCallabilityDataManager","FluxStore","MercuryThreadInfo"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();var h=.5,i=5;a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(c){var d;d=a.call(this,c)||this;d.$RTCCallabilityStore2=new(b("FBRTCCallabilityDataManager"))(c);d.$RTCCallabilityStore1=new(b("Cache"))();return d}var d=c.prototype;d.__onDispatch=function(a){__p&&__p();var c=a.type;switch(c){case b("FBRTCCallabilityActions").Types.CALLABILITY_FETCHED:c=a.userID;var d=a.callability;this.$RTCCallabilityStore1.set(c,{callable:d.is_callable,isBlocked:d.is_blocked},null,d.is_callable?i:h);this.__emitChange();break;case b("FBRTCCallabilityActions").Types.CALLABILITY_FETCH_ERROR:this.$RTCCallabilityStore1.set(a.userID,{callable:!1,isBlocked:!1},null,h);this.__emitChange();break}};d.isCallable=function(a,b){b=b?b.message_count>0&&b.folder==="inbox":!1;a=this.fetchUserFromCache(a);return a&&a.callable||b};d.isBlocked=function(a,c){c=c?b("MercuryThreadInfo").canReply(c):!0;a=this.fetchUserFromCache(a);return a&&a.isBlocked||!c};d.fetchUserFromCache=function(a){this.$RTCCallabilityStore1.has(a)||(this.$RTCCallabilityStore2.fetchCallability(a),this.$RTCCallabilityStore1.set(a,{callable:!1,isBlocked:!1},null,h));return this.$RTCCallabilityStore1.get(a)};d.callButtonTooltip=function(a,b,c,d){c===void 0&&(c=!0);return!this.isBlocked(a,d)&&(c||this.isCallable(a))?g._("B\u1eaft \u0111\u1ea7u chat video v\u1edbi {shortname}",[g._param("shortname",b)]):g._("{shortname} hi\u1ec7n kh\u00f4ng th\u1ec3 th\u1ef1c hi\u1ec7n cu\u1ed9c g\u1ecdi video",[g._param("shortname",b)])};d.voiceCallButtonTooltip=function(a,b,c,d){c===void 0&&(c=!0);return!this.isBlocked(a,d)&&(c||this.isCallable(a))?g._("B\u1eaft \u0111\u1ea7u cu\u1ed9c g\u1ecdi tho\u1ea1i v\u1edbi {shortname}",[g._param("shortname",b)]):g._("{shortname} hi\u1ec7n kh\u00f4ng th\u1ec3 th\u1ef1c hi\u1ec7n cu\u1ed9c g\u1ecdi tho\u1ea1i",[g._param("shortname",b)])};return c}(b("FluxStore"));a.__moduleID=e.id;e.exports=a}),null);
__d("RepliedToMessageContent.react",["ix","cx","fbt","Bootloader","CurrentUser","FantaTabActions","FBLogger","Image.react","LineClamp.react","MercuryAttachmentType","MessengerTextWithEntities.react","React","RepliedToMessageStatusForGraphQL","asset"],(function(a,b,c,d,e,f,g,h,i){"use strict";__p&&__p();a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){var c,d;for(var e=arguments.length,f=new Array(e),g=0;g<e;g++)f[g]=arguments[g];return(c=d=a.call.apply(a,[this].concat(f))||this,d.$4=function(){d.$5();if(d.props.repliedToMessageData.status!==b("RepliedToMessageStatusForGraphQL").VALID)return;var a=d.props.threadID;d.props.isMessengerUI?d.props.scrollToRepliedMessage&&d.props.scrollToRepliedMessage(d.props.repliedToMessageData.message.message_id):a!==null&&a!==void 0&&b("FantaTabActions").jumpToMessage(a,d.props.repliedToMessageData.message.message_id)},c)||babelHelpers.assertThisInitialized(d)}var d=c.prototype;d.render=function(){__p&&__p();var a=this.props,c=a.isFromViewer,d=a.isMessengerUI;a=a.repliedToMessageData;var e=a.status===b("RepliedToMessageStatusForGraphQL").VALID;if(e&&!a.message){b("FBLogger")("message_replies").mustfix("invalid message reply: Status is Valid but replied_to_message is missing");return null}e=e?a.message.body:this.$1(a);var f=null;!e&&a.message.attachments&&(f=this.$2(a.message.attachments,c,d),e=this.$3(a.message.attachments));c=b("React").createElement(b("LineClamp.react"),{className:"_4k7e",lines:2,lineHeight:d?16:13,fitHeightToShorterText:!0},b("React").createElement(b("MessengerTextWithEntities.react"),{renderEmoji:!0,renderEmoticons:!0,text:e}));if(!this.props.replyInOneBubble)return b("React").createElement("div",{className:(!!f&&d?"_6e7n":"")+(!!f&&!d?" _6e6m":"")},c,f);a=b("React").createElement("blockquote",{className:"_pye"+(!!f&&d?" _6e7n":"")+(!!f&&!d?" _6e6m":"")},b("React").createElement("div",{className:"_pyf"}),c,f);return!this.props.isLinkified?a:b("React").createElement("a",{className:"_6e6n",href:"#",onClick:this.$4},a)};d.$1=function(a){switch(a.status){case b("RepliedToMessageStatusForGraphQL").DELETED:return b("CurrentUser").isWorkUser()?i._("Tin nh\u1eafn n\u00e0y \u0111\u00e3 b\u1ecb x\u00f3a").toString():i._("\u0110\u00e3 g\u1ee1 tin nh\u1eafn").toString();case b("RepliedToMessageStatusForGraphQL").TEMPORARILY_UNAVAILABLE:default:return i._("Tin nh\u1eafn t\u1ea1m th\u1eddi kh\u00f4ng hi\u1ec3n th\u1ecb").toString()}};d.$2=function(a,c,d){d=d?"_6e6o":"_6e6y";if(a.length===1&&a[0].attach_type)switch(a[0].attach_type){case b("MercuryAttachmentType").PHOTO:case b("MercuryAttachmentType").STICKER:case b("MercuryAttachmentType").THIRDPARTYSTICKER:case b("MercuryAttachmentType").ANIMATED_IMAGE:return!this.props.replyInOneBubble?b("React").createElement(b("Image.react"),{className:d,src:g("602383")}):c===!0?b("React").createElement(b("Image.react"),{className:d,src:g("544881")}):b("React").createElement(b("Image.react"),{className:d,src:g("596859")});case b("MercuryAttachmentType").VIDEO:return!this.props.replyInOneBubble?b("React").createElement(b("Image.react"),{className:d,src:g("602399")}):c===!0?b("React").createElement(b("Image.react"),{className:d,src:g("504242")}):b("React").createElement(b("Image.react"),{className:d,src:g("596875")});default:return!this.props.replyInOneBubble?b("React").createElement(b("Image.react"),{className:d,src:g("562396")}):c===!0?b("React").createElement(b("Image.react"),{className:d,src:g("555222")}):b("React").createElement(b("Image.react"),{className:d,src:g("596853")})}else if(a.length>1)return!this.props.replyInOneBubble?b("React").createElement(b("Image.react"),{className:d,src:g("602390")}):c===!0?b("React").createElement(b("Image.react"),{className:d,src:g("504171")}):b("React").createElement(b("Image.react"),{className:d,src:g("596866")});else return null};d.$3=function(a){__p&&__p();var c=a.length;if(c===1&&a[0].attach_type)switch(a[0].attach_type){case b("MercuryAttachmentType").PHOTO:return i._("\u1ea2nh").toString();case b("MercuryAttachmentType").VIDEO:return i._("Video").toString();case b("MercuryAttachmentType").STICKER:case b("MercuryAttachmentType").THIRDPARTYSTICKER:return i._("Nh\u00e3n d\u00e1n").toString();case b("MercuryAttachmentType").ANIMATED_IMAGE:return i._("T\u1ec7p GIF").toString();default:return i._("T\u1ec7p \u0111\u00ednh k\u00e8m").toString()}else if(c>1)return i._({"*":"{number of attachments} t\u1ec7p \u0111\u00ednh k\u00e8m"},[i._param("number of attachments",c),i._plural(c)]).toString();else return null};d.$5=function(){b("Bootloader").loadModules(["MessageReplyTypedLogger","MessageReplyEvent"],function(a,c){a=new a();a.setEvent(c.SCROLL_TO_ORIGINAL_MESSAGE).setIsWorkplace(b("CurrentUser").isWorkUser()).log()},"RepliedToMessageContent.react")};return c}(b("React").Component);e.exports=a}),null);
__d("CssBackgroundImageReact.bs",["ReasonReact.bs","bs_js_null_undefined","CssBackgroundImage.react"],(function(a,b,c,d,e,f){"use strict";function a(a,c,d,e,f,g){var h={className:b("bs_js_null_undefined").fromOption(a),imageURI:b("bs_js_null_undefined").fromOption(c),backgroundPosition:b("bs_js_null_undefined").fromOption(d),height:b("bs_js_null_undefined").fromOption(e),width:b("bs_js_null_undefined").fromOption(f),style:b("bs_js_null_undefined").fromOption(g)},i=b("CssBackgroundImage.react");return function(a){return b("ReasonReact.bs").wrapJsForReason(i,h,a)}}f.make=a}),null);
__d("MessengerSharedPhotoReact.bs",["cx","fbt","bs_curry","React","LinkReact.bs","ReasonReact.bs","bs_js_primitive","CssBackgroundImageReact.bs"],(function(a,b,c,d,e,f,g,h){"use strict";__p&&__p();var i=b("ReasonReact.bs").statelessComponent("MessengerSharedPhotoReact"),j={height:"100%"};function a(a,c,d,e,f,g){return[i[0],i[1],i[2],i[3],i[4],i[5],i[6],i[7],function(){var g=function(a){a.preventDefault();return b("bs_curry")._1(d,c)},i=h._("\u1ea3nh");if(e!==void 0){var k=e,l=f?b("React").createElement("div",{className:"_3603 _64ks"}):null;return b("ReasonReact.bs").element(void 0,void 0,b("LinkReact.bs").make(void 0,void 0,i,a,void 0,void 0,void 0,void 0,void 0,k,void 0,g,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,[b("ReasonReact.bs").element(void 0,void 0,b("CssBackgroundImageReact.bs").make(a,k,"center",void 0,void 0,b("bs_js_primitive").some(j))([l]))]))}else return b("ReasonReact.bs").element(void 0,void 0,b("LinkReact.bs").make(void 0,void 0,i,a,void 0,void 0,void 0,void 0,void 0,void 0,void 0,g,void 0,void 0,"button",void 0,void 0,void 0,void 0,void 0,[]))},i[9],i[10],i[11],i[12]]}f.component=i;f.style100pct=j;f.make=a}),null);
__d("MessengerSharedPhotoReact.re",["bs_curry","MessengerSharedPhotoReact.bs","ReasonReact.bs"],(function(a,b,c,d,e,f){a=b("ReasonReact.bs").wrapReasonForJs(b("MessengerSharedPhotoReact.bs").component,function(a){return b("bs_curry")._6(b("MessengerSharedPhotoReact.bs").make,a.className,a.fbid,a.onClick,a.uri,a.isSpherical,a.children)});f.component=a;f["default"]=a}),null);
__d("ChatPhotoViewFooterHScroll.react",["cx","Animation","MessengerSharedPhotoReact.re","React","SphericalPhotoUtils"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();var h=b("MessengerSharedPhotoReact.re").component,i=b("SphericalPhotoUtils").getThumbnailsFromPhotoEncodings;a=b("React").PropTypes;var j=200,k=74,l=140,m=30;c=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){var b,c;for(var d=arguments.length,e=new Array(d),f=0;f<d;f++)e[f]=arguments[f];return(b=c=a.call.apply(a,[this].concat(e))||this,c.$1=null,c.state={currentPhoto:"",prevScrollLeft:0,scrollLeft:0},b)||babelHelpers.assertThisInitialized(c)}var d=c.prototype;d.componentDidMount=function(){this.props.width&&this.props.updateNumberInOneBatch(this.$2(this.props.width)),this.$1=new(b("Animation"))(this.refs.childContainer).to("scrollLeft",0).duration(j).go()};d.UNSAFE_componentWillReceiveProps=function(a){if(a.photoID!=this.state.currentPhoto||this.props.sharedPhotos.length!==a.sharedPhotos.length){var b=a.width?(a.width-k)/2-l:0,c=a.sharedPhotos.findIndex(function(b){return b.node.id===a.photoID});this.setState({currentPhoto:a.photoID,prevScrollLeft:this.state.scrollLeft,scrollLeft:c*k-b})}a.width!=this.props.width&&this.props.updateNumberInOneBatch(this.$2(a.width))};d.componentDidUpdate=function(){this.$1&&this.$1.from("scrollLeft",this.state.prevScrollLeft).to("scrollLeft",this.state.scrollLeft).duration(j).go()};d.componentWillUnmount=function(){this.$1&&this.$1.stop()};d.shouldComponentUpdate=function(a,b){return a.photoID!=this.state.currentPhoto||a.sharedPhotos.length!==this.props.sharedPhotos.length?!0:!1};d.render=function(){__p&&__p();var a=this,c=this.props.sharedPhotos;c=c.map(function(c){var d,e=c.node.photo_encodings?c.node.photo_encodings.length!==0:!1;d=(d=c)!=null?(d=d.node)!=null?(d=d.image1)!=null?d.uri:d:d:d;if(e){var f=i(c.node.photo_encodings);f=f.smallThumbnail;d=f||d}return!d?null:b("React").createElement("div",{className:"_1oyb",key:c.node.legacy_attachment_id},b("React").createElement(h,{className:"_1oyc"+(a.state.currentPhoto!==c.node.id?" _1oyd":""),fbid:c.node.legacy_attachment_id,onClick:a.props.onScroll,uri:d,isSpherical:e}))});return b("React").createElement("div",{className:"_1oye"},b("React").createElement("div",{className:"_1oyf",ref:"childContainer"},b("React").createElement("div",{className:"_1oyh",ref:"scrollable"},c)))};d.$2=function(a){return a?Math.ceil((a-l*2)/k):m};return c}(b("React").Component);c.propTypes={onScroll:a.func,photoID:a.string,sharedPhotos:a.array,updateNumberInOneBatch:a.func,width:a.number};e.exports=c}),null);
__d("XForwardingNUXSeenController",["XController"],(function(a,b,c,d,e,f){e.exports=b("XController").create("/chat/forwarding_nux_seen/",{})}),null);
__d("MessagingForwardingButtonNUX.react",["AsyncRequest","ChatConfig","React","XForwardingNUXSeenController","XUIAmbientNUX.react"],(function(a,b,c,d,e,f){__p&&__p();a=b("React").PropTypes;c=function(a){"use strict";__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){__p&&__p();var c,d;for(var e=arguments.length,f=new Array(e),g=0;g<e;g++)f[g]=arguments[g];return(c=d=a.call.apply(a,[this].concat(f))||this,d.state={showNUX:!b("ChatConfig").get("seen_forwarding_nux")},d.$1=function(){if(!d.state.showNUX)return;b("ChatConfig").set("seen_forwarding_nux",!0);new(b("AsyncRequest"))(b("XForwardingNUXSeenController").getURIBuilder().getURI()).send();d.setState({showNUX:!1})},d.close=function(){d.$1()},c)||babelHelpers.assertThisInitialized(d)}var d=c.prototype;d.render=function(){return b("React").createElement(b("XUIAmbientNUX.react"),{contextRef:this.props.contextRef,onCloseButtonClick:this.$1,position:"left",width:"auto",shown:this.state.showNUX},this.props.children)};return c}(b("React").Component);c.propTypes={contextRef:a.func.isRequired};e.exports=c}),null);
__d("MessengerPhotoViewCloseLinkReact.bs",["cx","fbt","React","TooltipLink.react"],(function(a,b,c,d,e,f,g,h){"use strict";function a(a){a=a.onClick;var c=b("React").createElement("span",void 0,h._("Nh\u1ea5n Esc \u0111\u1ec3 \u0111\u00f3ng"));return b("React").createElement(b("TooltipLink.react"),{children:b("React").createElement("div",{className:"_387s"}),className:"_51ok _50-m _51an",onClick:a,tooltip:c})}c=a;f.make=c}),null);
__d("MessengerPhotoViewCloseLinkReact.re",["MessengerPhotoViewCloseLinkReact.bs"],(function(a,b,c,d,e,f){a=b("MessengerPhotoViewCloseLinkReact.bs").make;f.make=a}),null);
__d("SpotlightViewerBottomBarLink",["cx","Link.react","React"],(function(a,b,c,d,e,f,g){__p&&__p();a=function(a){"use strict";babelHelpers.inheritsLoose(c,a);function c(){return a.apply(this,arguments)||this}var d=c.prototype;d.render=function(){var a=this.props.className||"_4_8j _4_8k";return b("React").createElement(b("Link.react"),babelHelpers["extends"]({},this.props,{className:a}),this.props.children)};return c}(b("React").Component);e.exports=a}),null);
__d("ChatPhotoViewHeader.react",["cx","fbt","MessagingForwardingButtonNUX.react","MessengerPhotoViewCloseLinkReact.re","React","SpotlightViewerBottomBarLink","WorkModeConfig"],(function(a,b,c,d,e,f,g,h){"use strict";__p&&__p();var i=b("MessengerPhotoViewCloseLinkReact.re").make;a=b("React").PropTypes;c=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){var b,c;for(var d=arguments.length,e=new Array(d),f=0;f<d;f++)e[f]=arguments[f];return(b=c=a.call.apply(a,[this].concat(e))||this,c.$3=function(){c.$2(),c.props.showForwardDialog&&c.props.showForwardDialog()},c.$4=function(){c.$2(),c.props.showShareDialog&&c.props.showShareDialog()},b)||babelHelpers.assertThisInitialized(c)}var d=c.prototype;d.render=function(){return b("React").createElement("div",{className:"_51an _50-m _3h_t _5l-3",role:"banner"},this.$1(),b("React").createElement(i,{onClick:this.props.onClose}))};d.$2=function(){this.refs.forwardNUX&&this.refs.forwardNUX.close()};d.$1=function(){var a=this,c,d,e;this.props.disableForward||(c=b("React").createElement(b("SpotlightViewerBottomBarLink"),{className:"_3h_u",onClick:this.$3,ref:"forwardButton"},b("React").createElement("div",{className:"_3h_v _3h_w"}),h._("Chuy\u1ec3n ti\u1ebfp")),d=b("React").createElement(b("MessagingForwardingButtonNUX.react"),{contextRef:function(){return a.refs.forwardButton},ref:"forwardNUX"},h._("G\u1eedi h\u00ecnh \u1ea3nh n\u00e0y cho ng\u01b0\u1eddi kh\u00e1c b\u1eb1ng tin nh\u1eafn ri\u00eang.")));this.props.enableShareToFB&&(e=b("React").createElement("div",{className:"_3h_u",onClick:this.$4,ref:"shareButton",role:"button",tabIndex:"0"},b("React").createElement("div",{className:"_3tth _3h_w"}),this.$5()));return b("React").createElement("div",{key:"buttonsContainer",ref:"buttons"},b("React").createElement(b("SpotlightViewerBottomBarLink"),{className:"_3h_u",rel:"async",ajaxify:this.props.url,ref:"downloadButton"},b("React").createElement("div",{className:"_3h_x _3h_w"}),h._("T\u1ea3i xu\u1ed1ng")),c,d,e,b("React").createElement("div",{className:"_3h_u",onClick:this.props.openInfo,ref:"moreInfo",role:"link",tabIndex:"0"},b("React").createElement("div",{className:"_3h_y _3h_w"}),h._("Th\u00f4ng tin")))};d.$5=function(){if(b("WorkModeConfig").is_work_user)return h._("Chia s\u1ebb l\u00ean Workplace");else return h._("Chia s\u1ebb l\u00ean Facebook")};return c}(b("React").PureComponent);c.propTypes={disableForward:a.bool,enableShareToFB:a.bool,onClose:a.func,openInfo:a.func,showForwardDialog:a.func,showShareDialog:a.func,url:a.object};e.exports=c}),null);
__d("ChatSpeakingSticker.react",["React","ReactDOM"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a=b("React").PropTypes;c=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){var c,d;for(var e=arguments.length,f=new Array(e),g=0;g<e;g++)f[g]=arguments[g];return(c=d=a.call.apply(a,[this].concat(f))||this,d.$1=function(){var a=b("ReactDOM").findDOMNode(d.refs.stickerVideo);a.play()},c)||babelHelpers.assertThisInitialized(d)}var d=c.prototype;d.render=function(){return b("React").createElement("div",{onClick:this.$1,role:"presentation"},b("React").createElement("video",{height:this.props.videoSize.height,ref:"stickerVideo",width:this.props.videoSize.width},b("React").createElement("source",{src:this.props.videoURI})))};return c}(b("React").PureComponent);c.propTypes={videoURI:a.string.isRequired,videoSize:a.shape({height:a.number,width:a.number}).isRequired};e.exports=c}),null);
__d("EmojiSticker.react",["cx","Image.react","React","joinClasses"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();a=b("React").PropTypes;c=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){return a.apply(this,arguments)||this}var d=c.prototype;d.componentDidMount=function(){this.props.onAttachmentLoad&&this.props.onAttachmentLoad()};d.render=function(){var a=this.props.emojiImage?this.props.emojiImage:b("React").createElement(b("Image.react"),{src:this.props.sourceURI});return b("React").createElement("div",{"aria-label":this.props.emoji,className:b("joinClasses")(this.props.className,"_383m"),tabIndex:"0"},a)};return c}(b("React").Component);c.propTypes={emoji:a.string,emojiImage:a.any,onAttachmentLoad:a.func,sourceURI:a.string.isRequired};e.exports=c}),null);
__d("MessengerErrorBoundary.react",["cx","fbt","ChatReliabilityInstrumentation","ErrorBoundary.react","LogHistory","React","joinClasses"],(function(a,b,c,d,e,f,g,h){"use strict";__p&&__p();var i=b("LogHistory").getInstance("messenger_error_boundary"),j=function(a){return h._({"conversation list":"Kh\u00f4ng th\u1ec3 hi\u1ec3n th\u1ecb danh s\u00e1ch cu\u1ed9c tr\u00f2 chuy\u1ec7n.","conversation":"Kh\u00f4ng th\u1ec3 hi\u1ec3n th\u1ecb cu\u1ed9c tr\u00f2 chuy\u1ec7n.","composer":"Kh\u00f4ng th\u1ec3 hi\u1ec3n th\u1ecb tr\u00ecnh bi\u00ean so\u1ea1n.","conversation information":"Kh\u00f4ng th\u1ec3 hi\u1ec3n th\u1ecb th\u00f4ng tin v\u1ec1 cu\u1ed9c tr\u00f2 chuy\u1ec7n.","attachment":"Kh\u00f4ng th\u1ec3 hi\u1ec3n th\u1ecb t\u1ec7p \u0111\u00ednh k\u00e8m.","pinned conversation list":"Kh\u00f4ng th\u1ec3 hi\u1ec3n th\u1ecb danh s\u00e1ch cu\u1ed9c tr\u00f2 chuy\u1ec7n \u0111\u00e3 ghim."},[h._enum(a,{"conversation list":"conversation list",conversation:"conversation",composer:"composer","conversation information":"conversation information",attachment:"attachment","pinned conversation list":"pinned conversation list"})])},k=function(a,c){return function(){return b("React").createElement("div",{className:b("joinClasses")("_5jpt",c)},a)}};a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){var c,d;for(var e=arguments.length,f=new Array(e),g=0;g<e;g++)f[g]=arguments[g];return(c=d=a.call.apply(a,[this].concat(f))||this,d.$1=function(a,c){var e="React error in "+c+" got "+a.message;i.error(e,JSON.stringify(a));b("ChatReliabilityInstrumentation").logERROR(e);d.props.onHandleError&&d.props.onHandleError(a,c)},c)||babelHelpers.assertThisInitialized(d)}var d=c.prototype;d.render=function(){var a=this.props,c=a.className,d=a.component;a=babelHelpers.objectWithoutPropertiesLoose(a,["className","component"]);return b("React").createElement(b("ErrorBoundary.react"),babelHelpers["extends"]({},a,{fallbackComponent:k(j(d),c),onHandleError:this.$1,bigRedBox:!0}))};return c}(b("React").Component);e.exports=a}),null);
__d("MercuryShareAttachment.react",["cx","BootloadedComponent.react","DOM","Event","FlexLayout.react","MercuryShareAttachmentReactShape","MercuryShareAttachmentRenderLocations","MercuryShareStyleMap","MessengerErrorBoundary.react","React","ReactDOM","emptyFunction","joinClasses"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();a=b("React").PropTypes;c=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){var c,d;for(var e=arguments.length,f=new Array(e),g=0;g<e;g++)f[g]=arguments[g];return(c=d=a.call.apply(a,[this].concat(f))||this,d.$3=function(a){d.$1(a),b("DOM").scry(b("ReactDOM").findDOMNode(babelHelpers.assertThisInitialized(d)),"img").forEach(function(a){var c=b("Event").listen(a,"load",function(){d.$1(a.height),c.remove()})})},c)||babelHelpers.assertThisInitialized(d)}var d=c.prototype;d.componentDidMount=function(){this.$1()};d.$2=function(a,c){this.props.location===b("MercuryShareAttachmentRenderLocations").MESSENGER&&!this.props.isSubattachment&&(c=b("joinClasses")("_52mr _2poz _ui9","_4skb",c));return b("React").createElement("div",{className:c},a,this.props.afterDecorators!=null&&this.props.afterDecorators.length>1?b("React").createElement(b("FlexLayout.react"),{align:"center",className:"_7moe"},this.props.afterDecorators):this.props.afterDecorators)};d.render=function(){var a=b("MercuryShareStyleMap").getStyleFactory(this.props.attachment);if(!a)return null;var c=a.attachment;a=a.factory;return this.$2(b("React").createElement(b("MessengerErrorBoundary.react"),babelHelpers["extends"]({},this.props,{component:"attachment"}),b("React").createElement(b("BootloadedComponent.react"),babelHelpers["extends"]({},this.props,{attachment:c,bootloadLoader:a.componentLoader,bootloadPlaceholder:b("React").createElement("div",null),key:(c=this)!=null?(c=c.props)!=null?(c=c.attachment)!=null?c.share_id:c:c:c,module:a.componentName,onComponentLoad:this.$3}))),a.cx&&a.cx.get(this.props.location))};d.$1=function(a){this.props.onComponentLoaded(a)};return c}(b("React").Component);c.propTypes={attachment:b("MercuryShareAttachmentReactShape"),isFromViewer:a.bool,isPageMessage:a.bool,isSponsored:a.bool,isSubattachment:a.bool,isVisible:a.bool,location:a.oneOf(b("MercuryShareAttachmentRenderLocations").getValues()),messageID:a.string,onComponentLoaded:a.func.isRequired,onSelect:a.func,pageID:a.string,threadID:a.string.isRequired,afterDecorators:a.array,timestamp:a.number,author:a.string};c.defaultProps={onComponentLoaded:b("emptyFunction")};e.exports=c}),null);
__d("MessengerErrorAttachment.react",["cx","fbt","CurrentUser","React"],(function(a,b,c,d,e,f,g,h){"use strict";__p&&__p();a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){return a.apply(this,arguments)||this}var d=c.prototype;d.render=function(){var a=this.props.attachment.error_msg||h._("Kh\u00f4ng th\u1ec3 t\u1ea3i t\u1ec7p \u0111\u00ednh k\u00e8m n\u00e0y.");return b("React").createElement("div",{className:"_1o12 _52mr"},b("React").createElement("div",{className:"_1o13"},a,this.$1()))};d.$1=function(){return!this.props.attachment.error_msg&&b("CurrentUser").isEmployee()&&b("CurrentUser").hasWorkUser()&&!b("CurrentUser").isWorkUser()?b("React").createElement("div",null,h._("T\u1ec7p \u0111\u00ednh k\u00e8m c\u00f3 th\u1ec3 d\u00e0nh cho t\u00e0i kho\u1ea3n \u0040workplace c\u1ee7a b\u1ea1n.")):null};return c}(b("React").PureComponent);e.exports=a}),null);
__d("MessengerFileAttachment.react",["cx","Link.react","React"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();a=b("React").PropTypes;c=function(a){babelHelpers.inheritsLoose(c,a);function c(){return a.apply(this,arguments)||this}var d=c.prototype;d.render=function(){return b("React").createElement(b("Link.react"),{className:"_4pcn _2uf4",target:"_blank",href:this.props.attachment.url},b("React").createElement("div",{className:"_2uf5"}),this.props.attachment.name)};return c}(b("React").PureComponent);c.propTypes={attachment:a.object.isRequired};e.exports=c}),null);
__d("MessengerFromViewerUtils",["CurrentUser","MercuryIDs"],(function(a,b,c,d,e,f){"use strict";function a(a){return a.author===b("MercuryIDs").getParticipantIDFromUserID(b("CurrentUser").getID())}e.exports={isFromViewer:a}}),null);
__d("MessengerHotLikePreview.react",["cx","Animation","ChatConfig","EmojiLikeConstants","HotLikeSound","MercuryShareAttachmentRenderLocations","MessengerDotComAndInboxM4Check.bs","MessengerHotLikeIconSVGM4React.bs","MessengerHotLikePreviewEvents","MessengerHotLikeSVGReact.re","MessengerHotLikeUtils","MessengerSupportedEmojiUtils","React","ReactDOM","StickerConstants","SubscriptionsHandler"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();var h=b("MessengerHotLikeSVGReact.re").component;a=b("React").PropTypes;c=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){__p&&__p();var c,d;for(var e=arguments.length,f=new Array(e),g=0;g<e;g++)f[g]=arguments[g];return(c=d=a.call.apply(a,[this].concat(f))||this,d.$5=function(){d.$6=new(b("Animation"))(b("ReactDOM").findDOMNode(babelHelpers.assertThisInitialized(d))),(!b("ChatConfig").getBool("chat_tab_has_gradients")||d.props.location===b("MercuryShareAttachmentRenderLocations").MESSENGER)&&(d.$7(-2,2,150,1e3),d.$7(-4,4,100,1e3),d.$7(-10,10,75,1e3)),d.$6.go()},d.$2=function(a,c){__p&&__p();var e=c?b("MessengerHotLikePreviewEvents").FINISH_EMOJI_ANIMATION:b("MessengerHotLikePreviewEvents").FINISH_ANIMATION;if(d.$8)return;d.$8=!0;c=Date.now()-d.props.since;var f=null;d.props.customLike&&(f=b("MessengerHotLikeUtils").getEmojiSizeForTime(c));var g=b("MessengerHotLikeUtils").getStickerIDForTime(c);b("HotLikeSound").snap(g);c=b("MessengerHotLikeUtils").getMetadataForHotLike(f||g);d.$6.stop();var h=30,i=-10;(g===b("StickerConstants").HOT_LIKE_SMALL_STICKER_ID||b("ChatConfig").getBool("chat_tab_has_gradients"))&&(h=0,i=0);d.$4.stop().to("width",c.width*1.2).to("height",c.height*1.2).to("rotateZ",h).duration(100).checkpoint().to("width",c.width*.9).to("height",c.height*.9).to("rotateZ",i).duration(100).checkpoint().to("width",c.width).to("height",c.height).to("rotateZ",0).duration(100).ondone(function(){d.props.forGameChat||b("MessengerHotLikePreviewEvents").emit(e,a,g,f)}).go()},d.$3=function(a){b("HotLikeSound").pop(),d.$4.stop().to("width",0).to("height",0).duration(100).ondone(function(){b("MessengerHotLikePreviewEvents").emit(b("MessengerHotLikePreviewEvents").REMOVE,a)}).go()},c)||babelHelpers.assertThisInitialized(d)}var d=c.prototype;d.componentDidMount=function(){this.$1=new(b("SubscriptionsHandler"))(),this.$1.addSubscriptions(b("MessengerHotLikePreviewEvents").addListener(b("MessengerHotLikePreviewEvents").STOP,this.$2),b("MessengerHotLikePreviewEvents").addListener(b("MessengerHotLikePreviewEvents").STOP_EMOJI,this.$2),b("MessengerHotLikePreviewEvents").addListener(b("MessengerHotLikePreviewEvents").POP,this.$3)),b("HotLikeSound").start(),this.$4=new(b("Animation"))(b("ReactDOM").findDOMNode(this)).to("width",80).to("height",80).duration(3e3).go(),this.$5()};d.componentWillUnmount=function(){this.$1&&this.$1.release()};d.render=function(){if(this.props.customLike){var a=this.props.customLike,c=b("MessengerSupportedEmojiUtils").getNewEmojiData(a.emoji,b("EmojiLikeConstants").size.LARGE);c=c?c.url:this.props.customLike.large;a.uri&&(c=a.uri);return b("React").createElement("div",{className:"_4a9g _383m",style:{backgroundImage:"url("+c+")"}})}a=b("MessengerDotComAndInboxM4Check.bs").yes?b("MessengerHotLikeIconSVGM4React.bs").makeWithGradient(this.props.thread):b("React").createElement(h,{color:this.props.customColor});return b("React").createElement("div",{className:"_4a9g _576q"},a)};d.$7=function(a,b,c,d){d=Math.floor(d/c);var e;for(var f=0;f<d;f++)e=f%2?a:b,this.$6.to("rotateZ",e).duration(c).checkpoint()};return c}(b("React").Component);c.propTypes={customLike:a.object,forGameChat:a.bool,since:a.number};e.exports=c}),null);
__d("ChatSpeakingStickerReact.bs",["ReasonReact.bs","ChatSpeakingSticker.react"],(function(a,b,c,d,e,f){"use strict";function a(a,c,d){return b("ReasonReact.bs").wrapJsForReason(b("ChatSpeakingSticker.react"),{videoURI:a,videoSize:c},d)}f.make=a}),null);
__d("MercuryAttachmentPayload.bs",["bs_js_primitive"],(function(a,b,c,d,e,f){"use strict";function a(a,c,d){c=c!==void 0?b("bs_js_primitive").valFromOption(c):null;return{app_attribution:null,attach_type:a,blurred_image_uri:null,deduplication_key:null,description:null,icon_type:null,key:c,large_preview_height:null,large_preview_width:null,large_preview_url:null,media:null,metadata:null,message_file_fbid:null,name:null,photo_encodings:null,preview_height:null,preview_uploading:null,preview_url:null,preview_width:null,rel:null,share:null,source:null,target:null,thumbnail_url:null,upload_id:null,uri:null,url:d,video_title:null}}f.create=a}),null);
__d("MessengerAttachmentViewer",["Bootloader","MessagesViewer","React","Run","emptyFunction"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a={renderVideo:function(a){b("Bootloader").loadModules(["MessagingVideoViewer.react","MessengerForwardAttachmentDialogReact.bs"],function(c,d){d=d.jsComponent;b("MessagesViewer").renderVideo(b("React").createElement(c,babelHelpers["extends"]({},a,{forwardDialogComponent:d})))},"MessengerAttachmentViewer")},bootstrapWithConfig:function(a,c){b("Bootloader").loadModules(["SpotlightMessagesViewer","MessengerForwardAttachmentDialogReact.bs"],function(d,e){e=e.jsComponent;b("MessagesViewer").renderSpotlight(a,c,d,e)},"MessengerAttachmentViewer")},preload:function(){b("Run").onAfterLoad(function(){b("Bootloader").loadModules(["MessagingVideoViewer.react","SpotlightMessagesViewer","MessengerForwardAttachmentDialogReact.bs"],b("emptyFunction"),"MessengerAttachmentViewer")})}};e.exports=a}),null);
__d("SphericalPhotoViewerInMessengerThreadBootloaded.react",["cx","BootloadedComponent.react","CssBackgroundImage.react","JSResource","PhotoProjection","React"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();var h=b("PhotoProjection").PERSPECTIVE;a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){return a.apply(this,arguments)||this}var d=c.prototype;d.render=function(){__p&&__p();if(this.props.photoEncodings&&this.props.thumbnail){var a=this.props.photoEncodings.find(function(a){return a.projection_type===h}),c=null,d=null;if(a&&a.thumbnails&&a.thumbnails.length>0){a=a.thumbnails;c=a[0]?a[0].uri:null;d=a[1]?a[1].uri:null}if(this.props.useRenderer&&this.props.width&&this.props.height&&this.props.fbid){a=d||c||this.props.thumbnail;return b("React").createElement(b("BootloadedComponent.react"),{bootloadLoader:b("JSResource")("SphericalPhotoViewerInMessengerThreadWrapper.react").__setRef("SphericalPhotoViewerInMessengerThreadBootloaded.react"),bootloadPlaceholder:b("React").createElement(b("CssBackgroundImage.react"),{backgroundPosition:"center",imageURI:a,className:"_3v3t"}),height:this.props.height,width:this.props.width,fbid:this.props.fbid,thumbnail:a,photoEncodings:this.props.photoEncodings,isVisible:this.props.isVisible,onClickHandler:this.props.onClickHandler})}else{a=c||d||this.props.thumbnail;return b("React").createElement(b("BootloadedComponent.react"),{bootloadLoader:b("JSResource")("SphericalPhotoMessengerThumbnail.react").__setRef("SphericalPhotoViewerInMessengerThreadBootloaded.react"),bootloadPlaceholder:b("React").createElement(b("CssBackgroundImage.react"),{backgroundPosition:"center",imageURI:a,className:"_3v3t"}),photoEncodings:this.props.photoEncodings,thumbnail:a})}}return null};return c}(b("React").Component);e.exports=a}),null);
__d("MessengerSphericalPhotoReact.bs",["Utils.bs","ReasonReact.bs","bs_js_null_undefined","SphericalPhotoViewerInMessengerThreadBootloaded.react"],(function(a,b,c,d,e,f){"use strict";function a(a,c,d,e,f,g,h,i,j){return b("ReasonReact.bs").wrapJsForReason(b("SphericalPhotoViewerInMessengerThreadBootloaded.react"),{height:b("bs_js_null_undefined").fromOption(a),width:b("bs_js_null_undefined").fromOption(c),fbid:b("bs_js_null_undefined").fromOption(d),thumbnail:b("bs_js_null_undefined").fromOption(e),photoEncodings:b("bs_js_null_undefined").fromOption(f),isVisible:b("Utils.bs").optionBoolToBool(g),onClickHandler:h,useRenderer:i},j)}f.make=a}),null);
__d("MessengerPhotoReact.bs",["cx","fbt","bs_curry","Image.bs","React","Utils.bs","cssURL","Link.react","ReasonReact.bs","joinClasses","bs_js_primitive","bs_caml_primitive","MessengerSurfaceType.bs","MercuryAttachmentType","MessengerSpinnerReact.bs","bs_caml_builtin_exceptions","MessengerSurfaceContext.bs","MessengerSphericalPhotoReact.bs"],(function(a,b,c,d,e,f,g,h){"use strict";__p&&__p();function i(a,c){__p&&__p();var d=a.metadata;if(d==null)return null;else if(a.attach_type===b("MercuryAttachmentType").VIDEO){var e=c&&!(d.large_preview==null);if(e)return d.large_preview;else return d.inbox_preview}else if(c)return a.large_preview_url;else return a.preview_url}function j(a){if(a==null)return[null,null];else return[a.width,a.height]}function k(a){__p&&__p();var c=window.screen.width>1800;if(b("Utils.bs").isTruthy(a.preview_uploading)){var d=function(b,c){var a=!(b==null);if(a)return b;else return c},e=c&&!(a.large_preview_url==null);if(e)return[d(a.large_preview_width,480),d(a.large_preview_height,480),a.large_preview_url,c];else return[d(a.preview_width,280),d(a.preview_height,280),a.preview_url,c]}else{e=i(a,c);d=!(e==null);var f=a.metadata;if(d&&!(f==null)){d=c&&!(f.large_size==null);d=d?f.large_size:f.inbox_size;f=j(d);return[f[0],f[1],e,c]}else d=1;if(d===1)if(a.preview_url==null){f=a.media;if(f==null)return void 0;else{e=!(f.playable==null)&&!(f.animated_image==null);if(e){d=j(f.animated_image_size);return[d[0],d[1],f.animated_image,c]}else{e=j(f.image_size);return[e[0],e[1],f.image,c]}}}else{d=c&&!(a.large_preview_url==null);if(d)return[a.large_preview_width,a.large_preview_height,a.large_preview_url,c];else return[a.preview_width,a.preview_height,a.preview_url,c]}}}function l(a){__p&&__p();var c=function(a){return""+(String(a)+"")};if(b("Utils.bs").isTruthy(a.preview_uploading)){var d=!(a.preview_url==null);return c(d?0:280)}else{var e=function(a){var b=a[1];a=a[0];if(!(a==null)&&!(b==null))return[a,b]};d=function(a){if(a!==void 0){a=a;return e([a[0],a[1]])}};var f=!(a.media==null);f=f?d(k(a)):e([a.preview_width,a.preview_height]);if(f!==void 0){d=f;return c(b("bs_caml_primitive").caml_float_min(d[1]*b("bs_caml_primitive").caml_float_min(1,450/d[0]),450))}else return void 0}}function m(a){__p&&__p();var c=a.metadata,d=a.isAnimated,e=a.className,f=a.attachment;a=a.isSingle;var g=b("React").useContext(b("MessengerSurfaceContext.bs").context);b("Utils.bs").isTruthy(f.preview_uploading);var h=c[2];if(h==null||!a)return null;else{a=c[3];c=a?window.screen.height*.7:window.screen.height*.65;a=f.preview_url;a=a==null?!1:a.includes("/wec/");g=g===b("MessengerSurfaceType.bs").workQuickchat;g=g?"160px":"100%";c={maxHeight:""+(String(c)+""),maxWidth:g,width:"100%"};var i=f.preview_width;f=f.preview_height;g=!(i==null)&&!(f==null)?{maxWidth:g,paddingTop:(f/i*100).toString()+"%",width:i.toString()+"px"}:c;return b("React").createElement("div",{style:g},b("ReasonReact.bs").element(void 0,void 0,b("Image.bs").make(b("joinClasses")(e,(d?"":"_5pf5")+(a?"":" _7oob")+(a?" _7pdu":"")),"",void 0,void 0,h,void 0,void 0,void 0,b("bs_js_primitive").some(c),[])))}}var n=b("ReasonReact.bs").statelessComponent("MessengerPhoto");function a(a,c,d,e,f,g,i){__p&&__p();var j=a!==void 0?a:"";return[n[0],n[1],n[2],n[3],function(){if(f!==void 0)return b("bs_curry")._1(f,0);else return 0},n[5],n[6],n[7],function(){__p&&__p();var a=k(c);if(a!==void 0){a=a;var f=c.attach_type===b("MercuryAttachmentType").ANIMATED_IMAGE,n=!(c.app_attribution==null),o=c.photo_encodings;o=o==null?!1:o.length!==0;var p=(!f||!d)&&!o;if(p){p=a[2];p=p==null?void 0:b("cssURL")(p);var q=d?l(c):void 0;p=[p,q]}else p=[void 0,void 0];q={};var r=p[0];r!==void 0&&(q.backgroundImage=b("bs_js_primitive").valFromOption(r));r=p[1];r!==void 0&&(q.minHeight=b("bs_js_primitive").valFromOption(r));p=q;r=b("Utils.bs").isTruthy(c.preview_uploading);q=r?b("React").createElement("span",{className:"_7atr"},b("ReasonReact.bs").element(void 0,void 0,b("MessengerSpinnerReact.bs").make(void 0,void 0,void 0,[]))):null;r=f?b("MercuryAttachmentType").ANIMATED_IMAGE:void 0;var s=function(){if(g!==void 0)return b("bs_curry")._1(g,c);else return 0},t=function(a){a.preventDefault();return s(0)};if(o){var u=a[2],v=c.metadata,w;if(v==null)w=void 0;else{v=v.fbid;w=v==null?void 0:b("bs_js_primitive").some(v)}v=c.photo_encodings;w=b("ReasonReact.bs").element(void 0,void 0,b("MessengerSphericalPhotoReact.bs").make(400,400,w,u==null?void 0:b("bs_js_primitive").some(u),v==null?void 0:b("bs_js_primitive").some(v),e,s,d,[]))}else w=b("React").createElement(m,{metadata:a,isAnimated:d&&f,className:(n?"_mxz":"")+(d&&!n?" _52mr":"")+(d&&!n?" _1byr":""),attachment:c,isSingle:d});u={"aria-label":h._("M\u1edf \u1ea3nh"),className:"_4tsl",children:i};v=b("bs_js_primitive").nullable_to_opt(a[2]);v!==void 0&&(u.href=b("bs_js_primitive").valFromOption(v));return b("React").cloneElement(b("React").createElement("div",{className:b("joinClasses")(j,"_4tsk"+(n?" _mxz":"")+(d&&!n?" _52mr":"")+(d&&!n?" _1byr":"")+(b("Utils.bs").isTruthy(c.preview_uploading)&&a[2]==null?" _3etv":"")+(o&&!d?" _3603":"")),role:"presentation",style:p,onClick:t}),{"data-testid":r},b("React").createElement("div",{className:o&&!d?"_64ks":""}),b("React").createElement(b("Link.react"),u),w,q)}else return null},n[9],n[10],n[11],n[12]]}c=280;d=480;e=1800;g=450;var o=m;f.preview_thumbnail_size=c;f.preview_large_size=d;f.large_window_width=e;f.max_photo_width=g;f.getSrcFromAttachment=i;f.sizeToWidthHeight=j;f.extractPreviewMetadata=k;f.getMinHeightForAttachment=l;f.getImageFromMetadata=o;f.component=n;f.make=a}),null);
__d("MessengerSharedMediaActions",["MessengerFluxReduceDispatcher","keyMirror"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g=b("keyMirror")({CURRENT_LOADED:null,DELETE_PHOTOS:null,LATEST_LOADED:null,LOAD_CURRENT:null,LOAD_MORE_LATEST:null,LOAD_MORE_PREVIOUS:null,PREVIOUS_LOADED:null}),h="MessengerSharedMedia";a={Types:g,Namespace:h,currentLoaded:function(a){b("MessengerFluxReduceDispatcher").dispatch({type:g.CURRENT_LOADED,namespace:h,data:a})},deletePhotos:function(a,c){b("MessengerFluxReduceDispatcher").dispatch({type:g.DELETE_PHOTOS,namespace:h,threadFBID:a,photoFBIDs:c})},loadCurrent:function(a,c){b("MessengerFluxReduceDispatcher").dispatch({type:g.LOAD_CURRENT,namespace:h,threadFBID:a,photoID:c})},loadMorePrevious:function(a,c,d){b("MessengerFluxReduceDispatcher").dispatch({type:g.LOAD_MORE_PREVIOUS,namespace:h,threadFBID:a,afterCursor:c,first:d})},loadMoreLatest:function(a,c,d){b("MessengerFluxReduceDispatcher").dispatch({type:g.LOAD_MORE_LATEST,namespace:h,threadFBID:a,beforeCursor:c,last:d})},previousLoaded:function(a){b("MessengerFluxReduceDispatcher").dispatch({type:g.PREVIOUS_LOADED,namespace:h,data:a})},latestLoaded:function(a){b("MessengerFluxReduceDispatcher").dispatch({type:g.LATEST_LOADED,namespace:h,data:a})}};e.exports=a}),null);
__d("MessengerThreadSharedMediaAfterWebGraphQLQuery",["WebGraphQLQueryBase"],(function(a,b,c,d,e,f){"use strict";__p&&__p();e.exports=function(a){babelHelpers.inheritsLoose(b,a);function b(){return a.apply(this,arguments)||this}b.__getDocID=function(){return"1668947383157276"};b.getQueryID=function(){return"515216185516880"};return b}(b("WebGraphQLQueryBase"))}),null);
__d("MessengerThreadSharedMediaBeforeWebGraphQLQuery",["WebGraphQLQueryBase"],(function(a,b,c,d,e,f){"use strict";__p&&__p();e.exports=function(a){babelHelpers.inheritsLoose(b,a);function b(){return a.apply(this,arguments)||this}b.__getDocID=function(){return"1712143858865110"};b.getQueryID=function(){return"1694317194012102"};return b}(b("WebGraphQLQueryBase"))}),null);
__d("MessengerThreadSharedMediaFindWebGraphQLQuery",["WebGraphQLQueryBase"],(function(a,b,c,d,e,f){"use strict";__p&&__p();e.exports=function(a){babelHelpers.inheritsLoose(b,a);function b(){return a.apply(this,arguments)||this}b.__getDocID=function(){return"1933185426727404"};b.getQueryID=function(){return"237087923629184"};return b}(b("WebGraphQLQueryBase"))}),null);
__d("MessengerSharedMediaReducer",["MessengerSharedMediaActions","MessengerThreadSharedMediaHelper"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g=b("MessengerSharedMediaActions").Types;function a(a,c){__p&&__p();switch(c.type){case g.LOAD_CURRENT:var d=a.get("sharedMedia").get(c.threadFBID);if(d){d=d.edges.find(function(a){return a.node.legacy_attachment_id===c.photoID});if(d)return a}d=a.get("isLoading").get(c.threadFBID);if(!!d&&d.curr)return a;d=l(a,c.threadFBID,"curr",!0);b("MessengerThreadSharedMediaHelper").search(c.threadFBID,c.photoID,function(a){return b("MessengerSharedMediaActions").currentLoaded(a)});return d}return a}function c(a,c){__p&&__p();switch(c.type){case g.LOAD_MORE_PREVIOUS:var d=a.get("isLoading").get(c.threadFBID);if(!!d&&d.prev)return a;d=l(a,c.threadFBID,"prev",!0);if(d===null)return a;b("MessengerThreadSharedMediaHelper").loadMorePrevious(c.threadFBID,c.afterCursor,c.first,function(a){return b("MessengerSharedMediaActions").previousLoaded(a)});return d}return a}function d(a,c){__p&&__p();switch(c.type){case g.LOAD_MORE_LATEST:var d=a.get("isLoading").get(c.threadFBID);if(!!d&&d.latest)return a;d=l(a,c.threadFBID,"latest",!0);if(d===null)return a;b("MessengerThreadSharedMediaHelper").loadMoreLatest(c.threadFBID,c.beforeCursor,c.last,function(a){return b("MessengerSharedMediaActions").latestLoaded(a)});return d}return a}function f(a,c){__p&&__p();var d;switch(c.type){case g.CURRENT_LOADED:c=c.data;var e=Object.keys(c)[0];c=(c=c[e])!=null?c.message_shared_media:c;d=(d=c)!=null?(d=d.edges)!=null?d.length:d:d;var f=l(a,e,"curr",!1);if(d!==0&&c){d=k(a.get("sharedMedia").get(e),c,0);d=a.get("sharedMedia").set(e,d);f=f.set("sharedMedia",d);d=c.edges[0];b("MessengerThreadSharedMediaHelper").loadMorePrevious(e,d.cursor,10,function(a){return b("MessengerSharedMediaActions").previousLoaded(a)});b("MessengerThreadSharedMediaHelper").loadMoreLatest(e,d.cursor,10,function(a){return b("MessengerSharedMediaActions").latestLoaded(a)})}return f}return a}function h(a,b){__p&&__p();switch(b.type){case g.PREVIOUS_LOADED:b=b.data;var c=Object.keys(b)[0];b=b[c].message_shared_media;var d=l(a,c,"prev",!1);b=k(a.get("sharedMedia").get(c),b,1);c=a.get("sharedMedia").set(c,b);d=d.set("sharedMedia",c);return d}return a}function i(a,b){__p&&__p();switch(b.type){case g.LATEST_LOADED:b=b.data;var c=Object.keys(b)[0];b=b[c].message_shared_media;var d=l(a,c,"latest",!1);b=k(a.get("sharedMedia").get(c),b,-1);c=a.get("sharedMedia").set(c,b);d=d.set("sharedMedia",c);return d}return a}function j(a,b){__p&&__p();switch(b.type){case g.DELETE_PHOTOS:var c=b.threadFBID;b=b.photoFBIDs;var d=a.get("sharedMedia").get(c);if(!d||!d.edges)break;var e=new Set(b.map(function(a){return a.toString()}));d.edges=d.edges.filter(function(a){return!e.has(a.node.legacy_attachment_id)});b=a.get("sharedMedia").set(c,d);c=a.set("sharedMedia",b);return c}return a}function k(a,b,c){__p&&__p();var d={};d.count=b.count;if(c===1&&a){var e=a.edges;d.has_previous_page=a.has_previous_page;d.has_next_page=b.page_info.has_next_page;b.edges.length>0?d.edges=e.concat(b.edges):d.edges=e}else if(c===-1&&a){e=a.edges;d.has_previous_page=b.page_info.has_previous_page;d.has_next_page=a.has_next_page;b.edges.length>0?d.edges=b.edges.concat(e):d.edges=e}else d.has_previous_page=b.page_info.has_previous_page,d.has_next_page=b.page_info.has_next_page,b.edges.length>0&&(d.edges=b.edges);return d}function l(a,b,c,d){var e=a.get("isLoading").get(b);e===void 0?(e={},e[c]=d):e[c]=d;c=a.set("isLoading",a.get("isLoading").set(b,e));return c}f={currentLoaded:f,deletePhotos:j,latestLoaded:i,loadCurrent:a,loadMoreLatest:d,loadMorePrevious:c,previousLoaded:h};e.exports=f}),null);
__d("MessengerSharedMediaState",["immutable"],(function(a,b,c,d,e,f){"use strict";a={sharedMedia:b("immutable").Map({}),isLoading:b("immutable").Map({})};c=function(a){babelHelpers.inheritsLoose(b,a);function b(){return a.apply(this,arguments)||this}return b}(b("immutable").Record(a));e.exports=c}),null);
__d("MessengerSharedMediaStore",["FluxReduceStore","MessengerFluxReduceDispatcher","MessengerSharedMediaActions","MessengerSharedMediaReducer","MessengerSharedMediaState"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g=Object.keys(b("MessengerSharedMediaReducer"));a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){return a.apply(this,arguments)||this}var d=c.prototype;d.getInitialState=function(){return new(b("MessengerSharedMediaState"))()};d.reduce=function(a,c){if(c.namespace!==b("MessengerSharedMediaActions").Namespace)return a;g.forEach(function(d){a=b("MessengerSharedMediaReducer")[d](a,c)});return a};return c}(b("FluxReduceStore"));a.__moduleID=e.id;e.exports=new a(b("MessengerFluxReduceDispatcher"))}),null);
__d("MessengerSharedPhotosAlbumViewPhotoReact.bs",["bs_curry","React","cssURL","ReasonReact.bs"],(function(a,b,c,d,e,f){"use strict";var g=b("ReasonReact.bs").statelessComponent("MessengerSharedPhotosAlbumViewPhotoReact");function a(a,c,d,e,f){return[g[0],g[1],g[2],g[3],g[4],g[5],g[6],g[7],function(){return b("React").createElement("a",{className:a,style:{backgroundImage:b("cssURL")(e)},href:"#",onClick:function(){return b("bs_curry")._1(d,c)}},f)},g[9],g[10],g[11],g[12]]}f.component=g;f.make=a}),null);
__d("MessengerSharedPhotosAlbumViewVScrollReact.bs",["cx","bs_array","bs_curry","React","bs_string","ReactDOM","Animation","bs_caml_array","ReasonReact.bs","bs_js_primitive","bs_caml_builtin_exceptions","MessengerSharedMediaActions","MessengerSharedPhotosAlbumViewPhotoReact.bs"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();function h(a){var c=a[1],d=c.length;if(d<48){b("MessengerSharedMediaActions").loadMorePrevious(a[0],b("bs_caml_array").caml_array_get(c,c.length-1|0).cursor,48);return 0}else return 0}function i(a){if(a!==void 0){a=b("bs_js_primitive").valFromOption(a);return(a.scrollTop+a.clientHeight|0)>=(a.scrollHeight-20|0)}else throw b("bs_caml_builtin_exceptions").not_found}function j(a){if(a!==void 0)return b("bs_js_primitive").valFromOption(a).scrollTop<=20;else throw b("bs_caml_builtin_exceptions").not_found}function k(a){if(a!==void 0)return b("bs_js_primitive").valFromOption(a).clientHeight;else throw b("bs_caml_builtin_exceptions").not_found}function l(a,c){if(a!==void 0){new(b("Animation"))(b("bs_js_primitive").valFromOption(a)).to("scrollTop",c).duration(200).go();return 0}else return 0}function m(a){var c=a[2][0];if(c!==void 0)return l(a[1][0],b("ReactDOM").findDOMNode(b("bs_js_primitive").valFromOption(c)).offsetTop-70|0);else return 0}function n(a,c){__p&&__p();a=c[2];var d=a[3],e=a[1],f=a[0];c=c[1];var g=e.length;if(i(c[1][0]))if(g<a[2]&&!d.prev){b("MessengerSharedMediaActions").loadMorePrevious(f,b("bs_caml_array").caml_array_get(e,e.length-1|0).cursor,48);return 0}else return 0;else if(j(c[1][0])&&!d.latest){b("MessengerSharedMediaActions").loadMoreLatest(f,b("bs_caml_array").caml_array_get(e,0).cursor,48);return 0}else return 0}function o(a){__p&&__p();var c=a[1],d=c[1][0];if(d!==void 0){var e=b("bs_curry")._1(a[0],n);b("bs_js_primitive").valFromOption(d).addEventListener("scroll",e);b("bs_curry")._1(a[4],function(){var a=c[1][0];if(a!==void 0)return b("bs_js_primitive").valFromOption(a).removeEventListener("scroll",e);else return 0})}h(a[2]);d=function(){__p&&__p();if(k(c[3][0])>0){m(c);var a=c[0][0];if(a!==void 0){clearInterval(b("bs_js_primitive").valFromOption(a));c[0][0]=void 0;return 0}else return 0}else return 0};c[0][0]=b("bs_js_primitive").some(setInterval(d,200));return 0}function p(a){a=a[1][0][0];if(a!==void 0){clearInterval(b("bs_js_primitive").valFromOption(a));return 0}else return 0}var q=b("ReasonReact.bs").reducerComponentWithRetainedProps("MessengerSharedPhotosAlbumViewVScrollReact");function r(a,c){c[1][1][0]=a==null?void 0:b("bs_js_primitive").some(a);return 0}function s(a,c){c[1][3][0]=a==null?void 0:b("bs_js_primitive").some(a);return 0}function t(a,c){c[1][2][0]=a==null?void 0:b("bs_js_primitive").some(a);return 0}function u(a,c,d,e,f,g,h){__p&&__p();var i=function(a){__p&&__p();return b("bs_array").map(function(d){__p&&__p();d=d.node;var e=d.photo_encodings;e=e==null?!1:e.length!==0;var f=d.photo_encodings,h,i=0;if(e&&!(f==null)){f=f.find(function(a){return a.projection_type==="perspective"});if(f!==void 0)if(f.thumbnails.length!==0){f=f.thumbnails;h=b("bs_caml_array").caml_array_get(f,0).uri}else{f=d.image1;h=f==null?void 0:f.uri}else{f=d.image1;h=f==null?void 0:f.uri}}else i=1;if(i===1){f=d.image1;h=f==null?void 0:f.uri}if(h!==void 0){i=d.legacy_attachment_id===g;return b("ReasonReact.bs").element(d.legacy_attachment_id,i?b("bs_curry")._1(a[0],t):void 0,b("MessengerSharedPhotosAlbumViewPhotoReact.bs").make("_3bly"+(e?" _3603":""),d.legacy_attachment_id,c,h,[b("React").createElement("div",{key:b("bs_string").concat("_",[d.legacy_attachment_id,["spherical_gradient",0]]),className:e?"_64ks":""})]))}else return null},d)};return[q[0],q[1],q[2],q[3],o,q[5],p,q[7],function(a){return b("React").createElement("div",{ref:b("bs_curry")._1(a[0],r),className:"_3xo8",onScroll:b("bs_curry")._1(a[0],n)},b("React").createElement("div",{ref:b("bs_curry")._1(a[0],s),className:"_3xoa"},i(a)))},function(){return[[void 0],[void 0],[void 0],[void 0]]},[e,d,f,a],function(a,b){return 0},q[12]]}a=b("ReasonReact.bs").wrapReasonForJs(q,function(a){return u(a.isLoading,a.onClick,a.sharedPhotos,a.threadID,a.totalCount,a.viewedPhoto,[])});c=200;d=48;e=6;g=20;var v=70;f.animationDuration=c;f.imagesToLoad=d;f.photosPerRow=e;f.scrollToEdgeTolerance=g;f.headerHeight=v;f.graduallyLoadPhotos=h;f.isScrolledToBottom=i;f.isScrolledToTop=j;f.getScrollHeight=k;f.scrollTo=l;f.autoScrollWhenLoaded=m;f.handleScroll=n;f.didMount=o;f.willUnmount=p;f.component=q;f.setRefChildContainer=r;f.setRefScrollable=s;f.setRefChild=t;f.make=u;f.jsComponent=a}),null);
__d("MessengerSharedPhotosAlbumView.react",["cx","fbt","MessengerPhotoViewCloseLinkReact.re","MessengerSharedPhotosAlbumViewVScrollReact.bs","React","ShimButton.react"],(function(a,b,c,d,e,f,g,h){"use strict";__p&&__p();var i=b("MessengerPhotoViewCloseLinkReact.re").make,j=b("MessengerSharedPhotosAlbumViewVScrollReact.bs").jsComponent;a=b("React").PropTypes;c=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){var b,c;for(var d=arguments.length,e=new Array(d),f=0;f<d;f++)e[f]=arguments[f];return(b=c=a.call.apply(a,[this].concat(e))||this,c.$2=function(){c.props.onClick(c.props.viewedPhoto)},b)||babelHelpers.assertThisInitialized(c)}var d=c.prototype;d.render=function(){return b("React").createElement("div",{className:"_3bl- _5l-3",ref:"window"},this.$1(),b("React").createElement(j,{isLoading:this.props.isLoading,onClick:this.props.onClick,sharedPhotos:this.props.sharedPhotos,threadID:this.props.threadID,totalCount:this.props.totalCount,viewedPhoto:this.props.viewedPhoto}))};d.$1=function(){return b("React").createElement("div",{className:"_3bm0 _5l-3",ref:"header"},b("React").createElement(b("ShimButton.react"),{className:"_3bm2",onClick:this.$2},b("React").createElement("div",{className:"_3bm3"}),h._("Quay l\u1ea1i \u1ea3nh")),b("React").createElement("div",{className:"_3bm4"},h._("\u1ea2nh \u0111\u00e3 chia s\u1ebb")),b("React").createElement(i,{onClick:this.props.onCloseSharedPhotos}))};return c}(b("React").Component);c.propTypes={onClick:a.func.isRequired,onCloseSharedPhotos:a.func.isRequired,sharedPhotos:a.arrayOf(a.object).isRequired,totalCount:a.number.isRequired,viewedPhoto:a.string.isRequired,threadID:a.string.isRequired,isLoading:a.object.isRequired};e.exports=c}),null);
__d("MessengerSharedPhotosAlbumViewContainer.react",["FluxContainer","MessengerSharedMediaStore","MessengerSharedPhotosAlbumView.react","React"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a=b("React").PropTypes;c=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){var b,c;for(var d=arguments.length,e=new Array(d),f=0;f<d;f++)e[f]=arguments[f];return(b=c=a.call.apply(a,[this].concat(e))||this,c.state={edges:[],count:0,isLoading:{}},b)||babelHelpers.assertThisInitialized(c)}c.getStores=function(){return[b("MessengerSharedMediaStore")]};c.calculateState=function(a,c){a=b("MessengerSharedMediaStore").getState();var d=a.sharedMedia;return{edges:d.get(c.threadID).edges,count:d.get(c.threadID).count,isLoading:a.isLoading.get(c.threadID)}};var d=c.prototype;d.render=function(){return this.state.edges.length===0?null:b("React").createElement(b("MessengerSharedPhotosAlbumView.react"),{onClick:this.props.onClick,onCloseSharedPhotos:this.props.onCloseSharedPhotos,sharedPhotos:this.state.edges,totalCount:this.state.count,viewedPhoto:this.props.viewedPhoto,threadID:this.props.threadID,isLoading:this.state.isLoading})};return c}(b("React").PureComponent);c.propTypes={onClick:a.func.isRequired,onCloseSharedPhotos:a.func.isRequired,viewedPhoto:a.string.isRequired,threadID:a.string};e.exports=b("FluxContainer").create(c,{withProps:!0})}),null);
__d("MessageShareType",[],(function(a,b,c,d,e,f){e.exports=Object.freeze({IMAGE:"image",PLATFORM_SHARE_CTA:"platform_share_CTA"})}),null);
__d("MessengerComposeViewHeaderReact.bs",["ReasonReact.bs","bs_js_null_undefined","MessengerComposeViewHeader.react"],(function(a,b,c,d,e,f){"use strict";function a(a,c,d,e,f,g,h,i,j,k){return b("ReasonReact.bs").wrapJsForReason(b("MessengerComposeViewHeader.react"),{className:b("bs_js_null_undefined").fromOption(a),forceHideClearButton:c,onClear:b("bs_js_null_undefined").fromOption(d),onAddRecipient:e,onRemoveRecipient:f,onResize:g,recipients:h,viewer:i,isWorkUser:j},k)}f.make=a}),null);
__d("XMessagingForwardAttachmentController",["XController"],(function(a,b,c,d,e,f){e.exports=b("XController").create("/mercury/attachments/forward/",{})}),null);
__d("XMessengerPlatformShareCTAController",["XController"],(function(a,b,c,d,e,f){e.exports=b("XController").create("/messages/platform/share/",{})}),null);
__d("MessengerForwardAttachmentDialogReact.bs",["ix","cx","fbt","bs_block","bs_curry","Image.bs","React","immutable","CurrentUser","fbglyph","ReasonReact.bs","AsyncRequest","bs_js_primitive","MercuryLocalIDs","MessageShareType","MessengerDialogs.bs","MessengerDialogReact.bs","MessengerSpinnerReact.bs","MessengerDialogBodyReact.bs","MessengerComposeViewHeaderReact.bs","XMessengerPlatformShareCTAController","XMessagingForwardAttachmentController"],(function(a,b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j=i._("G\u1eedi"),k=b("ReasonReact.bs").reducerComponent("MessengerForwardAttachmentDialogReact");function l(a,c,d){new(b("AsyncRequest"))(a.getURIBuilder().getURI()).setMethod("POST").setHandler(d).setData(c).send();return 0}function m(a,c,d,e,f,h,m){__p&&__p();var n=function(a){if(a)return 0;else{b("MessengerDialogs.bs").removeDialog(void 0,0);return b("bs_curry")._1(c,0)}},o=function(c,e){__p&&__p();var f=e[3];c=function(a){if(a.payload.success)return b("bs_curry")._1(f,2);else return b("bs_curry")._1(f,b("bs_block").__(2,[b("bs_js_primitive").nullable_to_opt(a.payload.error)]))};var g={};e[1][0].forEach(function(c,a,d){g[String(b("MercuryLocalIDs").generateOfflineThreadingID(void 0))]=c.getUniqueID();return!0});var i=0;h!==void 0&&d!==void 0&&b("bs_js_primitive").valFromOption(h)===b("MessageShareType").PLATFORM_SHARE_CTA?l(b("XMessengerPlatformShareCTAController"),{cta_id:a,message_id:b("bs_js_primitive").valFromOption(d),recipient_map:g},c):i=1;i===1&&l(b("XMessagingForwardAttachmentController"),{attachment_id:a,recipient_map:g},c);return b("bs_curry")._1(e[3],1)};return[k[0],k[1],k[2],k[3],k[4],k[5],k[6],k[7],function(a){__p&&__p();var c=a[1],d=c[2],h=c[1];if(d)d=b("React").createElement("div",void 0,b("ReasonReact.bs").element(void 0,void 0,b("MessengerSpinnerReact.bs").make(void 0,void 0,void 0,[])),b("React").createElement("span",{className:"_1e1n _3-99"},i._("\u0110ang g\u1eedi")));else if(h!==void 0){var k=g("141787");d=b("React").createElement("div",{className:"_1e1n"},b("ReasonReact.bs").element(void 0,void 0,b("Image.bs").make(void 0,void 0,void 0,void 0,k,void 0,void 0,void 0,void 0,[])),b("React").createElement("span",{className:"_3-99"},h))}else d=null;k=c[0].isEmpty()||c[2];return b("ReasonReact.bs").element(void 0,void 0,b("MessengerDialogReact.bs").Dialog[0](void 0,n,void 0,e,void 0,void 0,560,void 0,[b("ReasonReact.bs").element(void 0,void 0,b("bs_curry")._3(b("MessengerDialogReact.bs").Header[0],void 0,void 0,b("ReasonReact.bs").element(void 0,void 0,b("bs_curry")._2(b("MessengerDialogReact.bs").Title[0],void 0,f)))),b("ReasonReact.bs").element(void 0,void 0,b("MessengerDialogBodyReact.bs").make(void 0,[b("ReasonReact.bs").element(void 0,void 0,b("MessengerComposeViewHeaderReact.bs").make("_1e1o",!1,function(){return b("bs_curry")._1(a[3],0)},function(c){return b("bs_curry")._1(a[3],b("bs_block").__(0,[c]))},function(c){return b("bs_curry")._1(a[3],b("bs_block").__(1,[c]))},function(){return 0},c[0],b("CurrentUser").getID(),b("CurrentUser").isWorkUser(),[]))])),b("ReasonReact.bs").element(void 0,void 0,b("MessengerDialogReact.bs").Footer[0](void 0,b("bs_js_primitive").some(d),[b("ReasonReact.bs").element(void 0,void 0,b("MessengerDialogReact.bs").CancelButton[0](void 0,[])),b("ReasonReact.bs").element(void 0,void 0,b("MessengerDialogReact.bs").Button[0](2,j,k,void 0,b("bs_curry")._1(a[0],o),0,void 0,void 0,k?i._("N\u00fat g\u1eedi \u0111\u00e3 v\u00f4 hi\u1ec7u h\u00f3a"):j,[]))]))]))},function(){return[b("immutable").List([]),void 0,!1]},k[10],function(a){__p&&__p();if(typeof a==="number")switch(a){case 0:return function(a){return b("bs_block").__(0,[[b("immutable").List([]),a[1],a[2]]])};case 1:return function(a){return b("bs_block").__(0,[[a[0],void 0,!0]])};case 2:b("bs_curry")._1(c,0);return function(){return b("bs_block").__(0,[[b("immutable").List([]),void 0,!1]])}}else switch(a.tag|0){case 0:var d=a[0];return function(a){return b("bs_block").__(0,[[a[0].push(d),a[1],a[2]]])};case 1:var e=a[0];return function(a){return b("bs_block").__(0,[[a[0].filter(function(a){return a!==e}),a[1],a[2]]])};case 2:var f=a[0];return function(a){return b("bs_block").__(0,[[a[0],f,!1]])}}},k[12]]}a=b("ReasonReact.bs").wrapReasonForJs(k,function(a){return m(a.attachmentID,a.onClose,b("bs_js_primitive").nullable_to_opt(a.messageID),a.shown,a.title,b("bs_js_primitive").nullable_to_opt(a.shareType),[])});f.sendButtonLabel=j;f.component=k;f.sendData=l;f.make=m;f.jsComponent=a}),null);
__d("MessengerPhotoInfoDialog.react",["cx","fbt","MercuryIDs","MercuryTimestamp","MessengerContactImageReact.bs","MessengerDialog.react","MessengerDialogButton.react","MessengerDialogHeaderReact.re","MessengerDialogs.bs","MessengerDialogTitleReact.re","MessengerEnvironment","MessengerParticipants.bs","MessengerSpinner.react","React","RelayClassic_DEPRECATED","XUIDialog.react","XUIDialogHeader.react","XUIDialogHeaderTitle.react","react-relay-deprecated/classic/query/RelayQL"],(function(a,b,c,d,e,f,g,h){"use strict";__p&&__p();var i=b("MessengerContactImageReact.bs").jsComponent,j=b("MessengerDialogHeaderReact.re").component,k=b("MessengerDialogTitleReact.re").component;a=b("React").PropTypes;var l=54;c=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){var c,d;for(var e=arguments.length,f=new Array(e),g=0;g<e;g++)f[g]=arguments[g];return(c=d=a.call.apply(a,[this].concat(f))||this,d.$5=function(a){a.preventDefault(),d.props.showHeader&&d.props.showHeader(),b("MessengerDialogs.bs").removeDialog()},d.$4=function(a){a||(d.props.showHeader&&d.props.showHeader(),d.props.closeInfo())},c)||babelHelpers.assertThisInitialized(d)}var d=c.prototype;d.render=function(){return!this.props.fullMedia?null:b("MessengerEnvironment").messengerui?this.$1():this.$2()};d.$3=function(){var a=this.props.fullMedia;a=a.creator;return a?a.name:b("MessengerParticipants.bs").getDefaultName().toString()};d.$1=function(){var a=this.props.fullMedia;return b("React").createElement(b("MessengerDialog.react"),{onToggle:this.$4,ref:"dialog",type:"default",width:504},b("React").createElement(j,null,b("React").createElement(k,null,h._("Th\u00f4ng tin")),b("React").createElement(b("MessengerDialogButton.react"),{action:"cancel",label:h._("Xong"),onClick:this.$5,type:"primary"})),b("React").createElement("div",{className:"_2zn1"},b("React").createElement("div",{className:"_2zn2"},h._("\u0110\u01b0\u1ee3c t\u1ea3i l\u00ean b\u1edfi")),b("React").createElement("div",{className:"_2zn4"},b("React").createElement("div",{className:"_2zn5"},this.$3()),b("React").createElement("div",{className:"_2zn6"},b("MercuryTimestamp").getPreciseTimestamp(a.creation_time*1e3))),b("React").createElement("div",{className:"_2zn7"},this.showProfilePic())),this.$6(),this.$7())};d.$2=function(){var a=this.props.fullMedia;return b("React").createElement(b("XUIDialog.react"),{onToggle:this.$4,shown:this.props.infoOpen,ref:"dialog",type:"serif",width:504},b("React").createElement(b("XUIDialogHeader.react"),null,b("React").createElement(b("XUIDialogHeaderTitle.react"),null,h._("Th\u00f4ng tin"))),b("React").createElement("div",{className:"_2zn1"},b("React").createElement("div",{className:"_2zn2"},h._("\u0110\u01b0\u1ee3c t\u1ea3i l\u00ean b\u1edfi")),b("React").createElement("div",{className:"_2zn4"},b("React").createElement("div",{className:"_2zn5"},this.$3()),b("React").createElement("div",{className:"_2zn6"},b("MercuryTimestamp").getPreciseTimestamp(a.creation_time*1e3))),b("React").createElement("div",{className:"_2zn7"},this.showProfilePic())),this.$6(),this.$7())};d.$7=function(){__p&&__p();var a=this.props.fullMedia.exif_data,c="";if(a){a.aperture&&(c=a.aperture+" ");if(a.focal_length){var d=a.focal_length.split("/");d=parseInt(d[0],10)/(parseInt(d[1],10)||1);c+=d+"mm "}a.iso&&(c+="ISO "+a.iso)}return!c.length?null:b("React").createElement("div",{className:"_2zn1"},b("React").createElement("div",{className:"_2zn2"},h._("M\u00e1y \u1ea3nh")),b("React").createElement("div",{className:"_2zn4"},b("React").createElement("div",{className:"_2zn5"},a.model||"Camera"),b("React").createElement("div",{className:"_2zn6"},c)))};d.$6=function(){var a=this.props.fullMedia,c="";a.filesize>1e6?c=(a.filesize/1e6).toFixed(2)+"MB":a.filesize>1e3?c=(a.filesize/1e3).toFixed(2)+"KB":a.filesize>0&&(c=a.filesize+"B");var d=a.__typename==="MessageImage"?(a.original_dimensions.x*a.original_dimensions.y/1e6).toFixed(2)+"MP":"";return b("React").createElement("div",{className:"_2zn1"},b("React").createElement("div",{className:"_2zn2"},h._("Chi ti\u1ebft")),b("React").createElement("div",{className:"_2zn4"},b("React").createElement("div",{className:"_2zn5"},a.filename),b("React").createElement("div",{className:"_2zn6"},d+" "+a.original_dimensions.x+" x "+a.original_dimensions.y+" "+c)))};d.showProfilePic=function(){__p&&__p();var a=this.props.fullMedia;if(!a)return b("React").createElement(b("MessengerSpinner.react"),null);else{a=a.creator;if(!a)return b("React").createElement(b("MessengerSpinner.react"),null);a=b("MercuryIDs").getParticipantIDFromUserID(a.id);a=b("MessengerParticipants.bs").getNow(a);return a?b("React").createElement(i,{isMessengerUser:a.is_messenger_user,size:l,src:a.big_image_src||a.image_src}):b("React").createElement(b("MessengerSpinner.react"),null)}};return c}(b("React").Component);c.propTypes={closeInfo:a.func,fullMedia:a.object,infoOpen:a.bool,photoID:a.string,showHeader:a.func};e.exports=b("RelayClassic_DEPRECATED").createContainer(c,{fragments:{fullMedia:function(a){return function(){return{children:[{fieldName:"__typename",kind:"Field",metadata:{isRequisite:!0},type:"String"},{fieldName:"id",kind:"Field",metadata:{isRequisite:!0},type:"ID"},{children:[{fieldName:"creation_time",kind:"Field",metadata:{},type:"Time"},{children:[{fieldName:"id",kind:"Field",metadata:{isRequisite:!0},type:"ID"},{fieldName:"name",kind:"Field",metadata:{},type:"String"},{fieldName:"__typename",kind:"Field",metadata:{isGenerated:!0,isRequisite:!0},type:"String"}],fieldName:"creator",kind:"Field",metadata:{canHaveSubselections:!0,inferredRootCallName:"node",inferredPrimaryKey:"id",isAbstract:!0},type:"Actor"},{fieldName:"filename",kind:"Field",metadata:{},type:"String"},{children:[{fieldName:"x",kind:"Field",metadata:{},type:"Float"},{fieldName:"y",kind:"Field",metadata:{},type:"Float"}],fieldName:"original_dimensions",kind:"Field",metadata:{canHaveSubselections:!0},type:"Vect2"},{fieldName:"filesize",kind:"Field",metadata:{},type:"Int"},{children:[{fieldName:"iso",kind:"Field",metadata:{},type:"Int"},{fieldName:"aperture",kind:"Field",metadata:{},type:"String"},{fieldName:"focal_length",kind:"Field",metadata:{},type:"String"},{fieldName:"model",kind:"Field",metadata:{},type:"String"}],fieldName:"exif_data",kind:"Field",metadata:{canHaveSubselections:!0},type:"MessageImageExifData"},{fieldName:"id",kind:"Field",metadata:{isGenerated:!0,isRequisite:!0},type:"ID"}],id:b("react-relay-deprecated/classic/query/RelayQL").__id(),kind:"Fragment",metadata:{},name:"MessageImage",type:"MessageImage"},{children:[{fieldName:"creation_time",kind:"Field",metadata:{},type:"Time"},{children:[{fieldName:"id",kind:"Field",metadata:{isRequisite:!0},type:"ID"},{fieldName:"name",kind:"Field",metadata:{},type:"String"},{fieldName:"__typename",kind:"Field",metadata:{isGenerated:!0,isRequisite:!0},type:"String"}],fieldName:"creator",kind:"Field",metadata:{canHaveSubselections:!0,inferredRootCallName:"node",inferredPrimaryKey:"id",isAbstract:!0},type:"Actor"},{fieldName:"filename",kind:"Field",metadata:{},type:"String"},{children:[{fieldName:"x",kind:"Field",metadata:{},type:"Float"},{fieldName:"y",kind:"Field",metadata:{},type:"Float"}],fieldName:"original_dimensions",kind:"Field",metadata:{canHaveSubselections:!0},type:"Vect2"},{fieldName:"id",kind:"Field",metadata:{isGenerated:!0,isRequisite:!0},type:"ID"}],id:b("react-relay-deprecated/classic/query/RelayQL").__id(),kind:"Fragment",metadata:{},name:"MessageVideo",type:"MessageVideo"}],id:b("react-relay-deprecated/classic/query/RelayQL").__id(),kind:"Fragment",metadata:{isAbstract:!0},name:"MessengerPhotoInfoDialog_FullMediaRelayQL",type:"Node"}}()}}})}),null);
__d("SpotlightMessagesViewerContainerRoute",["react-relay-deprecated/classic/query/RelayQL","react-relay-deprecated/classic/route/RelayRoute"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a=function(a){babelHelpers.inheritsLoose(b,a);function b(){return a.apply(this,arguments)||this}return b}(b("react-relay-deprecated/classic/route/RelayRoute"));a.routeName="SpotlightMessagesViewerContainerRoute";a.paramDefinition={photoID:{type:"String",required:!0}};a.queries={fullMedia:function(a){return function(a){return{calls:[{kind:"Call",metadata:{type:"ID!"},name:"id",value:{kind:"CallVariable",callVariableName:"photoID"}}],children:[].concat.apply([],[{fieldName:"id",kind:"Field",metadata:{isGenerated:!0,isRequisite:!0},type:"ID"},{fieldName:"__typename",kind:"Field",metadata:{isGenerated:!0,isRequisite:!0},type:"String"},b("react-relay-deprecated/classic/query/RelayQL").__frag(a)]),fieldName:"node",kind:"Query",metadata:{isAbstract:!0,identifyingArgName:"id",identifyingArgType:"ID!"},name:"SpotlightMessagesViewerContainerRoute",type:"Node"}}(a.getFragment("fullMedia"))}};e.exports=a}),null);
__d("MessengerPhotoInfoDialogContainer.react",["MessengerPhotoInfoDialog.react","React","SpotlightMessagesViewerContainerRoute","react-relay-deprecated/classic/container/RelayRootContainer"],(function(a,b,c,d,e,f){"use strict";a=b("React").PropTypes;c=b("React").createClass({displayName:"MessengerPhotoInfoDialogContainer",proptypes:{photoID:a.string.isRequired,showHeader:a.func},render:function(){var a=this,c=new(b("SpotlightMessagesViewerContainerRoute"))({photoID:this.props.photoID});return b("React").createElement(b("react-relay-deprecated/classic/container/RelayRootContainer"),{Component:b("MessengerPhotoInfoDialog.react"),route:c,renderFetched:function(c){return b("React").createElement(b("MessengerPhotoInfoDialog.react"),babelHelpers["extends"]({},c,{closeInfo:a.props.closeInfo,photoID:a.props.photoID,infoOpen:a.props.infoOpen,showHeader:a.props.showHeader}))}})}});e.exports=c}),null);
__d("MessengerPhotoViewBottomBarReact.bs",["cx","React"],(function(a,b,c,d,e,f,g){"use strict";function a(a){a=a.children;return b("React").createElement("div",{className:"_51an _50-m _16zz"},a)}c=a;f.make=c}),null);
__d("MessengerPhotoViewBottomBarReact.re",["MessengerPhotoViewBottomBarReact.bs"],(function(a,b,c,d,e,f){a=b("MessengerPhotoViewBottomBarReact.bs").make;f.make=a}),null);
__d("MessengerPhotoViewHScroll.react",["cx","Animation","MessengerSharedPhotoReact.re","React","SphericalPhotoUtils"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();var h=b("MessengerSharedPhotoReact.re").component,i=b("SphericalPhotoUtils").getThumbnailsFromPhotoEncodings,j=200,k=80;a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){var b,c;for(var d=arguments.length,e=new Array(d),f=0;f<d;f++)e[f]=arguments[f];return(b=c=a.call.apply(a,[this].concat(e))||this,c.$1=null,b)||babelHelpers.assertThisInitialized(c)}var d=c.prototype;d.componentDidMount=function(){this.$2()};d.componentDidUpdate=function(){this.$2()};d.componentWillUnmount=function(){this.$1&&this.$1.stop(),this.$1=null};d.render=function(){__p&&__p();var a=this,c=this.props.sharedPhotos;c=c.reduce(function(c,d){__p&&__p();var e=d.node.image1===null?d.node.image:d.node.image1,f=d.node.photo_encodings?d.node.photo_encodings.length!==0:!1;if(e){e=e.uri;if(f){var g=i(d.node.photo_encodings);g=g.smallThumbnail;e=g||e}c.push(b("React").createElement("div",{className:"_4dy9",key:d.node.legacy_attachment_id},b("React").createElement(h,{className:"_42rl"+(a.props.photoID!==d.node.legacy_attachment_id?" _q1a":""),fbid:d.node.legacy_attachment_id,onClick:a.props.onScroll,uri:e,isSpherical:f})))}return c},[]);var d=(this.props.width-k)/2;return b("React").createElement("div",{className:"_463g"},b("React").createElement("div",{className:"_463h",ref:"childContainer"},b("React").createElement("div",{className:"_463j",style:{paddingLeft:d,paddingRight:d},ref:"scrollable"},c)))};d.$2=function(){var a=this,c=this.refs.childContainer?this.refs.childContainer.scrollLeft:0,d=this.props.sharedPhotos.findIndex(function(b){return b.node.legacy_attachment_id===a.props.photoID});d=d*k;this.$1||(this.$1=new(b("Animation"))(this.refs.childContainer));this.$1.from("scrollLeft",c).to("scrollLeft",d).duration(j).go()};return c}(b("React").PureComponent);e.exports=a}),null);
__d("MessengerPhotoViewHeader.react",["cx","fbt","MessagingForwardingButtonNUX.react","MessengerPhotoViewCloseLinkReact.re","React","SpotlightViewerBottomBarLink"],(function(a,b,c,d,e,f,g,h){"use strict";__p&&__p();var i=b("MessengerPhotoViewCloseLinkReact.re").make;a=b("React").PropTypes;c=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){var b,c;for(var d=arguments.length,e=new Array(d),f=0;f<d;f++)e[f]=arguments[f];return(b=c=a.call.apply(a,[this].concat(e))||this,c.$3=function(){c.refs.forwardNUX&&c.refs.forwardNUX.close(),c.props.showForwardDialog&&c.props.showForwardDialog()},b)||babelHelpers.assertThisInitialized(c)}var d=c.prototype;d.render=function(){return b("React").createElement("div",{className:"_51an _50-m _3c1i _5l-3",role:"banner"},this.$1(),this.$2())};d.$2=function(){return b("React").createElement(i,{onClick:this.props.onClose})};d.$1=function(){var a=this,c,d;this.props.disableForward||(c=b("React").createElement(b("SpotlightViewerBottomBarLink"),{className:"_3c1o",onClick:this.$3,ref:"forwardButton"},b("React").createElement("div",{className:"_2msr _3oo2"}),h._("Chuy\u1ec3n ti\u1ebfp")),d=b("React").createElement(b("MessagingForwardingButtonNUX.react"),{contextRef:function(){return a.refs.forwardButton},ref:"forwardNUX"},h._("G\u1eedi h\u00ecnh \u1ea3nh n\u00e0y cho ng\u01b0\u1eddi kh\u00e1c b\u1eb1ng tin nh\u1eafn ri\u00eang.")));return b("React").createElement("div",{key:"buttonsContainer",ref:"buttons"},b("React").createElement(b("SpotlightViewerBottomBarLink"),{ajaxify:this.props.url,className:"_3c1o",rel:"async"},b("React").createElement("div",{className:"_3ooo _2msr"}),h._("T\u1ea3i xu\u1ed1ng")),c,d,b("React").createElement(b("SpotlightViewerBottomBarLink"),{className:"_3c1o",href:"#",onClick:this.props.openInfo,ref:"moreInfo"},b("React").createElement("div",{className:"_3c1k _2msr"}),h._("Th\u00f4ng tin")))};return c}(b("React").PureComponent);c.propTypes={disableForward:a.bool,onClose:a.func,openInfo:a.func,photoID:a.string,showForwardDialog:a.func,url:a.object};e.exports=c}),null);
__d("XMessagingVideoAttachmentController",["XController"],(function(a,b,c,d,e,f){e.exports=b("XController").create("/mercury/attachments/video/",{video_id:{type:"String",required:!0},video_container_id:{type:"String",required:!0},width:{type:"Int",required:!0},height:{type:"Int",required:!0},start_muted:{type:"Bool",defaultValue:!1},no_fullscreen:{type:"Bool",defaultValue:!1},load_player_controller:{type:"Bool",defaultValue:!1},hide_controls_on_finish:{type:"Bool",defaultValue:!1},hide_url_menu_option:{type:"Bool",defaultValue:!1},is_share:{type:"Bool",defaultValue:!1},render_play_button:{type:"Bool",defaultValue:!1},start_timestamp:{type:"Int",defaultValue:0},native_thumbnail:{type:"Bool",defaultValue:!1}})}),null);
__d("MessengerVideoPlayer.react",["cx","ActorURI","AsyncRequest","BackgroundImage.react","Event","FullScreen","MessengerSpinner.react","React","ShimButton.react","SpotlightMercurySharedMediaViewer.react","SubscriptionsHandler","Vector","VideoPlayerReason","VideoPlayerReasonTransitionHelper","VideoPlayerStates","XMessagingVideoAttachmentController","cssURL","getFullScreenElement","guid","joinClasses","setImmediate"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();a=b("React").PropTypes;var h="_ox1";c=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(c){__p&&__p();var d,e;e=a.call(this,c)||this;e.$2=!0;e.$3=[];e.$4=-1;e.$5=!1;e.$6=!1;e.state={playerAPI:null,forcePause:!!((d=e.props.videoData)==null?void 0:d.disableAutoplay)};e.$10=function(a){if(!e.isVideoClicked(a))return;a.preventDefault();e.props.isOnStage?(a.stopPropagation(),e.isState(b("VideoPlayerStates").PLAYING)?e.pause(b("VideoPlayerReason").USER):e.play(b("VideoPlayerReason").USER)):(e.pause(b("VideoPlayerReason").USER),e.props.onClick&&e.props.onClick())};e.$11=function(a){if(!e.isRightClick(a))return;a.stopPropagation();a.preventDefault();b("setImmediate")(function(){e.props.onSelect&&e.props.onSelect()})};e.$8=function(){if(!e.$2||e.state.forcePause)return;e.$6&&(e.play(new(b("VideoPlayerReasonTransitionHelper"))(b("VideoPlayerReason").PAGE_VISIBILITY)),e.$6=!1)};e.$7=function(){if(!e.$2||e.state.forcePause||!(e.state.playerAPI&&e.state.playerAPI.isMuted()))return;e.$6=!!e.state.playerAPI&&e.state.playerAPI.isState(b("VideoPlayerStates").PLAYING);e.pause()};e.$1=b("guid")();e.$2=!((d=c.videoData)==null?void 0:d.disableAutoplay);e.props.isInThread&&(e.listeners=new(b("SubscriptionsHandler"))(),e.listeners.addSubscriptions(b("Event").listen(window,"blur",e.$7),b("Event").listen(window,"focus",e.$8)));return e}var d=c.prototype;d.shouldComponentUpdate=function(a){var c=document.getElementById(this.$1.toString()),d=b("FullScreen").isFullScreen();if(c!=null&&d&&c.children[0].children[0]===b("getFullScreenElement")())return!1;d=!!(a.stageDimensions&&a.stageDimensions!==this.props.stageDimensions);d&&(this.$4=this.getCurrentTimePosition(),this.$5=!this.isState(b("VideoPlayerStates").PLAYING));return!this.props.videoData||a.videoData.id!==this.props.videoData.id||d};d.UNSAFE_componentWillReceiveProps=function(a){if(!this.$2)return;this.props.isInThread&&a.isVisible!==this.props.isVisible&&(a.isVisible&&!this.state.forcePause?this.play(new(b("VideoPlayerReasonTransitionHelper"))(b("VideoPlayerReason").VIDEO_VISIBILITY)):this.pause())};d.componentDidMount=function(){this.props.videoData&&this.$9()};d.componentDidUpdate=function(){this.$3.forEach(function(a){return a.abandon()}),this.$3=[],this.props.videoData&&this.$9()};d.componentWillUnmount=function(){this.pause(b("VideoPlayerReason").UNLOADED),this.seek(0),this.$3.forEach(function(a){return a.abandon()}),this.listeners&&this.listeners.release(),this.state.playerAPI&&this.state.playerAPI.detachRootNode(),this.state.playerAPI&&this.state.playerAPI.destroy&&this.state.playerAPI.destroy()};d.isVideoLoaded=function(){var a=!!this.state.playerAPI;!a;return this.isState(b("VideoPlayerStates").FALLBACK)?!1:a};d.isVideoClicked=function(a){return a.target instanceof HTMLElement?a.target.classList.contains(h):!1};d.isRightClick=function(a){a=a||window.event;return a.button===2};d.play=function(a){if(!this.isVideoLoaded())return;this.state.playerAPI&&this.state.playerAPI.play(a)};d.pause=function(a){if(!this.isVideoLoaded())return;this.state.playerAPI&&this.state.playerAPI.pause(a)};d.seek=function(a){if(!this.isVideoLoaded())return;this.state.playerAPI&&this.state.playerAPI.seek(a)};d.getCurrentTimePosition=function(){return this.isVideoLoaded()&&this.state.playerAPI?this.state.playerAPI.getCurrentTimePosition():-1};d.render=function(){var a=this.props.videoData,c=b("React").createElement("div",{ref:"placeholder"},b("React").createElement(b("MessengerSpinner.react"),{color:"blue",size:b("MessengerSpinner.react").large_size})),d={};if(a&&a.url){var e=a.original_dimensions;d.backgroundImage=b("cssURL")(a.url);c=b("React").createElement("div",{ref:"placeholder"},b("React").createElement(b("BackgroundImage.react"),{className:this.props.className,width:e.x,height:e.y,loadingIndicatorStyle:"large",backgroundSize:"cover",ref:"placeholder",style:d,src:a.url}))}return b("React").createElement(b("ShimButton.react"),{className:b("joinClasses")(this.props.className,"_4-od"),id:this.$1,onClick:this.$10,onMouseDown:this.$11,style:d},c)};d.$9=function(){__p&&__p();var a=this,c=this.props.videoData;if(c){var d=c.original_dimensions;this.props.stageDimensions&&(d=b("SpotlightMercurySharedMediaViewer.react").getImageDimensionsForStage(new(b("Vector"))(c.original_dimensions.x,c.original_dimensions.y),this.props.stageDimensions));d=b("XMessagingVideoAttachmentController").getURIBuilder().setString("video_id",c.legacy_attachment_id).setString("video_container_id",this.$1).setInt("width",d.x).setInt("height",d.y).setInt("start_timestamp",this.$4>0?Math.round(this.$4):0).setBool("start_muted",c.start_muted).setBool("no_fullscreen",c.no_fullscreen).setBool("load_player_controller",!0).setBool("hide_controls_on_finish",c.hide_controls_on_finish).setBool("native_thumbnail",c.disableAutoplay).setBool("hide_url_menu_option",Boolean(c.hide_url_menu_option)).setBool("is_share",c.is_share).setBool("render_play_button",this.props.isInThread).getURI();c=this.props.attachment;c&&c.metadata&&c.metadata.pageid&&(d=b("ActorURI").create(d,c.metadata.pageid));var e=new(b("AsyncRequest"))();this.$3.push(e);e.setMethod("GET").setStatusElement(this.refs.placeholder).setURI(d).setRelativeTo(this).setReadOnly(!0).setHandler(function(b){a.$3=a.$3.filter(function(a){return a!==e})}).send()}};d.$12=function(){this.props.isVisible&&this.isState(b("VideoPlayerStates").FINISHED)?(this.seek(0),this.play(b("VideoPlayerReason").LOOP)):this.props.isVisible&&this.isState(b("VideoPlayerStates").PAUSED)&&!this.$6?this.setState({forcePause:!0}):this.isState(b("VideoPlayerStates").PLAYING)&&this.setState({forcePause:!1})};d.onVideoLoaded=function(){var a=this;if(!this.$2)return;this.state.playerAPI&&this.state.playerAPI.addListener("stateChange",function(){return a.$12()});this.props.isVisible&&!this.$5&&!this.state.forcePause?this.play(b("VideoPlayerReason").AUTOPLAY):this.pause();this.$4=-1;this.$5=!1};d.isState=function(a){return!!(this.state.playerAPI&&this.state.playerAPI.isState(a))};return c}(b("React").Component);c.propTypes={attachment:a.object,className:a.string,isInThread:a.bool,isVisible:a.bool,isOnStage:a.bool,stageDimensions:a.instanceOf(b("Vector")),videoData:a.object,onClick:a.func,onSelect:a.func};c.invokeVideoLoaded=function(a,c,d){a.$2=d,c.setAllowCrossPageTransition(!0),c.isState(b("VideoPlayerStates").LOADING)?a.stateChangeListener=c.addListener("stateChange",function(){if(!c.isState(b("VideoPlayerStates").LOADING)){if(a.state&&a.state.playerAPI)return;a.setState({playerAPI:c},a.onVideoLoaded);a.stateChangeListener&&a.stateChangeListener.remove()}}):a.setState({playerAPI:c},a.onVideoLoaded)};e.exports=c}),null);
__d("MessagingForwardAttachmentDialog.react",["BootloadOnRender.react","JSResource","LazyComponent.react","React"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a=function(a){babelHelpers.inheritsLoose(c,a);function c(){return a.apply(this,arguments)||this}var d=c.prototype;d.render=function(){return b("React").createElement(b("BootloadOnRender.react"),{component:b("React").createElement(b("LazyComponent.react"),this.props),loader:b("JSResource")("MessagingForwardAttachmentDialogImpl.react").__setRef("MessagingForwardAttachmentDialog.react"),placeholder:b("React").createElement("div",null)})};return c}(b("React").PureComponent);e.exports=a}),null);
__d("SpotlightMessagesViewerPagers.react",["cx","fbt","LeftRight.react","Link.react","React"],(function(a,b,c,d,e,f,g,h){"use strict";a=function(a){return b("React").createElement(b("LeftRight.react"),null,b("React").createElement(b("Link.react"),{"aria-disabled":a.disablePrevArrow,"aria-label":h._("Tr\u01b0\u1edbc"),className:"_322u"+(a.disablePrevArrow?"":" _2bbb")+" _50-m"},b("React").createElement("div",{className:(a.disablePrevArrow?"":"_4ksl")+(a.disablePrevArrow?"":" _4ksm")})),b("React").createElement(b("Link.react"),{"aria-disabled":a.disableNextArrow,"aria-label":h._("Ti\u1ebfp"),className:"_322u"+(a.disableNextArrow?"":" _2bbc")+" _50-m"},b("React").createElement("div",{className:(a.disableNextArrow?"":"_4ksl")+(a.disableNextArrow?"":" _4kso")})))};e.exports=a}),null);
__d("XMessagingPhotoDownloadController",["XController"],(function(a,b,c,d,e,f){e.exports=b("XController").create("/mercury/attachments/photo/",{photo_id:{type:"String",required:!0}})}),null);
__d("XMessagingShareAttachmentDialogController",["XController"],(function(a,b,c,d,e,f){e.exports=b("XController").create("/mercury/attachments/share/dialog/",{__asyncDialog:{type:"Int"}})}),null);
__d("SpotlightMercurySharedMediaViewer.react",["csx","cx","fbt","invariant","ActorURI","AsyncDialog","AsyncRequest","BootloadedComponent.react","ChatPhotoViewFooterHScroll.react","ChatPhotoViewHeader.react","Event","FunnelLogger","JSResource","KeyEventController","MessagingForwardAttachmentDialog.react","MessengerPhotoInfoDialogContainer.react","MessengerThreadSharedMediaHelper","MessengerVideoPlayer.react","Parent","PhotoUtils","React","SpotlightMessagesViewerPagers.react","SpotlightViewer","SpotlightViewerImage","SpotlightViewport","SubscriptionsHandler","Vector","XMessagingPhotoDownloadController","XMessagingShareAttachmentDialogController"],(function(a,b,c,d,e,f,g,h,i,j){"use strict";__p&&__p();a=b("React").PropTypes;var k=88,l=30,m="WWW_MESSENGER_SHARE_TO_FB_FUNNEL",n="_4-og";c=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){__p&&__p();var c,d;for(var e=arguments.length,f=new Array(e),g=0;g<e;g++)f[g]=arguments[g];return(c=d=a.call.apply(a,[this].concat(f))||this,d.$1=void 0,d.$2=[],d.state={hasPrevPage:!1,hasNextPage:!1,firstPhotoLoaded:!1,isLoading:!1,mediaData:[],numberInOneBatch:l,photoData:null,showForward:!1,showInfo:!1,stageDimensions:new(b("Vector"))()},d.$11=function(){return!d.state.photoData?null:b("React").createElement(b("ChatPhotoViewFooterHScroll.react"),{onScroll:d.$18,photoID:d.state.photoData.node.id,sharedPhotos:d.state.mediaData,updateNumberInOneBatch:d.$19,width:d.state.stageDimensions.x})},d.$19=function(a){d.setState({numberInOneBatch:a})},d.$18=function(a){if(!d.state.mediaData||d.state.isLoading)return;var b=d.state.mediaData.findIndex(function(b){return b.node.legacy_attachment_id===a});if(b<0)return;var c=d.state.mediaData[b];d.setState({photoData:c});d.$22(b)},d.$5=function(a,c){__p&&__p();if(d.state.photoData==null||d.state.isLoading)return;if(c&&!!b("Parent").bySelector(c.target,"._170l"))return;c&&c.target instanceof HTMLElement&&c.target.className===n&&d.$10();c=d.state.mediaData.findIndex(function(a){d.state.photoData!=null||j(0,1033);return a.node.legacy_attachment_id===d.state.photoData.node.legacy_attachment_id});if(c<0||c===d.state.mediaData.length-1&&!d.state.hasNextPage&&a)return;if(c===0&&!a){d.setState({isLoading:!0},function(){return d.$7(d.state.photoData,1,function(b){if(b===0)return;d.$5(a)})});return}var e=a?d.state.mediaData[c+1]:d.state.mediaData[c-1];d.setState({photoData:e});d.$22(c)},d.$10=function(){if(d.props.photoID===null)return;d.setState({photoData:null});d.props.onClosePhotoView()},d.$16=function(){d.setState({showForward:!0})},d.$20=function(){d.setState({showForward:!1})},d.$15=function(){d.setState({showInfo:!0})},d.$21=function(){d.setState({showInfo:!1})},d.$17=function(){d.setState({showForward:!1,showInfo:!1});b("FunnelLogger").appendAction(m,"click");var a=d.state.photoData;if(!d.$14()||!(a&&a.node))return;a=a.node.legacy_attachment_id;var c=b("XMessagingShareAttachmentDialogController").getURIBuilder().getURI();c=new(b("AsyncRequest"))(c).setData({attachment_id:a}).setMethod("POST");b("AsyncDialog").send(c)},d.$23=function(a,b,c){__p&&__p();var e=Object.keys(a)[0];a=a[e].message_shared_media;e=a.page_info;var f=a.edges.length;if(f!==0){var g=d.state.mediaData;switch(b){case 0:d.setState({photoData:a.edges[0],mediaData:[a.edges[0]],firstPhotoLoaded:!0});break;case 1:g=g.concat(a.edges);d.setState({hasNextPage:e.has_next_page,mediaData:g});break;case-1:g=a.edges;g=g.concat(d.state.mediaData);d.setState({mediaData:g,hasPrevPage:e.has_previous_page});break}}d.setState({isLoading:!1});c(f)},d.$3=function(){var a=new(b("Vector"))(b("Vector").getViewportDimensions().x,b("Vector").getViewportDimensions().y-k);return a},c)||babelHelpers.assertThisInitialized(d)}var d=c.prototype;d.getDefaultProps=function(){return{enableShareToFB:!1}};d.componentDidMount=function(){__p&&__p();var a=this;this.setState({isLoading:!0,stageDimensions:this.$3()},function(){return a.$4(a.props.photoID)});this.$1=new(b("SubscriptionsHandler"))();this.$1.addSubscriptions(b("Event").listen(window,"resize",function(){a.setState({stageDimensions:a.$3()})}),b("KeyEventController").registerKey("LEFT",function(){a.$5(!1);return!1}),b("KeyEventController").registerKey("RIGHT",function(){a.$5(!0);return!1}));this.props.enableShareToFB&&b("FunnelLogger").startFunnel(m)};d.UNSAFE_componentWillUpdate=function(a,b){var c=this;b.firstPhotoLoaded!==this.state.firstPhotoLoaded&&this.setState({isLoading:!0},function(){c.$6(b.photoData,b.numberInOneBatch,function(){}),c.$7(b.photoData,b.numberInOneBatch,function(){})});b.numberInOneBatch!=this.state.numberInOneBatch&&!b.isLoading&&this.setState({isLoading:!0},function(){return c.$6(b.mediaData[b.mediaData.length-1],b.numberInOneBatch,function(){})})};d.componentWillUnmount=function(){this.$1&&this.$1.release(),this.$1=null,this.$2.forEach(function(a){return a.abandon()})};d.render=function(){var a=this,c=this.$8(),d=this.state.stageDimensions,e=this.state.isLoading||this.props.useloadingindicator&&!this.state.photoData;if(this.state.photoData==null)return null;var f=this.state.mediaData.findIndex(function(b){a.state.photoData!=null||j(0,1033);return b.node.id===a.state.photoData.node.id});f=b("React").createElement("div",null,this.$9(),this.props.disablepaging?null:b("React").createElement(b("SpotlightMessagesViewerPagers.react"),{disablePrevArrow:f<=0&&!this.state.hasPrevPage,disableNextArrow:!this.state.hasNextPage&&f>=this.state.mediaData.length-1}));return b("React").createElement("span",null,b("React").createElement(b("SpotlightViewer"),{className:"_53vs",onHide:this.$10,open:this.props.photoID!==null,ref:"spotlightViewer",rootClassName:this.props.rootClassName},b("React").createElement(b("SpotlightViewport"),{active:!1,fadeInNOut:!0,media:c,onClick:this.$5,ref:"viewport",showLoadingIndicator:e,stageDimensions:d,useWidth:!0},f),this.$11()),this.$12(),this.$13())};d.$9=function(){if(!this.state.photoData)return null;var a=this.state.photoData;a=a.node.legacy_attachment_id;a=b("XMessagingPhotoDownloadController").getURIBuilder().setString("photo_id",a).getURI();this.props.actorid&&(a=b("ActorURI").create(a,this.props.actorid));return b("React").createElement(b("ChatPhotoViewHeader.react"),{disableForward:this.props.disableForward,enableShareToFB:this.$14(),onClose:this.$10,openInfo:this.$15,ref:"photoviewheader",showForwardDialog:this.$16,showShareDialog:this.$17,url:a})};d.$12=function(){if(!this.state.photoData||!this.state.showForward)return null;var a=i._("Chuy\u1ec3n ti\u1ebfp qua nhi\u1ec1u tin nh\u1eafn ri\u00eang");return b("React").createElement(b("MessagingForwardAttachmentDialog.react"),{attachmentID:this.state.photoData.node.legacy_attachment_id,onClose:this.$20,shown:this.state.showForward,title:a})};d.$13=function(){return this.state.showInfo?b("React").createElement(b("MessengerPhotoInfoDialogContainer.react"),{closeInfo:this.$21,infoOpen:this.state.showInfo,photoID:this.state.photoData.node.id}):b("React").createElement("xhp",null)};d.$14=function(){var a=this.state.photoData;return!a?!1:!!this.props.enableShareToFB&&a.node.__typename==="MessageImage"&&a.node.image1.uri.indexOf(".gif")<0};d.$22=function(a){var b=this,c=this.state.numberInOneBatch,d=this.state.mediaData;a<=c/2?this.setState({isLoading:!0},function(){return b.$7(d[0],c,function(){})}):a>=d.length-c/2&&this.state.hasNextPage&&this.setState({isLoading:!0},function(){return b.$6(d[d.length-1],c,function(){})})};d.$4=function(a){var c=this;a=b("MessengerThreadSharedMediaHelper").search(this.props.threadID,String(a),function(a){return c.$23(a,0,function(){})});this.$2.push(a)};d.$6=function(a,c,d){var e=this;a=b("MessengerThreadSharedMediaHelper").loadMorePrevious(this.props.threadID,a.cursor,c||1,function(a){return e.$23(a,1,d)});this.$2.push(a)};d.$7=function(a,c,d){var e=this;a=a?a.cursor:null;a=b("MessengerThreadSharedMediaHelper").loadMoreLatest(this.props.threadID,a,c||1,function(a){return e.$23(a,-1,d)});this.$2.push(a)};d.$8=function(){__p&&__p();if(this.state.photoData&&this.state.photoData.node){var a=this.state.photoData.node;if(a.__typename&&a.__typename==="MessageVideo")return this.$24();var d=this.state.stageDimensions,e=this.$25(a,d);if(!e)return null;if(a.photo_encodings&&a.photo_encodings.length!==0)return this.$26(a.legacy_attachment_id,e,a.photo_encodings,d);a=c.getImageDimensionsForStage(new(b("Vector"))(e.width,e.height),d);return this.$27(e,a)}else return null};d.$24=function(){return this.state.photoData?b("React").createElement(b("MessengerVideoPlayer.react"),{isOnStage:!0,isVisible:!0,videoData:this.state.photoData.node,stageDimensions:this.state.stageDimensions}):null};d.$27=function(a,c){return b("React").createElement(b("SpotlightViewerImage"),{dimensions:c,ref:"image",src:a.uri})};d.$26=function(a,c,d,e){return b("React").createElement(b("BootloadedComponent.react"),{bootloadLoader:b("JSResource")("SpotlightViewerSphericalPhoto.react").__setRef("SpotlightMercurySharedMediaViewer.react"),bootloadPlaceholder:b("React").createElement("div",null),height:e.y,width:e.x,fbid:a,thumbnail:c.uri,photoEncodings:d,stageDimensions:this.state.stageDimensions})};d.$25=function(a,c){var d=null;a=b("PhotoUtils").getImagesFromData(a);a=a.sort(function(a,b){return a.width==null?b.width==null?0:1:b.width==null?-1:b.width-a.width});window.devicePixelRatio&&window.devicePixelRatio>1&&(c=new(b("Vector"))(c.x*window.devicePixelRatio,c.y*window.devicePixelRatio));for(var e=0;e<a.length;e++)(!d||a[e].width>=c.x||a[e].height>=c.y)&&(d=a[e]);return d};return c}(b("React").Component);c.propTypes={disableForward:a.bool,enableShareToFB:a.bool,onClosePhotoView:a.func,photoID:a.string,rootClassName:a.string,threadID:a.string};c.getImageDimensionsForStage=function(a,c){var d=a.x;a=a.y;var e=c.x;c=c.y;var f=d/a,g=e/c;d>=e||a>=c?g<f?(d=e,a=Math.round(e/f)):g>f?(d=Math.round(c*f),a=c):(d=e,a=c):f<g?d=Math.round(a*f):a=Math.round(d/f);return new(b("Vector"))(d,a)};e.exports=c}),null);
__d("SpotlightMessengerSharedMediaViewer.react",["csx","cx","fbt","invariant","ActorURI","BootloadedComponent.react","Event","JSResource","KeyEventController","MessengerForwardAttachmentDialogReact.bs","MessengerPhotoInfoDialogContainer.react","MessengerPhotoViewBottomBarReact.re","MessengerPhotoViewHeader.react","MessengerPhotoViewHScroll.react","MessengerSharedMediaActions","MessengerVideoPlayer.react","Parent","PhotoUtils","React","ScriptPath","SpotlightMessagesViewerPagers.react","SpotlightViewer","SpotlightViewerImage","SpotlightViewport","SubscriptionsHandler","Vector","XMessagingPhotoDownloadController"],(function(a,b,c,d,e,f,g,h,i,j){"use strict";__p&&__p();var k=b("MessengerForwardAttachmentDialogReact.bs").jsComponent,l=b("MessengerPhotoViewBottomBarReact.re").make;a=b("React").PropTypes;var m=88,n=80,o=30,p="_4-og";c=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){__p&&__p();var c,d;for(var e=arguments.length,f=new Array(e),g=0;g<e;g++)f[g]=arguments[g];return(c=d=a.call.apply(a,[this].concat(f))||this,d.$1=void 0,d.$2=[],d.state={photoData:null,showForward:!1,showInfo:!1,stageDimensions:new(b("Vector"))()},d.$14=function(a){if(!d.props.sharedMedia)return;var b=d.props.sharedMedia.findIndex(function(b){return b.node.legacy_attachment_id===a});if(b<0)return;var c=d.props.sharedMedia[b];d.setState({photoData:c});d.$17(b)},d.$4=function(a,c){__p&&__p();if(d.state.photoData==null)return;var e=d.state.photoData;if(c&&!!b("Parent").bySelector(c.target,"._170l"))return;c&&c.target instanceof HTMLElement&&c.target.className===p&&d.$7();c=d.props.sharedMedia.findIndex(function(a){return a.node.legacy_attachment_id===e.node.legacy_attachment_id});if(c<0||c===d.props.sharedMedia.length-1&&!d.props.hasNextPage&&a)return;if(c===0&&!a){b("MessengerSharedMediaActions").loadMoreLatest(d.props.threadID,d.props.sharedMedia[0].cursor,o);return}a=a?d.props.sharedMedia[c+1]:d.props.sharedMedia[c-1];d.setState({photoData:a});d.$17(c)},d.$7=function(){if(d.props.photoID===null)return;b("ScriptPath").closeOverlayView("spotlight_media_view");d.setState({photoData:null});d.props.onClosePhotoView()},d.$12=function(){d.setState({showForward:!0})},d.$15=function(){d.setState({showForward:!1})},d.$11=function(){d.setState({showInfo:!0})},d.$16=function(){d.setState({showInfo:!1})},c)||babelHelpers.assertThisInitialized(d)}var d=c.prototype;d.componentDidMount=function(){__p&&__p();var a=this,c=this.props.sharedMedia.find(function(b){return b.node.legacy_attachment_id===a.props.photoID});this.setState({photoData:c,stageDimensions:this.$3()});this.$1=new(b("SubscriptionsHandler"))();this.$1.addSubscriptions(b("Event").listen(window,"resize",function(){a.setState({stageDimensions:a.$3()})}),b("KeyEventController").registerKey("LEFT",function(){a.$4(!1);return!1}),b("KeyEventController").registerKey("RIGHT",function(){a.$4(!0);return!1}));b("ScriptPath").openOverlayView("spotlight_media_view",{photoID:this.props.photoID,threadID:this.props.threadID})};d.componentWillUnmount=function(){this.$1&&this.$1.release(),this.$1=null,this.$2.forEach(function(a){return a.abandon()})};d.render=function(){var a=this,c=this.$5(),d=this.state.stageDimensions,e=this.props.useloadingindicator&&!this.state.photoData;if(this.state.photoData==null)return null;var f=this.props.sharedMedia.findIndex(function(b){a.state.photoData!=null||j(0,1033);return b.node.id===a.state.photoData.node.id});f=b("React").createElement("div",null,this.$6(),this.props.disablepaging?null:b("React").createElement(b("SpotlightMessagesViewerPagers.react"),{disablePrevArrow:f<=0&&!this.props.hasPrevPage,disableNextArrow:!this.props.hasNextPage&&f>=this.props.sharedMedia.length-1}));return b("React").createElement("span",null,b("React").createElement(b("SpotlightViewer"),{className:"_53vs",onHide:this.$7,open:this.props.photoID!==null,ref:"spotlightViewer",rootClassName:this.props.rootClassName},b("React").createElement(b("SpotlightViewport"),{active:!1,fadeInNOut:!0,media:c,onClick:this.$4,ref:"viewport",showLoadingIndicator:e,stageDimensions:d,useWidth:!0},f),this.$8()),this.$9(),this.$10())};d.$6=function(){if(!this.state.photoData)return null;var a=this.state.photoData.node.legacy_attachment_id;a=b("XMessagingPhotoDownloadController").getURIBuilder().setString("photo_id",a).getURI();this.props.actorid&&(a=b("ActorURI").create(a,this.props.actorid));return b("React").createElement(b("MessengerPhotoViewHeader.react"),{disableForward:this.props.disableForward,onClose:this.$7,openInfo:this.$11,photoID:this.props.photoID,ref:"photoviewheader",showForwardDialog:this.$12,url:a})};d.$13=function(a){return a?Math.ceil(a/n):o};d.$8=function(){var a=this;if(!this.state.photoData)return null;var c=this.state.photoData,d=b("React").createElement("button",{className:"_2n5b",onClick:function(){return a.props.openAlbum(c.node.legacy_attachment_id)},type:"button"},b("React").createElement("div",{"aria-label":i._("Th\u01b0 vi\u1ec7n \u1ea3nh to\u00e0n m\u00e0n h\u00ecnh"),className:"_3por"}));return b("React").createElement(l,null,b("React").createElement(b("MessengerPhotoViewHScroll.react"),{onScroll:this.$14,photoID:c.node.legacy_attachment_id,sharedPhotos:this.props.sharedMedia,width:this.state.stageDimensions.x}),d)};d.$9=function(){if(!this.state.photoData||this.props.disableForward)return null;var a=i._("Chuy\u1ec3n ti\u1ebfp qua nhi\u1ec1u tin nh\u1eafn ri\u00eang");return b("React").createElement(k,{attachmentID:this.state.photoData.node.legacy_attachment_id,onClose:this.$15,shown:this.state.showForward,title:a})};d.$10=function(){return this.state.showInfo?b("React").createElement(b("MessengerPhotoInfoDialogContainer.react"),{closeInfo:this.$16,infoOpen:this.state.showInfo,photoID:this.state.photoData.node.id}):b("React").createElement("xhp",null)};d.$17=function(a){var c=this.$13(this.state.stageDimensions.x),d=this.props.sharedMedia;a<=c/2?(b("MessengerSharedMediaActions").loadMoreLatest(this.props.threadID,d[0].cursor,c),d.length<c&&this.props.hasNextPage&&b("MessengerSharedMediaActions").loadMorePrevious(this.props.threadID,d[d.length-1].cursor,c)):a>=d.length-c/2&&this.props.hasNextPage&&b("MessengerSharedMediaActions").loadMorePrevious(this.props.threadID,d[d.length-1].cursor,c)};d.$3=function(){var a=new(b("Vector"))(b("Vector").getViewportDimensions().x,b("Vector").getViewportDimensions().y-m);return a};d.$5=function(){__p&&__p();if(this.state.photoData&&this.state.photoData.node){var a=this.state.photoData.node;if(a.__typename&&a.__typename==="MessageVideo")return this.$18();var d=this.state.stageDimensions,e=this.$19(a,d);if(!e)return null;if(a.photo_encodings&&a.photo_encodings.length!==0)return this.$20(a.legacy_attachment_id,e,a.photo_encodings,d);a=c.getImageDimensionsForStage(new(b("Vector"))(e.width,e.height),d);return this.$21(e,a)}else return null};d.$18=function(){return this.state.photoData?b("React").createElement(b("MessengerVideoPlayer.react"),{isVisible:!0,isOnStage:!0,videoData:this.state.photoData.node,stageDimensions:this.state.stageDimensions}):null};d.$21=function(a,c){return b("React").createElement(b("SpotlightViewerImage"),{dimensions:c,ref:"image",src:a.uri})};d.$20=function(a,c,d,e){return b("React").createElement(b("BootloadedComponent.react"),{bootloadLoader:b("JSResource")("SpotlightViewerSphericalPhoto.react").__setRef("SpotlightMessengerSharedMediaViewer.react"),bootloadPlaceholder:b("React").createElement("div",null),height:e.y,width:e.x,fbid:a,thumbnail:c.uri,photoEncodings:d,stageDimensions:this.state.stageDimensions})};d.$19=function(a,c){c=b("PhotoUtils").getImagesFromData(a);return c[c.length-1]};return c}(b("React").Component);c.propTypes={disableForward:a.bool,hasPrevPage:a.bool,hasNextPage:a.bool,onClosePhotoView:a.func,openAlbum:a.func,photoID:a.string,rootClassName:a.string,threadID:a.string,sharedMedia:a.arrayOf(a.object)};c.getImageDimensionsForStage=function(a,c){var d=a.x;a=a.y;var e=c.x;c=c.y;var f=d/a,g=e/c;d>=e||a>=c?g<f?(d=e,a=Math.round(e/f)):g>f?(d=Math.round(c*f),a=c):(d=e,a=c):f<g?d=Math.round(a*f):a=Math.round(d/f);return new(b("Vector"))(d,a)};e.exports=c}),null);
__d("SpotlightMessengerSharedMediaViewerContainer.react",["FluxContainer","MessengerSharedMediaActions","MessengerSharedMediaStore","React","SpotlightMessengerSharedMediaViewer.react"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){return a.apply(this,arguments)||this}c.getStores=function(){return[b("MessengerSharedMediaStore")]};c.calculateState=function(a,c){a=b("MessengerSharedMediaStore").getState();var d=a.sharedMedia.get(c.threadID);a=a.isLoading.get(c.threadID);return{sharedMedia:d,isLoading:a}};var d=c.prototype;d.componentDidMount=function(){b("MessengerSharedMediaActions").loadCurrent(this.props.threadID,this.props.photoID)};d.render=function(){var a=this;if(!this.state.sharedMedia)return null;var c=this.state.sharedMedia&&this.state.sharedMedia.edges.find(function(b){return b.node.legacy_attachment_id===a.props.photoID});return!c?null:b("React").createElement(b("SpotlightMessengerSharedMediaViewer.react"),{disableForward:this.props.disableForward,hasPrevPage:this.state.sharedMedia&&this.state.sharedMedia.has_previous_page,hasNextPage:this.state.sharedMedia&&this.state.sharedMedia.has_next_page,onClosePhotoView:this.props.onClosePhotoView,openAlbum:this.props.openAlbum,photoID:this.props.photoID,rootClassName:this.props.rootClassName,sharedMedia:this.state.sharedMedia&&this.state.sharedMedia.edges,threadID:this.props.threadID})};return c}(b("React").PureComponent);e.exports=b("FluxContainer").create(a,{withProps:!0})}),null);
__d("MessengerThreadSharedPhotos.react",["cx","MessengerSharedPhotosAlbumViewContainer.react","React","SpotlightMessengerSharedMediaViewerContainer.react","SpotlightViewer"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();a=b("React").PropTypes;c=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){var b,c;for(var d=arguments.length,e=new Array(d),f=0;f<d;f++)e[f]=arguments[f];return(b=c=a.call.apply(a,[this].concat(e))||this,c.state={photoView:c.props.findFBID,albumView:""},c.$3=function(a){c.setState({albumView:a,photoView:""})},c.$4=function(){c.setState({albumView:""})},c.$5=function(a){c.setState({albumView:"",photoView:a})},c.$6=function(){c.setState({photoView:""})},c.$7=function(a){c.setState({photoView:a})},b)||babelHelpers.assertThisInitialized(c)}var d=c.prototype;d.componentDidUpdate=function(){!this.state.photoView&&!this.state.albumView&&this.props.onCloseSharedPhotos()};d.render=function(){var a=this.state.photoView?this.$1():null,c=this.state.albumView?this.$2():null;return b("React").createElement("div",null,c,a)};d.$1=function(){return b("React").createElement(b("SpotlightMessengerSharedMediaViewerContainer.react"),{disableForward:!1,onClosePhotoView:this.$6,openAlbum:this.$3,photoID:this.state.photoView,rootClassName:"",threadID:this.props.threadFBID})};d.$2=function(){return b("React").createElement(b("SpotlightViewer"),{className:"_3ode",onHide:this.$4,open:!0,ref:"spotlightViewer"},b("React").createElement(b("MessengerSharedPhotosAlbumViewContainer.react"),{onClick:this.$5,onCloseSharedPhotos:this.props.onCloseSharedPhotos,threadID:this.props.threadFBID,viewedPhoto:this.state.albumView}))};return c}(b("React").Component);c.propTypes={findFBID:a.string,onCloseSharedPhotos:a.func,threadFBID:a.string};e.exports=c}),null);
__d("MessengerThreadSharedPhotosReact.bs",["ReasonReact.bs","MessengerThreadSharedPhotos.react"],(function(a,b,c,d,e,f){"use strict";function a(a,c,d,e){return b("ReasonReact.bs").wrapJsForReason(b("MessengerThreadSharedPhotos.react"),{findFBID:a,onCloseSharedPhotos:c,threadFBID:d},e)}f.make=a}),null);
__d("MessengerVideoPlayerReact.bs",["ReasonReact.bs","bs_js_null_undefined","MessengerVideoPlayer.react"],(function(a,b,c,d,e,f){"use strict";function a(a,c,d,e,f,g,h,i,j,k){return b("ReasonReact.bs").wrapJsForReason(b("MessengerVideoPlayer.react"),{attachment:b("bs_js_null_undefined").fromOption(a),className:b("bs_js_null_undefined").fromOption(c),isInThread:b("bs_js_null_undefined").fromOption(d),isVisible:b("bs_js_null_undefined").fromOption(e),isOnStage:b("bs_js_null_undefined").fromOption(f),stageDimensions:b("bs_js_null_undefined").fromOption(g),videoData:h,onClick:b("bs_js_null_undefined").fromOption(i),onSelect:b("bs_js_null_undefined").fromOption(j)},k)}f.make=a}),null);
__d("MessengerVideoReact.bs",["cx","ix","bs_curry","Image.bs","React","ReasonReact.bs","joinClasses","bs_js_primitive","MessengerPhotoReact.bs","MessengerVideoPlayerReact.bs"],(function(a,b,c,d,e,f,g,h){"use strict";__p&&__p();var i=b("ReasonReact.bs").statelessComponent("MessengerVideo");function j(a){__p&&__p();a=a.metadata;var b;if(a==null||a.fbid==null)b=1;else{var c=window.screen.width>1800&&!(a.large_size==null)&&!(a.large_preview==null),d=a.fbid,e=c?a.large_size:a.inbox_size;e=e==null?{x:0,y:0}:{x:e.width,y:e.height};c=c?a.large_preview:a.inbox_preview;return{legacy_attachment_id:d,original_dimensions:e,start_muted:!0,hide_controls_on_finish:!0,url:c,is_share:!1}}if(b===1)return{legacy_attachment_id:null,original_dimensions:null,start_muted:!0,hide_controls_on_finish:!0,url:null,is_share:!1}}function k(a){var b=a%60,c=b<10;return String(a/60|0)+(":"+((c?"0":"")+String(b)))}function a(a,c,d,e,f,g,l,m){__p&&__p();var n=a!==void 0?a:"",o=function(){var a=c.metadata,d=c.media;d=a==null?d==null?void 0:b("bs_js_primitive").nullable_to_opt(d.duration):b("bs_js_primitive").nullable_to_opt(a.duration);if(d!==void 0)return k(d);else return null},p=function(){if(g!==void 0)return b("bs_curry")._1(g,c);else return 0},q=function(a){var e=a.legacy_attachment_id;if(e==null)return void 0;else return b("bs_js_primitive").some(b("ReasonReact.bs").element(void 0,void 0,b("MessengerVideoPlayerReact.bs").make(b("bs_js_primitive").some(c),b("joinClasses")(n,"_ccq","_4tsk","_3o67",d?"_52mr":"",d?"_1byr":""),!0,f,void 0,void 0,a,p,l,[])))};return[i[0],i[1],i[2],i[3],i[4],i[5],i[6],i[7],function(){var a=j(c);a=q(a);if(a!==void 0)return b("bs_js_primitive").valFromOption(a);else return b("ReasonReact.bs").element(void 0,void 0,b("MessengerPhotoReact.bs").make(b("joinClasses")(n,"_ccq"),c,d,void 0,e,g,[b("ReasonReact.bs").element(void 0,void 0,b("Image.bs").make("_ccr",void 0,void 0,void 0,h("27983"),void 0,void 0,void 0,void 0,[])),b("React").createElement("span",{className:"_ccs"},o(0))]))},i[9],i[10],i[11],i[12]]}c=1800;f.component=i;f.large_window_width=c;f.constructVideoData=j;f.formatDuration=k;f.make=a}),null);
__d("MessengerLivingRoomCTAContainer.react",["fbt","CurrentEnvironment","ErrorBoundary.react","JSResource","MercuryIDs","React","ShortProfiles","gkx","lazyLoadComponent"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();var h=b("lazyLoadComponent")(b("JSResource")("MessengerLivingRoomCTA.react").__setRef("MessengerLivingRoomCTAContainer.react"));a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){var b,c;for(var d=arguments.length,e=new Array(d),f=0;f<d;f++)e[f]=arguments[f];return(b=c=a.call.apply(a,[this].concat(e))||this,c.state={threadType:null,otherUserName:null},b)||babelHelpers.assertThisInitialized(c)}var d=c.prototype;d.componentDidMount=function(){__p&&__p();var a=this,c=this.props.threadID;if(c==null)return;c=b("MercuryIDs").tokenize(c);if(c.type==="thread"){this.setState({threadType:"group"});return}if(c.type!=="user")return;b("ShortProfiles").get(c.value,function(b){a.setState({otherUserName:b.firstName,threadType:"user"})})};d.render=function(){__p&&__p();var a=this.props,c=a.threadID,d=a.isFromViewer;a=a.attachment;var e=this.state,f=e.threadType;e=e.otherUserName;if(!b("gkx")("678647")||a==null||d!=!0||c==null||f==null||f==="user"&&e==null||b("CurrentEnvironment").messengerdotcom)return null;a=a==null?void 0:(d=a.target)==null?void 0:d.video_messenger_cta_payload;d=a==null?void 0:a.cta_type;a=a==null?void 0:(a=a.video)==null?void 0:a.id;if(d!=="CREATE_LIVING_ROOM"||a==null)return null;var i;switch(f){case"user":i=g._("Xem v\u1edbi {name of the other user in the thread}",[g._param("name of the other user in the thread",e)]);break;case"group":i=g._("Xem v\u1edbi nh\u00f3m");break}return i==null?null:b("React").createElement(b("ErrorBoundary.react"),null,b("React").createElement(b("React").Suspense,{fallback:b("React").createElement("div",null)},b("React").createElement(h,{threadFBID:b("MercuryIDs").getThreadFBIDFromThreadID(c),videoID:a,buttonText:i})))};return c}(b("React").Component);e.exports=a}),null);
__d("MessengerXMATextBlock.react",["cx","LineClamp.react","MessengerLivingRoomCTAContainer.react","React","ShimButton.react","joinClasses"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();a=b("React").PropTypes;var h=26;c=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){var b,c;for(var d=arguments.length,e=new Array(d),f=0;f<d;f++)e[f]=arguments[f];return(b=c=a.call.apply(a,[this].concat(e))||this,c.$1=function(){c.props.url&&window.open(c.props.url)},b)||babelHelpers.assertThisInitialized(c)}var d=c.prototype;d.render=function(){if(!this.props)return b("React").createElement("div",{className:"__6j"});var a=this.props.width?{maxWidth:this.props.width-h,textAlign:"left"}:{textAlign:"left"},c={textDecoration:"none"};return b("React").createElement("div",{className:b("joinClasses")(this.props.className,"__6j _43kk _6ude"),style:a},b("React").createElement(b("ShimButton.react"),{form:"link",onClick:this.$1,style:c},this.renderTitle(),this.renderDescription(),this.renderSource()),b("React").createElement(b("MessengerLivingRoomCTAContainer.react"),{threadID:this.props.threadID,isFromViewer:this.props.isFromViewer,attachment:this.props.attachment}))};d.renderTitle=function(){return!this.props.title?null:b("React").createElement("div",{className:"__6k"},b("React").createElement(b("LineClamp.react"),{lines:2,lineHeight:16},this.props.title))};d.renderDescription=function(){if(!this.props.description)return null;var a=this.props.width?{maxWidth:this.props.width-h}:{};return b("React").createElement("div",{className:"__6l",style:a},b("React").createElement(b("LineClamp.react"),{lines:2,lineHeight:15},this.props.description))};d.renderSource=function(){return!this.props.source?null:b("React").createElement("div",{className:"__6m"},b("React").createElement(b("LineClamp.react"),{lines:1,lineHeight:14},this.props.source))};return c}(b("React").Component);c.propTypes={className:a.string,description:a.string,source:a.string,title:a.string,url:a.string,width:a.number,isFromViewer:a.bool,attachment:a.object};e.exports=c}),null);
__d("MessengerXMATextBlockReact.bs",["ReasonReact.bs","bs_js_null_undefined","MessengerXMATextBlock.react"],(function(a,b,c,d,e,f){"use strict";function a(a,c,d,e,f,g,h,i,j,k){return b("ReasonReact.bs").wrapJsForReason(b("MessengerXMATextBlock.react"),{className:b("bs_js_null_undefined").fromOption(a),description:b("bs_js_null_undefined").fromOption(c),source:b("bs_js_null_undefined").fromOption(d),title:b("bs_js_null_undefined").fromOption(e),url:b("bs_js_null_undefined").fromOption(f),width:b("bs_js_null_undefined").fromOption(g),threadID:b("bs_js_null_undefined").fromOption(h),isFromViewer:b("bs_js_null_undefined").fromOption(i),attachment:b("bs_js_null_undefined").fromOption(j)},k)}f.make=a}),null);
__d("MessengerVideoXMAReact.bs",["cx","React","ReasonReact.bs","joinClasses","bs_js_primitive","MessengerVideoPlayerReact.bs","MessengerXMATextBlockReact.bs"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();var h=b("ReasonReact.bs").statelessComponent("MessengerVideoXMA");function i(a){__p&&__p();if(a==null)return null;else{var b=a.width>a.height?a.width:a.height,c=window.screen.width>1800;c=c?640:450;if(b<=c)return{x:a.width,y:a.height};else{c=c/b;b=a.width*c|0;a=a.height*c|0;return{x:b,y:a}}}}function j(a){var b=a.media;a=a.target;if(b==null||a==null||b.image_size==null||a.video_id==null)return void 0;else{var c=b.image_size;return{legacy_attachment_id:a.video_id,original_dimensions:i(c),start_muted:!0,hide_controls_on_finish:!0,url:b.image,is_share:!0}}}function a(a,c,d,e,f,g,i){var k=a!==void 0?a:"",l=function(a){if(a!==void 0)return b("ReasonReact.bs").element(void 0,void 0,b("MessengerVideoPlayerReact.bs").make(b("bs_js_primitive").some(c),b("joinClasses")(k,"_ccq","_4tsk","_3o67","_52mr","_1byr"),!0,d,void 0,void 0,b("bs_js_primitive").valFromOption(a),void 0,e,[]));else return null},m=function(a){return b("ReasonReact.bs").element(void 0,void 0,b("MessengerXMATextBlockReact.bs").make("_2f5n _4br2 _29ew _3dug",b("bs_js_primitive").nullable_to_opt(c.description),b("bs_js_primitive").nullable_to_opt(c.source),b("bs_js_primitive").nullable_to_opt(c.video_title),b("bs_js_primitive").nullable_to_opt(c.uri),a!==void 0?b("bs_js_primitive").valFromOption(a).x:void 0,f,g,b("bs_js_primitive").some(c),[]))};return[h[0],h[1],h[2],h[3],h[4],h[5],h[6],h[7],function(){var a=j(c),d=l(a);return b("React").createElement("div",{className:"_3duc"},d,m(a!==void 0?b("bs_js_primitive").nullable_to_opt(b("bs_js_primitive").valFromOption(a).original_dimensions):void 0))},h[9],h[10],h[11],h[12]]}c=640;d=450;e=1800;f.large_preview_dim=c;f.thumbinail_inbox_dim=d;f.large_window_width=e;f.component=h;f.adjustSize=i;f.constructVideoData=j;f.make=a}),null);
__d("MessengerPhotosGroupReact.bs",["cx","URI","bs_block","bs_curry","React","Utils.bs","ActorURI","bs_belt_Array","LogHistory","MercuryIDs","bs_belt_Option","ReasonReact.bs","joinClasses","bs_js_primitive","bs_caml_primitive","bs_js_null_undefined","MessagesViewerSetID","MessengerPhotoReact.bs","MessengerVideoReact.bs","MercuryAttachmentType","getPageIDFromThreadID","MessengerVideoXMAReact.bs","bs_caml_builtin_exceptions","ChatSpeakingStickerReact.bs","MercuryAttachmentPayload.bs","MessengerAttachmentViewer","MessengerThreadSharedPhotosReact.bs"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();var h="empty-spacer",i=b("LogHistory").getInstance("messenger_photo_group"),j=b("ReasonReact.bs").reducerComponent("MessengerPhotosGroup");function k(a,c,d,e,f,g,k,l,m,n,o,p,q,r){__p&&__p();var s=d!==void 0?d:"",t=function(a){a=a.length;var c=a===2||a===4;return b("joinClasses")(s,"_2n8h",a===1?"_2n8i":"",c?"_4ksk":"",a>1&&!c?"_2n8k":"","_5fk1")},u=function(){__p&&__p();if(l!==void 0){var a=b("bs_js_primitive").valFromOption(l),c=a.thread_fbid;if(c==null)return b("MercuryIDs").getThreadFBIDFromThreadID(a.thread_id);else{var d=b("bs_caml_primitive").caml_string_compare(c,"")===0;if(d)return b("MercuryIDs").getThreadFBIDFromThreadID(a.thread_id);else return c}}else return null},v=function(a,c){var d=u(0);c=c.metadata;c=c==null?null:c.fbid;return b("ReasonReact.bs").element(void 0,void 0,b("MessengerThreadSharedPhotosReact.bs").make(c,function(){return b("bs_curry")._1(a[3],0)},d,[]))},w=function(a){a=JSON.stringify(a);if(a!==void 0)return a;else return""},x=function(d,j,l,s){__p&&__p();var t=j.deduplication_key,v=j.metadata;if(t==null)if(v==null){var x=j.upload_id;x=x==null?"":x}else{v=v.fbid;x=v==null?"":v}else x=t;var y=function(b,a){i.debug("just_open_uri",w(j));return window.open(b)},z;if(!l&&!b("Utils.bs").isSomeTrue(f)){var A=j.metadata;v=0;if(A==null||A.fbid==null)v=1;else{t=j.app_attribution==null;z=t?function(a){i.debug("open_share_view",w(a));return b("bs_curry")._1(d[3],[a])}:function(c){__p&&__p();var d=A;c=c;i.debug("on_child_clicked",w(c));if(b("Utils.bs").isTruthy(c.preview_uploading))return 0;else if(c.attach_type===b("MercuryAttachmentType").VIDEO){var f=d.dimensions;f=f==null?{x:null,y:null}:{x:f.width,y:f.height};b("MessengerAttachmentViewer").renderVideo({pageID:b("bs_js_null_undefined").fromOption(o),rootClassName:"_1j1h",videoID:d.fbid,videoSize:f,videoURI:c.url});return 0}else if(c.attach_type===b("MercuryAttachmentType").PHOTO||c.attach_type===b("MercuryAttachmentType").THIRDPARTYSTICKER||c.attach_type===b("MercuryAttachmentType").ANIMATED_IMAGE){f=a.length===1;var h=c.url;if(!b("Utils.bs").isSomeTrue(g)&&c.attach_type===b("MercuryAttachmentType").PHOTO&&e!==void 0){var j=u(0),k=e===1;j=new(b("URI"))("/ajax/messaging/attachments/sharedphotos.php").setQueryData({thread_id:j,image_id:d.fbid});j=o!==void 0?new(b("ActorURI").create)(j,b("bs_js_primitive").valFromOption(o)):j;j=[b("MessagesViewerSetID").MESSAGES_VIEW_ALL_IN_THREAD,j,k]}else j=[null,h,f];b("MessengerAttachmentViewer").bootstrapWithConfig({actorid:b("bs_js_null_undefined").fromOption(o),dimensions:d.dimensions,disableForward:o!==void 0,disablePaging:j[2],endpoint:j[1],fbid:d.fbid,rootClassName:"_1j1h",setID:j[0],snapToPhoto:!0,src:c.preview_url});return 0}else if(c.uri==null)return 0;else return window.open(c.uri)}}if(v===1){l=j.uri==null;if(l)z=void 0;else{var B=j.uri;z=function(a){return y(B,a)}}}}else{t=j.large_preview_url==null;if(t)z=void 0;else{var C=j.large_preview_url;z=function(a){return y(C,a)}}}v=b("bs_belt_Option").getWithDefault(c,j.attach_type);if(v===b("MercuryAttachmentType").PHOTO||v===b("MercuryAttachmentType").ANIMATED_IMAGE||v===b("MercuryAttachmentType").THIRDPARTYSTICKER)return b("ReasonReact.bs").element(x,void 0,b("MessengerPhotoReact.bs").make(void 0,j,s,k,m,z,[]));else if(v===b("MercuryAttachmentType").VIDEO){l=j.metadata;if(l==null||!b("Utils.bs").isTruthy(l.render_as_sticker))t=1;else{l=l.dimensions;l=l==null?{height:null,width:null}:{height:l.height,width:l.width};var D=j.url;return b("ReasonReact.bs").element(void 0,void 0,b("ChatSpeakingStickerReact.bs").make(D,l,[]))}if(t===1)if(b("Utils.bs").isSomeTrue(g))return b("ReasonReact.bs").element(x,void 0,b("MessengerVideoXMAReact.bs").make(void 0,j,k,n,p,q,[]));else return b("ReasonReact.bs").element(x,void 0,b("MessengerVideoReact.bs").make(void 0,j,s,m,k,z,n,[]))}else if(v===h){D={className:"_4tsk _4rf-"};l=b("bs_js_primitive").nullable_to_opt(j.key);l!==void 0&&(D.key=b("bs_js_primitive").valFromOption(l));return b("React").createElement("div",D)}else throw[b("bs_caml_builtin_exceptions").invalid_argument,v+" is not handled by MessengerPhotosGroup"]},y=function(c,a,d){__p&&__p();if(a.length!==1){var e=a.length===2||a.length===4,f=e?2:3;e=[];var g=[0],i=a.length;while(g[0]<i){var j=b("bs_caml_primitive").caml_int_min(f,i-g[0]|0);j=b("bs_belt_Array").makeBy(f,function(e){return function(j){var i=j<e;if(i)return x(c,a[g[0]+j|0],d,!1);else{i="ghost"+String(f-j|0);j=b("MercuryAttachmentPayload.bs").create(h,b("bs_js_primitive").some(i),new(b("URI"))(""));return x(c,j,d,!1)}}}(j));e.push(b("React").createElement("div",{key:String(g[0]),className:"_2n8g"},j));g[0]=g[0]+f|0}return e}else{j=a[0];return x(c,j,d,!0)}};return[j[0],j[1],j[2],j[3],function(){b("MessengerAttachmentViewer").preload();return 0},j[5],j[6],j[7],function(c){var d=l!==void 0?!(b("getPageIDFromThreadID")(b("bs_js_primitive").valFromOption(l).thread_id)==null):!1;d=y(c,a,d);var e=c[1][0];c=e!==void 0?v(c,b("bs_js_primitive").valFromOption(e)):null;return b("React").createElement("div",{className:t(a),tabIndex:0},c,d)},function(){return[void 0]},j[10],function(c,a){if(c)return b("bs_block").__(0,[[b("bs_js_primitive").some(c[0])]]);else return b("bs_block").__(0,[[void 0]])},j[12]]}a=b("ReasonReact.bs").wrapReasonForJs(j,function(a){return k(a.attachments,b("bs_js_primitive").nullable_to_opt(a.attachType),b("bs_js_primitive").nullable_to_opt(a.className),b("bs_js_primitive").nullable_to_opt(a.count),b("bs_js_primitive").nullable_to_opt(a.isPageMessage),b("bs_js_primitive").nullable_to_opt(a.isXMA),b("bs_js_primitive").nullable_to_opt(a.isVisible),b("bs_js_primitive").nullable_to_opt(a.message),b("bs_js_primitive").nullable_to_opt(a.onAttachmentLoad),b("bs_js_primitive").nullable_to_opt(a.onSelect),b("bs_js_primitive").nullable_to_opt(a.pageID),b("bs_js_primitive").nullable_to_opt(a.threadID),b("bs_js_primitive").nullable_to_opt(a.isFromViewer),[])});c=b("bs_belt_Option").getWithDefault;f.$pipe$unknown=c;f.empty_spacer_type=h;f.history=i;f.component=j;f.make=k;f.jsComponent=a}),null);
__d("MessengerPhotosGroup.react",["MessengerPhotosGroupReact.bs"],(function(a,b,c,d,e,f){"use strict";a=b("MessengerPhotosGroupReact.bs").jsComponent;e.exports=a}),null);
__d("MessengerStickerUtils",["MercuryAttachmentType"],(function(a,b,c,d,e,f){"use strict";function g(a){return!!(a&&a.attach_type===b("MercuryAttachmentType").STICKER)}function h(a){var b=a.attachments;return!!(a.is_like_preview||a.sticker_id||b&&b.length===1&&g(b[0]))}function a(a){return a.size===1&&h(a.first())}e.exports={isStickerMessageGroup:a,isStickerMessage:h,isStickerAttachment:g}}),null);
__d("MessengerVoiceClipAttachment.react",["cx","MercuryAttachmentAudioClip.react","MercuryShareAttachmentRenderLocations","MessengerColors","MessengerCustomColorUtils.bs","MessengerDotComAndInboxM4Check.bs","React"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();a=b("React").PropTypes;c=function(a){babelHelpers.inheritsLoose(c,a);function c(){return a.apply(this,arguments)||this}var d=c.prototype;d.render=function(){var a=this.props.attachment,c=a.metadata.duration/1e3,d=!!a.app_attribution,e={};this.props.customColor&&(b("MessengerDotComAndInboxM4Check.bs").yes?e=babelHelpers["extends"]({backgroundAttachment:"fixed"},b("MessengerColors").makeLinearGradient(this.props.thread.gradient_colors,this.props.thread.solid_color,b("MessengerCustomColorUtils.bs").defaultColor())):e.backgroundColor=this.props.customColor);return b("React").createElement("div",{className:"_hh7"+(b("MessengerDotComAndInboxM4Check.bs").yes?" _6ybn":"")+" _s1-"+(this.props.customColor?" _5sxi":"")+(d?"":" _52mr")+(d?" _mxz":"")+" _1fz8"+(d?" _1-wa":"")+" _1nqp",style:e},b("React").createElement(b("MercuryAttachmentAudioClip.react"),{customColor:this.props.customColor,src:a.url,duration:c,key:"audio:"+this.props.message.message_id,showHelp:!1,width:200,location:b("MercuryShareAttachmentRenderLocations").MESSENGER,rootClassName:"_3czg"+(d?" _4yjw":"")+" _2poz _ui9"}))};return c}(b("React").PureComponent);c.propTypes={attachment:a.object.isRequired,customColor:a.string,message:a.object.isRequired,onUnwrap:a.func,thread:a.object.isRequired};e.exports=c}),null);
__d("XStickerInTrayController",["XController"],(function(a,b,c,d,e,f){e.exports=b("XController").create("/stickers/in_tray/",{pack_id:{type:"Int",required:!0}})}),null);
__d("StickersPackInTray",["Promise","AsyncRequest","XStickerInTrayController","react-relay-deprecated/classic/query/createRelayQuery","react-relay-deprecated/classic/query/RelayQL","react-relay-deprecated/classic/store/RelayStore"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a={onIsPackInTray:function(a,c,d){__p&&__p();c=b("react-relay-deprecated/classic/query/createRelayQuery")(function(){return{children:[{children:[{calls:[{kind:"Call",metadata:{type:"StickerInterfaces"},name:"interface",value:{kind:"CallVariable",callVariableName:"stickerInterface"}},{kind:"Call",metadata:{type:"Int"},name:"first",value:{kind:"CallValue",callValue:1e4}}],children:[{children:[{children:[{fieldName:"id",kind:"Field",metadata:{isRequisite:!0},type:"ID"}],fieldName:"node",kind:"Field",metadata:{canHaveSubselections:!0,inferredRootCallName:"node",inferredPrimaryKey:"id",isRequisite:!0},type:"StickerPack"},{fieldName:"cursor",kind:"Field",metadata:{isGenerated:!0,isRequisite:!0},type:"ID"}],fieldName:"edges",kind:"Field",metadata:{canHaveSubselections:!0,isPlural:!0},type:"PacksInTrayEdge"},{children:[{fieldName:"has_next_page",kind:"Field",metadata:{isGenerated:!0,isRequisite:!0},type:"Boolean"},{fieldName:"has_previous_page",kind:"Field",metadata:{isGenerated:!0,isRequisite:!0},type:"Boolean"}],fieldName:"page_info",kind:"Field",metadata:{canHaveSubselections:!0,isGenerated:!0,isRequisite:!0},type:"PageInfo"}],fieldName:"tray_packs",kind:"Field",metadata:{canHaveSubselections:!0,isConnection:!0},type:"PacksInTrayConnection"}],fieldName:"sticker_store",kind:"Field",metadata:{canHaveSubselections:!0},type:"StickerStore"}],fieldName:"viewer",kind:"Query",metadata:{},name:"StickersPackInTray",type:"Viewer"}}(),{stickerInterface:c});var e=b("react-relay-deprecated/classic/store/RelayStore").readQuery(c);e=e&&e.length>0?e[0]:null;if(e&&e.sticker_store&&e.sticker_store.tray_packs&&e.sticker_store.tray_packs.edges)return new(b("Promise"))(function(b,c){return b({in_sticker_tray:e.sticker_store.tray_packs.edges.filter(function(b){return b.node.id===a}).length>0})}).then(d);var f=b("XStickerInTrayController").getURIBuilder().setInt("pack_id",a).getURI();return new(b("Promise"))(function(a,c){return new(b("AsyncRequest"))(f).setHandler(function(b){return a(b.getPayload())}).setAllowCrossPageTransition(!0).send()}).then(d)}};e.exports=a}),null);
__d("isRetina",[],(function(a,b,c,d,e,f){"use strict";e.exports=function(){return(window.devicePixelRatio||1)>1}}),null);
__d("MessengerAttachmentRenderer",["cx","EmojiSticker.react","MercuryAttachment","MercuryAttachmentType","MercuryAudioType","MercuryIDs","MercuryShareAttachment.react","MercuryShareAttachmentRenderLocations","MessengerErrorAttachment.react","MessengerFileAttachment.react","MessengerFromViewerUtils","MessengerHotLikePreview.react","MessengerHotLikeUtils","MessengerPhotosGroup.react","MessengerStickerUtils","MessengerSupportedEmojiUtils","MessengerVoiceClipAttachment.react","MessengerWebDriverTestIDs","React","Sticker.react","StickerAssetType","StickerConstants","StickerInterfaces","StickersActions","StickersPackInTray","StickersStoreController","StickerUtils","StoryAttachmentStyle","XStickerAssetController","isRetina"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();var h=700,i="sticker:",j="share:",k="_1c_u",l="_3o6m",m=function(a){return a===Object(a)};a={getAttachmentsInsideBubble:function(a,c){var d=this,e=b("MercuryAttachment").get(a).filter(m).filter(function(a){return!d.attachmentShouldAppearOutsideBubble(a)});return this._getAttachmentComponents(e,a,c)},getAttachmentsOutsideBubble:function(a,c,d,e,f){var g=this,h=b("MercuryAttachment").get(a).filter(m).filter(function(a){return g.attachmentShouldAppearOutsideBubble(a)});return this._getAttachmentComponents(h,a,c,d,e,f)},_getAttachmentComponents:function(a,c,d,e,f,g){var h=this,i=this._getPhotosGroup(a.filter(b("MercuryAttachment").isPhotoGroupAttachment),c,d,e);a=a.filter(function(a){return!b("MercuryAttachment").isPhotoGroupAttachment(a)}).map(function(a){return h._getAttachmentComponent(a,c,d,e,f,g)});i&&a.push(i);return a},_getAttachmentComponent:function(a,c,d,e,f,g){__p&&__p();var h=e&&e.customColor,i=e&&e.onUnwrap,j=e&&e.isVisible,k=e&&e.isFromViewer,l=e&&e.isPageMessage;e=e&&e.onSelect;if(b("MessengerStickerUtils").isStickerAttachment(a))return this._getStickerComponent(a,c,h,i,g);if(this.isEmojiLikeAttachment(a))return this._getEmojiLikeAttachment(a,c,i);if(this.isVoiceClip(a))return this._getVoiceClip(a,c,h,i,g);if(this.isFileAttchment(a))return this._getFileComponent(a,c);if(this.isP2P(a)||this.isShareAttachment(a))return this._getShareAttachment(a,c,d,j,k,l,e,f);return this.isErrorAttachment(a)?this._getErrorAttachment(a,c):null},_getStickerComponent:function(a,c,d,e,f){__p&&__p();if(c.is_like_preview)return b("React").createElement(b("MessengerHotLikePreview.react"),{customColor:d,customLike:c.customLike,key:"hlp:"+c.like_preview_since,since:c.like_preview_since,thread:f,location:b("MercuryShareAttachmentRenderLocations").MESSENGER});e=a.metadata;if(!e){e=b("MessengerHotLikeUtils").getMetadataForHotLike(c.sticker_id);if(!e){e={};a=b("StickerUtils").getScaledDimensions(b("StickerConstants").THREAD_SIZE,b("StickerConstants").THREAD_SIZE,b("StickerConstants").THREAD_SIZE);var g=a.height;a=a.width;e.height=g;e.width=a}e.stickerID=c.sticker_id}g=b("XStickerAssetController").getURIBuilder().setInt("sticker_id",e.stickerID);a=null;var h=null;b("isRetina")()?(a=e.paddedSpriteURI2x,h=e.spriteURI2x):(a=e.paddedSpriteURI,h=e.spriteURI);var j=e.stickerID.toString();d=b("React").createElement(b("Sticker.react"),{accessibilityLabel:e.accessibilityLabel,className:"_2poz _ui9",animationTrigger:"hover",customColor:d,frameCount:e.frameCount||1,frameRate:e.frameRate||b("StickerConstants").DEFAULT_FRAME_RATE,framesPerCol:e.framesPerCol||1,framesPerRow:e.framesPerRow||1,key:i+c.message_id,onStickerClick:function(d,a){b("StickersPackInTray").onIsPackInTray(d,b("StickerInterfaces").MESSAGES,function(a){a.in_sticker_tray?(b("StickersActions").selectTrayPack(d),b("StickersActions").showStickerFlyout(c.thread_id)):b("StickersStoreController").showStore(d)})},packID:e.packID&&e.packID.toString(),paddedSpriteURI:a,sourceHeight:e.height,sourceURI:g.setEnum("image_type",b("StickerAssetType").IMAGE).getURI().toString(),sourceWidth:e.width,spriteURI:h,stickerID:j,testID:b("MessengerWebDriverTestIDs").STICKER,thread:f});return d},_getEmojiLikeAttachment:function(a,c,d){d=b("MessengerSupportedEmojiUtils").transferSize(a.size);d=b("MessengerSupportedEmojiUtils").getHotLikeEmojiData(c.body,d)||b("MessengerSupportedEmojiUtils").getHotLikeEmojiDataTransition(c.body,d);if(!d)return this._getErrorAttachment(a,c);a=d.emoji;d=b("React").createElement(b("EmojiSticker.react"),{className:"_2poz _ui9",key:i+c.message_id,emoji:c.body,emojiImage:a,sourceURI:""});return d},_getShareAttachment:function(a,c,d,e,f,g,i,k){var l,m,n=null;c&&c.platform_xmd&&(n=JSON.parse(c.platform_xmd));m=(m=a)!=null?(m=m.share)!=null?(m=m.messenger_ctas)!=null?(m=m[0])!=null?m.page_id:m:m:m:m;l=(l=a)!=null?(l=l.share)!=null?(l=l.target)!=null?(l=l.items)!=null?(l=l[0])!=null?(l=l.call_to_actions)!=null?(l=l[0])!=null?l.page_id:l:l:l:l:l:l:l;m=m||l;l=m?b("MercuryIDs").getParticipantIDFromUserID(m):c.author;return b("React").createElement(b("MercuryShareAttachment.react"),{attachment:a.share,isFromViewer:f,isPageMessage:g,isSponsored:c.is_sponsored,isVisible:!!e,key:j+c.message_id,location:b("MercuryShareAttachmentRenderLocations").MESSENGER,maxWidth:h,messageID:c.message_id,mnMessageType:n&&n.template_type,onComponentLoaded:d,onSelect:i,pageID:l,threadID:c.thread_id,afterDecorators:k,timestamp:c.timestamp,author:c.author})},_getVoiceClip:function(a,c,d,e,f){d=b("MessengerFromViewerUtils").isFromViewer(c)?d||void 0:void 0;return b("React").createElement(b("MessengerVoiceClipAttachment.react"),{thread:f,attachment:a,customColor:d,key:"audio:"+c.message_id,message:c,onUnwrap:function(){e&&e()}})},_getErrorAttachment:function(a,c){return b("React").createElement(b("MessengerErrorAttachment.react"),{attachment:a,key:"error:"+c.message_id})},_getPhotosGroup:function(a,c,d,e){if(!a.length)return null;var f=e&&e.onUnwrap;d=e&&e.isVisible;var g=e&&e.onSelect,h=e&&e.isPageMessage;e=e&&e.pageID;return b("React").createElement(b("MessengerPhotosGroup.react"),{attachments:a,className:"_2poz _52mr _ui9",count:a.length,isPageMessage:h,isVisible:!!d,key:"photos:"+c.message_id,message:c,onSelect:g,onUnwrap:function(){f&&f()},pageID:e})},getVideoElem:function(a,b){b=b.getMessageElement(a);if(!b)return null;a=b.getElementsByClassName(k);return a&&a.length?a[0]:b},getSphericalPhotoElem:function(a,b){b=b.getMessageElement(a);if(!b)return null;a=b.getElementsByClassName(l);return a&&a.length?a[0]:b},_rendersWithoutAttribution:function(a){return a.length!=1||!b("MercuryAttachment").hasAttribution(a[0])},_getFileComponent:function(a,c){return b("React").createElement(b("MessengerFileAttachment.react"),{attachment:a,className:"_2poz",key:"file:"+a.url})},attachmentShouldAppearOutsideBubble:function(a){return b("MessengerStickerUtils").isStickerAttachment(a)||b("MercuryAttachment").isPhotoGroupAttachment(a)||this.isShareAttachment(a)||this.isP2P(a)||this.isVoiceClip(a)||this.isErrorAttachment(a)||this.isEmojiLikeAttachment(a)},isPhotosGroupAttachment:function(a){a=a.props.attachments;return!!a&&a.length>1&&a.some(function(a){return!!a&&b("MercuryAttachment").isPhotoGroupAttachment(a)})},isRenderedShareAttachment:function(a){return!!(a.key&&a.key.startsWith(j))},isFileAttchment:function(a){return a.attach_type===b("MercuryAttachmentType").FILE},isShareAttachment:function(a){return!!(this._isStoryBased(a)&&!this.isP2P(a)&&(a.share.style_list.indexOf(b("StoryAttachmentStyle").SHARE)>-1||a.share.style_list.indexOf(b("StoryAttachmentStyle").FALLBACK)>-1))},isSharedVideoAttachment:function(a){a=a.attach_type===b("MercuryAttachmentType").SHARE&&a.share&&a.share.subattachments&&a.share.subattachments[0];return!!(a&&a.target&&a.target.video_id)},isP2P:function(a){return!!(this._isStoryBased(a)&&a.share.style_list.indexOf(b("StoryAttachmentStyle").ORION)>-1)},_isStoryBased:function(a){return!!(a.attach_type===b("MercuryAttachmentType").SHARE&&a.share&&a.share.style_list)},isEmojiLikeAttachment:function(a){return a.attach_type===b("MercuryAttachmentType").EMOJI_LIKE},isVoiceClip:function(a){a=a.metadata;return!!a&&(!!a.isAudio||a.type===b("MercuryAudioType").AudioClip||a.type===b("MercuryAudioType").VoiceMessageWithTranscript)},isVoiceClipAttachment:function(a){var c=this;a=b("MercuryAttachment").get(a).filter(m).filter(function(a){return c.isVoiceClip(a)});return!!a.length},isP2PAttachment:function(a){var c=this;a=b("MercuryAttachment").get(a).filter(function(a){return m(a)&&c.isP2P(a)});return!!a.length},isSingleVideoAttachment:function(a){a=b("MercuryAttachment").get(a).filter(m).filter(function(a){return b("MercuryAttachment").isVideoAttachment(a)});return a.length===1},isSharedVideoAttachmentMessage:function(a){var c=this;a=b("MercuryAttachment").get(a).filter(m).filter(function(a){return c.isSharedVideoAttachment(a)||c.isGenieSharedVideoAttachment(a)});return a.length===1},isGenieSharedVideoAttachment:function(a){return!!(a.attach_type===b("MercuryAttachmentType").SHARE&&a.share&&a.share.style_list.indexOf(b("StoryAttachmentStyle").GENIE_MESSAGE)>-1&&a.share.target&&a.share.target.attachment&&this.isSharedVideoAttachment(a.share.target.attachment))},isSingleSphericalPhotoAttachment:function(a){a=b("MercuryAttachment").get(a).filter(m);if(a.length!==1)return!1;a=a.filter(function(a){return a.photo_encodings&&a.photo_encodings.length!==0}).length===1;return a},isErrorAttachment:function(a){return a.attach_type===b("MercuryAttachmentType").ERROR}};e.exports=a}),null);
__d("MessengerCodePasteUtils",["cx","BanzaiODS","MessengerBubble.react","MessengerFormattingUtils","React","gkx"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();var h=/`{3,}/,i=3,j=/^\s+/,k=/\s+$/;function a(a){return!!(a&&a.search(h)!==-1)}function l(a,b){__p&&__p();var c=0;if(b-2>=0){c+=a[b-2].trim().length;var d=a[b-2].match(k);d&&(c+=d[0].length)}b-1>=0&&(c+=a[b-1].length+2*i);d=a[b].match(j);d&&(c+=d[0].length);return c}function m(a,b,c){if(a)return a.map(function(a){return Object.assign(Object.assign({},a),{offset:a.offset-b})}).filter(function(a){return 0<=a.offset&&a.offset<c});else return a}function n(a){a=a.split("\n");return a.length===1?{language:"",code:a[0]}:{language:a[0].replace(/[^a-zA-Z]+/g,""),code:a.slice(1).join("\n")}}function o(a){__p&&__p();if(!b("gkx")("678575"))return a.split(h);var c=b("MessengerFormattingUtils").getRanges(a).filter(function(a){return a.formatter===b("MessengerFormattingUtils").formatConfigs.blockquote.formatter||a.formatter===b("MessengerFormattingUtils").formatConfigs.blockcode.formatter}).sort(function(a,b){return a.offset!==b.offset?a.offset-b.offset:b.length-a.length}),d=[],e=0,f=0;for(var g=0;g<c.length;g++){var i=c[g];if(i.offset<f)continue;i.formatter===b("MessengerFormattingUtils").formatConfigs.blockcode.formatter&&(d.push(a.substring(e,i.offset)),d.push(i.innerText),e=i.offset+i.length);f=i.offset+i.length}d.push(a.substring(e));return d}function c(a,c,d,e,f){__p&&__p();a=o(a);var g=[],h=0;for(var i=0;i<a.length;i+=2){var j=a[i].trim();if(j&&j.length>0){h+=l(a,i);var k=c?m(c,h,j.length):c;g.push(b("React").createElement(b("MessengerBubble.react"),{key:i,body:j,customColor:e||void 0,className:"clearfix _3058 _ui9",isFromViewer:f,ranges:k,threadID:d}))}if(i+1<a.length&&a[i+1]){j=n(a[i+1]);k=j.language;j=j.code;b("BanzaiODS").bumpEntityKey("messenger_code_paste","render_bubble");g.push(b("React").createElement("div",{key:i+1,className:"_3058 _wu0 _52mr"},b("React").createElement("div",{ref:"syntaxTarget"+i,className:"language-"+k},j)))}}return g}e.exports={containsCodeBlock:a,getCodeAndMessageBubbles:c}}),null);
__d("MNRTCCallabilityStore",["MessengerDispatcher","RTCCallabilityStore"],(function(a,b,c,d,e,f){"use strict";e.exports=new(b("RTCCallabilityStore"))(b("MessengerDispatcher"))}),null);
__d("shouldNotRenderSegoe",["MessengerConfig","UserAgent"],(function(a,b,c,d,e,f){"use strict";var g=new RegExp("[\u0530-\u05f4\u10a0-\u10ff]"),h=b("UserAgent").isBrowser("Chrome")&&b("UserAgent").isPlatform("Windows 10");e.exports=function(a){return!b("MessengerConfig").SegoeUIDisabled&&h&&g.test(a)}}),null);
__d("MessengerBubble.react",["cx","fbt","invariant","EmojiOnlyMessage.react","FlexLayout.react","MercuryIDs","MercuryMessageBody.react","MercuryMessageRenderLocations","MessageReplyPermissions","MessengerActions","MessengerCodeBubble.react","MessengerColors","MessengerContactActions.bs","MessengerCustomColorUtils.bs","MessengerDecorator","MessengerDotComAndInboxM4Check.bs","MessengerEnvironment","MessengerInnerDecorators.react","MessengerSupportedEmojiUtils","React","RepliedToMessageContent.react","SimpleXUIDialog","goURI","immutable","joinClasses","shouldNotRenderSegoe"],(function(a,b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j=b("MessengerContactActions.bs").actions;a=b("React").PropTypes;var k=0;c=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){__p&&__p();var c,e;for(var f=arguments.length,g=new Array(f),k=0;k<f;k++)g[k]=arguments[k];return(c=e=a.call.apply(a,[this].concat(g))||this,e.state={emojis:void 0},e.$2=function(a,c,f){__p&&__p();switch(a){case j.MESSAGE:e.$3(c,f);break;case j.PROFILE:a=b("MercuryIDs").getParticipantIDFromUserID(c.id);a=e.props.participants&&e.props.participants.get(a);if(a&&a.href){var g=b("MessengerEnvironment").messengerdotcom;g?window.open(a.href):b("goURI")(a.href)}else e.$3(c,f);break;case j.FREE_CALL:d(["FBRTCCore","MNRTCCallabilityStore"],function(a,d){var e=c.id;e||i(0,1247);a.isAvailableForWebrtcCalling(e)||d.isCallable(e)?a.startOutgoingCall(e,"messenger_bubble_free_call",!1):b("SimpleXUIDialog").show(h._("Hi\u1ec7n kh\u00f4ng th\u1ec3 li\u00ean h\u1ec7 v\u1edbi {firstname}.",[h._param("firstname",c.contactName)]),h._("Kh\u00f4ng th\u1ec3 k\u1ebft n\u1ed1i cu\u1ed9c g\u1ecdi"))});break}},c)||babelHelpers.assertThisInitialized(e)}var e=c.prototype;e.componentDidMount=function(){if(!this.props.emojis){var a=this.props.body||"";a=b("MessengerSupportedEmojiUtils").getEmojiOnlyContents(a);a&&a.length&&this.setState({emojis:a})}};e.$1=function(){__p&&__p();if(this.props.message!=null&&this.props.message.thread_id!=null&&this.props.message.tags!=null&&this.props.message.attachments!=null&&this.props.message.attachments.length>0){var a,c,d=this.props.message;a=(a=d.attachments[0].share)==null?void 0:(a=a.target)==null?void 0:a.sender_wec_number;c=(c=d.attachments[0].share)==null?void 0:(c=c.target)==null?void 0:c.sender_wec_number_formated;var e=d.thread_id.replace("user:",""),f=d.tags[k]!=="source:wa_callback",g=this.props.participants!=null&&this.props.participants.last()!=null&&this.props.participants.last().wec_group_participant_count==null;d=(d=d.attachments[0].share)==null?void 0:(d=d.target)==null?void 0:d.sender_wec_name;if(f||e===a||!this.props.wecFirstMessage||g)return null;if(a!=null&&d!=null)if(a===d)return b("React").createElement("div",{className:"_7ox8"},c);else return b("React").createElement("div",{className:"_7ox8"},c,"  ~",d)}return null};e.render=function(){__p&&__p();var a=this,c=!1,d=null;this.state.emojis?d=b("React").createElement(b("EmojiOnlyMessage.react"),{contents:this.state.emojis}):(c=!0,d=b("React").createElement(b("MercuryMessageBody.react"),{ref:this.props.bodyRef,body:this.props.body,className:"_3oh-"+(b("shouldNotRenderSegoe")(this.props.body||"")?" _2por":"")+" _58nk",threadCustomColor:this.props.threadCustomColor,isFromViewer:this.props.isFromViewer,ranges:this.props.ranges,metaRanges:this.props.metaRanges,plainText:this.props.plainText,threadID:this.props.threadID,customLike:this.props.customLike,onContactSelect:this.$2,renderLocation:b("MercuryMessageRenderLocations").MESSENGER}));var e=[],f=[],g=this.props.message,h=!!this.props.isFromViewer;g&&!this.props.excludeAfterDecorators&&(b("MessengerDecorator").getAfterDecorators().forEach(function(b){b.check(g)&&(e.push(b.render(g,h,a.props)),f.push(b.getAdditionalClassNames()))}),b("MessengerDecorator").getBeforeDecorators().forEach(function(a){a.check(g)&&f.push(a.getAdditionalClassNames())}));var i=f.join(" "),j=null;this.props.body&&(this.props.containsCode?j=b("React").createElement(b("MessengerCodeBubble.react"),babelHelpers["extends"]({},this.props,{attachments:this.props.attachments,body:this.props.body,customColor:this.props.customColor,isFromViewer:this.props.isFromViewer,ranges:this.props.ranges||[],threadID:this.props.threadID||""})):j=b("React").createElement("div",{className:"_aok"+(b("MessengerDotComAndInboxM4Check.bs").yes?" _7i2m":""),tabIndex:0,"aria-label":this.props.body},d,this.props.attachments));var k=this.props.repliedToMessage&&b("MessageReplyPermissions").bubbleContainsRepliedToMessage(this.props.repliedToMessage,!!(!this.props.containsCode&&this.state.emojis))?b("React").createElement(b("RepliedToMessageContent.react"),{isFromViewer:this.props.isFromViewer,isLinkified:!0,isMessengerUI:!0,repliedToMessageData:this.props.repliedToMessage,scrollToRepliedMessage:this.props.scrollToRepliedMessage,replyInOneBubble:!0}):null,l=this.props.tooltip||{},m=this.props.isFromViewer&&!this.state.emojis&&!this.props.containsCode,n=b("MessengerDotComAndInboxM4Check.bs").yes&&this.props.thread&&m?babelHelpers["extends"]({backgroundAttachment:"fixed"},b("MessengerColors").makeLinearGradient(this.props.thread.gradient_colors,this.props.thread.solid_color,b("MessengerCustomColorUtils.bs").defaultColor())):{};return b("React").createElement("div",babelHelpers["extends"]({},l,{style:n,className:b("joinClasses")(i,this.props.className,(this.props.containsCode?"":"_hh7")+(b("MessengerDotComAndInboxM4Check.bs")&&!this.props.containsCode?" _6ybn":"")+(this.props.containsCode?" _4qoc":"")+(!this.props.isFromViewer&&this.props.containsCode?" _65sp":"")+(this.props.isFromViewer&&this.props.containsCode?" _65sq":"")+(this.props.containsCode?"":" _s1-")+(!this.props.containsCode&&!this.props.notBubblish?" _52mr":"")+(!this.props.containsCode&&this.props.isP2PAttachment?" _4z55":"")+(!this.props.containsCode&&!!this.state.emojis?" _2f5r":"")+(!this.props.containsCode&&!!this.state.emojis?" _581a":"")+(m?" _43by":"")+(b("MessengerDotComAndInboxM4Check.bs").yes&&m?" _6ybp":"")+(!this.props.containsCode&&c?" _3oh-":"")+(k?" _6uum":""))}),!g||this.props.isPageMessage?null:b("React").createElement(b("MessengerInnerDecorators.react"),{className:"_1z_2",message:g,isFromViewer:!!this.props.isFromViewer,hovered:this.props.isHovered,onReplyToMessage:this.props.onReplyToMessage,messageProps:babelHelpers["extends"]({},this.props,{handleToggleOriginal:this.props.handleToggleOriginal,hasFormatting:this.props.hasFormatting,isShowingOriginal:this.props.plainText}),isSavedView:this.props.isSavedView}),k,this.$1(),j,j?null:d,j?null:this.props.attachments,e.length>1?b("React").createElement(b("FlexLayout.react"),{align:"center",className:"_7moe"},e):e)};e.$3=function(a,c){c&&c.preventDefault();c=b("MercuryIDs").getThreadIDFromUserID(a.id);c&&b("MessengerActions").selectThread(c)};return c}(b("React").PureComponent);c.propTypes={attachments:a.instanceOf(b("immutable").List),body:a.string,customColor:a.string,customLike:a.object,excludeAfterDecorators:a.bool,isFromViewer:a.bool,message:a.object,metaRanges:a.array,notBubblish:a.bool,onUnwrap:a.func,participants:a.object,plainText:a.bool,ranges:a.array,threadID:a.string,threadCustomColor:a.string,onReplyToMessage:a.func,isHovered:a.bool,handleToggleOriginal:a.func,hasFormatting:a.func,isPageMessage:a.bool,isSavedView:a.bool,repliedToMessage:a.object,scrollToRepliedMessage:a.func,thread:a.object,wecFirstMessage:a.bool};e.exports=c}),null);
__d("MessengerCodeBubble.react",["Bootloader","MessengerCodePasteUtils","React","ReactDOM"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){return a.apply(this,arguments)||this}var d=c.prototype;d.componentDidMount=function(){var a=this;b("Bootloader").loadModules(["Prism.Complete"],function(c){for(var d in a.refs){var e=b("ReactDOM").findDOMNode(a.refs[d]);c.highlightElement(e)}},"MessengerCodeBubble.react")};d.render=function(){var a=b("MessengerCodePasteUtils").getCodeAndMessageBubbles(this.props.body,this.props.ranges,this.props.threadID,this.props.customColor,this.props.isFromViewer);return b("React").createElement("div",{className:this.props.className},a)};return c}(b("React").PureComponent);e.exports=a}),null);
__d("MercuryAttachmentAttribution.react",["cx","fbt","Image.react","ImmutableObject","Link.react","React","joinClasses"],(function(a,b,c,d,e,f,g,h){"use strict";__p&&__p();a=b("React").PropTypes;c=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){return a.apply(this,arguments)||this}var d=c.prototype;d.render=function(){var a=this.$1();return!a?null:b("React").createElement("div",{className:b("joinClasses")(this.props.className,"_29ew")},b("React").createElement(b("Image.react"),{src:a.icon_url,className:"_29ex"}),b("React").createElement("span",{className:"_29ey"},a.name),this.$2())};d.$1=function(){return this.props.attachment&&this.props.attachment.app_attribution};d.$2=function(){var a=this.$1();if(!a||!a.metadata)return null;var c="_439n";try{a=JSON.parse(a.metadata)}catch(a){return null}return a.spotify_link?b("React").createElement(b("Link.react"),{className:c,href:a.spotify_link,target:"_blank"},h._("M\u1edf")):null};return c}(b("React").PureComponent);c.propTypes={attachment:a.instanceOf(b("ImmutableObject"))};e.exports=c}),null);
__d("MessengerAttachmentAttribution.react",["cx","ImmutableObject","MercuryAttachmentAttribution.react","React"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();a=b("React").PropTypes;c=function(a){babelHelpers.inheritsLoose(c,a);function c(){return a.apply(this,arguments)||this}var d=c.prototype;d.render=function(){return b("React").createElement(b("MercuryAttachmentAttribution.react"),{attachment:this.props.attachment,className:"_2f5n _4br2"})};return c}(b("React").Component);c.propTypes={attachment:a.instanceOf(b("ImmutableObject"))};e.exports=c}),null);
__d("MessengerBubbleBlock.react",["cx","React"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();a=function(a){babelHelpers.inheritsLoose(c,a);function c(){return a.apply(this,arguments)||this}var d=c.prototype;d.render=function(){return b("React").createElement("div",{className:"_52mr _4h13 _3058"},this.props.children)};return c}(b("React").Component);e.exports=a}),null);
__d("MessengerCollapsedLogMessageGroup.react",["cx","fbt","Link.react","React"],(function(a,b,c,d,e,f,g,h){"use strict";__p&&__p();a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){var b,c;for(var d=arguments.length,e=new Array(d),f=0;f<d;f++)e[f]=arguments[f];return(b=c=a.call.apply(a,[this].concat(e))||this,c.state={collapsed:!0},b)||babelHelpers.assertThisInitialized(c)}var d=c.prototype;d.render=function(){var a=this,c=h._("Xem ho\u1ea1t \u0111\u1ed9ng m\u1edbi nh\u1ea5t"),d=h._("\u1ea8n b\u1edbt ho\u1ea1t \u0111\u1ed9ng");return b("React").createElement("div",{className:"_497p"},b("React").createElement(b("Link.react"),{className:"_4ea1",onClick:function(){return a.setState({collapsed:!a.state.collapsed})}},this.state.collapsed?c:d),this.state.collapsed?null:b("React").createElement("div",null,b("React").createElement("div",{className:"_4ea2"}),this.props.children,b("React").createElement("div",{className:"_4ea2"})))};return c}(b("React").PureComponent);e.exports=a}),null);
__d("MessengerDateBreak.react",["cx","FBLogger","React","formatDate","joinClasses"],(function(a,b,c,d,e,f,g){__p&&__p();a=b("React").PropTypes;c=function(a){"use strict";__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){return a.apply(this,arguments)||this}var d=c.prototype;d.shouldComponentUpdate=function(a){return this.props.date.getTime()!==a.date.getTime()};d.render=function(){try{var a=b("formatDate")(this.props.date,{future:"g:ia",today:"g:ia",withinWeek:"D g:ia",thisYear:"M jS, g:ia",older:"m/d/Y g:ia"});return b("React").createElement("h4",{className:b("joinClasses")(this.props.className,"_497p _2lpt")},b("React").createElement("time",{className:"_3oh-"},a))}catch(a){b("FBLogger")("messaging").mustfix("invalid timestamp: "+this.props.date.getTime());return null}};return c}(b("React").Component);c.propTypes={date:a.instanceOf(Date).isRequired};e.exports=c}),null);
__d("MessengerMessageActionsWrapper.react",["React"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){var b,c;for(var d=arguments.length,e=new Array(d),f=0;f<d;f++)e[f]=arguments[f];return(b=c=a.call.apply(a,[this].concat(e))||this,c.wrapper=null,c.mouseOverListenerAdded=!1,c.$4=function(){c.props.onShowMenu(c.props.message.message_id,!0),c.$2()},c.$3=function(){c.props.onShowMenu(c.props.message.message_id,!1),c.$1()},b)||babelHelpers.assertThisInitialized(c)}var d=c.prototype;d.componentDidMount=function(){this.$1()};d.componentWillUnmount=function(){this.$2()};d.render=function(){var a=this;return b("React").createElement("div",{onMouseLeave:this.$3,className:this.props.className,ref:function(b){return a.wrapper=b}},this.props.children)};d.$1=function(){this.wrapper&&!this.mouseOverListenerAdded&&(this.wrapper.addEventListener("mouseover",this.$4),this.mouseOverListenerAdded=!0)};d.$2=function(){this.wrapper&&this.mouseOverListenerAdded&&(this.wrapper.removeEventListener("mouseover",this.$4),this.mouseOverListenerAdded=!1)};return c}(b("React").Component);e.exports=a}),null);
__d("MessengerMessageSeenHeadsReact.bs",["cx","fbt","cssVar","Image.bs","React","immutable","ReasonReact.bs","joinClasses","MessengerConfig","MercuryTimestamp","MessengerMessage.bs","MercuryAttachment","getViewportDimensions"],(function(a,b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j=b("MessengerConfig").MaxSeenHeadCount;function k(){var a=b("getViewportDimensions")().width;if(a<parseInt("920px".replace("px",""),10))if(j<8)return j;else return 8;else if(a<parseInt("1211px".replace("px",""),10)&&j>=3)return 3;else return j}var l=b("ReasonReact.bs").statelessComponent("MessengerMessageSeenHeadsReact");function m(a,c,d,e,f,g,i){__p&&__p();return[l[0],l[1],l[2],l[3],l[4],l[5],l[6],l[7],function(){__p&&__p();if(b("MessengerMessage.bs").isSending(d)||g.isEmpty()||b("MessengerMessage.bs").hasError(d))return null;else{var i=b("immutable").Seq(g).filter(function(a){a=a.watermark>=d.timestamp&&a.watermark<e;if(a)return!0;else return!1}).sort(function(a,b){return a.action-b.action|0});if(i.isEmpty())return null;else{var l=c?j:k(0),m=i.count()>(l+1|0),n=m?i.slice(0,l):i;n=n.map(function(c,d,a){a=f.get(d);if(a==null)return null;else{c=h._("{full name} \u0111\u00e3 xem l\u00fac {seen time}",[h._param("full name",a.name),h._param("seen time",b("MercuryTimestamp").getPreciseTimestamp(c.action))]);return b("ReasonReact.bs").element(String(d),void 0,b("Image.bs").make("_jf2",c,void 0,void 0,a.image_src,void 0,c,void 0,void 0,[]))}}).toArray();var o=n.length;if(o===0)return null;else{m=m?i.slice(l,void 0).count():0;if(m>0){i=i.slice(l,void 0).map(function(a,b,c){a=f.get(b);if(a==null)return"";else return a.name}).filter(function(a){a=a==="";if(a)return!1;else return!0}).join("\n")+" ";n.unshift(b("React").createElement("span",{key:"overflow",className:"_jf3",title:i},"+"+String(m)))}return b("React").createElement("span",{className:b("joinClasses")(a,"_jf4"+((o+m|0)===1?" _jf5":"")+(b("MercuryAttachment").isSinglePhotoGroupAttachment(d)?" _ba3":""))},n)}}}},l[9],l[10],l[11],l[12]]}a=b("ReasonReact.bs").wrapReasonForJs(l,function(a){return m(a.className,a.isFromViewer,a.message,a.nextTimestamp,a.participants,a.readReceipts,[])});f.maxSeenHeads=j;f.calculateSliceNumber=k;f.component=l;f.make=m;f.jsComponent=a}),null);
__d("MessengerMessage.react",["cssVar","cx","fbt","EmojiLikeUtils","FlexLayout.react","ImmutableObject","MercuryAttachment","MercuryDisplayTimeFilterMessageRenderer","MercuryMessageDeliveryState","MercuryMessageError.react","MercuryTimestamp","MessengerAttachmentAttribution.react","MessengerAttachmentRenderer","MessengerBubble.react","MessengerBubbleBlock.react","MessengerCodePasteUtils","MessengerDecorator","MessengerDotComAndInboxM4Check.bs","MessengerInnerDecorators.react","MessengerMessage.bs","MessengerMessageActionsWrapper.react","MessengerMessageSeenHeadsReact.bs","MessengerSettingsStore","MessengerURIUtils.bs","MessengerVideoAutoplayStore","MNCommerceMessageType","React","SubscriptionsHandler","TooltipData","emptyFunction","getViewportDimensions","gkx","ifRequired","immutable","joinClasses","messengerRTLClasses","shallowEqual"],(function(a,b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j=b("MessengerMessageSeenHeadsReact.bs").jsComponent;a=b("React").PropTypes;function k(a){switch(a){case b("MercuryMessageDeliveryState").SENDING:return i._("\u0110ang g\u1eedi");case b("MercuryMessageDeliveryState").SENT:return i._("\u0110\u00e3 g\u1eedi");case b("MercuryMessageDeliveryState").DELIVERED:return i._("\u0110\u00e3 chuy\u1ec3n");case b("MercuryMessageDeliveryState").ERROR:return i._("L\u1ed7i")}return null}c=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){__p&&__p();var c,d;for(var e=arguments.length,f=new Array(e),g=0;g<e;g++)f[g]=arguments[g];return(c=d=a.call.apply(a,[this].concat(f))||this,d.state={isVisible:!1,plainText:!1,shown:{}},d.$14=function(a){d.messageBody=a},d.$15=function(a){a.stopPropagation(),d.props.onSelect(d.props.message.message_id)},d.$5=function(a,b){var c;d.setState({shown:babelHelpers["extends"]({},d.state.shown,(c={},c[a]=b,c))})},d.$11=function(){d.setState({plainText:!d.state.plainText})},d.$10=function(){d.props.onSelect(d.props.message.message_id)},d.$12=function(){return b("MessengerCodePasteUtils").containsCodeBlock(d.props.message.body)||!!d.messageBody&&d.messageBody.hasFormatting()},c)||babelHelpers.assertThisInitialized(d)}c.calculateState=function(a){return{isVisible:b("MessengerVideoAutoplayStore").isVisible(a.message.thread_id,a.message.message_id)||b("ifRequired")("MessengerSphericalRendererStore",function(b){return b.isVisible(a.message.thread_id,a.message.message_id)},function(){return!1})}};var d=c.prototype;d.componentDidMount=function(){__p&&__p();var a=this;this.setState(c.calculateState(this.props));var d=new(b("SubscriptionsHandler"))();d.addSubscriptions(b("MessengerVideoAutoplayStore").addListener(function(b){b=c.calculateState(a.props);b.isVisible!==a.state.isVisible&&a.setState({isVisible:b.isVisible})}));var e=b("ifRequired")("MessengerSphericalRendererStore",function(a){return a},function(){return null});e&&d.addSubscriptions(e.addListener(function(b){b=c.calculateState(a.props);b.isVisible!==a.state.isVisible&&a.setState({isVisible:b.isVisible})}));this.$1=d};d.componentWillUnmount=function(){this.$1&&this.$1.release()};d.shouldComponentUpdate=function(a,c){return a.isActive!==this.props.isActive||a.isFromViewer!==this.props.isFromViewer||a.message!==this.props.message||a.messageTimestamp!==this.props.messageTimestamp||a.nextTimestamp!==this.props.nextTimestamp||a.showDeliveryState!==this.props.showDeliveryState||a.deliveryTimestamp!==this.props.deliveryTimestamp||!b("immutable").is(a.readReceipts,this.props.readReceipts)||!b("immutable").is(a.participants,this.props.participants)||a.customColor!==this.props.customColor||c.isVisible!==this.state.isVisible||!b("shallowEqual")(c.shown,this.state.shown)||a.onAttachmentLoad!==this.props.onAttachmentLoad};d.render=function(){__p&&__p();var a=this.props,c=a.isActive,d=a.isFromViewer;a=a.message;var e=i._("{time}",[i._param("time",b("MercuryTimestamp").getPreciseTimestamp(a.timestamp))]);e=b("TooltipData").propsFor(e,l(d));var f=[],g=[],h=this.props.message,k=d||!1,m=this.props.scrollToRepliedMessage;h&&!this.props.hideBeforeDecorator&&(b("MessengerDecorator").getBeforeDecorators().forEach(function(a){a.check(h)&&f.push(a.render(h,k,{scrollToRepliedMessage:m}))}),b("MessengerDecorator").getInnerDecorators().forEach(function(a){a.check(h)&&g.push(a.getAdditionalClassNames())}));var n=this.$2(e,this.props.isSavedView===!0),o=this.$3(e,null);o&&(n=this.$2(e,!0));e=!!o&&this.$4();return b("React").createElement(b("MessengerMessageActionsWrapper.react"),{className:b("joinClasses").apply(void 0,["clearfix _o46 _3erg"+(c?" _-5k":"")+(d?" _3i_m":"")+(d?" _nd_":"")+(d?"":" _29_7")+(e?" _q4a":""),b("messengerRTLClasses")(a.body)].concat(g)),message:a,onShowMenu:this.$5,isFromViewer:d},f,n,o,this.$6(),this.$7(),b("React").createElement(j,{className:"_4jzq",isFromViewer:d,message:a,nextTimestamp:this.props.nextTimestamp,participants:this.props.participants,readReceipts:this.props.readReceipts}))};d.$8=function(a){return a.every(function(a){return!a||!b("MessengerAttachmentRenderer").isRenderedShareAttachment(a)})};d.$9=function(){return this.props.message.attachments.length===1&&b("MercuryAttachment").hasAttribution(this.props.message.attachments[0])};d.$3=function(a,c){__p&&__p();var d=this;if(this.props.message!=null&&this.props.message.attachments!=null&&this.props.message.attachments.length>0){c=((c=this.props.message)==null?void 0:(c=c.attachments[0])==null?void 0:(c=c.share)==null?void 0:c.style_list[0])==="wec_message"&&!((c=this.props.message)==null?void 0:(c=c.attachments[0])==null?void 0:(c=c.share)==null?void 0:(c=c.subattachments)==null?void 0:c.length);if(c)return null}if(this.props.message.is_filtered_content)return null;if(this.props.message.commerce_message_type===b("MNCommerceMessageType").RIDE_INTENT)return null;var e=[],f=[],g=this.props.message,h=this.props.isFromViewer||!1;g&&this.props.isSavedView!==!0&&b("MessengerDecorator").getAfterDecorators().forEach(function(a){a.check(g,h)&&(e.push(a.render(g,h,d.props,d.state.shown[d.props.message.message_id])),f.push(a.getAdditionalClassNames()))});c=b("MessengerAttachmentRenderer").getAttachmentsOutsideBubble(this.props.message,this.props.onAttachmentLoad,{customColor:this.props.customColor,isFromViewer:this.props.isFromViewer,isPageMessage:this.props.isPageMessage,isVisible:this.state.isVisible,onSelect:this.$10,onUnwrap:null,pageID:this.props.pageID},e,this.props.thread);if(!c||!c.length)return null;var i=this.$8(c),j=this.props.isPageMessage?null:b("React").createElement(b("MessengerInnerDecorators.react"),{className:i?"_1z_2":"",message:g,isFromViewer:!!this.props.isFromViewer,hovered:this.state.shown[this.props.message.message_id],messageProps:babelHelpers["extends"]({},this.props,{handleToggleOriginal:this.$11,hasFormatting:this.$12,isShowingOriginal:this.state.plainText}),isSavedView:this.props.isSavedView});if(a){var k=c.some(function(a){return!!a&&b("MessengerAttachmentRenderer").isPhotosGroupAttachment(a)});this.$9()&&(c=[b("React").createElement("span",{key:"AttachmentWithAttribution"},c[0],b("React").createElement(b("MessengerAttachmentAttribution.react"),{attachment:new(b("ImmutableObject"))(this.props.message.attachments[0])}))]);c=i?b("React").createElement("div",babelHelpers["extends"]({},a,{className:b("joinClasses").apply(void 0,["_3zvs"+(k?" _2-x3":"")].concat(f))}),c,e.length>1?b("React").createElement(b("FlexLayout.react"),{align:"center",className:"_7moe"},e):e,j):c.map(function(c){return c&&b("React").cloneElement(c,a)})}k=b("MessengerAttachmentRenderer").isSharedVideoAttachmentMessage(this.props.message);k=b("React").createElement("div",{key:"renderedAttachments",className:"_3058 _15gf"+(k?" _3duc":"")},c,g.body||i?null:j);return this.$9()?b("React").createElement(b("MessengerBubbleBlock.react"),null,k):k};d.$13=function(){return b("MessengerAttachmentRenderer").isP2PAttachment(this.props.message)};d.$2=function(a,c){var d=this.props.message,e=b("immutable").List(b("MessengerAttachmentRenderer").getAttachmentsInsideBubble(d,this.props.onAttachmentLoad)),f=d.ranges;d.profile_ranges&&d.profile_ranges.length&&(f=(f||[]).concat(d.profile_ranges.map(function(a){return babelHelpers["extends"]({},a,{url:b("MessengerURIUtils.bs").getURIForUserID(a.id)})})));var g=b("gkx")("844786")?!1:b("MessengerCodePasteUtils").containsCodeBlock(d.body)&&!this.state.plainText;if(d.is_filtered_content)return b("React").createElement("div",{className:"_3058 _wiu _52mr uiBoxYellow clearfix"},b("MercuryDisplayTimeFilterMessageRenderer").renderFilteredContent(d));var h=d.body&&!b("EmojiLikeUtils").isEmojiLike(d);return h||!e.isEmpty()?b("React").createElement(b("MessengerBubble.react"),{thread:this.props.thread,attachments:e,body:d.body,bodyRef:this.$14,className:g?(this.props.isFromViewer?"_3uhm":"")+(this.props.isFromViewer?"":" _3uhn")+(d.isSelected?" _3xsz":""):"_3058 _ui9"+(d.isSelected?" _3xsz":""),containsCode:g,customColor:this.props.isFromViewer?this.props.customColor:"",customLike:d.customLike,excludeAfterDecorators:c,isFromViewer:this.props.isFromViewer,isP2PAttachment:this.$13(),ranges:f,message:d,metaRanges:d.meta_ranges,plainText:this.state.plainText,threadCustomColor:this.props.threadCustomColor||"#0084ff",threadID:d.thread_id,participants:this.props.participants,wecFirstMessage:this.props.wecFirstMessage,isHovered:this.state.shown[d.message_id],onReplyToMessage:this.props.onReplyToMessage,handleToggleOriginal:this.$11,hasFormatting:this.$12,isShowingOriginal:this.state.plainText,isPageMessage:this.props.isPageMessage,isSavedView:this.props.isSavedView,repliedToMessage:this.props.message.replied_to_message,scrollToRepliedMessage:this.props.scrollToRepliedMessage,tooltip:a}):null};d.$7=function(){if(!this.props.isFromViewer||!this.props.showDeliveryState||this.props.message.is_like_preview)return null;var a=b("MessengerMessage.bs").getDeliveryState(this.props.message,this.props.deliveryTimestamp);if(a===b("MercuryMessageDeliveryState").UNKNOWN)return null;var c={};this.props.customColor&&(a===b("MercuryMessageDeliveryState").SENT||a===b("MercuryMessageDeliveryState").SENDING||a===b("MercuryMessageDeliveryState").DELIVERED)&&(c.color=this.props.customColor);var d=k(a);return b("React").createElement("span",{className:"_2her"+(b("MessengerDotComAndInboxM4Check.bs").yes?" _6ybq":"")+(a===b("MercuryMessageDeliveryState").SENDING?" _4jzp":"")+(a===b("MercuryMessageDeliveryState").SENT?" _3zzf":"")+(a===b("MercuryMessageDeliveryState").DELIVERED?" _9ah":"")+(a===b("MercuryMessageDeliveryState").ERROR?" _5ei9":""),style:c,title:d},b("React").createElement("i",{"aria-label":d,"aria-roledescription":i._("Bi\u1ec3u t\u01b0\u1ee3ng tr\u1ea1ng th\u00e1i"),className:"_57e_",role:"img"}))};d.$6=function(){var a=this.props.message;return!b("MessengerMessage.bs").hasError(a)?null:b("React").createElement(b("MercuryMessageError.react"),{className:"_3058 _2ygi",message:a,authorFBID:this.props.authorFBID})};d.$4=function(){var a=this.props.message,b=!1;a&&(b=!!(a.reactions&&Object.keys(a.reactions).length>0));return b};return c}(b("React").Component);c.propTypes={customColor:a.string,deliveryTimestamp:a.number.isRequired,hideBeforeDecorator:a.bool,isActive:a.bool,isFromViewer:a.bool,isPageMessage:a.bool,message:a.object.isRequired,messageTimestamp:a.number,nextTimestamp:a.number.isRequired,onAttachmentLoad:a.func.isRequired,onDeselect:a.func.isRequired,onSelect:a.func.isRequired,onReplyToMessage:a.func,participants:a.instanceOf(b("immutable").Map).isRequired,readReceipts:a.instanceOf(b("immutable").OrderedMap).isRequired,showDeliveryState:a.bool,authorFBID:a.string,threadCustomColor:a.string,pageID:a.string,isSavedView:a.bool,scrollToRepliedMessage:a.func,thread:a.object,wecFirstMessage:a.bool};c.defaultProps={onAttachmentLoad:b("emptyFunction"),threadCustomColor:"#0084ff"};function l(a){return b("getViewportDimensions")().width<=parseInt("700px".replace("px",""),10)||b("MessengerSettingsStore").getSettings().info_sidebar_collapsed&&a?"above":a?"right":"left"}e.exports=c}),null);
__d("MessengerPageAdminNoteList.react",["cx","fbt","LeftRight.react","MessengerBubble.react","PagesMessengerCreatorInfo.react","React","ReactComponentWithPureRenderMixin","classWithMixins","enumerate","immutable","mixin"],(function(a,b,c,d,e,f,g,h){"use strict";__p&&__p();a=b("React").PropTypes;c=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){return a.apply(this,arguments)||this}var d=c.prototype;d.render=function(){var a=this,c=[],d=this.calculateGroups(this.props.notes);d.forEach(function(d,e){c.push(b("React").createElement("li",{className:"_4kd2",key:"group:"+e},a.$MessengerPageAdminNoteList1(d)))});return b("React").createElement("ul",{className:"_4kd3"},c)};d.$MessengerPageAdminNoteList1=function(a){var c=this,d=[];a.forEach(function(e,f){d.push(b("React").createElement("div",{className:"_4kd4",key:"note:"+f},c.$MessengerPageAdminNoteList2(e,a)))});return d};d.$MessengerPageAdminNoteList2=function(a,c){c=b("immutable").List([b("React").createElement(b("LeftRight.react"),{className:"_561k"},b("React").createElement("div",{className:"_561l"},h._("Ghi ch\u00fa ri\u00eang")),b("React").createElement(b("PagesMessengerCreatorInfo.react"),{key:"creator_info",creator_info:c[0].creator_info,isNote:!0}))]);return b("React").createElement("div",{className:"_o46 _3i_m _nd_"},b("React").createElement("div",{className:"clearfix"},b("React").createElement(b("MessengerBubble.react"),{body:a.body.text,attachments:c,className:"_3058 _4kd5"})))};d.calculateGroups=function(a){__p&&__p();var c=[],d=null,e=null;a=b("enumerate")(a);var f;while(!(f=a.next()).done){var g=e&&e.value.creator_info.creatorID===f.value.creator_info.creatorID;g||(d=[],c.push(d));d&&d.push(f.value);e=f}return c};return c}(b("classWithMixins")(b("React").Component,b("mixin")(b("ReactComponentWithPureRenderMixin"))));c.propTypes={notes:a.arrayOf(a.shape({id:a.string,body:a.object.isRequired,creator_info:a.shape({creatorID:a.string.isRequired,creatorName:a.string.isRequired,creatorType:a.string.isRequired,labelType:a.string.isRequired,pageID:a.string.isRequired,profileURI:a.string}),timestamp:a.number.isRequired})).isRequired};e.exports=c}),null);
__d("MessengerRemovedMessageTombstone.react",["cssVar","cx","fbt","MercuryTimestamp","MessengerDecorator","MessengerDotComAndInboxM4Check.bs","MessengerInnerDecorators.react","MessengerMessageActionsWrapper.react","MessengerMessageSeenHeadsReact.bs","MessengerSettingsStore","React","RemovedMessageTombstoneContent","TooltipData","getViewportDimensions","immutable","joinClasses","messengerRTLClasses"],(function(a,b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j=b("MessengerMessageSeenHeadsReact.bs").jsComponent;a=b("React").PropTypes;c=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){var b,c;for(var d=arguments.length,e=new Array(d),f=0;f<d;f++)e[f]=arguments[f];return(b=c=a.call.apply(a,[this].concat(e))||this,c.state={shown:{}},c.$2=function(a,b){c.setState(function(c){return{shown:babelHelpers["extends"]({},c.shown,(c={},c[a]=b,c))}})},b)||babelHelpers.assertThisInitialized(c)}var d=c.prototype;d.render=function(){var a=this.props,c=a.isActive,d=a.isFromViewer;a=a.message;var e=[],f=this.props.message;f&&b("MessengerDecorator").getInnerDecorators().forEach(function(a){a.check(f)&&e.push(a.getAdditionalClassNames())});var g=this.$1();return b("React").createElement(b("MessengerMessageActionsWrapper.react"),{className:b("joinClasses").apply(void 0,["clearfix _o46 _3erg"+(c?" _-5k":"")+(d?" _3i_m":"")+(d?" _nd_":"")+(d?"":" _29_7")+"",b("messengerRTLClasses")(a.body)].concat(e)),message:a,onShowMenu:this.$2},g,b("React").createElement(j,{className:"_4jzq",isFromViewer:d,message:a,nextTimestamp:this.props.nextTimestamp,participants:this.props.participants,readReceipts:this.props.readReceipts}))};d.$1=function(){var a=this.props.message,c=b("RemovedMessageTombstoneContent").getRemovedMessageTombstoneContent(a,this.props.participants),d=this.$3();d=b("TooltipData").propsFor(d,k(this.props.isFromViewer));return b("React").createElement("div",babelHelpers["extends"]({className:"_3058 _ui9"+(a.isSelected?" _3xsz":"")+" _7301 _hh7"+(b("MessengerDotComAndInboxM4Check.bs").yes?" _6ybn":"")+" _s1- _52mr _3oh-"},d||{}),b("React").createElement(b("MessengerInnerDecorators.react"),{className:"_1z_2",message:a,isFromViewer:!!this.props.isFromViewer,hovered:this.state.shown[a.message_id],messageProps:{},isSavedView:!1}),b("React").createElement("div",{className:"_aok",tabIndex:0,"aria-label":c},b("React").createElement("span",null,c)))};d.$3=function(){var a=this.props.message.timestamp,c=this.props.message.removed_timestamp;a=i._("G\u1eedi v\u00e0o: {sent time}",[i._param("sent time",b("MercuryTimestamp").getPreciseTimestamp(a))]);if(!c)return a;c=i._("G\u1ee1 v\u00e0o: {removed time}",[i._param("removed time",b("MercuryTimestamp").getPreciseTimestamp(c))]);return a.toString()+"\n"+c.toString()};return c}(b("React").Component);c.propTypes={isActive:a.bool,isFromViewer:a.bool,message:a.object.isRequired,nextTimestamp:a.number.isRequired,onSelect:a.func.isRequired,participants:a.instanceOf(b("immutable").Map).isRequired,readReceipts:a.instanceOf(b("immutable").OrderedMap).isRequired};function k(a){return b("getViewportDimensions")().width<=parseInt("700px".replace("px",""),10)||b("MessengerSettingsStore").getSettings().info_sidebar_collapsed&&a?"above":a?"right":"left"}e.exports=c}),null);
__d("MessengerMessageGroup.react",["cx","fbt","invariant","BootloadOnRender.react","CurrentUser","Image.react","ImmutableObject","JSResource","LazyComponent.react","Link.react","MercuryIDs","MercuryParticipantSilhouettes","MessengerActions","MessengerContactActions.bs","MessengerEnvironment","MessengerMessage.react","MessengerPageAdminNoteList.react","MessengerParticipants.bs","MessengerProfileImageWrapperReact.bs","MessengerRemovedMessageTombstone.react","MessengerStickerUtils","MessengerTextWithEmoticons.react","MessengerURIUtils.bs","PagesMessengerCreatorInfo.react","React","ReactDOM","SimpleXUIDialog","WorkForeignEntityType","gkx","goURI","immutable","isMessengerMessageRemoved"],(function(a,b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j=b("MessengerContactActions.bs").actions,k=b("MessengerProfileImageWrapperReact.bs").jsComponent;a=b("immutable").List;c=b("immutable").OrderedMap;f=b("React").PropTypes;var l=32,m=new(b("ImmutableObject"))({image_src:b("MercuryParticipantSilhouettes").neutralSilhouette,is_messenger_user:!0,name:""});g=b("React").createClass({displayName:"MessengerMessageGroup",_subscription:null,propTypes:{author:f.string.isRequired,activeMessageID:f.string,deliveryTimestamp:f.number.isRequired,hasDateBreak:f.bool,isCanonical:f.bool,isFromViewer:f.bool,isPageMessage:f.bool,lastReadTimestamp:f.number.isRequired,messages:f.instanceOf(a).isRequired,nextTimestamp:f.number.isRequired,onAttachmentLoad:f.func.isRequired,onMessageDeselect:f.func.isRequired,onMessageSelect:f.func.isRequired,persona:f.object,onReplyToMessage:f.func,readReceipts:f.instanceOf(c).isRequired,thread:f.object,pageID:f.string,scrollToRepliedMessage:f.func},getInitialState:function(){return{participants:{}}},componentDidMount:function(){this._subscription=this._computeParticipants()},shouldComponentUpdate:function(a,c){var d=a.thread,e=this.props.thread;d=Boolean(d&&e&&(d.solid_color!==e.solid_color||d.custom_nickname!==e.custom_nickname));return this.props.activeMessageID!==a.activeMessageID||this.props.isFromViewer!==a.isFromViewer||this.props.deliveryTimestamp!==a.deliveryTimestamp||this.props.lastReadTimestamp!==a.lastReadTimestamp||this.props.onAttachmentLoad!==a.onAttachmentLoad||!b("immutable").is(this.props.messages,a.messages)||this.props.messages!==a.messages||!b("immutable").is(this.props.readReceipts,a.readReceipts)||this.state.participants!==c.participants||d},componentDidUpdate:function(){var a=this,b=n(this.props);!this._subscription&&!b.every(function(b){return a.state.participants[b]})&&(this._subscription=this._computeParticipants())},componentWillUnmount:function(){this._subscription&&b("MessengerParticipants.bs").removeCallback(this._subscription)},render:function(){return b("React").createElement("div",null,b("React").createElement("div",{className:"_1t_p clearfix"+(b("MessengerStickerUtils").isStickerMessageGroup(this.props.messages)?" _5tx1":"")+(this._hasSeenHeadsAtBottom()?" _35fy":"")},this._renderProfileColumn(),b("React").createElement("div",{className:"_41ud"},this._renderName(),this._renderMessages())),this.props.isPageMessage?this._renderNotes():null)},_renderProfileColumn:function(){__p&&__p();var a;if(this.props.isFromViewer)return null;var c=this.props.messages.last();c=this.state.participants[c.author]||m;var d=c.name,e=c.image_src;this.props.persona&&(d=this.props.persona.name,e=this.props.persona.profile_picture_url);var f=h._("{name}",[h._param("name",d)]);a=(a=c)!=null?(a=a.work_foreign_entity_info)!=null?a.type:a:a;a=b("CurrentUser").isWorkUser()&&a===b("WorkForeignEntityType").FOREIGN;a=b("React").createElement(k,{className:"_1t_r",isMessengerUser:c.is_messenger_user,size:l,showBadge:a,isMultiCompany:a,tooltipContent:f},b("React").createElement(b("Image.react"),{alt:d,src:e,height:l,width:l}));if(c.fbid){f=b("MessengerURIUtils.bs").getURIForUserID(c.fbid);!this.props.persona?a=b("React").createElement(b("BootloadOnRender.react"),{loader:b("JSResource")("MessengerAvatarActions.react").__setRef("MessengerMessageGroup.react"),placeholder:this.props.isCanonical?a:b("React").createElement(b("Link.react"),{className:"_5f0v",href:f.toString(),onClick:this._handleContactSelect.bind(this,c),tabIndex:-1},a),component:b("React").createElement(b("LazyComponent.react"),{avatar:a,contact:c,showSendMessageItem:!this.props.isCanonical,onAction:this._handleContactAction})}):this.props.isCanonical||(a=b("React").createElement(b("Link.react"),{className:"_5f0v",href:f.toString(),onClick:this._handleContactSelect.bind(this,c),tabIndex:-1},a))}return b("React").createElement("div",{className:"_1t_q"},a)},_handleContactAction:function(a,c,e){__p&&__p();switch(a){case j.MESSAGE:this._handleContactSelect(c,e);break;case j.PROFILE:a=this.state.participants[c.id];if(a&&a.href){var f=b("MessengerEnvironment").messengerdotcom;f?window.open(a.href):b("goURI")(a.href)}else this._handleContactSelect(c,e);break;case j.FREE_CALL:d(["FBRTCCore","MNRTCCallabilityStore"],function(a,d){var e=c.fbid;e||i(0,1247);a.isAvailableForWebrtcCalling(e)||d.isCallable(e)?a.startOutgoingCall(e,"messenger_group_bubble_free_call",!1):b("SimpleXUIDialog").show(h._("Hi\u1ec7n kh\u00f4ng th\u1ec3 li\u00ean h\u1ec7 v\u1edbi {firstname}.",[h._param("firstname",c.short_name)]),h._("Kh\u00f4ng th\u1ec3 k\u1ebft n\u1ed1i cu\u1ed9c g\u1ecdi"))});break}},_renderMessages:function(){__p&&__p();var a=this,c=this.props.messages.size,d=[];this.props.messages.forEach(function(e,f,g){var h=e.message_id===a.props.activeMessageID,i=b("MercuryIDs").getUserIDFromParticipantID(a.props.author),j=a.props.thread?a.props.thread.solid_color:"",k=a.props.onAttachmentLoad,l=e.timestamp;if(b("isMessengerMessageRemoved")(e)){d.push(b("React").createElement(b("MessengerRemovedMessageTombstone.react"),{isActive:h,isFromViewer:a.props.isFromViewer,key:e.message_id,message:e,participants:b("immutable").Map(a.state.participants),nextTimestamp:a._getNextTimestamp(g,c,f),onSelect:a.props.onMessageSelect,onReplyToMessage:a.props.onReplyToMessage,readReceipts:a.props.readReceipts,ref:e.message_id}));return}d.push(b("React").createElement(b("MessengerMessage.react"),{thread:a.props.thread,customColor:j,deliveryTimestamp:a.props.deliveryTimestamp,isActive:h,isFromViewer:a.props.isFromViewer,isPageMessage:a.props.isPageMessage,key:e.message_id,message:e,messageTimestamp:l,messageActionsWrapper:a.props.messageActionWrapper,onAttachmentLoad:k,participants:b("immutable").Map(a.state.participants),nextTimestamp:a._getNextTimestamp(g,c,f),onDeselect:a.props.onMessageDeselect,onSelect:a.props.onMessageSelect,onReplyToMessage:a.props.onReplyToMessage,readReceipts:a.props.readReceipts,showDeliveryState:e.timestamp>a.props.lastReadTimestamp,ref:e.message_id,authorFBID:i==null?void 0:i,threadCustomColor:j,pageID:a.props.pageID,scrollToRepliedMessage:a.props.scrollToRepliedMessage}));o(a.props.isPageMessage,g,f,e)&&d.push(b("React").createElement(b("PagesMessengerCreatorInfo.react"),{key:"creator_info:"+f,creator_info:e.creator_info}))});return d},_renderNotes:function(){var a=this,c=[];this.props.messages.forEach(function(d,e,f){a.props.isPageMessage&&d.page_admin_notes&&c.push(b("React").createElement(b("MessengerPageAdminNoteList.react"),{key:"notes:"+d.message_id,notes:d.page_admin_notes}))});return c},_renderName:function(){__p&&__p();var a=this.props.messages.first(),c=this.state.participants[a.author];if(!c)return null;if(a.replied_to_message)return null;var d=c.short_name,e=d;if(this.props.thread){var f=this.props.thread.custom_nickname?this.props.thread.custom_nickname:null;c=b("MercuryIDs").getUserIDFromParticipantID(c.id);f&&c&&f[c]&&(d=f[c],e=b("React").createElement(b("MessengerTextWithEmoticons.react"),{renderEmoticons:!0,renderEmoji:!0,text:f[c]}))}if(this.props.persona){f=this.state.participants[a.author];e=f?h._("{persona name} t\u1eeb {page name}",[h._param("persona name",this.props.persona.name),h._param("page name",f.short_name)]):this.props.persona.name;d=e.toString()}return b("React").createElement("h5",{"aria-label":d,className:"_ih3"+(this.props.isFromViewer?" accessible_elem":"")+(this.props.isCanonical&&!this.props.persona?" _-ne":"")},e)},getMessageElement:function(a){return b("ReactDOM").findDOMNode(this.refs[a])},_hasSeenHeadsAtBottom:function(){var a=this.props,b=a.messages,c=a.nextTimestamp;a=a.readReceipts;var d=b.last().timestamp,e=0;a.forEach(function(a){if(a>=d&&a<c&&++e===2)return!1});return e===2},_getNextTimestamp:function(a,b,c){return c<b-1?a.get(c+1).timestamp:this.props.nextTimestamp},_handleContactSelect:function(a,c){c&&c.preventDefault();c=b("MercuryIDs").getThreadIDFromParticipantID(a.id);c&&b("MessengerActions").selectThread(c)},_computeParticipants:function(){__p&&__p();var a=this,c=n(this.props),d={},e=[];c.forEach(function(a){var c=b("MessengerParticipants.bs").getNow(a);d[a]=c;c||e.push(a)});this.setState({participants:d});return e.length>0?b("MessengerParticipants.bs").getMulti(e,function(c){var b=Object.assign({},a.state.participants);e.forEach(function(a){b[a]=c[a]});a._subscription=null;a.setState({participants:b})}):null}});function n(a){var b=[a.messages.first().author];a.readReceipts.forEach(function(a,c){return b.push(c)});return b}function o(a,b,c,d){if(!a||!d.creator_info)return!1;if(c===b.size-1)return!0;a=b.get(c+1).creator_info;return!a?!0:d.creator_info.creatorID!==a.creatorID}e.exports=g}),null);
__d("MessengerBubbleReact.re",["react","MessengerBubble.react","ReasonReact.bs"],(function(a,b,c,d,e,f){function a(a){return b("react").createElement(b("MessengerBubble.react"),a)}f.MessengerBubbleTypeChecked=a;c=function(a,c,d,e){return b("ReasonReact.bs").wrapJsForReason(b("MessengerBubble.react"),{attachments:a,body:c,className:d},e)};f.make=c}),null);
__d("MercuryTypingAnimationReact.bs",["cx","React","ReasonReact.bs","joinClasses"],(function(a,b,c,d,e,f,g){"use strict";var h=b("ReasonReact.bs").statelessComponent("MercuryTypingAnimationReact");function a(a,c){return[h[0],h[1],h[2],h[3],h[4],h[5],h[6],h[7],function(){return b("React").createElement("div",{className:b("joinClasses")("_4a0v _1x3z",a!==void 0?a:"")},b("React").createElement("div",{className:"_4b0g"},b("React").createElement("div",{className:"_5pd7"}),b("React").createElement("div",{className:"_5pd7"}),b("React").createElement("div",{className:"_5pd7"})))},h[9],h[10],h[11],h[12]]}f.component=h;f.make=a}),null);
__d("MessengerTypingIndicatorReact.bs",["cx","bs_block","bs_curry","Image.bs","React","bs_caml_obj","immutable","MercuryIDs","bs_belt_Option","CurrentUser","ReasonReact.bs","bs_js_primitive","MessengerPersonas.bs","MessengerParticipants.bs","WorkForeignEntityType","MessengerBubbleReact.re","MercuryTypingAnimationReact.bs","MessengerProfileImageWrapperReact.bs"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();var h=b("ReasonReact.bs").reducerComponent("MessengerTypingIndicatorReact");function a(a,c,d,e){__p&&__p();var f=function(c,a){return b("bs_js_primitive").nullable_to_opt(b("MessengerParticipants.bs").getMulti([a],function(d){b("bs_curry")._1(c[3],b("bs_block").__(0,[b("bs_js_primitive").undefined_to_opt(d[a])]));return 0}))},g=function(){if(c==null)return void 0;else{var a=b("MercuryIDs").getUserIDFromParticipantID(c);if(a==null)return void 0;else return b("bs_js_primitive").nullable_to_opt(b("MessengerPersonas.bs").getNow(a))}};return[h[0],h[1],h[2],h[3],function(a){var d=a[1][0];if(d!==void 0||c==null)return 0;else{d=b("MessengerParticipants.bs").getNow(c);if(d==null)return b("bs_curry")._1(a[3],b("bs_block").__(1,[f(a,c)]));else return b("bs_curry")._1(a[3],b("bs_block").__(0,[d==null?void 0:b("bs_js_primitive").some(d)]))}},function(a){__p&&__p();a=a[1];var d=a[1][1][0],e=a[1][0];if(d!==void 0)return 0;else{if(e!==void 0&&(c==null||b("bs_caml_obj").caml_equal(b("bs_js_primitive").valFromOption(e).id,c)))return 0;else d=1;if(d===1)if(c==null)return 0;else return b("bs_curry")._1(a[3],b("bs_block").__(1,[f(a,c)]))}},function(a){a=a[1][1][0];if(a!==void 0)return b("MessengerParticipants.bs").removeCallback(b("bs_js_primitive").valFromOption(a));else return 0},h[7],function(c){__p&&__p();var d=g(0);if(c[1][0]===void 0&&d===void 0)return null;else{var e=c[1][0];d=d!==void 0?b("bs_js_primitive").valFromOption(d).profile_picture_url:e!==void 0?b("bs_js_primitive").nullable_to_opt(b("bs_js_primitive").valFromOption(e).image_src):void 0;e=b("bs_belt_Option").flatMap(b("bs_belt_Option").flatMap(c[1][0],function(a){return b("bs_js_primitive").nullable_to_opt(a.work_foreign_entity_info)}),function(a){return b("bs_js_primitive").some(a.type)});e=e!==void 0?b("CurrentUser").isWorkUser()&&b("bs_caml_obj").caml_equal(b("bs_js_primitive").valFromOption(e),b("WorkForeignEntityType").FOREIGN):!1;c=c[1][0];return b("React").createElement("div",{className:"_1t_p _1hbw"},b("React").createElement("div",{className:"_1t_q"},b("ReasonReact.bs").element(void 0,void 0,b("MessengerProfileImageWrapperReact.bs").make(void 0,void 0,c!==void 0?b("bs_js_primitive").valFromOption(c).is_messenger_user:!1,void 0,void 0,void 0,void 0,32,void 0,"_1t_r",e,[d!==void 0?b("ReasonReact.bs").element(void 0,void 0,b("Image.bs").make(void 0,"",void 0,void 0,d,32,void 0,32,void 0,[])):b("ReasonReact.bs").element(void 0,void 0,b("Image.bs").make(void 0,"",void 0,void 0,void 0,32,void 0,32,void 0,[]))]))),b("React").createElement("div",{className:"_41ud"},b("React").createElement("div",{className:"_o46 _3erg _29_7"},b("ReasonReact.bs").element(void 0,a,b("MessengerBubbleReact.re").make(b("immutable").List([b("ReasonReact.bs").element("animation",void 0,b("MercuryTypingAnimationReact.bs").make(void 0,[]))]),"","_3058",[])))))}},function(){return[c==null?void 0:b("bs_js_primitive").nullable_to_opt(b("MessengerParticipants.bs").getNow(c)),[void 0]]},h[10],function(a,c){if(a.tag){c[1][0]=a[0];return 0}else{c[1][0]=void 0;return b("bs_block").__(0,[[a[0],c[1]]])}},h[12]]}c=32;f.component=h;f.cIMAGE_SIZE=c;f.make=a}),null);
__d("MessengerTypingIndicatorReact.re",["bs_curry","MessengerTypingIndicatorReact.bs","ReasonReact.bs"],(function(a,b,c,d,e,f){a=b("ReasonReact.bs").wrapReasonForJs(b("MessengerTypingIndicatorReact.bs").component,function(a){return b("bs_curry")._4(b("MessengerTypingIndicatorReact.bs").make,a.setBubbleRef,a.userID,a.showName,a.children)});f.component=a;f["default"]=a}),null);
__d("MessageList.react",["cx","CurrentUser","MercuryActionType","MercuryIDs","MercuryLogMessageType","MercuryMessageGroup","MercuryShareAttachmentRenderLocations","MessagingGenericAdminTextType","MessengerCallLogEvent","MessengerDomIDs.bs","MessengerGrowthNewFriendBumpSubtype","MessengerLightweightActionUtils","MessengerMessage.bs","MessengerParticipantUtils.bs","MessengerPresenceProvider.bs","PagesMessageListGreeting.react","React","ReactDOM","gkx","immutable","nullthrows","requireCond","cr:832269"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();var h=b("MessengerDomIDs.bs").ids,i=b("MessengerPresenceProvider.bs").jsComponent;a=b("React").PropTypes;var j=2,k=1e3*60*60,l=6,m=function(a){__p&&__p();var c;c=(c=a)!=null?(c=c.log_message_data)!=null?c.message_type:c:c;switch(c){case b("MessagingGenericAdminTextType").GROUP_POLL:return(c=a)!=null?(c=c.log_message_data)!=null?(c=c.untypedData)!=null?c.question_id:c:c:c;case b("MessagingGenericAdminTextType").INSTANT_GAME_UPDATE:return(c=a)!=null?(c=c.log_message_data)!=null?(c=c.untypedData)!=null?c.game_id:c:c:c;case b("MessagingGenericAdminTextType").LIGHTWEIGHT_EVENT_CREATE:case b("MessagingGenericAdminTextType").LIGHTWEIGHT_EVENT_UPDATE:case b("MessagingGenericAdminTextType").LIGHTWEIGHT_EVENT_DELETE:case b("MessagingGenericAdminTextType").LIGHTWEIGHT_EVENT_UPDATE_TIME:case b("MessagingGenericAdminTextType").LIGHTWEIGHT_EVENT_UPDATE_TITLE:case b("MessagingGenericAdminTextType").LIGHTWEIGHT_EVENT_UPDATE_LOCATION:case b("MessagingGenericAdminTextType").LIGHTWEIGHT_EVENT_NOTIFY_BEFORE_EVENT:case b("MessagingGenericAdminTextType").LIGHTWEIGHT_EVENT_NOTIFY:case b("MessagingGenericAdminTextType").LIGHTWEIGHT_EVENT_RSVP:return(c=a)!=null?(c=c.log_message_data)!=null?(c=c.untypedData)!=null?c.event_id:c:c:c;case b("MessagingGenericAdminTextType").CONFIRM_FRIEND_REQUEST:c=((c=a)!=null?(c=c.log_message_data)!=null?(c=c.untypedData)!=null?c.friend_request_subtype:c:c:c)||((c=a)!=null?(c=c.log_message_data)!=null?(c=c.untypedData)!=null?c.subtype:c:c:c);return!c||c.toLowerCase()!==b("MessengerGrowthNewFriendBumpSubtype").ICEBREAKER?null:p(a);case b("MessagingGenericAdminTextType").MESSENGER_ICEBREAKER_VOTE_CAST:return p(a);default:return null}},n=function(a){return b("MessengerLightweightActionUtils").isLWAMessage(a)?"lwa":null};c=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){var b,c,d;for(var e=arguments.length,f=new Array(e),g=0;g<e;g++)f[g]=arguments[g];return(c=d=a.call.apply(a,[this].concat(f))||this,d.state={activeMessageID:null,messageGroups:[],prevMessages:null,newMessagesGroupIndex:Infinity,lastReadTimestamp:((b=d.props.thread)==null?void 0:b.last_read_timestamp)||Infinity,newMessagesCountForDisplay:0},d.$5=function(a){d.setState(function(b){return{activeMessageID:b.activeMessageID===a?null:b.activeMessageID}})},d.$6=function(a){d.setState({activeMessageID:a})},c)||babelHelpers.assertThisInitialized(d)}c.getDerivedStateFromProps=function(a,c){__p&&__p();if(c.prevMessages!==a.messages)if(b("cr:832269")!=null){var d=c.lastReadTimestamp;c=a.location;var e=a.messages,f=a.thread,g=b("MercuryIDs").getParticipantIDFromUserID(b("CurrentUser").getID());(f==null?void 0:f.snippet_sender)===g&&(d=Infinity);f=e.findLast(function(a){return a.author===g});f&&f.timestamp>d&&(d=f.timestamp);f=a.messages.filter(function(a){return a.timestamp<=d});var h=a.messages.filter(function(a){return a.timestamp>d});f=b("MercuryMessageGroup").calculateMessageGroups(f,c);c=b("MercuryMessageGroup").calculateMessageGroups(h,c);h=h.filter(function(a){return a.log_message_type==null}).size;return{messageGroups:[].concat(f,c),prevMessages:e,newMessagesGroupIndex:f.length,newMessagesCountForDisplay:h,lastReadTimestamp:d}}else return{messageGroups:b("MercuryMessageGroup").calculateMessageGroups(a.messages,a.location),prevMessages:a.messages};else return null};var d=c.prototype;d.render=function(){__p&&__p();var a=this,c=this.props,d=c.DateBreak,e=c.forGameChat,f=c.location,g=c.MessageGroup,p=c.CollapsedLogMessageGroup,u=[],v=[],w;c=this.props.thread&&this.props.thread.solid_color;var x=c?{backgroundColor:c}:null,y=this.state.activeMessageID,z=this.state.messageGroups,A=z.length,B=this.props.readReceipts;c=B.last();var C=c?c.watermark:0,D=b("MercuryIDs").getParticipantIDFromUserID(this.props.viewer),E={};for(var c=this.props.messages.size-1;c>=0;c--){var F=this.props.messages.get(c),G=m(F)||n(F);G&&!E[G]&&(E[G]=F.message_id)}var H=function(h){__p&&__p();var m=h>0?z[h-1]:null;m=m&&m.length>0?m[m.length-1]:null;var H=z[h],K=H[0],L=H[H.length-1],M=!1;b("cr:832269")!=null&&h>0&&h===a.state.newMessagesGroupIndex&&a.state.newMessagesCountForDisplay>0&&u.push(b("React").createElement("div",{ref:"newMessageDivider",key:"new-message-divider"},b("React").createElement(b("cr:832269"),{newMessagesCount:a.state.newMessagesCountForDisplay})));if(!m||K.timestamp-m.timestamp>k){M=!0;m=b("React").createElement(d,{date:new Date(K.timestamp),key:"db:"+K.message_id,ref:"db:"+K.message_id});v.length===0&&u.push(m)}m=n(K);if(m&&E[m]!==K.message_id){m=a.$1(K,E);u.push(m);return"continue"}if(K.action_type==b("MercuryActionType").LOG_MESSAGE){m=(G=K)!=null?(G=G.log_message_data)!=null?G.message_type:G:G;var N=(F=K)!=null?(F=F.log_message_data)!=null?(F=F.untypedData)!=null?F.friend_request_subtype:F:F:F,O=m===b("MessagingGenericAdminTextType").PARTIES_PRESENCE,P=m===b("MessagingGenericAdminTextType").INSTANT_GAME_UPDATE,Q=m===b("MessagingGenericAdminTextType").GROUP_POLL;N=m===b("MessagingGenericAdminTextType").MESSENGER_ICEBREAKER_VOTE_CAST||m===b("MessagingGenericAdminTextType").CONFIRM_FRIEND_REQUEST&&N&&N.toLowerCase()===b("MessengerGrowthNewFriendBumpSubtype").ICEBREAKER;var R=[b("MessagingGenericAdminTextType").LIGHTWEIGHT_EVENT_CREATE,b("MessagingGenericAdminTextType").LIGHTWEIGHT_EVENT_UPDATE,b("MessagingGenericAdminTextType").LIGHTWEIGHT_EVENT_DELETE,b("MessagingGenericAdminTextType").LIGHTWEIGHT_EVENT_UPDATE_TIME,b("MessagingGenericAdminTextType").LIGHTWEIGHT_EVENT_UPDATE_TITLE,b("MessagingGenericAdminTextType").LIGHTWEIGHT_EVENT_UPDATE_LOCATION,b("MessagingGenericAdminTextType").LIGHTWEIGHT_EVENT_NOTIFY_BEFORE_EVENT,b("MessagingGenericAdminTextType").LIGHTWEIGHT_EVENT_NOTIFY,b("MessagingGenericAdminTextType").LIGHTWEIGHT_EVENT_RSVP].includes(m);if((f===b("MercuryShareAttachmentRenderLocations").CHAT||f===b("MercuryShareAttachmentRenderLocations").MESSENGER)&&(K.log_message_type===b("MercuryLogMessageType").VIDEO_CALL||K.log_message_type===b("MercuryLogMessageType").PHONE_CALL||m===b("MessagingGenericAdminTextType").MESSENGER_CALL_LOG&&(((c=K)!=null?(c=c.log_message_data)!=null?(c=c.untypedData)!=null?c.event:c:c:c)===b("MessengerCallLogEvent").MISSED_CALL||((J=K)!=null?(J=J.log_message_data)!=null?(J=J.untypedData)!=null?J.event:J:J:J)===b("MessengerCallLogEvent").ONE_ON_ONE_CALL_ENDED||b("gkx")("678642")))){m=a.$2(K,D,z,A,h,B,C,L,E);u.push(m)}else{m=a.$3(K,E);w=K.message_id;!P&&!Q&&!R&&!N&&v.push(m);if(O&&b("gkx")("678643"))return"continue";(v.length===H.length||P||Q||R||N)&&(a.$4(v,u,w,x,p),v=[]);(P||Q||R||N)&&u.push(m)}return"continue"}H=b("immutable").List(H);var S=q(z,A,h,E),T=!s(B,H,S),U=r(C,L),V=t(a.props.deliveryTimestamp,L),W=H.first().author,X=b("MessengerMessage.bs").getPersona(L),Y=D===K.author;O=Y?0:l+j;var Z=a.props.maxBubbleWidth?a.props.maxBubbleWidth-O:null;u.push(b("React").createElement(i,{subscribeToIDs:W?[W]:null,key:"pp:"+K.message_id},function(c){return b("React").createElement(g,{activeMessageID:o(y,H),author:W,deliveryTimestamp:V,forGameChat:e,hasDateBreak:M,isCanonical:a.props.isCanonical,isFromViewer:Y,isPageMessage:a.props.isPageMessage,isOnline:W?b("MessengerParticipantUtils.bs").has(c,W):!1,lastReadTimestamp:U,maxBubbleWidth:Z,messages:H,nextTimestamp:S,onAttachmentLoad:a.props.onAttachmentLoad,onMessageDeselect:a.$5,onMessageSelect:a.$6,onStickerClick:a.props.onStickerClick,onReplyToMessage:a.props.onReplyToMessage,pageID:a.props.isPageMessage===!0?a.props.viewer:null,persona:b("gkx")("678634")?X:null,readReceipts:T?B:b("immutable").OrderedMap(),key:"mg:"+K.message_id,ref:function(b){return a.refs["mg:"+K.message_id]=b},thread:a.props.thread,threadID:a.props.threadID,scrollToRepliedMessage:a.props.scrollToRepliedMessage})}))};for(var I=0;I<A;I++){var J,K=H(I);if(K==="continue")continue}K=this.props.threadID||this.props.thread&&this.props.thread.thread_id||this.props.thread&&this.props.thread.thread_fbid;H=null;f===b("MercuryShareAttachmentRenderLocations").MESSENGER&&K&&this.props.isPageMessage&&(H=b("React").createElement(b("PagesMessageListGreeting.react"),{messageCount:v.length+A,threadID:K}));return b("React").createElement("div",{id:f===b("MercuryShareAttachmentRenderLocations").MESSENGER?h.CONVERSATION:null},H,u)};d.getNewMessageDivider=function(){return this.refs.newMessageDivider};d.getMessageElement=function(a,c){__p&&__p();if(c===!0){var d=this.refs["db:"+a];if(d)return b("ReactDOM").findDOMNode(d)}d=this.$7(a);if(!d)return null;d=d[0].message_id;var e=this.refs["mg:"+d];if(!e)return null;return c===!0&&d===a?b("ReactDOM").findDOMNode(e):e.getMessageElement(a)};d.getMessageComponent=function(a){var b=this.$7(a);if(!b)return null;b=b[0].message_id;b=this.refs["mg:"+b];return!b?null:b.getMessage(a)};d.$7=function(a){return this.state.messageGroups.find(function(b){return b.some(function(b){return b.message_id===a})})};d.$4=function(a,c,d,e,f){a.length!==0&&(a.length>1?c.push(b("React").createElement(f,{key:"mg:"+d,style:e},a)):c.push(b("React").createElement("div",{key:"mg:"+d},a)))};d.$2=function(a,c,d,e,f,g,h,j,k){__p&&__p();var l=this,m,n,o=this.props.MessageGroup;n=((n=a)!=null?(n=n.log_message_data)!=null?n.untypedData:n:n)||{};m=(m=a)!=null?(m=m.log_message_data)!=null?m.message_type:m:m;if(m===b("MessagingGenericAdminTextType").MESSENGER_CALL_LOG){m={message_type:b("MessagingGenericAdminTextType").MESSENGER_CALL_LOG,call_capture_attachments:n.call_capture_attachments,caller:b("MercuryIDs").getParticipantIDFromUserID(b("nullthrows")(n.caller_id,"caller id")),callee:b("MercuryIDs").getParticipantIDFromUserID(b("nullthrows")(n.callee_id,"callee id")),server_info_data:n.server_info,thread_id:a.thread_fbid,answered:n.event!==b("MessengerCallLogEvent").MISSED_CALL,log_message_type:n.video?b("MercuryLogMessageType").VIDEO_CALL:b("MercuryLogMessageType").PHONE_CALL,event:n.event,added_participants:null,removed_participants:null,untypedData:null,image:null,name:null};a=babelHelpers["extends"]({},a,{log_message_data:m})}n={attach_type:"share",share:{style_list:["rtc_call_log","fallback"],log_message_body:a.log_message_body,log_message_data:a.log_message_data,log_message_type:a.log_message_type,timestamp:a.timestamp}};m=babelHelpers["extends"]({},a,{attachments:[n],body:""});var p=b("immutable").List([m]),u=q(d,e,f,k),v=!s(g,p,u),w=r(h,j),x=t(this.props.deliveryTimestamp,j),y=p.first().author;return b("React").createElement(i,{subscribeToIDs:y?[y]:null,key:a.message_id},function(d){return b("React").createElement(o,{author:p.first().author,deliveryTimestamp:x,forGameChat:l.props.forGameChat,isCanonical:l.props.isCanonical,isFromViewer:c===a.author,isOnline:y?b("MessengerParticipantUtils.bs").has(d,y):!1,isPageMessage:l.props.isPageMessage,lastReadTimestamp:w,maxBubbleWidth:l.props.maxBubbleWidth,messages:p,nextTimestamp:u,onAttachmentLoad:l.props.onAttachmentLoad,onMessageDeselect:l.$5,onMessageSelect:l.$6,onStickerClick:l.props.onStickerClick,readReceipts:v?g:b("immutable").OrderedMap(),thread:l.props.thread,threadID:l.props.threadID})})};d.$3=function(a,c){var d=this.props.LogMessage,e=m(a);c=e?c[e]:null;return a.log_message_type!==b("MercuryLogMessageType").SERVER_ERROR?b("React").createElement(d,{className:this.props.location===b("MercuryShareAttachmentRenderLocations").CHAT?"_5w0o":null,key:a.message_id,onLogMessageExpanded:this.props.onAttachmentLoad,loadMoreMessages:this.props.loadMoreMessages,message:a,onImageLoad:this.props.onAttachmentLoad,viewer:this.props.viewer,isPageMessage:this.props.isPageMessage,thread:this.props.thread,isLastOfType:c===a.message_id}):null};d.$1=function(a,c){c=c[b("nullthrows")(n(a),"other group id first message")];var d=this.props.LogMessage;return b("React").createElement(d,{className:this.props.location===b("MercuryShareAttachmentRenderLocations").CHAT?"_5w0o":null,key:a.message_id,onLogMessageExpanded:this.props.onAttachmentLoad,loadMoreMessages:this.props.loadMoreMessages,message:a,onImageLoad:this.props.onAttachmentLoad,viewer:this.props.viewer,thread:this.props.thread,isLastOfType:c===a.message_id})};return c}(b("React").PureComponent);c.propTypes={CollapsedLogMessageGroup:a.func.isRequired,DateBreak:a.func.isRequired,deliveryTimestamp:a.number.isRequired,forGameChat:a.bool,isCanonical:a.bool,isPageMessage:a.bool,location:a.string.isRequired,LogMessage:a.func.isRequired,loadMoreMessages:a.func,MessageGroup:a.func.isRequired,messages:a.instanceOf(b("immutable").List).isRequired,onAttachmentLoad:a.func,onStickerClick:a.func,onReplyToMessage:a.func,readReceipts:a.instanceOf(b("immutable").OrderedMap).isRequired,viewer:a.string.isRequired,thread:a.object,threadID:a.string,scrollToRepliedMessage:a.func};function o(a,b){return b.find(function(b){return b.message_id===a})?a:null}function p(a){return(a=a)!=null?(a=a.log_message_data)!=null?(a=a.untypedData)!=null?a.icebreaker_type:a:a:a}function q(a,c,d,e){if(d>=c-1)return Infinity;var f=a[d+1][0],g=n(f);if(g&&e[g]!==f.message_id||((g=f)!=null?g.action_type:g)==b("MercuryActionType").LOG_MESSAGE)return q(a,c,d+1,e);else return f.timestamp}function r(a,b){return b.timestamp>a?a:Infinity}function s(a,b,c){return b.isEmpty()||!a.isEmpty()&&(a.last().action<b.first().timestamp||a.first().action>=c)}function t(a,b){return b.timestamp>a?a:Infinity}e.exports=c}),null);