laipower/wp-content/plugins/jetpack-protect/build/index.js

48 lines
237 KiB
JavaScript
Raw Normal View History

/*! For license information please see index.js.LICENSE.txt */
(()=>{var e={9487:(e,t,a)=>{"use strict";a.d(t,{X:()=>c});const n={AED:{symbol:"د.إ.",grouping:",",decimal:".",precision:2},AFN:{symbol:"؋",grouping:",",decimal:".",precision:2},ALL:{symbol:"Lek",grouping:".",decimal:",",precision:2},AMD:{symbol:"֏",grouping:",",decimal:".",precision:2},ANG:{symbol:"ƒ",grouping:",",decimal:".",precision:2},AOA:{symbol:"Kz",grouping:",",decimal:".",precision:2},ARS:{symbol:"$",grouping:".",decimal:",",precision:2},AUD:{symbol:"A$",grouping:",",decimal:".",precision:2},AWG:{symbol:"ƒ",grouping:",",decimal:".",precision:2},AZN:{symbol:"₼",grouping:" ",decimal:",",precision:2},BAM:{symbol:"КМ",grouping:".",decimal:",",precision:2},BBD:{symbol:"Bds$",grouping:",",decimal:".",precision:2},BDT:{symbol:"৳",grouping:",",decimal:".",precision:0},BGN:{symbol:"лв.",grouping:" ",decimal:",",precision:2},BHD:{symbol:"د.ب.",grouping:",",decimal:".",precision:3},BIF:{symbol:"FBu",grouping:",",decimal:".",precision:0},BMD:{symbol:"$",grouping:",",decimal:".",precision:2},BND:{symbol:"$",grouping:".",decimal:",",precision:0},BOB:{symbol:"Bs",grouping:".",decimal:",",precision:2},BRL:{symbol:"R$",grouping:".",decimal:",",precision:2},BSD:{symbol:"$",grouping:",",decimal:".",precision:2},BTC:{symbol:"Ƀ",grouping:",",decimal:".",precision:2},BTN:{symbol:"Nu.",grouping:",",decimal:".",precision:1},BWP:{symbol:"P",grouping:",",decimal:".",precision:2},BYR:{symbol:"р.",grouping:" ",decimal:",",precision:2},BZD:{symbol:"BZ$",grouping:",",decimal:".",precision:2},CAD:{symbol:"C$",grouping:",",decimal:".",precision:2},CDF:{symbol:"FC",grouping:",",decimal:".",precision:2},CHF:{symbol:"CHF",grouping:"'",decimal:".",precision:2},CLP:{symbol:"$",grouping:".",decimal:",",precision:2},CNY:{symbol:"¥",grouping:",",decimal:".",precision:2},COP:{symbol:"$",grouping:".",decimal:",",precision:2},CRC:{symbol:"₡",grouping:".",decimal:",",precision:2},CUC:{symbol:"CUC",grouping:",",decimal:".",precision:2},CUP:{symbol:"$MN",grouping:",",decimal:".",precision:2},CVE:{symbol:"$",grouping:",",decimal:".",precision:2},CZK:{symbol:"Kč",grouping:" ",decimal:",",precision:2},DJF:{symbol:"Fdj",grouping:",",decimal:".",precision:0},DKK:{symbol:"kr.",grouping:"",decimal:",",precision:2},DOP:{symbol:"RD$",grouping:",",decimal:".",precision:2},DZD:{symbol:"د.ج.",grouping:",",decimal:".",precision:2},EGP:{symbol:"ج.م.",grouping:",",decimal:".",precision:2},ERN:{symbol:"Nfk",grouping:",",decimal:".",precision:2},ETB:{symbol:"ETB",grouping:",",decimal:".",precision:2},EUR:{symbol:"€",grouping:".",decimal:",",precision:2},FJD:{symbol:"FJ$",grouping:",",decimal:".",precision:2},FKP:{symbol:"£",grouping:",",decimal:".",precision:2},GBP:{symbol:"£",grouping:",",decimal:".",precision:2},GEL:{symbol:"Lari",grouping:" ",decimal:",",precision:2},GHS:{symbol:"₵",grouping:",",decimal:".",precision:2},GIP:{symbol:"£",grouping:",",decimal:".",precision:2},GMD:{symbol:"D",grouping:",",decimal:".",precision:2},GNF:{symbol:"FG",grouping:",",decimal:".",precision:0},GTQ:{symbol:"Q",grouping:",",decimal:".",precision:2},GYD:{symbol:"G$",grouping:",",decimal:".",precision:2},HKD:{symbol:"HK$",grouping:",",decimal:".",precision:2},HNL:{symbol:"L.",grouping:",",decimal:".",precision:2},HRK:{symbol:"kn",grouping:".",decimal:",",precision:2},HTG:{symbol:"G",grouping:",",decimal:".",precision:2},HUF:{symbol:"Ft",grouping:".",decimal:",",precision:0},IDR:{symbol:"Rp",grouping:".",decimal:",",precision:0},ILS:{symbol:"₪",grouping:",",decimal:".",precision:2},INR:{symbol:"₹",grouping:",",decimal:".",precision:2},IQD:{symbol:"د.ع.",grouping:",",decimal:".",precision:2},IRR:{symbol:"﷼",grouping:",",decimal:"/",precision:2},ISK:{symbol:"kr.",grouping:".",decimal:",",precision:0},JMD:{symbol:"J$",grouping:",",decimal:".",precision:2},JOD:{symbol:"د.ا.",grouping:",",decimal:".",precision:3},JPY:{symbol:"¥",grouping:",",decimal:".",precision:0},KES:{symbol:"S",grouping:",",decimal:".",precision:2},KGS:{symbol:"сом",grouping:" ",decimal:"-",precision:2},KHR:{symbol:"៛",grouping:",",decimal:".",precision:0},
__("%1$d of %2$d","jetpack-protect"),d,u)),React.createElement(n.Popover,Z,React.createElement(l.ZP,null,React.createElement("div",{className:p.Z.wrapper},React.createElement("div",{className:p.Z.header},React.createElement(o.ZP,{variant:"title-small",className:p.Z.title},t),!e&&React.createElement(React.Fragment,null,React.createElement(s.Z,{size:"small",variant:"tertiary","aria-label":"close",className:p.Z["close-button"],icon:r.Z,iconSize:16,onClick:E}))),a,React.createElement("div",{className:p.Z.footer},_&&React.createElement(o.ZP,{variant:"body",className:p.Z.steps},w),React.createElement(s.Z,{variant:"primary",className:p.Z["action-button"],disabled:h,onClick:k,isExternalLink:f,href:g},m)))))}},9105:(e,t,a)=>{"use strict";a.d(t,{Z:()=>d});var n=a(5736),c=a(5235),r=a.n(c),s=a(8237),i=a(8868),o=a(3846),l=a(3363),p=a(1494);const __=n.__,d=({children:e,moduleName:t=__("Jetpack","jetpack-protect"),moduleNameHref:a,showHeader:n=!0,showFooter:c=!0,showBackground:d=!0,header:u})=>{const m=r()(p.Z["admin-page"],{[p.Z.background]:d});return React.createElement("div",{className:m},n&&React.createElement(l.Z,{horizontalSpacing:5},React.createElement(o.Z,null,u||React.createElement(i.Z,null))),React.createElement(l.Z,{fluid:!0,horizontalSpacing:0},React.createElement(o.Z,null,e)),c&&React.createElement(l.Z,{horizontalSpacing:5},React.createElement(o.Z,null,React.createElement(s.Z,{moduleName:t,moduleNameHref:a}))))}},216:(e,t,a)=>{"use strict";a.d(t,{Z:()=>s});var n=a(9196),c=a.n(n),r=a(281);const s=({children:e})=>c().createElement("div",{className:r.Z["section-hero"]},e)},7525:(e,t,a)=>{"use strict";a.d(t,{Z:()=>p});var n=a(2674),c=a.n(n),r=a(5736),s=a(5235),i=a.n(s),o=a(9196),l=a.n(o);const __=r.__,p=({title:e=__("An Automattic Airline","jetpack-protect"),height:t=7,className:a,...n})=>l().createElement("svg",c()({role:"img",x:"0",y:"0",viewBox:"0 0 935 38.2",enableBackground:"new 0 0 935 38.2","aria-labelledby":"jp-automattic-byline-logo-title",height:t,className:i()("jp-automattic-byline-logo",a)},n),l().createElement("desc",{id:"jp-automattic-byline-logo-title"},e),l().createElement("path",{d:"M317.1 38.2c-12.6 0-20.7-9.1-20.7-18.5v-1.2c0-9.6 8.2-18.5 20.7-18.5 12.6 0 20.8 8.9 20.8 18.5v1.2C337.9 29.1 329.7 38.2 317.1 38.2zM331.2 18.6c0-6.9-5-13-14.1-13s-14 6.1-14 13v0.9c0 6.9 5 13.1 14 13.1s14.1-6.2 14.1-13.1V18.6zM175 36.8l-4.7-8.8h-20.9l-4.5 8.8h-7L157 1.3h5.5L182 36.8H175zM159.7 8.2L152 23.1h15.7L159.7 8.2zM212.4 38.2c-12.7 0-18.7-6.9-18.7-16.2V1.3h6.6v20.9c0 6.6 4.3 10.5 12.5 10.5 8.4 0 11.9-3.9 11.9-10.5V1.3h6.7V22C231.4 30.8 225.8 38.2 212.4 38.2zM268.6 6.8v30h-6.7v-30h-15.5V1.3h37.7v5.5H268.6zM397.3 36.8V8.7l-1.8 3.1 -14.9 25h-3.3l-14.7-25 -1.8-3.1v28.1h-6.5V1.3h9.2l14 24.4 1.7 3 1.7-3 13.9-24.4h9.1v35.5H397.3zM454.4 36.8l-4.7-8.8h-20.9l-4.5 8.8h-7l19.2-35.5h5.5l19.5 35.5H454.4zM439.1 8.2l-7.7 14.9h15.7L439.1 8.2zM488.4 6.8v30h-6.7v-30h-15.5V1.3h37.7v5.5H488.4zM537.3 6.8v30h-6.7v-30h-15.5V1.3h37.7v5.5H537.3zM569.3 36.8V4.6c2.7 0 3.7-1.4 3.7-3.4h2.8v35.5L569.3 36.8 569.3 36.8zM628 11.3c-3.2-2.9-7.9-5.7-14.2-5.7 -9.5 0-14.8 6.5-14.8 13.3v0.7c0 6.7 5.4 13 15.3 13 5.9 0 10.8-2.8 13.9-5.7l4 4.2c-3.9 3.8-10.5 7.1-18.3 7.1 -13.4 0-21.6-8.7-21.6-18.3v-1.2c0-9.6 8.9-18.7 21.9-18.7 7.5 0 14.3 3.1 18 7.1L628 11.3zM321.5 12.4c1.2 0.8 1.5 2.4 0.8 3.6l-6.1 9.4c-0.8 1.2-2.4 1.6-3.6 0.8l0 0c-1.2-0.8-1.5-2.4-0.8-3.6l6.1-9.4C318.7 11.9 320.3 11.6 321.5 12.4L321.5 12.4z"}),l().createElement("path",{d:"M37.5 36.7l-4.7-8.9H11.7l-4.6 8.9H0L19.4 0.8H25l19.7 35.9H37.5zM22 7.8l-7.8 15.1h15.9L22 7.8zM82.8 36.7l-23.3-24 -2.3-2.5v26.6h-6.7v-36H57l22.6 24 2.3 2.6V0.8h6.7v35.9H82.8z"}),l().createElement("path",{d:"M719.9 37l-4.8-8.9H694l-4.6 8.9h-7.1l19.5-36h5.6l19.8 36H719.9zM704.4 8l-7.8 15.1h15.9L704.4 8zM733 37V1h6.8v36H733zM781 37c-1.8 0-2.6-2.5-2.9-5.8l-0.2-3.7c-0.2-3.6-1.7-5.1-8.4-5.1h-12.8V37H750V1h19.6c10.8 0 15.7 4.3 15.7 9.9 0 3.9-2 7.7-9 9 7 0.5 8.5 3.7 8.6 7.9l0.1 3c0.1 2.5 0.5 4.3 2.2 6.1V37H781zM778.5 11.8c0-2.6-2.1-5.1-7.9-5.1h-13.8v10.8h14.4c5 0 7.3-2.4 7.3-5.2V11.8zM794.8 37V1h6.8v30.4h28.2V37H794.8zM836.7 37V1h6.8v36H836.7
__("(opens in a new tab)","jetpack-protect"))),R=E?"_blank":void 0,j=a?.[0]&&null!==a[0]&&"components-tooltip"!==a?.[0]?.props?.className;return u().createElement(r.Button,c()({target:R,variant:n,className:p()(_,{"has-text":!!d&&j}),icon:E?void 0:d,iconSize:h,disabled:g,"aria-disabled":g,isDestructive:f,text:b},Z),v&&u().createElement(r.Spinner,null),u().createElement("span",null,a),C)}));h.displayName="Button";const g=h},857:(e,t,a)=>{"use strict";a.d(t,{Z:()=>p});var n=a(1074),c=a(495),r=a(5235),s=a.n(r),i=a(9665),o=a(5106),l=a(1489);const p=({description:e,cta:t,onClick:a,href:r,openInNewTab:p=!1,className:d,tooltipText:u=""})=>{const m=void 0!==r?"a":"button",h="a"===m?{href:r,...p&&{target:"_blank"}}:{onClick:a};return React.createElement("div",{className:s()(l.Z.cut,d)},React.createElement("div",null,React.createElement("div",null,React.createElement(o.ZP,{className:l.Z.description},e),u&&React.createElement(i.Z,{className:l.Z.iconContainer,iconSize:16,offset:4},React.createElement(o.ZP,{variant:"body-small"},u))),React.createElement("div",null,React.createElement(m,h,React.createElement(o.ZP,{className:l.Z.cta},t)))),React.createElement(n.Z,{icon:c.Z,className:l.Z.icon,size:30}))}},7172:(e,t,a)=>{"use strict";a.d(t,{Z:()=>o});var n=a(5736),c=a(5235),r=a.n(c),s=a(9196);a(5785);const __=n.__;class i extends s.Component{static defaultProps={"aria-hidden":"false",focusable:"true"};needsOffset(e,t){return["gridicons-arrow-left","gridicons-arrow-right","gridicons-calendar","gridicons-cart","gridicons-folder","gridicons-info","gridicons-info-outline","gridicons-posts","gridicons-star-outline","gridicons-star"].indexOf(e)>=0&&t%18==0}getSVGDescription(e){if("description"in this.props)return this.props.description;switch(e){default:return"";case"gridicons-audio":return __("Has audio.","jetpack-protect");case"gridicons-arrow-left":return __("Arrow left","jetpack-protect");case"gridicons-arrow-right":return __("Arrow right","jetpack-protect");case"gridicons-calendar":return __("Is an event.","jetpack-protect");case"gridicons-cart":return __("Is a product.","jetpack-protect");case"chevron-down":return __("Show filters","jetpack-protect");case"gridicons-comment":return __("Matching comment.","jetpack-protect");case"gridicons-cross":return __("Close.","jetpack-protect");case"gridicons-filter":return __("Toggle search filters.","jetpack-protect");case"gridicons-folder":return __("Category","jetpack-protect");case"gridicons-info":case"gridicons-info-outline":return __("Information.","jetpack-protect");case"gridicons-image-multiple":return __("Has multiple images.","jetpack-protect");case"gridicons-image":return __("Has an image.","jetpack-protect");case"gridicons-page":return __("Page","jetpack-protect");case"gridicons-post":return __("Post","jetpack-protect");case"gridicons-jetpack-search":case"gridicons-search":return __("Magnifying Glass","jetpack-protect");case"gridicons-tag":return __("Tag","jetpack-protect");case"gridicons-video":return __("Has a video.","jetpack-protect")}}renderIcon(e){switch(e){default:return null;case"gridicons-audio":return React.createElement("g",null,React.createElement("path",{d:"M8 4v10.184C7.686 14.072 7.353 14 7 14c-1.657 0-3 1.343-3 3s1.343 3 3 3 3-1.343 3-3V7h7v4.184c-.314-.112-.647-.184-1-.184-1.657 0-3 1.343-3 3s1.343 3 3 3 3-1.343 3-3V4H8z"}));case"gridicons-arrow-left":return React.createElement("g",null,React.createElement("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"}));case"gridicons-arrow-right":return React.createElement("g",null,React.createElement("path",{d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8-8-8z"}));case"gridicons-block":return React.createElement("g",null,React.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zM4 12c0-4.418 3.582-8 8-8 1.848 0 3.545.633 4.9 1.686L5.686 16.9C4.633 15.545 4 13.848 4 12zm8 8c-1.848 0-3.546-.633-4.9-1.686L18.314 7.1C19.367 8.455 20 10.152 20 12c0 4.418-3.582 8-8 8z"}));case"gridicons-calendar":return React.createElement("g",null,React.createElement("path",{
__("(opens in a new tab)","jetpack-protect"))),y=({moduleName:e=__("Jetpack","jetpack-protect"),className:t,moduleNameHref:a="https://jetpack.com",menu:n,onAboutClick:s,onPrivacyClick:i,onTermsClick:o,...l})=>{const[d]=(0,E.Z)("sm","<="),[v]=(0,E.Z)("md","<="),[y]=(0,E.Z)("lg",">"),{isActive:Z,connectedPlugins:_}=(0,r.useSelect)((e=>{const t=e(h.t);return{connectedPlugins:t?.getConnectedPlugins(),...t.getConnectionStatus()}}),[h.t]),w=(0,g.Z)(),C=w&&Z&&_?.some((({slug:e})=>"jetpack"===e));let R=[{label:_x("About","Link to learn more about Jetpack.","jetpack-protect"),title:__("About Jetpack","jetpack-protect"),href:C?new URL("admin.php?page=jetpack_about",w).href:(0,m.Z)("jetpack-about"),target:C?"_self":"_blank",onClick:s},{label:_x("Privacy","Shorthand for Privacy Policy.","jetpack-protect"),title:__("Automattic's Privacy Policy","jetpack-protect"),href:C?new URL("admin.php?page=jetpack#/privacy",w).href:(0,m.Z)("a8c-privacy"),target:C?"_self":"_blank",onClick:i},{label:_x("Terms","Shorthand for Terms of Service.","jetpack-protect"),title:__("WordPress.com Terms of Service","jetpack-protect"),href:(0,m.Z)("wpcom-tos"),target:"_blank",onClick:o}];n&&(R=[...R,...n]);const j=u().createElement(u().Fragment,null,u().createElement(k,null),e);return u().createElement("footer",c()({className:p()("jp-dashboard-footer",{"is-sm":d,"is-md":v,"is-lg":y},t),"aria-label":__("Jetpack","jetpack-protect")},l),u().createElement("ul",null,u().createElement("li",{className:"jp-dashboard-footer__jp-item"},a?u().createElement("a",{href:a},j):j),R.map((e=>{const t="button"===e.role,a=!t&&"_blank"===e.target;return u().createElement("li",{key:e.label},u().createElement("a",{href:e.href,title:e.title,target:e.target,onClick:e.onClick,onKeyDown:e.onKeyDown,className:p()("jp-dashboard-footer__menu-item",{"is-external":a}),role:e.role,rel:a?"noopener noreferrer":void 0,tabIndex:t?0:void 0},e.label,a&&u().createElement(b,null)))})),u().createElement("li",{className:"jp-dashboard-footer__a8c-item"},u().createElement("a",{href:C?new URL("admin.php?page=jetpack_about",w).href:(0,m.Z)("a8c-about"),"aria-label":__("An Automattic Airline","jetpack-protect")},u().createElement(f.Z,{"aria-hidden":"true"})))))}},8868:(e,t,a)=>{"use strict";a.d(t,{Z:()=>p});var n=a(2674),c=a.n(n),r=a(5736),s=a(5235),i=a.n(s),o=a(9196),l=a.n(o);const __=r.__,p=({logoColor:e="#069e08",showText:t=!0,className:a,height:n=32,...r})=>{const s=t?"0 0 118 32":"0 0 32 32";return l().createElement("svg",c()({xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:s,className:i()("jetpack-logo",a),"aria-labelledby":"jetpack-logo-title",height:n},r,{role:"img"}),l().createElement("title",{id:"jetpack-logo-title"},__("Jetpack Logo","jetpack-protect")),l().createElement("path",{fill:e,d:"M16,0C7.2,0,0,7.2,0,16s7.2,16,16,16s16-7.2,16-16S24.8,0,16,0z M15,19H7l8-16V19z M17,29V13h8L17,29z"}),t&&l().createElement(l().Fragment,null,l().createElement("path",{d:"M41.3,26.6c-0.5-0.7-0.9-1.4-1.3-2.1c2.3-1.4,3-2.5,3-4.6V8h-3V6h6v13.4C46,22.8,45,24.8,41.3,26.6z"}),l().createElement("path",{d:"M65,18.4c0,1.1,0.8,1.3,1.4,1.3c0.5,0,2-0.2,2.6-0.4v2.1c-0.9,0.3-2.5,0.5-3.7,0.5c-1.5,0-3.2-0.5-3.2-3.1V12H60v-2h2.1V7.1 H65V10h4v2h-4V18.4z"}),l().createElement("path",{d:"M71,10h3v1.3c1.1-0.8,1.9-1.3,3.3-1.3c2.5,0,4.5,1.8,4.5,5.6s-2.2,6.3-5.8,6.3c-0.9,0-1.3-0.1-2-0.3V28h-3V10z M76.5,12.3 c-0.8,0-1.6,0.4-2.5,1.2v5.9c0.6,0.1,0.9,0.2,1.8,0.2c2,0,3.2-1.3,3.2-3.9C79,13.4,78.1,12.3,76.5,12.3z"}),l().createElement("path",{d:"M93,22h-3v-1.5c-0.9,0.7-1.9,1.5-3.5,1.5c-1.5,0-3.1-1.1-3.1-3.2c0-2.9,2.5-3.4,4.2-3.7l2.4-0.3v-0.3c0-1.5-0.5-2.3-2-2.3 c-0.7,0-2.3,0.5-3.7,1.1L84,11c1.2-0.4,3-1,4.4-1c2.7,0,4.6,1.4,4.6,4.7L93,22z M90,16.4l-2.2,0.4c-0.7,0.1-1.4,0.5-1.4,1.6 c0,0.9,0.5,1.4,1.3,1.4s1.5-0.5,2.3-1V16.4z"}),l().createElement("path",{d:"M104.5,21.3c-1.1,0.4-2.2,0.6-3.5,0.6c-4.2,0-5.9-2.4-5.9-5.9c0-3.7,2.3-6,6.1-6c1.4,0,2.3,0.2,3.2,0.5V13 c-0.8-0.3-2-0.6-3.2-0.6c-1.7,0-3.2,0.9-3.2,3.6c0,2.9,1.5,3.8,3.3,3.8c0.9,0,1.9-0.2,3.2-0.7V21.3z"}),l().createElement("path",{d:"M110,15.2c0.2-0.3,0.2-0.8,3.8-5.2h3.7l-4.6,5.7l5,6.3h-3
// translators: Name of the current feature
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)})(t,e,C),P=Z?N.lg:N.default;return p().createElement("div",{className:o()(g.Z.item,g.Z.value)},p().createElement(c.Z,{className:o()(g.Z.icon,w?g.Z["icon-check"]:g.Z["icon-cross"]),size:32,icon:w?r.Z:s.Z}),p().createElement(h.ZP,{variant:"body-small"},i||P),S&&p().createElement(d.Z,{title:b||j,iconClassName:g.Z["popover-icon"],className:o()(g.Z.popover,y),placement:"bottom-end",iconSize:14,offset:4,wide:Boolean(b&&m)},p().createElement(h.ZP,{variant:"body-small",component:"div"},m||R)))},y=({children:e})=>p().createElement("div",{className:g.Z.header},e),Z=({primary:e=!1,children:t})=>{let a=0;return p().createElement("div",{className:o()(g.Z.card,{[g.Z["is-primary"]]:e})},l.Children.map(t,(e=>{const t=e;return t.type===b?(a++,(0,l.cloneElement)(t,{index:a-1})):t})))},_=({title:e,items:t,children:a,showIntroOfferDisclaimer:n=!1})=>{const[c]=(0,u.Z)("lg");return p().createElement(k.Provider,{value:t},p().createElement("div",{className:o()(g.Z.container,{[g.Z["is-viewport-large"]]:c}),style:{"--rows":t.length+1,"--columns":l.Children.toArray(a).length+1}},p().createElement("div",{className:g.Z.table},p().createElement(h.ZP,{variant:"headline-small"},e),c&&t.map(((e,a)=>p().createElement("div",{className:o()(g.Z.item,{[g.Z["last-feature"]]:a===t.length-1}),key:a},p().createElement(h.ZP,{variant:"body-small"},p().createElement("strong",null,e.name)),e.tooltipInfo&&p().createElement(d.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)},p().createElement(h.ZP,{variant:"body-small"},e.tooltipInfo))))),a)),p().createElement("div",{className:g.Z["tos-container"]},p().createElement("div",{className:g.Z.tos},n&&p().createElement(h.ZP,{variant:"body-small"},__("Reduced pricing is a limited offer for the first year and renews at regular price.","jetpack-protect")),p().createElement(m.Z,{multipleButtons:!0}))))}},5347:(e,t,a)=>{"use strict";a.d(t,{Z:()=>l});var n=a(5736),c=a(5235),r=a.n(c),s=a(5106),i=a(3789),o=a(9184);const __=n.__,l=({price:e,offPrice:t,currency:a="",showNotOffPrice:n=!0,hideDiscountLabel:c=!0,promoLabel:l="",legend:p=__("/month, paid yearly","jetpack-protect"),isNotConvenientPrice:d=!1,hidePriceFraction:u=!1,children:m})=>{if(null==e&&null==t||!a)return null;n=n&&null!=t;const h="number"==typeof e&&"number"==typeof t?Math.floor((e-t)/e*100):0,g=!c&&h&&h>0?h+__("% off","jetpack-protect"):null;return React.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:t??e,currency:a,isOff:!d,hidePriceFraction:u}),n&&React.createElement(i.t,{value:e,currency:a,isOff:!1,hidePriceFraction:u}),g&&React.createElement(s.ZP,{className:r()(o.Z["promo-label"],"product-price_promo_label")},g))),React.createElement("div",{className:o.Z.footer},m||React.createElement(s.ZP,{className:r()(o.Z.legend,"product-price_legend")},p),l&&React.createElement(s.ZP,{className:r()(o.Z["promo-label"],"product-price_promo_label")},l)))}},3789:(e,t,a)=>{"use strict";a.d(t,{t:()=>o});var n=a(8899),c=a(5235),r=a.n(c),s=a(5106),i=a(9184);const o=({value:e,currency:t,isOff:a,hidePriceFraction:c})=>{const o=r()(i.Z.price,"product-price_price",{[i.Z["is-not-off-price"]]:!a}),{symbol:l,integer:p,fraction:d}=(0,n.LR)(e,t),u=!c||!d.endsWith("00");return React.createElement(s.ZP,{className:o,variant:"headline-medium",component:"p"},React.createElement(s.ZP,{className:i.Z.symbol,component:"sup",variant:"title-medium"},l),p,u&&React.createElement(s.ZP,{component:"sup",variant:"body-small","data-testid":"PriceFraction"},React.createElement("strong",null,d)))}},5033:(e,t,a)=>{"use strict";a.d(t,{Z:()=>o});var n=a(5162),c=a.n(n),r=a(9196),s=a.n(r);a(1683);const i=({color:e="#FFFFFF",className:t="",size:a=20})=>{const n=t+" jp-components-spinner",c={width:a,height:a,fontSize:a,borderTopColor:e},r={borderTopColor:e,borderRi
__("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"),e),{strong:React.createElement("strong",null),tosLink:React.createElement(d,{slug:"wpcom-tos"}),shareDetailsLink:React.createElement(d,{slug:"jetpack-support-what-data-does-jetpack-sync"})}),d=({slug:e,children:t})=>React.createElement("a",{className:"terms-of-service__link",href:(0,i.Z)(e),rel:"noopener noreferrer",target:"_blank"},t),u=({className:e,multipleButtons:t,agreeButtonLabel:a})=>React.createElement(o.ZP,{className:s()(e,"terms-of-service")},t?React.createElement(l,null):React.createElement(p,{agreeButtonLabel:a}))},6017:(e,t,a)=>{"use strict";a.d(t,{h:()=>n,s:()=>c});const n={"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:(e,t,a)=>{"use strict";a.d(t,{Dx:()=>h,H3:()=>m,ZP:()=>u});var n=a(2674),c=a.n(n),r=a(5235),s=a.n(r),i=a(9196),o=a.n(i),l=a(6017),p=a(3280);const d=(0,i.forwardRef)((({variant:e="body",children:t,component:a,className:n,...r},d)=>{const u=a||l.h[e]||"span",m=(0,i.useMemo)((()=>l.s.reduce(((e,t)=>(void 0!==r[t]&&(e+=p.Z[`${t}-${r[t]}`]+" ",delete r[t]),e)),"")),[r]);return r.ref=d,o().createElement(u,c()({className:s()(p.Z.reset,p.Z[e],n,m)},r),t)}));d.displayName="Text";const u=d,m=({children:e,weight:t="bold",...a})=>{const n="headline-small"+("bold"===t?"":`-${t}`);return o().createElement(d,c()({variant:n,mb:3},a),e)},h=({children:e,size:t="medium",...a})=>o().createElement(d,c()({variant:`title-${t}`,mb:1},a),e)},8275:(e,t,a)=>{"use strict";a.d(t,{ZP:()=>u});var n=a(9196),c=a.n(n),r=a(3591);const s={"--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-5":"var(--jp-gray)","--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"},l={"--spacing-base":"8px"},p={},d=(e,t,a)=>{const n={...s,...i,...o,...l};for(const t in n)e.style.setProperty(t,n[t]);a&&e.classList.add(r.Z.global),t&&(p[t]={provided:!0,root:e})},u=({children:e=null,targetDom:t,id:a,withGlobalStyles:r=!0})=>{const s=(0,n.useRef)(),i=p?.[a]?.provided;return(0,n.useLayoutEffect)((()=>{if(!i)return t?d(t,a,r):void(s?.current&&d(s.current,a,r))}),[t,s,i,a,r]),t?c().createElement(c().Fragment,null,e):c().createElement("div",{ref:s},e)}},2497:(e,t,a)=>{"use strict";func
__("There was an error reconnecting Jetpack. Error: %s","jetpack-protect"),o))):null;return p().createElement(p().Fragment,null,h,p().createElement(r.Notice,{status:"error",isDismissible:!1,className:u},p().createElement("div",{className:d.Z.message},m,t),i&&p().createElement("a",{onClick:i,onKeyDown:i,className:d.Z.button,href:"#"},__("Restore Connection","jetpack-protect"))))};u.propTypes={message:o().string.isRequired,restoreConnectionCallback:o().func,isRestoringConnection:o().bool,restoreConnectionError:o().string};const m=u},1294:(e,t,a)=>{"use strict";a.d(t,{Z:()=>o});var n=a(4743),c=a(9818),r=a(9196),s=a(428);const i=window?.JP_CONNECTION_INITIAL_STATE?window.JP_CONNECTION_INITIAL_STATE:{},o=({registrationNonce:e=i.registrationNonce,apiRoot:t=i.apiRoot,apiNonce:a=i.apiNonce,redirectUri:o,autoTrigger:l,from:p,skipUserConnection:d}={})=>{const{registerSite:u,connectUser:m,refreshConnectedPlugins:h}=(0,c.useDispatch)(s.t),g=(0,c.useSelect)((e=>e(s.t).getRegistrationError())),{siteIsRegistering:f,userIsConnecting:v,userConnectionData:E,connectedPlugins:k,connectionErrors:b,isRegistered:y,isUserConnected:Z,hasConnectedOwner:_,isOfflineMode:w}=(0,c.useSelect)((e=>({siteIsRegistering:e(s.t).getSiteIsRegistering(),userIsConnecting:e(s.t).getUserIsConnecting(),userConnectionData:e(s.t).getUserConnectionData(),connectedPlugins:e(s.t).getConnectedPlugins(),connectionErrors:e(s.t).getConnectionErrors(),isOfflineMode:e(s.t).getIsOfflineMode(),...e(s.t).getConnectionStatus()}))),C=()=>d?o?(window.location=o,Promise.resolve(o)):Promise.resolve():m({from:p,redirectUri:o}),R=t=>(t&&t.preventDefault(),y?C():u({registrationNonce:e,redirectUri:o,from:p}).then((()=>C())));return(0,r.useEffect)((()=>{n.ZP.setApiRoot(t),n.ZP.setApiNonce(a)}),[t,a]),(0,r.useEffect)((()=>{!l||f||v||R()}),[]),{handleRegisterSite:R,handleConnectUser:C,refreshConnectedPlugins:h,isRegistered:y,isUserConnected:Z,siteIsRegistering:f,userIsConnecting:v,registrationError:g,userConnectionData:E,hasConnectedOwner:_,connectedPlugins:k,connectionErrors:b,isOfflineMode:w}}},7711:(e,t,a)=>{"use strict";function n(){switch("undefined"!=typeof window&&window?.JP_CONNECTION_INITIAL_STATE?.calypsoEnv){case"development":return"http://calypso.localhost:3000/";case"wpcalypso":return"https://wpcalypso.wordpress.com/";case"horizon":return"https://horizon.wordpress.com/";default:return"https://wordpress.com/"}}a.d(t,{Z:()=>n})},3329:(e,t,a)=>{"use strict";a.d(t,{Z:()=>s,h:()=>i});var n=a(6186),c=a(1294),r=a(1045);function s(){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}}const i=()=>{const{hasConnectionError:e,connectionErrorMessage:t}=s(),{restoreConnection:a,isRestoringConnection:c,restoreConnectionError:i}=(0,r.Z)();return e?React.createElement(n.Z,{isRestoringConnection:c,restoreConnectionError:i,restoreConnectionCallback:a,message:t}):null}},8258:(e,t,a)=>{"use strict";a.d(t,{Z:()=>v});var n=a(4743),c=a(7711),r=a(9818),s=a(951),i=a.n(s),o=a(9196),l=a(1294),p=a(428);const d=i()("jetpack:connection:useProductCheckoutWorkflow"),{registrationNonce:u,apiRoot:m,apiNonce:h,siteSuffix:g}=window?.JP_CONNECTION_INITIAL_STATE?window.JP_CONNECTION_INITIAL_STATE:{},f="undefined"!=typeof window?window?.myJetpackInitialState?.adminUrl:null;function v({productSlug:e,redirectUrl:t,siteSuffix:a=g,adminUrl:s=f,connectAfterCheckout:i=!1,siteProductAvailabilityHandler:v=null,quantity:E=null,from:k,useBlogIdSuffix:b=!1}={}){d("productSlug is %s",e),d("redirectUrl is %s",t),d("siteSuffix is %s",a),d("from is %s",k);const[y,Z]=(0,o.useState)(!1),{registerSite:_}=(0,r.useDispatch)(p.t),w=(0,r.useSelect)((e=>e(p.t).getBlogId()),[p.t]);d("blogID is %s",w??"undefined"),b=b&&!!w;const{isUserConnected:C,isRegistered:R,handleConnectUser:j}=(0,l.Z)({redirectUri:t,from:k}),S=(0,o.useMemo)((()=>{const n=(0,c.Z)(),r=(!R||!C)&&i,o=r?"checkout/jetpack/":`checkout/${b?w.toString():a}/`,l=new URL(`${n}${o}${e}${null!=E?`:-q-${E}`:""}`);return r?(l.searchParams.s
// translators: placeholder is the date latest rules were updated i.e. "September 23, 2022".
__("Last updated on %s.","jetpack-protect"),k().unix(X).format("MMMM D, YYYY")))),oe&&React.createElement(React.Fragment,null,React.createElement(r.ZP,{className:L.Z["automatic-rules-stats__failed-install"],variant:"body-small",mt:2},__("Failed to update automatic firewall rules.","jetpack-protect")," ",fe(oe)),React.createElement(s.Z,{variant:"link",href:Z.K},React.createElement(r.ZP,{variant:"body-small"},__("Contact support","jetpack-protect"))))))),!ne&&React.createElement("div",{className:L.Z["upgrade-trigger-section"]},React.createElement(i.Z,{className:L.Z["upgrade-trigger"],description:ie?__("Your site is not receiving the latest updates to automatic rules","jetpack-protect",0):__("Set up automatic rules with one click","jetpack-protect"),cta:ie?__("Upgrade to keep your site secure with up-to-date firewall rules","jetpack-protect",0):__("Upgrade to enable automatic firewall protection","jetpack-protect"),onClick:Ee}))),Pe=React.createElement(React.Fragment,null,React.createElement("div",{className:L.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(r.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:L.Z["current-ip-text"]},React.createElement(r.ZP,{variant:"body-small",mb:1},(0,m.createInterpolateElement)((0,h.sprintf)(
// translators: placeholder is the user's current IP address.
__("Your current IP: <strong>%s</strong>","jetpack-protect"),U),{strong:React.createElement("strong",null)})),React.createElement(s.Z,{variant:"secondary",size:"small",onClick:je,disabled:ue||Re},__("+ Add to Allow List","jetpack-protect")))),placeholder:__("Example:","jetpack-protect")+"\n12.12.12.1\n12.12.12.2",rows:3,value:pe.jetpack_waf_ip_allow_list,onChange:be,disabled:ue})),React.createElement(s.Z,{onClick:ke,isLoading:ue,disabled:ue},__("Save changes","jetpack-protect"))),xe=React.createElement(React.Fragment,null,React.createElement("div",{className:L.Z["toggle-section"]},React.createElement("div",{className:L.Z["toggle-section__control"]},React.createElement(P.Z,{id:"brute_force_protection",checked:pe.brute_force_protection,onChange:Ze,disabled:ue})),React.createElement("div",{className:L.Z["toggle-section__content"]},React.createElement(r.ZP,{variant:"title-medium",mb:2},__("Enable brute force protection","jetpack-protect")),React.createElement(r.ZP,null,__("Prevent bots and hackers from attempting to log in to your website with common username and password combinations.","jetpack-protect")))),!G&&pe.brute_force_protection&&Pe),Ie=React.createElement("div",{className:L.Z["toggle-wrapper"]},G&&Ne,xe,G&&React.createElement("div",{className:`${L.Z["toggle-section"]} ${V||H?"":L.Z["toggle-section--disabled"]}`},React.createElement("div",{className:L.Z["toggle-section__control"]},React.createElement(P.Z,{id:"jetpack_waf_ip_list",checked:(H||V)&&pe.jetpack_waf_ip_list,onChange:_e,disabled:ue||!H&&!V})),React.createElement("div",{className:L.Z["toggle-section__content"]},React.createElement(r.ZP,{variant:"title-medium",mb:2},__("Enable manual block and allow lists","jetpack-protect")),React.createElement(r.ZP,null,__("Manually block or allow traffic from specific IP addresses.","jetpack-protect")),z&&React.createElement("div",{className:L.Z["toggle-section__details"]},React.createElement("div",{className:L.Z["manual-rules-stats"]},0===q&&0===K&&React.createElement(r.ZP,{className:L.Z["manual-rules-stats__no-rules"],variant:"body-small",mt:2},__("No manual rules are being applied.","jetpack-protect")),K>0&&React.createElement(r.ZP,{className:L.Z["manual-rules-stats__block-list-count"],variant:"body-small",mt:2},(0,h.sprintf)(
// translators: placeholder is a number of blocked IP addresses i.e. "5 IPs are being blocked".
_n("%s IP is being blocked. ","%s IPs are being blocked. ",K,"jetpack-protect"),1===K?"One":K)),q>0&&React.createElement(r.ZP,{className:L.Z["manual-rules-stats__allow-list-count"],variant:"body-small",mt:2},(0,h.sprintf)(
// translators: placeholder is a number of allowed IP addresses i.e. "5 IPs are being allowed".
_n("%s IP is being allowed.","%s IPs are being allowed.",q,"jetpack-protect"),1===q?"One":q))),React.createElement(s.Z,{variant:"link",disabled:!H&&!V},React.createElement(r.ZP,{variant:"body-small",onClick:we},__("Edit manual rules","jetpack-protect"))))))),Le=React.createElement("div",null,React.createElement(s.Z,{className:L.Z["go-back-button"],variant:"icon",icon:v.Z,onClick:we},React.createElement(r.ZP,null,__("Go back","jetpack-protect"))),React.createElement(r.ZP,{variant:"title-medium",mt:4,mb:2},__("Manual rules","jetpack-protect")),React.createElement(r.ZP,{mb:4},__("Add manual rules for what IP traffic the Jetpack Firewall and brute force protection should block or allow.","jetpack-protect")),G&&React.createElement("div",{className:L.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:pe.jetpack_waf_ip_block_list,onChange:be,disabled:ue})),React.createElement("div",{className:L.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:L.Z["current-ip-text"]},React.createElement(r.ZP,{variant:"body-small",mb:1},(0,m.createInterpolateElement)((0,h.sprintf)(
// translators: placeholder is the user's current IP address.
__("Your current IP: <strong>%s</strong>","jetpack-protect"),U),{strong:React.createElement("strong",null)})),React.createElement(s.Z,{variant:"secondary",size:"small",onClick:je,disabled:ue||Re},__("+ Add to Allow List","jetpack-protect"))),placeholder:__("Example:","jetpack-protect")+"\n12.12.12.1\n12.12.12.2",rows:3,value:pe.jetpack_waf_ip_allow_list,onChange:be,disabled:ue})),React.createElement(s.Z,{onClick:ke,isLoading:ue,disabled:ue},__("Save changes","jetpack-protect")));return React.createElement(j.Z,null,React.createElement(N.Z,null),React.createElement(o.Z,{className:L.Z.container,horizontalSpacing:8,horizontalGap:4},G&&!H&&React.createElement(l.Z,null,Se," "),React.createElement(l.Z,null,he?Le:Ie)),G?React.createElement(S.Z,null):React.createElement(x.Z,null))}},8840:(e,t,a)=>{"use strict";a.d(t,{Z:()=>m});var n=a(5106),c=a(526),r=a(9818),s=a(5736),i=a(9196),o=a(4633),l=a(9974),p=a(8891),d=a(2854),u=a(5823);const __=s.__,m=({threatList:e=[]})=>{const{setModal:t,fixThreats:a}=(0,r.useDispatch)(o.t),{threatsUpdating:s}=(0,r.useSelect)((e=>e(o.t).getThreatsUpdating())),[m,h]=(0,i.useState)(e.map((({id:e})=>e))),g=(0,i.useCallback)(((e,t)=>{h(e?m.push(t.id):m.filter((e=>e!==t.id)))}),[m]);return React.createElement(d.Z,null,React.createElement(l.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:u.Z.list},e.map((e=>React.createElement(p.Z,{key:e.id,threat:e,fixAllDialog:!0,onCheckFix:g})))),React.createElement("div",{className:u.Z.footer},React.createElement(c.Z,{variant:"secondary",onClick:e=>{e.preventDefault(),t({type:null})}},__("Cancel","jetpack-protect")),React.createElement(c.Z,{isLoading:Boolean(s)&&s[m[0]],onClick:async e=>{e.preventDefault(),a(m,(()=>{t({type:null})}))}},__("Fix all threats","jetpack-protect")))))}},1593:(e,t,a)=>{"use strict";a.d(t,{Z:()=>u});var n=a(5106),c=a(526),r=a(9818),s=a(5736),i=a(4633),o=a(9974),l=a(8891),p=a(2854),d=a(7279);const __=s.__,u=({id:e,fixable:t,label:a,icon:s,severity:u})=>{const{setModal:m,fixThreats:h}=(0,r.useDispatch)(i.t),g=(0,r.useSelect)((e=>e(i.t).getThreatsUpdating()));return React.createElement(p.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:d.Z.list},React.createElement(l.Z,{threat:{id:e,fixable:t,label:a,icon:s,severity:u},fixAllDialog:!1})),React.createElement("div",{className:d.Z.footer},React.createElement(c.Z,{variant:"secondary",onClick:e=>{e.preventDefault(),m({type:null})}},__("Cancel","jetpack-protect")),React.createElement(c.Z,{isLoading:Boolean(g&&g[e]),onClick:async t=>{t.preventDefault(),h([e],(()=>{m({type:null})}))}},__("Fix threat","jetpack-protect")))))}},5678:(e,t,a)=>{"use strict";a.d(t,{Z:()=>r});var n=a(9196),c=a(1234);const r=({ariaLabel:e,checked:t=!1,className:a="",disabled:r=!1,id:s,onChange:i=(()=>{}),onKeyDown:o=(()=>{}),switchClassNames:l="",toggling:p})=>{const d=(0,n.useCallback)((e=>{r||i(e)}),[r,i]),u=(0,n.useCallback)((e=>{r||("Enter"!==e.key&&" "!==e.key||(e.preventDefault(),i(e)),o(e))}),[r,i,o]);return React.createElement(React.Fragment,null,React.createElement("div",null,React.createElement("input",{className:`${c.Z["form-toggle"]} ${a} ${p?c.Z["is-toggling"]:""}`,type:"checkbox",checked:t,readOnly:!0,disabled:r}),React.createElement("span",{className:`${c.Z["form-toggle__switch"]} ${l}`,disabled:r,id:s,onClick:d,onKeyDown:u,role:"checkbox","aria-checked":t,"aria-label":e,tabIndex:r?-1:0})))}},3584:(e,t,a)=>{"use strict";a.d(t,{U:()=>m,Z:()=>h});var n=a(5106),c=a(1074),r=a(7489),s=a(2229),i=a(5235),o=a.n(i),l=a(9196),p=a.n(l),d=a(9122);const u=p().createContext(),m=({id:e,title:t,label:a,icon:i,children:m,onOpen:h})=>{const g=(0,l.useContext)(u),f=g?.open===e,v=g?.setOpen,E=o()(d.Z["accordion-body"],{[d.Z["accordi
__("Show %s more","jetpack-protect"),g):(0,c.sprintf)(/* translators: %s: Number of hide items */
__("Hide %s items","jetpack-protect"),g)))))}},5338:(e,t,a)=>{"use strict";a.d(t,{Dx:()=>u.Z,KB:()=>d.Z,ZP:()=>v});var n=a(5106),c=a(5609),r=a(5736),s=a(1074),i=a(7489),o=a(2229),l=a(9196),p=a.n(l),d=a(2328),u=a(6119),m=a(513),h=a(246);const __=r.__,g=({children:e})=>p().createElement("ul",{className:m.Z.navigation,role:"menu"},e),f=({children:e,data:t})=>{const a=(0,l.useRef)(),[r,d]=(0,l.useState)(!1),u=t?.items?.find((e=>e?.id===t?.selectedItem))??{label:__("See all results","jetpack-protect")},{label:h,icon:g}=u,f=(0,l.useCallback)((()=>{d((e=>!e))}),[]);return p().createElement("button",{className:m.Z["navigation-dropdown-button"],onClick:f,ref:a},p().createElement("div",{className:m.Z["navigation-dropdown-label"]},g&&p().createElement(s.Z,{icon:g,className:m.Z["navigation-dropdown-icon"]}),p().createElement(n.ZP,null,h)),p().createElement(s.Z,{icon:r?i.Z:o.Z,size:32}),p().createElement(c.Popover,{position:"bottom center",anchorRef:a?.current,inline:!0},p().createElement("div",{style:{display:r?"block":"none",width:a?.current?.getBoundingClientRect?.()?.width}},e)))},v=({children:e,selected:t,onSelect:a,mode:n="list"})=>{const c=(0,h.Z)({selected:t,onSelect:a}),r=(e=>{switch(e){case"list":default:return g;case"dropdown":return f}})(n);return p().createElement(h.k.Provider,{value:{...c,mode:n}},p().createElement(r,{data:c},e))}},6119:(e,t,a)=>{"use strict";a.d(t,{Z:()=>d});var n=a(5235),c=a.n(n),r=a(9196),s=a.n(r),i=a(5167),o=a(2389),l=a(513),p=a(246);const d=({id:e,label:t,icon:a,badge:n,disabled:d,onClick:u,onKeyDown:m,onFocus:h,checked:g})=>{const f=(0,r.useContext)(p.k),v=f?.selectedItem===e,E=f?.registerItem,k=f?.registerRef,b=f?.handleClickItem,y=f?.handleKeyDownItem,Z=f?.handleFocusItem,_=c()(l.Z["navigation-item"],{[l.Z.clickable]:!d,[l.Z.selected]:v}),w=(0,r.useCallback)((t=>{u?.(t),b?.(e)}),[b,e,u]),C=(0,r.useCallback)((e=>{m?.(e),y?.(e)}),[y,m]),R=(0,r.useCallback)((t=>{k(t,e)}),[k,e]),j=(0,r.useCallback)((t=>{h?.(t),Z?.(e)}),[Z,e,h]);return(0,r.useEffect)((()=>{E({id:e,disabled:d,label:t,icon:a})}),[]),s().createElement("li",{className:_,onClick:d?null:w,onKeyDown:C,onFocus:d?null:j,role:"menuitem",tabIndex:d?-1:0,ref:R},s().createElement(o.Z,{icon:a},t),s().createElement(i.Z,{count:n,checked:g}))}},2389:(e,t,a)=>{"use strict";a.d(t,{Z:()=>m});var n=a(5106),c=a(1074),r=a(5235),s=a.n(r),i=a(5162),o=a.n(i),l=a(9196),p=a.n(l),d=a(513);const u=({icon:e,children:t,className:a})=>p().createElement(n.ZP,{className:s()(d.Z["navigation-item-label"],a)},e&&p().createElement(c.Z,{icon:e,className:d.Z["navigation-item-icon"],size:28}),p().createElement("span",{className:d.Z["navigation-item-label-content"]},t));u.propTypes={icon:o().node,children:o().node.isRequired};const m=u},246:(e,t,a)=>{"use strict";a.d(t,{Z:()=>r,k:()=>c});var n=a(9196);const c=a.n(n)().createContext(),r=({selected:e,onSelect:t})=>{const[a,c]=(0,n.useState)([]),[r,s]=(0,n.useState)([]),[i,o]=(0,n.useState)(),l=(e,t)=>{const n=e-1,c=n<0?t:n,r=a[c];return r?.disabled?l(c,t):r},p=(e,t)=>{const n=e+1,c=n>t?0:n,r=a[c];return r?.disabled?p(c,t):r};return{selectedItem:e,handleClickItem:e=>{t(e)},handleKeyDownItem:n=>{const c=n?.code,s=a.findIndex((t=>t?.id===e)),o=a.length-1;let d;if("ArrowUp"===c){const e=l(s,o);d=e?.id}else if("ArrowDown"===c){const e=p(s,o);d=e?.id}else"Enter"!==c&&"Space"!==c||!i||(d=i);if(d){const e=r[d];e?.focus(),t(d)}},handleFocusItem:e=>{o(e)},registerRef:(e,t)=>{s((a=>!a[t]&&e?{...a,[t]:e}:a))},registerItem:e=>{c((t=>{const a=[...t],n=e?.id,c=a.findIndex((e=>e?.id===n));return c>=0?a[c]=e:a.push(e),a}))},items:a}}},291:(e,t,a)=>{"use strict";a.d(t,{Z:()=>m});var n=a(9818),c=a(5736),r=a(9201),s=a(797),i=a(496),o=a(1074),l=a(9517),p=a(9196),d=a(4633),u=a(8212);const __=c.__,m=({dismissable:e=!1,duration:t=null,floating:a=!1,message:c,type:m="success"})=>{const{clearNotice:h}=(0,n.useDispatch)(d.t);let g;switch(m){case"success":g=r.Z;break;case"error":g=s.Z;break;default:g=i.Z}const f=(0,p.useCallback)((()=>{h()}),[h]);return(0,p.useEffect)((()=>{let e;return t&&(e=setTimeout(h,t)),()=>clearTimeout(e)}),[h,t,c]),React.createEl
__("Latest results as of %s","jetpack-protect"),(0,p.dateI18n)("F jS",a))),!E&&m().createElement(f.Z,{id:"free-daily-scans",position:e?"bottom":"middle right",anchor:Z})),t>0&&m().createElement(i.ZP,{variant:"headline-small",component:"h1"},(0,d.sprintf)(/* translators: %s: Total number of threats */
__("%1$s %2$s found","jetpack-protect"),t,1===t?"threat":"threats"))),E&&0===t&&m().createElement(m().Fragment,null,m().createElement(o.Z,{ref:C,variant:"secondary",className:v.Z["summary__scan-button"],isLoading:k,onClick:e=>{e.preventDefault(),b()}},__("Scan now","jetpack-protect")),m().createElement(f.Z,{id:"paid-daily-and-manual-scans",position:"middle left",anchor:w})))))}},3324:(e,t,a)=>{"use strict";a.d(t,{O:()=>r,Z:()=>s});var n=a(554),c=a(5714);const r=({label:e,link:t})=>React.createElement(n.OL,{to:t,className:({isActive:e})=>e?`${c.Z.tab} ${c.Z["tab--active"]}`:c.Z.tab},e),s=({children:e,className:t=""})=>React.createElement("nav",{className:`${c.Z.tabs} ${t}`},e)},9265:(e,t,a)=>{"use strict";a.d(t,{Z:()=>c});var n=a(8063);const c=({disabled:e=!1,id:t,label:a="",description:c="",placeholder:r="",rows:s=3,value:i="",onChange:o=(()=>{})})=>React.createElement("div",null,Boolean(a)&&React.createElement("label",{className:n.Z.label,htmlFor:t},a),Boolean(c)&&c,React.createElement("textarea",{className:n.Z.textarea,disabled:e,placeholder:r,rows:s,id:t,name:t,onChange:o,value:i||""}))},8891:(e,t,a)=>{"use strict";a.d(t,{Z:()=>d});var n=a(5106),c=a(5736),r=a(1074),s=a(9196),i=a.n(s),o=a(2251),l=a(9971);const __=c.__,p=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":return e.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":return e.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")}};function d({threat:e,fixAllDialog:t,onCheckFix:a}){const[c,d]=(0,s.useState)(!0),u=(0,s.useCallback)((t=>{d(t.target.checked),a(t.target.checked,e)}),[a,e]);return i().createElement(i().Fragment,null,i().createElement("div",{className:l.Z.threat},i().createElement(r.Z,{icon:e.icon,className:l.Z.threat__icon}),i().createElement("div",{className:l.Z.threat__summary},i().createElement(n.ZP,{className:l.Z.threat__summary__label,mb:1},e.label),i().createElement(n.ZP,{className:l.Z.threat__summary__title},p(e.fixable))),i().createElement("div",{className:l.Z.threat__severity},i().createElement(o.Z,{severity:e.severity})),t&&i().createElement("div",{className:l.Z.threat__checkbox},i().createElement("input",{type:"checkbox",checked:c,onChange:u,value:e.id}))))}},5658:(e,t,a)=>{"use strict";a.d(t,{Z:()=>p});var n=a(5106),c=a(9307),r=a(5736),s=a(9196),i=a(5773),o=a(9709);const __=r.__,_n=r._n,l=()=>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"})),p=()=>{const{lastChecked:e}=(0,i.Z)(),t=(0,s.useMemo)((()=>e?(e=>{const t=new Date,a=6e4*t.getTimezoneOffset(),n=Math.floor((new Date(t.getTime()+a).getTime()-e)/1e3);let c=n/31536e3;return c>1?(0,r.sprintf)(
// translators: placeholder is a number amount of years i.e. "5 years ago".
_n("%s year ago","%s years ago",Math.floor(c),"jetpack-protect"),Math.floor(c)):(c=n/2592e3,c>1?(0,r.sprintf)(
// translators: placeholder is a number amount of months i.e. "5 months ago".
_n("%s month ago","%s months ago",Math.floor(c),"jetpack-protect"),Math.floor(c)):(c=n/86400,c>1?(0,r.sprintf)(
// translators: placeholder is a number amount of days i.e. "5 days ago".
_n("%s day ago","%s days ago",Math.floor(c),"jetpack-protect"),Math.floor(c)):(c=n/3600,c>1?(0,r.sprintf)(
// translators: placeholder is a number amount of hours i.e. "5 hours ago".
_n("%s hour ago","%s hours ago",Math.floor(c),"jetpack-protect"),Math.floor(c)):(c=n/60,c>1?(0,r.sprintf)(
// translators: placeholder is a number amount of minutes i.e. "5 minutes ago".
_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]);return React.createElement("div",{className:o.Z.empty},React.createElement(l,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)(
// translators: placeholder is the amount of time since the last scan, i.e. "5 minutes ago".
__("The last Protect scan ran <strong>%s</strong> and everything looked great.","jetpack-protect"),t),{strong:React.createElement("strong",null)})))}},2831:(e,t,a)=>{"use strict";a.d(t,{Z:()=>g});var n=a(526),c=a(5106),r=a(857),s=a(8258),i=a(5736),o=a(9196),l=a.n(o),p=a(3898),d=a(6477),u=a(3584),m=a(9709);const __=i.__,h=({description:e,filename:t,fixedIn:a,icon:h,id:g,name:f,source:v,table:E,title:k,type:b,version:y})=>{const{adminUrl:Z}=window.jetpackProtectInitialState||{},{run:_}=(0,s.Z)({productSlug:p.o,redirectUrl:Z,useBlogIdSuffix:!0}),{recordEventHandler:w}=(0,d.Z)(),C=w("jetpack_protect_threat_list_get_scan_link_click",_),R=v?l().createElement(n.Z,{variant:"link",isExternalLink:!0,weight:"regular",href:v},__("See more technical details of this threat","jetpack-protect")):null,j=(0,o.useCallback)((()=>f&&y?`${f} (${y})`:t?t.split("/").pop():E||void 0),[t,f,E,y]);return l().createElement(u.U,{id:g,label:j(),title:k,icon:h,onOpen:(0,o.useCallback)((()=>{["core","plugin","theme"].includes(b)&&w(`jetpack_protect_${b}_threat_open`)}),[w,b])},e&&l().createElement("div",{className:m.Z["threat-section"]},l().createElement(c.ZP,{variant:"title-small",mb:2},__("What is the problem?","jetpack-protect")),l().createElement(c.ZP,{mb:2},e),R),a&&l().createElement("div",{className:m.Z["threat-section"]},l().createElement(c.ZP,{variant:"title-small",mb:2},__("How to fix it?","jetpack-protect")),l().createElement(c.ZP,{mb:2},/* translators: Translates to Update to. %1$s: Name. %2$s: Fixed version */ /* translators: Translates to Update to. %1$s: Name. %2$s: Fixed version */
(0,i.sprintf)(__("Update to %1$s %2$s","jetpack-protect"),f,a)),l().createElement(r.Z,{description:__("Looking for advanced scan results and one-click fixes?","jetpack-protect"),cta:__("Upgrade Jetpack Protect now","jetpack-protect"),onClick:C,className:m.Z["threat-item-cta"]})),!e&&l().createElement("div",{className:m.Z["threat-section"]},R))},g=({list:e})=>l().createElement(u.Z,null,e.map((({description:e,fixedIn:t,icon:a,id:n,name:c,source:r,table:s,title:i,type:o,version:p})=>l().createElement(h,{description:e,fixedIn:t,icon:a,id:n,key:n,name:c,source:r,table:s,title:i,type:o,version:p}))))},5207:(e,t,a)=>{"use strict";a.d(t,{Z:()=>y});var n=a(2054),c=a(3363),r=a(3846),s=a(5106),i=a(526),o=a(9818),l=a(5736),p=a(9196),d=a.n(p),u=a(5773),m=a(4633),h=a(1707),g=a(5658),f=a(2831),v=a(4289),E=a(1400),k=a(9709),b=a(7930);const __=l.__,y=()=>{const{hasRequiredPlan:e}=(0,u.Z)(),{item:t,list:a,selected:y,setSelected:Z}=(0,b.Z)(),_=a.filter((e=>e.fixable)),[w]=(0,n.Z)("sm"),{setModal:C}=(0,o.useDispatch)(m.t),{scan:R}=(0,o.useDispatch)(m.t),j=(0,o.useSelect)((e=>e(m.t).getScanIsEnqueuing())),[S,N]=(0,p.useState)(null),[P,x]=(0,p.useState)(null),[I,L]=(0,p.useState)(null),[M,T]=(0,p.useState)(null),A=(0,p.useCallback)((()=>{switch(y){case"all":return 1===a.length?__("All threats","jetpack-protect"):(0,l.sprintf)(/* translators: placeholder is the amount of threats found on the site. */
__("All %s threats","jetpack-protect"),a.length);case"files":return(0,l.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,l.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,l.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)}}),[y,a,t]);return d().createElement(c.Z,{fluid:!0,horizontalSpacing:0,horizontalGap:3},d().createElement(r.Z,{lg:4},d().createElement("div",{ref:N},d().createElement(v.Z,{selected:y,onSelect:Z})),d().createElement(h.Z,{id:e?"paid-scan-results":"free-scan-results",position:"top",anchor:S})),d().createElement(r.Z,{lg:8},a?.length>0?d().createElement(d().Fragment,null,d().createElement("div",{className:k.Z["list-header"]},d().createElement(s.Dx,{className:k.Z["list-title"]},A()),e&&d().createElement(d().Fragment,null,_.length>0&&d().createElement(d().Fragment,null,d().createElement(i.Z,{ref:x,variant:"primary",className:k.Z["list-header-button"],onClick:(z=_,e=>{e.preventDefault(),C({type:"FIX_ALL_THREATS",props:{threatList:z}})})},(0,l.sprintf)(/* translators: Translates to Auto fix all. $s: Number of fixable threats. */
__("Auto fix all (%s)","jetpack-protect"),_.length)),d().createElement(h.Z,{id:"paid-fix-all-threats",position:w?"bottom right":"middle left",anchor:P})),d().createElement(i.Z,{ref:T,variant:"secondary",className:k.Z["list-header-button"],isLoading:j,onClick:e=>{e.preventDefault(),R()}},__("Scan now","jetpack-protect")),d().createElement(h.Z,{id:"paid-daily-and-manual-scans",position:w?"bottom left":"middle left",anchor:M}))),e?d().createElement(d().Fragment,null,d().createElement("div",{ref:L},d().createElement(E.Z,{list:a})),d().createElement(h.Z,{id:"paid-understand-severity",position:"top",anchor:I})):d().createElement(f.Z,{list:a})):d().createElement(g.Z,null)));var z}},4289:(e,t,a)=>{"use strict";a.d(t,{Z:()=>g});var n=a(2054),c=a(5736),r=a(797),s=a(2817),i=a(7663),o=a(8960),l=a(4160),p=a(6376),d=a(9196),u=a(6477),m=a(5773),h=a(5338);const __=c.__,g=({selected:e,onSelect:t})=>{const{plugins:a,themes:c,numThreats:g,numCoreThreats:f,numFilesThreats:v,numDatabaseThreats:E,hasRequiredPlan:k}=(0,m.Z)(),{recordEvent:b}=(0,u.Z)(),[y]=(0,n.Z)("lg","<"),Z=(0,d.useCallback)((()=>{b("jetpack_protect_navigation_all_click")}),[b]),_=(0,d.useCallback)((()=>{b("jetpack_protect_navigation_core_click")}),[b]),w=(0,d.useCallback)((()=>{b("jetpack_protect_navigation_plugin_click")}),[b]),C=(0,d.useCallback)((()=>{b("jetpack_protect_navigation_theme_click")}),[b]),R=(0,d.useCallback)((()=>{b("jetpack_protect_navigation_file_click")}),[b]),j=(0,d.useCallback)((()=>{b("jetpack_protect_navigation_database_click")}),[b]);return React.createElement(h.ZP,{selected:e,onSelect:t,mode:y?"dropdown":"list"},React.createElement(h.Dx,{initial:!0,id:"all",label:__("All threats","jetpack-protect"),icon:r.Z,badge:g,disabled:g<=0,onClick:Z,checked:!0}),React.createElement(h.Dx,{id:"wordpress",label:__("WordPress","jetpack-protect"),icon:s.Z,badge:f,disabled:f<=0,onClick:_,checked:!0}),React.createElement(h.KB,{label:__("Plugins","jetpack-protect"),icon:i.Z},a.map((({name:e,threats:t,checked:a})=>React.createElement(h.Dx,{key:e,id:e,label:e,checked:a,badge:t?.length,disabled:t?.length<=0,onClick:w})))),React.createElement(h.KB,{label:__("Themes","jetpack-protect"),icon:o.Z},c.map((({name:e,threats:t,checked:a})=>React.createElement(h.Dx,{key:e,id:e,label:e,checked:a,badge:t?.length,disabled:t?.length<=0,onClick:C})))),k&&React.createElement(React.Fragment,null,React.createElement(h.Dx,{id:"files",label:__("Files","jetpack-protect"),icon:l.Z,badge:v,disabled:v<=0,onClick:R,checked:!0}),React.createElement(h.Dx,{id:"database",label:__("Database","jetpack-protect"),icon:p.Z,badge:E,disabled:E<=0,onClick:j,checked:!0})))}},1400:(e,t,a)=>{"use strict";a.d(t,{Z:()=>E});var n=a(526),c=a(5106),r=a(2054),s=a(9818),i=a(9307),o=a(5736),l=a(9196),p=a.n(l),d=a(6477),u=a(4633),m=a(7127),h=a(4257),g=a(289),f=a(9709);const __=o.__,v=({context:e,description:t,diff:a,filename:r,fixedIn:i,icon:v,fixable:E,id:k,label:b,name:y,source:Z,title:_,type:w,severity:C})=>{const{setModal:R}=(0,s.useDispatch)(u.t),{recordEvent:j}=(0,d.Z)(),S=Z?p().createElement(n.Z,{variant:"link",isExternalLink:!0,weight:"regular",href:Z},__("See more technical details of this threat","jetpack-protect")):null;return p().createElement(g.c,{id:k,label:b,title:_,icon:v,fixable:E,severity:C,onOpen:(0,l.useCallback)((()=>{["core","plugin","theme","file","database"].includes(w)&&j(`jetpack_protect_${w}_threat_open`)}),[j,w])},t&&p().createElement("div",{className:f.Z["threat-section"]},p().createElement(c.ZP,{variant:"title-small",mb:2},__("What is the problem?","jetpack-protect")),p().createElement(c.ZP,{mb:2},t),S),(r||e||a)&&p().createElement(c.ZP,{variant:"title-small",mb:2},__("The technical details","jetpack-protect")),r&&p().createElement(p().Fragment,null,p().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")),p().createElement("pre",{className:f.Z["threat-filename"]},r)),e&&p().createElement(h.Z,{context:e}),a&&p().createElement(m.C,{diff:a}),i&&p().createElement("div",{className:f.Z["threat-section"]},p().createElement(c.ZP,{variant:"title-small",mb:2},__("How to fix it?","jetpack-protect")),p().createElement(c.ZP,{mb:2},/* translators: Translates to Update to. %1$s: Name. %2$s: Fixed version */ /* translators: Translates to Update to. %1$s: Name. %2$s: Fixed version */
(0,o.sprintf)(__("Update to %1$s %2$s","jetpack-protect"),y,i))),!t&&p().createElement("div",{className:f.Z["threat-section"]},S),p().createElement("div",{className:f.Z["threat-footer"]},p().createElement(n.Z,{isDestructive:!0,variant:"secondary",onClick:e=>{e.preventDefault(),R({type:"IGNORE_THREAT",props:{id:k,label:b,title:_,icon:v,severity:C}})}},__("Ignore threat","jetpack-protect")),E&&p().createElement(n.Z,{onClick:e=>{e.preventDefault(),R({type:"FIX_THREAT",props:{id:k,label:b,title:_,icon:v,severity:C,fixable:E}})}},__("Fix threat","jetpack-protect"))))},E=({list:e})=>{const{scan:t}=(0,s.useDispatch)(u.t),a=(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:p().createElement(n.Z,{variant:"link",onClick:e=>{e.preventDefault(),t()}})}),[o]=(0,r.Z)(["sm","lg"],[null,"<"]),l=e=>e.name&&e.version?`${e.name} (${e.version})`:e.filename?e.filename.split("/").pop():e.table?e.table:void 0;return e=e.map((e=>({label:l(e),...e}))),p().createElement(p().Fragment,null,!o&&p().createElement("div",{className:f.Z["accordion-heading"]},p().createElement("span",null,__("Details","jetpack-protect")),p().createElement("span",null,__("Severity","jetpack-protect")),p().createElement("span",null,__("Auto-fix","jetpack-protect")),p().createElement("span",null)),p().createElement(g.Z,null,e.map((({context:e,description:t,diff:a,filename:n,fixedIn:c,icon:r,fixable:s,id:i,label:o,name:l,severity:d,source:u,table:m,title:h,type:g,version:f})=>p().createElement(v,{context:e,description:t,diff:a,filename:n,fixedIn:c,icon:r,fixable:s,id:i,key:i,label:o,name:l,severity:d,source:u,table:m,title:h,type:g,version:f})))),p().createElement(c.ZP,{className:f.Z["manual-scan"],variant:"body-small"},a))}},7930:(e,t,a)=>{"use strict";a.d(t,{Z:()=>u});var n=a(2817),c=a(4160),r=a(6376),s=a(7663),i=a(8960),o=a(9196),l=a(5773);const p=(e,t)=>t.severity-e.severity,d=(e,t)=>"object"==typeof e&&0===Object.keys(e).length?[]:Array.isArray(e)?e.map((e=>d(e,t))).flat():e?.threats.map((a=>({...a,...e,...t}))),u=()=>{const[e,t]=(0,o.useState)("all"),{plugins:a,themes:u,core:m,files:h,database:g}=(0,l.Z)(),{unsortedList:f,item:v}=(0,o.useMemo)((()=>{if(e&&"all"!==e){switch(e){case"wordpress":return{unsortedList:d(m,{icon:n.Z}),item:m};case"files":return{unsortedList:d(h,{icon:c.Z}),item:h};case"database":return{unsortedList:d(g,{icon:r.Z}),item:g}}const t=a.find((t=>t?.name===e));if(t)return{unsortedList:d(t,{icon:s.Z}),item:t};const o=u.find((t=>t?.name===e));if(o)return{unsortedList:d(o,{icon:i.Z}),item:o}}return{unsortedList:[...d(m,{icon:n.Z}),...d(a,{icon:s.Z}),...d(u,{icon:i.Z}),...d(h,{icon:c.Z}),...d(g,{icon:r.Z})],item:null}}),[m,g,h,a,e,u]);return{item:v,list:(0,o.useMemo)((()=>[...f].sort(p)),[f]),selected:e,setSelected:t}}},2854:(e,t,a)=>{"use strict";a.d(t,{Z:()=>r});var n=a(1294),c=a(8227);const r=({children:e})=>{const{isUserConnected:t,hasConnectedOwner:a}=(0,n.Z)();return t&&a?e:React.createElement(c.Z,null)}},8227:(e,t,a)=>{"use strict";a.d(t,{Z:()=>d});var n=a(5106),c=a(526),r=a(1294),s=a(9818),i=a(5736),o=a(4633),l=a(291),p=a(541);const __=i.__,d=()=>{const{setModal:e}=(0,s.useDispatch)(o.t),{userIsConnecting:t,handleConnectUser:a}=(0,r.Z)({redirectUri:"admin.php?page=jetpack-protect"});return React.createElement(React.Fragment,null,React.createElement(n.ZP,{variant:"title-medium",mb:2},__("User connection needed","jetpack-protect")),React.createElement(l.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 youve secured a user connection, all Jetpack Protect features will be available for use.","jetpack-protect")),React.createElement("div",{className:p.Z.footer},React.createElem
// translators: placeholder is the number amount of fixed threats.
_n("%s threat was fixed successfully","%s threats were fixed successfully",e.length,"jetpack-protect"),e.length)}))})).catch((()=>{t(G({type:"error",message:__("Not all threats could be fixed. Please contact our support.","jetpack-protect")}))})).finally((()=>{t(W([]))}))},G=e=>({type:_,payload:e}),$=e=>({type:C,hasRequiredPlan:e}),q={checkCredentials:()=>async({dispatch:e})=>await new Promise(((t,a)=>(e(O(!0)),c()({path:"jetpack-protect/v1/check-credentials",method:"POST"}).then((a=>{e(D(a)),t(a)})).catch((e=>{a(e)})).finally((()=>{e(O(!1))}))))),setCredentials:D,setCredentialsIsFetching:O,setStatus:M,setStatusProgress:e=>({type:d,currentProgress:e}),startScanOptimistically:T,refreshStatus:z,setStatusIsFetching:V,setScanIsEnqueuing:H,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:(e,t=(()=>{}))=>async({dispatch:a})=>(a(B(e,!0)),await new Promise((()=>c()({path:`jetpack-protect/v1/ignore-threat?threat_id=${e}`,method:"POST"}).then((()=>a(z()))).then((()=>a(G({type:"success",message:__("Threat ignored","jetpack-protect")})))).catch((()=>a(G({type:"error",message:__("An error ocurred ignoring the threat.","jetpack-protect")})))).finally((()=>{a(B(e,!1)),t()}))))),setModal:e=>({type:Z,payload:e}),setNotice:G,clearNotice:()=>({type:w}),fixThreats:(e,t=(()=>{}))=>async({dispatch:a})=>(e.forEach((e=>{a(B(e,!0))})),await new Promise((()=>c()({path:`jetpack-protect/v1/fix-threats?threat_ids=${e}`,method:"POST",data:{threatIds:e}}).then((()=>a(G({type:"success",message:__("We're hard at work fixing this threat in the background. Please check back shortly.","jetpack-protect")})))).then((()=>{setTimeout((()=>a(J(e))),1e3)})).catch((()=>a(G({type:"error",message:__("Error fixing threats. Please contact support.","jetpack-protect")})))).finally((()=>{e.forEach((e=>{a(B(e,!1))})),t()}))))),scan:(e=(()=>{}))=>async({dispatch:t})=>(t(H(!0)),await new Promise((()=>c()({path:"jetpack-protect/v1/scan",method:"POST"}).then((()=>{t(T()),setTimeout((()=>t(z(!0))),5e3)})).catch((()=>t(G({type:"error",message:__("An error ocurred enqueuing the scan","jetpack-protect")})))).finally((()=>{t(H(!1)),e()}))))),setThreatsAreFixing:W,refreshPlan:()=>({dispatch:e})=>{c()({path:"jetpack-protect/v1/check-plan",method:"GET"}).then((t=>e($(t))))},setHasRequiredPlan:$,setScanIsUnavailable:U,setOnboardingProgress:e=>({type:R,progress:e}),setWafIsEnabled:e=>({type:N,isEnabled:e}),setWafIsSeen:e=>({type:j,isSeen:e}),setWafUpgradeIsSeen:e=>({type:S,upgradeIsSeen:e}),setWafIsUpdating:e=>({type:P,isUpdating:e}),setWafIsToggling:e=>({type:x,isToggling:e}),setWafConfig:e=>({type:I,config:e}),setWafStats:e=>({type:L,stats:e})}},3638:(e,t,a)=>{"use strict";a.d(t,{Z:()=>s});var n=a(9818),c=a(5230);const r={wafSupported:null,bruteForceSupported:null,isSeen:!1,upgradeIsSeen:!1,isEnabled:!1,isUpdating:!1,isToggling:!1,config:void 0,stats:void 0},s=(0,n.combineReducers)({credentials:(e=null,t)=>t.type===c.jA?t.credentials:e,credentialsIsFetching:(e=!1,t)=>t.type===c._N?t.isFetching:e,status:(e={},t)=>{switch(t.type){case c.d0:return t.status;case c.o9:return{...e,currentProgress:t.currentProgress};case c.Y2:return{...e,currentProgress:0,status:"optimistically_scanning"}}return e},statusIsFetching:(e=!1,t)=>t.type===c.Gk?t.status:e,scanIsUnavailable:(e=!1,t)=>t.type===c.eG?t.status:e,scanIsEnqueuing:(e=!1,t)=>t.type===c.hI?t.isEnqueuing:e,installedPlugins:(e={},t)=>t.type===c.RR?t.plugins:e,installedThemes:(e={},t)=>t.type===c.U2?t.themes:e,wpVersion:(e={},t)=>t.type===c.P_?t.version:e,jetpackScan:(e={},t)=>t.type===c.tu?t.scan:e,threatsUpdating:(e={},t)=>t.type===c.Xm?{...e,[t.payload.threatId]:t.payload.isUpdating}:e,modal:(e={},t)=>t.type===c.i0?{...e,...t.payload}:e,notice:(e={},t)=>{switch(t.type){case c.VF:return{...e,...t.payload};case c.dG:return{}}return e},setThreatsFixing:(e=[],t)=>t.type===c.BZ?t.threatIds:e,hasRequiredPlan:(e=!1,t)=>t.type===c.r0?t.hasRequiredPlan:e,onboardingProgress:(e=null,t)=>t.type===c.Au?t.progress:e,waf:(e=r,t)=>