BizWebCometOmniAiInboxRoot.entrypoint",["BizWebCometOmniAiInboxRootAIConversationsQuery$Parameters","JSResourceForInteraction"],(function(t,n,r,o,a,i,l){"use strict";var e={getPreloadProps:function(t){var e,r,o,a,i,l,s,u,c;return{extraProps:{conversationID:(e=t.routeParams.conversation_id)!=null?e:"",customerScenarios:(r=t.routeParams.customer_scenarios)!=null?r:[],customTag:(o=t.routeParams.custom_tag)!=null?o:"",endDate:(a=t.routeParams.end_date)!=null?a:"",hasPurchase:t.routeParams.has_purchase,ratings:(i=t.routeParams.ratings)!=null?i:[],startDate:(l=t.routeParams.start_date)!=null?l:"",turns:(s=t.routeParams.turns)!=null?s:[]},queries:{queryConnReference:{environmentProviderOptions:{},parameters:n("BizWebCometOmniAiInboxRootAIConversationsQuery$Parameters"),variables:{page_id:(u=t.routeParams.asset_id)!=null?u:"",parameters:{page_id:(c=t.routeParams.asset_id)!=null?c:""}}}}}},root:r("JSResourceForInteraction")("BizWebCometOmniAiInboxRoot.react").__setRef("BizWebCometOmniAiInboxRoot.entrypoint")};l.default=e}),98);
-----
BizWebCometOmniAiInboxRootAIConversationsQuery$Parameters",["BizWebCometOmniAiInboxRootAIConversationsQuery_facebookRelayOperation"],(function(t,n,r,o,a,i){"use strict";var e={kind:"PreloadableConcreteRequest",params:{id:n("BizWebCometOmniAiInboxRootAIConversationsQuery_facebookRelayOperation"),metadata:{},name:"BizWebCometOmniAiInboxRootAIConversationsQuery",operationKind:"query",text:null}};a.exports=e}),null);
-----
BizWebCometOmniAiInboxRoot.react",["BizAISandboxReadOnlyMode.react","BizWebCometBizAIInsightContextProvider","BizWebCometImpressionLoggingWrapper.react","BizWebCometOmniAiInboxConsts.react","BizWebCometOmniAiInboxConversationUtils","BizWebCometOmniAiInboxFiltersBarV2.react","BizWebCometOmniAiInboxGeoTourRetrigger.react","BizWebCometOmniAiInboxRootAIConversationsQuery.graphql","BizWebCometOmniAiInboxTable.react","CometPlaceholder.react","GeoCard.react","GeoDateRangePresets","GeoFlexbox.react","GeoGenericCardHeader.react","GeoHStack.react","GeoHeading.react","GeoOnboardingPill.react","GeoSpinner.react","GeoText.react","GeoTooltip.react","LocalDate","MessagingAIOnboardingFlowLoggingUtils","RelayHooks","Timezone","XFBBizAICustomerScenario.facebook","geoWidth","nux:1173","react","useBizKitBusinessIDEnforce","useBizWebUpdateRouteParams","useBoolean"],(function(t,n,r,o,a,i,l){"use strict";var e,s,u,c=u||(u=o("react")),d=u,m=d.useContext,p=d.useEffect,_=d.useMemo,f=d.useRef,g=d.useState,h=o("Timezone").getEnvironmentTimezoneID()||o("Timezone").UTC,y=r("LocalDate").today(h),C={interval:r("GeoDateRangePresets").LAST_7_DAYS.calculateInterval(y)},b={mainContainer:{height:"x5yr21d",$$css:!0},onboardingPill:{paddingTop:"x1y1aw1k",$$css:!0},scrollableContainer:{height:"x5yr21d",overflowY:"x1odjw0f",$$css:!0}};function v(e){var t=e.customerScenarios,n=e.filtersBarRef,a=e.handleRatingChange,i=e.hasPurchase,l=e.searchedConvID,s=e.searchedCustomTag,u=e.selectedRatings,d=e.selectedTurns,m=e.setCustomerScenarios,p=e.setCustomTag,_=e.setHasPurchase,f=e.setSearchedConvID,g=e.setSelectedTurns,h=e.setShouldRetriggerNuxTrue;return c.jsxs(c.Fragment,{children:[c.jsx(r("GeoHeading.react"),{level:1,children:o("BizWebCometOmniAiInboxConsts.react").CONVERSATIONS_TAB_HEADER}),c.jsxs(r("GeoText.react"),{children:[" ",o("BizWebCometOmniAiInboxConsts.react").CONVERSATIONS_TAB_DESCRIPTION]}),c.jsx(r("GeoTooltip.react"),{content:o("BizWebCometOmniAiInboxConsts.react").CONVERSATIONS_TAB_TIP}),c.jsx(r("GeoFlexbox.react"),{xstyle:b.onboardingPill,children:c.jsx(r("GeoOnboardingPill.react"),{onPress:function(){h()}})}),c.jsx(r("BizWebCometOmniAiInboxFiltersBarV2.react"),{customerScenarios:t,filtersBarRef:n,handleRatingChange:a,hasPurchase:i,searchedConvID:l,searchedCustomTag:s,selectedRatings:u,selectedTurns:d,setCustomTag:p,setCustomerScenarios:m,setHasPurchase:_,setSearchedConvID:f,setSelectedTurns:g})]})}v.displayName=v.name+" [from "+i.id+"]";var S=(s=n("nux:1173"))==null?void 0:s("BIZAI_WEBCHAT_CONVERSATIONS_NUX");function R(t){var a,l,s,u,d,h,y,R,L,E=r("useBoolean")(!1),k=E.setFalse,I=E.setTrue,T=E.value,D=f(null),x=f(null),$=(a=t.queries.queryConnReference.variables.parameters.page_id)!=null?a:"",P=r("useBizKitBusinessIDEnforce")(),N=m(o("BizWebCometBizAIInsightContextProvider").BizWebCometBizAIInsightContext);p(function(){var e=o("BizWebCometOmniAiInboxConversationUtils").clampInboxConversationDateRange(N==null?void 0:N.dateRange);e!=null&&(N==null?void 0:N.setDateRange)!=null&&N.setDateRange(e)},[N]);var M=g([]),w=M[0],A=M[1];p(function(){var e;((e=t.extraProps)==null?void 0:e.ratings)!=null&&A(Array.from(t.extraProps.ratings))},[(l=t.extraProps)==null?void 0:l.ratings]);var F=function(t){A(t.map(Number))},O=_(function(){return w.includes(0)?null:w.length>0?Array.from(w.filter(function(e){return e>=1&&e<=5})):null},[w]),B=(s=N==null?void 0:N.dateRange)!=null?s:C,W=_(function(){var e,t;return(e=B==null||(t=B.interval)==null?void 0:t.start.toISOString())!=null?e:""},[B]),q=_(function(){var e,t;return(e=B==null||(t=B.interval)==null||(t=t.end.subtractDays(1))==null?void 0:t.toISOString())!=null?e:""},[B]),U=g([]),V=U[0],H=U[1];p(function(){var e;if(((e=t.extraProps)==null?void 0:e.customerScenarios)!=null){var n=t.extraProps.customerScenarios.map(function(e){return r("XFBBizAICustomerScenario.facebook").cast(e==null?void 0:e.toUpperCase())}).filter(Boolean);H(n)}},[(u=t.extraProps)==null?void 0:u.customerScenarios]);var G=g([]),z=G[0],j=G[1];p(function(){var e;if(((e=t.extraProps)==null?void 0:e.turns)!=null){var n=t.extraProps.turns.map(function(e){return o("BizWebCometOmniAiInboxConsts.react").TurnsFilterOption.cast(e)}).filter(Boolean);j(n)}},[(d=t.extraProps)==null?void 0:d.turns]);var K=_(function(){return o("BizWebCometOmniAiInboxConversationUtils").convertSelectedTurnsToGraphQLParam(z)},[z]),Q=g(!1),X=Q[0],Y=Q[1];p(function(){var e,n;((e=t.extraProps)==null?void 0:e.hasPurchase)!=null&&((n=t.extraProps)==null?void 0:n.hasPurchase)===!0&&Y(!0)},[(h=t.extraProps)==null?void 0:h.hasPurchase]);var J=(y=N==null?void 0:N.attributionWindow)!=null?y:1,Z=_(function(){return X?J===7?{has_purchase_1d:null,has_purchase_7d:!0}:{has_purchase_1d:!0,has_purchase_7d:null}:{has_purchase_1d:null,has_purchase_7d:null}},[X,J]),ee=g(null),te=ee[0],ne=ee[1];p(function(){var e,n;ne((e=(n=t.extraProps)==null?void 0:n.conversationID)!=null?e:null)},[(R=t.extraProps)==null?void 0:R.conversationID]);var re=g(null),oe=re[0],ae=re[1];p(function(){var e,n;ae((e=(n=t.extraProps)==null?void 0:n.customTag)!=null?e:null)},[(L=t.extraProps)==null?void 0:L.customTag]);var ie=r("useBizWebUpdateRouteParams")();p(function(){var e,t,n,r;ie({conversation_id:te,custom_tag:oe,customer_scenarios:V.map(function(e){return e}),end_date:(e=B==null||(t=B.interval)==null?void 0:t.end.toISOString())!=null?e:"",has_purchase:X,ratings:w,start_date:(n=B==null||(r=B.interval)==null?void 0:r.start.toISOString())!=null?n:"",turns:z},{replace:!0})},[B,te,ie,w,V,z,X,oe]);var le=o("RelayHooks").usePreloadedQuery(e!==void 0?e:e=n("BizWebCometOmniAiInboxRootAIConversationsQuery.graphql"),babelHelpers.extends({},t.queries.queryConnReference,{variables:{page_id:$,parameters:{conversation_id:te,csat_scores:O,custom_tag:oe,customer_scenarios:V,end_date:q,has_purchase_1d:Z.has_purchase_1d,has_purchase_7d:Z.has_purchase_7d,page_id:$,start_date:W,turns:K}}}));return c.jsx(r("BizWebCometImpressionLoggingWrapper.react"),{onImpression:function(){o("MessagingAIOnboardingFlowLoggingUtils").logEvents("impression_omniagent_conversations",$,P,null,null,{customer_scenario:JSON.stringify(V),end_date:q,start_date:W})},children:function(t){return c.jsxs(r("GeoCard.react"),{containerRef:t,"data-testid":void 0,header:c.jsx(r("GeoGenericCardHeader.react"),{children:c.jsx(v,{customerScenarios:V,filtersBarRef:D,handleRatingChange:F,hasPurchase:X,searchedConvID:te,searchedCustomTag:oe,selectedRatings:w,selectedTurns:z,setCustomTag:ae,setCustomerScenarios:H,setHasPurchase:Y,setSearchedConvID:ne,setSelectedTurns:j,setShouldRetriggerNuxTrue:I})}),children:[c.jsxs(r("GeoHStack.react"),{context:"container",relation:"related",xstyle:b.mainContainer,children:[c.jsx(r("GeoFlexbox.react"),{alignItems:"start","data-testid":void 0,xstyle:[r("geoWidth").percentWidth60,b.scrollableContainer],children:c.jsx(r("CometPlaceholder.react"),{fallback:c.jsx(r("GeoSpinner.react"),{center:!0,loggingName:i.id}),name:i.id,children:c.jsx(r("BizWebCometOmniAiInboxTable.react"),{aiConvoQuery:le})})}),c.jsx(r("GeoFlexbox.react"),{"data-testid":void 0,shrink:0,xstyle:[r("geoWidth").percentWidth40,b.scrollableContainer],children:c.jsx(r("BizAISandboxReadOnlyMode.react"),{pageFragmentRef:le.page,pageID:$,ratingModalRef:x})})]}),S!=null&&c.jsx(S,{filtersBarRef:D,onRetriggerComplete:k,ratingModalRef:x,shouldRetrigger:T}),S==null&&T&&c.jsx(r("BizWebCometOmniAiInboxGeoTourRetrigger.react"),{filtersBarRef:D,onRetriggerComplete:k,ratingModalRef:x,shouldRetrigger:T})]})}})}R.displayName=R.name+" [from "+i.id+"]",l.default=R}),98);
-----
BizWebCometOmniAiInboxRootAIConversationsQuery.graphql",["BizWebCometOmniAiInboxRootAIConversationsQuery_facebookRelayOperation","relay-runtime"],(function(t,n,r,o,a,i){"use strict";var e=(function(){var e={defaultValue:null,kind:"LocalArgument",name:"page_id"},t={defaultValue:null,kind:"LocalArgument",name:"parameters"},r={kind:"Variable",name:"parameters",variableName:"parameters"},o=[{kind:"Variable",name:"id",variableName:"page_id"}],a=[{kind:"Literal",name:"first",value:10},r],i={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null};return{fragment:{argumentDefinitions:[e,t],kind:"Fragment",metadata:null,name:"BizWebCometOmniAiInboxRootAIConversationsQuery",selections:[{args:[r],kind:"FragmentSpread",name:"BizWebCometOmniAiInboxTable_aiConversationRefetchable"},{alias:null,args:o,concreteType:"Page",kind:"LinkedField",name:"page",plural:!1,selections:[{args:null,kind:"FragmentSpread",name:"BizAISandboxReadOnlyMode_page"}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[t,e],kind:"Operation",name:"BizWebCometOmniAiInboxRootAIConversationsQuery",selections:[{alias:null,args:a,concreteType:"GraphQLAIResponsesV2Connection",kind:"LinkedField",name:"xfb_ai_responses_conversations_query_v2",plural:!1,selections:[{alias:null,args:null,concreteType:"GraphQLAIResponsesV2Edge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:null,args:null,concreteType:"XFBOmniAIStructuredConversation",kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"creation_time",storageKey:null},i,{alias:null,args:null,kind:"ScalarField",name:"csat_score",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"additional_feedback",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"business_feedback_rating",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"incorrect_information",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"not_helpful",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"tone_issue",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"other",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"conversation_token",storageKey:null},{alias:null,args:null,concreteType:"XFBOmniAIStructuredConversationMessages",kind:"LinkedField",name:"messages",plural:!1,selections:[{alias:null,args:null,concreteType:"XFBOmniAIStructuredConversationMessage",kind:"LinkedField",name:"all_messages",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"bot",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"user",storageKey:null},{alias:null,args:null,concreteType:"XFBOmniAIMessageDebugInfo",kind:"LinkedField",name:"debug_info",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"faq_ids",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"knowledge_ids",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"product_ids",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"topic_ids",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"thought",storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"tags",storageKey:null},{alias:null,args:null,concreteType:"XFBOmniAIConversationCustomTag",kind:"LinkedField",name:"custom_tags",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"tag_id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"custom_tag",storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"XFBOmniAIOrderInfo",kind:"LinkedField",name:"order_info",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"one_day_total_price",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"seven_day_total_price",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"one_day_order_url",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"seven_day_order_url",storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"PageInfo",kind:"LinkedField",name:"page_info",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"end_cursor",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"has_next_page",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:a,filters:["parameters"],handle:"connection",key:"BizWebCometOmniAiInboxTable__xfb_ai_responses_conversations_query_v2",kind:"LinkedHandle",name:"xfb_ai_responses_conversations_query_v2"},{alias:null,args:o,concreteType:"Page",kind:"LinkedField",name:"page",plural:!1,selections:[{alias:null,args:null,concreteType:"XFBAIChatPluginInstance",kind:"LinkedField",name:"biz_ai_chat_plugin_instance",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"theme_color",storageKey:null},i],storageKey:null},i],storageKey:null}]},params:{id:n("BizWebCometOmniAiInboxRootAIConversationsQuery_facebookRelayOperation"),metadata:{},name:"BizWebCometOmniAiInboxRootAIConversationsQuery",operationKind:"query",text:null}}})();n("relay-runtime").PreloadableQueryRegistry.set(e.params.id,e),a.exports=e}),null);
-----
BizWebCometOmniAiInboxRootAIConversationsQuery_facebookRelayOperation",[],(function(a,b,c,d,e,f){e.exports="24731141676511142"}),null);
-----