iThemes Security (formerly Better WP Security) - Version 8.1.0

Version Description

  • Important: iThemes Security now requires WordPress 5.8 or later.
  • New Feature: Include the full iThemes Security Site Scanner in iThemes Security Free. Scheduled scans are disabled by default.
  • Tweak: Add new "Go Pro" page that includes an overview of features in iThemes Security Pro.
  • Bug Fix: Scroll to top of window when navigating.
  • Bug Fix: Allow searching for Password Requirements.
  • Bug Fix: Don't load WordPress and System Tweaks modules when the ITSEC_DISABLE_MODULES constant is enabled.
  • Bug Fix: Prevent incidentally loading the Two-Factor module when it is unregistered.
  • Bug Fix: Conditionally display the NGINX File Path setting.
  • Bug Fix: Allow saving Notifications when "default recipients must contain at least 1 item" error is present.
  • Bug Fix: Help styling on WordPress 5.9.
  • Bug Fix: Compatibility with plugins that expected a logged-in user during lockouts.
Download this release

Release Info

Developer TimothyBlynJacobs
Plugin Icon 128x128 iThemes Security (formerly Better WP Security)
Version 8.1.0
Comparing to
See all releases

Code changes from version 8.0.2 to 8.1.0

Files changed (248) hide show
  1. better-wp-security.php +4 -4
  2. core/Contracts/Import_Export_Source.php +32 -0
  3. core/admin-pages/entries/go-pro.js +16 -0
  4. core/admin-pages/entries/go-pro/app.js +82 -0
  5. core/admin-pages/entries/go-pro/components/card-grid/index.js +34 -0
  6. core/admin-pages/entries/go-pro/components/card-grid/index.php +1 -0
  7. core/admin-pages/entries/go-pro/components/header/index.js +23 -0
  8. core/admin-pages/entries/go-pro/components/header/index.php +1 -0
  9. core/admin-pages/entries/go-pro/components/index.js +3 -0
  10. core/admin-pages/entries/go-pro/components/index.php +1 -0
  11. core/admin-pages/entries/go-pro/components/integration/index.js +76 -0
  12. core/admin-pages/entries/go-pro/components/integration/index.php +1 -0
  13. core/admin-pages/entries/go-pro/index.php +1 -0
  14. core/admin-pages/entries/go-pro/pages/features/index.js +46 -0
  15. core/admin-pages/entries/go-pro/pages/features/index.php +1 -0
  16. core/admin-pages/entries/go-pro/pages/features/style.scss +7 -0
  17. core/admin-pages/entries/go-pro/pages/index.js +3 -0
  18. core/admin-pages/entries/go-pro/pages/index.php +1 -0
  19. core/admin-pages/entries/go-pro/pages/integrations/index.js +24 -0
  20. core/admin-pages/entries/go-pro/pages/integrations/index.php +1 -0
  21. core/admin-pages/entries/go-pro/pages/integrations/style.scss +7 -0
  22. core/admin-pages/entries/go-pro/pages/pricing/index.js +57 -0
  23. core/admin-pages/entries/go-pro/pages/pricing/index.php +1 -0
  24. core/admin-pages/entries/go-pro/pages/pricing/style.scss +11 -0
  25. core/admin-pages/entries/go-pro/style.scss +90 -0
  26. core/admin-pages/entries/settings.js +5 -1
  27. core/admin-pages/entries/settings/app.js +5 -1
  28. core/admin-pages/entries/settings/components/advanced-navigation/index.js +46 -0
  29. core/admin-pages/entries/settings/components/advanced-navigation/index.php +1 -0
  30. core/admin-pages/entries/settings/{pages/settings → components/advanced-navigation}/style.scss +3 -11
  31. core/admin-pages/entries/settings/components/breadcrumbs/index.js +1 -1
  32. core/admin-pages/entries/settings/components/index.js +1 -0
  33. core/admin-pages/entries/settings/components/main/index.js +1 -1
  34. core/admin-pages/entries/settings/components/main/style.scss +2 -1
  35. core/admin-pages/entries/settings/components/navigation/index.js +1 -5
  36. core/admin-pages/entries/settings/components/selectable-card/style.scss +4 -0
  37. core/admin-pages/entries/settings/components/sidebar/style.scss +1 -5
  38. core/admin-pages/entries/settings/components/toolbar/index.js +1 -1
  39. core/admin-pages/entries/settings/history.js +1 -1
  40. core/admin-pages/entries/settings/page-registration.js +23 -4
  41. core/admin-pages/entries/settings/pages/configure/index.js +37 -10
  42. core/admin-pages/entries/settings/pages/import/index.js +53 -0
  43. core/admin-pages/entries/settings/pages/import/index.php +1 -0
  44. core/admin-pages/entries/settings/pages/index.js +7 -4
  45. core/admin-pages/entries/settings/pages/modules/index.js +41 -34
  46. core/admin-pages/entries/settings/pages/secure-site/index.js +53 -42
  47. core/admin-pages/entries/settings/pages/settings/index.js +10 -45
  48. core/admin-pages/entries/settings/pages/tools/index.js +1 -1
  49. core/admin-pages/entries/settings/search.js +5 -6
  50. core/admin-pages/entries/settings/stores/controls.js +19 -19
  51. core/admin-pages/entries/settings/stores/onboard/actions.js +9 -2
  52. core/admin-pages/entries/settings/stores/onboard/reducers.js +4 -4
  53. core/admin-pages/entries/settings/stores/tools/reducers.js +1 -1
  54. core/admin-pages/entries/settings/stores/tools/selectors.js +1 -1
  55. core/admin-pages/entries/settings/style.scss +1 -1
  56. core/admin-pages/entries/settings/utils.js +167 -50
  57. core/admin-pages/init.php +2 -2
  58. core/admin-pages/page-go-pro.php +10 -2
  59. core/container.php +12 -0
  60. core/core.php +4 -6
  61. core/img/mail/article_icon.png +0 -0
  62. core/img/mail/documentation_icon.png +0 -0
  63. core/img/mail/logo.png +0 -0
  64. core/img/mail/pro_logo.png +0 -0
  65. core/img/mail/pro_logo_no_text.png +0 -0
  66. core/img/mail/support_icon.png +0 -0
  67. core/img/mail/video_icon.png +0 -0
  68. core/lib.php +92 -7
  69. core/lib/Module_Config.php +8 -0
  70. core/lib/Result.php +83 -1
  71. core/lib/actor/Import.php +17 -0
  72. core/lib/actor/Import_Factory.php +27 -0
  73. core/lib/class-itsec-lib-directory.php +21 -0
  74. core/lib/class-itsec-lib-feature-flags.php +0 -14
  75. core/lib/class-itsec-lib-file.php +2 -2
  76. core/lib/class-itsec-lib-rest.php +22 -0
  77. core/lib/class-itsec-lib-user.php +17 -0
  78. core/lib/class-itsec-mail.php +80 -16
  79. core/lib/login-interstitial/class-itsec-login-interstitial-session.php +3 -1
  80. core/lib/mail-templates/123-box.html +84 -0
  81. core/lib/mail-templates/details-box.html +15 -15
  82. core/lib/mail-templates/footer.html +11 -59
  83. core/lib/mail-templates/header.html +1 -1
  84. core/lib/mail-templates/large-text.html +24 -16
  85. core/lib/mail-templates/pro-callout.html +1 -1
  86. core/lib/mail-templates/section-heading.html +25 -18
  87. core/lib/mail-templates/site-scanner-pro-callout.html +167 -0
  88. core/lib/mail-templates/text.html +22 -16
  89. core/lib/rest/Modules_Controller.php +12 -1
  90. core/lib/settings.php +6 -17
  91. core/lib/validator.php +4 -0
  92. core/lockout.php +3 -1
  93. core/module-schema.json +81 -37
  94. core/modules.php +156 -44
  95. core/modules/backup/entries/dashboard/style.scss +5 -0
  96. core/modules/backup/module.json +5 -0
  97. core/modules/ban-users/Database_Repository.php +94 -6
  98. core/modules/ban-users/container.php +11 -11
  99. core/modules/core/class-itsec-core-active.php +5 -0
  100. core/modules/core/class-itsec-core-admin.php +1 -1
  101. core/modules/core/entries/admin-notices/components/notice/style.scss +2 -4
  102. core/modules/core/entries/admin-notices/components/toolbar-button/index.js +1 -1
  103. core/modules/core/entries/admin-notices/store/controls.js +19 -19
  104. core/modules/core/notices.php +8 -7
  105. core/modules/dashboard/class-itsec-dashboard.php +232 -1
  106. core/modules/dashboard/container.php +7 -1
  107. core/modules/dashboard/entries/dashboard/app.js +1 -1
  108. core/modules/dashboard/entries/dashboard/cards/active-lockouts/index.js +17 -17
  109. core/modules/dashboard/entries/dashboard/cards/banned-users-list/style.scss +5 -0
  110. core/modules/dashboard/entries/dashboard/cards/renderers/pie-chart/index.js +2 -2
  111. core/modules/dashboard/entries/dashboard/components/card-grid/width-provider.js +0 -2
  112. core/modules/dashboard/entries/dashboard/components/edit-cards/promo-card.js +1 -1
  113. core/modules/dashboard/entries/dashboard/components/toolbar/index.js +1 -1
  114. core/modules/dashboard/entries/dashboard/store/app/reducer.js +7 -7
  115. core/modules/dashboard/entries/dashboard/store/cards/actions.js +1 -1
  116. core/modules/dashboard/entries/dashboard/store/cards/reducer.js +10 -10
  117. core/modules/dashboard/entries/dashboard/store/controls.js +19 -19
  118. core/modules/dashboard/entries/dashboard/store/dashboard/actions.js +2 -2
  119. core/modules/dashboard/entries/dashboard/store/dashboard/reducer.js +3 -3
  120. core/modules/dashboard/entries/dashboard/utils.js +17 -17
  121. core/modules/feature-flags/active.php +0 -15
  122. core/modules/file-change/module.json +9 -2
  123. core/modules/global/entries/settings/app.js +1 -1
  124. core/modules/global/module.json +20 -1
  125. core/modules/global/settings.php +2 -0
  126. core/modules/malware-scheduling/active.php +5 -0
  127. core/modules/malware-scheduling/class-itsec-malware-scheduling-scanner.php +75 -0
  128. core/modules/malware-scheduling/class-itsec-malware-scheduling.php +156 -0
  129. core/modules/malware-scheduling/deactivate.php +3 -0
  130. core/modules/malware-scheduling/index.php +1 -0
  131. core/modules/malware-scheduling/labels.php +5 -0
  132. core/modules/malware-scheduling/module.json +16 -0
  133. core/modules/malware-scheduling/scheduling.php +20 -0
  134. core/modules/malware-scheduling/setup.php +104 -0
  135. core/modules/network-brute-force/entries/settings/app.js +1 -1
  136. core/modules/network-brute-force/module.json +7 -0
  137. core/modules/notification-center/entries/settings/app.js +2 -2
  138. core/modules/notification-center/entries/settings/components/notification/index.js +4 -2
  139. core/modules/notification-center/entries/settings/components/page/index.js +49 -22
  140. core/modules/notification-center/entries/settings/components/settings/index.js +20 -3
  141. core/modules/notification-center/entries/settings/components/user-role-list/index.js +4 -4
  142. core/modules/notification-center/module.json +15 -1
  143. core/modules/promos/entries/dashboard/app.js +2 -2
  144. core/modules/promos/entries/settings/app.js +3 -3
  145. core/modules/site-scanner/api.php +178 -81
  146. core/modules/site-scanner/entries/dashboard/index.js +6 -6
  147. core/modules/site-scanner/mail.php +47 -9
  148. core/modules/site-scanner/module.json +23 -0
  149. core/modules/system-tweaks/activate.php +1 -1
  150. core/modules/system-tweaks/active.php +1 -1
  151. core/modules/system-tweaks/class-itsec-system-tweaks.php +4 -0
  152. core/modules/system-tweaks/deactivate.php +1 -1
  153. core/modules/two-factor/class-itsec-two-factor.php +52 -0
  154. core/modules/user-groups/Module/Module.php +133 -1
  155. core/modules/user-groups/container.php +8 -2
  156. core/modules/user-groups/entries/settings/app.js +2 -2
  157. core/modules/user-groups/entries/settings/components/group-nav/index.js +5 -4
  158. core/modules/user-groups/entries/settings/components/multi-group-selector/index.js +1 -1
  159. core/modules/user-groups/entries/settings/components/tab-body/index.js +1 -1
  160. core/modules/user-groups/entries/settings/hooks.js +3 -3
  161. core/modules/user-groups/entries/settings/store/actions.js +22 -4
  162. core/modules/user-groups/entries/settings/store/controls.js +24 -24
  163. core/modules/user-groups/entries/settings/store/index.js +7 -1
  164. core/modules/user-groups/entries/settings/store/reducers.js +18 -3
  165. core/modules/user-groups/entries/settings/store/selectors.js +28 -10
  166. core/modules/user-groups/entries/settings/utils.js +41 -138
  167. core/modules/user-groups/entries/store/actions.js +35 -19
  168. core/modules/user-groups/entries/store/controls.js +5 -5
  169. core/modules/user-groups/entries/store/index.js +2 -1
  170. core/modules/user-groups/entries/store/reducers.js +6 -6
  171. core/modules/user-groups/entries/store/selectors.js +130 -6
  172. core/modules/wordpress-tweaks/activate.php +1 -1
  173. core/modules/wordpress-tweaks/active.php +1 -1
  174. core/modules/wordpress-tweaks/class-itsec-wordpress-tweaks.php +4 -3
  175. core/modules/wordpress-tweaks/deactivate.php +1 -1
  176. core/package.json +47 -32
  177. core/packages/components/src/accordion/index.js +5 -5
  178. core/packages/components/src/active-descendant-container/index.js +2 -2
  179. core/packages/components/src/async-select/index.js +1 -1
  180. core/packages/components/src/checkbox-control/index.js +2 -2
  181. core/packages/components/src/checkbox-group-control/index.js +27 -17
  182. core/packages/components/src/entity-select-control/index.js +139 -0
  183. core/packages/components/src/entity-select-control/index.php +1 -0
  184. core/packages/components/src/error-list/index.js +2 -0
  185. core/packages/components/src/help-list/index.js +3 -3
  186. core/packages/components/src/help-list/style.scss +7 -4
  187. core/packages/components/src/index.js +2 -0
  188. core/packages/components/src/markup/index.js +1 -1
  189. core/packages/components/src/module-settings-notice-list/index.js +2 -2
  190. core/packages/components/src/module-settings-notice-list/notice.js +3 -3
  191. core/packages/components/src/result-summary/index.js +37 -0
  192. core/packages/components/src/result-summary/index.php +1 -0
  193. core/packages/data/src/actions.js +16 -0
  194. core/packages/data/src/bans/actions.js +3 -3
  195. core/packages/data/src/bans/reducers.js +11 -11
  196. core/packages/data/src/bans/selectors.js +11 -11
  197. core/packages/data/src/controls.js +125 -27
  198. core/packages/data/src/help/reducers.js +1 -1
  199. core/packages/data/src/index.js +3 -0
  200. core/packages/data/src/modules/actions.js +10 -22
  201. core/packages/data/src/modules/reducers.js +5 -3
  202. core/packages/data/src/modules/resolvers.js +10 -3
  203. core/packages/data/src/reducers.js +14 -0
  204. core/packages/data/src/resolvers.js +11 -0
  205. core/packages/data/src/selectors.js +13 -2
  206. core/packages/hocs/src/index.js +1 -0
  207. core/packages/hocs/src/use-async.js +1 -1
  208. core/packages/hocs/src/use-event-listener.js +3 -3
  209. core/packages/hocs/src/use-focus-outside.js +2 -2
  210. core/packages/hocs/src/use-set.js +23 -0
  211. core/packages/hocs/src/with-debounce-handler.js +2 -2
  212. core/packages/hocs/src/with-navigate.js +1 -1
  213. core/packages/hocs/src/with-pressed-modifier-keys.js +0 -2
  214. core/packages/hocs/src/with-prop-change-callback.js +1 -1
  215. core/packages/hocs/src/with-width.js +0 -2
  216. core/packages/preload/src/index.js +3 -3
  217. core/packages/rjsf-theme/src/fields/entity-select.js +16 -117
  218. core/packages/rjsf-theme/src/widgets/radio-widget/index.js +2 -2
  219. core/packages/rjsf-theme/src/widgets/select-widget/index.js +2 -2
  220. core/packages/search/src/components/search/index.js +1 -1
  221. core/packages/search/src/engine.js +1 -1
  222. core/packages/style-guide/src/mixins.scss +18 -14
  223. core/packages/utils/src/index.js +3 -3
  224. core/packages/utils/src/result.js +1 -1
  225. core/packages/utils/src/wp-error.js +1 -1
  226. core/packages/webpack/src/babel.config.json +18 -0
  227. core/packages/webpack/src/babel.js +0 -15
  228. core/packages/webpack/src/config/index.js +11 -11
  229. core/packages/webpack/src/dynamic-public-path/index.js +2 -2
  230. core/packages/webpack/src/dynamic-public-path/loader.js +1 -1
  231. core/packages/webpack/src/style-only-entry-plugin/index.js +2 -2
  232. core/rest.php +156 -0
  233. dist/30.js +0 -1
  234. dist/35.js +1 -0
  235. dist/backup/dashboard--settings.js +0 -11
  236. dist/backup/dashboard.css +1 -2
  237. dist/backup/dashboard.js +11 -1
  238. dist/core/admin-notices-api.js +1 -1
  239. dist/core/admin-notices-dashboard-admin-bar.css +4 -9
  240. dist/core/admin-notices-dashboard-admin-bar.js +2 -2
  241. dist/core/admin-notices.css +4 -10
  242. dist/core/admin-notices.js +2 -2
  243. dist/core/packages/components/site-scan-results/style.css +0 -1
  244. dist/core/settings.css +4 -9
  245. dist/core/settings.js +2 -2
  246. dist/dashboard/api.js +1 -1
  247. dist/dashboard/dashboard--settings--go-pro.css +19 -0
  248. dist/dashboard/dashboard--settings--go-pro.js +11 -0
better-wp-security.php CHANGED
@@ -6,12 +6,12 @@
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.0.2
10
  * Text Domain: better-wp-security
11
  * Network: True
12
  * License: GPLv2
13
  * Requires PHP: 7.0
14
- * Requires at least: 5.7
15
  */
16
 
17
  if ( version_compare( phpversion(), '7.0.0', '<' ) ) {
@@ -24,9 +24,9 @@ if ( version_compare( phpversion(), '7.0.0', '<' ) ) {
24
  return;
25
  }
26
 
27
- if ( version_compare( $GLOBALS['wp_version'], '5.7', '<' ) ) {
28
  function itsec_minimum_wp_version_notice() {
29
- echo '<div class="notice notice-error"><p>' . esc_html__( 'iThemes Security requires WordPress 5.7 or later.', 'better-wp-security' ) . '</p></div>';
30
  }
31
 
32
  add_action( 'admin_notices', 'itsec_minimum_wp_version_notice' );
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.0
10
  * Text Domain: better-wp-security
11
  * Network: True
12
  * License: GPLv2
13
  * Requires PHP: 7.0
14
+ * Requires at least: 5.8
15
  */
16
 
17
  if ( version_compare( phpversion(), '7.0.0', '<' ) ) {
24
  return;
25
  }
26
 
27
+ if ( version_compare( $GLOBALS['wp_version'], '5.8', '<' ) ) {
28
  function itsec_minimum_wp_version_notice() {
29
+ echo '<div class="notice notice-error"><p>' . esc_html__( 'iThemes Security requires WordPress 5.8 or later.', 'better-wp-security' ) . '</p></div>';
30
  }
31
 
32
  add_action( 'admin_notices', 'itsec_minimum_wp_version_notice' );
core/Contracts/Import_Export_Source.php ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace iThemesSecurity\Contracts;
4
+
5
+ use iThemesSecurity\Import_Export\Export\Export;
6
+ use iThemesSecurity\Import_Export\Import\Import_Context;
7
+ use iThemesSecurity\Import_Export\Import\Transformation;
8
+ use iThemesSecurity\Lib\Result;
9
+
10
+ interface Import_Export_Source {
11
+
12
+ public function get_export_slug(): string;
13
+
14
+ public function get_export_title(): string;
15
+
16
+ public function get_export_description(): string;
17
+
18
+ public function get_export_options_schema(): array;
19
+
20
+ public function get_export_schema(): array;
21
+
22
+ /**
23
+ * Gets the list of transformations.
24
+ *
25
+ * @return Transformation[]
26
+ */
27
+ public function get_transformations(): array;
28
+
29
+ public function export( $options ): Result;
30
+
31
+ public function import( Export $from, Import_Context $context ): Result;
32
+ }
core/admin-pages/entries/go-pro.js ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * WordPress dependencies
3
+ */
4
+ import { render } from '@wordpress/element';
5
+ import domReady from '@wordpress/dom-ready';
6
+ import { setLocaleData } from '@wordpress/i18n';
7
+
8
+ // Silence warnings until JS i18n is stable.
9
+ setLocaleData( { '': {} }, 'ithemes-security-pro' );
10
+
11
+ /**
12
+ * Internal dependencies
13
+ */
14
+ import App from './go-pro/app.js';
15
+
16
+ domReady( () => render( <App />, document.getElementById( 'itsec-go-pro-root' ) ) );
core/admin-pages/entries/go-pro/app.js ADDED
@@ -0,0 +1,82 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import { ThemeProvider } from '@emotion/react';
5
+
6
+ /**
7
+ * WordPress dependencies
8
+ */
9
+ import { useMemo, createInterpolateElement } from '@wordpress/element';
10
+ import { __ } from '@wordpress/i18n';
11
+
12
+ /**
13
+ * iThemes dependencies
14
+ */
15
+ import { defaultTheme, Text, TextWeight } from '@ithemes/ui';
16
+
17
+ /**
18
+ * Internal dependencies
19
+ */
20
+ import { TabPanel } from '@ithemes/security-components';
21
+ import { LogoProColor } from '@ithemes/security-style-guide';
22
+ import { useAsync } from '@ithemes/security-hocs';
23
+ import { Features, Pricing, Integrations } from './pages';
24
+ import './style.scss';
25
+
26
+ export default function App() {
27
+ const { value: pricing } = useAsync( fetchPricing );
28
+ const { value: features } = useAsync( fetchFeatures );
29
+ const { value: integrations } = useAsync( fetchIntegrations );
30
+ const tabs = useMemo( () => ( [
31
+ {
32
+ name: 'features',
33
+ title: __( 'Enhanced Website Security Features', 'better-wp-security' ),
34
+ render() {
35
+ return <Features features={ features } />;
36
+ },
37
+ },
38
+ {
39
+ name: 'pricing',
40
+ title: __( 'View Pricing & Plans', 'better-wp-security' ),
41
+ render() {
42
+ return <Pricing pricing={ pricing } />;
43
+ },
44
+ },
45
+ {
46
+ name: 'integrations',
47
+ title: __( 'Additional Security Integrations', 'better-wp-security' ),
48
+ render() {
49
+ return <Integrations integrations={ integrations } />;
50
+ },
51
+ },
52
+ ] ), [ pricing, features, integrations ] );
53
+
54
+ return (
55
+ <ThemeProvider theme={ defaultTheme }>
56
+ <div className="itsec-go-pro">
57
+ <header>
58
+ <LogoProColor />
59
+ <Text variant="dark" weight={ TextWeight.HEAVY }>
60
+ { createInterpolateElement(
61
+ __( 'This page is loaded from <a>iThemes.com/Security</a>', 'better-wp-security' ),
62
+ {
63
+ // eslint-disable-next-line jsx-a11y/anchor-has-content
64
+ a: <a href="https://ithem.es/security/" />,
65
+ }
66
+ ) }
67
+ </Text>
68
+ </header>
69
+ <TabPanel isStyled tabs={ tabs } className="itsec-go-pro-tab-panel">
70
+ { ( { render: Component } ) => <Component /> }
71
+ </TabPanel>
72
+ </div>
73
+ </ThemeProvider>
74
+ );
75
+ }
76
+
77
+ const fetchPricing = () => window.fetch( 'https://ithemes.com/api/itsec-go-pro-pricing.json' )
78
+ .then( ( response ) => response.json() );
79
+ const fetchFeatures = () => window.fetch( 'https://ithemes.com/api/itsec-go-pro-features.json' )
80
+ .then( ( response ) => response.json() );
81
+ const fetchIntegrations = () => window.fetch( 'https://ithemes.com/api/itsec-go-pro-integrations.json' )
82
+ .then( ( response ) => response.json() );
core/admin-pages/entries/go-pro/components/card-grid/index.js ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import styled from '@emotion/styled';
5
+
6
+ /**
7
+ * WordPress dependencies
8
+ */
9
+ import { Children } from '@wordpress/element';
10
+
11
+ const StyledGrid = styled.div`
12
+ width: auto;
13
+ display: grid;
14
+ grid-template-columns: repeat(1, 1fr);
15
+ justify-items: center;
16
+ justify-content: center;
17
+ gap: 3rem;
18
+
19
+ @media (min-width: ${ ( { theme } ) => theme.breaks.medium }px) {
20
+ grid-template-columns: repeat(min(2, ${ ( { count } ) => count }), 1fr);
21
+ }
22
+
23
+ @media (min-width: ${ ( { theme } ) => theme.breaks.wide }px) {
24
+ grid-template-columns: repeat(min(3, ${ ( { count } ) => count }), 1fr);
25
+ }
26
+ `;
27
+
28
+ export default function CardGrid( { children } ) {
29
+ return (
30
+ <StyledGrid className="itsec-go-pro-card-grid" count={ Children.count( children ) }>
31
+ { children }
32
+ </StyledGrid>
33
+ );
34
+ }
core/admin-pages/entries/go-pro/components/card-grid/index.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php // Silence is golden.
core/admin-pages/entries/go-pro/components/header/index.js ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import styled from '@emotion/styled';
5
+
6
+ /**
7
+ * iThemes dependencies
8
+ */
9
+ import { Heading, Text } from '@ithemes/ui';
10
+
11
+ const StyledHeader = styled.header`
12
+ max-width: 900px;
13
+ text-align: center;
14
+ `;
15
+
16
+ export default function Header( { title, subtitle } ) {
17
+ return (
18
+ <StyledHeader>
19
+ <Heading level={ 1 } text={ title } />
20
+ <Text as="p" size="large" text={ subtitle } />
21
+ </StyledHeader>
22
+ );
23
+ }
core/admin-pages/entries/go-pro/components/header/index.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php // Silence is golden.
core/admin-pages/entries/go-pro/components/index.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ export { default as CardGrid } from './card-grid';
2
+ export { default as Header } from './header';
3
+ export { default as Integration } from './integration';
core/admin-pages/entries/go-pro/components/index.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php // Silence is golden.
core/admin-pages/entries/go-pro/components/integration/index.js ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import styled from '@emotion/styled';
5
+
6
+ /**
7
+ * WordPress dependencies
8
+ */
9
+ import { Card, CardBody } from '@wordpress/components';
10
+ import { check as checkIcon } from '@wordpress/icons';
11
+
12
+ /**
13
+ * iThemes dependencies
14
+ */
15
+ import { Heading, Text, List, ListItem, Button, TextWeight } from '@ithemes/ui';
16
+
17
+ const StyledCard = styled( Card )`
18
+ &.components-card {
19
+ max-width: 460px;
20
+ border-radius: 16px;
21
+ }
22
+
23
+ > div {
24
+ display: flex;
25
+ flex-direction: column;
26
+ }
27
+ `;
28
+
29
+ const StyledBody = styled( CardBody )`
30
+ display: flex;
31
+ flex-direction: column;
32
+ flex-grow: 1;
33
+ `;
34
+
35
+ const StyledHeader = styled.header`
36
+ margin-bottom: 1rem;
37
+ `;
38
+
39
+ const StyledImg = styled.img`
40
+ margin: 2rem 0;
41
+ height: 55px;
42
+ align-self: start;
43
+ `;
44
+
45
+ const StyledList = styled( List )`
46
+ margin-top: 1rem;
47
+ `;
48
+
49
+ const StyledButton = styled( Button )`
50
+ width: 90%;
51
+ margin: 1.5rem 0 1rem;
52
+ align-self: center;
53
+ justify-content: center;
54
+ `;
55
+
56
+ export default function Integration( { imageSrc, heading, subheading, description, features, buttonText, buttonHref } ) {
57
+ return (
58
+ <StyledCard elevation={ 5 }>
59
+ <StyledBody>
60
+ <StyledImg src={ imageSrc } alt="" aria-hidden />
61
+ <StyledHeader>
62
+ <Heading level={ 3 } size="large" weight={ TextWeight.HEAVY } variant="dark" text={ heading } />
63
+ <Heading level={ 4 } size="large" weight={ TextWeight.HEAVY } variant="dark" text={ subheading } />
64
+ </StyledHeader>
65
+ <div aria-hidden style={ { flexGrow: 1 } } />
66
+ <Text variant="muted" as="p" text={ description } />
67
+ <StyledList textVariant="dark" icon={ checkIcon } textWeight={ TextWeight.HEAVY }>
68
+ { features.map( ( feature, i ) => (
69
+ <ListItem key={ i } text={ feature } />
70
+ ) ) }
71
+ </StyledList>
72
+ <StyledButton isRounded isWide variant="primary" textSize="large" text={ buttonText } href={ buttonHref } />
73
+ </StyledBody>
74
+ </StyledCard>
75
+ );
76
+ }
core/admin-pages/entries/go-pro/components/integration/index.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php // Silence is golden.
core/admin-pages/entries/go-pro/index.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php // Silence is golden.
core/admin-pages/entries/go-pro/pages/features/index.js ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * WordPress dependencies
3
+ */
4
+ import { __ } from '@wordpress/i18n';
5
+ import { Flex, Card, CardBody } from '@wordpress/components';
6
+
7
+ /**
8
+ * iThemes dependencies
9
+ */
10
+ import { Text, Surface, FeatureCard } from '@ithemes/ui';
11
+
12
+ /**
13
+ * Internal dependencies
14
+ */
15
+ import { Header, CardGrid } from '../../components';
16
+ import './style.scss';
17
+
18
+ export default function Features( { features } ) {
19
+ return (
20
+ <Flex className="itsec-go-pro-features" direction="column" gap={ 8 }>
21
+ <Header
22
+ title={ __( 'Ready to take your site’s security to the next level?', 'better-wp-security' ) }
23
+ subtitle={ __( 'Add more layers of security to your site with features designed to protect against known vulnerabilities, strengthen user logins, and enhance security logging.', 'better-wp-security' ) }
24
+ />
25
+ <CardGrid>
26
+ { ( features || [] ).map( ( feature, i ) => (
27
+ <FeatureCard
28
+ key={ i }
29
+ { ...feature }
30
+ />
31
+ ) ) }
32
+ </CardGrid>
33
+ <Card size="large">
34
+ <Surface variant="secondary">
35
+ <CardBody>
36
+ <Text
37
+ variant="accent"
38
+ size="large"
39
+ text={ __( 'We stand by our product 100%. All iThemes Security Pro plans come with a 30-day money back guarantee.', 'better-wp-security' ) }
40
+ />
41
+ </CardBody>
42
+ </Surface>
43
+ </Card>
44
+ </Flex>
45
+ );
46
+ }
core/admin-pages/entries/go-pro/pages/features/index.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php // Silence is golden.
core/admin-pages/entries/go-pro/pages/features/style.scss ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ .itsec-go-pro-features.components-flex {
2
+ align-items: center;
3
+
4
+ .itsec-go-pro-card-grid:empty + * {
5
+ display: none;
6
+ }
7
+ }
core/admin-pages/entries/go-pro/pages/index.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ export { default as Features } from './features';
2
+ export { default as Pricing } from './pricing';
3
+ export { default as Integrations } from './integrations';
core/admin-pages/entries/go-pro/pages/index.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php // Silence is golden.
core/admin-pages/entries/go-pro/pages/integrations/index.js ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * WordPress dependencies
3
+ */
4
+ import { __ } from '@wordpress/i18n';
5
+ import { Flex } from '@wordpress/components';
6
+
7
+ /**
8
+ * Internal dependencies
9
+ */
10
+ import { CardGrid, Header, Integration } from '../../components';
11
+ import './style.scss';
12
+
13
+ export default function Integrations( { integrations } ) {
14
+ return (
15
+ <Flex className="itsec-go-pro-integrations" direction="column" gap={ 8 }>
16
+ <Header title={ __( 'Additional Security Integrations', 'better-wp-security' ) } subtitle={ __( 'Complete your WordPress security strategy with client reports and complete backups.', 'better-wp-security' ) } />
17
+ <CardGrid>
18
+ { integrations.map( ( integration, i ) => (
19
+ <Integration key={ i } { ...integration } />
20
+ ) ) }
21
+ </CardGrid>
22
+ </Flex>
23
+ );
24
+ }
core/admin-pages/entries/go-pro/pages/integrations/index.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php // Silence is golden.
core/admin-pages/entries/go-pro/pages/integrations/style.scss ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ .itsec-go-pro-integrations.components-flex {
2
+ align-items: center;
3
+
4
+ .itsec-go-pro-plans-grid:empty + * {
5
+ display: none;
6
+ }
7
+ }
core/admin-pages/entries/go-pro/pages/pricing/index.js ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * WordPress dependencies
3
+ */
4
+ import { __ } from '@wordpress/i18n';
5
+ import { Flex } from '@wordpress/components';
6
+ import {
7
+ commentAuthorName,
8
+ currencyDollar,
9
+ starFilled,
10
+ } from '@wordpress/icons';
11
+
12
+ /**
13
+ * iThemes dependencies
14
+ */
15
+ import { Callout, CalloutItem, Heading, PricingCard } from '@ithemes/ui';
16
+
17
+ /**
18
+ * Internal dependencies
19
+ */
20
+ import { Header, CardGrid } from '../../components';
21
+ import './style.scss';
22
+
23
+ export default function Pricing( { pricing } ) {
24
+ return (
25
+ <Flex className="itsec-go-pro-pricing" direction="column" gap={ 8 }>
26
+ <Header
27
+ title={ __( 'View Pricing & Plans', 'better-wp-security' ) }
28
+ subtitle={ __( 'The iThemes Security Pro plugin adds additional layers of protection for your WordPress website with performance in mind. Plus, iThemes Security Pro pricing is perfect for those on a budget.', 'better-wp-security' ) }
29
+ />
30
+
31
+ <CardGrid className="itsec-go-pro-pricing-grid">
32
+ { ( pricing || [] ).map( ( item, i ) => (
33
+ <PricingCard key={ i } { ...item } />
34
+ ) ) }
35
+ </CardGrid>
36
+
37
+ <Heading level={ 2 } variant="dark" weight="heavy" text={ __( 'Why Buy from iThemes?', 'better-wp-security' ) } />
38
+ <Callout variant="secondary">
39
+ <CalloutItem
40
+ heading={ __( 'Fast, Friendly Support', 'better-wp-security' ) }
41
+ description={ __( 'We’ve been called “the friendliest support team in the WordPress world.” Most tickets are solved within one hour.', 'better-wp-security' ) }
42
+ icon={ commentAuthorName }
43
+ />
44
+ <CalloutItem
45
+ heading={ __( '30-Day Money Back Guarantee', 'better-wp-security' ) }
46
+ description={ __( 'We stand behind our products 100%. We offer a 30-day money-back guarantee with our refund policy.', 'better-wp-security' ) }
47
+ icon={ currencyDollar }
48
+ />
49
+ <CalloutItem
50
+ heading={ __( 'We’ve Been in Business Since 2008', 'better-wp-security' ) }
51
+ description={ __( 'Founded as one of the very first premium WordPress companies, we’re now one of the most trusted brands in WordPress.', 'better-wp-security' ) }
52
+ icon={ starFilled }
53
+ />
54
+ </Callout>
55
+ </Flex>
56
+ );
57
+ }
core/admin-pages/entries/go-pro/pages/pricing/index.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php // Silence is golden.
core/admin-pages/entries/go-pro/pages/pricing/style.scss ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ .itsec-go-pro-pricing.components-flex {
2
+ align-items: center;
3
+
4
+ .it-ui-callout {
5
+ max-width: 1060px;
6
+ }
7
+
8
+ .itsec-go-pro-card-grid:empty + * {
9
+ display: none;
10
+ }
11
+ }
core/admin-pages/entries/go-pro/style.scss ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ body.security_page_itsec-go-pro {
2
+ background-color: $white;
3
+ }
4
+
5
+ #wpcontent {
6
+ padding-left: 0;
7
+ }
8
+
9
+ .auto-fold #wpcontent {
10
+ padding-left: 0;
11
+ }
12
+
13
+ .wp-responsive-open #wpbody {
14
+ right: calc(-16em + 20px);
15
+ }
16
+
17
+ #wpbody-content {
18
+ padding-bottom: 0;
19
+ }
20
+
21
+ #wpfooter {
22
+ display: none;
23
+ }
24
+
25
+ #adminmenuback {
26
+ z-index: 5;
27
+ }
28
+
29
+ ul#adminmenu #toplevel_page_itsec-dashboard a.wp-has-current-submenu:after,
30
+ ul#adminmenu > li.current#toplevel_page_itsec-dashboard > a.current:after {
31
+ border-right-color: #fff;
32
+ }
33
+
34
+ .itsec-go-pro *,
35
+ .itsec-go-pro *::before,
36
+ .itsec-go-pro *::after {
37
+ box-sizing: border-box;
38
+ }
39
+
40
+ .itsec-go-pro {
41
+ --wp-admin-theme-color: #{$main-blue};
42
+ --wp-admin-theme-color-darker-10: #{darken($main-blue, 10)};
43
+ --wp-admin-theme-color-darker-20: #{darken($main-blue, 20)};
44
+
45
+ margin-bottom: 6rem;
46
+
47
+ > header {
48
+ display: flex;
49
+ flex-direction: column;
50
+ align-items: center;
51
+ justify-content: space-between;
52
+ gap: .5rem;
53
+ padding: 2rem 4rem .5rem;
54
+ max-width: calc(320px * 3 + 3rem * 2);
55
+ margin: 0 auto;
56
+
57
+ @include break-small {
58
+ align-items: flex-start;
59
+ flex-direction: row;
60
+ }
61
+
62
+ svg {
63
+ width: 120px;
64
+ }
65
+ }
66
+
67
+ // WordPress Core fixes
68
+ .components-elevation {
69
+ border-radius: inherit;
70
+ }
71
+ }
72
+
73
+ :where(.itsec-go-pro) a,
74
+ :where(.itsec-go-pro) .components-button.is-link {
75
+ color: var(--wp-admin-theme-color);
76
+
77
+ &:hover {
78
+ color: var(--wp-admin-theme-color-darker-20);
79
+ }
80
+ }
81
+
82
+ .itsec-go-pro-tab-panel.itsec-tab-panel {
83
+ .components-tab-panel__tabs {
84
+ justify-content: center;
85
+ }
86
+
87
+ .components-tab-panel__tab-content {
88
+ margin: 1rem 3rem;
89
+ }
90
+ }
core/admin-pages/entries/settings.js CHANGED
@@ -40,6 +40,10 @@ export {
40
  useNavigation,
41
  useCurrentPage,
42
  } from './settings/page-registration';
43
- export { useNavigateTo, useConfigContext } from './settings/utils';
 
 
 
 
44
  export { STORE_NAME as ONBOARD_STORE_NAME } from './settings/stores/onboard';
45
  export { STORE_NAME as TOOLS_STORE_NAME } from './settings/stores/tools';
40
  useNavigation,
41
  useCurrentPage,
42
  } from './settings/page-registration';
43
+ export {
44
+ useNavigateTo,
45
+ useConfigContext,
46
+ useModuleSchemaValidator,
47
+ } from './settings/utils';
48
  export { STORE_NAME as ONBOARD_STORE_NAME } from './settings/stores/onboard';
49
  export { STORE_NAME as TOOLS_STORE_NAME } from './settings/stores/tools';
core/admin-pages/entries/settings/app.js CHANGED
@@ -20,7 +20,7 @@ import { PluginArea } from '@wordpress/plugins';
20
  * Internal dependencies
21
  */
22
  import PageRegistration from './page-registration';
23
- import Pages, { Onboard, Settings } from './pages';
24
  import { ConfigContext } from './utils';
25
  import { Main, Sidebar, ErrorRenderer } from './components';
26
  import useSearchProviders from './search';
@@ -60,6 +60,10 @@ export default function App( {
60
  path="/:root(onboard)"
61
  component={ Onboard }
62
  />
 
 
 
 
63
 
64
  <Route path="/">
65
  <Redirect to={ redirect } />
20
  * Internal dependencies
21
  */
22
  import PageRegistration from './page-registration';
23
+ import Pages, { Import, Onboard, Settings } from './pages';
24
  import { ConfigContext } from './utils';
25
  import { Main, Sidebar, ErrorRenderer } from './components';
26
  import useSearchProviders from './search';
60
  path="/:root(onboard)"
61
  component={ Onboard }
62
  />
63
+ <Route
64
+ path="/:root(import)"
65
+ component={ Import }
66
+ />
67
 
68
  <Route path="/">
69
  <Redirect to={ redirect } />
core/admin-pages/entries/settings/components/advanced-navigation/index.js ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import { NavLink, useParams } from 'react-router-dom';
5
+
6
+ /**
7
+ * WordPress dependencies
8
+ */
9
+ import { __ } from '@wordpress/i18n';
10
+ import { Dashicon } from '@wordpress/components';
11
+
12
+ /**
13
+ * Internal dependencies
14
+ */
15
+ import { usePages } from '../../page-registration';
16
+ import './style.scss';
17
+
18
+ export default function AdvancedNavigation() {
19
+ const pages = usePages( { location: 'advanced' } );
20
+ const { root } = useParams();
21
+
22
+ return (
23
+ <ul className="itsec-settings-advanced-nav">
24
+ <li>
25
+ <NavLink to={ `/${ root }/configure/advanced` }>
26
+ <Dashicon icon="privacy" />
27
+ <span className="itsec-settings-advanced-nav__item-title">
28
+ { __( 'Advanced', 'better-wp-security' ) }
29
+ </span>
30
+ </NavLink>
31
+ </li>
32
+ { pages.map( ( item ) => {
33
+ return (
34
+ <li key={ item.id }>
35
+ <NavLink to={ `/${ root }/${ item.id }` }>
36
+ <Dashicon icon={ item.icon } />
37
+ <span className="itsec-settings-advanced-nav__item-title">
38
+ { item.title }
39
+ </span>
40
+ </NavLink>
41
+ </li>
42
+ );
43
+ } ) }
44
+ </ul>
45
+ );
46
+ }
core/admin-pages/entries/settings/components/advanced-navigation/index.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php // Silence is golden.
core/admin-pages/entries/settings/{pages/settings → components/advanced-navigation}/style.scss RENAMED
@@ -13,6 +13,7 @@
13
  a {
14
  color: $medium-text;
15
  display: flex;
 
16
  align-items: center;
17
  text-decoration: none;
18
 
@@ -20,17 +21,8 @@
20
  color: $main-blue;
21
  }
22
 
23
- &::before {
24
- @include dashicon();
25
- margin-right: .15rem;
26
- }
27
-
28
- &.itsec-settings-advanced-nav--tools::before {
29
- content: '\f107';
30
- }
31
-
32
- &.itsec-settings-advanced-nav--advanced::before {
33
- content: '\f194';
34
  }
35
  }
36
  }
13
  a {
14
  color: $medium-text;
15
  display: flex;
16
+ flex-direction: column;
17
  align-items: center;
18
  text-decoration: none;
19
 
21
  color: $main-blue;
22
  }
23
 
24
+ .dashicon {
25
+ margin-bottom: .15rem;
 
 
 
 
 
 
 
 
 
26
  }
27
  }
28
  }
core/admin-pages/entries/settings/components/breadcrumbs/index.js CHANGED
@@ -83,7 +83,7 @@ export function useBreadcrumbTrail( title, match ) {
83
  params: { root, page: currentPageId, child },
84
  } = match || localMatch;
85
 
86
- const pages = usePages( root );
87
  let childPages = useCurrentChildPages();
88
 
89
  if ( useCurrentPage()?.id !== currentPageId ) {
83
  params: { root, page: currentPageId, child },
84
  } = match || localMatch;
85
 
86
+ const pages = usePages( { root } );
87
  let childPages = useCurrentChildPages();
88
 
89
  if ( useCurrentPage()?.id !== currentPageId ) {
core/admin-pages/entries/settings/components/index.js CHANGED
@@ -2,6 +2,7 @@ export { default as Sidebar } from './sidebar';
2
  export { default as Main, AsideFill } from './main';
3
  export { default as Toolbar, ToolbarFill } from './toolbar';
4
  export { default as Navigation, NavigationFill } from './navigation';
 
5
  export {
6
  default as Breadcrumbs,
7
  useBreadcrumbTrail,
2
  export { default as Main, AsideFill } from './main';
3
  export { default as Toolbar, ToolbarFill } from './toolbar';
4
  export { default as Navigation, NavigationFill } from './navigation';
5
+ export { default as AdvancedNavigation } from './advanced-navigation';
6
  export {
7
  default as Breadcrumbs,
8
  useBreadcrumbTrail,
core/admin-pages/entries/settings/components/main/index.js CHANGED
@@ -27,7 +27,7 @@ export default function Main( { children } ) {
27
  const { hash } = location;
28
  useEffect( () => {
29
  ref.current?.focus();
30
- ref.current?.scrollIntoView();
31
  }, [ location ] );
32
 
33
  // Aside handling
27
  const { hash } = location;
28
  useEffect( () => {
29
  ref.current?.focus();
30
+ ref.current?.ownerDocument.body.scrollTo( 0, 0 );
31
  }, [ location ] );
32
 
33
  // Aside handling
core/admin-pages/entries/settings/components/main/style.scss CHANGED
@@ -46,7 +46,8 @@
46
  }
47
 
48
  .itsec-settings-main__content > *,
49
- .itsec-settings-main__content > .components-disabled > * {
 
50
  margin-bottom: 1rem;
51
 
52
  @include break-small {
46
  }
47
 
48
  .itsec-settings-main__content > *,
49
+ .itsec-settings-main__content > .components-disabled > *,
50
+ .itsec-settings-main__content > form > * {
51
  margin-bottom: 1rem;
52
 
53
  @include break-small {
core/admin-pages/entries/settings/components/navigation/index.js CHANGED
@@ -23,7 +23,7 @@ export default function Navigation( {
23
  allowForward = false,
24
  children,
25
  } ) {
26
- const pages = usePages();
27
  const { root, page: active } = useParams();
28
  const childPath = useChildPath();
29
 
@@ -37,10 +37,6 @@ export default function Navigation( {
37
  } ) }
38
  >
39
  { pages.map( ( item, i ) => {
40
- if ( false === item.priority ) {
41
- return null;
42
- }
43
-
44
  let asLink = ! guided;
45
 
46
  if ( allowBack && i <= activeIndex ) {
23
  allowForward = false,
24
  children,
25
  } ) {
26
+ const pages = usePages( { location: 'primary' } );
27
  const { root, page: active } = useParams();
28
  const childPath = useChildPath();
29
 
37
  } ) }
38
  >
39
  { pages.map( ( item, i ) => {
 
 
 
 
40
  let asLink = ! guided;
41
 
42
  if ( allowBack && i <= activeIndex ) {
core/admin-pages/entries/settings/components/selectable-card/style.scss CHANGED
@@ -43,6 +43,10 @@ a.itsec-selectable-card {
43
  box-shadow: none;
44
  outline: none;
45
  }
 
 
 
 
46
  }
47
 
48
  button.itsec-selectable-card {
43
  box-shadow: none;
44
  outline: none;
45
  }
46
+
47
+ .components-card {
48
+ border-color: $light-gray-500;
49
+ }
50
  }
51
 
52
  button.itsec-selectable-card {
core/admin-pages/entries/settings/components/sidebar/style.scss CHANGED
@@ -97,11 +97,7 @@
97
  }
98
 
99
  a {
100
- &::before {
101
- margin-right: 0;
102
- }
103
-
104
- span {
105
  display: none;
106
  }
107
  }
97
  }
98
 
99
  a {
100
+ .itsec-settings-advanced-nav__item-title {
 
 
 
 
101
  display: none;
102
  }
103
  }
core/admin-pages/entries/settings/components/toolbar/index.js CHANGED
@@ -27,7 +27,7 @@ const { Slot: ToolbarSlot, Fill: ToolbarFill } = createSlotFill( 'Toolbar' );
27
 
28
  export { ToolbarFill };
29
 
30
- export default function () {
31
  const { root } = useParams();
32
  const dashboardUrl = useGlobalNavigationUrl( 'dashboard' );
33
  const isSmall = useMediaQuery( '(max-width: 600px)' );
27
 
28
  export { ToolbarFill };
29
 
30
+ export default function() {
31
  const { root } = useParams();
32
  const dashboardUrl = useGlobalNavigationUrl( 'dashboard' );
33
  const isSmall = useMediaQuery( '(max-width: 600px)' );
core/admin-pages/entries/settings/history.js CHANGED
@@ -15,7 +15,7 @@ import { omit } from 'lodash';
15
  * query path argument's value.
16
  *
17
  * @param {Location} initialLocation The initial document.location.
18
- * @param {Object} fixedQuery The query parameters that should be fixed.
19
  *
20
  * @return {Object} React-router history object with `get location` modified.
21
  */
15
  * query path argument's value.
16
  *
17
  * @param {Location} initialLocation The initial document.location.
18
+ * @param {Object} fixedQuery The query parameters that should be fixed.
19
  *
20
  * @return {Object} React-router history object with `get location` modified.
21
  */
core/admin-pages/entries/settings/page-registration.js CHANGED
@@ -18,6 +18,12 @@ import {
18
  useMemo,
19
  } from '@wordpress/element';
20
  import { useInstanceId } from '@wordpress/compose';
 
 
 
 
 
 
21
 
22
  const Context = createContext( {
23
  pages: [],
@@ -91,6 +97,8 @@ export function Page( {
91
  icon,
92
  roots = [ 'settings' ],
93
  priority = 90,
 
 
94
  ignore,
95
  children,
96
  } ) {
@@ -103,6 +111,8 @@ export function Page( {
103
  icon,
104
  roots,
105
  priority,
 
 
106
  ignore,
107
  render: children,
108
  } );
@@ -118,7 +128,7 @@ export function Page( {
118
  /**
119
  * Register child pages.
120
  *
121
- * @param {Object} props Props.
122
  * @param {Array<{title, id, to}>} props.pages The pages to register.
123
  * @return {null} No component rendered.
124
  */
@@ -137,12 +147,21 @@ export function ChildPages( props ) {
137
  return null;
138
  }
139
 
140
- export function usePages( root ) {
 
 
 
 
 
 
141
  const { root: matchedRoot } = useParams();
142
  const { pages } = useContext( Context );
143
 
144
- return pages.filter( ( page ) =>
145
- page.roots.includes( root || matchedRoot )
 
 
 
146
  );
147
  }
148
 
18
  useMemo,
19
  } from '@wordpress/element';
20
  import { useInstanceId } from '@wordpress/compose';
21
+ import { useSelect } from '@wordpress/data';
22
+
23
+ /**
24
+ * Internal dependencies
25
+ */
26
+ import { CORE_STORE_NAME } from '@ithemes/security.packages.data';
27
 
28
  const Context = createContext( {
29
  pages: [],
97
  icon,
98
  roots = [ 'settings' ],
99
  priority = 90,
100
+ location = 'primary',
101
+ featureFlag,
102
  ignore,
103
  children,
104
  } ) {
111
  icon,
112
  roots,
113
  priority,
114
+ location,
115
+ featureFlag,
116
  ignore,
117
  render: children,
118
  } );
128
  /**
129
  * Register child pages.
130
  *
131
+ * @param {Object} props Props.
132
  * @param {Array<{title, id, to}>} props.pages The pages to register.
133
  * @return {null} No component rendered.
134
  */
147
  return null;
148
  }
149
 
150
+ export function usePages( { root, location } = {} ) {
151
+ const { featureFlags } = useSelect(
152
+ ( select ) => ( {
153
+ featureFlags: select( CORE_STORE_NAME ).getFeatureFlags(),
154
+ } ),
155
+ []
156
+ );
157
  const { root: matchedRoot } = useParams();
158
  const { pages } = useContext( Context );
159
 
160
+ return pages.filter(
161
+ ( page ) =>
162
+ page.roots.includes( root || matchedRoot ) &&
163
+ ( ! location || page.location === location ) &&
164
+ ( ! page.featureFlag || featureFlags.includes( page.featureFlag ) )
165
  );
166
  }
167
 
core/admin-pages/entries/settings/pages/configure/index.js CHANGED
@@ -30,7 +30,11 @@ import {
30
  ErrorList,
31
  HelpList,
32
  } from '@ithemes/security-components';
33
- import { CORE_STORE_NAME, MODULES_STORE_NAME } from '@ithemes/security-data';
 
 
 
 
34
  import {
35
  PageHeader,
36
  PrimarySchemaFormInputs,
@@ -47,11 +51,10 @@ import {
47
  makeConditionalSettingsSchema,
48
  getModuleTypes,
49
  appendClassNameAtPath,
50
- validateModuleRequirements,
51
  } from '../../utils';
52
  import { useNavigation, ChildPages } from '../../page-registration';
53
  import './style.scss';
54
- import { withNavigate } from '@ithemes/security-hocs';
55
 
56
  function useTypes() {
57
  const { root } = useParams();
@@ -64,6 +67,7 @@ function useTypes() {
64
  featureFlags: select( CORE_STORE_NAME ).getFeatureFlags(),
65
  } )
66
  );
 
67
 
68
  const getModules = () =>
69
  editedModules.filter( ( module ) => {
@@ -83,6 +87,14 @@ function useTypes() {
83
  return false;
84
  }
85
 
 
 
 
 
 
 
 
 
86
  if ( validateModuleRequirements( module, 'run' ).hasErrors() ) {
87
  return false;
88
  }
@@ -122,6 +134,18 @@ function useTypes() {
122
  ) {
123
  return false;
124
  }
 
 
 
 
 
 
 
 
 
 
 
 
125
  }
126
 
127
  return true;
@@ -207,7 +231,7 @@ export default function Configure() {
207
 
208
  <Route path={ path }>
209
  { nav.length > 0 &&
210
- ( root === 'onboard' ? (
211
  <Intro to={ `${ url }/${ nav[ 0 ].slug }` } />
212
  ) : (
213
  <Redirect to={ `${ url }/${ nav[ 0 ].slug }` } />
@@ -288,7 +312,7 @@ function ModulePage( { module, tabs, onSelect } ) {
288
  const { root } = useParams();
289
 
290
  const Concrete =
291
- root === 'onboard' ? ConfigureModuleOnboard : ConfigureModuleSettings;
292
 
293
  return (
294
  <>
@@ -304,6 +328,7 @@ function ModulePage( { module, tabs, onSelect } ) {
304
  }
305
 
306
  function ConfigureModuleOnboard( { tabs, module, onSelect } ) {
 
307
  const { previous, goNext } = useNavigation(
308
  tabs?.map( ( tab ) => tab.name )
309
  );
@@ -323,7 +348,9 @@ function ConfigureModuleOnboard( { tabs, module, onSelect } ) {
323
  cancelLabel={ __( 'Back', 'better-wp-security' ) }
324
  cancelRoute={ previous }
325
  filterFields={ ( _, setting ) =>
326
- module.settings.onboard.includes( setting )
 
 
327
  }
328
  />
329
  );
@@ -490,10 +517,10 @@ function ModuleLinks( { module } ) {
490
  module.id === 'password-requirements'
491
  ? __( 'User Groups', 'better-wp-security' )
492
  : sprintf(
493
- /* translators: 1. The number of user groups. */
494
- __( 'User Groups (%d)', 'better-wp-security' ),
495
- size( module.user_groups )
496
- );
497
 
498
  links.push(
499
  <Link
30
  ErrorList,
31
  HelpList,
32
  } from '@ithemes/security-components';
33
+ import { withNavigate } from '@ithemes/security-hocs';
34
+ import {
35
+ CORE_STORE_NAME,
36
+ MODULES_STORE_NAME,
37
+ } from '@ithemes/security.packages.data';
38
  import {
39
  PageHeader,
40
  PrimarySchemaFormInputs,
51
  makeConditionalSettingsSchema,
52
  getModuleTypes,
53
  appendClassNameAtPath,
54
+ useModuleRequirementsValidator,
55
  } from '../../utils';
56
  import { useNavigation, ChildPages } from '../../page-registration';
57
  import './style.scss';
 
58
 
59
  function useTypes() {
60
  const { root } = useParams();
67
  featureFlags: select( CORE_STORE_NAME ).getFeatureFlags(),
68
  } )
69
  );
70
+ const validateModuleRequirements = useModuleRequirementsValidator();
71
 
72
  const getModules = () =>
73
  editedModules.filter( ( module ) => {
87
  return false;
88
  }
89
 
90
+ if (
91
+ root === 'import' &&
92
+ ! module.settings?.onboard.length &&
93
+ ! module.settings?.import.length
94
+ ) {
95
+ return false;
96
+ }
97
+
98
  if ( validateModuleRequirements( module, 'run' ).hasErrors() ) {
99
  return false;
100
  }
134
  ) {
135
  return false;
136
  }
137
+
138
+ if (
139
+ root === 'import' &&
140
+ ! module.settings.onboard.some(
141
+ ( setting ) => !! schema.properties[ setting ]
142
+ ) &&
143
+ ! module.settings.import.some(
144
+ ( setting ) => !! schema.properties[ setting ]
145
+ )
146
+ ) {
147
+ return false;
148
+ }
149
  }
150
 
151
  return true;
231
 
232
  <Route path={ path }>
233
  { nav.length > 0 &&
234
+ ( root !== 'settings' ? (
235
  <Intro to={ `${ url }/${ nav[ 0 ].slug }` } />
236
  ) : (
237
  <Redirect to={ `${ url }/${ nav[ 0 ].slug }` } />
312
  const { root } = useParams();
313
 
314
  const Concrete =
315
+ root === 'settings' ? ConfigureModuleSettings : ConfigureModuleOnboard;
316
 
317
  return (
318
  <>
328
  }
329
 
330
  function ConfigureModuleOnboard( { tabs, module, onSelect } ) {
331
+ const { root } = useParams();
332
  const { previous, goNext } = useNavigation(
333
  tabs?.map( ( tab ) => tab.name )
334
  );
348
  cancelLabel={ __( 'Back', 'better-wp-security' ) }
349
  cancelRoute={ previous }
350
  filterFields={ ( _, setting ) =>
351
+ module.settings.onboard.includes( setting ) ||
352
+ ( root === 'import' &&
353
+ module.settings.import.includes( setting ) )
354
  }
355
  />
356
  );
517
  module.id === 'password-requirements'
518
  ? __( 'User Groups', 'better-wp-security' )
519
  : sprintf(
520
+ /* translators: 1. The number of user groups. */
521
+ __( 'User Groups (%d)', 'better-wp-security' ),
522
+ size( module.user_groups )
523
+ );
524
 
525
  links.push(
526
  <Link
core/admin-pages/entries/settings/pages/import/index.js ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import { Redirect, Route, Switch, useRouteMatch } from 'react-router-dom';
5
+
6
+ /**
7
+ * Internal dependencies
8
+ */
9
+ import { NoticeList } from '@ithemes/security-components';
10
+ import { Main, Navigation, Sidebar } from '../../components';
11
+ import { usePages } from '../../page-registration';
12
+
13
+ export default function Import() {
14
+ const pages = usePages();
15
+ const { url, path } = useRouteMatch();
16
+
17
+ if (
18
+ pages.length > 0 &&
19
+ ! pages.find( ( page ) => page.id === 'select-export' )
20
+ ) {
21
+ return <Redirect to="/" />;
22
+ }
23
+
24
+ return (
25
+ <Switch>
26
+ { pages.map( ( { id, render: Component } ) => (
27
+ <Route path={ `${ path }/:page(${ id })` } key={ id }>
28
+ <Sidebar>
29
+ <Navigation
30
+ guided
31
+ allowBack
32
+ allowForward={ id !== 'select-export' }
33
+ />
34
+ </Sidebar>
35
+ <Main>
36
+ <NoticeList />
37
+ <Component />
38
+ </Main>
39
+ </Route>
40
+ ) ) }
41
+
42
+ <Route path={ url }>
43
+ { pages.length > 0 && (
44
+ <Redirect to={ `${ url }/${ pages[ 0 ].id }` } />
45
+ ) }
46
+ <Sidebar>
47
+ <Navigation guided allowBack />
48
+ </Sidebar>
49
+ <Main />
50
+ </Route>
51
+ </Switch>
52
+ );
53
+ }
core/admin-pages/entries/settings/pages/import/index.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php // Silence is golden.
core/admin-pages/entries/settings/pages/index.js CHANGED
@@ -29,7 +29,7 @@ export default function Pages() {
29
  title={ __( 'Features', 'better-wp-security' ) }
30
  icon="shield"
31
  priority={ 5 }
32
- roots={ [ 'onboard', 'settings' ] }
33
  >
34
  { () => <Modules /> }
35
  </Page>
@@ -38,7 +38,7 @@ export default function Pages() {
38
  title={ __( 'Configure', 'better-wp-security' ) }
39
  icon="admin-settings"
40
  priority={ 15 }
41
- roots={ [ 'onboard', 'settings' ] }
42
  ignore={ [ '/advanced/' ] }
43
  >
44
  { () => <Configure /> }
@@ -47,14 +47,16 @@ export default function Pages() {
47
  id="secure-site"
48
  title={ __( 'Secure Site', 'better-wp-security' ) }
49
  priority={ 100 }
50
- roots={ [ 'onboard' ] }
51
  >
52
  { () => <SecureSite /> }
53
  </Page>
54
  <Page
55
  id="tools"
56
  title={ __( 'Tools', 'better-wp-security' ) }
57
- priority={ false }
 
 
58
  roots={ [ 'settings' ] }
59
  >
60
  { () => <Tools /> }
@@ -65,3 +67,4 @@ export default function Pages() {
65
 
66
  export { default as Onboard } from './onboard';
67
  export { default as Settings } from './settings';
 
29
  title={ __( 'Features', 'better-wp-security' ) }
30
  icon="shield"
31
  priority={ 5 }
32
+ roots={ [ 'onboard', 'settings', 'import' ] }
33
  >
34
  { () => <Modules /> }
35
  </Page>
38
  title={ __( 'Configure', 'better-wp-security' ) }
39
  icon="admin-settings"
40
  priority={ 15 }
41
+ roots={ [ 'onboard', 'settings', 'import' ] }
42
  ignore={ [ '/advanced/' ] }
43
  >
44
  { () => <Configure /> }
47
  id="secure-site"
48
  title={ __( 'Secure Site', 'better-wp-security' ) }
49
  priority={ 100 }
50
+ roots={ [ 'onboard', 'import' ] }
51
  >
52
  { () => <SecureSite /> }
53
  </Page>
54
  <Page
55
  id="tools"
56
  title={ __( 'Tools', 'better-wp-security' ) }
57
+ icon="admin-tools"
58
+ priority={ 80 }
59
+ location="advanced"
60
  roots={ [ 'settings' ] }
61
  >
62
  { () => <Tools /> }
67
 
68
  export { default as Onboard } from './onboard';
69
  export { default as Settings } from './settings';
70
+ export { default as Import } from './import';
core/admin-pages/entries/settings/pages/modules/index.js CHANGED
@@ -41,7 +41,7 @@ import {
41
  Markup,
42
  } from '@ithemes/security-components';
43
  import { withNavigate } from '@ithemes/security-hocs';
44
- import { MODULES_STORE_NAME } from '@ithemes/security-data';
45
  import {
46
  Breadcrumbs,
47
  HelpFill,
@@ -50,7 +50,7 @@ import {
50
  } from '../../components';
51
  import { useNavigation, ChildPages } from '../../page-registration';
52
  import {
53
- validateModuleRequirements,
54
  getModuleTypes,
55
  useNavigateTo,
56
  } from '../../utils';
@@ -59,8 +59,13 @@ import './style.scss';
59
  export default function Modules() {
60
  const { url, path } = useRouteMatch();
61
  const { root } = useParams();
62
- const modules = useSelect( ( select ) =>
63
- select( MODULES_STORE_NAME ).getEditedModules()
 
 
 
 
 
64
  );
65
  const tabs = getModuleTypes()
66
  .map( ( { slug, label } ) => ( {
@@ -71,7 +76,9 @@ export default function Modules() {
71
  ( module ) =>
72
  module.type === slug &&
73
  module.status.default !== 'always-active' &&
74
- ( root !== 'onboard' || module.onboard ) &&
 
 
75
  ( module.status.selected === 'active' ||
76
  ! validateModuleRequirements(
77
  module,
@@ -84,7 +91,7 @@ export default function Modules() {
84
  .filter(
85
  ( tab ) =>
86
  tab.modules.length > 0 &&
87
- ( root !== 'onboard' || tab.name !== 'advanced' )
88
  );
89
  const help = __(
90
  'Features is the home base of iThemes Security. Enabling a security feature will unlock the related User Group, Configure, and Notification settings. Disabling a security feature will hide the related options throughout the plugin.',
@@ -113,7 +120,7 @@ export default function Modules() {
113
  help={ help }
114
  />
115
  <ModuleTabPanel base={ url } tabs={ tabs } />
116
- { root === 'onboard' && <Navigation /> }
117
  <HelpPage help={ help } />
118
  </Route>
119
  <Redirect to={ `${ url }/${ tabs[ 0 ].name }` } />
@@ -174,7 +181,7 @@ function ModuleTab( { modules } ) {
174
  function ModuleGrid( { modules } ) {
175
  const { root } = useParams();
176
  const statusToggle =
177
- root === 'onboard' ? StatusToggleOnboard : StatusToggleSettings;
178
 
179
  return (
180
  <div className="itsec-modules">
@@ -201,7 +208,7 @@ function Module( { module, statusToggle: StatusToggle } ) {
201
  const apiError = useSelect( ( select ) =>
202
  select( MODULES_STORE_NAME ).getError( module.id )
203
  );
204
- const validRequirements = validateModuleRequirements( module, 'run' );
205
 
206
  return (
207
  <Card
@@ -212,36 +219,36 @@ function Module( { module, statusToggle: StatusToggle } ) {
212
  >
213
  <CardBody className="itsec-module__body">
214
  <h3>{ module.title }</h3>
215
- { root !== 'onboard' &&
216
  module.status.selected === 'active' &&
217
  ! validRequirements.hasErrors() && (
218
- <>
219
- { module.settings?.interactive.length > 0 && (
220
- <Tooltip text={ __( 'Edit Settings', 'better-wp-security' ) }>
221
- <Link
222
- className="itsec-module__settings"
223
- to={ `/settings/configure/${ module.type }/${ module.id }` }
224
- >
225
- <VisuallyHidden>
226
- { __( 'Edit Settings', 'better-wp-security' ) }
227
- </VisuallyHidden>
228
- </Link>
229
- </Tooltip>
230
- ) }
231
- { ! isEmpty( module.user_groups ) && (
232
  <Link
233
- className="itsec-module__user-groups"
234
- to={ `/settings/user-groups?module=${ module.id }` }
235
  >
236
- { sprintf(
237
- /* translators: 1. The number of user groups. */
238
- __( 'User Groups (%d)', 'better-wp-security' ),
239
- size( module.user_groups )
240
- ) }
241
  </Link>
242
- ) }
243
- </>
244
- ) }
 
 
 
 
 
 
 
 
 
 
 
 
 
245
  <Markup
246
  content={ module.description }
247
  tagName="p"
41
  Markup,
42
  } from '@ithemes/security-components';
43
  import { withNavigate } from '@ithemes/security-hocs';
44
+ import { MODULES_STORE_NAME } from '@ithemes/security.packages.data';
45
  import {
46
  Breadcrumbs,
47
  HelpFill,
50
  } from '../../components';
51
  import { useNavigation, ChildPages } from '../../page-registration';
52
  import {
53
+ useModuleRequirementsValidator,
54
  getModuleTypes,
55
  useNavigateTo,
56
  } from '../../utils';
59
  export default function Modules() {
60
  const { url, path } = useRouteMatch();
61
  const { root } = useParams();
62
+ const validateModuleRequirements = useModuleRequirementsValidator();
63
+ const { modules, dirty } = useSelect(
64
+ ( select ) => ( {
65
+ modules: select( MODULES_STORE_NAME ).getEditedModules(),
66
+ dirty: select( MODULES_STORE_NAME ).getDirtyModules(),
67
+ } ),
68
+ []
69
  );
70
  const tabs = getModuleTypes()
71
  .map( ( { slug, label } ) => ( {
76
  ( module ) =>
77
  module.type === slug &&
78
  module.status.default !== 'always-active' &&
79
+ ( root === 'settings' ||
80
+ module.onboard ||
81
+ ( root === 'import' && dirty.includes( slug ) ) ) &&
82
  ( module.status.selected === 'active' ||
83
  ! validateModuleRequirements(
84
  module,
91
  .filter(
92
  ( tab ) =>
93
  tab.modules.length > 0 &&
94
+ ( root === 'settings' || tab.name !== 'advanced' )
95
  );
96
  const help = __(
97
  'Features is the home base of iThemes Security. Enabling a security feature will unlock the related User Group, Configure, and Notification settings. Disabling a security feature will hide the related options throughout the plugin.',
120
  help={ help }
121
  />
122
  <ModuleTabPanel base={ url } tabs={ tabs } />
123
+ { root !== 'settings' && <Navigation /> }
124
  <HelpPage help={ help } />
125
  </Route>
126
  <Redirect to={ `${ url }/${ tabs[ 0 ].name }` } />
181
  function ModuleGrid( { modules } ) {
182
  const { root } = useParams();
183
  const statusToggle =
184
+ root === 'settings' ? StatusToggleSettings : StatusToggleOnboard;
185
 
186
  return (
187
  <div className="itsec-modules">
208
  const apiError = useSelect( ( select ) =>
209
  select( MODULES_STORE_NAME ).getError( module.id )
210
  );
211
+ const validRequirements = useModuleRequirementsValidator()( module, 'run' );
212
 
213
  return (
214
  <Card
219
  >
220
  <CardBody className="itsec-module__body">
221
  <h3>{ module.title }</h3>
222
+ { root === 'settings' &&
223
  module.status.selected === 'active' &&
224
  ! validRequirements.hasErrors() && (
225
+ <>
226
+ { module.settings?.interactive.length > 0 && (
227
+ <Tooltip text={ __( 'Edit Settings', 'better-wp-security' ) }>
 
 
 
 
 
 
 
 
 
 
 
228
  <Link
229
+ className="itsec-module__settings"
230
+ to={ `/settings/configure/${ module.type }/${ module.id }` }
231
  >
232
+ <VisuallyHidden>
233
+ { __( 'Edit Settings', 'better-wp-security' ) }
234
+ </VisuallyHidden>
 
 
235
  </Link>
236
+ </Tooltip>
237
+ ) }
238
+ { ! isEmpty( module.user_groups ) && (
239
+ <Link
240
+ className="itsec-module__user-groups"
241
+ to={ `/settings/user-groups?module=${ module.id }` }
242
+ >
243
+ { sprintf(
244
+ /* translators: 1. The number of user groups. */
245
+ __( 'User Groups (%d)', 'better-wp-security' ),
246
+ size( module.user_groups )
247
+ ) }
248
+ </Link>
249
+ ) }
250
+ </>
251
+ ) }
252
  <Markup
253
  content={ module.description }
254
  tagName="p"
core/admin-pages/entries/settings/pages/secure-site/index.js CHANGED
@@ -1,7 +1,8 @@
1
  /**
2
  * External dependencies
3
  */
4
- import { sortBy } from 'lodash';
 
5
 
6
  /**
7
  * WordPress dependencies
@@ -20,7 +21,7 @@ import {
20
  */
21
  import { useSingletonEffect } from '@ithemes/security-hocs';
22
  import { Accordion, Spinner } from '@ithemes/security-components';
23
- import { MODULES_STORE_NAME } from '@ithemes/security-data';
24
  import { useGlobalNavigationUrl } from '@ithemes/security-utils';
25
  import { PageHeader } from '../../components';
26
  import { ONBOARD_STORE_NAME } from '../../stores';
@@ -39,11 +40,15 @@ export default function SecureSite() {
39
  }
40
 
41
  function OverviewScreen( { goToEnd } ) {
 
42
  const { completeOnboarding } = useDispatch( ONBOARD_STORE_NAME );
43
- const { steps, currentStep } = useSelect( ( select ) => ( {
44
- steps: select( ONBOARD_STORE_NAME ).getCompletionSteps(),
45
- currentStep: select( ONBOARD_STORE_NAME ).getCompletionStep(),
46
- } ) );
 
 
 
47
 
48
  let subtitle;
49
 
@@ -78,7 +83,7 @@ function OverviewScreen( { goToEnd } ) {
78
  ) : (
79
  <Button
80
  isPrimary
81
- onClick={ completeOnboarding }
82
  disabled={ currentStep !== false }
83
  >
84
  { __( 'Secure Site', 'better-wp-security' ) }
@@ -120,7 +125,9 @@ function EndScreen() {
120
  'better-wp-security'
121
  ),
122
  {
 
123
  dashboard: <a href={ dashboardLink } />,
 
124
  settings: <a href={ settingsLink } />,
125
  }
126
  ) }
@@ -144,44 +151,48 @@ function EndScreen() {
144
  }
145
 
146
  function Steps( { steps, currentStep } ) {
 
147
  const [ expanded, setExpanded ] = useState( false );
148
  const panels = useMemo(
149
  () =>
150
- sortBy( steps, 'priority' ).map(
151
- ( { render: Component, ...step } ) => {
152
- const isCurrent = step.id === currentStep?.id;
153
- const isDone =
154
- step.priority < ( currentStep?.priority || 0 );
155
- const isPending =
156
- step.priority > ( currentStep?.priority || 0 );
157
-
158
- return {
159
- name: step.id,
160
- title: step.label,
161
- text: step.label,
162
- icon: 'yes-alt',
163
- render:
164
- Component &&
165
- ( ( props ) => (
166
- <div { ...props }>
167
- <Component />
168
- </div>
169
- ) ),
170
- showSpinner:
171
- currentStep !== true &&
172
- ( isCurrent || isPending ) ? (
173
- <Spinner
174
- size={ 30 }
175
- color="--itsec-primary-theme-color"
176
- paused={ isPending }
177
- />
178
- ) : (
179
- false
180
- ),
181
- className: isDone && 'itsec-secure-site-step--complete',
182
- };
183
- }
184
- ),
 
 
 
185
  [ steps, currentStep ]
186
  );
187
 
1
  /**
2
  * External dependencies
3
  */
4
+ import { sortBy, filter } from 'lodash';
5
+ import { useParams } from 'react-router-dom';
6
 
7
  /**
8
  * WordPress dependencies
21
  */
22
  import { useSingletonEffect } from '@ithemes/security-hocs';
23
  import { Accordion, Spinner } from '@ithemes/security-components';
24
+ import { MODULES_STORE_NAME } from '@ithemes/security.packages.data';
25
  import { useGlobalNavigationUrl } from '@ithemes/security-utils';
26
  import { PageHeader } from '../../components';
27
  import { ONBOARD_STORE_NAME } from '../../stores';
40
  }
41
 
42
  function OverviewScreen( { goToEnd } ) {
43
+ const { root } = useParams();
44
  const { completeOnboarding } = useDispatch( ONBOARD_STORE_NAME );
45
+ const { steps, currentStep } = useSelect(
46
+ ( select ) => ( {
47
+ steps: select( ONBOARD_STORE_NAME ).getCompletionSteps(),
48
+ currentStep: select( ONBOARD_STORE_NAME ).getCompletionStep(),
49
+ } ),
50
+ []
51
+ );
52
 
53
  let subtitle;
54
 
83
  ) : (
84
  <Button
85
  isPrimary
86
+ onClick={ () => completeOnboarding( { root } ) }
87
  disabled={ currentStep !== false }
88
  >
89
  { __( 'Secure Site', 'better-wp-security' ) }
125
  'better-wp-security'
126
  ),
127
  {
128
+ // eslint-disable-next-line jsx-a11y/anchor-has-content
129
  dashboard: <a href={ dashboardLink } />,
130
+ // eslint-disable-next-line jsx-a11y/anchor-has-content
131
  settings: <a href={ settingsLink } />,
132
  }
133
  ) }
151
  }
152
 
153
  function Steps( { steps, currentStep } ) {
154
+ const { root } = useParams();
155
  const [ expanded, setExpanded ] = useState( false );
156
  const panels = useMemo(
157
  () =>
158
+ sortBy(
159
+ filter(
160
+ steps,
161
+ ( { activeCallback } ) =>
162
+ ! activeCallback || activeCallback( { root } )
163
+ ),
164
+ 'priority'
165
+ ).map( ( { render: Component, ...step } ) => {
166
+ const isCurrent = step.id === currentStep?.id;
167
+ const isDone = step.priority < ( currentStep?.priority || 0 );
168
+ const isPending =
169
+ step.priority > ( currentStep?.priority || 0 );
170
+
171
+ return {
172
+ name: step.id,
173
+ title: step.label,
174
+ text: step.label,
175
+ icon: 'yes-alt',
176
+ render:
177
+ Component &&
178
+ ( ( props ) => (
179
+ <div { ...props }>
180
+ <Component />
181
+ </div>
182
+ ) ),
183
+ showSpinner:
184
+ currentStep !== true && ( isCurrent || isPending ) ? (
185
+ <Spinner
186
+ size={ 30 }
187
+ color="--itsec-primary-theme-color"
188
+ paused={ isPending }
189
+ />
190
+ ) : (
191
+ false
192
+ ),
193
+ className: isDone && 'itsec-secure-site-step--complete',
194
+ };
195
+ } ),
196
  [ steps, currentStep ]
197
  );
198
 
core/admin-pages/entries/settings/pages/settings/index.js CHANGED
@@ -1,26 +1,19 @@
1
  /**
2
  * External dependencies
3
  */
4
- import {
5
- Redirect,
6
- Route,
7
- Switch,
8
- useRouteMatch,
9
- NavLink,
10
- } from 'react-router-dom';
11
-
12
- /**
13
- * WordPress dependencies
14
- */
15
- import { __ } from '@wordpress/i18n';
16
 
17
  /**
18
  * Internal dependencies
19
  */
20
  import { NoticeList } from '@ithemes/security-components';
21
  import { usePages } from '../../page-registration';
22
- import { Main, Navigation, Sidebar } from '../../components';
23
- import './style.scss';
 
 
 
 
24
 
25
  export default function Settings() {
26
  const pages = usePages();
@@ -32,7 +25,7 @@ export default function Settings() {
32
  <Route path={ `${ path }/:page(${ id })` } key={ id }>
33
  <Sidebar>
34
  <Navigation />
35
- <AdvancedNav url={ url } />
36
  </Sidebar>
37
  <Main>
38
  <NoticeList />
@@ -43,42 +36,14 @@ export default function Settings() {
43
 
44
  <Route path={ url }>
45
  { pages.length > 0 && (
46
- <Redirect
47
- to={ `${ url }/${
48
- pages.find( ( { priority } ) => priority !== false )
49
- .id
50
- }` }
51
- />
52
  ) }
53
  <Sidebar>
54
  <Navigation />
55
- <AdvancedNav url={ url } />
56
  </Sidebar>
57
  <Main />
58
  </Route>
59
  </Switch>
60
  );
61
  }
62
-
63
- function AdvancedNav( { url } ) {
64
- return (
65
- <ul className="itsec-settings-advanced-nav">
66
- <li>
67
- <NavLink
68
- to={ `${ url }/tools` }
69
- className="itsec-settings-advanced-nav--tools"
70
- >
71
- <span>{ __( 'Tools', 'better-wp-security' ) }</span>
72
- </NavLink>
73
- </li>
74
- <li>
75
- <NavLink
76
- to={ `${ url }/configure/advanced` }
77
- className="itsec-settings-advanced-nav--advanced"
78
- >
79
- <span>{ __( 'Advanced', 'better-wp-security' ) }</span>
80
- </NavLink>
81
- </li>
82
- </ul>
83
- );
84
- }
1
  /**
2
  * External dependencies
3
  */
4
+ import { Redirect, Route, Switch, useRouteMatch } from 'react-router-dom';
 
 
 
 
 
 
 
 
 
 
 
5
 
6
  /**
7
  * Internal dependencies
8
  */
9
  import { NoticeList } from '@ithemes/security-components';
10
  import { usePages } from '../../page-registration';
11
+ import {
12
+ Navigation,
13
+ AdvancedNavigation,
14
+ Main,
15
+ Sidebar,
16
+ } from '../../components';
17
 
18
  export default function Settings() {
19
  const pages = usePages();
25
  <Route path={ `${ path }/:page(${ id })` } key={ id }>
26
  <Sidebar>
27
  <Navigation />
28
+ <AdvancedNavigation />
29
  </Sidebar>
30
  <Main>
31
  <NoticeList />
36
 
37
  <Route path={ url }>
38
  { pages.length > 0 && (
39
+ <Redirect to={ `${ url }/${ pages[ 0 ].id }` } />
 
 
 
 
 
40
  ) }
41
  <Sidebar>
42
  <Navigation />
43
+ <AdvancedNavigation />
44
  </Sidebar>
45
  <Main />
46
  </Route>
47
  </Switch>
48
  );
49
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
core/admin-pages/entries/settings/pages/tools/index.js CHANGED
@@ -32,7 +32,7 @@ import {
32
  Markup,
33
  Spinner,
34
  } from '@ithemes/security-components';
35
- import { MODULES_STORE_NAME } from '@ithemes/security-data';
36
  import {
37
  HelpFill,
38
  PageHeader,
32
  Markup,
33
  Spinner,
34
  } from '@ithemes/security-components';
35
+ import { MODULES_STORE_NAME } from '@ithemes/security.packages.data';
36
  import {
37
  HelpFill,
38
  PageHeader,
core/admin-pages/entries/settings/search.js CHANGED
@@ -1,8 +1,3 @@
1
- /**
2
- * External dependencies
3
- */
4
- import { reduce } from 'lodash';
5
-
6
  /**
7
  * WordPress dependencies
8
  */
@@ -14,7 +9,7 @@ import { __ } from '@wordpress/i18n';
14
  */
15
  import { useSingletonEffect } from '@ithemes/security-hocs';
16
  import { STORE_NAME } from '@ithemes/security-search';
17
- import { MODULES_STORE_NAME } from '@ithemes/security-data';
18
  import { TOOLS_STORE_NAME } from './stores';
19
 
20
  export default function useSearchProviders() {
@@ -173,6 +168,10 @@ function getModuleRoute( module ) {
173
  return;
174
  }
175
 
 
 
 
 
176
  const featureLink = `/settings/modules/${ module.type }#${ module.id }`;
177
 
178
  if ( module.status.selected === 'inactive' ) {
 
 
 
 
 
1
  /**
2
  * WordPress dependencies
3
  */
9
  */
10
  import { useSingletonEffect } from '@ithemes/security-hocs';
11
  import { STORE_NAME } from '@ithemes/security-search';
12
+ import { MODULES_STORE_NAME } from '@ithemes/security.packages.data';
13
  import { TOOLS_STORE_NAME } from './stores';
14
 
15
  export default function useSearchProviders() {
168
  return;
169
  }
170
 
171
+ if ( module.id === 'password-requirements' ) {
172
+ return '/settings/user-groups?module=password-requirements';
173
+ }
174
+
175
  const featureLink = `/settings/modules/${ module.type }#${ module.id }`;
176
 
177
  if ( module.status.selected === 'inactive' ) {
core/admin-pages/entries/settings/stores/controls.js CHANGED
@@ -33,25 +33,25 @@ export function apiFetch( request ) {
33
  *
34
  * @see @wordpress/notices#createNotice()
35
  *
36
- * @param {?string} status Notice status.
37
- * Defaults to `info`.
38
- * @param {string} content Notice message.
39
- * @param {?Object} options Notice options.
40
- * @param {?string} options.context Context under which to
41
- * group notice.
42
- * @param {?string} options.id Identifier for notice.
43
- * Automatically assigned
44
- * if not specified.
45
- * @param {?boolean} options.isDismissible Whether the notice can
46
- * be dismissed by user.
47
- * Defaults to `true`.
48
- * @param {?number} options.autoDismiss Whether the notice should
49
- * by automatically dismissed
50
- * after x milliseconds.
51
- * Defaults to `false`.
52
- * @param {?string} options.type Notice type. Either 'default' or 'snackbar'.
53
- * @param {?Array<Object>} options.actions User actions to be
54
- * presented with notice.
55
  *
56
  * @return {Object} control descriptor.
57
  */
33
  *
34
  * @see @wordpress/notices#createNotice()
35
  *
36
+ * @param {?string} status Notice status.
37
+ * Defaults to `info`.
38
+ * @param {string} content Notice message.
39
+ * @param {?Object} options Notice options.
40
+ * @param {?string} options.context Context under which to
41
+ * group notice.
42
+ * @param {?string} options.id Identifier for notice.
43
+ * Automatically assigned
44
+ * if not specified.
45
+ * @param {?boolean} options.isDismissible Whether the notice can
46
+ * be dismissed by user.
47
+ * Defaults to `true`.
48
+ * @param {?number} options.autoDismiss Whether the notice should
49
+ * by automatically dismissed
50
+ * after x milliseconds.
51
+ * Defaults to `false`.
52
+ * @param {?string} options.type Notice type. Either 'default' or 'snackbar'.
53
+ * @param {?Array<Object>} options.actions User actions to be
54
+ * presented with notice.
55
  *
56
  * @return {Object} control descriptor.
57
  */
core/admin-pages/entries/settings/stores/onboard/actions.js CHANGED
@@ -12,7 +12,7 @@ import { __, sprintf } from '@wordpress/i18n';
12
  /**
13
  * Internal dependencies
14
  */
15
- import { MODULES_STORE_NAME } from '@ithemes/security-data';
16
  import { apiFetch, createNotice, awaitPromise, doAction } from '../controls';
17
  import { STORE_NAME } from './';
18
 
@@ -121,7 +121,7 @@ export function* resetOnboarding() {
121
  yield doAction( 'onboard.reset' );
122
  }
123
 
124
- export function* completeOnboarding() {
125
  const throwIf = ( maybeError ) => {
126
  if ( maybeError instanceof Error ) {
127
  throw maybeError;
@@ -135,6 +135,10 @@ export function* completeOnboarding() {
135
 
136
  try {
137
  for ( const step of steps ) {
 
 
 
 
138
  yield { type: SET_COMPLETION_STEP, step };
139
  const callback = step.callback();
140
 
@@ -154,6 +158,7 @@ export function* completeOnboarding() {
154
 
155
  yield { type: SET_COMPLETION_STEP, step: true };
156
  } catch ( error ) {
 
157
  yield createNotice(
158
  'error',
159
  sprintf(
@@ -200,6 +205,7 @@ export function registerCompletionStep( {
200
  priority,
201
  render,
202
  callback,
 
203
  } ) {
204
  return {
205
  type: REGISTER_COMPLETION_STEP,
@@ -208,6 +214,7 @@ export function registerCompletionStep( {
208
  priority,
209
  render,
210
  callback,
 
211
  };
212
  }
213
 
12
  /**
13
  * Internal dependencies
14
  */
15
+ import { MODULES_STORE_NAME } from '@ithemes/security.packages.data';
16
  import { apiFetch, createNotice, awaitPromise, doAction } from '../controls';
17
  import { STORE_NAME } from './';
18
 
121
  yield doAction( 'onboard.reset' );
122
  }
123
 
124
+ export function* completeOnboarding( { root } ) {
125
  const throwIf = ( maybeError ) => {
126
  if ( maybeError instanceof Error ) {
127
  throw maybeError;
135
 
136
  try {
137
  for ( const step of steps ) {
138
+ if ( step.activeCallback && ! step.activeCallback( { root } ) ) {
139
+ continue;
140
+ }
141
+
142
  yield { type: SET_COMPLETION_STEP, step };
143
  const callback = step.callback();
144
 
158
 
159
  yield { type: SET_COMPLETION_STEP, step: true };
160
  } catch ( error ) {
161
+ yield { type: SET_COMPLETION_STEP, step: false };
162
  yield createNotice(
163
  'error',
164
  sprintf(
205
  priority,
206
  render,
207
  callback,
208
+ activeCallback,
209
  } ) {
210
  return {
211
  type: REGISTER_COMPLETION_STEP,
214
  priority,
215
  render,
216
  callback,
217
+ activeCallback,
218
  };
219
  }
220
 
core/admin-pages/entries/settings/stores/onboard/reducers.js CHANGED
@@ -35,7 +35,7 @@ const DEFAULT_STATE = {
35
  visitedLocations: [],
36
  };
37
 
38
- export default function ( state = DEFAULT_STATE, action ) {
39
  switch ( action.type ) {
40
  case RECEIVE_SITE_TYPES:
41
  return {
@@ -111,9 +111,9 @@ export default function ( state = DEFAULT_STATE, action ) {
111
  last( state.visitedLocations ) === action.location
112
  ? state.visitedLocations
113
  : without(
114
- state.visitedLocations,
115
- action.location
116
- ).concat( action.location ),
117
  };
118
  case CLEAR_VISITED_LOCATIONS:
119
  return {
35
  visitedLocations: [],
36
  };
37
 
38
+ export default function( state = DEFAULT_STATE, action ) {
39
  switch ( action.type ) {
40
  case RECEIVE_SITE_TYPES:
41
  return {
111
  last( state.visitedLocations ) === action.location
112
  ? state.visitedLocations
113
  : without(
114
+ state.visitedLocations,
115
+ action.location
116
+ ).concat( action.location ),
117
  };
118
  case CLEAR_VISITED_LOCATIONS:
119
  return {
core/admin-pages/entries/settings/stores/tools/reducers.js CHANGED
@@ -24,7 +24,7 @@ const DEFAULT_STATE = {
24
  lastError: {},
25
  };
26
 
27
- export default function ( state = DEFAULT_STATE, action ) {
28
  switch ( action.type ) {
29
  case RECEIVE_TOOLS:
30
  return {
24
  lastError: {},
25
  };
26
 
27
+ export default function( state = DEFAULT_STATE, action ) {
28
  switch ( action.type ) {
29
  case RECEIVE_TOOLS:
30
  return {
core/admin-pages/entries/settings/stores/tools/selectors.js CHANGED
@@ -12,7 +12,7 @@ import { createRegistrySelector } from '@wordpress/data';
12
  /**
13
  * Internal dependencies
14
  */
15
- import { MODULES_STORE_NAME } from '@ithemes/security-data';
16
  import { TOOLS_STORE_NAME } from '../';
17
 
18
  const _combineTools = memize(
12
  /**
13
  * Internal dependencies
14
  */
15
+ import { MODULES_STORE_NAME } from '@ithemes/security.packages.data';
16
  import { TOOLS_STORE_NAME } from '../';
17
 
18
  const _combineTools = memize(
core/admin-pages/entries/settings/style.scss CHANGED
@@ -135,7 +135,7 @@ ul#adminmenu > li.current#toplevel_page_itsec > a.current:after {
135
  margin-right: 8px;
136
  }
137
 
138
- .itsec-rjsf-entity-select-control__input input[type="text"]:focus {
139
  box-shadow: none;
140
  outline: none;
141
  }
135
  margin-right: 8px;
136
  }
137
 
138
+ .itsec-entity-select-control-as__input input[type="text"]:focus {
139
  box-shadow: none;
140
  outline: none;
141
  }
core/admin-pages/entries/settings/utils.js CHANGED
@@ -6,20 +6,29 @@ import { createLocation } from 'history';
6
  import { pickBy, get, set } from 'lodash';
7
  import Ajv from 'ajv';
8
  import classnames from 'classnames';
 
9
 
10
  /**
11
  * WordPress dependencies
12
  */
13
- import { createContext, useContext } from '@wordpress/element';
 
 
 
 
 
14
  import { useDispatch, useSelect, useRegistry } from '@wordpress/data';
15
  import { applyFilters } from '@wordpress/hooks';
16
- import { __ } from '@wordpress/i18n';
17
 
18
  /**
19
  * Internal dependencies
20
  */
21
  import { WPError } from '@ithemes/security-utils';
22
- import { CORE_STORE_NAME, MODULES_STORE_NAME } from '@ithemes/security-data';
 
 
 
23
 
24
  export const ConfigContext = createContext( {
25
  serverType: '',
@@ -34,8 +43,10 @@ export function useConfigContext() {
34
  export function useNavigateTo() {
35
  const history = useHistory();
36
 
37
- return ( route, mode = 'push' ) =>
38
- history[ mode ]( createLocation( route ) );
 
 
39
  }
40
 
41
  /**
@@ -57,7 +68,7 @@ export function useChildPath() {
57
  /**
58
  * Grabs a global instance of Ajv.
59
  *
60
- * @return {Ajv} The ajv instance.
61
  */
62
  export function getAjv() {
63
  if ( ! getAjv.instance ) {
@@ -65,6 +76,14 @@ export function getAjv() {
65
  getAjv.instance.addMetaSchema(
66
  require( 'ajv/lib/refs/json-schema-draft-04.json' )
67
  );
 
 
 
 
 
 
 
 
68
  }
69
 
70
  return getAjv.instance;
@@ -81,7 +100,7 @@ const isConditionalSettingActive = ( definition, module, context ) => {
81
 
82
  if (
83
  definition[ 'server-type' ] &&
84
- definition[ 'server-type' ] !== serverType
85
  ) {
86
  return false;
87
  }
@@ -124,10 +143,10 @@ const isConditionalSettingActive = ( definition, module, context ) => {
124
  * This hook can only be used to turn a conditional setting inactive,
125
  * if it is inactive due to other conditional rules, this filter won't run.
126
  *
127
- * @param {boolean} isActive Whether the setting is active.
128
- * @param {Object} module The module definition.
129
- * @param {Object} definition The conditional setting definition.
130
- * @param {Object} context Context used to determine whether the setting is active.
131
  */
132
  return applyFilters(
133
  'ithemes-security.settings.isConditionalSettingActive',
@@ -141,14 +160,14 @@ const isConditionalSettingActive = ( definition, module, context ) => {
141
  /**
142
  * Makes a settings schema conditional based on the module definition.
143
  *
144
- * @param {Object} module The module definition.
145
- * @param {Object} context The context used to evaluate the conditional settings.
146
- * @param {string} context.serverType The web server type.
147
- * @param {string} context.installType The ITSEC installation type.
148
  * @param {Array<string>} context.activeModules The list of active modules.
149
- * @param {Array<string>} context.featureFlags The list of feature flags.
150
- * @param {Object} context.settings The module's setting value.
151
- * @param {Object} context.registry The @wordpress/data registry.
152
  *
153
  * @return {Object} The settings schema.
154
  */
@@ -215,10 +234,13 @@ export function makeConditionalSettingsSchema( module, context ) {
215
  export function useConditionalSchema( module, settings ) {
216
  const { serverType, installType } = useConfigContext();
217
  const registry = useRegistry();
218
- const { activeModules, featureFlags } = useSelect( ( select ) => ( {
219
- activeModules: select( MODULES_STORE_NAME ).getActiveModules(),
220
- featureFlags: select( CORE_STORE_NAME ).getFeatureFlags(),
221
- } ) );
 
 
 
222
  const context = {
223
  serverType,
224
  installType,
@@ -228,19 +250,25 @@ export function useConditionalSchema( module, settings ) {
228
  featureFlags,
229
  };
230
 
 
 
 
 
231
  return makeConditionalSettingsSchema( module, context );
232
  }
233
 
234
  /**
235
  * A hook to allow for convenient editing of module settings.
236
  *
237
- * @param {Object} module The module definition.
238
  * @param {function(Object, string): boolean} [filterFields] An optional function to filter the included settings.
239
  * @return {{schema: Object, uiSchema: Object, setFormData: Function, formData: Object}} The settings form components.
240
  */
241
  export function useSettingsForm( module, filterFields ) {
242
- const formData = useSelect( ( select ) =>
243
- select( MODULES_STORE_NAME ).getEditedSettings( module.id )
 
 
244
  );
245
  const { editSettings } = useDispatch( MODULES_STORE_NAME );
246
  const conditionalSchema = useConditionalSchema( module, formData );
@@ -264,6 +292,68 @@ export function useSettingsForm( module, filterFields ) {
264
  };
265
  }
266
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
267
  /**
268
  * Gets the list of module types.
269
  *
@@ -294,32 +384,59 @@ export function getModuleTypes() {
294
  ];
295
  }
296
 
297
- /**
298
- * Checks if a module's requirements are met.
299
- *
300
- * @param {Object} module The module definition.
301
- * @param {string} mode The mode to check for. Either 'activate' or 'run'.
302
- * @return {WPError} An empty error object if all requirements are met.
303
- */
304
- export function validateModuleRequirements( module, mode ) {
305
- const error = new WPError();
306
 
307
- if ( ! module.requirements ) {
308
- return error;
309
- }
310
 
311
- const isForMode = ( requirement ) =>
312
- requirement.validate === mode || mode === 'activate';
 
313
 
314
- if (
315
- module.requirements.ssl &&
316
- isForMode( module.requirements.ssl ) &&
317
- document.location.protocol !== 'https:'
318
- ) {
319
- error.add( 'ssl', __( 'Your site must support SSL.', 'better-wp-security' ) );
320
- }
 
 
 
321
 
322
- return error;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
323
  }
324
 
325
  /**
@@ -327,9 +444,9 @@ export function validateModuleRequirements( module, mode ) {
327
  *
328
  * This method mutates the object.
329
  *
330
- * @param {Object} object The object to modify.
331
- * @param {Array<string>} path The path at which to append it.
332
- * @param {string} className The class to append.
333
  * @return {Object} The object.
334
  */
335
  export function appendClassNameAtPath( object, path, className ) {
6
  import { pickBy, get, set } from 'lodash';
7
  import Ajv from 'ajv';
8
  import classnames from 'classnames';
9
+ import { JsonPointer } from 'json-ptr';
10
 
11
  /**
12
  * WordPress dependencies
13
  */
14
+ import {
15
+ createContext,
16
+ useCallback,
17
+ useContext,
18
+ useMemo,
19
+ } from '@wordpress/element';
20
  import { useDispatch, useSelect, useRegistry } from '@wordpress/data';
21
  import { applyFilters } from '@wordpress/hooks';
22
+ import { __, sprintf } from '@wordpress/i18n';
23
 
24
  /**
25
  * Internal dependencies
26
  */
27
  import { WPError } from '@ithemes/security-utils';
28
+ import {
29
+ CORE_STORE_NAME,
30
+ MODULES_STORE_NAME,
31
+ } from '@ithemes/security.packages.data';
32
 
33
  export const ConfigContext = createContext( {
34
  serverType: '',
43
  export function useNavigateTo() {
44
  const history = useHistory();
45
 
46
+ return useCallback(
47
+ ( route, mode = 'push' ) => history[ mode ]( createLocation( route ) ),
48
+ [ history ]
49
+ );
50
  }
51
 
52
  /**
68
  /**
69
  * Grabs a global instance of Ajv.
70
  *
71
+ * @return {Ajv.Ajv} The ajv instance.
72
  */
73
  export function getAjv() {
74
  if ( ! getAjv.instance ) {
76
  getAjv.instance.addMetaSchema(
77
  require( 'ajv/lib/refs/json-schema-draft-04.json' )
78
  );
79
+ getAjv.instance.addFormat( 'html', {
80
+ type: 'string',
81
+ validate() {
82
+ // Validating HTML isn't something we can realistically do.
83
+ // We accept everything and can then kses it on the server.
84
+ return true;
85
+ },
86
+ } );
87
  }
88
 
89
  return getAjv.instance;
100
 
101
  if (
102
  definition[ 'server-type' ] &&
103
+ ! definition[ 'server-type' ].includes( serverType )
104
  ) {
105
  return false;
106
  }
143
  * This hook can only be used to turn a conditional setting inactive,
144
  * if it is inactive due to other conditional rules, this filter won't run.
145
  *
146
+ * @param {boolean} isActive Whether the setting is active.
147
+ * @param {Object} module The module definition.
148
+ * @param {Object} definition The conditional setting definition.
149
+ * @param {Object} context Context used to determine whether the setting is active.
150
  */
151
  return applyFilters(
152
  'ithemes-security.settings.isConditionalSettingActive',
160
  /**
161
  * Makes a settings schema conditional based on the module definition.
162
  *
163
+ * @param {Object} module The module definition.
164
+ * @param {Object} context The context used to evaluate the conditional settings.
165
+ * @param {string} context.serverType The web server type.
166
+ * @param {string} context.installType The ITSEC installation type.
167
  * @param {Array<string>} context.activeModules The list of active modules.
168
+ * @param {Array<string>} context.featureFlags The list of feature flags.
169
+ * @param {Object} context.settings The module's setting value.
170
+ * @param {Object} context.registry The @wordpress/data registry.
171
  *
172
  * @return {Object} The settings schema.
173
  */
234
  export function useConditionalSchema( module, settings ) {
235
  const { serverType, installType } = useConfigContext();
236
  const registry = useRegistry();
237
+ const { activeModules, featureFlags } = useSelect(
238
+ ( select ) => ( {
239
+ activeModules: select( MODULES_STORE_NAME ).getActiveModules(),
240
+ featureFlags: select( CORE_STORE_NAME ).getFeatureFlags(),
241
+ } ),
242
+ []
243
+ );
244
  const context = {
245
  serverType,
246
  installType,
250
  featureFlags,
251
  };
252
 
253
+ if ( ! module ) {
254
+ return null;
255
+ }
256
+
257
  return makeConditionalSettingsSchema( module, context );
258
  }
259
 
260
  /**
261
  * A hook to allow for convenient editing of module settings.
262
  *
263
+ * @param {Object} module The module definition.
264
  * @param {function(Object, string): boolean} [filterFields] An optional function to filter the included settings.
265
  * @return {{schema: Object, uiSchema: Object, setFormData: Function, formData: Object}} The settings form components.
266
  */
267
  export function useSettingsForm( module, filterFields ) {
268
+ const formData = useSelect(
269
+ ( select ) =>
270
+ select( MODULES_STORE_NAME ).getEditedSettings( module.id ),
271
+ [ module.id ]
272
  );
273
  const { editSettings } = useDispatch( MODULES_STORE_NAME );
274
  const conditionalSchema = useConditionalSchema( module, formData );
292
  };
293
  }
294
 
295
+ export function useModuleSchemaValidator( moduleId ) {
296
+ const ajv = getAjv();
297
+ const { module, settings } = useSelect(
298
+ ( select ) => ( {
299
+ module: select( MODULES_STORE_NAME ).getModule( moduleId ),
300
+ settings: select( MODULES_STORE_NAME ).getEditedSettings(
301
+ moduleId
302
+ ),
303
+ } ),
304
+ [ moduleId ]
305
+ );
306
+ const conditionalSchema = useConditionalSchema( module, settings );
307
+ const noOpTrue = useCallback( () => true );
308
+
309
+ const compiled = useMemo( () => {
310
+ if ( ! conditionalSchema ) {
311
+ return noOpTrue;
312
+ }
313
+
314
+ return ajv.compile( conditionalSchema );
315
+ }, [ conditionalSchema ] );
316
+
317
+ return useCallback( () => {
318
+ if ( compiled( settings ) ) {
319
+ return true;
320
+ }
321
+
322
+ return {
323
+ errors: compiled.errors,
324
+ errorText: convertSchemaErrorToText(
325
+ compiled.errors,
326
+ moduleId,
327
+ conditionalSchema
328
+ ),
329
+ };
330
+ }, [ compiled, settings ] );
331
+ }
332
+
333
+ function convertSchemaErrorToText( errors, moduleId, schema ) {
334
+ const text = [];
335
+
336
+ for ( const { message, schemaPath, dataPath } of errors ) {
337
+ let ptr = JsonPointer.create( schemaPath );
338
+ let parent = ptr.parent( schema );
339
+
340
+ while ( parent && ! parent.title ) {
341
+ ptr = JsonPointer.create(
342
+ ptr.path.slice( 0, ptr.path.length - 1 )
343
+ );
344
+ parent = ptr.parent( schema );
345
+ }
346
+
347
+ if ( parent?.title ) {
348
+ text.push( `${ parent.title } ${ message }.` );
349
+ } else {
350
+ text.push( `${ moduleId }${ dataPath } ${ message }.` );
351
+ }
352
+ }
353
+
354
+ return text;
355
+ }
356
+
357
  /**
358
  * Gets the list of module types.
359
  *
384
  ];
385
  }
386
 
387
+ export function useModuleRequirementsValidator() {
388
+ const { featureFlags } = useSelect(
389
+ ( select ) => ( {
390
+ featureFlags: select( CORE_STORE_NAME ).getFeatureFlags(),
391
+ } ),
392
+ []
393
+ );
 
 
394
 
395
+ return useCallback(
396
+ ( module, mode ) => {
397
+ const error = new WPError();
398
 
399
+ if ( ! module.requirements ) {
400
+ return error;
401
+ }
402
 
403
+ const isForMode = ( requirement ) =>
404
+ requirement.validate === mode || mode === 'activate';
405
+
406
+ if (
407
+ module.requirements.ssl &&
408
+ isForMode( module.requirements.ssl ) &&
409
+ document.location.protocol !== 'https:'
410
+ ) {
411
+ error.add( 'ssl', __( 'Your site must support SSL.', 'better-wp-security' ) );
412
+ }
413
 
414
+ if (
415
+ module.requirements[ 'feature-flags' ] &&
416
+ isForMode( module.requirements[ 'feature-flags' ] )
417
+ ) {
418
+ for ( const flag of module.requirements[ 'feature-flags' ]
419
+ .flags ) {
420
+ if ( ! featureFlags.includes( flag ) ) {
421
+ error.add(
422
+ 'feature-flags',
423
+ sprintf(
424
+ /* translators: The name of the feature. */
425
+ __(
426
+ "The '%s' feature flag must be enabled.",
427
+ 'better-wp-security'
428
+ ),
429
+ flag
430
+ )
431
+ );
432
+ }
433
+ }
434
+ }
435
+
436
+ return error;
437
+ },
438
+ [ featureFlags ]
439
+ );
440
  }
441
 
442
  /**
444
  *
445
  * This method mutates the object.
446
  *
447
+ * @param {Object} object The object to modify.
448
+ * @param {Array<string>} path The path at which to append it.
449
+ * @param {string} className The class to append.
450
  * @return {Object} The object.
451
  */
452
  export function appendClassNameAtPath( object, path, className ) {
core/admin-pages/init.php CHANGED
@@ -42,8 +42,8 @@ final class ITSEC_Admin_Page_Loader {
42
  $page_refs[] = add_submenu_page( $parent, __( 'iThemes Security Logs', 'better-wp-security' ), __( 'Logs', 'better-wp-security' ), $capability, 'itsec-logs', array( $this, 'show_page' ) );
43
  }
44
 
45
- if ( ! ITSEC_Core::is_pro() ) {
46
- $page_refs[] = add_submenu_page( $parent, '', '<span style="color:#2EA2CC">' . __( 'Go Pro', 'better-wp-security' ) . '</span>', $capability, 'itsec-go-pro', array( $this, 'show_page' ) );
47
  }
48
 
49
  if ( defined( 'ITSEC_DEBUG' ) && ITSEC_DEBUG ) {
42
  $page_refs[] = add_submenu_page( $parent, __( 'iThemes Security Logs', 'better-wp-security' ), __( 'Logs', 'better-wp-security' ), $capability, 'itsec-logs', array( $this, 'show_page' ) );
43
  }
44
 
45
+ if ( ! ITSEC_Core::is_pro() || ITSEC_Core::is_development() ) {
46
+ $page_refs[] = add_submenu_page( $parent, '', '<span style="color:#7ABEED">' . __( 'Go Pro', 'better-wp-security' ) . '</span>', $capability, 'itsec-go-pro', array( $this, 'show_page' ) );
47
  }
48
 
49
  if ( defined( 'ITSEC_DEBUG' ) && ITSEC_DEBUG ) {
core/admin-pages/page-go-pro.php CHANGED
@@ -1,4 +1,12 @@
1
  <?php
2
 
3
- wp_redirect( 'https://ithemes.com/security/?utm_source=wordpressadmin&utm_medium=wpmenu&utm_campaign=itsecfreecta' );
4
- exit;
 
 
 
 
 
 
 
 
1
  <?php
2
 
3
+ add_action( 'admin_enqueue_scripts', function () {
4
+ wp_enqueue_script( 'itsec-pages-go-pro' );
5
+ wp_enqueue_style( 'itsec-pages-go-pro' );
6
+ } );
7
+
8
+ add_action( 'itsec-page-show', function () {
9
+ printf(
10
+ '<div id="itsec-go-pro-root"></div>'
11
+ );
12
+ } );
core/container.php CHANGED
@@ -17,6 +17,8 @@ return static function ( Container $c ) {
17
  return new ITSEC_Lib_Upgrader();
18
  };
19
 
 
 
20
  $c[ Actor\Multi_Actor_Factory::class ] = static function ( Container $c ) {
21
  return new Actor\Multi_Actor_Factory( ...$c['actor.factories'] );
22
  };
@@ -40,6 +42,16 @@ return static function ( Container $c ) {
40
  return [];
41
  };
42
 
 
 
 
 
 
 
 
 
 
 
43
  $c[ Ban_Hosts\Multi_Repository::class ] = static function ( Container $c ) {
44
  return new Ban_Hosts\Multi_Repository(
45
  ...array_map( [ $c, 'offsetGet' ], $c['ban-hosts.repositories'] )
17
  return new ITSEC_Lib_Upgrader();
18
  };
19
 
20
+ $c[ \ITSEC_Modules::class ] = \ITSEC_Modules::get_instance();
21
+
22
  $c[ Actor\Multi_Actor_Factory::class ] = static function ( Container $c ) {
23
  return new Actor\Multi_Actor_Factory( ...$c['actor.factories'] );
24
  };
42
  return [];
43
  };
44
 
45
+ $c['import-export.sources'] = static function ( Container $c ) {
46
+ return [
47
+ $c[ \ITSEC_Modules::class ],
48
+ ];
49
+ };
50
+
51
+ $c['rest.controllers'] = static function() {
52
+ return [];
53
+ };
54
+
55
  $c[ Ban_Hosts\Multi_Repository::class ] = static function ( Container $c ) {
56
  return new Ban_Hosts\Multi_Repository(
57
  ...array_map( [ $c, 'offsetGet' ], $c['ban-hosts.repositories'] )
core/core.php CHANGED
@@ -489,6 +489,7 @@ if ( ! class_exists( 'ITSEC_Core' ) ) {
489
  ITSEC_Modules::register_module( 'security-check-pro', "$path/modules/security-check-pro" );
490
  ITSEC_Modules::register_module( 'sync-connect', "$path/modules/sync-connect" );
491
  ITSEC_Modules::register_module( 'site-scanner', "$path/modules/site-scanner" );
 
492
  ITSEC_Modules::register_module( 'hide-backend', "$path/modules/hide-backend" );
493
  }
494
 
@@ -780,12 +781,12 @@ if ( ! class_exists( 'ITSEC_Core' ) ) {
780
  *
781
  * This value will be the same throughout the entire request.
782
  *
783
- * @return int
784
  */
785
- public static function get_current_time_gmt() {
786
  $self = self::get_instance();
787
 
788
- return $self->current_time_gmt;
789
  }
790
 
791
  /**
@@ -999,9 +1000,6 @@ if ( ! class_exists( 'ITSEC_Core' ) ) {
999
  * @return string
1000
  */
1001
  public static function get_storage_dir( $dir = '', $public = false ) {
1002
-
1003
- require_once( self::get_core_dir() . '/lib/class-itsec-lib-directory.php' );
1004
-
1005
  $wp_upload_dir = self::get_wp_upload_dir();
1006
 
1007
  $storage_dir = $wp_upload_dir['basedir'];
489
  ITSEC_Modules::register_module( 'security-check-pro', "$path/modules/security-check-pro" );
490
  ITSEC_Modules::register_module( 'sync-connect', "$path/modules/sync-connect" );
491
  ITSEC_Modules::register_module( 'site-scanner', "$path/modules/site-scanner" );
492
+ ITSEC_Modules::register_module( 'malware-scheduling', "$path/modules/malware-scheduling" );
493
  ITSEC_Modules::register_module( 'hide-backend', "$path/modules/hide-backend" );
494
  }
495
 
781
  *
782
  * This value will be the same throughout the entire request.
783
  *
784
+ * @return int|\DateTimeInterface
785
  */
786
+ public static function get_current_time_gmt( bool $as_object = false ) {
787
  $self = self::get_instance();
788
 
789
+ return $as_object ? new \DateTimeImmutable( '@' . $self->current_time_gmt ) : $self->current_time_gmt;
790
  }
791
 
792
  /**
1000
  * @return string
1001
  */
1002
  public static function get_storage_dir( $dir = '', $public = false ) {
 
 
 
1003
  $wp_upload_dir = self::get_wp_upload_dir();
1004
 
1005
  $storage_dir = $wp_upload_dir['basedir'];
core/img/mail/article_icon.png CHANGED
Binary file
core/img/mail/documentation_icon.png CHANGED
Binary file
core/img/mail/logo.png CHANGED
Binary file
core/img/mail/pro_logo.png CHANGED
Binary file
core/img/mail/pro_logo_no_text.png CHANGED
Binary file
core/img/mail/support_icon.png CHANGED
Binary file
core/img/mail/video_icon.png CHANGED
Binary file
core/lib.php CHANGED
@@ -994,18 +994,21 @@ final class ITSEC_Lib {
994
  *
995
  * @author Modified from ticket #25331
996
  *
997
- * @param int $timestamp
998
- * @param string $format Specify the format. If blank, will default to the date and time format settings.
999
  *
1000
  * @return string
1001
  */
1002
- public static function date_format_i18n_and_local_timezone( $timestamp, $format = '' ) {
 
 
 
1003
 
1004
  if ( ! $format ) {
1005
  $format = get_option( 'date_format' ) . ' ' . get_option( 'time_format' );
1006
  }
1007
 
1008
- return date_i18n( $format, strtotime( get_date_from_gmt( date( 'Y-m-d H:i:s', $timestamp ) ) ) );
1009
  }
1010
 
1011
  /**
@@ -1125,6 +1128,50 @@ final class ITSEC_Lib {
1125
  return $array;
1126
  }
1127
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1128
  /**
1129
  * Merges two arrays recursively such that only arrays are deeply merged.
1130
  *
@@ -1548,7 +1595,7 @@ final class ITSEC_Lib {
1548
  *
1549
  * @param string $header
1550
  *
1551
- * @return string[]
1552
  * @example Parsing the Accept-Language header.
1553
  *
1554
  * "en-US,en;q=0.9,de;q=0.8" transforms to:
@@ -2296,7 +2343,7 @@ final class ITSEC_Lib {
2296
  'type' => 'object',
2297
  'additionalProperties' => false,
2298
  'properties' => [
2299
- 'version' => [
2300
  'type' => 'object',
2301
  'additionalProperties' => false,
2302
  'properties' => [
@@ -2310,9 +2357,15 @@ final class ITSEC_Lib {
2310
  ],
2311
  ],
2312
  ],
2313
- 'ssl' => [
2314
  'type' => 'boolean',
2315
  ],
 
 
 
 
 
 
2316
  ],
2317
  ];
2318
 
@@ -2348,6 +2401,19 @@ final class ITSEC_Lib {
2348
  );
2349
  }
2350
  break;
 
 
 
 
 
 
 
 
 
 
 
 
 
2351
  }
2352
  }
2353
 
@@ -2563,4 +2629,23 @@ final class ITSEC_Lib {
2563
 
2564
  array_walk( $value, [ static::class, 'resolve_ref' ], $definitions );
2565
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2566
  }
994
  *
995
  * @author Modified from ticket #25331
996
  *
997
+ * @param int|DateTimeInterface $time The time to use.
998
+ * @param string $format Specify the format. If blank, will default to the date and time format settings.
999
  *
1000
  * @return string
1001
  */
1002
+ public static function date_format_i18n_and_local_timezone( $time, $format = '' ) {
1003
+ if ( $time instanceof \DateTimeInterface ) {
1004
+ $time = $time->getTimestamp();
1005
+ }
1006
 
1007
  if ( ! $format ) {
1008
  $format = get_option( 'date_format' ) . ' ' . get_option( 'time_format' );
1009
  }
1010
 
1011
+ return date_i18n( $format, strtotime( get_date_from_gmt( date( 'Y-m-d H:i:s', $time ) ) ) );
1012
  }
1013
 
1014
  /**
1128
  return $array;
1129
  }
1130
 
1131
+ /**
1132
+ * Removes items at the given locations from an array.
1133
+ *
1134
+ * This accepts a dotted path with '*' to represent wildcards.
1135
+ *
1136
+ * @param array $array
1137
+ * @param string $dotted_path
1138
+ *
1139
+ * @return array
1140
+ */
1141
+ public static function array_remove( array $array, string $dotted_path ): array {
1142
+ $paths = explode( '.', $dotted_path );
1143
+
1144
+ return self::_array_remove( $array, $paths );
1145
+ }
1146
+
1147
+ private static function _array_remove( array $array, array $paths ): array {
1148
+ if ( ! $array ) {
1149
+ return $array;
1150
+ }
1151
+
1152
+ $path = array_shift( $paths );
1153
+
1154
+ if ( '*' === $path ) {
1155
+ foreach ( $array as $k => $v ) {
1156
+ if ( is_array( $v ) ) {
1157
+ $array[ $k ] = self::_array_remove( $v, $paths );
1158
+ } elseif ( ! $paths ) {
1159
+ // If the last dotted path is a wildcard,
1160
+ // remove all elements.
1161
+ unset( $array[ $k ] );
1162
+ }
1163
+ }
1164
+ } elseif ( isset( $array[ $path ] ) ) {
1165
+ if ( is_array( $array[ $path ] ) && $paths ) {
1166
+ $array[ $path ] = self::_array_remove( $array[ $path ], $paths );
1167
+ } else {
1168
+ unset( $array[ $path ] );
1169
+ }
1170
+ }
1171
+
1172
+ return $array;
1173
+ }
1174
+
1175
  /**
1176
  * Merges two arrays recursively such that only arrays are deeply merged.
1177
  *
1595
  *
1596
  * @param string $header
1597
  *
1598
+ * @return array[]
1599
  * @example Parsing the Accept-Language header.
1600
  *
1601
  * "en-US,en;q=0.9,de;q=0.8" transforms to:
2343
  'type' => 'object',
2344
  'additionalProperties' => false,
2345
  'properties' => [
2346
+ 'version' => [
2347
  'type' => 'object',
2348
  'additionalProperties' => false,
2349
  'properties' => [
2357
  ],
2358
  ],
2359
  ],
2360
+ 'ssl' => [
2361
  'type' => 'boolean',
2362
  ],
2363
+ 'feature-flags' => [
2364
+ 'type' => 'array',
2365
+ 'items' => [
2366
+ 'type' => 'string',
2367
+ ],
2368
+ ],
2369
  ],
2370
  ];
2371
 
2401
  );
2402
  }
2403
  break;
2404
+ case 'feature-flags':
2405
+ foreach ( $requirement as $flag ) {
2406
+ if ( ! ITSEC_Lib_Feature_Flags::is_enabled( $flag ) ) {
2407
+ $error->add(
2408
+ 'feature-flags',
2409
+ sprintf(
2410
+ __( 'The \'%s\' feature flag must be enabled.', 'better-wp-security' ),
2411
+ ( ITSEC_Lib_Feature_Flags::get_flag_config( $flag )['title'] ?? $flag ) ?: $flag
2412
+ )
2413
+ );
2414
+ }
2415
+ }
2416
+ break;
2417
  }
2418
  }
2419
 
2629
 
2630
  array_walk( $value, [ static::class, 'resolve_ref' ], $definitions );
2631
  }
2632
+
2633
+ /**
2634
+ * Generates a v4 UUID using a CSPRNG.
2635
+ *
2636
+ * @return string
2637
+ */
2638
+ public static function generate_uuid4(): string {
2639
+ return sprintf(
2640
+ '%04x%04x-%04x-%04x-%04x-%04x%04x%04x',
2641
+ wp_rand( 0, 0xffff ),
2642
+ wp_rand( 0, 0xffff ),
2643
+ wp_rand( 0, 0xffff ),
2644
+ wp_rand( 0, 0x0fff ) | 0x4000,
2645
+ wp_rand( 0, 0x3fff ) | 0x8000,
2646
+ wp_rand( 0, 0xffff ),
2647
+ wp_rand( 0, 0xffff ),
2648
+ wp_rand( 0, 0xffff )
2649
+ );
2650
+ }
2651
  }
core/lib/Module_Config.php CHANGED
@@ -151,6 +151,14 @@ final class Module_Config {
151
  return $this->get_config()['feature-flags'] ?? [];
152
  }
153
 
 
 
 
 
 
 
 
 
154
  /**
155
  * Translates user-facing strings and returns a new
156
  * config instance with those translations applied.
151
  return $this->get_config()['feature-flags'] ?? [];
152
  }
153
 
154
+ public function get_import_settings(): array {
155
+ return $this->get_config()['import-export']['import-settings'] ?? [];
156
+ }
157
+
158
+ public function get_export_excluded_settings(): array {
159
+ return $this->get_config()['import-export']['exclude-settings'] ?? [];
160
+ }
161
+
162
  /**
163
  * Translates user-facing strings and returns a new
164
  * config instance with those translations applied.
core/lib/Result.php CHANGED
@@ -2,6 +2,9 @@
2
 
3
  namespace iThemesSecurity\Lib;
4
 
 
 
 
5
  final class Result {
6
  const SUCCESS = 'success';
7
  const ERROR = 'error';
@@ -12,7 +15,7 @@ final class Result {
12
  /** @var \WP_Error */
13
  private $error;
14
 
15
- /** @var mixed */
16
  private $data;
17
 
18
  private $success = [];
@@ -25,6 +28,13 @@ final class Result {
25
  $this->type = $type;
26
  }
27
 
 
 
 
 
 
 
 
28
  public static function success( $data = null ): self {
29
  $self = new self( self::SUCCESS );
30
  $self->data = $data;
@@ -39,6 +49,55 @@ final class Result {
39
  return $self;
40
  }
41
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
42
  public static function from_response(): self {
43
  if ( \ITSEC_Response::is_success() ) {
44
  $result = self::success( \ITSEC_Response::get_response() );
@@ -55,6 +114,11 @@ final class Result {
55
 
56
  public function is_success(): bool { return self::SUCCESS === $this->type; }
57
 
 
 
 
 
 
58
  public function get_data() { return $this->data; }
59
 
60
  public function get_error(): \WP_Error { return $this->error; }
@@ -105,4 +169,22 @@ final class Result {
105
 
106
  return $response;
107
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
108
  }
2
 
3
  namespace iThemesSecurity\Lib;
4
 
5
+ /**
6
+ * @template T
7
+ */
8
  final class Result {
9
  const SUCCESS = 'success';
10
  const ERROR = 'error';
15
  /** @var \WP_Error */
16
  private $error;
17
 
18
+ /** @var T */
19
  private $data;
20
 
21
  private $success = [];
28
  $this->type = $type;
29
  }
30
 
31
+ /**
32
+ * Create a "success" result.
33
+ *
34
+ * @param T $data
35
+ *
36
+ * @return static
37
+ */
38
  public static function success( $data = null ): self {
39
  $self = new self( self::SUCCESS );
40
  $self->data = $data;
49
  return $self;
50
  }
51
 
52
+ public static function combine( Result ...$results ): self {
53
+ return self::combine_with_success_data( null, ...$results );
54
+ }
55
+
56
+ /**
57
+ * Combine multiple result objects with data to use as the success value when applicable.
58
+ *
59
+ * @param T $data
60
+ * @param Result ...$results
61
+ *
62
+ * @return static
63
+ */
64
+ public static function combine_with_success_data( $data, Result ...$results ): self {
65
+ $error = new \WP_Error();
66
+ $warning = [];
67
+ $info = [];
68
+ $success = [];
69
+
70
+ foreach ( $results as $result ) {
71
+ if ( ! $result->is_success() ) {
72
+ $error->merge_from( $result->get_error() );
73
+ }
74
+
75
+ $warning[] = $result->get_warning_messages();
76
+ $info[] = $result->get_info_messages();
77
+ $success[] = $result->get_success_messages();
78
+ }
79
+
80
+ if ( $error->has_errors() ) {
81
+ $result = self::error( $error );
82
+ } else {
83
+ $result = self::success( $data );
84
+ }
85
+
86
+ if ( $warning ) {
87
+ $result->add_warning_message( ...array_merge( ...$warning ) );
88
+ }
89
+
90
+ if ( $info ) {
91
+ $result->add_info_message( ...array_merge( ...$info ) );
92
+ }
93
+
94
+ if ( $success ) {
95
+ $result->add_success_message( ...array_merge( ...$success ) );
96
+ }
97
+
98
+ return $result;
99
+ }
100
+
101
  public static function from_response(): self {
102
  if ( \ITSEC_Response::is_success() ) {
103
  $result = self::success( \ITSEC_Response::get_response() );
114
 
115
  public function is_success(): bool { return self::SUCCESS === $this->type; }
116
 
117
+ /**
118
+ * Returns the Result data.
119
+ *
120
+ * @return T
121
+ */
122
  public function get_data() { return $this->data; }
123
 
124
  public function get_error(): \WP_Error { return $this->error; }
169
 
170
  return $response;
171
  }
172
+
173
+ public function for_wp_cli() {
174
+ foreach ( $this->get_warning_messages() as $message ) {
175
+ \WP_CLI::warning( $message );
176
+ }
177
+
178
+ foreach ( $this->get_info_messages() as $message ) {
179
+ \WP_CLI::log( $message );
180
+ }
181
+
182
+ foreach ( $this->get_success_messages() as $message ) {
183
+ \WP_CLI::success( $message );
184
+ }
185
+
186
+ if ( ! $this->is_success() ) {
187
+ \WP_CLI::error( $this->get_error() );
188
+ }
189
+ }
190
  }
core/lib/actor/Import.php ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace iThemesSecurity\Actor;
4
+
5
+ final class Import implements Actor {
6
+ public function get_type() {
7
+ return 'import';
8
+ }
9
+
10
+ public function get_identifier() {
11
+ return 'import';
12
+ }
13
+
14
+ public function __toString() {
15
+ return __( 'Import', 'better-wp-security');
16
+ }
17
+ }
core/lib/actor/Import_Factory.php ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace iThemesSecurity\Actor;
4
+
5
+ final class Import_Factory implements Actor_Factory {
6
+ public function make( $identifier ) {
7
+ return new Import();
8
+ }
9
+
10
+ public function get_slug() {
11
+ return 'import';
12
+ }
13
+
14
+ public function get_label() {
15
+ return __( 'Import', 'better-wp-security' );
16
+ }
17
+
18
+ public function is_determinate() {
19
+ return true;
20
+ }
21
+
22
+ public function get_actors( $query = '' ) {
23
+ return [
24
+ new Import(),
25
+ ];
26
+ }
27
+ }
core/lib/class-itsec-lib-directory.php CHANGED
@@ -229,6 +229,27 @@ if ( ! class_exists( 'ITSEC_Lib_Directory' ) ) {
229
  return true;
230
  }
231
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
232
  /**
233
  * Test to see if the requested directory is writable.
234
  *
229
  return true;
230
  }
231
 
232
+ /**
233
+ * Creates a temporary directory.
234
+ *
235
+ * @return string|WP_Error
236
+ */
237
+ public static function create_temp_directory() {
238
+ $temp = get_temp_dir();
239
+
240
+ do {
241
+ $directory = $temp . wp_generate_password( 12, false );
242
+ } while ( self::is_dir( $directory ) );
243
+
244
+ $created = self::create( $directory );
245
+
246
+ if ( is_wp_error( $created ) ) {
247
+ return $created;
248
+ }
249
+
250
+ return trailingslashit( $directory );
251
+ }
252
+
253
  /**
254
  * Test to see if the requested directory is writable.
255
  *
core/lib/class-itsec-lib-feature-flags.php CHANGED
@@ -2,9 +2,6 @@
2
 
3
  class ITSEC_Lib_Feature_Flags {
4
 
5
- /** @var bool */
6
- private static $loaded = false;
7
-
8
  /** @var array */
9
  private static $flags = array();
10
 
@@ -86,8 +83,6 @@ class ITSEC_Lib_Feature_Flags {
86
  * @return array
87
  */
88
  public static function get_registered_flags() {
89
- self::load();
90
-
91
  $flags = array();
92
 
93
  foreach ( self::$flags as $flag => $_ ) {
@@ -249,8 +244,6 @@ class ITSEC_Lib_Feature_Flags {
249
  * @return array|null
250
  */
251
  public static function get_flag_config( $flag ) {
252
- self::load();
253
-
254
  if ( ! isset( self::$flags[ $flag ] ) ) {
255
  return null;
256
  }
@@ -263,11 +256,4 @@ class ITSEC_Lib_Feature_Flags {
263
 
264
  return $config;
265
  }
266
-
267
- private static function load() {
268
- if ( ! self::$loaded ) {
269
- ITSEC_Modules::load_module_file( 'feature-flags.php', ':active' );
270
- self::$loaded = true;
271
- }
272
- }
273
  }
2
 
3
  class ITSEC_Lib_Feature_Flags {
4
 
 
 
 
5
  /** @var array */
6
  private static $flags = array();
7
 
83
  * @return array
84
  */
85
  public static function get_registered_flags() {
 
 
86
  $flags = array();
87
 
88
  foreach ( self::$flags as $flag => $_ ) {
244
  * @return array|null
245
  */
246
  public static function get_flag_config( $flag ) {
 
 
247
  if ( ! isset( self::$flags[ $flag ] ) ) {
248
  return null;
249
  }
256
 
257
  return $config;
258
  }
 
 
 
 
 
 
 
259
  }
core/lib/class-itsec-lib-file.php CHANGED
@@ -109,7 +109,7 @@ class ITSEC_Lib_File {
109
  * @param string $file Full path to config file to update.
110
  * @param string $contents Contents to write to the file.
111
  * @param bool $append Optional. Set to true to append contents to the file. Defaults to false.
112
- * @return bool|WP_Error Boolean true on success, WP_Error object otherwise.
113
  */
114
  public static function write( $file, $contents, $append = false ) {
115
  $callable = array();
@@ -312,7 +312,7 @@ class ITSEC_Lib_File {
312
  * @since 1.15.0
313
  *
314
  * @param string $file Full path to test for existence.
315
- * @return bool|WP_Error Boolean true if it exists, false if it does not.
316
  */
317
  public static function exists( $file ) {
318
  // phpcs:ignore -- Have Tide ignore the following line. We use arguments that don't exist in early versions, but these versions ignore the arguments.
109
  * @param string $file Full path to config file to update.
110
  * @param string $contents Contents to write to the file.
111
  * @param bool $append Optional. Set to true to append contents to the file. Defaults to false.
112
+ * @return true|WP_Error Boolean true on success, WP_Error object otherwise.
113
  */
114
  public static function write( $file, $contents, $append = false ) {
115
  $callable = array();
312
  * @since 1.15.0
313
  *
314
  * @param string $file Full path to test for existence.
315
+ * @return bool Boolean true if it exists, false if it does not.
316
  */
317
  public static function exists( $file ) {
318
  // phpcs:ignore -- Have Tide ignore the following line. We use arguments that don't exist in early versions, but these versions ignore the arguments.
core/lib/class-itsec-lib-rest.php CHANGED
@@ -294,4 +294,26 @@ class ITSEC_Lib_REST {
294
  $error->add_data( array_merge( (array) $data, [ 'status' => $status ] ) );
295
  }
296
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
297
  }
294
  $error->add_data( array_merge( (array) $data, [ 'status' => $status ] ) );
295
  }
296
  }
297
+
298
+ /**
299
+ * Makes a REST API URL from a REST API root and path.
300
+ *
301
+ * @param string $root
302
+ * @param string $path
303
+ *
304
+ * @return string
305
+ */
306
+ public static function rest_url( string $root, string $path ): string {
307
+ if ( strpos( $root, '?' ) !== - 1 ) {
308
+ $path = str_replace( '?', '&', $path );
309
+ }
310
+
311
+ $path = preg_replace( '/^\//', '', $path );
312
+
313
+ if ( strpos( $root, '?' ) !== - 1 ) {
314
+ $path = str_replace( '?', '&', $path );
315
+ }
316
+
317
+ return $root . $path;
318
+ }
319
  }
core/lib/class-itsec-lib-user.php ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class ITSEC_Lib_User {
4
+
5
+ /**
6
+ * Is the given user using Two-Factor.
7
+ *
8
+ * Either because they have opted-in to it, or it is required for their account.
9
+ *
10
+ * @param WP_User $user
11
+ *
12
+ * @return bool
13
+ */
14
+ public static function is_user_using_two_factor( WP_User $user ): bool {
15
+ return apply_filters( 'itsec_is_user_using_two_factor', false, $user );
16
+ }
17
+ }
core/lib/class-itsec-mail.php CHANGED
@@ -39,7 +39,7 @@ final class ITSEC_Mail {
39
  $this->add_html( $this->replace_all( $header, $replacements ), 'header' );
40
  }
41
 
42
- public function add_footer() {
43
  $footer = '';
44
 
45
  if ( ! ITSEC_Core::is_pro() ) {
@@ -48,11 +48,11 @@ final class ITSEC_Mail {
48
  $replacements = array(
49
  'two_factor' => esc_html__( 'Want two-factor authentication, scheduled site scanning, ticketed support and more?', 'better-wp-security' ),
50
  'get_pro' => esc_html__( 'Get iThemes Security Pro', 'better-wp-security' ),
51
- 'why_pro' => sprintf( wp_kses( __( 'Why go Pro? <a href="%s">Check out the Free/Pro comparison chart.</a>', 'better-wp-security' ), array( 'a' => array( 'href' => array() ) ) ), esc_url( 'https://ithemes.com/security/why-go-pro/' ) ),
52
  );
53
 
54
  $footer .= $this->replace_all( $callout, $replacements );
55
- } else {
56
  $this->add_divider();
57
  }
58
 
@@ -61,22 +61,37 @@ final class ITSEC_Mail {
61
  $settings = esc_url( self::filter_admin_page_url( ITSEC_Core::get_settings_page_url() ) );
62
 
63
  $replacements = array(
64
- 'security_resources' => esc_html__( 'Security Resources', 'better-wp-security' ),
65
- 'articles' => esc_html__( 'Articles', 'better-wp-security' ),
66
- 'articles_content' => sprintf( wp_kses( __( 'Read the latest in WordPress Security news, tips, and updates on <a href="%s">iThemes Blog</a>.', 'better-wp-security' ), array( 'a' => array( 'href' => array() ) ) ), esc_url( 'https://ithemes.com/category/wordpress-security/' ) ),
 
 
 
 
67
  'tutorials' => esc_html__( 'Tutorials', 'better-wp-security' ),
68
- 'tutorials_content' => sprintf( wp_kses( __( 'Make the most of iThemes Security features with our <a href="%s">free iThemes Security tutorials</a>.', 'better-wp-security' ), array( 'a' => array( 'href' => array() ) ) ), esc_url( 'https://ithemes.com/tutorial/category/ithemes-security/' ) ),
 
 
 
69
  'help_and_support' => esc_html__( 'Help & Support', 'better-wp-security' ),
70
  'documentation' => esc_html__( 'Documentation', 'better-wp-security' ),
71
- 'documentation_content' => sprintf( wp_kses( __( 'Read iThemes Security documentation and Frequently Asked Questions on <a href="%s">the Codex</a>.', 'better-wp-security' ), array( 'a' => array( 'href' => array() ) ) ), esc_url( 'http://ithemes.com/codex/page/IThemes_Security' ) ),
 
 
 
72
  'support' => esc_html__( 'Support', 'better-wp-security' ),
73
  'pro' => esc_html__( 'Pro', 'better-wp-security' ),
74
- 'support_content' => sprintf( wp_kses( __( 'Pro customers can contact <a href="%s">iThemes Helpdesk</a> for help. Our support team answers questions Monday – Friday, 8am – 5pm (CST).', 'better-wp-security' ), array( 'a' => array( 'href' => array() ) ) ), esc_url( 'https://members.ithemes.com/panel/helpdesk.php' ) ),
 
 
 
75
  'security_settings_link' => $settings,
76
  'unsubscribe_link_text' => esc_html__( 'This email was generated by the iThemes Security plugin.', 'better-wp-security' ) . '<br>' . sprintf( esc_html__( 'To unsubscribe from these updates, visit the %1$sSettings page%2$s in the iThemes Security plugin menu.', 'better-wp-security' ), "<a href=\"{$settings}\" style=\"color: #0084CB\">", '</a>' ),
77
  'security_guide' => esc_html__( 'Free WordPress Security Guide', 'better-wp-security' ),
78
- 'security_guide_content' => sprintf( wp_kses( __( 'Learn simple WordPress security tips — including 3 kinds of security your site needs and 4 best security practices for keeping your WordPress site safe with our <a href="%s">free guide</a>.', 'better-wp-security' ), array( 'a' => array( 'href' => array() ) ) ), esc_url( 'https://ithemes.com/publishing/wordpress-security/' ) ),
79
-
 
 
80
  );
81
 
82
  $this->add_html( $this->replace_all( $footer, $replacements ) );
@@ -104,13 +119,14 @@ final class ITSEC_Mail {
104
  $this->add_html( $footer, 'user-footer' );
105
  }
106
 
107
- public function add_text( $content ) {
108
- $this->add_html( $this->get_text( $content ) );
109
  }
110
 
111
- public function get_text( $content ) {
112
  $module = $this->get_template( 'text.html' );
113
  $module = $this->replace( $module, 'content', $content );
 
114
 
115
  return $module;
116
  }
@@ -158,6 +174,19 @@ final class ITSEC_Mail {
158
  return $module;
159
  }
160
 
 
 
 
 
 
 
 
 
 
 
 
 
 
161
  public function add_large_code( $content ) {
162
  $this->add_html( $this->get_large_code( $content ) );
163
  }
@@ -447,6 +476,41 @@ final class ITSEC_Mail {
447
  return $module;
448
  }
449
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
450
  /**
451
  * Add a section of HTML to the email.
452
  *
@@ -621,13 +685,13 @@ final class ITSEC_Mail {
621
  $result = true;
622
 
623
  foreach ( $this->recipients as $recipient ) {
624
- $result = wp_mail( $recipient, $this->get_subject(), $this->content ? $this->content : $this->get_content( $recipient ), $headers, $this->attachments ) && $result;
625
  }
626
 
627
  return $result;
628
  }
629
 
630
- return wp_mail( $this->recipients, $this->get_subject(), $this->content ? $this->content : $this->get_content(), $headers, $this->attachments );
631
  }
632
 
633
  /**
39
  $this->add_html( $this->replace_all( $header, $replacements ), 'header' );
40
  }
41
 
42
+ public function add_footer( $add_divider = true ) {
43
  $footer = '';
44
 
45
  if ( ! ITSEC_Core::is_pro() ) {
48
  $replacements = array(
49
  'two_factor' => esc_html__( 'Want two-factor authentication, scheduled site scanning, ticketed support and more?', 'better-wp-security' ),
50
  'get_pro' => esc_html__( 'Get iThemes Security Pro', 'better-wp-security' ),
51
+ 'why_pro' => sprintf( wp_kses( __( 'Why go Pro? <a href="%s">Check out the Free/Pro comparison chart.</a>', 'better-wp-security' ), array( 'a' => array( 'href' => array() ) ) ), esc_url( 'https://ithemes.com/security/?utm_source=email&utm_medium=notification&utm_campaign=itsecfreecta/' ) ),
52
  );
53
 
54
  $footer .= $this->replace_all( $callout, $replacements );
55
+ } elseif ( $add_divider ) {
56
  $this->add_divider();
57
  }
58
 
61
  $settings = esc_url( self::filter_admin_page_url( ITSEC_Core::get_settings_page_url() ) );
62
 
63
  $replacements = array(
64
+ 'security_resources' => esc_html__( 'More Website Security Resources', 'better-wp-security' ),
65
+ 'articles' => esc_html__( 'WordPress Security News', 'better-wp-security' ),
66
+ 'articles_content' => sprintf(
67
+ wp_kses( __( 'Be the first to get the latest WordPress security news, tips, and updates on the <a href="%1$s">iThemes Blog</a>, including the <a href="%2$s">Weekly WordPress Vulnerability Report</a>.', 'better-wp-security' ), 'mail' ),
68
+ 'https://ithemes.com/blog/category/wordpress-security/?utm_source=sitescanemail&utm_medium=link&utm_campaign=itsecfreecta',
69
+ 'https://ithemes.com/wordpress-vulnerability-report/?utm_source=sitescanemail&utm_medium=link&utm_campaign=itsecfreecta'
70
+ ),
71
  'tutorials' => esc_html__( 'Tutorials', 'better-wp-security' ),
72
+ 'tutorials_content' => sprintf(
73
+ wp_kses( __( 'Make sure you’re getting the most out of iThemes Security features to protect your site with our <a href="%s">free iThemes Security tutorials</a>.', 'better-wp-security' ), 'mail' ),
74
+ 'https://ithemes.com/tutorial/category/ithemes-security/'
75
+ ),
76
  'help_and_support' => esc_html__( 'Help & Support', 'better-wp-security' ),
77
  'documentation' => esc_html__( 'Documentation', 'better-wp-security' ),
78
+ 'documentation_content' => sprintf(
79
+ wp_kses( __( 'Read iThemes Security documentation and Frequently Asked Questions on the <a href="%s">iThemes Help Center</a>.', 'better-wp-security' ), 'mail' ),
80
+ 'https://help.ithemes.com/hc/en-us/categories/200147050'
81
+ ),
82
  'support' => esc_html__( 'Support', 'better-wp-security' ),
83
  'pro' => esc_html__( 'Pro', 'better-wp-security' ),
84
+ 'support_content' => sprintf(
85
+ wp_kses( __( 'Pro customers have the best support team available as their security team. Contact the <a href="%s">iThemes Help Desk</a> for help when you need answers.', 'better-wp-security' ), 'mail' ),
86
+ 'https://members.ithemes.com/panel/helpdesk.php?utm_source=sitescanemail&utm_medium=link&utm_campaign=itsecfreecta'
87
+ ),
88
  'security_settings_link' => $settings,
89
  'unsubscribe_link_text' => esc_html__( 'This email was generated by the iThemes Security plugin.', 'better-wp-security' ) . '<br>' . sprintf( esc_html__( 'To unsubscribe from these updates, visit the %1$sSettings page%2$s in the iThemes Security plugin menu.', 'better-wp-security' ), "<a href=\"{$settings}\" style=\"color: #0084CB\">", '</a>' ),
90
  'security_guide' => esc_html__( 'Free WordPress Security Guide', 'better-wp-security' ),
91
+ 'security_guide_content' => sprintf(
92
+ wp_kses( __( 'Learn simple WordPress security tips — including 3 kinds of security your site needs and 4 best security practices for keeping your WordPress site safe with our <a href="%s">free guide</a>.', 'better-wp-security' ), 'mail' ),
93
+ 'https://ithemes.com/ebooks/wordpress-security/?utm_source=sitescanemail&utm_medium=link&utm_campaign=itsecfreecta'
94
+ ),
95
  );
96
 
97
  $this->add_html( $this->replace_all( $footer, $replacements ) );
119
  $this->add_html( $footer, 'user-footer' );
120
  }
121
 
122
+ public function add_text( $content, $color = 'light' ) {
123
+ $this->add_html( $this->get_text( $content, $color ) );
124
  }
125
 
126
+ public function get_text( $content, $color = 'light' ) {
127
  $module = $this->get_template( 'text.html' );
128
  $module = $this->replace( $module, 'content', $content );
129
+ $module = $this->replace( $module, 'color', $color === 'dark' ? '#002338' : '#808080' );
130
 
131
  return $module;
132
  }
174
  return $module;
175
  }
176
 
177
+ public function add_123_box( $first, $second, $third ) {
178
+ $this->add_html( $this->get_123_box( $first, $second, $third ) );
179
+ }
180
+
181
+ public function get_123_box( $first, $second, $third ) {
182
+ $module = $this->get_template( '123-box.html' );
183
+ $module = $this->replace( $module, 'first', $first );
184
+ $module = $this->replace( $module, 'second', $second );
185
+ $module = $this->replace( $module, 'third', $third );
186
+
187
+ return $module;
188
+ }
189
+
190
  public function add_large_code( $content ) {
191
  $this->add_html( $this->get_large_code( $content ) );
192
  }
476
  return $module;
477
  }
478
 
479
+ public function add_site_scanner_pro_callout() {
480
+ $this->add_html( $this->get_site_scanner_pro_callout() );
481
+ }
482
+
483
+ public function get_site_scanner_pro_callout() {
484
+ $template = $this->get_template( 'site-scanner-pro-callout.html' );
485
+ $template = $this->replace_all( $template, array(
486
+ 'title' => esc_html__( 'Go Pro Now to Get Automatic Vulnerability Patching', 'better-wp-security' ),
487
+ 'content' =>
488
+ wp_kses(
489
+ __( 'iThemes Security Pro will <b>automatically update vulnerable plugins and themes for you</b> if a patch is available <b>so you don’t have to manually log in to update</b>.', 'better-wp-security' ),
490
+ 'mail'
491
+ ) . ' ' .
492
+ esc_html__( 'Get your site patched by iThemes Security Pro before hackers discover vulnerabilities on your site, all without doing a thing.', 'better-wp-security' ) . '<br><br>' .
493
+ sprintf(
494
+ '<b>%s</b>',
495
+ sprintf(
496
+ esc_html__( 'Get all of this in the %1$sSite Scanner Pro%2$s:', 'better-wp-security' ),
497
+ '<a href="https://ithemes.com/blog/ithemes-security-pro-feature-spotlight-site-scan/?utm_source=wordpressadmin&utm_medium=button&utm_campaign=profeaturespage">',
498
+ '</a>'
499
+ )
500
+ ),
501
+ 'first_box' => esc_html__( 'Save time when time is of the utmost importance to patch vulnerabilities before hackers and bots can find and exploit them.', 'better-wp-security' ),
502
+ 'second_box' => esc_html__( 'Free your team from mundane updates by removing the need to manually log in to update plugins and themes.', 'better-wp-security' ),
503
+ 'third_box' => esc_html__( 'Automatically updates vulnerable plugins, themes, and WordPress core for you if it fixes a vulnerability that was found by the Site Scanner.', 'better-wp-security' ),
504
+ 'fourth_box' => esc_html__( 'Hardens your website if you are running outdated software, including checks for old WordPress sites that could be used to compromise your server.', 'better-wp-security' ),
505
+ 'href' => 'https://ithemes.com/security/?utm_source=sitescanemail&utm_medium=button&utm_campaign=itsecfreecta/',
506
+ 'link_text' => __( 'Go Pro Now', 'better-wp-security' ),
507
+ 'bk_color' => '#0085E0',
508
+ 'txt_color' => '#FFFFFF',
509
+ ) );
510
+
511
+ return $template;
512
+ }
513
+
514
  /**
515
  * Add a section of HTML to the email.
516
  *
685
  $result = true;
686
 
687
  foreach ( $this->recipients as $recipient ) {
688
+ $result = wp_mail( $recipient, $this->get_subject(), $this->content ?: $this->get_content( $recipient ), $headers, $this->attachments ) && $result;
689
  }
690
 
691
  return $result;
692
  }
693
 
694
+ return wp_mail( $this->recipients, $this->get_subject(), $this->content ?: $this->get_content(), $headers, $this->attachments );
695
  }
696
 
697
  /**
core/lib/login-interstitial/class-itsec-login-interstitial-session.php CHANGED
@@ -57,7 +57,9 @@ class ITSEC_Login_Interstitial_Session {
57
  * @return $this
58
  */
59
  public function add_completed_interstitial( $action ) {
60
- $this->data['completed'][] = $action;
 
 
61
 
62
  return $this;
63
  }
57
  * @return $this
58
  */
59
  public function add_completed_interstitial( $action ) {
60
+ if ( ! in_array( $action, $this->data['completed'], true ) ) {
61
+ $this->data['completed'][] = $action;
62
+ }
63
 
64
  return $this;
65
  }
core/lib/mail-templates/123-box.html ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <tr>
2
+ <td class="123-box-container" align="center" valign="top"
3
+ style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;padding-top: 20px;padding-bottom: 20px;">
4
+ <table border="0" cellspacing="0" width="100%"
5
+ style="max-width: 900px;border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
6
+ <tr>
7
+ <td colspan="1" valign="center"
8
+ style="padding: 12px;height: 0;border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
9
+ <table class="123-box container" border="0" cellpadding="0" cellspacing="0"
10
+ style="height: 100%;border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;background-color: #F4F6FF;">
11
+ <tr>
12
+ <td class="section-padding" align="center" valign="center"
13
+ style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;padding: 20px;">
14
+ <table border="0" cellpadding="0" cellspacing="0" width="100%"
15
+ style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
16
+ <tr>
17
+ <td valign="center"
18
+ style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;color: #002338;font-family: Helvetica;font-size: 40px;line-height: 150%;text-align: left;padding-right: 20px;">
19
+ 1
20
+ </td>
21
+ <td valign="center"
22
+ style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;color: #002338;font-family: Helvetica;font-size: 16px;line-height: 150%;text-align: left;">
23
+ {{ $first }}
24
+ </td>
25
+ </tr>
26
+ </table>
27
+ </td>
28
+ </tr>
29
+ </table>
30
+ </td>
31
+ <td colspan="2" valign="center"
32
+ style="padding: 12px;height: 0;border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
33
+ <table class="123-box container" border="0" cellpadding="0" cellspacing="0"
34
+ style="height: 100%;border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;background-color: #F4F6FF;">
35
+ <tr>
36
+ <td class="section-padding" align="center" valign="center"
37
+ style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;padding: 20px;">
38
+ <table border="0" cellpadding="0" cellspacing="0" width="100%"
39
+ style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
40
+ <tr>
41
+ <td valign="center"
42
+ style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;color: #002338;font-family: Helvetica;font-size: 40px;line-height: 150%;text-align: left;padding-right: 20px;">
43
+ 2
44
+ </td>
45
+ <td valign="center"
46
+ style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;color: #002338;font-family: Helvetica;font-size: 16px;line-height: 150%;text-align: left;">
47
+ {{ $second }}
48
+ </td>
49
+ </tr>
50
+ </table>
51
+ </td>
52
+ </tr>
53
+ </table>
54
+ </td>
55
+ </tr>
56
+ <tr>
57
+ <td colspan="3" valign="center"
58
+ style="padding: 12px;height: 0;border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
59
+ <table class="123-box container" border="0" cellpadding="0" cellspacing="0"
60
+ style="height: 100%;border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;background-color: #F4F6FF;">
61
+ <tr>
62
+ <td class="section-padding" align="center" valign="center"
63
+ style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;padding: 20px;">
64
+ <table border="0" cellpadding="0" cellspacing="0" width="100%"
65
+ style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
66
+ <tr>
67
+ <td valign="center"
68
+ style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;color: #002338;font-family: Helvetica;font-size: 40px;line-height: 150%;text-align: left;padding-right: 20px;">
69
+ 3
70
+ </td>
71
+ <td valign="center"
72
+ style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;color: #002338;font-family: Helvetica;font-size: 16px;line-height: 150%;text-align: left;">
73
+ {{ $third }}
74
+ </td>
75
+ </tr>
76
+ </table>
77
+ </td>
78
+ </tr>
79
+ </table>
80
+ </td>
81
+ </tr>
82
+ </table>
83
+ </td>
84
+ </tr>
core/lib/mail-templates/details-box.html CHANGED
@@ -1,23 +1,23 @@
 
 
 
 
 
 
1
  <tr>
2
- <td class="details-box-container" align="center" valign="top" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;padding-top: 20px;padding-bottom: 20px;">
3
  <table border="0" cellpadding="0" cellspacing="0" width="100%" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
4
  <tr>
5
- <td align="center" valign="top" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
6
- <table class="details-box container" border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;background-color: #E4EEF7;border: 1px solid #CDCECE;">
7
- <tr>
8
- <td class="section-padding" align="center" valign="top" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;padding-top: 20px;padding-right: 20px;padding-left: 20px;">
9
- <table border="0" cellpadding="0" cellspacing="0" width="100%" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
10
- <tr>
11
- <td class="container-cell" valign="top" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;color: #6A6A6A;font-family: Helvetica;font-size: 16px;line-height: 150%;text-align: center;padding-bottom: 20px;">
12
- {{ $content }}
13
- </td>
14
- </tr>
15
- </table>
16
- </td>
17
- </tr>
18
- </table>
19
  </td>
20
  </tr>
21
  </table>
22
  </td>
23
  </tr>
 
 
 
 
 
 
1
+ <tr>
2
+ <td class="details-box-container" align="center" valign="top" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;padding-top: 20px;padding-bottom: 20px;">
3
+ <table border="0" cellpadding="0" cellspacing="0" width="100%" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
4
+ <tr>
5
+ <td align="center" valign="top" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
6
+ <table class="details-box container" border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;background-color: #E4EEF7;border: 1px solid #CDCECE;">
7
  <tr>
8
+ <td class="section-padding" align="center" valign="top" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;padding-top: 20px;padding-right: 20px;padding-left: 20px;">
9
  <table border="0" cellpadding="0" cellspacing="0" width="100%" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
10
  <tr>
11
+ <td class="container-cell" valign="top" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;color: #6A6A6A;font-family: Helvetica;font-size: 16px;line-height: 150%;text-align: center;padding-bottom: 20px;">
12
+ {{ $content }}
 
 
 
 
 
 
 
 
 
 
 
 
13
  </td>
14
  </tr>
15
  </table>
16
  </td>
17
  </tr>
18
+ </table>
19
+ </td>
20
+ </tr>
21
+ </table>
22
+ </td>
23
+ </tr>
core/lib/mail-templates/footer.html CHANGED
@@ -32,12 +32,11 @@
32
  <table class="container" align="left" border="0" cellpadding="0" cellspacing="0" width="260" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
33
  <tr>
34
  <td class="container-cell" valign="top" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;color: #808080;font-family: Helvetica;font-size: 16px;line-height: 150%;text-align: center;padding-bottom: 20px;">
35
- <img class="preserve-ratio" src="{! $article_icon }}" style="max-width: 61px;border: 0;outline: none;text-decoration: none;-ms-interpolation-mode: bicubic;height: auto;" width="61" alt="" align="center">
36
  <br>
37
  <h4 style="color: #202020;font-family: Helvetica;font-size: 20px;font-weight: bold;line-height: 150%;margin: 0;padding: 0;text-align: center;">
38
- <a href="https://ithemes.com/category/wordpress-security/" target="_blank" style="-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;color: #0084CB;font-family: Helvetica;font-size: 16px;line-height: 150%;text-align: center;text-decoration: none;">{{ $articles }}</a>
39
  </h4>
40
- <br>
41
  <p style="-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;font-family: Helvetica;font-size: 16px;line-height: 150%;margin-top: 10px;margin-right: 0;margin-bottom: 10px;margin-left: 0;padding: 0;text-align: center;">{{ $articles_content }}</p>
42
  </td>
43
  </tr>
@@ -45,12 +44,13 @@
45
  <table class="container" align="right" border="0" cellpadding="0" cellspacing="0" width="260" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
46
  <tr>
47
  <td class="container-cell container-cell-bottom" valign="top" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;color: #808080;font-family: Helvetica;font-size: 16px;line-height: 150%;text-align: center;padding-bottom: 20px;">
48
- <img class="preserve-ratio" src="{! $video_icon }}" style="max-width: 61px;border: 0;outline: none;text-decoration: none;-ms-interpolation-mode: bicubic;height: auto;" width="61" alt="" align="center">
49
  <br>
50
  <h4 style="color: #202020;font-family: Helvetica;font-size: 20px;font-weight: bold;line-height: 150%;margin: 0;padding: 0;text-align: center;">
51
- <a href="https://ithemes.com/tutorial/category/ithemes-security/" target="_blank" style="-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;color: #0084CB;font-family: Helvetica;font-size: 16px;line-height: 150%;text-align: center;text-decoration: none;">{{ $tutorials }}</a>
 
 
52
  </h4>
53
- <br>
54
  <p style="-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;font-family: Helvetica;font-size: 16px;line-height: 150%;margin-top: 10px;margin-right: 0;margin-bottom: 10px;margin-left: 0;padding: 0;text-align: center;">{{ $tutorials_content }}</p>
55
  </td>
56
  </tr>
@@ -63,52 +63,6 @@
63
  </table>
64
  </td>
65
  </tr>
66
- <tr>
67
- <td class="divider" align="center" valign="top" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
68
- <table border="0" cellpadding="0" cellspacing="0" width="100%" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
69
- <tr>
70
- <td align="center" valign="top" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
71
- <table class="container" border="0" cellpadding="0" cellspacing="0" width="450" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
72
- <tr>
73
- <td class="section-padding" align="center" valign="top" width="450" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;padding-top: 20px;padding-right: 20px;padding-left: 20px;">
74
- <table class="divider-border" border="0" cellpadding="0" cellspacing="0" width="100%" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;border-top-width: 1px;border-top-style: solid;border-top-color: #E8E8E8;">
75
- <tr>
76
- <td class="container-cell" valign="top" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;color: #808080;font-family: Helvetica;font-size: 16px;line-height: 1px;text-align: center;padding-bottom: 20px;width: 450px;">
77
- &nbsp;
78
- </td>
79
- </tr>
80
- </table>
81
- </td>
82
- </tr>
83
- </table>
84
- </td>
85
- </tr>
86
- </table>
87
- </td>
88
- </tr>
89
- <tr>
90
- <td class="footer-heading" align="center" valign="top" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
91
- <table border="0" cellpadding="0" cellspacing="0" width="100%" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
92
- <tr>
93
- <td align="center" valign="top" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
94
- <table class="container" border="0" cellpadding="0" cellspacing="0" width="600" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
95
- <tr>
96
- <td class="section-padding" align="center" valign="top" width="600" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;padding-top: 20px;padding-right: 20px;padding-left: 20px;">
97
- <table border="0" cellpadding="0" cellspacing="0" width="100%" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
98
- <tr>
99
- <td class="container-cell" valign="top" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;color: #808080;font-family: Helvetica;font-size: 16px;line-height: 150%;text-align: center;padding-bottom: 20px;">
100
- <h2 style="color: #002030;font-family: Helvetica;font-size: 26px;font-weight: bold;line-height: 150%;margin: 0;padding: 0;text-align: center;">{{ $help_and_support }}</h2>
101
- </td>
102
- </tr>
103
- </table>
104
- </td>
105
- </tr>
106
- </table>
107
- </td>
108
- </tr>
109
- </table>
110
- </td>
111
- </tr>
112
  <tr>
113
  <td align="center" valign="top" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
114
  <table border="0" cellpadding="0" cellspacing="0" width="100%" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
@@ -120,12 +74,11 @@
120
  <table class="container" align="left" border="0" cellpadding="0" cellspacing="0" width="260" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
121
  <tr>
122
  <td class="container-cell" valign="top" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;color: #808080;font-family: Helvetica;font-size: 16px;line-height: 150%;text-align: center;padding-bottom: 20px;">
123
- <img class="preserve-ratio" src="{! $documentation_icon }}" style="max-width: 62px;border: 0;outline: none;text-decoration: none;-ms-interpolation-mode: bicubic;height: auto;" width="62" alt="" align="center">
124
  <br>
125
  <h4 style="color: #202020;font-family: Helvetica;font-size: 20px;font-weight: bold;line-height: 150%;margin: 0;padding: 0;text-align: center;">
126
- <a href="http://ithemes.com/codex/page/IThemes_Security" target="_blank" style="-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;color: #0084CB;font-family: Helvetica;font-size: 16px;line-height: 150%;text-align: center;text-decoration: none;">{{ $documentation }}</a>
127
  </h4>
128
- <br>
129
  <p style="-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;font-family: Helvetica;font-size: 16px;line-height: 150%;margin-top: 10px;margin-right: 0;margin-bottom: 10px;margin-left: 0;padding: 0;text-align: center;">{{ $documentation_content }}</p>
130
  </td>
131
  </tr>
@@ -133,13 +86,12 @@
133
  <table class="container" align="right" border="0" cellpadding="0" cellspacing="0" width="260" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
134
  <tr>
135
  <td class="container-cell container-cell-bottom" valign="top" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;color: #808080;font-family: Helvetica;font-size: 16px;line-height: 150%;text-align: center;padding-bottom: 20px;">
136
- <img class="preserve-ratio" src="{! $support_icon }}" style="max-width: 62px;border: 0;outline: none;text-decoration: none;-ms-interpolation-mode: bicubic;height: auto;" width="62" alt="" align="center">
137
  <br>
138
  <h4 style="color: #202020;font-family: Helvetica;font-size: 20px;font-weight: bold;line-height: 150%;margin: 0;padding: 0;text-align: center;">
139
- <a href="https://members.ithemes.com/panel/helpdesk.php" target="_blank" style="-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;color: #0084CB;font-family: Helvetica;font-size: 16px;line-height: 150%;text-align: center;text-decoration: none;">{{ $support }}</a>
140
  <span class="pro-flag" style="background-color: #FFCC00;color: #000000;font-size: 10px;display: inline-block;padding: 3px;line-height: 1;position: relative;bottom: 10px;text-transform: uppercase;">{{ $pro }}</span>
141
  </h4>
142
- <br>
143
  <p style="-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;font-family: Helvetica;font-size: 16px;line-height: 150%;margin-top: 10px;margin-right: 0;margin-bottom: 10px;margin-left: 0;padding: 0;text-align: center;">{{ $support_content }}</p>
144
  </td>
145
  </tr>
@@ -209,4 +161,4 @@
209
  </tr>
210
  </table>
211
  </td>
212
- </tr>
32
  <table class="container" align="left" border="0" cellpadding="0" cellspacing="0" width="260" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
33
  <tr>
34
  <td class="container-cell" valign="top" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;color: #808080;font-family: Helvetica;font-size: 16px;line-height: 150%;text-align: center;padding-bottom: 20px;">
35
+ <img class="preserve-ratio" src="{! $article_icon }}" style="margin-bottom: 10px;max-width: 61px;border: 0;outline: none;text-decoration: none;-ms-interpolation-mode: bicubic;height: auto;" width="61" alt="" align="center">
36
  <br>
37
  <h4 style="color: #202020;font-family: Helvetica;font-size: 20px;font-weight: bold;line-height: 150%;margin: 0;padding: 0;text-align: center;">
38
+ <a href="https://ithemes.com/blog/category/wordpress-security/?utm_source=sitescanemail&utm_medium=link&utm_campaign=itsecfreecta" target="_blank" style="-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;color: #0084CB;font-family: Helvetica;font-size: 16px;line-height: 150%;text-align: center;text-decoration: none;">{{ $articles }}</a>
39
  </h4>
 
40
  <p style="-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;font-family: Helvetica;font-size: 16px;line-height: 150%;margin-top: 10px;margin-right: 0;margin-bottom: 10px;margin-left: 0;padding: 0;text-align: center;">{{ $articles_content }}</p>
41
  </td>
42
  </tr>
44
  <table class="container" align="right" border="0" cellpadding="0" cellspacing="0" width="260" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
45
  <tr>
46
  <td class="container-cell container-cell-bottom" valign="top" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;color: #808080;font-family: Helvetica;font-size: 16px;line-height: 150%;text-align: center;padding-bottom: 20px;">
47
+ <img class="preserve-ratio" src="{! $video_icon }}" style="margin-bottom: 10px;max-width: 61px;border: 0;outline: none;text-decoration: none;-ms-interpolation-mode: bicubic;height: auto;" width="61" alt="" align="center">
48
  <br>
49
  <h4 style="color: #202020;font-family: Helvetica;font-size: 20px;font-weight: bold;line-height: 150%;margin: 0;padding: 0;text-align: center;">
50
+ <a href="https://ithemes.com/tutorial/category/ithemes-security/?utm_source=sitescanemail&utm_medium=link&utm_campaign=itsecfreecta" target="_blank" style="-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;color: #0084CB;font-family: Helvetica;font-size: 16px;line-height: 150%;text-align: center;text-decoration: none;">
51
+ {{ $tutorials }}
52
+ </a>
53
  </h4>
 
54
  <p style="-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;font-family: Helvetica;font-size: 16px;line-height: 150%;margin-top: 10px;margin-right: 0;margin-bottom: 10px;margin-left: 0;padding: 0;text-align: center;">{{ $tutorials_content }}</p>
55
  </td>
56
  </tr>
63
  </table>
64
  </td>
65
  </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
66
  <tr>
67
  <td align="center" valign="top" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
68
  <table border="0" cellpadding="0" cellspacing="0" width="100%" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
74
  <table class="container" align="left" border="0" cellpadding="0" cellspacing="0" width="260" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
75
  <tr>
76
  <td class="container-cell" valign="top" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;color: #808080;font-family: Helvetica;font-size: 16px;line-height: 150%;text-align: center;padding-bottom: 20px;">
77
+ <img class="preserve-ratio" src="{! $documentation_icon }}" style="margin-bottom: 10px;max-width: 62px;border: 0;outline: none;text-decoration: none;-ms-interpolation-mode: bicubic;height: auto;" width="62" alt="" align="center">
78
  <br>
79
  <h4 style="color: #202020;font-family: Helvetica;font-size: 20px;font-weight: bold;line-height: 150%;margin: 0;padding: 0;text-align: center;">
80
+ <a href="https://help.ithemes.com/hc/en-us/categories/200147050" target="_blank" style="-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;color: #0084CB;font-family: Helvetica;font-size: 16px;line-height: 150%;text-align: center;text-decoration: none;">{{ $documentation }}</a>
81
  </h4>
 
82
  <p style="-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;font-family: Helvetica;font-size: 16px;line-height: 150%;margin-top: 10px;margin-right: 0;margin-bottom: 10px;margin-left: 0;padding: 0;text-align: center;">{{ $documentation_content }}</p>
83
  </td>
84
  </tr>
86
  <table class="container" align="right" border="0" cellpadding="0" cellspacing="0" width="260" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
87
  <tr>
88
  <td class="container-cell container-cell-bottom" valign="top" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;color: #808080;font-family: Helvetica;font-size: 16px;line-height: 150%;text-align: center;padding-bottom: 20px;">
89
+ <img class="preserve-ratio" src="{! $support_icon }}" style="margin-bottom: 10px;max-width: 62px;border: 0;outline: none;text-decoration: none;-ms-interpolation-mode: bicubic;height: auto;" width="62" alt="" align="center">
90
  <br>
91
  <h4 style="color: #202020;font-family: Helvetica;font-size: 20px;font-weight: bold;line-height: 150%;margin: 0;padding: 0;text-align: center;">
92
+ <a href="https://members.ithemes.com/panel/helpdesk.php?utm_source=sitescanemail&utm_medium=link&utm_campaign=itsecfreecta" target="_blank" style="-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;color: #0084CB;font-family: Helvetica;font-size: 16px;line-height: 150%;text-align: center;text-decoration: none;">{{ $support }}</a>
93
  <span class="pro-flag" style="background-color: #FFCC00;color: #000000;font-size: 10px;display: inline-block;padding: 3px;line-height: 1;position: relative;bottom: 10px;text-transform: uppercase;">{{ $pro }}</span>
94
  </h4>
 
95
  <p style="-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;font-family: Helvetica;font-size: 16px;line-height: 150%;margin-top: 10px;margin-right: 0;margin-bottom: 10px;margin-left: 0;padding: 0;text-align: center;">{{ $support_content }}</p>
96
  </td>
97
  </tr>
161
  </tr>
162
  </table>
163
  </td>
164
+ </tr>
core/lib/mail-templates/header.html CHANGED
@@ -27,7 +27,7 @@
27
 
28
  h1,h2,h3,h4,h5,h6{color:#202020;font-family:Helvetica;font-size:20px;font-weight:bold;line-height:150%;margin:0;padding:0;text-align:center;}
29
  p{font-family:Helvetica;font-size:16px;line-height:150%;margin-top:10px;margin-right:0;margin-bottom:10px;margin-left:0;padding:0;text-align:center;}
30
- a{color:#0084CB;font-family:Helvetica;font-size:16px;line-height:150%;text-align:center;text-decoration:none;}
31
  img{height:auto;}
32
 
33
  body,#body-table{background-color:#FFFFFF;}
27
 
28
  h1,h2,h3,h4,h5,h6{color:#202020;font-family:Helvetica;font-size:20px;font-weight:bold;line-height:150%;margin:0;padding:0;text-align:center;}
29
  p{font-family:Helvetica;font-size:16px;line-height:150%;margin-top:10px;margin-right:0;margin-bottom:10px;margin-left:0;padding:0;text-align:center;}
30
+ a{color:#0084CB;font-family:Helvetica;font-size:16px;line-height:150%;text-align:center;text-decoration:underline;}
31
  img{height:auto;}
32
 
33
  body,#body-table{background-color:#FFFFFF;}
core/lib/mail-templates/large-text.html CHANGED
@@ -1,23 +1,31 @@
 
 
 
 
 
 
 
 
 
 
1
  <tr>
2
- <td class="large-text" align="center" valign="top" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
3
- <table border="0" cellpadding="0" cellspacing="0" width="100%" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
 
 
4
  <tr>
5
- <td align="center" valign="top" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
6
- <table class="container" border="0" cellpadding="0" cellspacing="0" width="600" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
7
- <tr>
8
- <td class="section-padding" align="center" valign="top" width="600" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;padding-top: 20px;padding-right: 20px;padding-left: 20px;">
9
- <table border="0" cellpadding="0" cellspacing="0" width="100%" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
10
- <tr>
11
- <td class="container-cell" valign="top" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;color: #808080;font-family: Helvetica;font-size: 16px;line-height: 150%;text-align: center;padding-bottom: 20px;">
12
- <h4 style="color: #505050;font-family: Helvetica;font-size: 20px;font-weight: bold;line-height: 150%;margin: 0;padding: 0;text-align: center;margin-bottom: 10px;">{{ $content }}</h4>
13
- </td>
14
- </tr>
15
- </table>
16
- </td>
17
- </tr>
18
- </table>
19
  </td>
20
  </tr>
21
  </table>
22
  </td>
23
  </tr>
 
 
 
 
 
 
1
+ <tr>
2
+ <td class="large-text" align="center" valign="top"
3
+ style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
4
+ <table border="0" cellpadding="0" cellspacing="0" width="100%"
5
+ style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
6
+ <tr>
7
+ <td align="center" valign="top"
8
+ style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
9
+ <table class="container" border="0" cellpadding="0" cellspacing="0" width="600"
10
+ style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
11
  <tr>
12
+ <td class="section-padding" align="center" valign="top" width="600"
13
+ style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;padding-top: 20px;padding-right: 20px;padding-left: 20px;">
14
+ <table border="0" cellpadding="0" cellspacing="0" width="100%"
15
+ style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
16
  <tr>
17
+ <td class="container-cell" valign="top"
18
+ style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;color: #808080;font-family: Helvetica;font-size: 16px;line-height: 150%;text-align: center;padding-bottom: 20px;">
19
+ <h4 style="color: #002338;font-family: Helvetica;font-size: 28px;font-weight: bold;line-height: 150%;margin: 0;padding: 0;text-align: center;margin-bottom: 10px;">
20
+ {{ $content }}</h4>
 
 
 
 
 
 
 
 
 
 
21
  </td>
22
  </tr>
23
  </table>
24
  </td>
25
  </tr>
26
+ </table>
27
+ </td>
28
+ </tr>
29
+ </table>
30
+ </td>
31
+ </tr>
core/lib/mail-templates/pro-callout.html CHANGED
@@ -17,7 +17,7 @@
17
  <table class="module-button" border="0" cellspacing="0" cellpadding="0" align="center" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
18
  <tr>
19
  <td class="border-radius" align="center" bgcolor="#FFCD08" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;-webkit-border-radius: 5px;-moz-border-radius: 5px;border-radius: 5px;">
20
- <a href="https://ithemes.com/security/#plugin-pricing" target="_blank" class="border-radius" style="-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;color: #2E280E;font-family: Helvetica;font-size: 30px;line-height: 100%;text-align: center;text-decoration: none;background-color: #FFCD08;border: 1px solid #FFCD08;display: inline-block;font-weight: bold;padding-top: 20px;padding-right: 30px;padding-bottom: 20px;padding-left: 30px;-webkit-border-radius: 5px;-moz-border-radius: 5px;border-radius: 5px;">{{ $get_pro }}</a>
21
  </td>
22
  </tr>
23
  </table>
17
  <table class="module-button" border="0" cellspacing="0" cellpadding="0" align="center" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
18
  <tr>
19
  <td class="border-radius" align="center" bgcolor="#FFCD08" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;-webkit-border-radius: 5px;-moz-border-radius: 5px;border-radius: 5px;">
20
+ <a href="https://ithemes.com/security/?utm_source=email&utm_medium=notification&utm_campaign=itsecfreecta" target="_blank" class="border-radius" style="-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;color: #2E280E;font-family: Helvetica;font-size: 30px;line-height: 100%;text-align: center;text-decoration: none;background-color: #FFCD08;border: 1px solid #FFCD08;display: inline-block;font-weight: bold;padding-top: 20px;padding-right: 30px;padding-bottom: 20px;padding-left: 30px;-webkit-border-radius: 5px;-moz-border-radius: 5px;border-radius: 5px;">{{ $get_pro }}</a>
21
  </td>
22
  </tr>
23
  </table>
core/lib/mail-templates/section-heading.html CHANGED
@@ -1,25 +1,32 @@
 
 
 
 
 
 
 
 
 
 
1
  <tr>
2
- <td class="section-heading" align="center" valign="top" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
3
- <table border="0" cellpadding="0" cellspacing="0" width="100%" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
 
 
4
  <tr>
5
- <td align="center" valign="top" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
6
- <table class="container" border="0" cellpadding="0" cellspacing="0" width="600" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
7
- <tr>
8
- <td class="section-padding" align="center" valign="top" width="600" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;padding-top: 20px;padding-right: 20px;padding-left: 20px;">
9
- <table border="0" cellpadding="0" cellspacing="0" width="100%" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
10
- <tr>
11
- <td class="container-cell" valign="top" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;color: #808080;font-family: Helvetica;font-size: 16px;line-height: 150%;text-align: center;padding-bottom: 0;">
12
- <h4 style="color: #0084CB;font-family: Helvetica;font-size: 16px;font-weight: bold;line-height: 150%;margin: 0;padding: 0;text-align: center;">
13
- {{ $content }}
14
- </h4>
15
- </td>
16
- </tr>
17
- </table>
18
- </td>
19
- </tr>
20
- </table>
21
  </td>
22
  </tr>
23
  </table>
24
  </td>
25
  </tr>
 
 
 
 
 
 
1
+ <tr>
2
+ <td class="section-heading" align="center" valign="top"
3
+ style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
4
+ <table border="0" cellpadding="0" cellspacing="0" width="100%"
5
+ style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
6
+ <tr>
7
+ <td align="center" valign="top"
8
+ style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
9
+ <table class="container" border="0" cellpadding="0" cellspacing="0" width="600"
10
+ style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
11
  <tr>
12
+ <td class="section-padding" align="center" valign="top" width="600"
13
+ style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;padding-top: 20px;padding-right: 20px;padding-left: 20px;">
14
+ <table border="0" cellpadding="0" cellspacing="0" width="100%"
15
+ style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
16
  <tr>
17
+ <td class="container-cell" valign="top"
18
+ style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;color: #808080;font-family: Helvetica;font-size: 16px;line-height: 150%;text-align: center;padding-bottom: 0;">
19
+ <h4 style="color: #002338;font-family: Helvetica;font-size: 18px;font-weight: bold;line-height: 150%;margin: 0;padding: 0;text-align: center;">
20
+ {{ $content }}
21
+ </h4>
 
 
 
 
 
 
 
 
 
 
 
22
  </td>
23
  </tr>
24
  </table>
25
  </td>
26
  </tr>
27
+ </table>
28
+ </td>
29
+ </tr>
30
+ </table>
31
+ </td>
32
+ </tr>
core/lib/mail-templates/site-scanner-pro-callout.html ADDED
@@ -0,0 +1,167 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <tr>
2
+ <td class="footer-heading" align="center" valign="top"
3
+ style="background-color: #F2F3F8;border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
4
+ <table border="0" cellpadding="0" cellspacing="0" width="100%"
5
+ style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
6
+ <tr>
7
+ <td align="center" valign="top"
8
+ style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
9
+ <table class="container" border="0" cellpadding="0" cellspacing="0" width="880"
10
+ style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
11
+ <tr>
12
+ <td class="section-padding" align="center" valign="top" width="880"
13
+ style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;padding-top: 40px;padding-right: 20px;padding-left: 20px;">
14
+ <table border="0" cellpadding="0" cellspacing="0" width="100%"
15
+ style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
16
+ <tr>
17
+ <td class="container-cell" valign="top"
18
+ style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;color: #808080;font-family: Helvetica;font-size: 16px;line-height: 150%;text-align: center;padding-bottom: 0;">
19
+ <h2 style="color: #002030;font-family: Helvetica;font-size: 26px;font-weight: bold;line-height: 150%;margin: 0;padding: 0;text-align: center;">{{ $title }}</h2>
20
+ </td>
21
+ </tr>
22
+ </table>
23
+ </td>
24
+ </tr>
25
+ </table>
26
+ </td>
27
+ </tr>
28
+ </table>
29
+ </td>
30
+ </tr>
31
+ <tr>
32
+ <td align="center" valign="top"
33
+ style="background-color: #F2F3F8;border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
34
+ <table border="0" cellpadding="0" cellspacing="0" width="100%"
35
+ style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
36
+ <tr>
37
+ <td align="center" valign="top"
38
+ style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
39
+ <table class="container" border="0" cellpadding="0" cellspacing="0" width="600"
40
+ style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
41
+ <tr>
42
+ <td class="section-padding" align="center" valign="top" width="600"
43
+ style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;padding-top: 20px;padding-right: 20px;padding-left: 20px;">
44
+ <table border="0" cellpadding="0" cellspacing="0" width="100%"
45
+ style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
46
+ <tr>
47
+ <td class="container-cell" valign="top"
48
+ style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;color: #002338;font-family: Helvetica;font-size: 16px;line-height: 150%;text-align: center;padding-bottom: 20px;">
49
+ {{ $content }}
50
+ </td>
51
+ </tr>
52
+ </table>
53
+ </td>
54
+ </tr>
55
+ </table>
56
+ </td>
57
+ </tr>
58
+ </table>
59
+ </td>
60
+ </tr>
61
+ <tr>
62
+ <td align="center" valign="top"
63
+ style="background-color: #F2F3F8;border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
64
+ <table border="0" cellpadding="0" cellspacing="0" width="100%"
65
+ style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
66
+ <tr>
67
+ <td align="center" valign="top"
68
+ style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
69
+ <table class="container" border="0" cellpadding="0" cellspacing="0" width="660"
70
+ style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
71
+ <tr>
72
+ <td class="section-padding" valign="top" width="660"
73
+ style="height: 0;border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
74
+ <table class="container" align="left" border="0" cellpadding="0" cellspacing="0" width="300"
75
+ style="height: 100%;margin-right: 10px; background-color: #002338;border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
76
+ <tr>
77
+ <td class="container-cell" valign="top"
78
+ style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;color: #FFFFFF;font-family: Helvetica;font-size: 16px;line-height: 150%;text-align: left;padding: 20px;">
79
+ {{ $first_box }}
80
+ </td>
81
+ </tr>
82
+ </table>
83
+ <table class="container" align="right" border="0" cellpadding="0" cellspacing="0" width="300"
84
+ style="height: 100%;margin-left: 10px;background-color: #002338;border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
85
+ <tr>
86
+ <td class="container-cell container-cell-bottom" valign="top"
87
+ style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;color: #FFFFFF;font-family: Helvetica;font-size: 16px;line-height: 150%;text-align: left;padding: 20px;">
88
+ {{ $second_box }}
89
+ </td>
90
+ </tr>
91
+ </table>
92
+ </td>
93
+ </tr>
94
+ </table>
95
+ </td>
96
+ </tr>
97
+ </table>
98
+ </td>
99
+ </tr>
100
+ <tr>
101
+ <td align="center" valign="top"
102
+ style="background-color: #F2F3F8;border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
103
+ <table border="0" cellpadding="0" cellspacing="0" width="100%"
104
+ style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
105
+ <tr>
106
+ <td align="center" valign="top"
107
+ style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
108
+ <table class="container" border="0" cellpadding="0" cellspacing="0" width="660"
109
+ style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
110
+ <tr>
111
+ <td class="section-padding" valign="top" width="660"
112
+ style="height: 0;border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
113
+ <table class="container" align="left" border="0" cellpadding="0" cellspacing="0" width="300"
114
+ style="height: 100%;margin-right: 10px; background-color: #002338;border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
115
+ <tr>
116
+ <td class="container-cell" valign="top"
117
+ style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;color: #FFFFFF;font-family: Helvetica;font-size: 16px;line-height: 150%;text-align: left;padding: 20px;">
118
+ {{ $third_box }}
119
+ </td>
120
+ </tr>
121
+ </table>
122
+ <table class="container" align="right" border="0" cellpadding="0" cellspacing="0" width="300"
123
+ style="height: 100%;margin-left: 10px;background-color: #002338;border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
124
+ <tr>
125
+ <td class="container-cell container-cell-bottom" valign="top"
126
+ style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;color: #FFFFFF;font-family: Helvetica;font-size: 16px;line-height: 150%;text-align: left;padding: 20px;">
127
+ {{ $fourth_box }}
128
+ </td>
129
+ </tr>
130
+ </table>
131
+ </td>
132
+ </tr>
133
+ </table>
134
+ </td>
135
+ </tr>
136
+ </table>
137
+ </td>
138
+ </tr>
139
+ <tr>
140
+ <td align="center" valign="top" style="background-color: #F2F3F8;border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
141
+ <table border="0" cellpadding="0" cellspacing="0" width="100%" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
142
+ <tr>
143
+ <td align="center" valign="top" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
144
+ <table class="container" border="0" cellpadding="0" cellspacing="0" width="600" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
145
+ <tr>
146
+ <td class="section-padding section-padding-bottom" align="center" valign="top" width="600" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;padding-top: 40px;padding-right: 20px;padding-left: 20px;padding-bottom: 40px;">
147
+ <table width="100%" border="0" cellspacing="0" cellpadding="0" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
148
+ <tr>
149
+ <td style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
150
+ <table class="module-button" border="0" cellspacing="0" cellpadding="0" align="center" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
151
+ <tr>
152
+ <td class="border-radius" align="center" bgcolor="{{ $bk_color }}" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;-webkit-border-radius: 5px;-moz-border-radius: 5px;border-radius: 5px;">
153
+ <a class="border-radius" href="{{ $href }}" target="_blank" style="-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;color: {{ $txt_color }};font-family: Helvetica;font-size: 24px;line-height: 100%;text-align: center;text-decoration: none;background-color: {{ $bk_color }};border: 1px solid {{ $bk_color }};display: inline-block;font-weight: normal;padding-top: 20px;padding-right: 40px;padding-bottom: 20px;padding-left: 40px;-webkit-border-radius: 5px;-moz-border-radius: 5px;border-radius: 5px;">{{ $link_text }}</a>
154
+ </td>
155
+ </tr>
156
+ </table>
157
+ </td>
158
+ </tr>
159
+ </table>
160
+ </td>
161
+ </tr>
162
+ </table>
163
+ </td>
164
+ </tr>
165
+ </table>
166
+ </td>
167
+ </tr>
core/lib/mail-templates/text.html CHANGED
@@ -1,23 +1,29 @@
 
 
 
 
 
 
 
 
 
1
  <tr>
2
- <td align="center" valign="top" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
3
- <table border="0" cellpadding="0" cellspacing="0" width="100%" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
 
 
4
  <tr>
5
- <td align="center" valign="top" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
6
- <table class="container" border="0" cellpadding="0" cellspacing="0" width="600" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
7
- <tr>
8
- <td class="section-padding" align="center" valign="top" width="600" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;padding-top: 20px;padding-right: 20px;padding-left: 20px;">
9
- <table border="0" cellpadding="0" cellspacing="0" width="100%" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
10
- <tr>
11
- <td class="container-cell" valign="top" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;color: #808080;font-family: Helvetica;font-size: 16px;line-height: 150%;text-align: center;padding-bottom: 20px;">
12
- {{ $content }}
13
- </td>
14
- </tr>
15
- </table>
16
- </td>
17
- </tr>
18
- </table>
19
  </td>
20
  </tr>
21
  </table>
22
  </td>
23
  </tr>
 
 
 
 
 
 
1
+ <tr>
2
+ <td align="center" valign="top" style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
3
+ <table border="0" cellpadding="0" cellspacing="0" width="100%"
4
+ style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
5
+ <tr>
6
+ <td align="center" valign="top"
7
+ style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
8
+ <table class="container" border="0" cellpadding="0" cellspacing="0" width="600"
9
+ style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
10
  <tr>
11
+ <td class="section-padding" align="center" valign="top" width="600"
12
+ style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;padding-top: 20px;padding-right: 20px;padding-left: 20px;">
13
+ <table border="0" cellpadding="0" cellspacing="0" width="100%"
14
+ style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
15
  <tr>
16
+ <td class="container-cell" valign="top"
17
+ style="border-collapse: collapse;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;color: {{ $color }};font-family: Helvetica;font-size: 16px;line-height: 150%;text-align: center;padding-bottom: 20px;">
18
+ {{ $content }}
 
 
 
 
 
 
 
 
 
 
 
19
  </td>
20
  </tr>
21
  </table>
22
  </td>
23
  </tr>
24
+ </table>
25
+ </td>
26
+ </tr>
27
+ </table>
28
+ </td>
29
+ </tr>
core/lib/rest/Modules_Controller.php CHANGED
@@ -189,6 +189,10 @@ final class Modules_Controller extends \WP_REST_Controller {
189
  if ( rest_is_field_included( 'settings.onboard', $fields ) ) {
190
  $data['settings']['onboard'] = $item->get_onboard_settings();
191
  }
 
 
 
 
192
  }
193
 
194
  $data = $this->add_additional_fields_to_object( $data, $request );
@@ -389,7 +393,14 @@ final class Modules_Controller extends \WP_REST_Controller {
389
  'items' => [
390
  'type' => 'string',
391
  ],
392
- ]
 
 
 
 
 
 
 
393
  ],
394
  'context' => [ 'edit' ],
395
  'readonly' => true,
189
  if ( rest_is_field_included( 'settings.onboard', $fields ) ) {
190
  $data['settings']['onboard'] = $item->get_onboard_settings();
191
  }
192
+
193
+ if ( rest_is_field_included( 'settings.import', $fields ) ) {
194
+ $data['settings']['import'] = $item->get_import_settings();
195
+ }
196
  }
197
 
198
  $data = $this->add_additional_fields_to_object( $data, $request );
393
  'items' => [
394
  'type' => 'string',
395
  ],
396
+ ],
397
+ 'import' => [
398
+ 'description' => __( 'List of settings to display when importing.', 'better-wp-security' ),
399
+ 'type' => 'array',
400
+ 'items' => [
401
+ 'type' => 'string',
402
+ ],
403
+ ],
404
  ],
405
  'context' => [ 'edit' ],
406
  'readonly' => true,
core/lib/settings.php CHANGED
@@ -1,5 +1,7 @@
1
  <?php
2
 
 
 
3
  use iThemesSecurity\Module_Config;
4
  use iThemesSecurity\User_Groups;
5
 
@@ -213,29 +215,16 @@ abstract class ITSEC_Settings {
213
 
214
  protected function after_save() { }
215
 
216
- protected function handle_settings_changes( $old_settings ) {
217
- $user_group_settings = ITSEC_Modules::get_container()->get( User_Groups\Settings_Registry::class );
218
-
219
- foreach ( $user_group_settings->get_settings() as $user_group_setting ) {
220
- if ( $user_group_setting->get_module() !== $this->get_id() ) {
221
- continue;
222
- }
223
-
224
- $current = ITSEC_Lib::array_get( $this->settings, $user_group_setting->get_setting() );
225
- $previous = ITSEC_Lib::array_get( $old_settings, $user_group_setting->get_setting() );
226
-
227
- if ( $previous !== $current ) {
228
- ITSEC_Response::add_store_dispatch( 'ithemes-security/user-groups', 'fetchGroupsSettings' );
229
- break;
230
- }
231
- }
232
- }
233
 
234
  public function export() {
 
 
235
  return $this->settings;
236
  }
237
 
238
  public function import( $settings ) {
 
239
  $this->set_all( $settings );
240
  }
241
 
1
  <?php
2
 
3
+ use iThemesSecurity\Import_Export\Export\Export;
4
+ use iThemesSecurity\Import_Export\Import\Import_Context;
5
  use iThemesSecurity\Module_Config;
6
  use iThemesSecurity\User_Groups;
7
 
215
 
216
  protected function after_save() { }
217
 
218
+ protected function handle_settings_changes( $old_settings ) {}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
219
 
220
  public function export() {
221
+ _deprecated_function( __METHOD__, '7.1' );
222
+
223
  return $this->settings;
224
  }
225
 
226
  public function import( $settings ) {
227
+ _deprecated_function( __METHOD__, '7.1' );
228
  $this->set_all( $settings );
229
  }
230
 
core/lib/validator.php CHANGED
@@ -46,6 +46,10 @@ abstract class ITSEC_Validator {
46
  $this->settings = $settings;
47
  $this->previous_settings = ITSEC_Modules::get_settings( $this->get_id() );
48
 
 
 
 
 
49
  $this->sanitize_settings();
50
 
51
  if ( $this->run_validate_matching_fields ) {
46
  $this->settings = $settings;
47
  $this->previous_settings = ITSEC_Modules::get_settings( $this->get_id() );
48
 
49
+ $this->can_save = true;
50
+ $this->errors = [];
51
+ $this->messages = [];
52
+
53
  $this->sanitize_settings();
54
 
55
  if ( $this->run_validate_matching_fields ) {
core/lockout.php CHANGED
@@ -787,9 +787,11 @@ final class ITSEC_Lockout {
787
  $message = apply_filters( "itsec_{$slug}_lockout_message", $message, $context );
788
  }
789
 
 
 
790
  $current_user = wp_get_current_user();
791
 
792
- if ( is_object( $current_user ) && isset( $current_user->ID ) ) {
793
  wp_logout();
794
  }
795
 
787
  $message = apply_filters( "itsec_{$slug}_lockout_message", $message, $context );
788
  }
789
 
790
+ wp_clear_auth_cookie();
791
+
792
  $current_user = wp_get_current_user();
793
 
794
+ if ( $current_user instanceof WP_User && $current_user->exists() ) {
795
  wp_logout();
796
  }
797
 
core/module-schema.json CHANGED
@@ -436,56 +436,100 @@
436
  "type": "string"
437
  }
438
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
439
  "requirements": {
440
  "type": "object",
441
  "properties": {
442
  "ssl": {
443
  "$ref": "#/definitions/requirement"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
444
  }
445
  },
446
  "additionalProperties": false
447
- }
448
- },
449
- "feature-flags": {
450
- "description": "List of feature flags the module provides.",
451
- "type": "object",
452
- "additionalProperties": {
453
  "type": "object",
454
- "properties": {
455
- "rate": {
456
- "type": "integer",
457
- "minimum": 0,
458
- "maximum": 100
459
- },
460
- "remote": {
461
- "type": "boolean"
462
- },
463
- "title": {
464
- "type": "string"
465
- },
466
- "description": {
467
- "type": "string"
468
- },
469
- "documentation": {
470
- "type": "string",
471
- "format": "uri"
472
- },
473
- "requirements": {
474
  "type": "object",
475
- "additionalProperties": false,
476
  "properties": {
477
- "version": {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
478
  "type": "object",
479
- "required": [
480
- "pro",
481
- "free"
482
- ],
483
  "properties": {
484
- "pro": {
485
- "type": "string"
486
- },
487
- "free": {
488
- "type": "string"
 
 
 
 
 
 
 
 
 
489
  }
490
  }
491
  }
436
  "type": "string"
437
  }
438
  },
439
+ "import-export": {
440
+ "type": "object",
441
+ "additionalProperties": false,
442
+ "properties": {
443
+ "import-settings": {
444
+ "description": "List of settings to present in the import sequence.",
445
+ "type": "array",
446
+ "uniqueItems": true,
447
+ "items": {
448
+ "type": "string"
449
+ }
450
+ },
451
+ "exclude-settings": {
452
+ "description": "List of settings to exclude from exports.",
453
+ "type": "array",
454
+ "uniqueItems": true,
455
+ "items": {
456
+ "type": "string"
457
+ }
458
+ }
459
+ }
460
+ },
461
  "requirements": {
462
  "type": "object",
463
  "properties": {
464
  "ssl": {
465
  "$ref": "#/definitions/requirement"
466
+ },
467
+ "feature-flags": {
468
+ "type": "object",
469
+ "allOf": [
470
+ {
471
+ "$ref": "#/definitions/requirement"
472
+ },
473
+ {
474
+ "type": "object",
475
+ "properties": {
476
+ "flags": {
477
+ "type": "array",
478
+ "items": {
479
+ "type": "string"
480
+ }
481
+ }
482
+ }
483
+ }
484
+ ]
485
  }
486
  },
487
  "additionalProperties": false
488
+ },
489
+ "feature-flags": {
490
+ "description": "List of feature flags the module provides.",
 
 
 
491
  "type": "object",
492
+ "additionalProperties": false,
493
+ "patternProperties": {
494
+ "^\\w+$": {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
495
  "type": "object",
 
496
  "properties": {
497
+ "rate": {
498
+ "type": "integer",
499
+ "minimum": 0,
500
+ "maximum": 100
501
+ },
502
+ "remote": {
503
+ "type": "boolean"
504
+ },
505
+ "title": {
506
+ "type": "string"
507
+ },
508
+ "description": {
509
+ "type": "string"
510
+ },
511
+ "documentation": {
512
+ "type": "string",
513
+ "format": "uri"
514
+ },
515
+ "requirements": {
516
  "type": "object",
517
+ "additionalProperties": false,
 
 
 
518
  "properties": {
519
+ "version": {
520
+ "type": "object",
521
+ "required": [
522
+ "pro",
523
+ "free"
524
+ ],
525
+ "properties": {
526
+ "pro": {
527
+ "type": "string"
528
+ },
529
+ "free": {
530
+ "type": "string"
531
+ }
532
+ }
533
  }
534
  }
535
  }
core/modules.php CHANGED
@@ -2,12 +2,17 @@
2
 
3
  use iThemesSecurity\Config_Settings;
4
  use iThemesSecurity\Config_Validator;
 
5
  use iThemesSecurity\Contracts\Runnable;
6
  use iThemesSecurity\Exception\Unsatisfied_Module_Dependencies_Exception;
 
 
 
7
  use iThemesSecurity\Module_Config;
8
  use Pimple\Container;
 
9
 
10
- final class ITSEC_Modules {
11
  const DEPRECATED = [
12
  'settings-page.php' => '7.0.0',
13
  ];
@@ -42,7 +47,7 @@ final class ITSEC_Modules {
42
  /** @var Container */
43
  private $pimple;
44
 
45
- /** @var Psr\Container\ContainerInterface */
46
  private $container;
47
 
48
  /** @var bool */
@@ -53,6 +58,8 @@ final class ITSEC_Modules {
53
 
54
  $this->pimple = new Container();
55
  $this->container = new Pimple\Psr11\Container( $this->pimple );
 
 
56
  }
57
 
58
  /**
@@ -75,11 +82,10 @@ final class ITSEC_Modules {
75
  *
76
  * @param string $slug The unique slug to use for the module.
77
  * @param string $path The absolute path to the module.
78
- * @param string $type [optional] 'always-active', 'default-active', 'default-inactive' (default)
79
  *
80
  * @return bool True on success, false otherwise.
81
  */
82
- public static function register_module( $slug, $path, $type = 'default-inactive' ) {
83
  $self = self::get_instance();
84
  $slug = sanitize_title_with_dashes( $slug );
85
 
@@ -89,45 +95,47 @@ final class ITSEC_Modules {
89
  return false;
90
  }
91
 
92
- if ( file_exists( $path . '/module.json' ) ) {
93
- $json = file_get_contents( $path . '/module.json' );
94
 
95
- if ( ! $json ) {
96
- trigger_error( sprintf( __( 'An attempt to register the %1$s module failed because it\'s configuration file is empty.', 'better-wp-security' ), $slug ) );
97
 
98
- return false;
99
- }
100
 
101
- $config = json_decode( $json, true );
 
102
 
103
- if ( ITSEC_Core::is_development() && ( $valid = static::validate_module_config( $config ) ) !== true ) {
104
- trigger_error( wp_sprintf( __( 'An attempt to register the %1$s module failed because it has an invalid configuration: %2$l', 'better-wp-security' ), $slug, ITSEC_Lib::get_error_strings( $valid ) ) );
105
 
106
- return false;
107
- }
 
 
108
 
109
- $config = new Module_Config( $config );
110
- $type = $config->get_status();
111
 
112
- $self->module_config[ $slug ] = $config;
 
113
 
114
- if ( $extends = $config->get_extends() ) {
115
- $extends = self::get_config( $extends );
116
 
117
- if ( ! $extends && ITSEC_Core::is_development() ) {
118
- trigger_error( wp_sprintf( __( 'An attempt to register the %1$s module failed because it extends a non-registered module: %2$l', 'better-wp-security' ), $slug, $config->get_extends() ) );
119
 
120
- return false;
121
- }
 
 
 
122
 
123
- $self->module_config[ $extends->get_id() ] = $extends->extend( $config );
124
 
125
- if ( $config->get_status() === 'inherit' ) {
126
- $self->inherited_modules[ $slug ] = true;
127
- }
128
  }
129
- } else {
130
- _doing_it_wrong( __METHOD__, sprintf( __( 'Registering a module without a module.json definition is deprecated. Module: %s.', 'better-wp-security' ), $slug ), '7.0.0' );
131
  }
132
 
133
  $self->_module_paths[ $slug ] = $path;
@@ -139,6 +147,11 @@ final class ITSEC_Modules {
139
  $self->_default_active_modules[ $slug ] = true;
140
  }
141
 
 
 
 
 
 
142
  return true;
143
  }
144
 
@@ -159,12 +172,12 @@ final class ITSEC_Modules {
159
  unset(
160
  $self->_module_paths[ $slug ],
161
  $self->module_config[ $slug ],
162
- $self->inherited_modules[ $slug ]
 
 
163
  );
164
  $self->_available_modules = array_keys( $self->_module_paths );
165
 
166
- unset( $self->_always_active_modules[ $slug ], $self->_default_active_modules[ $slug ] );
167
-
168
  return true;
169
  }
170
 
@@ -563,9 +576,10 @@ final class ITSEC_Modules {
563
  /**
564
  * Activate a single module using its ID
565
  *
566
- * @param string $module_id The ID of the module to activate
567
- * @param array $args Additional arguments to customize behavior.
568
- * @type bool $ignore_requirements Whether to skip evaluating module requirements.
 
569
  *
570
  * @return bool|WP_Error If the module can be activated, true if it was previously active and false if it was
571
  * previously inactive. If the module cannot be activated, a WP_Error object is returned.
@@ -787,13 +801,14 @@ final class ITSEC_Modules {
787
  if ( ITSEC_Core::is_temp_disable_modules_set() ) {
788
  $modules = array();
789
  } else {
790
- $modules = array_filter( self::get_active_modules(), function ( $module ) {
791
- return ! self::validate_module_requirements( $module, 'run' )->has_errors();
792
- } );
793
  }
794
 
795
  $modules = array_merge( $modules, array_keys( self::get_instance()->_always_active_modules ) );
796
  $modules = array_unique( $modules );
 
 
 
797
 
798
  foreach ( self::get_instance()->inherited_modules as $slug => $_ ) {
799
  if ( self::is_active( self::get_config( $slug )->get_extends() ) ) {
@@ -821,10 +836,6 @@ final class ITSEC_Modules {
821
  $load( self::get_instance()->pimple );
822
  }
823
 
824
- foreach ( self::get_active_modules_to_run() as $module ) {
825
- self::get_instance()->load_container_definitions( $module );
826
- }
827
-
828
  self::get_instance()->initialized_container = true;
829
  }
830
 
@@ -833,6 +844,12 @@ final class ITSEC_Modules {
833
  */
834
  public static function run_active_modules() {
835
  self::initialize_container();
 
 
 
 
 
 
836
  // The active.php file is for code that will only run when the module is active.
837
  self::load_module_file( 'active.php', ':active' );
838
  }
@@ -879,7 +896,7 @@ final class ITSEC_Modules {
879
  /**
880
  * Get the container.
881
  *
882
- * @return \Psr\Container\ContainerInterface
883
  */
884
  public static function get_container() {
885
  if ( ! self::get_instance()->initialized_container ) {
@@ -953,9 +970,79 @@ final class ITSEC_Modules {
953
  $check['ssl'] = true;
954
  }
955
 
 
 
 
 
956
  return ITSEC_Lib::evaluate_requirements( $check );
957
  }
958
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
959
  /**
960
  * Validates a module's schema.
961
  *
@@ -975,6 +1062,31 @@ final class ITSEC_Modules {
975
  return rest_validate_value_from_schema( $config, $self->module_schema, 'config' );
976
  }
977
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
978
  /**
979
  * Checks if the given module has the requested file.
980
  *
2
 
3
  use iThemesSecurity\Config_Settings;
4
  use iThemesSecurity\Config_Validator;
5
+ use iThemesSecurity\Contracts\Import_Export_Source;
6
  use iThemesSecurity\Contracts\Runnable;
7
  use iThemesSecurity\Exception\Unsatisfied_Module_Dependencies_Exception;
8
+ use iThemesSecurity\Import_Export\Export\Export;
9
+ use iThemesSecurity\Import_Export\Import\Import_Context;
10
+ use iThemesSecurity\Lib\Result;
11
  use iThemesSecurity\Module_Config;
12
  use Pimple\Container;
13
+ use Psr\Container\ContainerInterface;
14
 
15
+ final class ITSEC_Modules implements Import_Export_Source {
16
  const DEPRECATED = [
17
  'settings-page.php' => '7.0.0',
18
  ];
47
  /** @var Container */
48
  private $pimple;
49
 
50
+ /** @var ContainerInterface */
51
  private $container;
52
 
53
  /** @var bool */
58
 
59
  $this->pimple = new Container();
60
  $this->container = new Pimple\Psr11\Container( $this->pimple );
61
+
62
+ $this->pimple[ ContainerInterface::class ] = $this->container;
63
  }
64
 
65
  /**
82
  *
83
  * @param string $slug The unique slug to use for the module.
84
  * @param string $path The absolute path to the module.
 
85
  *
86
  * @return bool True on success, false otherwise.
87
  */
88
+ public static function register_module( $slug, $path ) {
89
  $self = self::get_instance();
90
  $slug = sanitize_title_with_dashes( $slug );
91
 
95
  return false;
96
  }
97
 
98
+ if ( ! file_exists( $path . '/module.json' ) ) {
99
+ trigger_error( sprintf( __( 'Registering a module without a module.json definition is invalid. Module: %s.', 'better-wp-security' ), $slug ) );
100
 
101
+ return false;
102
+ }
103
 
104
+ $json = file_get_contents( $path . '/module.json' );
 
105
 
106
+ if ( ! $json ) {
107
+ trigger_error( sprintf( __( 'An attempt to register the %1$s module failed because it\'s configuration file is empty.', 'better-wp-security' ), $slug ) );
108
 
109
+ return false;
110
+ }
111
 
112
+ $config = json_decode( $json, true );
113
+
114
+ if ( ITSEC_Core::is_development() && ( $valid = static::validate_module_config( $config ) ) !== true ) {
115
+ trigger_error( wp_sprintf( __( 'An attempt to register the %1$s module failed because it has an invalid configuration: %2$l', 'better-wp-security' ), $slug, ITSEC_Lib::get_error_strings( $valid ) ) );
116
 
117
+ return false;
118
+ }
119
 
120
+ $config = new Module_Config( $config );
121
+ $type = $config->get_status();
122
 
123
+ $self->module_config[ $slug ] = $config;
 
124
 
125
+ if ( $extends = $config->get_extends() ) {
126
+ $extends = self::get_config( $extends );
127
 
128
+ if ( ! $extends && ITSEC_Core::is_development() ) {
129
+ trigger_error( wp_sprintf( __( 'An attempt to register the %1$s module failed because it extends a non-registered module: %2$l', 'better-wp-security' ), $slug, $config->get_extends() ) );
130
+
131
+ return false;
132
+ }
133
 
134
+ $self->module_config[ $extends->get_id() ] = $extends->extend( $config );
135
 
136
+ if ( $config->get_status() === 'inherit' ) {
137
+ $self->inherited_modules[ $slug ] = true;
 
138
  }
 
 
139
  }
140
 
141
  $self->_module_paths[ $slug ] = $path;
147
  $self->_default_active_modules[ $slug ] = true;
148
  }
149
 
150
+ // Clear cache.
151
+ $self->_active_modules_list = false;
152
+
153
+ self::initialize_feature_flags( $config );
154
+
155
  return true;
156
  }
157
 
172
  unset(
173
  $self->_module_paths[ $slug ],
174
  $self->module_config[ $slug ],
175
+ $self->inherited_modules[ $slug ],
176
+ $self->_always_active_modules[ $slug ],
177
+ $self->_default_active_modules[ $slug ]
178
  );
179
  $self->_available_modules = array_keys( $self->_module_paths );
180
 
 
 
181
  return true;
182
  }
183
 
576
  /**
577
  * Activate a single module using its ID
578
  *
579
+ * @param string $module_id The ID of the module to activate
580
+ * @param array $args Additional arguments to customize behavior.
581
+ *
582
+ * @type bool $ignore_requirements Whether to skip evaluating module requirements.
583
  *
584
  * @return bool|WP_Error If the module can be activated, true if it was previously active and false if it was
585
  * previously inactive. If the module cannot be activated, a WP_Error object is returned.
801
  if ( ITSEC_Core::is_temp_disable_modules_set() ) {
802
  $modules = array();
803
  } else {
804
+ $modules = self::get_active_modules();
 
 
805
  }
806
 
807
  $modules = array_merge( $modules, array_keys( self::get_instance()->_always_active_modules ) );
808
  $modules = array_unique( $modules );
809
+ $modules = array_filter( $modules, static function ( $module ) {
810
+ return ! self::validate_module_requirements( $module, 'run' )->has_errors();
811
+ } );
812
 
813
  foreach ( self::get_instance()->inherited_modules as $slug => $_ ) {
814
  if ( self::is_active( self::get_config( $slug )->get_extends() ) ) {
836
  $load( self::get_instance()->pimple );
837
  }
838
 
 
 
 
 
839
  self::get_instance()->initialized_container = true;
840
  }
841
 
844
  */
845
  public static function run_active_modules() {
846
  self::initialize_container();
847
+
848
+ foreach ( self::get_active_modules_to_run() as $module ) {
849
+ self::get_instance()->load_container_definitions( $module );
850
+ }
851
+
852
+ self::load_module_file( 'active.php', 'global' );
853
  // The active.php file is for code that will only run when the module is active.
854
  self::load_module_file( 'active.php', ':active' );
855
  }
896
  /**
897
  * Get the container.
898
  *
899
+ * @return ContainerInterface
900
  */
901
  public static function get_container() {
902
  if ( ! self::get_instance()->initialized_container ) {
970
  $check['ssl'] = true;
971
  }
972
 
973
+ if ( isset( $requirements['feature-flags'] ) && ( $mode === 'activate' || $requirements['feature-flags']['validate'] === $mode ) ) {
974
+ $check['feature-flags'] = $requirements['feature-flags']['flags'];
975
+ }
976
+
977
  return ITSEC_Lib::evaluate_requirements( $check );
978
  }
979
 
980
+ public function get_export_slug(): string {
981
+ return 'modules';
982
+ }
983
+
984
+ public function get_export_title(): string {
985
+ return __( 'Features', 'better-wp-security' );
986
+ }
987
+
988
+ public function get_export_description(): string {
989
+ return __( 'List of active modules.', 'better-wp-security' );
990
+ }
991
+
992
+ public function get_export_options_schema(): array {
993
+ return [];
994
+ }
995
+
996
+ public function get_export_schema(): array {
997
+ return [
998
+ 'type' => 'object',
999
+ 'additionalProperties' => [
1000
+ 'type' => 'string',
1001
+ 'enum' => [ 'active', 'inactive' ],
1002
+ ],
1003
+ ];
1004
+ }
1005
+
1006
+ public function get_transformations(): array {
1007
+ return [];
1008
+ }
1009
+
1010
+ public function export( $options ): Result {
1011
+ $data = [];
1012
+
1013
+ foreach ( self::get_available_modules() as $module ) {
1014
+ if ( ! self::is_always_active( $module ) ) {
1015
+ $data[ $module ] = self::is_active( $module ) ? 'active' : 'inactive';
1016
+ }
1017
+ }
1018
+
1019
+ return Result::success( $data );
1020
+ }
1021
+
1022
+ public function import( Export $from, Import_Context $context ): Result {
1023
+ $result = Result::success();
1024
+
1025
+ if ( ! $from->has_data( $this->get_export_slug() ) ) {
1026
+ return $result;
1027
+ }
1028
+
1029
+ foreach ( $from->get_data( $this->get_export_slug() ) as $module => $status ) {
1030
+ $success = true;
1031
+
1032
+ if ( $status === 'active' && ! self::is_active( $module ) ) {
1033
+ $success = self::activate( $module );
1034
+ } elseif ( $status === 'inactive' && self::is_active( $module ) ) {
1035
+ $success = self::deactivate( $module );
1036
+ }
1037
+
1038
+ if ( is_wp_error( $success ) ) {
1039
+ $result->add_warning_message( ...ITSEC_Lib::get_error_strings( $success ) );
1040
+ }
1041
+ }
1042
+
1043
+ return $result;
1044
+ }
1045
+
1046
  /**
1047
  * Validates a module's schema.
1048
  *
1062
  return rest_validate_value_from_schema( $config, $self->module_schema, 'config' );
1063
  }
1064
 
1065
+ /**
1066
+ * Initializes the module's feature flags.
1067
+ *
1068
+ * @param Module_Config $config
1069
+ */
1070
+ private static function initialize_feature_flags( Module_Config $config ) {
1071
+ if ( ! $config->get_feature_flags() ) {
1072
+ return;
1073
+ }
1074
+
1075
+ $flags = $config->get_feature_flags();
1076
+
1077
+ if ( self::is_active( $config->get_id() ) ) {
1078
+ $register = array_keys( $flags );
1079
+ } else {
1080
+ $register = $config->get_requirements()['feature-flags']['flags'] ?? [];
1081
+ }
1082
+
1083
+ foreach ( $register as $flag ) {
1084
+ if ( isset( $flags[ $flag ] ) ) {
1085
+ ITSEC_Lib_Feature_Flags::register_flag( $flag, $flags[ $flag ] );
1086
+ }
1087
+ }
1088
+ }
1089
+
1090
  /**
1091
  * Checks if the given module has the requested file.
1092
  *
core/modules/backup/entries/dashboard/style.scss CHANGED
@@ -66,6 +66,11 @@
66
  border-spacing: 0;
67
 
68
  @include sticky-table();
 
 
 
 
 
69
  }
70
  }
71
 
66
  border-spacing: 0;
67
 
68
  @include sticky-table();
69
+
70
+ th:last-child,
71
+ td:last-child {
72
+ text-align: right;
73
+ }
74
  }
75
  }
76
 
core/modules/backup/module.json CHANGED
@@ -194,5 +194,10 @@
194
  }
195
  }
196
  }
 
 
 
 
 
197
  }
198
  }
194
  }
195
  }
196
  }
197
+ },
198
+ "import-export": {
199
+ "exclude-settings": [
200
+ "last_run"
201
+ ]
202
  }
203
  }
core/modules/ban-users/Database_Repository.php CHANGED
@@ -10,9 +10,13 @@ use iThemesSecurity\Ban_Hosts\Filters;
10
  use iThemesSecurity\Ban_Hosts\Repository;
11
  use iThemesSecurity\Ban_Hosts\Repository_Ban;
12
  use iThemesSecurity\Ban_Hosts\Updatable;
 
13
  use iThemesSecurity\Exception\WP_Error;
 
 
 
14
 
15
- final class Database_Repository implements Repository, Creatable, Updatable, Deletable {
16
  const CACHE_GROUP = 'itsec_database_bans';
17
 
18
  /** @var Multi_Actor_Factory */
@@ -194,7 +198,7 @@ final class Database_Repository implements Repository, Creatable, Updatable, Del
194
  'title' => __( 'Add Ban', 'better-wp-security' ),
195
  'required' => [ 'host' ],
196
  'properties' => [
197
- 'host' => [
198
  'type' => 'string',
199
  'title' => __( 'Host', 'better-wp-security' ),
200
  'description' => __( 'The IP address to ban.', 'better-wp-security' ),
@@ -203,7 +207,7 @@ final class Database_Repository implements Repository, Creatable, Updatable, Del
203
  'sanitize_callback' => 'ITSEC_Lib_REST::sanitize_ip',
204
  ],
205
  ],
206
- 'created_by' => [
207
  'title' => __( 'Created By', 'better-wp-security' ),
208
  'type' => 'object',
209
  'required' => [ 'type', 'id' ],
@@ -220,7 +224,7 @@ final class Database_Repository implements Repository, Creatable, Updatable, Del
220
  ],
221
  'description' => __( 'The actor who added the ban.', 'better-wp-security' ),
222
  ],
223
- 'comment' => [
224
  'type' => 'string',
225
  'maxLength' => 255,
226
  'title' => __( 'Notes', 'better-wp-security' ),
@@ -228,10 +232,10 @@ final class Database_Repository implements Repository, Creatable, Updatable, Del
228
  ]
229
  ],
230
  'uiSchema' => [
231
- 'created_by' => [
232
  'ui:widget' => 'hidden',
233
  ],
234
- 'comment' => [
235
  'ui:widget' => 'textarea',
236
  'ui:options' => [
237
  'rows' => 4,
@@ -380,6 +384,90 @@ final class Database_Repository implements Repository, Creatable, Updatable, Del
380
  return wp_list_pluck( $rows, 'host', 'id' );
381
  }
382
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
383
  /**
384
  * Hydrates a row from the database to a Ban object.
385
  *
10
  use iThemesSecurity\Ban_Hosts\Repository;
11
  use iThemesSecurity\Ban_Hosts\Repository_Ban;
12
  use iThemesSecurity\Ban_Hosts\Updatable;
13
+ use iThemesSecurity\Contracts\Import_Export_Source;
14
  use iThemesSecurity\Exception\WP_Error;
15
+ use iThemesSecurity\Import_Export\Export\Export;
16
+ use iThemesSecurity\Import_Export\Import\Import_Context;
17
+ use iThemesSecurity\Lib\Result;
18
 
19
+ final class Database_Repository implements Repository, Creatable, Updatable, Deletable, Import_Export_Source {
20
  const CACHE_GROUP = 'itsec_database_bans';
21
 
22
  /** @var Multi_Actor_Factory */
198
  'title' => __( 'Add Ban', 'better-wp-security' ),
199
  'required' => [ 'host' ],
200
  'properties' => [
201
+ 'host' => [
202
  'type' => 'string',
203
  'title' => __( 'Host', 'better-wp-security' ),
204
  'description' => __( 'The IP address to ban.', 'better-wp-security' ),
207
  'sanitize_callback' => 'ITSEC_Lib_REST::sanitize_ip',
208
  ],
209
  ],
210
+ 'created_by' => [
211
  'title' => __( 'Created By', 'better-wp-security' ),
212
  'type' => 'object',
213
  'required' => [ 'type', 'id' ],
224
  ],
225
  'description' => __( 'The actor who added the ban.', 'better-wp-security' ),
226
  ],
227
+ 'comment' => [
228
  'type' => 'string',
229
  'maxLength' => 255,
230
  'title' => __( 'Notes', 'better-wp-security' ),
232
  ]
233
  ],
234
  'uiSchema' => [
235
+ 'created_by' => [
236
  'ui:widget' => 'hidden',
237
  ],
238
+ 'comment' => [
239
  'ui:widget' => 'textarea',
240
  'ui:options' => [
241
  'rows' => 4,
384
  return wp_list_pluck( $rows, 'host', 'id' );
385
  }
386
 
387
+ public function get_export_slug(): string {
388
+ return 'database-bans';
389
+ }
390
+
391
+ public function get_export_title(): string {
392
+ return __( 'Banned Users', 'better-wp-security' );
393
+ }
394
+
395
+ public function get_export_description(): string {
396
+ return __( 'List of banned IPs.', 'better-wp-security' );
397
+ }
398
+
399
+ public function get_export_options_schema(): array {
400
+ return [];
401
+ }
402
+
403
+ public function get_export_schema(): array {
404
+ return [
405
+ 'type' => 'array',
406
+ 'items' => [
407
+ 'type' => 'object',
408
+ 'properties' => [
409
+ 'host' => [
410
+ 'type' => 'string',
411
+ ],
412
+ 'created_at' => [
413
+ 'type' => 'string',
414
+ 'format' => 'date-time',
415
+ ],
416
+ 'comment' => [
417
+ 'type' => 'string',
418
+ ],
419
+ ],
420
+ ],
421
+ ];
422
+ }
423
+
424
+ public function get_transformations(): array {
425
+ return [];
426
+ }
427
+
428
+ public function export( $options ): Result {
429
+ try {
430
+ $bans = $this->get_bans( new Filters() );
431
+ } catch ( WP_Error $e ) {
432
+ return Result::error( $e->get_error() );
433
+ }
434
+
435
+ return Result::success( array_map( static function ( Ban $ban ) {
436
+ return [
437
+ 'host' => $ban->get_host(),
438
+ 'created_at' => $ban->get_created_at()->format( \ITSEC_Lib_REST::DATE_FORMAT ),
439
+ 'comment' => $ban->get_comment(),
440
+ ];
441
+ }, $bans ) );
442
+ }
443
+
444
+ public function import( Export $from, Import_Context $context ): Result {
445
+ if ( ! $bans = $from->get_data( $this->get_export_slug() ) ) {
446
+ return Result::success();
447
+ }
448
+
449
+ $result = Result::success();
450
+
451
+ foreach ( $bans as $ban ) {
452
+ try {
453
+ $this->persist( new Ban(
454
+ $ban['host'],
455
+ null,
456
+ $ban['comment'],
457
+ new \DateTimeImmutable( $ban['created_at'], new \DateTimeZone( 'UTC' ) )
458
+ ) );
459
+ } catch ( \Exception $e ) {
460
+ $result->add_warning_message( sprintf(
461
+ __( 'Could not ban "%1$s": %2$s', 'better-wp-security' ),
462
+ $ban['host'],
463
+ $e->getMessage()
464
+ ) );
465
+ }
466
+ }
467
+
468
+ return $result;
469
+ }
470
+
471
  /**
472
  * Hydrates a row from the database to a Ban object.
473
  *
core/modules/ban-users/container.php CHANGED
@@ -5,24 +5,19 @@ namespace iThemesSecurity\Ban_Users;
5
  use iThemesSecurity\Actor\Multi_Actor_Factory;
6
  use iThemesSecurity\Ban_Hosts\Filters;
7
  use Pimple\Container;
8
- use Pimple\Exception\FrozenServiceException;
9
 
10
  return static function ( Container $c ) {
11
  $c['module.ban-users.files'] = [
12
  'rest.php' => REST::class,
13
  ];
14
 
15
- try {
16
- $c->extend( 'ban-hosts.repositories', static function ( $repositories ) {
17
- if ( \ITSEC_Modules::get_setting( 'ban-users', 'enable_ban_lists' ) ) {
18
- $repositories[] = Database_Repository::class;
19
- }
20
 
21
- return $repositories;
22
- } );
23
- } catch ( FrozenServiceException $e ) {
24
-
25
- }
26
 
27
  $c[ Database_Repository::class ] = static function ( Container $c ) {
28
  return new Database_Repository(
@@ -59,4 +54,9 @@ return static function ( Container $c ) {
59
  return $cards;
60
  } );
61
 
 
 
 
 
 
62
  };
5
  use iThemesSecurity\Actor\Multi_Actor_Factory;
6
  use iThemesSecurity\Ban_Hosts\Filters;
7
  use Pimple\Container;
 
8
 
9
  return static function ( Container $c ) {
10
  $c['module.ban-users.files'] = [
11
  'rest.php' => REST::class,
12
  ];
13
 
14
+ \ITSEC_Lib::extend_if_able( $c, 'ban-hosts.repositories', static function ( $repositories ) {
15
+ if ( \ITSEC_Modules::get_setting( 'ban-users', 'enable_ban_lists' ) ) {
16
+ $repositories[] = Database_Repository::class;
17
+ }
 
18
 
19
+ return $repositories;
20
+ } );
 
 
 
21
 
22
  $c[ Database_Repository::class ] = static function ( Container $c ) {
23
  return new Database_Repository(
54
  return $cards;
55
  } );
56
 
57
+ \ITSEC_Lib::extend_if_able( $c, 'import-export.sources', function ( $sources, $c ) {
58
+ $sources[] = $c[ Database_Repository::class ];
59
+
60
+ return $sources;
61
+ } );
62
  };
core/modules/core/class-itsec-core-active.php CHANGED
@@ -120,6 +120,11 @@ class ITSEC_Core_Active {
120
  }
121
  }
122
  }
 
 
 
 
 
123
  }
124
 
125
  public function add_live_reload() {
120
  }
121
  }
122
  }
123
+
124
+ wp_add_inline_script( 'itsec-packages-data', sprintf(
125
+ "wp.data.dispatch( 'ithemes-security/core' ).__unstableLoadInitialFeatureFlags( %s );",
126
+ wp_json_encode( ITSEC_Lib_Feature_Flags::get_enabled() )
127
+ ) );
128
  }
129
 
130
  public function add_live_reload() {
core/modules/core/class-itsec-core-admin.php CHANGED
@@ -62,7 +62,7 @@ class ITSEC_Core_Admin {
62
  */
63
  public function add_plugin_meta_links( $meta ) {
64
 
65
- $meta[] = '<a href="https://ithemes.com/security?utm_source=wordpressadmin&utm_medium=banner&utm_campaign=itsecfreecta" target="_blank" rel="noopener noreferrer">' . __( 'Get Support', 'better-wp-security' ) . '</a>';
66
 
67
  return $meta;
68
  }
62
  */
63
  public function add_plugin_meta_links( $meta ) {
64
 
65
+ $meta[] = '<a href="https://ithemes.com/security/?utm_source=pluginspage&utm_medium=link&utm_campaign=itsecfreecta" target="_blank" rel="noopener noreferrer">' . __( 'Get Support', 'better-wp-security' ) . '</a>';
66
 
67
  return $meta;
68
  }
core/modules/core/entries/admin-notices/components/notice/style.scss CHANGED
@@ -1,5 +1,3 @@
1
- @import "mixins.scss";
2
-
3
  $border-radius: 3px;
4
  $side-padding: 20px;
5
 
@@ -10,7 +8,7 @@ $side-padding: 20px;
10
 
11
  .itsec-admin-notice__header {
12
  background: #eeecec;
13
- padding: $side-padding / 2;
14
  border-top-left-radius: $border-radius;
15
  border-top-right-radius: $border-radius;
16
 
@@ -64,7 +62,7 @@ $side-padding: 20px;
64
  .itsec-admin-notice__header .itsec-admin-notice__header-inset {
65
  background: white;
66
  border-radius: 5px;
67
- padding: $side-padding / 2;
68
  }
69
 
70
  .itsec-admin-notice__header h4 {
 
 
1
  $border-radius: 3px;
2
  $side-padding: 20px;
3
 
8
 
9
  .itsec-admin-notice__header {
10
  background: #eeecec;
11
+ padding: calc(#{$side-padding} / 2);
12
  border-top-left-radius: $border-radius;
13
  border-top-right-radius: $border-radius;
14
 
62
  .itsec-admin-notice__header .itsec-admin-notice__header-inset {
63
  background: white;
64
  border-radius: 5px;
65
+ padding: calc(#{$side-padding} / 2);
66
  }
67
 
68
  .itsec-admin-notice__header h4 {
core/modules/core/entries/admin-notices/components/toolbar-button/index.js CHANGED
@@ -17,7 +17,7 @@ import { useSelect } from '@wordpress/data';
17
  import Panel from '../panel';
18
  import './style.scss';
19
 
20
- export default function () {
21
  const [ isToggled, setIsToggled ] = useState( false );
22
  const { notices, noticesLoaded } = useSelect(
23
  ( select ) => ( {
17
  import Panel from '../panel';
18
  import './style.scss';
19
 
20
+ export default function() {
21
  const [ isToggled, setIsToggled ] = useState( false );
22
  const { notices, noticesLoaded } = useSelect(
23
  ( select ) => ( {
core/modules/core/entries/admin-notices/store/controls.js CHANGED
@@ -34,7 +34,7 @@ export function apiFetch( request ) {
34
  * Calls a selector using the current state.
35
  *
36
  * @param {string} selectorName Selector name.
37
- * @param {Array} args Selector arguments.
38
  *
39
  * @return {Object} control descriptor.
40
  */
@@ -51,24 +51,24 @@ export function select( selectorName, ...args ) {
51
  *
52
  * @see @wordpress/notices#createNotice()
53
  *
54
- * @param {?string} status Notice status.
55
- * Defaults to `info`.
56
- * @param {string} content Notice message.
57
- * @param {?Object} options Notice options.
58
- * @param {?string} options.context Context under which to
59
- * group notice.
60
- * @param {?string} options.id Identifier for notice.
61
- * Automatically assigned
62
- * if not specified.
63
- * @param {?boolean} options.isDismissible Whether the notice can
64
- * be dismissed by user.
65
- * Defaults to `true`.
66
- * @param {?number} options.autoDismiss Whether the notice should
67
- * by automatically dismissed
68
- * after x milliseconds.
69
- * Defaults to `false`.
70
- * @param {?Array<Object>} options.actions User actions to be
71
- * presented with notice.
72
  *
73
  * @return {Object} control descriptor.
74
  */
34
  * Calls a selector using the current state.
35
  *
36
  * @param {string} selectorName Selector name.
37
+ * @param {Array} args Selector arguments.
38
  *
39
  * @return {Object} control descriptor.
40
  */
51
  *
52
  * @see @wordpress/notices#createNotice()
53
  *
54
+ * @param {?string} status Notice status.
55
+ * Defaults to `info`.
56
+ * @param {string} content Notice message.
57
+ * @param {?Object} options Notice options.
58
+ * @param {?string} options.context Context under which to
59
+ * group notice.
60
+ * @param {?string} options.id Identifier for notice.
61
+ * Automatically assigned
62
+ * if not specified.
63
+ * @param {?boolean} options.isDismissible Whether the notice can
64
+ * be dismissed by user.
65
+ * Defaults to `true`.
66
+ * @param {?number} options.autoDismiss Whether the notice should
67
+ * by automatically dismissed
68
+ * after x milliseconds.
69
+ * Defaults to `false`.
70
+ * @param {?Array<Object>} options.actions User actions to be
71
+ * presented with notice.
72
  *
73
  * @return {Object} control descriptor.
74
  */
core/modules/core/notices.php CHANGED
@@ -3,7 +3,9 @@
3
  class ITSEC_Admin_Notice_New_Feature_Core implements ITSEC_Admin_Notice {
4
 
5
  public function get_id() {
6
- return 'release-new-ui-launch';
 
 
7
  }
8
 
9
  public function get_title() {
@@ -11,10 +13,9 @@ class ITSEC_Admin_Notice_New_Feature_Core implements ITSEC_Admin_Notice {
11
  }
12
 
13
  public function get_message() {
14
- return sprintf(
15
- esc_html__( 'iThemes Security %s is here!', 'better-wp-security' ),
16
- ITSEC_Core::is_pro() ? '7.0' : '8.0'
17
- );
18
  }
19
 
20
  public function get_meta() {
@@ -32,12 +33,12 @@ class ITSEC_Admin_Notice_New_Feature_Core implements ITSEC_Admin_Notice {
32
  public function get_actions() {
33
  return array(
34
  'blog' => new ITSEC_Admin_Notice_Action_Link(
35
- add_query_arg( 'itsec_view_release_post', 'release-new-ui', admin_url( 'index.php' ) ),
36
  esc_html__( 'See What’s New', 'better-wp-security' ),
37
  ITSEC_Admin_Notice_Action::S_PRIMARY,
38
  function () {
39
  $this->handle_dismiss();
40
- $url = ITSEC_Core::is_pro() ? 'https://ithemes.com/?p=64448' : 'https://ithemes.com/?p=65086';
41
 
42
  wp_redirect( $url );
43
  die;
3
  class ITSEC_Admin_Notice_New_Feature_Core implements ITSEC_Admin_Notice {
4
 
5
  public function get_id() {
6
+ return ITSEC_Core::is_pro() ?
7
+ 'release-import-export-launch' :
8
+ 'release-site-scanner-free';
9
  }
10
 
11
  public function get_title() {
13
  }
14
 
15
  public function get_message() {
16
+ return ITSEC_Core::is_pro() ?
17
+ esc_html__( 'iThemes Security Pro 7.1 is here!', 'better-wp-security' ) :
18
+ esc_html__( 'iThemes Security Pro’s most popular and powerful feature is now free in iThemes Security 8.1!', 'better-wp-security' );
 
19
  }
20
 
21
  public function get_meta() {
33
  public function get_actions() {
34
  return array(
35
  'blog' => new ITSEC_Admin_Notice_Action_Link(
36
+ add_query_arg( 'itsec_view_release_post', $this->get_id(), admin_url( 'index.php' ) ),
37
  esc_html__( 'See What’s New', 'better-wp-security' ),
38
  ITSEC_Admin_Notice_Action::S_PRIMARY,
39
  function () {
40
  $this->handle_dismiss();
41
+ $url = ITSEC_Core::is_pro() ? 'https://ithemes.com/?p=72545' : 'https://ithemes.com/?p=73198';
42
 
43
  wp_redirect( $url );
44
  die;
core/modules/dashboard/class-itsec-dashboard.php CHANGED
@@ -1,11 +1,17 @@
1
  <?php
2
 
 
 
 
 
 
 
3
  use iThemesSecurity\User_Groups;
4
 
5
  /**
6
  * Class ITSEC_Dashboard
7
  */
8
- class ITSEC_Dashboard implements \iThemesSecurity\Contracts\Runnable {
9
 
10
  const CPT_DASHBOARD = 'itsec-dashboard';
11
  const META_SHARE_USER = '_itsec_dashboard_share_user';
@@ -400,4 +406,229 @@ class ITSEC_Dashboard implements \iThemesSecurity\Contracts\Runnable {
400
  break;
401
  }
402
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
403
  }
1
  <?php
2
 
3
+ use iThemesSecurity\Contracts\Import_Export_Source;
4
+ use iThemesSecurity\Contracts\Runnable;
5
+ use iThemesSecurity\Import_Export\Export\Export;
6
+ use iThemesSecurity\Import_Export\Import\Import_Context;
7
+ use iThemesSecurity\Import_Export\Import\Transformation;
8
+ use iThemesSecurity\Lib\Result;
9
  use iThemesSecurity\User_Groups;
10
 
11
  /**
12
  * Class ITSEC_Dashboard
13
  */
14
+ class ITSEC_Dashboard implements Runnable, Import_Export_Source {
15
 
16
  const CPT_DASHBOARD = 'itsec-dashboard';
17
  const META_SHARE_USER = '_itsec_dashboard_share_user';
406
  break;
407
  }
408
  }
409
+
410
+ public function get_export_slug(): string {
411
+ return 'dashboard';
412
+ }
413
+
414
+ public function get_export_title(): string {
415
+ return __( 'Security Dashboard', 'better-wp-security' );
416
+ }
417
+
418
+ public function get_export_description(): string {
419
+ return __( 'Security dashboards and cards.', 'better-wp-security' );
420
+ }
421
+
422
+ public function get_export_options_schema(): array {
423
+ return [];
424
+ }
425
+
426
+ public function get_export_schema(): array {
427
+ return [
428
+ 'type' => 'array',
429
+ 'items' => [
430
+ 'type' => 'object',
431
+ 'properties' => [
432
+ 'id' => [
433
+ 'type' => 'integer',
434
+ ],
435
+ 'created_by' => [
436
+ '$ref' => '#/definitions/user',
437
+ ],
438
+ 'created_at' => [
439
+ 'type' => 'string',
440
+ 'format' => 'date-time',
441
+ ],
442
+ 'label' => [
443
+ 'type' => 'string',
444
+ ],
445
+ 'layout' => [
446
+ 'type' => 'object',
447
+ ],
448
+ 'shares' => [
449
+ 'type' => 'object',
450
+ 'properties' => [
451
+ 'users' => [
452
+ 'type' => 'array',
453
+ 'items' => [
454
+ '$ref' => '#/definitions/user',
455
+ ],
456
+ ],
457
+ 'roles' => [
458
+ 'type' => 'array',
459
+ 'items' => [
460
+ '$ref' => '#/definitions/role'
461
+ ],
462
+ ],
463
+ ],
464
+ ],
465
+ 'cards' => [
466
+ 'type' => 'array',
467
+ 'properties' => [
468
+ 'id' => [
469
+ 'type' => 'integer',
470
+ ],
471
+ 'type' => [
472
+ 'type' => 'string',
473
+ ],
474
+ 'size' => [
475
+ 'type' => 'object',
476
+ ],
477
+ 'position' => [
478
+ 'type' => 'object',
479
+ ],
480
+ 'settings' => [
481
+ 'type' => 'object',
482
+ ],
483
+ ],
484
+ ],
485
+ ],
486
+ ],
487
+ ];
488
+ }
489
+
490
+ public function get_transformations(): array {
491
+ return [
492
+ new class implements Transformation {
493
+ public function transform( Export $export, Import_Context $context ): Export {
494
+ $data = $export->get_data( 'dashboard' );
495
+
496
+ foreach ( $data as &$dashboard ) {
497
+ $dashboard['created_by'] = Export::format_user( $context->get_mapped_user( $dashboard['created_by'] ) );
498
+ $dashboard['shares']['users'] = $context->map_user_list( $dashboard['shares']['users'] );
499
+ $dashboard['shares']['roles'] = $context->map_role_list( $dashboard['shares']['roles'] );
500
+ }
501
+
502
+ return $export->with_data( 'dashboard', $data );
503
+ }
504
+
505
+ public function get_user_paths(): array {
506
+ return [ '*.created_by', '*.shares.users' ];
507
+ }
508
+
509
+ public function get_role_paths(): array {
510
+ return [ '*.shares.roles' ];
511
+ }
512
+ }
513
+ ];
514
+ }
515
+
516
+ public function export( $options ): Result {
517
+ $dashboards = new \WP_Query( [
518
+ 'post_type' => self::CPT_DASHBOARD,
519
+ 'no_found_rows' => true,
520
+ 'posts_per_page' => - 1,
521
+ ] );
522
+ $cards = new \WP_Query( [
523
+ 'post_type' => self::CPT_CARD,
524
+ 'no_found_rows' => true,
525
+ 'posts_per_page' => - 1,
526
+ ] );
527
+
528
+ $cards_by_dashboard = [];
529
+
530
+ foreach ( $cards->posts as $post ) {
531
+ $cards_by_dashboard[ $post->post_parent ][] = [
532
+ 'id' => $post->ID,
533
+ 'type' => get_post_meta( $post->ID, self::META_CARD, true ),
534
+ 'size' => get_post_meta( $post->ID, self::META_CARD_SIZE, true ),
535
+ 'position' => get_post_meta( $post->ID, self::META_CARD_POSITION, true ),
536
+ 'settings' => get_post_meta( $post->ID, self::META_CARD_SETTINGS, true ),
537
+ ];
538
+ }
539
+
540
+ return Result::success( array_map( static function ( \WP_Post $dashboard ) use ( $cards_by_dashboard ) {
541
+ $user = get_userdata( $dashboard->post_author ) ?: null;
542
+
543
+ return [
544
+ 'id' => $dashboard->ID,
545
+ 'created_by' => Export::format_user( $user ),
546
+ 'created_at' => \ITSEC_Lib::to_rest_date( $dashboard->post_date_gmt ),
547
+ 'label' => get_the_title( $dashboard ),
548
+ 'cards' => $cards_by_dashboard[ $dashboard->ID ] ?? [],
549
+ 'shares' => [
550
+ 'users' => array_map( static function ( $user_id ) {
551
+ return Export::format_user( get_userdata( $user_id ) ?: null );
552
+ }, get_post_meta( $dashboard->ID, self::META_SHARE_USER ) ),
553
+ 'roles' => array_map( [ Export::class, 'format_role' ], get_post_meta( $dashboard->ID, self::META_SHARE_ROLE ) ),
554
+ ],
555
+ ];
556
+ }, $dashboards->posts ) );
557
+ }
558
+
559
+ public function import( Export $from, Import_Context $context ): Result {
560
+ if ( ! $dashboards = $from->get_data( $this->get_export_slug() ) ) {
561
+ return Result::success();
562
+ }
563
+
564
+ $query = new WP_Query( [
565
+ 'post_type' => self::CPT_DASHBOARD,
566
+ 'posts_per_page' => 500,
567
+ ] );
568
+
569
+ foreach ( $query->posts as $post ) {
570
+ wp_delete_post( $post->ID, true );
571
+ }
572
+
573
+ $result = Result::success();
574
+
575
+ foreach ( $dashboards as $dashboard ) {
576
+ $author = $context->get_mapped_user( $dashboard['created_by'] );
577
+
578
+ if ( ! $author && ITSEC_Core::current_user_can_manage() ) {
579
+ $author = wp_get_current_user();
580
+ }
581
+
582
+ if ( ! $author ) {
583
+ continue;
584
+ }
585
+
586
+ $post_id = wp_insert_post( [
587
+ 'post_type' => self::CPT_DASHBOARD,
588
+ 'post_author' => $author->ID,
589
+ 'post_status' => 'publish',
590
+ 'post_title' => $dashboard['label'],
591
+ ], true );
592
+
593
+ if ( is_wp_error( $post_id ) ) {
594
+ $result->add_warning_message( sprintf(
595
+ __( 'Could not create "%1$s" dashboard for "%2$s": %3$s', 'better-wp-security' ),
596
+ $dashboard['label'],
597
+ $author->display_name,
598
+ $post_id->get_error_message()
599
+ ) );
600
+
601
+ continue;
602
+ }
603
+
604
+ foreach ( $dashboard['shares']['users'] as $user ) {
605
+ if ( $mapped = $context->get_mapped_user( $user ) ) {
606
+ add_post_meta( $post_id, self::META_SHARE_USER, $mapped->ID );
607
+ }
608
+ }
609
+
610
+ foreach ( $dashboard['shares']['roles'] as $role ) {
611
+ if ( $mapped = $context->get_mapped_role( $role['slug'] ) ) {
612
+ add_post_meta( $post_id, self::META_SHARE_ROLE, $mapped );
613
+ }
614
+ }
615
+
616
+ foreach ( $dashboard['cards'] as $card ) {
617
+ wp_insert_post( [
618
+ 'post_type' => self::CPT_CARD,
619
+ 'post_author' => $author->ID,
620
+ 'post_parent' => $post_id,
621
+ 'post_status' => 'publish',
622
+ 'meta_input' => array_filter( [
623
+ self::META_CARD => $card['type'],
624
+ self::META_CARD_SIZE => $card['size'],
625
+ self::META_CARD_POSITION => $card['position'],
626
+ self::META_CARD_SETTINGS => $card['settings'],
627
+ ] ),
628
+ ] );
629
+ }
630
+ }
631
+
632
+ return $result;
633
+ }
634
  }
core/modules/dashboard/container.php CHANGED
@@ -4,7 +4,7 @@ use iThemesSecurity\User_Groups\Matcher;
4
  use Pimple\Container;
5
 
6
  return static function ( Container $c ) {
7
- $c['ITSEC_Dashboard'] = static function ( Container $c ) {
8
  return new ITSEC_Dashboard( $c[ Matcher::class ] );
9
  };
10
 
@@ -45,4 +45,10 @@ return static function ( Container $c ) {
45
 
46
  return $cards;
47
  } );
 
 
 
 
 
 
48
  };
4
  use Pimple\Container;
5
 
6
  return static function ( Container $c ) {
7
+ $c[ ITSEC_Dashboard::class ] = static function ( Container $c ) {
8
  return new ITSEC_Dashboard( $c[ Matcher::class ] );
9
  };
10
 
45
 
46
  return $cards;
47
  } );
48
+
49
+ ITSEC_Lib::extend_if_able( $c, 'import-export.sources', function ( $sources, $c ) {
50
+ $sources[] = $c[ ITSEC_Dashboard::class ];
51
+
52
+ return $sources;
53
+ } );
54
  };
core/modules/dashboard/entries/dashboard/app.js CHANGED
@@ -12,7 +12,7 @@ import '@wordpress/notices';
12
  * Internal dependencies
13
  */
14
  import { BelowToolbarSlot } from '@ithemes/security.dashboard.api';
15
- import '@ithemes/security-data';
16
  import { useEventListener } from '@ithemes/security-hocs';
17
  import { useRegisterCards } from './cards';
18
  import AdminBar from './components/admin-bar';
12
  * Internal dependencies
13
  */
14
  import { BelowToolbarSlot } from '@ithemes/security.dashboard.api';
15
+ import '@ithemes/security.packages.data';
16
  import { useEventListener } from '@ithemes/security-hocs';
17
  import { useRegisterCards } from './cards';
18
  import AdminBar from './components/admin-bar';
core/modules/dashboard/entries/dashboard/cards/active-lockouts/index.js CHANGED
@@ -49,7 +49,7 @@ function MasterRender( { master } ) {
49
  );
50
  }
51
 
52
- const withLinks = memize( function ( lockouts, links ) {
53
  return lockouts.map( ( lockout ) => ( {
54
  ...lockout,
55
  links,
@@ -139,22 +139,22 @@ function ActiveLockouts( {
139
  ) }
140
  { selectedId > 0 &&
141
  card._links[ 'ithemes-security:release-lockout' ] && (
142
- <Footer>
143
- <span className="itsec-card-footer__action">
144
- <Button
145
- isPrimary
146
- isSmall
147
- aria-disabled={ releasingIds.includes(
148
- selectedId
149
- ) }
150
- isBusy={ releasingIds.includes( selectedId ) }
151
- onClick={ onRelease }
152
- >
153
- { __( 'Release Lockout', 'better-wp-security' ) }
154
- </Button>
155
- </span>
156
- </Footer>
157
- ) }
158
  </div>
159
  );
160
  }
49
  );
50
  }
51
 
52
+ const withLinks = memize( function( lockouts, links ) {
53
  return lockouts.map( ( lockout ) => ( {
54
  ...lockout,
55
  links,
139
  ) }
140
  { selectedId > 0 &&
141
  card._links[ 'ithemes-security:release-lockout' ] && (
142
+ <Footer>
143
+ <span className="itsec-card-footer__action">
144
+ <Button
145
+ isPrimary
146
+ isSmall
147
+ aria-disabled={ releasingIds.includes(
148
+ selectedId
149
+ ) }
150
+ isBusy={ releasingIds.includes( selectedId ) }
151
+ onClick={ onRelease }
152
+ >
153
+ { __( 'Release Lockout', 'better-wp-security' ) }
154
+ </Button>
155
+ </span>
156
+ </Footer>
157
+ ) }
158
  </div>
159
  );
160
  }
core/modules/dashboard/entries/dashboard/cards/banned-users-list/style.scss CHANGED
@@ -106,6 +106,11 @@
106
  width: 100%;
107
 
108
  @include sticky-table();
 
 
 
 
 
109
  }
110
 
111
  & .itsec-card-banned-users__ban {
106
  width: 100%;
107
 
108
  @include sticky-table();
109
+
110
+ th:last-child,
111
+ td:last-child {
112
+ text-align: right;
113
+ }
114
  }
115
 
116
  & .itsec-card-banned-users__ban {
core/modules/dashboard/entries/dashboard/cards/renderers/pie-chart/index.js CHANGED
@@ -142,8 +142,8 @@ export default function PieChart( { card, config } ) {
142
  <td style={ { color: PRIMARYS[ i ] } }>
143
  { hasData
144
  ? ( ( datum.value / total ) * 100 ).toFixed(
145
- 0
146
- ) + '%'
147
  : '—' }
148
  </td>
149
  </tr>
142
  <td style={ { color: PRIMARYS[ i ] } }>
143
  { hasData
144
  ? ( ( datum.value / total ) * 100 ).toFixed(
145
+ 0
146
+ ) + '%'
147
  : '—' }
148
  </td>
149
  </tr>
core/modules/dashboard/entries/dashboard/components/card-grid/width-provider.js CHANGED
@@ -1,5 +1,3 @@
1
- /* eslint-disable @wordpress/no-global-event-listener */
2
-
3
  /**
4
  * External dependencies
5
  */
 
 
1
  /**
2
  * External dependencies
3
  */
core/modules/dashboard/entries/dashboard/components/edit-cards/promo-card.js CHANGED
@@ -14,7 +14,7 @@ export default function PromoCard( { title } ) {
14
  <Button
15
  className="itsec-edit-cards__action itsec-edit-cards__action--add"
16
  label={ __( 'Go Pro', 'better-wp-security' ) }
17
- href="https://ithemes.com/security/"
18
  icon="external"
19
  />
20
  </li>
14
  <Button
15
  className="itsec-edit-cards__action itsec-edit-cards__action--add"
16
  label={ __( 'Go Pro', 'better-wp-security' ) }
17
+ href="https://ithemes.com/security/?utm_source=wordpressadmin&utm_medium=dashboardcard&utm_campaign=itsecfreecta"
18
  icon="external"
19
  />
20
  </li>
core/modules/dashboard/entries/dashboard/components/toolbar/index.js CHANGED
@@ -14,7 +14,7 @@ import { useCanWrite, useConfigContext } from '../../utils';
14
  import EditCards from '../edit-cards';
15
  import './style.scss';
16
 
17
- export default function ( { dashboardId } ) {
18
  const canWrite = useCanWrite();
19
  const settingsUrl = useGlobalNavigationUrl( 'settings' );
20
  const { canManage } = useConfigContext();
14
  import EditCards from '../edit-cards';
15
  import './style.scss';
16
 
17
+ export default function( { dashboardId } ) {
18
  const canWrite = useCanWrite();
19
  const settingsUrl = useGlobalNavigationUrl( 'settings' );
20
  const { canManage } = useConfigContext();
core/modules/dashboard/entries/dashboard/store/app/reducer.js CHANGED
@@ -85,13 +85,13 @@ export default function app( state = DEFAULT_STATE, action ) {
85
  ].includes( action.context )
86
  ? state
87
  : {
88
- ...state,
89
- editingCards: true,
90
- view: {
91
- page: 'view-dashboard',
92
- attr: { id: action.created.id },
93
- },
94
- };
95
  case OPEN_EDIT_CARDS:
96
  return {
97
  ...state,
85
  ].includes( action.context )
86
  ? state
87
  : {
88
+ ...state,
89
+ editingCards: true,
90
+ view: {
91
+ page: 'view-dashboard',
92
+ attr: { id: action.created.id },
93
+ },
94
+ };
95
  case OPEN_EDIT_CARDS:
96
  return {
97
  ...state,
core/modules/dashboard/entries/dashboard/store/cards/actions.js CHANGED
@@ -192,7 +192,7 @@ export function failedQueryDashboardCard( cardId, error ) {
192
  *
193
  * @param {string} collectionEP
194
  * @param {Object} card
195
- * @param {*} [context] Additional context about this request for use in subsequent actions.
196
  */
197
  export function* addDashboardCard( collectionEP, card, context ) {
198
  yield startAddDashboardCard( collectionEP, card, context );
192
  *
193
  * @param {string} collectionEP
194
  * @param {Object} card
195
+ * @param {*} [context] Additional context about this request for use in subsequent actions.
196
  */
197
  export function* addDashboardCard( collectionEP, card, context ) {
198
  yield startAddDashboardCard( collectionEP, card, context );
core/modules/dashboard/entries/dashboard/store/cards/reducer.js CHANGED
@@ -70,13 +70,13 @@ export default function cards( state = DEFAULT_STATE, action ) {
70
  )
71
  ? state.byDashboard[ action.dashboardId ]
72
  : [
73
- ...get(
74
- state,
75
- [ 'byDashboard', action.dashboardId ],
76
- []
77
- ),
78
- action.card.id,
79
- ],
80
  },
81
  };
82
  case RECEIVE_DASHBOARD_CARD_QUERY_ARGS:
@@ -124,9 +124,9 @@ export default function cards( state = DEFAULT_STATE, action ) {
124
  return ! action.context
125
  ? state
126
  : {
127
- ...state,
128
- adding: [ ...state.adding, action.context ],
129
- };
130
  case FINISH_ADD_DASHBOARD_CARD:
131
  case FAILED_ADD_DASHBOARD_CARD:
132
  return {
70
  )
71
  ? state.byDashboard[ action.dashboardId ]
72
  : [
73
+ ...get(
74
+ state,
75
+ [ 'byDashboard', action.dashboardId ],
76
+ []
77
+ ),
78
+ action.card.id,
79
+ ],
80
  },
81
  };
82
  case RECEIVE_DASHBOARD_CARD_QUERY_ARGS:
124
  return ! action.context
125
  ? state
126
  : {
127
+ ...state,
128
+ adding: [ ...state.adding, action.context ],
129
+ };
130
  case FINISH_ADD_DASHBOARD_CARD:
131
  case FAILED_ADD_DASHBOARD_CARD:
132
  return {
core/modules/dashboard/entries/dashboard/store/controls.js CHANGED
@@ -34,7 +34,7 @@ export function apiFetch( request ) {
34
  * Calls a selector using the current state.
35
  *
36
  * @param {string} selectorName Selector name.
37
- * @param {Array} args Selector arguments.
38
  *
39
  * @return {Object} control descriptor.
40
  */
@@ -51,24 +51,24 @@ export function select( selectorName, ...args ) {
51
  *
52
  * @see @wordpress/notices#createNotice()
53
  *
54
- * @param {?string} status Notice status.
55
- * Defaults to `info`.
56
- * @param {string} content Notice message.
57
- * @param {?Object} options Notice options.
58
- * @param {?string} options.context Context under which to
59
- * group notice.
60
- * @param {?string} options.id Identifier for notice.
61
- * Automatically assigned
62
- * if not specified.
63
- * @param {?boolean} options.isDismissible Whether the notice can
64
- * be dismissed by user.
65
- * Defaults to `true`.
66
- * @param {?number} options.autoDismiss Whether the notice should
67
- * by automatically dismissed
68
- * after x milliseconds.
69
- * Defaults to `false`.
70
- * @param {?Array<Object>} options.actions User actions to be
71
- * presented with notice.
72
  *
73
  * @return {Object} control descriptor.
74
  */
34
  * Calls a selector using the current state.
35
  *
36
  * @param {string} selectorName Selector name.
37
+ * @param {Array} args Selector arguments.
38
  *
39
  * @return {Object} control descriptor.
40
  */
51
  *
52
  * @see @wordpress/notices#createNotice()
53
  *
54
+ * @param {?string} status Notice status.
55
+ * Defaults to `info`.
56
+ * @param {string} content Notice message.
57
+ * @param {?Object} options Notice options.
58
+ * @param {?string} options.context Context under which to
59
+ * group notice.
60
+ * @param {?string} options.id Identifier for notice.
61
+ * Automatically assigned
62
+ * if not specified.
63
+ * @param {?boolean} options.isDismissible Whether the notice can
64
+ * be dismissed by user.
65
+ * Defaults to `true`.
66
+ * @param {?number} options.autoDismiss Whether the notice should
67
+ * by automatically dismissed
68
+ * after x milliseconds.
69
+ * Defaults to `false`.
70
+ * @param {?Array<Object>} options.actions User actions to be
71
+ * presented with notice.
72
  *
73
  * @return {Object} control descriptor.
74
  */
core/modules/dashboard/entries/dashboard/store/dashboard/actions.js CHANGED
@@ -125,7 +125,7 @@ export function failedDeleteDashboard( dashboardId, error ) {
125
  * Triggers additional actions as opposed to just saving the dashboard.
126
  *
127
  * @param {Object} dashboard Dashboard data.
128
- * @param {*} [context] Additional context about this request for use in subsequent actions.
129
  */
130
  export function* addDashboard( dashboard, context ) {
131
  yield startAddDashboard( dashboard, context );
@@ -158,7 +158,7 @@ export function* addDashboard( dashboard, context ) {
158
  /**
159
  * Action triggered to save a dashboard.
160
  *
161
- * @param {Object} dashboard Record to be saved.
162
  *
163
  * @return {Object|Error} Updated record or error.
164
  */
125
  * Triggers additional actions as opposed to just saving the dashboard.
126
  *
127
  * @param {Object} dashboard Dashboard data.
128
+ * @param {*} [context] Additional context about this request for use in subsequent actions.
129
  */
130
  export function* addDashboard( dashboard, context ) {
131
  yield startAddDashboard( dashboard, context );
158
  /**
159
  * Action triggered to save a dashboard.
160
  *
161
+ * @param {Object} dashboard Record to be saved.
162
  *
163
  * @return {Object|Error} Updated record or error.
164
  */
core/modules/dashboard/entries/dashboard/store/dashboard/reducer.js CHANGED
@@ -90,9 +90,9 @@ export default function dashboard( state = DEFAULT_STATE, action ) {
90
  case START_ADD_DASHBOARD:
91
  return action.context
92
  ? {
93
- ...state,
94
- adding: [ ...state.adding, action.context ],
95
- }
96
  : state;
97
  case FINISH_ADD_DASHBOARD:
98
  case FAILED_ADD_DASHBOARD:
90
  case START_ADD_DASHBOARD:
91
  return action.context
92
  ? {
93
+ ...state,
94
+ adding: [ ...state.adding, action.context ],
95
+ }
96
  : state;
97
  case FINISH_ADD_DASHBOARD:
98
  case FAILED_ADD_DASHBOARD:
core/modules/dashboard/entries/dashboard/utils.js CHANGED
@@ -67,7 +67,7 @@ export const BREAKPOINTS = Object.freeze(
67
  BREAKPOINT_ORDER.reduce(
68
  ( acc, bp ) => ( {
69
  ...acc,
70
- [ bp ]: 250 * GRID_COLUMNS[ bp ] + 20 * ( GRID_COLUMNS[ bp ] - 1 ),
71
  } ),
72
  {}
73
  )
@@ -190,11 +190,11 @@ export function transformApiLayoutToGrid(
190
  /**
191
  * Transform the layout information from the API to a format compatible for the react-grid-layout library.
192
  *
193
- * @param {number} dashboardId
194
- * @param {Object} card
195
- * @param {Object} config
196
- * @param {string} breakpoint
197
- * @param {Array<Object>} [layout] Layout being inserted into. Used to better determine a slot for a card without a position.
198
  * @return {{i: string, x: *, y: *, w: *, h: *}} RGL layout for a single card.
199
  */
200
  export function transformApiLayoutToGridForCard(
@@ -292,9 +292,9 @@ export function transformApiLayoutToGridForCard(
292
  * This is preferable to letting the react-grid-layout handle it because it only does vertical
293
  * packing.
294
  *
295
- * @param {number} numColumns Number of columns wide that are supported.
296
- * @param {Array<Object>} layout The full layout of other items.
297
- * @param {{w: number, h: number}} size The size of the item.
298
  * @return {{x: number, y: number}} Slot position if found, or null if none available.
299
  */
300
  export function findSlot( numColumns, layout, size ) {
@@ -440,9 +440,9 @@ export const areGridLayoutsEqual = memize( _areGridLayoutsEqual );
440
  *
441
  * This is so that the tab order can match the visual order.
442
  *
443
- * @param {Array<Object>} cards Card array.
444
- * @param {Object} layout Grid Layout
445
- * @param {string} breakpoint The breakpoint we are displaying.
446
  *
447
  * @return {Array<Object>} New array with card objects sorted by layout.
448
  */
@@ -451,7 +451,7 @@ function _sortCardsToMatchLayout( cards, layout, breakpoint ) {
451
 
452
  const toSort = [ ...cards ];
453
 
454
- toSort.sort( function ( a, b ) {
455
  const aId = a.id.toString(),
456
  bId = b.id.toString();
457
 
@@ -494,7 +494,7 @@ function _sortCardsToMatchApiLayout( cards, layout ) {
494
  const keyedLayout = keyBy( layout.cards, 'id' );
495
  const toSort = [ ...cards ];
496
 
497
- toSort.sort( function ( a, b ) {
498
  const aId = a.id,
499
  bId = b.id;
500
 
@@ -552,7 +552,7 @@ export function getCardTitle( card, config ) {
552
  * Filter the card title for a particular config.
553
  *
554
  * @param {string} title The card title.
555
- * @param {Object} card The card instance object.
556
  */
557
  title = applyFilters(
558
  `ithemes-security.dashboard.getCardTitle.${ config.slug }`,
@@ -563,8 +563,8 @@ export function getCardTitle( card, config ) {
563
  /**
564
  * Filter the card title.
565
  *
566
- * @param {string} title The card title.
567
- * @param {Object} card The card instance object.
568
  * @param {Object} config The card configuration object.
569
  */
570
  return applyFilters(
67
  BREAKPOINT_ORDER.reduce(
68
  ( acc, bp ) => ( {
69
  ...acc,
70
+ [ bp ]: ( 250 * GRID_COLUMNS[ bp ] ) + ( 20 * ( GRID_COLUMNS[ bp ] - 1 ) ),
71
  } ),
72
  {}
73
  )
190
  /**
191
  * Transform the layout information from the API to a format compatible for the react-grid-layout library.
192
  *
193
+ * @param {number} dashboardId
194
+ * @param {Object} card
195
+ * @param {Object} config
196
+ * @param {string} breakpoint
197
+ * @param {Array<Object>} [layout] Layout being inserted into. Used to better determine a slot for a card without a position.
198
  * @return {{i: string, x: *, y: *, w: *, h: *}} RGL layout for a single card.
199
  */
200
  export function transformApiLayoutToGridForCard(
292
  * This is preferable to letting the react-grid-layout handle it because it only does vertical
293
  * packing.
294
  *
295
+ * @param {number} numColumns Number of columns wide that are supported.
296
+ * @param {Array<Object>} layout The full layout of other items.
297
+ * @param {{w: number, h: number}} size The size of the item.
298
  * @return {{x: number, y: number}} Slot position if found, or null if none available.
299
  */
300
  export function findSlot( numColumns, layout, size ) {
440
  *
441
  * This is so that the tab order can match the visual order.
442
  *
443
+ * @param {Array<Object>} cards Card array.
444
+ * @param {Object} layout Grid Layout
445
+ * @param {string} breakpoint The breakpoint we are displaying.
446
  *
447
  * @return {Array<Object>} New array with card objects sorted by layout.
448
  */
451
 
452
  const toSort = [ ...cards ];
453
 
454
+ toSort.sort( function( a, b ) {
455
  const aId = a.id.toString(),
456
  bId = b.id.toString();
457
 
494
  const keyedLayout = keyBy( layout.cards, 'id' );
495
  const toSort = [ ...cards ];
496
 
497
+ toSort.sort( function( a, b ) {
498
  const aId = a.id,
499
  bId = b.id;
500
 
552
  * Filter the card title for a particular config.
553
  *
554
  * @param {string} title The card title.
555
+ * @param {Object} card The card instance object.
556
  */
557
  title = applyFilters(
558
  `ithemes-security.dashboard.getCardTitle.${ config.slug }`,
563
  /**
564
  * Filter the card title.
565
  *
566
+ * @param {string} title The card title.
567
+ * @param {Object} card The card instance object.
568
  * @param {Object} config The card configuration object.
569
  */
570
  return applyFilters(
core/modules/feature-flags/active.php DELETED
@@ -1,15 +0,0 @@
1
- <?php
2
-
3
- add_action( 'itsec_initialized', function () {
4
- $modules = array_merge( ITSEC_Modules::get_active_modules(), ITSEC_Modules::get_always_active_modules() );
5
-
6
- foreach ( $modules as $module ) {
7
- if ( ! $config = ITSEC_Modules::get_config( $module ) ) {
8
- continue;
9
- }
10
-
11
- foreach ( $config->get_feature_flags() as $flag => $config ) {
12
- ITSEC_Lib_Feature_Flags::register_flag( $flag, $config );
13
- }
14
- }
15
- } );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
core/modules/file-change/module.json CHANGED
@@ -12,7 +12,7 @@
12
  "type": "array",
13
  "items": {
14
  "type": "string",
15
- "format": "file"
16
  },
17
  "uniqueItems": true,
18
  "default": [],
@@ -80,7 +80,8 @@
80
  "type": "object",
81
  "additionalProperties": {
82
  "type": "string",
83
- "pattern": "^[a-f0-9]{32}$"
 
84
  },
85
  "default": {},
86
  "readonly": true
@@ -121,5 +122,11 @@
121
  "compare_file_hashes": {
122
  "install-type": "pro"
123
  }
 
 
 
 
 
 
124
  }
125
  }
12
  "type": "array",
13
  "items": {
14
  "type": "string",
15
+ "format": "relative-file-path"
16
  },
17
  "uniqueItems": true,
18
  "default": [],
80
  "type": "object",
81
  "additionalProperties": {
82
  "type": "string",
83
+ "pattern": "^[a-f0-9]{32}$",
84
+ "format": "file-path"
85
  },
86
  "default": {},
87
  "readonly": true
122
  "compare_file_hashes": {
123
  "install-type": "pro"
124
  }
125
+ },
126
+ "import-export": {
127
+ "exclude-settings": [
128
+ "expected_hashes",
129
+ "last_scan"
130
+ ]
131
  }
132
  }
core/modules/global/entries/settings/app.js CHANGED
@@ -12,7 +12,7 @@ import { useCallback } from '@wordpress/element';
12
  */
13
  import { RjsfFieldFill } from '@ithemes/security-rjsf-theme';
14
  import { useAsync } from '@ithemes/security-hocs';
15
- import { MODULES_STORE_NAME } from '@ithemes/security-data';
16
  import './style.scss';
17
 
18
  function useDetectedIp() {
12
  */
13
  import { RjsfFieldFill } from '@ithemes/security-rjsf-theme';
14
  import { useAsync } from '@ithemes/security-hocs';
15
+ import { MODULES_STORE_NAME } from '@ithemes/security.packages.data';
16
  import './style.scss';
17
 
18
  function useDetectedIp() {
core/modules/global/module.json CHANGED
@@ -283,6 +283,9 @@
283
  }
284
  },
285
  "uiSchema": {
 
 
 
286
  "lockout_white_list": {
287
  "ui:field": "TextareaListField",
288
  "ui:rows": 10
@@ -415,6 +418,9 @@
415
  "server-type": [
416
  "nginx"
417
  ]
 
 
 
418
  }
419
  },
420
  "removed-settings": [
@@ -436,5 +442,18 @@
436
  "lockout_white_list",
437
  "proxy",
438
  "proxy_header"
439
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
440
  }
283
  }
284
  },
285
  "uiSchema": {
286
+ "nginx_file": {
287
+ "ui:resettable": true
288
+ },
289
  "lockout_white_list": {
290
  "ui:field": "TextareaListField",
291
  "ui:rows": 10
418
  "server-type": [
419
  "nginx"
420
  ]
421
+ },
422
+ "enable_grade_report": {
423
+ "install-type": "pro"
424
  }
425
  },
426
  "removed-settings": [
442
  "lockout_white_list",
443
  "proxy",
444
  "proxy_header"
445
+ ],
446
+ "import-export": {
447
+ "import-settings": [
448
+ "proxy",
449
+ "proxy_header",
450
+ "log_location",
451
+ "nginx_file"
452
+ ],
453
+ "exclude-settings": [
454
+ "server_ips",
455
+ "use_cron",
456
+ "cron_test_time"
457
+ ]
458
+ }
459
  }
core/modules/global/settings.php CHANGED
@@ -7,6 +7,8 @@ final class ITSEC_Global_Settings extends Config_Settings {
7
  $default = parent::get_default( $setting, $default );
8
 
9
  switch ( $setting ) {
 
 
10
  case 'log_location':
11
  return ITSEC_Core::get_storage_dir( 'logs' );
12
  case 'enable_remote_help';
7
  $default = parent::get_default( $setting, $default );
8
 
9
  switch ( $setting ) {
10
+ case 'nginx_file':
11
+ return ABSPATH . 'nginx.conf';
12
  case 'log_location':
13
  return ITSEC_Core::get_storage_dir( 'logs' );
14
  case 'enable_remote_help';
core/modules/malware-scheduling/active.php ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <?php
2
+
3
+ require_once( 'class-itsec-malware-scheduling.php' );
4
+ $itsec_malware_scheduling = new ITSEC_Malware_Scheduling();
5
+ $itsec_malware_scheduling->run();
core/modules/malware-scheduling/class-itsec-malware-scheduling-scanner.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ use iThemesSecurity\Site_Scanner\Scan;
4
+
5
+ class ITSEC_Malware_Scheduling_Scanner {
6
+
7
+ /**
8
+ * Perform the scheduled scan and send an email summarizing the results.
9
+ *
10
+ * @param int $site_id
11
+ *
12
+ * @return Scan
13
+ */
14
+ public static function scan( $site_id = 0 ) {
15
+ $scan = ITSEC_Site_Scanner_API::scan( $site_id );
16
+
17
+ if ( $scan->is_error() ) {
18
+ if ( $scan->get_error()->get_error_message( 'itsec-temporary-server-error' ) ) {
19
+ return $scan;
20
+ }
21
+
22
+ if ( $scan->get_error()->get_error_message( 'rate_limit_exceeded' ) ) {
23
+ return $scan;
24
+ }
25
+ }
26
+
27
+ if ( ITSEC_Lib_Remote_Messages::has_action( 'malware-scanner-disable-malware-warnings' ) ) {
28
+ return $scan;
29
+ }
30
+
31
+ self::send_email( $scan );
32
+
33
+ return $scan;
34
+ }
35
+
36
+ /**
37
+ * Get the next site ID to scan based on the current site ID.
38
+ *
39
+ * @param int $site_id
40
+ *
41
+ * @return int|null
42
+ */
43
+ public static function get_next_site_id( $site_id ) {
44
+
45
+ global $wpdb;
46
+
47
+ $id = $wpdb->get_var( $wpdb->prepare( "SELECT `blog_id` FROM {$wpdb->blogs} WHERE `public` = 1 AND `archived` = 0 AND `deleted` = 0 AND `blog_id` > %d ORDER BY `blog_id` ASC LIMIT 1", $site_id ) );
48
+
49
+ if ( null === $id ) {
50
+ return null;
51
+ }
52
+
53
+ if ( is_main_site( $id ) ) {
54
+ return static::get_next_site_id( $id );
55
+ }
56
+
57
+ return (int) $id;
58
+ }
59
+
60
+ /**
61
+ * Sends an email with the scan results.
62
+ *
63
+ * @param Scan $scan
64
+ */
65
+ public static function send_email( $scan ) {
66
+
67
+ $nc = ITSEC_Core::get_notification_center();
68
+
69
+ if ( ! $nc->is_notification_enabled( 'malware-scheduling' ) ) {
70
+ return;
71
+ }
72
+
73
+ ITSEC_Site_Scanner_Mail::send( $scan );
74
+ }
75
+ }
core/modules/malware-scheduling/class-itsec-malware-scheduling.php ADDED
@@ -0,0 +1,156 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ use iThemesSecurity\Site_Scanner\Scan;
4
+
5
+ class ITSEC_Malware_Scheduling {
6
+
7
+ // Approximately 10 hours since first try
8
+ const MAX_TRIES = 8;
9
+
10
+ public function run() {
11
+ add_action( 'itsec_scheduled_malware-scan', array( $this, 'run_scan' ) );
12
+ add_action( 'itsec_scheduled_malware-scan-site', array( $this, 'run_sub_site_scan' ) );
13
+
14
+ add_filter( 'itsec_notifications', array( $this, 'register_notification' ) );
15
+ add_filter( 'itsec_malware-scheduling_notification_strings', array( $this, 'notification_strings' ) );
16
+
17
+ ITSEC_Core::get_scheduler()->register_loop( 'malware-scan-site', ITSEC_Scheduler::S_TWICE_DAILY, 600 );
18
+ }
19
+
20
+ /**
21
+ * Run the malware scan.
22
+ *
23
+ * @param ITSEC_Job $job
24
+ */
25
+ public function run_scan( $job ) {
26
+
27
+ require_once( dirname( __FILE__ ) . '/class-itsec-malware-scheduling-scanner.php' );
28
+
29
+ $scan = ITSEC_Malware_Scheduling_Scanner::scan();
30
+
31
+ if ( $this->retry_if_rate_limited( $job, $scan ) ) {
32
+ return;
33
+ }
34
+
35
+ if ( $scan->is_error() && $scan->get_error()->get_error_message( 'itsec-temporary-server-error' ) ) {
36
+ $retry = $job->is_retry();
37
+
38
+ if ( $retry > self::MAX_TRIES ) {
39
+ ITSEC_Malware_Scheduling_Scanner::send_email( $scan );
40
+ } else {
41
+ $job->reschedule_in( $this->minutes_until_retry( $retry + 1 ) );
42
+ }
43
+ }
44
+ }
45
+
46
+ /**
47
+ * Run the malware scan for a sub site.
48
+ *
49
+ * @param ITSEC_Job $job
50
+ */
51
+ public function run_sub_site_scan( $job ) {
52
+ $data = $job->get_data();
53
+
54
+ if ( empty( $data['site_id'] ) ) {
55
+ return; // Todo maybe reschedule if things get corrupted.
56
+ }
57
+
58
+ $scan = ITSEC_Malware_Scheduling_Scanner::scan( $data['site_id'] );
59
+
60
+ if ( $this->retry_if_rate_limited( $job, $scan ) ) {
61
+ return;
62
+ }
63
+
64
+ if ( $scan->is_error() && $scan->get_error()->get_error_message( 'itsec-temporary-server-error' ) ) {
65
+ $job->reschedule_in( HOUR_IN_SECONDS );
66
+
67
+ return;
68
+ }
69
+
70
+ $next = ITSEC_Malware_Scheduling_Scanner::get_next_site_id( $data['site_id'] );
71
+
72
+ if ( null === $next ) {
73
+ $job->schedule_new_loop( array( 'site_id' => ITSEC_Malware_Scheduling_Scanner::get_next_site_id( 0 ) ) );
74
+ } else {
75
+ $job->schedule_next_in_loop( array( 'site_id' => $next ) );
76
+ }
77
+ }
78
+
79
+ /**
80
+ * Schedule a retry if we have been rate limited.
81
+ *
82
+ * @param ITSEC_Job $job
83
+ * @param Scan $scan
84
+ *
85
+ * @return bool
86
+ */
87
+ private function retry_if_rate_limited( ITSEC_Job $job, $scan ) {
88
+ if ( ! $scan->is_error() ) {
89
+ return false;
90
+ }
91
+
92
+ if ( ! in_array( 'rate_limit_exceeded', $scan->get_error()->get_error_codes(), true ) ) {
93
+ return false;
94
+ }
95
+
96
+ $data = $scan->get_error()->get_error_data( 'rate_limit_exceeded' );
97
+
98
+ if ( is_array( $data ) && isset( $data['wait'] ) ) {
99
+ $seconds = $data['wait'] + 30;
100
+ } else {
101
+ $seconds = 30 * MINUTE_IN_SECONDS;
102
+ }
103
+
104
+ $job->reschedule_in( $seconds );
105
+
106
+ return true;
107
+ }
108
+
109
+ /**
110
+ * Determine the number of minutes we should wait before contacting Sucuri.
111
+ *
112
+ * Exponential back-off modified to have a minimum of 10 minute difference.
113
+ *
114
+ * [ ( 2ˣ-1 ) / 2 ] + 10x
115
+ *
116
+ * @param int $try Try count.
117
+ *
118
+ * @return int
119
+ */
120
+ private function minutes_until_retry( $try ) {
121
+ return (int) floor( ( ( pow( 2, $try ) - 1 ) / 2 ) + ( 10 * $try ) );
122
+ }
123
+
124
+ /**
125
+ * Register the Scheduled Malware Scan notification.
126
+ *
127
+ * @param array $notifications
128
+ *
129
+ * @return array
130
+ */
131
+ public function register_notification( $notifications ) {
132
+ $notifications['malware-scheduling'] = array(
133
+ 'recipient' => ITSEC_Notification_Center::R_USER_LIST,
134
+ 'optional' => true,
135
+ 'module' => 'malware-scheduling',
136
+ );
137
+
138
+ return $notifications;
139
+ }
140
+
141
+ /**
142
+ * Register the strings for the Scheduled Malware Scan notification.
143
+ *
144
+ * @return array
145
+ */
146
+ public function notification_strings() {
147
+ return array(
148
+ 'label' => __( 'Site Scan Results', 'better-wp-security' ),
149
+ 'description' => sprintf(
150
+ __( 'The %1$sSite Scan Scheduling%2$s module sends an email if it discovers an issue or has repeated difficulty conducting the scan.', 'better-wp-security' ),
151
+ ITSEC_Core::get_link_for_settings_route( ITSEC_Core::get_settings_module_route( 'malware-scheduling' ) ),
152
+ '</a>'
153
+ ),
154
+ );
155
+ }
156
+ }
core/modules/malware-scheduling/deactivate.php ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ <?php
2
+ ITSEC_Core::get_scheduler()->unschedule( 'malware-scan' );
3
+ ITSEC_Core::get_scheduler()->unschedule_single( 'malware-scan-site', null );
core/modules/malware-scheduling/index.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php // Silence is golden.
core/modules/malware-scheduling/labels.php ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <?php
2
+
3
+ return [
4
+ 'title' => __( 'Site Scan Scheduling', 'better-wp-security' ),
5
+ ];
core/modules/malware-scheduling/module.json ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "id": "malware-scheduling",
3
+ "status": {
4
+ "free": "default-inactive",
5
+ "pro": "default-active"
6
+ },
7
+ "type": "site-check",
8
+ "title": "Site Scan Scheduling",
9
+ "description": "Protect your site with automated site scans. When this feature is enabled, the site will be automatically scanned twice a day. If a problem is found, an email is sent to select users.",
10
+ "scheduling": {
11
+ "malware-scan": {
12
+ "type": "recurring",
13
+ "schedule": "twice-daily"
14
+ }
15
+ }
16
+ }
core/modules/malware-scheduling/scheduling.php ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ return static function ( ITSEC_Scheduler $scheduler ) {
4
+ if ( ! is_multisite() ) {
5
+ return;
6
+ }
7
+
8
+ if ( $scheduler->is_single_scheduled( 'malware-scan-site', null ) ) {
9
+ return;
10
+ }
11
+
12
+ if ( ! $site_id = ITSEC_Malware_Scheduling_Scanner::get_next_site_id( 0 ) ) {
13
+ return;
14
+ }
15
+
16
+ $scheduler->register_loop( 'malware-scan-site', ITSEC_Scheduler::S_TWICE_DAILY, 600 );
17
+ $scheduler->schedule_loop( 'malware-scan-site', compact( 'site_id' ), [
18
+ 'fire_at' => ITSEC_Core::get_current_time_gmt() + ( 60 * 15 ),
19
+ ] );
20
+ };
core/modules/malware-scheduling/setup.php ADDED
@@ -0,0 +1,104 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class ITSEC_Malware_Scheduling_Setup {
4
+ public function __construct() {
5
+ add_action( 'itsec_modules_do_plugin_deactivation', array( $this, 'execute_deactivate' ) );
6
+ add_action( 'itsec_modules_do_plugin_uninstall', array( $this, 'execute_uninstall' ) );
7
+ add_action( 'itsec_modules_do_plugin_upgrade', array( $this, 'execute_upgrade' ) );
8
+ }
9
+
10
+ /**
11
+ * Execute module deactivation
12
+ *
13
+ * @return void
14
+ */
15
+ public function execute_deactivate() {
16
+ global $wpdb;
17
+
18
+ $wpdb->query( "DELETE FROM `" . $wpdb->base_prefix . "options` WHERE `option_name` LIKE ('%itsec_malware_scheduling_last_scans%')" );
19
+ }
20
+
21
+ /**
22
+ * Execute module uninstall
23
+ *
24
+ * @return void
25
+ */
26
+ public function execute_uninstall() {
27
+ $this->execute_deactivate();
28
+
29
+ delete_site_option( 'itsec_malware_scheduling' );
30
+ delete_site_option( 'itsec_malware_scheduling_report_queue' );
31
+ }
32
+
33
+ /**
34
+ * Execute module upgrade
35
+ *
36
+ * @param int $itsec_old_version
37
+ *
38
+ * @return void
39
+ */
40
+ public function execute_upgrade( $itsec_old_version ) {
41
+ if ( $itsec_old_version < 4041 ) {
42
+ $current_options = get_site_option( 'itsec_malware_scheduling' );
43
+
44
+ // If there are no current options, go with the new defaults by not saving anything
45
+ if ( is_array( $current_options ) ) {
46
+ // Make sure the new module is properly activated or deactivated
47
+ if ( $current_options['enabled'] ) {
48
+ ITSEC_Modules::activate( 'malware-scheduling' );
49
+ } else {
50
+ ITSEC_Modules::deactivate( 'malware-scheduling' );
51
+ }
52
+
53
+ $defaults = ITSEC_Modules::get_defaults( 'malware-scheduling' );
54
+ $options = $defaults;
55
+
56
+ foreach ( $defaults as $name => $value ) {
57
+ if ( isset( $current_options[ $name ] ) ) {
58
+ $options[ $name ] = $current_options[ $name ];
59
+ }
60
+ }
61
+
62
+ // Module needs to be loaded to save, in order to handle adjusting schedule
63
+ if ( ! class_exists( 'ITSEC_Malware_Scheduling' ) ) {
64
+ require_once( 'class-itsec-malware-scheduling.php' );
65
+ }
66
+
67
+ ITSEC_Modules::set_settings( 'malware-scheduling', $options );
68
+
69
+ delete_site_option( 'itsec_malware_scheduling_report_queue' );
70
+ delete_site_option( 'itsec_malware_scheduling_last_scan' );
71
+ }
72
+ }
73
+
74
+ if ( $itsec_old_version < 4079 ) {
75
+ wp_clear_scheduled_hook( 'itsec_malware_scheduled_scan' );
76
+
77
+ $crons = _get_cron_array();
78
+
79
+ foreach ( $crons as $timestamp => $args ) {
80
+ unset( $crons[ $timestamp ]['itsec_malware_retry_scheduled_scan'] );
81
+
82
+ if ( empty( $crons[ $timestamp ] ) ) {
83
+ unset( $crons[ $timestamp ] );
84
+ }
85
+ }
86
+
87
+ _set_cron_array( $crons );
88
+ }
89
+
90
+ if ( $itsec_old_version < 4084 ) {
91
+ $scheduler = ITSEC_Core::get_scheduler();
92
+ $scheduler->unschedule_single( 'malware-scan-site', null );
93
+ }
94
+
95
+ if ( $itsec_old_version < 4119 ) {
96
+ $scheduler = ITSEC_Core::get_scheduler();
97
+ $scheduler->unschedule( 'malware-scan' );
98
+ $scheduler->unschedule_single( 'malware-scan-site', null );
99
+ $scheduler->register_events_for_module( 'malware-scheduling' );
100
+ }
101
+ }
102
+ }
103
+
104
+ new ITSEC_Malware_Scheduling_Setup();
core/modules/network-brute-force/entries/settings/app.js CHANGED
@@ -9,7 +9,7 @@ import { useDispatch } from '@wordpress/data';
9
  * Internal dependencies
10
  */
11
  import { RjsfFieldFill } from '@ithemes/security-rjsf-theme';
12
- import { MODULES_STORE_NAME } from '@ithemes/security-data';
13
  import './style.scss';
14
 
15
  function ResetApiKey() {
9
  * Internal dependencies
10
  */
11
  import { RjsfFieldFill } from '@ithemes/security-rjsf-theme';
12
+ import { MODULES_STORE_NAME } from '@ithemes/security.packages.data';
13
  import './style.scss';
14
 
15
  function ResetApiKey() {
core/modules/network-brute-force/module.json CHANGED
@@ -84,6 +84,13 @@
84
  "email",
85
  "updates_optin"
86
  ],
 
 
 
 
 
 
 
87
  "removed-settings": [
88
  "api_nag"
89
  ],
84
  "email",
85
  "updates_optin"
86
  ],
87
+ "import-export": {
88
+ "import-settings": [
89
+ "email",
90
+ "updates_optin",
91
+ "api_key"
92
+ ]
93
+ },
94
  "removed-settings": [
95
  "api_nag"
96
  ],
core/modules/notification-center/entries/settings/app.js CHANGED
@@ -17,7 +17,7 @@ import { useDispatch, useSelect } from '@wordpress/data';
17
  import { useAsync } from '@ithemes/security-hocs';
18
  import { Page as RegisterPage } from '@ithemes/security.pages.settings';
19
  import { STORE_NAME as SEARCH_STORE_NAME } from '@ithemes/security-search';
20
- import { MODULES_STORE_NAME } from '@ithemes/security-data';
21
  import { Page } from './components';
22
  import './style.scss';
23
 
@@ -46,7 +46,7 @@ export default function App() {
46
  title={ __( 'Notifications', 'better-wp-security' ) }
47
  icon="bell"
48
  priority={ 20 }
49
- roots={ [ 'onboard', 'settings' ] }
50
  key={ asyncNotifications.status + asyncUsersAndRoles.status }
51
  >
52
  { () => (
17
  import { useAsync } from '@ithemes/security-hocs';
18
  import { Page as RegisterPage } from '@ithemes/security.pages.settings';
19
  import { STORE_NAME as SEARCH_STORE_NAME } from '@ithemes/security-search';
20
+ import { MODULES_STORE_NAME } from '@ithemes/security.packages.data';
21
  import { Page } from './components';
22
  import './style.scss';
23
 
46
  title={ __( 'Notifications', 'better-wp-security' ) }
47
  icon="bell"
48
  priority={ 20 }
49
+ roots={ [ 'onboard', 'import', 'settings' ] }
50
  key={ asyncNotifications.status + asyncUsersAndRoles.status }
51
  >
52
  { () => (
core/modules/notification-center/entries/settings/components/notification/index.js CHANGED
@@ -40,6 +40,8 @@ export default function Notification( {
40
  isDirty,
41
  onSubmit,
42
  onUndo,
 
 
43
  apiError,
44
  } ) {
45
  const isEnabled = ! notification.optional || settings.enabled;
@@ -51,8 +53,8 @@ export default function Notification( {
51
  description={ notification.l10n.description }
52
  />
53
  <PrimaryForm
54
- saveLabel={ __( 'Save All', 'better-wp-security' ) }
55
- saveDisabled={ ! isDirty }
56
  isSaving={ isSaving }
57
  onSubmit={ onSubmit }
58
  apiError={ apiError }
40
  isDirty,
41
  onSubmit,
42
  onUndo,
43
+ saveLabel = __( 'Save All', 'better-wp-security' ),
44
+ allowCleanSave = false,
45
  apiError,
46
  } ) {
47
  const isEnabled = ! notification.optional || settings.enabled;
53
  description={ notification.l10n.description }
54
  />
55
  <PrimaryForm
56
+ saveLabel={ saveLabel }
57
+ saveDisabled={ ! isDirty && ! allowCleanSave }
58
  isSaving={ isSaving }
59
  onSubmit={ onSubmit }
60
  apiError={ apiError }
core/modules/notification-center/entries/settings/components/page/index.js CHANGED
@@ -22,7 +22,7 @@ import {
22
  PageHeader,
23
  Breadcrumbs,
24
  } from '@ithemes/security.pages.settings';
25
- import { MODULES_STORE_NAME } from '@ithemes/security-data';
26
  import { Settings, Notification } from '../';
27
 
28
  export default function Page( { asyncNotifications, asyncUsersAndRoles } ) {
@@ -39,8 +39,10 @@ export default function Page( { asyncNotifications, asyncUsersAndRoles } ) {
39
  value: usersAndRoles,
40
  } = asyncUsersAndRoles;
41
 
42
- const error = useSelect( ( select ) =>
43
- select( MODULES_STORE_NAME ).getError( 'notification-center' )
 
 
44
  );
45
  const { saveSettings } = useDispatch( MODULES_STORE_NAME );
46
 
@@ -52,14 +54,22 @@ export default function Page( { asyncNotifications, asyncUsersAndRoles } ) {
52
  return null;
53
  }
54
 
 
 
 
 
 
 
 
 
55
  if ( 'onboard' === root ) {
56
  return (
57
  <Settings
58
  usersAndRoles={ usersAndRoles }
59
- onSubmit={ goNext }
60
- saveLabel={ __( 'Continue', 'better-wp-security' ) }
61
  allowUndo={ false }
62
- allowCleanSave
63
  apiError={ error }
64
  />
65
  );
@@ -83,36 +93,51 @@ export default function Page( { asyncNotifications, asyncUsersAndRoles } ) {
83
  notifications={ notifications }
84
  usersAndRoles={ usersAndRoles }
85
  apiError={ error }
 
 
 
86
  />
87
  </Route>
88
  <Route path={ path }>
89
  { nav }
90
  <Settings
91
  usersAndRoles={ usersAndRoles }
92
- onSubmit={ () => saveSettings( 'notification-center' ) }
93
  apiError={ error }
 
 
94
  />
95
  </Route>
96
  </Switch>
97
  );
98
  }
99
 
100
- function NotificationPage( { notifications, usersAndRoles, apiError } ) {
 
 
 
 
 
 
 
101
  const { child: notification } = useParams();
102
 
103
- const { isDirty, isSaving, settings } = useSelect( ( select ) => ( {
104
- isDirty: select( MODULES_STORE_NAME ).areSettingsDirty(
105
- 'notification-center'
106
- ),
107
- isSaving: select( MODULES_STORE_NAME ).isSavingSettings(
108
- 'notification-center'
109
- ),
110
- settings: select( MODULES_STORE_NAME ).getEditedSetting(
111
- 'notification-center',
112
- 'notifications'
113
- ),
114
- } ) );
115
- const { editSetting, saveSettings, resetSettingEdits } = useDispatch(
 
 
 
116
  MODULES_STORE_NAME
117
  );
118
 
@@ -139,8 +164,10 @@ function NotificationPage( { notifications, usersAndRoles, apiError } ) {
139
  onChange={ onChange }
140
  isSaving={ isSaving }
141
  isDirty={ isDirty }
142
- onSubmit={ () => saveSettings( 'notification-center' ) }
143
  onUndo={ () => resetSettingEdits( 'notification-center' ) }
 
 
144
  apiError={ apiError }
145
  />
146
  </>
22
  PageHeader,
23
  Breadcrumbs,
24
  } from '@ithemes/security.pages.settings';
25
+ import { MODULES_STORE_NAME } from '@ithemes/security.packages.data';
26
  import { Settings, Notification } from '../';
27
 
28
  export default function Page( { asyncNotifications, asyncUsersAndRoles } ) {
39
  value: usersAndRoles,
40
  } = asyncUsersAndRoles;
41
 
42
+ const error = useSelect(
43
+ ( select ) =>
44
+ select( MODULES_STORE_NAME ).getError( 'notification-center' ),
45
+ []
46
  );
47
  const { saveSettings } = useDispatch( MODULES_STORE_NAME );
48
 
54
  return null;
55
  }
56
 
57
+ const onSubmit =
58
+ root === 'settings'
59
+ ? () => saveSettings( 'notification-center' )
60
+ : goNext;
61
+ const saveLabel =
62
+ root === 'settings' ? undefined : __( 'Continue', 'better-wp-security' );
63
+ const allowCleanSave = root !== 'settings';
64
+
65
  if ( 'onboard' === root ) {
66
  return (
67
  <Settings
68
  usersAndRoles={ usersAndRoles }
69
+ onSubmit={ onSubmit }
70
+ saveLabel={ saveLabel }
71
  allowUndo={ false }
72
+ allowCleanSave={ allowCleanSave }
73
  apiError={ error }
74
  />
75
  );
93
  notifications={ notifications }
94
  usersAndRoles={ usersAndRoles }
95
  apiError={ error }
96
+ onSubmit={ onSubmit }
97
+ saveLabel={ saveLabel }
98
+ allowCleanSave={ allowCleanSave }
99
  />
100
  </Route>
101
  <Route path={ path }>
102
  { nav }
103
  <Settings
104
  usersAndRoles={ usersAndRoles }
105
+ onSubmit={ onSubmit }
106
  apiError={ error }
107
+ saveLabel={ saveLabel }
108
+ allowCleanSave={ allowCleanSave }
109
  />
110
  </Route>
111
  </Switch>
112
  );
113
  }
114
 
115
+ function NotificationPage( {
116
+ notifications,
117
+ usersAndRoles,
118
+ apiError,
119
+ onSubmit,
120
+ saveLabel,
121
+ allowCleanSave,
122
+ } ) {
123
  const { child: notification } = useParams();
124
 
125
+ const { isDirty, isSaving, settings } = useSelect(
126
+ ( select ) => ( {
127
+ isDirty: select( MODULES_STORE_NAME ).areSettingsDirty(
128
+ 'notification-center'
129
+ ),
130
+ isSaving: select( MODULES_STORE_NAME ).isSavingSettings(
131
+ 'notification-center'
132
+ ),
133
+ settings: select( MODULES_STORE_NAME ).getEditedSetting(
134
+ 'notification-center',
135
+ 'notifications'
136
+ ),
137
+ } ),
138
+ []
139
+ );
140
+ const { editSetting, resetSettingEdits } = useDispatch(
141
  MODULES_STORE_NAME
142
  );
143
 
164
  onChange={ onChange }
165
  isSaving={ isSaving }
166
  isDirty={ isDirty }
167
+ onSubmit={ onSubmit }
168
  onUndo={ () => resetSettingEdits( 'notification-center' ) }
169
+ saveLabel={ saveLabel }
170
+ allowCleanSave={ allowCleanSave }
171
  apiError={ apiError }
172
  />
173
  </>
core/modules/notification-center/entries/settings/components/settings/index.js CHANGED
@@ -4,6 +4,7 @@
4
  import { TextControl, Button } from '@wordpress/components';
5
  import { useSelect, useDispatch } from '@wordpress/data';
6
  import { __ } from '@wordpress/i18n';
 
7
 
8
  /**
9
  * Internal dependencies
@@ -14,8 +15,9 @@ import {
14
  PageHeader,
15
  PrimaryForm,
16
  PrimaryFormSection,
 
17
  } from '@ithemes/security.pages.settings';
18
- import { MODULES_STORE_NAME } from '@ithemes/security-data';
19
  import { UserRoleList } from '..';
20
 
21
  export default function Settings( {
@@ -26,6 +28,8 @@ export default function Settings( {
26
  allowCleanSave = false,
27
  apiError,
28
  } ) {
 
 
29
  const { isDirty, isSaving, fromEmail, defaultRecipients } = useSelect(
30
  ( select ) => ( {
31
  isDirty: select( MODULES_STORE_NAME ).areSettingsDirty(
@@ -44,12 +48,24 @@ export default function Settings( {
44
  'notification-center',
45
  'default_recipients'
46
  ) || {},
47
- } )
 
48
  );
49
  const { editSetting, resetSettingEdits } = useDispatch(
50
  MODULES_STORE_NAME
51
  );
52
 
 
 
 
 
 
 
 
 
 
 
 
53
  return (
54
  <>
55
  <PageHeader
@@ -63,8 +79,9 @@ export default function Settings( {
63
  saveLabel={ saveLabel }
64
  saveDisabled={ ! isDirty && ! allowCleanSave }
65
  isSaving={ isSaving }
66
- onSubmit={ onSubmit }
67
  apiError={ apiError }
 
68
  buttons={
69
  allowUndo && [
70
  <Button
4
  import { TextControl, Button } from '@wordpress/components';
5
  import { useSelect, useDispatch } from '@wordpress/data';
6
  import { __ } from '@wordpress/i18n';
7
+ import { useState } from '@wordpress/element';
8
 
9
  /**
10
  * Internal dependencies
15
  PageHeader,
16
  PrimaryForm,
17
  PrimaryFormSection,
18
+ useModuleSchemaValidator,
19
  } from '@ithemes/security.pages.settings';
20
+ import { MODULES_STORE_NAME } from '@ithemes/security.packages.data';
21
  import { UserRoleList } from '..';
22
 
23
  export default function Settings( {
28
  allowCleanSave = false,
29
  apiError,
30
  } ) {
31
+ const validator = useModuleSchemaValidator( 'notification-center' );
32
+ const [ errors, setErrors ] = useState( [] );
33
  const { isDirty, isSaving, fromEmail, defaultRecipients } = useSelect(
34
  ( select ) => ( {
35
  isDirty: select( MODULES_STORE_NAME ).areSettingsDirty(
48
  'notification-center',
49
  'default_recipients'
50
  ) || {},
51
+ } ),
52
+ []
53
  );
54
  const { editSetting, resetSettingEdits } = useDispatch(
55
  MODULES_STORE_NAME
56
  );
57
 
58
+ const maybeSubmit = () => {
59
+ const isValid = validator();
60
+
61
+ if ( isValid === true ) {
62
+ setErrors( [] );
63
+ onSubmit();
64
+ } else {
65
+ setErrors( isValid.errorText );
66
+ }
67
+ };
68
+
69
  return (
70
  <>
71
  <PageHeader
79
  saveLabel={ saveLabel }
80
  saveDisabled={ ! isDirty && ! allowCleanSave }
81
  isSaving={ isSaving }
82
+ onSubmit={ maybeSubmit }
83
  apiError={ apiError }
84
+ errors={ errors }
85
  buttons={
86
  allowUndo && [
87
  <Button
core/modules/notification-center/entries/settings/components/user-role-list/index.js CHANGED
@@ -34,8 +34,8 @@ export default function UserRoleList( {
34
  checked
35
  ? [ ...value, item ]
36
  : value.filter(
37
- ( maybe ) => maybe !== item
38
- )
39
  )
40
  }
41
  />
@@ -54,8 +54,8 @@ export default function UserRoleList( {
54
  checked
55
  ? [ ...value, item ]
56
  : value.filter(
57
- ( maybe ) => maybe !== item
58
- )
59
  )
60
  }
61
  />
34
  checked
35
  ? [ ...value, item ]
36
  : value.filter(
37
+ ( maybe ) => maybe !== item
38
+ )
39
  )
40
  }
41
  />
54
  checked
55
  ? [ ...value, item ]
56
  : value.filter(
57
+ ( maybe ) => maybe !== item
58
+ )
59
  )
60
  }
61
  />
core/modules/notification-center/module.json CHANGED
@@ -158,5 +158,19 @@
158
  },
159
  "onboard-settings": [
160
  "default_recipients"
161
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
162
  }
158
  },
159
  "onboard-settings": [
160
  "default_recipients"
161
+ ],
162
+ "import-export": {
163
+ "import-settings": [
164
+ "from_email",
165
+ "default_recipients"
166
+ ],
167
+ "exclude-settings": [
168
+ "last_sent",
169
+ "resend_at",
170
+ "data",
171
+ "last_mail_error",
172
+ "default_recipients.user_list.*",
173
+ "notifications.*.user_list.*"
174
+ ]
175
+ }
176
  }
core/modules/promos/entries/dashboard/app.js CHANGED
@@ -68,14 +68,14 @@ function Footer() {
68
  </section>
69
  <FlexSpacer />
70
  <a
71
- href="https://ithemes.com/security/why-go-pro/"
72
  className="itsec-promo-pro-upgrade__details"
73
  >
74
  { __( 'What’s included with Pro?', 'better-wp-security' ) }
75
  </a>
76
  <Button
77
  className="itsec-promo-pro-upgrade__button"
78
- href="https://ithemes.com/security/"
79
  >
80
  { __( 'Go Pro Now', 'better-wp-security' ) }
81
  </Button>
68
  </section>
69
  <FlexSpacer />
70
  <a
71
+ href="https://ithem.es/included-with-pro"
72
  className="itsec-promo-pro-upgrade__details"
73
  >
74
  { __( 'What’s included with Pro?', 'better-wp-security' ) }
75
  </a>
76
  <Button
77
  className="itsec-promo-pro-upgrade__button"
78
+ href="https://ithem.es/go-security-pro-now"
79
  >
80
  { __( 'Go Pro Now', 'better-wp-security' ) }
81
  </Button>
core/modules/promos/entries/settings/app.js CHANGED
@@ -16,7 +16,7 @@ import {
16
  } from '@ithemes/security-style-guide';
17
  import { TabPanel } from '@ithemes/security-components';
18
  import { useAsync } from '@ithemes/security-hocs';
19
- import { CORE_STORE_NAME } from '@ithemes/security-data';
20
  import './style.scss';
21
 
22
  export default function App() {
@@ -87,12 +87,12 @@ function ProUpgrade() {
87
  <Button
88
  isPrimary
89
  className="itsec-promo-pro-upgrade__button"
90
- href="https://ithemes.com/security/"
91
  >
92
  { __( 'Go Pro Now', 'better-wp-security' ) }
93
  </Button>
94
  <a
95
- href="https://ithemes.com/security/why-go-pro/"
96
  className="itsec-promo-pro-upgrade__details"
97
  >
98
  { __( 'What’s included with Pro?', 'better-wp-security' ) }
16
  } from '@ithemes/security-style-guide';
17
  import { TabPanel } from '@ithemes/security-components';
18
  import { useAsync } from '@ithemes/security-hocs';
19
+ import { CORE_STORE_NAME } from '@ithemes/security.packages.data';
20
  import './style.scss';
21
 
22
  export default function App() {
87
  <Button
88
  isPrimary
89
  className="itsec-promo-pro-upgrade__button"
90
+ href="https://ithem.es/go-security-pro-now"
91
  >
92
  { __( 'Go Pro Now', 'better-wp-security' ) }
93
  </Button>
94
  <a
95
+ href="https://ithem.es/included-with-pro"
96
  className="itsec-promo-pro-upgrade__details"
97
  >
98
  { __( 'What’s included with Pro?', 'better-wp-security' ) }
core/modules/site-scanner/api.php CHANGED
@@ -96,50 +96,40 @@ class ITSEC_Site_Scanner_API {
96
  * @return array
97
  */
98
  private static function scan_main_site( array $pid ) {
99
-
100
  if ( ! function_exists( 'get_plugins' ) ) {
101
  require_once ABSPATH . 'wp-admin/includes/plugin.php';
102
  }
103
 
104
- $body = array();
105
-
106
- if ( ITSEC_Core::is_licensed() ) {
107
- $plugins = $themes = array();
108
-
109
- list( $wp_version ) = explode( '-', $GLOBALS['wp_version'] );
110
 
111
- foreach ( get_plugins() as $file => $data ) {
112
- if ( ! empty( $data['Version'] ) ) {
113
- $plugins[ dirname( $file ) ] = $data['Version'];
114
- }
115
  }
 
116
 
117
- foreach ( wp_get_themes() as $theme ) {
118
- $themes[ $theme->get_stylesheet() ] = $theme->get( 'Version' );
119
- }
120
 
121
- $body['wordpress'] = $wp_version;
122
- $body['plugins'] = $plugins;
123
- $body['themes'] = $themes;
124
- $body['mutedIssues'] = wp_list_pluck( ITSEC_Site_Scanner_Util::get_muted_issues(), 'id' );
125
- } else {
126
- $key_pair = self::generate_key_pair();
127
 
128
- if ( is_wp_error( $key_pair ) ) {
129
- return array(
130
- 'cached' => false,
131
- 'response' => $key_pair,
132
- );
133
  }
 
134
 
135
- $body['scan'] = array(
136
- 'url' => self::clean_url( network_home_url() ),
137
- 'keyPair' => $key_pair,
138
- 'verifyTarget' => rest_url( 'ithemes-security/v1/site-scanner/verify-scan' ),
139
- );
140
  }
141
 
142
- return self::make_request( 'api/scan', 'POST', $body, $pid );
 
 
 
 
 
 
 
143
  }
144
 
145
  /**
@@ -150,69 +140,105 @@ class ITSEC_Site_Scanner_API {
150
  *
151
  * @return array
152
  */
153
- private static function scan_sub_site( array $pid, $site_id ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
154
  $key_pair = self::generate_key_pair();
155
 
156
  if ( is_wp_error( $key_pair ) ) {
157
- return array(
158
- 'cached' => false,
159
- 'response' => $key_pair,
160
- );
 
 
 
 
 
 
 
 
 
 
 
 
161
  }
162
 
163
- return self::make_request( 'api/scan', 'POST', array(
164
- 'scan' => array(
165
- 'url' => self::clean_url( get_home_url( $site_id ) ),
166
- 'keyPair' => $key_pair,
167
- 'verifyTarget' => get_rest_url( $site_id, 'ithemes-security/v1/site-scanner/verify-scan' ),
168
- )
169
- ), $pid );
170
  }
171
 
172
  /**
173
  * Make a request to the site scanner API.
174
  *
175
- * @param string $route Route to call.
176
- * @param string $method HTTP method to use.
177
- * @param array $body Data to be encoded as json.
178
- * @param array $pid Process ID to continue making log updates.
 
179
  *
180
  * @return array Array of response and cache status.
181
  */
182
- private static function make_request( $route, $method, array $body, array $pid = null ) {
183
- $json = wp_json_encode( $body );
184
- $headers = array(
185
  'Content-Type' => 'application/json',
186
  'Accept' => self::ACCEPT,
187
- );
188
- $signature = self::generate_signature( $json );
189
 
190
- if ( is_wp_error( $signature ) ) {
191
- if ( $signature->get_error_code() !== 'non_active_license' ) {
192
- return array(
193
- 'cached' => false,
194
- 'response' => $signature,
195
- );
196
- }
197
- } else {
198
- $headers['Authorization'] = $signature;
199
  }
200
 
201
  if ( $pid ) {
202
  ITSEC_Log::add_process_update( $pid, compact( 'route', 'method', 'body', 'headers' ) );
203
  }
204
 
205
- $cache_key = self::build_cache_key( $route, $method, $body );
206
  $cached = true;
207
 
208
  if ( ( $parsed = get_site_transient( $cache_key ) ) === false ) {
209
  $cached = false;
210
- $response = self::call_api( $route, array(), array(
211
  'body' => $json,
212
  'method' => $method,
213
  'timeout' => 300,
214
  'headers' => $headers,
215
- ) );
216
 
217
  if ( is_wp_error( $response ) ) {
218
  return compact( 'cached', 'response' );
@@ -222,7 +248,35 @@ class ITSEC_Site_Scanner_API {
222
  self::maybe_cache( $pid, $cache_key, $response, $parsed );
223
  }
224
 
225
- return array( 'cached' => $cached, 'response' => $parsed );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
226
  }
227
 
228
  /**
@@ -244,7 +298,7 @@ class ITSEC_Site_Scanner_API {
244
  require_once( $GLOBALS['ithemes_updater_path'] . '/keys.php' );
245
  require_once( $GLOBALS['ithemes_updater_path'] . '/packages.php' );
246
 
247
- $keys = Ithemes_Updater_Keys::get( array( 'ithemes-security-pro' ) );
248
 
249
  if ( empty( $keys['ithemes-security-pro'] ) ) {
250
  return new WP_Error( 'non_active_license', __( 'iThemes Security Pro is not activated.', 'better-wp-security' ) );
@@ -300,9 +354,9 @@ class ITSEC_Site_Scanner_API {
300
  }
301
 
302
  return new WP_Error(
303
- isset( $parsed['code'] ) ? $parsed['code'] : 'unknown_error',
304
- isset( $parsed['message'] ) ? $parsed['message'] : __( 'Unknown Error', 'better-wp-security' ),
305
- isset( $parsed['data'] ) ? $parsed['data'] : array()
306
  );
307
  }
308
 
@@ -345,20 +399,15 @@ class ITSEC_Site_Scanner_API {
345
  /**
346
  * Builds the cache key based on the selected route.
347
  *
 
348
  * @param string $route
349
  * @param string $method
350
  * @param array $body
351
  *
352
  * @return string
353
  */
354
- private static function build_cache_key( $route, $method, array $body ) {
355
- switch ( $route ) {
356
- case 'api/scan':
357
- unset( $body['scan']['keyPair'] );
358
- break;
359
- }
360
-
361
- return 'itsec-site-scanner-' . md5( $route . $method . wp_json_encode( $body ) );
362
  }
363
 
364
  /**
@@ -378,7 +427,7 @@ class ITSEC_Site_Scanner_API {
378
 
379
  $keywords = array_map( 'trim', explode( ',', $cache_control ) );
380
 
381
- $mapped = array();
382
 
383
  foreach ( $keywords as $keyword ) {
384
  if ( false === strpos( $keyword, '=' ) ) {
@@ -393,9 +442,9 @@ class ITSEC_Site_Scanner_API {
393
  $cached = set_site_transient( $cache_key, $cache, (int) $mapped['max-age'] );
394
 
395
  if ( $cached ) {
396
- ITSEC_Log::add_process_update( $pid, array( 'action' => 'caching-response', 'mapped' => $mapped, 'cache_key' => $cache_key ) );
397
  } else {
398
- ITSEC_Log::add_process_update( $pid, array( 'action' => 'caching-response-failed', 'mapped' => $mapped ) );
399
  }
400
  }
401
  }
@@ -448,7 +497,7 @@ class ITSEC_Site_Scanner_API {
448
  * @return string|WP_Error
449
  */
450
  public static function get_public_key( $secret_key ) {
451
- $token = \ITSEC_Lib_Opaque_Tokens::verify_and_get_token_data(
452
  self::VERIFY_TOKEN,
453
  $secret_key,
454
  15 * MINUTE_IN_SECONDS
@@ -470,6 +519,54 @@ class ITSEC_Site_Scanner_API {
470
  ITSEC_Lib_Opaque_Tokens::delete_token( $secret_key );
471
  }
472
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
473
  /**
474
  * Check if this is a temporary server error, in which case we should retry the scan at a later point in time,
475
  * or if this is an issue with the client that needs to be fixed.
96
  * @return array
97
  */
98
  private static function scan_main_site( array $pid ) {
 
99
  if ( ! function_exists( 'get_plugins' ) ) {
100
  require_once ABSPATH . 'wp-admin/includes/plugin.php';
101
  }
102
 
103
+ if ( ! ITSEC_Core::is_licensed() && ! self::has_registered_site_key() ) {
104
+ $registered = self::register_site();
 
 
 
 
105
 
106
+ if ( is_wp_error( $registered ) ) {
107
+ return [ 'cached' => false, 'response' => $registered ];
 
 
108
  }
109
+ }
110
 
111
+ $plugins = $themes = [];
 
 
112
 
113
+ list( $wp_version ) = explode( '-', $GLOBALS['wp_version'] );
 
 
 
 
 
114
 
115
+ foreach ( get_plugins() as $file => $data ) {
116
+ if ( ! empty( $data['Version'] ) ) {
117
+ $plugins[ dirname( $file ) ] = $data['Version'];
 
 
118
  }
119
+ }
120
 
121
+ foreach ( wp_get_themes() as $theme ) {
122
+ $themes[ $theme->get_stylesheet() ] = $theme->get( 'Version' );
 
 
 
123
  }
124
 
125
+ $body = [
126
+ 'wordpress' => $wp_version,
127
+ 'plugins' => $plugins,
128
+ 'themes' => $themes,
129
+ 'mutedIssues' => wp_list_pluck( ITSEC_Site_Scanner_Util::get_muted_issues(), 'id' ),
130
+ ];
131
+
132
+ return self::make_request( get_main_site_id(), 'api/scan', 'POST', $body, $pid );
133
  }
134
 
135
  /**
140
  *
141
  * @return array
142
  */
143
+ private static function scan_sub_site( array $pid, int $site_id ) {
144
+ if ( ! self::has_registered_site_key( $site_id ) ) {
145
+ $registered = self::register_site( $site_id );
146
+
147
+ if ( is_wp_error( $registered ) ) {
148
+ return [ 'cached' => false, 'response' => $registered ];
149
+ }
150
+ }
151
+
152
+ return self::make_request( $site_id, 'api/scan', 'POST', [
153
+ 'scan' => [
154
+ 'url' => self::clean_url( get_home_url( $site_id ) ),
155
+ ]
156
+ ], $pid );
157
+ }
158
+
159
+ /**
160
+ * Registers a site with the Site Scanner API.
161
+ *
162
+ * This is not meant to be used by licensed iThemes Security users.
163
+ *
164
+ * @param int $site_id The site ID to register.
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();
172
 
173
  if ( is_wp_error( $key_pair ) ) {
174
+ ITSEC_Log::add_process_stop( $pid, $key_pair );
175
+
176
+ return $key_pair;
177
+ }
178
+
179
+ $url = self::clean_url( get_home_url( $site_id ) );
180
+ $response = self::make_request( $site_id, 'api/register-site', 'POST', [
181
+ 'url' => $url,
182
+ 'keyPair' => $key_pair,
183
+ 'verifyTarget' => get_rest_url( $site_id, 'ithemes-security/v1/site-scanner/verify-scan' ),
184
+ ], $pid )['response'];
185
+
186
+ if ( is_wp_error( $response ) ) {
187
+ ITSEC_Log::add_process_stop( $pid, $response );
188
+
189
+ return $response;
190
  }
191
 
192
+ $key = $response['key'];
193
+
194
+ self::set_registered_site_key( $site_id, $key );
195
+ ITSEC_Log::add_process_stop( $pid, $response );
196
+
197
+ return $key;
 
198
  }
199
 
200
  /**
201
  * Make a request to the site scanner API.
202
  *
203
+ * @param int $site_id The site ID being operated on.
204
+ * @param string $route Route to call.
205
+ * @param string $method HTTP method to use.
206
+ * @param array $body Data to be encoded as json.
207
+ * @param array $pid Process ID to continue making log updates.
208
  *
209
  * @return array Array of response and cache status.
210
  */
211
+ private static function make_request( int $site_id, string $route, string $method, array $body, array $pid = null ) {
212
+ $json = wp_json_encode( $body );
213
+ $headers = [
214
  'Content-Type' => 'application/json',
215
  'Accept' => self::ACCEPT,
216
+ ];
217
+ $authorization = self::get_authorization_header( $site_id, $json );
218
 
219
+ if ( is_wp_error( $authorization ) ) {
220
+ return [ 'cached' => false, 'response' => $authorization ];
221
+ }
222
+
223
+ if ( is_string( $authorization ) ) {
224
+ $headers['Authorization'] = $authorization;
 
 
 
225
  }
226
 
227
  if ( $pid ) {
228
  ITSEC_Log::add_process_update( $pid, compact( 'route', 'method', 'body', 'headers' ) );
229
  }
230
 
231
+ $cache_key = self::build_cache_key( $site_id, $route, $method, $body );
232
  $cached = true;
233
 
234
  if ( ( $parsed = get_site_transient( $cache_key ) ) === false ) {
235
  $cached = false;
236
+ $response = self::call_api( $route, [], [
237
  'body' => $json,
238
  'method' => $method,
239
  'timeout' => 300,
240
  'headers' => $headers,
241
+ ] );
242
 
243
  if ( is_wp_error( $response ) ) {
244
  return compact( 'cached', 'response' );
248
  self::maybe_cache( $pid, $cache_key, $response, $parsed );
249
  }
250
 
251
+ return [ 'cached' => $cached, 'response' => $parsed ];
252
+ }
253
+
254
+ /**
255
+ * Gets the Authorization header for a request.
256
+ *
257
+ * @param int $site_id The site id being operated on.
258
+ * @param string $json The serialized request body.
259
+ *
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
+ $signature = self::generate_signature( $json );
264
+
265
+ if ( ! is_wp_error( $signature ) ) {
266
+ return $signature;
267
+ }
268
+
269
+ if ( 'non_active_license' !== $signature->get_error_code() ) {
270
+ return $signature;
271
+ }
272
+
273
+ $key = self::get_registered_site_key( $site_id );
274
+
275
+ if ( ! $key ) {
276
+ return null;
277
+ }
278
+
279
+ return 'X-SiteRegistration ' . $key;
280
  }
281
 
282
  /**
298
  require_once( $GLOBALS['ithemes_updater_path'] . '/keys.php' );
299
  require_once( $GLOBALS['ithemes_updater_path'] . '/packages.php' );
300
 
301
+ $keys = Ithemes_Updater_Keys::get( [ 'ithemes-security-pro' ] );
302
 
303
  if ( empty( $keys['ithemes-security-pro'] ) ) {
304
  return new WP_Error( 'non_active_license', __( 'iThemes Security Pro is not activated.', 'better-wp-security' ) );
354
  }
355
 
356
  return new WP_Error(
357
+ $parsed['code'] ?? 'unknown_error',
358
+ $parsed['message'] ?? __( 'Unknown Error', 'better-wp-security' ),
359
+ $parsed['data'] ?? []
360
  );
361
  }
362
 
399
  /**
400
  * Builds the cache key based on the selected route.
401
  *
402
+ * @param int $site_id
403
  * @param string $route
404
  * @param string $method
405
  * @param array $body
406
  *
407
  * @return string
408
  */
409
+ private static function build_cache_key( int $site_id, string $route, string $method, array $body ) {
410
+ return 'itsec-site-scanner-' . md5( $site_id . $route . $method . wp_json_encode( $body ) );
 
 
 
 
 
 
411
  }
412
 
413
  /**
427
 
428
  $keywords = array_map( 'trim', explode( ',', $cache_control ) );
429
 
430
+ $mapped = [];
431
 
432
  foreach ( $keywords as $keyword ) {
433
  if ( false === strpos( $keyword, '=' ) ) {
442
  $cached = set_site_transient( $cache_key, $cache, (int) $mapped['max-age'] );
443
 
444
  if ( $cached ) {
445
+ ITSEC_Log::add_process_update( $pid, [ 'action' => 'caching-response', 'mapped' => $mapped, 'cache_key' => $cache_key ] );
446
  } else {
447
+ ITSEC_Log::add_process_update( $pid, [ 'action' => 'caching-response-failed', 'mapped' => $mapped ] );
448
  }
449
  }
450
  }
497
  * @return string|WP_Error
498
  */
499
  public static function get_public_key( $secret_key ) {
500
+ $token = ITSEC_Lib_Opaque_Tokens::verify_and_get_token_data(
501
  self::VERIFY_TOKEN,
502
  $secret_key,
503
  15 * MINUTE_IN_SECONDS
519
  ITSEC_Lib_Opaque_Tokens::delete_token( $secret_key );
520
  }
521
 
522
+ /**
523
+ * Checks if the site has a registered site key.
524
+ *
525
+ * @param int $site_id
526
+ *
527
+ * @return bool
528
+ */
529
+ public static function has_registered_site_key( int $site_id = 0 ): bool {
530
+ $site_id = $site_id ?: get_main_site_id();
531
+ $site_keys = ITSEC_Modules::get_setting( 'site-scanner', 'registered_sites' );
532
+
533
+ if ( ! isset( $site_keys[ $site_id ] ) ) {
534
+ return false;
535
+ }
536
+
537
+ return $site_keys[ $site_id ]['url'] === self::clean_url( get_home_url( $site_id ) );
538
+ }
539
+
540
+ /**
541
+ * Gets the registered site ID for a site.
542
+ *
543
+ * @param int $site_id The site id to get the key for. Defaults to the current site.
544
+ *
545
+ * @return string|null The registered site key if it exists, null otherwise.
546
+ */
547
+ public static function get_registered_site_key( int $site_id = 0 ) {
548
+ $site_id = $site_id ?: get_main_site_id();
549
+ $site_keys = ITSEC_Modules::get_setting( 'site-scanner', 'registered_sites' );
550
+
551
+ return $site_keys[ $site_id ]['key'] ?? null;
552
+ }
553
+
554
+ /**
555
+ * Sets the registered site key for a site.
556
+ *
557
+ * @param int $site_id
558
+ * @param string $key
559
+ */
560
+ public static function set_registered_site_key( int $site_id, string $key ) {
561
+ $registered_sites = ITSEC_Modules::get_setting( 'site-scanner', 'registered_sites' );
562
+
563
+ $registered_sites[ $site_id ] = [
564
+ 'url' => self::clean_url( get_home_url( $site_id ) ),
565
+ 'key' => $key,
566
+ ];
567
+ ITSEC_Modules::set_setting( 'site-scanner', 'registered_sites', $registered_sites );
568
+ }
569
+
570
  /**
571
  * Check if this is a temporary server error, in which case we should retry the scan at a later point in time,
572
  * or if this is an issue with the client that needs to be fixed.
core/modules/site-scanner/entries/dashboard/index.js CHANGED
@@ -136,13 +136,13 @@ function MalwareScan( { card, config } ) {
136
  >
137
  { showRawDetails
138
  ? __(
139
- 'Hide Raw Details',
140
- 'better-wp-security'
141
- )
142
  : __(
143
- 'Show Raw Details',
144
- 'better-wp-security'
145
- ) }
146
  </Button>
147
  <div
148
  id={ `itsec-card-malware-scan__raw-details--${ instanceId }` }
136
  >
137
  { showRawDetails
138
  ? __(
139
+ 'Hide Raw Details',
140
+ 'better-wp-security'
141
+ )
142
  : __(
143
+ 'Show Raw Details',
144
+ 'better-wp-security'
145
+ ) }
146
  </Button>
147
  <div
148
  id={ `itsec-card-malware-scan__raw-details--${ instanceId }` }
core/modules/site-scanner/mail.php CHANGED
@@ -13,17 +13,25 @@ class ITSEC_Site_Scanner_Mail {
13
  *
14
  * @return bool
15
  */
16
- public static function send( $scan ) {
17
- if ( ! $scan instanceof Scan ) {
18
- _doing_it_wrong( __METHOD__, __( 'Must pass Scan instance.', 'better-wp-security' ), '5.8.1' );
19
 
20
- return false;
21
- }
22
 
 
 
 
 
 
 
 
 
23
  $code = $scan->get_code();
24
 
25
  if ( 'clean' === $code ) {
26
- return true;
27
  }
28
 
29
  $nc = ITSEC_Core::get_notification_center();
@@ -40,9 +48,9 @@ class ITSEC_Site_Scanner_Mail {
40
  )
41
  );
42
  static::format_scan_body( $mail, $scan );
43
- $mail->add_footer();
44
 
45
- return $nc->send( 'malware-scheduling', $mail );
46
  }
47
 
48
  /**
@@ -68,7 +76,7 @@ class ITSEC_Site_Scanner_Mail {
68
  return wp_sprintf( esc_html__( 'Scheduled site scan report: %l', 'better-wp-security' ), $codes );
69
  }
70
 
71
- return wp_sprintf( esc_html__( 'Scheduled site scan found warnings', 'better-wp-security' ) );
72
  }
73
  }
74
 
@@ -164,5 +172,35 @@ class ITSEC_Site_Scanner_Mail {
164
  if ( $log_url ) {
165
  $mail->add_button( esc_html__( 'View Report', 'better-wp-security' ), $log_url );
166
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
167
  }
168
  }
13
  *
14
  * @return bool
15
  */
16
+ public static function send( Scan $scan ) {
17
+ $nc = ITSEC_Core::get_notification_center();
18
+ $mail = static::get_mail( $scan );
19
 
20
+ return $nc->send( 'malware-scheduling', $mail );
21
+ }
22
 
23
+ /**
24
+ * Gets the configured Mail template for a Scan.
25
+ *
26
+ * @param Scan $scan
27
+ *
28
+ * @return ITSEC_Mail|null
29
+ */
30
+ public static function get_mail( Scan $scan ) {
31
  $code = $scan->get_code();
32
 
33
  if ( 'clean' === $code ) {
34
+ return null;
35
  }
36
 
37
  $nc = ITSEC_Core::get_notification_center();
48
  )
49
  );
50
  static::format_scan_body( $mail, $scan );
51
+ $mail->add_footer( false );
52
 
53
+ return $mail;
54
  }
55
 
56
  /**
76
  return wp_sprintf( esc_html__( 'Scheduled site scan report: %l', 'better-wp-security' ), $codes );
77
  }
78
 
79
+ return esc_html__( 'Scheduled site scan found warnings', 'better-wp-security' );
80
  }
81
  }
82
 
172
  if ( $log_url ) {
173
  $mail->add_button( esc_html__( 'View Report', 'better-wp-security' ), $log_url );
174
  }
175
+
176
+ $mail->add_divider();
177
+ $vulnerabilities = $scan->find_entry( 'vulnerabilities' );
178
+
179
+ if ( $vulnerabilities && $vulnerabilities->count() ) {
180
+ $mail->add_large_text( esc_html__( 'What Actions Should I Take?', 'better-wp-security' ) );
181
+ $mail->add_text(
182
+ esc_html__( 'Vulnerable WordPress plugins and themes are the #1 reason WordPress sites get hacked.', 'better-wp-security' ) .
183
+ ' <b>' . esc_html__( 'Either quickly update the vulnerable theme, plugin or WordPress version immediately to the newest version or immediately deactivate the plugin or theme until a fix is available.', 'better-wp-security' ) . '</b>',
184
+ 'dark'
185
+ );
186
+
187
+ if ( $log_url ) {
188
+ $mail->add_section_heading( esc_html__( 'How to View the Report & See Available Updates', 'better-wp-security' ) );
189
+ $mail->add_123_box(
190
+ sprintf(
191
+ esc_html__( '%1$sView the Site Scan Report%2$s available now from your WordPress admin dashboard.', 'better-wp-security' ),
192
+ '<a href="' . esc_url( $log_url ) . '">',
193
+ '</a>'
194
+ ),
195
+ esc_html__( 'In the Known Vulnerabilities section of the report, click “Show Details.” If a security fix is available, the report will indicate the latest version number.', 'better-wp-security' ),
196
+ esc_html__( 'If a security fix is available, update the vulnerable plugin or theme as soon as possible from Your WordPress admin dashboard > Updates page.', 'better-wp-security' ) .
197
+ ' <a href="' . esc_url( ITSEC_Mail::filter_admin_page_url( admin_url( 'update-core.php' ) ) ) . '">' . esc_html__( 'Log in now to update.', 'better-wp-security' ) . '</a>'
198
+ );
199
+ }
200
+ }
201
+
202
+ if ( ! ITSEC_Core::is_pro() ) {
203
+ $mail->add_site_scanner_pro_callout();
204
+ }
205
  }
206
  }
core/modules/site-scanner/module.json CHANGED
@@ -40,6 +40,29 @@
40
  },
41
  "default": [],
42
  "readonly": true
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
43
  }
44
  }
45
  },
40
  },
41
  "default": [],
42
  "readonly": true
43
+ },
44
+ "registered_sites": {
45
+ "type": "object",
46
+ "additionalProperties": {
47
+ "type": "object",
48
+ "required": [
49
+ "url",
50
+ "key"
51
+ ],
52
+ "properties": {
53
+ "url": {
54
+ "type": "string",
55
+ "format": "uri"
56
+ },
57
+ "key": {
58
+ "type": "string",
59
+ "minLength": 1
60
+ }
61
+ },
62
+ "additionalProperties": false
63
+ },
64
+ "default": [],
65
+ "readonly": true
66
  }
67
  }
68
  },
core/modules/system-tweaks/activate.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
 
3
- require_once( 'class-itsec-system-tweaks.php' );
4
 
5
  ITSEC_System_Tweaks::activate();
1
  <?php
2
 
3
+ require_once __DIR__ . '/class-itsec-system-tweaks.php';
4
 
5
  ITSEC_System_Tweaks::activate();
core/modules/system-tweaks/active.php CHANGED
@@ -1,3 +1,3 @@
1
  <?php
2
 
3
- require_once( 'class-itsec-system-tweaks.php' );
1
  <?php
2
 
3
+ require_once __DIR__ . '/class-itsec-system-tweaks.php';
core/modules/system-tweaks/class-itsec-system-tweaks.php CHANGED
@@ -33,6 +33,10 @@ final class ITSEC_System_Tweaks {
33
  }
34
 
35
  public function add_hooks() {
 
 
 
 
36
  if ( $this->hooks_added ) {
37
  return;
38
  }
33
  }
34
 
35
  public function add_hooks() {
36
+ if ( ITSEC_Core::is_temp_disable_modules_set() ) {
37
+ return;
38
+ }
39
+
40
  if ( $this->hooks_added ) {
41
  return;
42
  }
core/modules/system-tweaks/deactivate.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
 
3
- require_once( 'class-itsec-system-tweaks.php' );
4
 
5
  ITSEC_System_Tweaks::deactivate();
1
  <?php
2
 
3
+ require_once __DIR__ . '/class-itsec-system-tweaks.php';
4
 
5
  ITSEC_System_Tweaks::deactivate();
core/modules/two-factor/class-itsec-two-factor.php CHANGED
@@ -51,7 +51,11 @@ class ITSEC_Two_Factor {
51
  add_action( 'edit_user_profile', array( $this, 'user_two_factor_options' ) );
52
  add_action( 'personal_options_update', array( $this, 'user_two_factor_options_update' ) );
53
  add_action( 'edit_user_profile_update', array( $this, 'user_two_factor_options_update' ) );
 
54
  add_filter( 'authenticate', array( $this, 'block_xmlrpc' ), 100 );
 
 
 
55
 
56
  add_action( 'ithemes_sync_register_verbs', array( $this, 'register_sync_verbs' ) );
57
  add_filter( 'itsec-filter-itsec-get-everything-verbs', array( $this, 'register_sync_get_everything_verbs' ) );
@@ -260,6 +264,54 @@ class ITSEC_Two_Factor {
260
  return new WP_Error( 'two_factor_required', esc_html__( 'User has Two-Factor enabled.', 'better-wp-security' ) );
261
  }
262
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
263
  /**
264
  * Update the list of enabled Two Factor providers for a user.
265
  *
51
  add_action( 'edit_user_profile', array( $this, 'user_two_factor_options' ) );
52
  add_action( 'personal_options_update', array( $this, 'user_two_factor_options_update' ) );
53
  add_action( 'edit_user_profile_update', array( $this, 'user_two_factor_options_update' ) );
54
+
55
  add_filter( 'authenticate', array( $this, 'block_xmlrpc' ), 100 );
56
+ add_filter( 'itsec_is_user_using_two_factor', array( $this, 'mark_user_as_using_2fa' ), 10, 2 );
57
+ add_action( 'itsec_passwordless_login_initialize_interstitial', array( $this, 'pwls_skip_2fa' ) );
58
+ add_filter( 'itsec_user_security_profile_data', array( $this, 'add_2fa_security_profile_data' ), 10, 2 );
59
 
60
  add_action( 'ithemes_sync_register_verbs', array( $this, 'register_sync_verbs' ) );
61
  add_filter( 'itsec-filter-itsec-get-everything-verbs', array( $this, 'register_sync_get_everything_verbs' ) );
264
  return new WP_Error( 'two_factor_required', esc_html__( 'User has Two-Factor enabled.', 'better-wp-security' ) );
265
  }
266
 
267
+ /**
268
+ * Marks a user as using Two-Factor.
269
+ *
270
+ * @param bool $is_using
271
+ * @param WP_User $user
272
+ *
273
+ * @return bool
274
+ */
275
+ public function mark_user_as_using_2fa( $is_using, WP_User $user ) {
276
+ if ( ! $is_using ) {
277
+ $is_using = (bool) $this->get_primary_provider_for_user( $user->ID );
278
+ }
279
+
280
+ return $is_using;
281
+ }
282
+
283
+ /**
284
+ * Conditionally skips the Two-Factor interstitial when using Passwordless Login
285
+ * if the user's primary provider is Email.
286
+ *
287
+ * @param ITSEC_Login_Interstitial_Session $session
288
+ */
289
+ public function pwls_skip_2fa( ITSEC_Login_Interstitial_Session $session ) {
290
+ if ( self::get_instance()->get_primary_provider_for_user( $session->get_user()->ID ) instanceof Two_Factor_Email ) {
291
+ $session->add_completed_interstitial( '2fa' );
292
+ }
293
+ }
294
+
295
+ /**
296
+ * Adds Two-Factor data to the User Security Profile card.
297
+ *
298
+ * @param array $data
299
+ * @param WP_User $user
300
+ *
301
+ * @return array
302
+ */
303
+ public function add_2fa_security_profile_data( $data, WP_User $user ) {
304
+ if ( $this->get_available_providers_for_user( $user, false ) ) {
305
+ $data['two_factor'] = 'enabled';
306
+ } elseif ( $this->get_available_providers_for_user( $user, true ) ) {
307
+ $data['two_factor'] = 'enforced-not-configured';
308
+ } else {
309
+ $data['two_factor'] = 'not-enabled';
310
+ }
311
+
312
+ return $data;
313
+ }
314
+
315
  /**
316
  * Update the list of enabled Two Factor providers for a user.
317
  *
core/modules/user-groups/Module/Module.php CHANGED
@@ -2,7 +2,12 @@
2
 
3
  namespace iThemesSecurity\User_Groups\Module;
4
 
 
5
  use iThemesSecurity\Contracts\Runnable;
 
 
 
 
6
  use iThemesSecurity\Module_Config;
7
  use iThemesSecurity\User_Groups\Everybody_Else;
8
  use iThemesSecurity\User_Groups\Repository\Repository;
@@ -11,7 +16,7 @@ use iThemesSecurity\User_Groups\Settings_Registration;
11
  use iThemesSecurity\User_Groups\Settings_Registry;
12
  use iThemesSecurity\User_Groups\User_Group;
13
 
14
- class Module implements Runnable {
15
 
16
  /** @var Repository */
17
  private $repository;
@@ -141,4 +146,131 @@ class Module implements Runnable {
141
  }
142
  }
143
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
144
  }
2
 
3
  namespace iThemesSecurity\User_Groups\Module;
4
 
5
+ use iThemesSecurity\Contracts\Import_Export_Source;
6
  use iThemesSecurity\Contracts\Runnable;
7
+ use iThemesSecurity\Import_Export\Export\Export;
8
+ use iThemesSecurity\Import_Export\Import\Import_Context;
9
+ use iThemesSecurity\Import_Export\Import\Transformation;
10
+ use iThemesSecurity\Lib\Result;
11
  use iThemesSecurity\Module_Config;
12
  use iThemesSecurity\User_Groups\Everybody_Else;
13
  use iThemesSecurity\User_Groups\Repository\Repository;
16
  use iThemesSecurity\User_Groups\Settings_Registry;
17
  use iThemesSecurity\User_Groups\User_Group;
18
 
19
+ class Module implements Runnable, Import_Export_Source {
20
 
21
  /** @var Repository */
22
  private $repository;
146
  }
147
  }
148
  }
149
+
150
+ public function get_export_slug(): string {
151
+ return 'user-groups';
152
+ }
153
+
154
+ public function get_export_title(): string {
155
+ return __( 'User Groups', 'better-wp-security' );
156
+ }
157
+
158
+ public function get_export_description(): string {
159
+ return __( 'List of created User Groups', 'better-wp-security' );
160
+ }
161
+
162
+ public function get_export_options_schema(): array {
163
+ return [];
164
+ }
165
+
166
+ public function get_export_schema(): array {
167
+ return [
168
+ 'type' => 'array',
169
+ 'items' => [
170
+ 'type' => 'object',
171
+ 'properties' => [
172
+ 'id' => [
173
+ 'type' => 'string',
174
+ ],
175
+ 'label' => [
176
+ 'type' => 'string',
177
+ ],
178
+ 'users' => [
179
+ 'type' => 'array',
180
+ 'items' => [
181
+ '$ref' => '#/definitions/user',
182
+ ],
183
+ ],
184
+ 'roles' => [
185
+ 'type' => 'array',
186
+ 'items' => [
187
+ '$ref' => '#/definitions/role',
188
+ ],
189
+ ],
190
+ 'canonical' => [
191
+ 'type' => 'array',
192
+ 'items' => [
193
+ 'type' => 'string',
194
+ ],
195
+ ],
196
+ 'min_role' => [
197
+ 'type' => 'string',
198
+ ],
199
+ ],
200
+ ],
201
+ ];
202
+ }
203
+
204
+ public function get_transformations(): array {
205
+ return [
206
+ new class implements Transformation {
207
+ public function transform( Export $export, Import_Context $context ): Export {
208
+ $data = $export->get_data( 'user-groups' );
209
+
210
+ foreach ( $data as &$user_group ) {
211
+ $user_group['users'] = $context->map_user_list( $user_group['users'] );
212
+ $user_group['roles'] = $context->map_role_list( $user_group['roles'] );
213
+ }
214
+
215
+ return $export->with_data( 'user-groups', $data );
216
+ }
217
+
218
+ public function get_user_paths(): array {
219
+ return [ '*.users' ];
220
+ }
221
+
222
+ public function get_role_paths(): array {
223
+ return [ '*.roles' ];
224
+ }
225
+ }
226
+ ];
227
+ }
228
+
229
+ public function export( $options ): Result {
230
+ return Result::success( array_map( static function ( User_Group $group ) {
231
+ return [
232
+ 'id' => $group->get_id(),
233
+ 'label' => $group->get_label(),
234
+ 'users' => array_map( [ Export::class, 'format_user' ], $group->get_users() ),
235
+ 'roles' => array_map( [ Export::class, 'format_role' ], $group->get_roles() ),
236
+ 'canonical' => $group->get_canonical_roles(),
237
+ 'min_role' => $group->get_min_role(),
238
+ ];
239
+ }, $this->repository->all() ) );
240
+ }
241
+
242
+ public function import( Export $from, Import_Context $context ): Result {
243
+ array_map( [ $this->repository, 'delete' ], $this->repository->all() );
244
+
245
+ $result = Result::success();
246
+
247
+ foreach ( $from->get_data( $this->get_export_slug() ) as $config ) {
248
+ $user_group = new User_Group( $config['id'] );
249
+ $user_group->set_label( $config['label'] );
250
+ $user_group->set_canonical_roles( $config['canonical'] );
251
+ $user_group->set_min_role( $config['min_role'] );
252
+
253
+ foreach ( $config['roles'] as $role ) {
254
+ $user_group->add_role( $role['slug'] );
255
+ }
256
+
257
+ foreach ( $config['users'] as $user ) {
258
+ if ( $user = get_userdata( $user['id'] ) ) {
259
+ $user_group->add_user( $user );
260
+ }
261
+ }
262
+
263
+ try {
264
+ $this->repository->persist( $user_group );
265
+ } catch ( \Exception $e ) {
266
+ $result->add_warning_message( sprintf(
267
+ __( 'Could not import \'%1$s\' User Group: %2$s', 'better-wp-security' ),
268
+ $config['label'],
269
+ $e->getMessage()
270
+ ) );
271
+ }
272
+ }
273
+
274
+ return $result;
275
+ }
276
  }
core/modules/user-groups/container.php CHANGED
@@ -6,8 +6,8 @@ use Pimple\Container;
6
 
7
  return static function ( Container $c ) {
8
  $c['module.user-groups.files'] = [
9
- 'active.php' => User_Groups\Module\Module::class,
10
- 'rest.php' => REST\REST::class,
11
  ];
12
 
13
  $c[ User_Groups\Module\Module::class ] = static function ( Container $c ) {
@@ -76,4 +76,10 @@ return static function ( Container $c ) {
76
  $c[ User_Groups\Settings_Proxy::class ]
77
  );
78
  };
 
 
 
 
 
 
79
  };
6
 
7
  return static function ( Container $c ) {
8
  $c['module.user-groups.files'] = [
9
+ 'active.php' => User_Groups\Module\Module::class,
10
+ 'rest.php' => REST\REST::class,
11
  ];
12
 
13
  $c[ User_Groups\Module\Module::class ] = static function ( Container $c ) {
76
  $c[ User_Groups\Settings_Proxy::class ]
77
  );
78
  };
79
+
80
+ \ITSEC_Lib::extend_if_able( $c, 'import-export.sources', function ( $sources, $c ) {
81
+ $sources[] = $c[ User_Groups\Module\Module::class ];
82
+
83
+ return $sources;
84
+ } );
85
  };
core/modules/user-groups/entries/settings/app.js CHANGED
@@ -7,7 +7,7 @@ import { __ } from '@wordpress/i18n';
7
  /**
8
  * Internal dependencies
9
  */
10
- import '@ithemes/security-data';
11
  import '@ithemes/security.user-groups.api';
12
  import { Page } from '@ithemes/security.pages.settings';
13
  import { Layout } from './components';
@@ -26,7 +26,7 @@ export default function App() {
26
  title={ __( 'User Groups', 'better-wp-security' ) }
27
  icon="groups"
28
  priority={ 10 }
29
- roots={ [ 'onboard', 'settings' ] }
30
  >
31
  { () => <Layout /> }
32
  </Page>
7
  /**
8
  * Internal dependencies
9
  */
10
+ import '@ithemes/security.packages.data';
11
  import '@ithemes/security.user-groups.api';
12
  import { Page } from '@ithemes/security.pages.settings';
13
  import { Layout } from './components';
26
  title={ __( 'User Groups', 'better-wp-security' ) }
27
  icon="groups"
28
  priority={ 10 }
29
+ roots={ [ 'onboard', 'settings', 'import' ] }
30
  >
31
  { () => <Layout /> }
32
  </Page>
core/modules/user-groups/entries/settings/components/group-nav/index.js CHANGED
@@ -38,7 +38,7 @@ import {
38
  SelectableCard,
39
  Breadcrumbs,
40
  } from '@ithemes/security.pages.settings';
41
- import { MODULES_STORE_NAME } from '@ithemes/security-data';
42
  import {
43
  FlexSpacer,
44
  HelpList,
@@ -115,6 +115,7 @@ export default function GroupNav() {
115
  }
116
 
117
  function UserGroupsIntro() {
 
118
  const { help } = useSelect(
119
  ( select ) =>
120
  select( MODULES_STORE_NAME ).getModule( 'user-groups' ) || {}
@@ -128,7 +129,7 @@ function UserGroupsIntro() {
128
  const navIds = registry
129
  .select( 'ithemes-security/user-groups-editor' )
130
  .getMatchableNavIds();
131
- navigateTo( `/onboard/user-groups/${ navIds[ 0 ] }` );
132
  };
133
  const onCustom = async () => {
134
  await applyDefaultGroupSettings();
@@ -216,9 +217,9 @@ function GroupNavRoute( { root } ) {
216
  return (
217
  <>
218
  <Help />
219
- <ManageGroup groupId={ groupId } showSave={ root !== 'onboard' } />
220
 
221
- { root === 'onboard' && (
222
  <Flex>
223
  { previous && (
224
  <FlexItem>
38
  SelectableCard,
39
  Breadcrumbs,
40
  } from '@ithemes/security.pages.settings';
41
+ import { MODULES_STORE_NAME } from '@ithemes/security.packages.data';
42
  import {
43
  FlexSpacer,
44
  HelpList,
115
  }
116
 
117
  function UserGroupsIntro() {
118
+ const { root } = useParams();
119
  const { help } = useSelect(
120
  ( select ) =>
121
  select( MODULES_STORE_NAME ).getModule( 'user-groups' ) || {}
129
  const navIds = registry
130
  .select( 'ithemes-security/user-groups-editor' )
131
  .getMatchableNavIds();
132
+ navigateTo( `/${ root }/user-groups/${ navIds[ 0 ] }` );
133
  };
134
  const onCustom = async () => {
135
  await applyDefaultGroupSettings();
217
  return (
218
  <>
219
  <Help />
220
+ <ManageGroup groupId={ groupId } showSave={ root === 'settings' } />
221
 
222
+ { root !== 'settings' && (
223
  <Flex>
224
  { previous && (
225
  <FlexItem>
core/modules/user-groups/entries/settings/components/multi-group-selector/index.js CHANGED
@@ -40,7 +40,7 @@ export default function MultiGroupSelector() {
40
  [ groupId ]
41
  );
42
 
43
- if ( 'onboard' === root ) {
44
  return null;
45
  }
46
 
40
  [ groupId ]
41
  );
42
 
43
+ if ( 'settings' !== root ) {
44
  return null;
45
  }
46
 
core/modules/user-groups/entries/settings/components/tab-body/index.js CHANGED
@@ -8,7 +8,7 @@ import classnames from 'classnames';
8
  */
9
  import './style.scss';
10
 
11
- TabBody.Row = function ( { name, children } ) {
12
  return (
13
  <div
14
  className={ `itsec-user-groups-group-tab__row itsec-user-groups-group-tab__row--${ name }` }
8
  */
9
  import './style.scss';
10
 
11
+ TabBody.Row = function( { name, children } ) {
12
  return (
13
  <div
14
  className={ `itsec-user-groups-group-tab__row itsec-user-groups-group-tab__row--${ name }` }
core/modules/user-groups/entries/settings/hooks.js CHANGED
@@ -12,7 +12,7 @@ import { addAction, addFilter } from '@wordpress/hooks';
12
  addAction(
13
  'ithemes-security.onboard.applyAnswerResponse',
14
  'ithemes-security/user-groups/onboard.applyAnswerResponse',
15
- function ( registry, answer ) {
16
  for ( const userGroup of answer.user_groups ) {
17
  const created = registry
18
  .dispatch( 'ithemes-security/user-groups-editor' )
@@ -67,7 +67,7 @@ addAction(
67
  addAction(
68
  'ithemes-security.onboard.reset',
69
  'ithemes-security/user-groups/onboard.reset',
70
- function ( registry ) {
71
  registry
72
  .dispatch( 'ithemes-security/user-groups-editor' )
73
  .deleteLocalGroups();
@@ -80,7 +80,7 @@ addAction(
80
  addFilter(
81
  'ithemes-security.settings.isConditionalSettingActive',
82
  'ithemes-security/user-groups/user-group-conditional',
83
- function ( isActive, module, definition, context ) {
84
  if ( ! isActive || ! definition[ 'user-groups' ] ) {
85
  return isActive;
86
  }
12
  addAction(
13
  'ithemes-security.onboard.applyAnswerResponse',
14
  'ithemes-security/user-groups/onboard.applyAnswerResponse',
15
+ function( registry, answer ) {
16
  for ( const userGroup of answer.user_groups ) {
17
  const created = registry
18
  .dispatch( 'ithemes-security/user-groups-editor' )
67
  addAction(
68
  'ithemes-security.onboard.reset',
69
  'ithemes-security/user-groups/onboard.reset',
70
+ function( registry ) {
71
  registry
72
  .dispatch( 'ithemes-security/user-groups-editor' )
73
  .deleteLocalGroups();
80
  addFilter(
81
  'ithemes-security.settings.isConditionalSettingActive',
82
  'ithemes-security/user-groups/user-group-conditional',
83
+ function( isActive, module, definition, context ) {
84
  if ( ! isActive || ! definition[ 'user-groups' ] ) {
85
  return isActive;
86
  }
core/modules/user-groups/entries/settings/store/actions.js CHANGED
@@ -23,7 +23,7 @@ import { controls } from '@wordpress/data';
23
  */
24
  import { castWPError } from '@ithemes/security-utils';
25
  import { ONBOARD_STORE_NAME } from '@ithemes/security.pages.settings';
26
- import { MODULES_STORE_NAME } from '@ithemes/security-data';
27
  import { createNotice } from './controls';
28
 
29
  export function* editGroup( id, edit ) {
@@ -116,6 +116,10 @@ export function* saveGroups( groups = true ) {
116
  'ithemes-security/user-groups-editor',
117
  'getLocalGroupIds'
118
  );
 
 
 
 
119
 
120
  if ( groups === true ) {
121
  groups = [
@@ -125,6 +129,7 @@ export function* saveGroups( groups = true ) {
125
  'getDirtyGroups'
126
  ) ),
127
  ...localGroups,
 
128
  ] ),
129
  ];
130
  } else if ( isString( groups ) ) {
@@ -137,6 +142,7 @@ export function* saveGroups( groups = true ) {
137
 
138
  const update = [];
139
  const create = [];
 
140
 
141
  for ( const group of groups ) {
142
  const edits = yield controls.select(
@@ -145,7 +151,9 @@ export function* saveGroups( groups = true ) {
145
  group
146
  );
147
 
148
- if ( localGroups.includes( group ) ) {
 
 
149
  create.push( { ...edits, id: group } );
150
  } else {
151
  update.push( {
@@ -158,7 +166,7 @@ export function* saveGroups( groups = true ) {
158
  const saved = yield controls.dispatch(
159
  'ithemes-security/user-groups',
160
  'saveGroups',
161
- { create, update }
162
  );
163
 
164
  if ( saved instanceof Error ) {
@@ -201,6 +209,13 @@ export function resetAllEdits() {
201
  };
202
  }
203
 
 
 
 
 
 
 
 
204
  export function* deleteGroup( id ) {
205
  const isLocal = yield controls.select(
206
  'ithemes-security/user-groups-editor',
@@ -259,7 +274,7 @@ export function* editGroupSetting( id, module, setting, value ) {
259
 
260
  if ( isEqual( current, value ) ) {
261
  yield { type: RESET_GROUP_SETTING, id, module, setting };
262
- } else
263
  yield {
264
  type: EDIT_GROUP_SETTING,
265
  id,
@@ -267,6 +282,7 @@ export function* editGroupSetting( id, module, setting, value ) {
267
  setting,
268
  value,
269
  };
 
270
  }
271
 
272
  export function* saveGroupSettings( id ) {
@@ -659,6 +675,8 @@ export const CREATE_LOCAL_GROUP = 'CREATE_LOCAL_GROUP';
659
  export const DELETE_LOCAL_GROUP = 'DELETE_LOCAL_GROUP';
660
  export const DELETE_LOCAL_GROUPS = 'DELETE_LOCAL_GROUPS';
661
 
 
 
662
  export const START_SAVE_GROUP = 'START_SAVE_GROUP';
663
  export const FINISH_SAVE_GROUP = 'FINISH_SAVE_GROUP';
664
  export const FAILED_SAVE_GROUP = 'FAILED_SAVE_GROUP';
23
  */
24
  import { castWPError } from '@ithemes/security-utils';
25
  import { ONBOARD_STORE_NAME } from '@ithemes/security.pages.settings';
26
+ import { MODULES_STORE_NAME } from '@ithemes/security.packages.data';
27
  import { createNotice } from './controls';
28
 
29
  export function* editGroup( id, edit ) {
116
  'ithemes-security/user-groups-editor',
117
  'getLocalGroupIds'
118
  );
119
+ const markedForDeletion = yield controls.select(
120
+ 'ithemes-security/user-groups-editor',
121
+ 'getGroupsMarkedForDeletion'
122
+ );
123
 
124
  if ( groups === true ) {
125
  groups = [
129
  'getDirtyGroups'
130
  ) ),
131
  ...localGroups,
132
+ ...markedForDeletion,
133
  ] ),
134
  ];
135
  } else if ( isString( groups ) ) {
142
 
143
  const update = [];
144
  const create = [];
145
+ const toDelete = [];
146
 
147
  for ( const group of groups ) {
148
  const edits = yield controls.select(
151
  group
152
  );
153
 
154
+ if ( markedForDeletion.includes( group ) ) {
155
+ toDelete.push( group );
156
+ } else if ( localGroups.includes( group ) ) {
157
  create.push( { ...edits, id: group } );
158
  } else {
159
  update.push( {
166
  const saved = yield controls.dispatch(
167
  'ithemes-security/user-groups',
168
  'saveGroups',
169
+ { create, update, delete: toDelete }
170
  );
171
 
172
  if ( saved instanceof Error ) {
209
  };
210
  }
211
 
212
+ export function markGroupForDeletion( id ) {
213
+ return {
214
+ type: MARK_GROUP_FOR_DELETION,
215
+ id,
216
+ };
217
+ }
218
+
219
  export function* deleteGroup( id ) {
220
  const isLocal = yield controls.select(
221
  'ithemes-security/user-groups-editor',
274
 
275
  if ( isEqual( current, value ) ) {
276
  yield { type: RESET_GROUP_SETTING, id, module, setting };
277
+ } else {
278
  yield {
279
  type: EDIT_GROUP_SETTING,
280
  id,
282
  setting,
283
  value,
284
  };
285
+ }
286
  }
287
 
288
  export function* saveGroupSettings( id ) {
675
  export const DELETE_LOCAL_GROUP = 'DELETE_LOCAL_GROUP';
676
  export const DELETE_LOCAL_GROUPS = 'DELETE_LOCAL_GROUPS';
677
 
678
+ export const MARK_GROUP_FOR_DELETION = 'MARK_GROUP_FOR_DELETION';
679
+
680
  export const START_SAVE_GROUP = 'START_SAVE_GROUP';
681
  export const FINISH_SAVE_GROUP = 'FINISH_SAVE_GROUP';
682
  export const FAILED_SAVE_GROUP = 'FAILED_SAVE_GROUP';
core/modules/user-groups/entries/settings/store/controls.js CHANGED
@@ -33,9 +33,9 @@ export function apiFetch( request ) {
33
  /**
34
  * Calls a selector using the current state.
35
  *
36
- * @param {string} storeKey Store key.
37
  * @param {string} selectorName Selector name.
38
- * @param {Array} args Selector arguments.
39
  *
40
  * @return {Object} control descriptor.
41
  */
@@ -51,9 +51,9 @@ export function select( storeKey, selectorName, ...args ) {
51
  /**
52
  * Dispatches a control action for triggering a registry dispatch.
53
  *
54
- * @param {string} storeKey The key for the store the action belongs to
55
- * @param {string} actionName The name of the action to dispatch
56
- * @param {Array} args Arguments for the dispatch action.
57
  *
58
  * @example
59
  * ```js
@@ -82,25 +82,25 @@ export function dispatch( storeKey, actionName, ...args ) {
82
  *
83
  * @see @wordpress/notices#createNotice()
84
  *
85
- * @param {?string} status Notice status.
86
- * Defaults to `info`.
87
- * @param {string} content Notice message.
88
- * @param {?Object} options Notice options.
89
- * @param {?string} options.context Context under which to
90
- * group notice.
91
- * @param {?string} options.id Identifier for notice.
92
- * Automatically assigned
93
- * if not specified.
94
- * @param {?boolean} options.isDismissible Whether the notice can
95
- * be dismissed by user.
96
- * Defaults to `true`.
97
- * @param {?number} options.autoDismiss Whether the notice should
98
- * by automatically dismissed
99
- * after x milliseconds.
100
- * Defaults to `false`.
101
- * @param {?string} options.type Notice type. Either 'default' or 'snackbar'.
102
- * @param {?Array<Object>} options.actions User actions to be
103
- * presented with notice.
104
  *
105
  * @return {Object} control descriptor.
106
  */
33
  /**
34
  * Calls a selector using the current state.
35
  *
36
+ * @param {string} storeKey Store key.
37
  * @param {string} selectorName Selector name.
38
+ * @param {Array} args Selector arguments.
39
  *
40
  * @return {Object} control descriptor.
41
  */
51
  /**
52
  * Dispatches a control action for triggering a registry dispatch.
53
  *
54
+ * @param {string} storeKey The key for the store the action belongs to
55
+ * @param {string} actionName The name of the action to dispatch
56
+ * @param {Array} args Arguments for the dispatch action.
57
  *
58
  * @example
59
  * ```js
82
  *
83
  * @see @wordpress/notices#createNotice()
84
  *
85
+ * @param {?string} status Notice status.
86
+ * Defaults to `info`.
87
+ * @param {string} content Notice message.
88
+ * @param {?Object} options Notice options.
89
+ * @param {?string} options.context Context under which to
90
+ * group notice.
91
+ * @param {?string} options.id Identifier for notice.
92
+ * Automatically assigned
93
+ * if not specified.
94
+ * @param {?boolean} options.isDismissible Whether the notice can
95
+ * be dismissed by user.
96
+ * Defaults to `true`.
97
+ * @param {?number} options.autoDismiss Whether the notice should
98
+ * by automatically dismissed
99
+ * after x milliseconds.
100
+ * Defaults to `false`.
101
+ * @param {?string} options.type Notice type. Either 'default' or 'snackbar'.
102
+ * @param {?Array<Object>} options.actions User actions to be
103
+ * presented with notice.
104
  *
105
  * @return {Object} control descriptor.
106
  */
core/modules/user-groups/entries/settings/store/index.js CHANGED
@@ -18,7 +18,13 @@ const store = registerStore( 'ithemes-security/user-groups-editor', {
18
  selectors,
19
  resolvers,
20
  reducer: userGroupsEditor,
21
- persist: [ 'edits', 'settingEdits', 'bulkSettingEdits', 'localGroupIds' ],
 
 
 
 
 
 
22
  } );
23
 
24
  export default store;
18
  selectors,
19
  resolvers,
20
  reducer: userGroupsEditor,
21
+ persist: [
22
+ 'edits',
23
+ 'settingEdits',
24
+ 'bulkSettingEdits',
25
+ 'localGroupIds',
26
+ 'markedForDelete',
27
+ ],
28
  } );
29
 
30
  export default store;
core/modules/user-groups/entries/settings/store/reducers.js CHANGED
@@ -25,6 +25,7 @@ import {
25
  SET_GROUP_ERROR,
26
  SET_BULK_ERRORS,
27
  RESET_GROUP_SETTING,
 
28
  } from './actions';
29
 
30
  const DEFAULT_STATE = {
@@ -35,6 +36,7 @@ const DEFAULT_STATE = {
35
  saving: [],
36
  errors: {},
37
  bulkErrors: [],
 
38
  };
39
 
40
  export default function userGroupsEditor( state = DEFAULT_STATE, action ) {
@@ -153,6 +155,12 @@ export default function userGroupsEditor( state = DEFAULT_STATE, action ) {
153
  ...state,
154
  edits: omit( state.edits, [ action.id ] ),
155
  settingEdits: omit( state.settingEdits, [ action.id ] ),
 
 
 
 
 
 
156
  };
157
  case RESET_ALL_EDITS:
158
  return {
@@ -160,6 +168,8 @@ export default function userGroupsEditor( state = DEFAULT_STATE, action ) {
160
  edits: {},
161
  settingEdits: {},
162
  bulkSettingEdits: {},
 
 
163
  };
164
  case BULK_EDIT_GROUP_SETTING:
165
  return {
@@ -185,14 +195,19 @@ export default function userGroupsEditor( state = DEFAULT_STATE, action ) {
185
  ...state,
186
  bulkSettingEdits: {},
187
  };
 
 
 
 
 
188
  case SET_GROUP_ERROR:
189
  return {
190
  ...state,
191
  errors: action.error
192
  ? {
193
- ...state.errors,
194
- [ action.id ]: action.error,
195
- }
196
  : omit( state.errors, [ action.id ] ),
197
  };
198
  case SET_BULK_ERRORS:
25
  SET_GROUP_ERROR,
26
  SET_BULK_ERRORS,
27
  RESET_GROUP_SETTING,
28
+ MARK_GROUP_FOR_DELETION,
29
  } from './actions';
30
 
31
  const DEFAULT_STATE = {
36
  saving: [],
37
  errors: {},
38
  bulkErrors: [],
39
+ markedForDelete: [],
40
  };
41
 
42
  export default function userGroupsEditor( state = DEFAULT_STATE, action ) {
155
  ...state,
156
  edits: omit( state.edits, [ action.id ] ),
157
  settingEdits: omit( state.settingEdits, [ action.id ] ),
158
+ markedForDelete: state.markedForDelete.filter(
159
+ ( id ) => id !== action.id
160
+ ),
161
+ localGroupIds: state.localGroupIds.filter(
162
+ ( id ) => id !== action.id
163
+ ),
164
  };
165
  case RESET_ALL_EDITS:
166
  return {
168
  edits: {},
169
  settingEdits: {},
170
  bulkSettingEdits: {},
171
+ markedForDelete: [],
172
+ localGroupIds: [],
173
  };
174
  case BULK_EDIT_GROUP_SETTING:
175
  return {
195
  ...state,
196
  bulkSettingEdits: {},
197
  };
198
+ case MARK_GROUP_FOR_DELETION:
199
+ return {
200
+ ...state,
201
+ markedForDelete: [ ...state.markedForDelete, action.id ],
202
+ };
203
  case SET_GROUP_ERROR:
204
  return {
205
  ...state,
206
  errors: action.error
207
  ? {
208
+ ...state.errors,
209
+ [ action.id ]: action.error,
210
+ }
211
  : omit( state.errors, [ action.id ] ),
212
  };
213
  case SET_BULK_ERRORS:
core/modules/user-groups/entries/settings/store/selectors.js CHANGED
@@ -35,7 +35,7 @@ export function isLocalGroup( state, id ) {
35
  * Gets the type of a matchable.
36
  *
37
  * @param {Object} state
38
- * @param {string} id The matchable id.
39
  * @return string The matchable type.
40
  */
41
  export const getMatchableType = createRegistrySelector(
@@ -242,6 +242,10 @@ export const getEditedGroupsBySetting = createRegistrySelector(
242
  moduleSettings
243
  ) ) {
244
  for ( const [ setting, value ] of Object.entries( settings ) ) {
 
 
 
 
245
  if ( value ) {
246
  clone[ module ][ setting ].push( groupId );
247
  } else {
@@ -271,7 +275,7 @@ export const getDirtyGroupSettings = createSelector(
271
  /**
272
  * Checks if a group has edits or edited settings.
273
  *
274
- * @param {Object} state The state object.
275
  * @param {string} groupId The group id to check.
276
  * @return {boolean} True if dirty.
277
  */
@@ -314,10 +318,10 @@ export function getBulkSettingEdit( state, module, setting ) {
314
  /**
315
  * Get the value for a bulk edited setting.
316
  *
317
- * @param {Object} state
318
  * @param {Array<Object>} groupIds
319
- * @param {string} module
320
- * @param {string} setting
321
  * @return {null|boolean} The setting value.
322
  */
323
  export const getBulkSettingValue = createRegistrySelector(
@@ -351,7 +355,7 @@ export const getBulkSettingValue = createRegistrySelector(
351
  /**
352
  * Are bulk edits being saved.
353
  *
354
- * @param {Object} state The state object.
355
  * @param {Array<string>} groupIds The list of group ids.
356
  * @return {boolean} True if saving.
357
  */
@@ -376,7 +380,7 @@ export const getAvailableGroups = createRegistrySelector( ( select ) => () => {
376
  } );
377
 
378
  const _toNavIds = memize(
379
- ( matchables, resolving, localGroups ) => {
380
  if ( resolving && ! matchables.length ) {
381
  return null;
382
  }
@@ -389,7 +393,8 @@ const _toNavIds = memize(
389
  return userGroups
390
  .map( ( matchable ) => matchable.id )
391
  .concat( localGroups )
392
- .concat( generic.map( ( matchable ) => matchable.id ) );
 
393
  },
394
  { maxSize: 1 }
395
  );
@@ -408,14 +413,27 @@ export const getMatchableNavIds = createRegistrySelector( ( select ) => () => {
408
  const localGroups = select(
409
  'ithemes-security/user-groups-editor'
410
  ).getLocalGroupIds();
 
 
 
411
 
412
- return _toNavIds( matchables, resolving, localGroups );
413
  } );
414
 
415
  /**
416
- * Gets the last error associated with a group.
417
  *
418
  * @param {Object} state The state object.
 
 
 
 
 
 
 
 
 
 
419
  * @param {string} groupId The group id to check.
420
  * @return {Object|undefined} The error, if any.
421
  */
35
  * Gets the type of a matchable.
36
  *
37
  * @param {Object} state
38
+ * @param {string} id The matchable id.
39
  * @return string The matchable type.
40
  */
41
  export const getMatchableType = createRegistrySelector(
242
  moduleSettings
243
  ) ) {
244
  for ( const [ setting, value ] of Object.entries( settings ) ) {
245
+ if ( ! clone[ module ]?.[ setting ] ) {
246
+ continue;
247
+ }
248
+
249
  if ( value ) {
250
  clone[ module ][ setting ].push( groupId );
251
  } else {
275
  /**
276
  * Checks if a group has edits or edited settings.
277
  *
278
+ * @param {Object} state The state object.
279
  * @param {string} groupId The group id to check.
280
  * @return {boolean} True if dirty.
281
  */
318
  /**
319
  * Get the value for a bulk edited setting.
320
  *
321
+ * @param {Object} state
322
  * @param {Array<Object>} groupIds
323
+ * @param {string} module
324
+ * @param {string} setting
325
  * @return {null|boolean} The setting value.
326
  */
327
  export const getBulkSettingValue = createRegistrySelector(
355
  /**
356
  * Are bulk edits being saved.
357
  *
358
+ * @param {Object} state The state object.
359
  * @param {Array<string>} groupIds The list of group ids.
360
  * @return {boolean} True if saving.
361
  */
380
  } );
381
 
382
  const _toNavIds = memize(
383
+ ( matchables, resolving, localGroups, toDelete ) => {
384
  if ( resolving && ! matchables.length ) {
385
  return null;
386
  }
393
  return userGroups
394
  .map( ( matchable ) => matchable.id )
395
  .concat( localGroups )
396
+ .concat( generic.map( ( matchable ) => matchable.id ) )
397
+ .filter( ( id ) => ! toDelete.includes( id ) );
398
  },
399
  { maxSize: 1 }
400
  );
413
  const localGroups = select(
414
  'ithemes-security/user-groups-editor'
415
  ).getLocalGroupIds();
416
+ const toDelete = select(
417
+ 'ithemes-security/user-groups-editor'
418
+ ).getGroupsMarkedForDeletion();
419
 
420
+ return _toNavIds( matchables, resolving, localGroups, toDelete );
421
  } );
422
 
423
  /**
424
+ * Gets the list of group ids that are marked to be deleted.
425
  *
426
  * @param {Object} state The state object.
427
+ * @return {Array<string>} List of group ids.
428
+ */
429
+ export function getGroupsMarkedForDeletion( state ) {
430
+ return state.markedForDelete;
431
+ }
432
+
433
+ /**
434
+ * Gets the last error associated with a group.
435
+ *
436
+ * @param {Object} state The state object.
437
  * @param {string} groupId The group id to check.
438
  * @return {Object|undefined} The error, if any.
439
  */
core/modules/user-groups/entries/settings/utils.js CHANGED
@@ -1,7 +1,7 @@
1
  /**
2
  * External dependencies
3
  */
4
- import { isEmpty, reduce, zipObject, pickBy } from 'lodash';
5
  import Ajv from 'ajv';
6
 
7
  /**
@@ -9,13 +9,11 @@ import Ajv from 'ajv';
9
  */
10
  import { useDispatch, useSelect } from '@wordpress/data';
11
  import { __, sprintf } from '@wordpress/i18n';
12
- import { useMemo } from '@wordpress/element';
13
 
14
  /**
15
  * Internal dependencies
16
  */
17
  import { ONBOARD_STORE_NAME } from '@ithemes/security.pages.settings';
18
- import { MODULES_STORE_NAME } from '@ithemes/security-data';
19
  import { STORE_NAME as SEARCH_STORE_NAME } from '@ithemes/security-search';
20
  import { useSingletonEffect } from '@ithemes/security-hocs';
21
 
@@ -32,106 +30,14 @@ function getAjv() {
32
 
33
  export function useSettingsDefinitions( filters = {} ) {
34
  const ajv = getAjv();
35
- const { modules, activeModules, allSettings } = useSelect( ( select ) => ( {
36
- modules: select( MODULES_STORE_NAME ).getEditedModules(),
37
- activeModules: select( MODULES_STORE_NAME ).getActiveModules(),
38
- allSettings: select(
39
- MODULES_STORE_NAME
40
- ).__unstableGetAllEditedSettings(),
41
- } ) );
42
- const filter = ( module ) =>
43
- ! filters.module || filters.module === module.id;
44
 
45
- const getPassReqGroups = () =>
46
- Object.fromEntries(
47
- modules
48
- .filter(
49
- ( module ) => ! isEmpty( module.password_requirements )
50
- )
51
- .flatMap( ( module ) =>
52
- Object.entries( module.password_requirements )
53
- .filter( ( [ , definition ] ) =>
54
- definition.hasOwnProperty( 'user-group' )
55
- )
56
- .map( ( [ requirement, definition ] ) => [
57
- `requirement_settings.${ requirement }.group`,
58
- {
59
- title: definition.title || module.title,
60
- description:
61
- definition.description ||
62
- module.description,
63
- },
64
- ] )
65
- )
66
- );
67
-
68
- return useMemo(
69
- () =>
70
- modules.reduce( ( definitions, module ) => {
71
- if ( module.status.selected !== 'active' ) {
72
- return definitions;
73
- }
74
-
75
- if ( ! filter( module ) ) {
76
- return definitions;
77
- }
78
-
79
- if (
80
- module.id !== 'password-requirements' &&
81
- isEmpty( module.user_groups )
82
- ) {
83
- return definitions;
84
- }
85
-
86
- const settings = pickBy(
87
- module.id === 'password-requirements'
88
- ? getPassReqGroups()
89
- : module.user_groups,
90
- ( definition ) => {
91
- if ( ! definition.conditional ) {
92
- return true;
93
- }
94
-
95
- if ( definition.conditional[ 'active-modules' ] ) {
96
- for ( const activeModule of definition.conditional[
97
- 'active-modules'
98
- ] ) {
99
- if (
100
- ! activeModules.includes( activeModule )
101
- ) {
102
- return false;
103
- }
104
- }
105
- }
106
-
107
- if ( definition.conditional.settings ) {
108
- const validate = ajv.compile(
109
- definition.conditional.settings
110
- );
111
-
112
- if ( ! validate( allSettings[ module.id ] ) ) {
113
- return false;
114
- }
115
- }
116
-
117
- return true;
118
- }
119
- );
120
-
121
- if ( isEmpty( settings ) ) {
122
- return definitions;
123
- }
124
-
125
- definitions.push( {
126
- id: module.id,
127
- title: module.title,
128
- description: module.description,
129
- settings,
130
- } );
131
-
132
- return definitions;
133
- }, [] ),
134
- [ modules ]
135
  );
136
  }
137
 
@@ -312,45 +218,42 @@ export function useSearchProviders() {
312
  __( 'User Group Settings', 'better-wp-security' ),
313
  25,
314
  ( { registry, evaluate, results } ) => {
315
- const modules = registry
316
- .select( MODULES_STORE_NAME )
317
- .getEditedModules();
318
-
319
- return modules.reduce( ( total, module ) => {
320
- if (
321
- module.status.selected !== 'active' ||
322
- ! module.settings?.interactive?.length
323
- ) {
324
- return total;
325
- }
326
-
327
- return reduce(
328
- module.user_groups,
329
- ( count, config, group ) => {
330
- if (
331
- ! evaluate.stringMatch( config.title ) &&
332
- ! evaluate.stringMatch( config.description ) &&
333
- ! evaluate.keywordMatch( config.keywords )
334
- ) {
335
- return count;
336
- }
337
 
338
- results.groups[ module.id ] ??= {
339
- title: module.title,
340
- items: [],
341
- };
342
 
343
- results.groups[ module.id ].items.push( {
344
- title: config.title,
345
- description: config.description,
346
- route: `/settings/user-groups?module=${ module.id }#${ module.id }/${ group }`,
347
- } );
348
 
349
- return count++;
350
- },
351
- total
352
- );
353
- }, 0 );
 
354
  }
355
  );
356
 
1
  /**
2
  * External dependencies
3
  */
4
+ import { reduce, zipObject } from 'lodash';
5
  import Ajv from 'ajv';
6
 
7
  /**
9
  */
10
  import { useDispatch, useSelect } from '@wordpress/data';
11
  import { __, sprintf } from '@wordpress/i18n';
 
12
 
13
  /**
14
  * Internal dependencies
15
  */
16
  import { ONBOARD_STORE_NAME } from '@ithemes/security.pages.settings';
 
17
  import { STORE_NAME as SEARCH_STORE_NAME } from '@ithemes/security-search';
18
  import { useSingletonEffect } from '@ithemes/security-hocs';
19
 
30
 
31
  export function useSettingsDefinitions( filters = {} ) {
32
  const ajv = getAjv();
 
 
 
 
 
 
 
 
 
33
 
34
+ return useSelect(
35
+ ( select ) =>
36
+ select( 'ithemes-security/user-groups' ).getSettingDefinitions(
37
+ ajv,
38
+ filters
39
+ ),
40
+ [ ajv, filters ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
41
  );
42
  }
43
 
218
  __( 'User Group Settings', 'better-wp-security' ),
219
  25,
220
  ( { registry, evaluate, results } ) => {
221
+ const definitions = registry
222
+ .select( 'ithemes-security/user-groups' )
223
+ .getSettingDefinitions( getAjv() );
224
+
225
+ return definitions.reduce(
226
+ ( total, module ) =>
227
+ reduce(
228
+ module.settings,
229
+ ( count, config, group ) => {
230
+ if (
231
+ ! evaluate.stringMatch( config.title ) &&
232
+ ! evaluate.stringMatch(
233
+ config.description
234
+ ) &&
235
+ ! evaluate.keywordMatch( config.keywords )
236
+ ) {
237
+ return count;
238
+ }
 
 
 
 
239
 
240
+ results.groups[ module.id ] ??= {
241
+ title: module.title,
242
+ items: [],
243
+ };
244
 
245
+ results.groups[ module.id ].items.push( {
246
+ title: config.title,
247
+ description: config.description,
248
+ route: `/settings/user-groups?module=${ module.id }#${ module.id }/${ group }`,
249
+ } );
250
 
251
+ return count++;
252
+ },
253
+ total
254
+ ),
255
+ 0
256
+ );
257
  }
258
  );
259
 
core/modules/user-groups/entries/store/actions.js CHANGED
@@ -14,6 +14,7 @@ import { controls } from '@wordpress/data';
14
  * Internal dependencies
15
  */
16
  import { getSchemaLink } from '@ithemes/security-utils';
 
17
  import { apiFetch } from './controls';
18
 
19
  export const path = '/ithemes-security/v1/user-groups';
@@ -178,7 +179,7 @@ export function* createGroup( group ) {
178
  /**
179
  * Updates a user group.
180
  *
181
- * @param {string} id Group id id to update.
182
  * @param {Object} group Group data.
183
  * @return {IterableIterator<*>} Iterator
184
  */
@@ -231,10 +232,14 @@ export function* deleteGroup( id ) {
231
  /**
232
  * Saves a set of groups in a batch.
233
  *
234
- * @param {{create: Array<Object>, update: Array<Object>}} groups Groups to save.
235
  * @return {Error|{responses: Array<Object>, byId: Object<Object>}} An error, or an object with the list of responses, and responses by id.
236
  */
237
- export function* saveGroups( { create = [], update = [] } ) {
 
 
 
 
238
  const requests = [];
239
 
240
  for ( const group of update ) {
@@ -255,15 +260,19 @@ export function* saveGroups( { create = [], update = [] } ) {
255
  yield startCreateGroup( group );
256
  }
257
 
 
 
 
 
 
 
 
 
258
  let responses;
259
  const byId = {};
260
 
261
  try {
262
- responses = yield apiFetch( {
263
- path: '/batch/v1',
264
- method: 'POST',
265
- data: { requests },
266
- } );
267
  } catch ( error ) {
268
  for ( const group of update ) {
269
  yield failedUpdateGroup( group.id, error );
@@ -273,14 +282,21 @@ export function* saveGroups( { create = [], update = [] } ) {
273
  yield failedCreateGroup( group, error );
274
  }
275
 
 
 
 
 
276
  return error;
277
  }
278
 
279
  for ( let i = 0; i < requests.length; i++ ) {
280
  const request = requests[ i ];
281
  const group = request.body;
282
- const response = responses.responses[ i ];
283
- const id = group.id || response.body.id;
 
 
 
284
 
285
  if ( id ) {
286
  byId[ id ] = response;
@@ -289,12 +305,16 @@ export function* saveGroups( { create = [], update = [] } ) {
289
  if ( response.status >= 400 ) {
290
  if ( request.method === 'PUT' ) {
291
  yield failedUpdateGroup( id, response.body );
 
 
292
  } else {
293
  yield failedCreateGroup( group, response.body );
294
  }
295
  } else {
296
  if ( request.method === 'PUT' ) {
297
  yield finishUpdateGroup( id, response.body );
 
 
298
  } else {
299
  yield finishCreateGroup( group, response.body );
300
  }
@@ -302,13 +322,13 @@ export function* saveGroups( { create = [], update = [] } ) {
302
  }
303
  }
304
 
305
- return { responses: responses.responses, byId };
306
  }
307
 
308
  /**
309
  * Updates a user group.
310
  *
311
- * @param {Object} id Id of group.
312
  * @param {Object} settings New settings.
313
  * @return {IterableIterator<*>} Iterator
314
  */
@@ -356,11 +376,7 @@ export function* saveGroupSettingsAsBatch( groupedSettings ) {
356
  let responses;
357
 
358
  try {
359
- responses = yield apiFetch( {
360
- path: '/batch/v1',
361
- method: 'POST',
362
- data: { requests },
363
- } );
364
  } catch ( error ) {
365
  for ( const groupId of ids ) {
366
  yield failedUpdateGroupSettings( groupId, error );
@@ -373,7 +389,7 @@ export function* saveGroupSettingsAsBatch( groupedSettings ) {
373
 
374
  for ( let i = 0; i < requests.length; i++ ) {
375
  const groupId = ids[ i ];
376
- const response = responses.responses[ i ];
377
  byId[ groupId ] = response.body;
378
 
379
  if ( response.status >= 400 ) {
@@ -384,7 +400,7 @@ export function* saveGroupSettingsAsBatch( groupedSettings ) {
384
  }
385
  }
386
 
387
- return { responses: responses.responses, byId };
388
  }
389
 
390
  export function* fetchGroupsSettings( groupIds = [] ) {
14
  * Internal dependencies
15
  */
16
  import { getSchemaLink } from '@ithemes/security-utils';
17
+ import { apiFetchBatch } from '@ithemes/security.packages.data';
18
  import { apiFetch } from './controls';
19
 
20
  export const path = '/ithemes-security/v1/user-groups';
179
  /**
180
  * Updates a user group.
181
  *
182
+ * @param {string} id Group id id to update.
183
  * @param {Object} group Group data.
184
  * @return {IterableIterator<*>} Iterator
185
  */
232
  /**
233
  * Saves a set of groups in a batch.
234
  *
235
+ * @param {{create: Array<Object>, update: Array<Object>, delete: Array<string>}} groups Groups to save.
236
  * @return {Error|{responses: Array<Object>, byId: Object<Object>}} An error, or an object with the list of responses, and responses by id.
237
  */
238
+ export function* saveGroups( {
239
+ create = [],
240
+ update = [],
241
+ delete: toDelete = [],
242
+ } ) {
243
  const requests = [];
244
 
245
  for ( const group of update ) {
260
  yield startCreateGroup( group );
261
  }
262
 
263
+ for ( const group of toDelete ) {
264
+ requests.push( {
265
+ method: 'DELETE',
266
+ path: `${ path }/${ group }`,
267
+ } );
268
+ yield startDeleteGroup( group );
269
+ }
270
+
271
  let responses;
272
  const byId = {};
273
 
274
  try {
275
+ responses = yield apiFetchBatch( requests );
 
 
 
 
276
  } catch ( error ) {
277
  for ( const group of update ) {
278
  yield failedUpdateGroup( group.id, error );
282
  yield failedCreateGroup( group, error );
283
  }
284
 
285
+ for ( const group of toDelete ) {
286
+ yield failedDeleteGroup( group, error );
287
+ }
288
+
289
  return error;
290
  }
291
 
292
  for ( let i = 0; i < requests.length; i++ ) {
293
  const request = requests[ i ];
294
  const group = request.body;
295
+ const response = responses[ i ];
296
+ const id =
297
+ group?.id ||
298
+ response.body?.id ||
299
+ request.path.replace( `${ path }/`, '' );
300
 
301
  if ( id ) {
302
  byId[ id ] = response;
305
  if ( response.status >= 400 ) {
306
  if ( request.method === 'PUT' ) {
307
  yield failedUpdateGroup( id, response.body );
308
+ } else if ( request.method === 'DELETE' ) {
309
+ yield failedDeleteGroup( id, response.body );
310
  } else {
311
  yield failedCreateGroup( group, response.body );
312
  }
313
  } else {
314
  if ( request.method === 'PUT' ) {
315
  yield finishUpdateGroup( id, response.body );
316
+ } else if ( request.method === 'DELETE' ) {
317
+ yield finishDeleteGroup( id );
318
  } else {
319
  yield finishCreateGroup( group, response.body );
320
  }
322
  }
323
  }
324
 
325
+ return { responses, byId };
326
  }
327
 
328
  /**
329
  * Updates a user group.
330
  *
331
+ * @param {Object} id Id of group.
332
  * @param {Object} settings New settings.
333
  * @return {IterableIterator<*>} Iterator
334
  */
376
  let responses;
377
 
378
  try {
379
+ responses = yield apiFetchBatch( requests );
 
 
 
 
380
  } catch ( error ) {
381
  for ( const groupId of ids ) {
382
  yield failedUpdateGroupSettings( groupId, error );
389
 
390
  for ( let i = 0; i < requests.length; i++ ) {
391
  const groupId = ids[ i ];
392
+ const response = responses[ i ];
393
  byId[ groupId ] = response.body;
394
 
395
  if ( response.status >= 400 ) {
400
  }
401
  }
402
 
403
+ return { responses, byId };
404
  }
405
 
406
  export function* fetchGroupsSettings( groupIds = [] ) {
core/modules/user-groups/entries/store/controls.js CHANGED
@@ -28,9 +28,9 @@ export function apiFetch( request ) {
28
  /**
29
  * Calls a selector using the current state.
30
  *
31
- * @param {string} storeKey Store key.
32
  * @param {string} selectorName Selector name.
33
- * @param {Array} args Selector arguments.
34
  *
35
  * @return {Object} control descriptor.
36
  */
@@ -46,9 +46,9 @@ export function select( storeKey, selectorName, ...args ) {
46
  /**
47
  * Dispatches a control action for triggering a registry dispatch.
48
  *
49
- * @param {string} storeKey The key for the store the action belongs to
50
- * @param {string} actionName The name of the action to dispatch
51
- * @param {Array} args Arguments for the dispatch action.
52
  *
53
  * @example
54
  * ```js
28
  /**
29
  * Calls a selector using the current state.
30
  *
31
+ * @param {string} storeKey Store key.
32
  * @param {string} selectorName Selector name.
33
+ * @param {Array} args Selector arguments.
34
  *
35
  * @return {Object} control descriptor.
36
  */
46
  /**
47
  * Dispatches a control action for triggering a registry dispatch.
48
  *
49
+ * @param {string} storeKey The key for the store the action belongs to
50
+ * @param {string} actionName The name of the action to dispatch
51
+ * @param {Array} args Arguments for the dispatch action.
52
  *
53
  * @example
54
  * ```js
core/modules/user-groups/entries/store/index.js CHANGED
@@ -6,6 +6,7 @@ import { registerStore } from '@wordpress/data';
6
  /**
7
  * Internal dependencies
8
  */
 
9
  import controls from './controls';
10
  import * as actions from './actions';
11
  import * as selectors from './selectors';
@@ -13,7 +14,7 @@ import userGroups from './reducers';
13
  import * as resolvers from './resolvers';
14
 
15
  const store = registerStore( 'ithemes-security/user-groups', {
16
- controls,
17
  actions,
18
  selectors,
19
  resolvers,
6
  /**
7
  * Internal dependencies
8
  */
9
+ import { controls as dataControls } from '@ithemes/security.packages.data';
10
  import controls from './controls';
11
  import * as actions from './actions';
12
  import * as selectors from './selectors';
14
  import * as resolvers from './resolvers';
15
 
16
  const store = registerStore( 'ithemes-security/user-groups', {
17
+ controls: { ...dataControls, ...controls },
18
  actions,
19
  selectors,
20
  resolvers,
core/modules/user-groups/entries/store/reducers.js CHANGED
@@ -88,12 +88,12 @@ export default function userGroups( state = DEFAULT_STATE, action ) {
88
  },
89
  matchablesById: state.matchablesById[ action.group.id ]
90
  ? {
91
- ...state.matchablesById,
92
- [ action.group.id ]: {
93
- ...state.matchablesById[ action.group.id ],
94
- label: action.group.label,
95
- },
96
- }
97
  : state.matchablesById,
98
  };
99
  case GROUP_NOT_FOUND: {
88
  },
89
  matchablesById: state.matchablesById[ action.group.id ]
90
  ? {
91
+ ...state.matchablesById,
92
+ [ action.group.id ]: {
93
+ ...state.matchablesById[ action.group.id ],
94
+ label: action.group.label,
95
+ },
96
+ }
97
  : state.matchablesById,
98
  };
99
  case GROUP_NOT_FOUND: {
core/modules/user-groups/entries/store/selectors.js CHANGED
@@ -2,13 +2,19 @@
2
  * External dependencies
3
  */
4
  import createSelector from 'rememo';
5
- import { map, filter, isObject, get } from 'lodash';
 
6
 
7
  /**
8
  * WordPress dependencies
9
  */
10
  import { createRegistrySelector } from '@wordpress/data';
11
 
 
 
 
 
 
12
  /**
13
  * Get the list of matchables.
14
  *
@@ -28,7 +34,7 @@ export const getMatchables = createSelector(
28
  * Gets the type of a matchable.
29
  *
30
  * @param {Object} state Store state.
31
- * @param {string} id Matchable id.
32
  *
33
  * @return {string} Either 'user-group' or 'meta'.
34
  */
@@ -40,7 +46,7 @@ export function getMatchableType( state, id ) {
40
  * Gets the label for a matchable.
41
  *
42
  * @param {Object} state Store state.
43
- * @param {string} id Matchable id.
44
  *
45
  * @return {string} The matchable's label.
46
  */
@@ -82,7 +88,7 @@ export function getQueriedObjectIds( state, queryId ) {
82
  * Checks if this group could not be found.
83
  *
84
  * @param {Object} state The store state.
85
- * @param {string} id The group id.
86
  * @return {boolean} True if not found.
87
  */
88
  export function isGroupNotFound( state, id ) {
@@ -182,9 +188,9 @@ export function isUpdatingSettings( state, id ) {
182
  /**
183
  * Is a bulk patch in progress.
184
  *
185
- * @param {Object} state
186
  * @param {Array<string>} groupIds
187
- * @param {Object} patch
188
  * @return {boolean} True if bulk patching.
189
  */
190
  export function isBulkPatchingSettings( state, groupIds, patch ) {
@@ -238,3 +244,121 @@ export function getGroupsBySetting( state ) {
238
 
239
  return bySetting;
240
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  * External dependencies
3
  */
4
  import createSelector from 'rememo';
5
+ import { map, filter, isObject, get, isEmpty, pickBy } from 'lodash';
6
+ import memize from 'memize';
7
 
8
  /**
9
  * WordPress dependencies
10
  */
11
  import { createRegistrySelector } from '@wordpress/data';
12
 
13
+ /**
14
+ * Internal dependencies
15
+ */
16
+ import { MODULES_STORE_NAME } from '@ithemes/security.packages.data';
17
+
18
  /**
19
  * Get the list of matchables.
20
  *
34
  * Gets the type of a matchable.
35
  *
36
  * @param {Object} state Store state.
37
+ * @param {string} id Matchable id.
38
  *
39
  * @return {string} Either 'user-group' or 'meta'.
40
  */
46
  * Gets the label for a matchable.
47
  *
48
  * @param {Object} state Store state.
49
+ * @param {string} id Matchable id.
50
  *
51
  * @return {string} The matchable's label.
52
  */
88
  * Checks if this group could not be found.
89
  *
90
  * @param {Object} state The store state.
91
+ * @param {string} id The group id.
92
  * @return {boolean} True if not found.
93
  */
94
  export function isGroupNotFound( state, id ) {
188
  /**
189
  * Is a bulk patch in progress.
190
  *
191
+ * @param {Object} state
192
  * @param {Array<string>} groupIds
193
+ * @param {Object} patch
194
  * @return {boolean} True if bulk patching.
195
  */
196
  export function isBulkPatchingSettings( state, groupIds, patch ) {
244
 
245
  return bySetting;
246
  }
247
+
248
+ function _getPassReqGroups( modules ) {
249
+ return Object.fromEntries(
250
+ modules
251
+ .filter( ( module ) => ! isEmpty( module.password_requirements ) )
252
+ .flatMap( ( module ) =>
253
+ Object.entries( module.password_requirements )
254
+ .filter( ( [ , definition ] ) =>
255
+ definition.hasOwnProperty( 'user-group' )
256
+ )
257
+ .map( ( [ requirement, definition ] ) => [
258
+ `requirement_settings.${ requirement }.group`,
259
+ {
260
+ title: definition.title || module.title,
261
+ description:
262
+ definition.description || module.description,
263
+ },
264
+ ] )
265
+ )
266
+ );
267
+ }
268
+
269
+ const _getSettingDefinitions = memize(
270
+ (
271
+ ajv,
272
+ filters,
273
+ { skipConditions = false },
274
+ modules,
275
+ activeModules,
276
+ allSettings
277
+ ) => {
278
+ const includeModule = ( module ) =>
279
+ ! filters.module || filters.module === module.id;
280
+
281
+ return modules.reduce( ( definitions, module ) => {
282
+ if ( module.status.selected !== 'active' ) {
283
+ return definitions;
284
+ }
285
+
286
+ if ( ! includeModule( module ) ) {
287
+ return definitions;
288
+ }
289
+
290
+ if (
291
+ module.id !== 'password-requirements' &&
292
+ isEmpty( module.user_groups )
293
+ ) {
294
+ return definitions;
295
+ }
296
+
297
+ const settings = pickBy(
298
+ module.id === 'password-requirements'
299
+ ? _getPassReqGroups( modules )
300
+ : module.user_groups,
301
+ ( definition ) => {
302
+ if ( ! definition.conditional || skipConditions ) {
303
+ return true;
304
+ }
305
+
306
+ if ( definition.conditional[ 'active-modules' ] ) {
307
+ for ( const activeModule of definition.conditional[
308
+ 'active-modules'
309
+ ] ) {
310
+ if ( ! activeModules.includes( activeModule ) ) {
311
+ return false;
312
+ }
313
+ }
314
+ }
315
+
316
+ if ( definition.conditional.settings ) {
317
+ const validate = ajv.compile(
318
+ definition.conditional.settings
319
+ );
320
+
321
+ if ( ! validate( allSettings[ module.id ] ) ) {
322
+ return false;
323
+ }
324
+ }
325
+
326
+ return true;
327
+ }
328
+ );
329
+
330
+ if ( isEmpty( settings ) ) {
331
+ return definitions;
332
+ }
333
+
334
+ definitions.push( {
335
+ id: module.id,
336
+ title: module.title,
337
+ description: module.description,
338
+ settings,
339
+ } );
340
+
341
+ return definitions;
342
+ }, [] );
343
+ },
344
+ { maxSize: 1 }
345
+ );
346
+
347
+ const EMPTY_OBJECT = {};
348
+
349
+ export const getSettingDefinitions = createRegistrySelector(
350
+ ( select ) => (
351
+ state,
352
+ ajv,
353
+ filters = EMPTY_OBJECT,
354
+ options = EMPTY_OBJECT
355
+ ) =>
356
+ _getSettingDefinitions(
357
+ ajv,
358
+ filters,
359
+ options,
360
+ select( MODULES_STORE_NAME ).getEditedModules(),
361
+ select( MODULES_STORE_NAME ).getActiveModules(),
362
+ select( MODULES_STORE_NAME ).__unstableGetAllEditedSettings()
363
+ )
364
+ );
core/modules/wordpress-tweaks/activate.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
 
3
- require_once( 'class-itsec-wordpress-tweaks.php' );
4
 
5
  ITSEC_WordPress_Tweaks::activate();
1
  <?php
2
 
3
+ require_once __DIR__ . '/class-itsec-wordpress-tweaks.php';
4
 
5
  ITSEC_WordPress_Tweaks::activate();
core/modules/wordpress-tweaks/active.php CHANGED
@@ -1,3 +1,3 @@
1
  <?php
2
 
3
- require_once( 'class-itsec-wordpress-tweaks.php' );
1
  <?php
2
 
3
+ require_once __DIR__ . '/class-itsec-wordpress-tweaks.php';
core/modules/wordpress-tweaks/class-itsec-wordpress-tweaks.php CHANGED
@@ -59,18 +59,19 @@ final class ITSEC_WordPress_Tweaks {
59
  }
60
 
61
  public function init() {
62
- $this->add_config_hooks();
 
 
63
 
 
64
 
65
  if ( defined( 'WP_CLI' ) && WP_CLI ) {
66
  // Don't risk blocking anything with WP_CLI.
67
  return;
68
  }
69
 
70
-
71
  $this->settings = ITSEC_Modules::get_settings( 'wordpress-tweaks' );
72
 
73
-
74
  // Functional code for the valid_user_login_type setting.
75
  if ( 'email' === $this->settings['valid_user_login_type'] ) {
76
  add_action( 'login_init', array( $this, 'add_gettext_filter' ) );
59
  }
60
 
61
  public function init() {
62
+ if ( ITSEC_Core::is_temp_disable_modules_set() ) {
63
+ return;
64
+ }
65
 
66
+ $this->add_config_hooks();
67
 
68
  if ( defined( 'WP_CLI' ) && WP_CLI ) {
69
  // Don't risk blocking anything with WP_CLI.
70
  return;
71
  }
72
 
 
73
  $this->settings = ITSEC_Modules::get_settings( 'wordpress-tweaks' );
74
 
 
75
  // Functional code for the valid_user_login_type setting.
76
  if ( 'email' === $this->settings['valid_user_login_type'] ) {
77
  add_action( 'login_init', array( $this, 'add_gettext_filter' ) );
core/modules/wordpress-tweaks/deactivate.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
 
3
- require_once( 'class-itsec-wordpress-tweaks.php' );
4
 
5
  ITSEC_WordPress_Tweaks::deactivate();
1
  <?php
2
 
3
+ require_once __DIR__ . '/class-itsec-wordpress-tweaks.php';
4
 
5
  ITSEC_WordPress_Tweaks::deactivate();
core/package.json CHANGED
@@ -3,44 +3,55 @@
3
  "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.",
4
  "version": "5.6.0",
5
  "author": "iThemes",
 
 
 
 
6
  "browserslist": [
7
  "extends @wordpress/browserslist-config"
8
  ],
 
9
  "dependencies": {
 
 
 
10
  "@react-hook/debounce": "^3.0.0",
11
  "@rjsf/core": "^2.5.1",
12
- "@wordpress/a11y": "^2.15.2",
13
- "@wordpress/api-fetch": "^3.23.1",
14
- "@wordpress/autop": "^2.12.2",
15
- "@wordpress/base-styles": "^3.4.2",
16
- "@wordpress/components": "^13.0.2",
17
- "@wordpress/compose": "^3.25.2",
18
- "@wordpress/data": "^4.27.2",
19
- "@wordpress/date": "^3.15.1",
20
- "@wordpress/dom-ready": "^2.13.2",
21
- "@wordpress/element": "^2.20.2",
22
- "@wordpress/hooks": "^2.12.2",
23
- "@wordpress/html-entities": "^2.11.2",
24
- "@wordpress/i18n": "^3.19.2",
25
- "@wordpress/is-shallow-equal": "^3.1.2",
26
- "@wordpress/keycodes": "^2.19.2",
27
- "@wordpress/notices": "^2.13.2",
28
- "@wordpress/plugins": "^2.25.2",
29
- "@wordpress/redux-routine": "^3.14.2",
30
- "@wordpress/rich-text": "^3.25.2",
31
- "@wordpress/url": "^2.22.2",
32
- "@wordpress/viewport": "^2.26.2",
33
  "ajv": "^6.12.6",
34
  "classnames": "^2.3.1",
35
  "contrast": "^1.0.1",
36
  "deep-object-diff": "^1.1.0",
 
 
37
  "history": "^4.10.1",
38
  "interweave": "^12.7.2",
 
39
  "li": "^1.3.0",
40
  "lodash": "^4.17.21",
41
  "memize": "^1.1.0",
42
  "query-string": "^7.0.0",
43
- "react": "^16.14.0",
44
  "react-error-boundary": "^3.1.3",
45
  "react-grid-layout": "^0.18.0",
46
  "react-hooks-global-state": "^1.0.1",
@@ -58,6 +69,7 @@
58
  },
59
  "devDependencies": {
60
  "@babel/core": "^7.13.16",
 
61
  "@babel/plugin-proposal-class-properties": "^7.13.0",
62
  "@babel/plugin-proposal-export-default-from": "^7.12.13",
63
  "@babel/plugin-proposal-private-methods": "^7.13.0",
@@ -65,16 +77,18 @@
65
  "@babel/plugin-syntax-dynamic-import": "^7.8.3",
66
  "@babel/plugin-transform-react-jsx": "^7.13.12",
67
  "@babel/runtime-corejs2": "^7.13.17",
 
68
  "@emotion/core": "^10.1.1",
69
- "@emotion/styled": "^10.0.27",
70
  "@emotion/stylis": "^0.8.5",
71
- "@wordpress/babel-plugin-import-jsx-pragma": "^3.0.3",
72
- "@wordpress/babel-preset-default": "^5.2.1",
73
- "@wordpress/browserslist-config": "^3.0.3",
74
- "@wordpress/custom-templated-path-webpack-plugin": "^2.0.3",
75
- "@wordpress/icons": "^2.10.2",
76
- "@wordpress/jest-preset-default": "^7.0.3",
77
- "@wordpress/scripts": "^15.0.1",
 
78
  "acorn": "^6.4.2",
79
  "autoprefixer": "^9.8.6",
80
  "babel-loader": "^8.2.2",
@@ -89,12 +103,12 @@
89
  "husky": "^1.3.1",
90
  "loader-utils": "^1.4.0",
91
  "mini-css-extract-plugin": "^0.5.0",
92
- "node-sass": "^4.14.1",
93
  "path": "^0.12.7",
94
  "postcss-loader": "^3.0.0",
95
  "raw-loader": "^1.0.0",
96
  "readdirp": "^2.2.1",
97
  "rimraf": "^2.7.1",
 
98
  "sass-loader": "^7.3.1",
99
  "style-loader": "^0.23.1",
100
  "svg-react-loader": "github:woutervanvliet/svg-react-loader",
@@ -105,7 +119,8 @@
105
  "webpack-livereload-plugin": "^2.3.0",
106
  "webpack-manifest-plugin": "^2.2.0",
107
  "webpack-sources": "latest",
108
- "webpack-webstorm-debugger-script": "^1.0.1"
 
109
  },
110
  "directories": {},
111
  "homepage": "https://ithemes.com/security",
3
  "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.",
4
  "version": "5.6.0",
5
  "author": "iThemes",
6
+ "engines": {
7
+ "npm": "^8",
8
+ "node": "^16"
9
+ },
10
  "browserslist": [
11
  "extends @wordpress/browserslist-config"
12
  ],
13
+ "prettier": "@wordpress/prettier-config",
14
  "dependencies": {
15
+ "@emotion/css": "^11.7.1",
16
+ "@emotion/react": "^11.5.0",
17
+ "@ithemes/ui": "^0.3.0",
18
  "@react-hook/debounce": "^3.0.0",
19
  "@rjsf/core": "^2.5.1",
20
+ "@wordpress/a11y": "^3.4.1",
21
+ "@wordpress/api-fetch": "^6.1.1",
22
+ "@wordpress/autop": "^3.4.1",
23
+ "@wordpress/base-styles": "^4.2.1",
24
+ "@wordpress/components": "^19.6.1",
25
+ "@wordpress/compose": "^5.2.1",
26
+ "@wordpress/data": "^6.4.1",
27
+ "@wordpress/date": "^4.4.1",
28
+ "@wordpress/dom-ready": "^3.4.1",
29
+ "@wordpress/element": "^4.2.1",
30
+ "@wordpress/hooks": "^3.4.1",
31
+ "@wordpress/html-entities": "^3.4.1",
32
+ "@wordpress/i18n": "^4.4.1",
33
+ "@wordpress/is-shallow-equal": "^4.4.1",
34
+ "@wordpress/keycodes": "^3.4.1",
35
+ "@wordpress/notices": "^3.4.1",
36
+ "@wordpress/plugins": "^4.2.1",
37
+ "@wordpress/redux-routine": "^4.4.1",
38
+ "@wordpress/rich-text": "^5.2.1",
39
+ "@wordpress/url": "^3.5.1",
40
+ "@wordpress/viewport": "^4.2.1",
41
  "ajv": "^6.12.6",
42
  "classnames": "^2.3.1",
43
  "contrast": "^1.0.1",
44
  "deep-object-diff": "^1.1.0",
45
+ "file-saver": "^2.0.5",
46
+ "get-wild": "^1.5.0",
47
  "history": "^4.10.1",
48
  "interweave": "^12.7.2",
49
+ "json-ptr": "^3.0.1",
50
  "li": "^1.3.0",
51
  "lodash": "^4.17.21",
52
  "memize": "^1.1.0",
53
  "query-string": "^7.0.0",
54
+ "react": "17.0.2",
55
  "react-error-boundary": "^3.1.3",
56
  "react-grid-layout": "^0.18.0",
57
  "react-hooks-global-state": "^1.0.1",
69
  },
70
  "devDependencies": {
71
  "@babel/core": "^7.13.16",
72
+ "@babel/eslint-parser": "^7.17.0",
73
  "@babel/plugin-proposal-class-properties": "^7.13.0",
74
  "@babel/plugin-proposal-export-default-from": "^7.12.13",
75
  "@babel/plugin-proposal-private-methods": "^7.13.0",
77
  "@babel/plugin-syntax-dynamic-import": "^7.8.3",
78
  "@babel/plugin-transform-react-jsx": "^7.13.12",
79
  "@babel/runtime-corejs2": "^7.13.17",
80
+ "@emotion/babel-plugin": "^11.7.2",
81
  "@emotion/core": "^10.1.1",
82
+ "@emotion/styled": "^11.3.0",
83
  "@emotion/stylis": "^0.8.5",
84
+ "@wordpress/babel-plugin-import-jsx-pragma": "^3.1.2",
85
+ "@wordpress/babel-preset-default": "^6.6.1",
86
+ "@wordpress/browserslist-config": "^4.1.2",
87
+ "@wordpress/custom-templated-path-webpack-plugin": "^2.1.2",
88
+ "@wordpress/icons": "^8.0.1",
89
+ "@wordpress/jest-preset-default": "^8.1.1",
90
+ "@wordpress/prettier-config": "^1.1.3",
91
+ "@wordpress/scripts": "^22.2.1",
92
  "acorn": "^6.4.2",
93
  "autoprefixer": "^9.8.6",
94
  "babel-loader": "^8.2.2",
103
  "husky": "^1.3.1",
104
  "loader-utils": "^1.4.0",
105
  "mini-css-extract-plugin": "^0.5.0",
 
106
  "path": "^0.12.7",
107
  "postcss-loader": "^3.0.0",
108
  "raw-loader": "^1.0.0",
109
  "readdirp": "^2.2.1",
110
  "rimraf": "^2.7.1",
111
+ "sass": "^1.49.9",
112
  "sass-loader": "^7.3.1",
113
  "style-loader": "^0.23.1",
114
  "svg-react-loader": "github:woutervanvliet/svg-react-loader",
119
  "webpack-livereload-plugin": "^2.3.0",
120
  "webpack-manifest-plugin": "^2.2.0",
121
  "webpack-sources": "latest",
122
+ "webpack-webstorm-debugger-script": "^1.0.1",
123
+ "wp-prettier": "^2.2.1-beta-1"
124
  },
125
  "directories": {},
126
  "homepage": "https://ithemes.com/security",
core/packages/components/src/accordion/index.js CHANGED
@@ -157,11 +157,11 @@ function Header( {
157
  { spinner
158
  ? spinner
159
  : icon && (
160
- <Dashicon
161
- icon={ icon }
162
- className="itsec-accordion__header-icon"
163
- />
164
- ) }
165
  </Button>
166
  </Component>
167
  );
157
  { spinner
158
  ? spinner
159
  : icon && (
160
+ <Dashicon
161
+ icon={ icon }
162
+ className="itsec-accordion__header-icon"
163
+ />
164
+ ) }
165
  </Button>
166
  </Component>
167
  );
core/packages/components/src/active-descendant-container/index.js CHANGED
@@ -79,9 +79,9 @@ function scrollIntoView( parent, element ) {
79
  parent.scrollTop =
80
  element.offsetTop -
81
  parent.offsetTop -
82
- parent.clientHeight / 2 -
83
  parentBorderTopWidth +
84
- element.clientHeight / 2;
85
  parent.scrollLeft = 0;
86
  }
87
  }
79
  parent.scrollTop =
80
  element.offsetTop -
81
  parent.offsetTop -
82
+ ( parent.clientHeight / 2 ) -
83
  parentBorderTopWidth +
84
+ ( element.clientHeight / 2 );
85
  parent.scrollLeft = 0;
86
  }
87
  }
core/packages/components/src/async-select/index.js CHANGED
@@ -13,7 +13,7 @@ import { __ } from '@wordpress/i18n';
13
  /**
14
  * Async dependencies
15
  */
16
- const Select = lazy( () => import( 'react-select/Async' ) );
17
 
18
  function LoadError() {
19
  return <span>{ __( 'Error when loading. Please refresh.', 'better-wp-security' ) }</span>;
13
  /**
14
  * Async dependencies
15
  */
16
+ const Select = lazy( () => import( 'react-select/async' ) );
17
 
18
  function LoadError() {
19
  return <span>{ __( 'Error when loading. Please refresh.', 'better-wp-security' ) }</span>;
core/packages/components/src/checkbox-control/index.js CHANGED
@@ -7,7 +7,7 @@ import classnames from 'classnames';
7
  * WordPress dependencies
8
  */
9
  import { useInstanceId } from '@wordpress/compose';
10
- import { Icon, check, minus } from '@wordpress/icons';
11
  import { BaseControl, VisuallyHidden } from '@wordpress/components';
12
 
13
  /**
@@ -66,7 +66,7 @@ export default function CheckboxControl( {
66
  ) }
67
  { indeterminate && (
68
  <Icon
69
- icon={ minus }
70
  className="components-checkbox-control__checked"
71
  role="presentation"
72
  />
7
  * WordPress dependencies
8
  */
9
  import { useInstanceId } from '@wordpress/compose';
10
+ import { Icon, check, reset } from '@wordpress/icons';
11
  import { BaseControl, VisuallyHidden } from '@wordpress/components';
12
 
13
  /**
66
  ) }
67
  { indeterminate && (
68
  <Icon
69
+ icon={ reset }
70
  className="components-checkbox-control__checked"
71
  role="presentation"
72
  />
core/packages/components/src/checkbox-group-control/index.js CHANGED
@@ -2,6 +2,7 @@
2
  * External dependencies
3
  */
4
  import { omit, isArray } from 'lodash';
 
5
 
6
  /**
7
  * WordPress dependencies
@@ -16,6 +17,7 @@ export default function CheckboxGroupControl( {
16
  help,
17
  disabled,
18
  readOnly,
 
19
  } ) {
20
  let isChecked, update;
21
 
@@ -26,8 +28,8 @@ export default function CheckboxGroupControl( {
26
  checked
27
  ? [ ...value, option.value ]
28
  : value.filter(
29
- ( maybeValue ) => maybeValue !== option.value
30
- )
31
  );
32
  } else {
33
  isChecked = ( option ) => value[ option.value ] || false;
@@ -36,7 +38,9 @@ export default function CheckboxGroupControl( {
36
  }
37
 
38
  return (
39
- <fieldset className="components-base-control">
 
 
40
  <div className="components-base-control__field">
41
  <legend className="components-base-control__label">
42
  { label }
@@ -44,20 +48,26 @@ export default function CheckboxGroupControl( {
44
  { help && (
45
  <p className="components-base-control__help">{ help }</p>
46
  ) }
47
- { options.map( ( option ) => (
48
- <CheckboxControl
49
- { ...omit( option, [
50
- 'value',
51
- 'disabled',
52
- 'readOnly',
53
- ] ) }
54
- key={ option.value }
55
- checked={ isChecked( option ) }
56
- onChange={ update( option ) }
57
- disabled={ disabled || option.disabled }
58
- readOnly={ readOnly || option.readOnly }
59
- />
60
- ) ) }
 
 
 
 
 
 
61
  </div>
62
  </fieldset>
63
  );
2
  * External dependencies
3
  */
4
  import { omit, isArray } from 'lodash';
5
+ import classnames from 'classnames';
6
 
7
  /**
8
  * WordPress dependencies
17
  help,
18
  disabled,
19
  readOnly,
20
+ className,
21
  } ) {
22
  let isChecked, update;
23
 
28
  checked
29
  ? [ ...value, option.value ]
30
  : value.filter(
31
+ ( maybeValue ) => maybeValue !== option.value
32
+ )
33
  );
34
  } else {
35
  isChecked = ( option ) => value[ option.value ] || false;
38
  }
39
 
40
  return (
41
+ <fieldset
42
+ className={ classnames( 'components-base-control', className ) }
43
+ >
44
  <div className="components-base-control__field">
45
  <legend className="components-base-control__label">
46
  { label }
48
  { help && (
49
  <p className="components-base-control__help">{ help }</p>
50
  ) }
51
+ <div className="itsec-components-checkbox-group-control__options">
52
+ { options.map( ( option ) => (
53
+ <CheckboxControl
54
+ { ...omit( option, [
55
+ 'value',
56
+ 'disabled',
57
+ 'readOnly',
58
+ ] ) }
59
+ key={ option.value }
60
+ checked={ isChecked( option ) }
61
+ onChange={ update( option ) }
62
+ disabled={ disabled || option.disabled }
63
+ readOnly={ readOnly || option.readOnly }
64
+ className={
65
+ isChecked( option ) &&
66
+ 'itsec-components-checkbox-group-control__option--is-checked'
67
+ }
68
+ />
69
+ ) ) }
70
+ </div>
71
  </div>
72
  </fieldset>
73
  );
core/packages/components/src/entity-select-control/index.js ADDED
@@ -0,0 +1,139 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import { createGlobalState } from 'react-hooks-global-state';
5
+ import { mapValues, keyBy } from 'lodash';
6
+
7
+ /**
8
+ * WordPress dependencies
9
+ */
10
+ import { useState, useCallback } from '@wordpress/element';
11
+ import apiFetch from '@wordpress/api-fetch';
12
+ import { addQueryArgs } from '@wordpress/url';
13
+ import { BaseControl } from '@wordpress/components';
14
+
15
+ /**
16
+ * Internal dependencies
17
+ */
18
+ import { AsyncSelect, Markup } from '../';
19
+ import { useInstanceId } from '@wordpress/compose';
20
+
21
+ const { useGlobalState } = createGlobalState( { cache: {} } );
22
+
23
+ export default function EntitySelectControl( {
24
+ id,
25
+ value,
26
+ disabled,
27
+ readonly,
28
+ onChange,
29
+ label,
30
+ description,
31
+ isMultiple = false,
32
+ path,
33
+ query = {},
34
+ labelAttr,
35
+ idAttr = 'id',
36
+ searchArg = 'search',
37
+ } ) {
38
+ const [ cache, setCache ] = useGlobalState( 'cache' );
39
+ const instanceId = useInstanceId(
40
+ EntitySelectControl,
41
+ 'itsec-entity-select-control'
42
+ );
43
+ id = id || instanceId;
44
+
45
+ const [ input, setInput ] = useState( '' );
46
+ const loader = useLoader(
47
+ path,
48
+ query,
49
+ labelAttr,
50
+ idAttr,
51
+ searchArg,
52
+ cache,
53
+ setCache
54
+ );
55
+
56
+ let asyncValue;
57
+
58
+ if ( isMultiple ) {
59
+ asyncValue = ( value || [] )
60
+ .filter( ( item ) => item !== undefined )
61
+ .map( ( itemId ) => ( {
62
+ value: itemId,
63
+ label: cache[ path ]?.[ itemId ] || itemId,
64
+ } ) );
65
+ } else if ( value ) {
66
+ asyncValue = {
67
+ value,
68
+ label: cache[ path ]?.[ value ] || value,
69
+ };
70
+ }
71
+
72
+ return (
73
+ <BaseControl
74
+ className="itsec-entity-select-control"
75
+ label={ label }
76
+ help={ <Markup noWrap content={ description } /> }
77
+ id={ id }
78
+ >
79
+ <AsyncSelect
80
+ aria-label={ label }
81
+ aria-describedby={ description ? id + '__help' : undefined }
82
+ classNamePrefix="itsec-entity-select-control-as"
83
+ inputId={ id }
84
+ isDisabled={ disabled || readonly }
85
+ isMulti={ isMultiple }
86
+ isClearable
87
+ cacheOptions
88
+ defaultOptions
89
+ loadOptions={ loader }
90
+ value={ asyncValue }
91
+ onChange={ ( nextValue ) =>
92
+ onChange(
93
+ isMultiple
94
+ ? ( nextValue || [] ).map( ( item ) => item.value )
95
+ : nextValue?.value
96
+ )
97
+ }
98
+ inputValue={ input }
99
+ onInputChange={ setInput }
100
+ />
101
+ </BaseControl>
102
+ );
103
+ }
104
+
105
+ function useLoader(
106
+ path,
107
+ query,
108
+ labelAttr,
109
+ idAttr,
110
+ searchArg,
111
+ cache,
112
+ setCache
113
+ ) {
114
+ return useCallback(
115
+ ( search ) => {
116
+ return apiFetch( {
117
+ path: addQueryArgs( path, { ...query, [ searchArg ]: search } ),
118
+ } )
119
+ .then( ( response ) =>
120
+ response.map( ( item ) => ( {
121
+ value: item[ idAttr ],
122
+ label: item[ labelAttr ],
123
+ } ) )
124
+ )
125
+ .then( ( items ) => {
126
+ setCache( {
127
+ ...cache,
128
+ [ path ]: {
129
+ ...( cache[ path ] || {} ),
130
+ ...mapValues( keyBy( items, 'value' ), 'label' ),
131
+ },
132
+ } );
133
+
134
+ return items;
135
+ } );
136
+ },
137
+ [ path, query, labelAttr, idAttr, searchArg, cache ]
138
+ );
139
+ }
core/packages/components/src/entity-select-control/index.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php // Silence is golden.
core/packages/components/src/error-list/index.js CHANGED
@@ -10,6 +10,7 @@ export default function ErrorList( {
10
  schemaError,
11
  title,
12
  className,
 
13
  } ) {
14
  const all = [
15
  ...errors,
@@ -26,6 +27,7 @@ export default function ErrorList( {
26
  messages={ all }
27
  title={ title }
28
  className={ className }
 
29
  type="error"
30
  />
31
  );
10
  schemaError,
11
  title,
12
  className,
13
+ hasBorder,
14
  } ) {
15
  const all = [
16
  ...errors,
27
  messages={ all }
28
  title={ title }
29
  className={ className }
30
+ hasBorder={ hasBorder }
31
  type="error"
32
  />
33
  );
core/packages/components/src/help-list/index.js CHANGED
@@ -15,7 +15,7 @@ import { useState } from '@wordpress/element';
15
  /**
16
  * Internal dependencies
17
  */
18
- import { HELP_STORE_NAME } from '@ithemes/security-data';
19
  import { Markup } from '@ithemes/security-components';
20
  import './style.scss';
21
 
@@ -83,8 +83,8 @@ function RemoteHelp( { topic, fallback } ) {
83
  : [],
84
  fallbackLoaded: fallback
85
  ? select( HELP_STORE_NAME ).hasFinishedResolution( 'getHelp', [
86
- fallback,
87
- ] )
88
  : true,
89
  } )
90
  );
15
  /**
16
  * Internal dependencies
17
  */
18
+ import { HELP_STORE_NAME } from '@ithemes/security.packages.data';
19
  import { Markup } from '@ithemes/security-components';
20
  import './style.scss';
21
 
83
  : [],
84
  fallbackLoaded: fallback
85
  ? select( HELP_STORE_NAME ).hasFinishedResolution( 'getHelp', [
86
+ fallback,
87
+ ] )
88
  : true,
89
  } )
90
  );
core/packages/components/src/help-list/style.scss CHANGED
@@ -1,8 +1,11 @@
1
  .itsec-help-list-section {
2
- @include break-small {
3
- display: grid;
4
- grid-template-columns: 165px auto;
5
- min-height: 200px;
 
 
 
6
  }
7
 
8
  header {
1
  .itsec-help-list-section {
2
+ &.components-surface > div,
3
+ &:not(.components-surface) {
4
+ @include break-small {
5
+ display: grid;
6
+ grid-template-columns: 165px auto;
7
+ min-height: 200px;
8
+ }
9
  }
10
 
11
  header {
core/packages/components/src/index.js CHANGED
@@ -24,6 +24,7 @@ export { default as Tree, walkTree } from './tree';
24
  export { default as ActiveDescendantContainer } from './active-descendant-container';
25
  export { FlexSpacer } from './flex';
26
  export { default as MessageList } from './message-list';
 
27
  export { default as ErrorList } from './error-list';
28
  export { default as Accordion } from './accordion';
29
  export { default as IconPopover } from './icon-popover';
@@ -31,3 +32,4 @@ export { default as HelpPopover } from './help-popover';
31
  export { default as HelpList } from './help-list';
32
  export { default as Markup } from './markup';
33
  export { default as SplitButton } from './split-button';
 
24
  export { default as ActiveDescendantContainer } from './active-descendant-container';
25
  export { FlexSpacer } from './flex';
26
  export { default as MessageList } from './message-list';
27
+ export { default as ResultSummary } from './result-summary';
28
  export { default as ErrorList } from './error-list';
29
  export { default as Accordion } from './accordion';
30
  export { default as IconPopover } from './icon-popover';
32
  export { default as HelpList } from './help-list';
33
  export { default as Markup } from './markup';
34
  export { default as SplitButton } from './split-button';
35
+ export { default as EntitySelectControl } from './entity-select-control';
core/packages/components/src/markup/index.js CHANGED
@@ -4,7 +4,7 @@
4
  import { Markup } from 'interweave';
5
  import { Link } from 'react-router-dom';
6
 
7
- export default function ( { transform, ...rest } ) {
8
  return (
9
  <Markup
10
  { ...rest }
4
  import { Markup } from 'interweave';
5
  import { Link } from 'react-router-dom';
6
 
7
+ export default function( { transform, ...rest } ) {
8
  return (
9
  <Markup
10
  { ...rest }
core/packages/components/src/module-settings-notice-list/index.js CHANGED
@@ -53,8 +53,8 @@ function ModuleSettingsNoticeList( { notices, onRemove } ) {
53
  const createRemoveNotice = ( id ) => () => onRemove( id );
54
  const snackbarNotices = SnackbarList
55
  ? filter( notices, {
56
- type: 'snackbar',
57
- } )
58
  : [];
59
 
60
  return (
53
  const createRemoveNotice = ( id ) => () => onRemove( id );
54
  const snackbarNotices = SnackbarList
55
  ? filter( notices, {
56
+ type: 'snackbar',
57
+ } )
58
  : [];
59
 
60
  return (
core/packages/components/src/module-settings-notice-list/notice.js CHANGED
@@ -52,9 +52,9 @@ function Notice( {
52
  url
53
  ? undefined
54
  : () => {
55
- onRemove();
56
- onClick();
57
- }
58
  }
59
  className={ classnames(
60
  'notice__action',
52
  url
53
  ? undefined
54
  : () => {
55
+ onRemove();
56
+ onClick();
57
+ }
58
  }
59
  className={ classnames(
60
  'notice__action',
core/packages/components/src/result-summary/index.js ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Internal dependencies
3
+ */
4
+ import { ErrorList, MessageList } from '../';
5
+
6
+ export default function ResultSummary( {
7
+ result,
8
+ hasBorder,
9
+ schemaError,
10
+ errors,
11
+ } ) {
12
+ return (
13
+ <>
14
+ <ErrorList
15
+ apiError={ result?.error }
16
+ schemaError={ schemaError }
17
+ errors={ errors }
18
+ hasBorder={ hasBorder }
19
+ />
20
+ <MessageList
21
+ messages={ result?.success }
22
+ type="success"
23
+ hasBorder={ hasBorder }
24
+ />
25
+ <MessageList
26
+ messages={ result?.warning }
27
+ type="warning"
28
+ hasBorder={ hasBorder }
29
+ />
30
+ <MessageList
31
+ messages={ result?.info }
32
+ type="info"
33
+ hasBorder={ hasBorder }
34
+ />
35
+ </>
36
+ );
37
+ }
core/packages/components/src/result-summary/index.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php // Silence is golden.
core/packages/data/src/actions.js CHANGED
@@ -65,9 +65,25 @@ export function receiveSiteInfo( siteInfo ) {
65
  };
66
  }
67
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
68
  export const RECEIVE_INDEX = 'RECEIVE_INDEX';
69
  export const RECEIVE_USER = 'RECEIVE_USER';
70
  export const RECEIVE_CURRENT_USER_ID = 'RECEIVE_CURRENT_USER_ID';
71
  export const RECEIVE_ACTOR_TYPES = 'RECEIVE_ACTOR_TYPES';
72
  export const RECEIVE_ACTORS = 'RECEIVE_ACTORS';
73
  export const RECEIVE_SITE_INFO = 'RECEIVE_SITE_INFO';
 
 
65
  };
66
  }
67
 
68
+ export function __unstableLoadInitialFeatureFlags( flags ) {
69
+ return {
70
+ type: LOAD_INITIAL_FEATURE_FLAGS,
71
+ flags,
72
+ };
73
+ }
74
+
75
+ export function receiveBatchMaxItems( maxItems ) {
76
+ return {
77
+ type: RECEIVE_BATCH_MAX_ITEMS,
78
+ maxItems,
79
+ };
80
+ }
81
+
82
  export const RECEIVE_INDEX = 'RECEIVE_INDEX';
83
  export const RECEIVE_USER = 'RECEIVE_USER';
84
  export const RECEIVE_CURRENT_USER_ID = 'RECEIVE_CURRENT_USER_ID';
85
  export const RECEIVE_ACTOR_TYPES = 'RECEIVE_ACTOR_TYPES';
86
  export const RECEIVE_ACTORS = 'RECEIVE_ACTORS';
87
  export const RECEIVE_SITE_INFO = 'RECEIVE_SITE_INFO';
88
+ export const LOAD_INITIAL_FEATURE_FLAGS = 'LOAD_INITIAL_FEATURE_FLAGS';
89
+ export const RECEIVE_BATCH_MAX_ITEMS = 'RECEIVE_BATCH_MAX_ITEMS';
core/packages/data/src/bans/actions.js CHANGED
@@ -11,8 +11,8 @@ import { isURL, addQueryArgs, getQueryArg } from '@wordpress/url';
11
  /**
12
  * Internal dependencies
13
  */
 
14
  import { select, apiFetch, parseFetchResponse } from '../controls';
15
- import { getSelf } from 'core/packages/utils/src';
16
 
17
  export const path = '/ithemes-security/v1/bans';
18
 
@@ -138,7 +138,7 @@ export function finishDeleteBan( self ) {
138
  * Creates a new ban.
139
  *
140
  * @param {string} source The ban source or URL to the ban endpoint.
141
- * @param {Object} ban Ban data.
142
  * @return {IterableIterator<*>} Iterator
143
  */
144
  export function* createBan( source, ban ) {
@@ -174,7 +174,7 @@ export function* createBan( source, ban ) {
174
  * Updates a ban.
175
  *
176
  * @param {Object|string} banOrSelf Ban object self link.
177
- * @param {Object} update Ban data.
178
  * @return {IterableIterator<*>} Iterator
179
  */
180
  export function* updateBan( banOrSelf, update ) {
11
  /**
12
  * Internal dependencies
13
  */
14
+ import { getSelf } from '@ithemes/security-utils';
15
  import { select, apiFetch, parseFetchResponse } from '../controls';
 
16
 
17
  export const path = '/ithemes-security/v1/bans';
18
 
138
  * Creates a new ban.
139
  *
140
  * @param {string} source The ban source or URL to the ban endpoint.
141
+ * @param {Object} ban Ban data.
142
  * @return {IterableIterator<*>} Iterator
143
  */
144
  export function* createBan( source, ban ) {
174
  * Updates a ban.
175
  *
176
  * @param {Object|string} banOrSelf Ban object self link.
177
+ * @param {Object} update Ban data.
178
  * @return {IterableIterator<*>} Iterator
179
  */
180
  export function* updateBan( banOrSelf, update ) {
core/packages/data/src/bans/reducers.js CHANGED
@@ -46,17 +46,17 @@ export default function bans( state = DEFAULT_STATE, action ) {
46
  action.mode === 'replace'
47
  ? map( action.items, getSelf )
48
  : [
49
- ...get(
50
- state,
51
- [
52
- 'queries',
53
- action.queryId,
54
- 'selves',
55
- ],
56
- []
57
- ),
58
- ...map( action.items, getSelf ),
59
- ],
60
  headers: fromPairs(
61
  Array.from( action.response.headers.entries() )
62
  ),
46
  action.mode === 'replace'
47
  ? map( action.items, getSelf )
48
  : [
49
+ ...get(
50
+ state,
51
+ [
52
+ 'queries',
53
+ action.queryId,
54
+ 'selves',
55
+ ],
56
+ []
57
+ ),
58
+ ...map( action.items, getSelf ),
59
+ ],
60
  headers: fromPairs(
61
  Array.from( action.response.headers.entries() )
62
  ),
core/packages/data/src/bans/selectors.js CHANGED
@@ -26,7 +26,7 @@ export const getBans = createRegistrySelector( ( select ) => () =>
26
  /**
27
  * Gets the items returned by a query.
28
  *
29
- * @param {Object} state State object.
30
  * @param {string} queryId Query id.
31
  * @return {Array<Object>}
32
  */
@@ -55,9 +55,9 @@ export const getQueryResults = createSelector(
55
  /**
56
  * Gets the link header from a query result.
57
  *
58
- * @param {Object} state State object.
59
  * @param {string} queryId Query id.
60
- * @param {string} rel Rel to search for.
61
  * @return {{link: string, rel: string}} Link object or undefined if not found.
62
  */
63
  export function getQueryHeaderLink( state, queryId, rel ) {
@@ -67,9 +67,9 @@ export function getQueryHeaderLink( state, queryId, rel ) {
67
  /**
68
  * Gets the link headers from a query result.
69
  *
70
- * @param {Object} state State object.
71
  * @param {string} queryId Query id.
72
- * @param {string} rel Rel to search for.
73
  * @return {Array<{link: string, rel: string}>} Link object or undefined if not found.
74
  */
75
  export function getQueryHeaderLinks( state, queryId, rel ) {
@@ -79,9 +79,9 @@ export function getQueryHeaderLinks( state, queryId, rel ) {
79
  /**
80
  * Get a response header from a query.
81
  *
82
- * @param {Object} state State object.
83
  * @param {string} queryId Query id.
84
- * @param {string} header Normalized header name.
85
  * @return {string|undefined} The header value, or undefined if it does not exist.
86
  */
87
  export function getQueryHeader( state, queryId, header ) {
@@ -92,7 +92,7 @@ export function getQueryHeader( state, queryId, header ) {
92
  * Gets a ban by its self link.
93
  *
94
  * @param {Object} state Store data.
95
- * @param {string} self Self link.
96
  * @return {Object|undefined} The ban data.
97
  */
98
  export function getBan( state, self ) {
@@ -102,7 +102,7 @@ export function getBan( state, self ) {
102
  /**
103
  * Checks if the given ban is being updated.
104
  *
105
- * @param {Object} state Store data.
106
  * @param {string} banOrSelf Ban object or self link.
107
  * @return {boolean} True if updating.
108
  */
@@ -115,7 +115,7 @@ export function isUpdating( state, banOrSelf ) {
115
  /**
116
  * Checks if the given ban is being deleted.
117
  *
118
- * @param {Object} state Store data.
119
  * @param {string} banOrSelf Ban object or self link.
120
  * @return {boolean} True if deleting.
121
  */
@@ -128,7 +128,7 @@ export function isDeleting( state, banOrSelf ) {
128
  /**
129
  * Checks if a query is in progress.
130
  *
131
- * @param {Object} state Store data.
132
  * @param {string} queryId The query id.
133
  * @return {boolean} True if querying.
134
  */
26
  /**
27
  * Gets the items returned by a query.
28
  *
29
+ * @param {Object} state State object.
30
  * @param {string} queryId Query id.
31
  * @return {Array<Object>}
32
  */
55
  /**
56
  * Gets the link header from a query result.
57
  *
58
+ * @param {Object} state State object.
59
  * @param {string} queryId Query id.
60
+ * @param {string} rel Rel to search for.
61
  * @return {{link: string, rel: string}} Link object or undefined if not found.
62
  */
63
  export function getQueryHeaderLink( state, queryId, rel ) {
67
  /**
68
  * Gets the link headers from a query result.
69
  *
70
+ * @param {Object} state State object.
71
  * @param {string} queryId Query id.
72
+ * @param {string} rel Rel to search for.
73
  * @return {Array<{link: string, rel: string}>} Link object or undefined if not found.
74
  */
75
  export function getQueryHeaderLinks( state, queryId, rel ) {
79
  /**
80
  * Get a response header from a query.
81
  *
82
+ * @param {Object} state State object.
83
  * @param {string} queryId Query id.
84
+ * @param {string} header Normalized header name.
85
  * @return {string|undefined} The header value, or undefined if it does not exist.
86
  */
87
  export function getQueryHeader( state, queryId, header ) {
92
  * Gets a ban by its self link.
93
  *
94
  * @param {Object} state Store data.
95
+ * @param {string} self Self link.
96
  * @return {Object|undefined} The ban data.
97
  */
98
  export function getBan( state, self ) {
102
  /**
103
  * Checks if the given ban is being updated.
104
  *
105
+ * @param {Object} state Store data.
106
  * @param {string} banOrSelf Ban object or self link.
107
  * @return {boolean} True if updating.
108
  */
115
  /**
116
  * Checks if the given ban is being deleted.
117
  *
118
+ * @param {Object} state Store data.
119
  * @param {string} banOrSelf Ban object or self link.
120
  * @return {boolean} True if deleting.
121
  */
128
  /**
129
  * Checks if a query is in progress.
130
  *
131
+ * @param {Object} state Store data.
132
  * @param {string} queryId The query id.
133
  * @return {boolean} True if querying.
134
  */
core/packages/data/src/controls.js CHANGED
@@ -1,7 +1,7 @@
1
  /**
2
  * External dependencies
3
  */
4
- import { uniqueId } from 'lodash';
5
 
6
  /**
7
  * WordPress dependencies
@@ -17,7 +17,8 @@ import { default as triggerApiFetch } from '@wordpress/api-fetch';
17
  /**
18
  * Internal dependencies
19
  */
20
- import { responseToError } from '@ithemes/security-utils';
 
21
 
22
  /**
23
  * Utility for returning a promise that handles a selector with a resolver.
@@ -69,12 +70,25 @@ export function apiFetch( request ) {
69
  };
70
  }
71
 
 
 
 
 
 
 
 
 
 
 
 
 
 
72
  /**
73
  * Calls a selector using the current state.
74
  *
75
- * @param {string} storeKey Store key.
76
  * @param {string} selectorName Selector name.
77
- * @param {Array} args Selector arguments.
78
  *
79
  * @return {Object} control descriptor.
80
  */
@@ -90,9 +104,9 @@ export function select( storeKey, selectorName, ...args ) {
90
  /**
91
  * Dispatches a control action for triggering a registry dispatch.
92
  *
93
- * @param {string} storeKey The key for the store the action belongs to
94
- * @param {string} actionName The name of the action to dispatch
95
- * @param {...*} args Arguments for the dispatch action.
96
  *
97
  * @example
98
  * ```js
@@ -144,6 +158,14 @@ export function parseFetchResponse( response ) {
144
  };
145
  }
146
 
 
 
 
 
 
 
 
 
147
  /**
148
  * Parse the fetch response into an object with data and headers.
149
  *
@@ -157,7 +179,7 @@ async function PARSE_FETCH_RESPONSE( { response } ) {
157
  /**
158
  * Updates a module's settings.
159
  *
160
- * @param {string} module The module id.
161
  * @param {Object} settings The settings to update.
162
  * @return {{settings, module, type: string}} The control descriptor.
163
  */
@@ -174,25 +196,25 @@ export function updateSettings( module, settings ) {
174
  *
175
  * @see @wordpress/notices#createNotice()
176
  *
177
- * @param {?string} status Notice status.
178
- * Defaults to `info`.
179
- * @param {string} content Notice message.
180
- * @param {?Object} options Notice options.
181
- * @param {?string} options.context Context under which to
182
- * group notice.
183
- * @param {?string} options.id Identifier for notice.
184
- * Automatically assigned
185
- * if not specified.
186
- * @param {?boolean} options.isDismissible Whether the notice can
187
- * be dismissed by user.
188
- * Defaults to `true`.
189
- * @param {?number} options.autoDismiss Whether the notice should
190
- * by automatically dismissed
191
- * after x milliseconds.
192
- * Defaults to `false`.
193
- * @param {?string} options.type Notice type. Either 'default' or 'snackbar'.
194
- * @param {?Array<Object>} options.actions User actions to be
195
- * presented with notice.
196
  *
197
  * @return {Object} control descriptor.
198
  */
@@ -208,10 +230,41 @@ export function createNotice( status = 'info', content, options = {} ) {
208
  };
209
  }
210
 
 
 
 
 
 
 
 
 
 
 
 
211
  const controls = {
 
 
 
 
 
 
 
212
  API_FETCH( { request } ) {
213
  return triggerApiFetch( request ).catch( responseToError );
214
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
215
  SELECT( { storeKey, selectorName, args } ) {
216
  const selector = selectData( storeKey )[ selectorName ];
217
 
@@ -249,6 +302,51 @@ const controls = {
249
 
250
  dispatchData( 'core/notices' ).createNotice( status, content, options );
251
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
252
  };
253
 
254
  export default controls;
1
  /**
2
  * External dependencies
3
  */
4
+ import { uniqueId, chunk, times, constant } from 'lodash';
5
 
6
  /**
7
  * WordPress dependencies
17
  /**
18
  * Internal dependencies
19
  */
20
+ import { responseToError, Result, WPError } from '@ithemes/security-utils';
21
+ import { CORE_STORE_NAME } from './';
22
 
23
  /**
24
  * Utility for returning a promise that handles a selector with a resolver.
70
  };
71
  }
72
 
73
+ /**
74
+ * Triggers an API fetch request converting the response to a Result object.
75
+ *
76
+ * @param {Object} request API Fetch Request Object.
77
+ * @return {{request, type: string}} Control descriptor.
78
+ */
79
+ export function apiFetchResult( request ) {
80
+ return {
81
+ type: 'API_FETCH_RESULT',
82
+ request,
83
+ };
84
+ }
85
+
86
  /**
87
  * Calls a selector using the current state.
88
  *
89
+ * @param {string} storeKey Store key.
90
  * @param {string} selectorName Selector name.
91
+ * @param {Array} args Selector arguments.
92
  *
93
  * @return {Object} control descriptor.
94
  */
104
  /**
105
  * Dispatches a control action for triggering a registry dispatch.
106
  *
107
+ * @param {string} storeKey The key for the store the action belongs to
108
+ * @param {string} actionName The name of the action to dispatch
109
+ * @param {...*} args Arguments for the dispatch action.
110
  *
111
  * @example
112
  * ```js
158
  };
159
  }
160
 
161
+ export function awaitPromise( promise, delay ) {
162
+ return {
163
+ type: 'AWAIT_PROMISE',
164
+ promise,
165
+ delay,
166
+ };
167
+ }
168
+
169
  /**
170
  * Parse the fetch response into an object with data and headers.
171
  *
179
  /**
180
  * Updates a module's settings.
181
  *
182
+ * @param {string} module The module id.
183
  * @param {Object} settings The settings to update.
184
  * @return {{settings, module, type: string}} The control descriptor.
185
  */
196
  *
197
  * @see @wordpress/notices#createNotice()
198
  *
199
+ * @param {?string} status Notice status.
200
+ * Defaults to `info`.
201
+ * @param {string} content Notice message.
202
+ * @param {?Object} options Notice options.
203
+ * @param {?string} options.context Context under which to
204
+ * group notice.
205
+ * @param {?string} options.id Identifier for notice.
206
+ * Automatically assigned
207
+ * if not specified.
208
+ * @param {?boolean} options.isDismissible Whether the notice can
209
+ * be dismissed by user.
210
+ * Defaults to `true`.
211
+ * @param {?number} options.autoDismiss Whether the notice should
212
+ * by automatically dismissed
213
+ * after x milliseconds.
214
+ * Defaults to `false`.
215
+ * @param {?string} options.type Notice type. Either 'default' or 'snackbar'.
216
+ * @param {?Array<Object>} options.actions User actions to be
217
+ * presented with notice.
218
  *
219
  * @return {Object} control descriptor.
220
  */
230
  };
231
  }
232
 
233
+ export function apiFetchBatch( batch ) {
234
+ return {
235
+ type: 'API_FETCH_BATCH',
236
+ batch,
237
+ };
238
+ }
239
+
240
+ function timeout( ms ) {
241
+ return new Promise( ( resolve ) => setTimeout( resolve, ms ) );
242
+ }
243
+
244
  const controls = {
245
+ AWAIT_PROMISE: ( { promise, delay } ) => {
246
+ if ( delay ) {
247
+ return Promise.all( [ promise, timeout( delay ) ] );
248
+ }
249
+
250
+ return promise;
251
+ },
252
  API_FETCH( { request } ) {
253
  return triggerApiFetch( request ).catch( responseToError );
254
  },
255
+ API_FETCH_RESULT( { request } ) {
256
+ return triggerApiFetch( { ...request, parse: false } )
257
+ .then( Result.fromResponse )
258
+ .catch( responseToError )
259
+ .catch( ( error ) =>
260
+ error.getResponse
261
+ ? Result.fromResponse( error.getResponse() )
262
+ : new Result(
263
+ Result.ERROR,
264
+ new WPError( 'unknown_error', 'Unknown error' )
265
+ )
266
+ );
267
+ },
268
  SELECT( { storeKey, selectorName, args } ) {
269
  const selector = selectData( storeKey )[ selectorName ];
270
 
302
 
303
  dispatchData( 'core/notices' ).createNotice( status, content, options );
304
  },
305
+ API_FETCH_BATCH: createRegistryControl(
306
+ ( registry ) => async ( { batch } ) => {
307
+ const maxItems = await registry
308
+ .resolveSelect( CORE_STORE_NAME )
309
+ .getBatchMaxItems();
310
+ const chunks = chunk( batch, maxItems || 25 );
311
+ const errors = [];
312
+ const responses = [];
313
+
314
+ if ( ! chunks.length ) {
315
+ return [];
316
+ }
317
+
318
+ for ( const requests of chunks ) {
319
+ try {
320
+ const response = await controls.API_FETCH( {
321
+ request: {
322
+ path: '/batch/v1',
323
+ method: 'POST',
324
+ data: { requests },
325
+ },
326
+ } );
327
+ responses.push( ...response.responses );
328
+ } catch ( e ) {
329
+ errors.push( e );
330
+ responses.push(
331
+ ...times(
332
+ requests.length,
333
+ constant( {
334
+ body: e,
335
+ status: 500,
336
+ headers: {},
337
+ } )
338
+ )
339
+ );
340
+ }
341
+ }
342
+
343
+ if ( errors.length === chunks.length ) {
344
+ throw errors[ 0 ];
345
+ }
346
+
347
+ return responses;
348
+ }
349
+ ),
350
  };
351
 
352
  export default controls;
core/packages/data/src/help/reducers.js CHANGED
@@ -7,7 +7,7 @@ const INITIAL_STATE = {
7
  byTopic: {},
8
  };
9
 
10
- export default function ( state = INITIAL_STATE, action ) {
11
  switch ( action.type ) {
12
  case RECEIVE_HELP:
13
  return {
7
  byTopic: {},
8
  };
9
 
10
+ export default function( state = INITIAL_STATE, action ) {
11
  switch ( action.type ) {
12
  case RECEIVE_HELP:
13
  return {
core/packages/data/src/index.js CHANGED
@@ -26,8 +26,11 @@ registerStore( CORE_STORE_NAME, {
26
  } );
27
 
28
  export {
 
29
  CORE_STORE_NAME,
30
  BANS_STORE_NAME,
31
  HELP_STORE_NAME,
32
  MODULES_STORE_NAME,
33
  };
 
 
26
  } );
27
 
28
  export {
29
+ controls,
30
  CORE_STORE_NAME,
31
  BANS_STORE_NAME,
32
  HELP_STORE_NAME,
33
  MODULES_STORE_NAME,
34
  };
35
+
36
+ export * from './controls';
core/packages/data/src/modules/actions.js CHANGED
@@ -13,7 +13,7 @@ import { __ } from '@wordpress/i18n';
13
  /**
14
  * Internal dependencies
15
  */
16
- import { apiFetch, createNotice } from '../controls';
17
  import { STORE_NAME } from './';
18
 
19
  export function* editModule( module, edit ) {
@@ -63,11 +63,7 @@ export function* saveModules( modules = true ) {
63
 
64
  try {
65
  yield { type: START_SAVING_MODULES, modules };
66
- responses = yield apiFetch( {
67
- path: '/batch/v1',
68
- method: 'POST',
69
- data: { requests },
70
- } );
71
  } catch ( error ) {
72
  yield { type: FAILED_SAVING_MODULES, modules };
73
  yield createNotice( 'error', error.message );
@@ -80,7 +76,7 @@ export function* saveModules( modules = true ) {
80
 
81
  for ( let i = 0; i < requests.length; i++ ) {
82
  const module = modules[ i ];
83
- const response = responses.responses[ i ];
84
 
85
  if ( response.status >= 400 ) {
86
  errors[ module ] = response.body;
@@ -98,7 +94,7 @@ export function* saveModules( modules = true ) {
98
  yield { type: FINISH_SAVING_MODULES, modules: success };
99
  }
100
 
101
- return responses.responses;
102
  }
103
 
104
  /**
@@ -160,14 +156,10 @@ export function* setModulesStatus( modules ) {
160
  } ) ),
161
  };
162
 
163
- const responses = yield apiFetch( {
164
- path: '/batch/v1',
165
- method: 'POST',
166
- data: batch,
167
- } );
168
 
169
- for ( let i = 0; i < responses.responses.length; i++ ) {
170
- const response = responses.responses[ i ];
171
 
172
  if ( response.status >= 400 ) {
173
  yield createNotice( 'error', response.body.message );
@@ -281,11 +273,7 @@ export function* saveSettings( modules = true ) {
281
 
282
  try {
283
  yield { type: START_SAVING_SETTINGS, modules };
284
- responses = yield apiFetch( {
285
- path: '/batch/v1',
286
- method: 'POST',
287
- data: { requests },
288
- } );
289
  } catch ( error ) {
290
  yield { type: FAILED_SAVING_SETTINGS, modules };
291
  yield createNotice( 'error', error.message );
@@ -298,7 +286,7 @@ export function* saveSettings( modules = true ) {
298
 
299
  for ( let i = 0; i < requests.length; i++ ) {
300
  const module = modules[ i ];
301
- const response = responses.responses[ i ];
302
 
303
  if ( response.status >= 400 ) {
304
  errors[ module ] = response.body;
@@ -319,7 +307,7 @@ export function* saveSettings( modules = true ) {
319
  yield { type: FINISH_SAVING_SETTINGS, modules: success };
320
  }
321
 
322
- return responses.responses;
323
  }
324
 
325
  export function* updateSettings( module, settings ) {
13
  /**
14
  * Internal dependencies
15
  */
16
+ import { apiFetch, apiFetchBatch, createNotice } from '../controls';
17
  import { STORE_NAME } from './';
18
 
19
  export function* editModule( module, edit ) {
63
 
64
  try {
65
  yield { type: START_SAVING_MODULES, modules };
66
+ responses = yield apiFetchBatch( requests );
 
 
 
 
67
  } catch ( error ) {
68
  yield { type: FAILED_SAVING_MODULES, modules };
69
  yield createNotice( 'error', error.message );
76
 
77
  for ( let i = 0; i < requests.length; i++ ) {
78
  const module = modules[ i ];
79
+ const response = responses[ i ];
80
 
81
  if ( response.status >= 400 ) {
82
  errors[ module ] = response.body;
94
  yield { type: FINISH_SAVING_MODULES, modules: success };
95
  }
96
 
97
+ return responses;
98
  }
99
 
100
  /**
156
  } ) ),
157
  };
158
 
159
+ const responses = yield apiFetchBatch( batch );
 
 
 
 
160
 
161
+ for ( let i = 0; i < responses.length; i++ ) {
162
+ const response = responses[ i ];
163
 
164
  if ( response.status >= 400 ) {
165
  yield createNotice( 'error', response.body.message );
273
 
274
  try {
275
  yield { type: START_SAVING_SETTINGS, modules };
276
+ responses = yield apiFetchBatch( requests );
 
 
 
 
277
  } catch ( error ) {
278
  yield { type: FAILED_SAVING_SETTINGS, modules };
279
  yield createNotice( 'error', error.message );
286
 
287
  for ( let i = 0; i < requests.length; i++ ) {
288
  const module = modules[ i ];
289
+ const response = responses[ i ];
290
 
291
  if ( response.status >= 400 ) {
292
  errors[ module ] = response.body;
307
  yield { type: FINISH_SAVING_SETTINGS, modules: success };
308
  }
309
 
310
+ return responses;
311
  }
312
 
313
  export function* updateSettings( module, settings ) {
core/packages/data/src/modules/reducers.js CHANGED
@@ -34,7 +34,7 @@ const DEFAULT_STATE = {
34
  errors: {},
35
  };
36
 
37
- export default function ( state = DEFAULT_STATE, action ) {
38
  switch ( action.type ) {
39
  case RECEIVE_MODULES:
40
  return {
@@ -104,7 +104,8 @@ export default function ( state = DEFAULT_STATE, action ) {
104
  ...state,
105
  savingModules: without(
106
  state.savingModules,
107
- ...Object.keys( action.errors )
 
108
  ),
109
  errors: {
110
  ...state.errors,
@@ -173,7 +174,8 @@ export default function ( state = DEFAULT_STATE, action ) {
173
  ...state,
174
  savingSettings: without(
175
  state.savingSettings,
176
- ...Object.keys( action.errors )
 
177
  ),
178
  errors: {
179
  ...state.errors,
34
  errors: {},
35
  };
36
 
37
+ export default function( state = DEFAULT_STATE, action ) {
38
  switch ( action.type ) {
39
  case RECEIVE_MODULES:
40
  return {
104
  ...state,
105
  savingModules: without(
106
  state.savingModules,
107
+ ...Object.keys( action.errors || {} ),
108
+ ...( action.modules || [] )
109
  ),
110
  errors: {
111
  ...state.errors,
174
  ...state,
175
  savingSettings: without(
176
  state.savingSettings,
177
+ ...Object.keys( action.errors || {} ),
178
+ ...( action.modules || [] )
179
  ),
180
  errors: {
181
  ...state.errors,
core/packages/data/src/modules/resolvers.js CHANGED
@@ -53,9 +53,16 @@ export function* getEditedModules() {
53
  yield controls.resolveSelect( STORE_NAME, 'getModules' );
54
  }
55
 
56
- export function* getModule() {
57
- yield controls.resolveSelect( STORE_NAME, 'getModules' );
58
- }
 
 
 
 
 
 
 
59
 
60
  export function* getEditedModule() {
61
  yield controls.resolveSelect( STORE_NAME, 'getModules' );
53
  yield controls.resolveSelect( STORE_NAME, 'getModules' );
54
  }
55
 
56
+ export const getModule = {
57
+ *fulfill() {
58
+ yield controls.resolveSelect( STORE_NAME, 'getModules' );
59
+ },
60
+ isFulfilled( state, module ) {
61
+ return state.modules.includes(
62
+ ( maybeModule ) => maybeModule.id === module
63
+ );
64
+ },
65
+ };
66
 
67
  export function* getEditedModule() {
68
  yield controls.resolveSelect( STORE_NAME, 'getModules' );
core/packages/data/src/reducers.js CHANGED
@@ -8,6 +8,8 @@ import {
8
  RECEIVE_USER,
9
  RECEIVE_SITE_INFO,
10
  RECEIVE_CURRENT_USER_ID,
 
 
11
  } from './actions';
12
 
13
  const DEFAULT_STATE = {
@@ -21,6 +23,8 @@ const DEFAULT_STATE = {
21
  byType: {},
22
  },
23
  siteInfo: null,
 
 
24
  };
25
 
26
  export default function reducer( state = DEFAULT_STATE, action ) {
@@ -73,6 +77,16 @@ export default function reducer( state = DEFAULT_STATE, action ) {
73
  ...state,
74
  siteInfo: action.siteInfo,
75
  };
 
 
 
 
 
 
 
 
 
 
76
  default:
77
  return state;
78
  }
8
  RECEIVE_USER,
9
  RECEIVE_SITE_INFO,
10
  RECEIVE_CURRENT_USER_ID,
11
+ LOAD_INITIAL_FEATURE_FLAGS,
12
+ RECEIVE_BATCH_MAX_ITEMS,
13
  } from './actions';
14
 
15
  const DEFAULT_STATE = {
23
  byType: {},
24
  },
25
  siteInfo: null,
26
+ featureFlags: [],
27
+ batchMaxItems: 0,
28
  };
29
 
30
  export default function reducer( state = DEFAULT_STATE, action ) {
77
  ...state,
78
  siteInfo: action.siteInfo,
79
  };
80
+ case LOAD_INITIAL_FEATURE_FLAGS:
81
+ return {
82
+ ...state,
83
+ featureFlags: action.flags,
84
+ };
85
+ case RECEIVE_BATCH_MAX_ITEMS:
86
+ return {
87
+ ...state,
88
+ batchMaxItems: action.maxItems,
89
+ };
90
  default:
91
  return state;
92
  }
core/packages/data/src/resolvers.js CHANGED
@@ -15,6 +15,7 @@ import { apiFetch, select } from './controls';
15
  import {
16
  receiveActors,
17
  receiveActorTypes,
 
18
  receiveCurrentUserId,
19
  receiveIndex,
20
  receiveSiteInfo,
@@ -118,3 +119,13 @@ export const getSiteInfo = {
118
  return !! state.siteInfo;
119
  },
120
  };
 
 
 
 
 
 
 
 
 
 
15
  import {
16
  receiveActors,
17
  receiveActorTypes,
18
+ receiveBatchMaxItems,
19
  receiveCurrentUserId,
20
  receiveIndex,
21
  receiveSiteInfo,
119
  return !! state.siteInfo;
120
  },
121
  };
122
+
123
+ export function* getBatchMaxItems() {
124
+ const response = yield apiFetch( {
125
+ path: '/batch/v1',
126
+ method: 'OPTIONS',
127
+ } );
128
+ yield receiveBatchMaxItems(
129
+ response.endpoints[ 0 ].args.requests.maxItems
130
+ );
131
+ }
core/packages/data/src/selectors.js CHANGED
@@ -74,6 +74,17 @@ export function getSiteInfo( state ) {
74
  return state.siteInfo;
75
  }
76
 
77
- export const getFeatureFlags = createRegistrySelector( ( select ) => () =>
78
- select( MODULES_STORE_NAME ).getSetting( 'feature-flags', 'enabled' ) || []
 
 
 
 
 
 
 
79
  );
 
 
 
 
74
  return state.siteInfo;
75
  }
76
 
77
+ export const getFeatureFlags = createRegistrySelector(
78
+ ( select ) => ( state ) => {
79
+ const setting = select( MODULES_STORE_NAME ).getSetting(
80
+ 'feature-flags',
81
+ 'enabled'
82
+ );
83
+
84
+ return setting || state.featureFlags;
85
+ }
86
  );
87
+
88
+ export function getBatchMaxItems( state ) {
89
+ return state.batchMaxItems;
90
+ }
core/packages/hocs/src/index.js CHANGED
@@ -12,3 +12,4 @@ export { default as useFocusOutside } from './use-focus-outside';
12
  export { default as useHover } from './use-hover';
13
  export { default as useLocalStorage } from './use-local-storage';
14
  export { default as useMergeRefs } from './use-merge-refs';
 
12
  export { default as useHover } from './use-hover';
13
  export { default as useLocalStorage } from './use-local-storage';
14
  export { default as useMergeRefs } from './use-merge-refs';
15
+ export { default as useSet } from './use-set';
core/packages/hocs/src/use-async.js CHANGED
@@ -9,7 +9,7 @@ import { useState, useEffect, useCallback } from '@wordpress/element';
9
  * @typedef {('idle'|'pending'|'success'|'error')} Status
10
  *
11
  * @param {Function} asyncFunction The async function to execute.
12
- * @param {boolean} immediate Whether to immediate execute the async function.
13
  * @return {{error: Error, execute: Function, value: *, status: Status}} Hook info.
14
  */
15
  export default function useAsync( asyncFunction, immediate = true ) {
9
  * @typedef {('idle'|'pending'|'success'|'error')} Status
10
  *
11
  * @param {Function} asyncFunction The async function to execute.
12
+ * @param {boolean} immediate Whether to immediate execute the async function.
13
  * @return {{error: Error, execute: Function, value: *, status: Status}} Hook info.
14
  */
15
  export default function useAsync( asyncFunction, immediate = true ) {
core/packages/hocs/src/use-event-listener.js CHANGED
@@ -8,9 +8,9 @@ import { useRef, useEffect } from '@wordpress/element';
8
  /**
9
  * Uses an event listener callback.
10
  *
11
- * @param {string} type The dom event to listen for.
12
- * @param {Function} listener The handler function to call.
13
- * @param {Element|Window} element The element to listen for effects on.
14
  */
15
  export default function useEventListener( type, listener, element = window ) {
16
  const savedHandler = useRef();
8
  /**
9
  * Uses an event listener callback.
10
  *
11
+ * @param {string} type The dom event to listen for.
12
+ * @param {Function} listener The handler function to call.
13
+ * @param {Element|Window} element The element to listen for effects on.
14
  */
15
  export default function useEventListener( type, listener, element = window ) {
16
  const savedHandler = useRef();
core/packages/hocs/src/use-focus-outside.js CHANGED
@@ -48,8 +48,8 @@ function isFocusNormalizedButton( eventTarget ) {
48
  * A react hook that can be used to check whether focus has moved outside the
49
  * element the event handlers are bound to.
50
  *
51
- * @param {Function} onFocusOutside A callback triggered when focus moves outside
52
- * the element the event handlers are bound to.
53
  *
54
  * @return {Object} An object containing event handlers. Bind the event handlers
55
  * to a wrapping element element to capture when focus moves
48
  * A react hook that can be used to check whether focus has moved outside the
49
  * element the event handlers are bound to.
50
  *
51
+ * @param {Function} onFocusOutside A callback triggered when focus moves outside
52
+ * the element the event handlers are bound to.
53
  *
54
  * @return {Object} An object containing event handlers. Bind the event handlers
55
  * to a wrapping element element to capture when focus moves
core/packages/hocs/src/use-set.js ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * WordPress dependencies
3
+ */
4
+ import { useState, useCallback } from '@wordpress/element';
5
+
6
+ export default function useSet( initialValue = [] ) {
7
+ const [ items, setItems ] = useState( initialValue );
8
+
9
+ return [
10
+ items,
11
+ // Add
12
+ useCallback( ( item ) =>
13
+ setItems( ( latestItems ) => [ ...latestItems, item ] )
14
+ ),
15
+ // Remove
16
+ useCallback( ( item ) =>
17
+ setItems( ( latestItems ) =>
18
+ latestItems.filter( ( maybeItem ) => maybeItem !== item )
19
+ )
20
+ ),
21
+ setItems,
22
+ ];
23
+ }
core/packages/hocs/src/with-debounce-handler.js CHANGED
@@ -14,9 +14,9 @@ import { createHigherOrderComponent } from '@wordpress/compose';
14
  *
15
  * @license https://github.com/deepsweet/hocs/tree/master/packages/debounce-handler (MIT)
16
  *
17
- * @param {string} handlerName
18
  * @param {number|Function} wait
19
- * @param {Object} [options]
20
  * @return {WPComponent} Debounced component.
21
  */
22
  export default function withDebounceHandler( handlerName, wait, options = {} ) {
14
  *
15
  * @license https://github.com/deepsweet/hocs/tree/master/packages/debounce-handler (MIT)
16
  *
17
+ * @param {string} handlerName
18
  * @param {number|Function} wait
19
+ * @param {Object} [options]
20
  * @return {WPComponent} Debounced component.
21
  */
22
  export default function withDebounceHandler( handlerName, wait, options = {} ) {
core/packages/hocs/src/with-navigate.js CHANGED
@@ -13,7 +13,7 @@ function isModifiedEvent( event ) {
13
  }
14
 
15
  export default createHigherOrderComponent( ( WrappedComponent ) => {
16
- return function ( { navigate, ...props } ) {
17
  const onClick = ( event ) => {
18
  try {
19
  if ( props.onClick ) {
13
  }
14
 
15
  export default createHigherOrderComponent( ( WrappedComponent ) => {
16
+ return function( { navigate, ...props } ) {
17
  const onClick = ( event ) => {
18
  try {
19
  if ( props.onClick ) {
core/packages/hocs/src/with-pressed-modifier-keys.js CHANGED
@@ -1,5 +1,3 @@
1
- /* eslint-disable @wordpress/no-global-event-listener */
2
-
3
  /**
4
  * WordPress dependencies
5
  */
 
 
1
  /**
2
  * WordPress dependencies
3
  */
core/packages/hocs/src/with-prop-change-callback.js CHANGED
@@ -12,7 +12,7 @@ import { createHigherOrderComponent } from '@wordpress/compose';
12
  * Higher-order component that allows for firing an action after certain props have changed.
13
  *
14
  * @param {...string|{prop: string, cb: Function}} prop Prop to listen to, or object with prop to listener to and callback to execute.
15
- * @param {Function} [cb] Function to call when prop changes.
16
  *
17
  * @return {WPComponent} Component with prop change listeners.
18
  */
12
  * Higher-order component that allows for firing an action after certain props have changed.
13
  *
14
  * @param {...string|{prop: string, cb: Function}} prop Prop to listen to, or object with prop to listener to and callback to execute.
15
+ * @param {Function} [cb] Function to call when prop changes.
16
  *
17
  * @return {WPComponent} Component with prop change listeners.
18
  */
core/packages/hocs/src/with-width.js CHANGED
@@ -1,5 +1,3 @@
1
- /* eslint-disable @wordpress/no-global-event-listener */
2
-
3
  /**
4
  * WordPress dependencies
5
  */
 
 
1
  /**
2
  * WordPress dependencies
3
  */
core/packages/preload/src/index.js CHANGED
@@ -25,15 +25,15 @@ export function getStablePath( path ) {
25
  // [ 'b=1', 'c=2', 'a=5' ]
26
  .split( '&' )
27
  // [ [ 'b, '1' ], [ 'c', '2' ], [ 'a', '5' ] ]
28
- .map( function ( entry ) {
29
  return entry.split( '=' );
30
  } )
31
  // [ [ 'a', '5' ], [ 'b, '1' ], [ 'c', '2' ] ]
32
- .sort( function ( a, b ) {
33
  return a[ 0 ].localeCompare( b[ 0 ] );
34
  } )
35
  // [ 'a=5', 'b=1', 'c=2' ]
36
- .map( function ( pair ) {
37
  return pair.join( '=' );
38
  } )
39
  // 'a=5&b=1&c=2'
25
  // [ 'b=1', 'c=2', 'a=5' ]
26
  .split( '&' )
27
  // [ [ 'b, '1' ], [ 'c', '2' ], [ 'a', '5' ] ]
28
+ .map( function( entry ) {
29
  return entry.split( '=' );
30
  } )
31
  // [ [ 'a', '5' ], [ 'b, '1' ], [ 'c', '2' ] ]
32
+ .sort( function( a, b ) {
33
  return a[ 0 ].localeCompare( b[ 0 ] );
34
  } )
35
  // [ 'a=5', 'b=1', 'c=2' ]
36
+ .map( function( pair ) {
37
  return pair.join( '=' );
38
  } )
39
  // 'a=5&b=1&c=2'
core/packages/rjsf-theme/src/fields/entity-select.js CHANGED
@@ -2,26 +2,14 @@
2
  * External dependencies
3
  */
4
  import { utils } from '@rjsf/core';
5
- import { createGlobalState } from 'react-hooks-global-state';
6
- import { mapValues, keyBy } from 'lodash';
7
-
8
- /**
9
- * WordPress dependencies
10
- */
11
- import { useState, useCallback } from '@wordpress/element';
12
- import apiFetch from '@wordpress/api-fetch';
13
- import { addQueryArgs } from '@wordpress/url';
14
- import { BaseControl } from '@wordpress/components';
15
 
16
  /**
17
  * Internal dependencies
18
  */
19
- import { AsyncSelect, Markup } from '@ithemes/security-components';
20
 
21
  const { getUiOptions } = utils;
22
 
23
- const { useGlobalState } = createGlobalState( { cache: {} } );
24
-
25
  export default function EntitySelectField( {
26
  uiSchema,
27
  schema,
@@ -32,112 +20,23 @@ export default function EntitySelectField( {
32
  readonly,
33
  onChange,
34
  } ) {
35
- const [ cache, setCache ] = useGlobalState( 'cache' );
36
-
37
  const options = getUiOptions( uiSchema );
38
- const {
39
- path,
40
- query = {},
41
- labelAttr,
42
- idAttr = 'id',
43
- searchArg = 'search',
44
- } = options;
45
-
46
- const id = idSchema.$id;
47
- const isMultiple = schema.type === 'array';
48
- const label = uiSchema[ 'ui:title' ] || schema.title || name;
49
- const description = uiSchema[ 'ui:description' ] || schema.description;
50
-
51
- const [ input, setInput ] = useState( '' );
52
- const loader = useLoader(
53
- path,
54
- query,
55
- labelAttr,
56
- idAttr,
57
- searchArg,
58
- cache,
59
- setCache
60
- );
61
- let value;
62
-
63
- if ( isMultiple ) {
64
- value = ( formData || [] )
65
- .filter( ( item ) => item !== undefined )
66
- .map( ( itemId ) => ( {
67
- value: itemId,
68
- label: cache[ path ]?.[ itemId ] || itemId,
69
- } ) );
70
- } else if ( formData ) {
71
- value = {
72
- value: formData,
73
- label: cache[ path ]?.[ formData ] || formData,
74
- };
75
- }
76
 
77
  return (
78
- <BaseControl
79
- className="itsec-rjsf-entity-select"
80
- label={ label }
81
- help={ <Markup noWrap content={ description } /> }
82
- id={ id }
83
- >
84
- <AsyncSelect
85
- aria-label={ label }
86
- aria-describedby={ description ? id + '__help' : undefined }
87
- classNamePrefix="itsec-rjsf-entity-select-control"
88
- inputId={ id }
89
- isDisabled={ disabled || readonly }
90
- isMulti={ isMultiple }
91
- cacheOptions
92
- defaultOptions
93
- loadOptions={ loader }
94
- value={ value }
95
- onChange={ ( nextValue ) =>
96
- onChange(
97
- isMultiple
98
- ? ( nextValue || [] ).map( ( item ) => item.value )
99
- : nextValue?.value
100
- )
101
- }
102
- inputValue={ input }
103
- onInputChange={ setInput }
104
- />
105
- </BaseControl>
106
- );
107
- }
108
-
109
- function useLoader(
110
- path,
111
- query,
112
- labelAttr,
113
- idAttr,
114
- searchArg,
115
- cache,
116
- setCache
117
- ) {
118
- return useCallback(
119
- ( search ) => {
120
- return apiFetch( {
121
- path: addQueryArgs( path, { ...query, [ searchArg ]: search } ),
122
- } )
123
- .then( ( response ) =>
124
- response.map( ( item ) => ( {
125
- value: item[ idAttr ],
126
- label: item[ labelAttr ],
127
- } ) )
128
- )
129
- .then( ( items ) => {
130
- setCache( {
131
- ...cache,
132
- [ path ]: {
133
- ...( cache[ path ] || {} ),
134
- ...mapValues( keyBy( items, 'value' ), 'label' ),
135
- },
136
- } );
137
-
138
- return items;
139
- } );
140
- },
141
- [ path, query, labelAttr, idAttr, searchArg, cache ]
142
  );
143
  }
2
  * External dependencies
3
  */
4
  import { utils } from '@rjsf/core';
 
 
 
 
 
 
 
 
 
 
5
 
6
  /**
7
  * Internal dependencies
8
  */
9
+ import { EntitySelectControl } from '@ithemes/security-components';
10
 
11
  const { getUiOptions } = utils;
12
 
 
 
13
  export default function EntitySelectField( {
14
  uiSchema,
15
  schema,
20
  readonly,
21
  onChange,
22
  } ) {
 
 
23
  const options = getUiOptions( uiSchema );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
 
25
  return (
26
+ <EntitySelectControl
27
+ id={ idSchema.$id }
28
+ value={ formData }
29
+ disabled={ disabled }
30
+ readonly={ readonly }
31
+ onChange={ onChange }
32
+ isMultiple={ schema.type === 'array' }
33
+ label={ uiSchema[ 'ui:title' ] || schema.title || name }
34
+ description={ uiSchema[ 'ui:description' ] || schema.description }
35
+ path={ options.path }
36
+ query={ options.query }
37
+ labelAttr={ options.labelAttr }
38
+ idAttr={ options.idAttr }
39
+ searchArg={ options.searchArg }
40
+ />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
41
  );
42
  }
core/packages/rjsf-theme/src/widgets/radio-widget/index.js CHANGED
@@ -22,8 +22,8 @@ const nums = new Set( [ 'number', 'integer' ] );
22
  *
23
  * @param {Object} schema
24
  * @param {string} schema.type
25
- * @param {Array} schema.enum
26
- * @param {*} value
27
  *
28
  * @return {*} The processed value.
29
  */
22
  *
23
  * @param {Object} schema
24
  * @param {string} schema.type
25
+ * @param {Array} schema.enum
26
+ * @param {*} value
27
  *
28
  * @return {*} The processed value.
29
  */
core/packages/rjsf-theme/src/widgets/select-widget/index.js CHANGED
@@ -22,8 +22,8 @@ const nums = new Set( [ 'number', 'integer' ] );
22
  *
23
  * @param {Object} schema
24
  * @param {string} schema.type
25
- * @param {Array} schema.enum
26
- * @param {*} value
27
  *
28
  * @return {*} The processed value.
29
  */
22
  *
23
  * @param {Object} schema
24
  * @param {string} schema.type
25
+ * @param {Array} schema.enum
26
+ * @param {*} value
27
  *
28
  * @return {*} The processed value.
29
  */
core/packages/search/src/components/search/index.js CHANGED
@@ -130,7 +130,7 @@ export default forwardRef( function Search(
130
  );
131
  } );
132
 
133
- const SearchResults = forwardRef( function (
134
  { results, exitSearch, onPick },
135
  ref
136
  ) {
130
  );
131
  } );
132
 
133
+ const SearchResults = forwardRef( function(
134
  { results, exitSearch, onPick },
135
  ref
136
  ) {
core/packages/search/src/engine.js CHANGED
@@ -21,7 +21,7 @@ export default class Engine {
21
  /**
22
  * Constructs a search engine instance.
23
  *
24
- * @param {string} search The search term.
25
  * @param {Object} registry The current registry.
26
  */
27
  constructor( search, registry ) {
21
  /**
22
  * Constructs a search engine instance.
23
  *
24
+ * @param {string} search The search term.
25
  * @param {Object} registry The current registry.
26
  */
27
  constructor( search, registry ) {
core/packages/style-guide/src/mixins.scss CHANGED
@@ -1,10 +1,11 @@
1
- @mixin sticky-table($spacing: 1em) {
 
 
 
 
2
  & thead th {
3
- position: sticky;
4
- top: 0;
5
- padding-top: $spacing;
6
- padding-bottom: $spacing;
7
- background: white;
8
  color: $dark-gray-500;
9
  text-transform: uppercase;
10
  font-weight: normal;
@@ -15,14 +16,7 @@
15
  & th,
16
  & td {
17
  text-align: left;
18
- padding: $spacing;
19
-
20
- &:first-child {
21
- }
22
-
23
- &:last-child {
24
- text-align: right;
25
- }
26
  }
27
 
28
  & tbody th {
@@ -30,6 +24,16 @@
30
  }
31
  }
32
 
 
 
 
 
 
 
 
 
 
 
33
  @mixin bordered-button($style: 'blue') {
34
  $primary: $main-blue;
35
  $alternate: #E1f2fc;
1
+ @mixin table($spacing: 1em) {
2
+ --itsec-table-spacing: #{$spacing};
3
+
4
+ border-spacing: 0;
5
+
6
  & thead th {
7
+ padding-top: var(--itsec-table-spacing);
8
+ padding-bottom: var(--itsec-table-spacing);
 
 
 
9
  color: $dark-gray-500;
10
  text-transform: uppercase;
11
  font-weight: normal;
16
  & th,
17
  & td {
18
  text-align: left;
19
+ padding: var(--itsec-table-spacing);
 
 
 
 
 
 
 
20
  }
21
 
22
  & tbody th {
24
  }
25
  }
26
 
27
+ @mixin sticky-table($spacing: 1em) {
28
+ @include table($spacing);
29
+
30
+ & thead th {
31
+ position: sticky;
32
+ top: 0;
33
+ background: white;
34
+ }
35
+ }
36
+
37
  @mixin bordered-button($style: 'blue') {
38
  $primary: $main-blue;
39
  $alternate: #E1f2fc;
core/packages/utils/src/index.js CHANGED
@@ -188,7 +188,7 @@ export function entriesToObject( entries ) {
188
  /**
189
  * Splits a list into two arrays, with items that pass the filter in the first array, and ones that fail in the second.
190
  *
191
- * @param {Array} array
192
  * @param {Function} filter
193
  * @return {Array<Array>} Split array.
194
  */
@@ -221,8 +221,8 @@ export const MYSTERY_MAN_AVATAR =
221
  /**
222
  * Gets a targetHint from an object.
223
  *
224
- * @param {Object} object
225
- * @param {string} header
226
  * @param {boolean} undefinedIfEmpty
227
  * @return {Array<string>|undefined} The target hint value.
228
  */
188
  /**
189
  * Splits a list into two arrays, with items that pass the filter in the first array, and ones that fail in the second.
190
  *
191
+ * @param {Array} array
192
  * @param {Function} filter
193
  * @return {Array<Array>} Split array.
194
  */
221
  /**
222
  * Gets a targetHint from an object.
223
  *
224
+ * @param {Object} object
225
+ * @param {string} header
226
  * @param {boolean} undefinedIfEmpty
227
  * @return {Array<string>|undefined} The target hint value.
228
  */
core/packages/utils/src/result.js CHANGED
@@ -8,7 +8,7 @@ export default class Result {
8
  info;
9
  warning;
10
 
11
- constructor( type, error, data, success, info, warning ) {
12
  this.type = type;
13
  this.error = error;
14
  this.data = data;
8
  info;
9
  warning;
10
 
11
+ constructor( type, error, data, success = [], info = [], warning = [] ) {
12
  this.type = type;
13
  this.error = error;
14
  this.data = data;
core/packages/utils/src/wp-error.js CHANGED
@@ -10,7 +10,7 @@ export default class WPError {
10
  *
11
  * @param {string} [code]
12
  * @param {string} [message]
13
- * @param {*} [data]
14
  */
15
  constructor( code = undefined, message = undefined, data = undefined ) {
16
  if ( ! code ) {
10
  *
11
  * @param {string} [code]
12
  * @param {string} [message]
13
+ * @param {*} [data]
14
  */
15
  constructor( code = undefined, message = undefined, data = undefined ) {
16
  if ( ! code ) {
core/packages/webpack/src/babel.config.json ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "presets": [
3
+ "@wordpress/default"
4
+ ],
5
+ "plugins": [
6
+ [
7
+ "@babel/plugin-transform-react-jsx",
8
+ {
9
+ "pragma": "createElement"
10
+ }
11
+ ],
12
+ "@babel/plugin-proposal-class-properties",
13
+ "@babel/plugin-syntax-dynamic-import",
14
+ "@babel/plugin-proposal-export-default-from",
15
+ "@babel/plugin-proposal-throw-expressions",
16
+ "@emotion"
17
+ ]
18
+ }
core/packages/webpack/src/babel.js DELETED
@@ -1,15 +0,0 @@
1
- module.exports = {
2
- presets: [ '@wordpress/default' ],
3
- plugins: [
4
- [
5
- '@babel/plugin-transform-react-jsx',
6
- {
7
- pragma: 'createElement',
8
- },
9
- ],
10
- '@babel/plugin-proposal-class-properties',
11
- '@babel/plugin-syntax-dynamic-import',
12
- '@babel/plugin-proposal-export-default-from',
13
- '@babel/plugin-proposal-throw-expressions',
14
- ],
15
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
core/packages/webpack/src/config/index.js CHANGED
@@ -33,7 +33,7 @@ module.exports = function makeConfig( directory, pro ) {
33
  */
34
  const entries = glob
35
  .sync( 'core/modules/**/entries/*.js' )
36
- .reduce( function ( acc, entry ) {
37
  const baseName = path.basename( entry, '.js' );
38
  let out = path.join( entry, '..', '..', baseName );
39
  out = out.replace( /^core\/modules\//, '' );
@@ -48,7 +48,7 @@ module.exports = function makeConfig( directory, pro ) {
48
  entries,
49
  glob
50
  .sync( 'core/admin-pages/entries/*.js' )
51
- .reduce( function ( acc, entry ) {
52
  const baseName = path.basename( entry, '.js' );
53
  const out = 'pages/' + baseName;
54
 
@@ -62,7 +62,7 @@ module.exports = function makeConfig( directory, pro ) {
62
  if ( pro ) {
63
  Object.assign(
64
  entries,
65
- glob.sync( 'pro/**/entries/*.js' ).reduce( function ( acc, entry ) {
66
  const baseName = path.basename( entry, '.js' );
67
  let out = path.join( entry, '..', '..', baseName );
68
  out = out.replace( /^pro\//, '' );
@@ -74,6 +74,8 @@ module.exports = function makeConfig( directory, pro ) {
74
  );
75
  }
76
 
 
 
77
  const vendors = [
78
  // {
79
  // import: 'react-router-dom',
@@ -112,7 +114,7 @@ module.exports = function makeConfig( directory, pro ) {
112
  {}
113
  ),
114
  ...wpExternals,
115
- function ( context, request, callback ) {
116
  if ( /^@ithemes\/security\./.test( request ) ) {
117
  const parts = request.split( '.' );
118
  const external = {
@@ -138,7 +140,7 @@ module.exports = function makeConfig( directory, pro ) {
138
  options: {
139
  configFile: path.resolve(
140
  directory,
141
- './core/packages/webpack/src/babel.js'
142
  ),
143
  },
144
  },
@@ -163,7 +165,7 @@ module.exports = function makeConfig( directory, pro ) {
163
  {
164
  loader: 'sass-loader',
165
  options: {
166
- outputStyle: debug ? 'nested' : 'compressed',
167
  sourceMap: debug ? 'inline' : false,
168
  data: '@import "config.scss";',
169
  includePaths: [
@@ -246,6 +248,8 @@ module.exports = function makeConfig( directory, pro ) {
246
  resolve: {
247
  modules: [ path.resolve( directory, './' ), 'node_modules' ],
248
  alias: {
 
 
249
  '@ithemes/security-utils': path.resolve(
250
  directory,
251
  './core/packages/utils/src/index.js'
@@ -266,10 +270,6 @@ module.exports = function makeConfig( directory, pro ) {
266
  directory,
267
  './core/packages/i18n/src/index.js'
268
  ),
269
- '@ithemes/security-data': path.resolve(
270
- directory,
271
- './core/packages/data/src/index.js'
272
- ),
273
  '@ithemes/security-rjsf-theme': path.resolve(
274
  directory,
275
  './core/packages/rjsf-theme/src/index.js'
@@ -278,7 +278,7 @@ module.exports = function makeConfig( directory, pro ) {
278
  directory,
279
  './core/packages/search/src/index.js'
280
  ),
281
- ...Object.keys( entries ).reduce( function ( acc, entry ) {
282
  const parts = entry.split( '/' );
283
  const alias = `@ithemes/security.${ parts[ 0 ] }.${ parts[ 1 ] }`;
284
 
33
  */
34
  const entries = glob
35
  .sync( 'core/modules/**/entries/*.js' )
36
+ .reduce( function( acc, entry ) {
37
  const baseName = path.basename( entry, '.js' );
38
  let out = path.join( entry, '..', '..', baseName );
39
  out = out.replace( /^core\/modules\//, '' );
48
  entries,
49
  glob
50
  .sync( 'core/admin-pages/entries/*.js' )
51
+ .reduce( function( acc, entry ) {
52
  const baseName = path.basename( entry, '.js' );
53
  const out = 'pages/' + baseName;
54
 
62
  if ( pro ) {
63
  Object.assign(
64
  entries,
65
+ glob.sync( 'pro/**/entries/*.js' ).reduce( function( acc, entry ) {
66
  const baseName = path.basename( entry, '.js' );
67
  let out = path.join( entry, '..', '..', baseName );
68
  out = out.replace( /^pro\//, '' );
74
  );
75
  }
76
 
77
+ entries[ 'packages/data' ] = './core/packages/data/src/index.js';
78
+
79
  const vendors = [
80
  // {
81
  // import: 'react-router-dom',
114
  {}
115
  ),
116
  ...wpExternals,
117
+ function( context, request, callback ) {
118
  if ( /^@ithemes\/security\./.test( request ) ) {
119
  const parts = request.split( '.' );
120
  const external = {
140
  options: {
141
  configFile: path.resolve(
142
  directory,
143
+ './core/packages/webpack/src/babel.config.json'
144
  ),
145
  },
146
  },
165
  {
166
  loader: 'sass-loader',
167
  options: {
168
+ outputStyle: debug ? 'expanded' : 'compressed',
169
  sourceMap: debug ? 'inline' : false,
170
  data: '@import "config.scss";',
171
  includePaths: [
248
  resolve: {
249
  modules: [ path.resolve( directory, './' ), 'node_modules' ],
250
  alias: {
251
+ // Always load the same copy of @emotion/react to prevent issues with npm linking our UI library.
252
+ '@emotion/react': path.resolve( directory, './node_modules/@emotion/react' ),
253
  '@ithemes/security-utils': path.resolve(
254
  directory,
255
  './core/packages/utils/src/index.js'
270
  directory,
271
  './core/packages/i18n/src/index.js'
272
  ),
 
 
 
 
273
  '@ithemes/security-rjsf-theme': path.resolve(
274
  directory,
275
  './core/packages/rjsf-theme/src/index.js'
278
  directory,
279
  './core/packages/search/src/index.js'
280
  ),
281
+ ...Object.keys( entries ).reduce( function( acc, entry ) {
282
  const parts = entry.split( '/' );
283
  const alias = `@ithemes/security.${ parts[ 0 ] }.${ parts[ 1 ] }`;
284
 
core/packages/webpack/src/dynamic-public-path/index.js CHANGED
@@ -4,7 +4,7 @@ function DynamicPublicPathPlugin( propertyName ) {
4
  this.propertyName = propertyName;
5
  }
6
 
7
- DynamicPublicPathPlugin.prototype.apply = function ( compiler ) {
8
  compiler.hooks.thisCompilation.tap(
9
  'dynamic-public-path',
10
  ( compilation ) => {
@@ -12,7 +12,7 @@ DynamicPublicPathPlugin.prototype.apply = function ( compiler ) {
12
  'dynamic-public-path',
13
  ( loaderContext ) => {
14
  const entryFiles = [];
15
- Object.values( compiler.options.entry ).forEach( function (
16
  entry
17
  ) {
18
  entryFiles.push(
4
  this.propertyName = propertyName;
5
  }
6
 
7
+ DynamicPublicPathPlugin.prototype.apply = function( compiler ) {
8
  compiler.hooks.thisCompilation.tap(
9
  'dynamic-public-path',
10
  ( compilation ) => {
12
  'dynamic-public-path',
13
  ( loaderContext ) => {
14
  const entryFiles = [];
15
+ Object.values( compiler.options.entry ).forEach( function(
16
  entry
17
  ) {
18
  entryFiles.push(
core/packages/webpack/src/dynamic-public-path/loader.js CHANGED
@@ -1,4 +1,4 @@
1
- module.exports = function ( source ) {
2
  const config = this[ 'dynamic-public-path' ];
3
  const resource = this.resource;
4
 
1
+ module.exports = function( source ) {
2
  const config = this[ 'dynamic-public-path' ];
3
  const resource = this.resource;
4
 
core/packages/webpack/src/style-only-entry-plugin/index.js CHANGED
@@ -14,7 +14,7 @@ function StyleOnlyEntryPlugin( styleTests ) {
14
  } );
15
  }
16
 
17
- StyleOnlyEntryPlugin.prototype.isFileStyle = function ( file ) {
18
  for ( const test of this.styleTests ) {
19
  if ( test.test( file ) ) {
20
  return true;
@@ -24,7 +24,7 @@ StyleOnlyEntryPlugin.prototype.isFileStyle = function ( file ) {
24
  return false;
25
  };
26
 
27
- StyleOnlyEntryPlugin.prototype.apply = function ( compiler ) {
28
  compiler.hooks.emit.tap( 'style-only-entry-plugin', ( compilation ) => {
29
  for ( const chunk of compilation.chunks ) {
30
  if (
14
  } );
15
  }
16
 
17
+ StyleOnlyEntryPlugin.prototype.isFileStyle = function( file ) {
18
  for ( const test of this.styleTests ) {
19
  if ( test.test( file ) ) {
20
  return true;
24
  return false;
25
  };
26
 
27
+ StyleOnlyEntryPlugin.prototype.apply = function( compiler ) {
28
  compiler.hooks.emit.tap( 'style-only-entry-plugin', ( compilation ) => {
29
  for ( const chunk of compilation.chunks ) {
30
  if (
core/rest.php CHANGED
@@ -15,6 +15,7 @@ class ITSEC_REST {
15
  add_filter( 'rest_user_query', [ $this, 'apply_global_users_query' ], 10, 2 );
16
  add_filter( 'rest_request_from_url', [ $this, 'retain_auth_header_from_embeds' ] );
17
  add_filter( 'rest_avatar_sizes', [ $this, 'add_avatar_size' ] );
 
18
 
19
  if ( ! ITSEC_Lib::is_wp_version_at_least( '5.6', true ) ) {
20
  add_filter( 'itsec_filter_apache_server_config_modification', [ $this, 'add_htaccess_authorization_header' ] );
@@ -32,6 +33,23 @@ class ITSEC_REST {
32
  ITSEC_Modules::get_container()->get( Settings_Controller::class )->register_routes();
33
  ITSEC_Modules::get_container()->get( Site_Types_Controller::class )->register_routes();
34
  ITSEC_Modules::get_container()->get( Tools_Controller::class )->register_routes();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
  }
36
 
37
  /**
@@ -149,6 +167,144 @@ class ITSEC_REST {
149
  return $sizes;
150
  }
151
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
152
  public function add_htaccess_authorization_header( $rules ) {
153
  $rules .= "\n";
154
  $rules .= "\t# " . __( 'Pass through Authorization header.', 'better-wp-security' ) . "\n";
15
  add_filter( 'rest_user_query', [ $this, 'apply_global_users_query' ], 10, 2 );
16
  add_filter( 'rest_request_from_url', [ $this, 'retain_auth_header_from_embeds' ] );
17
  add_filter( 'rest_avatar_sizes', [ $this, 'add_avatar_size' ] );
18
+ add_filter( 'rest_allowed_cors_headers', [ $this, 'add_allowed_cors_headers' ] );
19
 
20
  if ( ! ITSEC_Lib::is_wp_version_at_least( '5.6', true ) ) {
21
  add_filter( 'itsec_filter_apache_server_config_modification', [ $this, 'add_htaccess_authorization_header' ] );
33
  ITSEC_Modules::get_container()->get( Settings_Controller::class )->register_routes();
34
  ITSEC_Modules::get_container()->get( Site_Types_Controller::class )->register_routes();
35
  ITSEC_Modules::get_container()->get( Tools_Controller::class )->register_routes();
36
+
37
+ foreach ( ITSEC_Modules::get_container()->get( 'rest.controllers' ) as $controller ) {
38
+ $controller->register_routes();
39
+ }
40
+
41
+ register_rest_route( 'ithemes-security/rpc', 'discover', [
42
+ 'methods' => WP_REST_Server::CREATABLE,
43
+ 'callback' => [ $this, 'discover' ],
44
+ 'permission_callback' => 'ITSEC_Core::current_user_can_manage',
45
+ 'args' => [
46
+ 'url' => [
47
+ 'type' => 'string',
48
+ 'format' => 'uri',
49
+ 'required' => true,
50
+ ],
51
+ ]
52
+ ] );
53
  }
54
 
55
  /**
167
  return $sizes;
168
  }
169
 
170
+ /**
171
+ * Adds the HTTP 1.0 compat header to the list of CORS request headers.
172
+ *
173
+ * @param array $headers
174
+ *
175
+ * @return array
176
+ */
177
+ public function add_allowed_cors_headers( $headers ) {
178
+ if ( ! in_array( 'X-HTTP-Method-Override', $headers, true ) ) {
179
+ $headers[] = 'X-HTTP-Method-Override';
180
+ }
181
+
182
+ return $headers;
183
+ }
184
+
185
+ /**
186
+ * Discovers the REST API for a given host.
187
+ *
188
+ * @param WP_REST_Request $request
189
+ *
190
+ * @return WP_REST_Response|WP_Error
191
+ */
192
+ public function discover( WP_REST_Request $request ) {
193
+ $head = wp_safe_remote_head( $request['url'], [
194
+ 'redirection' => 5,
195
+ ] );
196
+
197
+ if ( is_wp_error( $head ) ) {
198
+ return new WP_Error(
199
+ 'itsec.discover.cannot-connect',
200
+ wp_sprintf( __( 'Cannot connect to site: %l.', 'better-wp-security' ), ITSEC_Lib::get_error_strings( $head ) ),
201
+ [ 'status' => WP_Http::INTERNAL_SERVER_ERROR ]
202
+ );
203
+ }
204
+
205
+ $header = wp_remote_retrieve_header( $head, 'Link' );
206
+
207
+ if ( ! $header ) {
208
+ return new WP_Error(
209
+ 'itsec.discover.missing-link-header',
210
+ __( 'No Link header was found.', 'better-wp-security' ),
211
+ [ 'status' => WP_Http::BAD_REQUEST ]
212
+ );
213
+ }
214
+
215
+ $rest_url = '';
216
+ $parsed = ITSEC_Lib::parse_header_with_attributes( $header );
217
+
218
+ foreach ( $parsed as $url => $attributes ) {
219
+ foreach ( $attributes as $attribute => $value ) {
220
+ if ( 'rel' === $attribute && 'https://api.w.org/' === $value ) {
221
+ $rest_url = $url;
222
+ break 2;
223
+ }
224
+ }
225
+ }
226
+
227
+ if ( ! $rest_url ) {
228
+ return new WP_Error(
229
+ 'itsec.discover.invalid-link-header',
230
+ __( 'Could not find a REST API URL in the Link header.', 'better-wp-security' ),
231
+ [ 'status' => WP_Http::BAD_REQUEST ]
232
+ );
233
+ }
234
+
235
+ $index = wp_safe_remote_get( add_query_arg( [
236
+ '_fields' => 'name,description,url,home,namespaces,authentication,_links,_embedded',
237
+ '_embed' => 'wp:featuredmedia',
238
+ ], $rest_url ) );
239
+
240
+ if ( is_wp_error( $index ) ) {
241
+ return new WP_Error(
242
+ 'itsec.discover.index.cannot-connect',
243
+ wp_sprintf( __( 'Cannot connect to index: %l.', 'better-wp-security' ), ITSEC_Lib::get_error_strings( $index ) ),
244
+ [ 'status' => WP_Http::INTERNAL_SERVER_ERROR ]
245
+ );
246
+ }
247
+
248
+ $status = wp_remote_retrieve_response_code( $index );
249
+
250
+ if ( $status !== 200 ) {
251
+ return new WP_Error(
252
+ 'itsec.discover.index.non-200',
253
+ sprintf( __( 'REST API index returned a non-200 status code (%d).', 'better-wp-security' ), $status ),
254
+ [ 'status' => WP_Http::BAD_REQUEST ]
255
+ );
256
+ }
257
+
258
+ $body = wp_remote_retrieve_body( $index );
259
+
260
+ if ( ! $body || ! $data = json_decode( $body, true ) ) {
261
+ return new WP_Error(
262
+ 'itsec.discover.index.empty',
263
+ __( 'REST API index returned no data.', 'better-wp-security' ),
264
+ [ 'status' => WP_HTTP::BAD_REQUEST ]
265
+ );
266
+ }
267
+
268
+ $itsec_index = wp_safe_remote_get( ITSEC_Lib_REST::rest_url(
269
+ $rest_url,
270
+ 'ithemes-security/v1'
271
+ ) );
272
+
273
+ if ( is_wp_error( $itsec_index ) ) {
274
+ return new WP_Error(
275
+ 'itsec.discover.itsec-index-cannot-connect',
276
+ wp_sprintf( __( 'Cannot connect to index: %l.', 'better-wp-security' ), ITSEC_Lib::get_error_strings( $itsec_index ) ),
277
+ [ 'status' => WP_Http::INTERNAL_SERVER_ERROR ]
278
+ );
279
+ }
280
+
281
+ $status = wp_remote_retrieve_response_code( $itsec_index );
282
+
283
+ if ( $status !== 200 ) {
284
+ return new WP_Error(
285
+ 'itsec.discover.itsec-index.non-200',
286
+ sprintf( __( 'iThemes Security REST API index returned a non-200 status code (%d).', 'better-wp-security' ), $status ),
287
+ [ 'status' => WP_Http::BAD_REQUEST ]
288
+ );
289
+ }
290
+
291
+ $body = wp_remote_retrieve_body( $itsec_index );
292
+
293
+ if ( ! $body || ! $itsec_data = json_decode( $body, true ) ) {
294
+ return new WP_Error(
295
+ 'itsec.discover.itsec-index.empty',
296
+ __( 'iThemes Security REST API index returned no data.', 'better-wp-security' ),
297
+ [ 'status' => WP_HTTP::BAD_REQUEST ]
298
+ );
299
+ }
300
+
301
+ return new WP_REST_Response( [
302
+ 'url' => $rest_url,
303
+ 'index' => $data,
304
+ 'itsec' => $itsec_data,
305
+ ] );
306
+ }
307
+
308
  public function add_htaccess_authorization_header( $rules ) {
309
  $rules .= "\n";
310
  $rules .= "\t# " . __( 'Pass through Authorization header.', 'better-wp-security' ) . "\n";
dist/30.js DELETED
@@ -1 +0,0 @@
1
- (window.itsecWebpackJsonP=window.itsecWebpackJsonP||[]).push([[30],{"3CQJ":function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.default=e.exports,e.exports.__esModule=!0},"5KkY":function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(e.exports=n=function(e){return typeof e},e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.default=e.exports,e.exports.__esModule=!0),n(t)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},"9IRi":function(e,t,n){var r=n("QA/G"),o=n("fAcX"),i=n("org3"),a=n("Hnus");e.exports=function(e){return r(e)||o(e)||i(e)||a()},e.exports.default=e.exports,e.exports.__esModule=!0},CNnH:function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.default=e.exports,e.exports.__esModule=!0,n(t,r)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},FUBA:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n("cDcd"),a=u(i),s=u(n("17x9"));function u(e){return e&&e.__esModule?e:{default:e}}var l={position:"absolute",top:0,left:0,visibility:"hidden",height:0,overflow:"scroll",whiteSpace:"pre"},c=["extraWidth","injectStyles","inputClassName","inputRef","inputStyle","minWidth","onAutosize","placeholderIsMinWidth"],p=function(e,t){t.style.fontSize=e.fontSize,t.style.fontFamily=e.fontFamily,t.style.fontWeight=e.fontWeight,t.style.fontStyle=e.fontStyle,t.style.letterSpacing=e.letterSpacing,t.style.textTransform=e.textTransform},f=!("undefined"==typeof window||!window.navigator)&&/MSIE |Trident\/|Edge\//.test(window.navigator.userAgent),d=function(){return f?"_"+Math.random().toString(36).substr(2,12):void 0},h=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.inputRef=function(e){n.input=e,"function"==typeof n.props.inputRef&&n.props.inputRef(e)},n.placeHolderSizerRef=function(e){n.placeHolderSizer=e},n.sizerRef=function(e){n.sizer=e},n.state={inputWidth:e.minWidth,inputId:e.id||d(),prevId:e.id},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,null,[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.id;return n!==t.prevId?{inputId:n||d(),prevId:n}:null}}]),o(t,[{key:"componentDidMount",value:function(){this.mounted=!0,this.copyInputStyles(),this.updateInputWidth()}},{key:"componentDidUpdate",value:function(e,t){t.inputWidth!==this.state.inputWidth&&"function"==typeof this.props.onAutosize&&this.props.onAutosize(this.state.inputWidth),this.updateInputWidth()}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"copyInputStyles",value:function(){if(this.mounted&&window.getComputedStyle){var e=this.input&&window.getComputedStyle(this.input);e&&(p(e,this.sizer),this.placeHolderSizer&&p(e,this.placeHolderSizer))}}},{key:"updateInputWidth",value:function(){if(this.mounted&&this.sizer&&void 0!==this.sizer.scrollWidth){var e=void 0;e=this.props.placeholder&&(!this.props.value||this.props.value&&this.props.placeholderIsMinWidth)?Math.max(this.sizer.scrollWidth,this.placeHolderSizer.scrollWidth)+2:this.sizer.scrollWidth+2,(e+="number"===this.props.type&&void 0===this.props.extraWidth?16:parseInt(this.props.extraWidth)||0)<this.props.minWidth&&(e=this.props.minWidth),e!==this.state.inputWidth&&this.setState({inputWidth:e})}}},{key:"getInput",value:function(){return this.input}},{key:"focus",value:function(){this.input.focus()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"renderStyles",value:function(){var e=this.props.injectStyles;return f&&e?a.default.createElement("style",{dangerouslySetInnerHTML:{__html:"input#"+this.state.inputId+"::-ms-clear {display: none;}"}}):null}},{key:"render",value:function(){var e=[this.props.defaultValue,this.props.value,""].reduce((function(e,t){return null!=e?e:t})),t=r({},this.props.style);t.display||(t.display="inline-block");var n=r({boxSizing:"content-box",width:this.state.inputWidth+"px"},this.props.inputStyle),o=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(this.props,[]);return function(e){c.forEach((function(t){return delete e[t]}))}(o),o.className=this.props.inputClassName,o.id=this.state.inputId,o.style=n,a.default.createElement("div",{className:this.props.className,style:t},this.renderStyles(),a.default.createElement("input",r({},o,{ref:this.inputRef})),a.default.createElement("div",{ref:this.sizerRef,style:l},e),this.props.placeholder?a.default.createElement("div",{ref:this.placeHolderSizerRef,style:l},this.props.placeholder):null)}}]),t}(i.Component);h.propTypes={className:s.default.string,defaultValue:s.default.any,extraWidth:s.default.oneOfType([s.default.number,s.default.string]),id:s.default.string,injectStyles:s.default.bool,inputClassName:s.default.string,inputRef:s.default.func,inputStyle:s.default.object,minWidth:s.default.oneOfType([s.default.number,s.default.string]),onAutosize:s.default.func,onChange:s.default.func,placeholder:s.default.string,placeholderIsMinWidth:s.default.bool,style:s.default.object,value:s.default.any},h.defaultProps={minWidth:1,injectStyles:!0},t.default=h},FgQr:function(e,t){e.exports=function(e){if(Array.isArray(e))return e},e.exports.default=e.exports,e.exports.__esModule=!0},Hnus:function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.default=e.exports,e.exports.__esModule=!0},PMtK:function(e,t){e.exports=function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}},e.exports.default=e.exports,e.exports.__esModule=!0},"QA/G":function(e,t,n){var r=n("j3CM");e.exports=function(e){if(Array.isArray(e))return r(e)},e.exports.default=e.exports,e.exports.__esModule=!0},ROju:function(e,t,n){var r=n("FgQr"),o=n("PMtK"),i=n("org3"),a=n("3CQJ");e.exports=function(e,t){return r(e)||o(e,t)||i(e,t)||a()},e.exports.default=e.exports,e.exports.__esModule=!0},X4k0:function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.default=e.exports,e.exports.__esModule=!0},YK1D:function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function o(){return(o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}n.r(t),n.d(t,"defaultProps",(function(){return mn})),n.d(t,"makeAsyncSelect",(function(){return vn}));n("ROju"),n("9IRi"),n("X4k0");function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t,n){return t&&a(e.prototype,t),n&&a(e,n),e}n("dsmI");function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}var c=n("5KkY"),p=n.n(c);function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function d(e,t){return!t||"object"!==p()(t)&&"function"!=typeof t?f(e):t}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var m=n("cDcd"),v=n.n(m);function b(e,t){return(b=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var g=function(){function e(e){this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.before=null}var t=e.prototype;return t.insert=function(e){if(this.ctr%(this.isSpeedy?65e3:1)==0){var t,n=function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t}(this);t=0===this.tags.length?this.before:this.tags[this.tags.length-1].nextSibling,this.container.insertBefore(n,t),this.tags.push(n)}var r=this.tags[this.tags.length-1];if(this.isSpeedy){var o=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(r);try{var i=105===e.charCodeAt(1)&&64===e.charCodeAt(0);o.insertRule(e,i?0:o.cssRules.length)}catch(e){0}}else r.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){return e.parentNode.removeChild(e)})),this.tags=[],this.ctr=0},e}();var y=function(e){function t(e,t,r){var o=t.trim().split(h);t=o;var i=o.length,a=e.length;switch(a){case 0:case 1:var s=0;for(e=0===a?"":e[0]+" ";s<i;++s)t[s]=n(e,t[s],r).trim();break;default:var u=s=0;for(t=[];s<i;++s)for(var l=0;l<a;++l)t[u++]=n(e[l]+" ",o[s],r).trim()}return t}function n(e,t,n){var r=t.charCodeAt(0);switch(33>r&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(m,"$1"+e.trim());case 58:return e.trim()+t.replace(m,"$1"+e.trim());default:if(0<1*n&&0<t.indexOf("\f"))return t.replace(m,(58===e.charCodeAt(0)?"":"$1")+e.trim())}return e+t}function r(e,t,n,i){var a=e+";",s=2*t+3*n+4*i;if(944===s){e=a.indexOf(":",9)+1;var u=a.substring(e,a.length-1).trim();return u=a.substring(0,e).trim()+u+";",1===E||2===E&&o(u,1)?"-webkit-"+u+u:u}if(0===E||2===E&&!o(a,1))return a;switch(s){case 1015:return 97===a.charCodeAt(10)?"-webkit-"+a+a:a;case 951:return 116===a.charCodeAt(3)?"-webkit-"+a+a:a;case 963:return 110===a.charCodeAt(5)?"-webkit-"+a+a:a;case 1009:if(100!==a.charCodeAt(4))break;case 969:case 942:return"-webkit-"+a+a;case 978:return"-webkit-"+a+"-moz-"+a+a;case 1019:case 983:return"-webkit-"+a+"-moz-"+a+"-ms-"+a+a;case 883:if(45===a.charCodeAt(8))return"-webkit-"+a+a;if(0<a.indexOf("image-set(",11))return a.replace(k,"$1-webkit-$2")+a;break;case 932:if(45===a.charCodeAt(4))switch(a.charCodeAt(5)){case 103:return"-webkit-box-"+a.replace("-grow","")+"-webkit-"+a+"-ms-"+a.replace("grow","positive")+a;case 115:return"-webkit-"+a+"-ms-"+a.replace("shrink","negative")+a;case 98:return"-webkit-"+a+"-ms-"+a.replace("basis","preferred-size")+a}return"-webkit-"+a+"-ms-"+a+a;case 964:return"-webkit-"+a+"-ms-flex-"+a+a;case 1023:if(99!==a.charCodeAt(8))break;return"-webkit-box-pack"+(u=a.substring(a.indexOf(":",15)).replace("flex-","").replace("space-between","justify"))+"-webkit-"+a+"-ms-flex-pack"+u+a;case 1005:return f.test(a)?a.replace(p,":-webkit-")+a.replace(p,":-moz-")+a:a;case 1e3:switch(t=(u=a.substring(13).trim()).indexOf("-")+1,u.charCodeAt(0)+u.charCodeAt(t)){case 226:u=a.replace(y,"tb");break;case 232:u=a.replace(y,"tb-rl");break;case 220:u=a.replace(y,"lr");break;default:return a}return"-webkit-"+a+"-ms-"+u+a;case 1017:if(-1===a.indexOf("sticky",9))break;case 975:switch(t=(a=e).length-10,s=(u=(33===a.charCodeAt(t)?a.substring(0,t):a).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|u.charCodeAt(7))){case 203:if(111>u.charCodeAt(8))break;case 115:a=a.replace(u,"-webkit-"+u)+";"+a;break;case 207:case 102:a=a.replace(u,"-webkit-"+(102<s?"inline-":"")+"box")+";"+a.replace(u,"-webkit-"+u)+";"+a.replace(u,"-ms-"+u+"box")+";"+a}return a+";";case 938:if(45===a.charCodeAt(5))switch(a.charCodeAt(6)){case 105:return u=a.replace("-items",""),"-webkit-"+a+"-webkit-box-"+u+"-ms-flex-"+u+a;case 115:return"-webkit-"+a+"-ms-flex-item-"+a.replace(w,"")+a;default:return"-webkit-"+a+"-ms-flex-line-pack"+a.replace("align-content","").replace(w,"")+a}break;case 973:case 989:if(45!==a.charCodeAt(3)||122===a.charCodeAt(4))break;case 931:case 953:if(!0===C.test(e))return 115===(u=e.substring(e.indexOf(":")+1)).charCodeAt(0)?r(e.replace("stretch","fill-available"),t,n,i).replace(":fill-available",":stretch"):a.replace(u,"-webkit-"+u)+a.replace(u,"-moz-"+u.replace("fill-",""))+a;break;case 962:if(a="-webkit-"+a+(102===a.charCodeAt(5)?"-ms-"+a:"")+a,211===n+i&&105===a.charCodeAt(13)&&0<a.indexOf("transform",10))return a.substring(0,a.indexOf(";",27)+1).replace(d,"$1-webkit-$2")+a}return a}function o(e,t){var n=e.indexOf(1===t?":":"{"),r=e.substring(0,3!==t?n:10);return n=e.substring(n+1,e.length-1),V(2!==t?r:r.replace(S,"$1"),n,t)}function i(e,t){var n=r(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return n!==t+";"?n.replace(x," or ($1)").substring(4):"("+t+")"}function a(e,t,n,r,o,i,a,s,l,c){for(var p,f=0,d=t;f<D;++f)switch(p=R[f].call(u,e,d,n,r,o,i,a,s,l,c)){case void 0:case!1:case!0:case null:break;default:d=p}if(d!==t)return d}function s(e){return void 0!==(e=e.prefix)&&(V=null,e?"function"!=typeof e?E=1:(E=2,V=e):E=0),s}function u(e,n){var s=e;if(33>s.charCodeAt(0)&&(s=s.trim()),s=[s],0<D){var u=a(-1,n,s,s,I,P,0,0,0,0);void 0!==u&&"string"==typeof u&&(n=u)}var p=function e(n,s,u,p,f){for(var d,h,m,y,x,w=0,S=0,C=0,k=0,R=0,V=0,j=m=d=0,T=0,_=0,F=0,N=0,H=u.length,U=H-1,z="",W="",B="",G="";T<H;){if(h=u.charCodeAt(T),T===U&&0!==S+k+C+w&&(0!==S&&(h=47===S?10:47),k=C=w=0,H++,U++),0===S+k+C+w){if(T===U&&(0<_&&(z=z.replace(c,"")),0<z.trim().length)){switch(h){case 32:case 9:case 59:case 13:case 10:break;default:z+=u.charAt(T)}h=59}switch(h){case 123:for(d=(z=z.trim()).charCodeAt(0),m=1,N=++T;T<H;){switch(h=u.charCodeAt(T)){case 123:m++;break;case 125:m--;break;case 47:switch(h=u.charCodeAt(T+1)){case 42:case 47:e:{for(j=T+1;j<U;++j)switch(u.charCodeAt(j)){case 47:if(42===h&&42===u.charCodeAt(j-1)&&T+2!==j){T=j+1;break e}break;case 10:if(47===h){T=j+1;break e}}T=j}}break;case 91:h++;case 40:h++;case 34:case 39:for(;T++<U&&u.charCodeAt(T)!==h;);}if(0===m)break;T++}switch(m=u.substring(N,T),0===d&&(d=(z=z.replace(l,"").trim()).charCodeAt(0)),d){case 64:switch(0<_&&(z=z.replace(c,"")),h=z.charCodeAt(1)){case 100:case 109:case 115:case 45:_=s;break;default:_=A}if(N=(m=e(s,_,m,h,f+1)).length,0<D&&(x=a(3,m,_=t(A,z,F),s,I,P,N,h,f,p),z=_.join(""),void 0!==x&&0===(N=(m=x.trim()).length)&&(h=0,m="")),0<N)switch(h){case 115:z=z.replace(O,i);case 100:case 109:case 45:m=z+"{"+m+"}";break;case 107:m=(z=z.replace(v,"$1 $2"))+"{"+m+"}",m=1===E||2===E&&o("@"+m,3)?"@-webkit-"+m+"@"+m:"@"+m;break;default:m=z+m,112===p&&(W+=m,m="")}else m="";break;default:m=e(s,t(s,z,F),m,p,f+1)}B+=m,m=F=_=j=d=0,z="",h=u.charCodeAt(++T);break;case 125:case 59:if(1<(N=(z=(0<_?z.replace(c,""):z).trim()).length))switch(0===j&&(d=z.charCodeAt(0),45===d||96<d&&123>d)&&(N=(z=z.replace(" ",":")).length),0<D&&void 0!==(x=a(1,z,s,n,I,P,W.length,p,f,p))&&0===(N=(z=x.trim()).length)&&(z="\0\0"),d=z.charCodeAt(0),h=z.charCodeAt(1),d){case 0:break;case 64:if(105===h||99===h){G+=z+u.charAt(T);break}default:58!==z.charCodeAt(N-1)&&(W+=r(z,d,h,z.charCodeAt(2)))}F=_=j=d=0,z="",h=u.charCodeAt(++T)}}switch(h){case 13:case 10:47===S?S=0:0===1+d&&107!==p&&0<z.length&&(_=1,z+="\0"),0<D*L&&a(0,z,s,n,I,P,W.length,p,f,p),P=1,I++;break;case 59:case 125:if(0===S+k+C+w){P++;break}default:switch(P++,y=u.charAt(T),h){case 9:case 32:if(0===k+w+S)switch(R){case 44:case 58:case 9:case 32:y="";break;default:32!==h&&(y=" ")}break;case 0:y="\\0";break;case 12:y="\\f";break;case 11:y="\\v";break;case 38:0===k+S+w&&(_=F=1,y="\f"+y);break;case 108:if(0===k+S+w+M&&0<j)switch(T-j){case 2:112===R&&58===u.charCodeAt(T-3)&&(M=R);case 8:111===V&&(M=V)}break;case 58:0===k+S+w&&(j=T);break;case 44:0===S+C+k+w&&(_=1,y+="\r");break;case 34:case 39:0===S&&(k=k===h?0:0===k?h:k);break;case 91:0===k+S+C&&w++;break;case 93:0===k+S+C&&w--;break;case 41:0===k+S+w&&C--;break;case 40:if(0===k+S+w){if(0===d)switch(2*R+3*V){case 533:break;default:d=1}C++}break;case 64:0===S+C+k+w+j+m&&(m=1);break;case 42:case 47:if(!(0<k+w+C))switch(S){case 0:switch(2*h+3*u.charCodeAt(T+1)){case 235:S=47;break;case 220:N=T,S=42}break;case 42:47===h&&42===R&&N+2!==T&&(33===u.charCodeAt(N+2)&&(W+=u.substring(N,T+1)),y="",S=0)}}0===S&&(z+=y)}V=R,R=h,T++}if(0<(N=W.length)){if(_=s,0<D&&(void 0!==(x=a(2,W,_,n,I,P,N,p,f,p))&&0===(W=x).length))return G+W+B;if(W=_.join(",")+"{"+W+"}",0!=E*M){switch(2!==E||o(W,2)||(M=0),M){case 111:W=W.replace(g,":-moz-$1")+W;break;case 112:W=W.replace(b,"::-webkit-input-$1")+W.replace(b,"::-moz-$1")+W.replace(b,":-ms-input-$1")+W}M=0}}return G+W+B}(A,s,n,0,0);return 0<D&&(void 0!==(u=a(-2,p,s,s,I,P,p.length,0,0,0))&&(p=u)),"",M=0,P=I=1,p}var l=/^\0+/g,c=/[\0\r\f]/g,p=/: */g,f=/zoo|gra/,d=/([,: ])(transform)/g,h=/,\r+?/g,m=/([\t\r\n ])*\f?&/g,v=/@(k\w+)\s*(\S*)\s*/,b=/::(place)/g,g=/:(read-only)/g,y=/[svh]\w+-[tblr]{2}/,O=/\(\s*(.*)\s*\)/g,x=/([\s\S]*?);/g,w=/-self|flex-/g,S=/[^]*?(:[rp][el]a[\w-]+)[^]*/,C=/stretch|:\s*\w+\-(?:conte|avail)/,k=/([^-])(image-set\()/,P=1,I=1,M=0,E=1,A=[],R=[],D=0,V=null,L=0;return u.use=function e(t){switch(t){case void 0:case null:D=R.length=0;break;default:if("function"==typeof t)R[D++]=t;else if("object"==typeof t)for(var n=0,r=t.length;n<r;++n)e(t[n]);else L=0|!!t}return e},u.set=s,void 0!==e&&s(e),u};function O(e){e&&x.current.insert(e+"}")}var x={current:null},w=function(e,t,n,r,o,i,a,s,u,l){switch(e){case 1:switch(t.charCodeAt(0)){case 64:return x.current.insert(t+";"),"";case 108:if(98===t.charCodeAt(2))return""}break;case 2:if(0===s)return t+"/*|*/";break;case 3:switch(s){case 102:case 112:return x.current.insert(n[0]+t),"";default:return t+(0===l?"/*|*/":"")}case-2:t.split("/*|*/}").forEach(O)}},S=function(e){void 0===e&&(e={});var t,n=e.key||"css";void 0!==e.prefix&&(t={prefix:e.prefix});var r=new y(t);var o,i={};o=e.container||document.head;var a,s=document.querySelectorAll("style[data-emotion-"+n+"]");Array.prototype.forEach.call(s,(function(e){e.getAttribute("data-emotion-"+n).split(" ").forEach((function(e){i[e]=!0})),e.parentNode!==o&&o.appendChild(e)})),r.use(e.stylisPlugins)(w),a=function(e,t,n,o){var i=t.name;x.current=n,r(e,t.styles),o&&(u.inserted[i]=!0)};var u={key:n,sheet:new g({key:n,container:o,nonce:e.nonce,speedy:e.speedy}),nonce:e.nonce,inserted:i,registered:{},insert:a};return u};n("lqYr");function C(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]):r+=n+" "})),r}var k=function(e,t,n){var r=e.key+"-"+t.name;if(!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles),void 0===e.inserted[t.name]){var o=t;do{e.insert("."+r,o,e.sheet,!0);o=o.next}while(void 0!==o)}};var P=function(e){for(var t,n=0,r=0,o=e.length;o>=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)},I={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};var M=/[A-Z]|^ms/g,E=/_EMO_([^_]+?)_([^]*?)_EMO_/g,A=function(e){return 45===e.charCodeAt(1)},R=function(e){return null!=e&&"boolean"!=typeof e},D=function(e){var t={};return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}((function(e){return A(e)?e:e.replace(M,"-$&").toLowerCase()})),V=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(E,(function(e,t,n){return j={name:t,styles:n,next:j},t}))}return 1===I[e]||A(e)||"number"!=typeof t||0===t?t:t+"px"};function L(e,t,n,r){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return j={name:n.name,styles:n.styles,next:j},n.name;if(void 0!==n.styles){var o=n.next;if(void 0!==o)for(;void 0!==o;)j={name:o.name,styles:o.styles,next:j},o=o.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=L(e,t,n[o],!1);else for(var i in n){var a=n[i];if("object"!=typeof a)null!=t&&void 0!==t[a]?r+=i+"{"+t[a]+"}":R(a)&&(r+=D(i)+":"+V(i,a)+";");else if(!Array.isArray(a)||"string"!=typeof a[0]||null!=t&&void 0!==t[a[0]]){var s=L(e,t,a,!1);switch(i){case"animation":case"animationName":r+=D(i)+":"+s+";";break;default:r+=i+"{"+s+"}"}}else for(var u=0;u<a.length;u++)R(a[u])&&(r+=D(i)+":"+V(i,a[u])+";")}return r}(e,t,n);case"function":if(void 0!==e){var i=j,a=n(e);return j=i,L(e,t,a,r)}break;case"string":}if(null==t)return n;var s=t[n];return void 0===s||r?n:s}var j,T=/label:\s*([^\s;\n{]+)\s*;/g;var _=function(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,o="";j=void 0;var i=e[0];null==i||void 0===i.raw?(r=!1,o+=L(n,t,i,!1)):o+=i[0];for(var a=1;a<e.length;a++)o+=L(n,t,e[a],46===o.charCodeAt(o.length-1)),r&&(o+=i[a]);T.lastIndex=0;for(var s,u="";null!==(s=T.exec(o));)u+="-"+s[1];return{name:P(o)+u,styles:o,next:j}},F=Object.prototype.hasOwnProperty,N=Object(m.createContext)("undefined"!=typeof HTMLElement?S():null),H=Object(m.createContext)({}),U=(N.Provider,function(e){var t=function(t,n){return Object(m.createElement)(N.Consumer,null,(function(r){return e(t,r,n)}))};return Object(m.forwardRef)(t)}),z="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",W=function(e,t){var n={};for(var r in t)F.call(t,r)&&(n[r]=t[r]);return n[z]=e,n},B=function(e,t,n,r){var o=null===n?t.css:t.css(n);"string"==typeof o&&void 0!==e.registered[o]&&(o=e.registered[o]);var i=t[z],a=[o],s="";"string"==typeof t.className?s=C(e.registered,a,t.className):null!=t.className&&(s=t.className+" ");var u=_(a);k(e,u,"string"==typeof i);s+=e.key+"-"+u.name;var l={};for(var c in t)F.call(t,c)&&"css"!==c&&c!==z&&(l[c]=t[c]);return l.ref=r,l.className=s,Object(m.createElement)(i,l)},G=U((function(e,t,n){return"function"==typeof e.css?Object(m.createElement)(H.Consumer,null,(function(r){return B(t,e,r,n)})):B(t,e,null,n)}));var Y=function(e){for(var t,n=0,r=0,o=e.length;o>=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)},$={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};var q=/[A-Z]|^ms/g,X=/_EMO_([^_]+?)_([^]*?)_EMO_/g,K=function(e){return 45===e.charCodeAt(1)},J=function(e){return null!=e&&"boolean"!=typeof e},Q=function(e){var t={};return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}((function(e){return K(e)?e:e.replace(q,"-$&").toLowerCase()})),Z=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(X,(function(e,t,n){return te={name:t,styles:n,next:te},t}))}return 1===$[e]||K(e)||"number"!=typeof t||0===t?t:t+"px"};function ee(e,t,n,r){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return te={name:n.name,styles:n.styles,next:te},n.name;if(void 0!==n.styles){var o=n.next;if(void 0!==o)for(;void 0!==o;)te={name:o.name,styles:o.styles,next:te},o=o.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=ee(e,t,n[o],!1);else for(var i in n){var a=n[i];if("object"!=typeof a)null!=t&&void 0!==t[a]?r+=i+"{"+t[a]+"}":J(a)&&(r+=Q(i)+":"+Z(i,a)+";");else if(!Array.isArray(a)||"string"!=typeof a[0]||null!=t&&void 0!==t[a[0]]){var s=ee(e,t,a,!1);switch(i){case"animation":case"animationName":r+=Q(i)+":"+s+";";break;default:r+=i+"{"+s+"}"}}else for(var u=0;u<a.length;u++)J(a[u])&&(r+=Q(i)+":"+Z(i,a[u])+";")}return r}(e,t,n);case"function":if(void 0!==e){var i=te,a=n(e);return te=i,ee(e,t,a,r)}break;case"string":}if(null==t)return n;var s=t[n];return void 0===s||r?n:s}var te,ne=/label:\s*([^\s;\n{]+)\s*;/g;var re=function(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,o="";te=void 0;var i=e[0];null==i||void 0===i.raw?(r=!1,o+=ee(n,t,i,!1)):o+=i[0];for(var a=1;a<e.length;a++)o+=ee(n,t,e[a],46===o.charCodeAt(o.length-1)),r&&(o+=i[a]);ne.lastIndex=0;for(var s,u="";null!==(s=ne.exec(o));)u+="-"+s[1];return{name:Y(o)+u,styles:o,next:te}};var oe=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return re(t)},ie=function(e,t){var n=arguments;if(null==t||!F.call(t,"css"))return m.createElement.apply(void 0,n);var r=n.length,o=new Array(r);o[0]=G,o[1]=W(e,t);for(var i=2;i<r;i++)o[i]=n[i];return m.createElement.apply(null,o)},ae=(m.Component,function e(t){for(var n=t.length,r=0,o="";r<n;r++){var i=t[r];if(null!=i){var a=void 0;switch(typeof i){case"boolean":break;case"object":if(Array.isArray(i))a=e(i);else for(var s in a="",i)i[s]&&s&&(a&&(a+=" "),a+=s);break;default:a=i}a&&(o&&(o+=" "),o+=a)}}return o});function se(e,t,n){var r=[],o=C(e,r,n);return r.length<2?n:o+t(r)}var ue=U((function(e,t){return Object(m.createElement)(H.Consumer,null,(function(n){var r=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var o=_(n,t.registered);return k(t,o,!1),t.key+"-"+o.name},o={css:r,cx:function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return se(t.registered,r,ae(n))},theme:n},i=e.children(o);return!0,i}))})),le=n("faye");function ce(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pe(e){return(pe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var fe=n("FUBA"),de=n.n(fe),he=function(){};function me(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function ve(e,t,n){var r=[n];if(t&&e)for(var o in t)t.hasOwnProperty(o)&&t[o]&&r.push("".concat(me(e,o)));return r.filter((function(e){return e})).map((function(e){return String(e).trim()})).join(" ")}var be=function(e){return Array.isArray(e)?e.filter(Boolean):"object"===pe(e)&&null!==e?[e]:[]};function ge(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function ye(e){return ge(e)?window.pageYOffset:e.scrollTop}function Oe(e,t){ge(e)?window.scrollTo(0,t):e.scrollTop=t}function xe(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function we(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:he,o=ye(e),i=t-o,a=10,s=0;function u(){var t=xe(s+=a,o,i,n);Oe(e,t),s<n?window.requestAnimationFrame(u):r(e)}u()}function Se(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}function Ce(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ke(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ce(Object(n),!0).forEach((function(t){ce(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ce(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Pe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=h(e);if(t){var o=h(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return d(this,n)}}function Ie(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,o=e.placement,i=e.shouldScroll,a=e.isFixedPosition,s=e.theme.spacing,u=function(e){var t=getComputedStyle(e),n="absolute"===t.position,r=/(auto|scroll)/,o=document.documentElement;if("fixed"===t.position)return o;for(var i=e;i=i.parentElement;)if(t=getComputedStyle(i),(!n||"static"!==t.position)&&r.test(t.overflow+t.overflowY+t.overflowX))return i;return o}(n),l={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return l;var c=u.getBoundingClientRect().height,p=n.getBoundingClientRect(),f=p.bottom,d=p.height,h=p.top,m=n.offsetParent.getBoundingClientRect().top,v=window.innerHeight,b=ye(u),g=parseInt(getComputedStyle(n).marginBottom,10),y=parseInt(getComputedStyle(n).marginTop,10),O=m-y,x=v-h,w=O+b,S=c-b-h,C=f-v+b+g,k=b+h-y;switch(o){case"auto":case"bottom":if(x>=d)return{placement:"bottom",maxHeight:t};if(S>=d&&!a)return i&&we(u,C,160),{placement:"bottom",maxHeight:t};if(!a&&S>=r||a&&x>=r)return i&&we(u,C,160),{placement:"bottom",maxHeight:a?x-g:S-g};if("auto"===o||a){var P=t,I=a?O:w;return I>=r&&(P=Math.min(I-g-s.controlHeight,t)),{placement:"top",maxHeight:P}}if("bottom"===o)return Oe(u,C),{placement:"bottom",maxHeight:t};break;case"top":if(O>=d)return{placement:"top",maxHeight:t};if(w>=d&&!a)return i&&we(u,k,160),{placement:"top",maxHeight:t};if(!a&&w>=r||a&&O>=r){var M=t;return(!a&&w>=r||a&&O>=r)&&(M=a?O-y:w-y),i&&we(u,k,160),{placement:"top",maxHeight:M}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return l}var Me=function(e){return"auto"===e?"bottom":e},Ee=Object(m.createContext)({getPortalPlacement:null}),Ae=function(e){l(n,e);var t=Pe(n);function n(){var e;i(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return(e=t.call.apply(t,[this].concat(o))).state={maxHeight:e.props.maxMenuHeight,placement:null},e.getPlacement=function(t){var n=e.props,r=n.minMenuHeight,o=n.maxMenuHeight,i=n.menuPlacement,a=n.menuPosition,s=n.menuShouldScrollIntoView,u=n.theme;if(t){var l="fixed"===a,c=Ie({maxHeight:o,menuEl:t,minHeight:r,placement:i,shouldScroll:s&&!l,isFixedPosition:l,theme:u}),p=e.context.getPortalPlacement;p&&p(c),e.setState(c)}},e.getUpdatedProps=function(){var t=e.props.menuPlacement,n=e.state.placement||Me(t);return ke(ke({},e.props),{},{placement:n,maxHeight:e.state.maxHeight})},e}return s(n,[{key:"render",value:function(){return(0,this.props.children)({ref:this.getPlacement,placerProps:this.getUpdatedProps()})}}]),n}(m.Component);Ae.contextType=Ee;var Re=function(e){var t=e.theme,n=t.spacing.baseUnit;return{color:t.colors.neutral40,padding:"".concat(2*n,"px ").concat(3*n,"px"),textAlign:"center"}},De=Re,Ve=Re,Le=function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,a=e.innerProps;return ie("div",o({css:i("noOptionsMessage",e),className:r({"menu-notice":!0,"menu-notice--no-options":!0},n)},a),t)};Le.defaultProps={children:"No options"};var je=function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,a=e.innerProps;return ie("div",o({css:i("loadingMessage",e),className:r({"menu-notice":!0,"menu-notice--loading":!0},n)},a),t)};je.defaultProps={children:"Loading..."};var Te=function(e){l(n,e);var t=Pe(n);function n(){var e;i(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return(e=t.call.apply(t,[this].concat(o))).state={placement:null},e.getPortalPlacement=function(t){var n=t.placement;n!==Me(e.props.menuPlacement)&&e.setState({placement:n})},e}return s(n,[{key:"render",value:function(){var e=this.props,t=e.appendTo,n=e.children,r=e.controlElement,o=e.menuPlacement,i=e.menuPosition,a=e.getStyles,s="fixed"===i;if(!t&&!s||!r)return null;var u=this.state.placement||Me(o),l=function(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}(r),c=s?0:window.pageYOffset,p=l[u]+c,f=ie("div",{css:a("menuPortal",{offset:p,position:i,rect:l})},n);return ie(Ee.Provider,{value:{getPortalPlacement:this.getPortalPlacement}},t?Object(le.createPortal)(f,t):f)}}]),n}(m.Component),_e=Array.isArray,Fe=Object.keys,Ne=Object.prototype.hasOwnProperty;function He(e,t){try{return function e(t,n){if(t===n)return!0;if(t&&n&&"object"==pe(t)&&"object"==pe(n)){var r,o,i,a=_e(t),s=_e(n);if(a&&s){if((o=t.length)!=n.length)return!1;for(r=o;0!=r--;)if(!e(t[r],n[r]))return!1;return!0}if(a!=s)return!1;var u=t instanceof Date,l=n instanceof Date;if(u!=l)return!1;if(u&&l)return t.getTime()==n.getTime();var c=t instanceof RegExp,p=n instanceof RegExp;if(c!=p)return!1;if(c&&p)return t.toString()==n.toString();var f=Fe(t);if((o=f.length)!==Fe(n).length)return!1;for(r=o;0!=r--;)if(!Ne.call(n,f[r]))return!1;for(r=o;0!=r--;)if(!("_owner"===(i=f[r])&&t.$$typeof||e(t[i],n[i])))return!1;return!0}return t!=t&&n!=n}(e,t)}catch(e){if(e.message&&e.message.match(/stack|recursion/i))return console.warn("Warning: react-fast-compare does not handle circular references.",e.name,e.message),!1;throw e}}function Ue(){var e,t,n=(e=["\n 0%, 80%, 100% { opacity: 0; }\n 40% { opacity: 1; }\n"],t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}})));return Ue=function(){return n},n}var ze={name:"19bqh2r",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0;"},We=function(e){var t=e.size,n=r(e,["size"]);return ie("svg",o({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:ze},n))},Be=function(e){return ie(We,o({size:20},e),ie("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},Ge=function(e){return ie(We,o({size:20},e),ie("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},Ye=function(e){var t=e.isFocused,n=e.theme,r=n.spacing.baseUnit,o=n.colors;return{label:"indicatorContainer",color:t?o.neutral60:o.neutral20,display:"flex",padding:2*r,transition:"color 150ms",":hover":{color:t?o.neutral80:o.neutral40}}},$e=Ye,qe=Ye,Xe=function(){var e=oe.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}(Ue()),Ke=function(e){var t=e.delay,n=e.offset;return ie("span",{css:oe({animation:"".concat(Xe," 1s ease-in-out ").concat(t,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":null,height:"1em",verticalAlign:"top",width:"1em"},"")})},Je=function(e){var t=e.className,n=e.cx,r=e.getStyles,i=e.innerProps,a=e.isRtl;return ie("div",o({},i,{css:r("loadingIndicator",e),className:n({indicator:!0,"loading-indicator":!0},t)}),ie(Ke,{delay:0,offset:a}),ie(Ke,{delay:160,offset:!0}),ie(Ke,{delay:320,offset:!a}))};Je.defaultProps={size:4};function Qe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ze(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qe(Object(n),!0).forEach((function(t){ce(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function et(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function tt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?et(Object(n),!0).forEach((function(t){ce(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):et(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var nt=function(e){return{label:"input",background:0,border:0,fontSize:"inherit",opacity:e?0:1,outline:0,padding:0,color:"inherit"}};function rt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ot(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rt(Object(n),!0).forEach((function(t){ce(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var it=function(e){var t=e.children,n=e.innerProps;return ie("div",n,t)},at=it,st=it;var ut=function(e){var t=e.children,n=e.className,r=e.components,o=e.cx,i=e.data,a=e.getStyles,s=e.innerProps,u=e.isDisabled,l=e.removeProps,c=e.selectProps,p=r.Container,f=r.Label,d=r.Remove;return ie(ue,null,(function(r){var h=r.css,m=r.cx;return ie(p,{data:i,innerProps:ot(ot({},s),{},{className:m(h(a("multiValue",e)),o({"multi-value":!0,"multi-value--is-disabled":u},n))}),selectProps:c},ie(f,{data:i,innerProps:{className:m(h(a("multiValueLabel",e)),o({"multi-value__label":!0},n))},selectProps:c},t),ie(d,{data:i,innerProps:ot({className:m(h(a("multiValueRemove",e)),o({"multi-value__remove":!0},n))},l),selectProps:c}))}))};ut.defaultProps={cropWithEllipsis:!0};function lt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ct(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?lt(Object(n),!0).forEach((function(t){ce(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var pt={ClearIndicator:function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,a=e.innerProps;return ie("div",o({},a,{css:i("clearIndicator",e),className:r({indicator:!0,"clear-indicator":!0},n)}),t||ie(Be,null))},Control:function(e){var t=e.children,n=e.cx,r=e.getStyles,i=e.className,a=e.isDisabled,s=e.isFocused,u=e.innerRef,l=e.innerProps,c=e.menuIsOpen;return ie("div",o({ref:u,css:r("control",e),className:n({control:!0,"control--is-disabled":a,"control--is-focused":s,"control--menu-is-open":c},i)},l),t)},DropdownIndicator:function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,a=e.innerProps;return ie("div",o({},a,{css:i("dropdownIndicator",e),className:r({indicator:!0,"dropdown-indicator":!0},n)}),t||ie(Ge,null))},DownChevron:Ge,CrossIcon:Be,Group:function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,a=e.Heading,s=e.headingProps,u=e.label,l=e.theme,c=e.selectProps;return ie("div",{css:i("group",e),className:r({group:!0},n)},ie(a,o({},s,{selectProps:c,theme:l,getStyles:i,cx:r}),u),ie("div",null,t))},GroupHeading:function(e){var t=e.className,n=e.cx,i=e.getStyles,a=e.theme,s=(e.selectProps,r(e,["className","cx","getStyles","theme","selectProps"]));return ie("div",o({css:i("groupHeading",Ze({theme:a},s)),className:n({"group-heading":!0},t)},s))},IndicatorsContainer:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles;return ie("div",{css:o("indicatorsContainer",e),className:r({indicators:!0},n)},t)},IndicatorSeparator:function(e){var t=e.className,n=e.cx,r=e.getStyles,i=e.innerProps;return ie("span",o({},i,{css:r("indicatorSeparator",e),className:n({"indicator-separator":!0},t)}))},Input:function(e){var t=e.className,n=e.cx,i=e.getStyles,a=e.innerRef,s=e.isHidden,u=e.isDisabled,l=e.theme,c=(e.selectProps,r(e,["className","cx","getStyles","innerRef","isHidden","isDisabled","theme","selectProps"]));return ie("div",{css:i("input",tt({theme:l},c))},ie(de.a,o({className:n({input:!0},t),inputRef:a,inputStyle:nt(s),disabled:u},c)))},LoadingIndicator:Je,Menu:function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,a=e.innerRef,s=e.innerProps;return ie("div",o({css:i("menu",e),className:r({menu:!0},n)},s,{ref:a}),t)},MenuList:function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,a=e.isMulti,s=e.innerRef,u=e.innerProps;return ie("div",o({css:i("menuList",e),className:r({"menu-list":!0,"menu-list--is-multi":a},n),ref:s},u),t)},MenuPortal:Te,LoadingMessage:je,NoOptionsMessage:Le,MultiValue:ut,MultiValueContainer:at,MultiValueLabel:st,MultiValueRemove:function(e){var t=e.children,n=e.innerProps;return ie("div",n,t||ie(Be,{size:14}))},Option:function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,a=e.isDisabled,s=e.isFocused,u=e.isSelected,l=e.innerRef,c=e.innerProps;return ie("div",o({css:i("option",e),className:r({option:!0,"option--is-disabled":a,"option--is-focused":s,"option--is-selected":u},n),ref:l},c),t)},Placeholder:function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,a=e.innerProps;return ie("div",o({css:i("placeholder",e),className:r({placeholder:!0},n)},a),t)},SelectContainer:function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,a=e.innerProps,s=e.isDisabled,u=e.isRtl;return ie("div",o({css:i("container",e),className:r({"--is-disabled":s,"--is-rtl":u},n)},a),t)},SingleValue:function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,a=e.isDisabled,s=e.innerProps;return ie("div",o({css:i("singleValue",e),className:r({"single-value":!0,"single-value--is-disabled":a},n)},s),t)},ValueContainer:function(e){var t=e.children,n=e.className,r=e.cx,o=e.isMulti,i=e.getStyles,a=e.hasValue;return ie("div",{css:i("valueContainer",e),className:r({"value-container":!0,"value-container--is-multi":o,"value-container--has-value":a},n)},t)}};function ft(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function dt(e,t){if(e){if("string"==typeof e)return ft(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ft(e,t):void 0}}function ht(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e,t)||dt(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function mt(e){return function(e){if(Array.isArray(e))return ft(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||dt(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var vt=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function bt(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(r=e[n],o=t[n],!(r===o||vt(r)&&vt(o)))return!1;var r,o;return!0}for(var gt=function(e,t){var n;void 0===t&&(t=bt);var r,o=[],i=!1;return function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];return i&&n===this&&t(a,o)||(r=e.apply(this,a),i=!0,n=this,o=a),r}},yt=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],Ot=new RegExp("["+yt.map((function(e){return e.letters})).join("")+"]","g"),xt={},wt=0;wt<yt.length;wt++)for(var St=yt[wt],Ct=0;Ct<St.letters.length;Ct++)xt[St.letters[Ct]]=St.base;var kt=function(e){return e.replace(Ot,(function(e){return xt[e]}))};function Pt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var It=function(e){return e.replace(/^\s+|\s+$/g,"")},Mt=function(e){return"".concat(e.label," ").concat(e.value)};var Et={name:"1laao21-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap;"},At=function(e){return ie("span",o({css:Et},e))};function Rt(e){e.in,e.out,e.onExited,e.appear,e.enter,e.exit;var t=e.innerRef,n=(e.emotion,r(e,["in","out","onExited","appear","enter","exit","innerRef","emotion"]));return ie("input",o({ref:t},n,{css:oe({label:"dummyInput",background:0,border:0,fontSize:"inherit",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(0)"},"")}))}function Dt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=h(e);if(t){var o=h(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return d(this,n)}}var Vt=function(e){l(n,e);var t=Dt(n);function n(){return i(this,n),t.apply(this,arguments)}return s(n,[{key:"componentDidMount",value:function(){this.props.innerRef(Object(le.findDOMNode)(this))}},{key:"componentWillUnmount",value:function(){this.props.innerRef(null)}},{key:"render",value:function(){return this.props.children}}]),n}(m.Component),Lt=["boxSizing","height","overflow","paddingRight","position"],jt={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function Tt(e){e.preventDefault()}function _t(e){e.stopPropagation()}function Ft(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function Nt(){return"ontouchstart"in window||navigator.maxTouchPoints}function Ht(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=h(e);if(t){var o=h(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return d(this,n)}}var Ut=!(!window.document||!window.document.createElement),zt=0,Wt=function(e){l(n,e);var t=Ht(n);function n(){var e;i(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return(e=t.call.apply(t,[this].concat(o))).originalStyles={},e.listenerOptions={capture:!1,passive:!1},e}return s(n,[{key:"componentDidMount",value:function(){var e=this;if(Ut){var t=this.props,n=t.accountForScrollbars,r=t.touchScrollTarget,o=document.body,i=o&&o.style;if(n&&Lt.forEach((function(t){var n=i&&i[t];e.originalStyles[t]=n})),n&&zt<1){var a=parseInt(this.originalStyles.paddingRight,10)||0,s=document.body?document.body.clientWidth:0,u=window.innerWidth-s+a||0;Object.keys(jt).forEach((function(e){var t=jt[e];i&&(i[e]=t)})),i&&(i.paddingRight="".concat(u,"px"))}o&&Nt()&&(o.addEventListener("touchmove",Tt,this.listenerOptions),r&&(r.addEventListener("touchstart",Ft,this.listenerOptions),r.addEventListener("touchmove",_t,this.listenerOptions))),zt+=1}}},{key:"componentWillUnmount",value:function(){var e=this;if(Ut){var t=this.props,n=t.accountForScrollbars,r=t.touchScrollTarget,o=document.body,i=o&&o.style;zt=Math.max(zt-1,0),n&&zt<1&&Lt.forEach((function(t){var n=e.originalStyles[t];i&&(i[t]=n)})),o&&Nt()&&(o.removeEventListener("touchmove",Tt,this.listenerOptions),r&&(r.removeEventListener("touchstart",Ft,this.listenerOptions),r.removeEventListener("touchmove",_t,this.listenerOptions)))}}},{key:"render",value:function(){return null}}]),n}(m.Component);function Bt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=h(e);if(t){var o=h(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return d(this,n)}}Wt.defaultProps={accountForScrollbars:!0};var Gt={name:"1dsbpcp",styles:"position:fixed;left:0;bottom:0;right:0;top:0;"},Yt=function(e){l(n,e);var t=Bt(n);function n(){var e;i(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return(e=t.call.apply(t,[this].concat(o))).state={touchScrollTarget:null},e.getScrollTarget=function(t){t!==e.state.touchScrollTarget&&e.setState({touchScrollTarget:t})},e.blurSelectInput=function(){document.activeElement&&document.activeElement.blur()},e}return s(n,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.isEnabled,r=this.state.touchScrollTarget;return n?ie("div",null,ie("div",{onClick:this.blurSelectInput,css:Gt}),ie(Vt,{innerRef:this.getScrollTarget},t),r?ie(Wt,{touchScrollTarget:r}):null):t}}]),n}(m.PureComponent);function $t(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=h(e);if(t){var o=h(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return d(this,n)}}var qt=function(e){l(n,e);var t=$t(n);function n(){var e;i(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return(e=t.call.apply(t,[this].concat(o))).isBottom=!1,e.isTop=!1,e.scrollTarget=void 0,e.touchStart=void 0,e.cancelScroll=function(e){e.preventDefault(),e.stopPropagation()},e.handleEventDelta=function(t,n){var r=e.props,o=r.onBottomArrive,i=r.onBottomLeave,a=r.onTopArrive,s=r.onTopLeave,u=e.scrollTarget,l=u.scrollTop,c=u.scrollHeight,p=u.clientHeight,f=e.scrollTarget,d=n>0,h=c-p-l,m=!1;h>n&&e.isBottom&&(i&&i(t),e.isBottom=!1),d&&e.isTop&&(s&&s(t),e.isTop=!1),d&&n>h?(o&&!e.isBottom&&o(t),f.scrollTop=c,m=!0,e.isBottom=!0):!d&&-n>l&&(a&&!e.isTop&&a(t),f.scrollTop=0,m=!0,e.isTop=!0),m&&e.cancelScroll(t)},e.onWheel=function(t){e.handleEventDelta(t,t.deltaY)},e.onTouchStart=function(t){e.touchStart=t.changedTouches[0].clientY},e.onTouchMove=function(t){var n=e.touchStart-t.changedTouches[0].clientY;e.handleEventDelta(t,n)},e.getScrollTarget=function(t){e.scrollTarget=t},e}return s(n,[{key:"componentDidMount",value:function(){this.startListening(this.scrollTarget)}},{key:"componentWillUnmount",value:function(){this.stopListening(this.scrollTarget)}},{key:"startListening",value:function(e){e&&("function"==typeof e.addEventListener&&e.addEventListener("wheel",this.onWheel,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchmove",this.onTouchMove,!1))}},{key:"stopListening",value:function(e){e&&("function"==typeof e.removeEventListener&&e.removeEventListener("wheel",this.onWheel,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchmove",this.onTouchMove,!1))}},{key:"render",value:function(){return v.a.createElement(Vt,{innerRef:this.getScrollTarget},this.props.children)}}]),n}(m.Component);function Xt(e){var t=e.isEnabled,n=void 0===t||t,o=r(e,["isEnabled"]);return n?v.a.createElement(qt,o):o.children}var Kt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.isSearchable,r=t.isMulti,o=t.label,i=t.isDisabled,a=t.tabSelectsValue;switch(e){case"menu":return"Use Up and Down to choose options".concat(i?"":", press Enter to select the currently focused option",", press Escape to exit the menu").concat(a?", press Tab to select the option and exit the menu":"",".");case"input":return"".concat(o||"Select"," is focused ").concat(n?",type to refine list":"",", press Down to open the menu, ").concat(r?" press left to focus selected values":"");case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value"}},Jt=function(e,t){var n=t.value,r=t.isDisabled;if(n)switch(e){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(n,", deselected.");case"select-option":return"option ".concat(n,r?" is disabled. Select another option.":", selected.")}},Qt=function(e){return!!e.isDisabled};var Zt={clearIndicator:qe,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":null,pointerEvents:t?"none":null,position:"relative"}},control:function(e){var t=e.isDisabled,n=e.isFocused,r=e.theme,o=r.colors,i=r.borderRadius,a=r.spacing;return{label:"control",alignItems:"center",backgroundColor:t?o.neutral5:o.neutral0,borderColor:t?o.neutral10:n?o.primary:o.neutral20,borderRadius:i,borderStyle:"solid",borderWidth:1,boxShadow:n?"0 0 0 1px ".concat(o.primary):null,cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:a.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms","&:hover":{borderColor:n?o.primary:o.neutral30}}},dropdownIndicator:$e,group:function(e){var t=e.theme.spacing;return{paddingBottom:2*t.baseUnit,paddingTop:2*t.baseUnit}},groupHeading:function(e){var t=e.theme.spacing;return{label:"group",color:"#999",cursor:"default",display:"block",fontSize:"75%",fontWeight:"500",marginBottom:"0.25em",paddingLeft:3*t.baseUnit,paddingRight:3*t.baseUnit,textTransform:"uppercase"}},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing.baseUnit,o=n.colors;return{label:"indicatorSeparator",alignSelf:"stretch",backgroundColor:t?o.neutral10:o.neutral20,marginBottom:2*r,marginTop:2*r,width:1}},input:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,o=n.colors;return{margin:r.baseUnit/2,paddingBottom:r.baseUnit/2,paddingTop:r.baseUnit/2,visibility:t?"hidden":"visible",color:o.neutral80}},loadingIndicator:function(e){var t=e.isFocused,n=e.size,r=e.theme,o=r.colors,i=r.spacing.baseUnit;return{label:"loadingIndicator",color:t?o.neutral60:o.neutral20,display:"flex",padding:2*i,transition:"color 150ms",alignSelf:"center",fontSize:n,lineHeight:1,marginRight:n,textAlign:"center",verticalAlign:"middle"}},loadingMessage:Ve,menu:function(e){var t,n=e.placement,r=e.theme,o=r.borderRadius,i=r.spacing,a=r.colors;return ce(t={label:"menu"},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(n),"100%"),ce(t,"backgroundColor",a.neutral0),ce(t,"borderRadius",o),ce(t,"boxShadow","0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)"),ce(t,"marginBottom",i.menuGutter),ce(t,"marginTop",i.menuGutter),ce(t,"position","absolute"),ce(t,"width","100%"),ce(t,"zIndex",1),t},menuList:function(e){var t=e.maxHeight,n=e.theme.spacing.baseUnit;return{maxHeight:t,overflowY:"auto",paddingBottom:n,paddingTop:n,position:"relative",WebkitOverflowScrolling:"touch"}},menuPortal:function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},multiValue:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius;return{label:"multiValue",backgroundColor:t.colors.neutral10,borderRadius:r/2,display:"flex",margin:n.baseUnit/2,minWidth:0}},multiValueLabel:function(e){var t=e.theme,n=t.borderRadius,r=t.colors,o=e.cropWithEllipsis;return{borderRadius:n/2,color:r.neutral80,fontSize:"85%",overflow:"hidden",padding:3,paddingLeft:6,textOverflow:o?"ellipsis":null,whiteSpace:"nowrap"}},multiValueRemove:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius,o=t.colors;return{alignItems:"center",borderRadius:r/2,backgroundColor:e.isFocused&&o.dangerLight,display:"flex",paddingLeft:n.baseUnit,paddingRight:n.baseUnit,":hover":{backgroundColor:o.dangerLight,color:o.danger}}},noOptionsMessage:De,option:function(e){var t=e.isDisabled,n=e.isFocused,r=e.isSelected,o=e.theme,i=o.spacing,a=o.colors;return{label:"option",backgroundColor:r?a.primary:n?a.primary25:"transparent",color:t?a.neutral20:r?a.neutral0:"inherit",cursor:"default",display:"block",fontSize:"inherit",padding:"".concat(2*i.baseUnit,"px ").concat(3*i.baseUnit,"px"),width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",":active":{backgroundColor:!t&&(r?a.primary:a.primary50)}}},placeholder:function(e){var t=e.theme,n=t.spacing;return{label:"placeholder",color:t.colors.neutral50,marginLeft:n.baseUnit/2,marginRight:n.baseUnit/2,position:"absolute",top:"50%",transform:"translateY(-50%)"}},singleValue:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,o=n.colors;return{label:"singleValue",color:t?o.neutral40:o.neutral80,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2,maxWidth:"calc(100% - ".concat(2*r.baseUnit,"px)"),overflow:"hidden",position:"absolute",textOverflow:"ellipsis",whiteSpace:"nowrap",top:"50%",transform:"translateY(-50%)"}},valueContainer:function(e){var t=e.theme.spacing;return{alignItems:"center",display:"flex",flex:1,flexWrap:"wrap",padding:"".concat(t.baseUnit/2,"px ").concat(2*t.baseUnit,"px"),WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"}}};var en={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}};function tn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function nn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?tn(Object(n),!0).forEach((function(t){ce(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function rn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=h(e);if(t){var o=h(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return d(this,n)}}var on,an={backspaceRemovesValue:!0,blurInputOnSelect:Se(),captureMenuScroll:!Se(),closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){var n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Pt(Object(n),!0).forEach((function(t){ce(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({ignoreCase:!0,ignoreAccents:!0,stringify:Mt,trim:!0,matchFrom:"any"},on),r=n.ignoreCase,o=n.ignoreAccents,i=n.stringify,a=n.trim,s=n.matchFrom,u=a?It(t):t,l=a?It(i(e)):i(e);return r&&(u=u.toLowerCase(),l=l.toLowerCase()),o&&(u=kt(u),l=kt(l)),"start"===s?l.substr(0,u.length)===u:l.indexOf(u)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:Qt,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:"0",tabSelectsValue:!0},sn=1,un=function(e){l(n,e);var t=rn(n);function n(e){var r;i(this,n),(r=t.call(this,e)).state={ariaLiveSelection:"",ariaLiveContext:"",focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,menuOptions:{render:[],focusable:[]},selectValue:[]},r.blockOptionHover=!1,r.isComposing=!1,r.clearFocusValueOnUpdate=!1,r.commonProps=void 0,r.components=void 0,r.hasGroups=!1,r.initialTouchX=0,r.initialTouchY=0,r.inputIsHiddenAfterUpdate=void 0,r.instancePrefix="",r.openAfterFocus=!1,r.scrollToFocusedOptionOnUpdate=!1,r.userIsDragging=void 0,r.controlRef=null,r.getControlRef=function(e){r.controlRef=e},r.focusedOptionRef=null,r.getFocusedOptionRef=function(e){r.focusedOptionRef=e},r.menuListRef=null,r.getMenuListRef=function(e){r.menuListRef=e},r.inputRef=null,r.getInputRef=function(e){r.inputRef=e},r.cacheComponents=function(e){var t;r.components=(t={components:e},ct(ct({},pt),t.components))},r.focus=r.focusInput,r.blur=r.blurInput,r.onChange=function(e,t){var n=r.props,o=n.onChange,i=n.name;o(e,nn(nn({},t),{},{name:i}))},r.setValue=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"set-value",n=arguments.length>2?arguments[2]:void 0,o=r.props,i=o.closeMenuOnSelect,a=o.isMulti;r.onInputChange("",{action:"set-value"}),i&&(r.inputIsHiddenAfterUpdate=!a,r.onMenuClose()),r.clearFocusValueOnUpdate=!0,r.onChange(e,{action:t,option:n})},r.selectOption=function(e){var t=r.props,n=t.blurInputOnSelect,o=t.isMulti,i=r.state.selectValue;if(o)if(r.isOptionSelected(e,i)){var a=r.getOptionValue(e);r.setValue(i.filter((function(e){return r.getOptionValue(e)!==a})),"deselect-option",e),r.announceAriaLiveSelection({event:"deselect-option",context:{value:r.getOptionLabel(e)}})}else r.isOptionDisabled(e,i)?r.announceAriaLiveSelection({event:"select-option",context:{value:r.getOptionLabel(e),isDisabled:!0}}):(r.setValue([].concat(mt(i),[e]),"select-option",e),r.announceAriaLiveSelection({event:"select-option",context:{value:r.getOptionLabel(e)}}));else r.isOptionDisabled(e,i)?r.announceAriaLiveSelection({event:"select-option",context:{value:r.getOptionLabel(e),isDisabled:!0}}):(r.setValue(e,"select-option"),r.announceAriaLiveSelection({event:"select-option",context:{value:r.getOptionLabel(e)}}));n&&r.blurInput()},r.removeValue=function(e){var t=r.state.selectValue,n=r.getOptionValue(e),o=t.filter((function(e){return r.getOptionValue(e)!==n}));r.onChange(o.length?o:null,{action:"remove-value",removedValue:e}),r.announceAriaLiveSelection({event:"remove-value",context:{value:e?r.getOptionLabel(e):""}}),r.focusInput()},r.clearValue=function(){r.onChange(null,{action:"clear"})},r.popValue=function(){var e=r.state.selectValue,t=e[e.length-1],n=e.slice(0,e.length-1);r.announceAriaLiveSelection({event:"pop-value",context:{value:t?r.getOptionLabel(t):""}}),r.onChange(n.length?n:null,{action:"pop-value",removedValue:t})},r.getValue=function(){return r.state.selectValue},r.cx=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return ve.apply(void 0,[r.props.classNamePrefix].concat(t))},r.getOptionLabel=function(e){return r.props.getOptionLabel(e)},r.getOptionValue=function(e){return r.props.getOptionValue(e)},r.getStyles=function(e,t){var n=Zt[e](t);n.boxSizing="border-box";var o=r.props.styles[e];return o?o(n,t):n},r.getElementId=function(e){return"".concat(r.instancePrefix,"-").concat(e)},r.getActiveDescendentId=function(){var e=r.props.menuIsOpen,t=r.state,n=t.menuOptions,o=t.focusedOption;if(o&&e){var i=n.focusable.indexOf(o),a=n.render[i];return a&&a.key}},r.announceAriaLiveSelection=function(e){var t=e.event,n=e.context;r.setState({ariaLiveSelection:Jt(t,n)})},r.announceAriaLiveContext=function(e){var t=e.event,n=e.context;r.setState({ariaLiveContext:Kt(t,nn(nn({},n),{},{label:r.props["aria-label"]}))})},r.onMenuMouseDown=function(e){0===e.button&&(e.stopPropagation(),e.preventDefault(),r.focusInput())},r.onMenuMouseMove=function(e){r.blockOptionHover=!1},r.onControlMouseDown=function(e){var t=r.props.openMenuOnClick;r.state.isFocused?r.props.menuIsOpen?"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&r.onMenuClose():t&&r.openMenu("first"):(t&&(r.openAfterFocus=!0),r.focusInput()),"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&e.preventDefault()},r.onDropdownIndicatorMouseDown=function(e){if(!(e&&"mousedown"===e.type&&0!==e.button||r.props.isDisabled)){var t=r.props,n=t.isMulti,o=t.menuIsOpen;r.focusInput(),o?(r.inputIsHiddenAfterUpdate=!n,r.onMenuClose()):r.openMenu("first"),e.preventDefault(),e.stopPropagation()}},r.onClearIndicatorMouseDown=function(e){e&&"mousedown"===e.type&&0!==e.button||(r.clearValue(),e.stopPropagation(),r.openAfterFocus=!1,"touchend"===e.type?r.focusInput():setTimeout((function(){return r.focusInput()})))},r.onScroll=function(e){"boolean"==typeof r.props.closeMenuOnScroll?e.target instanceof HTMLElement&&ge(e.target)&&r.props.onMenuClose():"function"==typeof r.props.closeMenuOnScroll&&r.props.closeMenuOnScroll(e)&&r.props.onMenuClose()},r.onCompositionStart=function(){r.isComposing=!0},r.onCompositionEnd=function(){r.isComposing=!1},r.onTouchStart=function(e){var t=e.touches,n=t&&t.item(0);n&&(r.initialTouchX=n.clientX,r.initialTouchY=n.clientY,r.userIsDragging=!1)},r.onTouchMove=function(e){var t=e.touches,n=t&&t.item(0);if(n){var o=Math.abs(n.clientX-r.initialTouchX),i=Math.abs(n.clientY-r.initialTouchY);r.userIsDragging=o>5||i>5}},r.onTouchEnd=function(e){r.userIsDragging||(r.controlRef&&!r.controlRef.contains(e.target)&&r.menuListRef&&!r.menuListRef.contains(e.target)&&r.blurInput(),r.initialTouchX=0,r.initialTouchY=0)},r.onControlTouchEnd=function(e){r.userIsDragging||r.onControlMouseDown(e)},r.onClearIndicatorTouchEnd=function(e){r.userIsDragging||r.onClearIndicatorMouseDown(e)},r.onDropdownIndicatorTouchEnd=function(e){r.userIsDragging||r.onDropdownIndicatorMouseDown(e)},r.handleInputChange=function(e){var t=e.currentTarget.value;r.inputIsHiddenAfterUpdate=!1,r.onInputChange(t,{action:"input-change"}),r.props.menuIsOpen||r.onMenuOpen()},r.onInputFocus=function(e){var t=r.props,n=t.isSearchable,o=t.isMulti;r.props.onFocus&&r.props.onFocus(e),r.inputIsHiddenAfterUpdate=!1,r.announceAriaLiveContext({event:"input",context:{isSearchable:n,isMulti:o}}),r.setState({isFocused:!0}),(r.openAfterFocus||r.props.openMenuOnFocus)&&r.openMenu("first"),r.openAfterFocus=!1},r.onInputBlur=function(e){r.menuListRef&&r.menuListRef.contains(document.activeElement)?r.inputRef.focus():(r.props.onBlur&&r.props.onBlur(e),r.onInputChange("",{action:"input-blur"}),r.onMenuClose(),r.setState({focusedValue:null,isFocused:!1}))},r.onOptionHover=function(e){r.blockOptionHover||r.state.focusedOption===e||r.setState({focusedOption:e})},r.shouldHideSelectedOptions=function(){var e=r.props,t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},r.onKeyDown=function(e){var t=r.props,n=t.isMulti,o=t.backspaceRemovesValue,i=t.escapeClearsValue,a=t.inputValue,s=t.isClearable,u=t.isDisabled,l=t.menuIsOpen,c=t.onKeyDown,p=t.tabSelectsValue,f=t.openMenuOnFocus,d=r.state,h=d.focusedOption,m=d.focusedValue,v=d.selectValue;if(!(u||"function"==typeof c&&(c(e),e.defaultPrevented))){switch(r.blockOptionHover=!0,e.key){case"ArrowLeft":if(!n||a)return;r.focusValue("previous");break;case"ArrowRight":if(!n||a)return;r.focusValue("next");break;case"Delete":case"Backspace":if(a)return;if(m)r.removeValue(m);else{if(!o)return;n?r.popValue():s&&r.clearValue()}break;case"Tab":if(r.isComposing)return;if(e.shiftKey||!l||!p||!h||f&&r.isOptionSelected(h,v))return;r.selectOption(h);break;case"Enter":if(229===e.keyCode)break;if(l){if(!h)return;if(r.isComposing)return;r.selectOption(h);break}return;case"Escape":l?(r.inputIsHiddenAfterUpdate=!1,r.onInputChange("",{action:"menu-close"}),r.onMenuClose()):s&&i&&r.clearValue();break;case" ":if(a)return;if(!l){r.openMenu("first");break}if(!h)return;r.selectOption(h);break;case"ArrowUp":l?r.focusOption("up"):r.openMenu("last");break;case"ArrowDown":l?r.focusOption("down"):r.openMenu("first");break;case"PageUp":if(!l)return;r.focusOption("pageup");break;case"PageDown":if(!l)return;r.focusOption("pagedown");break;case"Home":if(!l)return;r.focusOption("first");break;case"End":if(!l)return;r.focusOption("last");break;default:return}e.preventDefault()}},r.buildMenuOptions=function(e,t){var n=e.inputValue,o=void 0===n?"":n,i=e.options,a=function(e,n){var i=r.isOptionDisabled(e,t),a=r.isOptionSelected(e,t),s=r.getOptionLabel(e),u=r.getOptionValue(e);if(!(r.shouldHideSelectedOptions()&&a||!r.filterOption({label:s,value:u,data:e},o))){var l=i?void 0:function(){return r.onOptionHover(e)},c=i?void 0:function(){return r.selectOption(e)},p="".concat(r.getElementId("option"),"-").concat(n);return{innerProps:{id:p,onClick:c,onMouseMove:l,onMouseOver:l,tabIndex:-1},data:e,isDisabled:i,isSelected:a,key:p,label:s,type:"option",value:u}}};return i.reduce((function(e,t,n){if(t.options){r.hasGroups||(r.hasGroups=!0);var o=t.options.map((function(t,r){var o=a(t,"".concat(n,"-").concat(r));return o&&e.focusable.push(t),o})).filter(Boolean);if(o.length){var i="".concat(r.getElementId("group"),"-").concat(n);e.render.push({type:"group",key:i,data:t,options:o})}}else{var s=a(t,"".concat(n));s&&(e.render.push(s),e.focusable.push(t))}return e}),{render:[],focusable:[]})};var o=e.value;r.cacheComponents=gt(r.cacheComponents,He).bind(f(r)),r.cacheComponents(e.components),r.instancePrefix="react-select-"+(r.props.instanceId||++sn);var a=be(o);r.buildMenuOptions=gt(r.buildMenuOptions,(function(e,t){var n=ht(e,2),r=n[0],o=n[1],i=ht(t,2),a=i[0];return o===i[1]&&r.inputValue===a.inputValue&&r.options===a.options})).bind(f(r));var s=e.menuIsOpen?r.buildMenuOptions(e,a):{render:[],focusable:[]};return r.state.menuOptions=s,r.state.selectValue=a,r}return s(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput()}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){var t=this.props,n=t.options,r=t.value,o=t.menuIsOpen,i=t.inputValue;if(this.cacheComponents(e.components),e.value!==r||e.options!==n||e.menuIsOpen!==o||e.inputValue!==i){var a=be(e.value),s=e.menuIsOpen?this.buildMenuOptions(e,a):{render:[],focusable:[]},u=this.getNextFocusedValue(a),l=this.getNextFocusedOption(s.focusable);this.setState({menuOptions:s,selectValue:a,focusedOption:l,focusedValue:u})}null!=this.inputIsHiddenAfterUpdate&&(this.setState({inputIsHidden:this.inputIsHiddenAfterUpdate}),delete this.inputIsHiddenAfterUpdate)}},{key:"componentDidUpdate",value:function(e){var t,n,r,o,i,a=this.props,s=a.isDisabled,u=a.menuIsOpen,l=this.state.isFocused;(l&&!s&&e.isDisabled||l&&u&&!e.menuIsOpen)&&this.focusInput(),l&&s&&!e.isDisabled&&this.setState({isFocused:!1},this.onMenuClose),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(t=this.menuListRef,n=this.focusedOptionRef,r=t.getBoundingClientRect(),o=n.getBoundingClientRect(),i=n.offsetHeight/3,o.bottom+i>r.bottom?Oe(t,Math.min(n.offsetTop+n.clientHeight-t.offsetHeight+i,t.scrollHeight)):o.top-i<r.top&&Oe(t,Math.max(n.offsetTop-i,0)),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){var e=this.props,t=e.isSearchable,n=e.isMulti;this.announceAriaLiveContext({event:"input",context:{isSearchable:t,isMulti:n}}),this.onInputChange("",{action:"menu-close"}),this.props.onMenuClose()}},{key:"onInputChange",value:function(e,t){this.props.onInputChange(e,t)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(e){var t=this,n=this.state,r=n.selectValue,o=n.isFocused,i=this.buildMenuOptions(this.props,r),a=this.props,s=a.isMulti,u=a.tabSelectsValue,l="first"===e?0:i.focusable.length-1;if(!s){var c=i.focusable.indexOf(r[0]);c>-1&&(l=c)}this.scrollToFocusedOptionOnUpdate=!(o&&this.menuListRef),this.inputIsHiddenAfterUpdate=!1,this.setState({menuOptions:i,focusedValue:null,focusedOption:i.focusable[l]},(function(){t.onMenuOpen(),t.announceAriaLiveContext({event:"menu",context:{tabSelectsValue:u}})}))}},{key:"focusValue",value:function(e){var t=this.props,n=t.isMulti,r=t.isSearchable,o=this.state,i=o.selectValue,a=o.focusedValue;if(n){this.setState({focusedOption:null});var s=i.indexOf(a);a||(s=-1,this.announceAriaLiveContext({event:"value"}));var u=i.length-1,l=-1;if(i.length){switch(e){case"previous":l=0===s?0:-1===s?u:s-1;break;case"next":s>-1&&s<u&&(l=s+1)}-1===l&&this.announceAriaLiveContext({event:"input",context:{isSearchable:r,isMulti:n}}),this.setState({inputIsHidden:-1!==l,focusedValue:i[l]})}}}},{key:"focusOption",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props,n=t.pageSize,r=t.tabSelectsValue,o=this.state,i=o.focusedOption,a=o.menuOptions,s=a.focusable;if(s.length){var u=0,l=s.indexOf(i);i||(l=-1,this.announceAriaLiveContext({event:"menu",context:{tabSelectsValue:r}})),"up"===e?u=l>0?l-1:s.length-1:"down"===e?u=(l+1)%s.length:"pageup"===e?(u=l-n)<0&&(u=0):"pagedown"===e?(u=l+n)>s.length-1&&(u=s.length-1):"last"===e&&(u=s.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:s[u],focusedValue:null}),this.announceAriaLiveContext({event:"menu",context:{isDisabled:Qt(s[u]),tabSelectsValue:r}})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(en):nn(nn({},en),this.props.theme):en}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,r=this.getValue,o=this.setValue,i=this.selectOption,a=this.props,s=a.isMulti,u=a.isRtl,l=a.options;return{cx:t,clearValue:e,getStyles:n,getValue:r,hasValue:this.hasValue(),isMulti:s,isRtl:u,options:l,selectOption:i,setValue:o,selectProps:a,theme:this.getTheme()}}},{key:"getNextFocusedValue",value:function(e){if(this.clearFocusValueOnUpdate)return this.clearFocusValueOnUpdate=!1,null;var t=this.state,n=t.focusedValue,r=t.selectValue.indexOf(n);if(r>-1){if(e.indexOf(n)>-1)return n;if(r<e.length)return e[r]}return null}},{key:"getNextFocusedOption",value:function(e){var t=this.state.focusedOption;return t&&e.indexOf(t)>-1?t:e[0]}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.state.menuOptions.render.length}},{key:"countOptions",value:function(){return this.state.menuOptions.focusable.length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return"function"==typeof this.props.isOptionDisabled&&this.props.isOptionDisabled(e,t)}},{key:"isOptionSelected",value:function(e,t){var n=this;if(t.indexOf(e)>-1)return!0;if("function"==typeof this.props.isOptionSelected)return this.props.isOptionSelected(e,t);var r=this.getOptionValue(e);return t.some((function(e){return n.getOptionValue(e)===r}))}},{key:"filterOption",value:function(e,t){return!this.props.filterOption||this.props.filterOption(e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"constructAriaLiveMessage",value:function(){var e=this.state,t=e.ariaLiveContext,n=e.selectValue,r=e.focusedValue,o=e.focusedOption,i=this.props,a=i.options,s=i.menuIsOpen,u=i.inputValue,l=i.screenReaderStatus,c=r?function(e){var t=e.focusedValue,n=e.getOptionLabel,r=e.selectValue;return"value ".concat(n(t)," focused, ").concat(r.indexOf(t)+1," of ").concat(r.length,".")}({focusedValue:r,getOptionLabel:this.getOptionLabel,selectValue:n}):"",p=o&&s?function(e){var t=e.focusedOption,n=e.getOptionLabel,r=e.options;return"option ".concat(n(t)," focused").concat(t.isDisabled?" disabled":"",", ").concat(r.indexOf(t)+1," of ").concat(r.length,".")}({focusedOption:o,getOptionLabel:this.getOptionLabel,options:a}):"",f=function(e){var t=e.inputValue,n=e.screenReaderMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}({inputValue:u,screenReaderMessage:l({count:this.countOptions()})});return"".concat(c," ").concat(p," ").concat(f," ").concat(t)}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,r=e.inputId,i=e.inputValue,a=e.tabIndex,s=e.form,u=this.components.Input,l=this.state.inputIsHidden,c=r||this.getElementId("input"),p={"aria-autocomplete":"list","aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"]};if(!n)return v.a.createElement(Rt,o({id:c,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:he,onFocus:this.onInputFocus,readOnly:!0,disabled:t,tabIndex:a,form:s,value:""},p));var f=this.commonProps,d=f.cx,h=f.theme,m=f.selectProps;return v.a.createElement(u,o({autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",cx:d,getStyles:this.getStyles,id:c,innerRef:this.getInputRef,isDisabled:t,isHidden:l,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,selectProps:m,spellCheck:"false",tabIndex:a,form:s,theme:h,type:"text",value:i},p))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.components,n=t.MultiValue,r=t.MultiValueContainer,i=t.MultiValueLabel,a=t.MultiValueRemove,s=t.SingleValue,u=t.Placeholder,l=this.commonProps,c=this.props,p=c.controlShouldRenderValue,f=c.isDisabled,d=c.isMulti,h=c.inputValue,m=c.placeholder,b=this.state,g=b.selectValue,y=b.focusedValue,O=b.isFocused;if(!this.hasValue()||!p)return h?null:v.a.createElement(u,o({},l,{key:"placeholder",isDisabled:f,isFocused:O}),m);if(d)return g.map((function(t,s){var u=t===y;return v.a.createElement(n,o({},l,{components:{Container:r,Label:i,Remove:a},isFocused:u,isDisabled:f,key:"".concat(e.getOptionValue(t)).concat(s),index:s,removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault(),e.stopPropagation()}},data:t}),e.formatOptionLabel(t,"value"))}));if(h)return null;var x=g[0];return v.a.createElement(s,o({},l,{data:x,isDisabled:f}),this.formatOptionLabel(x,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.components.ClearIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,i=n.isLoading,a=this.state.isFocused;if(!this.isClearable()||!e||r||!this.hasValue()||i)return null;var s={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return v.a.createElement(e,o({},t,{innerProps:s,isFocused:a}))}},{key:"renderLoadingIndicator",value:function(){var e=this.components.LoadingIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,i=n.isLoading,a=this.state.isFocused;if(!e||!i)return null;return v.a.createElement(e,o({},t,{innerProps:{"aria-hidden":"true"},isDisabled:r,isFocused:a}))}},{key:"renderIndicatorSeparator",value:function(){var e=this.components,t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var r=this.commonProps,i=this.props.isDisabled,a=this.state.isFocused;return v.a.createElement(n,o({},r,{isDisabled:i,isFocused:a}))}},{key:"renderDropdownIndicator",value:function(){var e=this.components.DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,r=this.state.isFocused,i={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return v.a.createElement(e,o({},t,{innerProps:i,isDisabled:n,isFocused:r}))}},{key:"renderMenu",value:function(){var e=this,t=this.components,n=t.Group,i=t.GroupHeading,a=t.Menu,s=t.MenuList,u=t.MenuPortal,l=t.LoadingMessage,c=t.NoOptionsMessage,p=t.Option,f=this.commonProps,d=this.state,h=d.focusedOption,m=d.menuOptions,b=this.props,g=b.captureMenuScroll,y=b.inputValue,O=b.isLoading,x=b.loadingMessage,w=b.minMenuHeight,S=b.maxMenuHeight,C=b.menuIsOpen,k=b.menuPlacement,P=b.menuPosition,I=b.menuPortalTarget,M=b.menuShouldBlockScroll,E=b.menuShouldScrollIntoView,A=b.noOptionsMessage,R=b.onMenuScrollToTop,D=b.onMenuScrollToBottom;if(!C)return null;var V,L=function(t){var n=h===t.data;return t.innerRef=n?e.getFocusedOptionRef:void 0,v.a.createElement(p,o({},f,t,{isFocused:n}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())V=m.render.map((function(t){if("group"===t.type){t.type;var a=r(t,["type"]),s="".concat(t.key,"-heading");return v.a.createElement(n,o({},f,a,{Heading:i,headingProps:{id:s,data:t.data},label:e.formatGroupLabel(t.data)}),t.options.map((function(e){return L(e)})))}if("option"===t.type)return L(t)}));else if(O){var j=x({inputValue:y});if(null===j)return null;V=v.a.createElement(l,f,j)}else{var T=A({inputValue:y});if(null===T)return null;V=v.a.createElement(c,f,T)}var _={minMenuHeight:w,maxMenuHeight:S,menuPlacement:k,menuPosition:P,menuShouldScrollIntoView:E},F=v.a.createElement(Ae,o({},f,_),(function(t){var n=t.ref,r=t.placerProps,i=r.placement,u=r.maxHeight;return v.a.createElement(a,o({},f,_,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:O,placement:i}),v.a.createElement(Xt,{isEnabled:g,onTopArrive:R,onBottomArrive:D},v.a.createElement(Yt,{isEnabled:M},v.a.createElement(s,o({},f,{innerRef:e.getMenuListRef,isLoading:O,maxHeight:u}),V))))}));return I||"fixed"===P?v.a.createElement(u,o({},f,{appendTo:I,controlElement:this.controlRef,menuPlacement:k,menuPosition:P}),F):F}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,r=t.isDisabled,o=t.isMulti,i=t.name,a=this.state.selectValue;if(i&&!r){if(o){if(n){var s=a.map((function(t){return e.getOptionValue(t)})).join(n);return v.a.createElement("input",{name:i,type:"hidden",value:s})}var u=a.length>0?a.map((function(t,n){return v.a.createElement("input",{key:"i-".concat(n),name:i,type:"hidden",value:e.getOptionValue(t)})})):v.a.createElement("input",{name:i,type:"hidden"});return v.a.createElement("div",null,u)}var l=a[0]?this.getOptionValue(a[0]):"";return v.a.createElement("input",{name:i,type:"hidden",value:l})}}},{key:"renderLiveRegion",value:function(){return this.state.isFocused?v.a.createElement(At,{"aria-live":"polite"},v.a.createElement("span",{id:"aria-selection-event"}," ",this.state.ariaLiveSelection),v.a.createElement("span",{id:"aria-context"}," ",this.constructAriaLiveMessage())):null}},{key:"render",value:function(){var e=this.components,t=e.Control,n=e.IndicatorsContainer,r=e.SelectContainer,i=e.ValueContainer,a=this.props,s=a.className,u=a.id,l=a.isDisabled,c=a.menuIsOpen,p=this.state.isFocused,f=this.commonProps=this.getCommonProps();return v.a.createElement(r,o({},f,{className:s,innerProps:{id:u,onKeyDown:this.onKeyDown},isDisabled:l,isFocused:p}),this.renderLiveRegion(),v.a.createElement(t,o({},f,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:l,isFocused:p,menuIsOpen:c}),v.a.createElement(i,o({},f,{isDisabled:l}),this.renderPlaceholderOrValue(),this.renderInput()),v.a.createElement(n,o({},f,{isDisabled:l}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}]),n}(m.Component);un.defaultProps=an;n("qEaO");function ln(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=h(e);if(t){var o=h(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return d(this,n)}}var cn={defaultInputValue:"",defaultMenuIsOpen:!1,defaultValue:null};function pn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=h(e);if(t){var o=h(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return d(this,n)}}var fn,dn,hn,mn={cacheOptions:!1,defaultOptions:!1,filterOption:null,isLoading:!1},vn=function(e){var t,n;return n=t=function(t){l(a,t);var n=pn(a);function a(e){var t;return i(this,a),(t=n.call(this)).select=void 0,t.lastRequest=void 0,t.mounted=!1,t.optionsCache={},t.handleInputChange=function(e,n){var r=t.props,o=r.cacheOptions,i=function(e,t,n){if(n){var r=n(e,t);if("string"==typeof r)return r}return e}(e,n,r.onInputChange);if(!i)return delete t.lastRequest,void t.setState({inputValue:"",loadedInputValue:"",loadedOptions:[],isLoading:!1,passEmptyOptions:!1});if(o&&t.optionsCache[i])t.setState({inputValue:i,loadedInputValue:i,loadedOptions:t.optionsCache[i],isLoading:!1,passEmptyOptions:!1});else{var a=t.lastRequest={};t.setState({inputValue:i,isLoading:!0,passEmptyOptions:!t.state.loadedInputValue},(function(){t.loadOptions(i,(function(e){t.mounted&&(e&&(t.optionsCache[i]=e),a===t.lastRequest&&(delete t.lastRequest,t.setState({isLoading:!1,loadedInputValue:i,loadedOptions:e||[],passEmptyOptions:!1})))}))}))}return i},t.state={defaultOptions:Array.isArray(e.defaultOptions)?e.defaultOptions:void 0,inputValue:void 0!==e.inputValue?e.inputValue:"",isLoading:!0===e.defaultOptions,loadedOptions:[],passEmptyOptions:!1},t}return s(a,[{key:"componentDidMount",value:function(){var e=this;this.mounted=!0;var t=this.props.defaultOptions,n=this.state.inputValue;!0===t&&this.loadOptions(n,(function(t){if(e.mounted){var n=!!e.lastRequest;e.setState({defaultOptions:t||[],isLoading:n})}}))}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){e.cacheOptions!==this.props.cacheOptions&&(this.optionsCache={}),e.defaultOptions!==this.props.defaultOptions&&this.setState({defaultOptions:Array.isArray(e.defaultOptions)?e.defaultOptions:void 0})}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"focus",value:function(){this.select.focus()}},{key:"blur",value:function(){this.select.blur()}},{key:"loadOptions",value:function(e,t){var n=this.props.loadOptions;if(!n)return t();var r=n(e,t);r&&"function"==typeof r.then&&r.then(t,(function(){return t()}))}},{key:"render",value:function(){var t=this,n=this.props,i=(n.loadOptions,n.isLoading),a=r(n,["loadOptions","isLoading"]),s=this.state,u=s.defaultOptions,l=s.inputValue,c=s.isLoading,p=s.loadedInputValue,f=s.loadedOptions,d=s.passEmptyOptions?[]:l&&p?f:u||[];return v.a.createElement(e,o({},a,{ref:function(e){t.select=e},options:d,isLoading:c||i,onInputChange:this.handleInputChange}))}}]),a}(m.Component),t.defaultProps=mn,n},bn=(fn=un,hn=dn=function(e){l(n,e);var t=ln(n);function n(){var e;i(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return(e=t.call.apply(t,[this].concat(o))).select=void 0,e.state={inputValue:void 0!==e.props.inputValue?e.props.inputValue:e.props.defaultInputValue,menuIsOpen:void 0!==e.props.menuIsOpen?e.props.menuIsOpen:e.props.defaultMenuIsOpen,value:void 0!==e.props.value?e.props.value:e.props.defaultValue},e.onChange=function(t,n){e.callProp("onChange",t,n),e.setState({value:t})},e.onInputChange=function(t,n){var r=e.callProp("onInputChange",t,n);e.setState({inputValue:void 0!==r?r:t})},e.onMenuOpen=function(){e.callProp("onMenuOpen"),e.setState({menuIsOpen:!0})},e.onMenuClose=function(){e.callProp("onMenuClose"),e.setState({menuIsOpen:!1})},e}return s(n,[{key:"focus",value:function(){this.select.focus()}},{key:"blur",value:function(){this.select.blur()}},{key:"getProp",value:function(e){return void 0!==this.props[e]?this.props[e]:this.state[e]}},{key:"callProp",value:function(e){if("function"==typeof this.props[e]){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return(t=this.props)[e].apply(t,r)}}},{key:"render",value:function(){var e=this,t=this.props,n=(t.defaultInputValue,t.defaultMenuIsOpen,t.defaultValue,r(t,["defaultInputValue","defaultMenuIsOpen","defaultValue"]));return v.a.createElement(fn,o({},n,{ref:function(t){e.select=t},inputValue:this.getProp("inputValue"),menuIsOpen:this.getProp("menuIsOpen"),onChange:this.onChange,onInputChange:this.onInputChange,onMenuClose:this.onMenuClose,onMenuOpen:this.onMenuOpen,value:this.getProp("value")}))}}]),n}(m.Component),dn.defaultProps=cn,hn),gn=vn(bn);t.default=gn},dsmI:function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.default=e.exports,e.exports.__esModule=!0},fAcX:function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.default=e.exports,e.exports.__esModule=!0},j3CM:function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},e.exports.default=e.exports,e.exports.__esModule=!0},lqYr:function(e,t,n){var r=n("CNnH");e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,r(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0},org3:function(e,t,n){var r=n("j3CM");e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}},e.exports.default=e.exports,e.exports.__esModule=!0},qEaO:function(e,t){e.exports=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))},e.exports.default=e.exports,e.exports.__esModule=!0}}]);
 
dist/35.js ADDED
@@ -0,0 +1 @@
 
1
+ (window.itsecWebpackJsonP=window.itsecWebpackJsonP||[]).push([[35],{Bnag:function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},EbDI:function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.__esModule=!0,e.exports.default=e.exports},FUBA:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n("cDcd"),a=u(i),s=u(n("17x9"));function u(e){return e&&e.__esModule?e:{default:e}}var c={position:"absolute",top:0,left:0,visibility:"hidden",height:0,overflow:"scroll",whiteSpace:"pre"},l=["extraWidth","injectStyles","inputClassName","inputRef","inputStyle","minWidth","onAutosize","placeholderIsMinWidth"],p=function(e,t){t.style.fontSize=e.fontSize,t.style.fontFamily=e.fontFamily,t.style.fontWeight=e.fontWeight,t.style.fontStyle=e.fontStyle,t.style.letterSpacing=e.letterSpacing,t.style.textTransform=e.textTransform},f=!("undefined"==typeof window||!window.navigator)&&/MSIE |Trident\/|Edge\//.test(window.navigator.userAgent),d=function(){return f?"_"+Math.random().toString(36).substr(2,12):void 0},h=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.inputRef=function(e){n.input=e,"function"==typeof n.props.inputRef&&n.props.inputRef(e)},n.placeHolderSizerRef=function(e){n.placeHolderSizer=e},n.sizerRef=function(e){n.sizer=e},n.state={inputWidth:e.minWidth,inputId:e.id||d(),prevId:e.id},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,null,[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.id;return n!==t.prevId?{inputId:n||d(),prevId:n}:null}}]),o(t,[{key:"componentDidMount",value:function(){this.mounted=!0,this.copyInputStyles(),this.updateInputWidth()}},{key:"componentDidUpdate",value:function(e,t){t.inputWidth!==this.state.inputWidth&&"function"==typeof this.props.onAutosize&&this.props.onAutosize(this.state.inputWidth),this.updateInputWidth()}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"copyInputStyles",value:function(){if(this.mounted&&window.getComputedStyle){var e=this.input&&window.getComputedStyle(this.input);e&&(p(e,this.sizer),this.placeHolderSizer&&p(e,this.placeHolderSizer))}}},{key:"updateInputWidth",value:function(){if(this.mounted&&this.sizer&&void 0!==this.sizer.scrollWidth){var e=void 0;e=this.props.placeholder&&(!this.props.value||this.props.value&&this.props.placeholderIsMinWidth)?Math.max(this.sizer.scrollWidth,this.placeHolderSizer.scrollWidth)+2:this.sizer.scrollWidth+2,(e+="number"===this.props.type&&void 0===this.props.extraWidth?16:parseInt(this.props.extraWidth)||0)<this.props.minWidth&&(e=this.props.minWidth),e!==this.state.inputWidth&&this.setState({inputWidth:e})}}},{key:"getInput",value:function(){return this.input}},{key:"focus",value:function(){this.input.focus()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"renderStyles",value:function(){var e=this.props.injectStyles;return f&&e?a.default.createElement("style",{dangerouslySetInnerHTML:{__html:"input#"+this.state.inputId+"::-ms-clear {display: none;}"}}):null}},{key:"render",value:function(){var e=[this.props.defaultValue,this.props.value,""].reduce((function(e,t){return null!=e?e:t})),t=r({},this.props.style);t.display||(t.display="inline-block");var n=r({boxSizing:"content-box",width:this.state.inputWidth+"px"},this.props.inputStyle),o=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(this.props,[]);return function(e){l.forEach((function(t){return delete e[t]}))}(o),o.className=this.props.inputClassName,o.id=this.state.inputId,o.style=n,a.default.createElement("div",{className:this.props.className,style:t},this.renderStyles(),a.default.createElement("input",r({},o,{ref:this.inputRef})),a.default.createElement("div",{ref:this.sizerRef,style:c},e),this.props.placeholder?a.default.createElement("div",{ref:this.placeHolderSizerRef,style:c},this.props.placeholder):null)}}]),t}(i.Component);h.propTypes={className:s.default.string,defaultValue:s.default.any,extraWidth:s.default.oneOfType([s.default.number,s.default.string]),id:s.default.string,injectStyles:s.default.bool,inputClassName:s.default.string,inputRef:s.default.func,inputStyle:s.default.object,minWidth:s.default.oneOfType([s.default.number,s.default.string]),onAutosize:s.default.func,onChange:s.default.func,placeholder:s.default.string,placeholderIsMinWidth:s.default.bool,style:s.default.object,value:s.default.any},h.defaultProps={minWidth:1,injectStyles:!0},t.default=h},Ijbi:function(e,t,n){var r=n("WkPL");e.exports=function(e){if(Array.isArray(e))return r(e)},e.exports.__esModule=!0,e.exports.default=e.exports},J4zp:function(e,t,n){var r=n("wTVA"),o=n("m0LI"),i=n("ZhPi"),a=n("wkBT");e.exports=function(e,t){return r(e)||o(e,t)||i(e,t)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},PJYZ:function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.__esModule=!0,e.exports.default=e.exports},QDav:function(e,t,n){"use strict";n.r(t),n.d(t,"defaultProps",(function(){return an})),n.d(t,"makeAsyncSelect",(function(){return sn}));var r=n("zLVn");function o(e,t){if(null==e)return{};var n,o,i=Object(r.a)(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var i=n("wx14");n("J4zp"),n("RIqP"),n("lSNA");function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t,n){return t&&s(e.prototype,t),n&&s(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}n("PJYZ");var c=n("s4An");function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Object(c.a)(e,t)}function p(e){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function d(e,t){if(t&&("object"===p(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return f(e)}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var m=n("cDcd"),v=n.n(m),b=n("dI71");var g=function(){function e(e){this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.before=null}var t=e.prototype;return t.insert=function(e){if(this.ctr%(this.isSpeedy?65e3:1)==0){var t,n=function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t}(this);t=0===this.tags.length?this.before:this.tags[this.tags.length-1].nextSibling,this.container.insertBefore(n,t),this.tags.push(n)}var r=this.tags[this.tags.length-1];if(this.isSpeedy){var o=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(r);try{var i=105===e.charCodeAt(1)&&64===e.charCodeAt(0);o.insertRule(e,i?0:o.cssRules.length)}catch(e){0}}else r.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){return e.parentNode.removeChild(e)})),this.tags=[],this.ctr=0},e}();var y=function(e){function t(e,t,r){var o=t.trim().split(h);t=o;var i=o.length,a=e.length;switch(a){case 0:case 1:var s=0;for(e=0===a?"":e[0]+" ";s<i;++s)t[s]=n(e,t[s],r).trim();break;default:var u=s=0;for(t=[];s<i;++s)for(var c=0;c<a;++c)t[u++]=n(e[c]+" ",o[s],r).trim()}return t}function n(e,t,n){var r=t.charCodeAt(0);switch(33>r&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(m,"$1"+e.trim());case 58:return e.trim()+t.replace(m,"$1"+e.trim());default:if(0<1*n&&0<t.indexOf("\f"))return t.replace(m,(58===e.charCodeAt(0)?"":"$1")+e.trim())}return e+t}function r(e,t,n,i){var a=e+";",s=2*t+3*n+4*i;if(944===s){e=a.indexOf(":",9)+1;var u=a.substring(e,a.length-1).trim();return u=a.substring(0,e).trim()+u+";",1===j||2===j&&o(u,1)?"-webkit-"+u+u:u}if(0===j||2===j&&!o(a,1))return a;switch(s){case 1015:return 97===a.charCodeAt(10)?"-webkit-"+a+a:a;case 951:return 116===a.charCodeAt(3)?"-webkit-"+a+a:a;case 963:return 110===a.charCodeAt(5)?"-webkit-"+a+a:a;case 1009:if(100!==a.charCodeAt(4))break;case 969:case 942:return"-webkit-"+a+a;case 978:return"-webkit-"+a+"-moz-"+a+a;case 1019:case 983:return"-webkit-"+a+"-moz-"+a+"-ms-"+a+a;case 883:if(45===a.charCodeAt(8))return"-webkit-"+a+a;if(0<a.indexOf("image-set(",11))return a.replace(C,"$1-webkit-$2")+a;break;case 932:if(45===a.charCodeAt(4))switch(a.charCodeAt(5)){case 103:return"-webkit-box-"+a.replace("-grow","")+"-webkit-"+a+"-ms-"+a.replace("grow","positive")+a;case 115:return"-webkit-"+a+"-ms-"+a.replace("shrink","negative")+a;case 98:return"-webkit-"+a+"-ms-"+a.replace("basis","preferred-size")+a}return"-webkit-"+a+"-ms-"+a+a;case 964:return"-webkit-"+a+"-ms-flex-"+a+a;case 1023:if(99!==a.charCodeAt(8))break;return"-webkit-box-pack"+(u=a.substring(a.indexOf(":",15)).replace("flex-","").replace("space-between","justify"))+"-webkit-"+a+"-ms-flex-pack"+u+a;case 1005:return f.test(a)?a.replace(p,":-webkit-")+a.replace(p,":-moz-")+a:a;case 1e3:switch(t=(u=a.substring(13).trim()).indexOf("-")+1,u.charCodeAt(0)+u.charCodeAt(t)){case 226:u=a.replace(y,"tb");break;case 232:u=a.replace(y,"tb-rl");break;case 220:u=a.replace(y,"lr");break;default:return a}return"-webkit-"+a+"-ms-"+u+a;case 1017:if(-1===a.indexOf("sticky",9))break;case 975:switch(t=(a=e).length-10,s=(u=(33===a.charCodeAt(t)?a.substring(0,t):a).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|u.charCodeAt(7))){case 203:if(111>u.charCodeAt(8))break;case 115:a=a.replace(u,"-webkit-"+u)+";"+a;break;case 207:case 102:a=a.replace(u,"-webkit-"+(102<s?"inline-":"")+"box")+";"+a.replace(u,"-webkit-"+u)+";"+a.replace(u,"-ms-"+u+"box")+";"+a}return a+";";case 938:if(45===a.charCodeAt(5))switch(a.charCodeAt(6)){case 105:return u=a.replace("-items",""),"-webkit-"+a+"-webkit-box-"+u+"-ms-flex-"+u+a;case 115:return"-webkit-"+a+"-ms-flex-item-"+a.replace(x,"")+a;default:return"-webkit-"+a+"-ms-flex-line-pack"+a.replace("align-content","").replace(x,"")+a}break;case 973:case 989:if(45!==a.charCodeAt(3)||122===a.charCodeAt(4))break;case 931:case 953:if(!0===k.test(e))return 115===(u=e.substring(e.indexOf(":")+1)).charCodeAt(0)?r(e.replace("stretch","fill-available"),t,n,i).replace(":fill-available",":stretch"):a.replace(u,"-webkit-"+u)+a.replace(u,"-moz-"+u.replace("fill-",""))+a;break;case 962:if(a="-webkit-"+a+(102===a.charCodeAt(5)?"-ms-"+a:"")+a,211===n+i&&105===a.charCodeAt(13)&&0<a.indexOf("transform",10))return a.substring(0,a.indexOf(";",27)+1).replace(d,"$1-webkit-$2")+a}return a}function o(e,t){var n=e.indexOf(1===t?":":"{"),r=e.substring(0,3!==t?n:10);return n=e.substring(n+1,e.length-1),D(2!==t?r:r.replace(S,"$1"),n,t)}function i(e,t){var n=r(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return n!==t+";"?n.replace(w," or ($1)").substring(4):"("+t+")"}function a(e,t,n,r,o,i,a,s,c,l){for(var p,f=0,d=t;f<V;++f)switch(p=A[f].call(u,e,d,n,r,o,i,a,s,c,l)){case void 0:case!1:case!0:case null:break;default:d=p}if(d!==t)return d}function s(e){return void 0!==(e=e.prefix)&&(D=null,e?"function"!=typeof e?j=1:(j=2,D=e):j=0),s}function u(e,n){var s=e;if(33>s.charCodeAt(0)&&(s=s.trim()),s=[s],0<V){var u=a(-1,n,s,s,I,P,0,0,0,0);void 0!==u&&"string"==typeof u&&(n=u)}var p=function e(n,s,u,p,f){for(var d,h,m,y,w,x=0,S=0,k=0,C=0,A=0,D=0,R=m=d=0,T=0,F=0,N=0,_=0,H=u.length,U=H-1,z="",W="",B="",Y="";T<H;){if(h=u.charCodeAt(T),T===U&&0!==S+C+k+x&&(0!==S&&(h=47===S?10:47),C=k=x=0,H++,U++),0===S+C+k+x){if(T===U&&(0<F&&(z=z.replace(l,"")),0<z.trim().length)){switch(h){case 32:case 9:case 59:case 13:case 10:break;default:z+=u.charAt(T)}h=59}switch(h){case 123:for(d=(z=z.trim()).charCodeAt(0),m=1,_=++T;T<H;){switch(h=u.charCodeAt(T)){case 123:m++;break;case 125:m--;break;case 47:switch(h=u.charCodeAt(T+1)){case 42:case 47:e:{for(R=T+1;R<U;++R)switch(u.charCodeAt(R)){case 47:if(42===h&&42===u.charCodeAt(R-1)&&T+2!==R){T=R+1;break e}break;case 10:if(47===h){T=R+1;break e}}T=R}}break;case 91:h++;case 40:h++;case 34:case 39:for(;T++<U&&u.charCodeAt(T)!==h;);}if(0===m)break;T++}switch(m=u.substring(_,T),0===d&&(d=(z=z.replace(c,"").trim()).charCodeAt(0)),d){case 64:switch(0<F&&(z=z.replace(l,"")),h=z.charCodeAt(1)){case 100:case 109:case 115:case 45:F=s;break;default:F=M}if(_=(m=e(s,F,m,h,f+1)).length,0<V&&(w=a(3,m,F=t(M,z,N),s,I,P,_,h,f,p),z=F.join(""),void 0!==w&&0===(_=(m=w.trim()).length)&&(h=0,m="")),0<_)switch(h){case 115:z=z.replace(O,i);case 100:case 109:case 45:m=z+"{"+m+"}";break;case 107:m=(z=z.replace(v,"$1 $2"))+"{"+m+"}",m=1===j||2===j&&o("@"+m,3)?"@-webkit-"+m+"@"+m:"@"+m;break;default:m=z+m,112===p&&(W+=m,m="")}else m="";break;default:m=e(s,t(s,z,N),m,p,f+1)}B+=m,m=N=F=R=d=0,z="",h=u.charCodeAt(++T);break;case 125:case 59:if(1<(_=(z=(0<F?z.replace(l,""):z).trim()).length))switch(0===R&&(d=z.charCodeAt(0),45===d||96<d&&123>d)&&(_=(z=z.replace(" ",":")).length),0<V&&void 0!==(w=a(1,z,s,n,I,P,W.length,p,f,p))&&0===(_=(z=w.trim()).length)&&(z="\0\0"),d=z.charCodeAt(0),h=z.charCodeAt(1),d){case 0:break;case 64:if(105===h||99===h){Y+=z+u.charAt(T);break}default:58!==z.charCodeAt(_-1)&&(W+=r(z,d,h,z.charCodeAt(2)))}N=F=R=d=0,z="",h=u.charCodeAt(++T)}}switch(h){case 13:case 10:47===S?S=0:0===1+d&&107!==p&&0<z.length&&(F=1,z+="\0"),0<V*L&&a(0,z,s,n,I,P,W.length,p,f,p),P=1,I++;break;case 59:case 125:if(0===S+C+k+x){P++;break}default:switch(P++,y=u.charAt(T),h){case 9:case 32:if(0===C+x+S)switch(A){case 44:case 58:case 9:case 32:y="";break;default:32!==h&&(y=" ")}break;case 0:y="\\0";break;case 12:y="\\f";break;case 11:y="\\v";break;case 38:0===C+S+x&&(F=N=1,y="\f"+y);break;case 108:if(0===C+S+x+E&&0<R)switch(T-R){case 2:112===A&&58===u.charCodeAt(T-3)&&(E=A);case 8:111===D&&(E=D)}break;case 58:0===C+S+x&&(R=T);break;case 44:0===S+k+C+x&&(F=1,y+="\r");break;case 34:case 39:0===S&&(C=C===h?0:0===C?h:C);break;case 91:0===C+S+k&&x++;break;case 93:0===C+S+k&&x--;break;case 41:0===C+S+x&&k--;break;case 40:if(0===C+S+x){if(0===d)switch(2*A+3*D){case 533:break;default:d=1}k++}break;case 64:0===S+k+C+x+R+m&&(m=1);break;case 42:case 47:if(!(0<C+x+k))switch(S){case 0:switch(2*h+3*u.charCodeAt(T+1)){case 235:S=47;break;case 220:_=T,S=42}break;case 42:47===h&&42===A&&_+2!==T&&(33===u.charCodeAt(_+2)&&(W+=u.substring(_,T+1)),y="",S=0)}}0===S&&(z+=y)}D=A,A=h,T++}if(0<(_=W.length)){if(F=s,0<V&&(void 0!==(w=a(2,W,F,n,I,P,_,p,f,p))&&0===(W=w).length))return Y+W+B;if(W=F.join(",")+"{"+W+"}",0!=j*E){switch(2!==j||o(W,2)||(E=0),E){case 111:W=W.replace(g,":-moz-$1")+W;break;case 112:W=W.replace(b,"::-webkit-input-$1")+W.replace(b,"::-moz-$1")+W.replace(b,":-ms-input-$1")+W}E=0}}return Y+W+B}(M,s,n,0,0);return 0<V&&(void 0!==(u=a(-2,p,s,s,I,P,p.length,0,0,0))&&(p=u)),"",E=0,P=I=1,p}var c=/^\0+/g,l=/[\0\r\f]/g,p=/: */g,f=/zoo|gra/,d=/([,: ])(transform)/g,h=/,\r+?/g,m=/([\t\r\n ])*\f?&/g,v=/@(k\w+)\s*(\S*)\s*/,b=/::(place)/g,g=/:(read-only)/g,y=/[svh]\w+-[tblr]{2}/,O=/\(\s*(.*)\s*\)/g,w=/([\s\S]*?);/g,x=/-self|flex-/g,S=/[^]*?(:[rp][el]a[\w-]+)[^]*/,k=/stretch|:\s*\w+\-(?:conte|avail)/,C=/([^-])(image-set\()/,P=1,I=1,E=0,j=1,M=[],A=[],V=0,D=null,L=0;return u.use=function e(t){switch(t){case void 0:case null:V=A.length=0;break;default:if("function"==typeof t)A[V++]=t;else if("object"==typeof t)for(var n=0,r=t.length;n<r;++n)e(t[n]);else L=0|!!t}return e},u.set=s,void 0!==e&&s(e),u};n("gRFL");function O(e){e&&w.current.insert(e+"}")}var w={current:null},x=function(e,t,n,r,o,i,a,s,u,c){switch(e){case 1:switch(t.charCodeAt(0)){case 64:return w.current.insert(t+";"),"";case 108:if(98===t.charCodeAt(2))return""}break;case 2:if(0===s)return t+"/*|*/";break;case 3:switch(s){case 102:case 112:return w.current.insert(n[0]+t),"";default:return t+(0===c?"/*|*/":"")}case-2:t.split("/*|*/}").forEach(O)}},S=function(e){void 0===e&&(e={});var t,n=e.key||"css";void 0!==e.prefix&&(t={prefix:e.prefix});var r=new y(t);var o,i={};o=e.container||document.head;var a,s=document.querySelectorAll("style[data-emotion-"+n+"]");Array.prototype.forEach.call(s,(function(e){e.getAttribute("data-emotion-"+n).split(" ").forEach((function(e){i[e]=!0})),e.parentNode!==o&&o.appendChild(e)})),r.use(e.stylisPlugins)(x),a=function(e,t,n,o){var i=t.name;w.current=n,r(e,t.styles),o&&(u.inserted[i]=!0)};var u={key:n,sheet:new g({key:n,container:o,nonce:e.nonce,speedy:e.speedy}),nonce:e.nonce,inserted:i,registered:{},insert:a};return u};n("VbXa");function k(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]):r+=n+" "})),r}var C=function(e,t,n){var r=e.key+"-"+t.name;if(!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles),void 0===e.inserted[t.name]){var o=t;do{e.insert("."+r,o,e.sheet,!0);o=o.next}while(void 0!==o)}},P=n("zpY+"),I=n("ME5O"),E=n("4qRI"),j=/[A-Z]|^ms/g,M=/_EMO_([^_]+?)_([^]*?)_EMO_/g,A=function(e){return 45===e.charCodeAt(1)},V=function(e){return null!=e&&"boolean"!=typeof e},D=Object(E.a)((function(e){return A(e)?e:e.replace(j,"-$&").toLowerCase()})),L=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(M,(function(e,t,n){return T={name:t,styles:n,next:T},t}))}return 1===I.a[e]||A(e)||"number"!=typeof t||0===t?t:t+"px"};function R(e,t,n,r){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return T={name:n.name,styles:n.styles,next:T},n.name;if(void 0!==n.styles){var o=n.next;if(void 0!==o)for(;void 0!==o;)T={name:o.name,styles:o.styles,next:T},o=o.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=R(e,t,n[o],!1);else for(var i in n){var a=n[i];if("object"!=typeof a)null!=t&&void 0!==t[a]?r+=i+"{"+t[a]+"}":V(a)&&(r+=D(i)+":"+L(i,a)+";");else if(!Array.isArray(a)||"string"!=typeof a[0]||null!=t&&void 0!==t[a[0]]){var s=R(e,t,a,!1);switch(i){case"animation":case"animationName":r+=D(i)+":"+s+";";break;default:r+=i+"{"+s+"}"}}else for(var u=0;u<a.length;u++)V(a[u])&&(r+=D(i)+":"+L(i,a[u])+";")}return r}(e,t,n);case"function":if(void 0!==e){var i=T,a=n(e);return T=i,R(e,t,a,r)}break;case"string":}if(null==t)return n;var s=t[n];return void 0===s||r?n:s}var T,F=/label:\s*([^\s;\n{]+)\s*;/g;var N=function(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,o="";T=void 0;var i=e[0];null==i||void 0===i.raw?(r=!1,o+=R(n,t,i,!1)):o+=i[0];for(var a=1;a<e.length;a++)o+=R(n,t,e[a],46===o.charCodeAt(o.length-1)),r&&(o+=i[a]);F.lastIndex=0;for(var s,u="";null!==(s=F.exec(o));)u+="-"+s[1];return{name:Object(P.a)(o)+u,styles:o,next:T}},_=Object.prototype.hasOwnProperty,H=Object(m.createContext)("undefined"!=typeof HTMLElement?S():null),U=Object(m.createContext)({}),z=(H.Provider,function(e){var t=function(t,n){return Object(m.createElement)(H.Consumer,null,(function(r){return e(t,r,n)}))};return Object(m.forwardRef)(t)}),W="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",B=function(e,t){var n={};for(var r in t)_.call(t,r)&&(n[r]=t[r]);return n[W]=e,n},Y=function(){return null},$=function(e,t,n,r){var o=null===n?t.css:t.css(n);"string"==typeof o&&void 0!==e.registered[o]&&(o=e.registered[o]);var i=t[W],a=[o],s="";"string"==typeof t.className?s=k(e.registered,a,t.className):null!=t.className&&(s=t.className+" ");var u=N(a);C(e,u,"string"==typeof i);s+=e.key+"-"+u.name;var c={};for(var l in t)_.call(t,l)&&"css"!==l&&l!==W&&(c[l]=t[l]);c.ref=r,c.className=s;var p=Object(m.createElement)(i,c),f=Object(m.createElement)(Y,null);return Object(m.createElement)(m.Fragment,null,f,p)},G=z((function(e,t,n){return"function"==typeof e.css?Object(m.createElement)(U.Consumer,null,(function(r){return $(t,e,r,n)})):$(t,e,null,n)}));var q=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return N(t)},X=function(e,t){var n=arguments;if(null==t||!_.call(t,"css"))return m.createElement.apply(void 0,n);var r=n.length,o=new Array(r);o[0]=G,o[1]=B(e,t);for(var i=2;i<r;i++)o[i]=n[i];return m.createElement.apply(null,o)},J=(m.Component,function e(t){for(var n=t.length,r=0,o="";r<n;r++){var i=t[r];if(null!=i){var a=void 0;switch(typeof i){case"boolean":break;case"object":if(Array.isArray(i))a=e(i);else for(var s in a="",i)i[s]&&s&&(a&&(a+=" "),a+=s);break;default:a=i}a&&(o&&(o+=" "),o+=a)}}return o});function Z(e,t,n){var r=[],o=k(e,r,n);return r.length<2?n:o+t(r)}var K=function(){return null},Q=z((function(e,t){return Object(m.createElement)(U.Consumer,null,(function(n){var r=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var o=N(n,t.registered);return C(t,o,!1),t.key+"-"+o.name},o={css:r,cx:function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return Z(t.registered,r,J(n))},theme:n},i=e.children(o);var a=Object(m.createElement)(K,null);return Object(m.createElement)(m.Fragment,null,a,i)}))})),ee=n("faye");n("cDf5");function te(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ne=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return N(t)};var re=n("FUBA"),oe=n.n(re),ie=function(){};function ae(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function se(e,t,n){var r=[n];if(t&&e)for(var o in t)t.hasOwnProperty(o)&&t[o]&&r.push("".concat(ae(e,o)));return r.filter((function(e){return e})).map((function(e){return String(e).trim()})).join(" ")}var ue=function(e){return Array.isArray(e)?e.filter(Boolean):"object"===p(e)&&null!==e?[e]:[]};function ce(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function le(e){return ce(e)?window.pageYOffset:e.scrollTop}function pe(e,t){ce(e)?window.scrollTo(0,t):e.scrollTop=t}function fe(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function de(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:ie,o=le(e),i=t-o,a=10,s=0;function u(){var t=fe(s+=a,o,i,n);pe(e,t),s<n?window.requestAnimationFrame(u):r(e)}u()}function he(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}function me(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ve(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?me(Object(n),!0).forEach((function(t){te(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):me(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function be(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=h(e);if(t){var o=h(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return d(this,n)}}function ge(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,o=e.placement,i=e.shouldScroll,a=e.isFixedPosition,s=e.theme.spacing,u=function(e){var t=getComputedStyle(e),n="absolute"===t.position,r=/(auto|scroll)/,o=document.documentElement;if("fixed"===t.position)return o;for(var i=e;i=i.parentElement;)if(t=getComputedStyle(i),(!n||"static"!==t.position)&&r.test(t.overflow+t.overflowY+t.overflowX))return i;return o}(n),c={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return c;var l=u.getBoundingClientRect().height,p=n.getBoundingClientRect(),f=p.bottom,d=p.height,h=p.top,m=n.offsetParent.getBoundingClientRect().top,v=window.innerHeight,b=le(u),g=parseInt(getComputedStyle(n).marginBottom,10),y=parseInt(getComputedStyle(n).marginTop,10),O=m-y,w=v-h,x=O+b,S=l-b-h,k=f-v+b+g,C=b+h-y;switch(o){case"auto":case"bottom":if(w>=d)return{placement:"bottom",maxHeight:t};if(S>=d&&!a)return i&&de(u,k,160),{placement:"bottom",maxHeight:t};if(!a&&S>=r||a&&w>=r)return i&&de(u,k,160),{placement:"bottom",maxHeight:a?w-g:S-g};if("auto"===o||a){var P=t,I=a?O:x;return I>=r&&(P=Math.min(I-g-s.controlHeight,t)),{placement:"top",maxHeight:P}}if("bottom"===o)return pe(u,k),{placement:"bottom",maxHeight:t};break;case"top":if(O>=d)return{placement:"top",maxHeight:t};if(x>=d&&!a)return i&&de(u,C,160),{placement:"top",maxHeight:t};if(!a&&x>=r||a&&O>=r){var E=t;return(!a&&x>=r||a&&O>=r)&&(E=a?O-y:x-y),i&&de(u,C,160),{placement:"top",maxHeight:E}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return c}var ye=function(e){return"auto"===e?"bottom":e},Oe=Object(m.createContext)({getPortalPlacement:null}),we=function(e){l(n,e);var t=be(n);function n(){var e;a(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return(e=t.call.apply(t,[this].concat(o))).state={maxHeight:e.props.maxMenuHeight,placement:null},e.getPlacement=function(t){var n=e.props,r=n.minMenuHeight,o=n.maxMenuHeight,i=n.menuPlacement,a=n.menuPosition,s=n.menuShouldScrollIntoView,u=n.theme;if(t){var c="fixed"===a,l=ge({maxHeight:o,menuEl:t,minHeight:r,placement:i,shouldScroll:s&&!c,isFixedPosition:c,theme:u}),p=e.context.getPortalPlacement;p&&p(l),e.setState(l)}},e.getUpdatedProps=function(){var t=e.props.menuPlacement,n=e.state.placement||ye(t);return ve(ve({},e.props),{},{placement:n,maxHeight:e.state.maxHeight})},e}return u(n,[{key:"render",value:function(){return(0,this.props.children)({ref:this.getPlacement,placerProps:this.getUpdatedProps()})}}]),n}(m.Component);we.contextType=Oe;var xe=function(e){var t=e.theme,n=t.spacing.baseUnit;return{color:t.colors.neutral40,padding:"".concat(2*n,"px ").concat(3*n,"px"),textAlign:"center"}},Se=xe,ke=xe,Ce=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return X("div",Object(i.a)({css:o("noOptionsMessage",e),className:r({"menu-notice":!0,"menu-notice--no-options":!0},n)},a),t)};Ce.defaultProps={children:"No options"};var Pe=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return X("div",Object(i.a)({css:o("loadingMessage",e),className:r({"menu-notice":!0,"menu-notice--loading":!0},n)},a),t)};Pe.defaultProps={children:"Loading..."};var Ie=function(e){l(n,e);var t=be(n);function n(){var e;a(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return(e=t.call.apply(t,[this].concat(o))).state={placement:null},e.getPortalPlacement=function(t){var n=t.placement;n!==ye(e.props.menuPlacement)&&e.setState({placement:n})},e}return u(n,[{key:"render",value:function(){var e=this.props,t=e.appendTo,n=e.children,r=e.controlElement,o=e.menuPlacement,i=e.menuPosition,a=e.getStyles,s="fixed"===i;if(!t&&!s||!r)return null;var u=this.state.placement||ye(o),c=function(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}(r),l=s?0:window.pageYOffset,p=c[u]+l,f=X("div",{css:a("menuPortal",{offset:p,position:i,rect:c})},n);return X(Oe.Provider,{value:{getPortalPlacement:this.getPortalPlacement}},t?Object(ee.createPortal)(f,t):f)}}]),n}(m.Component),Ee=Array.isArray,je=Object.keys,Me=Object.prototype.hasOwnProperty;function Ae(e,t){try{return function e(t,n){if(t===n)return!0;if(t&&n&&"object"==p(t)&&"object"==p(n)){var r,o,i,a=Ee(t),s=Ee(n);if(a&&s){if((o=t.length)!=n.length)return!1;for(r=o;0!=r--;)if(!e(t[r],n[r]))return!1;return!0}if(a!=s)return!1;var u=t instanceof Date,c=n instanceof Date;if(u!=c)return!1;if(u&&c)return t.getTime()==n.getTime();var l=t instanceof RegExp,f=n instanceof RegExp;if(l!=f)return!1;if(l&&f)return t.toString()==n.toString();var d=je(t);if((o=d.length)!==je(n).length)return!1;for(r=o;0!=r--;)if(!Me.call(n,d[r]))return!1;for(r=o;0!=r--;)if(!("_owner"===(i=d[r])&&t.$$typeof||e(t[i],n[i])))return!1;return!0}return t!=t&&n!=n}(e,t)}catch(e){if(e.message&&e.message.match(/stack|recursion/i))return console.warn("Warning: react-fast-compare does not handle circular references.",e.name,e.message),!1;throw e}}function Ve(){var e,t,n=(e=["\n 0%, 80%, 100% { opacity: 0; }\n 40% { opacity: 1; }\n"],t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}})));return Ve=function(){return n},n}var De={name:"19bqh2r",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0;"},Le=function(e){var t=e.size,n=o(e,["size"]);return X("svg",Object(i.a)({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:De},n))},Re=function(e){return X(Le,Object(i.a)({size:20},e),X("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},Te=function(e){return X(Le,Object(i.a)({size:20},e),X("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},Fe=function(e){var t=e.isFocused,n=e.theme,r=n.spacing.baseUnit,o=n.colors;return{label:"indicatorContainer",color:t?o.neutral60:o.neutral20,display:"flex",padding:2*r,transition:"color 150ms",":hover":{color:t?o.neutral80:o.neutral40}}},Ne=Fe,_e=Fe,He=function(){var e=q.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}(Ve()),Ue=function(e){var t=e.delay,n=e.offset;return X("span",{css:ne({animation:"".concat(He," 1s ease-in-out ").concat(t,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":null,height:"1em",verticalAlign:"top",width:"1em"},"")})},ze=function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerProps,a=e.isRtl;return X("div",Object(i.a)({},o,{css:r("loadingIndicator",e),className:n({indicator:!0,"loading-indicator":!0},t)}),X(Ue,{delay:0,offset:a}),X(Ue,{delay:160,offset:!0}),X(Ue,{delay:320,offset:!a}))};ze.defaultProps={size:4};function We(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Be(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?We(Object(n),!0).forEach((function(t){te(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):We(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ye(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function $e(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ye(Object(n),!0).forEach((function(t){te(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ye(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ge=function(e){return{label:"input",background:0,border:0,fontSize:"inherit",opacity:e?0:1,outline:0,padding:0,color:"inherit"}};function qe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Xe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qe(Object(n),!0).forEach((function(t){te(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Je=function(e){var t=e.children,n=e.innerProps;return X("div",n,t)},Ze=Je,Ke=Je;var Qe=function(e){var t=e.children,n=e.className,r=e.components,o=e.cx,i=e.data,a=e.getStyles,s=e.innerProps,u=e.isDisabled,c=e.removeProps,l=e.selectProps,p=r.Container,f=r.Label,d=r.Remove;return X(Q,null,(function(r){var h=r.css,m=r.cx;return X(p,{data:i,innerProps:Xe(Xe({},s),{},{className:m(h(a("multiValue",e)),o({"multi-value":!0,"multi-value--is-disabled":u},n))}),selectProps:l},X(f,{data:i,innerProps:{className:m(h(a("multiValueLabel",e)),o({"multi-value__label":!0},n))},selectProps:l},t),X(d,{data:i,innerProps:Xe({className:m(h(a("multiValueRemove",e)),o({"multi-value__remove":!0},n))},c),selectProps:l}))}))};Qe.defaultProps={cropWithEllipsis:!0};function et(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function tt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?et(Object(n),!0).forEach((function(t){te(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):et(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var nt={ClearIndicator:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return X("div",Object(i.a)({},a,{css:o("clearIndicator",e),className:r({indicator:!0,"clear-indicator":!0},n)}),t||X(Re,null))},Control:function(e){var t=e.children,n=e.cx,r=e.getStyles,o=e.className,a=e.isDisabled,s=e.isFocused,u=e.innerRef,c=e.innerProps,l=e.menuIsOpen;return X("div",Object(i.a)({ref:u,css:r("control",e),className:n({control:!0,"control--is-disabled":a,"control--is-focused":s,"control--menu-is-open":l},o)},c),t)},DropdownIndicator:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return X("div",Object(i.a)({},a,{css:o("dropdownIndicator",e),className:r({indicator:!0,"dropdown-indicator":!0},n)}),t||X(Te,null))},DownChevron:Te,CrossIcon:Re,Group:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.Heading,s=e.headingProps,u=e.label,c=e.theme,l=e.selectProps;return X("div",{css:o("group",e),className:r({group:!0},n)},X(a,Object(i.a)({},s,{selectProps:l,theme:c,getStyles:o,cx:r}),u),X("div",null,t))},GroupHeading:function(e){var t=e.className,n=e.cx,r=e.getStyles,a=e.theme,s=(e.selectProps,o(e,["className","cx","getStyles","theme","selectProps"]));return X("div",Object(i.a)({css:r("groupHeading",Be({theme:a},s)),className:n({"group-heading":!0},t)},s))},IndicatorsContainer:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles;return X("div",{css:o("indicatorsContainer",e),className:r({indicators:!0},n)},t)},IndicatorSeparator:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerProps;return X("span",Object(i.a)({},o,{css:r("indicatorSeparator",e),className:n({"indicator-separator":!0},t)}))},Input:function(e){var t=e.className,n=e.cx,r=e.getStyles,a=e.innerRef,s=e.isHidden,u=e.isDisabled,c=e.theme,l=(e.selectProps,o(e,["className","cx","getStyles","innerRef","isHidden","isDisabled","theme","selectProps"]));return X("div",{css:r("input",$e({theme:c},l))},X(oe.a,Object(i.a)({className:n({input:!0},t),inputRef:a,inputStyle:Ge(s),disabled:u},l)))},LoadingIndicator:ze,Menu:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerRef,s=e.innerProps;return X("div",Object(i.a)({css:o("menu",e),className:r({menu:!0},n)},s,{ref:a}),t)},MenuList:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.isMulti,s=e.innerRef,u=e.innerProps;return X("div",Object(i.a)({css:o("menuList",e),className:r({"menu-list":!0,"menu-list--is-multi":a},n),ref:s},u),t)},MenuPortal:Ie,LoadingMessage:Pe,NoOptionsMessage:Ce,MultiValue:Qe,MultiValueContainer:Ze,MultiValueLabel:Ke,MultiValueRemove:function(e){var t=e.children,n=e.innerProps;return X("div",n,t||X(Re,{size:14}))},Option:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.isDisabled,s=e.isFocused,u=e.isSelected,c=e.innerRef,l=e.innerProps;return X("div",Object(i.a)({css:o("option",e),className:r({option:!0,"option--is-disabled":a,"option--is-focused":s,"option--is-selected":u},n),ref:c},l),t)},Placeholder:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return X("div",Object(i.a)({css:o("placeholder",e),className:r({placeholder:!0},n)},a),t)},SelectContainer:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps,s=e.isDisabled,u=e.isRtl;return X("div",Object(i.a)({css:o("container",e),className:r({"--is-disabled":s,"--is-rtl":u},n)},a),t)},SingleValue:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.isDisabled,s=e.innerProps;return X("div",Object(i.a)({css:o("singleValue",e),className:r({"single-value":!0,"single-value--is-disabled":a},n)},s),t)},ValueContainer:function(e){var t=e.children,n=e.className,r=e.cx,o=e.isMulti,i=e.getStyles,a=e.hasValue;return X("div",{css:i("valueContainer",e),className:r({"value-container":!0,"value-container--is-multi":o,"value-container--has-value":a},n)},t)}};function rt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ot(e,t){if(e){if("string"==typeof e)return rt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?rt(e,t):void 0}}function it(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e,t)||ot(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function at(e){return function(e){if(Array.isArray(e))return rt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||ot(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var st=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function ut(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(r=e[n],o=t[n],!(r===o||st(r)&&st(o)))return!1;var r,o;return!0}for(var ct=function(e,t){var n;void 0===t&&(t=ut);var r,o=[],i=!1;return function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];return i&&n===this&&t(a,o)||(r=e.apply(this,a),i=!0,n=this,o=a),r}},lt=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],pt=new RegExp("["+lt.map((function(e){return e.letters})).join("")+"]","g"),ft={},dt=0;dt<lt.length;dt++)for(var ht=lt[dt],mt=0;mt<ht.letters.length;mt++)ft[ht.letters[mt]]=ht.base;var vt=function(e){return e.replace(pt,(function(e){return ft[e]}))};function bt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var gt=function(e){return e.replace(/^\s+|\s+$/g,"")},yt=function(e){return"".concat(e.label," ").concat(e.value)};var Ot={name:"1laao21-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap;"},wt=function(e){return X("span",Object(i.a)({css:Ot},e))};function xt(e){e.in,e.out,e.onExited,e.appear,e.enter,e.exit;var t=e.innerRef,n=(e.emotion,o(e,["in","out","onExited","appear","enter","exit","innerRef","emotion"]));return X("input",Object(i.a)({ref:t},n,{css:ne({label:"dummyInput",background:0,border:0,fontSize:"inherit",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(0)"},"")}))}function St(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=h(e);if(t){var o=h(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return d(this,n)}}var kt=function(e){l(n,e);var t=St(n);function n(){return a(this,n),t.apply(this,arguments)}return u(n,[{key:"componentDidMount",value:function(){this.props.innerRef(Object(ee.findDOMNode)(this))}},{key:"componentWillUnmount",value:function(){this.props.innerRef(null)}},{key:"render",value:function(){return this.props.children}}]),n}(m.Component),Ct=["boxSizing","height","overflow","paddingRight","position"],Pt={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function It(e){e.preventDefault()}function Et(e){e.stopPropagation()}function jt(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function Mt(){return"ontouchstart"in window||navigator.maxTouchPoints}function At(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=h(e);if(t){var o=h(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return d(this,n)}}var Vt=!(!window.document||!window.document.createElement),Dt=0,Lt=function(e){l(n,e);var t=At(n);function n(){var e;a(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return(e=t.call.apply(t,[this].concat(o))).originalStyles={},e.listenerOptions={capture:!1,passive:!1},e}return u(n,[{key:"componentDidMount",value:function(){var e=this;if(Vt){var t=this.props,n=t.accountForScrollbars,r=t.touchScrollTarget,o=document.body,i=o&&o.style;if(n&&Ct.forEach((function(t){var n=i&&i[t];e.originalStyles[t]=n})),n&&Dt<1){var a=parseInt(this.originalStyles.paddingRight,10)||0,s=document.body?document.body.clientWidth:0,u=window.innerWidth-s+a||0;Object.keys(Pt).forEach((function(e){var t=Pt[e];i&&(i[e]=t)})),i&&(i.paddingRight="".concat(u,"px"))}o&&Mt()&&(o.addEventListener("touchmove",It,this.listenerOptions),r&&(r.addEventListener("touchstart",jt,this.listenerOptions),r.addEventListener("touchmove",Et,this.listenerOptions))),Dt+=1}}},{key:"componentWillUnmount",value:function(){var e=this;if(Vt){var t=this.props,n=t.accountForScrollbars,r=t.touchScrollTarget,o=document.body,i=o&&o.style;Dt=Math.max(Dt-1,0),n&&Dt<1&&Ct.forEach((function(t){var n=e.originalStyles[t];i&&(i[t]=n)})),o&&Mt()&&(o.removeEventListener("touchmove",It,this.listenerOptions),r&&(r.removeEventListener("touchstart",jt,this.listenerOptions),r.removeEventListener("touchmove",Et,this.listenerOptions)))}}},{key:"render",value:function(){return null}}]),n}(m.Component);function Rt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=h(e);if(t){var o=h(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return d(this,n)}}Lt.defaultProps={accountForScrollbars:!0};var Tt={name:"1dsbpcp",styles:"position:fixed;left:0;bottom:0;right:0;top:0;"},Ft=function(e){l(n,e);var t=Rt(n);function n(){var e;a(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return(e=t.call.apply(t,[this].concat(o))).state={touchScrollTarget:null},e.getScrollTarget=function(t){t!==e.state.touchScrollTarget&&e.setState({touchScrollTarget:t})},e.blurSelectInput=function(){document.activeElement&&document.activeElement.blur()},e}return u(n,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.isEnabled,r=this.state.touchScrollTarget;return n?X("div",null,X("div",{onClick:this.blurSelectInput,css:Tt}),X(kt,{innerRef:this.getScrollTarget},t),r?X(Lt,{touchScrollTarget:r}):null):t}}]),n}(m.PureComponent);function Nt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=h(e);if(t){var o=h(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return d(this,n)}}var _t=function(e){l(n,e);var t=Nt(n);function n(){var e;a(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return(e=t.call.apply(t,[this].concat(o))).isBottom=!1,e.isTop=!1,e.scrollTarget=void 0,e.touchStart=void 0,e.cancelScroll=function(e){e.preventDefault(),e.stopPropagation()},e.handleEventDelta=function(t,n){var r=e.props,o=r.onBottomArrive,i=r.onBottomLeave,a=r.onTopArrive,s=r.onTopLeave,u=e.scrollTarget,c=u.scrollTop,l=u.scrollHeight,p=u.clientHeight,f=e.scrollTarget,d=n>0,h=l-p-c,m=!1;h>n&&e.isBottom&&(i&&i(t),e.isBottom=!1),d&&e.isTop&&(s&&s(t),e.isTop=!1),d&&n>h?(o&&!e.isBottom&&o(t),f.scrollTop=l,m=!0,e.isBottom=!0):!d&&-n>c&&(a&&!e.isTop&&a(t),f.scrollTop=0,m=!0,e.isTop=!0),m&&e.cancelScroll(t)},e.onWheel=function(t){e.handleEventDelta(t,t.deltaY)},e.onTouchStart=function(t){e.touchStart=t.changedTouches[0].clientY},e.onTouchMove=function(t){var n=e.touchStart-t.changedTouches[0].clientY;e.handleEventDelta(t,n)},e.getScrollTarget=function(t){e.scrollTarget=t},e}return u(n,[{key:"componentDidMount",value:function(){this.startListening(this.scrollTarget)}},{key:"componentWillUnmount",value:function(){this.stopListening(this.scrollTarget)}},{key:"startListening",value:function(e){e&&("function"==typeof e.addEventListener&&e.addEventListener("wheel",this.onWheel,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchmove",this.onTouchMove,!1))}},{key:"stopListening",value:function(e){e&&("function"==typeof e.removeEventListener&&e.removeEventListener("wheel",this.onWheel,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchmove",this.onTouchMove,!1))}},{key:"render",value:function(){return v.a.createElement(kt,{innerRef:this.getScrollTarget},this.props.children)}}]),n}(m.Component);function Ht(e){var t=e.isEnabled,n=void 0===t||t,r=o(e,["isEnabled"]);return n?v.a.createElement(_t,r):r.children}var Ut=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.isSearchable,r=t.isMulti,o=t.label,i=t.isDisabled,a=t.tabSelectsValue;switch(e){case"menu":return"Use Up and Down to choose options".concat(i?"":", press Enter to select the currently focused option",", press Escape to exit the menu").concat(a?", press Tab to select the option and exit the menu":"",".");case"input":return"".concat(o||"Select"," is focused ").concat(n?",type to refine list":"",", press Down to open the menu, ").concat(r?" press left to focus selected values":"");case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value"}},zt=function(e,t){var n=t.value,r=t.isDisabled;if(n)switch(e){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(n,", deselected.");case"select-option":return"option ".concat(n,r?" is disabled. Select another option.":", selected.")}},Wt=function(e){return!!e.isDisabled};var Bt={clearIndicator:_e,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":null,pointerEvents:t?"none":null,position:"relative"}},control:function(e){var t=e.isDisabled,n=e.isFocused,r=e.theme,o=r.colors,i=r.borderRadius,a=r.spacing;return{label:"control",alignItems:"center",backgroundColor:t?o.neutral5:o.neutral0,borderColor:t?o.neutral10:n?o.primary:o.neutral20,borderRadius:i,borderStyle:"solid",borderWidth:1,boxShadow:n?"0 0 0 1px ".concat(o.primary):null,cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:a.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms","&:hover":{borderColor:n?o.primary:o.neutral30}}},dropdownIndicator:Ne,group:function(e){var t=e.theme.spacing;return{paddingBottom:2*t.baseUnit,paddingTop:2*t.baseUnit}},groupHeading:function(e){var t=e.theme.spacing;return{label:"group",color:"#999",cursor:"default",display:"block",fontSize:"75%",fontWeight:"500",marginBottom:"0.25em",paddingLeft:3*t.baseUnit,paddingRight:3*t.baseUnit,textTransform:"uppercase"}},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing.baseUnit,o=n.colors;return{label:"indicatorSeparator",alignSelf:"stretch",backgroundColor:t?o.neutral10:o.neutral20,marginBottom:2*r,marginTop:2*r,width:1}},input:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,o=n.colors;return{margin:r.baseUnit/2,paddingBottom:r.baseUnit/2,paddingTop:r.baseUnit/2,visibility:t?"hidden":"visible",color:o.neutral80}},loadingIndicator:function(e){var t=e.isFocused,n=e.size,r=e.theme,o=r.colors,i=r.spacing.baseUnit;return{label:"loadingIndicator",color:t?o.neutral60:o.neutral20,display:"flex",padding:2*i,transition:"color 150ms",alignSelf:"center",fontSize:n,lineHeight:1,marginRight:n,textAlign:"center",verticalAlign:"middle"}},loadingMessage:ke,menu:function(e){var t,n=e.placement,r=e.theme,o=r.borderRadius,i=r.spacing,a=r.colors;return te(t={label:"menu"},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(n),"100%"),te(t,"backgroundColor",a.neutral0),te(t,"borderRadius",o),te(t,"boxShadow","0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)"),te(t,"marginBottom",i.menuGutter),te(t,"marginTop",i.menuGutter),te(t,"position","absolute"),te(t,"width","100%"),te(t,"zIndex",1),t},menuList:function(e){var t=e.maxHeight,n=e.theme.spacing.baseUnit;return{maxHeight:t,overflowY:"auto",paddingBottom:n,paddingTop:n,position:"relative",WebkitOverflowScrolling:"touch"}},menuPortal:function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},multiValue:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius;return{label:"multiValue",backgroundColor:t.colors.neutral10,borderRadius:r/2,display:"flex",margin:n.baseUnit/2,minWidth:0}},multiValueLabel:function(e){var t=e.theme,n=t.borderRadius,r=t.colors,o=e.cropWithEllipsis;return{borderRadius:n/2,color:r.neutral80,fontSize:"85%",overflow:"hidden",padding:3,paddingLeft:6,textOverflow:o?"ellipsis":null,whiteSpace:"nowrap"}},multiValueRemove:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius,o=t.colors;return{alignItems:"center",borderRadius:r/2,backgroundColor:e.isFocused&&o.dangerLight,display:"flex",paddingLeft:n.baseUnit,paddingRight:n.baseUnit,":hover":{backgroundColor:o.dangerLight,color:o.danger}}},noOptionsMessage:Se,option:function(e){var t=e.isDisabled,n=e.isFocused,r=e.isSelected,o=e.theme,i=o.spacing,a=o.colors;return{label:"option",backgroundColor:r?a.primary:n?a.primary25:"transparent",color:t?a.neutral20:r?a.neutral0:"inherit",cursor:"default",display:"block",fontSize:"inherit",padding:"".concat(2*i.baseUnit,"px ").concat(3*i.baseUnit,"px"),width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",":active":{backgroundColor:!t&&(r?a.primary:a.primary50)}}},placeholder:function(e){var t=e.theme,n=t.spacing;return{label:"placeholder",color:t.colors.neutral50,marginLeft:n.baseUnit/2,marginRight:n.baseUnit/2,position:"absolute",top:"50%",transform:"translateY(-50%)"}},singleValue:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,o=n.colors;return{label:"singleValue",color:t?o.neutral40:o.neutral80,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2,maxWidth:"calc(100% - ".concat(2*r.baseUnit,"px)"),overflow:"hidden",position:"absolute",textOverflow:"ellipsis",whiteSpace:"nowrap",top:"50%",transform:"translateY(-50%)"}},valueContainer:function(e){var t=e.theme.spacing;return{alignItems:"center",display:"flex",flex:1,flexWrap:"wrap",padding:"".concat(t.baseUnit/2,"px ").concat(2*t.baseUnit,"px"),WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"}}};var Yt={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}};function $t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Gt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$t(Object(n),!0).forEach((function(t){te(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$t(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function qt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=h(e);if(t){var o=h(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return d(this,n)}}var Xt,Jt={backspaceRemovesValue:!0,blurInputOnSelect:he(),captureMenuScroll:!he(),closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){var n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bt(Object(n),!0).forEach((function(t){te(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({ignoreCase:!0,ignoreAccents:!0,stringify:yt,trim:!0,matchFrom:"any"},Xt),r=n.ignoreCase,o=n.ignoreAccents,i=n.stringify,a=n.trim,s=n.matchFrom,u=a?gt(t):t,c=a?gt(i(e)):i(e);return r&&(u=u.toLowerCase(),c=c.toLowerCase()),o&&(u=vt(u),c=vt(c)),"start"===s?c.substr(0,u.length)===u:c.indexOf(u)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:Wt,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:"0",tabSelectsValue:!0},Zt=1,Kt=function(e){l(n,e);var t=qt(n);function n(e){var r;a(this,n),(r=t.call(this,e)).state={ariaLiveSelection:"",ariaLiveContext:"",focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,menuOptions:{render:[],focusable:[]},selectValue:[]},r.blockOptionHover=!1,r.isComposing=!1,r.clearFocusValueOnUpdate=!1,r.commonProps=void 0,r.components=void 0,r.hasGroups=!1,r.initialTouchX=0,r.initialTouchY=0,r.inputIsHiddenAfterUpdate=void 0,r.instancePrefix="",r.openAfterFocus=!1,r.scrollToFocusedOptionOnUpdate=!1,r.userIsDragging=void 0,r.controlRef=null,r.getControlRef=function(e){r.controlRef=e},r.focusedOptionRef=null,r.getFocusedOptionRef=function(e){r.focusedOptionRef=e},r.menuListRef=null,r.getMenuListRef=function(e){r.menuListRef=e},r.inputRef=null,r.getInputRef=function(e){r.inputRef=e},r.cacheComponents=function(e){var t;r.components=(t={components:e},tt(tt({},nt),t.components))},r.focus=r.focusInput,r.blur=r.blurInput,r.onChange=function(e,t){var n=r.props,o=n.onChange,i=n.name;o(e,Gt(Gt({},t),{},{name:i}))},r.setValue=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"set-value",n=arguments.length>2?arguments[2]:void 0,o=r.props,i=o.closeMenuOnSelect,a=o.isMulti;r.onInputChange("",{action:"set-value"}),i&&(r.inputIsHiddenAfterUpdate=!a,r.onMenuClose()),r.clearFocusValueOnUpdate=!0,r.onChange(e,{action:t,option:n})},r.selectOption=function(e){var t=r.props,n=t.blurInputOnSelect,o=t.isMulti,i=r.state.selectValue;if(o)if(r.isOptionSelected(e,i)){var a=r.getOptionValue(e);r.setValue(i.filter((function(e){return r.getOptionValue(e)!==a})),"deselect-option",e),r.announceAriaLiveSelection({event:"deselect-option",context:{value:r.getOptionLabel(e)}})}else r.isOptionDisabled(e,i)?r.announceAriaLiveSelection({event:"select-option",context:{value:r.getOptionLabel(e),isDisabled:!0}}):(r.setValue([].concat(at(i),[e]),"select-option",e),r.announceAriaLiveSelection({event:"select-option",context:{value:r.getOptionLabel(e)}}));else r.isOptionDisabled(e,i)?r.announceAriaLiveSelection({event:"select-option",context:{value:r.getOptionLabel(e),isDisabled:!0}}):(r.setValue(e,"select-option"),r.announceAriaLiveSelection({event:"select-option",context:{value:r.getOptionLabel(e)}}));n&&r.blurInput()},r.removeValue=function(e){var t=r.state.selectValue,n=r.getOptionValue(e),o=t.filter((function(e){return r.getOptionValue(e)!==n}));r.onChange(o.length?o:null,{action:"remove-value",removedValue:e}),r.announceAriaLiveSelection({event:"remove-value",context:{value:e?r.getOptionLabel(e):""}}),r.focusInput()},r.clearValue=function(){r.onChange(null,{action:"clear"})},r.popValue=function(){var e=r.state.selectValue,t=e[e.length-1],n=e.slice(0,e.length-1);r.announceAriaLiveSelection({event:"pop-value",context:{value:t?r.getOptionLabel(t):""}}),r.onChange(n.length?n:null,{action:"pop-value",removedValue:t})},r.getValue=function(){return r.state.selectValue},r.cx=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return se.apply(void 0,[r.props.classNamePrefix].concat(t))},r.getOptionLabel=function(e){return r.props.getOptionLabel(e)},r.getOptionValue=function(e){return r.props.getOptionValue(e)},r.getStyles=function(e,t){var n=Bt[e](t);n.boxSizing="border-box";var o=r.props.styles[e];return o?o(n,t):n},r.getElementId=function(e){return"".concat(r.instancePrefix,"-").concat(e)},r.getActiveDescendentId=function(){var e=r.props.menuIsOpen,t=r.state,n=t.menuOptions,o=t.focusedOption;if(o&&e){var i=n.focusable.indexOf(o),a=n.render[i];return a&&a.key}},r.announceAriaLiveSelection=function(e){var t=e.event,n=e.context;r.setState({ariaLiveSelection:zt(t,n)})},r.announceAriaLiveContext=function(e){var t=e.event,n=e.context;r.setState({ariaLiveContext:Ut(t,Gt(Gt({},n),{},{label:r.props["aria-label"]}))})},r.onMenuMouseDown=function(e){0===e.button&&(e.stopPropagation(),e.preventDefault(),r.focusInput())},r.onMenuMouseMove=function(e){r.blockOptionHover=!1},r.onControlMouseDown=function(e){var t=r.props.openMenuOnClick;r.state.isFocused?r.props.menuIsOpen?"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&r.onMenuClose():t&&r.openMenu("first"):(t&&(r.openAfterFocus=!0),r.focusInput()),"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&e.preventDefault()},r.onDropdownIndicatorMouseDown=function(e){if(!(e&&"mousedown"===e.type&&0!==e.button||r.props.isDisabled)){var t=r.props,n=t.isMulti,o=t.menuIsOpen;r.focusInput(),o?(r.inputIsHiddenAfterUpdate=!n,r.onMenuClose()):r.openMenu("first"),e.preventDefault(),e.stopPropagation()}},r.onClearIndicatorMouseDown=function(e){e&&"mousedown"===e.type&&0!==e.button||(r.clearValue(),e.stopPropagation(),r.openAfterFocus=!1,"touchend"===e.type?r.focusInput():setTimeout((function(){return r.focusInput()})))},r.onScroll=function(e){"boolean"==typeof r.props.closeMenuOnScroll?e.target instanceof HTMLElement&&ce(e.target)&&r.props.onMenuClose():"function"==typeof r.props.closeMenuOnScroll&&r.props.closeMenuOnScroll(e)&&r.props.onMenuClose()},r.onCompositionStart=function(){r.isComposing=!0},r.onCompositionEnd=function(){r.isComposing=!1},r.onTouchStart=function(e){var t=e.touches,n=t&&t.item(0);n&&(r.initialTouchX=n.clientX,r.initialTouchY=n.clientY,r.userIsDragging=!1)},r.onTouchMove=function(e){var t=e.touches,n=t&&t.item(0);if(n){var o=Math.abs(n.clientX-r.initialTouchX),i=Math.abs(n.clientY-r.initialTouchY);r.userIsDragging=o>5||i>5}},r.onTouchEnd=function(e){r.userIsDragging||(r.controlRef&&!r.controlRef.contains(e.target)&&r.menuListRef&&!r.menuListRef.contains(e.target)&&r.blurInput(),r.initialTouchX=0,r.initialTouchY=0)},r.onControlTouchEnd=function(e){r.userIsDragging||r.onControlMouseDown(e)},r.onClearIndicatorTouchEnd=function(e){r.userIsDragging||r.onClearIndicatorMouseDown(e)},r.onDropdownIndicatorTouchEnd=function(e){r.userIsDragging||r.onDropdownIndicatorMouseDown(e)},r.handleInputChange=function(e){var t=e.currentTarget.value;r.inputIsHiddenAfterUpdate=!1,r.onInputChange(t,{action:"input-change"}),r.props.menuIsOpen||r.onMenuOpen()},r.onInputFocus=function(e){var t=r.props,n=t.isSearchable,o=t.isMulti;r.props.onFocus&&r.props.onFocus(e),r.inputIsHiddenAfterUpdate=!1,r.announceAriaLiveContext({event:"input",context:{isSearchable:n,isMulti:o}}),r.setState({isFocused:!0}),(r.openAfterFocus||r.props.openMenuOnFocus)&&r.openMenu("first"),r.openAfterFocus=!1},r.onInputBlur=function(e){r.menuListRef&&r.menuListRef.contains(document.activeElement)?r.inputRef.focus():(r.props.onBlur&&r.props.onBlur(e),r.onInputChange("",{action:"input-blur"}),r.onMenuClose(),r.setState({focusedValue:null,isFocused:!1}))},r.onOptionHover=function(e){r.blockOptionHover||r.state.focusedOption===e||r.setState({focusedOption:e})},r.shouldHideSelectedOptions=function(){var e=r.props,t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},r.onKeyDown=function(e){var t=r.props,n=t.isMulti,o=t.backspaceRemovesValue,i=t.escapeClearsValue,a=t.inputValue,s=t.isClearable,u=t.isDisabled,c=t.menuIsOpen,l=t.onKeyDown,p=t.tabSelectsValue,f=t.openMenuOnFocus,d=r.state,h=d.focusedOption,m=d.focusedValue,v=d.selectValue;if(!(u||"function"==typeof l&&(l(e),e.defaultPrevented))){switch(r.blockOptionHover=!0,e.key){case"ArrowLeft":if(!n||a)return;r.focusValue("previous");break;case"ArrowRight":if(!n||a)return;r.focusValue("next");break;case"Delete":case"Backspace":if(a)return;if(m)r.removeValue(m);else{if(!o)return;n?r.popValue():s&&r.clearValue()}break;case"Tab":if(r.isComposing)return;if(e.shiftKey||!c||!p||!h||f&&r.isOptionSelected(h,v))return;r.selectOption(h);break;case"Enter":if(229===e.keyCode)break;if(c){if(!h)return;if(r.isComposing)return;r.selectOption(h);break}return;case"Escape":c?(r.inputIsHiddenAfterUpdate=!1,r.onInputChange("",{action:"menu-close"}),r.onMenuClose()):s&&i&&r.clearValue();break;case" ":if(a)return;if(!c){r.openMenu("first");break}if(!h)return;r.selectOption(h);break;case"ArrowUp":c?r.focusOption("up"):r.openMenu("last");break;case"ArrowDown":c?r.focusOption("down"):r.openMenu("first");break;case"PageUp":if(!c)return;r.focusOption("pageup");break;case"PageDown":if(!c)return;r.focusOption("pagedown");break;case"Home":if(!c)return;r.focusOption("first");break;case"End":if(!c)return;r.focusOption("last");break;default:return}e.preventDefault()}},r.buildMenuOptions=function(e,t){var n=e.inputValue,o=void 0===n?"":n,i=e.options,a=function(e,n){var i=r.isOptionDisabled(e,t),a=r.isOptionSelected(e,t),s=r.getOptionLabel(e),u=r.getOptionValue(e);if(!(r.shouldHideSelectedOptions()&&a||!r.filterOption({label:s,value:u,data:e},o))){var c=i?void 0:function(){return r.onOptionHover(e)},l=i?void 0:function(){return r.selectOption(e)},p="".concat(r.getElementId("option"),"-").concat(n);return{innerProps:{id:p,onClick:l,onMouseMove:c,onMouseOver:c,tabIndex:-1},data:e,isDisabled:i,isSelected:a,key:p,label:s,type:"option",value:u}}};return i.reduce((function(e,t,n){if(t.options){r.hasGroups||(r.hasGroups=!0);var o=t.options.map((function(t,r){var o=a(t,"".concat(n,"-").concat(r));return o&&e.focusable.push(t),o})).filter(Boolean);if(o.length){var i="".concat(r.getElementId("group"),"-").concat(n);e.render.push({type:"group",key:i,data:t,options:o})}}else{var s=a(t,"".concat(n));s&&(e.render.push(s),e.focusable.push(t))}return e}),{render:[],focusable:[]})};var o=e.value;r.cacheComponents=ct(r.cacheComponents,Ae).bind(f(r)),r.cacheComponents(e.components),r.instancePrefix="react-select-"+(r.props.instanceId||++Zt);var i=ue(o);r.buildMenuOptions=ct(r.buildMenuOptions,(function(e,t){var n=it(e,2),r=n[0],o=n[1],i=it(t,2),a=i[0];return o===i[1]&&r.inputValue===a.inputValue&&r.options===a.options})).bind(f(r));var s=e.menuIsOpen?r.buildMenuOptions(e,i):{render:[],focusable:[]};return r.state.menuOptions=s,r.state.selectValue=i,r}return u(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput()}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){var t=this.props,n=t.options,r=t.value,o=t.menuIsOpen,i=t.inputValue;if(this.cacheComponents(e.components),e.value!==r||e.options!==n||e.menuIsOpen!==o||e.inputValue!==i){var a=ue(e.value),s=e.menuIsOpen?this.buildMenuOptions(e,a):{render:[],focusable:[]},u=this.getNextFocusedValue(a),c=this.getNextFocusedOption(s.focusable);this.setState({menuOptions:s,selectValue:a,focusedOption:c,focusedValue:u})}null!=this.inputIsHiddenAfterUpdate&&(this.setState({inputIsHidden:this.inputIsHiddenAfterUpdate}),delete this.inputIsHiddenAfterUpdate)}},{key:"componentDidUpdate",value:function(e){var t,n,r,o,i,a=this.props,s=a.isDisabled,u=a.menuIsOpen,c=this.state.isFocused;(c&&!s&&e.isDisabled||c&&u&&!e.menuIsOpen)&&this.focusInput(),c&&s&&!e.isDisabled&&this.setState({isFocused:!1},this.onMenuClose),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(t=this.menuListRef,n=this.focusedOptionRef,r=t.getBoundingClientRect(),o=n.getBoundingClientRect(),i=n.offsetHeight/3,o.bottom+i>r.bottom?pe(t,Math.min(n.offsetTop+n.clientHeight-t.offsetHeight+i,t.scrollHeight)):o.top-i<r.top&&pe(t,Math.max(n.offsetTop-i,0)),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){var e=this.props,t=e.isSearchable,n=e.isMulti;this.announceAriaLiveContext({event:"input",context:{isSearchable:t,isMulti:n}}),this.onInputChange("",{action:"menu-close"}),this.props.onMenuClose()}},{key:"onInputChange",value:function(e,t){this.props.onInputChange(e,t)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(e){var t=this,n=this.state,r=n.selectValue,o=n.isFocused,i=this.buildMenuOptions(this.props,r),a=this.props,s=a.isMulti,u=a.tabSelectsValue,c="first"===e?0:i.focusable.length-1;if(!s){var l=i.focusable.indexOf(r[0]);l>-1&&(c=l)}this.scrollToFocusedOptionOnUpdate=!(o&&this.menuListRef),this.inputIsHiddenAfterUpdate=!1,this.setState({menuOptions:i,focusedValue:null,focusedOption:i.focusable[c]},(function(){t.onMenuOpen(),t.announceAriaLiveContext({event:"menu",context:{tabSelectsValue:u}})}))}},{key:"focusValue",value:function(e){var t=this.props,n=t.isMulti,r=t.isSearchable,o=this.state,i=o.selectValue,a=o.focusedValue;if(n){this.setState({focusedOption:null});var s=i.indexOf(a);a||(s=-1,this.announceAriaLiveContext({event:"value"}));var u=i.length-1,c=-1;if(i.length){switch(e){case"previous":c=0===s?0:-1===s?u:s-1;break;case"next":s>-1&&s<u&&(c=s+1)}-1===c&&this.announceAriaLiveContext({event:"input",context:{isSearchable:r,isMulti:n}}),this.setState({inputIsHidden:-1!==c,focusedValue:i[c]})}}}},{key:"focusOption",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props,n=t.pageSize,r=t.tabSelectsValue,o=this.state,i=o.focusedOption,a=o.menuOptions,s=a.focusable;if(s.length){var u=0,c=s.indexOf(i);i||(c=-1,this.announceAriaLiveContext({event:"menu",context:{tabSelectsValue:r}})),"up"===e?u=c>0?c-1:s.length-1:"down"===e?u=(c+1)%s.length:"pageup"===e?(u=c-n)<0&&(u=0):"pagedown"===e?(u=c+n)>s.length-1&&(u=s.length-1):"last"===e&&(u=s.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:s[u],focusedValue:null}),this.announceAriaLiveContext({event:"menu",context:{isDisabled:Wt(s[u]),tabSelectsValue:r}})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(Yt):Gt(Gt({},Yt),this.props.theme):Yt}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,r=this.getValue,o=this.setValue,i=this.selectOption,a=this.props,s=a.isMulti,u=a.isRtl,c=a.options;return{cx:t,clearValue:e,getStyles:n,getValue:r,hasValue:this.hasValue(),isMulti:s,isRtl:u,options:c,selectOption:i,setValue:o,selectProps:a,theme:this.getTheme()}}},{key:"getNextFocusedValue",value:function(e){if(this.clearFocusValueOnUpdate)return this.clearFocusValueOnUpdate=!1,null;var t=this.state,n=t.focusedValue,r=t.selectValue.indexOf(n);if(r>-1){if(e.indexOf(n)>-1)return n;if(r<e.length)return e[r]}return null}},{key:"getNextFocusedOption",value:function(e){var t=this.state.focusedOption;return t&&e.indexOf(t)>-1?t:e[0]}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.state.menuOptions.render.length}},{key:"countOptions",value:function(){return this.state.menuOptions.focusable.length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return"function"==typeof this.props.isOptionDisabled&&this.props.isOptionDisabled(e,t)}},{key:"isOptionSelected",value:function(e,t){var n=this;if(t.indexOf(e)>-1)return!0;if("function"==typeof this.props.isOptionSelected)return this.props.isOptionSelected(e,t);var r=this.getOptionValue(e);return t.some((function(e){return n.getOptionValue(e)===r}))}},{key:"filterOption",value:function(e,t){return!this.props.filterOption||this.props.filterOption(e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"constructAriaLiveMessage",value:function(){var e=this.state,t=e.ariaLiveContext,n=e.selectValue,r=e.focusedValue,o=e.focusedOption,i=this.props,a=i.options,s=i.menuIsOpen,u=i.inputValue,c=i.screenReaderStatus,l=r?function(e){var t=e.focusedValue,n=e.getOptionLabel,r=e.selectValue;return"value ".concat(n(t)," focused, ").concat(r.indexOf(t)+1," of ").concat(r.length,".")}({focusedValue:r,getOptionLabel:this.getOptionLabel,selectValue:n}):"",p=o&&s?function(e){var t=e.focusedOption,n=e.getOptionLabel,r=e.options;return"option ".concat(n(t)," focused").concat(t.isDisabled?" disabled":"",", ").concat(r.indexOf(t)+1," of ").concat(r.length,".")}({focusedOption:o,getOptionLabel:this.getOptionLabel,options:a}):"",f=function(e){var t=e.inputValue,n=e.screenReaderMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}({inputValue:u,screenReaderMessage:c({count:this.countOptions()})});return"".concat(l," ").concat(p," ").concat(f," ").concat(t)}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,r=e.inputId,o=e.inputValue,a=e.tabIndex,s=e.form,u=this.components.Input,c=this.state.inputIsHidden,l=r||this.getElementId("input"),p={"aria-autocomplete":"list","aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"]};if(!n)return v.a.createElement(xt,Object(i.a)({id:l,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:ie,onFocus:this.onInputFocus,readOnly:!0,disabled:t,tabIndex:a,form:s,value:""},p));var f=this.commonProps,d=f.cx,h=f.theme,m=f.selectProps;return v.a.createElement(u,Object(i.a)({autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",cx:d,getStyles:this.getStyles,id:l,innerRef:this.getInputRef,isDisabled:t,isHidden:c,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,selectProps:m,spellCheck:"false",tabIndex:a,form:s,theme:h,type:"text",value:o},p))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.components,n=t.MultiValue,r=t.MultiValueContainer,o=t.MultiValueLabel,a=t.MultiValueRemove,s=t.SingleValue,u=t.Placeholder,c=this.commonProps,l=this.props,p=l.controlShouldRenderValue,f=l.isDisabled,d=l.isMulti,h=l.inputValue,m=l.placeholder,b=this.state,g=b.selectValue,y=b.focusedValue,O=b.isFocused;if(!this.hasValue()||!p)return h?null:v.a.createElement(u,Object(i.a)({},c,{key:"placeholder",isDisabled:f,isFocused:O}),m);if(d)return g.map((function(t,s){var u=t===y;return v.a.createElement(n,Object(i.a)({},c,{components:{Container:r,Label:o,Remove:a},isFocused:u,isDisabled:f,key:"".concat(e.getOptionValue(t)).concat(s),index:s,removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault(),e.stopPropagation()}},data:t}),e.formatOptionLabel(t,"value"))}));if(h)return null;var w=g[0];return v.a.createElement(s,Object(i.a)({},c,{data:w,isDisabled:f}),this.formatOptionLabel(w,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.components.ClearIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,a=this.state.isFocused;if(!this.isClearable()||!e||r||!this.hasValue()||o)return null;var s={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return v.a.createElement(e,Object(i.a)({},t,{innerProps:s,isFocused:a}))}},{key:"renderLoadingIndicator",value:function(){var e=this.components.LoadingIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,a=this.state.isFocused;if(!e||!o)return null;return v.a.createElement(e,Object(i.a)({},t,{innerProps:{"aria-hidden":"true"},isDisabled:r,isFocused:a}))}},{key:"renderIndicatorSeparator",value:function(){var e=this.components,t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var r=this.commonProps,o=this.props.isDisabled,a=this.state.isFocused;return v.a.createElement(n,Object(i.a)({},r,{isDisabled:o,isFocused:a}))}},{key:"renderDropdownIndicator",value:function(){var e=this.components.DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,r=this.state.isFocused,o={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return v.a.createElement(e,Object(i.a)({},t,{innerProps:o,isDisabled:n,isFocused:r}))}},{key:"renderMenu",value:function(){var e=this,t=this.components,n=t.Group,r=t.GroupHeading,a=t.Menu,s=t.MenuList,u=t.MenuPortal,c=t.LoadingMessage,l=t.NoOptionsMessage,p=t.Option,f=this.commonProps,d=this.state,h=d.focusedOption,m=d.menuOptions,b=this.props,g=b.captureMenuScroll,y=b.inputValue,O=b.isLoading,w=b.loadingMessage,x=b.minMenuHeight,S=b.maxMenuHeight,k=b.menuIsOpen,C=b.menuPlacement,P=b.menuPosition,I=b.menuPortalTarget,E=b.menuShouldBlockScroll,j=b.menuShouldScrollIntoView,M=b.noOptionsMessage,A=b.onMenuScrollToTop,V=b.onMenuScrollToBottom;if(!k)return null;var D,L=function(t){var n=h===t.data;return t.innerRef=n?e.getFocusedOptionRef:void 0,v.a.createElement(p,Object(i.a)({},f,t,{isFocused:n}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())D=m.render.map((function(t){if("group"===t.type){t.type;var a=o(t,["type"]),s="".concat(t.key,"-heading");return v.a.createElement(n,Object(i.a)({},f,a,{Heading:r,headingProps:{id:s,data:t.data},label:e.formatGroupLabel(t.data)}),t.options.map((function(e){return L(e)})))}if("option"===t.type)return L(t)}));else if(O){var R=w({inputValue:y});if(null===R)return null;D=v.a.createElement(c,f,R)}else{var T=M({inputValue:y});if(null===T)return null;D=v.a.createElement(l,f,T)}var F={minMenuHeight:x,maxMenuHeight:S,menuPlacement:C,menuPosition:P,menuShouldScrollIntoView:j},N=v.a.createElement(we,Object(i.a)({},f,F),(function(t){var n=t.ref,r=t.placerProps,o=r.placement,u=r.maxHeight;return v.a.createElement(a,Object(i.a)({},f,F,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:O,placement:o}),v.a.createElement(Ht,{isEnabled:g,onTopArrive:A,onBottomArrive:V},v.a.createElement(Ft,{isEnabled:E},v.a.createElement(s,Object(i.a)({},f,{innerRef:e.getMenuListRef,isLoading:O,maxHeight:u}),D))))}));return I||"fixed"===P?v.a.createElement(u,Object(i.a)({},f,{appendTo:I,controlElement:this.controlRef,menuPlacement:C,menuPosition:P}),N):N}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,r=t.isDisabled,o=t.isMulti,i=t.name,a=this.state.selectValue;if(i&&!r){if(o){if(n){var s=a.map((function(t){return e.getOptionValue(t)})).join(n);return v.a.createElement("input",{name:i,type:"hidden",value:s})}var u=a.length>0?a.map((function(t,n){return v.a.createElement("input",{key:"i-".concat(n),name:i,type:"hidden",value:e.getOptionValue(t)})})):v.a.createElement("input",{name:i,type:"hidden"});return v.a.createElement("div",null,u)}var c=a[0]?this.getOptionValue(a[0]):"";return v.a.createElement("input",{name:i,type:"hidden",value:c})}}},{key:"renderLiveRegion",value:function(){return this.state.isFocused?v.a.createElement(wt,{"aria-live":"polite"},v.a.createElement("span",{id:"aria-selection-event"}," ",this.state.ariaLiveSelection),v.a.createElement("span",{id:"aria-context"}," ",this.constructAriaLiveMessage())):null}},{key:"render",value:function(){var e=this.components,t=e.Control,n=e.IndicatorsContainer,r=e.SelectContainer,o=e.ValueContainer,a=this.props,s=a.className,u=a.id,c=a.isDisabled,l=a.menuIsOpen,p=this.state.isFocused,f=this.commonProps=this.getCommonProps();return v.a.createElement(r,Object(i.a)({},f,{className:s,innerProps:{id:u,onKeyDown:this.onKeyDown},isDisabled:c,isFocused:p}),this.renderLiveRegion(),v.a.createElement(t,Object(i.a)({},f,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:c,isFocused:p,menuIsOpen:l}),v.a.createElement(o,Object(i.a)({},f,{isDisabled:c}),this.renderPlaceholderOrValue(),this.renderInput()),v.a.createElement(n,Object(i.a)({},f,{isDisabled:c}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}]),n}(m.Component);Kt.defaultProps=Jt;n("VkAN");function Qt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=h(e);if(t){var o=h(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return d(this,n)}}var en={defaultInputValue:"",defaultMenuIsOpen:!1,defaultValue:null};function tn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=h(e);if(t){var o=h(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return d(this,n)}}var nn,rn,on,an={cacheOptions:!1,defaultOptions:!1,filterOption:null,isLoading:!1},sn=function(e){var t,n;return n=t=function(t){l(r,t);var n=tn(r);function r(e){var t;return a(this,r),(t=n.call(this)).select=void 0,t.lastRequest=void 0,t.mounted=!1,t.optionsCache={},t.handleInputChange=function(e,n){var r=t.props,o=r.cacheOptions,i=function(e,t,n){if(n){var r=n(e,t);if("string"==typeof r)return r}return e}(e,n,r.onInputChange);if(!i)return delete t.lastRequest,void t.setState({inputValue:"",loadedInputValue:"",loadedOptions:[],isLoading:!1,passEmptyOptions:!1});if(o&&t.optionsCache[i])t.setState({inputValue:i,loadedInputValue:i,loadedOptions:t.optionsCache[i],isLoading:!1,passEmptyOptions:!1});else{var a=t.lastRequest={};t.setState({inputValue:i,isLoading:!0,passEmptyOptions:!t.state.loadedInputValue},(function(){t.loadOptions(i,(function(e){t.mounted&&(e&&(t.optionsCache[i]=e),a===t.lastRequest&&(delete t.lastRequest,t.setState({isLoading:!1,loadedInputValue:i,loadedOptions:e||[],passEmptyOptions:!1})))}))}))}return i},t.state={defaultOptions:Array.isArray(e.defaultOptions)?e.defaultOptions:void 0,inputValue:void 0!==e.inputValue?e.inputValue:"",isLoading:!0===e.defaultOptions,loadedOptions:[],passEmptyOptions:!1},t}return u(r,[{key:"componentDidMount",value:function(){var e=this;this.mounted=!0;var t=this.props.defaultOptions,n=this.state.inputValue;!0===t&&this.loadOptions(n,(function(t){if(e.mounted){var n=!!e.lastRequest;e.setState({defaultOptions:t||[],isLoading:n})}}))}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){e.cacheOptions!==this.props.cacheOptions&&(this.optionsCache={}),e.defaultOptions!==this.props.defaultOptions&&this.setState({defaultOptions:Array.isArray(e.defaultOptions)?e.defaultOptions:void 0})}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"focus",value:function(){this.select.focus()}},{key:"blur",value:function(){this.select.blur()}},{key:"loadOptions",value:function(e,t){var n=this.props.loadOptions;if(!n)return t();var r=n(e,t);r&&"function"==typeof r.then&&r.then(t,(function(){return t()}))}},{key:"render",value:function(){var t=this,n=this.props,r=(n.loadOptions,n.isLoading),a=o(n,["loadOptions","isLoading"]),s=this.state,u=s.defaultOptions,c=s.inputValue,l=s.isLoading,p=s.loadedInputValue,f=s.loadedOptions,d=s.passEmptyOptions?[]:c&&p?f:u||[];return v.a.createElement(e,Object(i.a)({},a,{ref:function(e){t.select=e},options:d,isLoading:l||r,onInputChange:this.handleInputChange}))}}]),r}(m.Component),t.defaultProps=an,n},un=(nn=Kt,on=rn=function(e){l(n,e);var t=Qt(n);function n(){var e;a(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return(e=t.call.apply(t,[this].concat(o))).select=void 0,e.state={inputValue:void 0!==e.props.inputValue?e.props.inputValue:e.props.defaultInputValue,menuIsOpen:void 0!==e.props.menuIsOpen?e.props.menuIsOpen:e.props.defaultMenuIsOpen,value:void 0!==e.props.value?e.props.value:e.props.defaultValue},e.onChange=function(t,n){e.callProp("onChange",t,n),e.setState({value:t})},e.onInputChange=function(t,n){var r=e.callProp("onInputChange",t,n);e.setState({inputValue:void 0!==r?r:t})},e.onMenuOpen=function(){e.callProp("onMenuOpen"),e.setState({menuIsOpen:!0})},e.onMenuClose=function(){e.callProp("onMenuClose"),e.setState({menuIsOpen:!1})},e}return u(n,[{key:"focus",value:function(){this.select.focus()}},{key:"blur",value:function(){this.select.blur()}},{key:"getProp",value:function(e){return void 0!==this.props[e]?this.props[e]:this.state[e]}},{key:"callProp",value:function(e){if("function"==typeof this.props[e]){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return(t=this.props)[e].apply(t,r)}}},{key:"render",value:function(){var e=this,t=this.props,n=(t.defaultInputValue,t.defaultMenuIsOpen,t.defaultValue,o(t,["defaultInputValue","defaultMenuIsOpen","defaultValue"]));return v.a.createElement(nn,Object(i.a)({},n,{ref:function(t){e.select=t},inputValue:this.getProp("inputValue"),menuIsOpen:this.getProp("menuIsOpen"),onChange:this.onChange,onInputChange:this.onInputChange,onMenuClose:this.onMenuClose,onMenuOpen:this.onMenuOpen,value:this.getProp("value")}))}}]),n}(m.Component),rn.defaultProps=en,on),cn=sn(un);t.default=cn},RIqP:function(e,t,n){var r=n("Ijbi"),o=n("EbDI"),i=n("ZhPi"),a=n("Bnag");e.exports=function(e){return r(e)||o(e)||i(e)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},SksO:function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,n(t,r)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},VbXa:function(e,t,n){var r=n("SksO");e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,r(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports},VkAN:function(e,t){e.exports=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))},e.exports.__esModule=!0,e.exports.default=e.exports},WkPL:function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},e.exports.__esModule=!0,e.exports.default=e.exports},ZhPi:function(e,t,n){var r=n("WkPL");e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports},cDf5:function(e,t){function n(t){return e.exports=n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,n(t)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},m0LI:function(e,t){e.exports=function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}},e.exports.__esModule=!0,e.exports.default=e.exports},wTVA:function(e,t){e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports},wkBT:function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports}}]);
dist/backup/dashboard--settings.js DELETED
@@ -1,11 +0,0 @@
1
- (window.itsecWebpackJsonP=window.itsecWebpackJsonP||[]).push([[2],{ppSj:function(t,e,n){"use strict";n.d(e,"k",(function(){return m})),n.d(e,"g",(function(){return k})),n.d(e,"h",(function(){return S})),n.d(e,"j",(function(){return N})),n.d(e,"i",(function(){return A})),n.d(e,"f",(function(){return z})),n.d(e,"a",(function(){return x})),n.d(e,"b",(function(){return J})),n.d(e,"c",(function(){return Y})),n.d(e,"d",(function(){return G})),n.d(e,"e",(function(){return Q}));var r=n("pVnL"),o=n.n(r),c=n("lwsE"),u=n.n(c),i=n("W8MJ"),f=n.n(i),a=n("7W2i"),s=n.n(a),l=n("a1gu"),d=n.n(l),p=n("Nsbk"),v=n.n(p),h=n("GRId"),y=n("K9lf");function b(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=v()(t);if(e){var o=v()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return d()(this,n)}}function m(t){return Object(y.createHigherOrderComponent)((function(e){return function(n){s()(c,n);var r=b(c);function c(){return u()(this,c),r.apply(this,arguments)}return f()(c,[{key:"render",value:function(){return Object(h.createElement)(e,o()({},this.props,t))}}]),c}(h.Component)}),"withProps")}var O=n("lSNA"),w=n.n(O),j=n("YLtl");function E(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function g(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?E(Object(n),!0).forEach((function(e){w()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):E(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function R(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}
2
- /**
3
- * Higher-order component that debounces an action.
4
- *
5
- * @license https://github.com/deepsweet/hocs/tree/master/packages/debounce-handler (MIT)
6
- *
7
- * @param {string} handlerName
8
- * @param {number|Function} wait
9
- * @param {Object} [options]
10
- * @return {WPComponent} Debounced component.
11
- */();return function(){var n,r=v()(t);if(e){var o=v()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return d()(this,n)}}function k(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object(y.createHigherOrderComponent)((function(r){return function(o){s()(i,o);var c=R(i);function i(){var r;return u()(this,i),(r=c.apply(this,arguments)).debouncedPropInvoke=Object(j.debounce)((function(){var e;return(e=r.props)[t].apply(e,arguments)}),"function"==typeof e?e(r.props):e,n),r.handler=function(t){var e;t&&"function"==typeof t.persist&&t.persist();for(var n=arguments.length,o=new Array(n>1?n-1:0),c=1;c<n;c++)o[c-1]=arguments[c];return(e=r).debouncedPropInvoke.apply(e,[t].concat(o))},r}return f()(i,[{key:"componentWillUnmount",value:function(){this.debouncedPropInvoke.cancel()}},{key:"render",value:function(){var e=g(g({},this.props),{},w()({},t,this.handler));return Object(h.createElement)(r,e)}}]),i}(h.Component)}),"withDebounceHandler")}function P(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return L(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return L(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,u=!0,i=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return u=t.done,t},e:function(t){i=!0,c=t},f:function(){try{u||null==n.return||n.return()}finally{if(i)throw c}}}}function L(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function B(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=v()(t);if(e){var o=v()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return d()(this,n)}}function S(t,e){var n;return n=Object(j.isFunction)(e)?[{delay:t,cb:e}]:t,Object(y.createHigherOrderComponent)((function(t){return function(e){s()(o,e);var r=B(o);function o(){var t;return u()(this,o),(t=r.apply(this,arguments)).intervalIds=[],t}return f()(o,[{key:"componentDidMount",value:function(){var t,e=this,r=P(n);try{var o=function(){var n,r=t.value;n=r.cb,e.intervalIds.push(setInterval((function(){return n(e.props)}),r.delay))};for(r.s();!(t=r.n()).done;)o()}catch(t){r.e(t)}finally{r.f()}}},{key:"componentWillUnmount",value:function(){this.intervalIds.forEach(clearInterval)}},{key:"render",value:function(){return Object(h.createElement)(t,this.props)}}]),o}(h.Component)}),"withInterval")}var C=n("QILm"),I=n.n(C),W=n("PJYZ"),M=n.n(W);function D(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=v()(t);if(e){var o=v()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return d()(this,n)}}Object(y.createHigherOrderComponent)((function(t){var e,n;return n=e=function(e){s()(r,e);var n=D(r);function r(){var t;u()(this,r);for(var e=arguments.length,o=new Array(e),c=0;c<e;c++)o[c]=arguments[c];return t=n.call.apply(n,[this].concat(o)),w()(M()(t),"state",{width:1280}),w()(M()(t),"mounted",!1),w()(M()(t),"ref",null),w()(M()(t),"onWindowResize",(function(){if(t.mounted){var e=Object(h.findDOMNode)(M()(t));if(e instanceof window.HTMLElement){var n=e.offsetWidth;t.setState({width:n})}}})),t}return f()(r,[{key:"componentDidMount",value:function(){this.mounted=!0,window.addEventListener("resize",this.onWindowResize),document.getElementById("collapse-button").addEventListener("click",this.onWindowResize),this.onWindowResize()}},{key:"componentWillUnmount",value:function(){this.mounted=!1,window.removeEventListener("resize",this.onWindowResize),document.getElementById("collapse-button").removeEventListener("click",this.onWindowResize)}},{key:"render",value:function(){var e=this.props,n=e.measureBeforeMount,r=I()(e,["measureBeforeMount"]);return n&&!this.mounted?Object(h.createElement)("div",{className:this.props.className,style:this.props.style}):Object(h.createElement)(t,o()({},r,{width:this.state.width+20}))}}]),r}(h.Component),w()(e,"defaultProps",{measureBeforeMount:!1}),n}),"withWidth");function K(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=v()(t);if(e){var o=v()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return d()(this,n)}}var N=Object(y.createHigherOrderComponent)((function(t){return function(e){s()(r,e);var n=K(r);function r(){var t;return u()(this,r),t=n.apply(this,arguments),w()(M()(t),"state",{pressed:{shift:!1,ctrl:!1,meta:!1,alt:!1}}),w()(M()(t),"mounted",!1),t.listener=t.listener.bind(M()(t)),t.onBlur=t.onBlur.bind(M()(t)),t}return f()(r,[{key:"componentDidMount",value:function(){this.mounted=!0,window.addEventListener("keydown",this.listener),window.addEventListener("keyup",this.listener),window.addEventListener("click",this.listener),window.addEventListener("blur",this.onBlur)}},{key:"componentWillUnmount",value:function(){this.mounted=!1,window.removeEventListener("keydown",this.listener),window.removeEventListener("keyup",this.listener),window.removeEventListener("click",this.listener),window.removeEventListener("blur",this.onBlur)}},{key:"listener",value:function(t){this.mounted&&this.setState({pressed:{shift:t.shiftKey,ctrl:t.ctrlKey,meta:t.metaKey,alt:t.altKey}})}},{key:"onBlur",value:function(){this.setState({pressed:{shift:!1,ctrl:!1,meta:!1,alt:!1}})}},{key:"render",value:function(){return Object(h.createElement)(t,o()({pressedModifierKeys:this.state.pressed},this.props))}}]),r}(h.Component)}),"withPressedModifierKeys");var A=Object(y.createHigherOrderComponent)((function(t){return function(e){var n=e.navigate,r=I()(e,["navigate"]);return Object(h.createElement)(t,o()({},r,{onClick:function(t){try{r.onClick&&r.onClick(t)}catch(e){throw t.preventDefault(),e}t.defaultPrevented||0!==t.button||r.target&&"_self"!==r.target||function(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}(t)||(t.preventDefault(),n())}}))}}),"withNavigate"),T=new WeakMap;function z(t,e){Object(h.useLayoutEffect)((function(){T.has(t)||(e(),T.set(t,!0))}),[])}var H=n("J4zp"),U=n.n(H);function x(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=Object(h.useState)("idle"),r=U()(n,2),o=r[0],c=r[1],u=Object(h.useState)(null),i=U()(u,2),f=i[0],a=i[1],s=Object(h.useState)(null),l=U()(s,2),d=l[0],p=l[1],v=Object(h.useCallback)((function(){return c("pending"),p(null),t.apply(void 0,arguments).then((function(t){a(t),c("success")})).catch((function(t){p(t),a(null),c("error")}))}),[t]);return Object(h.useEffect)((function(){e&&v()}),[v,e]),{execute:v,status:o,value:f,error:d}}function J(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window,r=Object(h.useRef)();Object(h.useEffect)((function(){r.current=e}),[e]),Object(h.useEffect)((function(){if(n&&n.addEventListener){var e=function(t){return r.current(t)};return n.addEventListener(t,e),function(){return n.removeEventListener(t,e)}}}),[t,n])}var F=["button","submit"];function Y(t){var e=Object(h.useRef)(t);Object(h.useEffect)((function(){e.current=t}),[t]);var n=Object(h.useRef)(!1),r=Object(h.useRef)(),o=Object(h.useCallback)((function(){clearTimeout(r.current)}),[]);Object(h.useEffect)((function(){return function(){return o()}}),[]),Object(h.useEffect)((function(){t||o()}),[t,o]);var c=Object(h.useCallback)((function(t){var e=t.type,r=t.target;Object(j.includes)(["mouseup","touchend"],e)?n.current=!1:function(t){if(!(t instanceof window.HTMLElement))return!1;switch(t.nodeName){case"A":case"BUTTON":return!0;case"INPUT":return Object(j.includes)(F,t.type)}return!1}(r)&&(n.current=!0)}),[]),u=Object(h.useCallback)((function(t){t.persist(),n.current||(r.current=setTimeout((function(){document.hasFocus()?"function"==typeof e.current&&e.current(t):t.preventDefault()}),0))}),[]);return{onFocus:o,onMouseDown:c,onMouseUp:c,onTouchStart:c,onTouchEnd:c,onBlur:u}}function G(t,e){var n=Object(h.useState)((function(){try{var n=window.localStorage.getItem(t);return n?JSON.parse(n):e}catch(t){return console.error(t),e}})),r=U()(n,2),o=r[0],c=r[1];return[o,function(e){try{var n=e instanceof Function?e(o):e;c(n),window.localStorage.setItem(t,JSON.stringify(n))}catch(t){console.error(t)}}]}function Q(t){var e=Object(h.useRef)(null),n=Object(h.useRef)(!1),r=Object(h.useRef)(t),o=Object(h.useRef)(t);return o.current=t,Object(h.useLayoutEffect)((function(){t.forEach((function(t,o){var c=r.current[o];"function"==typeof t&&t!==c&&!1===n.current&&(c(null),t(e.current))})),r.current=t}),t),Object(h.useLayoutEffect)((function(){n.current=!1})),Object(h.useCallback)((function(t){e.current=t,n.current=!0,(t?o.current:r.current).forEach((function(e){"function"==typeof e?e(t):e&&e.hasOwnProperty("current")&&(e.current=t)}))}),[])}}}]);
 
 
 
 
 
 
 
 
 
 
 
dist/backup/dashboard.css CHANGED
@@ -1,2 +1 @@
1
- @keyframes itsec-animation-fade-in-constant{from{opacity:0}to{opacity:1}}.itsec-card--type-database-backup{display:flex;flex-direction:column;justify-content:space-between;height:100%;overflow:hidden}.itsec-card--type-database-backup .itsec-card-header{flex-shrink:0}.itsec-card--type-database-backup .itsec-card-database-backup__total{border:5px solid #0081E3;border-radius:50%;height:150px;width:150px;margin:0 auto 1em auto;display:flex;flex-direction:column;align-items:center;position:relative;flex-shrink:0;flex-grow:0}.itsec-card--type-database-backup .itsec-card-database-backup__total-count{position:absolute;top:25%;color:#191e23;font-size:4.5em;font-weight:bold;letter-spacing:-3.8px;line-height:1em}.itsec-card--type-database-backup .itsec-card-database-backup__total-count sup{position:absolute;font-size:.5em;line-height:1}.itsec-card--type-database-backup .itsec-card-database-backup__total-label{position:absolute;bottom:25%;margin-top:auto;color:#555d66;text-transform:uppercase}.itsec-card--type-database-backup h3{margin:.5em 0 0;padding:0 1em;color:grey;font-size:1.1em;font-weight:normal;text-transform:uppercase}.itsec-card--type-database-backup .itsec-card-database-backup__recent-backups-section{flex-shrink:1;overflow-y:scroll;position:relative}.itsec-card--type-database-backup .itsec-card-database-backup__recent-backups-section .itsec-card-database-backup__recent-backups{width:100%;border-spacing:0}.itsec-card--type-database-backup .itsec-card-database-backup__recent-backups-section .itsec-card-database-backup__recent-backups thead th{position:sticky;top:0;padding-top:1em;padding-bottom:1em;background:white;color:#555d66;text-transform:uppercase;font-weight:normal;border-bottom:1px solid #e2e4e7;border-top:1px solid #e2e4e7}.itsec-card--type-database-backup .itsec-card-database-backup__recent-backups-section .itsec-card-database-backup__recent-backups th,.itsec-card--type-database-backup .itsec-card-database-backup__recent-backups-section .itsec-card-database-backup__recent-backups td{text-align:left;padding:1em}.itsec-card--type-database-backup .itsec-card-database-backup__recent-backups-section .itsec-card-database-backup__recent-backups th:last-child,.itsec-card--type-database-backup .itsec-card-database-backup__recent-backups-section .itsec-card-database-backup__recent-backups td:last-child{text-align:right}.itsec-card--type-database-backup .itsec-card-database-backup__recent-backups-section .itsec-card-database-backup__recent-backups tbody th{font-weight:normal}.itsec-card--type-database-backup.itsec-card-database-backup--no-data{justify-content:flex-start}.itsec-card--type-database-backup.itsec-card-database-backup--no-data .itsec-card-footer__actions{border:none;flex-grow:1;align-self:center;flex-direction:column;justify-content:center}.itsec-card--type-database-backup.itsec-card-database-backup--no-data .itsec-card-footer__action{margin:.25em 0}.itsec-card--type-database-backup .itsec-card-database-backup__no-data-message{padding:0 1em}.itsec-card--type-database-backup .itsec-card-database-backup__no-data-message p{margin:0}.itsec-card[max-width~="300px"] .itsec-card--type-database-backup.itsec-card-database-backup--source-files .itsec-card-database-backup__col-size{display:none}.itsec-card[max-width~="250px"] .itsec-card--type-database-backup.itsec-card-database-backup--source-files .itsec-card-database-backup__backup-time{display:none}.itsec-card[max-height~="300px"] .itsec-card--type-database-backup:not(.itsec-card-database-backup--no-data){display:grid;grid-template-areas:"header header" "left right";grid-template-columns:1fr 1fr;grid-template-rows:minmax(-webkit-max-content, auto) 1fr;grid-template-rows:minmax(max-content, auto) 1fr;padding:0 1em;align-items:start}.itsec-card[max-height~="300px"] .itsec-card--type-database-backup:not(.itsec-card-database-backup--no-data) .itsec-card-header{grid-area:header;padding:1em 0 0}.itsec-card[max-height~="300px"] .itsec-card--type-database-backup:not(.itsec-card-database-backup--no-data) .itsec-card-database-backup__total{grid-area:left;margin:0 auto;width:100px;height:100px;align-self:center}.itsec-card[max-height~="300px"] .itsec-card--type-database-backup:not(.itsec-card-database-backup--no-data) .itsec-card-database-backup__total-count{font-size:3em;letter-spacing:-2px}.itsec-card[max-height~="300px"] .itsec-card--type-database-backup:not(.itsec-card-database-backup--no-data) .itsec-card-database-backup__total-label{font-size:.75em}.itsec-card[max-height~="300px"] .itsec-card--type-database-backup:not(.itsec-card-database-backup--no-data) .itsec-card-footer__actions{grid-area:right;margin:0;border:none;align-items:center;flex-direction:column;flex-shrink:1;justify-content:center;height:100%}.itsec-card[max-height~="300px"] .itsec-card--type-database-backup:not(.itsec-card-database-backup--no-data) .itsec-card-footer__actions .itsec-card-footer__action{margin:.25em 0}.itsec-card[max-height~="300px"] .itsec-card--type-database-backup:not(.itsec-card-database-backup--no-data) .itsec-card-database-backup__recent-backups-section{display:none}.itsec-card[max-height~="300px"][max-width~="250px"] .itsec-card--type-database-backup:not(.itsec-card-database-backup--no-data){grid-template-areas:"header header" "left left"}.itsec-card[max-height~="300px"][max-width~="250px"] .itsec-card--type-database-backup:not(.itsec-card-database-backup--no-data) .itsec-card-database-backup__total{height:125px;width:125px}.itsec-card[max-height~="300px"][max-width~="250px"] .itsec-card--type-database-backup:not(.itsec-card-database-backup--no-data) .itsec-card-database-backup__total-count{font-size:4em;letter-spacing:-3.5px}.itsec-card[max-height~="300px"][max-width~="250px"] .itsec-card--type-database-backup:not(.itsec-card-database-backup--no-data) .itsec-card-database-backup__total-label{font-size:.75em;bottom:20%}.itsec-card[max-height~="300px"][max-width~="250px"] .itsec-card--type-database-backup:not(.itsec-card-database-backup--no-data) .itsec-card-footer__actions{display:none}
2
-
1
+ @keyframes itsec-animation-fade-in-constant{from{opacity:0}to{opacity:1}}.itsec-card--type-database-backup{display:flex;flex-direction:column;justify-content:space-between;height:100%;overflow:hidden}.itsec-card--type-database-backup .itsec-card-header{flex-shrink:0}.itsec-card--type-database-backup .itsec-card-database-backup__total{border:5px solid #0081e3;border-radius:50%;height:150px;width:150px;margin:0 auto 1em auto;display:flex;flex-direction:column;align-items:center;position:relative;flex-shrink:0;flex-grow:0}.itsec-card--type-database-backup .itsec-card-database-backup__total-count{position:absolute;top:25%;color:#191e23;font-size:4.5em;font-weight:bold;letter-spacing:-3.8px;line-height:1em}.itsec-card--type-database-backup .itsec-card-database-backup__total-count sup{position:absolute;font-size:.5em;line-height:1}.itsec-card--type-database-backup .itsec-card-database-backup__total-label{position:absolute;bottom:25%;margin-top:auto;color:#555d66;text-transform:uppercase}.itsec-card--type-database-backup h3{margin:.5em 0 0;padding:0 1em;color:gray;font-size:1.1em;font-weight:normal;text-transform:uppercase}.itsec-card--type-database-backup .itsec-card-database-backup__recent-backups-section{flex-shrink:1;overflow-y:scroll;position:relative}.itsec-card--type-database-backup .itsec-card-database-backup__recent-backups-section .itsec-card-database-backup__recent-backups{width:100%;border-spacing:0;--itsec-table-spacing: 1em;border-spacing:0}.itsec-card--type-database-backup .itsec-card-database-backup__recent-backups-section .itsec-card-database-backup__recent-backups thead th{padding-top:var(--itsec-table-spacing);padding-bottom:var(--itsec-table-spacing);color:#555d66;text-transform:uppercase;font-weight:normal;border-bottom:1px solid #e2e4e7;border-top:1px solid #e2e4e7}.itsec-card--type-database-backup .itsec-card-database-backup__recent-backups-section .itsec-card-database-backup__recent-backups th,.itsec-card--type-database-backup .itsec-card-database-backup__recent-backups-section .itsec-card-database-backup__recent-backups td{text-align:left;padding:var(--itsec-table-spacing)}.itsec-card--type-database-backup .itsec-card-database-backup__recent-backups-section .itsec-card-database-backup__recent-backups tbody th{font-weight:normal}.itsec-card--type-database-backup .itsec-card-database-backup__recent-backups-section .itsec-card-database-backup__recent-backups thead th{position:sticky;top:0;background:#fff}.itsec-card--type-database-backup .itsec-card-database-backup__recent-backups-section .itsec-card-database-backup__recent-backups th:last-child,.itsec-card--type-database-backup .itsec-card-database-backup__recent-backups-section .itsec-card-database-backup__recent-backups td:last-child{text-align:right}.itsec-card--type-database-backup.itsec-card-database-backup--no-data{justify-content:flex-start}.itsec-card--type-database-backup.itsec-card-database-backup--no-data .itsec-card-footer__actions{border:none;flex-grow:1;align-self:center;flex-direction:column;justify-content:center}.itsec-card--type-database-backup.itsec-card-database-backup--no-data .itsec-card-footer__action{margin:.25em 0}.itsec-card--type-database-backup .itsec-card-database-backup__no-data-message{padding:0 1em}.itsec-card--type-database-backup .itsec-card-database-backup__no-data-message p{margin:0}.itsec-card[max-width~="300px"] .itsec-card--type-database-backup.itsec-card-database-backup--source-files .itsec-card-database-backup__col-size{display:none}.itsec-card[max-width~="250px"] .itsec-card--type-database-backup.itsec-card-database-backup--source-files .itsec-card-database-backup__backup-time{display:none}.itsec-card[max-height~="300px"] .itsec-card--type-database-backup:not(.itsec-card-database-backup--no-data){display:grid;grid-template-areas:"header header" "left right";grid-template-columns:1fr 1fr;grid-template-rows:minmax(max-content, auto) 1fr;padding:0 1em;align-items:start}.itsec-card[max-height~="300px"] .itsec-card--type-database-backup:not(.itsec-card-database-backup--no-data) .itsec-card-header{grid-area:header;padding:1em 0 0}.itsec-card[max-height~="300px"] .itsec-card--type-database-backup:not(.itsec-card-database-backup--no-data) .itsec-card-database-backup__total{grid-area:left;margin:0 auto;width:100px;height:100px;align-self:center}.itsec-card[max-height~="300px"] .itsec-card--type-database-backup:not(.itsec-card-database-backup--no-data) .itsec-card-database-backup__total-count{font-size:3em;letter-spacing:-2px}.itsec-card[max-height~="300px"] .itsec-card--type-database-backup:not(.itsec-card-database-backup--no-data) .itsec-card-database-backup__total-label{font-size:.75em}.itsec-card[max-height~="300px"] .itsec-card--type-database-backup:not(.itsec-card-database-backup--no-data) .itsec-card-footer__actions{grid-area:right;margin:0;border:none;align-items:center;flex-direction:column;flex-shrink:1;justify-content:center;height:100%}.itsec-card[max-height~="300px"] .itsec-card--type-database-backup:not(.itsec-card-database-backup--no-data) .itsec-card-footer__actions .itsec-card-footer__action{margin:.25em 0}.itsec-card[max-height~="300px"] .itsec-card--type-database-backup:not(.itsec-card-database-backup--no-data) .itsec-card-database-backup__recent-backups-section{display:none}.itsec-card[max-height~="300px"][max-width~="250px"] .itsec-card--type-database-backup:not(.itsec-card-database-backup--no-data){grid-template-areas:"header header" "left left"}.itsec-card[max-height~="300px"][max-width~="250px"] .itsec-card--type-database-backup:not(.itsec-card-database-backup--no-data) .itsec-card-database-backup__total{height:125px;width:125px}.itsec-card[max-height~="300px"][max-width~="250px"] .itsec-card--type-database-backup:not(.itsec-card-database-backup--no-data) .itsec-card-database-backup__total-count{font-size:4em;letter-spacing:-3.5px}.itsec-card[max-height~="300px"][max-width~="250px"] .itsec-card--type-database-backup:not(.itsec-card-database-backup--no-data) .itsec-card-database-backup__total-label{font-size:.75em;bottom:20%}.itsec-card[max-height~="300px"][max-width~="250px"] .itsec-card--type-database-backup:not(.itsec-card-database-backup--no-data) .itsec-card-footer__actions{display:none}
 
dist/backup/dashboard.js CHANGED
@@ -1 +1,11 @@
1
- this.itsec=this.itsec||{},this.itsec.backup=this.itsec.backup||{},this.itsec.backup.dashboard=(window.itsecWebpackJsonP=window.itsecWebpackJsonP||[]).push([[7],{"1ZqX":function(e,t){!function(){e.exports=this.wp.data}()},"8OQS":function(e,t){e.exports=function(e,t){if(null==e)return{};var r,n,a={},c=Object.keys(e);for(n=0;n<c.length;n++)r=c[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}},B6iu:function(e,t,r){},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}()},Mmq9:function(e,t){!function(){e.exports=this.wp.url}()},QILm:function(e,t,r){var n=r("8OQS");e.exports=function(e,t){if(null==e)return{};var r,a,c=n(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(c[r]=e[r])}return c}},Td6G:function(e,t,r){"use strict";r.d(t,"c",(function(){return _})),r.d(t,"b",(function(){return H})),r.d(t,"o",(function(){return z})),r.d(t,"m",(function(){return G})),r.d(t,"j",(function(){return Y})),r.d(t,"e",(function(){return X})),r.d(t,"f",(function(){return Z})),r.d(t,"d",(function(){return $})),r.d(t,"l",(function(){return K})),r.d(t,"a",(function(){return V})),r.d(t,"i",(function(){return ee})),r.d(t,"h",(function(){return te})),r.d(t,"g",(function(){return re})),r.d(t,"k",(function(){return ne})),r.d(t,"n",(function(){return ae}));var n=r("J4zp"),a=r.n(n),c=r("RIqP"),o=r.n(c),i=r("YLtl"),s=r("GRId"),u=r("Mmq9"),l=r("lwsE"),f=r.n(l),d=r("W8MJ"),b=r.n(d),p=r("lSNA"),h=r.n(p),m=r("92Nh"),v=r.n(m),g=r("tmk3"),O=r.n(g);function y(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return j(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return j(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,o=!0,i=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){i=!0,c=e},f:function(){try{o||null==r.return||r.return()}finally{if(i)throw c}}}}function j(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var k=new WeakMap,E=new WeakMap,_=function(){function e(){var t=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;f()(this,e),k.set(this,{writable:!0,value:{}}),E.set(this,{writable:!0,value:{}}),h()(this,"add",(function(e,r){return O()(t,k)[e]||(O()(t,k)[e]=[]),O()(t,k)[e].push(r),t})),h()(this,"hasErrors",(function(){return t.getErrorCodes().length>0})),h()(this,"getErrorCodes",(function(){return Object.keys(O()(t,k))})),h()(this,"getErrorCode",(function(){return t.getErrorCodes()[0]})),h()(this,"getErrorMessages",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;if(e)return O()(t,k)[e];var r=[];for(var n in O()(t,k))O()(t,k).hasOwnProperty(n)&&r.concat(O()(t,k)[n]);return r})),h()(this,"getErrorMessage",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;return e=e||t.getErrorCode(),t.getErrorMessages(e)[0]})),h()(this,"getErrorData",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;return e=e||t.getErrorCode(),O()(t,E)[e]})),h()(this,"getAllErrorMessages",(function(){var e=[];for(var r in O()(t,k))O()(t,k).hasOwnProperty(r)&&e.push.apply(e,o()(O()(t,k)[r]));return e})),r&&(n&&(O()(this,k)[r]=[n]),a&&(O()(this,E)[r]=a))}return b()(e,null,[{key:"fromPHPObject",value:function(t){var r=new e;return v()(r,k,t.errors),v()(r,E,t.error_data),r}},{key:"fromApiError",value:function(t){var r=new e;if(O()(r,k)[t.code]=[t.message],O()(r,E)[t.code]=t.data,t.additional_errors){var n,a=y(t.additional_errors);try{for(a.s();!(n=a.n()).done;){var c=n.value;O()(r,k)[c.code]=[c.message],O()(r,E)[c.code]=c.data}}catch(e){a.e(e)}finally{a.f()}}return r}}]),e}(),w=r("PJYZ"),S=r.n(w),x=r("7W2i"),N=r.n(x),A=r("a1gu"),C=r.n(A),I=r("Nsbk"),P=r.n(I),R=r("oShl"),L=r.n(R),M=r("l3Sj");function T(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=P()(e);if(t){var a=P()(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return C()(this,r)}}var D=function(e){N()(r,e);var t=T(r);function r(e){var n;f()(this,r);for(var a=arguments.length,c=new Array(a>1?a-1:0),o=1;o<a;o++)c[o-1]=arguments[o];for(var i in n=t.call.apply(t,[this,e.message||Object(M.__)("An unknown error occurred.","better-wp-security")].concat(c)),Error.captureStackTrace&&Error.captureStackTrace(S()(n),r),n.__response=e,e)e.hasOwnProperty(i)&&Object.defineProperty(S()(n),i,{value:e[i],configurable:!0,enumerable:!0,writable:!0});return n}return b()(r,[{key:"toString",value:function(){return this.__response.toString()}},{key:"getResponse",value:function(){return this.__response}}]),r}(L()(Error));r("LhCv");var W=r("yXPU"),U=r.n(W),q=r("o0o1"),F=r.n(q),H=function(){function e(t,r,n,a,c,o){f()(this,e),h()(this,"type",void 0),h()(this,"error",void 0),h()(this,"data",void 0),h()(this,"success",void 0),h()(this,"info",void 0),h()(this,"warning",void 0),this.type=t,this.error=r,this.data=n,this.success=a,this.info=c,this.warning=o,Object.seal(this)}var t;return b()(e,[{key:"isSuccess",value:function(){return this.type===e.SUCCESS}}],[{key:"fromResponse",value:(t=U()(F.a.mark((function t(r){var n,a,c,o,i,s,u;return F.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=function(e){var t,n=null===(t=r.headers)||void 0===t?void 0:t.get("X-Messages-".concat(e));return n?JSON.parse(n):[]},204===r.status||!r.json){t.next=7;break}return t.next=4,r.json();case 4:t.t0=t.sent,t.next=8;break;case 7:t.t0=null;case 8:return a=t.t0,c=X(a),o=c.hasErrors()?e.ERROR:e.SUCCESS,i=n("Success"),s=n("Info"),u=n("Warning"),t.abrupt("return",new e(o,c,a,i,s,u));case 15:case"end":return t.stop()}}),t)}))),function(e){return t.apply(this,arguments)})}]),e}();function Q(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return B(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return B(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,o=!0,i=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){i=!0,c=e},f:function(){try{o||null==r.return||r.return()}finally{if(i)throw c}}}}function B(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}Object.defineProperty(H,"SUCCESS",{value:"success",writable:!1,enumerable:!1,configurable:!1}),Object.defineProperty(H,"ERROR",{value:"error",writable:!1,enumerable:!1,configurable:!1});var J=Object(s.createContext)({getUrl:function(e){e="settings"===e?"itsec":"itsec-"+e;var t=u.removeQueryArgs.apply(void 0,[document.location.href].concat(o()(Object.keys(Object(u.getQueryArgs)(document.location.href)))));return Object(u.addQueryArgs)(t,{page:e})}});function z(e){return(0,Object(s.useContext)(J).getUrl)(e)}function G(e){if(e<=999)return e.toString();if(e<=9999){var t=(e/1e3).toFixed(1);return"0"===t.charAt(t.length-1)?t.replace(".0","k"):"".concat(t,"k")}if(e<=99999)return e.toString().substring(0,2)+"k";if(e<=999999)return e.toString().substring(0,3)+"k";if(e<=9999999){var r=(e/1e6).toFixed(1);return"0"===r.charAt(r.length-1)?r.replace(".0","m"):"".concat(r,"m")}if(e<=99999999)return e.toString().substring(0,2)+"m";if(e<=999999999)return e.toString().substring(0,3)+"m";if(e<=9999999999){var n=(e/1e9).toFixed(1);return"0"===n.charAt(n.length-1)?n.replace(".0","b"):"".concat(n,"b")}return e}function Y(e){if(!Object(i.isPlainObject)(e))return!1;var t=Object.keys(e);return 2===t.length&&(t.includes("errors")&&t.includes("error_data"))}function X(e){return e instanceof _?e:Y(e)?_.fromPHPObject(e):function(e){if(!Object(i.isPlainObject)(e))return!1;var t=Object.keys(e);return(3===t.length||4===t.length)&&(!(4===t.length&&!t.includes("additional_errors"))&&(t.includes("code")&&t.includes("message")&&t.includes("data")))}(e)?_.fromApiError(e):new _}function Z(e){var t,r={},n=Q(e);try{for(n.s();!(t=n.n()).done;){var c=a()(t.value,2),o=c[0],i=c[1];r[o]=i}}catch(e){n.e(e)}finally{n.f()}return r}function $(e,t){var r,n=[[],[]],a=Q(e);try{for(a.s();!(r=a.n()).done;){var c=r.value;n[t(c)?0:1].push(c)}}catch(e){a.e(e)}finally{a.f()}return n}function K(e){if(e instanceof Error)throw e;throw new D(e)}var V="https://secure.gravatar.com/avatar/d7a973c7dab26985da5f961be7b74480?s=96&d=mm&f=y&r=g";function ee(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return Object(i.get)(e,["_links","self",0,"targetHints",t],r?void 0:[])}function te(e){return function(e,t){return Object(i.get)(e,["_links",t,0,"href"])}(e,"self")}function re(e,t){if(e&&e.links){var r,n=Q(e.links);try{for(n.s();!(r=n.n()).done;){var a=r.value;if(a.rel===t)return a}}catch(e){n.e(e)}finally{n.f()}}}function ne(e,t){if("object"!==e.type)return e;var r;for(var n in t)t.hasOwnProperty(n)&&"hidden"===t[n]["ui:widget"]&&(r||(r=Object(i.cloneDeep)(e)),delete r.properties[n]);return r||e}function ae(e){var t=[];if(!e)return t;var r=e instanceof _?e:X(Object(i.pick)(e,["code","message","data"]));return"rest_invalid_param"===r.getErrorCode()&&(t=Object.values(r.getErrorData().params)),[].concat(o()(r.getAllErrorMessages()),o()(t))}},TvNi:function(e,t){!function(){e.exports=this.wp.plugins}()},YLtl:function(e,t){!function(){e.exports=this.lodash}()},gf1k:function(e,t){!function(){e.exports=this.itsec.dashboard.dashboard}()},l3Sj:function(e,t){!function(){e.exports=this.wp.i18n}()},pVnL:function(e,t){function r(){return e.exports=r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},r.apply(this,arguments)}e.exports=r},xf52:function(e,t,r){"use strict";r.r(t);var n=r("GRId"),a=r("l3Sj"),c=r("TvNi"),o=r("1ZqX"),i=r("ppSj"),s=r("YLtl"),u=r("FqII"),l=r("gf1k"),f=r("Td6G");r("B6iu");var d={render:Object(o.withDispatch)((function(e){return{addNotice:function(t,r){e("core/notices").createSuccessNotice(t,{id:r,context:"ithemes-security"}),setTimeout((function(){return e("core/notices").removeNotice(r,"ithemes-security")}),1e4)}}}))((function(e){var t=e.card,r=e.config,c=e.addNotice,o=function(e,t){e.endsWith("/backup")&&c(t.message,"backup-complete")};return Object(s.isEmpty)(t.data)?Object(n.createElement)("div",{className:"itsec-card--type-database-backup itsec-card-database-backup--no-data"},Object(n.createElement)(l.CardHeader,null,Object(n.createElement)(l.CardHeaderTitle,{card:t,config:r})),Object(n.createElement)("section",{className:"itsec-card-database-backup__no-data-message"},Object(n.createElement)("p",null,Object(a.__)("Enable database logging or file backups to see a history of completed backups.","better-wp-security"))),Object(n.createElement)(l.CardFooterSchemaActions,{card:t,onComplete:o})):Object(n.createElement)("div",{className:"itsec-card--type-database-backup itsec-card-database-backup--source-".concat(t.data.source)},Object(n.createElement)(l.CardHeader,null,Object(n.createElement)(l.CardHeaderTitle,{card:t,config:r})),Object(n.createElement)("section",{className:"itsec-card-database-backup__total"},Object(n.createElement)("span",{className:"itsec-card-database-backup__total-count"},Object(f.m)(t.data.total),100===t.data.total&&Object(n.createElement)("sup",null,"+")),Object(n.createElement)("span",{className:"itsec-card-database-backup__total-label"},Object(a.__)("Backups","better-wp-security"))),t.data.backups.length>0&&Object(n.createElement)("section",{className:"itsec-card-database-backup__recent-backups-section","aria-label":Object(a.__)("Recent Backups","better-wp-security")},Object(n.createElement)("table",{className:"itsec-card-database-backup__recent-backups"},Object(n.createElement)("thead",null,Object(n.createElement)("tr",null,Object(n.createElement)("th",{scope:"column",className:"itsec-card-database-backup__col-date"},Object(a.__)("Date","better-wp-security")),Object(n.createElement)("th",{scope:"column",className:"itsec-card-database-backup__col-size"},Object(a.__)("Size","better-wp-security")),"files"===t.data.source&&Object(n.createElement)("th",{scope:"column",className:"itsec-card-database-backup__col-actions"},Object(n.createElement)("span",{className:"screen-reader-text"},Object(a.__)("Download","better-wp-security"))))),Object(n.createElement)("tbody",null,Object(s.take)(t.data.backups,50).map((function(e){return Object(n.createElement)("tr",{key:e.url||e.time},Object(n.createElement)("th",{scope:"row",className:"itsec-card-database-backup__col-date"},Object(n.createElement)("span",{className:"itsec-card-database-backup__backup-date"},Object(u.dateI18n)("M d, Y",e.time))," ",Object(n.createElement)("span",{className:"itsec-card-database-backup__backup-time"},Object(u.dateI18n)("g:i A",e.time))),Object(n.createElement)("td",{className:"itsec-card-database-backup__col-size"},e.size_format),"files"===t.data.source&&Object(n.createElement)("td",{className:"itsec-card-database-backup__col-actions"},e.url&&Object(n.createElement)("a",{href:e.url,download:!0},Object(a.__)("Download","better-wp-security"))))}))))),Object(n.createElement)(l.CardFooterSchemaActions,{card:t,onComplete:o}))})),elementQueries:[{type:"width",dir:"max",px:300},{type:"width",dir:"max",px:250},{type:"height",dir:"max",px:300}]};function b(){var e=Object(o.useDispatch)("ithemes-security/dashboard").registerCard;return Object(i.f)(b,(function(){return e("database-backup",d)})),null}r.p=window.itsecWebpackPublicPath,Object(a.setLocaleData)({"":{}},"ithemes-security-pro"),Object(c.registerPlugin)("itsec-backup-dashboard",{render:function(){return Object(n.createElement)(b,null)}})}},[["xf52",0,1,2]]]);
 
 
 
 
 
 
 
 
 
 
1
+ this.itsec=this.itsec||{},this.itsec.backup=this.itsec.backup||{},this.itsec.backup.dashboard=(window.itsecWebpackJsonP=window.itsecWebpackJsonP||[]).push([[9],{"1ZqX":function(e,t){!function(){e.exports=this.wp.data}()},B6iu:function(e,t,n){},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}()},Mmq9:function(e,t){!function(){e.exports=this.wp.url}()},Td6G:function(e,t,n){"use strict";n.d(t,"c",(function(){return p})),n.d(t,"b",(function(){return j})),n.d(t,"o",(function(){return v})),n.d(t,"m",(function(){return w})),n.d(t,"j",(function(){return E})),n.d(t,"e",(function(){return k})),n.d(t,"f",(function(){return y})),n.d(t,"d",(function(){return _})),n.d(t,"l",(function(){return C})),n.d(t,"a",(function(){return N})),n.d(t,"i",(function(){return S})),n.d(t,"h",(function(){return x})),n.d(t,"g",(function(){return L})),n.d(t,"k",(function(){return I})),n.d(t,"n",(function(){return P}));var r=n("YLtl"),c=n("GRId"),s=n("Mmq9"),o=n("lSNA"),i=n.n(o),a=n("92Nh"),u=n.n(a),d=n("tmk3"),l=n.n(d);function h(e,t,n){!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,n)}var f=new WeakMap,b=new WeakMap;class p{constructor(){var e=this;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;h(this,f,{writable:!0,value:{}}),h(this,b,{writable:!0,value:{}}),i()(this,"add",(e,t)=>(l()(this,f)[e]||(l()(this,f)[e]=[]),l()(this,f)[e].push(t),this)),i()(this,"hasErrors",()=>this.getErrorCodes().length>0),i()(this,"getErrorCodes",()=>Object.keys(l()(this,f))),i()(this,"getErrorCode",()=>this.getErrorCodes()[0]),i()(this,"getErrorMessages",(function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;if(t)return l()(e,f)[t];const n=[];for(const t in l()(e,f))l()(e,f).hasOwnProperty(t)&&n.concat(l()(e,f)[t]);return n})),i()(this,"getErrorMessage",(function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;return t=t||e.getErrorCode(),e.getErrorMessages(t)[0]})),i()(this,"getErrorData",(function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;return t=t||e.getErrorCode(),l()(e,b)[t]})),i()(this,"getAllErrorMessages",()=>{const e=[];for(const t in l()(this,f))l()(this,f).hasOwnProperty(t)&&e.push(...l()(this,f)[t]);return e}),t&&(n&&(l()(this,f)[t]=[n]),r&&(l()(this,b)[t]=r))}static fromPHPObject(e){const t=new p;return u()(t,f,e.errors),u()(t,b,e.error_data),t}static fromApiError(e){const t=new p;if(l()(t,f)[e.code]=[e.message],l()(t,b)[e.code]=e.data,e.additional_errors)for(const n of e.additional_errors)l()(t,f)[n.code]=[n.message],l()(t,b)[n.code]=n.data;return t}}var m=n("l3Sj");class O extends Error{constructor(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];super(e.message||Object(m.__)("An unknown error occurred.","better-wp-security"),...n),Error.captureStackTrace&&Error.captureStackTrace(this,O),this.__response=e;for(const t in e)e.hasOwnProperty(t)&&Object.defineProperty(this,t,{value:e[t],configurable:!0,enumerable:!0,writable:!0})}toString(){return this.__response.toString()}getResponse(){return this.__response}}n("LhCv");class j{constructor(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],c=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:[];i()(this,"type",void 0),i()(this,"error",void 0),i()(this,"data",void 0),i()(this,"success",void 0),i()(this,"info",void 0),i()(this,"warning",void 0),this.type=e,this.error=t,this.data=n,this.success=r,this.info=c,this.warning=s,Object.seal(this)}isSuccess(){return this.type===j.SUCCESS}static async fromResponse(e){const t=t=>{var n;const r=null===(n=e.headers)||void 0===n?void 0:n.get("X-Messages-"+t);return r?JSON.parse(r):[]},n=204!==e.status&&e.json?await e.json():null,r=k(n),c=r.hasErrors()?j.ERROR:j.SUCCESS,s=t("Success"),o=t("Info"),i=t("Warning");return new j(c,r,n,s,o,i)}}Object.defineProperty(j,"SUCCESS",{value:"success",writable:!1,enumerable:!1,configurable:!1}),Object.defineProperty(j,"ERROR",{value:"error",writable:!1,enumerable:!1,configurable:!1});const g=Object(c.createContext)({getUrl(e){e="settings"===e?"itsec":"itsec-"+e;const t=Object(s.removeQueryArgs)(document.location.href,...Object.keys(Object(s.getQueryArgs)(document.location.href)));return Object(s.addQueryArgs)(t,{page:e})}});function v(e){const{getUrl:t}=Object(c.useContext)(g);return t(e)}function w(e){if(e<=999)return e.toString();if(e<=9999){const t=(e/1e3).toFixed(1);return"0"===t.charAt(t.length-1)?t.replace(".0","k"):t+"k"}if(e<=99999)return e.toString().substring(0,2)+"k";if(e<=999999)return e.toString().substring(0,3)+"k";if(e<=9999999){const t=(e/1e6).toFixed(1);return"0"===t.charAt(t.length-1)?t.replace(".0","m"):t+"m"}if(e<=99999999)return e.toString().substring(0,2)+"m";if(e<=999999999)return e.toString().substring(0,3)+"m";if(e<=9999999999){const t=(e/1e9).toFixed(1);return"0"===t.charAt(t.length-1)?t.replace(".0","b"):t+"b"}return e}function E(e){if(!Object(r.isPlainObject)(e))return!1;const t=Object.keys(e);return 2===t.length&&(t.includes("errors")&&t.includes("error_data"))}function k(e){return e instanceof p?e:E(e)?p.fromPHPObject(e):function(e){if(!Object(r.isPlainObject)(e))return!1;const t=Object.keys(e);return(3===t.length||4===t.length)&&(!(4===t.length&&!t.includes("additional_errors"))&&(t.includes("code")&&t.includes("message")&&t.includes("data")))}(e)?p.fromApiError(e):new p}function y(e){const t={};for(const[n,r]of e)t[n]=r;return t}function _(e,t){const n=[[],[]];for(const r of e)n[t(r)?0:1].push(r);return n}function C(e){if(e instanceof Error)throw e;throw new O(e)}const N="https://secure.gravatar.com/avatar/d7a973c7dab26985da5f961be7b74480?s=96&d=mm&f=y&r=g";function S(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return Object(r.get)(e,["_links","self",0,"targetHints",t],n?void 0:[])}function x(e){return function(e,t){return Object(r.get)(e,["_links",t,0,"href"])}(e,"self")}function L(e,t){if(e&&e.links)for(const n of e.links)if(n.rel===t)return n}function I(e,t){if("object"!==e.type)return e;let n;for(const c in t)t.hasOwnProperty(c)&&"hidden"===t[c]["ui:widget"]&&(n||(n=Object(r.cloneDeep)(e)),delete n.properties[c]);return n||e}function P(e){let t=[];if(!e)return t;const n=e instanceof p?e:k(Object(r.pick)(e,["code","message","data"]));return"rest_invalid_param"===n.getErrorCode()&&(t=Object.values(n.getErrorData().params)),[...n.getAllErrorMessages(),...t]}},TvNi:function(e,t){!function(){e.exports=this.wp.plugins}()},YLtl:function(e,t){!function(){e.exports=this.lodash}()},gf1k:function(e,t){!function(){e.exports=this.itsec.dashboard.dashboard}()},l3Sj:function(e,t){!function(){e.exports=this.wp.i18n}()},pVnL:function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,n.apply(this,arguments)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},ppSj:function(e,t,n){"use strict";n.d(t,"k",(function(){return i})),n.d(t,"g",(function(){return u})),n.d(t,"h",(function(){return d})),n.d(t,"j",(function(){return f})),n.d(t,"i",(function(){return b})),n.d(t,"f",(function(){return m})),n.d(t,"a",(function(){return O})),n.d(t,"b",(function(){return j})),n.d(t,"c",(function(){return v})),n.d(t,"d",(function(){return w})),n.d(t,"e",(function(){return E}));var r=n("pVnL"),c=n.n(r),s=n("GRId"),o=n("K9lf");function i(e){return Object(o.createHigherOrderComponent)(t=>class extends s.Component{render(){return Object(s.createElement)(t,c()({},this.props,e))}},"withProps")}var a=n("YLtl");
2
+ /**
3
+ * Higher-order component that debounces an action.
4
+ *
5
+ * @license https://github.com/deepsweet/hocs/tree/master/packages/debounce-handler (MIT)
6
+ *
7
+ * @param {string} handlerName
8
+ * @param {number|Function} wait
9
+ * @param {Object} [options]
10
+ * @return {WPComponent} Debounced component.
11
+ */function u(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object(o.createHigherOrderComponent)(r=>class extends s.Component{constructor(){var r;super(...arguments),r=this,this.debouncedPropInvoke=Object(a.debounce)((function(){return r.props[e](...arguments)}),"function"==typeof t?t(this.props):t,n),this.handler=function(e){e&&"function"==typeof e.persist&&e.persist();for(var t=arguments.length,n=new Array(t>1?t-1:0),c=1;c<t;c++)n[c-1]=arguments[c];return r.debouncedPropInvoke(e,...n)}}componentWillUnmount(){this.debouncedPropInvoke.cancel()}render(){const t={...this.props,[e]:this.handler};return Object(s.createElement)(r,t)}},"withDebounceHandler")}function d(e,t){let n;return n=Object(a.isFunction)(t)?[{delay:e,cb:t}]:e,Object(o.createHigherOrderComponent)(e=>class extends s.Component{constructor(){super(...arguments),this.intervalIds=[]}componentDidMount(){for(const e of n)(t=>{this.intervalIds.push(setInterval(()=>t(this.props),e.delay))})(e.cb)}componentWillUnmount(){this.intervalIds.forEach(clearInterval)}render(){return Object(s.createElement)(e,this.props)}},"withInterval")}var l=n("lSNA"),h=n.n(l);Object(o.createHigherOrderComponent)(e=>{var t;return t=class extends s.Component{constructor(){super(...arguments),h()(this,"state",{width:1280}),h()(this,"mounted",!1),h()(this,"ref",null),h()(this,"onWindowResize",()=>{if(!this.mounted)return;const e=Object(s.findDOMNode)(this);if(e instanceof window.HTMLElement){const t=e.offsetWidth;this.setState({width:t})}})}componentDidMount(){this.mounted=!0,window.addEventListener("resize",this.onWindowResize),document.getElementById("collapse-button").addEventListener("click",this.onWindowResize),this.onWindowResize()}componentWillUnmount(){this.mounted=!1,window.removeEventListener("resize",this.onWindowResize),document.getElementById("collapse-button").removeEventListener("click",this.onWindowResize)}render(){const{measureBeforeMount:t,...n}=this.props;return t&&!this.mounted?Object(s.createElement)("div",{className:this.props.className,style:this.props.style}):Object(s.createElement)(e,c()({},n,{width:this.state.width+20}))}},h()(t,"defaultProps",{measureBeforeMount:!1}),t},"withWidth");var f=Object(o.createHigherOrderComponent)(e=>class extends s.Component{constructor(){super(...arguments),h()(this,"state",{pressed:{shift:!1,ctrl:!1,meta:!1,alt:!1}}),h()(this,"mounted",!1),this.listener=this.listener.bind(this),this.onBlur=this.onBlur.bind(this)}componentDidMount(){this.mounted=!0,window.addEventListener("keydown",this.listener),window.addEventListener("keyup",this.listener),window.addEventListener("click",this.listener),window.addEventListener("blur",this.onBlur)}componentWillUnmount(){this.mounted=!1,window.removeEventListener("keydown",this.listener),window.removeEventListener("keyup",this.listener),window.removeEventListener("click",this.listener),window.removeEventListener("blur",this.onBlur)}listener(e){this.mounted&&this.setState({pressed:{shift:e.shiftKey,ctrl:e.ctrlKey,meta:e.metaKey,alt:e.altKey}})}onBlur(){this.setState({pressed:{shift:!1,ctrl:!1,meta:!1,alt:!1}})}render(){return Object(s.createElement)(e,c()({pressedModifierKeys:this.state.pressed},this.props))}},"withPressedModifierKeys");var b=Object(o.createHigherOrderComponent)(e=>function(t){let{navigate:n,...r}=t;return Object(s.createElement)(e,c()({},r,{onClick:e=>{try{r.onClick&&r.onClick(e)}catch(t){throw e.preventDefault(),t}e.defaultPrevented||0!==e.button||r.target&&"_self"!==r.target||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)||(e.preventDefault(),n())}}))},"withNavigate");const p=new WeakMap;function m(e,t){Object(s.useLayoutEffect)(()=>{p.has(e)||(t(),p.set(e,!0))},[])}function O(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const[n,r]=Object(s.useState)("idle"),[c,o]=Object(s.useState)(null),[i,a]=Object(s.useState)(null),u=Object(s.useCallback)((function(){return r("pending"),a(null),e(...arguments).then(e=>{o(e),r("success")}).catch(e=>{a(e),o(null),r("error")})}),[e]);return Object(s.useEffect)(()=>{t&&u()},[u,t]),{execute:u,status:n,value:c,error:i}}function j(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window;const r=Object(s.useRef)();Object(s.useEffect)(()=>{r.current=t},[t]),Object(s.useEffect)(()=>{if(!n||!n.addEventListener)return;const t=e=>r.current(e);return n.addEventListener(e,t),()=>n.removeEventListener(e,t)},[e,n])}const g=["button","submit"];function v(e){const t=Object(s.useRef)(e);Object(s.useEffect)(()=>{t.current=e},[e]);const n=Object(s.useRef)(!1),r=Object(s.useRef)(),c=Object(s.useCallback)(()=>{clearTimeout(r.current)},[]);Object(s.useEffect)(()=>()=>c(),[]),Object(s.useEffect)(()=>{e||c()},[e,c]);const o=Object(s.useCallback)(e=>{const{type:t,target:r}=e;Object(a.includes)(["mouseup","touchend"],t)?n.current=!1:function(e){if(!(e instanceof window.HTMLElement))return!1;switch(e.nodeName){case"A":case"BUTTON":return!0;case"INPUT":return Object(a.includes)(g,e.type)}return!1}(r)&&(n.current=!0)},[]),i=Object(s.useCallback)(e=>{e.persist(),n.current||(r.current=setTimeout(()=>{document.hasFocus()?"function"==typeof t.current&&t.current(e):e.preventDefault()},0))},[]);return{onFocus:c,onMouseDown:o,onMouseUp:o,onTouchStart:o,onTouchEnd:o,onBlur:i}}function w(e,t){const[n,r]=Object(s.useState)(()=>{try{const n=window.localStorage.getItem(e);return n?JSON.parse(n):t}catch(e){return console.error(e),t}});return[n,t=>{try{const c=t instanceof Function?t(n):t;r(c),window.localStorage.setItem(e,JSON.stringify(c))}catch(e){console.error(e)}}]}function E(e){const t=Object(s.useRef)(null),n=Object(s.useRef)(!1),r=Object(s.useRef)(e),c=Object(s.useRef)(e);return c.current=e,Object(s.useLayoutEffect)(()=>{e.forEach((e,c)=>{const s=r.current[c];"function"==typeof e&&e!==s&&!1===n.current&&(s(null),e(t.current))}),r.current=e},e),Object(s.useLayoutEffect)(()=>{n.current=!1}),Object(s.useCallback)(e=>{t.current=e,n.current=!0;(e?c.current:r.current).forEach(t=>{"function"==typeof t?t(e):t&&t.hasOwnProperty("current")&&(t.current=e)})},[])}},xf52:function(e,t,n){"use strict";n.r(t);var r=n("GRId"),c=n("l3Sj"),s=n("TvNi"),o=n("1ZqX"),i=n("ppSj"),a=n("YLtl"),u=n("FqII"),d=n("gf1k"),l=n("Td6G");n("B6iu");const h={render:Object(o.withDispatch)(e=>({addNotice(t,n){e("core/notices").createSuccessNotice(t,{id:n,context:"ithemes-security"}),setTimeout(()=>e("core/notices").removeNotice(n,"ithemes-security"),1e4)}}))((function(e){let{card:t,config:n,addNotice:s}=e;const o=(e,t)=>{e.endsWith("/backup")&&s(t.message,"backup-complete")};return Object(a.isEmpty)(t.data)?Object(r.createElement)("div",{className:"itsec-card--type-database-backup itsec-card-database-backup--no-data"},Object(r.createElement)(d.CardHeader,null,Object(r.createElement)(d.CardHeaderTitle,{card:t,config:n})),Object(r.createElement)("section",{className:"itsec-card-database-backup__no-data-message"},Object(r.createElement)("p",null,Object(c.__)("Enable database logging or file backups to see a history of completed backups.","better-wp-security"))),Object(r.createElement)(d.CardFooterSchemaActions,{card:t,onComplete:o})):Object(r.createElement)("div",{className:"itsec-card--type-database-backup itsec-card-database-backup--source-"+t.data.source},Object(r.createElement)(d.CardHeader,null,Object(r.createElement)(d.CardHeaderTitle,{card:t,config:n})),Object(r.createElement)("section",{className:"itsec-card-database-backup__total"},Object(r.createElement)("span",{className:"itsec-card-database-backup__total-count"},Object(l.m)(t.data.total),100===t.data.total&&Object(r.createElement)("sup",null,"+")),Object(r.createElement)("span",{className:"itsec-card-database-backup__total-label"},Object(c.__)("Backups","better-wp-security"))),t.data.backups.length>0&&Object(r.createElement)("section",{className:"itsec-card-database-backup__recent-backups-section","aria-label":Object(c.__)("Recent Backups","better-wp-security")},Object(r.createElement)("table",{className:"itsec-card-database-backup__recent-backups"},Object(r.createElement)("thead",null,Object(r.createElement)("tr",null,Object(r.createElement)("th",{scope:"column",className:"itsec-card-database-backup__col-date"},Object(c.__)("Date","better-wp-security")),Object(r.createElement)("th",{scope:"column",className:"itsec-card-database-backup__col-size"},Object(c.__)("Size","better-wp-security")),"files"===t.data.source&&Object(r.createElement)("th",{scope:"column",className:"itsec-card-database-backup__col-actions"},Object(r.createElement)("span",{className:"screen-reader-text"},Object(c.__)("Download","better-wp-security"))))),Object(r.createElement)("tbody",null,Object(a.take)(t.data.backups,50).map(e=>Object(r.createElement)("tr",{key:e.url||e.time},Object(r.createElement)("th",{scope:"row",className:"itsec-card-database-backup__col-date"},Object(r.createElement)("span",{className:"itsec-card-database-backup__backup-date"},Object(u.dateI18n)("M d, Y",e.time))," ",Object(r.createElement)("span",{className:"itsec-card-database-backup__backup-time"},Object(u.dateI18n)("g:i A",e.time))),Object(r.createElement)("td",{className:"itsec-card-database-backup__col-size"},e.size_format),"files"===t.data.source&&Object(r.createElement)("td",{className:"itsec-card-database-backup__col-actions"},e.url&&Object(r.createElement)("a",{href:e.url,download:!0},Object(c.__)("Download","better-wp-security")))))))),Object(r.createElement)(d.CardFooterSchemaActions,{card:t,onComplete:o}))})),elementQueries:[{type:"width",dir:"max",px:300},{type:"width",dir:"max",px:250},{type:"height",dir:"max",px:300}]};function f(){const{registerCard:e}=Object(o.useDispatch)("ithemes-security/dashboard");return Object(i.f)(f,()=>e("database-backup",h)),null}n.p=window.itsecWebpackPublicPath,Object(c.setLocaleData)({"":{}},"ithemes-security-pro"),Object(s.registerPlugin)("itsec-backup-dashboard",{render:()=>Object(r.createElement)(f,null)})}},[["xf52",0,1]]]);
dist/core/admin-notices-api.js CHANGED
@@ -1 +1 @@
1
- this.itsec=this.itsec||{},this.itsec.core=this.itsec.core||{},this.itsec.core["admin-notices-api"]=(window.itsecWebpackJsonP=window.itsecWebpackJsonP||[]).push([[9],{"1ZqX":function(t,e){!function(){t.exports=this.wp.data}()},GRId:function(t,e){!function(){t.exports=this.wp.element}()},"M/oR":function(t,e,n){"use strict";n.r(e);var r={};n.r(r),n.d(r,"receiveNotices",(function(){return O})),n.d(r,"startNoticeAction",(function(){return E})),n.d(r,"finishNoticeAction",(function(){return A})),n.d(r,"failedNoticeAction",(function(){return w})),n.d(r,"receiveMutedHighlights",(function(){return _})),n.d(r,"startUpdateMutedHighlight",(function(){return T})),n.d(r,"finishUpdateMutedHighlight",(function(){return j})),n.d(r,"failedUpdateMutedHighlight",(function(){return H})),n.d(r,"doNoticeAction",(function(){return S})),n.d(r,"updateMutedHighlight",(function(){return C})),n.d(r,"RECEIVE_NOTICES",(function(){return P})),n.d(r,"START_NOTICE_ACTION",(function(){return k})),n.d(r,"FINISH_NOTICE_ACTION",(function(){return x})),n.d(r,"FAILED_NOTICE_ACTION",(function(){return N})),n.d(r,"RECEIVE_MUTED_HIGHLIGHTS",(function(){return U})),n.d(r,"START_UPDATE_MUTED_HIGHLIGHT",(function(){return R})),n.d(r,"FINISH_UPDATE_MUTED_HIGHLIGHT",(function(){return M})),n.d(r,"FAILED_UPDATE_MUTED_HIGHLIGHT",(function(){return D}));var i={};n.r(i),n.d(i,"isResolving",(function(){return F})),n.d(i,"isResolved",(function(){return G})),n.d(i,"getNotices",(function(){return L})),n.d(i,"areNoticesLoaded",(function(){return q})),n.d(i,"isDoingAction",(function(){return W})),n.d(i,"getInProgressActions",(function(){return V})),n.d(i,"getMutedHighlights",(function(){return X})),n.d(i,"getMutedHighlightUpdatesInFlight",(function(){return Y}));var o={};n.r(o),n.d(o,"getNotices",(function(){return z})),n.d(o,"getMutedHighlights",(function(){return K}));var u=n("1ZqX"),c=n("RIqP"),a=n.n(c),s=n("lSNA"),f=n.n(s),d=n("YLtl"),l=n("ywyh"),h=n.n(l),g=n("Td6G");function p(t){return{type:"API_FETCH",request:t}}var v={API_FETCH:function(t){var e=t.request;return h()(e).catch(g.l)},SELECT:function(t){var e,n=t.selectorName,r=t.args;return(e=Object(u.select)("ithemes-security/admin-notices"))[n].apply(e,a()(r))},CREATE_NOTICE:function(t){var e=t.status,n=t.content,r=t.options;r.autoDismiss&&(r.id=r.id||Object(d.uniqueId)("itsec-auto-dismiss-"),setTimeout((function(){return Object(u.dispatch)("core/notices").removeNotice(r.id,r.context)}),r.autoDismiss)),Object(u.dispatch)("core/notices").createNotice(e,n,r)}},y=n("o0o1"),m=n.n(y),b=m.a.mark(S),I=m.a.mark(C);function O(t){return{type:P,notices:t}}function E(t,e){return{type:k,noticeId:t,actionId:e}}function A(t,e,n){return{type:x,noticeId:t,actionId:e,response:n}}function w(t,e,n){return{type:N,noticeId:t,actionId:e,error:n}}function _(t){return{type:U,mutedHighlights:t}}function T(t,e){return{type:R,slug:t,mute:e}}function j(t,e){return{type:M,slug:t,mute:e}}function H(t,e,n){return{type:D,slug:t,mute:e,error:n}}function S(t,e){var n,r,i=arguments;return m.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return n=i.length>2&&void 0!==i[2]?i[2]:{},o.next=3,E(t,e);case 3:return o.prev=3,o.next=6,p({path:"/ithemes-security/v1/admin-notices/".concat(t,"/").concat(e),method:"POST",data:n});case 6:r=o.sent,o.next=14;break;case 9:return o.prev=9,o.t0=o.catch(3),o.next=13,w(t,e,o.t0);case 13:return o.abrupt("return",o.t0);case 14:return o.next=16,A(t,e,r);case 16:return o.abrupt("return",r);case 17:case"end":return o.stop()}}),b,null,[[3,9]])}function C(t,e){var n;return m.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,T(t,e);case 2:return r.prev=2,r.next=5,p({path:"/ithemes-security/v1/admin-notices/settings",method:"PUT",data:{muted_highlights:f()({},t,e)}});case 5:n=r.sent,r.next=13;break;case 8:return r.prev=8,r.t0=r.catch(2),r.next=12,H(t,e,r.t0);case 12:return r.abrupt("return",r.t0);case 13:return r.next=15,j(t,e);case 15:return r.abrupt("return",n);case 16:case"end":return r.stop()}}),I,null,[[2,8]])}var P="RECEIVE_NOTICES",k="START_NOTICE_ACTION",x="FINISH_NOTICE_ACTION",N="FAILED_NOTICE_ACTION",U="RECEIVE_MUTED_HIGHLIGHTS",R="START_UPDATE_MUTED_HIGHLIGHT",M="FINISH_UPDATE_MUTED_HIGHLIGHT",D="FAILED_UPDATE_MUTED_HIGHLIGHT";function F(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return Object(u.select)("core/data").isResolving("ithemes-security/admin-notices",t,n)}function G(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return Object(u.select)("core/data").hasFinishedResolution("ithemes-security/admin-notices",t,n)}function L(t){return t.notices}function q(){return G("getNotices")}function W(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return!!t.doingActions[e]&&(""===n||t.doingActions[e].includes(n))}var J=[];function V(t,e){return t.doingActions[e]||J}function X(t){return t.mutedHighlights}function Y(t){return t.mutedHighlightUpdatesInFlight}function Q(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Z(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Q(Object(n),!0).forEach((function(e){f()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Q(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var B={notices:[],doingActions:{},mutedHighlights:{},mutedHighlightUpdatesInFlight:{}};var $=m.a.mark(K),z={fulfill:m.a.mark((function t(){var e;return m.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,p({path:"/ithemes-security/v1/admin-notices"});case 2:return e=t.sent,t.next=5,O(e);case 5:case"end":return t.stop()}}),t)})),shouldInvalidate:function(t){return t.type===x||t.type===M}};function K(){var t;return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,p({path:"/ithemes-security/v1/admin-notices/settings"});case 2:return t=e.sent,e.next=5,_(Object(d.isEmpty)(t.muted_highlights)?{}:t.muted_highlights);case 5:case"end":return e.stop()}}),$)}Object(u.registerStore)("ithemes-security/admin-notices",{controls:v,actions:r,selectors:i,resolvers:o,reducer:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:B,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case P:return Z(Z({},t),{},{notices:a()(e.notices)});case k:return Z(Z({},t),{},{doingActions:Z(Z({},t.doingActions),{},f()({},e.noticeId,[].concat(a()(t.doingActions[e.noticeId]||[]),[e.actionId])))});case x:case N:return Z(Z({},t),{},{doingActions:Z(Z({},t.doingActions),{},f()({},e.noticeId,(t.doingActions[e.noticeId]||[]).filter((function(t){return t!==e.actionId}))))});case U:return Z(Z({},t),{},{mutedHighlights:e.mutedHighlights});case R:return Z(Z({},t),{},{mutedHighlightUpdatesInFlight:Z(Z({},t.mutedHighlightUpdatesInFlight),{},f()({},e.slug,{mute:e.mute}))});case M:return Z(Z({},t),{},{mutedHighlightUpdatesInFlight:Object(d.omit)(t.mutedHighlightUpdatesInFlight,e.slug),mutedHighlights:Z(Z({},t.mutedHighlights),{},f()({},e.slug,e.mute))});case D:return Z(Z({},t),{},{mutedHighlightUpdatesInFlight:Object(d.omit)(t.mutedHighlightUpdatesInFlight,e.slug)});default:return t}}});n.p=window.itsecWebpackPublicPath},Mmq9:function(t,e){!function(){t.exports=this.wp.url}()},Td6G:function(t,e,n){"use strict";n.d(e,"c",(function(){return w})),n.d(e,"b",(function(){return q})),n.d(e,"o",(function(){return X})),n.d(e,"m",(function(){return Y})),n.d(e,"j",(function(){return Q})),n.d(e,"e",(function(){return Z})),n.d(e,"f",(function(){return B})),n.d(e,"d",(function(){return $})),n.d(e,"l",(function(){return z})),n.d(e,"a",(function(){return K})),n.d(e,"i",(function(){return tt})),n.d(e,"h",(function(){return et})),n.d(e,"g",(function(){return nt})),n.d(e,"k",(function(){return rt})),n.d(e,"n",(function(){return it}));var r=n("J4zp"),i=n.n(r),o=n("RIqP"),u=n.n(o),c=n("YLtl"),a=n("GRId"),s=n("Mmq9"),f=n("lwsE"),d=n.n(f),l=n("W8MJ"),h=n.n(l),g=n("lSNA"),p=n.n(g),v=n("92Nh"),y=n.n(v),m=n("tmk3"),b=n.n(m);function I(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return O(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return O(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,u=!0,c=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return u=t.done,t},e:function(t){c=!0,o=t},f:function(){try{u||null==n.return||n.return()}finally{if(c)throw o}}}}function O(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var E=new WeakMap,A=new WeakMap,w=function(){function t(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;d()(this,t),E.set(this,{writable:!0,value:{}}),A.set(this,{writable:!0,value:{}}),p()(this,"add",(function(t,n){return b()(e,E)[t]||(b()(e,E)[t]=[]),b()(e,E)[t].push(n),e})),p()(this,"hasErrors",(function(){return e.getErrorCodes().length>0})),p()(this,"getErrorCodes",(function(){return Object.keys(b()(e,E))})),p()(this,"getErrorCode",(function(){return e.getErrorCodes()[0]})),p()(this,"getErrorMessages",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;if(t)return b()(e,E)[t];var n=[];for(var r in b()(e,E))b()(e,E).hasOwnProperty(r)&&n.concat(b()(e,E)[r]);return n})),p()(this,"getErrorMessage",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;return t=t||e.getErrorCode(),e.getErrorMessages(t)[0]})),p()(this,"getErrorData",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;return t=t||e.getErrorCode(),b()(e,A)[t]})),p()(this,"getAllErrorMessages",(function(){var t=[];for(var n in b()(e,E))b()(e,E).hasOwnProperty(n)&&t.push.apply(t,u()(b()(e,E)[n]));return t})),n&&(r&&(b()(this,E)[n]=[r]),i&&(b()(this,A)[n]=i))}return h()(t,null,[{key:"fromPHPObject",value:function(e){var n=new t;return y()(n,E,e.errors),y()(n,A,e.error_data),n}},{key:"fromApiError",value:function(e){var n=new t;if(b()(n,E)[e.code]=[e.message],b()(n,A)[e.code]=e.data,e.additional_errors){var r,i=I(e.additional_errors);try{for(i.s();!(r=i.n()).done;){var o=r.value;b()(n,E)[o.code]=[o.message],b()(n,A)[o.code]=o.data}}catch(t){i.e(t)}finally{i.f()}}return n}}]),t}(),_=n("PJYZ"),T=n.n(_),j=n("7W2i"),H=n.n(j),S=n("a1gu"),C=n.n(S),P=n("Nsbk"),k=n.n(P),x=n("oShl"),N=n.n(x),U=n("l3Sj");function R(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=k()(t);if(e){var i=k()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return C()(this,n)}}var M=function(t){H()(n,t);var e=R(n);function n(t){var r;d()(this,n);for(var i=arguments.length,o=new Array(i>1?i-1:0),u=1;u<i;u++)o[u-1]=arguments[u];for(var c in r=e.call.apply(e,[this,t.message||Object(U.__)("An unknown error occurred.","better-wp-security")].concat(o)),Error.captureStackTrace&&Error.captureStackTrace(T()(r),n),r.__response=t,t)t.hasOwnProperty(c)&&Object.defineProperty(T()(r),c,{value:t[c],configurable:!0,enumerable:!0,writable:!0});return r}return h()(n,[{key:"toString",value:function(){return this.__response.toString()}},{key:"getResponse",value:function(){return this.__response}}]),n}(N()(Error));n("LhCv");var D=n("yXPU"),F=n.n(D),G=n("o0o1"),L=n.n(G),q=function(){function t(e,n,r,i,o,u){d()(this,t),p()(this,"type",void 0),p()(this,"error",void 0),p()(this,"data",void 0),p()(this,"success",void 0),p()(this,"info",void 0),p()(this,"warning",void 0),this.type=e,this.error=n,this.data=r,this.success=i,this.info=o,this.warning=u,Object.seal(this)}var e;return h()(t,[{key:"isSuccess",value:function(){return this.type===t.SUCCESS}}],[{key:"fromResponse",value:(e=F()(L.a.mark((function e(n){var r,i,o,u,c,a,s;return L.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=function(t){var e,r=null===(e=n.headers)||void 0===e?void 0:e.get("X-Messages-".concat(t));return r?JSON.parse(r):[]},204===n.status||!n.json){e.next=7;break}return e.next=4,n.json();case 4:e.t0=e.sent,e.next=8;break;case 7:e.t0=null;case 8:return i=e.t0,o=Z(i),u=o.hasErrors()?t.ERROR:t.SUCCESS,c=r("Success"),a=r("Info"),s=r("Warning"),e.abrupt("return",new t(u,o,i,c,a,s));case 15:case"end":return e.stop()}}),e)}))),function(t){return e.apply(this,arguments)})}]),t}();function W(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return J(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return J(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,u=!0,c=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return u=t.done,t},e:function(t){c=!0,o=t},f:function(){try{u||null==n.return||n.return()}finally{if(c)throw o}}}}function J(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}Object.defineProperty(q,"SUCCESS",{value:"success",writable:!1,enumerable:!1,configurable:!1}),Object.defineProperty(q,"ERROR",{value:"error",writable:!1,enumerable:!1,configurable:!1});var V=Object(a.createContext)({getUrl:function(t){t="settings"===t?"itsec":"itsec-"+t;var e=s.removeQueryArgs.apply(void 0,[document.location.href].concat(u()(Object.keys(Object(s.getQueryArgs)(document.location.href)))));return Object(s.addQueryArgs)(e,{page:t})}});function X(t){return(0,Object(a.useContext)(V).getUrl)(t)}function Y(t){if(t<=999)return t.toString();if(t<=9999){var e=(t/1e3).toFixed(1);return"0"===e.charAt(e.length-1)?e.replace(".0","k"):"".concat(e,"k")}if(t<=99999)return t.toString().substring(0,2)+"k";if(t<=999999)return t.toString().substring(0,3)+"k";if(t<=9999999){var n=(t/1e6).toFixed(1);return"0"===n.charAt(n.length-1)?n.replace(".0","m"):"".concat(n,"m")}if(t<=99999999)return t.toString().substring(0,2)+"m";if(t<=999999999)return t.toString().substring(0,3)+"m";if(t<=9999999999){var r=(t/1e9).toFixed(1);return"0"===r.charAt(r.length-1)?r.replace(".0","b"):"".concat(r,"b")}return t}function Q(t){if(!Object(c.isPlainObject)(t))return!1;var e=Object.keys(t);return 2===e.length&&(e.includes("errors")&&e.includes("error_data"))}function Z(t){return t instanceof w?t:Q(t)?w.fromPHPObject(t):function(t){if(!Object(c.isPlainObject)(t))return!1;var e=Object.keys(t);return(3===e.length||4===e.length)&&(!(4===e.length&&!e.includes("additional_errors"))&&(e.includes("code")&&e.includes("message")&&e.includes("data")))}(t)?w.fromApiError(t):new w}function B(t){var e,n={},r=W(t);try{for(r.s();!(e=r.n()).done;){var o=i()(e.value,2),u=o[0],c=o[1];n[u]=c}}catch(t){r.e(t)}finally{r.f()}return n}function $(t,e){var n,r=[[],[]],i=W(t);try{for(i.s();!(n=i.n()).done;){var o=n.value;r[e(o)?0:1].push(o)}}catch(t){i.e(t)}finally{i.f()}return r}function z(t){if(t instanceof Error)throw t;throw new M(t)}var K="https://secure.gravatar.com/avatar/d7a973c7dab26985da5f961be7b74480?s=96&d=mm&f=y&r=g";function tt(t,e){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return Object(c.get)(t,["_links","self",0,"targetHints",e],n?void 0:[])}function et(t){return function(t,e){return Object(c.get)(t,["_links",e,0,"href"])}(t,"self")}function nt(t,e){if(t&&t.links){var n,r=W(t.links);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(i.rel===e)return i}}catch(t){r.e(t)}finally{r.f()}}}function rt(t,e){if("object"!==t.type)return t;var n;for(var r in e)e.hasOwnProperty(r)&&"hidden"===e[r]["ui:widget"]&&(n||(n=Object(c.cloneDeep)(t)),delete n.properties[r]);return n||t}function it(t){var e=[];if(!t)return e;var n=t instanceof w?t:Z(Object(c.pick)(t,["code","message","data"]));return"rest_invalid_param"===n.getErrorCode()&&(e=Object.values(n.getErrorData().params)),[].concat(u()(n.getAllErrorMessages()),u()(e))}},YLtl:function(t,e){!function(){t.exports=this.lodash}()},l3Sj:function(t,e){!function(){t.exports=this.wp.i18n}()},ywyh:function(t,e){!function(){t.exports=this.wp.apiFetch}()}},[["M/oR",0,1]]]);
1
+ this.itsec=this.itsec||{},this.itsec.core=this.itsec.core||{},this.itsec.core["admin-notices-api"]=(window.itsecWebpackJsonP=window.itsecWebpackJsonP||[]).push([[11],{"1ZqX":function(t,e){!function(){t.exports=this.wp.data}()},GRId:function(t,e){!function(){t.exports=this.wp.element}()},"M/oR":function(t,e,n){"use strict";n.r(e);var r={};n.r(r),n.d(r,"receiveNotices",(function(){return g})),n.d(r,"startNoticeAction",(function(){return f})),n.d(r,"finishNoticeAction",(function(){return p})),n.d(r,"failedNoticeAction",(function(){return m})),n.d(r,"receiveMutedHighlights",(function(){return I})),n.d(r,"startUpdateMutedHighlight",(function(){return E})),n.d(r,"finishUpdateMutedHighlight",(function(){return v})),n.d(r,"failedUpdateMutedHighlight",(function(){return y})),n.d(r,"doNoticeAction",(function(){return b})),n.d(r,"updateMutedHighlight",(function(){return O})),n.d(r,"RECEIVE_NOTICES",(function(){return _})),n.d(r,"START_NOTICE_ACTION",(function(){return T})),n.d(r,"FINISH_NOTICE_ACTION",(function(){return H})),n.d(r,"FAILED_NOTICE_ACTION",(function(){return A})),n.d(r,"RECEIVE_MUTED_HIGHLIGHTS",(function(){return w})),n.d(r,"START_UPDATE_MUTED_HIGHLIGHT",(function(){return j})),n.d(r,"FINISH_UPDATE_MUTED_HIGHLIGHT",(function(){return C})),n.d(r,"FAILED_UPDATE_MUTED_HIGHLIGHT",(function(){return S}));var i={};n.r(i),n.d(i,"isResolving",(function(){return N})),n.d(i,"isResolved",(function(){return U})),n.d(i,"getNotices",(function(){return M})),n.d(i,"areNoticesLoaded",(function(){return P})),n.d(i,"isDoingAction",(function(){return R})),n.d(i,"getInProgressActions",(function(){return F})),n.d(i,"getMutedHighlights",(function(){return k})),n.d(i,"getMutedHighlightUpdatesInFlight",(function(){return G}));var o={};n.r(o),n.d(o,"getNotices",(function(){return x})),n.d(o,"getMutedHighlights",(function(){return q}));var s=n("1ZqX"),c=n("YLtl"),u=n("ywyh"),d=n.n(u),a=n("Td6G");function h(t){return{type:"API_FETCH",request:t}}var l={API_FETCH(t){let{request:e}=t;return d()(e).catch(a.l)},SELECT(t){let{selectorName:e,args:n}=t;return Object(s.select)("ithemes-security/admin-notices")[e](...n)},CREATE_NOTICE(t){let{status:e,content:n,options:r}=t;r.autoDismiss&&(r.id=r.id||Object(c.uniqueId)("itsec-auto-dismiss-"),setTimeout(()=>Object(s.dispatch)("core/notices").removeNotice(r.id,r.context),r.autoDismiss)),Object(s.dispatch)("core/notices").createNotice(e,n,r)}};function g(t){return{type:_,notices:t}}function f(t,e){return{type:T,noticeId:t,actionId:e}}function p(t,e,n){return{type:H,noticeId:t,actionId:e,response:n}}function m(t,e,n){return{type:A,noticeId:t,actionId:e,error:n}}function I(t){return{type:w,mutedHighlights:t}}function E(t,e){return{type:j,slug:t,mute:e}}function v(t,e){return{type:C,slug:t,mute:e}}function y(t,e,n){return{type:S,slug:t,mute:e,error:n}}function*b(t,e){let n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};yield f(t,e);try{n=yield h({path:`/ithemes-security/v1/admin-notices/${t}/${e}`,method:"POST",data:r})}catch(n){return yield m(t,e,n),n}return yield p(t,e,n),n}function*O(t,e){let n;yield E(t,e);try{n=yield h({path:"/ithemes-security/v1/admin-notices/settings",method:"PUT",data:{muted_highlights:{[t]:e}}})}catch(n){return yield y(t,e,n),n}return yield v(t,e),n}const _="RECEIVE_NOTICES",T="START_NOTICE_ACTION",H="FINISH_NOTICE_ACTION",A="FAILED_NOTICE_ACTION",w="RECEIVE_MUTED_HIGHLIGHTS",j="START_UPDATE_MUTED_HIGHLIGHT",C="FINISH_UPDATE_MUTED_HIGHLIGHT",S="FAILED_UPDATE_MUTED_HIGHLIGHT";function N(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return Object(s.select)("core/data").isResolving("ithemes-security/admin-notices",t,n)}function U(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return Object(s.select)("core/data").hasFinishedResolution("ithemes-security/admin-notices",t,n)}function M(t){return t.notices}function P(){return U("getNotices")}function R(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return!!t.doingActions[e]&&(""===n||t.doingActions[e].includes(n))}const D=[];function F(t,e){return t.doingActions[e]||D}function k(t){return t.mutedHighlights}function G(t){return t.mutedHighlightUpdatesInFlight}const L={notices:[],doingActions:{},mutedHighlights:{},mutedHighlightUpdatesInFlight:{}};const x={*fulfill(){const t=yield h({path:"/ithemes-security/v1/admin-notices"});yield g(t)},shouldInvalidate:t=>t.type===H||t.type===C};function*q(){const t=yield h({path:"/ithemes-security/v1/admin-notices/settings"});yield I(Object(c.isEmpty)(t.muted_highlights)?{}:t.muted_highlights)}Object(s.registerStore)("ithemes-security/admin-notices",{controls:l,actions:r,selectors:i,resolvers:o,reducer:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:L,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case _:return{...t,notices:[...e.notices]};case T:return{...t,doingActions:{...t.doingActions,[e.noticeId]:[...t.doingActions[e.noticeId]||[],e.actionId]}};case H:case A:return{...t,doingActions:{...t.doingActions,[e.noticeId]:(t.doingActions[e.noticeId]||[]).filter(t=>t!==e.actionId)}};case w:return{...t,mutedHighlights:e.mutedHighlights};case j:return{...t,mutedHighlightUpdatesInFlight:{...t.mutedHighlightUpdatesInFlight,[e.slug]:{mute:e.mute}}};case C:return{...t,mutedHighlightUpdatesInFlight:Object(c.omit)(t.mutedHighlightUpdatesInFlight,e.slug),mutedHighlights:{...t.mutedHighlights,[e.slug]:e.mute}};case S:return{...t,mutedHighlightUpdatesInFlight:Object(c.omit)(t.mutedHighlightUpdatesInFlight,e.slug)};default:return t}}});n.p=window.itsecWebpackPublicPath},Mmq9:function(t,e){!function(){t.exports=this.wp.url}()},Td6G:function(t,e,n){"use strict";n.d(e,"c",(function(){return p})),n.d(e,"b",(function(){return E})),n.d(e,"o",(function(){return y})),n.d(e,"m",(function(){return b})),n.d(e,"j",(function(){return O})),n.d(e,"e",(function(){return _})),n.d(e,"f",(function(){return T})),n.d(e,"d",(function(){return H})),n.d(e,"l",(function(){return A})),n.d(e,"a",(function(){return w})),n.d(e,"i",(function(){return j})),n.d(e,"h",(function(){return C})),n.d(e,"g",(function(){return S})),n.d(e,"k",(function(){return N})),n.d(e,"n",(function(){return U}));var r=n("YLtl"),i=n("GRId"),o=n("Mmq9"),s=n("lSNA"),c=n.n(s),u=n("92Nh"),d=n.n(u),a=n("tmk3"),h=n.n(a);function l(t,e,n){!function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,e),e.set(t,n)}var g=new WeakMap,f=new WeakMap;class p{constructor(){var t=this;let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;l(this,g,{writable:!0,value:{}}),l(this,f,{writable:!0,value:{}}),c()(this,"add",(t,e)=>(h()(this,g)[t]||(h()(this,g)[t]=[]),h()(this,g)[t].push(e),this)),c()(this,"hasErrors",()=>this.getErrorCodes().length>0),c()(this,"getErrorCodes",()=>Object.keys(h()(this,g))),c()(this,"getErrorCode",()=>this.getErrorCodes()[0]),c()(this,"getErrorMessages",(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;if(e)return h()(t,g)[e];const n=[];for(const e in h()(t,g))h()(t,g).hasOwnProperty(e)&&n.concat(h()(t,g)[e]);return n})),c()(this,"getErrorMessage",(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;return e=e||t.getErrorCode(),t.getErrorMessages(e)[0]})),c()(this,"getErrorData",(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;return e=e||t.getErrorCode(),h()(t,f)[e]})),c()(this,"getAllErrorMessages",()=>{const t=[];for(const e in h()(this,g))h()(this,g).hasOwnProperty(e)&&t.push(...h()(this,g)[e]);return t}),e&&(n&&(h()(this,g)[e]=[n]),r&&(h()(this,f)[e]=r))}static fromPHPObject(t){const e=new p;return d()(e,g,t.errors),d()(e,f,t.error_data),e}static fromApiError(t){const e=new p;if(h()(e,g)[t.code]=[t.message],h()(e,f)[t.code]=t.data,t.additional_errors)for(const n of t.additional_errors)h()(e,g)[n.code]=[n.message],h()(e,f)[n.code]=n.data;return e}}var m=n("l3Sj");class I extends Error{constructor(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];super(t.message||Object(m.__)("An unknown error occurred.","better-wp-security"),...n),Error.captureStackTrace&&Error.captureStackTrace(this,I),this.__response=t;for(const e in t)t.hasOwnProperty(e)&&Object.defineProperty(this,e,{value:t[e],configurable:!0,enumerable:!0,writable:!0})}toString(){return this.__response.toString()}getResponse(){return this.__response}}n("LhCv");class E{constructor(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:[];c()(this,"type",void 0),c()(this,"error",void 0),c()(this,"data",void 0),c()(this,"success",void 0),c()(this,"info",void 0),c()(this,"warning",void 0),this.type=t,this.error=e,this.data=n,this.success=r,this.info=i,this.warning=o,Object.seal(this)}isSuccess(){return this.type===E.SUCCESS}static async fromResponse(t){const e=e=>{var n;const r=null===(n=t.headers)||void 0===n?void 0:n.get("X-Messages-"+e);return r?JSON.parse(r):[]},n=204!==t.status&&t.json?await t.json():null,r=_(n),i=r.hasErrors()?E.ERROR:E.SUCCESS,o=e("Success"),s=e("Info"),c=e("Warning");return new E(i,r,n,o,s,c)}}Object.defineProperty(E,"SUCCESS",{value:"success",writable:!1,enumerable:!1,configurable:!1}),Object.defineProperty(E,"ERROR",{value:"error",writable:!1,enumerable:!1,configurable:!1});const v=Object(i.createContext)({getUrl(t){t="settings"===t?"itsec":"itsec-"+t;const e=Object(o.removeQueryArgs)(document.location.href,...Object.keys(Object(o.getQueryArgs)(document.location.href)));return Object(o.addQueryArgs)(e,{page:t})}});function y(t){const{getUrl:e}=Object(i.useContext)(v);return e(t)}function b(t){if(t<=999)return t.toString();if(t<=9999){const e=(t/1e3).toFixed(1);return"0"===e.charAt(e.length-1)?e.replace(".0","k"):e+"k"}if(t<=99999)return t.toString().substring(0,2)+"k";if(t<=999999)return t.toString().substring(0,3)+"k";if(t<=9999999){const e=(t/1e6).toFixed(1);return"0"===e.charAt(e.length-1)?e.replace(".0","m"):e+"m"}if(t<=99999999)return t.toString().substring(0,2)+"m";if(t<=999999999)return t.toString().substring(0,3)+"m";if(t<=9999999999){const e=(t/1e9).toFixed(1);return"0"===e.charAt(e.length-1)?e.replace(".0","b"):e+"b"}return t}function O(t){if(!Object(r.isPlainObject)(t))return!1;const e=Object.keys(t);return 2===e.length&&(e.includes("errors")&&e.includes("error_data"))}function _(t){return t instanceof p?t:O(t)?p.fromPHPObject(t):function(t){if(!Object(r.isPlainObject)(t))return!1;const e=Object.keys(t);return(3===e.length||4===e.length)&&(!(4===e.length&&!e.includes("additional_errors"))&&(e.includes("code")&&e.includes("message")&&e.includes("data")))}(t)?p.fromApiError(t):new p}function T(t){const e={};for(const[n,r]of t)e[n]=r;return e}function H(t,e){const n=[[],[]];for(const r of t)n[e(r)?0:1].push(r);return n}function A(t){if(t instanceof Error)throw t;throw new I(t)}const w="https://secure.gravatar.com/avatar/d7a973c7dab26985da5f961be7b74480?s=96&d=mm&f=y&r=g";function j(t,e){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return Object(r.get)(t,["_links","self",0,"targetHints",e],n?void 0:[])}function C(t){return function(t,e){return Object(r.get)(t,["_links",e,0,"href"])}(t,"self")}function S(t,e){if(t&&t.links)for(const n of t.links)if(n.rel===e)return n}function N(t,e){if("object"!==t.type)return t;let n;for(const i in e)e.hasOwnProperty(i)&&"hidden"===e[i]["ui:widget"]&&(n||(n=Object(r.cloneDeep)(t)),delete n.properties[i]);return n||t}function U(t){let e=[];if(!t)return e;const n=t instanceof p?t:_(Object(r.pick)(t,["code","message","data"]));return"rest_invalid_param"===n.getErrorCode()&&(e=Object.values(n.getErrorData().params)),[...n.getAllErrorMessages(),...e]}},YLtl:function(t,e){!function(){t.exports=this.lodash}()},l3Sj:function(t,e){!function(){t.exports=this.wp.i18n}()},ywyh:function(t,e){!function(){t.exports=this.wp.apiFetch}()}},[["M/oR",0,1]]]);
dist/core/admin-notices-dashboard-admin-bar.css CHANGED
@@ -1,10 +1,5 @@
1
- @keyframes itsec-animation-fade-in-constant{from{opacity:0}to{opacity:1}}.itsec-admin-notice{background:white;border-radius:3px;box-shadow:0 0 5px rgba(211,211,211,0.35)}.itsec-admin-notice .itsec-admin-notice__header{background:#eeecec;padding:10px;border-top-left-radius:3px;border-top-right-radius:3px}.itsec-admin-notice .itsec-admin-notice__header:last-child{border-bottom-left-radius:3px;border-bottom-right-radius:3px}.itsec-admin-notice .itsec-admin-notice__header .components-button{margin-top:1em;padding:.5em 1em;background:#E1f2fc;color:#0081E3;border:1px solid #0081E3;transition:background-color 300ms, color 150ms}.itsec-admin-notice .itsec-admin-notice__header .components-button:hover{background:#0081E3;color:white}.itsec-admin-notice .itsec-admin-notice__header .components-button.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-admin-notice .itsec-admin-notice__header .components-button.is-busy:hover{color:#0081E3}.itsec-admin-notice--severity-error.itsec-admin-notice .itsec-admin-notice__header{background:#d94f4f}.itsec-admin-notice--severity-error.itsec-admin-notice .itsec-admin-notice__header .components-button{padding:.5em 1em;background:#fcefef;color:#d94f4f;border:1px solid #d94f4f;transition:background-color 300ms, color 150ms}.itsec-admin-notice--severity-error.itsec-admin-notice .itsec-admin-notice__header .components-button:hover{background:#d94f4f;color:white}.itsec-admin-notice--severity-error.itsec-admin-notice .itsec-admin-notice__header .components-button.is-busy{animation:components-button__busy-animation 2500ms infinite linear;background-size:100px 100%;background-image:repeating-linear-gradient(-45deg, #fcefef, #fff 11px, #fff 10px, #fcefef 20px);opacity:1}.itsec-admin-notice--severity-error.itsec-admin-notice .itsec-admin-notice__header .components-button.is-busy:hover{color:#d94f4f}.itsec-admin-notice--severity-warning.itsec-admin-notice .itsec-admin-notice__header{background:#f78b53}.itsec-admin-notice--severity-warning.itsec-admin-notice .itsec-admin-notice__header .components-button{padding:.5em 1em;background:#fef1ea;color:#f78b53;border:1px solid #f78b53;transition:background-color 300ms, color 150ms}.itsec-admin-notice--severity-warning.itsec-admin-notice .itsec-admin-notice__header .components-button:hover{background:#f78b53;color:white}.itsec-admin-notice--severity-warning.itsec-admin-notice .itsec-admin-notice__header .components-button.is-busy{animation:components-button__busy-animation 2500ms infinite linear;background-size:100px 100%;background-image:repeating-linear-gradient(-45deg, #fef1ea, #fff 11px, #fff 10px, #fef1ea 20px);opacity:1}.itsec-admin-notice--severity-warning.itsec-admin-notice .itsec-admin-notice__header .components-button.is-busy:hover{color:#f78b53}.itsec-admin-notice--severity-info.itsec-admin-notice .itsec-admin-notice__header{background:#00a0d2}.itsec-admin-notice--severity-success.itsec-admin-notice .itsec-admin-notice__header{background:#4ab866}.itsec-admin-notice--severity-success.itsec-admin-notice .itsec-admin-notice__header .components-button{padding:.5em 1em;background:#e4f4e8;color:#4ab866;border:1px solid #4ab866;transition:background-color 300ms, color 150ms}.itsec-admin-notice--severity-success.itsec-admin-notice .itsec-admin-notice__header .components-button:hover{background:#4ab866;color:white}.itsec-admin-notice--severity-success.itsec-admin-notice .itsec-admin-notice__header .components-button.is-busy{animation:components-button__busy-animation 2500ms infinite linear;background-size:100px 100%;background-image:repeating-linear-gradient(-45deg, #e4f4e8, #fff 11px, #fff 10px, #e4f4e8 20px);opacity:1}.itsec-admin-notice--severity-success.itsec-admin-notice .itsec-admin-notice__header .components-button.is-busy:hover{color:#4ab866}.itsec-admin-notice .itsec-admin-notice .itsec-admin-notice__header:last-child{border-bottom-left-radius:3px;border-bottom-right-radius:3px}.itsec-admin-notice .itsec-admin-notice__header .itsec-admin-notice__header-inset{background:white;border-radius:5px;padding:10px}.itsec-admin-notice .itsec-admin-notice__header h4{font-size:14px;margin:0;color:#0A1A23;font-weight:600;text-transform:none}.itsec-admin-notice .itsec-admin-notice__message{border-left:1px solid #E5EAEE;border-right:1px solid #E5EAEE;padding:10px 20px}.itsec-admin-notice .itsec-admin-notice__message p:first-child{margin-top:0}.itsec-admin-notice .itsec-admin-notice__message p:last-child{margin-bottom:0}.itsec-admin-notice .itsec-admin-notice__meta{border-left:1px solid #E5EAEE;border-right:1px solid #E5EAEE;background:#DCEBF3;padding:5px 20px;margin:0;display:grid;grid-template:auto / -webkit-min-content 1fr;grid-template:auto / min-content 1fr;grid-gap:5px 20px}.itsec-admin-notice .itsec-admin-notice__meta dt,.itsec-admin-notice .itsec-admin-notice__meta dd{margin:0}.itsec-admin-notice .itsec-admin-notice__meta dt{text-transform:uppercase;color:#040404}.itsec-admin-notice .itsec-admin-notice__footer{border-left:1px solid #E5EAEE;border-right:1px solid #E5EAEE;padding:5px 20px;font-size:11px}.itsec-admin-notice>:last-child:not(.itsec-admin-notice__header){border-bottom:1px solid #E5EAEE}
2
-
3
  @keyframes itsec-animation-fade-in-constant{from{opacity:0}to{opacity:1}}.itsec-admin-notice-list-actions .components-button.has-icon{padding:2px !important}.itsec-admin-notice-list-actions .components-button.has-icon .dashicon{margin:0}.itsec-admin-notice-list-actions__more-menu-items .components-popover__content>div{overflow:hidden;padding:7px 0}.itsec-admin-notice-list-actions__more-menu-items .components-button{width:100%;min-height:38px;box-sizing:border-box;padding:10px;color:#0073aa;justify-content:space-between;align-items:center}.itsec-admin-notice-list-actions__more-menu-items .components-button:focus{outline-offset:-2px;outline:1px dotted #555d66;box-shadow:none}.itsec-admin-notice-list-actions__more-menu-items .components-button:hover{color:#191e23;background:#f3f4f5}.itsec-admin-notice-list-actions__more-menu-items .components-button .components-spinner{margin:0}
4
-
5
- @keyframes itsec-animation-fade-in-constant{from{opacity:0}to{opacity:1}}.itsec-admin-notice-list{margin:0}.itsec-admin-notice-list-item-container{display:grid;grid-template:auto / -webkit-min-content 1fr;grid-template:auto / min-content 1fr;grid-gap:1em;margin-bottom:2em}.itsec-admin-notice-list-item-container:last-child{margin-bottom:0}
6
-
7
- @keyframes itsec-animation-fade-in-constant{from{opacity:0}to{opacity:1}}@keyframes itsec-animation-fade-in-constant{from{opacity:0}to{opacity:1}}.itsec-admin-bar-admin-notices__content.components-popover .components-popover__content{border-color:1px solid #E5EAEE;box-shadow:0 2px 6px rgba(0,0,0,0.25)}.itsec-admin-bar-admin-notices__content.components-popover::after{border-color:#E5EAEE !important}.itsec-admin-notice-panel{padding:1em;background:#fff;width:420px;max-width:100%;box-sizing:border-box}.itsec-admin-notice-panel .itsec-admin-notice-panel__header{border-bottom:1px solid #7ABEED;margin-bottom:1em}.itsec-admin-notice-panel .itsec-admin-notice-panel__header h3{color:#0081E3;text-align:center;margin:1rem 0 !important}.itsec-admin-notice-panel .itsec-admin-notice-panel__header p{text-align:center;font-style:oblique;margin:1rem 0 !important}.is-mobile .itsec-admin-notice-panel{width:100%;overflow-x:auto;height:100%}.is-mobile .itsec-admin-notice-panel header h3{display:none}.is-mobile .itsec-admin-notice-panel header p{margin-top:0}.itsec-admin-notice-panel .itsec-admin-notice-panel__configure-trigger.components-button{padding:0;height:auto;width:auto;min-width:0;position:absolute;right:1em;top:1em;transition:opacity 400ms}.itsec-admin-notice-panel .itsec-admin-notice-panel__configure-trigger.components-button:hover{opacity:.5;box-shadow:none !important}.itsec-admin-notice-panel .itsec-admin-notice-panel__configure-trigger.components-button .dashicon{margin:0}.itsec-admin-notice-panel.itsec-admin-notice-panel--is-configuring .itsec-admin-notice-panel__configure-trigger.components-button{color:#0081E3}.itsec-admin-notice-panel.itsec-admin-notice-panel--is-configuring .itsec-admin-notice-panel__configure-trigger.components-button:hover{color:#0081E3}.itsec-admin-notice-panel .itsec-admin-notice-panel__configure-highlighted-logs{border-bottom:1px solid #7ABEED;margin-bottom:1em;padding-bottom:1em}.itsec-admin-notice-panel .itsec-admin-notice-panel__configure-highlighted-logs li{display:flex;justify-content:space-between;border-bottom:1px solid #ccc;margin-bottom:1em;padding-bottom:1em;padding-top:0;margin-top:0}.itsec-admin-notice-panel .itsec-admin-notice-panel__configure-highlighted-logs li:last-child{border-bottom:none;margin-bottom:0;padding-bottom:0}.itsec-admin-notice-panel .itsec-admin-notice-panel__configure-highlighted-logs li label{margin-left:calc(36px + 1em);font-size:14px;font-weight:bold}.itsec-admin-notice-panel .itsec-admin-notice-panel__configure-highlighted-logs li .components-form-toggle.is-checked .components-form-toggle__track{background-color:#0081E3;border-color:#0081E3}.itsec-admin-notice-panel .itsec-admin-notice-panel__configure-highlighted-logs li .components-form-toggle__input:disabled+.components-form-toggle__track{opacity:.5}
8
-
9
- @keyframes itsec-animation-fade-in-constant{from{opacity:0}to{opacity:1}}.itsec-admin-bar-admin-notices__trigger.components-button::after{content:'';background:#d8514f;height:10px;width:10px;border-radius:5px;vertical-align:middle;border:1px solid #f1f1f1;z-index:1;position:absolute;left:8px;top:0;opacity:0;transition:opacity 1000ms ease-in-out}.itsec-admin-bar-admin-notices__trigger--has-notices.components-button::after{opacity:1}.itsec-admin-bar-admin-notices__content .components-popover__content{box-shadow:rgba(0,0,0,0.19) 0 4px 5px}@media screen and (max-width: 600px){.itsec-admin-bar .itsec-admin-bar__admin-notices{margin-left:0}}.itsec-admin-bar-admin-notices__content.is-expanded .components-popover__content{overflow-y:scroll}.itsec-admin-bar-admin-notices__content.is-expanded .itsec-admin-notice-panel{width:100%}
10
-
1
+ @keyframes itsec-animation-fade-in-constant{from{opacity:0}to{opacity:1}}.itsec-admin-notice{background:#fff;border-radius:3px;box-shadow:0 0 5px rgba(211,211,211,.35)}.itsec-admin-notice .itsec-admin-notice__header{background:#eeecec;padding:calc(20px / 2);border-top-left-radius:3px;border-top-right-radius:3px}.itsec-admin-notice .itsec-admin-notice__header:last-child{border-bottom-left-radius:3px;border-bottom-right-radius:3px}.itsec-admin-notice .itsec-admin-notice__header .components-button{margin-top:1em;padding:.5em 1em;background:#e1f2fc;color:#0081e3;border:1px solid #0081e3;transition:background-color 300ms,color 150ms}.itsec-admin-notice .itsec-admin-notice__header .components-button:hover{background:#0081e3;color:#fff}.itsec-admin-notice .itsec-admin-notice__header .components-button.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-admin-notice .itsec-admin-notice__header .components-button.is-busy:hover{color:#0081e3}.itsec-admin-notice--severity-error.itsec-admin-notice .itsec-admin-notice__header{background:#d94f4f}.itsec-admin-notice--severity-error.itsec-admin-notice .itsec-admin-notice__header .components-button{padding:.5em 1em;background:#fcefef;color:#d94f4f;border:1px solid #d94f4f;transition:background-color 300ms,color 150ms}.itsec-admin-notice--severity-error.itsec-admin-notice .itsec-admin-notice__header .components-button:hover{background:#d94f4f;color:#fff}.itsec-admin-notice--severity-error.itsec-admin-notice .itsec-admin-notice__header .components-button.is-busy{animation:components-button__busy-animation 2500ms infinite linear;background-size:100px 100%;background-image:repeating-linear-gradient(-45deg, #fcefef, #fff 11px, #fff 10px, #fcefef 20px);opacity:1}.itsec-admin-notice--severity-error.itsec-admin-notice .itsec-admin-notice__header .components-button.is-busy:hover{color:#d94f4f}.itsec-admin-notice--severity-warning.itsec-admin-notice .itsec-admin-notice__header{background:#f78b53}.itsec-admin-notice--severity-warning.itsec-admin-notice .itsec-admin-notice__header .components-button{padding:.5em 1em;background:#fef1ea;color:#f78b53;border:1px solid #f78b53;transition:background-color 300ms,color 150ms}.itsec-admin-notice--severity-warning.itsec-admin-notice .itsec-admin-notice__header .components-button:hover{background:#f78b53;color:#fff}.itsec-admin-notice--severity-warning.itsec-admin-notice .itsec-admin-notice__header .components-button.is-busy{animation:components-button__busy-animation 2500ms infinite linear;background-size:100px 100%;background-image:repeating-linear-gradient(-45deg, #fef1ea, #fff 11px, #fff 10px, #fef1ea 20px);opacity:1}.itsec-admin-notice--severity-warning.itsec-admin-notice .itsec-admin-notice__header .components-button.is-busy:hover{color:#f78b53}.itsec-admin-notice--severity-info.itsec-admin-notice .itsec-admin-notice__header{background:#00a0d2}.itsec-admin-notice--severity-success.itsec-admin-notice .itsec-admin-notice__header{background:#4ab866}.itsec-admin-notice--severity-success.itsec-admin-notice .itsec-admin-notice__header .components-button{padding:.5em 1em;background:#e4f4e8;color:#4ab866;border:1px solid #4ab866;transition:background-color 300ms,color 150ms}.itsec-admin-notice--severity-success.itsec-admin-notice .itsec-admin-notice__header .components-button:hover{background:#4ab866;color:#fff}.itsec-admin-notice--severity-success.itsec-admin-notice .itsec-admin-notice__header .components-button.is-busy{animation:components-button__busy-animation 2500ms infinite linear;background-size:100px 100%;background-image:repeating-linear-gradient(-45deg, #e4f4e8, #fff 11px, #fff 10px, #e4f4e8 20px);opacity:1}.itsec-admin-notice--severity-success.itsec-admin-notice .itsec-admin-notice__header .components-button.is-busy:hover{color:#4ab866}.itsec-admin-notice .itsec-admin-notice .itsec-admin-notice__header:last-child{border-bottom-left-radius:3px;border-bottom-right-radius:3px}.itsec-admin-notice .itsec-admin-notice__header .itsec-admin-notice__header-inset{background:#fff;border-radius:5px;padding:calc(20px / 2)}.itsec-admin-notice .itsec-admin-notice__header h4{font-size:14px;margin:0;color:#0a1a23;font-weight:600;text-transform:none}.itsec-admin-notice .itsec-admin-notice__message{border-left:1px solid #e5eaee;border-right:1px solid #e5eaee;padding:10px 20px}.itsec-admin-notice .itsec-admin-notice__message p:first-child{margin-top:0}.itsec-admin-notice .itsec-admin-notice__message p:last-child{margin-bottom:0}.itsec-admin-notice .itsec-admin-notice__meta{border-left:1px solid #e5eaee;border-right:1px solid #e5eaee;background:#dcebf3;padding:5px 20px;margin:0;display:grid;grid-template:auto/min-content 1fr;grid-gap:5px 20px}.itsec-admin-notice .itsec-admin-notice__meta dt,.itsec-admin-notice .itsec-admin-notice__meta dd{margin:0}.itsec-admin-notice .itsec-admin-notice__meta dt{text-transform:uppercase;color:#040404}.itsec-admin-notice .itsec-admin-notice__footer{border-left:1px solid #e5eaee;border-right:1px solid #e5eaee;padding:5px 20px;font-size:11px}.itsec-admin-notice>:last-child:not(.itsec-admin-notice__header){border-bottom:1px solid #e5eaee}
 
2
  @keyframes itsec-animation-fade-in-constant{from{opacity:0}to{opacity:1}}.itsec-admin-notice-list-actions .components-button.has-icon{padding:2px !important}.itsec-admin-notice-list-actions .components-button.has-icon .dashicon{margin:0}.itsec-admin-notice-list-actions__more-menu-items .components-popover__content>div{overflow:hidden;padding:7px 0}.itsec-admin-notice-list-actions__more-menu-items .components-button{width:100%;min-height:38px;box-sizing:border-box;padding:10px;color:#0073aa;justify-content:space-between;align-items:center}.itsec-admin-notice-list-actions__more-menu-items .components-button:focus{outline-offset:-2px;outline:1px dotted #555d66;box-shadow:none}.itsec-admin-notice-list-actions__more-menu-items .components-button:hover{color:#191e23;background:#f3f4f5}.itsec-admin-notice-list-actions__more-menu-items .components-button .components-spinner{margin:0}
3
+ @keyframes itsec-animation-fade-in-constant{from{opacity:0}to{opacity:1}}.itsec-admin-notice-list{margin:0}.itsec-admin-notice-list-item-container{display:grid;grid-template:auto/min-content 1fr;grid-gap:1em;margin-bottom:2em}.itsec-admin-notice-list-item-container:last-child{margin-bottom:0}
4
+ @keyframes itsec-animation-fade-in-constant{from{opacity:0}to{opacity:1}}@keyframes itsec-animation-fade-in-constant{from{opacity:0}to{opacity:1}}.itsec-admin-bar-admin-notices__content.components-popover .components-popover__content{border-color:1px solid #e5eaee;box-shadow:0 2px 6px rgba(0,0,0,.25)}.itsec-admin-bar-admin-notices__content.components-popover::after{border-color:#e5eaee !important}.itsec-admin-notice-panel{padding:1em;background:#fff;width:420px;max-width:100%;box-sizing:border-box}.itsec-admin-notice-panel .itsec-admin-notice-panel__header{border-bottom:1px solid #7abeed;margin-bottom:1em}.itsec-admin-notice-panel .itsec-admin-notice-panel__header h3{color:#0081e3;text-align:center;margin:1rem 0 !important}.itsec-admin-notice-panel .itsec-admin-notice-panel__header p{text-align:center;font-style:oblique;margin:1rem 0 !important}.is-mobile .itsec-admin-notice-panel{width:100%;overflow-x:auto;height:100%}.is-mobile .itsec-admin-notice-panel header h3{display:none}.is-mobile .itsec-admin-notice-panel header p{margin-top:0}.itsec-admin-notice-panel .itsec-admin-notice-panel__configure-trigger.components-button{padding:0;height:auto;width:auto;min-width:0;position:absolute;right:1em;top:1em;transition:opacity 400ms}.itsec-admin-notice-panel .itsec-admin-notice-panel__configure-trigger.components-button:hover{opacity:.5;box-shadow:none !important}.itsec-admin-notice-panel .itsec-admin-notice-panel__configure-trigger.components-button .dashicon{margin:0}.itsec-admin-notice-panel.itsec-admin-notice-panel--is-configuring .itsec-admin-notice-panel__configure-trigger.components-button{color:#0081e3}.itsec-admin-notice-panel.itsec-admin-notice-panel--is-configuring .itsec-admin-notice-panel__configure-trigger.components-button:hover{color:#0081e3}.itsec-admin-notice-panel .itsec-admin-notice-panel__configure-highlighted-logs{border-bottom:1px solid #7abeed;margin-bottom:1em;padding-bottom:1em}.itsec-admin-notice-panel .itsec-admin-notice-panel__configure-highlighted-logs li{display:flex;justify-content:space-between;border-bottom:1px solid #ccc;margin-bottom:1em;padding-bottom:1em;padding-top:0;margin-top:0}.itsec-admin-notice-panel .itsec-admin-notice-panel__configure-highlighted-logs li:last-child{border-bottom:none;margin-bottom:0;padding-bottom:0}.itsec-admin-notice-panel .itsec-admin-notice-panel__configure-highlighted-logs li label{margin-left:calc(36px + 1em);font-size:14px;font-weight:bold}.itsec-admin-notice-panel .itsec-admin-notice-panel__configure-highlighted-logs li .components-form-toggle.is-checked .components-form-toggle__track{background-color:#0081e3;border-color:#0081e3}.itsec-admin-notice-panel .itsec-admin-notice-panel__configure-highlighted-logs li .components-form-toggle__input:disabled+.components-form-toggle__track{opacity:.5}
5
+ @keyframes itsec-animation-fade-in-constant{from{opacity:0}to{opacity:1}}.itsec-admin-bar-admin-notices__trigger.components-button::after{content:"";background:#d8514f;height:10px;width:10px;border-radius:5px;vertical-align:middle;border:1px solid #f1f1f1;z-index:1;position:absolute;left:8px;top:0;opacity:0;transition:opacity 1000ms ease-in-out}.itsec-admin-bar-admin-notices__trigger--has-notices.components-button::after{opacity:1}.itsec-admin-bar-admin-notices__content .components-popover__content{box-shadow:rgba(0,0,0,.19) 0 4px 5px}@media screen and (max-width: 600px){.itsec-admin-bar .itsec-admin-bar__admin-notices{margin-left:0}}.itsec-admin-bar-admin-notices__content.is-expanded .components-popover__content{overflow-y:scroll}.itsec-admin-bar-admin-notices__content.is-expanded .itsec-admin-notice-panel{width:100%}
 
 
 
 
dist/core/admin-notices-dashboard-admin-bar.js CHANGED
@@ -1,7 +1,7 @@
1
- this.itsec=this.itsec||{},this.itsec.core=this.itsec.core||{},this.itsec.core["admin-notices-dashboard-admin-bar"]=(window.itsecWebpackJsonP=window.itsecWebpackJsonP||[]).push([[10],{"0ONt":function(e,t,n){"use strict";var i=n("J4zp"),c=n.n(i),a=n("GRId"),r=n("TSYQ"),o=n.n(r),s=n("tI+e"),l=n("l3Sj"),u=n("1ZqX"),m=n("rE5z");n("BEpq");t.a=function(){var e=Object(a.useState)(!1),t=c()(e,2),n=t[0],i=t[1],r=Object(u.useSelect)((function(e){return{notices:e("ithemes-security/admin-notices").getNotices(),noticesLoaded:e("ithemes-security/admin-notices").areNoticesLoaded()}}),[]),d=r.notices,f=r.noticesLoaded;return Object(a.createElement)(React.Fragment,null,Object(a.createElement)(s.ToolbarButton,{"aria-expanded":n,onClick:function(){return i(!n)},icon:"megaphone",text:Object(l.__)("Notifications","better-wp-security"),className:o()("itsec-admin-bar-admin-notices__trigger",{"itsec-admin-bar-admin-notices__trigger--has-notices":d.length>0})}),n&&Object(a.createElement)(s.Popover,{className:"itsec-admin-bar-admin-notices__content",expandOnMobile:!0,focusOnMount:"container",position:"bottom left",headerTitle:Object(l.__)("Notifications","better-wp-security"),onClose:function(){return i(!1)},onFocusOutside:function(){return i(!1)}},Object(a.createElement)(m.a,{notices:d,loaded:f,close:function(){return i(!1)}})))}},"1ZqX":function(e,t){!function(){e.exports=this.wp.data}()},BEpq:function(e,t,n){},Ckse:function(e,t,n){},GRId:function(e,t){!function(){e.exports=this.wp.element}()},Hz6T:function(e,t){!function(){e.exports=this.itsec.core["admin-notices-api"]}()},J4zp:function(e,t,n){var i=n("wTVA"),c=n("m0LI"),a=n("wkBT");e.exports=function(e,t){return i(e)||c(e,t)||a()}},K9lf:function(e,t){!function(){e.exports=this.wp.compose}()},KTI5:function(e,t,n){},Pesb:function(e,t,n){"use strict";n.r(t);var i=n("GRId"),c=n("TvNi"),a=(n("Hz6T"),n("cruf")),r=n("0ONt");n.p=window.itsecWebpackPublicPath,Object(c.registerPlugin)("itsec-admin-notices-dashboard-admin-bar",{render:function(){return Object(i.createElement)(a.AdminBarFill,null,Object(i.createElement)(r.a,null))}})},TSYQ:function(e,t,n){
2
  /*!
3
  Copyright (c) 2018 Jed Watson.
4
  Licensed under the MIT License (MIT), see
5
  http://jedwatson.github.io/classnames
6
  */
7
- !function(){"use strict";var t={}.hasOwnProperty;function n(){for(var e=[],i=0;i<arguments.length;i++){var c=arguments[i];if(c){var a=typeof c;if("string"===a||"number"===a)e.push(c);else if(Array.isArray(c)){if(c.length){var r=n.apply(null,c);r&&e.push(r)}}else if("object"===a)if(c.toString===Object.prototype.toString)for(var o in c)t.call(c,o)&&c[o]&&e.push(o);else e.push(c.toString())}}return e.join(" ")}e.exports?(n.default=n,e.exports=n):"function"==typeof define&&"object"==typeof define.amd&&define.amd?define("classnames",[],(function(){return n})):window.classNames=n}()},TvNi:function(e,t){!function(){e.exports=this.wp.plugins}()},UuzZ:function(e,t){!function(){e.exports=this.wp.autop}()},VwaH:function(e,t,n){},YLtl:function(e,t){!function(){e.exports=this.lodash}()},cruf:function(e,t){!function(){e.exports=this.itsec.dashboard.api}()},l3Sj:function(e,t){!function(){e.exports=this.wp.i18n}()},m0LI:function(e,t){e.exports=function(e,t){var n=[],i=!0,c=!1,a=void 0;try{for(var r,o=e[Symbol.iterator]();!(i=(r=o.next()).done)&&(n.push(r.value),!t||n.length!==t);i=!0);}catch(e){c=!0,a=e}finally{try{i||null==o.return||o.return()}finally{if(c)throw a}}return n}},"o/Pk":function(e,t,n){},rE5z:function(e,t,n){"use strict";var i=n("GRId"),c=n("TSYQ"),a=n.n(c),r=n("YLtl"),o=n("l3Sj"),s=n("tI+e"),l=n("K9lf"),u=n("1ZqX"),m=n("UuzZ");n("VwaH");function d(e){var t=e.notice;return Object(i.createElement)("article",{className:"itsec-admin-notice itsec-admin-notice--severity-".concat(t.severity)},Object(i.createElement)("header",{className:"itsec-admin-notice__header"},Object(i.createElement)("div",{className:"itsec-admin-notice__header-inset"},Object(i.createElement)("h4",{dangerouslySetInnerHTML:{__html:t.title||f(t.message,t)}}),Object(r.map)(t.actions,(function(e,t){return"primary"===e.style&&Object(i.createElement)(s.Button,{key:t,href:e.uri},e.title)})))),t.title&&t.message&&Object(i.createElement)("section",{className:"itsec-admin-notice__message",dangerouslySetInnerHTML:{__html:Object(m.autop)(f(t.message,t))}}),function(e){if(Object(r.isEmpty)(e.meta))return!1;if(1===Object(r.size)(e.meta)&&e.meta.hasOwnProperty("created_at"))return!1;return!0}(t)&&Object(i.createElement)("dl",{className:"itsec-admin-notice__meta"},Object(r.map)(t.meta,(function(e,t){return"created_at"!==t&&Object(i.createElement)(i.Fragment,{key:t},Object(i.createElement)("dt",null,e.label),Object(i.createElement)("dd",null,e.formatted))}))),t.meta.created_at&&Object(i.createElement)("footer",{className:"itsec-admin-notice__footer"},Object(i.createElement)("time",{dateTime:t.meta.created_at.value},t.meta.created_at.formatted)))}function f(e,t){for(var n in t.actions)t.actions.hasOwnProperty(n)&&""!==t.actions[n].uri&&(e=e.replace("{{ $"+n+" }}",t.actions[n].uri));return e}n("o/Pk");var b=Object(l.compose)([Object(u.withDispatch)((function(e){return{doAction:e("ithemes-security/admin-notices").doNoticeAction}})),Object(u.withSelect)((function(e,t){return{inProgress:e("ithemes-security/admin-notices").getInProgressActions(t.notice.id)}}))])((function(e){var t=e.notice,n=e.doAction,c=e.inProgress,a=[],l=function(e){if(!t.actions.hasOwnProperty(e))return"continue";var r=t.actions[e];"close"===r.style&&a.push(Object(i.createElement)("li",{key:e},Object(i.createElement)(s.Button,{icon:"dismiss",label:r.title,onClick:function(){return n(t.id,e)},isBusy:c.includes(e)})))};for(var u in t.actions)l(u);var m=function(e){var t={};for(var n in e.actions)if(e.actions.hasOwnProperty(n)){var i=e.actions[n];"close"!==i.style&&"primary"!==i.style&&(t[n]=i)}return t}(t);return Object(r.isEmpty)(m)||a.push(Object(i.createElement)("li",{key:"more"},Object(i.createElement)(s.Dropdown,{position:"bottom right",className:"itsec-admin-notice-list-actions__more-menu",contentClassName:"itsec-admin-notice-list-actions__more-menu-items",renderToggle:function(e){var t=e.isOpen,n=e.onToggle;return Object(i.createElement)(s.Button,{icon:"ellipsis",label:Object(o.__)("More Actions","better-wp-security"),onClick:n,"aria-haspopup":!0,"aria-expanded":t})},renderContent:function(){return Object(i.createElement)(s.NavigableMenu,{role:"menu"},Object(r.map)(m,(function(e,a){return e.uri?Object(i.createElement)(s.Button,{key:a,href:e.uri},e.title):Object(i.createElement)(s.Button,{key:a,onClick:function(){return n(t.id,a)},disabled:c.includes(a)},e.title,c.includes(a)&&Object(i.createElement)(s.Spinner,null))})))}}))),Object(i.createElement)("ul",{className:"itsec-admin-notice-list-actions"},a)}));n("Ckse");var h=function(e){var t=e.notices;return Object(i.createElement)("ul",{className:"itsec-admin-notice-list"},t.map((function(e){return Object(i.createElement)("li",{className:"itsec-admin-notice-list-item-container",key:e.id},Object(i.createElement)(b,{notice:e}),Object(i.createElement)(d,{notice:e,noticeId:e.id}))})))};n("KTI5");t.a=Object(l.compose)([Object(l.withState)({isConfiguring:!1,checked:{}}),Object(u.withSelect)((function(e){return{mutedHighlights:e("ithemes-security/admin-notices").getMutedHighlights(),mutedHighlightUpdatesInFlight:e("ithemes-security/admin-notices").getMutedHighlightUpdatesInFlight()}})),Object(u.withDispatch)((function(e){return{updateMutedHighlight:e("ithemes-security/admin-notices").updateMutedHighlight}}))])((function(e){var t=e.notices,n=e.loaded,c=e.mutedHighlights,l=e.mutedHighlightUpdatesInFlight,u=e.updateMutedHighlight,m=e.isConfiguring,d=e.setState;return Object(i.createElement)("div",{className:a()("itsec-admin-notice-panel",{"itsec-admin-notice-panel--is-configuring":m})},Object(i.createElement)(s.Button,{icon:"admin-generic",label:Object(o.__)("Configure","better-wp-security"),className:"itsec-admin-notice-panel__configure-trigger",style:{opacity:Object(r.size)(c)>0?1:0},onClick:function(){return d({isConfiguring:!m})}}),Object(i.createElement)("header",{className:"itsec-admin-notice-panel__header"},Object(i.createElement)("h3",null,Object(o.__)("Security Admin Messages","better-wp-security")),Object(i.createElement)("p",null,Object(o.__)("Important notices from iThemes Security","better-wp-security"))),m&&Object(i.createElement)("ul",{className:"itsec-admin-notice-panel__configure-highlighted-logs"},[{slug:"file-change-report",label:Object(o.__)("File Change Report","better-wp-security")},{slug:"notification-center-send-failed",label:Object(o.__)("Notification Center Errors","better-wp-security")},{slug:"malware-scan-report",label:Object(o.__)("Malware Scan Report","better-wp-security")},{slug:"malware-scan-failed",label:Object(o.__)("Malware Scan Failed","better-wp-security")},{slug:"site-scanner-report",label:Object(o.__)("Site Scan Report","better-wp-security")}].map((function(e){var t=e.slug,a=e.label;return void 0!==c[t]&&Object(i.createElement)("li",null,Object(i.createElement)("label",{htmlFor:"itsec-mute-highlight-".concat(t)},a),Object(i.createElement)(s.FormToggle,{id:"itsec-mute-highlight-".concat(t),disabled:!n||l[t],checked:!Object(r.get)(l,[t,"mute"],c[t]),onChange:function(){return u(t,!c[t])}}))}))),t.length>0?Object(i.createElement)(h,{notices:t}):n&&Object(i.createElement)("span",null,Object(o.__)("No notices at the moment.","better-wp-security")))}))},"tI+e":function(e,t){!function(){e.exports=this.wp.components}()},wTVA:function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},wkBT:function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}}},[["Pesb",0]]]);
1
+ this.itsec=this.itsec||{},this.itsec.core=this.itsec.core||{},this.itsec.core["admin-notices-dashboard-admin-bar"]=(window.itsecWebpackJsonP=window.itsecWebpackJsonP||[]).push([[12],{"0ONt":function(e,t,n){"use strict";var i=n("GRId"),c=n("TSYQ"),a=n.n(c),s=n("tI+e"),o=n("l3Sj"),r=n("1ZqX"),l=n("rE5z");n("BEpq");t.a=function(){const[e,t]=Object(i.useState)(!1),{notices:n,noticesLoaded:c}=Object(r.useSelect)(e=>({notices:e("ithemes-security/admin-notices").getNotices(),noticesLoaded:e("ithemes-security/admin-notices").areNoticesLoaded()}),[]);return Object(i.createElement)(React.Fragment,null,Object(i.createElement)(s.ToolbarButton,{"aria-expanded":e,onClick:()=>t(!e),icon:"megaphone",text:Object(o.__)("Notifications","better-wp-security"),className:a()("itsec-admin-bar-admin-notices__trigger",{"itsec-admin-bar-admin-notices__trigger--has-notices":n.length>0})}),e&&Object(i.createElement)(s.Popover,{className:"itsec-admin-bar-admin-notices__content",expandOnMobile:!0,focusOnMount:"container",position:"bottom left",headerTitle:Object(o.__)("Notifications","better-wp-security"),onClose:()=>t(!1),onFocusOutside:()=>t(!1)},Object(i.createElement)(l.a,{notices:n,loaded:c,close:()=>t(!1)})))}},"1ZqX":function(e,t){!function(){e.exports=this.wp.data}()},BEpq:function(e,t,n){},Ckse:function(e,t,n){},GRId:function(e,t){!function(){e.exports=this.wp.element}()},Hz6T:function(e,t){!function(){e.exports=this.itsec.core["admin-notices-api"]}()},K9lf:function(e,t){!function(){e.exports=this.wp.compose}()},KTI5:function(e,t,n){},Pesb:function(e,t,n){"use strict";n.r(t);var i=n("GRId"),c=n("TvNi"),a=(n("Hz6T"),n("cruf")),s=n("0ONt");n.p=window.itsecWebpackPublicPath,Object(c.registerPlugin)("itsec-admin-notices-dashboard-admin-bar",{render:()=>Object(i.createElement)(a.AdminBarFill,null,Object(i.createElement)(s.a,null))})},TSYQ:function(e,t,n){
2
  /*!
3
  Copyright (c) 2018 Jed Watson.
4
  Licensed under the MIT License (MIT), see
5
  http://jedwatson.github.io/classnames
6
  */
7
+ !function(){"use strict";var t={}.hasOwnProperty;function n(){for(var e=[],i=0;i<arguments.length;i++){var c=arguments[i];if(c){var a=typeof c;if("string"===a||"number"===a)e.push(c);else if(Array.isArray(c)){if(c.length){var s=n.apply(null,c);s&&e.push(s)}}else if("object"===a)if(c.toString===Object.prototype.toString)for(var o in c)t.call(c,o)&&c[o]&&e.push(o);else e.push(c.toString())}}return e.join(" ")}e.exports?(n.default=n,e.exports=n):"function"==typeof define&&"object"==typeof define.amd&&define.amd?define("classnames",[],(function(){return n})):window.classNames=n}()},TvNi:function(e,t){!function(){e.exports=this.wp.plugins}()},UuzZ:function(e,t){!function(){e.exports=this.wp.autop}()},VwaH:function(e,t,n){},YLtl:function(e,t){!function(){e.exports=this.lodash}()},cruf:function(e,t){!function(){e.exports=this.itsec.dashboard.api}()},l3Sj:function(e,t){!function(){e.exports=this.wp.i18n}()},"o/Pk":function(e,t,n){},rE5z:function(e,t,n){"use strict";var i=n("GRId"),c=n("TSYQ"),a=n.n(c),s=n("YLtl"),o=n("l3Sj"),r=n("tI+e"),l=n("K9lf"),m=n("1ZqX"),u=n("UuzZ");n("VwaH");function d(e){let{notice:t}=e;return Object(i.createElement)("article",{className:"itsec-admin-notice itsec-admin-notice--severity-"+t.severity},Object(i.createElement)("header",{className:"itsec-admin-notice__header"},Object(i.createElement)("div",{className:"itsec-admin-notice__header-inset"},Object(i.createElement)("h4",{dangerouslySetInnerHTML:{__html:t.title||b(t.message,t)}}),Object(s.map)(t.actions,(e,t)=>"primary"===e.style&&Object(i.createElement)(r.Button,{key:t,href:e.uri},e.title)))),t.title&&t.message&&Object(i.createElement)("section",{className:"itsec-admin-notice__message",dangerouslySetInnerHTML:{__html:Object(u.autop)(b(t.message,t))}}),function(e){if(Object(s.isEmpty)(e.meta))return!1;if(1===Object(s.size)(e.meta)&&e.meta.hasOwnProperty("created_at"))return!1;return!0}(t)&&Object(i.createElement)("dl",{className:"itsec-admin-notice__meta"},Object(s.map)(t.meta,(e,t)=>"created_at"!==t&&Object(i.createElement)(i.Fragment,{key:t},Object(i.createElement)("dt",null,e.label),Object(i.createElement)("dd",null,e.formatted)))),t.meta.created_at&&Object(i.createElement)("footer",{className:"itsec-admin-notice__footer"},Object(i.createElement)("time",{dateTime:t.meta.created_at.value},t.meta.created_at.formatted)))}function b(e,t){for(const n in t.actions)t.actions.hasOwnProperty(n)&&""!==t.actions[n].uri&&(e=e.replace("{{ $"+n+" }}",t.actions[n].uri));return e}n("o/Pk");var h=Object(l.compose)([Object(m.withDispatch)(e=>({doAction:e("ithemes-security/admin-notices").doNoticeAction})),Object(m.withSelect)((e,t)=>({inProgress:e("ithemes-security/admin-notices").getInProgressActions(t.notice.id)}))])((function(e){let{notice:t,doAction:n,inProgress:c}=e;const a=[];for(const e in t.actions){if(!t.actions.hasOwnProperty(e))continue;const s=t.actions[e];"close"===s.style&&a.push(Object(i.createElement)("li",{key:e},Object(i.createElement)(r.Button,{icon:"dismiss",label:s.title,onClick:()=>n(t.id,e),isBusy:c.includes(e)})))}const l=function(e){const t={};for(const n in e.actions){if(!e.actions.hasOwnProperty(n))continue;const i=e.actions[n];"close"!==i.style&&("primary"!==i.style&&(t[n]=i))}return t}(t);return Object(s.isEmpty)(l)||a.push(Object(i.createElement)("li",{key:"more"},Object(i.createElement)(r.Dropdown,{position:"bottom right",className:"itsec-admin-notice-list-actions__more-menu",contentClassName:"itsec-admin-notice-list-actions__more-menu-items",renderToggle:e=>{let{isOpen:t,onToggle:n}=e;return Object(i.createElement)(r.Button,{icon:"ellipsis",label:Object(o.__)("More Actions","better-wp-security"),onClick:n,"aria-haspopup":!0,"aria-expanded":t})},renderContent:()=>Object(i.createElement)(r.NavigableMenu,{role:"menu"},Object(s.map)(l,(e,a)=>e.uri?Object(i.createElement)(r.Button,{key:a,href:e.uri},e.title):Object(i.createElement)(r.Button,{key:a,onClick:()=>n(t.id,a),disabled:c.includes(a)},e.title,c.includes(a)&&Object(i.createElement)(r.Spinner,null))))}))),Object(i.createElement)("ul",{className:"itsec-admin-notice-list-actions"},a)}));n("Ckse");var p=function(e){let{notices:t}=e;return Object(i.createElement)("ul",{className:"itsec-admin-notice-list"},t.map(e=>Object(i.createElement)("li",{className:"itsec-admin-notice-list-item-container",key:e.id},Object(i.createElement)(h,{notice:e}),Object(i.createElement)(d,{notice:e,noticeId:e.id}))))};n("KTI5");t.a=Object(l.compose)([Object(l.withState)({isConfiguring:!1,checked:{}}),Object(m.withSelect)(e=>({mutedHighlights:e("ithemes-security/admin-notices").getMutedHighlights(),mutedHighlightUpdatesInFlight:e("ithemes-security/admin-notices").getMutedHighlightUpdatesInFlight()})),Object(m.withDispatch)(e=>({updateMutedHighlight:e("ithemes-security/admin-notices").updateMutedHighlight}))])((function(e){let{notices:t,loaded:n,mutedHighlights:c,mutedHighlightUpdatesInFlight:l,updateMutedHighlight:m,isConfiguring:u,setState:d}=e;return Object(i.createElement)("div",{className:a()("itsec-admin-notice-panel",{"itsec-admin-notice-panel--is-configuring":u})},Object(i.createElement)(r.Button,{icon:"admin-generic",label:Object(o.__)("Configure","better-wp-security"),className:"itsec-admin-notice-panel__configure-trigger",style:{opacity:Object(s.size)(c)>0?1:0},onClick:()=>d({isConfiguring:!u})}),Object(i.createElement)("header",{className:"itsec-admin-notice-panel__header"},Object(i.createElement)("h3",null,Object(o.__)("Security Admin Messages","better-wp-security")),Object(i.createElement)("p",null,Object(o.__)("Important notices from iThemes Security","better-wp-security"))),u&&Object(i.createElement)("ul",{className:"itsec-admin-notice-panel__configure-highlighted-logs"},[{slug:"file-change-report",label:Object(o.__)("File Change Report","better-wp-security")},{slug:"notification-center-send-failed",label:Object(o.__)("Notification Center Errors","better-wp-security")},{slug:"malware-scan-report",label:Object(o.__)("Malware Scan Report","better-wp-security")},{slug:"malware-scan-failed",label:Object(o.__)("Malware Scan Failed","better-wp-security")},{slug:"site-scanner-report",label:Object(o.__)("Site Scan Report","better-wp-security")}].map(e=>{let{slug:t,label:a}=e;return void 0!==c[t]&&Object(i.createElement)("li",null,Object(i.createElement)("label",{htmlFor:"itsec-mute-highlight-"+t},a),Object(i.createElement)(r.FormToggle,{id:"itsec-mute-highlight-"+t,disabled:!n||l[t],checked:!Object(s.get)(l,[t,"mute"],c[t]),onChange:()=>m(t,!c[t])}))})),t.length>0?Object(i.createElement)(p,{notices:t}):n&&Object(i.createElement)("span",null,Object(o.__)("No notices at the moment.","better-wp-security")))}))},"tI+e":function(e,t){!function(){e.exports=this.wp.components}()}},[["Pesb",0]]]);
dist/core/admin-notices.css CHANGED
@@ -1,12 +1,6 @@
1
- @keyframes itsec-animation-fade-in-constant{from{opacity:0}to{opacity:1}}.itsec-admin-notice{background:white;border-radius:3px;box-shadow:0 0 5px rgba(211,211,211,0.35)}.itsec-admin-notice .itsec-admin-notice__header{background:#eeecec;padding:10px;border-top-left-radius:3px;border-top-right-radius:3px}.itsec-admin-notice .itsec-admin-notice__header:last-child{border-bottom-left-radius:3px;border-bottom-right-radius:3px}.itsec-admin-notice .itsec-admin-notice__header .components-button{margin-top:1em;padding:.5em 1em;background:#E1f2fc;color:#0081E3;border:1px solid #0081E3;transition:background-color 300ms, color 150ms}.itsec-admin-notice .itsec-admin-notice__header .components-button:hover{background:#0081E3;color:white}.itsec-admin-notice .itsec-admin-notice__header .components-button.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-admin-notice .itsec-admin-notice__header .components-button.is-busy:hover{color:#0081E3}.itsec-admin-notice--severity-error.itsec-admin-notice .itsec-admin-notice__header{background:#d94f4f}.itsec-admin-notice--severity-error.itsec-admin-notice .itsec-admin-notice__header .components-button{padding:.5em 1em;background:#fcefef;color:#d94f4f;border:1px solid #d94f4f;transition:background-color 300ms, color 150ms}.itsec-admin-notice--severity-error.itsec-admin-notice .itsec-admin-notice__header .components-button:hover{background:#d94f4f;color:white}.itsec-admin-notice--severity-error.itsec-admin-notice .itsec-admin-notice__header .components-button.is-busy{animation:components-button__busy-animation 2500ms infinite linear;background-size:100px 100%;background-image:repeating-linear-gradient(-45deg, #fcefef, #fff 11px, #fff 10px, #fcefef 20px);opacity:1}.itsec-admin-notice--severity-error.itsec-admin-notice .itsec-admin-notice__header .components-button.is-busy:hover{color:#d94f4f}.itsec-admin-notice--severity-warning.itsec-admin-notice .itsec-admin-notice__header{background:#f78b53}.itsec-admin-notice--severity-warning.itsec-admin-notice .itsec-admin-notice__header .components-button{padding:.5em 1em;background:#fef1ea;color:#f78b53;border:1px solid #f78b53;transition:background-color 300ms, color 150ms}.itsec-admin-notice--severity-warning.itsec-admin-notice .itsec-admin-notice__header .components-button:hover{background:#f78b53;color:white}.itsec-admin-notice--severity-warning.itsec-admin-notice .itsec-admin-notice__header .components-button.is-busy{animation:components-button__busy-animation 2500ms infinite linear;background-size:100px 100%;background-image:repeating-linear-gradient(-45deg, #fef1ea, #fff 11px, #fff 10px, #fef1ea 20px);opacity:1}.itsec-admin-notice--severity-warning.itsec-admin-notice .itsec-admin-notice__header .components-button.is-busy:hover{color:#f78b53}.itsec-admin-notice--severity-info.itsec-admin-notice .itsec-admin-notice__header{background:#00a0d2}.itsec-admin-notice--severity-success.itsec-admin-notice .itsec-admin-notice__header{background:#4ab866}.itsec-admin-notice--severity-success.itsec-admin-notice .itsec-admin-notice__header .components-button{padding:.5em 1em;background:#e4f4e8;color:#4ab866;border:1px solid #4ab866;transition:background-color 300ms, color 150ms}.itsec-admin-notice--severity-success.itsec-admin-notice .itsec-admin-notice__header .components-button:hover{background:#4ab866;color:white}.itsec-admin-notice--severity-success.itsec-admin-notice .itsec-admin-notice__header .components-button.is-busy{animation:components-button__busy-animation 2500ms infinite linear;background-size:100px 100%;background-image:repeating-linear-gradient(-45deg, #e4f4e8, #fff 11px, #fff 10px, #e4f4e8 20px);opacity:1}.itsec-admin-notice--severity-success.itsec-admin-notice .itsec-admin-notice__header .components-button.is-busy:hover{color:#4ab866}.itsec-admin-notice .itsec-admin-notice .itsec-admin-notice__header:last-child{border-bottom-left-radius:3px;border-bottom-right-radius:3px}.itsec-admin-notice .itsec-admin-notice__header .itsec-admin-notice__header-inset{background:white;border-radius:5px;padding:10px}.itsec-admin-notice .itsec-admin-notice__header h4{font-size:14px;margin:0;color:#0A1A23;font-weight:600;text-transform:none}.itsec-admin-notice .itsec-admin-notice__message{border-left:1px solid #E5EAEE;border-right:1px solid #E5EAEE;padding:10px 20px}.itsec-admin-notice .itsec-admin-notice__message p:first-child{margin-top:0}.itsec-admin-notice .itsec-admin-notice__message p:last-child{margin-bottom:0}.itsec-admin-notice .itsec-admin-notice__meta{border-left:1px solid #E5EAEE;border-right:1px solid #E5EAEE;background:#DCEBF3;padding:5px 20px;margin:0;display:grid;grid-template:auto / -webkit-min-content 1fr;grid-template:auto / min-content 1fr;grid-gap:5px 20px}.itsec-admin-notice .itsec-admin-notice__meta dt,.itsec-admin-notice .itsec-admin-notice__meta dd{margin:0}.itsec-admin-notice .itsec-admin-notice__meta dt{text-transform:uppercase;color:#040404}.itsec-admin-notice .itsec-admin-notice__footer{border-left:1px solid #E5EAEE;border-right:1px solid #E5EAEE;padding:5px 20px;font-size:11px}.itsec-admin-notice>:last-child:not(.itsec-admin-notice__header){border-bottom:1px solid #E5EAEE}
2
-
3
  @keyframes itsec-animation-fade-in-constant{from{opacity:0}to{opacity:1}}.itsec-admin-notice-list-actions .components-button.has-icon{padding:2px !important}.itsec-admin-notice-list-actions .components-button.has-icon .dashicon{margin:0}.itsec-admin-notice-list-actions__more-menu-items .components-popover__content>div{overflow:hidden;padding:7px 0}.itsec-admin-notice-list-actions__more-menu-items .components-button{width:100%;min-height:38px;box-sizing:border-box;padding:10px;color:#0073aa;justify-content:space-between;align-items:center}.itsec-admin-notice-list-actions__more-menu-items .components-button:focus{outline-offset:-2px;outline:1px dotted #555d66;box-shadow:none}.itsec-admin-notice-list-actions__more-menu-items .components-button:hover{color:#191e23;background:#f3f4f5}.itsec-admin-notice-list-actions__more-menu-items .components-button .components-spinner{margin:0}
4
-
5
- @keyframes itsec-animation-fade-in-constant{from{opacity:0}to{opacity:1}}.itsec-admin-notice-list{margin:0}.itsec-admin-notice-list-item-container{display:grid;grid-template:auto / -webkit-min-content 1fr;grid-template:auto / min-content 1fr;grid-gap:1em;margin-bottom:2em}.itsec-admin-notice-list-item-container:last-child{margin-bottom:0}
6
-
7
- @keyframes itsec-animation-fade-in-constant{from{opacity:0}to{opacity:1}}@keyframes itsec-animation-fade-in-constant{from{opacity:0}to{opacity:1}}.itsec-admin-bar-admin-notices__content.components-popover .components-popover__content{border-color:1px solid #E5EAEE;box-shadow:0 2px 6px rgba(0,0,0,0.25)}.itsec-admin-bar-admin-notices__content.components-popover::after{border-color:#E5EAEE !important}.itsec-admin-notice-panel{padding:1em;background:#fff;width:420px;max-width:100%;box-sizing:border-box}.itsec-admin-notice-panel .itsec-admin-notice-panel__header{border-bottom:1px solid #7ABEED;margin-bottom:1em}.itsec-admin-notice-panel .itsec-admin-notice-panel__header h3{color:#0081E3;text-align:center;margin:1rem 0 !important}.itsec-admin-notice-panel .itsec-admin-notice-panel__header p{text-align:center;font-style:oblique;margin:1rem 0 !important}.is-mobile .itsec-admin-notice-panel{width:100%;overflow-x:auto;height:100%}.is-mobile .itsec-admin-notice-panel header h3{display:none}.is-mobile .itsec-admin-notice-panel header p{margin-top:0}.itsec-admin-notice-panel .itsec-admin-notice-panel__configure-trigger.components-button{padding:0;height:auto;width:auto;min-width:0;position:absolute;right:1em;top:1em;transition:opacity 400ms}.itsec-admin-notice-panel .itsec-admin-notice-panel__configure-trigger.components-button:hover{opacity:.5;box-shadow:none !important}.itsec-admin-notice-panel .itsec-admin-notice-panel__configure-trigger.components-button .dashicon{margin:0}.itsec-admin-notice-panel.itsec-admin-notice-panel--is-configuring .itsec-admin-notice-panel__configure-trigger.components-button{color:#0081E3}.itsec-admin-notice-panel.itsec-admin-notice-panel--is-configuring .itsec-admin-notice-panel__configure-trigger.components-button:hover{color:#0081E3}.itsec-admin-notice-panel .itsec-admin-notice-panel__configure-highlighted-logs{border-bottom:1px solid #7ABEED;margin-bottom:1em;padding-bottom:1em}.itsec-admin-notice-panel .itsec-admin-notice-panel__configure-highlighted-logs li{display:flex;justify-content:space-between;border-bottom:1px solid #ccc;margin-bottom:1em;padding-bottom:1em;padding-top:0;margin-top:0}.itsec-admin-notice-panel .itsec-admin-notice-panel__configure-highlighted-logs li:last-child{border-bottom:none;margin-bottom:0;padding-bottom:0}.itsec-admin-notice-panel .itsec-admin-notice-panel__configure-highlighted-logs li label{margin-left:calc(36px + 1em);font-size:14px;font-weight:bold}.itsec-admin-notice-panel .itsec-admin-notice-panel__configure-highlighted-logs li .components-form-toggle.is-checked .components-form-toggle__track{background-color:#0081E3;border-color:#0081E3}.itsec-admin-notice-panel .itsec-admin-notice-panel__configure-highlighted-logs li .components-form-toggle__input:disabled+.components-form-toggle__track{opacity:.5}
8
-
9
- @keyframes itsec-animation-fade-in-constant{from{opacity:0}to{opacity:1}}#wpadminbar #wp-admin-bar-itsec_admin_bar_menu .ab-sub-wrapper{background:transparent;box-shadow:none}#wpadminbar .itsec-admin-notices-toolbar-bubble{display:inline-block;vertical-align:top;margin:8px 0 0 5px;padding:0 5px;min-width:7px;height:17px;border-radius:11px;font-size:9px;line-height:17px;text-align:center;z-index:26;background-color:#ca4a1f;color:#fff;animation:itsec-admin-notices-toolbar-bubble-fade-in 400ms}#wpadminbar .itsec-admin-notices-toolbar-bubble .itsec-admin-notices-toolbar-bubble__count{line-height:17px;font-size:9px}@keyframes itsec-admin-notices-toolbar-bubble-fade-in{from{opacity:0}to{opacity:1}}#itsec-admin-notices-root .itsec-admin-notice-panel{border:1px solid #e2e4e7;box-shadow:0 3px 30px rgba(25,30,35,0.1)}#itsec-admin-notices-root .components-popover:not(.is-mobile).is-bottom{z-index:99999}#itsec-admin-notices-root .itsec-admin-notices-toolbar__popover .components-popover__content{box-shadow:rgba(0,0,0,0.19) 0 4px 5px}#wp-admin-bar-itsec_admin_bar_menu .components-button{cursor:pointer}#wp-admin-bar-itsec_admin_bar_menu .it-icon-itsec{display:none;margin-top:8px;color:rgba(240,245,250,0.6);height:20px;width:52px;line-height:32px;font-size:32px;text-align:center}@media screen and (max-width: 782px){#wp-toolbar>ul>li#wp-admin-bar-itsec_admin_bar_menu{display:list-item}#wp-toolbar>ul>li#wp-admin-bar-itsec_admin_bar_menu .it-icon-itsec{display:inline-block}#wp-toolbar>ul>li#wp-admin-bar-itsec_admin_bar_menu .itsec-toolbar-text{display:none}#wp-toolbar>ul>li#wp-admin-bar-itsec_admin_bar_menu .itsec-admin-notices-toolbar-bubble{display:none}#wp-toolbar>ul>li#wp-admin-bar-itsec_admin_bar_menu .itsec-admin-notices-toolbar--has-notices{position:relative}#wp-toolbar>ul>li#wp-admin-bar-itsec_admin_bar_menu .itsec-admin-notices-toolbar--has-notices::before{content:'';background:#d8514f;height:5px;width:5px;border-radius:5px;vertical-align:middle;border:1px solid #23282d;z-index:1;position:absolute;left:4px;top:3px;animation:itsec-admin-notices-toolbar-bubble-fade-in 400ms}}
10
-
11
  @keyframes itsec-animation-fade-in-constant{from{opacity:0}to{opacity:1}}
12
-
1
+ @keyframes itsec-animation-fade-in-constant{from{opacity:0}to{opacity:1}}.itsec-admin-notice{background:#fff;border-radius:3px;box-shadow:0 0 5px rgba(211,211,211,.35)}.itsec-admin-notice .itsec-admin-notice__header{background:#eeecec;padding:calc(20px / 2);border-top-left-radius:3px;border-top-right-radius:3px}.itsec-admin-notice .itsec-admin-notice__header:last-child{border-bottom-left-radius:3px;border-bottom-right-radius:3px}.itsec-admin-notice .itsec-admin-notice__header .components-button{margin-top:1em;padding:.5em 1em;background:#e1f2fc;color:#0081e3;border:1px solid #0081e3;transition:background-color 300ms,color 150ms}.itsec-admin-notice .itsec-admin-notice__header .components-button:hover{background:#0081e3;color:#fff}.itsec-admin-notice .itsec-admin-notice__header .components-button.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-admin-notice .itsec-admin-notice__header .components-button.is-busy:hover{color:#0081e3}.itsec-admin-notice--severity-error.itsec-admin-notice .itsec-admin-notice__header{background:#d94f4f}.itsec-admin-notice--severity-error.itsec-admin-notice .itsec-admin-notice__header .components-button{padding:.5em 1em;background:#fcefef;color:#d94f4f;border:1px solid #d94f4f;transition:background-color 300ms,color 150ms}.itsec-admin-notice--severity-error.itsec-admin-notice .itsec-admin-notice__header .components-button:hover{background:#d94f4f;color:#fff}.itsec-admin-notice--severity-error.itsec-admin-notice .itsec-admin-notice__header .components-button.is-busy{animation:components-button__busy-animation 2500ms infinite linear;background-size:100px 100%;background-image:repeating-linear-gradient(-45deg, #fcefef, #fff 11px, #fff 10px, #fcefef 20px);opacity:1}.itsec-admin-notice--severity-error.itsec-admin-notice .itsec-admin-notice__header .components-button.is-busy:hover{color:#d94f4f}.itsec-admin-notice--severity-warning.itsec-admin-notice .itsec-admin-notice__header{background:#f78b53}.itsec-admin-notice--severity-warning.itsec-admin-notice .itsec-admin-notice__header .components-button{padding:.5em 1em;background:#fef1ea;color:#f78b53;border:1px solid #f78b53;transition:background-color 300ms,color 150ms}.itsec-admin-notice--severity-warning.itsec-admin-notice .itsec-admin-notice__header .components-button:hover{background:#f78b53;color:#fff}.itsec-admin-notice--severity-warning.itsec-admin-notice .itsec-admin-notice__header .components-button.is-busy{animation:components-button__busy-animation 2500ms infinite linear;background-size:100px 100%;background-image:repeating-linear-gradient(-45deg, #fef1ea, #fff 11px, #fff 10px, #fef1ea 20px);opacity:1}.itsec-admin-notice--severity-warning.itsec-admin-notice .itsec-admin-notice__header .components-button.is-busy:hover{color:#f78b53}.itsec-admin-notice--severity-info.itsec-admin-notice .itsec-admin-notice__header{background:#00a0d2}.itsec-admin-notice--severity-success.itsec-admin-notice .itsec-admin-notice__header{background:#4ab866}.itsec-admin-notice--severity-success.itsec-admin-notice .itsec-admin-notice__header .components-button{padding:.5em 1em;background:#e4f4e8;color:#4ab866;border:1px solid #4ab866;transition:background-color 300ms,color 150ms}.itsec-admin-notice--severity-success.itsec-admin-notice .itsec-admin-notice__header .components-button:hover{background:#4ab866;color:#fff}.itsec-admin-notice--severity-success.itsec-admin-notice .itsec-admin-notice__header .components-button.is-busy{animation:components-button__busy-animation 2500ms infinite linear;background-size:100px 100%;background-image:repeating-linear-gradient(-45deg, #e4f4e8, #fff 11px, #fff 10px, #e4f4e8 20px);opacity:1}.itsec-admin-notice--severity-success.itsec-admin-notice .itsec-admin-notice__header .components-button.is-busy:hover{color:#4ab866}.itsec-admin-notice .itsec-admin-notice .itsec-admin-notice__header:last-child{border-bottom-left-radius:3px;border-bottom-right-radius:3px}.itsec-admin-notice .itsec-admin-notice__header .itsec-admin-notice__header-inset{background:#fff;border-radius:5px;padding:calc(20px / 2)}.itsec-admin-notice .itsec-admin-notice__header h4{font-size:14px;margin:0;color:#0a1a23;font-weight:600;text-transform:none}.itsec-admin-notice .itsec-admin-notice__message{border-left:1px solid #e5eaee;border-right:1px solid #e5eaee;padding:10px 20px}.itsec-admin-notice .itsec-admin-notice__message p:first-child{margin-top:0}.itsec-admin-notice .itsec-admin-notice__message p:last-child{margin-bottom:0}.itsec-admin-notice .itsec-admin-notice__meta{border-left:1px solid #e5eaee;border-right:1px solid #e5eaee;background:#dcebf3;padding:5px 20px;margin:0;display:grid;grid-template:auto/min-content 1fr;grid-gap:5px 20px}.itsec-admin-notice .itsec-admin-notice__meta dt,.itsec-admin-notice .itsec-admin-notice__meta dd{margin:0}.itsec-admin-notice .itsec-admin-notice__meta dt{text-transform:uppercase;color:#040404}.itsec-admin-notice .itsec-admin-notice__footer{border-left:1px solid #e5eaee;border-right:1px solid #e5eaee;padding:5px 20px;font-size:11px}.itsec-admin-notice>:last-child:not(.itsec-admin-notice__header){border-bottom:1px solid #e5eaee}
 
2
  @keyframes itsec-animation-fade-in-constant{from{opacity:0}to{opacity:1}}.itsec-admin-notice-list-actions .components-button.has-icon{padding:2px !important}.itsec-admin-notice-list-actions .components-button.has-icon .dashicon{margin:0}.itsec-admin-notice-list-actions__more-menu-items .components-popover__content>div{overflow:hidden;padding:7px 0}.itsec-admin-notice-list-actions__more-menu-items .components-button{width:100%;min-height:38px;box-sizing:border-box;padding:10px;color:#0073aa;justify-content:space-between;align-items:center}.itsec-admin-notice-list-actions__more-menu-items .components-button:focus{outline-offset:-2px;outline:1px dotted #555d66;box-shadow:none}.itsec-admin-notice-list-actions__more-menu-items .components-button:hover{color:#191e23;background:#f3f4f5}.itsec-admin-notice-list-actions__more-menu-items .components-button .components-spinner{margin:0}
3
+ @keyframes itsec-animation-fade-in-constant{from{opacity:0}to{opacity:1}}.itsec-admin-notice-list{margin:0}.itsec-admin-notice-list-item-container{display:grid;grid-template:auto/min-content 1fr;grid-gap:1em;margin-bottom:2em}.itsec-admin-notice-list-item-container:last-child{margin-bottom:0}
4
+ @keyframes itsec-animation-fade-in-constant{from{opacity:0}to{opacity:1}}@keyframes itsec-animation-fade-in-constant{from{opacity:0}to{opacity:1}}.itsec-admin-bar-admin-notices__content.components-popover .components-popover__content{border-color:1px solid #e5eaee;box-shadow:0 2px 6px rgba(0,0,0,.25)}.itsec-admin-bar-admin-notices__content.components-popover::after{border-color:#e5eaee !important}.itsec-admin-notice-panel{padding:1em;background:#fff;width:420px;max-width:100%;box-sizing:border-box}.itsec-admin-notice-panel .itsec-admin-notice-panel__header{border-bottom:1px solid #7abeed;margin-bottom:1em}.itsec-admin-notice-panel .itsec-admin-notice-panel__header h3{color:#0081e3;text-align:center;margin:1rem 0 !important}.itsec-admin-notice-panel .itsec-admin-notice-panel__header p{text-align:center;font-style:oblique;margin:1rem 0 !important}.is-mobile .itsec-admin-notice-panel{width:100%;overflow-x:auto;height:100%}.is-mobile .itsec-admin-notice-panel header h3{display:none}.is-mobile .itsec-admin-notice-panel header p{margin-top:0}.itsec-admin-notice-panel .itsec-admin-notice-panel__configure-trigger.components-button{padding:0;height:auto;width:auto;min-width:0;position:absolute;right:1em;top:1em;transition:opacity 400ms}.itsec-admin-notice-panel .itsec-admin-notice-panel__configure-trigger.components-button:hover{opacity:.5;box-shadow:none !important}.itsec-admin-notice-panel .itsec-admin-notice-panel__configure-trigger.components-button .dashicon{margin:0}.itsec-admin-notice-panel.itsec-admin-notice-panel--is-configuring .itsec-admin-notice-panel__configure-trigger.components-button{color:#0081e3}.itsec-admin-notice-panel.itsec-admin-notice-panel--is-configuring .itsec-admin-notice-panel__configure-trigger.components-button:hover{color:#0081e3}.itsec-admin-notice-panel .itsec-admin-notice-panel__configure-highlighted-logs{border-bottom:1px solid #7abeed;margin-bottom:1em;padding-bottom:1em}.itsec-admin-notice-panel .itsec-admin-notice-panel__configure-highlighted-logs li{display:flex;justify-content:space-between;border-bottom:1px solid #ccc;margin-bottom:1em;padding-bottom:1em;padding-top:0;margin-top:0}.itsec-admin-notice-panel .itsec-admin-notice-panel__configure-highlighted-logs li:last-child{border-bottom:none;margin-bottom:0;padding-bottom:0}.itsec-admin-notice-panel .itsec-admin-notice-panel__configure-highlighted-logs li label{margin-left:calc(36px + 1em);font-size:14px;font-weight:bold}.itsec-admin-notice-panel .itsec-admin-notice-panel__configure-highlighted-logs li .components-form-toggle.is-checked .components-form-toggle__track{background-color:#0081e3;border-color:#0081e3}.itsec-admin-notice-panel .itsec-admin-notice-panel__configure-highlighted-logs li .components-form-toggle__input:disabled+.components-form-toggle__track{opacity:.5}
5
+ @keyframes itsec-animation-fade-in-constant{from{opacity:0}to{opacity:1}}#wpadminbar #wp-admin-bar-itsec_admin_bar_menu .ab-sub-wrapper{background:transparent;box-shadow:none}#wpadminbar .itsec-admin-notices-toolbar-bubble{display:inline-block;vertical-align:top;margin:8px 0 0 5px;padding:0 5px;min-width:7px;height:17px;border-radius:11px;font-size:9px;line-height:17px;text-align:center;z-index:26;background-color:#ca4a1f;color:#fff;animation:itsec-admin-notices-toolbar-bubble-fade-in 400ms}#wpadminbar .itsec-admin-notices-toolbar-bubble .itsec-admin-notices-toolbar-bubble__count{line-height:17px;font-size:9px}@keyframes itsec-admin-notices-toolbar-bubble-fade-in{from{opacity:0}to{opacity:1}}#itsec-admin-notices-root .itsec-admin-notice-panel{border:1px solid #e2e4e7;box-shadow:0 3px 30px rgba(25,30,35,.1)}#itsec-admin-notices-root .components-popover:not(.is-mobile).is-bottom{z-index:99999}#itsec-admin-notices-root .itsec-admin-notices-toolbar__popover .components-popover__content{box-shadow:rgba(0,0,0,.19) 0 4px 5px}#wp-admin-bar-itsec_admin_bar_menu .components-button{cursor:pointer}#wp-admin-bar-itsec_admin_bar_menu .it-icon-itsec{display:none;margin-top:8px;color:rgba(240,245,250,.6);height:20px;width:52px;line-height:32px;font-size:32px;text-align:center}@media screen and (max-width: 782px){#wp-toolbar>ul>li#wp-admin-bar-itsec_admin_bar_menu{display:list-item}#wp-toolbar>ul>li#wp-admin-bar-itsec_admin_bar_menu .it-icon-itsec{display:inline-block}#wp-toolbar>ul>li#wp-admin-bar-itsec_admin_bar_menu .itsec-toolbar-text{display:none}#wp-toolbar>ul>li#wp-admin-bar-itsec_admin_bar_menu .itsec-admin-notices-toolbar-bubble{display:none}#wp-toolbar>ul>li#wp-admin-bar-itsec_admin_bar_menu .itsec-admin-notices-toolbar--has-notices{position:relative}#wp-toolbar>ul>li#wp-admin-bar-itsec_admin_bar_menu .itsec-admin-notices-toolbar--has-notices::before{content:"";background:#d8514f;height:5px;width:5px;border-radius:5px;vertical-align:middle;border:1px solid #23282d;z-index:1;position:absolute;left:4px;top:3px;animation:itsec-admin-notices-toolbar-bubble-fade-in 400ms}}
 
 
 
 
6
  @keyframes itsec-animation-fade-in-constant{from{opacity:0}to{opacity:1}}
 
dist/core/admin-notices.js CHANGED
@@ -1,7 +1,7 @@
1
- this.itsec=this.itsec||{},this.itsec.core=this.itsec.core||{},this.itsec.core["admin-notices"]=(window.itsecWebpackJsonP=window.itsecWebpackJsonP||[]).push([[8],{"1Zi1":function(e,t,n){},"1ZqX":function(e,t){!function(){e.exports=this.wp.data}()},"6IbE":function(e,t,n){},Ckse:function(e,t,n){},GRId:function(e,t){!function(){e.exports=this.wp.element}()},Hz6T:function(e,t){!function(){e.exports=this.itsec.core["admin-notices-api"]}()},K9lf:function(e,t){!function(){e.exports=this.wp.compose}()},KTI5:function(e,t,n){},TSYQ:function(e,t,n){
2
  /*!
3
  Copyright (c) 2018 Jed Watson.
4
  Licensed under the MIT License (MIT), see
5
  http://jedwatson.github.io/classnames
6
  */
7
- !function(){"use strict";var t={}.hasOwnProperty;function n(){for(var e=[],i=0;i<arguments.length;i++){var c=arguments[i];if(c){var a=typeof c;if("string"===a||"number"===a)e.push(c);else if(Array.isArray(c)){if(c.length){var o=n.apply(null,c);o&&e.push(o)}}else if("object"===a)if(c.toString===Object.prototype.toString)for(var r in c)t.call(c,r)&&c[r]&&e.push(r);else e.push(c.toString())}}return e.join(" ")}e.exports?(n.default=n,e.exports=n):"function"==typeof define&&"object"==typeof define.amd&&define.amd?define("classnames",[],(function(){return n})):window.classNames=n}()},UuzZ:function(e,t){!function(){e.exports=this.wp.autop}()},VwaH:function(e,t,n){},Y8OO:function(e,t){!function(){e.exports=this.wp.domReady}()},YLtl:function(e,t){!function(){e.exports=this.lodash}()},dwGD:function(e,t,n){"use strict";n.r(t);var i=n("GRId"),c=n("l3Sj"),a=n("Y8OO"),o=n.n(a),r=n("tI+e"),s=(n("Hz6T"),n("TSYQ")),l=n.n(s),u=n("K9lf"),m=n("1ZqX"),d=n("rE5z");n("6IbE");var b=Object(u.compose)([Object(m.withSelect)((function(e){return{notices:e("ithemes-security/admin-notices").getNotices(),noticesLoaded:e("ithemes-security/admin-notices").areNoticesLoaded()}})),Object(u.withState)({isToggled:!1})])((function(e){var t=e.notices,n=e.noticesLoaded,a=e.isToggled,o=e.setState;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(r.Button,{id:"itsec-admin-notices-toolbar-trigger",className:l()("ab-item ab-empty-item",{"itsec-admin-notices-toolbar--has-notices":t.length>0}),onClick:function(){return o({isToggled:!a})},"aria-expanded":a},Object(i.createElement)("span",{className:"it-icon-itsec"}),Object(i.createElement)("span",{className:"itsec-toolbar-text"},Object(c.__)("Security","better-wp-security")),t.length>0&&Object(i.createElement)("span",{className:"itsec-admin-notices-toolbar-bubble"},Object(i.createElement)("span",{className:"itsec-admin-notices-toolbar-bubble__count"},t.length))),a&&Object(i.createElement)(r.Popover,{className:"itsec-admin-notices-toolbar__popover",noArrow:!0,expandOnMobile:!0,focusOnMount:"container",position:"bottom center",headerTitle:Object(c.__)("Security","better-wp-security"),onClose:function(){return o({isToggled:!1})},onFocusOutside:function(){return o({isToggled:!1})}},Object(i.createElement)(d.a,{notices:t,loaded:n,close:function(){return o({isToggled:!1})}})))}));n("1Zi1");var O=function(e){var t=e.portalEl;return Object(i.createElement)(r.SlotFillProvider,null,Object(i.createPortal)(Object(i.createElement)(r.Popover.Slot,null),t),Object(i.createElement)(b,null))};n.p=window.itsecWebpackPublicPath,Object(c.setLocaleData)({"":{}},"better-wp-security"),o()((function(){var e=document.getElementById("wp-admin-bar-itsec_admin_bar_menu"),t=document.getElementById("itsec-admin-notices-root");return Object(i.render)(Object(i.createElement)(O,{portalEl:t}),e)}))},l3Sj:function(e,t){!function(){e.exports=this.wp.i18n}()},"o/Pk":function(e,t,n){},rE5z:function(e,t,n){"use strict";var i=n("GRId"),c=n("TSYQ"),a=n.n(c),o=n("YLtl"),r=n("l3Sj"),s=n("tI+e"),l=n("K9lf"),u=n("1ZqX"),m=n("UuzZ");n("VwaH");function d(e){var t=e.notice;return Object(i.createElement)("article",{className:"itsec-admin-notice itsec-admin-notice--severity-".concat(t.severity)},Object(i.createElement)("header",{className:"itsec-admin-notice__header"},Object(i.createElement)("div",{className:"itsec-admin-notice__header-inset"},Object(i.createElement)("h4",{dangerouslySetInnerHTML:{__html:t.title||b(t.message,t)}}),Object(o.map)(t.actions,(function(e,t){return"primary"===e.style&&Object(i.createElement)(s.Button,{key:t,href:e.uri},e.title)})))),t.title&&t.message&&Object(i.createElement)("section",{className:"itsec-admin-notice__message",dangerouslySetInnerHTML:{__html:Object(m.autop)(b(t.message,t))}}),function(e){if(Object(o.isEmpty)(e.meta))return!1;if(1===Object(o.size)(e.meta)&&e.meta.hasOwnProperty("created_at"))return!1;return!0}(t)&&Object(i.createElement)("dl",{className:"itsec-admin-notice__meta"},Object(o.map)(t.meta,(function(e,t){return"created_at"!==t&&Object(i.createElement)(i.Fragment,{key:t},Object(i.createElement)("dt",null,e.label),Object(i.createElement)("dd",null,e.formatted))}))),t.meta.created_at&&Object(i.createElement)("footer",{className:"itsec-admin-notice__footer"},Object(i.createElement)("time",{dateTime:t.meta.created_at.value},t.meta.created_at.formatted)))}function b(e,t){for(var n in t.actions)t.actions.hasOwnProperty(n)&&""!==t.actions[n].uri&&(e=e.replace("{{ $"+n+" }}",t.actions[n].uri));return e}n("o/Pk");var O=Object(l.compose)([Object(u.withDispatch)((function(e){return{doAction:e("ithemes-security/admin-notices").doNoticeAction}})),Object(u.withSelect)((function(e,t){return{inProgress:e("ithemes-security/admin-notices").getInProgressActions(t.notice.id)}}))])((function(e){var t=e.notice,n=e.doAction,c=e.inProgress,a=[],l=function(e){if(!t.actions.hasOwnProperty(e))return"continue";var o=t.actions[e];"close"===o.style&&a.push(Object(i.createElement)("li",{key:e},Object(i.createElement)(s.Button,{icon:"dismiss",label:o.title,onClick:function(){return n(t.id,e)},isBusy:c.includes(e)})))};for(var u in t.actions)l(u);var m=function(e){var t={};for(var n in e.actions)if(e.actions.hasOwnProperty(n)){var i=e.actions[n];"close"!==i.style&&"primary"!==i.style&&(t[n]=i)}return t}(t);return Object(o.isEmpty)(m)||a.push(Object(i.createElement)("li",{key:"more"},Object(i.createElement)(s.Dropdown,{position:"bottom right",className:"itsec-admin-notice-list-actions__more-menu",contentClassName:"itsec-admin-notice-list-actions__more-menu-items",renderToggle:function(e){var t=e.isOpen,n=e.onToggle;return Object(i.createElement)(s.Button,{icon:"ellipsis",label:Object(r.__)("More Actions","better-wp-security"),onClick:n,"aria-haspopup":!0,"aria-expanded":t})},renderContent:function(){return Object(i.createElement)(s.NavigableMenu,{role:"menu"},Object(o.map)(m,(function(e,a){return e.uri?Object(i.createElement)(s.Button,{key:a,href:e.uri},e.title):Object(i.createElement)(s.Button,{key:a,onClick:function(){return n(t.id,a)},disabled:c.includes(a)},e.title,c.includes(a)&&Object(i.createElement)(s.Spinner,null))})))}}))),Object(i.createElement)("ul",{className:"itsec-admin-notice-list-actions"},a)}));n("Ckse");var f=function(e){var t=e.notices;return Object(i.createElement)("ul",{className:"itsec-admin-notice-list"},t.map((function(e){return Object(i.createElement)("li",{className:"itsec-admin-notice-list-item-container",key:e.id},Object(i.createElement)(O,{notice:e}),Object(i.createElement)(d,{notice:e,noticeId:e.id}))})))};n("KTI5");t.a=Object(l.compose)([Object(l.withState)({isConfiguring:!1,checked:{}}),Object(u.withSelect)((function(e){return{mutedHighlights:e("ithemes-security/admin-notices").getMutedHighlights(),mutedHighlightUpdatesInFlight:e("ithemes-security/admin-notices").getMutedHighlightUpdatesInFlight()}})),Object(u.withDispatch)((function(e){return{updateMutedHighlight:e("ithemes-security/admin-notices").updateMutedHighlight}}))])((function(e){var t=e.notices,n=e.loaded,c=e.mutedHighlights,l=e.mutedHighlightUpdatesInFlight,u=e.updateMutedHighlight,m=e.isConfiguring,d=e.setState;return Object(i.createElement)("div",{className:a()("itsec-admin-notice-panel",{"itsec-admin-notice-panel--is-configuring":m})},Object(i.createElement)(s.Button,{icon:"admin-generic",label:Object(r.__)("Configure","better-wp-security"),className:"itsec-admin-notice-panel__configure-trigger",style:{opacity:Object(o.size)(c)>0?1:0},onClick:function(){return d({isConfiguring:!m})}}),Object(i.createElement)("header",{className:"itsec-admin-notice-panel__header"},Object(i.createElement)("h3",null,Object(r.__)("Security Admin Messages","better-wp-security")),Object(i.createElement)("p",null,Object(r.__)("Important notices from iThemes Security","better-wp-security"))),m&&Object(i.createElement)("ul",{className:"itsec-admin-notice-panel__configure-highlighted-logs"},[{slug:"file-change-report",label:Object(r.__)("File Change Report","better-wp-security")},{slug:"notification-center-send-failed",label:Object(r.__)("Notification Center Errors","better-wp-security")},{slug:"malware-scan-report",label:Object(r.__)("Malware Scan Report","better-wp-security")},{slug:"malware-scan-failed",label:Object(r.__)("Malware Scan Failed","better-wp-security")},{slug:"site-scanner-report",label:Object(r.__)("Site Scan Report","better-wp-security")}].map((function(e){var t=e.slug,a=e.label;return void 0!==c[t]&&Object(i.createElement)("li",null,Object(i.createElement)("label",{htmlFor:"itsec-mute-highlight-".concat(t)},a),Object(i.createElement)(s.FormToggle,{id:"itsec-mute-highlight-".concat(t),disabled:!n||l[t],checked:!Object(o.get)(l,[t,"mute"],c[t]),onChange:function(){return u(t,!c[t])}}))}))),t.length>0?Object(i.createElement)(f,{notices:t}):n&&Object(i.createElement)("span",null,Object(r.__)("No notices at the moment.","better-wp-security")))}))},"tI+e":function(e,t){!function(){e.exports=this.wp.components}()}},[["dwGD",0]]]);
1
+ this.itsec=this.itsec||{},this.itsec.core=this.itsec.core||{},this.itsec.core["admin-notices"]=(window.itsecWebpackJsonP=window.itsecWebpackJsonP||[]).push([[10],{"1Zi1":function(e,t,n){},"1ZqX":function(e,t){!function(){e.exports=this.wp.data}()},"6IbE":function(e,t,n){},Ckse:function(e,t,n){},GRId:function(e,t){!function(){e.exports=this.wp.element}()},Hz6T:function(e,t){!function(){e.exports=this.itsec.core["admin-notices-api"]}()},K9lf:function(e,t){!function(){e.exports=this.wp.compose}()},KTI5:function(e,t,n){},TSYQ:function(e,t,n){
2
  /*!
3
  Copyright (c) 2018 Jed Watson.
4
  Licensed under the MIT License (MIT), see
5
  http://jedwatson.github.io/classnames
6
  */
7
+ !function(){"use strict";var t={}.hasOwnProperty;function n(){for(var e=[],i=0;i<arguments.length;i++){var c=arguments[i];if(c){var a=typeof c;if("string"===a||"number"===a)e.push(c);else if(Array.isArray(c)){if(c.length){var o=n.apply(null,c);o&&e.push(o)}}else if("object"===a)if(c.toString===Object.prototype.toString)for(var s in c)t.call(c,s)&&c[s]&&e.push(s);else e.push(c.toString())}}return e.join(" ")}e.exports?(n.default=n,e.exports=n):"function"==typeof define&&"object"==typeof define.amd&&define.amd?define("classnames",[],(function(){return n})):window.classNames=n}()},UuzZ:function(e,t){!function(){e.exports=this.wp.autop}()},VwaH:function(e,t,n){},Y8OO:function(e,t){!function(){e.exports=this.wp.domReady}()},YLtl:function(e,t){!function(){e.exports=this.lodash}()},dwGD:function(e,t,n){"use strict";n.r(t);var i=n("GRId"),c=n("l3Sj"),a=n("Y8OO"),o=n.n(a),s=n("tI+e"),l=(n("Hz6T"),n("TSYQ")),r=n.n(l),m=n("K9lf"),u=n("1ZqX"),d=n("rE5z");n("6IbE");var b=Object(m.compose)([Object(u.withSelect)(e=>({notices:e("ithemes-security/admin-notices").getNotices(),noticesLoaded:e("ithemes-security/admin-notices").areNoticesLoaded()})),Object(m.withState)({isToggled:!1})])((function(e){let{notices:t,noticesLoaded:n,isToggled:a,setState:o}=e;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(s.Button,{id:"itsec-admin-notices-toolbar-trigger",className:r()("ab-item ab-empty-item",{"itsec-admin-notices-toolbar--has-notices":t.length>0}),onClick:()=>o({isToggled:!a}),"aria-expanded":a},Object(i.createElement)("span",{className:"it-icon-itsec"}),Object(i.createElement)("span",{className:"itsec-toolbar-text"},Object(c.__)("Security","better-wp-security")),t.length>0&&Object(i.createElement)("span",{className:"itsec-admin-notices-toolbar-bubble"},Object(i.createElement)("span",{className:"itsec-admin-notices-toolbar-bubble__count"},t.length))),a&&Object(i.createElement)(s.Popover,{className:"itsec-admin-notices-toolbar__popover",noArrow:!0,expandOnMobile:!0,focusOnMount:"container",position:"bottom center",headerTitle:Object(c.__)("Security","better-wp-security"),onClose:()=>o({isToggled:!1}),onFocusOutside:()=>o({isToggled:!1})},Object(i.createElement)(d.a,{notices:t,loaded:n,close:()=>o({isToggled:!1})})))}));n("1Zi1");var O=function(e){let{portalEl:t}=e;return Object(i.createElement)(s.SlotFillProvider,null,Object(i.createPortal)(Object(i.createElement)(s.Popover.Slot,null),t),Object(i.createElement)(b,null))};n.p=window.itsecWebpackPublicPath,Object(c.setLocaleData)({"":{}},"better-wp-security"),o()(()=>{const e=document.getElementById("wp-admin-bar-itsec_admin_bar_menu"),t=document.getElementById("itsec-admin-notices-root");return Object(i.render)(Object(i.createElement)(O,{portalEl:t}),e)})},l3Sj:function(e,t){!function(){e.exports=this.wp.i18n}()},"o/Pk":function(e,t,n){},rE5z:function(e,t,n){"use strict";var i=n("GRId"),c=n("TSYQ"),a=n.n(c),o=n("YLtl"),s=n("l3Sj"),l=n("tI+e"),r=n("K9lf"),m=n("1ZqX"),u=n("UuzZ");n("VwaH");function d(e){let{notice:t}=e;return Object(i.createElement)("article",{className:"itsec-admin-notice itsec-admin-notice--severity-"+t.severity},Object(i.createElement)("header",{className:"itsec-admin-notice__header"},Object(i.createElement)("div",{className:"itsec-admin-notice__header-inset"},Object(i.createElement)("h4",{dangerouslySetInnerHTML:{__html:t.title||b(t.message,t)}}),Object(o.map)(t.actions,(e,t)=>"primary"===e.style&&Object(i.createElement)(l.Button,{key:t,href:e.uri},e.title)))),t.title&&t.message&&Object(i.createElement)("section",{className:"itsec-admin-notice__message",dangerouslySetInnerHTML:{__html:Object(u.autop)(b(t.message,t))}}),function(e){if(Object(o.isEmpty)(e.meta))return!1;if(1===Object(o.size)(e.meta)&&e.meta.hasOwnProperty("created_at"))return!1;return!0}(t)&&Object(i.createElement)("dl",{className:"itsec-admin-notice__meta"},Object(o.map)(t.meta,(e,t)=>"created_at"!==t&&Object(i.createElement)(i.Fragment,{key:t},Object(i.createElement)("dt",null,e.label),Object(i.createElement)("dd",null,e.formatted)))),t.meta.created_at&&Object(i.createElement)("footer",{className:"itsec-admin-notice__footer"},Object(i.createElement)("time",{dateTime:t.meta.created_at.value},t.meta.created_at.formatted)))}function b(e,t){for(const n in t.actions)t.actions.hasOwnProperty(n)&&""!==t.actions[n].uri&&(e=e.replace("{{ $"+n+" }}",t.actions[n].uri));return e}n("o/Pk");var O=Object(r.compose)([Object(m.withDispatch)(e=>({doAction:e("ithemes-security/admin-notices").doNoticeAction})),Object(m.withSelect)((e,t)=>({inProgress:e("ithemes-security/admin-notices").getInProgressActions(t.notice.id)}))])((function(e){let{notice:t,doAction:n,inProgress:c}=e;const a=[];for(const e in t.actions){if(!t.actions.hasOwnProperty(e))continue;const o=t.actions[e];"close"===o.style&&a.push(Object(i.createElement)("li",{key:e},Object(i.createElement)(l.Button,{icon:"dismiss",label:o.title,onClick:()=>n(t.id,e),isBusy:c.includes(e)})))}const r=function(e){const t={};for(const n in e.actions){if(!e.actions.hasOwnProperty(n))continue;const i=e.actions[n];"close"!==i.style&&("primary"!==i.style&&(t[n]=i))}return t}(t);return Object(o.isEmpty)(r)||a.push(Object(i.createElement)("li",{key:"more"},Object(i.createElement)(l.Dropdown,{position:"bottom right",className:"itsec-admin-notice-list-actions__more-menu",contentClassName:"itsec-admin-notice-list-actions__more-menu-items",renderToggle:e=>{let{isOpen:t,onToggle:n}=e;return Object(i.createElement)(l.Button,{icon:"ellipsis",label:Object(s.__)("More Actions","better-wp-security"),onClick:n,"aria-haspopup":!0,"aria-expanded":t})},renderContent:()=>Object(i.createElement)(l.NavigableMenu,{role:"menu"},Object(o.map)(r,(e,a)=>e.uri?Object(i.createElement)(l.Button,{key:a,href:e.uri},e.title):Object(i.createElement)(l.Button,{key:a,onClick:()=>n(t.id,a),disabled:c.includes(a)},e.title,c.includes(a)&&Object(i.createElement)(l.Spinner,null))))}))),Object(i.createElement)("ul",{className:"itsec-admin-notice-list-actions"},a)}));n("Ckse");var p=function(e){let{notices:t}=e;return Object(i.createElement)("ul",{className:"itsec-admin-notice-list"},t.map(e=>Object(i.createElement)("li",{className:"itsec-admin-notice-list-item-container",key:e.id},Object(i.createElement)(O,{notice:e}),Object(i.createElement)(d,{notice:e,noticeId:e.id}))))};n("KTI5");t.a=Object(r.compose)([Object(r.withState)({isConfiguring:!1,checked:{}}),Object(m.withSelect)(e=>({mutedHighlights:e("ithemes-security/admin-notices").getMutedHighlights(),mutedHighlightUpdatesInFlight:e("ithemes-security/admin-notices").getMutedHighlightUpdatesInFlight()})),Object(m.withDispatch)(e=>({updateMutedHighlight:e("ithemes-security/admin-notices").updateMutedHighlight}))])((function(e){let{notices:t,loaded:n,mutedHighlights:c,mutedHighlightUpdatesInFlight:r,updateMutedHighlight:m,isConfiguring:u,setState:d}=e;return Object(i.createElement)("div",{className:a()("itsec-admin-notice-panel",{"itsec-admin-notice-panel--is-configuring":u})},Object(i.createElement)(l.Button,{icon:"admin-generic",label:Object(s.__)("Configure","better-wp-security"),className:"itsec-admin-notice-panel__configure-trigger",style:{opacity:Object(o.size)(c)>0?1:0},onClick:()=>d({isConfiguring:!u})}),Object(i.createElement)("header",{className:"itsec-admin-notice-panel__header"},Object(i.createElement)("h3",null,Object(s.__)("Security Admin Messages","better-wp-security")),Object(i.createElement)("p",null,Object(s.__)("Important notices from iThemes Security","better-wp-security"))),u&&Object(i.createElement)("ul",{className:"itsec-admin-notice-panel__configure-highlighted-logs"},[{slug:"file-change-report",label:Object(s.__)("File Change Report","better-wp-security")},{slug:"notification-center-send-failed",label:Object(s.__)("Notification Center Errors","better-wp-security")},{slug:"malware-scan-report",label:Object(s.__)("Malware Scan Report","better-wp-security")},{slug:"malware-scan-failed",label:Object(s.__)("Malware Scan Failed","better-wp-security")},{slug:"site-scanner-report",label:Object(s.__)("Site Scan Report","better-wp-security")}].map(e=>{let{slug:t,label:a}=e;return void 0!==c[t]&&Object(i.createElement)("li",null,Object(i.createElement)("label",{htmlFor:"itsec-mute-highlight-"+t},a),Object(i.createElement)(l.FormToggle,{id:"itsec-mute-highlight-"+t,disabled:!n||r[t],checked:!Object(o.get)(r,[t,"mute"],c[t]),onChange:()=>m(t,!c[t])}))})),t.length>0?Object(i.createElement)(p,{notices:t}):n&&Object(i.createElement)("span",null,Object(s.__)("No notices at the moment.","better-wp-security")))}))},"tI+e":function(e,t){!function(){e.exports=this.wp.components}()}},[["dwGD",0]]]);
dist/core/packages/components/site-scan-results/style.css CHANGED
@@ -1,2 +1 @@
1
  @keyframes itsec-animation-fade-in-constant{from{opacity:0}to{opacity:1}}.itsec-site-scan-results h4{margin-top:5px}.itsec-site-scan-results .itsec-site-scan-details pre{background-color:#eaeaea;padding:1em;white-space:pre-wrap}.itsec-site-scan-results .itsec-site-scan-results-section{border:1px solid #ddd;border-bottom-color:transparent;padding:1em}.itsec-site-scan-results .itsec-site-scan-results-section>p{margin:0}.itsec-site-scan-results .itsec-site-scan-results-section:last-child{border-bottom-color:#ddd}.itsec-site-scan-results .itsec-site-scan__status{display:inline-block;padding:2px 6px;color:#fff;margin-right:1em;width:60px;text-align:center}.itsec-site-scan-results .itsec-site-scan__status.itsec-site-scan__status--clean{background:#7ad03a}.itsec-site-scan-results .itsec-site-scan__status.itsec-site-scan__status--warn{background:#dd3d36}.itsec-site-scan-results .itsec-site-scan__status.itsec-site-scan__status--error{background:#dd3d36}.itsec-site-scan-results .itsec-site-scan__details ul{margin-left:2.5em;list-style:disc outside}.itsec-site-scan-results .itsec-site-scan__details .itsec-site-scan__detail{width:100%;margin-bottom:.25em;padding-bottom:.5em;color:inherit;border-bottom:1px solid #ddd}.itsec-site-scan-results .itsec-site-scan__details .itsec-site-scan__detail:last-child{border:none}.itsec-site-scan-results .itsec-site-scan__details .itsec-site-scan__detail.itsec-site-scan__detail--warn{color:#dd3d36}.itsec-site-scan-results .itsec-site-scan__details .itsec-site-scan__detail.itsec-site-scan__detail--error{color:#dd3d36}.itsec-site-scan-results .itsec-site-scan__details .itsec-site-scan__detail.itsec-site-scan__detail--clean{color:#7ad03a}.itsec-site-scan-results .itsec-site-scan__details .itsec-site-scan__detail span{color:#444}.itsec-site-scan-results .itsec-site-scan-toggle-details{margin-left:1em}
2
-
1
  @keyframes itsec-animation-fade-in-constant{from{opacity:0}to{opacity:1}}.itsec-site-scan-results h4{margin-top:5px}.itsec-site-scan-results .itsec-site-scan-details pre{background-color:#eaeaea;padding:1em;white-space:pre-wrap}.itsec-site-scan-results .itsec-site-scan-results-section{border:1px solid #ddd;border-bottom-color:transparent;padding:1em}.itsec-site-scan-results .itsec-site-scan-results-section>p{margin:0}.itsec-site-scan-results .itsec-site-scan-results-section:last-child{border-bottom-color:#ddd}.itsec-site-scan-results .itsec-site-scan__status{display:inline-block;padding:2px 6px;color:#fff;margin-right:1em;width:60px;text-align:center}.itsec-site-scan-results .itsec-site-scan__status.itsec-site-scan__status--clean{background:#7ad03a}.itsec-site-scan-results .itsec-site-scan__status.itsec-site-scan__status--warn{background:#dd3d36}.itsec-site-scan-results .itsec-site-scan__status.itsec-site-scan__status--error{background:#dd3d36}.itsec-site-scan-results .itsec-site-scan__details ul{margin-left:2.5em;list-style:disc outside}.itsec-site-scan-results .itsec-site-scan__details .itsec-site-scan__detail{width:100%;margin-bottom:.25em;padding-bottom:.5em;color:inherit;border-bottom:1px solid #ddd}.itsec-site-scan-results .itsec-site-scan__details .itsec-site-scan__detail:last-child{border:none}.itsec-site-scan-results .itsec-site-scan__details .itsec-site-scan__detail.itsec-site-scan__detail--warn{color:#dd3d36}.itsec-site-scan-results .itsec-site-scan__details .itsec-site-scan__detail.itsec-site-scan__detail--error{color:#dd3d36}.itsec-site-scan-results .itsec-site-scan__details .itsec-site-scan__detail.itsec-site-scan__detail--clean{color:#7ad03a}.itsec-site-scan-results .itsec-site-scan__details .itsec-site-scan__detail span{color:#444}.itsec-site-scan-results .itsec-site-scan-toggle-details{margin-left:1em}
 
dist/core/settings.css CHANGED
@@ -1,10 +1,5 @@
1
- @keyframes itsec-animation-fade-in-constant{from{opacity:0}to{opacity:1}}.itsec-admin-notice{background:white;border-radius:3px;box-shadow:0 0 5px rgba(211,211,211,0.35)}.itsec-admin-notice .itsec-admin-notice__header{background:#eeecec;padding:10px;border-top-left-radius:3px;border-top-right-radius:3px}.itsec-admin-notice .itsec-admin-notice__header:last-child{border-bottom-left-radius:3px;border-bottom-right-radius:3px}.itsec-admin-notice .itsec-admin-notice__header .components-button{margin-top:1em;padding:.5em 1em;background:#E1f2fc;color:#0081E3;border:1px solid #0081E3;transition:background-color 300ms, color 150ms}.itsec-admin-notice .itsec-admin-notice__header .components-button:hover{background:#0081E3;color:white}.itsec-admin-notice .itsec-admin-notice__header .components-button.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-admin-notice .itsec-admin-notice__header .components-button.is-busy:hover{color:#0081E3}.itsec-admin-notice--severity-error.itsec-admin-notice .itsec-admin-notice__header{background:#d94f4f}.itsec-admin-notice--severity-error.itsec-admin-notice .itsec-admin-notice__header .components-button{padding:.5em 1em;background:#fcefef;color:#d94f4f;border:1px solid #d94f4f;transition:background-color 300ms, color 150ms}.itsec-admin-notice--severity-error.itsec-admin-notice .itsec-admin-notice__header .components-button:hover{background:#d94f4f;color:white}.itsec-admin-notice--severity-error.itsec-admin-notice .itsec-admin-notice__header .components-button.is-busy{animation:components-button__busy-animation 2500ms infinite linear;background-size:100px 100%;background-image:repeating-linear-gradient(-45deg, #fcefef, #fff 11px, #fff 10px, #fcefef 20px);opacity:1}.itsec-admin-notice--severity-error.itsec-admin-notice .itsec-admin-notice__header .components-button.is-busy:hover{color:#d94f4f}.itsec-admin-notice--severity-warning.itsec-admin-notice .itsec-admin-notice__header{background:#f78b53}.itsec-admin-notice--severity-warning.itsec-admin-notice .itsec-admin-notice__header .components-button{padding:.5em 1em;background:#fef1ea;color:#f78b53;border:1px solid #f78b53;transition:background-color 300ms, color 150ms}.itsec-admin-notice--severity-warning.itsec-admin-notice .itsec-admin-notice__header .components-button:hover{background:#f78b53;color:white}.itsec-admin-notice--severity-warning.itsec-admin-notice .itsec-admin-notice__header .components-button.is-busy{animation:components-button__busy-animation 2500ms infinite linear;background-size:100px 100%;background-image:repeating-linear-gradient(-45deg, #fef1ea, #fff 11px, #fff 10px, #fef1ea 20px);opacity:1}.itsec-admin-notice--severity-warning.itsec-admin-notice .itsec-admin-notice__header .components-button.is-busy:hover{color:#f78b53}.itsec-admin-notice--severity-info.itsec-admin-notice .itsec-admin-notice__header{background:#00a0d2}.itsec-admin-notice--severity-success.itsec-admin-notice .itsec-admin-notice__header{background:#4ab866}.itsec-admin-notice--severity-success.itsec-admin-notice .itsec-admin-notice__header .components-button{padding:.5em 1em;background:#e4f4e8;color:#4ab866;border:1px solid #4ab866;transition:background-color 300ms, color 150ms}.itsec-admin-notice--severity-success.itsec-admin-notice .itsec-admin-notice__header .components-button:hover{background:#4ab866;color:white}.itsec-admin-notice--severity-success.itsec-admin-notice .itsec-admin-notice__header .components-button.is-busy{animation:components-button__busy-animation 2500ms infinite linear;background-size:100px 100%;background-image:repeating-linear-gradient(-45deg, #e4f4e8, #fff 11px, #fff 10px, #e4f4e8 20px);opacity:1}.itsec-admin-notice--severity-success.itsec-admin-notice .itsec-admin-notice__header .components-button.is-busy:hover{color:#4ab866}.itsec-admin-notice .itsec-admin-notice .itsec-admin-notice__header:last-child{border-bottom-left-radius:3px;border-bottom-right-radius:3px}.itsec-admin-notice .itsec-admin-notice__header .itsec-admin-notice__header-inset{background:white;border-radius:5px;padding:10px}.itsec-admin-notice .itsec-admin-notice__header h4{font-size:14px;margin:0;color:#0A1A23;font-weight:600;text-transform:none}.itsec-admin-notice .itsec-admin-notice__message{border-left:1px solid #E5EAEE;border-right:1px solid #E5EAEE;padding:10px 20px}.itsec-admin-notice .itsec-admin-notice__message p:first-child{margin-top:0}.itsec-admin-notice .itsec-admin-notice__message p:last-child{margin-bottom:0}.itsec-admin-notice .itsec-admin-notice__meta{border-left:1px solid #E5EAEE;border-right:1px solid #E5EAEE;background:#DCEBF3;padding:5px 20px;margin:0;display:grid;grid-template:auto / -webkit-min-content 1fr;grid-template:auto / min-content 1fr;grid-gap:5px 20px}.itsec-admin-notice .itsec-admin-notice__meta dt,.itsec-admin-notice .itsec-admin-notice__meta dd{margin:0}.itsec-admin-notice .itsec-admin-notice__meta dt{text-transform:uppercase;color:#040404}.itsec-admin-notice .itsec-admin-notice__footer{border-left:1px solid #E5EAEE;border-right:1px solid #E5EAEE;padding:5px 20px;font-size:11px}.itsec-admin-notice>:last-child:not(.itsec-admin-notice__header){border-bottom:1px solid #E5EAEE}
2
-
3
  @keyframes itsec-animation-fade-in-constant{from{opacity:0}to{opacity:1}}.itsec-admin-notice-list-actions .components-button.has-icon{padding:2px !important}.itsec-admin-notice-list-actions .components-button.has-icon .dashicon{margin:0}.itsec-admin-notice-list-actions__more-menu-items .components-popover__content>div{overflow:hidden;padding:7px 0}.itsec-admin-notice-list-actions__more-menu-items .components-button{width:100%;min-height:38px;box-sizing:border-box;padding:10px;color:#0073aa;justify-content:space-between;align-items:center}.itsec-admin-notice-list-actions__more-menu-items .components-button:focus{outline-offset:-2px;outline:1px dotted #555d66;box-shadow:none}.itsec-admin-notice-list-actions__more-menu-items .components-button:hover{color:#191e23;background:#f3f4f5}.itsec-admin-notice-list-actions__more-menu-items .components-button .components-spinner{margin:0}
4
-
5
- @keyframes itsec-animation-fade-in-constant{from{opacity:0}to{opacity:1}}.itsec-admin-notice-list{margin:0}.itsec-admin-notice-list-item-container{display:grid;grid-template:auto / -webkit-min-content 1fr;grid-template:auto / min-content 1fr;grid-gap:1em;margin-bottom:2em}.itsec-admin-notice-list-item-container:last-child{margin-bottom:0}
6
-
7
- @keyframes itsec-animation-fade-in-constant{from{opacity:0}to{opacity:1}}@keyframes itsec-animation-fade-in-constant{from{opacity:0}to{opacity:1}}.itsec-admin-bar-admin-notices__content.components-popover .components-popover__content{border-color:1px solid #E5EAEE;box-shadow:0 2px 6px rgba(0,0,0,0.25)}.itsec-admin-bar-admin-notices__content.components-popover::after{border-color:#E5EAEE !important}.itsec-admin-notice-panel{padding:1em;background:#fff;width:420px;max-width:100%;box-sizing:border-box}.itsec-admin-notice-panel .itsec-admin-notice-panel__header{border-bottom:1px solid #7ABEED;margin-bottom:1em}.itsec-admin-notice-panel .itsec-admin-notice-panel__header h3{color:#0081E3;text-align:center;margin:1rem 0 !important}.itsec-admin-notice-panel .itsec-admin-notice-panel__header p{text-align:center;font-style:oblique;margin:1rem 0 !important}.is-mobile .itsec-admin-notice-panel{width:100%;overflow-x:auto;height:100%}.is-mobile .itsec-admin-notice-panel header h3{display:none}.is-mobile .itsec-admin-notice-panel header p{margin-top:0}.itsec-admin-notice-panel .itsec-admin-notice-panel__configure-trigger.components-button{padding:0;height:auto;width:auto;min-width:0;position:absolute;right:1em;top:1em;transition:opacity 400ms}.itsec-admin-notice-panel .itsec-admin-notice-panel__configure-trigger.components-button:hover{opacity:.5;box-shadow:none !important}.itsec-admin-notice-panel .itsec-admin-notice-panel__configure-trigger.components-button .dashicon{margin:0}.itsec-admin-notice-panel.itsec-admin-notice-panel--is-configuring .itsec-admin-notice-panel__configure-trigger.components-button{color:#0081E3}.itsec-admin-notice-panel.itsec-admin-notice-panel--is-configuring .itsec-admin-notice-panel__configure-trigger.components-button:hover{color:#0081E3}.itsec-admin-notice-panel .itsec-admin-notice-panel__configure-highlighted-logs{border-bottom:1px solid #7ABEED;margin-bottom:1em;padding-bottom:1em}.itsec-admin-notice-panel .itsec-admin-notice-panel__configure-highlighted-logs li{display:flex;justify-content:space-between;border-bottom:1px solid #ccc;margin-bottom:1em;padding-bottom:1em;padding-top:0;margin-top:0}.itsec-admin-notice-panel .itsec-admin-notice-panel__configure-highlighted-logs li:last-child{border-bottom:none;margin-bottom:0;padding-bottom:0}.itsec-admin-notice-panel .itsec-admin-notice-panel__configure-highlighted-logs li label{margin-left:calc(36px + 1em);font-size:14px;font-weight:bold}.itsec-admin-notice-panel .itsec-admin-notice-panel__configure-highlighted-logs li .components-form-toggle.is-checked .components-form-toggle__track{background-color:#0081E3;border-color:#0081E3}.itsec-admin-notice-panel .itsec-admin-notice-panel__configure-highlighted-logs li .components-form-toggle__input:disabled+.components-form-toggle__track{opacity:.5}
8
-
9
- @keyframes itsec-animation-fade-in-constant{from{opacity:0}to{opacity:1}}.itsec-admin-bar-admin-notices__trigger.components-button::after{content:'';background:#d8514f;height:10px;width:10px;border-radius:5px;vertical-align:middle;border:1px solid #f1f1f1;z-index:1;position:absolute;left:8px;top:0;opacity:0;transition:opacity 1000ms ease-in-out}.itsec-admin-bar-admin-notices__trigger--has-notices.components-button::after{opacity:1}.itsec-admin-bar-admin-notices__content .components-popover__content{box-shadow:rgba(0,0,0,0.19) 0 4px 5px}@media screen and (max-width: 600px){.itsec-admin-bar .itsec-admin-bar__admin-notices{margin-left:0}}.itsec-admin-bar-admin-notices__content.is-expanded .components-popover__content{overflow-y:scroll}.itsec-admin-bar-admin-notices__content.is-expanded .itsec-admin-notice-panel{width:100%}
10
-
1
+ @keyframes itsec-animation-fade-in-constant{from{opacity:0}to{opacity:1}}.itsec-admin-notice{background:#fff;border-radius:3px;box-shadow:0 0 5px rgba(211,211,211,.35)}.itsec-admin-notice .itsec-admin-notice__header{background:#eeecec;padding:calc(20px / 2);border-top-left-radius:3px;border-top-right-radius:3px}.itsec-admin-notice .itsec-admin-notice__header:last-child{border-bottom-left-radius:3px;border-bottom-right-radius:3px}.itsec-admin-notice .itsec-admin-notice__header .components-button{margin-top:1em;padding:.5em 1em;background:#e1f2fc;color:#0081e3;border:1px solid #0081e3;transition:background-color 300ms,color 150ms}.itsec-admin-notice .itsec-admin-notice__header .components-button:hover{background:#0081e3;color:#fff}.itsec-admin-notice .itsec-admin-notice__header .components-button.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-admin-notice .itsec-admin-notice__header .components-button.is-busy:hover{color:#0081e3}.itsec-admin-notice--severity-error.itsec-admin-notice .itsec-admin-notice__header{background:#d94f4f}.itsec-admin-notice--severity-error.itsec-admin-notice .itsec-admin-notice__header .components-button{padding:.5em 1em;background:#fcefef;color:#d94f4f;border:1px solid #d94f4f;transition:background-color 300ms,color 150ms}.itsec-admin-notice--severity-error.itsec-admin-notice .itsec-admin-notice__header .components-button:hover{background:#d94f4f;color:#fff}.itsec-admin-notice--severity-error.itsec-admin-notice .itsec-admin-notice__header .components-button.is-busy{animation:components-button__busy-animation 2500ms infinite linear;background-size:100px 100%;background-image:repeating-linear-gradient(-45deg, #fcefef, #fff 11px, #fff 10px, #fcefef 20px);opacity:1}.itsec-admin-notice--severity-error.itsec-admin-notice .itsec-admin-notice__header .components-button.is-busy:hover{color:#d94f4f}.itsec-admin-notice--severity-warning.itsec-admin-notice .itsec-admin-notice__header{background:#f78b53}.itsec-admin-notice--severity-warning.itsec-admin-notice .itsec-admin-notice__header .components-button{padding:.5em 1em;background:#fef1ea;color:#f78b53;border:1px solid #f78b53;transition:background-color 300ms,color 150ms}.itsec-admin-notice--severity-warning.itsec-admin-notice .itsec-admin-notice__header .components-button:hover{background:#f78b53;color:#fff}.itsec-admin-notice--severity-warning.itsec-admin-notice .itsec-admin-notice__header .components-button.is-busy{animation:components-button__busy-animation 2500ms infinite linear;background-size:100px 100%;background-image:repeating-linear-gradient(-45deg, #fef1ea, #fff 11px, #fff 10px, #fef1ea 20px);opacity:1}.itsec-admin-notice--severity-warning.itsec-admin-notice .itsec-admin-notice__header .components-button.is-busy:hover{color:#f78b53}.itsec-admin-notice--severity-info.itsec-admin-notice .itsec-admin-notice__header{background:#00a0d2}.itsec-admin-notice--severity-success.itsec-admin-notice .itsec-admin-notice__header{background:#4ab866}.itsec-admin-notice--severity-success.itsec-admin-notice .itsec-admin-notice__header .components-button{padding:.5em 1em;background:#e4f4e8;color:#4ab866;border:1px solid #4ab866;transition:background-color 300ms,color 150ms}.itsec-admin-notice--severity-success.itsec-admin-notice .itsec-admin-notice__header .components-button:hover{background:#4ab866;color:#fff}.itsec-admin-notice--severity-success.itsec-admin-notice .itsec-admin-notice__header .components-button.is-busy{animation:components-button__busy-animation 2500ms infinite linear;background-size:100px 100%;background-image:repeating-linear-gradient(-45deg, #e4f4e8, #fff 11px, #fff 10px, #e4f4e8 20px);opacity:1}.itsec-admin-notice--severity-success.itsec-admin-notice .itsec-admin-notice__header .components-button.is-busy:hover{color:#4ab866}.itsec-admin-notice .itsec-admin-notice .itsec-admin-notice__header:last-child{border-bottom-left-radius:3px;border-bottom-right-radius:3px}.itsec-admin-notice .itsec-admin-notice__header .itsec-admin-notice__header-inset{background:#fff;border-radius:5px;padding:calc(20px / 2)}.itsec-admin-notice .itsec-admin-notice__header h4{font-size:14px;margin:0;color:#0a1a23;font-weight:600;text-transform:none}.itsec-admin-notice .itsec-admin-notice__message{border-left:1px solid #e5eaee;border-right:1px solid #e5eaee;padding:10px 20px}.itsec-admin-notice .itsec-admin-notice__message p:first-child{margin-top:0}.itsec-admin-notice .itsec-admin-notice__message p:last-child{margin-bottom:0}.itsec-admin-notice .itsec-admin-notice__meta{border-left:1px solid #e5eaee;border-right:1px solid #e5eaee;background:#dcebf3;padding:5px 20px;margin:0;display:grid;grid-template:auto/min-content 1fr;grid-gap:5px 20px}.itsec-admin-notice .itsec-admin-notice__meta dt,.itsec-admin-notice .itsec-admin-notice__meta dd{margin:0}.itsec-admin-notice .itsec-admin-notice__meta dt{text-transform:uppercase;color:#040404}.itsec-admin-notice .itsec-admin-notice__footer{border-left:1px solid #e5eaee;border-right:1px solid #e5eaee;padding:5px 20px;font-size:11px}.itsec-admin-notice>:last-child:not(.itsec-admin-notice__header){border-bottom:1px solid #e5eaee}
 
2
  @keyframes itsec-animation-fade-in-constant{from{opacity:0}to{opacity:1}}.itsec-admin-notice-list-actions .components-button.has-icon{padding:2px !important}.itsec-admin-notice-list-actions .components-button.has-icon .dashicon{margin:0}.itsec-admin-notice-list-actions__more-menu-items .components-popover__content>div{overflow:hidden;padding:7px 0}.itsec-admin-notice-list-actions__more-menu-items .components-button{width:100%;min-height:38px;box-sizing:border-box;padding:10px;color:#0073aa;justify-content:space-between;align-items:center}.itsec-admin-notice-list-actions__more-menu-items .components-button:focus{outline-offset:-2px;outline:1px dotted #555d66;box-shadow:none}.itsec-admin-notice-list-actions__more-menu-items .components-button:hover{color:#191e23;background:#f3f4f5}.itsec-admin-notice-list-actions__more-menu-items .components-button .components-spinner{margin:0}
3
+ @keyframes itsec-animation-fade-in-constant{from{opacity:0}to{opacity:1}}.itsec-admin-notice-list{margin:0}.itsec-admin-notice-list-item-container{display:grid;grid-template:auto/min-content 1fr;grid-gap:1em;margin-bottom:2em}.itsec-admin-notice-list-item-container:last-child{margin-bottom:0}
4
+ @keyframes itsec-animation-fade-in-constant{from{opacity:0}to{opacity:1}}@keyframes itsec-animation-fade-in-constant{from{opacity:0}to{opacity:1}}.itsec-admin-bar-admin-notices__content.components-popover .components-popover__content{border-color:1px solid #e5eaee;box-shadow:0 2px 6px rgba(0,0,0,.25)}.itsec-admin-bar-admin-notices__content.components-popover::after{border-color:#e5eaee !important}.itsec-admin-notice-panel{padding:1em;background:#fff;width:420px;max-width:100%;box-sizing:border-box}.itsec-admin-notice-panel .itsec-admin-notice-panel__header{border-bottom:1px solid #7abeed;margin-bottom:1em}.itsec-admin-notice-panel .itsec-admin-notice-panel__header h3{color:#0081e3;text-align:center;margin:1rem 0 !important}.itsec-admin-notice-panel .itsec-admin-notice-panel__header p{text-align:center;font-style:oblique;margin:1rem 0 !important}.is-mobile .itsec-admin-notice-panel{width:100%;overflow-x:auto;height:100%}.is-mobile .itsec-admin-notice-panel header h3{display:none}.is-mobile .itsec-admin-notice-panel header p{margin-top:0}.itsec-admin-notice-panel .itsec-admin-notice-panel__configure-trigger.components-button{padding:0;height:auto;width:auto;min-width:0;position:absolute;right:1em;top:1em;transition:opacity 400ms}.itsec-admin-notice-panel .itsec-admin-notice-panel__configure-trigger.components-button:hover{opacity:.5;box-shadow:none !important}.itsec-admin-notice-panel .itsec-admin-notice-panel__configure-trigger.components-button .dashicon{margin:0}.itsec-admin-notice-panel.itsec-admin-notice-panel--is-configuring .itsec-admin-notice-panel__configure-trigger.components-button{color:#0081e3}.itsec-admin-notice-panel.itsec-admin-notice-panel--is-configuring .itsec-admin-notice-panel__configure-trigger.components-button:hover{color:#0081e3}.itsec-admin-notice-panel .itsec-admin-notice-panel__configure-highlighted-logs{border-bottom:1px solid #7abeed;margin-bottom:1em;padding-bottom:1em}.itsec-admin-notice-panel .itsec-admin-notice-panel__configure-highlighted-logs li{display:flex;justify-content:space-between;border-bottom:1px solid #ccc;margin-bottom:1em;padding-bottom:1em;padding-top:0;margin-top:0}.itsec-admin-notice-panel .itsec-admin-notice-panel__configure-highlighted-logs li:last-child{border-bottom:none;margin-bottom:0;padding-bottom:0}.itsec-admin-notice-panel .itsec-admin-notice-panel__configure-highlighted-logs li label{margin-left:calc(36px + 1em);font-size:14px;font-weight:bold}.itsec-admin-notice-panel .itsec-admin-notice-panel__configure-highlighted-logs li .components-form-toggle.is-checked .components-form-toggle__track{background-color:#0081e3;border-color:#0081e3}.itsec-admin-notice-panel .itsec-admin-notice-panel__configure-highlighted-logs li .components-form-toggle__input:disabled+.components-form-toggle__track{opacity:.5}
5
+ @keyframes itsec-animation-fade-in-constant{from{opacity:0}to{opacity:1}}.itsec-admin-bar-admin-notices__trigger.components-button::after{content:"";background:#d8514f;height:10px;width:10px;border-radius:5px;vertical-align:middle;border:1px solid #f1f1f1;z-index:1;position:absolute;left:8px;top:0;opacity:0;transition:opacity 1000ms ease-in-out}.itsec-admin-bar-admin-notices__trigger--has-notices.components-button::after{opacity:1}.itsec-admin-bar-admin-notices__content .components-popover__content{box-shadow:rgba(0,0,0,.19) 0 4px 5px}@media screen and (max-width: 600px){.itsec-admin-bar .itsec-admin-bar__admin-notices{margin-left:0}}.itsec-admin-bar-admin-notices__content.is-expanded .components-popover__content{overflow-y:scroll}.itsec-admin-bar-admin-notices__content.is-expanded .itsec-admin-notice-panel{width:100%}
 
 
 
 
dist/core/settings.js CHANGED
@@ -1,7 +1,7 @@
1
- this.itsec=this.itsec||{},this.itsec.core=this.itsec.core||{},this.itsec.core.settings=(window.itsecWebpackJsonP=window.itsecWebpackJsonP||[]).push([[12],{"0ONt":function(e,t,n){"use strict";var i=n("J4zp"),c=n.n(i),r=n("GRId"),a=n("TSYQ"),o=n.n(a),s=n("tI+e"),l=n("l3Sj"),u=n("1ZqX"),m=n("rE5z");n("BEpq");t.a=function(){var e=Object(r.useState)(!1),t=c()(e,2),n=t[0],i=t[1],a=Object(u.useSelect)((function(e){return{notices:e("ithemes-security/admin-notices").getNotices(),noticesLoaded:e("ithemes-security/admin-notices").areNoticesLoaded()}}),[]),d=a.notices,f=a.noticesLoaded;return Object(r.createElement)(React.Fragment,null,Object(r.createElement)(s.ToolbarButton,{"aria-expanded":n,onClick:function(){return i(!n)},icon:"megaphone",text:Object(l.__)("Notifications","better-wp-security"),className:o()("itsec-admin-bar-admin-notices__trigger",{"itsec-admin-bar-admin-notices__trigger--has-notices":d.length>0})}),n&&Object(r.createElement)(s.Popover,{className:"itsec-admin-bar-admin-notices__content",expandOnMobile:!0,focusOnMount:"container",position:"bottom left",headerTitle:Object(l.__)("Notifications","better-wp-security"),onClose:function(){return i(!1)},onFocusOutside:function(){return i(!1)}},Object(r.createElement)(m.a,{notices:d,loaded:f,close:function(){return i(!1)}})))}},"1ZqX":function(e,t){!function(){e.exports=this.wp.data}()},BEpq:function(e,t,n){},Ckse:function(e,t,n){},GRId:function(e,t){!function(){e.exports=this.wp.element}()},Hz6T:function(e,t){!function(){e.exports=this.itsec.core["admin-notices-api"]}()},J4zp:function(e,t,n){var i=n("wTVA"),c=n("m0LI"),r=n("wkBT");e.exports=function(e,t){return i(e)||c(e,t)||r()}},K9lf:function(e,t){!function(){e.exports=this.wp.compose}()},KTI5:function(e,t,n){},SRGf:function(e,t,n){"use strict";n.r(t);var i=n("GRId"),c=n("TvNi"),r=(n("Hz6T"),n("on51")),a=n("0ONt");n.p=window.itsecWebpackPublicPath,Object(c.registerPlugin)("itsec-admin-notices-settings-toolbar",{render:function(){return Object(i.createElement)(r.ToolbarFill,null,Object(i.createElement)(a.a,null))}})},TSYQ:function(e,t,n){
2
  /*!
3
  Copyright (c) 2018 Jed Watson.
4
  Licensed under the MIT License (MIT), see
5
  http://jedwatson.github.io/classnames
6
  */
7
- !function(){"use strict";var t={}.hasOwnProperty;function n(){for(var e=[],i=0;i<arguments.length;i++){var c=arguments[i];if(c){var r=typeof c;if("string"===r||"number"===r)e.push(c);else if(Array.isArray(c)){if(c.length){var a=n.apply(null,c);a&&e.push(a)}}else if("object"===r)if(c.toString===Object.prototype.toString)for(var o in c)t.call(c,o)&&c[o]&&e.push(o);else e.push(c.toString())}}return e.join(" ")}e.exports?(n.default=n,e.exports=n):"function"==typeof define&&"object"==typeof define.amd&&define.amd?define("classnames",[],(function(){return n})):window.classNames=n}()},TvNi:function(e,t){!function(){e.exports=this.wp.plugins}()},UuzZ:function(e,t){!function(){e.exports=this.wp.autop}()},VwaH:function(e,t,n){},YLtl:function(e,t){!function(){e.exports=this.lodash}()},l3Sj:function(e,t){!function(){e.exports=this.wp.i18n}()},m0LI:function(e,t){e.exports=function(e,t){var n=[],i=!0,c=!1,r=void 0;try{for(var a,o=e[Symbol.iterator]();!(i=(a=o.next()).done)&&(n.push(a.value),!t||n.length!==t);i=!0);}catch(e){c=!0,r=e}finally{try{i||null==o.return||o.return()}finally{if(c)throw r}}return n}},"o/Pk":function(e,t,n){},on51:function(e,t){!function(){e.exports=this.itsec.pages.settings}()},rE5z:function(e,t,n){"use strict";var i=n("GRId"),c=n("TSYQ"),r=n.n(c),a=n("YLtl"),o=n("l3Sj"),s=n("tI+e"),l=n("K9lf"),u=n("1ZqX"),m=n("UuzZ");n("VwaH");function d(e){var t=e.notice;return Object(i.createElement)("article",{className:"itsec-admin-notice itsec-admin-notice--severity-".concat(t.severity)},Object(i.createElement)("header",{className:"itsec-admin-notice__header"},Object(i.createElement)("div",{className:"itsec-admin-notice__header-inset"},Object(i.createElement)("h4",{dangerouslySetInnerHTML:{__html:t.title||f(t.message,t)}}),Object(a.map)(t.actions,(function(e,t){return"primary"===e.style&&Object(i.createElement)(s.Button,{key:t,href:e.uri},e.title)})))),t.title&&t.message&&Object(i.createElement)("section",{className:"itsec-admin-notice__message",dangerouslySetInnerHTML:{__html:Object(m.autop)(f(t.message,t))}}),function(e){if(Object(a.isEmpty)(e.meta))return!1;if(1===Object(a.size)(e.meta)&&e.meta.hasOwnProperty("created_at"))return!1;return!0}(t)&&Object(i.createElement)("dl",{className:"itsec-admin-notice__meta"},Object(a.map)(t.meta,(function(e,t){return"created_at"!==t&&Object(i.createElement)(i.Fragment,{key:t},Object(i.createElement)("dt",null,e.label),Object(i.createElement)("dd",null,e.formatted))}))),t.meta.created_at&&Object(i.createElement)("footer",{className:"itsec-admin-notice__footer"},Object(i.createElement)("time",{dateTime:t.meta.created_at.value},t.meta.created_at.formatted)))}function f(e,t){for(var n in t.actions)t.actions.hasOwnProperty(n)&&""!==t.actions[n].uri&&(e=e.replace("{{ $"+n+" }}",t.actions[n].uri));return e}n("o/Pk");var p=Object(l.compose)([Object(u.withDispatch)((function(e){return{doAction:e("ithemes-security/admin-notices").doNoticeAction}})),Object(u.withSelect)((function(e,t){return{inProgress:e("ithemes-security/admin-notices").getInProgressActions(t.notice.id)}}))])((function(e){var t=e.notice,n=e.doAction,c=e.inProgress,r=[],l=function(e){if(!t.actions.hasOwnProperty(e))return"continue";var a=t.actions[e];"close"===a.style&&r.push(Object(i.createElement)("li",{key:e},Object(i.createElement)(s.Button,{icon:"dismiss",label:a.title,onClick:function(){return n(t.id,e)},isBusy:c.includes(e)})))};for(var u in t.actions)l(u);var m=function(e){var t={};for(var n in e.actions)if(e.actions.hasOwnProperty(n)){var i=e.actions[n];"close"!==i.style&&"primary"!==i.style&&(t[n]=i)}return t}(t);return Object(a.isEmpty)(m)||r.push(Object(i.createElement)("li",{key:"more"},Object(i.createElement)(s.Dropdown,{position:"bottom right",className:"itsec-admin-notice-list-actions__more-menu",contentClassName:"itsec-admin-notice-list-actions__more-menu-items",renderToggle:function(e){var t=e.isOpen,n=e.onToggle;return Object(i.createElement)(s.Button,{icon:"ellipsis",label:Object(o.__)("More Actions","better-wp-security"),onClick:n,"aria-haspopup":!0,"aria-expanded":t})},renderContent:function(){return Object(i.createElement)(s.NavigableMenu,{role:"menu"},Object(a.map)(m,(function(e,r){return e.uri?Object(i.createElement)(s.Button,{key:r,href:e.uri},e.title):Object(i.createElement)(s.Button,{key:r,onClick:function(){return n(t.id,r)},disabled:c.includes(r)},e.title,c.includes(r)&&Object(i.createElement)(s.Spinner,null))})))}}))),Object(i.createElement)("ul",{className:"itsec-admin-notice-list-actions"},r)}));n("Ckse");var b=function(e){var t=e.notices;return Object(i.createElement)("ul",{className:"itsec-admin-notice-list"},t.map((function(e){return Object(i.createElement)("li",{className:"itsec-admin-notice-list-item-container",key:e.id},Object(i.createElement)(p,{notice:e}),Object(i.createElement)(d,{notice:e,noticeId:e.id}))})))};n("KTI5");t.a=Object(l.compose)([Object(l.withState)({isConfiguring:!1,checked:{}}),Object(u.withSelect)((function(e){return{mutedHighlights:e("ithemes-security/admin-notices").getMutedHighlights(),mutedHighlightUpdatesInFlight:e("ithemes-security/admin-notices").getMutedHighlightUpdatesInFlight()}})),Object(u.withDispatch)((function(e){return{updateMutedHighlight:e("ithemes-security/admin-notices").updateMutedHighlight}}))])((function(e){var t=e.notices,n=e.loaded,c=e.mutedHighlights,l=e.mutedHighlightUpdatesInFlight,u=e.updateMutedHighlight,m=e.isConfiguring,d=e.setState;return Object(i.createElement)("div",{className:r()("itsec-admin-notice-panel",{"itsec-admin-notice-panel--is-configuring":m})},Object(i.createElement)(s.Button,{icon:"admin-generic",label:Object(o.__)("Configure","better-wp-security"),className:"itsec-admin-notice-panel__configure-trigger",style:{opacity:Object(a.size)(c)>0?1:0},onClick:function(){return d({isConfiguring:!m})}}),Object(i.createElement)("header",{className:"itsec-admin-notice-panel__header"},Object(i.createElement)("h3",null,Object(o.__)("Security Admin Messages","better-wp-security")),Object(i.createElement)("p",null,Object(o.__)("Important notices from iThemes Security","better-wp-security"))),m&&Object(i.createElement)("ul",{className:"itsec-admin-notice-panel__configure-highlighted-logs"},[{slug:"file-change-report",label:Object(o.__)("File Change Report","better-wp-security")},{slug:"notification-center-send-failed",label:Object(o.__)("Notification Center Errors","better-wp-security")},{slug:"malware-scan-report",label:Object(o.__)("Malware Scan Report","better-wp-security")},{slug:"malware-scan-failed",label:Object(o.__)("Malware Scan Failed","better-wp-security")},{slug:"site-scanner-report",label:Object(o.__)("Site Scan Report","better-wp-security")}].map((function(e){var t=e.slug,r=e.label;return void 0!==c[t]&&Object(i.createElement)("li",null,Object(i.createElement)("label",{htmlFor:"itsec-mute-highlight-".concat(t)},r),Object(i.createElement)(s.FormToggle,{id:"itsec-mute-highlight-".concat(t),disabled:!n||l[t],checked:!Object(a.get)(l,[t,"mute"],c[t]),onChange:function(){return u(t,!c[t])}}))}))),t.length>0?Object(i.createElement)(b,{notices:t}):n&&Object(i.createElement)("span",null,Object(o.__)("No notices at the moment.","better-wp-security")))}))},"tI+e":function(e,t){!function(){e.exports=this.wp.components}()},wTVA:function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},wkBT:function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}}},[["SRGf",0]]]);
1
+ this.itsec=this.itsec||{},this.itsec.core=this.itsec.core||{},this.itsec.core.settings=(window.itsecWebpackJsonP=window.itsecWebpackJsonP||[]).push([[14],{"0ONt":function(e,t,n){"use strict";var i=n("GRId"),c=n("TSYQ"),s=n.n(c),a=n("tI+e"),o=n("l3Sj"),r=n("1ZqX"),l=n("rE5z");n("BEpq");t.a=function(){const[e,t]=Object(i.useState)(!1),{notices:n,noticesLoaded:c}=Object(r.useSelect)(e=>({notices:e("ithemes-security/admin-notices").getNotices(),noticesLoaded:e("ithemes-security/admin-notices").areNoticesLoaded()}),[]);return Object(i.createElement)(React.Fragment,null,Object(i.createElement)(a.ToolbarButton,{"aria-expanded":e,onClick:()=>t(!e),icon:"megaphone",text:Object(o.__)("Notifications","better-wp-security"),className:s()("itsec-admin-bar-admin-notices__trigger",{"itsec-admin-bar-admin-notices__trigger--has-notices":n.length>0})}),e&&Object(i.createElement)(a.Popover,{className:"itsec-admin-bar-admin-notices__content",expandOnMobile:!0,focusOnMount:"container",position:"bottom left",headerTitle:Object(o.__)("Notifications","better-wp-security"),onClose:()=>t(!1),onFocusOutside:()=>t(!1)},Object(i.createElement)(l.a,{notices:n,loaded:c,close:()=>t(!1)})))}},"1ZqX":function(e,t){!function(){e.exports=this.wp.data}()},BEpq:function(e,t,n){},Ckse:function(e,t,n){},GRId:function(e,t){!function(){e.exports=this.wp.element}()},Hz6T:function(e,t){!function(){e.exports=this.itsec.core["admin-notices-api"]}()},K9lf:function(e,t){!function(){e.exports=this.wp.compose}()},KTI5:function(e,t,n){},SRGf:function(e,t,n){"use strict";n.r(t);var i=n("GRId"),c=n("TvNi"),s=(n("Hz6T"),n("on51")),a=n("0ONt");n.p=window.itsecWebpackPublicPath,Object(c.registerPlugin)("itsec-admin-notices-settings-toolbar",{render:()=>Object(i.createElement)(s.ToolbarFill,null,Object(i.createElement)(a.a,null))})},TSYQ:function(e,t,n){
2
  /*!
3
  Copyright (c) 2018 Jed Watson.
4
  Licensed under the MIT License (MIT), see
5
  http://jedwatson.github.io/classnames
6
  */
7
+ !function(){"use strict";var t={}.hasOwnProperty;function n(){for(var e=[],i=0;i<arguments.length;i++){var c=arguments[i];if(c){var s=typeof c;if("string"===s||"number"===s)e.push(c);else if(Array.isArray(c)){if(c.length){var a=n.apply(null,c);a&&e.push(a)}}else if("object"===s)if(c.toString===Object.prototype.toString)for(var o in c)t.call(c,o)&&c[o]&&e.push(o);else e.push(c.toString())}}return e.join(" ")}e.exports?(n.default=n,e.exports=n):"function"==typeof define&&"object"==typeof define.amd&&define.amd?define("classnames",[],(function(){return n})):window.classNames=n}()},TvNi:function(e,t){!function(){e.exports=this.wp.plugins}()},UuzZ:function(e,t){!function(){e.exports=this.wp.autop}()},VwaH:function(e,t,n){},YLtl:function(e,t){!function(){e.exports=this.lodash}()},l3Sj:function(e,t){!function(){e.exports=this.wp.i18n}()},"o/Pk":function(e,t,n){},on51:function(e,t){!function(){e.exports=this.itsec.pages.settings}()},rE5z:function(e,t,n){"use strict";var i=n("GRId"),c=n("TSYQ"),s=n.n(c),a=n("YLtl"),o=n("l3Sj"),r=n("tI+e"),l=n("K9lf"),m=n("1ZqX"),u=n("UuzZ");n("VwaH");function d(e){let{notice:t}=e;return Object(i.createElement)("article",{className:"itsec-admin-notice itsec-admin-notice--severity-"+t.severity},Object(i.createElement)("header",{className:"itsec-admin-notice__header"},Object(i.createElement)("div",{className:"itsec-admin-notice__header-inset"},Object(i.createElement)("h4",{dangerouslySetInnerHTML:{__html:t.title||b(t.message,t)}}),Object(a.map)(t.actions,(e,t)=>"primary"===e.style&&Object(i.createElement)(r.Button,{key:t,href:e.uri},e.title)))),t.title&&t.message&&Object(i.createElement)("section",{className:"itsec-admin-notice__message",dangerouslySetInnerHTML:{__html:Object(u.autop)(b(t.message,t))}}),function(e){if(Object(a.isEmpty)(e.meta))return!1;if(1===Object(a.size)(e.meta)&&e.meta.hasOwnProperty("created_at"))return!1;return!0}(t)&&Object(i.createElement)("dl",{className:"itsec-admin-notice__meta"},Object(a.map)(t.meta,(e,t)=>"created_at"!==t&&Object(i.createElement)(i.Fragment,{key:t},Object(i.createElement)("dt",null,e.label),Object(i.createElement)("dd",null,e.formatted)))),t.meta.created_at&&Object(i.createElement)("footer",{className:"itsec-admin-notice__footer"},Object(i.createElement)("time",{dateTime:t.meta.created_at.value},t.meta.created_at.formatted)))}function b(e,t){for(const n in t.actions)t.actions.hasOwnProperty(n)&&""!==t.actions[n].uri&&(e=e.replace("{{ $"+n+" }}",t.actions[n].uri));return e}n("o/Pk");var h=Object(l.compose)([Object(m.withDispatch)(e=>({doAction:e("ithemes-security/admin-notices").doNoticeAction})),Object(m.withSelect)((e,t)=>({inProgress:e("ithemes-security/admin-notices").getInProgressActions(t.notice.id)}))])((function(e){let{notice:t,doAction:n,inProgress:c}=e;const s=[];for(const e in t.actions){if(!t.actions.hasOwnProperty(e))continue;const a=t.actions[e];"close"===a.style&&s.push(Object(i.createElement)("li",{key:e},Object(i.createElement)(r.Button,{icon:"dismiss",label:a.title,onClick:()=>n(t.id,e),isBusy:c.includes(e)})))}const l=function(e){const t={};for(const n in e.actions){if(!e.actions.hasOwnProperty(n))continue;const i=e.actions[n];"close"!==i.style&&("primary"!==i.style&&(t[n]=i))}return t}(t);return Object(a.isEmpty)(l)||s.push(Object(i.createElement)("li",{key:"more"},Object(i.createElement)(r.Dropdown,{position:"bottom right",className:"itsec-admin-notice-list-actions__more-menu",contentClassName:"itsec-admin-notice-list-actions__more-menu-items",renderToggle:e=>{let{isOpen:t,onToggle:n}=e;return Object(i.createElement)(r.Button,{icon:"ellipsis",label:Object(o.__)("More Actions","better-wp-security"),onClick:n,"aria-haspopup":!0,"aria-expanded":t})},renderContent:()=>Object(i.createElement)(r.NavigableMenu,{role:"menu"},Object(a.map)(l,(e,s)=>e.uri?Object(i.createElement)(r.Button,{key:s,href:e.uri},e.title):Object(i.createElement)(r.Button,{key:s,onClick:()=>n(t.id,s),disabled:c.includes(s)},e.title,c.includes(s)&&Object(i.createElement)(r.Spinner,null))))}))),Object(i.createElement)("ul",{className:"itsec-admin-notice-list-actions"},s)}));n("Ckse");var p=function(e){let{notices:t}=e;return Object(i.createElement)("ul",{className:"itsec-admin-notice-list"},t.map(e=>Object(i.createElement)("li",{className:"itsec-admin-notice-list-item-container",key:e.id},Object(i.createElement)(h,{notice:e}),Object(i.createElement)(d,{notice:e,noticeId:e.id}))))};n("KTI5");t.a=Object(l.compose)([Object(l.withState)({isConfiguring:!1,checked:{}}),Object(m.withSelect)(e=>({mutedHighlights:e("ithemes-security/admin-notices").getMutedHighlights(),mutedHighlightUpdatesInFlight:e("ithemes-security/admin-notices").getMutedHighlightUpdatesInFlight()})),Object(m.withDispatch)(e=>({updateMutedHighlight:e("ithemes-security/admin-notices").updateMutedHighlight}))])((function(e){let{notices:t,loaded:n,mutedHighlights:c,mutedHighlightUpdatesInFlight:l,updateMutedHighlight:m,isConfiguring:u,setState:d}=e;return Object(i.createElement)("div",{className:s()("itsec-admin-notice-panel",{"itsec-admin-notice-panel--is-configuring":u})},Object(i.createElement)(r.Button,{icon:"admin-generic",label:Object(o.__)("Configure","better-wp-security"),className:"itsec-admin-notice-panel__configure-trigger",style:{opacity:Object(a.size)(c)>0?1:0},onClick:()=>d({isConfiguring:!u})}),Object(i.createElement)("header",{className:"itsec-admin-notice-panel__header"},Object(i.createElement)("h3",null,Object(o.__)("Security Admin Messages","better-wp-security")),Object(i.createElement)("p",null,Object(o.__)("Important notices from iThemes Security","better-wp-security"))),u&&Object(i.createElement)("ul",{className:"itsec-admin-notice-panel__configure-highlighted-logs"},[{slug:"file-change-report",label:Object(o.__)("File Change Report","better-wp-security")},{slug:"notification-center-send-failed",label:Object(o.__)("Notification Center Errors","better-wp-security")},{slug:"malware-scan-report",label:Object(o.__)("Malware Scan Report","better-wp-security")},{slug:"malware-scan-failed",label:Object(o.__)("Malware Scan Failed","better-wp-security")},{slug:"site-scanner-report",label:Object(o.__)("Site Scan Report","better-wp-security")}].map(e=>{let{slug:t,label:s}=e;return void 0!==c[t]&&Object(i.createElement)("li",null,Object(i.createElement)("label",{htmlFor:"itsec-mute-highlight-"+t},s),Object(i.createElement)(r.FormToggle,{id:"itsec-mute-highlight-"+t,disabled:!n||l[t],checked:!Object(a.get)(l,[t,"mute"],c[t]),onChange:()=>m(t,!c[t])}))})),t.length>0?Object(i.createElement)(p,{notices:t}):n&&Object(i.createElement)("span",null,Object(o.__)("No notices at the moment.","better-wp-security")))}))},"tI+e":function(e,t){!function(){e.exports=this.wp.components}()}},[["SRGf",0]]]);
dist/dashboard/api.js CHANGED
@@ -1 +1 @@
1
- this.itsec=this.itsec||{},this.itsec.dashboard=this.itsec.dashboard||{},this.itsec.dashboard.api=(window.itsecWebpackJsonP=window.itsecWebpackJsonP||[]).push([[13],{"/fTC":function(r,e,t){var n,a;n=function(){var r=/^;\s*([^"=]+)=(?:"([^"]+)"|([^";,]+)(?:[;,]|$))/,e=/^<([^>]*)>/,t=/^\s*,\s*/;return{parse:function(n,a){for(var o,c,u,i=a&&a.extended||!1,s=[];n&&(n=n.trim(),c=e.exec(n));){for(var d={link:c[1]},f=(n=n.slice(c[0].length)).match(t);n&&(!f||f.index>0)&&(o=r.exec(n));)f=(n=n.slice(o[0].length)).match(t),"rel"===o[1]||"rev"===o[1]?(u=(o[2]||o[3]).split(/\s+/),d[o[1]]=u):d[o[1]]=o[2]||o[3];s.push(d),n=n.replace(t,"")}return i?s:s.reduce((function(r,e){return e.rel&&e.rel.forEach((function(t){r[t]=e.link})),r}),{})},stringify:function(r){var e=Object.keys(r).reduce((function(e,t){return e[r[t]]=e[r[t]]||[],e[r[t]].push(t),e}),{});return Object.keys(e).reduce((function(r,t){return r.concat("<"+t+'>; rel="'+e[t].join(" ")+'"')}),[]).join(", ")}}},a=this,r.exports?r.exports=n():"function"==typeof a.define&&a.define.amd?define(n):a.li=n()},"1ZqX":function(r,e){!function(){r.exports=this.wp.data}()},"4eJC":function(r,e,t){r.exports=function(r,e){var t,n,a=0;function o(){var o,c,u=t,i=arguments.length;r:for(;u;){if(u.args.length===arguments.length){for(c=0;c<i;c++)if(u.args[c]!==arguments[c]){u=u.next;continue r}return u!==t&&(u===n&&(n=u.prev),u.prev.next=u.next,u.next&&(u.next.prev=u.prev),u.next=t,u.prev=null,t.prev=u,t=u),u.val}u=u.next}for(o=new Array(i),c=0;c<i;c++)o[c]=arguments[c];return u={args:o,val:r.apply(null,o)},t?(t.prev=u,u.next=t):n=u,a===e.maxSize?(n=n.prev).next=null:a++,t=u,u.val}return e=e||{},o.clear=function(){t=null,n=null,a=0},o}},"8OQS":function(r,e){r.exports=function(r,e){if(null==r)return{};var t,n,a={},o=Object.keys(r);for(n=0;n<o.length;n++)t=o[n],e.indexOf(t)>=0||(a[t]=r[t]);return a}},Akk5:function(r,e,t){"use strict";t.r(e),t.d(e,"AdminBarFill",(function(){return ta})),t.d(e,"AdminBarSlot",(function(){return na})),t.d(e,"BelowToolbarFill",(function(){return aa})),t.d(e,"BelowToolbarSlot",(function(){return oa})),t.d(e,"EditCardsFill",(function(){return ca})),t.d(e,"EditCardsSlot",(function(){return ua}));var n={};t.r(n),t.d(n,"receiveDashboardQuery",(function(){return J})),t.d(n,"receiveDashboard",(function(){return $})),t.d(n,"receiveDashboardLayout",(function(){return Z})),t.d(n,"savingDashboardLayout",(function(){return X})),t.d(n,"startAddDashboard",(function(){return K})),t.d(n,"finishAddDashboard",(function(){return rr})),t.d(n,"failedAddDashboard",(function(){return er})),t.d(n,"receiveDashboardCollectionHeaders",(function(){return tr})),t.d(n,"startSaveDashboard",(function(){return nr})),t.d(n,"finishSaveDashboard",(function(){return ar})),t.d(n,"failedSaveDashboard",(function(){return or})),t.d(n,"startDeleteDashboard",(function(){return cr})),t.d(n,"finishDeleteDashboard",(function(){return ur})),t.d(n,"failedDeleteDashboard",(function(){return ir})),t.d(n,"addDashboard",(function(){return sr})),t.d(n,"saveDashboard",(function(){return dr})),t.d(n,"saveDashboardLayoutFromGrid",(function(){return lr})),t.d(n,"saveDashboardLayout",(function(){return br})),t.d(n,"deleteDashboard",(function(){return hr})),t.d(n,"RECEIVE_DASHBOARD_QUERY",(function(){return pr})),t.d(n,"RECEIVE_DASHBOARD",(function(){return yr})),t.d(n,"RECEIVE_DASHBOARD_LAYOUT",(function(){return vr})),t.d(n,"SAVING_DASHBOARD_LAYOUT",(function(){return gr})),t.d(n,"START_ADD_DASHBOARD",(function(){return Or})),t.d(n,"FINISH_ADD_DASHBOARD",(function(){return Dr})),t.d(n,"FAILED_ADD_DASHBOARD",(function(){return Ar})),t.d(n,"START_SAVE_DASHBOARD",(function(){return mr})),t.d(n,"FINISH_SAVE_DASHBOARD",(function(){return Er})),t.d(n,"FAILED_SAVE_DASHBOARD",(function(){return jr})),t.d(n,"START_DELETE_DASHBOARD",(function(){return Sr})),t.d(n,"FINISH_DELETE_DASHBOARD",(function(){return _r})),t.d(n,"FAILED_DELETE_DASHBOARD",(function(){return wr})),t.d(n,"RECEIVE_DASHBOARD_COLLECTION_HEADERS",(function(){return Rr}));var a={};t.r(a),t.d(a,"getAvailableDashboards",(function(){return Fr})),t.d(a,"getDashboardsQueryResult",(function(){return Ur})),t.d(a,"getDashboard",(function(){return Nr})),t.d(a,"getDashboardForEdit",(function(){return Vr})),t.d(a,"canEditDashboard",(function(){return qr})),t.d(a,"canCreateDashboards",(function(){return Qr})),t.d(a,"getDashboardAddableCardLDOs",(function(){return Mr})),t.d(a,"isCardAtDashboardLimit",(function(){return Gr})),t.d(a,"isRequestingDashboards",(function(){return Wr})),t.d(a,"isRequestingDashboardLayout",(function(){return zr})),t.d(a,"isLayoutLoaded",(function(){return Yr})),t.d(a,"isCanCreateDashboardsLoaded",(function(){return Jr})),t.d(a,"isSavingDashboardLayout",(function(){return $r})),t.d(a,"getDashboardLayout",(function(){return Zr})),t.d(a,"getDashboardLayoutForGrid",(function(){return Xr})),t.d(a,"isAddingDashboard",(function(){return Kr})),t.d(a,"isSavingDashboard",(function(){return re})),t.d(a,"isDeletingDashboard",(function(){return ee}));var o={};t.r(o),t.d(o,"getAvailableDashboards",(function(){return ce})),t.d(o,"canCreateDashboards",(function(){return ue})),t.d(o,"getDashboard",(function(){return ie})),t.d(o,"getDashboardForEdit",(function(){return se})),t.d(o,"getDashboardLayout",(function(){return de}));var c={};t.r(c),t.d(c,"receiveAvailableCards",(function(){return fe})),t.d(c,"RECEIVE_AVAILABLE_CARDS",(function(){return le}));var u={};t.r(u),t.d(u,"receiveDashboardCards",(function(){return je})),t.d(u,"receiveDashboardCard",(function(){return Se})),t.d(u,"receiveDashboardCardQueryArgs",(function(){return _e})),t.d(u,"receiveDashboardCardData",(function(){return we})),t.d(u,"dashboardCardRemoved",(function(){return Re})),t.d(u,"startDashboardCardRemove",(function(){return xe})),t.d(u,"startAddDashboardCard",(function(){return Ce})),t.d(u,"finishAddDashboardCard",(function(){return Ie})),t.d(u,"failedAddDashboardCard",(function(){return Pe})),t.d(u,"startDashboardCardRpc",(function(){return ke})),t.d(u,"finishDashboardCardRpc",(function(){return He})),t.d(u,"failedDashboardCardRpc",(function(){return Te})),t.d(u,"startRefreshDashboardCards",(function(){return Be})),t.d(u,"finishRefreshDashboardCards",(function(){return Le})),t.d(u,"failedRefreshDashboardCards",(function(){return Fe})),t.d(u,"startRefreshDashboardCard",(function(){return Ue})),t.d(u,"finishRefreshDashboardCard",(function(){return Ne})),t.d(u,"failedRefreshDashboardCard",(function(){return Ve})),t.d(u,"startQueryDashboardCard",(function(){return qe})),t.d(u,"finishQueryDashboardCard",(function(){return Qe})),t.d(u,"failedQueryDashboardCard",(function(){return Me})),t.d(u,"addDashboardCard",(function(){return Ge})),t.d(u,"saveDashboardCard",(function(){return We})),t.d(u,"removeDashboardCard",(function(){return ze})),t.d(u,"refreshDashboardCards",(function(){return Ye})),t.d(u,"refreshDashboardCard",(function(){return Je})),t.d(u,"queryDashboardCard",(function(){return $e})),t.d(u,"callDashboardCardRpc",(function(){return Ze})),t.d(u,"RECEIVE_DASHBOARD_CARDS",(function(){return Xe})),t.d(u,"RECEIVE_DASHBOARD_CARD",(function(){return Ke})),t.d(u,"RECEIVE_DASHBOARD_CARD_QUERY_ARGS",(function(){return rt})),t.d(u,"RECEIVE_DASHBOARD_CARD_DATA",(function(){return et})),t.d(u,"REMOVE_DASHBOARD_CARD",(function(){return tt})),t.d(u,"START_REMOVE_DASHBOARD_CARD",(function(){return nt})),t.d(u,"START_ADD_DASHBOARD_CARD",(function(){return at})),t.d(u,"FINISH_ADD_DASHBOARD_CARD",(function(){return ot})),t.d(u,"FAILED_ADD_DASHBOARD_CARD",(function(){return ct})),t.d(u,"START_DASHBOARD_CARD_RPC",(function(){return ut})),t.d(u,"FINISH_DASHBOARD_CARD_RPC",(function(){return it})),t.d(u,"FAILED_DASHBOARD_CARD_RPC",(function(){return st})),t.d(u,"START_REFRESH_DASHBOARD_CARDS",(function(){return dt})),t.d(u,"FINISH_REFRESH_DASHBOARD_CARDS",(function(){return ft})),t.d(u,"FAILED_REFRESH_DASHBOARD_CARDS",(function(){return lt})),t.d(u,"START_REFRESH_DASHBOARD_CARD",(function(){return bt})),t.d(u,"FINISH_REFRESH_DASHBOARD_CARD",(function(){return ht})),t.d(u,"FAILED_REFRESH_DASHBOARD_CARD",(function(){return pt})),t.d(u,"START_QUERY_DASHBOARD_CARD",(function(){return yt})),t.d(u,"FINISH_QUERY_DASHBOARD_CARD",(function(){return vt})),t.d(u,"FAILED_QUERY_DASHBOARD_CARD",(function(){return gt}));var i={};t.r(i),t.d(i,"getAvailableCards",(function(){return Et})),t.d(i,"getAvailableCard",(function(){return jt})),t.d(i,"getAvailableCardBySelf",(function(){return St}));var s={};t.r(s),t.d(s,"getAvailableCards",(function(){return xt})),t.d(s,"getAvailableCard",(function(){return Ct})),t.d(s,"getAvailableCardBySelf",(function(){return It}));var d={};t.r(d),t.d(d,"getDashboardCards",(function(){return Lt})),t.d(d,"getDashboardCard",(function(){return Ft})),t.d(d,"getDashboardCardSettings",(function(){return Ut})),t.d(d,"getDashboardCardQueryArgs",(function(){return Nt})),t.d(d,"getDashboardCardConfig",(function(){return Vt})),t.d(d,"getDashboardCardsByType",(function(){return qt})),t.d(d,"canEditCard",(function(){return Qt})),t.d(d,"isRequestingCards",(function(){return Mt})),t.d(d,"isRefreshingDashboardCards",(function(){return Gt})),t.d(d,"areCardsLoaded",(function(){return Wt})),t.d(d,"isRemovingCard",(function(){return zt})),t.d(d,"isAddingCard",(function(){return Yt})),t.d(d,"isCallingDashboardCardRpc",(function(){return Jt})),t.d(d,"getCallingDashboardCardRpcs",(function(){return Zt})),t.d(d,"isQueryingDashboardCard",(function(){return Xt}));var f={};t.r(f),t.d(f,"getDashboardCards",(function(){return en})),t.d(f,"getDashboardCardConfig",(function(){return tn}));var l={};t.r(l),t.d(l,"viewDashboard",(function(){return nn})),t.d(l,"viewCreateDashboard",(function(){return an})),t.d(l,"viewHelp",(function(){return on})),t.d(l,"viewPrevious",(function(){return cn})),t.d(l,"openEditCards",(function(){return un})),t.d(l,"closeEditCards",(function(){return sn})),t.d(l,"receiveSuggestedShareUsers",(function(){return dn})),t.d(l,"receiveUser",(function(){return fn})),t.d(l,"receiveStaticStats",(function(){return ln})),t.d(l,"usingTouch",(function(){return bn})),t.d(l,"registerCard",(function(){return hn})),t.d(l,"NAVIGATE",(function(){return pn})),t.d(l,"NAVIGATE_BACK",(function(){return yn})),t.d(l,"RECEIVE_SUGGESTED_SHARE_USERS",(function(){return vn})),t.d(l,"RECEIVE_USER",(function(){return gn})),t.d(l,"OPEN_EDIT_CARDS",(function(){return On})),t.d(l,"CLOSE_EDIT_CARDS",(function(){return Dn})),t.d(l,"RECEIVE_STATIC_STATS",(function(){return An})),t.d(l,"USING_TOUCH",(function(){return mn})),t.d(l,"REGISTER_CARD",(function(){return En}));var b={};t.r(b),t.d(b,"getCurrentPage",(function(){return wn})),t.d(b,"getCurrentPageAttr",(function(){return Rn})),t.d(b,"getViewingDashboardId",(function(){return xn})),t.d(b,"getSuggestedShareUsers",(function(){return Cn})),t.d(b,"getUser",(function(){return In})),t.d(b,"isEditingCards",(function(){return Pn})),t.d(b,"getStaticStats",(function(){return kn})),t.d(b,"isUsingTouch",(function(){return Hn})),t.d(b,"getRegisteredCard",(function(){return Tn}));var h={};t.r(h),t.d(h,"getSuggestedShareUsers",(function(){return Nn})),t.d(h,"getUser",(function(){return Vn})),t.d(h,"getStaticStats",(function(){return qn}));var p={};t.r(p),t.d(p,"receivePrimaryDashboard",(function(){return Mn})),t.d(p,"setPrimaryDashboard",(function(){return Gn})),t.d(p,"RECEIVE_PRIMARY_DASHBOARD",(function(){return Wn}));var y={};t.r(y),t.d(y,"getPrimaryDashboard",(function(){return $n}));var v={};t.r(v),t.d(v,"getPrimaryDashboard",(function(){return Xn}));var g=t("pVnL"),O=t.n(g),D=t("QILm"),A=t.n(D),m=t("GRId"),E=t("YLtl"),j=t("tI+e"),S=t("lSNA"),_=t.n(S),w=t("1ZqX"),R=t("RIqP"),x=t.n(R),C=t("ywyh"),I=t.n(C),P=t("Td6G");function k(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),t.push.apply(t,n)}return t}function H(r){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?k(Object(t),!0).forEach((function(e){_()(r,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):k(Object(t)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(t,e))}))}return r}function T(r){return{type:"API_FETCH",request:r}}function B(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"info",e=arguments.length>1?arguments[1]:void 0,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return{type:"CREATE_NOTICE",status:r,content:e,options:H({context:"ithemes-security"},t)}}var L={API_FETCH:function(r){var e=r.request;return I()(e).catch(P.l)},SELECT:function(r){var e,t=r.selectorName,n=r.args;return(e=Object(w.select)("ithemes-security/dashboard"))[t].apply(e,x()(n))},CREATE_NOTICE:function(r){var e=r.status,t=r.content,n=r.options;n.autoDismiss&&(n.id=n.id||Object(E.uniqueId)("itsec-auto-dismiss-"),setTimeout((function(){return Object(w.dispatch)("core/notices").removeNotice(n.id,n.context)}),n.autoDismiss)),Object(w.dispatch)("core/notices").createNotice(e,t,n)}},F=t("o0o1"),U=t.n(F),N=t("Mmq9"),V=t("l3Sj"),q=t("Z6ex"),Q=U.a.mark(sr),M=U.a.mark(dr),G=U.a.mark(fr),W=U.a.mark(lr),z=U.a.mark(br),Y=U.a.mark(hr);function J(r,e){return{type:pr,queryId:r,dashboards:e}}function $(r){return{type:yr,dashboard:r}}function Z(r,e){return{type:vr,dashboardId:r,layout:e}}function X(r,e){return{type:gr,dashboardId:r,layout:e}}function K(r,e){return{type:Or,dashboard:r,context:e}}function rr(r,e,t){return{type:Dr,dashboard:r,created:e,context:t}}function er(r,e,t){return{type:Ar,dashboard:r,context:e,error:t}}function tr(r){return{type:Rr,headers:r}}function nr(r){return{type:mr,dashboardId:r}}function ar(r){return{type:Er,dashboardId:r}}function or(r,e){return{type:jr,dashboardId:r,error:e}}function cr(r){return{type:Sr,dashboardId:r}}function ur(r){return{type:_r,dashboardId:r}}function ir(r,e){return{type:wr,dashboardId:r,error:e}}function sr(r,e){var t;return U.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,K(r,e);case 2:return n.prev=2,n.next=5,fr(r);case 5:t=n.sent,n.next=15;break;case 8:return n.prev=8,n.t0=n.catch(2),n.next=12,er(r,e,n.t0);case 12:return n.next=14,B("error",Object(V.sprintf)(Object(V.__)("Error when creating dashboard: %s","better-wp-security"),n.t0.message));case 14:return n.abrupt("return");case 15:return n.next=17,$(t);case 17:return n.next=19,rr(r,t,e);case 19:return n.next=21,B("success",Object(V.__)("Dashboard Created","better-wp-security"),{autoDismiss:1e4});case 21:case"end":return n.stop()}}),Q,null,[[2,8]])}function dr(r){var e;return U.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,nr(r.id);case 2:return t.prev=2,t.next=5,fr(r);case 5:e=t.sent,t.next=15;break;case 8:return t.prev=8,t.t0=t.catch(2),t.next=12,or(r.id,t.t0);case 12:return t.next=14,B("error",Object(V.sprintf)(Object(V.__)("Error when saving dashboard: %s","better-wp-security"),t.t0.message));case 14:return t.abrupt("return",t.t0);case 15:return t.next=17,$(e);case 17:return t.next=19,ar(r.id);case 19:return t.abrupt("return",e);case 20:case"end":return t.stop()}}),M,null,[[2,8]])}function fr(r){return U.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,T({path:Object(N.addQueryArgs)("/ithemes-security/v1/dashboards".concat(r.id?"/"+r.id:""),{_embed:1}),method:r.id?"PUT":"POST",data:r});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),G)}function lr(r,e){var t;return U.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t=Object(q.n)(r,e),n.next=3,Z(r,t);case 3:if(Object(w.select)("ithemes-security/dashboard").canEditDashboard(r)){n.next=5;break}return n.abrupt("return");case 5:return n.next=7,br(r,t,!1);case 7:return n.abrupt("return",n.sent);case 8:case"end":return n.stop()}}),W)}function br(r,e){var t,n,a=arguments;return U.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return t=!(a.length>2&&void 0!==a[2])||a[2],o.next=3,X(r,e);case 3:return o.prev=3,o.next=6,T({path:"/ithemes-security/v1/dashboards/".concat(r,"/layout"),method:"PUT",data:e});case 6:n=o.sent,o.next=12;break;case 9:return o.prev=9,o.t0=o.catch(3),o.abrupt("return",!1);case 12:if(!t){o.next=15;break}return o.next=15,Z(r,n);case 15:return o.abrupt("return",n);case 16:case"end":return o.stop()}}),z,null,[[3,9]])}function hr(r){return U.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,cr(r);case 2:return e.prev=2,e.next=5,T({path:"/ithemes-security/v1/dashboards/".concat(r),method:"DELETE"});case 5:e.next=14;break;case 7:return e.prev=7,e.t0=e.catch(2),e.next=11,ir(r,e.t0);case 11:return e.next=13,B("error",Object(V.sprintf)(Object(V.__)("Error when deleting dashboard: %s","better-wp-security"),e.t0.message));case 13:return e.abrupt("return",e.t0);case 14:return e.next=16,ur(r);case 16:return e.abrupt("return",!0);case 17:case"end":return e.stop()}}),Y,null,[[2,7]])}var pr="RECEIVE_DASHBOARD_QUERY",yr="RECEIVE_DASHBOARD",vr="RECEIVE_DASHBOARD_LAYOUT",gr="SAVING_DASHBOARD_LAYOUT",Or="START_ADD_DASHBOARD",Dr="FINISH_ADD_DASHBOARD",Ar="FAILED_ADD_DASHBOARD",mr="START_SAVE_DASHBOARD",Er="FINISH_SAVE_DASHBOARD",jr="FAILED_SAVE_DASHBOARD",Sr="START_DELETE_DASHBOARD",_r="FINISH_DELETE_DASHBOARD",wr="FAILED_DELETE_DASHBOARD",Rr="RECEIVE_DASHBOARD_COLLECTION_HEADERS";function xr(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),t.push.apply(t,n)}return t}function Cr(r){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?xr(Object(t),!0).forEach((function(e){_()(r,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):xr(Object(t)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(t,e))}))}return r}var Ir={byId:{},queries:{},layouts:{},savingLayouts:{},adding:[],saving:[],deleting:[],collectionHeaders:{}};var Pr=t("pPDe"),kr=t("/fTC");function Hr(r){for(var e=arguments.length,t=new Array(e>1?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];return Object(w.select)("core/data").isResolving("ithemes-security/dashboard",r,t)}function Tr(r){for(var e=arguments.length,t=new Array(e>1?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];return Object(w.select)("core/data").hasFinishedResolution("ithemes-security/dashboard",r,t)}function Br(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),t.push.apply(t,n)}return t}function Lr(r){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?Br(Object(t),!0).forEach((function(e){_()(r,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):Br(Object(t)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(t,e))}))}return r}function Fr(r){return Ur(r,"available")}var Ur=Object(Pr.a)((function(r,e){return Object(E.filter)(Object(E.map)(r.dashboard.queries[e],(function(e){return r.dashboard.byId[e]})),E.isObject)}),(function(r,e){return[r.dashboard.queries[e],r.dashboard.byId]}));function Nr(r,e){return r.dashboard.byId[e]}function Vr(r,e){return r.dashboard.byId[e]}function qr(r,e){return function(r,e,t){return Object(E.get)(r,["dashboard","byId",e,"_links","self",0,"targetHints",t],[])}(r,e,"allow").includes("PUT")}function Qr(r){return r.dashboard.collectionHeaders.allow&&r.dashboard.collectionHeaders.allow.split(", ").includes("POST")}var Mr=Object(Pr.a)((function(r,e){return Object(E.filter)(Object(E.get)(r,["dashboard","byId",e,"_links","create-form"],[]),(function(r){return Object(E.get)(r,["targetHints","allow"],[]).includes("POST")})).map((function(r){return Lr(Lr({},r),{},{aboutLink:r.targetHints.link.map(kr.parse).filter((function(r){return!!r.about})).map((function(r){return r.about}))[0]})}))}),(function(r,e){return[r.dashboard.byId[e]]}));function Gr(r,e,t){var n=Object(w.select)("ithemes-security/dashboard").getAvailableCardBySelf(t);return!(!n||!n.max)&&Object(w.select)("ithemes-security/dashboard").getDashboardCardsByType(e,t).length>=n.max}function Wr(){return Hr("getAvailableDashboards")}function zr(r,e){return Hr("getDashboardLayout",e)}function Yr(r,e){return Tr("getDashboardLayout",e)}function Jr(){return Tr("canCreateDashboards")}function $r(r,e){return r.dashboard.savingLayouts[e]}function Zr(r,e){return r.dashboard.layouts[e]}var Xr=Object(Pr.a)((function(r,e){return Object(q.l)(e,Object(E.get)(Object(w.select)("ithemes-security/dashboard").getDashboardLayout(e),"cards",[]),Object(w.select)("ithemes-security/dashboard").getDashboardCards(e)||[])}),(function(r,e){return[r.dashboard.layouts[e],r.availableCards,r.cards.byDashboard[e]]}));function Kr(r,e){return r.dashboard.adding.includes(e)}function re(r,e){return r.dashboard.saving.includes(e)}function ee(r,e){return r.dashboard.deleting.includes(e)}var te=U.a.mark(ce),ne=U.a.mark(ie),ae=U.a.mark(se),oe=U.a.mark(de);function ce(){var r;return U.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,T({path:Object(N.addQueryArgs)("/ithemes-security/v1/dashboards",{_embed:1})});case 2:return r=e.sent,e.next=5,J("available",r);case 5:case"end":return e.stop()}}),te)}var ue={fulfill:U.a.mark((function r(){var e;return U.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,T({path:"/ithemes-security/v1/dashboards",method:"HEAD",parse:!1});case 2:return e=r.sent,r.next=5,tr(Object(P.f)(e.headers));case 5:case"end":return r.stop()}}),r)})),isFulfilled:function(r){return!!r.dashboard.collectionHeaders.allow}};function ie(){return U.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,w.controls.resolveSelect("ithemes-security/dashboard","getAvailableDashboards");case 2:case"end":return r.stop()}}),ne)}function se(r){var e;return U.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,T({path:Object(N.addQueryArgs)("/ithemes-security/v1/dashboards/".concat(r),{_embed:1,context:"edit"})});case 2:return e=t.sent,t.next=5,$(e);case 5:case"end":return t.stop()}}),ae)}function de(r){var e;return U.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,T({path:"/ithemes-security/v1/dashboards/".concat(r,"/layout")});case 2:return e=t.sent,t.next=5,Z(r,e);case 5:case"end":return t.stop()}}),oe)}function fe(r){return{type:le,cards:r}}var le="RECEIVE_AVAILABLE_CARDS";function be(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),t.push.apply(t,n)}return t}function he(r){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?be(Object(t),!0).forEach((function(e){_()(r,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):be(Object(t)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(t,e))}))}return r}function pe(r,e){var t="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(!t){if(Array.isArray(r)||(t=function(r,e){if(!r)return;if("string"==typeof r)return ye(r,e);var t=Object.prototype.toString.call(r).slice(8,-1);"Object"===t&&r.constructor&&(t=r.constructor.name);if("Map"===t||"Set"===t)return Array.from(r);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return ye(r,e)}(r))||e&&r&&"number"==typeof r.length){t&&(r=t);var n=0,a=function(){};return{s:a,n:function(){return n>=r.length?{done:!0}:{done:!1,value:r[n++]}},e:function(r){throw r},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,c=!0,u=!1;return{s:function(){t=t.call(r)},n:function(){var r=t.next();return c=r.done,r},e:function(r){u=!0,o=r},f:function(){try{c||null==t.return||t.return()}finally{if(u)throw o}}}}function ye(r,e){(null==e||e>r.length)&&(e=r.length);for(var t=0,n=new Array(e);t<e;t++)n[t]=r[t];return n}var ve=U.a.mark(Ge),ge=U.a.mark(We),Oe=U.a.mark(ze),De=U.a.mark(Ye),Ae=U.a.mark(Je),me=U.a.mark($e),Ee=U.a.mark(Ze);function je(r,e){return{type:Xe,dashboardId:r,cards:e}}function Se(r,e){return{type:Ke,dashboardId:r,card:e}}function _e(r,e){return{type:rt,cardId:r,queryArgs:e}}function we(r,e,t){return{type:et,cardId:r,data:e,links:t}}function Re(r,e){return{type:tt,dashboardId:r,cardId:e}}function xe(r,e){return{type:nt,dashboardId:r,cardId:e}}function Ce(r,e,t){return{type:at,collectionEP:r,card:e,context:t}}function Ie(r,e,t){return{type:ot,collectionEP:r,card:e,context:t}}function Pe(r,e,t,n){return{type:ct,collectionEP:r,card:e,context:t,error:n}}function ke(r,e,t){return{type:ut,cardId:r,href:e,data:t}}function He(r,e,t,n){return{type:it,cardId:r,href:e,data:t,response:n}}function Te(r,e,t,n){return{type:st,cardId:r,href:e,data:t,error:n}}function Be(r){return{type:dt,dashboardId:r}}function Le(r){return{type:ft,dashboardId:r}}function Fe(r,e){return{type:lt,dashboardId:r,error:e}}function Ue(r){return{type:bt,cardId:r}}function Ne(r){return{type:ht,cardId:r}}function Ve(r,e){return{type:pt,cardId:r,error:e}}function qe(r){return{type:yt,cardId:r}}function Qe(r){return{type:vt,cardId:r}}function Me(r,e){return{type:gt,cardId:r,error:e}}function Ge(r,e,t){var n;return U.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,Ce(r,e,t);case 2:return a.prev=2,a.next=5,T({url:Object(N.addQueryArgs)(r,{_embed:1}),method:"POST",data:e});case 5:n=a.sent,a.next=15;break;case 8:return a.prev=8,a.t0=a.catch(2),a.next=12,Pe(r,e,t,a.t0);case 12:return a.next=14,B("error",Object(V.sprintf)(Object(V.__)("Error when adding card to dashboard: %s","better-wp-security"),a.t0.message));case 14:return a.abrupt("return");case 15:return a.next=17,Ie(r,e,t);case 17:return a.next=19,Se(n.dashboard,n);case 19:case"end":return a.stop()}}),ve,null,[[2,8]])}function We(r,e){var t,n;return U.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return t=e.id,a.prev=1,a.next=4,T({path:"/ithemes-security/v1/dashboards/".concat(r,"/cards/").concat(e.card).concat(t?"/"+t:""),method:t?"PUT":"POST",data:e});case 4:n=a.sent,a.next=12;break;case 7:return a.prev=7,a.t0=a.catch(1),a.next=11,B("error",Object(V.sprintf)(Object(V.__)("Error when saving dashboard card: %s","better-wp-security"),a.t0.message));case 11:return a.abrupt("return",a.t0);case 12:return a.next=14,Se(r,n);case 14:return a.abrupt("return",n);case 15:case"end":return a.stop()}}),ge,null,[[1,7]])}function ze(r,e){var t,n=arguments;return U.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return t=!(n.length>2&&void 0!==n[2])||n[2],a.next=3,xe(r,e.id);case 3:if(!t){a.next=6;break}return a.next=6,Re(r,e.id);case 6:return a.prev=6,a.next=9,T({path:"/ithemes-security/v1/dashboards/".concat(r,"/cards/").concat(e.card,"/").concat(e.id),method:"DELETE",parse:!1});case 9:a.next=19;break;case 11:if(a.prev=11,a.t0=a.catch(6),!t){a.next=16;break}return a.next=16,Se(r,e);case 16:return a.next=18,B("error",Object(V.sprintf)(Object(V.__)("Error when removing card from dashboard: %s","better-wp-security"),a.t0.message));case 18:return a.abrupt("return");case 19:if(t){a.next=22;break}return a.next=22,Re(r,e.id);case 22:case"end":return a.stop()}}),Oe,null,[[6,11]])}function Ye(r){var e,t,n,a,o,c,u,i,s,d,f;return U.a.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,Be(r);case 2:e=Object(w.select)("ithemes-security/dashboard"),t=e.getDashboardCards(r),n={_fields:["id","data","_links"],cards:{}},a=pe(t);try{for(a.s();!(o=a.n()).done;)c=o.value,Object(E.set)(n,["cards",c.card,c.id],e.getDashboardCardQueryArgs(c.id))}catch(r){a.e(r)}finally{a.f()}return l.prev=7,l.next=10,T({path:Object(N.addQueryArgs)("/ithemes-security/v1/dashboards/".concat(r,"/cards"),n)});case 10:u=l.sent,l.next=20;break;case 13:return l.prev=13,l.t0=l.catch(7),l.next=17,Fe(r,l.t0);case 17:return l.next=19,B("warning",Object(V.sprintf)(Object(V.__)("Refreshing dashboard data failed: %s","better-wp-security"),l.t0.message),{autoDismiss:!0});case 19:return l.abrupt("return",l.t0);case 20:i={},s=pe(u),l.prev=22,s.s();case 24:if((d=s.n()).done){l.next=31;break}return f=d.value,i[f.id]=f.data,l.next=29,we(f.id,f.data,f._links);case 29:l.next=24;break;case 31:l.next=36;break;case 33:l.prev=33,l.t1=l.catch(22),s.e(l.t1);case 36:return l.prev=36,s.f(),l.finish(36);case 39:return l.next=41,Le(r);case 41:return l.abrupt("return",i);case 42:case"end":return l.stop()}}),De,null,[[7,13],[22,33,36,39]])}function Je(r){var e,t;return U.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(e=Object(w.select)("ithemes-security/dashboard").getDashboardCard(r)){n.next=3;break}throw new Error("No card loaded with that id.");case 3:return n.next=5,Ue(r);case 5:return n.next=7,T({path:Object(N.addQueryArgs)("/ithemes-security/v1/dashboards/".concat(e.dashboard,"/cards/").concat(e.card,"/").concat(r),he(he({},Object(w.select)("ithemes-security/dashboard").getDashboardCardQueryArgs(r)),{},{_fields:["data","_links"]}))});case 7:return t=n.sent,n.next=10,we(r,t.data,t._links);case 10:return n.next=12,Ne(r);case 12:return n.abrupt("return",t.data);case 13:case"end":return n.stop()}}),Ae)}function $e(r,e){var t,n;return U.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if(t=Object(w.select)("ithemes-security/dashboard").getDashboardCard(r)){a.next=3;break}throw new Error("No card loaded with that id.");case 3:return a.next=5,qe(r);case 5:return a.next=7,T({path:Object(N.addQueryArgs)("/ithemes-security/v1/dashboards/".concat(t.dashboard,"/cards/").concat(t.card,"/").concat(r),he(he({},e),{},{_fields:["data","_links"]}))});case 7:return n=a.sent,a.next=10,we(r,n.data,n._links);case 10:return a.next=12,_e(r,e);case 12:return a.next=14,Qe(r);case 14:return a.abrupt("return",n.data);case 15:case"end":return a.stop()}}),me)}function Ze(r,e,t){var n;return U.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,ke(r,e,t);case 2:return a.prev=2,a.next=5,T({url:e,method:"POST",data:t});case 5:n=a.sent,a.next=15;break;case 8:return a.prev=8,a.t0=a.catch(2),a.next=12,Te(r,e,t,a.t0);case 12:return a.next=14,B("error",Object(V.sprintf)(Object(V.__)("Error when performing card action: %s","better-wp-security"),a.t0.message));case 14:return a.abrupt("return",a.t0);case 15:return a.next=17,He(r,e,t,n);case 17:return a.next=19,Je(r);case 19:return a.abrupt("return",n);case 20:case"end":return a.stop()}}),Ee,null,[[2,8]])}var Xe="RECEIVE_DASHBOARD_CARDS",Ke="RECEIVE_DASHBOARD_CARD",rt="RECEIVE_DASHBOARD_CARD_QUERY_ARGS",et="RECEIVE_DASHBOARD_CARD_DATA",tt="REMOVE_DASHBOARD_CARD",nt="START_REMOVE_DASHBOARD_CARD",at="START_ADD_DASHBOARD_CARD",ot="FINISH_ADD_DASHBOARD_CARD",ct="FAILED_ADD_DASHBOARD_CARD",ut="START_DASHBOARD_CARD_RPC",it="FINISH_DASHBOARD_CARD_RPC",st="FAILED_DASHBOARD_CARD_RPC",dt="START_REFRESH_DASHBOARD_CARDS",ft="FINISH_REFRESH_DASHBOARD_CARDS",lt="FAILED_REFRESH_DASHBOARD_CARDS",bt="START_REFRESH_DASHBOARD_CARD",ht="FINISH_REFRESH_DASHBOARD_CARD",pt="FAILED_REFRESH_DASHBOARD_CARD",yt="START_QUERY_DASHBOARD_CARD",vt="FINISH_QUERY_DASHBOARD_CARD",gt="FAILED_QUERY_DASHBOARD_CARD";function Ot(r,e){var t="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(!t){if(Array.isArray(r)||(t=function(r,e){if(!r)return;if("string"==typeof r)return Dt(r,e);var t=Object.prototype.toString.call(r).slice(8,-1);"Object"===t&&r.constructor&&(t=r.constructor.name);if("Map"===t||"Set"===t)return Array.from(r);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Dt(r,e)}(r))||e&&r&&"number"==typeof r.length){t&&(r=t);var n=0,a=function(){};return{s:a,n:function(){return n>=r.length?{done:!0}:{done:!1,value:r[n++]}},e:function(r){throw r},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,c=!0,u=!1;return{s:function(){t=t.call(r)},n:function(){var r=t.next();return c=r.done,r},e:function(r){u=!0,o=r},f:function(){try{c||null==t.return||t.return()}finally{if(u)throw o}}}}function Dt(r,e){(null==e||e>r.length)&&(e=r.length);for(var t=0,n=new Array(e);t<e;t++)n[t]=r[t];return n}function At(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),t.push.apply(t,n)}return t}function mt(r){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?At(Object(t),!0).forEach((function(e){_()(r,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):At(Object(t)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(t,e))}))}return r}var Et=Object(Pr.a)((function(r){return Object.values(r.availableCards)}),(function(r){return[r.availableCards]}));function jt(r,e){return r.availableCards[e]}var St=Object(Pr.a)((function(r,e){return Object(E.find)(r.availableCards,(function(r){return Object(E.get)(r,["_links","self",0,"href"])===e}))}),(function(r){return[r.availableCards]})),_t=U.a.mark(xt),wt=U.a.mark(Ct),Rt=U.a.mark(It);function xt(){var r;return U.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,T({path:"/ithemes-security/v1/dashboard-available-cards"});case 3:return r=e.sent,e.next=6,fe(r);case 6:e.next=12;break;case 8:return e.prev=8,e.t0=e.catch(0),e.next=12,fe([]);case 12:case"end":return e.stop()}}),_t,null,[[0,8]])}function Ct(){return U.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,Object(w.select)("ithemes-security/dashboard").getAvailableCards();case 2:case"end":return r.stop()}}),wt)}function It(){return U.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,Object(w.select)("ithemes-security/dashboard").getAvailableCards();case 2:case"end":return r.stop()}}),Rt)}function Pt(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),t.push.apply(t,n)}return t}function kt(r){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?Pt(Object(t),!0).forEach((function(e){_()(r,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):Pt(Object(t)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(t,e))}))}return r}var Ht={byId:{},byDashboard:{},queryArgs:{},deleting:[],adding:[],rpcs:{},refreshingDashboards:[],querying:[]};function Tt(r,e){var t="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(!t){if(Array.isArray(r)||(t=function(r,e){if(!r)return;if("string"==typeof r)return Bt(r,e);var t=Object.prototype.toString.call(r).slice(8,-1);"Object"===t&&r.constructor&&(t=r.constructor.name);if("Map"===t||"Set"===t)return Array.from(r);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Bt(r,e)}(r))||e&&r&&"number"==typeof r.length){t&&(r=t);var n=0,a=function(){};return{s:a,n:function(){return n>=r.length?{done:!0}:{done:!1,value:r[n++]}},e:function(r){throw r},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,c=!0,u=!1;return{s:function(){t=t.call(r)},n:function(){var r=t.next();return c=r.done,r},e:function(r){u=!0,o=r},f:function(){try{c||null==t.return||t.return()}finally{if(u)throw o}}}}function Bt(r,e){(null==e||e>r.length)&&(e=r.length);for(var t=0,n=new Array(e);t<e;t++)n[t]=r[t];return n}var Lt=Object(Pr.a)((function(r,e){return Object(E.map)(r.cards.byDashboard[e],(function(e){return r.cards.byId[e]}))}),(function(r,e){return[r.cards.byDashboard[e],r.cards.byId]}));function Ft(r,e){return r.cards.byId[e]}function Ut(r,e){return Object(E.get)(r,["cards","byId",e,"settings"])}function Nt(r,e){return r.cards.queryArgs[e]}function Vt(r,e){var t=Object(w.select)("ithemes-security/dashboard").getDashboardCard(e);if(t)return Object(w.select)("ithemes-security/dashboard").getAvailableCard(t.card)}function qt(r,e,t){var n,a=[],o=Tt(Object(w.select)("ithemes-security/dashboard").getDashboardCards(e));try{for(o.s();!(n=o.n()).done;){var c=n.value;Object(E.get)(c,["_links","about",0,"href"])===t&&a.push(c)}}catch(r){o.e(r)}finally{o.f()}return a}function Qt(r,e,t){return!(!Object(w.select)("ithemes-security/dashboard").canEditDashboard(e)||!t)}function Mt(r,e){return Hr("getDashboardCards",e)}function Gt(r,e){return r.cards.refreshingDashboards.includes(e)}function Wt(r,e){return Tr("getDashboardCards",e)}function zt(r,e){return r.cards.deleting.includes(e)}function Yt(r,e){return r.cards.adding.includes(e)}function Jt(r,e,t){return r.cards.rpcs[e]&&r.cards.rpcs[e].includes(t)}var $t=[];function Zt(r,e){return r.cards.rpcs[e]||$t}function Xt(r,e){return r.cards.querying.includes(e)}var Kt=U.a.mark(en),rn=U.a.mark(tn);function en(r){var e;return U.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,T({path:"/ithemes-security/v1/dashboards/".concat(r,"/cards?_embed=1")});case 2:return e=t.sent,t.next=5,je(r,e);case 5:case"end":return t.stop()}}),Kt)}function tn(r){var e;return U.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:(e=Object(w.select)("ithemes-security/dashboard").getDashboardCard(r))&&!Object(w.select)("ithemes-security/dashboard").getAvailableCard(e.card)&&Object(w.select)("ithemes-security/dashboard").getAvailableCards();case 2:case"end":return t.stop()}}),rn)}function nn(r){return{type:pn,page:"view-dashboard",attr:{id:r}}}function an(){return{type:pn,page:"create-dashboard"}}function on(){return{type:pn,page:"help"}}function cn(){return{type:yn}}function un(){return{type:On}}function sn(){return{type:Dn}}function dn(r){return{type:vn,users:r}}function fn(r){return{type:gn,user:r}}function ln(r,e){return{type:An,stats:r,query:e}}function bn(){var r=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:mn,isUsing:r}}function hn(r,e){return{type:En,slug:r,settings:e}}var pn="NAVIGATE",yn="NAVIGATE_BACK",vn="RECEIVE_SUGGESTED_SHARE_USERS",gn="RECEIVE_USER",On="OPEN_EDIT_CARDS",Dn="CLOSE_EDIT_CARDS",An="RECEIVE_STATIC_STATS",mn="USING_TOUCH",En="REGISTER_CARD";function jn(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),t.push.apply(t,n)}return t}function Sn(r){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?jn(Object(t),!0).forEach((function(e){_()(r,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):jn(Object(t)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(t,e))}))}return r}var _n={view:{page:"",attr:{}},previousView:null,editingCards:!1,suggestedShareUsers:[],users:{byId:{}},staticStats:{data:{},query:{}},usingTouch:!1,cards:{}};function wn(r){return r.app.view.page}function Rn(r){return r.app.view.attr}function xn(r){return"view-dashboard"===r.app.view.page&&r.app.view.attr.id}function Cn(r){return r.app.suggestedShareUsers}function In(r,e){return r.app.users.byId[e]}function Pn(r){return r.app.editingCards}function kn(r){return r.app.staticStats.data}function Hn(r){return r.app.usingTouch}function Tn(r,e){return r.app.cards[e]}var Bn=t("rl8x"),Ln=t.n(Bn),Fn=U.a.mark(Nn),Un=U.a.mark(Vn);function Nn(){var r;return U.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,T({path:Object(N.addQueryArgs)("/wp/v2/users",{roles:"administrator"})});case 2:return r=e.sent,e.next=5,dn(r);case 5:case"end":return e.stop()}}),Fn)}function Vn(r){var e;return U.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,T({path:"/wp/v2/users/".concat(r)});case 2:return e=t.sent,t.next=5,fn(e);case 5:case"end":return t.stop()}}),Un)}var qn={fulfill:U.a.mark((function r(e){var t,n;return U.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return t="/ithemes-security/v1/dashboard-static",r.next=3,T({path:Object(E.isEmpty)(e)?t:Object(N.addQueryArgs)(t,e)});case 3:return n=r.sent,r.next=6,ln(n,e);case 6:case"end":return r.stop()}}),r)})),isFulfilled:function(r,e){return Ln()(r.app.staticStats.query,e)}},Qn=U.a.mark(Gn);function Mn(r){return{type:Wn,dashboardId:r}}function Gn(r){var e;return U.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,T({path:"/wp/v2/users/me",method:"PUT",data:{meta:{_itsec_primary_dashboard:r}}});case 2:return e=t.sent,t.next=5,Mn(e.meta._itsec_primary_dashboard);case 5:case"end":return t.stop()}}),Qn)}var Wn="RECEIVE_PRIMARY_DASHBOARD";function zn(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),t.push.apply(t,n)}return t}function Yn(r){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?zn(Object(t),!0).forEach((function(e){_()(r,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):zn(Object(t)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(t,e))}))}return r}var Jn={primaryDashboard:void 0};function $n(r){return r.user.primaryDashboard}var Zn=U.a.mark(Xn);function Xn(){var r;return U.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,T({path:Object(N.addQueryArgs)("/wp/v2/users/me",{context:"edit"})});case 2:return r=e.sent,e.next=5,Mn(r.meta._itsec_primary_dashboard);case 5:case"end":return e.stop()}}),Zn)}function Kn(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),t.push.apply(t,n)}return t}function ra(r){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?Kn(Object(t),!0).forEach((function(e){_()(r,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):Kn(Object(t)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(t,e))}))}return r}var ea={reducer:Object(w.combineReducers)({dashboard:function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ir,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case pr:return Cr(Cr({},r),{},{byId:Cr(Cr({},r.byId),Object(E.keyBy)(e.dashboards,"id")),queries:Cr(Cr({},r.queries),{},_()({},e.queryId,Object(E.map)(e.dashboards,(function(r){return r.id}))))});case yr:return Cr(Cr({},r),{},{byId:Cr(Cr({},r.byId),{},_()({},e.dashboard.id,e.dashboard)),queries:Cr(Cr({},r.queries),{},{available:r.queries.available.includes(e.dashboard.id)?r.queries.available:[].concat(x()(r.queries.available),[e.dashboard.id])})});case vr:return Cr(Cr({},r),{},{layouts:Cr(Cr({},r.layouts),{},_()({},e.dashboardId,e.layout)),savingLayouts:Cr(Cr({},r.savingLayouts),{},_()({},e.dashboardId,!1))});case gr:return Cr(Cr({},r),{},{savingLayouts:Cr(Cr({},r.savingLayouts),{},_()({},e.dashboardId,!0))});case Or:return e.context?Cr(Cr({},r),{},{adding:[].concat(x()(r.adding),[e.context])}):r;case Dr:case Ar:return Cr(Cr({},r),{},{adding:r.adding.filter((function(r){return r!==e.context}))});case mr:return Cr(Cr({},r),{},{saving:[].concat(x()(r.saving),[e.dashboardId])});case Er:case jr:return Cr(Cr({},r),{},{saving:r.saving.filter((function(r){return r!==e.dashboardId}))});case Rr:return Cr(Cr({},r),{},{collectionHeaders:e.headers});case Sr:return Cr(Cr({},r),{},{deleting:[].concat(x()(r.deleting),[e.dashboardId])});case _r:return Cr(Cr({},r),{},{deleting:r.deleting.filter((function(r){return r!==e.dashboardId})),byId:Object(E.omit)(r.byId,[e.dashboardId])});case wr:return Cr(Cr({},r),{},{deleting:r.deleting.filter((function(r){return r!==e.dashboardId}))});default:return r}},availableCards:function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;switch(e.type){case le:return mt(mt({},r),Object(E.keyBy)(e.cards,"slug"));case Xe:var t,n={},a=Ot(e.cards);try{for(a.s();!(t=a.n()).done;){var o=t.value;if(Object(E.has)(o,["_embedded","about",0])){var c=o._embedded.about[0].slug;r[c]||(n[c]=o._embedded.about[0])}}}catch(r){a.e(r)}finally{a.f()}return Object(E.isEmpty)(n)?r:mt(mt({},r),n);default:return r}},cards:function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ht,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case Xe:return kt(kt({},r),{},{byId:kt(kt({},r.byId),Object(E.keyBy)(e.cards,"id")),byDashboard:kt(kt({},r.byDashboard),{},_()({},e.dashboardId,Object(E.map)(e.cards,(function(r){return r.id}))))});case Ke:return kt(kt({},r),{},{byId:kt(kt({},r.byId),{},_()({},e.card.id,e.card)),byDashboard:kt(kt({},r.byDashboard),{},_()({},e.dashboardId,r.byDashboard[e.dashboardId]&&r.byDashboard[e.dashboardId].includes(e.card.id)?r.byDashboard[e.dashboardId]:[].concat(x()(Object(E.get)(r,["byDashboard",e.dashboardId],[])),[e.card.id])))});case rt:return kt(kt({},r),{},{queryArgs:kt(kt({},r.queryArgs),{},_()({},e.cardId,e.queryArgs))});case et:return kt(kt({},r),{},{byId:kt(kt({},r.byId),{},_()({},e.cardId,kt(kt({},r.byId[e.cardId]),{},{data:e.data,_links:e.links})))});case nt:return kt(kt({},r),{},{deleting:[].concat(x()(r.deleting),[e.cardId])});case tt:return kt(kt({},r),{},{byId:Object(E.omit)(r.byId,e.cardId),byDashboard:kt(kt({},r.byDashboard),{},_()({},e.dashboardId,Object(E.filter)(r.byDashboard[e.dashboardId],(function(r){return r!==e.cardId})))),deleting:Object(E.filter)(r.deleting,(function(r){return r!==e.cardId}))});case at:return e.context?kt(kt({},r),{},{adding:[].concat(x()(r.adding),[e.context])}):r;case ot:case ct:return kt(kt({},r),{},{adding:r.adding.filter((function(r){return r!==e.context}))});case ut:return kt(kt({},r),{},{rpcs:kt(kt({},r.rpcs),{},_()({},e.cardId,[].concat(x()(r.rpcs[e.cardId]||[]),[e.href])))});case it:case st:return kt(kt({},r),{},{rpcs:kt(kt({},r.rpcs),{},_()({},e.cardId,(r.rpcs[e.cardId]||[]).filter((function(r){return r!==e.href}))))});case dt:return kt(kt({},r),{},{refreshingDashboards:[].concat(x()(r.refreshingDashboards),[e.dashboardId])});case ft:case lt:return kt(kt({},r),{},{refreshingDashboards:r.refreshingDashboards.filter((function(r){return r!==e.dashboardId}))});case yt:return kt(kt({},r),{},{querying:[].concat(x()(r.querying),[e.cardId])});case vt:return kt(kt({},r),{},{querying:r.querying.filter((function(r){return r!==e.cardId}))});default:return r}},app:function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_n,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case pn:return Sn(Sn({},r),{},{view:{page:e.page,attr:e.attr||{}},previousView:r.view});case yn:return Sn(Sn({},r),{},{view:r.previousView||_n.view,previousView:null});case vn:return Sn(Sn({},r),{},{suggestedShareUsers:e.users,users:Sn(Sn({},r.users),{},{byId:Sn(Sn({},r.users.byId),Object(E.keyBy)(e.users,"id"))})});case gn:return Sn(Sn({},r),{},{users:Sn(Sn({},r.users),{},{byId:Sn(Sn({},r.users.byId),{},_()({},e.user.id,e.user))})});case Dr:return["create-dashboard-scratch","create-dashboard-default"].includes(e.context)?Sn(Sn({},r),{},{editingCards:!0,view:{page:"view-dashboard",attr:{id:e.created.id}}}):r;case On:return Sn(Sn({},r),{},{editingCards:!0});case Dn:return Sn(Sn({},r),{},{editingCards:!1});case An:return Sn(Sn({},r),{},{staticStats:{data:e.stats,query:e.query}});case mn:return Sn(Sn({},r),{},{usingTouch:e.isUsing});case En:return Sn(Sn({},r),{},{cards:Sn(Sn({},r.cards),{},_()({},e.slug,e.settings))});default:return r}},user:function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Jn,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case Wn:return Yn(Yn({},r),{},{primaryDashboard:e.dashboardId});default:return r}}}),controls:ra({},L),actions:ra(ra(ra(ra(ra({},n),c),u),l),p),selectors:ra(ra(ra(ra(ra({},a),i),d),b),y),resolvers:ra(ra(ra(ra(ra({},o),s),f),h),v)};Object(w.registerStore)("ithemes-security/dashboard",ea);function ta(r){var e=r.type,t=void 0===e?"secondary":e,n=A()(r,["type"]);return Object(m.createElement)(j.Fill,O()({name:"AdminBar".concat(Object(E.capitalize)(t))},n))}function na(r){var e=r.type,t=void 0===e?"secondary":e,n=A()(r,["type"]);return Object(m.createElement)(j.Slot,O()({name:"AdminBar".concat(Object(E.capitalize)(t))},n))}function aa(r){return Object(m.createElement)(j.Fill,O()({name:"BelowToolbar"},r))}function oa(r){return Object(m.createElement)(j.Slot,O()({name:"BelowToolbar"},r))}function ca(r){return Object(m.createElement)(j.Fill,O()({name:"EditCards"},r))}function ua(r){return Object(m.createElement)(j.Slot,O()({name:"EditCards"},r))}t.p=window.itsecWebpackPublicPath},GRId:function(r,e){!function(){r.exports=this.wp.element}()},Mmq9:function(r,e){!function(){r.exports=this.wp.url}()},QILm:function(r,e,t){var n=t("8OQS");r.exports=function(r,e){if(null==r)return{};var t,a,o=n(r,e);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(r);for(a=0;a<c.length;a++)t=c[a],e.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(r,t)&&(o[t]=r[t])}return o}},Td6G:function(r,e,t){"use strict";t.d(e,"c",(function(){return j})),t.d(e,"b",(function(){return q})),t.d(e,"o",(function(){return W})),t.d(e,"m",(function(){return z})),t.d(e,"j",(function(){return Y})),t.d(e,"e",(function(){return J})),t.d(e,"f",(function(){return $})),t.d(e,"d",(function(){return Z})),t.d(e,"l",(function(){return X})),t.d(e,"a",(function(){return K})),t.d(e,"i",(function(){return rr})),t.d(e,"h",(function(){return er})),t.d(e,"g",(function(){return tr})),t.d(e,"k",(function(){return nr})),t.d(e,"n",(function(){return ar}));var n=t("J4zp"),a=t.n(n),o=t("RIqP"),c=t.n(o),u=t("YLtl"),i=t("GRId"),s=t("Mmq9"),d=t("lwsE"),f=t.n(d),l=t("W8MJ"),b=t.n(l),h=t("lSNA"),p=t.n(h),y=t("92Nh"),v=t.n(y),g=t("tmk3"),O=t.n(g);function D(r,e){var t="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(!t){if(Array.isArray(r)||(t=function(r,e){if(!r)return;if("string"==typeof r)return A(r,e);var t=Object.prototype.toString.call(r).slice(8,-1);"Object"===t&&r.constructor&&(t=r.constructor.name);if("Map"===t||"Set"===t)return Array.from(r);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return A(r,e)}(r))||e&&r&&"number"==typeof r.length){t&&(r=t);var n=0,a=function(){};return{s:a,n:function(){return n>=r.length?{done:!0}:{done:!1,value:r[n++]}},e:function(r){throw r},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,c=!0,u=!1;return{s:function(){t=t.call(r)},n:function(){var r=t.next();return c=r.done,r},e:function(r){u=!0,o=r},f:function(){try{c||null==t.return||t.return()}finally{if(u)throw o}}}}function A(r,e){(null==e||e>r.length)&&(e=r.length);for(var t=0,n=new Array(e);t<e;t++)n[t]=r[t];return n}var m=new WeakMap,E=new WeakMap,j=function(){function r(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;f()(this,r),m.set(this,{writable:!0,value:{}}),E.set(this,{writable:!0,value:{}}),p()(this,"add",(function(r,t){return O()(e,m)[r]||(O()(e,m)[r]=[]),O()(e,m)[r].push(t),e})),p()(this,"hasErrors",(function(){return e.getErrorCodes().length>0})),p()(this,"getErrorCodes",(function(){return Object.keys(O()(e,m))})),p()(this,"getErrorCode",(function(){return e.getErrorCodes()[0]})),p()(this,"getErrorMessages",(function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;if(r)return O()(e,m)[r];var t=[];for(var n in O()(e,m))O()(e,m).hasOwnProperty(n)&&t.concat(O()(e,m)[n]);return t})),p()(this,"getErrorMessage",(function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;return r=r||e.getErrorCode(),e.getErrorMessages(r)[0]})),p()(this,"getErrorData",(function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;return r=r||e.getErrorCode(),O()(e,E)[r]})),p()(this,"getAllErrorMessages",(function(){var r=[];for(var t in O()(e,m))O()(e,m).hasOwnProperty(t)&&r.push.apply(r,c()(O()(e,m)[t]));return r})),t&&(n&&(O()(this,m)[t]=[n]),a&&(O()(this,E)[t]=a))}return b()(r,null,[{key:"fromPHPObject",value:function(e){var t=new r;return v()(t,m,e.errors),v()(t,E,e.error_data),t}},{key:"fromApiError",value:function(e){var t=new r;if(O()(t,m)[e.code]=[e.message],O()(t,E)[e.code]=e.data,e.additional_errors){var n,a=D(e.additional_errors);try{for(a.s();!(n=a.n()).done;){var o=n.value;O()(t,m)[o.code]=[o.message],O()(t,E)[o.code]=o.data}}catch(r){a.e(r)}finally{a.f()}}return t}}]),r}(),S=t("PJYZ"),_=t.n(S),w=t("7W2i"),R=t.n(w),x=t("a1gu"),C=t.n(x),I=t("Nsbk"),P=t.n(I),k=t("oShl"),H=t.n(k),T=t("l3Sj");function B(r){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(r){return!1}}();return function(){var t,n=P()(r);if(e){var a=P()(this).constructor;t=Reflect.construct(n,arguments,a)}else t=n.apply(this,arguments);return C()(this,t)}}var L=function(r){R()(t,r);var e=B(t);function t(r){var n;f()(this,t);for(var a=arguments.length,o=new Array(a>1?a-1:0),c=1;c<a;c++)o[c-1]=arguments[c];for(var u in n=e.call.apply(e,[this,r.message||Object(T.__)("An unknown error occurred.","better-wp-security")].concat(o)),Error.captureStackTrace&&Error.captureStackTrace(_()(n),t),n.__response=r,r)r.hasOwnProperty(u)&&Object.defineProperty(_()(n),u,{value:r[u],configurable:!0,enumerable:!0,writable:!0});return n}return b()(t,[{key:"toString",value:function(){return this.__response.toString()}},{key:"getResponse",value:function(){return this.__response}}]),t}(H()(Error));t("LhCv");var F=t("yXPU"),U=t.n(F),N=t("o0o1"),V=t.n(N),q=function(){function r(e,t,n,a,o,c){f()(this,r),p()(this,"type",void 0),p()(this,"error",void 0),p()(this,"data",void 0),p()(this,"success",void 0),p()(this,"info",void 0),p()(this,"warning",void 0),this.type=e,this.error=t,this.data=n,this.success=a,this.info=o,this.warning=c,Object.seal(this)}var e;return b()(r,[{key:"isSuccess",value:function(){return this.type===r.SUCCESS}}],[{key:"fromResponse",value:(e=U()(V.a.mark((function e(t){var n,a,o,c,u,i,s;return V.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=function(r){var e,n=null===(e=t.headers)||void 0===e?void 0:e.get("X-Messages-".concat(r));return n?JSON.parse(n):[]},204===t.status||!t.json){e.next=7;break}return e.next=4,t.json();case 4:e.t0=e.sent,e.next=8;break;case 7:e.t0=null;case 8:return a=e.t0,o=J(a),c=o.hasErrors()?r.ERROR:r.SUCCESS,u=n("Success"),i=n("Info"),s=n("Warning"),e.abrupt("return",new r(c,o,a,u,i,s));case 15:case"end":return e.stop()}}),e)}))),function(r){return e.apply(this,arguments)})}]),r}();function Q(r,e){var t="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(!t){if(Array.isArray(r)||(t=function(r,e){if(!r)return;if("string"==typeof r)return M(r,e);var t=Object.prototype.toString.call(r).slice(8,-1);"Object"===t&&r.constructor&&(t=r.constructor.name);if("Map"===t||"Set"===t)return Array.from(r);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return M(r,e)}(r))||e&&r&&"number"==typeof r.length){t&&(r=t);var n=0,a=function(){};return{s:a,n:function(){return n>=r.length?{done:!0}:{done:!1,value:r[n++]}},e:function(r){throw r},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,c=!0,u=!1;return{s:function(){t=t.call(r)},n:function(){var r=t.next();return c=r.done,r},e:function(r){u=!0,o=r},f:function(){try{c||null==t.return||t.return()}finally{if(u)throw o}}}}function M(r,e){(null==e||e>r.length)&&(e=r.length);for(var t=0,n=new Array(e);t<e;t++)n[t]=r[t];return n}Object.defineProperty(q,"SUCCESS",{value:"success",writable:!1,enumerable:!1,configurable:!1}),Object.defineProperty(q,"ERROR",{value:"error",writable:!1,enumerable:!1,configurable:!1});var G=Object(i.createContext)({getUrl:function(r){r="settings"===r?"itsec":"itsec-"+r;var e=s.removeQueryArgs.apply(void 0,[document.location.href].concat(c()(Object.keys(Object(s.getQueryArgs)(document.location.href)))));return Object(s.addQueryArgs)(e,{page:r})}});function W(r){return(0,Object(i.useContext)(G).getUrl)(r)}function z(r){if(r<=999)return r.toString();if(r<=9999){var e=(r/1e3).toFixed(1);return"0"===e.charAt(e.length-1)?e.replace(".0","k"):"".concat(e,"k")}if(r<=99999)return r.toString().substring(0,2)+"k";if(r<=999999)return r.toString().substring(0,3)+"k";if(r<=9999999){var t=(r/1e6).toFixed(1);return"0"===t.charAt(t.length-1)?t.replace(".0","m"):"".concat(t,"m")}if(r<=99999999)return r.toString().substring(0,2)+"m";if(r<=999999999)return r.toString().substring(0,3)+"m";if(r<=9999999999){var n=(r/1e9).toFixed(1);return"0"===n.charAt(n.length-1)?n.replace(".0","b"):"".concat(n,"b")}return r}function Y(r){if(!Object(u.isPlainObject)(r))return!1;var e=Object.keys(r);return 2===e.length&&(e.includes("errors")&&e.includes("error_data"))}function J(r){return r instanceof j?r:Y(r)?j.fromPHPObject(r):function(r){if(!Object(u.isPlainObject)(r))return!1;var e=Object.keys(r);return(3===e.length||4===e.length)&&(!(4===e.length&&!e.includes("additional_errors"))&&(e.includes("code")&&e.includes("message")&&e.includes("data")))}(r)?j.fromApiError(r):new j}function $(r){var e,t={},n=Q(r);try{for(n.s();!(e=n.n()).done;){var o=a()(e.value,2),c=o[0],u=o[1];t[c]=u}}catch(r){n.e(r)}finally{n.f()}return t}function Z(r,e){var t,n=[[],[]],a=Q(r);try{for(a.s();!(t=a.n()).done;){var o=t.value;n[e(o)?0:1].push(o)}}catch(r){a.e(r)}finally{a.f()}return n}function X(r){if(r instanceof Error)throw r;throw new L(r)}var K="https://secure.gravatar.com/avatar/d7a973c7dab26985da5f961be7b74480?s=96&d=mm&f=y&r=g";function rr(r,e){var t=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return Object(u.get)(r,["_links","self",0,"targetHints",e],t?void 0:[])}function er(r){return function(r,e){return Object(u.get)(r,["_links",e,0,"href"])}(r,"self")}function tr(r,e){if(r&&r.links){var t,n=Q(r.links);try{for(n.s();!(t=n.n()).done;){var a=t.value;if(a.rel===e)return a}}catch(r){n.e(r)}finally{n.f()}}}function nr(r,e){if("object"!==r.type)return r;var t;for(var n in e)e.hasOwnProperty(n)&&"hidden"===e[n]["ui:widget"]&&(t||(t=Object(u.cloneDeep)(r)),delete t.properties[n]);return t||r}function ar(r){var e=[];if(!r)return e;var t=r instanceof j?r:J(Object(u.pick)(r,["code","message","data"]));return"rest_invalid_param"===t.getErrorCode()&&(e=Object.values(t.getErrorData().params)),[].concat(c()(t.getAllErrorMessages()),c()(e))}},YLtl:function(r,e){!function(){r.exports=this.lodash}()},Z6ex:function(r,e,t){"use strict";t.d(e,"c",(function(){return A})),t.d(e,"p",(function(){return m})),t.d(e,"o",(function(){return E})),t.d(e,"b",(function(){return j})),t.d(e,"d",(function(){return S})),t.d(e,"a",(function(){return _})),t.d(e,"n",(function(){return R})),t.d(e,"l",(function(){return x})),t.d(e,"m",(function(){return C})),t.d(e,"g",(function(){return I})),t.d(e,"e",(function(){return k})),t.d(e,"k",(function(){return H})),t.d(e,"j",(function(){return T})),t.d(e,"i",(function(){return B})),t.d(e,"f",(function(){return L})),t.d(e,"h",(function(){return F}));var n=t("J4zp"),a=t.n(n),o=t("RIqP"),c=t.n(o),u=t("lSNA"),i=t.n(u),s=t("YLtl"),d=t("4eJC"),f=t.n(d),l=t("1ZqX"),b=t("l3Sj"),h=t("g56x"),p=t("GRId"),y=t("Td6G");function v(r,e){var t="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(!t){if(Array.isArray(r)||(t=function(r,e){if(!r)return;if("string"==typeof r)return g(r,e);var t=Object.prototype.toString.call(r).slice(8,-1);"Object"===t&&r.constructor&&(t=r.constructor.name);if("Map"===t||"Set"===t)return Array.from(r);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return g(r,e)}(r))||e&&r&&"number"==typeof r.length){t&&(r=t);var n=0,a=function(){};return{s:a,n:function(){return n>=r.length?{done:!0}:{done:!1,value:r[n++]}},e:function(r){throw r},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,c=!0,u=!1;return{s:function(){t=t.call(r)},n:function(){var r=t.next();return c=r.done,r},e:function(r){u=!0,o=r},f:function(){try{c||null==t.return||t.return()}finally{if(u)throw o}}}}function g(r,e){(null==e||e>r.length)&&(e=r.length);for(var t=0,n=new Array(e);t<e;t++)n[t]=r[t];return n}function O(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),t.push.apply(t,n)}return t}function D(r){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?O(Object(t),!0).forEach((function(e){i()(r,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):O(Object(t)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(t,e))}))}return r}var A=Object(p.createContext)({canManage:!1,installType:""});function m(){return Object(p.useContext)(A)}function E(){var r=Object(l.useSelect)((function(r){return{canCreate:r("ithemes-security/dashboard").canCreateDashboards(),canEdit:r("ithemes-security/dashboard").canEditDashboard(r("ithemes-security/dashboard").getViewingDashboardId())}}),[]),e=r.canCreate,t=r.canEdit;return e||t}var j=Object.freeze(["huge","wide","large","medium","mobile"]),S=Object.freeze({huge:8,wide:6,large:4,medium:2,mobile:1}),_=Object.freeze(j.reduce((function(r,e){return D(D({},r),{},i()({},e,250*S[e]+20*(S[e]-1)))}),{})),w=["minW","minH","maxW","maxH"];function R(r,e){var t=Object(l.select)("ithemes-security/dashboard"),n={};for(var a in e)if(e.hasOwnProperty(a)){var o,c=v(e[a]);try{for(c.s();!(o=c.n()).done;){var u=o.value,s=t.getDashboardCard(parseInt(u.i));s&&(n[s.id]?(n[s.id].size[a]={w:u.w,h:u.h},n[s.id].position[a]={x:u.x&&u.x!==1/0?u.x:0,y:u.y&&u.y!==1/0?u.y:0}):n[s.id]={id:s.id,card:s.card,size:i()({},a,{w:u.w,h:u.h}),position:i()({},a,{x:u.x&&u.x!==1/0?u.x:0,y:u.y&&u.y!==1/0?u.y:0})})}}catch(r){c.e(r)}finally{c.f()}}return{cards:Object.values(n)}}function x(r,e,t){var n,a=t.cards,o=void 0===a?{}:a,c=Object(s.zipObject)(Object.keys(_),Object(s.times)(Object.keys(_).length,(function(){return[]}))),u={},i=v(o);try{for(i.s();!(n=i.n()).done;){var d=n.value;u[d.id]=!0;var f=Object(l.select)("ithemes-security/dashboard").getAvailableCard(d.card);if(f||"unknown"===d.card){var b,h=v(j);try{for(h.s();!(b=h.n()).done;){var p=b.value;c[p].push(C(r,d,f,p,c[p]))}}catch(r){h.e(r)}finally{h.f()}}}}catch(r){i.e(r)}finally{i.f()}if(Object.keys(u).length<e.length){var y,g=v(e);try{for(g.s();!(y=g.n()).done;){var O=y.value;if(!u[O.id]){var D=Object(l.select)("ithemes-security/dashboard").getAvailableCard(O.card);if(D){var A,m=v(j);try{for(m.s();!(A=m.n()).done;){var E=A.value;c[E].push(C(r,O,D,E,c[E]))}}catch(r){m.e(r)}finally{m.f()}}}}}catch(r){g.e(r)}finally{g.f()}}return c}function C(r,e,t,n,a){if(_[n]){var o={i:e.id.toString(),x:Object(s.get)(e,["position",n,"x"]),y:Object(s.get)(e,["position",n,"y"]),w:Object(s.get)(e,["size",n,"w"],Object(s.get)(t,["size","defaultW"],1)),h:Object(s.get)(e,["size",n,"h"],Object(s.get)(t,["size","defaultH"],2))};if(t&&t.size){var c,u=v(w);try{for(u.s();!(c=u.n()).done;){var i=c.value;t.size.hasOwnProperty(i)&&(o[i]=t.size[i])}}catch(r){u.e(r)}finally{u.f()}}if(o.minW&&o.minW>o.w&&(o.w=o.minW),o.minH&&o.minH>o.h&&(o.h=o.minH),o.maxW&&o.w>o.maxW&&(o.w=o.maxW),o.maxH&&o.h>o.maxH&&(o.h=o.maxH),a&&void 0===o.x&&void 0===o.x){var d=I(S[n],a,{w:o.w,h:o.h});d&&(o.x=d.x,o.y=d.y)}return o.x=void 0===o.x||null===o.x?0:o.x,o.y=void 0===o.y||null===o.y?1/0:o.y,Object(l.select)("ithemes-security/dashboard").canEditDashboard(r)||(o.static=!0),"unknown"===e.card&&(o.isResizable=!1),o.minW===o.maxW&&o.minH===o.maxH&&(o.isResizable=!1),o}}function I(r,e,t){var n,a=[],o=v(e);try{for(o.s();!(n=o.n()).done;)for(var c=n.value,u=c.x,i=c.y,s=c.w,d=c.h,f=0;f<d;f++){a[f]||(a[f]=new Array(r).fill(0));for(var l=0;l<s;l++)a[f+i]||(a[f+i]=new Array(r).fill(0)),a[f+i][l+u]=1}}catch(r){o.e(r)}finally{o.f()}for(var b=t.w,h=t.h,p=0;p<a.length;p++)r:for(var y=0;y<r;y++)if(!a[p]||1!==a[p][y]){for(var g=0;g<h;g++)for(var O=0;O<b;O++)if(p+g>a.length||y+O>=r||a[p+g]&&1===a[p+g][y+O])continue r;return{x:y,y:p}}return{x:0,y:a.length}}function P(r,e){return r.x===e.x&&r.y===e.y&&r.w===e.w&&r.h===e.h}var k=f()((function(r,e){if(r===e)return!0;if(Object.keys(r).length!==Object.keys(e).length)return!1;for(var t=new Map,n=0;n<j.length;n++){var a=j[n];if(r[a]||e[a]){if(!r[a]&&e[a]||r[a]&&!e[a])return!1;if(r[a].length!==e[a].length)return!1;for(var o=0;o<r[a].length;o++)t.set(r[a][o].i,r[a][o]);for(var c=0;c<e[a].length;c++){var u=t.get(e[a][c].i);if(!u)return!1;if(!P(u,e[a][c]))return!1;t.delete(u.i)}if(t.size>0)return!1}}return!0}));var H=f()((function(r,e,t){var n=Object(s.keyBy)(e[t],"i"),a=c()(r);return a.sort((function(r,e){var t=r.id.toString(),a=e.id.toString();if(!n[t]&&!n[a])return 0;if(n[t]&&!n[a])return 1;if(!n[t]&&n[a])return-1;var o=n[t].y,c=n[a].y,u=n[t].x,i=n[a].x;return o>c?1:o<c?-1:u>i?1:u<i?-1:0})),a}));var T=f()((function(r,e){var t=Object(s.keyBy)(e.cards,"id"),n=c()(r);return n.sort((function(r,e){var n=r.id,a=e.id;if(!t[n]&&!t[a])return 0;if(t[n]&&!t[a])return 1;if(!t[n]&&t[a])return-1;var o=t[n].position.mobile.y,c=t[a].position.mobile.y,u=t[n].position.mobile.x,i=t[a].position.mobile.x;return o>c?1:o<c?-1:u>i?1:u<i?-1:0})),n}));function B(r,e){if(!e)return Object(b.__)("Unknown Card","better-wp-security");var t=e.label;return t=Object(h.applyFilters)("ithemes-security.dashboard.getCardTitle.".concat(e.slug),t,r),Object(h.applyFilters)("ithemes-security.dashboard.getCardTitle",t,r,e)}function L(r,e,t,n){Object.entries(t).forEach((function(e){var t=a()(e,2),n=t[0],o=t[1];return r[n]!==o&&console.log("Prop '".concat(n,"' changed"))})),Object.entries(n).forEach((function(r){var t=a()(r,2),n=t[0],o=t[1];return e[n]!==o&&console.log("State '".concat(n,"' changed"))}))}function F(r){return Object(s.get)(r,["avatar_urls",96],y.a)}},g56x:function(r,e){!function(){r.exports=this.wp.hooks}()},l3Sj:function(r,e){!function(){r.exports=this.wp.i18n}()},pPDe:function(r,e,t){"use strict";var n,a;function o(r){return[r]}function c(){var r={clear:function(){r.head=null}};return r}function u(r,e,t){var n;if(r.length!==e.length)return!1;for(n=t;n<r.length;n++)if(r[n]!==e[n])return!1;return!0}n={},a="undefined"!=typeof WeakMap,e.a=function(r,e){var t,i;function s(){t=a?new WeakMap:c()}function d(){var t,n,a,o,c,s=arguments.length;for(o=new Array(s),a=0;a<s;a++)o[a]=arguments[a];for(c=e.apply(null,o),(t=i(c)).isUniqueByDependants||(t.lastDependants&&!u(c,t.lastDependants,0)&&t.clear(),t.lastDependants=c),n=t.head;n;){if(u(n.args,o,1))return n!==t.head&&(n.prev.next=n.next,n.next&&(n.next.prev=n.prev),n.next=t.head,n.prev=null,t.head.prev=n,t.head=n),n.val;n=n.next}return n={val:r.apply(null,o)},o[0]=null,n.args=o,t.head&&(t.head.prev=n,n.next=t.head),t.head=n,n.val}return e||(e=o),i=a?function(r){var e,a,o,u,i,s=t,d=!0;for(e=0;e<r.length;e++){if(a=r[e],!(i=a)||"object"!=typeof i){d=!1;break}s.has(a)?s=s.get(a):(o=new WeakMap,s.set(a,o),s=o)}return s.has(n)||((u=c()).isUniqueByDependants=d,s.set(n,u)),s.get(n)}:function(){return t},d.getDependants=e,d.clear=s,s(),d}},pVnL:function(r,e){function t(){return r.exports=t=Object.assign||function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r},t.apply(this,arguments)}r.exports=t},rl8x:function(r,e){!function(){r.exports=this.wp.isShallowEqual}()},"tI+e":function(r,e){!function(){r.exports=this.wp.components}()},ywyh:function(r,e){!function(){r.exports=this.wp.apiFetch}()}},[["Akk5",0,1]]]);
1
+ this.itsec=this.itsec||{},this.itsec.dashboard=this.itsec.dashboard||{},this.itsec.dashboard.api=(window.itsecWebpackJsonP=window.itsecWebpackJsonP||[]).push([[15],{"/fTC":function(e,t,r){var n,a;n=function(){var e=/^;\s*([^"=]+)=(?:"([^"]+)"|([^";,]+)(?:[;,]|$))/,t=/^<([^>]*)>/,r=/^\s*,\s*/;return{parse:function(n,a){for(var d,i,s,o=a&&a.extended||!1,u=[];n&&(n=n.trim(),i=t.exec(n));){for(var c={link:i[1]},f=(n=n.slice(i[0].length)).match(r);n&&(!f||f.index>0)&&(d=e.exec(n));)f=(n=n.slice(d[0].length)).match(r),"rel"===d[1]||"rev"===d[1]?(s=(d[2]||d[3]).split(/\s+/),c[d[1]]=s):c[d[1]]=d[2]||d[3];u.push(c),n=n.replace(r,"")}return o?u:u.reduce((function(e,t){return t.rel&&t.rel.forEach((function(r){e[r]=t.link})),e}),{})},stringify:function(e){var t=Object.keys(e).reduce((function(t,r){return t[e[r]]=t[e[r]]||[],t[e[r]].push(r),t}),{});return Object.keys(t).reduce((function(e,r){return e.concat("<"+r+'>; rel="'+t[r].join(" ")+'"')}),[]).join(", ")}}},a=this,e.exports?e.exports=n():"function"==typeof a.define&&a.define.amd?define(n):a.li=n()},"1ZqX":function(e,t){!function(){e.exports=this.wp.data}()},"4eJC":function(e,t,r){e.exports=function(e,t){var r,n,a=0;function d(){var d,i,s=r,o=arguments.length;e:for(;s;){if(s.args.length===arguments.length){for(i=0;i<o;i++)if(s.args[i]!==arguments[i]){s=s.next;continue e}return s!==r&&(s===n&&(n=s.prev),s.prev.next=s.next,s.next&&(s.next.prev=s.prev),s.next=r,s.prev=null,r.prev=s,r=s),s.val}s=s.next}for(d=new Array(o),i=0;i<o;i++)d[i]=arguments[i];return s={args:d,val:e.apply(null,d)},r?(r.prev=s,s.next=r):n=s,a===t.maxSize?(n=n.prev).next=null:a++,r=s,s.val}return t=t||{},d.clear=function(){r=null,n=null,a=0},d}},Akk5:function(e,t,r){"use strict";r.r(t),r.d(t,"AdminBarFill",(function(){return Zr})),r.d(t,"AdminBarSlot",(function(){return Xr})),r.d(t,"BelowToolbarFill",(function(){return Kr})),r.d(t,"BelowToolbarSlot",(function(){return en})),r.d(t,"EditCardsFill",(function(){return tn})),r.d(t,"EditCardsSlot",(function(){return rn}));var n={};r.r(n),r.d(n,"receiveDashboardQuery",(function(){return x})),r.d(n,"receiveDashboard",(function(){return B})),r.d(n,"receiveDashboardLayout",(function(){return L})),r.d(n,"savingDashboardLayout",(function(){return k})),r.d(n,"startAddDashboard",(function(){return F})),r.d(n,"finishAddDashboard",(function(){return P})),r.d(n,"failedAddDashboard",(function(){return V})),r.d(n,"receiveDashboardCollectionHeaders",(function(){return N})),r.d(n,"startSaveDashboard",(function(){return U})),r.d(n,"finishSaveDashboard",(function(){return q})),r.d(n,"failedSaveDashboard",(function(){return Q})),r.d(n,"startDeleteDashboard",(function(){return G})),r.d(n,"finishDeleteDashboard",(function(){return M})),r.d(n,"failedDeleteDashboard",(function(){return z})),r.d(n,"addDashboard",(function(){return W})),r.d(n,"saveDashboard",(function(){return Y})),r.d(n,"saveDashboardLayoutFromGrid",(function(){return J})),r.d(n,"saveDashboardLayout",(function(){return Z})),r.d(n,"deleteDashboard",(function(){return X})),r.d(n,"RECEIVE_DASHBOARD_QUERY",(function(){return K})),r.d(n,"RECEIVE_DASHBOARD",(function(){return ee})),r.d(n,"RECEIVE_DASHBOARD_LAYOUT",(function(){return te})),r.d(n,"SAVING_DASHBOARD_LAYOUT",(function(){return re})),r.d(n,"START_ADD_DASHBOARD",(function(){return ne})),r.d(n,"FINISH_ADD_DASHBOARD",(function(){return ae})),r.d(n,"FAILED_ADD_DASHBOARD",(function(){return de})),r.d(n,"START_SAVE_DASHBOARD",(function(){return ie})),r.d(n,"FINISH_SAVE_DASHBOARD",(function(){return se})),r.d(n,"FAILED_SAVE_DASHBOARD",(function(){return oe})),r.d(n,"START_DELETE_DASHBOARD",(function(){return ue})),r.d(n,"FINISH_DELETE_DASHBOARD",(function(){return ce})),r.d(n,"FAILED_DELETE_DASHBOARD",(function(){return fe})),r.d(n,"RECEIVE_DASHBOARD_COLLECTION_HEADERS",(function(){return le}));var a={};r.r(a),r.d(a,"getAvailableDashboards",(function(){return Ae})),r.d(a,"getDashboardsQueryResult",(function(){return pe})),r.d(a,"getDashboard",(function(){return _e})),r.d(a,"getDashboardForEdit",(function(){return Oe})),r.d(a,"canEditDashboard",(function(){return Ee})),r.d(a,"canCreateDashboards",(function(){return Re})),r.d(a,"getDashboardAddableCardLDOs",(function(){return ve})),r.d(a,"isCardAtDashboardLimit",(function(){return Se})),r.d(a,"isRequestingDashboards",(function(){return Ce})),r.d(a,"isRequestingDashboardLayout",(function(){return Ie})),r.d(a,"isLayoutLoaded",(function(){return me})),r.d(a,"isCanCreateDashboardsLoaded",(function(){return je})),r.d(a,"isSavingDashboardLayout",(function(){return He})),r.d(a,"getDashboardLayout",(function(){return we})),r.d(a,"getDashboardLayoutForGrid",(function(){return Te})),r.d(a,"isAddingDashboard",(function(){return xe})),r.d(a,"isSavingDashboard",(function(){return Be})),r.d(a,"isDeletingDashboard",(function(){return Le}));var d={};r.r(d),r.d(d,"getAvailableDashboards",(function(){return ke})),r.d(d,"canCreateDashboards",(function(){return Fe})),r.d(d,"getDashboard",(function(){return Pe})),r.d(d,"getDashboardForEdit",(function(){return Ve})),r.d(d,"getDashboardLayout",(function(){return Ne}));var i={};r.r(i),r.d(i,"receiveAvailableCards",(function(){return Ue})),r.d(i,"RECEIVE_AVAILABLE_CARDS",(function(){return qe}));var s={};r.r(s),r.d(s,"receiveDashboardCards",(function(){return Qe})),r.d(s,"receiveDashboardCard",(function(){return Ge})),r.d(s,"receiveDashboardCardQueryArgs",(function(){return Me})),r.d(s,"receiveDashboardCardData",(function(){return ze})),r.d(s,"dashboardCardRemoved",(function(){return We})),r.d(s,"startDashboardCardRemove",(function(){return Ye})),r.d(s,"startAddDashboardCard",(function(){return $e})),r.d(s,"finishAddDashboardCard",(function(){return Je})),r.d(s,"failedAddDashboardCard",(function(){return Ze})),r.d(s,"startDashboardCardRpc",(function(){return Xe})),r.d(s,"finishDashboardCardRpc",(function(){return Ke})),r.d(s,"failedDashboardCardRpc",(function(){return et})),r.d(s,"startRefreshDashboardCards",(function(){return tt})),r.d(s,"finishRefreshDashboardCards",(function(){return rt})),r.d(s,"failedRefreshDashboardCards",(function(){return nt})),r.d(s,"startRefreshDashboardCard",(function(){return at})),r.d(s,"finishRefreshDashboardCard",(function(){return dt})),r.d(s,"failedRefreshDashboardCard",(function(){return it})),r.d(s,"startQueryDashboardCard",(function(){return st})),r.d(s,"finishQueryDashboardCard",(function(){return ot})),r.d(s,"failedQueryDashboardCard",(function(){return ut})),r.d(s,"addDashboardCard",(function(){return ct})),r.d(s,"saveDashboardCard",(function(){return ft})),r.d(s,"removeDashboardCard",(function(){return lt})),r.d(s,"refreshDashboardCards",(function(){return ht})),r.d(s,"refreshDashboardCard",(function(){return bt})),r.d(s,"queryDashboardCard",(function(){return yt})),r.d(s,"callDashboardCardRpc",(function(){return Dt})),r.d(s,"RECEIVE_DASHBOARD_CARDS",(function(){return gt})),r.d(s,"RECEIVE_DASHBOARD_CARD",(function(){return At})),r.d(s,"RECEIVE_DASHBOARD_CARD_QUERY_ARGS",(function(){return pt})),r.d(s,"RECEIVE_DASHBOARD_CARD_DATA",(function(){return _t})),r.d(s,"REMOVE_DASHBOARD_CARD",(function(){return Ot})),r.d(s,"START_REMOVE_DASHBOARD_CARD",(function(){return Et})),r.d(s,"START_ADD_DASHBOARD_CARD",(function(){return Rt})),r.d(s,"FINISH_ADD_DASHBOARD_CARD",(function(){return vt})),r.d(s,"FAILED_ADD_DASHBOARD_CARD",(function(){return St})),r.d(s,"START_DASHBOARD_CARD_RPC",(function(){return Ct})),r.d(s,"FINISH_DASHBOARD_CARD_RPC",(function(){return It})),r.d(s,"FAILED_DASHBOARD_CARD_RPC",(function(){return mt})),r.d(s,"START_REFRESH_DASHBOARD_CARDS",(function(){return jt})),r.d(s,"FINISH_REFRESH_DASHBOARD_CARDS",(function(){return Ht})),r.d(s,"FAILED_REFRESH_DASHBOARD_CARDS",(function(){return wt})),r.d(s,"START_REFRESH_DASHBOARD_CARD",(function(){return Tt})),r.d(s,"FINISH_REFRESH_DASHBOARD_CARD",(function(){return xt})),r.d(s,"FAILED_REFRESH_DASHBOARD_CARD",(function(){return Bt})),r.d(s,"START_QUERY_DASHBOARD_CARD",(function(){return Lt})),r.d(s,"FINISH_QUERY_DASHBOARD_CARD",(function(){return kt})),r.d(s,"FAILED_QUERY_DASHBOARD_CARD",(function(){return Ft}));var o={};r.r(o),r.d(o,"getAvailableCards",(function(){return Pt})),r.d(o,"getAvailableCard",(function(){return Vt})),r.d(o,"getAvailableCardBySelf",(function(){return Nt}));var u={};r.r(u),r.d(u,"getAvailableCards",(function(){return Ut})),r.d(u,"getAvailableCard",(function(){return qt})),r.d(u,"getAvailableCardBySelf",(function(){return Qt}));var c={};r.r(c),r.d(c,"getDashboardCards",(function(){return Mt})),r.d(c,"getDashboardCard",(function(){return zt})),r.d(c,"getDashboardCardSettings",(function(){return Wt})),r.d(c,"getDashboardCardQueryArgs",(function(){return Yt})),r.d(c,"getDashboardCardConfig",(function(){return $t})),r.d(c,"getDashboardCardsByType",(function(){return Jt})),r.d(c,"canEditCard",(function(){return Zt})),r.d(c,"isRequestingCards",(function(){return Xt})),r.d(c,"isRefreshingDashboardCards",(function(){return Kt})),r.d(c,"areCardsLoaded",(function(){return er})),r.d(c,"isRemovingCard",(function(){return tr})),r.d(c,"isAddingCard",(function(){return rr})),r.d(c,"isCallingDashboardCardRpc",(function(){return nr})),r.d(c,"getCallingDashboardCardRpcs",(function(){return dr})),r.d(c,"isQueryingDashboardCard",(function(){return ir}));var f={};r.r(f),r.d(f,"getDashboardCards",(function(){return sr})),r.d(f,"getDashboardCardConfig",(function(){return or}));var l={};r.r(l),r.d(l,"viewDashboard",(function(){return ur})),r.d(l,"viewCreateDashboard",(function(){return cr})),r.d(l,"viewHelp",(function(){return fr})),r.d(l,"viewPrevious",(function(){return lr})),r.d(l,"openEditCards",(function(){return hr})),r.d(l,"closeEditCards",(function(){return br})),r.d(l,"receiveSuggestedShareUsers",(function(){return yr})),r.d(l,"receiveUser",(function(){return Dr})),r.d(l,"receiveStaticStats",(function(){return gr})),r.d(l,"usingTouch",(function(){return Ar})),r.d(l,"registerCard",(function(){return pr})),r.d(l,"NAVIGATE",(function(){return _r})),r.d(l,"NAVIGATE_BACK",(function(){return Or})),r.d(l,"RECEIVE_SUGGESTED_SHARE_USERS",(function(){return Er})),r.d(l,"RECEIVE_USER",(function(){return Rr})),r.d(l,"OPEN_EDIT_CARDS",(function(){return vr})),r.d(l,"CLOSE_EDIT_CARDS",(function(){return Sr})),r.d(l,"RECEIVE_STATIC_STATS",(function(){return Cr})),r.d(l,"USING_TOUCH",(function(){return Ir})),r.d(l,"REGISTER_CARD",(function(){return mr}));var h={};r.r(h),r.d(h,"getCurrentPage",(function(){return Hr})),r.d(h,"getCurrentPageAttr",(function(){return wr})),r.d(h,"getViewingDashboardId",(function(){return Tr})),r.d(h,"getSuggestedShareUsers",(function(){return xr})),r.d(h,"getUser",(function(){return Br})),r.d(h,"isEditingCards",(function(){return Lr})),r.d(h,"getStaticStats",(function(){return kr})),r.d(h,"isUsingTouch",(function(){return Fr})),r.d(h,"getRegisteredCard",(function(){return Pr}));var b={};r.r(b),r.d(b,"getSuggestedShareUsers",(function(){return Ur})),r.d(b,"getUser",(function(){return qr})),r.d(b,"getStaticStats",(function(){return Qr}));var y={};r.r(y),r.d(y,"receivePrimaryDashboard",(function(){return Gr})),r.d(y,"setPrimaryDashboard",(function(){return Mr})),r.d(y,"RECEIVE_PRIMARY_DASHBOARD",(function(){return zr}));var D={};r.r(D),r.d(D,"getPrimaryDashboard",(function(){return Yr}));var g={};r.r(g),r.d(g,"getPrimaryDashboard",(function(){return $r}));var A=r("pVnL"),p=r.n(A),_=r("GRId"),O=r("YLtl"),E=r("tI+e"),R=r("1ZqX"),v=r("ywyh"),S=r.n(v),C=r("Td6G");function I(e){return{type:"API_FETCH",request:e}}function m(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"info",t=arguments.length>1?arguments[1]:void 0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return{type:"CREATE_NOTICE",status:e,content:t,options:{context:"ithemes-security",...r}}}var j={API_FETCH(e){let{request:t}=e;return S()(t).catch(C.l)},SELECT(e){let{selectorName:t,args:r}=e;return Object(R.select)("ithemes-security/dashboard")[t](...r)},CREATE_NOTICE(e){let{status:t,content:r,options:n}=e;n.autoDismiss&&(n.id=n.id||Object(O.uniqueId)("itsec-auto-dismiss-"),setTimeout(()=>Object(R.dispatch)("core/notices").removeNotice(n.id,n.context),n.autoDismiss)),Object(R.dispatch)("core/notices").createNotice(t,r,n)}},H=r("Mmq9"),w=r("l3Sj"),T=r("Z6ex");function x(e,t){return{type:K,queryId:e,dashboards:t}}function B(e){return{type:ee,dashboard:e}}function L(e,t){return{type:te,dashboardId:e,layout:t}}function k(e,t){return{type:re,dashboardId:e,layout:t}}function F(e,t){return{type:ne,dashboard:e,context:t}}function P(e,t,r){return{type:ae,dashboard:e,created:t,context:r}}function V(e,t,r){return{type:de,dashboard:e,context:t,error:r}}function N(e){return{type:le,headers:e}}function U(e){return{type:ie,dashboardId:e}}function q(e){return{type:se,dashboardId:e}}function Q(e,t){return{type:oe,dashboardId:e,error:t}}function G(e){return{type:ue,dashboardId:e}}function M(e){return{type:ce,dashboardId:e}}function z(e,t){return{type:fe,dashboardId:e,error:t}}function*W(e,t){let r;yield F(e,t);try{r=yield $(e)}catch(r){return yield V(e,t,r),void(yield m("error",Object(w.sprintf)(Object(w.__)("Error when creating dashboard: %s","better-wp-security"),r.message)))}yield B(r),yield P(e,r,t),yield m("success",Object(w.__)("Dashboard Created","better-wp-security"),{autoDismiss:1e4})}function*Y(e){let t;yield U(e.id);try{t=yield $(e)}catch(t){return yield Q(e.id,t),yield m("error",Object(w.sprintf)(Object(w.__)("Error when saving dashboard: %s","better-wp-security"),t.message)),t}return yield B(t),yield q(e.id),t}function*$(e){return yield I({path:Object(H.addQueryArgs)("/ithemes-security/v1/dashboards"+(e.id?"/"+e.id:""),{_embed:1}),method:e.id?"PUT":"POST",data:e})}function*J(e,t){const r=Object(T.n)(e,t);if(yield L(e,r),Object(R.select)("ithemes-security/dashboard").canEditDashboard(e))return yield Z(e,r,!1)}function*Z(e,t){let r,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];yield k(e,t);try{r=yield I({path:`/ithemes-security/v1/dashboards/${e}/layout`,method:"PUT",data:t})}catch(e){return!1}return n&&(yield L(e,r)),r}function*X(e){yield G(e);try{yield I({path:"/ithemes-security/v1/dashboards/"+e,method:"DELETE"})}catch(t){return yield z(e,t),yield m("error",Object(w.sprintf)(Object(w.__)("Error when deleting dashboard: %s","better-wp-security"),t.message)),t}return yield M(e),!0}const K="RECEIVE_DASHBOARD_QUERY",ee="RECEIVE_DASHBOARD",te="RECEIVE_DASHBOARD_LAYOUT",re="SAVING_DASHBOARD_LAYOUT",ne="START_ADD_DASHBOARD",ae="FINISH_ADD_DASHBOARD",de="FAILED_ADD_DASHBOARD",ie="START_SAVE_DASHBOARD",se="FINISH_SAVE_DASHBOARD",oe="FAILED_SAVE_DASHBOARD",ue="START_DELETE_DASHBOARD",ce="FINISH_DELETE_DASHBOARD",fe="FAILED_DELETE_DASHBOARD",le="RECEIVE_DASHBOARD_COLLECTION_HEADERS",he={byId:{},queries:{},layouts:{},savingLayouts:{},adding:[],saving:[],deleting:[],collectionHeaders:{}};var be=r("pPDe"),ye=r("/fTC");function De(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return Object(R.select)("core/data").isResolving("ithemes-security/dashboard",e,r)}function ge(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return Object(R.select)("core/data").hasFinishedResolution("ithemes-security/dashboard",e,r)}function Ae(e){return pe(e,"available")}const pe=Object(be.a)((e,t)=>Object(O.filter)(Object(O.map)(e.dashboard.queries[t],t=>e.dashboard.byId[t]),O.isObject),(e,t)=>[e.dashboard.queries[t],e.dashboard.byId]);function _e(e,t){return e.dashboard.byId[t]}function Oe(e,t){return e.dashboard.byId[t]}function Ee(e,t){return function(e,t,r){return Object(O.get)(e,["dashboard","byId",t,"_links","self",0,"targetHints",r],[])}(e,t,"allow").includes("PUT")}function Re(e){return e.dashboard.collectionHeaders.allow&&e.dashboard.collectionHeaders.allow.split(", ").includes("POST")}const ve=Object(be.a)((e,t)=>Object(O.filter)(Object(O.get)(e,["dashboard","byId",t,"_links","create-form"],[]),e=>Object(O.get)(e,["targetHints","allow"],[]).includes("POST")).map(e=>({...e,aboutLink:e.targetHints.link.map(ye.parse).filter(e=>!!e.about).map(e=>e.about)[0]})),(e,t)=>[e.dashboard.byId[t]]);function Se(e,t,r){const n=Object(R.select)("ithemes-security/dashboard").getAvailableCardBySelf(r);if(!n||!n.max)return!1;return Object(R.select)("ithemes-security/dashboard").getDashboardCardsByType(t,r).length>=n.max}function Ce(){return De("getAvailableDashboards")}function Ie(e,t){return De("getDashboardLayout",t)}function me(e,t){return ge("getDashboardLayout",t)}function je(){return ge("canCreateDashboards")}function He(e,t){return e.dashboard.savingLayouts[t]}function we(e,t){return e.dashboard.layouts[t]}const Te=Object(be.a)((e,t)=>Object(T.l)(t,Object(O.get)(Object(R.select)("ithemes-security/dashboard").getDashboardLayout(t),"cards",[]),Object(R.select)("ithemes-security/dashboard").getDashboardCards(t)||[]),(e,t)=>[e.dashboard.layouts[t],e.availableCards,e.cards.byDashboard[t]]);function xe(e,t){return e.dashboard.adding.includes(t)}function Be(e,t){return e.dashboard.saving.includes(t)}function Le(e,t){return e.dashboard.deleting.includes(t)}function*ke(){const e=yield I({path:Object(H.addQueryArgs)("/ithemes-security/v1/dashboards",{_embed:1})});yield x("available",e)}const Fe={*fulfill(){const e=yield I({path:"/ithemes-security/v1/dashboards",method:"HEAD",parse:!1});yield N(Object(C.f)(e.headers))},isFulfilled:e=>!!e.dashboard.collectionHeaders.allow};function*Pe(){yield R.controls.resolveSelect("ithemes-security/dashboard","getAvailableDashboards")}function*Ve(e){const t=yield I({path:Object(H.addQueryArgs)("/ithemes-security/v1/dashboards/"+e,{_embed:1,context:"edit"})});yield B(t)}function*Ne(e){const t=yield I({path:`/ithemes-security/v1/dashboards/${e}/layout`});yield L(e,t)}function Ue(e){return{type:qe,cards:e}}const qe="RECEIVE_AVAILABLE_CARDS";function Qe(e,t){return{type:gt,dashboardId:e,cards:t}}function Ge(e,t){return{type:At,dashboardId:e,card:t}}function Me(e,t){return{type:pt,cardId:e,queryArgs:t}}function ze(e,t,r){return{type:_t,cardId:e,data:t,links:r}}function We(e,t){return{type:Ot,dashboardId:e,cardId:t}}function Ye(e,t){return{type:Et,dashboardId:e,cardId:t}}function $e(e,t,r){return{type:Rt,collectionEP:e,card:t,context:r}}function Je(e,t,r){return{type:vt,collectionEP:e,card:t,context:r}}function Ze(e,t,r,n){return{type:St,collectionEP:e,card:t,context:r,error:n}}function Xe(e,t,r){return{type:Ct,cardId:e,href:t,data:r}}function Ke(e,t,r,n){return{type:It,cardId:e,href:t,data:r,response:n}}function et(e,t,r,n){return{type:mt,cardId:e,href:t,data:r,error:n}}function tt(e){return{type:jt,dashboardId:e}}function rt(e){return{type:Ht,dashboardId:e}}function nt(e,t){return{type:wt,dashboardId:e,error:t}}function at(e){return{type:Tt,cardId:e}}function dt(e){return{type:xt,cardId:e}}function it(e,t){return{type:Bt,cardId:e,error:t}}function st(e){return{type:Lt,cardId:e}}function ot(e){return{type:kt,cardId:e}}function ut(e,t){return{type:Ft,cardId:e,error:t}}function*ct(e,t,r){let n;yield $e(e,t,r);try{n=yield I({url:Object(H.addQueryArgs)(e,{_embed:1}),method:"POST",data:t})}catch(n){return yield Ze(e,t,r,n),void(yield m("error",Object(w.sprintf)(Object(w.__)("Error when adding card to dashboard: %s","better-wp-security"),n.message)))}yield Je(e,t,r),yield Ge(n.dashboard,n)}function*ft(e,t){const r=t.id;let n;try{n=yield I({path:`/ithemes-security/v1/dashboards/${e}/cards/${t.card}${r?"/"+r:""}`,method:r?"PUT":"POST",data:t})}catch(e){return yield m("error",Object(w.sprintf)(Object(w.__)("Error when saving dashboard card: %s","better-wp-security"),e.message)),e}return yield Ge(e,n),n}function*lt(e,t){let r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];yield Ye(e,t.id),r&&(yield We(e,t.id));try{yield I({path:`/ithemes-security/v1/dashboards/${e}/cards/${t.card}/${t.id}`,method:"DELETE",parse:!1})}catch(n){return r&&(yield Ge(e,t)),void(yield m("error",Object(w.sprintf)(Object(w.__)("Error when removing card from dashboard: %s","better-wp-security"),n.message)))}r||(yield We(e,t.id))}function*ht(e){yield tt(e);const t=Object(R.select)("ithemes-security/dashboard"),r=t.getDashboardCards(e),n={_fields:["id","data","_links"],cards:{}};for(const e of r)Object(O.set)(n,["cards",e.card,e.id],t.getDashboardCardQueryArgs(e.id));let a;try{a=yield I({path:Object(H.addQueryArgs)(`/ithemes-security/v1/dashboards/${e}/cards`,n)})}catch(t){return yield nt(e,t),yield m("warning",Object(w.sprintf)(Object(w.__)("Refreshing dashboard data failed: %s","better-wp-security"),t.message),{autoDismiss:!0}),t}const d={};for(const e of a)d[e.id]=e.data,yield ze(e.id,e.data,e._links);return yield rt(e),d}function*bt(e){const t=Object(R.select)("ithemes-security/dashboard").getDashboardCard(e);if(!t)throw new Error("No card loaded with that id.");yield at(e);const r=yield I({path:Object(H.addQueryArgs)(`/ithemes-security/v1/dashboards/${t.dashboard}/cards/${t.card}/${e}`,{...Object(R.select)("ithemes-security/dashboard").getDashboardCardQueryArgs(e),_fields:["data","_links"]})});return yield ze(e,r.data,r._links),yield dt(e),r.data}function*yt(e,t){const r=Object(R.select)("ithemes-security/dashboard").getDashboardCard(e);if(!r)throw new Error("No card loaded with that id.");yield st(e);const n=yield I({path:Object(H.addQueryArgs)(`/ithemes-security/v1/dashboards/${r.dashboard}/cards/${r.card}/${e}`,{...t,_fields:["data","_links"]})});return yield ze(e,n.data,n._links),yield Me(e,t),yield ot(e),n.data}function*Dt(e,t,r){let n;yield Xe(e,t,r);try{n=yield I({url:t,method:"POST",data:r})}catch(n){return yield et(e,t,r,n),yield m("error",Object(w.sprintf)(Object(w.__)("Error when performing card action: %s","better-wp-security"),n.message)),n}return yield Ke(e,t,r,n),yield bt(e),n}const gt="RECEIVE_DASHBOARD_CARDS",At="RECEIVE_DASHBOARD_CARD",pt="RECEIVE_DASHBOARD_CARD_QUERY_ARGS",_t="RECEIVE_DASHBOARD_CARD_DATA",Ot="REMOVE_DASHBOARD_CARD",Et="START_REMOVE_DASHBOARD_CARD",Rt="START_ADD_DASHBOARD_CARD",vt="FINISH_ADD_DASHBOARD_CARD",St="FAILED_ADD_DASHBOARD_CARD",Ct="START_DASHBOARD_CARD_RPC",It="FINISH_DASHBOARD_CARD_RPC",mt="FAILED_DASHBOARD_CARD_RPC",jt="START_REFRESH_DASHBOARD_CARDS",Ht="FINISH_REFRESH_DASHBOARD_CARDS",wt="FAILED_REFRESH_DASHBOARD_CARDS",Tt="START_REFRESH_DASHBOARD_CARD",xt="FINISH_REFRESH_DASHBOARD_CARD",Bt="FAILED_REFRESH_DASHBOARD_CARD",Lt="START_QUERY_DASHBOARD_CARD",kt="FINISH_QUERY_DASHBOARD_CARD",Ft="FAILED_QUERY_DASHBOARD_CARD";const Pt=Object(be.a)(e=>Object.values(e.availableCards),e=>[e.availableCards]);function Vt(e,t){return e.availableCards[t]}const Nt=Object(be.a)((e,t)=>Object(O.find)(e.availableCards,e=>Object(O.get)(e,["_links","self",0,"href"])===t),e=>[e.availableCards]);function*Ut(){try{const e=yield I({path:"/ithemes-security/v1/dashboard-available-cards"});yield Ue(e)}catch(e){yield Ue([])}}function*qt(){yield Object(R.select)("ithemes-security/dashboard").getAvailableCards()}function*Qt(){yield Object(R.select)("ithemes-security/dashboard").getAvailableCards()}const Gt={byId:{},byDashboard:{},queryArgs:{},deleting:[],adding:[],rpcs:{},refreshingDashboards:[],querying:[]};const Mt=Object(be.a)((e,t)=>Object(O.map)(e.cards.byDashboard[t],t=>e.cards.byId[t]),(e,t)=>[e.cards.byDashboard[t],e.cards.byId]);function zt(e,t){return e.cards.byId[t]}function Wt(e,t){return Object(O.get)(e,["cards","byId",t,"settings"])}function Yt(e,t){return e.cards.queryArgs[t]}function $t(e,t){const r=Object(R.select)("ithemes-security/dashboard").getDashboardCard(t);if(r)return Object(R.select)("ithemes-security/dashboard").getAvailableCard(r.card)}function Jt(e,t,r){const n=Object(R.select)("ithemes-security/dashboard").getDashboardCards(t),a=[];for(const e of n)Object(O.get)(e,["_links","about",0,"href"])===r&&a.push(e);return a}function Zt(e,t,r){return!(!Object(R.select)("ithemes-security/dashboard").canEditDashboard(t)||!r)}function Xt(e,t){return De("getDashboardCards",t)}function Kt(e,t){return e.cards.refreshingDashboards.includes(t)}function er(e,t){return ge("getDashboardCards",t)}function tr(e,t){return e.cards.deleting.includes(t)}function rr(e,t){return e.cards.adding.includes(t)}function nr(e,t,r){return e.cards.rpcs[t]&&e.cards.rpcs[t].includes(r)}const ar=[];function dr(e,t){return e.cards.rpcs[t]||ar}function ir(e,t){return e.cards.querying.includes(t)}function*sr(e){const t=yield I({path:`/ithemes-security/v1/dashboards/${e}/cards?_embed=1`});yield Qe(e,t)}function*or(e){const t=Object(R.select)("ithemes-security/dashboard").getDashboardCard(e);t&&!Object(R.select)("ithemes-security/dashboard").getAvailableCard(t.card)&&Object(R.select)("ithemes-security/dashboard").getAvailableCards()}function ur(e){return{type:_r,page:"view-dashboard",attr:{id:e}}}function cr(){return{type:_r,page:"create-dashboard"}}function fr(){return{type:_r,page:"help"}}function lr(){return{type:Or}}function hr(){return{type:vr}}function br(){return{type:Sr}}function yr(e){return{type:Er,users:e}}function Dr(e){return{type:Rr,user:e}}function gr(e,t){return{type:Cr,stats:e,query:t}}function Ar(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:Ir,isUsing:e}}function pr(e,t){return{type:mr,slug:e,settings:t}}const _r="NAVIGATE",Or="NAVIGATE_BACK",Er="RECEIVE_SUGGESTED_SHARE_USERS",Rr="RECEIVE_USER",vr="OPEN_EDIT_CARDS",Sr="CLOSE_EDIT_CARDS",Cr="RECEIVE_STATIC_STATS",Ir="USING_TOUCH",mr="REGISTER_CARD",jr={view:{page:"",attr:{}},previousView:null,editingCards:!1,suggestedShareUsers:[],users:{byId:{}},staticStats:{data:{},query:{}},usingTouch:!1,cards:{}};function Hr(e){return e.app.view.page}function wr(e){return e.app.view.attr}function Tr(e){return"view-dashboard"===e.app.view.page&&e.app.view.attr.id}function xr(e){return e.app.suggestedShareUsers}function Br(e,t){return e.app.users.byId[t]}function Lr(e){return e.app.editingCards}function kr(e){return e.app.staticStats.data}function Fr(e){return e.app.usingTouch}function Pr(e,t){return e.app.cards[t]}var Vr=r("rl8x"),Nr=r.n(Vr);function*Ur(){const e=yield I({path:Object(H.addQueryArgs)("/wp/v2/users",{roles:"administrator"})});yield yr(e)}function*qr(e){const t=yield I({path:"/wp/v2/users/"+e});yield Dr(t)}const Qr={*fulfill(e){const t="/ithemes-security/v1/dashboard-static",r=yield I({path:Object(O.isEmpty)(e)?t:Object(H.addQueryArgs)(t,e)});yield gr(r,e)},isFulfilled:(e,t)=>Nr()(e.app.staticStats.query,t)};function Gr(e){return{type:zr,dashboardId:e}}function*Mr(e){const t=yield I({path:"/wp/v2/users/me",method:"PUT",data:{meta:{_itsec_primary_dashboard:e}}});yield Gr(t.meta._itsec_primary_dashboard)}const zr="RECEIVE_PRIMARY_DASHBOARD",Wr={primaryDashboard:void 0};function Yr(e){return e.user.primaryDashboard}function*$r(){const e=yield I({path:Object(H.addQueryArgs)("/wp/v2/users/me",{context:"edit"})});yield Gr(e.meta._itsec_primary_dashboard)}const Jr={reducer:Object(R.combineReducers)({dashboard:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:he,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case K:return{...e,byId:{...e.byId,...Object(O.keyBy)(t.dashboards,"id")},queries:{...e.queries,[t.queryId]:Object(O.map)(t.dashboards,e=>e.id)}};case ee:return{...e,byId:{...e.byId,[t.dashboard.id]:t.dashboard},queries:{...e.queries,available:e.queries.available.includes(t.dashboard.id)?e.queries.available:[...e.queries.available,t.dashboard.id]}};case te:return{...e,layouts:{...e.layouts,[t.dashboardId]:t.layout},savingLayouts:{...e.savingLayouts,[t.dashboardId]:!1}};case re:return{...e,savingLayouts:{...e.savingLayouts,[t.dashboardId]:!0}};case ne:return t.context?{...e,adding:[...e.adding,t.context]}:e;case ae:case de:return{...e,adding:e.adding.filter(e=>e!==t.context)};case ie:return{...e,saving:[...e.saving,t.dashboardId]};case se:case oe:return{...e,saving:e.saving.filter(e=>e!==t.dashboardId)};case le:return{...e,collectionHeaders:t.headers};case ue:return{...e,deleting:[...e.deleting,t.dashboardId]};case ce:return{...e,deleting:e.deleting.filter(e=>e!==t.dashboardId),byId:Object(O.omit)(e.byId,[t.dashboardId])};case fe:return{...e,deleting:e.deleting.filter(e=>e!==t.dashboardId)};default:return e}},availableCards:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case qe:return{...e,...Object(O.keyBy)(t.cards,"slug")};case gt:const r={};for(const n of t.cards)if(Object(O.has)(n,["_embedded","about",0])){const t=n._embedded.about[0].slug;e[t]||(r[t]=n._embedded.about[0])}return Object(O.isEmpty)(r)?e:{...e,...r};default:return e}},cards:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Gt,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case gt:return{...e,byId:{...e.byId,...Object(O.keyBy)(t.cards,"id")},byDashboard:{...e.byDashboard,[t.dashboardId]:Object(O.map)(t.cards,e=>e.id)}};case At:return{...e,byId:{...e.byId,[t.card.id]:t.card},byDashboard:{...e.byDashboard,[t.dashboardId]:e.byDashboard[t.dashboardId]&&e.byDashboard[t.dashboardId].includes(t.card.id)?e.byDashboard[t.dashboardId]:[...Object(O.get)(e,["byDashboard",t.dashboardId],[]),t.card.id]}};case pt:return{...e,queryArgs:{...e.queryArgs,[t.cardId]:t.queryArgs}};case _t:return{...e,byId:{...e.byId,[t.cardId]:{...e.byId[t.cardId],data:t.data,_links:t.links}}};case Et:return{...e,deleting:[...e.deleting,t.cardId]};case Ot:return{...e,byId:Object(O.omit)(e.byId,t.cardId),byDashboard:{...e.byDashboard,[t.dashboardId]:Object(O.filter)(e.byDashboard[t.dashboardId],e=>e!==t.cardId)},deleting:Object(O.filter)(e.deleting,e=>e!==t.cardId)};case Rt:return t.context?{...e,adding:[...e.adding,t.context]}:e;case vt:case St:return{...e,adding:e.adding.filter(e=>e!==t.context)};case Ct:return{...e,rpcs:{...e.rpcs,[t.cardId]:[...e.rpcs[t.cardId]||[],t.href]}};case It:case mt:return{...e,rpcs:{...e.rpcs,[t.cardId]:(e.rpcs[t.cardId]||[]).filter(e=>e!==t.href)}};case jt:return{...e,refreshingDashboards:[...e.refreshingDashboards,t.dashboardId]};case Ht:case wt:return{...e,refreshingDashboards:e.refreshingDashboards.filter(e=>e!==t.dashboardId)};case Lt:return{...e,querying:[...e.querying,t.cardId]};case kt:return{...e,querying:e.querying.filter(e=>e!==t.cardId)};default:return e}},app:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:jr,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case _r:return{...e,view:{page:t.page,attr:t.attr||{}},previousView:e.view};case Or:return{...e,view:e.previousView||jr.view,previousView:null};case Er:return{...e,suggestedShareUsers:t.users,users:{...e.users,byId:{...e.users.byId,...Object(O.keyBy)(t.users,"id")}}};case Rr:return{...e,users:{...e.users,byId:{...e.users.byId,[t.user.id]:t.user}}};case ae:return["create-dashboard-scratch","create-dashboard-default"].includes(t.context)?{...e,editingCards:!0,view:{page:"view-dashboard",attr:{id:t.created.id}}}:e;case vr:return{...e,editingCards:!0};case Sr:return{...e,editingCards:!1};case Cr:return{...e,staticStats:{data:t.stats,query:t.query}};case Ir:return{...e,usingTouch:t.isUsing};case mr:return{...e,cards:{...e.cards,[t.slug]:t.settings}};default:return e}},user:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Wr,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case zr:return{...e,primaryDashboard:t.dashboardId};default:return e}}}),controls:{...j},actions:{...n,...i,...s,...l,...y},selectors:{...a,...o,...c,...h,...D},resolvers:{...d,...u,...f,...b,...g}};Object(R.registerStore)("ithemes-security/dashboard",Jr);function Zr(e){let{type:t="secondary",...r}=e;return Object(_.createElement)(E.Fill,p()({name:"AdminBar"+Object(O.capitalize)(t)},r))}function Xr(e){let{type:t="secondary",...r}=e;return Object(_.createElement)(E.Slot,p()({name:"AdminBar"+Object(O.capitalize)(t)},r))}function Kr(e){return Object(_.createElement)(E.Fill,p()({name:"BelowToolbar"},e))}function en(e){return Object(_.createElement)(E.Slot,p()({name:"BelowToolbar"},e))}function tn(e){return Object(_.createElement)(E.Fill,p()({name:"EditCards"},e))}function rn(e){return Object(_.createElement)(E.Slot,p()({name:"EditCards"},e))}r.p=window.itsecWebpackPublicPath},GRId:function(e,t){!function(){e.exports=this.wp.element}()},Mmq9:function(e,t){!function(){e.exports=this.wp.url}()},Td6G:function(e,t,r){"use strict";r.d(t,"c",(function(){return y})),r.d(t,"b",(function(){return A})),r.d(t,"o",(function(){return _})),r.d(t,"m",(function(){return O})),r.d(t,"j",(function(){return E})),r.d(t,"e",(function(){return R})),r.d(t,"f",(function(){return v})),r.d(t,"d",(function(){return S})),r.d(t,"l",(function(){return C})),r.d(t,"a",(function(){return I})),r.d(t,"i",(function(){return m})),r.d(t,"h",(function(){return j})),r.d(t,"g",(function(){return H})),r.d(t,"k",(function(){return w})),r.d(t,"n",(function(){return T}));var n=r("YLtl"),a=r("GRId"),d=r("Mmq9"),i=r("lSNA"),s=r.n(i),o=r("92Nh"),u=r.n(o),c=r("tmk3"),f=r.n(c);function l(e,t,r){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,r)}var h=new WeakMap,b=new WeakMap;class y{constructor(){var e=this;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;l(this,h,{writable:!0,value:{}}),l(this,b,{writable:!0,value:{}}),s()(this,"add",(e,t)=>(f()(this,h)[e]||(f()(this,h)[e]=[]),f()(this,h)[e].push(t),this)),s()(this,"hasErrors",()=>this.getErrorCodes().length>0),s()(this,"getErrorCodes",()=>Object.keys(f()(this,h))),s()(this,"getErrorCode",()=>this.getErrorCodes()[0]),s()(this,"getErrorMessages",(function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;if(t)return f()(e,h)[t];const r=[];for(const t in f()(e,h))f()(e,h).hasOwnProperty(t)&&r.concat(f()(e,h)[t]);return r})),s()(this,"getErrorMessage",(function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;return t=t||e.getErrorCode(),e.getErrorMessages(t)[0]})),s()(this,"getErrorData",(function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;return t=t||e.getErrorCode(),f()(e,b)[t]})),s()(this,"getAllErrorMessages",()=>{const e=[];for(const t in f()(this,h))f()(this,h).hasOwnProperty(t)&&e.push(...f()(this,h)[t]);return e}),t&&(r&&(f()(this,h)[t]=[r]),n&&(f()(this,b)[t]=n))}static fromPHPObject(e){const t=new y;return u()(t,h,e.errors),u()(t,b,e.error_data),t}static fromApiError(e){const t=new y;if(f()(t,h)[e.code]=[e.message],f()(t,b)[e.code]=e.data,e.additional_errors)for(const r of e.additional_errors)f()(t,h)[r.code]=[r.message],f()(t,b)[r.code]=r.data;return t}}var D=r("l3Sj");class g extends Error{constructor(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];super(e.message||Object(D.__)("An unknown error occurred.","better-wp-security"),...r),Error.captureStackTrace&&Error.captureStackTrace(this,g),this.__response=e;for(const t in e)e.hasOwnProperty(t)&&Object.defineProperty(this,t,{value:e[t],configurable:!0,enumerable:!0,writable:!0})}toString(){return this.__response.toString()}getResponse(){return this.__response}}r("LhCv");class A{constructor(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],d=arguments.length>5&&void 0!==arguments[5]?arguments[5]:[];s()(this,"type",void 0),s()(this,"error",void 0),s()(this,"data",void 0),s()(this,"success",void 0),s()(this,"info",void 0),s()(this,"warning",void 0),this.type=e,this.error=t,this.data=r,this.success=n,this.info=a,this.warning=d,Object.seal(this)}isSuccess(){return this.type===A.SUCCESS}static async fromResponse(e){const t=t=>{var r;const n=null===(r=e.headers)||void 0===r?void 0:r.get("X-Messages-"+t);return n?JSON.parse(n):[]},r=204!==e.status&&e.json?await e.json():null,n=R(r),a=n.hasErrors()?A.ERROR:A.SUCCESS,d=t("Success"),i=t("Info"),s=t("Warning");return new A(a,n,r,d,i,s)}}Object.defineProperty(A,"SUCCESS",{value:"success",writable:!1,enumerable:!1,configurable:!1}),Object.defineProperty(A,"ERROR",{value:"error",writable:!1,enumerable:!1,configurable:!1});const p=Object(a.createContext)({getUrl(e){e="settings"===e?"itsec":"itsec-"+e;const t=Object(d.removeQueryArgs)(document.location.href,...Object.keys(Object(d.getQueryArgs)(document.location.href)));return Object(d.addQueryArgs)(t,{page:e})}});function _(e){const{getUrl:t}=Object(a.useContext)(p);return t(e)}function O(e){if(e<=999)return e.toString();if(e<=9999){const t=(e/1e3).toFixed(1);return"0"===t.charAt(t.length-1)?t.replace(".0","k"):t+"k"}if(e<=99999)return e.toString().substring(0,2)+"k";if(e<=999999)return e.toString().substring(0,3)+"k";if(e<=9999999){const t=(e/1e6).toFixed(1);return"0"===t.charAt(t.length-1)?t.replace(".0","m"):t+"m"}if(e<=99999999)return e.toString().substring(0,2)+"m";if(e<=999999999)return e.toString().substring(0,3)+"m";if(e<=9999999999){const t=(e/1e9).toFixed(1);return"0"===t.charAt(t.length-1)?t.replace(".0","b"):t+"b"}return e}function E(e){if(!Object(n.isPlainObject)(e))return!1;const t=Object.keys(e);return 2===t.length&&(t.includes("errors")&&t.includes("error_data"))}function R(e){return e instanceof y?e:E(e)?y.fromPHPObject(e):function(e){if(!Object(n.isPlainObject)(e))return!1;const t=Object.keys(e);return(3===t.length||4===t.length)&&(!(4===t.length&&!t.includes("additional_errors"))&&(t.includes("code")&&t.includes("message")&&t.includes("data")))}(e)?y.fromApiError(e):new y}function v(e){const t={};for(const[r,n]of e)t[r]=n;return t}function S(e,t){const r=[[],[]];for(const n of e)r[t(n)?0:1].push(n);return r}function C(e){if(e instanceof Error)throw e;throw new g(e)}const I="https://secure.gravatar.com/avatar/d7a973c7dab26985da5f961be7b74480?s=96&d=mm&f=y&r=g";function m(e,t){let r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return Object(n.get)(e,["_links","self",0,"targetHints",t],r?void 0:[])}function j(e){return function(e,t){return Object(n.get)(e,["_links",t,0,"href"])}(e,"self")}function H(e,t){if(e&&e.links)for(const r of e.links)if(r.rel===t)return r}function w(e,t){if("object"!==e.type)return e;let r;for(const a in t)t.hasOwnProperty(a)&&"hidden"===t[a]["ui:widget"]&&(r||(r=Object(n.cloneDeep)(e)),delete r.properties[a]);return r||e}function T(e){let t=[];if(!e)return t;const r=e instanceof y?e:R(Object(n.pick)(e,["code","message","data"]));return"rest_invalid_param"===r.getErrorCode()&&(t=Object.values(r.getErrorData().params)),[...r.getAllErrorMessages(),...t]}},YLtl:function(e,t){!function(){e.exports=this.lodash}()},Z6ex:function(e,t,r){"use strict";r.d(t,"c",(function(){return f})),r.d(t,"p",(function(){return l})),r.d(t,"o",(function(){return h})),r.d(t,"b",(function(){return b})),r.d(t,"d",(function(){return y})),r.d(t,"a",(function(){return D})),r.d(t,"n",(function(){return A})),r.d(t,"l",(function(){return p})),r.d(t,"m",(function(){return _})),r.d(t,"g",(function(){return O})),r.d(t,"e",(function(){return R})),r.d(t,"k",(function(){return v})),r.d(t,"j",(function(){return S})),r.d(t,"i",(function(){return C})),r.d(t,"f",(function(){return I})),r.d(t,"h",(function(){return m}));var n=r("YLtl"),a=r("4eJC"),d=r.n(a),i=r("1ZqX"),s=r("l3Sj"),o=r("g56x"),u=r("GRId"),c=r("Td6G");const f=Object(u.createContext)({canManage:!1,installType:""});function l(){return Object(u.useContext)(f)}function h(){const{canCreate:e,canEdit:t}=Object(i.useSelect)(e=>({canCreate:e("ithemes-security/dashboard").canCreateDashboards(),canEdit:e("ithemes-security/dashboard").canEditDashboard(e("ithemes-security/dashboard").getViewingDashboardId())}),[]);return e||t}const b=Object.freeze(["huge","wide","large","medium","mobile"]),y=Object.freeze({huge:8,wide:6,large:4,medium:2,mobile:1}),D=Object.freeze(b.reduce((e,t)=>({...e,[t]:250*y[t]+20*(y[t]-1)}),{})),g=["minW","minH","maxW","maxH"];function A(e,t){const r=Object(i.select)("ithemes-security/dashboard"),n={};for(const e in t){if(!t.hasOwnProperty(e))continue;const a=t[e];for(const t of a){const a=r.getDashboardCard(parseInt(t.i));a&&(n[a.id]?(n[a.id].size[e]={w:t.w,h:t.h},n[a.id].position[e]={x:t.x&&t.x!==1/0?t.x:0,y:t.y&&t.y!==1/0?t.y:0}):n[a.id]={id:a.id,card:a.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(n)}}function p(e,t,r){let{cards:a={}}=r;const d=Object(n.zipObject)(Object.keys(D),Object(n.times)(Object.keys(D).length,()=>[])),s={};for(const t of a){s[t.id]=!0;const r=Object(i.select)("ithemes-security/dashboard").getAvailableCard(t.card);if(r||"unknown"===t.card)for(const n of b)d[n].push(_(e,t,r,n,d[n]))}if(Object.keys(s).length<t.length)for(const r of t)if(!s[r.id]){const t=Object(i.select)("ithemes-security/dashboard").getAvailableCard(r.card);if(t)for(const n of b)d[n].push(_(e,r,t,n,d[n]))}return d}function _(e,t,r,a,d){if(!D[a])return;const s={i:t.id.toString(),x:Object(n.get)(t,["position",a,"x"]),y:Object(n.get)(t,["position",a,"y"]),w:Object(n.get)(t,["size",a,"w"],Object(n.get)(r,["size","defaultW"],1)),h:Object(n.get)(t,["size",a,"h"],Object(n.get)(r,["size","defaultH"],2))};if(r&&r.size)for(const e of g)r.size.hasOwnProperty(e)&&(s[e]=r.size[e]);if(s.minW&&s.minW>s.w&&(s.w=s.minW),s.minH&&s.minH>s.h&&(s.h=s.minH),s.maxW&&s.w>s.maxW&&(s.w=s.maxW),s.maxH&&s.h>s.maxH&&(s.h=s.maxH),d&&void 0===s.x&&void 0===s.x){const e=O(y[a],d,{w:s.w,h:s.h});e&&(s.x=e.x,s.y=e.y)}return s.x=void 0===s.x||null===s.x?0:s.x,s.y=void 0===s.y||null===s.y?1/0:s.y,Object(i.select)("ithemes-security/dashboard").canEditDashboard(e)||(s.static=!0),"unknown"===t.card&&(s.isResizable=!1),s.minW===s.maxW&&s.minH===s.maxH&&(s.isResizable=!1),s}function O(e,t,r){const n=[];for(const r of t){const{x:t,y:a,w:d,h:i}=r;for(let r=0;r<i;r++){n[r]||(n[r]=new Array(e).fill(0));for(let i=0;i<d;i++)n[r+a]||(n[r+a]=new Array(e).fill(0)),n[r+a][i+t]=1}}const{w:a,h:d}=r;for(let t=0;t<n.length;t++)e:for(let r=0;r<e;r++)if(!n[t]||1!==n[t][r]){for(let i=0;i<d;i++)for(let d=0;d<a;d++)if(t+i>n.length||r+d>=e||n[t+i]&&1===n[t+i][r+d])continue e;return{x:r,y:t}}return{x:0,y:n.length}}function E(e,t){return e.x===t.x&&e.y===t.y&&e.w===t.w&&e.h===t.h}const R=d()((function(e,t){if(e===t)return!0;if(Object.keys(e).length!==Object.keys(t).length)return!1;const r=new Map;for(let n=0;n<b.length;n++){const a=b[n];if(e[a]||t[a]){if(!e[a]&&t[a]||e[a]&&!t[a])return!1;if(e[a].length!==t[a].length)return!1;for(let t=0;t<e[a].length;t++)r.set(e[a][t].i,e[a][t]);for(let e=0;e<t[a].length;e++){const n=r.get(t[a][e].i);if(!n)return!1;if(!E(n,t[a][e]))return!1;r.delete(n.i)}if(r.size>0)return!1}}return!0}));const v=d()((function(e,t,r){const a=Object(n.keyBy)(t[r],"i"),d=[...e];return d.sort((function(e,t){const r=e.id.toString(),n=t.id.toString();if(!a[r]&&!a[n])return 0;if(a[r]&&!a[n])return 1;if(!a[r]&&a[n])return-1;const d=a[r].y,i=a[n].y,s=a[r].x,o=a[n].x;return d>i?1:d<i?-1:s>o?1:s<o?-1:0})),d}));const S=d()((function(e,t){const r=Object(n.keyBy)(t.cards,"id"),a=[...e];return a.sort((function(e,t){const n=e.id,a=t.id;if(!r[n]&&!r[a])return 0;if(r[n]&&!r[a])return 1;if(!r[n]&&r[a])return-1;const d=r[n].position.mobile.y,i=r[a].position.mobile.y,s=r[n].position.mobile.x,o=r[a].position.mobile.x;return d>i?1:d<i?-1:s>o?1:s<o?-1:0})),a}));function C(e,t){if(!t)return Object(s.__)("Unknown Card","better-wp-security");let r=t.label;return r=Object(o.applyFilters)("ithemes-security.dashboard.getCardTitle."+t.slug,r,e),Object(o.applyFilters)("ithemes-security.dashboard.getCardTitle",r,e,t)}function I(e,t,r,n){Object.entries(r).forEach(t=>{let[r,n]=t;return e[r]!==n&&console.log(`Prop '${r}' changed`)}),Object.entries(n).forEach(e=>{let[r,n]=e;return t[r]!==n&&console.log(`State '${r}' changed`)})}function m(e){return Object(n.get)(e,["avatar_urls",96],c.a)}},g56x:function(e,t){!function(){e.exports=this.wp.hooks}()},l3Sj:function(e,t){!function(){e.exports=this.wp.i18n}()},pPDe:function(e,t,r){"use strict";var n,a;function d(e){return[e]}function i(){var e={clear:function(){e.head=null}};return e}function s(e,t,r){var n;if(e.length!==t.length)return!1;for(n=r;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}n={},a="undefined"!=typeof WeakMap,t.a=function(e,t){var r,o;function u(){r=a?new WeakMap:i()}function c(){var r,n,a,d,i,u=arguments.length;for(d=new Array(u),a=0;a<u;a++)d[a]=arguments[a];for(i=t.apply(null,d),(r=o(i)).isUniqueByDependants||(r.lastDependants&&!s(i,r.lastDependants,0)&&r.clear(),r.lastDependants=i),n=r.head;n;){if(s(n.args,d,1))return n!==r.head&&(n.prev.next=n.next,n.next&&(n.next.prev=n.prev),n.next=r.head,n.prev=null,r.head.prev=n,r.head=n),n.val;n=n.next}return n={val:e.apply(null,d)},d[0]=null,n.args=d,r.head&&(r.head.prev=n,n.next=r.head),r.head=n,n.val}return t||(t=d),o=a?function(e){var t,a,d,s,o,u=r,c=!0;for(t=0;t<e.length;t++){if(a=e[t],!(o=a)||"object"!=typeof o){c=!1;break}u.has(a)?u=u.get(a):(d=new WeakMap,u.set(a,d),u=d)}return u.has(n)||((s=i()).isUniqueByDependants=c,u.set(n,s)),u.get(n)}:function(){return r},c.getDependants=t,c.clear=u,u(),c}},pVnL:function(e,t){function r(){return e.exports=r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,r.apply(this,arguments)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports},rl8x:function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},"tI+e":function(e,t){!function(){e.exports=this.wp.components}()},ywyh:function(e,t){!function(){e.exports=this.wp.apiFetch}()}},[["Akk5",0,1]]]);
dist/dashboard/dashboard--settings--go-pro.css ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @keyframes itsec-animation-fade-in-constant{from{opacity:0}to{opacity:1}}.itsec-log-modal .components-modal__frame{min-width:80%;height:100%}.itsec-log-modal .itsec-log-modal__content{margin:2em 1em}.itsec-log-modal .itsec-log-modal__content .itsec-log-raw-details-toggle{display:none}.itsec-log-modal .itsec-log-modal__content tr:first-child th,.itsec-log-modal .itsec-log-modal__content tr:first-child td{margin-top:0;padding-top:0}
2
+ @keyframes itsec-animation-fade-in-constant{from{opacity:0}to{opacity:1}}.itsec-site-scan-results h4{margin-top:5px}.itsec-site-scan-results .itsec-site-scan-details pre{background-color:#eaeaea;padding:1em;white-space:pre-wrap}.itsec-site-scan-results .itsec-site-scan-results-section{border:1px solid #ddd;border-bottom-color:transparent;padding:1em}.itsec-site-scan-results .itsec-site-scan-results-section>p{margin:0}.itsec-site-scan-results .itsec-site-scan-results-section:last-child{border-bottom-color:#ddd}.itsec-site-scan-results .itsec-site-scan__status{display:inline-block;padding:2px 6px;color:#fff;margin-right:1em;width:60px;text-align:center}.itsec-site-scan-results .itsec-site-scan__status.itsec-site-scan__status--clean{background:#7ad03a}.itsec-site-scan-results .itsec-site-scan__status.itsec-site-scan__status--warn{background:#dd3d36}.itsec-site-scan-results .itsec-site-scan__status.itsec-site-scan__status--error{background:#dd3d36}.itsec-site-scan-results .itsec-site-scan__details ul{margin-left:2.5em;list-style:disc outside}.itsec-site-scan-results .itsec-site-scan__details .itsec-site-scan__detail{width:100%;margin-bottom:.25em;padding-bottom:.5em;color:inherit;border-bottom:1px solid #ddd}.itsec-site-scan-results .itsec-site-scan__details .itsec-site-scan__detail:last-child{border:none}.itsec-site-scan-results .itsec-site-scan__details .itsec-site-scan__detail.itsec-site-scan__detail--warn{color:#dd3d36}.itsec-site-scan-results .itsec-site-scan__details .itsec-site-scan__detail.itsec-site-scan__detail--error{color:#dd3d36}.itsec-site-scan-results .itsec-site-scan__details .itsec-site-scan__detail.itsec-site-scan__detail--clean{color:#7ad03a}.itsec-site-scan-results .itsec-site-scan__details .itsec-site-scan__detail span{color:#444}.itsec-site-scan-results .itsec-site-scan-toggle-details{margin-left:1em}
3
+ @keyframes itsec-animation-fade-in-constant{from{opacity:0}to{opacity:1}}.itsec-component-print-r{background:#f1f1f1;overflow:scroll;padding:1em;color:#000;font-family:"Courier New",Courier,monospace;font-size:12px;white-space:pre-wrap;text-align:left;max-width:100%}
4
+ @keyframes itsec-animation-fade-in-constant{from{opacity:0}to{opacity:1}}.itsec-close-button.components-button.has-icon{padding:0;height:20px;position:absolute;right:1em;top:1em}.itsec-close-button.components-button.has-icon:hover{opacity:.5;box-shadow:none !important}.components-popover.is-mobile .itsec-close-button.components-button.has-icon{display:none}
5
+ @keyframes itsec-animation-fade-in-constant{from{opacity:0}to{opacity:1}}.itsec-loader{margin:0 auto;display:flex;align-items:center;justify-content:center;height:100%}.itsec-loader svg{animation:itsec-loader__grow 3s infinite ease-in}@keyframes itsec-loader__grow{0%{transform:scale(0)}100%{transform:scale(1);opacity:0}}
6
+ @keyframes itsec-animation-fade-in-constant{from{opacity:0}to{opacity:1}}.itsec-spinner{width:var(--itsec-size, 40px);height:var(--itsec-size, 40px);position:relative}.itsec-spinner *{width:100%;height:100%;border-radius:50%;background-color:var(--itsec-color, #71747d);opacity:.6;position:absolute;top:0;left:0;animation:itsec-spinner-bounce 2s infinite ease-in-out;transition:opacity 400ms}.itsec-spinner *:nth-child(2){animation-delay:-1s}.itsec-spinner.itsec-spinner--paused *{animation-play-state:paused;opacity:0}@keyframes itsec-spinner-bounce{0%,100%{transform:scale(0)}45%,55%{transform:scale(1)}}
7
+ @keyframes itsec-animation-fade-in-constant{from{opacity:0}to{opacity:1}}.components-base-control>ul.components-hierarchical-checkbox-control__group{padding-left:0}ul.components-hierarchical-checkbox-control__group{padding-left:1em;margin:0}.components-hierarchical-checkbox-control__group .components-hierarchical-checkbox-control__option{list-style-type:none}.components-hierarchical-checkbox-control__group .components-hierarchical-checkbox-control__option:last-child{margin-bottom:0}.components-hierarchical-checkbox-control__option--has-children{margin-bottom:1em}.components-hierarchical-checkbox-control__option--has-children>.components-base-control{font-weight:bold}
8
+ @keyframes itsec-animation-fade-in-constant{from{opacity:0}to{opacity:1}}.itsec-module-settings-notice-list .notice .notice__action{margin-left:.5em}.itsec-module-settings-notice-list{position:relative;padding-bottom:1em;font-size:13px}.itsec-module-settings-notice-list:empty{display:none}.itsec-module-settings-content .components-editor-notices__snackbar{position:fixed;bottom:100px;padding-left:16px;padding-right:16px;width:max-content}.itsec-module-settings-content .components-snackbar{width:max-content}
9
+ @keyframes itsec-animation-fade-in-constant{from{opacity:0}to{opacity:1}}.components-form-toggle__input:disabled+.components-form-toggle__track{opacity:.5}
10
+ @keyframes itsec-animation-fade-in-constant{from{opacity:0}to{opacity:1}}.components-checkbox-control__input[type=checkbox].components-checkbox-control__input--indeterminate{background:var(--wp-admin-theme-color);border-color:var(--wp-admin-theme-color)}.components-checkbox-control__input[type=checkbox].components-checkbox-control__input--indeterminate::-ms-check{opacity:0}.components-checkbox-control__input[type=checkbox].components-checkbox-control__input--indeterminate::before{content:none}
11
+ @keyframes itsec-animation-fade-in-constant{from{opacity:0}to{opacity:1}}.itsec-chip-control{position:relative}.itsec-chip-control input{opacity:0;position:absolute;width:100%;height:100%}.itsec-chip-control label{display:inline-flex;align-items:center;color:#0081e3;background:#fff;border:1px solid #0081e3;border-radius:12px;padding:2px 8px}.itsec-chip-control label:after{content:"";font-family:dashicons;display:inline-block;line-height:1;font-weight:400;font-style:normal;speak:never;text-decoration:inherit;text-transform:none;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;width:20px;height:20px;font-size:20px;vertical-align:top;text-align:center;transition:color .1s ease-in;color:#fff;background:#0081e3;margin-left:4px;margin-right:-5px;border-radius:10px}.itsec-chip-control input:checked+label{color:#fff;background:#0081e3;border-color:transparent}.itsec-chip-control input:checked+label:after{content:"";color:#0081e3;background:#fff}.itsec-chip-control input:focus+label{box-shadow:inset 0 0 0 1px #fff,0 0 0 2px var(--wp-admin-theme-color);outline:3px solid transparent;border-color:#fff}
12
+ @keyframes itsec-animation-fade-in-constant{from{opacity:0}to{opacity:1}}.itsec-tab-panel--styled .components-tab-panel__tabs{display:grid;grid-gap:.5rem;grid-template-columns:1fr 1fr;align-items:stretch;justify-content:flex-start;border-bottom:1px solid #e2e4e7;box-sizing:content-box;padding:16px 24px}@media(min-width: 600px){.itsec-tab-panel--styled .components-tab-panel__tabs{display:flex;padding-top:0;padding-bottom:0}}.itsec-tab-panel__tab.components-button{cursor:pointer;font-weight:600;justify-content:center;align-items:center;outline-offset:-1px;border-radius:0;color:#71747d;padding:6px 12px;height:auto;margin:0}.itsec-tab-panel__tab.components-button:hover,.itsec-tab-panel__tab.components-button:focus{box-shadow:none !important;outline:none}.itsec-tab-panel__tab.components-button.is-active,.itsec-tab-panel__tab.components-button:hover{color:#fff;background:#0081e3;border-radius:2px}@media(min-width: 600px){.itsec-tab-panel__tab.components-button{border-bottom:2px solid transparent;padding:10px 0;margin:0 12px -1.5px;text-transform:uppercase}.itsec-tab-panel__tab.components-button:first-child{margin-left:0}.itsec-tab-panel__tab.components-button.is-active,.itsec-tab-panel__tab.components-button:hover{color:#0081e3;border-bottom-color:#0081e3;background:none}}
13
+ @keyframes itsec-animation-fade-in-constant{from{opacity:0}to{opacity:1}}.itsec-tree .components-base-control__label{margin-bottom:8px}.itsec-tree [role=tree]{margin:0}.itsec-tree [role=tree] [role=group]{display:none}.itsec-tree [role=tree] [aria-expanded=true]>[role=group]{display:block}.itsec-tree [role=tree] ul{margin-left:1rem}.itsec-tree [role=tree] [aria-selected=true]>span{background:#dcebf3}
14
+ @keyframes itsec-animation-fade-in-constant{from{opacity:0}to{opacity:1}}.itsec-message-list{display:flex;padding:.75rem .5rem;border-radius:4px;margin-bottom:1rem}.itsec-message-list::before{content:"";font-family:dashicons;display:inline-block;line-height:1;font-weight:400;font-style:normal;speak:never;text-decoration:inherit;text-transform:none;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;width:20px;height:20px;font-size:20px;vertical-align:top;text-align:center;transition:color .1s ease-in;margin-right:.5rem}.itsec-message-list.itsec-message-list h3{font-size:1.25rem;margin:0 0 .5rem 0}.itsec-message-list ul{margin:0}.itsec-message-list li{margin:0 0 .25rem 0}.itsec-message-list li:last-child{margin-bottom:0}.itsec-message-list .components-button{margin-left:auto;padding:0;min-width:0;min-height:0;height:min-content}.itsec-message-list.itsec-message-list--type-error{background:#f7abab}.itsec-message-list.itsec-message-list--type-error.itsec-message-list--has-border{border:1px solid #551515}.itsec-message-list.itsec-message-list--type-error::before{content:"";color:#551515}.itsec-message-list.itsec-message-list--type-error h3,.itsec-message-list.itsec-message-list--type-error li,.itsec-message-list.itsec-message-list--type-error .components-button,.itsec-message-list.itsec-message-list--type-error .dashicon{color:#551515}.itsec-message-list.itsec-message-list--type-error .components-button .dashicon{margin-left:0;margin-right:0}.itsec-message-list.itsec-message-list--type-error .components-button:hover,.itsec-message-list.itsec-message-list--type-error .components-button:hover .dashicon{color:#0081e3}.itsec-message-list.itsec-message-list--type-info{background:#ecfaff}.itsec-message-list.itsec-message-list--type-info.itsec-message-list--has-border{border:1px solid #005169}.itsec-message-list.itsec-message-list--type-info::before{content:"";color:#005169}.itsec-message-list.itsec-message-list--type-info h3,.itsec-message-list.itsec-message-list--type-info li,.itsec-message-list.itsec-message-list--type-info .components-button,.itsec-message-list.itsec-message-list--type-info .dashicon{color:#005169}.itsec-message-list.itsec-message-list--type-info .components-button .dashicon{margin-left:0;margin-right:0}.itsec-message-list.itsec-message-list--type-info .components-button:hover,.itsec-message-list.itsec-message-list--type-info .components-button:hover .dashicon{color:#0081e3}.itsec-message-list.itsec-message-list--type-warning{background:#fdddcd}.itsec-message-list.itsec-message-list--type-warning.itsec-message-list--has-border{border:1px solid #a9582e}.itsec-message-list.itsec-message-list--type-warning::before{content:"";color:#a9582e}.itsec-message-list.itsec-message-list--type-warning h3,.itsec-message-list.itsec-message-list--type-warning li,.itsec-message-list.itsec-message-list--type-warning .components-button,.itsec-message-list.itsec-message-list--type-warning .dashicon{color:#a9582e}.itsec-message-list.itsec-message-list--type-warning .components-button .dashicon{margin-left:0;margin-right:0}.itsec-message-list.itsec-message-list--type-warning .components-button:hover,.itsec-message-list.itsec-message-list--type-warning .components-button:hover .dashicon{color:#0081e3}.itsec-message-list.itsec-message-list--type-success{background:#ddf1e2}.itsec-message-list.itsec-message-list--type-success.itsec-message-list--has-border{border:1px solid #237739}.itsec-message-list.itsec-message-list--type-success::before{content:"";color:#237739}.itsec-message-list.itsec-message-list--type-success h3,.itsec-message-list.itsec-message-list--type-success li,.itsec-message-list.itsec-message-list--type-success .components-button,.itsec-message-list.itsec-message-list--type-success .dashicon{color:#237739}.itsec-message-list.itsec-message-list--type-success .components-button .dashicon{margin-left:0;margin-right:0}.itsec-message-list.itsec-message-list--type-success .components-button:hover,.itsec-message-list.itsec-message-list--type-success .components-button:hover .dashicon{color:#0081e3}.itsec-message-list.itsec-message-list--recommended::before{--itsec-recommended-icon-padding: calc(var(--itsec-recommended-icon-size, 20px) / 5);content:"";font-family:dashicons;display:inline-block;line-height:1;font-weight:400;font-style:normal;speak:never;text-decoration:inherit;text-transform:none;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;width:var(--itsec-recommended-icon-size, 20px);height:var(--itsec-recommended-icon-size, 20px);font-size:var(--itsec-recommended-icon-size, 20px);vertical-align:top;text-align:center;transition:color .1s ease-in;font-size:calc(var(--itsec-recommended-icon-size, 20px) - (var(--itsec-recommended-icon-padding) * 2));border-radius:50%;padding:var(--itsec-recommended-icon-padding);padding-left:calc(var(--itsec-recommended-icon-padding) + .5px);background:#0081e3;color:#fff}
15
+ @keyframes itsec-animation-fade-in-constant{from{opacity:0}to{opacity:1}}.itsec-accordion .itsec-accordion__panel{display:none}.itsec-accordion .itsec-accordion__header--is-expanded+.itsec-accordion__panel{display:block}.itsec-accordion.itsec-accordion--styled .itsec-accordion__header{margin:0;padding:0}.itsec-accordion.itsec-accordion--styled .itsec-accordion__header:not(:last-child){border-bottom:1px solid #e5eaee}.itsec-accordion.itsec-accordion--styled .itsec-accordion__header .components-button{display:grid;grid-template-areas:"toggle title graphic" "description description description";grid-template-columns:min-content auto min-content;justify-content:stretch;grid-gap:0 .25rem;padding:.5rem;background:#fff;height:auto;width:100%;color:#bfbfbf;border:2px solid transparent;transition:none}@media(min-width: 600px){.itsec-accordion.itsec-accordion--styled .itsec-accordion__header .components-button{display:flex;padding:1rem 1rem 1rem .25rem}}.itsec-accordion.itsec-accordion--styled .itsec-accordion__header .components-button:focus{box-shadow:none;border-color:var(--wp-admin-theme-color)}.itsec-accordion.itsec-accordion--styled .itsec-accordion__header .itsec-accordion__header-title{grid-area:title;font-size:1rem;line-height:1.4;font-weight:700;color:#71747d;width:auto;text-align:left;padding-right:.75rem}@media(min-width: 600px){.itsec-accordion--has-description.itsec-accordion.itsec-accordion--styled .itsec-accordion__header .itsec-accordion__header-title{width:180px}}.itsec-accordion.itsec-accordion--styled .itsec-accordion__header .itsec-accordion__header-description{grid-area:description;color:#71747d;text-align:left;font-size:1rem;width:100%}@media(min-width: 600px){.itsec-accordion.itsec-accordion--styled .itsec-accordion__header .itsec-accordion__header-description{width:min-content;flex-grow:1}}.itsec-accordion.itsec-accordion--styled .itsec-accordion__header.itsec-accordion__header--has-graphic .itsec-accordion__header-description{padding-right:.75rem}.itsec-accordion.itsec-accordion--styled .itsec-accordion__header .dashicon:first-child{grid-area:toggle}.itsec-accordion.itsec-accordion--styled .itsec-accordion__header .components-spinner,.itsec-accordion.itsec-accordion--styled .itsec-accordion__header .itsec-spinner,.itsec-accordion.itsec-accordion--styled .itsec-accordion__header .itsec-accordion__header-icon{grid-area:graphic;margin:0 0 0 auto;flex-shrink:0}.itsec-accordion.itsec-accordion--styled .itsec-accordion__header .itsec-accordion__header-icon{font-size:30px;width:30px;height:30px}.itsec-accordion.itsec-accordion--styled .itsec-accordion__header.itsec-accordion__header--is-expanded .itsec-accordion__header-title,.itsec-accordion.itsec-accordion--styled .itsec-accordion__header:hover .itsec-accordion__header-title{color:#0a1a23}.itsec-accordion.itsec-accordion--styled .itsec-accordion__header:hover:not(.itsec-accordion__header--is-expanded) .components-button .dashicon:first-child{transform:rotate(-90deg)}.itsec-accordion.itsec-accordion--styled .itsec-accordion__header.itsec-accordion__header--is-expanded .components-button,.itsec-accordion.itsec-accordion--styled .itsec-accordion__header.itsec-accordion__header--is-expanded .components-button:focus{z-index:2;box-shadow:0 2px 6px rgba(0,0,0,.25)}.itsec-accordion.itsec-accordion--styled .itsec-accordion__panel--is-expanded+.itsec-accordion__header{border-top:1px solid #e5eaee}.itsec-accordion.itsec-accordion--styled .itsec-accordion__panel--is-expanded+.itsec-accordion__header .components-button,.itsec-accordion.itsec-accordion--styled .itsec-accordion__panel--is-expanded+.itsec-accordion__header .components-button:focus{z-index:2;box-shadow:0 2px 6px rgba(0,0,0,.25);-webkit-clip-path:inset(-6px 0 0 0);clip-path:inset(-6px 0 0 0)}.itsec-accordion.itsec-accordion--styled .itsec-accordion__panel--is-expanded{padding:1rem calc(32px + .25rem)}
16
+ @keyframes itsec-animation-fade-in-constant{from{opacity:0}to{opacity:1}}.itsec-icon-popover__trigger.components-button.has-icon{height:auto;margin:0 4px;padding:0 !important;min-width:0}.itsec-icon-popover__trigger.components-button.has-icon .dashicon{margin:0}.itsec-icon-popover.components-popover:not(.is-without-arrow)::after{border-bottom-color:#0081e3}.itsec-icon-popover.components-popover .components-popover__content{min-width:300px;border-top:8px solid #0081e3}.itsec-icon-popover.components-popover .components-popover__content p{margin:0;padding:.5rem}
17
+ @keyframes itsec-animation-fade-in-constant{from{opacity:0}to{opacity:1}}.itsec-help-popover.components-popover .components-popover__content footer{padding:.5rem;font-size:.6rem;border-top:1px solid #e5eaee;text-align:right}.itsec-help-popover.components-popover .components-popover__content .components-button{height:auto;margin:0;padding:0}.itsec-help-popover.components-popover .components-popover__content .components-button .dashicon{margin-right:0}.itsec-help-popover.components-popover .components-popover__content .components-button:focus{outline:none;box-shadow:none}
18
+ @keyframes itsec-animation-fade-in-constant{from{opacity:0}to{opacity:1}}@media(min-width: 600px){.itsec-help-list-section.components-surface>div,.itsec-help-list-section:not(.components-surface){display:grid;grid-template-columns:165px auto;min-height:200px}}.itsec-help-list-section header{z-index:2}.itsec-help-list-section header a{padding:1rem;color:#71747d;height:100%;display:flex;align-items:center;justify-content:center;text-decoration:none;border-bottom:1px solid #e5eaee}@media(min-width: 600px){.itsec-help-list-section header a{padding:.5rem;flex-direction:column;border-bottom:none;border-right:1px solid #e5eaee}}.itsec-help-list-section header a .itsec-help-list-section__icon{color:#bfbfbf;font-size:40px;height:auto;width:auto;padding:1rem;border:1px solid #71747d;border-radius:10px}.itsec-help-list-section header a h3{margin:0 auto 0 .5rem;color:#71747d;text-transform:uppercase;font-weight:700;font-size:1rem}@media(min-width: 600px){.itsec-help-list-section header a h3{margin:.5rem 0}}.itsec-help-list-section header a .itsec-help-list-section__more{color:#bfbfbf}.itsec-help-list-section header a:hover{text-decoration:none}.itsec-help-list-section.itsec-help-list-section--has-content header a{color:#0081e3;box-shadow:0 2px 6px rgba(0,0,0,.25)}.itsec-help-list-section.itsec-help-list-section--has-content header a .itsec-help-list-section__icon{color:#0081e3;border-color:#0081e3}.itsec-help-list-section.itsec-help-list-section--has-content header a h3{color:#0a1a23}.itsec-help-list-section.itsec-help-list-section--has-content header a .itsec-help-list-section__more{color:#0081e3}.itsec-help-list-section.itsec-help-list-section--has-content header a:hover .itsec-help-list-section__icon{color:#fff;background:#0081e3}.itsec-help-list-section section article:not(:last-child) a{border-bottom:1px solid #e5eaee}.itsec-help-list-section section a{padding:1rem;display:block;text-decoration:none}.itsec-help-list-section section a h4{color:#0081e3;font-weight:400;text-transform:none}.itsec-help-list-section section a p{margin-top:.5rem}.itsec-help-list-section section a:hover,.itsec-help-list-section section a:focus{background:#dcebf3;outline:none;box-shadow:none}.itsec-help-list-section section a:hover h4,.itsec-help-list-section section a:focus h4{color:#0081e3}.itsec-help-list-section:not(.itsec-help-list-section--has-content) section{display:flex;align-items:center;justify-content:center}.itsec-help-list-section:not(.itsec-help-list-section--has-content) section p{color:#71747d;font-size:1rem;font-weight:300;padding:1rem 0}.itsec-help-list__enable-modal footer{margin:24px -24px -24px;padding:12px 24px;border-top:1px solid #ddd;display:flex;align-items:center;justify-content:flex-end}.itsec-help-list__enable-modal footer .components-button{margin-left:1rem}
19
+ @keyframes itsec-animation-fade-in-constant{from{opacity:0}to{opacity:1}}.itsec-split-button{display:inline-flex;align-items:center}.itsec-split-button .itsec-split-button__main{border-radius:0}.itsec-split-button .itsec-split-button__dropdown{display:inline-flex}.itsec-split-button .itsec-split-button__dropdown .components-button{border-radius:0}.is-small.itsec-split-button .itsec-split-button__dropdown .components-button{width:30px;min-width:0}
dist/dashboard/dashboard--settings--go-pro.js ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ (window.itsecWebpackJsonP=window.itsecWebpackJsonP||[]).push([[2,13],{"+VN0":function(e,t,c){},"/RNi":function(e,t,c){var n=c("cDcd");function a(e){return n.createElement("svg",e,[n.createElement("g",{fill:"#0083E3",key:0},[n.createElement("path",{d:"M102.41 40.58V8h-.001c0-.95-.77-1.73-1.71-1.74 0 0-37.21-6.04-49.62-6.26 -12.41-.22-49.3 6-49.3 6v0C.8 5.97.01 6.73-.01 7.69c-.01.01-.01.02-.01.04v32.84s-1.16 27.36 17.44 48.9c16.52 19.13 30.32 23.66 33.2 24.44v0c.36.07.74.07 1.11 0 2.92-.79 16.7-5.35 33.18-24.44 18.6-21.54 17.48-48.9 17.48-48.9Zm-25 43c-11.21 13-20.79 18.57-25.67 20.8v0c-.37.13-.78.13-1.14 0 -4.84-2.29-14.43-7.88-25.6-20.85C8.49 64.45 9.15 39.45 9.16 39.19v-25 0c.01-.37.25-.68.6-.78l0-.001c13.46-3.41 27.28-5.15 41.17-5.2h.71l0 0c13.82 0 27.6 1.74 41 5.18l-.001-.001c.34.1.58.41.6.78v25.06c.03.22.68 25.22-15.78 44.3Z",key:0}),n.createElement("path",{d:"M51.1 31.87v0c-4.9-.02-8.88 3.93-8.89 8.82 -.02 4.89 3.93 8.87 8.82 8.88 4.89.01 8.87-3.94 8.88-8.83 0-.01 0-.01 0-.01l-.001-.001c0-4.89-3.95-8.86-8.83-8.88Z",key:1}),n.createElement("path",{d:"M84.1 39.41v-18 0c-.02-.35-.26-.65-.59-.73v-.001c-10.48-2.19-21.16-3.28-31.86-3.28H51h-.001c-10.76.05-21.47 1.17-32 3.34v0c-.34.08-.58.38-.59.73v18.07c0 1.33 0 22.31 13.59 38 7.53 8.82 14.14 13.76 18.7 16.46h-.001c.31.15.68.15 1 0 4.53-2.69 11.14-7.63 18.77-16.46 13.94-16.11 13.63-37.88 13.63-38.13ZM63.51 71.6c-1.09 1.28-2.16 2.45-3.2 3.54 -.24.25-.43.17-.43-.18V67.4c0-5.72 5.55-8.63 7.38-9.43v0c.33-.16.56-.49.58-.86v-5.74h0c.03-.21-.11-.41-.32-.44 -.1-.02-.19 0-.27.05l-.001 0c-10.4 4.1-21.97 4.1-32.36.01v0c-.19-.11-.43-.05-.54.14 -.04.07-.06.15-.05.23v5.74 0c.02.36.25.69.59.84 6.08 2.33 7.32 6.29 7.32 9.52v7.42c0 .35-.19.43-.43.18q-1.53-1.6-3.16-3.48c-11.44-13.26-11.37-31.84-11.37-32v-10.6 0c.01-.36.27-.66.62-.72h0c7.6-1.2 15.29-1.81 23-1.83h.69v-.001c7.59 0 15.18.58 22.69 1.76v0c.35.06.61.36.62.72v10.3c-.001.35.11 19.08-11.38 32.37Z",key:2}),n.createElement("path",{d:"M133 86.24v0c.03 1.17-.23 2.34-.75 3.4v0c-.48.89-1.17 1.66-2 2.23v0c-.9.58-1.89.99-2.92 1.23v0c-1.14.26-2.29.39-3.45.39h-2.76v8.68h-5.56v-23h8.45v0c1.18-.01 2.37.11 3.53.37v-.001c1.02.21 1.99.62 2.86 1.21l0-.001c.81.55 1.47 1.3 1.92 2.18v0c.48 1.03.72 2.16.68 3.31Zm-5.56 0h0c.01-.47-.1-.93-.33-1.33v0c-.21-.35-.52-.63-.87-.81v0c-.4-.21-.82-.34-1.26-.39v0c-.48-.07-.96-.11-1.44-.1h-2.44v5.43h2.34v0c.49 0 .99-.05 1.49-.13v0c.45-.08.88-.24 1.29-.46v0c.36-.2.67-.5.89-.86v0c.21-.41.3-.87.28-1.32Z",key:3}),n.createElement("path",{d:"M145.11 90.37v0c-.23-.07-.47-.12-.7-.13h-.66l0-.001c-.63-.03-1.25.11-1.81.39v0c-.46.22-.86.54-1.17.94v-.001c-.29.35-.51.76-.63 1.2v0c-.13.36-.19.74-.2 1.13v8.3h-5.33v-16.2h5.14v2.34h.06v0c.4-.81 1.01-1.5 1.76-2v0c.77-.53 1.69-.81 2.63-.79v0c.21-.02.42-.02.64 0v0c.16.01.33.04.5.09Z",key:4}),n.createElement("path",{d:"M164.07 94v0c.01 1.23-.23 2.46-.72 3.6v0c-.45 1.03-1.12 1.96-1.95 2.73v-.001c-.84.75-1.81 1.34-2.86 1.74h-.001c-2.25.81-4.7.81-6.94-.001v-.001c-1.06-.4-2.03-.99-2.86-1.74v0c-.83-.77-1.49-1.7-1.94-2.73v0c-.49-1.14-.73-2.37-.71-3.6v0c-.02-1.23.22-2.45.71-3.58v0c.45-1.03 1.11-1.95 1.94-2.7v0c.82-.76 1.8-1.35 2.86-1.72v0c2.24-.78 4.69-.78 6.94-.001v0c1.05.37 2.02.94 2.86 1.69h0c.83.74 1.5 1.67 1.95 2.7v0c.49 1.13.74 2.36.72 3.61Zm-5.14 0v0c0-.53-.09-1.04-.26-1.53v0c-.17-.49-.42-.93-.75-1.31v0c-.34-.39-.75-.71-1.2-.93v0c-1.54-.77-3.4-.39-4.5.93h-.001c-.33.38-.57.82-.72 1.31v0c-.32.99-.32 2.06 0 3.06v0c.15.49.4.94.73 1.35v0c.32.41.73.75 1.21 1v0c1.05.47 2.25.47 3.31 0v0c.47-.25.88-.59 1.21-1v0c.32-.41.57-.86.73-1.35v0c.15-.5.23-1.02.24-1.53Z",key:5})]),n.createElement("g",{fill:"#002338",key:1},[n.createElement("path",{d:"M121 17.21v0c0 .39-.08.79-.24 1.16v0c-.32.71-.9 1.27-1.63 1.54l-.001 0c-1.15.46-2.46.21-3.36-.63v-.001c-.58-.54-.9-1.29-.88-2.07v0c-.01-.39.07-.77.23-1.12v-.001c.14-.36.36-.67.65-.92v-.001c.29-.28.63-.49 1-.64v0c.76-.32 1.62-.32 2.39 0v0c.73.26 1.31.82 1.63 1.54v0c.14.36.22.74.21 1.14Zm-5.72 18.66V22.39h5.33v13.48Z",key:0}),n.createElement("path",{d:"M135 17.59v18.28h-5.6V17.59h-6.5v-4.74h18.57v4.74Z",key:1}),n.createElement("path",{d:"M153.79 35.87v-8.78 0c0-.44-.03-.87-.09-1.3v0c-.06-.39-.19-.76-.38-1.09v0c-.18-.31-.43-.57-.73-.75v0c-.36-.2-.77-.29-1.17-.27v-.001c-.84-.05-1.65.33-2.15 1v-.001c-.52.71-.78 1.57-.74 2.45v8.75h-5.34V11.28h5.34v10.43h.06v0c.43-.72 1.03-1.31 1.76-1.72v0c.87-.53 1.87-.79 2.89-.76v0c.96-.03 1.91.17 2.78.59v0c.71.35 1.33.87 1.82 1.51v0c.47.63.81 1.36 1 2.13v-.001c.2.78.31 1.58.31 2.4v10Z",key:2}),n.createElement("path",{d:"M179.26 28v.65 -.001c.01.2.01.41 0 .62h-11.78v-.001c.04.43.18.85.41 1.23v-.001c.22.38.52.72.88 1v-.001c.36.27.77.48 1.2.64l-.001-.001c.44.14.91.22 1.38.22v0c.74.02 1.48-.14 2.15-.47v0c.56-.3 1.05-.71 1.43-1.22l3.71 2.34v0c-.76 1.1-1.79 1.98-3 2.56v-.001c-1.37.61-2.85.92-4.34.89h-.001c-1.18 0-2.35-.19-3.45-.57v-.001c-1.06-.38-2.03-.97-2.85-1.73l0 0c-.84-.74-1.49-1.66-1.92-2.68v0c-.49-1.16-.73-2.4-.7-3.64l-.001-.001c-.02-1.24.21-2.46.68-3.6l0 0c.42-1.03 1.05-1.96 1.85-2.73l0 0c.8-.76 1.74-1.35 2.77-1.74v0c1.1-.42 2.27-.63 3.45-.61v0c1.12-.02 2.23.19 3.28.6v0c.98.38 1.86.97 2.59 1.74l-.001-.001c.73.79 1.3 1.73 1.67 2.76v0c.42 1.2.62 2.46.59 3.74Zm-4.91-2v0c.01-.81-.28-1.58-.8-2.18v0c-.63-.65-1.5-.98-2.39-.91v0c-.49-.01-.98.07-1.43.24l0-.001c-.42.15-.81.38-1.14.67v-.001c-.33.27-.6.61-.78 1v0c-.2.36-.31.77-.33 1.19Z",key:3}),n.createElement("path",{d:"M203.25 35.87V27h-.001c0-.45-.03-.89-.09-1.32v0c-.06-.39-.18-.76-.36-1.09v0c-.17-.3-.41-.56-.7-.73v0c-.35-.21-.75-.31-1.15-.28v0c-.42-.01-.83.09-1.19.29v0c-.34.19-.63.46-.85.78v0c-.24.34-.4.72-.5 1.13h0c-.11.42-.17.86-.16 1.31v8.75h-5.34v-9.2 0c.04-.78-.15-1.56-.55-2.22v0c-.41-.56-1.08-.87-1.76-.81v0c-.8-.05-1.56.33-2 1V24.6c-.49.72-.74 1.59-.7 2.47v8.78h-5.37V19.67h5.17v2.24h.07v0c.2-.36.45-.7.73-1v-.001c.3-.34.66-.63 1.06-.86l-.001 0c.43-.26.89-.47 1.38-.6l-.001 0c.54-.16 1.1-.24 1.67-.23h0c1.04-.04 2.08.21 3 .72v0c.81.46 1.47 1.16 1.9 2l-.001-.001c.52-.83 1.23-1.51 2.08-2l0-.001c.94-.53 2.01-.79 3.09-.75v0c.96-.04 1.91.17 2.78.6v0c.71.37 1.33.9 1.81 1.56v0c.45.65.79 1.37 1 2.15V23.5c.19.75.3 1.53.31 2.32v10Z",key:4}),n.createElement("path",{d:"M228.68 28v.65 0c.01.2.01.41 0 .62h-11.77l0-.001c.04.43.18.85.41 1.23v-.001c.22.38.52.72.88 1v0c.36.27.76.48 1.2.64v0c.44.14.91.22 1.38.22v0c.74.02 1.48-.14 2.15-.47v0c.56-.3 1.05-.72 1.43-1.22l3.71 2.34v0c-.76 1.1-1.8 1.98-3 2.56h-.001c-1.37.61-2.85.91-4.34.89v0c-1.18 0-2.35-.19-3.45-.57l-.001-.001c-1.05-.37-2.02-.93-2.85-1.66l0-.001c-.83-.75-1.48-1.66-1.91-2.68v0c-.49-1.16-.73-2.4-.7-3.64v0c-.02-1.24.21-2.46.68-3.6l0 0c.42-1.03 1.05-1.96 1.85-2.73v0c.8-.76 1.74-1.35 2.77-1.74v0c1.09-.42 2.26-.63 3.44-.61v0c1.12-.02 2.24.19 3.29.6v0c.97.38 1.85.97 2.57 1.74l-.001-.001c.73.79 1.3 1.73 1.67 2.76v0c.4 1.17.6 2.42.59 3.67Zm-4.91-2v-.001c.01-.8-.27-1.58-.79-2.18v-.001c-.63-.65-1.5-.98-2.39-.91v0c-.49-.01-.98.07-1.43.24v0c-.42.15-.81.38-1.14.67l-.001-.001c-.33.27-.6.61-.78 1v0c-.2.36-.31.77-.33 1.19Z",key:5}),n.createElement("path",{d:"M241.53 24.46l-.001-.001c-.46-.42-.97-.76-1.53-1v-.001c-.58-.29-1.21-.44-1.85-.43h0c-.48-.01-.95.09-1.38.3v-.001c-.55.22-.81.85-.58 1.39 .11.28.34.5.63.6v0c.73.27 1.49.48 2.26.65v0c.62.13 1.24.31 1.84.55l-.001-.001c.59.23 1.16.54 1.67.94v0c.49.39.9.88 1.21 1.44v0c.31.61.46 1.3.45 2v0c.05 1.71-.81 3.32-2.26 4.24v-.001c-.68.46-1.43.8-2.22 1v0c-.82.19-1.65.28-2.48.29h0c-1.32-.01-2.63-.22-3.88-.63v-.001c-1.19-.38-2.27-1.02-3.17-1.87l3-3.16v-.001c.5.51 1.09.92 1.75 1.22v0c.68.34 1.44.52 2.21.52v0c.44-.01.88-.11 1.28-.31v-.001c.41-.2.67-.63.64-1.08v0c0-.51-.32-.95-.79-1.11v0c-.79-.33-1.6-.58-2.43-.75h0c-.58-.14-1.15-.31-1.7-.52l-.001-.001c-.55-.22-1.06-.51-1.51-.88v-.001c-.45-.38-.83-.84-1.09-1.36v0c-.3-.61-.44-1.28-.42-1.95v0c-.03-.88.18-1.74.62-2.49v0c.4-.67.94-1.25 1.59-1.68v0c.66-.45 1.38-.79 2.16-1v0c.77-.2 1.56-.3 2.36-.3h0c1.2 0 2.4.18 3.56.56v-.001c1.11.33 2.14.92 3 1.71Z",key:6}),n.createElement("path",{d:"M127.65 52v0c-.5-.63-1.15-1.12-1.87-1.44v0c-.7-.35-1.46-.53-2.23-.54v0c-.38-.01-.76.03-1.12.1v0c-.36.06-.7.18-1 .37v-.001c-.31.18-.57.42-.76.72h0c-.23.33-.33.72-.31 1.12v0c-.03.35.06.69.25 1h-.001c.18.28.42.51.71.69v0c.35.2.73.38 1.12.53 .44.17.92.33 1.47.51 .78.26 1.59.55 2.44.86v0c.82.3 1.59.72 2.3 1.25v0c.69.52 1.28 1.18 1.73 1.94v0c.47.87.71 1.86.68 2.87v0c.03 1.18-.22 2.36-.73 3.43v0c-.48.94-1.16 1.75-2 2.39v0c-.85.64-1.81 1.11-2.83 1.4v0c-1.07.3-2.18.46-3.28.46v-.001c-1.64 0-3.26-.29-4.78-.86v0c-1.45-.53-2.77-1.37-3.84-2.46l3.64-3.71v0c.61.73 1.37 1.32 2.23 1.74v0c.84.44 1.79.68 2.75.7v0c.4 0 .8-.05 1.2-.13l-.001-.001c.35-.08.69-.22 1-.42v0c.29-.2.52-.47.69-.78v0c.18-.37.27-.77.26-1.17v0c.01-.4-.1-.79-.32-1.11v0c-.26-.34-.58-.62-.93-.83v0c-.48-.28-.98-.51-1.49-.68l-2-.67v0c-.74-.24-1.46-.52-2.16-.84l-.001-.001c-.69-.32-1.33-.74-1.88-1.25v0c-.57-.53-1.03-1.16-1.34-1.86v0c-.36-.84-.53-1.75-.5-2.65v0c-.04-1.15.23-2.28.78-3.28v-.001c.48-.89 1.17-1.66 2-2.24v-.001c.86-.61 1.83-1.04 2.86-1.29v0c1.05-.28 2.13-.41 3.22-.41h-.001c1.36 0 2.71.25 4 .72v0c1.31.45 2.52 1.17 3.56 2.11Z",key:7}),n.createElement("path",{d:"M150.48 61.12v.65 0c.01.2.01.41 0 .62H138.7v0c.04.43.18.86.41 1.24v0c.23.36.53.68.88.95v0c.36.27.76.49 1.2.64v0c.44.15.91.22 1.38.23v0c.74.02 1.48-.15 2.15-.48v0c.56-.3 1.05-.71 1.43-1.22l3.71 2.35v0c-.76 1.1-1.8 1.97-3 2.55v0c-1.37.62-2.85.92-4.34.89v0c-1.18 0-2.35-.19-3.45-.57v0c-1.05-.36-2.02-.92-2.84-1.65v-.001c-.84-.75-1.49-1.67-1.92-2.69v0c-.49-1.16-.73-2.4-.7-3.64v0c-.02-1.24.21-2.46.68-3.59v0c.42-1.03 1.05-1.96 1.86-2.73v0c.79-.76 1.73-1.36 2.76-1.74v0c1.1-.43 2.27-.64 3.45-.62v0c1.12-.02 2.23.19 3.28.6v0c.97.38 1.85.97 2.57 1.74v0c.73.79 1.3 1.73 1.67 2.76v0c.42 1.19.62 2.44.6 3.71Zm-4.91-2v0c.01-.81-.28-1.58-.8-2.18v0c-.63-.65-1.5-.98-2.39-.91v0c-.49-.01-.98.07-1.43.25v0c-.42.14-.81.37-1.14.66v-.001c-.33.27-.59.61-.78 1l-.001-.001c-.2.36-.31.77-.33 1.19Z",key:8}),n.createElement("path",{d:"M165 58.06v0c-.34-.41-.76-.74-1.24-.94v0c-.5-.24-1.05-.36-1.59-.36v0c-.53-.01-1.06.11-1.53.34v0c-.45.22-.85.54-1.17.92v0c-.34.38-.59.83-.76 1.31l-.001-.001c-.2.51-.29 1.05-.28 1.6v0c-.01.54.08 1.07.26 1.59v0c.16.48.42.93.76 1.32l-.001 0c.33.37.74.67 1.21.89v0c.49.22 1.03.33 1.58.33v0c.55-.01 1.09-.12 1.61-.31v0c.49-.19.93-.5 1.28-.9l3 3.61v0c-.75.69-1.64 1.21-2.6 1.53v0c-1.09.37-2.24.55-3.38.55v0c-1.24.03-2.48-.16-3.65-.54v-.001c-1.07-.37-2.06-.95-2.89-1.71v0c-.83-.77-1.48-1.69-1.93-2.71v-.001c-.49-1.15-.73-2.38-.7-3.61l0-.001c-.03-1.23.21-2.45.7-3.58v0c.45-1.03 1.1-1.96 1.93-2.72v-.001c.84-.76 1.82-1.35 2.89-1.72v-.001c1.13-.41 2.34-.61 3.55-.6h0c.58-.01 1.16.05 1.74.16v0c.56.1 1.11.25 1.66.44v-.001c.51.17 1 .39 1.46.68v0c.42.25.81.55 1.16.9Z",key:9}),n.createElement("path",{d:"M180.82 69v-2.22h-.07 0c-.43.79-1.08 1.44-1.87 1.88v0c-.45.25-.92.44-1.4.59v-.001c-.53.15-1.07.23-1.61.23v0c-.95.02-1.89-.18-2.74-.59v0c-.72-.36-1.35-.88-1.83-1.51v0c-.47-.64-.81-1.35-1-2.11v0c-.21-.8-.32-1.61-.31-2.43v-10h5.36v8.78 0c0 .43.03.86.1 1.3v0c.05.38.18.75.37 1.1v0c.17.31.42.58.74.77v-.001c.36.2.78.29 1.2.28v0c.83.05 1.63-.33 2.13-1v0c.49-.72.75-1.57.73-2.43v-8.81H186v16.17Z",key:10}),n.createElement("path",{d:"M200.62 57.22h0c-.23-.07-.47-.12-.7-.13h-.67v0c-.63-.02-1.24.11-1.8.38v-.001c-.46.24-.86.58-1.17 1v0c-.29.35-.51.76-.63 1.2v0c-.13.36-.2.74-.2 1.13v8.2h-5.33V52.84h5.14v2.34h.06v0c.4-.81 1.01-1.5 1.76-2v0c.77-.54 1.69-.81 2.63-.79v0c.2-.02.42-.02.63 0v0c.17.01.34.04.51.09Z",key:11}),n.createElement("path",{d:"M218.41 56.8V63v0c-.05.6.1 1.2.44 1.71v0c.4.42.98.63 1.57.57h-.001c.27-.01.55-.03.83-.06l0-.001c.25-.05.51-.12.75-.22l.06 3.9h-.001c-.46.15-.93.27-1.4.35v0c-.56.09-1.13.13-1.69.14v0c-.93.02-1.86-.11-2.73-.4h0c-.68-.24-1.29-.65-1.77-1.18v0c-.48-.53-.82-1.15-1-1.82h-.001c-.21-.78-.31-1.58-.29-2.37v-6.82h-2.58v-4h2.57v-4.23h5.24v4.26h3.8v4Z",key:12}),n.createElement("path",{d:"M233.85 71.46h-.001c-.29.78-.66 1.54-1.08 2.26v0c-.39.63-.88 1.2-1.44 1.69v0c-.59.48-1.27.84-2 1.06v-.001c-.86.25-1.76.37-2.65.36v0c-.52-.01-1.03-.04-1.54-.1l0 0c-.47-.06-.93-.15-1.38-.26l.58-4.49v0c.28.09.56.16.86.21l-.001-.001c.28.05.57.08.87.08h-.001c.64.05 1.28-.15 1.78-.56v0c.42-.47.74-1.02.95-1.61l.52-1.34 -6.72-15.93h5.92l3.61 10.4h.1l3.22-10.4h5.66Z",key:13}),n.createElement("path",{d:"M208.78 50.57v-.001c0 .39-.08.78-.24 1.15v-.001c-.16.34-.38.66-.65.93l0-.001c-.59.54-1.36.84-2.16.84v0c-.82.02-1.6-.29-2.18-.86v-.001c-.58-.54-.9-1.28-.88-2.06v0c.01-.76.32-1.48.88-2v-.001c.29-.27.63-.49 1-.64v0c.38-.17.79-.25 1.21-.24l0-.001c.4 0 .8.07 1.18.23v0c.37.13.71.34 1 .62v0c.27.26.49.57.65.92v-.001c.13.35.2.73.19 1.11Zm-5.72 18.65V55.74h5.33v13.48Z",key:14})])])}a.defaultProps={viewBox:"0 0 244.46 113.98"},e.exports=a,a.default=a},"40Gr":function(e,t,c){},"49++":function(e,t,c){"use strict";c.d(t,"t",(function(){return E})),c.d(t,"r",(function(){return k})),c.d(t,"c",(function(){return Z})),c.d(t,"u",(function(){return C})),c.d(t,"e",(function(){return H})),c.d(t,"m",(function(){return R})),c.d(t,"q",(function(){return K})),c.d(t,"d",(function(){return J})),c.d(t,"s",(function(){return Q})),c.d(t,"w",(function(){return $})),c.d(t,"f",(function(){return Y})),c.d(t,"v",(function(){return se})),c.d(t,"g",(function(){return te})),c.d(t,"x",(function(){return ve})),c.d(t,"y",(function(){return oe})),c.d(t,"b",(function(){return me})),c.d(t,"j",(function(){return ue})),c.d(t,"p",(function(){return pe})),c.d(t,"i",(function(){return fe})),c.d(t,"a",(function(){return be})),c.d(t,"n",(function(){return ke})),c.d(t,"l",(function(){return _e})),c.d(t,"k",(function(){return je})),c.d(t,"o",(function(){return Ce})),c.d(t,"h",(function(){return Le}));var n=c("lSNA"),a=c.n(n),r=c("GRId"),s=c("tI+e"),l=c("l3Sj");c("6ECA");r.Component;var i=c("Td6G"),o=c("TSYQ"),v=c.n(o),h=c("YLtl"),d=c("K9lf");function m(e){let{id:t,isVisible:c,children:n}=e;return Object(r.createElement)("div",{className:"itsec-site-scan__details",id:t,style:{display:c?"block":"none"}},Object(r.createElement)("ul",null,n))}var u=Object(d.compose)([Object(d.withState)({isShowing:!1}),d.withInstanceId])((function(e){let t,{type:c,status:n,description:a,isShowing:i,setState:o,instanceId:d,children:u}=e;switch(n){case"clean":t=Object(l.__)("Clean","better-wp-security");break;case"warn":t=Object(l.__)("Warn","better-wp-security");break;case"error":t=Object(l.__)("Error","better-wp-security");break;default:t=n}const p=Object(r.createElement)("span",{className:"itsec-site-scan__status itsec-site-scan__status--"+n},t);return Object(r.createElement)("div",{className:v()("itsec-site-scan-results-section",`itsec-site-scan-results-${c}-section`)},Object(h.isEmpty)(u)?Object(r.createElement)("p",null,p," ",a):Object(r.createElement)(r.Fragment,null,Object(r.createElement)("p",null,p,a,Object(r.createElement)(s.Button,{isLink:!0,className:"itsec-site-scan-toggle-details",onClick:()=>o({isShowing:!i}),"aria-expanded":i,"aria-controls":"itsec-site-scan__details--"+d},i?Object(l.__)("Hide Details","better-wp-security"):Object(l.__)("Show Details","better-wp-security"))),Object(r.createElement)(m,{id:"itsec-site-scan__details--"+d,isVisible:i},u)))}));var p=function(e){let{results:t,showErrorDetails:c=!1}=e;const n=t;return Object(r.createElement)(u,{status:"error",description:Object(l.__)("The scan failed to properly scan the site.","better-wp-security")},Object(r.createElement)("p",null,Object(l.sprintf)(Object(l.__)("Error Message: %s","better-wp-security"),n.getErrorMessage())),Object(r.createElement)("p",null,Object(l.sprintf)(Object(l.__)("Error Code: %s","better-wp-security"),n.getErrorCode())),c&&n.getErrorData()&&Object(r.createElement)(r.Fragment,null,Object(r.createElement)("p",null,Object(l.__)("If you contact support about this error, please provide the following debug details:","better-wp-security")),Object(r.createElement)("pre",null,JSON.stringify({code:n.getErrorCode(),data:n.getErrorData()},null,2))))};function f(e){let{status:t,children:c}=e;return Object(r.createElement)("li",{className:"itsec-site-scan__detail itsec-site-scan__detail--"+t},Object(r.createElement)("span",null,c))}var b=function(e){let{results:t}=e;return t.errors.length>0&&Object(r.createElement)(u,{type:"system-error",status:"error",description:Object(l.__)("The scan failed to properly scan the site.","better-wp-security")},t.errors.map((e,t)=>Object(r.createElement)(f,{key:t,status:"error"},e.message)))};var y=function(e){let{results:t,entry:c}=e,n=Object(h.get)(t,["_embedded","ithemes-security:site-scan-issues",0],[]);return Object(h.isArray)(n)||(n=[]),Object(r.createElement)(u,{type:"malware",status:c.status,description:c.title},n.filter(e=>e.entry===c.slug).map((e,t)=>Object(r.createElement)(f,{key:t,status:e.status},Object(r.createElement)("a",{href:e.link},e.description))))};c("oaS/");var E=function(e){let{results:t,showSiteUrl:c=!0,showErrorDetails:n=!0}=e;const a=t.url;let s;return Object(i.j)(t)?s=Object(i.e)(t):"error"===t.code&&(s=Object(i.e)(t.errors[0])),Object(r.createElement)("div",{className:"itsec-site-scan-results"},c&&a&&Object(r.createElement)("h4",null,Object(l.sprintf)(Object(l.__)("Site: %s","better-wp-security"),a)),s?Object(r.createElement)(p,{results:s,showErrorDetails:n}):Object(r.createElement)(r.Fragment,null,Object(r.createElement)(b,{results:t}),t.entries.map((e,c)=>Object(r.createElement)(y,{results:t,entry:e,key:c}))))};c("bJT+");function k(e){let{json:t}=e;return Object(r.createElement)("pre",{className:"itsec-component-print-r"},function e(t){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(Object(h.isString)(t))return 0===t.length?Object(r.createElement)("strong",null,"[empty string]"):t;if(Object(h.isNumber)(t))return Object(r.createElement)("strong",null,"[number] "+t);if(Object(h.isBoolean)(t))return Object(r.createElement)("strong",null,t?"[boolean] true":"[boolean] false");if(null==t)return Object(r.createElement)("strong",null,"null");if(Object(h.isArray)(t)||Object(h.isPlainObject)(t)){const s=[];if(a&&s.push(Object(r.createElement)("strong",{key:"header"},"Array")),0===Object(h.size)(t))return s.push("()"),s;if(n===c)return s.push(`(${t.length})`),s;let l=0;for(const e of Object(h.keys)(t))e.length>l&&(l=e.length);const i=g(n);return Object(h.forEach)(t,(t,a)=>{s.push(Object(r.createElement)(r.Fragment,{key:a},"\n",i,a,g(l-Object(h.toString)(a).length," ")," ",Object(r.createElement)("strong",null,"=>")," ",e(t,c,n+1)))}),s}return Object(r.createElement)("strong",null,"[*]")}(Object(h.cloneDeep)(t)))}function g(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:" ",c="";for(let n=0;n<=e;n++)c+=t;return c}var _=c("cDcd"),O=c("6JX1");const j=Object(_.lazy)(()=>Promise.all([c.e(8),c.e(35)]).then(c.bind(null,"QDav")));function M(){return Object(r.createElement)("span",null,Object(l.__)("Error when loading. Please refresh.","better-wp-security"))}function Z(e){let{addErrorBoundary:t=!0,...c}=e;const n=Object(r.createElement)(_.Suspense,{fallback:Object(r.createElement)(s.Spinner,null)},Object(r.createElement)(j,c));return t?Object(r.createElement)(O.ErrorBoundary,{FallbackComponent:M},n):n}const N=()=>{};class w extends r.Component{constructor(e){super(e),this.state={isHovering:!1},this.onMouseEnter=this.onMouseEnter.bind(this),this.onMouseLeave=this.onMouseLeave.bind(this),this.onMouseOver=this.onMouseOver.bind(this),this.onMouseOut=this.onMouseOut.bind(this),this.setIsHovering=this.setIsHovering.bind(this),this.unsetIsHovering=this.unsetIsHovering.bind(this),this.componentWillUnmount=this.componentWillUnmount.bind(this),this.timerIds=[]}onMouseEnter(e){this.props.onMouseEnter({e:e,setIsHovering:this.setIsHovering,unsetIsHovering:this.unsetIsHovering})}onMouseLeave(e){this.props.onMouseLeave({e:e,setIsHovering:this.setIsHovering,unsetIsHovering:this.unsetIsHovering})}onMouseOver(e){this.props.onMouseOver({e:e,setIsHovering:this.setIsHovering,unsetIsHovering:this.unsetIsHovering})}onMouseOut(e){this.props.onMouseOut({e:e,setIsHovering:this.setIsHovering,unsetIsHovering:this.unsetIsHovering})}componentWillUnmount(){this.clearTimers()}setIsHovering(){this.clearTimers();const e=setTimeout(()=>{const e={isHovering:!0};this.setState(e,()=>{this.props.onHoverChanged(e)})},this.props.hoverDelayInMs);this.timerIds.push(e)}unsetIsHovering(){this.clearTimers();const e=setTimeout(()=>{const e={isHovering:!1};this.setState(e,()=>{this.props.onHoverChanged(e)})},this.props.hoverOffDelayInMs);this.timerIds.push(e)}clearTimers(){const e=this.timerIds;for(;e.length;)clearTimeout(e.pop())}render(){const{children:e,className:t}=this.props;return Object(r.createElement)("div",{className:t,onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave,onMouseOver:this.onMouseOver,onMouseOut:this.onMouseOut},e)}}a()(w,"displayName","HoverDetector"),a()(w,"defaultProps",{hoverDelayInMs:0,hoverOffDelayInMs:0,onHoverChanged:N,onMouseEnter:e=>{let{setIsHovering:t}=e;return t()},onMouseLeave:e=>{let{unsetIsHovering:t}=e;return t()},onMouseOver:N,onMouseOut:N,shouldDecorateChildren:!0});c("QxRw");c("JVTk"),c("lSb6");c("6a02");function C(e){let{size:t,color:c,paused:n}=e;const a={};return t&&(a["--itsec-size"]=Object(h.isNumber)(t)?t+"px":t),c&&(a["--itsec-color"]=Object(h.startsWith)(c,"--")?`var(${c})`:c),Object(r.createElement)("div",{style:a,className:v()("itsec-spinner",{"itsec-spinner--paused":n})},Object(r.createElement)("div",null),Object(r.createElement)("div",null))}var x=c("pVnL"),I=c.n(x);function H(e){let t,c,{value:n,onChange:a,options:l,label:i,help:o,disabled:d,readOnly:m,className:u}=e;return Object(h.isArray)(n)?(t=e=>n.includes(e.value),c=e=>t=>a(t?[...n,e.value]:n.filter(t=>t!==e.value))):(t=e=>n[e.value]||!1,c=e=>t=>a({...n,[e.value]:t})),Object(r.createElement)("fieldset",{className:v()("components-base-control",u)},Object(r.createElement)("div",{className:"components-base-control__field"},Object(r.createElement)("legend",{className:"components-base-control__label"},i),o&&Object(r.createElement)("p",{className:"components-base-control__help"},o),Object(r.createElement)("div",{className:"itsec-components-checkbox-group-control__options"},l.map(e=>Object(r.createElement)(s.CheckboxControl,I()({},Object(h.omit)(e,["value","disabled","readOnly"]),{key:e.value,checked:t(e),onChange:c(e),disabled:d||e.disabled,readOnly:m||e.readOnly,className:t(e)&&"itsec-components-checkbox-group-control__option--is-checked"}))))))}var S=c("4eJC"),V=c.n(S);c("Dfre");let L,D;L=Symbol.iterator;class T{constructor(e,t,c){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];a()(this,"tree",void 0),a()(this,"name",void 0),a()(this,"data",void 0),a()(this,"parent",void 0),a()(this,"children",void 0),this.tree=e,this.name=t,this.data=c,this.parent=n,this.children=r}getParent(){return this.parent?this.tree.nodes[this.parent]:null}getAllParents(){const e=[];let t=this.getParent();for(;t;)e.push(t.name),t=t.getParent();return e}hasChildren(){return this.children.length>0}getAllChildren(){const e=[];if(!this.hasChildren())return e;for(const t of this)e.push(t.name,...t.getAllChildren());return e}*[L](){for(let e=0;e<this.children.length;e++){const t=this.children[e];yield this.tree.nodes[t]}}}D=Symbol.iterator;class P{constructor(){a()(this,"nodes",{}),a()(this,"ordered",[])}add(e,t){let c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this.ordered.push(e),this.nodes[e]?(this.nodes[e].data=t,this.nodes[e].parent=c):this.nodes[e]=new T(this,e,t,c),c&&(this.nodes[c]?this.nodes[c].children.push(e):this.nodes[c]=new T(this,c))}*[D](){for(let e=0;e<this.ordered.length;e++){const t=this.ordered[e];this.nodes[t].parent||(yield this.nodes[t])}}}const A=V()(e=>{const t=new P;for(const c of e)t.add(c.value,c,c.parent);return t});class B extends r.Component{constructor(){super(...arguments),a()(this,"props",void 0),this.renderOption=this.renderOption.bind(this),this.isChecked=this.isChecked.bind(this),this.isIndeterminate=this.isIndeterminate.bind(this),this.onChange=this.onChange.bind(this)}indeterminate(e){e.indeterminate=!0}isChecked(e){return!!e&&(Object(h.isArray)(this.props.value)?this.props.value.includes(e.name)||this.isChecked(e.getParent()):this.props.value[e.name]||this.isChecked(e.getParent()))}isIndeterminate(e){if(!e.hasChildren())return!1;for(const t of e){if(this.isChecked(t))return!0;if(this.isIndeterminate(t))return!0}return!1}onChange(e,t){const c=[e.name,...e.getAllChildren()],n=t?[]:e.getAllParents();if(Object(h.isArray)(this.props.value)){let e;e=t?[...this.props.value,...c]:this.props.value.filter(e=>!c.includes(e)&&!n.includes(e)),this.props.onChange(e)}else this.props.onChange({...this.props.value,...c.reduce((e,c)=>e[c]=t,{}),...n.reduce((e,t)=>e[t]=!1,{})})}render(){const{label:e,help:t,options:c}=this.props,n=A(c);return Object(r.createElement)("div",{className:"components-base-control"},Object(r.createElement)("div",{className:"components-base-control__field"},Object(r.createElement)("div",{className:"components-base-control__label"},e),t&&Object(r.createElement)("p",{className:"components-base-control__help"},t)),Object(r.createElement)("ul",{className:"components-hierarchical-checkbox-control__group"},Array.from(n,this.renderOption)))}renderOption(e){const{value:t,selectable:c=!0,...n}=e.data,a=this.isChecked(e),s=!a&&this.isIndeterminate(e);return Object(r.createElement)("li",{key:t,className:v()("components-hierarchical-checkbox-control__option",{"components-hierarchical-checkbox-control__option--has-children":e.hasChildren()})},Object(r.createElement)(J,I()({},n,{checked:!!c&&a,disabled:!c||this.props.disabled,indeterminate:s,onChange:t=>this.onChange(e,t)})),e.hasChildren()&&Object(r.createElement)("ul",{className:"components-hierarchical-checkbox-control__group"},Array.from(e,this.renderOption)))}}var R=B,F=c("1ZqX");var K=Object(d.compose)([Object(F.withSelect)((e,t)=>{let{context:c="ithemes-security"}=t;return{notices:e("core/notices").getNotices(c)}}),Object(F.withDispatch)((e,t)=>{let{context:c="ithemes-security"}=t;return{onRemove:t=>e("core/notices").removeNotice(t,c)}})])((function(e){let{notices:t,onRemove:c}=e;const n=Object(h.filter)(t,e=>e.isDismissible&&(!e.type||"default"===e.type)),a=Object(h.filter)(t,e=>!(e.isDismissible||e.type&&"default"!==e.type)),l=Object(h.filter)(t,{type:"snackbar"});return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(s.NoticeList,{notices:a,className:"components-editor-notices__pinned"}),Object(r.createElement)(s.NoticeList,{notices:n,className:"components-editor-notices__dismissible",onRemove:c}),s.SnackbarList&&Object(r.createElement)(s.SnackbarList,{notices:l,className:"components-editor-notices__snackbar",onRemove:c}))}));var W=function(e){let{className:t,status:c,children:n,onRemove:a=h.noop,isDismissible:i=!0,actions:o=[]}=e;const d=v()(t,"notice","notice-alt","notice-"+c,{"is-dismissible":i});return Object(r.createElement)("div",{className:d},Object(r.createElement)("p",null,n,o.map((e,t)=>{let{className:c,label:n,onClick:l,url:i,isLink:o=!1}=e;return Object(r.createElement)(s.Button,{key:t,href:i,isSmall:!o&&!i,isLink:o||i,onClick:i?void 0:()=>{a(),l()},className:v()("notice__action",c)},n)})),i&&Object(r.createElement)("button",{type:"button",className:"notice-dismiss",onClick:a},Object(r.createElement)("span",{className:"screen-reader-text"},Object(l.__)("Dismiss this notice","better-wp-security"))))};c("+VN0");Object(d.compose)([Object(F.withSelect)((e,t)=>{let{context:c="ithemes-security"}=t;return{notices:e("core/notices").getNotices(c)}}),Object(F.withDispatch)((e,t)=>{let{context:c="ithemes-security"}=t;return{onRemove:t=>e("core/notices").removeNotice(t,c)}})])((function(e){let{notices:t,onRemove:c}=e;const n=function(e){if(!s.SnackbarList)return e.length;let t=0;for(const c of e)"snackbar"!==c.type&&t++;return t}(t),a=function(e){const t=Object(r.useRef)();return Object(r.useEffect)(()=>{t.current=e}),t.current}(n);Object(r.useEffect)(()=>{n>a&&window.itsecSettingsPage&&window.itsecSettingsPage.scrollTop()},[n,a]);const l=s.SnackbarList?Object(h.filter)(t,{type:"snackbar"}):[];return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("div",{className:"itsec-module-settings-notice-list"},t.map(e=>{return"snackbar"===e.type&&s.SnackbarList?null:Object(r.createElement)(W,I()({},Object(h.omit)(e,["content"]),{key:e.id,onRemove:(t=e.id,()=>c(t))}),e.content);var t})),s.SnackbarList&&Object(r.createElement)(s.SnackbarList,{notices:l,className:"components-editor-notices__snackbar",onRemove:c}))})),c("DfSy");class U extends r.Component{constructor(){super(...arguments),this.onChange=this.onChange.bind(this)}onChange(e){this.props.onChange&&this.props.onChange(e.target.checked)}render(){const{label:e,checked:t,help:c,instanceId:n,...a}=this.props,l="inspector-toggle-control-"+n;let i,o;return c&&(i=l+"__help",o=Object(h.isFunction)(c)?c(t):c),Object(r.createElement)(s.BaseControl,{id:l,help:o,className:"components-toggle-control"},Object(r.createElement)(s.FormToggle,I()({},a,{id:l,checked:t,onChange:this.onChange,"aria-describedby":i})),Object(r.createElement)("label",{htmlFor:l,className:"components-toggle-control__label"},e))}}Object(d.withInstanceId)(U);var q=c("iClF"),G=c("RMJe"),z=c("Babz");c("IXp0");function J(e){let{id:t,label:c,hideLabelFromVision:n,className:a,heading:l,checked:i,help:o,onChange:h,indeterminate:m,...u}=e;const p=Object(d.useInstanceId)(J);t=t||"itsec-inspector-checkbox-control-"+p;return Object(r.createElement)(s.BaseControl,{label:l,id:t,help:o,className:a},Object(r.createElement)("span",{className:"components-checkbox-control__input-container"},Object(r.createElement)("input",I()({id:t,className:v()("components-checkbox-control__input",{"components-checkbox-control__input--indeterminate":m}),type:"checkbox",value:"1",onChange:e=>h(e.target.checked),checked:i,"aria-describedby":o?t+"__help":void 0},u,{ref:e=>e&&(e.indeterminate=m)})),i&&Object(r.createElement)(q.a,{icon:G.a,className:"components-checkbox-control__checked",role:"presentation"}),m&&Object(r.createElement)(q.a,{icon:z.a,className:"components-checkbox-control__checked",role:"presentation"})),c&&(n?Object(r.createElement)(s.VisuallyHidden,{as:"label",htmlFor:t},c):Object(r.createElement)("label",{className:"components-checkbox-control__label",htmlFor:t},c)))}function Q(e){let{help:t,label:c,multiple:n=!1,onChange:a,options:l=[],className:i,hideLabelFromVision:o,...v}=e;const m="inspector-select-control-"+Object(d.useInstanceId)(Q),u=Object(h.groupBy)(l,"optgroup");return!Object(h.isEmpty)(l)&&Object(r.createElement)(s.BaseControl,{label:c,hideLabelFromVision:o,id:m,help:t,className:i},Object(r.createElement)("select",I()({id:m,className:"components-select-control__input",onChange:e=>{if(n){const t=[...e.target.options].filter(e=>{let{selected:t}=e;return t}).map(e=>{let{value:t}=e;return t});a(t)}else a(e.target.value)},"aria-describedby":t?m+"__help":void 0,multiple:n},v),Object(h.map)(u,(e,t)=>{const c=e.map((e,t)=>Object(r.createElement)("option",{key:`${e.label}-${e.value}-${t}`,value:e.value,disabled:e.disabled},e.label));return"undefined"===t?c:Object(r.createElement)("optgroup",{label:t,key:t},c)})))}function $(e){let{value:t,onChange:c,...n}=e;Object(h.isArray)(t)||(t=Object(h.isString)(t)?[t]:[]);const[a,l]=Object(r.useState)(t.join("\n"));t.join("\n").trim()!==a.trim()&&l(t.join("\n"));return Object(r.createElement)(s.TextareaControl,I()({value:a,onChange:e=>{l(e),c(e.split("\n").map(e=>e.trim()).filter(e=>e.length>0))}},n))}c("VM+Z");function Y(e){let{id:t,checked:c,onChange:n,label:a,className:s,...l}=e;return t=Object(d.useInstanceId)(Y,"itsec-chip-control")||t,Object(r.createElement)("div",{className:v()("itsec-chip-control",s)},Object(r.createElement)("input",I()({type:"checkbox",checked:c,onChange:e=>n(e.target.checked),id:t},l)),Object(r.createElement)("label",{htmlFor:t},a))}function X(e){let{tabId:t,onClick:c,children:n,selected:a,...l}=e;return Object(r.createElement)(s.Button,I()({role:"tab",tabIndex:a?null:-1,"aria-selected":a,id:t,onClick:c},l),n)}class ee extends r.Component{constructor(){super(...arguments),this.handleClick=this.handleClick.bind(this),this.onNavigate=this.onNavigate.bind(this),this.onKeyDown=this.onKeyDown.bind(this)}handleClick(e){const{onSelect:t=h.noop}=this.props;t(e)}onNavigate(e,t){const c=this.event;c&&"tab"===c.target.getAttribute("role")&&c.preventDefault(),t.click()}onKeyDown(e){this.event=e}render(){const{activeClass:e="is-active",className:t,instanceId:c,orientation:n="horizontal",tabs:a,selected:l,isStyled:i}=this.props,o=Object(h.find)(a,{name:l})||a[0],d=c+"-"+o.name;return Object(r.createElement)("div",{className:v()("itsec-tab-panel",t,{"itsec-tab-panel--styled":i})},Object(r.createElement)(s.NavigableMenu,{role:"tablist",orientation:n,onNavigate:this.onNavigate,onKeyDown:this.onKeyDown,className:"components-tab-panel__tabs"},a.map(t=>Object(r.createElement)(X,{className:v()("itsec-tab-panel__tab",t.className,{[e]:t.name===o.name}),tabId:c+"-"+t.name,"aria-controls":c+"-"+t.name+"-view",selected:t.name===o.name,key:t.name,onClick:Object(h.partial)(this.handleClick,t.name)},t.title))),o&&Object(r.createElement)("div",{"aria-labelledby":d,role:"tabpanel",id:d+"-view",className:"components-tab-panel__tab-content",tabIndex:"0"},this.props.children(o)))}}var te=Object(d.withInstanceId)(ee),ce=c("rl8x"),ne=c.n(ce),ae=c("ppSj");class re extends r.Component{constructor(){super(...arguments),this.handleClick=this.handleClick.bind(this),this.onNavigate=this.onNavigate.bind(this),this.onKeyDown=this.onKeyDown.bind(this),this.toggleTab=this.toggleTab.bind(this),this.getSelectedTabs=this.getSelectedTabs.bind(this),this.isSelected=this.isSelected.bind(this),this.getSelectedId=this.getSelectedId.bind(this),this.getLabelledBy=this.getLabelledBy.bind(this),this.getTabId=this.getTabId.bind(this),this.getTabPanelId=this.getTabPanelId.bind(this),this.isTabDisabled=this.isTabDisabled.bind(this),this.isNonMultiSelectableTabSelected=this.isNonMultiSelectableTabSelected.bind(this)}handleClick(e,t){t.metaKey||t.ctrlKey?this.toggleTab(e):this.props.onSelect([e])}onNavigate(e,t){const c=this.event;if(c){if("tab"===c.target.getAttribute("role")&&c.preventDefault(),c.ctrlKey)return;if(c.shiftKey){if(this.isTabDisabled(this.props.tabs[e]))return;const t=this.props.tabs[e].name;return void this.toggleTab(t)}}t.click()}onKeyDown(e){if(!e.nativeEvent&&(this.event=e,e.ctrlKey&&("Space"===e.code||32===e.keyCode))){e.preventDefault();const t=e.target.dataset.tabname;t&&this.toggleTab(t)}}toggleTab(e){const t=Object(h.find)(this.props.tabs,{name:e});t&&!1===t.allowMultiple||(this.props.selected.includes(e)?this.props.onSelect(this.props.selected.filter(t=>t!==e)):this.props.onSelect([...this.props.selected,e]))}getSelectedTabs(){const e=this.props.selected;!e.length&&this.props.initialTab&&e.push(this.props.initialTab);const t=[];return this.props.tabs.forEach(e=>{this.props.selected.includes(e.name)&&t.push(e)}),t}isSelected(e,t){return e.some(e=>e.name===t.name)}isTabDisabled(e){const{pressedModifierKeys:t}=this.props;if(this.props.selected.includes(e.name))return!1;if(!1!==e.allowMultiple&&!this.isNonMultiSelectableTabSelected())return!1;if(t.meta||t.ctrl)return!0;if(t.shift){const{activeElement:e}=document;if(e.parentElement&&e.parentElement.id==="components-tab-panel__tabs-"+this.props.instanceId)return!0}return!1}isNonMultiSelectableTabSelected(){if(1!==this.props.selected.length)return!1;const e=Object(h.find)(this.props.tabs,{name:this.props.selected[0]});return e&&!1===e.allowMultiple}getSelectedId(e){return 1===e.length?this.getTabPanelId(e[0].name):`components-tab-panel__panel-${this.props.instanceId}-${Object(h.map)(e,"name").join("-")}`}getLabelledBy(e){return e.map(e=>this.getTabId(e.name)).join(",")}getTabId(e){return`components-tab-panel__tab-${this.props.instanceId}-${e}`}getTabPanelId(e){return`components-tab-panel__panel-${this.props.instanceId}-${e}`}componentDidUpdate(e){if(1!==this.props.selected.length)return;if(!ne()(this.props.selected,e.selected))return;const t=this.props.selected[0];if(Object(h.find)(this.props.tabs,{name:t}))return;const c=Object(h.findIndex)(e.tabs,{name:t});if(-1===c)return;const n=Math.max(c-1,0),a=this.props.tabs[n];a&&this.props.onSelect([a.name])}render(){const{tabs:e,className:t,activeClass:c="is-active",orientation:n="horizontal"}=this.props,a=this.getSelectedTabs(),l=this.getSelectedId(a);return Object(r.createElement)("div",{className:t},Object(r.createElement)(s.NavigableMenu,{role:"tablist","aria-multiselectable":!0,orientation:n,onNavigate:this.onNavigate,onKeyDown:this.onKeyDown,className:"components-tab-panel__tabs",id:"components-tab-panel__tabs-"+this.props.instanceId},e.map(e=>{const t=this.isSelected(a,e),n=t&&a.length>1?l:this.getTabPanelId(e.name);return Object(r.createElement)(X,{className:v()(e.className,{[c]:t}),tabId:this.getTabId(e.name),"aria-controls":n,selected:t,disabled:this.isTabDisabled(e),key:e.name,onClick:Object(h.partial)(this.handleClick,e.name),"data-tabname":e.name},e.title)})),a.length>0&&Object(r.createElement)("div",{"aria-labelledby":this.getLabelledBy(a),role:"tabpanel",id:l,className:"components-tab-panel__tab-content",tabIndex:"0"},this.props.children(a)))}}Object(d.compose)([d.withInstanceId,ae.j])(re),c("SenV");class se extends r.Component{constructor(){super(...arguments),a()(this,"onSelect",e=>{this.setState({selected:e})}),this.state={selected:this.props.initialTab||""}}render(){return Object(r.createElement)(te,I()({},this.props,{selected:this.state.selected,onSelect:this.onSelect}))}}var le=c("ZpRC"),ie=c("RxS6");c("D5mf");function oe(e,t){let c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;for(let n=0;n<e.length;n++){const a=t(e[n],c,n);if(a!==oe.skip){if(a===oe.halt)return a;if(Object(h.isArray)(e[n].children)&&oe.halt===oe(e[n].children,t,e[n]))return oe.halt}}}function ve(e){let{id:t,tree:c,active:n,setActive:a,onActivate:l,onLoad:i,label:o,help:v,...h}=e;const d=Object(r.useRef)(),m=Object(r.useMemo)(()=>{const e={};return oe(c,(t,c,n)=>{e[t.id]={item:t,index:n,parent:null==c?void 0:c.id}}),e},[c]),[u,p]=Object(r.useState)([]),[f,b]=Object(r.useState)([]),y=t+"__item__",E=async e=>{!0===e.children&&i&&(b(t=>[...t,e.id]),await i(e.id),b(t=>t.filter(t=>t!==e.id))),p(t=>t.includes(e.id)?t.filter(t=>t!==e.id):[...t,e.id])};return Object(r.createElement)(s.BaseControl,{help:v,className:"itsec-tree"},Object(r.createElement)("span",{className:"components-base-control__label",id:t+"__tree_label"},o),Object(r.createElement)("ul",I()({ref:d,id:t,role:"tree",tabIndex:0,onKeyDown:async e=>{h.onKeyDown&&h.onKeyDown(e);const{keyCode:t}=e;if(l&&[ie.ENTER,ie.SPACE].includes(t)&&l(n),![ie.UP,ie.DOWN,ie.RIGHT,ie.LEFT].includes(t))return;e.stopPropagation(),e.preventDefault();const r=m[n];if(!r)return void a(c[0].id);const{item:s,parent:i}=r;let o;switch(t){case ie.UP:var v;o=null===(v=function(e,t,c){let n;return oe(e,e=>e.id===t?oe.halt:(n=e,!1===e.children||c.includes(e.id)?void 0:oe.skip)),n}(c,s.id,u))||void 0===v?void 0:v.id;break;case ie.DOWN:var p;o=null===(p=function(e,t,c){let n,a=!1;return oe(e,e=>(n=e,a?oe.halt:(e.id===t&&(a=!0),!1===e.children||c.includes(e.id)?void 0:oe.skip))),n}(c,s.id,u))||void 0===p?void 0:p.id;break;case ie.RIGHT:var f;if(s.children)if(u.includes(s.id))o=null===(f=s.children)||void 0===f?void 0:f[0].id;else await E(s);break;case ie.LEFT:s.children&&u.includes(s.id)?await E(s):o=i}if(o&&(a(o),d.current)){const e=d.current.ownerDocument.getElementById(y+o);e.scrollIntoViewIfNeeded?e.scrollIntoViewIfNeeded():Object(le.a)(e,{scrollMode:"if-needed"})}},onFocus:n?void 0:()=>a(c[0].id),"aria-activedescendant":n?y+n:void 0,"aria-labelledby":t+"__tree_label"},h),c.map(e=>Object(r.createElement)(he,{key:e.id,idBase:y,active:n,setActive:a,expandedIds:u,onToggle:E,loadingIds:f,item:e}))))}function he(e){const{idBase:t,item:c,expandedIds:n,loadingIds:a,onToggle:s,active:l,setActive:i}=e,o=!!c.children,h=n.includes(c.id);return Object(r.createElement)("li",{id:t+c.id,role:"treeitem","aria-selected":l===c.id?"true":void 0,"aria-expanded":o?h:void 0,className:v()("itsec-tree__item",{"itsec-tree__item--loading":a.includes(c.id)})},Object(r.createElement)("span",{onClick:async()=>{await s(c),i(c.id)},"aria-label":c.label},c.label),o&&c.children.length>0&&Object(r.createElement)("ul",{role:"group"},c.children.map(t=>Object(r.createElement)(he,I()({key:t.id},e,{item:t})))))}oe.halt=Symbol("halt"),oe.skip=Symbol("skip");const de=["group","treeitem","option","menuitem","tab"].join(" ");var me=Object(r.forwardRef)((function(e,t){let{active:c,onKeyDown:n=h.noop,onNavigate:a,orientation:s="vertical",cycle:l=!0,descendantRoles:i=de,as:o="div",children:v,...d}=e;const m=Object(r.useRef)();return Object(r.useImperativeHandle)(t,()=>({focus(){m.current.focus()}})),Object(r.createElement)(o,I()({ref:m,tabIndex:0,"aria-activedescendant":c,"aria-orientation":s,onKeyDown:e=>{const t=function(e,t){let c=[ie.DOWN],n=[ie.UP];return"horizontal"===t&&(c=[ie.RIGHT],n=[ie.LEFT]),"both"===t&&(c=[ie.RIGHT,ie.DOWN],n=[ie.LEFT,ie.UP]),Object(h.includes)(c,e)?1:Object(h.includes)(n,e)?-1:Object(h.includes)([ie.DOWN,ie.UP,ie.LEFT,ie.RIGHT],e)?0:void 0}(e.keyCode,s);if(n(e,t),void 0===t)return;e.stopPropagation(),e.preventDefault();const r=function(e,t){const c=t.split(" ").map(e=>`[role="${e}"]`).join(", ");return e.querySelectorAll(c)}(m.current,i),o=Object(h.findIndex)(r,{id:c}),v=l?function(e,t,c){const n=e+c;return n<0?t+n:n>=t?n-t:n}(o,r.length,t):o+t;if(v>=0&&v<r.length){const e=r[v];!function(e,t){if(t.scrollIntoViewIfNeeded)return void t.scrollIntoViewIfNeeded();const c=e.ownerDocument.defaultView.getComputedStyle(e),n=parseInt(c.getPropertyValue("border-top-width")),a=t.offsetTop-e.offsetTop<e.scrollTop,r=t.offsetTop-e.offsetTop+t.clientHeight-n>e.scrollTop+e.clientHeight;(a||r)&&(e.scrollTop=t.offsetTop-e.offsetTop-e.clientHeight/2-n+t.clientHeight/2,e.scrollLeft=0)}(m.current,e),a(e.id)}}},d),v)}));function ue(){return Object(r.createElement)("div",{style:{flexGrow:1},"aria-hidden":!0,className:"itsec-component-flex-spacer"})}c("UEi/");function pe(e){let{type:t="info",title:c,messages:n=[],className:a,onDismiss:l,hasBorder:i,recommended:o}=e;return n=Object(h.castArray)(n),n.length?Object(r.createElement)("div",{className:v()("itsec-message-list",a,"itsec-message-list--type-"+t,{"itsec-message-list--has-border":i,"itsec-message-list--recommended":o})},Object(r.createElement)("div",null,c&&Object(r.createElement)("h3",null,c),Object(r.createElement)("ul",null,n.map((e,t)=>Object(r.createElement)("li",{key:t},e)))),l&&Object(r.createElement)(s.Button,{icon:"dismiss",onClick:l})):null}function fe(e){let{errors:t=[],apiError:c,schemaError:n,title:a,className:s,hasBorder:l}=e;const o=[...t,...Object(i.n)(c),...(n||[]).map(e=>e.stack)];return o.length?Object(r.createElement)(pe,{messages:o,title:a,className:s,hasBorder:l,type:"error"}):null}c("jSk+");function be(e){let{panels:t,header:c="h3",expanded:n,setExpanded:a,isStyled:s,className:l,allowNone:i}=e;const o=Object(d.useInstanceId)(be,"itsec-accordion"),h=Object(r.useRef)([]),m=e=>{a(i&&e===n?"":e)},u=t.some(e=>!!e.description);return Object(r.createElement)("div",{id:o,className:v()("itsec-accordion",l,{"itsec-accordion--styled":s,"itsec-accordion--has-description":u})},t.map((e,t)=>{let{name:a,text:s,className:l,render:i=Ee,...d}=e;return Object(r.createElement)(r.Fragment,{key:a},Object(r.createElement)(ye,I()({id:o+"__trigger__"+a,name:a},d,{as:c,controls:o+"__panel__"+a,isExpanded:n===a,onTrigger:m,refs:h,index:t,className:l})),Object(r.createElement)(i,{name:a,text:s,className:v()("itsec-accordion__panel",l,{"itsec-accordion__panel--is-expanded":n===a}),role:"region",id:o+"__panel__"+a,"aria-labelledby":o+"__trigger__"+a}))}))}function ye(e){let{id:t,name:c,title:n,description:a,showSpinner:l,icon:i,controls:o,isExpanded:h,onTrigger:d,className:m,as:u,refs:p,index:f}=e;const b=!0===l?Object(r.createElement)(C,{size:30}):l;return Object(r.createElement)(u,{className:v()("itsec-accordion__header",m,{"itsec-accordion__header--is-expanded":h,"itsec-accordion__header--has-graphic":b||i})},Object(r.createElement)(s.Button,{id:t+c,icon:h?"arrow-up-alt2":"arrow-down-alt2",onClick:()=>d(c),"aria-expanded":h,"aria-controls":o,ref:e=>p.current[f]=e,onKeyDown:e=>{var t;if(e.keyCode!==ie.UP&&e.keyCode!==ie.DOWN)return;e.preventDefault();const c=e.keyCode===ie.UP?-1:1,n=function(e,t,c){const n=e+c;return n<0?t+n:n>=t?n-t:n}(f,p.current.length,c);null===(t=p.current[n])||void 0===t||t.focus()}},Object(r.createElement)("span",{className:"itsec-accordion__header-title"},n),a&&Object(r.createElement)("span",{className:"itsec-accordion__header-description"},a),b||i&&Object(r.createElement)(s.Dashicon,{icon:i,className:"itsec-accordion__header-icon"})))}function Ee(e){let{text:t,name:c,...n}=e;return Object(r.createElement)("div",n,Object(r.createElement)("p",null,t))}c("jnSk");function ke(e){let{icon:t,className:c,label:n,children:a}=e;const[l,i]=Object(r.useState)(!1);return Object(r.createElement)(s.Button,{icon:t,label:n,onClick:()=>i(!l),"aria-expanded":l,"aria-haspopup":!0,className:v()("itsec-icon-popover__trigger",c&&c+"__trigger")},l&&Object(r.createElement)(s.Popover,{noArrow:!1,position:"bottom center",className:v()("itsec-icon-popover",c),focusOnMount:"container",onFocusOutside:()=>i(!1)},a))}var ge=c("55Ip");c("40Gr");function _e(e){let{help:t,to:c}=e;return Object(r.createElement)(ke,{icon:"info",className:"itsec-help-popover",label:Object(l.__)("Help","better-wp-security")},Object(r.createElement)(Ce,{content:t,tagName:"p"}),c&&Object(r.createElement)("footer",null,Object(r.createElement)(ge.a,{component:Object(ae.i)(s.Button),text:Object(l.__)("More","better-wp-security"),to:c,icon:"arrow-right-alt",iconPosition:"right"})))}var Oe=c("z1rk");c("79XY");function je(e){let{topic:t,fallback:c}=e;const n=Object(F.useSelect)(e=>e(Oe.HELP_STORE_NAME).isEnabled());return void 0===n?null:n?Object(r.createElement)(Ze,{topic:t,fallback:c}):Object(r.createElement)(Me,null)}function Me(){const[e,t]=Object(r.useState)(!0),[c,n]=Object(r.useState)(!1),{enableHelp:a}=Object(F.useDispatch)(Oe.HELP_STORE_NAME);return e&&Object(r.createElement)(s.Modal,{title:Object(l.__)("Privacy Notice","better-wp-security"),onRequestClose:()=>t(!1),className:"itsec-help-list__enable-modal"},Object(r.createElement)("p",null,Object(l.__)("Loading help remotely requires making an API request to iThemes.com. Only the requested help topic is transmitted.","better-wp-security")),Object(r.createElement)("footer",null,Object(r.createElement)("a",{href:"https://www.liquidweb.com/about-us/policies/privacy-policy/"},Object(l.__)("Privacy Policy","better-wp-security")),Object(r.createElement)(s.Button,{isBusy:c,onClick:async()=>{n(!0),await a(),n(!1)},isPrimary:!0},Object(l.__)("Continue","better-wp-security"))))}function Ze(e){let{topic:t,fallback:c}=e;const{help:n,isLoaded:a,fallbackHelp:s,fallbackLoaded:i}=Object(F.useSelect)(e=>({help:e(Oe.HELP_STORE_NAME).getHelp(t),isLoaded:e(Oe.HELP_STORE_NAME).hasFinishedResolution("getHelp",[t]),fallbackHelp:c?e(Oe.HELP_STORE_NAME).getHelp(c):[],fallbackLoaded:!c||e(Oe.HELP_STORE_NAME).hasFinishedResolution("getHelp",[c])}));if(!a||!i)return null;const o=Object(h.groupBy)([...n,...s],"type");return Object(r.createElement)(React.Fragment,null,Object(r.createElement)(Ne,{title:Object(l.__)("Help Center","better-wp-security"),icon:"sos",link:"https://help.ithemes.com/hc/en-us/categories/200147050/",items:o.hc}),Object(r.createElement)(Ne,{title:Object(l.__)("Blog","better-wp-security"),icon:"book-alt",link:"https://ithemes.com/blog/",items:o.post}),Object(r.createElement)(Ne,{title:Object(l.__)("Video","better-wp-security"),icon:"youtube",link:"https://www.youtube.com/channel/UCYSDQEcxAppePTn5E7iNpFg",items:o.video}))}function Ne(e){let{title:t,icon:c,link:n,items:a}=e;return Object(r.createElement)(s.Card,{className:v()("itsec-help-list-section",{"itsec-help-list-section--has-content":!!a})},Object(r.createElement)("header",null,Object(r.createElement)("a",{href:n},Object(r.createElement)(s.Dashicon,{icon:c,className:"itsec-help-list-section__icon"}),Object(r.createElement)("h3",null,t),Object(r.createElement)(s.Dashicon,{icon:"arrow-right-alt",className:"itsec-help-list-section__more"}))),Object(r.createElement)("section",null,a?a.map(e=>Object(r.createElement)("article",{key:e.title},Object(r.createElement)("a",{href:e.link},Object(r.createElement)("h4",null,e.title),Object(r.createElement)(Ce,{content:e.description,tagName:"p"})))):Object(r.createElement)("p",null,Object(l.__)("No relevant content at this time.","better-wp-security"))))}var we=c("yyU1"),Ce=function(e){let{transform:t,...c}=e;return Object(r.createElement)(we.a,I()({},c,{transform:(e,n)=>{if(t){const c=t(e,n);if(void 0!==c)return c}if("a"===e.tagName.toLowerCase()&&e.dataset.itsecPath&&!c.noHtml)return Object(r.createElement)(ge.a,{to:e.dataset.itsecPath},n)}}))};c("ilPL");var xe=c("EUPu"),Ie=c("ywyh"),He=c.n(Ie),Se=c("Mmq9");const{useGlobalState:Ve}=Object(xe.a)({cache:{}});function Le(e){let{id:t,value:c,disabled:n,readonly:a,onChange:l,label:i,description:o,isMultiple:v=!1,path:m,query:u={},labelAttr:p,idAttr:f="id",searchArg:b="search"}=e;const[y,E]=Ve("cache"),k=Object(d.useInstanceId)(Le,"itsec-entity-select-control");t=t||k;const[g,_]=Object(r.useState)(""),O=function(e,t,c,n,a,s,l){return Object(r.useCallback)(r=>He()({path:Object(Se.addQueryArgs)(e,{...t,[a]:r})}).then(e=>e.map(e=>({value:e[n],label:e[c]}))).then(t=>(l({...s,[e]:{...s[e]||{},...Object(h.mapValues)(Object(h.keyBy)(t,"value"),"label")}}),t)),[e,t,c,n,a,s])}(m,u,p,f,b,y,E);let j;if(v)j=(c||[]).filter(e=>void 0!==e).map(e=>{var t;return{value:e,label:(null===(t=y[m])||void 0===t?void 0:t[e])||e}});else if(c){var M;j={value:c,label:(null===(M=y[m])||void 0===M?void 0:M[c])||c}}return Object(r.createElement)(s.BaseControl,{className:"itsec-entity-select-control",label:i,help:Object(r.createElement)(Ce,{noWrap:!0,content:o}),id:t},Object(r.createElement)(Z,{"aria-label":i,"aria-describedby":o?t+"__help":void 0,classNamePrefix:"itsec-entity-select-control-as",inputId:t,isDisabled:n||a,isMulti:v,isClearable:!0,cacheOptions:!0,defaultOptions:!0,loadOptions:O,value:j,onChange:e=>l(v?(e||[]).map(e=>e.value):null==e?void 0:e.value),inputValue:g,onInputChange:_}))}},"6ECA":function(e,t,c){},"6a02":function(e,t,c){},"79XY":function(e,t,c){},"7yWr":function(e,t,c){var n=c("cDcd");function a(e){return n.createElement("svg",e,[n.createElement("defs",{key:0},n.createElement("style",null,".itsec-icon-crash-a8f50__a{fill:#e5eaee;}.itsec-icon-crash-a8f50__b{fill:#e1f2fc;}.itsec-icon-crash-a8f50__b,.itsec-icon-crash-a8f50__f{stroke:#0083e3;}.itsec-icon-crash-a8f50__c,.itsec-icon-crash-a8f50__f{fill:#0083e3;}.itsec-icon-crash-a8f50__d{fill:#fff;}.itsec-icon-crash-a8f50__e{fill:none;}")),n.createElement("g",{transform:"translate(-221 -1346.145)",key:1},[n.createElement("ellipse",{className:"itsec-icon-crash-a8f50__a",cx:"91.5",cy:"21.5",rx:"91.5",ry:"21.5",transform:"translate(221 1473)",key:0}),n.createElement("path",{className:"itsec-icon-crash-a8f50__b",d:"M348.982,304.5a4.479,4.479,0,0,0-4.482,4.475v79.981a2.985,2.985,0,0,0,2.988,2.983H471.514a2.985,2.985,0,0,0,2.988-2.983V308.975a4.479,4.479,0,0,0-4.482-4.475Z",transform:"translate(-94.187 1757.656) rotate(-79)",key:1}),n.createElement("path",{className:"itsec-icon-crash-a8f50__c",d:"M371,409.152H492.632V334H371Z",transform:"translate(-122.145 1774.41) rotate(-79)",key:2}),n.createElement("path",{className:"itsec-icon-crash-a8f50__d",d:"M373,410.439H493.919V336H373Z",transform:"translate(-124.072 1775.71) rotate(-79)",key:3}),n.createElement("path",{className:"itsec-icon-crash-a8f50__e",d:"M271.875,797.1a14.793,14.793,0,0,1-5.537-1.7c-.151-.073-.258-.125-.338-.16V793H423.961v2.239c-.08.037-.187.087-.338.16a14.6,14.6,0,0,1-5.494,1.7H271.875Z",transform:"translate(-476.005 1617.71) rotate(-79)",key:4}),n.createElement("path",{className:"itsec-icon-crash-a8f50__b",d:"M424,792.5H265.5v2.694c.183,0,3.565,1.936,6.153,1.936H417.885c2.57,0,5.927-1.941,6.1-1.941.005,0,.007-.016.007-.016Z",transform:"translate(-475.523 1617.385) rotate(-79)",key:5}),n.createElement("path",{className:"itsec-icon-crash-a8f50__c",d:"M266.348,805l-.178.356H423.953l.178-.356Z",transform:"translate(-485.714 1615.965) rotate(-79)",key:6}),n.createElement("path",{className:"itsec-icon-crash-a8f50__c",d:"M664.768,793.781H646.735A1.749,1.749,0,0,1,645,792.018V792h21.548v.018a1.749,1.749,0,0,1-1.736,1.763",transform:"translate(-534.637 1923.65) rotate(-79)",key:7}),n.createElement("path",{className:"itsec-icon-crash-a8f50__c",d:"M703.417,318.953a.623.623,0,1,1-.623-.623.624.624,0,0,1,.623.623",transform:"translate(-391.406 1027.815)",key:8}),n.createElement("circle",{className:"itsec-icon-crash-a8f50__c",cx:"1.817",cy:"1.817",r:"1.817",transform:"translate(317.878 1408.665) rotate(-79)",key:9}),n.createElement("path",{className:"itsec-icon-crash-a8f50__f",d:"M.116,2.313c.255-.49,4.387-4.951,7.662,0,0,.627-.254.874-1.159-.232-.34-.391-2.476-3.24-6.208,1.1C.056,3.166-.139,2.8.116,2.313Z",transform:"matrix(0.545, -0.839, 0.839, 0.545, 309.03, 1406.401)",key:10}),n.createElement("path",{className:"itsec-icon-crash-a8f50__c",d:"M17.445,0C32.163-4.819,34.89,2.647,34.89,5.911S27.08,3.783,17.445,3.783,0,9.176,0,5.911,2.728,4.819,17.445,0Z",transform:"translate(334.823 1440.232) rotate(-95)",key:11}),n.createElement("ellipse",{className:"itsec-icon-crash-a8f50__a",cx:"9",cy:"6.5",rx:"9",ry:"6.5",transform:"translate(305.491 1439.176) rotate(-73)",key:12}),n.createElement("ellipse",{className:"itsec-icon-crash-a8f50__c",cx:"3.317",cy:"0.817",rx:"3.317",ry:"0.817",transform:"translate(316.071 1435.373) rotate(-98)",key:13}),n.createElement("path",{className:"itsec-icon-crash-a8f50__f",d:"M-.229,7.487l.487-.6C5.733-.22,1.515,1.932,10.034-3.762a4.111,4.111,0,0,0,.424,1.48A22.715,22.715,0,0,0,3.344,3.547C1.6,4.715-.484,7.978-.229,7.487Z",transform:"matrix(0.545, -0.839, 0.839, 0.545, 306.953, 1437.137)",key:14})])])}a.defaultProps={viewBox:"0 0 183 169.855"},e.exports=a,a.default=a},D5mf:function(e,t,c){},DfSy:function(e,t,c){},Dfre:function(e,t,c){},HmIg:function(e,t,c){var n=c("cDcd");function a(e){return n.createElement("svg",e,[n.createElement("g",{key:0},[n.createElement("path",{d:"M635.56 224.66v4.68h-4.46l7 24.47h.11l6.72-24.47h-4.46v-4.68h17.19v4.68h-4.41l6.84 24.47h.11l6.89-24.47h-4.47v-4.68h13.73v4.68h-4.41l-9.32 33.13h-5.34l-8.38-29.6h-.11l-8.32 29.6h-5.18l-9.54-33.13h-4.52v-4.68Z",transform:"translate(-409.3-197)",key:0}),n.createElement("path",{d:"M687.21 235.29v0c7.61-.04 13.8 6.1 13.83 13.71 .03 7.61-6.11 13.8-13.72 13.83 -7.62.03-13.81-6.11-13.84-13.72 -.01-.02-.01-.04-.01-.06v0c-.22-7.4 5.59-13.57 12.98-13.78 .24-.01.48-.01.73-.01ZM679 249.07c0 5.07 3.53 8.82 8.16 8.82 4.63 0 8.21-3.75 8.21-8.82 0-4.9-3.42-8.82-8.27-8.82 -4.68 0-8.1 3.97-8.1 8.82Z",transform:"translate(-409.3-197)",key:1}),n.createElement("path",{d:"M725.19 235.62v5.19h-3c-5.34 0-7.6 3-7.6 9v7.72h5.62v4.52H704.3v-4.52h5.13v-17h-5.24v-4.52h9.32v5.84h.11c1.92-4.91 5.62-6.29 8-6.29Z",transform:"translate(-409.3-197)",key:2}),n.createElement("path",{d:"M753.36 224.66v32.9h4.74v4.52h-9.92v-3.86c-2.54 2.65-5.3 4.3-9.26 4.3 -6.18 0-12.79-4.3-12.79-13.34 0-7.93 5.57-13.89 12.9-13.89v0c3.5.04 6.82 1.56 9.15 4.19v-10.3h-5v-4.52ZM731.64 249c0 5.34 3.36 9 8.21 9 4.85 0 8.33-3.91 8.33-9.2 0-5.13-3.31-8.82-8.44-8.82 -4.74.02-8.1 4.02-8.1 9.02Z",transform:"translate(-409.3-197)",key:3}),n.createElement("path",{d:"M776.18 224.66c7.66 0 12.24 4.3 12.24 11.57 0 3.31-1.27 7-3.86 9 -2.21 1.71-5.35 2.54-9.43 2.54h-5.51v9.65h4.91v4.68h-15.22v-4.7H764v-28.06h-4.69v-4.68Zm-1.6 18.57c5.46 0 8.1-2.2 8.1-7s-3.08-6.84-6.45-6.84h-6.61v13.89Z",transform:"translate(-409.3-197)",key:4}),n.createElement("path",{d:"M812 235.62v5.19h-3c-5.34 0-7.6 3-7.6 9v7.72h5.62v4.52h-15.9v-4.52h5.13v-17H791v-4.52h9.31v5.84h.11c1.93-4.91 5.63-6.29 8.05-6.29Z",transform:"translate(-409.3-197)",key:5}),n.createElement("path",{d:"M825.68 235.29c7.22 0 13.89 5.52 13.89 15.05h-21.88c.71 4.52 3.47 8 8.93 8h-.001c3.33.04 6.47-1.54 8.43-4.24l4.52 2v0c-2.87 4.38-7.83 6.95-13.06 6.78 -8.44 0-14.5-5.73-14.5-13.78v0c-.05-7.58 6.05-13.77 13.62-13.81 .01-.01.02-.01.04-.01Zm-7.83 11.3h16.48l-.001 0c-.81-4.13-4.4-7.12-8.6-7.16 -4.19 0-7.11 2.92-7.88 7.16Z",transform:"translate(-409.3-197)",key:6}),n.createElement("path",{d:"M853 235.62v0c2.2-.01 4.37.5 6.34 1.49v-1h4.52v8.59h-4.52v-1.59 0c-1.29-2.1-3.61-3.32-6.06-3.2 -2.82 0-4.58 1.32-4.58 3.2 0 2.2 2.43 2.64 5.95 3.14 3 .44 6.56 1 8.66 3.25v-.001c1.23 1.42 1.92 3.23 1.93 5.12 0 4.69-4 7.94-10 7.94 -4.52 0-6.78-1.82-6.83-1.87v1.43h-4.58v-8.93h4.58v.81c.44 2.65 2.86 4.19 6.22 4.19 3.2 0 5.35-1.21 5.35-3.25 0-2.48-2.31-2.87-5.9-3.42 -2.75-.44-5.29-1-7.27-2.48v0c-1.87-1.34-2.99-3.49-3-5.78 .06-4.38 3.86-7.64 9.19-7.64Z",transform:"translate(-409.3-197)",key:7}),n.createElement("path",{d:"M878.27 235.62v0c2.19-.01 4.36.5 6.33 1.49v-1h4.52v8.59h-4.52v-1.59 -.001c-1.29-2.1-3.61-3.32-6.06-3.2 -2.81 0-4.57 1.32-4.57 3.2 0 2.2 2.42 2.64 5.95 3.14 3 .44 6.56 1 8.65 3.25v-.001c1.23 1.41 1.92 3.23 1.93 5.12 0 4.69-4 7.94-10 7.94 -4.52 0-6.78-1.82-6.84-1.87v1.43h-4.57v-8.93h4.57v.81c.44 2.65 2.87 4.19 6.23 4.19 3.2 0 5.35-1.21 5.35-3.25 0-2.48-2.32-2.87-5.9-3.42v0c-2.59-.25-5.08-1.1-7.28-2.48v-.001c-1.87-1.34-2.98-3.49-3-5.78 .06-4.38 3.86-7.64 9.21-7.64Z",transform:"translate(-409.3-197)",key:8}),n.createElement("path",{d:"M635.89 275.84v4.69h-4.35l9.53 25.13 9.32-25.13H646v-4.69h14.39v4.69h-4.58l-12.31 33.12h-5.24l-12.51-33.12h-4.63v-4.69Z",transform:"translate(-409.3-197)",key:9}),n.createElement("path",{d:"M667.81 287.25v18.3c0 2.37 1.05 3.64 3.09 3.64v0c2.77-.25 5.39-1.42 7.44-3.31v-14.11h-4.47v-4.52h9.65v21.5H688v4.52h-9.64v-3c-3.14 2.48-6 3.42-8.49 3.42 -4.74 0-7.22-2.7-7.22-7.83v-14.09h-3.69v-4.52Z",transform:"translate(-409.3-197)",key:10}),n.createElement("path",{d:"M699.78 275.84v32.91h4v4.52h-13.92v-4.52h4.74v-28.39H690v-4.52Z",transform:"translate(-409.3-197)",key:11}),n.createElement("path",{d:"M724.75 286.81c4.63 0 6.83 3.31 6.83 7.22v14.72h4.47v4.52h-9.65V296c0-4.13-1.87-4.51-3-4.51 -2 0-4.79 1.15-7.49 3.3v13.95h4.46v4.52h-14.14v-4.52h4.46v-17h-4.57v-4.52h9.76v3.14c3.41-2.45 6.06-3.55 8.87-3.55Z",transform:"translate(-409.3-197)",key:12}),n.createElement("path",{d:"M751.87 286.48c7.22 0 13.89 5.51 13.89 15h-21.88c.71 4.52 3.47 8 8.93 8v0c3.33.04 6.48-1.55 8.43-4.25l4.52 2v0c-2.88 4.38-7.83 6.94-13.06 6.77 -8.44 0-14.5-5.73-14.5-13.78v0c-.02-7.57 6.1-13.72 13.67-13.74Zm-7.87 11.3h16.48v0c-.81-4.13-4.4-7.12-8.6-7.17 -4.14 0-7.07 2.92-7.88 7.17Z",transform:"translate(-409.3-197)",key:13}),n.createElement("path",{d:"M790 286.81V292h-3c-5.35 0-7.61 3-7.61 9v7.72h5.62v4.52h-15.89v-4.52h5.13v-17H769v-4.52h9.32v5.84h.11c1.93-4.9 5.62-6.28 8-6.28Z",transform:"translate(-409.3-197)",key:14}),n.createElement("path",{d:"M803.41 286.48c8.32 0 10.19 4.63 10.19 7.83v14.44h4.47v4.52h-9v-3.2c-2.92 2.48-5.51 3.64-8.38 3.64 -5 0-8.82-3.7-8.82-8.27 0-4.74 4.14-8.43 9.48-8.43v-.001c2.52.06 4.98.82 7.11 2.2v-3.58c0-2.37-1.48-4.85-5.78-4.85h-.001c-2.3-.13-4.46 1.07-5.57 3.09l-4.9-1.33c2.21-4.08 5.96-6.06 11.2-6.06Zm-6.67 19c0 2.48 1.87 4.3 4.68 4.3v0c2.62-.16 5.11-1.25 7-3.09v-3.08 0c-1.9-1.62-4.29-2.54-6.78-2.59 -2.97-.02-4.9 1.98-4.9 4.42Z",transform:"translate(-409.3-197)",key:15}),n.createElement("path",{d:"M829.81 275.84v15.05c2.87-3.09 5.68-4.41 9.48-4.41 7.39 0 12.68 5.62 12.68 13.5s-5.4 13.73-12.73 13.73v0c-3.63.09-7.08-1.52-9.32-4.36h-.11v3.92h-9.75v-4.52h4.63v-28.39h-4.52v-4.52Zm.17 24.47c0 5.07 3.41 8.88 8.15 8.88s8.33-3.92 8.33-9.32c0-6-4.3-8.71-8.27-8.71 -4.96-.001-8.19 3.97-8.19 9.15Z",transform:"translate(-409.3-197)",key:16}),n.createElement("path",{d:"M864.92 287.25v21.5h4.14v4.52h-13.45v-4.52h4.13v-17h-4.13v-4.52Zm-2.7-12v-.001c1.7-.01 3.09 1.37 3.09 3.07 0 1.7-1.38 3.09-3.08 3.09 -1.71 0-3.1-1.38-3.1-3.08 -.01-.01-.01-.01-.01-.01v0c.02-1.69 1.39-3.05 3.08-3.05Z",transform:"translate(-409.3-197)",key:17}),n.createElement("path",{d:"M881.63 275.84v32.91h4v4.52h-13.92v-4.52h4.74v-28.39h-4.63v-4.52Z",transform:"translate(-409.3-197)",key:18}),n.createElement("path",{d:"M897.12 287.25v21.5h4.13v4.52H887.8v-4.52h4.13v-17h-4.13v-4.52Zm-2.7-12v0c1.7 0 3.09 1.38 3.09 3.09 0 1.7-1.39 3.09-3.09 3.09 -1.71 0-3.09-1.39-3.09-3.09h0c.01-1.7 1.39-3.06 3.09-3.05Z",transform:"translate(-409.3-197)",key:19}),n.createElement("path",{d:"M912.77 278.54v8.71h4.79v4.52h-4.79v15.16 0c-.11 1 .62 1.9 1.63 2.01 .15.01.3.01.45-.02v0c.92-.04 1.83-.23 2.7-.55v4.62 0c-1.23.41-2.51.65-3.8.72 -4 0-6.17-2.1-6.17-6v-15.95h-3.36v-4.52h3.36v-4Z",transform:"translate(-409.3-197)",key:20}),n.createElement("path",{d:"M932.56 287.25v4.52h-3.09l5.62 14.39 5.51-14.39h-3.47v-4.52h12.62v4.52h-3.85L933 325h-8.71v-4.52h5.13l3.14-7.61 -8.56-21.1h-4.35v-4.52Z",transform:"translate(-409.3-197)",key:21}),n.createElement("path",{d:"M639.53 327c6 0 11.63 2.48 11.63 9.75 0 4.3-2.2 7.94-7.72 9.37l6.62 13.62h4.57v4.68h-8.1l-8.53-17.5h-5.3v12.85h4.85v4.68H622v-4.68h5.12v-28.06H622V327Zm-.28 15.21c3.59 0 6.18-1.65 6.18-5.46 0-3.14-2.15-5.07-5.73-5.07h-7v10.53Z",transform:"translate(-409.3-197)",key:22}),n.createElement("path",{d:"M670.18 337.67c7.22 0 13.89 5.51 13.89 15h-21.88c.71 4.52 3.47 8 8.93 8v0c3.33.04 6.47-1.54 8.43-4.24l4.52 2 0 0c-2.87 4.39-7.83 6.96-13.07 6.79 -8.44 0-14.5-5.73-14.5-13.78h0c-.04-7.57 6.06-13.74 13.62-13.77 .01-.01.03-.01.05-.01ZM662.35 349h16.48v0c-.81-4.13-4.4-7.12-8.6-7.16 -4.23-.04-7.11 2.88-7.88 7.16Z",transform:"translate(-409.3-197)",key:23}),n.createElement("path",{d:"M705.57 338c7.38 0 12.73 5.62 12.73 13.55 0 7.93-5.62 13.67-12.79 13.67v0c-3.44-.09-6.71-1.53-9.09-4v10.37h5v4.52H686.5v-4.52h4.74V343h-4.36v-4.52h9.54v4.08h.11v0c2.13-2.86 5.47-4.55 9.04-4.56Zm-9.26 13.77c0 5.08 3.41 8.77 8.21 8.77 5 0 8.43-3.75 8.43-9.21 0-5-3.36-8.81-8.21-8.81 -4.85 0-8.43 4.13-8.43 9.25Z",transform:"translate(-409.3-197)",key:24}),n.createElement("path",{d:"M736.38 337.67v0c7.61-.04 13.8 6.1 13.83 13.71 .03 7.61-6.11 13.8-13.72 13.83 -7.62.03-13.81-6.11-13.84-13.72 -.01-.03-.01-.05-.01-.07v0c-.22-7.39 5.59-13.56 12.97-13.77 .24-.01.49-.01.74-.01Zm-8.21 13.77c0 5.07 3.53 8.82 8.16 8.82 4.63 0 8.21-3.75 8.21-8.82 0-4.9-3.42-8.81-8.27-8.81 -4.68 0-8.1 3.96-8.1 8.81Z",transform:"translate(-409.3-197)",key:25}),n.createElement("path",{d:"M774.36 338v5.18h-3c-5.34 0-7.6 3-7.6 9v7.71h5.62v4.52h-15.91v-4.52h5.13V343h-5.24v-4.52h9.31v5.84h.11c1.93-4.91 5.63-6.28 8.05-6.28Z",transform:"translate(-409.3-197)",key:26}),n.createElement("path",{d:"M786.16 329.73v8.71H791V343h-4.79v15.15l0-.001c-.11 1 .62 1.9 1.63 2.01 .15.01.3.01.45-.02v-.001c.92-.05 1.83-.24 2.7-.55v4.63 0c-1.23.41-2.51.65-3.8.71 -4 0-6.18-2.09-6.18-6v-15.94h-3.36v-4.52h3.34v-4Z",transform:"translate(-409.3-197)",key:27})]),n.createElement("g",{fill:"#FDA129",key:1},[n.createElement("path",{d:"M497.36 242.22v0c28.6.27 51.56 23.68 51.28 52.29 -.28 28.6-23.69 51.56-52.3 51.28 -28.61-.28-51.57-23.69-51.29-52.3 0-.01 0-.01 0-.01 0-.32 0-.65 0-1v0c.82-28.21 24.07-50.57 52.29-50.28Zm-12.42 80.46c.24-.54.39-.79.48-1.07q4.95-14.36 9.87-28.71v0c.17-.56.17-1.14 0-1.69 -2.12-6.1-4.31-12.18-6.42-18.28h0c-.17-.72-.85-1.2-1.58-1.12v0c-1.21-.07-2.41-.21-3.59-.4 -1.38-.22-1.84-.83-1.68-2.08v0c.13-.97 1.03-1.64 2-1.5h.09c2.36.16 4.75.43 7.13.46 4.55.06 9.1 0 13.65 0 1.21 0 2.41-.15 3.62-.17h-.001c1-.07 1.87.68 1.94 1.69v.06 0c.03.94-.7 1.74-1.64 1.8 -1.33.16-2.67.29-4 .35 -1.5.07-1.52.05-1.07 1.46q7.78 24 15.59 48v0c.16.42.34.84.56 1.25l.62-1.86c1.78-5.52 3.52-11.06 5.35-16.54v-.001c1.25-3.41 2.1-6.95 2.55-10.54v0c.41-4.09-.37-8.21-2.22-11.86 -1.26-2.5-2.76-4.88-4.06-7.35v0c-1.45-2.35-2.05-5.11-1.7-7.84l0 0c.53-3.31 3.09-5.91 6.38-6.52l1.74-.28v-.001c-18.7-17.6-48.12-16.7-65.71 2 -.4.42-.78.85-1.16 1.28h-.001c-1.42 1.49-2.66 3.15-3.68 4.94 2.69 0 5.12.12 7.58.06 2.69-.07 5.37-.31 8.06-.4v0c.91-.04 1.69.67 1.74 1.59v0c0 .02 0 .06 0 .09h0c.13.88-.49 1.7-1.37 1.83 -.01 0-.01 0-.01 0h-.16c-1.4.17-2.81.3-4.22.37 -1.41.07-1.34.1-1 1.31q2.93 9.06 5.88 18.14 4.91 15.12 9.84 30.24c.1.35.26.7.5 1.32Zm12.8-24.42h-.28c-.36 1-.73 2-1.08 2.95q-6.48 18.26-13 36.49c-.29.82-.19 1.22.71 1.37 3.29.56 6.55 1.39 9.87 1.67v0c5.52.41 11.07-.22 16.36-1.88 1.65-.49 1.65-.51 1.08-2.12q-6.65-18.75-13.27-37.5c-.13-.34-.27-.67-.41-1Zm-22 37.59l.36-.22 -21.52-60.93 -.39.07v0c-10.29 22.85-.78 49.75 21.59 61.08Zm44-1.25v0c22.14-12.2 30.34-39.94 18.4-62.21h0c-.13.16-.19.37-.17.58 -.11 3.15-.06 6.36-.4 9.51v0c-.64 3.95-1.75 7.81-3.33 11.5 -4.13 11.39-8.18 22.84-12.26 34.23 -.71 2-1.43 4.08-2.24 6.38Z",transform:"translate(-409.3-197)",key:0}),n.createElement("path",{d:"M472.66 220.27h48.02v4.31h-48.02Z",transform:"matrix(.01-1 .999.01-140.09 519.81)",key:1}),n.createElement("path",{d:"M463.78 374.2h63.67v4.31h-63.67Z",transform:"matrix(.011-1 .999.011-295.63 670.67)",key:2}),n.createElement("path",{d:"M429.32 278.44h4.31v31.59h-4.31Z",transform:"matrix(.008-1 .999.008-275.77 526.16)",key:3}),n.createElement("path",{d:"M560.64 280.07h4.31v30.85h-4.31Z",transform:"matrix(.008-1 .999.008-146.63 658.86)",key:4}),n.createElement("path",{d:"M495.18 411.2h-.05c-5.62-.06-19.56-10.1-41.43-29.86 -17.18-15.52-33.51-32.08-37.17-37.7 -7.18-11-7.27-107.62-7.22-126.87v-2l1.8-.79 -.001 0c10.12-4.34 20.6-7.81 31.31-10.37l3.73-.92v18.15 0c8.93-2.18 18.01-3.71 27.17-4.6v-18l2.76-.26c7.08-.66 14.25-1 21.32-1s14.25.33 21.32 1l2.76.26v18.48 0c8.62.98 17.16 2.53 25.59 4.62v-18.61l3.74.92v0c10.7 2.56 21.18 6.02 31.31 10.35l1.8.79v2c0 19.51-.6 117.38-8 128.26 -4.19 6.15-22.78 23.67-38.33 37 -22.5 19.36-36.76 29.15-42.41 29.15Zm-79.84-192.43c-.08 44 1.53 114.36 6.24 121.58 3.37 5.15 19.59 21.54 36.17 36.52 24.72 22.33 35.3 28.28 37.44 28.3v0c2.18 0 13-5.77 38.4-27.65 17.11-14.72 33.84-30.82 37.28-35.88 4.84-7.1 6.82-78.27 7-122.88v-.001c-8.06-3.34-16.34-6.11-24.77-8.31v18.75l-3.81-1v0c-10.21-2.76-20.63-4.67-31.14-5.73l-2.71-.28v-18.4 0c-12.01-.97-24.06-.97-36.06 0v18l-2.75.24v-.001c-11.04.91-21.98 2.79-32.68 5.64l-3.8 1v-18.22h-.001c-8.46 2.19-16.75 4.97-24.81 8.32Z",transform:"translate(-409.3-197)",key:5})])])}a.defaultProps={viewBox:"0 0 540.45 214.2"},e.exports=a,a.default=a},IXp0:function(e,t,c){},JVTk:function(e,t,c){var n=c("cDcd");function a(e){return n.createElement("svg",e,[n.createElement("defs",{key:0},n.createElement("style",null,".itsec-icon-logo-a135a__cls-1{fill:#0083e3;}")),n.createElement("g",{id:"Layer_2","data-name":"Layer 2",key:1},n.createElement("g",{id:"Layer_1-2","data-name":"Layer 1"},[n.createElement("path",{className:"itsec-icon-logo-a135a__cls-1",d:"M102.41,40.58V8a1.74,1.74,0,0,0-1.71-1.74S63.49.22,51.08,0,1.78,6,1.78,6A1.74,1.74,0,0,0,0,7.74V40.58s-1.16,27.36,17.44,48.9c16.52,19.13,30.32,23.66,33.2,24.44a2.6,2.6,0,0,0,1.11,0c2.92-.79,16.7-5.35,33.18-24.44C103.53,67.94,102.41,40.58,102.41,40.58Zm-25,43c-11.21,13-20.79,18.57-25.67,20.8a1.6,1.6,0,0,1-1.14,0C45.76,102.09,36.17,96.5,25,83.53,8.49,64.45,9.15,39.45,9.16,39.19v-25a.86.86,0,0,1,.6-.78A170.63,170.63,0,0,1,50.93,8.21h.71a164.87,164.87,0,0,1,41,5.18.86.86,0,0,1,.6.78V39.23C93.27,39.45,93.92,64.45,77.46,83.53Z",key:0}),n.createElement("path",{className:"itsec-icon-logo-a135a__cls-1",d:"M51.1,31.87a8.86,8.86,0,1,0,8.83,8.88A8.87,8.87,0,0,0,51.1,31.87Z",key:1}),n.createElement("path",{className:"itsec-icon-logo-a135a__cls-1",d:"M84.1,39.41v-18a.78.78,0,0,0-.59-.73,156.44,156.44,0,0,0-31.86-3.28H51a162.74,162.74,0,0,0-32,3.34.78.78,0,0,0-.59.73V39.54c0,1.33,0,22.31,13.59,38C39.53,86.36,46.14,91.3,50.7,94a1.12,1.12,0,0,0,1,0c4.53-2.69,11.14-7.63,18.77-16.46C84.41,61.43,84.1,39.66,84.1,39.41ZM63.51,71.6c-1.09,1.28-2.16,2.45-3.2,3.54-.24.25-.43.17-.43-.18V67.4c0-5.72,5.55-8.63,7.38-9.43a1,1,0,0,0,.58-.86V51.37a.38.38,0,0,0-.58-.38A44.13,44.13,0,0,1,34.9,51a.39.39,0,0,0-.58.38v5.74a1,1,0,0,0,.59.84c6.08,2.33,7.32,6.29,7.32,9.52V74.9c0,.35-.19.43-.43.18q-1.53-1.6-3.16-3.48c-11.44-13.26-11.37-31.84-11.37-32V29a.76.76,0,0,1,.62-.72,152.22,152.22,0,0,1,23-1.83h.69a147.44,147.44,0,0,1,22.69,1.76.75.75,0,0,1,.62.72v10.3C74.89,39.58,75,58.31,63.51,71.6Z",key:2})]))])}a.defaultProps={width:"200px",viewBox:"0 0 102.43 113.98"},e.exports=a,a.default=a},Kx3k:function(e,t,c){var n=c("cDcd");function a(e){return n.createElement("svg",e,[n.createElement("defs",{key:0},n.createElement("style",null,".itsec-icon-unknown-7e3b2__a{fill:#e5eaee;}.itsec-icon-unknown-7e3b2__b{fill:#e1f2fc;}.itsec-icon-unknown-7e3b2__b,.itsec-icon-unknown-7e3b2__f{stroke:#0083e3;}.itsec-icon-unknown-7e3b2__c,.itsec-icon-unknown-7e3b2__f{fill:#0083e3;}.itsec-icon-unknown-7e3b2__d{fill:#fff;}.itsec-icon-unknown-7e3b2__e{fill:none;}")),n.createElement("g",{transform:"translate(-1004 -1748.182)",key:1},[n.createElement("ellipse",{className:"itsec-icon-unknown-7e3b2__a",cx:"91.5",cy:"21.5",rx:"91.5",ry:"21.5",transform:"translate(1004 1818)",key:0}),n.createElement("g",{transform:"translate(0 -38)",key:1},n.createElement("g",{transform:"translate(-1349.994 -1592.818)"},[n.createElement("path",{className:"itsec-icon-unknown-7e3b2__b",d:"M348.982,304.5a4.479,4.479,0,0,0-4.482,4.475v79.981a2.985,2.985,0,0,0,2.988,2.983H471.514a2.985,2.985,0,0,0,2.988-2.983V308.975a4.479,4.479,0,0,0-4.482-4.475Z",transform:"translate(2035.563 3075)",key:0}),n.createElement("path",{className:"itsec-icon-unknown-7e3b2__c",d:"M371,409.152H492.632V334H371Z",transform:"translate(2013.782 3050.753)",key:1}),n.createElement("path",{className:"itsec-icon-unknown-7e3b2__d",d:"M373,410.439H493.919V336H373Z",transform:"translate(2012.138 3049.11)",key:2}),n.createElement("path",{className:"itsec-icon-unknown-7e3b2__e",d:"M271.875,797.1a14.793,14.793,0,0,1-5.537-1.7c-.151-.073-.258-.125-.338-.16V793H423.961v2.239c-.08.037-.187.087-.338.16a14.6,14.6,0,0,1-5.494,1.7H271.875Z",transform:"translate(2100.083 2673.494)",key:3}),n.createElement("path",{className:"itsec-icon-unknown-7e3b2__b",d:"M424,792.5H265.5v2.694c.183,0,3.565,1.936,6.153,1.936H417.885c2.57,0,5.927-1.941,6.1-1.941.005,0,.007-.016.007-.016Z",transform:"translate(2100.494 2673.906)",key:4}),n.createElement("path",{className:"itsec-icon-unknown-7e3b2__c",d:"M266.348,805l-.178.356H423.953l.178-.356Z",transform:"translate(2099.944 2663.631)",key:5}),n.createElement("path",{className:"itsec-icon-unknown-7e3b2__c",d:"M664.768,793.781H646.735A1.749,1.749,0,0,1,645,792.018V792h21.548v.018a1.749,1.749,0,0,1-1.736,1.763",transform:"translate(1788.577 2674.316)",key:6}),n.createElement("path",{className:"itsec-icon-unknown-7e3b2__c",d:"M703.417,318.953a.623.623,0,1,1-.623-.623.624.624,0,0,1,.623.623",transform:"translate(1741.588 3063.633)",key:7}),n.createElement("g",{transform:"translate(2424.293 3403.787)",key:8},[n.createElement("circle",{className:"itsec-icon-unknown-7e3b2__c",cx:"1.817",cy:"1.817",r:"1.817",transform:"translate(4.217 9.117)",key:0}),n.createElement("circle",{className:"itsec-icon-unknown-7e3b2__c",cx:"1.817",cy:"1.817",r:"1.817",transform:"translate(32.475 9.117)",key:1}),n.createElement("path",{className:"itsec-icon-unknown-7e3b2__f",d:"M.116,2.313c.255-.49,4.387-4.951,7.662,0,0,.627-.254.874-1.159-.232-.34-.391-2.476-3.24-6.208,1.1C.056,3.166-.139,2.8.116,2.313Z",transform:"matrix(0.839, -0.545, 0.545, 0.839, 0, 4.321)",key:2}),n.createElement("path",{className:"itsec-icon-unknown-7e3b2__f",d:"M.116,2.313c.255-.49,4.387-4.951,7.662,0,0,.627-.254.874-1.159-.232-.34-.391-2.476-3.24-6.208,1.1C.056,3.166-.139,2.8.116,2.313Z",transform:"translate(33.008 0) rotate(22)",key:3}),n.createElement("path",{className:"itsec-icon-unknown-7e3b2__c",d:"M10.867,0c6,0,10.867,4.609,10.867,10.294S16.869,6.587,10.867,6.587,0,15.979,0,10.294,4.865,0,10.867,0Z",transform:"translate(10.309 19.787)",key:4})])]))])])}a.defaultProps={viewBox:"0 0 183 112.818"},e.exports=a,a.default=a},Nqg7:function(e,t,c){var n=c("cDcd");function a(e){return n.createElement("svg",e,[n.createElement("defs",{key:0},n.createElement("style",null,".itsec-icon-happy-2b2f7__cls-1{fill:#e5eaee;}.itsec-icon-happy-2b2f7__cls-2{fill:#e1f2fc;}.itsec-icon-happy-2b2f7__cls-2,.itsec-icon-happy-2b2f7__cls-6{stroke:#0083e3;}.itsec-icon-happy-2b2f7__cls-3,.itsec-icon-happy-2b2f7__cls-6{fill:#0083e3;}.itsec-icon-happy-2b2f7__cls-4{fill:#fff;}.itsec-icon-happy-2b2f7__cls-5{fill:none;}.itsec-icon-happy-2b2f7__cls-7{fill:#9ff;}")),n.createElement("g",{key:1},[n.createElement("ellipse",{className:"itsec-icon-happy-2b2f7__cls-1",cx:"91.5",cy:"109.16",rx:"91.5",ry:"21.5",key:0}),n.createElement("path",{className:"itsec-icon-happy-2b2f7__cls-2",d:"M30.55,18.35a4.47,4.47,0,0,0-4.48,4.47v80a3,3,0,0,0,3,3h124a3,3,0,0,0,3-3h0v-80a4.47,4.47,0,0,0-4.48-4.47Z",key:1}),n.createElement("path",{className:"itsec-icon-happy-2b2f7__cls-3",d:"M30.79,98.75H152.42V23.6H30.79Z",key:2}),n.createElement("path",{className:"itsec-icon-happy-2b2f7__cls-4",d:"M31.14,98.39H152.06V24H31.14Z",key:3}),n.createElement("path",{className:"itsec-icon-happy-2b2f7__cls-5",d:"M18,109.44a14.72,14.72,0,0,1-5.53-1.7l-.34-.16v-2.24h158v2.24l-.34.16a14.77,14.77,0,0,1-5.49,1.7Z",key:4}),n.createElement("path",{className:"itsec-icon-happy-2b2f7__cls-2",d:"M170.5,105.25H12V108c.18,0,3.57,1.93,6.15,1.93H164.39c2.57,0,5.92-1.94,6.1-1.94v-2.69Z",key:5}),n.createElement("path",{className:"itsec-icon-happy-2b2f7__cls-3",d:"M12.3,107.48l-.18.35H169.9l.18-.35Z",key:6}),n.createElement("path",{className:"itsec-icon-happy-2b2f7__cls-3",d:"M99.35,106.94h-18a1.75,1.75,0,0,1-1.74-1.76h0v0h21.55v0a1.74,1.74,0,0,1-1.73,1.76h0",key:7}),n.createElement("path",{className:"itsec-icon-happy-2b2f7__cls-3",d:"M91,21.43a.62.62,0,0,1-.62.62.62.62,0,0,1,0-1.24h0a.62.62,0,0,1,.62.62",key:8}),n.createElement("circle",{className:"itsec-icon-happy-2b2f7__cls-3",cx:"76.33",cy:"50.57",r:"1.82",key:9}),n.createElement("circle",{className:"itsec-icon-happy-2b2f7__cls-3",cx:"104.59",cy:"50.57",r:"1.82",key:10}),n.createElement("path",{className:"itsec-icon-happy-2b2f7__cls-6",d:"M71.66,45.83c-.06-.55,1-6.54,6.43-4.18.34.53.26.88-1.1.44-.5-.14-3.85-1.37-4.61,4.31C72.07,46.58,71.71,46.38,71.66,45.83Z",key:11}),n.createElement("path",{className:"itsec-icon-happy-2b2f7__cls-6",d:"M102.55,41.82c.42-.36,5.92-3,7.1,2.87-.23.58-.56.72-1-.65-.16-.49-1.08-3.93-6.16-1.3C102.17,42.59,102.13,42.18,102.55,41.82Z",key:12}),n.createElement("path",{className:"itsec-icon-happy-2b2f7__cls-3",d:"M91,74.58c-10.35,0-18.87-4.52-19.89-10.31A6.53,6.53,0,0,0,71,65.44c0,6.35,9,11.49,20,11.49s20-5.14,20-11.49a7.59,7.59,0,0,0-.1-1.17C109.88,70.06,101.36,74.58,91,74.58Z",key:13}),n.createElement("polygon",{className:"itsec-icon-happy-2b2f7__cls-3",points:"162.28 18.34 161.04 11.37 154.06 10.13 161.04 8.88 162.28 1.91 163.52 8.88 170.5 10.13 163.52 11.37 162.28 18.34",key:14}),n.createElement("polygon",{className:"itsec-icon-happy-2b2f7__cls-3",points:"175.93 17.99 175.5 15.56 173.06 15.13 175.5 14.69 175.93 12.26 176.36 14.69 178.8 15.13 176.36 15.56 175.93 17.99",key:15}),n.createElement("circle",{className:"itsec-icon-happy-2b2f7__cls-7",cx:"170.05",cy:"20.81",r:"2.38",key:16}),n.createElement("circle",{className:"itsec-icon-happy-2b2f7__cls-7",cx:"169.86",cy:"1.19",r:"1.19",key:17}),n.createElement("polygon",{className:"itsec-icon-happy-2b2f7__cls-3",points:"10.85 94.41 9.61 87.44 2.63 86.19 9.61 84.95 10.85 77.98 12.09 84.95 19.07 86.19 12.09 87.44 10.85 94.41",key:18}),n.createElement("circle",{className:"itsec-icon-happy-2b2f7__cls-7",cx:"15.62",cy:"96.88",r:"2.38",key:19}),n.createElement("circle",{className:"itsec-icon-happy-2b2f7__cls-7",cx:"15.43",cy:"77.26",r:"1.19",key:20})])])}a.defaultProps={viewBox:"0 0 183 130.66"},e.exports=a,a.default=a},QxRw:function(e,t,c){},SenV:function(e,t,c){},TB6c:function(e,t,c){var n=c("cDcd");function a(e){return n.createElement("svg",e,[n.createElement("g",{fill:"#FCDA28",key:0},[n.createElement("path",{d:"M102.41 40.58V8h-.001c0-.95-.77-1.73-1.71-1.74 0 0-37.21-6.04-49.62-6.26 -12.41-.22-49.3 6-49.3 6v0C.8 5.97.01 6.73-.01 7.69c-.01.01-.01.02-.01.04v32.84s-1.16 27.36 17.44 48.9c16.52 19.13 30.32 23.66 33.2 24.44v0c.36.07.74.07 1.11 0 2.92-.79 16.7-5.35 33.18-24.44 18.6-21.54 17.48-48.9 17.48-48.9Zm-25 43c-11.21 13-20.79 18.57-25.67 20.8v0c-.37.13-.78.13-1.14 0 -4.84-2.29-14.43-7.88-25.6-20.85C8.49 64.45 9.15 39.45 9.16 39.19v-25 0c.01-.37.25-.68.6-.78l0-.001c13.46-3.41 27.28-5.15 41.17-5.2h.71l0 0c13.82 0 27.6 1.74 41 5.18l-.001-.001c.34.1.58.41.6.78v25.06c.03.22.68 25.22-15.78 44.3Z",key:0}),n.createElement("path",{d:"M51.1 31.87v0c-4.9-.02-8.88 3.93-8.89 8.82 -.02 4.89 3.93 8.87 8.82 8.88 4.89.01 8.87-3.94 8.88-8.83 0-.01 0-.01 0-.01l-.001-.001c0-4.89-3.95-8.86-8.83-8.88Z",key:1}),n.createElement("path",{d:"M84.1 39.41v-18 0c-.02-.35-.26-.65-.59-.73v-.001c-10.48-2.19-21.16-3.28-31.86-3.28H51h-.001c-10.76.05-21.47 1.17-32 3.34v0c-.34.08-.58.38-.59.73v18.07c0 1.33 0 22.31 13.59 38 7.53 8.82 14.14 13.76 18.7 16.46h-.001c.31.15.68.15 1 0 4.53-2.69 11.14-7.63 18.77-16.46 13.94-16.11 13.63-37.88 13.63-38.13ZM63.51 71.6c-1.09 1.28-2.16 2.45-3.2 3.54 -.24.25-.43.17-.43-.18V67.4c0-5.72 5.55-8.63 7.38-9.43v0c.33-.16.56-.49.58-.86v-5.74h0c.03-.21-.11-.41-.32-.44 -.1-.02-.19 0-.27.05l-.001 0c-10.4 4.1-21.97 4.1-32.36.01v0c-.19-.11-.43-.05-.54.14 -.04.07-.06.15-.05.23v5.74 0c.02.36.25.69.59.84 6.08 2.33 7.32 6.29 7.32 9.52v7.42c0 .35-.19.43-.43.18q-1.53-1.6-3.16-3.48c-11.44-13.26-11.37-31.84-11.37-32v-10.6 0c.01-.36.27-.66.62-.72h0c7.6-1.2 15.29-1.81 23-1.83h.69v-.001c7.59 0 15.18.58 22.69 1.76v0c.35.06.61.36.62.72v10.3c-.001.35.11 19.08-11.38 32.37Z",key:2})]),n.createElement("g",{fill:"#002338",key:1},[n.createElement("path",{d:"M121 30.15v-.001c0 .39-.08.78-.24 1.15v0c-.16.34-.38.66-.65.93v0c-.29.27-.63.48-1 .62l0-.001c-.38.15-.78.22-1.18.23v-.001c-.82.01-1.61-.3-2.18-.87v0c-.58-.54-.9-1.28-.88-2.06l-.001-.001c-.01-.4.06-.79.23-1.15v-.001c.14-.36.36-.68.65-.93v0c.29-.27.63-.49 1-.63v0c.38-.18.79-.26 1.21-.25h-.001c.4 0 .8.07 1.18.23v0c.72.29 1.29.86 1.6 1.58v0c.16.36.25.75.26 1.15Zm-5.74 18.65V35.32h5.33V48.8Z",key:0}),n.createElement("path",{d:"M135 30.53V48.8h-5.6V30.53h-6.5v-4.75h18.57v4.75Z",key:1}),n.createElement("path",{d:"M153.79 48.8V40v0c0-.44-.03-.87-.09-1.3v0c-.06-.39-.19-.76-.38-1.09v0c-.18-.31-.43-.56-.73-.74v0c-.36-.21-.77-.3-1.17-.28v0c-.84-.05-1.65.33-2.15 1v-.001c-.52.71-.78 1.58-.74 2.46v8.75h-5.34v-24.58h5.34v10.44h.06v0c.43-.72 1.03-1.32 1.76-1.74v0c.86-.54 1.87-.8 2.89-.77v0c.96-.03 1.91.17 2.78.59v0c.71.35 1.33.87 1.82 1.51v0c.47.63.81 1.36 1 2.13v-.001c.2.78.31 1.59.31 2.41v10Z",key:2}),n.createElement("path",{d:"M179.26 40.9v.65 0c.01.2.01.41 0 .62h-11.78v0c.04.43.18.86.41 1.24v0c.22.38.52.72.88 1v0c.37.26.78.46 1.23.59v0c.44.15.91.22 1.38.23v0c.74.02 1.48-.15 2.15-.48v0c.56-.3 1.04-.71 1.43-1.21l3.71 2.34v0c-.76 1.1-1.8 1.97-3 2.55l0-.001c-1.37.62-2.85.92-4.34.89h0c-1.18 0-2.34-.19-3.45-.56l-.001-.001c-1.07-.36-2.04-.93-2.88-1.66v-.001c-.84-.75-1.49-1.67-1.92-2.69v0c-.49-1.16-.73-2.4-.7-3.64v0c-.02-1.24.21-2.46.68-3.59v0c.42-1.03 1.05-1.96 1.85-2.73v0c.79-.76 1.74-1.35 2.77-1.74l-.001 0c1.1-.42 2.27-.63 3.45-.62v0c1.12-.02 2.23.19 3.28.6v-.001c.98.38 1.86.97 2.59 1.74h-.001c.73.79 1.3 1.73 1.67 2.76v-.001c.41 1.19.61 2.44.59 3.71Zm-4.91-2v0c.01-.81-.28-1.58-.8-2.18v0c-.63-.65-1.5-.98-2.39-.91v0c-.49-.01-.98.08-1.43.25l-.001 0c-.42.14-.81.37-1.14.66v-.001c-.33.27-.59.61-.78 1h-.001c-.2.36-.31.76-.33 1.18Z",key:3}),n.createElement("path",{d:"M203.25 48.8V40h-.001c0-.45-.03-.89-.09-1.32v0c-.06-.39-.18-.75-.36-1.09v0c-.18-.3-.42-.55-.7-.73v-.001c-.35-.2-.75-.3-1.15-.28h0c-.42-.02-.83.09-1.19.3l-.001 0c-.34.19-.64.45-.85.78v0c-.24.34-.4.72-.5 1.12v-.001c-.11.43-.17.87-.16 1.32v8.7h-5.34v-9.23 0c.04-.78-.15-1.55-.55-2.21v0c-.41-.56-1.08-.87-1.76-.82v0c-.8-.05-1.56.33-2 1v-.001c-.49.73-.73 1.59-.7 2.47v8.79h-5.37v-16.19h5.17v2.24h.07 -.001c.2-.36.45-.7.73-1v-.001c.31-.35.69-.63 1.1-.85l0-.001c.43-.26.89-.47 1.38-.6v-.001c.54-.16 1.1-.24 1.67-.23l0-.001c1.04-.04 2.08.21 3 .72v-.001c.81.48 1.47 1.19 1.9 2.05v0c.52-.83 1.23-1.51 2.08-2v0c.94-.53 2.01-.79 3.09-.75h0c.96-.04 1.91.17 2.78.61v0c.71.37 1.33.9 1.81 1.56v0c.45.64.79 1.37 1 2.14v-.001c.19.76.3 1.54.31 2.33v10Z",key:4}),n.createElement("path",{d:"M228.68 40.9v.65 -.001c.01.2.01.41 0 .62h-11.77 0c.04.43.18.86.41 1.24v0c.22.38.52.72.88 1v-.001c.36.28.76.49 1.2.64h0c.44.15.91.22 1.38.23v0c.74.02 1.48-.15 2.15-.48v0c.55-.3 1.04-.71 1.43-1.21l3.71 2.34v0c-.76 1.09-1.8 1.97-3 2.55v0c-1.37.61-2.85.92-4.34.89h0c-1.18 0-2.34-.19-3.45-.56v0c-1.05-.37-2.02-.93-2.85-1.66v0c-.83-.75-1.48-1.67-1.91-2.69v-.001c-.49-1.16-.73-2.4-.7-3.64v0c-.03-1.24.21-2.46.68-3.59l0 0c.42-1.03 1.05-1.96 1.85-2.73v0c.79-.76 1.73-1.36 2.77-1.74h0c1.09-.42 2.26-.63 3.44-.62v0c1.12-.02 2.24.19 3.29.6v0c.97.38 1.85.97 2.57 1.74h-.001c.73.79 1.3 1.73 1.67 2.76v0c.4 1.17.6 2.41.59 3.66Zm-4.91-2h-.001c.01-.8-.27-1.58-.79-2.18v-.001c-.63-.65-1.5-.98-2.39-.91v0c-.49-.01-.98.08-1.43.25v0c-.42.14-.81.37-1.14.66v-.001c-.33.27-.59.61-.78 1v-.001c-.2.36-.31.76-.33 1.18Z",key:5}),n.createElement("path",{d:"M241.53 37.39v0c-.46-.42-.98-.75-1.53-1v0c-.58-.28-1.21-.43-1.85-.42h0c-.48-.01-.95.09-1.38.29v0c-.41.15-.67.56-.64 1v0c-.03.45.26.86.7 1v-.001c.73.27 1.49.49 2.26.65l0 0c.62.13 1.24.32 1.84.56v0c.6.22 1.16.54 1.67.94l-.001-.001c.49.38.9.87 1.21 1.43v-.001c.31.61.46 1.3.45 2v-.001c.02.89-.19 1.79-.62 2.58v-.001c-.41.67-.97 1.25-1.64 1.67v0c-.68.44-1.44.75-2.22.94v-.001c-.82.19-1.65.29-2.48.29l-.001-.001c-1.32-.01-2.63-.22-3.88-.63v-.001c-1.19-.38-2.28-1.02-3.17-1.87l3-3.15v0c.49.54 1.08.99 1.75 1.33v-.001c.68.34 1.44.51 2.21.52v0c.44-.01.88-.12 1.28-.31v0c.41-.2.67-.63.64-1.09l-.001-.001c0-.51-.32-.95-.79-1.11v0c-.79-.33-1.6-.58-2.43-.75h0c-.58-.14-1.15-.31-1.7-.52v0c-.55-.21-1.06-.5-1.51-.87v0c-.46-.39-.83-.85-1.09-1.37v0c-.3-.61-.44-1.28-.42-1.95v0c-.03-.88.18-1.74.62-2.49v0c.39-.67.94-1.24 1.59-1.67l-.001 0c.65-.46 1.38-.8 2.16-1v0c.76-.21 1.56-.31 2.36-.31l-.001-.001c1.2-.01 2.41.19 3.56.57h0c1.11.33 2.13.91 3 1.7Z",key:6}),n.createElement("path",{d:"M127.65 64.92h0c-.5-.63-1.14-1.13-1.87-1.45v-.001c-.7-.35-1.46-.53-2.23-.54v-.001c-.38-.01-.76.03-1.12.1l-.001 0c-.36.06-.7.19-1 .37v0c-.3.18-.56.43-.76.72v0c-.22.33-.33.72-.31 1.12v0c-.02.35.06.69.25 1h-.001c.17.27.42.51.71.68h-.001c.35.2.73.39 1.12.54 .44.16.92.33 1.47.5 .78.26 1.59.55 2.44.86v0c.82.3 1.59.72 2.3 1.25v0c.68.52 1.26 1.18 1.7 1.93v0c.47.88.71 1.87.68 2.88v0c.03 1.18-.22 2.36-.73 3.43v0c-.48.93-1.17 1.75-2 2.39v0c-.85.63-1.81 1.11-2.83 1.4v0c-1.07.3-2.18.45-3.28.45v-.001c-1.64 0-3.26-.29-4.78-.86v0c-1.46-.52-2.77-1.36-3.84-2.46l3.64-3.7h-.001c.61.72 1.37 1.31 2.23 1.74h-.001c.84.44 1.79.68 2.75.7h0c.4-.01.8-.05 1.2-.13h0c.35-.09.69-.23 1-.43v0c.29-.2.53-.47.69-.78v0c.18-.37.27-.77.26-1.17v0c.01-.4-.1-.78-.32-1.1v0c-.26-.34-.57-.62-.93-.83h0c-.47-.29-.97-.52-1.49-.68 -.6-.21-1.28-.43-2-.67h-.001c-.74-.25-1.46-.53-2.16-.85h0c-.69-.32-1.33-.74-1.88-1.25v-.001c-.57-.53-1.02-1.16-1.34-1.85v0c-.36-.84-.53-1.75-.5-2.65v0c-.04-1.15.23-2.29.78-3.29v0c.48-.89 1.17-1.66 2-2.24v0c.86-.6 1.83-1.04 2.86-1.29h-.001c1.05-.27 2.13-.41 3.22-.4v0c1.36 0 2.71.24 4 .71v-.001c1.31.45 2.52 1.17 3.56 2.12Z",key:7}),n.createElement("path",{d:"M150.48 74.05v.65 0c.01.2.01.41 0 .62H138.7v0c.04.43.18.86.41 1.24v0c.22.38.52.72.88 1v0c.36.27.76.48 1.2.63v0c.44.15.91.22 1.38.23v0c.74.02 1.48-.14 2.15-.47v-.001c.56-.3 1.05-.72 1.43-1.22l3.71 2.27v0c-.76 1.1-1.79 1.98-3 2.55v0c-1.37.62-2.85.93-4.34.9v0c-1.18 0-2.35-.19-3.45-.57v0c-1.05-.36-2.02-.93-2.84-1.66v0c-.83-.75-1.49-1.66-1.92-2.68v0c-.49-1.16-.73-2.4-.7-3.65v0c-.02-1.24.21-2.46.68-3.59v0c.85-2.07 2.52-3.69 4.62-4.47v0c1.1-.42 2.27-.63 3.45-.62v0c1.12-.02 2.23.19 3.28.6v0c.97.38 1.85.97 2.57 1.74v0c.74.79 1.3 1.74 1.67 2.77h-.001c.42 1.19.62 2.46.6 3.73Zm-4.91-2v0c.01-.81-.27-1.58-.8-2.18v0c-.63-.65-1.5-.98-2.39-.91v0c-.49-.01-.98.07-1.43.24l-.001 0c-.42.15-.81.37-1.14.67v0c-.33.27-.6.61-.78 1h-.001c-.19.35-.3.73-.33 1.13Z",key:8}),n.createElement("path",{d:"M165 71v-.001c-.33-.44-.76-.78-1.24-1v-.001c-.5-.23-1.05-.35-1.59-.35v0c-.53-.01-1.06.1-1.53.34v0c-.45.22-.85.53-1.17.91v0c-.33.39-.59.83-.76 1.32v-.001c-.2.5-.29 1.04-.28 1.59v0c-.01.54.08 1.07.26 1.59v-.001c.16.48.42.93.76 1.32v0c.33.37.74.68 1.21.89l-.001-.001c.49.22 1.03.33 1.58.33v0c.55-.01 1.09-.11 1.61-.31v0c.49-.19.93-.5 1.28-.89l3 3.61v-.001c-.75.69-1.64 1.21-2.6 1.52v0c-1.09.37-2.23.56-3.38.56v0c-1.23 0-2.44-.2-3.59-.59v0c-1.07-.37-2.06-.95-2.89-1.71v0c-.83-.76-1.49-1.69-1.93-2.71v0c-.94-2.31-.94-4.89 0-7.19v0c.44-1.03 1.1-1.96 1.93-2.71v0c.83-.77 1.82-1.36 2.89-1.73v0c1.13-.41 2.34-.61 3.55-.6h0c.58 0 1.16.05 1.74.16v0c.56.1 1.11.25 1.66.44v0c.5.17.99.41 1.46.69v0c.42.24.81.54 1.16.89Z",key:9}),n.createElement("path",{d:"M180.82 82v-2.29h-.07v0c-.21.36-.47.7-.76 1v0c-.33.33-.71.62-1.11.85v0c-.45.24-.92.44-1.4.58h-.001c-.53.15-1.07.23-1.61.23v0c-.95.03-1.89-.17-2.74-.58v0c-.72-.37-1.35-.89-1.83-1.52v0c-.48-.63-.82-1.35-1-2.11v0c-.21-.79-.32-1.61-.31-2.42v-10h5.36v8.78l0 0c0 .43.03.86.1 1.3v0c.05.38.18.76.37 1.11v0c.17.31.43.57.74.76v0c.36.2.78.3 1.2.28v0c.83.05 1.63-.33 2.13-1l0 0c.49-.72.75-1.57.73-2.44v-8.77h5.38V82Z",key:10}),n.createElement("path",{d:"M200.62 70.15v0c-.23-.07-.47-.11-.7-.13h-.67v0c-.63-.02-1.25.11-1.8.39v-.001c-.46.22-.86.54-1.17.94v0c-.29.35-.5.76-.63 1.2v0c-.13.36-.2.74-.2 1.13v8.32h-5.33v-16.22h5.14v2.34h.06v0c.4-.81 1.01-1.5 1.76-2v0c.77-.53 1.69-.8 2.63-.78q.33 0 .63 0v0c.17.01.34.04.51.1Z",key:11}),n.createElement("path",{d:"M218.41 69.73v6.2 0c-.05.6.1 1.21.44 1.72l-.001-.001c.4.42.98.63 1.57.57h0c.27-.01.55-.03.83-.07v0c.25-.02.5-.07.75-.15l.06 3.9v0c-.46.15-.93.26-1.4.34v0c-.56.09-1.13.14-1.69.15v0c-.93.02-1.86-.12-2.73-.41v-.001c-.69-.24-1.3-.64-1.77-1.17h-.001c-.48-.53-.82-1.16-1-1.83v0c-.21-.77-.31-1.57-.29-2.36v-6.89h-2.58v-4h2.57v-4.23h5.24v4.26h3.8v4Z",key:12}),n.createElement("path",{d:"M233.85 84.4l-.001-.001c-.3.78-.66 1.53-1.08 2.26h0c-.39.63-.88 1.2-1.44 1.69v0c-.6.47-1.28.83-2 1.05v0c-.86.25-1.76.37-2.65.36h0c-.52 0-1.03-.04-1.54-.1v0c-.47-.05-.93-.14-1.38-.26l.58-4.48v0c.28.08.56.15.86.21h0c.28.04.57.07.87.08h0c.64.05 1.28-.15 1.78-.57v0c.42-.47.74-1.02.95-1.61l.52-1.33 -6.72-15.94h5.92l3.61 10.41h.1l3.22-10.41h5.66Z",key:13}),n.createElement("path",{d:"M208.78 63.5v0c0 .39-.08.78-.24 1.15v-.001c-.16.34-.38.66-.65.93v-.001c-.29.27-.63.48-1 .62v0c-.38.15-.78.22-1.18.23h-.001c-.82.01-1.61-.3-2.18-.87v0c-.58-.54-.9-1.28-.88-2.06v0c-.01-.39.07-.77.23-1.12v0c.14-.36.36-.68.65-.93v0c.29-.27.63-.49 1-.63h0c.38-.18.79-.26 1.21-.25l-.001-.001c.4 0 .8.07 1.18.23v0c.37.13.71.34 1 .62v0c.27.26.49.58.65.93v0c.15.36.22.75.21 1.15Zm-5.72 18.66V68.67h5.33v13.49Z",key:14})])])}a.defaultProps={viewBox:"0 0 244.46 113.98"},e.exports=a,a.default=a},TXkB:function(e,t,c){"use strict";c.d(t,"i",(function(){return n})),c.d(t,"e",(function(){return r.a})),c.d(t,"c",(function(){return l.a})),c.d(t,"f",(function(){return o.a})),c.d(t,"d",(function(){return h.a})),c.d(t,"g",(function(){return m.a})),c.d(t,"b",(function(){return p.a})),c.d(t,"a",(function(){return b.a})),c.d(t,"h",(function(){return E.a})),c.d(t,"k",(function(){return g.a})),c.d(t,"j",(function(){return O.a})),c.d(t,"l",(function(){return M.a}));const n=Object.freeze(["#e67e22","#2ecc71","#3498db","#e74c3c","#8e44ad","#1abc9c","#2c3e50"]);var a=c("/RNi"),r=c.n(a),s=c("TB6c"),l=c.n(s),i=c("uGBA"),o=c.n(i),v=c("ik5Q"),h=c.n(v),d=c("mYB+"),m=c.n(d),u=c("Nqg7"),p=c.n(u),f=c("7yWr"),b=c.n(f),y=c("Ynj1"),E=c.n(y),k=c("Kx3k"),g=c.n(k),_=c("uv1S"),O=c.n(_),j=c("HmIg"),M=c.n(j)},Td6G:function(e,t,c){"use strict";c.d(t,"c",(function(){return p})),c.d(t,"b",(function(){return y})),c.d(t,"o",(function(){return k})),c.d(t,"m",(function(){return g})),c.d(t,"j",(function(){return _})),c.d(t,"e",(function(){return O})),c.d(t,"f",(function(){return j})),c.d(t,"d",(function(){return M})),c.d(t,"l",(function(){return Z})),c.d(t,"a",(function(){return N})),c.d(t,"i",(function(){return w})),c.d(t,"h",(function(){return C})),c.d(t,"g",(function(){return x})),c.d(t,"k",(function(){return I})),c.d(t,"n",(function(){return H}));var n=c("YLtl"),a=c("GRId"),r=c("Mmq9"),s=c("lSNA"),l=c.n(s),i=c("92Nh"),o=c.n(i),v=c("tmk3"),h=c.n(v);function d(e,t,c){!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,c)}var m=new WeakMap,u=new WeakMap;class p{constructor(){var e=this;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;d(this,m,{writable:!0,value:{}}),d(this,u,{writable:!0,value:{}}),l()(this,"add",(e,t)=>(h()(this,m)[e]||(h()(this,m)[e]=[]),h()(this,m)[e].push(t),this)),l()(this,"hasErrors",()=>this.getErrorCodes().length>0),l()(this,"getErrorCodes",()=>Object.keys(h()(this,m))),l()(this,"getErrorCode",()=>this.getErrorCodes()[0]),l()(this,"getErrorMessages",(function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;if(t)return h()(e,m)[t];const c=[];for(const t in h()(e,m))h()(e,m).hasOwnProperty(t)&&c.concat(h()(e,m)[t]);return c})),l()(this,"getErrorMessage",(function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;return t=t||e.getErrorCode(),e.getErrorMessages(t)[0]})),l()(this,"getErrorData",(function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;return t=t||e.getErrorCode(),h()(e,u)[t]})),l()(this,"getAllErrorMessages",()=>{const e=[];for(const t in h()(this,m))h()(this,m).hasOwnProperty(t)&&e.push(...h()(this,m)[t]);return e}),t&&(c&&(h()(this,m)[t]=[c]),n&&(h()(this,u)[t]=n))}static fromPHPObject(e){const t=new p;return o()(t,m,e.errors),o()(t,u,e.error_data),t}static fromApiError(e){const t=new p;if(h()(t,m)[e.code]=[e.message],h()(t,u)[e.code]=e.data,e.additional_errors)for(const c of e.additional_errors)h()(t,m)[c.code]=[c.message],h()(t,u)[c.code]=c.data;return t}}var f=c("l3Sj");class b extends Error{constructor(e){for(var t=arguments.length,c=new Array(t>1?t-1:0),n=1;n<t;n++)c[n-1]=arguments[n];super(e.message||Object(f.__)("An unknown error occurred.","better-wp-security"),...c),Error.captureStackTrace&&Error.captureStackTrace(this,b),this.__response=e;for(const t in e)e.hasOwnProperty(t)&&Object.defineProperty(this,t,{value:e[t],configurable:!0,enumerable:!0,writable:!0})}toString(){return this.__response.toString()}getResponse(){return this.__response}}c("LhCv");class y{constructor(e,t,c){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:[];l()(this,"type",void 0),l()(this,"error",void 0),l()(this,"data",void 0),l()(this,"success",void 0),l()(this,"info",void 0),l()(this,"warning",void 0),this.type=e,this.error=t,this.data=c,this.success=n,this.info=a,this.warning=r,Object.seal(this)}isSuccess(){return this.type===y.SUCCESS}static async fromResponse(e){const t=t=>{var c;const n=null===(c=e.headers)||void 0===c?void 0:c.get("X-Messages-"+t);return n?JSON.parse(n):[]},c=204!==e.status&&e.json?await e.json():null,n=O(c),a=n.hasErrors()?y.ERROR:y.SUCCESS,r=t("Success"),s=t("Info"),l=t("Warning");return new y(a,n,c,r,s,l)}}Object.defineProperty(y,"SUCCESS",{value:"success",writable:!1,enumerable:!1,configurable:!1}),Object.defineProperty(y,"ERROR",{value:"error",writable:!1,enumerable:!1,configurable:!1});const E=Object(a.createContext)({getUrl(e){e="settings"===e?"itsec":"itsec-"+e;const t=Object(r.removeQueryArgs)(document.location.href,...Object.keys(Object(r.getQueryArgs)(document.location.href)));return Object(r.addQueryArgs)(t,{page:e})}});function k(e){const{getUrl:t}=Object(a.useContext)(E);return t(e)}function g(e){if(e<=999)return e.toString();if(e<=9999){const t=(e/1e3).toFixed(1);return"0"===t.charAt(t.length-1)?t.replace(".0","k"):t+"k"}if(e<=99999)return e.toString().substring(0,2)+"k";if(e<=999999)return e.toString().substring(0,3)+"k";if(e<=9999999){const t=(e/1e6).toFixed(1);return"0"===t.charAt(t.length-1)?t.replace(".0","m"):t+"m"}if(e<=99999999)return e.toString().substring(0,2)+"m";if(e<=999999999)return e.toString().substring(0,3)+"m";if(e<=9999999999){const t=(e/1e9).toFixed(1);return"0"===t.charAt(t.length-1)?t.replace(".0","b"):t+"b"}return e}function _(e){if(!Object(n.isPlainObject)(e))return!1;const t=Object.keys(e);return 2===t.length&&(t.includes("errors")&&t.includes("error_data"))}function O(e){return e instanceof p?e:_(e)?p.fromPHPObject(e):function(e){if(!Object(n.isPlainObject)(e))return!1;const t=Object.keys(e);return(3===t.length||4===t.length)&&(!(4===t.length&&!t.includes("additional_errors"))&&(t.includes("code")&&t.includes("message")&&t.includes("data")))}(e)?p.fromApiError(e):new p}function j(e){const t={};for(const[c,n]of e)t[c]=n;return t}function M(e,t){const c=[[],[]];for(const n of e)c[t(n)?0:1].push(n);return c}function Z(e){if(e instanceof Error)throw e;throw new b(e)}const N="https://secure.gravatar.com/avatar/d7a973c7dab26985da5f961be7b74480?s=96&d=mm&f=y&r=g";function w(e,t){let c=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return Object(n.get)(e,["_links","self",0,"targetHints",t],c?void 0:[])}function C(e){return function(e,t){return Object(n.get)(e,["_links",t,0,"href"])}(e,"self")}function x(e,t){if(e&&e.links)for(const c of e.links)if(c.rel===t)return c}function I(e,t){if("object"!==e.type)return e;let c;for(const a in t)t.hasOwnProperty(a)&&"hidden"===t[a]["ui:widget"]&&(c||(c=Object(n.cloneDeep)(e)),delete c.properties[a]);return c||e}function H(e){let t=[];if(!e)return t;const c=e instanceof p?e:O(Object(n.pick)(e,["code","message","data"]));return"rest_invalid_param"===c.getErrorCode()&&(t=Object.values(c.getErrorData().params)),[...c.getAllErrorMessages(),...t]}},"UEi/":function(e,t,c){},"VM+Z":function(e,t,c){},Ynj1:function(e,t,c){var n=c("cDcd");function a(e){return n.createElement("svg",e,[n.createElement("defs",{key:0},n.createElement("style",null,".itsec-icon-no-data-6f8da__a{fill:#e5eaee;}.itsec-icon-no-data-6f8da__b{fill:#e1f2fc;}.itsec-icon-no-data-6f8da__b,.itsec-icon-no-data-6f8da__f,.itsec-icon-no-data-6f8da__h{stroke:#0083e3;}.itsec-icon-no-data-6f8da__c,.itsec-icon-no-data-6f8da__f,.itsec-icon-no-data-6f8da__g{fill:#0083e3;}.itsec-icon-no-data-6f8da__d{fill:#fff;}.itsec-icon-no-data-6f8da__e,.itsec-icon-no-data-6f8da__h{fill:none;}.itsec-icon-no-data-6f8da__g{font-size:46px;font-family:Quicksand-Bold, Quicksand;font-weight:700;}.itsec-icon-no-data-6f8da__h{stroke-linecap:round;stroke-width:2px;}")),n.createElement("g",{transform:"translate(-1004 -1753.023)",key:1},[n.createElement("ellipse",{className:"itsec-icon-no-data-6f8da__a",cx:"91.5",cy:"21.5",rx:"91.5",ry:"21.5",transform:"translate(1004 1858)",key:0}),n.createElement("path",{className:"itsec-icon-no-data-6f8da__b",d:"M348.982,304.5a4.479,4.479,0,0,0-4.482,4.475v79.981a2.985,2.985,0,0,0,2.988,2.983H471.514a2.985,2.985,0,0,0,2.988-2.983V308.975a4.479,4.479,0,0,0-4.482-4.475Z",transform:"translate(685.569 1484.182)",key:1}),n.createElement("path",{className:"itsec-icon-no-data-6f8da__c",d:"M371,409.152H492.632V334H371Z",transform:"translate(663.788 1459.936)",key:2}),n.createElement("path",{className:"itsec-icon-no-data-6f8da__d",d:"M373,410.439H493.919V336H373Z",transform:"translate(662.144 1458.292)",key:3}),n.createElement("path",{className:"itsec-icon-no-data-6f8da__e",d:"M271.875,797.1a14.793,14.793,0,0,1-5.537-1.7c-.151-.073-.258-.125-.338-.16V793H423.961v2.239c-.08.037-.187.087-.338.16a14.6,14.6,0,0,1-5.494,1.7H271.875Z",transform:"translate(750.089 1082.677)",key:4}),n.createElement("path",{className:"itsec-icon-no-data-6f8da__b",d:"M424,792.5H265.5v2.694c.183,0,3.565,1.936,6.153,1.936H417.885c2.57,0,5.927-1.941,6.1-1.941.005,0,.007-.016.007-.016Z",transform:"translate(750.5 1083.088)",key:5}),n.createElement("path",{className:"itsec-icon-no-data-6f8da__c",d:"M266.348,805l-.178.356H423.953l.178-.356Z",transform:"translate(749.949 1072.814)",key:6}),n.createElement("path",{className:"itsec-icon-no-data-6f8da__c",d:"M664.768,793.781H646.735A1.749,1.749,0,0,1,645,792.018V792h21.548v.018a1.749,1.749,0,0,1-1.736,1.763",transform:"translate(438.583 1083.499)",key:7}),n.createElement("path",{className:"itsec-icon-no-data-6f8da__c",d:"M703.417,318.953a.623.623,0,1,1-.623-.623.624.624,0,0,1,.623.623",transform:"translate(391.594 1472.815)",key:8}),n.createElement("circle",{className:"itsec-icon-no-data-6f8da__c",cx:"1.817",cy:"1.817",r:"1.817",transform:"translate(1078.516 1828.086)",key:9}),n.createElement("circle",{className:"itsec-icon-no-data-6f8da__c",cx:"1.817",cy:"1.817",r:"1.817",transform:"translate(1106.774 1828.086)",key:10}),n.createElement("path",{className:"itsec-icon-no-data-6f8da__f",d:"M.116,2.313c.255-.49,4.387-4.951,7.662,0,0,.627-.254.874-1.159-.232-.34-.391-2.476-3.24-6.208,1.1C.056,3.166-.139,2.8.116,2.313Z",transform:"matrix(0.839, -0.545, 0.545, 0.839, 1074.299, 1823.29)",key:11}),n.createElement("path",{className:"itsec-icon-no-data-6f8da__f",d:"M.116,2.313c.255-.49,4.387-4.951,7.662,0,0,.627-.254.874-1.159-.232-.34-.391-2.476-3.24-6.208,1.1C.056,3.166-.139,2.8.116,2.313Z",transform:"translate(1107.307 1818.969) rotate(22)",key:12}),n.createElement("text",{className:"itsec-icon-no-data-6f8da__g",transform:"matrix(0.799, 0.602, -0.602, 0.799, 1159.274, 1756.396)",key:13},n.createElement("tspan",{x:"8.879",y:"46"},"?")),n.createElement("text",{className:"itsec-icon-no-data-6f8da__g",transform:"translate(1111.348 1759.593) rotate(-9)",key:14},n.createElement("tspan",{x:"8.879",y:"46"},"?")),n.createElement("line",{className:"itsec-icon-no-data-6f8da__h",y1:"4",x2:"25",transform:"translate(1083.5 1842.5)",key:15})])])}a.defaultProps={viewBox:"0 0 188.817 147.977"},e.exports=a,a.default=a},"bJT+":function(e,t,c){},ik5Q:function(e,t,c){var n=c("cDcd");function a(e){return n.createElement("svg",e,n.createElement("g",{fill:"#FFF"},[n.createElement("path",{d:"M102.41 40.58V8h-.001c0-.95-.77-1.73-1.71-1.74 0 0-37.21-6.04-49.62-6.26 -12.41-.22-49.3 6-49.3 6v0C.8 5.97.01 6.73-.01 7.69c-.01.01-.01.02-.01.04v32.84s-1.16 27.36 17.44 48.9c16.52 19.13 30.32 23.66 33.2 24.44v0c.36.07.74.07 1.11 0 2.92-.79 16.7-5.35 33.18-24.44 18.6-21.54 17.48-48.9 17.48-48.9Zm-25 43c-11.21 13-20.79 18.57-25.67 20.8v0c-.37.13-.78.13-1.14 0 -4.84-2.29-14.43-7.88-25.6-20.85C8.49 64.45 9.15 39.45 9.16 39.19v-25 0c.01-.37.25-.68.6-.78l0-.001c13.46-3.41 27.28-5.15 41.17-5.2h.71l0 0c13.82 0 27.6 1.74 41 5.18l-.001-.001c.34.1.58.41.6.78v25.06c.03.22.68 25.22-15.78 44.3Z",key:0}),n.createElement("path",{d:"M51.1 31.87v0c-4.9-.02-8.88 3.93-8.89 8.82 -.02 4.89 3.93 8.87 8.82 8.88 4.89.01 8.87-3.94 8.88-8.83 0-.01 0-.01 0-.01l-.001-.001c0-4.89-3.95-8.86-8.83-8.88Z",key:1}),n.createElement("path",{d:"M84.1 39.41v-18 0c-.02-.35-.26-.65-.59-.73v-.001c-10.48-2.19-21.16-3.28-31.86-3.28H51h-.001c-10.76.05-21.47 1.17-32 3.34v0c-.34.08-.58.38-.59.73v18.07c0 1.33 0 22.31 13.59 38 7.53 8.82 14.14 13.76 18.7 16.46h-.001c.31.15.68.15 1 0 4.53-2.69 11.14-7.63 18.77-16.46 13.94-16.11 13.63-37.88 13.63-38.13ZM63.51 71.6c-1.09 1.28-2.16 2.45-3.2 3.54 -.24.25-.43.17-.43-.18V67.4c0-5.72 5.55-8.63 7.38-9.43v0c.33-.16.56-.49.58-.86v-5.74h0c.03-.21-.11-.41-.32-.44 -.1-.02-.19 0-.27.05l-.001 0c-10.4 4.1-21.97 4.1-32.36.01v0c-.19-.11-.43-.05-.54.14 -.04.07-.06.15-.05.23v5.74 0c.02.36.25.69.59.84 6.08 2.33 7.32 6.29 7.32 9.52v7.42c0 .35-.19.43-.43.18q-1.53-1.6-3.16-3.48c-11.44-13.26-11.37-31.84-11.37-32v-10.6 0c.01-.36.27-.66.62-.72h0c7.6-1.2 15.29-1.81 23-1.83h.69v-.001c7.59 0 15.18.58 22.69 1.76v0c.35.06.61.36.62.72v10.3c-.001.35.11 19.08-11.38 32.37Z",key:2}),n.createElement("path",{d:"M121 30.15v-.001c0 .39-.08.78-.24 1.15v0c-.16.34-.38.66-.65.93v0c-.29.27-.63.48-1 .62l0-.001c-.38.15-.78.22-1.18.23v-.001c-.82.01-1.61-.3-2.18-.87v0c-.58-.54-.9-1.28-.88-2.06l-.001-.001c-.01-.4.06-.79.23-1.15v-.001c.14-.36.36-.68.65-.93v0c.29-.27.63-.49 1-.63v0c.38-.18.79-.26 1.21-.25h-.001c.4 0 .8.07 1.18.23v0c.72.29 1.29.86 1.6 1.58v0c.16.36.25.75.26 1.15Zm-5.74 18.65V35.32h5.33V48.8Z",key:3}),n.createElement("path",{d:"M135 30.53V48.8h-5.6V30.53h-6.5v-4.75h18.57v4.75Z",key:4}),n.createElement("path",{d:"M153.79 48.8V40v0c0-.44-.03-.87-.09-1.3v0c-.06-.39-.19-.76-.38-1.09v0c-.18-.31-.43-.56-.73-.74v0c-.36-.21-.77-.3-1.17-.28v0c-.84-.05-1.65.33-2.15 1v-.001c-.52.71-.78 1.58-.74 2.46v8.75h-5.34v-24.58h5.34v10.44h.06v0c.43-.72 1.03-1.32 1.76-1.74v0c.86-.54 1.87-.8 2.89-.77v0c.96-.03 1.91.17 2.78.59v0c.71.35 1.33.87 1.82 1.51v0c.47.63.81 1.36 1 2.13v-.001c.2.78.31 1.59.31 2.41v10Z",key:5}),n.createElement("path",{d:"M179.26 40.9v.65 0c.01.2.01.41 0 .62h-11.78v0c.04.43.18.86.41 1.24v0c.22.38.52.72.88 1v0c.37.26.78.46 1.23.59v0c.44.15.91.22 1.38.23v0c.74.02 1.48-.15 2.15-.48v0c.56-.3 1.04-.71 1.43-1.21l3.71 2.34v0c-.76 1.1-1.8 1.97-3 2.55l0-.001c-1.37.62-2.85.92-4.34.89h0c-1.18 0-2.34-.19-3.45-.56l-.001-.001c-1.07-.36-2.04-.93-2.88-1.66v-.001c-.84-.75-1.49-1.67-1.92-2.69v0c-.49-1.16-.73-2.4-.7-3.64v0c-.02-1.24.21-2.46.68-3.59v0c.42-1.03 1.05-1.96 1.85-2.73v0c.79-.76 1.74-1.35 2.77-1.74l-.001 0c1.1-.42 2.27-.63 3.45-.62v0c1.12-.02 2.23.19 3.28.6v-.001c.98.38 1.86.97 2.59 1.74h-.001c.73.79 1.3 1.73 1.67 2.76v-.001c.41 1.19.61 2.44.59 3.71Zm-4.91-2v0c.01-.81-.28-1.58-.8-2.18v0c-.63-.65-1.5-.98-2.39-.91v0c-.49-.01-.98.08-1.43.25l-.001 0c-.42.14-.81.37-1.14.66v-.001c-.33.27-.59.61-.78 1h-.001c-.2.36-.31.76-.33 1.18Z",key:6}),n.createElement("path",{d:"M203.25 48.8V40h-.001c0-.45-.03-.89-.09-1.32v0c-.06-.39-.18-.75-.36-1.09v0c-.18-.3-.42-.55-.7-.73v-.001c-.35-.2-.75-.3-1.15-.28h0c-.42-.02-.83.09-1.19.3l-.001 0c-.34.19-.64.45-.85.78v0c-.24.34-.4.72-.5 1.12v-.001c-.11.43-.17.87-.16 1.32v8.7h-5.34v-9.23 0c.04-.78-.15-1.55-.55-2.21v0c-.41-.56-1.08-.87-1.76-.82v0c-.8-.05-1.56.33-2 1v-.001c-.49.73-.73 1.59-.7 2.47v8.79h-5.37v-16.19h5.17v2.24h.07 -.001c.2-.36.45-.7.73-1v-.001c.31-.35.69-.63 1.1-.85l0-.001c.43-.26.89-.47 1.38-.6v-.001c.54-.16 1.1-.24 1.67-.23l0-.001c1.04-.04 2.08.21 3 .72v-.001c.81.48 1.47 1.19 1.9 2.05v0c.52-.83 1.23-1.51 2.08-2v0c.94-.53 2.01-.79 3.09-.75h0c.96-.04 1.91.17 2.78.61v0c.71.37 1.33.9 1.81 1.56v0c.45.64.79 1.37 1 2.14v-.001c.19.76.3 1.54.31 2.33v10Z",key:7}),n.createElement("path",{d:"M228.68 40.9v.65 -.001c.01.2.01.41 0 .62h-11.77 0c.04.43.18.86.41 1.24v0c.22.38.52.72.88 1v-.001c.36.28.76.49 1.2.64h0c.44.15.91.22 1.38.23v0c.74.02 1.48-.15 2.15-.48v0c.55-.3 1.04-.71 1.43-1.21l3.71 2.34v0c-.76 1.09-1.8 1.97-3 2.55v0c-1.37.61-2.85.92-4.34.89h0c-1.18 0-2.34-.19-3.45-.56v0c-1.05-.37-2.02-.93-2.85-1.66v0c-.83-.75-1.48-1.67-1.91-2.69v-.001c-.49-1.16-.73-2.4-.7-3.64v0c-.03-1.24.21-2.46.68-3.59l0 0c.42-1.03 1.05-1.96 1.85-2.73v0c.79-.76 1.73-1.36 2.77-1.74h0c1.09-.42 2.26-.63 3.44-.62v0c1.12-.02 2.24.19 3.29.6v0c.97.38 1.85.97 2.57 1.74h-.001c.73.79 1.3 1.73 1.67 2.76v0c.4 1.17.6 2.41.59 3.66Zm-4.91-2h-.001c.01-.8-.27-1.58-.79-2.18v-.001c-.63-.65-1.5-.98-2.39-.91v0c-.49-.01-.98.08-1.43.25v0c-.42.14-.81.37-1.14.66v-.001c-.33.27-.59.61-.78 1v-.001c-.2.36-.31.76-.33 1.18Z",key:8}),n.createElement("path",{d:"M241.53 37.39v0c-.46-.42-.98-.75-1.53-1v0c-.58-.28-1.21-.43-1.85-.42h0c-.48-.01-.95.09-1.38.29v0c-.41.15-.67.56-.64 1v0c-.03.45.26.86.7 1v-.001c.73.27 1.49.49 2.26.65l0 0c.62.13 1.24.32 1.84.56v0c.6.22 1.16.54 1.67.94l-.001-.001c.49.38.9.87 1.21 1.43v-.001c.31.61.46 1.3.45 2v-.001c.02.89-.19 1.79-.62 2.58v-.001c-.41.67-.97 1.25-1.64 1.67v0c-.68.44-1.44.75-2.22.94v-.001c-.82.19-1.65.29-2.48.29l-.001-.001c-1.32-.01-2.63-.22-3.88-.63v-.001c-1.19-.38-2.28-1.02-3.17-1.87l3-3.15v0c.49.54 1.08.99 1.75 1.33v-.001c.68.34 1.44.51 2.21.52v0c.44-.01.88-.12 1.28-.31v0c.41-.2.67-.63.64-1.09l-.001-.001c0-.51-.32-.95-.79-1.11v0c-.79-.33-1.6-.58-2.43-.75h0c-.58-.14-1.15-.31-1.7-.52v0c-.55-.21-1.06-.5-1.51-.87v0c-.46-.39-.83-.85-1.09-1.37v0c-.3-.61-.44-1.28-.42-1.95v0c-.03-.88.18-1.74.62-2.49v0c.39-.67.94-1.24 1.59-1.67l-.001 0c.65-.46 1.38-.8 2.16-1v0c.76-.21 1.56-.31 2.36-.31l-.001-.001c1.2-.01 2.41.19 3.56.57h0c1.11.33 2.13.91 3 1.7Z",key:9}),n.createElement("path",{d:"M127.65 64.92h0c-.5-.63-1.14-1.13-1.87-1.45v-.001c-.7-.35-1.46-.53-2.23-.54v-.001c-.38-.01-.76.03-1.12.1l-.001 0c-.36.06-.7.19-1 .37v0c-.3.18-.56.43-.76.72v0c-.22.33-.33.72-.31 1.12v0c-.02.35.06.69.25 1h-.001c.17.27.42.51.71.68h-.001c.35.2.73.39 1.12.54 .44.16.92.33 1.47.5 .78.26 1.59.55 2.44.86v0c.82.3 1.59.72 2.3 1.25v0c.68.52 1.26 1.18 1.7 1.93v0c.47.88.71 1.87.68 2.88v0c.03 1.18-.22 2.36-.73 3.43v0c-.48.93-1.17 1.75-2 2.39v0c-.85.63-1.81 1.11-2.83 1.4v0c-1.07.3-2.18.45-3.28.45v-.001c-1.64 0-3.26-.29-4.78-.86v0c-1.46-.52-2.77-1.36-3.84-2.46l3.64-3.7h-.001c.61.72 1.37 1.31 2.23 1.74h-.001c.84.44 1.79.68 2.75.7h0c.4-.01.8-.05 1.2-.13h0c.35-.09.69-.23 1-.43v0c.29-.2.53-.47.69-.78v0c.18-.37.27-.77.26-1.17v0c.01-.4-.1-.78-.32-1.1v0c-.26-.34-.57-.62-.93-.83h0c-.47-.29-.97-.52-1.49-.68 -.6-.21-1.28-.43-2-.67h-.001c-.74-.25-1.46-.53-2.16-.85h0c-.69-.32-1.33-.74-1.88-1.25v-.001c-.57-.53-1.02-1.16-1.34-1.85v0c-.36-.84-.53-1.75-.5-2.65v0c-.04-1.15.23-2.29.78-3.29v0c.48-.89 1.17-1.66 2-2.24v0c.86-.6 1.83-1.04 2.86-1.29h-.001c1.05-.27 2.13-.41 3.22-.4v0c1.36 0 2.71.24 4 .71v-.001c1.31.45 2.52 1.17 3.56 2.12Z",key:10}),n.createElement("path",{d:"M150.48 74.05v.65 0c.01.2.01.41 0 .62H138.7v0c.04.43.18.86.41 1.24v0c.22.38.52.72.88 1v0c.36.27.76.48 1.2.63v0c.44.15.91.22 1.38.23v0c.74.02 1.48-.14 2.15-.47v-.001c.56-.3 1.05-.72 1.43-1.22l3.71 2.27v0c-.76 1.1-1.79 1.98-3 2.55v0c-1.37.62-2.85.93-4.34.9v0c-1.18 0-2.35-.19-3.45-.57v0c-1.05-.36-2.02-.93-2.84-1.66v0c-.83-.75-1.49-1.66-1.92-2.68v0c-.49-1.16-.73-2.4-.7-3.65v0c-.02-1.24.21-2.46.68-3.59v0c.85-2.07 2.52-3.69 4.62-4.47v0c1.1-.42 2.27-.63 3.45-.62v0c1.12-.02 2.23.19 3.28.6v0c.97.38 1.85.97 2.57 1.74v0c.74.79 1.3 1.74 1.67 2.77h-.001c.42 1.19.62 2.46.6 3.73Zm-4.91-2v0c.01-.81-.27-1.58-.8-2.18v0c-.63-.65-1.5-.98-2.39-.91v0c-.49-.01-.98.07-1.43.24l-.001 0c-.42.15-.81.37-1.14.67v0c-.33.27-.6.61-.78 1h-.001c-.19.35-.3.73-.33 1.13Z",key:11}),n.createElement("path",{d:"M165 71v-.001c-.33-.44-.76-.78-1.24-1v-.001c-.5-.23-1.05-.35-1.59-.35v0c-.53-.01-1.06.1-1.53.34v0c-.45.22-.85.53-1.17.91v0c-.33.39-.59.83-.76 1.32v-.001c-.2.5-.29 1.04-.28 1.59v0c-.01.54.08 1.07.26 1.59v-.001c.16.48.42.93.76 1.32v0c.33.37.74.68 1.21.89l-.001-.001c.49.22 1.03.33 1.58.33v0c.55-.01 1.09-.11 1.61-.31v0c.49-.19.93-.5 1.28-.89l3 3.61v-.001c-.75.69-1.64 1.21-2.6 1.52v0c-1.09.37-2.23.56-3.38.56v0c-1.23 0-2.44-.2-3.59-.59v0c-1.07-.37-2.06-.95-2.89-1.71v0c-.83-.76-1.49-1.69-1.93-2.71v0c-.94-2.31-.94-4.89 0-7.19v0c.44-1.03 1.1-1.96 1.93-2.71v0c.83-.77 1.82-1.36 2.89-1.73v0c1.13-.41 2.34-.61 3.55-.6h0c.58 0 1.16.05 1.74.16v0c.56.1 1.11.25 1.66.44v0c.5.17.99.41 1.46.69v0c.42.24.81.54 1.16.89Z",key:12}),n.createElement("path",{d:"M180.82 82v-2.29h-.07v0c-.21.36-.47.7-.76 1v0c-.33.33-.71.62-1.11.85v0c-.45.24-.92.44-1.4.58h-.001c-.53.15-1.07.23-1.61.23v0c-.95.03-1.89-.17-2.74-.58v0c-.72-.37-1.35-.89-1.83-1.52v0c-.48-.63-.82-1.35-1-2.11v0c-.21-.79-.32-1.61-.31-2.42v-10h5.36v8.78l0 0c0 .43.03.86.1 1.3v0c.05.38.18.76.37 1.11v0c.17.31.43.57.74.76v0c.36.2.78.3 1.2.28v0c.83.05 1.63-.33 2.13-1l0 0c.49-.72.75-1.57.73-2.44v-8.77h5.38V82Z",key:13}),n.createElement("path",{d:"M200.62 70.15v0c-.23-.07-.47-.11-.7-.13h-.67v0c-.63-.02-1.25.11-1.8.39v-.001c-.46.22-.86.54-1.17.94v0c-.29.35-.5.76-.63 1.2v0c-.13.36-.2.74-.2 1.13v8.32h-5.33v-16.22h5.14v2.34h.06v0c.4-.81 1.01-1.5 1.76-2v0c.77-.53 1.69-.8 2.63-.78q.33 0 .63 0v0c.17.01.34.04.51.1Z",key:14}),n.createElement("path",{d:"M218.41 69.73v6.2 0c-.05.6.1 1.21.44 1.72l-.001-.001c.4.42.98.63 1.57.57h0c.27-.01.55-.03.83-.07v0c.25-.02.5-.07.75-.15l.06 3.9v0c-.46.15-.93.26-1.4.34v0c-.56.09-1.13.14-1.69.15v0c-.93.02-1.86-.12-2.73-.41v-.001c-.69-.24-1.3-.64-1.77-1.17h-.001c-.48-.53-.82-1.16-1-1.83v0c-.21-.77-.31-1.57-.29-2.36v-6.89h-2.58v-4h2.57v-4.23h5.24v4.26h3.8v4Z",key:15}),n.createElement("path",{d:"M233.85 84.4l-.001-.001c-.3.78-.66 1.53-1.08 2.26h0c-.39.63-.88 1.2-1.44 1.69v0c-.6.47-1.28.83-2 1.05v0c-.86.25-1.76.37-2.65.36h0c-.52 0-1.03-.04-1.54-.1v0c-.47-.05-.93-.14-1.38-.26l.58-4.48v0c.28.08.56.15.86.21h0c.28.04.57.07.87.08h0c.64.05 1.28-.15 1.78-.57v0c.42-.47.74-1.02.95-1.61l.52-1.33 -6.72-15.94h5.92l3.61 10.41h.1l3.22-10.41h5.66Z",key:16}),n.createElement("path",{d:"M208.78 63.5v0c0 .39-.08.78-.24 1.15v-.001c-.16.34-.38.66-.65.93v-.001c-.29.27-.63.48-1 .62v0c-.38.15-.78.22-1.18.23h-.001c-.82.01-1.61-.3-2.18-.87v0c-.58-.54-.9-1.28-.88-2.06v0c-.01-.39.07-.77.23-1.12v0c.14-.36.36-.68.65-.93v0c.29-.27.63-.49 1-.63h0c.38-.18.79-.26 1.21-.25l-.001-.001c.4 0 .8.07 1.18.23v0c.37.13.71.34 1 .62v0c.27.26.49.58.65.93v0c.15.36.22.75.21 1.15Zm-5.72 18.66V68.67h5.33v13.49Z",key:17})]))}a.defaultProps={viewBox:"0 0 244.46 113.98"},e.exports=a,a.default=a},ilPL:function(e,t,c){},"jSk+":function(e,t,c){},jnSk:function(e,t,c){},lSb6:function(e,t,c){},"mYB+":function(e,t,c){var n=c("cDcd");function a(e){return n.createElement("svg",e,n.createElement("g",{fill:"#0083E3"},[n.createElement("path",{d:"M102.41 40.58V8h-.001c0-.95-.77-1.73-1.71-1.74 0 0-37.21-6.04-49.62-6.26 -12.41-.22-49.3 6-49.3 6v0C.8 5.97.01 6.73-.01 7.69c-.01.01-.01.02-.01.04v32.84s-1.16 27.36 17.44 48.9c16.52 19.13 30.32 23.66 33.2 24.44v0c.36.07.74.07 1.11 0 2.92-.79 16.7-5.35 33.18-24.44 18.6-21.54 17.48-48.9 17.48-48.9Zm-25 43c-11.21 13-20.79 18.57-25.67 20.8v0c-.37.13-.78.13-1.14 0 -4.84-2.29-14.43-7.88-25.6-20.85C8.49 64.45 9.15 39.45 9.16 39.19v-25 0c.01-.37.25-.68.6-.78l0-.001c13.46-3.41 27.28-5.15 41.17-5.2h.71l0 0c13.82 0 27.6 1.74 41 5.18l-.001-.001c.34.1.58.41.6.78v25.06c.03.22.68 25.22-15.78 44.3Z",key:0}),n.createElement("path",{d:"M51.1 31.87v0c-4.9-.02-8.88 3.93-8.89 8.82 -.02 4.89 3.93 8.87 8.82 8.88 4.89.01 8.87-3.94 8.88-8.83 0-.01 0-.01 0-.01l-.001-.001c0-4.89-3.95-8.86-8.83-8.88Z",key:1}),n.createElement("path",{d:"M84.1 39.41v-18 0c-.02-.35-.26-.65-.59-.73v-.001c-10.48-2.19-21.16-3.28-31.86-3.28H51h-.001c-10.76.05-21.47 1.17-32 3.34v0c-.34.08-.58.38-.59.73v18.07c0 1.33 0 22.31 13.59 38 7.53 8.82 14.14 13.76 18.7 16.46h-.001c.31.15.68.15 1 0 4.53-2.69 11.14-7.63 18.77-16.46 13.94-16.11 13.63-37.88 13.63-38.13ZM63.51 71.6c-1.09 1.28-2.16 2.45-3.2 3.54 -.24.25-.43.17-.43-.18V67.4c0-5.72 5.55-8.63 7.38-9.43v0c.33-.16.56-.49.58-.86v-5.74h0c.03-.21-.11-.41-.32-.44 -.1-.02-.19 0-.27.05l-.001 0c-10.4 4.1-21.97 4.1-32.36.01v0c-.19-.11-.43-.05-.54.14 -.04.07-.06.15-.05.23v5.74 0c.02.36.25.69.59.84 6.08 2.33 7.32 6.29 7.32 9.52v7.42c0 .35-.19.43-.43.18q-1.53-1.6-3.16-3.48c-11.44-13.26-11.37-31.84-11.37-32v-10.6 0c.01-.36.27-.66.62-.72h0c7.6-1.2 15.29-1.81 23-1.83h.69v-.001c7.59 0 15.18.58 22.69 1.76v0c.35.06.61.36.62.72v10.3c-.001.35.11 19.08-11.38 32.37Z",key:2})]))}a.defaultProps={viewBox:"0 0 102.43 113.98"},e.exports=a,a.default=a},"oaS/":function(e,t,c){},ppSj:function(e,t,c){"use strict";c.d(t,"k",(function(){return l})),c.d(t,"g",(function(){return o})),c.d(t,"h",(function(){return v})),c.d(t,"j",(function(){return m})),c.d(t,"i",(function(){return u})),c.d(t,"f",(function(){return f})),c.d(t,"a",(function(){return b})),c.d(t,"b",(function(){return y})),c.d(t,"c",(function(){return k})),c.d(t,"d",(function(){return g})),c.d(t,"e",(function(){return _}));var n=c("pVnL"),a=c.n(n),r=c("GRId"),s=c("K9lf");function l(e){return Object(s.createHigherOrderComponent)(t=>class extends r.Component{render(){return Object(r.createElement)(t,a()({},this.props,e))}},"withProps")}var i=c("YLtl");
2
+ /**
3
+ * Higher-order component that debounces an action.
4
+ *
5
+ * @license https://github.com/deepsweet/hocs/tree/master/packages/debounce-handler (MIT)
6
+ *
7
+ * @param {string} handlerName
8
+ * @param {number|Function} wait
9
+ * @param {Object} [options]
10
+ * @return {WPComponent} Debounced component.
11
+ */function o(e,t){let c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object(s.createHigherOrderComponent)(n=>class extends r.Component{constructor(){var n;super(...arguments),n=this,this.debouncedPropInvoke=Object(i.debounce)((function(){return n.props[e](...arguments)}),"function"==typeof t?t(this.props):t,c),this.handler=function(e){e&&"function"==typeof e.persist&&e.persist();for(var t=arguments.length,c=new Array(t>1?t-1:0),a=1;a<t;a++)c[a-1]=arguments[a];return n.debouncedPropInvoke(e,...c)}}componentWillUnmount(){this.debouncedPropInvoke.cancel()}render(){const t={...this.props,[e]:this.handler};return Object(r.createElement)(n,t)}},"withDebounceHandler")}function v(e,t){let c;return c=Object(i.isFunction)(t)?[{delay:e,cb:t}]:e,Object(s.createHigherOrderComponent)(e=>class extends r.Component{constructor(){super(...arguments),this.intervalIds=[]}componentDidMount(){for(const e of c)(t=>{this.intervalIds.push(setInterval(()=>t(this.props),e.delay))})(e.cb)}componentWillUnmount(){this.intervalIds.forEach(clearInterval)}render(){return Object(r.createElement)(e,this.props)}},"withInterval")}var h=c("lSNA"),d=c.n(h);Object(s.createHigherOrderComponent)(e=>{var t;return t=class extends r.Component{constructor(){super(...arguments),d()(this,"state",{width:1280}),d()(this,"mounted",!1),d()(this,"ref",null),d()(this,"onWindowResize",()=>{if(!this.mounted)return;const e=Object(r.findDOMNode)(this);if(e instanceof window.HTMLElement){const t=e.offsetWidth;this.setState({width:t})}})}componentDidMount(){this.mounted=!0,window.addEventListener("resize",this.onWindowResize),document.getElementById("collapse-button").addEventListener("click",this.onWindowResize),this.onWindowResize()}componentWillUnmount(){this.mounted=!1,window.removeEventListener("resize",this.onWindowResize),document.getElementById("collapse-button").removeEventListener("click",this.onWindowResize)}render(){const{measureBeforeMount:t,...c}=this.props;return t&&!this.mounted?Object(r.createElement)("div",{className:this.props.className,style:this.props.style}):Object(r.createElement)(e,a()({},c,{width:this.state.width+20}))}},d()(t,"defaultProps",{measureBeforeMount:!1}),t},"withWidth");var m=Object(s.createHigherOrderComponent)(e=>class extends r.Component{constructor(){super(...arguments),d()(this,"state",{pressed:{shift:!1,ctrl:!1,meta:!1,alt:!1}}),d()(this,"mounted",!1),this.listener=this.listener.bind(this),this.onBlur=this.onBlur.bind(this)}componentDidMount(){this.mounted=!0,window.addEventListener("keydown",this.listener),window.addEventListener("keyup",this.listener),window.addEventListener("click",this.listener),window.addEventListener("blur",this.onBlur)}componentWillUnmount(){this.mounted=!1,window.removeEventListener("keydown",this.listener),window.removeEventListener("keyup",this.listener),window.removeEventListener("click",this.listener),window.removeEventListener("blur",this.onBlur)}listener(e){this.mounted&&this.setState({pressed:{shift:e.shiftKey,ctrl:e.ctrlKey,meta:e.metaKey,alt:e.altKey}})}onBlur(){this.setState({pressed:{shift:!1,ctrl:!1,meta:!1,alt:!1}})}render(){return Object(r.createElement)(e,a()({pressedModifierKeys:this.state.pressed},this.props))}},"withPressedModifierKeys");var u=Object(s.createHigherOrderComponent)(e=>function(t){let{navigate:c,...n}=t;return Object(r.createElement)(e,a()({},n,{onClick:e=>{try{n.onClick&&n.onClick(e)}catch(t){throw e.preventDefault(),t}e.defaultPrevented||0!==e.button||n.target&&"_self"!==n.target||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)||(e.preventDefault(),c())}}))},"withNavigate");const p=new WeakMap;function f(e,t){Object(r.useLayoutEffect)(()=>{p.has(e)||(t(),p.set(e,!0))},[])}function b(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const[c,n]=Object(r.useState)("idle"),[a,s]=Object(r.useState)(null),[l,i]=Object(r.useState)(null),o=Object(r.useCallback)((function(){return n("pending"),i(null),e(...arguments).then(e=>{s(e),n("success")}).catch(e=>{i(e),s(null),n("error")})}),[e]);return Object(r.useEffect)(()=>{t&&o()},[o,t]),{execute:o,status:c,value:a,error:l}}function y(e,t){let c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window;const n=Object(r.useRef)();Object(r.useEffect)(()=>{n.current=t},[t]),Object(r.useEffect)(()=>{if(!c||!c.addEventListener)return;const t=e=>n.current(e);return c.addEventListener(e,t),()=>c.removeEventListener(e,t)},[e,c])}const E=["button","submit"];function k(e){const t=Object(r.useRef)(e);Object(r.useEffect)(()=>{t.current=e},[e]);const c=Object(r.useRef)(!1),n=Object(r.useRef)(),a=Object(r.useCallback)(()=>{clearTimeout(n.current)},[]);Object(r.useEffect)(()=>()=>a(),[]),Object(r.useEffect)(()=>{e||a()},[e,a]);const s=Object(r.useCallback)(e=>{const{type:t,target:n}=e;Object(i.includes)(["mouseup","touchend"],t)?c.current=!1:function(e){if(!(e instanceof window.HTMLElement))return!1;switch(e.nodeName){case"A":case"BUTTON":return!0;case"INPUT":return Object(i.includes)(E,e.type)}return!1}(n)&&(c.current=!0)},[]),l=Object(r.useCallback)(e=>{e.persist(),c.current||(n.current=setTimeout(()=>{document.hasFocus()?"function"==typeof t.current&&t.current(e):e.preventDefault()},0))},[]);return{onFocus:a,onMouseDown:s,onMouseUp:s,onTouchStart:s,onTouchEnd:s,onBlur:l}}function g(e,t){const[c,n]=Object(r.useState)(()=>{try{const c=window.localStorage.getItem(e);return c?JSON.parse(c):t}catch(e){return console.error(e),t}});return[c,t=>{try{const a=t instanceof Function?t(c):t;n(a),window.localStorage.setItem(e,JSON.stringify(a))}catch(e){console.error(e)}}]}function _(e){const t=Object(r.useRef)(null),c=Object(r.useRef)(!1),n=Object(r.useRef)(e),a=Object(r.useRef)(e);return a.current=e,Object(r.useLayoutEffect)(()=>{e.forEach((e,a)=>{const r=n.current[a];"function"==typeof e&&e!==r&&!1===c.current&&(r(null),e(t.current))}),n.current=e},e),Object(r.useLayoutEffect)(()=>{c.current=!1}),Object(r.useCallback)(e=>{t.current=e,c.current=!0;(e?a.current:n.current).forEach(t=>{"function"==typeof t?t(e):t&&t.hasOwnProperty("current")&&(t.current=e)})},[])}},uGBA:function(e,t,c){var n=c("cDcd");function a(e){return n.createElement("svg",e,n.createElement("g",{fill:"#FFF"},[n.createElement("path",{d:"M102.41 40.58V8h-.001c0-.95-.77-1.73-1.71-1.74 0 0-37.21-6.04-49.62-6.26 -12.41-.22-49.3 6-49.3 6v0C.8 5.97.01 6.73-.01 7.69c-.01.01-.01.02-.01.04v32.84s-1.16 27.36 17.44 48.9c16.52 19.13 30.32 23.66 33.2 24.44v0c.36.07.74.07 1.11 0 2.92-.79 16.7-5.35 33.18-24.44 18.6-21.54 17.48-48.9 17.48-48.9Zm-25 43c-11.21 13-20.79 18.57-25.67 20.8v0c-.37.13-.78.13-1.14 0 -4.84-2.29-14.43-7.88-25.6-20.85C8.49 64.45 9.15 39.45 9.16 39.19v-25 0c.01-.37.25-.68.6-.78l0-.001c13.46-3.41 27.28-5.15 41.17-5.2h.71l0 0c13.82 0 27.6 1.74 41 5.18l-.001-.001c.34.1.58.41.6.78v25.06c.03.22.68 25.22-15.78 44.3Z",key:0}),n.createElement("path",{d:"M51.1 31.87v0c-4.9-.02-8.88 3.93-8.89 8.82 -.02 4.89 3.93 8.87 8.82 8.88 4.89.01 8.87-3.94 8.88-8.83 0-.01 0-.01 0-.01l-.001-.001c0-4.89-3.95-8.86-8.83-8.88Z",key:1}),n.createElement("path",{d:"M84.1 39.41v-18 0c-.02-.35-.26-.65-.59-.73v-.001c-10.48-2.19-21.16-3.28-31.86-3.28H51h-.001c-10.76.05-21.47 1.17-32 3.34v0c-.34.08-.58.38-.59.73v18.07c0 1.33 0 22.31 13.59 38 7.53 8.82 14.14 13.76 18.7 16.46h-.001c.31.15.68.15 1 0 4.53-2.69 11.14-7.63 18.77-16.46 13.94-16.11 13.63-37.88 13.63-38.13ZM63.51 71.6c-1.09 1.28-2.16 2.45-3.2 3.54 -.24.25-.43.17-.43-.18V67.4c0-5.72 5.55-8.63 7.38-9.43v0c.33-.16.56-.49.58-.86v-5.74h0c.03-.21-.11-.41-.32-.44 -.1-.02-.19 0-.27.05l-.001 0c-10.4 4.1-21.97 4.1-32.36.01v0c-.19-.11-.43-.05-.54.14 -.04.07-.06.15-.05.23v5.74 0c.02.36.25.69.59.84 6.08 2.33 7.32 6.29 7.32 9.52v7.42c0 .35-.19.43-.43.18q-1.53-1.6-3.16-3.48c-11.44-13.26-11.37-31.84-11.37-32v-10.6 0c.01-.36.27-.66.62-.72h0c7.6-1.2 15.29-1.81 23-1.83h.69v-.001c7.59 0 15.18.58 22.69 1.76v0c.35.06.61.36.62.72v10.3c-.001.35.11 19.08-11.38 32.37Z",key:2}),n.createElement("path",{d:"M133 86.24v0c.03 1.17-.23 2.34-.75 3.4v0c-.48.89-1.17 1.66-2 2.23v0c-.9.58-1.89.99-2.92 1.23v0c-1.14.26-2.29.39-3.45.39h-2.76v8.68h-5.56v-23h8.45v0c1.18-.01 2.37.11 3.53.37v-.001c1.02.21 1.99.62 2.86 1.21l0-.001c.81.55 1.47 1.3 1.92 2.18v0c.48 1.03.72 2.16.68 3.31Zm-5.56 0h0c.01-.47-.1-.93-.33-1.33v0c-.21-.35-.52-.63-.87-.81v0c-.4-.21-.82-.34-1.26-.39v0c-.48-.07-.96-.11-1.44-.1h-2.44v5.43h2.34v0c.49 0 .99-.05 1.49-.13v0c.45-.08.88-.24 1.29-.46v0c.36-.2.67-.5.89-.86v0c.21-.41.3-.87.28-1.32Z",key:3}),n.createElement("path",{d:"M145.11 90.37v0c-.23-.07-.47-.12-.7-.13h-.66l0-.001c-.63-.03-1.25.11-1.81.39v0c-.46.22-.86.54-1.17.94v-.001c-.29.35-.51.76-.63 1.2v0c-.13.36-.19.74-.2 1.13v8.3h-5.33v-16.2h5.14v2.34h.06v0c.4-.81 1.01-1.5 1.76-2v0c.77-.53 1.69-.81 2.63-.79v0c.21-.02.42-.02.64 0v0c.16.01.33.04.5.09Z",key:4}),n.createElement("path",{d:"M164.07 94v0c.01 1.23-.23 2.46-.72 3.6v0c-.45 1.03-1.12 1.96-1.95 2.73v-.001c-.84.75-1.81 1.34-2.86 1.74h-.001c-2.25.81-4.7.81-6.94-.001v-.001c-1.06-.4-2.03-.99-2.86-1.74v0c-.83-.77-1.49-1.7-1.94-2.73v0c-.49-1.14-.73-2.37-.71-3.6v0c-.02-1.23.22-2.45.71-3.58v0c.45-1.03 1.11-1.95 1.94-2.7v0c.82-.76 1.8-1.35 2.86-1.72v0c2.24-.78 4.69-.78 6.94-.001v0c1.05.37 2.02.94 2.86 1.69h0c.83.74 1.5 1.67 1.95 2.7v0c.49 1.13.74 2.36.72 3.61Zm-5.14 0v0c0-.53-.09-1.04-.26-1.53v0c-.17-.49-.42-.93-.75-1.31v0c-.34-.39-.75-.71-1.2-.93v0c-1.54-.77-3.4-.39-4.5.93h-.001c-.33.38-.57.82-.72 1.31v0c-.32.99-.32 2.06 0 3.06v0c.15.49.4.94.73 1.35v0c.32.41.73.75 1.21 1v0c1.05.47 2.25.47 3.31 0v0c.47-.25.88-.59 1.21-1v0c.32-.41.57-.86.73-1.35v0c.15-.5.23-1.02.24-1.53Z",key:5}),n.createElement("path",{d:"M121 17.21v0c0 .39-.08.79-.24 1.16v0c-.32.71-.9 1.27-1.63 1.54l-.001 0c-1.15.46-2.46.21-3.36-.63v-.001c-.58-.54-.9-1.29-.88-2.07v0c-.01-.39.07-.77.23-1.12v-.001c.14-.36.36-.67.65-.92v-.001c.29-.28.63-.49 1-.64v0c.76-.32 1.62-.32 2.39 0v0c.73.26 1.31.82 1.63 1.54v0c.14.36.22.74.21 1.14Zm-5.72 18.66V22.39h5.33v13.48Z",key:6}),n.createElement("path",{d:"M135 17.59v18.28h-5.6V17.59h-6.5v-4.74h18.57v4.74Z",key:7}),n.createElement("path",{d:"M153.79 35.87v-8.78 0c0-.44-.03-.87-.09-1.3v0c-.06-.39-.19-.76-.38-1.09v0c-.18-.31-.43-.57-.73-.75v0c-.36-.2-.77-.29-1.17-.27v-.001c-.84-.05-1.65.33-2.15 1v-.001c-.52.71-.78 1.57-.74 2.45v8.75h-5.34V11.28h5.34v10.43h.06v0c.43-.72 1.03-1.31 1.76-1.72v0c.87-.53 1.87-.79 2.89-.76v0c.96-.03 1.91.17 2.78.59v0c.71.35 1.33.87 1.82 1.51v0c.47.63.81 1.36 1 2.13v-.001c.2.78.31 1.58.31 2.4v10Z",key:8}),n.createElement("path",{d:"M179.26 28v.65 -.001c.01.2.01.41 0 .62h-11.78v-.001c.04.43.18.85.41 1.23v-.001c.22.38.52.72.88 1v-.001c.36.27.77.48 1.2.64l-.001-.001c.44.14.91.22 1.38.22v0c.74.02 1.48-.14 2.15-.47v0c.56-.3 1.05-.71 1.43-1.22l3.71 2.34v0c-.76 1.1-1.79 1.98-3 2.56v-.001c-1.37.61-2.85.92-4.34.89h-.001c-1.18 0-2.35-.19-3.45-.57v-.001c-1.06-.38-2.03-.97-2.85-1.73l0 0c-.84-.74-1.49-1.66-1.92-2.68v0c-.49-1.16-.73-2.4-.7-3.64l-.001-.001c-.02-1.24.21-2.46.68-3.6l0 0c.42-1.03 1.05-1.96 1.85-2.73l0 0c.8-.76 1.74-1.35 2.77-1.74v0c1.1-.42 2.27-.63 3.45-.61v0c1.12-.02 2.23.19 3.28.6v0c.98.38 1.86.97 2.59 1.74l-.001-.001c.73.79 1.3 1.73 1.67 2.76v0c.42 1.2.62 2.46.59 3.74Zm-4.91-2v0c.01-.81-.28-1.58-.8-2.18v0c-.63-.65-1.5-.98-2.39-.91v0c-.49-.01-.98.07-1.43.24l0-.001c-.42.15-.81.38-1.14.67v-.001c-.33.27-.6.61-.78 1v0c-.2.36-.31.77-.33 1.19Z",key:9}),n.createElement("path",{d:"M203.25 35.87V27h-.001c0-.45-.03-.89-.09-1.32v0c-.06-.39-.18-.76-.36-1.09v0c-.17-.3-.41-.56-.7-.73v0c-.35-.21-.75-.31-1.15-.28v0c-.42-.01-.83.09-1.19.29v0c-.34.19-.63.46-.85.78v0c-.24.34-.4.72-.5 1.13h0c-.11.42-.17.86-.16 1.31v8.75h-5.34v-9.2 0c.04-.78-.15-1.56-.55-2.22v0c-.41-.56-1.08-.87-1.76-.81v0c-.8-.05-1.56.33-2 1V24.6c-.49.72-.74 1.59-.7 2.47v8.78h-5.37V19.67h5.17v2.24h.07v0c.2-.36.45-.7.73-1v-.001c.3-.34.66-.63 1.06-.86l-.001 0c.43-.26.89-.47 1.38-.6l-.001 0c.54-.16 1.1-.24 1.67-.23h0c1.04-.04 2.08.21 3 .72v0c.81.46 1.47 1.16 1.9 2l-.001-.001c.52-.83 1.23-1.51 2.08-2l0-.001c.94-.53 2.01-.79 3.09-.75v0c.96-.04 1.91.17 2.78.6v0c.71.37 1.33.9 1.81 1.56v0c.45.65.79 1.37 1 2.15V23.5c.19.75.3 1.53.31 2.32v10Z",key:10}),n.createElement("path",{d:"M228.68 28v.65 0c.01.2.01.41 0 .62h-11.77l0-.001c.04.43.18.85.41 1.23v-.001c.22.38.52.72.88 1v0c.36.27.76.48 1.2.64v0c.44.14.91.22 1.38.22v0c.74.02 1.48-.14 2.15-.47v0c.56-.3 1.05-.72 1.43-1.22l3.71 2.34v0c-.76 1.1-1.8 1.98-3 2.56h-.001c-1.37.61-2.85.91-4.34.89v0c-1.18 0-2.35-.19-3.45-.57l-.001-.001c-1.05-.37-2.02-.93-2.85-1.66l0-.001c-.83-.75-1.48-1.66-1.91-2.68v0c-.49-1.16-.73-2.4-.7-3.64v0c-.02-1.24.21-2.46.68-3.6l0 0c.42-1.03 1.05-1.96 1.85-2.73v0c.8-.76 1.74-1.35 2.77-1.74v0c1.09-.42 2.26-.63 3.44-.61v0c1.12-.02 2.24.19 3.29.6v0c.97.38 1.85.97 2.57 1.74l-.001-.001c.73.79 1.3 1.73 1.67 2.76v0c.4 1.17.6 2.42.59 3.67Zm-4.91-2v-.001c.01-.8-.27-1.58-.79-2.18v-.001c-.63-.65-1.5-.98-2.39-.91v0c-.49-.01-.98.07-1.43.24v0c-.42.15-.81.38-1.14.67l-.001-.001c-.33.27-.6.61-.78 1v0c-.2.36-.31.77-.33 1.19Z",key:11}),n.createElement("path",{d:"M241.53 24.46l-.001-.001c-.46-.42-.97-.76-1.53-1v-.001c-.58-.29-1.21-.44-1.85-.43h0c-.48-.01-.95.09-1.38.3v-.001c-.55.22-.81.85-.58 1.39 .11.28.34.5.63.6v0c.73.27 1.49.48 2.26.65v0c.62.13 1.24.31 1.84.55l-.001-.001c.59.23 1.16.54 1.67.94v0c.49.39.9.88 1.21 1.44v0c.31.61.46 1.3.45 2v0c.05 1.71-.81 3.32-2.26 4.24v-.001c-.68.46-1.43.8-2.22 1v0c-.82.19-1.65.28-2.48.29h0c-1.32-.01-2.63-.22-3.88-.63v-.001c-1.19-.38-2.27-1.02-3.17-1.87l3-3.16v-.001c.5.51 1.09.92 1.75 1.22v0c.68.34 1.44.52 2.21.52v0c.44-.01.88-.11 1.28-.31v-.001c.41-.2.67-.63.64-1.08v0c0-.51-.32-.95-.79-1.11v0c-.79-.33-1.6-.58-2.43-.75h0c-.58-.14-1.15-.31-1.7-.52l-.001-.001c-.55-.22-1.06-.51-1.51-.88v-.001c-.45-.38-.83-.84-1.09-1.36v0c-.3-.61-.44-1.28-.42-1.95v0c-.03-.88.18-1.74.62-2.49v0c.4-.67.94-1.25 1.59-1.68v0c.66-.45 1.38-.79 2.16-1v0c.77-.2 1.56-.3 2.36-.3h0c1.2 0 2.4.18 3.56.56v-.001c1.11.33 2.14.92 3 1.71Z",key:12}),n.createElement("path",{d:"M127.65 52v0c-.5-.63-1.15-1.12-1.87-1.44v0c-.7-.35-1.46-.53-2.23-.54v0c-.38-.01-.76.03-1.12.1v0c-.36.06-.7.18-1 .37v-.001c-.31.18-.57.42-.76.72h0c-.23.33-.33.72-.31 1.12v0c-.03.35.06.69.25 1h-.001c.18.28.42.51.71.69v0c.35.2.73.38 1.12.53 .44.17.92.33 1.47.51 .78.26 1.59.55 2.44.86v0c.82.3 1.59.72 2.3 1.25v0c.69.52 1.28 1.18 1.73 1.94v0c.47.87.71 1.86.68 2.87v0c.03 1.18-.22 2.36-.73 3.43v0c-.48.94-1.16 1.75-2 2.39v0c-.85.64-1.81 1.11-2.83 1.4v0c-1.07.3-2.18.46-3.28.46v-.001c-1.64 0-3.26-.29-4.78-.86v0c-1.45-.53-2.77-1.37-3.84-2.46l3.64-3.71v0c.61.73 1.37 1.32 2.23 1.74v0c.84.44 1.79.68 2.75.7v0c.4 0 .8-.05 1.2-.13l-.001-.001c.35-.08.69-.22 1-.42v0c.29-.2.52-.47.69-.78v0c.18-.37.27-.77.26-1.17v0c.01-.4-.1-.79-.32-1.11v0c-.26-.34-.58-.62-.93-.83v0c-.48-.28-.98-.51-1.49-.68l-2-.67v0c-.74-.24-1.46-.52-2.16-.84l-.001-.001c-.69-.32-1.33-.74-1.88-1.25v0c-.57-.53-1.03-1.16-1.34-1.86v0c-.36-.84-.53-1.75-.5-2.65v0c-.04-1.15.23-2.28.78-3.28v-.001c.48-.89 1.17-1.66 2-2.24v-.001c.86-.61 1.83-1.04 2.86-1.29v0c1.05-.28 2.13-.41 3.22-.41h-.001c1.36 0 2.71.25 4 .72v0c1.31.45 2.52 1.17 3.56 2.11Z",key:13}),n.createElement("path",{d:"M150.48 61.12v.65 0c.01.2.01.41 0 .62H138.7v0c.04.43.18.86.41 1.24v0c.23.36.53.68.88.95v0c.36.27.76.49 1.2.64v0c.44.15.91.22 1.38.23v0c.74.02 1.48-.15 2.15-.48v0c.56-.3 1.05-.71 1.43-1.22l3.71 2.35v0c-.76 1.1-1.8 1.97-3 2.55v0c-1.37.62-2.85.92-4.34.89v0c-1.18 0-2.35-.19-3.45-.57v0c-1.05-.36-2.02-.92-2.84-1.65v-.001c-.84-.75-1.49-1.67-1.92-2.69v0c-.49-1.16-.73-2.4-.7-3.64v0c-.02-1.24.21-2.46.68-3.59v0c.42-1.03 1.05-1.96 1.86-2.73v0c.79-.76 1.73-1.36 2.76-1.74v0c1.1-.43 2.27-.64 3.45-.62v0c1.12-.02 2.23.19 3.28.6v0c.97.38 1.85.97 2.57 1.74v0c.73.79 1.3 1.73 1.67 2.76v0c.42 1.19.62 2.44.6 3.71Zm-4.91-2v0c.01-.81-.28-1.58-.8-2.18v0c-.63-.65-1.5-.98-2.39-.91v0c-.49-.01-.98.07-1.43.25v0c-.42.14-.81.37-1.14.66v-.001c-.33.27-.59.61-.78 1l-.001-.001c-.2.36-.31.77-.33 1.19Z",key:14}),n.createElement("path",{d:"M165 58.06v0c-.34-.41-.76-.74-1.24-.94v0c-.5-.24-1.05-.36-1.59-.36v0c-.53-.01-1.06.11-1.53.34v0c-.45.22-.85.54-1.17.92v0c-.34.38-.59.83-.76 1.31l-.001-.001c-.2.51-.29 1.05-.28 1.6v0c-.01.54.08 1.07.26 1.59v0c.16.48.42.93.76 1.32l-.001 0c.33.37.74.67 1.21.89v0c.49.22 1.03.33 1.58.33v0c.55-.01 1.09-.12 1.61-.31v0c.49-.19.93-.5 1.28-.9l3 3.61v0c-.75.69-1.64 1.21-2.6 1.53v0c-1.09.37-2.24.55-3.38.55v0c-1.24.03-2.48-.16-3.65-.54v-.001c-1.07-.37-2.06-.95-2.89-1.71v0c-.83-.77-1.48-1.69-1.93-2.71v-.001c-.49-1.15-.73-2.38-.7-3.61l0-.001c-.03-1.23.21-2.45.7-3.58v0c.45-1.03 1.1-1.96 1.93-2.72v-.001c.84-.76 1.82-1.35 2.89-1.72v-.001c1.13-.41 2.34-.61 3.55-.6h0c.58-.01 1.16.05 1.74.16v0c.56.1 1.11.25 1.66.44v-.001c.51.17 1 .39 1.46.68v0c.42.25.81.55 1.16.9Z",key:15}),n.createElement("path",{d:"M180.82 69v-2.22h-.07 0c-.43.79-1.08 1.44-1.87 1.88v0c-.45.25-.92.44-1.4.59v-.001c-.53.15-1.07.23-1.61.23v0c-.95.02-1.89-.18-2.74-.59v0c-.72-.36-1.35-.88-1.83-1.51v0c-.47-.64-.81-1.35-1-2.11v0c-.21-.8-.32-1.61-.31-2.43v-10h5.36v8.78 0c0 .43.03.86.1 1.3v0c.05.38.18.75.37 1.1v0c.17.31.42.58.74.77v-.001c.36.2.78.29 1.2.28v0c.83.05 1.63-.33 2.13-1v0c.49-.72.75-1.57.73-2.43v-8.81H186v16.17Z",key:16}),n.createElement("path",{d:"M200.62 57.22h0c-.23-.07-.47-.12-.7-.13h-.67v0c-.63-.02-1.24.11-1.8.38v-.001c-.46.24-.86.58-1.17 1v0c-.29.35-.51.76-.63 1.2v0c-.13.36-.2.74-.2 1.13v8.2h-5.33V52.84h5.14v2.34h.06v0c.4-.81 1.01-1.5 1.76-2v0c.77-.54 1.69-.81 2.63-.79v0c.2-.02.42-.02.63 0v0c.17.01.34.04.51.09Z",key:17}),n.createElement("path",{d:"M218.41 56.8V63v0c-.05.6.1 1.2.44 1.71v0c.4.42.98.63 1.57.57h-.001c.27-.01.55-.03.83-.06l0-.001c.25-.05.51-.12.75-.22l.06 3.9h-.001c-.46.15-.93.27-1.4.35v0c-.56.09-1.13.13-1.69.14v0c-.93.02-1.86-.11-2.73-.4h0c-.68-.24-1.29-.65-1.77-1.18v0c-.48-.53-.82-1.15-1-1.82h-.001c-.21-.78-.31-1.58-.29-2.37v-6.82h-2.58v-4h2.57v-4.23h5.24v4.26h3.8v4Z",key:18}),n.createElement("path",{d:"M233.85 71.46h-.001c-.29.78-.66 1.54-1.08 2.26v0c-.39.63-.88 1.2-1.44 1.69v0c-.59.48-1.27.84-2 1.06v-.001c-.86.25-1.76.37-2.65.36v0c-.52-.01-1.03-.04-1.54-.1l0 0c-.47-.06-.93-.15-1.38-.26l.58-4.49v0c.28.09.56.16.86.21l-.001-.001c.28.05.57.08.87.08h-.001c.64.05 1.28-.15 1.78-.56v0c.42-.47.74-1.02.95-1.61l.52-1.34 -6.72-15.93h5.92l3.61 10.4h.1l3.22-10.4h5.66Z",key:19}),n.createElement("path",{d:"M208.78 50.57v-.001c0 .39-.08.78-.24 1.15v-.001c-.16.34-.38.66-.65.93l0-.001c-.59.54-1.36.84-2.16.84v0c-.82.02-1.6-.29-2.18-.86v-.001c-.58-.54-.9-1.28-.88-2.06v0c.01-.76.32-1.48.88-2v-.001c.29-.27.63-.49 1-.64v0c.38-.17.79-.25 1.21-.24l0-.001c.4 0 .8.07 1.18.23v0c.37.13.71.34 1 .62v0c.27.26.49.57.65.92v-.001c.13.35.2.73.19 1.11Zm-5.72 18.65V55.74h5.33v13.48Z",key:20})]))}a.defaultProps={viewBox:"0 0 244.46 113.98"},e.exports=a,a.default=a},uv1S:function(e,t,c){var n=c("cDcd");function a(e){return n.createElement("svg",e,[n.createElement("defs",{key:0},[n.createElement("linearGradient",{id:"a",x1:"50%",x2:"50%",y1:"100%",y2:"0%",key:0},[n.createElement("stop",{offset:"0%",stopColor:"#808080",stopOpacity:".251",key:0}),n.createElement("stop",{offset:"54%",stopColor:"#808080",stopOpacity:".122",key:1}),n.createElement("stop",{offset:"100%",stopColor:"#808080",stopOpacity:".102",key:2})]),n.createElement("linearGradient",{id:"b",x1:"50%",x2:"50%",y1:"100%",y2:"0%",xlinkHref:"#a",key:1}),n.createElement("linearGradient",{id:"c",x1:"50%",x2:"50%",y1:"100%",y2:"0%",xlinkHref:"#a",key:2}),n.createElement("linearGradient",{id:"d",x1:"50%",x2:"50%",y1:"0%",y2:"100%",key:3},[n.createElement("stop",{offset:"0%",stopColor:"#E0E0E0",key:0}),n.createElement("stop",{offset:"31%",stopColor:"#FCCC63",key:1}),n.createElement("stop",{offset:"77%",stopColor:"#F55F44",key:2})]),n.createElement("linearGradient",{id:"e",x1:"50%",x2:"50%",y1:"0%",y2:"100%",xlinkHref:"#d",key:4}),n.createElement("linearGradient",{id:"f",x1:"50%",x2:"50%",y1:"0%",y2:"100%",xlinkHref:"#d",key:5}),n.createElement("linearGradient",{id:"g",x1:"50%",x2:"50%",y1:"0%",y2:"100%",xlinkHref:"#d",key:6}),n.createElement("linearGradient",{id:"h",x1:"50%",x2:"50%",y1:"99.9%",y2:"-.1%",xlinkHref:"#a",key:7}),n.createElement("linearGradient",{id:"i",x1:"50.3%",x2:"50.3%",y1:"100%",y2:".2%",xlinkHref:"#a",key:8}),n.createElement("path",{id:"k",d:"M.55 0a.55.55 0 1 0 0 1.1 .55.55 0 1 0 0-1.11Z",key:9}),n.createElement("path",{id:"j",d:"M.99 0a.99.99 0 1 0 0 1.98A.99.99 0 1 0 .99 0Z",key:10})]),n.createElement("g",{transform:"translate(-12.602-.014)",key:1},[n.createElement("path",{opacity:".194",fill:"#DCEBF3",d:"M205.51 249.8v0c-1.62.15-3.24.12-4.84-.08 -17.67-2.17-41.72-1.56-61.33 11.94 -27.119 18.67-69.62 2.68-88.367-6.01l0-.001c-14.4-6.72-21.74-22.93-17.3-38.18 .06-.22.12-.44.2-.65 2.811-9.08 8.35-16.18 15.23-19.94H49.1c9.08-4.96 15.79-13.35 18.62-23.3h0c1.5-5.3 3.75-10.35 6.67-15.01 7.66-11.94 23.71-29.714 51.322-29.6v0c4.86.03 9.68.93 14.22 2.67 10.08 3.81 19.19 11.58 26.13 22.345 4.43 6.86 11.07 13.24 20.58 13.76 13.2.72 25.79 7.55 35.23 19.7 .27.34.54.7.81 1.05 16.82 22.27 5.13 59.08-17.21 61.25Z",transform:"translate(-10.337-112.27)",key:0}),n.createElement("path",{opacity:".7",fill:"url(#a)",d:"M2.67 0a2.67 2.67 0 1 0 0 5.35 2.67 2.67 0 1 0 0-5.36Z",transform:"translate(51.171 129.987)",key:1}),n.createElement("path",{opacity:".2",d:"M2.55 0a2.55 2.55 0 1 0 0 5.11 2.55 2.55 0 1 0 0-5.12Z",transform:"translate(51.291 130.106)",key:2}),n.createElement("g",{fill:"#FFF",key:3},[n.createElement("use",{xlinkHref:"#j",x:"38.426",y:"79.42",key:0}),n.createElement("use",{xlinkHref:"#j",x:"109.091",y:"136.884",key:1}),n.createElement("use",{xlinkHref:"#k",x:"67.789",y:"142.369",key:2}),n.createElement("use",{xlinkHref:"#k",x:"190.288",y:"115.577",key:3}),n.createElement("use",{xlinkHref:"#k",x:"158.644",y:"65.878",key:4}),n.createElement("use",{xlinkHref:"#k",x:"203.489",y:"90.146",key:5}),n.createElement("use",{xlinkHref:"#j",x:"55.898",y:"47",key:6}),n.createElement("path",{d:"M144.132 588.55h-.89v-.89h-.36v.88h-.89v.35h.88v.87h.35v-.88h.88Z",transform:"translate(-114.456-473.572)",key:7}),n.createElement("path",{d:"M258.132 586.55h-.89v-.89h-.36v.88h-.89v.35h.88v.87h.35v-.88h.88Z",transform:"translate(-206.324-471.96)",key:8}),n.createElement("path",{d:"M421.132 678.55h-.89v-.89h-.36v.88h-.89v.35h.88v.87h.35v-.88h.88Z",transform:"translate(-337.68-546.099)",key:9}),n.createElement("path",{d:"M652.95 129.042h-.4v-.4h-.17v.4h-.4v.16h.4v.4h.16v-.4h.4Z",transform:"translate(-525.431-103.655)",key:10}),n.createElement("path",{d:"M947.95 319.04h-.4v-.4h-.17v.4h-.4v.16h.4v.4h.16v-.4h.4Z",transform:"translate(-763.161-256.77)",key:11}),n.createElement("path",{d:"M773.95 443.04h-.4v-.4h-.17v.4h-.4v.16h.4v.4h.16v-.4h.4Z",transform:"translate(-622.94-356.697)",key:12}),n.createElement("path",{d:"M65.95 521.04h-.4v-.4h-.17v.4h-.4v.16h.4v.4h.16v-.4h.4Z",transform:"translate(-52.388-419.554)",key:13}),n.createElement("path",{d:"M150.95 691.04h-.4v-.4h-.17v.4h-.4v.16h.4v.4h.16v-.4h.4Z",transform:"translate(-120.886-556.551)",key:14}),n.createElement("path",{d:"M417.957 154.042h-.4v-.4h-.17v.4h-.4v.16h.4v.4h.16v-.4h.4Z",transform:"translate(-336.053-123.802)",key:15}),n.createElement("path",{d:"M291.957 453.04h-.4v-.4h-.17v.4h-.4v.16h.4v.4h.16v-.4h.4Z",transform:"translate(-234.514-364.756)",key:16}),n.createElement("path",{d:"M318.957 367.04h-.4v-.4h-.17v.4h-.4v.16h.4v.4h.16v-.4h.4Z",transform:"translate(-256.272-295.451)",key:17})]),n.createElement("path",{opacity:".7",fill:"url(#b)",d:"M2.23 0a2.23 2.23 0 1 0 0 4.47 2.23 2.23 0 1 0 0-4.48Z",transform:"translate(142.991 105.646)",key:4}),n.createElement("g",{key:5},[n.createElement("path",{opacity:".2",d:"M2.07 0a2.07 2.07 0 1 0 0 4.14 2.07 2.07 0 1 0 0-4.15Z",transform:"translate(143.156 105.811)",key:0}),n.createElement("path",{opacity:".2",d:"M2.31 0a2.31 2.31 0 1 0 0 4.63 2.31 2.31 0 1 0 0-4.64Z",transform:"translate(148.489 120.148)",key:1})]),n.createElement("g",{opacity:".7",transform:"translate(73.584.014)",key:6},n.createElement("path",{fill:"url(#c)",d:"M467.98 102.507v0c.01-4.87-1.16-9.67-3.4-13.98v0c-.74-1.48-1.68-2.85-2.79-4.06v0c-.59-.63-1.51-.8-2.28-.44v-.001c-.31.1-.58.28-.8.51l-.001-.001c-1.08 1.17-1.99 2.49-2.72 3.9v-.001c-2.37 4.41-3.59 9.35-3.57 14.36v3h-1.93v-34.95 0c.03-7.27-1.64-14.45-4.86-20.96v-.001c-1.04-2.21-2.38-4.25-3.98-6.09v0c-1.01-1.15-2.75-1.26-3.9-.26 -.1.07-.18.16-.26.25v-.001c-1.55 1.77-2.85 3.74-3.89 5.85l0 0c-3.39 6.66-5.13 14.04-5.09 21.51v34.6h-1.66v-3.16h0c.02-5.01-1.21-9.95-3.57-14.36l-.001 0c-.74-1.42-1.65-2.73-2.72-3.91v-.001c-.6-.64-1.55-.81-2.33-.43l.07.03 -.001 0c-.25.1-.47.26-.65.45v-.001c-1.12 1.21-2.06 2.58-2.79 4.05v0c-2.25 4.31-3.42 9.11-3.4 13.97v52.22h5.94l-.66 4.29v12.83h4.86v-12.84l-.65-4.3h5.86v-47.57h1.66v47.357h4.75l-.69 4.5v12.83h4.86v-12.84l-.69-4.506h6.4l-.69 4.506v12.83h4.86v-12.84l-.69-4.506h3.79v-47.35h1.92v47.63h1.56v-.08H459l-.65 4.28v12.83h4.86v-12.84l-.65-4.3h5.25Z",transform:"translate(-411.519-42.904)"})),n.createElement("path",{fill:"#535461",d:"M417.277 562.033h-4.61l.82-5.6h2.96Z",transform:"translate(-332.571-448.404)",key:7}),n.createElement("g",{opacity:".1",transform:"translate(80.693 108.694)",key:8},n.createElement("path",{d:"M415.73 561.393h3.41l-.23-1.57h-2.97Z",transform:"translate(-415.73-559.83)"})),n.createElement("path",{fill:"#535461",d:"M620.635 562.033h-4.6l.82-5.6h2.96Z",transform:"translate(-496.452-448.404)",key:9}),n.createElement("g",{opacity:".1",transform:"translate(120.169 108.694)",key:10},n.createElement("path",{d:"M619.08 561.393h3.42l-.23-1.57h-2.97Z",transform:"translate(-619.08-559.83)"})),n.createElement("path",{fill:"#535461",d:"M494.385 562.033h-4.6l.82-5.6h2.96Z",transform:"translate(-394.711-448.404)",key:11}),n.createElement("g",{opacity:".1",transform:"translate(95.661 108.694)",key:12},n.createElement("path",{d:"M492.83 561.393h3.42l-.23-1.57h-2.97Z",transform:"translate(-492.83-559.83)"})),n.createElement("path",{fill:"#535461",d:"M542.68 562.033h-4.6l.82-5.6h2.96Z",transform:"translate(-433.635-448.404)",key:13}),n.createElement("g",{opacity:".1",transform:"translate(105.038 108.694)",key:14},n.createElement("path",{d:"M541.13 561.393h3.42l-.24-1.57h-2.97Z",transform:"translate(-541.13-559.83)"})),n.createElement("path",{fill:"#535461",d:"M0 0h32.89v1.31H-.01Z",transform:"translate(84.706 61.813)",key:15}),n.createElement("g",{fill:"#E0E0E0",key:16},[n.createElement("path",{d:"M628.33 251.629v-.001c-.69-.76-1.86-.82-2.62-.14 -.05.04-.09.08-.14.13v0c-1.03 1.15-1.9 2.42-2.59 3.8v0c-2.25 4.31-3.4 9.11-3.38 13.97v50.63h14.56v-50.85h-.001c.01-4.73-1.09-9.4-3.22-13.62v0c-.69-1.44-1.58-2.77-2.64-3.96Z",transform:"translate(-505.643-210.603)",key:0}),n.createElement("path",{d:"M425.084 251.629v-.001c.68-.76 1.85-.82 2.61-.14 .04.04.08.08.13.13v-.001c1.02 1.15 1.88 2.42 2.58 3.8v0c2.23 4.31 3.39 9.11 3.37 13.97v50.63h-14.56v-50.85 -.001c-.02-4.73 1.08-9.4 3.21-13.62v0c.68-1.44 1.57-2.77 2.63-3.96Z",transform:"translate(-344.15-210.603)",key:1})]),n.createElement("g",{fill:"#535461",key:17},[n.createElement("path",{d:"M387.25 307.33l3.45.01v4.25h-3.46Z",transform:"translate(-312.086-247.655)",key:0}),n.createElement("path",{d:"M444.02 307.33l3.45.01v4.25h-3.46Z",transform:"translate(-357.835-247.655)",key:1}),n.createElement("path",{d:"M587.22 307.33l3.45.01v4.25h-3.46Z",transform:"translate(-473.235-247.655)",key:2}),n.createElement("path",{d:"M643.99 307.33l3.45.01v4.25h-3.46Z",transform:"translate(-518.984-247.655)",key:3})]),n.createElement("g",{opacity:".1",transform:"translate(81.485 40.349)",key:18},n.createElement("path",{d:"M457 255.093v0c-.7-1.38-1.56-2.66-2.58-3.81v0c-.56-.62-1.46-.79-2.2-.42v0c.2.1.39.24.55.41v0c1.02 1.15 1.88 2.43 2.57 3.8v0c2.24 4.31 3.39 9.11 3.37 13.97v50.63h1.64v-50.64 0c.02-4.87-1.14-9.67-3.38-13.98Z",transform:"translate(-452.22-250.678)"})),n.createElement("g",{opacity:".1",transform:"translate(113.82 40.49)",key:19},n.createElement("path",{d:"M623.636 255.814v0c.69-1.38 1.55-2.66 2.57-3.81v-.001c.17-.2.39-.35.63-.46v0c-.73-.32-1.59-.14-2.12.45l0 0c-1.03 1.15-1.89 2.42-2.58 3.8v0c-2.24 4.31-3.4 9.11-3.38 13.97v50.64h1.48v-50.64 0c-.03-4.87 1.13-9.67 3.37-13.99Z",transform:"translate(-618.778-251.399)"})),n.createElement("path",{fill:"url(#d)",d:"M447.447 640.64h-.13v0c-1.24 0-2.24-1.01-2.24-2.24v-10.27h4.6v10.26 -.001c0 1.23-1.01 2.24-2.24 2.24 -.01 0-.01 0-.01 0Z",transform:"translate(-364.981-514.511)",key:20}),n.createElement("path",{fill:"url(#e)",d:"M524.55 640.64h-.13v0c-1.24-.01-2.24-1.01-2.24-2.24v-10.27h4.6v10.26 -.001c0 1.23-1 2.23-2.24 2.24Z",transform:"translate(-427.122-514.511)",key:21}),n.createElement("path",{fill:"url(#f)",d:"M572.85 640.64h-.13v0c-1.24-.01-2.24-1.01-2.24-2.24v-10.27h4.6v10.26 -.001c0 1.23-1 2.23-2.24 2.24Z",transform:"translate(-466.045-514.511)",key:22}),n.createElement("path",{fill:"url(#g)",d:"M650.8 640.64h-.13v0c-1.24 0-2.25-1-2.25-2.24 -.01-.01-.01-.01-.01-.01v-10.27h4.6v10.26 0c0 1.23-1.01 2.23-2.24 2.24Z",transform:"translate(-528.862-514.511)",key:23}),n.createElement("path",{fill:"#EEE",d:"M514.741 45.84v-.001c-.92-1.09-2.53-1.23-3.62-.32 -.12.09-.22.19-.32.31v0c-1.47 1.73-2.71 3.65-3.69 5.7v0c-3.21 6.51-4.86 13.68-4.82 20.95v81.26h20.77v-81.6 0c.03-7.06-1.54-14.04-4.59-20.4v-.001c-.97-2.14-2.24-4.14-3.76-5.93Z",transform:"translate(-411.101-44.526)",key:24}),n.createElement("rect",{width:"10.841",height:"4.968",rx:"2.484",ry:"2.484",fill:"#535461",transform:"translate(96.041 10.349)",key:25}),n.createElement("path",{opacity:".1",d:"M0 0h20.56v.79H-.01Z",transform:"translate(91.321 30.753)",key:26}),n.createElement("path",{fill:"url(#h)",d:"M743.72 343.268v0 0c-.54-.71-1.22-1.31-1.99-1.75v0 -.001c-3.19-1.84-7.27-.75-9.11 2.44 -1.84 3.18-.75 7.26 2.44 9.1 1.01.58 2.16.89 3.32.89v0c.14 0 .28-.01.42-.02v0c3.67-.24 6.46-3.4 6.23-7.07 -.09-1.31-.55-2.56-1.34-3.6Z",transform:"translate(-595.998-282.817)",key:27}),n.createElement("g",{key:28},[n.createElement("path",{opacity:".2",d:"M746.17 348.734v0c-.01 3.32-2.59 6.07-5.9 6.28 -.14 0-.27.01-.4.01v0c-3.48-.01-6.3-2.83-6.3-6.31 0-3.48 2.82-6.3 6.3-6.3 1.1 0 2.18.29 3.14.84v0 0c.72.42 1.36.98 1.875 1.66v0 0c.82 1.09 1.27 2.42 1.27 3.79Z",transform:"translate(-597.464-284.267)",key:0}),n.createElement("path",{opacity:".1",d:"M751.64 354.04v0c-.33.14-.65.3-.94.49v0c-.2.1-.38.26-.5.45v0c-.14.19-.14.44-.02.64v0c.18.18.44.27.7.25v0c.27.03.55 0 .81-.09v-.001c.17-.09.33-.21.47-.35l.54-.5c.19-.18.38-.41.31-.65v0c-.1-.18-.27-.3-.46-.32v0c-.47-.1-.96-.01-1.36.23",transform:"translate(-610.787-293.573)",key:1}),n.createElement("path",{opacity:".1",d:"M.33 0a.33.33 0 1 0 0 .66 .33.33 0 1 0 0-.67Z",transform:"translate(138.266 66.62)",key:2}),n.createElement("path",{opacity:".1",d:"M1.21 0a1.21 1.21 0 1 0 0 2.43 1.21 1.21 0 1 0 0-2.43Z",transform:"translate(144.122 63.637)",key:3})]),n.createElement("g",{opacity:".1",transform:"translate(144.132 59.009)",key:29},n.createElement("path",{d:"M778.236 348.452v0 0c-.02.91-.77 1.64-1.68 1.63 -.92-.02-1.65-.77-1.64-1.68 0-.83.62-1.52 1.43-1.63v0 -.001c.73.42 1.36.98 1.87 1.66Z",transform:"translate(-774.92-346.79)"})),n.createElement("g",{opacity:".1",transform:"translate(