AdsCTXCTWAPOGuidanceCardContainer.react",["AdsAPIOptimizationGoals","AdsAdObjectRelayIDUtils","AdsAdvantageAudienceUtils","AdsBulkValueUtils","AdsCTXCTWAPOGuidanceCardContainerDataQuery.graphql","AdsCTXCTWAPOGuidanceCardContainerQuery.graphql","AdsInlineGuidanceContainer.react","AdsPreflightRecommendationCtxCtwapoUpgradePlugin","AdsUEditorCampaignOptimizationGoalUtils","AdsUEditorHooks","AdsUEditorPreflightRecommendationHubURCIntegrationGatingUtils","AdsUEditorPreflightRecommendationHubUtils","RelayHooks","adsUEditorPreflightUGPRecommendationCtxCtwapoUpgradeFragment","react"],(function(a,b,c,d,e,f,g){"use strict";var h,i,j,k=j||d("react"),l="ctx_ctwapo_upgrade";function a(a){var e,f,g,j,m=d("AdsUEditorHooks").useUEditorCampaignContext();m.hostID;var n=!1;a=a.campaignIDs;(a===null||a.length===0||a[0]===null)&&(n=!0);m=d("AdsAdObjectRelayIDUtils").encodeAdObjectRelayIDsWithContext(a,m);m=d("RelayHooks").useClientQuery(h!==void 0?h:h=b("AdsCTXCTWAPOGuidanceCardContainerDataQuery.graphql"),{campaignRelayIDs:m,skipQuery:n});e=(e=(e=m.selected_ad_account)==null?void 0:(e=e.combined_campaigns)==null?void 0:e.filter(Boolean))!=null?e:[];f=(f=e.map(function(a){return a.combined_campaign_group}).filter(Boolean))!=null?f:[];g=(g=d("AdsBulkValueUtils").getUniformValueOrDefaultFrom(e,function(a){return a.optimization_goal}))!=null?g:c("AdsAPIOptimizationGoals").NONE;e=(e=d("AdsBulkValueUtils").getUniformValueOrDefaultFrom(e,function(a){return a.destination_type}))!=null?e:null;j=d("AdsBulkValueUtils").getUniformValueOrDefault(d("AdsBulkValueUtils").aggregate((j=m==null?void 0:(j=m.selected_ad_account)==null?void 0:(j=j.combined_campaigns)==null?void 0:j.map(function(a){return a==null?void 0:(a=a.promoted_object)==null?void 0:a.page_id}))!=null?j:[]),null);f=d("AdsBulkValueUtils").getUniformValueOrDefaultFrom(f,function(a){return a.objective});m=(m=(m=m.selected_ad_account)==null?void 0:(m=m.combined_campaigns)==null?void 0:(m=m.at(0))==null?void 0:m.ad_object_id)!=null?m:a[0];m===null&&(n=!0);a=d("RelayHooks").useLazyLoadQuery(i!==void 0?i:i=b("AdsCTXCTWAPOGuidanceCardContainerQuery.graphql"),{skip:n,requestId:d("AdsUEditorPreflightRecommendationHubUtils").getPFRHubRequestUUID(),scope:{ad_object:{ad_object_ids:[m],ad_objects_level:"CAMPAIGN"}},options:{},clientId:"ADS_MANAGER_PFR_CTX_CTWAPO_UPGRADE_INLINE_CONTAINER",pfrInputs:[{ctx_ctwapo_upgrade:{optimization_goal:d("AdsUEditorCampaignOptimizationGoalUtils").getXFBAdOptimizationGoalFromAdsAPIOptimizationGoal(g),objective:d("AdsAdvantageAudienceUtils").convertObjectiveForGraphQL(f),destination_type:e,page_id:j}}],shouldFetchURCContent:d("AdsUEditorPreflightRecommendationHubURCIntegrationGatingUtils").shouldFetchURCContent()},{fetchPolicy:"store-or-network"});n=d("adsUEditorPreflightUGPRecommendationCtxCtwapoUpgradeFragment").useAdsUEditorPreflightUGPRecommendationCtxCtwapoUpgradeFragment(a.ctxCtwapoUpgradeFragment);if(n.eligible_ad_object_ids.length===0)return null;m=new Map([[l,n]]);return k.jsx(c("AdsInlineGuidanceContainer.react"),{guidancePluginKeyToGuidanceExtraDataMap:m,plugin:c("AdsPreflightRecommendationCtxCtwapoUpgradePlugin"),pluginKey:l,queryRef:a==null?void 0:(g=a.xfb_ugp_gen_pfrs)==null?void 0:g.URCInlinePFRContents,shouldShowPFRHub:!1,targetAdObjectIDs:n.eligible_ad_object_ids})}a.displayName=a.name+" [from "+f.id+"]";g["default"]=a}),98);
-----
AdsCTXCTWAPOGuidanceCardContainerQuery.graphql",["relay-runtime"],(function(a,b,c,d,e,f){"use strict";a=function(){var a={defaultValue:null,kind:"LocalArgument",name:"channel"},b={defaultValue:null,kind:"LocalArgument",name:"clientId"},c={defaultValue:null,kind:"LocalArgument",name:"options"},d={defaultValue:null,kind:"LocalArgument",name:"pfrInputs"},e={defaultValue:null,kind:"LocalArgument",name:"requestId"},f={defaultValue:null,kind:"LocalArgument",name:"scope"},g={defaultValue:null,kind:"LocalArgument",name:"scoreSettingIds"},h={defaultValue:!1,kind:"LocalArgument",name:"shouldFetchCIBContent"},i={defaultValue:null,kind:"LocalArgument",name:"shouldFetchURCContent"},j={defaultValue:null,kind:"LocalArgument",name:"skip"},k=[{fields:[{kind:"Variable",name:"channel",variableName:"channel"},{kind:"Variable",name:"inputs",variableName:"pfrInputs"},{kind:"Variable",name:"options",variableName:"options"},{kind:"Variable",name:"scope",variableName:"scope"},{kind:"Variable",name:"score_setting_ids",variableName:"scoreSettingIds"},{kind:"Literal",name:"surface",value:"ADS_MANAGER"}],kind:"ObjectValue",name:"request"},{fields:[{kind:"Variable",name:"client_id",variableName:"clientId"},{kind:"Variable",name:"request_id",variableName:"requestId"}],kind:"ObjectValue",name:"request_context"}],l={alias:null,args:null,kind:"ScalarField",name:"recommendation_type",storageKey:null},m={alias:null,args:null,kind:"ScalarField",name:"text",storageKey:null},n=[m],o={alias:null,args:null,kind:"ScalarField",name:"offset",storageKey:null},p={alias:null,args:null,kind:"ScalarField",name:"length",storageKey:null},q={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},r=[q],s={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null};r={alias:null,args:null,concreteType:"EntityAtRange",kind:"LinkedField",name:"ranges",plural:!0,selections:[o,p,{alias:null,args:null,concreteType:null,kind:"LinkedField",name:"entity",plural:!1,selections:[{kind:"InlineFragment",selections:r,type:"CMSObject",abstractKey:null},{alias:null,args:null,kind:"ScalarField",name:"url",storageKey:null},s,{kind:"InlineFragment",selections:r,type:"Node",abstractKey:"__isNode"}],storageKey:null}],storageKey:null};o={alias:null,args:null,concreteType:"InlineStyleAtRange",kind:"LinkedField",name:"inline_style_ranges",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"inline_style",storageKey:null},o,p],storageKey:null};p=[m,r,o];var t={alias:null,args:null,concreteType:"XFBURCTextWithEntities",kind:"LinkedField",name:"body",plural:!0,selections:p,storageKey:null};return{fragment:{argumentDefinitions:[a,b,c,d,e,f,g,h,i,j],kind:"Fragment",metadata:null,name:"AdsCTXCTWAPOGuidanceCardContainerQuery",selections:[{alias:null,args:k,concreteType:"XFBUGPAPIGetPreFlightRecommendationsResponse",kind:"LinkedField",name:"xfb_ugp_gen_pfrs",plural:!1,selections:[{condition:"shouldFetchURCContent",kind:"Condition",passingValue:!0,selections:[{fragment:{kind:"InlineFragment",selections:[{args:null,kind:"FragmentSpread",name:"AdsInlineGuidanceContainer_contents"}],type:"XFBUGPAPIGetPreFlightRecommendationsResponse",abstractKey:null},kind:"AliasedInlineFragmentSpread",name:"URCInlinePFRContents"}]}],storageKey:null},{condition:"skip",kind:"Condition",passingValue:!1,selections:[{fragment:{kind:"InlineFragment",selections:[{args:null,kind:"FragmentSpread",name:"adsUEditorPreflightUGPRecommendationCtxCtwapoUpgradeFragment"}],type:"Query",abstractKey:null},kind:"AliasedInlineFragmentSpread",name:"ctxCtwapoUpgradeFragment"}]}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[e,b,f,d,c,a,g,i,h,j],kind:"Operation",name:"AdsCTXCTWAPOGuidanceCardContainerQuery",selections:[{alias:null,args:k,concreteType:"XFBUGPAPIGetPreFlightRecommendationsResponse",kind:"LinkedField",name:"xfb_ugp_gen_pfrs",plural:!1,selections:[{condition:"shouldFetchURCContent",kind:"Condition",passingValue:!0,selections:[{alias:null,args:[{kind:"Literal",name:"input",value:{content_size:"DEFAULT",group_by:["RECOMMENDATION_TYPE"]}}],concreteType:"XFBURCAPIGetContentResponseObject",kind:"LinkedField",name:"contents",plural:!0,selections:[l,{alias:null,args:null,concreteType:"XFBURCIndividualContent",kind:"LinkedField",name:"recommendation_contents",plural:!0,selections:[{alias:null,args:null,concreteType:"XFBURCHeader",kind:"LinkedField",name:"header",plural:!1,selections:[{alias:null,args:null,concreteType:"XFBURCTextWithEntities",kind:"LinkedField",name:"title",plural:!1,selections:n,storageKey:null}],storageKey:null},t,{alias:null,args:null,concreteType:"XFBURCOutcome",kind:"LinkedField",name:"outcome",plural:!1,selections:[{alias:null,args:null,concreteType:"XFBURCExplanation",kind:"LinkedField",name:"explanation",plural:!1,selections:[t],storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"XFBURCTooltip",kind:"LinkedField",name:"tooltip",plural:!1,selections:[{alias:null,args:null,concreteType:"XFBURCTextWithEntities",kind:"LinkedField",name:"calculation_description",plural:!0,selections:n,storageKey:null},{alias:null,args:null,concreteType:"XFBURCTextWithEntities",kind:"LinkedField",name:"detailed_description",plural:!0,selections:p,storageKey:null},{alias:null,args:null,concreteType:"XFBURCTextWithEntities",kind:"LinkedField",name:"outcome_lift",plural:!0,selections:n,storageKey:null},{alias:null,args:null,concreteType:"XFBURCTextWithEntities",kind:"LinkedField",name:"title",plural:!1,selections:[m,{condition:"shouldFetchCIBContent",kind:"Condition",passingValue:!0,selections:[{alias:null,args:null,concreteType:"XFBURCQEInfo",kind:"LinkedField",name:"urc_qe_info",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"qe_universe_name",storageKey:null}],storageKey:null}]}],storageKey:null}],storageKey:null}],storageKey:null},{condition:"shouldFetchCIBContent",kind:"Condition",passingValue:!0,selections:[{alias:null,args:null,concreteType:"XFBURCIndividualContent",kind:"LinkedField",name:"recommendation_contents",plural:!0,selections:[{alias:null,args:null,concreteType:"XFBURCTooltip",kind:"LinkedField",name:"tooltip",plural:!1,selections:[{alias:null,args:null,concreteType:"XFBURCTextWithEntities",kind:"LinkedField",name:"calculation_description",plural:!0,selections:[r,o],storageKey:null}],storageKey:null}],storageKey:null}]}],storageKey:'contents(input:{"content_size":"DEFAULT","group_by":["RECOMMENDATION_TYPE"]})'}]}],storageKey:null},{condition:"skip",kind:"Condition",passingValue:!1,selections:[{alias:null,args:k,concreteType:"XFBUGPAPIGetPreFlightRecommendationsResponse",kind:"LinkedField",name:"xfb_ugp_gen_pfrs",plural:!1,selections:[{alias:null,args:null,concreteType:"XFBUGPAdPreFlightRecommendation",kind:"LinkedField",name:"recommendations",plural:!0,selections:[l,{alias:null,args:null,concreteType:null,kind:"LinkedField",name:"target",plural:!1,selections:[s,{kind:"InlineFragment",selections:[{alias:null,args:null,concreteType:"XFBUGPAdRecommendationSingleAdObjectTarget",kind:"LinkedField",name:"targets",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"ad_object_id",storageKey:null},q],storageKey:null}],type:"XFBUGPAdRecommendationAdObjectTargets",abstractKey:null},q],storageKey:null}],storageKey:null}],storageKey:null}]}]},params:{id:"31945103105088830",metadata:{},name:"AdsCTXCTWAPOGuidanceCardContainerQuery",operationKind:"query",text:null}}}();b("relay-runtime").PreloadableQueryRegistry.set(a.params.id,a);e.exports=a}),null);
-----