BizAIWebAgentRootComponent.react",["BizAIWebAgentAppContextProvider.react","BizAIWebAgentChatMessageListFragmentQuery.graphql","BizAIWebAgentRootComponentQuery.graphql","BizAIWebAgentSharedState","BizAIWebAgentSharedStateContextProvider.react","BizAIWebAgentThemeProvider.react","BizAIWebAgentUserContext.react","CometAIComposerProvider.react","CometAIProvider.react","CometErrorBoundary.react","CometPlaceholder.react","CometRelay","CometRelayErrorHandling","CometScrollableArea.react","JSResource","RelayHooks","UnverifiedXD","lazyLoadComponent","nullthrows","react","useBizAIWebAgentAppContext","useBizAIWebAgentFalcoLogger","useBizAIWebAgentParentWindowResize","useBizAIWebAgentSaveAccessToken","useBizWebCometBizAIMWPSandboxContext.hook","useEnableXDMessaging"],(function(t,n,r,o,a,i,l){"use strict";var e,s,u=s||(s=o("react")),c=s,d=c.useEffect,m=c.useMemo,p=c.useState,_=400,f=r("lazyLoadComponent")(r("JSResource")("BizAIWebAgentMbsApiRegistar.react").__setRef("BizAIWebAgentRootComponent.react")),g=r("lazyLoadComponent")(r("JSResource")("BizAIWebAgentChatContainer.react").__setRef("BizAIWebAgentRootComponent.react"));function h(e){var t=e.extraProps,n=e.queries,a=r("useBizAIWebAgentFalcoLogger")({accessToken:String(t==null?void 0:t.accessToken),conversationID:String(t==null?void 0:t.conversationFBIDFromXController),instanceID:String(t==null?void 0:t.instanceID),pageID:String(t==null?void 0:t.pageID)}),l=a[0];return u.jsx(r("CometErrorBoundary.react"),{fallback:function(n){return u.jsx(b,{channel:t==null?void 0:t.channel,error:n})},onError:function(t){l({errorMessage:t.message,errorStack:t.stack,event:"ai_chat_plugin_app_error",eventState:"failure",logMessage:"Chat plugin React app crashed!"}),o("CometRelayErrorHandling").markErrorAsHandled(t)},children:u.jsx(y,{extraProps:r("nullthrows")(t,"Unexpected null value for extraProps ["+i.id+"]"),queryReference:n.root})})}h.displayName=h.name+" [from "+i.id+"]";function y(t){var a,l,s,c,d,f,g,h,y,b,v,S,R,L=t.extraProps,E=t.queryReference,k=o("RelayHooks").usePreloadedQuery(e!==void 0?e:e=n("BizAIWebAgentRootComponentQuery.graphql"),E);r("useEnableXDMessaging")(r("nullthrows")(L.iframeName,"Unexpected null value for extraProps.iframeName ["+i.id+"]"),L.channel,(a=L.pageURL)!=null?a:""),r("useBizAIWebAgentSaveAccessToken")(r("nullthrows")(L.accessToken,"Unexpected null value for extraProps.accessToken ["+i.id+"]"),L.isExistingAccessToken===!0,r("nullthrows")(L.partnerUUID,"Unexpected null value for extraProps.partnerUUID ["+i.id+"]"),L.channel);var I=p(null),T=I[0],D=I[1];r("useBizAIWebAgentParentWindowResize")(function(e){var t=e.parentWidth;D(t)});var x=o("CometRelay").ConnectionHandler.getConnectionID((l=L.threadID)!=null?l:"",r("BizAIWebAgentChatMessageListFragmentQuery.graphql").fragment.name+"_messages"),$=r("useBizWebCometBizAIMWPSandboxContext.hook")(),P=$!=null,N={baiwaExternalRedirectPopupEnabled:(s=k.xfb_live_chat_only_person)==null?void 0:s.baiwa_external_redirect_popup_enabled},M=m(function(){var e,t;return(e=(t=k.xfb_live_chat_only_person)==null?void 0:t.baiwaQE)!=null?e:[]},[(c=k.xfb_live_chat_only_person)==null?void 0:c.baiwaQE]),w=(d=(f=k.xfb_live_chat_only_person)==null||(f=f.ai_chat_plugin_instance)==null?void 0:f.disable_add_to_cart)!=null?d:!1,A=(g=(h=k.xfb_live_chat_only_person)==null||(h=h.ai_chat_plugin_instance)==null?void 0:h.composer_placeholder_text)!=null?g:null,F=(y=(b=k.xfb_live_chat_only_person)==null||(b=b.ai_chat_plugin_instance)==null?void 0:b.product_card_price_display_format)!=null?y:"SINGLE_PRODUCT_PRICE",O=T!=null&&T<_&&L.isShopifyThemeEditor,B=(v=(S=k.xfb_live_chat_only_person)==null||(S=S.ai_chat_plugin_instance)==null?void 0:S.allow_list_domains)!=null?v:[],W=m(function(){if(M==null)return!1;var e=M.find(function(e){return e.qeUniverseName==="MWP_UNIVERSE_2025"});if((e==null?void 0:e.qeParamsToValueBoolMap)!=null){var t=e.qeParamsToValueBoolMap.find(function(e){return e.qeBoolParamName==="hide_mwp"});if(t!=null){var n;return(n=t.qeBoolValue)!=null?n:!1}}return!1},[M]),q=m(function(){if(M==null)return!1;var e=M.filter(function(e){return e.qeUniverseName==="MWP_UNIVERSE_2025"});for(var t of e)if((t==null?void 0:t.qeParamsToValueBoolMap)!=null){var n=t.qeParamsToValueBoolMap.find(function(e){return e.qeBoolParamName==="presence_only"});if(n!=null){var r;return(r=n.qeBoolValue)!=null?r:!1}}return!1},[M]),U=m(function(){if(M==null)return!1;var e=M.filter(function(e){return e.qeUniverseName==="MWP_UNIVERSE_2025"});for(var t of e)if((t==null?void 0:t.qeParamsToValueBoolMap)!=null){var n=t.qeParamsToValueBoolMap.find(function(e){return e.qeBoolParamName==="webchat_only"});if(n!=null){var r;return(r=n.qeBoolValue)!=null?r:!1}}return!1},[M]);return u.jsx(o("BizAIWebAgentAppContextProvider.react").BizAIWebAgentAppContextProvider,{accessToken:r("nullthrows")(L.accessToken,"Unexpected null value for extraProps.accessToken ["+i.id+"]"),agentName:r("nullthrows")(L.agentName,"Unexpected null value for extraProps.agentName ["+i.id+"]"),agentProfilePicUrl:L.agentProfilePicUrl,agentTestId:L.agentTestId,allowListDomains:[].concat(B),autoCollapseDurationMs:L.autoCollapseDurationMs,composerPlaceholderText:A,contextEnvelopeConfig:L.contextEnvelopeConfig,conversationFBIDFromXController:L.conversationFBIDFromXController,conversationFlushStateFromXController:L.conversationFlushStateFromXController,conversationTokenFromXController:L.conversationToken,customTerms:L.customTerms,debugToolEnabled:L.debugToolEnabled,debugToolQRCode:L.debugToolQRCode,desktopInitialExpansionState:L.desktopInitialExpansionState,disableAtcButton:w,disableMWPInIAB:L.disableMWPInIAB===!0,disclaimer:r("nullthrows")(L.disclaimer,"Unexpected null value for extraProps.disclaimer ["+i.id+"]"),domainCookie:L.domainCookie,embedEnabled:L.embedEnabled,externalBusinessID:r("nullthrows")(L.externalBusinessID,"Unexpected null value for extraProps.externalBusinessID ["+i.id+"]"),facadeIconType:L.facadeIconType,facadeIconBorderHidden:L.facadeIconBorderHidden,faqPillType:L.faqPillType,faqs:L.faqs,hashedIPAddress:L.hashedIPAddress,iframeName:r("nullthrows")(L.iframeName,"Unexpected null value for extraProps.iframeName ["+i.id+"]"),instanceID:r("nullthrows")(L.instanceID,"Unexpected null value for extraProps.instanceID ["+i.id+"]"),isAtcErrorToastEnabled:L.isAtcErrorToastEnabled,isDebugMode:L.debugModeEnabled===!0,isFirstTimeUser:L.isFirstTimeUser===!0,isFrontendStreamingEnabled:L.isFrontendStreamingEnabled===!0,isMBSSandbox:P,isMobile:L.isMobile===!0||O===!0,isShopifyThemeEditor:L.isShopifyThemeEditor===!0,lcopFeatures:N,lcopID:L.lcopID,mobileInitialExpansionState:L.mobileInitialExpansionState,pageID:r("nullthrows")(L.pageID,"Unexpected null value for extraProps.pageID ["+i.id+"]"),pageURL:L.pageURL,productCardPriceDisplayFormat:F,qeResult:M,qplJoinId:L.qplJoinId,shouldEnableAgentResponseOnDwell:L.shouldEnableAgentResponseOnDwell===!0,shouldHidePluginForExperiment:L.shouldHidePluginForExperiment===!0,shouldDisableFacadeClickForExperiment:q===!0,shouldHidePluginForIncrementalExperiment:W===!0,shouldShowWebchatOnlyForExperiment:U===!0,shouldUsePopupProactiveBanner:L.shouldUsePopupProactiveBanner===!0,threadID:L.threadID,threadMessagesConnectionID:x,welcomeMessage:L.welcomeMessage,xdMessagingChannel:L.channel,children:L.shouldHidePluginForExperiment===!0||W===!0?u.jsx(u.Fragment,{}):u.jsx(C,{deviceBrowserType:(R=L.deviceBrowserType)!=null?R:"desktop",isMBSSandbox:P,isMobile:L.isMobile,themeColor:r("nullthrows")(L.themeColor,"Unexpected null value for extraProps.themeColor ["+i.id+"]")})})}y.displayName=y.name+" [from "+i.id+"]";function C(e){var t=e.deviceBrowserType,n=e.isMBSSandbox,a=e.isMobile,l=e.themeColor,s=o("useBizAIWebAgentAppContext").useBizAIWebAgentAppContext(),c=s!=null?s:{},d=c.desktopInitialExpansionState,m=c.faqs,p=c.mobileInitialExpansionState,_=o("BizAIWebAgentSharedState").buildInitialState({desktopInitialExpansionState:d,deviceBrowserType:t,hasFAQs:m!=null&&m.length>0,isMBSSandbox:n,isMobile:a===!0,mobileInitialExpansionState:p});return u.jsx(r("CometPlaceholder.react"),{fallback:null,name:i.id,children:u.jsx(o("BizAIWebAgentSharedStateContextProvider.react").BizAIWebAgentSharedStateContextProvider,{initialState:_,children:u.jsx(o("BizAIWebAgentThemeProvider.react").BizAIWebAgentThemeProvider,{color:l,isMBSSandbox:n,isMobile:a,children:u.jsx(o("BizAIWebAgentUserContext.react").BizAIWebAgentUserContextProvider,{children:u.jsxs(o("CometAIProvider.react").CometAIProvider,{composer:u.jsx(o("CometAIComposerProvider.react").CometAIComposerProvider,{}),voice:null,children:[u.jsx(g,{}),n&&u.jsx(f,{})]})})})})})}C.displayName=C.name+" [from "+i.id+"]";function b(e){var t=e.channel,n=e.error;return d(function(){t!=null&&(r("UnverifiedXD").send({height:0,type:"resize",width:0},t),r("UnverifiedXD").send({type:"ubaia.chat.failedToLoad"},t))},[t]),null}b.displayName=b.name+" [from "+i.id+"]",l.default=h}),98);
-----
BizAIWebAgentRootComponentQuery.graphql",["BizAIWebAgentRootComponentQuery_facebookRelayOperation","relay-runtime"],(function(t,n,r,o,a,i){"use strict";var e=(function(){var e=[{defaultValue:null,kind:"LocalArgument",name:"input"},{defaultValue:null,kind:"LocalArgument",name:"qe_input"}],t=[{kind:"Variable",name:"input",variableName:"input"}],r={alias:null,args:null,kind:"ScalarField",name:"baiwa_external_redirect_popup_enabled",storageKey:null},o={alias:"baiwaQE",args:[{kind:"Variable",name:"inputs",variableName:"qe_input"}],concreteType:"XFBBizAIWebAgentQEOutput",kind:"LinkedField",name:"baiwa_qe",plural:!0,selections:[{alias:"qeUniverseName",args:null,kind:"ScalarField",name:"qe_universe_name",storageKey:null},{alias:"qeParamsToValueBoolMap",args:null,concreteType:"XFBBizAIWebAgentQEBoolResult",kind:"LinkedField",name:"qe_params_to_value_bool_map",plural:!0,selections:[{alias:"qeBoolParamName",args:null,kind:"ScalarField",name:"qe_bool_param_name",storageKey:null},{alias:"qeBoolValue",args:null,kind:"ScalarField",name:"qe_bool_value",storageKey:null},{alias:"resultType",args:null,kind:"ScalarField",name:"result_type",storageKey:null},{alias:"exposureLogged",args:null,kind:"ScalarField",name:"exposure_logged",storageKey:null}],storageKey:null},{alias:"requestMetadata",args:null,concreteType:"XFBBizAIWebAgentRequestMetadata",kind:"LinkedField",name:"request_metadata",plural:!1,selections:[{alias:"productSurface",args:null,kind:"ScalarField",name:"product_surface",storageKey:null},{alias:"requestSource",args:null,kind:"ScalarField",name:"request_source",storageKey:null}],storageKey:null}],storageKey:null},a={alias:null,args:null,kind:"ScalarField",name:"allow_list_domains",storageKey:null},i={alias:null,args:null,kind:"ScalarField",name:"disable_add_to_cart",storageKey:null},l={alias:null,args:null,kind:"ScalarField",name:"composer_placeholder_text",storageKey:null},s={alias:null,args:null,kind:"ScalarField",name:"product_card_price_display_format",storageKey:null},u={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null};return{fragment:{argumentDefinitions:e,kind:"Fragment",metadata:null,name:"BizAIWebAgentRootComponentQuery",selections:[{alias:null,args:t,concreteType:"LiveChatOnlyPerson",kind:"LinkedField",name:"xfb_live_chat_only_person",plural:!1,selections:[r,o,{alias:null,args:null,concreteType:"XFBAIChatPluginInstance",kind:"LinkedField",name:"ai_chat_plugin_instance",plural:!1,selections:[a,i,l,s],storageKey:null}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:e,kind:"Operation",name:"BizAIWebAgentRootComponentQuery",selections:[{alias:null,args:t,concreteType:"LiveChatOnlyPerson",kind:"LinkedField",name:"xfb_live_chat_only_person",plural:!1,selections:[r,o,{alias:null,args:null,concreteType:"XFBAIChatPluginInstance",kind:"LinkedField",name:"ai_chat_plugin_instance",plural:!1,selections:[a,i,l,s,u],storageKey:null},u],storageKey:null}]},params:{id:n("BizAIWebAgentRootComponentQuery_facebookRelayOperation"),metadata:{},name:"BizAIWebAgentRootComponentQuery",operationKind:"query",text:null}}})();n("relay-runtime").PreloadableQueryRegistry.set(e.params.id,e),a.exports=e}),null);
-----
BizAIMWPSandbox.entrypoint",["BizAIWebAgentRootComponentQuery$Parameters","JSResourceForInteraction"],(function(t,n,r,o,a,i,l){"use strict";var e={getPreloadProps:function(t){var e;return{extraProps:{accessToken:t.accessToken,agentName:t.agentName,agentProfilePictureURL:t.agentProfilePictureURL,conversationToken:t.conversationToken,externalBusinessID:t.externalBusinessID,faqs:t.faqs,instanceID:t.instanceID,onboardingFlowState:t.onboardingFlowState,pageID:t.pageID,partnerUUID:t.partnerUUID,sandboxRef:t.sandboxRef,themeColor:t.themeColor,threadID:t.threadID,welcomeMessage:t.welcomeMessage},queries:{root:{parameters:n("BizAIWebAgentRootComponentQuery$Parameters"),variables:{input:{access_token:{sensitive_string_value:(e=t.accessToken)!=null?e:""}},qe_input:[]}}}}},root:r("JSResourceForInteraction")("BizAIMWPSandboxComponent.react").__setRef("BizAIMWPSandbox.entrypoint")},s=e;l.default=s}),98);
-----
BizAIWebAgentRootComponentQuery$Parameters",["BizAIWebAgentRootComponentQuery_facebookRelayOperation"],(function(t,n,r,o,a,i){"use strict";var e={kind:"PreloadableConcreteRequest",params:{id:n("BizAIWebAgentRootComponentQuery_facebookRelayOperation"),metadata:{},name:"BizAIWebAgentRootComponentQuery",operationKind:"query",text:null}};a.exports=e}),null);
-----
BizAIWebAgentRootComponentQuery_facebookRelayOperation",[],(function(t,n,r,o,a,i){a.exports="25213355304950031"}),null);
-----