if (self.CavalryLogger) { CavalryLogger.start_js(["ImoW6"]); } __d("AsyncUploadBase",["ArbiterMixin","AsyncRequest","AsyncResponse","BrowserSupport","Form","forEachObject","mixin","removeFromArray"],(function(a,b,c,d,e,f){a=function(a){"use strict";babelHelpers.inheritsLoose(c,a);c.parseFiles=function(a){var c={};b("forEachObject")(a,function(a,b){if(Array.isArray(a))c[b]=a;else{c[b]=[];if(a instanceof window.FileList)for(var d=0;dg){this.$6(b("LiveChatPluginAttachmentUploadError").EXCEEDED_MAX_FILES);b("LiveChatPluginLoggerUtil").logAction("customer_chat_attachment_upload_failed",this.$11,this.$5,JSON.stringify({error:"exceeded_max_files"}));return}var d={};for(var e=0;eb("MercuryConstants").AttachmentMaxSize){this.$6(b("LiveChatPluginAttachmentUploadError").EXCEEDED_FILE_MAX_SIZE);b("LiveChatPluginLoggerUtil").logAction("customer_chat_attachment_upload_failed",this.$11,this.$5,JSON.stringify({error:"exceeded_max_file_size"}));return}var h=this.$15();d[h]=f;this.$9.add(h);this.$2.set(h,{name:f.name,thumbnail_url:b("cssURL")(window.URL.createObjectURL(f)),type:f.type});b("LiveChatPluginLoggerUtil").logAction("customer_chat_attachment_upload_submitted",this.$11,this.$5,JSON.stringify({uploadID:h}))}c.setFiles(d);c.forceSendViaXHR()}this.$8(this.$16(),this.$17())};c.removeAttachment=function(a){this.$9["delete"](a),this.$1["delete"](a),this.$2["delete"](a),this.$4["delete"](a),this.$3["delete"](a),this.$10["delete"](a),this.$8(this.$16(),this.$17(),this.$18(),this.$19(),this.$20(),this.$21()),b("LiveChatPluginLoggerUtil").logAction("customer_chat_attachment_upload_removed",this.$11,this.$5,JSON.stringify({uploadID:a}))};c.removeAllAttachments=function(){this.$1=new Map(),this.$2=new Map(),this.$3=new Map(),this.$4=new Map(),this.$9=new Set(),this.$10=new Map(),this.$8(this.$16(),this.$17(),this.$18(),this.$19(),this.$20(),this.$21())};c.$22=function(a){var c=a.response.payload;a=a.upload.getName();c=c.metadata[0];this.$9.has(a)&&(this.$9["delete"](a),c.image_id?this.$4.set(a,c.image_id):c.gif_id?this.$1.set(a,c.gif_id):c.video_id?this.$10.set(a,c.video_id):this.$3.set(a,c.file_id),this.$8(this.$16(),this.$17()),b("LiveChatPluginLoggerUtil").logAction("customer_chat_attachment_upload_completed",this.$11,this.$5,JSON.stringify({uploadID:a})));this.$24()||this.$8(this.$16(),this.$17(),this.$18(),this.$19(),this.$20(),this.$21())};c.$23=function(a){this.removeAttachment(a.upload.getName()),this.$6(b("LiveChatPluginAttachmentUploadError").UPLOAD_FAILED),b("LiveChatPluginLoggerUtil").logAction("customer_chat_attachment_upload_failed",this.$11,this.$5,JSON.stringify({error:"upload_failed"}))};c.$20=function(){return this.$4.size===0?[]:Array.from(this.$4.values())};c.$18=function(){return this.$1.size===0?[]:Array.from(this.$1.values())};c.$21=function(){return this.$10.size===0?[]:Array.from(this.$10.values())};c.$19=function(){return this.$3.size===0?[]:Array.from(this.$3.values())};c.$24=function(){return this.$9.size!==0};c.$16=function(){return this.$2};c.$17=function(){return this.$9};c.$12=function(){var a=document.createElement("form");a.action=b("XMNLiveChatPluginFileUploadController").getURIBuilder().getURI().toString();a.method="post";return a};c.$13=function(a){a=new(b("FileForm"))(a);a.setAllowCrossOrigin(!0);a.setUploadInParallel(!0);return a};c.$15=function(){return"upload_"+b("PhotosUploadID").getNewID()};c.destroy=function(){this.$7.release(),delete this.$7};return a}();e.exports=a}),null); __d("MPNDesktopAttachmentInput.react",["cx","InlineBlock.react","LiveChatPluginAttachmentUploadClient","LiveChatPluginLoggerUtil","MessagingPluginContext","MPNPaperclipIconSVG.react","React"],(function(a,b,c,d,e,f,g){"use strict";var h=b("React");a=function(a){babelHelpers.inheritsLoose(c,a);function c(){var c,d;for(var e=arguments.length,f=new Array(e),g=0;g0?(a.setState({menuItems:b}),e({type:"TOGGLE_HAS_PERSISTENT_MENU",hasPersistentMenu:!0})):(a.setState({menuItems:[]}),e({type:"TOGGLE_HAS_PERSISTENT_MENU",hasPersistentMenu:!1}))});break;case j.FB:d=b("XMessengerBotsMenuController").getURIBuilder().setString("page_id",c).setBool("should_flatten",!0).getURI();this.$1=new(b("AsyncRequest"))().setURI(d).setHandler(function(b){a.setState({menuItems:b.payload.menu})}).setErrorHandler(function(b){a.setState({menuItems:[]})});this.$1.send();break;default:return}};d.$3=function(a){var c=this.context.state.pageID,d=i.currentUserID();b("LiveChatPluginLoggerUtil").logActionFromNewUI("in_thread_action",d,c,i.currentUserState()===j.FB?"logged_in_chat_tab":"guest_chat_tab",{action_type:a?"customer_chat_bot_menu_opened":"customer_chat_bot_menu_closed"})};return c}(l.Component);a.contextType=b("MessagingPluginContext");e.exports=a}),null); __d("MessagingPluginDesktopProfilePicture.react",["cx","Image.react","MessagingPluginContext","PrivacyTransparentOverlay.react","React"],(function(a,b,c,d,e,f,g){"use strict";var h=b("React");a=function(a){babelHelpers.inheritsLoose(c,a);function c(){return a.apply(this,arguments)||this}var d=c.prototype;d.render=function(){var a=this.context.state,c=a.pageProfilePictureUri;a=a.isBusinessActive;var d=this.props,e=d.className;d=d.greenDotSize;d=d==="large"?"_95lb _97p-":"_95lb _97ot";return h.jsxs(b("PrivacyTransparentOverlay.react"),{children:[h.jsx(b("Image.react"),{className:(e=e)!=null?e:"_95la",src:c}),a?h.jsx("div",{className:d}):null]})};return c}(h.Component);a.contextType=b("MessagingPluginContext");e.exports=a}),null); __d("MessagingPluginDesktopThreadMenu.react",["cx","fbt","CometMenu.react","CometMenuItem.react","CometSeparatorMenuItem.react","MessagingPluginContext","MessagingPluginThreadActions","MPNIdentity","React","URI"],(function(a,b,c,d,e,f,g,h){"use strict";var i,j=b("MPNIdentity").MPNIdentity,k=b("MPNIdentity").MPNIdentityState,l=b("React");c=b("React");var m=c.useContext;function a(a){var c=m(b("MessagingPluginContext")),d=c.state,e=d.pageID,f=d.isPageBlocked,g=d.locale;d=d.showUpgradeUpsellPrompt;var n=j.currentUserState()===k.GUEST;return l.jsx("div",{className:"_968x",children:l.jsxs(b("CometMenu.react"),{size:"full",withArrow:!0,children:[n&&d?l.jsx(b("CometMenuItem.react"),{icon:{src:"/images/web_messenger/app-messenger_32-4x.png",style:"square"},iconStyle:"normal",onClick:function(){return a.onUpgrade()},primaryText:h._("Continue in Messenger")}):null,l.jsx(b("CometMenuItem.react"),{icon:{src:"/images/web_messenger/cross-circle_32-4x.png",style:"square"},onClick:function(){c.dispatchAction({type:"TOGGLE_END_CHAT",showEndChat:!0})},primaryText:h._("End Chat")}),!n&&f!=null?l.jsx(b("CometMenuItem.react"),{icon:{src:"/images/web_messenger/message-cross_32-4x.png",style:"square"},iconStyle:"normal",onClick:function(){b("MessagingPluginThreadActions").blockOrUnblockPage(c)},primaryText:f?h._("Turn On Messages"):h._("Turn Off Messages")}):null,n?null:l.jsx(b("CometMenuItem.react"),{icon:{src:"/images/web_messenger/bell-cross_32-4x.png",style:"square"},iconStyle:"normal",onClick:a.onClickMuteOrUnmute,primaryText:a.isMuted?h._("Unmute Conversation"):h._("Mute Conversation")}),l.jsx(b("CometMenuItem.react"),{icon:{src:"/images/web_messenger/caution-triangle_32-4x.png",style:"square"},iconStyle:"normal",onClick:function(){b("MessagingPluginThreadActions").openFRXPrompt(e,g)},primaryText:h._("Something's Wrong")}),l.jsx(b("CometSeparatorMenuItem.react"),{}),l.jsx(b("CometMenuItem.react"),{onClick:function(){(i||(i=b("URI"))).goURIOnNewWindow("https://www.facebook.com/"+e)},primaryText:h._("Visit Facebook Page")}),l.jsx(b("CometMenuItem.react"),{onClick:function(){(i||(i=b("URI"))).goURIOnNewWindow("https://www.facebook.com/business/m/add-messenger-to-your-website")},primaryText:h._("Add Messenger To Your Website")})]})})}e.exports=a}),null); __d("MPNDesktopDialogHeader.react",["ix","cx","fbt","Arbiter","BasePopoverTrigger.react","Image.react","LineClamp.react","LiveChatPluginLoggerUtil","MessagingPluginContext","MessagingPluginDesktopProfilePicture.react","MessagingPluginDesktopThreadMenu.react","MessagingPluginThreadActions","MPNConstants","MPNHeaderActionButton.react","MPNMoreInfoButtonSVG.react","React","asset","stylex"],(function(a,b,c,d,e,f,g,h,i){"use strict";var j,k=b("MPNConstants").MPNUpgradePrompt,l=b("React");(j||(j=b("stylex"))).inject(".qmqpeqxj{border-top-left-radius:50%}",1,".qmqpeqxj{border-top-right-radius:50%}");j.inject(".e7u6y3za{border-top-right-radius:50%}",1,".e7u6y3za{border-top-left-radius:50%}");j.inject(".qwcclf47{border-bottom-right-radius:50%}",1,".qwcclf47{border-bottom-left-radius:50%}");j.inject(".nmlomj2f{border-bottom-left-radius:50%}",1,".nmlomj2f{border-bottom-right-radius:50%}");j.inject(".hpj0pwwo{font-size:1.0625rem}",1);j.inject(".igjjae4c{font-weight:bold}",1);j.inject(".mov749r8{color:var(--fds-black-alpha-50)}",1);j.inject(".nfkogyam{font-size:0.8125rem}",1);a=function(a){babelHelpers.inheritsLoose(c,a);function c(){var c,d;for(var e=arguments.length,f=new Array(e),g=0;g0&&c.enqueueAndSend(d,null);this.setState({inputValue:""});b("LiveChatPluginLoggerUtil").logActionFromNewUI("message_send",a.guestID,a.pageID,"guest_chat_tab")};d.$21=function(){var a=this.context.state.pageID,c=i.currentUserID();if(this.state.uploadingAttachments.size!==0)return;var d=this.state.inputValue.trim();if(d&&d.length>0||this.state.attachmentsDataMap.size>0){d=this.$7.constructUserGeneratedMessageObject(d,"source:discovery:customer_chat_plugin",this.$8,null,null,this.$9);this.$4.length>0&&(d.has_attachment=!0,d.image_ids=this.$4);this.$1.length>0&&(d.has_attachment=!0,d.gif_ids=this.$1);this.$10.length>0&&(d.has_attachment=!0,d.video_ids=this.$10);this.$3.length>0&&(d.has_attachment=!0,d.file_ids=this.$3);this.$6.send(d);this.setState({inputValue:""});this.$23();b("LiveChatPluginLoggerUtil").logActionDEPRECATED("message_sent",c,a,this.state.attachmentsDataMap.size>0?JSON.stringify({attachments:Array.from(this.state.attachmentsDataMap.keys())}):null);b("LiveChatPluginLoggerUtil").logAction("customer_chat_message_sent",c,a,this.state.attachmentsDataMap.size>0?JSON.stringify({attachments:Array.from(this.state.attachmentsDataMap.keys())}):null);b("LiveChatPluginLoggerUtil").logActionFromNewUI("message_send",c,a,"logged_in_chat_tab")}};d.$23=function(){this.$2&&this.$2.removeAllAttachments()};d.focus=function(){this.$5&&this.$5.focusInput()};return c}(l.PureComponent);a.contextType=b("MessagingPluginContext");e.exports=a}),null); __d("MPNDesktopThreadPage.react",["cx","JSResource","LiveChatPluginConstants","LiveChatPluginLoggerUtil","MessagingPluginContext","MPNDesktopDialogHeader.react","MPNEndChatPrompt.react","lazyLoadComponent","MessengerSpinner.react","MPNDesktopGuestUpgradeUpsellPrompt.react","MessengerState.bs","MPNBlockedPageComposer.react","MPNLocalState","MPNDesktopMessageComposer.react","MPNXDMessageManager","MPNConstants","React","UnverifiedXD","MPNIdentity","emptyFunction"],(function(a,b,c,d,e,f,g){"use strict";var h=b("lazyLoadComponent")(b("JSResource")("MessagingPluginDialogBody.react").__setRef("MPNDesktopThreadPage.react")),i=b("MessengerState.bs").jsComponent,j=b("MPNLocalState").MPNChatState,k=b("MPNConstants").MPNUpgradePrompt,l=b("React"),m=b("MPNIdentity").MPNIdentity,n=b("MPNIdentity").MPNIdentityState;a=function(a){babelHelpers.inheritsLoose(c,a);function c(){var b,c;for(var d=arguments.length,e=new Array(d),f=0;f0;break;case"hide":b=!1;break;default:break}if(!b)return;this.$3=window.setTimeout(function(){a.$9()},c)};d.$9=function(){this.context.state.optimisticStorageState.visibility==="hidden"&&b("MPNNavigation").maximizePlugin(this.context,!0)};d.$6=function(){var a=this;b("MPNXDMessageManager").subscribeEvent("plugin_wrapper","message","CustomerChat.SDK.Called",function(c){var d=a.context.state,e=d.pageID,f=d.greetingDialogDelay,g=d.threadCSSColor,h=d.loggedInGreeting;d=d.loggedOutGreeting;c=b("LiveChatPluginLoggerUtil").EVENTMAP[c.data.event];b("LiveChatPluginLoggerUtil").logImpressionEvents(c,e,JSON.stringify({greetingDialogDelay:f}),g,h,d)});b("MPNXDMessageManager").subscribeEvent("plugin_wrapper","message","updateCustomerChat",function(c){var d=a.context,e=d.state;d=d.dispatchAction;var f=e.loggedInGreeting,g=e.loggedOutGreeting;e=e.refParam;try{c=(c=c.data)==null?void 0:(c=c.message)==null?void 0:c.params;if(c==null)return;c=JSON.parse(c);var h=b("LiveChatPluginUtils").getSanitizedGreetingText(c.logged_in_greeting),i=b("LiveChatPluginUtils").getSanitizedGreetingText(c.logged_out_greeting);d({type:"SDK_UPDATE",loggedInGreeting:(d=h)!=null?d:f,loggedOutGreeting:(h=i)!=null?h:g,refParam:(d=c.ref)!=null?d:e})}catch(a){}});b("MPNXDMessageManager").subscribeEvent("plugin_wrapper","message","CustomerChat.isDialogHidden",function(c){c=((c=c.data.params)==null?void 0:c.is_dialog_hidden)==!0?"hidden":"not-hidden";b("MPNStorage").setVisibility(c);a.context.dispatchAction({type:"UPDATE_DIALOG_VISIBILITY",dialogVisibility:c})})};d.render=function(){this.actionOnInit==o.CREATE_GUEST_SESSION?(this.actionOnInit=o.NONE,this.onContinueAsGuest(function(){b("MPNStorage").clearRedirectCommand()})):this.actionOnInit==o.START_NEW_THREAD?(this.actionOnInit=o.NONE,b("MPNStorage").clearRedirectCommand(),this.openThreadWithCurrentFBUser()):this.actionOnInit==o.GUEST_UPGRADE?(this.actionOnInit=o.NONE,b("MPNStorage").clearRedirectCommand(),b("MessagingPluginGuestUpgradeActions").clearGuestStorage(this.context),b("MessagingPluginGuestUpgradeActions").setPluginStateToUpgradedThread(this.context)):this.actionOnInit==o.GUEST_UPGRADE_SWITCH_ACCOUNT&&(this.actionOnInit=o.NONE,b("MPNStorage").clearRedirectCommand(),j.subscribeLoggedInUserChanges(function(a,c){a=b("MPNStorage").getFBStorageState();a!=null&&b("MPNStorage").setFBStorageState(babelHelpers["extends"]({},a,{rdr:h.GUEST_UPGRADE}));b("MPNXDMessageManager").reloadPlugin()},250));return this.context.state.optimisticStorageState.visibility=="not-hidden"||this.iconIframeLoaded?n.jsx(b("MPNDesktopRoute.react"),{path:this.initialPath,ActionDelegate:this.ActionDelegate}):null};d.$10=function(){var a=b("MPNStorage").getFBStorageState(),c=j.currentUserID();if(a==null||c==null)return;var d={path:m.THREAD_VIEW,chatState:l.LOGGED_IN_CHAT_STARTED,visibility:"not-hidden"};b("MPNStorage").setFBStorageState(babelHelpers["extends"]({},a,{currentPath:d.path,chatState:d.chatState,userID:c}));b("MPNStorage").setThirdPartyStorageState(d);this.context.dispatchAction({type:"START_CHAT",optimisticStorageState:d})};d.openThreadWithCurrentFBUser=function(){var a=this.context.state,c=a.pageID,d=a.requestID,e=a.refParam,f=a.refererUri;a=a.locale;c=b("XMNPlatformCustomerChatPluginOpenThreadController").getURIBuilder().setFBID("page_id",c).setString("ref",e).setString("referer_uri",f).setString("request_id",d).setString("locale",a).getRequest_LEGACY_UNTYPED(new(b("AsyncRequest"))());c.setAllowCrossPageTransition(!0).setMethod("POST").send();this.$10()};d.openThreadWithInterstitial=function(a){var c=this,d=this.context.state,e=d.pageID;d=d.requestID;new(b("PluginOptin"))("customer_chat").addLoginParams({logged_in:!0,page_id:e,request_id:d,switch_user:!1}).start();b("Arbiter").subscribeOnce(b("Plugin").CONNECT,function(){c.$10(),a!=null&&a()})};d.onContinueAsGuest=function(a){var c=this,d=this.context,e=d.state,f=d.dispatchAction,g=e.pageID,h=e.locale,k=e.requestID;b("CreateCustomerChatPluginGuestUserMutation").commit({input:{page_id:g,locale:h}},{onSuccess:function(c){var d,n;d=(d=c.create_customer_chat_plugin_guest_user)==null?void 0:d.session_key;n=(n=c.create_customer_chat_plugin_guest_user)==null?void 0:n.fbid;c=(c=c.create_customer_chat_plugin_guest_user)==null?void 0:c.access_token;if(d!=null&&n!=null&&c!=null){d=b("MPNStorage").getFBStorageState();var o={path:m.THREAD_VIEW,chatState:l.GUEST_CHAT_STARTED,visibility:"not-hidden",showUpgradePrompt:i.NOT_SHOWN};if(d!=null){var p=Date.now()+b("LiveChatPluginConstants").GUEST_SESSION_STORAGE_VALIDITY_MS;b("MPNStorage").setFBStorageState(babelHelpers["extends"]({},d,{currentPath:o.path,chatState:o.chatState,userID:n,accessToken:c,expirationTimestamp:p,showUpgradePrompt:i.NOT_SHOWN}))}j.changeIdentityToGuest(n,c);f({type:"START_CHAT",optimisticStorageState:o,accessToken:c,guestID:n});d=b("XMNPlatformCustomerChatPluginOpenThreadController").getURIBuilder().setFBID("page_id",g).setString("ref",e.refParam).setString("referer_uri",e.refererUri).setString("request_id",k).setString("access_token",c).setString("locale",h).getRequest_LEGACY_UNTYPED(new(b("AsyncRequest"))());d.setAllowCrossPageTransition(!0).setMethod("POST").send();a(n,c)}},onFailure:function(a){var d=a.message.match(/\"error\":([0-9]+)/);d=d&&d.length>=2?d[1]:null;d=JSON.stringify({maybe_error_code:d,domain:c.context.state.originDomain,request_id:c.context.state.requestID,error:a.message});b("LiveChatPluginLoggerUtil").logImpressionEvents("customer_chat_guest_account_creation_failed",g,d,null,null,null);b("MPNStorage").clearFBStorageState();b("MPNStorage").clearThirdPartyStorageState();b("MPNXDMessageManager").reloadPlugin()}})};return c}(n.Component);a.contextType=b("MessagingPluginContext");e.exports=a}),null); __d("MessagingPluginDesktopRoot",["cx","CometBlueBridgeKeyCommandListener.react","LiveChatPluginErrorBoundary.react","MessagingPluginPathUtils","MessagingPluginStateProvider","MPNConstants","MPNDesktopWrapper.react","MPNIdentity","MPNLocalState","MPNStorage","MPNXDMessageManager","React","ReactDOM","URI","performanceAbsoluteNow"],(function(a,b,c,d,e,f,g){"use strict";var h,i,j=b("MessagingPluginPathUtils").MessagingPluginPathUtils,k=b("MessagingPluginPathUtils").MPN_PATH,l=b("MPNConstants").MPNRedirect,m=b("MPNConstants").MPNUpgradePrompt,n=b("MPNIdentity").MPNIdentity,o=b("MPNIdentity").MPNIdentityState,p=b("MPNLocalState").MPNChatState,q=b("MPNLocalState").MPNLocalStatePath,r=b("React");a=function(){function a(a){var c=a.pageID,d=a.container,e=a.serverTime,f=a.pagePassesSentryTest,g=a.hasMessagingPermission,i=a.isMuted,j=a.isPageBlocked,k=a.isBusinessActive,l=a.reloaded,m=a.requestID,n=a.refererUri,o=a.originDomain,p=a.soundURLs,q=a.hasGuestMode,r=a.showUpgradeUpsellPrompt,s=a.appSwitchUri,t=a.upgradeAppSwitchUri,u=a.storedStates,v=a.isComposerDisabled,w=a.hasPersistentMenu,x=a.pageName,y=a.pageProfilePictureUri,z=a.viewerProfilePicureUri,A=a.pageResponsiveness,B=a.isInstantlyResponsive,C=a.refParam,D=a.pageVerifiedStatus,E=a.greetingDialogDelay,F=a.greetingDialogDisplay,G=a.greetingDialogFadeDelay,H=a.loggedInGreeting,I=a.loggedOutGreeting,J=a.threadCSSColor,K=a.locale;a=a.icebreakers;var L=(h||(h=b("performanceAbsoluteNow")))();try{this.$1(c,d,e,f,g,i,j,k,l,m,n,o,p,s,t,q,r,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,L,K,a)}catch(a){}}var c=a.prototype;c.$1=function(a,c,d,e,f,g,j,k,q,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S){var T=this,U=!1;b("MPNStorage").initialize(u,a,s);n.hasStorageAccess(function(q){n.init(q);var J=s,M=A;M||(M=T.$2(L,K),b("MPNStorage").setThirdPartyStorageState(M));var Q=!1,V,W,X=M.visibility;if(q){b("MPNStorage").isAccessTokenExpired()&&(b("MPNStorage").clearFBStorageState(),M=T.$2(L,K),b("MPNStorage").setThirdPartyStorageState(M));var Y=b("MPNStorage").getFBStorageState();if(Y!=null&&Y.requestID!=null&&Y.requestID!=""){var Z=Y.requestID;(Y.rdr==l.NEW_GUEST_SESSION||Y.rdr==l.ITP_CONTINUE_SESSION)&&(J=Z,b("MPNStorage").initialize(u,a,Z))}U=b("MPNStorage").setInitialStateIfNecessary(!1,X);Y=b("MPNStorage").getFBStorageState();if(Y!=null){Q=Y.chatState!=p.CHAT_NOT_STARTED;V=Y.accessToken;W=Y.userID;X=Y.visibility;M={path:Y.currentPath,chatState:Y.chatState,visibility:Y.visibility,showUpgradePrompt:(Z=Y.showUpgradePrompt)!=null?Z:m.NOT_SHOWN};b("MPNStorage").setThirdPartyStorageState(M)}}Y=T.$3(q,A);X=="hidden"&&b("MPNXDMessageManager").updateAppearance(!0,!0,"false","false",null,"true",Y);n.subscribeLoggedInUserChanges(function(a,c){n.currentUserState()!=o.GUEST&&(b("MPNStorage").clearFBStorageState(),b("MPNStorage").clearThirdPartyStorageState()),b("MPNXDMessageManager").reloadPlugin()});Z={pageID:a,pageName:D,pagePassesSentryTest:e,hasMessagingPermission:f,isMuted:g,isPageBlocked:j,pageProfilePictureUri:E,viewerProfilePicureUri:F,threadCSSColor:P,pageResponsiveness:G,isInstantlyResponsive:H,isComposerDisabled:B,hasPersistentMenu:C,greetingDialogDelay:K,greetingDialogDisplay:L,loggedInGreeting:N,loggedOutGreeting:O,refParam:I,refererUri:t,originDomain:u,appSwitchUri:w,upgradeAppSwitchUri:x,locale:R,isBusinessActive:k,icebreakers:S,initialRequestUri:(i||(i=b("URI"))).getRequestURI(),requestID:J,chatStarted:Q,accessToken:V,guestID:W,optimisticStorageState:M,soundURLs:v,isInitialLoad:U,hasGuestMode:y,showUpgradeUpsellPrompt:z,pluginMountTime:(h||(h=b("performanceAbsoluteNow")))(),serverTime:d,upgradeUpsellPrompt:m.NOT_SHOWN,messageCount:null,cookieAccessDenied:!1};b("ReactDOM").render(r.jsx(b("LiveChatPluginErrorBoundary.react"),{pageID:a,children:r.jsx(b("CometBlueBridgeKeyCommandListener.react"),{children:r.jsx(b("MessagingPluginStateProvider"),{initialState:Z,children:r.jsx("div",{className:"_95ry",children:r.jsx(b("MPNDesktopWrapper.react"),{path:Y,redirectCommand:b("MPNStorage").getRedirectCommand()})})})})}),c)})};c.$2=function(a,b){a=a==="hide"||b>0;return{path:q.WELCOME_PAGE,chatState:p.CHAT_NOT_STARTED,visibility:a?"hidden":"not-hidden",showUpgradePrompt:m.NOT_SHOWN}};c.$3=function(a,c){var d=k.WELCOME;if(a){a=b("MPNStorage").getFBStorageState();a!=null&&a.currentPath!=null?(d=j.toMobilePath(a.currentPath),b("MPNXDMessageManager").storeThirdPartyState(a.currentPath,a.chatState)):c!=null&&a==null&&b("MPNXDMessageManager").removeThirdPartyState()}else c!=null&&c.path!=null&&(d=j.toMobilePath(c.path)),d==k.THREAD&&(d=k.ITPCONTINUE);return d};return a}();e.exports=a}),null);