Blocksy Companion - Version 1.7.61

Version Description

Download this release

Release Info

Developer creativethemeshq
Plugin Icon wp plugin Blocksy Companion
Version 1.7.61
Comparing to
See all releases

Code changes from version 1.7.59 to 1.7.61

Files changed (45) hide show
  1. blocksy-companion.php +1 -1
  2. framework/autoload.php +0 -4
  3. framework/dashboard.php +9 -4
  4. framework/edd/EDD_SL_Plugin_Updater.php +0 -558
  5. framework/edd/theme-updater-admin.php +0 -449
  6. framework/edd/theme-updater-class.php +0 -165
  7. framework/extensions/cookies-consent/static/bundle/main.css +1 -1
  8. framework/extensions/cookies-consent/static/bundle/main.js +2 -2
  9. framework/extensions/cookies-consent/static/js/helpers.js +0 -7
  10. framework/extensions/cookies-consent/static/js/main.js +1 -1
  11. framework/extensions/mailchimp/admin-static/bundle/sync.js +1 -1
  12. framework/extensions/mailchimp/admin-static/js/sync.js +1 -4
  13. framework/extensions/mailchimp/extension.php +1 -1
  14. framework/extensions/mailchimp/static/bundle/main.css +1 -1
  15. framework/extensions/mailchimp/static/bundle/main.js +1 -1
  16. framework/extensions/mailchimp/static/js/main.js +1 -1
  17. framework/extensions/product-reviews/static/bundle/main-admin.css +1 -1
  18. framework/extensions/product-reviews/static/bundle/main.css +1 -1
  19. framework/extensions/trending/static/bundle/main.js +1 -1
  20. framework/extensions/trending/static/js/main.js +2 -2
  21. framework/extensions/trending/static/js/trending-block.js +14 -14
  22. framework/extensions/widgets/static/bundle/main.css +1 -1
  23. framework/features/header/items/account/config.php +3 -18
  24. framework/features/header/items/account/dynamic-styles.php +8 -8
  25. framework/features/header/items/account/options.php +288 -207
  26. framework/features/header/items/account/sync.js +268 -217
  27. framework/features/header/items/account/view.php +27 -174
  28. framework/features/header/items/account/views/login.php +97 -0
  29. framework/features/header/items/account/views/logout.php +53 -0
  30. framework/theme-integration.php +1 -1
  31. plugin.php +0 -92
  32. readme.txt +13 -1
  33. static/bundle/dashboard.css +2 -2
  34. static/bundle/dashboard.js +1 -1
  35. static/bundle/main.js +1 -1
  36. static/bundle/options.css +1 -1
  37. static/bundle/options.js +1 -1
  38. static/bundle/sync.js +1 -1
  39. static/js/components/BetaConsent.js +0 -60
  40. static/js/dashboard.js +0 -9
  41. static/js/frontend/account.js +2 -2
  42. static/js/main.js +1 -8
  43. static/js/options.js +1 -1
  44. static/js/options/CustomizerOptionsManager.js +4 -4
  45. static/sass/freemius/opt-in-license.scss +25 -15
blocksy-companion.php CHANGED
@@ -3,7 +3,7 @@
3
  /*
4
  Plugin Name: Blocksy Companion
5
  Description: This plugin is the companion for the Blocksy theme, it runs and adds its enhacements only if the Blocksy theme is installed and active.
6
- Version: 1.7.59
7
  Author: CreativeThemes
8
  Author URI: https://creativethemes.com
9
  Text Domain: blc
3
  /*
4
  Plugin Name: Blocksy Companion
5
  Description: This plugin is the companion for the Blocksy theme, it runs and adds its enhacements only if the Blocksy theme is installed and active.
6
+ Version: 1.7.61
7
  Author: CreativeThemes
8
  Author URI: https://creativethemes.com
9
  Text Domain: blc
framework/autoload.php CHANGED
@@ -58,10 +58,6 @@ class Autoloader {
58
  */
59
  '_BlocksyWidgetFactory' => 'framework/widgets-manager.php',
60
  '_Blocksy_WP_Import' => 'framework/features/demo-install/wp-importer.php',
61
-
62
- // TODO: remove when getting rid of EDD
63
- '_EDD_SL_Plugin_Updater' => 'framework/edd/EDD_SL_Plugin_Updater.php',
64
- '_EDD_Theme_Updater_Admin' => 'framework/edd/theme-updater-admin.php'
65
  ]);
66
  }
67
 
58
  */
59
  '_BlocksyWidgetFactory' => 'framework/widgets-manager.php',
60
  '_Blocksy_WP_Import' => 'framework/features/demo-install/wp-importer.php',
 
 
 
 
61
  ]);
62
  }
63
 
framework/dashboard.php CHANGED
@@ -104,12 +104,17 @@ class Dashboard {
104
  $connect_template = ob_get_clean();
105
  }
106
 
107
- return array_merge([
108
  'is_pro' => blc_fs()->is__premium_only(),
109
  'is_anonymous' => $is_anonymous,
110
- 'connect_template' => $connect_template,
111
- 'has_beta_consent' => Plugin::instance()->user_wants_beta_updates()
112
- ], $d);
 
 
 
 
 
113
  }
114
  );
115
  }
104
  $connect_template = ob_get_clean();
105
  }
106
 
107
+ $result = [
108
  'is_pro' => blc_fs()->is__premium_only(),
109
  'is_anonymous' => $is_anonymous,
110
+ 'connect_template' => $connect_template
111
+ ];
112
+
113
+ if (Plugin::instance()->premium) {
114
+ $result['has_beta_consent'] = Plugin::instance()->premium->user_wants_beta_updates();
115
+ }
116
+
117
+ return array_merge($result, $d);
118
  }
119
  );
120
  }
framework/edd/EDD_SL_Plugin_Updater.php DELETED
@@ -1,558 +0,0 @@
1
- <?php
2
-
3
- // Exit if accessed directly
4
- if ( ! defined( 'ABSPATH' ) ) exit;
5
-
6
- /**
7
- * Allows plugins to use their own update API.
8
- *
9
- * @author Easy Digital Downloads
10
- * @version 1.6.18
11
- */
12
- class EDD_SL_Plugin_Updater {
13
- private $api_url = '';
14
- private $api_data = array();
15
- private $name = '';
16
- private $slug = '';
17
- private $version = '';
18
- private $wp_override = false;
19
- private $cache_key = '';
20
-
21
- private $health_check_timeout = 5;
22
-
23
- /**
24
- * Class constructor.
25
- *
26
- * @uses plugin_basename()
27
- * @uses hook()
28
- *
29
- * @param string $_api_url The URL pointing to the custom API endpoint.
30
- * @param string $_plugin_file Path to the plugin file.
31
- * @param array $_api_data Optional data to send with API calls.
32
- */
33
- public function __construct( $_api_url, $_plugin_file, $_api_data = null ) {
34
- global $edd_plugin_data;
35
-
36
- $this->api_url = trailingslashit( $_api_url );
37
- $this->api_data = $_api_data;
38
- $this->name = plugin_basename( $_plugin_file );
39
- $this->slug = basename( $_plugin_file, '.php' );
40
- $this->version = $_api_data['version'];
41
- $this->wp_override = isset( $_api_data['wp_override'] ) ? (bool) $_api_data['wp_override'] : false;
42
- $this->beta = ! empty( $this->api_data['beta'] ) ? true : false;
43
- $this->cache_key = 'edd_sl_' . md5( serialize( $this->slug . $this->api_data['license'] . $this->beta ) );
44
-
45
- $edd_plugin_data[ $this->slug ] = $this->api_data;
46
-
47
- // Set up hooks.
48
- $this->init();
49
- }
50
-
51
- /**
52
- * Set up WordPress filters to hook into WP's update process.
53
- *
54
- * @uses add_filter()
55
- *
56
- * @return void
57
- */
58
- public function init() {
59
- add_filter( 'pre_set_site_transient_update_plugins', array( $this, 'check_update' ) );
60
- add_filter( 'plugins_api', array( $this, 'plugins_api_filter' ), 10, 3 );
61
- remove_action( 'after_plugin_row_' . $this->name, 'wp_plugin_update_row', 10 );
62
- add_action( 'after_plugin_row_' . $this->name, array( $this, 'show_update_notification' ), 10, 2 );
63
- add_action( 'admin_init', array($this, 'show_changelog') );
64
- }
65
-
66
- /**
67
- * Check for Updates at the defined API endpoint and modify the update array.
68
- *
69
- * This function dives into the update API just when WordPress creates its update array,
70
- * then adds a custom API call and injects the custom plugin data retrieved from the API.
71
- * It is reassembled from parts of the native WordPress plugin update code.
72
- * See wp-includes/update.php line 121 for the original wp_update_plugins() function.
73
- *
74
- * @uses api_request()
75
- *
76
- * @param array $_transient_data Update array build by WordPress.
77
- * @return array Modified update array with custom plugin data.
78
- */
79
- public function check_update($_transient_data) {
80
- global $pagenow;
81
-
82
- if (! is_object($_transient_data)) {
83
- $_transient_data = new stdClass;
84
- }
85
-
86
- if ('plugins.php' === $pagenow && is_multisite()) {
87
- return $_transient_data;
88
- }
89
-
90
- if (! empty($_transient_data->response) && !empty($_transient_data->response[$this->name]) && false === $this->wp_override) {
91
- return $_transient_data;
92
- }
93
-
94
- $version_info = $this->get_cached_version_info();
95
-
96
- if (false === $version_info) {
97
- $version_info = $this->api_request('plugin_latest_version', array('slug' => $this->slug, 'beta' => $this->beta));
98
-
99
- $this->set_version_info_cache($version_info);
100
- }
101
-
102
- if (false !== $version_info && is_object($version_info) && isset($version_info->new_version)) {
103
- $version_info->{'plugin'} = $this->name;
104
- $version_info->{'update-available'} = true;
105
-
106
- if (version_compare($this->version, $version_info->new_version, '<')) {
107
-
108
- $_transient_data->response[$this->name] = $version_info;
109
-
110
- // Make sure the plugin property is set to the plugin's name/location. See issue 1463 on Software Licensing's GitHub repo.
111
- $_transient_data->response[$this->name]->plugin = $this->name;
112
- } else {
113
- $_transient_data->no_update[$this->name] = $version_info;
114
- }
115
-
116
- $_transient_data->last_checked = time();
117
- $_transient_data->checked[ $this->name ] = $this->version;
118
- }
119
-
120
- return $_transient_data;
121
- }
122
-
123
- /**
124
- * show update nofication row -- needed for multisite subsites, because WP won't tell you otherwise!
125
- *
126
- * @param string $file
127
- * @param array $plugin
128
- */
129
- public function show_update_notification( $file, $plugin ) {
130
- if (is_network_admin()) {
131
- return;
132
- }
133
-
134
- if (! current_user_can('update_plugins')) {
135
- return;
136
- }
137
-
138
- if (! is_multisite()) {
139
- return;
140
- }
141
-
142
- if ($this->name !== $file) {
143
- return;
144
- }
145
-
146
- // Remove our filter on the site transient
147
- remove_filter('pre_set_site_transient_update_plugins', array($this, 'check_update'), 10);
148
-
149
- $update_cache = get_site_transient('update_plugins');
150
-
151
- $update_cache = is_object($update_cache) ? $update_cache : new stdClass();
152
-
153
- if (empty($update_cache->response) || empty($update_cache->response[$this->name])) {
154
-
155
- $version_info = $this->get_cached_version_info();
156
-
157
- if ( false === $version_info ) {
158
- $version_info = $this->api_request(
159
- 'plugin_latest_version',
160
- array('slug' => $this->slug, 'beta' => $this->beta)
161
- );
162
-
163
- // Since we disabled our filter for the transient, we aren't running our object conversion on banners, sections, or icons. Do this now:
164
- if (isset($version_info->banners) && !is_array($version_info->banners)) {
165
- $version_info->banners = $this->convert_object_to_array($version_info->banners);
166
- }
167
-
168
- if (isset($version_info->sections) && !is_array($version_info->sections)) {
169
- $version_info->sections = $this->convert_object_to_array($version_info->sections);
170
- }
171
-
172
- if (isset($version_info->icons) && !is_array($version_info->icons)) {
173
- $version_info->icons = $this->convert_object_to_array($version_info->icons);
174
- }
175
-
176
- $this->set_version_info_cache($version_info);
177
- }
178
-
179
- if (! is_object($version_info)) {
180
- return;
181
- }
182
-
183
- if (version_compare($this->version, $version_info->new_version, '<')) {
184
- $update_cache->response[$this->name] = $version_info;
185
- }
186
-
187
- $update_cache->last_checked = time();
188
- $update_cache->checked[$this->name] = $this->version;
189
-
190
- set_site_transient('update_plugins', $update_cache);
191
-
192
- } else {
193
- $version_info = $update_cache->response[ $this->name ];
194
- }
195
-
196
- // Restore our filter
197
- add_filter('pre_set_site_transient_update_plugins', array($this, 'check_update'));
198
-
199
- if (! empty($update_cache->response[$this->name]) && version_compare($this->version, $version_info->new_version, '<')) {
200
- // build a plugin list row, with update notification
201
- $wp_list_table = _get_list_table('WP_Plugins_List_Table');
202
- # <tr class="plugin-update-tr"><td colspan="' . $wp_list_table->get_column_count() . '" class="plugin-update colspanchange">
203
- echo '<tr class="plugin-update-tr" id="' . $this->slug . '-update" data-slug="' . $this->slug . '" data-plugin="' . $this->slug . '/' . $file . '">';
204
- echo '<td colspan="3" class="plugin-update colspanchange">';
205
- echo '<div class="update-message notice inline notice-warning notice-alt">';
206
-
207
- $changelog_link = self_admin_url(
208
- 'index.php?edd_sl_action=view_plugin_changelog&plugin=' . $this->name . '&slug=' . $this->slug . '&TB_iframe=true&width=772&height=911'
209
- );
210
-
211
- if (empty($version_info->download_link)) {
212
- printf(
213
- __('There is a new version of %1$s available. %2$sView version %3$s details%4$s.', 'easy-digital-downloads'),
214
- esc_html($version_info->name),
215
- '<a target="_blank" class="thickbox" href="' . esc_url($changelog_link) . '">',
216
- esc_html($version_info->new_version),
217
- '</a>'
218
- );
219
- } else {
220
- printf(
221
- __('There is a new version of %1$s available. %2$sView version %3$s details%4$s or %5$supdate now%6$s.', 'easy-digital-downloads'),
222
- esc_html($version_info->name),
223
- '<a target="_blank" class="thickbox" href="' . esc_url($changelog_link) . '">',
224
- esc_html($version_info->new_version),
225
- '</a>',
226
- '<a href="' . esc_url(wp_nonce_url(self_admin_url('update.php?action=upgrade-plugin&plugin=') . $this->name, 'upgrade-plugin_' . $this->name)) .'">',
227
- '</a>'
228
- );
229
- }
230
-
231
- do_action("in_plugin_update_message-{$file}", $plugin, $version_info);
232
-
233
- echo '</div></td></tr>';
234
- }
235
- }
236
-
237
- /**
238
- * Updates information on the "View version x.x details" page with custom data.
239
- *
240
- * @uses api_request()
241
- *
242
- * @param mixed $_data
243
- * @param string $_action
244
- * @param object $_args
245
- * @return object $_data
246
- */
247
- public function plugins_api_filter($_data, $_action = '', $_args = null) {
248
- if ($_action !== 'plugin_information') {
249
- return $_data;
250
- }
251
-
252
- if (! isset($_args->slug) || ($_args->slug !== $this->slug)) {
253
- return $_data;
254
- }
255
-
256
- $to_send = array(
257
- 'slug' => $this->slug,
258
- 'is_ssl' => is_ssl(),
259
- 'fields' => array(
260
- 'banners' => array(),
261
- 'reviews' => false,
262
- 'icons' => array(),
263
- )
264
- );
265
-
266
- $cache_key = 'edd_api_request_' . md5(serialize($this->slug . $this->api_data['license'] . $this->beta));
267
-
268
- // Get the transient where we store the api request for this plugin for 24 hours
269
- $edd_api_request_transient = $this->get_cached_version_info($cache_key);
270
- $edd_api_request_transient = [];
271
-
272
- //If we have no transient-saved value, run the API, set a fresh transient with the API value, and return that value too right now.
273
- if (empty($edd_api_request_transient)) {
274
- $api_response = $this->api_request('plugin_information', $to_send);
275
-
276
- // Expires in 3 hours
277
- $this->set_version_info_cache($api_response, $cache_key);
278
-
279
- if (false !== $api_response) {
280
- $_data = $api_response;
281
- }
282
- } else {
283
- $_data = $edd_api_request_transient;
284
- }
285
-
286
- // Convert sections into an associative array, since we're getting an object, but Core expects an array.
287
- if (isset($_data->sections) && !is_array($_data->sections)) {
288
- $_data->sections = $this->convert_object_to_array($_data->sections);
289
- }
290
-
291
- // Convert banners into an associative array, since we're getting an object, but Core expects an array.
292
- if (isset($_data->banners) && !is_array($_data->banners)) {
293
- $_data->banners = $this->convert_object_to_array($_data->banners);
294
- }
295
-
296
- // Convert icons into an associative array, since we're getting an object, but Core expects an array.
297
- if (isset($_data->icons) && !is_array($_data->icons)) {
298
- $_data->icons = $this->convert_object_to_array($_data->icons);
299
- }
300
-
301
- if (! isset($_data->plugin)) {
302
- $_data->plugin = $this->name;
303
- }
304
-
305
- return $_data;
306
- }
307
-
308
- /**
309
- * Convert some objects to arrays when injecting data into the update API
310
- *
311
- * Some data like sections, banners, and icons are expected to be an associative array, however due to the JSON
312
- * decoding, they are objects. This method allows us to pass in the object and return an associative array.
313
- *
314
- * @since 3.6.5
315
- *
316
- * @param stdClass $data
317
- *
318
- * @return array
319
- */
320
- private function convert_object_to_array($data) {
321
- $new_data = array();
322
-
323
- foreach ($data as $key => $value) {
324
- $new_data[$key] = $value;
325
- }
326
-
327
- return $new_data;
328
- }
329
-
330
- /**
331
- * Disable SSL verification in order to prevent download update failures
332
- *
333
- * @param array $args
334
- * @param string $url
335
- * @return object $array
336
- */
337
- public function http_request_args($args, $url) {
338
- $verify_ssl = $this->verify_ssl();
339
-
340
- if (strpos($url, 'https://') !== false && strpos($url, 'edd_action=package_download')) {
341
- $args['sslverify'] = $verify_ssl;
342
- }
343
-
344
- return $args;
345
- }
346
-
347
- /**
348
- * Calls the API and, if successfull, returns the object delivered by the API.
349
- *
350
- * @uses get_bloginfo()
351
- * @uses wp_remote_post()
352
- * @uses is_wp_error()
353
- *
354
- * @param string $_action The requested action.
355
- * @param array $_data Parameters for the API action.
356
- * @return false|object
357
- */
358
- private function api_request($_action, $_data) {
359
- global $wp_version, $edd_plugin_url_available;
360
-
361
- $verify_ssl = $this->verify_ssl();
362
-
363
- // Do a quick status check on this domain if we haven't already checked it.
364
- $store_hash = md5($this->api_url);
365
-
366
- if (! is_array($edd_plugin_url_available) || !isset($edd_plugin_url_available[$store_hash])) {
367
- $test_url_parts = parse_url($this->api_url);
368
-
369
- $scheme = !empty($test_url_parts['scheme']) ? $test_url_parts['scheme'] : 'http';
370
- $host = !empty($test_url_parts['host']) ? $test_url_parts['host'] : '';
371
- $port = !empty($test_url_parts['port']) ? ':' . $test_url_parts['port'] : '';
372
-
373
- if (empty($host)) {
374
- $edd_plugin_url_available[$store_hash] = false;
375
- } else {
376
- $test_url = $scheme . '://' . $host . $port;
377
- $response = wp_remote_get($test_url, array('timeout' => $this->health_check_timeout, 'sslverify' => $verify_ssl));
378
- $edd_plugin_url_available[$store_hash] = is_wp_error($response) ? false : true;
379
- }
380
- }
381
-
382
- if (false === $edd_plugin_url_available[$store_hash]) {
383
- return;
384
- }
385
-
386
- $data = array_merge($this->api_data, $_data);
387
-
388
- if ($data['slug'] != $this->slug) {
389
- return;
390
- }
391
-
392
- if ($this->api_url === trailingslashit(home_url())) {
393
- // Don't allow a plugin to ping itself
394
- return false;
395
- }
396
-
397
- $api_params = array(
398
- 'edd_action' => 'get_version',
399
- 'license' => !empty($data['license']) ? $data['license'] : '',
400
- 'item_name' => isset($data['item_name']) ? $data['item_name'] : false,
401
- 'item_id' => isset($data['item_id']) ? $data['item_id'] : false,
402
- 'version' => isset($data['version']) ? $data['version'] : false,
403
- 'slug' => $data['slug'],
404
- 'author' => $data['author'],
405
- 'url' => home_url(),
406
- 'beta' => !empty($data['beta']),
407
- );
408
-
409
- $request = wp_remote_post($this->api_url, array('timeout' => 15, 'sslverify' => $verify_ssl, 'body' => $api_params));
410
-
411
- if (! is_wp_error($request)) {
412
- $request = json_decode(wp_remote_retrieve_body($request));
413
- }
414
-
415
- if (isset($request->contributors)) {
416
- $request->contributors = json_decode(json_encode($request->contributors), true);
417
- }
418
-
419
- if (isset($request->stable_version)) {
420
- $request->version = $request->stable_version;
421
- }
422
-
423
- $request->changelog = '123';
424
-
425
- if ($request && isset($request->sections)) {
426
- $request->sections = maybe_unserialize( $request->sections );
427
- } else {
428
- $request = false;
429
- }
430
-
431
- if ($request && isset($request->banners)) {
432
- $request->banners = maybe_unserialize($request->banners);
433
- }
434
-
435
- if ($request && isset($request->icons)) {
436
- $request->icons = maybe_unserialize($request->icons);
437
- }
438
-
439
- if (! empty($request->sections)) {
440
- foreach ($request->sections as $key => $section) {
441
- $request->$key = (array) $section;
442
- }
443
- }
444
-
445
- return $request;
446
- }
447
-
448
- public function show_changelog() {
449
- global $edd_plugin_data;
450
-
451
- if (empty($_REQUEST['edd_sl_action']) || 'view_plugin_changelog' !== $_REQUEST['edd_sl_action']) {
452
- return;
453
- }
454
-
455
- if (empty($_REQUEST['plugin'])) {
456
- return;
457
- }
458
-
459
- if (empty($_REQUEST['slug'])) {
460
- return;
461
- }
462
-
463
- if (! current_user_can('update_plugins')) {
464
- wp_die(__('You do not have permission to install plugin updates', 'easy-digital-downloads'), __('Error', 'easy-digital-downloads'), array('response' => 403));
465
- }
466
-
467
- $data = $edd_plugin_data[$_REQUEST['slug']];
468
- $beta = !empty($data['beta']) ? true : false;
469
- $cache_key = md5('edd_plugin_' . sanitize_key($_REQUEST['plugin']) . '_' . $beta . '_version_info');
470
- $version_info = $this->get_cached_version_info($cache_key);
471
-
472
- if (false === $version_info) {
473
-
474
- $api_params = array(
475
- 'edd_action' => 'get_version',
476
- 'item_name' => isset($data['item_name']) ? $data['item_name'] : false,
477
- 'item_id' => isset($data['item_id']) ? $data['item_id'] : false,
478
- 'slug' => $_REQUEST['slug'],
479
- 'author' => $data['author'],
480
- 'url' => home_url(),
481
- 'beta' => !empty($data['beta'])
482
- );
483
-
484
- $verify_ssl = $this->verify_ssl();
485
- $request = wp_remote_post($this->api_url, array('timeout' => 15, 'sslverify' => $verify_ssl, 'body' => $api_params));
486
-
487
- if (! is_wp_error($request)) {
488
- $version_info = json_decode(wp_remote_retrieve_body($request));
489
- }
490
-
491
- if (! empty($version_info) && isset($version_info->sections)) {
492
- $version_info->sections = maybe_unserialize($version_info->sections);
493
- } else {
494
- $version_info = false;
495
- }
496
-
497
- if (! empty($version_info)) {
498
- foreach ($version_info->sections as $key => $section) {
499
- $version_info->$key = (array)$section;
500
- }
501
- }
502
-
503
- $this->set_version_info_cache($version_info, $cache_key);
504
- }
505
-
506
- if (! empty($version_info) && isset($version_info->sections['changelog'])) {
507
- echo '<div style="background:#fff;padding:10px;">' . $version_info->sections['changelog'] . '</div>';
508
- }
509
-
510
- exit;
511
- }
512
-
513
- public function get_cached_version_info($cache_key = '') {
514
- if (empty($cache_key)) {
515
- $cache_key = $this->cache_key;
516
- }
517
-
518
- $cache = get_option($cache_key);
519
-
520
- return false; // Cache is expired
521
-
522
- if (empty($cache['timeout']) || time() > $cache['timeout']) {
523
- return false; // Cache is expired
524
- }
525
-
526
- // We need to turn the icons into an array, thanks to WP Core forcing these into an object at some point.
527
- $cache['value'] = json_decode($cache['value']);
528
-
529
- if (! empty($cache['value']->icons)) {
530
- $cache['value']->icons = (array) $cache['value']->icons;
531
- }
532
-
533
- return $cache['value'];
534
- }
535
-
536
- public function set_version_info_cache($value = '', $cache_key = '') {
537
- if (empty($cache_key)) {
538
- $cache_key = $this->cache_key;
539
- }
540
-
541
- $data = array(
542
- 'timeout' => strtotime('+3 hours', time()),
543
- 'value' => json_encode($value)
544
- );
545
-
546
- update_option($cache_key, $data, 'no');
547
- }
548
-
549
- /**
550
- * Returns if the SSL of the store should be verified.
551
- *
552
- * @since 1.6.13
553
- * @return bool
554
- */
555
- private function verify_ssl() {
556
- return (bool) apply_filters( 'edd_sl_api_request_verify_ssl', true, $this );
557
- }
558
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
framework/edd/theme-updater-admin.php DELETED
@@ -1,449 +0,0 @@
1
- <?php
2
- /**
3
- * Theme updater admin page and functions.
4
- *
5
- * @package EDD Theme Updater
6
- */
7
-
8
- class EDD_Theme_Updater_Admin {
9
-
10
- /**
11
- * Variables required for the theme updater
12
- *
13
- * @since 1.0.0
14
- * @type string
15
- */
16
- protected $remote_api_url = null;
17
- protected $theme_slug = null;
18
- protected $version = null;
19
- protected $author = null;
20
- protected $download_id = null;
21
- protected $renew_url = null;
22
- protected $strings = null;
23
-
24
- /**
25
- * Initialize the class.
26
- *
27
- * @since 1.0.0
28
- */
29
- function __construct( $config = array(), $strings = array() ) {
30
-
31
- $config = wp_parse_args( $config, array(
32
- 'remote_api_url' => 'http://easydigitaldownloads.com',
33
- 'theme_slug' => get_template(),
34
- 'item_name' => '',
35
- 'license' => '',
36
- 'version' => '',
37
- 'author' => '',
38
- 'download_id' => '',
39
- 'renew_url' => ''
40
- ) );
41
-
42
- // Set config arguments
43
- $this->remote_api_url = $config['remote_api_url'];
44
- $this->item_name = $config['item_name'];
45
- $this->theme_slug = sanitize_key( $config['theme_slug'] );
46
- $this->version = $config['version'];
47
- $this->author = $config['author'];
48
- $this->download_id = $config['download_id'];
49
- $this->renew_url = $config['renew_url'];
50
-
51
- // Populate version fallback
52
- if ( '' == $config['version'] ) {
53
- $theme = wp_get_theme( $this->theme_slug );
54
- $this->version = $theme->get( 'Version' );
55
- }
56
-
57
- // Strings passed in from the updater config
58
- $this->strings = $strings;
59
-
60
- add_action( 'admin_init', array( $this, 'updater' ) );
61
- // add_action( 'admin_init', array( $this, 'register_option' ) );
62
- // add_action( 'admin_init', array( $this, 'license_action' ) );
63
- // add_action( 'admin_menu', array( $this, 'license_menu' ) );
64
- // add_action( 'update_option_' . $this->theme_slug . '_license_key', array( $this, 'activate_license' ), 10, 2 );
65
- add_filter( 'http_request_args', array( $this, 'disable_wporg_request' ), 5, 2 );
66
- }
67
-
68
- /**
69
- * Creates the updater class.
70
- *
71
- * since 1.0.0
72
- */
73
- function updater() {
74
-
75
- /* If there is no valid license key status, don't allow updates. */
76
- if ( get_option( $this->theme_slug . '_license_key_status', false) != 'valid' ) {
77
- // return;
78
- }
79
-
80
- if ( !class_exists( 'EDD_Theme_Updater' ) ) {
81
- // Load our custom theme updater
82
- include( dirname( __FILE__ ) . '/theme-updater-class.php' );
83
- }
84
-
85
- new EDD_Theme_Updater(
86
- array(
87
- 'remote_api_url' => $this->remote_api_url,
88
- 'version' => $this->version,
89
- // 'license' => trim( get_option( $this->theme_slug . '_license_key' ) ),
90
- 'license' => '123456',
91
- 'item_name' => $this->item_name,
92
- 'author' => $this->author
93
- ),
94
- $this->strings
95
- );
96
- }
97
-
98
- /**
99
- * Adds a menu item for the theme license under the appearance menu.
100
- *
101
- * since 1.0.0
102
- */
103
- function license_menu() {
104
-
105
- $strings = $this->strings;
106
-
107
- add_theme_page(
108
- $strings['theme-license'],
109
- $strings['theme-license'],
110
- 'manage_options',
111
- $this->theme_slug . '-license',
112
- array( $this, 'license_page' )
113
- );
114
- }
115
-
116
- /**
117
- * Outputs the markup used on the theme license page.
118
- *
119
- * since 1.0.0
120
- */
121
- function license_page() {
122
-
123
- $strings = $this->strings;
124
-
125
- $license = trim( get_option( $this->theme_slug . '_license_key' ) );
126
- $status = get_option( $this->theme_slug . '_license_key_status', false );
127
-
128
- // Checks license status to display under license key
129
- if ( ! $license ) {
130
- $message = $strings['enter-key'];
131
- } else {
132
- // delete_transient( $this->theme_slug . '_license_message' );
133
- if ( ! get_transient( $this->theme_slug . '_license_message', false ) ) {
134
- set_transient( $this->theme_slug . '_license_message', $this->check_license(), ( 60 * 60 * 24 ) );
135
- }
136
- $message = get_transient( $this->theme_slug . '_license_message' );
137
- }
138
- ?>
139
- <div class="wrap">
140
- <h2><?php echo $strings['theme-license'] ?></h2>
141
- <form method="post" action="options.php">
142
-
143
- <?php settings_fields( $this->theme_slug . '-license' ); ?>
144
-
145
- <table class="form-table">
146
- <tbody>
147
-
148
- <tr valign="top">
149
- <th scope="row" valign="top">
150
- <?php echo $strings['license-key']; ?>
151
- </th>
152
- <td>
153
- <input id="<?php echo $this->theme_slug; ?>_license_key" name="<?php echo $this->theme_slug; ?>_license_key" type="text" class="regular-text" value="<?php echo esc_attr( $license ); ?>" />
154
- <p class="description">
155
- <?php echo $message; ?>
156
- </p>
157
- </td>
158
- </tr>
159
-
160
- <?php if ( $license ) { ?>
161
- <tr valign="top">
162
- <th scope="row" valign="top">
163
- <?php echo $strings['license-action']; ?>
164
- </th>
165
- <td>
166
- <?php
167
- wp_nonce_field( $this->theme_slug . '_nonce', $this->theme_slug . '_nonce' );
168
- if ( 'valid' == $status ) { ?>
169
- <input type="submit" class="button-secondary" name="<?php echo $this->theme_slug; ?>_license_deactivate" value="<?php esc_attr_e( $strings['deactivate-license'] ); ?>"/>
170
- <?php } else { ?>
171
- <input type="submit" class="button-secondary" name="<?php echo $this->theme_slug; ?>_license_activate" value="<?php esc_attr_e( $strings['activate-license'] ); ?>"/>
172
- <?php }
173
- ?>
174
- </td>
175
- </tr>
176
- <?php } ?>
177
-
178
- </tbody>
179
- </table>
180
- <?php submit_button(); ?>
181
- </form>
182
- <?php
183
- }
184
-
185
- /**
186
- * Registers the option used to store the license key in the options table.
187
- *
188
- * since 1.0.0
189
- */
190
- function register_option() {
191
- register_setting(
192
- $this->theme_slug . '-license',
193
- $this->theme_slug . '_license_key',
194
- array( $this, 'sanitize_license' )
195
- );
196
- }
197
-
198
- /**
199
- * Sanitizes the license key.
200
- *
201
- * since 1.0.0
202
- *
203
- * @param string $new License key that was submitted.
204
- * @return string $new Sanitized license key.
205
- */
206
- function sanitize_license( $new ) {
207
-
208
- $old = get_option( $this->theme_slug . '_license_key' );
209
-
210
- if ( $old && $old != $new ) {
211
- // New license has been entered, so must reactivate
212
- delete_option( $this->theme_slug . '_license_key_status' );
213
- delete_transient( $this->theme_slug . '_license_message' );
214
- }
215
-
216
- return $new;
217
- }
218
-
219
- /**
220
- * Makes a call to the API.
221
- *
222
- * @since 1.0.0
223
- *
224
- * @param array $api_params to be used for wp_remote_get.
225
- * @return array $response decoded JSON response.
226
- */
227
- function get_api_response( $api_params ) {
228
-
229
- // Call the custom API.
230
- $response = wp_remote_get(
231
- add_query_arg( $api_params, $this->remote_api_url ),
232
- array( 'timeout' => 15, 'sslverify' => false )
233
- );
234
-
235
- // Make sure the response came back okay.
236
- if ( is_wp_error( $response ) ) {
237
- return false;
238
- }
239
-
240
- $response = json_decode( wp_remote_retrieve_body( $response ) );
241
-
242
- return $response;
243
- }
244
-
245
- /**
246
- * Activates the license key.
247
- *
248
- * @since 1.0.0
249
- */
250
- function activate_license() {
251
-
252
- $license = trim( get_option( $this->theme_slug . '_license_key' ) );
253
-
254
- // Data to send in our API request.
255
- $api_params = array(
256
- 'edd_action' => 'activate_license',
257
- 'license' => $license,
258
- 'item_name' => urlencode( $this->item_name )
259
- );
260
-
261
- $license_data = $this->get_api_response( $api_params );
262
-
263
- // $response->license will be either "active" or "inactive"
264
- if ( $license_data && isset( $license_data->license ) ) {
265
- update_option( $this->theme_slug . '_license_key_status', $license_data->license );
266
- delete_transient( $this->theme_slug . '_license_message' );
267
- }
268
-
269
- }
270
-
271
- /**
272
- * Deactivates the license key.
273
- *
274
- * @since 1.0.0
275
- */
276
- function deactivate_license() {
277
-
278
- // Retrieve the license from the database.
279
- $license = trim( get_option( $this->theme_slug . '_license_key' ) );
280
-
281
- // Data to send in our API request.
282
- $api_params = array(
283
- 'edd_action' => 'deactivate_license',
284
- 'license' => $license,
285
- 'item_name' => urlencode( $this->item_name )
286
- );
287
-
288
- $license_data = $this->get_api_response( $api_params );
289
-
290
- // $license_data->license will be either "deactivated" or "failed"
291
- if ( $license_data && ( $license_data->license == 'deactivated' ) ) {
292
- delete_option( $this->theme_slug . '_license_key_status' );
293
- delete_transient( $this->theme_slug . '_license_message' );
294
- }
295
- }
296
-
297
- /**
298
- * Constructs a renewal link
299
- *
300
- * @since 1.0.0
301
- */
302
- function get_renewal_link() {
303
-
304
- // If a renewal link was passed in the config, use that
305
- if ( '' != $this->renew_url ) {
306
- return $this->renew_url;
307
- }
308
-
309
- // If download_id was passed in the config, a renewal link can be constructed
310
- // $license_key = trim( get_option( $this->theme_slug . '_license_key', false ) );
311
- $license_key = '123456';
312
-
313
- if ( '' != $this->download_id && $license_key ) {
314
- $url = esc_url( $this->remote_api_url );
315
- $url .= '/checkout/?edd_license_key=' . $license_key . '&download_id=' . $this->download_id;
316
- return $url;
317
- }
318
-
319
- // Otherwise return the remote_api_url
320
- return $this->remote_api_url;
321
-
322
- }
323
-
324
-
325
-
326
- /**
327
- * Checks if a license action was submitted.
328
- *
329
- * @since 1.0.0
330
- */
331
- function license_action() {
332
-
333
- if ( isset( $_POST[ $this->theme_slug . '_license_activate' ] ) ) {
334
- if ( check_admin_referer( $this->theme_slug . '_nonce', $this->theme_slug . '_nonce' ) ) {
335
- $this->activate_license();
336
- }
337
- }
338
-
339
- if ( isset( $_POST[$this->theme_slug . '_license_deactivate'] ) ) {
340
- if ( check_admin_referer( $this->theme_slug . '_nonce', $this->theme_slug . '_nonce' ) ) {
341
- $this->deactivate_license();
342
- }
343
- }
344
-
345
- }
346
-
347
- /**
348
- * Checks if license is valid and gets expire date.
349
- *
350
- * @since 1.0.0
351
- *
352
- * @return string $message License status message.
353
- */
354
- function check_license() {
355
-
356
- $license = trim( get_option( $this->theme_slug . '_license_key' ) );
357
- $strings = $this->strings;
358
-
359
- $api_params = array(
360
- 'edd_action' => 'check_license',
361
- 'license' => $license,
362
- 'item_name' => urlencode( $this->item_name )
363
- );
364
-
365
- $license_data = $this->get_api_response( $api_params );
366
-
367
- // If response doesn't include license data, return
368
- if ( !isset( $license_data->license ) ) {
369
- $message = $strings['license-unknown'];
370
- return $message;
371
- }
372
-
373
- // Get expire date
374
- $expires = false;
375
- if ( isset( $license_data->expires ) ) {
376
- $expires = date_i18n( get_option( 'date_format' ), strtotime( $license_data->expires ) );
377
- $renew_link = '<a href="' . esc_url( $this->get_renewal_link() ) . '" target="_blank">' . $strings['renew'] . '</a>';
378
- }
379
-
380
- // Get site counts
381
- $site_count = $license_data->site_count;
382
- $license_limit = $license_data->license_limit;
383
-
384
- // If unlimited
385
- if ( 0 == $license_limit ) {
386
- $license_limit = $strings['unlimited'];
387
- }
388
-
389
- if ( $license_data->license == 'valid' ) {
390
- $message = $strings['license-key-is-active'] . ' ';
391
- if ( $expires ) {
392
- $message .= sprintf( $strings['expires%s'], $expires ) . ' ';
393
- }
394
- if ( $site_count && $license_limit ) {
395
- $message .= sprintf( $strings['%1$s/%2$-sites'], $site_count, $license_limit );
396
- }
397
- } else if ( $license_data->license == 'expired' ) {
398
- if ( $expires ) {
399
- $message = sprintf( $strings['license-key-expired-%s'], $expires );
400
- } else {
401
- $message = $strings['license-key-expired'];
402
- }
403
- if ( $renew_link ) {
404
- $message .= ' ' . $renew_link;
405
- }
406
- } else if ( $license_data->license == 'invalid' ) {
407
- $message = $strings['license-keys-do-not-match'];
408
- } else if ( $license_data->license == 'inactive' ) {
409
- $message = $strings['license-is-inactive'];
410
- } else if ( $license_data->license == 'disabled' ) {
411
- $message = $strings['license-key-is-disabled'];
412
- } else if ( $license_data->license == 'site_inactive' ) {
413
- // Site is inactive
414
- $message = $strings['site-is-inactive'];
415
- } else {
416
- $message = $strings['license-status-unknown'];
417
- }
418
-
419
- return $message;
420
- }
421
-
422
- /**
423
- * Disable requests to wp.org repository for this theme.
424
- *
425
- * @since 1.0.0
426
- */
427
- function disable_wporg_request( $r, $url ) {
428
- return $r;
429
-
430
- // If it's not a theme update request, bail.
431
- if ( 0 !== strpos( $url, 'https://api.wordpress.org/themes/update-check/1.1/' ) ) {
432
- return $r;
433
- }
434
-
435
- // Decode the JSON response
436
- $themes = json_decode( $r['body']['themes'] );
437
-
438
- // Remove the active parent and child themes from the check
439
- $parent = get_option( 'template' );
440
- $child = get_option( 'stylesheet' );
441
- unset( $themes->themes->$parent );
442
- unset( $themes->themes->$child );
443
-
444
- // Encode the updated JSON response
445
- $r['body']['themes'] = json_encode( $themes );
446
-
447
- return $r;
448
- }
449
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
framework/edd/theme-updater-class.php DELETED
@@ -1,165 +0,0 @@
1
- <?php
2
- /**
3
- * Theme updater class.
4
- *
5
- * @package EDD Theme Updater
6
- */
7
-
8
- class EDD_Theme_Updater {
9
-
10
- private $remote_api_url;
11
- private $request_data;
12
- private $response_key;
13
- private $theme_slug;
14
- private $license_key;
15
- private $version;
16
- private $author;
17
- protected $strings = null;
18
-
19
- function __construct( $args = array(), $strings = array() ) {
20
-
21
- $args = wp_parse_args( $args, array(
22
- 'remote_api_url' => 'http://easydigitaldownloads.com',
23
- 'request_data' => array(),
24
- 'theme_slug' => get_template(),
25
- 'item_name' => '',
26
- 'license' => '',
27
- 'version' => '',
28
- 'author' => ''
29
- ) );
30
- extract( $args );
31
-
32
- $this->license = $license;
33
- $this->item_name = $item_name;
34
- $this->version = $version;
35
- $this->theme_slug = sanitize_key( $theme_slug );
36
- $this->author = $author;
37
- $this->remote_api_url = $remote_api_url;
38
- $this->response_key = $this->theme_slug . '-update-response';
39
- $this->strings = $strings;
40
-
41
- add_filter( 'site_transient_update_themes', array( &$this, 'theme_update_transient' ) );
42
- add_filter( 'delete_site_transient_update_themes', array( &$this, 'delete_theme_update_transient' ) );
43
- add_action( 'load-update-core.php', array( &$this, 'delete_theme_update_transient' ) );
44
- add_action( 'load-themes.php', array( &$this, 'delete_theme_update_transient' ) );
45
- add_action( 'load-themes.php', array( &$this, 'load_themes_screen' ) );
46
- }
47
-
48
- function load_themes_screen() {
49
- add_thickbox();
50
- add_action( 'admin_notices', array( &$this, 'update_nag' ) );
51
- }
52
-
53
- function update_nag() {
54
-
55
- $strings = $this->strings;
56
-
57
- $theme = wp_get_theme( $this->theme_slug );
58
-
59
- $api_response = get_transient( $this->response_key );
60
-
61
- if ( false === $api_response ) {
62
- return;
63
- }
64
-
65
- $update_url = wp_nonce_url( 'update.php?action=upgrade-theme&amp;theme=' . urlencode( $this->theme_slug ), 'upgrade-theme_' . $this->theme_slug );
66
- $update_onclick = ' onclick="if ( confirm(\'' . esc_js( $strings['update-notice'] ) . '\') ) {return true;}return false;"';
67
-
68
- if ( version_compare( $this->version, $api_response->new_version, '<' ) ) {
69
-
70
- echo '<div id="update-nag">';
71
- printf(
72
- $strings['update-available'],
73
- $theme->get( 'Name' ),
74
- $api_response->new_version,
75
- '#TB_inline?width=640&amp;inlineId=' . $this->theme_slug . '_changelog',
76
- $theme->get( 'Name' ),
77
- $update_url,
78
- $update_onclick
79
- );
80
- echo '</div>';
81
- echo '<div id="' . $this->theme_slug . '_' . 'changelog" style="display:none;">';
82
- echo wpautop( $api_response->sections['changelog'] );
83
- echo '</div>';
84
- }
85
- }
86
-
87
- function theme_update_transient($value) {
88
- $update_data = $this->check_for_update();
89
-
90
- if ($update_data && ! isset($value->response[$this->theme_slug])) {
91
- $value->response[$this->theme_slug] = @$update_data;
92
- }
93
-
94
- if (
95
- $update_data
96
- &&
97
- isset($value->response[$this->theme_slug])
98
- &&
99
- isset($value->response[$this->theme_slug]['new_version'])
100
- &&
101
- version_compare(
102
- $update_data['new_version'],
103
- $value->response[$this->theme_slug]['new_version']
104
- ) > 0
105
- ) {
106
- $value->response[$this->theme_slug] = $update_data;
107
- }
108
-
109
- return $value;
110
- }
111
-
112
- function delete_theme_update_transient() {
113
- delete_transient($this->response_key);
114
- }
115
-
116
- function check_for_update() {
117
- $update_data = get_transient( $this->response_key );
118
-
119
- if ( false === $update_data ) {
120
- $failed = false;
121
-
122
- $api_params = array(
123
- 'edd_action' => 'get_version',
124
- 'license' => $this->license,
125
- 'name' => $this->item_name,
126
- 'slug' => $this->theme_slug,
127
- 'author' => $this->author
128
- );
129
-
130
- $response = wp_remote_post( $this->remote_api_url, array( 'timeout' => 15, 'body' => $api_params ) );
131
-
132
- // Make sure the response was successful
133
- if ( is_wp_error( $response ) || 200 != wp_remote_retrieve_response_code( $response ) ) {
134
- $failed = true;
135
- }
136
-
137
- $update_data = json_decode( wp_remote_retrieve_body( $response ) );
138
-
139
- if ( ! is_object( $update_data ) ) {
140
- $failed = true;
141
- }
142
-
143
- // If the response failed, try again in 30 minutes
144
- if ( $failed ) {
145
- $data = new stdClass;
146
- $data->new_version = $this->version;
147
- set_transient( $this->response_key, $data, strtotime( '+30 minutes' ) );
148
- return false;
149
- }
150
-
151
- // If the status is 'ok', return the update arguments
152
- if ( ! $failed ) {
153
- $update_data->sections = maybe_unserialize( $update_data->sections );
154
- set_transient( $this->response_key, $update_data, strtotime( '+12 hours' ) );
155
- }
156
- }
157
-
158
- if ( version_compare( $this->version, $update_data->new_version, '>=' ) ) {
159
- return false;
160
- }
161
-
162
- return (array) $update_data;
163
- }
164
-
165
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
framework/extensions/cookies-consent/static/bundle/main.css CHANGED
@@ -1,5 +1,5 @@
1
  /**
2
- * - v1.7.59
3
  *
4
  * Copyright (c) 2021
5
  * Licensed GPLv2+
1
  /**
2
+ * - v1.7.61
3
  *
4
  * Copyright (c) 2021
5
  * Licensed GPLv2+
framework/extensions/cookies-consent/static/bundle/main.js CHANGED
@@ -1,8 +1,8 @@
1
- !function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=2)}([function(e,t,n){var r,o;
2
  /*!
3
  * JavaScript Cookie v2.2.1
4
  * https://github.com/js-cookie/js-cookie
5
  *
6
  * Copyright 2006, 2015 Klaus Hartl & Fagner Brack
7
  * Released under the MIT license
8
- */!function(i){if(void 0===(o="function"==typeof(r=i)?r.call(t,n,t,e):r)||(e.exports=o),!0,e.exports=i(),!!0){var c=window.Cookies,a=window.Cookies=i();a.noConflict=function(){return window.Cookies=c,a}}}((function(){function e(){for(var e=0,t={};e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}function t(e){return e.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}return function n(r){function o(){}function i(t,n,i){if("undefined"!=typeof document){"number"==typeof(i=e({path:"/"},o.defaults,i)).expires&&(i.expires=new Date(1*new Date+864e5*i.expires)),i.expires=i.expires?i.expires.toUTCString():"";try{var c=JSON.stringify(n);/^[\{\[]/.test(c)&&(n=c)}catch(e){}n=r.write?r.write(n,t):encodeURIComponent(String(n)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var a="";for(var u in i)i[u]&&(a+="; "+u,!0!==i[u]&&(a+="="+i[u].split(";")[0]));return document.cookie=t+"="+n+a}}function c(e,n){if("undefined"!=typeof document){for(var o={},i=document.cookie?document.cookie.split("; "):[],c=0;c<i.length;c++){var a=i[c].split("="),u=a.slice(1).join("=");n||'"'!==u.charAt(0)||(u=u.slice(1,-1));try{var f=t(a[0]);if(u=(r.read||r)(u,f)||t(u),n)try{u=JSON.parse(u)}catch(e){}if(o[f]=u,e===f)break}catch(e){}}return e?o[e]:o}}return o.set=i,o.get=function(e){return c(e,!1)},o.getJSON=function(e){return c(e,!0)},o.remove=function(t,n){i(t,"",e(n,{expires:-1}))},o.defaults={},o.withConverter=n,o}((function(){}))}))},function(e,t){e.exports=window.ctEvents},function(e,t,n){"use strict";n.r(t);var r=n(1),o=n.n(r),i=n(0),c=n.n(i);function a(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u(e,t)}(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.")}()}function u(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}var f,s=function(){var e=document.querySelector(".cookie-notification");e&&(c.a.get("blocksy_cookies_consent_accepted")?e.remove():(requestAnimationFrame((function(){e.classList.remove("ct-fade-in-start"),e.classList.add("ct-fade-in-end"),d(e,(function(){e.classList.remove("ct-fade-in-end")}))})),a(e.querySelectorAll("button")).map((function(t){t.addEventListener("click",(function(n){if(n.preventDefault(),t.classList.contains("ct-accept")){c.a.set("blocksy_cookies_consent_accepted","true",{expires:new Date(1*new Date+{onehour:36e5,oneday:864e5,oneweek:6048e5,onemonth:26784e5,threemonths:80352e5,sixmonths:160704e5,oneyear:31536e6,forever:864e9}[t.closest("[data-period]").dataset.period])})}e.classList.add("ct-fade-start"),requestAnimationFrame((function(){e.classList.remove("ct-fade-start"),e.classList.add("ct-fade-end"),d(e,(function(){e.parentNode.removeChild(e)}))}))}))}))))};function d(e,t){setTimeout((function(){t()}),300)}f=function(){s(),o.a.on("blocksy:cookies:init",(function(){s()}))},/comp|inter|loaded/.test(document.readyState)?f():document.addEventListener("DOMContentLoaded",f,!1)}]);
1
+ !function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=3)}([function(e,t,n){var r,o;
2
  /*!
3
  * JavaScript Cookie v2.2.1
4
  * https://github.com/js-cookie/js-cookie
5
  *
6
  * Copyright 2006, 2015 Klaus Hartl & Fagner Brack
7
  * Released under the MIT license
8
+ */!function(i){if(void 0===(o="function"==typeof(r=i)?r.call(t,n,t,e):r)||(e.exports=o),!0,e.exports=i(),!!0){var c=window.Cookies,a=window.Cookies=i();a.noConflict=function(){return window.Cookies=c,a}}}((function(){function e(){for(var e=0,t={};e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}function t(e){return e.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}return function n(r){function o(){}function i(t,n,i){if("undefined"!=typeof document){"number"==typeof(i=e({path:"/"},o.defaults,i)).expires&&(i.expires=new Date(1*new Date+864e5*i.expires)),i.expires=i.expires?i.expires.toUTCString():"";try{var c=JSON.stringify(n);/^[\{\[]/.test(c)&&(n=c)}catch(e){}n=r.write?r.write(n,t):encodeURIComponent(String(n)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var a="";for(var u in i)i[u]&&(a+="; "+u,!0!==i[u]&&(a+="="+i[u].split(";")[0]));return document.cookie=t+"="+n+a}}function c(e,n){if("undefined"!=typeof document){for(var o={},i=document.cookie?document.cookie.split("; "):[],c=0;c<i.length;c++){var a=i[c].split("="),u=a.slice(1).join("=");n||'"'!==u.charAt(0)||(u=u.slice(1,-1));try{var f=t(a[0]);if(u=(r.read||r)(u,f)||t(u),n)try{u=JSON.parse(u)}catch(e){}if(o[f]=u,e===f)break}catch(e){}}return e?o[e]:o}}return o.set=i,o.get=function(e){return c(e,!1)},o.getJSON=function(e){return c(e,!0)},o.remove=function(t,n){i(t,"",e(n,{expires:-1}))},o.defaults={},o.withConverter=n,o}((function(){}))}))},function(e,t){e.exports=window.ctEvents},function(e,t){e.exports=window.ctFrontend},function(e,t,n){"use strict";n.r(t);var r=n(1),o=n.n(r),i=n(0),c=n.n(i),a=n(2);function u(e){return function(e){if(Array.isArray(e))return f(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return f(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return f(e,t)}(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.")}()}function f(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}var s=function(){var e=document.querySelector(".cookie-notification");e&&(c.a.get("blocksy_cookies_consent_accepted")?e.remove():(requestAnimationFrame((function(){e.classList.remove("ct-fade-in-start"),e.classList.add("ct-fade-in-end"),d(e,(function(){e.classList.remove("ct-fade-in-end")}))})),u(e.querySelectorAll("button")).map((function(t){t.addEventListener("click",(function(n){if(n.preventDefault(),t.classList.contains("ct-accept")){c.a.set("blocksy_cookies_consent_accepted","true",{expires:new Date(1*new Date+{onehour:36e5,oneday:864e5,oneweek:6048e5,onemonth:26784e5,threemonths:80352e5,sixmonths:160704e5,oneyear:31536e6,forever:864e9}[t.closest("[data-period]").dataset.period])})}e.classList.add("ct-fade-start"),requestAnimationFrame((function(){e.classList.remove("ct-fade-start"),e.classList.add("ct-fade-end"),d(e,(function(){e.parentNode.removeChild(e)}))}))}))}))))};function d(e,t){setTimeout((function(){t()}),300)}Object(a.onDocumentLoaded)((function(){s(),o.a.on("blocksy:cookies:init",(function(){s()}))}))}]);
framework/extensions/cookies-consent/static/js/helpers.js DELETED
@@ -1,7 +0,0 @@
1
- export const onDocumentLoaded = cb => {
2
- if (/comp|inter|loaded/.test(document.readyState)) {
3
- cb()
4
- } else {
5
- document.addEventListener('DOMContentLoaded', cb, false)
6
- }
7
- }
 
 
 
 
 
 
 
framework/extensions/cookies-consent/static/js/main.js CHANGED
@@ -1,6 +1,6 @@
1
  import ctEvents from 'ct-events'
2
  import cookie from 'js-cookie'
3
- import { onDocumentLoaded } from './helpers'
4
 
5
  const initCookies = () => {
6
  const notification = document.querySelector('.cookie-notification')
1
  import ctEvents from 'ct-events'
2
  import cookie from 'js-cookie'
3
+ import { onDocumentLoaded } from 'blocksy-frontend'
4
 
5
  const initCookies = () => {
6
  const notification = document.querySelector('.cookie-notification')
framework/extensions/mailchimp/admin-static/bundle/sync.js CHANGED
@@ -1 +1 @@
1
- !function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var c,a=e[Symbol.iterator]();!(r=(c=a.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}return n}(e,t)||i(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 o(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||i(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.")}()}function i(e,t){if(e){if("string"==typeof e)return c(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)?c(e,t):void 0}}function c(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 a(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 l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.r(t);var u,p=function(){var e=document.createElement("div");return e.innerHTML=document.querySelector(".ct-customizer-preview-cache-container").value,e},m=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"id";if(t||(t=p()),t.querySelector(".ct-customizer-preview-cache [data-".concat(n,'="').concat(e,'"]'))){var r=t.querySelector(".ct-customizer-preview-cache [data-".concat(n,'="').concat(e,'"]')).innerHTML,o=document.createElement("div");return o.innerHTML=r,o}},d=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e=l({fragment_id:null,selector:null,parent_selector:null,strategy:"append",whenInserted:function(){},beforeInsert:function(e){},should_insert:!0},e);var t=document.querySelector(e.parent_selector);if(o(document.querySelectorAll("".concat(e.parent_selector," ").concat(e.selector))).map((function(e){return e.parentNode.removeChild(e)})),e.should_insert){var n=m(e.fragment_id);if(n){for(;n.firstElementChild;)if(e.beforeInsert(n.firstElementChild),"append"===e.strategy&&t.appendChild(n.firstElementChild),"firstChild"===e.strategy&&t.insertBefore(n.firstElementChild,t.firstElementChild),e.strategy.indexOf("maybeBefore")>-1){var i=e.strategy.split(":"),c=r(i,2),a=(c[0],c[1]);t.querySelector(a)?t.insertBefore(n.firstElementChild,t.querySelector(a)):t.appendChild(n.firstElementChild)}e.whenInserted()}}},f=function(e,t){if(t.classList.remove("ct-hidden-sm","ct-hidden-md","ct-hidden-lg"),wp.customize(e)){var n=wp.customize(e)()||{mobile:!1,tablet:!0,desktop:!0};n.mobile||t.classList.add("ct-hidden-sm"),n.tablet||t.classList.add("ct-hidden-md"),n.desktop||t.classList.add("ct-hidden-lg")}},b=function(e){if([e.top,e.right,e.bottom,e.left].reduce((function(e,t){return!!e&&!("auto"!==t&&t&&t.toString().match(/\d/g))}),!0))return"CT_CSS_SKIP_RULE";var t=["auto"!==e.top&&e.top.toString().match(/\d/g)?e.top:0,"auto"!==e.right&&e.right.toString().match(/\d/g)?e.right:0,"auto"!==e.bottom&&e.bottom.toString().match(/\d/g)?e.bottom:0,"auto"!==e.left&&e.left.toString().match(/\d/g)?e.left:0];return t[0]===t[1]&&t[0]===t[2]&&t[0]===t[3]?t[0]:t[0]===t[2]&&t[1]===t[3]?"".concat(t[0]," ").concat(t[3]):t.join(" ")},h=function(e,t){var n=t.forcedOutput,r=void 0!==n&&n;if("CT_CSS_SKIP_RULE"===e)return"CT_CSS_SKIP_RULE";if("none"===e)return"none";if(!e.enable)return r?"none":"CT_CSS_SKIP_RULE";if(0===parseFloat(e.blur)&&0===parseFloat(e.spread)&&0===parseFloat(e.v_offset)&&0===parseFloat(e.h_offset))return r?"none":"CT_CSS_SKIP_RULE";var o=[];return e.inset&&o.push("inset"),o.push("".concat(e.h_offset,"px")),o.push("".concat(e.v_offset,"px")),0!==parseFloat(e.blur)&&(o.push("".concat(e.blur,"px")),0!==parseFloat(e.spread)&&o.push("".concat(e.spread,"px"))),0===parseFloat(e.blur)&&0!==parseFloat(e.spread)&&(o.push("".concat(e.blur,"px")),o.push("".concat(e.spread,"px"))),o.push(e.color.color),o.join(" ")},y=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"desktop",r={desktop:"ct-main-styles-inline-css",tablet:"ct-main-styles-tablet-inline-css",mobile:"ct-main-styles-mobile-inline-css"},o=document.querySelector("style#".concat(r[n])),i=o.innerText,c="".concat(e["".concat(n,"_selector_prefix")]?"".concat(e["".concat(n,"_selector_prefix")]," "):"").concat(e.selector||":root"),a=null,l=i.match(a);0===i.trim().indexOf(c)?(a=new RegExp("".concat(c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"\\s?{[\\s\\S]*?}"),"gm"),l=i.match(a)):(a=new RegExp("\\}\\s*?".concat(c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"\\s?{[\\s\\S]*?}"),"gm"),l=i.match(a)),l||(0===(i="".concat(i," ").concat(c," { }")).trim().indexOf(c)?(a=new RegExp("".concat(c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"\\s?{[\\s\\S]*?}"),"gm"),l=i.match(a)):(a=new RegExp("\\}\\s*?".concat(c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"\\s?{[\\s\\S]*?}"),"gm"),l=i.match(a))),o.innerText=i.replace(a,l[0].indexOf("--".concat(e.variable,":"))>-1?l[0].replace(new RegExp("--".concat(e.variable,":[\\s\\S]*?;"),"gm"),t.indexOf("CT_CSS_SKIP_RULE")>-1||t.indexOf(e.variable)>-1?"":"--".concat(e.variable,": ").concat(t,";")):l[0].replace(new RegExp("".concat(c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"\\s?{"),"gm"),"".concat(c," {").concat(t.indexOf("CT_CSS_SKIP_RULE")>-1||t.indexOf(e.variable)>-1?"":"--".concat(e.variable,": ").concat(t,";"))))},v=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"desktop",r=(e.type||"").indexOf("color")>-1?t["color"===e.type?"default":e.type.split(":")[1]].color:t;"border"===(e.type||"")&&(r=t&&"none"!==t.style?"".concat(t.width,"px ").concat(t.style," ").concat(t.color.color):"none"),"spacing"===(e.type||"")&&(r=b(t)),"box-shadow"===(e.type||"")&&(r=h(t,e)),y(e,"".concat(r).concat(e.unit||"").concat(e.important?" !important":""),n)},g=function(e,t){var n=t;t=e.extractValue?e.extractValue(t):t,e.whenDone&&e.whenDone(t,n),t=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return e&&Object.keys(e).indexOf("desktop")>-1?t?e:e.desktop:t?{desktop:e,tablet:e,mobile:e}:e}(t,!!e.responsive),e.responsive?(e.enabled&&"no"===!wp.customize(e.enabled)()&&(t.mobile="0"+(e.unit?"":"px"),t.tablet="0"+(e.unit?"":"px"),t.desktop="0"+(e.unit?"":"px")),v(e,t.desktop,"desktop"),v(e,t.tablet,"tablet"),v(e,t.mobile,"mobile")):v(e,t)};u={mailchimpContent:[{selector:".ct-mailchimp-block",variable:"color",type:"color:default"},{selector:".ct-mailchimp-block",variable:"linkHoverColor",type:"color:hover"}],mailchimpButton:[{selector:".ct-mailchimp-block",variable:"buttonInitialColor",type:"color:default"},{selector:".ct-mailchimp-block",variable:"buttonHoverColor",type:"color:hover"}],mailchimpBackground:{selector:".ct-mailchimp-block",variable:"mailchimpBackground",type:"color"},mailchimpShadow:{selector:".ct-mailchimp-block",type:"box-shadow",variable:"box-shadow",responsive:!0},mailchimpSpacing:{selector:".ct-mailchimp-block",variable:"padding",responsive:!0,unit:""}},wp.customize.bind("change",(function(e){return u[e.id]&&(Array.isArray(u[e.id])?u[e.id]:[u[e.id]]).map((function(t){return g(t,e())}))})),wp.customize("mailchimp_subscribe_visibility",(function(e){return e.bind((function(e){var t=document.querySelector(".ct-mailchimp-block");f("mailchimp_subscribe_visibility",t)}))})),(document.body.classList.contains("single")||document.body.classList.contains("page"))&&function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e=l({id:null,fragment_id:null,selector:null,parent_selector:null,strategy:"append",whenInserted:function(){},beforeInsert:function(e){},watch:[]},e);var t=function(){var t=wp.customize(e.id)();d(l(l({},e),{},{should_insert:"yes"===t}))};wp.customize(e.id,(function(e){return e.bind((function(e){return t()}))})),e.watch.map((function(e){return wp.customize(e,(function(e){return e.bind((function(){return t()}))}))}))}({id:"mailchimp_single_post_enabled",strategy:"append",parent_selector:".site-main article",selector:".ct-mailchimp-block",fragment_id:"blocksy-mailchimp-subscribe",watch:["has_mailchimp_name","mailchimp_button_text","mailchimp_title","mailchimp_text","mailchimp_name_label","mailchimp_mail_label"],whenInserted:function(){if(document.body.classList.contains("single")||document.body.classList.contains("page")){var e=document.querySelector(".ct-mailchimp-block");f("mailchimp_subscribe_visibility",e),"yes"!==wp.customize("has_mailchimp_name")()?(e.querySelector("[data-fields]").dataset.fields=1,e.querySelector('[name="FNAME"]').remove()):(e.querySelector("[data-fields]").dataset.fields=2,e.querySelector('[name="FNAME"]').setAttribute("placeholder","".concat(wp.customize("mailchimp_name_label")()))),e.querySelector('[name="EMAIL"]').setAttribute("placeholder","".concat(wp.customize("mailchimp_mail_label")()," *")),e.querySelector("button").innerHTML=wp.customize("mailchimp_button_text")(),e.querySelector("h3").innerHTML=wp.customize("mailchimp_title")(),e.querySelector(".ct-mailchimp-description").innerHTML=wp.customize("mailchimp_text")()}}})}]);
1
+ !function(e){var t={};function o(c){if(t[c])return t[c].exports;var i=t[c]={i:c,l:!1,exports:{}};return e[c].call(i.exports,i,i.exports,o),i.l=!0,i.exports}o.m=e,o.c=t,o.d=function(e,t,c){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:c})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var c=Object.create(null);if(o.r(c),Object.defineProperty(c,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)o.d(c,i,function(t){return e[t]}.bind(null,i));return c},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=1)}([function(e,t){e.exports=window.blocksyCustomizerSync},function(e,t,o){"use strict";o.r(t);var c,i=o(0),n=function(e){if([e.top,e.right,e.bottom,e.left].reduce((function(e,t){return!!e&&!("auto"!==t&&t&&t.toString().match(/\d/g))}),!0))return"CT_CSS_SKIP_RULE";var t=["auto"!==e.top&&e.top.toString().match(/\d/g)?e.top:0,"auto"!==e.right&&e.right.toString().match(/\d/g)?e.right:0,"auto"!==e.bottom&&e.bottom.toString().match(/\d/g)?e.bottom:0,"auto"!==e.left&&e.left.toString().match(/\d/g)?e.left:0];return t[0]===t[1]&&t[0]===t[2]&&t[0]===t[3]?t[0]:t[0]===t[2]&&t[1]===t[3]?"".concat(t[0]," ").concat(t[3]):t.join(" ")},a=function(e,t){var o=t.forcedOutput,c=void 0!==o&&o;if("CT_CSS_SKIP_RULE"===e)return"CT_CSS_SKIP_RULE";if("none"===e)return"none";if(!e.enable)return c?"none":"CT_CSS_SKIP_RULE";if(0===parseFloat(e.blur)&&0===parseFloat(e.spread)&&0===parseFloat(e.v_offset)&&0===parseFloat(e.h_offset))return c?"none":"CT_CSS_SKIP_RULE";var i=[];return e.inset&&i.push("inset"),i.push("".concat(e.h_offset,"px")),i.push("".concat(e.v_offset,"px")),0!==parseFloat(e.blur)&&(i.push("".concat(e.blur,"px")),0!==parseFloat(e.spread)&&i.push("".concat(e.spread,"px"))),0===parseFloat(e.blur)&&0!==parseFloat(e.spread)&&(i.push("".concat(e.blur,"px")),i.push("".concat(e.spread,"px"))),i.push(e.color.color),i.join(" ")},r=function(e,t){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"desktop",c={desktop:"ct-main-styles-inline-css",tablet:"ct-main-styles-tablet-inline-css",mobile:"ct-main-styles-mobile-inline-css"},i=document.querySelector("style#".concat(c[o])),n=i.innerText,a="".concat(e["".concat(o,"_selector_prefix")]?"".concat(e["".concat(o,"_selector_prefix")]," "):"").concat(e.selector||":root"),r=null,l=n.match(r);0===n.trim().indexOf(a)?(r=new RegExp("".concat(a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"\\s?{[\\s\\S]*?}"),"gm"),l=n.match(r)):(r=new RegExp("\\}\\s*?".concat(a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"\\s?{[\\s\\S]*?}"),"gm"),l=n.match(r)),l||(0===(n="".concat(n," ").concat(a," { }")).trim().indexOf(a)?(r=new RegExp("".concat(a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"\\s?{[\\s\\S]*?}"),"gm"),l=n.match(r)):(r=new RegExp("\\}\\s*?".concat(a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"\\s?{[\\s\\S]*?}"),"gm"),l=n.match(r))),i.innerText=n.replace(r,l[0].indexOf("--".concat(e.variable,":"))>-1?l[0].replace(new RegExp("--".concat(e.variable,":[\\s\\S]*?;"),"gm"),t.indexOf("CT_CSS_SKIP_RULE")>-1||t.indexOf(e.variable)>-1?"":"--".concat(e.variable,": ").concat(t,";")):l[0].replace(new RegExp("".concat(a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"\\s?{"),"gm"),"".concat(a," {").concat(t.indexOf("CT_CSS_SKIP_RULE")>-1||t.indexOf(e.variable)>-1?"":"--".concat(e.variable,": ").concat(t,";"))))},l=function(e,t){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"desktop",c=(e.type||"").indexOf("color")>-1?t["color"===e.type?"default":e.type.split(":")[1]].color:t;"border"===(e.type||"")&&(c=t&&"none"!==t.style?"".concat(t.width,"px ").concat(t.style," ").concat(t.color.color):"none"),"spacing"===(e.type||"")&&(c=n(t)),"box-shadow"===(e.type||"")&&(c=a(t,e)),r(e,"".concat(c).concat(e.unit||"").concat(e.important?" !important":""),o)},s=function(e,t){var o=t;t=e.extractValue?e.extractValue(t):t,e.whenDone&&e.whenDone(t,o),t=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return e&&Object.keys(e).indexOf("desktop")>-1?t?e:e.desktop:t?{desktop:e,tablet:e,mobile:e}:e}(t,!!e.responsive),e.responsive?(e.enabled&&"no"===!wp.customize(e.enabled)()&&(t.mobile="0"+(e.unit?"":"px"),t.tablet="0"+(e.unit?"":"px"),t.desktop="0"+(e.unit?"":"px")),l(e,t.desktop,"desktop"),l(e,t.tablet,"tablet"),l(e,t.mobile,"mobile")):l(e,t)};c={mailchimpContent:[{selector:".ct-mailchimp-block",variable:"color",type:"color:default"},{selector:".ct-mailchimp-block",variable:"linkHoverColor",type:"color:hover"}],mailchimpButton:[{selector:".ct-mailchimp-block",variable:"buttonInitialColor",type:"color:default"},{selector:".ct-mailchimp-block",variable:"buttonHoverColor",type:"color:hover"}],mailchimpBackground:{selector:".ct-mailchimp-block",variable:"mailchimpBackground",type:"color"},mailchimpShadow:{selector:".ct-mailchimp-block",type:"box-shadow",variable:"box-shadow",responsive:!0},mailchimpSpacing:{selector:".ct-mailchimp-block",variable:"padding",responsive:!0,unit:""}},wp.customize.bind("change",(function(e){return c[e.id]&&(Array.isArray(c[e.id])?c[e.id]:[c[e.id]]).map((function(t){return s(t,e())}))})),wp.customize("mailchimp_subscribe_visibility",(function(e){return e.bind((function(e){var t=document.querySelector(".ct-mailchimp-block");Object(i.responsiveClassesFor)("mailchimp_subscribe_visibility",t)}))})),(document.body.classList.contains("single")||document.body.classList.contains("page"))&&Object(i.checkAndReplace)({id:"mailchimp_single_post_enabled",strategy:"append",parent_selector:".site-main article",selector:".ct-mailchimp-block",fragment_id:"blocksy-mailchimp-subscribe",watch:["has_mailchimp_name","mailchimp_button_text","mailchimp_title","mailchimp_text","mailchimp_name_label","mailchimp_mail_label"],whenInserted:function(){if(document.body.classList.contains("single")||document.body.classList.contains("page")){var e=document.querySelector(".ct-mailchimp-block");Object(i.responsiveClassesFor)("mailchimp_subscribe_visibility",e),"yes"!==wp.customize("has_mailchimp_name")()?(e.querySelector("[data-fields]").dataset.fields=1,e.querySelector('[name="FNAME"]').remove()):(e.querySelector("[data-fields]").dataset.fields=2,e.querySelector('[name="FNAME"]').setAttribute("placeholder","".concat(wp.customize("mailchimp_name_label")()))),e.querySelector('[name="EMAIL"]').setAttribute("placeholder","".concat(wp.customize("mailchimp_mail_label")()," *")),e.querySelector("button").innerHTML=wp.customize("mailchimp_button_text")(),e.querySelector("h3").innerHTML=wp.customize("mailchimp_title")(),e.querySelector(".ct-mailchimp-description").innerHTML=wp.customize("mailchimp_text")()}}})}]);
framework/extensions/mailchimp/admin-static/js/sync.js CHANGED
@@ -1,7 +1,4 @@
1
- import {
2
- checkAndReplace,
3
- responsiveClassesFor,
4
- } from '../../../cookies-consent/static/js/sync/helpers'
5
 
6
  import './variables'
7
 
1
+ import { checkAndReplace, responsiveClassesFor } from 'blocksy-customizer-sync'
 
 
 
2
 
3
  import './variables'
4
 
framework/extensions/mailchimp/extension.php CHANGED
@@ -86,7 +86,7 @@ class BlocksyExtensionMailchimp {
86
  wp_enqueue_script(
87
  'blocksy-ext-newsletter-subscribe-scripts',
88
  BLOCKSY_URL . 'framework/extensions/mailchimp/static/bundle/main.js',
89
- [],
90
  $data['Version'],
91
  true
92
  );
86
  wp_enqueue_script(
87
  'blocksy-ext-newsletter-subscribe-scripts',
88
  BLOCKSY_URL . 'framework/extensions/mailchimp/static/bundle/main.js',
89
+ ['ct-scripts'],
90
  $data['Version'],
91
  true
92
  );
framework/extensions/mailchimp/static/bundle/main.css CHANGED
@@ -1,5 +1,5 @@
1
  /**
2
- * - v1.7.59
3
  *
4
  * Copyright (c) 2021
5
  * Licensed GPLv2+
1
  /**
2
+ * - v1.7.61
3
  *
4
  * Copyright (c) 2021
5
  * Licensed GPLv2+
framework/extensions/mailchimp/static/bundle/main.js CHANGED
@@ -1 +1 @@
1
- !function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=0)}([function(e,t,r){"use strict";r.r(t);var n;function o(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return i(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 i(e,t)}(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.")}()}function i(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}n=function(){o(document.querySelectorAll(".ct-mailchimp-widget-form, .ct-mailchimp-block-form")).map((function(e){e.matches("[data-skip-submit]")||e.addEventListener("submit",(function(e){e.preventDefault();var t=e.target;if(t.querySelector('[type="email"]').value.trim()){if(document.getElementById("js-validate-robot")&&""!==document.getElementById("js-validate-robot").value)return!1;for(var r=t.action.replace("subscribe","subscribe/post-json"),n="",o="mailchimpCallback",i=t.querySelectorAll("input"),c=0;c<i.length;c++)n+="&"+i[c].name+"="+encodeURIComponent(i[c].value);n+="&c=".concat(o);var u=document.createElement("script");u.src=r+n,document.body.appendChild(u),t.classList.remove("subscribe-error","subscribe-success"),t.classList.add("subscribe-loading"),window[o]=function(e){delete window[o],document.body.removeChild(u),t.classList.remove("subscribe-loading"),e&&(t.classList.add("error"===e.result?"subscribe-error":"subscribe-success"),t.querySelector(".ct-mailchimp-message").innerHTML=e.msg.replace("0 - ",""))}}}))}))},/comp|inter|loaded/.test(document.readyState)?n():document.addEventListener("DOMContentLoaded",n,!1)}]);
1
+ !function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=1)}([function(e,t){e.exports=window.ctFrontend},function(e,t,r){"use strict";r.r(t);var n=r(0);function o(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return i(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 i(e,t)}(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.")}()}function i(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(n.onDocumentLoaded)((function(){o(document.querySelectorAll(".ct-mailchimp-widget-form, .ct-mailchimp-block-form")).map((function(e){e.matches("[data-skip-submit]")||e.addEventListener("submit",(function(e){e.preventDefault();var t=e.target;if(t.querySelector('[type="email"]').value.trim()){if(document.getElementById("js-validate-robot")&&""!==document.getElementById("js-validate-robot").value)return!1;for(var r=t.action.replace("subscribe","subscribe/post-json"),n="",o="mailchimpCallback",i=t.querySelectorAll("input"),c=0;c<i.length;c++)n+="&"+i[c].name+"="+encodeURIComponent(i[c].value);n+="&c=".concat(o);var u=document.createElement("script");u.src=r+n,document.body.appendChild(u),t.classList.remove("subscribe-error","subscribe-success"),t.classList.add("subscribe-loading"),window[o]=function(e){delete window[o],document.body.removeChild(u),t.classList.remove("subscribe-loading"),e&&(t.classList.add("error"===e.result?"subscribe-error":"subscribe-success"),t.querySelector(".ct-mailchimp-message").innerHTML=e.msg.replace("0 - ",""))}}}))}))}))}]);
framework/extensions/mailchimp/static/js/main.js CHANGED
@@ -1,4 +1,4 @@
1
- import { onDocumentLoaded } from '../../../cookies-consent/static/js/helpers'
2
 
3
  onDocumentLoaded(() => {
4
  ;[
1
+ import { onDocumentLoaded } from 'blocksy-frontend'
2
 
3
  onDocumentLoaded(() => {
4
  ;[
framework/extensions/product-reviews/static/bundle/main-admin.css CHANGED
@@ -1,5 +1,5 @@
1
  /**
2
- * - v1.7.59
3
  *
4
  * Copyright (c) 2021
5
  * Licensed GPLv2+
1
  /**
2
+ * - v1.7.61
3
  *
4
  * Copyright (c) 2021
5
  * Licensed GPLv2+
framework/extensions/product-reviews/static/bundle/main.css CHANGED
@@ -1,5 +1,5 @@
1
  /**
2
- * - v1.7.59
3
  *
4
  * Copyright (c) 2021
5
  * Licensed GPLv2+
1
  /**
2
+ * - v1.7.61
3
  *
4
  * Copyright (c) 2021
5
  * Licensed GPLv2+
framework/extensions/trending/static/bundle/main.js CHANGED
@@ -1 +1 @@
1
- !function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=1)}([function(t,e){t.exports=window.ctEvents},function(t,e,r){"use strict";r.r(e);var n=r(0),o=r.n(n);function a(t){return function(t){if(Array.isArray(t))return i(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return i(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(t,e)}(t)||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.")}()}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var c=function(t){return a(t.querySelectorAll(".ct-image-container.ct-lazy")).map((function(t){t.querySelector("img")&&(t.querySelector("img").setAttribute("src",t.querySelector("img").dataset.ctLazy),t.querySelector("img").dataset.ctLazySet&&t.querySelector("img").setAttribute("srcset",t.querySelector("img").dataset.ctLazySet)),t.classList.remove("ct-lazy"),t.classList.add("ct-lazy-loaded")}))};function l(t){return function(t){if(Array.isArray(t))return f(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||s(t)||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.")}()}function u(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var r=[],n=!0,o=!1,a=void 0;try{for(var i,c=t[Symbol.iterator]();!(n=(i=c.next()).done)&&(r.push(i.value),!e||r.length!==e);n=!0);}catch(t){o=!0,a=t}finally{try{n||null==c.return||c.return()}finally{if(o)throw a}}return r}(t,e)||s(t,e)||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 s(t,e){if(t){if("string"==typeof t)return f(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?f(t,e):void 0}}function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function d(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function y(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?d(Object(r),!0).forEach((function(e){m(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function m(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var p,b={},v=function(t){return b[t]?new Promise((function(e){e(b[t]),window.ct_customizer_localizations||(b[t]=b[t].clone())})):new Promise((function(e){return fetch(t).then((function(r){e(r),window.ct_customizer_localizations||(b[t]=r.clone())}))}))},g=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if((t=y({el:null,action:null},t)).el&&t.action&&!t.el.classList.contains("ct-loading")){var e=parseInt(t.el.dataset.page,10);if(("prev"!==t.action||1!==e)&&!(t.el.querySelectorAll(".ct-container > a").length<4&&1===e||t.el.dataset.page.indexOf("last")>-1&&"next"===t.action)){t.el.classList.add("ct-loading");var r="prev"===t.action?e-1:e+1;Promise.all([new Promise((function(e){t.el.classList.add("ct-leave-active"),requestAnimationFrame((function(){t.el.classList.remove("ct-leave-active"),t.el.classList.add("ct-leave"),setTimeout((function(){return e()}),650)}))})),v("".concat(ct_localizations.ajax_url,"?action=blocksy_get_trending_posts&page=").concat(r)).then((function(t){return t.json()}))]).then((function(e){var n=u(e,2),o=(n[0],n[1]),a=o.success,i=o.data;if(a){var s=i.posts,f=s.is_last_page,d=s.posts;t.el.dataset.page="".concat(r).concat(f?":last":""),l(t.el.querySelectorAll("a")).map((function(t){return t.remove()})),d.map((function(e){return t.el.insertAdjacentHTML("beforeend",'<a href="'.concat(e.url,'">\n ').concat(e.image,'\n <span class="ct-item-title">\n ').concat(e.title,"\n </span>\n </a>"))})),setTimeout((function(){t.el.classList.remove("ct-leave"),t.el.classList.add("ct-enter-active"),requestAnimationFrame((function(){t.el.classList.remove("ct-enter-active"),t.el.classList.add("ct-active"),setTimeout((function(){t.el.classList.remove("ct-active"),t.el.classList.remove("ct-loading")}),650)}))}),50),c(t.el)}}))}}},S=function(){Array.from(document.querySelectorAll(".ct-trending-block [data-page]")).map((function(t){return function(t){t.hasListeners||(t.hasListeners=!0,t.querySelector(".ct-arrow-left").addEventListener("click",(function(e){e.preventDefault(),g({el:t,action:"prev"})})),t.querySelector(".ct-arrow-right").addEventListener("click",(function(e){e.preventDefault(),g({el:t,action:"next"})})))}(t)}))};p=function(){S()},/comp|inter|loaded/.test(document.readyState)?p():document.addEventListener("DOMContentLoaded",p,!1),o.a.on("blocksy:frontend:init",(function(){S()}))}]);
1
+ !function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=2)}([function(e,t){e.exports=window.ctFrontend},function(e,t){e.exports=window.ctEvents},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(1),c=n.n(o);function i(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||l(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.")}()}function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,c=void 0;try{for(var i,a=e[Symbol.iterator]();!(r=(i=a.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw c}}return n}(e,t)||l(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 l(e,t){if(e){if("string"==typeof e)return u(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)?u(e,t):void 0}}function u(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 s(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 f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){d(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var p={},y=function(e){return p[e]?new Promise((function(t){t(p[e]),window.ct_customizer_localizations||(p[e]=p[e].clone())})):new Promise((function(t){return fetch(e).then((function(n){t(n),window.ct_customizer_localizations||(p[e]=n.clone())}))}))},m=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if((e=f({el:null,action:null},e)).el&&e.action&&!e.el.classList.contains("ct-loading")){var t=parseInt(e.el.dataset.page,10);if(("prev"!==e.action||1!==t)&&!(e.el.querySelectorAll(".ct-container > a").length<4&&1===t||e.el.dataset.page.indexOf("last")>-1&&"next"===e.action)){e.el.classList.add("ct-loading");var n="prev"===e.action?t-1:t+1;Promise.all([new Promise((function(t){e.el.classList.add("ct-leave-active"),requestAnimationFrame((function(){e.el.classList.remove("ct-leave-active"),e.el.classList.add("ct-leave"),setTimeout((function(){return t()}),650)}))})),y("".concat(ct_localizations.ajax_url,"?action=blocksy_get_trending_posts&page=").concat(n)).then((function(e){return e.json()}))]).then((function(t){var o=a(t,2),c=(o[0],o[1]),l=c.success,u=c.data;if(l){var s=u.posts,f=s.is_last_page,d=s.posts;e.el.dataset.page="".concat(n).concat(f?":last":""),i(e.el.querySelectorAll("a")).map((function(e){return e.remove()})),d.map((function(t){return e.el.insertAdjacentHTML("beforeend",'<a href="'.concat(t.url,'">\n ').concat(t.image,'\n <span class="ct-item-title">\n ').concat(t.title,"\n </span>\n </a>"))})),setTimeout((function(){e.el.classList.remove("ct-leave"),e.el.classList.add("ct-enter-active"),requestAnimationFrame((function(){e.el.classList.remove("ct-enter-active"),e.el.classList.add("ct-active"),setTimeout((function(){e.el.classList.remove("ct-active"),e.el.classList.remove("ct-loading")}),650)}))}),50),Object(r.markImagesAsLoaded)(e.el)}}))}}},b=function(){Array.from(document.querySelectorAll(".ct-trending-block [data-page]")).map((function(e){return function(e){e.hasListeners||(e.hasListeners=!0,e.querySelector(".ct-arrow-left").addEventListener("click",(function(t){t.preventDefault(),m({el:e,action:"prev"})})),e.querySelector(".ct-arrow-right").addEventListener("click",(function(t){t.preventDefault(),m({el:e,action:"next"})})))}(e)}))};Object(r.onDocumentLoaded)((function(){b()})),c.a.on("blocksy:frontend:init",(function(){b()}))}]);
framework/extensions/trending/static/js/main.js CHANGED
@@ -1,11 +1,11 @@
1
- import { onDocumentLoaded } from '../../../cookies-consent/static/js/helpers'
2
  import ctEvents from 'ct-events'
3
  import { mount } from './trending-block'
4
 
5
  const initTrending = () => {
6
  Array.from(
7
  document.querySelectorAll('.ct-trending-block [data-page]')
8
- ).map(el => mount(el))
9
  }
10
 
11
  onDocumentLoaded(() => {
1
+ import { onDocumentLoaded } from 'blocksy-frontend'
2
  import ctEvents from 'ct-events'
3
  import { mount } from './trending-block'
4
 
5
  const initTrending = () => {
6
  Array.from(
7
  document.querySelectorAll('.ct-trending-block [data-page]')
8
+ ).map((el) => mount(el))
9
  }
10
 
11
  onDocumentLoaded(() => {
framework/extensions/trending/static/js/trending-block.js CHANGED
@@ -1,17 +1,17 @@
1
- import { markImagesAsLoaded } from '../../../cookies-consent/static/js/lazy-load-helpers'
2
 
3
  const store = {}
4
 
5
- const cachedFetch = url =>
6
  store[url]
7
- ? new Promise(resolve => {
8
  resolve(store[url])
9
  if (!window.ct_customizer_localizations) {
10
  store[url] = store[url].clone()
11
  }
12
  })
13
- : new Promise(resolve =>
14
- fetch(url).then(response => {
15
  resolve(response)
16
 
17
  if (!window.ct_customizer_localizations) {
@@ -26,7 +26,7 @@ const loadPage = (args = {}) => {
26
  // prev | next
27
  action: null,
28
 
29
- ...args
30
  }
31
 
32
  if (!args.el) {
@@ -64,7 +64,7 @@ const loadPage = (args = {}) => {
64
  let newPage = args.action === 'prev' ? currentPage - 1 : currentPage + 1
65
 
66
  Promise.all([
67
- new Promise(resolve => {
68
  args.el.classList.add('ct-leave-active')
69
  requestAnimationFrame(() => {
70
  args.el.classList.remove('ct-leave-active')
@@ -76,20 +76,20 @@ const loadPage = (args = {}) => {
76
 
77
  cachedFetch(
78
  `${ct_localizations.ajax_url}?action=blocksy_get_trending_posts&page=${newPage}`
79
- ).then(response => response.json())
80
  ]).then(([_, { success, data }]) => {
81
  if (!success) {
82
  return
83
  }
84
 
85
  let {
86
- posts: { is_last_page, posts }
87
  } = data
88
 
89
  args.el.dataset.page = `${newPage}${is_last_page ? ':last' : ''}`
90
- ;[...args.el.querySelectorAll('a')].map(el => el.remove())
91
 
92
- posts.map(post =>
93
  args.el.insertAdjacentHTML(
94
  'beforeend',
95
  `<a href="${post.url}">
@@ -120,19 +120,19 @@ const loadPage = (args = {}) => {
120
  })
121
  }
122
 
123
- export const mount = el => {
124
  if (el.hasListeners) {
125
  return
126
  }
127
 
128
  el.hasListeners = true
129
 
130
- el.querySelector('.ct-arrow-left').addEventListener('click', e => {
131
  e.preventDefault()
132
  loadPage({ el, action: 'prev' })
133
  })
134
 
135
- el.querySelector('.ct-arrow-right').addEventListener('click', e => {
136
  e.preventDefault()
137
  loadPage({ el, action: 'next' })
138
  })
1
+ import { markImagesAsLoaded } from 'blocksy-frontend'
2
 
3
  const store = {}
4
 
5
+ const cachedFetch = (url) =>
6
  store[url]
7
+ ? new Promise((resolve) => {
8
  resolve(store[url])
9
  if (!window.ct_customizer_localizations) {
10
  store[url] = store[url].clone()
11
  }
12
  })
13
+ : new Promise((resolve) =>
14
+ fetch(url).then((response) => {
15
  resolve(response)
16
 
17
  if (!window.ct_customizer_localizations) {
26
  // prev | next
27
  action: null,
28
 
29
+ ...args,
30
  }
31
 
32
  if (!args.el) {
64
  let newPage = args.action === 'prev' ? currentPage - 1 : currentPage + 1
65
 
66
  Promise.all([
67
+ new Promise((resolve) => {
68
  args.el.classList.add('ct-leave-active')
69
  requestAnimationFrame(() => {
70
  args.el.classList.remove('ct-leave-active')
76
 
77
  cachedFetch(
78
  `${ct_localizations.ajax_url}?action=blocksy_get_trending_posts&page=${newPage}`
79
+ ).then((response) => response.json()),
80
  ]).then(([_, { success, data }]) => {
81
  if (!success) {
82
  return
83
  }
84
 
85
  let {
86
+ posts: { is_last_page, posts },
87
  } = data
88
 
89
  args.el.dataset.page = `${newPage}${is_last_page ? ':last' : ''}`
90
+ ;[...args.el.querySelectorAll('a')].map((el) => el.remove())
91
 
92
+ posts.map((post) =>
93
  args.el.insertAdjacentHTML(
94
  'beforeend',
95
  `<a href="${post.url}">
120
  })
121
  }
122
 
123
+ export const mount = (el) => {
124
  if (el.hasListeners) {
125
  return
126
  }
127
 
128
  el.hasListeners = true
129
 
130
+ el.querySelector('.ct-arrow-left').addEventListener('click', (e) => {
131
  e.preventDefault()
132
  loadPage({ el, action: 'prev' })
133
  })
134
 
135
+ el.querySelector('.ct-arrow-right').addEventListener('click', (e) => {
136
  e.preventDefault()
137
  loadPage({ el, action: 'next' })
138
  })
framework/extensions/widgets/static/bundle/main.css CHANGED
@@ -1,5 +1,5 @@
1
  /**
2
- * - v1.7.59
3
  *
4
  * Copyright (c) 2021
5
  * Licensed GPLv2+
1
  /**
2
+ * - v1.7.61
3
  *
4
  * Copyright (c) 2021
5
  * Licensed GPLv2+
framework/features/header/items/account/config.php CHANGED
@@ -14,27 +14,12 @@ $config = [
14
  'loggedin_text',
15
  'login_account_action',
16
  'loggedout_account_custom_page',
17
- 'login_style',
18
- 'accountHeaderIcon',
19
- 'accountHeaderIconPosition',
20
- 'accountHeaderAvatarPosition',
21
-
22
- /*
23
- 'logo_type',
24
- 'blogname',
25
- 'custom_logo',
26
- 'has_mobile_logo',
27
- 'mobile_header_logo',
28
- 'has_tagline',
29
- 'site_description_wrapper',
30
- 'site_title_wrapper'
31
- */
32
  ],
33
- /*
34
 
35
  'translation_keys' => [
36
- ['key' => 'blogname']
37
  ]
38
- */
39
  ];
40
 
14
  'loggedin_text',
15
  'login_account_action',
16
  'loggedout_account_custom_page',
17
+ 'logged_out_style',
18
+ 'accountHeaderIcon'
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  ],
 
20
 
21
  'translation_keys' => [
22
+ ['key' => 'login_label']
23
  ]
 
24
  ];
25
 
framework/features/header/items/account/dynamic-styles.php CHANGED
@@ -14,8 +14,8 @@ if ($accountHeaderIconSize !== 15) {
14
  'mobile_css' => $mobile_css,
15
  'selector' => blocksy_assemble_selector(
16
  blocksy_mutate_selector([
17
- 'selector' => [$root_selector[0]],
18
- 'operation' => 'suffix',
19
  'to_add' => '[data-state="out"]'
20
  ])
21
  ),
@@ -33,8 +33,8 @@ if ($accountHeaderIconSize !== 15) {
33
  'mobile_css' => $mobile_css,
34
  'selector' => blocksy_assemble_selector(
35
  blocksy_mutate_selector([
36
- 'selector' => [$root_selector[0]],
37
- 'operation' => 'suffix',
38
  'to_add' => '[data-state="in"]'
39
  ])
40
  ),
@@ -172,9 +172,9 @@ blocksy_output_font_css([
172
  ], blc_call_fn([
173
  'fn' => 'blocksy_mutate_selector',
174
  ], [
175
- 'selector' => [$root_selector[0]],
176
  'operation' => 'suffix',
177
- 'to_add' => '.ct-header-account .ct-label'
178
  ])),
179
  ]);
180
 
@@ -182,7 +182,7 @@ blocksy_output_font_css([
182
  blocksy_output_colors([
183
  'value' => blocksy_akg('accountHeaderColor', $atts),
184
  'default' => [
185
- 'default' => [ 'color' => 'var(--color)' ],
186
  'hover' => [ 'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT') ],
187
  ],
188
  'css' => $css,
@@ -211,7 +211,7 @@ blocksy_output_colors([
211
  blocksy_output_colors([
212
  'value' => blocksy_akg('header_account_icon_color', $atts),
213
  'default' => [
214
- 'default' => [ 'color' => 'var(--color)' ],
215
  'hover' => [ 'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT') ],
216
  ],
217
  'css' => $css,
14
  'mobile_css' => $mobile_css,
15
  'selector' => blocksy_assemble_selector(
16
  blocksy_mutate_selector([
17
+ 'selector' => $root_selector,
18
+ 'operation' => 'el-suffix',
19
  'to_add' => '[data-state="out"]'
20
  ])
21
  ),
33
  'mobile_css' => $mobile_css,
34
  'selector' => blocksy_assemble_selector(
35
  blocksy_mutate_selector([
36
+ 'selector' => $root_selector,
37
+ 'operation' => 'el-suffix',
38
  'to_add' => '[data-state="in"]'
39
  ])
40
  ),
172
  ], blc_call_fn([
173
  'fn' => 'blocksy_mutate_selector',
174
  ], [
175
+ 'selector' => $root_selector,
176
  'operation' => 'suffix',
177
+ 'to_add' => '.ct-label'
178
  ])),
179
  ]);
180
 
182
  blocksy_output_colors([
183
  'value' => blocksy_akg('accountHeaderColor', $atts),
184
  'default' => [
185
+ 'default' => [ 'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT') ],
186
  'hover' => [ 'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT') ],
187
  ],
188
  'css' => $css,
211
  blocksy_output_colors([
212
  'value' => blocksy_akg('header_account_icon_color', $atts),
213
  'default' => [
214
+ 'default' => [ 'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT') ],
215
  'hover' => [ 'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT') ],
216
  ],
217
  'css' => $css,
framework/features/header/items/account/options.php CHANGED
@@ -103,7 +103,7 @@ $options = [
103
  ],
104
 
105
  'loggedin_media' => [
106
- 'label' => __( 'View Type', 'blc' ),
107
  'type' => 'ct-radio',
108
  'design' => 'block',
109
  'view' => 'text',
@@ -132,18 +132,6 @@ $options = [
132
  'setting' => [ 'transport' => 'postMessage' ],
133
  ],
134
 
135
- 'accountHeaderAvatarPosition' => [
136
- 'type' => 'ct-radio',
137
- 'label' => __( 'Avatar Alignment', 'blc' ),
138
- 'value' => 'left',
139
- 'view' => 'text',
140
- 'design' => 'block',
141
- 'choices' => [
142
- 'left' => __( 'Left', 'blc' ),
143
- 'right' => __( 'Right', 'blc' ),
144
- ],
145
- ],
146
-
147
  ],
148
  ],
149
 
@@ -207,18 +195,6 @@ $options = [
207
  'setting' => [ 'transport' => 'postMessage' ],
208
  ],
209
 
210
- 'account_loggedin_icon_position' => [
211
- 'type' => 'ct-radio',
212
- 'label' => __( 'Icon Alignment', 'blc' ),
213
- 'value' => 'left',
214
- 'view' => 'text',
215
- 'design' => 'block',
216
- 'choices' => [
217
- 'left' => __( 'Left', 'blc' ),
218
- 'right' => __( 'Right', 'blc' ),
219
- ],
220
- ],
221
-
222
  ],
223
  ],
224
 
@@ -226,32 +202,88 @@ $options = [
226
  'type' => 'ct-divider',
227
  ],
228
 
229
- 'loggedin_text' => [
230
- 'label' => __( 'Label', 'blc' ),
231
- 'type' => 'ct-radio',
232
  'design' => 'block',
233
- 'view' => 'text',
234
  'setting' => [ 'transport' => 'postMessage' ],
235
- 'value' => 'label',
236
- 'choices' => [
237
- 'label' => __( 'Text', 'blc' ),
238
- 'username' => __( 'Name', 'blc' ),
239
- 'none' => __( 'None', 'blc' ),
240
  ],
 
 
 
 
 
 
241
  ],
242
 
243
  blocksy_rand_md5() => [
244
  'type' => 'ct-condition',
245
- 'condition' => [ 'loggedin_text' => 'label' ],
 
 
 
 
 
 
246
  'options' => [
247
 
248
- 'loggedin_label' => [
249
- 'label' => __( 'Label Text', 'blc' ),
250
- 'type' => 'text',
251
- 'design' => 'inline',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
252
  'divider' => 'top',
253
- 'setting' => [ 'transport' => 'postMessage' ],
254
- 'value' => __('My Account', 'blc')
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
255
  ],
256
 
257
  ],
@@ -301,27 +333,22 @@ $options = [
301
  'type' => 'ct-divider',
302
  ],
303
 
304
- 'login_style' => [
305
- 'label' => __( 'View Type', 'blc' ),
306
- 'type' => 'ct-checkboxes',
307
  'design' => 'block',
308
  'view' => 'text',
309
- 'disableRevertButton' => true,
310
- 'setting' => [ 'transport' => 'postMessage' ],
311
- 'value' => [
312
- 'icon' => true,
313
- 'label' => true,
314
- ],
315
-
316
- 'choices' => blocksy_ordered_keys([
317
  'icon' => __( 'Icon', 'blc' ),
318
- 'label' => __( 'Label', 'blc' ),
319
- ]),
 
320
  ],
321
 
322
  blocksy_rand_md5() => [
323
  'type' => 'ct-condition',
324
- 'condition' => [ 'login_style/icon' => true ],
325
  'options' => [
326
 
327
  'accountHeaderIcon' => [
@@ -379,61 +406,18 @@ $options = [
379
  'setting' => [ 'transport' => 'postMessage' ],
380
  ],
381
 
382
- 'accountHeaderIconPosition' => [
383
- 'type' => 'ct-radio',
384
- 'label' => __( 'Icon Alignment', 'blc' ),
385
- 'value' => 'left',
386
- 'view' => 'text',
387
- 'design' => 'block',
388
- 'choices' => [
389
- 'left' => __( 'Left', 'blc' ),
390
- 'right' => __( 'Right', 'blc' ),
391
- ],
392
- ],
393
-
394
  ],
395
  ],
396
 
397
  blocksy_rand_md5() => [
398
- 'type' => 'ct-condition',
399
- 'condition' => [ 'login_style/label' => true ],
400
- 'options' => [
401
-
402
- 'login_label' => [
403
- 'label' => __('Label Text', 'blc'),
404
- 'type' => 'text',
405
- 'design' => 'inline',
406
- 'divider' => 'top',
407
- 'disableRevertButton' => true,
408
- 'setting' => [ 'transport' => 'postMessage' ],
409
- 'value' => __('Login', 'blc')
410
- ],
411
- ],
412
  ],
413
- ],
414
- ],
415
-
416
- blocksy_rand_md5() => [
417
- 'type' => 'ct-condition',
418
- 'condition' => [
419
- 'any' => [
420
- 'all' => [
421
- 'account_state' => 'out',
422
- 'login_style/label' => true,
423
- ],
424
 
425
- 'all~' => [
426
- 'account_state' => 'in',
427
- 'loggedin_text' => '!none'
428
- ]
429
- ]
430
- ],
431
- 'options' => [
432
- 'account_label_visibility' => [
433
  'label' => __( 'Label Visibility', 'blc' ),
434
  'type' => 'ct-visibility',
435
  'design' => 'block',
436
- 'divider' => 'top',
437
  'setting' => [ 'transport' => 'postMessage' ],
438
  'value' => [
439
  'desktop' => true,
@@ -447,11 +431,63 @@ $options = [
447
  'mobile' => __( 'Mobile', 'blocksy' ),
448
  ]),
449
  ],
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
450
  ],
451
  ],
 
452
  ],
453
  ],
454
 
 
 
 
455
  blocksy_rand_md5() => [
456
  'title' => __( 'Design', 'blocksy' ),
457
  'type' => 'tab',
@@ -459,7 +495,7 @@ $options = [
459
 
460
  'account_label_font' => [
461
  'type' => 'ct-typography',
462
- 'label' => __( 'Label Text Font', 'blc' ),
463
  'value' => blocksy_typography_default_values([
464
  'size' => '12px',
465
  'variation' => 'n6',
@@ -470,7 +506,7 @@ $options = [
470
 
471
  blocksy_rand_md5() => [
472
  'type' => 'ct-labeled-group',
473
- 'label' => __( 'Label Text Color', 'blc' ),
474
  'responsive' => true,
475
  'choices' => [
476
  [
@@ -499,7 +535,7 @@ $options = [
499
  'options' => [
500
 
501
  'accountHeaderColor' => [
502
- 'label' => __( 'Label/Name Color', 'blc' ),
503
  'type' => 'ct-color-picker',
504
  'design' => 'block:right',
505
  'responsive' => true,
@@ -507,7 +543,7 @@ $options = [
507
 
508
  'value' => [
509
  'default' => [
510
- 'color' => 'var(--color)',
511
  ],
512
 
513
  'hover' => [
@@ -519,6 +555,7 @@ $options = [
519
  [
520
  'title' => __( 'Initial', 'blc' ),
521
  'id' => 'default',
 
522
  ],
523
 
524
  [
@@ -530,7 +567,7 @@ $options = [
530
  ],
531
 
532
  'transparentAccountHeaderColor' => [
533
- 'label' => __( 'Label/Name Color', 'blc' ),
534
  'type' => 'ct-color-picker',
535
  'design' => 'block:right',
536
  'responsive' => true,
@@ -560,7 +597,7 @@ $options = [
560
  ],
561
 
562
  'stickyAccountHeaderColor' => [
563
- 'label' => __( 'Label/Name Color', 'blc' ),
564
  'type' => 'ct-color-picker',
565
  'design' => 'block:right',
566
  'responsive' => true,
@@ -596,127 +633,147 @@ $options = [
596
  'type' => 'ct-divider',
597
  ],
598
 
599
- blocksy_rand_md5() => [
600
- 'type' => 'ct-labeled-group',
601
- 'label' => __( 'Icon Color', 'blc' ),
602
- 'responsive' => true,
603
- 'choices' => [
604
- [
605
- 'id' => 'header_account_icon_color',
606
- 'label' => __('Default State', 'blc')
607
- ],
608
 
609
- [
610
- 'id' => 'transparent_header_account_icon_color',
611
- 'label' => __('Transparent State', 'blc'),
612
- 'condition' => [
613
- 'row' => '!offcanvas',
614
- 'builderSettings/has_transparent_header' => 'yes',
 
615
  ],
616
- ],
617
 
618
- [
619
- 'id' => 'sticky_header_account_icon_color',
620
- 'label' => __('Sticky State', 'blc'),
621
- 'condition' => [
622
- 'row' => '!offcanvas',
623
- 'builderSettings/has_sticky_header' => 'yes',
624
- ],
625
- ],
626
  ],
627
  'options' => [
628
- 'header_account_icon_color' => [
 
629
  'label' => __( 'Icon Color', 'blc' ),
630
- 'type' => 'ct-color-picker',
631
- 'design' => 'block:right',
632
  'responsive' => true,
633
- 'setting' => [ 'transport' => 'postMessage' ],
634
- 'value' => [
635
- 'default' => [
636
- 'color' => 'var(--color)',
637
- ],
638
-
639
- 'hover' => [
640
- 'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT'),
641
  ],
642
- ],
643
 
644
- 'pickers' => [
645
  [
646
- 'title' => __( 'Initial', 'blc' ),
647
- 'id' => 'default',
 
 
 
 
648
  ],
649
 
650
  [
651
- 'title' => __( 'Hover', 'blc' ),
652
- 'id' => 'hover',
653
- 'inherit' => 'var(--paletteColor2)',
 
 
 
654
  ],
655
  ],
656
- ],
 
 
 
 
 
 
 
 
 
 
657
 
658
- 'transparent_header_account_icon_color' => [
659
- 'label' => __( 'Icon Color', 'blc' ),
660
- 'type' => 'ct-color-picker',
661
- 'design' => 'block:right',
662
- 'responsive' => true,
663
- 'setting' => [ 'transport' => 'postMessage' ],
664
- 'value' => [
665
- 'default' => [
666
- 'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT'),
667
- ],
668
 
669
- 'hover' => [
670
- 'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT'),
671
- ],
672
- ],
 
 
673
 
674
- 'pickers' => [
675
- [
676
- 'title' => __( 'Initial', 'blc' ),
677
- 'id' => 'default',
 
 
678
  ],
679
 
680
- [
681
- 'title' => __( 'Hover', 'blc' ),
682
- 'id' => 'hover',
683
- ],
684
- ],
685
- ],
 
 
 
 
686
 
687
- 'sticky_header_account_icon_color' => [
688
- 'label' => __( 'Icon Color', 'blc' ),
689
- 'type' => 'ct-color-picker',
690
- 'design' => 'block:right',
691
- 'responsive' => true,
692
- 'setting' => [ 'transport' => 'postMessage' ],
693
- 'value' => [
694
- 'default' => [
695
- 'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT'),
696
- ],
697
 
698
- 'hover' => [
699
- 'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT'),
700
- ],
701
- ],
 
702
 
703
- 'pickers' => [
704
- [
705
- 'title' => __( 'Initial', 'blc' ),
706
- 'id' => 'default',
 
707
  ],
708
 
709
- [
710
- 'title' => __( 'Hover', 'blc' ),
711
- 'id' => 'hover',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
712
  ],
713
  ],
714
  ],
715
- ],
716
- ],
717
 
718
- blocksy_rand_md5() => [
719
- 'type' => 'ct-divider',
 
 
720
  ],
721
 
722
  'accountHeaderMargin' => [
@@ -731,15 +788,10 @@ $options = [
731
 
732
  blocksy_rand_md5() => [
733
  'type' => 'ct-condition',
734
- 'condition' => [ 'account_state' => 'in' ],
735
- 'options' => [
736
-
737
  ],
738
- ],
739
-
740
- blocksy_rand_md5() => [
741
- 'type' => 'ct-condition',
742
- 'condition' => [ 'account_state' => 'out' ],
743
  'options' => [
744
 
745
  blocksy_rand_md5() => [
@@ -862,4 +914,33 @@ $options = [
862
 
863
  ],
864
  ],
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
865
  ];
103
  ],
104
 
105
  'loggedin_media' => [
106
+ 'label' => __( 'Account Image', 'blc' ),
107
  'type' => 'ct-radio',
108
  'design' => 'block',
109
  'view' => 'text',
132
  'setting' => [ 'transport' => 'postMessage' ],
133
  ],
134
 
 
 
 
 
 
 
 
 
 
 
 
 
135
  ],
136
  ],
137
 
195
  'setting' => [ 'transport' => 'postMessage' ],
196
  ],
197
 
 
 
 
 
 
 
 
 
 
 
 
 
198
  ],
199
  ],
200
 
202
  'type' => 'ct-divider',
203
  ],
204
 
205
+ 'loggedin_account_label_visibility' => [
206
+ 'label' => __( 'Label Visibility', 'blc' ),
207
+ 'type' => 'ct-visibility',
208
  'design' => 'block',
209
+ 'allow_empty' => true,
210
  'setting' => [ 'transport' => 'postMessage' ],
211
+ 'value' => [
212
+ 'desktop' => true,
213
+ 'tablet' => true,
214
+ 'mobile' => true,
 
215
  ],
216
+
217
+ 'choices' => blocksy_ordered_keys([
218
+ 'desktop' => __( 'Desktop', 'blocksy' ),
219
+ 'tablet' => __( 'Tablet', 'blocksy' ),
220
+ 'mobile' => __( 'Mobile', 'blocksy' ),
221
+ ]),
222
  ],
223
 
224
  blocksy_rand_md5() => [
225
  'type' => 'ct-condition',
226
+ 'condition' => [
227
+ 'any' => [
228
+ 'loggedin_account_label_visibility/desktop' => true,
229
+ 'loggedin_account_label_visibility/tablet' => true,
230
+ 'loggedin_account_label_visibility/mobile' => true,
231
+ ]
232
+ ],
233
  'options' => [
234
 
235
+ blocksy_rand_md5() => [
236
+ 'type' => 'ct-condition',
237
+ 'condition' => [ 'loggedin_media' => '!none' ],
238
+ 'options' => [
239
+
240
+ 'loggedin_label_position' => [
241
+ 'type' => 'ct-radio',
242
+ 'label' => __( 'Label Position', 'blc' ),
243
+ 'value' => 'right',
244
+ 'view' => 'text',
245
+ 'design' => 'block',
246
+ 'divider' => 'top',
247
+ 'responsive' => [ 'tablet' => 'skip' ],
248
+ 'choices' => [
249
+ 'left' => __( 'Left', 'blc' ),
250
+ 'right' => __( 'Right', 'blc' ),
251
+ 'bottom' => __( 'Bottom', 'blc' ),
252
+ ],
253
+ ],
254
+
255
+ ],
256
+ ],
257
+
258
+ 'loggedin_text' => [
259
+ 'label' => __('Label Type', 'blc'),
260
+ 'type' => 'ct-radio',
261
+ 'view' => 'text',
262
+ 'design' => 'block',
263
  'divider' => 'top',
264
+ 'setting' => ['transport' => 'postMessage'],
265
+ 'value' => 'label',
266
+ 'choices' => [
267
+ 'label' => __('Text', 'blc'),
268
+ 'username' => __('Name', 'blc'),
269
+ ],
270
+ ],
271
+
272
+ blocksy_rand_md5() => [
273
+ 'type' => 'ct-condition',
274
+ 'condition' => ['loggedin_text' => 'label'],
275
+ 'options' => [
276
+
277
+ 'loggedin_label' => [
278
+ 'label' => __('Label Text', 'blc'),
279
+ 'type' => 'text',
280
+ 'design' => 'block',
281
+ 'divider' => 'top',
282
+ 'setting' => ['transport' => 'postMessage'],
283
+ 'value' => __('My Account', 'blc')
284
+ ],
285
+
286
+ ],
287
  ],
288
 
289
  ],
333
  'type' => 'ct-divider',
334
  ],
335
 
336
+ 'logged_out_style' => [
337
+ 'label' => __( 'Account Image', 'blc' ),
338
+ 'type' => 'ct-radio',
339
  'design' => 'block',
340
  'view' => 'text',
341
+ 'value' => 'icon',
342
+ 'choices' => [
 
 
 
 
 
 
343
  'icon' => __( 'Icon', 'blc' ),
344
+ 'none' => __( 'None', 'blc' ),
345
+ ],
346
+ 'setting' => [ 'transport' => 'postMessage' ],
347
  ],
348
 
349
  blocksy_rand_md5() => [
350
  'type' => 'ct-condition',
351
+ 'condition' => [ 'logged_out_style' => 'icon' ],
352
  'options' => [
353
 
354
  'accountHeaderIcon' => [
406
  'setting' => [ 'transport' => 'postMessage' ],
407
  ],
408
 
 
 
 
 
 
 
 
 
 
 
 
 
409
  ],
410
  ],
411
 
412
  blocksy_rand_md5() => [
413
+ 'type' => 'ct-divider',
 
 
 
 
 
 
 
 
 
 
 
 
 
414
  ],
 
 
 
 
 
 
 
 
 
 
 
415
 
416
+ 'loggedout_account_label_visibility' => [
 
 
 
 
 
 
 
417
  'label' => __( 'Label Visibility', 'blc' ),
418
  'type' => 'ct-visibility',
419
  'design' => 'block',
420
+ 'allow_empty' => true,
421
  'setting' => [ 'transport' => 'postMessage' ],
422
  'value' => [
423
  'desktop' => true,
431
  'mobile' => __( 'Mobile', 'blocksy' ),
432
  ]),
433
  ],
434
+
435
+ blocksy_rand_md5() => [
436
+ 'type' => 'ct-condition',
437
+ 'condition' => [
438
+ 'any' => [
439
+ 'loggedout_account_label_visibility/desktop' => true,
440
+ 'loggedout_account_label_visibility/tablet' => true,
441
+ 'loggedout_account_label_visibility/mobile' => true,
442
+ ]
443
+ ],
444
+ 'options' => [
445
+
446
+ blocksy_rand_md5() => [
447
+ 'type' => 'ct-condition',
448
+ 'condition' => [ 'logged_out_style' => 'icon' ],
449
+ 'options' => [
450
+
451
+ 'loggedout_label_position' => [
452
+ 'type' => 'ct-radio',
453
+ 'label' => __( 'Label Position', 'blc' ),
454
+ 'value' => 'right',
455
+ 'view' => 'text',
456
+ 'design' => 'block',
457
+ 'divider' => 'top',
458
+ 'responsive' => [ 'tablet' => 'skip' ],
459
+ 'choices' => [
460
+ 'left' => __( 'Left', 'blc' ),
461
+ 'right' => __( 'Right', 'blc' ),
462
+ 'bottom' => __( 'Bottom', 'blc' ),
463
+ ],
464
+ ],
465
+
466
+ ],
467
+ ],
468
+
469
+ 'login_label' => [
470
+ 'label' => __('Label Text', 'blc'),
471
+ 'type' => 'text',
472
+ 'design' => 'block',
473
+ 'divider' => 'top',
474
+ 'disableRevertButton' => true,
475
+ 'setting' => [ 'transport' => 'postMessage' ],
476
+ 'value' => __('Login', 'blc')
477
+ ],
478
+
479
+ ],
480
+ ],
481
+
482
  ],
483
  ],
484
+
485
  ],
486
  ],
487
 
488
+
489
+
490
+
491
  blocksy_rand_md5() => [
492
  'title' => __( 'Design', 'blocksy' ),
493
  'type' => 'tab',
495
 
496
  'account_label_font' => [
497
  'type' => 'ct-typography',
498
+ 'label' => __( 'Label Font', 'blc' ),
499
  'value' => blocksy_typography_default_values([
500
  'size' => '12px',
501
  'variation' => 'n6',
506
 
507
  blocksy_rand_md5() => [
508
  'type' => 'ct-labeled-group',
509
+ 'label' => __( 'Label Color', 'blc' ),
510
  'responsive' => true,
511
  'choices' => [
512
  [
535
  'options' => [
536
 
537
  'accountHeaderColor' => [
538
+ 'label' => __( 'Label Color', 'blc' ),
539
  'type' => 'ct-color-picker',
540
  'design' => 'block:right',
541
  'responsive' => true,
543
 
544
  'value' => [
545
  'default' => [
546
+ 'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT'),
547
  ],
548
 
549
  'hover' => [
555
  [
556
  'title' => __( 'Initial', 'blc' ),
557
  'id' => 'default',
558
+ 'inherit' => 'var(--color)'
559
  ],
560
 
561
  [
567
  ],
568
 
569
  'transparentAccountHeaderColor' => [
570
+ 'label' => __( 'Label Color', 'blc' ),
571
  'type' => 'ct-color-picker',
572
  'design' => 'block:right',
573
  'responsive' => true,
597
  ],
598
 
599
  'stickyAccountHeaderColor' => [
600
+ 'label' => __( 'Label Color', 'blc' ),
601
  'type' => 'ct-color-picker',
602
  'design' => 'block:right',
603
  'responsive' => true,
633
  'type' => 'ct-divider',
634
  ],
635
 
 
 
 
 
 
 
 
 
 
636
 
637
+ blocksy_rand_md5() => [
638
+ 'type' => 'ct-condition',
639
+ 'condition' => [
640
+ 'any' => [
641
+ 'all' => [
642
+ 'account_state' => 'in',
643
+ 'loggedin_media' => 'icon'
644
  ],
 
645
 
646
+ 'all~' => [
647
+ 'account_state' => 'out',
648
+ 'logged_out_style' => 'icon'
649
+ ]
650
+ ]
 
 
 
651
  ],
652
  'options' => [
653
+ blocksy_rand_md5() => [
654
+ 'type' => 'ct-labeled-group',
655
  'label' => __( 'Icon Color', 'blc' ),
 
 
656
  'responsive' => true,
657
+ 'choices' => [
658
+ [
659
+ 'id' => 'header_account_icon_color',
660
+ 'label' => __('Default State', 'blc'),
 
 
 
 
661
  ],
 
662
 
 
663
  [
664
+ 'id' => 'transparent_header_account_icon_color',
665
+ 'label' => __('Transparent State', 'blc'),
666
+ 'condition' => [
667
+ 'row' => '!offcanvas',
668
+ 'builderSettings/has_transparent_header' => 'yes',
669
+ ],
670
  ],
671
 
672
  [
673
+ 'id' => 'sticky_header_account_icon_color',
674
+ 'label' => __('Sticky State', 'blc'),
675
+ 'condition' => [
676
+ 'row' => '!offcanvas',
677
+ 'builderSettings/has_sticky_header' => 'yes',
678
+ ],
679
  ],
680
  ],
681
+ 'options' => [
682
+ 'header_account_icon_color' => [
683
+ 'label' => __( 'Icon Color', 'blc' ),
684
+ 'type' => 'ct-color-picker',
685
+ 'design' => 'block:right',
686
+ 'responsive' => true,
687
+ 'setting' => [ 'transport' => 'postMessage' ],
688
+ 'value' => [
689
+ 'default' => [
690
+ 'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT'),
691
+ ],
692
 
693
+ 'hover' => [
694
+ 'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT'),
695
+ ],
696
+ ],
 
 
 
 
 
 
697
 
698
+ 'pickers' => [
699
+ [
700
+ 'title' => __( 'Initial', 'blc' ),
701
+ 'id' => 'default',
702
+ 'inherit' => 'var(--color)',
703
+ ],
704
 
705
+ [
706
+ 'title' => __( 'Hover', 'blc' ),
707
+ 'id' => 'hover',
708
+ 'inherit' => 'var(--paletteColor2)',
709
+ ],
710
+ ],
711
  ],
712
 
713
+ 'transparent_header_account_icon_color' => [
714
+ 'label' => __( 'Icon Color', 'blc' ),
715
+ 'type' => 'ct-color-picker',
716
+ 'design' => 'block:right',
717
+ 'responsive' => true,
718
+ 'setting' => [ 'transport' => 'postMessage' ],
719
+ 'value' => [
720
+ 'default' => [
721
+ 'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT'),
722
+ ],
723
 
724
+ 'hover' => [
725
+ 'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT'),
726
+ ],
727
+ ],
 
 
 
 
 
 
728
 
729
+ 'pickers' => [
730
+ [
731
+ 'title' => __( 'Initial', 'blc' ),
732
+ 'id' => 'default',
733
+ ],
734
 
735
+ [
736
+ 'title' => __( 'Hover', 'blc' ),
737
+ 'id' => 'hover',
738
+ ],
739
+ ],
740
  ],
741
 
742
+ 'sticky_header_account_icon_color' => [
743
+ 'label' => __( 'Icon Color', 'blc' ),
744
+ 'type' => 'ct-color-picker',
745
+ 'design' => 'block:right',
746
+ 'responsive' => true,
747
+ 'setting' => [ 'transport' => 'postMessage' ],
748
+ 'value' => [
749
+ 'default' => [
750
+ 'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT'),
751
+ ],
752
+
753
+ 'hover' => [
754
+ 'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT'),
755
+ ],
756
+ ],
757
+
758
+ 'pickers' => [
759
+ [
760
+ 'title' => __( 'Initial', 'blc' ),
761
+ 'id' => 'default',
762
+ ],
763
+
764
+ [
765
+ 'title' => __( 'Hover', 'blc' ),
766
+ 'id' => 'hover',
767
+ ],
768
+ ],
769
  ],
770
  ],
771
  ],
 
 
772
 
773
+ blocksy_rand_md5() => [
774
+ 'type' => 'ct-divider',
775
+ ],
776
+ ]
777
  ],
778
 
779
  'accountHeaderMargin' => [
788
 
789
  blocksy_rand_md5() => [
790
  'type' => 'ct-condition',
791
+ 'condition' => [
792
+ 'account_state' => 'out',
793
+ 'login_account_action' => 'modal'
794
  ],
 
 
 
 
 
795
  'options' => [
796
 
797
  blocksy_rand_md5() => [
914
 
915
  ],
916
  ],
917
+
918
+ blocksy_rand_md5() => [
919
+ 'type' => 'ct-condition',
920
+ 'condition' => [ 'wp_customizer_current_view' => 'tablet|mobile' ],
921
+ 'options' => [
922
+
923
+ blocksy_rand_md5() => [
924
+ 'type' => 'ct-divider',
925
+ ],
926
+
927
+ 'header_account_visibility' => [
928
+ 'label' => __( 'Element Visibility', 'blocksy' ),
929
+ 'type' => 'ct-visibility',
930
+ 'design' => 'block',
931
+ 'setting' => [ 'transport' => 'postMessage' ],
932
+ 'allow_empty' => true,
933
+ 'value' => [
934
+ 'tablet' => true,
935
+ 'mobile' => true,
936
+ ],
937
+
938
+ 'choices' => blocksy_ordered_keys([
939
+ 'tablet' => __( 'Tablet', 'blocksy' ),
940
+ 'mobile' => __( 'Mobile', 'blocksy' ),
941
+ ]),
942
+ ],
943
+
944
+ ],
945
+ ],
946
  ];
framework/features/header/items/account/sync.js CHANGED
@@ -8,278 +8,329 @@ import {
8
  getRootSelectorFor,
9
  responsiveClassesFor,
10
  } from 'blocksy-customizer-sync'
11
- import { markImagesAsLoaded } from '../../../../extensions/cookies-consent/static/js/lazy-load-helpers'
12
 
13
  ctEvents.on(
14
  'ct:header:sync:collect-variable-descriptors',
15
  (variableDescriptors) => {
16
- variableDescriptors['account'] = ({ itemId }) => ({
17
- accountHeaderIconSize: {
18
- selector: assembleSelector(
19
- mutateSelector({
20
- selector: [getRootSelectorFor({ itemId })[0]],
21
- operation: 'suffix',
22
- to_add: '[data-state="out"]',
23
- })
24
- ),
25
- variable: 'icon-size',
26
- responsive: true,
27
- unit: 'px',
28
- },
29
-
30
- account_loggedin_icon_size: {
31
- selector: assembleSelector(
32
- mutateSelector({
33
- selector: [getRootSelectorFor({ itemId })[0]],
34
- operation: 'suffix',
35
- to_add: '[data-state="in"]',
36
- })
37
- ),
38
- variable: 'icon-size',
39
- responsive: true,
40
- unit: 'px',
41
- },
42
-
43
- accountHeaderAvatarSize: {
44
- selector: assembleSelector(getRootSelectorFor({ itemId })),
45
- variable: 'avatar-size',
46
- responsive: true,
47
- unit: 'px',
48
- },
49
-
50
- ...handleBackgroundOptionFor({
51
- id: 'accountHeaderFormBackground',
52
- selector: assembleSelector(
53
- mutateSelector({
54
- selector: [getRootSelectorFor({ itemId })[0]],
55
- operation: 'suffix',
56
- to_add: '#account-modal .ct-account-form',
57
- })
58
- ),
59
- }),
60
-
61
- ...handleBackgroundOptionFor({
62
- id: 'accountHeaderBackground',
63
- selector: assembleSelector(
64
- mutateSelector({
65
- selector: [getRootSelectorFor({ itemId })[0]],
66
- operation: 'suffix',
67
- to_add: '#account-modal',
68
- })
69
- ),
70
- }),
71
-
72
- cart_panel_shadow: {
73
- selector: assembleSelector(
74
- mutateSelector({
75
- selector: [getRootSelectorFor({ itemId })[0]],
76
- operation: 'suffix',
77
- to_add: '#account-modal .ct-account-form',
78
- })
79
- ),
80
- type: 'box-shadow',
81
- variable: 'box-shadow',
82
- responsive: true,
83
- },
84
-
85
- accountHeaderMargin: {
86
- selector: assembleSelector(getRootSelectorFor({ itemId })),
87
- type: 'spacing',
88
- variable: 'margin',
89
- responsive: true,
90
- important: true,
91
- },
92
-
93
- ...typographyOption({
94
- id: 'account_label_font',
95
- selector: assembleSelector(
96
- mutateSelector({
97
- selector: [getRootSelectorFor({ itemId })[0]],
98
- operation: 'suffix',
99
- to_add: '.ct-header-account .ct-label',
100
- })
101
- ),
102
- }),
103
-
104
- // default state
105
- accountHeaderColor: [
106
- {
107
- selector: assembleSelector(getRootSelectorFor({ itemId })),
108
- variable: 'linkInitialColor',
109
- type: 'color:default',
110
- responsive: true,
111
- },
112
-
113
- {
114
- selector: assembleSelector(getRootSelectorFor({ itemId })),
115
- variable: 'linkHoverColor',
116
- type: 'color:hover',
117
- responsive: true,
118
- },
119
- ],
120
-
121
- header_account_icon_color: [
122
- {
123
- selector: assembleSelector(getRootSelectorFor({ itemId })),
124
- variable: 'icon-color',
125
- type: 'color:default',
126
- responsive: true,
127
- },
128
-
129
- {
130
- selector: assembleSelector(getRootSelectorFor({ itemId })),
131
- variable: 'icon-hover-color',
132
- type: 'color:hover',
133
- responsive: true,
134
- },
135
- ],
136
-
137
- // transparent state
138
- transparentAccountHeaderColor: [
139
- {
140
  selector: assembleSelector(
141
  mutateSelector({
142
  selector: getRootSelectorFor({ itemId }),
143
- operation: 'between',
144
- to_add: '[data-transparent-row="yes"]',
145
  })
146
  ),
147
-
148
- variable: 'linkInitialColor',
149
- type: 'color:default',
150
  responsive: true,
 
151
  },
152
 
153
- {
154
  selector: assembleSelector(
155
  mutateSelector({
156
  selector: getRootSelectorFor({ itemId }),
157
- operation: 'between',
158
- to_add: '[data-transparent-row="yes"]',
159
  })
160
  ),
161
-
162
- variable: 'linkHoverColor',
163
- type: 'color:hover',
164
  responsive: true,
 
165
  },
166
- ],
167
 
168
- transparent_header_account_icon_color: [
169
- {
170
- selector: assembleSelector(
171
- mutateSelector({
172
- selector: getRootSelectorFor({ itemId }),
173
- operation: 'between',
174
- to_add: '[data-transparent-row="yes"]',
175
- })
176
- ),
177
- variable: 'icon-color',
178
- type: 'color:default',
179
  responsive: true,
 
180
  },
181
 
182
- {
 
183
  selector: assembleSelector(
184
  mutateSelector({
185
- selector: getRootSelectorFor({ itemId }),
186
- operation: 'between',
187
- to_add: '[data-transparent-row="yes"]',
188
  })
189
  ),
190
- variable: 'icon-hover-color',
191
- type: 'color:hover',
192
- responsive: true,
193
- },
194
- ],
195
 
196
- // sticky state
197
- stickyAccountHeaderColor: [
198
- {
199
  selector: assembleSelector(
200
  mutateSelector({
201
- selector: getRootSelectorFor({ itemId }),
202
- operation: 'between',
203
- to_add: '[data-sticky*="yes"]',
204
  })
205
  ),
206
- variable: 'linkInitialColor',
207
- type: 'color:default',
208
- responsive: true,
209
- },
210
 
211
- {
212
  selector: assembleSelector(
213
  mutateSelector({
214
- selector: getRootSelectorFor({ itemId }),
215
- operation: 'between',
216
- to_add: '[data-sticky*="yes"]',
217
  })
218
  ),
219
- variable: 'linkHoverColor',
220
- type: 'color:hover',
221
  responsive: true,
222
  },
223
- ],
224
 
225
- sticky_header_account_icon_color: [
226
- {
227
- selector: assembleSelector(
228
- mutateSelector({
229
- selector: getRootSelectorFor({ itemId }),
230
- operation: 'between',
231
- to_add: '[data-sticky*="yes"]',
232
- })
233
- ),
234
- variable: 'icon-color',
235
- type: 'color:default',
236
  responsive: true,
 
237
  },
238
 
239
- {
 
240
  selector: assembleSelector(
241
  mutateSelector({
242
  selector: getRootSelectorFor({ itemId }),
243
- operation: 'between',
244
- to_add: '[data-sticky*="yes"]',
245
  })
246
  ),
247
- variable: 'icon-hover-color',
248
- type: 'color:hover',
249
- responsive: true,
250
- },
251
- ],
252
- })
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
253
  }
254
  )
255
 
256
- ctEvents.on(
257
- 'ct:header:sync:item:account',
258
- ({ values: { loggedin_style, loggedin_label }, optionId, optionValue }) => {
259
- const selector = '[data-id="account"]'
260
 
261
- if (optionId === 'account_label_visibility') {
262
- updateAndSaveEl(selector, (el) => {
263
- ;[...el.querySelectorAll('.ct-label')].map((label) => {
264
- responsiveClassesFor(optionValue, label)
265
- })
 
 
 
 
 
 
 
 
266
  })
267
- }
 
268
 
269
- if (optionId === 'loggedin_label') {
270
- updateAndSaveEl(selector, (el) => {
271
- ;[...el.querySelectorAll('.ct-label')].map((label) => {
272
- label.innerHTML = optionValue
273
- })
274
  })
275
- }
 
276
 
277
- if (optionId === 'login_label') {
278
- updateAndSaveEl(selector, (el) => {
279
- ;[...el.querySelectorAll('.ct-label')].map((label) => {
280
- label.innerHTML = optionValue
281
- })
282
  })
283
- }
284
  }
285
- )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  getRootSelectorFor,
9
  responsiveClassesFor,
10
  } from 'blocksy-customizer-sync'
11
+ import { markImagesAsLoaded } from 'blocksy-frontend'
12
 
13
  ctEvents.on(
14
  'ct:header:sync:collect-variable-descriptors',
15
  (variableDescriptors) => {
16
+ variableDescriptors['account'] = ({ itemId }) => {
17
+ return {
18
+ accountHeaderIconSize: {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  selector: assembleSelector(
20
  mutateSelector({
21
  selector: getRootSelectorFor({ itemId }),
22
+ operation: 'el-suffix',
23
+ to_add: '[data-state="out"]',
24
  })
25
  ),
26
+ variable: 'icon-size',
 
 
27
  responsive: true,
28
+ unit: 'px',
29
  },
30
 
31
+ account_loggedin_icon_size: {
32
  selector: assembleSelector(
33
  mutateSelector({
34
  selector: getRootSelectorFor({ itemId }),
35
+ operation: 'el-suffix',
36
+ to_add: '[data-state="in"]',
37
  })
38
  ),
39
+ variable: 'icon-size',
 
 
40
  responsive: true,
41
+ unit: 'px',
42
  },
 
43
 
44
+ accountHeaderAvatarSize: {
45
+ selector: assembleSelector(getRootSelectorFor({ itemId })),
46
+ variable: 'avatar-size',
 
 
 
 
 
 
 
 
47
  responsive: true,
48
+ unit: 'px',
49
  },
50
 
51
+ ...handleBackgroundOptionFor({
52
+ id: 'accountHeaderFormBackground',
53
  selector: assembleSelector(
54
  mutateSelector({
55
+ selector: [getRootSelectorFor({ itemId })[0]],
56
+ operation: 'suffix',
57
+ to_add: '#account-modal .ct-account-form',
58
  })
59
  ),
60
+ }),
 
 
 
 
61
 
62
+ ...handleBackgroundOptionFor({
63
+ id: 'accountHeaderBackground',
 
64
  selector: assembleSelector(
65
  mutateSelector({
66
+ selector: [getRootSelectorFor({ itemId })[0]],
67
+ operation: 'suffix',
68
+ to_add: '#account-modal',
69
  })
70
  ),
71
+ }),
 
 
 
72
 
73
+ account_form_shadow: {
74
  selector: assembleSelector(
75
  mutateSelector({
76
+ selector: [getRootSelectorFor({ itemId })[0]],
77
+ operation: 'suffix',
78
+ to_add: '#account-modal .ct-account-form',
79
  })
80
  ),
81
+ type: 'box-shadow',
82
+ variable: 'box-shadow',
83
  responsive: true,
84
  },
 
85
 
86
+ accountHeaderMargin: {
87
+ selector: assembleSelector(getRootSelectorFor({ itemId })),
88
+ type: 'spacing',
89
+ variable: 'margin',
 
 
 
 
 
 
 
90
  responsive: true,
91
+ important: true,
92
  },
93
 
94
+ ...typographyOption({
95
+ id: 'account_label_font',
96
  selector: assembleSelector(
97
  mutateSelector({
98
  selector: getRootSelectorFor({ itemId }),
99
+ operation: 'suffix',
100
+ to_add: '.ct-label',
101
  })
102
  ),
103
+ }),
104
+
105
+ // default state
106
+ accountHeaderColor: [
107
+ {
108
+ selector: assembleSelector(
109
+ getRootSelectorFor({ itemId })
110
+ ),
111
+ variable: 'linkInitialColor',
112
+ type: 'color:default',
113
+ responsive: true,
114
+ },
115
+
116
+ {
117
+ selector: assembleSelector(
118
+ getRootSelectorFor({ itemId })
119
+ ),
120
+ variable: 'linkHoverColor',
121
+ type: 'color:hover',
122
+ responsive: true,
123
+ },
124
+ ],
125
+
126
+ header_account_icon_color: [
127
+ {
128
+ selector: assembleSelector(
129
+ getRootSelectorFor({ itemId })
130
+ ),
131
+ variable: 'icon-color',
132
+ type: 'color:default',
133
+ responsive: true,
134
+ },
135
+
136
+ {
137
+ selector: assembleSelector(
138
+ getRootSelectorFor({ itemId })
139
+ ),
140
+ variable: 'icon-hover-color',
141
+ type: 'color:hover',
142
+ responsive: true,
143
+ },
144
+ ],
145
+
146
+ // transparent state
147
+ transparentAccountHeaderColor: [
148
+ {
149
+ selector: assembleSelector(
150
+ mutateSelector({
151
+ selector: getRootSelectorFor({ itemId }),
152
+ operation: 'between',
153
+ to_add: '[data-transparent-row="yes"]',
154
+ })
155
+ ),
156
+
157
+ variable: 'linkInitialColor',
158
+ type: 'color:default',
159
+ responsive: true,
160
+ },
161
+
162
+ {
163
+ selector: assembleSelector(
164
+ mutateSelector({
165
+ selector: getRootSelectorFor({ itemId }),
166
+ operation: 'between',
167
+ to_add: '[data-transparent-row="yes"]',
168
+ })
169
+ ),
170
+
171
+ variable: 'linkHoverColor',
172
+ type: 'color:hover',
173
+ responsive: true,
174
+ },
175
+ ],
176
+
177
+ transparent_header_account_icon_color: [
178
+ {
179
+ selector: assembleSelector(
180
+ mutateSelector({
181
+ selector: getRootSelectorFor({ itemId }),
182
+ operation: 'between',
183
+ to_add: '[data-transparent-row="yes"]',
184
+ })
185
+ ),
186
+ variable: 'icon-color',
187
+ type: 'color:default',
188
+ responsive: true,
189
+ },
190
+
191
+ {
192
+ selector: assembleSelector(
193
+ mutateSelector({
194
+ selector: getRootSelectorFor({ itemId }),
195
+ operation: 'between',
196
+ to_add: '[data-transparent-row="yes"]',
197
+ })
198
+ ),
199
+ variable: 'icon-hover-color',
200
+ type: 'color:hover',
201
+ responsive: true,
202
+ },
203
+ ],
204
+
205
+ // sticky state
206
+ stickyAccountHeaderColor: [
207
+ {
208
+ selector: assembleSelector(
209
+ mutateSelector({
210
+ selector: getRootSelectorFor({ itemId }),
211
+ operation: 'between',
212
+ to_add: '[data-sticky*="yes"]',
213
+ })
214
+ ),
215
+ variable: 'linkInitialColor',
216
+ type: 'color:default',
217
+ responsive: true,
218
+ },
219
+
220
+ {
221
+ selector: assembleSelector(
222
+ mutateSelector({
223
+ selector: getRootSelectorFor({ itemId }),
224
+ operation: 'between',
225
+ to_add: '[data-sticky*="yes"]',
226
+ })
227
+ ),
228
+ variable: 'linkHoverColor',
229
+ type: 'color:hover',
230
+ responsive: true,
231
+ },
232
+ ],
233
+
234
+ sticky_header_account_icon_color: [
235
+ {
236
+ selector: assembleSelector(
237
+ mutateSelector({
238
+ selector: getRootSelectorFor({ itemId }),
239
+ operation: 'between',
240
+ to_add: '[data-sticky*="yes"]',
241
+ })
242
+ ),
243
+ variable: 'icon-color',
244
+ type: 'color:default',
245
+ responsive: true,
246
+ },
247
+
248
+ {
249
+ selector: assembleSelector(
250
+ mutateSelector({
251
+ selector: getRootSelectorFor({ itemId }),
252
+ operation: 'between',
253
+ to_add: '[data-sticky*="yes"]',
254
+ })
255
+ ),
256
+ variable: 'icon-hover-color',
257
+ type: 'color:hover',
258
+ responsive: true,
259
+ },
260
+ ],
261
+ }
262
+ }
263
  }
264
  )
265
 
266
+ ctEvents.on('ct:header:sync:item:account', ({ optionId, optionValue }) => {
267
+ const selector = '[data-id="account"]'
 
 
268
 
269
+ if (optionId === 'header_account_visibility') {
270
+ updateAndSaveEl(selector, (el) =>
271
+ responsiveClassesFor({ ...optionValue, desktop: true }, el)
272
+ )
273
+ }
274
+
275
+ if (
276
+ optionId === 'loggedin_account_label_visibility' ||
277
+ optionId === 'loggedout_account_label_visibility'
278
+ ) {
279
+ updateAndSaveEl(selector, (el) => {
280
+ ;[...el.querySelectorAll('.ct-label')].map((label) => {
281
+ responsiveClassesFor(optionValue, label)
282
  })
283
+ })
284
+ }
285
 
286
+ if (optionId === 'loggedin_label') {
287
+ updateAndSaveEl(selector, (el) => {
288
+ ;[...el.querySelectorAll('.ct-label')].map((label) => {
289
+ label.innerHTML = optionValue
 
290
  })
291
+ })
292
+ }
293
 
294
+ if (optionId === 'login_label') {
295
+ updateAndSaveEl(selector, (el) => {
296
+ ;[...el.querySelectorAll('.ct-label')].map((label) => {
297
+ label.innerHTML = optionValue
 
298
  })
299
+ })
300
  }
301
+
302
+ if (
303
+ optionId === 'loggedout_label_position' ||
304
+ optionId === 'loggedin_label_position'
305
+ ) {
306
+ updateAndSaveEl(
307
+ selector,
308
+ (el) => {
309
+ if (!optionValue.desktop) {
310
+ optionValue = {
311
+ desktop: optionValue,
312
+ mobile: optionValue,
313
+ }
314
+ }
315
+
316
+ el.dataset.label = optionValue.desktop
317
+ },
318
+ { onlyView: 'desktop' }
319
+ )
320
+
321
+ updateAndSaveEl(
322
+ selector,
323
+ (el) => {
324
+ if (!optionValue.desktop) {
325
+ optionValue = {
326
+ desktop: optionValue,
327
+ mobile: optionValue,
328
+ }
329
+ }
330
+
331
+ el.dataset.label = optionValue.mobile
332
+ },
333
+ { onlyView: 'mobile' }
334
+ )
335
+ }
336
+ })
framework/features/header/items/account/view.php CHANGED
@@ -1,5 +1,9 @@
1
  <?php
2
 
 
 
 
 
3
  $current_user_id = get_current_user_id();
4
 
5
  if (is_customize_preview()) {
@@ -22,182 +26,31 @@ $icon = apply_filters('blocksy:header:account:icons', [
22
  'type-6' => '<svg class="ct-icon" width="15" height="15" viewBox="0 0 15 15"><path d="M14.1 4.9L7.9.1c-.2-.1-.6-.1-.8 0L.9 4.9c-.1.1-.2.3-.2.5V13c0 1.1.9 2 2 2h9.6c1.1 0 2-.9 2-2V5.5c0-.2-.1-.4-.2-.6zm-5.2 8.7H6.1V8.2h2.8v5.4zm4.1-.7c0 .4-.3.7-.7.7h-2V7.5c0-.4-.3-.7-.7-.7H5.4c-.4 0-.7.3-.7.7v6.1h-2c-.4 0-.7-.3-.7-.7V5.8l5.6-4.2L13 5.8v7.1z"/></svg>',
23
  ]);
24
 
 
25
 
26
- if (empty($type)) {
27
- $type = 'type-1';
28
- }
29
-
30
-
31
- $class = 'ct-header-account';
32
-
33
- $label_class = 'ct-label';
 
 
 
 
 
 
34
 
35
- $label_class .= ' ' . blocksy_visibility_classes(blocksy_akg(
36
- 'account_label_visibility',
37
- $atts,
38
  [
39
- 'desktop' => true,
40
- 'tablet' => true,
41
- 'mobile' => true,
 
 
42
  ]
43
- ));
44
-
45
-
46
- // Logged in
47
- $link = get_edit_profile_url();
48
- $account_link = blocksy_akg('account_link', $atts, 'profile');
49
-
50
- if ($account_link === 'dashboard') {
51
- $link = admin_url();
52
- }
53
-
54
- if ($account_link === 'logout') {
55
- $link = wp_logout_url(blocksy_current_url());
56
- }
57
-
58
- if ($account_link === 'custom') {
59
- $link = blocksy_akg('account_custom_page', $atts, '');
60
- }
61
-
62
- $media_html = '';
63
- $loggedin_label = '';
64
-
65
- $avatar_position = blocksy_akg('accountHeaderAvatarPosition', $atts, 'left');
66
-
67
- if ($current_user_id) {
68
- $loggedin_media = blocksy_akg('loggedin_media', $atts, 'avatar');
69
- $loggedin_text = blocksy_akg('loggedin_text', $atts, 'label');
70
-
71
- if ($loggedin_text === 'label') {
72
- $loggedin_label = blocksy_akg('loggedin_label', $atts, __('My Account', 'blc'));
73
- }
74
-
75
- if ($loggedin_text === 'username') {
76
- $user = wp_get_current_user();
77
- $loggedin_label = $user->display_name;
78
- }
79
-
80
- if ($loggedin_media === 'avatar') {
81
- $avatar_size = intval(
82
- blocksy_expand_responsive_value(
83
- blocksy_akg('accountHeaderAvatarSize', $atts, 18)
84
- )['desktop']
85
- );
86
-
87
- $media_html = blocksy_simple_image(
88
- get_avatar_url(
89
- $current_user_id,
90
- [
91
- 'size' => $avatar_size * 2
92
- ]
93
- ),
94
- [
95
- 'img_atts' => [
96
- 'width' => $avatar_size,
97
- 'height' => $avatar_size
98
- ]
99
- ]
100
- );
101
- }
102
-
103
- if ($loggedin_media === 'icon') {
104
- $account_loggedin_icon = blocksy_akg('account_loggedin_icon', $atts, 'type-1');
105
- $icon_position = blocksy_akg('account_loggedin_icon_position', $atts, 'left');
106
- $media_html = $icon[$account_loggedin_icon];
107
- }
108
- }
109
-
110
- if (! $current_user_id) {
111
- $link = '#account-modal';
112
-
113
- if (blocksy_akg('login_account_action', $atts, 'modal') === 'custom') {
114
- $link = blocksy_akg('loggedout_account_custom_page', $atts, '');
115
- }
116
-
117
- $login_style = blocksy_akg('login_style', $atts, [
118
- 'icon' => true,
119
- 'label' => true
120
- ]);
121
-
122
- if ($login_style['icon']) {
123
- $icon_type = blocksy_default_akg('accountHeaderIcon', $atts, 'type-1');
124
- $media_html = $icon[$icon_type];
125
- $icon_position = blocksy_akg('accountHeaderIconPosition', $atts, 'left');
126
- }
127
-
128
- $login_label = blocksy_akg('login_label', $atts, __('Login', 'blc'));
129
- }
130
-
131
- $attr['data-state'] = $current_user_id ? 'in' : 'out';
132
-
133
- $attr['class'] = $class;
134
- $attr['href'] = $link;
135
-
136
- if ($current_user_id) {
137
- $attr['aria-label'] = $loggedin_label;
138
- }
139
-
140
- echo '<a ' . blocksy_attr_to_html($attr) . '>';
141
-
142
- if ($current_user_id) {
143
- if (
144
- (
145
- $loggedin_media === 'avatar'
146
- &&
147
- $avatar_position === 'left'
148
- ) || (
149
- $loggedin_media === 'icon'
150
- &&
151
- $icon_position === 'left'
152
- )
153
- ) {
154
- echo $media_html;
155
- }
156
-
157
- if (! empty($loggedin_label)) {
158
- echo '<span class="' . $label_class . '">';
159
- echo $loggedin_label;
160
- echo '</span>';
161
- }
162
-
163
- if (
164
- (
165
- $loggedin_media === 'avatar'
166
- &&
167
- $avatar_position === 'right'
168
- ) || (
169
- $loggedin_media === 'icon'
170
- &&
171
- $icon_position === 'right'
172
- )
173
- ) {
174
- echo $media_html;
175
- }
176
- }
177
-
178
- if (! $current_user_id) {
179
- if (
180
- $login_style['icon']
181
- &&
182
- $icon_position === 'left'
183
- ) {
184
- echo $media_html;
185
- }
186
-
187
- if ($login_style['label']) {
188
- echo '<span class="' . $label_class . '">';
189
- echo $login_label;
190
- echo '</span>';
191
- }
192
-
193
- if (
194
- $login_style['icon']
195
- &&
196
- $icon_position === 'right'
197
- ) {
198
- echo $media_html;
199
- }
200
- }
201
-
202
- echo '</a>';
203
 
1
  <?php
2
 
3
+ if (! isset($device)) {
4
+ $device = 'desktop';
5
+ }
6
+
7
  $current_user_id = get_current_user_id();
8
 
9
  if (is_customize_preview()) {
26
  'type-6' => '<svg class="ct-icon" width="15" height="15" viewBox="0 0 15 15"><path d="M14.1 4.9L7.9.1c-.2-.1-.6-.1-.8 0L.9 4.9c-.1.1-.2.3-.2.5V13c0 1.1.9 2 2 2h9.6c1.1 0 2-.9 2-2V5.5c0-.2-.1-.4-.2-.6zm-5.2 8.7H6.1V8.2h2.8v5.4zm4.1-.7c0 .4-.3.7-.7.7h-2V7.5c0-.4-.3-.7-.7-.7H5.4c-.4 0-.7.3-.7.7v6.1h-2c-.4 0-.7-.3-.7-.7V5.8l5.6-4.2L13 5.8v7.1z"/></svg>',
27
  ]);
28
 
29
+ $path = 'login';
30
 
31
+ if (! $current_user_id) {
32
+ $path = 'logout';
33
+ }
34
+
35
+ $attr['class'] = trim('ct-header-account ' . blocksy_visibility_classes(
36
+ blocksy_default_akg(
37
+ 'header_account_visibility',
38
+ $atts,
39
+ [
40
+ 'tablet' => true,
41
+ 'mobile' => true,
42
+ ]
43
+ )
44
+ ));
45
 
46
+ echo blocksy_render_view(
47
+ dirname(__FILE__) . '/views/' . $path . '.php',
 
48
  [
49
+ 'atts' => $atts,
50
+ 'attr' => $attr,
51
+ 'icon' => $icon,
52
+ 'device' => $device,
53
+ 'current_user_id' => $current_user_id
54
  ]
55
+ );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
56
 
framework/features/header/items/account/views/login.php ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $loggedin_account_label_visibility = blocksy_akg(
4
+ 'loggedin_account_label_visibility',
5
+ $atts,
6
+ [
7
+ 'desktop' => true,
8
+ 'tablet' => true,
9
+ 'mobile' => true,
10
+ ]
11
+ );
12
+
13
+ // Logged in
14
+ $link = get_edit_profile_url();
15
+ $account_link = blocksy_akg('account_link', $atts, 'profile');
16
+
17
+ if ($account_link === 'dashboard') {
18
+ $link = admin_url();
19
+ }
20
+
21
+ if ($account_link === 'logout') {
22
+ $link = wp_logout_url(blocksy_current_url());
23
+ }
24
+
25
+ if ($account_link === 'custom') {
26
+ $link = blocksy_akg('account_custom_page', $atts, '');
27
+ }
28
+
29
+ // Media
30
+ $media_html = '';
31
+ $loggedin_media = blocksy_akg('loggedin_media', $atts, 'avatar');
32
+
33
+ if ($loggedin_media === 'avatar') {
34
+ $avatar_size = intval(
35
+ blocksy_expand_responsive_value(
36
+ blocksy_akg('accountHeaderAvatarSize', $atts, 18)
37
+ )['desktop']
38
+ );
39
+
40
+ $media_html = blocksy_simple_image(
41
+ get_avatar_url(
42
+ $current_user_id,
43
+ [
44
+ 'size' => $avatar_size * 2
45
+ ]
46
+ ),
47
+ [
48
+ 'img_atts' => [
49
+ 'width' => $avatar_size,
50
+ 'height' => $avatar_size
51
+ ]
52
+ ]
53
+ );
54
+ }
55
+
56
+ if ($loggedin_media === 'icon') {
57
+ $media_html = $icon[
58
+ blocksy_akg('account_loggedin_icon', $atts, 'type-1')
59
+ ];
60
+ }
61
+
62
+ // Label
63
+ $loggedin_label = blocksy_akg('loggedin_label', $atts, __('My Account', 'blc'));
64
+
65
+ if (blocksy_akg('loggedin_text', $atts, 'label') === 'username') {
66
+ $user = wp_get_current_user();
67
+ $loggedin_label = $user->display_name;
68
+ }
69
+
70
+ $loggedin_label_position = blocksy_expand_responsive_value(
71
+ blocksy_akg('loggedin_label_position', $atts, 'right')
72
+ );
73
+
74
+ $attr['data-state'] = 'in';
75
+
76
+ if (! empty($media_html)) {
77
+ $attr['data-label'] = $loggedin_label_position[$device];
78
+ }
79
+
80
+ $attr['href'] = $link;
81
+ $attr['aria-label'] = $loggedin_label;
82
+
83
+ echo '<a ' . blocksy_attr_to_html($attr) . '>';
84
+
85
+ if (! empty($loggedin_label) && blocksy_some_device(
86
+ $loggedin_account_label_visibility
87
+ )) {
88
+ echo '<span class="' . trim('ct-label ' . blocksy_visibility_classes(
89
+ $loggedin_account_label_visibility
90
+ )) . '">';
91
+ echo $loggedin_label;
92
+ echo '</span>';
93
+ }
94
+
95
+ echo $media_html;
96
+
97
+ echo '</a>';
framework/features/header/items/account/views/logout.php ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $loggedout_account_label_visibility = blocksy_akg(
4
+ 'loggedout_account_label_visibility',
5
+ $atts,
6
+ [
7
+ 'desktop' => true,
8
+ 'tablet' => true,
9
+ 'mobile' => true,
10
+ ]
11
+ );
12
+
13
+ $link = '#account-modal';
14
+
15
+ if (blocksy_akg('login_account_action', $atts, 'modal') === 'custom') {
16
+ $link = blocksy_akg('loggedout_account_custom_page', $atts, '');
17
+ }
18
+
19
+ $loggedout_label_position = blocksy_expand_responsive_value(
20
+ blocksy_akg('loggedout_label_position', $atts, 'right')
21
+ );
22
+
23
+ $attr['data-state'] = 'out';
24
+
25
+ if (blocksy_akg('logged_out_style', $atts, 'icon') !== 'none') {
26
+ $attr['data-label'] = $loggedout_label_position[$device];
27
+ }
28
+
29
+ $attr['href'] = $link;
30
+
31
+ echo '<a ' . blocksy_attr_to_html($attr) . '>';
32
+
33
+ if (
34
+ blocksy_some_device($loggedout_account_label_visibility)
35
+ ||
36
+ is_customize_preview()
37
+ ) {
38
+ echo '<span class="' . trim('ct-label ' . blocksy_visibility_classes(
39
+ $loggedout_account_label_visibility
40
+ )) . '">';
41
+
42
+ echo blocksy_akg('login_label', $atts, __('Login', 'blc'));
43
+
44
+ echo '</span>';
45
+ }
46
+
47
+ if (blocksy_akg('logged_out_style', $atts, 'icon') === 'icon') {
48
+ echo $icon[
49
+ blocksy_default_akg('accountHeaderIcon', $atts, 'type-1')
50
+ ];
51
+ }
52
+
53
+ echo '</a>';
framework/theme-integration.php CHANGED
@@ -281,7 +281,7 @@ class ThemeIntegration {
281
  wp_enqueue_script(
282
  'blocksy-companion-sync-scripts',
283
  BLOCKSY_URL . 'static/bundle/sync.js',
284
- ['customize-preview', 'wp-date', 'ct-events'],
285
  $data['Version'],
286
  true
287
  );
281
  wp_enqueue_script(
282
  'blocksy-companion-sync-scripts',
283
  BLOCKSY_URL . 'static/bundle/sync.js',
284
+ ['customize-preview', 'wp-date', 'ct-events', 'ct-customizer'],
285
  $data['Version'],
286
  true
287
  );
plugin.php CHANGED
@@ -53,28 +53,6 @@ class Plugin
53
  if ( !$this->check_if_blocksy_is_activated() ) {
54
  return;
55
  }
56
- add_action( 'wp_ajax_blocksy_toggle_has_beta_consent', function () {
57
- if ( !current_user_can( 'edit_theme_options' ) ) {
58
- wp_send_json_error();
59
- }
60
- $future_value_bool = Plugin::instance()->user_wants_beta_updates();
61
- $future_value = ( $future_value_bool ? 'no' : 'yes' );
62
- update_option( 'blocksy_has_beta_updates', $future_value );
63
- $reflector = new \ReflectionObject( blc_fs() );
64
- $get_api_site_scope = $reflector->getMethod( 'get_api_site_scope' );
65
- $get_api_site_scope->setAccessible( true );
66
- $site = $get_api_site_scope->invoke( blc_fs() )->call( '', 'put', [
67
- 'is_beta' => !$future_value_bool,
68
- 'fields' => 'is_beta',
69
- ] );
70
- $_site = $reflector->getProperty( '_site' );
71
- $_site->setAccessible( true );
72
- $_site->getValue( blc_fs() )->is_beta = $site->is_beta;
73
- $_store_site = $reflector->getMethod( '_store_site' );
74
- $_store_site->setAccessible( true );
75
- $_store_site->invoke( blc_fs() );
76
- wp_send_json_success( [] );
77
- } );
78
  add_action( 'widgets_init', [ 'BlocksyWidgetFactory', 'register_all_widgets' ] );
79
  add_action( 'admin_enqueue_scripts', function () {
80
  $locale_data_ct = blc_call_fn( [
@@ -109,7 +87,6 @@ class Plugin
109
  if ( defined( 'WP_CLI' ) && WP_CLI ) {
110
  $this->cli = new Cli();
111
  }
112
- $this->plugin_update();
113
  }
114
 
115
  /**
@@ -160,75 +137,6 @@ class Plugin
160
 
161
  return !!$this->is_blocksy;
162
  }
163
-
164
- public function user_wants_beta_updates()
165
- {
166
- $option_value = get_option( 'blocksy_has_beta_updates', 'no' );
167
- return $option_value === 'yes';
168
- }
169
-
170
- public function plugin_update()
171
- {
172
- $has_beta = $this->user_wants_beta_updates();
173
- if ( !$has_beta ) {
174
- return;
175
- }
176
- add_action( 'init', function () use( $has_beta ) {
177
- if ( !function_exists( '\\blc_fs' ) ) {
178
- return;
179
- }
180
- $data = get_plugin_data( BLOCKSY__FILE__ );
181
- new \EDD_SL_Plugin_Updater( 'https://creativethemes.com/', BLOCKSY__FILE__, [
182
- 'version' => $data['Version'],
183
- 'license' => '123',
184
- 'item_id' => 515,
185
- 'author' => 'CreativeThemes',
186
- 'beta' => false,
187
- ] );
188
- } );
189
- add_action( 'after_setup_theme', function () {
190
- $theme = wp_get_theme( get_template() );
191
- if ( !$this->check_if_blocksy_is_activated( true ) ) {
192
- return;
193
- }
194
- $updater = new \EDD_Theme_Updater_Admin(
195
- // Config settings
196
- $config = array(
197
- 'remote_api_url' => 'https://creativethemes.com/',
198
- 'item_name' => 'Blocksy',
199
- 'theme_slug' => 'blocksy',
200
- 'version' => $theme->get( 'Version' ),
201
- 'author' => 'CreativeThemes',
202
- 'download_id' => '599',
203
- 'renew_url' => '',
204
- ),
205
- // Strings
206
- $strings = array(
207
- 'theme-license' => __( 'Theme License', 'edd-theme-updater' ),
208
- 'enter-key' => __( 'Enter your theme license key.', 'edd-theme-updater' ),
209
- 'license-key' => __( 'License Key', 'edd-theme-updater' ),
210
- 'license-action' => __( 'License Action', 'edd-theme-updater' ),
211
- 'deactivate-license' => __( 'Deactivate License', 'edd-theme-updater' ),
212
- 'activate-license' => __( 'Activate License', 'edd-theme-updater' ),
213
- 'status-unknown' => __( 'License status is unknown.', 'edd-theme-updater' ),
214
- 'renew' => __( 'Renew?', 'edd-theme-updater' ),
215
- 'unlimited' => __( 'unlimited', 'edd-theme-updater' ),
216
- 'license-key-is-active' => __( 'License key is active.', 'edd-theme-updater' ),
217
- 'expires%s' => __( 'Expires %s.', 'edd-theme-updater' ),
218
- '%1$s/%2$-sites' => __( 'You have %1$s / %2$s sites activated.', 'edd-theme-updater' ),
219
- 'license-key-expired-%s' => __( 'License key expired %s.', 'edd-theme-updater' ),
220
- 'license-key-expired' => __( 'License key has expired.', 'edd-theme-updater' ),
221
- 'license-keys-do-not-match' => __( 'License keys do not match.', 'edd-theme-updater' ),
222
- 'license-is-inactive' => __( 'License is inactive.', 'edd-theme-updater' ),
223
- 'license-key-is-disabled' => __( 'License key is disabled.', 'edd-theme-updater' ),
224
- 'site-is-inactive' => __( 'Site is inactive.', 'edd-theme-updater' ),
225
- 'license-status-unknown' => __( 'License status is unknown.', 'edd-theme-updater' ),
226
- 'update-notice' => __( "Updating this theme will lose any customizations you have made. 'Cancel' to stop, 'OK' to update.", 'edd-theme-updater' ),
227
- 'update-available' => __( '<strong>%1$s %2$s</strong> is available. <a href="%3$s" class="thickbox" title="%4s">Check out what\'s new</a> or <a href="%5$s"%6$s>update now</a>.', 'edd-theme-updater' ),
228
- )
229
- );
230
- } );
231
- }
232
 
233
  }
234
  Plugin::instance();
53
  if ( !$this->check_if_blocksy_is_activated() ) {
54
  return;
55
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
56
  add_action( 'widgets_init', [ 'BlocksyWidgetFactory', 'register_all_widgets' ] );
57
  add_action( 'admin_enqueue_scripts', function () {
58
  $locale_data_ct = blc_call_fn( [
87
  if ( defined( 'WP_CLI' ) && WP_CLI ) {
88
  $this->cli = new Cli();
89
  }
 
90
  }
91
 
92
  /**
137
 
138
  return !!$this->is_blocksy;
139
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
140
 
141
  }
142
  Plugin::instance();
readme.txt CHANGED
@@ -5,7 +5,7 @@ Requires PHP: 7.0
5
  Tested up to: 5.6
6
  License: GPLv2 or later
7
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
8
- Stable tag: 1.7.59
9
 
10
  == Description ==
11
 
@@ -23,6 +23,18 @@ It runs and adds its enhancements only if the Blocksy theme is installed and act
23
  2. Activate the plugin by going to **Plugins** page in WordPress admin and clicking on **Activate** link.
24
 
25
  == Changelog ==
 
 
 
 
 
 
 
 
 
 
 
 
26
  1.7.59: 2021-02-16
27
  - Improvement: Introduce slider view to blocksy_posts shortcode
28
  - Improvement: Introduce exclude_term_ids in blocksy_posts shortcode
5
  Tested up to: 5.6
6
  License: GPLv2 or later
7
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
8
+ Stable tag: 1.7.61
9
 
10
  == Description ==
11
 
23
  2. Activate the plugin by going to **Plugins** page in WordPress admin and clicking on **Activate** link.
24
 
25
  == Changelog ==
26
+ 1.7.61: 2021-02-23
27
+ - Fix: Dashboard JavaScript fixes
28
+
29
+ 1.7.60: 2021-02-22
30
+ - Improvement: Refactor account header element
31
+ - Fix: Account element custom link
32
+
33
+ 1.7.59.1: 2021-02-20
34
+ - Improvement: Refactor account header element
35
+ - Fix: Freemius optin screen
36
+ - Fix: Account element custom link
37
+
38
  1.7.59: 2021-02-16
39
  - Improvement: Introduce slider view to blocksy_posts shortcode
40
  - Improvement: Introduce exclude_term_ids in blocksy_posts shortcode
static/bundle/dashboard.css CHANGED
@@ -1,8 +1,8 @@
1
  /**
2
- * - v1.7.59
3
  *
4
  * Copyright (c) 2021
5
  * Licensed GPLv2+
6
  */
7
 
8
- .ct-mailchimp-modal{--modal-min-height: 300px}.mailchimp-credentials{display:grid;grid-template-columns:1fr 1fr 1fr;grid-column-gap:10px;margin:5px 0 0 0;padding:25px 0 0 0;border-top:1px dashed #eee}.mailchimp-credentials section{display:flex;flex-direction:column;min-width:0}.mailchimp-credentials label{display:block;font-size:12px;margin-bottom:3px;opacity:0.7}.mailchimp-credentials input{--height: 35px}.ct-extensions-sourse{display:flex;justify-content:center;margin:0 0 40px 0}.ct-extensions-sourse li{display:flex;align-items:center;height:38px;font-weight:500;padding:0 30px;margin:0;cursor:pointer;border:1px solid rgba(226,230,235,0.7)}.ct-extensions-sourse li.active{color:#fff;background:#0085ba;border-color:#0085ba}.ct-extensions-sourse li:hover:not(.active){color:#0085ba}.ct-extensions-sourse li:first-child{border-right:0;border-radius:4px 0 0 4px}.ct-extensions-sourse li:last-child{border-left:0;border-radius:0 4px 4px 0}.ct-extensions-list{display:grid;grid-template-columns:repeat(auto-fill, minmax(300px, 1fr));grid-column-gap:30px;grid-row-gap:30px;margin:0}.ct-extensions-list li{display:flex;flex-direction:column;margin:0;border-radius:3px;border:1px solid rgba(226,230,235,0.7);box-shadow:0 2px 5px rgba(143,163,184,0.12)}.ct-extension-title{display:flex;align-items:center;justify-content:space-between;margin:30px 0 15px 0;padding:0 25px}.ct-extension-title svg{opacity:0.7}.ct-extension-description{font-size:14px;line-height:1.7;margin-bottom:30px;padding:0 25px}.ct-extension-actions{display:flex;justify-content:space-between;margin-top:auto;padding:20px 13px 20px 25px;border-top:1px solid rgba(226,230,235,0.5);background:rgba(235,237,241,0.2)}.ct-extension-actions [class*="ct-button"]{--buttonHeight: 32px;--buttonPadding: 12px;min-width:92px}.ct-config-btn{margin-right:auto;margin-left:10px}.ct-config-btn:before{font-family:dashicons;content:"\f111";font-size:14px;margin-right:5px;opacity:0.9}.ct-minimal-button{display:flex;align-items:center;justify-content:center;width:32px;height:32px;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;padding:0;color:inherit;cursor:pointer;color:#c9cfd6;background:transparent;transition:color 0.2s ease}.ct-minimal-button:hover{color:#9ca9b9}.ct-minimal-button:focus{outline:none}.ct-minimal-button svg{fill:currentColor}.ct-option-info{display:flex;align-items:center;justify-content:center;font-style:normal;line-height:normal;margin-left:auto}.ct-option-info:before{font-family:dashicons;content:"\f348";font-size:16px;line-height:16px}.ct-demos-list-container ul{display:grid;grid-column-gap:30px;grid-row-gap:30px;margin:0;padding:0;list-style:none}@media (min-width: 783px){.ct-demos-list-container ul{grid-template-columns:repeat(2, 1fr)}}.ct-demos-list-container ul li{margin:0;box-sizing:border-box;box-shadow:0 2px 5px rgba(143,163,184,0.12)}.ct-demos-list-container ul li figure{position:relative;margin:0;overflow:hidden;border-radius:3px 3px 0 0}.ct-demos-list-container ul li figure:before{content:'';display:block;width:100%;padding-bottom:75%}.ct-demos-list-container ul li figure img{position:absolute;top:0;left:0;width:100%;height:100%}.ct-demos-list-container ul li figure section{position:absolute;display:flex;flex-direction:column;align-items:center;justify-content:center;top:0;left:0;right:0;bottom:0;opacity:0;background:rgba(36,41,45,0.9);transition:opacity 0.2s ease}.ct-demos-list-container ul li figure section h3{font-size:15px;color:#fff !important;margin:0 0 25px 0}.ct-demos-list-container ul li figure section div{display:flex}.ct-demos-list-container ul li figure section span{padding:8px 12px;display:block;font-size:17px;font-weight:500;color:#fff;border-radius:3px;border:2px solid rgba(255,255,255,0.5);background:rgba(36,41,45,0.4)}.ct-demos-list-container ul li figure section span:not(:last-child){margin-right:15px}.ct-demos-list-container ul li:hover figure>section{opacity:1}.ct-demos-list-container ul li.ct-is-pro figure{position:relative}.ct-demos-list-container ul li.ct-is-pro figure a{position:absolute;z-index:1;content:'PRO';top:0;right:0;font-size:13px;font-weight:700;letter-spacing:.03em;color:#a1680d;text-decoration:none;padding:5px 15px;margin:25px;background:#ffc568;border-radius:3px;box-shadow:0 5px 8px 0 rgba(234,157,33,0.3)}.ct-demo-actions{display:flex;align-items:center;padding:20px 25px;border-radius:0 0 3px 3px;border:1px solid rgba(226,230,235,0.7);background:rgba(235,237,241,0.2)}@media (max-width: 549px){.ct-demo-actions{flex-direction:column}}@media (min-width: 550px){.ct-demo-actions{justify-content:space-between}}.ct-demo-actions h4{margin:0}@media (max-width: 549px){.ct-demo-actions h4{margin-bottom:20px}}.ct-demo-actions .ct-button{margin-right:15px}.ct-demo-actions button[disabled]{opacity:0.3;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none}.ct-demo-modal{--modal-width: 500px;height:100%;transition:max-height 0.2s ease}.ct-demo-modal:not(.ct-demo-installer){--modal-max-height: 620px}.ct-demo-modal.ct-demo-installer{--modal-max-height: 380px}.ct-demo-step-container{height:100%;display:flex;flex-direction:column;color:#687c93;text-align:center}.ct-demo-step-container>*:first-child{flex:1;position:relative}.ct-demo-step-container>*:first-child>*{position:absolute;top:0;left:0;right:0;bottom:0}.ct-demo-step-container .ct-demo-icon{display:flex;align-items:center;justify-content:center;width:85px;height:85px;margin:10px auto 20px auto;background:#f3f6f8;border-radius:100%}.ct-demo-step-container h2{text-align:center;font-size:17px;font-weight:600;color:#3e5667;margin-top:0}.ct-demo-step-controls{position:relative;width:100%;height:40px}.ct-demo-step-controls button{position:absolute;z-index:2;top:0}.ct-demo-step-controls button.demo-back-btn{left:0}.ct-demo-step-controls button.demo-main-btn{right:0}.ct-steps-pills{display:flex;align-items:center;justify-content:center;position:absolute;z-index:1;top:0;left:0;right:0;bottom:0;width:200px;margin:0;padding:0;list-style:none;margin:0 auto}.ct-steps-pills li{display:flex;align-items:center;justify-content:center;width:30px;height:30px;margin:0;font-size:0}.ct-steps-pills li:before{content:'';width:12px;height:12px;border-radius:100%;box-shadow:inset 0 0 0 2px rgba(104,124,147,0.8);transition:box-shadow 0.2s ease, transform 0.2s ease}.ct-steps-pills li:not(.active):before{transform:scale3d(0.5, 0.5, 1);box-shadow:inset 0 0 0 10px rgba(104,124,147,0.8)}.ct-demo-child .ct-checkbox-container{max-width:250px;margin:25px auto 0 auto;padding-left:15px;padding-right:15px;border-radius:4px;border:1px solid rgba(179,189,201,0.3)}.ct-demo-child a{display:block;color:#687c93;font-weight:500;text-decoration:none;margin-top:25px}.ct-demo-child a:hover{color:#0073aa}.ct-demo-builder .ct-demo-icon svg{margin-left:10px}.ct-demo-builder ul{display:grid;margin:0;padding:0;list-style:none;margin:40px auto 0 auto}.ct-demo-builder ul[data-count="2"]{max-width:70%;grid-template-columns:repeat(2, 1fr);grid-column-gap:30px}.ct-demo-builder ul[data-count="3"]{grid-template-columns:repeat(3, 1fr);grid-column-gap:20px}.ct-demo-builder ul li{margin-bottom:0;cursor:pointer}.ct-demo-builder ul li figure{position:relative;display:flex;align-items:center;justify-content:center;min-height:100px;border:2px solid #e9ecee;border-radius:5px;margin:0;font-weight:500;transition:border-color 0.12s cubic-bezier(0.455, 0.03, 0.515, 0.955),box-shadow 0.12s cubic-bezier(0.455, 0.03, 0.515, 0.955)}.ct-demo-builder ul li figure>svg{width:47%}.ct-demo-builder ul li .builder-name{font-weight:500;color:#3e5667;margin-top:15px}.ct-demo-builder ul li:hover figure{border-color:var(--accentColor)}.ct-demo-builder ul li.active figure{border-color:var(--accentColor);box-shadow:0 0 0 1px var(--accentColor)}.ct-demo-builder ul li .ct-checkbox{--checkMarkColor: #fff;--background: rgba(179, 189, 201, 0.8);--backgroundActive: #0e8ecc;position:absolute;top:0px;right:0px}.ct-demo-builder ul li .ct-checkbox:before{width:22px !important;height:22px !important;border-radius:0px 3px 0px 5px}.ct-demo-builder ul li .ct-checkbox:not(.active):before{opacity:0}.ct-demo-plugins label{margin:0 auto}.ct-active-plugin{display:flex;align-items:center;position:relative;text-align:left;padding:10px 0}.ct-active-plugin span{display:flex;align-items:center;justify-content:center;position:absolute;right:-2px;width:22px;height:22px;border-radius:100%;box-sizing:border-box;background:rgba(179,189,201,0.3)}.ct-active-plugin span:before,.ct-active-plugin span:after{position:absolute;content:'';width:2px;border-radius:2px;background:rgba(104,124,147,0.6)}.ct-active-plugin span:before{top:10px;left:10px;height:5px;transform:rotate(-45deg);transform-origin:bottom center}.ct-active-plugin span:after{height:9px;left:9px;transform:rotate(40deg);transform-origin:bottom center}.ct-demo-erase{margin-top:10px;padding-top:10px;padding-bottom:20px;text-align:left;font-weight:600;border-top:1px dashed rgba(179,189,201,0.5);border-bottom:1px dashed rgba(179,189,201,0.5)}.ct-demo-erase .ct-checkbox-container{align-items:flex-start;padding-bottom:0}.ct-demo-erase i{display:block;width:90%;font-size:13px;margin-top:8px;opacity:0.8;font-weight:400;font-style:normal}.ct-export{text-align:center;margin-top:50px}.ct-site-export{display:flex;flex-direction:column;padding:30px}.ct-site-export label{display:flex;justify-content:space-between;padding:10px 0}.ct-site-export input[type="checkbox"]{margin:0}.ct-site-export textarea,.ct-site-export input[type="text"]{width:60%}.ct-site-export textarea{min-height:80px}.ct-site-export button{margin-top:20px}.ct-demo-installer .close-button{opacity:0 !important}.ct-demo-install{position:relative}.ct-demo-install>*{position:absolute;top:0;left:0;right:0;bottom:0}.ct-demo-install svg path{transform-origin:50% 50%;transform-box:fill-box;-webkit-animation-name:spin;animation-name:spin;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-timing-function:linear;animation-timing-function:linear}.ct-demo-install .g1{fill:#44ACDF;-webkit-animation-duration:5.5s;animation-duration:5.5s;animation-direction:reverse}.ct-demo-install .g2{fill:#3497D3;-webkit-animation-duration:4.5s;animation-duration:4.5s}.ct-demo-install .g3{fill:#0C7AB3;-webkit-animation-duration:4s;animation-duration:4s}.ct-installer-progress{width:100%;border-radius:5px;background:#f3f6f8;box-sizing:border-box}.ct-installer-progress div{width:var(--progress);height:4px;border-radius:inherit;background:#0e8ecc;transition:width 0.3s ease}.ct-progress-info{display:flex;justify-content:space-between;margin-top:30px;margin-bottom:15px;font-size:13px;opacity:0.8}@-webkit-keyframes spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}@keyframes spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}.ct-install-success{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%}.ct-install-success div{margin-top:10px}.ct-install-success a:first-child{margin-right:15px}.ct-modify-actions{margin-top:50px}.ct-modify-actions>*:not(:last-child){margin-right:15px}.ct-modify-actions .demo-remove{--ct-buttonHoverColor: #e04f4f}#ct-dashboard .ct-demo-notification{position:relative;padding:15px 20px 15px 55px;margin-bottom:40px;color:#0072aa;line-height:1.5;border:2px solid rgba(0,114,170,0.3);background:rgba(0,114,170,0.1);border-radius:5px}#ct-dashboard .ct-demo-notification:before{font-family:dashicons;content:"\f534";font-size:20px;position:absolute;top:13px;left:20px;color:rgba(0,114,170,0.8)}#ct-dashboard .ct-demo-notification b{font-weight:700}.ct-demos-list{display:flex;flex-direction:column}.ct-demos-list .ct-single-demo img{max-width:100px}.ct-demo-btn{font-size:15px;font-weight:600;letter-spacing:0.03em;color:#687c93;height:40px;border:none;cursor:pointer;padding:0 18px;border-radius:4px;background:#f3f6f8;transition:background 0.2s ease color 0.2s ease}.ct-demo-btn:focus{outline:none}.ct-demo-btn:hover{color:#fff;background:var(--ct-buttonHoverColor, #0073aa)}.ct-activation-action-modal{color:#687c93;text-align:center;padding:30px}.ct-activation-action-modal svg{width:65px;height:65px}.ct-activation-action-modal h2{color:#3e5667}.ct-activation-action-modal button{--buttonHeight: 42px;--buttonPadding: 20px;--buttonFontSize: 14px}.ct-beta-consent{margin-top:60px;border-radius:3px;text-align:center;color:#fff}@media (max-width: 782px){.ct-beta-consent{padding:10%}}@media (min-width: 783px){.ct-beta-consent{padding:50px}}.ct-beta-consent h2{display:flex;align-items:center;justify-content:center;color:#fff !important;margin-top:0;cursor:pointer}.ct-beta-consent h2 span{display:flex;font-size:15px;font-weight:500;cursor:pointer}.ct-beta-consent h2 .ct-option-switch{margin-left:15px}.ct-beta-consent h2 .ct-option-switch:not(.ct-active){border-color:#fff}.ct-beta-consent h2 .ct-option-switch:not(.ct-active)>span{background:#fff}.ct-beta-consent h2 .ct-option-switch:not(.ct-active):after{border-color:#fff}.ct-beta-consent+.ct-support-container{margin-top:50px !important}.ct-beta-consent{background-color:#32373c;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 304 304' width='304' height='304'%3E%3Cpath fill='%234f5660' fill-opacity='0.2' d='M44.1 224a5 5 0 1 1 0 2H0v-2h44.1zm160 48a5 5 0 1 1 0 2H82v-2h122.1zm57.8-46a5 5 0 1 1 0-2H304v2h-42.1zm0 16a5 5 0 1 1 0-2H304v2h-42.1zm6.2-114a5 5 0 1 1 0 2h-86.2a5 5 0 1 1 0-2h86.2zm-256-48a5 5 0 1 1 0 2H0v-2h12.1zm185.8 34a5 5 0 1 1 0-2h86.2a5 5 0 1 1 0 2h-86.2zM258 12.1a5 5 0 1 1-2 0V0h2v12.1zm-64 208a5 5 0 1 1-2 0v-54.2a5 5 0 1 1 2 0v54.2zm48-198.2V80h62v2h-64V21.9a5 5 0 1 1 2 0zm16 16V64h46v2h-48V37.9a5 5 0 1 1 2 0zm-128 96V208h16v12.1a5 5 0 1 1-2 0V210h-16v-76.1a5 5 0 1 1 2 0zm-5.9-21.9a5 5 0 1 1 0 2H114v48H85.9a5 5 0 1 1 0-2H112v-48h12.1zm-6.2 130a5 5 0 1 1 0-2H176v-74.1a5 5 0 1 1 2 0V242h-60.1zm-16-64a5 5 0 1 1 0-2H114v48h10.1a5 5 0 1 1 0 2H112v-48h-10.1zM66 284.1a5 5 0 1 1-2 0V274H50v30h-2v-32h18v12.1zM236.1 176a5 5 0 1 1 0 2H226v94h48v32h-2v-30h-48v-98h12.1zm25.8-30a5 5 0 1 1 0-2H274v44.1a5 5 0 1 1-2 0V146h-10.1zm-64 96a5 5 0 1 1 0-2H208v-80h16v-14h-42.1a5 5 0 1 1 0-2H226v18h-16v80h-12.1zm86.2-210a5 5 0 1 1 0 2H272V0h2v32h10.1zM98 101.9V146H53.9a5 5 0 1 1 0-2H96v-42.1a5 5 0 1 1 2 0zM53.9 34a5 5 0 1 1 0-2H80V0h2v34H53.9zm60.1 3.9V66H82v64H69.9a5 5 0 1 1 0-2H80V64h32V37.9a5 5 0 1 1 2 0zM101.9 82a5 5 0 1 1 0-2H128V37.9a5 5 0 1 1 2 0V82h-28.1zm16-64a5 5 0 1 1 0-2H146v44.1a5 5 0 1 1-2 0V18h-26.1zm102.2 270a5 5 0 1 1 0 2H98v14h-2v-16h124.1zM242 149.9V160h16v34h-16v62h48v48h-2v-46h-48v-66h16v-30h-16v-12.1a5 5 0 1 1 2 0zM53.9 18a5 5 0 1 1 0-2H64V2H48V0h18v18H53.9zm112 32a5 5 0 1 1 0-2H192V0h50v2h-48v48h-28.1zm-48-48a5 5 0 0 1-9.8-2h2.07a3 3 0 1 0 5.66 0H178v34h-18V21.9a5 5 0 1 1 2 0V32h14V2h-58.1zm0 96a5 5 0 1 1 0-2H137l32-32h39V21.9a5 5 0 1 1 2 0V66h-40.17l-32 32H117.9zm28.1 90.1a5 5 0 1 1-2 0v-76.51L175.59 80H224V21.9a5 5 0 1 1 2 0V82h-49.59L146 112.41v75.69zm16 32a5 5 0 1 1-2 0v-99.51L184.59 96H300.1a5 5 0 0 1 3.9-3.9v2.07a3 3 0 0 0 0 5.66v2.07a5 5 0 0 1-3.9-3.9H185.41L162 121.41v98.69zm-144-64a5 5 0 1 1-2 0v-3.51l48-48V48h32V0h2v50H66v55.41l-48 48v2.69zM50 53.9v43.51l-48 48V208h26.1a5 5 0 1 1 0 2H0v-65.41l48-48V53.9a5 5 0 1 1 2 0zm-16 16V89.41l-34 34v-2.82l32-32V69.9a5 5 0 1 1 2 0zM12.1 32a5 5 0 1 1 0 2H9.41L0 43.41V40.6L8.59 32h3.51zm265.8 18a5 5 0 1 1 0-2h18.69l7.41-7.41v2.82L297.41 50H277.9zm-16 160a5 5 0 1 1 0-2H288v-71.41l16-16v2.82l-14 14V210h-28.1zm-208 32a5 5 0 1 1 0-2H64v-22.59L40.59 194H21.9a5 5 0 1 1 0-2H41.41L66 216.59V242H53.9zm150.2 14a5 5 0 1 1 0 2H96v-56.6L56.6 162H37.9a5 5 0 1 1 0-2h19.5L98 200.6V256h106.1zm-150.2 2a5 5 0 1 1 0-2H80v-46.59L48.59 178H21.9a5 5 0 1 1 0-2H49.41L82 208.59V258H53.9zM34 39.8v1.61L9.41 66H0v-2h8.59L32 40.59V0h2v39.8zM2 300.1a5 5 0 0 1 3.9 3.9H3.83A3 3 0 0 0 0 302.17V256h18v48h-2v-46H2v42.1zM34 241v63h-2v-62H0v-2h34v1zM17 18H0v-2h16V0h2v18h-1zm273-2h14v2h-16V0h2v16zm-32 273v15h-2v-14h-14v14h-2v-16h18v1zM0 92.1A5.02 5.02 0 0 1 6 97a5 5 0 0 1-6 4.9v-2.07a3 3 0 1 0 0-5.66V92.1zM80 272h2v32h-2v-32zm37.9 32h-2.07a3 3 0 0 0-5.66 0h-2.07a5 5 0 0 1 9.8 0zM5.9 0A5.02 5.02 0 0 1 0 5.9V3.83A3 3 0 0 0 3.83 0H5.9zm294.2 0h2.07A3 3 0 0 0 304 3.83V5.9a5 5 0 0 1-3.9-5.9zm3.9 300.1v2.07a3 3 0 0 0-1.83 1.83h-2.07a5 5 0 0 1 3.9-3.9zM97 100a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0-16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-48 32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm32 48a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm32-16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0-32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm32 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0-16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16-64a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 96a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16-144a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16-32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16-16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-96 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16-32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm96 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16-64a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16-16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-32 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0-16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zM49 36a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-32 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm32 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zM33 68a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16-48a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 240a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16-64a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16-32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm80-176a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16-16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm32 48a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16-16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0-32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm112 176a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zM17 180a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0-32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zM17 84a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm32 64a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16-16a3 3 0 1 0 0-6 3 3 0 0 0 0 6z'%3E%3C/path%3E%3C/svg%3E");background-size:250px;background-position:0 5px}.ct-freemius-optin-message{position:relative;text-align:center;border-radius:3px;background:#f5f7f9}@media (max-width: 782px){.ct-freemius-optin-message{padding:50px 10% 10% 10%}}@media (min-width: 783px){.ct-freemius-optin-message{padding:60px 50px 50px 50px}}.ct-freemius-optin-message h2{margin-top:0}.ct-freemius-optin-message i{display:flex;align-items:center;justify-content:center;position:absolute;top:-25px;left:0;right:0;margin:0 auto;width:50px;height:50px;background:#fff;border-radius:100%;color:#0591c9;border:2px solid #DEECF3}.ct-freemius-optin-message i svg{-webkit-animation:ring-shake 5s ease-in-out infinite;animation:ring-shake 5s ease-in-out infinite;transform-origin:50% 0%}.ct-freemius-optin-message p{max-width:600px;margin:0 auto 20px auto !important}.ct-freemius-optin-message .ct-button-primary{--buttonHeight: 42px;--buttonPadding: 20px;--buttonFontSize: 14px}.ct-freemius-optin-message+.ct-first-steps-container{margin-top:55px;padding-top:50px;border-top:1px solid rgba(143,163,184,0.15)}@-webkit-keyframes ring-shake{0%{transform:rotate(-15deg)}2%{transform:rotate(15deg)}4%{transform:rotate(-18deg)}6%{transform:rotate(18deg)}8%{transform:rotate(-22deg)}10%{transform:rotate(22deg)}12%{transform:rotate(-18deg)}14%{transform:rotate(18deg)}16%{transform:rotate(-12deg)}18%{transform:rotate(12deg)}20%{transform:rotate(0deg)}100%{transform:rotate(0deg)}}@keyframes ring-shake{0%{transform:rotate(-15deg)}2%{transform:rotate(15deg)}4%{transform:rotate(-18deg)}6%{transform:rotate(18deg)}8%{transform:rotate(-22deg)}10%{transform:rotate(22deg)}12%{transform:rotate(-18deg)}14%{transform:rotate(18deg)}16%{transform:rotate(-12deg)}18%{transform:rotate(12deg)}20%{transform:rotate(0deg)}100%{transform:rotate(0deg)}}.blocksy-fs-optin-dashboard #wpwrap,.blocksy-fs-optin-dashboard #wpcontent,.blocksy-fs-optin-dashboard #wpbody{height:100%;min-height:100%}.blocksy-fs-optin-dashboard #wpbody-content{height:100%;padding-bottom:0}.blocksy-fs-optin-dashboard #wpbody-content #screen-meta,.blocksy-fs-optin-dashboard #wpbody-content .clear{display:none}.blocksy-fs-optin-dashboard .toplevel_page_ct-dashboard.current:after{border-right-color:#f2cf88 !important}.blocksy-fs-optin-wrapper{display:grid;grid-template-columns:repeat(2, 1fr);height:100%}.blocksy-fs-optin-wrapper>*{display:flex;flex-direction:column;justify-content:center;padding:9%;box-sizing:border-box}.blocksy-fs-optin-wrapper .ct-optin-svg{background:#F2CF88}.blocksy-fs-optin-wrapper .ct-optin-svg svg{max-width:750px;margin:0 auto}.blocksy-fs-optin-wrapper #fs_connect{width:100%;max-width:900px;margin:0;box-shadow:none}.blocksy-fs-optin-wrapper #fs_connect .fs-visual{display:none}.blocksy-fs-optin-wrapper #fs_connect .fs-content{padding:0;margin-bottom:30px}.blocksy-fs-optin-wrapper #fs_connect .fs-content>p span{display:block;font-size:25px;font-weight:700;color:#23282d;margin-bottom:20px}.blocksy-fs-optin-wrapper #fs_connect .fs-actions{display:flex;padding:0;margin-bottom:20px;background:transparent}.blocksy-fs-optin-wrapper #fs_connect .fs-actions .button{height:49px;line-height:49px;padding:0 20px !important}.blocksy-fs-optin-wrapper #fs_connect .fs-actions .button-primary{margin-right:15px}.blocksy-fs-optin-wrapper #fs_connect .fs-actions #skip_activation{order:2;float:none;background:transparent;border-color:transparent}.blocksy-fs-optin-wrapper #fs_connect .fs-actions #skip_activation:hover{border-color:#0071a1}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions{padding:0 0 30px 0}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions .fs-trigger{text-align:left;text-decoration:underline}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions .fs-trigger:focus{outline:none;box-shadow:none}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions ul{display:none}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions ul li{margin-bottom:0}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions ul li i.dashicons{font-size:18px;width:18px;height:18px;margin-right:8px;color:#23282d}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions ul li div{margin-left:0}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions ul li div span{text-transform:capitalize}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions ul li div p{margin-top:8px;font-size:12px;opacity:0.7}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions ul li:nth-child(1){order:1}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions ul li:nth-child(2){order:4}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions ul li:nth-child(3){order:3}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions ul li:nth-child(4){order:2}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions.fs-open ul{display:grid;grid-template-columns:repeat(2, minmax(auto, 280px));grid-column-gap:30px;grid-row-gap:30px;margin:20px 0 0 0;padding-top:30px;border-top:1px dashed #ddd}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions .fs-switch{width:25px;height:16px;top:1px;right:20px;padding:0;box-shadow:none;box-sizing:border-box;transition:all 0.1s linear;border:2px solid #555d66}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions .fs-switch .fs-toggle{box-sizing:border-box;border:none;top:1px;width:10px;height:10px;box-shadow:none;transition:all 0.1s linear}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions .fs-switch.fs-off{background:transparent}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions .fs-switch.fs-off .fs-toggle{left:1px;background:#555d66}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions .fs-switch.fs-on{border-color:#0085ba}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions .fs-switch.fs-on .fs-toggle{left:10px}.blocksy-fs-optin-wrapper #fs_connect .fs-terms{display:none}.blocksy-fs-optin-dashboard #fs_connect.require-license-key .fs-license-key-container{width:100%;margin:30px 0 0 0}.blocksy-fs-optin-dashboard #fs_connect.require-license-key .fs-license-key-container input[type=text]{min-height:40px;padding:0 12px}.blocksy-fs-optin-dashboard #fs_connect.require-license-key .fs-license-key-container .dashicons{top:13px;right:10px;font-size:16px;height:16px;width:16px}.blocksy-fs-optin-dashboard #fs_connect.require-license-key .fs-license-key-container .show-license-resend-modal{font-size:0.9em}.blocksy-fs-optin-dashboard #fs_connect.require-license-key .fs-actions form{width:100%}.blocksy-fs-optin-dashboard #fs_connect.require-license-key .fs-license-sync-disclaimer{text-align:left;font-size:0.9em}.blocksy-fs-optin-dashboard #fs_connect #fs_marketing_optin{padding:0;border:none;border-top:1px dashed #ddd;padding-top:30px;margin:30px 0 0 0;box-shadow:none}.blocksy-fs-optin-dashboard #fs_connect #fs_marketing_optin.error{background:transparent}.blocksy-fs-optin-dashboard #fs_connect #fs_marketing_optin .fs-input-label{margin-left:22px}.blocksy-fs-optin-dashboard #fs_connect .fs-freemium-licensing{border-top:1px dashed #ddd;padding:30px 0;background:transparent}.blocksy-fs-optin-dashboard #fs_connect .fs-freemium-licensing p{text-align:left;color:#444}.blocksy-fs-optin-dashboard #fs_connect .fs-freemium-licensing p a{color:#0073aa}
1
  /**
2
+ * - v1.7.61
3
  *
4
  * Copyright (c) 2021
5
  * Licensed GPLv2+
6
  */
7
 
8
+ .ct-mailchimp-modal{--modal-min-height: 300px}.mailchimp-credentials{display:grid;grid-template-columns:1fr 1fr 1fr;grid-column-gap:10px;margin:5px 0 0 0;padding:25px 0 0 0;border-top:1px dashed #eee}.mailchimp-credentials section{display:flex;flex-direction:column;min-width:0}.mailchimp-credentials label{display:block;font-size:12px;margin-bottom:3px;opacity:0.7}.mailchimp-credentials input{--height: 35px}.ct-extensions-sourse{display:flex;justify-content:center;margin:0 0 40px 0}.ct-extensions-sourse li{display:flex;align-items:center;height:38px;font-weight:500;padding:0 30px;margin:0;cursor:pointer;border:1px solid rgba(226,230,235,0.7)}.ct-extensions-sourse li.active{color:#fff;background:#0085ba;border-color:#0085ba}.ct-extensions-sourse li:hover:not(.active){color:#0085ba}.ct-extensions-sourse li:first-child{border-right:0;border-radius:4px 0 0 4px}.ct-extensions-sourse li:last-child{border-left:0;border-radius:0 4px 4px 0}.ct-extensions-list{display:grid;grid-template-columns:repeat(auto-fill, minmax(300px, 1fr));grid-column-gap:30px;grid-row-gap:30px;margin:0}.ct-extensions-list li{display:flex;flex-direction:column;margin:0;border-radius:3px;border:1px solid rgba(226,230,235,0.7);box-shadow:0 2px 5px rgba(143,163,184,0.12)}.ct-extension-title{display:flex;align-items:center;justify-content:space-between;margin:30px 0 15px 0;padding:0 25px}.ct-extension-title svg{opacity:0.7}.ct-extension-description{font-size:14px;line-height:1.7;margin-bottom:30px;padding:0 25px}.ct-extension-actions{display:flex;justify-content:space-between;margin-top:auto;padding:20px 13px 20px 25px;border-top:1px solid rgba(226,230,235,0.5);background:rgba(235,237,241,0.2)}.ct-extension-actions [class*="ct-button"]{--buttonHeight: 32px;--buttonPadding: 12px;min-width:92px}.ct-config-btn{margin-right:auto;margin-left:10px}.ct-config-btn:before{font-family:dashicons;content:"\f111";font-size:14px;margin-right:5px;opacity:0.9}.ct-minimal-button{display:flex;align-items:center;justify-content:center;width:32px;height:32px;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;padding:0;color:inherit;cursor:pointer;color:#c9cfd6;background:transparent;transition:color 0.2s ease}.ct-minimal-button:hover{color:#9ca9b9}.ct-minimal-button:focus{outline:none}.ct-minimal-button svg{fill:currentColor}.ct-option-info{display:flex;align-items:center;justify-content:center;font-style:normal;line-height:normal;margin-left:auto}.ct-option-info:before{font-family:dashicons;content:"\f348";font-size:16px;line-height:16px}.ct-demos-list-container ul{display:grid;grid-column-gap:30px;grid-row-gap:30px;margin:0;padding:0;list-style:none}@media (min-width: 783px){.ct-demos-list-container ul{grid-template-columns:repeat(2, 1fr)}}.ct-demos-list-container ul li{margin:0;box-sizing:border-box;box-shadow:0 2px 5px rgba(143,163,184,0.12)}.ct-demos-list-container ul li figure{position:relative;margin:0;overflow:hidden;border-radius:3px 3px 0 0}.ct-demos-list-container ul li figure:before{content:'';display:block;width:100%;padding-bottom:75%}.ct-demos-list-container ul li figure img{position:absolute;top:0;left:0;width:100%;height:100%}.ct-demos-list-container ul li figure section{position:absolute;display:flex;flex-direction:column;align-items:center;justify-content:center;top:0;left:0;right:0;bottom:0;opacity:0;background:rgba(36,41,45,0.9);transition:opacity 0.2s ease}.ct-demos-list-container ul li figure section h3{font-size:15px;color:#fff !important;margin:0 0 25px 0}.ct-demos-list-container ul li figure section div{display:flex}.ct-demos-list-container ul li figure section span{padding:8px 12px;display:block;font-size:17px;font-weight:500;color:#fff;border-radius:3px;border:2px solid rgba(255,255,255,0.5);background:rgba(36,41,45,0.4)}.ct-demos-list-container ul li figure section span:not(:last-child){margin-right:15px}.ct-demos-list-container ul li:hover figure>section{opacity:1}.ct-demos-list-container ul li.ct-is-pro figure{position:relative}.ct-demos-list-container ul li.ct-is-pro figure a{position:absolute;z-index:1;content:'PRO';top:0;right:0;font-size:13px;font-weight:700;letter-spacing:.03em;color:#a1680d;text-decoration:none;padding:5px 15px;margin:25px;background:#ffc568;border-radius:3px;box-shadow:0 5px 8px 0 rgba(234,157,33,0.3)}.ct-demo-actions{display:flex;align-items:center;padding:20px 25px;border-radius:0 0 3px 3px;border:1px solid rgba(226,230,235,0.7);background:rgba(235,237,241,0.2)}@media (max-width: 549px){.ct-demo-actions{flex-direction:column}}@media (min-width: 550px){.ct-demo-actions{justify-content:space-between}}.ct-demo-actions h4{margin:0}@media (max-width: 549px){.ct-demo-actions h4{margin-bottom:20px}}.ct-demo-actions .ct-button{margin-right:15px}.ct-demo-actions button[disabled]{opacity:0.3;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none}.ct-demo-modal{--modal-width: 500px;height:100%;transition:max-height 0.2s ease}.ct-demo-modal:not(.ct-demo-installer){--modal-max-height: 620px}.ct-demo-modal.ct-demo-installer{--modal-max-height: 380px}.ct-demo-step-container{height:100%;display:flex;flex-direction:column;color:#687c93;text-align:center}.ct-demo-step-container>*:first-child{flex:1;position:relative}.ct-demo-step-container>*:first-child>*{position:absolute;top:0;left:0;right:0;bottom:0}.ct-demo-step-container .ct-demo-icon{display:flex;align-items:center;justify-content:center;width:85px;height:85px;margin:10px auto 20px auto;background:#f3f6f8;border-radius:100%}.ct-demo-step-container h2{text-align:center;font-size:17px;font-weight:600;color:#3e5667;margin-top:0}.ct-demo-step-controls{position:relative;width:100%;height:40px}.ct-demo-step-controls button{position:absolute;z-index:2;top:0}.ct-demo-step-controls button.demo-back-btn{left:0}.ct-demo-step-controls button.demo-main-btn{right:0}.ct-steps-pills{display:flex;align-items:center;justify-content:center;position:absolute;z-index:1;top:0;left:0;right:0;bottom:0;width:200px;margin:0;padding:0;list-style:none;margin:0 auto}.ct-steps-pills li{display:flex;align-items:center;justify-content:center;width:30px;height:30px;margin:0;font-size:0}.ct-steps-pills li:before{content:'';width:12px;height:12px;border-radius:100%;box-shadow:inset 0 0 0 2px rgba(104,124,147,0.8);transition:box-shadow 0.2s ease, transform 0.2s ease}.ct-steps-pills li:not(.active):before{transform:scale3d(0.5, 0.5, 1);box-shadow:inset 0 0 0 10px rgba(104,124,147,0.8)}.ct-demo-child .ct-checkbox-container{max-width:250px;margin:25px auto 0 auto;padding-left:15px;padding-right:15px;border-radius:4px;border:1px solid rgba(179,189,201,0.3)}.ct-demo-child a{display:block;color:#687c93;font-weight:500;text-decoration:none;margin-top:25px}.ct-demo-child a:hover{color:#0073aa}.ct-demo-builder .ct-demo-icon svg{margin-left:10px}.ct-demo-builder ul{display:grid;margin:0;padding:0;list-style:none;margin:40px auto 0 auto}.ct-demo-builder ul[data-count="2"]{max-width:70%;grid-template-columns:repeat(2, 1fr);grid-column-gap:30px}.ct-demo-builder ul[data-count="3"]{grid-template-columns:repeat(3, 1fr);grid-column-gap:20px}.ct-demo-builder ul li{margin-bottom:0;cursor:pointer}.ct-demo-builder ul li figure{position:relative;display:flex;align-items:center;justify-content:center;min-height:100px;border:2px solid #e9ecee;border-radius:5px;margin:0;font-weight:500;transition:border-color 0.12s cubic-bezier(0.455, 0.03, 0.515, 0.955),box-shadow 0.12s cubic-bezier(0.455, 0.03, 0.515, 0.955)}.ct-demo-builder ul li figure>svg{width:47%}.ct-demo-builder ul li .builder-name{font-weight:500;color:#3e5667;margin-top:15px}.ct-demo-builder ul li:hover figure{border-color:var(--accentColor)}.ct-demo-builder ul li.active figure{border-color:var(--accentColor);box-shadow:0 0 0 1px var(--accentColor)}.ct-demo-builder ul li .ct-checkbox{--checkMarkColor: #fff;--background: rgba(179, 189, 201, 0.8);--backgroundActive: #0e8ecc;position:absolute;top:0px;right:0px}.ct-demo-builder ul li .ct-checkbox:before{width:22px !important;height:22px !important;border-radius:0px 3px 0px 5px}.ct-demo-builder ul li .ct-checkbox:not(.active):before{opacity:0}.ct-demo-plugins label{margin:0 auto}.ct-active-plugin{display:flex;align-items:center;position:relative;text-align:left;padding:10px 0}.ct-active-plugin span{display:flex;align-items:center;justify-content:center;position:absolute;right:-2px;width:22px;height:22px;border-radius:100%;box-sizing:border-box;background:rgba(179,189,201,0.3)}.ct-active-plugin span:before,.ct-active-plugin span:after{position:absolute;content:'';width:2px;border-radius:2px;background:rgba(104,124,147,0.6)}.ct-active-plugin span:before{top:10px;left:10px;height:5px;transform:rotate(-45deg);transform-origin:bottom center}.ct-active-plugin span:after{height:9px;left:9px;transform:rotate(40deg);transform-origin:bottom center}.ct-demo-erase{margin-top:10px;padding-top:10px;padding-bottom:20px;text-align:left;font-weight:600;border-top:1px dashed rgba(179,189,201,0.5);border-bottom:1px dashed rgba(179,189,201,0.5)}.ct-demo-erase .ct-checkbox-container{align-items:flex-start;padding-bottom:0}.ct-demo-erase i{display:block;width:90%;font-size:13px;margin-top:8px;opacity:0.8;font-weight:400;font-style:normal}.ct-export{text-align:center;margin-top:50px}.ct-site-export{display:flex;flex-direction:column;padding:30px}.ct-site-export label{display:flex;justify-content:space-between;padding:10px 0}.ct-site-export input[type="checkbox"]{margin:0}.ct-site-export textarea,.ct-site-export input[type="text"]{width:60%}.ct-site-export textarea{min-height:80px}.ct-site-export button{margin-top:20px}.ct-demo-installer .close-button{opacity:0 !important}.ct-demo-install{position:relative}.ct-demo-install>*{position:absolute;top:0;left:0;right:0;bottom:0}.ct-demo-install svg path{transform-origin:50% 50%;transform-box:fill-box;-webkit-animation-name:spin;animation-name:spin;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-timing-function:linear;animation-timing-function:linear}.ct-demo-install .g1{fill:#44ACDF;-webkit-animation-duration:5.5s;animation-duration:5.5s;animation-direction:reverse}.ct-demo-install .g2{fill:#3497D3;-webkit-animation-duration:4.5s;animation-duration:4.5s}.ct-demo-install .g3{fill:#0C7AB3;-webkit-animation-duration:4s;animation-duration:4s}.ct-installer-progress{width:100%;border-radius:5px;background:#f3f6f8;box-sizing:border-box}.ct-installer-progress div{width:var(--progress);height:4px;border-radius:inherit;background:#0e8ecc;transition:width 0.3s ease}.ct-progress-info{display:flex;justify-content:space-between;margin-top:30px;margin-bottom:15px;font-size:13px;opacity:0.8}@-webkit-keyframes spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}@keyframes spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}.ct-install-success{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%}.ct-install-success div{margin-top:10px}.ct-install-success a:first-child{margin-right:15px}.ct-modify-actions{margin-top:50px}.ct-modify-actions>*:not(:last-child){margin-right:15px}.ct-modify-actions .demo-remove{--ct-buttonHoverColor: #e04f4f}#ct-dashboard .ct-demo-notification{position:relative;padding:15px 20px 15px 55px;margin-bottom:40px;color:#0072aa;line-height:1.5;border:2px solid rgba(0,114,170,0.3);background:rgba(0,114,170,0.1);border-radius:5px}#ct-dashboard .ct-demo-notification:before{font-family:dashicons;content:"\f534";font-size:20px;position:absolute;top:13px;left:20px;color:rgba(0,114,170,0.8)}#ct-dashboard .ct-demo-notification b{font-weight:700}.ct-demos-list{display:flex;flex-direction:column}.ct-demos-list .ct-single-demo img{max-width:100px}.ct-demo-btn{font-size:15px;font-weight:600;letter-spacing:0.03em;color:#687c93;height:40px;border:none;cursor:pointer;padding:0 18px;border-radius:4px;background:#f3f6f8;transition:background 0.2s ease color 0.2s ease}.ct-demo-btn:focus{outline:none}.ct-demo-btn:hover{color:#fff;background:var(--ct-buttonHoverColor, #0073aa)}.ct-activation-action-modal{color:#687c93;text-align:center;padding:30px}.ct-activation-action-modal svg{width:65px;height:65px}.ct-activation-action-modal h2{color:#3e5667}.ct-activation-action-modal button{--buttonHeight: 42px;--buttonPadding: 20px;--buttonFontSize: 14px}.ct-beta-consent{margin-top:60px;border-radius:3px;text-align:center;color:#fff}@media (max-width: 782px){.ct-beta-consent{padding:10%}}@media (min-width: 783px){.ct-beta-consent{padding:50px}}.ct-beta-consent h2{display:flex;align-items:center;justify-content:center;color:#fff !important;margin-top:0;cursor:pointer}.ct-beta-consent h2 span{display:flex;font-size:15px;font-weight:500;cursor:pointer}.ct-beta-consent h2 .ct-option-switch{margin-left:15px}.ct-beta-consent h2 .ct-option-switch:not(.ct-active){border-color:#fff}.ct-beta-consent h2 .ct-option-switch:not(.ct-active)>span{background:#fff}.ct-beta-consent h2 .ct-option-switch:not(.ct-active):after{border-color:#fff}.ct-beta-consent+.ct-support-container{margin-top:50px !important}.ct-beta-consent{background-color:#32373c;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 304 304' width='304' height='304'%3E%3Cpath fill='%234f5660' fill-opacity='0.2' d='M44.1 224a5 5 0 1 1 0 2H0v-2h44.1zm160 48a5 5 0 1 1 0 2H82v-2h122.1zm57.8-46a5 5 0 1 1 0-2H304v2h-42.1zm0 16a5 5 0 1 1 0-2H304v2h-42.1zm6.2-114a5 5 0 1 1 0 2h-86.2a5 5 0 1 1 0-2h86.2zm-256-48a5 5 0 1 1 0 2H0v-2h12.1zm185.8 34a5 5 0 1 1 0-2h86.2a5 5 0 1 1 0 2h-86.2zM258 12.1a5 5 0 1 1-2 0V0h2v12.1zm-64 208a5 5 0 1 1-2 0v-54.2a5 5 0 1 1 2 0v54.2zm48-198.2V80h62v2h-64V21.9a5 5 0 1 1 2 0zm16 16V64h46v2h-48V37.9a5 5 0 1 1 2 0zm-128 96V208h16v12.1a5 5 0 1 1-2 0V210h-16v-76.1a5 5 0 1 1 2 0zm-5.9-21.9a5 5 0 1 1 0 2H114v48H85.9a5 5 0 1 1 0-2H112v-48h12.1zm-6.2 130a5 5 0 1 1 0-2H176v-74.1a5 5 0 1 1 2 0V242h-60.1zm-16-64a5 5 0 1 1 0-2H114v48h10.1a5 5 0 1 1 0 2H112v-48h-10.1zM66 284.1a5 5 0 1 1-2 0V274H50v30h-2v-32h18v12.1zM236.1 176a5 5 0 1 1 0 2H226v94h48v32h-2v-30h-48v-98h12.1zm25.8-30a5 5 0 1 1 0-2H274v44.1a5 5 0 1 1-2 0V146h-10.1zm-64 96a5 5 0 1 1 0-2H208v-80h16v-14h-42.1a5 5 0 1 1 0-2H226v18h-16v80h-12.1zm86.2-210a5 5 0 1 1 0 2H272V0h2v32h10.1zM98 101.9V146H53.9a5 5 0 1 1 0-2H96v-42.1a5 5 0 1 1 2 0zM53.9 34a5 5 0 1 1 0-2H80V0h2v34H53.9zm60.1 3.9V66H82v64H69.9a5 5 0 1 1 0-2H80V64h32V37.9a5 5 0 1 1 2 0zM101.9 82a5 5 0 1 1 0-2H128V37.9a5 5 0 1 1 2 0V82h-28.1zm16-64a5 5 0 1 1 0-2H146v44.1a5 5 0 1 1-2 0V18h-26.1zm102.2 270a5 5 0 1 1 0 2H98v14h-2v-16h124.1zM242 149.9V160h16v34h-16v62h48v48h-2v-46h-48v-66h16v-30h-16v-12.1a5 5 0 1 1 2 0zM53.9 18a5 5 0 1 1 0-2H64V2H48V0h18v18H53.9zm112 32a5 5 0 1 1 0-2H192V0h50v2h-48v48h-28.1zm-48-48a5 5 0 0 1-9.8-2h2.07a3 3 0 1 0 5.66 0H178v34h-18V21.9a5 5 0 1 1 2 0V32h14V2h-58.1zm0 96a5 5 0 1 1 0-2H137l32-32h39V21.9a5 5 0 1 1 2 0V66h-40.17l-32 32H117.9zm28.1 90.1a5 5 0 1 1-2 0v-76.51L175.59 80H224V21.9a5 5 0 1 1 2 0V82h-49.59L146 112.41v75.69zm16 32a5 5 0 1 1-2 0v-99.51L184.59 96H300.1a5 5 0 0 1 3.9-3.9v2.07a3 3 0 0 0 0 5.66v2.07a5 5 0 0 1-3.9-3.9H185.41L162 121.41v98.69zm-144-64a5 5 0 1 1-2 0v-3.51l48-48V48h32V0h2v50H66v55.41l-48 48v2.69zM50 53.9v43.51l-48 48V208h26.1a5 5 0 1 1 0 2H0v-65.41l48-48V53.9a5 5 0 1 1 2 0zm-16 16V89.41l-34 34v-2.82l32-32V69.9a5 5 0 1 1 2 0zM12.1 32a5 5 0 1 1 0 2H9.41L0 43.41V40.6L8.59 32h3.51zm265.8 18a5 5 0 1 1 0-2h18.69l7.41-7.41v2.82L297.41 50H277.9zm-16 160a5 5 0 1 1 0-2H288v-71.41l16-16v2.82l-14 14V210h-28.1zm-208 32a5 5 0 1 1 0-2H64v-22.59L40.59 194H21.9a5 5 0 1 1 0-2H41.41L66 216.59V242H53.9zm150.2 14a5 5 0 1 1 0 2H96v-56.6L56.6 162H37.9a5 5 0 1 1 0-2h19.5L98 200.6V256h106.1zm-150.2 2a5 5 0 1 1 0-2H80v-46.59L48.59 178H21.9a5 5 0 1 1 0-2H49.41L82 208.59V258H53.9zM34 39.8v1.61L9.41 66H0v-2h8.59L32 40.59V0h2v39.8zM2 300.1a5 5 0 0 1 3.9 3.9H3.83A3 3 0 0 0 0 302.17V256h18v48h-2v-46H2v42.1zM34 241v63h-2v-62H0v-2h34v1zM17 18H0v-2h16V0h2v18h-1zm273-2h14v2h-16V0h2v16zm-32 273v15h-2v-14h-14v14h-2v-16h18v1zM0 92.1A5.02 5.02 0 0 1 6 97a5 5 0 0 1-6 4.9v-2.07a3 3 0 1 0 0-5.66V92.1zM80 272h2v32h-2v-32zm37.9 32h-2.07a3 3 0 0 0-5.66 0h-2.07a5 5 0 0 1 9.8 0zM5.9 0A5.02 5.02 0 0 1 0 5.9V3.83A3 3 0 0 0 3.83 0H5.9zm294.2 0h2.07A3 3 0 0 0 304 3.83V5.9a5 5 0 0 1-3.9-5.9zm3.9 300.1v2.07a3 3 0 0 0-1.83 1.83h-2.07a5 5 0 0 1 3.9-3.9zM97 100a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0-16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-48 32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm32 48a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm32-16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0-32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm32 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0-16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16-64a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 96a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16-144a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16-32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16-16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-96 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16-32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm96 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16-64a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16-16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-32 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0-16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zM49 36a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-32 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm32 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zM33 68a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16-48a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 240a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16-64a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16-32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm80-176a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16-16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm32 48a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16-16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0-32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm112 176a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zM17 180a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0-32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zM17 84a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm32 64a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16-16a3 3 0 1 0 0-6 3 3 0 0 0 0 6z'%3E%3C/path%3E%3C/svg%3E");background-size:250px;background-position:0 5px}.ct-freemius-optin-message{position:relative;text-align:center;border-radius:3px;background:#f5f7f9}@media (max-width: 782px){.ct-freemius-optin-message{padding:50px 10% 10% 10%}}@media (min-width: 783px){.ct-freemius-optin-message{padding:60px 50px 50px 50px}}.ct-freemius-optin-message h2{margin-top:0}.ct-freemius-optin-message i{display:flex;align-items:center;justify-content:center;position:absolute;top:-25px;left:0;right:0;margin:0 auto;width:50px;height:50px;background:#fff;border-radius:100%;color:#0591c9;border:2px solid #DEECF3}.ct-freemius-optin-message i svg{-webkit-animation:ring-shake 5s ease-in-out infinite;animation:ring-shake 5s ease-in-out infinite;transform-origin:50% 0%}.ct-freemius-optin-message p{max-width:600px;margin:0 auto 20px auto !important}.ct-freemius-optin-message .ct-button-primary{--buttonHeight: 42px;--buttonPadding: 20px;--buttonFontSize: 14px}.ct-freemius-optin-message+.ct-first-steps-container{margin-top:55px;padding-top:50px;border-top:1px solid rgba(143,163,184,0.15)}@-webkit-keyframes ring-shake{0%{transform:rotate(-15deg)}2%{transform:rotate(15deg)}4%{transform:rotate(-18deg)}6%{transform:rotate(18deg)}8%{transform:rotate(-22deg)}10%{transform:rotate(22deg)}12%{transform:rotate(-18deg)}14%{transform:rotate(18deg)}16%{transform:rotate(-12deg)}18%{transform:rotate(12deg)}20%{transform:rotate(0deg)}100%{transform:rotate(0deg)}}@keyframes ring-shake{0%{transform:rotate(-15deg)}2%{transform:rotate(15deg)}4%{transform:rotate(-18deg)}6%{transform:rotate(18deg)}8%{transform:rotate(-22deg)}10%{transform:rotate(22deg)}12%{transform:rotate(-18deg)}14%{transform:rotate(18deg)}16%{transform:rotate(-12deg)}18%{transform:rotate(12deg)}20%{transform:rotate(0deg)}100%{transform:rotate(0deg)}}.blocksy-fs-optin-dashboard #wpwrap,.blocksy-fs-optin-dashboard #wpcontent,.blocksy-fs-optin-dashboard #wpbody{height:100%;min-height:100%}.blocksy-fs-optin-dashboard #wpbody-content{height:100%;padding-bottom:0}.blocksy-fs-optin-dashboard #wpbody-content #screen-meta,.blocksy-fs-optin-dashboard #wpbody-content .clear{display:none}.blocksy-fs-optin-dashboard .toplevel_page_ct-dashboard.current:after{border-right-color:#f2cf88 !important}.blocksy-fs-optin-wrapper{display:grid;grid-template-columns:repeat(2, 1fr);height:100%}.blocksy-fs-optin-wrapper>*{display:flex;flex-direction:column;justify-content:center;padding:9%;box-sizing:border-box}.blocksy-fs-optin-wrapper .ct-optin-svg{background:#F2CF88}.blocksy-fs-optin-wrapper .ct-optin-svg svg{max-width:750px;margin:0 auto}.blocksy-fs-optin-wrapper #fs_connect{width:100%;max-width:900px;margin:0;box-shadow:none}.blocksy-fs-optin-wrapper #fs_connect .fs-visual{display:none}.blocksy-fs-optin-wrapper #fs_connect .fs-content{padding:0;margin-bottom:30px}.blocksy-fs-optin-wrapper #fs_connect .fs-content>p span{display:block;font-size:25px;font-weight:700;color:#23282d;margin-bottom:20px}.blocksy-fs-optin-wrapper #fs_connect .fs-actions{display:flex;padding:0;margin-bottom:20px;background:transparent}.blocksy-fs-optin-wrapper #fs_connect .fs-actions .button{height:49px;line-height:49px;padding:0 20px !important}.blocksy-fs-optin-wrapper #fs_connect .fs-actions .button-primary{margin-right:15px}.blocksy-fs-optin-wrapper #fs_connect .fs-actions #skip_activation{order:2;float:none;background:transparent;border-color:transparent}.blocksy-fs-optin-wrapper #fs_connect .fs-actions #skip_activation:hover{border-color:#0071a1}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions{padding:0 0 30px 0}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions .fs-trigger{text-align:left;text-decoration:underline}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions .fs-trigger:focus{outline:none;box-shadow:none}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions ul{display:none}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions ul li{margin-bottom:0}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions ul li i.dashicons{font-size:18px;width:18px;height:18px;margin-right:8px;color:#23282d}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions ul li div{margin-left:0}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions ul li div span{text-transform:capitalize}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions ul li div p{margin-top:8px;font-size:12px;opacity:0.7}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions ul li:nth-child(1){order:1}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions ul li:nth-child(2){order:4}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions ul li:nth-child(3){order:3}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions ul li:nth-child(4){order:2}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions.fs-open ul{display:grid;grid-template-columns:repeat(2, minmax(auto, 280px));grid-column-gap:30px;grid-row-gap:30px;margin:20px 0 0 0;padding-top:30px;border-top:1px dashed #ddd}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions .fs-switch{width:25px;height:16px;top:1px;right:20px;padding:0;box-shadow:none;box-sizing:border-box;transition:all 0.1s linear;border:2px solid #555d66}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions .fs-switch .fs-toggle{box-sizing:border-box;border:none;top:1px;width:10px;height:10px;box-shadow:none;transition:all 0.1s linear}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions .fs-switch.fs-off{background:transparent}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions .fs-switch.fs-off .fs-toggle{left:1px;background:#555d66}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions .fs-switch.fs-on{border-color:#0085ba}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions .fs-switch.fs-on .fs-toggle{left:10px}.blocksy-fs-optin-wrapper #fs_connect .fs-terms{display:none}.blocksy-fs-optin-dashboard #fs_connect.require-license-key .fs-license-key-container{width:100%;margin:30px 0 0 0}.blocksy-fs-optin-dashboard #fs_connect.require-license-key .fs-license-key-container input[type=text]{min-height:49px;padding:0 12px;line-height:initial}.blocksy-fs-optin-dashboard #fs_connect.require-license-key .fs-license-key-container .dashicons{top:17px;right:10px;font-size:16px;height:16px;width:16px}.blocksy-fs-optin-dashboard #fs_connect.require-license-key .fs-license-key-container .show-license-resend-modal{font-size:0.9em;margin-top:10px}.blocksy-fs-optin-dashboard #fs_connect.require-license-key .fs-actions{flex-wrap:wrap}.blocksy-fs-optin-dashboard #fs_connect.require-license-key .fs-actions form{width:100%}.blocksy-fs-optin-dashboard #fs_connect.require-license-key .fs-actions #license_issues_link{flex:1 1 auto;text-align:left}.blocksy-fs-optin-dashboard #fs_connect.require-license-key .fs-permissions p{text-align:left}.blocksy-fs-optin-dashboard #fs_connect.require-license-key .fs-permissions p:last-of-type{margin-bottom:0}.blocksy-fs-optin-dashboard #fs_connect #fs_marketing_optin{border:none;padding:30px 0;margin:30px 0 0 0;box-shadow:none;border-top:1px dashed #ddd;border-bottom:1px dashed #ddd}.blocksy-fs-optin-dashboard #fs_connect #fs_marketing_optin.error{background:transparent}.blocksy-fs-optin-dashboard #fs_connect #fs_marketing_optin .fs-input-label{margin-left:22px}.blocksy-fs-optin-dashboard #fs_connect .fs-freemium-licensing{border-top:1px dashed #ddd;padding:30px 0;background:transparent}.blocksy-fs-optin-dashboard #fs_connect .fs-freemium-licensing p{text-align:left;color:#444}.blocksy-fs-optin-dashboard #fs_connect .fs-freemium-licensing p a{color:#0073aa}
static/bundle/dashboard.js CHANGED
@@ -3,4 +3,4 @@
3
  Copyright (c) 2017 Jed Watson.
4
  Licensed under the MIT License (MIT), see
5
  http://jedwatson.github.io/classnames
6
- */!function(){"use strict";var n={}.hasOwnProperty;function c(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var o=typeof r;if("string"===o||"number"===o)e.push(r);else if(Array.isArray(r)&&r.length){var a=c.apply(null,r);a&&e.push(a)}else if("object"===o)for(var i in r)n.call(r,i)&&r[i]&&e.push(i)}}return e.join(" ")}e.exports?(c.default=c,e.exports=c):void 0===(r=function(){return c}.apply(t,[]))||(e.exports=r)}()},function(e,t){e.exports=window.blocksyOptions},function(e,t){e.exports=window.ctEvents},function(e,t){e.exports=window.React},function(e,t,n){var r,c,o=n(11),a=n(12),i=(c=[],{activateTrap:function(e){if(c.length>0){var t=c[c.length-1];t!==e&&t.pause()}var n=c.indexOf(e);-1===n||c.splice(n,1),c.push(e)},deactivateTrap:function(e){var t=c.indexOf(e);-1!==t&&c.splice(t,1),c.length>0&&c[c.length-1].unpause()}});function l(e){return setTimeout(e,0)}e.exports=function(e,t){var n=document,c="string"==typeof e?n.querySelector(e):e,u=a({returnFocusOnDeactivate:!0,escapeDeactivates:!0},t),s={firstTabbableNode:null,lastTabbableNode:null,nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1},f={activate:function(e){if(s.active)return;g(),s.active=!0,s.paused=!1,s.nodeFocusedBeforeActivation=n.activeElement;var t=e&&e.onActivate?e.onActivate:u.onActivate;t&&t();return m(),f},deactivate:d,pause:function(){if(s.paused||!s.active)return;s.paused=!0,b()},unpause:function(){if(!s.paused||!s.active)return;s.paused=!1,g(),m()}};return f;function d(e){if(s.active){clearTimeout(r),b(),s.active=!1,s.paused=!1,i.deactivateTrap(f);var t=e&&void 0!==e.onDeactivate?e.onDeactivate:u.onDeactivate;return t&&t(),(e&&void 0!==e.returnFocus?e.returnFocus:u.returnFocusOnDeactivate)&&l((function(){var e;_((e=s.nodeFocusedBeforeActivation,p("setReturnFocus")||e))})),f}}function m(){if(s.active)return i.activateTrap(f),r=l((function(){_(h())})),n.addEventListener("focusin",y,!0),n.addEventListener("mousedown",v,{capture:!0,passive:!1}),n.addEventListener("touchstart",v,{capture:!0,passive:!1}),n.addEventListener("click",j,{capture:!0,passive:!1}),n.addEventListener("keydown",O,{capture:!0,passive:!1}),f}function b(){if(s.active)return n.removeEventListener("focusin",y,!0),n.removeEventListener("mousedown",v,!0),n.removeEventListener("touchstart",v,!0),n.removeEventListener("click",j,!0),n.removeEventListener("keydown",O,!0),f}function p(e){var t=u[e],r=t;if(!t)return null;if("string"==typeof t&&!(r=n.querySelector(t)))throw new Error("`"+e+"` refers to no known node");if("function"==typeof t&&!(r=t()))throw new Error("`"+e+"` did not return a node");return r}function h(){var e;if(!(e=null!==p("initialFocus")?p("initialFocus"):c.contains(n.activeElement)?n.activeElement:s.firstTabbableNode||p("fallbackFocus")))throw new Error("Your focus-trap needs to have at least one focusable element");return e}function v(e){c.contains(e.target)||(u.clickOutsideDeactivates?d({returnFocus:!o.isFocusable(e.target)}):u.allowOutsideClick&&u.allowOutsideClick(e)||e.preventDefault())}function y(e){c.contains(e.target)||e.target instanceof Document||(e.stopImmediatePropagation(),_(s.mostRecentlyFocusedNode||h()))}function O(e){if(!1!==u.escapeDeactivates&&function(e){return"Escape"===e.key||"Esc"===e.key||27===e.keyCode}(e))return e.preventDefault(),void d();(function(e){return"Tab"===e.key||9===e.keyCode})(e)&&function(e){if(g(),e.shiftKey&&e.target===s.firstTabbableNode)return e.preventDefault(),void _(s.lastTabbableNode);if(!e.shiftKey&&e.target===s.lastTabbableNode)e.preventDefault(),_(s.firstTabbableNode)}(e)}function j(e){u.clickOutsideDeactivates||c.contains(e.target)||u.allowOutsideClick&&u.allowOutsideClick(e)||(e.preventDefault(),e.stopImmediatePropagation())}function g(){var e=o(c);s.firstTabbableNode=e[0]||h(),s.lastTabbableNode=e[e.length-1]||h()}function _(e){e!==n.activeElement&&(e&&e.focus?(e.focus(),s.mostRecentlyFocusedNode=e,function(e){return e.tagName&&"input"===e.tagName.toLowerCase()&&"function"==typeof e.select}(e)&&e.select()):_(h()))}}},function(e,t,n){(function(n){var r,c,o;c=[],void 0===(o="function"==typeof(r=function(){"use strict";function t(e,t,n){var r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){a(r.response,t,n)},r.onerror=function(){console.error("could not download file")},r.send()}function r(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return 200<=t.status&&299>=t.status}function c(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(n){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var o="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof n&&n.global===n?n:void 0,a=o.saveAs||("object"!=typeof window||window!==o?function(){}:"download"in HTMLAnchorElement.prototype?function(e,n,a){var i=o.URL||o.webkitURL,l=document.createElement("a");n=n||e.name||"download",l.download=n,l.rel="noopener","string"==typeof e?(l.href=e,l.origin===location.origin?c(l):r(l.href)?t(e,n,a):c(l,l.target="_blank")):(l.href=i.createObjectURL(e),setTimeout((function(){i.revokeObjectURL(l.href)}),4e4),setTimeout((function(){c(l)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,n,o){if(n=n||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(function(e,t){return void 0===t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}(e,o),n);else if(r(e))t(e,n,o);else{var a=document.createElement("a");a.href=e,a.target="_blank",setTimeout((function(){c(a)}))}}:function(e,n,r,c){if((c=c||open("","_blank"))&&(c.document.title=c.document.body.innerText="downloading..."),"string"==typeof e)return t(e,n,r);var a="application/octet-stream"===e.type,i=/constructor/i.test(o.HTMLElement)||o.safari,l=/CriOS\/[\d]+/.test(navigator.userAgent);if((l||a&&i)&&"object"==typeof FileReader){var u=new FileReader;u.onloadend=function(){var e=u.result;e=l?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),c?c.location.href=e:location=e,c=null},u.readAsDataURL(e)}else{var s=o.URL||o.webkitURL,f=s.createObjectURL(e);c?c.location=f:location.href=f,c=null,setTimeout((function(){s.revokeObjectURL(f)}),4e4)}});o.saveAs=a.saveAs=a,e.exports=a})?r.apply(t,c):r)||(e.exports=o)}).call(this,n(13))},function(e,t,n){e.exports=n(9)()},function(e,t,n){"use strict";var r=n(10);function c(){}function o(){}o.resetWarningCache=c,e.exports=function(){function e(e,t,n,c,o,a){if(a!==r){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:c};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t){var n=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'],r=n.join(","),c="undefined"==typeof Element?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector;function o(e,t){t=t||{};var n,o,i,l=[],f=[],d=e.querySelectorAll(r);for(t.includeContainer&&c.call(e,r)&&(d=Array.prototype.slice.apply(d)).unshift(e),n=0;n<d.length;n++)a(o=d[n])&&(0===(i=u(o))?l.push(o):f.push({documentOrder:n,tabIndex:i,node:o}));return f.sort(s).map((function(e){return e.node})).concat(l)}function a(e){return!(!i(e)||function(e){return function(e){return f(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t=function(e){for(var t=0;t<e.length;t++)if(e[t].checked)return e[t]}(e.ownerDocument.querySelectorAll('input[type="radio"][name="'+e.name+'"]'));return!t||t===e}(e)}(e)||u(e)<0)}function i(e){return!(e.disabled||function(e){return f(e)&&"hidden"===e.type}(e)||function(e){return null===e.offsetParent||"hidden"===getComputedStyle(e).visibility}(e))}o.isTabbable=function(e){if(!e)throw new Error("No node provided");return!1!==c.call(e,r)&&a(e)},o.isFocusable=function(e){if(!e)throw new Error("No node provided");return!1!==c.call(e,l)&&i(e)};var l=n.concat("iframe").join(",");function u(e){var t=parseInt(e.getAttribute("tabindex"),10);return isNaN(t)?function(e){return"true"===e.contentEditable}(e)?0:e.tabIndex:t}function s(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex}function f(e){return"INPUT"===e.tagName}e.exports=o},function(e,t){e.exports=function(){for(var e={},t=0;t<arguments.length;t++){var r=arguments[t];for(var c in r)n.call(r,c)&&(e[c]=r[c])}return e};var n=Object.prototype.hasOwnProperty},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";n.r(t);var r=n(0),c=n(4),o=n.n(c),a=n(1),i=n(2),l=n.n(i),u=n(5),s=n.n(u);n(8);function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(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}var m=function(e){e.initialState,e.getInitialState,e.refs,e.getRefs,e.didMount,e.didUpdate,e.willUnmount,e.getSnapshotBeforeUpdate,e.shouldUpdate,e.render;return 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}(e,["initialState","getInitialState","refs","getRefs","didMount","didUpdate","willUnmount","getSnapshotBeforeUpdate","shouldUpdate","render"])},b=function(e){function t(){var n,r;f(this,t);for(var c=arguments.length,o=Array(c),a=0;a<c;a++)o[a]=arguments[a];return n=r=d(this,e.call.apply(e,[this].concat(o))),p.call(r),d(r,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),t.prototype.getArgs=function(){var e=this.state,t=this.props,n=this._setState,r=this._forceUpdate,c=this._refs;return{state:e,props:m(t),refs:c,setState:n,forceUpdate:r}},t.prototype.componentDidMount=function(){this.props.didMount&&this.props.didMount(this.getArgs())},t.prototype.shouldComponentUpdate=function(e,t){return!this.props.shouldUpdate||this.props.shouldUpdate({props:this.props,state:this.state,nextProps:m(e),nextState:t})},t.prototype.componentWillUnmount=function(){this.props.willUnmount&&this.props.willUnmount({state:this.state,props:m(this.props),refs:this._refs})},t.prototype.componentDidUpdate=function(e,t,n){this.props.didUpdate&&this.props.didUpdate(Object.assign(this.getArgs(),{prevProps:m(e),prevState:t}),n)},t.prototype.getSnapshotBeforeUpdate=function(e,t){return this.props.getSnapshotBeforeUpdate?this.props.getSnapshotBeforeUpdate(Object.assign(this.getArgs(),{prevProps:m(e),prevState:t})):null},t.prototype.render=function(){var e=this.props,t=e.children,n=e.render;return n?n(this.getArgs()):"function"==typeof t?t(this.getArgs()):t||null},t}(s.a.Component);b.defaultProps={getInitialState:function(){},getRefs:function(){return{}}};var p=function(){var e=this;this.state=this.props.initialState||this.props.getInitialState(this.props),this._refs=this.props.refs||this.props.getRefs(this.getArgs()),this._setState=function(){return e.setState.apply(e,arguments)},this._forceUpdate=function(){return e.forceUpdate.apply(e,arguments)}},h=b,v=function(e){var t=e.children,n=e.container,c=void 0===n?document.body:n,o=e.type,a=void 0===o?"reach-portal":o;return Object(r.createElement)(h,{getRefs:function(){return{node:null}},didMount:function(e){var t=e.refs,n=e.forceUpdate,r=c.hasOwnProperty("current")?c.current:c;t.node=document.createElement(a),r.appendChild(t.node),n()},willUnmount:function(e){var t=e.refs.node,n=c.hasOwnProperty("current")?c.current:c;n&&n.removeChild(t)},render:function(e){var n=e.refs.node;return n?Object(r.createPortal)(t,n):null}})};var y=function(e,t){return function(n){if(e&&e(n),!n.defaultPrevented)return t(n)}},O=n(6),j=n.n(O);function g(){return(g=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)}function _(e,t){if(null==e)return{};var n,r,c=function(e,t){if(null==e)return{};var n,r,c={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(c[n]=e[n]);return c}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(c[n]=e[n])}return c}var E=function(){},w=function(){},x=function(e,t){var n,r,c;e.disposeAriaHider=(n=e.overlayNode,r=[],c=[],Array.prototype.forEach.call(document.querySelectorAll("body > *"),(function(e){if(e!==n.parentNode){var t=e.getAttribute("aria-hidden");null!==t&&"false"!==t||(r.push(t),c.push(e),e.setAttribute("aria-hidden","true"))}})),function(){c.forEach((function(e,t){var n=r[t];null===n?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",n)}))}),e.trap=j()(e.overlayNode,{initialFocus:t?function(){return t.current}:void 0,fallbackFocus:e.contentNode,escapeDeactivates:!1,clickOutsideDeactivates:!1})},S=function(e){var t=e.refs;t.trap.deactivate(),t.disposeAriaHider()},C=React.createContext(),k=React.forwardRef((function(e,t){var n=e.container,c=e.isOpen,o=void 0===c||c,a=e.onDismiss,i=void 0===a?E:a,l=e.initialFocusRef,u=e.onClick,s=e.onKeyDown,f=_(e,["container","isOpen","onDismiss","initialFocusRef","onClick","onKeyDown"]);return Object(r.createElement)(h,{didMount:w},o?Object(r.createElement)(v,{container:n,"data-reach-dialog-wrapper":!0},Object(r.createElement)(h,{refs:{overlayNode:null,contentNode:null},didMount:function(e){var t=e.refs;x(t,l)},willUnmount:S},(function(e){var n=e.refs;return Object(r.createElement)(C.Provider,{value:function(e){return n.contentNode=e}},Object(r.createElement)("div",g({"data-reach-dialog-overlay":!0,onClick:y(u,(function(e){e.stopPropagation(),i()})),onKeyDown:y(s,(function(e){"Escape"===e.key&&(e.stopPropagation(),i())})),ref:function(e){n.overlayNode=e,t&&t(e)}},f)))}))):null)}));k.propTypes={initialFocusRef:function(){}};var D=function(e){return e.stopPropagation()},z=React.forwardRef((function(e,t){var n=e.onClick,c=(e.onKeyDown,_(e,["onClick","onKeyDown"]));return Object(r.createElement)(C.Consumer,null,(function(e){return Object(r.createElement)("div",g({"aria-modal":"true","data-reach-dialog-content":!0,tabIndex:"-1",onClick:y(n,D),ref:function(n){e(n),t&&t(n)}},c))}))})),A=n(3),P=function(e){return!!e},M=function(e){var t=e.items,n=e.isVisible,c=void 0===n?P:n,o=e.render,a=e.className,i=e.onDismiss;return Object(r.createElement)(A.Transition,{items:t,onStart:function(){return document.body.classList[c(t)?"add":"remove"]("ct-dashboard-overlay-open")},config:{duration:200},from:{opacity:0,y:-10},enter:{opacity:1,y:0},leave:{opacity:0,y:10}},(function(e){return c(e)&&function(t){return Object(r.createElement)(k,{style:{opacity:t.opacity},container:document.querySelector("#wpbody"),onDismiss:function(){return i()}},Object(r.createElement)(z,{className:l()("ct-admin-modal",a),style:{transform:"translate3d(0px, ".concat(t.y,"px, 0px)")}},Object(r.createElement)("button",{className:"close-button",onClick:function(){return i()}},"×"),o(e,t)))}}))};function N(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,c=!1,o=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){c=!0,o=e}finally{try{r||null==i.return||i.return()}finally{if(c)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return L(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return L(e,t)}(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 L(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}var T=function(e){var t=N(Object(r.useState)(!1),2),n=t[0],c=t[1];return[function(){return c(!0)},Object(r.createElement)(M,{items:n,onDismiss:function(){return c(!1)},render:function(){return Object(r.createElement)("div",{className:"ct-modal-content",dangerouslySetInnerHTML:{__html:e.readme}})}})]};function I(e,t,n,r,c,o,a){try{var i=e[o](a),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,c)}function R(e){return function(){var t=this,n=arguments;return new Promise((function(r,c){var o=e.apply(t,n);function a(e){I(o,r,c,a,i,"next",e)}function i(e){I(o,r,c,a,i,"throw",e)}a(void 0)}))}}function U(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,c=!1,o=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){c=!0,o=e}finally{try{r||null==i.return||i.return()}finally{if(c)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return F(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return F(e,t)}(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 F(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}var B=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=Object(r.useState)(!1),c=U(n,2),o=c[0],i=c[1],l=Object(r.useState)(!1),u=U(l,2),s=u[0],f=u[1],d=ctDashboardLocalizations.plugin_data.is_pro,m=function(){var n=R(regeneratorRuntime.mark((function n(){var r;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(d||!e.config.pro){n.next=3;break}return f(!0),n.abrupt("return");case 3:return(r=new FormData).append("ext",e.name),r.append("action",e.__object?"blocksy_extension_deactivate":"blocksy_extension_activate"),i(!0),n.prev=7,n.next=10,fetch(ctDashboardLocalizations.ajax_url,{method:"POST",body:r});case 10:e.config.require_refresh&&location.reload(),t(),n.next=16;break;case 14:n.prev=14,n.t0=n.catch(7);case 16:i(!1);case 17:case"end":return n.stop()}}),n,null,[[7,14]])})));return function(){return n.apply(this,arguments)}}();return[o,m,!d&&e.config.pro?Object(r.createElement)(M,{items:s,onDismiss:function(){return f(!1)},render:function(){return Object(r.createElement)("div",{className:"ct-activation-action-modal"},Object(r.createElement)("svg",{viewBox:"0 0 59.99 60"},Object(r.createElement)("path",{d:"M14.41 43.65c0 .13.08.27.11.41a5.91 5.91 0 010 2.37c-1.78 1.14-3.2 1.19-4.34.68-2.83-1.27-3.81-6-3.81-6s.38-.08 1-.15a6.08 6.08 0 012.64.91 4.17 4.17 0 01-.22-1 6.47 6.47 0 013.2 1 8.14 8.14 0 01.35-5 12.74 12.74 0 01.65-1.62s8.51 4.32 3 9.27a5.81 5.81 0 01-2.34-.68 2 2 0 01-.24-.19zM7.17 15.93q.2.22.42.45a5.74 5.74 0 002.68-.74 5.51 5.51 0 00-.28 2.76 6.79 6.79 0 001.47.81c5 1.94 6.91-5.79 6.91-5.79a13.35 13.35 0 00-4.5-.26 5.64 5.64 0 00-2.15.72 4.42 4.42 0 00.23-.81c.51-2.62-.94-5.82-.94-5.82a13.76 13.76 0 00-2.44 1.51c-2 1.51-4 4-1.53 7a.65.65 0 00.13.17zm.93 16.56a6.7 6.7 0 00.84.76c7.28-1.28 2.36-9.46 2.36-9.46a14.28 14.28 0 00-2.18 1.69 7.39 7.39 0 00-2.13 3.35v-1.19a5.49 5.49 0 00-1.27-1.71 12.75 12.75 0 00-3.94-2.44 13.32 13.32 0 00-.39 1.37c-.49 2-.91 5.69 1.85 7a4.83 4.83 0 001.75.46 8.25 8.25 0 00.86 0 6.45 6.45 0 001.14-1.76 4.41 4.41 0 001.11 1.93zM18.79 9.27c6 1.85 8.82-7.61 8.82-7.61a17.44 17.44 0 00-6.1-.58c-2.92.35-5.71 1.92-5.33 6.76a8.42 8.42 0 002.61 1.43zM49.6 40.93a6.08 6.08 0 00-2.64.91 4.21 4.21 0 00.22-1 11.57 11.57 0 00-1.19-5.59 13.88 13.88 0 00-2.36 1.58c-1.87 1.58-3.82 4.16-1.33 7 .06.08.13.15.2.23s.29.3.46.45a5.69 5.69 0 002.65-.86 5.82 5.82 0 00-.14 2.78 6.75 6.75 0 001.34.68c5.16 1.94 6.81-6 6.81-6a13.28 13.28 0 00-4.02-.18zm-6.49-27.77a10.69 10.69 0 00-1.5.26s1.15 4.53 3.91 5.79c1.18.54 2.66.47 4.47-.81a5.88 5.88 0 00-.16-2.47 1.42 1.42 0 00-.1-.29l.23.13a6 6 0 002.45.61c5.24-5.19-3.42-9.13-3.42-9.13a13.57 13.57 0 00-.54 1.51 8.37 8.37 0 00-.17 5.12 6.62 6.62 0 00-3.29-.81 12.09 12.09 0 00-1.88.09zm15.13 10.33a13.53 13.53 0 00-2.61 1.37 7.1 7.1 0 00-2.64 2.78v1.18a6.69 6.69 0 00-1.73-2.89 13.85 13.85 0 00-2.62-2.14 13.17 13.17 0 00-.82 1.69c-.83 2-1.65 5.4 1 7a6.4 6.4 0 002.16.76 7.35 7.35 0 001-.93 4.26 4.26 0 001-1.76 6.06 6.06 0 00.76 1.3 6.25 6.25 0 00.4.5c7.43.09 4.1-8.86 4.1-8.86zM38.19 9.27c1.55.52 3.41.27 5.61-1.43.51-6.56-4.81-7.11-8.33-6.76a19.24 19.24 0 00-3.1.58S34.25 8 38.19 9.27zM41.99 54h-3v-6a2 2 0 00-2-2h-14a2 2 0 00-2 2v6h-3a2 2 0 00-2 2v3h28v-3a2 2 0 00-2-2zM25.76 21.65l-5.77.84a1 1 0 00-.81.68 1 1 0 00.26 1l4.19 4.11a1 1 0 01.28.88l-.92 5.44-.07.4a1 1 0 00.4 1 1 1 0 001.06.07l3.55-1.88 1.6-.85a1 1 0 01.94 0l2.4 1.27 2.75 1.46a1 1 0 001.05-.07 1 1 0 00.4-1l-1-5.81a1 1 0 01.28-.88l4.19-4.11a1 1 0 00.26-1 1 1 0 00-.81-.68l-5.78-.84a1 1 0 01-.75-.55l-2.57-5.3a1 1 0 00-1.8 0l-1.17 2.39-1.41 2.88a1 1 0 01-.75.55z",fill:"#ffa800"}),Object(r.createElement)("path",{d:"M19.99 22.49l5.78-.84a1 1 0 00.75-.55l1.41-2.88 1.41 2.88a1 1 0 00.75.55l5.78.84a1 1 0 01.56 1.71l-4.19 4.11a1 1 0 00-.29.88l.92 5.4-2.4-1.27a1 1 0 00-.94 0l-1.6.85-1.6-.85a1 1 0 00-.93 0l-2.41 1.28.92-5.41a1 1 0 00-.28-.88l-4.2-4.11a1 1 0 01-.26-1 1 1 0 01.82-.71zm-13 8.07a4.41 4.41 0 001.14 1.93c2.67-1.61 1.85-5 1-7a7.39 7.39 0 00-2.14 3.34 3.49 3.49 0 000 1.7zm11.8-21.29c3.94-1.27 5.82-7.61 5.82-7.61a19.24 19.24 0 00-3.1-.58c-2.92.35-5.71 1.92-5.33 6.76a8.42 8.42 0 002.61 1.43zm-7.31 9.94c2.76-1.26 3.91-5.79 3.91-5.79a10.69 10.69 0 00-1.5-.26 12.35 12.35 0 00-1.9-.09 4.42 4.42 0 01-.23.81 3.48 3.48 0 00-1.46 1.75 5.51 5.51 0 00-.31 2.77 6.79 6.79 0 001.49.81zm37.4 13.28a4.41 4.41 0 001.11-1.93 3.57 3.57 0 000-1.72 7.31 7.31 0 00-2.17-3.34c-.83 2.02-1.61 5.38 1.06 6.99zM45.5 19.21a6.79 6.79 0 001.49-.81 5.51 5.51 0 00-.26-2.76 3.53 3.53 0 00-1.46-1.75 5.79 5.79 0 00-2.13-.72 10.69 10.69 0 00-1.5.26s1.1 4.57 3.86 5.78zm-7.31-9.94a8.42 8.42 0 002.61-1.43c.38-4.84-2.41-6.41-5.33-6.76a19.24 19.24 0 00-3.1.58S34.25 8 38.19 9.27zm8.8 32.57l-1.4 1.8a5.82 5.82 0 00-.14 2.78 6.75 6.75 0 001.34.68c2.83-1.27 3.81-6 3.81-6s-.38-.08-1-.15a6.08 6.08 0 00-2.61.89zm1.42-33.08a8.37 8.37 0 00-.17 5.12l1.46 1.75a1.42 1.42 0 01.1.29.65.65 0 00.13-.16c2.48-2.97.44-5.49-1.52-7zm-6.15 35.08a1.92 1.92 0 00.31-.18 3.55 3.55 0 001.42-1.79 8.1 8.1 0 00-.35-5c-1.92 1.54-3.87 4.13-1.38 6.97zm13.37-19a7.1 7.1 0 00-2.64 2.8v2.91a6.06 6.06 0 00.76 1.3c2.79-1.3 2.37-4.98 1.88-6.99zM11.41 43.65l-1.34-1.75a6.08 6.08 0 00-2.64-.91c-.6.07-1 .15-1 .15s1 4.77 3.81 6a6.75 6.75 0 001.34-.68 5.82 5.82 0 00-.14-2.78zM38.99 54h-3v-6a2 2 0 00-2-2h-11a2 2 0 00-2 2v6h-3a2 2 0 00-2 2v3h25v-3a2 2 0 00-2-2zm-25.6-17.17a8.14 8.14 0 00-.35 5 3.45 3.45 0 001.31 1.72h.05c0 .13.08.27.11.41.07-.08.14-.15.2-.23 2.5-2.73.55-5.32-1.32-6.9z",fill:"#fedd0a"}),Object(r.createElement)("path",{d:"M16.18 7.84C15.8 3 18.59 1.43 21.51 1.08a14.84 14.84 0 013 0C21.6 1.44 18.82 3 19.2 7.84a8.42 8.42 0 002.59 1.43 4.81 4.81 0 01-3 0 8.42 8.42 0 01-2.61-1.43zm-7.61.92c-2 1.51-4 4-1.53 7a.65.65 0 00.13.16q.2.22.42.45a5.91 5.91 0 002.4-.61c-2.45-3-.42-5.49 1.54-7a13.57 13.57 0 00-.54-1.51 13.76 13.76 0 00-2.42 1.51zM15.99 56v3h3v-3a2 2 0 012-2h-3a2 2 0 00-2 2zm7-10a2 2 0 00-2 2v6h3v-6a2 2 0 012-2zM4.35 24.86a13.53 13.53 0 00-2.61-1.37 13.32 13.32 0 00-.39 1.37c-.49 2-.91 5.69 1.85 7a4.83 4.83 0 001.79.46 8.25 8.25 0 00.86 0 5.84 5.84 0 00.4-.5c-2.81-1.27-2.39-4.95-1.9-6.96z",fill:"#fff"}),Object(r.createElement)("path",{d:"M59.18 23.14a1 1 0 00-1.29-.59 14.74 14.74 0 00-3.85 2.26 24.35 24.35 0 00-.45-3.4 23.39 23.39 0 00-1.21-4 1 1 0 00.71-.29 5.42 5.42 0 001.9-4.91c-.64-3.56-5.44-5.78-5.65-5.87a1 1 0 00-1.32.5 14.57 14.57 0 00-.85 2.6 26.55 26.55 0 00-2.37-2.12 6.66 6.66 0 00-2.23-5.7C38.99-1.31 32.36.61 32.08.7a1 1 0 00-.59.48 1 1 0 00-.08.76c.08.28 2.09 6.87 6.51 8.3a5.84 5.84 0 001.74.27 7.41 7.41 0 004.15-1.44 22.7 22.7 0 013.1 3 1.48 1.48 0 000 .21 13.38 13.38 0 00-5.58.15 1 1 0 00-.72 1.21c.06.22 1.39 5.34 4.79 6.59a4.42 4.42 0 001.55.28 6.3 6.3 0 003.59-1.31 1.2 1.2 0 00.26-.29 22.46 22.46 0 01.82 2.88 21.37 21.37 0 01.43 3.47 15 15 0 00-2.86-2.35 1 1 0 00-1.38.34c-.11.2-2.81 4.75-1.3 8a5.31 5.31 0 004.07 2.87c-.08.21-.15.42-.24.63a21.75 21.75 0 01-2.25 4 14.51 14.51 0 00-1.26-4 1 1 0 00-.58-.5 1 1 0 00-.76.06c-.2.1-4.9 2.53-5.38 6.11a5.19 5.19 0 001.7 4.37 22.47 22.47 0 01-2.46 1.34A3 3 0 0036.99 45h-6V34.73l4.15 2.2a2.1 2.1 0 00.94.23 2 2 0 002-2.33l-1-5.81 4.2-4.11a2 2 0 00-1.12-3.4l-5.78-.85-2.59-5.26a2 2 0 00-3.6 0l-2.58 5.26-5.77.85a2 2 0 00-1.11 3.4L22.92 29l-1 5.81a2 2 0 00.8 1.94 2 2 0 002.11.15l4.16-2.17V45h-6a3 3 0 00-2.37 1.18 21 21 0 01-2.46-1.35 5.16 5.16 0 001.7-4.36c-.48-3.58-5.18-6-5.38-6.11a1 1 0 00-.76-.06 1 1 0 00-.58.5 14.38 14.38 0 00-1.26 4 21.11 21.11 0 01-2.25-4c-.09-.21-.16-.42-.24-.64a5.26 5.26 0 004.07-2.86c1.51-3.29-1.19-7.84-1.3-8a1 1 0 00-1.38-.34 15 15 0 00-2.86 2.35 21.37 21.37 0 01.43-3.47 22.46 22.46 0 01.82-2.88 1.2 1.2 0 00.26.29 6.3 6.3 0 003.56 1.28 4.42 4.42 0 001.55-.28c3.4-1.25 4.73-6.37 4.79-6.59a1 1 0 00-.72-1.21 13.57 13.57 0 00-5.58-.15 1.48 1.48 0 000-.21 22.7 22.7 0 013.1-3 7.39 7.39 0 004.15 1.44 5.73 5.73 0 001.73-.27c4.43-1.43 6.44-8 6.52-8.3a1 1 0 00-.08-.76 1 1 0 00-.55-.5c-.28-.09-6.89-2-10.51.92a6.66 6.66 0 00-2.23 5.7 26.55 26.55 0 00-2.37 2.12 14.57 14.57 0 00-.8-2.6 1 1 0 00-1.32-.5c-.2.09-5 2.31-5.65 5.87a5.42 5.42 0 001.91 4.88 1 1 0 00.71.29 23.65 23.65 0 00-1.21 4 24.35 24.35 0 00-.44 3.43 14.74 14.74 0 00-3.9-2.26 1 1 0 00-1.29.59c-.08.21-1.89 5.18.19 8.14a5.37 5.37 0 004.71 2.08h.11a1 1 0 00.73-.36c.09-.1.16-.22.25-.33a24.67 24.67 0 001 2.89 23.67 23.67 0 002.4 4.32 14.22 14.22 0 00-4 .19 1 1 0 00-.77 1.18c0 .22 1.15 5.4 4.49 6.8a4.41 4.41 0 001.75.35 6.4 6.4 0 003.43-1.15 1 1 0 00.44-.64 6.59 6.59 0 00.11-1.08l.84.59a23 23 0 003.51 1.97V53h-2a3 3 0 00-3 3v3a1 1 0 001 1h28a1 1 0 001-1v-3a3 3 0 00-3-3h-2v-4.91a23 23 0 003.51-1.94c.29-.19.56-.41.84-.62a7 7 0 00.11 1.11 1 1 0 00.44.64 6.4 6.4 0 003.43 1.15 4.41 4.41 0 001.75-.35c3.34-1.4 4.45-6.58 4.49-6.8a1 1 0 00-.77-1.18 14.22 14.22 0 00-4-.19 23.67 23.67 0 002.4-4.32 24.67 24.67 0 001-2.89c.09.11.16.23.25.33a1 1 0 00.73.33h.11a5.37 5.37 0 004.71-2.08c2.08-2.96.27-7.93.19-8.14zM38.65 6a22.22 22.22 0 013.4 1.82 4.32 4.32 0 01-3.51.53c-2.55-.82-4.18-4.24-4.86-6 1.81-.38 5.57-.88 7.65.81a4.12 4.12 0 011.42 2.71 23.48 23.48 0 00-3.33-1.75 1 1 0 00-1.31.53A1 1 0 0038.65 6zm-20-2.8c2.08-1.71 5.84-1.2 7.65-.83-.68 1.72-2.31 5.14-4.86 6a4.32 4.32 0 01-3.51-.53A22.22 22.22 0 0121.33 6a1 1 0 00.54-1.31 1 1 0 00-1.31-.53 24 24 0 00-3.33 1.75 4.12 4.12 0 011.42-2.73zM5.92 30.41a5.66 5.66 0 01-.58.94 3.27 3.27 0 01-2.71-1.21c-1-1.37-.65-3.75-.26-5.28a8.32 8.32 0 013.62 3.05v.61a4.45 4.45 0 00-.15.9 4.12 4.12 0 00.08.99zm6-15.39c1.25-1.11 3.66-1 5.21-.83-.55 1.47-1.64 3.61-3.21 4.18a3.23 3.23 0 01-2.93-.54 3.27 3.27 0 01.89-2.83zm-4.93-2.45c.29-1.65 2.21-3.11 3.56-3.91a8.35 8.35 0 01.38 4.61 3.81 3.81 0 00-.32.24 4.52 4.52 0 00-1.05 1.37 3.53 3.53 0 01-.56.25h-.01a4.51 4.51 0 01-.95.22 3.26 3.26 0 01-1.05-2.78zm.91 17c.09-1.7 1.78-3.37 3.09-4.32.66 1.42 1.4 3.7.7 5.23a3.23 3.23 0 01-2.43 1.69 3.25 3.25 0 01-1.41-2.63zm5.78 16.29a3.26 3.26 0 01-2.94.41c-1.55-.65-2.55-2.84-3-4.34a8.39 8.39 0 014.58.65 2.92 2.92 0 00.17.36 4.51 4.51 0 001.1 1.32 4.53 4.53 0 01.04 1.57zm3.08-2.36a5 5 0 01-.85-.21h-.08A2.84 2.84 0 0114.16 42c-.8-1.46-.22-3.8.34-5.27 1.32.86 3.16 2.4 3.38 4.06a3.28 3.28 0 01-1.17 2.68zm7.19-8.3l1-5.8a2 2 0 00-.57-1.77l-4.19-4.11 5.77-.85a2 2 0 001.51-1.1l2.52-5.3 2.58 5.27a2 2 0 001.51 1.1l5.77.84-4.19 4.12a2 2 0 00-.57 1.76l1 5.8-5.15-2.73a2 2 0 00-1.88 0zM21.99 48a1 1 0 011-1h14a1 1 0 011 1v5h-16zm20 7a1 1 0 011 1v2h-26v-2a1 1 0 011-1h24zm3.83-13a2.84 2.84 0 01-1.62 1.28h-.07a6.37 6.37 0 01-.86.21 3.28 3.28 0 01-1.17-2.73c.22-1.66 2.06-3.2 3.38-4.06.56 1.45 1.14 3.79.34 5.3zm6.5-.05c-.48 1.5-1.48 3.69-3 4.34a3.26 3.26 0 01-2.94-.41 4.53 4.53 0 01.12-1.6 4.51 4.51 0 001.1-1.32c.07-.12.11-.24.17-.36a8.39 8.39 0 014.55-.7zM46.1 18.37c-1.57-.57-2.66-2.71-3.21-4.18 1.55-.22 4-.28 5.21.83a3.27 3.27 0 01.89 2.81 3.26 3.26 0 01-2.89.54zm4.67 13.8a3.23 3.23 0 01-2.43-1.69c-.7-1.52 0-3.8.71-5.23 1.25.95 3 2.62 3.08 4.29a3.25 3.25 0 01-1.36 2.63zm1.22-16.82a4.75 4.75 0 01-1-.22 3.87 3.87 0 01-.55-.25 4.52 4.52 0 00-1-1.37 3.81 3.81 0 00-.32-.24 8.45 8.45 0 01.38-4.61c1.35.8 3.27 2.25 3.56 3.9a3.27 3.27 0 01-1.07 2.79zm5.36 14.79a3.27 3.27 0 01-2.71 1.21 5.66 5.66 0 01-.58-.94 4.09 4.09 0 00.06-1 5.28 5.28 0 00-.15-.9v-.6a8.37 8.37 0 013.6-3.06c.42 1.54.74 3.92-.22 5.29zM33.99 50a1 1 0 01-1 1h-6a1 1 0 010-2h6a1 1 0 011 1z"})),Object(r.createElement)("h2",null,"Upgrade to Pro"),Object(r.createElement)("p",null,Object(a.__)("Upgrade to the Pro version and get instant full access to all premium extensions and features.","blc")),Object(r.createElement)("button",{className:"ct-button-primary"},Object(a.__)("Upgrade Now","blc")))}}):null]},V=function(){return ctDashboardLocalizations.plugin_data.hide_support_section?null:Object(r.createElement)("div",{className:"ct-support-container"},Object(r.createElement)("h2",null,Object(a.__)("Support","blc")),Object(r.createElement)("p",null,Object(a.__)("Got a question or need some help with the theme? You can always submit a support ticket, and our team will help you out.","blc")),Object(r.createElement)("a",{href:ctDashboardLocalizations.support_url,className:"ct-button","data-hover":"blue",target:"_blank"},Object(a.__)("Submit a Ticket","blc")))};function q(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 H(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?q(Object(n),!0).forEach((function(t){W(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):q(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function W(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $(e,t,n,r,c,o,a){try{var i=e[o](a),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,c)}function Z(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,c=!1,o=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){c=!0,o=e}finally{try{r||null==i.return||i.return()}finally{if(c)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return K(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return K(e,t)}(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 K(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}var G=null,Y=function(e){var t=e.extension,n=e.onExtsSync,c=Z(T(t),2),o=c[0],i=c[1],u=Z(B(t,(function(){n()})),3),s=u[0],f=u[1],d=u[2];return Object(r.createElement)("li",{className:l()({active:!!t.__object})},Object(r.createElement)("h4",{className:"ct-extension-title"},t.config.name,s&&Object(r.createElement)("svg",{width:"15",height:"15",viewBox:"0 0 100 100"},Object(r.createElement)("g",{transform:"translate(50,50)"},Object(r.createElement)("g",{transform:"scale(1)"},Object(r.createElement)("circle",{cx:"0",cy:"0",r:"50",fill:"#687c93"}),Object(r.createElement)("circle",{cx:"0",cy:"-26",r:"12",fill:"#ffffff",transform:"rotate(161.634)"},Object(r.createElement)("animateTransform",{attributeName:"transform",type:"rotate",calcMode:"linear",values:"0 0 0;360 0 0",keyTimes:"0;1",dur:"1s",begin:"0s",repeatCount:"indefinite"})))))),t.config.description&&Object(r.createElement)("div",{className:"ct-extension-description"},t.config.description),Object(r.createElement)("div",{className:"ct-extension-actions"},Object(r.createElement)("button",{className:l()(t.__object?"ct-button":"ct-button-primary"),"data-hover":"white",disabled:s,onClick:function(){f()}},t.__object?Object(a.__)("Deactivate","blc"):Object(a.__)("Activate","blc")),t.readme&&Object(r.createElement)("button",{onClick:function(){return o()},className:"ct-minimal-button ct-instruction"},Object(r.createElement)("svg",{width:"16",height:"16",viewBox:"0 0 24 24"},Object(r.createElement)("path",{d:"M12,2C6.477,2,2,6.477,2,12s4.477,10,10,10s10-4.477,10-10S17.523,2,12,2z M12,17L12,17c-0.552,0-1-0.448-1-1v-4 c0-0.552,0.448-1,1-1h0c0.552,0,1,0.448,1,1v4C13,16.552,12.552,17,12,17z M12.5,9h-1C11.224,9,11,8.776,11,8.5v-1 C11,7.224,11.224,7,11.5,7h1C12.776,7,13,7.224,13,7.5v1C13,8.776,12.776,9,12.5,9z"}))),t.__object&&t.config&&t.config.buttons&&t.config.buttons.map((function(e,t){var n=e.text,c=e.url;return Object(r.createElement)("a",{href:c,className:"ct-button ct-config-btn",dataButton:"white"},n)}))),i,d)},J=function(){var e=Z(Object(r.useState)(!G),2),t=e[0],n=e[1],c=Z(Object(r.useState)(G||[]),2),i=c[0],u=c[1],s=Z(Object(r.useState)(!1),2),f=s[0],d=s[1],m=Z(Object(r.useState)("free"),2),b=m[0],p=m[1],h=function(){var e,t=(e=regeneratorRuntime.mark((function e(){var t,r,c,o,a,i,l,s,f,m=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=m.length>0&&void 0!==m[0]?m[0]:{},r=H({verbose:!1,extension:null,extAction:null},t),c=r.verbose,o=r.extension,a=r.extAction,c&&n(!0),d(!0),e.prev=4,e.next=7,fetch("".concat(wp.ajax.settings.url,"?action=blocksy_extensions_status"),H({method:"POST"},o&&a?{body:JSON.stringify({extension:o,extAction:a})}:{}));case 7:if(200!==(i=e.sent).status){e.next=15;break}return e.next=11,i.json();case 11:l=e.sent,s=l.success,f=l.data,s&&(u(f),G=f);case 15:e.next=19;break;case 17:e.prev=17,e.t0=e.catch(4);case 19:d(!1),n(!1);case 21:case"end":return e.stop()}}),e,null,[[4,17]])})),function(){var t=this,n=arguments;return new Promise((function(r,c){var o=e.apply(t,n);function a(e){$(o,r,c,a,i,"next",e)}function i(e){$(o,r,c,a,i,"throw",e)}a(void 0)}))});return function(){return t.apply(this,arguments)}}();Object(r.useEffect)((function(){h({verbose:!G});var e=function(){h()};return o.a.on("blocksy_exts_sync_exts",e),function(){o.a.off("blocksy_exts_sync_exts",e)}}),[]);var v=Object(r.useMemo)((function(){return Object.values(i).map((function(e,t){return H(H({},e),{},{name:Object.keys(i)[t]})})).find((function(e){return e.config.pro}))}),[i]),y=Object(r.useMemo)((function(){return Object.values(i).map((function(e,t){return H(H({},e),{},{name:Object.keys(i)[t]})})).filter((function(e){return!e.config.hidden})).filter((function(e){var t=e.config;return"free"===b?!t.pro:t.pro}))}),[b,i]);return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("div",{className:"ct-extensions-container"},Object(r.createElement)(A.Transition,{items:t,from:{opacity:0},enter:[{opacity:1}],leave:[{opacity:0}],initial:null,config:function(e,t){return"leave"===t?{duration:300}:{delay:300,duration:300}}},(function(e){return e?function(e){return Object(r.createElement)(A.animated.p,{style:e,className:"ct-loading-text"},Object(r.createElement)("span",null),Object(a.__)("Loading Extensions Status...","blc"))}:function(e){return Object(r.createElement)(A.animated.div,{style:e},Object(r.createElement)(r.Fragment,null,v&&Object(r.createElement)("ul",{className:"ct-extensions-sourse"},["free","pro"].map((function(e){return Object(r.createElement)("li",{key:e,onClick:function(){return p(e)},className:l()({active:e===b})},{free:Object(a.__)("Free Extensions","blc"),pro:Object(a.__)("Pro Extensions","blc")}[e])}))),Object(r.createElement)("ul",{className:l()("ct-extensions-list",{"is-pro":"pro"===b})},y.map((function(e){var t={extension:Y};return o.a.trigger("ct:extensions:card",{CustomComponent:t,extension:e}),Object(r.createElement)(t.extension,{key:e.name,extension:e,extsSyncLoading:f,onExtsSync:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i[e.name].__object=!i[e.name].__object,u(i),h(H(H({},t),{},{extension:e.name}))}})}))),Object(r.createElement)(V,null)))}}))))},X=window.ctDashboardLocalizations.DashboardContext,Q=(X.Provider,X.Consumer,X),ee=function(e){var t=e.children,n=e.activated,c=e.checked,o=e.onChange;return Object(r.createElement)("div",{onClick:function(){return o()},className:l()("ct-checkbox-container",{activated:n})},t,Object(r.createElement)("span",{className:l()("ct-checkbox",{active:c})},Object(r.createElement)("svg",{width:"10",height:"8",viewBox:"0 0 11.2 9.1"},Object(r.createElement)("polyline",{class:"check",points:"1.2,4.8 4.4,7.9 9.9,1.2 "}))))};function te(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 ne(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?te(Object(n),!0).forEach((function(t){re(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):te(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function re(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ce(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,c=!1,o=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){c=!0,o=e}finally{try{r||null==i.return||i.return()}finally{if(c)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return oe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return oe(e,t)}(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 oe(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}var ae=function(e){return({coblocks:"CoBlocks","contact-form-7":"Contact Form 7",woocommerce:"WooCommerce",elementor:"Elementor",brizy:"Brizy",getwid:"Getwid","wpforms-lite":"WPForms - Contact Form","stackable-ultimate-gutenberg-blocks":"Stackable – Gutenberg Blocks"}[e]||e).replace(/\b\w/,(function(e){return e.toUpperCase()}))},ie=function(e){var t=e.demoConfiguration,n=e.setDemoConfiguration,c=e.style,o=Object(r.useContext)(Ye),i=o.currentDemo,l=o.demos_list,u=o.pluginsStatus,s=(o.setCurrentDemo,ce((i||"").split(":"),2)),f=s[0];s[1],l.filter((function(e){return e.name===f||""}));return Object(r.createElement)("div",{style:c},Object(r.createElement)("div",{className:"ct-demo-plugins"},Object(r.createElement)("i",{className:"ct-demo-icon"},Object(r.createElement)("svg",{width:"40",height:"40",viewBox:"0 0 40 40"},Object(r.createElement)("path",{fill:"#0C7AB3",d:"M20,0v7.6c0,0.3-0.2,0.5-0.5,0.5h-1.5c0,0,0,0,0,0c0,0,0,0-0.1,0c0,0,0,0-0.1,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c-0.5-0.7-1.3-1.1-2.1-1.1c-1.5,0-2.6,1.2-2.6,2.6c0,1.5,1.2,2.6,2.6,2.6c0.8,0,1.6-0.4,2.1-1.1c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0.1,0c0,0,0,0,0.1,0c0,0,0,0,0,0h1.5c0,0,0,0,0,0c0.3,0,0.5,0.2,0.5,0.5V20h8.1v-0.8c-0.8-0.7-1.3-1.7-1.3-2.8c0-2,1.7-3.7,3.7-3.7c2,0,3.7,1.7,3.7,3.7c0,1.1-0.5,2.1-1.3,2.8V20H40C40,9,31,0,20,0z"}),Object(r.createElement)("path",{fill:"#3497D3",d:"M20,40v-7.6c0-0.3,0.2-0.5,0.5-0.5h1.5c0,0,0,0,0,0c0,0,0,0,0.1,0c0,0,0,0,0.1,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0.5,0.7,1.3,1.1,2.1,1.1c1.5,0,2.6-1.2,2.6-2.6c0-1.5-1.2-2.6-2.6-2.6c-0.8,0-1.6,0.4-2.1,1.1c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0-0.1,0c0,0,0,0-0.1,0c0,0,0,0,0,0h-1.5c0,0,0,0,0,0c-0.3,0-0.5-0.2-0.5-0.5V20h-8.1v0.8c0.8,0.7,1.3,1.7,1.3,2.8c0,2-1.7,3.7-3.7,3.7c-2,0-3.7-1.7-3.7-3.7c0-1.1,0.5-2.1,1.3-2.8V20H0C0,31,9,40,20,40z"}))),Object(r.createElement)("h2",null,Object(a.__)("Install & Activate Plugins","blc")),Object(r.createElement)("p",null,Object(a.__)("The following plugins are required for this starter site in order to work properly.","blc")),t.plugins.map((function(e){var c=e.plugin,o=e.enabled;return Object(r.createElement)(r.Fragment,{key:c},!u[c]&&Object(r.createElement)(ee,{key:c,checked:o,onChange:function(){return n(ne(ne({},t),{},{plugins:t.plugins.map((function(e){return e.plugin===c?ne(ne({},e),{},{enabled:!o}):e}))}))}},ae(c)),u[c]&&Object(r.createElement)(ee,{activated:!0,checked:!0,onChange:function(){}},ae(c)))}))))},le=function(){var e=Object(r.useContext)(Ye),t=e.currentlyInstalledDemo,n=e.demos_list,c=e.setCurrentDemo,o=e.demo_error;Object(r.useContext)(Q).Link;return Object(r.createElement)("ul",null,n.filter((function(e,t){return n.map((function(e){return e.name})).indexOf(e.name)===t})).map((function(e){return Object(r.createElement)("li",{key:e.name,className:l()("ct-single-demo",{"ct-is-pro":e.is_pro})},Object(r.createElement)("figure",null,Object(r.createElement)("img",{src:e.screenshot}),Object(r.createElement)("section",null,Object(r.createElement)("h3",null,Object(a.__)("Available for","blc")),Object(r.createElement)("div",null,n.filter((function(t){return t.name===e.name||""})).sort((function(e,t){return e.builder<t.builder?-1:e.builder>t.builder?1:0})).map((function(e){var t=e.builder;return Object(r.createElement)("span",{key:t},ae(t)||"Gutenberg")})))),e.is_pro&&Object(r.createElement)("a",{onClick:function(e){return e.preventDefault()},href:"#"},"PRO")),Object(r.createElement)("div",{className:"ct-demo-actions"},Object(r.createElement)("h4",null,e.name),Object(r.createElement)("div",null,Object(r.createElement)("a",{className:"ct-button",target:"_blank",href:e.url},Object(a.__)("Preview","blc")),Object(r.createElement)("button",{className:"ct-button-primary",onClick:function(){return c(e.name)},disabled:!!o},t&&t.demo.indexOf(e.name)>-1?Object(a.__)("Modify","blc"):Object(a.__)("Import","blc")))))})))};function ue(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,c=!1,o=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){c=!0,o=e}finally{try{r||null==i.return||i.return()}finally{if(c)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return se(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return se(e,t)}(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 se(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}var fe=function(e){var t=e.style,n=e.nextStep,c=(Object(r.useContext)(Q).is_child_theme,Object(r.useContext)(Ye)),o=c.setCurrentlyInstalledDemo,i=c.setCurrentDemo,l=c.currentDemo,u=c.demos_list,s=ue(Object(r.useState)(0),2),f=s[0],d=s[1],m=ue(Object(r.useState)("idle"),2),b=m[0],p=m[1],h=ue((l||"").split(":"),2),v=h[0],y=(h[1],u.filter((function(e){return e.name===v}))),O={erase_content:{title:Object(a.__)("Erase content","blc"),query_string:"action=blocksy_demo_erase_content&wp_customize=on"},deactivate_demo_plugins:{title:Object(a.__)("Deactivate demo plugins","blc"),query_string:"action=blocksy_demo_deactivate_plugins&plugins=".concat(y[0].plugins.join(":"))},deregister_current_demo:{title:Object(a.__)("Erase content","blc"),query_string:"action=blocksy_demo_deregister_current_demo"}},j=["erase_content","deactivate_demo_plugins","deregister_current_demo"],g=j[f],_=function(){var e=O[g],t=new EventSource("".concat(ctDashboardLocalizations.ajax_url,"?").concat(e.query_string));t.onmessage=function(e){if("complete"===JSON.parse(e.data).action){if(t&&t.close&&t.close(),f===j.length-1)return void p("done");d(Math.min(j.length-1,f+1))}}};return Object(r.useEffect)((function(){0!==f&&"done"!==b&&_()}),[g]),Object(r.createElement)("div",{className:"ct-modify-demo",style:t},Object(r.createElement)("i",{className:"ct-demo-icon"},Object(r.createElement)("svg",{width:"36",height:"36",viewBox:"0 0 40 40"},Object(r.createElement)("path",{d:"M5.71,40a1,1,0,0,1-1-1V21.59a1,1,0,0,1,1.91,0V39.05A1,1,0,0,1,5.71,40Zm1-31.83V1.07A1,1,0,0,0,5.71,0a1,1,0,0,0-1,1.07v7.1a1,1,0,0,0,1,1.07A1,1,0,0,0,6.67,8.17ZM21,39.05V34.29a1,1,0,1,0-1.9,0v4.76a1,1,0,1,0,1.9,0Zm0-18.14V1a1,1,0,1,0-1.9,0V20.91a1,1,0,1,0,1.9,0ZM35.24,39.05V26.35a1,1,0,0,0-1.91,0v12.7a1,1,0,0,0,1.91,0Zm0-26.25V1a1,1,0,1,0-1.91,0V12.8a1,1,0,1,0,1.91,0Z",transform:"translate(-0.71)",fill:"#dae3e8"}),Object(r.createElement)("path",{d:"M5.71,18.06a5,5,0,1,1,5-5A5,5,0,0,1,5.71,18.06ZM20,30.76a5,5,0,1,1,5-5A5,5,0,0,1,20,30.76Zm14.29-7.93a5,5,0,1,1,5-5A5,5,0,0,1,34.29,22.83Z",transform:"translate(-0.71)",fill:"#0c7ab3"}))),"idle"===b&&Object(r.createElement)("h2",null,Object(a.__)("This starter site is already installed","blc")),"loading"===b&&Object(r.createElement)("h2",null,"Removing starter site..."),"done"===b&&Object(r.createElement)(r.Fragment,null,Object(r.createElement)("h2",null,Object(a.__)("Starter Site Removed","blc")),Object(r.createElement)("div",{className:"ct-modify-actions"},Object(r.createElement)("button",{className:"ct-demo-btn ct-dismiss",onClick:function(e){e.preventDefault(),i("".concat(v,":hide"))}},Object(a.__)("Dismiss","blc")))),"idle"===b&&Object(r.createElement)(r.Fragment,null,Object(r.createElement)("p",null,Object(a.__)("What steps do you want to perform next?","blc")),Object(r.createElement)("div",{className:"ct-modify-actions"},Object(r.createElement)("button",{className:"ct-demo-btn demo-remove",onClick:function(e){p("loading"),e.preventDefault(),_(),o()}},Object(a.__)("Remove","blc")),Object(r.createElement)("button",{className:"ct-demo-btn",onClick:function(e){e.preventDefault(),n()}},Object(a.__)("Reinstall","blc")))))};function de(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 me(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?de(Object(n),!0).forEach((function(t){be(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):de(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function be(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var pe=function(e){var t=e.demoConfiguration,n=e.setDemoConfiguration,c=e.style,o=Object(r.useContext)(Q),i=o.is_child_theme,l=o.child_theme_exists;return Object(r.createElement)("div",{className:"ct-demo-child",style:c},Object(r.createElement)("i",{className:"ct-demo-icon"},Object(r.createElement)("svg",{width:"40",height:"40",viewBox:"0 0 43 41.1"},Object(r.createElement)("path",{fill:"#DBE7EE",d:"M0,39.5c0,0.9,0.7,1.6,1.5,1.6h32.3c0.9,0,1.5-0.7,1.5-1.6V14H0V39.5z"}),Object(r.createElement)("path",{fill:"#BDC8D7",d:"M18.2,41.1h15.6c0.9,0,1.5-0.7,1.5-1.6V14H7.6L8,32.4L18.2,41.1z"}),Object(r.createElement)("path",{fill:"#BDC8D7",d:"M0,15.6V9.8c0-0.9,0.7-1.6,1.5-1.6h32.3c0.9,0,1.5,0.7,1.5,1.6v5.8H0z"}),Object(r.createElement)("path",{fill:"#3497D3",d:"M7.6,31.3c0,0.9,0.7,1.6,1.5,1.6h32.4c0.9,0,1.5-0.7,1.5-1.6V5.8H7.6V31.3z"}),Object(r.createElement)("path",{fill:"#0C7AB3",d:"M7.6,7.4V1.6C7.6,0.7,8.3,0,9.1,0h32.4C42.4,0,43,0.7,43,1.6v5.8H7.6z"}),Object(r.createElement)("rect",{x:"11.2",y:"11",fill:"#44ACDF",width:"16.8",height:"17.9"}),Object(r.createElement)("rect",{x:"31.5",y:"11",fill:"#44ACDF",width:"7.9",height:"17.9"}))),l?Object(r.createElement)("h2",null,Object(a.__)("Activate Child Theme","blc")):Object(r.createElement)("h2",null,Object(a.__)("Install Child Theme","blc")),!i&&Object(r.createElement)(r.Fragment,null,l?Object(r.createElement)("p",null,Object(a.__)("We strongly recommend to activate the child theme, this way you will have freedom to make changes without breaking the parent theme.","blc")):Object(r.createElement)("p",null,Object(a.__)("We strongly recommend to install the child theme, this way you will have freedom to make changes without breaking the parent theme.","blc")),Object(r.createElement)(ee,{checked:t.child_theme,onChange:function(){return n(me(me({},t),{},{child_theme:!t.child_theme}))}},l?Object(a.__)("Activate Child Theme","blc"):Object(a.__)("Install Child Theme","blc"))),i&&Object(a.__)("You already have a child theme properly installed and activated. Move on.","blc"),Object(r.createElement)("a",{href:"https://developer.wordpress.org/themes/advanced-topics/child-themes/",target:"_blank"},Object(a.__)("Learn more about child themes","blc")))};function he(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?he(Object(n),!0).forEach((function(t){ye(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):he(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ye(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Oe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,c=!1,o=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){c=!0,o=e}finally{try{r||null==i.return||i.return()}finally{if(c)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return je(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return je(e,t)}(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 je(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}var ge=function(e){var t=e.demoConfiguration,n=e.setDemoConfiguration,c=e.style,o=Object(r.useContext)(Ye),i=o.currentDemo,u=o.demos_list,s=(o.pluginsStatus,o.setCurrentDemo,Oe((i||"").split(":"),2)),f=s[0],d=(s[1],u.filter((function(e){return e.name===f||""})));return Object(r.createElement)("div",{style:c},d.length>1&&Object(r.createElement)("div",{className:"ct-demo-builder"},Object(r.createElement)("i",{className:"ct-demo-icon"},Object(r.createElement)("svg",{width:"52",height:"40",viewBox:"0 0 52 40"},Object(r.createElement)("path",{fill:"#DBE7EE",d:"M0,38.1C0,39.1,0.9,40,1.8,40h39.3c1.1,0,1.8-0.9,1.8-1.9v-31H0V38.1z"}),Object(r.createElement)("path",{fill:"#CFDBE4",d:"M13.8,14.6v18.8h22.6V14.6H13.8zM34.8,31.9H15.4V16.1h19.4V31.9z"}),Object(r.createElement)("path",{fill:"#BDC8D7",d:"M13.1,15.3L13.1,15.3c0-0.8,0.6-1.4,1.4-1.4l0,0c0.8,0,1.4,0.6,1.4,1.4l0,0c0,0.8-0.6,1.4-1.4,1.4l0,0C13.7,16.8,13.1,16.1,13.1,15.3z M34.1,15.3L34.1,15.3c0-0.8,0.6-1.4,1.4-1.4l0,0c0.8,0,1.4,0.6,1.4,1.4l0,0c0,0.8-0.6,1.4-1.4,1.4l0,0C34.8,16.8,34.1,16.1,34.1,15.3z M13.1,32.7L13.1,32.7c0-0.8,0.6-1.4,1.4-1.4l0,0c0.8,0,1.4,0.6,1.4,1.4l0,0c0,0.8-0.6,1.4-1.4,1.4l0,0C13.7,34.1,13.1,33.5,13.1,32.7z M34.1,32.7L34.1,32.7c0-0.8,0.6-1.4,1.4-1.4l0,0c0.8,0,1.4,0.6,1.4,1.4l0,0c0,0.8-0.6,1.4-1.4,1.4l0,0C34.8,34.1,34.1,33.5,34.1,32.7z M23.3,15.3L23.3,15.3c0-0.8,0.6-1.4,1.4-1.4l0,0c0.8,0,1.4,0.6,1.4,1.4l0,0c0,0.8-0.6,1.4-1.4,1.4l0,0C24,16.8,23.3,16.1,23.3,15.3z M4.2,13.9h5.9v7.9H4.2V13.9zM4.2,23.3h5.9v2.9H4.2V23.3zM0,9V1.9C0,0.9,0.9,0,1.8,0h39.3c1.1,0,1.8,0.9,1.8,1.9V9H0z M42.9,35.4V10.9h-9.3v15.2L42.9,35.4zM7.2,27.6c-1.6,0-3,1.3-3,3c0,1.6,1.3,3,3,3s3-1.3,3-3C10.2,28.9,8.8,27.6,7.2,27.6z"}),Object(r.createElement)("path",{fill:"#0C7AB3",d:"M50,27.8H35.6c-1.1,0-2-0.9-2-2v-18c0-1.1,0.9-2,2-2H50c1.1,0,2,0.9,2,2v18C52,26.9,51.1,27.8,50,27.8z"}),Object(r.createElement)("path",{fill:"#44ACDF",d:"M49,17.5H36.8c-0.7,0-1.2-0.5-1.2-1.2V9.1c0-0.7,0.5-1.2,1.2-1.2H49c0.7,0,1.2,0.5,1.2,1.2v7.3C50.2,17,49.6,17.5,49,17.5z M50.2,20.4v-0.1c0-0.5-0.4-1-1-1H36.5c-0.5,0-1,0.4-1,1v0.1c0,0.5,0.4,1,1,1h12.7C49.7,21.4,50.2,20.9,50.2,20.4z M40.8,25.2h-4.3c-0.5,0-1-0.4-1-1v-0.1c0-0.5,0.4-1,1-1h4.3c0.5,0,1,0.4,1,1v0.1C41.7,24.8,41.3,25.2,40.8,25.2z M49.2,25.2h-4.3c-0.5,0-1-0.4-1-1v-0.1c0-0.5,0.4-1,1-1h4.3c0.5,0,1,0.4,1,1v0.1C50.2,24.8,49.7,25.2,49.2,25.2z"}),Object(r.createElement)("path",{fill:"#C8E6F4",d:"M47.4,11.2h-9.1c-0.2,0-0.5-0.2-0.5-0.4v0c0-0.2,0.2-0.4,0.5-0.4h9.1c0.2,0,0.5,0.2,0.5,0.4v0C47.8,11,47.6,11.2,47.4,11.2z M47.9,14.7L47.9,14.7c0-0.2-0.2-0.5-0.5-0.5h-9.1c-0.2,0-0.4,0.2-0.4,0.4v0c0,0.2,0.2,0.4,0.4,0.4h9.1C47.7,15.1,47.9,14.9,47.9,14.7z"}),Object(r.createElement)("path",{fill:"#FFFFFF",d:"M26.3,20.8h-2.9l-2.9,7.9H23l0.3-0.7h2.8l0.3,0.7h2.7L26.3,20.8z M23.9,25.8l0.8-2.2h0l0.8,2.2H23.9zM46.5,10.7c0,0.8-0.7,1.5-1.5,1.5s-1.5-0.7-1.5-1.5c0-0.8,0.7-1.5,1.5-1.5S46.5,9.9,46.5,10.7zM42.1,14.7c0,0.8-0.7,1.5-1.5,1.5s-1.5-0.7-1.5-1.5s0.7-1.5,1.5-1.5S42.1,13.9,42.1,14.7z"}))),Object(r.createElement)("h2",null,Object(a.__)("Choose Page Builder","blc")),Object(r.createElement)("p",null,Object(a.__)("This starter site can be imported and used with one of these page builders. Please select your prefered one in order to continue.","blc")),Object(r.createElement)("ul",{"data-count":d.length},d.sort((function(e,t){return e.builder<t.builder?-1:e.builder>t.builder?1:0})).map((function(e){var c=e.builder,o=e.plugins;return Object(r.createElement)("li",{className:l()({active:c===(null===t.builder?d[0].builder:t.builder)}),onClick:function(){return n(ve(ve({},t),{},{builder:c,plugins:o.map((function(e){return{plugin:e,enabled:!0}}))}))}},Object(r.createElement)("figure",null,Object(r.createElement)("span",{className:l()("ct-checkbox",{active:c===(null===t.builder?d[0].builder:t.builder)})},Object(r.createElement)("svg",{width:"10",height:"8",viewBox:"0 0 11.2 9.1"},Object(r.createElement)("polyline",{className:"check",points:"1.2,4.8 4.4,7.9 9.9,1.2 "}))),""===c&&Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 150 100"},Object(r.createElement)("path",{d:"M122.5 35.5c-1.7-1.1-4-.7-5.1 1C110.8 46.4 96.8 47 96 47h-.3c-17.4 0-24 14.8-24.3 15.4-.8 1.9.1 4 1.9 4.8.5.2 1 .3 1.5.3 1.4 0 2.7-.8 3.4-2.2.1-.1 4.6-10.3 16.3-11v19c-.5 4.1-2.4 7.3-5.8 9.7-3.6 2.5-8.3 3.8-14.1 3.8-7 0-12.7-2.4-16.9-7.2-4.3-4.8-6.4-11.5-6.4-20.2l.1-20.9c.3-7.7 2.4-13.8 6.4-18.2 4.3-4.8 9.9-7.2 16.9-7.2 5.8 0 10.6 1.3 14.1 3.8 3.6 2.5 5.6 5.9 5.9 10.3v.5c0 2.5 2.1 4.6 4.6 4.6 2.5 0 4.6-2.1 4.6-4.6v-.5c-.7-6.6-3.7-11.9-9.1-15.8-5.4-4-12.2-5.9-20.4-5.9-9.7 0-17.6 3.2-23.5 9.6-5.6 6-8.6 13.8-8.9 23.5 0 .7-.1 1.3-.1 2l.1 18.8h-.1c0 10.7 3 19.2 9 25.5 6 6.4 13.8 9.6 23.5 9.6 8.2 0 14.9-1.9 20.4-5.9 5-3.6 7.9-8.4 8.9-14.3l.2-21c6.1-1.5 14.4-4.8 19.6-12.7 1.3-1.7.8-4-1-5.1z"})),"brizy"===c&&Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 150 100"},Object(r.createElement)("path",{d:"M14.6 36.7L75 0l60.4 36.7L75 73.4 14.6 36.7zm21.7.9L75 61.2l38.8-23.6L75 14 36.3 37.6z",fill:"#181c25"}),Object(r.createElement)("path",{fill:"#a7b2dd",d:"M14.6 63.2l10.8-6.5L75 86.8l49.9-30 10.5 6.4L75 100z"})),"elementor"===c&&Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 150 100"},Object(r.createElement)("path",{d:"M32.5 7.6h17v84.9h-17V7.6zm34 84.9h51v-17h-51v17zm0-34h51v-17h-51v17zm0-51v17h51v-17h-51z"}))),Object(r.createElement)("div",{className:"builder-name"},ae(c)||"Gutenberg"))})))))};function _e(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 Ee(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_e(Object(n),!0).forEach((function(t){we(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_e(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function we(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var xe=function(e){var t=e.demoConfiguration,n=e.setDemoConfiguration,c=(e.currentDemo,e.style);return Object(r.createElement)("div",{style:c},Object(r.createElement)("i",{className:"ct-demo-icon"},Object(r.createElement)("svg",{width:"40",height:"40",viewBox:"0 0 40 40"},Object(r.createElement)("path",{d:"M25,22.67a5,5,0,0,1-10,0H0V36a3.33,3.33,0,0,0,3.33,3.33H36.67A3.33,3.33,0,0,0,40,36V22.67Z",transform:"translate(0 -0.67)",fill:"#bdc8d7"}),Object(r.createElement)("rect",{x:"2.5",y:"14",width:"35",height:"3",rx:"1.5",fill:"#0c7ab3"}),Object(r.createElement)("rect",{x:"5",y:"7",width:"30",height:"3",rx:"1.5",fill:"#3497d3"}),Object(r.createElement)("rect",{x:"7.5",width:"25",height:"3",rx:"1.5",fill:"#44acdf"}))),Object(r.createElement)("h2",null,Object(a.__)("Import Content","blc")),Object(r.createElement)("p",null,Object(a.__)("This will import posts, pages, comments, navigation menus, custom fields, terms and custom posts","blc")),["options","widgets","content"].map((function(e){return Object(r.createElement)(ee,{checked:t.content[e],onChange:function(){return n(Ee(Ee({},t),{},{content:Ee(Ee({},t.content),{},we({},e,!t.content[e]))}))},key:e},e.split("_").map((function(e){return e.replace(/^\w/,(function(e){return e.toUpperCase()}))})).join(" "))})),Object(r.createElement)("div",{className:"ct-demo-erase"},Object(r.createElement)(ee,{checked:t.content.erase_content,onChange:function(){return n(Ee(Ee({},t),{},{content:Ee(Ee({},t.content),{},{erase_content:!t.content.erase_content})}))}},Object(r.createElement)("div",null,Object(a.__)("Clean Install","blc"),Object(r.createElement)("i",null,Object(a.__)("This option will remove the previous imported content and will perform a fresh and clean install.","blc"))))))},Se=function(){var e=Object(r.useContext)(Q),t=e.home_url,n=e.customizer_url;return Object(r.createElement)("div",{className:"ct-install-success"},Object(r.createElement)("h2",null,Object(a.__)("Starter Site Imported Successfully","blc")),Object(r.createElement)("p",null,Object(a.__)("Now you can view your website or start customizing it","blc")),Object(r.createElement)("div",null,Object(r.createElement)("a",{href:n,className:"ct-button"},Object(a.__)("Customize","blc")),Object(r.createElement)("a",{href:t,target:"_blank",className:"ct-button-primary"},Object(a.__)("View site","blc"))))},Ce=function(e,t){var n=e.action;if("complete"===n)return"";if("import_install_child"===n)return Object(a.__)("copying child theme sources","blc");if("import_activate_child"===n)return Object(a.__)("activating child theme","blc");if("install_plugin"===n)return Object(a.sprintf)(Object(a.__)("installing plugin %s","blc"),ae(e.name)||e.name);if("activate_plugin"===n)return Object(a.sprintf)(Object(a.__)("activating plugin %s","blc"),ae(e.name)||e.name);if("download_demo_widgets"===n)return Object(a.__)("downloading demo widgets","blc");if("apply_demo_widgets"===n)return Object(a.__)("installing demo widgets","blc");if("download_demo_options"===n)return Object(a.__)("downloading demo options","blc");if("import_mods_images"===n)return Object(a.__)("importing images from customizer","blc");if("import_customizer_options"===n)return Object(a.__)("import customizer options","blc");if("activate_required_extensions"===n)return Object(a.__)("activating required extensions","blc");if("erase_previous_posts"===n)return Object(a.__)("removing previously installed posts","blc");if("erase_previous_terms"===n)return Object(a.__)("removing previously installed taxonomies","blc");if("erase_default_pages"===n)return Object(a.__)("removing default WordPress pages","blc");if("erase_customizer_settings"===n)return Object(a.__)("resetting customizer options","blc");if("erase_widgets_data"===n)return Object(a.__)("resetting widgets","blc");if("content_installer_progress"===n){if(!e.kind)return"";var r=t.content.preliminary_data["".concat(e.kind,"_count")],c=t.content["".concat(e.kind,"_count")];return"".concat(Math.min(c,r)," of ").concat(r," ").concat({users:Object(a.__)("users","blc"),term:Object(a.__)("terms","blc"),media:Object(a.__)("images","blc"),post:Object(a.__)("posts","blc"),comment:Object(a.__)("comments","blc")}[e.kind])}return""};function ke(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 De(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ke(Object(n),!0).forEach((function(t){ze(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ke(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ze(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ae(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,c=!1,o=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){c=!0,o=e}finally{try{r||null==i.return||i.return()}finally{if(c)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Pe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Pe(e,t)}(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 Pe(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}var Me=function(e){e.preventDefault(),e.returnValue=""},Ne=function(e){var t=e.demoConfiguration,n=e.pluginsStatus,r=e.is_child_theme,c=e.includeMetaSteps,o=[];return void 0!==c&&c&&o.push("register_current_demo"),t.child_theme&&(r||o.push("child_theme")),t.plugins.filter((function(e){var t=e.enabled,r=e.plugin;return!!t&&!n[r]})).length>0&&o.push("plugins"),t.content.erase_content&&o.push("erase_content"),t.content.options&&o.push("options"),t.content.widgets&&o.push("widgets"),t.content.content&&o.push("content"),o.push("install_finish"),o},Le=function(e){var t=e.demoConfiguration,n=e.style,c=function(e){var t=Object(r.useContext)(Ye),n=t.demos_list,c=t.currentDemo,o=(t.setCurrentDemo,t.setInstallerBlockingReleased),i=t.setCurrentlyInstalledDemo,l=t.pluginsStatus,u=Object(r.useContext)(Q),s=(u.home_url,u.customizer_url,u.is_child_theme),f=(u.Link,Ae(Object(r.useState)(!1),2)),d=f[0],m=f[1],b=Ae(Object(r.useState)(0),2),p=b[0],h=b[1],v=Ae((c||"").split(":"),2),y=v[0],O=(v[1],n.filter((function(e){return e.name===y})).sort((function(e,t){return e.builder<t.builder?-1:e.builder>t.builder?1:0}))),j=e.plugins.filter((function(e){var t=e.enabled,n=e.plugin;return t&&!l[n]})).map((function(e){return e.plugin})),g=Ae(Object(r.useState)({register_current_demo:{title:Object(a.__)("Register demo","blc"),query_string:"action=blocksy_demo_register_current_demo&wp_customize=on&demo_name=".concat(c,":").concat(null===e.builder?O[0].builder:e.builder),expected_signals:1},child_theme:{title:Object(a.__)("Child theme","blc"),query_string:"action=blocksy_demo_install_child_theme",expected_signals:3},plugins:{title:Object(a.__)("Required plugins","blc"),query_string:"action=blocksy_demo_activate_plugins&plugins=".concat(j.join(":")),expected_signals:2*j.length+1},fake_step:{title:Object(a.__)("Fake Required plugins","blc"),query_string:"action=blocksy_demo_fake_step",expected_signals:6},erase_content:{title:Object(a.__)("Erase content","blc"),query_string:"action=blocksy_demo_erase_content&wp_customize=on",expected_signals:6},install_finish:{title:Object(a.__)("Final touches","blc"),query_string:"action=blocksy_demo_install_finish&wp_customize=on",expected_signals:1},options:{title:Object(a.__)("Import options","blc"),query_string:"action=blocksy_demo_install_options&wp_customize=on&demo_name=".concat(c,":").concat(null===e.builder?O[0].builder:e.builder),expected_signals:5},widgets:{title:Object(a.__)("Import widgets","blc"),query_string:"action=blocksy_demo_install_widgets&wp_customize=on&demo_name=".concat(c,":").concat(null===e.builder?O[0].builder:e.builder),expected_signals:3},content:{title:Object(a.__)("Import content","blc"),query_string:"action=blocksy_demo_install_content&wp_customize=on&demo_name=".concat(c,":").concat(null===e.builder?O[0].builder:e.builder),expected_signals:50}}),2),_=g[0],E=g[1],w=Ne({demoConfiguration:e,pluginsStatus:l,is_child_theme:s,includeMetaSteps:!0}),x=w[p],S=Ae(Object(r.useState)(0),2),C=S[0],k=S[1],D=Ae(Object(r.useState)(null),2),z=D[0],A=D[1],P=Object(r.useRef)(C),M=Object(r.useRef)(_);Object(r.useEffect)((function(){P.current=C,M.current=_}));var N=function(e){return"content"===e?1===w.length?100:50:w.indexOf("content")>-1?50/(w.length-1):100/w.length},L=w.reduce((function(e,t,n){return n>=p?e:e+N(t)}),0)+100*C/_[x].expected_signals*(N(x)/100),T=function(){var e=_[x],t=new EventSource("".concat(ctDashboardLocalizations.ajax_url,"?").concat(e.query_string));t.onmessage=function(e){var n=JSON.parse(e.data);if(k(P.current+1),"content_installer_progress"===n.action){var r=n.kind;r&&(A(n),E(De(De({},M.current),{},{content:De(De({},M.current.content),{},ze({},"".concat(r,"_count"),M.current.content["".concat(r,"_count")]+1))})))}else A(n);if("get_content_preliminary_data"===n.action){var c=n.data,a=(c.comment_count,c.media_count,c.post_count,c.term_count,c.users,De(De({},n.data),{},{term_count:n.data.terms.length,post_count:n.data.posts.filter((function(e){return"attachment"!==e.post_type})).length,media_count:n.data.posts.filter((function(e){return"attachment"===e.post_type})).length,comment_count:n.data.posts.reduce((function(e,t){return e+(t.comments||[]).length}),0),users_count:Object.keys(n.data.authors).length}));E(De(De({},M.current),{},{content:De(De({},M.current.content),{},{preliminary_data:a,comment_count:0,media_count:0,post_count:0,term_count:0,users_count:0,expected_signals:a.comment_count+a.media_count+a.post_count+a.term_count+a.users_count+3})}))}if("complete"===n.action){if(t&&t.close&&t.close(),p===w.length-1)return m(!0),o(!0),void window.removeEventListener("beforeunload",Me);A(null),k(0),h(Math.min(w.length-1,p+1))}}};return Object(r.useEffect)((function(){d||(A(null),k(0),"fake_step"===x?(console.log("here we go delay before fake_step"),setTimeout((function(){T()}),2e3)):T())}),[x]),Object(r.useEffect)((function(){return window.addEventListener("beforeunload",Me),i({demo:"".concat(c,":").concat(e.builder)}),function(){window.removeEventListener("beforeunload",Me)}}),[]),{isCompleted:d,stepName:x,stepsDescriptors:_,lastMessage:z,progress:L}}(t),o=c.isCompleted,i=c.stepName,l=c.stepsDescriptors,u=c.lastMessage,s=c.progress;return Object(r.createElement)("div",{className:"ct-demo-install",style:n},Object(r.createElement)(A.Transition,{initial:!0,items:o,from:{opacity:0},enter:[{opacity:1}],leave:[{opacity:0}],config:function(e,t){return"leave"===t?{duration:300}:{delay:300,duration:300}}},(function(e){return function(t){return Object(r.createElement)("div",{style:t},e?Object(r.createElement)(Se,null):Object(r.createElement)(r.Fragment,null,Object(r.createElement)("i",{className:"ct-demo-icon"},Object(r.createElement)("svg",{width:"40",height:"40",viewBox:"0 0 50 50"},Object(r.createElement)("path",{class:"g1",d:"M47,38.8c0.3-1,0.5-2,0.5-3.1c0-1.1-0.2-2.1-0.5-3.1l0.2-0.1l1.8-1.7l-1.8-3.1l-2.3,0.7l-0.2,0.1c-1.4-1.5-3.3-2.7-5.4-3.1V25l-0.6-2.4h-3.5L34.5,25v0.3c-2.1,0.5-4,1.6-5.4,3.1l-0.2-0.1l-2.3-0.7l-1.8,3.1l1.7,1.7l0.2,0.1c-0.3,1-0.5,2-0.5,3.1c0,1.1,0.2,2.1,0.5,3.1l-0.2,0.1l-1.8,1.7l1.8,3.1l2.3-0.7l0.2-0.1c1.4,1.5,3.3,2.7,5.4,3.1v0.3l0.6,2.4h3.5l0.6-2.4V46c2.1-0.5,4-1.6,5.4-3.1l0.2,0.1l2.3,0.7l1.8-3.1l-1.7-1.7L47,38.8z M36.9,41.5c-3.3,0-5.9-2.6-5.9-5.9s2.6-5.9,5.9-5.9s5.9,2.6,5.9,5.9S40.1,41.5,36.9,41.5z"}),Object(r.createElement)("path",{class:"g2",d:"M21.2,32.2c0.2-0.8,0.4-1.7,0.4-2.5c0-0.9-0.1-1.7-0.4-2.5l0.3-0.2l1.7-1.7l-1.8-3.1L19.1,23l-0.3,0.2c-1.2-1.2-2.7-2.1-4.4-2.5v-0.3l-0.6-2.4h-3.5l-0.6,2.4v0.3c-1.7,0.4-3.2,1.3-4.4,2.5L5.1,23l-2.3-0.7L1,25.4L2.7,27L3,27.2c-0.2,0.8-0.4,1.7-0.4,2.5c0,0.9,0.1,1.7,0.4,2.5l-0.3,0.1L1,34.1l1.8,3.1l2.3-0.7l0.3-0.1c1.2,1.2,2.7,2.1,4.4,2.5v0.3l0.6,2.4h3.5l0.6-2.4v-0.3c1.7-0.4,3.2-1.3,4.4-2.5l0.3,0.1l2.3,0.7l1.8-3.1l-1.7-1.7L21.2,32.2z M12.1,34.4c-2.6,0-4.7-2.1-4.7-4.7S9.5,25,12.1,25s4.7,2.1,4.7,4.7S14.7,34.4,12.1,34.4z"}),Object(r.createElement)("path",{class:"g3",d:"M37.7,15.7c0.2-0.8,0.4-1.7,0.4-2.5c0-0.9-0.1-1.7-0.4-2.5l0.3-0.2l1.7-1.7l-1.8-3.1l-2.3,0.7l-0.3,0.2c-1.2-1.2-2.7-2.1-4.4-2.5V3.8l-0.6-2.4h-3.5l-0.6,2.4v0.3c-1.7,0.4-3.2,1.3-4.4,2.5l-0.3-0.2l-2.3-0.7l-1.8,3.1l1.7,1.7l0.3,0.2c-0.2,0.8-0.4,1.7-0.4,2.5c0,0.9,0.1,1.7,0.4,2.5l-0.3,0.1l-1.7,1.7l1.8,3.1l2.3-0.7l0.3-0.1c1.2,1.2,2.7,2.1,4.4,2.5v0.3l0.6,2.4h3.5l0.6-2.4v-0.3c1.7-0.4,3.2-1.3,4.4-2.5l0.3,0.1l2.3,0.7l1.8-3.1L38,15.9L37.7,15.7z M28.6,17.9c-2.6,0-4.7-2.1-4.7-4.7s2.1-4.7,4.7-4.7s4.7,2.1,4.7,4.7S31.2,17.9,28.6,17.9z"}))),Object(r.createElement)("h2",null,Object(a.__)("Installing","blc"),"..."),Object(r.createElement)("p",null,Object(a.__)("Please be patient and don't refresh this page, the import process may take a while, this also depends on your server.","blc")),Object(r.createElement)("div",{className:"ct-progress-info"},l[i].title,u&&Ce(u,l)?": ".concat(Ce(u,l)):"",Object(r.createElement)("span",null,Math.round(s),"%")),Object(r.createElement)("div",{style:{"--progress":"".concat(s,"%")},className:"ct-installer-progress"},Object(r.createElement)("div",null))))}})))};function Te(e){return function(e){if(Array.isArray(e))return Ue(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Re(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.")}()}function Ie(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,c=!1,o=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){c=!0,o=e}finally{try{r||null==i.return||i.return()}finally{if(c)throw o}}return n}(e,t)||Re(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 Re(e,t){if(e){if("string"==typeof e)return Ue(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)?Ue(e,t):void 0}}function Ue(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}var Fe=function(e){e.location,e.navigate;var t=Ie(Object(r.useState)(!0),2),n=(t[0],t[1],Object(r.useContext)(Ye)),c=n.installerBlockingReleased,o=n.demos_list,i=n.currentDemo,u=n.pluginsStatus,s=n.currentlyInstalledDemo,f=n.setCurrentDemo,d=Object(r.useContext)(Q).is_child_theme,m=Ie(Object(r.useState)(s),2),b=m[0],p=m[1],h=Ie(Object(r.useState)({builder:"",child_theme:!1,plugins:[],content:{options:!0,widgets:!0,content:!0,erase_content:!0}}),2),v=h[0],y=h[1],O=Ie(Object(r.useState)(0),2),j=O[0],g=O[1],_=Ie((i||"").split(":"),2),E=_[0],w=(_[1],["modify_demo","child_theme","builder","plugins","content","installer"].filter((function(e){if(!i)return!1;if("modify_demo"===e){if(!b)return!1;if(-1===b.demo.indexOf(E))return!1}if("child_theme"===e&&d)return!1;var t=o.filter((function(e){return e.name===E})).sort((function(e,t){return e.builder<t.builder?-1:e.builder>t.builder?1:0}));return("plugins"!==e||0!==t.reduce((function(e,t){return[].concat(Te(e),Te(t.plugins||[]))}),[]).filter((function(e){return!u[e]})).length)&&("builder"!==e||t.length>1)}))),x=w[j];return Object(r.useEffect)((function(){if(E&&!(i.indexOf(":hide")>-1)){var e=o.filter((function(e){return e.name===E})).sort((function(e,t){return e.builder<t.builder?-1:e.builder>t.builder?1:0}));g(0),p(s),y({builder:1===e.length?e[0].builder:null,child_theme:!0,plugins:e[0].plugins.map((function(e){return{plugin:e,enabled:!0}})),content:{options:!0,widgets:!0,content:!0,erase_content:!0}})}}),[i]),Object(r.createElement)(M,{items:i,isVisible:function(e){return e&&-1===e.indexOf(":hide")},className:l()("ct-demo-modal",{"ct-demo-installer":"installer"===x||"modify_demo"===x}),onDismiss:function(){("installer"!==x||c)&&f("".concat(E,":hide"))},render:function(){return Object(r.createElement)("div",{className:"ct-modal-content ct-demo-step-container"},Object(r.createElement)("div",{className:"ct-current-step"},Object(r.createElement)(A.Transition,{items:x,from:{opacity:0},enter:{opacity:1},leave:{opacity:0},initial:!1,config:function(e,t){return"leave"===t?{duration:150}:{delay:150,duration:150}}},(function(e){return function(t){return Object(r.createElement)(r.Fragment,null,"modify_demo"===e&&Object(r.createElement)(fe,{demoConfiguration:v,nextStep:function(){g(Math.min(j+1,w.length-1))},style:t}),"child_theme"===e&&Object(r.createElement)(pe,{style:t,demoConfiguration:v,setDemoConfiguration:y}),"plugins"===e&&Object(r.createElement)(ie,{demoConfiguration:v,style:t,setDemoConfiguration:y}),"builder"===e&&Object(r.createElement)(ge,{style:t,demoConfiguration:v,setDemoConfiguration:y}),"content"===e&&Object(r.createElement)(xe,{style:t,demoConfiguration:v,setDemoConfiguration:y}),"installer"===e&&Object(r.createElement)(Le,{style:t,demoConfiguration:v}))}}))),"installer"!==x&&"modify_demo"!==x&&Object(r.createElement)("div",{className:"ct-demo-step-controls"},j>0&&Object(r.createElement)("button",{className:"ct-demo-btn demo-back-btn",onClick:function(){g(Math.max(j-1,0))}},Object(a.__)("Back","blc")),w.length>2&&Object(r.createElement)("ul",{className:"ct-steps-pills"},w.map((function(e,t){return t===w.length-1?null:Object(r.createElement)("li",{className:l()({active:e===x}),key:e},t+1)}))),Object(r.createElement)("button",{className:"ct-demo-btn demo-main-btn",disabled:"content"===x&&0===Ne({demoConfiguration:v,pluginsStatus:u,is_child_theme:d}).length,onClick:function(){g(Math.min(j+1,w.length-1))}},"content"===x?Object(a.__)("Install","blc"):Object(a.__)("Next","blc"))))}})},Be=n(7),Ve=n.n(Be);function qe(e,t,n,r,c,o,a){try{var i=e[o](a),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,c)}function He(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,c=!1,o=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){c=!0,o=e}finally{try{r||null==i.return||i.return()}finally{if(c)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return We(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return We(e,t)}(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 We(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}var $e=function(){var e=He(Object(r.useState)(!1),2),t=e[0],n=e[1],c=He(Object(r.useState)(!1),2),o=c[0],i=c[1],l=He(Object(r.useState)(""),2),u=l[0],s=l[1],f=He(Object(r.useState)(""),2),d=f[0],m=f[1],b=He(Object(r.useState)("coblocks,elementor,contact-form-7"),2),p=b[0],h=b[1],v=He(Object(r.useState)(""),2),y=v[0],O=v[1],j=He(Object(r.useState)(!1),2),g=j[0],_=j[1],E=function(){var e,t=(e=regeneratorRuntime.mark((function e(){var t,r,c,o,a,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n(!0),(t=new FormData).append("action","blocksy_demo_export"),t.append("name",u),t.append("is_pro",g),t.append("url",y),t.append("builder",d),t.append("plugins",p),t.append("wp_customize","on"),e.prev=9,e.next=12,fetch(ctDashboardLocalizations.ajax_url,{method:"POST",body:t});case 12:if(200!==(r=e.sent).status){e.next=20;break}return e.next=16,r.json();case 16:c=e.sent,o=c.success,a=c.data,o&&(i=new Blob([JSON.stringify(a.demo)],{type:"text/plain;charset=utf-8"}),Ve.a.saveAs(i,"".concat(u,".json")));case 20:e.next=24;break;case 22:e.prev=22,e.t0=e.catch(9);case 24:n(!1);case 25:case"end":return e.stop()}}),e,null,[[9,22]])})),function(){var t=this,n=arguments;return new Promise((function(r,c){var o=e.apply(t,n);function a(e){qe(o,r,c,a,i,"next",e)}function i(e){qe(o,r,c,a,i,"throw",e)}a(void 0)}))});return function(){return t.apply(this,arguments)}}();return ct_localizations.is_dev_mode?Object(r.createElement)("div",{className:"ct-export"},Object(r.createElement)("button",{className:"ct-button",onClick:function(e){i(!0)}},Object(a.__)("Site export")),Object(r.createElement)(M,{items:o,className:"ct-site-export-modal",onDismiss:function(){return i(!1)},render:function(){return Object(r.createElement)("div",{className:"ct-site-export"},Object(r.createElement)("label",null,Object(a.__)("Name","blc"),Object(r.createElement)("input",{type:"text",placeholder:Object(a.__)("Name","blc"),value:u,onChange:function(e){var t=e.target.value;return s(t)}})),Object(r.createElement)("label",null,Object(a.__)("Preview URL","blc"),Object(r.createElement)("input",{type:"text",placeholder:Object(a.__)("Preview URL","blc"),value:y,onChange:function(e){var t=e.target.value;return O(t)}})),Object(r.createElement)("label",null,Object(a.__)("PRO","blc"),Object(r.createElement)("input",{type:"checkbox",value:g,onChange:function(e){e.target.value;return _(!g)}})),Object(r.createElement)("label",null,Object(a.__)("Builder","blc"),Object(r.createElement)("input",{type:"text",placeholder:Object(a.__)("Builder","blc"),value:d,onChange:function(e){var t=e.target.value;return m(t)}})),Object(r.createElement)("label",null,Object(a.__)("Plugins","blc"),Object(r.createElement)("textarea",{placeholder:Object(a.__)("Plugins","blc"),value:p,onChange:function(e){var t=e.target.value;return h(t)}})),Object(r.createElement)("button",{className:"ct-button",disabled:t,onClick:function(){return E()}},t?Object(a.__)("Loading...","blc"):Object(a.__)("Export site","blc")))}})):null};function Ze(e,t,n,r,c,o,a){try{var i=e[o](a),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,c)}function Ke(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,c=!1,o=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){c=!0,o=e}finally{try{r||null==i.return||i.return()}finally{if(c)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ge(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ge(e,t)}(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 Ge(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}var Ye=Object(r.createContext)({demos:[]}),Je=null,Xe=null,Qe=function(e){e.children,e.path,e.location;var t=Ke(Object(r.useState)(!Je),2),n=t[0],c=t[1],o=Ke(Object(r.useState)(Je||[]),2),i=o[0],l=o[1],u=Ke(Object(r.useState)(Xe||{}),2),s=u[0],f=u[1],d=Ke(Object(r.useState)(null),2),m=d[0],b=d[1],p=Ke(Object(r.useState)(null),2),h=p[0],v=p[1],y=Ke(Object(r.useState)(!1),2),O=y[0],j=y[1],g=Ke(Object(r.useState)({builder:""}),2),_=(g[0],g[1],Ke(Object(r.useState)(!1),2)),E=_[0],w=_[1],x=function(){var e,t=(e=regeneratorRuntime.mark((function e(){var t,n,r,o,a,i=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i.length>0&&void 0!==i[0]&&i[0]&&c(!0),(t=new FormData).append("action","blocksy_demo_list"),e.prev=4,e.next=7,fetch(ctDashboardLocalizations.ajax_url,{method:"POST",body:t});case 7:if(200!==(n=e.sent).status){e.next=15;break}return e.next=11,n.json();case 11:r=e.sent,o=r.success,a=r.data,o&&(l(a.demos),f(a.active_plugins),v(a.current_installed_demo),j(a.demo_error),Xe=a.active_plugins,Je=a.demos,a.demo_error);case 15:e.next=19;break;case 17:e.prev=17,e.t0=e.catch(4);case 19:c(!1);case 20:case"end":return e.stop()}}),e,null,[[4,17]])})),function(){var t=this,n=arguments;return new Promise((function(r,c){var o=e.apply(t,n);function a(e){Ze(o,r,c,a,i,"next",e)}function i(e){Ze(o,r,c,a,i,"throw",e)}a(void 0)}))});return function(){return t.apply(this,arguments)}}();return Object(r.useEffect)((function(){x(!Je)}),[]),Object(r.createElement)("div",{className:"ct-demos-list-container"},O&&Object(r.createElement)("div",{className:"ct-demo-notification",dangerouslySetInnerHTML:{__html:O}}),Object(r.createElement)(A.Transition,{items:n,from:{opacity:0},enter:[{opacity:1}],leave:[{opacity:0}],config:function(e,t){return"leave"===t?{duration:300}:{delay:300,duration:300}}},(function(e){return e?function(e){return Object(r.createElement)(A.animated.p,{style:e,className:"ct-loading-text"},Object(r.createElement)("span",null),Object(a.__)("Loading Starter Sites...","blc"))}:0===i.length?function(e){return Object(r.createElement)(A.animated.div,{style:e},Object(r.createElement)("div",{className:"ct-demo-notification",dangerouslySetInnerHTML:{__html:Object(a.__)("Connection to <b>demo.creativethemes.com</b> server didn't worked -- this is required for downloading the starter sites. You need to contact your hosting provider to figure out why your server can't reach to our server.")}}),Object(r.createElement)(V,null))}:function(e){return Object(r.createElement)(A.animated.div,{style:e},Object(r.createElement)(r.Fragment,null,Object(r.createElement)(Ye.Provider,{value:{demo_error:O,demos_list:i.filter((function(e){return!e.dev||ct_localizations.is_dev_mode})),currentDemo:m,pluginsStatus:s,installerBlockingReleased:E,setInstallerBlockingReleased:w,setCurrentDemo:b,currentlyInstalledDemo:h,setCurrentlyInstalledDemo:v}},Object(r.createElement)(le,null),Object(r.createElement)(Fe,null),Object(r.createElement)($e,null)),Object(r.createElement)(V,null)))}})))};function et(e,t,n,r,c,o,a){try{var i=e[o](a),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,c)}var tt=function(){var e=function(){var e,t=(e=regeneratorRuntime.mark((function e(){var t,n,r,c,o,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(t=new FormData).append("action","blocksy_fs_connect_again"),e.prev=2,e.next=5,fetch(ctDashboardLocalizations.ajax_url,{method:"POST",body:t});case 5:if(200!==(n=e.sent).status){e.next=13;break}return e.next=9,n.json();case 9:r=e.sent,c=r.success,r.data,c&&((o=document.createElement("div")).innerHTML=ctDashboardLocalizations.plugin_data.connect_template,a=o.querySelector("form"),document.body.appendChild(a),a.submit());case 13:e.next=17;break;case 15:e.prev=15,e.t0=e.catch(2);case 17:case"end":return e.stop()}}),e,null,[[2,15]])})),function(){var t=this,n=arguments;return new Promise((function(r,c){var o=e.apply(t,n);function a(e){et(o,r,c,a,i,"next",e)}function i(e){et(o,r,c,a,i,"throw",e)}a(void 0)}))});return function(){return t.apply(this,arguments)}}();return Object(r.createElement)("div",{className:"ct-freemius-optin-message"},Object(r.createElement)("i",null,Object(r.createElement)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},Object(r.createElement)("path",{d:"M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"}),Object(r.createElement)("path",{d:"M13.73 21a2 2 0 0 1-3.46 0"}))),Object(r.createElement)("h2",null,Object(a.__)("Stay Updated","blc")),Object(r.createElement)("p",null,Object(a.__)("Never miss an important update - opt in to our security & feature updates notifications, and non-sensitive diagnostic tracking.","blc")),Object(r.createElement)("button",{className:"ct-button-primary",onClick:function(t){t.preventDefault(),e()}},Object(a.__)("Allow & Continue","blc")))};function nt(e,t,n,r,c,o,a){try{var i=e[o](a),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,c)}function rt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,c=!1,o=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){c=!0,o=e}finally{try{r||null==i.return||i.return()}finally{if(c)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return ct(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ct(e,t)}(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 ct(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}var ot=function(){var e=rt(Object(r.useState)(ctDashboardLocalizations.plugin_data.has_beta_consent),2),t=e[0],n=e[1],c=rt(Object(r.useState)(!1),2),o=c[0],i=c[1],l=function(){var e,r=(e=regeneratorRuntime.mark((function e(){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!o){e.next=2;break}return e.abrupt("return");case 2:return n((function(e){return!e})),i(!0),(r=new FormData).append("action","blocksy_toggle_has_beta_consent"),e.next=8,fetch(ctDashboardLocalizations.ajax_url,{method:"POST",body:r});case 8:e.sent,window.ctDashboardLocalizations.plugin_data.has_beta_consent=!t,i(!1);case 11:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,c){var o=e.apply(t,n);function a(e){nt(o,r,c,a,i,"next",e)}function i(e){nt(o,r,c,a,i,"throw",e)}a(void 0)}))});return function(){return r.apply(this,arguments)}}();return Object(r.createElement)("div",{className:"ct-beta-consent"},Object(r.createElement)("h2",{onClick:function(){return l()}},Object(a.__)("Receive βeta Updates","blc"),Object(r.createElement)(A.Switch,{value:t?"yes":"no",onChange:function(){}})),Object(r.createElement)("p",null,Object(a.__)("Receive beta updates for Blocksy theme and companion and help us test the new versions. Please note that installing beta versions is not recommended on production sites.","blc")))};o.a.on("ct:dashboard:routes",(function(e){e.push({Component:function(){return Object(r.createElement)(J,null)},path:"/extensions"}),"yes"===ctDashboardLocalizations.plugin_data.has_demo_install&&e.push({Component:function(e){return Object(r.createElement)(Qe,e)},path:"/demos"})})),o.a.on("ct:dashboard:navigation-links",(function(e){"yes"===ctDashboardLocalizations.plugin_data.has_demo_install&&e.push({text:Object(a.__)("Starter Sites","blc"),path:"demos",getProps:function(e){var t=e.isPartiallyCurrent;e.isCurrent;return t?{"aria-current":"page"}:{}}}),e.push({text:Object(a.__)("Extensions","blc"),path:"/extensions"})})),o.a.on("ct:dashboard:home:before",(function(e){ctDashboardLocalizations.plugin_data.is_anonymous&&(e.content=Object(r.createElement)(tt,null))})),o.a.on("ct:dashboard:home:after",(function(e){ctDashboardLocalizations.plugin_data.hide_beta_updates||(e.content=Object(r.createElement)(ot,null))})),o.a.on("ct:dashboard:heading:after",(function(e){ctDashboardLocalizations.plugin_data.is_pro&&(e.content=Object(r.createElement)("span",null,"PRO"))}))}]);
3
  Copyright (c) 2017 Jed Watson.
4
  Licensed under the MIT License (MIT), see
5
  http://jedwatson.github.io/classnames
6
+ */!function(){"use strict";var n={}.hasOwnProperty;function c(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var o=typeof r;if("string"===o||"number"===o)e.push(r);else if(Array.isArray(r)&&r.length){var a=c.apply(null,r);a&&e.push(a)}else if("object"===o)for(var i in r)n.call(r,i)&&r[i]&&e.push(i)}}return e.join(" ")}e.exports?(c.default=c,e.exports=c):void 0===(r=function(){return c}.apply(t,[]))||(e.exports=r)}()},function(e,t){e.exports=window.blocksyOptions},function(e,t){e.exports=window.ctEvents},function(e,t){e.exports=window.React},function(e,t,n){var r,c,o=n(11),a=n(12),i=(c=[],{activateTrap:function(e){if(c.length>0){var t=c[c.length-1];t!==e&&t.pause()}var n=c.indexOf(e);-1===n||c.splice(n,1),c.push(e)},deactivateTrap:function(e){var t=c.indexOf(e);-1!==t&&c.splice(t,1),c.length>0&&c[c.length-1].unpause()}});function l(e){return setTimeout(e,0)}e.exports=function(e,t){var n=document,c="string"==typeof e?n.querySelector(e):e,u=a({returnFocusOnDeactivate:!0,escapeDeactivates:!0},t),s={firstTabbableNode:null,lastTabbableNode:null,nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1},f={activate:function(e){if(s.active)return;g(),s.active=!0,s.paused=!1,s.nodeFocusedBeforeActivation=n.activeElement;var t=e&&e.onActivate?e.onActivate:u.onActivate;t&&t();return d(),f},deactivate:m,pause:function(){if(s.paused||!s.active)return;s.paused=!0,b()},unpause:function(){if(!s.paused||!s.active)return;s.paused=!1,g(),d()}};return f;function m(e){if(s.active){clearTimeout(r),b(),s.active=!1,s.paused=!1,i.deactivateTrap(f);var t=e&&void 0!==e.onDeactivate?e.onDeactivate:u.onDeactivate;return t&&t(),(e&&void 0!==e.returnFocus?e.returnFocus:u.returnFocusOnDeactivate)&&l((function(){var e;_((e=s.nodeFocusedBeforeActivation,p("setReturnFocus")||e))})),f}}function d(){if(s.active)return i.activateTrap(f),r=l((function(){_(h())})),n.addEventListener("focusin",O,!0),n.addEventListener("mousedown",v,{capture:!0,passive:!1}),n.addEventListener("touchstart",v,{capture:!0,passive:!1}),n.addEventListener("click",j,{capture:!0,passive:!1}),n.addEventListener("keydown",y,{capture:!0,passive:!1}),f}function b(){if(s.active)return n.removeEventListener("focusin",O,!0),n.removeEventListener("mousedown",v,!0),n.removeEventListener("touchstart",v,!0),n.removeEventListener("click",j,!0),n.removeEventListener("keydown",y,!0),f}function p(e){var t=u[e],r=t;if(!t)return null;if("string"==typeof t&&!(r=n.querySelector(t)))throw new Error("`"+e+"` refers to no known node");if("function"==typeof t&&!(r=t()))throw new Error("`"+e+"` did not return a node");return r}function h(){var e;if(!(e=null!==p("initialFocus")?p("initialFocus"):c.contains(n.activeElement)?n.activeElement:s.firstTabbableNode||p("fallbackFocus")))throw new Error("Your focus-trap needs to have at least one focusable element");return e}function v(e){c.contains(e.target)||(u.clickOutsideDeactivates?m({returnFocus:!o.isFocusable(e.target)}):u.allowOutsideClick&&u.allowOutsideClick(e)||e.preventDefault())}function O(e){c.contains(e.target)||e.target instanceof Document||(e.stopImmediatePropagation(),_(s.mostRecentlyFocusedNode||h()))}function y(e){if(!1!==u.escapeDeactivates&&function(e){return"Escape"===e.key||"Esc"===e.key||27===e.keyCode}(e))return e.preventDefault(),void m();(function(e){return"Tab"===e.key||9===e.keyCode})(e)&&function(e){if(g(),e.shiftKey&&e.target===s.firstTabbableNode)return e.preventDefault(),void _(s.lastTabbableNode);if(!e.shiftKey&&e.target===s.lastTabbableNode)e.preventDefault(),_(s.firstTabbableNode)}(e)}function j(e){u.clickOutsideDeactivates||c.contains(e.target)||u.allowOutsideClick&&u.allowOutsideClick(e)||(e.preventDefault(),e.stopImmediatePropagation())}function g(){var e=o(c);s.firstTabbableNode=e[0]||h(),s.lastTabbableNode=e[e.length-1]||h()}function _(e){e!==n.activeElement&&(e&&e.focus?(e.focus(),s.mostRecentlyFocusedNode=e,function(e){return e.tagName&&"input"===e.tagName.toLowerCase()&&"function"==typeof e.select}(e)&&e.select()):_(h()))}}},function(e,t,n){(function(n){var r,c,o;c=[],void 0===(o="function"==typeof(r=function(){"use strict";function t(e,t,n){var r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){a(r.response,t,n)},r.onerror=function(){console.error("could not download file")},r.send()}function r(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return 200<=t.status&&299>=t.status}function c(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(n){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var o="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof n&&n.global===n?n:void 0,a=o.saveAs||("object"!=typeof window||window!==o?function(){}:"download"in HTMLAnchorElement.prototype?function(e,n,a){var i=o.URL||o.webkitURL,l=document.createElement("a");n=n||e.name||"download",l.download=n,l.rel="noopener","string"==typeof e?(l.href=e,l.origin===location.origin?c(l):r(l.href)?t(e,n,a):c(l,l.target="_blank")):(l.href=i.createObjectURL(e),setTimeout((function(){i.revokeObjectURL(l.href)}),4e4),setTimeout((function(){c(l)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,n,o){if(n=n||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(function(e,t){return void 0===t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}(e,o),n);else if(r(e))t(e,n,o);else{var a=document.createElement("a");a.href=e,a.target="_blank",setTimeout((function(){c(a)}))}}:function(e,n,r,c){if((c=c||open("","_blank"))&&(c.document.title=c.document.body.innerText="downloading..."),"string"==typeof e)return t(e,n,r);var a="application/octet-stream"===e.type,i=/constructor/i.test(o.HTMLElement)||o.safari,l=/CriOS\/[\d]+/.test(navigator.userAgent);if((l||a&&i)&&"object"==typeof FileReader){var u=new FileReader;u.onloadend=function(){var e=u.result;e=l?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),c?c.location.href=e:location=e,c=null},u.readAsDataURL(e)}else{var s=o.URL||o.webkitURL,f=s.createObjectURL(e);c?c.location=f:location.href=f,c=null,setTimeout((function(){s.revokeObjectURL(f)}),4e4)}});o.saveAs=a.saveAs=a,e.exports=a})?r.apply(t,c):r)||(e.exports=o)}).call(this,n(13))},function(e,t,n){e.exports=n(9)()},function(e,t,n){"use strict";var r=n(10);function c(){}function o(){}o.resetWarningCache=c,e.exports=function(){function e(e,t,n,c,o,a){if(a!==r){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:c};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t){var n=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'],r=n.join(","),c="undefined"==typeof Element?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector;function o(e,t){t=t||{};var n,o,i,l=[],f=[],m=e.querySelectorAll(r);for(t.includeContainer&&c.call(e,r)&&(m=Array.prototype.slice.apply(m)).unshift(e),n=0;n<m.length;n++)a(o=m[n])&&(0===(i=u(o))?l.push(o):f.push({documentOrder:n,tabIndex:i,node:o}));return f.sort(s).map((function(e){return e.node})).concat(l)}function a(e){return!(!i(e)||function(e){return function(e){return f(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t=function(e){for(var t=0;t<e.length;t++)if(e[t].checked)return e[t]}(e.ownerDocument.querySelectorAll('input[type="radio"][name="'+e.name+'"]'));return!t||t===e}(e)}(e)||u(e)<0)}function i(e){return!(e.disabled||function(e){return f(e)&&"hidden"===e.type}(e)||function(e){return null===e.offsetParent||"hidden"===getComputedStyle(e).visibility}(e))}o.isTabbable=function(e){if(!e)throw new Error("No node provided");return!1!==c.call(e,r)&&a(e)},o.isFocusable=function(e){if(!e)throw new Error("No node provided");return!1!==c.call(e,l)&&i(e)};var l=n.concat("iframe").join(",");function u(e){var t=parseInt(e.getAttribute("tabindex"),10);return isNaN(t)?function(e){return"true"===e.contentEditable}(e)?0:e.tabIndex:t}function s(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex}function f(e){return"INPUT"===e.tagName}e.exports=o},function(e,t){e.exports=function(){for(var e={},t=0;t<arguments.length;t++){var r=arguments[t];for(var c in r)n.call(r,c)&&(e[c]=r[c])}return e};var n=Object.prototype.hasOwnProperty},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";n.r(t);var r=n(0),c=n(4),o=n.n(c),a=n(1),i=n(2),l=n.n(i),u=n(5),s=n.n(u);n(8);function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m(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}var d=function(e){e.initialState,e.getInitialState,e.refs,e.getRefs,e.didMount,e.didUpdate,e.willUnmount,e.getSnapshotBeforeUpdate,e.shouldUpdate,e.render;return 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}(e,["initialState","getInitialState","refs","getRefs","didMount","didUpdate","willUnmount","getSnapshotBeforeUpdate","shouldUpdate","render"])},b=function(e){function t(){var n,r;f(this,t);for(var c=arguments.length,o=Array(c),a=0;a<c;a++)o[a]=arguments[a];return n=r=m(this,e.call.apply(e,[this].concat(o))),p.call(r),m(r,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),t.prototype.getArgs=function(){var e=this.state,t=this.props,n=this._setState,r=this._forceUpdate,c=this._refs;return{state:e,props:d(t),refs:c,setState:n,forceUpdate:r}},t.prototype.componentDidMount=function(){this.props.didMount&&this.props.didMount(this.getArgs())},t.prototype.shouldComponentUpdate=function(e,t){return!this.props.shouldUpdate||this.props.shouldUpdate({props:this.props,state:this.state,nextProps:d(e),nextState:t})},t.prototype.componentWillUnmount=function(){this.props.willUnmount&&this.props.willUnmount({state:this.state,props:d(this.props),refs:this._refs})},t.prototype.componentDidUpdate=function(e,t,n){this.props.didUpdate&&this.props.didUpdate(Object.assign(this.getArgs(),{prevProps:d(e),prevState:t}),n)},t.prototype.getSnapshotBeforeUpdate=function(e,t){return this.props.getSnapshotBeforeUpdate?this.props.getSnapshotBeforeUpdate(Object.assign(this.getArgs(),{prevProps:d(e),prevState:t})):null},t.prototype.render=function(){var e=this.props,t=e.children,n=e.render;return n?n(this.getArgs()):"function"==typeof t?t(this.getArgs()):t||null},t}(s.a.Component);b.defaultProps={getInitialState:function(){},getRefs:function(){return{}}};var p=function(){var e=this;this.state=this.props.initialState||this.props.getInitialState(this.props),this._refs=this.props.refs||this.props.getRefs(this.getArgs()),this._setState=function(){return e.setState.apply(e,arguments)},this._forceUpdate=function(){return e.forceUpdate.apply(e,arguments)}},h=b,v=function(e){var t=e.children,n=e.container,c=void 0===n?document.body:n,o=e.type,a=void 0===o?"reach-portal":o;return Object(r.createElement)(h,{getRefs:function(){return{node:null}},didMount:function(e){var t=e.refs,n=e.forceUpdate,r=c.hasOwnProperty("current")?c.current:c;t.node=document.createElement(a),r.appendChild(t.node),n()},willUnmount:function(e){var t=e.refs.node,n=c.hasOwnProperty("current")?c.current:c;n&&n.removeChild(t)},render:function(e){var n=e.refs.node;return n?Object(r.createPortal)(t,n):null}})};var O=function(e,t){return function(n){if(e&&e(n),!n.defaultPrevented)return t(n)}},y=n(6),j=n.n(y);function g(){return(g=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)}function _(e,t){if(null==e)return{};var n,r,c=function(e,t){if(null==e)return{};var n,r,c={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(c[n]=e[n]);return c}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(c[n]=e[n])}return c}var E=function(){},w=function(){},x=function(e,t){var n,r,c;e.disposeAriaHider=(n=e.overlayNode,r=[],c=[],Array.prototype.forEach.call(document.querySelectorAll("body > *"),(function(e){if(e!==n.parentNode){var t=e.getAttribute("aria-hidden");null!==t&&"false"!==t||(r.push(t),c.push(e),e.setAttribute("aria-hidden","true"))}})),function(){c.forEach((function(e,t){var n=r[t];null===n?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",n)}))}),e.trap=j()(e.overlayNode,{initialFocus:t?function(){return t.current}:void 0,fallbackFocus:e.contentNode,escapeDeactivates:!1,clickOutsideDeactivates:!1})},S=function(e){var t=e.refs;t.trap.deactivate(),t.disposeAriaHider()},C=React.createContext(),k=React.forwardRef((function(e,t){var n=e.container,c=e.isOpen,o=void 0===c||c,a=e.onDismiss,i=void 0===a?E:a,l=e.initialFocusRef,u=e.onClick,s=e.onKeyDown,f=_(e,["container","isOpen","onDismiss","initialFocusRef","onClick","onKeyDown"]);return Object(r.createElement)(h,{didMount:w},o?Object(r.createElement)(v,{container:n,"data-reach-dialog-wrapper":!0},Object(r.createElement)(h,{refs:{overlayNode:null,contentNode:null},didMount:function(e){var t=e.refs;x(t,l)},willUnmount:S},(function(e){var n=e.refs;return Object(r.createElement)(C.Provider,{value:function(e){return n.contentNode=e}},Object(r.createElement)("div",g({"data-reach-dialog-overlay":!0,onClick:O(u,(function(e){e.stopPropagation(),i()})),onKeyDown:O(s,(function(e){"Escape"===e.key&&(e.stopPropagation(),i())})),ref:function(e){n.overlayNode=e,t&&t(e)}},f)))}))):null)}));k.propTypes={initialFocusRef:function(){}};var D=function(e){return e.stopPropagation()},z=React.forwardRef((function(e,t){var n=e.onClick,c=(e.onKeyDown,_(e,["onClick","onKeyDown"]));return Object(r.createElement)(C.Consumer,null,(function(e){return Object(r.createElement)("div",g({"aria-modal":"true","data-reach-dialog-content":!0,tabIndex:"-1",onClick:O(n,D),ref:function(n){e(n),t&&t(n)}},c))}))})),A=n(3),P=function(e){return!!e},M=function(e){var t=e.items,n=e.isVisible,c=void 0===n?P:n,o=e.render,a=e.className,i=e.onDismiss;return Object(r.createElement)(A.Transition,{items:t,onStart:function(){return document.body.classList[c(t)?"add":"remove"]("ct-dashboard-overlay-open")},config:{duration:200},from:{opacity:0,y:-10},enter:{opacity:1,y:0},leave:{opacity:0,y:10}},(function(e){return c(e)&&function(t){return Object(r.createElement)(k,{style:{opacity:t.opacity},container:document.querySelector("#wpbody"),onDismiss:function(){return i()}},Object(r.createElement)(z,{className:l()("ct-admin-modal",a),style:{transform:"translate3d(0px, ".concat(t.y,"px, 0px)")}},Object(r.createElement)("button",{className:"close-button",onClick:function(){return i()}},"×"),o(e,t)))}}))};function N(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,c=!1,o=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){c=!0,o=e}finally{try{r||null==i.return||i.return()}finally{if(c)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return L(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return L(e,t)}(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 L(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}var T=function(e){var t=N(Object(r.useState)(!1),2),n=t[0],c=t[1];return[function(){return c(!0)},Object(r.createElement)(M,{items:n,onDismiss:function(){return c(!1)},render:function(){return Object(r.createElement)("div",{className:"ct-modal-content",dangerouslySetInnerHTML:{__html:e.readme}})}})]};function I(e,t,n,r,c,o,a){try{var i=e[o](a),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,c)}function R(e){return function(){var t=this,n=arguments;return new Promise((function(r,c){var o=e.apply(t,n);function a(e){I(o,r,c,a,i,"next",e)}function i(e){I(o,r,c,a,i,"throw",e)}a(void 0)}))}}function U(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,c=!1,o=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){c=!0,o=e}finally{try{r||null==i.return||i.return()}finally{if(c)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return F(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return F(e,t)}(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 F(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}var B=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=Object(r.useState)(!1),c=U(n,2),o=c[0],i=c[1],l=Object(r.useState)(!1),u=U(l,2),s=u[0],f=u[1],m=ctDashboardLocalizations.plugin_data.is_pro,d=function(){var n=R(regeneratorRuntime.mark((function n(){var r;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(m||!e.config.pro){n.next=3;break}return f(!0),n.abrupt("return");case 3:return(r=new FormData).append("ext",e.name),r.append("action",e.__object?"blocksy_extension_deactivate":"blocksy_extension_activate"),i(!0),n.prev=7,n.next=10,fetch(ctDashboardLocalizations.ajax_url,{method:"POST",body:r});case 10:e.config.require_refresh&&location.reload(),t(),n.next=16;break;case 14:n.prev=14,n.t0=n.catch(7);case 16:i(!1);case 17:case"end":return n.stop()}}),n,null,[[7,14]])})));return function(){return n.apply(this,arguments)}}();return[o,d,!m&&e.config.pro?Object(r.createElement)(M,{items:s,onDismiss:function(){return f(!1)},render:function(){return Object(r.createElement)("div",{className:"ct-activation-action-modal"},Object(r.createElement)("svg",{viewBox:"0 0 59.99 60"},Object(r.createElement)("path",{d:"M14.41 43.65c0 .13.08.27.11.41a5.91 5.91 0 010 2.37c-1.78 1.14-3.2 1.19-4.34.68-2.83-1.27-3.81-6-3.81-6s.38-.08 1-.15a6.08 6.08 0 012.64.91 4.17 4.17 0 01-.22-1 6.47 6.47 0 013.2 1 8.14 8.14 0 01.35-5 12.74 12.74 0 01.65-1.62s8.51 4.32 3 9.27a5.81 5.81 0 01-2.34-.68 2 2 0 01-.24-.19zM7.17 15.93q.2.22.42.45a5.74 5.74 0 002.68-.74 5.51 5.51 0 00-.28 2.76 6.79 6.79 0 001.47.81c5 1.94 6.91-5.79 6.91-5.79a13.35 13.35 0 00-4.5-.26 5.64 5.64 0 00-2.15.72 4.42 4.42 0 00.23-.81c.51-2.62-.94-5.82-.94-5.82a13.76 13.76 0 00-2.44 1.51c-2 1.51-4 4-1.53 7a.65.65 0 00.13.17zm.93 16.56a6.7 6.7 0 00.84.76c7.28-1.28 2.36-9.46 2.36-9.46a14.28 14.28 0 00-2.18 1.69 7.39 7.39 0 00-2.13 3.35v-1.19a5.49 5.49 0 00-1.27-1.71 12.75 12.75 0 00-3.94-2.44 13.32 13.32 0 00-.39 1.37c-.49 2-.91 5.69 1.85 7a4.83 4.83 0 001.75.46 8.25 8.25 0 00.86 0 6.45 6.45 0 001.14-1.76 4.41 4.41 0 001.11 1.93zM18.79 9.27c6 1.85 8.82-7.61 8.82-7.61a17.44 17.44 0 00-6.1-.58c-2.92.35-5.71 1.92-5.33 6.76a8.42 8.42 0 002.61 1.43zM49.6 40.93a6.08 6.08 0 00-2.64.91 4.21 4.21 0 00.22-1 11.57 11.57 0 00-1.19-5.59 13.88 13.88 0 00-2.36 1.58c-1.87 1.58-3.82 4.16-1.33 7 .06.08.13.15.2.23s.29.3.46.45a5.69 5.69 0 002.65-.86 5.82 5.82 0 00-.14 2.78 6.75 6.75 0 001.34.68c5.16 1.94 6.81-6 6.81-6a13.28 13.28 0 00-4.02-.18zm-6.49-27.77a10.69 10.69 0 00-1.5.26s1.15 4.53 3.91 5.79c1.18.54 2.66.47 4.47-.81a5.88 5.88 0 00-.16-2.47 1.42 1.42 0 00-.1-.29l.23.13a6 6 0 002.45.61c5.24-5.19-3.42-9.13-3.42-9.13a13.57 13.57 0 00-.54 1.51 8.37 8.37 0 00-.17 5.12 6.62 6.62 0 00-3.29-.81 12.09 12.09 0 00-1.88.09zm15.13 10.33a13.53 13.53 0 00-2.61 1.37 7.1 7.1 0 00-2.64 2.78v1.18a6.69 6.69 0 00-1.73-2.89 13.85 13.85 0 00-2.62-2.14 13.17 13.17 0 00-.82 1.69c-.83 2-1.65 5.4 1 7a6.4 6.4 0 002.16.76 7.35 7.35 0 001-.93 4.26 4.26 0 001-1.76 6.06 6.06 0 00.76 1.3 6.25 6.25 0 00.4.5c7.43.09 4.1-8.86 4.1-8.86zM38.19 9.27c1.55.52 3.41.27 5.61-1.43.51-6.56-4.81-7.11-8.33-6.76a19.24 19.24 0 00-3.1.58S34.25 8 38.19 9.27zM41.99 54h-3v-6a2 2 0 00-2-2h-14a2 2 0 00-2 2v6h-3a2 2 0 00-2 2v3h28v-3a2 2 0 00-2-2zM25.76 21.65l-5.77.84a1 1 0 00-.81.68 1 1 0 00.26 1l4.19 4.11a1 1 0 01.28.88l-.92 5.44-.07.4a1 1 0 00.4 1 1 1 0 001.06.07l3.55-1.88 1.6-.85a1 1 0 01.94 0l2.4 1.27 2.75 1.46a1 1 0 001.05-.07 1 1 0 00.4-1l-1-5.81a1 1 0 01.28-.88l4.19-4.11a1 1 0 00.26-1 1 1 0 00-.81-.68l-5.78-.84a1 1 0 01-.75-.55l-2.57-5.3a1 1 0 00-1.8 0l-1.17 2.39-1.41 2.88a1 1 0 01-.75.55z",fill:"#ffa800"}),Object(r.createElement)("path",{d:"M19.99 22.49l5.78-.84a1 1 0 00.75-.55l1.41-2.88 1.41 2.88a1 1 0 00.75.55l5.78.84a1 1 0 01.56 1.71l-4.19 4.11a1 1 0 00-.29.88l.92 5.4-2.4-1.27a1 1 0 00-.94 0l-1.6.85-1.6-.85a1 1 0 00-.93 0l-2.41 1.28.92-5.41a1 1 0 00-.28-.88l-4.2-4.11a1 1 0 01-.26-1 1 1 0 01.82-.71zm-13 8.07a4.41 4.41 0 001.14 1.93c2.67-1.61 1.85-5 1-7a7.39 7.39 0 00-2.14 3.34 3.49 3.49 0 000 1.7zm11.8-21.29c3.94-1.27 5.82-7.61 5.82-7.61a19.24 19.24 0 00-3.1-.58c-2.92.35-5.71 1.92-5.33 6.76a8.42 8.42 0 002.61 1.43zm-7.31 9.94c2.76-1.26 3.91-5.79 3.91-5.79a10.69 10.69 0 00-1.5-.26 12.35 12.35 0 00-1.9-.09 4.42 4.42 0 01-.23.81 3.48 3.48 0 00-1.46 1.75 5.51 5.51 0 00-.31 2.77 6.79 6.79 0 001.49.81zm37.4 13.28a4.41 4.41 0 001.11-1.93 3.57 3.57 0 000-1.72 7.31 7.31 0 00-2.17-3.34c-.83 2.02-1.61 5.38 1.06 6.99zM45.5 19.21a6.79 6.79 0 001.49-.81 5.51 5.51 0 00-.26-2.76 3.53 3.53 0 00-1.46-1.75 5.79 5.79 0 00-2.13-.72 10.69 10.69 0 00-1.5.26s1.1 4.57 3.86 5.78zm-7.31-9.94a8.42 8.42 0 002.61-1.43c.38-4.84-2.41-6.41-5.33-6.76a19.24 19.24 0 00-3.1.58S34.25 8 38.19 9.27zm8.8 32.57l-1.4 1.8a5.82 5.82 0 00-.14 2.78 6.75 6.75 0 001.34.68c2.83-1.27 3.81-6 3.81-6s-.38-.08-1-.15a6.08 6.08 0 00-2.61.89zm1.42-33.08a8.37 8.37 0 00-.17 5.12l1.46 1.75a1.42 1.42 0 01.1.29.65.65 0 00.13-.16c2.48-2.97.44-5.49-1.52-7zm-6.15 35.08a1.92 1.92 0 00.31-.18 3.55 3.55 0 001.42-1.79 8.1 8.1 0 00-.35-5c-1.92 1.54-3.87 4.13-1.38 6.97zm13.37-19a7.1 7.1 0 00-2.64 2.8v2.91a6.06 6.06 0 00.76 1.3c2.79-1.3 2.37-4.98 1.88-6.99zM11.41 43.65l-1.34-1.75a6.08 6.08 0 00-2.64-.91c-.6.07-1 .15-1 .15s1 4.77 3.81 6a6.75 6.75 0 001.34-.68 5.82 5.82 0 00-.14-2.78zM38.99 54h-3v-6a2 2 0 00-2-2h-11a2 2 0 00-2 2v6h-3a2 2 0 00-2 2v3h25v-3a2 2 0 00-2-2zm-25.6-17.17a8.14 8.14 0 00-.35 5 3.45 3.45 0 001.31 1.72h.05c0 .13.08.27.11.41.07-.08.14-.15.2-.23 2.5-2.73.55-5.32-1.32-6.9z",fill:"#fedd0a"}),Object(r.createElement)("path",{d:"M16.18 7.84C15.8 3 18.59 1.43 21.51 1.08a14.84 14.84 0 013 0C21.6 1.44 18.82 3 19.2 7.84a8.42 8.42 0 002.59 1.43 4.81 4.81 0 01-3 0 8.42 8.42 0 01-2.61-1.43zm-7.61.92c-2 1.51-4 4-1.53 7a.65.65 0 00.13.16q.2.22.42.45a5.91 5.91 0 002.4-.61c-2.45-3-.42-5.49 1.54-7a13.57 13.57 0 00-.54-1.51 13.76 13.76 0 00-2.42 1.51zM15.99 56v3h3v-3a2 2 0 012-2h-3a2 2 0 00-2 2zm7-10a2 2 0 00-2 2v6h3v-6a2 2 0 012-2zM4.35 24.86a13.53 13.53 0 00-2.61-1.37 13.32 13.32 0 00-.39 1.37c-.49 2-.91 5.69 1.85 7a4.83 4.83 0 001.79.46 8.25 8.25 0 00.86 0 5.84 5.84 0 00.4-.5c-2.81-1.27-2.39-4.95-1.9-6.96z",fill:"#fff"}),Object(r.createElement)("path",{d:"M59.18 23.14a1 1 0 00-1.29-.59 14.74 14.74 0 00-3.85 2.26 24.35 24.35 0 00-.45-3.4 23.39 23.39 0 00-1.21-4 1 1 0 00.71-.29 5.42 5.42 0 001.9-4.91c-.64-3.56-5.44-5.78-5.65-5.87a1 1 0 00-1.32.5 14.57 14.57 0 00-.85 2.6 26.55 26.55 0 00-2.37-2.12 6.66 6.66 0 00-2.23-5.7C38.99-1.31 32.36.61 32.08.7a1 1 0 00-.59.48 1 1 0 00-.08.76c.08.28 2.09 6.87 6.51 8.3a5.84 5.84 0 001.74.27 7.41 7.41 0 004.15-1.44 22.7 22.7 0 013.1 3 1.48 1.48 0 000 .21 13.38 13.38 0 00-5.58.15 1 1 0 00-.72 1.21c.06.22 1.39 5.34 4.79 6.59a4.42 4.42 0 001.55.28 6.3 6.3 0 003.59-1.31 1.2 1.2 0 00.26-.29 22.46 22.46 0 01.82 2.88 21.37 21.37 0 01.43 3.47 15 15 0 00-2.86-2.35 1 1 0 00-1.38.34c-.11.2-2.81 4.75-1.3 8a5.31 5.31 0 004.07 2.87c-.08.21-.15.42-.24.63a21.75 21.75 0 01-2.25 4 14.51 14.51 0 00-1.26-4 1 1 0 00-.58-.5 1 1 0 00-.76.06c-.2.1-4.9 2.53-5.38 6.11a5.19 5.19 0 001.7 4.37 22.47 22.47 0 01-2.46 1.34A3 3 0 0036.99 45h-6V34.73l4.15 2.2a2.1 2.1 0 00.94.23 2 2 0 002-2.33l-1-5.81 4.2-4.11a2 2 0 00-1.12-3.4l-5.78-.85-2.59-5.26a2 2 0 00-3.6 0l-2.58 5.26-5.77.85a2 2 0 00-1.11 3.4L22.92 29l-1 5.81a2 2 0 00.8 1.94 2 2 0 002.11.15l4.16-2.17V45h-6a3 3 0 00-2.37 1.18 21 21 0 01-2.46-1.35 5.16 5.16 0 001.7-4.36c-.48-3.58-5.18-6-5.38-6.11a1 1 0 00-.76-.06 1 1 0 00-.58.5 14.38 14.38 0 00-1.26 4 21.11 21.11 0 01-2.25-4c-.09-.21-.16-.42-.24-.64a5.26 5.26 0 004.07-2.86c1.51-3.29-1.19-7.84-1.3-8a1 1 0 00-1.38-.34 15 15 0 00-2.86 2.35 21.37 21.37 0 01.43-3.47 22.46 22.46 0 01.82-2.88 1.2 1.2 0 00.26.29 6.3 6.3 0 003.56 1.28 4.42 4.42 0 001.55-.28c3.4-1.25 4.73-6.37 4.79-6.59a1 1 0 00-.72-1.21 13.57 13.57 0 00-5.58-.15 1.48 1.48 0 000-.21 22.7 22.7 0 013.1-3 7.39 7.39 0 004.15 1.44 5.73 5.73 0 001.73-.27c4.43-1.43 6.44-8 6.52-8.3a1 1 0 00-.08-.76 1 1 0 00-.55-.5c-.28-.09-6.89-2-10.51.92a6.66 6.66 0 00-2.23 5.7 26.55 26.55 0 00-2.37 2.12 14.57 14.57 0 00-.8-2.6 1 1 0 00-1.32-.5c-.2.09-5 2.31-5.65 5.87a5.42 5.42 0 001.91 4.88 1 1 0 00.71.29 23.65 23.65 0 00-1.21 4 24.35 24.35 0 00-.44 3.43 14.74 14.74 0 00-3.9-2.26 1 1 0 00-1.29.59c-.08.21-1.89 5.18.19 8.14a5.37 5.37 0 004.71 2.08h.11a1 1 0 00.73-.36c.09-.1.16-.22.25-.33a24.67 24.67 0 001 2.89 23.67 23.67 0 002.4 4.32 14.22 14.22 0 00-4 .19 1 1 0 00-.77 1.18c0 .22 1.15 5.4 4.49 6.8a4.41 4.41 0 001.75.35 6.4 6.4 0 003.43-1.15 1 1 0 00.44-.64 6.59 6.59 0 00.11-1.08l.84.59a23 23 0 003.51 1.97V53h-2a3 3 0 00-3 3v3a1 1 0 001 1h28a1 1 0 001-1v-3a3 3 0 00-3-3h-2v-4.91a23 23 0 003.51-1.94c.29-.19.56-.41.84-.62a7 7 0 00.11 1.11 1 1 0 00.44.64 6.4 6.4 0 003.43 1.15 4.41 4.41 0 001.75-.35c3.34-1.4 4.45-6.58 4.49-6.8a1 1 0 00-.77-1.18 14.22 14.22 0 00-4-.19 23.67 23.67 0 002.4-4.32 24.67 24.67 0 001-2.89c.09.11.16.23.25.33a1 1 0 00.73.33h.11a5.37 5.37 0 004.71-2.08c2.08-2.96.27-7.93.19-8.14zM38.65 6a22.22 22.22 0 013.4 1.82 4.32 4.32 0 01-3.51.53c-2.55-.82-4.18-4.24-4.86-6 1.81-.38 5.57-.88 7.65.81a4.12 4.12 0 011.42 2.71 23.48 23.48 0 00-3.33-1.75 1 1 0 00-1.31.53A1 1 0 0038.65 6zm-20-2.8c2.08-1.71 5.84-1.2 7.65-.83-.68 1.72-2.31 5.14-4.86 6a4.32 4.32 0 01-3.51-.53A22.22 22.22 0 0121.33 6a1 1 0 00.54-1.31 1 1 0 00-1.31-.53 24 24 0 00-3.33 1.75 4.12 4.12 0 011.42-2.73zM5.92 30.41a5.66 5.66 0 01-.58.94 3.27 3.27 0 01-2.71-1.21c-1-1.37-.65-3.75-.26-5.28a8.32 8.32 0 013.62 3.05v.61a4.45 4.45 0 00-.15.9 4.12 4.12 0 00.08.99zm6-15.39c1.25-1.11 3.66-1 5.21-.83-.55 1.47-1.64 3.61-3.21 4.18a3.23 3.23 0 01-2.93-.54 3.27 3.27 0 01.89-2.83zm-4.93-2.45c.29-1.65 2.21-3.11 3.56-3.91a8.35 8.35 0 01.38 4.61 3.81 3.81 0 00-.32.24 4.52 4.52 0 00-1.05 1.37 3.53 3.53 0 01-.56.25h-.01a4.51 4.51 0 01-.95.22 3.26 3.26 0 01-1.05-2.78zm.91 17c.09-1.7 1.78-3.37 3.09-4.32.66 1.42 1.4 3.7.7 5.23a3.23 3.23 0 01-2.43 1.69 3.25 3.25 0 01-1.41-2.63zm5.78 16.29a3.26 3.26 0 01-2.94.41c-1.55-.65-2.55-2.84-3-4.34a8.39 8.39 0 014.58.65 2.92 2.92 0 00.17.36 4.51 4.51 0 001.1 1.32 4.53 4.53 0 01.04 1.57zm3.08-2.36a5 5 0 01-.85-.21h-.08A2.84 2.84 0 0114.16 42c-.8-1.46-.22-3.8.34-5.27 1.32.86 3.16 2.4 3.38 4.06a3.28 3.28 0 01-1.17 2.68zm7.19-8.3l1-5.8a2 2 0 00-.57-1.77l-4.19-4.11 5.77-.85a2 2 0 001.51-1.1l2.52-5.3 2.58 5.27a2 2 0 001.51 1.1l5.77.84-4.19 4.12a2 2 0 00-.57 1.76l1 5.8-5.15-2.73a2 2 0 00-1.88 0zM21.99 48a1 1 0 011-1h14a1 1 0 011 1v5h-16zm20 7a1 1 0 011 1v2h-26v-2a1 1 0 011-1h24zm3.83-13a2.84 2.84 0 01-1.62 1.28h-.07a6.37 6.37 0 01-.86.21 3.28 3.28 0 01-1.17-2.73c.22-1.66 2.06-3.2 3.38-4.06.56 1.45 1.14 3.79.34 5.3zm6.5-.05c-.48 1.5-1.48 3.69-3 4.34a3.26 3.26 0 01-2.94-.41 4.53 4.53 0 01.12-1.6 4.51 4.51 0 001.1-1.32c.07-.12.11-.24.17-.36a8.39 8.39 0 014.55-.7zM46.1 18.37c-1.57-.57-2.66-2.71-3.21-4.18 1.55-.22 4-.28 5.21.83a3.27 3.27 0 01.89 2.81 3.26 3.26 0 01-2.89.54zm4.67 13.8a3.23 3.23 0 01-2.43-1.69c-.7-1.52 0-3.8.71-5.23 1.25.95 3 2.62 3.08 4.29a3.25 3.25 0 01-1.36 2.63zm1.22-16.82a4.75 4.75 0 01-1-.22 3.87 3.87 0 01-.55-.25 4.52 4.52 0 00-1-1.37 3.81 3.81 0 00-.32-.24 8.45 8.45 0 01.38-4.61c1.35.8 3.27 2.25 3.56 3.9a3.27 3.27 0 01-1.07 2.79zm5.36 14.79a3.27 3.27 0 01-2.71 1.21 5.66 5.66 0 01-.58-.94 4.09 4.09 0 00.06-1 5.28 5.28 0 00-.15-.9v-.6a8.37 8.37 0 013.6-3.06c.42 1.54.74 3.92-.22 5.29zM33.99 50a1 1 0 01-1 1h-6a1 1 0 010-2h6a1 1 0 011 1z"})),Object(r.createElement)("h2",null,"Upgrade to Pro"),Object(r.createElement)("p",null,Object(a.__)("Upgrade to the Pro version and get instant full access to all premium extensions and features.","blc")),Object(r.createElement)("button",{className:"ct-button-primary"},Object(a.__)("Upgrade Now","blc")))}}):null]},V=function(){return ctDashboardLocalizations.plugin_data.hide_support_section?null:Object(r.createElement)("div",{className:"ct-support-container"},Object(r.createElement)("h2",null,Object(a.__)("Support","blc")),Object(r.createElement)("p",null,Object(a.__)("Got a question or need some help with the theme? You can always submit a support ticket, and our team will help you out.","blc")),Object(r.createElement)("a",{href:ctDashboardLocalizations.support_url,className:"ct-button","data-hover":"blue",target:"_blank"},Object(a.__)("Submit a Ticket","blc")))};function q(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 H(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?q(Object(n),!0).forEach((function(t){W(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):q(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function W(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Z(e,t,n,r,c,o,a){try{var i=e[o](a),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,c)}function $(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,c=!1,o=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){c=!0,o=e}finally{try{r||null==i.return||i.return()}finally{if(c)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return K(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return K(e,t)}(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 K(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}var G=null,Y=function(e){var t=e.extension,n=e.onExtsSync,c=$(T(t),2),o=c[0],i=c[1],u=$(B(t,(function(){n()})),3),s=u[0],f=u[1],m=u[2];return Object(r.createElement)("li",{className:l()({active:!!t.__object})},Object(r.createElement)("h4",{className:"ct-extension-title"},t.config.name,s&&Object(r.createElement)("svg",{width:"15",height:"15",viewBox:"0 0 100 100"},Object(r.createElement)("g",{transform:"translate(50,50)"},Object(r.createElement)("g",{transform:"scale(1)"},Object(r.createElement)("circle",{cx:"0",cy:"0",r:"50",fill:"#687c93"}),Object(r.createElement)("circle",{cx:"0",cy:"-26",r:"12",fill:"#ffffff",transform:"rotate(161.634)"},Object(r.createElement)("animateTransform",{attributeName:"transform",type:"rotate",calcMode:"linear",values:"0 0 0;360 0 0",keyTimes:"0;1",dur:"1s",begin:"0s",repeatCount:"indefinite"})))))),t.config.description&&Object(r.createElement)("div",{className:"ct-extension-description"},t.config.description),Object(r.createElement)("div",{className:"ct-extension-actions"},Object(r.createElement)("button",{className:l()(t.__object?"ct-button":"ct-button-primary"),"data-hover":"white",disabled:s,onClick:function(){f()}},t.__object?Object(a.__)("Deactivate","blc"):Object(a.__)("Activate","blc")),t.readme&&Object(r.createElement)("button",{onClick:function(){return o()},className:"ct-minimal-button ct-instruction"},Object(r.createElement)("svg",{width:"16",height:"16",viewBox:"0 0 24 24"},Object(r.createElement)("path",{d:"M12,2C6.477,2,2,6.477,2,12s4.477,10,10,10s10-4.477,10-10S17.523,2,12,2z M12,17L12,17c-0.552,0-1-0.448-1-1v-4 c0-0.552,0.448-1,1-1h0c0.552,0,1,0.448,1,1v4C13,16.552,12.552,17,12,17z M12.5,9h-1C11.224,9,11,8.776,11,8.5v-1 C11,7.224,11.224,7,11.5,7h1C12.776,7,13,7.224,13,7.5v1C13,8.776,12.776,9,12.5,9z"}))),t.__object&&t.config&&t.config.buttons&&t.config.buttons.map((function(e,t){var n=e.text,c=e.url;return Object(r.createElement)("a",{href:c,className:"ct-button ct-config-btn",dataButton:"white"},n)}))),i,m)},J=function(){var e=$(Object(r.useState)(!G),2),t=e[0],n=e[1],c=$(Object(r.useState)(G||[]),2),i=c[0],u=c[1],s=$(Object(r.useState)(!1),2),f=s[0],m=s[1],d=$(Object(r.useState)("free"),2),b=d[0],p=d[1],h=function(){var e,t=(e=regeneratorRuntime.mark((function e(){var t,r,c,o,a,i,l,s,f,d=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=d.length>0&&void 0!==d[0]?d[0]:{},r=H({verbose:!1,extension:null,extAction:null},t),c=r.verbose,o=r.extension,a=r.extAction,c&&n(!0),m(!0),e.prev=4,e.next=7,fetch("".concat(wp.ajax.settings.url,"?action=blocksy_extensions_status"),H({method:"POST"},o&&a?{body:JSON.stringify({extension:o,extAction:a})}:{}));case 7:if(200!==(i=e.sent).status){e.next=15;break}return e.next=11,i.json();case 11:l=e.sent,s=l.success,f=l.data,s&&(u(f),G=f);case 15:e.next=19;break;case 17:e.prev=17,e.t0=e.catch(4);case 19:m(!1),n(!1);case 21:case"end":return e.stop()}}),e,null,[[4,17]])})),function(){var t=this,n=arguments;return new Promise((function(r,c){var o=e.apply(t,n);function a(e){Z(o,r,c,a,i,"next",e)}function i(e){Z(o,r,c,a,i,"throw",e)}a(void 0)}))});return function(){return t.apply(this,arguments)}}();Object(r.useEffect)((function(){h({verbose:!G});var e=function(){h()};return o.a.on("blocksy_exts_sync_exts",e),function(){o.a.off("blocksy_exts_sync_exts",e)}}),[]);var v=Object(r.useMemo)((function(){return Object.values(i).map((function(e,t){return H(H({},e),{},{name:Object.keys(i)[t]})})).find((function(e){return e.config.pro}))}),[i]),O=Object(r.useMemo)((function(){return Object.values(i).map((function(e,t){return H(H({},e),{},{name:Object.keys(i)[t]})})).filter((function(e){return!e.config.hidden})).filter((function(e){var t=e.config;return"free"===b?!t.pro:t.pro}))}),[b,i]);return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("div",{className:"ct-extensions-container"},Object(r.createElement)(A.Transition,{items:t,from:{opacity:0},enter:[{opacity:1}],leave:[{opacity:0}],initial:null,config:function(e,t){return"leave"===t?{duration:300}:{delay:300,duration:300}}},(function(e){return e?function(e){return Object(r.createElement)(A.animated.p,{style:e,className:"ct-loading-text"},Object(r.createElement)("span",null),Object(a.__)("Loading Extensions Status...","blc"))}:function(e){return Object(r.createElement)(A.animated.div,{style:e},Object(r.createElement)(r.Fragment,null,v&&Object(r.createElement)("ul",{className:"ct-extensions-sourse"},["free","pro"].map((function(e){return Object(r.createElement)("li",{key:e,onClick:function(){return p(e)},className:l()({active:e===b})},{free:Object(a.__)("Free Extensions","blc"),pro:Object(a.__)("Pro Extensions","blc")}[e])}))),Object(r.createElement)("ul",{className:l()("ct-extensions-list",{"is-pro":"pro"===b})},O.map((function(e){var t={extension:Y};return o.a.trigger("ct:extensions:card",{CustomComponent:t,extension:e}),Object(r.createElement)(t.extension,{key:e.name,extension:e,extsSyncLoading:f,onExtsSync:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i[e.name].__object=!i[e.name].__object,u(i),h(H(H({},t),{},{extension:e.name}))}})}))),Object(r.createElement)(V,null)))}}))))},X=window.ctDashboardLocalizations.DashboardContext,Q=(X.Provider,X.Consumer,X),ee=function(e){var t=e.children,n=e.activated,c=e.checked,o=e.onChange;return Object(r.createElement)("div",{onClick:function(){return o()},className:l()("ct-checkbox-container",{activated:n})},t,Object(r.createElement)("span",{className:l()("ct-checkbox",{active:c})},Object(r.createElement)("svg",{width:"10",height:"8",viewBox:"0 0 11.2 9.1"},Object(r.createElement)("polyline",{class:"check",points:"1.2,4.8 4.4,7.9 9.9,1.2 "}))))};function te(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 ne(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?te(Object(n),!0).forEach((function(t){re(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):te(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function re(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ce(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,c=!1,o=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){c=!0,o=e}finally{try{r||null==i.return||i.return()}finally{if(c)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return oe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return oe(e,t)}(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 oe(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}var ae=function(e){return({coblocks:"CoBlocks","contact-form-7":"Contact Form 7",woocommerce:"WooCommerce",elementor:"Elementor",brizy:"Brizy",getwid:"Getwid","wpforms-lite":"WPForms - Contact Form","stackable-ultimate-gutenberg-blocks":"Stackable – Gutenberg Blocks"}[e]||e).replace(/\b\w/,(function(e){return e.toUpperCase()}))},ie=function(e){var t=e.demoConfiguration,n=e.setDemoConfiguration,c=e.style,o=Object(r.useContext)(Ye),i=o.currentDemo,l=o.demos_list,u=o.pluginsStatus,s=(o.setCurrentDemo,ce((i||"").split(":"),2)),f=s[0];s[1],l.filter((function(e){return e.name===f||""}));return Object(r.createElement)("div",{style:c},Object(r.createElement)("div",{className:"ct-demo-plugins"},Object(r.createElement)("i",{className:"ct-demo-icon"},Object(r.createElement)("svg",{width:"40",height:"40",viewBox:"0 0 40 40"},Object(r.createElement)("path",{fill:"#0C7AB3",d:"M20,0v7.6c0,0.3-0.2,0.5-0.5,0.5h-1.5c0,0,0,0,0,0c0,0,0,0-0.1,0c0,0,0,0-0.1,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c-0.5-0.7-1.3-1.1-2.1-1.1c-1.5,0-2.6,1.2-2.6,2.6c0,1.5,1.2,2.6,2.6,2.6c0.8,0,1.6-0.4,2.1-1.1c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0.1,0c0,0,0,0,0.1,0c0,0,0,0,0,0h1.5c0,0,0,0,0,0c0.3,0,0.5,0.2,0.5,0.5V20h8.1v-0.8c-0.8-0.7-1.3-1.7-1.3-2.8c0-2,1.7-3.7,3.7-3.7c2,0,3.7,1.7,3.7,3.7c0,1.1-0.5,2.1-1.3,2.8V20H40C40,9,31,0,20,0z"}),Object(r.createElement)("path",{fill:"#3497D3",d:"M20,40v-7.6c0-0.3,0.2-0.5,0.5-0.5h1.5c0,0,0,0,0,0c0,0,0,0,0.1,0c0,0,0,0,0.1,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0.5,0.7,1.3,1.1,2.1,1.1c1.5,0,2.6-1.2,2.6-2.6c0-1.5-1.2-2.6-2.6-2.6c-0.8,0-1.6,0.4-2.1,1.1c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0-0.1,0c0,0,0,0-0.1,0c0,0,0,0,0,0h-1.5c0,0,0,0,0,0c-0.3,0-0.5-0.2-0.5-0.5V20h-8.1v0.8c0.8,0.7,1.3,1.7,1.3,2.8c0,2-1.7,3.7-3.7,3.7c-2,0-3.7-1.7-3.7-3.7c0-1.1,0.5-2.1,1.3-2.8V20H0C0,31,9,40,20,40z"}))),Object(r.createElement)("h2",null,Object(a.__)("Install & Activate Plugins","blc")),Object(r.createElement)("p",null,Object(a.__)("The following plugins are required for this starter site in order to work properly.","blc")),t.plugins.map((function(e){var c=e.plugin,o=e.enabled;return Object(r.createElement)(r.Fragment,{key:c},!u[c]&&Object(r.createElement)(ee,{key:c,checked:o,onChange:function(){return n(ne(ne({},t),{},{plugins:t.plugins.map((function(e){return e.plugin===c?ne(ne({},e),{},{enabled:!o}):e}))}))}},ae(c)),u[c]&&Object(r.createElement)(ee,{activated:!0,checked:!0,onChange:function(){}},ae(c)))}))))},le=function(){var e=Object(r.useContext)(Ye),t=e.currentlyInstalledDemo,n=e.demos_list,c=e.setCurrentDemo,o=e.demo_error;Object(r.useContext)(Q).Link;return Object(r.createElement)("ul",null,n.filter((function(e,t){return n.map((function(e){return e.name})).indexOf(e.name)===t})).map((function(e){return Object(r.createElement)("li",{key:e.name,className:l()("ct-single-demo",{"ct-is-pro":e.is_pro})},Object(r.createElement)("figure",null,Object(r.createElement)("img",{src:e.screenshot}),Object(r.createElement)("section",null,Object(r.createElement)("h3",null,Object(a.__)("Available for","blc")),Object(r.createElement)("div",null,n.filter((function(t){return t.name===e.name||""})).sort((function(e,t){return e.builder<t.builder?-1:e.builder>t.builder?1:0})).map((function(e){var t=e.builder;return Object(r.createElement)("span",{key:t},ae(t)||"Gutenberg")})))),e.is_pro&&Object(r.createElement)("a",{onClick:function(e){return e.preventDefault()},href:"#"},"PRO")),Object(r.createElement)("div",{className:"ct-demo-actions"},Object(r.createElement)("h4",null,e.name),Object(r.createElement)("div",null,Object(r.createElement)("a",{className:"ct-button",target:"_blank",href:e.url},Object(a.__)("Preview","blc")),Object(r.createElement)("button",{className:"ct-button-primary",onClick:function(){return c(e.name)},disabled:!!o},t&&t.demo.indexOf(e.name)>-1?Object(a.__)("Modify","blc"):Object(a.__)("Import","blc")))))})))};function ue(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,c=!1,o=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){c=!0,o=e}finally{try{r||null==i.return||i.return()}finally{if(c)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return se(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return se(e,t)}(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 se(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}var fe=function(e){var t=e.style,n=e.nextStep,c=(Object(r.useContext)(Q).is_child_theme,Object(r.useContext)(Ye)),o=c.setCurrentlyInstalledDemo,i=c.setCurrentDemo,l=c.currentDemo,u=c.demos_list,s=ue(Object(r.useState)(0),2),f=s[0],m=s[1],d=ue(Object(r.useState)("idle"),2),b=d[0],p=d[1],h=ue((l||"").split(":"),2),v=h[0],O=(h[1],u.filter((function(e){return e.name===v}))),y={erase_content:{title:Object(a.__)("Erase content","blc"),query_string:"action=blocksy_demo_erase_content&wp_customize=on"},deactivate_demo_plugins:{title:Object(a.__)("Deactivate demo plugins","blc"),query_string:"action=blocksy_demo_deactivate_plugins&plugins=".concat(O[0].plugins.join(":"))},deregister_current_demo:{title:Object(a.__)("Erase content","blc"),query_string:"action=blocksy_demo_deregister_current_demo"}},j=["erase_content","deactivate_demo_plugins","deregister_current_demo"],g=j[f],_=function(){var e=y[g],t=new EventSource("".concat(ctDashboardLocalizations.ajax_url,"?").concat(e.query_string));t.onmessage=function(e){if("complete"===JSON.parse(e.data).action){if(t&&t.close&&t.close(),f===j.length-1)return void p("done");m(Math.min(j.length-1,f+1))}}};return Object(r.useEffect)((function(){0!==f&&"done"!==b&&_()}),[g]),Object(r.createElement)("div",{className:"ct-modify-demo",style:t},Object(r.createElement)("i",{className:"ct-demo-icon"},Object(r.createElement)("svg",{width:"36",height:"36",viewBox:"0 0 40 40"},Object(r.createElement)("path",{d:"M5.71,40a1,1,0,0,1-1-1V21.59a1,1,0,0,1,1.91,0V39.05A1,1,0,0,1,5.71,40Zm1-31.83V1.07A1,1,0,0,0,5.71,0a1,1,0,0,0-1,1.07v7.1a1,1,0,0,0,1,1.07A1,1,0,0,0,6.67,8.17ZM21,39.05V34.29a1,1,0,1,0-1.9,0v4.76a1,1,0,1,0,1.9,0Zm0-18.14V1a1,1,0,1,0-1.9,0V20.91a1,1,0,1,0,1.9,0ZM35.24,39.05V26.35a1,1,0,0,0-1.91,0v12.7a1,1,0,0,0,1.91,0Zm0-26.25V1a1,1,0,1,0-1.91,0V12.8a1,1,0,1,0,1.91,0Z",transform:"translate(-0.71)",fill:"#dae3e8"}),Object(r.createElement)("path",{d:"M5.71,18.06a5,5,0,1,1,5-5A5,5,0,0,1,5.71,18.06ZM20,30.76a5,5,0,1,1,5-5A5,5,0,0,1,20,30.76Zm14.29-7.93a5,5,0,1,1,5-5A5,5,0,0,1,34.29,22.83Z",transform:"translate(-0.71)",fill:"#0c7ab3"}))),"idle"===b&&Object(r.createElement)("h2",null,Object(a.__)("This starter site is already installed","blc")),"loading"===b&&Object(r.createElement)("h2",null,"Removing starter site..."),"done"===b&&Object(r.createElement)(r.Fragment,null,Object(r.createElement)("h2",null,Object(a.__)("Starter Site Removed","blc")),Object(r.createElement)("div",{className:"ct-modify-actions"},Object(r.createElement)("button",{className:"ct-demo-btn ct-dismiss",onClick:function(e){e.preventDefault(),i("".concat(v,":hide"))}},Object(a.__)("Dismiss","blc")))),"idle"===b&&Object(r.createElement)(r.Fragment,null,Object(r.createElement)("p",null,Object(a.__)("What steps do you want to perform next?","blc")),Object(r.createElement)("div",{className:"ct-modify-actions"},Object(r.createElement)("button",{className:"ct-demo-btn demo-remove",onClick:function(e){p("loading"),e.preventDefault(),_(),o()}},Object(a.__)("Remove","blc")),Object(r.createElement)("button",{className:"ct-demo-btn",onClick:function(e){e.preventDefault(),n()}},Object(a.__)("Reinstall","blc")))))};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 de(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){be(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,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var pe=function(e){var t=e.demoConfiguration,n=e.setDemoConfiguration,c=e.style,o=Object(r.useContext)(Q),i=o.is_child_theme,l=o.child_theme_exists;return Object(r.createElement)("div",{className:"ct-demo-child",style:c},Object(r.createElement)("i",{className:"ct-demo-icon"},Object(r.createElement)("svg",{width:"40",height:"40",viewBox:"0 0 43 41.1"},Object(r.createElement)("path",{fill:"#DBE7EE",d:"M0,39.5c0,0.9,0.7,1.6,1.5,1.6h32.3c0.9,0,1.5-0.7,1.5-1.6V14H0V39.5z"}),Object(r.createElement)("path",{fill:"#BDC8D7",d:"M18.2,41.1h15.6c0.9,0,1.5-0.7,1.5-1.6V14H7.6L8,32.4L18.2,41.1z"}),Object(r.createElement)("path",{fill:"#BDC8D7",d:"M0,15.6V9.8c0-0.9,0.7-1.6,1.5-1.6h32.3c0.9,0,1.5,0.7,1.5,1.6v5.8H0z"}),Object(r.createElement)("path",{fill:"#3497D3",d:"M7.6,31.3c0,0.9,0.7,1.6,1.5,1.6h32.4c0.9,0,1.5-0.7,1.5-1.6V5.8H7.6V31.3z"}),Object(r.createElement)("path",{fill:"#0C7AB3",d:"M7.6,7.4V1.6C7.6,0.7,8.3,0,9.1,0h32.4C42.4,0,43,0.7,43,1.6v5.8H7.6z"}),Object(r.createElement)("rect",{x:"11.2",y:"11",fill:"#44ACDF",width:"16.8",height:"17.9"}),Object(r.createElement)("rect",{x:"31.5",y:"11",fill:"#44ACDF",width:"7.9",height:"17.9"}))),l?Object(r.createElement)("h2",null,Object(a.__)("Activate Child Theme","blc")):Object(r.createElement)("h2",null,Object(a.__)("Install Child Theme","blc")),!i&&Object(r.createElement)(r.Fragment,null,l?Object(r.createElement)("p",null,Object(a.__)("We strongly recommend to activate the child theme, this way you will have freedom to make changes without breaking the parent theme.","blc")):Object(r.createElement)("p",null,Object(a.__)("We strongly recommend to install the child theme, this way you will have freedom to make changes without breaking the parent theme.","blc")),Object(r.createElement)(ee,{checked:t.child_theme,onChange:function(){return n(de(de({},t),{},{child_theme:!t.child_theme}))}},l?Object(a.__)("Activate Child Theme","blc"):Object(a.__)("Install Child Theme","blc"))),i&&Object(a.__)("You already have a child theme properly installed and activated. Move on.","blc"),Object(r.createElement)("a",{href:"https://developer.wordpress.org/themes/advanced-topics/child-themes/",target:"_blank"},Object(a.__)("Learn more about child themes","blc")))};function he(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?he(Object(n),!0).forEach((function(t){Oe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):he(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Oe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ye(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,c=!1,o=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){c=!0,o=e}finally{try{r||null==i.return||i.return()}finally{if(c)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return je(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return je(e,t)}(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 je(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}var ge=function(e){var t=e.demoConfiguration,n=e.setDemoConfiguration,c=e.style,o=Object(r.useContext)(Ye),i=o.currentDemo,u=o.demos_list,s=(o.pluginsStatus,o.setCurrentDemo,ye((i||"").split(":"),2)),f=s[0],m=(s[1],u.filter((function(e){return e.name===f||""})));return Object(r.createElement)("div",{style:c},m.length>1&&Object(r.createElement)("div",{className:"ct-demo-builder"},Object(r.createElement)("i",{className:"ct-demo-icon"},Object(r.createElement)("svg",{width:"52",height:"40",viewBox:"0 0 52 40"},Object(r.createElement)("path",{fill:"#DBE7EE",d:"M0,38.1C0,39.1,0.9,40,1.8,40h39.3c1.1,0,1.8-0.9,1.8-1.9v-31H0V38.1z"}),Object(r.createElement)("path",{fill:"#CFDBE4",d:"M13.8,14.6v18.8h22.6V14.6H13.8zM34.8,31.9H15.4V16.1h19.4V31.9z"}),Object(r.createElement)("path",{fill:"#BDC8D7",d:"M13.1,15.3L13.1,15.3c0-0.8,0.6-1.4,1.4-1.4l0,0c0.8,0,1.4,0.6,1.4,1.4l0,0c0,0.8-0.6,1.4-1.4,1.4l0,0C13.7,16.8,13.1,16.1,13.1,15.3z M34.1,15.3L34.1,15.3c0-0.8,0.6-1.4,1.4-1.4l0,0c0.8,0,1.4,0.6,1.4,1.4l0,0c0,0.8-0.6,1.4-1.4,1.4l0,0C34.8,16.8,34.1,16.1,34.1,15.3z M13.1,32.7L13.1,32.7c0-0.8,0.6-1.4,1.4-1.4l0,0c0.8,0,1.4,0.6,1.4,1.4l0,0c0,0.8-0.6,1.4-1.4,1.4l0,0C13.7,34.1,13.1,33.5,13.1,32.7z M34.1,32.7L34.1,32.7c0-0.8,0.6-1.4,1.4-1.4l0,0c0.8,0,1.4,0.6,1.4,1.4l0,0c0,0.8-0.6,1.4-1.4,1.4l0,0C34.8,34.1,34.1,33.5,34.1,32.7z M23.3,15.3L23.3,15.3c0-0.8,0.6-1.4,1.4-1.4l0,0c0.8,0,1.4,0.6,1.4,1.4l0,0c0,0.8-0.6,1.4-1.4,1.4l0,0C24,16.8,23.3,16.1,23.3,15.3z M4.2,13.9h5.9v7.9H4.2V13.9zM4.2,23.3h5.9v2.9H4.2V23.3zM0,9V1.9C0,0.9,0.9,0,1.8,0h39.3c1.1,0,1.8,0.9,1.8,1.9V9H0z M42.9,35.4V10.9h-9.3v15.2L42.9,35.4zM7.2,27.6c-1.6,0-3,1.3-3,3c0,1.6,1.3,3,3,3s3-1.3,3-3C10.2,28.9,8.8,27.6,7.2,27.6z"}),Object(r.createElement)("path",{fill:"#0C7AB3",d:"M50,27.8H35.6c-1.1,0-2-0.9-2-2v-18c0-1.1,0.9-2,2-2H50c1.1,0,2,0.9,2,2v18C52,26.9,51.1,27.8,50,27.8z"}),Object(r.createElement)("path",{fill:"#44ACDF",d:"M49,17.5H36.8c-0.7,0-1.2-0.5-1.2-1.2V9.1c0-0.7,0.5-1.2,1.2-1.2H49c0.7,0,1.2,0.5,1.2,1.2v7.3C50.2,17,49.6,17.5,49,17.5z M50.2,20.4v-0.1c0-0.5-0.4-1-1-1H36.5c-0.5,0-1,0.4-1,1v0.1c0,0.5,0.4,1,1,1h12.7C49.7,21.4,50.2,20.9,50.2,20.4z M40.8,25.2h-4.3c-0.5,0-1-0.4-1-1v-0.1c0-0.5,0.4-1,1-1h4.3c0.5,0,1,0.4,1,1v0.1C41.7,24.8,41.3,25.2,40.8,25.2z M49.2,25.2h-4.3c-0.5,0-1-0.4-1-1v-0.1c0-0.5,0.4-1,1-1h4.3c0.5,0,1,0.4,1,1v0.1C50.2,24.8,49.7,25.2,49.2,25.2z"}),Object(r.createElement)("path",{fill:"#C8E6F4",d:"M47.4,11.2h-9.1c-0.2,0-0.5-0.2-0.5-0.4v0c0-0.2,0.2-0.4,0.5-0.4h9.1c0.2,0,0.5,0.2,0.5,0.4v0C47.8,11,47.6,11.2,47.4,11.2z M47.9,14.7L47.9,14.7c0-0.2-0.2-0.5-0.5-0.5h-9.1c-0.2,0-0.4,0.2-0.4,0.4v0c0,0.2,0.2,0.4,0.4,0.4h9.1C47.7,15.1,47.9,14.9,47.9,14.7z"}),Object(r.createElement)("path",{fill:"#FFFFFF",d:"M26.3,20.8h-2.9l-2.9,7.9H23l0.3-0.7h2.8l0.3,0.7h2.7L26.3,20.8z M23.9,25.8l0.8-2.2h0l0.8,2.2H23.9zM46.5,10.7c0,0.8-0.7,1.5-1.5,1.5s-1.5-0.7-1.5-1.5c0-0.8,0.7-1.5,1.5-1.5S46.5,9.9,46.5,10.7zM42.1,14.7c0,0.8-0.7,1.5-1.5,1.5s-1.5-0.7-1.5-1.5s0.7-1.5,1.5-1.5S42.1,13.9,42.1,14.7z"}))),Object(r.createElement)("h2",null,Object(a.__)("Choose Page Builder","blc")),Object(r.createElement)("p",null,Object(a.__)("This starter site can be imported and used with one of these page builders. Please select your prefered one in order to continue.","blc")),Object(r.createElement)("ul",{"data-count":m.length},m.sort((function(e,t){return e.builder<t.builder?-1:e.builder>t.builder?1:0})).map((function(e){var c=e.builder,o=e.plugins;return Object(r.createElement)("li",{className:l()({active:c===(null===t.builder?m[0].builder:t.builder)}),onClick:function(){return n(ve(ve({},t),{},{builder:c,plugins:o.map((function(e){return{plugin:e,enabled:!0}}))}))}},Object(r.createElement)("figure",null,Object(r.createElement)("span",{className:l()("ct-checkbox",{active:c===(null===t.builder?m[0].builder:t.builder)})},Object(r.createElement)("svg",{width:"10",height:"8",viewBox:"0 0 11.2 9.1"},Object(r.createElement)("polyline",{className:"check",points:"1.2,4.8 4.4,7.9 9.9,1.2 "}))),""===c&&Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 150 100"},Object(r.createElement)("path",{d:"M122.5 35.5c-1.7-1.1-4-.7-5.1 1C110.8 46.4 96.8 47 96 47h-.3c-17.4 0-24 14.8-24.3 15.4-.8 1.9.1 4 1.9 4.8.5.2 1 .3 1.5.3 1.4 0 2.7-.8 3.4-2.2.1-.1 4.6-10.3 16.3-11v19c-.5 4.1-2.4 7.3-5.8 9.7-3.6 2.5-8.3 3.8-14.1 3.8-7 0-12.7-2.4-16.9-7.2-4.3-4.8-6.4-11.5-6.4-20.2l.1-20.9c.3-7.7 2.4-13.8 6.4-18.2 4.3-4.8 9.9-7.2 16.9-7.2 5.8 0 10.6 1.3 14.1 3.8 3.6 2.5 5.6 5.9 5.9 10.3v.5c0 2.5 2.1 4.6 4.6 4.6 2.5 0 4.6-2.1 4.6-4.6v-.5c-.7-6.6-3.7-11.9-9.1-15.8-5.4-4-12.2-5.9-20.4-5.9-9.7 0-17.6 3.2-23.5 9.6-5.6 6-8.6 13.8-8.9 23.5 0 .7-.1 1.3-.1 2l.1 18.8h-.1c0 10.7 3 19.2 9 25.5 6 6.4 13.8 9.6 23.5 9.6 8.2 0 14.9-1.9 20.4-5.9 5-3.6 7.9-8.4 8.9-14.3l.2-21c6.1-1.5 14.4-4.8 19.6-12.7 1.3-1.7.8-4-1-5.1z"})),"brizy"===c&&Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 150 100"},Object(r.createElement)("path",{d:"M14.6 36.7L75 0l60.4 36.7L75 73.4 14.6 36.7zm21.7.9L75 61.2l38.8-23.6L75 14 36.3 37.6z",fill:"#181c25"}),Object(r.createElement)("path",{fill:"#a7b2dd",d:"M14.6 63.2l10.8-6.5L75 86.8l49.9-30 10.5 6.4L75 100z"})),"elementor"===c&&Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 150 100"},Object(r.createElement)("path",{d:"M32.5 7.6h17v84.9h-17V7.6zm34 84.9h51v-17h-51v17zm0-34h51v-17h-51v17zm0-51v17h51v-17h-51z"}))),Object(r.createElement)("div",{className:"builder-name"},ae(c)||"Gutenberg"))})))))};function _e(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 Ee(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_e(Object(n),!0).forEach((function(t){we(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_e(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function we(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var xe=function(e){var t=e.demoConfiguration,n=e.setDemoConfiguration,c=(e.currentDemo,e.style);return Object(r.createElement)("div",{style:c},Object(r.createElement)("i",{className:"ct-demo-icon"},Object(r.createElement)("svg",{width:"40",height:"40",viewBox:"0 0 40 40"},Object(r.createElement)("path",{d:"M25,22.67a5,5,0,0,1-10,0H0V36a3.33,3.33,0,0,0,3.33,3.33H36.67A3.33,3.33,0,0,0,40,36V22.67Z",transform:"translate(0 -0.67)",fill:"#bdc8d7"}),Object(r.createElement)("rect",{x:"2.5",y:"14",width:"35",height:"3",rx:"1.5",fill:"#0c7ab3"}),Object(r.createElement)("rect",{x:"5",y:"7",width:"30",height:"3",rx:"1.5",fill:"#3497d3"}),Object(r.createElement)("rect",{x:"7.5",width:"25",height:"3",rx:"1.5",fill:"#44acdf"}))),Object(r.createElement)("h2",null,Object(a.__)("Import Content","blc")),Object(r.createElement)("p",null,Object(a.__)("This will import posts, pages, comments, navigation menus, custom fields, terms and custom posts","blc")),["options","widgets","content"].map((function(e){return Object(r.createElement)(ee,{checked:t.content[e],onChange:function(){return n(Ee(Ee({},t),{},{content:Ee(Ee({},t.content),{},we({},e,!t.content[e]))}))},key:e},e.split("_").map((function(e){return e.replace(/^\w/,(function(e){return e.toUpperCase()}))})).join(" "))})),Object(r.createElement)("div",{className:"ct-demo-erase"},Object(r.createElement)(ee,{checked:t.content.erase_content,onChange:function(){return n(Ee(Ee({},t),{},{content:Ee(Ee({},t.content),{},{erase_content:!t.content.erase_content})}))}},Object(r.createElement)("div",null,Object(a.__)("Clean Install","blc"),Object(r.createElement)("i",null,Object(a.__)("This option will remove the previous imported content and will perform a fresh and clean install.","blc"))))))},Se=function(){var e=Object(r.useContext)(Q),t=e.home_url,n=e.customizer_url;return Object(r.createElement)("div",{className:"ct-install-success"},Object(r.createElement)("h2",null,Object(a.__)("Starter Site Imported Successfully","blc")),Object(r.createElement)("p",null,Object(a.__)("Now you can view your website or start customizing it","blc")),Object(r.createElement)("div",null,Object(r.createElement)("a",{href:n,className:"ct-button"},Object(a.__)("Customize","blc")),Object(r.createElement)("a",{href:t,target:"_blank",className:"ct-button-primary"},Object(a.__)("View site","blc"))))},Ce=function(e,t){var n=e.action;if("complete"===n)return"";if("import_install_child"===n)return Object(a.__)("copying child theme sources","blc");if("import_activate_child"===n)return Object(a.__)("activating child theme","blc");if("install_plugin"===n)return Object(a.sprintf)(Object(a.__)("installing plugin %s","blc"),ae(e.name)||e.name);if("activate_plugin"===n)return Object(a.sprintf)(Object(a.__)("activating plugin %s","blc"),ae(e.name)||e.name);if("download_demo_widgets"===n)return Object(a.__)("downloading demo widgets","blc");if("apply_demo_widgets"===n)return Object(a.__)("installing demo widgets","blc");if("download_demo_options"===n)return Object(a.__)("downloading demo options","blc");if("import_mods_images"===n)return Object(a.__)("importing images from customizer","blc");if("import_customizer_options"===n)return Object(a.__)("import customizer options","blc");if("activate_required_extensions"===n)return Object(a.__)("activating required extensions","blc");if("erase_previous_posts"===n)return Object(a.__)("removing previously installed posts","blc");if("erase_previous_terms"===n)return Object(a.__)("removing previously installed taxonomies","blc");if("erase_default_pages"===n)return Object(a.__)("removing default WordPress pages","blc");if("erase_customizer_settings"===n)return Object(a.__)("resetting customizer options","blc");if("erase_widgets_data"===n)return Object(a.__)("resetting widgets","blc");if("content_installer_progress"===n){if(!e.kind)return"";var r=t.content.preliminary_data["".concat(e.kind,"_count")],c=t.content["".concat(e.kind,"_count")];return"".concat(Math.min(c,r)," of ").concat(r," ").concat({users:Object(a.__)("users","blc"),term:Object(a.__)("terms","blc"),media:Object(a.__)("images","blc"),post:Object(a.__)("posts","blc"),comment:Object(a.__)("comments","blc")}[e.kind])}return""};function ke(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 De(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ke(Object(n),!0).forEach((function(t){ze(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ke(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ze(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ae(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,c=!1,o=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){c=!0,o=e}finally{try{r||null==i.return||i.return()}finally{if(c)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Pe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Pe(e,t)}(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 Pe(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}var Me=function(e){e.preventDefault(),e.returnValue=""},Ne=function(e){var t=e.demoConfiguration,n=e.pluginsStatus,r=e.is_child_theme,c=e.includeMetaSteps,o=[];return void 0!==c&&c&&o.push("register_current_demo"),t.child_theme&&(r||o.push("child_theme")),t.plugins.filter((function(e){var t=e.enabled,r=e.plugin;return!!t&&!n[r]})).length>0&&o.push("plugins"),t.content.erase_content&&o.push("erase_content"),t.content.options&&o.push("options"),t.content.widgets&&o.push("widgets"),t.content.content&&o.push("content"),o.push("install_finish"),o},Le=function(e){var t=e.demoConfiguration,n=e.style,c=function(e){var t=Object(r.useContext)(Ye),n=t.demos_list,c=t.currentDemo,o=(t.setCurrentDemo,t.setInstallerBlockingReleased),i=t.setCurrentlyInstalledDemo,l=t.pluginsStatus,u=Object(r.useContext)(Q),s=(u.home_url,u.customizer_url,u.is_child_theme),f=(u.Link,Ae(Object(r.useState)(!1),2)),m=f[0],d=f[1],b=Ae(Object(r.useState)(0),2),p=b[0],h=b[1],v=Ae((c||"").split(":"),2),O=v[0],y=(v[1],n.filter((function(e){return e.name===O})).sort((function(e,t){return e.builder<t.builder?-1:e.builder>t.builder?1:0}))),j=e.plugins.filter((function(e){var t=e.enabled,n=e.plugin;return t&&!l[n]})).map((function(e){return e.plugin})),g=Ae(Object(r.useState)({register_current_demo:{title:Object(a.__)("Register demo","blc"),query_string:"action=blocksy_demo_register_current_demo&wp_customize=on&demo_name=".concat(c,":").concat(null===e.builder?y[0].builder:e.builder),expected_signals:1},child_theme:{title:Object(a.__)("Child theme","blc"),query_string:"action=blocksy_demo_install_child_theme",expected_signals:3},plugins:{title:Object(a.__)("Required plugins","blc"),query_string:"action=blocksy_demo_activate_plugins&plugins=".concat(j.join(":")),expected_signals:2*j.length+1},fake_step:{title:Object(a.__)("Fake Required plugins","blc"),query_string:"action=blocksy_demo_fake_step",expected_signals:6},erase_content:{title:Object(a.__)("Erase content","blc"),query_string:"action=blocksy_demo_erase_content&wp_customize=on",expected_signals:6},install_finish:{title:Object(a.__)("Final touches","blc"),query_string:"action=blocksy_demo_install_finish&wp_customize=on",expected_signals:1},options:{title:Object(a.__)("Import options","blc"),query_string:"action=blocksy_demo_install_options&wp_customize=on&demo_name=".concat(c,":").concat(null===e.builder?y[0].builder:e.builder),expected_signals:5},widgets:{title:Object(a.__)("Import widgets","blc"),query_string:"action=blocksy_demo_install_widgets&wp_customize=on&demo_name=".concat(c,":").concat(null===e.builder?y[0].builder:e.builder),expected_signals:3},content:{title:Object(a.__)("Import content","blc"),query_string:"action=blocksy_demo_install_content&wp_customize=on&demo_name=".concat(c,":").concat(null===e.builder?y[0].builder:e.builder),expected_signals:50}}),2),_=g[0],E=g[1],w=Ne({demoConfiguration:e,pluginsStatus:l,is_child_theme:s,includeMetaSteps:!0}),x=w[p],S=Ae(Object(r.useState)(0),2),C=S[0],k=S[1],D=Ae(Object(r.useState)(null),2),z=D[0],A=D[1],P=Object(r.useRef)(C),M=Object(r.useRef)(_);Object(r.useEffect)((function(){P.current=C,M.current=_}));var N=function(e){return"content"===e?1===w.length?100:50:w.indexOf("content")>-1?50/(w.length-1):100/w.length},L=w.reduce((function(e,t,n){return n>=p?e:e+N(t)}),0)+100*C/_[x].expected_signals*(N(x)/100),T=function(){var e=_[x],t=new EventSource("".concat(ctDashboardLocalizations.ajax_url,"?").concat(e.query_string));t.onmessage=function(e){var n=JSON.parse(e.data);if(k(P.current+1),"content_installer_progress"===n.action){var r=n.kind;r&&(A(n),E(De(De({},M.current),{},{content:De(De({},M.current.content),{},ze({},"".concat(r,"_count"),M.current.content["".concat(r,"_count")]+1))})))}else A(n);if("get_content_preliminary_data"===n.action){var c=n.data,a=(c.comment_count,c.media_count,c.post_count,c.term_count,c.users,De(De({},n.data),{},{term_count:n.data.terms.length,post_count:n.data.posts.filter((function(e){return"attachment"!==e.post_type})).length,media_count:n.data.posts.filter((function(e){return"attachment"===e.post_type})).length,comment_count:n.data.posts.reduce((function(e,t){return e+(t.comments||[]).length}),0),users_count:Object.keys(n.data.authors).length}));E(De(De({},M.current),{},{content:De(De({},M.current.content),{},{preliminary_data:a,comment_count:0,media_count:0,post_count:0,term_count:0,users_count:0,expected_signals:a.comment_count+a.media_count+a.post_count+a.term_count+a.users_count+3})}))}if("complete"===n.action){if(t&&t.close&&t.close(),p===w.length-1)return d(!0),o(!0),void window.removeEventListener("beforeunload",Me);A(null),k(0),h(Math.min(w.length-1,p+1))}}};return Object(r.useEffect)((function(){m||(A(null),k(0),"fake_step"===x?(console.log("here we go delay before fake_step"),setTimeout((function(){T()}),2e3)):T())}),[x]),Object(r.useEffect)((function(){return window.addEventListener("beforeunload",Me),i({demo:"".concat(c,":").concat(e.builder)}),function(){window.removeEventListener("beforeunload",Me)}}),[]),{isCompleted:m,stepName:x,stepsDescriptors:_,lastMessage:z,progress:L}}(t),o=c.isCompleted,i=c.stepName,l=c.stepsDescriptors,u=c.lastMessage,s=c.progress;return Object(r.createElement)("div",{className:"ct-demo-install",style:n},Object(r.createElement)(A.Transition,{initial:!0,items:o,from:{opacity:0},enter:[{opacity:1}],leave:[{opacity:0}],config:function(e,t){return"leave"===t?{duration:300}:{delay:300,duration:300}}},(function(e){return function(t){return Object(r.createElement)("div",{style:t},e?Object(r.createElement)(Se,null):Object(r.createElement)(r.Fragment,null,Object(r.createElement)("i",{className:"ct-demo-icon"},Object(r.createElement)("svg",{width:"40",height:"40",viewBox:"0 0 50 50"},Object(r.createElement)("path",{class:"g1",d:"M47,38.8c0.3-1,0.5-2,0.5-3.1c0-1.1-0.2-2.1-0.5-3.1l0.2-0.1l1.8-1.7l-1.8-3.1l-2.3,0.7l-0.2,0.1c-1.4-1.5-3.3-2.7-5.4-3.1V25l-0.6-2.4h-3.5L34.5,25v0.3c-2.1,0.5-4,1.6-5.4,3.1l-0.2-0.1l-2.3-0.7l-1.8,3.1l1.7,1.7l0.2,0.1c-0.3,1-0.5,2-0.5,3.1c0,1.1,0.2,2.1,0.5,3.1l-0.2,0.1l-1.8,1.7l1.8,3.1l2.3-0.7l0.2-0.1c1.4,1.5,3.3,2.7,5.4,3.1v0.3l0.6,2.4h3.5l0.6-2.4V46c2.1-0.5,4-1.6,5.4-3.1l0.2,0.1l2.3,0.7l1.8-3.1l-1.7-1.7L47,38.8z M36.9,41.5c-3.3,0-5.9-2.6-5.9-5.9s2.6-5.9,5.9-5.9s5.9,2.6,5.9,5.9S40.1,41.5,36.9,41.5z"}),Object(r.createElement)("path",{class:"g2",d:"M21.2,32.2c0.2-0.8,0.4-1.7,0.4-2.5c0-0.9-0.1-1.7-0.4-2.5l0.3-0.2l1.7-1.7l-1.8-3.1L19.1,23l-0.3,0.2c-1.2-1.2-2.7-2.1-4.4-2.5v-0.3l-0.6-2.4h-3.5l-0.6,2.4v0.3c-1.7,0.4-3.2,1.3-4.4,2.5L5.1,23l-2.3-0.7L1,25.4L2.7,27L3,27.2c-0.2,0.8-0.4,1.7-0.4,2.5c0,0.9,0.1,1.7,0.4,2.5l-0.3,0.1L1,34.1l1.8,3.1l2.3-0.7l0.3-0.1c1.2,1.2,2.7,2.1,4.4,2.5v0.3l0.6,2.4h3.5l0.6-2.4v-0.3c1.7-0.4,3.2-1.3,4.4-2.5l0.3,0.1l2.3,0.7l1.8-3.1l-1.7-1.7L21.2,32.2z M12.1,34.4c-2.6,0-4.7-2.1-4.7-4.7S9.5,25,12.1,25s4.7,2.1,4.7,4.7S14.7,34.4,12.1,34.4z"}),Object(r.createElement)("path",{class:"g3",d:"M37.7,15.7c0.2-0.8,0.4-1.7,0.4-2.5c0-0.9-0.1-1.7-0.4-2.5l0.3-0.2l1.7-1.7l-1.8-3.1l-2.3,0.7l-0.3,0.2c-1.2-1.2-2.7-2.1-4.4-2.5V3.8l-0.6-2.4h-3.5l-0.6,2.4v0.3c-1.7,0.4-3.2,1.3-4.4,2.5l-0.3-0.2l-2.3-0.7l-1.8,3.1l1.7,1.7l0.3,0.2c-0.2,0.8-0.4,1.7-0.4,2.5c0,0.9,0.1,1.7,0.4,2.5l-0.3,0.1l-1.7,1.7l1.8,3.1l2.3-0.7l0.3-0.1c1.2,1.2,2.7,2.1,4.4,2.5v0.3l0.6,2.4h3.5l0.6-2.4v-0.3c1.7-0.4,3.2-1.3,4.4-2.5l0.3,0.1l2.3,0.7l1.8-3.1L38,15.9L37.7,15.7z M28.6,17.9c-2.6,0-4.7-2.1-4.7-4.7s2.1-4.7,4.7-4.7s4.7,2.1,4.7,4.7S31.2,17.9,28.6,17.9z"}))),Object(r.createElement)("h2",null,Object(a.__)("Installing","blc"),"..."),Object(r.createElement)("p",null,Object(a.__)("Please be patient and don't refresh this page, the import process may take a while, this also depends on your server.","blc")),Object(r.createElement)("div",{className:"ct-progress-info"},l[i].title,u&&Ce(u,l)?": ".concat(Ce(u,l)):"",Object(r.createElement)("span",null,Math.round(s),"%")),Object(r.createElement)("div",{style:{"--progress":"".concat(s,"%")},className:"ct-installer-progress"},Object(r.createElement)("div",null))))}})))};function Te(e){return function(e){if(Array.isArray(e))return Ue(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Re(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.")}()}function Ie(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,c=!1,o=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){c=!0,o=e}finally{try{r||null==i.return||i.return()}finally{if(c)throw o}}return n}(e,t)||Re(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 Re(e,t){if(e){if("string"==typeof e)return Ue(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)?Ue(e,t):void 0}}function Ue(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}var Fe=function(e){e.location,e.navigate;var t=Ie(Object(r.useState)(!0),2),n=(t[0],t[1],Object(r.useContext)(Ye)),c=n.installerBlockingReleased,o=n.demos_list,i=n.currentDemo,u=n.pluginsStatus,s=n.currentlyInstalledDemo,f=n.setCurrentDemo,m=Object(r.useContext)(Q).is_child_theme,d=Ie(Object(r.useState)(s),2),b=d[0],p=d[1],h=Ie(Object(r.useState)({builder:"",child_theme:!1,plugins:[],content:{options:!0,widgets:!0,content:!0,erase_content:!0}}),2),v=h[0],O=h[1],y=Ie(Object(r.useState)(0),2),j=y[0],g=y[1],_=Ie((i||"").split(":"),2),E=_[0],w=(_[1],["modify_demo","child_theme","builder","plugins","content","installer"].filter((function(e){if(!i)return!1;if("modify_demo"===e){if(!b)return!1;if(-1===b.demo.indexOf(E))return!1}if("child_theme"===e&&m)return!1;var t=o.filter((function(e){return e.name===E})).sort((function(e,t){return e.builder<t.builder?-1:e.builder>t.builder?1:0}));return("plugins"!==e||0!==t.reduce((function(e,t){return[].concat(Te(e),Te(t.plugins||[]))}),[]).filter((function(e){return!u[e]})).length)&&("builder"!==e||t.length>1)}))),x=w[j];return Object(r.useEffect)((function(){if(E&&!(i.indexOf(":hide")>-1)){var e=o.filter((function(e){return e.name===E})).sort((function(e,t){return e.builder<t.builder?-1:e.builder>t.builder?1:0}));g(0),p(s),O({builder:1===e.length?e[0].builder:null,child_theme:!0,plugins:e[0].plugins.map((function(e){return{plugin:e,enabled:!0}})),content:{options:!0,widgets:!0,content:!0,erase_content:!0}})}}),[i]),Object(r.createElement)(M,{items:i,isVisible:function(e){return e&&-1===e.indexOf(":hide")},className:l()("ct-demo-modal",{"ct-demo-installer":"installer"===x||"modify_demo"===x}),onDismiss:function(){("installer"!==x||c)&&f("".concat(E,":hide"))},render:function(){return Object(r.createElement)("div",{className:"ct-modal-content ct-demo-step-container"},Object(r.createElement)("div",{className:"ct-current-step"},Object(r.createElement)(A.Transition,{items:x,from:{opacity:0},enter:{opacity:1},leave:{opacity:0},initial:!1,config:function(e,t){return"leave"===t?{duration:150}:{delay:150,duration:150}}},(function(e){return function(t){return Object(r.createElement)(r.Fragment,null,"modify_demo"===e&&Object(r.createElement)(fe,{demoConfiguration:v,nextStep:function(){g(Math.min(j+1,w.length-1))},style:t}),"child_theme"===e&&Object(r.createElement)(pe,{style:t,demoConfiguration:v,setDemoConfiguration:O}),"plugins"===e&&Object(r.createElement)(ie,{demoConfiguration:v,style:t,setDemoConfiguration:O}),"builder"===e&&Object(r.createElement)(ge,{style:t,demoConfiguration:v,setDemoConfiguration:O}),"content"===e&&Object(r.createElement)(xe,{style:t,demoConfiguration:v,setDemoConfiguration:O}),"installer"===e&&Object(r.createElement)(Le,{style:t,demoConfiguration:v}))}}))),"installer"!==x&&"modify_demo"!==x&&Object(r.createElement)("div",{className:"ct-demo-step-controls"},j>0&&Object(r.createElement)("button",{className:"ct-demo-btn demo-back-btn",onClick:function(){g(Math.max(j-1,0))}},Object(a.__)("Back","blc")),w.length>2&&Object(r.createElement)("ul",{className:"ct-steps-pills"},w.map((function(e,t){return t===w.length-1?null:Object(r.createElement)("li",{className:l()({active:e===x}),key:e},t+1)}))),Object(r.createElement)("button",{className:"ct-demo-btn demo-main-btn",disabled:"content"===x&&0===Ne({demoConfiguration:v,pluginsStatus:u,is_child_theme:m}).length,onClick:function(){g(Math.min(j+1,w.length-1))}},"content"===x?Object(a.__)("Install","blc"):Object(a.__)("Next","blc"))))}})},Be=n(7),Ve=n.n(Be);function qe(e,t,n,r,c,o,a){try{var i=e[o](a),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,c)}function He(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,c=!1,o=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){c=!0,o=e}finally{try{r||null==i.return||i.return()}finally{if(c)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return We(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return We(e,t)}(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 We(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}var Ze=function(){var e=He(Object(r.useState)(!1),2),t=e[0],n=e[1],c=He(Object(r.useState)(!1),2),o=c[0],i=c[1],l=He(Object(r.useState)(""),2),u=l[0],s=l[1],f=He(Object(r.useState)(""),2),m=f[0],d=f[1],b=He(Object(r.useState)("coblocks,elementor,contact-form-7"),2),p=b[0],h=b[1],v=He(Object(r.useState)(""),2),O=v[0],y=v[1],j=He(Object(r.useState)(!1),2),g=j[0],_=j[1],E=function(){var e,t=(e=regeneratorRuntime.mark((function e(){var t,r,c,o,a,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n(!0),(t=new FormData).append("action","blocksy_demo_export"),t.append("name",u),t.append("is_pro",g),t.append("url",O),t.append("builder",m),t.append("plugins",p),t.append("wp_customize","on"),e.prev=9,e.next=12,fetch(ctDashboardLocalizations.ajax_url,{method:"POST",body:t});case 12:if(200!==(r=e.sent).status){e.next=20;break}return e.next=16,r.json();case 16:c=e.sent,o=c.success,a=c.data,o&&(i=new Blob([JSON.stringify(a.demo)],{type:"text/plain;charset=utf-8"}),Ve.a.saveAs(i,"".concat(u,".json")));case 20:e.next=24;break;case 22:e.prev=22,e.t0=e.catch(9);case 24:n(!1);case 25:case"end":return e.stop()}}),e,null,[[9,22]])})),function(){var t=this,n=arguments;return new Promise((function(r,c){var o=e.apply(t,n);function a(e){qe(o,r,c,a,i,"next",e)}function i(e){qe(o,r,c,a,i,"throw",e)}a(void 0)}))});return function(){return t.apply(this,arguments)}}();return ct_localizations.is_dev_mode?Object(r.createElement)("div",{className:"ct-export"},Object(r.createElement)("button",{className:"ct-button",onClick:function(e){i(!0)}},Object(a.__)("Site export")),Object(r.createElement)(M,{items:o,className:"ct-site-export-modal",onDismiss:function(){return i(!1)},render:function(){return Object(r.createElement)("div",{className:"ct-site-export"},Object(r.createElement)("label",null,Object(a.__)("Name","blc"),Object(r.createElement)("input",{type:"text",placeholder:Object(a.__)("Name","blc"),value:u,onChange:function(e){var t=e.target.value;return s(t)}})),Object(r.createElement)("label",null,Object(a.__)("Preview URL","blc"),Object(r.createElement)("input",{type:"text",placeholder:Object(a.__)("Preview URL","blc"),value:O,onChange:function(e){var t=e.target.value;return y(t)}})),Object(r.createElement)("label",null,Object(a.__)("PRO","blc"),Object(r.createElement)("input",{type:"checkbox",value:g,onChange:function(e){e.target.value;return _(!g)}})),Object(r.createElement)("label",null,Object(a.__)("Builder","blc"),Object(r.createElement)("input",{type:"text",placeholder:Object(a.__)("Builder","blc"),value:m,onChange:function(e){var t=e.target.value;return d(t)}})),Object(r.createElement)("label",null,Object(a.__)("Plugins","blc"),Object(r.createElement)("textarea",{placeholder:Object(a.__)("Plugins","blc"),value:p,onChange:function(e){var t=e.target.value;return h(t)}})),Object(r.createElement)("button",{className:"ct-button",disabled:t,onClick:function(){return E()}},t?Object(a.__)("Loading...","blc"):Object(a.__)("Export site","blc")))}})):null};function $e(e,t,n,r,c,o,a){try{var i=e[o](a),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,c)}function Ke(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,c=!1,o=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){c=!0,o=e}finally{try{r||null==i.return||i.return()}finally{if(c)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ge(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ge(e,t)}(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 Ge(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}var Ye=Object(r.createContext)({demos:[]}),Je=null,Xe=null,Qe=function(e){e.children,e.path,e.location;var t=Ke(Object(r.useState)(!Je),2),n=t[0],c=t[1],o=Ke(Object(r.useState)(Je||[]),2),i=o[0],l=o[1],u=Ke(Object(r.useState)(Xe||{}),2),s=u[0],f=u[1],m=Ke(Object(r.useState)(null),2),d=m[0],b=m[1],p=Ke(Object(r.useState)(null),2),h=p[0],v=p[1],O=Ke(Object(r.useState)(!1),2),y=O[0],j=O[1],g=Ke(Object(r.useState)({builder:""}),2),_=(g[0],g[1],Ke(Object(r.useState)(!1),2)),E=_[0],w=_[1],x=function(){var e,t=(e=regeneratorRuntime.mark((function e(){var t,n,r,o,a,i=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i.length>0&&void 0!==i[0]&&i[0]&&c(!0),(t=new FormData).append("action","blocksy_demo_list"),e.prev=4,e.next=7,fetch(ctDashboardLocalizations.ajax_url,{method:"POST",body:t});case 7:if(200!==(n=e.sent).status){e.next=15;break}return e.next=11,n.json();case 11:r=e.sent,o=r.success,a=r.data,o&&(l(a.demos),f(a.active_plugins),v(a.current_installed_demo),j(a.demo_error),Xe=a.active_plugins,Je=a.demos,a.demo_error);case 15:e.next=19;break;case 17:e.prev=17,e.t0=e.catch(4);case 19:c(!1);case 20:case"end":return e.stop()}}),e,null,[[4,17]])})),function(){var t=this,n=arguments;return new Promise((function(r,c){var o=e.apply(t,n);function a(e){$e(o,r,c,a,i,"next",e)}function i(e){$e(o,r,c,a,i,"throw",e)}a(void 0)}))});return function(){return t.apply(this,arguments)}}();return Object(r.useEffect)((function(){x(!Je)}),[]),Object(r.createElement)("div",{className:"ct-demos-list-container"},y&&Object(r.createElement)("div",{className:"ct-demo-notification",dangerouslySetInnerHTML:{__html:y}}),Object(r.createElement)(A.Transition,{items:n,from:{opacity:0},enter:[{opacity:1}],leave:[{opacity:0}],config:function(e,t){return"leave"===t?{duration:300}:{delay:300,duration:300}}},(function(e){return e?function(e){return Object(r.createElement)(A.animated.p,{style:e,className:"ct-loading-text"},Object(r.createElement)("span",null),Object(a.__)("Loading Starter Sites...","blc"))}:0===i.length?function(e){return Object(r.createElement)(A.animated.div,{style:e},Object(r.createElement)("div",{className:"ct-demo-notification",dangerouslySetInnerHTML:{__html:Object(a.__)("Connection to <b>demo.creativethemes.com</b> server didn't worked -- this is required for downloading the starter sites. You need to contact your hosting provider to figure out why your server can't reach to our server.")}}),Object(r.createElement)(V,null))}:function(e){return Object(r.createElement)(A.animated.div,{style:e},Object(r.createElement)(r.Fragment,null,Object(r.createElement)(Ye.Provider,{value:{demo_error:y,demos_list:i.filter((function(e){return!e.dev||ct_localizations.is_dev_mode})),currentDemo:d,pluginsStatus:s,installerBlockingReleased:E,setInstallerBlockingReleased:w,setCurrentDemo:b,currentlyInstalledDemo:h,setCurrentlyInstalledDemo:v}},Object(r.createElement)(le,null),Object(r.createElement)(Fe,null),Object(r.createElement)(Ze,null)),Object(r.createElement)(V,null)))}})))};function et(e,t,n,r,c,o,a){try{var i=e[o](a),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,c)}var tt=function(){var e=function(){var e,t=(e=regeneratorRuntime.mark((function e(){var t,n,r,c,o,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(t=new FormData).append("action","blocksy_fs_connect_again"),e.prev=2,e.next=5,fetch(ctDashboardLocalizations.ajax_url,{method:"POST",body:t});case 5:if(200!==(n=e.sent).status){e.next=13;break}return e.next=9,n.json();case 9:r=e.sent,c=r.success,r.data,c&&((o=document.createElement("div")).innerHTML=ctDashboardLocalizations.plugin_data.connect_template,a=o.querySelector("form"),document.body.appendChild(a),a.submit());case 13:e.next=17;break;case 15:e.prev=15,e.t0=e.catch(2);case 17:case"end":return e.stop()}}),e,null,[[2,15]])})),function(){var t=this,n=arguments;return new Promise((function(r,c){var o=e.apply(t,n);function a(e){et(o,r,c,a,i,"next",e)}function i(e){et(o,r,c,a,i,"throw",e)}a(void 0)}))});return function(){return t.apply(this,arguments)}}();return Object(r.createElement)("div",{className:"ct-freemius-optin-message"},Object(r.createElement)("i",null,Object(r.createElement)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},Object(r.createElement)("path",{d:"M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"}),Object(r.createElement)("path",{d:"M13.73 21a2 2 0 0 1-3.46 0"}))),Object(r.createElement)("h2",null,Object(a.__)("Stay Updated","blc")),Object(r.createElement)("p",null,Object(a.__)("Never miss an important update - opt in to our security & feature updates notifications, and non-sensitive diagnostic tracking.","blc")),Object(r.createElement)("button",{className:"ct-button-primary",onClick:function(t){t.preventDefault(),e()}},Object(a.__)("Allow & Continue","blc")))};o.a.on("ct:dashboard:routes",(function(e){e.push({Component:function(){return Object(r.createElement)(J,null)},path:"/extensions"}),"yes"===ctDashboardLocalizations.plugin_data.has_demo_install&&e.push({Component:function(e){return Object(r.createElement)(Qe,e)},path:"/demos"})})),o.a.on("ct:dashboard:navigation-links",(function(e){"yes"===ctDashboardLocalizations.plugin_data.has_demo_install&&e.push({text:Object(a.__)("Starter Sites","blc"),path:"demos",getProps:function(e){var t=e.isPartiallyCurrent;e.isCurrent;return t?{"aria-current":"page"}:{}}}),e.push({text:Object(a.__)("Extensions","blc"),path:"/extensions"})})),o.a.on("ct:dashboard:home:before",(function(e){ctDashboardLocalizations.plugin_data.is_anonymous&&(e.content=Object(r.createElement)(tt,null))})),o.a.on("ct:dashboard:heading:after",(function(e){ctDashboardLocalizations.plugin_data.is_pro&&(e.content=Object(r.createElement)("span",null,"PRO"))}))}]);
static/bundle/main.js CHANGED
@@ -1 +1 @@
1
- !function(e){var t={};function r(o){if(t[o])return t[o].exports;var n=t[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,r),n.l=!0,n.exports}r.m=e,r.c=t,r.d=function(e,t,o){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(o,n,function(t){return e[t]}.bind(null,n));return o},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=2)}([function(e,t){e.exports=window.ctEvents},function(e,t){e.exports=window.ctFrontend},function(e,t,r){"use strict";r.r(t),r.d(t,"onDocumentLoaded",(function(){return w}));var o=r(0),n=r.n(o),a=function(e,t){var r=t.screen,o=void 0===r?"login":r;e.querySelector("ul")&&e.querySelector("ul .ct-".concat(o))&&(e.querySelector("ul .active").classList.remove("active"),e.querySelector("ul .ct-".concat(o)).classList.add("active")),e.querySelector('[class*="-form"].active').classList.remove("active"),e.querySelector(".ct-".concat(o,"-form")).classList.add("active"),e.querySelector(".ct-".concat(o,"-form form"))&&e.querySelector(".ct-".concat(o,"-form form")).reset(),e.querySelector(".ct-account-form").classList.remove("ct-error");var n=e.querySelector(".ct-".concat(o,"-form")).querySelector(".ct-message");n&&n.remove();var a=e.querySelector(".ct-".concat(o,"-form")).querySelector(".ct-errors");a&&a.remove()},c=function(e,t){var r=(new DOMParser).parseFromString(t,"text/html"),o=e.querySelector(".ct-errors");o&&o.remove(),e.closest(".ct-account-form").classList.remove("ct-error");var n=r.querySelector("#login_error");return n&&(e.insertAdjacentHTML("afterbegin",'<div class="ct-errors">'.concat(n.innerHTML,"</div>")),requestAnimationFrame((function(){e.closest(".ct-account-form").classList.add("ct-error")}))),{hasError:!!n,doc:r}},i=function(e,t){var r=(new DOMParser).parseFromString(t,"text/html"),o=e.querySelector(".ct-message");o&&o.remove();var n=e.querySelector(".ct-errors");n&&n.remove();var a=r.querySelector(".message");return e.closest(".ct-account-form").classList.remove("ct-error"),a&&e.insertAdjacentHTML("afterbegin",'<div class="ct-message">'.concat(a.innerHTML,"</div>")),{doc:r}},s=function(){Array.from(document.querySelectorAll(".ct-header-account[href]")).map((function(e){e.hasSearchEventListener||(e.hasSearchEventListener=!0,e.addEventListener("click",(function(t){t.preventDefault();try{document.querySelector(e.hash)}catch(t){return}a(document.querySelector(e.hash),{screen:"login"}),n.a.trigger("ct:overlay:handle-click",{e:t,href:e.hash,options:{isModal:!0}})})),document.querySelector("#account-modal")&&function(e){if(e){e.addEventListener("click",(function(t){t.target.href&&t.target.href.indexOf("lostpassword")>-1&&(a(e,{screen:"forgot-password"}),t.preventDefault()),t.target.href&&t.target.href.indexOf("wp-login")>-1&&-1===t.target.href.indexOf("lostpassword")&&(a(e,{screen:"login"}),t.preventDefault())}),!0);var t=e.querySelector('[name="loginform"]'),r=e.querySelector('[name="registerform"]'),o=e.querySelector('[name="lostpasswordform"]');t&&t.addEventListener("submit",(function(e){e.preventDefault(),window.ct_customizer_localizations||fetch(t.action,{method:t.method,body:new FormData(t)}).then((function(e){return e.text()})).then((function(e){var r=c(t.closest(".ct-login-form"),e);r.doc;r.hasError||(location=t.querySelector('[name="redirect_to"]').value)}))})),r&&r.addEventListener("submit",(function(e){e.preventDefault(),window.ct_customizer_localizations||fetch(r.action,{method:r.method,body:new FormData(r)}).then((function(e){return e.text()})).then((function(e){var t=c(r.closest(".ct-register-form"),e);t.doc;t.hasError||i(r.closest(".ct-register-form"),e)}))})),o&&o.addEventListener("submit",(function(e){e.preventDefault(),window.ct_customizer_localizations||fetch(o.action,{method:o.method,body:new FormData(o)}).then((function(e){return e.text()})).then((function(e){var t=c(o.closest(".ct-forgot-password-form"),e);t.doc;t.hasError||i(o.closest(".ct-forgot-password-form"),e)}))})),["login","register","forgot-password"].map((function(t){Array.from(e.querySelectorAll(".ct-".concat(t))).map((function(r){r.addEventListener("click",(function(r){r.preventDefault(),a(e,{screen:t})}))}))}))}}(document.querySelector("#account-modal")))}))},u=r(1);function l(e){return function(e){if(Array.isArray(e))return d(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return d(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 d(e,t)}(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.")}()}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}var y=!1,f=function(e,t,r){return Math.max(e,Math.min(t,r))},m=function(e,t,r){return t[0]+(t[1]-t[0])/(e[1]-e[0])*(r-e[0])},p=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"yes";Array.from(e.querySelectorAll("[data-row][data-transparent-row]")).map((function(e){e.dataset.transparentRow=t}))},h=function(e){return parseFloat(getComputedStyle(e).getPropertyValue("--height"))},v=function(e){var t=getComputedStyle(e).getPropertyValue("--stickyShrink");return t?parseFloat(t)/100*h(e):h(e)};var g=!1,S=function(){if(document.querySelector("[data-sticky]")){var e=window.scrollY,t=function(){var t=document.querySelector('[data-device="'.concat(Object(u.getCurrentScreen)(),'"] [data-sticky]'));if(t){var r=function(e){if(-1===e.dataset.sticky.indexOf("shrink")&&-1===e.dataset.sticky.indexOf("auto-hide"))return e.parentNode.getBoundingClientRect().height+200;var t=e.closest("header").getBoundingClientRect().top+scrollY,r=e.parentNode;return 1===r.parentNode.children.length||r.parentNode.children[0].classList.contains("ct-sticky-container")?t:Array.from(r.parentNode.children).reduce((function(e,t,r){return e.indexOf(0)>-1||!t.dataset.row?[].concat(l(e),[0]):[].concat(l(e),[t.classList.contains("ct-sticky-container")?0:t.getBoundingClientRect().height])}),[]).reduce((function(e,t){return e+t}),t)}(t),o=r>0&&Math.abs(window.scrollY-r)<3||window.scrollY>r,n=t.dataset.sticky.split(":").filter((function(e){return"yes"!==e&&"no"!==e})),a=Array.from(t.querySelectorAll("[data-row]")).reduce((function(e,t){return e+parseFloat(getComputedStyle(t).getPropertyValue("--height"))}),0);if(n.indexOf("auto-hide")>-1){if(window.scrollY<r&&(e=window.scrollY),o&&window.scrollY-e==0&&document.body.style.setProperty("--headerStickyHeightAnimated","0px"),o&&window.scrollY-e<-5)-1===t.dataset.sticky.indexOf("yes")&&(t.dataset.sticky=["yes-start"].concat(l(n)).join(":"),requestAnimationFrame((function(){t.dataset.sticky=t.dataset.sticky.replace("yes-start","yes-end"),setTimeout((function(){t.dataset.sticky=t.dataset.sticky.replace("yes-end","yes")}),200)}))),p(t,"no"),document.body.removeAttribute("style"),t.parentNode.style.setProperty("--minHeight","".concat(a,"px"));else{if(!o)return t.dataset.sticky=n.filter((function(e){return"yes-end"!==e})).join(":"),t.parentNode.removeAttribute("style"),Array.from(t.querySelectorAll("[data-row]")).map((function(e){return e.removeAttribute("style")})),p(t,"yes"),document.body.style.setProperty("--headerStickyHeightAnimated","0px"),void(e=window.scrollY);-1===t.dataset.sticky.indexOf("yes-hide")&&t.dataset.sticky.indexOf("yes:")>-1&&window.scrollY-e>5&&(t.dataset.sticky=["yes-hide-start"].concat(l(n)).join(":"),document.body.style.setProperty("--headerStickyHeightAnimated","0px"),requestAnimationFrame((function(){t.dataset.sticky=t.dataset.sticky.replace("yes-hide-start","yes-hide-end"),setTimeout((function(){t.dataset.sticky=n.join(":"),t.parentNode.removeAttribute("style"),Array.from(t.querySelectorAll("[data-row]")).map((function(e){return e.removeAttribute("style")})),p(t,"yes")}),200)})))}e=window.scrollY}if((n.indexOf("slide")>-1||n.indexOf("fade")>-1)&&(o?(-1===t.dataset.sticky.indexOf("yes")&&(t.dataset.sticky=["yes-start"].concat(l(n)).join(":"),requestAnimationFrame((function(){t.dataset.sticky=t.dataset.sticky.replace("yes-start","yes-end"),setTimeout((function(){t.dataset.sticky=t.dataset.sticky.replace("yes-end","yes")}),200)}))),p(t,"no"),t.parentNode.style.setProperty("--minHeight","".concat(a,"px"))):-1===t.dataset.sticky.indexOf("yes-hide")&&t.dataset.sticky.indexOf("yes:")>-1&&(Math.abs(window.scrollY-r)>10?(t.dataset.sticky=n.join(":"),setTimeout((function(){t.parentNode.removeAttribute("style"),Array.from(t.querySelectorAll("[data-row]")).map((function(e){return e.removeAttribute("style")}))}),300),p(t,"yes")):(t.dataset.sticky=["yes-hide-start"].concat(l(n)).join(":"),requestAnimationFrame((function(){t.dataset.sticky=t.dataset.sticky.replace("yes-hide-start","yes-hide-end"),setTimeout((function(){t.dataset.sticky=n.join(":"),setTimeout((function(){t.parentNode.removeAttribute("style"),Array.from(t.querySelectorAll("[data-row]")).map((function(e){return e.removeAttribute("style")}))}),300),p(t,"yes")}),200)}))))),n.indexOf("shrink")>-1){if(o){p(t,"no"),t.parentNode.style.setProperty("--minHeight","".concat(a,"px"));var c=Array.from(t.querySelectorAll("[data-row]")).reduce((function(e,t,r){return e+v(t)}),0);l(t.querySelectorAll('[data-row="middle"]')).map((function(e){if(e.querySelector('[data-id="logo"] .site-logo-container')){var t=e.querySelector('[data-id="logo"] .site-logo-container'),o=parseFloat(getComputedStyle(t).getPropertyValue("--maxHeight")||50),n=parseFloat(getComputedStyle(t).getPropertyValue("--logoStickyShrink")||1),a=o*n;if(1===n)return;var c=h(e),i=v(e);t.style.setProperty("--logo-shrink-height",m([r,r+Math.abs(c===i?o-a:c-i)],[1,n],f(r,r+Math.abs(c===i?o-a:c-i),scrollY)))}})),c!==a&&t.querySelector('[data-row="middle"]')&&[t.querySelector('[data-row="middle"]')].map((function(e){var t=h(e),o=v(e);e.style.setProperty("--shrinkHeight","".concat(m([r,r+Math.abs(t-o)],[t,o],f(r,r+Math.abs(t-o),scrollY)),"px"))}))}else t.parentNode.removeAttribute("style"),Array.from(t.querySelectorAll("[data-row]")).map((function(e){return e.removeAttribute("style")})),Array.from(t.querySelectorAll('[data-row="middle"] .site-logo-container')).map((function(e){return e.removeAttribute("style")})),p(t,"yes");var i=t.dataset.sticky.split(":").filter((function(e){return"yes"!==e&&"no"!==e}));t.dataset.sticky=(o?["yes"].concat(l(i)):i).join(":")}}};t(),g||(g=!0,window.addEventListener("scroll",(function(){y||(y=!0,requestAnimationFrame((function(){t(),y=!1})))})))}},w=function(e){/comp|inter|loaded/.test(document.readyState)?e():document.addEventListener("DOMContentLoaded",e,!1)};w((function(){s(),S()})),n.a.on("blocksy:frontend:init",(function(){s(),S()}))}]);
1
+ !function(e){var t={};function r(o){if(t[o])return t[o].exports;var n=t[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,r),n.l=!0,n.exports}r.m=e,r.c=t,r.d=function(e,t,o){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(o,n,function(t){return e[t]}.bind(null,n));return o},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=2)}([function(e,t){e.exports=window.ctEvents},function(e,t){e.exports=window.ctFrontend},function(e,t,r){"use strict";r.r(t);var o=r(0),n=r.n(o),a=r(1),c=function(e,t){var r=t.screen,o=void 0===r?"login":r;e.querySelector("ul")&&e.querySelector("ul .ct-".concat(o))&&(e.querySelector("ul .active").classList.remove("active"),e.querySelector("ul .ct-".concat(o)).classList.add("active")),e.querySelector('[class*="-form"].active').classList.remove("active"),e.querySelector(".ct-".concat(o,"-form")).classList.add("active"),e.querySelector(".ct-".concat(o,"-form form"))&&e.querySelector(".ct-".concat(o,"-form form")).reset(),e.querySelector(".ct-account-form").classList.remove("ct-error");var n=e.querySelector(".ct-".concat(o,"-form")).querySelector(".ct-message");n&&n.remove();var a=e.querySelector(".ct-".concat(o,"-form")).querySelector(".ct-errors");a&&a.remove()},i=function(e,t){var r=(new DOMParser).parseFromString(t,"text/html"),o=e.querySelector(".ct-errors");o&&o.remove(),e.closest(".ct-account-form").classList.remove("ct-error");var n=r.querySelector("#login_error");return n&&(e.insertAdjacentHTML("afterbegin",'<div class="ct-errors">'.concat(n.innerHTML,"</div>")),requestAnimationFrame((function(){e.closest(".ct-account-form").classList.add("ct-error")}))),{hasError:!!n,doc:r}},s=function(e,t){var r=(new DOMParser).parseFromString(t,"text/html"),o=e.querySelector(".ct-message");o&&o.remove();var n=e.querySelector(".ct-errors");n&&n.remove();var a=r.querySelector(".message");return e.closest(".ct-account-form").classList.remove("ct-error"),a&&e.insertAdjacentHTML("afterbegin",'<div class="ct-message">'.concat(a.innerHTML,"</div>")),{doc:r}},u=function(){Array.from(document.querySelectorAll(".ct-header-account[href]")).map((function(e){e.hasSearchEventListener||(e.hasSearchEventListener=!0,e.addEventListener("click",(function(t){try{document.querySelector(e.hash)}catch(t){return}t.preventDefault(),c(document.querySelector(e.hash),{screen:"login"}),n.a.trigger("ct:overlay:handle-click",{e:t,href:e.hash,options:{isModal:!0}})})),document.querySelector("#account-modal")&&function(e){if(e){e.addEventListener("click",(function(t){t.target.href&&t.target.href.indexOf("lostpassword")>-1&&(c(e,{screen:"forgot-password"}),t.preventDefault()),t.target.href&&t.target.href.indexOf("wp-login")>-1&&-1===t.target.href.indexOf("lostpassword")&&(c(e,{screen:"login"}),t.preventDefault())}),!0);var t=e.querySelector('[name="loginform"]'),r=e.querySelector('[name="registerform"]'),o=e.querySelector('[name="lostpasswordform"]');t&&t.addEventListener("submit",(function(e){e.preventDefault(),window.ct_customizer_localizations||fetch(t.action,{method:t.method,body:new FormData(t)}).then((function(e){return e.text()})).then((function(e){var r=i(t.closest(".ct-login-form"),e);r.doc;r.hasError||(location=t.querySelector('[name="redirect_to"]').value)}))})),r&&r.addEventListener("submit",(function(e){e.preventDefault(),window.ct_customizer_localizations||fetch(r.action,{method:r.method,body:new FormData(r)}).then((function(e){return e.text()})).then((function(e){var t=i(r.closest(".ct-register-form"),e);t.doc;t.hasError||s(r.closest(".ct-register-form"),e)}))})),o&&o.addEventListener("submit",(function(e){e.preventDefault(),window.ct_customizer_localizations||fetch(o.action,{method:o.method,body:new FormData(o)}).then((function(e){return e.text()})).then((function(e){var t=i(o.closest(".ct-forgot-password-form"),e);t.doc;t.hasError||s(o.closest(".ct-forgot-password-form"),e)}))})),["login","register","forgot-password"].map((function(t){Array.from(e.querySelectorAll(".ct-".concat(t))).map((function(r){r.addEventListener("click",(function(r){r.preventDefault(),c(e,{screen:t})}))}))}))}}(document.querySelector("#account-modal")))}))};function l(e){return function(e){if(Array.isArray(e))return d(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return d(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 d(e,t)}(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.")}()}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}var y=!1,f=function(e,t,r){return Math.max(e,Math.min(t,r))},m=function(e,t,r){return t[0]+(t[1]-t[0])/(e[1]-e[0])*(r-e[0])},p=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"yes";Array.from(e.querySelectorAll("[data-row][data-transparent-row]")).map((function(e){e.dataset.transparentRow=t}))},h=function(e){return parseFloat(getComputedStyle(e).getPropertyValue("--height"))},v=function(e){var t=getComputedStyle(e).getPropertyValue("--stickyShrink");return t?parseFloat(t)/100*h(e):h(e)};var g=!1,S=function(){if(document.querySelector("[data-sticky]")){var e=window.scrollY,t=function(){var t=document.querySelector('[data-device="'.concat(Object(a.getCurrentScreen)(),'"] [data-sticky]'));if(t){var r=function(e){if(-1===e.dataset.sticky.indexOf("shrink")&&-1===e.dataset.sticky.indexOf("auto-hide"))return e.parentNode.getBoundingClientRect().height+200;var t=e.closest("header").getBoundingClientRect().top+scrollY,r=e.parentNode;return 1===r.parentNode.children.length||r.parentNode.children[0].classList.contains("ct-sticky-container")?t:Array.from(r.parentNode.children).reduce((function(e,t,r){return e.indexOf(0)>-1||!t.dataset.row?[].concat(l(e),[0]):[].concat(l(e),[t.classList.contains("ct-sticky-container")?0:t.getBoundingClientRect().height])}),[]).reduce((function(e,t){return e+t}),t)}(t),o=r>0&&Math.abs(window.scrollY-r)<3||window.scrollY>r,n=t.dataset.sticky.split(":").filter((function(e){return"yes"!==e&&"no"!==e})),c=Array.from(t.querySelectorAll("[data-row]")).reduce((function(e,t){return e+parseFloat(getComputedStyle(t).getPropertyValue("--height"))}),0);if(n.indexOf("auto-hide")>-1){if(window.scrollY<r&&(e=window.scrollY),o&&window.scrollY-e==0&&document.body.style.setProperty("--headerStickyHeightAnimated","0px"),o&&window.scrollY-e<-5)-1===t.dataset.sticky.indexOf("yes")&&(t.dataset.sticky=["yes-start"].concat(l(n)).join(":"),requestAnimationFrame((function(){t.dataset.sticky=t.dataset.sticky.replace("yes-start","yes-end"),setTimeout((function(){t.dataset.sticky=t.dataset.sticky.replace("yes-end","yes")}),200)}))),p(t,"no"),document.body.removeAttribute("style"),t.parentNode.style.setProperty("--minHeight","".concat(c,"px"));else{if(!o)return t.dataset.sticky=n.filter((function(e){return"yes-end"!==e})).join(":"),t.parentNode.removeAttribute("style"),Array.from(t.querySelectorAll("[data-row]")).map((function(e){return e.removeAttribute("style")})),p(t,"yes"),document.body.style.setProperty("--headerStickyHeightAnimated","0px"),void(e=window.scrollY);-1===t.dataset.sticky.indexOf("yes-hide")&&t.dataset.sticky.indexOf("yes:")>-1&&window.scrollY-e>5&&(t.dataset.sticky=["yes-hide-start"].concat(l(n)).join(":"),document.body.style.setProperty("--headerStickyHeightAnimated","0px"),requestAnimationFrame((function(){t.dataset.sticky=t.dataset.sticky.replace("yes-hide-start","yes-hide-end"),setTimeout((function(){t.dataset.sticky=n.join(":"),t.parentNode.removeAttribute("style"),Array.from(t.querySelectorAll("[data-row]")).map((function(e){return e.removeAttribute("style")})),p(t,"yes")}),200)})))}e=window.scrollY}if((n.indexOf("slide")>-1||n.indexOf("fade")>-1)&&(o?(-1===t.dataset.sticky.indexOf("yes")&&(t.dataset.sticky=["yes-start"].concat(l(n)).join(":"),requestAnimationFrame((function(){t.dataset.sticky=t.dataset.sticky.replace("yes-start","yes-end"),setTimeout((function(){t.dataset.sticky=t.dataset.sticky.replace("yes-end","yes")}),200)}))),p(t,"no"),t.parentNode.style.setProperty("--minHeight","".concat(c,"px"))):-1===t.dataset.sticky.indexOf("yes-hide")&&t.dataset.sticky.indexOf("yes:")>-1&&(Math.abs(window.scrollY-r)>10?(t.dataset.sticky=n.join(":"),setTimeout((function(){t.parentNode.removeAttribute("style"),Array.from(t.querySelectorAll("[data-row]")).map((function(e){return e.removeAttribute("style")}))}),300),p(t,"yes")):(t.dataset.sticky=["yes-hide-start"].concat(l(n)).join(":"),requestAnimationFrame((function(){t.dataset.sticky=t.dataset.sticky.replace("yes-hide-start","yes-hide-end"),setTimeout((function(){t.dataset.sticky=n.join(":"),setTimeout((function(){t.parentNode.removeAttribute("style"),Array.from(t.querySelectorAll("[data-row]")).map((function(e){return e.removeAttribute("style")}))}),300),p(t,"yes")}),200)}))))),n.indexOf("shrink")>-1){if(o){p(t,"no"),t.parentNode.style.setProperty("--minHeight","".concat(c,"px"));var i=Array.from(t.querySelectorAll("[data-row]")).reduce((function(e,t,r){return e+v(t)}),0);l(t.querySelectorAll('[data-row="middle"]')).map((function(e){if(e.querySelector('[data-id="logo"] .site-logo-container')){var t=e.querySelector('[data-id="logo"] .site-logo-container'),o=parseFloat(getComputedStyle(t).getPropertyValue("--maxHeight")||50),n=parseFloat(getComputedStyle(t).getPropertyValue("--logoStickyShrink")||1),a=o*n;if(1===n)return;var c=h(e),i=v(e);t.style.setProperty("--logo-shrink-height",m([r,r+Math.abs(c===i?o-a:c-i)],[1,n],f(r,r+Math.abs(c===i?o-a:c-i),scrollY)))}})),i!==c&&t.querySelector('[data-row="middle"]')&&[t.querySelector('[data-row="middle"]')].map((function(e){var t=h(e),o=v(e);e.style.setProperty("--shrinkHeight","".concat(m([r,r+Math.abs(t-o)],[t,o],f(r,r+Math.abs(t-o),scrollY)),"px"))}))}else t.parentNode.removeAttribute("style"),Array.from(t.querySelectorAll("[data-row]")).map((function(e){return e.removeAttribute("style")})),Array.from(t.querySelectorAll('[data-row="middle"] .site-logo-container')).map((function(e){return e.removeAttribute("style")})),p(t,"yes");var s=t.dataset.sticky.split(":").filter((function(e){return"yes"!==e&&"no"!==e}));t.dataset.sticky=(o?["yes"].concat(l(s)):s).join(":")}}};t(),g||(g=!0,window.addEventListener("scroll",(function(){y||(y=!0,requestAnimationFrame((function(){t(),y=!1})))})))}};Object(a.onDocumentLoaded)((function(){u(),S()})),n.a.on("blocksy:frontend:init",(function(){u(),S()}))}]);
static/bundle/options.css CHANGED
@@ -1,5 +1,5 @@
1
  /**
2
- * - v1.7.59
3
  *
4
  * Copyright (c) 2021
5
  * Licensed GPLv2+
1
  /**
2
+ * - v1.7.61
3
  *
4
  * Copyright (c) 2021
5
  * Licensed GPLv2+
static/bundle/options.js CHANGED
@@ -3,4 +3,4 @@
3
  Copyright (c) 2017 Jed Watson.
4
  Licensed under the MIT License (MIT), see
5
  http://jedwatson.github.io/classnames
6
- */!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var c=typeof r;if("string"===c||"number"===c)e.push(r);else if(Array.isArray(r)&&r.length){var a=o.apply(null,r);a&&e.push(a)}else if("object"===c)for(var i in r)n.call(r,i)&&r[i]&&e.push(i)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},function(e,t){e.exports=window.wp.components},function(e,t){e.exports=window.ctEvents},function(e,t){e.exports=window.React},function(e,t,n){(function(t){function n(e){return(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)}var r="object"===("undefined"==typeof window?"undefined":n(window))&&window.window===window?window:"object"===("undefined"==typeof self?"undefined":n(self))&&self.self===self?self:"object"===(void 0===t?"undefined":n(t))&&t.global===t?t:this;function o(e,t,n){var r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){i(r.response,t,n)},r.onerror=function(){console.error("could not download file")},r.send()}function c(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return t.status>=200&&t.status<=299}function a(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(n){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var i="object"!==("undefined"==typeof window?"undefined":n(window))||window!==r?function(){}:"download"in HTMLAnchorElement.prototype?function(e,t,n){var i=r.URL||r.webkitURL,l=document.createElement("a");t=t||e.name||"download",l.download=t,l.rel="noopener","string"==typeof e?(l.href=e,l.origin!==location.origin?c(l.href)?o(e,t,n):a(l,l.target="_blank"):a(l)):(l.href=i.createObjectURL(e),setTimeout((function(){i.revokeObjectURL(l.href)}),4e4),setTimeout((function(){a(l)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,t,r){if(t=t||e.name||"download","string"==typeof e)if(c(e))o(e,t,r);else{var i=document.createElement("a");i.href=e,i.target="_blank",setTimeout((function(){a(i)}))}else navigator.msSaveOrOpenBlob(function(e,t){return void 0===t?t={autoBom:!1}:"object"!==n(t)&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob([String.fromCharCode(65279),e],{type:e.type}):e}(e,r),t)}:function(e,t,c,a){if((a=a||open("","_blank"))&&(a.document.title=a.document.body.innerText="downloading..."),"string"==typeof e)return o(e,t,c);var i="application/octet-stream"===e.type,l=/constructor/i.test(r.HTMLElement)||r.safari,u=/CriOS\/[\d]+/.test(navigator.userAgent);if((u||i&&l)&&"object"===("undefined"==typeof FileReader?"undefined":n(FileReader))){var s=new FileReader;s.onloadend=function(){var e=s.result;e=u?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),a?a.location.href=e:location=e,a=null},s.readAsDataURL(e)}else{var d=r.URL||r.webkitURL,p=d.createObjectURL(e);a?a.location=p:location.href=p,a=null,setTimeout((function(){d.revokeObjectURL(p)}),4e4)}};e.exports=i}).call(this,n(12))},function(e,t){e.exports=window.wp.hooks},function(e,t,n){var r=n(13);function o(e,t,n,r,c){var a=new Error(n,r,c);return a.name="UseFetchError",a.status=e,a.statusText=t,Object.setPrototypeOf(a,Object.getPrototypeOf(this)),Error.captureStackTrace&&Error.captureStackTrace(a,o),a}o.prototype=Object.create(Error.prototype,{constructor:{value:Error,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf(o,Error),e.exports=function(e,t,n){var c=(n&&n.depends||t&&t.depends||[]).reduce((function(e,t){return e||!t}),!1);return r(!c&&function(e,t,n){return fetch(e,t).then(n&&n.formatter||t&&t.formatter||function(e){if(!e.ok)throw new o(e.status,e.statusText,"Fetch error");return e.json()})},e,t||{},n||{})}},function(e,t,n){var r=n(15);e.exports=function(){var e=function(){e.id=r(),e.subscribers.forEach((function(e){e()}))};return e.id=r(),e.subscribers=[],e.subscribe=function(t){e.subscribers.push(t)},e.unsubscribe=function(t){e.subscribers.indexOf(t)>=0&&e.subscribers.splice(e.subscribers.indexOf(t),1)},e}},function(e,t,n){var r=n(6);e.exports=function(e){var t=r.useState(e.id),n=function(){return t[1](e.id)};return r.useEffect((function(){return e.subscribe(n),function(){return e.unsubscribe(n)}}),[]),t[0]}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){var r=n(6),o=n(14);e.exports=function(e){var t=Array.prototype.slice.call(arguments,[1]),n=r.useState({isLoading:!!e});return r.useEffect((function(){e&&(!n[0].isLoading&&n[1]({data:n[0].data,isLoading:!0}),e.apply(null,t).then((function(e){n[1]({data:e,isLoading:!1})})).catch((function(e){n[1]({error:e,isLoading:!1})})))}),o(t)),n[0]}},function(e,t){e.exports=function e(){for(var t=[],n=0;n<arguments.length;n++){var r=arguments[n];if(r instanceof Array)for(var o=0;o<r.length;o++)t=t.concat(e(r[o]));else if("undefined"!=typeof URL&&r instanceof URL)t=t.concat(r.toJSON());else if(r instanceof Object)for(var c=Object.keys(r),a=0;a<c.length;a++){var i=c[a];t=t.concat([i]).concat(e(r[i]))}else t=t.concat(r)}return t}},function(e,t,n){for(var r=self.crypto||self.msCrypto,o="-_",c=36;c--;)o+=c.toString(36);for(c=36;c---10;)o+=c.toString(36).toUpperCase();e.exports=function(e){var t="",n=r.getRandomValues(new Uint8Array(e||21));for(c=e||21;c--;)t+=o[63&n[c]];return t}},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4),c=n(1),a=n(2),i=n(3),l=n.n(i);function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}(e,t)||m(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 s(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},c=Object.keys(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function d(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 p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){b(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function b(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(e){return function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||m(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.")}()}function m(e,t){if(e){if("string"==typeof e)return y(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)?y(e,t):void 0}}function y(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}var O=[],j=[],h=function(e){var t=e.value,n=e.onChange,o=blocksy_admin.all_condition_rules.reduce((function(e,t){var n=t.rules,r=t.title;return[].concat(f(e),f(n.map((function(e){return p(p({},e),{},{group:r})}))))}),[]).reduce((function(e,t){var n=t.title,r=t.id,o=s(t,["title","id"]);return[].concat(f(e),[p({key:r,value:n},o)])}),[]),i=u(Object(r.useState)(O),2),d=i[0],b=i[1],m=u(Object(r.useState)(j),2),y=m[0],h=m[1],v=function(e){return"post_ids"===e.rule||"page_ids"===e.rule||"custom_post_type_ids"===e.rule||"taxonomy_ids"===e.rule||"post_with_taxonomy_ids"===e.rule};return Object(r.useEffect)((function(){Promise.all(["posts","pages","ct_cpt"].map((function(e){return fetch("".concat(blocksy_admin.rest_url,"wp/v2/").concat("ct_cpt"===e?"posts":e).concat(blocksy_admin.rest_url.indexOf("?")>-1?"&":"?","_embed&per_page=100").concat("ct_cpt"===e?"&post_type=ct_cpt":"")).then((function(e){return e.json()}))}))).then((function(e){var t=e.reduce((function(e,t){return[].concat(f(e),f(t))}),[]);b(t),O=t})),fetch("".concat(wp.ajax.settings.url,"?action=blocksy_conditions_get_all_taxonomies"),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST"}).then((function(e){return e.json()})).then((function(e){var t=e.data.taxonomies;h(t),j=t}))}),[]),Object(r.createElement)("div",{className:"ct-display-conditions"},t.map((function(e,i){return Object(r.createElement)("div",{className:l()("ct-condition-group",{"ct-cols-3":v(e),"ct-cols-2":!v(e)}),key:i},Object(r.createElement)(a.Select,{key:"first",option:{inputClassName:"ct-condition-type",selectInputStart:function(){return Object(r.createElement)("span",{className:"ct-".concat(e.type)})},placeholder:Object(c.__)("Select variation","blc"),choices:{include:Object(c.__)("Include","blc"),exclude:Object(c.__)("Exclude","blc")}},value:e.type,onChange:function(r){n(t.map((function(t,n){return p({},n===i?p(p({},e),{},{type:r}):t)})))}}),Object(r.createElement)(a.Select,{key:"second",option:{appendToBody:!0,placeholder:Object(c.__)("Select rule","blc"),choices:"user"===e.category?o.filter((function(e){return 0===e.key.indexOf("user_")})):o.filter((function(e){return-1===e.key.indexOf("user_")})),search:!0},value:e.rule,onChange:function(r){n(t.map((function(t,n){return p({},n===i?p(p({},e),{},{rule:r}):t)})))}}),("post_ids"===e.rule||"custom_post_type_ids"===e.rule||"page_ids"===e.rule)&&Object(r.createElement)(a.Select,{key:"third",option:{appendToBody:!0,defaultToFirstItem:!1,placeholder:"post_ids"===e.rule?Object(c.__)("Select post","blc"):"page_ids"===e.rule?Object(c.__)("Select page","blc"):Object(c.__)("Custom Post Type ID","blc"),choices:d.filter((function(t){var n=t.type;return"post_ids"===e.rule?"post"===n:"page_ids"===e.rule?"page"===n:"post"!==n&&"page"!==n})).map((function(e){return{key:e.id,value:e.title.rendered}})),search:!0},value:(e.payload||{}).post_id||"",onChange:function(r){n(t.map((function(t,n){return p({},n===i?p(p({},e),{},{payload:p(p({},e.payload),{},{post_id:r})}):t)})))}}),("taxonomy_ids"===e.rule||"post_with_taxonomy_ids"===e.rule)&&Object(r.createElement)(a.Select,{option:{appendToBody:!0,defaultToFirstItem:!1,placeholder:Object(c.__)("Select taxonomy","blc"),choices:y.map((function(e){return p({key:e.id,value:e.name},e.group?{group:e.group}:{})})),search:!0},value:e.payload.taxonomy_id||"",onChange:function(r){n(t.map((function(t,n){return p({},n===i?p(p({},e),{},{payload:p(p({},e.payload),{},{taxonomy_id:r})}):t)})))}}),Object(r.createElement)("button",{type:"button",onClick:function(e){e.preventDefault();var r=f(t);r.splice(i,1),n(r)}},"×"))})),Object(r.createElement)("div",{className:"ct-conditions-actions"},Object(r.createElement)("button",{type:"button",className:"button add-condition",onClick:function(e){e.preventDefault(),n([].concat(f(t),[{type:"include",rule:"everywhere",payload:{}}]))}},Object(c.__)("Add Display Condition","blc")),Object(r.createElement)("button",{type:"button",className:"button add-condition",onClick:function(e){e.preventDefault(),n([].concat(f(t),[{type:"include",rule:"user_logged_in",payload:{},category:"user"}]))}},Object(c.__)("Add User Condition","blc"))))};function v(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return _(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _(e,t)}(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 _(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}var g=function(e){var t=e.option.display,n=void 0===t?"inline":t,o=e.value,i=e.onChange,l=v(Object(r.useState)(!1),2),u=l[0],s=l[1],d=v(Object(r.useState)(null),2),p=d[0],b=d[1];return"inline"===n?Object(r.createElement)(h,{value:o,onChange:i}):Object(r.createElement)(r.Fragment,null,Object(r.createElement)("button",{className:"button-primary",style:{width:"100%"},onClick:function(e){e.preventDefault(),s(!0),b(null)}},Object(c.__)("Add/Edit Conditions","blc")),Object(r.createElement)(a.Overlay,{items:u,className:"ct-admin-modal ct-builder-conditions-modal",onDismiss:function(){s(!1),b(null)},render:function(){return Object(r.createElement)("div",{className:"ct-modal-content"},Object(r.createElement)("h2",null,Object(c.__)("Transparent Header Display Conditions","blc")),Object(r.createElement)("p",null,Object(c.__)("Add one or more conditions to display the transparent header.","blc")),Object(r.createElement)("div",{className:"ct-modal-scroll"},Object(r.createElement)(h,{value:p||o,onChange:function(e){b(e)}})),Object(r.createElement)("div",{className:"ct-modal-actions has-divider"},Object(r.createElement)("button",{className:"button-primary",disabled:!p,onClick:function(){i(p),s(!1)}},Object(c.__)("Save Conditions","blc"))))}}))},E=n(7),w=n.n(E);function S(e){return function(e){if(Array.isArray(e))return k(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||C(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.")}()}function x(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}(e,t)||C(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 C(e,t){if(e){if("string"==typeof e)return k(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)?k(e,t):void 0}}function k(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}var N=function(){var e=x(Object(r.useState)(null),2),t=e[0],n=e[1],o=x(Object(r.useState)(null),2),i=o[0],u=o[1],s=x(Object(r.useState)(!1),2),d=s[0],p=s[1],b=x(Object(r.useState)(["options"]),2),f=b[0],m=b[1],y=Object(r.useRef)();return Object(r.createElement)("div",{className:"ct-import-export"},Object(r.createElement)("div",{className:"ct-title","data-type":"simple"},Object(r.createElement)("h3",null,Object(c.__)("Export","blc")),Object(r.createElement)("div",{className:"ct-option-description"},Object(c.__)("Click the button below to export the customization settings for this theme.","blc"))),Object(r.createElement)("div",{className:"ct-control","data-design":"block"},Object(r.createElement)("header",null),Object(r.createElement)("section",null,Object(r.createElement)("button",{className:"button",onClick:function(e){e.preventDefault(),p(!0)}},Object(c.__)("Export Customizations","blc")))),Object(r.createElement)("div",{className:"ct-title","data-type":"simple"},Object(r.createElement)("h3",null,Object(c.__)("Import","blc")),Object(r.createElement)("div",{className:"ct-option-description"},Object(c.__)("Upload a file to import customization settings for this theme.","blc"))),Object(r.createElement)("div",{className:"ct-control","data-design":"block"},Object(r.createElement)("header",null),Object(r.createElement)("section",null,Object(r.createElement)("div",{className:"ct-file-upload"},Object(r.createElement)("button",{type:"button",className:"button ct-upload-button",onClick:function(){y.current.click()}},t?t.name:Object(c.__)("Click to upload a file...","blc")),Object(r.createElement)("input",{ref:y,type:"file",onChange:function(e){var t=x(e.target.files,1)[0];n(t)}}),Object(r.createElement)("button",{className:"button",onClick:function(e){e.preventDefault();var n=new FileReader;n.readAsText(t,"UTF-8"),n.onload=function(e){var t=new FormData;t.append("action","blocksy_customizer_import"),t.append("wp_customize","on"),t.append("data",e.target.result);try{fetch(window.ajaxurl,{method:"POST",body:t}).then((function(e){200===e.status&&e.json().then((function(e){e.success,e.data;location.reload()}))}))}catch(e){}}}},Object(c.__)("Import Customizations","blc"))))),ct_customizer_localizations.has_child_theme&&Object(r.createElement)(r.Fragment,null,Object(r.createElement)("div",{className:"ct-title","data-type":"simple"},Object(r.createElement)("h3",null,Object(c.__)("Copy Options","blc")),Object(r.createElement)("div",{className:"ct-option-description"},Object(c.__)("Copy and import your customizations from parent or child theme.","blc"))),ct_customizer_localizations.is_parent_theme&&Object(r.createElement)("div",{className:"ct-control","data-design":"block"},Object(r.createElement)("header",null),Object(r.createElement)("section",null,Object(r.createElement)("button",{className:"button",onClick:function(e){e.preventDefault(),u("child")}},Object(c.__)("Copy From Child Theme","blc")))),!ct_customizer_localizations.is_parent_theme&&Object(r.createElement)("div",{className:"ct-control","data-design":"block"},Object(r.createElement)("header",null),Object(r.createElement)("section",null,Object(r.createElement)("button",{className:"button",onClick:function(e){e.preventDefault(),u("parent")}},Object(c.__)("Copy From Parent Theme","blc"))))),Object(r.createElement)(a.Overlay,{items:i,className:"ct-admin-modal ct-import-export-modal",onDismiss:function(){return u(!1)},render:function(){return Object(r.createElement)("div",{className:"ct-modal-content"},Object(r.createElement)("svg",{width:"40",height:"40",viewBox:"0 0 66 66"},Object(r.createElement)("path",{d:"M66 33.1c0 2.8-.4 5.5-1.1 8.2 0 0-1.7-.6-1.9-.6 3.4-13.1-2.2-27.4-14.5-34.5C41.3 2 33 .9 25 3.1c-3.5.9-6.7 2.4-9.5 4.4L20 12 6 15 9 1l5 5c3.1-2.2 6.6-3.9 10.5-4.9 2.7-.7 5.4-1.1 8-1.1 5.9-.1 11.7 1.4 17 4.4C60.1 10.5 66 21.7 66 33.1zm-49 6.3l2.4-3c-.3-1.2-.4-2.3-.4-3.4s.1-2.2.4-3.3l-2.4-3 2.5-4.3 3.8.5c1.6-1.6 3.6-2.7 5.8-3.3l1.4-3.6h5l1.4 3.6c2.2.6 4.2 1.8 5.8 3.3l3.8-.5 2.5 4.3-2.4 3c.3 1.1.4 2.2.4 3.3s-.1 2.2-.4 3.3l2.4 3-2.5 4.3-3.8-.5c-1.6 1.6-3.6 2.7-5.8 3.3L35.4 50h-5L29 46.4c-2.2-.6-4.2-1.8-5.8-3.3l-3.8.5-2.4-4.2zm8-6.4c0 4.4 3.6 8 8 8s8-3.6 8-8-3.6-8-8-8-8 3.6-8 8zm25.9 25.3c-3 2.1-6.3 3.7-9.9 4.7-8 2.1-16.4 1-23.5-3.1C5.2 52.8-.4 38.5 3 25.4c-.7-.1-1.3-.3-2-.5-.7 2.7-1 5.3-1 8 0 11.4 5.9 22.5 16.5 28.6 7.6 4.4 16.5 5.6 25 3.3 4-1.1 7.6-2.8 10.8-5.2l4.6 4.6 3-14-14 3 5 5.1z"})),Object(r.createElement)("h2",{className:"ct-modal-title"},!ct_customizer_localizations.is_parent_theme&&Object(c.__)("Copy From Parent Theme","blc"),ct_customizer_localizations.is_parent_theme&&Object(c.__)("Copy From Child Theme","blc")),Object(r.createElement)("p",null,!ct_customizer_localizations.is_parent_theme&&Object(c.__)("You are about to copy all the settings from your parent theme into the child theme. Are you sure you want to continue?","blc"),ct_customizer_localizations.is_parent_theme&&Object(c.__)("You are about to copy all the settings from your child theme into the parent theme. Are you sure you want to continue?","blc")),Object(r.createElement)("div",{className:"ct-modal-actions"},Object(r.createElement)("button",{onClick:function(e){e.preventDefault(),e.stopPropagation(),u(!1)},className:"ct-button"},Object(c.__)("Cancel","blc")),Object(r.createElement)("button",{className:"ct-button-primary",onClick:function(e){e.preventDefault();var t=new FormData;t.append("action","blocksy_customizer_copy_options"),t.append("wp_customize","on"),t.append("strategy",i);try{fetch(window.ajaxurl,{method:"POST",body:t}).then((function(e){200===e.status&&e.json().then((function(e){e.success,e.data;location.reload()}))}))}catch(e){}}},Object(c.__)("Yes, I am sure","blc"))))}}),Object(r.createElement)(a.Overlay,{items:d,className:"ct-admin-modal ct-export-modal",onDismiss:function(){return p(!1)},render:function(){return Object(r.createElement)("div",{className:"ct-modal-content"},Object(r.createElement)("h2",{className:"ct-modal-title"},Object(c.__)("Export Settings","blc")),Object(r.createElement)("p",null,Object(c.__)("Choose what set of settings you want to export.","blc")),Object(r.createElement)("div",{className:"ct-export-options"},["options","widgets"].map((function(e){return Object(r.createElement)("div",{className:"ct-checkbox-container",onClick:function(){1===f.length&&f[0]===e||m((function(t){return t.includes(e)?t.filter((function(t){return t!==e})):[].concat(S(t),[e])}))}},{options:Object(c.__)("Customizer settings","blc"),widgets:Object(c.__)("Widgets settings","blc")}[e],Object(r.createElement)("span",{className:l()("ct-checkbox",{active:f.includes(e)})},Object(r.createElement)("svg",{width:"10",height:"8",viewBox:"0 0 11.2 9.1"},Object(r.createElement)("polyline",{className:"check",points:"1.2,4.8 4.4,7.9 9.9,1.2 "}))))}))),Object(r.createElement)("div",{className:"ct-modal-actions has-divider","data-buttons":"2"},Object(r.createElement)("button",{onClick:function(e){e.preventDefault(),e.stopPropagation(),p(!1)},className:"button"},Object(c.__)("Cancel","blc")),Object(r.createElement)("button",{className:"button button-primary",onClick:function(e){e.preventDefault();var t=new FormData;t.append("action","blocksy_customizer_export"),t.append("strategy",f.join(":")),t.append("wp_customize","on");try{fetch(window.ajaxurl,{method:"POST",body:t}).then((function(e){200===e.status&&e.json().then((function(e){var t=e.success,n=e.data;if(t){var r=new Blob([n.data],{type:"application/octet-stream;charset=utf-8"});w()(r,"blocksy-export.dat"),p(!1)}}))}))}catch(e){}}},Object(c.__)("Export","blc"))))}}))},A=n(5),P=n.n(A),T=n(8),D=n(9),z=n.n(D),I=n(10),L=n.n(I),R=n(11),F=n.n(R);function U(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function M(e){return function(e){if(Array.isArray(e))return G(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||V(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.")}()}function B(e,t,n,r,o,c,a){try{var i=e[c](a),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,o)}function H(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}(e,t)||V(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 V(e,t){if(e){if("string"==typeof e)return G(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)?G(e,t):void 0}}function G(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}var $=L()(),Y=function(e){e.forcedEdit;var t,n,o=e.headerId,i=H(Object(r.useState)(!1),2),l=i[0],u=i[1],s=H(Object(r.useState)(null),2),d=s[0],p=s[1],b=Object(r.useContext)(a.PlacementsDragDropContext),f=(b.builderValueCollection,b.builderValueDispatch,Object(r.useRef)()),m=F()($),y=z()("".concat(blocksy_admin.ajax_url,"?action=blocksy_header_get_all_conditions"),{method:"POST",formatter:(t=regeneratorRuntime.mark((function e(t){var n,r,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.json();case 2:if(n=e.sent,r=n.success,o=n.data,r&&o.conditions){e.next=7;break}throw new Error;case 7:return e.abrupt("return",o.conditions);case 8:case"end":return e.stop()}}),e)})),n=function(){var e=this,n=arguments;return new Promise((function(r,o){var c=t.apply(e,n);function a(e){B(c,r,o,a,i,"next",e)}function i(e){B(c,r,o,a,i,"throw",e)}a(void 0)}))},function(e){return n.apply(this,arguments)}),depends:[m]}),O=y.data,j=y.isLoading;y.error;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("button",{className:"button-primary",style:{width:"100%"},onClick:function(e){j||(e.preventDefault(),e.stopPropagation(),u(!0))}},Object(c.__)("Add/Edit Conditions","blc")),Object(r.createElement)(a.Overlay,{items:l,initialFocusRef:f,className:"ct-admin-modal ct-builder-conditions-modal",onDismiss:function(){u(!1),p(null)},render:function(){var e;return Object(r.createElement)("div",{className:"ct-modal-content",ref:f},Object(r.createElement)("h2",null,sprintf(Object(c.__)("Display Conditions","blc"))),Object(r.createElement)("p",null,Object(c.__)("Add one or more conditions in order to display your header.","blc")),Object(r.createElement)("div",{className:"ct-modal-scroll"},Object(r.createElement)(a.OptionsPanel,{onChange:function(e,t){p((function(e){return[].concat(M((e||O).filter((function(e){return e.id!==o}))),[{id:o,conditions:t}])}))},options:{conditions:(e={type:"blocksy-display-condition",design:"none",value:[]},U(e,"design","none"),U(e,"label",!1),e)},value:{conditions:((d||O).find((function(e){return e.id===o}))||{conditions:[]}).conditions},hasRevertButton:!1})),Object(r.createElement)("div",{className:"ct-modal-actions has-divider"},Object(r.createElement)("button",{className:"button-primary",disabled:!d,onClick:function(){fetch("".concat(wp.ajax.settings.url,"?action=blocksy_header_update_all_conditions"),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST",body:JSON.stringify(d)}).then((function(e){return e.json()})).then((function(){$(),u(!1)}))}},Object(c.__)("Save Conditions","blc"))))}}))};function q(){return(q=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)}function J(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 W(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?J(Object(n),!0).forEach((function(t){X(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):J(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function X(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var K=function(){ct_customizer_localizations.header_builder_data.secondary_items.header,ct_customizer_localizations.header_builder_data.header;var e=Object(r.useContext)(a.PlacementsDragDropContext),t=e.builderValueDispatch,n=e.builderValue,i=(e.option,e.builderValueCollection),u=e.panelsActions,s=Object(T.applyFilters)("blocksy.header.available-sections",null,i.sections)||i.sections.filter((function(e){var t=e.id;return"type-2"!==t&&"type-3"!==t&&-1===t.indexOf("ct-custom")}));return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("ul",{className:l()("ct-panels-manager")},s.map((function(e){var o=e.name,i=e.id,s=o||{"type-1":Object(c.__)("Global Header","blocksy")}[i]||i,d="builder_header_panel_".concat(i),p=ct_customizer_localizations.header_builder_data.header_data.header_options,b={label:s,"inner-options":W(W({},i.indexOf("ct-custom")>-1?{conditions_button:{label:Object(c.__)("Edit Conditions","blc"),type:"jsx",design:"block",render:function(){return Object(r.createElement)(Y,{headerId:i})}}}:{}),p)};return Object(r.createElement)(a.PanelMetaWrapper,q({id:d,key:i,option:b},u,{getActualOption:function(e){var o=e.open;return Object(r.createElement)(r.Fragment,null,i===n.id&&Object(r.createElement)(a.Panel,{id:d,getValues:function(){return W({id:i},n.settings||{})},option:b,onChangeFor:function(e,r){t({type:"BUILDER_GLOBAL_SETTING_ON_CHANGE",payload:{optionId:e,optionValue:r,values:Object(a.getValueFromInput)(p,Array.isArray(n.settings)?{}:n.settings||{})}})},view:"simple"}),Object(r.createElement)("li",{className:l()({active:i===n.id,"ct-global":"type-1"===i}),onClick:function(){i===n.id?o():t({type:"PICK_BUILDER_SECTION",payload:{id:i}})}},Object(r.createElement)("span",{className:"ct-panel-name"},s),i.indexOf("ct-custom")>-1&&i!==n.id&&Object(r.createElement)("span",{className:"ct-remove-instance",onClick:function(e){e.preventDefault(),e.stopPropagation(),t({type:"REMOVE_BUILDER_SECTION",payload:{id:i}})}},Object(r.createElement)("i",{className:"ct-tooltip-top"},Object(c.__)("Remove header","blc")),Object(r.createElement)("svg",{width:"11px",height:"11px",viewBox:"0 0 24 24"},Object(r.createElement)("path",{d:"M9.6,0l0,1.2H1.2v2.4h21.6V1.2h-8.4l0-1.2H9.6z M2.8,6l1.8,15.9C4.8,23.1,5.9,24,7.1,24h9.9c1.2,0,2.2-0.9,2.4-2.1L21.2,6H2.8z"})))))}}))}))),Object(r.createElement)(o.Slot,{name:"PlacementsBuilderPanelsManagerAfter"},(function(e){return 0===e.length?null:e})))};P.a.on("blocksy:options:before-option",(function(e){if(e.option&&"ct-header-builder"===e.option.type){var t=e.content;e.content=Object(r.createElement)(r.Fragment,null,t,Object(r.createElement)(o.Fill,{name:"PlacementsBuilderPanelsManager"},Object(r.createElement)(K,null)))}})),P.a.on("blocksy:options:register",(function(e){e["blocksy-display-condition"]=g,e["blocksy-customizer-options-manager"]=N}))}]);
3
  Copyright (c) 2017 Jed Watson.
4
  Licensed under the MIT License (MIT), see
5
  http://jedwatson.github.io/classnames
6
+ */!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var c=typeof r;if("string"===c||"number"===c)e.push(r);else if(Array.isArray(r)&&r.length){var a=o.apply(null,r);a&&e.push(a)}else if("object"===c)for(var i in r)n.call(r,i)&&r[i]&&e.push(i)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},function(e,t){e.exports=window.wp.components},function(e,t){e.exports=window.ctEvents},function(e,t){e.exports=window.React},function(e,t,n){(function(t){function n(e){return(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)}var r="object"===("undefined"==typeof window?"undefined":n(window))&&window.window===window?window:"object"===("undefined"==typeof self?"undefined":n(self))&&self.self===self?self:"object"===(void 0===t?"undefined":n(t))&&t.global===t?t:this;function o(e,t,n){var r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){i(r.response,t,n)},r.onerror=function(){console.error("could not download file")},r.send()}function c(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return t.status>=200&&t.status<=299}function a(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(n){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var i="object"!==("undefined"==typeof window?"undefined":n(window))||window!==r?function(){}:"download"in HTMLAnchorElement.prototype?function(e,t,n){var i=r.URL||r.webkitURL,l=document.createElement("a");t=t||e.name||"download",l.download=t,l.rel="noopener","string"==typeof e?(l.href=e,l.origin!==location.origin?c(l.href)?o(e,t,n):a(l,l.target="_blank"):a(l)):(l.href=i.createObjectURL(e),setTimeout((function(){i.revokeObjectURL(l.href)}),4e4),setTimeout((function(){a(l)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,t,r){if(t=t||e.name||"download","string"==typeof e)if(c(e))o(e,t,r);else{var i=document.createElement("a");i.href=e,i.target="_blank",setTimeout((function(){a(i)}))}else navigator.msSaveOrOpenBlob(function(e,t){return void 0===t?t={autoBom:!1}:"object"!==n(t)&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob([String.fromCharCode(65279),e],{type:e.type}):e}(e,r),t)}:function(e,t,c,a){if((a=a||open("","_blank"))&&(a.document.title=a.document.body.innerText="downloading..."),"string"==typeof e)return o(e,t,c);var i="application/octet-stream"===e.type,l=/constructor/i.test(r.HTMLElement)||r.safari,u=/CriOS\/[\d]+/.test(navigator.userAgent);if((u||i&&l)&&"object"===("undefined"==typeof FileReader?"undefined":n(FileReader))){var s=new FileReader;s.onloadend=function(){var e=s.result;e=u?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),a?a.location.href=e:location=e,a=null},s.readAsDataURL(e)}else{var d=r.URL||r.webkitURL,p=d.createObjectURL(e);a?a.location=p:location.href=p,a=null,setTimeout((function(){d.revokeObjectURL(p)}),4e4)}};e.exports=i}).call(this,n(12))},function(e,t){e.exports=window.wp.hooks},function(e,t,n){var r=n(13);function o(e,t,n,r,c){var a=new Error(n,r,c);return a.name="UseFetchError",a.status=e,a.statusText=t,Object.setPrototypeOf(a,Object.getPrototypeOf(this)),Error.captureStackTrace&&Error.captureStackTrace(a,o),a}o.prototype=Object.create(Error.prototype,{constructor:{value:Error,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf(o,Error),e.exports=function(e,t,n){var c=(n&&n.depends||t&&t.depends||[]).reduce((function(e,t){return e||!t}),!1);return r(!c&&function(e,t,n){return fetch(e,t).then(n&&n.formatter||t&&t.formatter||function(e){if(!e.ok)throw new o(e.status,e.statusText,"Fetch error");return e.json()})},e,t||{},n||{})}},function(e,t,n){var r=n(15);e.exports=function(){var e=function(){e.id=r(),e.subscribers.forEach((function(e){e()}))};return e.id=r(),e.subscribers=[],e.subscribe=function(t){e.subscribers.push(t)},e.unsubscribe=function(t){e.subscribers.indexOf(t)>=0&&e.subscribers.splice(e.subscribers.indexOf(t),1)},e}},function(e,t,n){var r=n(6);e.exports=function(e){var t=r.useState(e.id),n=function(){return t[1](e.id)};return r.useEffect((function(){return e.subscribe(n),function(){return e.unsubscribe(n)}}),[]),t[0]}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){var r=n(6),o=n(14);e.exports=function(e){var t=Array.prototype.slice.call(arguments,[1]),n=r.useState({isLoading:!!e});return r.useEffect((function(){e&&(!n[0].isLoading&&n[1]({data:n[0].data,isLoading:!0}),e.apply(null,t).then((function(e){n[1]({data:e,isLoading:!1})})).catch((function(e){n[1]({error:e,isLoading:!1})})))}),o(t)),n[0]}},function(e,t){e.exports=function e(){for(var t=[],n=0;n<arguments.length;n++){var r=arguments[n];if(r instanceof Array)for(var o=0;o<r.length;o++)t=t.concat(e(r[o]));else if("undefined"!=typeof URL&&r instanceof URL)t=t.concat(r.toJSON());else if(r instanceof Object)for(var c=Object.keys(r),a=0;a<c.length;a++){var i=c[a];t=t.concat([i]).concat(e(r[i]))}else t=t.concat(r)}return t}},function(e,t,n){for(var r=self.crypto||self.msCrypto,o="-_",c=36;c--;)o+=c.toString(36);for(c=36;c---10;)o+=c.toString(36).toUpperCase();e.exports=function(e){var t="",n=r.getRandomValues(new Uint8Array(e||21));for(c=e||21;c--;)t+=o[63&n[c]];return t}},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4),c=n(1),a=n(2),i=n(3),l=n.n(i);function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}(e,t)||m(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 s(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},c=Object.keys(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function d(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 p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){b(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function b(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(e){return function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||m(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.")}()}function m(e,t){if(e){if("string"==typeof e)return y(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)?y(e,t):void 0}}function y(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}var O=[],j=[],h=function(e){var t=e.value,n=e.onChange,o=blocksy_admin.all_condition_rules.reduce((function(e,t){var n=t.rules,r=t.title;return[].concat(f(e),f(n.map((function(e){return p(p({},e),{},{group:r})}))))}),[]).reduce((function(e,t){var n=t.title,r=t.id,o=s(t,["title","id"]);return[].concat(f(e),[p({key:r,value:n},o)])}),[]),i=u(Object(r.useState)(O),2),d=i[0],b=i[1],m=u(Object(r.useState)(j),2),y=m[0],h=m[1],v=function(e){return"post_ids"===e.rule||"page_ids"===e.rule||"custom_post_type_ids"===e.rule||"taxonomy_ids"===e.rule||"post_with_taxonomy_ids"===e.rule};return Object(r.useEffect)((function(){Promise.all(["posts","pages","ct_cpt"].map((function(e){return fetch("".concat(blocksy_admin.rest_url,"wp/v2/").concat("ct_cpt"===e?"posts":e).concat(blocksy_admin.rest_url.indexOf("?")>-1?"&":"?","_embed&per_page=100").concat("ct_cpt"===e?"&post_type=ct_cpt":"")).then((function(e){return e.json()}))}))).then((function(e){var t=e.reduce((function(e,t){return[].concat(f(e),f(t))}),[]);b(t),O=t})),fetch("".concat(wp.ajax.settings.url,"?action=blocksy_conditions_get_all_taxonomies"),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST"}).then((function(e){return e.json()})).then((function(e){var t=e.data.taxonomies;h(t),j=t}))}),[]),Object(r.createElement)("div",{className:"ct-display-conditions"},t.map((function(e,i){return Object(r.createElement)("div",{className:l()("ct-condition-group",{"ct-cols-3":v(e),"ct-cols-2":!v(e)}),key:i},Object(r.createElement)(a.Select,{key:"first",option:{inputClassName:"ct-condition-type",selectInputStart:function(){return Object(r.createElement)("span",{className:"ct-".concat(e.type)})},placeholder:Object(c.__)("Select variation","blc"),choices:{include:Object(c.__)("Include","blc"),exclude:Object(c.__)("Exclude","blc")}},value:e.type,onChange:function(r){n(t.map((function(t,n){return p({},n===i?p(p({},e),{},{type:r}):t)})))}}),Object(r.createElement)(a.Select,{key:"second",option:{appendToBody:!0,placeholder:Object(c.__)("Select rule","blc"),choices:"user"===e.category?o.filter((function(e){return 0===e.key.indexOf("user_")})):o.filter((function(e){return-1===e.key.indexOf("user_")})),search:!0},value:e.rule,onChange:function(r){n(t.map((function(t,n){return p({},n===i?p(p({},e),{},{rule:r}):t)})))}}),("post_ids"===e.rule||"custom_post_type_ids"===e.rule||"page_ids"===e.rule)&&Object(r.createElement)(a.Select,{key:"third",option:{appendToBody:!0,defaultToFirstItem:!1,placeholder:"post_ids"===e.rule?Object(c.__)("Select post","blc"):"page_ids"===e.rule?Object(c.__)("Select page","blc"):Object(c.__)("Custom Post Type ID","blc"),choices:d.filter((function(t){var n=t.type;return"post_ids"===e.rule?"post"===n:"page_ids"===e.rule?"page"===n:"post"!==n&&"page"!==n})).map((function(e){return{key:e.id,value:e.title.rendered}})),search:!0},value:(e.payload||{}).post_id||"",onChange:function(r){n(t.map((function(t,n){return p({},n===i?p(p({},e),{},{payload:p(p({},e.payload),{},{post_id:r})}):t)})))}}),("taxonomy_ids"===e.rule||"post_with_taxonomy_ids"===e.rule)&&Object(r.createElement)(a.Select,{option:{appendToBody:!0,defaultToFirstItem:!1,placeholder:Object(c.__)("Select taxonomy","blc"),choices:y.map((function(e){return p({key:e.id,value:e.name},e.group?{group:e.group}:{})})),search:!0},value:e.payload.taxonomy_id||"",onChange:function(r){n(t.map((function(t,n){return p({},n===i?p(p({},e),{},{payload:p(p({},e.payload),{},{taxonomy_id:r})}):t)})))}}),Object(r.createElement)("button",{type:"button",onClick:function(e){e.preventDefault();var r=f(t);r.splice(i,1),n(r)}},"×"))})),Object(r.createElement)("div",{className:"ct-conditions-actions"},Object(r.createElement)("button",{type:"button",className:"button add-condition",onClick:function(e){e.preventDefault(),n([].concat(f(t),[{type:"include",rule:"everywhere",payload:{}}]))}},Object(c.__)("Add Display Condition","blc")),Object(r.createElement)("button",{type:"button",className:"button add-condition",onClick:function(e){e.preventDefault(),n([].concat(f(t),[{type:"include",rule:"user_logged_in",payload:{},category:"user"}]))}},Object(c.__)("Add User Condition","blc"))))};function v(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return _(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _(e,t)}(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 _(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}var g=function(e){var t=e.option.display,n=void 0===t?"inline":t,o=e.value,i=e.onChange,l=v(Object(r.useState)(!1),2),u=l[0],s=l[1],d=v(Object(r.useState)(null),2),p=d[0],b=d[1];return"inline"===n?Object(r.createElement)(h,{value:o,onChange:i}):Object(r.createElement)(r.Fragment,null,Object(r.createElement)("button",{className:"button-primary",style:{width:"100%"},onClick:function(e){e.preventDefault(),s(!0),b(null)}},Object(c.__)("Add/Edit Conditions","blc")),Object(r.createElement)(a.Overlay,{items:u,className:"ct-admin-modal ct-builder-conditions-modal",onDismiss:function(){s(!1),b(null)},render:function(){return Object(r.createElement)("div",{className:"ct-modal-content"},Object(r.createElement)("h2",null,Object(c.__)("Transparent Header Display Conditions","blc")),Object(r.createElement)("p",null,Object(c.__)("Add one or more conditions to display the transparent header.","blc")),Object(r.createElement)("div",{className:"ct-modal-scroll"},Object(r.createElement)(h,{value:p||o,onChange:function(e){b(e)}})),Object(r.createElement)("div",{className:"ct-modal-actions has-divider"},Object(r.createElement)("button",{className:"button-primary",disabled:!p,onClick:function(){i(p),s(!1)}},Object(c.__)("Save Conditions","blc"))))}}))},E=n(7),w=n.n(E);function S(e){return function(e){if(Array.isArray(e))return k(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||C(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.")}()}function x(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}(e,t)||C(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 C(e,t){if(e){if("string"==typeof e)return k(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)?k(e,t):void 0}}function k(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}var N=function(){var e=x(Object(r.useState)(null),2),t=e[0],n=e[1],o=x(Object(r.useState)(null),2),i=o[0],u=o[1],s=x(Object(r.useState)(!1),2),d=s[0],p=s[1],b=x(Object(r.useState)(["options"]),2),f=b[0],m=b[1],y=Object(r.useRef)();return Object(r.createElement)("div",{className:"ct-import-export"},Object(r.createElement)("div",{className:"ct-title","data-type":"simple"},Object(r.createElement)("h3",null,Object(c.__)("Export","blc")),Object(r.createElement)("div",{className:"ct-option-description"},Object(c.__)("Click the button below to export the customization settings for this theme.","blc"))),Object(r.createElement)("div",{className:"ct-control","data-design":"block"},Object(r.createElement)("header",null),Object(r.createElement)("section",null,Object(r.createElement)("button",{className:"button",onClick:function(e){e.preventDefault(),p(!0)}},Object(c.__)("Export Customizations","blc")))),Object(r.createElement)("div",{className:"ct-title","data-type":"simple"},Object(r.createElement)("h3",null,Object(c.__)("Import","blc")),Object(r.createElement)("div",{className:"ct-option-description"},Object(c.__)("Upload a file to import customization settings for this theme.","blc"))),Object(r.createElement)("div",{className:"ct-control","data-design":"block"},Object(r.createElement)("header",null),Object(r.createElement)("section",null,Object(r.createElement)("div",{className:"ct-file-upload"},Object(r.createElement)("button",{type:"button",className:"button ct-upload-button",onClick:function(){y.current.click()}},t?t.name:Object(c.__)("Click to upload a file...","blc")),Object(r.createElement)("input",{ref:y,type:"file",onChange:function(e){var t=x(e.target.files,1)[0];n(t)}}),Object(r.createElement)("button",{className:"button",onClick:function(e){e.preventDefault();var n=new FileReader;n.readAsText(t,"UTF-8"),n.onload=function(e){var t=new FormData;t.append("action","blocksy_customizer_import"),t.append("wp_customize","on"),t.append("data",e.target.result);try{fetch(window.ajaxurl,{method:"POST",body:t}).then((function(e){200===e.status&&e.json().then((function(e){e.success,e.data;location.reload()}))}))}catch(e){}}}},Object(c.__)("Import Customizations","blc"))))),ct_customizer_localizations.has_child_theme&&Object(r.createElement)(r.Fragment,null,Object(r.createElement)("div",{className:"ct-title","data-type":"simple"},Object(r.createElement)("h3",null,Object(c.__)("Copy Options","blc")),Object(r.createElement)("div",{className:"ct-option-description"},Object(c.__)("Copy and import your customizations from parent or child theme.","blc"))),ct_customizer_localizations.is_parent_theme&&Object(r.createElement)("div",{className:"ct-control","data-design":"block"},Object(r.createElement)("header",null),Object(r.createElement)("section",null,Object(r.createElement)("button",{className:"button",onClick:function(e){e.preventDefault(),u("child")}},Object(c.__)("Copy From Child Theme","blc")))),!ct_customizer_localizations.is_parent_theme&&Object(r.createElement)("div",{className:"ct-control","data-design":"block"},Object(r.createElement)("header",null),Object(r.createElement)("section",null,Object(r.createElement)("button",{className:"button",onClick:function(e){e.preventDefault(),u("parent")}},Object(c.__)("Copy From Parent Theme","blc"))))),Object(r.createElement)(a.Overlay,{items:i,className:"ct-admin-modal ct-import-export-modal",onDismiss:function(){return u(!1)},render:function(){return Object(r.createElement)("div",{className:"ct-modal-content"},Object(r.createElement)("svg",{width:"35",height:"35",viewBox:"0 0 66 66"},Object(r.createElement)("path",{d:"M66 33.1c0 2.8-.4 5.5-1.1 8.2 0 0-1.7-.6-1.9-.6 3.4-13.1-2.2-27.4-14.5-34.5C41.3 2 33 .9 25 3.1c-3.5.9-6.7 2.4-9.5 4.4L20 12 6 15 9 1l5 5c3.1-2.2 6.6-3.9 10.5-4.9 2.7-.7 5.4-1.1 8-1.1 5.9-.1 11.7 1.4 17 4.4C60.1 10.5 66 21.7 66 33.1zm-49 6.3l2.4-3c-.3-1.2-.4-2.3-.4-3.4s.1-2.2.4-3.3l-2.4-3 2.5-4.3 3.8.5c1.6-1.6 3.6-2.7 5.8-3.3l1.4-3.6h5l1.4 3.6c2.2.6 4.2 1.8 5.8 3.3l3.8-.5 2.5 4.3-2.4 3c.3 1.1.4 2.2.4 3.3s-.1 2.2-.4 3.3l2.4 3-2.5 4.3-3.8-.5c-1.6 1.6-3.6 2.7-5.8 3.3L35.4 50h-5L29 46.4c-2.2-.6-4.2-1.8-5.8-3.3l-3.8.5-2.4-4.2zm8-6.4c0 4.4 3.6 8 8 8s8-3.6 8-8-3.6-8-8-8-8 3.6-8 8zm25.9 25.3c-3 2.1-6.3 3.7-9.9 4.7-8 2.1-16.4 1-23.5-3.1C5.2 52.8-.4 38.5 3 25.4c-.7-.1-1.3-.3-2-.5-.7 2.7-1 5.3-1 8 0 11.4 5.9 22.5 16.5 28.6 7.6 4.4 16.5 5.6 25 3.3 4-1.1 7.6-2.8 10.8-5.2l4.6 4.6 3-14-14 3 5 5.1z"})),Object(r.createElement)("h2",{className:"ct-modal-title"},!ct_customizer_localizations.is_parent_theme&&Object(c.__)("Copy From Parent Theme","blc"),ct_customizer_localizations.is_parent_theme&&Object(c.__)("Copy From Child Theme","blc")),Object(r.createElement)("p",null,!ct_customizer_localizations.is_parent_theme&&Object(c.__)("You are about to copy all the settings from your parent theme into the child theme. Are you sure you want to continue?","blc"),ct_customizer_localizations.is_parent_theme&&Object(c.__)("You are about to copy all the settings from your child theme into the parent theme. Are you sure you want to continue?","blc")),Object(r.createElement)("div",{className:"ct-modal-actions has-divider","data-buttons":"2"},Object(r.createElement)("button",{onClick:function(e){e.preventDefault(),e.stopPropagation(),u(!1)},className:"button"},Object(c.__)("Cancel","blc")),Object(r.createElement)("button",{className:"button button-primary",onClick:function(e){e.preventDefault();var t=new FormData;t.append("action","blocksy_customizer_copy_options"),t.append("wp_customize","on"),t.append("strategy",i);try{fetch(window.ajaxurl,{method:"POST",body:t}).then((function(e){200===e.status&&e.json().then((function(e){e.success,e.data;location.reload()}))}))}catch(e){}}},Object(c.__)("Yes, I am sure","blc"))))}}),Object(r.createElement)(a.Overlay,{items:d,className:"ct-admin-modal ct-export-modal",onDismiss:function(){return p(!1)},render:function(){return Object(r.createElement)("div",{className:"ct-modal-content"},Object(r.createElement)("h2",{className:"ct-modal-title"},Object(c.__)("Export Settings","blc")),Object(r.createElement)("p",null,Object(c.__)("Choose what set of settings you want to export.","blc")),Object(r.createElement)("div",{className:"ct-export-options"},["options","widgets"].map((function(e){return Object(r.createElement)("div",{className:"ct-checkbox-container",onClick:function(){1===f.length&&f[0]===e||m((function(t){return t.includes(e)?t.filter((function(t){return t!==e})):[].concat(S(t),[e])}))}},{options:Object(c.__)("Customizer settings","blc"),widgets:Object(c.__)("Widgets settings","blc")}[e],Object(r.createElement)("span",{className:l()("ct-checkbox",{active:f.includes(e)})},Object(r.createElement)("svg",{width:"10",height:"8",viewBox:"0 0 11.2 9.1"},Object(r.createElement)("polyline",{className:"check",points:"1.2,4.8 4.4,7.9 9.9,1.2 "}))))}))),Object(r.createElement)("div",{className:"ct-modal-actions has-divider","data-buttons":"2"},Object(r.createElement)("button",{onClick:function(e){e.preventDefault(),e.stopPropagation(),p(!1)},className:"button"},Object(c.__)("Cancel","blc")),Object(r.createElement)("button",{className:"button button-primary",onClick:function(e){e.preventDefault();var t=new FormData;t.append("action","blocksy_customizer_export"),t.append("strategy",f.join(":")),t.append("wp_customize","on");try{fetch(window.ajaxurl,{method:"POST",body:t}).then((function(e){200===e.status&&e.json().then((function(e){var t=e.success,n=e.data;if(t){var r=new Blob([n.data],{type:"application/octet-stream;charset=utf-8"});w()(r,"blocksy-export.dat"),p(!1)}}))}))}catch(e){}}},Object(c.__)("Export","blc"))))}}))},A=n(5),P=n.n(A),T=n(8),D=n(9),z=n.n(D),I=n(10),L=n.n(I),R=n(11),F=n.n(R);function U(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function M(e){return function(e){if(Array.isArray(e))return G(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||V(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.")}()}function B(e,t,n,r,o,c,a){try{var i=e[c](a),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,o)}function H(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}(e,t)||V(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 V(e,t){if(e){if("string"==typeof e)return G(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)?G(e,t):void 0}}function G(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}var $=L()(),Y=function(e){e.forcedEdit;var t,n,o=e.headerId,i=H(Object(r.useState)(!1),2),l=i[0],u=i[1],s=H(Object(r.useState)(null),2),d=s[0],p=s[1],b=Object(r.useContext)(a.PlacementsDragDropContext),f=(b.builderValueCollection,b.builderValueDispatch,Object(r.useRef)()),m=F()($),y=z()("".concat(blocksy_admin.ajax_url,"?action=blocksy_header_get_all_conditions"),{method:"POST",formatter:(t=regeneratorRuntime.mark((function e(t){var n,r,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.json();case 2:if(n=e.sent,r=n.success,o=n.data,r&&o.conditions){e.next=7;break}throw new Error;case 7:return e.abrupt("return",o.conditions);case 8:case"end":return e.stop()}}),e)})),n=function(){var e=this,n=arguments;return new Promise((function(r,o){var c=t.apply(e,n);function a(e){B(c,r,o,a,i,"next",e)}function i(e){B(c,r,o,a,i,"throw",e)}a(void 0)}))},function(e){return n.apply(this,arguments)}),depends:[m]}),O=y.data,j=y.isLoading;y.error;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("button",{className:"button-primary",style:{width:"100%"},onClick:function(e){j||(e.preventDefault(),e.stopPropagation(),u(!0))}},Object(c.__)("Add/Edit Conditions","blc")),Object(r.createElement)(a.Overlay,{items:l,initialFocusRef:f,className:"ct-admin-modal ct-builder-conditions-modal",onDismiss:function(){u(!1),p(null)},render:function(){var e;return Object(r.createElement)("div",{className:"ct-modal-content",ref:f},Object(r.createElement)("h2",null,sprintf(Object(c.__)("Display Conditions","blc"))),Object(r.createElement)("p",null,Object(c.__)("Add one or more conditions in order to display your header.","blc")),Object(r.createElement)("div",{className:"ct-modal-scroll"},Object(r.createElement)(a.OptionsPanel,{onChange:function(e,t){p((function(e){return[].concat(M((e||O).filter((function(e){return e.id!==o}))),[{id:o,conditions:t}])}))},options:{conditions:(e={type:"blocksy-display-condition",design:"none",value:[]},U(e,"design","none"),U(e,"label",!1),e)},value:{conditions:((d||O).find((function(e){return e.id===o}))||{conditions:[]}).conditions},hasRevertButton:!1})),Object(r.createElement)("div",{className:"ct-modal-actions has-divider"},Object(r.createElement)("button",{className:"button-primary",disabled:!d,onClick:function(){fetch("".concat(wp.ajax.settings.url,"?action=blocksy_header_update_all_conditions"),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST",body:JSON.stringify(d)}).then((function(e){return e.json()})).then((function(){$(),u(!1)}))}},Object(c.__)("Save Conditions","blc"))))}}))};function q(){return(q=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)}function J(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 W(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?J(Object(n),!0).forEach((function(t){X(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):J(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function X(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var K=function(){ct_customizer_localizations.header_builder_data.secondary_items.header,ct_customizer_localizations.header_builder_data.header;var e=Object(r.useContext)(a.PlacementsDragDropContext),t=e.builderValueDispatch,n=e.builderValue,i=(e.option,e.builderValueCollection),u=e.panelsActions,s=Object(T.applyFilters)("blocksy.header.available-sections",null,i.sections)||i.sections.filter((function(e){var t=e.id;return"type-2"!==t&&"type-3"!==t&&-1===t.indexOf("ct-custom")}));return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("ul",{className:l()("ct-panels-manager")},s.map((function(e){var o=e.name,i=e.id,s=o||{"type-1":Object(c.__)("Global Header","blocksy")}[i]||i,d="builder_header_panel_".concat(i),p=ct_customizer_localizations.header_builder_data.header_data.header_options,b={label:s,"inner-options":W(W({},i.indexOf("ct-custom")>-1?{conditions_button:{label:Object(c.__)("Edit Conditions","blc"),type:"jsx",design:"block",render:function(){return Object(r.createElement)(Y,{headerId:i})}}}:{}),p)};return Object(r.createElement)(a.PanelMetaWrapper,q({id:d,key:i,option:b},u,{getActualOption:function(e){var o=e.open;return Object(r.createElement)(r.Fragment,null,i===n.id&&Object(r.createElement)(a.Panel,{id:d,getValues:function(){return W({id:i},n.settings||{})},option:b,onChangeFor:function(e,r){t({type:"BUILDER_GLOBAL_SETTING_ON_CHANGE",payload:{optionId:e,optionValue:r,values:Object(a.getValueFromInput)(p,Array.isArray(n.settings)?{}:n.settings||{})}})},view:"simple"}),Object(r.createElement)("li",{className:l()({active:i===n.id,"ct-global":"type-1"===i}),onClick:function(){i===n.id?o():t({type:"PICK_BUILDER_SECTION",payload:{id:i}})}},Object(r.createElement)("span",{className:"ct-panel-name"},s),i.indexOf("ct-custom")>-1&&i!==n.id&&Object(r.createElement)("span",{className:"ct-remove-instance",onClick:function(e){e.preventDefault(),e.stopPropagation(),t({type:"REMOVE_BUILDER_SECTION",payload:{id:i}})}},Object(r.createElement)("i",{className:"ct-tooltip-top"},Object(c.__)("Remove header","blc")),Object(r.createElement)("svg",{width:"11px",height:"11px",viewBox:"0 0 24 24"},Object(r.createElement)("path",{d:"M9.6,0l0,1.2H1.2v2.4h21.6V1.2h-8.4l0-1.2H9.6z M2.8,6l1.8,15.9C4.8,23.1,5.9,24,7.1,24h9.9c1.2,0,2.2-0.9,2.4-2.1L21.2,6H2.8z"})))))}}))}))),Object(r.createElement)(o.Slot,{name:"PlacementsBuilderPanelsManagerAfter"},(function(e){return 0===e.length?null:e})))};P.a.on("blocksy:options:before-option",(function(e){if(e.option&&"ct-header-builder"===e.option.type){var t=e.content;e.content=Object(r.createElement)(r.Fragment,null,t,Object(r.createElement)(o.Fill,{name:"PlacementsBuilderPanelsManager"},Object(r.createElement)(K,null)))}})),P.a.on("blocksy:options:register",(function(e){e["blocksy-display-condition"]=g,e["blocksy-customizer-options-manager"]=N}))}]);
static/bundle/sync.js CHANGED
@@ -1 +1 @@
1
- !function(e){var t={};function o(r){if(t[r])return t[r].exports;var c=t[r]={i:r,l:!1,exports:{}};return e[r].call(c.exports,c,c.exports,o),c.l=!0,c.exports}o.m=e,o.c=t,o.d=function(e,t,r){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(o.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var c in e)o.d(r,c,function(t){return e[t]}.bind(null,c));return r},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=2)}([function(e,t){e.exports=window.blocksyCustomizerSync},function(e,t){e.exports=window.ctEvents},function(e,t,o){"use strict";o.r(t);var r=o(1),c=o.n(r),a=o(0);function n(e){return function(e){if(Array.isArray(e))return l(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);"Object"===o&&e.constructor&&(o=e.constructor.name);if("Map"===o||"Set"===o)return Array.from(e);if("Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return l(e,t)}(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.")}()}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,r=new Array(t);o<t;o++)r[o]=e[o];return r}function i(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,r)}return o}function s(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?i(Object(o),!0).forEach((function(t){u(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):i(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function u(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}c.a.on("ct:header:sync:collect-variable-descriptors",(function(e){e.account=function(e){var t=e.itemId;return s(s(s(s({accountHeaderIconSize:{selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:[Object(a.getRootSelectorFor)({itemId:t})[0]],operation:"suffix",to_add:'[data-state="out"]'})),variable:"icon-size",responsive:!0,unit:"px"},account_loggedin_icon_size:{selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:[Object(a.getRootSelectorFor)({itemId:t})[0]],operation:"suffix",to_add:'[data-state="in"]'})),variable:"icon-size",responsive:!0,unit:"px"},accountHeaderAvatarSize:{selector:Object(a.assembleSelector)(Object(a.getRootSelectorFor)({itemId:t})),variable:"avatar-size",responsive:!0,unit:"px"}},Object(a.handleBackgroundOptionFor)({id:"accountHeaderFormBackground",selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:[Object(a.getRootSelectorFor)({itemId:t})[0]],operation:"suffix",to_add:"#account-modal .ct-account-form"}))})),Object(a.handleBackgroundOptionFor)({id:"accountHeaderBackground",selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:[Object(a.getRootSelectorFor)({itemId:t})[0]],operation:"suffix",to_add:"#account-modal"}))})),{},{cart_panel_shadow:{selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:[Object(a.getRootSelectorFor)({itemId:t})[0]],operation:"suffix",to_add:"#account-modal .ct-account-form"})),type:"box-shadow",variable:"box-shadow",responsive:!0},accountHeaderMargin:{selector:Object(a.assembleSelector)(Object(a.getRootSelectorFor)({itemId:t})),type:"spacing",variable:"margin",responsive:!0,important:!0}},Object(a.typographyOption)({id:"account_label_font",selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:[Object(a.getRootSelectorFor)({itemId:t})[0]],operation:"suffix",to_add:".ct-header-account .ct-label"}))})),{},{accountHeaderColor:[{selector:Object(a.assembleSelector)(Object(a.getRootSelectorFor)({itemId:t})),variable:"linkInitialColor",type:"color:default",responsive:!0},{selector:Object(a.assembleSelector)(Object(a.getRootSelectorFor)({itemId:t})),variable:"linkHoverColor",type:"color:hover",responsive:!0}],header_account_icon_color:[{selector:Object(a.assembleSelector)(Object(a.getRootSelectorFor)({itemId:t})),variable:"icon-color",type:"color:default",responsive:!0},{selector:Object(a.assembleSelector)(Object(a.getRootSelectorFor)({itemId:t})),variable:"icon-hover-color",type:"color:hover",responsive:!0}],transparentAccountHeaderColor:[{selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:Object(a.getRootSelectorFor)({itemId:t}),operation:"between",to_add:'[data-transparent-row="yes"]'})),variable:"linkInitialColor",type:"color:default",responsive:!0},{selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:Object(a.getRootSelectorFor)({itemId:t}),operation:"between",to_add:'[data-transparent-row="yes"]'})),variable:"linkHoverColor",type:"color:hover",responsive:!0}],transparent_header_account_icon_color:[{selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:Object(a.getRootSelectorFor)({itemId:t}),operation:"between",to_add:'[data-transparent-row="yes"]'})),variable:"icon-color",type:"color:default",responsive:!0},{selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:Object(a.getRootSelectorFor)({itemId:t}),operation:"between",to_add:'[data-transparent-row="yes"]'})),variable:"icon-hover-color",type:"color:hover",responsive:!0}],stickyAccountHeaderColor:[{selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:Object(a.getRootSelectorFor)({itemId:t}),operation:"between",to_add:'[data-sticky*="yes"]'})),variable:"linkInitialColor",type:"color:default",responsive:!0},{selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:Object(a.getRootSelectorFor)({itemId:t}),operation:"between",to_add:'[data-sticky*="yes"]'})),variable:"linkHoverColor",type:"color:hover",responsive:!0}],sticky_header_account_icon_color:[{selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:Object(a.getRootSelectorFor)({itemId:t}),operation:"between",to_add:'[data-sticky*="yes"]'})),variable:"icon-color",type:"color:default",responsive:!0},{selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:Object(a.getRootSelectorFor)({itemId:t}),operation:"between",to_add:'[data-sticky*="yes"]'})),variable:"icon-hover-color",type:"color:hover",responsive:!0}]})}})),c.a.on("ct:header:sync:item:account",(function(e){var t=e.values,o=(t.loggedin_style,t.loggedin_label,e.optionId),r=e.optionValue,c='[data-id="account"]';"account_label_visibility"===o&&Object(a.updateAndSaveEl)(c,(function(e){n(e.querySelectorAll(".ct-label")).map((function(e){Object(a.responsiveClassesFor)(r,e)}))})),"loggedin_label"===o&&Object(a.updateAndSaveEl)(c,(function(e){n(e.querySelectorAll(".ct-label")).map((function(e){e.innerHTML=r}))})),"login_label"===o&&Object(a.updateAndSaveEl)(c,(function(e){n(e.querySelectorAll(".ct-label")).map((function(e){e.innerHTML=r}))}))})),c.a.on("ct:header:sync:collect-variable-descriptors",(function(e){})),c.a.on("ct:header:sync:item:global",(function(e){var t=e.optionId,o=e.optionValue,r=e.values;if("has_sticky_header"===t||"sticky_rows"===t||"sticky_behaviour"===t){var a=r.has_sticky_header,n=r.sticky_rows,l=r.sticky_behaviour;Array.from(document.querySelectorAll("[data-sticky]")).map((function(e){e.removeAttribute("data-sticky")})),"yes"===a&&Array.from(document.querySelectorAll("[data-row]")).map((function(e){var t=e.dataset.row;if(n[t]){var o=[];l.desktop&&o.push("desktop"),l.mobile&&o.push("mobile"),e.dataset.sticky=o.join(":")}})),c.a.trigger("blocksy:frontend:init")}if("transparent_behaviour"===t){if(!document.querySelector("[data-transparent]"))return;Array.from(document.querySelectorAll("[data-device]")).map((function(e){e.removeAttribute("data-transparent"),Array.from(e.querySelectorAll("[data-row]")).map((function(e){return e.removeAttribute("data-transparent-row")})),o[e.dataset.device]&&(e.dataset.transparent="",Array.from(e.querySelectorAll("[data-row]")).map((function(e){return e.dataset.transparentRow="yes"}))),c.a.trigger("blocksy:frontend:init")}))}}))}]);
1
+ !function(e){var t={};function o(r){if(t[r])return t[r].exports;var c=t[r]={i:r,l:!1,exports:{}};return e[r].call(c.exports,c,c.exports,o),c.l=!0,c.exports}o.m=e,o.c=t,o.d=function(e,t,r){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(o.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var c in e)o.d(r,c,function(t){return e[t]}.bind(null,c));return r},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=3)}([function(e,t){e.exports=window.blocksyCustomizerSync},function(e,t){e.exports=window.ctEvents},function(e,t){e.exports=window.ctFrontend},function(e,t,o){"use strict";o.r(t);var r=o(1),c=o.n(r),a=o(0);o(2);function n(e){return function(e){if(Array.isArray(e))return l(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);"Object"===o&&e.constructor&&(o=e.constructor.name);if("Map"===o||"Set"===o)return Array.from(e);if("Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return l(e,t)}(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.")}()}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,r=new Array(t);o<t;o++)r[o]=e[o];return r}function i(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,r)}return o}function s(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?i(Object(o),!0).forEach((function(t){u(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):i(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function u(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}c.a.on("ct:header:sync:collect-variable-descriptors",(function(e){e.account=function(e){var t=e.itemId;return s(s(s(s({accountHeaderIconSize:{selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:Object(a.getRootSelectorFor)({itemId:t}),operation:"el-suffix",to_add:'[data-state="out"]'})),variable:"icon-size",responsive:!0,unit:"px"},account_loggedin_icon_size:{selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:Object(a.getRootSelectorFor)({itemId:t}),operation:"el-suffix",to_add:'[data-state="in"]'})),variable:"icon-size",responsive:!0,unit:"px"},accountHeaderAvatarSize:{selector:Object(a.assembleSelector)(Object(a.getRootSelectorFor)({itemId:t})),variable:"avatar-size",responsive:!0,unit:"px"}},Object(a.handleBackgroundOptionFor)({id:"accountHeaderFormBackground",selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:[Object(a.getRootSelectorFor)({itemId:t})[0]],operation:"suffix",to_add:"#account-modal .ct-account-form"}))})),Object(a.handleBackgroundOptionFor)({id:"accountHeaderBackground",selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:[Object(a.getRootSelectorFor)({itemId:t})[0]],operation:"suffix",to_add:"#account-modal"}))})),{},{account_form_shadow:{selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:[Object(a.getRootSelectorFor)({itemId:t})[0]],operation:"suffix",to_add:"#account-modal .ct-account-form"})),type:"box-shadow",variable:"box-shadow",responsive:!0},accountHeaderMargin:{selector:Object(a.assembleSelector)(Object(a.getRootSelectorFor)({itemId:t})),type:"spacing",variable:"margin",responsive:!0,important:!0}},Object(a.typographyOption)({id:"account_label_font",selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:Object(a.getRootSelectorFor)({itemId:t}),operation:"suffix",to_add:".ct-label"}))})),{},{accountHeaderColor:[{selector:Object(a.assembleSelector)(Object(a.getRootSelectorFor)({itemId:t})),variable:"linkInitialColor",type:"color:default",responsive:!0},{selector:Object(a.assembleSelector)(Object(a.getRootSelectorFor)({itemId:t})),variable:"linkHoverColor",type:"color:hover",responsive:!0}],header_account_icon_color:[{selector:Object(a.assembleSelector)(Object(a.getRootSelectorFor)({itemId:t})),variable:"icon-color",type:"color:default",responsive:!0},{selector:Object(a.assembleSelector)(Object(a.getRootSelectorFor)({itemId:t})),variable:"icon-hover-color",type:"color:hover",responsive:!0}],transparentAccountHeaderColor:[{selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:Object(a.getRootSelectorFor)({itemId:t}),operation:"between",to_add:'[data-transparent-row="yes"]'})),variable:"linkInitialColor",type:"color:default",responsive:!0},{selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:Object(a.getRootSelectorFor)({itemId:t}),operation:"between",to_add:'[data-transparent-row="yes"]'})),variable:"linkHoverColor",type:"color:hover",responsive:!0}],transparent_header_account_icon_color:[{selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:Object(a.getRootSelectorFor)({itemId:t}),operation:"between",to_add:'[data-transparent-row="yes"]'})),variable:"icon-color",type:"color:default",responsive:!0},{selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:Object(a.getRootSelectorFor)({itemId:t}),operation:"between",to_add:'[data-transparent-row="yes"]'})),variable:"icon-hover-color",type:"color:hover",responsive:!0}],stickyAccountHeaderColor:[{selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:Object(a.getRootSelectorFor)({itemId:t}),operation:"between",to_add:'[data-sticky*="yes"]'})),variable:"linkInitialColor",type:"color:default",responsive:!0},{selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:Object(a.getRootSelectorFor)({itemId:t}),operation:"between",to_add:'[data-sticky*="yes"]'})),variable:"linkHoverColor",type:"color:hover",responsive:!0}],sticky_header_account_icon_color:[{selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:Object(a.getRootSelectorFor)({itemId:t}),operation:"between",to_add:'[data-sticky*="yes"]'})),variable:"icon-color",type:"color:default",responsive:!0},{selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:Object(a.getRootSelectorFor)({itemId:t}),operation:"between",to_add:'[data-sticky*="yes"]'})),variable:"icon-hover-color",type:"color:hover",responsive:!0}]})}})),c.a.on("ct:header:sync:item:account",(function(e){var t=e.optionId,o=e.optionValue,r='[data-id="account"]';"header_account_visibility"===t&&Object(a.updateAndSaveEl)(r,(function(e){return Object(a.responsiveClassesFor)(s(s({},o),{},{desktop:!0}),e)})),"loggedin_account_label_visibility"!==t&&"loggedout_account_label_visibility"!==t||Object(a.updateAndSaveEl)(r,(function(e){n(e.querySelectorAll(".ct-label")).map((function(e){Object(a.responsiveClassesFor)(o,e)}))})),"loggedin_label"===t&&Object(a.updateAndSaveEl)(r,(function(e){n(e.querySelectorAll(".ct-label")).map((function(e){e.innerHTML=o}))})),"login_label"===t&&Object(a.updateAndSaveEl)(r,(function(e){n(e.querySelectorAll(".ct-label")).map((function(e){e.innerHTML=o}))})),"loggedout_label_position"!==t&&"loggedin_label_position"!==t||(Object(a.updateAndSaveEl)(r,(function(e){o.desktop||(o={desktop:o,mobile:o}),e.dataset.label=o.desktop}),{onlyView:"desktop"}),Object(a.updateAndSaveEl)(r,(function(e){o.desktop||(o={desktop:o,mobile:o}),e.dataset.label=o.mobile}),{onlyView:"mobile"}))})),c.a.on("ct:header:sync:collect-variable-descriptors",(function(e){})),c.a.on("ct:header:sync:item:global",(function(e){var t=e.optionId,o=e.optionValue,r=e.values;if("has_sticky_header"===t||"sticky_rows"===t||"sticky_behaviour"===t){var a=r.has_sticky_header,n=r.sticky_rows,l=r.sticky_behaviour;Array.from(document.querySelectorAll("[data-sticky]")).map((function(e){e.removeAttribute("data-sticky")})),"yes"===a&&Array.from(document.querySelectorAll("[data-row]")).map((function(e){var t=e.dataset.row;if(n[t]){var o=[];l.desktop&&o.push("desktop"),l.mobile&&o.push("mobile"),e.dataset.sticky=o.join(":")}})),c.a.trigger("blocksy:frontend:init")}if("transparent_behaviour"===t){if(!document.querySelector("[data-transparent]"))return;Array.from(document.querySelectorAll("[data-device]")).map((function(e){e.removeAttribute("data-transparent"),Array.from(e.querySelectorAll("[data-row]")).map((function(e){return e.removeAttribute("data-transparent-row")})),o[e.dataset.device]&&(e.dataset.transparent="",Array.from(e.querySelectorAll("[data-row]")).map((function(e){return e.dataset.transparentRow="yes"}))),c.a.trigger("blocksy:frontend:init")}))}}))}]);
static/js/components/BetaConsent.js DELETED
@@ -1,60 +0,0 @@
1
- import {
2
- createElement,
3
- Component,
4
- useEffect,
5
- useState,
6
- Fragment
7
- } from '@wordpress/element'
8
- import { __ } from 'ct-i18n'
9
- import classnames from 'classnames'
10
- import { Switch } from 'blocksy-options'
11
-
12
- const BetaConsent = () => {
13
- const [hasConsent, setHasConsent] = useState(
14
- ctDashboardLocalizations.plugin_data.has_beta_consent
15
- )
16
-
17
- const [isLoading, setIsLoading] = useState(false)
18
-
19
- const toggleValue = async () => {
20
- if (isLoading) {
21
- return
22
- }
23
-
24
- setHasConsent(hasConsent => !hasConsent)
25
-
26
- setIsLoading(true)
27
-
28
- const body = new FormData()
29
-
30
- body.append('action', 'blocksy_toggle_has_beta_consent')
31
-
32
- const response = await fetch(ctDashboardLocalizations.ajax_url, {
33
- method: 'POST',
34
- body
35
- })
36
-
37
- window.ctDashboardLocalizations.plugin_data.has_beta_consent = !hasConsent
38
-
39
- setIsLoading(false)
40
- }
41
-
42
- return (
43
- <div className="ct-beta-consent">
44
- <h2 onClick={() => toggleValue()}>
45
- {__('Receive βeta Updates', 'blc')}
46
-
47
- <Switch value={hasConsent ? 'yes' : 'no'} onChange={() => {}} />
48
- </h2>
49
-
50
- <p>
51
- {__(
52
- 'Receive beta updates for Blocksy theme and companion and help us test the new versions. Please note that installing beta versions is not recommended on production sites.',
53
- 'blc'
54
- )}
55
- </p>
56
- </div>
57
- )
58
- }
59
-
60
- export default BetaConsent
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
static/js/dashboard.js CHANGED
@@ -9,7 +9,6 @@ import DemoInstall from './screens/DemoInstall'
9
  import SiteExport from './screens/SiteExport'
10
  import DemoToInstall from './screens/DemoInstall/DemoToInstall'
11
  import OptIn from './screens/OptIn'
12
- import BetaConsent from './components/BetaConsent'
13
 
14
  ctEvents.on('ct:dashboard:routes', (r) => {
15
  r.push({
@@ -53,14 +52,6 @@ ctEvents.on('ct:dashboard:home:before', (r) => {
53
  r.content = <OptIn />
54
  })
55
 
56
- ctEvents.on('ct:dashboard:home:after', (r) => {
57
- if (ctDashboardLocalizations.plugin_data.hide_beta_updates) {
58
- return
59
- }
60
-
61
- r.content = <BetaConsent />
62
- })
63
-
64
  ctEvents.on('ct:dashboard:heading:after', (r) => {
65
  if (!ctDashboardLocalizations.plugin_data.is_pro) {
66
  return
9
  import SiteExport from './screens/SiteExport'
10
  import DemoToInstall from './screens/DemoInstall/DemoToInstall'
11
  import OptIn from './screens/OptIn'
 
12
 
13
  ctEvents.on('ct:dashboard:routes', (r) => {
14
  r.push({
52
  r.content = <OptIn />
53
  })
54
 
 
 
 
 
 
 
 
 
55
  ctEvents.on('ct:dashboard:heading:after', (r) => {
56
  if (!ctDashboardLocalizations.plugin_data.is_pro) {
57
  return
static/js/frontend/account.js CHANGED
@@ -236,14 +236,14 @@ export const mountAccount = () => {
236
  el.hasSearchEventListener = true
237
 
238
  el.addEventListener('click', (e) => {
239
- e.preventDefault()
240
-
241
  try {
242
  document.querySelector(el.hash)
243
  } catch (e) {
244
  return
245
  }
246
 
 
 
247
  activateScreen(document.querySelector(el.hash), {
248
  screen: 'login',
249
  })
236
  el.hasSearchEventListener = true
237
 
238
  el.addEventListener('click', (e) => {
 
 
239
  try {
240
  document.querySelector(el.hash)
241
  } catch (e) {
242
  return
243
  }
244
 
245
+ e.preventDefault()
246
+
247
  activateScreen(document.querySelector(el.hash), {
248
  screen: 'login',
249
  })
static/js/main.js CHANGED
@@ -1,15 +1,8 @@
1
  import ctEvents from 'ct-events'
 
2
  import { mountAccount } from './frontend/account'
3
  import { mountStickyHeader } from './frontend/sticky'
4
 
5
- export const onDocumentLoaded = (cb) => {
6
- if (/comp|inter|loaded/.test(document.readyState)) {
7
- cb()
8
- } else {
9
- document.addEventListener('DOMContentLoaded', cb, false)
10
- }
11
- }
12
-
13
  onDocumentLoaded(() => {
14
  mountAccount()
15
  mountStickyHeader()
1
  import ctEvents from 'ct-events'
2
+ import { onDocumentLoaded } from 'blocksy-frontend'
3
  import { mountAccount } from './frontend/account'
4
  import { mountStickyHeader } from './frontend/sticky'
5
 
 
 
 
 
 
 
 
 
6
  onDocumentLoaded(() => {
7
  mountAccount()
8
  mountStickyHeader()
static/js/options.js CHANGED
@@ -3,7 +3,7 @@ import { Fill } from '@wordpress/components'
3
  import DisplayCondition from './options/DisplayCondition'
4
  import CustomizerOptionsManager from './options/CustomizerOptionsManager'
5
 
6
- import { onDocumentLoaded } from '../../framework/extensions/cookies-consent/static/js/helpers'
7
 
8
  import ctEvents from 'ct-events'
9
 
3
  import DisplayCondition from './options/DisplayCondition'
4
  import CustomizerOptionsManager from './options/CustomizerOptionsManager'
5
 
6
+ import { onDocumentLoaded } from 'blocksy-options'
7
 
8
  import ctEvents from 'ct-events'
9
 
static/js/options/CustomizerOptionsManager.js CHANGED
@@ -176,7 +176,7 @@ const CustomizerOptionsManager = () => {
176
  onDismiss={() => setIsCopyingOptions(false)}
177
  render={() => (
178
  <div className="ct-modal-content">
179
- <svg width="40" height="40" viewBox="0 0 66 66">
180
  <path d="M66 33.1c0 2.8-.4 5.5-1.1 8.2 0 0-1.7-.6-1.9-.6 3.4-13.1-2.2-27.4-14.5-34.5C41.3 2 33 .9 25 3.1c-3.5.9-6.7 2.4-9.5 4.4L20 12 6 15 9 1l5 5c3.1-2.2 6.6-3.9 10.5-4.9 2.7-.7 5.4-1.1 8-1.1 5.9-.1 11.7 1.4 17 4.4C60.1 10.5 66 21.7 66 33.1zm-49 6.3l2.4-3c-.3-1.2-.4-2.3-.4-3.4s.1-2.2.4-3.3l-2.4-3 2.5-4.3 3.8.5c1.6-1.6 3.6-2.7 5.8-3.3l1.4-3.6h5l1.4 3.6c2.2.6 4.2 1.8 5.8 3.3l3.8-.5 2.5 4.3-2.4 3c.3 1.1.4 2.2.4 3.3s-.1 2.2-.4 3.3l2.4 3-2.5 4.3-3.8-.5c-1.6 1.6-3.6 2.7-5.8 3.3L35.4 50h-5L29 46.4c-2.2-.6-4.2-1.8-5.8-3.3l-3.8.5-2.4-4.2zm8-6.4c0 4.4 3.6 8 8 8s8-3.6 8-8-3.6-8-8-8-8 3.6-8 8zm25.9 25.3c-3 2.1-6.3 3.7-9.9 4.7-8 2.1-16.4 1-23.5-3.1C5.2 52.8-.4 38.5 3 25.4c-.7-.1-1.3-.3-2-.5-.7 2.7-1 5.3-1 8 0 11.4 5.9 22.5 16.5 28.6 7.6 4.4 16.5 5.6 25 3.3 4-1.1 7.6-2.8 10.8-5.2l4.6 4.6 3-14-14 3 5 5.1z" />
181
  </svg>
182
 
@@ -201,19 +201,19 @@ const CustomizerOptionsManager = () => {
201
  )}
202
  </p>
203
 
204
- <div className="ct-modal-actions">
205
  <button
206
  onClick={(e) => {
207
  e.preventDefault()
208
  e.stopPropagation()
209
  setIsCopyingOptions(false)
210
  }}
211
- className="ct-button">
212
  {__('Cancel', 'blc')}
213
  </button>
214
 
215
  <button
216
- className="ct-button-primary"
217
  onClick={(e) => {
218
  e.preventDefault()
219
  const body = new FormData()
176
  onDismiss={() => setIsCopyingOptions(false)}
177
  render={() => (
178
  <div className="ct-modal-content">
179
+ <svg width="35" height="35" viewBox="0 0 66 66">
180
  <path d="M66 33.1c0 2.8-.4 5.5-1.1 8.2 0 0-1.7-.6-1.9-.6 3.4-13.1-2.2-27.4-14.5-34.5C41.3 2 33 .9 25 3.1c-3.5.9-6.7 2.4-9.5 4.4L20 12 6 15 9 1l5 5c3.1-2.2 6.6-3.9 10.5-4.9 2.7-.7 5.4-1.1 8-1.1 5.9-.1 11.7 1.4 17 4.4C60.1 10.5 66 21.7 66 33.1zm-49 6.3l2.4-3c-.3-1.2-.4-2.3-.4-3.4s.1-2.2.4-3.3l-2.4-3 2.5-4.3 3.8.5c1.6-1.6 3.6-2.7 5.8-3.3l1.4-3.6h5l1.4 3.6c2.2.6 4.2 1.8 5.8 3.3l3.8-.5 2.5 4.3-2.4 3c.3 1.1.4 2.2.4 3.3s-.1 2.2-.4 3.3l2.4 3-2.5 4.3-3.8-.5c-1.6 1.6-3.6 2.7-5.8 3.3L35.4 50h-5L29 46.4c-2.2-.6-4.2-1.8-5.8-3.3l-3.8.5-2.4-4.2zm8-6.4c0 4.4 3.6 8 8 8s8-3.6 8-8-3.6-8-8-8-8 3.6-8 8zm25.9 25.3c-3 2.1-6.3 3.7-9.9 4.7-8 2.1-16.4 1-23.5-3.1C5.2 52.8-.4 38.5 3 25.4c-.7-.1-1.3-.3-2-.5-.7 2.7-1 5.3-1 8 0 11.4 5.9 22.5 16.5 28.6 7.6 4.4 16.5 5.6 25 3.3 4-1.1 7.6-2.8 10.8-5.2l4.6 4.6 3-14-14 3 5 5.1z" />
181
  </svg>
182
 
201
  )}
202
  </p>
203
 
204
+ <div className="ct-modal-actions has-divider" data-buttons="2">
205
  <button
206
  onClick={(e) => {
207
  e.preventDefault()
208
  e.stopPropagation()
209
  setIsCopyingOptions(false)
210
  }}
211
+ className="button">
212
  {__('Cancel', 'blc')}
213
  </button>
214
 
215
  <button
216
+ className="button button-primary"
217
  onClick={(e) => {
218
  e.preventDefault()
219
  const body = new FormData()
static/sass/freemius/opt-in-license.scss CHANGED
@@ -7,12 +7,13 @@
7
  margin: 30px 0 0 0;
8
 
9
  input[type=text] {
10
- min-height: 40px;
11
  padding: 0 12px;
 
12
  }
13
 
14
  .dashicons {
15
- top: 13px;
16
  right: 10px;
17
  font-size: 16px;
18
  height: 16px;
@@ -21,40 +22,50 @@
21
 
22
  .show-license-resend-modal {
23
  font-size: 0.9em;
 
24
  }
25
  }
26
 
27
- .fs-actions form {
28
- width: 100%;
 
 
 
 
 
 
 
 
 
29
  }
30
 
31
- .fs-license-sync-disclaimer {
32
  text-align: left;
33
- font-size: 0.9em;
 
 
 
34
  }
35
  }
36
 
37
  #fs_marketing_optin {
38
- padding: 0;
39
  border: none;
40
- border-top: 1px dashed #ddd;
41
- padding-top: 30px;
42
  margin: 30px 0 0 0;
43
  box-shadow: none;
 
 
44
 
45
  &.error {
46
  background: transparent;
47
  }
48
 
49
- .fs-input-container label {
50
- // margin-top: 7px;
51
- }
52
-
53
  .fs-input-label {
54
  margin-left: 22px;
55
  }
56
  }
57
 
 
58
  .fs-freemium-licensing {
59
  border-top: 1px dashed #ddd;
60
  padding: 30px 0;
@@ -69,5 +80,4 @@
69
  }
70
  }
71
  }
72
- }
73
-
7
  margin: 30px 0 0 0;
8
 
9
  input[type=text] {
10
+ min-height: 49px;
11
  padding: 0 12px;
12
+ line-height: initial;
13
  }
14
 
15
  .dashicons {
16
+ top: 17px;
17
  right: 10px;
18
  font-size: 16px;
19
  height: 16px;
22
 
23
  .show-license-resend-modal {
24
  font-size: 0.9em;
25
+ margin-top: 10px;
26
  }
27
  }
28
 
29
+ .fs-actions {
30
+ flex-wrap: wrap;
31
+
32
+ form {
33
+ width: 100%;
34
+ }
35
+
36
+ #license_issues_link {
37
+ flex: 1 1 auto;
38
+ text-align: left;
39
+ }
40
  }
41
 
42
+ .fs-permissions p {
43
  text-align: left;
44
+
45
+ &:last-of-type {
46
+ margin-bottom: 0;
47
+ }
48
  }
49
  }
50
 
51
  #fs_marketing_optin {
 
52
  border: none;
53
+ padding: 30px 0;
 
54
  margin: 30px 0 0 0;
55
  box-shadow: none;
56
+ border-top: 1px dashed #ddd;
57
+ border-bottom: 1px dashed #ddd;
58
 
59
  &.error {
60
  background: transparent;
61
  }
62
 
 
 
 
 
63
  .fs-input-label {
64
  margin-left: 22px;
65
  }
66
  }
67
 
68
+
69
  .fs-freemium-licensing {
70
  border-top: 1px dashed #ddd;
71
  padding: 30px 0;
80
  }
81
  }
82
  }
83
+ }