default:(0,n.sprintf)(__("%s coming soon","jetpack-protect"),a)}:{lg:t?f:v,default:t?a:(0,n.sprintf)(/* translators: Name of the current feature */
__("%s not included","jetpack-protect"),a)})(a,t,R),x=Z?P.lg:P.default;returnu().createElement("div",{className:o()(g.Z.item,g.Z.value)},u().createElement(c.Z,{className:o()(g.Z.icon,_?g.Z["icon-check"]:g.Z["icon-cross"]),size:32,icon:_?r.Z:l.Z}),u().createElement(h.ZP,{variant:"body-small"},d||x),S&&u().createElement(m.Z,{title:b||N,iconClassName:g.Z["popover-icon"],className:o()(g.Z.popover,y),placement:"bottom-end",iconSize:14,offset:4,wide:Boolean(b&&w)},u().createElement(h.ZP,{variant:"body-small",component:"div"},w||j)))},b=e=>{let{children:t}=e;returnu().createElement("div",{className:g.Z.header},t)},y=e=>{let{primary:t=!1,children:a}=e,n=0;returnu().createElement("div",{className:o()(g.Z.card,{[g.Z["is-primary"]]:t})},s.Children.map(a,(e=>{constt=e;returnt.type===w?(n++,(0,s.cloneElement)(t,{index:n-1})):t})))};t.ZP=e=>{let{title:t,items:a,children:n,showIntroOfferDisclaimer:c=!1}=e;const[r]=(0,p.Z)("lg");returnu().createElement(k.Provider,{value:a},u().createElement("div",{className:o()(g.Z.container,{[g.Z["is-viewport-large"]]:r}),style:{"--rows":a.length+1,"--columns":s.Children.toArray(n).length+1}},u().createElement("div",{className:g.Z.table},u().createElement(h.ZP,{variant:"headline-small"},t),r&&a.map(((e,t)=>u().createElement("div",{className:o()(g.Z.item,{[g.Z["last-feature"]]:t===a.length-1}),key:t},u().createElement(h.ZP,{variant:"body-small"},u().createElement("strong",null,e.name)),e.tooltipInfo&&u().createElement(m.Z,{title:e.tooltipTitle,iconClassName:g.Z["popover-icon"],className:g.Z.popover,placement:e.tooltipPlacement?e.tooltipPlacement:"bottom-end",iconSize:14,offset:4,wide:Boolean(e.tooltipTitle&&e.tooltipInfo)},u().createElement(h.ZP,{variant:"body-small"},e.tooltipInfo))))),n)),u().createElement("div",{className:g.Z["tos-container"]},u().createElement("div",{className:g.Z.tos},c&&u().createElement(h.ZP,{variant:"body-small"},__("Reduced pricing is a limited offer for the first year and renews at regular price.","jetpack-protect")),u().createElement(d.Z,{multipleButtons:!0}))))}},5347:function(e,t,a){"use strict";varn=a(5736),c=a(5235),r=a.n(c),l=a(5106),i=a(3789),o=a(9184);const__=n.__;t.Z=e=>{let{price:t,offPrice:a,currency:n="",showNotOffPrice:c=!0,hideDiscountLabel:s=!0,promoLabel:u="",legend:m=__("/month, paid yearly","jetpack-protect"),isNotConvenientPrice:p=!1,hidePriceFraction:d=!1,children:h}=e;if(null==t&&null==a||!n)returnnull;c=c&&null!=a;constg="number"==typeoft&&"number"==typeofa?Math.floor((t-a)/t*100):0,f=!s&&g&&g>0?g+__("% off","jetpack-protect"):null;returnReact.createElement(React.Fragment,null,React.createElement("div",{className:o.Z.container},React.createElement("div",{className:r()(o.Z["price-container"],"product-price_container")},React.createElement(i.t,{value:a??t,currency:n,isOff:!p,hidePriceFraction:d}),c&&React.createElement(i.t,{value:t,currency:n,isOff:!1,hidePriceFraction:d}),f&&React.createElement(l.ZP,{className:r()(o.Z["promo-label"],"product-price_promo_label")},f))),React.createElement("div",{className:o.Z.footer},h||React.createElement(l.ZP,{className:r()(o.Z.legend,"product-price_legend")},m),u&&React.createElement(l.ZP,{className:r()(o.Z["promo-label"],"product-price_promo_label")},u)))}},3789:function(e,t,a){"use strict";a.d(t,{t:function(){returno}});varn=a(8899),c=a(5235),r=a.n(c),l=a(5106),i=a(9184);consto=e=>{let{value:t,currency:a,isOff:c,hidePriceFraction:o}=e;consts=r()(i.Z.price,"product-price_price",{[i.Z["is-not-off-price"]]:!c}),{symbol:u,integer:m,fraction:p}=(0,n.LR)(t,a),d=!o||!p.endsWith("00");returnReact.createElement(l.ZP,{className:s,variant:"headline-medium",component:"p"},React.createElement(l.ZP,{className:i.Z.symbol,component:"sup",variant:"title-medium"},u),m,d&&React.createElement(l.ZP,{component:"sup",variant:"body-small","data-testid":"PriceFraction"},React.createElement("strong",null,p)))}},5033:function(e,t,a){"use strict";varn=a(5162),c=a.n(n),r=a(9196),l=a.n(r);a(1683);consti=e=>{constt=e.className+" jp-components-spinner",a={width:e.size,height:e.size,fontSize:e.size,borderTopColor:e.color},n={borde
__("By clicking the <strong>%s</strong> button, you agree to our <tosLink>Terms of Service</tosLink> and to <shareDetailsLink>share details</shareDetailsLink> with WordPress.com.","jetpack-protect"),t),{strong:React.createElement("strong",null),tosLink:React.createElement(m,{slug:"wpcom-tos"}),shareDetailsLink:React.createElement(m,{slug:"jetpack-support-what-data-does-jetpack-sync"})})},m=e=>{let{slug:t,children:a}=e;returnReact.createElement("a",{className:"terms-of-service__link",href:(0,i.Z)(t),rel:"noopener noreferrer",target:"_blank"},a)};t.Z=e=>{let{className:t,multipleButtons:a,agreeButtonLabel:n}=e;returnReact.createElement(o.ZP,{className:l()(t,"terms-of-service")},a?React.createElement(s,null):React.createElement(u,{agreeButtonLabel:n}))}},6017:function(e,t,a){"use strict";a.d(t,{h:function(){returnn},s:function(){returnc}});constn={"headline-medium":"h1","headline-small":"h2","headline-small-regular":"h2","title-medium":"h3","title-medium-semi-bold":"h3","title-small":"h4",body:"p","body-small":"p","body-extra-small":"p","body-extra-small-bold":"p",label:"p"},c=["mt","mr","mb","ml","mx","my","m","pt","pr","pb","pl","px","py","p"]},5106:function(e,t,a){"use strict";a.d(t,{Dx:function(){returnd},H3:function(){returnp}});varn=a(2674),c=a.n(n),r=a(5235),l=a.n(r),i=a(9196),o=a.n(i),s=a(6017),u=a(3280);constm=(0,i.forwardRef)(((e,t)=>{let{variant:a="body",children:n,component:r,className:m,...p}=e;constd=r||s.h[a]||"span",h=(0,i.useMemo)((()=>s.s.reduce(((e,t)=>(void0!==p[t]&&(e+=u.Z[`${t}-${p[t]}`]+" ",deletep[t]),e)),"")),[p]);returnp.ref=t,o().createElement(d,c()({className:l()(u.Z.reset,u.Z[a],m,h)},p),n)}));m.displayName="Text",t.ZP=m;constp=e=>{let{children:t,weight:a="bold",...n}=e;constr="headline-small"+("bold"===a?"":`-${a}`);returno().createElement(m,c()({variant:r,mb:3},n),t)},d=e=>{let{children:t,size:a="medium",...n}=e;returno().createElement(m,c()({variant:`title-${a}`,mb:1},n),t)}},8275:function(e,t,a){"use strict";varn=a(9196),c=a.n(n),r=a(3591);constl={"--font-headline-medium":"48px","--font-headline-small":"36px","--font-title-medium":"24px","--font-title-small":"20px","--font-body":"16px","--font-body-small":"14px","--font-body-extra-small":"12px","--font-title-large":"var(--font-headline-small)","--font-label":"var(--font-body-extra-small)"},i={"--jp-black":"#000000","--jp-black-80":"#2c3338","--jp-white":"#ffffff","--jp-white-off":"#f9f9f6","--jp-gray":"#dcdcde","--jp-gray-0":"#F6F7F7","--jp-gray-10":"#C3C4C7","--jp-gray-20":"#A7AAAD","--jp-gray-40":"#787C82","--jp-gray-50":"#646970","--jp-gray-60":"#50575E","--jp-gray-70":"#3C434A","--jp-gray-80":"#2C3338","--jp-gray-90":"#1d2327","--jp-gray-off":"#e2e2df","--jp-red-0":"#F7EBEC","--jp-red-5":"#FACFD2","--jp-red-40":"#E65054","--jp-red-50":"#D63638","--jp-red-60":"#B32D2E","--jp-red-70":"#8A2424","--jp-red-80":"#691C1C","--jp-red":"#d63639","--jp-yellow-5":"#F5E6B3","--jp-yellow-10":"#F2CF75","--jp-yellow-20":"#F0C930","--jp-yellow-30":"#DEB100","--jp-yellow-40":"#C08C00","--jp-yellow-50":"#9D6E00","--jp-yellow-60":"#7D5600","--jp-blue-20":"#68B3E8","--jp-blue-40":"#1689DB","--jp-pink":"#C9356E","--jp-green-0":"#f0f2eb","--jp-green-5":"#d0e6b8","--jp-green-10":"#9dd977","--jp-green-20":"#64ca43","--jp-green-30":"#2fb41f","--jp-green-40":"#069e08","--jp-green-50":"#008710","--jp-green-60":"#007117","--jp-green-70":"#005b18","--jp-green-80":"#004515","--jp-green-90":"#003010","--jp-green-100":"#001c09","--jp-green":"#069e08","--jp-green-primary":"var( --jp-green-40 )","--jp-green-secondary":"var( --jp-green-30 )"},o={"--jp-border-radius":"4px","--jp-menu-border-height":"1px","--jp-underline-thickness":"2px"},s={"--spacing-base":"8px"},u={},m=(e,t,a)=>{constn={...l,...i,...o,...s};for(consttinn)e.style.setProperty(t,n[t]);a&&e.classList.add(r.Z.global),t&&(u[t]={provided:!0,root:e})};t.ZP=e=>{let{children:t=null,targetDom:a,id:r,withGlobalStyles:l=!0}=e;consti=(0,n.useRef)(),o=u?.[r]?.provided;return(0,n.useLayoutEffect)((()=>{if(!o)returna?m(a,r,l):void(i?.current&&m(i.current,r,l))}),[a,i,o,r,l]),a?t:c().createElement(
__("There was an error reconnecting Jetpack. Error: %s","jetpack-protect"),o))):null;returnu().createElement(u().Fragment,null,h,u().createElement(r.Notice,{status:"error",isDismissible:!1,className:p},u().createElement("div",{className:m.Z.message},d,t),i&&u().createElement("a",{onClick:i,onKeyDown:i,className:m.Z.button,href:"#"},__("Restore Connection","jetpack-protect"))))};p.propTypes={message:o().string.isRequired,restoreConnectionCallback:o().func,isRestoringConnection:o().bool,restoreConnectionError:o().string},t.Z=p},1294:function(e,t,a){"use strict";varn=a(4743),c=a(9818),r=a(9196),l=a(428);consti=window?.JP_CONNECTION_INITIAL_STATE?window.JP_CONNECTION_INITIAL_STATE:{};t.Z=function(){let{registrationNonce:e=i.registrationNonce,apiRoot:t=i.apiRoot,apiNonce:a=i.apiNonce,redirectUri:o,autoTrigger:s,from:u,skipUserConnection:m}=arguments.length>0&&void0!==arguments[0]?arguments[0]:{};const{registerSite:p,connectUser:d,refreshConnectedPlugins:h}=(0,c.useDispatch)(l.t),g=(0,c.useSelect)((e=>e(l.t).getRegistrationError())),{siteIsRegistering:f,userIsConnecting:v,userConnectionData:E,connectedPlugins:k,connectionErrors:w,isRegistered:b,isUserConnected:y,hasConnectedOwner:Z,isOfflineMode:C}=(0,c.useSelect)((e=>({siteIsRegistering:e(l.t).getSiteIsRegistering(),userIsConnecting:e(l.t).getUserIsConnecting(),userConnectionData:e(l.t).getUserConnectionData(),connectedPlugins:e(l.t).getConnectedPlugins(),connectionErrors:e(l.t).getConnectionErrors(),isOfflineMode:e(l.t).getIsOfflineMode(),...e(l.t).getConnectionStatus()}))),_=()=>m?o?(window.location=o,Promise.resolve(o)):Promise.resolve():d({from:u,redirectUri:o}),R=t=>(t&&t.preventDefault(),b?_():p({registrationNonce:e,redirectUri:o}).then((()=>_())));return(0,r.useEffect)((()=>{n.ZP.setApiRoot(t),n.ZP.setApiNonce(a)}),[t,a]),(0,r.useEffect)((()=>{!s||f||v||R()}),[]),{handleRegisterSite:R,handleConnectUser:_,refreshConnectedPlugins:h,isRegistered:b,isUserConnected:y,siteIsRegistering:f,userIsConnecting:v,registrationError:g,userConnectionData:E,hasConnectedOwner:Z,connectedPlugins:k,connectionErrors:w,isOfflineMode:C}}},3329:function(e,t,a){"use strict";a.d(t,{Z:function(){returnl},h:function(){returni}});varn=a(6186),c=a(1294),r=a(1045);functionl(){const{connectionErrors:e}=(0,c.Z)({}),t=Object.values(e).shift(),a=t&&Object.values(t).length&&Object.values(t).shift().error_message;return{hasConnectionError:Boolean(a),connectionErrorMessage:a}}consti=()=>{const{hasConnectionError:e,connectionErrorMessage:t}=l(),{restoreConnection:a,isRestoringConnection:c,restoreConnectionError:i}=(0,r.Z)();returne?React.createElement(n.Z,{isRestoringConnection:c,restoreConnectionError:i,restoreConnectionCallback:a,message:t}):null}},8258:function(e,t,a){"use strict";a.d(t,{Z:function(){returnf}});varn=a(4743),c=a(4153),r=a(9818),l=a(951),i=a.n(l),o=a(9196),s=a(1294),u=a(428);constm=i()("jetpack:connection:useProductCheckoutWorkflow"),{registrationNonce:p,apiRoot:d,apiNonce:h,siteSuffix:g}=window?.JP_CONNECTION_INITIAL_STATE?window.JP_CONNECTION_INITIAL_STATE:{};functionf(){let{productSlug:e,redirectUrl:t,siteSuffix:a=g,siteProductAvailabilityHandler:l=null,from:i}=arguments.length>0&&void0!==arguments[0]?arguments[0]:{};m("productSlug is %s",e),m("redirectUrl is %s",t),m("siteSuffix is %s",a),m("from is %s",i);const[f,v]=(0,o.useState)(!1),{registerSite:E}=(0,r.useDispatch)(u.t),{isUserConnected:k,isRegistered:w,handleConnectUser:b}=(0,s.Z)({redirectUri:t,from:i}),y=(0,c.Z)(e,a,t,k);m("checkoutProductUrl is %s",y),m("isUserConnected is %s",k);constZ=()=>Promise.resolve(l&&l()).then((e=>{if(e)returnm("handleAfterRegistration: Site has a product associated"),b();m("handleAfterRegistration: Site does not have a product associated. Redirecting to checkout %s",y),window.location.href=y}));return(0,o.useEffect)((()=>{n.ZP.setApiRoot(d),n.ZP.setApiNonce(h)}),[]),{run:e=>{if(e&&e.preventDefault(),v(!0),w)returnZ();E({registrationNonce:p,redirectUri:t}).then(Z)},isRegistered:w,hasCheckoutStarted:f}}},1045:function(e,t,a){"use strict";a.d(t,{Z:function(){returns}});varn=a(4743),
__("Last updated on %s.","jetpack-protect"),b().unix(te).format("MMMM D, YYYY")))),pe&&React.createElement(React.Fragment,null,React.createElement(i.ZP,{className:T.Z["automatic-rules-stats__failed-install"],variant:"body-small",mt:2},__("Failed to update automatic firewall rules.","jetpack-protect")," ",we(pe)),React.createElement(o.Z,{variant:"link",href:C.K},React.createElement(i.ZP,{variant:"body-small"},__("Contact support","jetpack-protect"))))))),!ie&&React.createElement("div",{className:T.Z["upgrade-trigger-section"]},React.createElement(s.Z,{className:T.Z["upgrade-trigger"],description:me?__("Your site is not receiving the latest updates to automatic rules","jetpack-protect",0):__("Set up automatic rules with one click","jetpack-protect"),cta:me?__("Upgrade to keep your site secure with up-to-date firewall rules","jetpack-protect",0):__("Upgrade to enable automatic firewall protection","jetpack-protect"),onClick:ye}))),Le=React.createElement(React.Fragment,null,React.createElement("div",{className:T.Z["brute-force-rules-section"]},React.createElement(I.Z,{id:"jetpack_waf_ip_allow_list",label:__("Always allowed IP addresses","jetpack-protect"),description:React.createElement(React.Fragment,null,React.createElement(i.ZP,{mb:1},__("IP addresses added to this list will never be blocked by Jetpack's brute force protection.","jetpack-protect")),React.createElement("div",{className:T.Z["current-ip-text"]},React.createElement(i.ZP,{variant:"body-small",mb:1},(0,g.createInterpolateElement)((0,f.sprintf)(
// translators: placeholder is the user's current IP address.
__("Your current IP: <strong>%s</strong>","jetpack-protect"),W),{strong:React.createElement("strong",null)})),React.createElement(o.Z,{variant:"secondary",size:"small",onClick:xe,disabled:fe||Pe},__("+ Add to Allow List","jetpack-protect")))),placeholder:__("Example:","jetpack-protect")+"\n12.12.12.1\n12.12.12.2",rows:3,value:he.jetpack_waf_ip_allow_list,onChange:Ce,disabled:fe})),React.createElement(o.Z,{onClick:Ze,isLoading:fe,disabled:fe},__("Save changes","jetpack-protect"))),Ie=React.createElement(React.Fragment,null,React.createElement("div",{className:T.Z["toggle-section"]},React.createElement("div",{className:T.Z["toggle-section__control"]},React.createElement(z.Z,{id:"brute_force_protection",checked:he.brute_force_protection,onChange:Re,disabled:fe})),React.createElement("div",{className:T.Z["toggle-section__content"]},React.createElement(i.ZP,{variant:"title-medium",mb:2},__("Enable brute force protection","jetpack-protect")),React.createElement(i.ZP,null,__("Prevent bots and hackers from attempting to log in to your website with common username and password combinations.","jetpack-protect")))),!K&&he.brute_force_protection&&Le),Te=React.createElement("div",{className:T.Z["toggle-wrapper"]},K&&Me,Ie,K&&React.createElement("div",{className:`${T.Z["toggle-section"]}${B||J?"":T.Z["toggle-section--disabled"]}`},React.createElement("div",{className:T.Z["toggle-section__control"]},React.createElement(z.Z,{id:"jetpack_waf_ip_list",checked:(J||B)&&he.jetpack_waf_ip_list,onChange:je,disabled:fe||!J&&!B})),React.createElement("div",{className:T.Z["toggle-section__content"]},React.createElement(i.ZP,{variant:"title-medium",mb:2},__("Enable manual block and allow lists","jetpack-protect")),React.createElement(i.ZP,null,__("Manually block or allow traffic from specific IP addresses.","jetpack-protect")),F&&React.createElement("div",{className:T.Z["toggle-section__details"]},React.createElement("div",{className:T.Z["manual-rules-stats"]},0===Q&&0===Y&&React.createElement(i.ZP,{className:T.Z["manual-rules-stats__no-rules"],variant:"body-small",mt:2},__("No manual rules are being applied.","jetpack-protect")),Y>0&&React.createElement(i.ZP,{className:T.Z["manual-rules-stats__block-list-count"],variant:"body-small",mt:2},(0,f.sprintf)(
_n("%s IP is being blocked. ","%s IPs are being blocked. ",Y,"jetpack-protect"),1===Y?"One":Y)),Q>0&&React.createElement(i.ZP,{className:T.Z["manual-rules-stats__allow-list-count"],variant:"body-small",mt:2},(0,f.sprintf)(
_n("%s IP is being allowed.","%s IPs are being allowed.",Q,"jetpack-protect"),1===Q?"One":Q))),React.createElement(o.Z,{variant:"link",disabled:!J&&!B},React.createElement(i.ZP,{variant:"body-small",onClick:Ne},__("Edit manual rules","jetpack-protect"))))))),Ae=React.createElement("div",null,React.createElement(o.Z,{className:T.Z["go-back-button"],variant:"icon",icon:k.Z,onClick:Ne},React.createElement(i.ZP,null,__("Go back","jetpack-protect"))),React.createElement(i.ZP,{variant:"title-medium",mt:4,mb:2},__("Manual rules","jetpack-protect")),React.createElement(i.ZP,{mb:4},__("Add manual rules for what IP traffic the Jetpack Firewall and brute force protection should block or allow.","jetpack-protect")),K&&React.createElement("div",{className:T.Z["manual-rules-section"]},React.createElement(I.Z,{id:"jetpack_waf_ip_block_list",label:__("Blocked IP addresses","jetpack-protect"),placeholder:__("Example:","jetpack-protect")+"\n12.12.12.1\n12.12.12.2",rows:3,value:he.jetpack_waf_ip_block_list,onChange:Ce,disabled:fe})),React.createElement("div",{className:T.Z["manual-rules-section"]},React.createElement(I.Z,{id:"jetpack_waf_ip_allow_list",label:__("Always allowed IP addresses","jetpack-protect"),description:React.createElement("div",{className:T.Z["current-ip-text"]},React.createElement(i.ZP,{variant:"body-small",mb:1},(0,g.createInterpolateElement)((0,f.sprintf)(
// translators: placeholder is the user's current IP address.
__("Your current IP: <strong>%s</strong>","jetpack-protect"),W),{strong:React.createElement("strong",null)})),React.createElement(o.Z,{variant:"secondary",size:"small",onClick:xe,disabled:fe||Pe},__("+ Add to Allow List","jetpack-protect"))),placeholder:__("Example:","jetpack-protect")+"\n12.12.12.1\n12.12.12.2",rows:3,value:he.jetpack_waf_ip_allow_list,onChange:Ce,disabled:fe})),React.createElement(o.Z,{onClick:Ze,isLoading:fe,disabled:fe},__("Save changes","jetpack-protect")));returnReact.createElement(S.Z,null,t.message&&React.createElement(M.Z,c()({floating:!0,dismissable:!0},t)),React.createElement(x.Z,null),React.createElement(u.Z,{className:T.Z.container,horizontalSpacing:8,horizontalGap:4},K&&!J&&React.createElement(m.Z,null,ze," "),React.createElement(m.Z,null,Ee?Ae:Te)),K?React.createElement(P.Z,null):React.createElement(L.Z,null))}},8840:function(e,t,a){"use strict";varn=a(5106),c=a(526),r=a(9818),l=a(5736),i=a(9196),o=a(4633),s=a(9974),u=a(8891),m=a(2854),p=a(5823);const__=l.__;t.Z=e=>{let{threatList:t=[]}=e;const{setModal:a,fixThreats:l}=(0,r.useDispatch)(o.t),{threatsUpdating:d}=(0,r.useSelect)((e=>e(o.t).getThreatsUpdating())),[h,g]=(0,i.useState)(t.map((e=>{let{id:t}=e;returnt}))),f=(0,i.useCallback)(((e,t)=>{g(e?h.push(t.id):h.filter((e=>e!==t.id)))}),[h]);returnReact.createElement(m.Z,null,React.createElement(s.Z,null,React.createElement(n.ZP,{variant:"title-medium",mb:2},__("Fix all threats","jetpack-protect")),React.createElement(n.ZP,{mb:3},__("Jetpack will be fixing the selected threats:","jetpack-protect")),React.createElement("div",{className:p.Z.list},t.map((e=>React.createElement(u.Z,{key:e.id,threat:e,fixAllDialog:!0,onCheckFix:f})))),React.createElement("div",{className:p.Z.footer},React.createElement(c.Z,{variant:"secondary",onClick:e=>{e.preventDefault(),a({type:null})}},__("Cancel","jetpack-protect")),React.createElement(c.Z,{isLoading:Boolean(d)&&d[h[0]],onClick:asynce=>{e.preventDefault(),l(h,(()=>{a({type:null})}))}},__("Fix all threats","jetpack-protect")))))}},1593:function(e,t,a){"use strict";varn=a(5106),c=a(526),r=a(9818),l=a(5736),i=a(4633),o=a(9974),s=a(8891),u=a(2854),m=a(7279);const__=l.__;t.Z=e=>{let{id:t,fixable:a,label:l,icon:p,severity:d}=e;const{setModal:h,fixThreats:g}=(0,r.useDispatch)(i.t),f=(0,r.useSelect)((e=>e(i.t).getThreatsUpdating()));returnReact.createElement(u.Z,null,React.createElement(o.Z,null,React.createElement(n.ZP,{variant:"title-medium",mb:2},__("Fix Threat","jetpack-protect")),React.createElement(n.ZP,{mb:3},__("Jetpack will be fixing the selected threat:","jetpack-protect")),React.createElement("div",{className:m.Z.list},React.createElement(s.Z,{threat:{id:t,fixable:a,label:l,icon:p,severity:d},fixAllDialog:!1})),React.createElement("div",{className:m.Z.footer},React.createElement(c.Z,{variant:"secondary",onClick:e=>{e.preventDefault(),h({type:null})}},__("Cancel","jetpack-protect")),React.createElement(c.Z,{isLoading:Boolean(f&&f[t]),onClick:asynce=>{e.preventDefault(),g([t],(()=>{h({type:null})}))}},__("Fix threat","jetpack-protect")))))}},5678:function(e,t,a){"use strict";varn=a(9196),c=a(1234);t.Z=e=>{let{ariaLabel:t,checked:a=!1,className:r="",disabled:l=!1,id:i,onChange:o=(()=>{}),onKeyDown:s=(()=>{}),switchClassNames:u="",toggling:m}=e;constp=(0,n.useCallback)((e=>{l||o(e)}),[l,o]),d=(0,n.useCallback)((e=>{l||("Enter"!==e.key&&" "!==e.key||(e.preventDefault(),o(e)),s(e))}),[l,o,s]);returnReact.createElement(React.Fragment,null,React.createElement("div",null,React.createElement("input",{className:`${c.Z["form-toggle"]}${r}${m?c.Z["is-toggling"]:""}`,type:"checkbox",checked:a,readOnly:!0,disabled:l}),React.createElement("span",{className:`${c.Z["form-toggle__switch"]}${u}`,disabled:l,id:i,onClick:p,onKeyDown:d,role:"checkbox","aria-checked":a,"aria-label":t,tabIndex:l?-1:0})))}},3584:function(e,t,a){"use strict";a.d(t,{U:function(){returnd}});varn=a(5106),c=a(1074),r=a(7489),l=a(2229),i=a(5235),o=a.n(i),s=a(9196),u=a.n(s),m=a(9122);constp=u().createContext(),d=e=>{let{id:t,title:a,label:i,icon:d,children:h,onOpen:g}=e;constf=(0,
__("Latest results as of %s","jetpack-protect"),(0,s.dateI18n)("F jS",t))),e>0&&p().createElement(l.ZP,{variant:"headline-small",component:"h1"},(0,u.sprintf)(/* translators: %s: Total number of threats */
__("%1$s %2$s found","jetpack-protect"),e,1===e?"threat":"threats"))),p().createElement("div",{className:f.Z.summary__notice},m&&m.message&&p().createElement(g.Z,m)),a&&0===e&&p().createElement(i.Z,{variant:"secondary",className:f.Z["summary__scan-button"],isLoading:v,onClick:e=>{e.preventDefault(),E()}},__("Scan now","jetpack-protect")))))}},3324:function(e,t,a){"use strict";a.d(t,{O:function(){returnr}});varn=a(554),c=a(5714);constr=e=>{let{label:t,link:a}=e;returnReact.createElement(n.OL,{to:a,className:e=>{let{isActive:t}=e;returnt?`${c.Z.tab}${c.Z["tab--active"]}`:c.Z.tab}},t)};t.Z=e=>{let{children:t,className:a=""}=e;returnReact.createElement("nav",{className:`${c.Z.tabs}${a}`},t)}},9265:function(e,t,a){"use strict";varn=a(8063);t.Z=e=>{let{disabled:t=!1,id:a,label:c="",description:r="",placeholder:l="",rows:i=3,value:o="",onChange:s=(()=>{})}=e;returnReact.createElement("div",null,Boolean(c)&&React.createElement("label",{className:n.Z.label,htmlFor:a},c),Boolean(r)&&r,React.createElement("textarea",{className:n.Z.textarea,disabled:t,placeholder:l,rows:i,id:a,name:a,onChange:s,value:o||""}))}},8891:function(e,t,a){"use strict";a.d(t,{Z:function(){returnm}});varn=a(5106),c=a(5736),r=a(1074),l=a(9196),i=a.n(l),o=a(2251),s=a(9971);const__=c.__,u=e=>{switch(e.fixer){case"replace":return__("Jetpack Scan will replace the affected file or directory.","jetpack-protect");case"delete":return__("Jetpack Scan will delete the affected file or directory.","jetpack-protect");case"update":returne.target?(0,c.sprintf)(/* translators: %s: Version that the plugin will be upgraded to */
__("Jetpack Scan will update to a newer version %s.","jetpack-protect"),e.target):__("Jetpack Scan will update to a newer version.","jetpack-protect");case"edit":return__("Jetpack Scan will edit the affected file or directory.","jetpack-protect");case"rollback":returne.target?(0,c.sprintf)(/* translators: %s: Version that the plugin will be upgraded to */
__("Jetpack Scan will rollback the affected file to the version from %s.","jetpack-protect"),e.target):__("Jetpack Scan will rollback the affected file to an older (clean) version.","jetpack-protect");default:return__("Jetpack Scan will resolve the threat.","jetpack-protect")}};functionm(e){let{threat:t,fixAllDialog:a,onCheckFix:c}=e;const[m,p]=(0,l.useState)(!0),d=(0,l.useCallback)((e=>{p(e.target.checked),c(e.target.checked,t)}),[c,t]);returni().createElement(i().Fragment,null,i().createElement("div",{className:s.Z.threat},i().createElement(r.Z,{icon:t.icon,className:s.Z.threat__icon}),i().createElement("div",{className:s.Z.threat__summary},i().createElement(n.ZP,{className:s.Z.threat__summary__label,mb:1},t.label),i().createElement(n.ZP,{className:s.Z.threat__summary__title},u(t.fixable))),i().createElement("div",{className:s.Z.threat__severity},i().createElement(o.Z,{severity:t.severity})),a&&i().createElement("div",{className:s.Z.threat__checkbox},i().createElement("input",{type:"checkbox",checked:m,onChange:d,value:t.id}))))}},5658:function(e,t,a){"use strict";varn=a(5106),c=a(9307),r=a(5736),l=a(9196),i=a(5773),o=a(9709);const__=r.__,_n=r._n,s=()=>React.createElement("svg",{width:"80",height:"96",viewBox:"0 0 80 96",fill:"none",xmlns:"http://www.w3.org/2000/svg"},React.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M40 0.00634766L80 17.7891V44.2985C80 66.8965 65.1605 88.2927 44.2352 95.0425C41.4856 95.9295 38.5144 95.9295 35.7648 95.0425C14.8395 88.2927 0 66.8965 0 44.2985V17.7891L40 0.00634766Z",fill:"#069E08"}),React.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M60.9 33.6909L35.375 67.9124L19.2047 55.9263L22.7848 51.1264L34.1403 59.5436L56.0851 30.122L60.9 33.6909Z",fill:"white"}));t.Z=()=>{const{lastChecked:e}=(0,i.Z)(),t=(0,l.useMemo)((()=>e?(e=>{constt=newDate,a=6e4*t.getTimezoneOffset(),n=Math.floor((newDate(t.getTime()+a).getTime()-e)/1e3);letc=n/31536e3;returnc>1?(0,r.sprintf)(
_n("%s minute ago","%s minutes ago",Math.floor(c),"jetpack-protect"),Math.floor(c)):__("a few seconds ago","jetpack-protect")))))})(Date.parse(e)):null),[e]);returnReact.createElement("div",{className:o.Z.empty},React.createElement(s,null),React.createElement(n.H3,{weight:"bold",mt:8},__("Don't worry about a thing","jetpack-protect")),React.createElement(n.ZP,null,(0,c.createInterpolateElement)((0,r.sprintf)(
__("The last Protect scan ran <strong>%s</strong> and everything looked great.","jetpack-protect"),t),{strong:React.createElement("strong",null)})))}},2831:function(e,t,a){"use strict";varn=a(526),c=a(5106),r=a(857),l=a(8258),i=a(5736),o=a(9196),s=a.n(o),u=a(3898),m=a(6477),p=a(3584),d=a(9709);const__=i.__,h=e=>{let{description:t,filename:a,fixedIn:h,icon:g,id:f,name:v,source:E,table:k,title:w,type:b,version:y}=e;const{adminUrl:Z}=window.jetpackProtectInitialState||{},{run:C}=(0,l.Z)({productSlug:u.o,redirectUrl:Z}),{recordEventHandler:_}=(0,m.Z)(),R=_("jetpack_protect_threat_list_get_scan_link_click",C),j=E?s().createElement(n.Z,{variant:"link",isExternalLink:!0,weight:"regular",href:E},__("See more technical details of this threat","jetpack-protect")):null,N=(0,o.useCallback)((()=>v&&y?`${v} (${y})`:a?a.split("/").pop():k||void0),[a,v,k,y]);returns().createElement(p.U,{id:f,label:N(),title:w,icon:g,onOpen:(0,o.useCallback)((()=>{["core","plugin","theme"].includes(b)&&_(`jetpack_protect_${b}_threat_open`)}),[_,b])},t&&s().createElement("div",{className:d.Z["threat-section"]},s().createElement(c.ZP,{variant:"title-small",mb:2},__("What is the problem?","jetpack-protect")),s().createElement(c.ZP,{mb:2},t),j),h&&s().createElement("div",{className:d.Z["threat-section"]},s().createElement(c.ZP,{variant:"title-small",mb:2},__("How to fix it?","jetpack-protect")),s().createElement(c.ZP,{mb:2},/* translators: Translates to Update to. %1$s: Name. %2$s: Fixed version */
(0,i.sprintf)(__("Update to %1$s %2$s","jetpack-protect"),v,h)),s().createElement(r.Z,{description:__("Looking for advanced scan results and one-click fixes?","jetpack-protect"),cta:__("Upgrade Jetpack Protect now","jetpack-protect"),onClick:R,className:d.Z["threat-item-cta"]})),!t&&s().createElement("div",{className:d.Z["threat-section"]},j))};t.Z=e=>{let{list:t}=e;returns().createElement(p.Z,null,t.map((e=>{let{description:t,fixedIn:a,icon:n,id:c,name:r,source:l,table:i,title:o,type:u,version:m}=e;returns().createElement(h,{description:t,fixedIn:a,icon:n,id:c,key:c,name:r,source:l,table:i,title:o,type:u,version:m})})))}},5207:function(e,t,a){"use strict";varn=a(3363),c=a(3846),r=a(5106),l=a(526),i=a(9818),o=a(5736),s=a(9196),u=a.n(s),m=a(5773),p=a(4633),d=a(5658),h=a(2831),g=a(4289),f=a(1400),v=a(9709),E=a(7930);const__=o.__;t.Z=()=>{const{hasRequiredPlan:e}=(0,m.Z)(),{item:t,list:a,selected:k,setSelected:w}=(0,E.Z)(),b=a.filter((e=>e.fixable)),{setModal:y}=(0,i.useDispatch)(p.t),{scan:Z}=(0,i.useDispatch)(p.t),C=(0,i.useSelect)((e=>e(p.t).getScanIsEnqueuing())),_=(0,s.useCallback)((()=>{switch(k){case"all":return1===a.length?__("All threats","jetpack-protect"):(0,o.sprintf)(/* translators: placeholder is the amount of threats found on the site. */
__("All %s threats","jetpack-protect"),a.length);case"files":return(0,o.sprintf)(/* translators: placeholder is the amount of file threats found on the site. */
__("%1$s file %2$s","jetpack-protect"),a.length,1===a.length?"threat":"threats");case"database":return(0,o.sprintf)(/* translators: placeholder is the amount of database threats found on the site. */
__("%1$s database %2$s","jetpack-protect"),a.length,1===a.length?"threat":"threats");default:return(0,o.sprintf)(/* translators: Translates to Update to. %1$s: Name. %2$s: Fixed version */
__("%1$s %2$s in your %3$s %4$s","jetpack-protect"),a.length,1===a.length?"threat":"threats",t?.name,t?.version)}}),[k,a,t]);returnu().createElement(n.Z,{fluid:!0,horizontalSpacing:0,horizontalGap:3},u().createElement(c.Z,{lg:4},u().createElement(g.Z,{selected:k,onSelect:w})),u().createElement(c.Z,{lg:8},a?.length>0?u().createElement(u().Fragment,null,u().createElement("div",{className:v.Z["list-header"]},u().createElement(r.Dx,{className:v.Z["list-title"]},_()),e&&u().createElement(u().Fragment,null,b.length>0&&u().createElement(l.Z,{variant:"primary",className:v.Z["list-header-button"],onClick:(R=b,e=>{e.preventDefault(),y({type:"FIX_ALL_THREATS",props:{threatList:R}})})},/* translators: Translates to Auto fix all. $s: Number of fixable threats. */
(0,o.sprintf)(__("Auto fix all (%s)","jetpack-protect"),b.length)),u().createElement(l.Z,{variant:"secondary",className:v.Z["list-header-button"],isLoading:C,onClick:e=>{e.preventDefault(),Z()}},__("Scan now","jetpack-protect")))),e?u().createElement(f.Z,{list:a}):u().createElement(h.Z,{list:a})):u().createElement(d.Z,null)));varR}},4289:function(e,t,a){"use strict";varn=a(2054),c=a(5736),r=a(797),l=a(2817),i=a(7663),o=a(8960),s=a(4160),u=a(6376),m=a(9196),p=a(6477),d=a(5773),h=a(5338);const__=c.__;t.Z=e=>{let{selected:t,onSelect:a}=e;const{plugins:c,themes:g,numThreats:f,numCoreThreats:v,numFilesThreats:E,numDatabaseThreats:k,hasRequiredPlan:w}=(0,d.Z)(),{recordEvent:b}=(0,p.Z)(),[y]=(0,n.Z)("lg","<"),Z=(0,m.useCallback)((()=>{b("jetpack_protect_navigation_all_click")}),[b]),C=(0,m.useCallback)((()=>{b("jetpack_protect_navigation_core_click")}),[b]),_=(0,m.useCallback)((()=>{b("jetpack_protect_navigation_plugin_click")}),[b]),R=(0,m.useCallback)((()=>{b("jetpack_protect_navigation_theme_click")}),[b]),j=(0,m.useCallback)((()=>{b("jetpack_protect_navigation_file_click")}),[b]),N=(0,m.useCallback)((()=>{b("jetpack_protect_navigation_database_click")}),[b]);returnReact.createElement(h.ZP,{selected:t,onSelect:a,mode:y?"dropdown":"list"},React.createElement(h.Dx,{initial:!0,id:"all",label:__("All threats","jetpack-protect"),icon:r.Z,badge:f,disabled:f<=0,onClick:Z,checked:!0}),React.createElement(h.Dx,{id:"wordpress",label:__("WordPress","jetpack-protect"),icon:l.Z,badge:v,disabled:v<=0,onClick:C,checked:!0}),React.createElement(h.KB,{label:__("Plugins","jetpack-protect"),icon:i.Z},c.map((e=>{let{name:t,threats:a,checked:n}=e;returnReact.createElement(h.Dx,{key:t,id:t,label:t,checked:n,badge:a?.length,disabled:a?.length<=0,onClick:_})}))),React.createElement(h.KB,{label:__("Themes","jetpack-protect"),icon:o.Z},g.map((e=>{let{name:t,threats:a,checked:n}=e;returnReact.createElement(h.Dx,{key:t,id:t,label:t,checked:n,badge:a?.length,disabled:a?.length<=0,onClick:R})}))),w&&React.createElement(React.Fragment,null,React.createElement(h.Dx,{id:"files",label:__("Files","jetpack-protect"),icon:s.Z,badge:E,disabled:E<=0,onClick:j,checked:!0}),React.createElement(h.Dx,{id:"database",label:__("Database","jetpack-protect"),icon:u.Z,badge:k,disabled:k<=0,onClick:N,checked:!0})))}},1400:function(e,t,a){"use strict";varn=a(526),c=a(5106),r=a(2054),l=a(9818),i=a(9307),o=a(5736),s=a(9196),u=a.n(s),m=a(6477),p=a(4633),d=a(7127),h=a(4257),g=a(289),f=a(9709);const__=o.__,v=e=>{let{context:t,description:a,diff:r,filename:i,fixedIn:v,icon:E,fixable:k,id:w,label:b,name:y,source:Z,title:C,type:_,severity:R}=e;const{setModal:j}=(0,l.useDispatch)(p.t),{recordEvent:N}=(0,m.Z)(),S=Z?u().createElement(n.Z,{variant:"link",isExternalLink:!0,weight:"regular",href:Z},__("See more technical details of this threat","jetpack-protect")):null;returnu().createElement(g.c,{id:w,label:b,title:C,icon:E,fixable:k,severity:R,onOpen:(0,s.useCallback)((()=>{["core","plugin","theme","file","database"].includes(_)&&N(`jetpack_protect_${_}_threat_open`)}),[N,_])},a&&u().createElement("div",{className:f.Z["threat-section"]},u().createElement(c.ZP,{variant:"title-small",mb:2},__("What is the problem?","jetpack-protect")),u().createElement(c.ZP,{mb:2},a),S),(i||t||r)&&u().createElement(c.ZP,{variant:"title-small",mb:2},__("The technical details","jetpack-protect")),i&&u().createElement(u().Fragment,null,u().createElement(c.ZP,{mb:2},/* translators: filename follows in separate line; e.g. "PHP.Injection.5 in: `post.php`" */
__("Threat found in file:","jetpack-protect")),u().createElement("pre",{className:f.Z["threat-filename"]},i)),t&&u().createElement(h.Z,{context:t}),r&&u().createElement(d.C,{diff:r}),v&&u().createElement("div",{className:f.Z["threat-section"]},u().createElement(c.ZP,{variant:"title-small",mb:2},__("How to fix it?","jetpack-protect")),u().createElement(c.ZP,{mb:2},/* translators: Translates to Update to. %1$s: Name. %2$s: Fixed version */
(0,o.sprintf)(__("Update to %1$s %2$s","jetpack-protect"),y,v))),!a&&u().createElement("div",{className:f.Z["threat-section"]},S),u().createElement("div",{className:f.Z["threat-footer"]},u().createElement(n.Z,{isDestructive:!0,variant:"secondary",onClick:e=>{e.preventDefault(),j({type:"IGNORE_THREAT",props:{id:w,label:b,title:C,icon:E,severity:R}})}},__("Ignore threat","jetpack-protect")),k&&u().createElement(n.Z,{onClick:e=>{e.preventDefault(),j({type:"FIX_THREAT",props:{id:w,label:b,title:C,icon:E,severity:R,fixable:k}})}},__("Fix threat","jetpack-protect"))))};t.Z=e=>{let{list:t}=e;const{scan:a}=(0,l.useDispatch)(p.t),o=(0,i.createInterpolateElement)(__("If you have manually fixed any of the threats listed above, <manualScanLink>you can run a manual scan now</manualScanLink> or wait for Jetpack to scan your site later today.","jetpack-protect"),{manualScanLink:u().createElement(n.Z,{variant:"link",onClick:e=>{e.preventDefault(),a()}})}),[s]=(0,r.Z)(["sm","lg"],[null,"<"]),m=e=>e.name&&e.version?`${e.name} (${e.version})`:e.filename?e.filename.split("/").pop():e.table?e.table:void0;returnt=t.map((e=>({label:m(e),...e}))),u().createElement(u().Fragment,null,!s&&u().createElement("div",{className:f.Z["accordion-heading"]},u().createElement("span",null,__("Details","jetpack-protect")),u().createElement("span",null,__("Severity","jetpack-protect")),u().createElement("span",null,__("Auto-fix","jetpack-protect")),u().createElement("span",null)),u().createElement(g.Z,null,t.map((e=>{let{context:t,description:a,diff:n,filename:c,fixedIn:r,icon:l,fixable:i,id:o,label:s,name:m,severity:p,source:d,table:h,title:g,type:f,version:E}=e;returnu().createElement(v,{context:t,description:a,diff:n,filename:c,fixedIn:r,icon:l,fixable:i,id:o,key:o,label:s,name:m,severity:p,source:d,table:h,title:g,type:f,version:E})}))),u().createElement(c.ZP,{className:f.Z["manual-scan"],variant:"body-small"},o))}},7930:function(e,t,a){"use strict";varn=a(2817),c=a(4160),r=a(6376),l=a(7663),i=a(8960),o=a(9196),s=a(5773);constu=(e,t)=>t.severity-e.severity,m=(e,t)=>Array.isArray(e)?e.map((e=>m(e,t))).flat():e?.threats.map((a=>({...a,...e,...t})));t.Z=()=>{const{plugins:e,themes:t,core:a,files:p,database:d}=(0,s.Z)(),[h,g]=(0,o.useState)("all"),{unsortedList:f,item:v}=(0,o.useMemo)((()=>{if(h&&"all"!==h){switch(h){case"wordpress":return{unsortedList:m(a,{icon:n.Z}),item:a};case"files":return{unsortedList:m(p,{icon:c.Z}),item:p};case"database":return{unsortedList:m(d,{icon:r.Z}),item:d}}consto=e.find((e=>e?.name===h));if(o)return{unsortedList:m(o,{icon:l.Z}),item:o};consts=t.find((e=>e?.name===h));if(s)return{unsortedList:m(s,{icon:i.Z}),item:s}}return{unsortedList:[...m(a,{icon:n.Z}),...m(e,{icon:l.Z}),...m(t,{icon:i.Z}),...m(p,{icon:c.Z}),...m(d,{icon:r.Z})],item:null}}),[a,d,p,e,h,t]);return{item:v,list:(0,o.useMemo)((()=>f.sort(u)),[f]),selected:h,setSelected:g}}},2854:function(e,t,a){"use strict";varn=a(1294),c=a(8227);t.Z=e=>{let{children:t}=e;const{isUserConnected:a,hasConnectedOwner:r}=(0,n.Z)();returna&&r?t:React.createElement(c.Z,null)}},8227:function(e,t,a){"use strict";varn=a(5106),c=a(526),r=a(1294),l=a(9818),i=a(5736),o=a(4633),s=a(291),u=a(541);const__=i.__;t.Z=()=>{const{setModal:e}=(0,l.useDispatch)(o.t),{userIsConnecting:t,handleConnectUser:a}=(0,r.Z)({redirectUri:"admin.php?page=jetpack-protect"});returnReact.createElement(React.Fragment,null,React.createElement(n.ZP,{variant:"title-medium",mb:2},__("User connection needed","jetpack-protect")),React.createElement(s.Z,{type:"info",message:__("Before Jetpack Protect can ignore and auto-fix threats on your site, a user connection is needed.","jetpack-protect")}),React.createElement(n.ZP,{mb:3},__("A user connection provides Jetpack Protect the access necessary to perform these tasks.","jetpack-protect")),React.createElement(n.ZP,{mb:3},__("Once you’ve secured a user connection, all Jetpack Protect features will be available for use.","jetpack-protect")),React.createElement("div",{className:u.Z.footer},React.createElement(c.Z,{variant:"secondary",onClick:t=>{t.preventDefault(),e
_n("%s threat was fixed successfully","%s threats were fixed successfully",e.length,"jetpack-protect"),e.length)}))})).catch((()=>{a(J({type:"error",message:__("Not all threats could be fixed. Please contact our support.","jetpack-protect")}))})).finally((()=>{a(B([]))}))},J=e=>({type:Z,payload:e}),G=e=>({type:_,hasRequiredPlan:e}),$={checkCredentials:()=>asynce=>{let{dispatch:t}=e;returnawaitnewPromise(((e,a)=>(t(O(!0)),c()({path:"jetpack-protect/v1/check-credentials",method:"POST"}).then((a=>{t(V(a)),e(a)})).catch((e=>{a(e)})).finally((()=>{t(O(!1))})))))},setCredentials:V,setCredentialsIsFetching:O,setStatus:M,setStatusProgress:e=>({type:m,currentProgress:e}),startScanOptimistically:L,refreshStatus:T,setStatusIsFetching:F,setScanIsEnqueuing:D,setInstalledPlugins:e=>({type:f,plugins:e}),setInstalledThemes:e=>({type:v,themes:e}),setwpVersion:e=>({type:E,version:e}),setJetpackScan:e=>({type:k,scan:e}),ignoreThreat:function(e){lett=arguments.length>1&&void0!==arguments[1]?arguments[1]:()=>{};returnasynca=>{let{dispatch:n}=a;returnn(U(e,!0)),awaitnewPromise((()=>c()({path:`jetpack-protect/v1/ignore-threat?threat_id=${e}`,method:"POST"}).then((()=>n(T()))).then((()=>n(J({type:"success",message:__("Threat ignored","jetpack-protect")})))).catch((()=>n(J({type:"error",message:__("An error ocurred ignoring the threat.","jetpack-protect")})))).finally((()=>{n(U(e,!1)),t()}))))}},setModal:e=>({type:y,payload:e}),setNotice:J,clearNotice:()=>({type:C}),fixThreats:function(e){lett=arguments.length>1&&void0!==arguments[1]?arguments[1]:()=>{};returnasynca=>{let{dispatch:n}=a;returne.forEach((e=>{n(U(e,!0))})),awaitnewPromise((()=>c()({path:`jetpack-protect/v1/fix-threats?threat_ids=${e}`,method:"POST",data:{threatIds:e}}).then((()=>n(J({type:"success",message:__("We're hard at work fixing this threat in the background. Please check back shortly.","jetpack-protect")})))).then((()=>{setTimeout((()=>n(W(e))),1e3)})).catch((()=>n(J({type:"error",message:__("Error fixing threats. Please contact support.","jetpack-protect")})))).finally((()=>{e.forEach((e=>{n(U(e,!1))})),t()}))))}},scan:function(){lete=arguments.length>0&&void0!==arguments[0]?arguments[0]:()=>{};returnasynct=>{let{dispatch:a}=t;returna(D(!0)),awaitnewPromise((()=>c()({path:"jetpack-protect/v1/scan",method:"POST"}).then((()=>{a(L()),setTimeout((()=>a(T(!0))),5e3)})).catch((()=>a(J({type:"error",message:__("An error ocurred enqueuing the scan","jetpack-protect")})))).finally((()=>{a(D(!1)),e()}))))}},setThreatsAreFixing:B,refreshPlan:()=>e=>{let{dispatch:t}=e;c()({path:"jetpack-protect/v1/check-plan",method:"GET"}).then((e=>t(G(e))))},setHasRequiredPlan:G,setScanIsUnavailable:H,setWafIsEnabled:e=>({type:N,isEnabled:e}),setWafIsSeen:e=>({type:R,isSeen:e}),setWafUpgradeIsSeen:e=>({type:j,upgradeIsSeen:e}),setWafIsUpdating:e=>({type:S,isUpdating:e}),setWafIsToggling:e=>({type:P,isToggling:e}),setWafConfig:e=>({type:x,config:e}),setWafStats:e=>({type:z,stats:e})}},3638:function(e,t,a){"use strict";varn=a(9818),c=a(5230);constr={wafSupported:null,bruteForceSupported:null,isSeen:!1,upgradeIsSeen:!1,isEnabled:!1,isUpdating:!1,isToggling:!1,config:void0,stats:void0},l=(0,n.combineReducers)({credentials:function(){lete=arguments.length>0&&void0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void0;returnt.type===c.jA?t.credentials:e},credentialsIsFetching:function(){lete=arguments.length>0&&void0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void0;returnt.type===c._N?t.isFetching:e},status:function(){lete=arguments.length>0&&void0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void0;switch(t.type){casec.d0:returnt.status;casec.o9:return{...e,currentProgress:t.currentProgress};casec.Y2:return{...e,currentProgress:0,status:"optimistically_scanning"}}returne},statusIsFetching:function(){lete=arguments.length>0&&void0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void0;returnt.type===c.Gk?t.status:e},scanIsUnavailable:function(){lete=arguments.length>0&&void0!==argume