Version Description
- Tweak: Require a Title when creating a new Dashboard.
- Bug Fix: Don't attempt to send a Site Scan notification for Clean scans preventing a fatal error after scheduled site scans.
Download this release
Release Info
Developer | TimothyBlynJacobs |
Plugin | iThemes Security (formerly Better WP Security) |
Version | 8.1.2 |
Comparing to | |
See all releases |
Code changes from version 8.1.1 to 8.1.2
- better-wp-security.php +1 -1
- core/modules/dashboard/entries/dashboard/components/create-dashboard/index.js +59 -50
- core/modules/dashboard/entries/dashboard/components/create-dashboard/style.scss +5 -1
- core/modules/site-scanner/api.php +9 -7
- core/modules/site-scanner/mail.php +4 -0
- core/package.json +5 -5
- core/packages/search/src/components/search/index.js +1 -1
- dist/dashboard/dashboard.css +1 -1
- dist/dashboard/dashboard.js +1 -1
- dist/manifest.php +9 -9
- history.txt +3 -0
- package.json +5 -5
- readme.txt +6 -2
better-wp-security.php
CHANGED
@@ -6,7 +6,7 @@
|
|
6 |
* Description: Take the guesswork out of WordPress security. iThemes Security offers 30+ ways to lock down WordPress in an easy-to-use WordPress security plugin.
|
7 |
* Author: iThemes
|
8 |
* Author URI: https://ithemes.com
|
9 |
-
* Version: 8.1.
|
10 |
* Text Domain: better-wp-security
|
11 |
* Network: True
|
12 |
* License: GPLv2
|
6 |
* Description: Take the guesswork out of WordPress security. iThemes Security offers 30+ ways to lock down WordPress in an easy-to-use WordPress security plugin.
|
7 |
* Author: iThemes
|
8 |
* Author URI: https://ithemes.com
|
9 |
+
* Version: 8.1.2
|
10 |
* Text Domain: better-wp-security
|
11 |
* Network: True
|
12 |
* License: GPLv2
|
core/modules/dashboard/entries/dashboard/components/create-dashboard/index.js
CHANGED
@@ -1,3 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
1 |
/**
|
2 |
* WordPress dependencies
|
3 |
*/
|
@@ -15,10 +20,9 @@ import ScratchLayout from './scratch-layout.svg';
|
|
15 |
import './style.scss';
|
16 |
|
17 |
export default function CreateDashboard() {
|
18 |
-
const instanceId = useInstanceId( CreateDashboard );
|
19 |
-
|
20 |
const [ defaultLabel, setDefaultLabel ] = useState( '' );
|
21 |
-
const [ scratchLabel,
|
|
|
22 |
|
23 |
const { canCreate, canCreateLoaded, addingScratch, addingDefault } = useSelect( ( select ) => ( {
|
24 |
canCreate: select( 'ithemes-security/dashboard' ).canCreateDashboards(),
|
@@ -52,7 +56,6 @@ export default function CreateDashboard() {
|
|
52 |
e.preventDefault();
|
53 |
|
54 |
const dashboard = {};
|
55 |
-
|
56 |
switch ( type ) {
|
57 |
case 'scratch':
|
58 |
dashboard.label = scratchLabel;
|
@@ -64,6 +67,10 @@ export default function CreateDashboard() {
|
|
64 |
default:
|
65 |
return;
|
66 |
}
|
|
|
|
|
|
|
|
|
67 |
|
68 |
add( dashboard, `create-dashboard-${ type }` );
|
69 |
};
|
@@ -81,29 +88,14 @@ export default function CreateDashboard() {
|
|
81 |
) }
|
82 |
</p>
|
83 |
</header>
|
84 |
-
<
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
setDefaultLabel( label )
|
93 |
-
}
|
94 |
-
disabled={ addingDefault || addingScratch }
|
95 |
-
/>
|
96 |
-
<div className="itsec-create-dashboard__trigger-container">
|
97 |
-
<Button
|
98 |
-
className="itsec-create-dashboard__trigger"
|
99 |
-
type="submit"
|
100 |
-
isBusy={ addingDefault }
|
101 |
-
disabled={ addingScratch }
|
102 |
-
>
|
103 |
-
{ __( 'Create Board', 'better-wp-security' ) }
|
104 |
-
</Button>
|
105 |
-
</div>
|
106 |
-
</form>
|
107 |
</section>
|
108 |
|
109 |
<section className="itsec-create-dashboard__start itsec-create-dashboard__start--scratch">
|
@@ -120,30 +112,47 @@ export default function CreateDashboard() {
|
|
120 |
) }
|
121 |
</p>
|
122 |
</header>
|
123 |
-
<
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
setStratchLabel( label )
|
132 |
-
}
|
133 |
-
disabled={ addingDefault || addingScratch }
|
134 |
-
/>
|
135 |
-
<div className="itsec-create-dashboard__trigger-container">
|
136 |
-
<Button
|
137 |
-
className="itsec-create-dashboard__trigger"
|
138 |
-
type="submit"
|
139 |
-
isBusy={ addingScratch }
|
140 |
-
disabled={ addingDefault }
|
141 |
-
>
|
142 |
-
{ __( 'Create Board', 'better-wp-security' ) }
|
143 |
-
</Button>
|
144 |
-
</div>
|
145 |
-
</form>
|
146 |
</section>
|
147 |
</div>
|
148 |
);
|
149 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* External dependencies
|
3 |
+
*/
|
4 |
+
import classnames from 'classnames';
|
5 |
+
|
6 |
/**
|
7 |
* WordPress dependencies
|
8 |
*/
|
20 |
import './style.scss';
|
21 |
|
22 |
export default function CreateDashboard() {
|
|
|
|
|
23 |
const [ defaultLabel, setDefaultLabel ] = useState( '' );
|
24 |
+
const [ scratchLabel, setScratchLabel ] = useState( '' );
|
25 |
+
const [ hasError, setHasError ] = useState( {} );
|
26 |
|
27 |
const { canCreate, canCreateLoaded, addingScratch, addingDefault } = useSelect( ( select ) => ( {
|
28 |
canCreate: select( 'ithemes-security/dashboard' ).canCreateDashboards(),
|
56 |
e.preventDefault();
|
57 |
|
58 |
const dashboard = {};
|
|
|
59 |
switch ( type ) {
|
60 |
case 'scratch':
|
61 |
dashboard.label = scratchLabel;
|
67 |
default:
|
68 |
return;
|
69 |
}
|
70 |
+
if ( dashboard.label.trim().length <= 0 ) {
|
71 |
+
setHasError( { [ type ]: true } );
|
72 |
+
return;
|
73 |
+
}
|
74 |
|
75 |
add( dashboard, `create-dashboard-${ type }` );
|
76 |
};
|
88 |
) }
|
89 |
</p>
|
90 |
</header>
|
91 |
+
<CreateDashboardForm
|
92 |
+
label={ defaultLabel }
|
93 |
+
onLabelChange={ setDefaultLabel }
|
94 |
+
onSubmit={ create( 'default' ) }
|
95 |
+
isBusy={ addingDefault }
|
96 |
+
isDisabled={ addingScratch }
|
97 |
+
hasError={ hasError.default }
|
98 |
+
/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
99 |
</section>
|
100 |
|
101 |
<section className="itsec-create-dashboard__start itsec-create-dashboard__start--scratch">
|
112 |
) }
|
113 |
</p>
|
114 |
</header>
|
115 |
+
<CreateDashboardForm
|
116 |
+
label={ scratchLabel }
|
117 |
+
onLabelChange={ setScratchLabel }
|
118 |
+
onSubmit={ create( 'scratch' ) }
|
119 |
+
isBusy={ addingScratch }
|
120 |
+
isDisabled={ addingDefault }
|
121 |
+
hasError={ hasError.scratch }
|
122 |
+
/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
123 |
</section>
|
124 |
</div>
|
125 |
);
|
126 |
}
|
127 |
+
|
128 |
+
function CreateDashboardForm( { label, onLabelChange, onSubmit, isDisabled, isBusy, hasError } ) {
|
129 |
+
const instanceId = useInstanceId( CreateDashboard );
|
130 |
+
|
131 |
+
return (
|
132 |
+
<form onSubmit={ onSubmit }>
|
133 |
+
<TextControl
|
134 |
+
className={ classnames( 'itsec-create-dashboard__name', {
|
135 |
+
'itsec-create-dashboard__name--hide-help-text': ! hasError,
|
136 |
+
} ) }
|
137 |
+
label={ __( 'Dashboard Name', 'better-wp-security' ) }
|
138 |
+
placeholder={ __( 'Dashboard Name…', 'better-wp-security' ) }
|
139 |
+
id={ `itsec-create-dashboard__name--${ instanceId }` }
|
140 |
+
value={ label }
|
141 |
+
onChange={ onLabelChange }
|
142 |
+
disabled={ isBusy || isDisabled }
|
143 |
+
help={ __( 'Entering a dashboard name is required.', 'better-wp-security' ) }
|
144 |
+
required
|
145 |
+
/>
|
146 |
+
<div className="itsec-create-dashboard__trigger-container">
|
147 |
+
<Button
|
148 |
+
className="itsec-create-dashboard__trigger"
|
149 |
+
type="submit"
|
150 |
+
isBusy={ isBusy }
|
151 |
+
disabled={ isDisabled }
|
152 |
+
>
|
153 |
+
{ __( 'Create Board', 'better-wp-security' ) }
|
154 |
+
</Button>
|
155 |
+
</div>
|
156 |
+
</form>
|
157 |
+
);
|
158 |
+
}
|
core/modules/dashboard/entries/dashboard/components/create-dashboard/style.scss
CHANGED
@@ -42,6 +42,10 @@
|
|
42 |
font-style: oblique;
|
43 |
}
|
44 |
|
|
|
|
|
|
|
|
|
45 |
.components-base-control__label {
|
46 |
border: 0;
|
47 |
clip: rect(1px, 1px, 1px, 1px);
|
@@ -58,7 +62,7 @@
|
|
58 |
|
59 |
& .itsec-create-dashboard__trigger-container {
|
60 |
text-align: center;
|
61 |
-
margin-top:
|
62 |
}
|
63 |
|
64 |
& .itsec-create-dashboard__trigger {
|
42 |
font-style: oblique;
|
43 |
}
|
44 |
|
45 |
+
&.itsec-create-dashboard__name--hide-help-text .components-base-control__help {
|
46 |
+
visibility: hidden;
|
47 |
+
}
|
48 |
+
|
49 |
.components-base-control__label {
|
50 |
border: 0;
|
51 |
clip: rect(1px, 1px, 1px, 1px);
|
62 |
|
63 |
& .itsec-create-dashboard__trigger-container {
|
64 |
text-align: center;
|
65 |
+
margin-top: 1rem;
|
66 |
}
|
67 |
|
68 |
& .itsec-create-dashboard__trigger {
|
core/modules/site-scanner/api.php
CHANGED
@@ -165,7 +165,7 @@ class ITSEC_Site_Scanner_API {
|
|
165 |
*
|
166 |
* @return array|mixed|WP_Error
|
167 |
*/
|
168 |
-
public static function register_site( $site_id = 0 ) {
|
169 |
$site_id = $site_id ?: get_main_site_id();
|
170 |
$pid = ITSEC_Log::add_process_start( 'site-scanner', 'register-site', compact( 'site_id' ) );
|
171 |
$key_pair = self::generate_key_pair();
|
@@ -260,14 +260,16 @@ class ITSEC_Site_Scanner_API {
|
|
260 |
* @return string|WP_Error|null The authorization header, a WP_Error if generation failed, null if none is available.
|
261 |
*/
|
262 |
private static function get_authorization_header( int $site_id, string $json ) {
|
263 |
-
|
|
|
264 |
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
|
269 |
-
|
270 |
-
|
|
|
271 |
}
|
272 |
|
273 |
$key = self::get_registered_site_key( $site_id );
|
165 |
*
|
166 |
* @return array|mixed|WP_Error
|
167 |
*/
|
168 |
+
public static function register_site( int $site_id = 0 ) {
|
169 |
$site_id = $site_id ?: get_main_site_id();
|
170 |
$pid = ITSEC_Log::add_process_start( 'site-scanner', 'register-site', compact( 'site_id' ) );
|
171 |
$key_pair = self::generate_key_pair();
|
260 |
* @return string|WP_Error|null The authorization header, a WP_Error if generation failed, null if none is available.
|
261 |
*/
|
262 |
private static function get_authorization_header( int $site_id, string $json ) {
|
263 |
+
if ( is_main_site( $site_id ) ) {
|
264 |
+
$signature = self::generate_signature( $json );
|
265 |
|
266 |
+
if ( ! is_wp_error( $signature ) ) {
|
267 |
+
return $signature;
|
268 |
+
}
|
269 |
|
270 |
+
if ( 'non_active_license' !== $signature->get_error_code() ) {
|
271 |
+
return $signature;
|
272 |
+
}
|
273 |
}
|
274 |
|
275 |
$key = self::get_registered_site_key( $site_id );
|
core/modules/site-scanner/mail.php
CHANGED
@@ -17,6 +17,10 @@ class ITSEC_Site_Scanner_Mail {
|
|
17 |
$nc = ITSEC_Core::get_notification_center();
|
18 |
$mail = static::get_mail( $scan );
|
19 |
|
|
|
|
|
|
|
|
|
20 |
return $nc->send( 'malware-scheduling', $mail );
|
21 |
}
|
22 |
|
17 |
$nc = ITSEC_Core::get_notification_center();
|
18 |
$mail = static::get_mail( $scan );
|
19 |
|
20 |
+
if ( ! $mail ) {
|
21 |
+
return true;
|
22 |
+
}
|
23 |
+
|
24 |
return $nc->send( 'malware-scheduling', $mail );
|
25 |
}
|
26 |
|
core/package.json
CHANGED
@@ -136,9 +136,9 @@
|
|
136 |
"url": "git+ssh://git@bitbucket.org/ithemes/ithemes-security-pro.git"
|
137 |
},
|
138 |
"scripts": {
|
139 |
-
"build": "NODE_ENV=production ./node_modules/.bin/webpack",
|
140 |
-
"clean": "node ./bin/clean.js
|
141 |
-
"dev": "./node_modules/.bin/webpack",
|
142 |
"lint": "concurrently \"npm run lint-js\"",
|
143 |
"lint-js": "wp-scripts lint-js",
|
144 |
"lint-js:fix": "wp-scripts lint-js --fix",
|
@@ -147,9 +147,9 @@
|
|
147 |
"test-unit:coverage": "npm run test-unit -- --coverage",
|
148 |
"test-unit:update": "npm run test-unit -- --updateSnapshot",
|
149 |
"test-unit:watch": "npm run test-unit -- --watch",
|
150 |
-
"watch": "./node_modules/.bin/webpack --watch",
|
151 |
"packages-update": "wp-scripts packages-update",
|
152 |
-
"test-up": "./bin/test-up.sh",
|
153 |
"test-wpunit": "docker-compose exec -T -w /var/www/html/wp-content/plugins/ithemes-security-pro wordpress ./vendor/bin/codecept run wpunit",
|
154 |
"test-acceptance": "docker-compose exec -T -w /var/www/html/wp-content/plugins/ithemes-security-pro wordpress ./vendor/bin/codecept run acceptance",
|
155 |
"test-cli": "docker-compose exec -T -w /var/www/html/wp-content/plugins/ithemes-security-pro wordpress ./vendor/bin/codecept run wpcli",
|
136 |
"url": "git+ssh://git@bitbucket.org/ithemes/ithemes-security-pro.git"
|
137 |
},
|
138 |
"scripts": {
|
139 |
+
"build": "NODE_ENV=production node ./node_modules/.bin/webpack",
|
140 |
+
"clean": "node ./bin/clean.js",
|
141 |
+
"dev": "node ./node_modules/.bin/webpack",
|
142 |
"lint": "concurrently \"npm run lint-js\"",
|
143 |
"lint-js": "wp-scripts lint-js",
|
144 |
"lint-js:fix": "wp-scripts lint-js --fix",
|
147 |
"test-unit:coverage": "npm run test-unit -- --coverage",
|
148 |
"test-unit:update": "npm run test-unit -- --updateSnapshot",
|
149 |
"test-unit:watch": "npm run test-unit -- --watch",
|
150 |
+
"watch": "node ./node_modules/.bin/webpack --watch",
|
151 |
"packages-update": "wp-scripts packages-update",
|
152 |
+
"test-up": "bash ./bin/test-up.sh",
|
153 |
"test-wpunit": "docker-compose exec -T -w /var/www/html/wp-content/plugins/ithemes-security-pro wordpress ./vendor/bin/codecept run wpunit",
|
154 |
"test-acceptance": "docker-compose exec -T -w /var/www/html/wp-content/plugins/ithemes-security-pro wordpress ./vendor/bin/codecept run acceptance",
|
155 |
"test-cli": "docker-compose exec -T -w /var/www/html/wp-content/plugins/ithemes-security-pro wordpress ./vendor/bin/codecept run wpcli",
|
core/packages/search/src/components/search/index.js
CHANGED
@@ -8,7 +8,7 @@ import { isEmpty, map, noop } from 'lodash';
|
|
8 |
/**
|
9 |
* WordPress dependencies
|
10 |
*/
|
11 |
-
import {
|
12 |
import { __, _n, sprintf } from '@wordpress/i18n';
|
13 |
import {
|
14 |
useState,
|
8 |
/**
|
9 |
* WordPress dependencies
|
10 |
*/
|
11 |
+
import { VisuallyHidden } from '@wordpress/components';
|
12 |
import { __, _n, sprintf } from '@wordpress/i18n';
|
13 |
import {
|
14 |
useState,
|
dist/dashboard/dashboard.css
CHANGED
@@ -9,7 +9,7 @@
|
|
9 |
@keyframes itsec-animation-fade-in-constant{from{opacity:0}to{opacity:1}}.itsec-admin-bar{padding:20px 20px 0;display:flex;align-items:center;justify-content:space-between}.itsec-admin-bar .itsec-admin-bar__primary,.itsec-admin-bar .itsec-admin-bar__secondary{display:flex;align-items:center}.itsec-admin-bar .itsec-admin-bar__url{color:#71747d}@media screen and (max-width: 600px){.itsec-admin-bar{flex-direction:column;height:auto;align-items:center;justify-items:center}.itsec-admin-bar .itsec-admin-bar__edit-cards,.itsec-admin-bar .itsec-admin-bar__admin-notices{margin-left:0}.itsec-admin-bar>*{margin:1em 0}.itsec-admin-bar>*:first-child{margin-top:0}.itsec-admin-bar>*:last-child{margin-bottom:0}.itsec-admin-bar .itsec-admin-bar__share{margin:1em 0}.itsec-app-page--create-dashboard .itsec-admin-bar .itsec-admin-bar__title{margin-bottom:0}}.itsec-admin-bar-edit-cards__content .components-popover__content,.itsec-admin-bar-manage-dashboards__content .components-popover__content{box-shadow:0 2px 6px rgba(0,0,0,.25)}.itsec-admin-bar-edit-cards__content.is-expanded .components-popover__content,.itsec-admin-bar-manage-dashboards__content.is-expanded .components-popover__content{overflow-y:scroll}.itsec-admin-bar-edit-cards__content.is-expanded .itsec-edit-cards,.itsec-admin-bar-edit-cards__content.is-expanded .itsec-manage-dashboards,.itsec-admin-bar-manage-dashboards__content.is-expanded .itsec-edit-cards,.itsec-admin-bar-manage-dashboards__content.is-expanded .itsec-manage-dashboards{width:100%}
|
10 |
@keyframes itsec-animation-fade-in-constant{from{opacity:0}to{opacity:1}}.itsec-card{width:100%;height:100%;background:#fff;border-radius:10px;box-shadow:0 0 5px rgba(211,211,211,.35)}.itsec-card .itsec-card__util-padding{padding:1em}.react-grid-item .react-resizable-handle{bottom:5px;right:5px}.react-grid-item.react-grid-placeholder{border-radius:10px}.react-grid-item.react-draggable-dragging{z-index:9991}
|
11 |
@keyframes itsec-animation-fade-in-constant{from{opacity:0}to{opacity:1}}.itsec-card-grid-empty-state{display:flex;justify-content:center;height:250px;width:300px;margin:20px 0 0 10px;padding:2em;border:5px dashed #ccd0d4;border-radius:5px}.itsec-card-grid-empty-state .components-button{display:flex;flex-direction:column;align-items:center;justify-content:center;color:#8d96a0;font-size:2em;transition:color 150ms}.itsec-card-grid-empty-state .components-button:hover{color:#555d66}.itsec-card-grid-empty-state .dashicon{margin-bottom:.5em}.itsec-card-grid--moving .itsec-card{-webkit-user-select:none;user-select:none}.react-grid-item{transition:none}.react-grid-item.react-grid-placeholder{background:#d3d3d3;opacity:.35}
|
12 |
-
@keyframes itsec-animation-fade-in-constant{from{opacity:0}to{opacity:1}}.itsec-create-dashboard{display:grid;grid-template:auto/1fr 1fr;grid-gap:1em;margin-top:3em}.itsec-create-dashboard .itsec-create-dashboard__start--default{border-right:1px solid #7abeed}.itsec-create-dashboard .itsec-create-dashboard__start{display:flex;flex-direction:column;align-items:stretch;padding:5em 0}.itsec-create-dashboard .itsec-create-dashboard__start header{color:#6c7781;text-align:center;margin-bottom:2em}.itsec-create-dashboard .itsec-create-dashboard__start header h2{color:#6c7781;font-size:2em;font-weight:normal;line-height:1;margin-bottom:.5em}.itsec-create-dashboard .itsec-create-dashboard__start header p{font-style:oblique;margin-bottom:0}.itsec-create-dashboard .itsec-create-dashboard__start .itsec-create-dashboard__name{max-width:350px;margin:0 auto}.itsec-create-dashboard .itsec-create-dashboard__start .itsec-create-dashboard__name .components-text-control__input::placeholder{font-style:oblique}.itsec-create-dashboard .itsec-create-dashboard__start .itsec-create-dashboard__name .components-base-control__label{border:0;clip:rect(1px, 1px, 1px, 1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-wrap:normal !important}.itsec-create-dashboard .itsec-create-dashboard__start .itsec-create-dashboard__trigger-container{text-align:center;margin-top:
|
13 |
@keyframes itsec-animation-fade-in-constant{from{opacity:0}to{opacity:1}}.itsec-edit-cards{padding:1em;width:420px;max-width:100%;box-sizing:border-box}.itsec-edit-cards header{border-bottom:1px solid #7abeed;margin-bottom:1em}.itsec-edit-cards header h3{color:#0081e3;text-align:center}.itsec-edit-cards header p{text-align:center;font-style:oblique}.itsec-edit-cards .itsec-edit-cards__bulk-control{display:flex;align-items:center;margin:0 1em}.itsec-edit-cards .itsec-edit-cards__bulk-control .components-base-control__field{margin-bottom:0}.itsec-edit-cards .itsec-edit-cards__card-choices{list-style:none;margin:.5em 0 0 0}.itsec-edit-cards .itsec-edit-cards__card-choices .itsec-edit-cards__card-choice{display:flex;align-items:center;background:#edf5f9;margin:.5em 0}.itsec-edit-cards .itsec-edit-cards__card-choices .itsec-edit-cards__card-choice:last-child{margin-bottom:0}.itsec-edit-cards .itsec-edit-cards__card-choices .itsec-edit-cards__card-choice.itsec-edit-cards__card-choice--add,.itsec-edit-cards .itsec-edit-cards__card-choices .itsec-edit-cards__card-choice.itsec-edit-cards__card-choice--promo{padding-left:1em}.itsec-edit-cards .itsec-edit-cards__card-choices .itsec-edit-cards__card-choice.itsec-edit-cards__card-choice--remove{color:#606a73;background:#f3f4f5;padding-right:1em}.itsec-edit-cards .itsec-edit-cards__card-choices .itsec-edit-cards__card-choice .itsec-edit-cards__action{border-radius:0;height:4em;width:4em;justify-content:center;box-shadow:none}.itsec-edit-cards .itsec-edit-cards__card-choices .itsec-edit-cards__card-choice .itsec-edit-cards__action:hover{box-shadow:none !important}.itsec-edit-cards .itsec-edit-cards__card-choices .itsec-edit-cards__card-choice .itsec-edit-cards__action.itsec-edit-cards__action--add,.itsec-edit-cards .itsec-edit-cards__card-choices .itsec-edit-cards__card-choice .itsec-edit-cards__action.itsec-edit-cards__card-choice--promo{color:#0081e3;margin-left:auto}.itsec-edit-cards .itsec-edit-cards__card-choices .itsec-edit-cards__card-choice .itsec-edit-cards__action.itsec-edit-cards__action--add:hover,.itsec-edit-cards .itsec-edit-cards__card-choices .itsec-edit-cards__card-choice .itsec-edit-cards__action.itsec-edit-cards__card-choice--promo:hover{background:#dcebf3 !important}.itsec-edit-cards .itsec-edit-cards__card-choices .itsec-edit-cards__card-choice .itsec-edit-cards__action.itsec-edit-cards__action--remove{color:#ececec;background:#b5bcc2;margin-right:.5em}.itsec-edit-cards .itsec-edit-cards__card-choices .itsec-edit-cards__card-choice .itsec-edit-cards__action.itsec-edit-cards__action--remove:hover{color:#ececec !important;background:#a2aab2 !important}.itsec-edit-cards .itsec-edit-cards__card-choice--promo .itsec-edit-cards__card-choice-title span{color:#0081e3;font-weight:700;font-style:oblique}.is-mobile .itsec-edit-cards{width:100%;overflow-x:auto;height:100%}.is-mobile .itsec-edit-cards header h3{display:none}.is-mobile .itsec-edit-cards header p{margin-top:0}
|
14 |
@keyframes itsec-animation-fade-in-constant{from{opacity:0}to{opacity:1}}.itsec-dashboard-toolbar{background:#fff;display:flex;align-items:center;justify-content:flex-end;padding:.5rem 1.5rem;min-height:calc(30px + 1rem)}.itsec-dashboard-toolbar .components-accessible-toolbar{border:none}.itsec-dashboard-toolbar .components-accessible-toolbar a.components-button:focus{outline:none;box-shadow:none}.itsec-dashboard-toolbar .components-accessible-toolbar .components-button.has-icon::before,.itsec-dashboard-toolbar .components-accessible-toolbar .components-toolbar .components-button.has-icon::before{left:6px;right:2px}.itsec-dashboard-toolbar .components-button{height:auto;font-size:1rem;padding-top:0;padding-bottom:0;color:#0081e3}.itsec-dashboard-toolbar .components-button .dashicon{display:flex;align-items:center;justify-content:center;font-size:20px;width:26px;height:26px;color:#fff;background:#0081e3;border-radius:50%;margin-right:4px}.itsec-dashboard-toolbar .components-button .dashicon.dashicons-layout,.itsec-dashboard-toolbar .components-button .dashicon.dashicons-admin-settings{font-size:16px}.itsec-dashboard-toolbar .components-button:hover{color:#0a1a23}.itsec-dashboard-toolbar .components-button:hover .dashicon{background:#00477d}@media screen and (max-width: 480px){.itsec-dashboard-toolbar{padding-top:1rem;padding-bottom:1rem}.itsec-dashboard-toolbar .components-accessible-toolbar{width:100%;display:grid;grid-template-columns:1fr 1fr;justify-items:start;grid-gap:1rem}}
|
15 |
@keyframes itsec-animation-fade-in-constant{from{opacity:0}to{opacity:1}}.itsec-dashboard-help{max-width:80rem;margin:0 auto}.itsec-dashboard-help .itsec-help-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:2em}.itsec-dashboard-help .itsec-help-header__title{color:#0081e3;display:block;font-size:1.6rem;font-weight:600;text-transform:uppercase}.itsec-dashboard-help .itsec-help-header__back-link.components-button{color:#0081e3;height:auto;margin:0}.itsec-dashboard-help .itsec-help-header__back-link.components-button:hover{color:#0a1a23}.itsec-dashboard-help .itsec-help-list-section{margin-bottom:2rem}.itsec-dashboard-help .itsec-help-list-section:last-child{margin-bottom:0}
|
9 |
@keyframes itsec-animation-fade-in-constant{from{opacity:0}to{opacity:1}}.itsec-admin-bar{padding:20px 20px 0;display:flex;align-items:center;justify-content:space-between}.itsec-admin-bar .itsec-admin-bar__primary,.itsec-admin-bar .itsec-admin-bar__secondary{display:flex;align-items:center}.itsec-admin-bar .itsec-admin-bar__url{color:#71747d}@media screen and (max-width: 600px){.itsec-admin-bar{flex-direction:column;height:auto;align-items:center;justify-items:center}.itsec-admin-bar .itsec-admin-bar__edit-cards,.itsec-admin-bar .itsec-admin-bar__admin-notices{margin-left:0}.itsec-admin-bar>*{margin:1em 0}.itsec-admin-bar>*:first-child{margin-top:0}.itsec-admin-bar>*:last-child{margin-bottom:0}.itsec-admin-bar .itsec-admin-bar__share{margin:1em 0}.itsec-app-page--create-dashboard .itsec-admin-bar .itsec-admin-bar__title{margin-bottom:0}}.itsec-admin-bar-edit-cards__content .components-popover__content,.itsec-admin-bar-manage-dashboards__content .components-popover__content{box-shadow:0 2px 6px rgba(0,0,0,.25)}.itsec-admin-bar-edit-cards__content.is-expanded .components-popover__content,.itsec-admin-bar-manage-dashboards__content.is-expanded .components-popover__content{overflow-y:scroll}.itsec-admin-bar-edit-cards__content.is-expanded .itsec-edit-cards,.itsec-admin-bar-edit-cards__content.is-expanded .itsec-manage-dashboards,.itsec-admin-bar-manage-dashboards__content.is-expanded .itsec-edit-cards,.itsec-admin-bar-manage-dashboards__content.is-expanded .itsec-manage-dashboards{width:100%}
|
10 |
@keyframes itsec-animation-fade-in-constant{from{opacity:0}to{opacity:1}}.itsec-card{width:100%;height:100%;background:#fff;border-radius:10px;box-shadow:0 0 5px rgba(211,211,211,.35)}.itsec-card .itsec-card__util-padding{padding:1em}.react-grid-item .react-resizable-handle{bottom:5px;right:5px}.react-grid-item.react-grid-placeholder{border-radius:10px}.react-grid-item.react-draggable-dragging{z-index:9991}
|
11 |
@keyframes itsec-animation-fade-in-constant{from{opacity:0}to{opacity:1}}.itsec-card-grid-empty-state{display:flex;justify-content:center;height:250px;width:300px;margin:20px 0 0 10px;padding:2em;border:5px dashed #ccd0d4;border-radius:5px}.itsec-card-grid-empty-state .components-button{display:flex;flex-direction:column;align-items:center;justify-content:center;color:#8d96a0;font-size:2em;transition:color 150ms}.itsec-card-grid-empty-state .components-button:hover{color:#555d66}.itsec-card-grid-empty-state .dashicon{margin-bottom:.5em}.itsec-card-grid--moving .itsec-card{-webkit-user-select:none;user-select:none}.react-grid-item{transition:none}.react-grid-item.react-grid-placeholder{background:#d3d3d3;opacity:.35}
|
12 |
+
@keyframes itsec-animation-fade-in-constant{from{opacity:0}to{opacity:1}}.itsec-create-dashboard{display:grid;grid-template:auto/1fr 1fr;grid-gap:1em;margin-top:3em}.itsec-create-dashboard .itsec-create-dashboard__start--default{border-right:1px solid #7abeed}.itsec-create-dashboard .itsec-create-dashboard__start{display:flex;flex-direction:column;align-items:stretch;padding:5em 0}.itsec-create-dashboard .itsec-create-dashboard__start header{color:#6c7781;text-align:center;margin-bottom:2em}.itsec-create-dashboard .itsec-create-dashboard__start header h2{color:#6c7781;font-size:2em;font-weight:normal;line-height:1;margin-bottom:.5em}.itsec-create-dashboard .itsec-create-dashboard__start header p{font-style:oblique;margin-bottom:0}.itsec-create-dashboard .itsec-create-dashboard__start .itsec-create-dashboard__name{max-width:350px;margin:0 auto}.itsec-create-dashboard .itsec-create-dashboard__start .itsec-create-dashboard__name .components-text-control__input::placeholder{font-style:oblique}.itsec-create-dashboard .itsec-create-dashboard__start .itsec-create-dashboard__name.itsec-create-dashboard__name--hide-help-text .components-base-control__help{visibility:hidden}.itsec-create-dashboard .itsec-create-dashboard__start .itsec-create-dashboard__name .components-base-control__label{border:0;clip:rect(1px, 1px, 1px, 1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-wrap:normal !important}.itsec-create-dashboard .itsec-create-dashboard__start .itsec-create-dashboard__trigger-container{text-align:center;margin-top:1rem}.itsec-create-dashboard .itsec-create-dashboard__start .itsec-create-dashboard__trigger{padding:.5em 1em;background:#e1f2fc;color:#0081e3;border:1px solid #0081e3;transition:background-color 300ms,color 150ms}.itsec-create-dashboard .itsec-create-dashboard__start .itsec-create-dashboard__trigger:hover{background:#0081e3;color:#fff}.itsec-create-dashboard .itsec-create-dashboard__start .itsec-create-dashboard__trigger.is-busy{animation:components-button__busy-animation 2500ms infinite linear;background-size:100px 100%;background-image:repeating-linear-gradient(-45deg, #E1F2FC, #fff 11px, #fff 10px, #E1F2FC 20px);opacity:1}.itsec-create-dashboard .itsec-create-dashboard__start .itsec-create-dashboard__trigger.is-busy:hover{color:#0081e3}@media screen and (max-width: 782px){.itsec-create-dashboard{grid-template:1fr 1fr/auto}.itsec-create-dashboard .itsec-create-dashboard__start{padding:0}.itsec-create-dashboard .itsec-create-dashboard__start--default{border-right:none;border-bottom:1px solid #e2e4e7;margin-bottom:1em;padding-bottom:2em}}
|
13 |
@keyframes itsec-animation-fade-in-constant{from{opacity:0}to{opacity:1}}.itsec-edit-cards{padding:1em;width:420px;max-width:100%;box-sizing:border-box}.itsec-edit-cards header{border-bottom:1px solid #7abeed;margin-bottom:1em}.itsec-edit-cards header h3{color:#0081e3;text-align:center}.itsec-edit-cards header p{text-align:center;font-style:oblique}.itsec-edit-cards .itsec-edit-cards__bulk-control{display:flex;align-items:center;margin:0 1em}.itsec-edit-cards .itsec-edit-cards__bulk-control .components-base-control__field{margin-bottom:0}.itsec-edit-cards .itsec-edit-cards__card-choices{list-style:none;margin:.5em 0 0 0}.itsec-edit-cards .itsec-edit-cards__card-choices .itsec-edit-cards__card-choice{display:flex;align-items:center;background:#edf5f9;margin:.5em 0}.itsec-edit-cards .itsec-edit-cards__card-choices .itsec-edit-cards__card-choice:last-child{margin-bottom:0}.itsec-edit-cards .itsec-edit-cards__card-choices .itsec-edit-cards__card-choice.itsec-edit-cards__card-choice--add,.itsec-edit-cards .itsec-edit-cards__card-choices .itsec-edit-cards__card-choice.itsec-edit-cards__card-choice--promo{padding-left:1em}.itsec-edit-cards .itsec-edit-cards__card-choices .itsec-edit-cards__card-choice.itsec-edit-cards__card-choice--remove{color:#606a73;background:#f3f4f5;padding-right:1em}.itsec-edit-cards .itsec-edit-cards__card-choices .itsec-edit-cards__card-choice .itsec-edit-cards__action{border-radius:0;height:4em;width:4em;justify-content:center;box-shadow:none}.itsec-edit-cards .itsec-edit-cards__card-choices .itsec-edit-cards__card-choice .itsec-edit-cards__action:hover{box-shadow:none !important}.itsec-edit-cards .itsec-edit-cards__card-choices .itsec-edit-cards__card-choice .itsec-edit-cards__action.itsec-edit-cards__action--add,.itsec-edit-cards .itsec-edit-cards__card-choices .itsec-edit-cards__card-choice .itsec-edit-cards__action.itsec-edit-cards__card-choice--promo{color:#0081e3;margin-left:auto}.itsec-edit-cards .itsec-edit-cards__card-choices .itsec-edit-cards__card-choice .itsec-edit-cards__action.itsec-edit-cards__action--add:hover,.itsec-edit-cards .itsec-edit-cards__card-choices .itsec-edit-cards__card-choice .itsec-edit-cards__action.itsec-edit-cards__card-choice--promo:hover{background:#dcebf3 !important}.itsec-edit-cards .itsec-edit-cards__card-choices .itsec-edit-cards__card-choice .itsec-edit-cards__action.itsec-edit-cards__action--remove{color:#ececec;background:#b5bcc2;margin-right:.5em}.itsec-edit-cards .itsec-edit-cards__card-choices .itsec-edit-cards__card-choice .itsec-edit-cards__action.itsec-edit-cards__action--remove:hover{color:#ececec !important;background:#a2aab2 !important}.itsec-edit-cards .itsec-edit-cards__card-choice--promo .itsec-edit-cards__card-choice-title span{color:#0081e3;font-weight:700;font-style:oblique}.is-mobile .itsec-edit-cards{width:100%;overflow-x:auto;height:100%}.is-mobile .itsec-edit-cards header h3{display:none}.is-mobile .itsec-edit-cards header p{margin-top:0}
|
14 |
@keyframes itsec-animation-fade-in-constant{from{opacity:0}to{opacity:1}}.itsec-dashboard-toolbar{background:#fff;display:flex;align-items:center;justify-content:flex-end;padding:.5rem 1.5rem;min-height:calc(30px + 1rem)}.itsec-dashboard-toolbar .components-accessible-toolbar{border:none}.itsec-dashboard-toolbar .components-accessible-toolbar a.components-button:focus{outline:none;box-shadow:none}.itsec-dashboard-toolbar .components-accessible-toolbar .components-button.has-icon::before,.itsec-dashboard-toolbar .components-accessible-toolbar .components-toolbar .components-button.has-icon::before{left:6px;right:2px}.itsec-dashboard-toolbar .components-button{height:auto;font-size:1rem;padding-top:0;padding-bottom:0;color:#0081e3}.itsec-dashboard-toolbar .components-button .dashicon{display:flex;align-items:center;justify-content:center;font-size:20px;width:26px;height:26px;color:#fff;background:#0081e3;border-radius:50%;margin-right:4px}.itsec-dashboard-toolbar .components-button .dashicon.dashicons-layout,.itsec-dashboard-toolbar .components-button .dashicon.dashicons-admin-settings{font-size:16px}.itsec-dashboard-toolbar .components-button:hover{color:#0a1a23}.itsec-dashboard-toolbar .components-button:hover .dashicon{background:#00477d}@media screen and (max-width: 480px){.itsec-dashboard-toolbar{padding-top:1rem;padding-bottom:1rem}.itsec-dashboard-toolbar .components-accessible-toolbar{width:100%;display:grid;grid-template-columns:1fr 1fr;justify-items:start;grid-gap:1rem}}
|
15 |
@keyframes itsec-animation-fade-in-constant{from{opacity:0}to{opacity:1}}.itsec-dashboard-help{max-width:80rem;margin:0 auto}.itsec-dashboard-help .itsec-help-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:2em}.itsec-dashboard-help .itsec-help-header__title{color:#0081e3;display:block;font-size:1.6rem;font-weight:600;text-transform:uppercase}.itsec-dashboard-help .itsec-help-header__back-link.components-button{color:#0081e3;height:auto;margin:0}.itsec-dashboard-help .itsec-help-header__back-link.components-button:hover{color:#0a1a23}.itsec-dashboard-help .itsec-help-list-section{margin-bottom:2rem}.itsec-dashboard-help .itsec-help-list-section:last-child{margin-bottom:0}
|
dist/dashboard/dashboard.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
this.itsec=this.itsec||{},this.itsec.dashboard=this.itsec.dashboard||{},this.itsec.dashboard.dashboard=(window.itsecWebpackJsonP=window.itsecWebpackJsonP||[]).push([[15],{"/Nrb":function(e,t,a){},"1ZqX":function(e,t){!function(){e.exports=this.wp.data}()},"6QFD":function(e,t,a){},"72mH":function(e,t,a){},FqII:function(e,t){!function(){e.exports=this.wp.date}()},GRId:function(e,t){!function(){e.exports=this.wp.element}()},K9lf:function(e,t){!function(){e.exports=this.wp.compose}()},MPLY:function(e,t,a){},"MS/V":function(e,t,a){},Mmq9:function(e,t){!function(){e.exports=this.wp.url}()},RxS6:function(e,t){!function(){e.exports=this.wp.keycodes}()},SVg7:function(e,t,a){},Tqx9:function(e,t){!function(){e.exports=this.wp.primitives}()},TvNi:function(e,t){!function(){e.exports=this.wp.plugins}()},V1Ci:function(e,t,a){"use strict";a.r(t),a.d(t,"ConfigContext",(function(){return B.c})),a.d(t,"useConfigContext",(function(){return B.p})),a.d(t,"useCanWrite",(function(){return B.o})),a.d(t,"BREAKPOINT_ORDER",(function(){return B.b})),a.d(t,"GRID_COLUMNS",(function(){return B.d})),a.d(t,"BREAKPOINTS",(function(){return B.a})),a.d(t,"transformGridLayoutToApi",(function(){return B.n})),a.d(t,"transformApiLayoutToGrid",(function(){return B.l})),a.d(t,"transformApiLayoutToGridForCard",(function(){return B.m})),a.d(t,"findSlot",(function(){return B.g})),a.d(t,"areGridLayoutsEqual",(function(){return B.e})),a.d(t,"sortCardsToMatchLayout",(function(){return B.k})),a.d(t,"sortCardsToMatchApiLayout",(function(){return B.j})),a.d(t,"getCardTitle",(function(){return B.i})),a.d(t,"debugChange",(function(){return B.f})),a.d(t,"getAvatarUrl",(function(){return B.h})),a.d(t,"useRegisterCards",(function(){return Me})),a.d(t,"Card",(function(){return ze})),a.d(t,"CardHeader",(function(){return H})),a.d(t,"CardHeaderDate",(function(){return A})),a.d(t,"CardHeaderStatus",(function(){return R})),a.d(t,"CardHeaderTitle",(function(){return T})),a.d(t,"CardFooter",(function(){return $})),a.d(t,"CardFooterSchemaActions",(function(){return U})),a.d(t,"PromoCard",(function(){return st})),a.d(t,"MasterDetail",(function(){return X})),a.d(t,"MasterDetailBack",(function(){return J}));var c={};a.r(c),a.d(c,"slug",(function(){return je})),a.d(c,"settings",(function(){return _e}));var r={};a.r(r),a.d(r,"slug",(function(){return Se})),a.d(r,"settings",(function(){return De}));var s=a("GRId"),n=a("l3Sj"),i=a("Y8OO"),o=a.n(i),l=a("jgtX"),d=a("tI+e"),u=a("K9lf"),b=a("1ZqX"),m=a("TvNi"),h=(a("onLe"),a("wLpv")),O=a("cruf"),f=(a("z1rk"),a("ppSj")),p=a("YLtl"),j=a("ps87"),_=a("4cdY"),y=a("J+eN"),g=a("b+jq"),E=a("imvK"),N=a("nJDY"),v=a("Yjvw"),k=a("wcMh"),w=a("FqII"),I=a("TXkB"),C=(a("aFxt"),a("4eJC")),L=a.n(C);const x=L()(()=>[{value:"24-hours",label:Object(n.__)("24 Hours","better-wp-security")},{value:"week",label:Object(n.__)("7 Days","better-wp-security")},{value:"30-days",label:Object(n.__)("30 Days","better-wp-security")},{value:"custom",label:Object(n.__)("Custom","better-wp-security")}]),S=new window.Date,D=Object(w.format)("Y-m-d",S.setDate(S.getDate()-60)),M=Object(w.format)("Y-m-d");var A=Object(u.compose)([Object(b.withSelect)((e,t)=>{let{card:a}=t;return{queryArgs:e("ithemes-security/dashboard").getDashboardCardQueryArgs(a.id)||{}}}),Object(b.withDispatch)((e,t)=>{let{card:a}=t;return{update:t=>e("ithemes-security/dashboard").queryDashboardCard(a.id,t)}})])((function(e){let{queryArgs:t,config:a,update:c}=e;const[r,i]=Object(s.useState)(!1),[o,l]=Object(s.useState)(void 0),[u,b]=Object(s.useState)(void 0);let[m,h]=Object(s.useState)(void 0);const O=function(e,t){return e.period?e.period:t.query_args.period?t.query_args.period.default:void 0}(t,a),f=function(e){if(!e)return"";const t=new window.Date;let a,c;switch(e){case"24-hours":return Object(n.__)("24 Hours","better-wp-security");case"30-days":a=Object(w.dateI18n)("M j",t.setDate(t.getDate()-30)),c=Object(w.dateI18n)("M j");break;case"week":a=Object(w.dateI18n)("M j",t.setDate(t.getDate()-7)),c=Object(w.dateI18n)("M j");break;default:a=Object(w.dateI18n)("M j",e.start),c=Object(w.dateI18n)("M j",e.end)}return Object(n.sprintf)(Object(n.__)("%1$s - %2$s","better-wp-security"),a,c)}(O);return m=m||(Object(p.isString)(O)?O:"custom"),Object(s.createElement)("div",{className:"itsec-card-header-date"},Object(s.createElement)(d.Button,{onClick:()=>i(!r),title:f,"aria-expanded":r,"aria-label":Object(n.sprintf)(Object(n.__)("%s (click to change)","better-wp-security"),f)},Object(s.createElement)("span",{className:"itsec-card-header-date__period"},f),Object(s.createElement)(d.Dashicon,{icon:"calendar",className:"itsec-card-header-date__icon"})),r&&Object(s.createElement)(d.Modal,{title:Object(n.__)("Change Date Period","better-wp-security"),onRequestClose:()=>i(!1)},Object(s.createElement)(d.SelectControl,{options:x(),value:m,onChange:e=>h(e)}),"custom"===m&&Object(s.createElement)(s.Fragment,null,Object(s.createElement)(d.TextControl,{type:"date",min:D,max:M,value:o,onChange:e=>l(e),label:Object(n.__)("Start Date","better-wp-security"),placeholder:"YYYY-MM-DD"}),Object(s.createElement)(d.TextControl,{type:"date",min:D,max:M,value:u,onChange:e=>b(e),label:Object(n.__)("End Date","better-wp-security"),placeholder:"YYYY-MM-DD"})),Object(s.createElement)(d.Button,{isPrimary:!0,onClick:e=>{let a;e.preventDefault(),a="custom"===m?{start:o,end:u}:m,c({...t,period:a}),i(!1)}},Object(n.__)("Apply","better-wp-security"))))}));function R(e){let{status:t="protected"}=e;switch(t){case"protected":t=Object(n.__)("Protected","better-wp-security")}return Object(s.createElement)("span",{className:"itsec-card-header-status"},Object(s.createElement)("span",{className:"itsec-card-header-status__label"},Object(n.__)("Status","better-wp-security")),Object(s.createElement)("span",{className:"itsec-card-header-status__status"},t))}var B=a("Z6ex");function T(e){let{card:t,config:a}=e;return Object(s.createElement)("h2",{className:"itsec-card-header-title"},Object(B.i)(t,a))}function H(e){let{children:t}=e;return Object(s.createElement)("header",{className:"itsec-card-header itsec-card__util-padding"},t)}a("xR+x");var P=Object(u.compose)([Object(b.withSelect)((e,t)=>{let{card:a}=t;return{period:(e("ithemes-security/dashboard").getDashboardCardQueryArgs(a.id)||{}).period}})])((function(e){let{card:t,config:a,period:c}=e;c=c||a.query_args.period&&a.query_args.period.default;const r=[],n=[];if(!Object(p.isEmpty)(t.data))for(const e in t.data)if(t.data.hasOwnProperty(e)){for(let a=0;a<t.data[e].data.length;a++){const s=t.data[e].data[a];if(r[a])r[a][e]=s.y;else{const t="24-hours"===c?"g A":"M j";r.push({name:s.t?Object(w.dateI18n)(t,s.t):s.x,[e]:s.y})}}n.push({name:t.data[e].label,dataKey:e})}return Object(s.createElement)("div",{className:"itsec-card--type-line-graph"},Object(s.createElement)(H,null,Object(s.createElement)(T,{card:t,config:a}),Object(s.createElement)(A,{card:t,config:a})),Object(s.createElement)(j.a,{width:"100%",height:"100%"},Object(s.createElement)(_.a,{margin:{top:10,left:-15,right:50,bottom:10},data:r},Object(s.createElement)(y.a,{dataKey:"name"}),Object(s.createElement)(g.a,{allowDecimals:!1}),Object(s.createElement)(E.a,{strokeDasharray:"3 3"}),Object(s.createElement)(N.a,null),Object(s.createElement)(v.a,null),n.map((e,t)=>Object(s.createElement)(k.a,{type:"monotone",dataKey:e.dataKey,name:e.name,key:e.dataKey,stroke:I.i[t],isAnimationActive:!1})))))})),V=a("T92s"),z=a("6gYL"),F=a("0/F4"),q=a("J1Zg"),W=a("TSYQ"),Z=a.n(W),Y=a("Td6G");a("MS/V");function Q(e){let{card:t,config:a}=e;const c=[];let r=0;if(t.data&&t.data.data)for(const e in t.data.data)t.data.data.hasOwnProperty(e)&&(r+=t.data.data[e].sum,c.push({name:t.data.data[e].label,value:t.data.data[e].sum}));const i=r>0,o=i?1:.4;i||c.forEach(e=>e.value=1);return Object(s.createElement)("div",{className:Z()("itsec-card--type-pie-chart",{"itsec-card--type-pie-chart--no-data":!i})},Object(s.createElement)(H,null,Object(s.createElement)(T,{card:t,config:a}),a.query_args.period&&Object(s.createElement)(A,{card:t,config:a})),Object(s.createElement)(j.a,{width:"100%",height:200},Object(s.createElement)(z.a,null,Object(s.createElement)(F.a,{data:c,dataKey:"value",innerRadius:60,outerRadius:80,fill:"#8884d8",fillOpacity:o,paddingAngle:5,activeShape:e=>{const{cx:a,cy:c,innerRadius:r,outerRadius:l,startAngle:d,endAngle:u,fill:b}=e;return Object(s.createElement)("g",null,Object(s.createElement)("text",{x:a,y:c+10,dy:8,textAnchor:"middle",fill:b,fillOpacity:o,className:"itsec-card-pie-chart__circle-sum"},i?Object(Y.m)(t.data.circle_sum):"—"),Object(s.createElement)("text",{x:a,y:c+30,dy:8,textAnchor:"middle",fill:b,fillOpacity:o,className:"itsec-card-pie-chart__circle-label"},i?t.data.circle_label:Object(n.__)("No Data","better-wp-security")),Object(s.createElement)(V.a,{cx:a,cy:c,innerRadius:r,outerRadius:l,startAngle:d,endAngle:u,fill:b,fillOpacity:o}))},activeIndex:0,isAnimationActive:!1},c.map((e,t)=>Object(s.createElement)(q.a,{key:t,fill:I.i[t%I.i.length]}))))),Object(s.createElement)("table",{className:"itsec-card-pie-chart__values"},Object(s.createElement)("tbody",null,c.map((e,t)=>Object(s.createElement)("tr",{key:e.name},Object(s.createElement)("th",{scope:"row"},e.name),Object(s.createElement)("td",{style:{color:I.i[t]}},i?(e.value/r*100).toFixed(0)+"%":"—"))))))}a("silS");var U=Object(u.compose)([Object(b.withSelect)((e,t)=>({callingRpcs:e("ithemes-security/dashboard").getCallingDashboardCardRpcs(t.card.id)}))])((function(e){let{card:t,callingRpcs:a,onComplete:c,children:r}=e;const n=Object(p.get)(t,["_links","ithemes-security:rpc"],[]),i=Object(p.flatten)(Object.values(Object(p.get)(t,"_links",{}))).filter(e=>"text/html"===e.media);return n.length||i.length||r?Object(s.createElement)($,null,n.map((e,r)=>Object(s.createElement)("span",{className:"itsec-card-footer__action",key:e.href},Object(s.createElement)(d.Button,{isSmall:!0,isPrimary:0===r,onClick:()=>!a.includes(e.href)&&(async e=>{const a=await Object(b.dispatch)("ithemes-security/dashboard").callDashboardCardRpc(t.id,e);c&&c(e,a)})(e.href),isBusy:a.includes(e.href),"aria-disabled":a.includes(e.href)},e.title))),i.map(e=>Object(s.createElement)("span",{className:"itsec-card-footer__action",key:e.href},Object(s.createElement)(d.Button,{isSmall:!0,isLink:!0,href:e.href},e.title))),r):null}));var $=function(e){let{children:t}=e;return Object(s.createElement)("footer",{className:"itsec-card-footer__actions"},t)},G=a("RxS6");var K=Object(u.compose)([u.pure])((function(e){let{master:t,getId:a,parentInstanceId:c,isSelected:r,DetailRender:n}=e;return Object(s.createElement)("section",{key:a(t),role:"tabpanel",className:"itsec-component-master-detail__detail-container",id:`itsec-component-master-detail-${c}__detail--${a(t)}`,style:r?{}:{display:"none"}},Object(s.createElement)(n,{master:t,isVisible:r}))}));a("o7fS");function J(e){let{isSmall:t,select:a,selectedId:c}=e;return Object(s.createElement)(d.Button,{icon:"arrow-left-alt",className:"itsec-component-master-detail__back",onClick:()=>a(0),style:c&&t?{}:{display:"none"},label:Object(n.__)("Back to List","better-wp-security"),showTooltip:!1})}var X=Object(u.compose)([u.withInstanceId,u.pure])((function(e){let{masters:t,masterRender:a,detailRender:c,ListHeader:r,ListFooter:i,context:o,selectedId:l,select:u,instanceId:b,mode:m="table",idProp:h="id",isSmall:O=!1,direction:f="horizontal",borderless:j=!1,children:_,hasNext:y,loadNext:g,isQuerying:E}=e;const N=Object(p.isString)(h)?e=>e[h]:h,v=function(e,t,a){if(!e.length)return;if(!1===a)return;if(!a)return e[0];const c=Object(p.find)(e,e=>t(e)===a);return c||e[0]}(t,N,l),k={};let w;const I=Object(p.curry)((e,a)=>{const{keyCode:c}=a;let r;switch(c){case G.UP:r=0===e?t.length-1:e-1;break;case G.DOWN:r=e===t.length-1?0:e+1;break;case G.ENTER:case G.SPACE:return a.preventDefault(),a.stopPropagation(),void u(N(t[e]));default:return}const s=k[N(t[r])];s&&(a.stopPropagation(),a.preventDefault(),s.focus(),0===r&&(a.nativeEvent.stopImmediatePropagation(),w.scrollTop=0))});let C,L;switch(m){case"list":C="ul",L="li";break;case"table":default:C="table",L="tr"}const x=t.map((e,t)=>{const c=l===N(e);return Object(s.createElement)(L,{key:N(e),id:`itsec-component-master-detail-${b}__master--${N(e)}`,tabIndex:c||!l&&0===t?0:-1,role:"tab","aria-selected":c,"aria-controls":`itsec-component-master-detail-${b}__detail--${N(e)}`,onFocus:()=>!O&&u(N(e)),onClick:()=>u(N(e)),onKeyDown:I(t),ref:t=>k[N(e)]=t,className:Z()("itsec-component-master-detail__master",{"itsec-component-master-detail__master--selected":c,"itsec-component-master-detail__master--selected-default":0===l&&0===t})},Object(s.createElement)(a,{master:e}))});let S=!1;if(y){const e=Object(s.createElement)(d.Button,{isLink:!0,onClick:g,disabled:E,isBusy:E},Object(n.__)("Load More","better-wp-security"));S="list"===m?Object(s.createElement)("li",null,e):Object(s.createElement)("tfoot",null,Object(s.createElement)("tr",null,Object(s.createElement)("td",{colSpan:100},e)))}return Object(s.createElement)("section",{className:Z()("itsec-component-master-detail","itsec-component-master-detail--direction-"+f,{"itsec-component-master-detail--is-small":O,"itsec-component-master-detail--has-detail":l,"itsec-component-master-detail--borderless":j})},Object(s.createElement)("section",{className:"itsec-component-master-detail__master-list-container",ref:e=>w=e},r&&Object(s.createElement)(r,{context:o}),Object(s.createElement)(C,{className:"itsec-component-master-detail__master-list",role:"tablist"},_,"table"===m?Object(s.createElement)("tbody",null,x):x,S),i&&Object(s.createElement)(i,{context:o})),t.map(e=>Object(s.createElement)(K,{key:N(e),master:e,getId:N,parentInstanceId:b,isSelected:e===v,DetailRender:c})))}));a("6QFD");var ee=Object(u.compose)([Object(b.withSelect)((e,t)=>({removing:e("ithemes-security/dashboard").isRemovingCard(t.card.id),canRemove:e("ithemes-security/dashboard").canEditCard(t.dashboardId,t.card.id)})),Object(b.withDispatch)((e,t)=>({remove:()=>e("ithemes-security/dashboard").removeDashboardCard(t.dashboardId,t.card)}))])((function(e){let{card:t,removing:a,canRemove:c,remove:r}=e;return Object(s.createElement)("div",{className:"itsec-empty-state-card itsec-empty-state-card--unknown"},Object(s.createElement)("h3",null,Object(n.__)("Unknown Card","better-wp-security")),Object(s.createElement)(I.k,null),Object(s.createElement)("p",null,Object(n.__)("Something went wrong with this card. This is most likely due to disabling an iThemes Security Module.","better-wp-security")),c&&Object(s.createElement)(d.Button,{isSecondary:!0,isBusy:a,onClick:r},Object(n.__)("Remove Card","better-wp-security")),Object(s.createElement)("span",null,Object(n.__)("Card Type: ","better-wp-security"),Object(s.createElement)("br",null),Object(s.createElement)("code",null,t.original)))}));var te=function(e){let{card:t,config:a}=e;return Object(s.createElement)("div",{className:"itsec-empty-state-card itsec-empty-state-card--error"},a&&Object(s.createElement)(H,null,Object(s.createElement)(T,{card:t,config:a})),Object(s.createElement)("h3",null,Object(n.__)("Unexpected Error","better-wp-security")),Object(s.createElement)(I.a,null),Object(s.createElement)("p",null,Object(n.__)("An error occurred while rendering this card.","better-wp-security")),Object(s.createElement)("p",null,Object(n.__)("Try refreshing your browser. If the error persists, please contact support.","better-wp-security")))};function ae(e){let{title:t,text:a}=e;return Object(s.createElement)("div",{className:"itsec-empty-state-card itsec-empty-state-card--happy"},t&&Object(s.createElement)("h3",null,t),Object(s.createElement)(I.b,null),a&&Object(s.createElement)("p",null,a))}var ce=a("lSNA"),re=a.n(ce),se=a("tmk3"),ne=a.n(se),ie=a("ywyh"),oe=a.n(ie);function le(e,t,a){!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,a)}var de=new WeakMap,ue=new WeakMap,be=new WeakMap;var me=new class{constructor(){le(this,de,{writable:!0,value:{}}),le(this,ue,{writable:!0,value:{}}),le(this,be,{writable:!0,value:{}})}getDetails(e){return ne()(this,de)[e]?Promise.resolve(ne()(this,de)[e]):(ne()(this,ue)[e]||(ne()(this,ue)[e]=oe()({url:e}).then(t=>(ne()(this,de)[e]=t.detail,delete ne()(this,ue)[e],t.detail))),ne()(this,ue)[e])}isFetching(e){return!!ne()(this,ue)[e]}release(e){return ne()(this,be)[e]||(ne()(this,be)[e]=oe()({url:e,method:"DELETE"}).then(t=>{delete ne()(this,be)[e];const a="release-lockout-"+e;return setTimeout(()=>Object(b.dispatch)("core/notices").removeNotice(a,"ithemes-security"),5e3),Object(b.dispatch)("core/notices").createNotice("success",Object(n.__)("Lockout Released","better-wp-security"),{id:a,context:"ithemes-security"}),t}).catch(t=>{delete ne()(this,be)[e],Object(b.dispatch)("core/notices").createNotice("error",Object(n.sprintf)(Object(n.__)("Error when releasing lockout: %s","better-wp-security"),t.message),{context:"ithemes-security"})})),ne()(this,be)[e]}isReleasing(e){return!!ne()(this,be)[e]}};class he extends s.Component{constructor(){super(...arguments),re()(this,"state",{details:null,viewLog:0}),re()(this,"fetchDetails",e=>{if(!this.props.master.links.item)return;const t=this.props.master.links.item[0].href.replace("{lockout_id}",e);me.getDetails(t).then(t=>{this.unmounted||this.props.master.id!==e||this.setState({details:t})})}),re()(this,"renderHistory",e=>{if(!e.label)return;const t=Object(s.createElement)("time",{dateTime:e.time,title:Object(w.dateI18n)("M d, Y g:s A",e.time)},Object(n.sprintf)(Object(n.__)("%s ago","better-wp-security"),e.time_relative));return Object(s.createElement)("li",{key:e.id},Object(s.createElement)("code",null,e.label)," – ",t)})}componentDidMount(){this.props.isVisible&&this.fetchDetails(this.props.master.id)}componentDidUpdate(e){(this.props.isVisible&&!e.isVisible||this.props.master.id!==e.master.id)&&this.fetchDetails(this.props.master.id)}shouldComponentUpdate(e,t){return this.props.master.id!==e.master.id||(this.props.isVisible!==e.isVisible||(!(this.state.details||!t.details)||this.state.viewLog!==t.viewLog))}componentWillUnmount(){this.unmounted=!0}render(){const{master:e}=this.props,{details:t}=this.state;return Object(s.createElement)("div",{className:"itsec-card-active-lockouts__detail-container"},Object(s.createElement)("time",{className:"itsec-card-active-lockouts__start-time",dateTime:e.start_gmt},Object(n.sprintf)(Object(n.__)("%s ago","better-wp-security"),e.start_gmt_relative)),Object(s.createElement)("h3",{className:"itsec-card-active-lockouts__label"},e.label),Object(s.createElement)("p",{className:"itsec-card-active-lockouts__description"},e.description),t&&t.history.length>0&&Object(s.createElement)(s.Fragment,null,Object(s.createElement)("hr",null),Object(s.createElement)("div",{className:"itsec-card-active-lockouts__history"},Object(s.createElement)("h4",{className:"itsec-card-active-lockouts__history-title"},Object(n.__)("History","better-wp-security")),Object(s.createElement)("ul",null,t.history.map(this.renderHistory)))))}}re()(he,"defaultProps",{master:{},isVisible:!1});var Oe=he;a("MPLY");function fe(e){let{master:t}=e;return Object(s.createElement)(s.Fragment,null,Object(s.createElement)("time",{className:"itsec-card-active-lockouts__start-time",dateTime:t.start_gmt,title:Object(w.dateI18n)("M d, Y g:s A",t.start_gmt)},Object(n.sprintf)(Object(n.__)("%s ago","better-wp-security"),t.start_gmt_relative)),Object(s.createElement)("h3",{className:"itsec-card-active-lockouts__label"},t.label),Object(s.createElement)("p",{className:"itsec-card-active-lockouts__description"},t.description))}const pe=L()((function(e,t){return e.map(e=>({...e,links:t}))}));const je="active-lockouts",_e={render:Object(u.compose)([Object(f.g)("query",500,{leading:!0}),u.pure])((function(e){let{card:t,config:a}=e;const[c,r]=Object(s.useState)(0),[i,o]=Object(s.useState)([]),[l,u]=Object(s.useState)(""),{isQuerying:m}=Object(b.useSelect)(e=>({isQuerying:e("ithemes-security/dashboard").isQueryingDashboardCard(t.id)}),[t.id]),{queryDashboardCard:O,refreshDashboardCard:f}=Object(b.useDispatch)("ithemes-security/dashboard"),j=e=>r(e);return Object(s.createElement)("div",{className:"itsec-card--type-active-lockouts"},Object(s.createElement)(H,null,Object(s.createElement)(J,{isSmall:!0,select:j,selectedId:c}),Object(s.createElement)(T,{card:t,config:a})),0===c&&Object(s.createElement)("div",{className:"itsec-card-active-lockouts__search-container"},Object(s.createElement)(h.i,{value:l,onChange:e=>{u(e),O(t.id,e?{search:e}:{})},placeholder:Object(n.__)("Search Lockouts","better-wp-security"),isSearching:m,surfaceVariant:"secondary"})),Object(p.isEmpty)(t.data.lockouts)?Object(s.createElement)(ae,{title:Object(n.__)("All Clear!","better-wp-security"),text:Object(n.__)("No users are currently locked out of your site.","better-wp-security")}):Object(s.createElement)(X,{masters:pe(t.data.lockouts,t._links),detailRender:Oe,masterRender:fe,mode:"list",selectedId:c,select:j,isSmall:!0}),c>0&&t._links["ithemes-security:release-lockout"]&&Object(s.createElement)($,null,Object(s.createElement)("span",{className:"itsec-card-footer__action"},Object(s.createElement)(d.Button,{isPrimary:!0,isSmall:!0,"aria-disabled":i.includes(c),isBusy:i.includes(c),onClick:async e=>{e.preventDefault(),o([...i,c]);try{await me.release(t._links["ithemes-security:release-lockout"][0].href.replace("{lockout_id}",c))}catch(e){console.warn(e)}await f(t.id),r(0),o(i.filter(e=>e!==c))}},Object(n.__)("Release Lockout","better-wp-security")))))})),elementQueries:[{type:"width",dir:"max",px:500}]};var ye=a("JZP9"),ge=a("49++");function Ee(e){let{query:t,isQuerying:a}=e;const c=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const{types:t,byType:a}=Object(b.useSelect)(e=>{const t=e("ithemes-security/core").getActorTypes()||[],a={};for(const c of t)a[c.slug]=e("ithemes-security/core").getActors(c.slug);return{types:t,byType:a}},[]),c=[];c.push({label:e,value:""});for(const e of t){c.push({label:Object(n.sprintf)(Object(n.__)("Any %s","better-wp-security"),e.label),value:e.slug,optgroup:e.label});for(const t of a[e.slug]||[])c.push({label:t.label,value:e.slug+":"+t.id,optgroup:e.label})}return c}(Object(n.__)("All","better-wp-security")),[r,i]=Object(s.useState)({search:"",actor_id:"",actor_type:""}),o=e=>{const a={...r,...e};i(a),t("main",{...Object(p.omitBy)(a,e=>""===e),per_page:100})};return Object(s.createElement)("section",{className:"itsec-card-banned-users__search"},Object(s.createElement)(ge.s,{options:c,hideLabelFromVision:!0,label:Object(n.__)("Ban Reason","better-wp-security"),value:r.actor_type&&r.actor_id?r.actor_type+":"+r.actor_id:r.actor_type,onChange:e=>{if(""===e)o({actor_type:"",actor_id:""});else{const[t,a=""]=e.split(":");o({actor_type:t,actor_id:a})}}}),Object(s.createElement)(h.i,{value:r.search,onChange:e=>o({search:e}),isSearching:a,surfaceVariant:"secondary",placeholder:Object(n.__)("Search Bans","better-wp-security")}))}function Ne(e){let{master:t}=e;return Object(s.createElement)(s.Fragment,null,Object(s.createElement)("th",{scope:"row",className:Z()("itsec-card-banned-users__bans--column-label","itsec-card-banned-users__ban--actor-type-"+(t.created_by?t.created_by.type:"none"),t.created_by&&"itsec-card-banned-users__ban--actor-id-"+t.created_by.id)},Object(s.createElement)("span",{className:"itsec-card-banned-users__bans-label"},t.label),t.created_at&&Object(s.createElement)("span",{className:"itsec-card-banned-users__bans-date"},Object(w.dateI18n)("M d, Y g:i A",t.created_at))),Object(s.createElement)("td",{className:"itsec-card-banned-users__bans--column-comment"},t.comment))}function ve(e){let{master:t}=e;const{updateBan:a,deleteBan:c}=Object(b.useDispatch)("ithemes-security/bans"),{createNotice:r}=Object(b.useDispatch)("core/notices"),{isUpdating:i,isDeleting:o}=Object(b.useSelect)(e=>({isUpdating:e("ithemes-security/bans").isUpdating(t),isDeleting:e("ithemes-security/bans").isDeleting(t)})),[l,u]=Object(s.useState)(t.comment),m=Object(Y.i)(t,"allow",!1).includes("PUT"),h=Object(p.flatten)(Object.values(Object(p.get)(t,"_links",{}))).filter(e=>"text/html"===e.media);return Object(s.createElement)("div",{className:"itsec-card-banned-users__ban"},Object(s.createElement)("div",{className:"itsec-card-banned-users__ban-top"},Object(s.createElement)("dl",null,Object(s.createElement)("dt",null,Object(n.__)("Host","better-wp-security")),Object(s.createElement)("dd",null,t.label),Object(s.createElement)("dt",null,Object(n.__)("Time","better-wp-security")),Object(s.createElement)("dd",null,t.created_at&&Object(w.dateI18n)("M d, Y g:i A",t.created_at)),Object(s.createElement)("dt",null,Object(n.__)("Source","better-wp-security")),Object(s.createElement)("dd",null,t.created_by&&t.created_by.label),!m&&Object(s.createElement)(React.Fragment,null,Object(s.createElement)("dt",null,Object(n.__)("Notes","better-wp-security")),Object(s.createElement)("dd",null,t.comment))),Object(s.createElement)("ul",{className:"itsec-card-banned-users__ban-actions"},Object(Y.i)(t,"allow",!1).includes("DELETE")&&Object(s.createElement)("li",null,Object(s.createElement)(d.Button,{isLink:!0,isBusy:o,onClick:()=>c(t),icon:"dismiss"},Object(n.__)("Remove Ban","better-wp-security"))),h.map(e=>Object(s.createElement)("li",{key:e.href},Object(s.createElement)("a",{href:e.href},Object(s.createElement)(d.Icon,{icon:"arrow-right-alt"}),e.title))))),m&&Object(s.createElement)(d.TextareaControl,{className:"itsec-card-banned-users__ban-notes",label:Object(n.__)("Notes","better-wp-security"),value:l,onChange:u,onBlur:()=>l!==t.comment&&(async()=>{const e=await a(t,{comment:l});e instanceof Error&&r("error",e.message,{context:"ithemes-security"})})(),readOnly:i,maxLength:255,rows:4}))}function ke(e){let{isSmall:t,onSelect:a,selected:c}=e;const{fetchQueryNextPage:r}=Object(b.useDispatch)("ithemes-security/bans"),{bans:i,hasNext:o,isQuerying:l}=Object(b.useSelect)(e=>({bans:e("ithemes-security/bans").getBans(),hasNext:!!e("ithemes-security/bans").getQueryHeaderLink("main","next"),isQuerying:e("ithemes-security/bans").isQuerying("main")}));return Object(s.createElement)(X,{masters:i,detailRender:ve,masterRender:Ne,selectedId:c,select:a,idProp:Y.h,direction:"vertical",borderless:!0,isSmall:t,hasNext:o,loadNext:()=>r("main"),isQuerying:l},Object(s.createElement)("thead",null,Object(s.createElement)("tr",null,Object(s.createElement)("th",{className:"itsec-card-banned-users__bans--column-label"},Object(n.__)("Host","better-wp-security")),Object(s.createElement)("th",{className:"itsec-card-banned-users__bans--column-comment"},Object(n.__)("Notes","better-wp-security")))))}var we=a("V7jF"),Ie=a("tMTs");const Ce=Object(we.c)(Ie.b),Le={disableInlineErrors:!0};function xe(e){let{id:t,createForm:a,save:c,setSaving:r,afterSave:n}=e;const i=Object(s.useRef)(null),[o,l]=Object(s.useState)({}),[d,u]=Object(s.useState)({}),{createNotice:m}=Object(b.useDispatch)("core/notices"),h=Object(s.useMemo)(()=>{if(a)return Object(Y.k)(a.submissionSchema,a.submissionSchema.uiSchema||{})},[a]);return Object(s.createElement)("section",{className:"itsec-card-banned-users__create"},h&&Object(s.createElement)(Ce,{id:t,idPrefix:t+"_part",formData:o,onChange:e=>l(e.formData),onSubmit:async e=>{r(!0),u({});const t=await c(a.href,e.formData);if(r(!1),t instanceof Error)if("rest_invalid_param"===t.code&&Object(p.isObject)(t.data.params)){const e=Object(p.mapValues)(t.data.params,e=>({__errors:[e]}));u(e)}else m("error",t.message,{context:"ithemes-security"});else if(n(),l({}),i&&i.current){const e=i.current.formElement.querySelector("input");e&&e.focus()}},schema:h,uiSchema:h.uiSchema||{},omitExtraData:!0,liveValidate:!Object(p.isEmpty)(o),extraErrors:d,formContext:Le,ref:i},Object(s.createElement)(React.Fragment,null)))}a("/Nrb");const Se="banned-users-list",De={render:function(e){let{card:t,config:a,eqProps:c}=e;const[r,i]=Object(s.useState)(!1),[o,l]=Object(s.useState)(!1),{schema:u,isQuerying:m}=Object(b.useSelect)(e=>({schema:e("ithemes-security/core").getSchema("ithemes-security-ban"),isQuerying:e("ithemes-security/bans").isQuerying("main")}),[]),{createBan:h,query:O,invalidateResolutionForStoreSelector:f}=Object(b.useDispatch)("ithemes-security/bans"),p=Object(ye.a)(O,500),[j,_]=Object(s.useState)(0),y=c["max-height"]&&c["max-height"].includes("500px"),g="itsec-ban-card-create-form__"+t.id;return Object(s.createElement)("div",{className:Z()("itsec-card--type-banned-users",{"itsec-card-banned-users--creating":r})},Object(s.createElement)(H,null,Object(s.createElement)(J,{isSmall:y,select:_,selectedId:j}),Object(s.createElement)(T,{card:t,config:a})),Object(s.createElement)(Ee,{query:p,isQuerying:m}),Object(s.createElement)(ke,{selected:!r&&j,onSelect:e=>{_(e),i(!1)},isSmall:y}),r&&Object(s.createElement)(xe,{id:g,createForm:r,save:h,setSaving:l,afterSave:()=>f("getBans")}),Object(s.createElement)($,null,r&&Object(s.createElement)(React.Fragment,null,Object(s.createElement)("span",{className:"itsec-card-footer__action"},Object(s.createElement)(d.Button,{isLink:!0,isSmall:!0,disabled:o,onClick:()=>i(!1)},Object(n.__)("Cancel","better-wp-security"))),Object(s.createElement)("span",{className:"itsec-card-footer__action"},Object(s.createElement)(d.Button,{isPrimary:!0,isSmall:!0,form:g,type:"submit",isBusy:o,disabled:o},Object(n.__)("Save","better-wp-security")))),!r&&Object(s.createElement)(React.Fragment,null,null==u?void 0:u.links.filter(e=>"create-form"===e.rel).map(e=>Object(s.createElement)("span",{key:e.href,className:"itsec-card-footer__action"},Object(s.createElement)(d.Button,{isSmall:!0,isPrimary:!0,onClick:()=>i(!r&&e)},e.title))))))},elementQueries:[{type:"height",dir:"max",px:500}]};function Me(){const{registerCard:e}=Object(b.useDispatch)("ithemes-security/dashboard");Object(f.f)(Me,()=>[c,r].forEach(t=>{let{slug:a,settings:c}=t;return e(a,c)}))}var Ae=a("Mmq9");a("tsan");function Re(){const{requesting:e,siteInfo:t}=Object(b.useSelect)(e=>({siteInfo:e("ithemes-security/core").getSiteInfo(),dashboards:e("ithemes-security/dashboard").getAvailableDashboards(),requesting:e("ithemes-security/dashboard").isRequestingDashboards()}));let a;if(t){const e=Object(Ae.getPath)(t.url);a=Object(Ae.getAuthority)(t.url),e&&(a+="/"+e)}return!e&&Object(s.createElement)("div",{className:"itsec-admin-bar"},Object(s.createElement)("div",{className:"itsec-admin-bar__primary"},Object(s.createElement)(O.AdminBarSlot,{type:"primary"})),Object(s.createElement)("div",{className:"itsec-admin-bar__secondary"},Object(s.createElement)("span",{className:"itsec-admin-bar__url"},a)))}a("tW4V"),a("oidH");var Be=a("ChGz"),Te=a("pVnL"),He=a.n(Te);var Pe=Object(u.createHigherOrderComponent)(e=>{var t;return t=class extends s.Component{constructor(){super(...arguments),re()(this,"state",{width:1280,breakpoint:null}),re()(this,"mounted",!1),re()(this,"ref",null),re()(this,"onWindowResize",()=>{if(!this.mounted)return;const e=Object(s.findDOMNode)(this);if(e instanceof window.HTMLElement){const t=e.offsetWidth,a=Be.Responsive.utils.getBreakpointFromWidth(B.a,t);this.setState({width:t,breakpoint:a})}})}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,...a}=this.props;return t&&!this.mounted?Object(s.createElement)("div",{className:this.props.className,style:this.props.style}):Object(s.createElement)(e,He()({},a,{width:this.state.width,breakpoint:this.state.breakpoint}))}},re()(t,"defaultProps",{measureBeforeMount:!0}),t},"widthProvider"),Ve=a("6JX1");a("72mH");var ze=Object(u.pure)((function(e){let{id:t,dashboardId:a,className:c,gridWidth:r,children:n,...i}=e;const{card:o,config:l}=Object(b.useSelect)(e=>({card:e("ithemes-security/dashboard").getDashboardCard(t),config:e("ithemes-security/dashboard").getDashboardCardConfig(t)||{}}),[t]),d=function(e){const t=Object(b.useSelect)(t=>t("ithemes-security/dashboard").getRegisteredCard(e.slug),[e.slug]);if(null!=t&&t.render)return t.render;switch(e.type){case"line":return P;case"pie":return Q}return null}(l),u=function(e,t,a){const c=Object(b.useSelect)(t=>t("ithemes-security/dashboard").getRegisteredCard(e.slug),[e.slug]),r=null==c?void 0:c.elementQueries;return Object(s.useMemo)(()=>{if(!r)return{};const e={height:t.height?Object(p.toInteger)(t.height.replace("px","")):0};t.width&&t.width.endsWith("%")?e.width=Object(p.toInteger)(t.width.replace("%",""))*a/100:e.width=t.width?Object(p.toInteger)(t.width.replace("px","")):0;const c={};for(const t of r){if(!e[t.type])continue;let a=!1;switch(t.dir){case"max":a=e[t.type]<=t.px;break;case"min":a=e[t.type]>=t.px}a&&(c[`${t.dir}-${t.type}`]=(c[`${t.dir}-${t.type}`]||"")+t.px+"px ")}return Object(p.mapValues)(c,e=>e.trim())},[r,t,a])}(l,i.style,r);return"unknown"===o.card?Object(s.createElement)("article",He()({className:Z()(c,"itsec-card","itsec-card--unknown")},i),Object(s.createElement)(ee,{card:o,dashboardId:a})):d?Object(s.createElement)("article",He()({className:Z()(c,"itsec-card"),id:"itsec-card-"+o.id},i,u),Object(s.createElement)(Ve.ErrorBoundary,{FallbackComponent:Object(f.k)({card:o,config:l})(te)},Object(s.createElement)(d,{card:o,config:l,dashboardId:a,eqProps:u})),n):Object(s.createElement)("article",He()({className:Z()(c,"itsec-card","itsec-card--no-rendered")},i),Object(s.createElement)(te,{card:o,config:l}))}));var Fe=Object(u.compose)([Object(b.withDispatch)(e=>({openEditCards:e("ithemes-security/dashboard").openEditCards}))])((function(e){let{openEditCards:t}=e;return Object(s.createElement)("div",{className:"itsec-card-grid-empty-state"},Object(s.createElement)(d.Button,{onClick:t},Object(s.createElement)(d.Dashicon,{icon:"plus-alt",size:60}),Object(s.createElement)("span",null,Object(n.__)("Add Security Cards","better-wp-security"))))}));a("SVg7");class qe extends s.Component{constructor(e){super(e),re()(this,"_onLayoutChange",(e,t)=>{if(!Object(B.e)(t,this.state.layout)){this.setState({layout:t});const e=Object(B.n)(this.props.dashboardId,t);this.props.saveLayout(this.props.dashboardId,e)}}),re()(this,"onBreakpointChange",e=>{this.setState({breakpoint:e})}),re()(this,"onStartMove",()=>{this.setState({isMoving:!0})}),re()(this,"onStopMove",()=>{this.setState({isMoving:!1})}),this.state={layout:Object(B.l)(e.dashboardId,e.cards,e.layout),isMoving:!1,breakpoint:e.breakpoint||"wide",breakpointInitialized:!!e.breakpoint},this.onLayoutChange=Object(p.debounce)(this._onLayoutChange,1e3)}componentDidUpdate(e){if(this.state.breakpointInitialized||!this.props.breakpoint||e.breakpoint||this.setState({breakpoint:this.props.breakpoint,breakpointInitialized:!0}),this.props.layout!==e.layout&&(this.props.dashboardId!==e.dashboardId||this.props.cards.length!==e.cards.length)){const e=Object(B.l)(this.props.dashboardId,this.props.cards,this.props.layout);this.setState({layout:e})}if(this.props.dashboardId===e.dashboardId&&this.props.cards.length>e.cards.length){const e=Object(B.l)(this.props.dashboardId,this.props.cards,Object(B.n)(this.props.dashboardId,this.state.layout));this.setState({layout:e}),this.props.saveLayout(this.props.dashboardId,Object(B.n)(this.props.dashboardId,e))}}componentWillUnmount(){this.onLayoutChange.cancel()}render(){const{cards:e,dashboardId:t,usingTouch:a}=this.props;return e.length?Object(s.createElement)(Be.Responsive,{breakpoints:B.a,onBreakpointChange:this.onBreakpointChange,cols:B.d,rowHeight:200,width:this.props.width,layouts:this.state.layout,onLayoutChange:this.onLayoutChange,margin:[20,20],isDraggable:!a,isResizable:!a,className:this.state.isMoving?"itsec-card-grid--moving":"",draggableHandle:".itsec-card-header, .itsec-card--unknown, .itsec-card__drag-handle",onDragStart:this.onStartMove,onDragStop:this.onStopMove,onResizeStart:this.onStartMove,onResizeStop:this.onStopMove},Object(B.k)(e,this.state.layout,this.state.breakpoint).map(e=>Object(s.createElement)(ze,{id:e.id,dashboardId:t,key:e.id.toString(),gridWidth:this.props.width}))):Object(s.createElement)(Fe,null)}}var We=Object(u.compose)([Object(b.withSelect)((e,t)=>({cards:e("ithemes-security/dashboard").getDashboardCards(t.dashboardId),layout:e("ithemes-security/dashboard").getDashboardLayout(t.dashboardId),usingTouch:e("ithemes-security/dashboard").isUsingTouch(),cardsLoaded:e("ithemes-security/dashboard").areCardsLoaded(t.dashboardId),layoutLoaded:e("ithemes-security/dashboard").isLayoutLoaded(t.dashboardId)})),Object(u.ifCondition)(e=>{let{cardsLoaded:t,layoutLoaded:a}=e;return t&&a}),Pe,u.pure,Object(b.withDispatch)((e,t)=>({openEditCards:e("ithemes-security/dashboard").openEditCards,saveLayout:e("ithemes-security/dashboard").saveDashboardLayout,refresh(){e("ithemes-security/dashboard").refreshDashboardCards(t.dashboardId)}})),Object(f.h)(12e4,e=>{let{refresh:t}=e;return t()})])(qe),Ze=a("fber"),Ye=a.n(Ze),Qe=a("oBCA"),Ue=a.n(Qe);a("qrrL");function $e(){const e=Object(u.useInstanceId)($e),[t,a]=Object(s.useState)(""),[c,r]=Object(s.useState)(""),{canCreate:i,canCreateLoaded:o,addingScratch:l,addingDefault:m}=Object(b.useSelect)(e=>({canCreate:e("ithemes-security/dashboard").canCreateDashboards(),canCreateLoaded:e("ithemes-security/dashboard").isCanCreateDashboardsLoaded(),addingScratch:e("ithemes-security/dashboard").isAddingDashboard("create-dashboard-scratch"),addingDefault:e("ithemes-security/dashboard").isAddingDashboard("create-dashboard-default")})),{addDashboard:h}=Object(b.useDispatch)("ithemes-security/dashboard");if(!i&&o)return Object(s.createElement)("div",{className:"itsec-create-dashboard"},Object(s.createElement)("p",null,Object(n.__)("You don’t have permission to create new dashboards. Try switching to a dashboard or ask an administrator to invite you to one.","better-wp-security")));const O=e=>a=>{a.preventDefault();const r={};switch(e){case"scratch":r.label=c;break;case"default":r.label=t,r.preset="default";break;default:return}h(r,"create-dashboard-"+e)};return Object(s.createElement)("div",{className:"itsec-create-dashboard"},Object(s.createElement)("section",{className:"itsec-create-dashboard__start itsec-create-dashboard__start--default"},Object(s.createElement)("header",null,Object(s.createElement)(Ye.a,{height:100}),Object(s.createElement)("h2",null,Object(n.__)("Start with the default layout.","better-wp-security")),Object(s.createElement)("p",null,Object(n.__)("You can continue to customize this later.","better-wp-security"))),Object(s.createElement)("form",{onSubmit:O("default")},Object(s.createElement)(d.TextControl,{className:"itsec-create-dashboard__name",label:Object(n.__)("Dashboard Name","better-wp-security"),placeholder:Object(n.__)("Dashboard Name…","better-wp-security"),id:"itsec-create-dashboard__name--default-"+e,value:t,onChange:e=>a(e),disabled:m||l}),Object(s.createElement)("div",{className:"itsec-create-dashboard__trigger-container"},Object(s.createElement)(d.Button,{className:"itsec-create-dashboard__trigger",type:"submit",isBusy:m,disabled:l},Object(n.__)("Create Board","better-wp-security"))))),Object(s.createElement)("section",{className:"itsec-create-dashboard__start itsec-create-dashboard__start--scratch"},Object(s.createElement)("header",null,Object(s.createElement)(Ue.a,{height:100,className:"itsec-create-dashboard__scratch-icon"}),Object(s.createElement)("h2",null,Object(n.__)("Start from Scratch.","better-wp-security")),Object(s.createElement)("p",null,Object(n.__)("Start building a dashboard with security cards.","better-wp-security"))),Object(s.createElement)("form",{onSubmit:O("scratch")},Object(s.createElement)(d.TextControl,{className:"itsec-create-dashboard__name",label:Object(n.__)("Dashboard Name","better-wp-security"),placeholder:Object(n.__)("Dashboard Name…","better-wp-security"),id:"itsec-create-dashboard__name--name-"+e,value:c,onChange:e=>r(e),disabled:m||l}),Object(s.createElement)("div",{className:"itsec-create-dashboard__trigger-container"},Object(s.createElement)(d.Button,{className:"itsec-create-dashboard__trigger",type:"submit",isBusy:l,disabled:m},Object(n.__)("Create Board","better-wp-security"))))))}var Ge=Object(u.compose)([Object(b.withSelect)((e,t)=>({cardAtLimit:e("ithemes-security/dashboard").isCardAtDashboardLimit(t.dashboardId,t.ldo.aboutLink),isAdding:e("ithemes-security/dashboard").isAddingCard(`edit-cards-add-${t.ldo.aboutLink}-to-${t.dashboardId}`)})),Object(b.withDispatch)((e,t)=>({add(a){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e("ithemes-security/dashboard").addDashboardCard(a,c,`edit-cards-add-${t.ldo.aboutLink}-to-${t.dashboardId}`)}}))])((function(e){let{ldo:t,cardAtLimit:a,isAdding:c,add:r}=e;return!a&&Object(s.createElement)("li",{className:"itsec-edit-cards__card-choice itsec-edit-cards__card-choice--add"},Object(s.createElement)("span",{className:"itsec-edit-cards__card-choice-title"},t.title),Object(s.createElement)(d.Button,{disabled:c,onClick:()=>r(t.href),className:"itsec-edit-cards__action itsec-edit-cards__action--add",label:Object(n.__)("Add","better-wp-security"),icon:"plus",showTooltip:!1}))}));var Ke=Object(u.compose)([Object(b.withSelect)((e,t)=>({config:e("ithemes-security/dashboard").getAvailableCard(t.card.card)})),Object(b.withDispatch)((e,t)=>({remove:()=>e("ithemes-security/dashboard").removeDashboardCard(t.dashboardId,t.card)}))])((function(e){let{card:t,config:a,remove:c}=e;return Object(s.createElement)("li",{className:"itsec-edit-cards__card-choice itsec-edit-cards__card-choice--remove"},Object(s.createElement)(d.Button,{className:"itsec-edit-cards__action itsec-edit-cards__action--remove",label:Object(n.__)("Remove","better-wp-security"),icon:"no",showTooltip:!1,onClick:c}),Object(s.createElement)("span",{className:"itsec-edit-cards__card-choice-title"},Object(B.i)(t,a)))}));a("oX45");const Je=L()(e=>Object(p.sortBy)(e,[e=>{const t=Object(b.select)("ithemes-security/dashboard").getAvailableCard(e.card);return Object(B.i)(e,t)}]));var Xe=Object(u.compose)([Object(b.withSelect)((e,t)=>({cards:e("ithemes-security/dashboard").getDashboardCards(t.dashboardId),isAdding:e("ithemes-security/dashboard").isAddingCard(t.selected,{}),availableCardLDOs:e("ithemes-security/dashboard").getDashboardAddableCardLDOs(t.dashboardId)}))])((function(e){let{dashboardId:t,cards:a,availableCardLDOs:c}=e;return Object(s.createElement)("div",{className:"itsec-edit-cards"},Object(s.createElement)("header",null,Object(s.createElement)("h3",null,Object(n.__)("Edit Cards","better-wp-security")),Object(s.createElement)("p",null,Object(n.__)("Add or remove cards on your dashboard.","better-wp-security"))),Object(s.createElement)("section",null,Object(s.createElement)("ul",{className:"itsec-edit-cards__card-choices"},c.map(e=>Object(s.createElement)(Ge,{ldo:e,key:e.href,dashboardId:t})),Je(a).map(e=>Object(s.createElement)(Ke,{key:e.id,card:e,dashboardId:t})),Object(s.createElement)(O.EditCardsSlot,null))))})),et=(a("VbFH"),function(e){let{dashboardId:t}=e;const a=Object(B.o)(),c=Object(Y.o)("settings"),{canManage:r}=Object(B.p)(),{canCreate:i,canEdit:o,editingCards:l}=Object(b.useSelect)(e=>({canCreate:e("ithemes-security/dashboard").canCreateDashboards(),canEdit:e("ithemes-security/dashboard").canEditDashboard(t),editingCards:e("ithemes-security/dashboard").isEditingCards()}),[t]),{openEditCards:u,closeEditCards:m}=Object(b.useDispatch)("ithemes-security/dashboard");return a||r?Object(s.createElement)("div",{className:"itsec-dashboard-toolbar"},Object(s.createElement)(d.Toolbar,{label:Object(n.__)("Dashboard Toolbar","better-wp-security")},r&&Object(s.createElement)(d.ToolbarButton,{text:Object(n.__)("Settings","better-wp-security"),icon:"admin-settings",href:c}),Object(s.createElement)(O.AdminBarSlot,null),o&&Object(s.createElement)(React.Fragment,null,Object(s.createElement)(d.ToolbarButton,{text:Object(n.__)("Edit Cards","better-wp-security"),icon:"layout",className:"itsec-admin-bar-edit-cards__trigger","aria-expanded":l,onClick:l?m:u}),l&&Object(s.createElement)(d.Popover,{className:"itsec-admin-bar-edit-cards__content",position:"bottom",headerTitle:Object(n.__)("Edit Cards","better-wp-security"),expandOnMobile:!0,onFocusOutside:m,onClose:m,focusOnMount:"container"},Object(s.createElement)(Xe,{dashboardId:t,close:m}))),(o||i)&&Object(s.createElement)(tt,null))):null});function tt(){const{page:e}=Object(b.useSelect)(e=>({page:e("ithemes-security/dashboard").getCurrentPage()})),{viewHelp:t,viewPrevious:a}=Object(b.useDispatch)("ithemes-security/dashboard");return Object(s.createElement)(d.ToolbarButton,{icon:"editor-help",className:"itsec-admin-bar__help",onClick:()=>{"help"===e?a():t()},text:"help"===e?Object(n.__)("Exit Help","better-wp-security"):Object(n.__)("Help","better-wp-security")})}a("ixw9");function at(){const{page:e}=Object(b.useSelect)(e=>({page:e("ithemes-security/dashboard").getCurrentPage()})),{viewHelp:t,viewPrevious:a}=Object(b.useDispatch)("ithemes-security/dashboard");return Object(s.createElement)("div",{className:"itsec-dashboard-help"},Object(s.createElement)("div",{className:"itsec-help-header"},Object(s.createElement)("h1",{className:"itsec-help-header__title"},Object(n.__)("Help","better-wp-security")),Object(s.createElement)(d.Button,{onClick:()=>{"help"===e?a():t()},icon:"arrow-left-alt",text:Object(n.__)("Back","better-wp-security"),className:"itsec-help-header__back-link"})),Object(s.createElement)(ge.k,{topic:"dashboard"}))}a("x31Q");const ct=Object(u.pure)(e=>{let{page:t,dashboardId:a}=e;switch(Me(),t){case"view-dashboard":return Object(s.createElement)(We,{dashboardId:a});case"create-dashboard":return Object(s.createElement)($e,null);case"help":return Object(s.createElement)(at,null);default:return null}});function rt(e){let{context:t}=e;const{page:a,primaryDashboard:c,dashboardId:r,isUsingTouch:n,notices:i}=Object(b.useSelect)(e=>({page:e("ithemes-security/dashboard").getCurrentPage(),primaryDashboard:e("ithemes-security/dashboard").getPrimaryDashboard(),dashboardId:e("ithemes-security/dashboard").getViewingDashboardId(),isUsingTouch:e("ithemes-security/dashboard").isUsingTouch(),notices:e("core/notices").getNotices("ithemes-security")}),[]),{usingTouch:o,viewDashboard:p,viewCreateDashboard:j}=Object(b.useDispatch)("ithemes-security/dashboard"),{removeNotice:_}=Object(b.useDispatch)("core/notices");Object(f.b)("touchstart",()=>n||o());const y=Object(u.usePrevious)(c);return Object(s.useEffect)(()=>{void 0===y&&(c?p(c):j())},[c]),void 0===c?null:Object(s.createElement)(l.c,{theme:h.m},Object(s.createElement)(d.SlotFillProvider,null,Object(s.createElement)(B.c.Provider,{value:t},Object(s.createElement)("div",{className:"itsec-dashboard itsec-app-page--"+a},Object(s.createElement)(d.Popover.Slot,null),Object(s.createElement)(d.NoticeList,{notices:i,onRemove:e=>_(e,"ithemes-security")}),Object(s.createElement)(et,{dashboardId:r}),Object(s.createElement)(O.BelowToolbarSlot,{fillProps:{page:a,dashboardId:r}}),Object(s.createElement)(Re,{dashboardId:r}),Object(s.createElement)(ct,{page:a,dashboardId:r})),Object(s.createElement)(m.PluginArea,null))))}function st(e){let{title:t}=e;return Object(s.createElement)("li",{className:"itsec-edit-cards__card-choice itsec-edit-cards__card-choice--promo"},Object(s.createElement)("span",{className:"itsec-edit-cards__card-choice-title"},Object(s.createElement)("span",null,Object(n.__)("Pro: ","better-wp-security")),t),Object(s.createElement)(d.Button,{className:"itsec-edit-cards__action itsec-edit-cards__action--add",label:Object(n.__)("Go Pro","better-wp-security"),href:"https://ithemes.com/security/?utm_source=wordpressadmin&utm_medium=dashboardcard&utm_campaign=itsecfreecta",icon:"external"}))}a.p=window.itsecWebpackPublicPath,Object(n.setLocaleData)({"":{}},"better-wp-security"),o()(()=>{const e=document.getElementById("itsec-dashboard-root");if(e){const t="1"===e.dataset.canManage,a=e.dataset.installType;Object(s.render)(Object(s.createElement)(rt,{context:{canManage:t,installType:a}}),e)}})},VbFH:function(e,t,a){},Y8OO:function(e,t){!function(){e.exports=this.wp.domReady}()},YLtl:function(e,t){!function(){e.exports=this.lodash}()},Z6ex:function(e,t,a){"use strict";a.d(t,"c",(function(){return u})),a.d(t,"p",(function(){return b})),a.d(t,"o",(function(){return m})),a.d(t,"b",(function(){return h})),a.d(t,"d",(function(){return O})),a.d(t,"a",(function(){return f})),a.d(t,"n",(function(){return j})),a.d(t,"l",(function(){return _})),a.d(t,"m",(function(){return y})),a.d(t,"g",(function(){return g})),a.d(t,"e",(function(){return N})),a.d(t,"k",(function(){return v})),a.d(t,"j",(function(){return k})),a.d(t,"i",(function(){return w})),a.d(t,"f",(function(){return I})),a.d(t,"h",(function(){return C}));var c=a("YLtl"),r=a("4eJC"),s=a.n(r),n=a("1ZqX"),i=a("l3Sj"),o=a("g56x"),l=a("GRId"),d=a("Td6G");const u=Object(l.createContext)({canManage:!1,installType:""});function b(){return Object(l.useContext)(u)}function m(){const{canCreate:e,canEdit:t}=Object(n.useSelect)(e=>({canCreate:e("ithemes-security/dashboard").canCreateDashboards(),canEdit:e("ithemes-security/dashboard").canEditDashboard(e("ithemes-security/dashboard").getViewingDashboardId())}),[]);return e||t}const h=Object.freeze(["huge","wide","large","medium","mobile"]),O=Object.freeze({huge:8,wide:6,large:4,medium:2,mobile:1}),f=Object.freeze(h.reduce((e,t)=>({...e,[t]:250*O[t]+20*(O[t]-1)}),{})),p=["minW","minH","maxW","maxH"];function j(e,t){const a=Object(n.select)("ithemes-security/dashboard"),c={};for(const e in t){if(!t.hasOwnProperty(e))continue;const r=t[e];for(const t of r){const r=a.getDashboardCard(parseInt(t.i));r&&(c[r.id]?(c[r.id].size[e]={w:t.w,h:t.h},c[r.id].position[e]={x:t.x&&t.x!==1/0?t.x:0,y:t.y&&t.y!==1/0?t.y:0}):c[r.id]={id:r.id,card:r.card,size:{[e]:{w:t.w,h:t.h}},position:{[e]:{x:t.x&&t.x!==1/0?t.x:0,y:t.y&&t.y!==1/0?t.y:0}}})}}return{cards:Object.values(c)}}function _(e,t,a){let{cards:r={}}=a;const s=Object(c.zipObject)(Object.keys(f),Object(c.times)(Object.keys(f).length,()=>[])),i={};for(const t of r){i[t.id]=!0;const a=Object(n.select)("ithemes-security/dashboard").getAvailableCard(t.card);if(a||"unknown"===t.card)for(const c of h)s[c].push(y(e,t,a,c,s[c]))}if(Object.keys(i).length<t.length)for(const a of t)if(!i[a.id]){const t=Object(n.select)("ithemes-security/dashboard").getAvailableCard(a.card);if(t)for(const c of h)s[c].push(y(e,a,t,c,s[c]))}return s}function y(e,t,a,r,s){if(!f[r])return;const i={i:t.id.toString(),x:Object(c.get)(t,["position",r,"x"]),y:Object(c.get)(t,["position",r,"y"]),w:Object(c.get)(t,["size",r,"w"],Object(c.get)(a,["size","defaultW"],1)),h:Object(c.get)(t,["size",r,"h"],Object(c.get)(a,["size","defaultH"],2))};if(a&&a.size)for(const e of p)a.size.hasOwnProperty(e)&&(i[e]=a.size[e]);if(i.minW&&i.minW>i.w&&(i.w=i.minW),i.minH&&i.minH>i.h&&(i.h=i.minH),i.maxW&&i.w>i.maxW&&(i.w=i.maxW),i.maxH&&i.h>i.maxH&&(i.h=i.maxH),s&&void 0===i.x&&void 0===i.x){const e=g(O[r],s,{w:i.w,h:i.h});e&&(i.x=e.x,i.y=e.y)}return i.x=void 0===i.x||null===i.x?0:i.x,i.y=void 0===i.y||null===i.y?1/0:i.y,Object(n.select)("ithemes-security/dashboard").canEditDashboard(e)||(i.static=!0),"unknown"===t.card&&(i.isResizable=!1),i.minW===i.maxW&&i.minH===i.maxH&&(i.isResizable=!1),i}function g(e,t,a){const c=[];for(const a of t){const{x:t,y:r,w:s,h:n}=a;for(let a=0;a<n;a++){c[a]||(c[a]=new Array(e).fill(0));for(let n=0;n<s;n++)c[a+r]||(c[a+r]=new Array(e).fill(0)),c[a+r][n+t]=1}}const{w:r,h:s}=a;for(let t=0;t<c.length;t++)e:for(let a=0;a<e;a++)if(!c[t]||1!==c[t][a]){for(let n=0;n<s;n++)for(let s=0;s<r;s++)if(t+n>c.length||a+s>=e||c[t+n]&&1===c[t+n][a+s])continue e;return{x:a,y:t}}return{x:0,y:c.length}}function E(e,t){return e.x===t.x&&e.y===t.y&&e.w===t.w&&e.h===t.h}const N=s()((function(e,t){if(e===t)return!0;if(Object.keys(e).length!==Object.keys(t).length)return!1;const a=new Map;for(let c=0;c<h.length;c++){const r=h[c];if(e[r]||t[r]){if(!e[r]&&t[r]||e[r]&&!t[r])return!1;if(e[r].length!==t[r].length)return!1;for(let t=0;t<e[r].length;t++)a.set(e[r][t].i,e[r][t]);for(let e=0;e<t[r].length;e++){const c=a.get(t[r][e].i);if(!c)return!1;if(!E(c,t[r][e]))return!1;a.delete(c.i)}if(a.size>0)return!1}}return!0}));const v=s()((function(e,t,a){const r=Object(c.keyBy)(t[a],"i"),s=[...e];return s.sort((function(e,t){const a=e.id.toString(),c=t.id.toString();if(!r[a]&&!r[c])return 0;if(r[a]&&!r[c])return 1;if(!r[a]&&r[c])return-1;const s=r[a].y,n=r[c].y,i=r[a].x,o=r[c].x;return s>n?1:s<n?-1:i>o?1:i<o?-1:0})),s}));const k=s()((function(e,t){const a=Object(c.keyBy)(t.cards,"id"),r=[...e];return r.sort((function(e,t){const c=e.id,r=t.id;if(!a[c]&&!a[r])return 0;if(a[c]&&!a[r])return 1;if(!a[c]&&a[r])return-1;const s=a[c].position.mobile.y,n=a[r].position.mobile.y,i=a[c].position.mobile.x,o=a[r].position.mobile.x;return s>n?1:s<n?-1:i>o?1:i<o?-1:0})),r}));function w(e,t){if(!t)return Object(i.__)("Unknown Card","better-wp-security");let a=t.label;return a=Object(o.applyFilters)("ithemes-security.dashboard.getCardTitle."+t.slug,a,e),Object(o.applyFilters)("ithemes-security.dashboard.getCardTitle",a,e,t)}function I(e,t,a,c){Object.entries(a).forEach(t=>{let[a,c]=t;return e[a]!==c&&console.log(`Prop '${a}' changed`)}),Object.entries(c).forEach(e=>{let[a,c]=e;return t[a]!==c&&console.log(`State '${a}' changed`)})}function C(e){return Object(c.get)(e,["avatar_urls",96],d.a)}},aFxt:function(e,t,a){},cDcd:function(e,t){!function(){e.exports=this.React}()},cruf:function(e,t){!function(){e.exports=this.itsec.dashboard.api}()},faye:function(e,t){!function(){e.exports=this.ReactDOM}()},fber:function(e,t,a){var c=a("cDcd");function r(e){return c.createElement("svg",e,[c.createElement("defs",{key:0},c.createElement("style",null,".itsec-icon-default-layout-113b3__a,.itsec-icon-default-layout-113b3__e,.itsec-icon-default-layout-113b3__j,.itsec-icon-default-layout-113b3__k{fill:#e1f2fc;}.itsec-icon-default-layout-113b3__a,.itsec-icon-default-layout-113b3__e,.itsec-icon-default-layout-113b3__f,.itsec-icon-default-layout-113b3__g,.itsec-icon-default-layout-113b3__i,.itsec-icon-default-layout-113b3__j,.itsec-icon-default-layout-113b3__k{stroke:#0083e3;}.itsec-icon-default-layout-113b3__a{stroke-width:3px;}.itsec-icon-default-layout-113b3__b{fill:#0083e3;}.itsec-icon-default-layout-113b3__c,.itsec-icon-default-layout-113b3__f{fill:#fff;}.itsec-icon-default-layout-113b3__d,.itsec-icon-default-layout-113b3__g,.itsec-icon-default-layout-113b3__h,.itsec-icon-default-layout-113b3__i{fill:none;}.itsec-icon-default-layout-113b3__e,.itsec-icon-default-layout-113b3__i,.itsec-icon-default-layout-113b3__j{stroke-width:2px;}.itsec-icon-default-layout-113b3__h{stroke:#3fa2f7;}.itsec-icon-default-layout-113b3__j,.itsec-icon-default-layout-113b3__k{stroke-miterlimit:10;}")),c.createElement("g",{transform:"translate(-180.964 -417.881)",key:1},[c.createElement("g",{transform:"translate(182 419.381)",key:0},[c.createElement("path",{className:"itsec-icon-default-layout-113b3__a",d:"M349.371,304.5a4.867,4.867,0,0,0-4.871,4.863v86.914a3.244,3.244,0,0,0,3.247,3.242H482.523a3.244,3.244,0,0,0,3.247-3.242V309.363A4.867,4.867,0,0,0,480.9,304.5Z",transform:"translate(-327.18 -304.5)",key:0}),c.createElement("path",{className:"itsec-icon-default-layout-113b3__b",d:"M371,415.666H503.175V334H371Z",transform:"translate(-348.552 -328.291)",key:1}),c.createElement("path",{className:"itsec-icon-default-layout-113b3__c",d:"M373,416.892H504.4V336H373Z",transform:"translate(-350.164 -329.904)",key:2}),c.createElement("path",{className:"itsec-icon-default-layout-113b3__d",d:"M272.384,797.451c-2.16,0-4.861-1.293-6.017-1.844-.164-.079-.281-.135-.368-.174V793H437.654v2.433c-.087.041-.2.095-.368.174-1.146.552-3.828,1.844-5.97,1.844H272.384Z",transform:"translate(-263.871 -698.465)",key:3}),c.createElement("path",{className:"itsec-icon-default-layout-113b3__a",d:"M437.734,792.5H265.5v2.928c.2,0,3.874,2.1,6.686,2.1H431.094c2.793,0,6.44-2.109,6.632-2.109.006,0,.008-.017.008-.017Z",transform:"translate(-263.468 -698.061)",key:4}),c.createElement("path",{className:"itsec-icon-default-layout-113b3__b",d:"M266.363,805l-.193.387H437.63l.193-.387Z",transform:"translate(-264.008 -708.143)",key:5}),c.createElement("path",{className:"itsec-icon-default-layout-113b3__b",d:"M666.481,793.935h-19.6A1.9,1.9,0,0,1,645,792.019V792h23.416v.019a1.9,1.9,0,0,1-1.887,1.916",transform:"translate(-569.527 -697.658)",key:6}),c.createElement("path",{className:"itsec-icon-default-layout-113b3__b",d:"M703.525,319.007a.677.677,0,1,1-.677-.677.678.678,0,0,1,.677.677",transform:"translate(-615.633 -315.654)",key:7}),c.createElement("path",{className:"itsec-icon-default-layout-113b3__e",d:"M20.642,45.638H.9a2.882,2.882,0,0,1-2.9-2.9V-4.1A2.888,2.888,0,0,1,.9-7H20.642a2.863,2.863,0,0,1,2.9,2.9V42.735A2.857,2.857,0,0,1,20.642,45.638Z",transform:"translate(2.194 54.316)",key:8}),c.createElement("path",{className:"itsec-icon-default-layout-113b3__f",d:"M28.529,23.5H5.5V64.333H28.529Z",transform:"translate(-3.855 29.718)",key:9}),c.createElement("path",{className:"itsec-icon-default-layout-113b3__g",d:"M58.04,9.694a.183.183,0,0,1-.194.194H54.364a.194.194,0,1,1,0-.387h3.483a.183.183,0,0,1,.194.194Z",transform:"translate(-43.106 41.009)",key:10}),c.createElement("path",{className:"itsec-icon-default-layout-113b3__g",d:"M62.944.717A.387.387,0,1,1,62.557.33a.388.388,0,0,1,.387.387Z",transform:"translate(-49.558 48.405)",key:11}),c.createElement("path",{className:"itsec-icon-default-layout-113b3__g",d:"M40.944,8.717a.387.387,0,1,1-.387-.387.388.388,0,0,1,.387.387Z",transform:"translate(-31.816 41.953)",key:12}),c.createElement("path",{className:"itsec-icon-default-layout-113b3__h",d:"M130.887,52.5H130.5v3.677h.387c-.025,0,0-.035,0,0V52.5c0,.035-.025,0,0,0Z",transform:"translate(-104.665 6.331)",key:13}),c.createElement("path",{className:"itsec-icon-default-layout-113b3__i",d:"M-2.806,27.33h0c-.13,0-.194.035-.194,0v1.742c0-.035.064,0,.194,0h0V27.33Z",transform:"translate(3 26.63)",key:14}),c.createElement("path",{className:"itsec-icon-default-layout-113b3__i",d:"M-2.806,52H-3c.045,0,0,.035,0,0v3.677c0-.035.045,0,0,0h.194V52Z",transform:"translate(3 6.734)",key:15}),c.createElement("path",{className:"itsec-icon-default-layout-113b3__i",d:"M-2.806,77H-3c.045,0,0,.035,0,0v3.677c0-.035.045,0,0,0h.194V77Z",transform:"translate(3 -13.428)",key:16})]),c.createElement("g",{transform:"translate(253.524 447.613)",key:1},[c.createElement("path",{className:"itsec-icon-default-layout-113b3__j",d:"M2.982,4.465A17.458,17.458,0,0,1,9.228,3.37a.776.776,0,0,1,.78.772h0V5.506s-.114.352.364.215a.746.746,0,0,1,.129-.029c.715-.1,3.758-.418,3.758-.418s.179.06.179-.317V2.986s-.031-.179.334-.226A25.127,25.127,0,0,1,21.7,2.734c.089.01.306-.032.269.478V4.985s-.109.33.4.3c.04,0,.078,0,.118,0,.691.064,3.65.419,3.65.419s.309.125.262-.293V3.38s-.009-.182.266-.164A32.889,32.889,0,0,1,33.73,4.44a.212.212,0,0,1,.17.236v13.2s-.334,10.6-9.007,17.65a17.767,17.767,0,0,1-6.635,3.75.769.769,0,0,1-.466-.037A25.17,25.17,0,0,1,4.475,26.524C4.018,25.388,2.5,21.817,2.5,19.781V5.183A.765.765,0,0,1,2.982,4.465Z",transform:"translate(-2.5 -2.501)",key:0}),c.createElement("path",{className:"itsec-icon-default-layout-113b3__j",d:"M54.534,56.782V51.025a.8.8,0,0,0-.617-.746,54.758,54.758,0,0,0-10.6-1.039h-.232A56.638,56.638,0,0,0,32.417,50.3a.794.794,0,0,0-.617.745v5.781c0,.456.012,7.641,4.7,13.012a27.463,27.463,0,0,0,6.224,5.476.953.953,0,0,0,.9,0,27.428,27.428,0,0,0,6.215-5.476C54.642,64.326,54.536,56.869,54.534,56.782Z",transform:"translate(-27.464 -42.389)",key:1})]),c.createElement("g",{transform:"translate(189.856 486.12)",key:2},[c.createElement("path",{className:"itsec-icon-default-layout-113b3__k",d:"M2.667,3.184A6.075,6.075,0,0,1,4.841,2.8a.27.27,0,0,1,.271.269h0v.474s-.04.122.127.075a.26.26,0,0,1,.045-.01c.249-.033,1.308-.145,1.308-.145s.062.021.062-.11V2.67s-.011-.062.116-.079a8.744,8.744,0,0,1,2.412-.009c.031,0,.107-.011.094.166v.617s-.038.115.14.106h.041c.24.022,1.27.146,1.27.146s.108.043.091-.1V2.807s0-.063.093-.057a11.444,11.444,0,0,1,2.456.426.074.074,0,0,1,.059.082V7.85a8.96,8.96,0,0,1-3.134,6.142,6.182,6.182,0,0,1-2.309,1.3.268.268,0,0,1-.162-.013A8.759,8.759,0,0,1,3.187,10.86,8.255,8.255,0,0,1,2.5,8.514V3.434A.266.266,0,0,1,2.667,3.184Z",transform:"translate(-2.5 -2.501)",key:0}),c.createElement("path",{className:"itsec-icon-default-layout-113b3__k",d:"M39.711,51.864v-2a.277.277,0,0,0-.215-.26,19.055,19.055,0,0,0-3.689-.362h-.081a19.709,19.709,0,0,0-3.712.369.276.276,0,0,0-.215.259V51.88a7.41,7.41,0,0,0,1.634,4.528A9.556,9.556,0,0,0,35.6,58.314a.332.332,0,0,0,.314,0,9.544,9.544,0,0,0,2.163-1.906A7.439,7.439,0,0,0,39.711,51.864Z",transform:"translate(-30.291 -46.856)",key:1})])])])}r.defaultProps={viewBox:"0 0 176.802 102.47"},e.exports=r,r.default=r},g56x:function(e,t){!function(){e.exports=this.wp.hooks}()},gdqT:function(e,t){!function(){e.exports=this.wp.a11y}()},ixw9:function(e,t,a){},l3Sj:function(e,t){!function(){e.exports=this.wp.i18n}()},o7fS:function(e,t,a){},oBCA:function(e,t,a){var c=a("cDcd");function r(e){return c.createElement("svg",e,[c.createElement("defs",{key:0},c.createElement("style",null,".itsec-icon-scratch-layout-9f4ff__a{fill:#fff;}.itsec-icon-scratch-layout-9f4ff__b{fill:#e1f2fc;stroke:#707070;}.itsec-icon-scratch-layout-9f4ff__c{fill:#0083e3;}.itsec-icon-scratch-layout-9f4ff__d{stroke:none;}.itsec-icon-scratch-layout-9f4ff__e{fill:none;}")),c.createElement("g",{transform:"translate(-1056 -520.655)",key:1},[c.createElement("rect",{className:"itsec-icon-scratch-layout-9f4ff__a",width:"39.001",height:"20.501",transform:"translate(1125.858 576.267) rotate(45)",key:0}),c.createElement("rect",{className:"itsec-icon-scratch-layout-9f4ff__a",width:"37.501",height:"20.501",transform:"translate(1073.167 523.325) rotate(45)",key:1}),c.createElement("g",{className:"itsec-icon-scratch-layout-9f4ff__b",transform:"translate(1063.11 597.823) rotate(-45)",key:2},[c.createElement("rect",{className:"itsec-icon-scratch-layout-9f4ff__d",width:"99.254",height:"21.001",key:0}),c.createElement("rect",{className:"itsec-icon-scratch-layout-9f4ff__e",x:"0.5",y:"0.5",width:"98.254",height:"20.001",key:1})]),c.createElement("path",{className:"itsec-icon-scratch-layout-9f4ff__c",d:"M318.38,317.685h0a5.134,5.134,0,1,0-7.26,0A5.138,5.138,0,0,0,318.38,317.685Zm-5.663-1.6a2.875,2.875,0,1,1,4.068,0A2.858,2.858,0,0,1,312.718,316.088Z",transform:"translate(823.787 288.967)",key:3}),c.createElement("path",{className:"itsec-icon-scratch-layout-9f4ff__c",d:"M95.132,23.558s0,0,0,0l.007-.007.31-.31-.007-.008A12.607,12.607,0,0,0,77.626,5.415l-.007-.007-.31.31-.008.008a.009.009,0,0,0,0,.005L3.213,79.81l.03.03a1.733,1.733,0,0,0-.785,1.233L.021,98.869a1.752,1.752,0,0,0,1.735,1.988,1.893,1.893,0,0,0,.238-.015l17.8-2.438a1.749,1.749,0,0,0,1.233-.785l.03.03ZM86.217,5.528a9.112,9.112,0,0,1,7.563,14.2L81.131,7.078A9.044,9.044,0,0,1,86.217,5.528Zm-8.6,4.828L90.5,23.238,21.047,92.693,16.2,87.846,71.951,32.094l-3.338-3.338L12.861,84.508l-4.7-4.7ZM3.8,97.059,5.809,82.4,18.454,95.051Z",transform:"translate(1055.996 519.131)",key:4}),c.createElement("path",{className:"itsec-icon-scratch-layout-9f4ff__c",d:"M28.5,44.631l3.193-3.193L6.135,15.882,16.562,5.455,21.508,10.4,17.92,13.985l2.833,2.833,3.585-3.588,2.883,2.883L23.635,19.7l2.833,2.833,3.588-3.588,2.883,2.883L27.63,27.133l2.833,2.833,5.305-5.305,3.515,3.515L35.7,31.763,38.528,34.6l3.588-3.588,0,0,3.193-3.193L18.16.664a2.256,2.256,0,0,0-3.193,0L1.344,14.285a2.256,2.256,0,0,0,0,3.193Z",transform:"translate(1055.487 520.652)",key:5}),c.createElement("path",{className:"itsec-icon-scratch-layout-9f4ff__c",d:"M261.994,244.481c-.04-.04-.082-.08-.125-.117L233.453,215.95l-8.5,8.5,2.825,2.825,5.308-5.308L257.2,246.081l-10.428,10.428L219.833,229.57l-3.193,3.2L245.176,261.3a2.256,2.256,0,0,0,3.193,0l13.623-13.621s0,0,.005-.005A2.263,2.263,0,0,0,261.994,244.481Z",transform:"translate(893.521 358.693)",key:6})])])}r.defaultProps={viewBox:"0 0 100.176 100"},e.exports=r,r.default=r},oX45:function(e,t,a){},onLe:function(e,t){!function(){e.exports=this.wp.notices}()},qrrL:function(e,t,a){},rl8x:function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},silS:function(e,t,a){},"tI+e":function(e,t){!function(){e.exports=this.wp.components}()},tsan:function(e,t,a){},x31Q:function(e,t,a){},"xR+x":function(e,t,a){},ywyh:function(e,t){!function(){e.exports=this.wp.apiFetch}()},z1rk:function(e,t){!function(){e.exports=this.itsec.packages.data}()}},[["V1Ci",0,4,33,1,2,6,31,3,5]]]);
|
1 |
+
this.itsec=this.itsec||{},this.itsec.dashboard=this.itsec.dashboard||{},this.itsec.dashboard.dashboard=(window.itsecWebpackJsonP=window.itsecWebpackJsonP||[]).push([[15],{"/Nrb":function(e,t,a){},"1ZqX":function(e,t){!function(){e.exports=this.wp.data}()},"6QFD":function(e,t,a){},"72mH":function(e,t,a){},FqII:function(e,t){!function(){e.exports=this.wp.date}()},GRId:function(e,t){!function(){e.exports=this.wp.element}()},K9lf:function(e,t){!function(){e.exports=this.wp.compose}()},MPLY:function(e,t,a){},"MS/V":function(e,t,a){},Mmq9:function(e,t){!function(){e.exports=this.wp.url}()},RxS6:function(e,t){!function(){e.exports=this.wp.keycodes}()},SVg7:function(e,t,a){},Tqx9:function(e,t){!function(){e.exports=this.wp.primitives}()},TvNi:function(e,t){!function(){e.exports=this.wp.plugins}()},V1Ci:function(e,t,a){"use strict";a.r(t),a.d(t,"ConfigContext",(function(){return B.c})),a.d(t,"useConfigContext",(function(){return B.p})),a.d(t,"useCanWrite",(function(){return B.o})),a.d(t,"BREAKPOINT_ORDER",(function(){return B.b})),a.d(t,"GRID_COLUMNS",(function(){return B.d})),a.d(t,"BREAKPOINTS",(function(){return B.a})),a.d(t,"transformGridLayoutToApi",(function(){return B.n})),a.d(t,"transformApiLayoutToGrid",(function(){return B.l})),a.d(t,"transformApiLayoutToGridForCard",(function(){return B.m})),a.d(t,"findSlot",(function(){return B.g})),a.d(t,"areGridLayoutsEqual",(function(){return B.e})),a.d(t,"sortCardsToMatchLayout",(function(){return B.k})),a.d(t,"sortCardsToMatchApiLayout",(function(){return B.j})),a.d(t,"getCardTitle",(function(){return B.i})),a.d(t,"debugChange",(function(){return B.f})),a.d(t,"getAvatarUrl",(function(){return B.h})),a.d(t,"useRegisterCards",(function(){return Me})),a.d(t,"Card",(function(){return ze})),a.d(t,"CardHeader",(function(){return H})),a.d(t,"CardHeaderDate",(function(){return A})),a.d(t,"CardHeaderStatus",(function(){return R})),a.d(t,"CardHeaderTitle",(function(){return T})),a.d(t,"CardFooter",(function(){return $})),a.d(t,"CardFooterSchemaActions",(function(){return U})),a.d(t,"PromoCard",(function(){return nt})),a.d(t,"MasterDetail",(function(){return X})),a.d(t,"MasterDetailBack",(function(){return J}));var c={};a.r(c),a.d(c,"slug",(function(){return je})),a.d(c,"settings",(function(){return _e}));var r={};a.r(r),a.d(r,"slug",(function(){return Se})),a.d(r,"settings",(function(){return De}));var s=a("GRId"),n=a("l3Sj"),i=a("Y8OO"),o=a.n(i),l=a("jgtX"),d=a("tI+e"),u=a("K9lf"),b=a("1ZqX"),m=a("TvNi"),h=(a("onLe"),a("wLpv")),O=a("cruf"),f=(a("z1rk"),a("ppSj")),p=a("YLtl"),j=a("ps87"),_=a("4cdY"),y=a("J+eN"),g=a("b+jq"),E=a("imvK"),v=a("nJDY"),N=a("Yjvw"),k=a("wcMh"),w=a("FqII"),I=a("TXkB"),C=(a("aFxt"),a("4eJC")),L=a.n(C);const x=L()(()=>[{value:"24-hours",label:Object(n.__)("24 Hours","better-wp-security")},{value:"week",label:Object(n.__)("7 Days","better-wp-security")},{value:"30-days",label:Object(n.__)("30 Days","better-wp-security")},{value:"custom",label:Object(n.__)("Custom","better-wp-security")}]),S=new window.Date,D=Object(w.format)("Y-m-d",S.setDate(S.getDate()-60)),M=Object(w.format)("Y-m-d");var A=Object(u.compose)([Object(b.withSelect)((e,t)=>{let{card:a}=t;return{queryArgs:e("ithemes-security/dashboard").getDashboardCardQueryArgs(a.id)||{}}}),Object(b.withDispatch)((e,t)=>{let{card:a}=t;return{update:t=>e("ithemes-security/dashboard").queryDashboardCard(a.id,t)}})])((function(e){let{queryArgs:t,config:a,update:c}=e;const[r,i]=Object(s.useState)(!1),[o,l]=Object(s.useState)(void 0),[u,b]=Object(s.useState)(void 0);let[m,h]=Object(s.useState)(void 0);const O=function(e,t){return e.period?e.period:t.query_args.period?t.query_args.period.default:void 0}(t,a),f=function(e){if(!e)return"";const t=new window.Date;let a,c;switch(e){case"24-hours":return Object(n.__)("24 Hours","better-wp-security");case"30-days":a=Object(w.dateI18n)("M j",t.setDate(t.getDate()-30)),c=Object(w.dateI18n)("M j");break;case"week":a=Object(w.dateI18n)("M j",t.setDate(t.getDate()-7)),c=Object(w.dateI18n)("M j");break;default:a=Object(w.dateI18n)("M j",e.start),c=Object(w.dateI18n)("M j",e.end)}return Object(n.sprintf)(Object(n.__)("%1$s - %2$s","better-wp-security"),a,c)}(O);return m=m||(Object(p.isString)(O)?O:"custom"),Object(s.createElement)("div",{className:"itsec-card-header-date"},Object(s.createElement)(d.Button,{onClick:()=>i(!r),title:f,"aria-expanded":r,"aria-label":Object(n.sprintf)(Object(n.__)("%s (click to change)","better-wp-security"),f)},Object(s.createElement)("span",{className:"itsec-card-header-date__period"},f),Object(s.createElement)(d.Dashicon,{icon:"calendar",className:"itsec-card-header-date__icon"})),r&&Object(s.createElement)(d.Modal,{title:Object(n.__)("Change Date Period","better-wp-security"),onRequestClose:()=>i(!1)},Object(s.createElement)(d.SelectControl,{options:x(),value:m,onChange:e=>h(e)}),"custom"===m&&Object(s.createElement)(s.Fragment,null,Object(s.createElement)(d.TextControl,{type:"date",min:D,max:M,value:o,onChange:e=>l(e),label:Object(n.__)("Start Date","better-wp-security"),placeholder:"YYYY-MM-DD"}),Object(s.createElement)(d.TextControl,{type:"date",min:D,max:M,value:u,onChange:e=>b(e),label:Object(n.__)("End Date","better-wp-security"),placeholder:"YYYY-MM-DD"})),Object(s.createElement)(d.Button,{isPrimary:!0,onClick:e=>{let a;e.preventDefault(),a="custom"===m?{start:o,end:u}:m,c({...t,period:a}),i(!1)}},Object(n.__)("Apply","better-wp-security"))))}));function R(e){let{status:t="protected"}=e;switch(t){case"protected":t=Object(n.__)("Protected","better-wp-security")}return Object(s.createElement)("span",{className:"itsec-card-header-status"},Object(s.createElement)("span",{className:"itsec-card-header-status__label"},Object(n.__)("Status","better-wp-security")),Object(s.createElement)("span",{className:"itsec-card-header-status__status"},t))}var B=a("Z6ex");function T(e){let{card:t,config:a}=e;return Object(s.createElement)("h2",{className:"itsec-card-header-title"},Object(B.i)(t,a))}function H(e){let{children:t}=e;return Object(s.createElement)("header",{className:"itsec-card-header itsec-card__util-padding"},t)}a("xR+x");var P=Object(u.compose)([Object(b.withSelect)((e,t)=>{let{card:a}=t;return{period:(e("ithemes-security/dashboard").getDashboardCardQueryArgs(a.id)||{}).period}})])((function(e){let{card:t,config:a,period:c}=e;c=c||a.query_args.period&&a.query_args.period.default;const r=[],n=[];if(!Object(p.isEmpty)(t.data))for(const e in t.data)if(t.data.hasOwnProperty(e)){for(let a=0;a<t.data[e].data.length;a++){const s=t.data[e].data[a];if(r[a])r[a][e]=s.y;else{const t="24-hours"===c?"g A":"M j";r.push({name:s.t?Object(w.dateI18n)(t,s.t):s.x,[e]:s.y})}}n.push({name:t.data[e].label,dataKey:e})}return Object(s.createElement)("div",{className:"itsec-card--type-line-graph"},Object(s.createElement)(H,null,Object(s.createElement)(T,{card:t,config:a}),Object(s.createElement)(A,{card:t,config:a})),Object(s.createElement)(j.a,{width:"100%",height:"100%"},Object(s.createElement)(_.a,{margin:{top:10,left:-15,right:50,bottom:10},data:r},Object(s.createElement)(y.a,{dataKey:"name"}),Object(s.createElement)(g.a,{allowDecimals:!1}),Object(s.createElement)(E.a,{strokeDasharray:"3 3"}),Object(s.createElement)(v.a,null),Object(s.createElement)(N.a,null),n.map((e,t)=>Object(s.createElement)(k.a,{type:"monotone",dataKey:e.dataKey,name:e.name,key:e.dataKey,stroke:I.i[t],isAnimationActive:!1})))))})),V=a("T92s"),z=a("6gYL"),F=a("0/F4"),q=a("J1Zg"),W=a("TSYQ"),Z=a.n(W),Y=a("Td6G");a("MS/V");function Q(e){let{card:t,config:a}=e;const c=[];let r=0;if(t.data&&t.data.data)for(const e in t.data.data)t.data.data.hasOwnProperty(e)&&(r+=t.data.data[e].sum,c.push({name:t.data.data[e].label,value:t.data.data[e].sum}));const i=r>0,o=i?1:.4;i||c.forEach(e=>e.value=1);return Object(s.createElement)("div",{className:Z()("itsec-card--type-pie-chart",{"itsec-card--type-pie-chart--no-data":!i})},Object(s.createElement)(H,null,Object(s.createElement)(T,{card:t,config:a}),a.query_args.period&&Object(s.createElement)(A,{card:t,config:a})),Object(s.createElement)(j.a,{width:"100%",height:200},Object(s.createElement)(z.a,null,Object(s.createElement)(F.a,{data:c,dataKey:"value",innerRadius:60,outerRadius:80,fill:"#8884d8",fillOpacity:o,paddingAngle:5,activeShape:e=>{const{cx:a,cy:c,innerRadius:r,outerRadius:l,startAngle:d,endAngle:u,fill:b}=e;return Object(s.createElement)("g",null,Object(s.createElement)("text",{x:a,y:c+10,dy:8,textAnchor:"middle",fill:b,fillOpacity:o,className:"itsec-card-pie-chart__circle-sum"},i?Object(Y.m)(t.data.circle_sum):"—"),Object(s.createElement)("text",{x:a,y:c+30,dy:8,textAnchor:"middle",fill:b,fillOpacity:o,className:"itsec-card-pie-chart__circle-label"},i?t.data.circle_label:Object(n.__)("No Data","better-wp-security")),Object(s.createElement)(V.a,{cx:a,cy:c,innerRadius:r,outerRadius:l,startAngle:d,endAngle:u,fill:b,fillOpacity:o}))},activeIndex:0,isAnimationActive:!1},c.map((e,t)=>Object(s.createElement)(q.a,{key:t,fill:I.i[t%I.i.length]}))))),Object(s.createElement)("table",{className:"itsec-card-pie-chart__values"},Object(s.createElement)("tbody",null,c.map((e,t)=>Object(s.createElement)("tr",{key:e.name},Object(s.createElement)("th",{scope:"row"},e.name),Object(s.createElement)("td",{style:{color:I.i[t]}},i?(e.value/r*100).toFixed(0)+"%":"—"))))))}a("silS");var U=Object(u.compose)([Object(b.withSelect)((e,t)=>({callingRpcs:e("ithemes-security/dashboard").getCallingDashboardCardRpcs(t.card.id)}))])((function(e){let{card:t,callingRpcs:a,onComplete:c,children:r}=e;const n=Object(p.get)(t,["_links","ithemes-security:rpc"],[]),i=Object(p.flatten)(Object.values(Object(p.get)(t,"_links",{}))).filter(e=>"text/html"===e.media);return n.length||i.length||r?Object(s.createElement)($,null,n.map((e,r)=>Object(s.createElement)("span",{className:"itsec-card-footer__action",key:e.href},Object(s.createElement)(d.Button,{isSmall:!0,isPrimary:0===r,onClick:()=>!a.includes(e.href)&&(async e=>{const a=await Object(b.dispatch)("ithemes-security/dashboard").callDashboardCardRpc(t.id,e);c&&c(e,a)})(e.href),isBusy:a.includes(e.href),"aria-disabled":a.includes(e.href)},e.title))),i.map(e=>Object(s.createElement)("span",{className:"itsec-card-footer__action",key:e.href},Object(s.createElement)(d.Button,{isSmall:!0,isLink:!0,href:e.href},e.title))),r):null}));var $=function(e){let{children:t}=e;return Object(s.createElement)("footer",{className:"itsec-card-footer__actions"},t)},G=a("RxS6");var K=Object(u.compose)([u.pure])((function(e){let{master:t,getId:a,parentInstanceId:c,isSelected:r,DetailRender:n}=e;return Object(s.createElement)("section",{key:a(t),role:"tabpanel",className:"itsec-component-master-detail__detail-container",id:`itsec-component-master-detail-${c}__detail--${a(t)}`,style:r?{}:{display:"none"}},Object(s.createElement)(n,{master:t,isVisible:r}))}));a("o7fS");function J(e){let{isSmall:t,select:a,selectedId:c}=e;return Object(s.createElement)(d.Button,{icon:"arrow-left-alt",className:"itsec-component-master-detail__back",onClick:()=>a(0),style:c&&t?{}:{display:"none"},label:Object(n.__)("Back to List","better-wp-security"),showTooltip:!1})}var X=Object(u.compose)([u.withInstanceId,u.pure])((function(e){let{masters:t,masterRender:a,detailRender:c,ListHeader:r,ListFooter:i,context:o,selectedId:l,select:u,instanceId:b,mode:m="table",idProp:h="id",isSmall:O=!1,direction:f="horizontal",borderless:j=!1,children:_,hasNext:y,loadNext:g,isQuerying:E}=e;const v=Object(p.isString)(h)?e=>e[h]:h,N=function(e,t,a){if(!e.length)return;if(!1===a)return;if(!a)return e[0];const c=Object(p.find)(e,e=>t(e)===a);return c||e[0]}(t,v,l),k={};let w;const I=Object(p.curry)((e,a)=>{const{keyCode:c}=a;let r;switch(c){case G.UP:r=0===e?t.length-1:e-1;break;case G.DOWN:r=e===t.length-1?0:e+1;break;case G.ENTER:case G.SPACE:return a.preventDefault(),a.stopPropagation(),void u(v(t[e]));default:return}const s=k[v(t[r])];s&&(a.stopPropagation(),a.preventDefault(),s.focus(),0===r&&(a.nativeEvent.stopImmediatePropagation(),w.scrollTop=0))});let C,L;switch(m){case"list":C="ul",L="li";break;case"table":default:C="table",L="tr"}const x=t.map((e,t)=>{const c=l===v(e);return Object(s.createElement)(L,{key:v(e),id:`itsec-component-master-detail-${b}__master--${v(e)}`,tabIndex:c||!l&&0===t?0:-1,role:"tab","aria-selected":c,"aria-controls":`itsec-component-master-detail-${b}__detail--${v(e)}`,onFocus:()=>!O&&u(v(e)),onClick:()=>u(v(e)),onKeyDown:I(t),ref:t=>k[v(e)]=t,className:Z()("itsec-component-master-detail__master",{"itsec-component-master-detail__master--selected":c,"itsec-component-master-detail__master--selected-default":0===l&&0===t})},Object(s.createElement)(a,{master:e}))});let S=!1;if(y){const e=Object(s.createElement)(d.Button,{isLink:!0,onClick:g,disabled:E,isBusy:E},Object(n.__)("Load More","better-wp-security"));S="list"===m?Object(s.createElement)("li",null,e):Object(s.createElement)("tfoot",null,Object(s.createElement)("tr",null,Object(s.createElement)("td",{colSpan:100},e)))}return Object(s.createElement)("section",{className:Z()("itsec-component-master-detail","itsec-component-master-detail--direction-"+f,{"itsec-component-master-detail--is-small":O,"itsec-component-master-detail--has-detail":l,"itsec-component-master-detail--borderless":j})},Object(s.createElement)("section",{className:"itsec-component-master-detail__master-list-container",ref:e=>w=e},r&&Object(s.createElement)(r,{context:o}),Object(s.createElement)(C,{className:"itsec-component-master-detail__master-list",role:"tablist"},_,"table"===m?Object(s.createElement)("tbody",null,x):x,S),i&&Object(s.createElement)(i,{context:o})),t.map(e=>Object(s.createElement)(K,{key:v(e),master:e,getId:v,parentInstanceId:b,isSelected:e===N,DetailRender:c})))}));a("6QFD");var ee=Object(u.compose)([Object(b.withSelect)((e,t)=>({removing:e("ithemes-security/dashboard").isRemovingCard(t.card.id),canRemove:e("ithemes-security/dashboard").canEditCard(t.dashboardId,t.card.id)})),Object(b.withDispatch)((e,t)=>({remove:()=>e("ithemes-security/dashboard").removeDashboardCard(t.dashboardId,t.card)}))])((function(e){let{card:t,removing:a,canRemove:c,remove:r}=e;return Object(s.createElement)("div",{className:"itsec-empty-state-card itsec-empty-state-card--unknown"},Object(s.createElement)("h3",null,Object(n.__)("Unknown Card","better-wp-security")),Object(s.createElement)(I.k,null),Object(s.createElement)("p",null,Object(n.__)("Something went wrong with this card. This is most likely due to disabling an iThemes Security Module.","better-wp-security")),c&&Object(s.createElement)(d.Button,{isSecondary:!0,isBusy:a,onClick:r},Object(n.__)("Remove Card","better-wp-security")),Object(s.createElement)("span",null,Object(n.__)("Card Type: ","better-wp-security"),Object(s.createElement)("br",null),Object(s.createElement)("code",null,t.original)))}));var te=function(e){let{card:t,config:a}=e;return Object(s.createElement)("div",{className:"itsec-empty-state-card itsec-empty-state-card--error"},a&&Object(s.createElement)(H,null,Object(s.createElement)(T,{card:t,config:a})),Object(s.createElement)("h3",null,Object(n.__)("Unexpected Error","better-wp-security")),Object(s.createElement)(I.a,null),Object(s.createElement)("p",null,Object(n.__)("An error occurred while rendering this card.","better-wp-security")),Object(s.createElement)("p",null,Object(n.__)("Try refreshing your browser. If the error persists, please contact support.","better-wp-security")))};function ae(e){let{title:t,text:a}=e;return Object(s.createElement)("div",{className:"itsec-empty-state-card itsec-empty-state-card--happy"},t&&Object(s.createElement)("h3",null,t),Object(s.createElement)(I.b,null),a&&Object(s.createElement)("p",null,a))}var ce=a("lSNA"),re=a.n(ce),se=a("tmk3"),ne=a.n(se),ie=a("ywyh"),oe=a.n(ie);function le(e,t,a){!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,a)}var de=new WeakMap,ue=new WeakMap,be=new WeakMap;var me=new class{constructor(){le(this,de,{writable:!0,value:{}}),le(this,ue,{writable:!0,value:{}}),le(this,be,{writable:!0,value:{}})}getDetails(e){return ne()(this,de)[e]?Promise.resolve(ne()(this,de)[e]):(ne()(this,ue)[e]||(ne()(this,ue)[e]=oe()({url:e}).then(t=>(ne()(this,de)[e]=t.detail,delete ne()(this,ue)[e],t.detail))),ne()(this,ue)[e])}isFetching(e){return!!ne()(this,ue)[e]}release(e){return ne()(this,be)[e]||(ne()(this,be)[e]=oe()({url:e,method:"DELETE"}).then(t=>{delete ne()(this,be)[e];const a="release-lockout-"+e;return setTimeout(()=>Object(b.dispatch)("core/notices").removeNotice(a,"ithemes-security"),5e3),Object(b.dispatch)("core/notices").createNotice("success",Object(n.__)("Lockout Released","better-wp-security"),{id:a,context:"ithemes-security"}),t}).catch(t=>{delete ne()(this,be)[e],Object(b.dispatch)("core/notices").createNotice("error",Object(n.sprintf)(Object(n.__)("Error when releasing lockout: %s","better-wp-security"),t.message),{context:"ithemes-security"})})),ne()(this,be)[e]}isReleasing(e){return!!ne()(this,be)[e]}};class he extends s.Component{constructor(){super(...arguments),re()(this,"state",{details:null,viewLog:0}),re()(this,"fetchDetails",e=>{if(!this.props.master.links.item)return;const t=this.props.master.links.item[0].href.replace("{lockout_id}",e);me.getDetails(t).then(t=>{this.unmounted||this.props.master.id!==e||this.setState({details:t})})}),re()(this,"renderHistory",e=>{if(!e.label)return;const t=Object(s.createElement)("time",{dateTime:e.time,title:Object(w.dateI18n)("M d, Y g:s A",e.time)},Object(n.sprintf)(Object(n.__)("%s ago","better-wp-security"),e.time_relative));return Object(s.createElement)("li",{key:e.id},Object(s.createElement)("code",null,e.label)," – ",t)})}componentDidMount(){this.props.isVisible&&this.fetchDetails(this.props.master.id)}componentDidUpdate(e){(this.props.isVisible&&!e.isVisible||this.props.master.id!==e.master.id)&&this.fetchDetails(this.props.master.id)}shouldComponentUpdate(e,t){return this.props.master.id!==e.master.id||(this.props.isVisible!==e.isVisible||(!(this.state.details||!t.details)||this.state.viewLog!==t.viewLog))}componentWillUnmount(){this.unmounted=!0}render(){const{master:e}=this.props,{details:t}=this.state;return Object(s.createElement)("div",{className:"itsec-card-active-lockouts__detail-container"},Object(s.createElement)("time",{className:"itsec-card-active-lockouts__start-time",dateTime:e.start_gmt},Object(n.sprintf)(Object(n.__)("%s ago","better-wp-security"),e.start_gmt_relative)),Object(s.createElement)("h3",{className:"itsec-card-active-lockouts__label"},e.label),Object(s.createElement)("p",{className:"itsec-card-active-lockouts__description"},e.description),t&&t.history.length>0&&Object(s.createElement)(s.Fragment,null,Object(s.createElement)("hr",null),Object(s.createElement)("div",{className:"itsec-card-active-lockouts__history"},Object(s.createElement)("h4",{className:"itsec-card-active-lockouts__history-title"},Object(n.__)("History","better-wp-security")),Object(s.createElement)("ul",null,t.history.map(this.renderHistory)))))}}re()(he,"defaultProps",{master:{},isVisible:!1});var Oe=he;a("MPLY");function fe(e){let{master:t}=e;return Object(s.createElement)(s.Fragment,null,Object(s.createElement)("time",{className:"itsec-card-active-lockouts__start-time",dateTime:t.start_gmt,title:Object(w.dateI18n)("M d, Y g:s A",t.start_gmt)},Object(n.sprintf)(Object(n.__)("%s ago","better-wp-security"),t.start_gmt_relative)),Object(s.createElement)("h3",{className:"itsec-card-active-lockouts__label"},t.label),Object(s.createElement)("p",{className:"itsec-card-active-lockouts__description"},t.description))}const pe=L()((function(e,t){return e.map(e=>({...e,links:t}))}));const je="active-lockouts",_e={render:Object(u.compose)([Object(f.g)("query",500,{leading:!0}),u.pure])((function(e){let{card:t,config:a}=e;const[c,r]=Object(s.useState)(0),[i,o]=Object(s.useState)([]),[l,u]=Object(s.useState)(""),{isQuerying:m}=Object(b.useSelect)(e=>({isQuerying:e("ithemes-security/dashboard").isQueryingDashboardCard(t.id)}),[t.id]),{queryDashboardCard:O,refreshDashboardCard:f}=Object(b.useDispatch)("ithemes-security/dashboard"),j=e=>r(e);return Object(s.createElement)("div",{className:"itsec-card--type-active-lockouts"},Object(s.createElement)(H,null,Object(s.createElement)(J,{isSmall:!0,select:j,selectedId:c}),Object(s.createElement)(T,{card:t,config:a})),0===c&&Object(s.createElement)("div",{className:"itsec-card-active-lockouts__search-container"},Object(s.createElement)(h.i,{value:l,onChange:e=>{u(e),O(t.id,e?{search:e}:{})},placeholder:Object(n.__)("Search Lockouts","better-wp-security"),isSearching:m,surfaceVariant:"secondary"})),Object(p.isEmpty)(t.data.lockouts)?Object(s.createElement)(ae,{title:Object(n.__)("All Clear!","better-wp-security"),text:Object(n.__)("No users are currently locked out of your site.","better-wp-security")}):Object(s.createElement)(X,{masters:pe(t.data.lockouts,t._links),detailRender:Oe,masterRender:fe,mode:"list",selectedId:c,select:j,isSmall:!0}),c>0&&t._links["ithemes-security:release-lockout"]&&Object(s.createElement)($,null,Object(s.createElement)("span",{className:"itsec-card-footer__action"},Object(s.createElement)(d.Button,{isPrimary:!0,isSmall:!0,"aria-disabled":i.includes(c),isBusy:i.includes(c),onClick:async e=>{e.preventDefault(),o([...i,c]);try{await me.release(t._links["ithemes-security:release-lockout"][0].href.replace("{lockout_id}",c))}catch(e){console.warn(e)}await f(t.id),r(0),o(i.filter(e=>e!==c))}},Object(n.__)("Release Lockout","better-wp-security")))))})),elementQueries:[{type:"width",dir:"max",px:500}]};var ye=a("JZP9"),ge=a("49++");function Ee(e){let{query:t,isQuerying:a}=e;const c=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const{types:t,byType:a}=Object(b.useSelect)(e=>{const t=e("ithemes-security/core").getActorTypes()||[],a={};for(const c of t)a[c.slug]=e("ithemes-security/core").getActors(c.slug);return{types:t,byType:a}},[]),c=[];c.push({label:e,value:""});for(const e of t){c.push({label:Object(n.sprintf)(Object(n.__)("Any %s","better-wp-security"),e.label),value:e.slug,optgroup:e.label});for(const t of a[e.slug]||[])c.push({label:t.label,value:e.slug+":"+t.id,optgroup:e.label})}return c}(Object(n.__)("All","better-wp-security")),[r,i]=Object(s.useState)({search:"",actor_id:"",actor_type:""}),o=e=>{const a={...r,...e};i(a),t("main",{...Object(p.omitBy)(a,e=>""===e),per_page:100})};return Object(s.createElement)("section",{className:"itsec-card-banned-users__search"},Object(s.createElement)(ge.s,{options:c,hideLabelFromVision:!0,label:Object(n.__)("Ban Reason","better-wp-security"),value:r.actor_type&&r.actor_id?r.actor_type+":"+r.actor_id:r.actor_type,onChange:e=>{if(""===e)o({actor_type:"",actor_id:""});else{const[t,a=""]=e.split(":");o({actor_type:t,actor_id:a})}}}),Object(s.createElement)(h.i,{value:r.search,onChange:e=>o({search:e}),isSearching:a,surfaceVariant:"secondary",placeholder:Object(n.__)("Search Bans","better-wp-security")}))}function ve(e){let{master:t}=e;return Object(s.createElement)(s.Fragment,null,Object(s.createElement)("th",{scope:"row",className:Z()("itsec-card-banned-users__bans--column-label","itsec-card-banned-users__ban--actor-type-"+(t.created_by?t.created_by.type:"none"),t.created_by&&"itsec-card-banned-users__ban--actor-id-"+t.created_by.id)},Object(s.createElement)("span",{className:"itsec-card-banned-users__bans-label"},t.label),t.created_at&&Object(s.createElement)("span",{className:"itsec-card-banned-users__bans-date"},Object(w.dateI18n)("M d, Y g:i A",t.created_at))),Object(s.createElement)("td",{className:"itsec-card-banned-users__bans--column-comment"},t.comment))}function Ne(e){let{master:t}=e;const{updateBan:a,deleteBan:c}=Object(b.useDispatch)("ithemes-security/bans"),{createNotice:r}=Object(b.useDispatch)("core/notices"),{isUpdating:i,isDeleting:o}=Object(b.useSelect)(e=>({isUpdating:e("ithemes-security/bans").isUpdating(t),isDeleting:e("ithemes-security/bans").isDeleting(t)})),[l,u]=Object(s.useState)(t.comment),m=Object(Y.i)(t,"allow",!1).includes("PUT"),h=Object(p.flatten)(Object.values(Object(p.get)(t,"_links",{}))).filter(e=>"text/html"===e.media);return Object(s.createElement)("div",{className:"itsec-card-banned-users__ban"},Object(s.createElement)("div",{className:"itsec-card-banned-users__ban-top"},Object(s.createElement)("dl",null,Object(s.createElement)("dt",null,Object(n.__)("Host","better-wp-security")),Object(s.createElement)("dd",null,t.label),Object(s.createElement)("dt",null,Object(n.__)("Time","better-wp-security")),Object(s.createElement)("dd",null,t.created_at&&Object(w.dateI18n)("M d, Y g:i A",t.created_at)),Object(s.createElement)("dt",null,Object(n.__)("Source","better-wp-security")),Object(s.createElement)("dd",null,t.created_by&&t.created_by.label),!m&&Object(s.createElement)(React.Fragment,null,Object(s.createElement)("dt",null,Object(n.__)("Notes","better-wp-security")),Object(s.createElement)("dd",null,t.comment))),Object(s.createElement)("ul",{className:"itsec-card-banned-users__ban-actions"},Object(Y.i)(t,"allow",!1).includes("DELETE")&&Object(s.createElement)("li",null,Object(s.createElement)(d.Button,{isLink:!0,isBusy:o,onClick:()=>c(t),icon:"dismiss"},Object(n.__)("Remove Ban","better-wp-security"))),h.map(e=>Object(s.createElement)("li",{key:e.href},Object(s.createElement)("a",{href:e.href},Object(s.createElement)(d.Icon,{icon:"arrow-right-alt"}),e.title))))),m&&Object(s.createElement)(d.TextareaControl,{className:"itsec-card-banned-users__ban-notes",label:Object(n.__)("Notes","better-wp-security"),value:l,onChange:u,onBlur:()=>l!==t.comment&&(async()=>{const e=await a(t,{comment:l});e instanceof Error&&r("error",e.message,{context:"ithemes-security"})})(),readOnly:i,maxLength:255,rows:4}))}function ke(e){let{isSmall:t,onSelect:a,selected:c}=e;const{fetchQueryNextPage:r}=Object(b.useDispatch)("ithemes-security/bans"),{bans:i,hasNext:o,isQuerying:l}=Object(b.useSelect)(e=>({bans:e("ithemes-security/bans").getBans(),hasNext:!!e("ithemes-security/bans").getQueryHeaderLink("main","next"),isQuerying:e("ithemes-security/bans").isQuerying("main")}));return Object(s.createElement)(X,{masters:i,detailRender:Ne,masterRender:ve,selectedId:c,select:a,idProp:Y.h,direction:"vertical",borderless:!0,isSmall:t,hasNext:o,loadNext:()=>r("main"),isQuerying:l},Object(s.createElement)("thead",null,Object(s.createElement)("tr",null,Object(s.createElement)("th",{className:"itsec-card-banned-users__bans--column-label"},Object(n.__)("Host","better-wp-security")),Object(s.createElement)("th",{className:"itsec-card-banned-users__bans--column-comment"},Object(n.__)("Notes","better-wp-security")))))}var we=a("V7jF"),Ie=a("tMTs");const Ce=Object(we.c)(Ie.b),Le={disableInlineErrors:!0};function xe(e){let{id:t,createForm:a,save:c,setSaving:r,afterSave:n}=e;const i=Object(s.useRef)(null),[o,l]=Object(s.useState)({}),[d,u]=Object(s.useState)({}),{createNotice:m}=Object(b.useDispatch)("core/notices"),h=Object(s.useMemo)(()=>{if(a)return Object(Y.k)(a.submissionSchema,a.submissionSchema.uiSchema||{})},[a]);return Object(s.createElement)("section",{className:"itsec-card-banned-users__create"},h&&Object(s.createElement)(Ce,{id:t,idPrefix:t+"_part",formData:o,onChange:e=>l(e.formData),onSubmit:async e=>{r(!0),u({});const t=await c(a.href,e.formData);if(r(!1),t instanceof Error)if("rest_invalid_param"===t.code&&Object(p.isObject)(t.data.params)){const e=Object(p.mapValues)(t.data.params,e=>({__errors:[e]}));u(e)}else m("error",t.message,{context:"ithemes-security"});else if(n(),l({}),i&&i.current){const e=i.current.formElement.querySelector("input");e&&e.focus()}},schema:h,uiSchema:h.uiSchema||{},omitExtraData:!0,liveValidate:!Object(p.isEmpty)(o),extraErrors:d,formContext:Le,ref:i},Object(s.createElement)(React.Fragment,null)))}a("/Nrb");const Se="banned-users-list",De={render:function(e){let{card:t,config:a,eqProps:c}=e;const[r,i]=Object(s.useState)(!1),[o,l]=Object(s.useState)(!1),{schema:u,isQuerying:m}=Object(b.useSelect)(e=>({schema:e("ithemes-security/core").getSchema("ithemes-security-ban"),isQuerying:e("ithemes-security/bans").isQuerying("main")}),[]),{createBan:h,query:O,invalidateResolutionForStoreSelector:f}=Object(b.useDispatch)("ithemes-security/bans"),p=Object(ye.a)(O,500),[j,_]=Object(s.useState)(0),y=c["max-height"]&&c["max-height"].includes("500px"),g="itsec-ban-card-create-form__"+t.id;return Object(s.createElement)("div",{className:Z()("itsec-card--type-banned-users",{"itsec-card-banned-users--creating":r})},Object(s.createElement)(H,null,Object(s.createElement)(J,{isSmall:y,select:_,selectedId:j}),Object(s.createElement)(T,{card:t,config:a})),Object(s.createElement)(Ee,{query:p,isQuerying:m}),Object(s.createElement)(ke,{selected:!r&&j,onSelect:e=>{_(e),i(!1)},isSmall:y}),r&&Object(s.createElement)(xe,{id:g,createForm:r,save:h,setSaving:l,afterSave:()=>f("getBans")}),Object(s.createElement)($,null,r&&Object(s.createElement)(React.Fragment,null,Object(s.createElement)("span",{className:"itsec-card-footer__action"},Object(s.createElement)(d.Button,{isLink:!0,isSmall:!0,disabled:o,onClick:()=>i(!1)},Object(n.__)("Cancel","better-wp-security"))),Object(s.createElement)("span",{className:"itsec-card-footer__action"},Object(s.createElement)(d.Button,{isPrimary:!0,isSmall:!0,form:g,type:"submit",isBusy:o,disabled:o},Object(n.__)("Save","better-wp-security")))),!r&&Object(s.createElement)(React.Fragment,null,null==u?void 0:u.links.filter(e=>"create-form"===e.rel).map(e=>Object(s.createElement)("span",{key:e.href,className:"itsec-card-footer__action"},Object(s.createElement)(d.Button,{isSmall:!0,isPrimary:!0,onClick:()=>i(!r&&e)},e.title))))))},elementQueries:[{type:"height",dir:"max",px:500}]};function Me(){const{registerCard:e}=Object(b.useDispatch)("ithemes-security/dashboard");Object(f.f)(Me,()=>[c,r].forEach(t=>{let{slug:a,settings:c}=t;return e(a,c)}))}var Ae=a("Mmq9");a("tsan");function Re(){const{requesting:e,siteInfo:t}=Object(b.useSelect)(e=>({siteInfo:e("ithemes-security/core").getSiteInfo(),dashboards:e("ithemes-security/dashboard").getAvailableDashboards(),requesting:e("ithemes-security/dashboard").isRequestingDashboards()}));let a;if(t){const e=Object(Ae.getPath)(t.url);a=Object(Ae.getAuthority)(t.url),e&&(a+="/"+e)}return!e&&Object(s.createElement)("div",{className:"itsec-admin-bar"},Object(s.createElement)("div",{className:"itsec-admin-bar__primary"},Object(s.createElement)(O.AdminBarSlot,{type:"primary"})),Object(s.createElement)("div",{className:"itsec-admin-bar__secondary"},Object(s.createElement)("span",{className:"itsec-admin-bar__url"},a)))}a("tW4V"),a("oidH");var Be=a("ChGz"),Te=a("pVnL"),He=a.n(Te);var Pe=Object(u.createHigherOrderComponent)(e=>{var t;return t=class extends s.Component{constructor(){super(...arguments),re()(this,"state",{width:1280,breakpoint:null}),re()(this,"mounted",!1),re()(this,"ref",null),re()(this,"onWindowResize",()=>{if(!this.mounted)return;const e=Object(s.findDOMNode)(this);if(e instanceof window.HTMLElement){const t=e.offsetWidth,a=Be.Responsive.utils.getBreakpointFromWidth(B.a,t);this.setState({width:t,breakpoint:a})}})}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,...a}=this.props;return t&&!this.mounted?Object(s.createElement)("div",{className:this.props.className,style:this.props.style}):Object(s.createElement)(e,He()({},a,{width:this.state.width,breakpoint:this.state.breakpoint}))}},re()(t,"defaultProps",{measureBeforeMount:!0}),t},"widthProvider"),Ve=a("6JX1");a("72mH");var ze=Object(u.pure)((function(e){let{id:t,dashboardId:a,className:c,gridWidth:r,children:n,...i}=e;const{card:o,config:l}=Object(b.useSelect)(e=>({card:e("ithemes-security/dashboard").getDashboardCard(t),config:e("ithemes-security/dashboard").getDashboardCardConfig(t)||{}}),[t]),d=function(e){const t=Object(b.useSelect)(t=>t("ithemes-security/dashboard").getRegisteredCard(e.slug),[e.slug]);if(null!=t&&t.render)return t.render;switch(e.type){case"line":return P;case"pie":return Q}return null}(l),u=function(e,t,a){const c=Object(b.useSelect)(t=>t("ithemes-security/dashboard").getRegisteredCard(e.slug),[e.slug]),r=null==c?void 0:c.elementQueries;return Object(s.useMemo)(()=>{if(!r)return{};const e={height:t.height?Object(p.toInteger)(t.height.replace("px","")):0};t.width&&t.width.endsWith("%")?e.width=Object(p.toInteger)(t.width.replace("%",""))*a/100:e.width=t.width?Object(p.toInteger)(t.width.replace("px","")):0;const c={};for(const t of r){if(!e[t.type])continue;let a=!1;switch(t.dir){case"max":a=e[t.type]<=t.px;break;case"min":a=e[t.type]>=t.px}a&&(c[`${t.dir}-${t.type}`]=(c[`${t.dir}-${t.type}`]||"")+t.px+"px ")}return Object(p.mapValues)(c,e=>e.trim())},[r,t,a])}(l,i.style,r);return"unknown"===o.card?Object(s.createElement)("article",He()({className:Z()(c,"itsec-card","itsec-card--unknown")},i),Object(s.createElement)(ee,{card:o,dashboardId:a})):d?Object(s.createElement)("article",He()({className:Z()(c,"itsec-card"),id:"itsec-card-"+o.id},i,u),Object(s.createElement)(Ve.ErrorBoundary,{FallbackComponent:Object(f.k)({card:o,config:l})(te)},Object(s.createElement)(d,{card:o,config:l,dashboardId:a,eqProps:u})),n):Object(s.createElement)("article",He()({className:Z()(c,"itsec-card","itsec-card--no-rendered")},i),Object(s.createElement)(te,{card:o,config:l}))}));var Fe=Object(u.compose)([Object(b.withDispatch)(e=>({openEditCards:e("ithemes-security/dashboard").openEditCards}))])((function(e){let{openEditCards:t}=e;return Object(s.createElement)("div",{className:"itsec-card-grid-empty-state"},Object(s.createElement)(d.Button,{onClick:t},Object(s.createElement)(d.Dashicon,{icon:"plus-alt",size:60}),Object(s.createElement)("span",null,Object(n.__)("Add Security Cards","better-wp-security"))))}));a("SVg7");class qe extends s.Component{constructor(e){super(e),re()(this,"_onLayoutChange",(e,t)=>{if(!Object(B.e)(t,this.state.layout)){this.setState({layout:t});const e=Object(B.n)(this.props.dashboardId,t);this.props.saveLayout(this.props.dashboardId,e)}}),re()(this,"onBreakpointChange",e=>{this.setState({breakpoint:e})}),re()(this,"onStartMove",()=>{this.setState({isMoving:!0})}),re()(this,"onStopMove",()=>{this.setState({isMoving:!1})}),this.state={layout:Object(B.l)(e.dashboardId,e.cards,e.layout),isMoving:!1,breakpoint:e.breakpoint||"wide",breakpointInitialized:!!e.breakpoint},this.onLayoutChange=Object(p.debounce)(this._onLayoutChange,1e3)}componentDidUpdate(e){if(this.state.breakpointInitialized||!this.props.breakpoint||e.breakpoint||this.setState({breakpoint:this.props.breakpoint,breakpointInitialized:!0}),this.props.layout!==e.layout&&(this.props.dashboardId!==e.dashboardId||this.props.cards.length!==e.cards.length)){const e=Object(B.l)(this.props.dashboardId,this.props.cards,this.props.layout);this.setState({layout:e})}if(this.props.dashboardId===e.dashboardId&&this.props.cards.length>e.cards.length){const e=Object(B.l)(this.props.dashboardId,this.props.cards,Object(B.n)(this.props.dashboardId,this.state.layout));this.setState({layout:e}),this.props.saveLayout(this.props.dashboardId,Object(B.n)(this.props.dashboardId,e))}}componentWillUnmount(){this.onLayoutChange.cancel()}render(){const{cards:e,dashboardId:t,usingTouch:a}=this.props;return e.length?Object(s.createElement)(Be.Responsive,{breakpoints:B.a,onBreakpointChange:this.onBreakpointChange,cols:B.d,rowHeight:200,width:this.props.width,layouts:this.state.layout,onLayoutChange:this.onLayoutChange,margin:[20,20],isDraggable:!a,isResizable:!a,className:this.state.isMoving?"itsec-card-grid--moving":"",draggableHandle:".itsec-card-header, .itsec-card--unknown, .itsec-card__drag-handle",onDragStart:this.onStartMove,onDragStop:this.onStopMove,onResizeStart:this.onStartMove,onResizeStop:this.onStopMove},Object(B.k)(e,this.state.layout,this.state.breakpoint).map(e=>Object(s.createElement)(ze,{id:e.id,dashboardId:t,key:e.id.toString(),gridWidth:this.props.width}))):Object(s.createElement)(Fe,null)}}var We=Object(u.compose)([Object(b.withSelect)((e,t)=>({cards:e("ithemes-security/dashboard").getDashboardCards(t.dashboardId),layout:e("ithemes-security/dashboard").getDashboardLayout(t.dashboardId),usingTouch:e("ithemes-security/dashboard").isUsingTouch(),cardsLoaded:e("ithemes-security/dashboard").areCardsLoaded(t.dashboardId),layoutLoaded:e("ithemes-security/dashboard").isLayoutLoaded(t.dashboardId)})),Object(u.ifCondition)(e=>{let{cardsLoaded:t,layoutLoaded:a}=e;return t&&a}),Pe,u.pure,Object(b.withDispatch)((e,t)=>({openEditCards:e("ithemes-security/dashboard").openEditCards,saveLayout:e("ithemes-security/dashboard").saveDashboardLayout,refresh(){e("ithemes-security/dashboard").refreshDashboardCards(t.dashboardId)}})),Object(f.h)(12e4,e=>{let{refresh:t}=e;return t()})])(qe),Ze=a("fber"),Ye=a.n(Ze),Qe=a("oBCA"),Ue=a.n(Qe);a("qrrL");function $e(){const[e,t]=Object(s.useState)(""),[a,c]=Object(s.useState)(""),[r,i]=Object(s.useState)({}),{canCreate:o,canCreateLoaded:l,addingScratch:d,addingDefault:u}=Object(b.useSelect)(e=>({canCreate:e("ithemes-security/dashboard").canCreateDashboards(),canCreateLoaded:e("ithemes-security/dashboard").isCanCreateDashboardsLoaded(),addingScratch:e("ithemes-security/dashboard").isAddingDashboard("create-dashboard-scratch"),addingDefault:e("ithemes-security/dashboard").isAddingDashboard("create-dashboard-default")})),{addDashboard:m}=Object(b.useDispatch)("ithemes-security/dashboard");if(!o&&l)return Object(s.createElement)("div",{className:"itsec-create-dashboard"},Object(s.createElement)("p",null,Object(n.__)("You don’t have permission to create new dashboards. Try switching to a dashboard or ask an administrator to invite you to one.","better-wp-security")));const h=t=>c=>{c.preventDefault();const r={};switch(t){case"scratch":r.label=a;break;case"default":r.label=e,r.preset="default";break;default:return}r.label.trim().length<=0?i({[t]:!0}):m(r,"create-dashboard-"+t)};return Object(s.createElement)("div",{className:"itsec-create-dashboard"},Object(s.createElement)("section",{className:"itsec-create-dashboard__start itsec-create-dashboard__start--default"},Object(s.createElement)("header",null,Object(s.createElement)(Ye.a,{height:100}),Object(s.createElement)("h2",null,Object(n.__)("Start with the default layout.","better-wp-security")),Object(s.createElement)("p",null,Object(n.__)("You can continue to customize this later.","better-wp-security"))),Object(s.createElement)(Ge,{label:e,onLabelChange:t,onSubmit:h("default"),isBusy:u,isDisabled:d,hasError:r.default})),Object(s.createElement)("section",{className:"itsec-create-dashboard__start itsec-create-dashboard__start--scratch"},Object(s.createElement)("header",null,Object(s.createElement)(Ue.a,{height:100,className:"itsec-create-dashboard__scratch-icon"}),Object(s.createElement)("h2",null,Object(n.__)("Start from Scratch.","better-wp-security")),Object(s.createElement)("p",null,Object(n.__)("Start building a dashboard with security cards.","better-wp-security"))),Object(s.createElement)(Ge,{label:a,onLabelChange:c,onSubmit:h("scratch"),isBusy:d,isDisabled:u,hasError:r.scratch})))}function Ge(e){let{label:t,onLabelChange:a,onSubmit:c,isDisabled:r,isBusy:i,hasError:o}=e;const l=Object(u.useInstanceId)($e);return Object(s.createElement)("form",{onSubmit:c},Object(s.createElement)(d.TextControl,{className:Z()("itsec-create-dashboard__name",{"itsec-create-dashboard__name--hide-help-text":!o}),label:Object(n.__)("Dashboard Name","better-wp-security"),placeholder:Object(n.__)("Dashboard Name…","better-wp-security"),id:"itsec-create-dashboard__name--"+l,value:t,onChange:a,disabled:i||r,help:Object(n.__)("Entering a dashboard name is required.","better-wp-security"),required:!0}),Object(s.createElement)("div",{className:"itsec-create-dashboard__trigger-container"},Object(s.createElement)(d.Button,{className:"itsec-create-dashboard__trigger",type:"submit",isBusy:i,disabled:r},Object(n.__)("Create Board","better-wp-security"))))}var Ke=Object(u.compose)([Object(b.withSelect)((e,t)=>({cardAtLimit:e("ithemes-security/dashboard").isCardAtDashboardLimit(t.dashboardId,t.ldo.aboutLink),isAdding:e("ithemes-security/dashboard").isAddingCard(`edit-cards-add-${t.ldo.aboutLink}-to-${t.dashboardId}`)})),Object(b.withDispatch)((e,t)=>({add(a){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e("ithemes-security/dashboard").addDashboardCard(a,c,`edit-cards-add-${t.ldo.aboutLink}-to-${t.dashboardId}`)}}))])((function(e){let{ldo:t,cardAtLimit:a,isAdding:c,add:r}=e;return!a&&Object(s.createElement)("li",{className:"itsec-edit-cards__card-choice itsec-edit-cards__card-choice--add"},Object(s.createElement)("span",{className:"itsec-edit-cards__card-choice-title"},t.title),Object(s.createElement)(d.Button,{disabled:c,onClick:()=>r(t.href),className:"itsec-edit-cards__action itsec-edit-cards__action--add",label:Object(n.__)("Add","better-wp-security"),icon:"plus",showTooltip:!1}))}));var Je=Object(u.compose)([Object(b.withSelect)((e,t)=>({config:e("ithemes-security/dashboard").getAvailableCard(t.card.card)})),Object(b.withDispatch)((e,t)=>({remove:()=>e("ithemes-security/dashboard").removeDashboardCard(t.dashboardId,t.card)}))])((function(e){let{card:t,config:a,remove:c}=e;return Object(s.createElement)("li",{className:"itsec-edit-cards__card-choice itsec-edit-cards__card-choice--remove"},Object(s.createElement)(d.Button,{className:"itsec-edit-cards__action itsec-edit-cards__action--remove",label:Object(n.__)("Remove","better-wp-security"),icon:"no",showTooltip:!1,onClick:c}),Object(s.createElement)("span",{className:"itsec-edit-cards__card-choice-title"},Object(B.i)(t,a)))}));a("oX45");const Xe=L()(e=>Object(p.sortBy)(e,[e=>{const t=Object(b.select)("ithemes-security/dashboard").getAvailableCard(e.card);return Object(B.i)(e,t)}]));var et=Object(u.compose)([Object(b.withSelect)((e,t)=>({cards:e("ithemes-security/dashboard").getDashboardCards(t.dashboardId),isAdding:e("ithemes-security/dashboard").isAddingCard(t.selected,{}),availableCardLDOs:e("ithemes-security/dashboard").getDashboardAddableCardLDOs(t.dashboardId)}))])((function(e){let{dashboardId:t,cards:a,availableCardLDOs:c}=e;return Object(s.createElement)("div",{className:"itsec-edit-cards"},Object(s.createElement)("header",null,Object(s.createElement)("h3",null,Object(n.__)("Edit Cards","better-wp-security")),Object(s.createElement)("p",null,Object(n.__)("Add or remove cards on your dashboard.","better-wp-security"))),Object(s.createElement)("section",null,Object(s.createElement)("ul",{className:"itsec-edit-cards__card-choices"},c.map(e=>Object(s.createElement)(Ke,{ldo:e,key:e.href,dashboardId:t})),Xe(a).map(e=>Object(s.createElement)(Je,{key:e.id,card:e,dashboardId:t})),Object(s.createElement)(O.EditCardsSlot,null))))})),tt=(a("VbFH"),function(e){let{dashboardId:t}=e;const a=Object(B.o)(),c=Object(Y.o)("settings"),{canManage:r}=Object(B.p)(),{canCreate:i,canEdit:o,editingCards:l}=Object(b.useSelect)(e=>({canCreate:e("ithemes-security/dashboard").canCreateDashboards(),canEdit:e("ithemes-security/dashboard").canEditDashboard(t),editingCards:e("ithemes-security/dashboard").isEditingCards()}),[t]),{openEditCards:u,closeEditCards:m}=Object(b.useDispatch)("ithemes-security/dashboard");return a||r?Object(s.createElement)("div",{className:"itsec-dashboard-toolbar"},Object(s.createElement)(d.Toolbar,{label:Object(n.__)("Dashboard Toolbar","better-wp-security")},r&&Object(s.createElement)(d.ToolbarButton,{text:Object(n.__)("Settings","better-wp-security"),icon:"admin-settings",href:c}),Object(s.createElement)(O.AdminBarSlot,null),o&&Object(s.createElement)(React.Fragment,null,Object(s.createElement)(d.ToolbarButton,{text:Object(n.__)("Edit Cards","better-wp-security"),icon:"layout",className:"itsec-admin-bar-edit-cards__trigger","aria-expanded":l,onClick:l?m:u}),l&&Object(s.createElement)(d.Popover,{className:"itsec-admin-bar-edit-cards__content",position:"bottom",headerTitle:Object(n.__)("Edit Cards","better-wp-security"),expandOnMobile:!0,onFocusOutside:m,onClose:m,focusOnMount:"container"},Object(s.createElement)(et,{dashboardId:t,close:m}))),(o||i)&&Object(s.createElement)(at,null))):null});function at(){const{page:e}=Object(b.useSelect)(e=>({page:e("ithemes-security/dashboard").getCurrentPage()})),{viewHelp:t,viewPrevious:a}=Object(b.useDispatch)("ithemes-security/dashboard");return Object(s.createElement)(d.ToolbarButton,{icon:"editor-help",className:"itsec-admin-bar__help",onClick:()=>{"help"===e?a():t()},text:"help"===e?Object(n.__)("Exit Help","better-wp-security"):Object(n.__)("Help","better-wp-security")})}a("ixw9");function ct(){const{page:e}=Object(b.useSelect)(e=>({page:e("ithemes-security/dashboard").getCurrentPage()})),{viewHelp:t,viewPrevious:a}=Object(b.useDispatch)("ithemes-security/dashboard");return Object(s.createElement)("div",{className:"itsec-dashboard-help"},Object(s.createElement)("div",{className:"itsec-help-header"},Object(s.createElement)("h1",{className:"itsec-help-header__title"},Object(n.__)("Help","better-wp-security")),Object(s.createElement)(d.Button,{onClick:()=>{"help"===e?a():t()},icon:"arrow-left-alt",text:Object(n.__)("Back","better-wp-security"),className:"itsec-help-header__back-link"})),Object(s.createElement)(ge.k,{topic:"dashboard"}))}a("x31Q");const rt=Object(u.pure)(e=>{let{page:t,dashboardId:a}=e;switch(Me(),t){case"view-dashboard":return Object(s.createElement)(We,{dashboardId:a});case"create-dashboard":return Object(s.createElement)($e,null);case"help":return Object(s.createElement)(ct,null);default:return null}});function st(e){let{context:t}=e;const{page:a,primaryDashboard:c,dashboardId:r,isUsingTouch:n,notices:i}=Object(b.useSelect)(e=>({page:e("ithemes-security/dashboard").getCurrentPage(),primaryDashboard:e("ithemes-security/dashboard").getPrimaryDashboard(),dashboardId:e("ithemes-security/dashboard").getViewingDashboardId(),isUsingTouch:e("ithemes-security/dashboard").isUsingTouch(),notices:e("core/notices").getNotices("ithemes-security")}),[]),{usingTouch:o,viewDashboard:p,viewCreateDashboard:j}=Object(b.useDispatch)("ithemes-security/dashboard"),{removeNotice:_}=Object(b.useDispatch)("core/notices");Object(f.b)("touchstart",()=>n||o());const y=Object(u.usePrevious)(c);return Object(s.useEffect)(()=>{void 0===y&&(c?p(c):j())},[c]),void 0===c?null:Object(s.createElement)(l.c,{theme:h.m},Object(s.createElement)(d.SlotFillProvider,null,Object(s.createElement)(B.c.Provider,{value:t},Object(s.createElement)("div",{className:"itsec-dashboard itsec-app-page--"+a},Object(s.createElement)(d.Popover.Slot,null),Object(s.createElement)(d.NoticeList,{notices:i,onRemove:e=>_(e,"ithemes-security")}),Object(s.createElement)(tt,{dashboardId:r}),Object(s.createElement)(O.BelowToolbarSlot,{fillProps:{page:a,dashboardId:r}}),Object(s.createElement)(Re,{dashboardId:r}),Object(s.createElement)(rt,{page:a,dashboardId:r})),Object(s.createElement)(m.PluginArea,null))))}function nt(e){let{title:t}=e;return Object(s.createElement)("li",{className:"itsec-edit-cards__card-choice itsec-edit-cards__card-choice--promo"},Object(s.createElement)("span",{className:"itsec-edit-cards__card-choice-title"},Object(s.createElement)("span",null,Object(n.__)("Pro: ","better-wp-security")),t),Object(s.createElement)(d.Button,{className:"itsec-edit-cards__action itsec-edit-cards__action--add",label:Object(n.__)("Go Pro","better-wp-security"),href:"https://ithemes.com/security/?utm_source=wordpressadmin&utm_medium=dashboardcard&utm_campaign=itsecfreecta",icon:"external"}))}a.p=window.itsecWebpackPublicPath,Object(n.setLocaleData)({"":{}},"better-wp-security"),o()(()=>{const e=document.getElementById("itsec-dashboard-root");if(e){const t="1"===e.dataset.canManage,a=e.dataset.installType;Object(s.render)(Object(s.createElement)(st,{context:{canManage:t,installType:a}}),e)}})},VbFH:function(e,t,a){},Y8OO:function(e,t){!function(){e.exports=this.wp.domReady}()},YLtl:function(e,t){!function(){e.exports=this.lodash}()},Z6ex:function(e,t,a){"use strict";a.d(t,"c",(function(){return u})),a.d(t,"p",(function(){return b})),a.d(t,"o",(function(){return m})),a.d(t,"b",(function(){return h})),a.d(t,"d",(function(){return O})),a.d(t,"a",(function(){return f})),a.d(t,"n",(function(){return j})),a.d(t,"l",(function(){return _})),a.d(t,"m",(function(){return y})),a.d(t,"g",(function(){return g})),a.d(t,"e",(function(){return v})),a.d(t,"k",(function(){return N})),a.d(t,"j",(function(){return k})),a.d(t,"i",(function(){return w})),a.d(t,"f",(function(){return I})),a.d(t,"h",(function(){return C}));var c=a("YLtl"),r=a("4eJC"),s=a.n(r),n=a("1ZqX"),i=a("l3Sj"),o=a("g56x"),l=a("GRId"),d=a("Td6G");const u=Object(l.createContext)({canManage:!1,installType:""});function b(){return Object(l.useContext)(u)}function m(){const{canCreate:e,canEdit:t}=Object(n.useSelect)(e=>({canCreate:e("ithemes-security/dashboard").canCreateDashboards(),canEdit:e("ithemes-security/dashboard").canEditDashboard(e("ithemes-security/dashboard").getViewingDashboardId())}),[]);return e||t}const h=Object.freeze(["huge","wide","large","medium","mobile"]),O=Object.freeze({huge:8,wide:6,large:4,medium:2,mobile:1}),f=Object.freeze(h.reduce((e,t)=>({...e,[t]:250*O[t]+20*(O[t]-1)}),{})),p=["minW","minH","maxW","maxH"];function j(e,t){const a=Object(n.select)("ithemes-security/dashboard"),c={};for(const e in t){if(!t.hasOwnProperty(e))continue;const r=t[e];for(const t of r){const r=a.getDashboardCard(parseInt(t.i));r&&(c[r.id]?(c[r.id].size[e]={w:t.w,h:t.h},c[r.id].position[e]={x:t.x&&t.x!==1/0?t.x:0,y:t.y&&t.y!==1/0?t.y:0}):c[r.id]={id:r.id,card:r.card,size:{[e]:{w:t.w,h:t.h}},position:{[e]:{x:t.x&&t.x!==1/0?t.x:0,y:t.y&&t.y!==1/0?t.y:0}}})}}return{cards:Object.values(c)}}function _(e,t,a){let{cards:r={}}=a;const s=Object(c.zipObject)(Object.keys(f),Object(c.times)(Object.keys(f).length,()=>[])),i={};for(const t of r){i[t.id]=!0;const a=Object(n.select)("ithemes-security/dashboard").getAvailableCard(t.card);if(a||"unknown"===t.card)for(const c of h)s[c].push(y(e,t,a,c,s[c]))}if(Object.keys(i).length<t.length)for(const a of t)if(!i[a.id]){const t=Object(n.select)("ithemes-security/dashboard").getAvailableCard(a.card);if(t)for(const c of h)s[c].push(y(e,a,t,c,s[c]))}return s}function y(e,t,a,r,s){if(!f[r])return;const i={i:t.id.toString(),x:Object(c.get)(t,["position",r,"x"]),y:Object(c.get)(t,["position",r,"y"]),w:Object(c.get)(t,["size",r,"w"],Object(c.get)(a,["size","defaultW"],1)),h:Object(c.get)(t,["size",r,"h"],Object(c.get)(a,["size","defaultH"],2))};if(a&&a.size)for(const e of p)a.size.hasOwnProperty(e)&&(i[e]=a.size[e]);if(i.minW&&i.minW>i.w&&(i.w=i.minW),i.minH&&i.minH>i.h&&(i.h=i.minH),i.maxW&&i.w>i.maxW&&(i.w=i.maxW),i.maxH&&i.h>i.maxH&&(i.h=i.maxH),s&&void 0===i.x&&void 0===i.x){const e=g(O[r],s,{w:i.w,h:i.h});e&&(i.x=e.x,i.y=e.y)}return i.x=void 0===i.x||null===i.x?0:i.x,i.y=void 0===i.y||null===i.y?1/0:i.y,Object(n.select)("ithemes-security/dashboard").canEditDashboard(e)||(i.static=!0),"unknown"===t.card&&(i.isResizable=!1),i.minW===i.maxW&&i.minH===i.maxH&&(i.isResizable=!1),i}function g(e,t,a){const c=[];for(const a of t){const{x:t,y:r,w:s,h:n}=a;for(let a=0;a<n;a++){c[a]||(c[a]=new Array(e).fill(0));for(let n=0;n<s;n++)c[a+r]||(c[a+r]=new Array(e).fill(0)),c[a+r][n+t]=1}}const{w:r,h:s}=a;for(let t=0;t<c.length;t++)e:for(let a=0;a<e;a++)if(!c[t]||1!==c[t][a]){for(let n=0;n<s;n++)for(let s=0;s<r;s++)if(t+n>c.length||a+s>=e||c[t+n]&&1===c[t+n][a+s])continue e;return{x:a,y:t}}return{x:0,y:c.length}}function E(e,t){return e.x===t.x&&e.y===t.y&&e.w===t.w&&e.h===t.h}const v=s()((function(e,t){if(e===t)return!0;if(Object.keys(e).length!==Object.keys(t).length)return!1;const a=new Map;for(let c=0;c<h.length;c++){const r=h[c];if(e[r]||t[r]){if(!e[r]&&t[r]||e[r]&&!t[r])return!1;if(e[r].length!==t[r].length)return!1;for(let t=0;t<e[r].length;t++)a.set(e[r][t].i,e[r][t]);for(let e=0;e<t[r].length;e++){const c=a.get(t[r][e].i);if(!c)return!1;if(!E(c,t[r][e]))return!1;a.delete(c.i)}if(a.size>0)return!1}}return!0}));const N=s()((function(e,t,a){const r=Object(c.keyBy)(t[a],"i"),s=[...e];return s.sort((function(e,t){const a=e.id.toString(),c=t.id.toString();if(!r[a]&&!r[c])return 0;if(r[a]&&!r[c])return 1;if(!r[a]&&r[c])return-1;const s=r[a].y,n=r[c].y,i=r[a].x,o=r[c].x;return s>n?1:s<n?-1:i>o?1:i<o?-1:0})),s}));const k=s()((function(e,t){const a=Object(c.keyBy)(t.cards,"id"),r=[...e];return r.sort((function(e,t){const c=e.id,r=t.id;if(!a[c]&&!a[r])return 0;if(a[c]&&!a[r])return 1;if(!a[c]&&a[r])return-1;const s=a[c].position.mobile.y,n=a[r].position.mobile.y,i=a[c].position.mobile.x,o=a[r].position.mobile.x;return s>n?1:s<n?-1:i>o?1:i<o?-1:0})),r}));function w(e,t){if(!t)return Object(i.__)("Unknown Card","better-wp-security");let a=t.label;return a=Object(o.applyFilters)("ithemes-security.dashboard.getCardTitle."+t.slug,a,e),Object(o.applyFilters)("ithemes-security.dashboard.getCardTitle",a,e,t)}function I(e,t,a,c){Object.entries(a).forEach(t=>{let[a,c]=t;return e[a]!==c&&console.log(`Prop '${a}' changed`)}),Object.entries(c).forEach(e=>{let[a,c]=e;return t[a]!==c&&console.log(`State '${a}' changed`)})}function C(e){return Object(c.get)(e,["avatar_urls",96],d.a)}},aFxt:function(e,t,a){},cDcd:function(e,t){!function(){e.exports=this.React}()},cruf:function(e,t){!function(){e.exports=this.itsec.dashboard.api}()},faye:function(e,t){!function(){e.exports=this.ReactDOM}()},fber:function(e,t,a){var c=a("cDcd");function r(e){return c.createElement("svg",e,[c.createElement("defs",{key:0},c.createElement("style",null,".itsec-icon-default-layout-113b3__a,.itsec-icon-default-layout-113b3__e,.itsec-icon-default-layout-113b3__j,.itsec-icon-default-layout-113b3__k{fill:#e1f2fc;}.itsec-icon-default-layout-113b3__a,.itsec-icon-default-layout-113b3__e,.itsec-icon-default-layout-113b3__f,.itsec-icon-default-layout-113b3__g,.itsec-icon-default-layout-113b3__i,.itsec-icon-default-layout-113b3__j,.itsec-icon-default-layout-113b3__k{stroke:#0083e3;}.itsec-icon-default-layout-113b3__a{stroke-width:3px;}.itsec-icon-default-layout-113b3__b{fill:#0083e3;}.itsec-icon-default-layout-113b3__c,.itsec-icon-default-layout-113b3__f{fill:#fff;}.itsec-icon-default-layout-113b3__d,.itsec-icon-default-layout-113b3__g,.itsec-icon-default-layout-113b3__h,.itsec-icon-default-layout-113b3__i{fill:none;}.itsec-icon-default-layout-113b3__e,.itsec-icon-default-layout-113b3__i,.itsec-icon-default-layout-113b3__j{stroke-width:2px;}.itsec-icon-default-layout-113b3__h{stroke:#3fa2f7;}.itsec-icon-default-layout-113b3__j,.itsec-icon-default-layout-113b3__k{stroke-miterlimit:10;}")),c.createElement("g",{transform:"translate(-180.964 -417.881)",key:1},[c.createElement("g",{transform:"translate(182 419.381)",key:0},[c.createElement("path",{className:"itsec-icon-default-layout-113b3__a",d:"M349.371,304.5a4.867,4.867,0,0,0-4.871,4.863v86.914a3.244,3.244,0,0,0,3.247,3.242H482.523a3.244,3.244,0,0,0,3.247-3.242V309.363A4.867,4.867,0,0,0,480.9,304.5Z",transform:"translate(-327.18 -304.5)",key:0}),c.createElement("path",{className:"itsec-icon-default-layout-113b3__b",d:"M371,415.666H503.175V334H371Z",transform:"translate(-348.552 -328.291)",key:1}),c.createElement("path",{className:"itsec-icon-default-layout-113b3__c",d:"M373,416.892H504.4V336H373Z",transform:"translate(-350.164 -329.904)",key:2}),c.createElement("path",{className:"itsec-icon-default-layout-113b3__d",d:"M272.384,797.451c-2.16,0-4.861-1.293-6.017-1.844-.164-.079-.281-.135-.368-.174V793H437.654v2.433c-.087.041-.2.095-.368.174-1.146.552-3.828,1.844-5.97,1.844H272.384Z",transform:"translate(-263.871 -698.465)",key:3}),c.createElement("path",{className:"itsec-icon-default-layout-113b3__a",d:"M437.734,792.5H265.5v2.928c.2,0,3.874,2.1,6.686,2.1H431.094c2.793,0,6.44-2.109,6.632-2.109.006,0,.008-.017.008-.017Z",transform:"translate(-263.468 -698.061)",key:4}),c.createElement("path",{className:"itsec-icon-default-layout-113b3__b",d:"M266.363,805l-.193.387H437.63l.193-.387Z",transform:"translate(-264.008 -708.143)",key:5}),c.createElement("path",{className:"itsec-icon-default-layout-113b3__b",d:"M666.481,793.935h-19.6A1.9,1.9,0,0,1,645,792.019V792h23.416v.019a1.9,1.9,0,0,1-1.887,1.916",transform:"translate(-569.527 -697.658)",key:6}),c.createElement("path",{className:"itsec-icon-default-layout-113b3__b",d:"M703.525,319.007a.677.677,0,1,1-.677-.677.678.678,0,0,1,.677.677",transform:"translate(-615.633 -315.654)",key:7}),c.createElement("path",{className:"itsec-icon-default-layout-113b3__e",d:"M20.642,45.638H.9a2.882,2.882,0,0,1-2.9-2.9V-4.1A2.888,2.888,0,0,1,.9-7H20.642a2.863,2.863,0,0,1,2.9,2.9V42.735A2.857,2.857,0,0,1,20.642,45.638Z",transform:"translate(2.194 54.316)",key:8}),c.createElement("path",{className:"itsec-icon-default-layout-113b3__f",d:"M28.529,23.5H5.5V64.333H28.529Z",transform:"translate(-3.855 29.718)",key:9}),c.createElement("path",{className:"itsec-icon-default-layout-113b3__g",d:"M58.04,9.694a.183.183,0,0,1-.194.194H54.364a.194.194,0,1,1,0-.387h3.483a.183.183,0,0,1,.194.194Z",transform:"translate(-43.106 41.009)",key:10}),c.createElement("path",{className:"itsec-icon-default-layout-113b3__g",d:"M62.944.717A.387.387,0,1,1,62.557.33a.388.388,0,0,1,.387.387Z",transform:"translate(-49.558 48.405)",key:11}),c.createElement("path",{className:"itsec-icon-default-layout-113b3__g",d:"M40.944,8.717a.387.387,0,1,1-.387-.387.388.388,0,0,1,.387.387Z",transform:"translate(-31.816 41.953)",key:12}),c.createElement("path",{className:"itsec-icon-default-layout-113b3__h",d:"M130.887,52.5H130.5v3.677h.387c-.025,0,0-.035,0,0V52.5c0,.035-.025,0,0,0Z",transform:"translate(-104.665 6.331)",key:13}),c.createElement("path",{className:"itsec-icon-default-layout-113b3__i",d:"M-2.806,27.33h0c-.13,0-.194.035-.194,0v1.742c0-.035.064,0,.194,0h0V27.33Z",transform:"translate(3 26.63)",key:14}),c.createElement("path",{className:"itsec-icon-default-layout-113b3__i",d:"M-2.806,52H-3c.045,0,0,.035,0,0v3.677c0-.035.045,0,0,0h.194V52Z",transform:"translate(3 6.734)",key:15}),c.createElement("path",{className:"itsec-icon-default-layout-113b3__i",d:"M-2.806,77H-3c.045,0,0,.035,0,0v3.677c0-.035.045,0,0,0h.194V77Z",transform:"translate(3 -13.428)",key:16})]),c.createElement("g",{transform:"translate(253.524 447.613)",key:1},[c.createElement("path",{className:"itsec-icon-default-layout-113b3__j",d:"M2.982,4.465A17.458,17.458,0,0,1,9.228,3.37a.776.776,0,0,1,.78.772h0V5.506s-.114.352.364.215a.746.746,0,0,1,.129-.029c.715-.1,3.758-.418,3.758-.418s.179.06.179-.317V2.986s-.031-.179.334-.226A25.127,25.127,0,0,1,21.7,2.734c.089.01.306-.032.269.478V4.985s-.109.33.4.3c.04,0,.078,0,.118,0,.691.064,3.65.419,3.65.419s.309.125.262-.293V3.38s-.009-.182.266-.164A32.889,32.889,0,0,1,33.73,4.44a.212.212,0,0,1,.17.236v13.2s-.334,10.6-9.007,17.65a17.767,17.767,0,0,1-6.635,3.75.769.769,0,0,1-.466-.037A25.17,25.17,0,0,1,4.475,26.524C4.018,25.388,2.5,21.817,2.5,19.781V5.183A.765.765,0,0,1,2.982,4.465Z",transform:"translate(-2.5 -2.501)",key:0}),c.createElement("path",{className:"itsec-icon-default-layout-113b3__j",d:"M54.534,56.782V51.025a.8.8,0,0,0-.617-.746,54.758,54.758,0,0,0-10.6-1.039h-.232A56.638,56.638,0,0,0,32.417,50.3a.794.794,0,0,0-.617.745v5.781c0,.456.012,7.641,4.7,13.012a27.463,27.463,0,0,0,6.224,5.476.953.953,0,0,0,.9,0,27.428,27.428,0,0,0,6.215-5.476C54.642,64.326,54.536,56.869,54.534,56.782Z",transform:"translate(-27.464 -42.389)",key:1})]),c.createElement("g",{transform:"translate(189.856 486.12)",key:2},[c.createElement("path",{className:"itsec-icon-default-layout-113b3__k",d:"M2.667,3.184A6.075,6.075,0,0,1,4.841,2.8a.27.27,0,0,1,.271.269h0v.474s-.04.122.127.075a.26.26,0,0,1,.045-.01c.249-.033,1.308-.145,1.308-.145s.062.021.062-.11V2.67s-.011-.062.116-.079a8.744,8.744,0,0,1,2.412-.009c.031,0,.107-.011.094.166v.617s-.038.115.14.106h.041c.24.022,1.27.146,1.27.146s.108.043.091-.1V2.807s0-.063.093-.057a11.444,11.444,0,0,1,2.456.426.074.074,0,0,1,.059.082V7.85a8.96,8.96,0,0,1-3.134,6.142,6.182,6.182,0,0,1-2.309,1.3.268.268,0,0,1-.162-.013A8.759,8.759,0,0,1,3.187,10.86,8.255,8.255,0,0,1,2.5,8.514V3.434A.266.266,0,0,1,2.667,3.184Z",transform:"translate(-2.5 -2.501)",key:0}),c.createElement("path",{className:"itsec-icon-default-layout-113b3__k",d:"M39.711,51.864v-2a.277.277,0,0,0-.215-.26,19.055,19.055,0,0,0-3.689-.362h-.081a19.709,19.709,0,0,0-3.712.369.276.276,0,0,0-.215.259V51.88a7.41,7.41,0,0,0,1.634,4.528A9.556,9.556,0,0,0,35.6,58.314a.332.332,0,0,0,.314,0,9.544,9.544,0,0,0,2.163-1.906A7.439,7.439,0,0,0,39.711,51.864Z",transform:"translate(-30.291 -46.856)",key:1})])])])}r.defaultProps={viewBox:"0 0 176.802 102.47"},e.exports=r,r.default=r},g56x:function(e,t){!function(){e.exports=this.wp.hooks}()},gdqT:function(e,t){!function(){e.exports=this.wp.a11y}()},ixw9:function(e,t,a){},l3Sj:function(e,t){!function(){e.exports=this.wp.i18n}()},o7fS:function(e,t,a){},oBCA:function(e,t,a){var c=a("cDcd");function r(e){return c.createElement("svg",e,[c.createElement("defs",{key:0},c.createElement("style",null,".itsec-icon-scratch-layout-9f4ff__a{fill:#fff;}.itsec-icon-scratch-layout-9f4ff__b{fill:#e1f2fc;stroke:#707070;}.itsec-icon-scratch-layout-9f4ff__c{fill:#0083e3;}.itsec-icon-scratch-layout-9f4ff__d{stroke:none;}.itsec-icon-scratch-layout-9f4ff__e{fill:none;}")),c.createElement("g",{transform:"translate(-1056 -520.655)",key:1},[c.createElement("rect",{className:"itsec-icon-scratch-layout-9f4ff__a",width:"39.001",height:"20.501",transform:"translate(1125.858 576.267) rotate(45)",key:0}),c.createElement("rect",{className:"itsec-icon-scratch-layout-9f4ff__a",width:"37.501",height:"20.501",transform:"translate(1073.167 523.325) rotate(45)",key:1}),c.createElement("g",{className:"itsec-icon-scratch-layout-9f4ff__b",transform:"translate(1063.11 597.823) rotate(-45)",key:2},[c.createElement("rect",{className:"itsec-icon-scratch-layout-9f4ff__d",width:"99.254",height:"21.001",key:0}),c.createElement("rect",{className:"itsec-icon-scratch-layout-9f4ff__e",x:"0.5",y:"0.5",width:"98.254",height:"20.001",key:1})]),c.createElement("path",{className:"itsec-icon-scratch-layout-9f4ff__c",d:"M318.38,317.685h0a5.134,5.134,0,1,0-7.26,0A5.138,5.138,0,0,0,318.38,317.685Zm-5.663-1.6a2.875,2.875,0,1,1,4.068,0A2.858,2.858,0,0,1,312.718,316.088Z",transform:"translate(823.787 288.967)",key:3}),c.createElement("path",{className:"itsec-icon-scratch-layout-9f4ff__c",d:"M95.132,23.558s0,0,0,0l.007-.007.31-.31-.007-.008A12.607,12.607,0,0,0,77.626,5.415l-.007-.007-.31.31-.008.008a.009.009,0,0,0,0,.005L3.213,79.81l.03.03a1.733,1.733,0,0,0-.785,1.233L.021,98.869a1.752,1.752,0,0,0,1.735,1.988,1.893,1.893,0,0,0,.238-.015l17.8-2.438a1.749,1.749,0,0,0,1.233-.785l.03.03ZM86.217,5.528a9.112,9.112,0,0,1,7.563,14.2L81.131,7.078A9.044,9.044,0,0,1,86.217,5.528Zm-8.6,4.828L90.5,23.238,21.047,92.693,16.2,87.846,71.951,32.094l-3.338-3.338L12.861,84.508l-4.7-4.7ZM3.8,97.059,5.809,82.4,18.454,95.051Z",transform:"translate(1055.996 519.131)",key:4}),c.createElement("path",{className:"itsec-icon-scratch-layout-9f4ff__c",d:"M28.5,44.631l3.193-3.193L6.135,15.882,16.562,5.455,21.508,10.4,17.92,13.985l2.833,2.833,3.585-3.588,2.883,2.883L23.635,19.7l2.833,2.833,3.588-3.588,2.883,2.883L27.63,27.133l2.833,2.833,5.305-5.305,3.515,3.515L35.7,31.763,38.528,34.6l3.588-3.588,0,0,3.193-3.193L18.16.664a2.256,2.256,0,0,0-3.193,0L1.344,14.285a2.256,2.256,0,0,0,0,3.193Z",transform:"translate(1055.487 520.652)",key:5}),c.createElement("path",{className:"itsec-icon-scratch-layout-9f4ff__c",d:"M261.994,244.481c-.04-.04-.082-.08-.125-.117L233.453,215.95l-8.5,8.5,2.825,2.825,5.308-5.308L257.2,246.081l-10.428,10.428L219.833,229.57l-3.193,3.2L245.176,261.3a2.256,2.256,0,0,0,3.193,0l13.623-13.621s0,0,.005-.005A2.263,2.263,0,0,0,261.994,244.481Z",transform:"translate(893.521 358.693)",key:6})])])}r.defaultProps={viewBox:"0 0 100.176 100"},e.exports=r,r.default=r},oX45:function(e,t,a){},onLe:function(e,t){!function(){e.exports=this.wp.notices}()},qrrL:function(e,t,a){},rl8x:function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},silS:function(e,t,a){},"tI+e":function(e,t){!function(){e.exports=this.wp.components}()},tsan:function(e,t,a){},x31Q:function(e,t,a){},"xR+x":function(e,t,a){},ywyh:function(e,t){!function(){e.exports=this.wp.apiFetch}()},z1rk:function(e,t){!function(){e.exports=this.itsec.packages.data}()}},[["V1Ci",0,4,33,1,2,6,31,3,5]]]);
|
dist/manifest.php
CHANGED
@@ -215,11 +215,11 @@
|
|
215 |
0 => 'dashboard/dashboard.css',
|
216 |
1 => 'dashboard/dashboard.js',
|
217 |
),
|
218 |
-
'hash' => '
|
219 |
'contentHash' =>
|
220 |
array (
|
221 |
-
'css/mini-extract' => '
|
222 |
-
'javascript' => '
|
223 |
),
|
224 |
'vendors' =>
|
225 |
array (
|
@@ -455,11 +455,11 @@
|
|
455 |
0 => 'notification-center/settings.css',
|
456 |
1 => 'notification-center/settings.js',
|
457 |
),
|
458 |
-
'hash' => '
|
459 |
'contentHash' =>
|
460 |
array (
|
461 |
'css/mini-extract' => '82bfc7d5c1593e81b971',
|
462 |
-
'javascript' => '
|
463 |
),
|
464 |
'vendors' =>
|
465 |
array (
|
@@ -589,11 +589,11 @@
|
|
589 |
0 => 'pages/settings.css',
|
590 |
1 => 'pages/settings.js',
|
591 |
),
|
592 |
-
'hash' => '
|
593 |
'contentHash' =>
|
594 |
array (
|
595 |
'css/mini-extract' => 'a2abad058eca81672d27',
|
596 |
-
'javascript' => '
|
597 |
),
|
598 |
'vendors' =>
|
599 |
array (
|
@@ -839,11 +839,11 @@
|
|
839 |
0 => 'user-groups/settings.css',
|
840 |
1 => 'user-groups/settings.js',
|
841 |
),
|
842 |
-
'hash' => '
|
843 |
'contentHash' =>
|
844 |
array (
|
845 |
'css/mini-extract' => '689e1829bdf9efc9b4de',
|
846 |
-
'javascript' => '
|
847 |
),
|
848 |
'vendors' =>
|
849 |
array (
|
215 |
0 => 'dashboard/dashboard.css',
|
216 |
1 => 'dashboard/dashboard.js',
|
217 |
),
|
218 |
+
'hash' => 'bd126a15180b006b59d85a649f7e39ab',
|
219 |
'contentHash' =>
|
220 |
array (
|
221 |
+
'css/mini-extract' => 'd3368d2f644336504341',
|
222 |
+
'javascript' => 'b175cc65360000ab9ee3',
|
223 |
),
|
224 |
'vendors' =>
|
225 |
array (
|
455 |
0 => 'notification-center/settings.css',
|
456 |
1 => 'notification-center/settings.js',
|
457 |
),
|
458 |
+
'hash' => '255a701334ad6714e226cd6900e7110c',
|
459 |
'contentHash' =>
|
460 |
array (
|
461 |
'css/mini-extract' => '82bfc7d5c1593e81b971',
|
462 |
+
'javascript' => '172deb1096b50b4a1c85',
|
463 |
),
|
464 |
'vendors' =>
|
465 |
array (
|
589 |
0 => 'pages/settings.css',
|
590 |
1 => 'pages/settings.js',
|
591 |
),
|
592 |
+
'hash' => '7ee8a355baffdac840164863d80f8bdb',
|
593 |
'contentHash' =>
|
594 |
array (
|
595 |
'css/mini-extract' => 'a2abad058eca81672d27',
|
596 |
+
'javascript' => '880983a346fc1e18e796',
|
597 |
),
|
598 |
'vendors' =>
|
599 |
array (
|
839 |
0 => 'user-groups/settings.css',
|
840 |
1 => 'user-groups/settings.js',
|
841 |
),
|
842 |
+
'hash' => 'ac51769c8ddab1509424e545456ff29f',
|
843 |
'contentHash' =>
|
844 |
array (
|
845 |
'css/mini-extract' => '689e1829bdf9efc9b4de',
|
846 |
+
'javascript' => 'dc4fdf3112e777431aa5',
|
847 |
),
|
848 |
'vendors' =>
|
849 |
array (
|
history.txt
CHANGED
@@ -979,3 +979,6 @@
|
|
979 |
8.1.1 - 2022-04-14 - Timothy Jacobs, Lisa Canini
|
980 |
Bug Fix: Error when visiting the Notifications page after activating a module with notifications for the first time.
|
981 |
Bug Fix: Update deprecated withState usages to useState.
|
|
|
|
|
|
979 |
8.1.1 - 2022-04-14 - Timothy Jacobs, Lisa Canini
|
980 |
Bug Fix: Error when visiting the Notifications page after activating a module with notifications for the first time.
|
981 |
Bug Fix: Update deprecated withState usages to useState.
|
982 |
+
8.1.2 - 2022-04-26 - Timothy Jacobs, Lisa Canini
|
983 |
+
Tweak: Require a Title when creating a new Dashboard.
|
984 |
+
Bug Fix: Don't attempt to send a Site Scan notification for Clean scans preventing a fatal error after scheduled site scans.
|
package.json
CHANGED
@@ -136,9 +136,9 @@
|
|
136 |
"url": "git+ssh://git@bitbucket.org/ithemes/ithemes-security-pro.git"
|
137 |
},
|
138 |
"scripts": {
|
139 |
-
"build": "NODE_ENV=production ./node_modules/.bin/webpack",
|
140 |
-
"clean": "node ./bin/clean.js
|
141 |
-
"dev": "./node_modules/.bin/webpack",
|
142 |
"lint": "concurrently \"npm run lint-js\"",
|
143 |
"lint-js": "wp-scripts lint-js",
|
144 |
"lint-js:fix": "wp-scripts lint-js --fix",
|
@@ -147,9 +147,9 @@
|
|
147 |
"test-unit:coverage": "npm run test-unit -- --coverage",
|
148 |
"test-unit:update": "npm run test-unit -- --updateSnapshot",
|
149 |
"test-unit:watch": "npm run test-unit -- --watch",
|
150 |
-
"watch": "./node_modules/.bin/webpack --watch",
|
151 |
"packages-update": "wp-scripts packages-update",
|
152 |
-
"test-up": "./bin/test-up.sh",
|
153 |
"test-wpunit": "docker-compose exec -T -w /var/www/html/wp-content/plugins/ithemes-security-pro wordpress ./vendor/bin/codecept run wpunit",
|
154 |
"test-acceptance": "docker-compose exec -T -w /var/www/html/wp-content/plugins/ithemes-security-pro wordpress ./vendor/bin/codecept run acceptance",
|
155 |
"test-cli": "docker-compose exec -T -w /var/www/html/wp-content/plugins/ithemes-security-pro wordpress ./vendor/bin/codecept run wpcli",
|
136 |
"url": "git+ssh://git@bitbucket.org/ithemes/ithemes-security-pro.git"
|
137 |
},
|
138 |
"scripts": {
|
139 |
+
"build": "NODE_ENV=production node ./node_modules/.bin/webpack",
|
140 |
+
"clean": "node ./bin/clean.js",
|
141 |
+
"dev": "node ./node_modules/.bin/webpack",
|
142 |
"lint": "concurrently \"npm run lint-js\"",
|
143 |
"lint-js": "wp-scripts lint-js",
|
144 |
"lint-js:fix": "wp-scripts lint-js --fix",
|
147 |
"test-unit:coverage": "npm run test-unit -- --coverage",
|
148 |
"test-unit:update": "npm run test-unit -- --updateSnapshot",
|
149 |
"test-unit:watch": "npm run test-unit -- --watch",
|
150 |
+
"watch": "node ./node_modules/.bin/webpack --watch",
|
151 |
"packages-update": "wp-scripts packages-update",
|
152 |
+
"test-up": "bash ./bin/test-up.sh",
|
153 |
"test-wpunit": "docker-compose exec -T -w /var/www/html/wp-content/plugins/ithemes-security-pro wordpress ./vendor/bin/codecept run wpunit",
|
154 |
"test-acceptance": "docker-compose exec -T -w /var/www/html/wp-content/plugins/ithemes-security-pro wordpress ./vendor/bin/codecept run acceptance",
|
155 |
"test-cli": "docker-compose exec -T -w /var/www/html/wp-content/plugins/ithemes-security-pro wordpress ./vendor/bin/codecept run wpcli",
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: ithemes, chrisjean, mattdanner, timothyblynjacobs
|
|
3 |
Tags: security plugin, malware scanner, security, malware prevention, two-factor authentication, brute force protection, scanner, password protection, ban, bad bots, audit log
|
4 |
Requires at least: 5.8
|
5 |
Tested up to: 6.0
|
6 |
-
Stable tag: 8.1.
|
7 |
Requires PHP: 7.0
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -151,6 +151,10 @@ Manage more than one WordPress site? Release lockouts and keep your themes, plug
|
|
151 |
|
152 |
== Changelog ==
|
153 |
|
|
|
|
|
|
|
|
|
154 |
= 8.1.1 =
|
155 |
* Bug Fix: Error when visiting the Notifications page after activating a module with notifications for the first time.
|
156 |
* Bug Fix: Update deprecated withState usages to useState.
|
@@ -657,5 +661,5 @@ Manage more than one WordPress site? Release lockouts and keep your themes, plug
|
|
657 |
|
658 |
== Upgrade Notice ==
|
659 |
|
660 |
-
= 8.1.
|
661 |
Version 8.1.0 includes new features and important bug fixes.
|
3 |
Tags: security plugin, malware scanner, security, malware prevention, two-factor authentication, brute force protection, scanner, password protection, ban, bad bots, audit log
|
4 |
Requires at least: 5.8
|
5 |
Tested up to: 6.0
|
6 |
+
Stable tag: 8.1.2
|
7 |
Requires PHP: 7.0
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
151 |
|
152 |
== Changelog ==
|
153 |
|
154 |
+
= 8.1.2 =
|
155 |
+
* Tweak: Require a Title when creating a new Dashboard.
|
156 |
+
* Bug Fix: Don't attempt to send a Site Scan notification for Clean scans preventing a fatal error after scheduled site scans.
|
157 |
+
|
158 |
= 8.1.1 =
|
159 |
* Bug Fix: Error when visiting the Notifications page after activating a module with notifications for the first time.
|
160 |
* Bug Fix: Update deprecated withState usages to useState.
|
661 |
|
662 |
== Upgrade Notice ==
|
663 |
|
664 |
+
= 8.1.2 =
|
665 |
Version 8.1.0 includes new features and important bug fixes.
|