(0,s.sprintf)(__("Learn about %s","jetpack-my-jetpack"),c));constg={variant:u?void0:"primary",disabled:u,className:p};switch(t){casey.ABSENT:returnm().createElement(a.Z,r()({},g,{size:"small",variant:"link",weight:"regular"}),
__("Due to your server settings, we can't automatically install the plugin for you. Please manually install the %s plugin.","jetpack-my-jetpack"),P),"",h().createElement(s.ExternalLink,{href:`https://wordpress.org/plugins/${O}`},__("Get plugin","jetpack-my-jetpack")))),(!A||A&&!F)&&h().createElement(r.ZP,{component:E.Z,onClick:K,isLoading:S,disabled:z,isPrimary:!A,href:d?void0:G,className:b.Z["checkout-button"],variant:"body"},
(0,o.sprintf)(__("Add %s","jetpack-my-jetpack"),P)),I.length>0&&h().createElement("div",{className:b.Z.disclaimers},I.map(((e,t)=>{const{text:n,link_text:c=null,url:a=null}=e;returnh().createElement(r.ZP,{key:`disclaimer-${t}`,component:"p",variant:"body-small"},`${n}`,a&&c&&h().createElement(s.ExternalLink,{onClick:()=>X(t),href:a,target:"_blank",rel:"noopener noreferrer"},c))}))),A&&F&&h().createElement("div",{className:b.Z["product-has-required-plan"]},h().createElement(a.KM,{size:36}),h().createElement(r.ZP,null,__("Active on your site","jetpack-my-jetpack"))),w&&h().createElement(r.ZP,{className:b.Z["supporting-info"],variant:"body-extra-small"},w)))};_.defaultProps={trackButtonClick:()=>{}};constC=_},8093:(e,t,n)=>{"use strict";n.d(t,{B$:()=>S,Jw:()=>U,Q5:()=>R,WJ:()=>N,Yi:()=>P,q:()=>w,qA:()=>Z,uw:()=>I,y$:()=>x});varc=n(9105),r=n(3363),a=n(3846),i=n(9818),s=n(5736),o=n(9196),l=n.n(o),u=n(2199),p=n(1689),d=n(3345),m=n(3703),g=n(7493),h=n(8278),y=n(5626),v=n(968),f=n(5610),k=n(4763),E=n(2605),b=n(720),j=n(1287),_=n(1439);const__=s.__;functionC(e){let{bundle:t,installsPlugin:n=!1,slug:s,supportingInfo:f,children:k=null}=e;const{activate:E,detail:b}=(0,m.i)(s),{isUpgradableByBundle:_}=b,{recordEvent:C}=(0,u.Z)();(0,o.useEffect)((()=>{C("jetpack_myjetpack_product_interstitial_view",{product:s})}),[C,s]);constw=(0,o.useCallback)((()=>{C("jetpack_myjetpack_product_interstitial_add_link_click",{product:s})}),[C,s]),Z=(0,o.useCallback)((()=>{C("jetpack_myjetpack_product_interstitial_add_link_click",{product:t})}),[C,t]),{isUserConnected:N}=(0,p.Z)(),S=(0,d.Z)("/"),P=(0,o.useCallback)((()=>{E().finally((()=>{vare,t;constn=(0,i.select)(g.t).getProduct(s),c=null==n?void0:n.postActivationUrl,r=null==n?void0:n.hasRequiredPlan,a=null==n||null===(e=n.pricingForUi)||void0===e?void0:e.isFree,o=null==n||null===(t=n.pricingForUi)||void0===t?void0:t.wpcomProductSlug;if(!c)return!a&&!r&&o?void(window.location.href=(0,h.Z)(o,N)):S();window.location.href=c}))}),[S,E,N,s]),R=(0,o.useCallback)((()=>{s&&C("jetpack_myjetpack_product_interstitial_back_link_click",{product:s})}),[C,s]);returnl().createElement(c.Z,{showHeader:!1,showBackground:!1},l().createElement(r.Z,{horizontalSpacing:3,horizontalGap:3},l().createElement(a.Z,null,l().createElement(y.Z,{onClick:R})),l().createElement(a.Z,null,l().createElement(r.Z,{className:_?null:j.Z.container,horizontalSpacing:0,horizontalGap:0,fluid:!0},l().createElement(a.Z,{sm:4,md:4,lg:7},l().createElement(v.Z,{slug:s,trackButtonClick:w,onClick:n?P:void0,className:_?j.Z.container:null,supportingInfo:f})),l().createElement(a.Z,{sm:4,md:4,lg:5,className:j.Z.imageContainer},t?l().createElement(v.Z,{slug:"security",trackButtonClick:Z,className:_?j.Z.container:null}):k)))))}functionw(){returnl().createElement(C,{slug:"anti-spam",installsPlugin:!0,bundle:"security"})}functionZ(){returnl().createElement(C,{slug:"backup",installsPlugin:!0,bundle:"security"})}functionN(){returnl().createElement(C,{slug:"boost",installsPlugin:!0},l().createElement("img",{src:f,alt:"Boost"}))}functionS(){returnl().createElement(C,{slug:"crm",installsPlugin:!0},l().createElement("img",{src:k,alt:"CRM"}))}functionP(){returnl().createElement(C,{slug:"extras",installsPlugin:!0},l().createElement("img",{src:E,alt:"Extras"}))}functionR(){returnl().createElement(C,{slug:"scan",installsPlugin:!0,bundle:"security"})}functionx(){returnl().createElement(C,{slug:"social",installsPlugin:!0})}functionI(){returnl().createElement(C,{slug:"search",installsPlugin:!0,supportingInfo:__("Pricing will automatically adjust based on the number of records in your search index. If you grow into a new pricing tier, we'll let you know before your next billing cycle.","jetpack-my-jetpack")},l().createElement("img",{src:b,alt:"Search"}))}functionU(){returnl().createElement(C,{slug:"videopress",installsPlugin:!0},l().createElement("img",{src:_,alt:"VideoPress"}))}},8565:(e,t,n)=>{"use strict";n.d(t,{f6:()=>r,w6:()=>c});constc="my-jetpack-my-plans-manage",r="my-jetpack-my-plans-purchase"},2199:(e,t,n)=>{"use strict";n.d(t,{
__("Jetpack %s needs a user connection to WordPress.com to be able to work.","jetpack-my-jetpack"),n[0]),g=n.length>1?__("Some products need a user connection to WordPress.com to be able to work.","jetpack-my-jetpack"):m;(0,a.useEffect)((()=>{!l&&u&&(window.location=u)}),[l,u]),(0,a.useEffect)((()=>{d&&t(g,{status:"error",actions:[{label:__("Connect your user account to fix this","jetpack-my-jetpack"),onClick:e,variant:"link",noDefaultClasses:!0}]})}),[g,d,e,t])}},1689:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});varc=n(1294);functionr(){const{apiRoot:e,apiNonce:t}=myJetpackRest,{topJetpackMenuItemUrl:n}=myJetpackInitialState,r=(0,c.Z)({apiRoot:e,apiNonce:t}),a=r.isRegistered;return{apiNonce:t,apiRoot:e,...r,isSiteConnected:a,topJetpackMenuItemUrl:n}}},3345:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});varc=n(9196),r=n(5439);functiona(e){constt=(0,r.s0)();return(0,c.useCallback)((()=>t(e)),[t,e])}},5031:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});varc=n(9818),r=n(7493);functiona(){conste=(0,c.useDispatch)(),{message:t,options:n}=(0,c.useSelect)((e=>e(r.t).getGlobalNotice()));return{message:t,options:n||{},clean:()=>e(r.t).cleanGlobalNotice()}}},3703:(e,t,n)=>{"use strict";n.d(t,{i:()=>a});varc=n(9818),r=n(7493);functiona(e){const{activateProduct:t,deactivateProduct:n}=(0,c.useDispatch)(r.t),a=(0,c.useSelect)((t=>t(r.t).getProduct(e)));return{activate:()=>t(e),deactivate:()=>n(e),productsList:(0,c.useSelect)((e=>e(r.t).getProducts())),detail:a,isActive:"active"===a.status,isFetching:(0,c.useSelect)((t=>t(r.t).isFetching(e))),status:a.status}}},1750:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});varc=n(9818),r=n(7493);functiona(){return(0,c.useSelect)((e=>e(r.t).getPurchases()))}},9274:(e,t,n)=>{"use strict";n.d(t,{RT:()=>o,ZP:()=>j,d1:()=>h,dE:()=>m,dI:()=>d,dq:()=>g,fE:()=>y,ny:()=>l,vv:()=>p,z8:()=>u});varc=n(428),r=n(6989),a=n.n(r),i=n(5736),s=n(2086);const__=i.__,o="SET_PURCHASES_IS_FETCHING",l="FETCH_PURCHASES",u="SET_PURCHASES",p="SET_IS_FETCHING_PRODUCT",d="SET_PRODUCT",m="SET_PRODUCT_REQUEST_ERROR",g="SET_PRODUCT_STATUS",h="SET_GLOBAL_NOTICE",y="CLEAN_GLOBAL_NOTICE",v=e=>({type:d,product:e}),f=(e,t)=>({type:m,productId:e,error:t}),k=(e,t)=>({type:"SET_GLOBAL_NOTICE",message:e,options:t});functionE(e,t){return{type:p,productId:e,isFetching:t}}constb={setProduct:v,activateProduct:e=>asynct=>awaitfunction(e,t,n){let{select:r,dispatch:o,registry:l}=n;returnnewPromise(((n,u)=>{if(!r.isValidProduct(e)){constt=__("Invalid product name","jetpack-my-jetpack"),n=newError(t);returno(f(e,n)),o(k(t,{status:"error",isDismissible:!0})),voidu(n)}constp=t.activate?"POST":"DELETE";returno(E(e,!0)),a()({path:`${s.Jk}/${e}`,method:p}).then((t=>{o(E(e,!1)),o(v(t)),l.dispatch(c.t).refreshConnectedPlugins(),n(null==t?void0:t.status)})).catch((t=>{const{name:n}=r.getProduct(e),c=(0,i.sprintf)(// translators: %$1s: Jetpack Product name
__("Failed to activate %1$s. Please try again","jetpack-my-jetpack"),n);o(E(e,!1)),o(f(e,t)),o(k(c,{status:"error",isDismissible:!0})),u(t)}))}))}(e,{activate:!0},t),setIsFetchingProduct:E,setRequestProductError:f,setProductStatus:(e,t)=>({type:g,productId:e,status:t})},j={setPurchasesIsFetching:e=>({type:o,isFetching:e}),fetchPurchases:()=>({type:l}),setPurchases:e=>({type:u,purchases:e}),...{setGlobalNotice:k,cleanGlobalNotice:()=>({type:"CLEAN_GLOBAL_NOTICE"})},...b}},2086:(e,t,n)=>{"use strict";n.d(t,{Jk:()=>r,LQ:()=>c,iB:()=>a});constc="my-jetpack/v1/site/purchases",r="my-jetpack/v1/site/products",a=["scan"]},9462:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});varc=n(6989),r=n.n(c),a=n(9274),i=n(2086);consts={[a.ny]:function(){returnnewPromise(((e,t)=>{r()({path:i.LQ}).then(e).catch(t)}))}}},925:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});varc=n(9818),r=n(9274);consta=(0,c.combineReducers)({products:function(){lete=arguments.length>0&&void0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void0;switch(t.type){caser.vv:{const{productId:n,isFetching:c}=t;return{...e,isFetching:{...e.isFetching,[n]:c},errors:{...e.errors,[n]:c?void0:e.errors[n]}}}caser.dq:{const{productId:n,status:c}=t;return{...e,items:{...e.items,[n]:{...e.items[n],status:c}}}}caser.dI:{const{product:n}=t,{slug:c}=n;return{...e,items:{...e.items,[c]:n}}}caser.dE:{const{productId:n,error:c}=t;return{...e,errors:{...e.errors,[n]:c}}}default:returne}},purchases:function(){lete=arguments.length>0&&void0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void0;switch(t.type){caser.RT:return{...e,isFetching:t.isFetching};caser.z8:return{...e,items:(null==t?void0:t.purchases)||[]};default:returne}},notices:function(){lete=arguments.length>0&&void0!==arguments[0]?arguments[0]:{global:{}},t=arguments.length>1?arguments[1]:void0;switch(t.type){caser.d1:{const{message:n,options:c}=t;return{...e,global:{message:n,options:c}}}caser.fE:return{...e,global:{}};default:returne}}})},9844:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});varc=n(6989),r=n.n(c),a=n(5736),i=n(2086);const__=a.__,s={...{getProduct:{isFulfilled:(e,t)=>{varn;return((null==e||null===(n=e.products)||void0===n?void0:n.items)||{}).hasOwnProperty(t)&&!i.iB.includes(t)},fulfill:e=>asynct=>{let{dispatch:n}=t;try{n.setIsFetchingProduct(e,!0);constt=awaitr()({path:`${i.Jk}/${e}`});returnn.setProduct(t),n.setIsFetchingProduct(e,!1),Promise.resolve()}catch(t){if(n.setIsFetchingProduct(e,!1),null!=t&&t.code&&null!=t&&t.message)returnn.setRequestProductError(e,t),Promise.reject(t);thrownewError(t)}}},getPurchases:()=>asynce=>{let{dispatch:t}=e;t.setPurchasesIsFetching(!0);try{t.setPurchases(awaitr()({path:i.LQ})),t.setPurchasesIsFetching(!1)}catch(e){t.setPurchasesIsFetching(!1),t.setGlobalNotice(__("There was an error fetching your purchases information. Check your site connectivity and try again.","jetpack-my-jetpack"),{status:"error"})}}}}},6896:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>s});varc=n(2728),r=n(6782);consta=e=>{vart;return(null===(t=e.products)||void0===t?void0:t.items)||{}},i=e=>Object.keys(a(e)),s={...{getProducts:a,getProductNames:i,getProduct:(e,t)=>{varn;constc=(null===(n=a(e))||void0===n?void0:n[t])||{},i=(0,r.N)(c,!0);returni.pricingForUi=(0,r.N)(i.pricingForUi||{},!0),i.features=i.features||[],i.supportedProducts=i.supportedProducts||[],i.pricingForUi.fullPricePerMonth=Math.ceil(i.pricingForUi.fullPrice/12*100)/100,i.pricingForUi.discountPricePerMonth=Math.ceil(i.pricingForUi.discountPrice/12*100)/100,i},isValidProduct:(e,t)=>i(e).includes(t),isFetching:(e,t)=>{varn,c;return(null===(n=e.products)||void0===n||null===(c=n.isFetching)||void0===c?void0:c[t])||!1},getProductsThatRequiresUserConnection:e=>{constt=a(e);returnObject.keys(t).reduce(((e,n)=>{constr=t[n];return(null==r?void0:r.requires_user_connection)&&((null==r?void0:r.status)===c.N.ACTIVE||(null==r?void0:r.status)===c.N.ERROR)&&e.push(null==r?void0:r.name),e}),[])}},getPurchases:e=>{vart;return(null===(t=e.purchases)||void0===t?void0:t.items)||[]},isRe