LWIInstantAdsCreativesSection.react",["fbt","ix","CometRelay","GeoFlexbox.react","LWICometAdgroupID","LWICometAutomatedAdsConstants","LWICometInstantAdsConstants","LWIInstantAdsAIInfoTooltip.react","LWIInstantAdsContext.react","LWIInstantAdsCreativeTile.react","LWIInstantAdsCreativesSectionChangeIntentionForSessionMutation.graphql","LWIInstantAdsCreativesSection_boostedComponent.graphql","LWIInstantAdsCreativesSection_pageinfo.graphql","LWIInstantAdsGeneratingAnimation.react","LWIInstantAdsNewCreativeTile.react","LWIInstantAdsSettingsContext.react","LWIOmniIcon.react","LWIOmniLink.react","LWIOmniText.react","fbicon","geoMargin","getAdgroupSpecsFromInstantAdsRelay","gkx","react","react-compiler-runtime","requireDeferred","useGeoDeferredModal","useGetMessagingDestinationsSettings.react","useLWICometCurrentSpec","useLWIInstantAdsAdgroups.react","useLWIInstantAdsGoals.react","useLWILoggerContext"],(function(He,X,t,r,Oe,je,ue,f,le){"use strict";var Z,ee,ne,te,a=te||(te=r("react")),U=te,Ae=U.startTransition,Ee=U.useCallback,Ce=U.useEffect,Le=U.useState,Se=t("requireDeferred")("LWICometUnifiedLoggingUtil").__setRef("LWIInstantAdsCreativesSection.react"),he=t("requireDeferred")("LWIInstantAdsPromptDialog.react").__setRef("LWIInstantAdsCreativesSection.react"),Ie={creativeContainer:{position:"x1n2onr6",width:"xl8sfnv",$$css:!0},creatives:{display:"x78zum5",flexDirection:"x1q0g3np",flexWrap:"x1a02dak",marginInlineStart:"xyqm7xq",$$css:!0}},_e=f._(/*BTDS*/""),We=f._(/*BTDS*/""),xe=f._(/*BTDS*/""),fe=f._(/*BTDS*/""),pe=Z!==void 0?Z:Z=X("LWIInstantAdsCreativesSection_boostedComponent.graphql"),be=ee!==void 0?ee:ee=X("LWIInstantAdsCreativesSectionChangeIntentionForSessionMutation.graphql");function me(i){var n,L,S,p,b,e=r("react-compiler-runtime").c(55),_=i.adgroupSpecs,T=i.boostedComponentRef,g=i.doRegenerateAds,v=i.loading,o=i.pageID,y=i.pageInfo,l=i.setAdgroupSpecs,O=ne!==void 0?ne:ne=X("LWIInstantAdsCreativesSection_pageinfo.graphql"),j=r("CometRelay").useFragment(pe,T),E=r("CometRelay").useRefetchableFragment(O,y),m=E[0],u=m==null?void 0:m.page,d=m==null?void 0:m.session,h=d==null||(n=d.intention)==null?void 0:n.intention,A=d==null||(L=d.intention)==null||(L=L.page_info)==null?void 0:L.id,c=d==null?void 0:d.id,s=t("useLWIInstantAdsAdgroups.react")(d==null?void 0:d.intention),ae=r("LWIInstantAdsContext.react").useLWIInstantAdsContext(),W=ae.pageURL,I=(S=m.session)==null||(S=S.intention)==null?void 0:S.id,Fe=t("useLWIInstantAdsGoals.react")(d),G=Fe.currentGoal,F=G==null?void 0:G.goal,se=G==null?void 0:G.defaultCTA,x=G==null?void 0:G.selectedCTAs,M=u==null||(p=u.coalesced_linked_bizlink_instagram_account)==null?void 0:p.ig_asset_id,R=u==null||(b=u.coalesced_linked_bizlink_instagram_account)==null?void 0:b.instagram_actor_id,w;e[0]===Symbol.for("react.memo_cache_sentinel")?(w=[],e[0]=w):w=e[0];var Me=t("useGetMessagingDestinationsSettings.react")(j,u,null,w),C=Me.eligibleDestinations,J;e[1]!==_||e[2]!==s||e[3]!==C||e[4]!==F||e[5]!==R||e[6]!==M||e[7]!==o||e[8]!==W||e[9]!==x||e[10]!==l?(J=function(){var k=F==="GET_MULTI_MESSAGES"?x==null?void 0:x.filter(function(De){return C.includes(De.app_destination)}):x,H=o!=null?t("getAdgroupSpecsFromInstantAdsRelay")({ads:s,ctasValues:k,instagramActorID:R,instagramUserID:M,pageID:o,pageURL:W}):{};JSON.stringify(H)!==JSON.stringify(_)&&l(H)},e[1]=_,e[2]=s,e[3]=C,e[4]=F,e[5]=R,e[6]=M,e[7]=o,e[8]=W,e[9]=x,e[10]=l,e[11]=J):J=e[11];var P;e[12]!==_||e[13]!==s||e[14]!==C||e[15]!==F||e[16]!==R||e[17]!==M||e[18]!==I||e[19]!==o||e[20]!==W||e[21]!==x||e[22]!==l?(P=[_,s,F,I,o,l,W,x,M,R,C],e[12]=_,e[13]=s,e[14]=C,e[15]=F,e[16]=R,e[17]=M,e[18]=I,e[19]=o,e[20]=W,e[21]=x,e[22]=l,e[23]=P):P=e[23],Ce(J,P);var ge=r("CometRelay").useMutation(be),oe=ge[0],ie=ge[1],ve=Le(null),$=ve[0],Re=ve[1],z;e[24]!==s[0]||e[25]!==$?(z=$!=null?babelHelpers.extends({},s[0],{headline:"Generating...",id:r("LWICometAdgroupID").makeAdgroupID(),media:$,text:"Generating... "}):null,e[24]=s[0],e[25]=$,e[26]=z):z=e[26];var B=z,V;e[27]!==s||e[28]!==B?(V=B!=null?[].concat(s,[B]):s,e[27]=s,e[28]=B,e[29]=V):V=e[29];var q=V,N;e[30]!==q||e[31]!==se||e[32]!==C||e[33]!==I||e[34]!==v||e[35]!==o||e[36]!==c||e[37]!==l?(N=v?a.jsx(t("LWIInstantAdsGeneratingAnimation.react"),{}):a.jsxs(t("GeoFlexbox.react"),{xstyle:Ie.creatives,children:[q.map(function(K,k){var H=f._(/*BTDS*/"",[f._param("index",k+1)]);return a.jsx(t("GeoFlexbox.react"),{xstyle:[t("geoMargin").bottom16,t("geoMargin").end16,Ie.creativeContainer],children:I!=null&&o!=null&&a.jsx(t("LWIInstantAdsCreativeTile.react"),{ad:K,cta:se,eligibleMessagingDestinations:C,intentionID:I,pageID:o,sessionID:c,setAdgroupSpecs:l,title:H})},K.id)}),o!=null&&I!=null&&q.length0&&a.jsx(t("LWIInstantAdsNewCreativeTile.react"),{intentionID:I,pageID:o,setMediaURLIfCurrentlyGeneratingOne:Re})]}),e[30]=q,e[31]=se,e[32]=C,e[33]=I,e[34]=v,e[35]=o,e[36]=c,e[37]=l,e[38]=N):N=e[38];var re=N,Q;e[39]!==oe||e[40]!==ie||e[41]!==c?(Q=function(k){var H=k===void 0?null:k;!ie&&c!=null&&Ae(function(){oe({variables:{intentionID:H,sessionID:c}})})},e[39]=oe,e[40]=ie,e[41]=c,e[42]=Q):Q=e[42];var de=Q,ce=s.length===0,D;e[43]!==g||e[44]!==h||e[45]!==I||e[46]!==v||e[47]!==o||e[48]!==A||e[49]!==ce||e[50]!==de?(D=a.jsx(Te,{doRegenerateAds:g,firstLoading:ce,intention:h,intentionID:I,loading:v,pageID:o,pageInfoID:A,updateIntentionForSession:de}),e[43]=g,e[44]=h,e[45]=I,e[46]=v,e[47]=o,e[48]=A,e[49]=ce,e[50]=de,e[51]=D):D=e[51];var Y;return e[52]!==re||e[53]!==D?(Y=a.jsxs(a.Fragment,{children:[D,re]}),e[52]=re,e[53]=D,e[54]=Y):Y=e[54],Y}function Te(i){var n=r("react-compiler-runtime").c(23),L=i.doRegenerateAds,S=i.firstLoading,p=i.intention,b=i.intentionID,e=i.loading,_=i.pageID,T=i.pageInfoID,g=i.updateIntentionForSession,v=t("useGeoDeferredModal")(he),o=r("LWIInstantAdsSettingsContext.react").useLWIInstantAdsSettings(),y=o.settings,l=y==null?void 0:y.showUserPromptMode,O=y==null?void 0:y.showIntentionsMode,j=t("useLWILoggerContext")(),E=t("useLWICometCurrentSpec")(),m=!t("gkx")("21034"),u;n[0]===Symbol.for("react.memo_cache_sentinel")?(u=[t("geoMargin").horiz16,t("geoMargin").bottom20],n[0]=u):u=n[0];var d;n[1]===Symbol.for("react.memo_cache_sentinel")?(d=a.jsxs(t("GeoFlexbox.react"),{alignItems:"center",columnGap:8,direction:"row",xstyle:m?t("geoMargin").vert8:t("geoMargin").top8,children:[a.jsx(t("LWIOmniText.react"),{type:"headlineEmphasized3",children:f._(/*BTDS*/"")}),a.jsx(t("LWIInstantAdsAIInfoTooltip.react"),{ariaLabel:_e,content:r("LWICometInstantAdsConstants").ADS_IN_THIS_AD_SET_TOOLTIP_BODY,heading:_e})]}),n[1]=d):d=n[1];var h;n[2]===Symbol.for("react.memo_cache_sentinel")?(h=a.jsx(t("GeoFlexbox.react"),{justifyContent:"start",xstyle:t("geoMargin").end24,children:a.jsx(t("LWIOmniText.react"),{color:"secondary",type:"body2",children:r("LWICometInstantAdsConstants").INSTANT_ADS_AD_SET_SECTION_DESCRIPTION})}),n[2]=h):h=n[2];var A;n[3]!==p||n[4]!==e||n[5]!==_||n[6]!==T||n[7]!==v||n[8]!==l||n[9]!==g?(A=e||!l?null:a.jsxs(t("GeoFlexbox.react"),{alignItems:"center",columnGap:4,direction:"row",children:[a.jsx(t("LWIOmniIcon.react"),{color:"blueLink",icon:r("fbicon")._(le("421244"),16)}),a.jsx(t("LWIOmniText.react"),{color:"blueLink",type:"bodyLink2",children:a.jsx(t("LWIOmniLink.react"),{onClick:function(){p!=null&&T!=null&&v({pageID:_,pageInfoID:T,prompt:p,updateIntentionForSession:g},Ge)},children:We})})]}),n[3]=p,n[4]=e,n[5]=_,n[6]=T,n[7]=v,n[8]=l,n[9]=g,n[10]=A):A=n[10];var c;n[11]!==L||n[12]!==S||n[13]!==b||n[14]!==e||n[15]!==j||n[16]!==O||n[17]!==E||n[18]!==g?(c=e?null:a.jsxs(t("GeoFlexbox.react"),{alignItems:"center",columnGap:4,direction:"row",shrink:0,children:[a.jsx(t("LWIOmniIcon.react"),{color:"blueLink",icon:r("fbicon")._(le("495572"),16)}),a.jsx(t("LWIOmniText.react"),{color:"blueLink",type:"bodyLink2",children:a.jsx(t("LWIOmniLink.react"),{onClick:function(){O&&b!=null?L(b,ye):g(),Se.onReady(function(W){W.logWithLoggerAndOptionalSpecContext(j,E,{action:"select",context:"instant_ads",event:"instant_ads_click_regenerate_ads",side:"user_action"})})},children:S?xe:fe})})]}),n[11]=L,n[12]=S,n[13]=b,n[14]=e,n[15]=j,n[16]=O,n[17]=E,n[18]=g,n[19]=c):c=n[19];var s;return n[20]!==A||n[21]!==c?(s=a.jsxs(t("GeoFlexbox.react"),{direction:"column",xstyle:u,children:[d,a.jsxs(t("GeoFlexbox.react"),{alignItems:"start",columnGap:32,direction:"row",justifyContent:"space-between",children:[h,a.jsxs(t("GeoFlexbox.react"),{columnGap:12,direction:"row",justifyContent:"end",shrink:0,children:[A,c]})]})]}),n[20]=A,n[21]=c,n[22]=s):s=n[22],s}function ye(){}function Ge(){}ue.default=me}),226);
-----
LWIInstantAdsCreativesSectionChangeIntentionForSessionMutation.graphql",["LWIInstantAdsCreativesSectionChangeIntentionForSessionMutation_facebookRelayOperation"],(function(m,o,k,y,d,F){"use strict";var g=(function(){var a={defaultValue:null,kind:"LocalArgument",name:"intentionID"},n={defaultValue:null,kind:"LocalArgument",name:"sessionID"},e=[{kind:"Variable",name:"intention_id",variableName:"intentionID"},{kind:"Variable",name:"session_id",variableName:"sessionID"}],s={alias:null,args:null,kind:"ScalarField",name:"status",storageKey:null},i={alias:null,args:null,kind:"ScalarField",name:"message",storageKey:null},t=[{kind:"Variable",name:"id",variableName:"sessionID"}],r={alias:null,args:null,kind:"ScalarField",name:"link",storageKey:null},l={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},u=[l];return{fragment:{argumentDefinitions:[a,n],kind:"Fragment",metadata:null,name:"LWIInstantAdsCreativesSectionChangeIntentionForSessionMutation",selections:[{alias:null,args:e,concreteType:"LWIInstantAdsMutationResponse",kind:"LinkedField",name:"change_lwi_instantads_intention_for_session",plural:!1,selections:[s,i,{alias:null,args:null,concreteType:"XFBLWIInstantAdsPageInfo",kind:"LinkedField",name:"page_info",plural:!1,selections:[{alias:null,args:t,concreteType:"XFBLWIInstantAdsSession",kind:"LinkedField",name:"session",plural:!1,selections:[{args:null,kind:"FragmentSpread",name:"LWIInstantAdsGoalSection_session"}],storageKey:null},{args:null,kind:"FragmentSpread",name:"LWIInstantAdsCreativesSection_pageinfo"}],storageKey:null}],storageKey:null}],type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[n,a],kind:"Operation",name:"LWIInstantAdsCreativesSectionChangeIntentionForSessionMutation",selections:[{alias:null,args:e,concreteType:"LWIInstantAdsMutationResponse",kind:"LinkedField",name:"change_lwi_instantads_intention_for_session",plural:!1,selections:[s,i,{alias:null,args:null,concreteType:"XFBLWIInstantAdsPageInfo",kind:"LinkedField",name:"page_info",plural:!1,selections:[{alias:null,args:t,concreteType:"XFBLWIInstantAdsSession",kind:"LinkedField",name:"session",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"ads_lwi_goal",storageKey:null},{alias:null,args:null,concreteType:"XFBLWIInstantAdsGoalData",kind:"LinkedField",name:"goals",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"goal",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"business_goal",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"goal_fbt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"goal_description_fbt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"objective",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"selected_ctas",storageKey:null},{alias:null,args:null,concreteType:"XFBLWIInstantAdsCTAValues",kind:"LinkedField",name:"ctas_values",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"type",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"app_destination",storageKey:null},r,{alias:null,args:null,kind:"ScalarField",name:"app_link",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"page",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"event_id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"whatsapp_number",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null}],storageKey:null}],storageKey:null},l,{alias:null,args:null,concreteType:"XFBLWIInstantAdsIntention",kind:"LinkedField",name:"intention",plural:!1,selections:[l,{alias:null,args:null,kind:"ScalarField",name:"intention",storageKey:null},{alias:null,args:null,concreteType:"XFBLWIInstantAdsPageInfo",kind:"LinkedField",name:"page_info",plural:!1,selections:u,storageKey:null},{alias:null,args:null,concreteType:"XFBLWIInstantAdsPersonaAdGroupContent",kind:"LinkedField",name:"adgroups",plural:!0,selections:[l,{alias:null,args:null,kind:"ScalarField",name:"headline",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"text",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"media",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cta",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cta_fbt",storageKey:null},r,{alias:null,args:null,kind:"ScalarField",name:"image_description",storageKey:null},{alias:null,args:null,concreteType:"XFBLWIInstantAdsPersona",kind:"LinkedField",name:"persona",plural:!1,selections:[l,{alias:null,args:null,kind:"ScalarField",name:"description",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hook",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"interests",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"selling_points",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"tone",storageKey:null},{alias:null,args:null,concreteType:"XFBLWIInstantAdsPersonaDemographics",kind:"LinkedField",name:"demographics",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"age_max",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"age_min",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"education",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"gender",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"location",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"occupation",storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"Page",kind:"LinkedField",name:"page",plural:!1,selections:[{alias:null,args:null,concreteType:null,kind:"LinkedField",name:"coalesced_linked_bizlink_instagram_account",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"ig_asset_id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"instagram_actor_id",storageKey:null},{kind:"InlineFragment",selections:u,type:"Node",abstractKey:"__isNode"},{kind:"TypeDiscriminator",abstractKey:"__isXFBBizLinkIGUser"},{alias:null,args:null,kind:"ScalarField",name:"username",storageKey:null}],storageKey:null},l],storageKey:null},l],storageKey:null}],storageKey:null}]},params:{id:o("LWIInstantAdsCreativesSectionChangeIntentionForSessionMutation_facebookRelayOperation"),metadata:{},name:"LWIInstantAdsCreativesSectionChangeIntentionForSessionMutation",operationKind:"mutation",text:null}}})();d.exports=g}),null);
-----
LWIInstantAdsCreativesSectionChangeIntentionForSessionMutation_facebookRelayOperation",[],(function(o,t,a,i,e,r){e.exports="24428605166773366"}),null);
-----