403Webshell
Server IP : 104.21.14.103  /  Your IP : 18.225.92.178
Web Server : LiteSpeed
System : Linux business53.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User : giankuin ( 1871)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/giankuin/dietcontrungnhanh.com/wp-content/plugins/ithemes-security-pro/dist/pages/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/giankuin/dietcontrungnhanh.com/wp-content/plugins/ithemes-security-pro/dist/pages/firewall.min.js
/*! For license information please see firewall.min.js.LICENSE.txt */
(globalThis.itsecWebpackJsonP=globalThis.itsecWebpackJsonP||[]).push([[9459,1511],{15919:(e,t,r)=>{"use strict";r.r(t),r.d(t,{AsideHeaderFill:()=>x,BeforeCreateFirewallRuleFill:()=>v,FirewallBannerFill:()=>w});var n=r(6293),a=r(25993),l=r.n(a),i=r(95122),s=r(52117),o=r(16550),c=r(42236),u=r(12614),m=r(64893),d=r(3571),p=r(13173),g=r(47959),h=(r(62470),r(48015)),f=r(31600);function E(){const{firewallRulesActive:e}=(0,h.useSelect)((e=>({firewallRulesActive:e(f.modulesStore).isActive("firewall")})),[]);return(0,n.createElement)(g._g,null,(0,n.createElement)(g.uC,{to:"/logs",title:(0,i.__)("Logs","it-l10n-ithemes-security-pro")}),e&&(0,n.createElement)(g.uC,{to:"/rules",title:(0,i.__)("Rules","it-l10n-ithemes-security-pro")}),(0,n.createElement)(g.uC,{to:"/ip-management",title:(0,i.__)("IP Management","it-l10n-ithemes-security-pro")}),(0,n.createElement)(g.uC,{to:"/configure",title:(0,i.__)("Configure","it-l10n-ithemes-security-pro")}),(0,n.createElement)(g.uC,{to:"/automated",title:(0,i.__)("Automated","it-l10n-ithemes-security-pro")}))}const{Slot:y,Fill:v}=(0,m.createSlotFill)("BeforeCreateFirewallRule"),{Slot:_,Fill:x}=(0,m.createSlotFill)("AsideHeader"),{Slot:b,Fill:w}=(0,m.createSlotFill)("FirewallBanner"),k=(0,s.Z)("header",{target:"e1ao50kc1"})({name:"1eoy87d",styles:"display:flex;justify-content:space-between"}),S=(0,s.Z)("div",{target:"e1ao50kc0"})({name:"damvy5",styles:"display:flex;gap:1rem"});function L(){return(0,n.createElement)(React.Fragment,null,(0,n.createElement)(b,null),(0,n.createElement)(k,null,(0,n.createElement)(S,null,(0,n.createElement)(p.X6,{level:1,weight:p.fs.NORMAL,text:(0,i.__)("Firewall")}),(0,n.createElement)(g.U9,null),(0,n.createElement)(g.oB,null)),(0,n.createElement)(_,null)))}const I=(0,s.Z)("div",{target:"e1yvga8v0"})({name:"vgwucc",styles:"display:flex;align-self:center;flex-direction:column;gap:1.25rem;width:100%;max-width:1680px;padding:1.25rem 1.25rem 4rem 1.5rem"});function O({children:e}){return(0,n.createElement)(I,null,(0,n.createElement)(L,null),(0,n.createElement)(E,null),e)}var N=r(92819),C=r(9576),A=r(27231);const Z=(0,r(29508).iv)({name:"1dlyed8",styles:"flex-basis:50%"}),R=(0,s.Z)(p.zx,{target:"ekwhszr0"})({name:"o4byn8",styles:"margin-top:23px"}),T={inclusive:!0};function P({value:e,onChange:t,className:r}){var a,l;const s=(0,C.useInstanceId)(P,"solid-rule-form"),{config:o={rules:[T]}}=e;return(0,n.createElement)(m.Flex,{direction:"column",gap:4,align:"stretch",expanded:!1,className:r},(0,n.createElement)(m.__experimentalInputControl,{value:null!==(a=e.name)&&void 0!==a?a:"",onChange:r=>t({...e,name:r}),label:(0,i.__)("Rule Name","it-l10n-ithemes-security-pro"),required:!0,__next36pxDefaultSize:!0}),(0,n.createElement)(p.X6,{level:3,text:(0,i.__)("If incoming requests match…","it-l10n-ithemes-security-pro"),weight:p.fs.HEAVY}),(0,n.createElement)(m.Flex,{direction:"column",gap:3,align:"stretch",expanded:!1},o.rules.map(((r,a)=>{return(0,n.createElement)(D,{key:a,idx:a,value:r,onAndRule:(l=a,()=>{t({...e,config:{...o,rules:o.rules.toSpliced(l+1,0,T)}})}),onChange:r=>t({...e,config:{...o,rules:o.rules.map(((e,t)=>t===a?r:e))}}),onDelete:1===o.rules.length?null:()=>t({...e,config:{...o,rules:o.rules.toSpliced(a,1)}})});var l}))),(0,n.createElement)(p.X6,{level:3,text:(0,i.__)("Then take action…","it-l10n-ithemes-security-pro"),weight:p.fs.HEAVY}),(0,n.createElement)(m.Flex,{direction:"column",gap:3,align:"stretch",expanded:!1},(0,n.createElement)(m.BaseControl,{id:s+"__action",label:(0,i.__)("Action","it-l10n-ithemes-security-pro"),__nextHasNoMarginBottom:!0},(0,n.createElement)(g.Ph,{inputId:s+"__action",options:j,value:j.find((e=>e.value===o.type)),onChange:r=>t({...e,config:{...o,type:r.value,type_params:""}})})),"REDIRECT"===o.type&&(0,n.createElement)(m.__experimentalInputControl,{value:null!==(l=o.type_params)&&void 0!==l?l:"",onChange:r=>t({...e,config:{...o,type_params:r}}),type:"url",label:(0,i.__)("Redirect Location","it-l10n-ithemes-security-pro"),__next36pxDefaultSize:!0})))}function D({idx:e,value:t,onChange:r,onDelete:a,onAndRule:l}){const s=(0,C.useViewportMatch)("large"),o=(0,C.useInstanceId)(D,"solid-rule-form-rule"),c=t.parameter&&K.find((e=>U(t.parameter,e))),u=H.filter((e=>!0===c?.operators||c?.operators.includes(e.value))),d=t.match?.type&&u.find((e=>e.value===t.match?.type));return(0,n.createElement)("fieldset",null,(0,n.createElement)(m.VisuallyHidden,{as:"legend"},(0,i.sprintf)((0,i.__)("Rule %d","it-l10n-ithemes-security-pro"),e+1)),(0,n.createElement)(m.Flex,{gap:1,align:s?"start":"stretch",direction:s?"row":"column",expanded:s},(0,n.createElement)(m.FlexBlock,null,(0,n.createElement)(m.Flex,{align:"start",gap:1},(0,n.createElement)(m.FlexBlock,{className:Z},(0,n.createElement)(M,{id:o,field:c,value:t,onChange:r})),c?.allowSubFields&&(0,n.createElement)(m.FlexItem,{className:Z},(0,n.createElement)(F,{field:c,value:t,onChange:r})))),(0,n.createElement)(m.FlexBlock,null,(0,n.createElement)(z,{id:o,operator:d,allowedOperators:u,value:t,onChange:r})),(0,n.createElement)(m.FlexBlock,null,(0,n.createElement)(B,{id:o,field:c,operator:d,value:t,onChange:r})),(0,n.createElement)(m.FlexItem,null,(0,n.createElement)(m.Flex,{gap:1,justify:"start"},(0,n.createElement)(R,{onClick:l,variant:"secondary",text:(0,i.__)("And","it-l10n-ithemes-security-pro")}),a&&(0,n.createElement)(R,{onClick:a,variant:"tertiary",icon:A.Z,label:(0,i.__)("Remove","it-l10n-ithemes-security-pro")})))))}function M({id:e,field:t,value:r,onChange:a}){return(0,n.createElement)(m.BaseControl,{id:e+"__field",label:(0,i.__)("Field","it-l10n-ithemes-security-pro"),help:(0,i.__)("Select a field to inspect.","it-l10n-ithemes-security-pro"),__nextHasNoMarginBottom:!0},(0,n.createElement)(g.Ph,{inputId:e+"__field",key:t?.value,options:K,value:t,onChange:e=>a({...r,parameter:e.value,match:{type:"equals"}}),isOptionSelected:(e,t)=>t.some((t=>U(e.value,t))),required:!0}))}function F({field:e,value:t,onChange:r}){var a;const{example:l,sanitize:s,display:o}=e.allowSubFields;return(0,n.createElement)(m.__experimentalInputControl,{label:(0,i.__)("Name","it-l10n-ithemes-security-pro"),help:(0,i.sprintf)((0,i.__)("e.g. %s","it-l10n-ithemes-security-pro"),l),value:o(null!==(a=t.parameter?.replace(e.value,""))&&void 0!==a?a:""),onChange:n=>r({...t,parameter:e.value+s(n)}),required:!0,__next36pxDefaultSize:!0})}function z({id:e,operator:t,allowedOperators:r,value:a,onChange:l}){return(0,n.createElement)(m.BaseControl,{id:e+"__operator",label:(0,i.__)("Operator","it-l10n-ithemes-security-pro"),__nextHasNoMarginBottom:!0},(0,n.createElement)(g.Ph,{inputId:e+"__operator",options:r,value:t,onChange:e=>l({...a,match:{...a.match||{},type:e.value,value:(()=>{const t=a.match?.value;return t?e.isList?Array.isArray(t)?t:[t]:Array.isArray(t)?t[0]:t:e.isList?[]:""})()}}),isDisabled:!r.length,required:!0}))}function B({id:e,field:t,operator:r,value:a,onChange:l}){return r?.isList?(0,n.createElement)(m.BaseControl,{id:e+"__value",label:(0,i.__)("Value","it-l10n-ithemes-security-pro"),__nextHasNoMarginBottom:!0},(0,n.createElement)(g.a7,{inputId:e+"__value",key:t?.value,options:t?.listOptions?.map((e=>({value:e,label:e}))),value:a.match?.value?.map((e=>({value:e,label:e}))),onChange:e=>l({...a,match:{...a.match||{},value:(0,N.map)(e,"value")}}),isMulti:!0,isClearable:!0,required:!0})):t?.listOptions?(0,n.createElement)(m.BaseControl,{id:e+"__value",label:(0,i.__)("Value","it-l10n-ithemes-security-pro"),__nextHasNoMarginBottom:!0},(0,n.createElement)(g.a7,{inputId:e+"__value",key:t?.value,options:t?.listOptions?.map((e=>({value:e,label:e}))),value:{value:null!==(s=a.match?.value)&&void 0!==s?s:"",label:null!==(o=a.match?.value)&&void 0!==o?o:""},onChange:e=>l({...a,match:{...a.match||{},value:e.value}}),isClearable:!0,required:!0})):(0,n.createElement)(m.__experimentalInputControl,{label:(0,i.__)("Value","it-l10n-ithemes-security-pro"),help:t?.example&&(0,i.sprintf)((0,i.__)("e.g. %s","it-l10n-ithemes-security-pro"),t.example),value:a.match?.value,onChange:e=>l({...a,match:{...a.match||{},value:e}}),disabled:!t,required:!0,__next36pxDefaultSize:!0});var s,o}function U(e,t){return t.value===e||!(!t.allowSubFields||!e.startsWith(t.value))}const K=[{value:"server.REQUEST_URI",label:(0,i.__)("URI","it-l10n-ithemes-security-pro"),operators:["equals","contains","not_contains"],example:"/test?param=value"},{value:"server.REQUEST_METHOD",label:(0,i.__)("Request Method","it-l10n-ithemes-security-pro"),operators:!0,listOptions:["GET","HEAD","POST","PUT","PATCH","DELETE","OPTIONS"]},{value:"server.CONTENT_TYPE",label:(0,i.__)("Content Type","it-l10n-ithemes-security-pro"),operators:!0},{value:"server.HTTP_",label:(0,i.__)("Header","it-l10n-ithemes-security-pro"),operators:!0,allowSubFields:{example:"user-agent",sanitize:e=>e.toUpperCase().replace("-","_"),display:e=>e.toLowerCase().replace("_","-")}},{value:"cookie.",label:(0,i.__)("Cookie","it-l10n-ithemes-security-pro"),operators:!0,allowSubFields:{example:"my-cookie",sanitize:e=>e.replace(".","_"),display:e=>e}},{value:"server.ip",label:(0,i.__)("IP Address"),operators:["equals","in_array","not_in_array"],example:"127.0.0.1"}],H=[{value:"equals",label:(0,i.__)("equals","it-l10n-ithemes-security-pro")},{value:"contains",label:(0,i.__)("contains","it-l10n-ithemes-security-pro")},{value:"not_contains",label:(0,i.__)("does not contain","it-l10n-ithemes-security-pro")},{value:"in_array",label:(0,i.__)("is in","it-l10n-ithemes-security-pro"),isList:!0},{value:"not_in_array",label:(0,i.__)("is not in","it-l10n-ithemes-security-pro"),isList:!0}],j=[{value:"BLOCK",label:(0,i.__)("Block","it-l10n-ithemes-security-pro")},{value:"REDIRECT",label:(0,i.__)("Redirect","it-l10n-ithemes-security-pro")},{value:"LOG",label:(0,i.__)("Log only","it-l10n-ithemes-security-pro")},{value:"WHITELIST",label:(0,i.__)("Allow","it-l10n-ithemes-security-pro")}];var q=r(73727),W=r(82521),V=r(65813),Q=r(31511),G=r(95117),Y=r(60976);const X=(0,s.Z)("div",{target:"e1vlnfa92"})({name:"1r4ht29",styles:"display:flex;align-items:center;justify-content:center;max-width:1680px;min-height:400px"}),$=(0,s.Z)("div",{target:"e1vlnfa91"})({name:"i8rek5",styles:"display:flex;flex-direction:column;align-items:center;gap:1.25rem;max-width:400px;padding-top:70px;padding-bottom:70px"}),J=(0,s.Z)(q.rU,{target:"e1vlnfa90"})({name:"bp9nrr",styles:"padding-right:14px!important"});function ee(){return(0,n.createElement)(X,null,(0,n.createElement)($,null,(0,n.createElement)(g.nU,{icon:(0,n.createElement)(Y.b3,null)}),(0,n.createElement)(p.xv,{variant:p.rK.DARK,weight:700,text:(0,i.__)("Your site has no firewall rules installed.","it-l10n-ithemes-security-pro")}),(0,n.createElement)(J,{to:"/rules/new",component:(0,V.Sj)(p.zx),variant:"primary",icon:G.Z,text:(0,i.__)("Create a Rule","it-l10n-ithemes-security-pro")})))}function te(){const e=(0,Q.bv)("vulnerabilities");return(0,n.createElement)(X,null,(0,n.createElement)($,null,(0,n.createElement)(g.nU,{icon:(0,n.createElement)(Y.PT,null)}),(0,n.createElement)(p.xv,{align:"center",variant:p.rK.DARK,weight:700,text:(0,i.__)("Your site has vulnerable software installed, but there are no firewall rules available.","it-l10n-ithemes-security-pro")}),(0,n.createElement)(p.xv,{align:"center",variant:p.rK.DARK,text:(0,i.__)("Visit the vulnerabilities page to learn how to keep your site safe.","it-l10n-ithemes-security-pro")}),(0,n.createElement)(p.zx,{href:e,variant:"primary",text:(0,i.__)("View Vulnerabilities","it-l10n-ithemes-security-pro")})))}function re(){return(0,n.createElement)(X,null,(0,n.createElement)($,null,(0,n.createElement)(g.nU,{icon:(0,n.createElement)(Y.Ie,null)}),(0,n.createElement)(p.xv,{align:"center",variant:p.rK.DARK,weight:700,text:(0,i.__)("No firewall rules are active on your site because you have no vulnerable software installed.","it-l10n-ithemes-security-pro")}),(0,n.createElement)(p.xv,{align:"center",variant:p.rK.DARK,text:(0,i.__)("Keep up the good work!","it-l10n-ithemes-security-pro")})))}function ne({provider:e}){return(0,n.createElement)(p.Ct,function(e){switch(e){case"patchstack":return{text:"Patchstack",icon:(0,n.createElement)(Y.Ou,null)};case"solid":return{text:"Solid Security",icon:(0,n.createElement)(Y.dK,null)};default:return{text:(0,i.__)("Custom Rule","it-l10n-ithemes-security-pro"),icon:ae}}}(e))}const ae=(0,n.createElement)("svg",{width:"10",height:"13",viewBox:"0 0 10 13",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.76133 11.0773C9.7724 10.9901 9.78226 10.9027 9.78893 10.8155C9.79782 10.7025 9.80226 10.5865 9.80226 10.4674C9.80226 9.27326 9.32787 8.12798 8.48345 7.28356C7.63903 6.43914 6.49376 5.96475 5.29957 5.96475C4.10538 5.96475 2.9601 6.43914 2.11568 7.28356C1.27126 8.12798 0.796875 9.27326 0.796875 10.4674C0.796875 10.5865 0.801319 10.7026 0.810207 10.8155C0.816873 10.9027 0.825673 10.9901 0.837805 11.0773C2.1415 12.0028 3.70075 12.5 5.29957 12.5C6.89839 12.5 8.45764 12.0028 9.76133 11.0773ZM7.07169 1.23194C6.66166 0.822659 6.12242 0.568184 5.54583 0.511865C4.96923 0.455547 4.39094 0.60087 3.90947 0.92308C3.428 1.24529 3.07312 1.72445 2.9053 2.27895C2.73747 2.83345 2.76707 3.42898 2.98906 3.96411C3.21105 4.49923 3.61169 4.94084 4.12274 5.21371C4.63379 5.48659 5.22364 5.57385 5.79181 5.46063C6.35998 5.34741 6.87132 5.04071 7.23874 4.59279C7.60616 4.14486 7.80692 3.5834 7.80683 3.00406C7.80716 2.6748 7.74238 2.34873 7.61622 2.04459C7.49005 1.74046 7.30499 1.46428 7.07169 1.23194Z",fill:"#6C6C6C"})),le=(0,s.Z)(p.zx,{shouldForwardProp:e=>"isActive"!==e,target:"el7gie40"})("box-shadow:inset 0 0 0 1px ",(({isActive:e})=>null!=e?e:"#545454"),"!important;color:",(({isActive:e,theme:t})=>null!=e?e:t.colors.text.muted),"!important;&:hover{background:",(({isActive:e,theme:t})=>null!=e?e:t.colors.surface.primaryContrast),"!important;}");function ie(){const{rules:e,hasResolved:t,installType:r,hasVulnerabilities:a}=(0,h.useSelect)((e=>({rules:e(f.firewallStore).getFirewallRules(),hasResolved:e(f.firewallStore).hasFinishedResolution("getFirewallRules"),installType:e(f.coreStore).getInstallType(),hasVulnerabilities:e(f.vulnerabilitiesStore).getVulnerabilities().length>0})),[]),l=!e.length&&t;return(0,n.createElement)("table",{className:"itsec-firewall-rules-table"},(0,n.createElement)("thead",null,(0,n.createElement)("tr",null,(0,n.createElement)(p.xv,{as:"th",text:(0,i.__)("Title","it-l10n-ithemes-security-pro")}),(0,n.createElement)(p.xv,{as:"th",text:(0,i.__)("Source","it-l10n-ithemes-security-pro")}),(0,n.createElement)(p.xv,{as:"th",text:(0,i.__)("Status","it-l10n-ithemes-security-pro")}),(0,n.createElement)(p.xv,{as:"th",text:(0,i.__)("Action","it-l10n-ithemes-security-pro")}))),(0,n.createElement)("tbody",null,e?.map((e=>(0,n.createElement)(se,{key:e.id,rule:e}))),l&&"free"===r&&(0,n.createElement)("tr",null,(0,n.createElement)("td",{colSpan:4},(0,n.createElement)(ee,null))),l&&"pro"===r&&a&&(0,n.createElement)("tr",null,(0,n.createElement)("td",{colSpan:4},(0,n.createElement)(te,null))),l&&"pro"===r&&!a&&(0,n.createElement)("tr",null,(0,n.createElement)("td",{colSpan:4},(0,n.createElement)(re,null)))))}function se({rule:e}){const{isSaving:t,isDeleting:r}=(0,h.useSelect)((t=>({isSaving:t(f.firewallStore).isSaving(e),isDeleting:t(f.firewallStore).isDeleting(e)})),[e]),{saveItem:a,deleteItem:l}=(0,h.useDispatch)(f.firewallStore);return(0,n.createElement)("tr",null,(0,n.createElement)("td",null,(0,n.createElement)(p.xv,{weight:p.fs.HEAVY},e.name)),(0,n.createElement)("td",null,(0,n.createElement)(ne,{provider:e.provider})),(0,n.createElement)("td",null,(0,n.createElement)(p.xv,{text:e.paused_at?(0,i.__)("Inactive","it-l10n-ithemes-security-pro"):(0,i.__)("Active","it-l10n-ithemes-security-pro")})),(0,n.createElement)("td",null,(0,n.createElement)(m.Flex,{justify:"start"},(0,n.createElement)(le,{onClick:()=>{a({...e,paused_at:e.paused_at?null:(0,W.gmdate)("Y-m-d\\TH:i:s")})},isBusy:t,isActive:e.paused_at,text:e.paused_at?(0,i.__)("Activate","it-l10n-ithemes-security-pro"):(0,i.__)("Deactivate","it-l10n-ithemes-security-pro")}),"user"===e.provider&&(0,n.createElement)(React.Fragment,null,(0,n.createElement)(q.rU,{to:`/rules/${e.id}`,component:(0,V.Sj)(p.zx),text:(0,i.__)("Edit","it-l10n-ithemes-security-pro")}),(0,n.createElement)(p.zx,{onClick:()=>l((0,Q.AW)(e)),isDestructive:!0,isBusy:r,text:(0,i.__)("Delete","it-l10n-ithemes-security-pro")})))))}var oe=r(89522);const ce=(0,s.Z)("form",{target:"e11u33xz4"})({name:"1qs6zrd",styles:"padding:1rem 1.25rem;display:flex;flex-direction:column;gap:0.25rem"}),ue=(0,s.Z)("div",{target:"e11u33xz3"})({name:"1p6jri8",styles:"display:flex;align-items:center;gap:0.5rem;margin-top:0.25rem"}),me=(0,s.Z)(p.lD,{target:"e11u33xz2"})({name:"s6qh76",styles:"max-width:360px;flex-grow:1"}),de=(0,s.Z)(p.x$,{target:"e11u33xz1"})({name:"lee4ct",styles:"width:350px"}),pe=(0,s.Z)("span",{target:"e11u33xz0"})({name:"14cgj8g",styles:"color:#c0c0c0"}),ge={per_page:100},he={paused:"false"};function fe(){const{isQuerying:e}=(0,h.useSelect)((e=>({isQuerying:e(f.firewallStore).isQuerying("main")})),[]),{query:t}=(0,h.useDispatch)(f.firewallStore),[r,a]=(0,n.useState)(""),l=()=>{t("main",{search:r,...s,...ge})},[s,o]=(0,n.useState)(he),c=e=>{o(e),t("main",{...e,search:r,...ge})},u=Object.keys(s).filter((e=>!(0,N.isEmpty)(s[e]))).length;return(0,n.createElement)(ce,{onSubmit:e=>{e.preventDefault(),l()}},(0,n.createElement)(p.X6,{level:2,size:p.yH.LARGE,variant:p.rK.DARK,weight:p.fs.HEAVY,text:(0,i.__)("Firewall Rules","it-l10n-ithemes-security-pro")}),(0,n.createElement)(p.xv,{text:(0,i.__)("Firewall rules block requests based on patterns.","it-l10n-ithemes-security-pro"),variant:p.rK.MUTED,size:p.yH.SMALL}),(0,n.createElement)(ue,{role:"search"},(0,n.createElement)(me,{label:(0,i.__)("Search firewall rules","it-l10n-ithemes-security-pro"),value:r,onChange:a,isSearching:e,size:"medium",placeholder:(0,i.__)("Search by title","it-l10n-ithemes-security-pro"),onSubmit:l}),(0,n.createElement)(m.Dropdown,{popoverProps:{focusOnMount:"container"},renderToggle:({isOpen:e,onToggle:t})=>(0,n.createElement)(p.zx,{icon:oe.Z,onClick:t,"aria-expanded":e,variant:"tertiary",text:(0,i.sprintf)((0,i.__)("Filter (%d)","it-l10n-ithemes-security-pro"),u)}),renderContent:()=>(0,n.createElement)(de,{initialValue:s,initialOpen:"paused",expandSingle:!0,isBusy:e,onApply:c},(0,n.createElement)(p.C2,{slug:"paused",title:(0,i.__)("Status","it-l10n-ithemes-security-pro"),options:[{value:"false",label:(0,i.__)("Active","it-l10n-ithemes-security-pro"),summary:(0,i.__)("Active Rules","it-l10n-ithemes-security-pro")},{value:"true",label:(0,i.__)("Inactive","it-l10n-ithemes-security-pro"),summary:(0,i.__)("Inactive Rules","it-l10n-ithemes-security-pro")}]}),(0,n.createElement)(p.By,{slug:"provider",title:(0,i.__)("Source","it-l10n-ithemes-security-pro"),options:[{value:"patchstack",label:(0,i.__)("Patchstack","it-l10n-ithemes-security-pro")},{value:"solid",label:(0,i.__)("Solid Security","it-l10n-ithemes-security-pro")},{value:"user",label:(0,i.__)("Custom Rules","it-l10n-ithemes-security-pro")}]}))}),(0,n.createElement)(pe,null,"|"),(0,n.createElement)(p.zx,{onClick:()=>{a(""),o(he),t("main",{...he,...ge})},variant:"tertiary",text:(0,i.__)("Reset all","it-l10n-ithemes-security-pro")})))}var Ee=r(16282),ye=r(62462);const ve=(0,s.Z)("div",{target:"eyx51y0"})({name:"1vltohq",styles:"display:flex;gap:2rem;justify-content:flex-end;& .components-button.is-tertiary:disabled{background:transparent!important;}"});function _e(){const{isQuerying:e,hasPrev:t,hasNext:r}=(0,h.useSelect)((e=>({isQuerying:e(f.firewallStore).isQuerying("main"),hasPrev:e(f.firewallStore).queryHasPrevPage("main"),hasNext:e(f.firewallStore).queryHasNextPage("main")})),[]),{fetchQueryPrevPage:a,fetchQueryNextPage:l}=(0,h.useDispatch)(f.firewallStore);return(0,n.createElement)(ve,null,(0,n.createElement)(p.zx,{disabled:!t||e,icon:Ee.Z,iconGap:0,variant:"tertiary",onClick:()=>a("main","replace"),text:(0,i.__)("Prev","it-l10n-ithemes-security-pro")}),(0,n.createElement)(p.zx,{disabled:!r||e,icon:ye.Z,iconPosition:"right",iconGap:0,variant:"tertiary",onClick:()=>l("main","replace"),text:(0,i.__)("Next","it-l10n-ithemes-security-pro")}))}var xe=r(89390),be=r(46888),we=r(3023),ke=r(75358),Se=r(99307),Le=r(86108),Ie=r(87514),Oe=r.n(Ie),Ne=r(73470);const Ce=(0,s.Z)(m.Card,{target:"es30p7y5"})("display:flex;flex-direction:column;& circle{fill:",(({theme:e})=>e.colors.surface.primaryAccent),";fill-opacity:1;}"),Ae=(0,s.Z)(m.CardHeader,{target:"es30p7y4"})({name:"1x2b7cs",styles:"padding:1rem 1.25rem"}),Ze=(0,s.Z)(p.Tg,{target:"es30p7y3"})({name:"mizjgb",styles:"display:flex;flex-direction:column;justify-content:center;align-items:center;padding:4px 8px;border-radius:2px"}),Re=(0,s.Z)(p.Tg,{target:"es30p7y2"})({name:"1v8nd53",styles:"height:275px"}),Te=(0,s.Z)(p.qX,{target:"es30p7y1"})({name:"vtxs8z",styles:"margin:1rem"}),Pe=(0,s.Z)("div",{target:"es30p7y0"})({name:"1m84zdt",styles:"display:flex;flex-direction:column;justify-content:center;align-items:center;height:275px;gap:1rem;padding:2rem"});function De({active:e,payload:t}){if(!e||!t?.length)return null;const r=(0,i.sprintf)((0,i._n)("%d attempt","%d attempts",t[0].value,"it-l10n-ithemes-security-pro"),t[0].value);return(0,n.createElement)(Ze,{variant:p.h1.DARK},(0,n.createElement)(p.xv,{as:"p",text:r}),(0,n.createElement)(p.xv,{as:"p",text:t[0].payload.name}))}function Me({period:e,setPeriod:t}){const r=(0,u.u)();let a;const l=(0,C.useViewportMatch)("medium","<"),s=(0,n.useCallback)((()=>{const t={events:["local-brute-force","network-brute-force","firewall-block"],period:e};return Oe()({path:(0,Ne.addQueryArgs)("/ithemes-security/v1/dashboard/events",t)})}),[e]),{status:o,value:c,error:m}=(0,V.r5)(s),d=(0,Q.bv)("settings","/settings/configure/lockout");"success"===o&&(a={"firewall-graph":{data:Object.values(c.data)}});const h=[],f=[];let E=0;if(!(0,N.isEmpty)(a))for(const t in a){for(let r=0;r<a[t].data.length;r++){const n=a[t].data[r];if(E+=n.y,h[r])h[r][t]=n.y;else{const r="24-hours"===e?"g A":"M j";h.push({name:n.t?(0,W.dateI18n)(r,n.t):n.x,[t]:n.y})}}f.push({dataKey:t})}return(0,n.createElement)(Ce,null,(0,n.createElement)(Ae,null,(0,n.createElement)(p.xv,{size:p.yH.LARGE,variant:p.rK.DARK,weight:600,text:"success"===o?(0,i.sprintf)((0,i._n)("%d Threat Blocked","%d Threats Blocked",E,"it-l10n-ithemes-security-pro"),E):(0,i.__)("Threats Blocked","it-l10n-ithemes-security-pro")}),(0,n.createElement)(g.kS,{value:e,onChange:e=>t(e)})),"pending"===o&&(0,n.createElement)(Re,null,(0,n.createElement)(Te,{text:(0,i.__)("Data Loading","it-l10n-ithemes-security-pro")})),"error"===o&&(0,n.createElement)(Re,null,(0,n.createElement)(Te,{type:"danger",text:(0,i.sprintf)((0,i.__)("An error has occurred: %s","it-l10n-ithemes-security-pro"),m.message)})),"success"===o&&(E>0?(0,n.createElement)(xe.h,{width:"100%",height:275},(0,n.createElement)(be.T,{data:h,margin:{top:40,left:-15,right:50,bottom:10}},l?(0,n.createElement)(we.K,{ticks:[h[0]?.name,h[h.length/2]?.name,h[h.length-1]?.name],dataKey:"name",tickLine:!1,stroke:r.colors.text.muted}):(0,n.createElement)(we.K,{interval:1,dataKey:"name",tickLine:!1,stroke:r.colors.text.muted}),(0,n.createElement)(ke.B,{allowDecimals:!1,tickLine:!1,stroke:r.colors.text.muted}),(0,n.createElement)(Se.u,{content:(0,n.createElement)(De,null)}),f.map((e=>(0,n.createElement)(Le.u,{type:"linear",key:e.dataKey,dataKey:e.dataKey,stroke:r.colors.primary.darker20,fill:r.colors.tertiary.base,isAnimationActive:!1,dot:!0}))))):(0,n.createElement)(Pe,null,(0,n.createElement)(g.nU,{icon:(0,n.createElement)(Y.Qs,null)}),(0,n.createElement)(p.xv,{align:"center",variant:p.rK.DARK,text:(0,i.__)("There are no recently blocked threats. This could mean there haven’t been any attacks recently.","it-l10n-ithemes-security-pro")}),(0,n.createElement)(p.xv,{align:"center",variant:p.rK.DARK,text:(0,i.__)("Make sure to configure the firewall settings if you haven’t yet!","it-l10n-ithemes-security-pro")}),(0,n.createElement)(p.zx,{href:d,text:(0,i.__)("Configure Firewall","it-l10n-ithemes-security-pro")}))))}var Fe=r(87462);const ze=(0,s.Z)("div",{target:"e1o61d9v6"})("display:flex;flex-direction:column;flex-grow:1;@media screen and (min-width: ",(({theme:e})=>e.breaks.wide),"px){flex-grow:0;}"),Be=(0,s.Z)("div",{target:"e1o61d9v5"})({name:"tgad8j",styles:"margin:0.75rem 0"}),Ue=(0,s.Z)(p.Tg,{target:"e1o61d9v4"})({name:"13ftngy",styles:"display:flex;gap:0.5rem;padding:8px 12px;border-radius:2px 2px 0 0"}),Ke=(0,s.Z)(p.Tg,{target:"e1o61d9v3"})("display:flex;justify-content:space-between;padding:8px 12px;border-top-left-radius:",(({hasHeading:e})=>!e&&"2px"),";border-top-right-radius:",(({hasHeading:e})=>!e&&"2px"),";:last-of-type{border-bottom-right-radius:2px;border-bottom-left-radius:2px;}"),He=(0,s.Z)("div",{target:"e1o61d9v2"})({name:"15idi1d",styles:"display:flex;flex-direction:column;gap:0.75rem"}),je=(0,s.Z)(p.Tg,{target:"e1o61d9v1"})({name:"1cx1nbv",styles:"display:flex;flex-direction:column;gap:0.75rem;margin:0.75rem 0;padding:1rem 0.75rem"}),qe=(0,s.Z)(p.zx,{target:"e1o61d9v0"})({name:"6heuj6",styles:"width:fit-content;align-self:center"});function We(e){return(0,n.createElement)(p.xv,(0,Fe.Z)({as:"p",size:p.yH.SMALL},e))}function Ve({heading:e,children:t}){return(0,n.createElement)(Be,null,e&&(0,n.createElement)(Ue,{variant:p.h1.SECONDARY},(0,n.createElement)(p.xv,{weight:600,text:e})),t)}function Qe({text:e,count:t,hasHeading:r}){return(0,n.createElement)(Ke,{hasHeading:r},(0,n.createElement)(p.xv,{variant:p.rK.DARK,weight:600,text:e}),(0,n.createElement)(p.xv,{variant:p.rK.DARK,text:t}))}function Ge({title:e,description:t,actionText:r,actionLink:a}){return(0,n.createElement)(He,null,(0,n.createElement)(je,null,(0,n.createElement)(p.xv,{variant:p.rK.MUTED,weight:600,text:e}),(0,n.createElement)(p.xv,{variant:p.rK.MUTED,text:t})),(0,n.createElement)(qe,{variant:"link",text:r,href:a}))}function Ye({title:e,children:t}){return(0,n.createElement)(ze,null,(0,n.createElement)(p.xv,{size:p.yH.LARGE,variant:p.rK.DARK,weight:p.fs.HEAVY,text:e}),t)}const Xe=(0,s.Z)(m.Modal,{target:"e12mdcim6"})("width:60%;max-width:718px;.components-modal__header{padding:0.5rem 1.5rem;}.components-modal__header-heading{font-size:1rem;}.components-modal__content{padding:0;}& button:hover{color:",(({theme:e})=>e.colors.secondary.darker20),";}& button:focus{box-shadow:0 0 0 2px ",(({theme:e})=>e.colors.primary.base),"!important;}"),$e=(0,s.Z)("div",{target:"e12mdcim5"})({name:"3yscd8",styles:"display:flex;flex-direction:column;gap:2rem;padding:1.5rem 1.5rem 3.5rem"}),Je=(0,s.Z)("div",{target:"e12mdcim4"})({name:"bbmwc3",styles:"display:grid;grid-template-columns:1fr 1fr;margin-bottom:2rem"}),et=(0,s.Z)("div",{target:"e12mdcim3"})("display:flex;flex-direction:column;gap:0.75rem;padding-top:0.5rem;padding-bottom:1rem;:first-child{border-right:1px solid ",(({theme:e})=>e.colors.border.normal),";padding-right:3rem;}:nth-child(2){margin-left:3rem;}"),tt=(0,s.Z)("div",{target:"e12mdcim2"})("display:grid;grid-template-columns:0.175fr 1fr;gap:1rem;:nth-child(even){border-bottom:1px solid ",(({theme:e})=>e.colors.border.normal),";padding-bottom:2rem;}@media screen and (min-width: ",(({theme:e})=>e.breaks.xlarge),"px){align-items:center;}"),rt=(0,s.Z)("div",{target:"e12mdcim1"})({name:"damvy5",styles:"display:flex;gap:1rem"}),nt=(0,s.Z)(p.xv,{target:"e12mdcim0"})({name:"17w62k0",styles:"color:#D63638"});function at({actionText:e,rule:t,ip:r,geolocation:a,date:l,requestUrl:s,requestMethod:o,userAgent:c,onRequestClose:u}){return(0,n.createElement)(Xe,{title:(0,i.__)("Log Details","it-l10n-ithemes-security-pro"),onRequestClose:u},(0,n.createElement)($e,null,(0,n.createElement)(Je,null,(0,n.createElement)(et,null,(0,n.createElement)(p.xv,{size:p.yH.SMALL,variant:p.rK.MUTED,text:(0,i.__)("Triggered Rule","it-l10n-ithemes-security-pro")}),(0,n.createElement)(p.xv,{size:p.yH.EXTRA_LARGE,variant:p.rK.DARK,text:t||(0,i.__)("Unknown rule","it-l10n-ithemes-security-pro")})),(0,n.createElement)(et,null,(0,n.createElement)(p.xv,{size:p.yH.SMALL,variant:p.rK.MUTED,text:(0,i.__)("Action Taken","it-l10n-ithemes-security-pro")}),(0,n.createElement)(p.xv,{size:p.yH.EXTRA_LARGE,text:e,variant:p.rK.DARK}))),(0,n.createElement)(tt,null,(0,n.createElement)(p.xv,{size:p.yH.SMALL,variant:p.rK.MUTED,text:(0,i.__)("Date & Time:","it-l10n-ithemes-security-pro")}),(0,n.createElement)(p.xv,{variant:p.rK.DARK,text:(0,W.dateI18n)("M d, Y - g:i:s",l)})),s&&(0,n.createElement)(tt,null,(0,n.createElement)(p.xv,{size:p.yH.SMALL,variant:p.rK.MUTED,text:(0,i.__)("Request:","it-l10n-ithemes-security-pro")}),(0,n.createElement)(rt,null,o&&(0,n.createElement)(nt,{text:o}),(0,n.createElement)(p.xv,{variant:p.rK.DARK,text:s}))),(0,n.createElement)(tt,null,(0,n.createElement)(p.xv,{size:p.yH.SMALL,variant:p.rK.MUTED,text:(0,i.__)("Origin:","it-l10n-ithemes-security-pro")}),(0,n.createElement)(rt,null,a&&!(0,Q.k0)(a)&&(0,n.createElement)(React.Fragment,null,(0,n.createElement)(p.xv,{variant:p.rK.DARK,text:(0,Q.bK)(a.country_code)+" "+a.label}),(0,n.createElement)(p.xv,{variant:p.rK.MUTED},"•")),(0,n.createElement)(p.xv,{text:r}))),c&&(0,n.createElement)(tt,null,(0,n.createElement)(p.xv,{size:p.yH.SMALL,variant:p.rK.MUTED,text:(0,i.__)("User Agent:","it-l10n-ithemes-security-pro")}),(0,n.createElement)(p.xv,{variant:p.rK.DARK,text:c}))))}const lt=(0,s.Z)(p.Tg,{target:"e1abd2u510"})("border:1px solid ",(({theme:e})=>e.colors.border.normal),";"),it=(0,s.Z)("div",{target:"e1abd2u59"})({name:"xuq0dw",styles:"display:flex;flex-direction:column;gap:0.5rem;padding:1rem 1.5rem"}),st=(0,s.Z)(p.xv,{target:"e1abd2u58"})({name:"hra6zc",styles:"font-size:0.75rem"}),ot=(0,s.Z)(p.lD,{target:"e1abd2u57"})({name:"s6qh76",styles:"max-width:360px;flex-grow:1"}),ct=(0,s.Z)(p.xv,{target:"e1abd2u56"})("color:",(({action:e,theme:t})=>"BLOCK"===e?"red":t.colors.text.dark),";width:80px;"),ut=(0,s.Z)(p.xv,{target:"e1abd2u55"})("@media screen and (min-width: ",(({theme:e})=>e.breaks.medium),"px){width:22%;max-width:300px;}@media screen and (min-width: ",(({theme:e})=>e.breaks.wide),"px){width:30%;}"),mt=(0,s.Z)("div",{target:"e1abd2u54"})({name:"1sfvdl0",styles:"display:flex;align-items:center;gap:1rem;justify-content:space-between"}),dt=(0,s.Z)(mt,{target:"e1abd2u53"})({name:"11g6mpt",styles:"justify-content:flex-start"}),pt=(0,s.Z)(p.qX,{target:"e1abd2u52"})({name:"vtxs8z",styles:"margin:1rem"}),gt=(0,s.Z)(p.Tg,{target:"e1abd2u51"})({name:"1v8nd53",styles:"height:275px"}),ht=(0,s.Z)(gt,{target:"e1abd2u50"})({name:"195w10n",styles:"display:flex;flex-direction:column;justify-content:center;align-items:center;gap:1.25rem;padding:2.5rem 0"}),ft={module:["firewall","lockout"],code:["BLOCK::%","host-lockout::%","host-triggered-blacklist"],per_page:20,_embed:1};function Et(){const[e,t]=(0,n.useState)(0),{isQuerying:r,items:a,logStorageDuration:l}=(0,h.useSelect)((e=>{var t;return{isQuerying:e(f.logsStore).isQuerying("firewall"),items:e(f.logsStore).getQueryResults("firewall"),logStorageDuration:null!==(t=e(f.modulesStore).getSetting("global","log_rotation"))&&void 0!==t?t:60}}),[]),{query:s}=(0,h.useDispatch)(f.logsStore);(0,n.useEffect)((()=>{s("firewall",ft)}),[s]);const[o,c]=(0,n.useState)(""),u=()=>s("firewall",{...ft,search:o}),m=(0,C.useViewportMatch)("medium","<");return(0,n.createElement)(lt,null,(0,n.createElement)(it,null,(0,n.createElement)(p.X6,{level:3,size:p.yH.LARGE,variant:p.rK.DARK,weight:p.fs.HEAVY,text:(0,i.__)("Firewall Logs","it-l10n-ithemes-security-pro")}),(0,n.createElement)(st,{variant:p.rK.MUTED,text:(0,i.sprintf)((0,i._n)("Firewall logs are stored for up to %d day and then archived.","Firewall logs are stored for up to %d days and then archived.",l,"it-l10n-ithemes-security-pro"),l)}),(0,n.createElement)("form",{onSubmit:e=>{e.preventDefault(),u()}},(0,n.createElement)(ot,{label:(0,i.__)("Search firewall logs","it-l10n-ithemes-security-pro"),value:o,onChange:c,isSearching:r,size:"medium",placeholder:(0,i.__)("Search by IP address or URL","it-l10n-ithemes-security-pro"),onSubmit:u}))),(0,n.createElement)("table",{className:"itsec-firewall-logs-table"},(0,n.createElement)("thead",null,m?(0,n.createElement)("tr",null,(0,n.createElement)("th",null,(0,i.__)("Action & Origin","it-l10n-ithemes-security-pro")),(0,n.createElement)("th",null,(0,i.__)("Protected By","it-l10n-ithemes-security-pro"))):(0,n.createElement)("tr",null,(0,n.createElement)("th",null,(0,i.__)("Action","it-l10n-ithemes-security-pro")),(0,n.createElement)("th",null,(0,i.__)("Rule","it-l10n-ithemes-security-pro")),(0,n.createElement)("th",null,(0,i.__)("Origin","it-l10n-ithemes-security-pro")),(0,n.createElement)("th",null,(0,i.__)("Date & Time","it-l10n-ithemes-security-pro")),(0,n.createElement)("th",null,(0,i.__)("Protected By","it-l10n-ithemes-security-pro")))),(0,n.createElement)("tbody",null,r&&(0,n.createElement)("tr",null,(0,n.createElement)("td",{colSpan:m?2:5},(0,n.createElement)(gt,null,(0,n.createElement)(pt,{text:(0,i.__)("Data Loading","it-l10n-ithemes-security-pro")})))),!r&&a.length>0&&a.map((r=>(0,n.createElement)(yt,{key:r.id,log:r,isSmall:m,viewEntry:e,setViewEntry:t}))),!r&&0===a.length&&(0,n.createElement)(bt,{isSmall:m}))))}function yt(e){return"firewall"===e.log.module.raw?(0,n.createElement)(vt,e):"lockout"===e.log.module.raw?(0,n.createElement)(_t,e):null}function vt({log:e,isSmall:t,viewEntry:r,setViewEntry:a}){return(0,n.createElement)(xt,{id:e.id,action:"BLOCK",actionText:(0,i.__)("Block","it-l10n-ithemes-security-pro"),rule:e._embedded?.["ithemes-security:firewall-rule"]?.[0].name,ip:e.ip.raw,geolocation:e._embedded?.["ithemes-security:geolocate"]?.[0],date:e.created_at,protectedBy:e._embedded?.["ithemes-security:firewall-rule"]?.[0].provider,requestUrl:e.url,requestMethod:e.data.method,userAgent:e.data.user_agent,isSmall:t,viewEntry:r,setViewEntry:a})}function _t({log:e,isSmall:t,viewEntry:r,setViewEntry:a}){var l;return(0,n.createElement)(xt,{id:e.id,action:"BLOCK",actionText:"host-triggered-blacklist"===e.code.raw.code?(0,i.__)("Ban","it-l10n-ithemes-security-pro"):(0,i.__)("Lockout","it-l10n-ithemes-security-pro"),rule:"host-triggered-blacklist"===e.code.raw.code?(0,i.__)("Locked out too many times","it-l10n-ithemes-security-pro"):null!==(l=e.data.module_details?.reason)&&void 0!==l?l:e.data.module,ip:e.ip.raw,geolocation:e._embedded?.["ithemes-security:geolocate"]?.[0],date:e.created_at,protectedBy:"solid",requestUrl:e.url,isSmall:t,viewEntry:r,setViewEntry:a})}function xt({id:e,actionText:t,action:r,rule:a,ip:l,geolocation:s,date:o,protectedBy:c,requestUrl:u,requestMethod:d,userAgent:g,isSmall:h,viewEntry:f,setViewEntry:E}){const y=s&&!(0,Q.k0)(s)&&(0,n.createElement)(m.Tooltip,{text:s.label},(0,n.createElement)("span",null,(0,Q.bK)(s.country_code)," "));return(0,n.createElement)("tr",null,h?(0,n.createElement)(React.Fragment,null,(0,n.createElement)("td",null,(0,n.createElement)(dt,null,(0,n.createElement)(ct,{weight:p.fs.HEAVY,action:r,text:t,textTransform:"uppercase"}),y,l)),(0,n.createElement)("td",null,(0,n.createElement)(mt,null,(0,n.createElement)(ne,{provider:c}),(0,n.createElement)(p.zx,{text:(0,i.__)("Details","it-l10n-ithemes-security-pro")})))):(0,n.createElement)(React.Fragment,null,(0,n.createElement)(ct,{as:"td",action:r,weight:p.fs.HEAVY,text:t,textTransform:"uppercase"}),(0,n.createElement)(ut,{as:"td"},a||(0,i.__)("Unknown rule","it-l10n-ithemes-security-pro")),(0,n.createElement)("td",null,y,l),(0,n.createElement)("td",null,(0,W.dateI18n)("M d, Y - g:i:s",o)),(0,n.createElement)("td",null,(0,n.createElement)(mt,null,(0,n.createElement)(ne,{provider:c}),(0,n.createElement)(p.zx,{"aria-pressed":f===e,onClick:()=>E(e),text:(0,i.__)("Details","it-l10n-ithemes-security-pro")})))),f===e&&(0,n.createElement)(at,{actionText:t,rule:a,ip:l,geolocation:s,date:o,requestUrl:u,requestMethod:d,userAgent:g,onRequestClose:()=>E(0)}))}function bt({isSmall:e}){const{logTypeFile:t}=(0,h.useSelect)((e=>({logTypeFile:"file"===e(f.modulesStore).getSetting("global","log_type")})),[]);return(0,n.createElement)("tr",null,(0,n.createElement)("td",{colSpan:e?2:5},t?(0,n.createElement)(gt,null,(0,n.createElement)(pt,{text:(0,i.__)("To view logs inside Solid Security, you must enable database logging in Global Settings.","it-l10n-ithemes-security-pro")})):(0,n.createElement)(ht,null,(0,n.createElement)(g.nU,{icon:(0,n.createElement)(Y.XV,null)}),(0,n.createElement)(p.xv,{text:(0,i.__)("We haven’t logged any activity yet.","it-l10n-ithemes-security-pro")}))))}function wt({period:e}){const{hasGeolocation:t}=(0,h.useSelect)((e=>({hasGeolocation:"active"===e(f.MODULES_STORE_NAME).getModule("geolocation")?.status.selected})),[]),r=(0,n.useCallback)((()=>Oe()({path:(0,Ne.addQueryArgs)("/ithemes-security/rpc/lockout-stats/top-blocked-ips",{period:e})})),[e]),{status:a,value:l,error:s}=(0,V.r5)(r),o=(0,Q.bv)("settings","/settings/configure/lockout");return(0,n.createElement)(Ye,{title:(0,i.__)("Top Blocked IPs","it-l10n-ithemes-security-pro")},"error"===a&&(0,n.createElement)(p.qX,{type:"danger",text:(0,i.sprintf)((0,i.__)("An error has occurred: %s","it-l10n-ithemes-security-pro"),s.message)}),t&&("success"===a||"pending"===a)&&(0,n.createElement)(St,{data:l}),!t&&("success"===a||"pending"===a)&&(0,n.createElement)(kt,{data:l}),0===l?.length&&"success"===a&&(0,n.createElement)(Ge,{title:(0,i.__)("No IPs have been locked out recently","it-l10n-ithemes-security-pro"),description:(0,i.__)("Consider customizing your firewall settings.","it-l10n-ithemes-security-pro"),actionText:(0,i.__)("Firewall Settings","it-l10n-ithemes-security-pro"),actionLink:o}))}function kt({data:e}){return e?.map((e=>(0,n.createElement)(Ve,{key:e.ip},(0,n.createElement)(Qe,{text:e.ip,count:e.count}))))}function St({data:e}){if(!e?.length)return null;const t=(0,N.groupBy)(e,(e=>e.location?`${e.location?.country}:${e.location?.country_code}`:"")),r=e.reduce(((e,t)=>{const r=t.location?.credit;return r&&!e.includes(r)&&e.push(r),e}),[]);return(0,n.createElement)(React.Fragment,null,(0,N.map)(t,((e,t)=>{let r=(0,i.__)("Unknown","it-l10n-ithemes-security-pro");if(t){const[e,n]=t.split(":");r=e,n&&(r=(0,Q.bK)(n)+" "+r)}return(0,n.createElement)(Ve,{key:t,heading:r},e.map((e=>(0,n.createElement)(Qe,{key:e.ip,text:e.ip,count:e.count,hasHeading:!0}))))})),r.length>0&&(0,n.createElement)(We,null,r.map(((e,t)=>(0,n.createElement)(g.Lu,{key:t,noWrap:!0,content:e+(t<r.length-1?". ":".")})))))}const Lt=(0,s.Z)("div",{target:"e1ytzd2n0"})({name:"1vltohq",styles:"display:flex;gap:2rem;justify-content:flex-end;& .components-button.is-tertiary:disabled{background:transparent!important;}"});function It(){const{isQuerying:e,hasPrev:t,hasNext:r}=(0,h.useSelect)((e=>({isQuerying:e(f.logsStore).isQuerying("firewall"),hasPrev:e(f.logsStore).queryHasPrevPage("firewall"),hasNext:e(f.logsStore).queryHasNextPage("firewall")})),[]),{fetchQueryPrevPage:a,fetchQueryNextPage:l}=(0,h.useDispatch)(f.logsStore);return(0,n.createElement)(Lt,null,(0,n.createElement)(p.zx,{disabled:!t||e,icon:Ee.Z,iconGap:0,variant:"tertiary",onClick:()=>a("firewall","replace"),text:(0,i.__)("Prev","it-l10n-ithemes-security-pro")}),(0,n.createElement)(p.zx,{disabled:!r||e,icon:ye.Z,iconPosition:"right",iconGap:0,variant:"tertiary",onClick:()=>l("firewall","replace"),text:(0,i.__)("Next","it-l10n-ithemes-security-pro")}))}var Ot=r(35800),Nt=r(7980);const Ct=(0,s.Z)("div",{target:"enb5tf30"})({name:"1fo50kt",styles:"margin-top:1.5rem"}),At=["user_lockout_message","lockout_period","blacklist_period","blacklist","blacklist_count","lockout_message","user_lockout_message","community_lockout_message","automatic_temp_auth","lockout_white_list"];function Zt({module:e}){const t=(0,n.useCallback)(((e,t)=>At.includes(t)),[]),{schema:r,uiSchema:a,formData:l,setFormData:i}=(0,Nt.useSettingsForm)(e,t);return(0,n.createElement)(p.Tg,null,(0,n.createElement)(p.mr,{title:e.title,description:e.description,fullWidth:!0,hasBorder:!0}),(0,n.createElement)(Ct,null,(0,n.createElement)(Nt.ModuleFormInputs,{module:e,schema:r,uiSchema:a,formData:l,setFormData:i})))}const Rt=(0,s.Z)("div",{target:"eh8pj490"})({name:"1m3j4vw",styles:"padding:1.5rem"});function Tt({module:e}){return(0,n.createElement)(React.Fragment,null,(0,n.createElement)(p.mr,{title:e.title,description:e.description,fullWidth:!0,hasBorder:!0}),(0,n.createElement)(Rt,null,(0,n.createElement)(Nt.ModuleCard,{module:e,persistStatus:!0,includeTitle:!0})))}const Pt=(0,s.Z)(m.Flex,{target:"e1yhr99q0"})({name:"1m3j4vw",styles:"padding:1.5rem"});function Dt(){const{tab:e}=(0,o.UO)(),{module:t,config:r,isDirty:a,isSaving:l}=(0,h.useSelect)((t=>({module:t(f.MODULES_STORE_NAME).getModule(e),config:t(f.MODULES_STORE_NAME).getEditedModule(e),isDirty:t(f.MODULES_STORE_NAME).areSettingsDirty(e),isSaving:t(f.MODULES_STORE_NAME).isSavingSettings(e)})),[e]),{saveSettings:s,resetSettingEdits:c}=(0,h.useDispatch)(f.MODULES_STORE_NAME);return(0,n.createElement)(m.FlexBlock,null,(0,n.createElement)("form",{onSubmit:e=>{e.preventDefault(),s(r.id,!0)}},(0,n.createElement)(Ot.ErrorBoundary,{FallbackComponent:Nt.ErrorRenderer},(0,n.createElement)(p.Tg,{variant:"primary"},(0,n.createElement)(Mt,{module:t}),(0,n.createElement)(Pt,{justify:"end"},(0,n.createElement)(p.zx,{text:(0,i.__)("Undo Changes","it-l10n-ithemes-security-pro"),variant:"secondary",onClick:()=>c(t.id),disabled:l||!a,align:"right"}),(0,n.createElement)(p.zx,{type:"submit",text:(0,i.__)("Save Settings","it-l10n-ithemes-security-pro"),variant:"primary",isBusy:l,disabled:l||!a,align:"right"}))))))}function Mt({module:e}){return"global"===e.id?(0,n.createElement)(Zt,{module:e}):(0,n.createElement)(Tt,{module:e})}const Ft=(0,s.Z)("div",{target:"e1sdc93o2"})("display:flex;flex-direction:column;gap:1.5rem;@media screen and (min-width: ",(({theme:e})=>e.breaks.wide),"px){flex-direction:row;}"),zt=(0,s.Z)("div",{target:"e1sdc93o1"})("display:flex;flex-direction:column;gap:1rem;@media screen and (min-width: ",(({theme:e})=>e.breaks.huge),"px){flex-grow:1.5;gap:2rem;}"),Bt=(0,s.Z)("div",{target:"e1sdc93o0"})("display:flex;flex-direction:column;gap:2rem;min-width:300px;@media screen and (min-width: ",(({theme:e})=>e.breaks.medium),"px){flex-direction:row;gap:3.5rem;}@media screen and (min-width: ",(({theme:e})=>e.breaks.wide),"px){flex-direction:column;border-left:1px solid ",(({theme:e})=>e.colors.border.normal),";padding-left:1.25rem;}");function Ut(){const[e,t]=(0,n.useState)("30-days");return(0,n.createElement)(O,null,(0,n.createElement)(Ft,null,(0,n.createElement)(zt,null,(0,n.createElement)(Me,{period:e,setPeriod:t}),(0,n.createElement)(Et,null),(0,n.createElement)(It,null)),(0,n.createElement)(Bt,null,(0,n.createElement)(wt,{period:e}))))}const Kt=(0,s.Z)(q.rU,{target:"e15k91o70"})({name:"bp9nrr",styles:"padding-right:14px!important"});function Ht(){return(0,n.createElement)(O,null,(0,n.createElement)(m.Flex,{justify:"end"},(0,n.createElement)(Kt,{to:"/rules/new",component:(0,V.Sj)(p.zx),variant:"primary",icon:G.Z,text:(0,i.__)("Create Rule","it-l10n-ithemes-security-pro")})),(0,n.createElement)(p.Tg,null,(0,n.createElement)(fe,null),(0,n.createElement)(ie,null)),(0,n.createElement)(_e,null))}var jt=r(52278);const qt=(0,s.Z)(P,{target:"e1afec1l0"})({name:"1s8ymgn",styles:"padding:1rem 1.5rem"});function Wt(){const{push:e}=(0,o.k6)(),{id:t}=(0,o.UO)(),{item:r,self:a,isSaving:l,notFound:s,error:c}=(0,h.useSelect)((e=>{const r=(0,Q.AW)(e(f.firewallStore).getItemById(t));return{item:r&&e(f.firewallStore).getEditedItem(r),self:r,isSaving:r&&e(f.firewallStore).isSaving(r),notFound:e(f.firewallStore).hasResolutionFailed("getItemById",[t]),error:r&&e(f.firewallStore).getLastSaveError(r)}}),[t]),{editItem:u,saveEditedItem:d}=(0,h.useDispatch)(f.firewallStore),g=async()=>{try{await d(a)}catch(e){return}e("/rules")};return(0,n.createElement)(O,null,(0,n.createElement)(m.Flex,{gap:5,direction:"column",align:"stretch",justify:"start",expanded:!1,as:"form"},(0,n.createElement)(m.FlexItem,null,(0,n.createElement)(q.rU,{to:"/rules",component:(0,V.Sj)(p.zx),variant:"tertiary",icon:jt.Z,text:(0,i.__)("Back to Rules overview","it-l10n-ithemes-security-pro")})),c&&(0,n.createElement)(p.qX,{type:"danger",text:c.message||(0,i.__)("Could not save rule.","it-l10n-ithemes-security-pro")}),s&&(0,n.createElement)(p.qX,{type:"warning",text:(0,i.__)("Firewall rule not found.","it-l10n-ithemes-security-pro")}),r&&(0,n.createElement)(React.Fragment,null,(0,n.createElement)(p.Tg,{as:m.FlexBlock},(0,n.createElement)(p.mr,{hasBorder:!0,title:(0,i.__)("Edit Firewall Rule","it-l10n-ithemes-security-pro"),description:(0,i.__)("Custom firewall rules let you block attackers or allow authorized traffic.","it-l10n-ithemes-security-pro")}),(0,n.createElement)(qt,{value:r,onChange:e=>u(a,e)})),(0,n.createElement)(m.Flex,{justify:"end"},(0,n.createElement)(p.zx,{variant:"secondary",text:(0,i.__)("Save as Draft","it-l10n-ithemes-security-pro"),onClick:async()=>{r.paused_at||await u(a,{paused_at:(0,W.gmdate)("Y-m-d\\TH:i:s")}),await g()},disabled:l,isBusy:l&&r.paused_at}),(0,n.createElement)(p.zx,{variant:"primary",text:(0,i.__)("Deploy","it-l10n-ithemes-security-pro"),onClick:async()=>(r.paused_at&&await u(a,{paused_at:null}),g()),disabled:l,isBusy:l&&null===r.paused_at})))))}var Vt=r(25703);const Qt=(0,s.Z)(m.SnackbarList,{target:"edvbg1c0"})({name:"1a7cr9x",styles:".components-snackbar-list__notice-container{display:flex;flex-direction:column;align-items:flex-end;margin-right:100px;}"});function Gt(){const{removeNotice:e}=(0,h.useDispatch)(Vt.store),{modules:t,snackbarNotices:r}=(0,h.useSelect)((e=>({modules:e(f.MODULES_STORE_NAME).getModules(),snackbarNotices:e(Vt.store).getNotices("ithemes-security")})),[]),a=(0,N.sortBy)(t.filter((e=>"lockout"===e.type)),"order");return(0,n.createElement)(O,null,(0,n.createElement)(Qt,{notices:r,onRemove:t=>e(t,"ithemes-security")}),(0,n.createElement)(m.Flex,{gap:5,align:"start"},(0,n.createElement)(p.Rx,{orientation:"vertical"},(0,n.createElement)(q.OL,{key:"global",to:"/configure/global",component:(0,V.Sj)(p.Ig)},(0,i.__)("Global Settings","it-l10n-ithemes-security-pro")),a.map((e=>(0,n.createElement)(q.OL,{key:e.id,to:"/configure/"+e.id,component:(0,V.Sj)(p.Ig)},e.title)))),(0,n.createElement)(Dt,null)))}function Yt(){const{push:e}=(0,o.k6)(),{saveItem:t,refreshQuery:r}=(0,h.useDispatch)(f.firewallStore),[a,l]=(0,n.useState)({}),[s,c]=(0,n.useState)(""),[u,d]=(0,n.useState)(null),g=async(n,a)=>{c(n);try{d(null),await t(a),await r("main")}catch(e){return void d(e)}finally{c("")}e("/rules")};return(0,n.createElement)(O,null,(0,n.createElement)(m.Flex,{gap:5,direction:"column",align:"stretch",justify:"start",expanded:!1,as:"form"},(0,n.createElement)(m.FlexItem,null,(0,n.createElement)(q.rU,{to:"/rules",component:(0,V.Sj)(p.zx),variant:"tertiary",icon:jt.Z,text:(0,i.__)("Back to Rules overview","it-l10n-ithemes-security-pro")})),(0,n.createElement)(y,null),u&&(0,n.createElement)(p.qX,{type:"danger",text:u.message||(0,i.__)("Could not create rule.","it-l10n-ithemes-security-pro")}),(0,n.createElement)(p.Tg,{as:m.FlexBlock},(0,n.createElement)(p.mr,{hasBorder:!0,title:(0,i.__)("Create Firewall Rule","it-l10n-ithemes-security-pro"),description:(0,i.__)("Custom firewall rules let you block attackers or allow authorized traffic.","it-l10n-ithemes-security-pro")}),(0,n.createElement)(qt,{value:a,onChange:l})),(0,n.createElement)(m.Flex,{justify:"end"},(0,n.createElement)(p.zx,{variant:"secondary",text:(0,i.__)("Save as Draft","it-l10n-ithemes-security-pro"),onClick:()=>g("draft",{...a,paused_at:(0,W.gmdate)("Y-m-d\\TH:i:s")}),disabled:!!s,isBusy:"draft"===s}),(0,n.createElement)(p.zx,{variant:"primary",text:(0,i.__)("Deploy","it-l10n-ithemes-security-pro"),onClick:()=>g("publish",a),disabled:!!s,isBusy:"publish"===s}))))}var Xt=r(76292),$t=r.n(Xt),Jt=r(28184),er=r(26755),tr=r(17622);const rr=(0,s.Z)(p.Tg,{target:"e17y765k29"})({name:"1x4izjv",styles:"position:relative;padding:1.5rem;border-radius:8px"}),nr=(0,s.Z)("div",{target:"e17y765k28"})("display:grid;grid-template-columns:",(({isMedium:e})=>e?"1fr":"1.25fr 0.75fr"),";gap:.8rem;margin-bottom:",(({isMedium:e})=>e?".8rem":"0"),";.itsec-basic-banner-title svg{width:78px;height:25px;}"),ar=(0,s.Z)(p.xv,{target:"e17y765k27"})({name:"n8ra49",styles:"font-size:1.125rem"}),lr=(0,s.Z)(p.zx,{shouldForwardProp:e=>"singleColumn"!==e,target:"e17y765k26"})("padding-left:10px!important;justify-self:",(({singleColumn:e})=>e?"start":"end"),";align-self:center;"),ir=(0,s.Z)(p.xv,{target:"e17y765k25"})("align-self:start;justify-self:",(({isMedium:e})=>e?"start":"end"),";height:fit-content;background:#FBF9FF;border:1px solid #E0E0E0;border-radius:20px;padding:4px 16px 4px 12px;margin-right:2.5rem;"),sr=(0,s.Z)(p.Tg,{target:"e17y765k24"})({name:"1nmp4lx",styles:"padding:1.25rem;border-radius:8px"}),or=(0,s.Z)(Y.Ou,{target:"e17y765k23"})({name:"s0560a",styles:"width:24px;height:18px;align-self:start"}),cr=(0,s.Z)(p.xv,{target:"e17y765k22"})({name:"1gcz0h6",styles:"padding-bottom:2.5rem"}),ur=(0,s.Z)(p.xv,{target:"e17y765k21"})({name:"1wfxxmo",styles:"padding-bottom:.75rem"}),mr=(0,s.Z)(p.Tg,{target:"e17y765k20"})({name:"1d3w5wq",styles:"width:100%"}),dr=(0,s.Z)(p.Tg,{target:"e17y765k19"})("padding:1.5rem;display:grid;grid-template-columns:",(({isMedium:e})=>e?"1fr":"1fr 0.5fr"),";align-items:center;gap:.8rem;"),pr=(0,s.Z)(p.xv,{target:"e17y765k18"})("display:",(({hasPatchstack:e})=>!e&&"flex"),";align-items:center;.itsec-header-title-small{color:#6817C5;}.itsec-header-title-large{font-size:2rem;color:#6817C5;padding-right:.5rem;}"),gr=(0,s.Z)("div",{target:"e17y765k17"})("display:flex;flex-direction:column;align-items:",(({isMedium:e})=>e?"flex-start":"flex-end"),";align-self:start;"),hr=(0,s.Z)(p.xv,{target:"e17y765k16"})({name:"kc0l0i",styles:"font-size:0.625rem"}),fr=(0,s.Z)(Y.P_,{shouldForwardProp:e=>"isLarge"!==e,target:"e17y765k15"})("width:",(({isLarge:e})=>e?"170px":"124px"),";"),Er=(0,s.Z)("div",{target:"e17y765k14"})("display:grid;grid-template-columns:",(({isSmall:e})=>e?"1fr 1fr":"0.5fr 0.5fr 1fr"),';grid-template-areas:"name version detail";justify-items:start;padding:.625rem;gap:0.6rem;'),yr=(0,s.Z)(p.xv,{target:"e17y765k13"})({name:"104g9nb",styles:"grid-area:name"}),vr=(0,s.Z)(p.xv,{target:"e17y765k12"})({name:"1olbkha",styles:"grid-area:version"}),_r=(0,s.Z)(p.xv,{target:"e17y765k11"})({name:"29p8i5",styles:"grid-area:detail"}),xr=(0,s.Z)(p.xv,{target:"e17y765k10"})("display:flex;justify-content:center;width:min-content;min-width:2rem;margin:",(({isSmall:e})=>!e&&"0 auto"),";padding:1.5px 6.5px;background-color:",(({backgroundColor:e})=>e),";border-radius:2px;"),br=(0,s.Z)(p.Tg,{target:"e17y765k9"})({name:"shat3k",styles:"flex-shrink:1;position:relative;overflow-y:auto;max-height:31vh;@media ( max-width: 1100px ){max-height:35vh;}@media ( max-width: 700px ){max-height:46vh;}"}),wr=(0,s.Z)(p.xv,{target:"e17y765k7"})({name:"jr8xee",styles:"background:#F9F9F9;padding:.625rem;border-collapse:collapse;overflow-y:auto"}),kr=(0,s.Z)("table",{target:"e17y765k6"})({name:"1uixtsi",styles:"width:100%;border-collapse:collapse"}),Sr=(0,s.Z)("div",{target:"e17y765k5"})("display:grid;justify-items:start;gap:.8rem;grid-template-columns:",(({isSmall:e})=>e?"1fr":"1fr 0.5fr"),";"),Lr=(0,s.Z)("div",{target:"e17y765k4"})({name:"o6kot3",styles:"display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2rem;padding:2rem;svg{margin:0 auto;}"}),Ir=(0,s.Z)(p.zx,{target:"e17y765k3"})({name:"1257f36",styles:"width:fit-content;color:#53129E;margin:0 auto"}),Or=(0,s.Z)("div",{target:"e17y765k2"})({name:"1q7c919",styles:"display:grid;grid-template-rows:1fr 1fr;gap:.8rem"}),Nr=(0,s.Z)(p.xv,{target:"e17y765k1"})({name:"1fl3hkd",styles:"padding:.625rem"}),Cr=(0,s.Z)(p.zx,{target:"e17y765k0"})("position:absolute;top:1rem;right:1rem;box-shadow:inset 0 0 0 1px transparent!important;svg{fill:",(({theme:e})=>e.colors.text.normal),";&:hover,&:active,&:focus{fill:#6817c5;}}"),Ar={patchable:!0,per_page:100,last_seen_after:$t()().subtract(90,"days").toISOString()},Zr={resolution:"auto-updated",per_page:100,last_seen_after:$t()().subtract(90,"days").toISOString(),software_type:["plugin","theme"]};function Rr(){const e=(0,C.useViewportMatch)("small","<"),t=(0,C.useViewportMatch)("medium","<"),r=(0,C.useViewportMatch)("large"),{items:a,hasPatchstack:l,installType:i,isQuerying:s}=(0,h.useSelect)((e=>({items:e(f.vulnerabilitiesStore).getQueryResults("autoPatched"),hasPatchstack:e(f.coreStore).hasPatchstack(),installType:e(f.coreStore).getInstallType(),isQuerying:e(f.vulnerabilitiesStore).isQuerying("autoPatched")})),[]),{query:o}=(0,h.useDispatch)(f.vulnerabilitiesStore);(0,n.useEffect)((()=>{o("autoPatched",Ar)}),[o]);const c=a.length;return(0,n.createElement)(O,null,!s&&(0,n.createElement)(React.Fragment,null,(0,n.createElement)(Tr,{hasPatchstack:l,isSmall:e,numberOfVulnerabilities:c,installType:i,isMedium:t}),(0,n.createElement)(Sr,{isSmall:e},(0,n.createElement)(mr,{variant:"primary"},(0,n.createElement)(Pr,{hasPatchstack:l,isLarge:r,numberOfVulnerabilities:c,isMedium:t}),(0,n.createElement)(Dr,{items:a,isSmall:e,installType:i,hasPatchstack:l})),(0,n.createElement)(Or,null,(0,n.createElement)(Mr,{hasPatchstack:l,numberOfVulnerabilities:c}),(0,n.createElement)(Fr,{installType:i})))))}function Tr({hasPatchstack:e,isSmall:t,numberOfVulnerabilities:r,installType:a,isMedium:l}){const[s,o]=(0,V._)("itsecFWAutoHasPatchstack");if(s)return null;const c=e?(0,i.__)("Thanks for valuing your site security!","it-l10n-ithemes-security-pro"):(0,i.__)("Interested in always-on, automated firewall protection?","it-l10n-ithemes-security-pro");let u="";return e?u=(0,i.__)("You’re getting the best protection available with our Patchstack integration.","it-l10n-ithemes-security-pro"):r>0&&(u=(0,i.sprintf)((0,i._n)("Solid Security Pro could have instantly protected you from %d vulnerability in the last 90 days using automated firewall protection from Patchstack.","Solid Security Pro could have instantly protected you from %d vulnerabilities in the last 90 days using automated firewall protection from Patchstack.",r,"it-l10n-ithemes-security-pro"),r)),(0,n.createElement)(rr,{variant:e?"primary":"dark",isSmall:t},(0,n.createElement)(nr,{isMedium:l},(0,n.createElement)(m.Flex,{direction:"column",expanded:!1,justify:"center",gap:3},(0,n.createElement)(ar,{as:"h3",className:e?"":"itsec-basic-banner-title",text:c,icon:e?Y.Ae:Y.To,size:p.yH.LARGE,iconSize:25}),u&&(0,n.createElement)(p.xv,{as:"p",text:u,variant:e?p.rK.DARK:p.rK.WHITE,isSmall:t})),e&&!t&&(0,n.createElement)(React.Fragment,null,(0,n.createElement)(ir,{text:(0,i.__)("Automated Firewall Active","it-l10n-ithemes-security-pro"),icon:Jt.Z,iconColor:"#5FB370",isMedium:l,align:l?"left":"right"}),(0,n.createElement)(Cr,{label:(0,i.__)("Dismiss","it-l10n-ithemes-security-pro"),icon:A.Z,onClick:()=>o(!0)})),!e&&(0,n.createElement)(lr,{text:"free"===a?(0,i.__)("Get Solid Security Pro + Patchstack","it-l10n-ithemes-security-pro"):(0,i.__)("Upgrade to Patchstack","it-l10n-ithemes-security-pro"),variant:"primary",href:"free"===a?"https://go.solidwp.com/patchstack-banner-upgrade-now":"https://go.solidwp.com/enable-patchstack",icon:er.Z,iconPosition:"right",align:"right",singleColumn:l})),e&&t&&(0,n.createElement)(React.Fragment,null,(0,n.createElement)(p.Ct,{text:(0,i.__)("Automated Firewall Active","it-l10n-ithemes-security-pro"),icon:Jt.Z,iconColor:"#5FB370"}),(0,n.createElement)(Cr,{label:(0,i.__)("Dismiss","it-l10n-ithemes-security-pro"),icon:A.Z,onClick:()=>o(!0)})))}function Pr({hasPatchstack:e,isLarge:t,numberOfVulnerabilities:r,isMedium:a}){let l="";return l=e?(0,n.createInterpolateElement)((0,i.sprintf)((0,i._n)("Solid Security Pro with Patchstack automatically protected you from <b>%d</b> vulnerability in the last 90 days","Solid Security Pro with Patchstack automatically protected you from <b>%d</b> vulnerabilities in the last 90 days",r,"it-l10n-ithemes-security-pro"),r),{b:(0,n.createElement)("span",{className:"itsec-header-title-small"})}):(0,n.createInterpolateElement)((0,i.sprintf)((0,i._n)("<b>%d</b> Vulnerability we could have patched automatically","<b>%d</b> Vulnerabilities we could have patched automatically",r,"it-l10n-ithemes-security-pro"),r),{b:(0,n.createElement)("span",{className:"itsec-header-title-large"})}),(0,n.createElement)(dr,{variant:"primary",isMedium:a},(0,n.createElement)(pr,{as:"h3",size:p.yH.LARGE,text:l,hasPatchstack:e}),(0,n.createElement)(gr,{isMedium:a},(0,n.createElement)(hr,{weight:600,text:(0,i.__)("Powered by","it-l10n-ithemes-security-pro")}),(0,n.createElement)(fr,{isLarge:t})))}function Dr({items:e,isSmall:t,installType:r,hasPatchstack:a}){return(0,n.createElement)(br,{as:"section"},e.length>0&&(0,n.createElement)(kr,null,(0,n.createElement)("thead",null,(0,n.createElement)("tr",null,(0,n.createElement)(wr,{as:"th",text:(0,i.__)("Type","it-l10n-ithemes-security-pro"),textTransform:"uppercase",weight:400}),(0,n.createElement)(wr,{as:"th",text:(0,i.__)("Vulnerability","it-l10n-ithemes-security-pro"),textTransform:"uppercase",weight:400}),(0,n.createElement)(wr,{as:"th",text:(0,i.__)("Severity","it-l10n-ithemes-security-pro"),textTransform:"uppercase",weight:400,align:"center"}))),(0,n.createElement)("tbody",null,e.map((e=>{var r;const a=e.details.id;return(0,n.createElement)("tr",{key:a},(0,n.createElement)(React.Fragment,null,(0,n.createElement)("td",null,(0,n.createElement)(Nr,{icon:(0,tr.vulnerabilityIcon)(e.software.type.slug)})),(0,n.createElement)("td",null,(0,n.createElement)(Er,{isSmall:t},(0,n.createElement)(yr,{weight:500,text:e.software.label||e.software.slug}),(0,n.createElement)(vr,{text:e.details.affected_in}),!t&&(0,n.createElement)(_r,{text:e.details.type.label}))),(0,n.createElement)("td",null,(0,n.createElement)(xr,{backgroundColor:(0,tr.severityColor)(e.details.score),status:e.status,weight:600,text:null!==(r=e.details.score)&&void 0!==r?r:"??"}))))})))),0===e.length&&!a&&(0,n.createElement)(Lr,null,(0,n.createElement)(Y.vt,null),(0,n.createElement)(p.xv,{text:(0,n.createInterpolateElement)((0,i.__)("We didn’t spot vulnerabilities that could have been patched automatically in the last 90 days, <b>but they can still appear any day</b>. Solid Security Pro with Patchstack gives peace of mind and proactive security upgrade to be automatically protected today!","it-l10n-ithemes-security-pro"),{b:(0,n.createElement)("strong",null)}),align:"center"}),(0,n.createElement)(Ir,{variant:"text",text:(0,i.__)("Go Pro with Patchstack","it-l10n-ithemes-security-pro"),href:"free"===r?"https://go.solidwp.com/patchstack-banner-upgrade-now":"https://go.solidwp.com/enable-patchstack"})),0===e.length&&a&&(0,n.createElement)(Lr,null,(0,n.createElement)(g.nU,{icon:(0,n.createElement)(Y.Ie,null)}),(0,n.createElement)(p.xv,{text:(0,i.__)("We didn’t spot vulnerabilities that could have been patched automatically in the last 90 days, great job keeping your site secure!","it-l10n-ithemes-security-pro"),align:"center"})))}function Mr({hasPatchstack:e,numberOfVulnerabilities:t}){const r=e?(0,i.__)("Instant Protection","it-l10n-ithemes-security-pro"):(0,i.__)("Get Instant Protection","it-l10n-ithemes-security-pro");let a="";return a=e?(0,n.createInterpolateElement)((0,i.sprintf)((0,i._n)("You were automatically protected from <b>%d vulnerability</b> using <b>virtual patching,</b> Solid Security Pro’s instant protection feature!","You were automatically protected from <b>%d vulnerabilities</b> using <b>virtual patching,</b> Solid Security Pro’s instant protection feature!",t,"it-l10n-ithemes-security-pro"),t),{b:(0,n.createElement)("strong",null)}):(0,n.createInterpolateElement)((0,i.sprintf)((0,i._n)("Automated protection was available for <b>%d vulnerabilities</b> using <b>virtual patches</b> that instantly deploy when using Solid Security Pro with Patchstack integration. Get ’round the clock protection. Go Pro today.","Automated protection was available for <b>%d vulnerabilities</b> using <b>virtual patches</b> that instantly deploy when using Solid Security Pro with Patchstack integration. Get ’round the clock protection. Go Pro today.",t,"it-l10n-ithemes-security-pro"),t),{b:(0,n.createElement)("strong",null)}),(0,n.createElement)(sr,{variant:"primary"},(0,n.createElement)(m.Flex,null,(0,n.createElement)(ur,{as:"h4",text:r,size:p.yH.SUBTITLE_SMALL}),(0,n.createElement)(or,null)),(0,n.createElement)(cr,{as:"p",text:a,variant:p.rK.MUTED}),(0,n.createElement)(g.oB,null))}function Fr({installType:e}){const{items:t}=(0,h.useSelect)((e=>({items:e(f.vulnerabilitiesStore).getQueryResults("autoUpdated")})),[]),{query:r}=(0,h.useDispatch)(f.vulnerabilitiesStore);(0,n.useEffect)((()=>{r("autoUpdated",Zr)}),[r]);const a=e?(0,i.__)("Real-time Updates","it-l10n-ithemes-security-pro"):(0,i.__)("Get Real-time Updates","it-l10n-ithemes-security-pro");let l="";return l="pro"===e?(0,n.createInterpolateElement)((0,i.sprintf)((0,i._n)("Solid Security with the help of Patchstack has <b>automatically updated %d plugin or theme</b> in the last 90 days!","Solid Security with the help of Patchstack has <b>automatically updated %d plugins or themes</b> in the last 90 days!",t.length,"it-l10n-ithemes-security-pro"),t.length),{b:(0,n.createElement)("strong",null)}):(0,n.createInterpolateElement)((0,i.__)("Avoid vulnerabilities from harming your site with <b>Real-Time Updates,</b> never forget to upgrade a plugin or theme ever again.","it-l10n-ithemes-security-pro"),{b:(0,n.createElement)("strong",null)}),(0,n.createElement)(sr,{variant:"primary"},(0,n.createElement)(ur,{as:"h4",text:a,size:p.yH.SUBTITLE_SMALL}),(0,n.createElement)(cr,{as:"p",text:l,variant:p.rK.MUTED}),(0,n.createElement)(g.U9,null))}var zr=r(179);function Br(){const{isCreating:e,setCreating:t,isSaving:r,setSaving:a,isQuerying:l,createBan:s,afterSave:o,query:c,selected:u,onSelect:d}=(0,zr.useBanHosts)("firewall"),g=(0,C.useInstanceId)(Br,"itsec-banned-ips-form-");return(0,n.createElement)(m.FlexBlock,null,(0,n.createElement)(p.Tg,null,(0,n.createElement)(p.mr,{title:(0,i.__)("Banned IPs","it-l10n-ithemes-security-pro"),description:(0,i.__)("Add, remove and edit banned IPs.","it-l10n-ithemes-security-pro"),fullWidth:!0,hasBorder:!0}),!e&&(0,n.createElement)(React.Fragment,null,(0,n.createElement)(zr.List,{selected:!e&&u,onSelect:d,querying:l,query:c,queryId:"firewall",className:"itsec-banned-ips-data"})),e&&(0,n.createElement)(zr.AddNew,{id:g,createForm:e,save:s,setSaving:a,afterSave:o}),(0,n.createElement)(zr.BanHostsActions,{isCreating:e,isSaving:r,setCreating:t,formId:g})))}const Ur=(0,s.Z)("form",{target:"eqhicwv1"})({name:"1fo50kt",styles:"margin-top:1.5rem"}),Kr=(0,s.Z)("div",{target:"eqhicwv0"})({name:"sbzvkn",styles:"display:flex;align-items:center;justify-content:end;gap:1.5rem;padding:1rem 2rem"}),Hr=["automatic_temp_auth","lockout_white_list"];function jr(){const{module:e,config:t}=(0,h.useSelect)((e=>({module:e(f.MODULES_STORE_NAME).getModule("global"),config:e(f.MODULES_STORE_NAME).getEditedModule("global")})),[]),{saveSettings:r}=(0,h.useDispatch)(f.MODULES_STORE_NAME),a=(0,n.useCallback)(((e,t)=>Hr.includes(t)),[]),l=(0,C.useInstanceId)(jr,"itsec-ip-management-authorize-ips"),{schema:s,uiSchema:o,formData:c,setFormData:u}=(0,Nt.useSettingsForm)(e,a);return t?(0,n.createElement)(m.FlexBlock,null,(0,n.createElement)(p.Tg,null,(0,n.createElement)(p.mr,{title:(0,i.__)("Authorized IPs","it-l10n-ithemes-security-pro"),description:(0,i.__)("Add or remove authorized IPs.","it-l10n-ithemes-security-pro"),fullWidth:!0,hasBorder:!0}),(0,n.createElement)(Ur,{onSubmit:e=>{e.preventDefault(),r(t.id,!0)},id:l},(0,n.createElement)(Nt.ModuleFormInputs,{module:e,schema:s,uiSchema:o,formData:c,setFormData:u}),(0,n.createElement)(qr,{moduleId:e.id,form:l})))):null}function qr({moduleId:e,form:t}){const{isSaving:r,isDirty:a}=(0,h.useSelect)((t=>({isDirty:t(f.MODULES_STORE_NAME).getDirtySettings(),isSaving:t(f.MODULES_STORE_NAME).isSavingSettings(e)})),[e]),{resetSettingEdits:l}=(0,h.useDispatch)(f.MODULES_STORE_NAME);return(0,n.createElement)(Kr,null,(0,n.createElement)(p.zx,{text:(0,i.__)("Undo Changes","it-l10n-ithemes-security-pro"),variant:"secondary",onClick:()=>l(e),disabled:r||!a}),(0,n.createElement)(p.zx,{type:"submit",form:t,text:(0,i.__)("Save","it-l10n-ithemes-security-pro"),variant:"primary",isBusy:r,disabled:r||!a}))}var Wr=r(70835);const Vr=(0,s.Z)("div",{target:"euitk5y5"})({name:"1sxflrz",styles:"padding:1rem;max-width:400px"}),Qr=(0,s.Z)(p.Tg,{target:"euitk5y4"})({name:"13ku56z",styles:"display:flex;flex-direction:column;height:100%"}),Gr=(0,s.Z)("div",{target:"euitk5y3"})({name:"2yaztx",styles:"text-align:center;display:flex;gap:1.25rem;flex-direction:column;align-items:center;flex-grow:1;height:100%;justify-content:center;padding:1rem"}),Yr=(0,s.Z)("section",{target:"euitk5y2"})({name:"rrldme",styles:"max-width:70ch;display:flex;flex-direction:column;gap:0.5rem"}),Xr=(0,s.Z)("div",{target:"euitk5y1"})({name:"o0x664",styles:"padding-bottom:2rem"}),$r=(0,s.Z)(p.Oy,{target:"euitk5y0"})({name:"1bwon5h",styles:"padding:1rem!important;margin-top:1rem"});function Jr(){return(0,n.createElement)(Qr,null,(0,n.createElement)(Gr,null,(0,n.createElement)(Yr,null,(0,n.createElement)(p.X6,{level:4,size:p.yH.NORMAL,weight:p.fs.HEAVY,text:(0,i.__)("All Clear!","it-l10n-ithemes-security-pro"),align:"center"}),(0,n.createElement)(p.xv,{as:"p",text:(0,i.__)("No users are currently locked out of your site.","it-l10n-ithemes-security-pro"),align:"center"})),(0,n.createElement)(g.nU,{icon:(0,n.createElement)(Y.Qs,null),isSmall:!0})))}function en({searchTerm:e,setSearchTerm:t,isQuerying:r}){return(0,n.createElement)(Vr,null,(0,n.createElement)(p.lD,{placeholder:(0,i.__)("Search Lockouts","it-l10n-ithemes-security-pro"),value:e,onChange:e=>{t(e)},isSearching:r,size:"small"}))}function tn(e){return(0,n.createElement)(Qr,null,(0,n.createElement)(Gr,null,(0,n.createElement)(Yr,null,(0,n.createElement)(p.X6,{level:4,size:p.yH.NORMAL,weight:p.fs.HEAVY,text:(0,i.__)("Unexpected Error","it-l10n-ithemes-security-pro"),align:"center"}),(0,n.createElement)(p.xv,{as:"p",text:(0,i.__)("An error occurred while rendering the list of lockouts.","it-l10n-ithemes-security-pro"),align:"center"}),(0,n.createElement)(p.xv,{as:"p",text:(0,i.__)("Try refreshing you browser. If the error persists, please contact support.","it-l10n-ithemes-security-pro"),align:"center"}),(0,n.createElement)(p.xv,{as:"p",text:e.text,align:"center"})),(0,n.createElement)(g.nU,{icon:(0,n.createElement)(Y.mG,null),isSmall:!0})))}function rn(){const{selectedId:e,searchTerm:t,setSearchTerm:r,banningIds:a,releasingIds:l,lockouts:s,getLockoutsError:o,isQuerying:c,select:u,getDetails:d,onBan:g,onRelease:E}=function(){const[e,t]=(0,n.useState)(0),[r,a]=(0,n.useState)(""),[l,s]=function(e){const[t,r]=(0,n.useState)([]),{createNotice:a,removeNotice:l}=(0,h.useDispatch)("core/notices");return[t,(0,n.useCallback)((async()=>{const t="/ithemes-security/v1/lockouts/"+e+"/ban-lockout",n=`ban-lockout-${e}`;r((t=>[...t,e])),l(n,"ithemes-security");try{return await Oe()({banUrl:t,method:"POST"}),setTimeout((()=>l(n,"ithemes-security")),5e3),a("success",(0,i.__)("Ban Created","it-l10n-ithemes-security-pro"),{id:n,context:"ithemes-security"}),!0}catch(e){return a("error",(0,i.sprintf)((0,i.__)("Error when banning lockout: %s","it-l10n-ithemes-security-pro"),e.message||(0,i.__)("An unexpected error occurred.","it-l10n-ithemes-security-pro")),{id:n,context:"ithemes-security"}),!1}finally{r((t=>t.filter((t=>t!==e))))}}),[a,l,e])]}(e),[o,c]=function(e){const[t,r]=(0,n.useState)([]),{createNotice:a,removeNotice:l}=(0,h.useDispatch)("core/notices");return[t,(0,n.useCallback)((async()=>{const t="/ithemes-security/v1/lockouts/"+e+"/release-lockout",n=`release-lockout-${e}`;r((t=>[...t,e])),l(n,"ithemes-security");try{return await Oe()({path:t,method:"POST"}),setTimeout((()=>l(n,"ithemes-security")),5e3),a("success",(0,i.__)("Lockout Released","it-l10n-ithemes-security-pro"),{id:n,context:"ithemes-security"}),!0}catch(e){return a("error",(0,i.sprintf)((0,i.__)("Error when releasing lockout: %s","it-l10n-ithemes-security-pro"),e.message||(0,i.__)("An unexpected error occurred.","it-l10n-ithemes-security-pro")),{id:n,context:"ithemes-security"}),!1}finally{r((t=>t.filter((t=>t!==e))))}}),[a,l,e])]}(e),{getLockouts:u,isQuerying:m,value:d,error:p}=function(e){const t=(0,n.useMemo)((()=>({search:e})),[e]),r=(0,n.useCallback)((async()=>{try{return await Oe()({path:(0,Ne.addQueryArgs)("/ithemes-security/v1/lockouts",t)})}catch(e){return!1}}),[t]),{execute:a,status:l,value:i,error:s}=(0,V.r5)(r);return{getLockouts:a,status:l,value:i,error:s}}(r),g=(0,n.useCallback)((e=>{if(!e._links.self[0].href)return Promise.reject(new Error("No data available."));const t=(0,Ne.addQueryArgs)(e._links.self[0].href,{context:"edit"});return Oe()({url:t}).then((e=>e.detail))}),[]);return{selectedId:e,searchTerm:r,setSearchTerm:a,banningIds:l,releasingIds:o,lockouts:d,getLockoutsError:p,isQuerying:m,select:e=>t(e),getDetails:g,onBan:async n=>{n.preventDefault(),await s(e)&&(t((t=>t===e?0:t)),u(r))},onRelease:async n=>{n.preventDefault(),await c(e)&&(t((t=>t===e?0:t)),u(r))}}}(),{banUsersActive:y}=(0,h.useSelect)((e=>({banUsersActive:e(f.modulesStore).isActive("ban-users")})),[]),v=(0,N.find)(s,["id",e]),_=v?.bannable&&y,x=v?.active;return(0,n.createElement)(m.FlexBlock,null,(0,n.createElement)(p.Tg,null,(0,n.createElement)(p.mr,{title:(0,i.__)("Active Lockouts","it-l10n-ithemes-security-pro"),description:(0,i.__)("View, ban, or release lockout out users and IP addresses.","it-l10n-ithemes-security-pro"),fullWidth:!0,hasBorder:!0}),(0,n.createElement)(m.FlexBlock,null,(0,n.createElement)(m.Flex,null,(0,n.createElement)($r,{isSinglePane:!0,onSelect:u,selectedId:v?.id||0}))),!v?.id&&(0,n.createElement)(en,{searchTerm:t,setSearchTerm:r,isQuerying:c}),!(0,N.isEmpty)(o)&&(0,n.createElement)(tn,{error:o}),(0,N.isEmpty)(s)?(0,n.createElement)(Jr,null):(0,n.createElement)(Xr,null,(0,n.createElement)(Wr.List,{lockouts:s,select:u,selectedLockout:v,fetchLockoutDetails:d})),v?.id>0&&(x||_)&&(0,n.createElement)(Wr.ActiveLockoutActions,{isReleaseAvailable:x,selectedId:v,releasingIds:l,banningIds:a,onRelease:E,onBan:g})))}const nn=(0,s.Z)("header",{target:"e1d931rk1"})({name:"1smerdt",styles:"padding:1rem 0"});function an(){const{banUsersActive:e}=(0,h.useSelect)((e=>({banUsersActive:e(f.modulesStore).isActive("ban-users")})),[]);return(0,n.createElement)(O,null,(0,n.createElement)(nn,null,(0,n.createElement)(p.X6,{level:1,weight:p.fs.NORMAL,text:(0,i.__)("IP Management","it-l10n-ithemes-security-pro")}),(0,n.createElement)(p.xv,{text:(0,i.__)("Your one-stop for all things IP management. Ban troublesome IPs from wreaking havoc, ensure everyone who needs access to your site has it by authorizing IPs and manage temporarily locked out users.","it-l10n-ithemes-security-pro")})),(0,n.createElement)(m.Flex,{gap:5,align:"start"},(0,n.createElement)(p.Rx,{orientation:"vertical"},e&&(0,n.createElement)(q.OL,{key:"ban-users",to:"/ip-management/ban-users",component:(0,V.Sj)(p.Ig)},(0,i.__)("Banned IPs","it-l10n-ithemes-security-pro")),(0,n.createElement)(q.OL,{key:"active-lockouts",to:"/ip-management/active-lockouts",component:(0,V.Sj)(p.Ig)},(0,i.__)("Active Lockouts","it-l10n-ithemes-security-pro")),(0,n.createElement)(q.OL,{key:"global",to:"/ip-management/authorize-ips",component:(0,V.Sj)(p.Ig)},(0,i.__)("Authorized IPs","it-l10n-ithemes-security-pro"))),e&&(0,n.createElement)(o.AW,{path:"/ip-management/ban-users",component:Br}),(0,n.createElement)(o.AW,{path:"/ip-management/active-lockouts",component:rn}),(0,n.createElement)(o.AW,{path:"/ip-management/authorize-ips",component:jr})))}const ln=(0,s.Z)(p.Tg,{target:"e1yyl6z60"})({name:"1fttcpj",styles:"display:flex;flex-direction:column"});function sn({history:e}){return(0,n.createElement)(u.a,{theme:p.U1},(0,n.createElement)(o.F0,{history:e},(0,n.createElement)(c.Fz,{ReactRouterRoute:o.AW},(0,n.createElement)(ln,{className:"itsec-firewall",variant:p.h1.UNDER_PAGE},(0,n.createElement)(m.SlotFillProvider,null,(0,n.createElement)(d.PluginArea,null),(0,n.createElement)(m.Popover.Slot,null),(0,n.createElement)(g.Qf,null),(0,n.createElement)(o.rs,null,(0,n.createElement)(o.AW,{path:"/logs",component:Ut}),(0,n.createElement)(o.AW,{path:"/rules/new",component:Yt}),(0,n.createElement)(o.AW,{path:"/rules/:id",component:Wt}),(0,n.createElement)(o.AW,{path:"/rules",component:Ht}),(0,n.createElement)(o.AW,{path:"/configure/:tab",component:Gt}),(0,n.createElement)(o.AW,{path:"/configure",component:Gt},(0,n.createElement)(o.l_,{to:"/configure/global"})),(0,n.createElement)(o.AW,{path:"/ip-management/:tab",component:an}),(0,n.createElement)(o.AW,{path:"/ip-management",component:an},(0,n.createElement)(o.l_,{to:"/ip-management/ban-users"})),(0,n.createElement)(o.AW,{path:"/automated",component:Rr}),(0,n.createElement)(o.AW,{path:"/"},(0,n.createElement)(o.l_,{to:"/logs"}))))))))}var on=r(79612);r.p=window.itsecWebpackPublicPath,(0,i.setLocaleData)({"":{}},"ithemes-security-pro");const cn=(0,on.f)(document.location,{page:"itsec-firewall"});l()((()=>(0,n.render)((0,n.createElement)(sn,{history:cn}),document.getElementById("itsec-firewall-root"))))},79612:(e,t,r)=>{"use strict";r.d(t,{f:()=>i});var n=r(90071),a=r(17563),l=r(92819);function i(e,t){const r=(0,n.lX)(),i=r=>{const l="string"==typeof r?(0,n.cP)(r):r,i=(0,a.parse)(l.search?.substring(1))||{};return{...l,pathname:e.pathname,search:"?"+(0,a.stringify)({...i,path:l.pathname,...t})}};return{get length(){return r.length},get action(){return r.action},get location(){const e=(0,a.parse)(r.location.search.substring(1)),n=e.path||"/";return{...r.location,pathname:n,search:"?"+(0,a.stringify)((0,l.omit)(e,["path",Object.keys(t)]))}},createHref:e=>r.createHref(i(e)),push:(e,t)=>{r.push(i(e),t)},replace:(e,t)=>{r.replace(i(e),t)},go:(...e)=>r.go.apply(r,e),goBack:(...e)=>r.goBack.apply(r,e),goForward:(...e)=>r.goForward.apply(r,e),block:(...e)=>r.block.apply(r,e),listen(e){return r.listen((()=>{e(this.location,this.action)}))}}}},65813:(e,t,r)=>{"use strict";r.d(t,{r5:()=>f,OR:()=>E,Zk:()=>v,_:()=>_,qq:()=>x,$X:()=>b,eH:()=>h,gU:()=>o,nP:()=>c,Sj:()=>p,lo:()=>d,vl:()=>i,of:()=>m});var n=r(87462),a=r(6293),l=r(9576);function i(e){return(0,l.createHigherOrderComponent)((t=>class extends a.Component{render(){return(0,a.createElement)(t,(0,n.Z)({},this.props,e))}}),"withProps")}var s=r(92819);function o(e,t,r={}){return(0,l.createHigherOrderComponent)((n=>class extends a.Component{constructor(){super(...arguments),this.debouncedPropInvoke=(0,s.debounce)(((...t)=>this.props[e](...t)),"function"==typeof t?t(this.props):t,r),this.handler=(e,...t)=>(e&&"function"==typeof e.persist&&e.persist(),this.debouncedPropInvoke(e,...t))}componentWillUnmount(){this.debouncedPropInvoke.cancel()}render(){const t={...this.props,[e]:this.handler};return(0,a.createElement)(n,t)}}),"withDebounceHandler")}function c(e,t){let r;return r=(0,s.isFunction)(t)?[{delay:e,cb:t}]:e,(0,l.createHigherOrderComponent)((e=>class extends a.Component{constructor(){super(...arguments),this.intervalIds=[]}componentDidMount(){for(const e of r)(t=>{this.intervalIds.push(setInterval((()=>t(this.props)),e.delay))})(e.cb)}componentWillUnmount(){this.intervalIds.forEach(clearInterval)}render(){return(0,a.createElement)(e,this.props)}}),"withInterval")}var u=r(4942);const m=(0,l.createHigherOrderComponent)((e=>{var t;return t=class extends a.Component{constructor(...e){super(...e),(0,u.Z)(this,"state",{width:1280}),(0,u.Z)(this,"mounted",!1),(0,u.Z)(this,"ref",null),(0,u.Z)(this,"onWindowResize",(()=>{if(!this.mounted)return;const e=(0,a.findDOMNode)(this);if(e instanceof window.HTMLElement){const t=e.offsetWidth;this.setState({width:t})}}))}componentDidMount(){this.mounted=!0,window.addEventListener("resize",this.onWindowResize),document.getElementById("collapse-button").addEventListener("click",this.onWindowResize),this.onWindowResize()}componentWillUnmount(){this.mounted=!1,window.removeEventListener("resize",this.onWindowResize),document.getElementById("collapse-button").removeEventListener("click",this.onWindowResize)}render(){const{measureBeforeMount:t,...r}=this.props;return t&&!this.mounted?(0,a.createElement)("div",{className:this.props.className,style:this.props.style}):(0,a.createElement)(e,(0,n.Z)({},r,{width:this.state.width+20}))}},(0,u.Z)(t,"defaultProps",{measureBeforeMount:!1}),t}),"withWidth"),d=(0,l.createHigherOrderComponent)((e=>class extends a.Component{constructor(){super(...arguments),(0,u.Z)(this,"state",{pressed:{shift:!1,ctrl:!1,meta:!1,alt:!1}}),(0,u.Z)(this,"mounted",!1),this.listener=this.listener.bind(this),this.onBlur=this.onBlur.bind(this)}componentDidMount(){this.mounted=!0,window.addEventListener("keydown",this.listener),window.addEventListener("keyup",this.listener),window.addEventListener("click",this.listener),window.addEventListener("blur",this.onBlur)}componentWillUnmount(){this.mounted=!1,window.removeEventListener("keydown",this.listener),window.removeEventListener("keyup",this.listener),window.removeEventListener("click",this.listener),window.removeEventListener("blur",this.onBlur)}listener(e){this.mounted&&this.setState({pressed:{shift:e.shiftKey,ctrl:e.ctrlKey,meta:e.metaKey,alt:e.altKey}})}onBlur(){this.setState({pressed:{shift:!1,ctrl:!1,meta:!1,alt:!1}})}render(){return(0,a.createElement)(e,(0,n.Z)({pressedModifierKeys:this.state.pressed},this.props))}}),"withPressedModifierKeys"),p=(0,l.createHigherOrderComponent)((e=>function({navigate:t,...r}){return(0,a.createElement)(e,(0,n.Z)({},r,{onClick:e=>{try{r.onClick&&r.onClick(e)}catch(t){throw e.preventDefault(),t}e.defaultPrevented||0!==e.button||r.target&&"_self"!==r.target||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)||(e.preventDefault(),t())}}))}),"withNavigate"),g=new WeakMap;function h(e,t){(0,a.useLayoutEffect)((()=>{g.has(e)||(t(),g.set(e,!0))}),[])}function f(e,t=!0){const[r,n]=(0,a.useState)("idle"),[l,i]=(0,a.useState)(null),[s,o]=(0,a.useState)(null),c=(0,a.useCallback)(((...t)=>(n("pending"),o(null),e(...t).then((e=>{i(e),n("success")})).catch((e=>{o(e),i(null),n("error")})))),[e]);return(0,a.useEffect)((()=>{t&&c()}),[c,t]),{execute:c,status:r,value:l,error:s}}function E(e,t,r=window){const n=(0,a.useRef)();(0,a.useEffect)((()=>{n.current=t}),[t]),(0,a.useEffect)((()=>{if(!r||!r.addEventListener)return;const t=e=>n.current(e);return r.addEventListener(e,t),()=>r.removeEventListener(e,t)}),[e,r])}const y=["button","submit"];function v(e){const t=(0,a.useRef)(e);(0,a.useEffect)((()=>{t.current=e}),[e]);const r=(0,a.useRef)(!1),n=(0,a.useRef)(),l=(0,a.useCallback)((()=>{clearTimeout(n.current)}),[]);(0,a.useEffect)((()=>()=>l()),[]),(0,a.useEffect)((()=>{e||l()}),[e,l]);const i=(0,a.useCallback)((e=>{const{type:t,target:n}=e;(0,s.includes)(["mouseup","touchend"],t)?r.current=!1:function(e){if(!(e instanceof window.HTMLElement))return!1;switch(e.nodeName){case"A":case"BUTTON":return!0;case"INPUT":return(0,s.includes)(y,e.type)}return!1}(n)&&(r.current=!0)}),[]),o=(0,a.useCallback)((e=>{e.persist(),r.current||(n.current=setTimeout((()=>{document.hasFocus()?"function"==typeof t.current&&t.current(e):e.preventDefault()}),0))}),[]);return{onFocus:l,onMouseDown:i,onMouseUp:i,onTouchStart:i,onTouchEnd:i,onBlur:o}}function _(e,t){const[r,n]=(0,a.useState)((()=>{try{const r=window.localStorage.getItem(e);return r?JSON.parse(r):t}catch(e){return console.error(e),t}}));return[r,t=>{try{const a=t instanceof Function?t(r):t;n(a),window.localStorage.setItem(e,JSON.stringify(a))}catch(e){console.error(e)}}]}function x(e){const t=(0,a.useRef)(null),r=(0,a.useRef)(!1),n=(0,a.useRef)(e),l=(0,a.useRef)(e);return l.current=e,(0,a.useLayoutEffect)((()=>{e.forEach(((e,a)=>{const l=n.current[a];"function"==typeof e&&e!==l&&!1===r.current&&(l(null),e(t.current))})),n.current=e}),e),(0,a.useLayoutEffect)((()=>{r.current=!1})),(0,a.useCallback)((e=>{t.current=e,r.current=!0,(e?l.current:n.current).forEach((t=>{"function"==typeof t?t(e):t&&t.hasOwnProperty("current")&&(t.current=e)}))}),[])}function b(e=[]){const[t,r]=(0,a.useState)(e);return[t,(0,a.useCallback)((e=>r((t=>[...t,e]))),[]),(0,a.useCallback)((e=>r((t=>t.filter((t=>t!==e))))),[]),r]}r(48015),r(31600)},31511:(e,t,r)=>{"use strict";r.d(t,{sE:()=>I,x4:()=>E,PN:()=>h,pL:()=>S,NC:()=>w,N4:()=>k,g4:()=>D,bK:()=>M,Rg:()=>A,CO:()=>Z,AW:()=>N,SU:()=>O,k0:()=>b,ZE:()=>x,UC:()=>R,xJ:()=>L,YS:()=>C,z8:()=>_,VG:()=>P,Y3:()=>T,bv:()=>v});var n=r(92819),a=r(65096),l=r.n(a),i=r(6293),s=r(73470),o=r(95122),c=r(4942),u=r(13092),m=r(86033);function d(e,t,r){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,r)}var p=new WeakMap,g=new WeakMap;class h{constructor(e=void 0,t=void 0,r=void 0){d(this,p,{writable:!0,value:{}}),d(this,g,{writable:!0,value:{}}),(0,c.Z)(this,"add",((e,t,r)=>((0,m.Z)(this,p)[e]||((0,m.Z)(this,p)[e]=[]),(0,m.Z)(this,p)[e].push(t),r&&((0,m.Z)(this,g)[e]||((0,m.Z)(this,g)[e]=[]),(0,m.Z)(this,g)[e].push(r)),this))),(0,c.Z)(this,"hasErrors",(()=>this.getErrorCodes().length>0)),(0,c.Z)(this,"getErrorCodes",(()=>Object.keys((0,m.Z)(this,p)))),(0,c.Z)(this,"getErrorCode",(()=>this.getErrorCodes()[0])),(0,c.Z)(this,"getErrorMessages",((e=void 0)=>{if(e)return(0,m.Z)(this,p)[e];const t=[];for(const e in(0,m.Z)(this,p))(0,m.Z)(this,p).hasOwnProperty(e)&&t.concat((0,m.Z)(this,p)[e]);return t})),(0,c.Z)(this,"getErrorMessage",((e=void 0)=>(e=e||this.getErrorCode(),this.getErrorMessages(e)[0]))),(0,c.Z)(this,"getErrorData",((e=void 0)=>(e=e||this.getErrorCode(),(0,m.Z)(this,g)[e]))),(0,c.Z)(this,"getAllErrorMessages",(()=>{const e=[];for(const t in(0,m.Z)(this,p))(0,m.Z)(this,p).hasOwnProperty(t)&&e.push(...(0,m.Z)(this,p)[t]);return e})),e&&(t&&((0,m.Z)(this,p)[e]=[t]),r&&((0,m.Z)(this,g)[e]=r))}static fromPHPObject(e){const t=new h;return(0,u.Z)(t,p,e.errors),(0,u.Z)(t,g,e.error_data),t}static fromApiError(e){const t=new h;if((0,m.Z)(t,p)[e.code]=[e.message],(0,m.Z)(t,g)[e.code]=[e.data],e.additional_errors)for(const r of e.additional_errors)(0,m.Z)(t,p)[r.code]=[r.message],r.data&&((0,m.Z)(t,g)||(0,u.Z)(t,g,[]),(0,m.Z)(t,g)[r.code].push(r.data));return t}}class f extends Error{constructor(e,...t){super(e.message||(0,o.__)("An unknown error occurred.","it-l10n-ithemes-security-pro"),...t),Error.captureStackTrace&&Error.captureStackTrace(this,f),this.__response=e;for(const t in e)e.hasOwnProperty(t)&&Object.defineProperty(this,t,{value:e[t],configurable:!0,enumerable:!0,writable:!0})}toString(){return this.__response.toString()}getResponse(){return this.__response}}class E{constructor(e,t,r,n=[],a=[],l=[]){(0,c.Z)(this,"type",void 0),(0,c.Z)(this,"error",void 0),(0,c.Z)(this,"data",void 0),(0,c.Z)(this,"success",void 0),(0,c.Z)(this,"info",void 0),(0,c.Z)(this,"warning",void 0),this.type=e,this.error=t,this.data=r,this.success=n,this.info=a,this.warning=l,Object.seal(this)}isSuccess(){return this.type===E.SUCCESS}static async fromResponse(e){const t=t=>{const r=e.headers?.get(`X-Messages-${t}`);return r?JSON.parse(r):[]},r=204!==e.status&&e.json?await e.json():null,n=w(r),a=n.hasErrors()?E.ERROR:E.SUCCESS,l=t("Success"),i=t("Info"),s=t("Warning");return new E(a,n,r,l,i,s)}}Object.defineProperty(E,"SUCCESS",{value:"success",writable:!1,enumerable:!1,configurable:!1}),Object.defineProperty(E,"ERROR",{value:"error",writable:!1,enumerable:!1,configurable:!1});const y=(0,i.createContext)({getUrl(e,t){e="settings"===e?"itsec":"itsec-"+e;const r=(0,s.removeQueryArgs)(document.location.href,...Object.keys((0,s.getQueryArgs)(document.location.href)));return(0,s.addQueryArgs)(r,t?{page:e,path:t}:{page:e})}});function v(e,t){const{getUrl:r}=(0,i.useContext)(y);return r(e,t)}function _(e){if(e<=999)return e.toString();if(e<=9999){const t=(e/1e3).toFixed(1);return"0"===t.charAt(t.length-1)?t.replace(".0","k"):`${t}k`}if(e<=99999)return e.toString().substring(0,2)+"k";if(e<=999999)return e.toString().substring(0,3)+"k";if(e<=9999999){const t=(e/1e6).toFixed(1);return"0"===t.charAt(t.length-1)?t.replace(".0","m"):`${t}m`}if(e<=99999999)return e.toString().substring(0,2)+"m";if(e<=999999999)return e.toString().substring(0,3)+"m";if(e<=9999999999){const t=(e/1e9).toFixed(1);return"0"===t.charAt(t.length-1)?t.replace(".0","b"):`${t}b`}return e}function x(e){if(!(0,n.isPlainObject)(e))return!1;const t=Object.keys(e);return 2===t.length&&t.includes("errors")&&t.includes("error_data")}function b(e){if(!(0,n.isPlainObject)(e))return!1;const t=Object.keys(e);return(3===t.length||4===t.length)&&!(4===t.length&&!t.includes("additional_errors"))&&t.includes("code")&&t.includes("message")&&t.includes("data")}function w(e){return e instanceof h?e:x(e)?h.fromPHPObject(e):b(e)?h.fromApiError(e):new h}function k(e){const t={};for(const[r,n]of e)t[r]=n;return t}function S(e,t){const r=[[],[]];for(const n of e)r[t(n)?0:1].push(n);return r}function L(e){if(e instanceof Error)throw e;throw new f(e)}const I="https://secure.gravatar.com/avatar/d7a973c7dab26985da5f961be7b74480?s=96&d=mm&f=y&r=g";function O(e,t,r=!0){return(0,n.get)(e,["_links","self",0,"targetHints",t],r?void 0:[])}function N(e){return A(e,"self")}function C(e){const t=e.indexOf("/ithemes-security/");if(-1!==t)return e.substring(t)}function A(e,t){return(0,n.get)(e,["_links",t,0,"href"])}function Z(e,t){if(e&&e.links)for(const r of e.links)if(r.rel===t)return r}function R(e,t){if("object"!==e.type)return e;let r;for(const a in t)t.hasOwnProperty(a)&&"hidden"===t[a]["ui:widget"]&&(r||(r=(0,n.cloneDeep)(e)),delete r.properties[a]);return r||e}function T(e){let t=[];if(!e)return t;const r=e instanceof h?e:w((0,n.pick)(e,["code","message","data"]));return"rest_invalid_param"===r.getErrorCode()&&(t=Object.values(r.getErrorData().params)),[...r.getAllErrorMessages(),...t]}function P(e){const t=new Date;if(e>t)return(0,o.__)("Online Recently","it-l10n-ithemes-security-pro");const r=Math.floor((t-e)/1e3);let n=r/31536e3;return n>1?(0,o.sprintf)((0,o.__)("%s years","it-l10n-ithemes-security-pro"),Math.floor(n)):(n=r/2592e3,n>1?(0,o.sprintf)((0,o.__)("%s months","it-l10n-ithemes-security-pro"),Math.floor(n)):(n=r/86400,n>1?(0,o.sprintf)((0,o.__)("%s days","it-l10n-ithemes-security-pro"),Math.floor(n)):(n=r/3600,n>1?(0,o.sprintf)((0,o.__)("%s hours","it-l10n-ithemes-security-pro"),Math.floor(n)):(n=r/60,n>1?(0,o.sprintf)((0,o.__)("%s minutes","it-l10n-ithemes-security-pro"),Math.floor(n)):(0,o.sprintf)((0,o.__)("%s seconds","it-l10n-ithemes-security-pro"),Math.floor(n))))))}function D(){return D.instance||(D.instance=new(l())({schemaId:"id"}),D.instance.addMetaSchema(r(27171)),D.instance.addFormat("html",{type:"string",validate:()=>!0}),D.instance.addFormat("relative-file-path",{type:"string",validate:e=>!e.includes("../")}),D.instance.addFormat("file-path",{type:"string",validate:e=>!!e.startsWith("/")&&!e.includes("../")}),D.instance.addFormat("directory",{type:"string",validate:e=>!!e.startsWith("/")&&!e.includes("../")})),D.instance}function M(e){if(!e)return"";const t=e.toUpperCase().split("").map((e=>127397+e.charCodeAt()));return String.fromCodePoint(...t)}},52278:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n=r(6293),a=r(14776);const l=(0,n.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(a.Path,{d:"M20 11.2H6.8l3.7-3.7-1-1L3.9 12l5.6 5.5 1-1-3.7-3.7H20z"}))},16282:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n=r(6293),a=r(14776);const l=(0,n.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(a.Path,{d:"m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z"}))},62462:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n=r(6293),a=r(14776);const l=(0,n.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(a.Path,{d:"M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z"}))},70835:e=>{e.exports=function(){return this.itsec.core["active-lockouts"]}()},179:e=>{e.exports=function(){return this.itsec.core["ban-hosts"]}()},31600:e=>{e.exports=function(){return this.itsec.packages.data}()},7980:e=>{e.exports=function(){return this.itsec.pages.settings}()},17622:e=>{e.exports=function(){return this.itsec.pages.vulnerabilities}()},62470:e=>{e.exports=function(){return this.itsec["user-groups"].ui}()},87514:e=>{e.exports=function(){return this.wp.apiFetch}()},64893:e=>{e.exports=function(){return this.wp.components}()},9576:e=>{e.exports=function(){return this.wp.compose}()},48015:e=>{e.exports=function(){return this.wp.data}()},82521:e=>{e.exports=function(){return this.wp.date}()},25993:e=>{e.exports=function(){return this.wp.domReady}()},6293:e=>{e.exports=function(){return this.wp.element}()},95122:e=>{e.exports=function(){return this.wp.i18n}()},81019:e=>{e.exports=function(){return this.wp.keycodes}()},25703:e=>{e.exports=function(){return this.wp.notices}()},3571:e=>{e.exports=function(){return this.wp.plugins}()},14776:e=>{e.exports=function(){return this.wp.primitives}()},73470:e=>{e.exports=function(){return this.wp.url}()},99196:e=>{"use strict";e.exports=window.React},91850:e=>{"use strict";e.exports=window.ReactDOM},92819:e=>{"use strict";e.exports=window.lodash},76292:e=>{"use strict";e.exports=window.moment}},e=>{e.O(0,[7271,4387,3173,5307,5257,6364,3828,4317,5811,976,7959],(()=>(15919,e(e.s=15919))));var t=e.O();((window.itsec=window.itsec||{}).pages=window.itsec.pages||{}).firewall=t}]);

Youez - 2016 - github.com/yon3zu
LinuXploit