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

__d("FundsAvailability",[],(function a(b,c,d,e,f,g){f.exports={NONE:0,FUNDS_AVAILABILITY_NA:65,FUNDS_AVAILABILITY_IMMEDIATE:73,FUNDS_AVAILABILITY_SAME_DAY:83,FUNDS_AVAILABILITY_NEXT_DAY:78,FUNDS_AVAILABILITY_FIVE_DAY:70,FUNDS_AVAILABILITY_UNKNOWN:85,FUNDS_AVAILABILITY_ONE_THREE_DAY:79,FUNDS_AVAILABILITY_CROSS_BORDER:66,FUNDS_AVAILABILITY_CROSS_BORDER_FAST_FUNDS:67,FUNDS_AVAILABILITY_DOMESTIC:68,FUNDS_AVAILABILITY_DOMESTIC_FAST_FUNDS:69}}),null);
__d("MercuryAPIArgsSource",[],(function a(b,c,d,e,f,g){f.exports={CHAT:"chat",JEWEL:"jewel",MERCURY:"mercury",MERCURYSYNC:"mercury_sync",WEBMESSENGER:"web_messenger",MESSENGER:"messenger"}}),null);
__d("MercuryAudioType",[],(function a(b,c,d,e,f,g){f.exports={AudioClip:"fb_voice_message",VoiceMessageWithTranscript:"fb_voice_message_with_transcript"}}),null);
__d("MessengerView",[],(function a(b,c,d,e,f,g){f.exports={DETAIL:{COMPOSE:"detail/compose",THREAD:"detail/thread",PAYTHREAD:"detail/paythread",PAYFRIENDPICKER:"detail/payfriendpicker"},MASTER:{GROUPS:"master/groups",PAYMENT:"master/payment",PEOPLE:"master/people",RECENT:"master/recent",SUPPORT:"master/support",SEARCH:"master/search"}}}),null);
__d("PageCommItemStatus",[],(function a(b,c,d,e,f,g){f.exports={FOLLOW_UP:"FOLLOW_UP",DONE:"DONE",TODO:"TODO",SPAM:"SPAM"}}),null);
__d("PinnedConversationNubsActionTaken",[],(function a(b,c,d,e,f,g){f.exports={TAB_CLOSED_BY_USER:0,COMMENT_ADDED:1}}),null);
__d("AppsDivebarDisplayController",["cx","AppsDivebarConfigData","AsyncRequest","Arbiter","CSS","UIPagelet","$"],(function a(b,c,d,e,f,g,h){__p&&__p();var i=171,j={isVisible:function k(){if(this._visible!==undefined)return this._visible;this._visible=!c("AppsDivebarConfigData").hidden;return this._visible},showApps:function k(){this._visible=true;var l={fb_source_category:"sidebar"};c("UIPagelet").loadFromEndpoint("GamesDivebarPagelet","pagelet_canvas_nav_content",l);c("CSS").show(c("$")("apps_gripper"));c("CSS").show(c("$")("pagelet_canvas_nav_content"));c("CSS").addClass(c("$")("pagelet_canvas_nav_content"),"_4woj");c("Arbiter").inform("AppsDivebar/show-apps");new(c("AsyncRequest"))("/ajax/feed/apps/resize").setData({height:""+i,menu:true}).setMethod("POST").send()},hideApps:function k(){this._visible=false;c("CSS").hide(c("$")("pagelet_canvas_nav_content"));c("CSS").hide(c("$")("apps_gripper"));c("Arbiter").inform("AppsDivebar/hide-apps");new(c("AsyncRequest"))("/ajax/feed/apps/resize").setData({height:"1",menu:true}).setMethod("POST").send()}};f.exports=j}),null);
__d("AsyncLoader",["AsyncRequest","BaseAsyncLoader"],(function a(b,c,d,e,f,g){function h(i,j){this._endpoint=i;this._type=j}Object.assign(h.prototype,c("BaseAsyncLoader").prototype);h.prototype.send=function(i,j,k,l,m){new(c("AsyncRequest"))(i).setData({ids:j}).setHandler(l).setErrorHandler(m).setAllowCrossPageTransition(true).setMethod("GET").setReadOnly(true).send()};f.exports=h}),null);
__d("ChannelConnection",["Arbiter","ChannelConstants","ChannelManager","JSLogger","Run","SystemEvents","Visibility","setTimeoutAcrossTransitions"],(function a(b,c,d,e,f,g){__p&&__p();var h=c("JSLogger").create("channel_connection"),i=null,j=null,k=null,l=null,m=0;c("ChannelManager").startChannelManager();var n=Object.assign(new(c("Arbiter"))(),{CONNECTED:"chat-connection/connected",RECONNECTING:"chat-connection/reconnecting",SHUTDOWN:"chat-connection/shutdown",MUTE_WARNING:"chat-connection/mute",UNMUTE_WARNING:"chat-connection/unmute"});c("Run").onBeforeUnload(function(){});function o(){if(j){clearTimeout(j);j=null}}function p(){o();h.log("unmute_warning");n.inform(n.UNMUTE_WARNING)}function q(v){o();j=c("setTimeoutAcrossTransitions")(p,v);h.log("mute_warning",{time:v});n.inform(n.MUTE_WARNING)}function r(){if(k){clearTimeout(k);k=null}}function s(v,w){__p&&__p();r();if(v===c("ChannelConstants").ON_ENTER_STATE&&(w.nextState||w.state)==="pull"){if(l!==n.CONNECTED){h.log("connected");var x=!l;l=n.CONNECTED;m=0;n.inform(n.CONNECTED,{init:x})}}else if(v===c("ChannelConstants").ON_ENTER_STATE&&((w.nextState||w.state)==="ping"||!w.nextState&&w.state==="idle"))k=c("setTimeoutAcrossTransitions")(function(){__p&&__p();var y=null;if(!(w.state==="idle"&&!w.nextState))y=w.delay||0;h.log("reconnecting",{delay:y});if(n.disconnected())h.log("reconnecting_ui",{delay:y});l=n.RECONNECTING;w.state==="idle"&&m++;if(m>1)n.inform(n.RECONNECTING,y);else if(!w.nextState&&w.state==="idle")s(v,w)},500);else if(v===c("ChannelConstants").ON_SHUTDOWN){h.log("shutdown",{reason:w.reason});l=n.SHUTDOWN;m=0;n.inform(n.SHUTDOWN,w.reason)}}function t(){if(c("ChannelManager").isShutdown())s(c("ChannelConstants").ON_SHUTDOWN,c("ChannelManager")._shutdownHint);else s(c("ChannelConstants").ON_ENTER_STATE,{state:c("ChannelManager").state,nextState:c("ChannelManager").nextState,delay:0});c("Visibility").addListener(c("Visibility").VISIBLE,n.reconnect)}c("Run").onAfterLoad(t);Object.assign(n,{disconnected:function v(){return l===n.SHUTDOWN||l===n.RECONNECTING&&!j&&m>1},isShutdown:function v(){return l===n.SHUTDOWN},reconnect:function v(w){__p&&__p();if(c("ChannelManager").state==="ping"||c("ChannelManager").state==="pull"||c("ChannelManager").isShutdown())return;h.log("reconnect",{now:w});n.inform(n.RECONNECTING,0);if(!!w){if(i!==null){clearTimeout(i);i=null}c("ChannelManager").enterState("ping!")}else if(!i)i=c("setTimeoutAcrossTransitions")(function(){c("ChannelManager").enterState("ping!");i=null},c("ChannelConstants").CHANNEL_MANUAL_RECONNECT_DEFER_MSEC);c("ChannelManager").resetDelay()},unmuteWarning:p});function u(){c("Arbiter").subscribe([c("ChannelConstants").ON_ENTER_STATE,c("ChannelConstants").ON_SHUTDOWN],s);c("Arbiter").subscribe(c("ChannelConstants").ATTEMPT_RECONNECT,function(){if(n.disconnected())n.reconnect()});c("SystemEvents").subscribe(c("SystemEvents").TIME_TRAVEL,function(){n.reconnect();q(c("ChannelConstants").MUTE_WARNING_TIME_MSEC)});c("Run").onBeforeUnload(r,false)}c("Run").onAfterLoad(u);n.mockAfterLoad=function(){t();u()};c("Arbiter").subscribe(c("JSLogger").DUMP_EVENT,function(v,w){w.channel_connected=!n.disconnected()});f.exports=n}),3);
__d("ChatHovercard",["Arbiter","AsyncLoader","Bootloader","JSLogger","TimeSlice","debounce","emptyFunction","gkx","setTimeoutAcrossTransitions"],(function a(b,c,d,e,f,g){__p&&__p();var h=5,i=new(c("AsyncLoader"))("/ajax/chat/hovercard/sidebar.php","hover"),j=c("JSLogger").create("chat_hovercard");c("Arbiter").subscribe("Hovercard/dirty",i.reset.bind(i));function k(p,q){var r=function r(){i.get(p,q)};if(c("gkx")("AT45Q0YAtTF77a1x8ZT9-rWfsF83gTI5tMuldZujY0KaNI6icTW09jBEE5BSuvPKdZtVIIdleK4appEhrvQPrVOyhvdXTeLDSdYEXUe9KmbS3Q"))c("TimeSlice").guard(r,"superfluous request to first open DD",{propagationType:c("TimeSlice").PropagationType.ORPHAN})();else r()}function l(p,q){__p&&__p();if(!p)return;k(p,function(r){__p&&__p();c("setTimeoutAcrossTransitions")(function(){__p&&__p();if(!r){j.error("fetch_failure",{id:p});return}c("Bootloader").loadModules(["Hovercard"],function(s){var t=s.getDialog(r);if(!t){j.error("no_hovercard",{id:p,endpoint:r});return}if(p==q.getActiveID())q.showHovercard(p,t)},"ChatHovercard")},0)})}function m(p,q){__p&&__p();var r=[];function s(v){if(v>=0&&v<p.length)r.push(p[v])}var t=p.indexOf(q);if(t>-1){s(t);for(var u=1;u<h;u++){s(t+u);s(t-u)}}return r.filter(function(v){return v})}function n(p,q){var r=q.getActiveID();if(r){var s=p.getShowingUsers(),t=m(s,r);k(t,c("emptyFunction"))}}function o(p){var q=p.getHoverController();q.registerDefault(l);q.subscribe("hover",c("debounce")(n.bind(null,p,q),100))}f.exports=o}),null);
__d("ChatOrderedListHover",["csx","ArbiterMixin","CSS","ErrorUtils","Event","LayerHideOnBlur","Parent","mixin","setTimeoutAcrossTransitions","shield"],(function a(b,c,d,e,f,g,h){__p&&__p();var i,j;function k(n){c("CSS").addClass(n,"fetching")}function l(n){c("CSS").removeClass(n,"fetching")}i=babelHelpers.inherits(m,c("mixin")(c("ArbiterMixin")));j=i&&i.prototype;function m(n){"use strict";j.constructor.call(this);this._orderedList=n;this._root=n.getRoot();c("Event").listen(this._root,"mouseover",this._mouseOver.bind(this));c("Event").listen(this._root,"mouseleave",this._mouseLeave.bind(this));n.subscribe("click",c("shield")(this._hide,this))}m.prototype._mouseOver=function(event){"use strict";if(this._paused)return;var n=event.getTarget(),o=c("Parent").bySelector(n,"._42fz")||c("Parent").bySelector(n,"._5a58");o&&this._setActiveItem(o)};m.prototype._mouseLeave=function(event){"use strict";this._setActiveItem(null)};m.prototype._clearTimeouts=function(){"use strict";this._showTimeout&&clearTimeout(this._showTimeout);this._showTimeout=null;this._hideTimeout&&clearTimeout(this._hideTimeout);this._hideTimeout=null};m.prototype._hide=function(){"use strict";if(this._showingDialog){this._showingDialog.hide();this._showingDialog=null;this._showingID=null}};m.prototype._show=function(){"use strict";var n=this.getActiveID(),o=false;if(this._defaultHandler){o=true;c("ErrorUtils").applyWithGuard(this._defaultHandler,{},[n,this])}if(o&&this._showingID!=this.getActiveID())k(this._activeItem)};m.prototype._setActiveItem=function(n){"use strict";__p&&__p();if(n!=this._activeItem){this._clearTimeouts();this._activeItem&&l(this._activeItem);if(n){this._activeItem=n;var o=this._showingDialog?0:600;this._showTimeout=c("setTimeoutAcrossTransitions")(function(){return this._show()}.bind(this),o);this.inform("hover")}else{this._activeItem=null;this._hideTimeout=c("setTimeoutAcrossTransitions")(function(){return this._hide()}.bind(this),10);this.inform("leave")}}};m.prototype.registerDefault=function(n){"use strict";this._defaultHandler=n};m.prototype.getActiveID=function(){"use strict";var n=this._activeItem&&this._orderedList.getUserForNode(this._activeItem);return n||null};m.prototype.showHovercard=function(n,o){"use strict";__p&&__p();if(n==this.getActiveID()&&n!=this._showingID){this._clearTimeouts();l(this._activeItem);this._hide();this._showingDialog=o;this._showingID=n;var p=o.subscribe("mouseenter",this._setActiveItem.bind(this,this._activeItem)),q=o.subscribe("mouseleave",function(){p.unsubscribe();this._setActiveItem(null)}.bind(this)),r=o.subscribe("hide",function(){this.inform("hovercard_hide");p.unsubscribe();q.unsubscribe();r.unsubscribe()}.bind(this));o.enableBehavior(c("LayerHideOnBlur")).setContext(this._activeItem).setPosition("left").show();this.inform("hovercard_show")}};Object.assign(m.prototype,{_root:null,_activeItem:null,_hideTimeout:null,_showTimeout:null,_showingDialog:null,_showingID:null,_defaultHandler:null});f.exports=m}),null);
__d("ChatSidebarConstants",["ChatConfig"],(function a(b,c,d,e,f,g){"use strict";var h=c("ChatConfig").get("divebar_rounded_profile",false),i={IMAGE_SIZE:32,getImageSize:function j(){return i.IMAGE_SIZE+(h?2:0)},getItemHeight:function j(){return i.IMAGE_SIZE+8}};f.exports=i}),null);
__d("ChatSidebarItem.react",["cssVar","cx","ix","xuiglyph","AvailableListConstants","CurrentUser","XUIBadge.react","BootloadOnRender.react","ChatConfig","ChatSidebarConstants","ErrorBoundary.react","Image.react","JSResource","LazyComponent.react","Link.react","React","SplitImage.react","TextWithEmoticons.react","emptyFunction","fbglyph","gkx"],(function a(b,c,d,e,f,g,h,i,j,k){"use strict";__p&&__p();var l,m,n=c("React").PropTypes,o=c("ChatConfig").get("divebar_rounded_profile",false),p=9,q=function q(){return c("React").createElement(c("Link.react"),{"aria-hidden":true,tabIndex:-1})};l=babelHelpers.inherits(r,c("React").PureComponent);m=l&&l.prototype;function r(){var y,z;for(var A=arguments.length,B=Array(A),C=0;C<A;C++)B[C]=arguments[C];return z=(y=m.constructor).call.apply(y,[this].concat(B)),this.state={hover:false},this.$ChatSidebarItem1=function(){this.setState({hover:true});this.props.onMouseEnter()}.bind(this),this.$ChatSidebarItem2=function(){this.setState({hover:false})}.bind(this),this.renderLastActiveTime=function(){return c("React").createElement("div",{className:"_568-"},this.props.statusTime)}.bind(this),z}r.prototype.render=function(){var y="_55ln"+(this.props.context?" _55lo":"")+(o?" _qhr":"");return c("React").createElement(c("ErrorBoundary.react"),{fallbackComponent:q},c("React").createElement(c("Link.react"),{className:y,href:this.props.href,onClick:this.props.onClick,onMouseEnter:this.$ChatSidebarItem1,onMouseLeave:this.$ChatSidebarItem2,rel:"ignore"},c("React").createElement("div",{className:"_55lp"},c("React").createElement("div",{className:"_55lq","aria-hidden":true},c("React").createElement(c("SplitImage.react"),{size:this.props.imageSize||c("ChatSidebarConstants").IMAGE_SIZE,srcs:this.props.image||this.props.images})),c("React").createElement("div",{className:"_5bon"},this.renderWaveButton(),this.renderPlayingGame(),this.renderBirthday(),this.renderUnreadCount(),this.renderStatus()),c("React").createElement("div",{className:"_55lr"},this.renderName()),c("React").createElement("div",{className:"_55ls"},this.props.context))))};r.prototype.renderName=function(){if(this.props.nameCanHaveEmoji)return c("React").createElement(c("TextWithEmoticons.react"),{renderEmoticons:true,renderEmoji:true,text:this.props.name});else return this.props.name};r.prototype.renderUnreadCount=function(){var y=this.props.unreadCount;if(!y)return null;return c("React").createElement(c("XUIBadge.react"),{count:y,maxcount:p,type:"regular"})};r.prototype.renderStatus=function(){var y=this.$ChatSidebarItem3();if(!y&&!this.props.statusTime)return null;var z=true;if(this.props.unreadCount&&this.props.unreadCount>0){y=this.props.statusTime?null:y;z=false}return c("React").createElement("div",{className:"_568z"+(this.props.showRelationshipIndicator?" _2oov":"")},z?this.renderLastActiveTime():null,y)};r.prototype.renderWaveButton=function(){if(!this.props.showWave||!this.props.userID)return null;return c("React").createElement(c("BootloadOnRender.react"),{loader:c("JSResource")("WaveButton.react").__setRef("ChatSidebarItem.react"),placeholder:c("React").createElement("div",null),component:c("React").createElement(c("LazyComponent.react"),{userID:this.props.userID,hover:this.state.hover})})};r.prototype.renderBirthday=function(){if(!this.props.birthday)return null;if(c("CurrentUser").isWorkUser()&&!c("gkx")("AT6xZmI2OdSYphpl234QKktFXq5sRz0kw7_B2KSTTJG4l__HXq2R95tfCOGk3WHJAmEbSfznHtUDjqZLC1cYF7k9"))return null;return c("React").createElement(c("Image.react"),{className:"_5dv3",src:v()})};r.prototype.renderPlayingGame=function(){if(this.props.statusTime||this.props.birthday||!this.props.isPlayingGame)return null;return c("React").createElement("div",{className:"_46b2"},c("React").createElement(c("Image.react"),{className:"_46b3",src:x()}))};r.prototype.$ChatSidebarItem3=function(){if(this.props.isMessengerOnlyContact)return c("React").createElement(c("Image.react"),{className:"_568_",src:w()});else if(this.props.status===c("AvailableListConstants").ACTIVE)if(this.props.showRelationshipIndicator)return c("React").createElement(c("Image.react"),{className:"_568_",src:j("118297")});else return c("React").createElement("span",{style:{background:"#42b72a",borderRadius:"50%",display:"inline-block",height:"6px",marginLeft:"4px",veritcalAlign:"middle",width:"6px"}});return null};r.defaultProps={onMouseEnter:c("emptyFunction")};r.propTypes={birthday:n.bool,context:n.node,href:n.string,imageSize:n.number,image:n.string,images:n.array,isPlayingGame:n.bool,isMessengerOnlyContact:n.bool,name:n.node.isRequired,nameCanHaveEmoji:n.bool,onClick:n.func,showRelationshipIndicator:n.bool,status:n.number,statusTime:n.string,unreadCount:n.number,userID:n.string,showWave:n.bool};var s=void 0,t=void 0,u=void 0;function v(){if(!s)s=j("74517");return s}function w(){if(!u)u=j("28076");return u}function x(){if(!t)t=j("89258");return t}f.exports=r}),null);
__d("ChatSidebarThread.react",["fbt","ChatOpenTabEventLogger","ChatSidebarItem.react","FantaTabActions","MercuryIDs","MercuryParticipantListRenderer","WebMessengerThreadPermalinks","React","TooltipData","requireWeak"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i,j,k=c("React").PropTypes,l=10,m="\n";i=babelHelpers.inherits(n,c("React").PureComponent);j=i&&i.prototype;function n(){__p&&__p();var q,r;for(var s=arguments.length,t=Array(s),u=0;u<s;u++)t[u]=arguments[u];return r=(q=j.constructor).call.apply(q,[this].concat(t)),this.$ChatSidebarThread2=function(v){var w=this.props.threadFBID;v.preventDefault();if(w){c("FantaTabActions").openTab(c("MercuryIDs").getThreadIDFromThreadFBID(w),["divebar_groups"]);c("ChatOpenTabEventLogger").logClickOpen(this.props.referrer,w)}}.bind(this),r}n.prototype.render=function(){var q=this.props.name,r=o(this.props.threadFBID,this.props.participants,this.props.numOtherParticipants),s=q?r:undefined,t=this.props.image?[]:p(this.props.participants),u=q?q:r;return c("React").createElement("div",c("TooltipData").propsFor(this.$ChatSidebarThread1()),c("React").createElement(c("ChatSidebarItem.react"),{context:s,href:this.props.threadFBID&&c("WebMessengerThreadPermalinks").getThreadURIFromServerID(this.props.threadFBID),imageSize:this.props.imageSize,image:this.props.image,images:t,name:u,nameCanHaveEmoji:true,onClick:this.$ChatSidebarThread2,referrer:this.props.referrer,status:this.props.status,unreadCount:this.props.unreadCount,showWave:false}))};n.prototype.$ChatSidebarThread1=function(){__p&&__p();var q=[],r=this.props.participants.length,s=this.props.numOtherParticipants,t=Math.min(l,r);if(s-t===1)t--;var u=0;while(q.length<t&&u<this.props.participants.length){var v=this.props.participants[u].name;if(v)q.push(v);u++}if(t<s)q.push(h._("and {num} more...",[h.param("num",s-t)]));return q.join(m)};n.propTypes={image:k.string,imageSize:k.number,name:k.string,participants:k.array.isRequired,numOtherParticipants:k.number.isRequired,referrer:k.string,status:k.number,threadFBID:k.string,unreadCount:k.number};n.defaultProps={numOtherParticipants:l};function o(q,r,s){return new(c("MercuryParticipantListRenderer"))().setIsNewThread(!q).setUseShortName(true).setTotalParticipantCount(s).renderParticipantList(r).toString()}function p(q){return q.map(function(r){return r.image_src}).filter(function(r){return r})}f.exports=n}),null);
__d("ChatSidebarGroupThreadsGroup.react",["cx","ChatSidebarThread.react","ChatSidebarSections","ChatSidebarConstants","PresencePrivacy","PresenceStatus","React"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i,j,k=c("React").PropTypes;i=babelHelpers.inherits(l,c("React").Component);j=i&&i.prototype;function l(){var m,n;for(var o=arguments.length,p=Array(o),q=0;q<o;q++)p[q]=arguments[q];return n=(m=j.constructor).call.apply(m,[this].concat(p)),this.$ChatSidebarGroupThreadsGroup1=function(r){var s=r.mercury_thread.participants,t=this.props.isDisconnected||c("PresencePrivacy").isUserOffline();return c("React").createElement("li",{className:"_42fz"+(t?" _570-":""),"data-id":r.uid,key:r.uid},c("React").createElement(c("ChatSidebarThread.react"),{image:r.mercury_thread.image_src,imageSize:c("ChatSidebarConstants").getImageSize(),name:r.mercury_thread.name,participants:r.participants_to_render,numOtherParticipants:s.length-1,referrer:c("ChatSidebarSections").ORDERED_LIST,status:c("PresenceStatus").getGroup(s),threadFBID:r.uid}))}.bind(this),n}l.prototype.render=function(){return c("React").createElement("ul",null,this.props.groups.map(this.$ChatSidebarGroupThreadsGroup1))};l.propTypes={groups:k.array.isRequired,isDisconnected:k.bool};f.exports=l}),null);
__d("ChatSidebarHeader.react",["cx","React","joinClasses"],(function a(b,c,d,e,f,g,h){__p&&__p();var i,j;i=babelHelpers.inherits(k,c("React").PureComponent);j=i&&i.prototype;k.prototype.render=function(){"use strict";return c("React").createElement("div",babelHelpers["extends"]({},this.props,{className:c("joinClasses")(this.props.className,"_55ob")}),c("React").createElement("div",{className:"_55oc"},this.props.children))};function k(){"use strict";i.apply(this,arguments)}f.exports=k}),null);
__d("ChatSidebarItemPlaceholder.react",["cx","React"],(function a(b,c,d,e,f,g,h){"use strict";var i=function i(k){return 50+Math.ceil(50-2*(Math.pow(7+k,2)%10))},j=function j(k){return c("React").createElement("li",{className:"_42fz"+(k.isDisconnected?" _570-":"")},c("React").createElement("div",{className:"_55ln"+(k.roundedProfile?" _qhr":"")},c("React").createElement("div",{className:"_55lp"},c("React").createElement("span",{className:"_1qh _55lq"}),c("React").createElement("span",{className:"_55lr"},c("React").createElement("span",{className:"_1qh",style:{width:i(k.slot)+"px"}})))))};f.exports=j}),null);
__d("ChatSidebarUser.react",["Bootloader","ChatConfig","ChatOpenTabEventLogger","ChatSidebarItem.react","FantaTabActions","MercuryIDs","WebMessengerThreadPermalinks","React","requireWeak"],(function a(b,c,d,e,f,g){__p&&__p();var h,i,j=c("React").PropTypes;h=babelHelpers.inherits(k,c("React").PureComponent);i=h&&h.prototype;function k(){__p&&__p();var l,m;"use strict";for(var n=arguments.length,o=Array(n),p=0;p<n;p++)o[p]=arguments[p];return m=(l=i.constructor).call.apply(l,[this].concat(o)),this.$ChatSidebarUser1=function(q){var r=this.props,s=r.sectionName,t=r.slot,u=r.userID,v=c("MercuryIDs").getThreadIDFromUserID(u);c("FantaTabActions").openTab(v,["divebar_"+s]);c("ChatOpenTabEventLogger").logUserClickOpen(s,u,{global_slot:t});q.preventDefault();this.$ChatSidebarUser2()}.bind(this),m}k.prototype.render=function(){"use strict";var l=c("WebMessengerThreadPermalinks").getThreadURIFromUserID(this.props.userID);return c("React").createElement(c("ChatSidebarItem.react"),{onClick:this.$ChatSidebarUser1,href:l,imageSize:this.props.imageSize,image:this.props.image,isPlayingGame:this.props.isPlayingGame,name:this.props.name,nameCanHaveEmoji:false,showRelationshipIndicator:this.props.showRelationshipIndicator,status:this.props.status,birthday:this.props.birthday,statusTime:this.props.statusTime,context:this.props.context,unreadCount:this.props.unreadCount,isMessengerOnlyContact:this.props.isMessengerOnlyContact,userID:this.props.userID,showWave:this.props.showWave})};k.prototype.$ChatSidebarUser2=function(){"use strict";var l=this.props.sectionName;if(c("ChatConfig").get("in_recents_experiment"))c("Bootloader").loadModules(["FunnelLogger"],function(m){m.appendAction("WWW_DIVEBAR_RECENTS_FUNNEL","open_tab_"+l)},"ChatSidebarUser.react")};k.propTypes={birthday:j.bool,image:j.string,imageSize:j.number,isPlayingGame:j.bool,name:j.string,sectionName:j.string.isRequired,showRelationshipIndicator:j.bool,slot:j.number,status:j.number,statusTime:j.string,unreadCount:j.number,userID:j.string.isRequired,isMessengerOnlyContact:j.bool,context:j.string,showWave:j.bool};f.exports=k}),null);
__d("ChatSidebarUserGroup.react",["cx","AvailableListConstants","ChatConfig","ChatSidebarItemPlaceholder.react","ChatSidebarSections","ChatSidebarUser.react","LastActiveTimes","MercuryConfig","PresencePrivacy","React","gkx"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i=c("React").PropTypes,j=c("ChatConfig").get("divebar_rounded_profile",false),k=Object.keys(c("ChatSidebarSections")).map(function(n){return c("ChatSidebarSections")[n]}),l=function l(n,o,p){if(!o)return c("React").createElement(c("ChatSidebarItemPlaceholder.react"),{isDisconnected:!!n.isDisconnected,key:"placeholder"+p,roundedProfile:j,slot:p});if(!o.id)return null;var q=n.statusMap[o.id],r=q!==c("AvailableListConstants").ACTIVE?c("LastActiveTimes").getShortDisplay(o.id):undefined,s=n.isDisconnected||!c("PresencePrivacy").allows(o.id),t=n.sectionName===c("ChatSidebarSections").NEARBY?o.location:undefined,u=c("gkx")("AT5N7c3vp2KZeBLcdLGCkrCGhNAJHtjW4P7Xmlq4tK83K879cfHJ4CNLjdjOGJAQApRspNV8z5qOFgj3xZqsPbN0");return c("React").createElement("li",{className:"_42fz"+(s?" _570-":""),"data-id":o.id,key:o.id},c("React").createElement(c("ChatSidebarUser.react"),{birthday:o.is_birthday,image:o.thumbSrc,imageSize:n.imageSize,isPlayingGame:!!n.playingMap[o.id],name:o.name,roundedProfile:j,showRelationshipIndicator:o.show_relationship_indicator,sectionName:n.sectionName,slot:p,status:q,statusTime:r?r.toString():undefined,userID:o.id,unreadCount:n.unreadCounts[o.id],isMessengerOnlyContact:o.is_messenger_only,context:t,showWave:u}))},m=function m(n){var o=n.userData,p=babelHelpers.objectWithoutProperties(n,["userData"]);delete p.imageSize;delete p.isDisconnected;delete p.playingMap;delete p.sectionName;delete p.statusMap;delete p.unreadCounts;return c("React").createElement("ul",p,o.map(function(q,r){return l(n,q,r)}))};m.propTypes={imageSize:i.number.isRequired,isDisconnected:i.bool.isRequired,sectionName:i.oneOf(k).isRequired,playingMap:i.object.isRequired,statusMap:i.object.isRequired,unreadCounts:i.object.isRequired,userData:i.arrayOf(i.object).isRequired};f.exports=m}),null);
__d("ChatUnreadCountStore",["ChatDispatcher","ChatUnreadCountActionTypes","FluxStore","ifRequired"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h,i;h=babelHelpers.inherits(j,c("FluxStore"));i=h&&h.prototype;function j(){i.constructor.call(this,c("ChatDispatcher"))}j.prototype.__onDispatch=function(k){var l=k.type;switch(l){case c("ChatUnreadCountActionTypes").COUNT_UPDATED:this.__emitChange();break;default:break}};j.prototype.get=function(k){return c("ifRequired")("ChatUnreadCount",function(l){return l.get().getUnreadCountForUID(k)},function(){return 0})};f.exports=new j()}),null);
__d("PresenceStatusStore",["ChatDispatcher","FluxStore","PresenceStatus","PresenceStatusActionTypes"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h,i;h=babelHelpers.inherits(j,c("FluxStore"));i=h&&h.prototype;function j(){i.constructor.call(this,c("ChatDispatcher"))}j.prototype.__onDispatch=function(k){var l=k.type;switch(l){case c("PresenceStatusActionTypes").AVAILABILITY_CHANGED:this.__emitChange();break;default:break}};j.prototype.get=function(k){return c("PresenceStatus").get(k)};j.prototype.getIsPlaying=function(k){return c("PresenceStatus").isPlayingCanvasGameUser(k)};f.exports=new j()}),null);
__d("ShortProfilesActionTypes",["keyMirror"],(function a(b,c,d,e,f,g){"use strict";f.exports=c("keyMirror")({PROFILE_UPDATED:null})}),null);
__d("ShortProfilesStore",["ChatDispatcher","ChatProfileStore","FluxStore","ShortProfiles","ShortProfilesActionTypes","debounce","gkx"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h,i;h=babelHelpers.inherits(j,c("FluxStore"));i=h&&h.prototype;function j(){i.constructor.call(this,c("ChatDispatcher"));if(c("gkx")("AT7b-T545bsAAbOyiRE0i8vzwAqg-R4NRaZ4WCkL5TZUAjQ3ntria2ZiM69962yv5cnbq6KuBYvaMYzUdYYVWB-O"))this.$ShortProfilesStore1=c("debounce")(this.$ShortProfilesStore1,50)}j.prototype.__onDispatch=function(k){var l=k.type;switch(l){case c("ShortProfilesActionTypes").PROFILE_UPDATED:this.__emitChange();break;default:break}};j.prototype.getNow=function(k){var l=c("ChatProfileStore").get(k);if(!l)l=c("ShortProfiles").getNow(k);return l};j.prototype.getMulti=function(k){c("ShortProfiles").getMulti(k,this.$ShortProfilesStore1)};j.prototype.$ShortProfilesStore1=function(k){c("ChatDispatcher").dispatch({type:c("ShortProfilesActionTypes").PROFILE_UPDATED})};f.exports=new j()}),null);
__d("ChatSidebarUserGroupContainer.react",["AvailableListConstants","ChatSidebarSections","ChatSidebarUserGroup.react","ChatUnreadCountStore","PresenceStatusStore","ShortProfilesStore","React","emptyFunction","requireWeak","setTimeoutAcrossTransitions"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h,i,j=c("React").PropTypes,k=400,l=5e3,m=Object.keys(c("ChatSidebarSections")).map(function(o){return c("ChatSidebarSections")[o]});h=babelHelpers.inherits(n,c("React").Component);i=h&&h.prototype;function n(o){__p&&__p();i.constructor.call(this,o);this.$ChatSidebarUserGroupContainer1={};this.$ChatSidebarUserGroupContainer2=null;this.$ChatSidebarUserGroupContainer3=null;this.$ChatSidebarUserGroupContainer4=null;this.componentWillReceiveProps=function(u){this.$ChatSidebarUserGroupContainer9(u)}.bind(this);this.componentWillUnmount=function(){this.$ChatSidebarUserGroupContainer2&&this.$ChatSidebarUserGroupContainer2.remove();this.$ChatSidebarUserGroupContainer3&&this.$ChatSidebarUserGroupContainer3.remove();this.$ChatSidebarUserGroupContainer4&&this.$ChatSidebarUserGroupContainer4.remove()}.bind(this);this.$ChatSidebarUserGroupContainer10=function(){if(!this.$ChatSidebarUserGroupContainer5)this.$ChatSidebarUserGroupContainer5=c("setTimeoutAcrossTransitions")(function(){c("requireWeak")("FantaTabsEagerBootloader",function(u){return u.bootload()});this.$ChatSidebarUserGroupContainer10=c("emptyFunction")}.bind(this),k)}.bind(this);this.$ChatSidebarUserGroupContainer11=function(){clearTimeout(this.$ChatSidebarUserGroupContainer5);this.$ChatSidebarUserGroupContainer5=null}.bind(this);var p=this.$ChatSidebarUserGroupContainer6(o.ids,o.loadExtras),q=p.playingMap,r=p.statusMap,s=this.$ChatSidebarUserGroupContainer7(o.ids),t=this.$ChatSidebarUserGroupContainer8(o.ids);this.state={playingMap:q,statusMap:r,unreadCounts:s,userData:t}}n.prototype.componentDidMount=function(){this.$ChatSidebarUserGroupContainer2=c("ChatUnreadCountStore").addListener(function(){this.$ChatSidebarUserGroupContainer9(this.props)}.bind(this));this.$ChatSidebarUserGroupContainer3=c("PresenceStatusStore").addListener(function(){this.$ChatSidebarUserGroupContainer9(this.props)}.bind(this));this.$ChatSidebarUserGroupContainer4=c("ShortProfilesStore").addListener(function(){this.$ChatSidebarUserGroupContainer9(this.props)}.bind(this))};n.prototype.shouldComponentUpdate=function(o,p){__p&&__p();for(var q=Object.keys(this.$ChatSidebarUserGroupContainer1),r=Array.isArray(q),s=0,q=r?q:q[typeof Symbol==="function"?Symbol.iterator:"@@iterator"]();;){var t;if(r){if(s>=q.length)break;t=q[s++]}else{s=q.next();if(s.done)break;t=s.value}var u=t;if(this.$ChatSidebarUserGroupContainer1[u])return false}if(this.props.ids!==o.ids||this.props.imageSize!==o.imageSize||this.props.isDisconnected!==o.isDisconnected||this.props.loadExtras!==o.loadExtras||this.props.sectionName!==o.sectionName||this.state.userData.length!==p.userData.length)return true;for(var v=Object.keys(this.state.unreadCounts),w=Array.isArray(v),x=0,v=w?v:v[typeof Symbol==="function"?Symbol.iterator:"@@iterator"]();;){var y;if(w){if(x>=v.length)break;y=v[x++]}else{x=v.next();if(x.done)break;y=x.value}var z=y;if(p.unreadCounts[z]!==this.state.unreadCounts[z])return true}for(var A=Object.keys(this.state.statusMap),B=Array.isArray(A),C=0,A=B?A:A[typeof Symbol==="function"?Symbol.iterator:"@@iterator"]();;){var D;if(B){if(C>=A.length)break;D=A[C++]}else{C=A.next();if(C.done)break;D=C.value}var E=D;if(p.statusMap[E]!==this.state.statusMap[E])return true}for(var F=Object.keys(p.statusMap),G=Array.isArray(F),H=0,F=G?F:F[typeof Symbol==="function"?Symbol.iterator:"@@iterator"]();;){var I;if(G){if(H>=F.length)break;I=F[H++]}else{H=F.next();if(H.done)break;I=H.value}var J=I;if(p.statusMap[J]!==this.state.statusMap[J])return true}for(var K=0;K<this.state.userData.length;K++)if(!this.state.userData[K]||!p.userData[K]||this.state.userData[K].id!==p.userData[K].id)return true;return false};n.prototype.render=function(){return c("React").createElement(c("ChatSidebarUserGroup.react"),{imageSize:this.props.imageSize,isDisconnected:this.props.isDisconnected,playingMap:this.state.playingMap,sectionName:this.props.sectionName,statusMap:this.state.statusMap,unreadCounts:this.state.unreadCounts,userData:this.state.userData,onMouseEnter:this.$ChatSidebarUserGroupContainer10,onMouseLeave:this.$ChatSidebarUserGroupContainer11})};n.prototype.$ChatSidebarUserGroupContainer9=function(o){var p=this.$ChatSidebarUserGroupContainer7(o.ids),q=this.$ChatSidebarUserGroupContainer6(o.ids,o.loadExtras),r=q.playingMap,s=q.statusMap,t=this.$ChatSidebarUserGroupContainer8(o.ids);this.setState({playingMap:r,statusMap:s,unreadCounts:p,userData:t})};n.prototype.$ChatSidebarUserGroupContainer6=function(o,p){__p&&__p();var q={},r={};o.forEach(function(s){if(p){var t=c("PresenceStatusStore").getIsPlaying(s);q[s]=t}var u=c("PresenceStatusStore").get(s);if(u===c("AvailableListConstants").ACTIVE)r[s]=u});return{statusMap:r,playingMap:q}};n.prototype.$ChatSidebarUserGroupContainer7=function(o){var p={};o.forEach(function(q){p[q]=c("ChatUnreadCountStore").get(q)});return p};n.prototype.$ChatSidebarUserGroupContainer8=function(o){__p&&__p();var p=[],q=[];o.forEach(function(r){var s=c("ShortProfilesStore").getNow(r);p.push(s);if(s)this.$ChatSidebarUserGroupContainer12(r);else{this.$ChatSidebarUserGroupContainer13(r);q.push(r)}}.bind(this));if(q.length>0)c("ShortProfilesStore").getMulti(q);return p};n.prototype.$ChatSidebarUserGroupContainer13=function(o){if(this.$ChatSidebarUserGroupContainer1[o]===undefined)this.$ChatSidebarUserGroupContainer1[o]=c("setTimeoutAcrossTransitions")(function(){this.$ChatSidebarUserGroupContainer1[o]=null;this.$ChatSidebarUserGroupContainer9(this.props)}.bind(this),l)};n.prototype.$ChatSidebarUserGroupContainer12=function(o){var p=this.$ChatSidebarUserGroupContainer1[o];if(!p)return;clearTimeout(p);this.$ChatSidebarUserGroupContainer1[o]=null};n.propTypes={ids:j.arrayOf(j.string).isRequired,imageSize:j.number.isRequired,isDisconnected:j.bool.isRequired,loadExtras:j.bool.isRequired,sectionName:j.oneOf(m).isRequired};f.exports=n}),null);
__d("MessengerDivebarGroupSectionTypedLogger",["Banzai","GeneratedLoggerUtils","nullthrows"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();function h(){this.clear()}h.prototype.log=function(){c("GeneratedLoggerUtils").log("logger:MessengerDivebarGroupSectionLoggerConfig",this.$MessengerDivebarGroupSectionTypedLogger1,c("Banzai").BASIC)};h.prototype.logVital=function(){c("GeneratedLoggerUtils").log("logger:MessengerDivebarGroupSectionLoggerConfig",this.$MessengerDivebarGroupSectionTypedLogger1,c("Banzai").VITAL)};h.prototype.logImmediately=function(){c("GeneratedLoggerUtils").log("logger:MessengerDivebarGroupSectionLoggerConfig",this.$MessengerDivebarGroupSectionTypedLogger1,{signal:true})};h.prototype.clear=function(){this.$MessengerDivebarGroupSectionTypedLogger1={};return this};h.prototype.getData=function(){return babelHelpers["extends"]({},this.$MessengerDivebarGroupSectionTypedLogger1)};h.prototype.updateData=function(j){this.$MessengerDivebarGroupSectionTypedLogger1=babelHelpers["extends"]({},this.$MessengerDivebarGroupSectionTypedLogger1,j);return this};h.prototype.setNewDataSource=function(j){this.$MessengerDivebarGroupSectionTypedLogger1.new_data_source=j;return this};h.prototype.setNumThreadsActive=function(j){this.$MessengerDivebarGroupSectionTypedLogger1.num_threads_active=j;return this};h.prototype.setNumThreadsGenned=function(j){this.$MessengerDivebarGroupSectionTypedLogger1.num_threads_genned=j;return this};h.prototype.setVC=function(j){this.$MessengerDivebarGroupSectionTypedLogger1.vc=j;return this};var i={new_data_source:true,num_threads_active:true,num_threads_genned:true,vc:true};f.exports=h}),null);
__d("ChatSidebarOrderedList.react",["cx","fbt","ix","AvailableListConstants","Bootloader","BootloadOnRender.react","ChatConfig","ChatQuietLinks","ChatReliabilityInstrumentation","ChatSidebarConstants","ChatSidebarGroupThreadsGroup.react","ChatSidebarHeader.react","ChatSidebarSections","ChatSidebarUserGroupContainer.react","CurrentUser","CSS","Image.react","LazyComponent.react","JSResource","LeftRight.react","Link.react","MessengerDivebarGroupSectionTypedLogger","MessengerWebDriverTestIDs","PresencePrivacy","PresenceStatus","React","ReactDOM","Run","Scroll","SubscriptionsHandler","URI","WorkInviteSource","WorkModeConfig","XPagesBrowserController","XUIButton.react","XWorkInviteCoworkersDialogController","fbglyph","ifRequired"],(function a(b,c,d,e,f,g,h,i,j){"use strict";__p&&__p();var k,l,m=c("React").PropTypes,n=3;k=babelHelpers.inherits(o,c("React").PureComponent);l=k&&k.prototype;function o(){var p,q;for(var r=arguments.length,s=Array(r),t=0;t<r;t++)s[t]=arguments[t];return q=(p=l.constructor).call.apply(p,[this].concat(s)),this.state={isDisconnected:false,renderBelowFold:false},this.$ChatSidebarOrderedList1=null,this.$ChatSidebarOrderedList2=null,this.$ChatSidebarOrderedList3=null,this.$ChatSidebarOrderedList4=null,this.$ChatSidebarOrderedList5=null,q}o.prototype.componentDidMount=function(){c("ChatQuietLinks").nukeLinks(c("ReactDOM").findDOMNode(this.refs.noLinks));this.$ChatSidebarOrderedList1=new(c("SubscriptionsHandler"))();var p=this.props.groups.filter(function(q){return c("PresenceStatus").getGroup(q.mercury_thread.participants)===c("AvailableListConstants").ACTIVE});new(c("MessengerDivebarGroupSectionTypedLogger"))().setNumThreadsGenned(this.props.groups.length).setNewDataSource(c("ChatConfig").get("only_active_groups")||c("ChatConfig").get("update_groups_source")).setNumThreadsActive(p.length).log();c("Run").onAfterLoad(function(){this.setState({renderBelowFold:true});this.$ChatSidebarOrderedList6()}.bind(this))};o.prototype.componentWillUnmount=function(){this.$ChatSidebarOrderedList1.release()};o.prototype.render=function(){var p=c("PresencePrivacy").getOnlinePolicy()===c("PresencePrivacy").ONLINE_TO_WHITELIST&&c("PresencePrivacy").getVisibility()?this.$ChatSidebarOrderedList7():this.$ChatSidebarOrderedList8();if(c("WorkModeConfig").test_group_section_order||c("ChatConfig").get("display_groups_top"))return c("React").createElement("div",{"data-testid":c("MessengerWebDriverTestIDs").CHAT_SIDEBAR},c("React").createElement("div",{ref:"noLinks"},this.$ChatSidebarOrderedList9()),c("React").createElement("div",{ref:"noLinks"},this.$ChatSidebarOrderedList10()),c("React").createElement("div",{ref:"noLinks"},this.$ChatSidebarOrderedList11(),this.$ChatSidebarOrderedList12(),this.$ChatSidebarOrderedList13(),this.$ChatSidebarOrderedList14()),this.$ChatSidebarOrderedList15(),c("React").createElement("div",{ref:"noLinks"},this.$ChatSidebarOrderedList16(),p,this.$ChatSidebarOrderedList17(),this.$ChatSidebarOrderedList18()));return c("React").createElement("div",{"data-testid":c("MessengerWebDriverTestIDs").CHAT_SIDEBAR},c("React").createElement("div",{ref:"noLinks"},this.$ChatSidebarOrderedList9()),c("React").createElement("div",{ref:"noLinks"},this.$ChatSidebarOrderedList10()),c("React").createElement("div",{ref:"noLinks"},this.$ChatSidebarOrderedList12()),c("React").createElement("div",{ref:"noLinks"},this.$ChatSidebarOrderedList13(),this.$ChatSidebarOrderedList14()),this.$ChatSidebarOrderedList15(),c("React").createElement("div",{ref:"noLinks"},this.$ChatSidebarOrderedList16(),this.$ChatSidebarOrderedList11(),p,this.$ChatSidebarOrderedList17(),this.$ChatSidebarOrderedList18()))};o.prototype.$ChatSidebarOrderedList19=function(p){var q=this.props.scrollContainer;if(!q)return;var r=q.clientHeight,s=q.scrollHeight,t=c("Scroll").getTop(q),u=Math.min(p.offsetTop,s-r);if(t!==u)c("ifRequired")("Animation",function(v){var w=Math.abs(u-t)/q.clientHeight*500;new v(q).to("scrollTop",u).ease(v.ease.end).duration(w).go()},function(){c("Scroll").setTop(q,u)})};o.prototype.$ChatSidebarOrderedList13=function(){if(!c("ChatConfig").get("show_header")&&!c("WorkModeConfig").test_group_section_order&&!(c("ChatConfig").get("display_groups_top")&&this.props.groups.length!==0))return null;var p=this.state.isDisconnected||c("PresencePrivacy").isUserOffline();return c("React").createElement(c("ChatSidebarHeader.react"),{className:p?"_570-":"",key:"header"},i._("CONTACTS"))};o.prototype.$ChatSidebarOrderedList7=function(){var p=c("ChatSidebarConstants").getImageSize(),q=this.props.topUsers.filter(function(u){return!c("PresencePrivacy").allows(u)});q.splice(-2);var r=c("React").createElement("a",{ajaxify:"/ajax/chat/privacy/settings_dialog.php?ref=whitelist_separator",href:"#",rel:"dialog"},i._("Edit")),s=c("WorkModeConfig").is_work_user?i._("MORE COWORKERS"):i._("MORE CONTACTS"),t=c("WorkModeConfig").is_work_user?i._("These coworkers can't see you on chat. {=link}",[i.param("=link",r)]):i._("These contacts can't see you on chat. {=link}",[i.param("=link",r)]);return[c("React").createElement(c("ChatSidebarHeader.react"),{key:"usersSeparator1"},s),c("React").createElement(c("ChatSidebarHeader.react"),{className:"_5j9-",key:"usersSeparator2"},t),c("React").createElement(c("ChatSidebarUserGroupContainer.react"),{ids:q,isDisconnected:this.state.isDisconnected,imageSize:p,key:c("ChatSidebarSections").OFFLINE_USERS,loadExtras:this.state.renderBelowFold,sectionName:c("ChatSidebarSections").OFFLINE_USERS})]};o.prototype.$ChatSidebarOrderedList8=function(){__p&&__p();if(this.props.availableUsers.length===0)return null;if(!this.state.renderBelowFold){var p=c("ChatSidebarConstants").getItemHeight();return[c("React").createElement("div",{key:c("ChatSidebarSections").MORE_ONLINE_FRIENDS,style:{height:p*this.props.availableUsers.length}})]}var q=c("ChatSidebarConstants").getImageSize(),r=c("WorkModeConfig").is_work_user?i._({"*":"{MORE ONLINE COWORKERS} ({=count})"},[i.param("MORE ONLINE COWORKERS",i._("MORE COWORKERS")),i.param("=count",this.props.availableUsers.length,[0])]):i._({"*":"{MORE ONLINE CONTACTS} ({=count})"},[i.param("MORE ONLINE CONTACTS",i._("MORE CONTACTS")),i.param("=count",this.props.availableUsers.length,[0])]),s=c("React").createElement(c("ChatSidebarUserGroupContainer.react"),{ids:this.props.availableUsers,imageSize:q,isDisconnected:this.state.isDisconnected,key:c("ChatSidebarSections").MORE_ONLINE_FRIENDS,loadExtras:this.state.renderBelowFold,sectionName:c("ChatSidebarSections").MORE_ONLINE_FRIENDS});return[c("React").createElement(c("ChatSidebarHeader.react"),{ref:function(t){this.$ChatSidebarOrderedList4=t}.bind(this),key:"usersSeparator",onClick:function(){return this.$ChatSidebarOrderedList19(c("ReactDOM").findDOMNode(this.$ChatSidebarOrderedList4))}.bind(this)},r),s]};o.prototype.$ChatSidebarOrderedList15=function(){if(!c("ChatConfig").get("nearby_friends_www_chatbar")||this.props.nearby.length===0)return null;return c("React").createElement(c("ChatSidebarHeader.react"),{ref:"nearbySeparator",key:"nearbySeparator"},c("React").createElement(c("LeftRight.react"),null,i._("NEARBY"),c("React").createElement(c("Link.react"),{target:"_blank",href:new(c("URI"))("/help/android-app/291236034364603")},c("React").createElement(c("Image.react"),{className:"_3-90",src:j("129548")}))))};o.prototype.$ChatSidebarOrderedList16=function(){if(!c("ChatConfig").get("nearby_friends_www_chatbar")||this.props.nearby.length===0)return null;var p=c("ChatSidebarConstants").getImageSize(),q=this.props.nearby;if(c("PresencePrivacy").getVisibility()==c("PresencePrivacy").ONLINE)q=this.props.nearby.filter(function(r){return c("PresencePrivacy").allows(r)});return c("React").createElement(c("ChatSidebarUserGroupContainer.react"),{key:c("ChatSidebarSections").NEARBY,ids:q,isDisconnected:this.state.isDisconnected,imageSize:p,loadExtras:this.state.renderBelowFold,sectionName:c("ChatSidebarSections").NEARBY})};o.prototype.$ChatSidebarOrderedList12=function(){if(!c("ChatConfig").get("show_rc_section")||this.props.recents.length===0)return null;var p=this.props.recents;p=this.props.recents.filter(function(r){return c("PresencePrivacy").allowsIfViewerIsOnline(r)});var q=c("ChatSidebarConstants").getImageSize();return[c("React").createElement(c("ChatSidebarHeader.react"),{ref:function(r){this.$ChatSidebarOrderedList5=r}.bind(this),key:"recentsSeparator",onClick:function(){return this.$ChatSidebarOrderedList19(c("ReactDOM").findDOMNode(this.$ChatSidebarOrderedList5))}.bind(this)},i._("RECENT CONVERSATIONS")),c("React").createElement(c("ChatSidebarUserGroupContainer.react"),{ids:p,isDisconnected:this.state.isDisconnected,imageSize:q,key:c("ChatSidebarSections").RECENTS,loadExtras:this.state.renderBelowFold,sectionName:c("ChatSidebarSections").RECENTS})]};o.prototype.$ChatSidebarOrderedList11=function(){__p&&__p();if(this.props.groups.length===0)return null;var p=this.state.isDisconnected||c("PresencePrivacy").isUserOffline(),q=this.props.groups;if(!p)if(c("ChatConfig").get("only_active_groups"))q=this.props.groups.filter(function(s){return c("PresenceStatus").getGroup(s.mercury_thread.participants)===c("AvailableListConstants").ACTIVE});else if(c("ChatConfig").get("sort_by_active_groups"))q=q.sort(function(s,t){return c("PresenceStatus").getGroup(t.mercury_thread.participants)-c("PresenceStatus").getGroup(s.mercury_thread.participants)});if(q.length===0)return null;var r=q.length;if(c("ChatConfig").get("only_active_groups")||c("ChatConfig").get("update_groups_source"))r=Math.min(q.length,c("ChatConfig").get("num_groups_to_show"));return[c("React").createElement(c("ChatSidebarHeader.react"),{ref:function(s){this.$ChatSidebarOrderedList2=s}.bind(this),key:"groupSeparator",className:p?"_570-":"",onClick:function(){return this.$ChatSidebarOrderedList19(c("ReactDOM").findDOMNode(this.$ChatSidebarOrderedList2))}.bind(this)},i._("GROUP CONVERSATIONS")),c("React").createElement(c("ChatSidebarGroupThreadsGroup.react"),{groups:q.slice(0,r),isDisconnected:this.state.isDisconnected,key:"group_threads_section",loadExtras:this.state.renderBelowFold})]};o.prototype.$ChatSidebarOrderedList14=function(){var p=c("ChatSidebarConstants").getImageSize(),q=this.props.topUsers;if(c("PresencePrivacy").getVisibility()==c("PresencePrivacy").ONLINE)q=this.props.topUsers.filter(function(r){return c("PresencePrivacy").allows(r)});return c("React").createElement(c("ChatSidebarUserGroupContainer.react"),{key:c("ChatSidebarSections").ORDERED_LIST,ids:q,isDisconnected:this.state.isDisconnected,imageSize:p,loadExtras:this.state.renderBelowFold,sectionName:c("ChatSidebarSections").ORDERED_LIST})};o.prototype.$ChatSidebarOrderedList18=function(){__p&&__p();if(!c("ChatConfig").get("work_show_invites"))return null;var p=this.state.isDisconnected||c("PresencePrivacy").isUserOffline();if(p){if(this.props.workWelcomeOverlay)this.$ChatSidebarOrderedList20(false);return null}var q=this.props.availableUsers.length===0&&this.props.topUsers.length===0&&this.props.workOthers.length===0&&this.props.groups.length===0,r=null;if(this.props.workWelcomeOverlay){if(c("CurrentUser").isWorkUser())this.$ChatSidebarOrderedList20(q)}else if(q)r=c("React").createElement("div",{className:"_3-8z"},c("React").createElement(c("Image.react"),{className:"_3-8z",src:j("286109")}),c("React").createElement("h3",{className:"_3-8k"},i._("Reach anyone instantly")),c("React").createElement("div",{className:"_3-8k _5-km"},i._("Invite coworkers to see them here as chat contacts.")));var s=c("XWorkInviteCoworkersDialogController").getURIBuilder().setEnum("source",c("WorkInviteSource").WWW_CHAT_SIDEBAR).getURI(),t=i._("Invite coworkers");return c("React").createElement("div",{className:"_5-kn"},r,c("React").createElement(c("XUIButton.react"),{className:"_3-8i _2w3v ellipsis",label:t,use:"confirm",size:"large",href:"#",ajaxify:s,rel:"dialog"}))};o.prototype.$ChatSidebarOrderedList10=function(){if(!this.props.pymmList)return null;var p=this.props.pymmList.pages;if(!this.props.isSidebar||!c("ChatConfig").get("show_businesses")||!p||p.length===0)return null;return[c("React").createElement(c("BootloadOnRender.react"),{key:"bootloader",loader:c("JSResource")("ChatSidebarPymmListContainer.react").__setRef("ChatSidebarOrderedList.react"),placeholder:c("React").createElement("div",null),component:c("React").createElement(c("LazyComponent.react"),{key:"pymm_container",pymmList:p})})]};o.prototype.$ChatSidebarOrderedList9=function(){if(!c("ChatConfig").get("show_admined_pages")||this.props.adminedPages.length===0||!this.props.pageListModule)return null;var p=null;if(this.props.adminedPages.length>=n){var q=c("XPagesBrowserController").getURIBuilder().setString("category","your_pages").setString("ref",this.props.adminedPages[0].ref).getURI();p=c("React").createElement(c("Link.react"),{className:"_2l56",href:q,target:"_blank"},i._("SEE ALL"))}var r=this.props.pageListModule;return[c("React").createElement(c("ChatSidebarHeader.react"),{className:"_4kqp",key:c("ChatSidebarSections").ADMINED_PAGES},c("React").createElement(c("LeftRight.react"),null,i._("YOUR PAGES"),p)),c("React").createElement(r,{adminedPages:this.props.adminedPages,key:"pages_section"})]};o.prototype.$ChatSidebarOrderedList17=function(){if(!c("WorkModeConfig").is_work_user||this.props.workOthers.length===0)return null;var p=c("ChatSidebarConstants").getImageSize(),q=i._("{OTHERS} ({count})",[i.param("OTHERS",i._("OTHERS")),i.param("count",this.props.workOthers.length)]),r=c("React").createElement(c("ChatSidebarUserGroupContainer.react"),{ids:this.props.workOthers,imageSize:p,isDisconnected:this.state.isDisconnected,key:c("ChatSidebarSections").WORKPLACE_OTHERS,loadExtras:this.state.renderBelowFold,sectionName:c("ChatSidebarSections").WORKPLACE_OTHERS});return c("React").createElement("div",null,c("React").createElement(c("ChatSidebarHeader.react"),{ref:function(s){this.$ChatSidebarOrderedList3=s}.bind(this),key:"othersSeparator",onClick:function(){return this.$ChatSidebarOrderedList19(c("ReactDOM").findDOMNode(this.$ChatSidebarOrderedList3))}.bind(this)},q),r)};o.prototype.$ChatSidebarOrderedList6=function(){c("Bootloader").loadModules(["ChannelConnection"],function(p){this.$ChatSidebarOrderedList1.addSubscriptions(p.subscribe([p.CONNECTED,p.RECONNECTING,p.SHUTDOWN,p.MUTE_WARNING,p.UNMUTE_WARNING],function(){var q=p.disconnected();if(q!==this.state.isDisconnected){if(q)c("ChatReliabilityInstrumentation").logCHANNEL_DISCONNECT();else c("ChatReliabilityInstrumentation").logCHANNEL_CONNECT();this.setState({isDisconnected:q})}}.bind(this)))}.bind(this),"ChatSidebarOrderedList.react")};o.prototype.$ChatSidebarOrderedList20=function(p){if(this.props.workWelcomeOverlay)if(p)c("CSS").show(this.props.workWelcomeOverlay);else c("CSS").hide(this.props.workWelcomeOverlay)};o.propTypes={availableUsers:m.array.isRequired,workOthers:m.array.isRequired,groups:m.array.isRequired,recents:m.array.isRequired,scrollContainer:m.object,topUsers:m.array.isRequired,nearby:m.array.isRequired,adminedPages:m.array.isRequired,pageListModule:m.func,pymmList:m.object.isRequired,isSidebar:m.bool,workWelcomeOverlay:m.object};f.exports=o}),null);
__d("MessengerDivebarSizingTypedLogger",["Banzai","GeneratedLoggerUtils","nullthrows"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();function h(){this.clear()}h.prototype.log=function(){c("GeneratedLoggerUtils").log("logger:MessengerDivebarSizingLoggerConfig",this.$MessengerDivebarSizingTypedLogger1,c("Banzai").BASIC)};h.prototype.logVital=function(){c("GeneratedLoggerUtils").log("logger:MessengerDivebarSizingLoggerConfig",this.$MessengerDivebarSizingTypedLogger1,c("Banzai").VITAL)};h.prototype.clear=function(){this.$MessengerDivebarSizingTypedLogger1={};return this};h.prototype.getData=function(){return babelHelpers["extends"]({},this.$MessengerDivebarSizingTypedLogger1)};h.prototype.updateData=function(j){this.$MessengerDivebarSizingTypedLogger1=babelHelpers["extends"]({},this.$MessengerDivebarSizingTypedLogger1,j);return this};h.prototype.setMaxItemSlots=function(j){this.$MessengerDivebarSizingTypedLogger1.max_item_slots=j;return this};h.prototype.setNumAdminedPages=function(j){this.$MessengerDivebarSizingTypedLogger1.num_admined_pages=j;return this};h.prototype.setNumGroups=function(j){this.$MessengerDivebarSizingTypedLogger1.num_groups=j;return this};h.prototype.setNumNearby=function(j){this.$MessengerDivebarSizingTypedLogger1.num_nearby=j;return this};h.prototype.setNumPymm=function(j){this.$MessengerDivebarSizingTypedLogger1.num_pymm=j;return this};h.prototype.setNumRecents=function(j){this.$MessengerDivebarSizingTypedLogger1.num_recents=j;return this};h.prototype.setNumTopFriends=function(j){this.$MessengerDivebarSizingTypedLogger1.num_top_friends=j;return this};h.prototype.setNumTopFriendsShown=function(j){this.$MessengerDivebarSizingTypedLogger1.num_top_friends_shown=j;return this};h.prototype.setSidebarType=function(j){this.$MessengerDivebarSizingTypedLogger1.sidebar_type=j;return this};h.prototype.updateExtraData=function(j){j=c("nullthrows")(c("GeneratedLoggerUtils").serializeMap(j));c("GeneratedLoggerUtils").checkExtraDataFieldNames(j,i);this.$MessengerDivebarSizingTypedLogger1=babelHelpers["extends"]({},this.$MessengerDivebarSizingTypedLogger1,j);return this};h.prototype.addToExtraData=function(j,k){var l={};l[j]=k;return this.updateExtraData(l)};var i={max_item_slots:true,num_admined_pages:true,num_groups:true,num_nearby:true,num_pymm:true,num_recents:true,num_top_friends:true,num_top_friends_shown:true,sidebar_type:true};f.exports=h}),null);
__d("ChatSortUsers",["ShortProfiles","TokenizeUtil"],(function a(b,c,d,e,f,g){__p&&__p();var h={};function i(k){if(h[k])return h[k];var l=(c("ShortProfiles").getNow(k)||{}).name;if(l)return h[k]=c("TokenizeUtil").flatten(l);return"~"}var j={sortAlphabetical:function k(l,m){var n=i(l),o=i(m);if(n!==o)return n<o?-1:1;return 0}};f.exports=j}),null);
__d("PresenceOrderedList",["ChatSidebarPreloadStore","ChatSortUsers","PresencePrivacy","PresenceStatus"],(function a(b,c,d,e,f,g){__p&&__p();function h(k){return k.map(function(l){var m=l.slice(0,-2),n=Number(l.slice(-1));return[m,n]})}function i(k,l){__p&&__p();var m=arguments.length<=2||arguments[2]===undefined?[]:arguments[2],n=[];k.forEach(function(o){var p=o[0],q=o[1];if(n.length>=l)return;if(c("PresencePrivacy").getFriendVisibility(p)==c("PresencePrivacy").BLACKLISTED)return;if(q==c("PresenceStatus").get(p)&&!m.includes(p))n.push(p)});return n}function j(){"use strict";this.$PresenceOrderedList1=null}j.prototype.getSorted=function(k,l){__p&&__p();var m=arguments.length<=2||arguments[2]===undefined?[]:arguments[2];"use strict";if(this.$PresenceOrderedList1){l(i(this.$PresenceOrderedList1,k,m));return}c("ChatSidebarPreloadStore").onLoaded(function(n){var o=n.buddies;this.$PresenceOrderedList1=h(o);l(i(this.$PresenceOrderedList1,k,m))}.bind(this))};j.prototype.getAvailableSorted=function(k){"use strict";var l=c("PresenceStatus").getOnlineIDs();if(k)l=l.filter(function(m){return k&&k.indexOf(m)===-1});return l.sort(c("ChatSortUsers").sortAlphabetical)};j.prototype.getAllSorted=function(k){"use strict";var l=[],m=this.$PresenceOrderedList1||[];c("PresenceStatus").getAllIDs().concat(m.map(function(n){return n[0]})).forEach(function(n){return l.indexOf(n)===-1&&l.push(n)});if(k)l=l.filter(function(n){return k&&k.indexOf(n)===-1});return l.sort(c("ChatSortUsers").sortAlphabetical)};f.exports=new j()}),null);
__d("ChatOrderedList",["csx","Arbiter","ArbiterMixin","AvailableList","AvailableListConstants","Bootloader","ChatSidebarStore","CSS","ChatConfig","ChatHovercard","ChatOptions","ChatOrderedListHover","ChatSidebarConstants","ChatSidebarOrderedList.react","ChatSidebarPreloadStore","DOM","DataStore","Event","JSLogger","MercuryParticipantTypes","MessengerDivebarSizingTypedLogger","Parent","PresenceOrderedList","PresencePrivacy","React","ReactDOM","ShortProfilesStore","SidebarType","WorkModeConfig","debounceAcrossTransitions","mixin"],(function a(b,c,d,e,f,g,h){__p&&__p();var i,j;i=babelHelpers.inherits(k,c("mixin")(c("ArbiterMixin")));j=i&&i.prototype;function k(l,m,n){"use strict";__p&&__p();j.constructor.call(this);this._workWelcomeOverlay=n;this._root=m;this._isVisible=false;this._excludedIds={};this._numTopFriends=5;this._adminedPages=[];this._pageListModule=null;this._pymmList={config:null,pages:[]};this._groups=[];this._nearby=[];this._recents=[];this._hoverController=null;this._isHovering=false;this._skippedRenderDuringHover=false;this._isSidebar=l;this._orderedList=c("DOM").find(this._root,".fbChatOrderedList");c("Event").listen(this._orderedList,"mouseover",function(){this._isHovering=true}.bind(this));c("Event").listen(this._orderedList,"mouseout",function(){this._isHovering=false;if(this._skippedRenderDuringHover){this._skippedRenderDuringHover=false;this._render()}}.bind(this));this._scrollableOrderedList=c("Parent").byClass(this._root,"scrollableOrderedList");this._scrollableArea=c("Parent").byClass(this._root,"scrollable");if(l)new(c("ChatHovercard"))(this);c("Arbiter").subscribe(c("JSLogger").DUMP_EVENT,function(o,p){this.getSortedList(function(q){p.chat_lists=p.chat_lists||{sorted_list:q,available_list:c("PresenceOrderedList").getAvailableSorted(),excluded_list:this._excludedIds}}.bind(this))}.bind(this));c("PresencePrivacy").subscribe("privacy-user-presence-changed",function(){return this._render()}.bind(this));c("AvailableList").subscribe(c("AvailableListConstants").ON_AVAILABILITY_CHANGED,function(){return this._render()}.bind(this));this._maybeStartRecentsSectionFunnelLog()}k.prototype.getShowingUsers=function(){"use strict";return c("DOM").scry(this._root,"li._42fz,li._5a58").map(this.getUserForNode)};k.prototype.getUserForNode=function(l){"use strict";return c("DataStore").get(l,"id")||c("DataStore").get(l,"serverthreadid")};k.prototype.getHoverController=function(){"use strict";if(!this._hoverController)this._hoverController=new(c("ChatOrderedListHover"))(this);return this._hoverController};k.prototype.getItemHeight=function(){"use strict";return c("ChatSidebarConstants").getItemHeight()};k.prototype.getRoot=function(){"use strict";return this._root};k.prototype.getSortedList=function(l){"use strict";c("PresenceOrderedList").getSorted(this._numTopFriends,function(m){return l(m)})};k.prototype.hide=function(){"use strict";if(!this._isVisible)return;this._isVisible=false;c("CSS").hide(this._scrollableOrderedList||this._root);this.inform("hide")};k.prototype.setNumTopFriends=function(l,m,n){"use strict";__p&&__p();c("ChatSidebarPreloadStore").onLoaded(function(o){__p&&__p();var p=o.groups,q=o.nearby,r=o.adminedPages,s=o.pageListModule,t=o.pymmList,u=o.recents,v=new(c("MessengerDivebarSizingTypedLogger"))();v.setMaxItemSlots(l).setSidebarType(n);l--;if(c("ChatConfig").get("show_header"))l--;var w=l,x=!c("ChatOptions").getSetting("hide_groups")?p:[],y=!c("ChatOptions").getSetting("hide_admined_pages")?r:[],z=!c("ChatOptions").getSetting("hide_businesses")&&t.pages?t:{config:null,pages:[]},A=Math.min(x.length,c("ChatConfig").get("num_groups_to_show"));if(A>0)w-=A+1;if(c("ChatConfig").get("nearby_friends_www_chatbar")&&q.length>0)w-=q.length+1;if(c("ChatConfig").get("show_admined_pages")&&y.length>0)w-=y.length+1;if(c("ChatConfig").get("show_rc_section")&&u.length>0)w-=u.length+1;if(c("ChatConfig").get("show_businesses")&&z.pages.length>0)w-=2;var B=w;w=Math.min(l,Math.max(w,c("ChatConfig").get("min_top_friends")||0));if(w!==this._numTopFriends||x.length!==this._groups.length||q.length!==this._nearby.length||y.length!==this._adminedPages.length||z.pages.length!==this._pymmList.pages.length||u.length!==this._recents.length){this._groups=x;this._numTopFriends=w;this._nearby=q;this._adminedPages=y;this._pageListModule=s;this._pymmList=z;this._recents=u;v.setNumTopFriends(w).setNumNearby(q.length).setNumGroups(p.length).setNumAdminedPages(y.length).setNumPymm(z.pages.length).setNumRecents(u.length);var C=0;if(n===c("SidebarType").BUDDYLIST&&y.length>0){C+=y.length+1;v.setNumAdminedPages(0)}if(n===c("SidebarType").BUDDYLIST&&z.pages.length>0){v.setNumPymm(0);C+=2}B+=C;if(w>B)B+=1;v.setNumTopFriendsShown(Math.max(B,0));if(c("ChatSidebarStore").getVisibleType()===n)v.log();if(m){typeof this._render.reset==="function"&&this._render.reset();this._renderOrderedList()}else this._render()}}.bind(this))};k.prototype._renderOrderedList=function(){"use strict";__p&&__p();if(!this._isVisible||this._isHovering){if(this._isHovering)this._skippedRenderDuringHover=true;return}c("PresenceOrderedList").getSorted(this._numTopFriends,function(l){var m=c("WorkModeConfig").is_work_user?c("PresenceOrderedList").getAllSorted(l.concat(this._nearby).concat(this._recents)).filter(function(p){var q=c("ShortProfilesStore").getNow(p);return!q||q.type===c("MercuryParticipantTypes").FB4C}):c("PresenceOrderedList").getAvailableSorted(l.concat(this._nearby).concat(this._recents)),n=c("WorkModeConfig").is_work_user?c("PresenceOrderedList").getAllSorted(l.concat(this._nearby).concat(this._recents)).filter(function(p){var q=c("ShortProfilesStore").getNow(p);return q&&q.type!==c("MercuryParticipantTypes").FB4C}):[],o=l.filter(function(p){return!this._nearby||this._nearby.indexOf(p)===-1}.bind(this));c("ReactDOM").render(c("React").createElement(c("ChatSidebarOrderedList.react"),{availableUsers:m,workOthers:n,scrollContainer:this._scrollContainer,topUsers:o,groups:this._groups,nearby:this._nearby,adminedPages:this._adminedPages,pageListModule:this._pageListModule,pymmList:this._pymmList,isSidebar:this._isSidebar,workWelcomeOverlay:this._workWelcomeOverlay,recents:this._recents}),this._orderedList);this.inform("render")}.bind(this),this._recents)};k.prototype._render=function(){"use strict";this._render=c("debounceAcrossTransitions")(this._renderOrderedList.bind(this),300);this._render()};k.prototype.show=function(){"use strict";if(this._isVisible)return;this._isVisible=true;c("CSS").show(this._scrollableOrderedList||this._root);this._render();this.inform("show")};k.prototype.isVisible=function(){"use strict";return this._isVisible};k.prototype.setScrollContainer=function(l){"use strict";if(c("DOM").contains(l,this._root))this._scrollContainer=l};k.prototype._maybeStartRecentsSectionFunnelLog=function(){"use strict";if(this._isSidebar&&c("ChatConfig").get("in_recents_experiment"))c("Bootloader").loadModules(["FunnelLogger"],function(l){l.startFunnel("WWW_DIVEBAR_RECENTS_FUNNEL");if(c("ChatConfig").get("show_rc_section"))l.appendAction("WWW_DIVEBAR_RECENTS_FUNNEL","show_recents")},"ChatOrderedList")};f.exports=k}),null);
__d("MessengerSearchFunnelLoggerConstants",[],(function a(b,c,d,e,f,g){"use strict";f.exports={NAME:"WWW_MESSENGER_SEARCH_SESSION_FUNNEL",FETCHED_STATE_IMPRESSION_LIST:"fetched_state_impression_list",LOADING_STATE_IMPRESSION_LIST:"loading_state_impression_list",SEND_SERVER_REQUEST:"send_server_request",WWW_SIDEBAR_TAG:"www",MESSENGER_DOT_COM:"messenger_dot_com",UNIVERSAL_SEARCH:"universal_search",USER_CONTACT:"user_contact",USER_NON_CONTACT:"user_non_contact",GROUP:"group",PAGE:"page",GAME:"game",TINCAN:"tincan",SMS:"sms",SMS_GROUP:"sms_group",COWORKER:"coworker",OTHER:"other"}}),null);
__d("ChatSearchSource",["requireWeak","AbstractSearchSource","AsyncRequest","Bootloader","CurrentUser","MercuryParticipantTypes","MessengerSearchFunnelLoggerConstants","SearchableEntry","SearchSourceCallbackManager","ShortProfiles","TokenizeUtil","debounce","emptyFunction","isValidUniqueID"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h,i,j=null;c("requireWeak")("OrderedFriendsList",function(l){j=l});h=babelHelpers.inherits(k,c("AbstractSearchSource"));i=h&&h.prototype;function k(l){i.constructor.call(this);this.$ChatSearchSource1=new(c("SearchSourceCallbackManager"))({parseFn:c("TokenizeUtil").parse,matchFn:c("TokenizeUtil").isQueryMatch,indexFn:l.indexFn});this.$ChatSearchSource2=l.queryRequests||[];this.$ChatSearchSource3=l.searchType||"";this.$ChatSearchSource4=false;this.$ChatSearchSource5=c("debounce")(this.$ChatSearchSource5,100,this);this.$ChatSearchSource6=l.excludeMemorializedUsers||false;this.$ChatSearchSource7=""}k.prototype.bootstrapImpl=function(l){c("ShortProfiles").fetchAll().done(function(){this.$ChatSearchSource4=true;this.$ChatSearchSource8();l()}.bind(this))};k.prototype.searchImpl=function(l,m,n){__p&&__p();var o=null,p={},q=n&&n.onQueryFinished,r=n&&n.onQueryStarted;r&&r(l);var s=this.$ChatSearchSource1.search(l,function(v){__p&&__p();if(!o){o=v;o.forEach(function(w){return p[w.getUniqueID()]=true})}else v.forEach(function(w){var x=w.getUniqueID();if(!p[x]){o.push(w);p[x]=true}});m(o,l);if(l.length===1&&this.$ChatSearchSource4)q&&q(l)}.bind(this),n);if(!s||!this.$ChatSearchSource2||!this.$ChatSearchSource2.length||l.length===0){q&&q(l);return}if(l.length===1){if(this.$ChatSearchSource4)q&&q(l);return}var t={value:l,existing_ids:o&&o.map(function(v){return v.getUniqueID()}).join(","),limit:n&&n.threadLimit,exclude_memorialized_users:this.$ChatSearchSource6},u=this.$ChatSearchSource2.length;this.$ChatSearchSource2.forEach(function(v){this.$ChatSearchSource5(t,v,function(w){this.$ChatSearchSource9(this.$ChatSearchSource10(this.$ChatSearchSource11(w)).filter(function(x){return!!x}),l);u--;if(u===0){this.$ChatSearchSource1.setQueryStringAsExhausted(l);q&&q(l)}}.bind(this))}.bind(this),this)};k.prototype.getAllEntriesMap=function(){return this.$ChatSearchSource1.getAllEntries()};k.prototype.$ChatSearchSource8=function(){var l=c("ShortProfiles").getCachedProfileIDs(),m=l.filter(function(o){var p=c("ShortProfiles").getNow(o);return o==c("CurrentUser").getID()||p.type===c("MercuryParticipantTypes").FRIEND||p.type===c("MercuryParticipantTypes").FB4C}),n=m.map(this.$ChatSearchSource12);if(n.length)this.$ChatSearchSource1.addLocalEntries(n)};k.prototype.$ChatSearchSource10=function(l){return l.map(this.$ChatSearchSource13,this)};k.prototype.$ChatSearchSource13=function(l,m){__p&&__p();if(l.mercury_thread){if(!j)return null;return j.normalizeThreadEntry(l,m)}var n=l.text,o=l.uid;if(!n||!c("isValidUniqueID")(o))return null;var p=j?j.getActiveRank(o):0;if(j&&!j.contains(o))p+=m;return new(c("SearchableEntry"))({uniqueID:o,title:n,order:p,subtitle:l.subtext,type:l.render_type||l.type,photo:l.photo,uri:l.path,auxiliaryData:{isMessengerUser:l.is_messenger_user,alias:l.alias}})};k.prototype.$ChatSearchSource11=function(l){var m=l.getPayload();if(Array.isArray(m))return m;else if(m&&m.entries)return m.entries;else return[]};k.prototype.$ChatSearchSource12=function(l){var m=c("ShortProfiles").getNow(l),n=l==c("CurrentUser").getID()?c("MercuryParticipantTypes").FRIEND:m.type,o=[m.additionalName,m.alternateName].concat(m.searchTokens||[]).join(" "),p=m.name,q=null;return new(c("SearchableEntry"))({uniqueID:l,title:p,order:j?j.getActiveRank(l):0,subtitle:q,keywordString:o,type:n,photo:m.thumbSrc,uri:m.uri,auxiliaryData:{isMessengerUser:m.is_messenger_user,alias:m.alias}})};k.prototype.$ChatSearchSource5=function(l,m,n,o){if(this.$ChatSearchSource3===c("MessengerSearchFunnelLoggerConstants").WWW_SIDEBAR_TAG&&l.value!==this.$ChatSearchSource7){c("Bootloader").loadModules(["MessengerSearchFunnelLogger"],function(p){p.logStartQuery(c("MessengerSearchFunnelLoggerConstants").NAME,l.value)},"ChatSearchSource");this.$ChatSearchSource7=l.value}new(c("AsyncRequest"))(m.uri).setData(babelHelpers["extends"]({},l,m.data)).setMethod("GET").setReadOnly(true).setHandler(n).setErrorHandler(o||c("emptyFunction")).setAllowCrossPageTransition(true).send()};k.prototype.$ChatSearchSource9=function(l,m){if(l.length)this.$ChatSearchSource1.addQueryEntries(l,m)};k.prototype.addLocalEntries=function(l){this.$ChatSearchSource1.addLocalEntries(l)};k.prototype.refreshData=function(){c("ShortProfiles").fetchAll()};f.exports=k}),null);
__d("ChatTypeaheadConstants",[],(function a(b,c,d,e,f,g){var h=Object.freeze({USER_TYPE:"user",THREAD_TYPE:"thread",FRIEND_TYPE:"friend",NON_FRIEND_TYPE:"non_friend",FB4C_TYPE:"fb4c",PAGE_TYPE:"page",MEETING_ROOM_PAGE_TYPE:"meeting_room_page",COMMERCE_PAGE_TYPE:"commerce_page",HEADER_TYPE:"header",INTERNAL_BOT_PAGE_TYPE:"internal_bot_page",GAME_TYPE:"game"});f.exports=h}),null);
__d("EventReminderConstants",[],(function a(b,c,d,e,f,g){"use strict";var h=Object.freeze({INITIAL:"initial",GOING:"going",WATCHED:"watched",UNWATCHED:"unwatched"}),i=Object.freeze({ASSOCIATED_EVENT:"ASSOCIATED_EVENT"}),j=Object.freeze({GOING:"GOING",DECLINED:"DECLINED",INVITED:"INVITED"}),k=Object.freeze({NO_ERROR:"NO_ERROR",PAST_TIME:"PAST_TIME",AFTER_ONE_YEAR:"AFTER_ONE_YEAR"});f.exports={EventGuestStates:h,EventPlanType:i,GuestStates:j,TimeErrorType:k}}),null);
__d("MercuryActionType",[],(function a(b,c,d,e,f,g){f.exports=Object.freeze({LOG_MESSAGE:"ma-type:log-message",USER_GENERATED_MESSAGE:"ma-type:user-generated-message",ADD_GROUP_ADMINS:"ma-type:add_group_admins",REMOVE_GROUP_ADMINS:"ma-type:remove_group_admins",CHANGE_READ_STATUS:"ma-type:change_read_status",MARK_THREAD_SEEN:"ma-type:mark_thread_seen",CHANGE_MUTE_SETTINGS:"ma-type:change-mute-settings",SEND_MESSAGE:"ma-type:send-message",DELETE_MESSAGES:"ma-type:delete-messages",DELETE_THREAD:"ma-type:delete-thread",UPDATE_SNIPPET:"ma-type:update-snippet",CHANGE_ARCHIVED_STATUS:"ma-type:change-archived-status",CHANGE_PAGE_FOLLOW_UP_STATUS:"ma-type:change-page-follow-up-status",CHANGE_FOLDER:"ma-type:change-folder",ADD_PARTICIPANTS:"ma-type:add-participants",CANCEL_ATTACHMENT_PLACEHOLDER:"ma-type:cancel-attachment-placeholder",CONFIRM_ATTACHMENT_PLACEHOLDER:"ma-type:confirm-attachment-placeholder",CHANGE_FLAG:"ma-type:change_flag",MOVE_PENDING_TO_INBOX:"ma-type:move_pending_to_inbox",CREATE_PAGE_ADMIN_NOTE:"ma-type:create-page-admin-note",REPLACE_MESSAGE:"ma-type:replace-message",UPDATE_CUSTOM_LIKE:"ma-type:update_custom_like",UNWRAP_MESSAGE:"ma-type:unwrap-message",JOINABLE_MODE:"ma-type:joinable-mode",APPROVAL_MODE:"ma-type:approval-mode",APPROVAL_QUEUE:"ma-type:approval-queue",IS_PIN_PROTECTED:"ma-type:is_pin_protected",REACTION_UPDATE:"ma-type:reaction-update",LIVE_LOCATION_UPDATE:"ma-type:live-location-update",UPDATE_RTC_CALL_DATA:"ma-type:update-rtc-call-data",UPDATE_COMM_STATUS:"ma-type:update-comm-status",EVENT_RSVP_CHANGED:"ma-type:event-rsvp-changed",BLOCK_STATUS_CHANGED:"ma-type:block-status-changed",UPDATE_COMM_ITEM_OWNER:"ma-type:update-comm-item-owner"})}),null);
__d("MercuryAssert",["MercuryIDs"],(function a(b,c,d,e,f,g){__p&&__p();f.exports={isParticipantID:function h(i){if(!c("MercuryIDs").isValid(i))throw new Error("bad_participant_id "+i)},allParticipantIDs:function h(i){i.forEach(this.isParticipantID)},isUserParticipantID:function h(i){var j=c("MercuryIDs").tokenize(i);if(j.type!="fbid")throw new Error("bad_user_id "+i)},isEmailParticipantID:function h(i){var j=c("MercuryIDs").tokenize(i);if(j.type!="email")throw new Error("bad_email_id "+i)},allThreadID:function h(i){i.forEach(this.isThreadID)},isThreadID:function h(i){if(!c("MercuryIDs").isValid(i))throw new Error("bad_thread_id "+i)}}}),null);
__d("EmojiLikeConstants",["EmojiStaticConfig"],(function a(b,c,d,e,f,g){"use strict";var h=c("EmojiStaticConfig").sizeMap,i=Object.freeze({XSMALL:"xsmall",SMALL:"small",MEDIUM:"medium",LARGE:"large"}),j={dp16:"xsmall",dp32:"small",dp64:"medium",db64:"medium",dp128:"large"},k=Object.freeze({PICKER:"picker",HOT_LIKE:"hot_like"}),l=[983040],m="hot_emoji_source",n="hot_emoji_size",o="emoji_like",p="\ud83d\udc4d",q=[128077];f.exports={FB_THUMBS_UP_EMOJI:l,size:i,sizeMap:h,sizeMapTransfer:j,source:k,SOURCE_TAG_PREFIX:m,TAG_PREFIX_NEW:n,TAG_PREFIX_OLD:o,THUMBS_UP_EMOJI:p,THUMBS_UP_EMOJI_CODES:q}}),null);
__d("MercuryTagHelper",[],(function a(b,c,d,e,f,g){"use strict";var h={get:function i(j,k){var l=j.find(function(m){return m.startsWith(k)});return l&&l.substr(l.indexOf(":")+1)}};f.exports=h}),null);
__d("EmojiLikeUtils",["EmojiLikeConstants","EmoticonEmojiList","MercuryTagHelper"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();function h(n,o){if(!n.tags)n.tags=[i(o)];else n.tags.push(i(o));return n}function i(n){var o=c("EmojiLikeConstants").TAG_PREFIX_NEW;return o+":"+n}function j(n,o){if(!n.tags)n.tags=[k(o)];else n.tags.push(k(o));return n}function k(n){return c("EmojiLikeConstants").SOURCE_TAG_PREFIX+":"+n}function l(n){return m(n)!=null}function m(n){if(!n.tags)return null;var o=c("MercuryTagHelper").get(n.tags,c("EmojiLikeConstants").TAG_PREFIX_NEW);if(o)return o;return c("MercuryTagHelper").get(n.tags,c("EmojiLikeConstants").TAG_PREFIX_OLD)}f.exports={getEmojiSize:m,isEmojiLike:l,setEmojiSize:h,setEmojiSource:j}}),null);
__d("MercuryAttachmentContentType",[],(function a(b,c,d,e,f,g){f.exports=Object.freeze({PHOTO:"attach:image",VIDEO:"attach:video",MUSIC:"attach:music",VOICE:"attach:voice",TEXT:"attach:text",MSWORD:"attach:ms:word",MSXLS:"attach:ms:xls",MSPPT:"attach:ms:ppt",ORION:"attach:orion",SHOERACK_INVITATION:"attach:shoerackinvite",UNKNOWN:"attach:unknown"})}),null);
__d("MercuryAttachmentType",[],(function a(b,c,d,e,f,g){f.exports=Object.freeze({ERROR:"error",FILE:"file",PHOTO:"photo",STICKER:"sticker",SHARE:"share",UNKNOWN:"unknown",VIDEO:"video",ANIMATED_IMAGE:"animated_image",EMOJI_LIKE:"emoji_like",GIFT:"gift",THIRDPARTYSTICKER:"third_party_sticker"})}),null);
__d("StoryAttachmentStyle",[],(function a(b,c,d,e,f,g){f.exports=Object.freeze({FALLBACK:"fallback",SHARE:"share",OG_COMPOSER_SIMPLE:"og_composer_simple",SPORTS_MATCHUP:"sports_matchup",SHARE_LARGE_IMAGE:"share_large_image",PHOTO:"photo",COVER_PHOTO:"cover_photo",INSPIRATION_PHOTO:"inspiration_photo",ALBUM:"album",NEW_ALBUM:"new_album",COUPON:"coupon",QUESTION:"question",ANSWER:"answer",OPTION:"option",GALLERY:"gallery",STREAM_PUBLISH:"stream_publish",MUSIC_AGGREGATION:"music_aggregation",ITEM_LIST:"list",HIGH_SCORE:"high_score",SCORE_LEADERBOARD:"score_leaderboard",FRIEND_LIST:"friend_list",POPULAR_OBJECTS:"popular_objects",AVATAR_LIST:"avatar_list",AVATAR:"avatar",AVATAR_WITH_VIDEO:"avatar_with_video",EVENT:"event",CANCELED_EVENT:"canceled_event",MINUTIAE_EVENT:"minutiae_event",EXPERIENCE:"experience",LIFE_EVENT:"life_event",GIFT:"gift",IMAGE_SHARE:"image_share",ANIMATED_IMAGE_SHARE:"animated_image_share",ANIMATED_IMAGE_AUTOPLAY:"animated_image_autoplay",ANIMATED_IMAGE_VIDEO:"animated_image_video",ANIMATED_IMAGE_VIDEO_AUTOPLAY:"animated_image_video_autoplay",NOTE:"note",TOPIC:"topic",TOPIC_FOLLOWING_TOPIC:"topic_following_topic",FILE_UPLOAD:"file_upload",NOTIFICATION_TARGET:"notification_target",UNAVAILABLE:"unavailable",PAGE_RECOMMENDATION:"page_recommendation",PAGE_VIDEO_PLAYLIST:"page_video_playlist",VIDEO:"video",VIDEO_INLINE:"video_inline",VIDEO_AUTOPLAY:"video_autoplay",VIDEO_SHARE:"video_share",VIDEO_SHARE_HIGHLIGHTED:"video_share_highlighted",VIDEO_SHARE_YOUTUBE:"video_share_youtube",VIDEO_DIRECT_RESPONSE:"video_direct_response",VIDEO_DIRECT_RESPONSE_AUTOPLAY:"video_direct_response_autoplay",VIDEO_SHOP:"video_shop",INSPIRATION_VIDEO:"inspiration_video",MULTI_VIDEOS_STITCHED:"multi_videos_stitched",MAP:"map",OG_MAP:"og_map",PRODUCT:"product",EXTERNAL_PRODUCT:"external_product",FITNESS_COURSE:"fitness_course",APPLICATION:"application",STICKER:"sticker",EXTERNAL_OG_PRODUCT:"external_og_product",TRAVEL_LOG:"travel_log",MULTI_SHARE:"multi_share",MULTI_SHARE_NO_END_CARD:"multi_share_no_end_card",MULTI_SHARE_NON_LINK_VIDEO:"multi_share_non_link_video",MULTI_SHARE_SEARCH_END_CARD:"multi_share_search_end_card",MULTI_SHARE_FIXED_TEXT:"multi_share_fixed_text",YEAR_IN_REVIEW:"year_in_review",AVATAR_LARGE_COVER:"avatar_large_cover",COMMERCE_PRODUCT_ITEM:"commerce_product_item",COMMERCE_STORE:"commerce_store",THIRD_PARTY_PHOTO:"third_party_photo",PROMPT:"prompt",BIRTHDAY:"birthday",BIRTHDAY_PERCEPTICONS:"birthday_percepticons",DISCUSSION_CONVERSATION:"discussion_conversation",DISCUSSION_COMMENT:"discussion_comment",GROUP_SELL_PRODUCT_ITEM:"group_sell_product_item",GROUP_SELL_PRODUCT_ITEM_MARK_AS_SOLD:"group_sell_mark_as_sold",GAMETIME:"gametime",GAMETIME_LEAGUE:"gametime_league",GAMETIME_PLAY:"gametime_play",GROUP_REPORTED_POST_QUEUE:"group_reported_post_queue",GROUP_PENDING_POST_QUEUE:"group_pending_post_queue",GROUP_JOIN_REQUEST_QUEUE:"group_join_request_queue",GREETING_CARD:"greeting_card",LEAD_GEN:"lead_gen",ATTACHED_STORY:"attached_story",POST_CHANNEL:"post_channel",TEXT_FOR_COLLAGE:"text_for_collage",SOUVENIR:"souvenir",SLIDESHOW:"slideshow",ORION:"orion",ORION_REQUEST:"orion_request",P2P_PAYMENT:"p2p_payment",P2P_SERVER_BUBBLE:"p2p_server_bubble",INSTANT_ARTICLE:"instant_article",MOMENTS_APP_INVITATION:"moments_app_invitation",MOMENTS_APP_PHOTO_REQUEST:"moments_app_photo_request",RIDE_ORDERED:"ride_ordered",RIDE_RECEIPT:"ride_receipt",BUSINESS_MESSAGE_ITEMS:"business_message_items",RETAIL_CANCELLATION:"retail_cancellation",RETAIL_PROMOTION:"retail_promotion",RETAIL_ITEM:"retail_item",RETAIL_NOW_IN_STOCK:"retail_now_in_stock",RETAIL_RECEIPT:"retail_receipt",RETAIL_SHIPMENT:"retail_shipment",RETAIL_SHIPMENT_FOR_SUPPORTED_CARRIER:"retail_shipment_for_supported_carrier",RETAIL_SHIPMENT_FOR_UNSUPPORTED_CARRIER:"retail_shipment_for_unsupported_carrier",RETAIL_SHIPMENT_TRACKING_EVENT:"retail_shipment_tracking_event",RETAIL_SHIPMENT_TRACKING_EVENT_ETA:"retail_shipment_tracking_event_eta",RETAIL_SHIPMENT_TRACKING_EVENT_IN_TRANSIT:"retail_shipment_tracking_event_in_transit",RETAIL_SHIPMENT_TRACKING_EVENT_OUT_FOR_DELIVERY:"retail_shipment_tracking_event_out_for_delivery",RETAIL_SHIPMENT_TRACKING_EVENT_DELAYED:"retail_shipment_tracking_event_delayed",RETAIL_SHIPMENT_TRACKING_EVENT_DELIVERED:"retail_shipment_tracking_event_delivered",SURVEY:"survey",MESSAGE_LOCATION:"message_location",GROUP_ADD_MEMBERS:"group_add_memebers",GROUP_MEMBER_ADDED:"group_member_added",RTC_CALL_LOG:"rtc_call_log",EVENTS_PENDING_POST_QUEUE:"events_pending_post_queue",EVENT_CALENDAR:"event_calendar",FACEPILE:"facepile",ATTRIBUTED_SHARE:"attributed_share",VIDEO_CINEMAGRAPH:"video_cinemagraph",LOCAL_CONTEXT_SHARE:"local_context_share",H_SCROLL:"h_scroll",EGO_HSCROLL:"ego_hscroll",MEDIA_QUESTION:"media_question",RICH_MEDIA:"rich_media",RICH_MEDIA_COLLECTION:"rich_media_collection",SQUARE_IMAGE_SHARE:"square_image_share",RETAIL_AGENT_ITEM_SUGGESTION:"retail_agent_item_suggestion",RETAIL_AGENT_ITEM_RECEIPT:"retail_agent_item_receipt",NOTE_COMPOSED:"note_composed",AVATAR_WITH_BIRTHDAY:"avatar_with_birthday",AIRLINE_FLIGHT_RESCHEDULE_UPDATE_BUBBLE:"airline_flight_reschedule_update_bubble",AIRLINE_CONFIRMATION:"airline_confirmation",AIRLINE_CHECK_IN:"airline_check_in",AIRLINE_BOARDING_PASS:"airline_boarding_pass",AIRLINE_FLIGHT_RESCHEDULE_UPDATE:"airline_flight_reschedule_update",LIGHTBOX_VIDEO:"lightbox_video",GLOBALLY_DELETED_MESSAGE_PLACEHOLDER:"globally_deleted_message_placeholder",GENIE_MESSAGE:"genie_message",MOVIE_BOT_MOVIE_LIST:"movie_bot_movie_list",MOVIE_BOT_MOVIE_SHOWTIME_LIST:"movie_bot_movie_showtime_list",GROUPSMASH_MEDIA:"groupsmash_media",AVATAR_WITH_EGO_ACTION:"avatar_with_ego_action",EVENT_TICKET_DEPRECATED:"event_ticket",VERTICAL_ATTACHMENT_LIST:"vertical_attachment_list",INSTANT_ARTICLE_LEGACY:"instant_article_legacy",FUNDRAISER_PAGE:"fundraiser_page",FINANCIAL_BILL_PAYMENT_REQUEST:"financial_bill_payment_request",GOODWILL_THROWBACK_FRIENDVERSARY_POLAROIDS_CARD:"goodwill_throwback_friendversary_polaroids_card",WELCOME_CARD_IMAGE:"welcome_card_image",LARGE_IMAGE_LIKE:"large_image_like",ASK_FRIENDS:"ask_friends",CULTURAL_MOMENT:"cultural_moment",TELEPHONE_CALL_LOG:"telephone_call_log",SUPER_EMOJI:"super_emoji",BOOK:"book",SUBTOPIC_CUSTOMIZATION_QUESTION:"subtopic_customization_question",SUBTOPIC_CUSTOMIZATION_OPTION:"subtopic_customization_option",RESTAURANT:"restaurant",CONNECTION_QUESTION:"connection_question",CONNECTION_QUESTION_OPTION:"connection_question_option",PYMI_ITEM:"pymi_item",GOODWILL_THROWBACK_FRIENDVERSARY_COLLAGE_CARD:"goodwill_throwback_friendversary_collage_card",CITY:"city",AVATAR_WITH_SHARE:"avatar_with_share",LIGHTWEIGHT_PLACE:"lightweight_place",QUOTED_SHARE:"quoted_share",SMS_LOG:"sms_log",CENTERED_TEXT:"centered_text",GOODWILL_THROWBACK_FRIENDVERSARY_DATA_CARD:"goodwill_throwback_friendversary_data_card",GOODWILL_THROWBACK_FACEVERSARY_COLLAGE_CARD:"goodwill_throwback_faceversary_collage_card",GOODWILL_THROWBACK_ANNIVERSARY_COLLAGE_CARD:"goodwill_throwback_anniversary_collage_card",MESSAGE_EVENT:"message_event",MESSAGE_THREAD:"message_thread",QUOTE:"quote",VOTER_REGISTRATION_SHARE:"voter_registration_share",AIRLINE_ITINERARY:"airline_itinerary",AIRLINE_UPDATE:"airline_update",PLACE_LIST:"place_list",IMPLICIT_PLACE_LIST_CONVERSION:"implicit_place_list_conversion",AIRLINE_CHECKIN_REMINDER:"airline_checkin_reminder",MINUTIAE_UNIT:"minutiae_unit",INSTANT_ARTICLE_PHOTO:"instant_article_photo",INSTANT_ARTICLE_VIDEO:"instant_article_video",PHOTO_LINK_SHARE:"photo_link_share",BUSINESS_LOCATION:"business_location",GOODWILL_WEATHER:"goodwill_weather",CULTURAL_MOMENT_HOLIDAY_CARD:"cultural_moment_holiday_card",TRANSACTION_INVOICE:"transaction_invoice",GROUP:"group",COMMENT_PLACE_INFO:"comment_place_info",COMMENT_PRODUCT_INFO:"comment_product_info",GOODWILL_THROWBACK_FRIENDVERSARY_POLAROIDS_CARD_IPB:"goodwill_throwback_friendversary_polaroids_card_ipb",GOODWILL_THROWBACK_FRIENDVERSARY_COLLAGE_CARD_IPB:"goodwill_throwback_friendversary_collage_card_ipb",FUNDRAISER_PERSON_TO_CHARITY:"fundraiser_person_to_charity",FUNDRAISER_PERSON_FOR_PERSON:"fundraiser_person_for_person",FUNDRAISER_FOR_STORY:"fundraiser_for_story",MESSAGE_LIVE_LOCATION:"message_live_location",MESSENGER_INVITE:"messenger_invite",GAMES_INSTANT_PLAY:"games_instant_play",PROFILE_MEDIA:"profile_media",NATIVE_TEMPLATES:"native_templates",NATIVE_TEMPLATES_FOX:"native_templates_fox",NATIVE_TEMPLATES_KEEP_ATTACHED:"native_templates_keep_attached",GOODWILL_THROWBACK_VIDEO_BASIC:"goodwill_throwback_video_basic",COMMERCE_PRODUCT_MINI:"commerce_product_mini",COMMERCE_PRODUCT_MINI_LIST:"commerce_product_mini_list",COMMENT:"comment",MESSENGER_TEAM_BOT_SHARE:"messenger_team_bot_share",LIVE_VIDEO_SCHEDULE:"live_video_schedule",PRODUCT_ITEM:"product_item",PLATFORM_INSTANT_APP:"platform_instant_app",YEAR_OVERVIEW:"year_overview",NATIVE_COMPONENT_FLOW_BOOKING_REQUEST:"native_component_flow_booking_request",FRIEND_REQUEST:"friend_request",MESSENGER_GROUP_JOINABLE_LINK:"messenger_group_joinable_link",SOCIAL_SEARCH_CONVERSION_PROMPT:"social_search_conversion_prompt",MDOTME_USER_LINK:"mdotme_user_link",DYNAMIC_MULTI_SHARE_ITEMS:"dynamic_multi_share_items",EVENT_REMINDER:"event_reminder",INSTANT_GAMES_SHARE_MESSAGE:"instant_games_share_message",MESSENGER_PLATFORM_COMPACT_ITEM:"messenger_platform_compact_item",MESSENGER_PLATFORM_COVER_ITEM:"messenger_platform_cover_item",MULTI_SHARE_NON_LINK_VIDEO_AUTO_SCROLL:"multi_share_non_link_video_auto_scroll",ENDORSEMENT:"endorsement",OFFER_VIEW_LIVE_COUNTDOWN:"offer_view_live_countdown",ENHANCED_LINK_REDDIT_POST:"enhanced_link_reddit_post",MESSENGER_COMMERCE_COVER_ITEM:"messenger_commerce_cover_item",ENHANCED_LINK_YELP_BUSINESS:"enhanced_link_yelp_business",PAGES_PLATFORM_LEAD_GEN:"pages_platform_lead_gen",NATIVE_STORY:"native_story",MFS_BILL_PAY_CREATION_UPDATE:"mfs_bill_pay_creation_update",MFS_BILL_PAY_REFERENCE_CODE_UPDATE:"mfs_bill_pay_reference_code_update",MFS_BILL_PAY_AGENT_CASH_IN_UPDATE:"mfs_bill_pay_agent_cash_in_update",ISSUE_POSITION:"issue_position",PAGES_PLATFORM_BOOKING_MESSAGE:"pages_platform_booking_message",EXTERNAL_GALLERY:"external_gallery",MEME_SHARE:"meme_share",MESSENGER_PLATFORM_ELEMENT:"messenger_platform_element",INSTANT_GAMES_SHARE_SCORE_MESSAGE:"instant_games_share_score_message",MESSENGER_PLATFORM_BUTTON_LIST:"messenger_platform_button_list",BALLOT:"ballot",LIGHTWEIGHT_ACTION:"lightweight_action",TAROT_DIGEST:"tarot_digest",EVENT_TOUR:"event_tour",ADAPTIVE_MEDIA:"adaptive_media",DYNAMIC_GAME_BOARD:"dynamic_game_board",PAYMENT_PLATFORM:"payment_platform",OMNI_M_FLOW:"omni_m_flow",GROUP_QUIZ:"group_quiz",TRIAL_AD:"trial_ad",TEEM_COLLECTIONS:"teem_collections",CRISIS_DONATION:"crisis_donation",CRISIS_STATUS:"crisis_status",CRISIS_SHARE:"crisis_share",CRISIS_MARK_SAFE:"crisis_mark_safe",CRISIS_LISTING:"crisis_listing",VR_CONTENT:"vr_content",VIDEO_RECOMMENDATION_HSCROLL:"video_recommendation_hscroll",VIDEO_TRAILER:"video_trailer",SHOW_PAGE_SHARE:"show_page_share",MFS_ATTACHMENT:"mfs_attachment",GROUP_TASK:"group_task",CHECKLIST:"checklist",VIDEO_RECOMMENDATION_SINGLETON:"video_recommendation_singleton",PAGE_REVIEW_PROMPT:"page_review_prompt",VIDEO_SHOW:"video_show",UNCONNECTED_VIDEO:"unconnected_video",SHOW_SHARE:"show_share",JOB_SEARCH_JOB_APPLICATION:"job_search_job_application",PAGE_MESSENGER_ATTACHMENT:"page_messenger_attachment",CONTACT_YOUR_REP:"contact_your_rep",LOCATION_EXTENSION:"location_extension",PLACE_RECOMMENDATION:"place_recommendation",JOB_SEARCH_JOB_OPENING:"job_search_job_opening",PAGE_MESSAGE_ONLINE_INDICATOR:"page_message_online_indicator",LOCAL_PIVOT:"local_pivot",ORION_REQUEST_NEW:"orion_request_new",PHOTO_WITH_SHIELD:"photo_with_shield",PLAYABLE_AD:"playable_ad",FUN_FACT_PROMPT:"fun_fact_prompt",FATIGUED_SHARE:"fatigued_share",DISCUSSION_QUESTION:"discussion_question",PARTIES_INVITE:"parties_invite",PROFILE_INTRO_CARD_BIO:"profile_intro_card_bio",PAGES_SHARE:"pages_share",PRODUCT_RECOMMENDATION_LIST:"product_recommendation_list",VISUAL_POLL:"visual_poll",MULTI_PLACE_RECOMMENDATION:"multi_place_recommendation",PAGE_IN_COMMENT:"page_in_comment",MESSENGER_PLATFORM_MEDIA_ATTACHMENT:"messenger_platform_media_attachment",SCHEDULED_VIDEO_ANNOUNCEMENT:"scheduled_video_announcement",HSCROLL_ITEM:"hscroll_item",MESSENGER_CALL_LOG:"messenger_call_log",PAGE_REVIEW_UPDATE:"page_review_update",LOYALTY_CARD_OFFER:"loyalty_card_offer",GOODWILL_GRID:"goodwill_grid",TRAVEL_PLAN:"travel_plan",FIND_PLAYERS:"find_players",ASSET3D:"asset3d",MESSENGER_GROUP_PERSONAL_LINK:"messenger_group_personal_link",FREQUENTLY_ASKED_QUESTION:"frequently_asked_question",STORY_LIST:"story_list",GOODWILL_SHARED_CARD:"goodwill_shared_card",PAYMENT_BUBBLE_VIEW:"PAYMENT_BUBBLE_VIEW",POST_TO_EVENT_CREATE:"post_to_event_create",MONTAGE_DIRECT:"montage_direct",NEO_INVITATION:"NEO_INVITATION",NATIVE_TEMPLATES_LINK_SHARE_TEST:"native_templates_link_share_test",GOODWILL_HSCROLL:"goodwill_hscroll",NEO_KID_INITIATE_FRIENDING:"NEO_KID_INITIATE_FRIENDING",EVENT_MICRO_ATTACHMENT:"event_micro_attachment",SAVED_LIST:"saved_list",LOCAL_GUIDE:"local_guide",MEET_UP_EVENT:"meet_up_event",DONATION:"donation",BREAKING_NEWS:"breaking_news",VIDEO_REQUEST:"video_request",GOODWILL_COLLAGE:"goodwill_collage",LEAD_FORM:"lead_form",LEAD_FORM_USER_INFO:"lead_form_user_info",EVENT_TICKET_ORDER:"event_ticket_order",PROFILE_CHANNEL:"profile_channel",ICE_BREAKER:"ICE_BREAKER",MOVIE:"movie",ALOHA_CALL:"aloha_call",TIP_JAR_PAYMENT:"tip_jar_payment",COMMENT_MESSAGE_INFO:"comment_message_info",CASH_ON_DELIVERY_ORDER:"cash_on_delivery_order",VOTER_REGISTRATION_DRIVE:"voter_registration_drive",LIVING_ROOM:"living_room"})}),null);
__d("MercuryAttachment",["cx","EmojiLikeUtils","MercuryAttachmentContentType","MercuryAttachmentType","MercuryAudioType","Set","StoryAttachmentStyle"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i=function i(m){return m===Object(m)},j="_1c_u",k=new(c("Set"))([c("MercuryAttachmentType").ANIMATED_IMAGE,c("MercuryAttachmentType").PHOTO,c("MercuryAttachmentType").VIDEO,c("MercuryAttachmentType").THIRDPARTYSTICKER]),l={getAttachIconClass:function m(n){__p&&__p();switch(n){case c("MercuryAttachmentContentType").PHOTO:return"_y2-";case c("MercuryAttachmentContentType").VIDEO:return"_y2_";case c("MercuryAttachmentContentType").MUSIC:return"_y30";case c("MercuryAttachmentContentType").VOICE:return"_y31";case c("MercuryAttachmentContentType").TEXT:return"_y32";case c("MercuryAttachmentContentType").MSWORD:return"_y33";case c("MercuryAttachmentContentType").MSXLS:return"_y34";case c("MercuryAttachmentContentType").MSPPT:return"_y35"}return"_y36"},getAttachIconClassByMime:function m(n){return this.getAttachIconClass(this.getAttachTypeByMime(n))},getAttachTypeByMime:function m(n){__p&&__p();if(n.startsWith("image"))return c("MercuryAttachmentContentType").PHOTO;else if(n.startsWith("video"))return c("MercuryAttachmentContentType").VIDEO;else if(n.startsWith("audio"))return c("MercuryAttachmentContentType").MUSIC;else if(n.startsWith("text/plain"))return c("MercuryAttachmentContentType").TEXT;else if(n=="application/msword"||n.startsWith("application/vnd.ms-word")||n.startsWith("application/vnd.openxmlformats-officedocument.wordprocessingml"))return c("MercuryAttachmentContentType").MSWORD;else if(n.startsWith("application/vnd.ms-excel")||n.startsWith("application/vnd.openxmlformats-officedocument.spreadsheetml"))return c("MercuryAttachmentContentType").MSXLS;else if(n.startsWith("application/vnd.ms-powerpoint")||n.startsWith("application/vnd.openxmlformats-officedocument.presentationml"))return c("MercuryAttachmentContentType").MSPPT;else return c("MercuryAttachmentContentType").UNKNOWN},convertRaw:function m(n){__p&&__p();var o=[];for(var p=0;p<n.length;p++){var q=n[p];if(q.attach_type===c("MercuryAttachmentType").PHOTO)o.push(q);else if(q.filename){var r=l.getAttachTypeByMime(q.filetype),s={};s.attach_type=c("MercuryAttachmentType").FILE;s.name=q.filename;s.icon_type=r;s.url="";o.push(s)}}return o},get:function m(n){__p&&__p();var o=[];if(n.attachments)o=n.attachments;else if(n.raw_attachments)o=this.convertRaw(n.raw_attachments);var p=c("EmojiLikeUtils").getEmojiSize(n);if(p)o=o.concat([{attach_type:c("MercuryAttachmentType").EMOJI_LIKE,size:p}]);if(!(n.attachments&&n.attachments.length>0)){if(n.sticker_id)return o.concat([{attach_type:c("MercuryAttachmentType").STICKER}]);if(n.preview_attachments&&n.preview_attachments.length>0)return o.concat(n.preview_attachments)}return o},resizeContain:function m(n,o){var p=n.width/n.height,q=o.width/o.height;if(q<p)return{width:Math.ceil(Math.min(n.height*q,o.width)),height:Math.ceil(Math.min(n.height,o.height))};else return{width:Math.ceil(Math.min(n.width,o.width)),height:Math.ceil(Math.min(n.width/q,o.height))}},isBubblePreferred:function m(n){return this.isFileAttachment(n)},isPhotoAttachment:function m(n){return!!(n.attach_type==c("MercuryAttachmentType").PHOTO||n.attach_type==c("MercuryAttachmentType").ANIMATED_IMAGE||n.attach_type==c("MercuryAttachmentType").THIRDPARTYSTICKER||n.attach_type==c("MercuryAttachmentType").FILE&&n.preview_url)},isPhotoGroupAttachment:function m(n){return k.has(n.attach_type)},isSinglePhotoGroupAttachment:function m(n){return!!(n.attachments&&n.attachments.length===1&&n.attachments[0]&&this.isPhotoGroupAttachment(n.attachments[0]))},isVideoAttachment:function m(n){return n.attach_type==c("MercuryAttachmentType").VIDEO},isShareAttachment:function m(n){return n.attach_type==c("MercuryAttachmentType").SHARE},isFileAttachment:function m(n){return n.attach_type==c("MercuryAttachmentType").FILE},isErrorAttachment:function m(n){return n.attach_type==c("MercuryAttachmentType").ERROR},isStickerAttachment:function m(n){return n.attach_type==c("MercuryAttachmentType").STICKER},isEmojiLikeAttachment:function m(n){return n.attach_type===c("MercuryAttachmentType").EMOJI_LIKE},isVoiceAttachment:function m(n){if(!n.metadata)return false;return n.metadata.type===c("MercuryAudioType").AudioClip||n.metadata.type===c("MercuryAudioType").VoiceMessageWithTranscript},hasAttribution:function m(n){return!!n.app_attribution},isLightweightActionAttachment:function m(n){return l.isShareAttachment(n)&&n.share&&n.share.target!=null&&n.share.target.lwa_type!=null},isSingleVideoAttachment:function m(n){var o=this.get(n).filter(i).filter(function(p){return this.isVideoAttachment(p)}.bind(this));return o.length===1},isSharedVideoAttachment:function m(n){var o=n.attach_type===c("MercuryAttachmentType").SHARE&&n.share&&n.share.subattachments&&n.share.subattachments[0];return!!(o&&o.target&&o.target.video_id)},isGenieSharedVideoAttachment:function m(n){return!!(n.attach_type===c("MercuryAttachmentType").SHARE&&n.share&&n.share.style_list.indexOf(c("StoryAttachmentStyle").GENIE_MESSAGE)>-1&&n.share.target&&n.share.target.attachment&&this.isSharedVideoAttachment(n.share.target.attachment))},isSharedVideoAttachmentMessage:function m(n){var o=this.get(n).filter(i).filter(function(p){return this.isSharedVideoAttachment(p)||this.isGenieSharedVideoAttachment(p)}.bind(this));return o.length===1},getVideoElem:function m(n,o){var p=o.getMessageElement(n);if(!p)return null;var q=p.getElementsByClassName(j);return q&&q.length?q[0]:p}};f.exports=l}),null);
__d("MercurySingletonProvider",["CurrentUser"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();function h(i){this.$MercurySingletonProvider1={};this.$MercurySingletonProvider2=i}h.prototype.getForFBID=function(i){if(!this.$MercurySingletonProvider1[i])this.$MercurySingletonProvider1[i]=new this.$MercurySingletonProvider2(i);return this.$MercurySingletonProvider1[i]};h.prototype.get=function(){return this.getForFBID(c("CurrentUser").getID())};h.mock=function(i){throw new Error("MercurySingletonProvider.mock() must only be used in tests.")};f.exports=h}),null);
__d("MercuryThreadInformer",["ArbiterMixin","LogHistory","MercuryAssert","MercurySingletonProvider","mapObject","mixin"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h,i,j=c("LogHistory").getInstance("mercury_informer");h=babelHelpers.inherits(k,c("mixin")(c("ArbiterMixin")));i=h&&h.prototype;k.get=function(){return l.get()};k.getForFBID=function(m){return l.getForFBID(m)};function k(m){__p&&__p();i.constructor.call(this);this.$MercuryThreadInformer1=m;this.$MercuryThreadInformer2={};this.$MercuryThreadInformer3={};this.$MercuryThreadInformer4={};this.$MercuryThreadInformer5={};this.$MercuryThreadInformer6=false;this.$MercuryThreadInformer7=false;this.$MercuryThreadInformer8=false;this.$MercuryThreadInformer9={};this.$MercuryThreadInformer10={};this.$MercuryThreadInformer11={};this.$MercuryThreadInformer12=0}k.prototype.updatedThread=function(m){this.$MercuryThreadInformer3[m]=true;this.$MercuryThreadInformer13()};k.prototype.invalidatedThread=function(m){this.$MercuryThreadInformer4[m]=true;this.$MercuryThreadInformer13()};k.prototype.deletedThread=function(m){this.$MercuryThreadInformer2[m]=true;this.$MercuryThreadInformer13()};k.prototype.updatedThreadlist=function(){this.$MercuryThreadInformer6=true;this.$MercuryThreadInformer13()};k.prototype.updatedUnseenState=function(){this.$MercuryThreadInformer7=true;this.$MercuryThreadInformer13()};k.prototype.updatedUnreadState=function(){this.$MercuryThreadInformer8=true;this.$MercuryThreadInformer13()};k.prototype.changedThreadReadState=function(m,n,o){if(!this.$MercuryThreadInformer5[m]||this.$MercuryThreadInformer5[m].timestamp<o)this.$MercuryThreadInformer5[m]={mark_as_read:n,timestamp:o};this.$MercuryThreadInformer13()};k.prototype.receivedMessage=function(m){c("MercuryAssert").isThreadID(m.thread_id);var n=m.thread_id;if(!this.$MercuryThreadInformer9[n])this.$MercuryThreadInformer9[n]=[];this.$MercuryThreadInformer9[n].push(m);this.updatedThread(n)};k.prototype.reorderedMessages=function(m,n){this.$MercuryThreadInformer10[m]={source:n};this.$MercuryThreadInformer13()};k.prototype.updatedMessage=function(m,n,o){if(!this.$MercuryThreadInformer11[m])this.$MercuryThreadInformer11[m]={};this.$MercuryThreadInformer11[m][n]={source:o};this.updatedThread(m)};k.prototype.synchronizeInforms=function(m){this.$MercuryThreadInformer12++;try{m()}catch(n){throw n}finally{this.$MercuryThreadInformer12--;this.$MercuryThreadInformer13()}};k.prototype.listen=function(m,n){return this.subscribe("threads-updated",function(o,p){if(p[m])n(m)})};k.prototype.$MercuryThreadInformer13=function(){__p&&__p();if(!this.$MercuryThreadInformer12){var m=this.$MercuryThreadInformer2,n=this.$MercuryThreadInformer3,o=this.$MercuryThreadInformer4,p=this.$MercuryThreadInformer5,q=this.$MercuryThreadInformer6,r=this.$MercuryThreadInformer7,s=this.$MercuryThreadInformer8,t=this.$MercuryThreadInformer9,u=this.$MercuryThreadInformer10,v=this.$MercuryThreadInformer11;this.$MercuryThreadInformer2={};this.$MercuryThreadInformer3={};this.$MercuryThreadInformer4={};this.$MercuryThreadInformer5={};this.$MercuryThreadInformer6=false;this.$MercuryThreadInformer7=false;this.$MercuryThreadInformer8=false;this.$MercuryThreadInformer9={};this.$MercuryThreadInformer10={};this.$MercuryThreadInformer11={};var w=Object.keys(n);if(w.length||q)this.inform("threadlist-updated",w);if(w.length)this.$MercuryThreadInformer14("threads-updated",n);for(var x in o){this.$MercuryThreadInformer14("thread-invalidated",o);break}for(var x in p){this.$MercuryThreadInformer14("thread-read-changed",p);break}for(x in m){this.$MercuryThreadInformer14("threads-deleted",m);break}if(r)this.$MercuryThreadInformer14("unseen-updated",null);if(s)this.$MercuryThreadInformer14("unread-updated",null);for(x in t){this.$MercuryThreadInformer14("messages-received",t);break}for(x in u){this.$MercuryThreadInformer14("messages-reordered",u);break}for(x in v){this.$MercuryThreadInformer14("messages-updated",v);break}}};k.prototype.$MercuryThreadInformer14=function(m,n){if(m==="threads-updated")j.debug(m,JSON.stringify(n));this.inform(m,n)};var l=new(c("MercurySingletonProvider"))(k);f.exports=k}),null);
__d("bs_caml_builtin_exceptions",[],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h=["Out_of_memory",0],i=["Sys_error",-1],j=["Failure",-2],k=["Invalid_argument",-3],l=["End_of_file",-4],m=["Division_by_zero",-5],n=["Not_found",-6],o=["Match_failure",-7],p=["Stack_overflow",-8],q=["Sys_blocked_io",-9],r=["Assert_failure",-10],s=["Undefined_recursive_module",-11];h.tag=248;i.tag=248;j.tag=248;k.tag=248;l.tag=248;m.tag=248;n.tag=248;o.tag=248;p.tag=248;q.tag=248;r.tag=248;s.tag=248;g.out_of_memory=h;g.sys_error=i;g.failure=j;g.invalid_argument=k;g.end_of_file=l;g.division_by_zero=m;g.not_found=n;g.match_failure=o;g.stack_overflow=p;g.sys_blocked_io=q;g.assert_failure=r;g.undefined_recursive_module=s}),null);
__d("bs_caml_array",["bs_caml_builtin_exceptions"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();function h(p,q,i){var r=new Array(i),s=0,t=q;while(s<i){r[s]=p[t];s=s+1|0;t=t+1|0}return r}function i(p,q){while(true){var r=q,s=p;if(r){q=r[1];p=r[0].length+s|0;continue}else return s}}function j(p,q,r){__p&&__p();while(true){var s=r,t=q;if(s){var u=s[0],v=u.length,w=t,x=0;while(x<v){p[w]=u[x];w=w+1|0;x=x+1|0}r=s[1];q=w;continue}else return 0}}function k(p){var q=i(0,p),r=new Array(q);j(r,0,p);return r}function l(p,q,r){if(q<0||q>=p.length)throw[c("bs_caml_builtin_exceptions").invalid_argument,"index out of bounds"];else{p[q]=r;return 0}}function m(p,q){if(q<0||q>=p.length)throw[c("bs_caml_builtin_exceptions").invalid_argument,"index out of bounds"];else return p[q]}function n(i,p){var q=new Array(i);for(var r=0,s=i-1|0;r<=s;++r)q[r]=p;return q}function o(p,q,r,s,i){if(s<=q){for(var t=0,u=i-1|0;t<=u;++t)r[t+s|0]=p[t+q|0];return 0}else{for(var v=i-1|0;v>=0;--v)r[v+s|0]=p[v+q|0];return 0}}g.caml_array_sub=h;g.caml_array_concat=k;g.caml_make_vect=n;g.caml_array_blit=o;g.caml_array_get=m;g.caml_array_set=l}),null);
__d("bs_curry",["bs_caml_array"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();function h(G,H){__p&&__p();while(true){var I=H,J=G,K=J.length,L=K?K:1,M=I.length,N=L-M|0;if(N)if(N<0){H=c("bs_caml_array").caml_array_sub(I,L,-N|0);G=J.apply(null,c("bs_caml_array").caml_array_sub(I,0,L));continue}else return function(J,I){return function(O){return h(J,I.concat([O]))}}(J,I);else return J.apply(null,I)}}function i(G,H,I){__p&&__p();if(I>7||I<0)return h(G,[H]);else switch(I){case 0:case 1:return G(H);case 2:return function(J){return G(H,J)};case 3:return function(J,K){return G(H,J,K)};case 4:return function(J,K,L){return G(H,J,K,L)};case 5:return function(J,K,L,M){return G(H,J,K,L,M)};case 6:return function(J,K,L,M,N){return G(H,J,K,L,M,N)};case 7:return function(J,K,L,M,N,O){return G(H,J,K,L,M,N,O)}}}function j(G,H){var I=G.length;if(I===1)return G(H);else return i(G,H,I)}function k(G){var H=G.length;if(H===1)return G;else return function(I){return j(G,I)}}function l(G,H,I,J){__p&&__p();if(J>7||J<0)return h(G,[H,I]);else switch(J){case 0:case 1:return h(G(H),[I]);case 2:return G(H,I);case 3:return function(K){return G(H,I,K)};case 4:return function(K,L){return G(H,I,K,L)};case 5:return function(K,L,M){return G(H,I,K,L,M)};case 6:return function(K,L,M,N){return G(H,I,K,L,M,N)};case 7:return function(K,L,M,N,O){return G(H,I,K,L,M,N,O)}}}function m(G,H,I){var J=G.length;if(J===2)return G(H,I);else return l(G,H,I,J)}function n(G){var H=G.length;if(H===2)return G;else return function(I,J){return m(G,I,J)}}function o(G,H,I,J,K){__p&&__p();var L=0;if(K>7||K<0)return h(G,[H,I,J]);else switch(K){case 0:case 1:L=1;break;case 2:return h(G(H,I),[J]);case 3:return G(H,I,J);case 4:return function(M){return G(H,I,J,M)};case 5:return function(M,N){return G(H,I,J,M,N)};case 6:return function(M,N,O){return G(H,I,J,M,N,O)};case 7:return function(M,N,O,P){return G(H,I,J,M,N,O,P)}}if(L===1)return h(G(H),[I,J])}function p(G,H,I,J){var K=G.length;if(K===3)return G(H,I,J);else return o(G,H,I,J,K)}function q(G){var H=G.length;if(H===3)return G;else return function(I,J,K){return p(G,I,J,K)}}function r(G,H,I,J,K,L){__p&&__p();var M=0;if(L>7||L<0)return h(G,[H,I,J,K]);else switch(L){case 0:case 1:M=1;break;case 2:return h(G(H,I),[J,K]);case 3:return h(G(H,I,J),[K]);case 4:return G(H,I,J,K);case 5:return function(N){return G(H,I,J,K,N)};case 6:return function(N,O){return G(H,I,J,K,N,O)};case 7:return function(N,O,P){return G(H,I,J,K,N,O,P)}}if(M===1)return h(G(H),[I,J,K])}function s(G,H,I,J,K){var L=G.length;if(L===4)return G(H,I,J,K);else return r(G,H,I,J,K,L)}function t(G){var H=G.length;if(H===4)return G;else return function(I,J,K,L){return s(G,I,J,K,L)}}function u(G,H,I,J,K,L,M){__p&&__p();var N=0;if(M>7||M<0)return h(G,[H,I,J,K,L]);else switch(M){case 0:case 1:N=1;break;case 2:return h(G(H,I),[J,K,L]);case 3:return h(G(H,I,J),[K,L]);case 4:return h(G(H,I,J,K),[L]);case 5:return G(H,I,J,K,L);case 6:return function(O){return G(H,I,J,K,L,O)};case 7:return function(O,P){return G(H,I,J,K,L,O,P)}}if(N===1)return h(G(H),[I,J,K,L])}function v(G,H,I,J,K,L){var M=G.length;if(M===5)return G(H,I,J,K,L);else return u(G,H,I,J,K,L,M)}function w(G){var H=G.length;if(H===5)return G;else return function(I,J,K,L,M){return v(G,I,J,K,L,M)}}function x(G,H,I,J,K,L,M,N){__p&&__p();var O=0;if(N>7||N<0)return h(G,[H,I,J,K,L,M]);else switch(N){case 0:case 1:O=1;break;case 2:return h(G(H,I),[J,K,L,M]);case 3:return h(G(H,I,J),[K,L,M]);case 4:return h(G(H,I,J,K),[L,M]);case 5:return h(G(H,I,J,K,L),[M]);case 6:return G(H,I,J,K,L,M);case 7:return function(P){return G(H,I,J,K,L,M,P)}}if(O===1)return h(G(H),[I,J,K,L,M])}function y(G,H,I,J,K,L,M){var N=G.length;if(N===6)return G(H,I,J,K,L,M);else return x(G,H,I,J,K,L,M,N)}function z(G){var H=G.length;if(H===6)return G;else return function(I,J,K,L,M,N){return y(G,I,J,K,L,M,N)}}function A(G,H,I,J,K,L,M,N,O){__p&&__p();var P=0;if(O>7||O<0)return h(G,[H,I,J,K,L,M,N]);else switch(O){case 0:case 1:P=1;break;case 2:return h(G(H,I),[J,K,L,M,N]);case 3:return h(G(H,I,J),[K,L,M,N]);case 4:return h(G(H,I,J,K),[L,M,N]);case 5:return h(G(H,I,J,K,L),[M,N]);case 6:return h(G(H,I,J,K,L,M),[N]);case 7:return G(H,I,J,K,L,M,N)}if(P===1)return h(G(H),[I,J,K,L,M,N])}function B(G,H,I,J,K,L,M,N){var O=G.length;if(O===7)return G(H,I,J,K,L,M,N);else return A(G,H,I,J,K,L,M,N,O)}function C(G){var H=G.length;if(H===7)return G;else return function(I,J,K,L,M,N,O){return B(G,I,J,K,L,M,N,O)}}function D(G,H,I,J,K,L,M,N,O,P){__p&&__p();var Q=0;if(P>7||P<0)return h(G,[H,I,J,K,L,M,N,O]);else switch(P){case 0:case 1:Q=1;break;case 2:return h(G(H,I),[J,K,L,M,N,O]);case 3:return h(G(H,I,J),[K,L,M,N,O]);case 4:return h(G(H,I,J,K),[L,M,N,O]);case 5:return h(G(H,I,J,K,L),[M,N,O]);case 6:return h(G(H,I,J,K,L,M),[N,O]);case 7:return h(G(H,I,J,K,L,M,N),[O])}if(Q===1)return h(G(H),[I,J,K,L,M,N,O])}function E(G,H,I,J,K,L,M,N,O){var P=G.length;if(P===8)return G(H,I,J,K,L,M,N,O);else return D(G,H,I,J,K,L,M,N,O,P)}function F(G){var H=G.length;if(H===8)return G;else return function(I,J,K,L,M,N,O,P){return E(G,I,J,K,L,M,N,O,P)}}g.app=h;g.curry_1=i;g._1=j;g.__1=k;g.curry_2=l;g._2=m;g.__2=n;g.curry_3=o;g._3=p;g.__3=q;g.curry_4=r;g._4=s;g.__4=t;g.curry_5=u;g._5=v;g.__5=w;g.curry_6=x;g._6=y;g.__6=z;g.curry_7=A;g._7=B;g.__7=C;g.curry_8=D;g._8=E;g.__8=F}),null);
__d("bs_block",[],(function a(b,c,d,e,f,g){"use strict";function h(i,j){j.tag=i;return j}g.__=h}),null);
__d("bs_caml_obj",["bs_block","bs_caml_builtin_exceptions"],(function a(b,c,aa,ba,ca,d){"use strict";__p&&__p();function e(t,u){var v=new Array(u);v.tag=t;return v}function f(t){var u=t.length|0,v=new Array(u);for(var w=0,x=u-1|0;w<=x;++w)v[w]=t[w];v.tag=t.tag|0;return v}function g(t,u){__p&&__p();var v=t.length|0;if(u<=0||u>v)throw[c("bs_caml_builtin_exceptions").invalid_argument,"Obj.truncate"];else if(v!==u){for(var w=u,x=v-1|0;w<=x;++w)t[w]=0;t.length=u;return 0}else return 0}function h(t){return c("bs_block").__(250,[t])}function i(t,u){var v=u.length|0;for(var w=0,x=v-1|0;w<=x;++w)t[w]=u[w];var y=u.tag|0;if(y!==0){t.tag=y;return 0}else return 0}function j(t,u){if(t<u)return-1;else if(t===u)return 0;else return 1}function k(t,u){__p&&__p();while(true){var v=u,w=t;if(w===v)return 0;else{var x=typeof w,y=typeof v;if(x==="string"){var z=w,A=v;if(z<A)return-1;else if(z===A)return 0;else return 1}else{var B=+(x==="number"),C=+(y==="number");if(B!==0)if(C!==0)return j(w,v);else return-1;else if(C!==0)return 1;else if(x==="boolean"||x==="undefined"||w===null){var D=w,E=v;if(D===E)return 0;else if(D<E)return-1;else return 1}else if(x==="function"||y==="function")throw[c("bs_caml_builtin_exceptions").invalid_argument,"compare: functional value"];else{var F=w.tag|0,G=v.tag|0;if(F===250){t=w[0];continue}else if(G===250){u=v[0];continue}else if(F===248)return j(w[1],v[1]);else if(F===251)throw[c("bs_caml_builtin_exceptions").invalid_argument,"equal: abstract value"];else if(F!==G)if(F<G)return-1;else return 1;else{var H=w.length|0,I=v.length|0;if(H===I){var J=w,K=v,L=0,M=H;while(true){var N=L;if(N===M)return 0;else{var O=k(J[N],K[N]);if(O!==0)return O;else{L=N+1|0;continue}}}}else if(H<I){var P=w,Q=v,R=0,S=H;while(true){var T=R;if(T===S)return-1;else{var U=k(P[T],Q[T]);if(U!==0)return U;else{R=T+1|0;continue}}}}else{var V=w,W=v,X=0,Y=I;while(true){var Z=X;if(Z===Y)return 1;else{var $=k(V[Z],W[Z]);if($!==0)return $;else{X=Z+1|0;continue}}}}}}}}}}function l(t,u){__p&&__p();while(true){var v=u,w=t;if(w===v)return 1;else{var x=typeof w;if(x==="string"||x==="number"||x==="boolean"||x==="undefined"||w===null)return 0;else{var y=typeof v;if(x==="function"||y==="function")throw[c("bs_caml_builtin_exceptions").invalid_argument,"equal: functional value"];else if(y==="number"||y==="undefined"||v===null)return 0;else{var z=w.tag|0,A=v.tag|0;if(z===250){t=w[0];continue}else if(A===250){u=v[0];continue}else if(z===248)return+(w[1]===v[1]);else if(z===251)throw[c("bs_caml_builtin_exceptions").invalid_argument,"equal: abstract value"];else if(z!==A)return 0;else{var B=w.length|0,C=v.length|0;if(B===C){var D=w,E=v,F=0,G=B;while(true){var H=F;if(H===G)return 1;else if(l(D[H],E[H])){F=H+1|0;continue}else return 0}}else return 0}}}}}}function m(t,u){return 1-l(t,u)}function n(t,u){return+(k(t,u)>=0)}function o(t,u){return+(k(t,u)>0)}function p(t,u){return+(k(t,u)<=0)}function q(t,u){return+(k(t,u)<0)}var r=j,s=j;d.caml_obj_block=e;d.caml_obj_dup=f;d.caml_obj_truncate=g;d.caml_lazy_make_forward=h;d.caml_update_dummy=i;d.caml_int_compare=j;d.caml_int32_compare=r;d.caml_nativeint_compare=s;d.caml_compare=k;d.caml_equal=l;d.caml_notequal=m;d.caml_greaterequal=n;d.caml_greaterthan=o;d.caml_lessthan=q;d.caml_lessequal=p}),null);
__d("bs_caml_exceptions",[],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h=[0];function i(m){m[1]=h[0];h[0]+=1;return m}function j(){h[0]+=1;return h[0]}function k(m){var n=j(0),o=[m,n];o.tag=248;return o}function l(m){if(m===undefined)return 0;else if(m.tag===248)return 1;else{var n=m[0];if(n!==undefined)return+(n.tag===248);else return 0}}g.caml_set_oo_id=i;g.get_id=j;g.create=k;g.isCamlExceptionOrOpenVariant=l}),null);
__d("bs_caml_int32",["bs_caml_builtin_exceptions"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();function h(n,o){if(o===0)throw c("bs_caml_builtin_exceptions").division_by_zero;else return n/o|0}function i(n,o){if(o===0)throw c("bs_caml_builtin_exceptions").division_by_zero;else return n%o}function j(n){return(n&255)<<8|(n&65280)>>>8}function k(n){return(n&255)<<24|(n&65280)<<8|(n&16711680)>>>8|(n&4278190080)>>>24}var l=Math.imul||function(n,o){o|=0;return((n>>16)*o<<16)+(n&65535)*o|0},m=k;g.div=h;g.mod_=i;g.caml_bswap16=j;g.caml_int32_bswap=k;g.caml_nativeint_bswap=m;g.imul=l}),null);
__d("bs_caml_utils",[],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h=String.prototype.repeat&&function(i,j){return j.repeat(i)}||function(i,j){__p&&__p();if(j.length==0||i==0)return"";if(j.length*i>=1<<28)throw new RangeError("repeat count must not overflow maximum string size");var k="";for(;;){if((i&1)==1)k+=j;i>>>=1;if(i==0)break;j+=j}return k};g.repeat=h}),null);
__d("bs_caml_int64",["bs_caml_obj","bs_caml_int32","bs_caml_utils","bs_caml_builtin_exceptions"],(function aa(ba,a,ca,da,ea,b){"use strict";__p&&__p();var c=[-2147483648,0],d=[134217727,1],e=[0,1],f=[0,0],g=[-1,4294967295];function h(B){return+((B&2147483648)!==0)}function i(B,C){var D=C[1],E=B[1],F=E+D&4294967295,G=h(E)&&(h(D)||!h(F))||h(D)&&!h(F)?1:0,H=B[0]+C[0]+G&4294967295;return[H,F>>>0]}function j(B){var C=B[0]^-1,D=B[1]^-1;return[C,D>>>0]}function k(B,C){if(B[0]===C[0])return+(B[1]===C[1]);else return 0}function l(B){if(k(B,c))return c;else return i(j(B),e)}function m(B,C){return i(B,l(C))}function n(B,C){if(C){var D=B[1];if(C>=32)return[D<<(C-32|0),0];else{var E=D>>>(32-C|0)|B[0]<<C;return[E,D<<C>>>0]}}else return B}function o(B,C){__p&&__p();if(C){var D=B[0],E=C-32|0;if(E)if(E>0){var F=D>>>E;return[0,F>>>0]}else{var G=D>>>C,H=D<<(-E|0)|B[1]>>>C;return[G,H>>>0]}else return[0,D>>>0]}else return B}function p(B,C){__p&&__p();if(C){var D=B[0];if(C<32){var E=D>>C,F=D<<(32-C|0)|B[1]>>>C;return[E,F>>>0]}else{var G=D>>(C-32|0);return[D>=0?0:-1,G>>>0]}}else return B}function q(B){if(B[0]!==0||B[1]!==0)return 0;else return 1}function r(B,C){__p&&__p();while(true){var D=C,E=B,F=0,G,H=E[0],I=0,J=0,K=0;if(H!==0)K=4;else if(E[1]!==0)K=4;else return f;if(K===4)if(D[0]!==0)J=3;else if(D[1]!==0)J=3;else return f;if(J===3)if(H!==-2147483648)I=2;else if(E[1]!==0)I=2;else{G=D[1];F=1}if(I===2){var L=D[0],M=E[1],N=0;if(L!==-2147483648)N=3;else if(D[1]!==0)N=3;else{G=M;F=1}if(N===3){var O=D[1];if(H<0)if(L<0){C=l(D);B=l(E);continue}else return l(r(l(E),D));else if(L<0)return l(r(E,l(D)));else{var P=H>>>16,Q=H&65535,R=M>>>16,S=M&65535,T=L>>>16,U=L&65535,V=O>>>16,W=O&65535,X=0,Y=0,Z=0,$=S*W;Z=($>>>16)+R*W;Y=Z>>>16;Z=(Z&65535)+S*V;Y=Y+(Z>>>16)+Q*W;X=Y>>>16;Y=(Y&65535)+R*V;X+=Y>>>16;Y=(Y&65535)+S*U;X+=Y>>>16;Y=Y&65535;X=X+(P*W+Q*V+R*U+S*T)&65535;var va=Y|X<<16,wa=$&65535|(Z&65535)<<16;return[va,wa>>>0]}}}if(F===1)if((G&1)===0)return f;else return c}}function s(B){var C=a("bs_caml_int32").caml_int32_bswap(B[1]),D=a("bs_caml_int32").caml_int32_bswap(B[0]);return[C,D>>>0]}function t(B,C){return[B[0]^C[0],(B[1]^C[1])>>>0]}function u(B,C){return[B[0]|C[0],(B[1]|C[1])>>>0]}function fa(B,C){return[B[0]&C[0],(B[1]&C[1])>>>0]}function v(B,C){var D=C[0],E=B[0];if(E>D)return 1;else if(E<D)return 0;else return+(B[1]>=C[1])}function ga(B,C){return 1-k(B,C)}function ha(B,C){return 1-v(B,C)}function w(B,C){if(B[0]>C[0])return 1;else if(B[0]<C[0])return 0;else return+(B[1]>C[1])}function ia(B,C){return 1-w(B,C)}function x(B){return B[0]*4294967296+B[1]}var y=Math.pow(2,32),ja=Math.pow(2,63),ka=-Math.pow(2,63);function z(B){__p&&__p();if(isNaN(B)||!isFinite(B))return f;else if(B<=ka)return c;else if(B+1>=ja)return d;else if(B<0)return l(z(-B));else{var C=B/y|0,D=B%y|0;return[C,D>>>0]}}function A(B,C){__p&&__p();while(true){var D=C,E=B,F=E[0],G=0,H=0;if(D[0]!==0)H=2;else if(D[1]!==0)H=2;else throw a("bs_caml_builtin_exceptions").division_by_zero;if(H===2)if(F!==-2147483648)if(F!==0)G=1;else if(E[1]!==0)G=1;else return f;else if(E[1]!==0)G=1;else if(k(D,e)||k(D,g))return E;else if(k(D,c))return e;else{var I=D[0],J=p(E,1),K=n(A(J,D),1),L=0;if(K[0]!==0)L=3;else if(K[1]!==0)L=3;else if(I<0)return e;else return l(e);if(L===3){var M=r(D,K),N=i(E,l(M));return i(K,A(N,D))}}if(G===1){var O=D[0],P=0;if(O!==-2147483648)P=2;else if(D[1]!==0)P=2;else return f;if(P===2)if(F<0)if(O<0){C=l(D);B=l(E);continue}else return l(A(l(E),D));else if(O<0)return l(A(E,l(D)));else{var Q=f,R=E;while(v(R,D)){var S=Math.max(1,Math.floor(x(R)/x(D))),T=Math.ceil(Math.log(S)/Math.LN2),U=T<=48?1:Math.pow(2,T-48),V=z(S),W=r(V,D);while(W[0]<0||w(W,R)){S-=U;V=z(S);W=r(V,D)}if(q(V))V=e;Q=i(Q,V);R=i(R,l(W))}return Q}}}}function la(B,C){var D=r(A(B,C),C);return i(B,l(D))}function ma(B,C){var D=A(B,C),E=r(D,C);return[D,i(B,l(E))]}function na(B,C){var D=a("bs_caml_obj").caml_nativeint_compare(B[0],C[0]);if(D)return D;else return a("bs_caml_obj").caml_nativeint_compare(B[1],C[1])}function oa(B){return[B<0?-1:0,B>>>0]}function pa(B){return B[1]|0}function qa(B){__p&&__p();var C=function C(I){return(I>>>0).toString(16)},D=B[0],E=B[1],F=0;if(D!==0)F=1;else if(E!==0)F=1;else return"0";if(F===1)if(E!==0)if(D!==0){var G=C(B[1]),H=8-G.length|0;if(H<=0)return C(B[0])+G;else return C(B[0])+(a("bs_caml_utils").repeat(H,"0")+G)}else return C(B[1]);else return C(B[0])+"00000000"}function ra(B){return[2147483647&B[0],B[1]]}function sa(B){var C=new Int32Array([B[1],B[0]]);return new Float64Array(C.buffer)[0]}function ta(B){var C=new Float64Array([B]),D=new Int32Array(C.buffer),E=D[1],F=E,G=D[0],H=G;return[F,H>>>0]}function ua(B,C){var D=B.charCodeAt(C+4|0)<<32|B.charCodeAt(C+5|0)<<40|B.charCodeAt(C+6|0)<<48|B.charCodeAt(C+7|0)<<56,E=B.charCodeAt(C)|B.charCodeAt(C+1|0)<<8|B.charCodeAt(C+2|0)<<16|B.charCodeAt(C+3|0)<<24;return[D,E>>>0]}b.min_int=c;b.max_int=d;b.one=e;b.zero=f;b.not=j;b.of_int32=oa;b.to_int32=pa;b.add=i;b.neg=l;b.sub=m;b.lsl_=n;b.lsr_=o;b.asr_=p;b.is_zero=q;b.mul=r;b.xor=t;b.or_=u;b.and_=fa;b.swap=s;b.ge=v;b.eq=k;b.neq=ga;b.lt=ha;b.gt=w;b.le=ia;b.to_float=x;b.of_float=z;b.div=A;b.mod_=la;b.div_mod=ma;b.compare=na;b.to_hex=qa;b.discard_sign=ra;b.float_of_bits=sa;b.bits_of_float=ta;b.get64=ua}),null);
__d("bs_caml_format",["bs_curry","bs_caml_int32","bs_caml_int64","bs_caml_utils","bs_caml_builtin_exceptions"],(function a(b,c,aa,ba,ca,d){"use strict";__p&&__p();function e(x){throw[c("bs_caml_builtin_exceptions").failure,x]}function f(x){__p&&__p();if(x>=65)if(x>=97)if(x>=123)return-1;else return x-87|0;else if(x>=91)return-1;else return x-55|0;else if(x>57||x<48)return-1;else return x-48|0}function g(x){switch(x){case 0:return 8;case 1:return 16;case 2:return 10;case 3:return 2}}function h(x){__p&&__p();var y=1,z=2,A=0;if(x[A]==="-"){y=-1;A=A+1|0}var B=x.charCodeAt(A),C=x.charCodeAt(A+1|0);if(B===48)if(C>=89)if(C!==98)if(C!==111){if(C===120){z=1;A=A+2|0}}else{z=0;A=A+2|0}else{z=3;A=A+2|0}else if(C!==66)if(C!==79){if(C>=88){z=1;A=A+2|0}}else{z=0;A=A+2|0}else{z=3;A=A+2|0}return[A,y,z]}function i(x){__p&&__p();var y=h(x),z=y[0],A=g(y[2]),B=4294967295,C=x.length,D=z<C?x.charCodeAt(z):0,E=f(D);if(E<0||E>=A)throw[c("bs_caml_builtin_exceptions").failure,"int_of_string"];var F=function F(I,J){__p&&__p();while(true){var K=J,L=I;if(K===C)return L;else{var M=x.charCodeAt(K);if(M===95){J=K+1|0;continue}else{var N=f(M);if(N<0||N>=A)throw[c("bs_caml_builtin_exceptions").failure,"int_of_string"];else{var O=A*L+N;if(O>B)throw[c("bs_caml_builtin_exceptions").failure,"int_of_string"];else{J=K+1|0;I=O;continue}}}}}},G=y[1]*F(E,z+1|0),H=G|0;if(A===10&&G!==H)throw[c("bs_caml_builtin_exceptions").failure,"int_of_string"];return H}function j(x){__p&&__p();var y=h(x),z=y[2],A=y[0],B=c("bs_caml_int64").of_int32(g(z)),C=c("bs_caml_int64").of_int32(y[1]),D;switch(z){case 0:D=[536870911,4294967295];break;case 1:D=[268435455,4294967295];break;case 2:D=[429496729,2576980377];break;case 3:D=[2147483647,4294967295];break}var E=x.length,F=A<E?x.charCodeAt(A):0,G=c("bs_caml_int64").of_int32(f(F));if(c("bs_caml_int64").lt(G,[0,0])||c("bs_caml_int64").ge(G,B))throw[c("bs_caml_builtin_exceptions").failure,"int64_of_string"];var H=function H(K,L){__p&&__p();while(true){var M=L,N=K;if(M===E)return N;else{var O=x.charCodeAt(M);if(O===95){L=M+1|0;continue}else{var P=c("bs_caml_int64").of_int32(f(O));if(c("bs_caml_int64").lt(P,[0,0])||c("bs_caml_int64").ge(P,B)||c("bs_caml_int64").gt(N,D))throw[c("bs_caml_builtin_exceptions").failure,"int64_of_string"];else{var Q=c("bs_caml_int64").add(c("bs_caml_int64").mul(B,N),P);L=M+1|0;K=Q;continue}}}}},I=c("bs_caml_int64").mul(C,H(G,A+1|0)),J=c("bs_caml_int64").or_(I,[0,0]);if(c("bs_caml_int64").eq(B,[0,10])&&c("bs_caml_int64").neq(I,J))throw[c("bs_caml_builtin_exceptions").failure,"int64_of_string"];return J}function k(x){switch(x){case 0:return 8;case 1:return 16;case 2:return 10}}function l(x){if(x>=65&&x<=90||x>=192&&x<=214||x>=216&&x<=222)return x+32|0;else return x}function m(x){__p&&__p();var y=x.length;if(y>31)throw[c("bs_caml_builtin_exceptions").invalid_argument,"format_int: format too long"];var z=["+","-"," ",0,2,0,0,0,1,-1,"f"],A=0;while(true){var B=A;if(B>=y)return z;else{var C=x.charCodeAt(B),D=0;if(C>=69)if(C>=88)if(C>=121)D=1;else switch(C-88|0){case 0:z[4]=1;z[7]=1;A=B+1|0;continue;case 13:case 14:case 15:D=5;break;case 12:case 17:D=4;break;case 23:z[4]=0;A=B+1|0;continue;case 29:z[4]=2;A=B+1|0;continue;case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 16:case 18:case 19:case 20:case 21:case 22:case 24:case 25:case 26:case 27:case 28:case 30:case 31:D=1;break;case 32:z[4]=1;A=B+1|0;continue}else if(C>=72)D=1;else{z[5]=1;z[7]=1;z[10]=String.fromCharCode(l(C));A=B+1|0;continue}else{var E=C-32|0;if(E>25||E<0)D=1;else switch(E){case 3:z[3]=1;A=B+1|0;continue;case 0:case 11:D=2;break;case 13:z[0]="-";A=B+1|0;continue;case 14:z[9]=0;var F=B+1|0;while(function(F){return function(){var H=x.charCodeAt(F)-48|0;return+(H>=0&&H<=9)}}(F)()){z[9]=(c("bs_caml_int32").imul(z[9],10)+x.charCodeAt(F)|0)-48|0;F=F+1|0}A=F;continue;case 1:case 2:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 12:case 15:D=1;break;case 16:z[2]="0";A=B+1|0;continue;case 17:case 18:case 19:case 20:case 21:case 22:case 23:case 24:case 25:D=3;break}}switch(D){case 1:A=B+1|0;continue;case 2:z[1]=String.fromCharCode(C);A=B+1|0;continue;case 3:z[6]=0;var G=B;while(function(G){return function(){var H=x.charCodeAt(G)-48|0;return+(H>=0&&H<=9)}}(G)()){z[6]=(c("bs_caml_int32").imul(z[6],10)+x.charCodeAt(G)|0)-48|0;G=G+1|0}A=G;continue;case 4:z[5]=1;z[4]=2;A=B+1|0;continue;case 5:z[5]=1;z[10]=String.fromCharCode(C);A=B+1|0;continue}}}}function n(x,y){__p&&__p();var z=x[0],A=x[1],B=x[2],C=x[3],D=x[4],E=x[5],F=x[6],G=x[7],H=x[8],I=y.length;if(E&&(H<0||A!=="-"))I=I+1|0;if(C)if(D){if(D===1)I=I+2|0}else I=I+1|0;var J="";if(z==="+"&&B===" ")for(var K=I,L=F-1|0;K<=L;++K)J=J+B;if(E)if(H<0)J=J+"-";else if(A!=="-")J=J+A;if(C&&D===0)J=J+"0";if(C&&D===1)J=J+"0x";if(z==="+"&&B==="0")for(var M=I,N=F-1|0;M<=N;++M)J=J+B;J=G?J+y.toUpperCase():J+y;if(z==="-")for(var O=I,P=F-1|0;O<=P;++O)J=J+" ";return J}function o(x,y){__p&&__p();if(x==="%d")return String(y);else{var z=m(x),A=z,B=y,C=B<0?A[5]?(A[8]=-1,-B):B>>>0:B,D=C.toString(k(A[4]));if(A[9]>=0){A[2]=" ";var E=A[9]-D.length|0;if(E>0)D=c("bs_caml_utils").repeat(E,"0")+D}return n(A,D)}}function p(x,y){__p&&__p();var z=m(x),A=z[5]&&c("bs_caml_int64").lt(y,[0,0])?(z[8]=-1,c("bs_caml_int64").neg(y)):y,B="",C=z[4];switch(C){case 0:var D=[0,8],E="01234567";if(c("bs_caml_int64").lt(A,[0,0])){var F=c("bs_caml_int64").discard_sign(A),G=c("bs_caml_int64").div_mod(F,D),H=c("bs_caml_int64").add([268435456,0],G[0]),I=G[1];B=String.fromCharCode(E.charCodeAt(I[1]|0))+B;while(c("bs_caml_int64").neq(H,[0,0])){var J=c("bs_caml_int64").div_mod(H,D);H=J[0];I=J[1];B=String.fromCharCode(E.charCodeAt(I[1]|0))+B}}else{var K=c("bs_caml_int64").div_mod(A,D),L=K[0],M=K[1];B=String.fromCharCode(E.charCodeAt(M[1]|0))+B;while(c("bs_caml_int64").neq(L,[0,0])){var N=c("bs_caml_int64").div_mod(L,D);L=N[0];M=N[1];B=String.fromCharCode(E.charCodeAt(M[1]|0))+B}}break;case 1:B=c("bs_caml_int64").to_hex(A)+B;break;case 2:var O=[0,10],P="0123456789";if(c("bs_caml_int64").lt(A,[0,0])){var Q=c("bs_caml_int64").discard_sign(A),R=c("bs_caml_int64").div_mod(Q,O),S=c("bs_caml_int64").div_mod(c("bs_caml_int64").add([0,8],R[1]),O),T=c("bs_caml_int64").add(c("bs_caml_int64").add([214748364,3435973836],R[0]),S[0]),U=S[1];B=String.fromCharCode(P.charCodeAt(U[1]|0))+B;while(c("bs_caml_int64").neq(T,[0,0])){var V=c("bs_caml_int64").div_mod(T,O);T=V[0];U=V[1];B=String.fromCharCode(P.charCodeAt(U[1]|0))+B}}else{var W=c("bs_caml_int64").div_mod(A,O),X=W[0],Y=W[1];B=String.fromCharCode(P.charCodeAt(Y[1]|0))+B;while(c("bs_caml_int64").neq(X,[0,0])){var Z=c("bs_caml_int64").div_mod(X,O);X=Z[0];Y=Z[1];B=String.fromCharCode(P.charCodeAt(Y[1]|0))+B}}break}if(z[9]>=0){z[2]=" ";var $=z[9]-B.length|0;if($>0)B=c("bs_caml_utils").repeat($,"0")+B}return n(z,B)}function q(x,y){__p&&__p();var z=m(x),A=z[9]<0?6:z[9],B=y<0?(z[8]=-1,-y):y,C="";if(isNaN(B)){C="nan";z[2]=" "}else if(isFinite(B)){var D=z[10];switch(D){case"e":C=B.toExponential(A);var E=C.length;if(C[E-3|0]==="e")C=C.slice(0,E-1|0)+("0"+C.slice(E-1|0));break;case"f":C=B.toFixed(A);break;case"g":var F=A!==0?A:1;C=B.toExponential(F-1|0);var G=C.indexOf("e"),H=Number(C.slice(G+1|0))|0;if(H<-4||B>=1e21||B.toFixed().length>F){var I=G-1|0;while(C[I]==="0")I=I-1|0;if(C[I]===".")I=I-1|0;C=C.slice(0,I+1|0)+C.slice(G);var J=C.length;if(C[J-3|0]==="e")C=C.slice(0,J-1|0)+("0"+C.slice(J-1|0))}else{var K=F;if(H<0){K=K-(H+1|0)|0;C=B.toFixed(K)}else while(function(){C=B.toFixed(K);return+(C.length>(F+1|0))}())K=K-1|0;if(K!==0){var L=C.length-1|0;while(C[L]==="0")L=L-1|0;if(C[L]===".")L=L-1|0;C=C.slice(0,L+1|0)}}break;default:}}else{C="inf";z[2]=" "}return n(z,C)}var r=function r(x,e){__p&&__p();var y=+x;if(x.length>0&&y===y)return y;x=x.replace(/_/g,"");y=+x;if(x.length>0&&y===y||/^[+-]?nan$/i.test(x))return y;if(/^ *0x[0-9a-f_]+p[+-]?[0-9_]+/i.test(x)){var z=x.indexOf("p");z=z==-1?x.indexOf("P"):z;var A=+x.substring(z+1);y=+x.substring(0,z);return y*Math.pow(2,A)}if(/^\+?inf(inity)?$/i.test(x))return Infinity;if(/^-inf(inity)?$/i.test(x))return-Infinity;e("float_of_string")};function s(x){return c("bs_curry")._2(r,x,e)}var t=o,u=o,v=i,w=i;d.caml_format_float=q;d.caml_format_int=o;d.caml_nativeint_format=t;d.caml_int32_format=u;d.caml_float_of_string=s;d.caml_int64_format=p;d.caml_int_of_string=i;d.caml_int32_of_string=v;d.caml_int64_of_string=j;d.caml_nativeint_of_string=w}),null);
__d("bs_caml_io",["bs_curry","bs_caml_builtin_exceptions"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();function h(u,v){return u+v}var i=undefined,j=["",function(u,v){var w=v.length-1|0;if(typeof process!=="undefined"&&process.stdout&&process.stdout.write)return process.stdout.write(v);else if(v[w]==="\n")return 0;else return 0}],k=["",function(u,v){var w=v.length-1|0;if(v[w]==="\n")return 0;else return 0}];function l(){throw[c("bs_caml_builtin_exceptions").failure,"caml_ml_open_descriptor_in not implemented"]}function m(){throw[c("bs_caml_builtin_exceptions").failure,"caml_ml_open_descriptor_out not implemented"]}function n(u){if(u[0]!==""){c("bs_curry")._2(u[1],u,u[0]);u[0]="";return 0}else return 0}var o=function o(u){return typeof process!=="undefined"&&process.stdout&&(process.stdout.write(u),true)};function p(u,v,w,x){__p&&__p();var y=w===0&&x===v.length?v:v.slice(w,x);if(typeof process!=="undefined"&&process.stdout&&process.stdout.write&&u===j)return process.stdout.write(y);else{var z=y.lastIndexOf("\n");if(z<0){u[0]=u[0]+y;return 0}else{u[0]=u[0]+y.slice(0,z+1|0);n(u);u[0]=u[0]+y.slice(z+1|0);return 0}}}function q(u,v){return p(u,String.fromCharCode(v),0,1)}function r(u,v,w,x){throw[c("bs_caml_builtin_exceptions").failure,"caml_ml_input ic not implemented"]}function s(){throw[c("bs_caml_builtin_exceptions").failure,"caml_ml_input_char not implemnted"]}function t(){return[j,[k,0]]}g.$caret=h;g.stdin=i;g.stdout=j;g.stderr=k;g.caml_ml_open_descriptor_in=l;g.caml_ml_open_descriptor_out=m;g.caml_ml_flush=n;g.node_std_output=o;g.caml_ml_output=p;g.caml_ml_output_char=q;g.caml_ml_input=r;g.caml_ml_input_char=s;g.caml_ml_out_channels_list=t}),null);
__d("bs_caml_missing_polyfill",[],(function a(b,c,d,e,f,g){"use strict";var h=function h(i){throw new Error(i)};g.not_implemented=h}),null);
__d("bs_caml_string",["bs_caml_builtin_exceptions"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();function h(v){return String.fromCharCode(v)}function i(v,w){if(w>=v.length||w<0)throw[c("bs_caml_builtin_exceptions").invalid_argument,"index out of bounds"];else return v.charCodeAt(w)}function j(v){if(v<0)throw[c("bs_caml_builtin_exceptions").invalid_argument,"String.create"];else return new Array(v)}function k(v,w){if(v===w)return 0;else if(v<w)return-1;else return 1}function l(v,w,x,y){if(x>0){for(var z=w,A=(x+w|0)-1|0;z<=A;++z)v[z]=y;return 0}else return 0}function m(v,w,x,y,z){__p&&__p();if(z>0){var A=v.length-w|0;if(z<=A){for(var B=0,C=z-1|0;B<=C;++B)x[y+B|0]=v.charCodeAt(w+B|0);return 0}else{for(var D=0,E=A-1|0;D<=E;++D)x[y+D|0]=v.charCodeAt(w+D|0);for(var F=A,G=z-1|0;F<=G;++F)x[y+F|0]=0;return 0}}else return 0}function n(v,w,x,y,z){__p&&__p();if(z>0)if(v===x){var A=v,B=w,C=y,D=z;if(B<C){var E=(A.length-C|0)-1|0,F=D-1|0,G=E>F?F:E;for(var H=G;H>=0;--H)A[C+H|0]=A[B+H|0];return 0}else if(B>C){var I=(A.length-B|0)-1|0,J=D-1|0,K=I>J?J:I;for(var L=0;L<=K;++L)A[C+L|0]=A[B+L|0];return 0}else return 0}else{var M=v.length-w|0;if(z<=M){for(var N=0,O=z-1|0;N<=O;++N)x[y+N|0]=v[w+N|0];return 0}else{for(var P=0,Q=M-1|0;P<=Q;++P)x[y+P|0]=v[w+P|0];for(var R=M,S=z-1|0;R<=S;++R)x[y+R|0]=0;return 0}}else return 0}function o(v){var w=v.length,x=new Array(w);for(var y=0,z=w-1|0;y<=z;++y)x[y]=v.charCodeAt(y);return x}function p(v){__p&&__p();var w=v,x=0,y=v.length,z="",A=y;if(x===0&&y<=4096&&y===w.length)return String.fromCharCode.apply(null,w);else{var B=0;while(A>0){var C=A<1024?A:1024,D=new Array(C);n(w,B,D,0,C);z=z+String.fromCharCode.apply(null,D);A=A-C|0;B=B+C|0}return z}}function q(v){var w=v.length,x=new Array(w);for(var y=0,z=w-1|0;y<=z;++y)x[y]=v[y];return p(x)}function r(v){if(v>31)return+(v<127);else return 0}function s(v,w){return v.charCodeAt(w)+(v.charCodeAt(w+1|0)<<8)|0}function t(v,w){return((v.charCodeAt(w)+(v.charCodeAt(w+1|0)<<8)|0)+(v.charCodeAt(w+2|0)<<16)|0)+(v.charCodeAt(w+3|0)<<24)|0}function u(v,w){if(w<0||w>=v.length)throw[c("bs_caml_builtin_exceptions").invalid_argument,"index out of bounds"];else return v.charCodeAt(w)}g.bytes_of_string=o;g.bytes_to_string=p;g.caml_is_printable=r;g.caml_string_of_char_array=q;g.caml_string_get=i;g.caml_string_compare=k;g.caml_create_string=j;g.caml_fill_string=l;g.caml_blit_string=m;g.caml_blit_bytes=n;g.caml_string_get16=s;g.caml_string_get32=t;g.string_of_char=h;g.get=u}),null);
__d("bs_caml_sys",["bs_caml_builtin_exceptions"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();function h(q){var r=typeof process==="undefined"?undefined:process;if(r!==undefined){var s=r.env[q];if(s!==undefined)return s;else throw c("bs_caml_builtin_exceptions").not_found}else throw c("bs_caml_builtin_exceptions").not_found}function i(){var q=typeof process==="undefined"?undefined:process;if(q!==undefined)return q.uptime();else return-1}function j(){return[((Date.now()|0)^4294967295)*Math.random()|0]}function k(){return 127}function l(){var q=typeof process==="undefined"?undefined:process;if(q!==undefined)return q.cwd();else return"/"}function m(){var q=typeof process==="undefined"?undefined:process;if(q!==undefined)if(q.argv==null)return["",[""]];else return[q.argv[0],q.argv];else return["",[""]]}function n(q){var r=typeof process==="undefined"?undefined:process;if(r!==undefined)return r.exit(q);else return 0}function o(){throw[c("bs_caml_builtin_exceptions").failure,"caml_sys_is_directory not implemented"]}function p(){throw[c("bs_caml_builtin_exceptions").failure,"caml_sys_file_exists not implemented"]}g.caml_sys_getenv=h;g.caml_sys_time=i;g.caml_sys_random_seed=j;g.caml_sys_system_command=k;g.caml_sys_getcwd=l;g.caml_sys_get_argv=m;g.caml_sys_exit=n;g.caml_sys_is_directory=o;g.caml_sys_file_exists=p}),null);
__d("bs_camlinternalFormatBasics",["bs_block"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();function h(k){__p&&__p();if(typeof k==="number")return 0;else switch(k.tag|0){case 0:return c("bs_block").__(0,[h(k[0])]);case 1:return c("bs_block").__(1,[h(k[0])]);case 2:return c("bs_block").__(2,[h(k[0])]);case 3:return c("bs_block").__(3,[h(k[0])]);case 4:return c("bs_block").__(4,[h(k[0])]);case 5:return c("bs_block").__(5,[h(k[0])]);case 6:return c("bs_block").__(6,[h(k[0])]);case 7:return c("bs_block").__(7,[h(k[0])]);case 8:return c("bs_block").__(8,[k[0],h(k[1])]);case 9:var l=k[0];return c("bs_block").__(9,[l,l,h(k[2])]);case 10:return c("bs_block").__(10,[h(k[0])]);case 11:return c("bs_block").__(11,[h(k[0])]);case 12:return c("bs_block").__(12,[h(k[0])]);case 13:return c("bs_block").__(13,[h(k[0])]);case 14:return c("bs_block").__(14,[h(k[0])])}}function i(k,l){__p&&__p();if(typeof k==="number")return l;else switch(k.tag|0){case 0:return c("bs_block").__(0,[i(k[0],l)]);case 1:return c("bs_block").__(1,[i(k[0],l)]);case 2:return c("bs_block").__(2,[i(k[0],l)]);case 3:return c("bs_block").__(3,[i(k[0],l)]);case 4:return c("bs_block").__(4,[i(k[0],l)]);case 5:return c("bs_block").__(5,[i(k[0],l)]);case 6:return c("bs_block").__(6,[i(k[0],l)]);case 7:return c("bs_block").__(7,[i(k[0],l)]);case 8:return c("bs_block").__(8,[k[0],i(k[1],l)]);case 9:return c("bs_block").__(9,[k[0],k[1],i(k[2],l)]);case 10:return c("bs_block").__(10,[i(k[0],l)]);case 11:return c("bs_block").__(11,[i(k[0],l)]);case 12:return c("bs_block").__(12,[i(k[0],l)]);case 13:return c("bs_block").__(13,[i(k[0],l)]);case 14:return c("bs_block").__(14,[i(k[0],l)])}}function j(k,l){__p&&__p();if(typeof k==="number")return l;else switch(k.tag|0){case 0:return c("bs_block").__(0,[j(k[0],l)]);case 1:return c("bs_block").__(1,[j(k[0],l)]);case 2:return c("bs_block").__(2,[k[0],j(k[1],l)]);case 3:return c("bs_block").__(3,[k[0],j(k[1],l)]);case 4:return c("bs_block").__(4,[k[0],k[1],k[2],j(k[3],l)]);case 5:return c("bs_block").__(5,[k[0],k[1],k[2],j(k[3],l)]);case 6:return c("bs_block").__(6,[k[0],k[1],k[2],j(k[3],l)]);case 7:return c("bs_block").__(7,[k[0],k[1],k[2],j(k[3],l)]);case 8:return c("bs_block").__(8,[k[0],k[1],k[2],j(k[3],l)]);case 9:return c("bs_block").__(9,[j(k[0],l)]);case 10:return c("bs_block").__(10,[j(k[0],l)]);case 11:return c("bs_block").__(11,[k[0],j(k[1],l)]);case 12:return c("bs_block").__(12,[k[0],j(k[1],l)]);case 13:return c("bs_block").__(13,[k[0],k[1],j(k[2],l)]);case 14:return c("bs_block").__(14,[k[0],k[1],j(k[2],l)]);case 15:return c("bs_block").__(15,[j(k[0],l)]);case 16:return c("bs_block").__(16,[j(k[0],l)]);case 17:return c("bs_block").__(17,[k[0],j(k[1],l)]);case 18:return c("bs_block").__(18,[k[0],j(k[1],l)]);case 19:return c("bs_block").__(19,[j(k[0],l)]);case 20:return c("bs_block").__(20,[k[0],k[1],j(k[2],l)]);case 21:return c("bs_block").__(21,[k[0],j(k[1],l)]);case 22:return c("bs_block").__(22,[j(k[0],l)]);case 23:return c("bs_block").__(23,[k[0],j(k[1],l)]);case 24:return c("bs_block").__(24,[k[0],k[1],j(k[2],l)])}}g.concat_fmtty=i;g.erase_rel=h;g.concat_fmt=j}),null);
__d("bs_pervasives",["bs_curry","bs_caml_io","bs_caml_obj","bs_caml_sys","bs_caml_format","bs_caml_string","bs_caml_exceptions","bs_caml_missing_polyfill","bs_caml_builtin_exceptions","bs_camlinternalFormatBasics"],(function aa(ba,a,ca,da,ea,b){"use strict";__p&&__p();function c(R){throw[a("bs_caml_builtin_exceptions").failure,R]}function d(R){throw[a("bs_caml_builtin_exceptions").invalid_argument,R]}var e=a("bs_caml_exceptions").create("Pervasives.Exit");function f(R,S){if(a("bs_caml_obj").caml_lessequal(R,S))return R;else return S}function g(R,S){if(a("bs_caml_obj").caml_greaterequal(R,S))return R;else return S}function h(R){if(R>=0)return R;else return-R|0}function i(R){return R^-1}var j=-2147483648;function k(R,S){return R+S}function l(R){if(R<0||R>255)throw[a("bs_caml_builtin_exceptions").invalid_argument,"char_of_int"];else return R}function m(R){if(R)return"true";else return"false"}function n(R){switch(R){case"false":return 0;case"true":return 1;default:throw[a("bs_caml_builtin_exceptions").invalid_argument,"bool_of_string"]}}function o(R){return""+R}function p(R){__p&&__p();var S=R.length,T=0;while(true){var U=T;if(U>=S)return k(R,".");else{var V=a("bs_caml_string").get(R,U);if(V>=48)if(V>=58)return R;else{T=U+1|0;continue}else if(V!==45)return R;else{T=U+1|0;continue}}}}function q(R){return p(a("bs_caml_format").caml_format_float("%.12g",R))}function r(R,S){if(R)return[R[0],r(R[1],S)];else return S}var s=a("bs_caml_io").stdin,t=a("bs_caml_io").stdout,u=a("bs_caml_io").stderr;function v(R,S,T){return a("bs_caml_io").caml_ml_open_descriptor_out(a("bs_caml_missing_polyfill").not_implemented("caml_sys_open not implemented by bucklescript yet\n"))}function w(R){return v([1,[3,[4,[7,0]]]],438,R)}function x(R){return v([1,[3,[4,[6,0]]]],438,R)}function y(){__p&&__p();var R=a("bs_caml_io").caml_ml_out_channels_list(0);while(true){var S=R;if(S){try{a("bs_caml_io").caml_ml_flush(S[0])}catch(T){}R=S[1];continue}else return 0}}function z(R,S){return a("bs_caml_io").caml_ml_output(R,S,0,S.length)}function A(R,S){return a("bs_caml_io").caml_ml_output(R,S,0,S.length)}function B(R,S,T,U){if(T<0||U<0||T>(S.length-U|0))throw[a("bs_caml_builtin_exceptions").invalid_argument,"output"];else return a("bs_caml_io").caml_ml_output(R,S,T,U)}function C(R,S,T,U){if(T<0||U<0||T>(S.length-U|0))throw[a("bs_caml_builtin_exceptions").invalid_argument,"output_substring"];else return a("bs_caml_io").caml_ml_output(R,S,T,U)}function D(R,S){return a("bs_caml_missing_polyfill").not_implemented("caml_output_value not implemented by bucklescript yet\n")}function E(R){a("bs_caml_io").caml_ml_flush(R);return a("bs_caml_missing_polyfill").not_implemented("caml_ml_close_channel not implemented by bucklescript yet\n")}function F(R){try{a("bs_caml_io").caml_ml_flush(R)}catch(S){}try{return a("bs_caml_missing_polyfill").not_implemented("caml_ml_close_channel not implemented by bucklescript yet\n")}catch(T){return 0}}function G(R,S,T){return a("bs_caml_io").caml_ml_open_descriptor_in(a("bs_caml_missing_polyfill").not_implemented("caml_sys_open not implemented by bucklescript yet\n"))}function H(R){return G([0,[7,0]],0,R)}function I(R){return G([0,[6,0]],0,R)}function J(R,S,T,U){if(T<0||U<0||T>(S.length-U|0))throw[a("bs_caml_builtin_exceptions").invalid_argument,"input"];else return a("bs_caml_missing_polyfill").not_implemented("caml_ml_input not implemented by bucklescript yet\n")}function K(R,S,T,U){__p&&__p();while(true){var V=U,W=T;if(V<=0)return 0;else{var X=a("bs_caml_missing_polyfill").not_implemented("caml_ml_input not implemented by bucklescript yet\n");if(X){U=V-X|0;T=W+X|0;continue}else throw a("bs_caml_builtin_exceptions").end_of_file}}}function L(R,S,T,U){if(T<0||U<0||T>(S.length-U|0))throw[a("bs_caml_builtin_exceptions").invalid_argument,"really_input"];else return K(R,S,T,U)}function M(R,S){var T=a("bs_caml_string").caml_create_string(S);L(R,T,0,S);return a("bs_caml_string").bytes_to_string(T)}function N(R){__p&&__p();var S=function S(U,V,W){__p&&__p();while(true){var X=W,Y=V;if(X){var Z=X[0],$=Z.length;a("bs_caml_string").caml_blit_bytes(Z,0,U,Y-$|0,$);W=X[1];V=Y-$|0;continue}else return U}},T=function T(U,V){__p&&__p();while(true){var W=V,X=U,Y=a("bs_caml_missing_polyfill").not_implemented("caml_ml_input_scan_line not implemented by bucklescript yet\n");if(Y)if(Y>0){var Z=a("bs_caml_string").caml_create_string(Y-1|0);a("bs_caml_missing_polyfill").not_implemented("caml_ml_input not implemented by bucklescript yet\n");a("bs_caml_io").caml_ml_input_char(R);if(X){var $=(W+Y|0)-1|0;return S(a("bs_caml_string").caml_create_string($),$,[Z,X])}else return Z}else{var eb=a("bs_caml_string").caml_create_string(-Y|0);a("bs_caml_missing_polyfill").not_implemented("caml_ml_input not implemented by bucklescript yet\n");V=W-Y|0;U=[eb,X];continue}else if(X)return S(a("bs_caml_string").caml_create_string(W),W,X);else throw a("bs_caml_builtin_exceptions").end_of_file}};return a("bs_caml_string").bytes_to_string(T(0,0))}function O(){try{return a("bs_caml_missing_polyfill").not_implemented("caml_ml_close_channel not implemented by bucklescript yet\n")}catch(R){return 0}}function fa(R){return a("bs_caml_io").caml_ml_output_char(t,R)}function ga(R){return A(t,R)}function ha(R){return z(t,R)}function ia(R){return A(t,""+R)}function ja(R){return A(t,p(a("bs_caml_format").caml_format_float("%.12g",R)))}function ka(R){return 0}function la(){a("bs_caml_io").caml_ml_output_char(t,10);return a("bs_caml_io").caml_ml_flush(t)}function ma(R){return a("bs_caml_io").caml_ml_output_char(u,R)}function na(R){return A(u,R)}function oa(R){return z(u,R)}function pa(R){return A(u,""+R)}function qa(R){return A(u,p(a("bs_caml_format").caml_format_float("%.12g",R)))}function ra(R){return 0}function sa(){a("bs_caml_io").caml_ml_output_char(u,10);return a("bs_caml_io").caml_ml_flush(u)}function ta(){a("bs_caml_io").caml_ml_flush(t);return N(s)}function ua(){return a("bs_caml_format").caml_int_of_string((a("bs_caml_io").caml_ml_flush(t),N(s)))}function va(){return a("bs_caml_format").caml_float_of_string((a("bs_caml_io").caml_ml_flush(t),N(s)))}function wa(R){return R[1]}function xa(R,S){return[a("bs_camlinternalFormatBasics").concat_fmt(R[0],S[0]),k(R[1],k("%,",S[1]))]}var P=[y];function ya(R){var S=P[0];P[0]=function(){a("bs_curry")._1(R,0);return a("bs_curry")._1(S,0)};return 0}function Q(){return a("bs_curry")._1(P[0],0)}function za(R){Q(0);return a("bs_caml_sys").caml_sys_exit(R)}var Aa=2147483647,Ba=Infinity,Ca=-Infinity,Da=NaN,Ea=Number.MAX_VALUE,Fa=Number.MIN_VALUE,Ga=2220446049250313e-31,Ha=a("bs_caml_io").caml_ml_flush,Ia=a("bs_caml_io").caml_ml_output_char,Ja=a("bs_caml_io").caml_ml_output_char;function Ka(R,S){return a("bs_caml_missing_polyfill").not_implemented("caml_ml_output_int not implemented by bucklescript yet\n")}function La(R,S){return a("bs_caml_missing_polyfill").not_implemented("caml_ml_seek_out not implemented by bucklescript yet\n")}function Ma(){return a("bs_caml_missing_polyfill").not_implemented("caml_ml_pos_out not implemented by bucklescript yet\n")}function Na(){return a("bs_caml_missing_polyfill").not_implemented("caml_ml_channel_size not implemented by bucklescript yet\n")}function Oa(R,S){return a("bs_caml_missing_polyfill").not_implemented("caml_ml_set_binary_mode not implemented by bucklescript yet\n")}var Pa=a("bs_caml_io").caml_ml_input_char,Qa=a("bs_caml_io").caml_ml_input_char;function Ra(){return a("bs_caml_missing_polyfill").not_implemented("caml_ml_input_int not implemented by bucklescript yet\n")}function Sa(){return a("bs_caml_missing_polyfill").not_implemented("caml_input_value not implemented by bucklescript yet\n")}function Ta(R,S){return a("bs_caml_missing_polyfill").not_implemented("caml_ml_seek_in not implemented by bucklescript yet\n")}function Ua(){return a("bs_caml_missing_polyfill").not_implemented("caml_ml_pos_in not implemented by bucklescript yet\n")}function Va(){return a("bs_caml_missing_polyfill").not_implemented("caml_ml_channel_size not implemented by bucklescript yet\n")}function Wa(){return a("bs_caml_missing_polyfill").not_implemented("caml_ml_close_channel not implemented by bucklescript yet\n")}function Xa(R,S){return a("bs_caml_missing_polyfill").not_implemented("caml_ml_set_binary_mode not implemented by bucklescript yet\n")}function Ya(R,S){return a("bs_caml_missing_polyfill").not_implemented("caml_ml_seek_out_64 not implemented by bucklescript yet\n")}function Za(){return a("bs_caml_missing_polyfill").not_implemented("caml_ml_pos_out_64 not implemented by bucklescript yet\n")}function $a(){return a("bs_caml_missing_polyfill").not_implemented("caml_ml_channel_size_64 not implemented by bucklescript yet\n")}function ab(R,S){return a("bs_caml_missing_polyfill").not_implemented("caml_ml_seek_in_64 not implemented by bucklescript yet\n")}function bb(){return a("bs_caml_missing_polyfill").not_implemented("caml_ml_pos_in_64 not implemented by bucklescript yet\n")}function cb(){return a("bs_caml_missing_polyfill").not_implemented("caml_ml_channel_size_64 not implemented by bucklescript yet\n")}var db=[Ya,Za,$a,ab,bb,cb];b.invalid_arg=d;b.failwith=c;b.Exit=e;b.min=f;b.max=g;b.abs=h;b.max_int=Aa;b.min_int=j;b.lnot=i;b.infinity=Ba;b.neg_infinity=Ca;b.nan=Da;b.max_float=Ea;b.min_float=Fa;b.epsilon_float=Ga;b.$caret=k;b.char_of_int=l;b.string_of_bool=m;b.bool_of_string=n;b.string_of_int=o;b.string_of_float=q;b.$at=r;b.stdin=s;b.stdout=t;b.stderr=u;b.print_char=fa;b.print_string=ga;b.print_bytes=ha;b.print_int=ia;b.print_float=ja;b.print_endline=ka;b.print_newline=la;b.prerr_char=ma;b.prerr_string=na;b.prerr_bytes=oa;b.prerr_int=pa;b.prerr_float=qa;b.prerr_endline=ra;b.prerr_newline=sa;b.read_line=ta;b.read_int=ua;b.read_float=va;b.open_out=w;b.open_out_bin=x;b.open_out_gen=v;b.flush=Ha;b.flush_all=y;b.output_char=Ia;b.output_string=A;b.output_bytes=z;b.output=B;b.output_substring=C;b.output_byte=Ja;b.output_binary_int=Ka;b.output_value=D;b.seek_out=La;b.pos_out=Ma;b.out_channel_length=Na;b.close_out=E;b.close_out_noerr=F;b.set_binary_mode_out=Oa;b.open_in=H;b.open_in_bin=I;b.open_in_gen=G;b.input_char=Pa;b.input_line=N;b.input=J;b.really_input=L;b.really_input_string=M;b.input_byte=Qa;b.input_binary_int=Ra;b.input_value=Sa;b.seek_in=Ta;b.pos_in=Ua;b.in_channel_length=Va;b.close_in=Wa;b.close_in_noerr=O;b.set_binary_mode_in=Xa;b.LargeFile=db;b.string_of_format=wa;b.$caret$caret=xa;b.exit=za;b.at_exit=ya;b.valid_float_lexem=p;b.unsafe_really_input=K;b.do_at_exit=Q}),null);
__d("bs_list",["bs_curry","bs_caml_obj","bs_pervasives","bs_caml_builtin_exceptions"],(function aa(ba,a,ca,da,ea,b){"use strict";__p&&__p();function c(q){__p&&__p();var r=0,s=q;while(true){var t=s,u=r;if(t){s=t[1];r=u+1|0;continue}else return u}}function fa(q){if(q)return q[0];else throw[a("bs_caml_builtin_exceptions").failure,"hd"]}function ga(q){if(q)return q[1];else throw[a("bs_caml_builtin_exceptions").failure,"tl"]}function ha(q,r){__p&&__p();if(r<0)throw[a("bs_caml_builtin_exceptions").invalid_argument,"List.nth"];else{var s=q,t=r;while(true){var u=t,v=s;if(v)if(u){t=u-1|0;s=v[1];continue}else return v[0];else throw[a("bs_caml_builtin_exceptions").failure,"nth"]}}}function d(q,r){while(true){var s=r,t=q;if(t){r=[t[0],s];q=t[1];continue}else return s}}function ia(q){return d(q,0)}function e(q){if(q)return a("bs_pervasives").$at(q[0],e(q[1]));else return 0}function f(q,r){if(r){var s=a("bs_curry")._1(q,r[0]);return[s,f(q,r[1])]}else return 0}function g(q,r,s){if(s){var t=a("bs_curry")._2(r,q,s[0]);return[t,g(q+1|0,r,s[1])]}else return 0}function ja(q,r){return g(0,q,r)}function ka(q,r){__p&&__p();var s=0,t=r;while(true){var u=t,v=s;if(u){t=u[1];s=[a("bs_curry")._1(q,u[0]),v];continue}else return v}}function la(q,r){while(true){var s=r;if(s){a("bs_curry")._1(q,s[0]);r=s[1];continue}else return 0}}function ma(q,r){__p&&__p();var s=0,t=q,u=r;while(true){var v=u,w=s;if(v){a("bs_curry")._2(t,w,v[0]);u=v[1];s=w+1|0;continue}else return 0}}function na(q,r,s){while(true){var t=s,u=r;if(t){s=t[1];r=a("bs_curry")._2(q,u,t[0]);continue}else return u}}function h(q,r,s){if(r)return a("bs_curry")._2(q,r[0],h(q,r[1],s));else return s}function i(q,r,s){if(r)if(s){var t=a("bs_curry")._2(q,r[0],s[0]);return[t,i(q,r[1],s[1])]}else throw[a("bs_caml_builtin_exceptions").invalid_argument,"List.map2"];else if(s)throw[a("bs_caml_builtin_exceptions").invalid_argument,"List.map2"];else return 0}function oa(q,r,s){__p&&__p();var t=0,u=r,v=s;while(true){var w=v,x=u,y=t;if(x)if(w){v=w[1];u=x[1];t=[a("bs_curry")._2(q,x[0],w[0]),y];continue}else throw[a("bs_caml_builtin_exceptions").invalid_argument,"List.rev_map2"];else if(w)throw[a("bs_caml_builtin_exceptions").invalid_argument,"List.rev_map2"];else return y}}function pa(q,r,s){__p&&__p();while(true){var t=s,u=r;if(u)if(t){a("bs_curry")._2(q,u[0],t[0]);s=t[1];r=u[1];continue}else throw[a("bs_caml_builtin_exceptions").invalid_argument,"List.iter2"];else if(t)throw[a("bs_caml_builtin_exceptions").invalid_argument,"List.iter2"];else return 0}}function qa(q,r,s,t){__p&&__p();while(true){var u=t,v=s,w=r;if(v)if(u){t=u[1];s=v[1];r=a("bs_curry")._3(q,w,v[0],u[0]);continue}else throw[a("bs_caml_builtin_exceptions").invalid_argument,"List.fold_left2"];else if(u)throw[a("bs_caml_builtin_exceptions").invalid_argument,"List.fold_left2"];else return w}}function j(q,r,s,t){if(r)if(s)return a("bs_curry")._3(q,r[0],s[0],j(q,r[1],s[1],t));else throw[a("bs_caml_builtin_exceptions").invalid_argument,"List.fold_right2"];else if(s)throw[a("bs_caml_builtin_exceptions").invalid_argument,"List.fold_right2"];else return t}function ra(q,r){__p&&__p();while(true){var s=r;if(s)if(a("bs_curry")._1(q,s[0])){r=s[1];continue}else return 0;else return 1}}function sa(q,r){__p&&__p();while(true){var s=r;if(s)if(a("bs_curry")._1(q,s[0]))return 1;else{r=s[1];continue}else return 0}}function ta(q,r,s){__p&&__p();while(true){var t=s,u=r;if(u)if(t)if(a("bs_curry")._2(q,u[0],t[0])){s=t[1];r=u[1];continue}else return 0;else throw[a("bs_caml_builtin_exceptions").invalid_argument,"List.for_all2"];else if(t)throw[a("bs_caml_builtin_exceptions").invalid_argument,"List.for_all2"];else return 1}}function ua(q,r,s){__p&&__p();while(true){var t=s,u=r;if(u)if(t)if(a("bs_curry")._2(q,u[0],t[0]))return 1;else{s=t[1];r=u[1];continue}else throw[a("bs_caml_builtin_exceptions").invalid_argument,"List.exists2"];else if(t)throw[a("bs_caml_builtin_exceptions").invalid_argument,"List.exists2"];else return 0}}function va(q,r){__p&&__p();while(true){var s=r;if(s)if(a("bs_caml_obj").caml_compare(s[0],q)){r=s[1];continue}else return 1;else return 0}}function wa(q,r){__p&&__p();while(true){var s=r;if(s)if(s[0]===q)return 1;else{r=s[1];continue}else return 0}}function xa(q,r){__p&&__p();while(true){var s=r;if(s){var t=s[0];if(a("bs_caml_obj").caml_compare(t[0],q)){r=s[1];continue}else return t[1]}else throw a("bs_caml_builtin_exceptions").not_found}}function ya(q,r){__p&&__p();while(true){var s=r;if(s){var t=s[0];if(t[0]===q)return t[1];else{r=s[1];continue}}else throw a("bs_caml_builtin_exceptions").not_found}}function za(q,r){__p&&__p();while(true){var s=r;if(s)if(a("bs_caml_obj").caml_compare(s[0][0],q)){r=s[1];continue}else return 1;else return 0}}function Aa(q,r){__p&&__p();while(true){var s=r;if(s)if(s[0][0]===q)return 1;else{r=s[1];continue}else return 0}}function k(q,r){if(r){var s=r[1],t=r[0];if(a("bs_caml_obj").caml_compare(t[0],q))return[t,k(q,s)];else return s}else return 0}function l(q,r){if(r){var s=r[1],t=r[0];if(t[0]===q)return s;else return[t,l(q,s)]}else return 0}function Ba(q,r){__p&&__p();while(true){var s=r;if(s){var t=s[0];if(a("bs_curry")._1(q,t))return t;else{r=s[1];continue}}else throw a("bs_caml_builtin_exceptions").not_found}}function Ca(q){__p&&__p();return function(r){__p&&__p();var s=0,t=r;while(true){var u=t,v=s;if(u){var w=u[1],x=u[0];if(a("bs_curry")._1(q,x)){t=w;s=[x,v];continue}else{t=w;continue}}else return d(v,0)}}}function Da(q,r){__p&&__p();var s=0,t=0,u=r;while(true){var v=u,w=t,x=s;if(v){var y=v[1],z=v[0];if(a("bs_curry")._1(q,z)){u=y;s=[z,x];continue}else{u=y;t=[z,w];continue}}else return[d(x,0),d(w,0)]}}function Ea(q){if(q){var r=q[0],s=Ea(q[1]);return[[r[0],s[0]],[r[1],s[1]]]}else return[0,0]}function Fa(q,r){if(q)if(r)return[[q[0],r[0]],Fa(q[1],r[1])];else throw[a("bs_caml_builtin_exceptions").invalid_argument,"List.combine"];else if(r)throw[a("bs_caml_builtin_exceptions").invalid_argument,"List.combine"];else return 0}function m(q,r,s){if(r)if(s){var t=s[0],u=r[0];if(a("bs_curry")._2(q,u,t)<=0)return[u,m(q,r[1],s)];else return[t,m(q,r,s[1])]}else return r;else return s}function n(q,r){__p&&__p();while(true){var s=r,t=q;if(t)if(s){r=s[1];q=t-1|0;continue}else throw[a("bs_caml_builtin_exceptions").assert_failure,["list.ml",223,11]];else return s}}function o(q,r){__p&&__p();var p=function p(u,r){__p&&__p();var v=0;if(u!==2)if(u!==3)v=1;else if(r){var w=r[1];if(w){var x=w[1];if(x){var y=x[0],z=w[0],A=r[0];if(a("bs_curry")._2(q,A,z)<=0)if(a("bs_curry")._2(q,z,y)<=0)return[A,[z,[y,0]]];else if(a("bs_curry")._2(q,A,y)<=0)return[A,[y,[z,0]]];else return[y,[A,[z,0]]];else if(a("bs_curry")._2(q,A,y)<=0)return[z,[A,[y,0]]];else if(a("bs_curry")._2(q,z,y)<=0)return[z,[y,[A,0]]];else return[y,[z,[A,0]]]}else v=1}else v=1}else v=1;else if(r){var B=r[1];if(B){var C=B[0],D=r[0];if(a("bs_curry")._2(q,D,C)<=0)return[D,[C,0]];else return[C,[D,0]]}else v=1}else v=1;if(v===1){var E=u>>1,F=u-E|0,G=n(E,r),H=s(E,r),I=s(F,G),J=H,K=I,L=0;while(true){var M=L,N=K,O=J;if(O)if(N){var P=N[0],Q=O[0];if(a("bs_curry")._2(q,Q,P)>0){L=[Q,M];J=O[1];continue}else{L=[P,M];K=N[1];continue}}else return d(O,M);else return d(N,M)}}},s=function s(u,r){__p&&__p();var v=0;if(u!==2)if(u!==3)v=1;else if(r){var w=r[1];if(w){var x=w[1];if(x){var y=x[0],z=w[0],A=r[0];if(a("bs_curry")._2(q,A,z)>0)if(a("bs_curry")._2(q,z,y)>0)return[A,[z,[y,0]]];else if(a("bs_curry")._2(q,A,y)>0)return[A,[y,[z,0]]];else return[y,[A,[z,0]]];else if(a("bs_curry")._2(q,A,y)>0)return[z,[A,[y,0]]];else if(a("bs_curry")._2(q,z,y)>0)return[z,[y,[A,0]]];else return[y,[z,[A,0]]]}else v=1}else v=1}else v=1;else if(r){var B=r[1];if(B){var C=B[0],D=r[0];if(a("bs_curry")._2(q,D,C)>0)return[D,[C,0]];else return[C,[D,0]]}else v=1}else v=1;if(v===1){var E=u>>1,F=u-E|0,G=n(E,r),H=p(E,r),I=p(F,G),J=H,K=I,L=0;while(true){var M=L,N=K,O=J;if(O)if(N){var P=N[0],Q=O[0];if(a("bs_curry")._2(q,Q,P)<=0){L=[Q,M];J=O[1];continue}else{L=[P,M];K=N[1];continue}}else return d(O,M);else return d(N,M)}}},t=c(r);if(t<2)return r;else return p(t,r)}function Ga(q,r){__p&&__p();var p=function p(u,r){__p&&__p();var v=0;if(u!==2)if(u!==3)v=1;else if(r){var w=r[1];if(w){var x=w[1];if(x){var y=x[0],z=w[0],A=r[0],B=a("bs_curry")._2(q,A,z);if(B)if(B<0){var C=a("bs_curry")._2(q,z,y);if(C)if(C<0)return[A,[z,[y,0]]];else{var D=a("bs_curry")._2(q,A,y);if(D)if(D<0)return[A,[y,[z,0]]];else return[y,[A,[z,0]]];else return[A,[z,0]]}else return[A,[z,0]]}else{var E=a("bs_curry")._2(q,A,y);if(E)if(E<0)return[z,[A,[y,0]]];else{var F=a("bs_curry")._2(q,z,y);if(F)if(F<0)return[z,[y,[A,0]]];else return[y,[z,[A,0]]];else return[z,[A,0]]}else return[z,[A,0]]}else{var G=a("bs_curry")._2(q,z,y);if(G)if(G<0)return[z,[y,0]];else return[y,[z,0]];else return[z,0]}}else v=1}else v=1}else v=1;else if(r){var H=r[1];if(H){var I=H[0],J=r[0],K=a("bs_curry")._2(q,J,I);if(K)if(K<0)return[J,[I,0]];else return[I,[J,0]];else return[J,0]}else v=1}else v=1;if(v===1){var L=u>>1,M=u-L|0,N=n(L,r),O=s(L,r),P=s(M,N),Q=O,R=P,S=0;while(true){var T=S,U=R,V=Q;if(V)if(U){var W=U[1],X=U[0],Y=V[1],Z=V[0],$=a("bs_curry")._2(q,Z,X);if($)if($>0){S=[Z,T];Q=Y;continue}else{S=[X,T];R=W;continue}else{S=[Z,T];R=W;Q=Y;continue}}else return d(V,T);else return d(U,T)}}},s=function s(u,r){__p&&__p();var v=0;if(u!==2)if(u!==3)v=1;else if(r){var w=r[1];if(w){var x=w[1];if(x){var y=x[0],z=w[0],A=r[0],B=a("bs_curry")._2(q,A,z);if(B)if(B>0){var C=a("bs_curry")._2(q,z,y);if(C)if(C>0)return[A,[z,[y,0]]];else{var D=a("bs_curry")._2(q,A,y);if(D)if(D>0)return[A,[y,[z,0]]];else return[y,[A,[z,0]]];else return[A,[z,0]]}else return[A,[z,0]]}else{var E=a("bs_curry")._2(q,A,y);if(E)if(E>0)return[z,[A,[y,0]]];else{var F=a("bs_curry")._2(q,z,y);if(F)if(F>0)return[z,[y,[A,0]]];else return[y,[z,[A,0]]];else return[z,[A,0]]}else return[z,[A,0]]}else{var G=a("bs_curry")._2(q,z,y);if(G)if(G>0)return[z,[y,0]];else return[y,[z,0]];else return[z,0]}}else v=1}else v=1}else v=1;else if(r){var H=r[1];if(H){var I=H[0],J=r[0],K=a("bs_curry")._2(q,J,I);if(K)if(K>0)return[J,[I,0]];else return[I,[J,0]];else return[J,0]}else v=1}else v=1;if(v===1){var L=u>>1,M=u-L|0,N=n(L,r),O=p(L,r),P=p(M,N),Q=O,R=P,S=0;while(true){var T=S,U=R,V=Q;if(V)if(U){var W=U[1],X=U[0],Y=V[1],Z=V[0],$=a("bs_curry")._2(q,Z,X);if($)if($<0){S=[Z,T];Q=Y;continue}else{S=[X,T];R=W;continue}else{S=[Z,T];R=W;Q=Y;continue}}else return d(V,T);else return d(U,T)}}},t=c(r);if(t<2)return r;else return p(t,r)}var Ha=a("bs_pervasives").$at,Ia=e,Ja=Ca,p=o,Ka=o;b.length=c;b.hd=fa;b.tl=ga;b.nth=ha;b.rev=ia;b.append=Ha;b.rev_append=d;b.concat=Ia;b.flatten=e;b.iter=la;b.iteri=ma;b.map=f;b.mapi=ja;b.rev_map=ka;b.fold_left=na;b.fold_right=h;b.iter2=pa;b.map2=i;b.rev_map2=oa;b.fold_left2=qa;b.fold_right2=j;b.for_all=ra;b.exists=sa;b.for_all2=ta;b.exists2=ua;b.mem=va;b.memq=wa;b.find=Ba;b.filter=Ja;b.find_all=Ca;b.partition=Da;b.assoc=xa;b.assq=ya;b.mem_assoc=za;b.mem_assq=Aa;b.remove_assoc=k;b.remove_assq=l;b.split=Ea;b.combine=Fa;b.sort=p;b.stable_sort=o;b.fast_sort=Ka;b.sort_uniq=Ga;b.merge=m}),null);
__d("ReasonReact.bs",["bs_list","bs_curry","React","bs_caml_builtin_exceptions"],(function aa(ba,a,ca,da,ea,b){"use strict";__p&&__p();function c(y,z,A){var B=[y,z].concat(A);return a("React").createElement.apply(null,B)}var d=null;function e(){return 0}function f(y,z,A){a("bs_curry")._1(y,A);return a("bs_curry")._1(z,A)}var g=[e,f];function h(){return 0}function i(){return 0}function j(){return 0}function k(){return 0}function l(){return 1}function m(y){return y[2]}function n(){return"RenderNotImplemented"}function o(){return 0}function p(y,z){return 0}function q(){return 0}function r(y,z,A){var B=y.reasonProps;if(B==null)if(z)return[a("bs_curry")._1(z[0],y)];else throw[a("bs_caml_builtin_exceptions").invalid_argument,"A JS component called the Reason component "+(A+" which didn't implement the JS->Reason React props conversion.")];else return B}function s(y){__p&&__p();return a("React").createClass({displayName:y,subscriptions:null,self:function z(A,B){var C=this;return[C.handleMethod,C.reduceMethod,A,B,C.sendMethod]},transitionNextTotalState:function z(A,B){if(typeof B==="number")return A;else switch(B.tag|0){case 0:return{reasonState:B[0],reasonStateVersion:A.reasonStateVersion+1|0,reasonStateVersionUsedToComputeSubelements:A.reasonStateVersionUsedToComputeSubelements,sideEffects:A.sideEffects};case 1:return{reasonState:B[0],reasonStateVersion:A.reasonStateVersion+1|0,reasonStateVersionUsedToComputeSubelements:A.reasonStateVersionUsedToComputeSubelements+1|0,sideEffects:A.sideEffects};case 2:return{reasonState:A.reasonState,reasonStateVersion:A.reasonStateVersion+1|0,reasonStateVersionUsedToComputeSubelements:A.reasonStateVersionUsedToComputeSubelements+1|0,sideEffects:[B[0],A.sideEffects]};case 3:return{reasonState:B[0],reasonStateVersion:A.reasonStateVersion+1|0,reasonStateVersionUsedToComputeSubelements:A.reasonStateVersionUsedToComputeSubelements,sideEffects:[B[1],A.sideEffects]};case 4:return{reasonState:B[0],reasonStateVersion:A.reasonStateVersion+1|0,reasonStateVersionUsedToComputeSubelements:A.reasonStateVersionUsedToComputeSubelements+1|0,sideEffects:[B[1],A.sideEffects]}}},getInitialState:function z(){var A=this,B=r(A.props,A.jsPropsToReason,y),C=a("bs_curry")._1(B[0][10],0);return{reasonState:C,reasonStateVersion:1,reasonStateVersionUsedToComputeSubelements:1,sideEffects:0}},componentDidMount:function z(){__p&&__p();var A=this,B=this,C=r(B.props,B.jsPropsToReason,y),D=C[0],E=B.state,F=E.reasonState,G=A.self(F,D[11]);if(D[13]!==q){var H=a("bs_list").map(function(K){var L=K[1],M=a("bs_curry")._1(K[0],0);return function(){return a("bs_curry")._1(L,M)}},a("bs_curry")._1(D[13],G));A.subscriptions=H}if(D[4]!==h){var I=a("bs_curry")._1(D[4],G),J=A.transitionNextTotalState(E,I);if(J.reasonStateVersion!==E.reasonStateVersion)return B.setState(J);else return 0}else return 0},componentDidUpdate:function z(A,B){var C=this,D=this,E=D.state,F=E.reasonState,G=D.props,H=r(G,D.jsPropsToReason,y),I=H[0];if(I[5]!==j){var J=+(A===G),K=J!==0?H:r(A,D.jsPropsToReason,y),L=B.reasonState,M=C.self(F,I[11]),N=M[0],O=M[1],P=K[0][11],Q=M[4],R=[N,O,L,P,Q];return a("bs_curry")._1(I[5],[R,M])}else return 0},componentWillUnmount:function z(){var A=this,B=this,C=r(B.props,B.jsPropsToReason,y),D=C[0],E=B.state,F=E.reasonState;if(D[6]!==k)a("bs_curry")._1(D[6],A.self(F,D[11]));var G=A.subscriptions;if(G==null)return 0;else return a("bs_list").iter(function(H){return a("bs_curry")._1(H,0)},a("bs_list").rev(G))},componentWillUpdate:function z(A,B){var C=this,D=this,E=r(A,D.jsPropsToReason,y),F=E[0];if(F[7]!==i){var G=D.props,H=+(A===G),I=H!==0?E:r(G,D.jsPropsToReason,y),J=D.state,K=J.reasonState,L=B.reasonState,M=C.self(L,F[11]),N=M[0],O=M[1],P=I[0][11],Q=M[4],R=[N,O,K,P,Q];return a("bs_curry")._1(F[7],[R,M])}else return 0},componentWillReceiveProps:function z(A){__p&&__p();var B=this,C=this,D=r(A,C.jsPropsToReason,y),E=D[0];if(E[3]!==m){var F=C.props,G=+(A===F),H=G!==0?D:r(F,C.jsPropsToReason,y),I=H[0];return C.setState(function(J,K){var L=J.reasonState,M=J.reasonStateVersion,N=B.self(L,I[11]),O=a("bs_curry")._1(E[3],N),G=+(O!==L),P=G!==0?M+1|0:M;if(P!==M)return{reasonState:O,reasonStateVersion:P,reasonStateVersionUsedToComputeSubelements:J.reasonStateVersionUsedToComputeSubelements,sideEffects:O.sideEffects};else return J})}else return 0},shouldComponentUpdate:function z(A,B,C){__p&&__p();var D=this,E=this,F=E.props,G=+(A!==F),H=r(E.props,E.jsPropsToReason,y),I=+(A===F),J=I!==0?H:r(A,E.jsPropsToReason,y),K=J[0],L=B.reasonStateVersion,M=B.reasonStateVersionUsedToComputeSubelements,N=+(M!==L),O=G||N,P=B.reasonState,Q=D.self(P,K[11]),R;if(O&&K[8]!==l){var ja=E.state,ka=ja.reasonState,la=Q[0],ma=Q[1],na=H[0][11],oa=Q[4],pa=[la,ma,ka,na,oa];R=a("bs_curry")._1(K[8],[pa,Q])}else R=O;B.reasonStateVersionUsedToComputeSubelements=L;var S=a("bs_list").rev(B.sideEffects);if(S!==0){a("bs_list").iter(function(T){return a("bs_curry")._1(T,Q)},S);E.setState(function(T,C){__p&&__p();var U=function U(W,X,Y){__p&&__p();while(true){var Z=Y,V=X,$=W;if(Z)if(V>0){Y=Z[1];X=V-1|0;W=[Z[0],$];continue}else return a("bs_list").rev($);else return a("bs_list").rev($)}},V=a("bs_list").length(T.sideEffects)-a("bs_list").length(B.sideEffects)|0,qa=U(0,V,T.sideEffects);return{reasonState:T.reasonState,reasonStateVersion:T.reasonStateVersion,reasonStateVersionUsedToComputeSubelements:T.reasonStateVersionUsedToComputeSubelements,sideEffects:qa}})}return R},handleMethod:function z(A){var B=this,C=this;return function(D){var E=C.state,F=E.reasonState,G=r(C.props,C.jsPropsToReason,y);return a("bs_curry")._2(A,D,B.self(F,G[0][11]))}},updateMethod:function z(A){__p&&__p();var B=this,C=this;return function(D){var E=C.state,F=E.reasonState,G=r(C.props,C.jsPropsToReason,y),H=a("bs_curry")._2(A,D,B.self(F,G[0][11]));if(H){var I=B.transitionNextTotalState(E,H);if(I.reasonStateVersion!==E.reasonStateVersion)return C.setState(I);else return 0}else return d}},sendMethod:function z(A){__p&&__p();var B=this,C=this,D=r(C.props,C.jsPropsToReason,y),E=D[0];if(E[12]!==p){var F=a("bs_curry")._1(E[12],A);return C.setState(function(G,H){var I=G.reasonState,J=a("bs_curry")._1(F,I);if(J){var K=B.transitionNextTotalState(G,J);if(K.reasonStateVersion!==G.reasonStateVersion)return K;else return d}else return d})}else return 0},reduceMethod:function z(A,B){var C=this;return C.sendMethod(a("bs_curry")._1(A,B))},render:function z(){var A=this,B=this,C=r(B.props,B.jsPropsToReason,y),D=C[0],E=B.state,F=E.reasonState;return a("bs_curry")._1(D[9],A.self(F,D[11]))}})}function t(y){return[y,s(y),[0],m,h,j,k,i,l,n,o,0,p,q,0]}var u=t,v=t,w=t,x=t;function fa(y,z,A){var B=y?y[0]:undefined,C=z?z[0]:undefined,D=[A],E=A[14];if(E)return a("bs_curry")._2(E[0],B,C);else return a("React").createElement(A[1],{key:B,ref:C,reasonProps:D})}function ga(y,z){var A=y[1].prototype;A.jsPropsToReason=[z];return y[1]}var ha=t("interop");function ia(y,z,A){var B=[function(D,E){var F=y,G=z,H=A,I=D,J=E,K=Object.assign(Object.assign({},G),{ref:J,key:I}),L=[F,K].concat(H);return a("React").createElement.apply(null,L)}],C=ha.slice();C[14]=B;return C}b.Callback=g;b.statelessComponent=u;b.statelessComponentWithRetainedProps=v;b.reducerComponent=w;b.reducerComponentWithRetainedProps=x;b.element=fa;b.wrapReasonForJs=ga;b.createDomElement=c;b.wrapJsForReason=ia}),null);
__d("bs_js_exn",["bs_caml_exceptions"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h=c("bs_caml_exceptions").create("Js_exn.Error");function i(q){if(c("bs_caml_exceptions").isCamlExceptionOrOpenVariant(q))return q;else return[h,q]}function j(q){throw new Error(q)}function k(q){throw new EvalError(q)}function l(q){throw new RangeError(q)}function m(q){throw new ReferenceError(q)}function n(q){throw new SyntaxError(q)}function o(q){throw new TypeError(q)}function p(q){throw new URIError(q)}g.$$Error=h;g.internalToOCamlException=i;g.raiseError=j;g.raiseEvalError=k;g.raiseRangeError=l;g.raiseReferenceError=m;g.raiseSyntaxError=n;g.raiseTypeError=o;g.raiseUriError=p}),null);
__d("bs_array",["bs_curry","bs_js_exn","bs_caml_array","bs_caml_exceptions","bs_caml_builtin_exceptions"],(function aa(ba,a,ca,da,ea,b){"use strict";__p&&__p();function c(x,y){if(x)if(x<0)throw[a("bs_caml_builtin_exceptions").invalid_argument,"Array.init"];else{var z=a("bs_caml_array").caml_make_vect(x,a("bs_curry")._1(y,0));for(var A=1,B=x-1|0;A<=B;++A)z[A]=a("bs_curry")._1(y,A);return z}else return[]}function d(x,y,c){var z=a("bs_caml_array").caml_make_vect(x,[]);for(var A=0,B=x-1|0;A<=B;++A)z[A]=a("bs_caml_array").caml_make_vect(y,c);return z}function e(x){var y=x.length;if(y)return a("bs_caml_array").caml_array_sub(x,0,y);else return[]}function f(x,y){var z=x.length;if(z)if(y.length)return x.concat(y);else return a("bs_caml_array").caml_array_sub(x,0,z);else return e(y)}function g(x,y,z){if(z<0||y>(x.length-z|0))throw[a("bs_caml_builtin_exceptions").invalid_argument,"Array.sub"];else return a("bs_caml_array").caml_array_sub(x,y,z)}function h(x,y,z,A){if(y<0||z<0||y>(x.length-z|0))throw[a("bs_caml_builtin_exceptions").invalid_argument,"Array.fill"];else{for(var B=y,C=(y+z|0)-1|0;B<=C;++B)x[B]=A;return 0}}function i(x,y,z,A,B){if(B<0||y<0||y>(x.length-B|0)||A<0||A>(z.length-B|0))throw[a("bs_caml_builtin_exceptions").invalid_argument,"Array.blit"];else return a("bs_caml_array").caml_array_blit(x,y,z,A,B)}function j(x,y){for(var z=0,A=y.length-1|0;z<=A;++z)a("bs_curry")._1(x,y[z]);return 0}function k(x,y){var z=y.length;if(z){var A=a("bs_caml_array").caml_make_vect(z,a("bs_curry")._1(x,y[0]));for(var B=1,C=z-1|0;B<=C;++B)A[B]=a("bs_curry")._1(x,y[B]);return A}else return[]}function l(x,y){for(var z=0,A=y.length-1|0;z<=A;++z)a("bs_curry")._2(x,z,y[z]);return 0}function m(x,y){var z=y.length;if(z){var A=a("bs_caml_array").caml_make_vect(z,a("bs_curry")._2(x,0,y[0]));for(var B=1,C=z-1|0;B<=C;++B)A[B]=a("bs_curry")._2(x,B,y[B]);return A}else return[]}function n(x){__p&&__p();var y=x.length-1|0,z=0;while(true){var A=z,B=y;if(B<0)return A;else{z=[x[B],A];y=B-1|0;continue}}}function o(x,y){while(true){var z=y,A=x;if(z){y=z[1];x=A+1|0;continue}else return A}}function p(x){__p&&__p();if(x){var y=a("bs_caml_array").caml_make_vect(o(0,x),x[0]),z=1,A=x[1];while(true){var B=A,C=z;if(B){y[C]=B[0];A=B[1];z=C+1|0;continue}else return y}}else return[]}function q(x,y,z){var A=y;for(var B=0,C=z.length-1|0;B<=C;++B)A=a("bs_curry")._2(x,A,z[B]);return A}function r(x,y,z){var A=z;for(var B=y.length-1|0;B>=0;--B)A=a("bs_curry")._2(x,y[B],A);return A}var s=a("bs_caml_exceptions").create("Array.Bottom");function t(x,y){__p&&__p();var z=function z(D,E){__p&&__p();var I=((E+E|0)+E|0)+1|0,J=I;if((I+2|0)<D){if(a("bs_curry")._2(x,a("bs_caml_array").caml_array_get(y,I),a("bs_caml_array").caml_array_get(y,I+1|0))<0)J=I+1|0;if(a("bs_curry")._2(x,a("bs_caml_array").caml_array_get(y,J),a("bs_caml_array").caml_array_get(y,I+2|0))<0)J=I+2|0;return J}else if((I+1|0)<D&&a("bs_curry")._2(x,a("bs_caml_array").caml_array_get(y,I),a("bs_caml_array").caml_array_get(y,I+1|0))<0)return I+1|0;else if(I<D)return I;else throw[s,E]},A=function A(D,E,G){__p&&__p();try{var I=D,J=E,H=G;while(true){var F=J,K=z(I,F);if(a("bs_curry")._2(x,a("bs_caml_array").caml_array_get(y,K),H)>0){a("bs_caml_array").caml_array_set(y,F,a("bs_caml_array").caml_array_get(y,K));J=K;continue}else return a("bs_caml_array").caml_array_set(y,F,H)}}catch(L){var M=a("bs_js_exn").internalToOCamlException(L);if(M[0]===s)return a("bs_caml_array").caml_array_set(y,M[1],G);else throw M}},B=function B(D,E){__p&&__p();try{var I=D,J=E;while(true){var F=J,K=z(I,F);a("bs_caml_array").caml_array_set(y,F,a("bs_caml_array").caml_array_get(y,K));J=K;continue}}catch(L){var M=a("bs_js_exn").internalToOCamlException(L);if(M[0]===s)return M[1];else throw M}},C=function C(I,G){__p&&__p();while(true){var E=I,J=(E-1|0)/3|0;if(E===J)throw[a("bs_caml_builtin_exceptions").assert_failure,["array.ml",168,4]];if(a("bs_curry")._2(x,a("bs_caml_array").caml_array_get(y,J),G)<0){a("bs_caml_array").caml_array_set(y,E,a("bs_caml_array").caml_array_get(y,J));if(J>0){I=J;continue}else return a("bs_caml_array").caml_array_set(y,0,G)}else return a("bs_caml_array").caml_array_set(y,E,G)}},D=y.length;for(var E=((D+1|0)/3|0)-1|0;E>=0;--E)A(D,E,a("bs_caml_array").caml_array_get(y,E));for(var F=D-1|0;F>=2;--F){var G=a("bs_caml_array").caml_array_get(y,F);a("bs_caml_array").caml_array_set(y,F,a("bs_caml_array").caml_array_get(y,0));C(B(F,0),G)}if(D>1){var H=a("bs_caml_array").caml_array_get(y,1);a("bs_caml_array").caml_array_set(y,1,a("bs_caml_array").caml_array_get(y,0));return a("bs_caml_array").caml_array_set(y,0,H)}else return 0}function u(x,y){__p&&__p();var z=function z(G,H,I,J,K,L,M){__p&&__p();var N=G+H|0,O=J+K|0,P=G,Q=a("bs_caml_array").caml_array_get(y,G),R=J,S=a("bs_caml_array").caml_array_get(I,J),T=M;while(true){var U=T,V=S,W=R,X=Q,Y=P;if(a("bs_curry")._2(x,X,V)<=0){a("bs_caml_array").caml_array_set(L,U,X);var Z=Y+1|0;if(Z<N){T=U+1|0;Q=a("bs_caml_array").caml_array_get(y,Z);P=Z;continue}else return i(I,W,L,U+1|0,O-W|0)}else{a("bs_caml_array").caml_array_set(L,U,V);var $=W+1|0;if($<O){T=U+1|0;S=a("bs_caml_array").caml_array_get(I,$);R=$;continue}else return i(y,Y,L,U+1|0,N-Y|0)}}},A=function A(G,H,I,J){for(var K=0,L=J-1|0;K<=L;++K){var M=a("bs_caml_array").caml_array_get(y,G+K|0),N=(I+K|0)-1|0;while(N>=I&&a("bs_curry")._2(x,a("bs_caml_array").caml_array_get(H,N),M)>0){a("bs_caml_array").caml_array_set(H,N+1|0,a("bs_caml_array").caml_array_get(H,N));N=N-1|0}a("bs_caml_array").caml_array_set(H,N+1|0,M)}return 0},B=function B(G,H,I,J){if(J<=5)return A(G,H,I,J);else{var D=J/2|0,E=J-D|0;B(G+D|0,H,I+D|0,E);B(G,y,G+E|0,D);return z(G+E|0,D,H,I+D|0,E,H,I)}},C=y.length;if(C<=5)return A(0,y,0,C);else{var D=C/2|0,E=C-D|0,F=a("bs_caml_array").caml_make_vect(E,a("bs_caml_array").caml_array_get(y,0));B(D,F,0,E);B(0,y,E,D);return z(E,D,F,0,E,y,0)}}var v=d,w=a("bs_caml_array").caml_array_concat,fa=u;b.init=c;b.make_matrix=d;b.create_matrix=v;b.append=f;b.concat=w;b.sub=g;b.copy=e;b.fill=h;b.blit=i;b.to_list=n;b.of_list=p;b.iter=j;b.map=k;b.iteri=l;b.mapi=m;b.fold_left=q;b.fold_right=r;b.sort=t;b.stable_sort=u;b.fast_sort=fa}),null);
__d("bs_js_boolean",[],(function a(b,c,d,e,f,g){"use strict";function h(i){if(i)return true;else return false}g.to_js_boolean=h}),null);
__d("Utils.bs",["bs_array","bs_curry","bs_js_boolean","bs_caml_builtin_exceptions"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();function h(q){if(q==null)return 0;else return+q}function i(q,r){if(q)return q[0];else return r}function j(q){return+((q==null?0:[q])!==0)}function k(q){if(q)return q[0];else return 0}function l(q){if(q==null)return 0;else return[+q]}function m(q){if(q)return c("bs_js_boolean").to_js_boolean(q[0]);else return undefined}function n(q){if(q)return c("bs_js_boolean").to_js_boolean(q[0]);else return false}function o(q,r){__p&&__p();var s=q,t=r,u=0;while(true){var v=u,w=t;if(w){var x=w[1],y=c("bs_curry")._1(s,w[0]);if(y){u=[y[0],v];t=x;continue}else{t=x;continue}}else return v}}function p(q){return c("bs_array").map(function(r){if(r)return r[0];else throw[c("bs_caml_builtin_exceptions").invalid_argument,"arrayCompact: sorry, something went wrong."]},q.filter(function(r){if(r)return 1;else return 0}))}g.isTruthy=h;g.$pipe$unknown=i;g.isDefined=j;g.isSomeTrue=k;g.nullUndefinedBooleanToOptionBool=l;g.optionBoolToNullUndefinedBoolean=m;g.optionBoolToBoolean=n;g.listFilterMap=o;g.arrayCompact=p}),null);
__d("bs_js_primitive",[],(function a(b,c,d,e,f,g){"use strict";__p&&__p();function h(n){if(n===null)return 1;else return+(n===undefined)}function i(n){if(n===null||n===undefined)return 0;else return[n]}function j(n){if(n===undefined)return 0;else return[n]}function k(n){if(n===null)return 0;else return[n]}function l(n){if(n)return n[0];else return undefined}function m(n){if(n)return n[0][1];else return undefined}g.is_nil_undef=h;g.null_undefined_to_opt=i;g.undefined_to_opt=j;g.null_to_opt=k;g.option_get=l;g.option_get_unwrap=m}),null);
__d("MessengerState.bs",["bs_list","bs_array","bs_block","bs_curry","Utils.bs","CurrentUser","ReasonReact.bs","bs_js_primitive"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h={};function i(o){__p&&__p();var p=h[o];if(p!==undefined)return p;else{var q=[[{}]],r=[0],s=function s(v){__p&&__p();q[0]=c("bs_array").fold_left(function(q,w){var x=w[0][0];Object.keys(x).forEach(function(y){var z=x[y],A=c("Utils.bs").$pipe$unknown(c("bs_js_primitive").undefined_to_opt(q[0][y]),0);if(z>A){q[0][y]=z;return 0}else return 0});return[q[0]]},q[0],v);return c("bs_list").iter(function(w){return c("bs_curry")._1(w,q[0])},r[0])},t=function t(v){__p&&__p();r[0]=[v,r[0]];c("bs_curry")._1(v,q[0]);return function(w){__p&&__p();var x=v,y=function y(r){if(r){var z=r[1],A=r[0];if(A===x)return z;else return[A,y(z)]}else return 0};r[0]=y(r[0]);return 0}},j=function j(){return q[0]},u=[s,t,j];h[o]=u;return u}}function j(){return i(c("CurrentUser").getID())}function k(o,p){var q=[];if(!(p==null)){var r=p.delivery_receipts;if(!(r==null))q.push([[r]])}return c("bs_curry")._1(o[0],q)}var l=c("ReasonReact.bs").reducerComponent("MessengerStateRoot");function m(o,p){__p&&__p();var q=l.slice();q[9]=function(r){return c("bs_curry")._1(p,r[2])};q[10]=function(){return c("bs_curry")._1(i(o)[2],0)};q[12]=function(r,s){return c("bs_block").__(0,[r])};q[13]=function(r){var s=r[4];return[[function(){return c("bs_curry")._1(i(o)[1],s)},function(t){return c("bs_curry")._1(t,0)}],0]};return q}var n=[m];g.getForFBID=i;g.get=j;g.updateJS=k;g.Root=n}),null);
__d("MercuryDispatcher",["invariant","ArbiterMixin","MessengerState.bs","LogHistory","MercuryActionType","MercuryPayloadSource","MercurySingletonProvider","MercuryThreadInformer","isEmpty","mixin"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i,j,k=c("LogHistory").getInstance("mercury_dispatcher");i=babelHelpers.inherits(l,c("mixin")(c("ArbiterMixin")));j=i&&i.prototype;l.getForFBID=function(n){return m.getForFBID(n)};l.get=function(){return m.get()};function l(n){j.constructor.call(this);this.$MercuryDispatcher1=n;this.$MercuryDispatcher2=c("MessengerState.bs").getForFBID(n)}l.prototype.handleUpdate=function(n){__p&&__p();this.$MercuryDispatcher3(n);!!n.from_client!==!!n.preprocessed||h(0);delete n.preprocessed;if(!c("isEmpty")(n))c("MercuryThreadInformer").getForFBID(this.$MercuryDispatcher1).synchronizeInforms(function(){__p&&__p();if(n.payload_source===c("MercuryPayloadSource").SERVER_INVALIDATE_GLOBAL_STATE)this.inform("invalidate-global-state",{});if(n.payload_source===c("MercuryPayloadSource").SERVER_INVALIDATE_THREAD_STATE){var o=n.threads&&n.threads.length>0&&n.threads[0]&&n.threads[0].thread_id;if(o)this.inform("invalidate-thread-state",o)}this.inform("update-thread-ids",n.newlyAddedClientIDs);this.inform("update-participants",n);this.inform("update-threads",n);this.inform("update-unread",n);this.inform("update-threadlist",n);this.inform("update-messages",n);this.inform("update-unseen",n);this.inform("update-typing-state",n);this.inform("update-delivery",n);this.inform("update-roger",n.roger);this.inform("update-blocked-users",n);this.inform("update-ignored-users",n);this.inform("model-update-completed",null);this.inform("update-work-group-threads",n);c("MessengerState.bs").updateJS(this.$MercuryDispatcher2,n)}.bind(this))};l.prototype.$MercuryDispatcher3=function(n){__p&&__p();var o=n.payload_source;if(o===c("MercuryPayloadSource").CLIENT_CHANGE_READ_STATUS||o===c("MercuryPayloadSource").CLIENT_MARK_THREAD_SEEN)return;var p={from_client:n.from_client,messages:null};if(n.actions){var q=n.actions.filter(function(r){return r.action_type===c("MercuryActionType").USER_GENERATED_MESSAGE||r.action_type===c("MercuryActionType").LOG_MESSAGE}).map(function(r){return{action_type:r.action_type,other_user_fbid:r.other_user_fbid,thread_fbid:r.thread_fbid,message_id:r.message_id}});if(q.length)p.messages=q}k.debug("update:"+o,JSON.stringify(p))};var m=new(c("MercurySingletonProvider"))(l);f.exports=l}),null);
__d("MercuryDisplayTimeFilterMessageRenderer",["fbt"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i={renderFilteredContent:function j(k){if(k.is_filtered_content_bh)return h._("This message was removed because it contains blocked or harmful links.");if(k.is_filtered_content_account)return h._("This message has been temporarily removed because the sender's account requires verification.");if(k.is_filtered_content_quasar)return h._("This message was removed because it contains blocked or harmful content.");if(k.is_filtered_content_invalid_app)return h._("This message was removed because the app it's being sent from is blocked from sending messages.");return h._("This message has been temporarily removed because the sender's account requires verification, or it was identified as abusive.")}};f.exports=i}),null);
__d("MercuryGiftSnippetRenderer",["fbt"],(function a(b,c,d,e,f,g,h){"use strict";var i={renderText:function j(k,l){return k?h._("You sent a valentine."):h._("{name} sent a valentine.",[h.param("name",l)])}};f.exports=i}),null);
__d("MercuryGlobalActionType",[],(function a(b,c,d,e,f,g){f.exports=Object.freeze({MARK_ALL_READ:"mga-type:mark-all-read",MARK_ALL_SEEN:"mga-type:mark-all-seen"})}),null);
__d("MercuryLocalIDs",["PresenceUtil","randomInt"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h={generateMessageID:function j(k){var l=k||Date.now(),m=c("randomInt")(0,4294967295),n=c("PresenceUtil").getSessionID();return"<"+l+":"+m+"-"+n+"@mail.projektitan.com>"},generateThreadID:function j(k){return"root:"+h.generateOfflineThreadingID(k)},generateOfflineThreadingID:function j(k){var l=k||Date.now(),m=c("randomInt")(0,4294967295),n=("0000000000000000000000"+m.toString(2)).slice(-22),o=l.toString(2)+n;return i(o.slice(-63))}};function i(j){__p&&__p();var k="";while(j!="0"){var l=0,m="";for(var n=0;n<j.length;n++){l=2*l+parseInt(j[n],10);if(l>=10){m+="1";l-=10}else m+="0"}k=l.toString()+k;j=m.slice(m.indexOf("1"))}return k}f.exports=h}),null);
__d("MercuryLogMessageType",[],(function a(b,c,d,e,f,g){f.exports=Object.freeze({SUBSCRIBE:"log:subscribe",UNSUBSCRIBE:"log:unsubscribe",VIDEO_CALL:"log:video-call",PHONE_CALL:"log:phone-call",THREAD_NAME:"log:thread-name",THREAD_IMAGE:"log:thread-image",SERVER_ERROR:"log:error-msg",LIVE_LISTEN:"log:live-listen",WALLPAPER:"log:wallpaper",ORION:"log:orion",SWITCH_TO_WORK:"log:switch",PAGE_REPLY:"log:page-reply",GENERIC_ADMIN_TEXT:"log:generic-admin-text"})}),null);
__d("ImageSourceType",[],(function a(b,c,d,e,f,g){var h=Object.freeze({PROFILE_PICTURE:"profile_picture",IMAGE:"image"});f.exports=h}),null);
__d("ImageSourceRequest",["CurrentUser","ImageSourceType","KeyedCallbackManager","PhotoResizeModeConst","MercuryServerDispatcher"],(function a(b,c,d,e,f,g){__p&&__p();function h(){"use strict";this._request={fbid:null,type:null,width:null,height:null,resize_mode:null};this._callback=null}h.prototype.setFBID=function(l){"use strict";this._request.fbid=l;return this};h.prototype.setType=function(l){"use strict";if(![c("ImageSourceType").PROFILE_PICTURE,c("ImageSourceType").IMAGE].includes(l))throw new TypeError("ImageSourceRequest.setType: invalid type "+l);this._request.type=l;return this};h.prototype.setDimensions=function(l,m){"use strict";this._request.width=l;this._request.height=m;return this};h.prototype.setResizeMode=function(l){"use strict";if(![c("PhotoResizeModeConst").COVER,c("PhotoResizeModeConst").CONTAIN].includes(l))throw new TypeError("ImageSourceRequest.setResizeMode: invalid resize mode "+l);this._request.resize_mode=l;return this};h.prototype.setCallback=function(l){"use strict";this._callback=l;return this};h.prototype.send=function(){"use strict";__p&&__p();if(!this._request.fbid||!this._request.width||!this._request.height||!this._request.type||!this._request.resize_mode||!this._callback)throw new Error("ImageSourceRequest: You must set all the fields");var l=j(),m=k(this._request);l.executeOrEnqueue(m,this._callback);if(l.getUnavailableResourcesFromRequest(m).length===1){c("MercuryServerDispatcher").trySend("/ajax/image_source.php",{requests:[this._request]});return true}return false};var i=null;function j(){__p&&__p();if(i)return i;var l=new(c("KeyedCallbackManager"))();i=l;c("MercuryServerDispatcher").registerEndpoints({"/ajax/image_source.php":{request_user_id:c("CurrentUser").getID(),mode:c("MercuryServerDispatcher").BATCH_DEFERRED_MULTI,batch_function:function m(n,o){var p;(p=n.requests).push.apply(p,o.requests);return n},handler:function m(n,o){var p=o.getData().requests;for(var q=0;q<p.length;++q)l.setResource(k(p[q]),n[q])}}});return l}function k(l){return[l.fbid,l.type,l.width,l.height,l.resize_mode].join("|")}f.exports=h}),null);
__d("MercuryActionStatus",[],(function a(b,c,d,e,f,g){f.exports=Object.freeze({UNSENT:0,SUCCESS:1,UNCONFIRMED:3,FAILED_UNKNOWN_REASON:4,UNABLE_TO_CONFIRM:5,RESENT:6,RESENDING:7,ERROR:10})}),null);
__d("MercurySendErrorLogger",["Banzai","BanzaiLogger"],(function a(b,c,d,e,f,g){var h=c("BanzaiLogger").create({retry:true}),i=c("Banzai").isEnabled("mercury_send_error_logging"),j={log:function k(l){if(!i)return;var m={message_id:l.message_id,timestamp_client:Date.now(),error_type:l.error_data.type,error_code:l.error_data.code,error_description:l.error_data.description,is_transient:l.error_data.is_transient};h.log("MercurySendErrorLoggerConfig",m)}};f.exports=j}),null);
__d("MercuryServerPayloadPreprocessor",["invariant","MessengerEnvironment","MercuryIDs","MercuryActionStatus","MercuryActionType","MercuryAttachment","MercuryDispatcher","MercurySendErrorLogger","MercurySingletonProvider","MercuryThreadIDMap","URI"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();function i(k){this.$MercuryServerPayloadPreprocessor1=k;this.$MercuryServerPayloadPreprocessor2=c("MercuryThreadIDMap").getForFBID(this.$MercuryServerPayloadPreprocessor1);this.$MercuryServerPayloadPreprocessor3=c("MercuryDispatcher").getForFBID(this.$MercuryServerPayloadPreprocessor1)}i.getForFBID=function(k){return j.getForFBID(k)};i.get=function(){return j.get()};i.prototype.handleUpdate=function(k){__p&&__p();var l={};!k.from_client||h(0);(k.threads||[]).forEach(function(x){this.$MercuryServerPayloadPreprocessor4(x,l);var y=this.$MercuryServerPayloadPreprocessor2.getServerIDFromClientIDNow(x.thread_id);e(["MercuryServerRequests"],function(z){var A=z.getForFBID(this.$MercuryServerPayloadPreprocessor1);A.markThreadFetched(x.thread_id);if(y)A.markThreadFetched(y);A.updateLastActionTimestamp(x.timestamp)}.bind(this))}.bind(this));(k.work_top_named_threads||[]).forEach(function(x){this.$MercuryServerPayloadPreprocessor4(x,l);var y=this.$MercuryServerPayloadPreprocessor2.getServerIDFromClientIDNow(x.thread_id);e(["MercuryServerRequests"],function(z){var A=z.getForFBID(this.$MercuryServerPayloadPreprocessor1);A.markThreadFetched(x.thread_id);if(y)A.markThreadFetched(y);A.updateLastActionTimestamp(x.timestamp)}.bind(this))}.bind(this));(k.ordered_threadlists||[]).forEach(function(x){var y=x.thread_fbids||[];y=y.concat(x.other_user_fbids||[]);x.thread_ids=y.map(function(z){return this.$MercuryServerPayloadPreprocessor2.getClientIDFromServerIDNow(z.toString())}.bind(this))}.bind(this));if(k.delivery_receipts){var m={};for(var n=k.delivery_receipts,o=Array.isArray(n),p=0,n=o?n:n[typeof Symbol==="function"?Symbol.iterator:"@@iterator"]();;){var q;if(o){if(p>=n.length)break;q=n[p++]}else{p=n.next();if(p.done)break;q=p.value}var r=q,s=r.other_user_fbid?c("MercuryIDs").getThreadIDFromUserID(r.other_user_fbid):this.$MercuryServerPayloadPreprocessor2.getClientIDFromServerIDNow(r.thread_fbid);if(s)m[s]=r.time}k.delivery_receipts=m}k.actions=k.actions||[];k.actions.forEach(function(x){__p&&__p();if(x.action_type===c("MercuryActionType").SEND_MESSAGE&&x.status===c("MercuryActionStatus").ERROR)c("MercurySendErrorLogger").log(x);var y=null,z=null;if(x.other_user_fbid){z=c("MercuryIDs").getThreadIDFromUserID(x.other_user_fbid);y=x.other_user_fbid}else if(x.thread_fbid){z=c("MercuryIDs").getThreadIDFromThreadFBID(x.thread_fbid);y=x.thread_fbid}else if(x.thread_id){z=c("MercuryIDs").getThreadIDFromThreadFBID(x.thread_id);y=x.thread_id}else if(x.status&&x.status!=c("MercuryActionStatus").SUCCESS&&x.client_thread_id)z=x.client_thread_id;else h(0);y=y&&y.toString();x.thread_id=this.$MercuryServerPayloadPreprocessor2.hasClientIDForServerID(y)?this.$MercuryServerPayloadPreprocessor2.getClientIDFromServerIDNow(y):z;if(x.action_type==c("MercuryActionType").SEND_MESSAGE&&x.client_thread_id&&y){x.thread_id=x.client_thread_id;this.$MercuryServerPayloadPreprocessor2.forceSetServerIDToClientID(y,x.client_thread_id);l[y]=x.client_thread_id}x.thread_id||h(0);if(!k.payload_source||!k.payload_source.startsWith("server"))e(["MercuryServerRequests"],function(A){A.getForFBID(this.$MercuryServerPayloadPreprocessor1).updateLastActionTimestamp(x.timestamp)}.bind(this))}.bind(this));this.$MercuryServerPayloadPreprocessor5(k);this.$MercuryServerPayloadPreprocessor6(k);if(k.end_of_history){var t=[];for(var u=0;u<k.end_of_history.length;u++){var v=k.end_of_history[u];if(v.type=="user")t.push("user:"+v.fbid);else if(v.type=="thread"&&this.$MercuryServerPayloadPreprocessor2.hasClientIDForServerID(v.fbid))t.push(this.$MercuryServerPayloadPreprocessor2.getClientIDFromServerIDNow(v.fbid))}k.end_of_history=t}if(k.roger){var w={};Object.keys(k.roger).forEach(function(x){__p&&__p();var y=Object.keys(k.roger[x]),z=void 0;if(x)z=this.$MercuryServerPayloadPreprocessor2.getClientIDFromServerIDNow(x);else if(y.length===1)z=c("MercuryIDs").getThreadIDFromUserID(y[0]);if(z){var A=k.roger[x];w[z]={};for(var B in A)if(Object.prototype.hasOwnProperty.call(A,B)){var C=c("MercuryIDs").getParticipantIDFromUserID(B);w[z][C]=A[B]}}}.bind(this));k.roger=w}k.newlyAddedClientIDs=l;k.preprocessed=true;this.$MercuryServerPayloadPreprocessor3.handleUpdate(k)};i.prototype.$MercuryServerPayloadPreprocessor4=function(k,l){__p&&__p();var m=k.other_user_fbid?k.other_user_fbid:k.thread_fbid;m||h(0);var n=this.$MercuryServerPayloadPreprocessor2.getClientIDFromServerIDNow(m);if(!n){n=k.other_user_fbid?c("MercuryIDs").getThreadIDFromUserID(k.other_user_fbid):c("MercuryIDs").getThreadIDFromThreadFBID(k.thread_fbid);this.$MercuryServerPayloadPreprocessor2.setServerIDToClientID(m,n);this.$MercuryServerPayloadPreprocessor2.setDeprecatedServerIDToClientID(k.thread_id,n);l[m]=n}k.thread_id=n};i.prototype.$MercuryServerPayloadPreprocessor5=function(k){__p&&__p();k.actions.forEach(function(l){if(l.action_type===c("MercuryActionType").USER_GENERATED_MESSAGE){l.attachments=l.attachments||[];l.attachments.forEach(function(m){if(c("MercuryAttachment").isShareAttachment(m)&&c("MessengerEnvironment").messengerui){var n=new(c("URI"))(m.share.uri);if(!n.getDomain())m.share.uri=n.setDomain("facebook.com").setSubdomain(c("URI").getRequestURI().getSubdomain()).setProtocol("https").toString()}})}})};i.prototype.$MercuryServerPayloadPreprocessor6=function(k){__p&&__p();k.actions.forEach(function(l){__p&&__p();if(l.action_type!==c("MercuryActionType").USER_GENERATED_MESSAGE)return;var m=l;if(!m.has_attachment||!m.attachments)return;for(var n=m.attachments.length-1;n>=0;n-=1){var o=m.attachments[n];if(!o.share||!o.share.style_list||o.share.style_list[0]!="genie_message")continue;if(o.share.target.genie_id)m.author=c("MercuryIDs").getParticipantIDFromUserID(o.share.target.genie_id);if(o.share.target&&!o.share.target.attachment){m.attachments.splice(n,1);m.has_attachment=m.attachments.length>0}}})};var j=new(c("MercurySingletonProvider"))(i);f.exports=i}),null);
__d("MercuryErrorType",[],(function a(b,c,d,e,f,g){f.exports=Object.freeze({SERVER:1,TRANSPORT:2,TIMEOUT:3})}),null);
__d("MercuryMessageClientState",[],(function a(b,c,d,e,f,g){var h=Object.freeze({DO_NOT_SEND_TO_SERVER:"do_not_send_to_server",SEND_TO_SERVER:"send_to_server"});f.exports=h}),null);
__d("MercuryMessageIDs.bs",["bs_curry","KeyedCallbackManager"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h=new(c("KeyedCallbackManager"))();function i(k,l){var m=k.filter(function(o){return+(o.indexOf("id")===-1)}),n=function n(o){return c("bs_curry")._1(l,k.map(function(p){var q=o[p];if(q!==undefined)return q;else return p}))};return h.executeOrEnqueue(m,n)}function j(k,l){h.setResource(k,l);return 0}g.getServerIDs=i;g.addServerID=j}),null);
__d("MercuryServerSendMessageQueueOptions",[],(function a(b,c,d,e,f,g){function h(i,j,k,l,m,n){"use strict";this.success_handler=i;this.error_handler=j;this.transport_error_handler=k;this.timeout_handler=l;this.timeout=m;this.connection_retries=n}f.exports=h}),null);
__d("MercuryServerSendMessageQueueSimulatedError",["AsyncRequest","AsyncResponse"],(function a(b,c,d,e,f,g){var h=9999,i={create:function j(k){var l=new(c("AsyncRequest"))(this.endpoint_uri).setData({message_batch:[k],client:this.client}),m=new(c("AsyncResponse"))(l,{});Object.assign(m,{error:h,silentError:false,transientError:true,request:l});return m}};f.exports=i}),null);
__d("LeadGenInfoFieldTypes",[],(function a(b,c,d,e,f,g){f.exports=Object.freeze({CUSTOM:"CUSTOM",CITY:"CITY",COMPANY_NAME:"COMPANY_NAME",COUNTRY:"COUNTRY",DOB:"DOB",EMAIL:"EMAIL",GENDER:"GENDER",FIRST_NAME:"FIRST_NAME",FULL_NAME:"FULL_NAME",JOB_TITLE:"JOB_TITLE",LAST_NAME:"LAST_NAME",MARITIAL_STATUS:"MARITIAL_STATUS",PHONE:"PHONE",POST_CODE:"POST_CODE",PROVINCE:"PROVINCE",RELATIONSHIP_STATUS:"RELATIONSHIP_STATUS",STATE:"STATE",STREET_ADDRESS:"STREET_ADDRESS",ZIP:"ZIP",WORK_EMAIL:"WORK_EMAIL",MILITARY_STATUS:"MILITARY_STATUS",WORK_PHONE_NUMBER:"WORK_PHONE_NUMBER",MESSENGER:"MESSENGER",STORE_LOOKUP:"STORE_LOOKUP",DATE_TIME:"DATE_TIME",ID_CPF:"ID_CPF"})}),null);
__d("MNCommerceBubbleType",[],(function a(b,c,d,e,f,g){f.exports=Object.freeze({FB_RETAIL_RECEIPT:1,FB_RETAIL_CANCELLATION:2,FB_RETAIL_SHIPMENT:3,FB_RETAIL_SHIPMENT_TRACKING_EVENT_ETA:4,FB_RETAIL_SHIPMENT_TRACKING_EVENT_IN_TRANSIT:5,FB_RETAIL_SHIPMENT_TRACKING_EVENT_OUT_FOR_DELIVERY:6,FB_RETAIL_SHIPMENT_TRACKING_EVENT_DELAYED:7,FB_RETAIL_SHIPMENT_TRACKING_EVENT_DELIVERED:8,FB_RETAIL_SHIPMENT_FOR_UNSUPPORTED_CARRIER:9,FB_RETAIL_SHIPMENT_ETA:10,FB_RETAIL_NOW_IN_STOCK:11,FB_RETAIL_AGENT_ITEM_SUGGESTION:12,FB_RETAIL_AGENT_ITEM_RECEIPT:13,FB_RETAIL_PROMOTIONAL_MSG:14})}),null);
__d("MNCommerceCallToActionType",[],(function a(b,c,d,e,f,g){f.exports=Object.freeze({OPEN_NATIVE:1,OPEN_URL:2,OPEN_CANCEL_RIDE_MUTATION:3,POSTBACK:4,ACCOUNT_LINK:5,MANAGE_MESSAGES:6,SHARE:7,PAYMENT:8,FACEBOOK_REPORT_A_PROBLEM:9,SUBSCRIPTION_PRESELECT:10,NAVIGATION:11,EXTENSIBLE_SHARE:12,OPEN_REACT_NATIVE_MINI_APP:13,OPEN_PAGE_ABOUT:14,OPEN_BRANDED_CAMERA:15})}),null);
__d("P2PPaymentRequestStatus",[],(function a(b,c,d,e,f,g){f.exports=Object.freeze({INITED:1,DECLINED:2,TRANSFER_INITED:3,TRANSFER_COMPLETED:4,TRANSFER_FAILED:5,CANCELED:6,EXPIRED:7})}),null);
__d("P2PTransferStatus",[],(function a(b,c,d,e,f,g){f.exports=Object.freeze({PENDING_SENDER_MANUAL_REVIEW:1,PENDING_SENDER_VERIFICATION:2,CANCELED_SENDER_RISK:3,PENDING_RECIPIENT_NUX:4,CANCELED_DECLINED:5,PENDING_RECIPIENT_VERIFICATION:6,PENDING_RECIPIENT_MANUAL_REVIEW:7,PENDING_RECIPIENT_PROCESSING:8,PENDING_PUSH_FAIL:9,CANCELED_RECIPIENT_RISK:10,CANCELED_SYSTEM_FAIL:11,CANCELED_EXPIRED:12,COMPLETED:13,INTERMEDIATE_PROCESSING:14,PENDING_SENDER_INITED:15,CANCELED_SAME_CARD:16,PENDING_SENDER_VERIFICATION_PROCESSING:17,PENDING_RECIPIENT_VERIFICATION_PROCESSING:18,CANCELED_SENDER_CANCEL:19})}),null);
__d("PaymentModulesClient",[],(function a(b,c,d,e,f,g){f.exports=Object.freeze({DONATION_P4P:"donation_p4p",MOR_DONATIONS:"mor_donations",INSTANT_EXPERIENCES:"instant_experiences",BUSINESS_PLATFORM_COMMERCE:"business_platform_commerce",MESSENGER_OMNIM:"messenger_omnim",MESSENGER_PLATFORM:"messenger_platform",PAGES_COMMERCE:"pages_commerce",SHIPPING_LABEL:"shipping_label",SYNCHRONOUS_COMPONENT_FLOW:"synchronous_component_flow",PAGES_SOLUTION:"pages_solution",CHECKOUT_EXPERIENCES:"checkout_experiences",MOBILE_TOP_UP:"mobile_top_up",MOCK:"mock"})}),null);
__d("ServicesCalendarSyncType",[],(function a(b,c,d,e,f,g){f.exports=Object.freeze({CLIENT_ONLY:"client_only",NO_CALENDAR_SYNC:"no_calendar_sync",SERVER_CONTINUOUS:"server_continuous",SERVER_SINGLE:"server_single"})}),null);
__d("bs_js_null_undefined",[],(function a(b,c,d,e,f,g){"use strict";__p&&__p();function h(k,l){if(k==null)return k;else return l(k)}function i(k,l){if(k==null)return 0;else return l(k)}function j(k){if(k)return k[0];else return undefined}g.bind=h;g.iter=i;g.from_opt=j}),null);
__d("bs_char",["bs_caml_string","bs_caml_builtin_exceptions"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();function h(m){if(m<0||m>255)throw[c("bs_caml_builtin_exceptions").invalid_argument,"Char.chr"];else return m}function i(m){__p&&__p();var n=0;if(m>=40)if(m!==92)n=m>=127?1:2;else return"\\\\";else if(m>=32)if(m>=39)return"\\'";else n=2;else if(m>=14)n=1;else switch(m){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 11:case 12:n=1;break;case 13:return"\\r"}switch(n){case 1:var o=new Array(4);o[0]=92;o[1]=48+(m/100|0)|0;o[2]=48+(m/10|0)%10|0;o[3]=48+m%10|0;return c("bs_caml_string").bytes_to_string(o);case 2:var p=new Array(1);p[0]=m;return c("bs_caml_string").bytes_to_string(p)}}function j(m){if(m>=65&&m<=90||m>=192&&m<=214||m>=216&&m<=222)return m+32|0;else return m}function k(m){if(m>=97&&m<=122||m>=224&&m<=246||m>=248&&m<=254)return m-32|0;else return m}function l(m,n){return m-n|0}g.chr=h;g.escaped=i;g.lowercase=j;g.uppercase=k;g.compare=l}),null);
__d("bs_bytes",["bs_char","bs_list","bs_curry","bs_caml_obj","bs_caml_int32","bs_pervasives","bs_caml_string","bs_caml_builtin_exceptions"],(function a(aa,b,ba,ca,da,c){"use strict";__p&&__p();function d(P,Q){var R=b("bs_caml_string").caml_create_string(P);b("bs_caml_string").caml_fill_string(R,0,P,Q);return R}function e(P,Q){var R=b("bs_caml_string").caml_create_string(P);for(var S=0,T=P-1|0;S<=T;++S)R[S]=b("bs_curry")._1(Q,S);return R}var f=[];function g(P){var Q=P.length,R=b("bs_caml_string").caml_create_string(Q);b("bs_caml_string").caml_blit_bytes(P,0,R,0,Q);return R}function h(P){return b("bs_caml_string").bytes_to_string(g(P))}function i(P){return g(b("bs_caml_string").bytes_of_string(P))}function j(P,Q,R){if(Q<0||R<0||Q>(P.length-R|0))throw[b("bs_caml_builtin_exceptions").invalid_argument,"String.sub / Bytes.sub"];else{var S=b("bs_caml_string").caml_create_string(R);b("bs_caml_string").caml_blit_bytes(P,Q,S,0,R);return S}}function k(P,Q,R){return b("bs_caml_string").bytes_to_string(j(P,Q,R))}function l(P,Q,R){var S=(P.length+Q|0)+R|0,T=b("bs_caml_string").caml_create_string(S),U=Q<0?[-Q|0,0]:[0,Q],V=U[1],W=U[0],X=b("bs_pervasives").min(P.length-W|0,S-V|0);if(X>0)b("bs_caml_string").caml_blit_bytes(P,W,T,V,X);return T}function m(P,Q,R,S){if(Q<0||R<0||Q>(P.length-R|0))throw[b("bs_caml_builtin_exceptions").invalid_argument,"String.fill / Bytes.fill"];else return b("bs_caml_string").caml_fill_string(P,Q,R,S)}function n(P,Q,R,S,T){if(T<0||Q<0||Q>(P.length-T|0)||S<0||S>(R.length-T|0))throw[b("bs_caml_builtin_exceptions").invalid_argument,"Bytes.blit"];else return b("bs_caml_string").caml_blit_bytes(P,Q,R,S,T)}function o(P,Q,R,S,T){if(T<0||Q<0||Q>(P.length-T|0)||S<0||S>(R.length-T|0))throw[b("bs_caml_builtin_exceptions").invalid_argument,"String.blit / Bytes.blit_string"];else return b("bs_caml_string").caml_blit_string(P,Q,R,S,T)}function p(P,Q){for(var R=0,S=Q.length-1|0;R<=S;++R)b("bs_curry")._1(P,Q[R]);return 0}function q(P,Q){for(var R=0,S=Q.length-1|0;R<=S;++R)b("bs_curry")._2(P,R,Q[R]);return 0}function r(P,Q){__p&&__p();if(Q){var R=Q[0],S=[0],T=[0];b("bs_list").iter(function(W){S[0]=S[0]+1|0;T[0]=T[0]+W.length|0;return 0},Q);var U=b("bs_caml_string").caml_create_string(T[0]+b("bs_caml_int32").imul(P.length,S[0]-1|0)|0);b("bs_caml_string").caml_blit_bytes(R,0,U,0,R.length);var V=[R.length];b("bs_list").iter(function(W){b("bs_caml_string").caml_blit_bytes(P,0,U,V[0],P.length);V[0]=V[0]+P.length|0;b("bs_caml_string").caml_blit_bytes(W,0,U,V[0],W.length);V[0]=V[0]+W.length|0;return 0},Q[1]);return U}else return f}function s(P,Q){return P.concat(Q)}function t(P){var Q=P-9|0;if(Q>4||Q<0)if(Q!==23)return 0;else return 1;else if(Q!==2)return 1;else return 0}function u(P){var Q=P.length,R=0;while(R<Q&&t(P[R]))R=R+1|0;var S=Q-1|0;while(S>=R&&t(P[S]))S=S-1|0;if(S>=R)return j(P,R,(S-R|0)+1|0);else return f}function v(P){__p&&__p();var Q=0;for(var R=0,S=P.length-1|0;R<=S;++R){var T=P[R],U;if(T>=32){var V=T-34|0;U=V>58||V<0?V>=93?4:1:V>57||V<1?2:1}else U=T>=11?T!==13?4:2:T>=8?2:4;Q=Q+U|0}if(Q===P.length)return g(P);else{var W=b("bs_caml_string").caml_create_string(Q);Q=0;for(var X=0,Y=P.length-1|0;X<=Y;++X){var Z=P[X],$=0;if(Z>=35)if(Z!==92)if(Z>=127)$=1;else W[Q]=Z;else $=2;else if(Z>=32)if(Z>=34)$=2;else W[Q]=Z;else if(Z>=14)$=1;else switch(Z){case 8:W[Q]=92;Q=Q+1|0;W[Q]=98;break;case 9:W[Q]=92;Q=Q+1|0;W[Q]=116;break;case 10:W[Q]=92;Q=Q+1|0;W[Q]=110;break;case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 11:case 12:$=1;break;case 13:W[Q]=92;Q=Q+1|0;W[Q]=114;break}switch($){case 1:W[Q]=92;Q=Q+1|0;W[Q]=48+(Z/100|0)|0;Q=Q+1|0;W[Q]=48+(Z/10|0)%10|0;Q=Q+1|0;W[Q]=48+Z%10|0;break;case 2:W[Q]=92;Q=Q+1|0;W[Q]=Z;break}Q=Q+1|0}return W}}function w(P,Q){var R=Q.length;if(R){var S=b("bs_caml_string").caml_create_string(R);for(var T=0,U=R-1|0;T<=U;++T)S[T]=b("bs_curry")._1(P,Q[T]);return S}else return Q}function x(P,Q){var R=Q.length;if(R){var S=b("bs_caml_string").caml_create_string(R);for(var T=0,U=R-1|0;T<=U;++T)S[T]=b("bs_curry")._2(P,T,Q[T]);return S}else return Q}function y(P){return w(b("bs_char").uppercase,P)}function z(P){return w(b("bs_char").lowercase,P)}function A(P,Q){if(Q.length){var R=g(Q);R[0]=b("bs_curry")._1(P,Q[0]);return R}else return Q}function B(P){return A(b("bs_char").uppercase,P)}function C(P){return A(b("bs_char").lowercase,P)}function D(P,Q,R,S){__p&&__p();while(true){var T=R;if(T>=Q)throw b("bs_caml_builtin_exceptions").not_found;else if(P[T]===S)return T;else{R=T+1|0;continue}}}function E(P,Q){return D(P,P.length,0,Q)}function F(P,Q,R){var S=P.length;if(Q<0||Q>S)throw[b("bs_caml_builtin_exceptions").invalid_argument,"String.index_from / Bytes.index_from"];else return D(P,S,Q,R)}function G(P,Q,R){__p&&__p();while(true){var S=Q;if(S<0)throw b("bs_caml_builtin_exceptions").not_found;else if(P[S]===R)return S;else{Q=S-1|0;continue}}}function H(P,Q){return G(P,P.length-1|0,Q)}function I(P,Q,R){if(Q<-1||Q>=P.length)throw[b("bs_caml_builtin_exceptions").invalid_argument,"String.rindex_from / Bytes.rindex_from"];else return G(P,Q,R)}function J(P,Q,R){var S=P.length;if(Q<0||Q>S)throw[b("bs_caml_builtin_exceptions").invalid_argument,"String.contains_from / Bytes.contains_from"];else try{D(P,S,Q,R);return 1}catch(T){if(T===b("bs_caml_builtin_exceptions").not_found)return 0;else throw T}}function K(P,Q){return J(P,0,Q)}function L(P,Q,R){if(Q<0||Q>=P.length)throw[b("bs_caml_builtin_exceptions").invalid_argument,"String.rcontains_from / Bytes.rcontains_from"];else try{G(P,Q,R);return 1}catch(S){if(S===b("bs_caml_builtin_exceptions").not_found)return 0;else throw S}}var M=b("bs_caml_obj").caml_compare,N=b("bs_caml_string").bytes_to_string,O=b("bs_caml_string").bytes_of_string;c.make=d;c.init=e;c.empty=f;c.copy=g;c.of_string=i;c.to_string=h;c.sub=j;c.sub_string=k;c.extend=l;c.fill=m;c.blit=n;c.blit_string=o;c.concat=r;c.cat=s;c.iter=p;c.iteri=q;c.map=w;c.mapi=x;c.trim=u;c.escaped=v;c.index=E;c.rindex=H;c.index_from=F;c.rindex_from=I;c.contains=K;c.contains_from=J;c.rcontains_from=L;c.uppercase=y;c.lowercase=z;c.capitalize=B;c.uncapitalize=C;c.compare=M;c.unsafe_to_string=N;c.unsafe_of_string=O}),null);
__d("bs_string",["bs_list","bs_bytes","bs_caml_int32","bs_caml_string"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();function h(H,I){return c("bs_caml_string").bytes_to_string(c("bs_bytes").make(H,I))}function i(H,I){return c("bs_caml_string").bytes_to_string(c("bs_bytes").init(H,I))}function j(H){return c("bs_caml_string").bytes_to_string(c("bs_bytes").copy(c("bs_caml_string").bytes_of_string(H)))}function k(H,I,J){return c("bs_caml_string").bytes_to_string(c("bs_bytes").sub(c("bs_caml_string").bytes_of_string(H),I,J))}function l(H,I){__p&&__p();if(I){var J=I[0],K=[0],L=[0];c("bs_list").iter(function(O){K[0]=K[0]+1|0;L[0]=L[0]+O.length|0;return 0},I);var M=c("bs_caml_string").caml_create_string(L[0]+c("bs_caml_int32").imul(H.length,K[0]-1|0)|0);c("bs_caml_string").caml_blit_string(J,0,M,0,J.length);var N=[J.length];c("bs_list").iter(function(O){c("bs_caml_string").caml_blit_string(H,0,M,N[0],H.length);N[0]=N[0]+H.length|0;c("bs_caml_string").caml_blit_string(O,0,M,N[0],O.length);N[0]=N[0]+O.length|0;return 0},I[1]);return c("bs_caml_string").bytes_to_string(M)}else return""}function m(H,I){return c("bs_bytes").iter(H,c("bs_caml_string").bytes_of_string(I))}function n(H,I){return c("bs_bytes").iteri(H,c("bs_caml_string").bytes_of_string(I))}function o(H,I){return c("bs_caml_string").bytes_to_string(c("bs_bytes").map(H,c("bs_caml_string").bytes_of_string(I)))}function p(H,I){return c("bs_caml_string").bytes_to_string(c("bs_bytes").mapi(H,c("bs_caml_string").bytes_of_string(I)))}function q(H){var I=H-9|0;if(I>4||I<0)if(I!==23)return 0;else return 1;else if(I!==2)return 1;else return 0}function r(H){if(H===""||!(q(H.charCodeAt(0))||q(H.charCodeAt(H.length-1|0))))return H;else return c("bs_caml_string").bytes_to_string(c("bs_bytes").trim(c("bs_caml_string").bytes_of_string(H)))}function s(H){__p&&__p();var I=function I(J){__p&&__p();while(true){var K=J;if(K>=H.length)return 0;else{var L=H.charCodeAt(K);if(L>=32){var M=L-34|0;if(M>58||M<0)if(M>=93)return 1;else{J=K+1|0;continue}else if(M>57||M<1)return 1;else{J=K+1|0;continue}}else return 1}}};if(I(0))return c("bs_caml_string").bytes_to_string(c("bs_bytes").escaped(c("bs_caml_string").bytes_of_string(H)));else return H}function t(H,I){return c("bs_bytes").index(c("bs_caml_string").bytes_of_string(H),I)}function u(H,I){return c("bs_bytes").rindex(c("bs_caml_string").bytes_of_string(H),I)}function v(H,I,J){return c("bs_bytes").index_from(c("bs_caml_string").bytes_of_string(H),I,J)}function w(H,I,J){return c("bs_bytes").rindex_from(c("bs_caml_string").bytes_of_string(H),I,J)}function x(H,I){return c("bs_bytes").contains(c("bs_caml_string").bytes_of_string(H),I)}function y(H,I,J){return c("bs_bytes").contains_from(c("bs_caml_string").bytes_of_string(H),I,J)}function z(H,I,J){return c("bs_bytes").rcontains_from(c("bs_caml_string").bytes_of_string(H),I,J)}function A(H){return c("bs_caml_string").bytes_to_string(c("bs_bytes").uppercase(c("bs_caml_string").bytes_of_string(H)))}function B(H){return c("bs_caml_string").bytes_to_string(c("bs_bytes").lowercase(c("bs_caml_string").bytes_of_string(H)))}function C(H){return c("bs_caml_string").bytes_to_string(c("bs_bytes").capitalize(c("bs_caml_string").bytes_of_string(H)))}function D(H){return c("bs_caml_string").bytes_to_string(c("bs_bytes").uncapitalize(c("bs_caml_string").bytes_of_string(H)))}var E=c("bs_caml_string").caml_string_compare,F=c("bs_bytes").fill,G=c("bs_bytes").blit_string;g.make=h;g.init=i;g.copy=j;g.sub=k;g.fill=F;g.blit=G;g.concat=l;g.iter=m;g.iteri=n;g.map=o;g.mapi=p;g.trim=r;g.escaped=s;g.index=t;g.rindex=u;g.index_from=v;g.rindex_from=w;g.contains=x;g.contains_from=y;g.rcontains_from=z;g.uppercase=A;g.lowercase=B;g.capitalize=C;g.uncapitalize=D;g.compare=E}),null);
__d("MessengerStoryAttachmentTransformer.bs",["fbt","URI","bs_array","Utils.bs","bs_string","bs_caml_array","bs_js_boolean","bs_caml_format","CurrentUser","bs_js_primitive","FundsAvailability","bs_js_null_undefined","P2PTransferStatus","MNCommerceBubbleType","PaymentModulesClient","MercuryAttachmentType","bs_caml_builtin_exceptions","P2PPaymentRequestStatus","ServicesCalendarSyncType","MNCommerceCallToActionType","LeadGenInfoFieldTypes"],(function aa(ba,a,ca,da,ea,b,c){"use strict";__p&&__p();function d(B){return a("bs_array").map(function(C){var D=C.user_confirmation,E=D==null?[null,null,null,null,false]:[D.cancel_button_label,D.continue_button_label,D.confirmation_message,D.confirmation_title,true],F=C.payment_metadata;return{action_link:C.action_link,action_type:a("bs_js_null_undefined").from_opt(a("bs_js_primitive").undefined_to_opt(a("MNCommerceCallToActionType")[C.action_open_type])),action_objects:C.action_objects,title:C.title,confirmation_cancel_label:E[0],confirmation_continue_label:E[1],confirmation_message:E[2],confirmation_title:E[3],id:C.id,is_disabled:C.is_disabled,is_mutable_by_server:C.is_mutable_by_server,payment_metadata:F==null?{payment_module_config:null,total_price:null}:{payment_module_config:F.payment_module_config,total_price:F.total_price},render_style:C.render_style,webview_metadata:{fallback_url:C.webview_metadata.fallback_url,messenger_extensions:C.webview_metadata.messenger_extensions,webview_height_ratio:C.webview_metadata.webview_height_ratio,webview_share_button:C.webview_metadata.webview_share_button},should_show_user_confirmation:E[4],page_id:C.page_id}},B)}function e(B){return a("bs_array").map(function(C){var D=C.url,E=D==null?null:new(a("URI"))(D).getUnqualifiedURI().toString();return{title:C.title,uri:E}},B)}function fa(B){if(!(B==null)&&B!=="")return"#"+a("bs_string").sub(B,2,B.length-2|0);else return null}function ga(B){if(B==null)return null;else return{url:B.uri,src:B.uri,width:B.width,height:B.height}}function f(B,C){var D=C.cover_photo,E;if(D==null)E=[null,null,null];else{var F=D.photo.image,G=F==null?[null,null]:[F.uri,{height:F.height,width:F.width}];E=[D.photo.id,G[0],G[1]]}var H=C.location,I=H==null?[null,null]:[H.latitude,H.longitude],J=C.overall_star_rating;return{address:C.address.single_line_full_address,category:C.top_category_name,coverPhotoID:E[0],coverPhotoURL:E[1],coverPhotoDimensions:E[2],latitude:I[0],longitude:I[1],name:C.name,rating:J==null?null:J.value,pageID:C.id,priceRange:C.price_range_description,viewerID:B}}function g(B){var C=B.group_commerce_item_seller,D=B.primary_photo,E;if(D==null)E=null;else{var F=D.image;E=F==null?null:F.uri}return{caption:B.group_commerce_item_description.text,desc:B.group_commerce_item_description.text,owner_id:C==null?null:C.id,price:B.formatted_price.text,text:B.group_commerce_item_description.text,title:B.group_commerce_item_title,thumb_url:E,url:B.url}}function h(B){return{app_name:B.application_name,artists:B.artist_names,audio_url:B.audio_url,duration_ms:B.duration_ms,title:B.music_title}}function i(B){var C=B.payment;return{id:B.id,desc:B.desc,display_total_cost:B.total_cost,merchant_name:B.merchant_name,target_url:B.target_url,thumb_url:B.thumb_url,raw_amount:B.raw_amount,payment_id:C==null?null:C.id,total_cost:{amount:a("bs_caml_format").caml_float_of_string(B.price_amount),currency:B.price_currency},name:B.name}}function j(B){return{fundraiserID:B.fundraiserID,canDonate:B.canDonate,hasViewerDonated:B.hasViewerDonated,fundraiserDetailedProgressText:B.fundraiserDetailedProgressText,fundraiserSubtitleText:B.fundraiserSubtitleText,focusedCoverPhoto:B.focusedCoverPhoto}}function k(B){return{id:B.id,name:B.name,desc:B.desc,thumb_url:B.thumb_url,item_url:B.item_url,title:B.name,text:B.desc,source:B.source,image_aspect_ratio:B.image_aspect_ratio,metalines:{metaline_1:B.first_metaline,metaline_2:B.second_metaline,metaline_3:B.third_metaline},default_action:B.default_action,call_to_actions:d(B.call_to_actions)}}function l(B){__p&&__p();var C=function C($){var E=$.page_call_to_action;if(E==null)return undefined;else return E.id},D=function D($){var E=$.page_call_to_action;if(E==null)return false;else{var F=E.component_flow_service_config;if(F==null)return false;else return true}},E=B.page,F=E==null?[undefined,undefined,undefined,false]:[E.id,a("bs_js_null_undefined").from_opt(a("bs_js_primitive").undefined_to_opt(a("ServicesCalendarSyncType")[E.calendar_sync_type])),C(E),D(E)],G=B.native_component_flow_request,H;if(G==null)H=null;else{var I=G.page,J=G.page,K=G.page,L;if(K==null)L=undefined;else{var M=K.profile_picture;L=M==null?undefined:M.uri}var N=G.suggested_time_range,O=G.product_item,P=G.product_item,Q=G.product_item,R=G.product_item,S;if(R==null)S=undefined;else{var T=R.profile_picture;S=T==null?undefined:T.uri}var U=G.user,V=G.user,W=G.job_application,X=G.user,Y;if(X==null)Y=undefined;else{var ha=X.profile_picture;Y=ha==null?undefined:ha.uri}H={additionalInfo:G.additional_info,availability:G.availability,hasSavedToCalendar:G.has_saved_to_calendar,requestFlowType:G.request_flow_type,generalInfo:G.service_general_info,id:G.id,pageID:I==null?undefined:I.id,pageName:J==null?undefined:J.name,pageProfilePic:L,preferredTimeRange:N==null?null:{end:N.end,start:N.start},price:O==null?null:O.experimental_freeform_price,duration:P==null?null:P.duration_in_seconds,requestAdminApprovalType:G.request_admin_approval_type,requestedTime:G.requested_time,serviceName:Q==null?null:Q.name,serviceProfilePic:S,specialRequest:G.special_request,status:G.booking_status_value,statusLabel:G.status,userID:U==null?undefined:U.id,username:V==null?undefined:V.short_name,jobApplicationID:W==null?undefined:W.id,userProfilePic:Y}}var ia=B.message_bubble_type,Z;switch(ia){case"CANCELLED":Z=["Cancelled",c._("Cancelled")];break;case"DECLINED":Z=["Declined",c._("Declined")];break;case"REQUESTED":Z=["Requested",c._("Requested")];break;case"SCHEDULEED":Z=["Scheduled",c._("Scheduled")];break;default:throw[a("bs_caml_builtin_exceptions").invalid_argument,"Erroneous target status"]}return{id:B.id,pageID:F[0],calendarSyncType:F[1],ctaID:F[2],hasServiceConfig:F[3],userID:B.user.id,status:Z[0],statusLabel:Z[1],viewerID:a("CurrentUser").getAccountID(),requestMetadata:H}}function m(B){return{live_location_id:B.live_location_id,is_expired:a("bs_js_boolean").to_js_boolean(B.is_expired),expiration_time:B.expiration_time,sender:B.sender,coordinate:B.coordinate,location_title:B.location_title,sender_destination:B.sender_destination,stop_reason:B.stop_reason}}function n(B){var C=B.first_metaline;return{desc:B.description,id:B.id,image_aspect_ratio:B.image_aspect_ratio,item_url:B.target_url,metalines:C==null?{}:{metaline_1:C},name:B.name,source:B.source_name,text:B.description,thumb_url:B.image_url,title:B.name,default_action:B.default_action,call_to_actions:d(B.call_to_actions),media_blob_attachments:B.media_blob_attachments}}function o(B){var C=a("bs_array").map(n,B.business_items.nodes),D=d(B.call_to_actions);return{message:B.message,call_to_actions:D,items:C}}function p(B){return{message:B.message,call_to_actions:d(B.call_to_actions),items:a("bs_array").map(n,B.promotion_items.nodes)}}function q(B){var C=B.structured_address.streets,D=B.partner_logo;return{account_holder_name:B.account_holder_name,adjustments:a("bs_array").map(function(E){return{adjustment_type:E.adjustment_type,display_adjustment_amount:E.adjustment_amount}},B.adjustments),cancellation_url:B.cancellation_url,items:a("bs_array").map(n,B.items.nodes),merchant_name:B.merchant_name,messenger_commerce_bubble_type:a("bs_js_null_undefined").from_opt(a("bs_js_primitive").undefined_to_opt(a("MNCommerceBubbleType")[B.messenger_commerce_bubble_type])),order_id:B.order_id,order_time:B.order_time,order_url:B.order_url,payment_method:B.payment_method,receipt_id:B.receipt_id,recipient_name:B.recipient_name,shipping_cost:B.shipping_cost,shipping_method:B.shipping_method,status:B.status,structured_address:{city:B.structured_address.city,state:B.structured_address.state,country:B.structured_address.country,postal_code:B.structured_address.postal_code,street_1:a("bs_caml_array").caml_array_get(C,0),street_2:a("bs_caml_array").caml_array_get(C,1)},subtotal:B.subtotal,total_cost:B.total_cost,total_tax:B.total_tax,partner_logo:D==null?undefined:D.uri}}function r(B,C){return{payment_modules_client:a("bs_js_null_undefined").from_opt(a("bs_js_primitive").undefined_to_opt(a("PaymentModulesClient")[C.payment_modules_client])),is_viewer_seller:C.is_viewer_seller,payment_snippet:C.payment_snippet,item_list:a("bs_array").map(function(D){return{item_id:D.item_id,name:D.name,subtitle:D.subtitle,description:D.description,unit_price:D.unit_price,image_urls:a("bs_array").map(function(E){return E.uri},D.images),quantity:D.quantity}},C.item_list),components:C.components,payment_call_to_actions:C.payment_call_to_actions,click_action:C.click_action,actor_id:B,invoicer_id:C.invoicer_id}}var s=function s(B){__p&&__p();var C=a("LeadGenInfoFieldTypes"),D={},E=[];for(var F=B.field_data_list,G=Array.isArray(F),H=0,F=G?F:F[typeof Symbol==="function"?Symbol.iterator:"@@iterator"]();;){var I;if(G){if(H>=F.length)break;I=F[H++]}else{H=F.next();if(H.done)break;I=H.value}var J=I,K=J.field_type,L=J.label,M=J.values;if(K===C.CUSTOM||K===C.ZIP)E.push({label:L,values:M});else D[K]={label:L,values:M}}D.questions=E;return D};function t(B,C){var D=C.invite_recipient,E=D==null?null:D.id,F=C.invite_sender,G=F==null?null:F.id;return{quick_invite_id:C.id,recipient_id:E,sender_id:G,is_viewer_recipient:a("bs_js_boolean").to_js_boolean(+(B===E))}}function u(B){var C=function C(F){if(F==null)return null;else return F.uri},D=B.listing_category,E=D==null?[null,null]:[D.offer_image,D.request_image];return{listingType:B.listing_type,mapURI:C(B.map_image),offerURI:C(E[0]),requestURI:C(E[1])}}function v(B){return{sender:B.sender,receiver:B.receiver,transfer_id:B.transfer_id,bubbleView:B.bubble_view}}function w(B){__p&&__p();var C=B.receiver_profile,D;if(C==null)D=null;else{var E=C.profile_picture;D={id:C.id,name:C.short_name,full_name:C.name,picture:E==null?null:E.uri,profile_url:C.url}}var F=B.sender,G;if(F==null)G={};else{var H=F.profile_picture;G={id:F.id,name:F.name,full_name:F.full_name,picture:H==null?null:H.uri,profile_uri:F.url}}var I=B.transfer_context,J;if(I==null)J=[null,null,null];else{var K=I.transfer_theme;J=[I.memoText,a("bs_array").map(function(N){var C=N.image;if(C==null)return null;else return C.uri},I.memo_images),K==null?null:K.id]}var L=B.platform_item,M=L==null?null:{name:L.name,description:L.description,image:a("bs_array").map(function(N){var C=N.image;if(C==null)return null;else return C.uri},L.photos),refURL:L.url};return{sender:G,amountWithSymbol:B.transaction_amount.formatted_amount,status:a("bs_js_null_undefined").from_opt(a("bs_js_primitive").undefined_to_opt(a("P2PTransferStatus")[B.transfer_status])),receiver:D,transfer_id:B.transfer_id,completedTime:B.completedTime,updatedTime:B.updatedTime,creationTime:B.creationTime,amount:B.transaction_amount.amount,memoText:J[0],memoPhotoURLs:J[1],themeID:J[2],discountAmount:B.amount_fb_discount.formatted,fundsAvailability:a("bs_js_null_undefined").from_opt(a("bs_js_primitive").undefined_to_opt(a("FundsAvailability")[B.funds_availability])),groupThreadFBID:B.group_thread_fbid,platform_item:M,statusDescription:{markup:B.status_description},bubbleView:B.bubble_view,currency:B.currency_amount.currency}}function x(B){__p&&__p();var C=B.requester,D;if(C==null)D=undefined;else{var E=C.profile_picture;D={id:C.id,name:C.short_name,full_name:C.name,picture:E==null?null:E.uri,profile_url:C.url}}var F=B.requestee,G;if(F==null)G=undefined;else{var H=F.profile_picture;G={id:F.id,name:F.short_name,full_name:F.name,picture:H==null?null:H.uri,profile_url:F.url}}var I=a("bs_js_null_undefined").from_opt(a("bs_js_primitive").undefined_to_opt(a("P2PPaymentRequestStatus")[B.request_status])),J=B.transfer,K=J==null?[null,""]:[w(J),J.id],L=B.request_theme;return{amount:B.transaction_amount.amount,amountWithSymbol:B.amount.formatted,requestee:G,requester:D,currentStatus:I,currency:B.amount.currency,creationTime:B.creation_time,groupThreadFBID:B.group_thread_fbid,id:B.id,memoText:B.memo_text,themeID:L==null?null:L.id,transfer:K[0],transferID:K[1],updatedTime:B.updated_time,statusDescription:{markup:B.status_description}}}function y(B){var C=x({amount:B.amount,transaction_amount:B.transaction_amount,requester:B.requester,requestee:B.requestee,request_status:B.request_status,request_theme:B.request_theme,id:B.id,memo_text:B.memo_text,transfer:B.transfer,creation_time:B.creation_time,group_thread_fbid:B.group_thread_fbid,updated_time:B.updated_time,status_description:B.status_description}),D={individualRequests:a("bs_array").map(x,B.individual_requests)};return Object.assign(C,D)}function z(B,C){__p&&__p();var D=C.media,E=D==null?null:D.animated_image,F=D==null?null:D.image,G={};a("bs_array").iter(function(U){var H=U.value;G[U.key]=H==null?null:H.text;return 0},C.properties);var H=C.target,I;if(H==null)I=null;else switch(H.tag|0){case 0:I=u(H[0]);break;case 1:I=v(H[0]);break;case 2:I=w(H[0]);break;case 3:I=y(H[0]);break;case 4:I=r(B,H[0]);break;case 7:I=p(H[0]);break;case 8:I=o(H[0]);break;case 10:I=s(H[0]);break;case 11:I=m(H[0]);break;case 12:I=t(B,H[0]);break;case 13:I=l(H[0]);break;case 14:var J=H[0],K=J.genie_sender,L=K==null?[null,null]:[K.messaging_actor.id,K.messaging_actor.name],M=L[0],N=J.story_attachment,O=N==null?null:A(B,{legacy_attachment_id:M,story_attachment:{action_links:N.action_links,messaging_attribution:N.messaging_attribution,messenger_call_to_actions:N.messenger_call_to_actions,deduplication_key:N.deduplication_key,description:N.description,media:N.media,properties:N.properties,source:N.source,style_list:N.style_list,title_with_entities:N.title_with_entities,url:N.url,subattachments:[],target:null}});I={genie_id:M,genie_name:L[1],attachment:O};break;case 16:I=h(H[0]);break;case 18:I=k(H[0]);break;case 19:I=i(H[0]);break;case 20:I=j(H[0]);break;case 21:I=q(H[0]);break;case 23:I=g(H[0]);break;case 24:I=f(B,H[0]);break;default:I=H[0]}var P=C.target,Q=!(P==null)&&P.tag===7?0:null,R=C.description,S=C.source,T=C.title_with_entities;return{description:R==null?null:R.text,media:{animated_image:E==null?null:E.uri,animated_image_size:E==null?{height:null,width:null}:{height:E.height,width:E.width},image:F==null?null:F.uri,image_size:F==null?{height:null,width:null}:{height:F.height,width:F.width},duration:D==null?null:D.playable_duration,playable:D==null?null:D.is_playable,source:D==null?null:D.playable_url},source:S==null?null:S.text,style_list:C.style_list,title:T==null?null:T.text,action_links:e(C.action_links),messaging_attribution:C.messaging_attribution,messenger_ctas:a("bs_array").map(function(U){return{id:U.id,page_id:a("Utils.bs").$pipe$unknown(a("bs_js_primitive").null_undefined_to_opt(U.page_id),""),action_title:U.title,action_url:U.action_link,action_open_type:a("bs_js_null_undefined").from_opt(a("bs_js_primitive").undefined_to_opt(a("MNCommerceCallToActionType")[U.action_open_type])),is_high_confidence:a("Utils.bs").$pipe$unknown(a("bs_js_primitive").null_undefined_to_opt(U.is_high_confidence),false),is_mutable_by_server:U.is_mutable_by_server,native_url:U.native_url,is_disabled:U.is_disabled,webview_metadata:{fallback_url:U.webview_metadata.fallback_url,messenger_extensions:U.webview_metadata.messenger_extensions,webview_height_ratio:U.webview_metadata.webview_height_ratio,webview_share_button:U.webview_metadata.webview_share_button}}},C.messenger_call_to_actions),properties:G,uri:C.url,deduplication_key:C.deduplication_key,target:I,label:Q}}function A(B,C){var D=C.story_attachment,E;if(D==null)E=null;else{var F={share_id:C.legacy_attachment_id,subattachments:a("bs_array").map(function(H){return z(B,H)},D.subattachments)},G={description:D.description,media:D.media,source:D.source,style_list:D.style_list,title_with_entities:D.title_with_entities,properties:D.properties,url:D.url,deduplication_key:D.deduplication_key,action_links:D.action_links,messaging_attribution:D.messaging_attribution,messenger_call_to_actions:D.messenger_call_to_actions,target:D.target};E=Object.assign(F,z(B,G))}return{app_attribution:null,attach_type:a("MercuryAttachmentType").SHARE,name:null,url:null,rel:null,preview_url:null,preview_width:null,preview_height:null,large_preview_url:null,large_preview_width:null,large_preview_height:null,icon_type:null,metadata:null,share:E,thumbnail_url:null}}b._getCallToActions=d;b._getActionLinks=e;b._getColor=fa;b._getLogo=ga;b._getPageTarget=f;b._getGroupCommerceProductItemTarget=g;b._getExternalSongTarget=h;b._getAgentSuggestionItemTarget=i;b._getFundraiserTarget=j;b._getRetailItemTarget=k;b._getPagesPlatformBookingMessageTarget=l;b._getMessageLiveLocationTarget=m;b._getBusinessRetailItem=n;b._getMessengerBusinessMessageTarget=o;b._getMessengerRetailPromotionTarget=p;b._getMessengerRetailReceiptTarget=q;b._getPagesPlatformAttachmentTarget=r;b._getPagesPlatformLeadGenInfoTarget=s;b._getQuickInviteTarget=t;b._getCrisisListingTarget=u;b._getMoneyTransferTarget=v;b._getP2PTransferTarget=w;b._getP2PTransferRequestTarget=x;b._getP2PTransferRequestWithIndividualRequests=y;b.transformStoryAttachment=z;b.getExtensibleAttachmentPayload=A}),null);
__d("MessengerAttachmentTransformer.bs",["fbt","bs_array","bs_js_boolean","bs_pervasives","MercuryAttachmentType","MercuryAttachmentContentType","MessengerStoryAttachmentTransformer.bs"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();function i(q){__p&&__p();if(q.is_malicious)return{app_attribution:null,icon_type:c("MercuryAttachmentContentType").UNKNOWN,metadata:null,name:null,preview_height:null,preview_url:null,preview_width:null,rel:null,share:null,thumbnail_url:null,url:null,attach_type:c("MercuryAttachmentType").ERROR,error_msg:h._("This attachment has been marked as malicious."),message_file_fbid:null,url_shimhash:null,url_skipshim:null};else{var r=q.attribution_app,s;if(r==null)s=null;else{var t=r.square_logo;s={id:r.id,icon_url:t==null?null:t.uri,metadata:q.attribution_metadata,name:r.name}}var u=q.url;return{app_attribution:s,icon_type:q.content_type,metadata:null,name:q.filename,preview_height:null,preview_url:null,preview_width:null,rel:"ignore",share:null,thumbnail_url:null,url:u==null?null:u,attach_type:c("MercuryAttachmentType").FILE,error_msg:undefined,message_file_fbid:q.message_file_fbid,url_shimhash:q.url_shimhash,url_skipshim:q.url_skipshim}}}function j(q,r,s){var t=q.chat_image,u=t==null?[null,null,null]:[t.uri,t.width,t.height],v=u[0],w=q.chat_image,x=w==null?null:{width:w.width,height:w.height},y=q.large_image,z=y==null?[null,null]:[y.uri,{width:y.width,height:y.height}],A=q.inbox_image,B=A==null?[null,null]:[A.uri,{width:A.width,height:A.height}],C=q.attribution_app,D;if(C==null)D=null;else{var E=C.square_logo;D={id:C.id,icon_url:E==null?null:E.uri,metadata:q.attribution_metadata,name:C.name}}return{app_attribution:D,attach_type:c("MercuryAttachmentType").VIDEO,name:q.filename,url:q.playable_url,rel:"async",preview_url:v,preview_width:u[1],preview_height:u[2],large_preview_url:null,large_preview_width:null,large_preview_height:null,icon_type:c("MercuryAttachmentContentType").VIDEO,metadata:{fbid:q.legacy_attachment_id,render_as_sticker:c("bs_js_boolean").to_js_boolean(+(q.video_type==="SPEAKING_STICKER")),dimensions:{width:q.original_dimensions.x,height:q.original_dimensions.y},duration:q.playable_duration_in_ms,large_size:z[1],large_preview:z[0],chat_size:x,chat_preview:v,inbox_size:B[1],inbox_preview:B[0],pageid:s?r:undefined},thumbnail_url:v,share:null}}function k(q){var r=q.attribution_app,s;if(r==null)s=null;else{var t=r.square_logo;s={id:r.id,icon_url:t==null?null:t.uri,metadata:q.attribution_metadata,name:r.name}}return{app_attribution:s,attach_type:c("MercuryAttachmentType").FILE,name:q.filename,url:q.playable_url,rel:"ignore",preview_url:null,preview_width:null,preview_height:null,large_preview_url:null,large_preview_width:null,large_preview_height:null,icon_type:c("MercuryAttachmentContentType").MUSIC,metadata:{duration:q.playable_duration_in_ms,isVoicemail:q.is_voicemail?"1":"0",type:q.audio_type==="VOICE_MESSAGE"?"fb_voice_message":q.audio_type==="VOICE_MESSAGE_WITH_TRANSCRIPT"?"fb_voice_message_with_transcript":"file_attachment"},thumbnail_url:null,share:null,url_shimhash:q.url_shimhash,url_skipshim:q.url_skipshim}}function l(q,r,s){var t=q.preview_image,u=t==null?[null,null,null]:[t.uri,t.width,t.height],v=q.animated_image,w=v==null?null:v.uri,x=q.attribution_app,y;if(x==null)y=null;else{var z=x.square_logo;y={id:x.id,icon_url:z==null?null:z.uri,metadata:q.attribution_metadata,name:x.name}}return{app_attribution:y,attach_type:c("MercuryAttachmentType").ANIMATED_IMAGE,name:q.filename,url:w,rel:"async",preview_url:u[0],preview_width:u[1],preview_height:u[2],large_preview_url:null,large_preview_width:null,large_preview_height:null,icon_type:c("MercuryAttachmentContentType").PHOTO,metadata:{fbid:q.legacy_attachment_id,image:w,dimensions:c("bs_pervasives").string_of_int(q.original_dimensions.x)+(","+c("bs_pervasives").string_of_int(q.original_dimensions.y)),pageid:s?r:undefined},thumbnail_url:w,share:null}}function m(q){__p&&__p();var r=q.original_extension==="gif"?c("MercuryAttachmentType").ANIMATED_IMAGE:q.render_as_sticker?c("MercuryAttachmentType").THIRDPARTYSTICKER:c("MercuryAttachmentType").PHOTO,s=q.preview,t=s==null?[null,null,null]:[s.uri,s.width,s.height],u;if(r===c("MercuryAttachmentType").PHOTO){var v=q.large_preview;u=v==null?[null,null,null]:[v.uri,v.width,v.height]}else u=[null,null,null];var w=q.attribution_app,x;if(w==null)x=null;else{var y=w.square_logo;x={id:w.id,icon_url:y==null?null:y.uri,metadata:q.attribution_metadata,name:w.name}}var z=q.thumbnail;return{app_attribution:x,attach_type:r,name:q.filename,url:null,rel:"async",preview_url:t[0],preview_width:t[1],preview_height:t[2],large_preview_url:u[0],large_preview_width:u[1],large_preview_height:u[2],icon_type:c("MercuryAttachmentContentType").PHOTO,metadata:{fbid:q.legacy_attachment_id,dimensions:c("bs_pervasives").string_of_int(q.original_dimensions.x)+(","+c("bs_pervasives").string_of_int(q.original_dimensions.y))},thumbnail_url:z==null?null:z.uri,share:null,photo_encodings:q.photo_encodings}}function n(q,r){var s=r,t=q;if(q>=r){var u=c("bs_pervasives").min(120,t/2),v=u/(t/2);return[u|0,s/2*v|0]}else{var w=c("bs_pervasives").min(120,s/2),x=w/(s/2);return[t/2*x|0,w|0]}}function o(q){var r=n(q.width,q.height),s=q.pack,t=q.sprite_image,u=q.sprite_image_2x,v=q.padded_sprite_image,w=q.padded_sprite_image_2x;return{app_attribution:null,attach_type:c("MercuryAttachmentType").STICKER,name:null,url:q.url,rel:null,preview_url:null,preview_width:null,preview_height:null,large_preview_url:null,large_preview_width:null,large_preview_height:null,icon_type:c("MercuryAttachmentContentType").UNKNOWN,metadata:{accessibilityLabel:q.label,stickerID:q.id,packID:s==null?null:s.id,frameCount:q.frame_count,frameRate:q.frame_rate,framesPerRow:q.frame_count>1?q.frames_per_row:1,framesPerCol:q.frame_count>1?q.frames_per_column:1,height:r[1],width:r[0],spriteURI:t==null?null:t.uri,spriteURI2x:u==null?null:u.uri,paddedSpriteURI:v==null?null:v.uri,paddedSpriteURI2x:w==null?null:w.uri,thumbnail_url:null,share:null}}}function p(q,r,s){__p&&__p();var t=[],u=r.extensible_attachment;if(!(u==null))t.push(c("MessengerStoryAttachmentTransformer.bs").getExtensibleAttachmentPayload(q,u));var v=r.sticker;if(!(v==null))t.push(o(v));var w=r.blob_attachments;if(!(w==null))c("bs_array").iter(function(x){__p&&__p();switch(x.tag|0){case 0:t.push(m(x[0]));return 0;case 1:t.push(l(x[0],q,s));return 0;case 2:t.push(k(x[0]));return 0;case 3:t.push(j(x[0],q,s));return 0;case 4:t.push(i(x[0]));return 0}},w);return t}g._getFilePayload=i;g._getVideoPayload=j;g._getAudioPayload=k;g._getAnimatedImagePayload=l;g._getImagePayload=m;g._getStickerDimensions=n;g._getStickerPayload=o;g.transformAttachment=p}),null);
__d("InstantGameUpdateXMATUpdateType",[],(function a(b,c,d,e,f,g){f.exports=Object.freeze({UNKNOWN:"unknown",GAME_SCORE:"game_score",CUSTOM_MESSAGE:"custom_message"})}),null);
__d("MNCommerceMessageType",[],(function a(b,c,d,e,f,g){f.exports=Object.freeze({TEXT:"text",IMAGE:"image",VIDEO:"video",AUDIO:"audio",FILE:"file",ROBOT_TEXT:"robot_text",LOCATION:"location",FORCED_FETCH_MESSAGE:"forced_fetch_message",SENDER_ACTION:"sender_action",RETAIL_PRODUCT_SUBSCRIPTION:"retail_product_subscription",RETAIL_PROMOTION:"retail_promotion",RETAIL_CANCELLATION:"retail_cancellation",RETAIL_SHIPMENT:"retail_shipment",SHIPMENT_TRACKING_EVENT:"shipment_tracking_event",AIRLINE_CHECKIN_REMINDER:"airline_checkin_reminder",AIRLINE_BOARDING_PASS:"airline_boarding_pass",AIRLINE_CHECKIN:"airline_checkin",AIRLINE_BOARDINGPASS:"airline_boardingpass",AIRLINE_UPDATE:"airline_update",AIRLINE_ITINERARY:"airline_itinerary",CONTENT_SUBSCRIPTION:"content_subscription",AD_ADMIN_TEXT:"ad_admin_text",AD_TEXT:"ad_text",AD_BUBBLE:"ad_bubble",NON_AD:"non_ad",UNKNOWN:"unknown",OTHER:"other",TEMPLATE:"template",OPEN_GRAPH:"open_graph",GENERIC:"generic",LIST:"list",COMPACT_LIST:"compact_list",BUTTON:"button",RECEIPT:"receipt",GENERIC_LEGACY:"generic_legacy",ICE_BREAKER:"ice_breaker",FALLBACK:"fallback",RIDE_INTENT:"ride_intent",RIDE_SIGNUP:"ride_signup",RIDE_WELCOME:"ride_welcome",RIDE_ORDER_CONFIRMATION:"ride_order_confirmation",RIDE_REQUESTED:"ride_requested",RIDE_DRIVER_ON_THE_WAY:"ride_driver_on_the_way",RIDE_NO_DRIVER:"ride_no_driver",RIDE_DRIVER_ARRIVING:"ride_driver_arriving",RIDE_DRIVER_CANCELED:"ride_driver_canceled",RIDE_RIDER_CANCELED:"ride_rider_canceled",RIDE_COMPLETE:"ride_complete",RIDE_ADMIN_MESSAGE:"ride_admin_message",RIDE_RECEIPT:"ride_receipt",RIDE_REENGAGEMENT_FIRST_RIDE:"ride_reengagement_first_ride",GET_RIDE:"give_get_ride",GIVE_RIDE:"send_give_get_ride",REFERER_PROMO:"referer_promo",INSTANT_GAMES_SHARE:"instant_games_share",INSTANT_GAMES_SCORE:"instant_games_score",INSTANT_GAMES_LIVE_STREAM:"instant_games_live_stream",LINK:"link_admin_message",UNLINK:"unlink_admin_message",BLOCK_ALL:"block_all_admin_message",UNBLOCK_ALL:"unblock_all_admin_message",BLOCK_PROMOTION:"block_promotion_admin_message",UNBLOCK_PROMOTION:"unblock_promotion_admin_message",INITIAL_PROMOTION:"initial_promotion_admin_message",WEAK_CONSENT_ADMIN_MESSAGE:"weak_consent_admin_message",MESSENGER_TEAM_BOT_MESSAGE:"messenger_team_bot",MESSENGER_BOT_BASE_GENERIC:"messenger_bot_base_generic",COMMERCE_COMPACT_LIST:"commerce_compact_list",FEEDBACK:"feedback",MEDIA:"media",PLACE_CARD:"place_card"})}),null);
__d("MessagingGenericAdminTextType",[],(function a(b,c,d,e,f,g){f.exports=Object.freeze({ALOHA_AUTOCONNECT_INVITED:"aloha_autoconnect_invited",ALOHA_CONTACT_ADDED:"aloha_contact_added",ALOHA_CONTACT_ADDED_TO_ALOHA_PROXY_USER:"aloha_contact_added_to_aloha_proxy_user",ALOHA_CONTACT_REMOVED:"aloha_contact_removed",ALOHA_INVITE_OWNER_ACCEPT:"aloha_invite_owner_accept",ALOHA_INVITE_OWNER_DECLINE:"aloha_invite_owner_decline",ALOHA_MEDIA_ADDED:"aloha_media_added",ALOHA_MEDIA_SENT:"aloha_media_sent",ALOHA_VISUAL_MEDIA_SENT:"aloha_visual_media_sent",ALOHA_OWNER_INVITED:"aloha_owner_invited",ALOHA_PROXY_USER_NAME_SET:"aloha_proxy_user_name_set",ALOHA_PROXY_USER_PROFILE_PHOTO_SET:"aloha_proxy_user_profile_photo_set",ALOHA_WIFI_CREDENTIALS_SET:"aloha_wifi_credentials_set",MADE_POLL_VOTE:"made_poll_vote",ALOHA_USER_JOINED_CALL_ON_ALOHA:"aloha_user_joined_call_on_aloha",ALOHA_CALL_ENDED_ON_ALOHA:"aloha_call_ended_on_aloha",GROUP_POLL:"group_poll",GENERIC_NEW_CONNECTION:"generic_new_connection",CONFIRM_FRIEND_REQUEST:"confirm_friend_request",THREAD_CUSTOMIZATION_UPSELL:"thread_customization_upsell",PHONE_CONTACT_UPLOAD:"phone_contact_upload",RELATIONSHIP_CREATED:"relationship_created",ACCEPT_PENDING_THREAD:"accept_pending_thread",RAMP_UP_WELCOME_MESSAGE:"ramp_up_welcome_message",CHANGE_THREAD_THEME:"change_thread_theme",CHANGE_THREAD_ICON:"change_thread_icon",GROUP_THREAD_CREATED:"group_thread_created",THREAD_EPHEMERAL_SEND_MODE:"thread_ephemeral_send_mode",INVITE_ACCEPTED:"invite_accepted",MESSENGER_INVITE_SENT:"messenger_invite_sent",TURN_ON_PUSH:"turn_on_push",JOURNEY_PROMPT_COLOR:"journey_prompt_color",JOURNEY_PROMPT_LIKE:"journey_prompt_like",JOURNEY_PROMPT_NICKNAME:"journey_prompt_nickname",JOURNEY_PROMPT_SETUP:"journey_prompt_setup",CHANGE_THREAD_NICKNAME:"change_thread_nickname",NOTIFY_GROUP_MAYORSHIP:"notify_group_mayorship",PROMPT_GROUP_MAYORSHIP_CUSTOMIZATION:"prompt_group_mayorship_customization",MESSAGE_COUNT_MILESTONE_MESSAGE:"message_count_milestone_message",BOT_THREAD_SUBSCRIPTION:"bot_thread_subscription",RTC_CALL_LOG:"rtc_call_log",RTC_INSTANT_VIDEO_LIFECYCLE:"rtc_instant_video_lifecycle",JOURNEY_PROMPT_BOT:"journey_prompt_bot",RIDE_ORDERED_MESSAGE:"ride_ordered_message",DESTINATION_ETA_MESSAGE:"destination_eta_message",RIDE_ARRIVED_MESSAGE:"ride_arrived_message",JOURNEY_PROMPT_NEW_SETUP:"journey_prompt_new_setup",LIGHTWEIGHT_EVENT_CREATE:"lightweight_event_create",LIGHTWEIGHT_EVENT_DELETE:"lightweight_event_delete",LIGHTWEIGHT_EVENT_NOTIFY:"lightweight_event_notify",LIGHTWEIGHT_EVENT_NOTIFY_BEFORE_EVENT:"lightweight_event_notify_before_event",LIGHTWEIGHT_EVENT_RSVP:"lightweight_event_rsvp",LIGHTWEIGHT_EVENT_UPDATE:"lightweight_event_update",LIGHTWEIGHT_EVENT_UPDATE_LOCATION:"lightweight_event_update_location",LIGHTWEIGHT_EVENT_UPDATE_TIME:"lightweight_event_update_time",LIGHTWEIGHT_EVENT_UPDATE_TITLE:"lightweight_event_update_title",SAFETY_LOCATION_REQUEST_SENT:"safety_location_request_sent",SAFETY_LOCATION_REQUEST_RESPONDED:"safety_location_request_responded",SAFETY_LOCATION_REQUEST_DENIED:"safety_location_request_denied",AD_MANAGE_MESSAGE:"ad_manage_message",AD_REPLY_MESSAGE:"ad_reply_message",TAGGED_PHOTO:"tagged_photo",GAME_SCORE:"game_score",INSTANT_GAME_UPDATE:"instant_game_update",INSTANT_GAME_BOT_INTRO:"instant_game_bot_intro",MEDIA_SUBSCRIPTION_MANAGE:"media_subscription_manage",M_AI_SURVEY:"m_ai_survey",PHONE_NUMBER_LOOKUP_NOTICE:"phone_number_lookup_notice",MESSENGER_PRECHECKED_PLUGIN:"messenger_prechecked_plugin",ADD_CONTACT:"add_contact",PRODUCT_INVOICE_RECEIPT_REJECTED:"product_invoice_receipt_rejected",PRODUCT_INVOICE_PAID:"product_invoice_paid",PRODUCT_INVOICE_VOIDED:"product_invoice_voided",PRODUCT_INVOICE_SHIPPED:"product_invoice_shipped",PRODUCT_INVOICE_PAYMENT_EXPIRED:"product_invoice_payment_expired",PRODUCT_INVOICE_RECEIPT_UPLOADED:"product_invoice_receipt_uploaded",CHANGE_JOINABLE_SETTING:"change_joinable_setting",CHANGE_THREAD_ADMINS:"change_thread_admins",CHANGE_THREAD_APPROVAL_MODE:"change_thread_approval_mode",CAPY_SESSION_BEGIN:"capy_session_begin",CAPY_SESSION_BOT_BEGIN:"capy_session_bot_begin",CAPY_SESSION_END:"capy_session_end",CAPY_AGENT_JOIN:"capy_agent_join",CAPY_AGENT_DUMPED:"capy_agent_dumped",CAPY_SESSION_WAIT_TIME:"capy_session_wait_time",GROUP_SMS_PARTICIPANT_JOINED:"group_sms_participant_joined",GROUP_SMS_PARTICIPANT_CAPPED:"group_sms_participant_capped",SMS_PHONE_NUMBER_CHECK:"sms_phone_number_check",MESSENGER_BOT_REVIEW_SENT:"messenger_bot_review_sent",MESSENGER_CODE_SCAN:"messenger_code_scan",MESSENGER_LIVECHAT_PLUGIN_OPEN:"messenger_livechat_plugin_open",MINGLE_MATCH_SUCCESS:"mingle_match_success",MINGLE_PARTICIPANT_MATCHED:"mingle_participant_matched",MN_ACCOUNT_LINKING_TEXT:"mn_account_linking_text",MN_ACCOUNT_UNLINKING_TEXT:"mn_account_unlinking_text",MN_ACCOUNT_FORCED_UNLINKING_TEXT:"mn_account_forced_unlinking_text",MN_REF_SEND_TEXT:"mn_ref_send_text",ADS_WELCOME_MSG:"ads_welcome_msg",THREAD_JOINABLE_PROMOTION_TEXT:"thread_joinable_promotion_text",PAGES_PLATFORM_REQUEST_TEXT:"pages_platform_request_text",MESSENGER_NEW_USER_GET_STARTED:"messenger_new_user_get_started",SMS_PHONE_NUMBER_TOGGLE:"sms_phone_number_toggle",PAGES_PLATFORM_CREATE_APPOINTMENT:"Pages_Platform_create_appointment",INTERNAL_CAREER_JOBSY_REACHOUT_CONNECTED:"internal_career_jobsy_reachout_connected",JOINABLE_GROUP_THREAD_CREATED:"joinable_group_thread_created",JOINABLE_ROOM_CREATED_WITH_CO_CREATORS:"joinable_room_created_with_co_creators",PAGES_PLATFORM_ACCEPT_APPOINTMENT:"pages_platform_accept_appointment",PAGES_PLATFORM_REFERRAL_CONFIRMED_APPOINTMENT:"pages_platform_referral_confirmed_appointment",PAGES_PLATFORM_DECLINE_APPOINTMENT:"pages_platform_decline_appointment",PAGES_PLATFORM_USER_CANCEL:"pages_platform_user_cancel",PAGES_PLATFORM_ADMIN_CANCEL:"pages_platform_admin_cancel",MESSENGER_OMNIM_CREATE_FLOW:"messenger_omnim_create_flow",MESSENGER_OMNIM_UPDATE_FLOW:"messenger_omnim_update_flow",MESSENGER_OMNIM_UPDATE_FLOW_STATE:"messenger_omnim_update_flow_state",MESSENGER_GROUP_DESCRITPION_UPDATE:"messenger_group_description_update",MESSENGER_EXTENSION_ADD_CART:"messenger_extension_add_cart",MESSENGER_EXTENSION_ADD_FAVORITE:"messenger_extension_add_favorite",MESSENGER_AD_CONTEXT:"messenger_ad_context",PAGES_PLATFORM_APPOINTMENT_REMINDER:"pages_platform_appointment_reminder",PAGES_PLATFORM_ADMIN_DECLINE:"pages_platform_admin_decline",POKE_RECEIVED:"poke_received",MESSENGER_STATION_SUBSCRIPTION:"messenger_station_subscription",MESSENGER_USER_ALSO_ON_MESSENGER:"messenger_user_also_on_messenger",MESSENGER_INBOX2_BIRTHDAY_BUMP:"messenger_inbox2_birthday_bump",STARTED_SHARING_VIDEO:"started_sharing_video",LIVE_VIDEO_CHAT:"live_video_chat",PARTICIPANT_JOINED_GROUP_CALL:"participant_joined_group_call",MESSENGER_ONLY_PHONE_JOINED_WITH_NEW_ACCOUNT:"messenger_only_phone_joined_with_new_account",PAGES_COMMERCE_PAYMENT_ENABLED:"pages_commerce_payment_enabled",GROUP_PAYMENT_REQUEST:"group_payment_request",P2P_CALL_ESCALATED_TO_GROUP_CALL:"p2p_call_escalated_to_group_call",INVITED_TO_ESCALATED_P2P_CALL:"invited_to_escalated_p2p_call",EVENT_UPCOMING:"event_upcoming",PAGES_VISITOR_POST_SEND_MESSAGE_UPSELL:"pages_visitor_post_send_message_upsell",PAGES_LOW_MESSAGE_RESPONSE_RATE:"pages_low_message_response_rate",PAGES_START_CALL:"pages_start_call",PARTIES_INVITE:"parties_invite",PAGES_JOIN_LOYALTY_PROGRAM:"pages_join_loyalty_program",WORK_INVITE_CLAIMED:"work_invite_claimed",P2P_PAYMENT_REQUEST_REMINDER:"p2p_payment_request_reminder",PHOTO_TAG_BUMP:"photo_tag_bump",MESSENGER_CALL_UPGRADE_LEGACY_CLIENT:"messenger_call_upgrade_legacy_client",DIRECTED_WALL_POST:"directed_wall_post",MESSENGER_CALL_LOG:"messenger_call_log",P2P_PAYMENT_MONEY_RAIN_GAME_ENTRY_POINT:"p2p_payment_money_rain_game_entry_point",MESSENGER_MONTAGE_MENTIONS:"messenger_montage_mentions",PAGES_MESSAGING_BLOCK_WORDS:"pages_messaging_block_words",ALOHA_CALL_INVITE:"aloha_call_invite",SHIPPO_TRACKING_UPDATES:"shippo_tracking_updates",NEO_APPROVED_CONNECTION_ADDED:"neo_approved_connection_added",CHANGE_FAVORITE_COLOR:"change_favorite_color",MARKETPLACE_ITEM_CHANGED:"marketplace_item_changed",SERVICES_VERTICAL_REDEEMED_REFERRAL:"services_vertical_redeemed_referral",SERVICES_VERTICAL_OPT_OUT_REQUESTS:"services_vertical_opt_out_requests",SERVICES_VERTICAL_OPT_OUT_REQUESTS_SUCCESS:"services_vertical_opt_out_requests_success",PAGES_MARK_AS_PAID:"pages_mark_as_paid",MIGRATED_TO_WORKPLACE:"migrated_to_workplace",MESSENGER_GROUP_EVENT_STATUS_UPDATE:"messenger_group_event_status_update",NEO_APPROVED_USER_REMOVED_FROM_GROUP:"neo_approved_user_removed_from_group",LIVE_CHAT_SUPPORT_AGENT_JOIN:"live_chat_support_agent_join",LIVE_CHAT_SUPPORT_SESSION_BEGIN:"live_chat_support_session_begin",LIVE_CHAT_SUPPORT_SESSION_END:"live_chat_support_session_end",MONTAGE_DIRECT_KEEP:"montage_direct_keep",CHSBOT_CONVERSATION_ENDED:"chsbot_conversation_ended",CHSBOT_LIVE_CHAT_SUPPORT_AGENT_BEGIN:"chsbot_live_chat_support_agent_begin",CHSBOT_LIVE_CHAT_SUPPORT_AGENT_END:"chsbot_live_chat_support_agent_end",CHSBOT_SUPPORT_REQUESTED:"chsbot_support_requested",MESSENGER_SUBSCRIBE_TO_UPDATES:"messenger_subscribe_to_updates",MESSENGER_UNSUBSCRIBE_FROM_UPDATES:"messenger_unsubscribe_from_updates",MESSENGER_BLOCK_MESSAGES:"messenger_block_messages",MESSENGER_UNBLOCK_MESSAGES:"messenger_unblock_messages",THANKS_FOR_SHARING_MESSAGE_CONTEXT:"thanks_for_sharing_message_context",GROUP_ADMIN_MODEL_NUX:"group_admin_model_nux",MESSENGER_PAYMENT_INCENTIVE_INFO:"messenger_payment_incentive_info",MESSENGER_GROUP_SYNC_OPT_IN:"messenger_group_sync_opt_in",MESSENGER_GROUP_SYNC_OPT_OUT:"messenger_group_sync_opt_out",MENTORSHIP_MATCH:"mentorship_match",PAGES_CALL_DEFLECTION_UPSELL:"pages_call_deflection_upsell"})}),null);
__d("MercuryMessageSourceTags",[],(function a(b,c,d,e,f,g){f.exports=Object.freeze({CHAT:"source:chat",EMAIL:"source:email",MESSENGER:"source:messenger",MOBILE:"source:mobile"})}),null);
__d("MessagingTagUtils",["MessagingSourceEnum","MessagingTagConstants","MercuryMessageSourceTags","Set"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h=new(c("Set"))(Object.values(c("MessagingSourceEnum")));function i(l){__p&&__p();for(var m=l,n=Array.isArray(m),o=0,m=n?m:m[typeof Symbol==="function"?Symbol.iterator:"@@iterator"]();;){var p;if(n){if(o>=m.length)break;p=m[o++]}else{o=m.next();if(o.done)break;p=o.value}var q=p;if(h.has(q))return q}return c("MessagingSourceEnum").UNKNOWN}function j(l){__p&&__p();for(var m=l,n=Array.isArray(m),o=0,m=n?m:m[typeof Symbol==="function"?Symbol.iterator:"@@iterator"]();;){var p;if(n){if(o>=m.length)break;p=m[o++]}else{o=m.next();if(o.done)break;p=o.value}var q=p,r=q.split(c("MessagingTagConstants").app_id_root);if(r.length>1)return r[1].trim()}return null}function k(l,m){__p&&__p();var n=[],o=j(l);if(o&&c("MessagingTagConstants").orca_app_ids.indexOf(o)!==-1)n.push(c("MercuryMessageSourceTags").MESSENGER);if(c("MessagingTagConstants").chat_sources.indexOf(m)!==-1)n.push(c("MercuryMessageSourceTags").CHAT);if(c("MessagingTagConstants").email_source===m)n.push(c("MercuryMessageSourceTags").EMAIL);if(c("MessagingTagConstants").mobile_sources.indexOf(m)!==-1)n.push(c("MercuryMessageSourceTags").MOBILE);return n}f.exports={getSourceFromTags:i,getSourceTags:k}}),null);
__d("P2PPaymentLogMessageSubtype",[],(function a(b,c,d,e,f,g){f.exports=Object.freeze({SENT_IN_GROUP:"sent_in_group",CANCELED_SENDER_RISK:"canceled_sender_risk",CANCELED_DECLINED:"canceled_declined",CANCELED_RECIPIENT_RISK:"canceled_recipient_risk",CANCELED_EXPIRED:"canceled_expired",CANCELED_SAME_CARD:"canceled_same_card",CANCELED_CUSTOMER_SERVICE:"canceled_customer_service",CANCELED_CHARGEBACK:"canceled_chargeback",CANCELED_SYSTEM_FAIL:"canceled_system_fail",REQUEST_CANCELED_BY_REQUESTER:"request_canceled_by_requester",REQUEST_DECLINED_BY_REQUESTEE:"request_declined_by_requestee",REQUEST_EXPIRED:"request_expired",REQUEST_REMINDER:"request_reminder",MONEY_RAIN_GAME_ENTRY_POINT:"money_rain_game_entry_point"})}),null);
__d("MessengerMessageTransformer.bs",["bs_array","bs_block","bs_string","FBIDCheck","getByPath","bs_js_boolean","MercuryIDs","bs_pervasives","bs_caml_format","CurrentUser","bs_js_primitive","MessagingTag","bs_js_null_undefined","MercuryActionType","MessagingTagUtils","MessagingSourceEnum","StoryAttachmentStyle","MNCommerceMessageType","MercuryLogMessageType","P2PPaymentLogMessageSubtype","MessagingGenericAdminTextType","MessengerAttachmentTransformer.bs","InstantGameUpdateXMATUpdateType"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();function h(o,p,q){__p&&__p();var r;if(o.__typename==="GroupPollExtensibleMessageAdminText"){var s=o.question,t;if(s==null)t=[{},null];else{var u=Object.assign({},s);Object.assign(u,{total_count:o.total_count,options:c("bs_array").map(function(v){var w=Object.assign({},v);return Object.assign(w,{total_count:v.voters.nodes.length,voters:c("bs_array").map(function(x){return x.id},v.voters.nodes)})},s.options.nodes)});t=[u,s.id]}r={message_type:c("bs_js_null_undefined").from_opt(c("bs_js_primitive").undefined_to_opt(c("MessagingGenericAdminTextType")[p])),untypedData:{event_type:c("bs_string").lowercase(o.event_type),question_id:t[1],question_json:c("bs_js_null_undefined").from_opt(c("bs_js_primitive").undefined_to_opt(JSON.stringify(t[0])))}}}else r=o.__typename==="InstantGameUpdateExtensibleMessageAdminText"?{message_type:c("bs_js_null_undefined").from_opt(c("bs_js_primitive").undefined_to_opt(c("MessagingGenericAdminTextType")[p])),untypedData:{game_id:c("getByPath")(o,["game","id"]),update_type:c("bs_js_null_undefined").from_opt(c("bs_js_primitive").undefined_to_opt(c("InstantGameUpdateXMATUpdateType")[o.update_type])),collapsed_text:o.collapsed_text,expanded_text:o.expanded_text,cta_url:c("getByPath")(o,["instant_game_update_data","cta_url"]),cta_title:c("getByPath")(o,["instant_game_update_data","cta_title"]),custom_image_url:c("getByPath")(o,["instant_game_update_data","photo","image","uri"]),template:c("getByPath")(o,["instant_game_update_data","template"])}}:o.__typename==="MessengerAdContextAdminText"?{message_type:c("bs_js_null_undefined").from_opt(c("bs_js_primitive").undefined_to_opt(c("MessagingGenericAdminTextType")[p])),untypedData:{ad_url:o.ad_url}}:o.__typename==="AdExtensibleMessageAdminText"?{message_type:c("bs_js_null_undefined").from_opt(c("bs_js_primitive").undefined_to_opt(c("MessagingGenericAdminTextType")[p])),untypedData:{ad_client_token:o.ad_client_token,ad_id:o.ad_id,ad_preferences_link:o.ad_preferences_link,ad_properties:o.ad_properties}}:o.__typename==="ThemeColorExtensibleMessageAdminText"||o.__typename==="ThreadIconExtensibleMessageAdminText"||o.__typename==="ThreadNicknameExtensibleMessageAdminText"||o.__typename==="AcceptPendingThreadExtensibleMessageAdminText"||o.__typename==="AddContactExtensibleMessageAdminText"||o.__typename==="RtcCallLogExtensibleMessageAdminText"||o.__typename==="GameScoreExtensibleMessageAdminText"||o.__typename==="ConfirmFriendRequestExtensibleMessageAdminText"||o.__typename==="PartiesInviteExtensibleMessageAdminText"||o.__typename==="AppointmentReminderExtensibleMessageAdminText"||o.__typename==="GraphQLServicesAppointmentsOptOutExtensibleMessageAdminText"?{message_type:c("bs_js_null_undefined").from_opt(c("bs_js_primitive").undefined_to_opt(c("MessagingGenericAdminTextType")[p])),untypedData:Object.assign({},o)}:{message_type:c("bs_js_null_undefined").from_opt(c("bs_js_primitive").undefined_to_opt(c("MessagingGenericAdminTextType")[p])),untypedData:undefined};return{log_message_body:q,log_message_data:r,log_message_type:c("MercuryLogMessageType").GENERIC_ADMIN_TEXT}}function i(o){return c("bs_array").map(function(p){if(p==="p2p_transfer")return c("StoryAttachmentStyle").ORION;else if(p==="p2p_payment_request")return c("StoryAttachmentStyle").ORION_REQUEST;else return p},o)}function j(o){__p&&__p();var p=o.target,q;if(p==null)q=null;else if(p.__typename==="CrisisListing")q=c("bs_block").__(0,[{listing_type:p.listing_type,listing_category:p.listing_category,map_image:p.map_image}]);else if(p.__typename==="MoneyTransfer")q=c("bs_block").__(1,[{sender:p.sender,receiver:p.receiver,transfer_id:p.transfer_id,bubble_view:p.bubble_view}]);else if(p.__typename==="PeerToPeerTransfer")q=c("bs_block").__(2,[{sender:p.sender,receiver_profile:p.receiver_profile,transaction_amount:p.transaction_amount,transfer_status:p.transfer_status,transfer_id:p.transfer_id,completedTime:p.completedTime,updatedTime:p.updatedTime,creationTime:p.creationTime,transfer_context:p.transfer_context,amount_fb_discount:p.amount_fb_discount,funds_availability:p.funds_availability,group_thread_fbid:p.group_thread_fbid,platform_item:p.platform_item,id:p.id,status_description:p.status_description,bubble_view:p.bubble_view,currency_amount:p.currency_amount}]);else if(p.__typename==="PeerToPeerPaymentRequest")q=c("bs_block").__(3,[{amount:p.amount,transaction_amount:p.transaction_amount,requester:p.requester,requestee:p.requestee,request_status:p.request_status,request_theme:p.request_theme,id:p.id,memo_text:p.memo_text,transfer:p.transfer,creation_time:p.creation_time,group_thread_fbid:p.group_thread_fbid,updated_time:p.updated_time,status_description:p.status_description,individual_requests:p.individual_requests}]);else if(p.__typename==="PaymentPlatformAttachment")q=c("bs_block").__(4,[{payment_modules_client:p.payment_modules_client,is_viewer_seller:p.is_viewer_seller,payment_snippet:p.payment_snippet,item_list:p.item_list,components:p.components,payment_call_to_actions:p.payment_call_to_actions,click_action:p.click_action,invoicer_id:p.invoicer_id}]);else if(p.__typename==="MomentsAppMessengerInvitation")q=c("bs_block").__(5,[{snippet:p.snippet}]);else if(p.__typename==="MomentsAppMessengerPhotoRequest")q=c("bs_block").__(6,[{snippet:p.snippet}]);else if(p.__typename==="MessengerRetailPromotion")q=c("bs_block").__(7,[{message:p.message,call_to_actions:p.call_to_actions,promotion_items:p.promotion_items}]);else if(p.__typename==="MessengerBusinessMessage")q=c("bs_block").__(8,[{message:p.message,call_to_actions:p.call_to_actions,business_items:p.business_items}]);else if(p.__typename==="Video")q=c("bs_block").__(9,[{video_id:p.video_id}]);else if(p.__typename==="PagesPlatformLeadGenInfo")q=c("bs_block").__(10,[{field_data_list:p.field_data_list}]);else if(p.__typename==="MessageLiveLocation")q=c("bs_block").__(11,[{live_location_id:p.live_location_id,is_expired:p.is_expired,expiration_time:p.expiration_time,sender:p.sender,coordinate:p.coordinate,location_title:p.location_title,sender_destination:p.sender_destination,stop_reason:p.stop_reason}]);else if(p.__typename==="QuickInvite")q=c("bs_block").__(12,[{id:p.id,invite_sender:p.invite_sender,invite_recipient:p.invite_recipient}]);else if(p.__typename==="PagesPlatformBookingMessage")q=c("bs_block").__(13,[{id:p.id,page:p.page,message_bubble_type:p.message_bubble_type,user:p.user,native_component_flow_request:p.native_component_flow_request}]);else if(p.__typename==="GenieMessage")q=c("bs_block").__(14,[{genie_sender:p.genie_sender,story_attachment:p.story_attachment}]);else if(p.__typename==="Event")q=c("bs_block").__(15,[{eventID:p.eventID,guestStatus:p.guestStatus,canViewerJoin:p.canViewerJoin,timeString:p.timeString,event_place:p.event_place,social_context:p.social_context,watchStatus:p.watchStatus,connection_style:p.connection_style,canViewerWatch:p.canViewerWatch}]);else if(p.__typename==="ExternalSong")q=c("bs_block").__(16,[{application_name:p.application_name,artist_names:p.artist_names,audio_url:p.audio_url,duration_ms:p.duration_ms,music_title:p.music_title}]);else if(p.__typename==="LightweightAction")q=c("bs_block").__(17,[{lwa_state:p.lwa_state,lwa_type:p.lwa_type}]);else if(p.__typename==="MessengerRetailItem")q=c("bs_block").__(18,[{id:p.id,name:p.name,desc:p.desc,thumb_url:p.thumb_url,item_url:p.item_url,source:p.source,image_aspect_ratio:p.image_aspect_ratio,first_metaline:p.first_metaline,second_metaline:p.second_metaline,third_metaline:p.third_metaline,default_action:p.default_action,call_to_actions:p.call_to_actions}]);else if(p.__typename==="AgentItemSuggestion")q=c("bs_block").__(19,[{id:p.id,desc:p.desc,total_cost:p.total_cost,merchant_name:p.merchant_name,target_url:p.target_url,thumb_url:p.thumb_url,raw_amount:p.raw_amount,payment:p.payment,price_amount:p.price_amount,price_currency:p.price_currency,name:p.name}]);else if(p.__typename==="FundraiserPersonToCharity"||p.__typename==="FundraiserPersonForPerson"){var r=p.fundraiser_detailed_progress_text,s=p.fundraiser_subtitle_text,t=p.focused_cover_photo;q=c("bs_block").__(20,[{fundraiserID:p.id,canDonate:p.can_donate,hasViewerDonated:p.has_viewer_donated,fundraiserDetailedProgressText:r==null?null:r.text,fundraiserSubtitleText:s==null?null:s.text,focusedCoverPhoto:t==null?null:{src:t.photo.image.uri,data:{height:t.photo.image.height,width:t.photo.image.width}}}])}else q=p.__typename==="MessengerRetailReceipt"?c("bs_block").__(21,[{account_holder_name:p.account_holder_name,adjustments:p.retail_adjustments,cancellation_url:p.cancellation_url,items:p.retail_items,merchant_name:p.merchant_name,messenger_commerce_bubble_type:p.bubble_type,order_id:p.receipt_id,order_time:p.order_time_for_display,order_url:p.receipt_url,payment_method:p.order_payment_method,receipt_id:p.id,recipient_name:p.recipient_name,shipping_cost:p.shipping_cost,shipping_method:p.shipping_method,status:p.status,structured_address:p.structured_address,subtotal:p.subtotal,total_cost:p.total,total_tax:p.tax,partner_logo:p.partner_log}]):p.__typename==="JobApplication"?c("bs_block").__(22,[{id:p.id}]):p.__typename==="GroupCommerceProductItem"?c("bs_block").__(23,[{group_commerce_item_description:p.group_commerce_item_description,group_commerce_item_seller:p.group_commerce_item_seller,formatted_price:p.formatted_price,group_commerce_item_title:p.group_commerce_item_title,primary_photo:p.primary_photo,url:p.url}]):p.__typename==="Page"?c("bs_block").__(24,[{address:p.address,top_category_name:p.top_category_name,cover_photo:p.cover_photo,location:p.location,name:p.name,overall_star_rating:p.overall_star_rating,id:p.id,price_range_description:p.price_range_description}]):p.__typename==="MessengerEventReminder"?c("bs_block").__(25,[{is_active:p.is_active}]):p.__typename==="AirlineBoardingPassCollectionMessageAttachment"?c("bs_block").__(26,[{tint_color:p.tint_color,logo:p.logo,flight_label:p.flight_label,boarding_time_label:p.boarding_time_label,departure_label:p.departure_label,passenger_names_label:p.passenger_names_label,passenger_seat_label:p.passenger_seat_label,flight_terminal_label:p.flight_terminal_label,flight_gate_label:p.flight_gate_label,view_boarding_pass_cta_label:p.view_boarding_pass_cta_label,boarding_passes:p.boarding_passes,share_cta_label:p.share_cta_label,message_cta_label:p.message_cta_label,boarding_pass_title_label:p.boarding_pass_title_label,boarding_pass_error_title_label:p.boarding_pass_error_title_label}]):p.__typename==="AirlineCheckInReminderMessageAttachment"?c("bs_block").__(27,[{pnr_number:p.pnr_number,tint_color:p.tint_color,checkin_url:p.checkin_url,booking_number_label:p.booking_number_label,flight_label:p.flight_label,arrival_time_label:p.arrival_time_label,departure_time_label:p.departure_time_label,checkin_cta_label:p.checkin_cta_label,logo:p.logo,flight_infos:p.flight_infos}]):p.__typename==="AirlineUpdateMessageAttachment"?c("bs_block").__(28,[{pnr_number:p.pnr_number,tint_color:p.tint_color,update_type:p.update_type,departure_time_label:p.departure_time_label,arrival_time_label:p.arrival_time_label,booking_number_label:p.booking_number_label,flight_gate_label:p.flight_gate_label,flight_label:p.flight_label,flight_status_label:p.flight_status_label,passenger_names_label:p.passenger_names_label,passenger_seat_label:p.passenger_seat_label,logo:p.logo,flight_info:p.flight_info,hightlighted_labels:p.hightlighted_labels}]):p.__typename==="AirlineItineraryMessageAttachment"?c("bs_block").__(29,[{confirmation_number:p.confirmation_number,pnr_number:p.pnr_number,tint_color:p.tint_color,formatted_total:p.formatted_total,itemized_price_infos:p.itemized_price_infos,formatted_tax:p.formatted_tax,formatted_base_price:p.formatted_base_price,passenger_infos:p.passenger_infos,logo:p.logo,aircraft_type_label:p.aircraft_type_label,arrival_time_label:p.arrival_time_label,base_price_label:p.base_price_label,booking_number_label:p.booking_number_label,cabin_type_label:p.cabin_type_label,departure_time_label:p.departure_time_label,flight_confirmation_label:p.flight_confirmation_label,flight_date_label:p.flight_date_label,flight_label:p.flight_label,flight_terminal_label:p.flight_terminal_label,itinerary_error_title_label:p.itinerary_error_title_label,itinerary_title_label:p.itinerary_title_label,passenger_name_label:p.passenger_name_label,passenger_names_label:p.passenger_names_label,passenger_seat_label:p.passenger_seat_label,purchase_summary_label:p.purchase_summary_label,taxes_label:p.taxes_label,total_label:p.total_label,view_details_cta_label:p.view_details_cta_label,itinerary_legs:p.itinerary_legs}]):p.__typename==="MessengerRetailShipmentTrackingEvent"?c("bs_block").__(30,[{id:p.id,shipment:p.shipment,tracking_event_time_for_display:p.tracking_event_time_for_display,shipment_tracking_event_type:p.shipment_tracking_event_type,messenger_commerce_location:p.messenger_commerce_location,tracking_event_description:p.tracking_event_description,bubble_type:p.bubble_type}]):p.__typename==="MessengerRetailShipment"?c("bs_block").__(31,[{id:p.id,tracking_number:p.tracking_number,shipdate_for_display:p.shipdate_for_display,estimated_delivery_time_for_display:p.estimated_delivery_time_for_display,commerce_origin:p.commerce_origin,commerce_destination:p.commerce_destination,retail_carrier:p.retail_carrier,shipment_tracking_events:p.shipment_tracking_events,receipt:p.receipt,recipient:p.recipient,retail_shipment_items:p.retail_shipment_items,bubble_type:p.bubble_type}]):p.__typename==="TicketOrderAttachment"?c("bs_block").__(33,[{ticket_order_id:p.ticket_order_id,event:p.event}]):p.__typename==="LeadGenDeepLinkData"?c("bs_block").__(32,[{id:p.id,cover_image:p.cover_image,headline:p.headline,name:p.name,page:p.page}]):p.__typename==="UserLeadGenInfo"?c("bs_block").__(34,[{id:p.id,field_data:p.field_data}]):p.__typename==="IceBreakerMessageAttachment"?c("bs_block").__(35,[{ice_breaker_title:p.ice_breaker_title,ice_breaker_messages:p.ice_breaker_messages,ad_id:p.ad_id}]):null;return{description:o.description,media:o.media,source:o.source,style_list:i(o.style_list),title_with_entities:o.title_with_entities,properties:o.properties,url:o.url,deduplication_key:o.deduplication_key,action_links:o.action_links,messaging_attribution:o.messaging_attribution,messenger_call_to_actions:o.messenger_call_to_actions,target:q}}function k(o){var p=j({description:o.description,media:o.media,source:o.source,style_list:o.style_list,title_with_entities:o.title_with_entities,properties:o.properties,url:o.url,deduplication_key:o.deduplication_key,action_links:o.action_links,messaging_attribution:o.messaging_attribution,messenger_call_to_actions:o.messenger_call_to_actions,target:o.target});if(p==null)return null;else{var q=c("bs_array").map(j,o.subattachments);return Object.assign({subattachments:q},p)}}function l(o){__p&&__p();var p=o.blob_attachments,q=[];if(!(p==null))c("bs_array").iter(function(r){__p&&__p();if(r.__typename==="MessageImage"){q.push(c("bs_block").__(0,[{attribution_app:r.attribution_app,attribution_metadata:r.attribution_metadata,filename:r.filename,preview:r.preview,large_preview:r.large_preview,thumbnail:r.thumbnail,legacy_attachment_id:r.legacy_attachment_id,original_dimensions:r.original_dimensions,original_extension:r.original_extension,render_as_sticker:r.render_as_sticker,photo_encodings:r.photo_encodings}]));return 0}else if(r.__typename==="MessageAnimatedImage"){q.push(c("bs_block").__(1,[{attribution_app:r.attribution_app,attribution_metadata:r.attribution_metadata,filename:r.filename,animated_image:r.animated_image,legacy_attachment_id:r.legacy_attachment_id,preview_image:r.preview_image,original_dimensions:r.original_dimensions}]));return 0}else if(r.__typename==="MessageAudio"){q.push(c("bs_block").__(2,[{attribution_app:r.attribution_app,attribution_metadata:r.attribution_metadata,filename:r.filename,playable_url:r.playable_url,playable_duration_in_ms:r.playable_duration_in_ms,is_voicemail:r.is_voicemail,audio_type:r.audio_type,url_shimhash:r.url_shimhash,url_skipshim:r.url_skipshim}]));return 0}else if(r.__typename==="MessageVideo"){q.push(c("bs_block").__(3,[{attribution_app:r.attribution_app,attribution_metadata:r.attribution_metadata,filename:r.filename,playable_url:r.playable_url,playable_duration_in_ms:r.playable_duration_in_ms,legacy_attachment_id:r.legacy_attachment_id,chat_image:r.chat_image,video_type:r.video_type,original_dimensions:r.original_dimensions,large_image:r.large_image,inbox_image:r.inbox_image}]));return 0}else if(r.__typename==="MessageFile"){q.push(c("bs_block").__(4,[{attribution_app:r.attribution_app,attribution_metadata:r.attribution_metadata,filename:r.filename,url:r.url,content_type:r.content_type,is_malicious:r.is_malicious,message_file_fbid:r.message_file_fbid,url_shimhash:r.url_shimhash,url_skipshim:r.url_skipshim}]));return 0}else return 0},p);return q}function m(o){__p&&__p();var p=o.message;if(p==null)return[];else{var q=[];c("bs_array").iter(function(r){__p&&__p();var p=r.entity;if(p==null)return 0;else{var s=p.id,t=p.thread_key;if(s==null)if(t==null)return 0;else{var u=t.thread_fbid;if(u==null)return 0;else{q.push({id:u,offset:r.offset,length:r.length,type:r.__typename});return 0}}else{q.push({id:s,offset:r.offset,length:r.length,type:r.__typename});return 0}}},p.ranges);return q}}function n(o,p,q,r){__p&&__p();var s={};c("bs_array").iter(function(X){s[X.user.id]=X.reaction;return 0},p.message_reactions);var t=+c("FBIDCheck").isUser_deprecated(p.message_sender.id),u=t?c("MessagingTagUtils").getSourceFromTags(p.tags_list):c("MessagingSourceEnum").UNKNOWN,v=t?c("MessagingTagUtils").getSourceTags(p.tags_list,u):[],w=p.commerce_message_type,x=p.customizations,y={thread_id:q.thread_id,thread_fbid:q.thread_fbid,other_user_fbid:q.other_user_fbid,action_type:p.__typename==="UserMessage"?c("MercuryActionType").USER_GENERATED_MESSAGE:c("MercuryActionType").LOG_MESSAGE,message_id:p.message_id,threading_id:null,offline_threading_id:p.offline_threading_id,author:c("MercuryIDs").getParticipantIDFromUserID(p.message_sender.id),author_email:p.message_sender.email,ephemeral_ttl_mode:p.ttl,timestamp:c("bs_caml_format").caml_float_of_string(p.timestamp_precise),is_unread:p.unread,is_filtered_content:c("bs_js_boolean").to_js_boolean(+(p.tags_list.indexOf(c("MessagingTag").FILTERED_CONTENT)!==-1)),is_filtered_content_bh:c("bs_js_boolean").to_js_boolean(+(p.tags_list.indexOf(c("MessagingTag").FILTERED_CONTENT_BH)!==-1)),is_filtered_content_account:c("bs_js_boolean").to_js_boolean(+(p.tags_list.indexOf(c("MessagingTag").FILTERED_CONTENT_ACCOUNT)!==-1)),is_filtered_content_quasar:c("bs_js_boolean").to_js_boolean(+(p.tags_list.indexOf(c("MessagingTag").FILTERED_CONTENT_QUASAR)!==-1)),is_filtered_content_invalid_app:c("bs_js_boolean").to_js_boolean(+(p.tags_list.indexOf(c("MessagingTag").FILTERED_CONTENT_INVALID_APP)!==-1)),is_sponsored:p.is_sponsored,ad_id:p.ad_id,ad_client_token:p.ad_client_token,commerce_message_type:w==null?null:c("bs_js_null_undefined").from_opt(c("bs_js_primitive").undefined_to_opt(c("MNCommerceMessageType")[w])),customizations:x==null?[]:x,source:u,source_tags:v,tags:p.tags_list,is_spoof_warning:c("bs_js_boolean").to_js_boolean(+(p.tags_list.indexOf(c("MessagingTag").DOMAIN_AUTH_FAIL)!==-1||p.tags_list.indexOf(c("MessagingTag").SPAM_SPOOFING)!==-1||p.tags_list.indexOf(c("MessagingTag").SPOOF_WARNING)!==-1)),folder:q.folder,platform_xmd:p.platform_xmd_encoded,message_source:p.message_source_data,montage_reply_data:p.montage_reply_data,skip_bump_thread:false,profile_ranges:m(p),reactions:s};if(p.__typename==="UserMessage"){var z=l(p),A=p.extensible_attachment,B;if(A==null)B=null;else{var C=A.story_attachment;B={legacy_attachment_id:A.legacy_attachment_id,story_attachment:C==null?null:k(C)}}var D=c("MessengerAttachmentTransformer.bs").transformAttachment(o,{extensible_attachment:B,blob_attachments:z,sticker:p.sticker},r),E=p.message,F=p.page_admin_sender;Object.assign(y,{body:E==null?null:E.text,creator_info:F==null?null:{creatorID:F.admin_id,creatorName:F.name,creatorType:F.sender_type,labelType:F.label_type,pageID:F.page_id,profileURI:F.profile_uri},subject:null,has_attachment:c("bs_js_boolean").to_js_boolean(+(D.length>0)),attachments:D,raw_attachments:null,ranges:undefined,meta_ranges:p.meta_ranges.map(function(X){return babelHelpers["extends"]({},X,{data:JSON.parse(X.data)})})})}else if(p.__typename==="VoiceCallMessage"||p.__typename==="VideoCallMessage"){var G=p.__typename,H=G==="VoiceCallMessage"?c("MercuryLogMessageType").PHONE_CALL:c("MercuryLogMessageType").VIDEO_CALL,I=p.message_sender.id,J=q.other_user_fbid,K=J==null?null:c("MercuryIDs").getParticipantIDFromUserID(I===J?c("CurrentUser").getID():J),L=p.answered;Object.assign(y,{log_message_type:H,log_message_data:{answered:L==null?false:L,caller:c("MercuryIDs").getParticipantIDFromUserID(I),callee:K},log_message_body:p.snippet})}else if(p.__typename==="ThreadNameMessage")Object.assign(y,{log_message_type:c("MercuryLogMessageType").THREAD_NAME,log_message_data:{name:p.thread_name},log_message_body:p.snippet});else if(p.__typename==="ThreadImageMessage"){var M=p.image_with_metadata,N;if(M==null)N=null;else{var O=M.preview;N={preview_url:O==null?null:O.uri,metadata:{fbid:M.legacy_attachment_id,dimensions:c("bs_pervasives").string_of_int(M.original_dimensions.x)+(","+c("bs_pervasives").string_of_int(M.original_dimensions.y))}}}Object.assign(y,{log_message_type:c("MercuryLogMessageType").THREAD_IMAGE,log_message_data:{image:N},log_message_body:p.snippet})}else if(p.__typename==="ParticipantsAddedMessage"){var P=p.participants_added;Object.assign(y,{log_message_type:c("MercuryLogMessageType").SUBSCRIBE,log_message_data:{added_participants:P==null?[]:c("bs_array").map(function(X){return c("MercuryIDs").getParticipantIDFromUserID(X.id)},P)},log_message_body:p.snippet})}else if(p.__typename==="ParticipantLeftMessage"){var Q=p.participants_removed;Object.assign(y,{log_message_type:c("MercuryLogMessageType").UNSUBSCRIBE,log_message_data:{removed_participants:Q==null?[]:c("bs_array").map(function(X){return c("MercuryIDs").getParticipantIDFromUserID(X.id)},Q)},log_message_body:p.snippet})}else if(p.__typename==="GenericAdminTextMessage"){var R=p.extensible_message_admin_text,S=p.extensible_message_admin_text_type;if(R==null){if(!(S==null))Object.assign(y,{log_message_body:p.snippet,log_message_data:{message_type:c("bs_js_null_undefined").from_opt(c("bs_js_primitive").undefined_to_opt(c("MessagingGenericAdminTextType")[S])),untypedData:undefined},log_message_type:c("MercuryLogMessageType").GENERIC_ADMIN_TEXT})}else if(!(S==null))Object.assign(y,h(R,S,p.snippet))}else if(p.__typename==="P2PPaymentRequestMessage"){var T=p.p2p_sender,U=p.p2p_receiver,V=p.amount,W=p.message_type;Object.assign(y,{log_message_body:p.snippet,log_message_data:{transfer_id:p.transfer_id,senderId:T==null?null:c("MercuryIDs").getParticipantIDFromUserID(T.id),receiverId:U==null?null:c("MercuryIDs").getParticipantIDFromUserID(U.id),formattedAmount:V==null?null:V.formatted,subtype:W==null?null:c("bs_js_null_undefined").from_opt(c("bs_js_primitive").undefined_to_opt(c("P2PPaymentLogMessageSubtype")[W]))},log_message_type:c("MercuryLogMessageType").ORION})}return y}g._getGenericAdminTextMessage=h;g._getStyleList=i;g.unsafeCastExtensibleAttachmentWithoutSubattachments=j;g.unsafeCastExtensibleAttachment=k;g.unsafeCastBlobAttachments=l;g._getProfileRanges=m;g.transformMessage=n}),null);
__d("MessengerAttachmentTransformerForSend.bs",["bs_array","bs_caml_array","MercuryAttachmentType","MessengerMessageTransformer.bs","MessengerAttachmentTransformer.bs"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();function h(j,k,l){__p&&__p();var m=k.node;if(m==null)return{attach_type:c("MercuryAttachmentType").ERROR};else{var n;if(m.__typename==="ExtensibleMessageAttachment"){var o=m.story_attachment;n={legacy_attachment_id:m.legacy_attachment_id,story_attachment:o==null?null:c("MessengerMessageTransformer.bs").unsafeCastExtensibleAttachment(o)}}else n=null;var p=m.__typename==="Sticker"?m:null,q=m.__typename,r;switch(q){case"MessageAnimatedImage":case"MessageAudio":case"MessageFile":case"MessageImage":case"MessageVideo":r=[m];break;default:r=null}var s=c("MessengerMessageTransformer.bs").unsafeCastBlobAttachments({blob_attachments:r}),t=c("MessengerAttachmentTransformer.bs").transformAttachment(j,{extensible_attachment:n,blob_attachments:s,sticker:p},l);if(t.length)return c("bs_caml_array").caml_array_get(t,0);else return{}}}function i(j,k,l){return c("bs_array").map(function(m){return h(j,m,l)},k)}g._transform=h;g.transform=i}),null);
__d("XMessagingSendController",["XController"],(function a(b,c,d,e,f,g){f.exports=c("XController").create("/messaging/send/",{})}),null);
__d("MercuryServerSendMessageQueue",["fbt","BanzaiODS","ChatReliabilityInstrumentation","LogHistory","MercuryLoggingHelper","MercuryServerRequestsConfig","MessengerAttachmentTransformerForSend.bs","Run","MercuryServerDispatcher","MercuryServerSendMessageQueueSimulatedError","XMessagingSendController","idx"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i=c("LogHistory").getInstance("mercury_server_send_message_queue");function j(k,l,m,n){__p&&__p();var o;this.pending_message=null;this.queue=[];this.$MercuryServerSendMessageQueue5=function(){if(this.queue.length||this.pending_message)return h._("You haven't sent your message yet. Do you want to leave without sending?");return undefined}.bind(this);this.sender_id=k;this.queue_id=l;this.$MercuryServerSendMessageQueue2=m.success_handler;this.$MercuryServerSendMessageQueue1=m.error_handler;this.$MercuryServerSendMessageQueue4=m.transport_error_handler;this.$MercuryServerSendMessageQueue3=m.timeout_handler;this.client=n;c("Run").onBeforeUnload(this.$MercuryServerSendMessageQueue5,false);var p=null;if(c("MercuryServerRequestsConfig").msgrRegion)p={name:"X-MSGR-Region",value:c("MercuryServerRequestsConfig").msgrRegion};var q=c("XMessagingSendController").getURIBuilder().getURI().toString(),r=(o={},o[q]={request_user_id:this.sender_id,endpoint_id:this.queue_id,mode:c("MercuryServerDispatcher").IMMEDIATE,customHeader:p,handler:this.handleSuccess.bind(this),error_handler:this.handleError.bind(this),transport_error_handler:this.handleTransportError.bind(this),timeout:m.timeout,timeout_handler:this.handleTimeout.bind(this),connection_retries:m.connection_retries},o);c("MercuryServerDispatcher").registerEndpoints(r)}j.prototype.enqueue=function(k){this.queue.push(k);this.$MercuryServerSendMessageQueue6()};j.prototype.$MercuryServerSendMessageQueue6=function(){__p&&__p();if(this.pending_message||!this.queue.length){if(this.pending_message)this.$MercuryServerSendMessageQueue7();return}this.pending_message=this.queue.shift();var k={client:this.client,action_type:this.pending_message.action_type,app_id:this.pending_message.app_id,audio_ids:this.pending_message.audio_ids,body:this.pending_message.body,client_thread_id:this.pending_message.client_thread_id,content_attachment:this.pending_message.content_attachment,ephemeral_ttl_mode:this.pending_message.ephemeral_ttl_mode,file_ids:this.pending_message.file_ids,gif_ids:this.pending_message.gif_ids,has_attachment:this.pending_message.has_attachment,image_ids:this.pending_message.image_ids,location_attachment:this.pending_message.location_attachment,lightweight_action_attachment:this.pending_message.lightweight_action_attachment,log_message_data:this.pending_message.log_message_data,log_message_type:this.pending_message.log_message_type,message_id:this.pending_message.message_id,message_source_data:this.pending_message.message_source_data,montage_reply_data:this.pending_message.montage_reply_data,offline_threading_id:this.pending_message.offline_threading_id,other_user_fbid:this.pending_message.other_user_fbid,photo_fbids:this.pending_message.photo_fbids,shareable_attachment:this.pending_message.shareable_attachment,signature_id:this.pending_message.signatureID,source:this.pending_message.source,specific_to_list:this.pending_message.specific_to_list,sticker_id:this.pending_message.sticker_id,tags:this.pending_message.tags,thread_fbid:this.pending_message.thread_fbid,timestamp:this.pending_message.timestamp,ui_push_phase:this.pending_message.ui_push_phase,video_ids:this.pending_message.video_ids,platform_xmd:this.pending_message.platform_xmd,profile_xmd:this.pending_message.profile_xmd};for(var l in k)if(k[l]===undefined||k[l]===null)delete k[l];if(!k.action_type){var m=c("MercuryLoggingHelper").obfuscateMessage(k);c("ChatReliabilityInstrumentation").logERROR("missing action type before sending to send controller");i.debug("missing_action_type",JSON.stringify(m))}if(!k.message_id){var n=c("MercuryLoggingHelper").obfuscateMessage(k);c("ChatReliabilityInstrumentation").logERROR("missing action type before sending to send controller"+JSON.stringify(n));i.debug("missing_message_id",JSON.stringify(n))}c("MercuryServerDispatcher").trySend(c("XMessagingSendController").getURIBuilder().getURI().toString(),k,null,this.sender_id,this.queue_id)};j.prototype.$MercuryServerSendMessageQueue8=function(){while(this.queue.length)this.$MercuryServerSendMessageQueue9(this.queue.shift())};j.prototype.$MercuryServerSendMessageQueue9=function(k){this.$MercuryServerSendMessageQueue1(c("MercuryServerSendMessageQueueSimulatedError").create(k));i.error("mark_as_failed",JSON.stringify({fbid:this.sender_id,queue_id:this.queue_id,message:c("MercuryLoggingHelper").obfuscateMessage(k)}))};j.prototype.handleSuccess=function(k,l){__p&&__p();var m=(k.actions||[]).map(function(n){__p&&__p();var o,p=babelHelpers["extends"]({},n);if(n.graphql_payload&&n.graphql_payload.length>0){var q=c("MessengerAttachmentTransformerForSend.bs").transform(this.sender_id,n.graphql_payload,n.for_page);p=Object.assign(p,{attachments:q})}var r=(o=n)!=null?(o=o.log_message_data)!=null?o.graphql_image:o:o;if(r){var s=c("MessengerAttachmentTransformerForSend.bs").transform(this.sender_id,[r],n.for_page);p=Object.assign(p,{log_message_data:{image:s[0]}})}return p}.bind(this));k.actions=m;this.$MercuryServerSendMessageQueue2(k,l);this.pending_message=null;this.$MercuryServerSendMessageQueue6()};j.prototype.handleError=function(k){this.$MercuryServerSendMessageQueue1(k);this.$MercuryServerSendMessageQueue8();this.pending_message=null};j.prototype.handleTransportError=function(k){this.$MercuryServerSendMessageQueue4(k);this.$MercuryServerSendMessageQueue8();this.pending_message=null};j.prototype.handleTimeout=function(k){this.$MercuryServerSendMessageQueue3(k);this.$MercuryServerSendMessageQueue8();this.pending_message=null};j.prototype.$MercuryServerSendMessageQueue7=function(){i.debug("maybe_send_next_pending_message",JSON.stringify({fbid:this.sender_id,queue_id:this.queue_id,pending_message:c("MercuryLoggingHelper").obfuscateMessage(this.pending_message),queue:this.queue.map(function(l){return c("MercuryLoggingHelper").obfuscateMessage(l)})}));var k="send_queue.delayed.queue_length."+this.queue.length.toString();c("BanzaiODS").bumpEntityKey("chat.web",k)};f.exports=j}),null);
__d("MercurySingletonMixin",["CurrentUser"],(function a(b,c,d,e,f,g){__p&&__p();var h={_getInstances:function i(){if(!this._instances)this._instances={};return this._instances},get:function i(){return this.getForFBID(c("CurrentUser").getID())},getForFBID:function i(j){var k=this._getInstances();if(!k[j])k[j]=new this(j);return k[j]}};f.exports=h}),null);
__d("MercuryServerSendMessageQueueRouter",["BanzaiODS","LogHistory","Map","MercuryServerSendMessageQueue","MercurySingletonMixin"],(function a(b,c,d,e,f,g){__p&&__p();var h=c("LogHistory").getInstance("mercury_server_send_message_queue_router"),i="chat.web.send_queue_router";c("BanzaiODS").setEntitySample(i,.1);function j(k){"use strict";this.queues=new(c("Map"))();this.fbid=k}j.prototype.enqueue=function(k,l,m,n){"use strict";var o=this.queues.get(k);if(o===undefined){o=new(c("MercuryServerSendMessageQueue"))(this.fbid,k,l,m);this.queues.set(k,o);h.debug("added queue",JSON.stringify({fbid:this.fbid,queue_id:k}));c("BanzaiODS").bumpEntityKey(i,"new_queue")}o.enqueue(n)};Object.assign(j,c("MercurySingletonMixin"));f.exports=j}),null);
__d("MercurySourceType",[],(function a(b,c,d,e,f,g){f.exports=Object.freeze({CHAT_ORCA:"source:chat:orca",CHAT_IPHONE:"source:chat:iphone",CHAT_JABBER:"source:chat:jabber",CHAT_MEEBO:"source:chat:meebo",CHAT_WEB:"source:chat:web",CHAT_TEST:"source:chat:test",CHAT_FORWARD_DIALOG:"source:chat:forward",CHAT:"source:chat",CONTACT_ADD_MUTATION:"source:contact_add:graphql_mutation",CONTACT_ADD_CYMK:"source:contact_add:cymk_suggestion",CUSTOMER_CHAT_PLUGIN:"source:discovery:customer_chat_plugin",EMAIL:"source:email",EVENT_MESSAGE_BLAST:"source:event_message_blast",EVENT_TICKETING:"source:event_ticket",EVENT_REMINDERS:"source:event_reminders",FUNDRAISER_MESSAGE_BLAST:"source:fundraiser_message_blast",GENERIC_ADMIN_TEXT:"source:generic_admin_text",GIGABOXX_API:"source:gigaboxx:api",GIGABOXX_BLAST:"source:gigaboxx:blast",GIGABOXX_EMAIL_REPLY:"source:gigaboxx:emailreply",GIGABOXX_MOBILE:"source:gigaboxx:mobile",GIGABOXX_WAP:"source:gigaboxx:wap",GIGABOXX_WEB:"source:gigaboxx:web",INVITE:"source:invite",LEIA:"source:leia",MESSENGER_WEB:"source:messenger:web",MESSENGER_WEB_SEARCH:"source:messenger:web_search",SAM_UFI:"source:sam:ufi",SHARE_DIALOG:"source:share:dialog",SEND_PLUGIN:"source:sendplugin",SMS:"source:sms",TEST:"source:test",TITAN_WAP:"source:titan:wap",TITAN_M_BASIC:"source:titan:m_basic",TITAN_M_FREE:"source:titan:m_free_basic",TITAN_M_JAPAN:"source:titan:m_japan",TITAN_M_MINI:"source:titan:m_mini",TITAN_M_TOUCH:"source:titan:m_touch",TITAN_M_APP:"source:titan:m_app",TITAN_M_TABLET:"source:titan:m_tablet",TITAN_M_ZERO:"source:titan:m_zero",TITAN_M_TALK:"source:titan:m_talk",TITAN_WEB:"source:titan:web",TITAN_FACEWEB_ANDROID:"source:titan:faceweb_android",TITAN_FACEWEB_BUFFY:"source:titan:faceweb_buffy",TITAN_FACEWEB_IPAD:"source:titan:faceweb_ipad",TITAN_FACEWEB_IPHONE:"source:titan:faceweb_iphone",TITAN_FACEWEB_UNKNOWN:"source:titan:faceweb_unknown",TITAN_API:"source:titan:api",TITAN_API_MOBILE:"source:titan:api_mobile",TITAN_ORCA:"source:titan:orca",TITAN_EMAIL_REPLY:"source:titan:emailreply",MOBILE:"source:mobile",PAGE_PLATFORM_API:"source:page_platform_api",PAGE_UNIFIED_INBOX:"source:page_unified_inbox",UNKNOWN:"source:unknown",WEB:"source:web",HELPCENTER:"source:helpcenter",NEW_SHARE_DIALOG:"source:share:dialog:new",PAID_PROMOTION:"source:paid_promotion",BUFFY_SMS:"source:buffy:sms",WEBRTC_MOBILE:"source:webrtc:mobile",MESSENGER_COMMERCE:"source:messenger:commerce",MESSENGER_BOT:"source:bot",MESSENGER_EMPLOYEE_ONLY_BOT:"source:bot:employee_only",MESSENGER_OMNIM:"source:messenger:omnim",PAGES_PRIVATE_REPLY:"source:pages:private_reply",MESSENGER_FORWARD_DIALOG:"source:messenger:forward",MESSENGER_AD:"source:messenger:ad",MARKETPLACE:"source:marketplace",MESSENGER_LEAD_GEN:"source:messenger:lead_gen",PAGES_MESSAGE_SHORTLINK:"source:pages:message_shortlink",STICKER_SUBSCRIBE:"source:messenger:sticker_subscribe",PHOTO_TAG:"source:messenger:photo_tag",INTERNAL_TEST_PENDING:"source:internal:test_pending",JOB_SEARCH_APPLICATION:"source:job_search:application",MESSENGER_JOINABLE_LINK:"source:messenger:joinable_link",MESSENGER_ADD_WITH_APPROVAL:"source:messenger:add_with_approval",MESSENGER_SMS_BRIDGE_CONVERT:"source:messenger:sms_bridge_conversion",TINCAN_ORCA:"source:tincan:orca",TINCAN_IOS:"source:tincan:ios",TINCAN_UNKNOWN:"source:tincan:unknown",FACEBOOK_GROUPS_CHANNELS:"source:groups:channels",GROUP_COMMERCE:"source:group_commerce",INTERNAL_TOOL:"source:internal:tool",PAGES_PLATFORM:"source:pages:platform",PAGES_RECOMMENDATION:"source:pages:recommendation",PAGES_ORDER_MANAGEMENT:"source:pages:order_management",PAGE_AUTO_RESPONSE:"source:pages:auto_response",PAGES_INVITE:"source:pages:invite",PAGES_CHAT_EXTENSION:"source:pages:chat_extension",SAVED_CHAT_EXTENSION:"source:saved:chat_extension",CREATOR_PAGE_INITIATE_TO_CREATOR_PAGE:"source:pages:creator_page_initiate_to_creator_page",LIVE_VIDEO_CHAT:"source:live_video_chat",FRIENDING_ADMIN_BUMP:"source:messenger_growth:friending_admin_bump",NEW_MESSENGER_USER_ADMIN_BUMP:"source:messenger_growth:new_messenger_user_admin_bump",EVENT_UPCOMING_BUMP:"source:messenger_growth:event_upcoming_bump",PHOTO_TAG_BUMP:"source:messenger_growth:photo_tag_bump",WALL_POST_BUMP:"source:messenger_growth:wall_post_bump",CUSTOMIZATION_UPSELL_BUMP:"source:messenger_growth:customization_upsell_bump",PAGE_COMMENT_MSG:"source:pages:question_triggered_convo",COMMENT_PIVOT:"source:messenger_growth:comment_pivot",PAGE_HOVERCARD:"source:pages:hovercard",INSTANT_GAMES:"source:instant_games",PAGE_EMAIL_REPLY:"source:pages:email_reply",PAGE_HOME_PAGE_PANEL:"source:page_home_page_panel",GROUPSYNC_MESSENGER_GROUP_CREATE:"source:groupsync:messenger_group_create",GROUPSYNC_SYNC_FROM_FB:"source:groupsync:sync_from_fb",GROUPSYNC_NAMING:"source:groupsync:naming",PAGE_PQI_MESSAGE:"source:pages:pqi_message"})}),null);
__d("MercurySyncConstants",[],(function a(b,c,d,e,f,g){"use strict";var h=Object.freeze({ARBITER_EVENT_INVALID_STATE:"SYNC:INVALID_STATE",ARBITER_EVENT_INVALID_STATE_RETRY:"SYNC:INVALID_STATE_RETRY",ARBITER_EVENT_INVALID_STATE_RECOVER:"SYNC:INVALID_STATE_RECOVER",ARBITER_EVENT_SERVER_REQUESTS_FAIL:"NET:SERVER_REQUESTS_FAIL",ARBITER_EVENT_SERVER_REQUESTS_RECOVER:"NET:SERVER_REQUESTS_RECOVER"});f.exports=h}),null);
__d("MercurySyncDeltaHolder",["Map","MercurySingletonProvider"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();function h(){this.$MercurySyncDeltaHolder2=new(c("Map"))();this.$MercurySyncDeltaHolder3=[];this.$MercurySyncDeltaHolder1=0}h.getForFBID=function(j){return i.getForFBID(j)};h.get=function(){return i.get()};h.prototype.peek=function(){this.$MercurySyncDeltaHolder3=this.$MercurySyncDeltaHolder3.sort(function(j,k){return j-k});return this.$MercurySyncDeltaHolder3[0]};h.prototype.getTop=function(){this.$MercurySyncDeltaHolder3=this.$MercurySyncDeltaHolder3.sort(function(j,k){return j-k});return this.$MercurySyncDeltaHolder3.reverse()[0]};h.prototype.pop=function(){this.$MercurySyncDeltaHolder3=this.$MercurySyncDeltaHolder3.sort(function(l,m){return l-m});if(this.$MercurySyncDeltaHolder3.length===0)return undefined;var j=this.$MercurySyncDeltaHolder3.shift(),k=this.$MercurySyncDeltaHolder2.get(j);this.$MercurySyncDeltaHolder2["delete"](j);return{seqID:j,delta:k}};h.prototype.push=function(j,k){if(this.$MercurySyncDeltaHolder2.has(j))return;this.$MercurySyncDeltaHolder2.set(j,k);this.$MercurySyncDeltaHolder3.push(j)};h.prototype.getLastSeqID=function(){return this.$MercurySyncDeltaHolder1};h.prototype.updateLastSeqID=function(j){this.$MercurySyncDeltaHolder1=j};var i=new(c("MercurySingletonProvider"))(h);f.exports=h}),null);
__d("PageMessageEnumTag",[],(function a(b,c,d,e,f,g){f.exports=Object.freeze({FLAG:"flag",IMPORTANT:"important",LOW_VALUE:"low_value",SPAM_SPOOFING:"spam_spoofing",JOB_APPLICATION:"job_application",CONFIRMED_APPOINTMENT:"confirmed_appointment",PENDING_APPOINTMENT:"pending_appointment",REQUESTED_APPOINTMENT:"requested_appointment",MESSENGER_ADS:"messenger_ads"})}),null);
__d("XMercuryUnseenThreadIDsController",["XController"],(function a(b,c,d,e,f,g){f.exports=c("XController").create("/mercury/unseen_thread_ids/",{})}),null);
__d("XMessagingChangeMentionsMuteModeController",["XController"],(function a(b,c,d,e,f,g){f.exports=c("XController").create("/ajax/mercury/change_mentions_mute_thread/",{})}),null);
__d("XMessagingChangeReactionsMuteModeController",["XController"],(function a(b,c,d,e,f,g){f.exports=c("XController").create("/ajax/mercury/change_reactions_mute_thread/",{})}),null);
__d("MercuryServerRequests",["errorCode","invariant","Arbiter","AsyncResponse","BanzaiODS","ChannelConstants","ChatReliabilityInstrumentation","CurrentUser","FBJSON","EventProfiler","LogHistory","MercuryActionStatus","MercuryActionType","MercuryAPIArgsSource","MercuryAssert","MercuryConfig","MercuryDispatcher","MercuryErrorType","MercuryGlobalActionType","MercuryIDs","MercuryLogMessageType","MercuryMessageClientState","MercuryPayloadSource","MercurySendErrorLogger","MercuryServerPayloadPreprocessor","MercuryServerRequestsConfig","MercuryServerSendMessageQueueRouter","MercuryServerURIs","MercurySingletonProvider","MercurySourceType","MercurySyncDeltaHolder","MercurySyncConstants","MercuryThreadIDMap","MercuryThreadlistConstants","MercuryMessageIDs.bs","MessagingConfig","MessagingTag","PageMessageEnumTag","MercuryServerSendMessageQueueOptions","MercuryServerDispatcher","Set","XMercuryUnseenThreadIDsController","XMessagingChangeMentionsMuteModeController","XMessagingChangeReactionsMuteModeController","createObjectFrom","gkx","ifRequired","setTimeoutAcrossTransitions"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j=c("LogHistory").getInstance("mercury_server"),k=c("MercuryAPIArgsSource").MERCURY,l=1e3,m=30*1e3,n=true;function o(z){return z.getError()?"_"+z.getError():""}function p(z,A){__p&&__p();var B=babelHelpers["extends"]({},z),C=void 0;if(A.threads){if(!B.threads)B.threads={};for(C in A.threads)B.threads[C]=Object.keys(c("createObjectFrom")((B.threads[C]||[]).concat(A.threads[C]||[])))}if(A.messages){if(!B.messages)B.messages={};for(C in A.messages){if(!B.messages[C])B.messages[C]={};for(var D in A.messages[C])if(B.messages[C][D])B.messages[C][D]=t(B.messages[C][D],A.messages[C][D]);else B.messages[C][D]=A.messages[C][D]}}B.client=z.client||A.client;return B}function q(z,A){var B=Object.assign(c("createObjectFrom")(z.folders,true),c("createObjectFrom")(A.folders,true)),C=z.client||A.client;return{folders:Object.keys(B),client:C}}function r(z,A){for(var B in A)if(z[B]&&typeof z[B]==="object")z[B]=t(z[B],A[B]);else if(A[B]&&typeof A[B]==="object"){var C={};Object.assign(C,A[B]);z[B]=C}return z}function s(z,A){return A}function t(z,A){var B=z.offset<A.offset?z.offset:A.offset,C=z.offset+z.limit,D=A.offset+A.limit,E=C>D?C:D,F=E-B,G=z.timestamp>A.timestamp?z.timestamp:A.timestamp;return{offset:B,limit:F,timestamp:G}}function u(z,A){var B=z.client||A.client,C={ids:{},client:B};Object.assign(C.ids,z.ids,A.ids);return C}function v(z,A){__p&&__p();var B={},C=void 0,D=z.client||A.client;delete z.client;delete A.client;for(C in z)Object.assign(B,c("createObjectFrom")(z[C],C));for(C in A)Object.assign(B,c("createObjectFrom")(A[C],C));var E={client:D};for(var F in B){C=B[F];if(!E[C])E[C]=[];E[C].push(F)}return E}function w(z,A){var B=z.client||A.client,C=c("createObjectFrom")(z.ids,true),D=c("createObjectFrom")(A.ids,true),E=Object.assign(C,D);return{ids:Object.keys(E),client:B}}function x(z){__p&&__p();this.$MercuryServerRequests1=z;this.$MercuryServerRequests2=0;this.$MercuryServerRequests3={};this.$MercuryServerRequests4={};this.$MercuryServerRequests9=new(c("Set"))();this.__threadIDMap=c("MercuryThreadIDMap").getForFBID(this.$MercuryServerRequests1);this.$MercuryServerRequests5=c("MercuryDispatcher").getForFBID(this.$MercuryServerRequests1);this.$MercuryServerRequests6=c("MercuryServerPayloadPreprocessor").getForFBID(this.$MercuryServerRequests1);this.$MercuryServerRequests7=new(c("MercuryServerSendMessageQueueOptions"))(function(A,B){this.__handleUpdate(A,B)}.bind(this),function(A){return this.$MercuryServerRequests10(A)}.bind(this),function(A){this.$MercuryServerRequests11(A)}.bind(this),function(A){return this.$MercuryServerRequests12(A)}.bind(this),c("MercuryServerRequestsConfig").sendMessageTimeout,c("MessagingConfig").SEND_CONNECTION_RETRIES);this.$MercuryServerRequests8=c("MercurySyncDeltaHolder").getForFBID(this.$MercuryServerRequests1);this.$MercuryServerRequests13()}x.getForFBID=function(z){return y.getForFBID(z)};x.get=function(){return y.get()};x.prototype.fetchThreadlistInfo=function(z,A){__p&&__p();var B=arguments.length<=2||arguments[2]===undefined?c("MessagingTag").INBOX:arguments[2],C=arguments[3],D=arguments.length<=4||arguments[4]===undefined?k:arguments[4],E=arguments[5];if(n){n=false;c("EventProfiler").tagCurrentActiveInteractionsAs("FirstMercuryThreadFetch")}var F=C?c("MercuryServerDispatcher").IMMEDIATE:null;if(c("MercuryConfig").MessengerInboxRequests&&!F&&c("gkx")("AT6k4q_FpxHOg5pke0cIeoOSz9TDOKLGTv6uQmXW3Apzeacou2FfBIyiYS2xi1X396k4nIwSLJ6rBI1n0hbeA_ij"))F=c("MercuryServerDispatcher").BATCH_DEFERRED_MULTI;var G={client:D};G[B]={offset:z,limit:A,filter:C,before:E};this.__sendRequest(c("MercuryServerURIs").THREADLIST_INFO,G,F)};x.prototype.fetchUnseenThreadIDs=function(){var z=arguments.length<=0||arguments[0]===undefined?c("MessagingTag").INBOX:arguments[0],A=arguments.length<=1||arguments[1]===undefined?k:arguments[1];this.__sendRequest(c("XMercuryUnseenThreadIDsController").getURIBuilder().getURI().toString(),{})};x.prototype.fetchUnreadThreadIDs=function(z){var A=arguments.length<=1||arguments[1]===undefined?k:arguments[1];this.__sendRequest(c("MercuryServerURIs").UNREAD_THREADS,{folders:[z],client:A})};x.prototype.fetchThreadData=function(z){__p&&__p();var A=arguments.length<=1||arguments[1]===undefined?k:arguments[1];c("MercuryAssert").allThreadID(z);var B={threads:{},client:A},C=[],D=[];z.forEach(function(F){__p&&__p();if(this.$MercuryServerRequests3[F])return;this.$MercuryServerRequests3[F]=true;var G=this.__threadIDMap.getServerIDFromClientIDNow(F),H=c("MercuryIDs").tokenize(F);if(H.type=="user"){C.push(H.value);B.threads.user_ids=C}else if(H.type=="thread"){if(G)D.push(G);else D.push(H.value);B.threads.thread_fbids=D}else if(H.type=="root"){if(G){D.push(G);B.threads.thread_fbids=D}}else if(H.type!="pending")throw new Error("Unknown thread type",H)}.bind(this));this.$MercuryServerRequests5.inform("fetch-thread-data",B);if(B.threads.user_ids)B.threads.user_ids.forEach(function(F){if(!F){j.error("empty user id",JSON.stringify(C));c("ChatReliabilityInstrumentation").logERROR("Invalid user ID sent to thread_info.php: "+JSON.stringify(C))}});if(B.threads.thread_fbids)B.threads.thread_fbids.forEach(function(F){if(!F)c("ChatReliabilityInstrumentation").logERROR("Invalid FBID sent to thread_info.php: "+JSON.stringify(z))});for(var E in B.threads){this.__sendRequest(c("MercuryServerURIs").THREAD_INFO,B);break}};x.prototype.ensureThreadIsFetched=function(z){__p&&__p();var A=arguments.length<=1||arguments[1]===undefined?k:arguments[1];if(!this.__threadIDMap.getClientIDFromServerIDNow(z)&&!this.$MercuryServerRequests3[z]){if(!z){c("ChatReliabilityInstrumentation").logERROR("Ensure invalid FBID sent to thread_info.php");j.error("attempting to fetch empty thread_fbid. Bad idea!");return}this.$MercuryServerRequests3[z]=true;this.__sendRequest(c("MercuryServerURIs").THREAD_INFO,{threads:{thread_fbids:[z]},client:A})}};x.prototype.fetchThreadMessages=function(z,A,B,C,D){__p&&__p();var E=arguments.length<=5||arguments[5]===undefined?k:arguments[5];c("MercuryAssert").isThreadID(z);var F=void 0,G=void 0,H=c("MercuryIDs").tokenize(z),I=this.__threadIDMap.getServerIDFromClientIDNow(z),J=false;if(I){F=I;G=H.type=="user"?"user_ids":"thread_fbids"}else{F=H.value;switch(H.type){case"user":G="user_ids";J=true;break;case"thread":G="thread_fbids";break}}var K={messages:{},threads:{},client:E};if(G){K.messages[G]={};K.messages[G][F]={offset:A,timestamp:C,limit:B};if(J)K.threads[G]=[F];this.__sendRequest(c("MercuryServerURIs").THREAD_INFO,K,D)}else this.__threadIDMap.getServerIDFromClientID(z,function(L){K.messages.thread_fbids={};K.messages.thread_fbids[L]={offset:A,timestamp:C,limit:B};this.__sendRequest(c("MercuryServerURIs").THREAD_INFO,K,D)}.bind(this))};x.prototype.handleThreadInfoError=function(z,A){__p&&__p();var B,C=this,D=z.getData(),E=[];if(D.messages){for(var F in D.messages.thread_fbids){var G=this.__threadIDMap.getClientIDFromServerIDNow(F);if(G)E.push(this.$MercuryServerRequests14(G))}for(var H in D.messages.user_ids)E.push(this.$MercuryServerRequests14("user:"+H));for(var I in D.messages.group_ids)E.push(this.$MercuryServerRequests14("group:"+I))}if(E.length)this.$MercuryServerRequests5.handleUpdate({actions:E,from_client:true,payload_source:c("MercuryPayloadSource").CLIENT_CHANNEL_MESSAGE});if(D.threads&&(D.threads.user_ids||D.threads.thread_fbids||D.threads.group_ids||D.threads.thread_ids)){var J=5,K=true;if(!D.retry_count){D.retry_count=0;if(D.messages)delete D.messages}else if(D.retry_count>=J&&(!A||!c("gkx")("AT64J9YhwkyrHxbLybCQFLyzjkGHk3oI2YIajEOuOFur_lZPJRPR_CognCbUbaH7Kn5DndmAaaKKt6FL7dls2Aba"))){K=false;(D.threads.thread_ids||[]).concat(D.threads.thread_fbids||[]).forEach(function(M){if(M in this.$MercuryServerRequests3)delete this.$MercuryServerRequests3[M]},this)}[].concat(D.threads.thread_ids||[],D.threads.thread_fbids||[],D.threads.user_ids||[],D.threads.group_ids||[]).forEach(function(M){if(M)this.$MercuryServerRequests9.add(M);else c("ChatReliabilityInstrumentation").logERROR("lost a thread id somehow")}.bind(this));if(K){var L=Math.pow(2,Math.min(D.retry_count,J))*1e3;c("setTimeoutAcrossTransitions")(function(){j.log("retry_thread","{}");this.__sendRequest(c("MercuryServerURIs").THREAD_INFO,D)}.bind(this),L);D.retry_count++}if(this.$MercuryServerRequests9.size)(function(){var M=[];C.$MercuryServerRequests9.forEach(function(N){return M.push(N)});j.debug("failed threads",JSON.stringify(M));c("Arbiter").inform(c("MercurySyncConstants").ARBITER_EVENT_SERVER_REQUESTS_FAIL,M)})()}};x.prototype.markFolderAsRead=function(z){this.__sendRequest(c("MercuryServerURIs").MARK_FOLDER_READ,{folder:z});var A=[{action_type:c("MercuryGlobalActionType").MARK_ALL_READ,folder:z}];this.$MercuryServerRequests5.handleUpdate({global_actions:A,from_client:true,payload_source:c("MercuryPayloadSource").CLIENT_CHANGE_READ_STATUS})};x.prototype.changeThreadReadStatus=function(z,A,B,C,D,E){c("MercuryAssert").isThreadID(z);this.__threadIDMap.getServerIDFromClientID(z,function(F){var G,H={ids:(G={},G[F]=A,G),source:B,watermarkTimestamp:C,shouldSendReadReceipt:D,commerce_last_message_type:E};j.log("initiate_change_read_status",JSON.stringify({thread_id:z,thread_fbid:F,mark_as_read:A,watermarkTimestamp:C}));this.__sendRequest(c("MercuryServerURIs").CHANGE_READ_STATUS,H)}.bind(this))};x.prototype.changeThreadArchivedStatus=function(z,A,B){c("MercuryAssert").isThreadID(z);this.__threadIDMap.getServerIDFromClientID(z,function(C){var D={ids:{},source:B};D.ids[C]=A;this.__sendRequest(c("MercuryServerURIs").CHANGE_ARCHIVED_STATUS,D)}.bind(this))};x.prototype.changeThreadPageFollowUpStatus=function(z,A,B){c("MercuryAssert").isThreadID(z);this.__threadIDMap.getServerIDFromClientID(z,function(C){var D={ids:{},source:B};D.ids[C]=A;this.__sendRequest(c("MercuryServerURIs").CHANGE_PAGE_FOLLOW_UP_STATUS,D)}.bind(this))};x.prototype.changeThreadFolder=function(z,A){c("MercuryAssert").isThreadID(z);this.__threadIDMap.getServerIDFromClientID(z,function(B){var C={};C[A]=[B];this.__sendRequest(c("MercuryServerURIs").MOVE_THREAD,C)}.bind(this))};x.prototype.changeMutingOnThread=function(z,A){c("MercuryAssert").isThreadID(z);this.__threadIDMap.getServerIDFromClientID(z,function(B){this.__sendRequest(c("MercuryServerURIs").CHANGE_MUTE_THREAD,{thread_fbid:B,mute_settings:A,payload_source:k})}.bind(this))};x.prototype.changeMentionsMutingOnThread=function(z,A){c("MercuryAssert").isThreadID(z);this.__threadIDMap.getServerIDFromClientID(z,function(B){this.__sendRequest(c("XMessagingChangeMentionsMuteModeController").getURIBuilder().getURI(),{thread_fbid:B,mentions_mute_mode:A,payload_source:k})}.bind(this))};x.prototype.changeReactionsMutingOnThread=function(z,A){c("MercuryAssert").isThreadID(z);this.__threadIDMap.getServerIDFromClientID(z,function(B){this.__sendRequest(c("XMessagingChangeReactionsMuteModeController").getURIBuilder().getURI(),{thread_fbid:B,reactions_mute_mode:A,payload_source:k})}.bind(this))};x.prototype.markThreadSpam=function(z,A){c("MercuryAssert").isThreadID(z);this.__threadIDMap.getServerIDFromClientID(z,function(B){this.__sendRequest(c("MercuryServerURIs").MARK_SPAM,{id:B,source:A})}.bind(this))};x.prototype.unmarkThreadSpam=function(z,A){c("MercuryAssert").isThreadID(z);this.__threadIDMap.getServerIDFromClientID(z,function(B){this.__sendRequest(c("MercuryServerURIs").UNMARK_SPAM,{id:B,source:A})}.bind(this))};x.prototype.deleteThread=function(z,A){c("MercuryAssert").isThreadID(z);this.__threadIDMap.getServerIDFromClientID(z,function(B){var C={ids:[B],source:A};this.__sendRequest(c("MercuryServerURIs").DELETE_THREAD,C)}.bind(this))};x.prototype.deleteMessages=function(z,A){c("MercuryMessageIDs.bs").getServerIDs(A||[],function(B){this.__sendRequest(c("MercuryServerURIs").DELETE_MESSAGES,{message_ids:B})}.bind(this))};x.prototype.sendDeliveryReceipts=function(z,A){c("MercuryMessageIDs.bs").getServerIDs(z||[],function(B){this.__sendRequest(c("MercuryServerURIs").DELIVERY_RECEIPTS,{message_ids:B,thread_ids:A})}.bind(this))};x.prototype.sendNewMessage=function(z){__p&&__p();var A=arguments.length<=1||arguments[1]===undefined?k:arguments[1];if(!z.offline_threading_id)c("BanzaiODS").bumpEntityKey("chat.web","missing_otid_on_send");if(z.client_state&&z.client_state!==c("MercuryMessageClientState").SEND_TO_SERVER)return;var B=c("MercuryIDs").tokenize(z.thread_id),C=B.type,D=babelHelpers["extends"]({},z);D.thread_id=null;if(C=="user"){D.other_user_fbid=B.value;this.$MercuryServerRequests15(D,A)}else if(C=="thread"){D.thread_fbid=B.value;this.$MercuryServerRequests15(D,A)}else if(C=="root"&&B.value==D.offline_threading_id){D.client_thread_id=z.thread_id;this.$MercuryServerRequests15(D,A)}else{c("MercuryIDs").isLocalThread(z.thread_id)||i(0);this.__threadIDMap.getServerIDFromClientID(z.thread_id,function(E){D.thread_fbid=E;this.$MercuryServerRequests15(D,A)}.bind(this))}c("ChatReliabilityInstrumentation").logMESSAGE_SEND_START(c("FBJSON").stringify({otid:D.offline_threading_id,message_id:D.message_id,other_user_fbid:D.other_user_fbid,viewer_page_fbid:!D.creator_info?null:D.creator_info.pageID}))};x.prototype.$MercuryServerRequests15=function(z,A){c("Arbiter").inform(c("ChannelConstants").ATTEMPT_RECONNECT);this.$MercuryServerRequests4[z.message_id]=Date.now();c("MercuryServerSendMessageQueueRouter").getForFBID(this.$MercuryServerRequests1).enqueue(z.other_user_fbid||z.thread_fbid||z.client_thread_id,this.$MercuryServerRequests7,A,z)};x.prototype.markSeen=function(){var z=this.$MercuryServerRequests2;this.__sendRequest(c("MercuryServerURIs").MARK_SEEN,{seen_timestamp:z})};x.prototype.$MercuryServerRequests16=function(z,A,B,C){__p&&__p();var D=z.getData(),E=D.message_batch||[D];j.debug("handle_send_message_error_common",JSON.stringify({reliability_error_status:B,request_error_status:A,error_data:C,message_list:E}));var F=E.map(function(H){var I={action_type:c("MercuryActionType").SEND_MESSAGE,other_user_fbid:H.other_user_fbid,thread_fbid:H.thread_fbid,client_message_id:H.message_id,message_id:H.message_id,client_thread_id:H.client_thread_id,status:A,error_data:C};return I});F.forEach(function(H){if(H.action_type===c("MercuryActionType").SEND_MESSAGE&&H.status===c("MercuryActionStatus").ERROR)this.__logMercurySendError(H)},this);var G={actions:F,payload_source:c("MercuryPayloadSource").CLIENT_HANDLE_ERROR};this.$MercuryServerRequests6.handleUpdate(G)};x.prototype.handleSendMessageError=function(z){__p&&__p();var A=z.getPayload(),B=null,C=null;if(A&&A.error_payload){B=c("MercuryActionStatus").UNCONFIRMED;C="send_error"}else{B=c("MercuryActionStatus").ERROR;C="request_error"+o(z)}var D=z.error;if(D===1404102)c("AsyncResponse").verboseErrorHandler(z);var E=/<.*>/.test(z.getErrorDescription())?z.getErrorSummary():z.getErrorDescription();this.$MercuryServerRequests16(z.getRequest(),B,C,{type:c("MercuryErrorType").SERVER,code:z.getError(),description:E,is_transient:z.isTransient()})};x.prototype.handleSendMessageTransportError=function(z){this.$MercuryServerRequests16(z.getRequest(),c("MercuryActionStatus").ERROR,"transport_error"+o(z),{type:c("MercuryErrorType").TRANSPORT,code:z.getError(),is_transient:true})};x.prototype.handleSendMessageTimeout=function(z){this.$MercuryServerRequests16(z,c("MercuryActionStatus").ERROR,"transport_timeout",{type:c("MercuryErrorType").TIMEOUT,is_transient:true})};x.prototype.getLastActionTimestamp=function(){return this.$MercuryServerRequests2};x.prototype.__logMercurySendError=function(z){c("MercurySendErrorLogger").log(z)};x.prototype.updateLastActionTimestamp=function(z){var A=Date.now()-1e3*60*60*24;if(z&&z>A)this.$MercuryServerRequests2=Math.max(this.$MercuryServerRequests2,z)};x.prototype.markThreadFetched=function(z){delete this.$MercuryServerRequests3[z];if(this.$MercuryServerRequests9["delete"](z)&&!this.$MercuryServerRequests9.size){j.debug("no_failed_threads","{}");c("Arbiter").inform(c("MercurySyncConstants").ARBITER_EVENT_SERVER_REQUESTS_RECOVER)}};x.prototype.$MercuryServerRequests14=function(z){return{action_type:c("MercuryActionType").LOG_MESSAGE,thread_id:z,message_id:z,timestamp:Date.now(),is_unread:false,source:c("MercurySourceType").UNKNOWN,log_message_body:"",log_message_type:c("MercuryLogMessageType").SERVER_ERROR,log_message_data:{}}};x.prototype.__getForAsyncRequest=function(z){var A=z.getData(),B=A.request_user_id?A.request_user_id:c("CurrentUser").getID();return x.getForFBID(B)};x.prototype.__handleUpdate=function(z,A){this.__getForAsyncRequest(A).$MercuryServerRequests6.handleUpdate(z)};x.prototype.$MercuryServerRequests17=function(z){var A=this.__getForAsyncRequest(z);A.handleThreadInfoError(z)};x.prototype.$MercuryServerRequests18=function(z){var A=this.__getForAsyncRequest(z);A.handleThreadInfoError(z,true)};x.prototype.$MercuryServerRequests10=function(z){var A=this.__getForAsyncRequest(z.getRequest());A.handleSendMessageError(z)};x.prototype.$MercuryServerRequests11=function(z){var A=this.__getForAsyncRequest(z.getRequest());A.handleSendMessageTransportError(z)};x.prototype.$MercuryServerRequests12=function(z){var A=this.__getForAsyncRequest(z);A.handleSendMessageTimeout(z)};x.prototype.$MercuryServerRequests13=function(){__p&&__p();var z,A=null;if(c("MercuryServerRequestsConfig").msgrRegion)A={name:"X-MSGR-Region",value:c("MercuryServerRequestsConfig").msgrRegion};var B=(z={},z[c("MercuryServerURIs").THREAD_INFO]={request_user_id:this.$MercuryServerRequests1,mode:c("MercuryServerDispatcher").BATCH_DEFERRED_MULTI,customHeader:A,batch_function:p,handler:function(F,G){return this.__handleUpdate(F,G)}.bind(this),error_handler:function(F){return this.$MercuryServerRequests17(F.getRequest())}.bind(this),timeout_handler:function(F){return this.$MercuryServerRequests18(F)}.bind(this),timeout:m},z[c("MercuryServerURIs").MARK_FOLDER_READ]={request_user_id:this.$MercuryServerRequests1,mode:c("MercuryServerDispatcher").IMMEDIATE,customHeader:A,handler:function(F,G){return this.__handleUpdate(F,G)}.bind(this)},z[c("MercuryServerURIs").CHANGE_READ_STATUS]={request_user_id:this.$MercuryServerRequests1,mode:c("MercuryServerDispatcher").IMMEDIATE,customHeader:A,handler:function(F,G){this.__handleUpdate(F,G);var H=(F.threads||[]).map(function(I){return I&&I.thread_id});j.log("response_change_read_status",JSON.stringify({threads:H}))}.bind(this)},z[c("MercuryServerURIs").MARK_SEEN]={request_user_id:this.$MercuryServerRequests1,mode:c("MercuryServerDispatcher").BATCH_SUCCESSIVE,customHeader:A,batch_function:s,handler:function(F,G){return this.__handleUpdate(F,G)}.bind(this)},z[c("MercuryServerURIs").THREADLIST_INFO]={request_user_id:this.$MercuryServerRequests1,mode:c("MercuryServerDispatcher").BATCH_SUCCESSIVE_UNIQUE,customHeader:A,batch_function:r,handler:function(F,G){return this.__handleUpdate(F,G)}.bind(this)},z[c("MercuryServerURIs").MARK_SPAM]={request_user_id:this.$MercuryServerRequests1,mode:c("MercuryServerDispatcher").IMMEDIATE,customHeader:A,handler:function(F,G){return this.__handleUpdate(F,G)}.bind(this)},z[c("MercuryServerURIs").UNMARK_SPAM]={request_user_id:this.$MercuryServerRequests1,mode:c("MercuryServerDispatcher").IMMEDIATE,customHeader:A,handler:function(F,G){return this.__handleUpdate(F,G)}.bind(this)},z[c("MercuryServerURIs").UNREAD_THREADS]={request_user_id:this.$MercuryServerRequests1,mode:c("MercuryServerDispatcher").BATCH_SUCCESSIVE_UNIQUE,customHeader:A,batch_function:q,handler:function(F,G){return this.__handleUpdate(F,G)}.bind(this)},z[c("MercuryServerURIs").CHANGE_ARCHIVED_STATUS]={request_user_id:this.$MercuryServerRequests1,mode:c("MercuryServerDispatcher").BATCH_SUCCESSIVE,customHeader:A,batch_function:u,handler:function(F,G){return this.__handleUpdate(F,G)}.bind(this)},z[c("MercuryServerURIs").CHANGE_PAGE_FOLLOW_UP_STATUS]={request_user_id:this.$MercuryServerRequests1,mode:c("MercuryServerDispatcher").BATCH_SUCCESSIVE,customHeader:A,batch_function:u,handler:function(F,G){return this.__handleUpdate(F,G)}.bind(this)},z[c("MercuryServerURIs").DELETE_THREAD]={request_user_id:this.$MercuryServerRequests1,mode:c("MercuryServerDispatcher").BATCH_SUCCESSIVE,customHeader:A,batch_function:w,handler:function(F,G){return this.__handleUpdate(F,G)}.bind(this)},z[c("MercuryServerURIs").DELETE_MESSAGES]={request_user_id:this.$MercuryServerRequests1,mode:c("MercuryServerDispatcher").IMMEDIATE,customHeader:A,handler:function(F,G){return this.__handleUpdate(F,G)}.bind(this)},z[c("MercuryServerURIs").DELIVERY_RECEIPTS]={request_user_id:this.$MercuryServerRequests1,mode:c("MercuryServerDispatcher").IMMEDIATE,customHeader:A,handler:function(F,G){return this.__handleUpdate(F,G)}.bind(this)},z[c("MercuryServerURIs").MOVE_THREAD]={request_user_id:this.$MercuryServerRequests1,mode:c("MercuryServerDispatcher").BATCH_SUCCESSIVE,customHeader:A,batch_function:v,handler:function(F,G){return this.__handleUpdate(F,G)}.bind(this)},z[c("MercuryServerURIs").CHANGE_MUTE_THREAD]={request_user_id:this.$MercuryServerRequests1,mode:c("MercuryServerDispatcher").IMMEDIATE,customHeader:A,handler:function(F,G){return this.__handleUpdate(F,G)}.bind(this)},z),C=c("XMercuryUnseenThreadIDsController").getURIBuilder().getURI().toString();B[C]={request_user_id:this.$MercuryServerRequests1,mode:c("MercuryServerDispatcher").IMMEDIATE,customHeader:A,handler:function(F,G){return this.__handleUpdate(F,G)}.bind(this)};var D=c("XMessagingChangeMentionsMuteModeController").getURIBuilder().getURI().toString();B[D]={request_user_id:this.$MercuryServerRequests1,mode:c("MercuryServerDispatcher").IMMEDIATE,customHeader:A,handler:function(F,G){return this.__handleUpdate(F,G)}.bind(this)};var E=c("XMessagingChangeReactionsMuteModeController").getURIBuilder().getURI().toString();B[E]={request_user_id:this.$MercuryServerRequests1,mode:c("MercuryServerDispatcher").IMMEDIATE,customHeader:A,handler:function(F,G){return this.__handleUpdate(F,G)}.bind(this)};c("MercuryServerDispatcher").registerEndpoints(B)};x.prototype.__sendRequest=function(z,A,B){if(c("gkx")("AT5ciOxCuhvQiPHB-OF0aBC8VDwgTuUgU0qCNeLTy9HW8OGAaj6YECdnrVkZOqNRHzX5-Wxrb9FeQ1ToJxYOvCPs"))switch(z){case c("MercuryServerURIs").THREADLIST_INFO:case c("MercuryServerURIs").THREAD_INFO:A.cachius_min_seq_id=this.$MercuryServerRequests8.getLastSeqID();break;default:break}c("MercuryServerDispatcher").trySend(z,A,B,this.$MercuryServerRequests1)};x.prototype.__getFBID=function(){return this.$MercuryServerRequests1};var y=new(c("MercurySingletonProvider"))(x);f.exports=x}),null);
__d("MercuryThreadIDMap",["KeyedCallbackManager","MercuryAssert","MercuryIDs","MercurySingletonProvider"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();function h(j){this.$MercuryThreadIDMap1=j;this.$MercuryThreadIDMap2=new(c("KeyedCallbackManager"))();this.$MercuryThreadIDMap3=new(c("KeyedCallbackManager"))()}h.getForFBID=function(j){return i.getForFBID(j)};h.get=function(){return i.get()};h.prototype.setServerIDToClientID=function(j,k){var l=this.getClientIDFromServerIDNow(j);if(l){l!==k;return}this.forceSetServerIDToClientID(j,k)};h.prototype.forceSetServerIDToClientID=function(j,k){this.$MercuryThreadIDMap2.setResource(j,k);this.$MercuryThreadIDMap3.setResource(k,j)};h.prototype.setDeprecatedServerIDToClientID=function(j,k){if(j)this.$MercuryThreadIDMap2.setResource(j,k)};h.prototype.getClientIDFromServerIDNow=function(j){return this.$MercuryThreadIDMap2.getResource(j)};h.prototype.getClientIDFromServerID=function(j,k){this.$MercuryThreadIDMap2.executeOrEnqueue(j,k);e(["MercuryServerRequests"],function(l){l.getForFBID(this.$MercuryThreadIDMap1).ensureThreadIsFetched(j)}.bind(this))};h.prototype.getServerIDFromClientIDNow=function(j){return this.$MercuryThreadIDMap3.getResource(j)};h.prototype.getServerIDFromClientID=function(j,k){c("MercuryAssert").isThreadID(j);var l=this.$MercuryThreadIDMap3.executeOrEnqueue(j,k);e(["MercuryServerRequests"],function(m){var n=this.$MercuryThreadIDMap3.getUnavailableResources(l),o=c("MercuryIDs").tokenize(j);if(n.length&&o.type!="root")m.getForFBID(this.$MercuryThreadIDMap1).fetchThreadData(n)}.bind(this))};h.prototype.hasClientIDForServerID=function(j){return!!this.getClientIDFromServerIDNow(j)};h.prototype.convertThreadIDIfAvailable=function(j){var k=this.getClientIDFromServerIDNow(j);return k||j};h.prototype.canLinkExternally=function(j){c("MercuryAssert").isThreadID(j);var k=c("MercuryIDs").tokenize(j);return k.type=="user"||!!this.getServerIDFromClientIDNow(j)};var i=new(c("MercurySingletonProvider"))(h);f.exports=h}),null);
__d("MercuryParticipantFetcher",["LogHistory","MercuryIDs","MercuryPayloadSource","MercuryServerPayloadPreprocessor","Set","ShortProfiles","setImmediate","setTimeoutAcrossTransitions"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h=c("LogHistory").getInstance("short_profiles");function i(k){this.$MercuryParticipantFetcher4=c("MercuryServerPayloadPreprocessor").getForFBID(k);this.$MercuryParticipantFetcher1=false;this.$MercuryParticipantFetcher2=new(c("Set"))();this.$MercuryParticipantFetcher3=new(c("Set"))();this.$MercuryParticipantFetcher5=setInterval(this.$MercuryParticipantFetcher7.bind(this),20*1e3)}i.prototype.fetch=function(k){this.$MercuryParticipantFetcher8(k);this.$MercuryParticipantFetcher7()};i.prototype.fetchMulti=function(k){if(k.length){k.forEach(function(l){return this.$MercuryParticipantFetcher8(l)}.bind(this));this.$MercuryParticipantFetcher7()}};i.prototype.$MercuryParticipantFetcher8=function(k){if(!this.$MercuryParticipantFetcher3.has(k))this.$MercuryParticipantFetcher2.add(k)};i.prototype.$MercuryParticipantFetcher7=function(){__p&&__p();if(this.$MercuryParticipantFetcher1||this.$MercuryParticipantFetcher2.size===0)return;this.$MercuryParticipantFetcher1=true;c("setImmediate")(function(){__p&&__p();this.$MercuryParticipantFetcher1=false;this.$MercuryParticipantFetcher2.forEach(function(k){return this.$MercuryParticipantFetcher3.add(k)}.bind(this));this.$MercuryParticipantFetcher9(this.$MercuryParticipantFetcher2,function(k){k.forEach(function(l){return this.$MercuryParticipantFetcher3["delete"](l.id)}.bind(this));this.$MercuryParticipantFetcher10(k);if(this.$MercuryParticipantFetcher6)clearTimeout(this.$MercuryParticipantFetcher6)}.bind(this));this.$MercuryParticipantFetcher11();this.$MercuryParticipantFetcher2.clear()}.bind(this))};i.prototype.$MercuryParticipantFetcher11=function(){this.$MercuryParticipantFetcher6=c("setTimeoutAcrossTransitions")(function(){this.$MercuryParticipantFetcher3.forEach(function(k){return this.$MercuryParticipantFetcher2.add(k)}.bind(this));this.$MercuryParticipantFetcher3.clear()}.bind(this),11*1e3)};i.prototype.$MercuryParticipantFetcher9=function(k,l){__p&&__p();var m=[];k.forEach(function(n){var o=c("MercuryIDs").tokenize(n),p=o.type,q=o.value;p==="fbid"&&m.push(q)});if(m.length>0){c("ShortProfiles").getMulti(m,function(n){var o=[];for(var p in n)o.push(j(n[p],p));l(o);if(o.length!==m.length)h.error("server_fetch_participant_count_error",JSON.stringify({expectedIDs:m,receivedIDs:Object.keys(n)}))});h.debug("client_fetch_participants",JSON.stringify({userIDs:m}))}};i.prototype.$MercuryParticipantFetcher10=function(k){this.$MercuryParticipantFetcher4.handleUpdate({participants:k,from_client:false,payload_source:c("MercuryPayloadSource").SERVER_FETCH_PARTICIPANTS})};function j(k,l){__p&&__p();var m=babelHelpers["extends"]({gender:k.gender,fbid:k.id||l,href:k.uri,id:c("MercuryIDs").getParticipantIDFromUserID(k.id||l),image_src:k.thumbSrc,name:k.name,short_name:k.firstName,employee:k.employee,is_employee_away:k.is_employee_away,type:k.type,vanity:k.vanity,is_friend:k.is_friend,is_messenger_user:k.is_messenger_user,is_coworker:k.is_coworker},{});if(k.officeStatus){m.officeStatus=k.officeStatus;m.officeStatusEndDate=k.officeStatusEndDate;m.officeStatusComment=k.officeStatusComment;m.officeStatusLocation=k.officeStatusLocation}if(k.timezone||k.timezone===0)m.timezone=k.timezone;if(k.personal_id)m.personal_id=k.personal_id;if(k.work_id)m.work_id=k.work_id;return m}f.exports=i}),null);
__d("MercuryVanityIDMap.bs",["bs_string","bs_js_primitive","MercuryAssert","bs_js_null_undefined"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h={},i={};function j(o){return c("bs_js_null_undefined").from_opt(c("bs_js_primitive").undefined_to_opt(h[c("bs_string").lowercase(o)]))}function k(o){return c("bs_js_null_undefined").from_opt(c("bs_js_primitive").undefined_to_opt(i[o]))}function l(o){var p=i[o];if(p!==undefined)return true;else return false}function m(o){var p=h[c("bs_string").lowercase(o)];if(p!==undefined)return true;else return false}function n(o,p){c("MercuryAssert").isParticipantID(p);var q=c("bs_string").lowercase(o);h[q]=p;i[p]=q;return 0}g.vanityToID=h;g.idToVanity=i;g.getID=j;g.getVanity=k;g.hasID=l;g.hasVanity=m;g.set=n}),null);
__d("MercuryParticipants",["fbt","CurrentUser","EventEmitter","ImageSourceRequest","ImageSourceType","ImmutableObject","KeyedCallbackManager","MercuryAssert","MercuryIDs","MercuryParticipantFetcher","MercuryParticipantTypes","MercuryParticipantsConstants","MercuryDispatcher","MercuryVanityIDMap.bs","PhotoResizeModeConst","Set","createObjectFrom"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i="change";function j(l){__p&&__p();this.$MercuryParticipants1=l;this.$MercuryParticipants2=new(c("EventEmitter"))();this.$MercuryParticipants3=new(c("KeyedCallbackManager"))();this.$MercuryParticipants4=new(c("MercuryParticipantFetcher"))(this.$MercuryParticipants1);this.$MercuryParticipants5=c("MercuryDispatcher").getForFBID(this.$MercuryParticipants1);this.$MercuryParticipants5.subscribe("update-participants",function(m,n){if(n.participants&&n.participants.length>0)this.$MercuryParticipants6(n.participants)}.bind(this));this.$MercuryParticipants5.subscribe("invalidate-global-state",function(){this.$MercuryParticipants7()}.bind(this))}j.prototype.addListener=function(l,m){return this.$MercuryParticipants2.addListener(l,m)};j.prototype.getIDFromVanityOrFBID=function(l){if(!l)return null;if(c("MercuryVanityIDMap.bs").hasVanity(l))return c("MercuryVanityIDMap.bs").getID(l);if(/^\d+$/.test(l))return c("MercuryIDs").getParticipantIDFromUserID(l);return undefined};j.prototype.getNow=function(l){return this.$MercuryParticipants8(l)};j.prototype.getOrFetch=function(l){var m=this.$MercuryParticipants8(l);if(!m)this.$MercuryParticipants4.fetch(l);return m};j.prototype.get=function(l,m){c("MercuryAssert").isParticipantID(l);return this.$MercuryParticipants9([l],function(n){m(n[l])})};j.prototype.getMulti=function(l,m){return this.$MercuryParticipants9(l,m)};j.prototype.getBigImageMulti=function(l,m){__p&&__p();var n=arguments.length<=2||arguments[2]===undefined?c("MercuryParticipantsConstants").BIG_IMAGE_SIZE:arguments[2];c("MercuryAssert").allParticipantIDs(l);var o=false,p=this.$MercuryParticipants9(l,function(q){__p&&__p();var r={},s=0,t=new(c("Set"))(),u=function(w,y){s++;r[w]=y;if(s===l.length){if(!o)m(r);if(t.size>0)this.$MercuryParticipants10(t)}}.bind(this),v=function(w,y){var z=this.$MercuryParticipants3.getResource(w);if(!z)return;this.$MercuryParticipants3.setResource(w,c("ImmutableObject").set(z,{big_image_src:y.uri}));t.add(w);u(w,y.uri)}.bind(this);for(var w in q){var x=q[w];if(!x.big_image_src)new(c("ImageSourceRequest"))().setFBID(c("MercuryIDs").getUserIDFromParticipantID(w)).setType(c("ImageSourceType").PROFILE_PICTURE).setDimensions(n,n).setResizeMode(c("PhotoResizeModeConst").COVER).setCallback(v.bind(null,w)).send();else u(x.id,x.big_image_src)}}.bind(this));return{remove:function q(){o=true;p.remove()}}};j.prototype.getOrderedBigImageMulti=function(l,m){return this.getBigImageMulti(l,function(n){m(l.map(function(o){return n[o]}))})};j.prototype.$MercuryParticipants9=function(l,m){__p&&__p();c("MercuryAssert").allParticipantIDs(l);var n=this.$MercuryParticipants3.executeOrEnqueue(l,m),o=this.$MercuryParticipants3.getUnavailableResources(n).filter(function(p){__p&&__p();var q=c("MercuryIDs").tokenize(p),r=q.type,s=q.value;if(r==="email"){this.$MercuryParticipants11(p,s);return false}if(r==="name"){this.$MercuryParticipants12(p,s);return false}return true}.bind(this));this.$MercuryParticipants4.fetchMulti(o);return this.$MercuryParticipants13(n)};j.prototype.$MercuryParticipants8=function(l){var m=this.$MercuryParticipants3.getResource(l);if(!m){var n=c("MercuryIDs").tokenize(l),o=n.type,p=n.value;if(o==="email")m=this.$MercuryParticipants11(l,p);if(o==="name")m=this.$MercuryParticipants12(l,p)}return m};j.prototype.$MercuryParticipants11=function(l,m){var n=new(c("ImmutableObject"))(k(l,m));this.$MercuryParticipants3.setResource(l,n);return n};j.prototype.$MercuryParticipants12=function(l,m){var n=new(c("ImmutableObject"))({gender:c("MercuryParticipantsConstants").UNKNOWN_GENDER,href:null,id:l,image_src:c("MercuryParticipantsConstants").EMAIL_IMAGE,big_image_src:c("MercuryParticipantsConstants").EMAIL_IMAGE,name:m,short_name:m,employee:false});this.$MercuryParticipants3.setResource(l,n);return n};j.prototype.$MercuryParticipants10=function(l){this.$MercuryParticipants2.emit(i,l)};j.prototype.$MercuryParticipants6=function(l){var m=l.map(function(n){return n.id});l=l.map(function(n){if(n.vanity)c("MercuryVanityIDMap.bs").set(n.vanity,n.id);var o=this.$MercuryParticipants3.getResource(n.id);return o?c("ImmutableObject").set(o,n):new(c("ImmutableObject"))(this.$MercuryParticipants14(n))}.bind(this));this.$MercuryParticipants3.addResourcesAndExecute(c("createObjectFrom")(m,l));this.$MercuryParticipants10(new(c("Set"))(m))};j.prototype.$MercuryParticipants14=function(l){var m=l.type===c("MercuryParticipantTypes").USER||l.type===c("MercuryParticipantTypes").FRIEND;if(!m)return l;if(!l.name&&!l.href&&!l.vanity){var n=h._("Facebook User");l.name=n;l.short_name=n}return l};j.prototype.$MercuryParticipants13=function(l){return{remove:function(){this.$MercuryParticipants3.unsubscribe(l)}.bind(this)}};j.prototype.$MercuryParticipants7=function(){this.$MercuryParticipants3=new(c("KeyedCallbackManager"))()};function k(l,m){return{gender:c("MercuryParticipantsConstants").UNKNOWN_GENDER,href:null,id:l,image_src:c("MercuryParticipantsConstants").EMAIL_IMAGE,big_image_src:c("MercuryParticipantsConstants").EMAIL_IMAGE,name:m,short_name:m,employee:false,fbid:undefined,accepts_messenger_user_feedback:undefined,is_business_enabled:undefined,is_messenger_platform_bot:undefined,is_employee_away:undefined,is_friend:undefined,is_messenger_user:undefined,is_verified:undefined,type:undefined,vanity:undefined,timezone:undefined,personal_id:undefined,work_id:undefined}}f.exports=new j(c("CurrentUser").getID())}),null);
__d("MercurySyncFakeDFFSender",["Arbiter","ChannelConstants","MercurySingletonProvider","MercurySyncDeltaTypes"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h=c("ChannelConstants").getArbiterType(c("ChannelConstants").FAKE_DFF);i.getForFBID=function(k){return j.getForFBID(k)};i.get=function(){return j.get()};function i(k){this.$MercurySyncFakeDFFSender1=k}i.prototype.sendGlobalDFF=function(){c("Arbiter").inform(h,{obj:{delta:{"class":c("MercurySyncDeltaTypes").ForcedFetch},queue:this.$MercurySyncFakeDFFSender1}})};i.prototype.sendThreadDFF=function(k,l){c("Arbiter").inform(h,{obj:{delta:{"class":c("MercurySyncDeltaTypes").ForcedFetch,threadKey:{otherUserFbId:k,threadFbId:l}},queue:this.$MercurySyncFakeDFFSender1}})};i.prototype.sendMessageDFF=function(k,l,m){c("Arbiter").inform(h,{obj:{delta:{"class":c("MercurySyncDeltaTypes").ForcedFetch,threadKey:{otherUserFbId:k,threadFbId:l},messageId:m},queue:this.$MercurySyncFakeDFFSender1}})};var j=new(c("MercurySingletonProvider"))(i);f.exports=i}),null);
__d("MessengerThreadCannotReplyReason",[],(function a(b,c,d,e,f,g){f.exports=Object.freeze({BLOCKED:"blocked",COMPOSER_DISABLED_BOT:"composer_disabled_bot",HAS_EMAIL_PARTICIPANT:"has_email_participant",OBJECT_ORIGINATED:"object_originated",READ_ONLY:"read_only",VIEWER_NOT_SUBSCRIBED:"viewer_not_subscribed",RECIPIENTS_NOT_LOADABLE:"recipients_not_loadable",RECIPIENTS_UNAVAILABLE:"recipients_unavailable",RECIPIENTS_INVALID:"recipients_invalid",RECIPIENTS_INACTIVE_WORK_ACC:"recipients_inactive_work_account",MONTAGE_NOT_AUTHOR:"montage_not_author"})}),null);
__d("MercuryThreadInfo",["CurrentUser","MercuryIDs","MessengerThreadCannotReplyReason"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h={canReply:function j(k){return!!(k.is_subscribed&&(k.can_reply===undefined||k.can_reply)&&!k.has_email_participant&&!k.read_only)},getMuteSetting:function j(k){return!k.mute_until?undefined:k.mute_until},isEmptyLocalThread:function j(k){return c("MercuryIDs").tokenize(k.thread_id).type==="root"&&!k.timestamp},isMuted:function j(k){return h.getMuteSetting(k)!==undefined},areMentionsMuted:function j(k){return k.mentions_mute_mode===1},areReactionsMuted:function j(k){return k.reactions_mute_mode===1},isNewEmptyLocalThread:function j(k){return!!(h.isEmptyLocalThread(k)&&k.participants&&k.participants.length===0)},showComposer:function j(k){return!!(k.is_subscribed&&(k.can_reply||!k.cannot_reply_reason||k.cannot_reply_reason===c("MessengerThreadCannotReplyReason").BLOCKED)&&!k.has_email_participant&&!k.read_only)},isColdOpen:function j(k){return!!(k.is_canonical_user&&(k.message_count===0||!k.timestamp))}};function i(j){return j+"@facebook.com"}f.exports=h}),null);
__d("MessagingGiftWrapConstants",[],(function a(b,c,d,e,f,g){"use strict";var h="gift_wrap",i="gift_unwrapped",j="valentines2016";f.exports={TAG_PREFIX:h,UNWRAPPED_TAG:i,VALENTINES_GIFT:j}}),null);
__d("MessagingGiftWrapChecker",["MercuryConfig","MercuryTagHelper","MessagingGiftWrapConstants"],(function a(b,c,d,e,f,g){"use strict";var h={shouldRenderWithGiftWrap:function k(l){return!!(l.tags&&i(l.tags)&&!j(l.tags))}};function i(k){return c("MercuryTagHelper").get(k,c("MessagingGiftWrapConstants").TAG_PREFIX)===c("MessagingGiftWrapConstants").VALENTINES_GIFT}function j(k){return!!c("MercuryTagHelper").get(k,c("MessagingGiftWrapConstants").UNWRAPPED_TAG)}f.exports=h}),null);
__d("MercuryThreads",["invariant","ChatReliabilityInstrumentation","EventEmitter","EventReminderConstants","MercuryDisplayTimeFilterMessageRenderer","ImmutableObject","KeyedCallbackManager","LogHistory","Map","MercuryActionType","MercuryAssert","MercuryAttachment","MercuryDispatcher","MercuryGiftSnippetRenderer","MercuryGlobalActionType","MercuryIDs","MercuryLocalIDs","MercuryLoggingHelper","MercuryLogMessageType","MercuryParticipants","MercuryPayloadSource","MercuryServerRequests","MercurySingletonProvider","MercurySyncFakeDFFSender","MercuryThreadInfo","MercuryThreadInformer","MessagingGenericAdminTextType","MessagingGiftWrapChecker","MessagingTag","PageCommItemStatus","Set","emptyFunction","ifRequired","requireWeak","setImmediate"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i=c("EventReminderConstants").GuestStates,j=new(c("EventEmitter"))(),k=c("LogHistory").getInstance("mercury_threads"),l=new(c("Set"))();function m(o){__p&&__p();this.$MercuryThreads1=o;this.$MercuryThreads2=c("MercuryServerRequests").getForFBID(this.$MercuryThreads1);this.$MercuryThreads3=c("MercuryThreadInformer").getForFBID(this.$MercuryThreads1);this.$MercuryThreads4=c("MercuryIDs").getParticipantIDFromUserID(this.$MercuryThreads1);this.$MercuryThreads5=c("MercuryDispatcher").getForFBID(this.$MercuryThreads1);this.$MercuryThreads6=c("MercurySyncFakeDFFSender").getForFBID(this.$MercuryThreads1);this.$MercuryThreads7=false;this.$MercuryThreads8=new(c("KeyedCallbackManager"))();this.$MercuryThreads9=new(c("Set"))();this.$MercuryThreads10=false;this.$MercuryThreads11=new(c("Set"))();this.$MercuryThreads12=new(c("Set"))();this.$MercuryThreads13()}m.getForFBID=function(o){return n.getForFBID(o)};m.get=function(){return n.get()};m.prototype.getThreadMetaNow=function(o){c("MercuryAssert").isThreadID(o);var p=this.$MercuryThreads8.getResource(o);if(p&&!p.participants){c("ChatReliabilityInstrumentation").logERROR("participants are null!",{thread_id:o});this.$MercuryThreads6.sendThreadDFF(null,o);return new(c("ImmutableObject"))(babelHelpers["extends"]({},p,{participants:[]}))}return p};m.prototype.getOrFetch=function(o){var p=this.getThreadMetaNow(o);if(!p&&!this.$MercuryThreads12.has(o))this.$MercuryThreads11.add(o);if(this.$MercuryThreads11.size>0&&!this.$MercuryThreads10)this.$MercuryThreads14();return p};m.prototype.$MercuryThreads14=function(){__p&&__p();if(this.$MercuryThreads10)return;this.$MercuryThreads10=true;c("setImmediate")(function(){this.$MercuryThreads10=false;this.$MercuryThreads11.forEach(function(o){return this.$MercuryThreads12.add(o)}.bind(this));this.getMultiThreadMeta(Array.from(this.$MercuryThreads11),function(o){for(var p in o)Object.prototype.hasOwnProperty.call(o,p)&&this.$MercuryThreads12["delete"](p)}.bind(this));this.$MercuryThreads11.clear()}.bind(this))};m.prototype.getThreadMeta=function(o,p,q){return this.getMultiThreadMeta([o],function(r){return p(r[o])},q)};m.prototype.getMultiThreadMeta=function(o,p,q){__p&&__p();c("MercuryAssert").allThreadID(o);var r=this.$MercuryThreads8.executeOrEnqueue(o,p),s=this.$MercuryThreads8.getUnavailableResources(r);if(s.length){var t=[];for(var u=0;u<s.length;u++){var v=s[u],w=c("MercuryIDs").tokenize(v),x=w.type,y=w.value;if(x=="user"){var z=c("MercuryIDs").getParticipantIDFromUserID(y);this.createNewLocalThread(v,z===this.$MercuryThreads4?[this.$MercuryThreads4]:[this.$MercuryThreads4,z])}t.push(v)}if(t.length)this.$MercuryThreads2.fetchThreadData(t,q)}return r};m.addListener=function(o,p){return j.addListener(o,p)};m.prototype.unsubscribe=function(o){this.$MercuryThreads8.unsubscribe(o)};m.prototype.getCanonicalThreadToParticipant=function(o,p,q,r){var s=c("MercuryIDs").getThreadIDFromParticipantID(o);!!s||h(0);var t=this.$MercuryThreads8.getResource(s);if(t==undefined){t=this.createNewLocalThread(s,this.$MercuryThreads4===o?[this.$MercuryThreads4]:[this.$MercuryThreads4,o],p);!r&&this.$MercuryThreads2.fetchThreadData([s],q)}return t};m.prototype.createNewLocalThread=function(o,p,q){var r=this.$MercuryThreads8.getResource(o);if(!r){var s=c("MercuryIDs").tokenize(o),t=s.type,u=s.value;r=new(c("ImmutableObject"))({thread_id:o,participants:Array.from(p),admin_ids:[],name:"",snippet:"",snippet_sender:null,unread_count:q?q:0,message_count:0,image_src:null,timestamp:null,other_user_fbid:t==="user"?u:null,is_canonical_user:t=="user",is_canonical:this.$MercuryThreads15(p),is_subscribed:true,folder:c("MessagingTag").INBOX,is_archived:false,is_page_follow_up:false});this.$MercuryThreads8.setResource(o,r)}return r};m.prototype.createNewLocalThreadGenerateID=function(){var o=c("MercuryLocalIDs").generateThreadID();this.createNewLocalThread(o,[]);return o};m.prototype.isEmptyLocalThread=function(o){var p=this.$MercuryThreads8.getResource(o);if(!p)return false;return c("MercuryThreadInfo").isEmptyLocalThread(p)};m.prototype.isNewEmptyLocalThread=function(o){var p=this.$MercuryThreads8.getResource(o);if(!p)return false;return c("MercuryThreadInfo").isNewEmptyLocalThread(p)};m.prototype.$MercuryThreads16=function(o,p){__p&&__p();if(!o||!o.length)return;var q=new(c("Map"))(),r=new(c("Map"))(),s=new(c("Map"))(),t=[];for(var u=0;u<o.length;u++){var v=o[u],w=v.action_type;if(w==c("MercuryActionType").LOG_MESSAGE&&v.log_message_type==c("MercuryLogMessageType").SERVER_ERROR)continue;var x=!p&&!!(v.thread_fbid||v.other_user_fbid||v.is_from_iris),y=v.thread_id;c("MercuryAssert").isThreadID(y);var z=this.$MercuryThreads8.getResource(y);if(!z&&!x&&w===c("MercuryActionType").USER_GENERATED_MESSAGE){z=this.$MercuryThreads17(v);if(!z.participants||!z.participants.length){k.debug("missing_local_participants",JSON.stringify(c("MercuryLoggingHelper").obfuscateMessage(v)));c("ChatReliabilityInstrumentation").logERROR("missing_local_participants",{thread_id:y});z=new(c("ImmutableObject"))(babelHelpers["extends"]({},z,{participants:[]}));var A=v.other_user_fbid,B=v.thread_fbid;if(A||B)this.$MercuryThreads6.sendThreadDFF(A,B);else continue}this.$MercuryThreads8.setResource(y,z)}if(!z)continue;if(w==c("MercuryActionType").LOG_MESSAGE||w==c("MercuryActionType").USER_GENERATED_MESSAGE)x=!p;if(z.server_timestamp&&v.timestamp<z.server_timestamp&&x)continue;if(z.server_timestamp&&w===c("MercuryActionType").USER_GENERATED_MESSAGE&&v.offline_threading_id&&v.author!==c("MercuryIDs").getParticipantIDFromUserID(this.$MercuryThreads1))if(l.has(v.offline_threading_id))continue;else l.add(v.offline_threading_id);if(!s.has(y))s.set(y,babelHelpers["extends"]({},z));else k.error("skipping thread metadata update",JSON.stringify({have:s.get(y),skipped:z}));var C=s.get(y);!!C||h(0);this.$MercuryThreads18(C,v,p);var D=q.get(y);if(w==c("MercuryActionType").USER_GENERATED_MESSAGE&&(!D||v.timestamp>D.timestamp))q.set(y,v);if((w==c("MercuryActionType").USER_GENERATED_MESSAGE||w==c("MercuryActionType").LOG_MESSAGE)&&!v.skip_bump_thread)if(v&&v.timestamp&&(!r.has(y)||v.timestamp>r.get(y).timestamp))r.set(y,v)}s.forEach(function(E,F){__p&&__p();var G=r.get(F),D=q.get(F);if(D)this.$MercuryThreads19(E,D);else if(G&&G.log_message_body){var H=babelHelpers["extends"]({},G,{body:G.log_message_body});this.$MercuryThreads19(E,H)}var I=E.timestamp;if(G){if(G.timestamp>I)Object.assign(E,{timestamp:G.timestamp});var J=E.server_timestamp;if(!p&&G.timestamp>J)E.server_timestamp=G.timestamp}var K=new(c("ImmutableObject"))(E);if((!K.participants||!K.participants.length)&&!this.isEmptyLocalThread(K.thread_id)){var L=(o||[]).map(c("MercuryLoggingHelper").obfuscateMessage),M={update:c("MercuryLoggingHelper").obfuscateThread(K),actions:L};k.error("bad metadata update no_participants",JSON.stringify(M));c("ChatReliabilityInstrumentation").logERROR("refusing to set thread metadata with no participants",M);return}this.$MercuryThreads8.setResource(F,K);t.push(c("MercuryLoggingHelper").obfuscateThread(K))}.bind(this),this);t.length&&this.$MercuryThreads7&&k.debug("threads_updated",JSON.stringify({threads:t}))};m.prototype.$MercuryThreads18=function(o,p,q){__p&&__p();var r=p.action_type;if(r==c("MercuryActionType").USER_GENERATED_MESSAGE||r==c("MercuryActionType").LOG_MESSAGE){if(p.is_unread||p.skip_bump_thread)if(!(o.unread_count===0&&p.skip_bump_thread))if(p.timestamp>o.server_timestamp)o.unread_count++;o.message_count++;o.is_archived=false}switch(r){case c("MercuryActionType").DELETE_THREAD:o.message_count=0;this.$MercuryThreads20(p.thread_id);break;case c("MercuryActionType").USER_GENERATED_MESSAGE:if(o.unread_count===0&&p.author===this.$MercuryThreads4&&p.timestamp>=o.last_read_timestamp)o.last_read_timestamp=p.timestamp;if(p.offline_threading_id!==p.message_id)o.last_message_timestamp=p.timestamp;if(p.comm_status!=null)if(o.comm_status&&o.comm_status.toUpperCase()!==c("PageCommItemStatus").FOLLOW_UP)o.comm_status=p.comm_status;if(p.creator_info&&p.creator_info.pageID===this.$MercuryThreads1)o.folder=p.folder;this.$MercuryThreads21(o,p.author);break;case c("MercuryActionType").SEND_MESSAGE:var s=p.log_message_type;if(s==c("MercuryLogMessageType").THREAD_IMAGE){o.image_src=p.log_message_data.image?p.log_message_data.image.preview_url:null;this.$MercuryThreads22(p.thread_id)}if(s!==c("MercuryLogMessageType").SUBSCRIBE&&s!==c("MercuryLogMessageType").UNSUBSCRIBE)o.snippet_attachments=p.attachments;break;case c("MercuryActionType").LOG_MESSAGE:var s=p.log_message_type;if(s==c("MercuryLogMessageType").SUBSCRIBE&&!q){this.$MercuryThreads23(o,p.log_message_data.added_participants);this.$MercuryThreads22(p.thread_id)}else if(s==c("MercuryLogMessageType").UNSUBSCRIBE&&!q){this.$MercuryThreads24(o,p.log_message_data.removed_participants);this.$MercuryThreads22(p.thread_id)}else if(s==c("MercuryLogMessageType").THREAD_IMAGE){if(!q)o.image_src=p.log_message_data.image?p.log_message_data.image.preview_url:null}else if(s==c("MercuryLogMessageType").THREAD_NAME){if(o.name!==p.log_message_data.name)this.$MercuryThreads22(p.thread_id);o.name=p.log_message_data.name}else if(s===c("MercuryLogMessageType").GENERIC_ADMIN_TEXT)this.$MercuryThreads25(o,p);break;case c("MercuryActionType").CHANGE_READ_STATUS:var t=this.$MercuryThreads26(o,p,p.mark_as_read);if(t)o.last_read_timestamp=o.last_message_timestamp;var u=!o.read_only&&o.folder===c("MessagingTag").INBOX;if(t&&q)this.$MercuryThreads2.changeThreadReadStatus(o.thread_id,p.mark_as_read,p.source,o.last_read_timestamp,u,o.last_message_type);break;case c("MercuryActionType").CHANGE_ARCHIVED_STATUS:if(o.is_archived!=p.archived){o.is_archived=p.archived;if(o.comm_status!=null)o.comm_status=p.archived?c("PageCommItemStatus").DONE:c("PageCommItemStatus").TODO;this.$MercuryThreads22(p.thread_id)}break;case c("MercuryActionType").CHANGE_PAGE_FOLLOW_UP_STATUS:if(o.is_page_follow_up!=p.is_page_follow_up){o.is_page_follow_up=p.is_page_follow_up;this.$MercuryThreads22(p.thread_id)}break;case c("MercuryActionType").CHANGE_FOLDER:if(o.folder!=p.new_folder){o.folder=p.new_folder;if(o.comm_status!=null)if(p.new_folder===c("MessagingTag").OTHER)o.comm_status=c("PageCommItemStatus").SPAM;else if(p.new_folder===c("MessagingTag").INBOX)o.comm_status=c("PageCommItemStatus").TODO;this.$MercuryThreads22(p.thread_id)}break;case c("MercuryActionType").DELETE_MESSAGES:if(q){o.snippet="...";o.snippet_attachments=null;o.snippet_sender=null;this.$MercuryThreads22(p.thread_id)}else if(p.message_ids){o.message_count-=p.message_ids.length;c("ifRequired")("MercuryMessages",function(y){__p&&__p();y=y.getForFBID(this.$MercuryThreads1);for(var z=p.message_ids,A=Array.isArray(z),B=0,z=A?z:z[typeof Symbol==="function"?Symbol.iterator:"@@iterator"]();;){var C;if(A){if(B>=z.length)break;C=z[B++]}else{B=z.next();if(B.done)break;C=B.value}var D=C,E=y.getMessagesFromIDs([D]),F=E[0];if(F&&F.timestamp>o.last_read_timestamp)o.unread_count=Math.max(0,o.unread_count-1)}this.$MercuryThreads22(p.thread_id)}.bind(this),c("emptyFunction"))}break;case c("MercuryActionType").UPDATE_SNIPPET:c("ifRequired")("MercuryMessages",function(y){__p&&__p();y=y.getForFBID(this.$MercuryThreads1);var z=0,A=1,B=y.getThreadMessagesRangeNow(p.thread_id,z,A),C=B[0];if(C){o.snippet=C.body;o.snippet_attachments=C.attachments;o.snippet_sender=C.author}else{o.snippet="...";o.snippet_attachments=null;o.snippet_sender=null;y.getThreadMessagesRange(p.thread_id,z,A,function(D){if(D.length)this.$MercuryThreads5.handleUpdate({from_client:true,actions:[{thread_id:p.thread_id,action_type:c("MercuryActionType").UPDATE_SNIPPET,deleted_ids:p.deleted_ids}]})}.bind(this))}this.$MercuryThreads22(p.thread_id)}.bind(this),c("emptyFunction"));break;case c("MercuryActionType").CHANGE_MUTE_SETTINGS:if(Object.prototype.hasOwnProperty.call(p,"reactions_mute_mode"))o.reactions_mute_mode=p.reactions_mute_mode;else if(Object.prototype.hasOwnProperty.call(p,"mentions_mute_mode"))o.mentions_mute_mode=p.mentions_mute_mode;else o.mute_until=!p.mute_until?undefined:p.mute_until;this.$MercuryThreads22(o.thread_id);break;case c("MercuryActionType").BLOCK_STATUS_CHANGED:o.can_reply=p.canViewerReply;this.$MercuryThreads22(o.thread_id);break;case c("MercuryActionType").ADD_PARTICIPANTS:this.$MercuryThreads23(o,p.participants);this.$MercuryThreads22(o.thread_id);break;case c("MercuryActionType").CHANGE_FLAG:this.$MercuryThreads27(o,p.mark_as_flag);this.$MercuryThreads22(o.thread_id);break;case c("MercuryActionType").MOVE_PENDING_TO_INBOX:this.$MercuryThreads28(o);this.$MercuryThreads22(o.thread_id);break;case c("MercuryActionType").UPDATE_CUSTOM_LIKE:o.custom_like_icon=p.custom_like;this.$MercuryThreads22(o.thread_id);break;case c("MercuryActionType").ADD_GROUP_ADMINS:o.admin_ids=o.admin_ids.concat(p.added_admin_ids.filter(function(y){return o.admin_ids.indexOf(y)===-1}));this.$MercuryThreads22(p.thread_id);break;case c("MercuryActionType").REMOVE_GROUP_ADMINS:o.admin_ids=o.admin_ids.filter(function(y){return p.removed_admin_ids.indexOf(y)===-1});this.$MercuryThreads22(p.thread_id);break;case c("MercuryActionType").JOINABLE_MODE:o.joinable_mode=p.joinable_mode;this.$MercuryThreads22(p.thread_id);break;case c("MercuryActionType").APPROVAL_MODE:o.approval_mode=p.approval_mode;this.$MercuryThreads22(p.thread_id);break;case c("MercuryActionType").APPROVAL_QUEUE:if(p.added_id&&o.approval_queue_ids&&o.approval_queue_ids.indexOf(p.added_id)===-1)o.approval_queue_ids=o.approval_queue_ids.concat(p.added_id);if(p.removed_id&&o.approval_queue_ids)o.approval_queue_ids=o.approval_queue_ids.filter(function(y){return p.removed_id!==y});this.$MercuryThreads22(p.thread_id);break;case c("MercuryActionType").IS_PIN_PROTECTED:o.is_pin_protected=p.is_pin_protected;this.$MercuryThreads22(p.thread_id);break;case c("MercuryActionType").UPDATE_RTC_CALL_DATA:var v=p.initiator_fbid||(o.rtc_call_data?o.rtc_call_data.initiator_fbid:undefined);o.rtc_call_data=new(c("ImmutableObject"))({call_state:p.call_state,server_info_data:p.server_info_data,initiator_fbid:v});this.$MercuryThreads22(p.thread_id);break;case c("MercuryActionType").UPDATE_COMM_STATUS:this.$MercuryThreads29(o,p.comm_status);this.$MercuryThreads22(o.thread_id);break;case c("MercuryActionType").UPDATE_COMM_ITEM_OWNER:var w=void 0;if(p.id===null)w={nodes:[]};else w={nodes:[{admin:{id:p.id,name:p.name,profile_picture:{uri:p.profile_pic_uri}}}]};o.comm_item_owners=w;this.$MercuryThreads22(o.thread_id);break;case c("MercuryActionType").EVENT_RSVP_CHANGED:var x=o.participants_event_status.filter(function(y){return y.participant_id!==p.actor_fbid});x.push({participant_id:p.actor_fbid.toString(),event_status:p.rsvp_status});o.participants_event_status=x;this.$MercuryThreads22(p.thread_id);break}};m.prototype.$MercuryThreads25=function(o,p){__p&&__p();var q,r=this;if(p.log_message_data&&p.log_message_data.untypedData)(function(){__p&&__p();var s=p.log_message_data.untypedData,event=o.lightweight_event;switch(p.log_message_data.message_type){case c("MessagingGenericAdminTextType").THREAD_EPHEMERAL_SEND_MODE:var t=parseInt(s.ttl,10);if(t!==null&&o.ephemeral_ttl_mode!==t){o.ephemeral_ttl_mode=t;r.$MercuryThreads22(p.thread_id)}break;case c("MessagingGenericAdminTextType").CHANGE_THREAD_NICKNAME:var u={};for(var v in o.custom_nickname){if(v==s.participant_id&&s.nickname.trim().length==0)continue;u[v]=o.custom_nickname[v]}if(s.nickname.trim().length>0)u[s.participant_id]=s.nickname;o.custom_nickname=u;r.$MercuryThreads22(p.thread_id);break;case c("MessagingGenericAdminTextType").CHANGE_THREAD_ICON:c("requireWeak")("MercuryThreadActions",function(z){z.getForFBID(this.$MercuryThreads1).updateCustomLike(p.thread_id,s.thread_icon)}.bind(r));break;case c("MessagingGenericAdminTextType").CHANGE_THREAD_THEME:var w=s.theme_color;if(w&&w.length>0)o.custom_color="#".concat(w.substring(2));else o.custom_color=null;r.$MercuryThreads22(p.thread_id);break;case c("MessagingGenericAdminTextType").LIGHTWEIGHT_EVENT_CREATE:var x={};o.participants.map(function(z){var A=c("MercuryIDs").getUserIDFromParticipantID(z);if(A)x[A]=A===s.event_creator_id?i.GOING:i.INVITED},r);o.lightweight_event={track_rsvp:s.event_track_rsvp,title:s.event_title,event_time:parseInt(s.event_time,10),location_name:s.event_location_name,event_members:x,oid:s.event_id,event_type:s.event_type};r.$MercuryThreads22(p.thread_id);break;case c("MessagingGenericAdminTextType").LIGHTWEIGHT_EVENT_UPDATE:case c("MessagingGenericAdminTextType").LIGHTWEIGHT_EVENT_UPDATE_TIME:case c("MessagingGenericAdminTextType").LIGHTWEIGHT_EVENT_UPDATE_TITLE:case c("MessagingGenericAdminTextType").LIGHTWEIGHT_EVENT_UPDATE_LOCATION:if(event)o.lightweight_event=r.$MercuryThreads30(s,event,event.event_members);r.$MercuryThreads22(p.thread_id);break;case c("MessagingGenericAdminTextType").LIGHTWEIGHT_EVENT_RSVP:if(event&&event.event_members){var y=r.$MercuryThreads31(event.event_members,s);o.lightweight_event=r.$MercuryThreads30(s,event,y)}r.$MercuryThreads22(p.thread_id);break;case c("MessagingGenericAdminTextType").LIGHTWEIGHT_EVENT_DELETE:case c("MessagingGenericAdminTextType").LIGHTWEIGHT_EVENT_NOTIFY:o.lightweight_event=null;r.$MercuryThreads22(p.thread_id);break}})()};m.prototype.$MercuryThreads31=function(o,p){var q={};for(var r in o)q[r]=o[r];q[p.guest_id]=p.guest_status;return q};m.prototype.$MercuryThreads30=function(o,event,p){return{track_rsvp:event.track_rsvp,title:o.event_title===undefined?event.title:o.event_title,event_time:o.event_time===undefined?event.event_time:parseInt(o.event_time,10),location_name:o.event_location_name===undefined?event.location_name:o.event_location_name,event_members:p===undefined?event.event_members:p,oid:event.oid,event_type:event.event_type}};m.prototype.$MercuryThreads17=function(o){var p=c("MercuryIDs").tokenize(o.thread_id),q=p.type,r=p.value,s=q==="user",t=s||o.specific_to_list&&this.$MercuryThreads15(o.specific_to_list),u=t||s?this.$MercuryThreads32(o):o.specific_to_list;return new(c("ImmutableObject"))({thread_id:o.thread_id,participants:u,name:null,snippet:o.body,snippet_attachments:[],snippet_sender:o.author,unread_count:0,message_count:0,image_src:null,timestamp:o.timestamp,other_user_fbid:s?r:null,is_canonical_user:s,is_canonical:t,is_subscribed:true,folder:c("MessagingTag").INBOX,is_archived:false,is_page_follow_up:false})};m.prototype.$MercuryThreads26=function(o,p,q){__p&&__p();if(p.timestamp)this.$MercuryThreads33(o.thread_id,q,p.timestamp);if(!o||!o.thread_id||!o.participants)return false;if(!o.timestamp){this.$MercuryThreads9.add(o.thread_id);return false}var r=!o.unread_count;if(q==r)return false;o.unread_count=q?0:1;this.$MercuryThreads22(o.thread_id);return true};m.prototype.$MercuryThreads34=function(o){var p=this.$MercuryThreads8.getAllResources();for(var q in p)if(Object.prototype.hasOwnProperty.call(p,q)){var r=p[q];if(r.folder==o){this.$MercuryThreads8.setResource(q,c("ImmutableObject").setProperty(r,"unread_count",0));this.$MercuryThreads22(q)}}};m.prototype.$MercuryThreads23=function(o,p){__p&&__p();var q=new(c("Set"))(o.participants);o.participants=Array.from(o.participants||[]);p.forEach(function(r){if(!q.has(r)){o.participants.push(r);if(r===this.$MercuryThreads4){o.is_subscribed=true;o.can_reply=true;o.cannot_reply_reason=null;this.$MercuryThreads6.sendThreadDFF(undefined,o.thread_fbid)}}}.bind(this))};m.prototype.$MercuryThreads24=function(o,p){__p&&__p();var q=new(c("Set"))(p);if(o&&!o.participants)c("ChatReliabilityInstrumentation").logERROR("participants are null in thread_info!",{thread_info:o});else o.participants=o.participants.filter(function(r){return!q.has(r)});if(o&&!o.admin_ids)c("ChatReliabilityInstrumentation").logERROR("admin_ids are null in thread_info!",{thread_info:o});else o.admin_ids=o.admin_ids.filter(function(r){return!q.has(r)});if(q.has(this.$MercuryThreads4))o.is_subscribed=false;this.$MercuryThreads2.fetchThreadData([o.thread_id])};m.prototype.$MercuryThreads21=function(o,p){if(!o.participants){var q=JSON.stringify({thread_info:o,participant:p});k.error("missing_participants",q);return}var r=o.participants.indexOf(p);if(r>0)o.participants=[p].concat(o.participants.slice(0,r),o.participants.slice(r+1))};m.prototype.$MercuryThreads19=function(o,p){__p&&__p();var q=p.body,r=p.subject,s="";if(r){r=r.toLowerCase();if(q.slice(0,r.length).toLowerCase()==r)s=q;else if(q)s=r+" \xb7 "+q;else s=r}else s=q;if(p.is_filtered_content)s=c("MercuryDisplayTimeFilterMessageRenderer").renderFilteredContent(p);if(c("MessagingGiftWrapChecker").shouldRenderWithGiftWrap(p)){var t=p.author,u=t==this.$MercuryThreads4,v=null;if(!u){v=o.custom_nickname&&o.custom_nickname[c("MercuryIDs").getUserIDFromParticipantID(t)];if(!v){var w=c("MercuryParticipants").getNow(t);if(w!=null)v=w.short_name}}s=c("MercuryGiftSnippetRenderer").renderText(u,v)}o.snippet=s;if(p.raw_attachments&&p.raw_attachments.length>0){var x=c("MercuryAttachment").convertRaw(p.raw_attachments);o.snippet_attachments=x}else o.snippet_attachments=p.attachments;if(p.log_message_type)o.snippet_sender=null;else o.snippet_sender=p.author};m.prototype.$MercuryThreads27=function(o,p){o.page_thread_info=babelHelpers["extends"]({},o.page_thread_info,{flagged:p})};m.prototype.$MercuryThreads29=function(o,p){o.comm_status=p};m.prototype.$MercuryThreads28=function(o){if(o.folder!==c("MessagingTag").PENDING)return;o.folder=c("MessagingTag").INBOX};m.prototype.$MercuryThreads15=function(o){return o.filter(function(p){return p!=this.$MercuryThreads4}.bind(this)).length<=1};m.prototype.$MercuryThreads13=function(){__p&&__p();this.$MercuryThreads5.subscribe("invalidate-thread-state",function(o,p){return this.$MercuryThreads35(p)}.bind(this));this.$MercuryThreads5.subscribe("invalidate-global-state",function(o,p){return this.$MercuryThreads36()}.bind(this));this.$MercuryThreads5.subscribe("update-threads",function(o,p){__p&&__p();var q=(p.actions||[]).filter(function(r){return r.thread_id});if(p.threads&&p.payload_source==c("MercuryPayloadSource").SERVER_FETCH_THREAD_INFO)p.threads.forEach(function(r){var s=r.thread_id;if(this.$MercuryThreads9.has(s)){this.$MercuryThreads9["delete"](s);if(r.unread_count)this.$MercuryThreads2.changeThreadReadStatus(r.thread_id,true)}}.bind(this));this.$MercuryThreads37(p.threads);this.$MercuryThreads16(q,p.from_client);p.threads&&p.threads.forEach(function(r){this.$MercuryThreads22(r.thread_id)}.bind(this));if(p.global_actions)p.global_actions.forEach(function(r){if(r.action_type==c("MercuryGlobalActionType").MARK_ALL_READ)this.$MercuryThreads34(r.folder)}.bind(this));if(this.$MercuryThreads7){this.$MercuryThreads7=false;j.emit("change")}}.bind(this))};m.prototype.$MercuryThreads37=function(o){if(!o||!o.length)return;var p={},q=[];o.forEach(function(r){var s=new(c("ImmutableObject"))(r);p[r.thread_id]=s;q.push(c("MercuryLoggingHelper").obfuscateThread(s))});q.length&&k.debug("threads_added",JSON.stringify({threads:q}));this.$MercuryThreads8.addResourcesAndExecute(p)};m.prototype.$MercuryThreads22=function(o){this.$MercuryThreads7=true;this.$MercuryThreads3.updatedThread(o)};m.prototype.$MercuryThreads20=function(o){this.$MercuryThreads7=true;this.$MercuryThreads3.deletedThread(o)};m.prototype.$MercuryThreads33=function(o,p,q){this.$MercuryThreads7=true;this.$MercuryThreads3.changedThreadReadState(o,p,q)};m.prototype.$MercuryThreads35=function(o){this.$MercuryThreads8.setResource(o,undefined)};m.prototype.$MercuryThreads36=function(){this.$MercuryThreads7=false;this.$MercuryThreads8=new(c("KeyedCallbackManager"))();this.$MercuryThreads9=new(c("Set"))();this.$MercuryThreads10=false;this.$MercuryThreads11=new(c("Set"))();this.$MercuryThreads12=new(c("Set"))()};m.prototype.$MercuryThreads32=function(o){if(o.specific_to_list)return o.specific_to_list;var p=c("MercuryIDs").tokenize(o.thread_id),q=p.type,r=p.value;if(!r||q!=="user")return[this.$MercuryThreads4];return[c("MercuryIDs").getParticipantIDFromUserID(r),this.$MercuryThreads4]};var n=new(c("MercurySingletonProvider"))(m);f.exports=m}),null);
__d("ChatSidebarComposeLink.react",["fbt","ChatOpenTabEventLogger","FantaTabActions","Link.react","MercuryThreads","React","TooltipData"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i,j,k=c("MercuryThreads").get();i=babelHelpers.inherits(l,c("React").Component);j=i&&i.prototype;function l(m){j.constructor.call(this,m)}l.prototype.render=function(){var m=h._("New Message");return c("React").createElement(c("Link.react"),babelHelpers["extends"]({className:this.props.className,href:"#",onClick:this.$ChatSidebarComposeLink1},c("TooltipData").propsFor(m,"below")))};l.prototype.$ChatSidebarComposeLink1=function(m){var n=k.createNewLocalThreadGenerateID();c("FantaTabActions").openTab(n,"compose_link");c("ChatOpenTabEventLogger").logClickOpen("sidebar",n);m.preventDefault()};f.exports=l}),null);
__d("ChatSidebarDropdownConstants",[],(function a(b,c,d,e,f,g){var h=Object.freeze({SOUND:"sound",ADVANCED_SETTINGS:"advanced_settings",BLOCK_SETTINGS:"block_settings",TURN_OFF_DIALOG:"turn_off_dialog",CLOSE_ALL_TABS:"close_all_tabs",LOWER_ALL_TABS:"lower_all_tabs",TOGGLE_DISCOVER_BOTS:"toggle_discover_bots",SIDEBAR:"sidebar",HIDE_GROUPS:"hide_groups",ONLINE:"online",VIDEOCALL_ON:"videoon",VIDEOCALL_OFF:"videooff",PAUSE:"pause",SHOW_APPS:"show_apps",HIDE_APPS:"hide_apps",SHOW_TICKER:"show_ticker",HIDE_TICKER:"hide_ticker",HIDE_ADMINED_PAGES:"hide_admined_pages",HIDE_BUSINESSES:"hide_businesses",EMOJI_SETTINGS:"emoji_settings"});f.exports=h}),null);
__d("ConversationNubTabStateListStorage",[],(function a(b,c,d,e,f,g){"use strict";function h(){this.$ConversationNubTabStateListStorage1=[]}h.prototype.modify=function(i){this.$ConversationNubTabStateListStorage1=i(this.$ConversationNubTabStateListStorage1)};h.prototype.getData=function(){return this.$ConversationNubTabStateListStorage1};f.exports=h}),null);
__d("differenceSets",["filterSet"],(function a(b,c,d,e,f,g){"use strict";function h(i){for(var j=arguments.length,k=Array(j>1?j-1:0),l=1;l<j;l++)k[l-1]=arguments[l];return c("filterSet")(i,function(m){return!k.some(function(n){return n.has(m)})})}f.exports=h}),null);
__d("ConversationNubTabStateList",["invariant","ConversationNubTabStateListStorage","Set","differenceSets"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();function i(){this.$ConversationNubTabStateList2=new(c("Set"))();this.$ConversationNubTabStateList1=new(c("ConversationNubTabStateListStorage"))()}i.prototype.modifyTabState=function(j,k){this.modifyTabs(function(l){var m=l.findIndex(function(n){return n.tabID===j});m!==-1||h(0);k(l[m]);return l})};i.prototype.$ConversationNubTabStateList3=function(j){return new(c("Set"))(j.map(function(k){return k.tabID}))};i.prototype.modifyTabs=function(j){try{this.$ConversationNubTabStateList1.modify(function(k){var l=this.$ConversationNubTabStateList3(k),m=j(k),n=this.$ConversationNubTabStateList3(m);this.$ConversationNubTabStateList2=c("differenceSets")(l,n);return m}.bind(this))}finally{this.$ConversationNubTabStateList2=new(c("Set"))()}};i.prototype.getTabs=function(){return this.$ConversationNubTabStateList1.getData()};i.prototype.getTabState=function(j){var k=this.getTabStateIfExists(j);k||h(0);return k};i.prototype.getTabStateIfExists=function(j){return this.getTabs().find(function(k){return k.tabID===j})};i.prototype.push=function(){for(var j=arguments.length,k=Array(j),l=0;l<j;l++)k[l]=arguments[l];this.modifyTabs(function(m){k.forEach(function(n){if(m.find(function(o){return o.tabID===n.tabID}))h(0);else m.push(n)});return m})};i.prototype.remove=function(j){this.modifyTabs(function(k){var l=k.findIndex(function(m){return m.tabID===j});if(l!==-1)k.splice(l,1);return k})};f.exports=i}),null);
__d("ConversationNubTabState",["invariant","ConversationNubTabStateList"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i=12;function j(){this.$ConversationNubTabStateClass1=Object.create(null);this.$ConversationNubTabStateClass2=new(c("ConversationNubTabStateList"))();this.$ConversationNubTabStateClass3=Infinity}j.prototype.anyTabHasFocus=function(){return this.getUnsortedLoadedTabs().some(function(k){return k.getIsFocused()})};j.prototype.anyTabHasText=function(){return this.getUnsortedLoadedTabs().some(function(k){return k.getHasText()})};j.prototype.getTabState=function(k){return this.$ConversationNubTabStateClass2.getTabState(k)};j.prototype.getTabStateIfExists=function(k){return this.$ConversationNubTabStateClass2.getTabStateIfExists(k)};j.prototype.getUnloadedTabs=function(){var k=this.$ConversationNubTabStateClass2.getTabs().filter(function(l){return!this.getLoadedTab(l.tabID)}.bind(this));return k};j.prototype.setMaxDockTabs=function(k){this.$ConversationNubTabStateClass3=k};j.prototype.getNumDockTabs=function(){var k=this.$ConversationNubTabStateClass3,l=this.getTotalTabCount();return Math.min(k,l)};j.prototype.getNumMenuTabs=function(){return this.getTotalTabCount()-this.getNumDockTabs()};j.prototype.addTabState=function(k){this.$ConversationNubTabStateClass2.push(k)};j.prototype.addLoadedTab=function(k,l){var m=this.getTabState(k);if(!m)return;var n=this.getLoadedTab(k);if(n)return;this.$ConversationNubTabStateClass1[k]=l;this.$ConversationNubTabStateClass4()};j.prototype.getLoadedTab=function(k){return this.$ConversationNubTabStateClass1[k]};j.prototype.getLoadedTabByFeedbackTarget=function(k){return this.getLoadedTabs().find(function(l){return l.getPersistentState().ftID===k})};j.prototype.isTabInDock=function(k){var l=this.getLoadedTab(k);if(!l)return false;var m=this.$ConversationNubTabStateClass5(l);return 0<=m&&m<this.getNumDockTabs()};j.prototype.clearTabNotifications=function(k){this.$ConversationNubTabStateClass2.modifyTabState(k,function(l){l.unseenCommentsSinceLastCleared={};l.hasFakeInitBadge=false;l.badgeCount=0;l.isBlinkingUnread=false})};j.prototype.deleteTab=function(k){var l=this.getLoadedTab(k);if(l){delete this.$ConversationNubTabStateClass1[k];l.destroy()}this.$ConversationNubTabStateClass2.remove(k);return Boolean(l)};j.prototype.deleteAllTabs=function(){this.getUnsortedLoadedTabs().forEach(function(k){return this.deleteTab(k.getTabID())}.bind(this))};j.prototype.modifyTabState=function(k,l){return this.$ConversationNubTabStateClass2.modifyTabState(k,l)};j.prototype.moveTabToDockLeft=function(k){__p&&__p();var l=this.getLoadedTab(k);if(!l)return;this.$ConversationNubTabStateClass2.modifyTabs(function(m){__p&&__p();var n=m.findIndex(function(l){return l.tabID===k});n!==-1||h(0);var o=m[n],p=this.$ConversationNubTabStateClass5(l),q=this.getLoadedTabs().length,r=this.getNumDockTabs();if(p<0||q===0)return m;else if(r===0){if(p!==0){m.splice(n,1);m.unshift(o)}return m}var s=r-1;if(p===s)return m;m.splice(n,1);if(p<s)s-=1;var t=this.getLoadedTabs()[s],u=this.getTabState(t.getTabID());u||h(0);var v=m.findIndex(function(l){return l.tabID===u.tabID});m.splice(v,0,o);return m}.bind(this))};j.prototype.getLoadedTabs=function(){var k=this.$ConversationNubTabStateClass2.getTabs().map(function(l){return this.getLoadedTab(l.tabID)}.bind(this)).filter(Boolean);return k};j.prototype.getUnsortedLoadedTabs=function(){var k=Object.values(this.$ConversationNubTabStateClass1);return k};j.prototype.getTotalTabCount=function(){return this.getUnsortedLoadedTabs().length};j.prototype.getTabsForDockOldestFirst=function(){return this.getLoadedTabs().slice(0,this.getNumDockTabs())};j.prototype.getTabsForDockNewestFirst=function(){return this.getTabsForDockOldestFirst().slice().reverse()};j.prototype.getTabsForMenuOldestFirst=function(){return this.getLoadedTabs().slice(this.getNumDockTabs())};j.prototype.getTabsForMenuNewestFirst=function(){return this.getLoadedTabs().slice(this.getNumDockTabs()).reverse()};j.prototype.$ConversationNubTabStateClass4=function(){var k=this.getLoadedTabs().length;if(k>i){var l=k-i,m=this.getTabsForMenuOldestFirst().slice(0,l);m.map(function(n){return n.getTabID()}).forEach(function(n){return this.deleteTab(n)}.bind(this))}};j.prototype.$ConversationNubTabStateClass5=function(k){return this.getLoadedTabs().indexOf(k)};f.exports=new j()}),null);
__d("ConversationNub",["csx","cx","Arbiter","ConversationNubHeader","ConversationNubTabState","ConversationNubTabsUpdateEventController","ConversationNubUtils","CSS","DOM","EventListener","NotificationUserActions","SubscriptionsHandler","UFIComposerIsTypingStore","URI","containsNode","debounce","guid"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j=c("ConversationNubTabsUpdateEventController").minimizeAndInformTabUpdate,k=c("ConversationNubTabsUpdateEventController").popOutAndInformTabUpdate,l=c("ConversationNubTabState"),m=10,n=500,o=100;p.createDefaultState=function(q,r,s,t,u,v){return{tabID:q,permalinkURI:r?new(c("URI"))(r):null,ftID:s,notifAlertID:t,notificationType:u,title:v,keepAtBottom:false,isTabRaised:false,isBlinkingUnread:false,badgeCount:0,allSeenNewComments:{},unseenCommentsSinceLastCleared:{},hasFakeInitBadge:false}};function p(q,r,s,t){__p&&__p();var u=arguments.length<=4||arguments[4]===undefined?false:arguments[4],v=arguments.length<=5||arguments[5]===undefined?false:arguments[5];this.$ConversationNub13=false;this.$ConversationNub14=false;this.$ConversationNub1=q;this.$ConversationNub12=r;this.$ConversationNub5=c("guid")();this.$ConversationNub7=null;this.$ConversationNub8=false;this.$ConversationNub9=null;this.$ConversationNub10=u;this.$ConversationNub11=v;this.$ConversationNub15=t;this.$ConversationNub6=new(c("SubscriptionsHandler"))();this.$ConversationNub16();this.$ConversationNub17();if(s!=null)l.modifyTabState(this.$ConversationNub12,function(w){if(s)w.hasFakeInitBadge=false;else{w.hasFakeInitBadge=true;this.$ConversationNub18(1);this.$ConversationNub19(true)}}.bind(this));this.$ConversationNub20()}p.prototype.$ConversationNub20=function(){this.$ConversationNub21();this.$ConversationNub22();c("ConversationNubUtils").informShouldRecheckTabVisibility(this);this.forceReflow()};p.prototype.getPersistentState=function(){return l.getTabState(this.$ConversationNub12)};p.prototype.getPersistentStateIfExists=function(){return l.getTabStateIfExists(this.$ConversationNub12)};p.prototype.$ConversationNub16=function(){__p&&__p();var q=this.$ConversationNub23();if(q){this.$ConversationNub6.addSubscriptions(c("EventListener").listen(q,"click",this.$ConversationNub24.bind(this)),c("EventListener").listen(q,"mouseenter",this.$ConversationNub25.bind(this)),c("EventListener").listen(q,"mouseleave",this.$ConversationNub26.bind(this)));var r=c("ConversationNubUtils").getCloseButtonElem(q);if(r)c("ConversationNubUtils").addCloseButtonListeners(r,this.$ConversationNub6,this.$ConversationNub27.bind(this))}var s=this.$ConversationNub28();if(s){l.modifyTabState(this.$ConversationNub12,function(u){u.keepAtBottom=true});this.$ConversationNub6.addSubscriptions(c("EventListener").listen(s,"scroll",c("debounce")(this.$ConversationNub29.bind(this),o)),c("Arbiter").subscribe("reflow",this.$ConversationNub30.bind(this)))}var t=this.$ConversationNub31();if(t)this.$ConversationNub6.addSubscriptions(c("EventListener").listen(t,"focusin",this.$ConversationNub32.bind(this,true)),c("EventListener").listen(t,"focusout",this.$ConversationNub32.bind(this,false)))};p.prototype.$ConversationNub17=function(){__p&&__p();var q=this.$ConversationNub33();if(!q){this.$ConversationNub2=null;return}var r=function(){var t=this.getPersistentState();return{permalinkURI:t.permalinkURI,ftID:t.ftID,tabID:t.tabID}}.bind(this),s=new(c("ConversationNubHeader"))(q,r);this.$ConversationNub6.addSubscriptions(s.subscribe("closeButton",this.$ConversationNub27.bind(this)),s.subscribe("showMenu",this.$ConversationNub34.bind(this)),s.subscribe("hideMenu",this.$ConversationNub35.bind(this)),s.subscribe("minimizeButton",this.$ConversationNub36.bind(this,true)),s.subscribe("clickHeader",this.$ConversationNub36.bind(this,true)),s.subscribe("menuPermalinkClick",this.$ConversationNub36.bind(this,false)),c("UFIComposerIsTypingStore").addListener(function(){var t=this.getPersistentStateIfExists();if(!t)return;var u=this.$ConversationNub14,v=c("UFIComposerIsTypingStore").getValueFor(t.ftID);this.$ConversationNub14=v===true;if(u!==this.$ConversationNub14)c("ConversationNubTabsUpdateEventController").informTabsUpdated()}.bind(this)));this.$ConversationNub2=s};p.prototype.$ConversationNub33=function(){return this.$ConversationNub1&&c("DOM").scry(this.$ConversationNub1,".fbNubFlyoutTitlebar")[0]};p.prototype.$ConversationNub23=function(){return this.$ConversationNub1&&c("DOM").scry(this.$ConversationNub1,".fbNubButton")[0]};p.prototype.$ConversationNub28=function(){if(!this.$ConversationNub3&&this.$ConversationNub1)this.$ConversationNub3=c("DOM").scry(this.$ConversationNub1,".uiScrollableAreaWrap")[0];return this.$ConversationNub3};p.prototype.$ConversationNub31=function(){if(!this.$ConversationNub4&&this.$ConversationNub1)this.$ConversationNub4=c("DOM").scry(this.$ConversationNub1,".fbNubFlyoutBodyContent")[0];return this.$ConversationNub4};p.prototype.$ConversationNub37=function(){var q=this.$ConversationNub23();if(q)return c("DOM").scry(q,"._37op")[0];return null};p.prototype.$ConversationNub27=function(){c("ConversationNubUtils").informShouldCloseTab(this.$ConversationNub12,this.getFeedbackTargetID(),c("ConversationNubUtils").CLOSE_REASON_TAB_X_OUT)};p.prototype.$ConversationNub36=function(q){j(this,q)};p.prototype.$ConversationNub34=function(){this.$ConversationNub1&&c("CSS").addClass(this.$ConversationNub1,"_1uw3")};p.prototype.$ConversationNub35=function(){this.$ConversationNub1&&c("CSS").removeClass(this.$ConversationNub1,"_1uw3")};p.prototype.$ConversationNub24=function(){if(this.getPersistentState().isTabRaised)j(this,true);else k(this,true)};p.prototype.$ConversationNub25=function(){if(this.getPersistentState().isBlinkingUnread)this.$ConversationNub9=new Date()};p.prototype.$ConversationNub26=function(){var q=this.$ConversationNub9;if(q&&this.getPersistentState().isBlinkingUnread){var r=new Date();if(r-q>=n)this.$ConversationNub19(false)}this.$ConversationNub9=null};p.prototype.$ConversationNub38=function(){var q=this.$ConversationNub28();if(q){var r=q.scrollHeight;if(r>0&&!this.$ConversationNub39(q)){this.$ConversationNub8=true;q.scrollTop=r}}};p.prototype.$ConversationNub39=function(q){q=q||this.$ConversationNub28();return!!(q&&q.scrollTop>=q.scrollHeight-q.clientHeight-m)};p.prototype.$ConversationNub29=function(){if(!l.getTabStateIfExists(this.$ConversationNub12)||!this.getPersistentState().isTabRaised)return;l.modifyTabState(this.$ConversationNub12,function(q){q.keepAtBottom=this.$ConversationNub39();c("ConversationNubUtils").informShouldRecheckTabVisibility(this)}.bind(this));if(!this.$ConversationNub8)this.clearJewelNotifications();this.$ConversationNub8=false};p.prototype.$ConversationNub32=function(q){if(this.$ConversationNub13===q)return;this.$ConversationNub13=q;if(this.$ConversationNub13)this.clearJewelNotifications();c("ConversationNubTabsUpdateEventController").informTabsUpdated()};p.prototype.getIsFocused=function(){return this.$ConversationNub13};p.prototype.getPageID=function(){return this.$ConversationNub15};p.prototype.getHasText=function(){return this.$ConversationNub14};p.prototype.$ConversationNub30=function(){__p&&__p();var q=this.getPersistentState();if(!q.isTabRaised)return;if(q.keepAtBottom){this.$ConversationNub38();this.$ConversationNub7&&clearTimeout(this.$ConversationNub7);this.$ConversationNub7=setTimeout(function(){if(q.keepAtBottom)this.$ConversationNub38()}.bind(this),100)}};p.prototype.$ConversationNub18=function(q){l.modifyTabState(this.$ConversationNub12,function(r){r.badgeCount=q;this.$ConversationNub21()}.bind(this))};p.prototype.$ConversationNub19=function(q){l.modifyTabState(this.$ConversationNub12,function(r){r.isBlinkingUnread=q;this.$ConversationNub22()}.bind(this))};p.prototype.$ConversationNub21=function(){__p&&__p();var q=this.$ConversationNub37();if(!q)return;var r=this.getPersistentState().badgeCount,s=r>0;if(s){c("DOM").setContent(q,r);c("CSS").show(q)}else{c("CSS").hide(q);c("DOM").setContent(q,r)}};p.prototype.$ConversationNub22=function(){if(this.$ConversationNub1){var q=this.getPersistentState().isBlinkingUnread;if(this.$ConversationNub1)c("CSS").conditionClass(this.$ConversationNub1,"_53tf",q)}};p.prototype.getRootDOM=function(){return this.$ConversationNub1};p.prototype.getShouldShowIntroNux=function(){return this.$ConversationNub10};p.prototype.getShouldShowHideNux=function(){return this.$ConversationNub11};p.prototype.getTabID=function(){return this.$ConversationNub12};p.prototype.getNotificationPayloadAlertID=function(){return this.getPersistentState().notifAlertID};p.prototype.getNotificationType=function(){return this.getPersistentState().notificationType};p.prototype.setNotificationType=function(q){l.modifyTabState(this.$ConversationNub12,function(r){r.notificationType=q})};p.prototype.getFeedbackTargetID=function(){return this.getPersistentState().ftID};p.prototype.getPermalinkURI=function(){return this.getPersistentState().permalinkURI};p.prototype.getTitle=function(){return this.getPersistentState().title};p.prototype.getBadgeCount=function(){return this.getPersistentState().badgeCount};p.prototype.getIsRaised=function(){return this.getPersistentState().isTabRaised};p.prototype.getSessionID=function(){return this.$ConversationNub5};p.prototype.markCommentsAsSeenWithoutBadging=function(q){l.modifyTabState(this.$ConversationNub12,function(r){q.forEach(function(s){r.allSeenNewComments[s]=true})})};p.prototype.attemptAddNewCommentsToBadge=function(q){__p&&__p();l.modifyTabState(this.$ConversationNub12,function(r){__p&&__p();q.forEach(function(u){if(r.allSeenNewComments[u])return;r.allSeenNewComments[u]=true;r.unseenCommentsSinceLastCleared[u]=true});var s=Object.keys(r.unseenCommentsSinceLastCleared).length;if(r.hasFakeInitBadge)s+=1;var t=r.badgeCount;this.$ConversationNub18(s);this.$ConversationNub19(s>0&&s>t)}.bind(this))};p.prototype.clearBadge=function(){l.clearTabNotifications(this.$ConversationNub12);this.$ConversationNub21();this.$ConversationNub22()};p.prototype.clearJewelNotifications=function(){var q=this.getNotificationPayloadAlertID();if(q)c("NotificationUserActions").markNotificationsAsRead([q])};p.prototype.popOutAndInformTabUpdate=function(){this.popOut();c("ConversationNubTabsUpdateEventController").informTabsUpdated()};p.prototype.popOut=function(){l.modifyTabState(this.$ConversationNub12,function(q){if(this.$ConversationNub1)c("CSS").addClass(this.$ConversationNub1,"_5r93");q.isTabRaised=true;this.clearBadge();if(q.keepAtBottom)this.$ConversationNub38()}.bind(this))};p.prototype.minimize=function(){l.modifyTabState(this.$ConversationNub12,function(q){if(this.$ConversationNub1)c("CSS").removeClass(this.$ConversationNub1,"_5r93");q.isTabRaised=false;this.$ConversationNub2&&this.$ConversationNub2.hideMenu();this.clearBadge()}.bind(this))};p.prototype.forceReflow=function(){this.$ConversationNub30()};p.prototype.isFormForThisUFI=function(q){return this.$ConversationNub1&&c("containsNode")(this.$ConversationNub1,q)};p.prototype.destroy=function(){__p&&__p();this.$ConversationNub6.release();this.$ConversationNub2&&this.$ConversationNub2.destroy();this.$ConversationNub2=null;this.$ConversationNub7&&clearTimeout(this.$ConversationNub7);this.minimize();if(this.$ConversationNub1){c("DOM").remove(this.$ConversationNub1);c("Arbiter").inform("ConversationNub/destroy",{root:this.$ConversationNub1});this.$ConversationNub1=null}};f.exports=p}),null);
__d("ConversationNubAddCommentSubscription",["Arbiter","ConversationNubTabState","UFIUIEvents"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();function h(i){return c("Arbiter").subscribe(c("UFIUIEvents").Comment,function(j,k){var l=k.ft_id,m=k.form;if(!l||!m)return;var n=c("ConversationNubTabState").getLoadedTabByFeedbackTarget(l);if(n&&n.isFormForThisUFI(m))i(n,l)})}f.exports={subscribe:h}}),null);
__d("XConversationNubActionTakenController",["XController"],(function a(b,c,d,e,f,g){f.exports=c("XController").create("/ajax/conversation/nub_story/action_taken/",{})}),null);
__d("ConversationNubActionTakenReporter",["Arbiter","AsyncRequest","ConversationNubAddCommentSubscription","ConversationNubUtils","PinnedConversationNubsActionTaken","SubscriptionsHandler","XConversationNubActionTakenController"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();function h(){this.$ConversationNubActionTakenReporter2=function(i,j){this.$ConversationNubActionTakenReporter4(j,c("PinnedConversationNubsActionTaken").COMMENT_ADDED)}.bind(this);this.$ConversationNubActionTakenReporter3=function(event,i){var j=i.tabID,k=i.ftID,l=i.tabState,m=i.sessionID,n=i.reason;if(n===c("ConversationNubUtils").CLOSE_REASON_TAB_X_OUT||n===c("ConversationNubUtils").CLOSE_REASON_OVERFLOW_X_OUT||n===c("ConversationNubUtils").CLOSE_REASON_UNPIN)this.$ConversationNubActionTakenReporter4(k,c("PinnedConversationNubsActionTaken").TAB_CLOSED_BY_USER)}.bind(this);this.$ConversationNubActionTakenReporter1=new(c("SubscriptionsHandler"))(c("ConversationNubAddCommentSubscription").subscribe(this.$ConversationNubActionTakenReporter2),c("Arbiter").subscribe(c("ConversationNubUtils").CLOSE_TAB_EVENT,this.$ConversationNubActionTakenReporter3))}h.prototype.destroy=function(){this.$ConversationNubActionTakenReporter1.release()};h.prototype.$ConversationNubActionTakenReporter4=function(i,j){var k=c("XConversationNubActionTakenController").getURIBuilder().getURI();new(c("AsyncRequest"))().setURI(k).setMethod("POST").setData({ft_id:i,action:j}).setAllowCrossPageTransition(true).send()};f.exports=h}),null);
__d("ConversationNubHeader",["csx","ArbiterMixin","Bootloader","ConversationNubUtils","DOM","Event","EventListener","Keys","SubscriptionsHandler","ifRequired","mixin"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i,j;function k(m,n){return c("EventListener").listen(m,"keydown",function(o){if(c("Event").getKeyCode(o)===c("Keys").RETURN)n(o)})}i=babelHelpers.inherits(l,c("mixin")(c("ArbiterMixin")));j=i&&i.prototype;function l(m,n){j.constructor.call(this);this.$ConversationNubHeader6=false;this.$ConversationNubHeader1=m;this.$ConversationNubHeader3=n;this.$ConversationNubHeader4=null;this.$ConversationNubHeader5=false;this.$ConversationNubHeader2=new(c("SubscriptionsHandler"))();this.$ConversationNubHeader7()}l.prototype.$ConversationNubHeader7=function(){__p&&__p();var m=this.$ConversationNubHeader1;this.$ConversationNubHeader2.addSubscriptions(c("EventListener").listen(m,"click",this.$ConversationNubHeader8.bind(this)));var n=c("ConversationNubUtils").getCloseButtonElem(m);if(n)c("ConversationNubUtils").addCloseButtonListeners(n,this.$ConversationNubHeader2,this.$ConversationNubHeader9.bind(this));var o=this.$ConversationNubHeader10();if(o)this.$ConversationNubHeader2.addSubscriptions(c("EventListener").listen(o,"click",this.$ConversationNubHeader11.bind(this)),k(o,this.$ConversationNubHeader11.bind(this)));var p=this.$ConversationNubHeader12();if(p)this.$ConversationNubHeader2.addSubscriptions(c("EventListener").listen(p,"click",this.$ConversationNubHeader13.bind(this)),c("EventListener").listen(p,"mouseover",this.$ConversationNubHeader14.bind(this)),c("EventListener").listen(p,"focus",this.$ConversationNubHeader15.bind(this)),k(p,this.$ConversationNubHeader16.bind(this)))};l.prototype.$ConversationNubHeader12=function(){return c("DOM").scry(this.$ConversationNubHeader1,"._1rf1")[0]};l.prototype.$ConversationNubHeader10=function(){return c("DOM").scry(this.$ConversationNubHeader1,"._4a56")[0]};l.prototype.$ConversationNubHeader17=function(){return c("ConversationNubUtils").getCloseButtonElem(this.$ConversationNubHeader1)};l.prototype.$ConversationNubHeader9=function(){this.inform("closeButton")};l.prototype.$ConversationNubHeader11=function(m){if(m.type==="click")m.kill();this.inform("minimizeButton")};l.prototype.$ConversationNubHeader8=function(){this.inform("clickHeader")};l.prototype.$ConversationNubHeader18=function(){this.inform("showMenu")};l.prototype.$ConversationNubHeader19=function(){this.inform("hideMenu");var m=this.$ConversationNubHeader12();m&&m.blur()};l.prototype.$ConversationNubHeader20=function(){this.inform("menuPermalinkClick")};l.prototype.$ConversationNubHeader21=function(m){__p&&__p();if(this.$ConversationNubHeader4)return;var n=this.$ConversationNubHeader12();if(!n)return;if(m)this.$ConversationNubHeader5=true;c("Bootloader").loadModules(["React","ReactDOM","ConversationNubHeaderMenu.react"],function(o,p,q){if(this.$ConversationNubHeader6)return;var r=babelHelpers["extends"]({},this.$ConversationNubHeader3(),{onMenuShow:this.$ConversationNubHeader18.bind(this),onMenuHide:this.$ConversationNubHeader19.bind(this),onPermalinkClick:this.$ConversationNubHeader20.bind(this),showOnMount:this.$ConversationNubHeader5});this.$ConversationNubHeader4=p.render(o.createElement(q,r),n)}.bind(this),"ConversationNubHeader")};l.prototype.$ConversationNubHeader13=function(m){m.kill();this.$ConversationNubHeader21(true)};l.prototype.$ConversationNubHeader14=function(){this.$ConversationNubHeader21(false)};l.prototype.$ConversationNubHeader15=function(){this.$ConversationNubHeader21(false)};l.prototype.$ConversationNubHeader16=function(){if(this.$ConversationNubHeader4)this.$ConversationNubHeader4.toggle();else this.$ConversationNubHeader21(true)};l.prototype.hideMenu=function(){this.$ConversationNubHeader4&&this.$ConversationNubHeader4.hide()};l.prototype.destroy=function(){this.$ConversationNubHeader6=true;var m=this.$ConversationNubHeader12();if(m&&this.$ConversationNubHeader4)c("ifRequired")("ReactDOM",function(n){n.unmountComponentAtNode(m)});this.$ConversationNubHeader2.release()};f.exports=l}),null);
__d("ConversationNubTabsUpdateEventController",["Arbiter","ConversationNubUtils"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h="ConversationNub/tabsUpdated",i="ConversationNub/minimizedByUser",j="ConversationNub/maximizedByUser",k=false;function l(p){if(!k)c("Arbiter").inform(h,p)}function m(p){return c("Arbiter").subscribe(h,function(q,r){k=true;p(r);k=false})}function n(p,q){q&&c("Arbiter").inform(i,{tab:p});p.minimize();l()}function o(p,q){if(!q&&!c("ConversationNubUtils").allowProgrammaticPopOut())return;q&&c("Arbiter").inform(j,{tab:p});p.popOut();l()}f.exports={TAB_MINIMIZED_BY_USER_EVENT:i,TAB_MAXIMIZED_BY_USER_EVENT:j,informTabsUpdated:l,subscribeToTabsUpdated:m,minimizeAndInformTabUpdate:n,popOutAndInformTabUpdate:o}}),null);
__d("XConversationNubTogglePinController",["XController"],(function a(b,c,d,e,f,g){f.exports=c("XController").create("/ajax/conversation/nub_story/toggle_pin/",{ft_id:{type:"String"},pin:{type:"Bool",defaultValue:false},with_render:{type:"Bool",defaultValue:false},notif_setting:{type:"Enum",enumType:1}})}),null);
__d("XConversationsToggleController",["XController"],(function a(b,c,d,e,f,g){f.exports=c("XController").create("/ajax/conversation/toggle_feature/",{turn_conversations_on:{type:"Bool",defaultValue:false}})}),null);
__d("isBusinessURI",["isFacebookURI"],(function a(b,c,d,e,f,g){"use strict";function h(i){return c("isFacebookURI")(i)&&i.getSubdomain()==="business"}f.exports=h}),null);
__d("isGamesURI",["isFacebookURI"],(function a(b,c,d,e,f,g){"use strict";function h(i){return c("isFacebookURI")(i)&&i.getPath().startsWith("/games")}f.exports=h}),null);
__d("ConversationNubUtils",["csx","Arbiter","AsyncRequest","ConversationNubTabState","DOM","Event","EventListener","Keys","NotificationConversationController","URI","XConversationNubTogglePinController","XConversationsToggleController","isBusinessURI","isCanvasAppURI","isGamesURI"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i=c("ConversationNubTabState"),j=Object.freeze({DISABLE:"disable",ENABLE:"enable"}),k="ConversationNubUtils/closeTab",l="ConversationNubUtils/unpinnedFromHeader",m="ConversationNubUtils/recheckTabVisibility",n="ConversationNubUtils/openPermalinkFromHeader",o="ConversationNubUtils/turnOff",p="ConversationNubUtils/turnOn",q="tab-x-out",r="browser-tab-sync",s="overflow-x-out",t="unpin";function u(O){var P=Object.values(j);return P.find(function(Q){return Q===O})||null}function v(O,P,Q,R){var S=R||{},T=S.notif_setting,U=c("XConversationNubTogglePinController").getURIBuilder().setString("ft_id",String(O)).setBool("pin",P);if(T)U.setEnum("notif_setting",T);var V=U.getURI(),W=new(c("AsyncRequest"))().setURI(V).setMethod("POST");if(Q)W.setAllowCrossPageTransition(true);W.send()}function w(E){var O=c("XConversationsToggleController").getURIBuilder().setBool("turn_conversations_on",E).getURI();E?N():M();var P=new(c("AsyncRequest"))().setURI(O).setAllowCrossPageTransition(true).setHandler(function(Q){if(Q.getPayload().conversationsStatus)N();else M()}).setErrorHandler(function(Q){E?M():N()}).setMethod("POST");P.send()}function x(O,P,Q){v(O,true,P,Q)}function y(O,P,Q){v(O,false,P,Q)}function z(O,P){x(O,false,P)}function A(O,P){y(O,false,P)}function B(O,P){x(O,true,P)}function C(O,P){y(O,true,P)}function D(){w(false);c("NotificationConversationController").deleteAllTabs()}function E(){w(true)}function F(O){return c("DOM").scry(O,"._4iz6")[0]}function G(O,P,Q){var R=function R(){Q()};P.addSubscriptions(c("EventListener").listen(O,"click",R),c("EventListener").listen(O,"keydown",function(S){if(c("Event").getKeyCode(S)===c("Keys").RETURN)R()}))}function H(){var O=c("URI").getRequestURI();return!c("isCanvasAppURI")(O)&&!c("isBusinessURI")(O)&&!c("isGamesURI")(O)}function I(O,P,Q){var R=i.getLoadedTab(O);if(!R)return;var S=R.getPersistentState(),T=R.getSessionID(),U=R.getPageID();c("Arbiter").inform(k,{tabID:O,ftID:P,tabState:S,sessionID:T,reason:Q,pageID:U})}function J(O){var P=i.getLoadedTab(O);if(!P)return;c("Arbiter").inform(l,{tab:P})}function K(O){c("Arbiter").inform(m,{tab:O})}function L(O){var P=i.getLoadedTab(O);if(!P)return;c("Arbiter").inform(n,{tab:P})}function M(){c("Arbiter").inform(o,{})}function N(){c("Arbiter").inform(p,{})}f.exports={CLOSE_TAB_EVENT:k,UNPIN_FROM_HEADER_EVENT:l,OPEN_PERMALINK_FROM_HEADER_EVENT:n,TURN_CONVERSATIONS_OFF_EVENT:o,TURN_CONVERSATIONS_ON_EVENT:p,CLOSE_REASON_TAB_X_OUT:q,CLOSE_REASON_SYNCHRONIZED_FROM_OTHER_TAB:r,CLOSE_REASON_OVERFLOW_X_OUT:s,CLOSE_REASON_UNPIN:t,coerceToPinRequestNotifSetting:u,sendPinRequest:z,sendUnpinRequest:A,sendPinRequestAcrossTransitions:B,sendUnpinRequestAcrossTransitions:C,getCloseButtonElem:F,addCloseButtonListeners:G,informShouldCloseTab:I,informDidUnpinFromHeaderMenu:J,informShouldRecheckTabVisibility:K,informOpenPermalinkFromHeader:L,allowProgrammaticPopOut:H,turnConversationsOff:D,turnConversationsOn:E}}),null);
__d("ConversationNubPermalinkUtils",["URI","isFacebookURI"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();function h(l){return l.substr(-1)==="/"?l.slice(0,-1):l}function i(l,m){var n=l.getPath(),o=m.getPath();return h(n)===h(o)}function j(l,m,n){var o=l.getQueryData(),p=m.getQueryData(),q=o[n],r=p[n];if(q==null&&r==null)return true;return q===r}function k(l){var m=new(c("URI"))(window.location.href);return m&&l&&c("isFacebookURI")(m)&&c("isFacebookURI")(l)&&i(m,l)&&j(m,l,"fbid")&&j(m,l,"story_fbid")}f.exports={isOnPermalink:k}}),null);
__d("Dock",["csx","Event","shield","Arbiter","ArbiterMixin","BlueBar","ChatQuietLinks","CSS","DataStore","DOM","Parent","Scroll","Style","Toggler","Vector","emptyFunction"],(function a(b,c,d,e,f,g,h){__p&&__p();function i(){}Object.assign(i,c("ArbiterMixin"),{MIN_HEIGHT:140,INITIAL_FLYOUT_HEIGHT_OFFSET:10,init:function j(k){__p&&__p();this.init=c("emptyFunction");this.rootEl=k;this.calculateViewportDimensions();c("ChatQuietLinks").removeEmptyHrefs(this.rootEl);c("Event").listen(k,"click",this._onClick.bind(this));c("Event").listen(window,"resize",this._onWindowResize.bind(this));c("Toggler").subscribe(["show","hide"],function(l,m){__p&&__p();var n=m.getActive();if(!c("DOM").contains(k,n))return;if(c("CSS").hasClass(n,"fbNub")){this.notifyNub(n,l);if(l==="show")this._resizeNubFlyout(n)}else{var o=c("Parent").byClass(n,"fbNubFlyout");if(o)c("CSS").conditionClass(o,"menuOpened",l==="show")}}.bind(this));this.inform("init",{},c("Arbiter").BEHAVIOR_PERSISTENT)},calculateViewportDimensions:function j(){return this.viewportDimensions=c("Vector").getViewportDimensions()},getFlyoutHeightOffset:function j(){if(this.flyoutHeightOffset)return this.flyoutHeightOffset;this.flyoutHeightOffset=this.INITIAL_FLYOUT_HEIGHT_OFFSET+c("Vector").getElementDimensions(this.rootEl).y;var k=c("BlueBar").getBar();if(k){var l=c("Style").isFixed(k)?"viewport":"document";this.flyoutHeightOffset+=c("Vector").getElementPosition(k,l).y+c("Vector").getElementDimensions(k).y}return this.flyoutHeightOffset},toggle:function j(k){var l=this._findFlyout(k);if(!l)return;this.subscribe("init",function(){c("Toggler").toggle(k)})},show:function j(k){this.subscribe("init",function(){c("Toggler").show(k)})},showNub:function j(k){c("CSS").show(k)},hide:function j(k){this.subscribe("init",function(){var l=c("Toggler").getInstance(k);c("DOM").contains(k,l.getActive())&&l.hide()})},hideNub:function j(k){c("CSS").hide(k);this.hide(k)},setUseMaxHeight:function j(k,l){c("CSS").conditionClass(k,"maxHeight",l!==false);this._resizeNubFlyout(k)},_resizeNubFlyout:function j(k){__p&&__p();var l=this._findFlyout(k);if(!l||c("CSS").hasClass(k,"placeholder")||!(c("CSS").hasClass(k,"openToggler")||c("CSS").hasClass(k,"opened")))return;var m=c("DOM").find(l,"div.fbNubFlyoutOuter"),n=c("DOM").find(m,"div.fbNubFlyoutInner"),o=c("DOM").find(n,"div.fbNubFlyoutBody"),p=c("CSS").hasClass(k,"canBeCompactTab"),q=c("Scroll").getTop(o),r=o.offsetHeight;c("Style").set(o,"height","auto");var s=c("Vector").getElementDimensions(l),t=c("Vector").getElementDimensions(o),u=this.getMaxFlyoutHeight(k);c("Style").set(l,"max-height",u+"px");c("Style").set(m,"max-height",u+"px");s=c("Vector").getElementDimensions(l);var v=c("Vector").getElementDimensions(n),w=v.y-t.y,x=s.y-w,y=parseInt(o.style.height||o.clientHeight,10),z=x!==y;if(s.y>w&&z&&!p)c("Style").set(o,"height",x+"px");c("CSS").removeClass(l,"swapDirection");var A=c("Vector").getElementPosition(l).x;c("CSS").conditionClass(l,"swapDirection",function(){if(A<0)return true;if(!s||!this.viewportDimensions)return false;return A+s.x>this.viewportDimensions.x}.bind(this)());if(z&&q+r>=t.y)c("Scroll").setTop(o,o.scrollHeight);else c("Scroll").setTop(o,q);this.notifyNub(k,"resize")},getMaxFlyoutHeight:function j(k){var l=this._findFlyout(k),m=c("Vector").getElementPosition(l,"viewport"),n=c("Vector").getElementDimensions(l);if(!this.viewportDimensions||!m)return 0;var o=Math.max(this.MIN_HEIGHT,this.viewportDimensions.y-this.getFlyoutHeightOffset())-(this.viewportDimensions.y-m.y-n.y);return Math.max(o,0)},resizeAllFlyouts:function j(){var k=this._getAllNubs(),l=k.length;while(l--)this._resizeNubFlyout(k[l])},_getAllNubs:function j(){var k=c("DOM").scry(this.rootEl,"div._50-v.openToggler:not(._s0f)");return k.concat(c("DOM").scry(this.rootEl,"div._50-v.opened:not(._s0f)"))},_onClick:function j(event){__p&&__p();var k=event.getTarget(),l=c("Parent").byClass(k,"fbNub");if(l){if(c("Parent").byClass(k,"fbNubFlyoutTitlebar")){var m=c("Parent").byTag(k,"a"),n=k.nodeName=="INPUT"&&k.getAttribute("type")=="submit";if(!m&&!n){this.hide(l);return false}}this.notifyNub(l,"click")}},_onWindowResize:function j(event){this.calculateViewportDimensions();this.resizeAllFlyouts()},_findFlyout:function j(k){return c("CSS").hasClass(k,"fbNubFlyout")?k:c("DOM").scry(k,"div.fbNubFlyout")[0]||null},registerNubController:function j(k,l){c("DataStore").set(k,"dock:nub:controller",l);l.subscribe("nub/button/content-changed",c("shield")(this.inform,this,"resize",k));l.subscribe("nub/flyout/content-changed",c("shield")(this._resizeNubFlyout,this,k))},unregisterNubController:function j(k){c("DataStore").remove(k,"dock:nub:controller")},notifyNub:function j(k,l,m){var n=c("DataStore").get(k,"dock:nub:controller");n&&n.inform(l,m)}});f.exports=b.Dock||i}),null);
__d("DockTabsViewportFantaTabUtils",[],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h=269;function i(){return h+1}function j(m){return Math.floor(m/h)}function k(m){if(!m)return null;var n=m.fantaTabModelStateGetter;return n?n():null}function l(m){return m?m.size:0}f.exports={getTabCountToFitWidth:j,getMinRequiredWidthForFirstFantaTab:i,getFantaTabModelFromCallbacks:k,getNumFantaTabsFromModel:l}}),null);
__d("DockTabsViewportPinnedConversationTabUtils",[],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h=496+9+2,i=210+9+2,j=52;function k(){return h}function l(){return i}function m(){return j}function n(r){return r.getIsRaised()?k():l()}function o(){return k()+j}function p(r){var s=r||{},t=s.pinnedConvoTabStateGetter;return t?t():null}function q(r){return r?r.getTotalTabCount():0}f.exports={getRaisedPinnedConvoTabWidth:k,getLoweredPinnedConvoTabWidth:l,getPinnedConvoSelectorWidth:m,getPinnedConvoTabWidth:n,getMinRequiredWidthForFirstConvoTab:o,getPinnedConvoTabsStateFromCallbacks:p,getNumPinnedConvoTabsFromModel:q}}),null);
__d("DockTabsViewportCalculator",["csx","Arbiter","DataStore","Dock","DockTabsViewportFantaTabUtils","DockTabsViewportPinnedConversationTabUtils","DOM","Event","FullScreen","SubscriptionsHandler","Vector","ViewportBounds","ge","getViewportDimensions","setImmediate"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i=50,j=35,k=j,l="dock-tab-viewport-inst",m=c("DockTabsViewportFantaTabUtils").getMinRequiredWidthForFirstFantaTab,n=c("DockTabsViewportFantaTabUtils").getFantaTabModelFromCallbacks,o=c("DockTabsViewportFantaTabUtils").getNumFantaTabsFromModel,p=c("DockTabsViewportPinnedConversationTabUtils").getMinRequiredWidthForFirstConvoTab,q=c("DockTabsViewportPinnedConversationTabUtils").getNumPinnedConvoTabsFromModel,r=c("DockTabsViewportPinnedConversationTabUtils").getPinnedConvoTabsStateFromCallbacks;function s(u){return u?c("Vector").getElementDimensions(u).x:0}function t(u){__p&&__p();this.$DockTabsViewportCalculatorImpl1=u;this.$DockTabsViewportCalculatorImpl3=0;this.$DockTabsViewportCalculatorImpl4=0;this.$DockTabsViewportCalculatorImpl5=null;this.$DockTabsViewportCalculatorImpl6=null;this.$DockTabsViewportCalculatorImpl7=false;this.$DockTabsViewportCalculatorImpl8=false;this.$DockTabsViewportCalculatorImpl9=false;this.$DockTabsViewportCalculatorImpl2=new(c("SubscriptionsHandler"))();this.$DockTabsViewportCalculatorImpl10();this.$DockTabsViewportCalculatorImpl11()}t.prototype.$DockTabsViewportCalculatorImpl10=function(){__p&&__p();var u=this.$DockTabsViewportCalculatorImpl12.bind(this);this.$DockTabsViewportCalculatorImpl2.addSubscriptions(c("Event").listen(window,"resize",u),c("Dock").subscribe("resize",u),c("Arbiter").subscribeOnce("sidebar/initialized",u,c("Arbiter").SUBSCRIBE_NEW),c("FullScreen").subscribe("changed",function(){__p&&__p();if(c("FullScreen").isFullScreen()){this.$DockTabsViewportCalculatorImpl7=true;this.$DockTabsViewportCalculatorImpl8=false}else{this.$DockTabsViewportCalculatorImpl7=false;if(this.$DockTabsViewportCalculatorImpl8){c("setImmediate")(function(){u()});this.$DockTabsViewportCalculatorImpl8=false}}}.bind(this)))};t.prototype.registerFantaTabCallbacks=function(u){this.$DockTabsViewportCalculatorImpl5=u};t.prototype.registerPinnedConvoTabCallbacks=function(u){this.$DockTabsViewportCalculatorImpl6=u};t.prototype.forceRecalculateFBDockWidth=function(){this.$DockTabsViewportCalculatorImpl11();this.$DockTabsViewportCalculatorImpl13({forceRecalculateChatTabs:false,pinnedConvoUpdateData:null})};t.prototype.forceRecalculateChatTabs=function(){this.$DockTabsViewportCalculatorImpl13({forceRecalculateChatTabs:true,pinnedConvoUpdateData:null})};t.prototype.forceRecalculatePinnedConvoTabs=function(u){this.$DockTabsViewportCalculatorImpl13({forceRecalculateChatTabs:true,pinnedConvoUpdateData:u})};t.prototype.$DockTabsViewportCalculatorImpl12=function(){if(c("FullScreen").isFullScreen()||this.$DockTabsViewportCalculatorImpl7){this.$DockTabsViewportCalculatorImpl8=true;return}this.forceRecalculateFBDockWidth()};t.prototype.$DockTabsViewportCalculatorImpl13=function(u){var v=u.forceRecalculateChatTabs,w=u.pinnedConvoUpdateData,x=this.$DockTabsViewportCalculatorImpl14(),y=x.chatTabAvailableWidth,z=x.pinnedConvoTabAvailableWidth;this.$DockTabsViewportCalculatorImpl15(y,!!v);this.$DockTabsViewportCalculatorImpl16(z,w)};t.prototype.$DockTabsViewportCalculatorImpl16=function(u,v){var w=this.$DockTabsViewportCalculatorImpl6||{},x=w.onAvailableWidthChanged;x&&x(u,v)};t.prototype.$DockTabsViewportCalculatorImpl15=function(u,v){var w=this.$DockTabsViewportCalculatorImpl5||{},x=w.onAvailableWidthChanged;x&&x(u)};t.prototype.$DockTabsViewportCalculatorImpl17=function(){var u=n(this.$DockTabsViewportCalculatorImpl5);return o(u)};t.prototype.$DockTabsViewportCalculatorImpl18=function(){return m()};t.prototype.$DockTabsViewportCalculatorImpl14=function(){__p&&__p();var u=this.$DockTabsViewportCalculatorImpl3,v={chatTabAvailableWidth:u,pinnedConvoTabAvailableWidth:0},w={chatTabAvailableWidth:0,pinnedConvoTabAvailableWidth:u},x=this.$DockTabsViewportCalculatorImpl17(),y=r(this.$DockTabsViewportCalculatorImpl6),z=q(y);if(!y||z===0)return v;else if(x===0)return w;var A=this.$DockTabsViewportCalculatorImpl18();if(u<=A)return v;var B=p(),C=u-A,D=0;if(C<B)return v;else D=B;var E=D,F=Math.max(A,u-D);return{chatTabAvailableWidth:F,pinnedConvoTabAvailableWidth:E}};t.prototype.$DockTabsViewportCalculatorImpl11=function(){this.$DockTabsViewportCalculatorImpl3=this.$DockTabsViewportCalculatorImpl19();this.$DockTabsViewportCalculatorImpl20("DockTabsViewportCalculator/recalcTotalDock_FOR_TEST_ONLY")};t.prototype.$DockTabsViewportCalculatorImpl21=function(){var u=this.$DockTabsViewportCalculatorImpl1;if(!u)return{buddyListNubWidth:0,employeeNubsWidth:0};var v=s(u),w=s(c("DOM").find(u,"._56ox")),x=s(c("DOM").scry(u,"._56oy")[0]),y=s(c("DOM").scry(u,"._ph1")[0]),z=Math.max(v-w-x-y,0);return{buddyListNubWidth:w,employeeNubsWidth:z}};t.prototype.$DockTabsViewportCalculatorImpl19=function(){var u=c("getViewportDimensions").withoutScrollbars().width;u-=c("ViewportBounds").getLeft()+c("ViewportBounds").getRight();u-=i;var v=this.$DockTabsViewportCalculatorImpl21(),w=v.buddyListNubWidth,x=v.employeeNubsWidth;u-=w;this.$DockTabsViewportCalculatorImpl4=Math.max(this.$DockTabsViewportCalculatorImpl4,x);u-=this.$DockTabsViewportCalculatorImpl4;u-=k;return Math.max(u,0)};t.prototype.enableTestInforms_FOR_TEST_ONLY=function(){this.$DockTabsViewportCalculatorImpl9=true};t.prototype.$DockTabsViewportCalculatorImpl20=function(u){if(this.$DockTabsViewportCalculatorImpl9)c("Arbiter").inform(u)};t.prototype.getChatTabAvailableDockWidth_FOR_TEST_ONLY=function(){return this.$DockTabsViewportCalculatorImpl14().chatTabAvailableWidth};t.prototype.getPinnedConvoTabAvailableDockWidth_FOR_TEST_ONLY=function(){return this.$DockTabsViewportCalculatorImpl14().pinnedConvoTabAvailableWidth};t.prototype.getAvailableTotalWidth_FOR_TEST_ONLY=function(){return this.$DockTabsViewportCalculatorImpl3};f.exports={getInstance:function u(v){__p&&__p();var w=c("ge")("pagelet_dock");if(!w||!c("DOM").contains(w,v))return null;var x=c("DataStore").get(w,l);if(x instanceof t)return x;var y=c("DOM").scry(w,".fbDockWrapperRight .fbDock")[0];x=new t(y);c("DataStore").set(w,l,x);return x}}}),null);
__d("ConversationNubViewportManager",["DockTabsViewportCalculator","DockTabsViewportPinnedConversationTabUtils"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h=c("DockTabsViewportPinnedConversationTabUtils").getMinRequiredWidthForFirstConvoTab;function i(j,k,l){this.$ConversationNubViewportManager1=j;this.$ConversationNubViewportManager3=k;this.$ConversationNubViewportManager2=c("DockTabsViewportCalculator").getInstance(this.$ConversationNubViewportManager1);this.$ConversationNubViewportManager2&&this.$ConversationNubViewportManager2.registerPinnedConvoTabCallbacks(babelHelpers["extends"]({},l,{pinnedConvoTabStateGetter:function(){return this.$ConversationNubViewportManager3}.bind(this)}))}i.prototype.getNumDockTabsToShow=function(j){return this.getCouldFitAtLeastOneDockTab(j)?1:0};i.prototype.getCouldFitAtLeastOneDockTab=function(j){var k=h();return k<=j};i.prototype.forceRecalculatePinnedConvoTabs=function(j){this.$ConversationNubViewportManager2&&this.$ConversationNubViewportManager2.forceRecalculatePinnedConvoTabs(j)};f.exports=i}),null);
__d("ConversationNubVisibilityDedupeUtils",["Bootloader","emptyFunction","ifRequired"],(function a(b,c,d,e,f,g){"use strict";function h(j){c("Bootloader").loadModules(["UFICommentVisibilityStore"],j,"ConversationNubVisibilityDedupeUtils")}function i(j){return c("ifRequired")("UFICommentVisibilityStore",function(k){return k.isFeedbackTargetVisible(j)},c("emptyFunction").thatReturnsFalse)}f.exports={bootloadUFIVisibilityModule:h,isFeedbackTargetVisible:i}}),null);
__d("XNotificationNubStoryController",["XController"],(function a(b,c,d,e,f,g){f.exports=c("XController").create("/conversation/nub_story/",{notif_alert_id:{type:"String"},notif_id:{type:"Int"},ft_id:{type:"String"},force_minimized:{type:"Bool",defaultValue:false}})}),null);
__d("NotificationConversationController",["csx","cx","Arbiter","AsyncRequest","Bootloader","ConversationNub","ConversationNubActionTakenReporter","ConversationNubPermalinkUtils","ConversationNubTabState","ConversationNubTabsUpdateEventController","ConversationNubUtils","ConversationNubViewportManager","ConversationNubVisibilityDedupeUtils","CSS","DOM","PinnedConversationNubsConfig","SubscriptionsHandler","URI","XNotificationNubStoryController","ge","ifRequired","nullthrows"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j=c("ConversationNubVisibilityDedupeUtils").isFeedbackTargetVisible,k=1,l=c("ConversationNubTabState"),m=Object.create(null),n=null,o=null,p=null,q=null,r=null,s=null,t=false,u=null,v=null,w=null,x=null,y=Object.create(null);function z(){if(!o)o=c("DOM").scry(c("ge")("pagelet_dock"),"._1mw-")[0];return o}function A(){if(!p){var D=z();if(D)p=c("DOM").scry(D,"._1tvj")[0]}return p}function B(){if(!q){var D=z();if(D)q=c("DOM").scry(D,"._2ikx .fbNubButton")[0]}return q}C.prototype.init=function(){__p&&__p();if(t)return;t=true;var D=new(c("SubscriptionsHandler"))();D.addSubscriptions(c("ConversationNubTabsUpdateEventController").subscribeToTabsUpdated(this.$NotificationConversationController2.bind(this)),c("Arbiter").subscribe(c("ConversationNubUtils").CLOSE_TAB_EVENT,function(E,F){var G=F||{},H=G.tabID;if(H)this.$NotificationConversationController3(H)}.bind(this)));this.$NotificationConversationController1=new(c("ConversationNubActionTakenReporter"))();u=D};C.prototype.$NotificationConversationController4=function(D){var E=n?n.getNumDockTabsToShow(D):k;l.setMaxDockTabs(E)};C.prototype.$NotificationConversationController5=function(D,E){this.$NotificationConversationController4(D);if(E){var F=E.tabToPromote,G=E.tabToOpenIfInDock;if(F&&!l.isTabInDock(F.getTabID()))l.moveTabToDockLeft(F.getTabID());if(c("ConversationNubUtils").allowProgrammaticPopOut()&&G&&l.isTabInDock(G.getTabID()))G.popOut()}this.$NotificationConversationController6(D)};C.prototype.$NotificationConversationController2=function(D){n&&n.forceRecalculatePinnedConvoTabs(D)};C.prototype.$NotificationConversationController6=function(D){__p&&__p();var E=l.getTotalTabCount(),F=l.getNumDockTabs(),G=n?n.getCouldFitAtLeastOneDockTab(D):false,H=E>0&&G,I=F<E&&H,J=z();if(J){c("CSS").conditionClass(J,"_1tvf",H);c("CSS").conditionClass(J,"_1dex",I);c("CSS").conditionClass(J,"_1tvi",I)}var K=c("PinnedConversationNubsConfig").pinnedToLeft?l.getTabsForDockOldestFirst():l.getTabsForDockNewestFirst();K.forEach(function(M){if(M.getIsRaised())M.clearBadge()});var L=l.getTabsForMenuNewestFirst();this.$NotificationConversationController7(K);this.$NotificationConversationController8(L)};C.prototype.handleNotificationsRead=function(D){__p&&__p();this.init();l.getUnsortedLoadedTabs().forEach(function(F){var G=F.getNotificationPayloadAlertID();if(G&&D[G])F.clearBadge()});l.getUnloadedTabs().forEach(function(F){if(F.notifAlertID&&D[F.notifAlertID])l.clearTabNotifications(F.tabID)});var E=l.getTabsForMenuNewestFirst();this.$NotificationConversationController8(E)};C.prototype.handleNewNotificationFromGraphQL=function(D,E){this.init();var F=c("nullthrows")(D),G=F.tab_id,H=F.notification,I=F.feedback_target_id,J=F.permalink_uri,K=c("nullthrows")(H),L=K.notif_id,M=K.alert_id,N=K.notif_type;this.$NotificationConversationController9(c("nullthrows")(G),c("nullthrows")(L),c("nullthrows")(I),c("nullthrows")(M),J?new(c("URI"))(J):null,E,N)};C.prototype.handleNewNotificationsFromChannel=function(D,E){this.init();D.forEach(function(F){var G=F.alert_id,H=F.pinnedConvoConfig,I=F.tracking,J=F.notif_type;if(!H)return;var K=H.tab_id,L=H.ft_id,M=H.permalink_uri,N=JSON.parse(I),O=M?new(c("URI"))(M):null;this.$NotificationConversationController9(K,N.alert_id,L,G,O,E,J)}.bind(this))};C.prototype.$NotificationConversationController9=function(D,E,F,G,H,I,J){var K=c("XNotificationNubStoryController").getURIBuilder().setString("notif_alert_id",G).setInt("notif_id",E);this.$NotificationConversationController10(F,I);this.$NotificationConversationController11(D,F,J,H,K)};C.prototype.$NotificationConversationController10=function(D,E){if(!y[D])y[D]=E};C.prototype.$NotificationConversationController11=function(D,E,F,G,H){__p&&__p();if(m[D])return;var I=l.getLoadedTab(D);if(I){if(F)I.setNotificationType(F);return}if(c("ConversationNubPermalinkUtils").isOnPermalink(G)||j(E))H.setBool("force_minimized",true);m[D]=true;new(c("AsyncRequest"))().setURI(H.getURI()).setAllowCrossPageTransition(true).setFinallyHandler(function(){delete m[D]}).send()};C.prototype.$NotificationConversationController12=function(D){__p&&__p();var E=true;l.getUnsortedLoadedTabs().forEach(function(F){__p&&__p();var G=F.getFeedbackTargetID(),H=D[G],I=H?Object.keys(H):[];if(I.length){var J=F.getBadgeCount();if(j(G)){F.markCommentsAsSeenWithoutBadging(I);F.clearBadge()}else F.attemptAddNewCommentsToBadge(I);var K=F.getBadgeCount();if(J!==K)E=true}});if(E)c("ConversationNubTabsUpdateEventController").informTabsUpdated()};C.prototype.$NotificationConversationController13=function(D){if(x)return;c("Bootloader").loadModules(["ConversationNubSurveys"],function(E){if(!x)x=new E(D)},"NotificationConversationController")};C.prototype.$NotificationConversationController14=function(D,E,F){__p&&__p();if(w){w.addTab(D,F);delete y[D.getPersistentState().ftID];return}c("Bootloader").loadModules(["ConversationNubLogger"],function(G){if(!w)w=new G(E);w.addTab(D,F);delete y[D.getPersistentState().ftID]},"NotificationConversationController")};C.prototype.$NotificationConversationController15=function(){if(v)return;c("Bootloader").loadModules(["ConversationNubUFICentralUpdateManager"],function(D){if(v)return;v=new D(this.$NotificationConversationController12.bind(this))}.bind(this),"NotificationConversationController")};C.prototype.$NotificationConversationController7=function(D){var E=A();if(!E)return;c("Bootloader").loadModules(["React","ReactDOM","ConversationNubDockedTabGroup.react"],function(F,G,H){s=G.render(F.createElement(H,{dockTabs:D}),E)},"NotificationConversationController")};C.prototype.$NotificationConversationController16=function(D){D.popOut();c("ConversationNubTabsUpdateEventController").informTabsUpdated({tabToPromote:D})};C.prototype.$NotificationConversationController8=function(D){var E=B();if(!E)return;c("Bootloader").loadModules(["React","ReactDOM","ConversationNubCollapsedSelectorMenu.react"],function(F,G,H){r=G.render(F.createElement(H,{menuTabs:D,onTabSelected:this.$NotificationConversationController16}),E)}.bind(this),"NotificationConversationController")};C.prototype.$NotificationConversationController17=function(){if(!n){var D=z();if(D){var E={onAvailableWidthChanged:this.$NotificationConversationController5.bind(this)};n=new(c("ConversationNubViewportManager"))(D,l,E)}}};C.prototype.storyFromServer=function(D,E){__p&&__p();if(!t)this.init();var F=E.attempt_open_on_init,G=E.ft_id,H=E.init_without_badge,I=E.notif_alert_id,J=E.notification_type,K=E.permalink_uri,L=E.promote_on_init,M=E.tab_add_source,N=E.tab_id,O=E.title,P=E.should_show_intro_nux,Q=E.should_show_hide_nux,R=E.page_id,S=l.getLoadedTab(N);if(S){if(L||F)c("ConversationNubTabsUpdateEventController").informTabsUpdated({tabToPromote:L?S:null,tabToOpenIfInDock:F?S:null});return}H=H||j(G);var T=l.getTabStateIfExists(N);if(T)H=null;else{var U=c("ConversationNub").createDefaultState(N,K,G,I,J,O);l.addTabState(U)}var V=new(c("ConversationNub"))(D,N,H,R,Boolean(P),Boolean(Q));l.addLoadedTab(N,V);F=F||V.getPersistentState().isTabRaised;this.$NotificationConversationController15();this.$NotificationConversationController17();c("ConversationNubTabsUpdateEventController").informTabsUpdated({tabToPromote:L?V:null,tabToOpenIfInDock:F?V:null});this.$NotificationConversationController13(l);var W=y[G]||M||"unknown";this.$NotificationConversationController14(V,l,W)};C.prototype.deleteAllTabs=function(){l.deleteAllTabs();c("ConversationNubTabsUpdateEventController").informTabsUpdated()};C.prototype.$NotificationConversationController3=function(D){var E=l.deleteTab(D);if(E)c("ConversationNubTabsUpdateEventController").informTabsUpdated()};C.prototype.unsubscribe=function(){__p&&__p();u&&u.release();u=null;w&&w.destroy();w=null;x&&x.destroy();x=null;v&&v.destroy();v=null;this.$NotificationConversationController1.destroy();c("ifRequired")("ReactDOM",function(D){var E=B();if(r&&E)D.unmountComponentAtNode(E);var F=A();if(s&&F)D.unmountComponentAtNode(F)})};function C(){}f.exports=new C()}),null);
__d("MenuSeparator.react",["MenuSeparator"],(function a(b,c,d,e,f,g){function h(j){j.isReactLegacyFactory={};j.type=j}var i=c("MenuSeparator");h(i);f.exports=i}),null);
__d("XChatEmojiSettingsController",["XController"],(function a(b,c,d,e,f,g){f.exports=c("XController").create("/chat/emoji_settings/",{__asyncDialog:{type:"Int"}})}),null);
__d("ChatSidebarDropdown.react",["cx","fbt","AppsDivebarDisplayController","Arbiter","AsyncRequest","ChatConfig","ChatOptions","ChatSidebarBotsActions","ChatSidebarBotsStore","ChatSidebarDropdownConstants","ChatVisibility","ContextualDialogArrow","ContextualLayerAutoFlip","ConversationNubUtils","CurrentUser","FantaTabActions","FBRTCCallBlockingStore","FBRTCSupport","LayerHideOnBlur","Link.react","LogHistory","MenuSeparator.react","PinnedConversationNubsConfig","PopoverMenu.react","PresencePrivacy","PresenceState","React","ReactXUIMenu","SidebarType","SubscriptionsHandler","TrackingNodes","URI","XChatEmojiSettingsController","emptyFunction","ge","gkx","joinClasses"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j,k,l=c("ChatSidebarBotsActions").module,m=c("ChatSidebarBotsStore").module,n=c("ReactXUIMenu").SelectableItem,o=c("ReactXUIMenu").SelectableMenu,p=c("ReactXUIMenu").Item,q=c("React").PropTypes,r=c("LogHistory").getInstance("blackbird");j=babelHelpers.inherits(s,c("React").PureComponent);k=j&&j.prototype;function s(){var t,u;for(var v=arguments.length,w=Array(v),x=0;x<v;x++)w[x]=arguments[x];return u=(t=k.constructor).call.apply(t,[this].concat(w)),this.$ChatSidebarDropdown6=function(y,z){var A=z.item.getValue(),B=z.item.isSelected&&z.item.isSelected();this.$ChatSidebarDropdown5(A,!!B)}.bind(this),this.state={appsVisible:c("AppsDivebarDisplayController").isVisible(),isConversationsEnabled:c("PinnedConversationNubsConfig").isEnabled,isDiscoverBotsHidden:m?m.getState().isHidden:true,isOnline:c("ChatVisibility").isOnline(),isTickerVisible:this.$ChatSidebarDropdown2(),isCallBlocked:c("FBRTCCallBlockingStore").getBlockingStatus(),pendingChange:false},u}s.prototype.componentDidMount=function(){__p&&__p();this.$ChatSidebarDropdown1=new(c("SubscriptionsHandler"))();this.$ChatSidebarDropdown1.addSubscriptions(c("Arbiter").subscribe(["Ticker/resized","ticker/show"],function(){this.setState({isTickerVisible:this.$ChatSidebarDropdown2()})}.bind(this)),c("Arbiter").subscribe(["AppsDivebar/show-apps","AppsDivebar/hide-apps"],function(){this.setState({appsVisible:c("AppsDivebarDisplayController").isVisible()})}.bind(this)),c("PresencePrivacy").subscribe("privacy-user-presence-changed",function(){this.setState({isOnline:c("ChatVisibility").isOnline()})}.bind(this)),c("Arbiter").subscribe("buddylist/hide",function(){this.refs.menu.hidePopover()}.bind(this)),c("Arbiter").subscribe("sidebar/visibility",function(t,u){if(!u)this.refs.menu.hidePopover()}.bind(this)),c("FBRTCCallBlockingStore").addListener(function(){this.setState({isCallBlocked:c("FBRTCCallBlockingStore").getBlockingStatus()})}.bind(this)));if(m)this.$ChatSidebarDropdown1.addSubscriptions(m.addListener(function(){this.setState({isDiscoverBotsHidden:m.getState().isHidden})}.bind(this)));if(c("PinnedConversationNubsConfig").userSettingsIsEnabled)this.$ChatSidebarDropdown1.addSubscriptions(c("Arbiter").subscribe(c("ConversationNubUtils").TURN_CONVERSATIONS_OFF_EVENT,function(){this.setState({isConversationsEnabled:false})}.bind(this)),c("Arbiter").subscribe(c("ConversationNubUtils").TURN_CONVERSATIONS_ON_EVENT,function(){this.setState({isConversationsEnabled:true})}.bind(this)))};s.prototype.componentWillUnmount=function(){this.$ChatSidebarDropdown1&&this.$ChatSidebarDropdown1.release()};s.prototype.$ChatSidebarDropdown2=function(){var t=c("ge")("pagelet_ticker");return!!(t&&t.offsetHeight!==0)};s.prototype.$ChatSidebarDropdown3=function(t,u){var v=u?"sidebar_dropdown_visibility_error":"sidebar_dropdown_set_visibility";r.debug(v,JSON.stringify({action:t}))};s.prototype.$ChatSidebarDropdown4=function(t,u){if(this.state.pendingChange)return;this.setState({pendingChange:true});var v={};v[t]=!u;c("ChatOptions").setSetting(t,!u,"mini_sidebar_menu");new(c("AsyncRequest"))("/ajax/chat/settings.php").setHandler(c("PresenceState").doSync).setErrorHandler(function(){return c("ChatOptions").setSetting(t,u,"mini_sidebar_menu_error")}).setFinallyHandler(function(){return this.setState({pendingChange:false})}.bind(this)).setData(v).setAllowCrossPageTransition(true).send()};s.prototype.$ChatSidebarDropdown5=function(t,u){__p&&__p();var v=true;switch(t){case c("ChatSidebarDropdownConstants").SOUND:this.$ChatSidebarDropdown4(t,u);break;case c("ChatSidebarDropdownConstants").ADVANCED_SETTINGS:case c("ChatSidebarDropdownConstants").TURN_OFF_DIALOG:this.$ChatSidebarDropdown3(t,false);break;case c("ChatSidebarDropdownConstants").LOWER_ALL_TABS:c("FantaTabActions").minimizeAllTabs();break;case c("ChatSidebarDropdownConstants").CLOSE_ALL_TABS:c("FantaTabActions").closeAllTabs();this.$ChatSidebarDropdown3(t,false);break;case c("ChatSidebarDropdownConstants").HIDE_GROUPS:this.$ChatSidebarDropdown4(t,u);break;case c("ChatSidebarDropdownConstants").TOGGLE_DISCOVER_BOTS:if(l)l.saveSettings({isHidden:!this.state.isDiscoverBotsHidden});break;case c("ChatSidebarDropdownConstants").SIDEBAR:this.props.onToggleSidebar();v=false;break;case c("ChatSidebarDropdownConstants").ONLINE:!this.state.isOnline?c("ChatVisibility").goOnline():this.$ChatSidebarDropdown3(t,true);break;case c("ChatSidebarDropdownConstants").VIDEOCALL_ON:c("FBRTCCallBlockingStore").turnOnVideoCalling();break;case c("ChatSidebarDropdownConstants").VIDEOCALL_OFF:break;case c("ChatSidebarDropdownConstants").PAUSE:break;case c("ChatSidebarDropdownConstants").SHOW_TICKER:c("Arbiter").inform("ChatSidebarDropdown/openTicker");break;case c("ChatSidebarDropdownConstants").HIDE_TICKER:c("Arbiter").inform("ChatSidebarDropdown/closeTicker");break;case c("ConversationNubUtils").TURN_CONVERSATIONS_OFF_EVENT:c("ConversationNubUtils").turnConversationsOff();break;case c("ConversationNubUtils").TURN_CONVERSATIONS_ON_EVENT:c("ConversationNubUtils").turnConversationsOn();break;case c("ChatSidebarDropdownConstants").SHOW_APPS:c("AppsDivebarDisplayController").showApps();break;case c("ChatSidebarDropdownConstants").HIDE_APPS:c("AppsDivebarDisplayController").hideApps();break;case c("ChatSidebarDropdownConstants").HIDE_ADMINED_PAGES:this.$ChatSidebarDropdown4(t,u);break;case c("ChatSidebarDropdownConstants").HIDE_BUSINESSES:this.$ChatSidebarDropdown4(t,u);break}if(v&&this.refs.menu)this.refs.menu.hidePopover()};s.prototype.$ChatSidebarDropdown7=function(){return c("React").createElement(n,{value:c("ChatSidebarDropdownConstants").SOUND,selected:c("ChatOptions").getSetting(c("ChatSidebarDropdownConstants").SOUND)},i._("Chat Sounds"))};s.prototype.$ChatSidebarDropdown8=function(){var t=c("XChatEmojiSettingsController").getURIBuilder().getURI();return c("React").createElement(p,{href:t,rel:"dialog",value:c("ChatSidebarDropdownConstants").EMOJI_SETTINGS},i._("Emoji"))};s.prototype.$ChatSidebarDropdown9=function(){if(c("CurrentUser").isWorkUser())return null;return c("React").createElement(p,{href:new(c("URI"))("/settings?tab=blocking"),value:c("ChatSidebarDropdownConstants").BLOCK_SETTINGS},i._("Block Settings"))};s.prototype.$ChatSidebarDropdown10=function(){return c("React").createElement(p,{href:new(c("URI"))("/ajax/chat/privacy/settings_dialog.php"),rel:"dialog",value:c("ChatSidebarDropdownConstants").ADVANCED_SETTINGS},i._("Advanced Settings..."))};s.prototype.$ChatSidebarDropdown11=function(){return c("React").createElement(p,{value:c("ChatSidebarDropdownConstants").LOWER_ALL_TABS},i._("Collapse All Chat Tabs"))};s.prototype.$ChatSidebarDropdown12=function(){return c("React").createElement(p,{value:c("ChatSidebarDropdownConstants").CLOSE_ALL_TABS},i._("Close All Chat Tabs"))};s.prototype.$ChatSidebarDropdown13=function(){return c("React").createElement(p,{className:"_4kqp",value:c("ChatSidebarDropdownConstants").SIDEBAR},i._("Hide Sidebar"))};s.prototype.$ChatSidebarDropdown14=function(){if(this.props.sidebarType===c("SidebarType").BUDDYLIST_NUB||!c("ChatConfig").get("show_admined_pages"))return null;return c("React").createElement(n,{className:"_4kqp",value:c("ChatSidebarDropdownConstants").HIDE_ADMINED_PAGES,selected:c("ChatOptions").getSetting(c("ChatSidebarDropdownConstants").HIDE_ADMINED_PAGES)},i._("Hide Pages You Manage"))};s.prototype.$ChatSidebarDropdown15=function(){if(this.props.sidebarType===c("SidebarType").BUDDYLIST_NUB||!c("ChatConfig").get("show_businesses"))return null;return c("React").createElement(n,{className:"_4kqp",value:c("ChatSidebarDropdownConstants").HIDE_BUSINESSES,selected:c("ChatOptions").getSetting(c("ChatSidebarDropdownConstants").HIDE_BUSINESSES)},i._("Hide Pages to Contact"))};s.prototype.$ChatSidebarDropdown16=function(){if(this.props.sidebarType===c("SidebarType").BUDDYLIST_NUB)return null;return c("React").createElement(n,{value:c("ChatSidebarDropdownConstants").HIDE_GROUPS,selected:c("ChatOptions").getSetting(c("ChatSidebarDropdownConstants").HIDE_GROUPS)},i._("Hide Groups"))};s.prototype.$ChatSidebarDropdown17=function(){var t=c("ChatVisibility").isOnline(),u=t?new(c("URI"))("/ajax/chat/privacy/settings_dialog.php").addQueryData("dialog_type","turn_off_dialog"):"#",v="";if(c("gkx")("AT69r4Tjj4qkJ_vN9jQ6gElERSeEr7u62xiMa_cx47RRkJ105PHueucCfKn05FryjNTRlgeKhVV5K6cdO6mpY_4fixxY2c-NmAOkc0BTwRAPmw"))v=t?i._("Turn Off Chat (Advanced Settings)"):i._("Turn On Chat");else v=t?i._("Turn Off Chat"):i._("Turn On Chat");var w=t?c("ChatSidebarDropdownConstants").TURN_OFF_DIALOG:c("ChatSidebarDropdownConstants").ONLINE;return c("React").createElement(p,{href:u,rel:t?"dialog":"",value:w},v)};s.prototype.$ChatSidebarDropdown18=function(){if(!c("FBRTCSupport").isVideoCallBlockingSupported())return null;var t=this.state.isCallBlocked,u=t?"#":new(c("URI"))("/videocall/off/"),v=t?i._("Turn On Video\/Voice Calls"):i._("Turn Off Video\/Voice Calls"),w=t?c("ChatSidebarDropdownConstants").VIDEOCALL_ON:c("ChatSidebarDropdownConstants").VIDEOCALL_OFF;return c("React").createElement(p,{href:u,rel:t?"":"dialog",value:w},v)};s.prototype.$ChatSidebarDropdown19=function(){var t=m?m.getState().bots:[];if(!l||t.length===0)return null;var u=this.state.isDiscoverBotsHidden?i._("Show Bot Discovery"):i._("Hide Bot Discovery");return c("React").createElement(p,{value:c("ChatSidebarDropdownConstants").TOGGLE_DISCOVER_BOTS},u)};s.prototype.$ChatSidebarDropdown20=function(){if(!c("PinnedConversationNubsConfig").userSettingsIsEnabled)return null;var t=this.state.isConversationsEnabled,u=t?i._("Turn Off Post Tabs"):i._("Turn On Post Tabs"),v=t?c("ConversationNubUtils").TURN_CONVERSATIONS_OFF_EVENT:c("ConversationNubUtils").TURN_CONVERSATIONS_ON_EVENT;return c("React").createElement(p,{value:v},u)};s.prototype.$ChatSidebarDropdown21=function(){if(!c("ChatConfig").get("has_apps_option")||this.props.sidebarType!==c("SidebarType").SIDEBAR)return null;var t=this.state.appsVisible,u=t?i._("Hide Games"):i._("Show Games"),v=t?c("ChatSidebarDropdownConstants").HIDE_APPS:c("ChatSidebarDropdownConstants").SHOW_APPS;return[c("React").createElement(c("MenuSeparator.react"),{key:"apps_separator"}),c("React").createElement(p,{value:v,key:"apps_menu"},u)]};s.prototype.$ChatSidebarDropdown22=function(){if(!c("ChatConfig").get("has_ticker_toggle_option")||this.props.sidebarType!==c("SidebarType").SIDEBAR)return null;var t=this.state.isTickerVisible,u=t?i._("Hide Ticker"):i._("Show Ticker"),v=t?c("ChatSidebarDropdownConstants").HIDE_TICKER:c("ChatSidebarDropdownConstants").SHOW_TICKER;return[c("React").createElement(c("MenuSeparator.react"),{key:"ticker_separator"}),c("React").createElement(p,{value:v,key:"ticker_menu"},u)]};s.prototype.$ChatSidebarDropdown23=function(){return c("React").createElement(o,{className:"fbChatSidebarDropdown/PopoverMenu",multiple:true,onItemClick:this.$ChatSidebarDropdown6},this.$ChatSidebarDropdown7(),this.$ChatSidebarDropdown8(),this.$ChatSidebarDropdown9(),this.$ChatSidebarDropdown10(),c("React").createElement(c("MenuSeparator.react"),null),this.$ChatSidebarDropdown11(),this.$ChatSidebarDropdown12(),this.$ChatSidebarDropdown19(),this.$ChatSidebarDropdown13(),this.$ChatSidebarDropdown14(),this.$ChatSidebarDropdown15(),this.$ChatSidebarDropdown16(),this.$ChatSidebarDropdown17(),this.$ChatSidebarDropdown18(),this.$ChatSidebarDropdown20(),this.$ChatSidebarDropdown21(),this.$ChatSidebarDropdown22())};s.prototype.render=function(){var t=i._("Options"),u=c("joinClasses")(this.props.className,"_5qth _5vm9"+(!c("ChatVisibility").isOnline()?" _5vma":"")),v=c("TrackingNodes").getTrackingInfo(c("TrackingNodes").types.DROPDOWN_BUTTON);return c("React").createElement(c("PopoverMenu.react"),{alignh:"right",alignv:"top",className:u,layerBehaviors:[c("ContextualLayerAutoFlip"),c("ContextualDialogArrow"),c("LayerHideOnBlur")],menu:this.$ChatSidebarDropdown23(),onHide:this.props.onHide,onShow:this.props.onShow,ref:"menu"},c("React").createElement(c("Link.react"),{"aria-label":t,className:"_5vmb button","data-ft":v,"data-hover":"tooltip","data-tooltip-content":t,"data-tooltip-position":"below",href:"#"}))};s.propTypes={className:q.string,onHide:q.func,onShow:q.func,onToggleSidebar:q.func.isRequired,sidebarType:q.string.isRequired};s.defaultProps={className:"",onHide:c("emptyFunction"),onShow:c("emptyFunction")};f.exports=s}),null);
__d("ChatNotificationConstants",[],(function a(b,c,d,e,f,g){f.exports=Object.freeze({NORMAL:0,NO_USER_MESSAGE_NOTIFICATION:1})}),null);
__d("ChatBehavior",["Arbiter","AvailableList","AvailableListConstants","ChatNotificationConstants"],(function a(b,c,d,e,f,g){__p&&__p();var h=false,i=c("AvailableList").getWebChatNotification&&c("AvailableList").getWebChatNotification(),j=h,k=true,l=Object.assign(new(c("Arbiter"))(),{ON_CHANGED:"changed",notifiesUserMessages:function n(){return i!==c("ChatNotificationConstants").NO_USER_MESSAGE_NOTIFICATION},ignoresRemoteTabRaise:function n(){return j},showsTabUnreadUI:function n(){return k}});function m(){l.inform(l.ON_CHANGED)}c("AvailableList").subscribe&&c("AvailableList").subscribe(c("AvailableListConstants").ON_CHAT_NOTIFICATION_CHANGED,function(){var n=i,o=c("AvailableList").getWebChatNotification();i=o;if(n!=o)m()});c("Arbiter").subscribe("chat/set_does_page_occlude_tabs",function(n,o){j=!!o;m()});c("Arbiter").subscribe("chat/set_show_tab_unread_ui",function(n,o){k=!!o;m()});f.exports=l}),null);
__d("ChatSidebarSheetChatOffline.react",["fbt","Link.react","React"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i,j,k=c("React").PropTypes;i=babelHelpers.inherits(l,c("React").PureComponent);j=i&&i.prototype;l.prototype.render=function(){return c("React").createElement("div",null,h._("{=Go online} to see who's available.",[h.param("=Go online",c("React").createElement(c("Link.react"),{className:"fbChatGoOnlineLink",onClick:this.props.onGoOnlineClick},h._("Turn on chat")))]))};function l(){i.apply(this,arguments)}l.propTypes={onGoOnlineClick:k.func.isRequired};f.exports=l}),null);
__d("ImageReact.bs",["Image.react","ReasonReact.bs","bs_js_null_undefined"],(function a(b,c,d,e,f,g){"use strict";function h(i,j,k,l,m,n,o,p){return c("ReasonReact.bs").wrapJsForReason(c("Image.react"),{className:c("bs_js_null_undefined").from_opt(i),alt:c("bs_js_null_undefined").from_opt(j),src:c("bs_js_null_undefined").from_opt(k),height:c("bs_js_null_undefined").from_opt(l),title:c("bs_js_null_undefined").from_opt(m),width:c("bs_js_null_undefined").from_opt(n),style:c("bs_js_null_undefined").from_opt(o)},p)}g.make=h}),null);
__d("MessengerSpinnerReact.bs",["cx","ix","fbt","React","ImageReact.bs","ReasonReact.bs","joinClasses"],(function a(b,c,d,e,f,g,h,i,j){"use strict";__p&&__p();var k=i("86853"),l=i("86857"),m=i("86854"),n=c("ReasonReact.bs").statelessComponent("MessengerSpinnerReact");function o(s,t,u,v){__p&&__p();var w=s?s[0]:"",x=t?t[0]:"blue",y=u?u[0]:24,z=function z(){var B=+(y===24);if(B!==0){var C=+(x==="blue");if(C!==0)return k;else return l}else return m},A=n.slice();A[9]=function(){return c("React").cloneElement(c("ReasonReact.bs").element(0,0,c("ImageReact.bs").make([c("joinClasses")(w,"_3u55 _3qh2")],0,[z(0)],[y],0,[y],0,[])),{"aria-label":j._("Loading..."),"aria-busy":true})};return A}var p=c("ReasonReact.bs").wrapReasonForJs(n,function(s){var t=s.className,u=s.color,v=s.size;return o([t==null?"":t],[u==null?"blue":u],[v==null?24:v],[])}),q=32,r=24;g.large_size=q;g.medium_size=r;g.blue_src=k;g.grey_src=l;g.large_blue_src=m;g.component=n;g.make=o;g.jsComponent=p}),null);
__d("MessengerSpinner.react",["MessengerSpinnerReact.bs"],(function a(b,c,d,e,f,g){f.exports=c("MessengerSpinnerReact.bs").jsComponent;f.exports.large_size=c("MessengerSpinnerReact.bs").large_size;f.exports.medium_size=c("MessengerSpinnerReact.bs").medium_size}),null);
__d("ChatSidebarSheetChatReconnectMsg.react",["fbt","ChannelConstants","Link.react","MessengerSpinner.react","React"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i,j,k=c("React").PropTypes;i=babelHelpers.inherits(l,c("React").PureComponent);j=i&&i.prototype;l.prototype.render=function(){var m=this.props,n=m.isMessenger,o=m.msecs,p=c("React").createElement(c("Link.react"),{className:"fbChatReconnectLink",onClick:this.props.onManuallyConnectClick},h._("No Internet Connection"));if(o==null||false===navigator.onLine)return n?p:c("React").createElement("div",null,h._("Unable to connect to chat. Check your Internet connection."));else if(o>c("ChannelConstants").WARNING_COUNTDOWN_THRESHOLD_MSEC)return n?p:c("React").createElement("div",null,h._("Unable to connect to chat. {try-again-link}",[h.param("try-again-link",c("React").createElement(c("Link.react"),{className:"fbChatReconnectLink",onClick:this.props.onManuallyConnectClick},h._("Try again")))]));else if(o>1e3)return n?p:c("React").createElement("div",null,h._("Unable to connect to chat. Reconnecting in {seconds}",[h.param("seconds",Math.floor(o/1e3))]));else return n?c("React").createElement("div",null,c("React").createElement(c("MessengerSpinner.react"),{color:"grey"}),h._("Connecting...")):c("React").createElement("div",null,h._("Unable to connect to chat. Reconnecting..."))};function l(){i.apply(this,arguments)}l.propTypes={isMessenger:k.bool,msecs:k.number,onManuallyConnectClick:k.func};f.exports=l}),null);
__d("ChatSidebarSheetChatShutdownMsg.react",["fbt","ChannelConstants","CurrentUser","React"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i,j,k=c("React").PropTypes;i=babelHelpers.inherits(l,c("React").PureComponent);j=i&&i.prototype;l.prototype.render=function(){var m=this.props,n=m.hint,o=m.isMessenger;switch(n){case c("ChannelConstants").HINT_AUTH:return c("React").createElement("div",null,h._("Your session has timed out. Please log in."));case c("ChannelConstants").HINT_MAINT:return o?c("React").createElement("div",null,h._("Messenger is currently down for maintenance.")):c("React").createElement("div",null,h._("{Chat} is currently down for maintenance.",[h.param("Chat",h._("Chat"))]));case c("ChannelConstants").HINT_CONN:default:if(!o)return c("React").createElement("div",null,h._("{Chat} is currently unavailable.",[h.param("Chat",h._("Chat"))]));else if(c("CurrentUser").isWorkUser())return c("React").createElement("div",null,h._("Workplace Chat is currently unavailable."));else return c("React").createElement("div",null,h._("Messenger is currently unavailable."))}};function l(){i.apply(this,arguments)}l.propTypes={hint:k.string,isMessenger:k.bool};f.exports=l}),null);
__d("ChatSidebarSheet.react",["fbt","Arbiter","ChannelConnection","ChatBehavior","ChatSidebarSheetChatOffline.react","ChatSidebarSheetChatReconnectMsg.react","ChatSidebarSheetChatShutdownMsg.react","ChatVisibility","MercuryConfig","MessengerEnvironment","CSS","JSLogger","LogHistory","MercurySyncConstants","PresencePrivacy","React","SubscriptionsHandler","emptyFunction","joinClasses","setTimeoutAcrossTransitions"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i,j,k=c("JSLogger").create("sidebar_sheet"),l=c("LogHistory").getInstance("sidebar_sheet"),m=c("React").PropTypes;i=babelHelpers.inherits(n,c("React").PureComponent);j=i&&i.prototype;function n(o){j.constructor.call(this,o);this.$ChatSidebarSheet3=function(p,q){this.setState({channelStatus:p,channelData:q});this.$ChatSidebarSheet4()}.bind(this);this.$ChatSidebarSheet4=function(){this.setState({isConnected:!c("ChannelConnection").disconnected(),isOnline:c("ChatVisibility").isOnline(),notifiesUserMessages:c("ChatBehavior").notifiesUserMessages()})}.bind(this);this.state={channelStatus:null,channelData:null,isConnected:!c("ChannelConnection").disconnected(),isOnline:c("ChatVisibility").isOnline(),notifiesUserMessages:c("ChatBehavior").notifiesUserMessages(),syncStateInvalid:false,syncStateReconnecting:false}}n.prototype.componentDidMount=function(){this.$ChatSidebarSheet1=new(c("SubscriptionsHandler"))();this.$ChatSidebarSheet1.addSubscriptions(c("ChannelConnection").subscribe([c("ChannelConnection").CONNECTED,c("ChannelConnection").SHUTDOWN,c("ChannelConnection").RECONNECTING],this.$ChatSidebarSheet3),c("ChannelConnection").subscribe([c("ChannelConnection").MUTE_WARNING,c("ChannelConnection").UNMUTE_WARNING],this.$ChatSidebarSheet4),c("PresencePrivacy").subscribe("privacy-user-presence-changed",this.$ChatSidebarSheet4),c("ChatBehavior").subscribe(c("ChatBehavior").ON_CHANGED,this.$ChatSidebarSheet4),c("Arbiter").subscribe(c("MercurySyncConstants").ARBITER_EVENT_INVALID_STATE,function(){l.log("invalid state fatal","{}");this.setState({syncStateInvalid:true,syncStateReconnecting:false})}.bind(this)),c("Arbiter").subscribe(c("MercurySyncConstants").ARBITER_EVENT_INVALID_STATE_RETRY,function(){l.log("retry from invalid state","{}");this.$ChatSidebarSheet5()}.bind(this)),c("Arbiter").subscribe(c("MercurySyncConstants").ARBITER_EVENT_INVALID_STATE_RECOVER,function(){l.log("recover from invalid state","{}");this.$ChatSidebarSheet6()}.bind(this)))};n.prototype.componentWillUpdate=function(){if(this.$ChatSidebarSheet2){clearTimeout(this.$ChatSidebarSheet2);this.$ChatSidebarSheet2=null}};n.prototype.componentWillUnmount=function(){this.$ChatSidebarSheet1&&this.$ChatSidebarSheet1.release()};n.prototype.render=function(){__p&&__p();var o=c("MessengerEnvironment").messengerui,p=void 0,q=void 0;if(!this.state.isOnline&&!o){p="offline";q=this.$ChatSidebarSheet7()}else if(!this.state.isConnected||this.state.syncStateInvalid||this.state.syncStateReconnecting){p="error";q=this.$ChatSidebarSheet8(o)}else if(!this.state.notifiesUserMessages&&!o){p="notice";q=this.$ChatSidebarSheet9()}if(this.state.channelStatus===c("ChannelConnection").RECONNECTING&&this.state.channelData<1e3||this.state.syncStateReconnecting)p=c("joinClasses")(p,"reconnecting");return c("React").createElement("div",{className:c("joinClasses")(this.props.className,p)},o?null:c("React").createElement("div",{className:"img"}),c("React").createElement("div",{className:"message"},q))};n.prototype.$ChatSidebarSheet8=function(o){__p&&__p();if(this.state.channelStatus===c("ChannelConnection").SHUTDOWN||this.state.syncStateInvalid)return c("React").createElement(c("ChatSidebarSheetChatShutdownMsg.react"),{hint:this.state.syncStateInvalid?undefined:this.state.channelData,isMessenger:o});else if(this.state.channelStatus===c("ChannelConnection").RECONNECTING||this.state.syncStateReconnecting){var p=this.state.syncStateReconnecting?1:this.state.channelData;if(p>1e3)this.$ChatSidebarSheet2=c("setTimeoutAcrossTransitions")(this.$ChatSidebarSheet3.bind(this,c("ChannelConnection").RECONNECTING,p-1e3),1e3);return c("React").createElement(c("ChatSidebarSheetChatReconnectMsg.react"),{isMessenger:o,msecs:p,onManuallyConnectClick:function(){if(!this.state.syncStateReconnecting)c("ChannelConnection").reconnect()}.bind(this)})}return null};n.prototype.$ChatSidebarSheet7=function(){return c("React").createElement(c("ChatSidebarSheetChatOffline.react"),{onGoOnlineClick:function o(p){k.log("sidebar_go_online");c("ChatVisibility").goOnline()}})};n.prototype.$ChatSidebarSheet9=function(){return c("React").createElement("div",null,h._("Alerts are off while you use another client to chat."))};n.prototype.$ChatSidebarSheet5=function(){this.setState({syncStateReconnecting:true})};n.prototype.$ChatSidebarSheet6=function(){this.setState({syncStateInvalid:false,syncStateReconnecting:false})};f.exports=n}),null);
__d("MessengerDotComUpsellMessage.react",["fbt","React"],(function a(b,c,d,e,f,g,h){"use strict";var i,j;i=babelHelpers.inherits(k,c("React").Component);j=i&&i.prototype;k.prototype.render=function(){return h._("Chat faster on Messenger.com")};function k(){i.apply(this,arguments)}f.exports=k}),null);
__d("MessengerDotComUpsellSheet.react",["cx","BanzaiODS","ChannelConnection","MessengerDotComUpsellMessage.react","Link.react","React","MercuryServerDispatcher","ShimButton.react","SubscriptionsHandler","ChatConfigInitialData","joinClasses"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i,j;i=babelHelpers.inherits(k,c("React").PureComponent);j=i&&i.prototype;function k(l){j.constructor.call(this,l);this.$MessengerDotComUpsellSheet3=function(m){m.preventDefault();m.stopPropagation();c("MercuryServerDispatcher").trySend("/ajax/messenger_upsell/dismiss.php",[{}]);this.setState({shouldShow:false})}.bind(this);this.$MessengerDotComUpsellSheet4=function(m,n){this.setState({isConnected:!c("ChannelConnection").disconnected()})}.bind(this);this.state={isConnected:!c("ChannelConnection").disconnected(),shouldShow:c("ChatConfigInitialData").show_messenger_dot_com_upsell}}k.prototype.render=function(){if(!this.state.isConnected||!this.state.shouldShow)return null;var l=c("ChatConfigInitialData").messenger_dot_com_upsell_version;if(l!="blue"&&l!="white")return null;return c("React").createElement(c("Link.react"),{href:"https://www.messenger.com",onClick:this.$MessengerDotComUpsellSheet2,target:"_blank",className:c("joinClasses")("_ua_",l)},c("React").createElement("div",{className:"content"},c("React").createElement("div",{className:"img"}),c("React").createElement("div",{className:"message"},c("React").createElement(c("MessengerDotComUpsellMessage.react"),null)),c("React").createElement(c("ShimButton.react"),{className:"close",onClick:this.$MessengerDotComUpsellSheet3})))};k.prototype.$MessengerDotComUpsellSheet2=function(){var l=c("ChatConfigInitialData").messenger_dot_com_upsell_version;c("BanzaiODS").bumpEntityKey("messaging_www","mn.messenger_upsell.click."+l)};k.prototype.componentDidMount=function(){this.$MessengerDotComUpsellSheet1=new(c("SubscriptionsHandler"))();this.$MessengerDotComUpsellSheet1.addSubscriptions(c("ChannelConnection").subscribe([c("ChannelConnection").CONNECTED,c("ChannelConnection").SHUTDOWN,c("ChannelConnection").RECONNECTING],this.$MessengerDotComUpsellSheet4))};c("MercuryServerDispatcher").registerEndpoints({"/ajax/messenger_upsell/dismiss.php":{mode:c("MercuryServerDispatcher").IMMEDIATE}});f.exports=k}),null);
__d("MessengerSearchFunnelLogger",["FunnelLogger","MessengerSearchFunnelLoggerConstants","MercuryIDs"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h;function i(q,r,s){c("FunnelLogger").startFunnel(q);c("FunnelLogger").addFunnelTag(q,r);c("FunnelLogger").addFunnelTag(q,s);c("FunnelLogger").appendActionIfNew(q,"search_start");h=[]}function j(q){c("FunnelLogger").appendActionIfNew(q,"search_end");c("FunnelLogger").endFunnel(q)}function k(q,r){c("FunnelLogger").appendActionWithPayload(q,"initiate_content_search",{query_string:r,impression_list:h});c("FunnelLogger").endFunnel(q)}function l(q,r,s,t){if(s==null||h==null||h.length===0){c("FunnelLogger").appendActionWithPayload(q,"search_result_error",{error:"threadID or latest impression list are null",thread_id:s,impression_list:h});c("FunnelLogger").endFunnel(q);return}s=c("MercuryIDs").getThreadFBIDFromThreadID(s);c("FunnelLogger").appendActionWithPayload(q,"log_result_selection",{thread_id:s,type:t,rank:h.indexOf(s),search_query:r?r:""})}function m(q,r,s){c("FunnelLogger").appendActionWithPayloadIfNew(q,"loading_state_impression_list",{search_query:r,impression_list:s});h=s}function n(q,r){c("FunnelLogger").appendActionWithPayload(q,c("MessengerSearchFunnelLoggerConstants").SEND_SERVER_REQUEST,{search_query:r})}function o(q,r,s,t){c("FunnelLogger").appendActionWithPayload(q,r,{search_query:s,impression_list:t});h=t}function p(q){c("FunnelLogger").appendAction(q,"clear_search_query");this.endFunnel(q)}f.exports={startFunnel:i,logResultSelection:l,logStartQuery:n,endFunnel:j,logContentSearchInitiation:k,logLoadingStateQuery:m,logUpdateQuery:o,logClearQuery:p}}),null);
__d("MercuryTypeaheadConstants",[],(function a(b,c,d,e,f,g){f.exports=Object.freeze({COMPOSER_FRIENDS_MAX:4,COMPOSER_FB4C_MAX:8,COMPOSER_NON_FRIENDS_MAX:2,COMPOSER_MESSENGER_ONLY_CONTACT_MAX:4,COMPOSER_SHOW_MORE_LIMIT:2,COMPOSER_THREADS_INITIAL_LIMIT:2,COMPOSER_CHATTAB_MAX:5,COMPOSER_PAGES_MAX:5,COMPOSER_WM_MAX:23,USER_TYPE:"user",PAGE_TYPE:"page",THREAD_TYPE:"thread",HEADER_TYPE:"header",SEARCH_TYPE:"search",FRIEND_TYPE:"friend",NON_FRIEND_TYPE:"non_friend",FB4C_TYPE:"fb4c",MEETING_ROOM_PAGE_TYPE:"meeting_room_page",COMMERCE_PAGE_TYPE:"commerce_page",INTERNAL_BOT_PAGE_TYPE:"internal_bot_page",GAME_TYPE:"game",WORKPLACE_BOT_CATEGORY_TYPE:"WORKPLACE_BOT",VALID_EMAIL:"^([A-Z0-9._%+-]+@((?!facebook\\.com))[A-Z0-9.-]+\\.[A-Z]{2,4}|(([A-Z._%+-]+[A-Z0-9._%+-]*)|([A-Z0-9._%+-]+[A-Z._%+-]+[A-Z0-9._%+-]*))@(?:facebook\\.com))$"})}),null);
__d("MessengerDispatcher",["Dispatcher_DEPRECATED"],(function a(b,c,d,e,f,g){"use strict";f.exports=new(c("Dispatcher_DEPRECATED"))()}),null);
__d("MercuryFilters",["MessagingTag"],(function a(b,c,d,e,f,g){var h=[c("MessagingTag").UNREAD],i={ALL:"all",UNREAD:c("MessagingTag").UNREAD,getSupportedFilters:function j(){return h.concat()},isSupportedFilter:function j(k){return h.includes(k)}};f.exports=i}),null);
__d("MessengerStateProcessor",["MercuryAPIArgsSource","MercuryIDs","MercuryParticipantTypes","MercuryParticipants","MercuryThreadIDMap","MercuryThreads","MercuryVanityIDMap.bs","MessengerURIConstants"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h={preprocess:function j(k){__p&&__p();var l=k.activeThreadID;if(l){var m=c("MercuryIDs").getUserIDFromThreadID(l),n=m&&c("MercuryParticipants").getNow(c("MercuryIDs").getParticipantIDFromUserID(m));if(n&&n.type!==c("MercuryParticipantTypes").EVENT)k.threadKey=n.vanity||m;else if(m&&!n){var o=c("MercuryIDs").getParticipantIDFromUserID(m);k.threadKey=c("MercuryVanityIDMap.bs").hasID(o)?c("MercuryVanityIDMap.bs").getVanity(o):m}else{var p=c("MercuryThreadIDMap").get(),q=p.getServerIDFromClientIDNow(l);k.threadKey=q||c("MercuryIDs").tokenize(l).value}}delete k.activeThreadID;return k},postprocess:function j(k){__p&&__p();var l=c("MercuryThreadIDMap").get(),m=c("MercuryThreads").get(),n=i(k.threadKey),o=void 0;o=c("MercuryIDs").isValid(n)?n:l.getClientIDFromServerIDNow(n);if(!o){var p=c("MercuryParticipants").getIDFromVanityOrFBID(n),q=p&&m.getCanonicalThreadToParticipant(p,null,c("MercuryAPIArgsSource").MESSENGER);if(q)o=q.thread_id}if(o){k.activeThreadID=o;k.serverThreadID=l.getServerIDFromClientIDNow(o)}delete k.threadKey;return k},supportInboxPostprocess:function j(k){if(k.threadKey)k.activeThreadID=c("MercuryIDs").getThreadIDFromSupportInboxItemID(k.threadKey);delete k.threadKey;return k}};function i(j){if(!j)return null;return j.startsWith(c("MessengerURIConstants").GROUP_PREFIX)?j.substr(c("MessengerURIConstants").GROUP_PREFIX.length):j}f.exports=h}),null);
__d("MessengerURISerializer",["CurrentEnvironment","MercuryFilters","MessagingTag","MessengerStateProcessor","MessengerURIConstants","MessengerView","URI","WWWBase","MercuryIDs"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h="/?$",i=function i(m,n){m.setPath(c("CurrentEnvironment").facebookdotcom?c("MessengerURIConstants").FACEBOOK_PREFIX+n:n)},j=function j(m,n){var o=m.getPath();if(c("CurrentEnvironment").facebookdotcom&&!o.startsWith(c("MessengerURIConstants").FACEBOOK_PREFIX))n=c("MessengerURIConstants").FACEBOOK_PREFIX+n;m.setPath(m.getPath()+n)},k={serialize:function m(n){__p&&__p();var o=new(c("URI"))(c("WWWBase").uri);n=c("MessengerStateProcessor").preprocess(n);switch(n.masterView){case c("MessengerView").MASTER.GROUPS:i(o,c("MessengerURIConstants").GROUPS_PATH);break;case c("MessengerView").MASTER.PAYMENT:i(o,c("MessengerURIConstants").PAYMENT_PATH);break;case c("MessengerView").MASTER.PEOPLE:i(o,c("MessengerURIConstants").PEOPLE_PATH);break;case c("MessengerView").MASTER.SUPPORT:i(o,c("MessengerURIConstants").SUPPORT_PATH);break}switch(n.folder){case c("MessagingTag").OTHER:i(o,c("MessengerURIConstants").FILTERED_REQUESTS_PATH);break;case c("MessagingTag").ACTION_ARCHIVED:i(o,c("MessengerURIConstants").ARCHIVED_PATH);break;case c("MessagingTag").PENDING:i(o,c("MessengerURIConstants").MESSAGE_REQUESTS_PATH);break}if(n.detailView===c("MessengerView").DETAIL.PAYTHREAD){j(o,c("MessengerURIConstants").PAYMENT_PAY_PATH);if(n.threadKey)o.addQueryData("id",n.threadKey)}else if(n.detailView===c("MessengerView").DETAIL.PAYFRIENDPICKER)j(o,c("MessengerURIConstants").PAYMENT_PAY_PATH);else if(n.detailView===c("MessengerView").DETAIL.COMPOSE)j(o,c("MessengerURIConstants").COMPOSE_SUBPATH);else if(n.threadKey)if(n.masterView===c("MessengerView").MASTER.PAYMENT){i(o,c("MessengerURIConstants").THREAD_PREFIX+n.threadKey);delete n.extraQueryParams.id;delete n.extraQueryParams.a;delete n.extraQueryParams.m}else j(o,c("MessengerURIConstants").THREAD_PREFIX+n.threadKey);else if(n.masterView===c("MessengerView").MASTER.PAYMENT){i(o,"");delete n.extraQueryParams.id;delete n.extraQueryParams.a;delete n.extraQueryParams.m}else j(o,"");if(n.extraQueryParams)o.addQueryData(n.extraQueryParams);if(c("MercuryFilters").isSupportedFilter(n.filter))o.addQueryData({filter:n.filter});if(n.query!=null){var p;o.addQueryData((p={},p[n.masterView===c("MessengerView").MASTER.SEARCH?"qa":"q"]=n.query,p))}if(n.threadIDs)o.addQueryData({threadIDs:JSON.stringify(n.threadIDs)});if(n.mid)o.addQueryData({mid:n.mid});return o},deserialize:function m(n){__p&&__p();var o={},p=n.getPath();if(c("CurrentEnvironment").facebookdotcom&&!p.startsWith(c("MessengerURIConstants").FACEBOOK_PREFIX))o.notMessenger=true;var q=p.replace(c("MessengerURIConstants").FACEBOOK_PREFIX,""),r=void 0,s=n.getQueryData(),t=s.filter,u=s.mid,v=s.q,w=s.qa,x=s.threadIDs,y=babelHelpers.objectWithoutProperties(s,["filter","mid","q","qa","threadIDs"]);try{r=JSON.parse(x)}catch(z){o.threadIDs=null}if(r)o.threadIDs=r.filter(function(B){return c("MercuryIDs").isValidThreadID(B)});if(q.match("^"+c("MessengerURIConstants").GROUPS_PATH))o.masterView=c("MessengerView").MASTER.GROUPS;else if(q.match("^"+c("MessengerURIConstants").PEOPLE_PATH))o.masterView=c("MessengerView").MASTER.PEOPLE;else if(q.match("^"+c("MessengerURIConstants").SUPPORT_PATH))o.masterView=c("MessengerView").MASTER.SUPPORT;else if(q.match("^"+c("MessengerURIConstants").PAYMENT_PATH))o.masterView=c("MessengerView").MASTER.PAYMENT;else if(w)o.masterView=c("MessengerView").MASTER.SEARCH;else o.masterView=c("MessengerView").MASTER.RECENT;if(q.match("^"+c("MessengerURIConstants").FILTERED_REQUESTS_PATH))o.folder=c("MessagingTag").OTHER;else if(q.match("^"+c("MessengerURIConstants").ARCHIVED_PATH))o.folder=c("MessagingTag").ACTION_ARCHIVED;else if(q.match("^"+c("MessengerURIConstants").MESSAGE_REQUESTS_PATH))o.folder=c("MessagingTag").PENDING;else o.folder=c("MessagingTag").INBOX;if(q.match(c("MessengerURIConstants").COMPOSE_SUBPATH+h))o.detailView=c("MessengerView").DETAIL.COMPOSE;else if(q.match("^"+c("MessengerURIConstants").PAYMENT_PATH+c("MessengerURIConstants").PAYMENT_PAY_PATH))if(y&&y.id){o.threadKey=y.id;o.detailView=c("MessengerView").DETAIL.PAYTHREAD}else o.detailView=c("MessengerView").DETAIL.PAYFRIENDPICKER;else{var A=l(q);if(A){o.threadKey=A;o.detailView=c("MessengerView").DETAIL.THREAD}}if(c("MercuryFilters").isSupportedFilter(t))o.filter=t;else o.filter=c("MercuryFilters").ALL;o.mid=u;o.query=w||v;o.extraQueryParams=y;if(o.masterView===c("MessengerView").MASTER.SUPPORT)return c("MessengerStateProcessor").supportInboxPostprocess(o);return c("MessengerStateProcessor").postprocess(o)}};function l(m){var n=m.match(c("MessengerURIConstants").THREAD_PREFIX+"([^/]+)"+h);return n&&decodeURIComponent(n[1])}f.exports=k}),null);
__d("MessengerActions",["invariant","Bootloader","EventProfiler","MercuryIDs","MessengerDispatcher","MessengerURISerializer","MercuryTypeaheadConstants","MessengerView","URI","goURI","keyMirror"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i=c("keyMirror")({CANCEL_FILE_UPLOAD:null,EMPTY_FILES:null,LINK_PREVIEW:null,LOADED_SHARE_DATA:null,LOADING_SHARE_DATA:null,REMOVE_SHARE_PREVIEW:null,PREPARE_FILES_FOR_SEND:null,REPLACE_STATE:null,SELECT_THREAD:null,UPDATE_MDOT_ME:null,UPDATE_THREAD_TAG:null,UPLOAD_FILE_FAILED:null,UPLOADED_FILE:null}),j={Types:i,changeDetailView:function m(n){l(function(o){if(o.detailView!==n)return{detailView:n};return null})},changeMasterView:function m(n){__p&&__p();l(function(o){__p&&__p();if(o.masterView!==n){var p={masterView:n};if(o.masterView===c("MessengerView").MASTER.SEARCH){p.query=undefined;c("Bootloader").loadModules(["MessengerContentSearchFunnelLogger","MessengerContentSearchFunnelLoggerConstants"],function(q,r){q&&q.endFunnel(r.FUNNEL_LOGGER_TAGS.END_WITH_BACK_BUTTON)},"MessengerActions")}return p}return null})},selectAggregation:function m(n){l(function(o){return{detailView:c("MessengerView").MASTER.RECENT,threadIDs:n,mid:null}})},selectThread:function m(n,o){__p&&__p();if(o===c("MercuryTypeaheadConstants").MEETING_ROOM_PAGE_TYPE){!!n||h(0);var p=c("MercuryIDs").getUserIDFromThreadID(n);!!p||h(0);var q=new(c("URI"))(),r=q.getQualifiedURI().getSubdomain();q.setDomain("facebook.com").setSubdomain(r).setPath("/"+p).setProtocol("https");window.open(q,"_blank");return}c("EventProfiler").tagCurrentActiveInteractionsAs("MessengerThreadSwitch");c("MessengerDispatcher").dispatch({type:i.SELECT_THREAD,threadID:n});l(function(s){if(s.activeThreadID!==n)return{activeThreadID:n,detailView:c("MessengerView").DETAIL.THREAD,mid:null};return null})},changeState:function m(n){c("MessengerDispatcher").dispatch({type:i.REPLACE_STATE,nextState:n})},changeMDotMeReferral:function m(){var n=arguments.length<=0||arguments[0]===undefined?null:arguments[0],o=arguments.length<=1||arguments[1]===undefined?null:arguments[1];c("MessengerDispatcher").dispatch({type:j.Types.UPDATE_MDOT_ME,refCode:n,refThreadID:o})},changeThreadTag:function m(){var n=arguments.length<=0||arguments[0]===undefined?null:arguments[0],o=arguments.length<=1||arguments[1]===undefined?null:arguments[1];c("MessengerDispatcher").dispatch({type:j.Types.UPDATE_THREAD_TAG,messagingTags:n,threadID:o})},changeFolder:function m(n){l(function(o){if(o.folder!==n)return{folder:n};return null})},changeFilter:function m(n){l(function(o){if(o.filter!==n)return{filter:n};return null})},changeQuery:function m(n){l(function(o){if(o.query!==n)return{query:n};return null})},changeQueryAll:function m(n){l(function(o){if(o.queryAll!==n)return{query:n,masterView:c("MessengerView").MASTER.SEARCH};return null})},changeMid:function m(n){l(function(o){if(o.mid!==n)return{mid:n};return null})},changeID:function m(n){l(function(o){if(o.extraQueryParams.id!==n)return{extraQueryParams:babelHelpers["extends"]({},o.extraQueryParams,{id:n})};return null})},prepareFilesForSend:function m(n,o){if(!n)return;c("MessengerDispatcher").dispatch({type:j.Types.PREPARE_FILES_FOR_SEND,threadID:n,files:o})},uploadedFile:function m(n,o,p){if(!n)return;c("MessengerDispatcher").dispatch({type:j.Types.UPLOADED_FILE,threadID:n,uploadID:o,payload:p})},cancelFileUpload:function m(n,o){if(!n)return;c("MessengerDispatcher").dispatch({type:j.Types.CANCEL_FILE_UPLOAD,threadID:n,uploadID:o})},uploadFileFailed:function m(n,o){if(!n)return;c("MessengerDispatcher").dispatch({type:j.Types.UPLOAD_FILE_FAILED,threadID:n,uploadID:o})},cleanFiles:function m(n){if(!n)return;c("MessengerDispatcher").dispatch({type:j.Types.EMPTY_FILES,threadID:n})},loadingPreview:function m(n,o){c("MessengerDispatcher").dispatch({type:j.Types.LINK_PREVIEW,threadID:n,match:o})},loadingShareData:function m(n){c("MessengerDispatcher").dispatch({type:j.Types.LOADING_SHARE_DATA,threadID:n})},loadedShareData:function m(n,o){c("MessengerDispatcher").dispatch({type:j.Types.LOADED_SHARE_DATA,threadID:n,attachmentData:o})},removeSharePreview:function m(n){c("MessengerDispatcher").dispatch({type:j.Types.REMOVE_SHARE_PREVIEW,threadID:n})}};function k(m,n){return m.detailView==null}function l(m){var n=c("MessengerURISerializer").deserialize(new(c("URI"))(window.location.href)),o=m(n),p=k(n,o);if(o)c("goURI")(c("MessengerURISerializer").serialize(Object.assign(n,o)),false,p)}f.exports=j}),null);
__d("MessengerTypeaheadUtils",["fbt","ix","immutable","MercuryTypeaheadConstants","MessengerEnvironment","ReactDOM","SearchableEntry","WorkModeConfig","gkx","mapObject"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j,k=c("immutable").OrderedMap,l=500,m=100,n=c("WorkModeConfig").is_work_user||c("gkx")("AT62Bmuf0c-b-qsSo41XTNJvFn7VwRrjwsI0onsrzyJ35XDxvhLHgPbXt3hZorqUAYplG7jtkngT9YqyGngqDfMq")?[c("MercuryTypeaheadConstants").SEARCH_TYPE,c("MercuryTypeaheadConstants").FRIEND_TYPE,c("MercuryTypeaheadConstants").FB4C_TYPE,c("MercuryTypeaheadConstants").THREAD_TYPE,c("MercuryTypeaheadConstants").MEETING_ROOM_PAGE_TYPE,c("MercuryTypeaheadConstants").INTERNAL_BOT_PAGE_TYPE,c("MercuryTypeaheadConstants").PAGE_TYPE,c("MercuryTypeaheadConstants").NON_FRIEND_TYPE,c("MercuryTypeaheadConstants").GAME_TYPE]:[c("MercuryTypeaheadConstants").SEARCH_TYPE,c("MercuryTypeaheadConstants").FRIEND_TYPE,c("MercuryTypeaheadConstants").THREAD_TYPE,c("MercuryTypeaheadConstants").FB4C_TYPE,c("MercuryTypeaheadConstants").MEETING_ROOM_PAGE_TYPE,c("MercuryTypeaheadConstants").PAGE_TYPE,c("MercuryTypeaheadConstants").NON_FRIEND_TYPE,c("MercuryTypeaheadConstants").GAME_TYPE],o=(j={},j[c("MercuryTypeaheadConstants").SEARCH_TYPE]={header:""},j[c("MercuryTypeaheadConstants").FRIEND_TYPE]={header:h._("Contacts")},j[c("MercuryTypeaheadConstants").FB4C_TYPE]={header:h._("Coworkers")},j[c("MercuryTypeaheadConstants").THREAD_TYPE]={header:h._("Group Conversations")},j[c("MercuryTypeaheadConstants").PAGE_TYPE]={header:h._("Businesses")},j[c("MercuryTypeaheadConstants").MEETING_ROOM_PAGE_TYPE]={header:h._("Meeting Rooms")},j[c("MercuryTypeaheadConstants").INTERNAL_BOT_PAGE_TYPE]={header:h._("Bots")},j[c("MercuryTypeaheadConstants").NON_FRIEND_TYPE]={header:h._("More People")},j.game={header:h._("Games")},j),p={sortEntries:function q(r,s){__p&&__p();var t=[],u=[],v=[],w=[],x=[],y=[],z=[],A=[],B=[];r.forEach(function(C){__p&&__p();switch(C.getType()){case c("MercuryTypeaheadConstants").FRIEND_TYPE:u.push(C);break;case c("MercuryTypeaheadConstants").FB4C_TYPE:v.push(C);break;case c("MercuryTypeaheadConstants").THREAD_TYPE:w.push(C);break;case c("MercuryTypeaheadConstants").PAGE_TYPE:case c("MercuryTypeaheadConstants").COMMERCE_PAGE_TYPE:y.push(C);break;case c("MercuryTypeaheadConstants").NON_FRIEND_TYPE:x.push(C);break;case c("MercuryTypeaheadConstants").MEETING_ROOM_PAGE_TYPE:z.push(C);break;case c("MercuryTypeaheadConstants").INTERNAL_BOT_PAGE_TYPE:A.push(C);break;case c("MercuryTypeaheadConstants").SEARCH_TYPE:t.push(C);break;case c("MercuryTypeaheadConstants").GAME_TYPE:B.push(C);break}});return t.concat(u,v,w,z,A,y,x,B)},sortEntriesWithoutPages:function q(r){__p&&__p();var s=[],t=[],u=[],v=[];r.forEach(function(w){switch(w.getType()){case c("MercuryTypeaheadConstants").FRIEND_TYPE:s.push(w);break;case c("MercuryTypeaheadConstants").FB4C_TYPE:t.push(w);break;case c("MercuryTypeaheadConstants").THREAD_TYPE:u.push(w);break;case c("MercuryTypeaheadConstants").NON_FRIEND_TYPE:v.push(w);break}});return s.concat(t,u,v)},sortEntriesWithoutGroupsOrViewer:function q(r,s){__p&&__p();var t=[],u=[],v=[];r.forEach(function(w){if(w.getUniqueID()===s)return;switch(w.getType()){case c("MercuryTypeaheadConstants").FRIEND_TYPE:t.push(w);break;case c("MercuryTypeaheadConstants").FB4C_TYPE:u.push(w);break;case c("MercuryTypeaheadConstants").NON_FRIEND_TYPE:v.push(w);break}});return t.concat(u,v)},getEntryOrder:function q(r){var s=arguments.length<=1||arguments[1]===undefined?n:arguments[1];return s},orderEntries:function q(r,s){var t=[];this.getEntryOrder(s).filter(function(u){return u!==c("MercuryTypeaheadConstants").SEARCH_TYPE}).concat(c("MercuryTypeaheadConstants").SEARCH_TYPE).forEach(function(u){return t.push.apply(t,r.filter(function(v){return this.areSectionsEqual(v.getType(),u)}.bind(this)))}.bind(this));return t},buildSingleSection:function q(r){return k([["",r]])},buildListSections:function q(r,s,t){__p&&__p();if(!r.length)return k();t=this.getEntryOrder(s,t);var u=c("mapObject")(o,function(v){return babelHelpers["extends"]({},v,{entries:[]})});u[c("MercuryTypeaheadConstants").COMMERCE_PAGE_TYPE]=u[c("MercuryTypeaheadConstants").PAGE_TYPE];r.forEach(function(v){var w=v.getType();if(u[w])u[w].entries.push(v)});return k(t.filter(function(v){return u[v].entries.length}).map(function(v){return[u[v].header,u[v].entries]}))},buildCustomSection:function q(r,s){var t;return t={},t[r]=s,t},areSectionsEqual:function q(r,s){if(r===c("MercuryTypeaheadConstants").COMMERCE_PAGE_TYPE)return s===c("MercuryTypeaheadConstants").COMMERCE_PAGE_TYPE||s===c("MercuryTypeaheadConstants").PAGE_TYPE;return r===s},scrollEntryIntoView:function q(r,s){var t=c("ReactDOM").findDOMNode(s),u=s.getScrollTop(),v=r.offsetTop-u,w=t.offsetHeight-r.offsetHeight,x=Math.abs(w-v);if(v>=w&&x<=m)s.scrollToPosition(u+v-w,true,{duration:l});else if(v<0&&x<=w+m)s.scrollToPosition(u+v,true,{duration:l})},getMessageSearchEntry:function q(r){if(!c("MessengerEnvironment").messengerui||r.length<2)return null;return new(c("SearchableEntry"))({uniqueID:"__special_search_entry__",title:h._("Search Messages for \"{queryString}\"",[h.param("queryString",r)]),photo:i("86924"),type:c("MercuryTypeaheadConstants").SEARCH_TYPE})}};f.exports=p}),null);
__d("MessengerSearchSource",["ChatSearchSource","MercuryConfig","MercuryIDs","MercuryParticipants","MercuryParticipantTypes","MercurySingletonProvider","MessengerEnvironment","MessengerSearchFunnelLoggerConstants","MessengerTypeaheadUtils","SearchableEntry","emptyFunction","requireWeak"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h,i,j=50,k=c("MessengerEnvironment").messengerui;h=babelHelpers.inherits(l,c("ChatSearchSource"));i=h&&h.prototype;l.getForFBID=function(n){return m.getForFBID(n)};l.get=function(){return m.get()};function l(n){i.constructor.call(this,{queryRequests:[{uri:"/ajax/mercury/composer_query.php"}],searchType:c("MessengerSearchFunnelLoggerConstants").WWW_SIDEBAR_TAG});this.$MessengerSearchSource1=[];this.$MessengerSearchSource2=n}l.prototype.bootstrapImpl=function(n){c("requireWeak")("OrderedFriendsList",function(p){return p.getSearchableEntries(j,true,function(q){this.$MessengerSearchSource1=q;i.addLocalEntries.call(this,q)}.bind(this))}.bind(this));var o=c("MercuryIDs").getParticipantIDFromUserID(this.$MessengerSearchSource2);c("MercuryParticipants").get(o,function(p){i.addLocalEntries.call(this,[new(c("SearchableEntry"))({uniqueID:p.fbid?p.fbid.toString():p.id,title:p.name,type:c("MercuryParticipantTypes").FRIEND,photo:p.big_image_src||p.image_src,uri:p.href,auxiliaryData:{isMessengerUser:p.is_messenger_user}})])}.bind(this));i.bootstrapImpl.call(this,c("emptyFunction"));n()};l.prototype.searchImpl=function(n,o,p){p=p||{};if(n===""&&p.showDefaultEntries){o(this.$MessengerSearchSource1,n);var q=p&&p.onQueryFinished;q&&q(n);return}p.threadLimit=c("MercuryConfig").MaxThreadResults;i.searchImpl.call(this,n,this.$MessengerSearchSource3(o,p),p)};l.prototype.$MessengerSearchSource3=function(n,o){return k&&o&&o.showThreadSearchEntry?function(p,q){var r=c("MessengerTypeaheadUtils").getMessageSearchEntry(q);if(r)n([r].concat(p),q);else n(p,q)}:n};var m=new(c("MercurySingletonProvider"))(l);f.exports=l}),null);
__d("MessengerSearchTypeahead.react",["cx","fbt","ix","AbstractTypeahead.react","Bootloader","Image.react","MercuryIDs","MercuryThreadIDMap","MercuryThreads","MercuryTypeaheadConstants","MercuryVanityIDMap.bs","MessengerActions","MessengerSearchFunnelLogger","MessengerSearchFunnelLoggerConstants","MessengerSearchSource","React","TypeaheadNavigation","ifRequired","joinClasses"],(function a(b,c,d,e,f,g,h,i,j){"use strict";__p&&__p();var k,l,m=c("MercuryThreadIDMap").get(),n=c("MercuryThreads").get(),o=c("React").PropTypes,p=j("86933"),q=100,r=null,s=null;k=babelHelpers.inherits(t,c("React").PureComponent);l=k&&k.prototype;function t(){var v,w;for(var x=arguments.length,y=Array(x),z=0;z<x;z++)y[z]=arguments[z];return w=(v=l.constructor).call.apply(v,[this].concat(y)),u.call(this),w}t.prototype.componentWillMount=function(){__p&&__p();var v=function v(x,y,z){var A=x.indexOf(y),B=A==-1?x.length-1:A-1;z(B==-1?x[x.length-1]:x[B])},w=function w(x,y,z){var A=x.indexOf(y)+1;z(A==x.length?x[0]:x[A])};v=c("TypeaheadNavigation").moveDown;w=c("TypeaheadNavigation").moveUp;this.$MessengerSearchTypeahead1=function(x){for(var y=arguments.length,z=Array(y>1?y-1:0),A=1;A<y;A++)z[A-1]=arguments[A];return v.apply(undefined,[s.orderEntries(x,this.props.queryString)].concat(z))}.bind(this);this.$MessengerSearchTypeahead2=function(x){for(var y=arguments.length,z=Array(y>1?y-1:0),A=1;A<y;A++)z[A-1]=arguments[A];return w.apply(undefined,[s.orderEntries(x,this.props.queryString)].concat(z))}.bind(this)};t.prototype.render=function(){var v=this.props.isFacebookChat?i._("Search"):i._("Search Messenger");return c("React").createElement("div",{className:"_3rh8"},c("React").createElement(c("AbstractTypeahead.react"),{"aria-label":i._("friends to message"),autoHighlight:this.props.isFacebookChat,blurOnWindowBlur:false,className:c("joinClasses")(this.props.className||"","_5iwm"+(this.props.isFocused||!!this.props.queryString?" _5iwn":"")+" _150g"+(this.props.hideResults?" _1a03":"")),disabled:this.props.hideResults,inputClassName:"_3rhb navigationFocus",navigation:{moveUp:this.$MessengerSearchTypeahead1,moveDown:this.$MessengerSearchTypeahead2},onBlur:this.$MessengerSearchTypeahead3,onChange:this.$MessengerSearchTypeahead4,onFocus:this.$MessengerSearchTypeahead5,onMouseOver:this.$MessengerSearchTypeahead6,onClick:this.$MessengerSearchTypeahead6,onSelectAttempt:this.$MessengerSearchTypeahead7,placeholder:v.toString(),presenter:{ViewRenderer:r,alwaysVisibleOnFocus:true,extraRendererProps:{className:"_11_d",hasHoverState:this.props.isFacebookChat,isLoading:this.state.isLoading,onScrollIntoView:this.props.onScrollIntoView,viewer:this.props.viewer},maxEntries:this.props.maxEntries||q,sortEntries:this.$MessengerSearchTypeahead8,useLayer:false},queryString:this.props.queryString,role:"search",searchSource:c("MessengerSearchSource").getForFBID(this.props.viewer),searchSourceOptions:{onQueryFinished:this.$MessengerSearchTypeahead9,onQueryStarted:this.$MessengerSearchTypeahead10,showDefaultEntries:!this.props.isFacebookChat,showThreadSearchEntry:!this.props.isFacebookChat&&!!this.props.queryString},selectOnTab:true,spellCheck:false,showEntriesOnFocus:!this.props.isFacebookChat}),c("React").createElement(c("Image.react"),{onMouseDown:function(){var w;this.$MessengerSearchTypeahead11();(w=this.props).onClear.apply(w,arguments)}.bind(this),className:c("joinClasses")(this.props.className||"",(!this.props.queryString?"hidden_elem":"")+" _2xme"),src:p}))};t.prototype.$MessengerSearchTypeahead11=function(){c("MessengerSearchFunnelLogger").logClearQuery(c("MessengerSearchFunnelLoggerConstants").NAME)};t.propTypes={className:o.string,hideResults:o.bool,isFacebookChat:o.bool,isFocused:o.bool,maxEntries:o.number,onBlur:o.func,onChange:o.func,onClear:o.func,onFocus:o.func,onSelect:o.func.isRequired,onScrollIntoView:o.func,queryString:o.string,viewer:o.string.isRequired};var u=function u(){__p&&__p();this.state={isLoading:false,orderable:!!s};this.$MessengerSearchTypeahead3=function(){var v;(v=this.props).onBlur.apply(v,arguments);c("MessengerSearchFunnelLogger").endFunnel(c("MessengerSearchFunnelLoggerConstants").NAME)}.bind(this);this.$MessengerSearchTypeahead4=function(){var v;(v=this.props).onChange.apply(v,arguments)}.bind(this);this.$MessengerSearchTypeahead5=function(){var v;this.$MessengerSearchTypeahead6();(v=this.props).onFocus.apply(v,arguments)}.bind(this);this.$MessengerSearchTypeahead6=function(){if(!this.state.orderable)c("Bootloader").loadModules(["MessengerTypeaheadView.react","MessengerTypeaheadUtils"],function(v,w){c("ifRequired")("FantaTabsEagerBootloader",function(x){return x.bootload()});r=v;s=w;this.setState({orderable:true})}.bind(this),"MessengerSearchTypeahead.react")}.bind(this);this.$MessengerSearchTypeahead10=function(v){if(v===this.props.queryString)this.setState({isLoading:true})}.bind(this);this.$MessengerSearchTypeahead9=function(v){if(v===this.props.queryString)this.setState({isLoading:false})}.bind(this);this.$MessengerSearchTypeahead8=function(v){return s?s.sortEntries(v,this.props.queryString):v}.bind(this);this.$MessengerSearchTypeahead7=function(v,w){__p&&__p();var x,y=this,z=v.getUniqueID(),A=v.getType(),B=v.getAuxiliaryData().alias;if(B)c("MercuryVanityIDMap.bs").set(B,c("MercuryIDs").getParticipantIDFromUserID(z));if(A===c("MercuryTypeaheadConstants").SEARCH_TYPE){c("MessengerActions").changeQueryAll(this.props.queryString);c("MessengerSearchFunnelLogger").logContentSearchInitiation(c("MessengerSearchFunnelLoggerConstants").NAME,this.props.queryString)}else if(A===c("MercuryTypeaheadConstants").THREAD_TYPE)m.getClientIDFromServerID(z,function(C){this.props.onSelect(C,A);c("MessengerSearchFunnelLogger").logResultSelection(c("MessengerSearchFunnelLoggerConstants").NAME,this.props.queryString,C,c("MessengerSearchFunnelLoggerConstants").GROUP)}.bind(this));else(function(){__p&&__p();var C=void 0;switch(A){case c("MercuryTypeaheadConstants").FRIEND_TYPE:C=c("MessengerSearchFunnelLoggerConstants").USER_CONTACT;break;case c("MercuryTypeaheadConstants").NON_FRIEND_TYPE:C=c("MessengerSearchFunnelLoggerConstants").USER_NON_CONTACT;break;case c("MercuryTypeaheadConstants").FB4C_TYPE:C=c("MessengerSearchFunnelLoggerConstants").COWORKER;break;case c("MercuryTypeaheadConstants").GAME_TYPE:C=c("MessengerSearchFunnelLoggerConstants").GAME;break;case c("MercuryTypeaheadConstants").PAGE_TYPE:case c("MercuryTypeaheadConstants").INTERNAL_BOT_PAGE_TYPE:case c("MercuryTypeaheadConstants").COMMERCE_PAGE_TYPE:case c("MercuryTypeaheadConstants").MEETING_ROOM_PAGE_TYPE:C=c("MessengerSearchFunnelLoggerConstants").PAGE;break;default:C=c("MessengerSearchFunnelLoggerConstants").OTHER}n.getThreadMeta(c("MercuryIDs").getThreadIDFromUserID(z),function(D){this.props.onSelect(D.thread_id,A);c("MessengerSearchFunnelLogger").logResultSelection(c("MessengerSearchFunnelLoggerConstants").NAME,this.props.queryString,D.thread_id,C)}.bind(y))})()}.bind(this)};f.exports=t}),null);
__d("ChatTypeaheadWrapper.react",["cx","Arbiter","Bootloader","LoadOnRender.react","ChatConfig","ChatOpenTabEventLogger","ChatSidebarComposeLink.react","ChatSidebarSections","ChatSidebarSheet.react","ChatTypeaheadConstants","FantaTabActions","LazyComponent.react","MercuryIDs","MercuryParticipantTypes","MessengerDotComUpsellSheet.react","MessengerSearchFunnelLogger","MessengerSearchFunnelLoggerConstants","MessengerSearchTypeahead.react","React","Run","ChatSidebarDropdown.react","SidebarType","ChatSidebarActions","emptyFunction","getActiveElement","gkx"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i,j,k=40,l=c("ChatConfig").get("divebar_rounded_profile",false);function m(o){c("Arbiter").inform("sidebar/typeahead/active",o)}i=babelHelpers.inherits(n,c("React").Component);j=i&&i.prototype;function n(){var o,p;for(var q=arguments.length,r=Array(q),s=0;s<q;s++)r[s]=arguments[s];return p=(o=j.constructor).call.apply(o,[this].concat(r)),this.state={height:0,value:"",isSearching:false},this.$ChatTypeaheadWrapper1=function(){this.setState({isSearching:false,value:""});c("MessengerSearchFunnelLogger").endFunnel(c("MessengerSearchFunnelLoggerConstants").NAME)}.bind(this),p}n.prototype.componentDidMount=function(){if(this.props.isSidebar)c("Arbiter").subscribe("sidebar/resized",function(o,p){this.setState({height:p})}.bind(this));else c("Arbiter").subscribe("buddyList/resized",function(o,p){this.setState({height:p})}.bind(this))};n.prototype.componentWillUpdate=function(o,p){if(p.isSearching!==this.state.isSearching)m(p.isSearching)};n.prototype.render=function(){__p&&__p();var o=this.state.height!=null?Math.floor((this.state.height-k*2)/k):null;return c("React").createElement("div",{className:!l?"squareProfile":""},c("React").createElement(c("MessengerDotComUpsellSheet.react"),{className:"fbMessengerDotComUpsell"}),c("React").createElement(c("ChatSidebarSheet.react"),{className:"fbChatSidebarMessage"}),c("React").createElement(c("MessengerSearchTypeahead.react"),{className:c("gkx")("AT6J1vB0127_zCpL0d3C1CDK6TpXfjEXDoYutS_XbZEA9PsQy3Z-T6z-UhJgN1iSiqRIxb9juStJ1peN6QPRtgoq_yNdbXcfU-GsGYDVPbhirA")?"_62it":"",isFacebookChat:true,isFocused:true,maxEntries:o,queryString:this.state.value,viewer:this.props.id,onBlur:this.$ChatTypeaheadWrapper1,onChange:function(p){var q=p.target.value;this.setState({isSearching:q!=="",value:q})}.bind(this),onClear:c("emptyFunction"),onFocus:this.$ChatTypeaheadWrapper2,onScrollIntoView:c("emptyFunction"),onSelect:function(p,q){__p&&__p();c("getActiveElement")().blur();if(q===c("ChatTypeaheadConstants").MEETING_ROOM_PAGE_TYPE)c("Bootloader").loadModules(["goURI"],function(s){this.setState({isSearching:false,value:""});var r=c("MercuryIDs").getUserIDFromThreadID(p);s("/"+(r||""))}.bind(this),"ChatTypeaheadWrapper.react");else{c("FantaTabActions").openTab(p,"chat_sidebar_typeahead");var r=null;if(!q||q===c("MercuryParticipantTypes").FRIEND||q===c("ChatTypeaheadConstants").FRIEND_TYPE||q===c("ChatTypeaheadConstants").PAGE_TYPE||q===c("ChatTypeaheadConstants").USER_TYPE)if(c("MercuryIDs").isValidThreadID(p))r=c("MercuryIDs").getUserIDFromThreadID(p);c("ChatOpenTabEventLogger").logClickOpen(c("ChatSidebarSections").TYPEAHEAD,p,r)}}.bind(this)}),this.props.isSidebar?c("React").createElement("div",{className:"_531b"},c("React").createElement(c("ChatSidebarDropdown.react"),{sidebarType:c("SidebarType").SIDEBAR,onToggleSidebar:c("ChatSidebarActions").disable}),c("React").createElement(c("ChatSidebarComposeLink.react"),{className:"_3a-4 _5q85"}),c("gkx")("AT6J1vB0127_zCpL0d3C1CDK6TpXfjEXDoYutS_XbZEA9PsQy3Z-T6z-UhJgN1iSiqRIxb9juStJ1peN6QPRtgoq_yNdbXcfU-GsGYDVPbhirA")?c("React").createElement(c("LoadOnRender.react"),{component:c("React").createElement(c("LazyComponent.react"),null),loader:function p(q){c("Bootloader").loadModules(["ChatSidebarGroupCreateButtonReact.bs"],function(r){var s=r.jsComponent;return q(s)},"ChatTypeaheadWrapper.react")},placeholder:c("React").createElement("div",{className:"_1-4-"})}):null):null)};n.prototype.$ChatTypeaheadWrapper2=function(){c("MessengerSearchFunnelLogger").startFunnel(c("MessengerSearchFunnelLoggerConstants").NAME,c("MessengerSearchFunnelLoggerConstants").WWW_SIDEBAR_TAG,c("MessengerSearchFunnelLoggerConstants").UNIVERSAL_SEARCH)};f.exports=n}),null);
__d("ChatTypeaheadCore",["ChatTypeaheadWrapper.react","React","ReactDOM"],(function a(b,c,d,e,f,g){"use strict";var h={init:function i(j,k,l){c("ReactDOM").render(c("React").createElement(c("ChatTypeaheadWrapper.react"),{id:k,isSidebar:l}),j)}};f.exports=h}),null);