PolarisBoostPurchaseObjectiveScreen.entrypoint",["JSResourceForInteraction","PolarisBoostPurchaseObjectiveScreenQuery$Parameters"],(function(t,n,r,o,a,i,l){"use strict";var e=0,s=0,u=1e4;function c(){var t=Date.now(),n=t-s;return n>=u&&(e++,s=t),e}var d={getPreloadProps:function(t){var e=t.routeParams,n=e.flow_id,o=e.media_ids;return{queries:{purchaseObjectiveScreenRoot:{options:{fetchKey:c(),fetchPolicy:"network-only"},parameters:r("PolarisBoostPurchaseObjectiveScreenQuery$Parameters"),variables:{flow_id:n,media_ids:o}}}}},root:r("JSResourceForInteraction")("PolarisBoostPurchaseObjectiveScreen.react").__setRef("PolarisBoostPurchaseObjectiveScreen.entrypoint")};l.default=d}),98);
-----
PolarisBoostPurchaseObjectiveScreenQuery$Parameters",[],(function(t,n,r,o,a,i){"use strict";var e={kind:"PreloadableConcreteRequest",params:{id:"25183525564649190",metadata:{},name:"PolarisBoostPurchaseObjectiveScreenQuery",operationKind:"query",text:null}};a.exports=e}),null);
-----
PolarisBoostPurchaseObjectiveScreen.react",["fbt","CometRelay","IGBoostSharedStringsSalesObjectiveScreen","IGDSBox.react","IGDSTextVariants.react","PolarisBoostAdgroupUtils","PolarisBoostErrorStrings","PolarisBoostObjectiveScreenStrings","PolarisBoostObjectiveUtils","PolarisBoostPixelSectionV2.react","PolarisBoostProductExtensionsSection","PolarisBoostPurchaseObjectiveScreenAcceptPixelPermissionsMutation.graphql","PolarisBoostPurchaseObjectiveScreenCTASection.react","PolarisBoostPurchaseObjectiveScreenQuery.graphql","PolarisBoostPurchaseObjectiveScreenWebsiteSection.react","PolarisBoostPurchaseObjectiveScreenWebsiteSectionV2.react","PolarisBoostSalesObjectiveUtils.react","PolarisBoostScreenWrapper.react","PolarisUA","isValidURL","nullthrows","purchaseObjectiveGating","react","react-compiler-runtime","usePolarisBoostFetchSearchWebsite","usePolarisBoostSharedContext"],(function(t,n,r,o,a,i,l,s){"use strict";var e,u,c,d=c||(c=o("react")),m=c,p=m.useEffect,_=m.useState,f=e!==void 0?e:e=n("PolarisBoostPurchaseObjectiveScreenAcceptPixelPermissionsMutation.graphql"),g=u!==void 0?u:u=n("PolarisBoostPurchaseObjectiveScreenQuery.graphql");function h(e){var t,n,a,i,l,u,c,m,h,C=o("react-compiler-runtime").c(106),b=e.props,v=e.queries,S=b.navigateTo,R=b.onClose,L=R===void 0?y:R,E=v.purchaseObjectiveScreenRoot,k=r("usePolarisBoostSharedContext")(),I=k.flowID,T=k.logger,D=k.salesObjectiveData,x=k.setGoal,$=k.setSalesObjectiveData,P=o("PolarisBoostAdgroupUtils").useSetAdgroupsFields(),N=P.setCTAForAdgroups,M=_(null),w=M[0],A=M[1],F=o("CometRelay").usePreloadedQuery(g,r("nullthrows")(E)),O=F==null||(t=F.boost)==null||(t=t.purchase_objective_info)==null?void 0:t.active_pixel_website,B=F==null||(n=F.boost)==null||(n=n.purchase_objective_info)==null?void 0:n.new_pixel_website,W=F==null||(a=F.boost)==null||(a=a.purchase_objective_info)==null?void 0:a.default_a0_website,q=F==null||(i=F.boost)==null||(i=i.purchase_objective_info)==null?void 0:i.default_a1_website,U=F==null||(l=F.boost)==null||(l=l.purchase_objective_info)==null||(l=l.purchase_objective_partner_recommendation)==null?void 0:l.gallery_logo,V=D.businessName,H=D.isA0FlowEligible,G=D.isA1FlowEligible,z=D.isActivePixelEligible,j=D.isNewPixelEligible,K=D.isPersonalAdAccount,Q=D.selections,X=D.tempSelections,Y;C[0]!==W||C[1]!==q||C[2]!==O||C[3]!==G||C[4]!==z||C[5]!==j||C[6]!==B||C[7]!==(Q==null?void 0:Q.website)||C[8]!==(X==null?void 0:X.website)?(Y=function(){return(X==null?void 0:X.website)!=null&&(X==null?void 0:X.website)!==""?X==null?void 0:X.website:(Q==null?void 0:Q.website)!=null?Q==null?void 0:Q.website:W!=null?W:q!=null&&G?q:O!=null&&z?O:B!=null&&j?B:""},C[0]=W,C[1]=q,C[2]=O,C[3]=G,C[4]=z,C[5]=j,C[6]=B,C[7]=Q==null?void 0:Q.website,C[8]=X==null?void 0:X.website,C[9]=Y):Y=C[9];var J=Y,Z;C[10]!==J?(Z=J(),C[10]=J,C[11]=Z):Z=C[11];var ee=_(Z),te=ee[0],ne=ee[1],re=_(null),oe=re[0],ae=re[1],ie=r("usePolarisBoostFetchSearchWebsite")(ae,te),le=ie.isFetching,se,ue;C[12]!==T?(se=function(){T==null||T.logStartStepSuccess("sales_objective")},ue=[T],C[12]=T,C[13]=se,C[14]=ue):(se=C[13],ue=C[14]),p(se,ue);var ce=_(null),de=ce[0],me=ce[1],pe;C[15]!==te?(pe=r("isValidURL")(te.toLowerCase()),C[15]=te,C[16]=pe):pe=C[16];var _e=pe,fe=_((u=(c=X==null?void 0:X.cta)!=null?c:Q==null?void 0:Q.cta)!=null?u:"SHOP_NOW"),ge=fe[0],he=fe[1],ye,Ce;C[17]!==ge||C[18]!==$||C[19]!==te?(Ce=function(){$(function(e){return babelHelpers.extends({},e,{tempSelections:{cta:ge,website:te}})})},ye=[ge,$,te],C[17]=ge,C[18]=$,C[19]=te,C[20]=ye,C[21]=Ce):(ye=C[20],Ce=C[21]),p(Ce,ye);var be=de!=null&&de.pixel_details.is_connected_to_viewers_default_ad_account!==!0,ve=_(!1),Se=ve[0],Re=ve[1],Le=o("CometRelay").useMutation(f),Ee=Le[0],ke=Le[1],Ie;if(C[22]!==Ee||C[23]!==ge||C[24]!==I||C[25]!==Se||C[26]!==T||C[27]!==S||C[28]!==L||C[29]!==(de==null||(m=de.pixel_details)==null?void 0:m.id)||C[30]!==(de==null||(h=de.pixel_details)==null?void 0:h.name)||C[31]!==N||C[32]!==x||C[33]!==$||C[34]!==be||C[35]!==te){var Te,De;Ie=function(){if(T.logTapComponent("sales_objective_save_cta","sales_objective"),be&&Se){var e;Ee({onCompleted:function(t){var e=t.mutationEndpoint;(e==null?void 0:e.is_success)===!0?(T.logActionSuccess("sales_objective_accept_pixel_permission","sales_objective"),xe()):(A(o("PolarisBoostErrorStrings").VERY_GENERIC_SUBMIT_ERROR_BODY),T.logActionError("sales_objective_accept_pixel_permission","mutation_is_success_false",o("PolarisBoostErrorStrings").VERY_GENERIC_SUBMIT_ERROR_BODY.toString(),"sales_objective"))},onError:function(t){A(o("PolarisBoostErrorStrings").VERY_GENERIC_SUBMIT_ERROR_BODY),T.logActionError("sales_objective_accept_pixel_permission","mutation_failure",t.message,"sales_objective")},variables:{flow_id:I,pixel_id:r("nullthrows")(de==null||(e=de.pixel_details)==null?void 0:e.id)}});return}xe()};var xe=function(){$(function(e){var t,n,o;return babelHelpers.extends({},e,{selections:{cta:ge,pixel:{id:r("nullthrows")(de==null||(t=de.pixel_details)==null?void 0:t.id),name:(n=de==null||(o=de.pixel_details)==null?void 0:o.name)!=null?n:""},website:r("nullthrows")(te)},tempSelections:null})}),T==null||T.logFinishStepSuccess("sales_objective"),x(o("PolarisBoostObjectiveUtils").OUTCOME_SALES),N(ge),o("PolarisUA").isDesktop()?L():S("objective",{})};C[22]=Ee,C[23]=ge,C[24]=I,C[25]=Se,C[26]=T,C[27]=S,C[28]=L,C[29]=de==null||(Te=de.pixel_details)==null?void 0:Te.id,C[30]=de==null||(De=de.pixel_details)==null?void 0:De.name,C[31]=N,C[32]=x,C[33]=$,C[34]=be,C[35]=te,C[36]=Ie}else Ie=C[36];var $e;C[37]!==H||C[38]!==le||C[39]!==_e||C[40]!==oe?($e=function(){return _e?!le&&oe==null&&H?o("IGBoostSharedStringsSalesObjectiveScreen").SALES_OBJECTIVE_SCREEN_NO_MATCHING_STORE_FOR_URL_ERROR_MESSAGE:null:o("PolarisBoostObjectiveScreenStrings").OBJECTIVE_SCREEN_WEBSITE_ERROR},C[37]=H,C[38]=le,C[39]=_e,C[40]=oe,C[41]=$e):$e=C[41];var Pe=$e,Ne=Pe();p(function(){Ne!=null&&T.logViewComponent("sales_objective_website_input_invalid_url_error","sales_objective")},[T,Ne]);var Me=o("PolarisBoostSalesObjectiveUtils.react").isSubmitButtonEnabled({hasUserAcceptedPixelDisclaimer:Se,isFetchingWebsiteInfo:le,pixel:de,shouldShowPixelDisclaimer:be,websiteErrorMessage:Ne,websiteInfo:oe});if(o("purchaseObjectiveGating").doesUserPassPurchaseObjectivePrismDesignGating()){var we=o("PolarisUA").isDesktop()?L:void 0,Ae=Me&&!ke,Fe;C[42]===Symbol.for("react.memo_cache_sentinel")?(Fe=s._(/*BTDS*/"Save"),C[42]=Fe):Fe=C[42];var Oe;C[43]===Symbol.for("react.memo_cache_sentinel")?(Oe=d.jsx(r("IGDSBox.react"),{marginTop:8,children:d.jsx(o("IGDSTextVariants.react").IGDSTextTitle,{textAlign:"center",zeroMargin:!0,children:o("IGBoostSharedStringsSalesObjectiveScreen").SALES_OBJECTIVE_SCREEN_TITLE})}),C[43]=Oe):Oe=C[43];var Be;C[44]===Symbol.for("react.memo_cache_sentinel")?(Be=d.jsx(r("IGDSBox.react"),{marginTop:4,children:d.jsx(o("IGDSTextVariants.react").IGDSTextBody,{color:"secondaryText",textAlign:"center",zeroMargin:!0,children:o("IGBoostSharedStringsSalesObjectiveScreen").SALES_OBJECTIVE_SCREEN_TITLE_SUBTEXT})}),C[44]=Be):Be=C[44];var We;C[45]!==U||C[46]!==te||C[47]!==Ne?(We=d.jsx(r("PolarisBoostPurchaseObjectiveScreenWebsiteSectionV2.react"),{partnerRecommendationGalleryLogo:U,setWebsite:ne,website:te,websiteErrorMessage:Ne}),C[45]=U,C[46]=te,C[47]=Ne,C[48]=We):We=C[48];var qe;C[49]!==V||C[50]!==Se||C[51]!==le||C[52]!==K||C[53]!==S||C[54]!==de||C[55]!==be||C[56]!==oe?(qe=d.jsx(r("IGDSBox.react"),{marginTop:4,children:d.jsx(r("PolarisBoostPixelSectionV2.react"),{businessName:V,hasUserAcceptedPixelDisclaimer:Se,isFetchingWebsiteInfo:le,isPersonalAdAccount:K,navigateTo:S,pixel:de,setHasUserAcceptedPixelDisclaimer:Re,setPixel:me,shouldShowPixelDisclaimer:be,websiteInfo:oe})}),C[49]=V,C[50]=Se,C[51]=le,C[52]=K,C[53]=S,C[54]=de,C[55]=be,C[56]=oe,C[57]=qe):qe=C[57];var Ue;C[58]!==ge?(Ue=d.jsx(r("PolarisBoostPurchaseObjectiveScreenCTASection.react"),{cta:ge,setCTA:he},"cta_section"),C[58]=ge,C[59]=Ue):Ue=C[59];var Ve=oe==null?void 0:oe.shopify_store,He;C[60]!==Ve?(He=d.jsx(r("PolarisBoostProductExtensionsSection"),{shop:Ve}),C[60]=Ve,C[61]=He):He=C[61];var Ge;C[62]!==We||C[63]!==qe||C[64]!==Ue||C[65]!==He?(Ge=d.jsxs(r("IGDSBox.react"),{marginBottom:4,paddingX:4,children:[Oe,Be,We,qe,Ue,He]}),C[62]=We,C[63]=qe,C[64]=Ue,C[65]=He,C[66]=Ge):Ge=C[66];var ze;return C[67]!==w||C[68]!==ke||C[69]!==Ie||C[70]!==we||C[71]!==Ae||C[72]!==Ge?(ze=d.jsx(r("PolarisBoostScreenWrapper.react"),{footerErrorMessage:w,headerTitle:o("IGBoostSharedStringsSalesObjectiveScreen").SALES_OBJECTIVE_SCREEN_HEADER,isLoading:ke,onClose:we,onNext:Ie,primaryButtonEnable:Ae,primaryButtonTitle:Fe,children:Ge}),C[67]=w,C[68]=ke,C[69]=Ie,C[70]=we,C[71]=Ae,C[72]=Ge,C[73]=ze):ze=C[73],ze}var je=o("PolarisUA").isDesktop()?L:void 0,Ke=Me&&!ke,Qe;C[74]===Symbol.for("react.memo_cache_sentinel")?(Qe=s._(/*BTDS*/"Save"),C[74]=Qe):Qe=C[74];var Xe;C[75]===Symbol.for("react.memo_cache_sentinel")?(Xe=d.jsx(r("IGDSBox.react"),{marginTop:8,children:d.jsx(o("IGDSTextVariants.react").IGDSTextTitle,{textAlign:"center",zeroMargin:!0,children:o("IGBoostSharedStringsSalesObjectiveScreen").SALES_OBJECTIVE_SCREEN_TITLE})}),C[75]=Xe):Xe=C[75];var Ye;C[76]===Symbol.for("react.memo_cache_sentinel")?(Ye=d.jsx(r("IGDSBox.react"),{marginTop:4,children:d.jsx(o("IGDSTextVariants.react").IGDSTextBody,{color:"secondaryText",textAlign:"center",zeroMargin:!0,children:o("IGBoostSharedStringsSalesObjectiveScreen").SALES_OBJECTIVE_SCREEN_TITLE_SUBTEXT})}),C[76]=Ye):Ye=C[76];var Je;C[77]!==U||C[78]!==te||C[79]!==Ne?(Je=d.jsx(r("PolarisBoostPurchaseObjectiveScreenWebsiteSection.react"),{partnerRecommendationGalleryLogo:U,setWebsite:ne,website:te,websiteErrorMessage:Ne}),C[77]=U,C[78]=te,C[79]=Ne,C[80]=Je):Je=C[80];var Ze;C[81]!==V||C[82]!==Se||C[83]!==le||C[84]!==K||C[85]!==S||C[86]!==de||C[87]!==be||C[88]!==oe?(Ze=d.jsx(r("IGDSBox.react"),{marginTop:4,children:d.jsx(r("PolarisBoostPixelSectionV2.react"),{businessName:V,hasUserAcceptedPixelDisclaimer:Se,isFetchingWebsiteInfo:le,isPersonalAdAccount:K,navigateTo:S,pixel:de,setHasUserAcceptedPixelDisclaimer:Re,setPixel:me,shouldShowPixelDisclaimer:be,websiteInfo:oe})}),C[81]=V,C[82]=Se,C[83]=le,C[84]=K,C[85]=S,C[86]=de,C[87]=be,C[88]=oe,C[89]=Ze):Ze=C[89];var et;C[90]!==ge?(et=d.jsx(r("PolarisBoostPurchaseObjectiveScreenCTASection.react"),{cta:ge,setCTA:he},"cta_section"),C[90]=ge,C[91]=et):et=C[91];var tt=oe==null?void 0:oe.shopify_store,nt;C[92]!==tt?(nt=d.jsx(r("PolarisBoostProductExtensionsSection"),{shop:tt}),C[92]=tt,C[93]=nt):nt=C[93];var rt;C[94]!==Je||C[95]!==Ze||C[96]!==et||C[97]!==nt?(rt=d.jsxs(r("IGDSBox.react"),{marginBottom:4,paddingX:4,children:[Xe,Ye,Je,Ze,et,nt]}),C[94]=Je,C[95]=Ze,C[96]=et,C[97]=nt,C[98]=rt):rt=C[98];var ot;return C[99]!==w||C[100]!==ke||C[101]!==Ie||C[102]!==je||C[103]!==Ke||C[104]!==rt?(ot=d.jsx(r("PolarisBoostScreenWrapper.react"),{footerErrorMessage:w,headerTitle:o("IGBoostSharedStringsSalesObjectiveScreen").SALES_OBJECTIVE_SCREEN_HEADER,isLoading:ke,onClose:je,onNext:Ie,primaryButtonEnable:Ke,primaryButtonTitle:Qe,children:rt}),C[99]=w,C[100]=ke,C[101]=Ie,C[102]=je,C[103]=Ke,C[104]=rt,C[105]=ot):ot=C[105],ot}function y(){}l.default=h}),226);
-----
PolarisBoostPurchaseObjectiveScreenQuery.graphql",["relay-runtime"],(function(t,n,r,o,a,i){"use strict";var e=(function(){var e=[{defaultValue:null,kind:"LocalArgument",name:"flow_id"},{defaultValue:null,kind:"LocalArgument",name:"media_ids"},{defaultValue:null,kind:"LocalArgument",name:"website"}],t=[{alias:"boost",args:[{kind:"Variable",name:"flow_id",variableName:"flow_id"},{kind:"Variable",name:"media_igids",variableName:"media_ids"}],concreteType:"XFBIGBoostFlow",kind:"LinkedField",name:"xfb_ig_boost_flow_from_media_igid",plural:!1,selections:[{alias:null,args:null,concreteType:"XFBIGBoostPurchaseObjectiveInfo",kind:"LinkedField",name:"purchase_objective_info",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"active_pixel_website",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"new_pixel_website",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"default_a0_website",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"default_a1_website",storageKey:null},{alias:null,args:[{kind:"Variable",name:"website",variableName:"website"}],concreteType:"XFBPartnerIntegrationTypeDetails",kind:"LinkedField",name:"purchase_objective_partner_recommendation",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"gallery_logo",storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:e,kind:"Fragment",metadata:null,name:"PolarisBoostPurchaseObjectiveScreenQuery",selections:t,type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:e,kind:"Operation",name:"PolarisBoostPurchaseObjectiveScreenQuery",selections:t},params:{id:"25183525564649190",metadata:{},name:"PolarisBoostPurchaseObjectiveScreenQuery",operationKind:"query",text:null}}})();n("relay-runtime").PreloadableQueryRegistry.set(e.params.id,e),a.exports=e}),null);
-----