File: /home/axxoncom/domains/draqee.com/public_html/wp-content/plugins/better-wp-security/dist/6878.js
"use strict";(globalThis.itsecWebpackJsonP=globalThis.itsecWebpackJsonP||[]).push([[6878],{6878:(e,t,r)=>{r.d(t,{i$:()=>xe,DW:()=>F,qJ:()=>B,n_:()=>ge,F5:()=>p,VS:()=>f,g8:()=>b,zf:()=>ee,gu:()=>oe,VK:()=>_,G9:()=>Z,bx:()=>je,oA:()=>ke,l6:()=>D,pe:()=>Q,PB:()=>G,Nr:()=>W,Fe:()=>we,UZ:()=>Ne});var n=r(51609),a=r(64827),o=r(66087),i=r(8601),l=r(85631),s=r.n(l),c=r(77172),d=r(39959),u=r(89897);const{useGlobalState:m}=(0,a.VB)({cache:{}});function p({id:e,value:t,disabled:r,readonly:a,onChange:l,label:h,description:g,isMultiple:f=!1,path:y,query:E={},labelAttr:b,idAttr:v="id",searchArg:x="search"}){const[w,I]=m("cache"),A=(0,u.useInstanceId)(p,"itsec-entity-select-control");e=e||A;const[k,N]=(0,i.useState)(""),C=function(e,t,r,n,a,l,d){return(0,i.useCallback)((i=>s()({path:(0,c.addQueryArgs)(e,{...t,[a]:i})}).then((e=>e.map((e=>({value:e[n],label:e[r]}))))).then((t=>(d({...l,[e]:{...l[e]||{},...(0,o.mapValues)((0,o.keyBy)(t,"value"),"label")}}),t)))),[e,t,r,n,a,l,d])}(y,E,b,v,x,w,I);let L;return f?L=(t||[]).filter((e=>void 0!==e)).map((e=>({value:e,label:w[y]?.[e]||e}))):t&&(L={value:t,label:w[y]?.[t]||t}),(0,n.createElement)(d.BaseControl,{className:"itsec-entity-select-control",label:h,help:g&&(0,n.createElement)(_,{noWrap:!0,content:g}),id:e,__nextHasNoMarginBottom:!0},(0,n.createElement)(F,{"aria-label":h,"aria-describedby":g?e+"__help":void 0,classNamePrefix:"itsec-entity-select-control-as",inputId:e,isDisabled:r||a,isMulti:f,isClearable:!0,cacheOptions:!0,defaultOptions:!0,loadOptions:C,value:L,onChange:e=>l(f?(e||[]).map((e=>e.value)):e?.value),inputValue:k,onInputChange:N}))}var h=r(88356),g=r(62932);function f({errors:e,apiError:t,schemaError:r,title:a,className:o,hasBorder:i}){const l=[...e||[],...(0,g.Mr)(t),...(r||[]).map((e=>e.stack))];return l.length?(0,n.createElement)(h.Mf,{messages:l,heading:a,className:o,hasBorder:i,type:"danger"}):null}var y=r(81923);const E=(0,y.A)("div",{target:"eq12dkg0"})({name:"1ff36h2",styles:"flex-grow:1"});function b(){return(0,n.createElement)(E,{"aria-hidden":!0})}var v=r(58168),x=r(15013),w=r(54625);function _({transform:e,...t}){return(0,n.createElement)(x.VK,(0,v.A)({},t,{transform:(r,a)=>{if(e){const t=e(r,a);if(void 0!==t)return t}if("a"===r.tagName.toLowerCase()&&r.dataset.itsecPath&&!t.noHtml)return(0,n.createElement)(w.N_,{to:r.dataset.itsecPath},a)}}))}var I=r(2359),A=r(79487),k=r(32196),N=r(3075);const C=(0,n.lazy)((()=>Promise.all([r.e(7853),r.e(6005)]).then(r.bind(r,46005)))),L=(0,n.lazy)((()=>Promise.all([r.e(7853),r.e(1541)]).then(r.bind(r,11541)))),O=(0,n.lazy)((()=>Promise.all([r.e(7853),r.e(3689)]).then(r.bind(r,23689))));function S(){return(0,n.createElement)("span",null,(0,N.__)("Error when loading. Please refresh.","better-wp-security"))}const M=(0,k.AH)({name:"1nml846",styles:"input{min-height:0;}input:focus{box-shadow:none;}"});function T(){const e=(0,A.u)();return(0,i.useCallback)((t=>({...t,colors:{...t.colors,primary:e.colors.primary.base,primary75:e.colors.secondary.base,primary50:e.colors.tertiary.base,primary25:e.colors.surface.secondary}})),[e])}function P(){return(0,i.useMemo)((()=>({control:(e,t)=>({...e,minHeight:36,borderColor:t.isFocused?e.borderColor:"rgb(148, 148, 148)",borderRadius:2}),dropdownIndicator:e=>({...e,padding:6}),clearIndicator:e=>({...e,padding:6}),loadingIndicator:e=>({...e,padding:6}),valueContainer:e=>({...e,paddingTop:0,paddingBottom:0}),input:e=>({...e,paddingTop:0,paddingBottom:0})})),[])}function D({addErrorBoundary:e=!0,className:t,...r}){const a=T(),o=P(),i=(0,n.createElement)(n.Suspense,{fallback:(0,n.createElement)(d.Spinner,null)},(0,n.createElement)(C,(0,v.A)({},r,{className:(0,k.cx)(t,M),theme:a,styles:o})));return e?(0,n.createElement)(I.ErrorBoundary,{FallbackComponent:S},i):i}function F({addErrorBoundary:e=!0,className:t,...r}){const a=T(),o=P(),i=(0,n.createElement)(n.Suspense,{fallback:(0,n.createElement)(d.Spinner,null)},(0,n.createElement)(L,(0,v.A)({},r,{className:(0,k.cx)(t,M),theme:a,styles:o})));return e?(0,n.createElement)(I.ErrorBoundary,{FallbackComponent:S},i):i}function B({addErrorBoundary:e=!0,className:t,...r}){const a=T(),o=P(),i=(0,n.createElement)(n.Suspense,{fallback:(0,n.createElement)(d.Spinner,null)},(0,n.createElement)(O,(0,v.A)({},r,{className:(0,k.cx)(t,M),theme:a,styles:o})));return e?(0,n.createElement)(I.ErrorBoundary,{FallbackComponent:S},i):i}var z=r(591),V=r(9542);const j=(0,y.A)(h.ui,{target:"ewfm7an3"})({name:"1x94tvs",styles:"display:flex;align-items:center;flex-shrink:0;padding:.5rem 1.5rem;min-height:calc(30px + 1rem);& .components-button:focus{box-shadow:none;}"}),$=(0,y.A)(d.Toolbar,{target:"ewfm7an2"})({name:"gxzf6f",styles:"border:none;max-width:100%;margin-left:auto"}),H=(0,y.A)("div",{target:"ewfm7an1"})({name:"hlx1h5",styles:"display:flex;gap:0.5rem;margin:0 2rem 0 1rem;flex-grow:1"}),Y=(0,y.A)(V.Ot,{target:"ewfm7an0"})({name:"1jxlbx4",styles:"height:2rem;width:2rem"});function R({area:e,...t}){return(0,n.createElement)(d.Slot,(0,v.A)({name:`Toolbar${e}`},t))}function G({area:e="actions",...t}){return(0,n.createElement)(d.Fill,(0,v.A)({name:`Toolbar${e}`},t))}function W(){const e=(0,g.aZ)("dashboard"),t=(0,u.useViewportMatch)("medium","<");return(0,n.createElement)(j,{role:"region","aria-label":(0,N.__)("Toolbar","better-wp-security")},t?(0,n.createElement)(Y,null):(0,n.createElement)(oe,null),(0,n.createElement)(R,{area:"main"},(e=>(0,n.createElement)(H,null,e))),(0,n.createElement)($,{label:(0,N.__)("Toolbar Actions","better-wp-security")},(0,n.createElement)(d.ToolbarButton,{icon:z.A,href:e,text:(0,N.__)("Dashboard","better-wp-security")}),(0,n.createElement)(R,{area:"actions"})))}const U=(0,y.A)("nav",{target:"edhe72i2"})("display:flex;border-bottom:1px solid ",(({theme:e})=>e.colors.border.normal),";"),J=(0,y.A)(w.k2,{target:"edhe72i1"})("display:flex;text-decoration:none;align-items:center;&.active{box-shadow:inset 0 -4px 0 0 ",(({theme:e})=>e.colors.border.info),";}&:focus{color:",(({theme:e})=>e.colors.text.dark),";box-shadow:inset 0 0 0 2px ",(({theme:e})=>e.colors.border.info),",inset 0 -4px 0 0 ",(({theme:e})=>e.colors.border.info),"!important;border-radius:3px!important;}"),q=(0,y.A)(h.EY,{target:"edhe72i0"})({name:"1i2l0vb",styles:"padding:.75rem 1.25rem"}),K=(0,i.createContext)({size:h.$C.LARGE});function Q({className:e,size:t=h.$C.LARGE,children:r}){const a=(0,i.useMemo)((()=>({size:t})),[t]);return(0,n.createElement)(U,{className:e},(0,n.createElement)(K.Provider,{value:a},r))}function Z({title:e,...t}){const{size:r}=(0,i.useContext)(K);return(0,n.createElement)(J,t,(0,n.createElement)(q,{size:r,weight:h.uL.HEAVY,text:e,align:"center"}))}const X=(0,y.A)(V.Ot,{shouldForwardProp:e=>"isSmall"!==e,target:"ec6rts80"})("height:",(({isSmall:e})=>e?"56px":"120px"),";width:",(({isSmall:e})=>e?"56px":"120px"),";");function ee({icon:e,isSmall:t=!1}){return(0,u.useMediaQuery)("(-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi)")?e:(0,n.createElement)(X,{isSmall:t})}var te=r(31987),re=r(46627);const ne=(0,y.A)(V.zr,{target:"es1l7u91"})("height:",(({size:e})=>e),"px;width:auto;max-width:100%;"),ae=(0,y.A)(V.Gi,{target:"es1l7u90"})("height:",(({size:e})=>e),"px;width:auto;max-width:100%;");function oe({size:e=25,className:t}){const{installType:r}=(0,te.useSelect)((e=>({installType:e(re.coreStore).getInstallType()})),[]);return"free"===r?(0,n.createElement)(ne,{size:e,className:t}):(0,n.createElement)(ae,{size:e,className:t})}var ie=r(98616),le=r.n(ie),se=r(76154),ce=r.n(se),de=r(1417),ue=r(89959);const me=(0,y.A)("div",{target:"e1pwp6dm1"})({name:"aj6rbz",styles:"display:flex;gap:0.5rem"}),pe=(0,y.A)(h.$n,{target:"e1pwp6dm0"})({name:"1o3nkn",styles:"margin-left:auto"}),he=le()((()=>[{value:"24-hours",label:(0,N.__)("24 Hours","better-wp-security")},{value:"week",label:(0,N.__)("7 Days","better-wp-security")},{value:"30-days",label:(0,N.__)("30 Days","better-wp-security")},{value:"custom",label:(0,N.__)("Custom","better-wp-security")}]));function ge({value:e,onChange:t}){const[r,a]=(0,i.useState)(!1),[l,s]=(0,i.useState)(void 0),[c,u]=(0,i.useState)(void 0);let[m,p]=(0,i.useState)(void 0);const g=e,f=function(e){if(!e)return"No dates chosen";const t=new window.Date;let r,n;switch(e){case"24-hours":return(0,N.__)("24 Hours","better-wp-security");case"30-days":r=(0,ue.dateI18n)("M j",t.setDate(t.getDate()-30)),n=(0,ue.dateI18n)("M j, Y");break;case"week":r=(0,ue.dateI18n)("M j",t.setDate(t.getDate()-7)),n=(0,ue.dateI18n)("M j, Y");break;default:r=(0,ue.dateI18n)("M j",e.start),n=(0,ue.dateI18n)("M j, Y",e.end)}return(0,N.sprintf)((0,N.__)("%1$s - %2$s","better-wp-security"),r,n)}(g);return m=m||((0,o.isString)(g)?g:"custom"),(0,n.createElement)("div",null,(0,n.createElement)(h.$n,{onClick:()=>a(!r),title:f,"aria-expanded":r,"aria-label":(0,N.sprintf)((0,N.__)("%s (click to edit)","better-wp-security"),f),variant:"tertiary",text:f,icon:de.A,iconPosition:"right"}),r&&(0,n.createElement)(d.Modal,{title:(0,N.__)("Change Date Period","better-wp-security"),onRequestClose:()=>a(!1)},(0,n.createElement)(d.SelectControl,{options:he(),value:m,onChange:e=>p(e)}),(0,n.createElement)(me,null,"custom"===m&&(0,n.createElement)(React.Fragment,null,(0,n.createElement)(d.Dropdown,{renderToggle:({isOpen:e,onToggle:t})=>(0,n.createElement)(h.$n,{variant:"secondary",onClick:t,"aria-expanded":e,"aria-label":(0,N.sprintf)((0,N.__)("From: %s (click to edit","better-wp-security"),(0,ue.dateI18n)("M j",l)),text:(0,N.sprintf)((0,N.__)("From %s","better-wp-security"),(0,ue.dateI18n)("M j",l))}),renderContent:()=>(0,n.createElement)(d.DatePicker,{currentDate:l,onChange:s,isInvalidDate:e=>{if((0,ue.isInTheFuture)(e))return!0;const t=new window.Date;return t.setDate(t.getDate()-60),e<t}})}),(0,n.createElement)(d.Dropdown,{renderToggle:({isOpen:e,onToggle:t})=>(0,n.createElement)(h.$n,{variant:"secondary",onClick:t,"aria-expanded":e,"aria-label":(0,N.sprintf)((0,N.__)("To: %s (click to edit","better-wp-security"),(0,ue.dateI18n)("M j",c)),text:(0,N.sprintf)((0,N.__)("To: %s (click to edit","better-wp-security"),(0,ue.dateI18n)("M j",c))}),renderContent:()=>(0,n.createElement)(d.DatePicker,{currentDate:c,onChange:u,isInvalidDate:e=>!!(0,ue.isInTheFuture)(e)||(0,ue.getDate)(l)>e})})),(0,n.createElement)(pe,{variant:"primary",onClick:e=>{let r;if(e.preventDefault(),"custom"===m){const e=ce()(l).set({hour:0,minute:0,second:0}),t=ce()(c).set({hour:23,minute:59,second:59});r={start:(0,ue.format)("Y-m-d\\TH:i:s",e),end:(0,ue.format)("Y-m-d\\TH:i:s",t)}}else r=m;t(r),a(!1)},text:(0,N.__)("Apply","better-wp-security")}))))}const fe=(0,y.A)(d.Icon,{target:"ebvjfo71"})({name:"1svyz14",styles:"background-color:#438C56;border-radius:2rem"}),ye=(0,y.A)(d.Icon,{target:"ebvjfo70"})({name:"x749hy",styles:"background-color:#E6505466;border-radius:2rem;height:0.813rem!important;width:0.813rem!important;padding:2px"});var Ee=r(28351),be=r(14707),ve=r(4818);function xe(){const{versionActive:e,versionSettings:t,installType:r}=(0,te.useSelect)((e=>({versionActive:e(re.modulesStore).isActive("version-management"),versionSettings:e(re.modulesStore).getSettings("version-management"),installType:e(re.coreStore).getInstallType()})),[]),a=e&&t.update_if_vulnerable,o="free"===r,i=a?(0,N.__)("Real-Time Updates Active","better-wp-security"):(0,N.__)("Real-Time Updates Inactive","better-wp-security"),l=o?(0,N.__)("Upgrade","better-wp-security"):(0,N.__)("Enable “Auto Update If Fixes Vulnerability” in Version Management","better-wp-security"),s=a?(0,n.createElement)(fe,{icon:Ee.A}):(0,n.createElement)(ye,{icon:be.A,style:{fill:"#8A2424"}});return(0,n.createElement)(h.Ex,{text:i,icon:s,iconColor:"#FFFFFF",tooltip:l})}function we(){const{hasPatchstack:e,installType:t}=(0,te.useSelect)((e=>({hasPatchstack:e(re.coreStore).hasPatchstack(),installType:e(re.coreStore).getInstallType()})),[]),r="free"===t,a=e?(0,N.__)("Virtual Patching Active","better-wp-security"):(0,N.__)("Virtual Patching Inactive","better-wp-security"),o=r?(0,N.__)("Upgrade","better-wp-security"):null,i=e?ve.A:(0,n.createElement)(ye,{icon:be.A,style:{fill:"#8A2424"}});return(0,n.createElement)(h.Ex,{text:a,icon:i,iconColor:"#6817C5",tooltip:o})}var _e=r(55933),Ie=r(16957);const Ae=(0,i.createContext)({preloaded:{}});function ke({preload:e,children:t}){const[r,a]=(0,i.useState)({preloaded:{}}),o=(0,i.useCallback)(((e,t)=>{a((r=>({...r,preloaded:{...r.preloaded,[e]:t}})))}),[a]);return(0,i.useEffect)((()=>{for(const t of e)r.preloaded.hasOwnProperty(t)||(o(t,void 0),fetch(Ce(t)).then((e=>e.arrayBuffer())).then((e=>o(t,e))).catch((e=>{console.error(`[Solid Security] Could not load rive graphic '${t}': ${e}`),o(t,null)})))}),[e,r.preloaded,o]),(0,n.createElement)(Ae.Provider,{value:r},t)}function Ne(e,t,r){const{preloaded:n}=(0,i.useContext)(Ae);return n[e]?t.buffer=n[e]:t.src=Ce(e),(0,Ie.useRive)(t,r)}function Ce(e){return`${itsecWebpackPublicPath}../core/img/rive/${e}.riv`}function Le(e){return(0,n.createElement)(_e.SVG,(0,v.A)({},e,{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"}),(0,n.createElement)(_e.Path,{d:"M9 10h6.125M9 13.556h3.5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}))}function Oe(e){return(0,n.createElement)(_e.SVG,(0,v.A)({},e,{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"}),(0,n.createElement)(_e.Path,{d:"M8 8h8.75M8 11.555h6.125M8 15.111h3.5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}))}function Se(e){return(0,n.createElement)(_e.SVG,(0,v.A)({},e,{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"}),(0,n.createElement)(_e.Path,{d:"M5 6h13M5 10h10M5 14h7m-7 4h4",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}))}function Me({priority:e,...t}){switch(e){case"low":return(0,n.createElement)(Le,t);case"medium":return(0,n.createElement)(Oe,t);case"high":return(0,n.createElement)(Se,t)}}const Te=(0,y.A)("span",{target:"e1e0u6nr2"})({name:"1fttcpj",styles:"display:flex;flex-direction:column"}),Pe=(0,y.A)("div",{target:"e1e0u6nr1"})("background-color:",(({priority:e})=>"low"===e&&"#e7e7e7"),";background-color:",(({priority:e})=>"medium"===e&&"#ffcb2f"),";background-color:",(({priority:e})=>"high"===e&&"#d63638"),";color:",(({priority:e})=>"low"===e&&"#232323"),";color:",(({priority:e})=>"medium"===e&&"#232323"),";color:",(({priority:e})=>"high"===e&&"#ffffff"),";display:flex;align-items:center;padding-right:0.5rem;&>svg{width:24px;height:24px;}"),De=(0,y.A)("div",{target:"e1e0u6nr0"})("background-color:",(({priority:e})=>"low"===e&&"#e7e7e7"),";background-color:",(({priority:e})=>"medium"===e&&"#fffbef"),";background-color:",(({priority:e})=>"high"===e&&"#fcf0f1"),";color:",(({priority:e})=>"low"===e&&"#232323"),";color:",(({priority:e})=>"medium"===e&&"#FFCB2F"),";color:",(({priority:e})=>"high"===e&&"#D63638"),";border:",(({priority:e})=>"medium"===e&&"1px solid #ffc518"),";border:",(({priority:e})=>"high"===e&&"1px solid #d63638"),";display:flex;align-items:center;justify-content:center;padding:1rem;width:100%;gap:1rem;&>svg{width:48px;height:48px;}");function Fe(e){switch(!0){case"low"===e:return(0,N.__)("Low","better-wp-security");case"medium"===e:return(0,N.__)("Medium","better-wp-security");default:return(0,N.__)("High","better-wp-security")}}function Be(e){switch(!0){case"low"===e:return(0,N.__)("Low priority","better-wp-security");case"medium"===e:return(0,N.__)("Medium priority","better-wp-security");default:return(0,N.__)("High priority","better-wp-security")}}function ze({priority:e}){return(0,n.createElement)(Pe,{priority:e},(0,n.createElement)(Me,{priority:e}),(0,n.createElement)(h.EY,{text:Fe(e),weight:"high"===e?h.uL.HEAVY:h.uL.NORMAL,variant:"high"===e?h.J3.WHITE:h.J3.NORMAL}))}function Ve({priority:e,description:t}){return(0,n.createElement)(De,{priority:e},(0,n.createElement)(Me,{priority:e}),(0,n.createElement)(Te,null,(0,n.createElement)(h.EY,{text:Be(e),weight:h.uL.HEAVY,size:h.$C.LARGE}),t&&(0,n.createElement)(h.EY,{text:t})))}function je({priority:e,isExpanded:t,description:r}){return t?(0,n.createElement)(Ve,{priority:e,description:r}):(0,n.createElement)(ze,{priority:e})}}}]);