Blocksy Companion - Version 1.7.43

Version Description

Download this release

Release Info

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

Code changes from version 1.7.41 to 1.7.43

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.41
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.43
7
  Author: CreativeThemes
8
  Author URI: https://creativethemes.com
9
  Text Domain: blc
framework/autoload.php CHANGED
@@ -36,6 +36,7 @@ class Autoloader {
36
  'Cli' => 'framework/cli.php',
37
 
38
  'DynamicCss' => 'framework/features/dynamic-css.php',
 
39
  'DemoInstall' => 'framework/features/demo-install.php',
40
  'DemoInstallContentExport' => 'framework/features/demo-install/content-export.php',
41
  'DemoInstallWidgetsExport' => 'framework/features/demo-install/widgets-export.php',
36
  'Cli' => 'framework/cli.php',
37
 
38
  'DynamicCss' => 'framework/features/dynamic-css.php',
39
+ 'CustomizerOptionsManager' => 'framework/features/customizer-options-manager.php',
40
  'DemoInstall' => 'framework/features/demo-install.php',
41
  'DemoInstallContentExport' => 'framework/features/demo-install/content-export.php',
42
  'DemoInstallWidgetsExport' => 'framework/features/demo-install/widgets-export.php',
framework/extensions/cookies-consent/static/bundle/main.css CHANGED
@@ -1,5 +1,5 @@
1
  /**
2
- * - v1.7.41
3
  *
4
  * Copyright (c) 2020
5
  * Licensed GPLv2+
1
  /**
2
+ * - v1.7.43
3
  *
4
  * Copyright (c) 2020
5
  * Licensed GPLv2+
framework/extensions/mailchimp/static/bundle/main.css CHANGED
@@ -1,5 +1,5 @@
1
  /**
2
- * - v1.7.41
3
  *
4
  * Copyright (c) 2020
5
  * Licensed GPLv2+
1
  /**
2
+ * - v1.7.43
3
  *
4
  * Copyright (c) 2020
5
  * Licensed GPLv2+
framework/extensions/trending/static/bundle/main.css CHANGED
@@ -1,5 +1,5 @@
1
  /**
2
- * - v1.7.36
3
  *
4
  * Copyright (c) 2020
5
  * Licensed GPLv2+
1
  /**
2
+ * - v1.7.43
3
  *
4
  * Copyright (c) 2020
5
  * Licensed GPLv2+
framework/extensions/widgets/static/bundle/main.css CHANGED
@@ -1,5 +1,5 @@
1
  /**
2
- * - v1.7.41
3
  *
4
  * Copyright (c) 2020
5
  * Licensed GPLv2+
1
  /**
2
+ * - v1.7.43
3
  *
4
  * Copyright (c) 2020
5
  * Licensed GPLv2+
framework/features/customizer-options-manager.php ADDED
@@ -0,0 +1,174 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Blocksy;
4
+
5
+ class CustomizerOptionsManager {
6
+ public function __construct() {
7
+ add_filter('blocksy:options:general:bottom', function ($options) {
8
+ $options[blocksy_rand_md5()] = [
9
+ 'label' => __( 'Customizer Import/Export', 'blocksy' ),
10
+ 'type' => 'ct-panel',
11
+ 'setting' => ['transport' => 'postMessage'],
12
+ 'inner-options' => [
13
+
14
+ 'importer' => [
15
+ 'type' => 'blocksy-customizer-options-manager',
16
+ 'design' => 'none',
17
+ ],
18
+
19
+ ],
20
+ ];
21
+
22
+ return $options;
23
+ });
24
+
25
+ add_action('wp_ajax_blocksy_customizer_export', function () {
26
+ if (! current_user_can('manage_options')) {
27
+ wp_send_json_error();
28
+ }
29
+
30
+ wp_send_json_success([
31
+ 'data' => serialize($this->get_data())
32
+ ]);
33
+ });
34
+
35
+ add_action('wp_ajax_blocksy_customizer_import', function () {
36
+ if (! current_user_can('manage_options')) {
37
+ wp_send_json_error();
38
+ }
39
+
40
+ if (! isset($_POST['data'])) {
41
+ wp_send_json_error();
42
+ }
43
+
44
+ $data = @unserialize(wp_unslash($_POST['data']));
45
+
46
+ $importer = new DemoInstallOptionsInstaller([
47
+ 'has_streaming' => false
48
+ ]);
49
+
50
+ $importer->import_options($data);
51
+
52
+ wp_send_json_success([]);
53
+ });
54
+
55
+ add_action('wp_ajax_blocksy_customizer_copy_options', function () {
56
+ if (! current_user_can('manage_options')) {
57
+ wp_send_json_error();
58
+ }
59
+
60
+ if (! isset($_POST['strategy'])) {
61
+ wp_send_json_error();
62
+ }
63
+
64
+ $theme_for_data = get_option('stylesheet');
65
+
66
+ if ($_POST['strategy'] === 'parent') {
67
+ foreach (wp_get_themes() as $id => $theme) {
68
+ if (! $theme->parent()) {
69
+ continue;
70
+ }
71
+
72
+ if ($theme->parent()->get_stylesheet() === 'blocksy') {
73
+ $theme_for_data = $theme->parent()->get_stylesheet();
74
+ }
75
+ }
76
+ }
77
+
78
+ if ($_POST['strategy'] === 'child') {
79
+ foreach (wp_get_themes() as $id => $theme) {
80
+ if (! $theme->parent()) {
81
+ continue;
82
+ }
83
+
84
+ if ($theme->parent()->get_stylesheet() === 'blocksy') {
85
+ $theme_for_data = $theme->get_stylesheet();
86
+ }
87
+ }
88
+ }
89
+
90
+ $data = $this->get_data($theme_for_data);
91
+
92
+ $importer = new DemoInstallOptionsInstaller([
93
+ 'has_streaming' => false
94
+ ]);
95
+
96
+ $importer->import_options($data);
97
+
98
+ wp_send_json_success([]);
99
+ });
100
+ }
101
+
102
+ private function get_data($theme_slug = null) {
103
+ if (! $theme_slug) {
104
+ $theme_slug = get_option('stylesheet');
105
+ }
106
+
107
+ global $wp_customize;
108
+
109
+ $mods = $this->get_theme_mods($theme_slug);
110
+ $data = [
111
+ 'template' => $theme_slug,
112
+ 'mods' => $mods ? $mods : array(),
113
+ 'options' => array()
114
+ ];
115
+
116
+ $core_options = [
117
+ 'blogname',
118
+ 'blogdescription',
119
+ 'show_on_front',
120
+ 'page_on_front',
121
+ 'page_for_posts',
122
+ ];
123
+
124
+ $settings = $wp_customize->settings();
125
+
126
+ foreach ($settings as $key => $setting) {
127
+ if ( 'option' == $setting->type ) {
128
+ // Don't save widget data.
129
+ if ( 'widget_' === substr( strtolower( $key ), 0, 7 ) ) {
130
+ continue;
131
+ }
132
+
133
+ // Don't save sidebar data.
134
+ if ( 'sidebars_' === substr( strtolower( $key ), 0, 9 ) ) {
135
+ continue;
136
+ }
137
+
138
+ // Don't save core options.
139
+ if ( in_array( $key, $core_options ) ) {
140
+ continue;
141
+ }
142
+
143
+ $data['options'][$key] = $setting->value();
144
+ }
145
+ }
146
+
147
+ if (function_exists('wp_get_custom_css_post')) {
148
+ $data['wp_css'] = wp_get_custom_css();
149
+ }
150
+
151
+ return $data;
152
+ }
153
+
154
+ private function get_theme_mods($theme_slug = null) {
155
+ if (! $theme_slug) {
156
+ $theme_slug = get_option('stylesheet');
157
+ }
158
+
159
+ $mods = get_option("theme_mods_$theme_slug");
160
+
161
+ if (false === $mods) {
162
+ $theme_name = wp_get_theme($theme_slug)->get( 'Name' );
163
+
164
+ $mods = get_option( "mods_$theme_name" ); // Deprecated location.
165
+
166
+ if ( is_admin() && false !== $mods ) {
167
+ update_option( "theme_mods_$theme_slug", $mods );
168
+ delete_option( "mods_$theme_name" );
169
+ }
170
+ }
171
+
172
+ return $mods;
173
+ }
174
+ }
framework/features/demo-install/options-import.php CHANGED
@@ -79,6 +79,20 @@ class DemoInstallOptionsInstaller {
79
  exit;
80
  }
81
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
82
  if ($this->has_streaming) {
83
  Plugin::instance()->demo->emit_sse_message([
84
  'action' => 'import_mods_images',
@@ -86,12 +100,13 @@ class DemoInstallOptionsInstaller {
86
  ]);
87
  }
88
 
89
- $options = $demo_content['options'];
90
  $options['mods'] = $this->import_images(
91
  $demo_content,
92
  $options['mods']
93
  );
94
 
 
 
95
  if ($this->has_streaming) {
96
  Plugin::instance()->demo->emit_sse_message([
97
  'action' => 'import_customizer_options',
@@ -99,8 +114,6 @@ class DemoInstallOptionsInstaller {
99
  ]);
100
  }
101
 
102
- global $wp_customize;
103
-
104
  do_action('customize_save', $wp_customize);
105
 
106
  foreach ($options['mods'] as $key => $val) {
@@ -168,15 +181,6 @@ class DemoInstallOptionsInstaller {
168
  ) {
169
  wp_update_custom_css_post($options['wp_css']);
170
  }
171
-
172
- if ($this->has_streaming) {
173
- Plugin::instance()->demo->emit_sse_message([
174
- 'action' => 'complete',
175
- 'error' => false,
176
- ]);
177
-
178
- exit;
179
- }
180
  }
181
 
182
  private function import_images($demo_content, $mods) {
79
  exit;
80
  }
81
 
82
+ $options = $demo_content['options'];
83
+ $this->import_options($options);
84
+
85
+ if ($this->has_streaming) {
86
+ Plugin::instance()->demo->emit_sse_message([
87
+ 'action' => 'complete',
88
+ 'error' => false,
89
+ ]);
90
+
91
+ exit;
92
+ }
93
+ }
94
+
95
+ public function import_options($options) {
96
  if ($this->has_streaming) {
97
  Plugin::instance()->demo->emit_sse_message([
98
  'action' => 'import_mods_images',
100
  ]);
101
  }
102
 
 
103
  $options['mods'] = $this->import_images(
104
  $demo_content,
105
  $options['mods']
106
  );
107
 
108
+ global $wp_customize;
109
+
110
  if ($this->has_streaming) {
111
  Plugin::instance()->demo->emit_sse_message([
112
  'action' => 'import_customizer_options',
114
  ]);
115
  }
116
 
 
 
117
  do_action('customize_save', $wp_customize);
118
 
119
  foreach ($options['mods'] as $key => $val) {
181
  ) {
182
  wp_update_custom_css_post($options['wp_css']);
183
  }
 
 
 
 
 
 
 
 
 
184
  }
185
 
186
  private function import_images($demo_content, $mods) {
plugin.php CHANGED
@@ -89,6 +89,7 @@ class Plugin
89
  $this->theme_integration = new ThemeIntegration();
90
  $this->demo = new DemoInstall();
91
  $this->dynamic_css = new DynamicCss();
 
92
  }
93
 
94
  /**
89
  $this->theme_integration = new ThemeIntegration();
90
  $this->demo = new DemoInstall();
91
  $this->dynamic_css = new DynamicCss();
92
+ new CustomizerOptionsManager();
93
  }
94
 
95
  /**
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.40.2
9
 
10
  == Description ==
11
 
@@ -23,6 +23,16 @@ 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.41: 2020-12-18
27
  - New: Sticky header new behavior (scroll down -> hide header, scroll top -> show header
28
  - Fix: Don't show Config buttons if the extension is not activated
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.43
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.43: 2020-12-25
27
+ - New: Customizer import/export
28
+ - Improvement: Shrink logo functionality doesn't work when sticky header is set to Auto Hide/Show
29
+
30
+ 1.7.42: 2020-12-21
31
+ - Improvement: General fixes and improvements
32
+
33
+ 1.7.41.1: 2020-12-21
34
+ - Fix: Fix freeze for icon picker option
35
+
36
  1.7.41: 2020-12-18
37
  - New: Sticky header new behavior (scroll down -> hide header, scroll top -> show header
38
  - Fix: Don't show Config buttons if the extension is not activated
static/bundle/dashboard.css CHANGED
@@ -1,5 +1,5 @@
1
  /**
2
- * - v1.7.41
3
  *
4
  * Copyright (c) 2020
5
  * Licensed GPLv2+
1
  /**
2
+ * - v1.7.43
3
  *
4
  * Copyright (c) 2020
5
  * Licensed GPLv2+
static/bundle/main.css CHANGED
@@ -1,5 +1,5 @@
1
  /**
2
- * - v1.7.36
3
  *
4
  * Copyright (c) 2020
5
  * Licensed GPLv2+
1
  /**
2
+ * - v1.7.43
3
  *
4
  * Copyright (c) 2020
5
  * Licensed GPLv2+
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=2)}([function(t,e){t.exports=ctEvents},function(t,e){t.exports=window.ctFrontend},function(t,e,r){"use strict";r.r(e),r.d(e,"onDocumentLoaded",(function(){return g}));var n=r(0),o=r.n(n),a=function(t,e){var r=e.screen,n=void 0===r?"login":r;t.querySelector("ul")&&t.querySelector("ul .ct-".concat(n))&&(t.querySelector("ul .active").classList.remove("active"),t.querySelector("ul .ct-".concat(n)).classList.add("active")),t.querySelector('[class*="-form"].active').classList.remove("active"),t.querySelector(".ct-".concat(n,"-form")).classList.add("active")},i=function(){Array.from(document.querySelectorAll(".ct-header-account > a[href]")).map((function(t){t.hasSearchEventListener||(t.hasSearchEventListener=!0,t.addEventListener("click",(function(e){a(document.querySelector(t.hash),{screen:"login"}),o.a.trigger("ct:overlay:handle-click",{e:e,href:t.hash,options:{isModal:!0}})})),t.hash&&function(t){t&&["login","register","forgot-password"].map((function(e){Array.from(t.querySelectorAll(".ct-".concat(e))).map((function(r){r.addEventListener("click",(function(r){r.preventDefault(),a(t,{screen:e})}))}))}))}(document.querySelector(t.hash)))}))},c=r(1);function s(t){return function(t){if(Array.isArray(t))return u(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 u(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 u(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 u(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 l=!1,d=function(t,e,r){return Math.max(t,Math.min(e,r))},y=function(t,e,r){return e[0]+(e[1]-e[0])/(t[1]-t[0])*(r-t[0])},f=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"yes";Array.from(t.querySelectorAll("[data-row][data-transparent-row]")).map((function(t){t.dataset.transparentRow=e}))},m=function(t){return parseFloat(getComputedStyle(t).getPropertyValue("--height"))},p=function(t){var e=getComputedStyle(t).getPropertyValue("--stickyShrink");return e?parseFloat(e)/100*m(t):m(t)};var h=!1,v=function(){if(document.querySelector("[data-sticky]")){var t=window.scrollY,e=function(){var e=document.querySelector('[data-device="'.concat(Object(c.getCurrentScreen)(),'"] [data-sticky]'));if(e){var r=function(t){if(-1===t.dataset.sticky.indexOf("shrink")&&-1===t.dataset.sticky.indexOf("auto-hide"))return t.parentNode.getBoundingClientRect().height+200;var e=t.closest("header").getBoundingClientRect().top+scrollY,r=t.parentNode;return 1===r.parentNode.children.length||r.parentNode.children[0].classList.contains("ct-sticky-container")?e:Array.from(r.parentNode.children).reduce((function(t,e,r){return t.indexOf(0)>-1||!e.dataset.row?[].concat(s(t),[0]):[].concat(s(t),[e.classList.contains("ct-sticky-container")?0:e.getBoundingClientRect().height])}),[]).reduce((function(t,e){return t+e}),e)}(e),n=r>0&&Math.abs(window.scrollY-r)<3||window.scrollY>r,o=e.dataset.sticky.split(":").filter((function(t){return"yes"!==t&&"no"!==t})),a=Array.from(e.querySelectorAll("[data-row]")).reduce((function(t,e){return t+parseFloat(getComputedStyle(e).getPropertyValue("--height"))}),0);if(o.indexOf("auto-hide")>-1){if(window.scrollY<r&&(t=window.scrollY),n&&window.scrollY-t<-5)-1===e.dataset.sticky.indexOf("yes")&&(e.dataset.sticky=["yes-start"].concat(s(o)).join(":"),requestAnimationFrame((function(){e.dataset.sticky=e.dataset.sticky.replace("yes-start","yes-end"),setTimeout((function(){e.dataset.sticky=e.dataset.sticky.replace("yes-end","yes")}),200)}))),f(e,"no"),e.parentNode.style.setProperty("--minHeight","".concat(a,"px"));else{if(!n)return e.dataset.sticky=o.join(":"),e.parentNode.removeAttribute("style"),Array.from(e.querySelectorAll("[data-row]")).map((function(t){return t.removeAttribute("style")})),f(e,"yes"),void(t=window.scrollY);-1===e.dataset.sticky.indexOf("yes-hide")&&e.dataset.sticky.indexOf("yes:")>-1&&window.scrollY-t>5&&(e.dataset.sticky=["yes-hide-start"].concat(s(o)).join(":"),requestAnimationFrame((function(){e.dataset.sticky=e.dataset.sticky.replace("yes-hide-start","yes-hide-end"),setTimeout((function(){e.dataset.sticky=o.join(":"),e.parentNode.removeAttribute("style"),Array.from(e.querySelectorAll("[data-row]")).map((function(t){return t.removeAttribute("style")})),f(e,"yes")}),200)})))}t=window.scrollY}if((o.indexOf("slide")>-1||o.indexOf("fade")>-1)&&(n?(-1===e.dataset.sticky.indexOf("yes")&&(e.dataset.sticky=["yes-start"].concat(s(o)).join(":"),requestAnimationFrame((function(){e.dataset.sticky=e.dataset.sticky.replace("yes-start","yes-end"),setTimeout((function(){e.dataset.sticky=e.dataset.sticky.replace("yes-end","yes")}),200)}))),f(e,"no"),e.parentNode.style.setProperty("--minHeight","".concat(a,"px"))):-1===e.dataset.sticky.indexOf("yes-hide")&&e.dataset.sticky.indexOf("yes:")>-1&&(Math.abs(window.scrollY-r)>50?(e.dataset.sticky=o.join(":"),e.parentNode.removeAttribute("style"),Array.from(e.querySelectorAll("[data-row]")).map((function(t){return t.removeAttribute("style")})),f(e,"yes")):(e.dataset.sticky=["yes-hide-start"].concat(s(o)).join(":"),requestAnimationFrame((function(){e.dataset.sticky=e.dataset.sticky.replace("yes-hide-start","yes-hide-end"),setTimeout((function(){e.dataset.sticky=o.join(":"),e.parentNode.removeAttribute("style"),Array.from(e.querySelectorAll("[data-row]")).map((function(t){return t.removeAttribute("style")})),f(e,"yes")}),200)}))))),o.indexOf("shrink")>-1){if(n){f(e,"no"),e.parentNode.style.setProperty("--minHeight","".concat(a,"px"));var i=Array.from(e.querySelectorAll("[data-row]")).reduce((function(t,e,r){return t+p(e)}),0);s(e.querySelectorAll('[data-row="middle"]')).map((function(t){if(t.querySelector('[data-id="logo"] .site-logo-container')){var e=t.querySelector('[data-id="logo"] .site-logo-container'),n=parseFloat(getComputedStyle(e).getPropertyValue("--maxHeight")||50),o=parseFloat(getComputedStyle(e).getPropertyValue("--logoStickyShrink")||1),a=n*o;if(1===o)return;var i=m(t),c=p(t);e.style.setProperty("--logo-shrink-height",y([r,r+Math.abs(i===c?n-a:i-c)],[1,o],d(r,r+Math.abs(i===c?n-a:i-c),scrollY)))}})),i!==a&&e.querySelector('[data-row="middle"]')&&[e.querySelector('[data-row="middle"]')].map((function(t){var e=m(t),n=p(t);t.style.setProperty("--shrinkHeight","".concat(y([r,r+Math.abs(e-n)],[e,n],d(r,r+Math.abs(e-n),scrollY)),"px"))}))}else e.parentNode.removeAttribute("style"),Array.from(e.querySelectorAll("[data-row]")).map((function(t){return t.removeAttribute("style")})),Array.from(e.querySelectorAll('[data-row="middle"] .site-logo-container')).map((function(t){return t.removeAttribute("style")})),f(e,"yes");var u=e.dataset.sticky.split(":").filter((function(t){return"yes"!==t&&"no"!==t}));e.dataset.sticky=(n?["yes"].concat(s(u)):u).join(":")}}};e(),h||(h=!0,window.addEventListener("scroll",(function(){l||(l=!0,requestAnimationFrame((function(){e(),l=!1})))})))}},g=function(t){/comp|inter|loaded/.test(document.readyState)?t():document.addEventListener("DOMContentLoaded",t,!1)};g((function(){i(),v()})),o.a.on("blocksy:frontend:init",(function(){i(),v()}))}]);
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=2)}([function(t,e){t.exports=ctEvents},function(t,e){t.exports=window.ctFrontend},function(t,e,r){"use strict";r.r(e),r.d(e,"onDocumentLoaded",(function(){return g}));var n=r(0),o=r.n(n),a=function(t,e){var r=e.screen,n=void 0===r?"login":r;t.querySelector("ul")&&t.querySelector("ul .ct-".concat(n))&&(t.querySelector("ul .active").classList.remove("active"),t.querySelector("ul .ct-".concat(n)).classList.add("active")),t.querySelector('[class*="-form"].active').classList.remove("active"),t.querySelector(".ct-".concat(n,"-form")).classList.add("active")},i=function(){Array.from(document.querySelectorAll(".ct-header-account > a[href]")).map((function(t){t.hasSearchEventListener||(t.hasSearchEventListener=!0,t.addEventListener("click",(function(e){a(document.querySelector(t.hash),{screen:"login"}),o.a.trigger("ct:overlay:handle-click",{e:e,href:t.hash,options:{isModal:!0}})})),t.hash&&function(t){t&&["login","register","forgot-password"].map((function(e){Array.from(t.querySelectorAll(".ct-".concat(e))).map((function(r){r.addEventListener("click",(function(r){r.preventDefault(),a(t,{screen:e})}))}))}))}(document.querySelector(t.hash)))}))},c=r(1);function s(t){return function(t){if(Array.isArray(t))return l(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 l(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 l(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 l(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 u=!1,d=function(t,e,r){return Math.max(t,Math.min(e,r))},y=function(t,e,r){return e[0]+(e[1]-e[0])/(t[1]-t[0])*(r-t[0])},f=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"yes";Array.from(t.querySelectorAll("[data-row][data-transparent-row]")).map((function(t){t.dataset.transparentRow=e}))},m=function(t){return parseFloat(getComputedStyle(t).getPropertyValue("--height"))},p=function(t){var e=getComputedStyle(t).getPropertyValue("--stickyShrink");return e?parseFloat(e)/100*m(t):m(t)};var h=!1,v=function(){if(document.querySelector("[data-sticky]")){var t=window.scrollY,e=function(){var e=document.querySelector('[data-device="'.concat(Object(c.getCurrentScreen)(),'"] [data-sticky]'));if(e){var r=function(t){if(-1===t.dataset.sticky.indexOf("shrink")&&-1===t.dataset.sticky.indexOf("auto-hide"))return t.parentNode.getBoundingClientRect().height+200;var e=t.closest("header").getBoundingClientRect().top+scrollY,r=t.parentNode;return 1===r.parentNode.children.length||r.parentNode.children[0].classList.contains("ct-sticky-container")?e:Array.from(r.parentNode.children).reduce((function(t,e,r){return t.indexOf(0)>-1||!e.dataset.row?[].concat(s(t),[0]):[].concat(s(t),[e.classList.contains("ct-sticky-container")?0:e.getBoundingClientRect().height])}),[]).reduce((function(t,e){return t+e}),e)}(e),n=r>0&&Math.abs(window.scrollY-r)<3||window.scrollY>r,o=e.dataset.sticky.split(":").filter((function(t){return"yes"!==t&&"no"!==t})),a=Array.from(e.querySelectorAll("[data-row]")).reduce((function(t,e){return t+parseFloat(getComputedStyle(e).getPropertyValue("--height"))}),0);if(o.indexOf("auto-hide")>-1){if(window.scrollY<r&&(t=window.scrollY),n&&window.scrollY-t==0&&document.body.style.setProperty("--headerStickyHeightAnimated","0px"),n&&window.scrollY-t<-5)-1===e.dataset.sticky.indexOf("yes")&&(e.dataset.sticky=["yes-start"].concat(s(o)).join(":"),requestAnimationFrame((function(){e.dataset.sticky=e.dataset.sticky.replace("yes-start","yes-end"),setTimeout((function(){e.dataset.sticky=e.dataset.sticky.replace("yes-end","yes")}),200)}))),f(e,"no"),document.body.removeAttribute("style"),e.parentNode.style.setProperty("--minHeight","".concat(a,"px"));else{if(!n)return e.dataset.sticky=o.join(":"),e.parentNode.removeAttribute("style"),Array.from(e.querySelectorAll("[data-row]")).map((function(t){return t.removeAttribute("style")})),f(e,"yes"),document.body.style.setProperty("--headerStickyHeightAnimated","0px"),void(t=window.scrollY);-1===e.dataset.sticky.indexOf("yes-hide")&&e.dataset.sticky.indexOf("yes:")>-1&&window.scrollY-t>5&&(e.dataset.sticky=["yes-hide-start"].concat(s(o)).join(":"),document.body.style.setProperty("--headerStickyHeightAnimated","0px"),requestAnimationFrame((function(){e.dataset.sticky=e.dataset.sticky.replace("yes-hide-start","yes-hide-end"),setTimeout((function(){e.dataset.sticky=o.join(":"),e.parentNode.removeAttribute("style"),Array.from(e.querySelectorAll("[data-row]")).map((function(t){return t.removeAttribute("style")})),f(e,"yes")}),200)})))}t=window.scrollY}if((o.indexOf("slide")>-1||o.indexOf("fade")>-1)&&(n?(-1===e.dataset.sticky.indexOf("yes")&&(e.dataset.sticky=["yes-start"].concat(s(o)).join(":"),requestAnimationFrame((function(){e.dataset.sticky=e.dataset.sticky.replace("yes-start","yes-end"),setTimeout((function(){e.dataset.sticky=e.dataset.sticky.replace("yes-end","yes")}),200)}))),f(e,"no"),e.parentNode.style.setProperty("--minHeight","".concat(a,"px"))):-1===e.dataset.sticky.indexOf("yes-hide")&&e.dataset.sticky.indexOf("yes:")>-1&&(Math.abs(window.scrollY-r)>50?(e.dataset.sticky=o.join(":"),e.parentNode.removeAttribute("style"),Array.from(e.querySelectorAll("[data-row]")).map((function(t){return t.removeAttribute("style")})),f(e,"yes")):(e.dataset.sticky=["yes-hide-start"].concat(s(o)).join(":"),requestAnimationFrame((function(){e.dataset.sticky=e.dataset.sticky.replace("yes-hide-start","yes-hide-end"),setTimeout((function(){e.dataset.sticky=o.join(":"),e.parentNode.removeAttribute("style"),Array.from(e.querySelectorAll("[data-row]")).map((function(t){return t.removeAttribute("style")})),f(e,"yes")}),200)}))))),o.indexOf("shrink")>-1){if(n){f(e,"no"),e.parentNode.style.setProperty("--minHeight","".concat(a,"px"));var i=Array.from(e.querySelectorAll("[data-row]")).reduce((function(t,e,r){return t+p(e)}),0);s(e.querySelectorAll('[data-row="middle"]')).map((function(t){if(t.querySelector('[data-id="logo"] .site-logo-container')){var e=t.querySelector('[data-id="logo"] .site-logo-container'),n=parseFloat(getComputedStyle(e).getPropertyValue("--maxHeight")||50),o=parseFloat(getComputedStyle(e).getPropertyValue("--logoStickyShrink")||1),a=n*o;if(1===o)return;var i=m(t),c=p(t);e.style.setProperty("--logo-shrink-height",y([r,r+Math.abs(i===c?n-a:i-c)],[1,o],d(r,r+Math.abs(i===c?n-a:i-c),scrollY)))}})),i!==a&&e.querySelector('[data-row="middle"]')&&[e.querySelector('[data-row="middle"]')].map((function(t){var e=m(t),n=p(t);t.style.setProperty("--shrinkHeight","".concat(y([r,r+Math.abs(e-n)],[e,n],d(r,r+Math.abs(e-n),scrollY)),"px"))}))}else e.parentNode.removeAttribute("style"),Array.from(e.querySelectorAll("[data-row]")).map((function(t){return t.removeAttribute("style")})),Array.from(e.querySelectorAll('[data-row="middle"] .site-logo-container')).map((function(t){return t.removeAttribute("style")})),f(e,"yes");var l=e.dataset.sticky.split(":").filter((function(t){return"yes"!==t&&"no"!==t}));e.dataset.sticky=(n?["yes"].concat(s(l)):l).join(":")}}};e(),h||(h=!0,window.addEventListener("scroll",(function(){u||(u=!0,requestAnimationFrame((function(){e(),u=!1})))})))}},g=function(t){/comp|inter|loaded/.test(document.readyState)?t():document.addEventListener("DOMContentLoaded",t,!1)};g((function(){i(),v()})),o.a.on("blocksy:frontend:init",(function(){i(),v()}))}]);
static/bundle/options.css CHANGED
@@ -1,8 +1,8 @@
1
  /**
2
- * - v1.7.41
3
  *
4
  * Copyright (c) 2020
5
  * Licensed GPLv2+
6
  */
7
 
8
- .ct-condition-location{display:grid;grid-template-columns:1fr 100px;grid-column-gap:10px;--x-select-dropdown-width: calc(100% + 110px)}.ct-display-conditions{padding:30px 0;margin:10px 0 0 0;border-top:1px dashed rgba(0,0,0,0.1)}.ct-condition-group{display:grid;grid-template-columns:var(--grid-template-columns);grid-column-gap:10px;grid-row-gap:10px;position:relative;padding-bottom:20px;margin-bottom:20px;border-bottom:1px dashed rgba(0,0,0,0.1)}.ct-condition-group.ct-cols-2{--grid-template-columns: 110px 1fr}.ct-condition-group.ct-cols-2 .ct-select-input:nth-child(2):before{content:'ref-width'}.ct-condition-group.ct-cols-3{--grid-template-columns: 110px 1fr 1fr}.ct-condition-group.ct-cols-3 .ct-select-input:nth-child(2):before{content:'ref-width:right'}.ct-condition-group.ct-cols-3 .ct-select-input:nth-child(3):before{content:'ref-width:left'}.ct-condition-group .ct-select-dropdown{box-shadow:0 10px 15px rgba(0,0,0,0.08),0px 0px 0px 1px rgba(221,221,221,0.5)}.ct-condition-group button{position:absolute;top:0;right:-30px;font-size:18px;line-height:18px;width:30px;height:30px;padding:0;border:none;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;opacity:0.5;background:transparent}.ct-condition-group button:focus{outline:none}.ct-condition-group button:hover{opacity:1;color:#a00}.ct-condition-type span{position:absolute;top:6px;left:6px;display:flex;align-items:center;justify-content:center;width:18px;height:18px;border-radius:3px;background:#eee}.ct-condition-type span:before,.ct-condition-type span:after{position:absolute;content:'';width:6px;height:1px;background:currentColor}.ct-condition-type .ct-include:after{transform:rotate(90deg)}.ct-condition-type .ct-exclude:after{display:none}.ct-condition-type input{--padding: 0 0 0 30px}.ct-conditions-actions{display:grid;grid-template-columns:repeat(2, 1fr);grid-column-gap:15px}.blocksy-code-editor-trigger{display:inline-flex;align-items:center;margin:0 8px}.ct-checkbox-container{--checkMarkColor: #fff;--background: rgba(179, 189, 201, 0.8);--backgroundActive: #0e8ecc;display:flex;align-items:center;justify-content:space-between;padding:10px 0;transition:color 0.15s ease}.ct-checkbox-container:not(.activated){cursor:pointer}.ct-checkbox-container:not(.activated):hover{color:#0e8ecc}.ct-checkbox-container:not(.activated):hover .ct-checkbox:not(.active){--background: var(--backgroundActive)}.ct-checkbox-container.activated{--checkMarkColor: rgba(104, 124, 147, 0.6);--backgroundActive: rgba(179, 189, 201, 0.3)}.ct-checkbox{display:inline-flex;align-items:center;justify-content:center;position:relative;width:18px;height:18px;flex:0 0 18px}.ct-checkbox:before{position:absolute;z-index:1;content:'';width:18px;height:18px;margin:auto;border-radius:100%;box-shadow:inset 0px 0px 0px 2px var(--background);transition:all 0.12s cubic-bezier(0.455, 0.03, 0.515, 0.955)}.ct-checkbox svg{position:relative;z-index:2}.ct-checkbox.active:before{width:22px;height:22px;box-shadow:inset 0px 0px 0px 12px var(--backgroundActive)}.ct-checkbox .check{fill:none;stroke:var(--checkMarkColor);stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:15;stroke-dashoffset:16;transition:stroke 0.4s cubic-bezier(0.455, 0.03, 0.515, 0.955),stroke-dashoffset 0.4s cubic-bezier(0.455, 0.03, 0.515, 0.955)}.ct-checkbox.active .check{stroke-dashoffset:0}.toplevel_page_ct-dashboard .wp-menu-image img{max-width:18px;height:auto}.toplevel_page_ct-dashboard a[href*='ct-dashboard-pricing']{display:none !important}[data-slug="blocksy-companion"] .upgrade{display:none}.fs-field-beta_program{display:none}
1
  /**
2
+ * - v1.7.43
3
  *
4
  * Copyright (c) 2020
5
  * Licensed GPLv2+
6
  */
7
 
8
+ .ct-condition-location{display:grid;grid-template-columns:1fr 100px;grid-column-gap:10px;--x-select-dropdown-width: calc(100% + 110px)}.ct-display-conditions{padding:30px 0;margin:10px 0 0 0;border-top:1px dashed rgba(0,0,0,0.1)}.ct-condition-group{display:grid;grid-template-columns:var(--grid-template-columns);grid-column-gap:10px;grid-row-gap:10px;position:relative;padding-bottom:20px;margin-bottom:20px;border-bottom:1px dashed rgba(0,0,0,0.1)}.ct-condition-group.ct-cols-2{--grid-template-columns: 110px 1fr}.ct-condition-group.ct-cols-2 .ct-select-input:nth-child(2):before{content:'ref-width'}.ct-condition-group.ct-cols-3{--grid-template-columns: 110px 1fr 1fr}.ct-condition-group.ct-cols-3 .ct-select-input:nth-child(2):before{content:'ref-width:right'}.ct-condition-group.ct-cols-3 .ct-select-input:nth-child(3):before{content:'ref-width:left'}.ct-condition-group .ct-select-dropdown{box-shadow:0 10px 15px rgba(0,0,0,0.08),0px 0px 0px 1px rgba(221,221,221,0.5)}.ct-condition-group button{position:absolute;top:0;right:-30px;font-size:18px;line-height:18px;width:30px;height:30px;padding:0;border:none;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;opacity:0.5;background:transparent}.ct-condition-group button:focus{outline:none}.ct-condition-group button:hover{opacity:1;color:#a00}.ct-condition-type span{position:absolute;top:6px;left:6px;display:flex;align-items:center;justify-content:center;width:18px;height:18px;border-radius:3px;background:#eee}.ct-condition-type span:before,.ct-condition-type span:after{position:absolute;content:'';width:6px;height:1px;background:currentColor}.ct-condition-type .ct-include:after{transform:rotate(90deg)}.ct-condition-type .ct-exclude:after{display:none}.ct-condition-type input{--padding: 0 0 0 30px}.ct-conditions-actions{display:grid;grid-template-columns:repeat(2, 1fr);grid-column-gap:15px}.blocksy-code-editor-trigger{display:inline-flex;align-items:center;margin:0 8px}.ct-checkbox-container{--checkMarkColor: #fff;--background: rgba(179, 189, 201, 0.8);--backgroundActive: #0e8ecc;display:flex;align-items:center;justify-content:space-between;padding:10px 0;transition:color 0.15s ease}.ct-checkbox-container:not(.activated){cursor:pointer}.ct-checkbox-container:not(.activated):hover{color:#0e8ecc}.ct-checkbox-container:not(.activated):hover .ct-checkbox:not(.active){--background: var(--backgroundActive)}.ct-checkbox-container.activated{--checkMarkColor: rgba(104, 124, 147, 0.6);--backgroundActive: rgba(179, 189, 201, 0.3)}.ct-checkbox{display:inline-flex;align-items:center;justify-content:center;position:relative;width:18px;height:18px;flex:0 0 18px}.ct-checkbox:before{position:absolute;z-index:1;content:'';width:18px;height:18px;margin:auto;border-radius:100%;box-shadow:inset 0px 0px 0px 2px var(--background);transition:all 0.12s cubic-bezier(0.455, 0.03, 0.515, 0.955)}.ct-checkbox svg{position:relative;z-index:2}.ct-checkbox.active:before{width:22px;height:22px;box-shadow:inset 0px 0px 0px 12px var(--backgroundActive)}.ct-checkbox .check{fill:none;stroke:var(--checkMarkColor);stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:15;stroke-dashoffset:16;transition:stroke 0.4s cubic-bezier(0.455, 0.03, 0.515, 0.955),stroke-dashoffset 0.4s cubic-bezier(0.455, 0.03, 0.515, 0.955)}.ct-checkbox.active .check{stroke-dashoffset:0}.ct-import-export input[type="file"]{display:none}.ct-import-export .button{width:100%}.ct-import-export .button:not(:last-child){margin-bottom:20px}.toplevel_page_ct-dashboard .wp-menu-image img{max-width:18px;height:auto}.toplevel_page_ct-dashboard a[href*='ct-dashboard-pricing']{display:none !important}[data-slug="blocksy-companion"] .upgrade{display:none}.fs-field-beta_program{display:none}
static/bundle/options.js CHANGED
@@ -1,6 +1,6 @@
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=14)}([function(e,t){e.exports=window.wp.element},function(e,t){e.exports=window.wp.i18n},function(e,t){e.exports=window.blocksyOptions},function(e,t,n){var r;
2
  /*!
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=ctEvents},function(e,t){e.exports=window.React},function(e,t){e.exports=window.wp.hooks},function(e,t,n){var r=n(11);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(13);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,n){var r=n(6),o=n(12);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)||y(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 f(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){p(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 p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function b(e){return function(e){if(Array.isArray(e))return m(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||y(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 y(e,t){if(e){if("string"==typeof e)return m(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)?m(e,t):void 0}}function m(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=[],v=[],j=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(b(e),b(n.map((function(e){return f(f({},e),{},{group:r})}))))}),[]).reduce((function(e,t){var n=t.title,r=t.id,o=s(t,["title","id"]);return[].concat(b(e),[f({key:r,value:n},o)])}),[]),i=u(Object(r.useState)(O),2),d=i[0],p=i[1],y=u(Object(r.useState)(v),2),m=y[0],j=y[1],h=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(b(e),b(t))}),[]);p(t),O=t})),Promise.all(["categories","tags"].map((function(e){return fetch("".concat(blocksy_admin.rest_url,"wp/v2/").concat(e).concat(blocksy_admin.rest_url.indexOf("?")>-1?"&":"?","_embed&per_page=100")).then((function(e){return e.json()}))}))).then((function(e){var t=e.reduce((function(e,t){return[].concat(b(e),b(t))}),[]);j(t),v=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":h(e),"ct-cols-2":!h(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 f({},n===i?f(f({},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 f({},n===i?f(f({},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 f({},n===i?f(f({},e),{},{payload:f(f({},e.payload),{},{post_id:r})}):t)})))}}),("taxonomy_ids"===e.rule||"post_with_taxonomy_ids"===e.rule)&&Object(r.createElement)(a.Select,{option:{defaultToFirstItem:!1,placeholder:Object(c.__)("Select taxonomy","blc"),choices:m.map((function(e){return{key:e.id,value:e.name}})),search:!0},value:e.payload.taxonomy_id||"",onChange:function(r){n(t.map((function(t,n){return f({},n===i?f(f({},e),{},{payload:f(f({},e.payload),{},{taxonomy_id:r})}):t)})))}}),Object(r.createElement)("button",{type:"button",onClick:function(e){e.preventDefault();var r=b(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(b(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(b(t),[{type:"include",rule:"user_logged_in",payload:{},category:"user"}]))}},Object(c.__)("Add User Condition","blc"))))};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)||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=h(Object(r.useState)(!1),2),u=l[0],s=l[1],d=h(Object(r.useState)(null),2),f=d[0],p=d[1];return"inline"===n?Object(r.createElement)(j,{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),p(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),p(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)(j,{value:f||o,onChange:function(e){p(e)}})),Object(r.createElement)("div",{className:"ct-modal-actions has-divider"},Object(r.createElement)("button",{className:"button-primary",disabled:!f,onClick:function(){i(f),s(!1)}},Object(c.__)("Save Conditions","blc"))))}}))},E=n(5),w=n.n(E),S=n(7),x=n(8),P=n.n(x),C=n(9),k=n.n(C),A=n(10),N=n.n(A);function I(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function D(e){return function(e){if(Array.isArray(e))return R(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 T(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 F(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)||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 R(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?R(e,t):void 0}}function R(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 M=k()(),U=function(e){e.forcedEdit;var t,n,o=e.headerId,i=F(Object(r.useState)(!1),2),l=i[0],u=i[1],s=F(Object(r.useState)(null),2),d=s[0],f=s[1],p=Object(r.useContext)(a.PlacementsDragDropContext),b=(p.builderValueCollection,p.builderValueDispatch,Object(r.useRef)()),y=N()(M),m=P()("".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){T(c,r,o,a,i,"next",e)}function i(e){T(c,r,o,a,i,"throw",e)}a(void 0)}))},function(e){return n.apply(this,arguments)}),depends:[y]}),O=m.data,v=m.isLoading;m.error;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("button",{className:"button-primary",style:{width:"100%"},onClick:function(e){v||(e.preventDefault(),e.stopPropagation(),u(!0))}},Object(c.__)("Add/Edit Conditions","blc")),Object(r.createElement)(a.Overlay,{items:l,initialFocusRef:b,className:"ct-admin-modal ct-builder-conditions-modal",onDismiss:function(){u(!1),f(null)},render:function(){var e;return Object(r.createElement)("div",{className:"ct-modal-content",ref:b},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){f((function(e){return[].concat(D((e||O).filter((function(e){return e.id!==o}))),[{id:o,conditions:t}])}))},options:{conditions:(e={type:"blocksy-display-condition",design:"none",value:[]},I(e,"design","none"),I(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(){M(),u(!1)}))}},Object(c.__)("Save Conditions","blc"))))}}))};function V(){return(V=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 B(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 z(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?B(Object(n),!0).forEach((function(t){H(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):B(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function H(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var G=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(S.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),f=ct_customizer_localizations.header_builder_data.header_data.header_options,p={label:s,"inner-options":z(z({},i.indexOf("ct-custom")>-1?{conditions_button:{label:Object(c.__)("Edit Conditions","blc"),type:"jsx",design:"block",render:function(){return Object(r.createElement)(U,{headerId:i})}}}:{}),f)};return Object(r.createElement)(a.PanelMetaWrapper,V({id:d,key:i,option:p},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 z({id:i},n.settings||{})},option:p,onChangeFor:function(e,r){t({type:"BUILDER_GLOBAL_SETTING_ON_CHANGE",payload:{optionId:e,optionValue:r,values:Object(a.getValueFromInput)(f,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})))};w.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)(G,null)))}})),w.a.on("blocksy:options:register",(function(e){e["blocksy-display-condition"]=g}))}]);
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=16)}([function(e,t){e.exports=window.wp.element},function(e,t){e.exports=window.wp.i18n},function(e,t){e.exports=window.blocksyOptions},function(e,t,n){var r;
2
  /*!
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=ctEvents},function(e,t){e.exports=window.React},function(e,t,n){(function(n){var r,o,c;o=[],void 0===(c="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 o(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 c="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof n&&n.global===n?n:void 0,a=c.saveAs||("object"!=typeof window||window!==c?function(){}:"download"in HTMLAnchorElement.prototype?function(e,n,a){var i=c.URL||c.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?o(l):r(l.href)?t(e,n,a):o(l,l.target="_blank")):(l.href=i.createObjectURL(e),setTimeout((function(){i.revokeObjectURL(l.href)}),4e4),setTimeout((function(){o(l)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,n,c){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,c),n);else if(r(e))t(e,n,c);else{var a=document.createElement("a");a.href=e,a.target="_blank",setTimeout((function(){o(a)}))}}:function(e,n,r,o){if((o=o||open("","_blank"))&&(o.document.title=o.document.body.innerText="downloading..."),"string"==typeof e)return t(e,n,r);var a="application/octet-stream"===e.type,i=/constructor/i.test(c.HTMLElement)||c.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;"),o?o.location.href=e:location=e,o=null},u.readAsDataURL(e)}else{var s=c.URL||c.webkitURL,d=s.createObjectURL(e);o?o.location=d:location.href=d,o=null,setTimeout((function(){s.revokeObjectURL(d)}),4e4)}});c.saveAs=a.saveAs=a,e.exports=a})?r.apply(t,o):r)||(e.exports=c)}).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){f(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 f(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function b(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=[],h=[],j=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(b(e),b(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(b(e),[p({key:r,value:n},o)])}),[]),i=u(Object(r.useState)(O),2),d=i[0],f=i[1],m=u(Object(r.useState)(h),2),y=m[0],j=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(b(e),b(t))}),[]);f(t),O=t})),Promise.all(["categories","tags"].map((function(e){return fetch("".concat(blocksy_admin.rest_url,"wp/v2/").concat(e).concat(blocksy_admin.rest_url.indexOf("?")>-1?"&":"?","_embed&per_page=100")).then((function(e){return e.json()}))}))).then((function(e){var t=e.reduce((function(e,t){return[].concat(b(e),b(t))}),[]);j(t),h=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:{defaultToFirstItem:!1,placeholder:Object(c.__)("Select taxonomy","blc"),choices:y.map((function(e){return{key:e.id,value:e.name}})),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=b(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(b(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(b(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],f=d[1];return"inline"===n?Object(r.createElement)(j,{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),f(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),f(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)(j,{value:p||o,onChange:function(e){f(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,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 x(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 x(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 x(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 k=function(){var e=S(Object(r.useState)(null),2),t=e[0],n=e[1],o=S(Object(r.useState)(null),2),i=o[0],l=o[1],u=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();var t=new FormData;t.append("action","blocksy_customizer_export"),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.a.saveAs(r,"blocksy-export.dat")}}))}))}catch(e){}}},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(){u.current.click()}},t?t.name:Object(c.__)("Click to upload a file...","blc")),Object(r.createElement)("input",{ref:u,type:"file",onChange:function(e){var t=S(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(),l("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(),l("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 l(!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"},"parent"===i&&Object(c.__)("Copy From Parent Theme","blc"),"child"===i&&Object(c.__)("Copy From Child Theme","blc")),Object(r.createElement)("p",null,"parent"===i&&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"),"child"===i&&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(),l(!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"))))}}))},C=n(5),A=n.n(C),P=n(8),N=n(9),T=n.n(N),D=n(10),I=n.n(D),z=n(11),L=n.n(z);function R(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 H(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||B(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,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 M(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)||B(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 B(e,t){if(e){if("string"==typeof e)return H(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)?H(e,t):void 0}}function H(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 V=I()(),G=function(e){e.forcedEdit;var t,n,o=e.headerId,i=M(Object(r.useState)(!1),2),l=i[0],u=i[1],s=M(Object(r.useState)(null),2),d=s[0],p=s[1],f=Object(r.useContext)(a.PlacementsDragDropContext),b=(f.builderValueCollection,f.builderValueDispatch,Object(r.useRef)()),m=L()(V),y=T()("".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){U(c,r,o,a,i,"next",e)}function i(e){U(c,r,o,a,i,"throw",e)}a(void 0)}))},function(e){return n.apply(this,arguments)}),depends:[m]}),O=y.data,h=y.isLoading;y.error;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("button",{className:"button-primary",style:{width:"100%"},onClick:function(e){h||(e.preventDefault(),e.stopPropagation(),u(!0))}},Object(c.__)("Add/Edit Conditions","blc")),Object(r.createElement)(a.Overlay,{items:l,initialFocusRef:b,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:b},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(F((e||O).filter((function(e){return e.id!==o}))),[{id:o,conditions:t}])}))},options:{conditions:(e={type:"blocksy-display-condition",design:"none",value:[]},R(e,"design","none"),R(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(){V(),u(!1)}))}},Object(c.__)("Save Conditions","blc"))))}}))};function $(){return($=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 Y(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 q(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Y(Object(n),!0).forEach((function(t){J(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function J(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var X=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(P.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,f={label:s,"inner-options":q(q({},i.indexOf("ct-custom")>-1?{conditions_button:{label:Object(c.__)("Edit Conditions","blc"),type:"jsx",design:"block",render:function(){return Object(r.createElement)(G,{headerId:i})}}}:{}),p)};return Object(r.createElement)(a.PanelMetaWrapper,$({id:d,key:i,option:f},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 q({id:i},n.settings||{})},option:f,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})))};A.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)(X,null)))}})),A.a.on("blocksy:options:register",(function(e){e["blocksy-display-condition"]=g,e["blocksy-customizer-options-manager"]=k}))}]);
static/js/frontend/sticky.js CHANGED
@@ -128,6 +128,13 @@ export const mountStickyHeader = () => {
128
  prevScrollY = window.scrollY
129
  }
130
 
 
 
 
 
 
 
 
131
  if (isSticky && window.scrollY - prevScrollY < -5) {
132
  if (stickyContainer.dataset.sticky.indexOf('yes') === -1) {
133
  stickyContainer.dataset.sticky = [
@@ -151,6 +158,7 @@ export const mountStickyHeader = () => {
151
  }
152
 
153
  setTransparencyFor(stickyContainer, 'no')
 
154
 
155
  stickyContainer.parentNode.style.setProperty(
156
  '--minHeight',
@@ -167,6 +175,11 @@ export const mountStickyHeader = () => {
167
  ).map((row) => row.removeAttribute('style'))
168
  setTransparencyFor(stickyContainer, 'yes')
169
 
 
 
 
 
 
170
  prevScrollY = window.scrollY
171
  return
172
  }
@@ -181,6 +194,11 @@ export const mountStickyHeader = () => {
181
  ...stickyComponents,
182
  ].join(':')
183
 
 
 
 
 
 
184
  requestAnimationFrame(() => {
185
  stickyContainer.dataset.sticky = stickyContainer.dataset.sticky.replace(
186
  'yes-hide-start',
128
  prevScrollY = window.scrollY
129
  }
130
 
131
+ if (isSticky && window.scrollY - prevScrollY === 0) {
132
+ document.body.style.setProperty(
133
+ '--headerStickyHeightAnimated',
134
+ `0px`
135
+ )
136
+ }
137
+
138
  if (isSticky && window.scrollY - prevScrollY < -5) {
139
  if (stickyContainer.dataset.sticky.indexOf('yes') === -1) {
140
  stickyContainer.dataset.sticky = [
158
  }
159
 
160
  setTransparencyFor(stickyContainer, 'no')
161
+ document.body.removeAttribute('style')
162
 
163
  stickyContainer.parentNode.style.setProperty(
164
  '--minHeight',
175
  ).map((row) => row.removeAttribute('style'))
176
  setTransparencyFor(stickyContainer, 'yes')
177
 
178
+ document.body.style.setProperty(
179
+ '--headerStickyHeightAnimated',
180
+ `0px`
181
+ )
182
+
183
  prevScrollY = window.scrollY
184
  return
185
  }
194
  ...stickyComponents,
195
  ].join(':')
196
 
197
+ document.body.style.setProperty(
198
+ '--headerStickyHeightAnimated',
199
+ `0px`
200
+ )
201
+
202
  requestAnimationFrame(() => {
203
  stickyContainer.dataset.sticky = stickyContainer.dataset.sticky.replace(
204
  'yes-hide-start',
static/js/options.js CHANGED
@@ -1,6 +1,8 @@
1
  import { createElement, Fragment, Component } from '@wordpress/element'
2
  import { Fill } from '@wordpress/components'
3
  import DisplayCondition from './options/DisplayCondition'
 
 
4
  import { onDocumentLoaded } from '../../framework/extensions/cookies-consent/static/js/helpers'
5
 
6
  import ctEvents from 'ct-events'
@@ -29,4 +31,5 @@ ctEvents.on('blocksy:options:before-option', (args) => {
29
 
30
  ctEvents.on('blocksy:options:register', (opts) => {
31
  opts['blocksy-display-condition'] = DisplayCondition
 
32
  })
1
  import { createElement, Fragment, Component } from '@wordpress/element'
2
  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'
31
 
32
  ctEvents.on('blocksy:options:register', (opts) => {
33
  opts['blocksy-display-condition'] = DisplayCondition
34
+ opts['blocksy-customizer-options-manager'] = CustomizerOptionsManager
35
  })
static/js/options/CustomizerOptionsManager.js ADDED
@@ -0,0 +1,286 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { useRef, useState, createElement, Fragment } from '@wordpress/element'
2
+ import { __ } from 'ct-i18n'
3
+ import fileSaver from 'file-saver'
4
+ import { Overlay } from 'blocksy-options'
5
+
6
+ const CustomizerOptionsManager = () => {
7
+ const [futureConfig, setFutureConfig] = useState(null)
8
+ const [isCopyingOptions, setIsCopyingOptions] = useState(null)
9
+
10
+ const inputRef = useRef()
11
+
12
+ return (
13
+ <div className="ct-import-export">
14
+ <div className="ct-title" data-type="simple">
15
+ <h3>{__('Export', 'blc')}</h3>
16
+
17
+ <div className="ct-option-description">
18
+ {__(
19
+ 'Click the button below to export the customization settings for this theme.',
20
+ 'blc'
21
+ )}
22
+ </div>
23
+ </div>
24
+
25
+ <div className="ct-control" data-design="block">
26
+ <header></header>
27
+
28
+ <section>
29
+ <button
30
+ className="button"
31
+ onClick={(e) => {
32
+ e.preventDefault()
33
+
34
+ const body = new FormData()
35
+
36
+ body.append('action', 'blocksy_customizer_export')
37
+ body.append('wp_customize', 'on')
38
+
39
+ try {
40
+ fetch(window.ajaxurl, {
41
+ method: 'POST',
42
+ body,
43
+ }).then((response) => {
44
+ if (response.status === 200) {
45
+ response
46
+ .json()
47
+ .then(({ success, data }) => {
48
+ if (success) {
49
+ var blob = new Blob(
50
+ [data.data],
51
+ {
52
+ type:
53
+ 'application/octet-stream;charset=utf-8',
54
+ }
55
+ )
56
+
57
+ fileSaver.saveAs(
58
+ blob,
59
+ `blocksy-export.dat`
60
+ )
61
+ }
62
+ })
63
+ }
64
+ })
65
+ } catch (e) {}
66
+ }}>
67
+ {__('Export Customizations', 'blc')}
68
+ </button>
69
+ </section>
70
+ </div>
71
+
72
+ <div className="ct-title" data-type="simple">
73
+ <h3>{__('Import', 'blc')}</h3>
74
+
75
+ <div className="ct-option-description">
76
+ {__(
77
+ 'Upload a file to import customization settings for this theme.',
78
+ 'blc'
79
+ )}
80
+ </div>
81
+ </div>
82
+
83
+ <div className="ct-control" data-design="block">
84
+ <header></header>
85
+
86
+ <section>
87
+ <div className="ct-file-upload">
88
+ <button
89
+ type="button"
90
+ className="button ct-upload-button"
91
+ onClick={() => {
92
+ inputRef.current.click()
93
+ }}>
94
+ {futureConfig
95
+ ? futureConfig.name
96
+ : __('Click to upload a file...', 'blc')}
97
+ </button>
98
+
99
+ <input
100
+ ref={inputRef}
101
+ type="file"
102
+ onChange={({
103
+ target: {
104
+ files: [config],
105
+ },
106
+ }) => {
107
+ setFutureConfig(config)
108
+ }}
109
+ />
110
+
111
+ <button
112
+ className="button"
113
+ onClick={(e) => {
114
+ e.preventDefault()
115
+
116
+ var reader = new FileReader()
117
+ reader.readAsText(futureConfig, 'UTF-8')
118
+ reader.onload = function (evt) {
119
+ const body = new FormData()
120
+
121
+ body.append(
122
+ 'action',
123
+ 'blocksy_customizer_import'
124
+ )
125
+ body.append('wp_customize', 'on')
126
+ body.append('data', evt.target.result)
127
+
128
+ try {
129
+ fetch(window.ajaxurl, {
130
+ method: 'POST',
131
+ body,
132
+ }).then((response) => {
133
+ if (response.status === 200) {
134
+ response
135
+ .json()
136
+ .then(
137
+ ({ success, data }) => {
138
+ location.reload()
139
+ }
140
+ )
141
+ }
142
+ })
143
+ } catch (e) {}
144
+ }
145
+ }}>
146
+ {__('Import Customizations', 'blc')}
147
+ </button>
148
+ </div>
149
+ </section>
150
+ </div>
151
+
152
+ {ct_customizer_localizations.has_child_theme && (
153
+ <Fragment>
154
+ <div className="ct-title" data-type="simple">
155
+ <h3>{__('Copy Options', 'blc')}</h3>
156
+
157
+ <div className="ct-option-description">
158
+ {__(
159
+ 'Copy and import your customizations from parent or child theme.',
160
+ 'blc'
161
+ )}
162
+ </div>
163
+ </div>
164
+ {ct_customizer_localizations.is_parent_theme && (
165
+ <div className="ct-control" data-design="block">
166
+ <header></header>
167
+
168
+ <section>
169
+ <button
170
+ className="button"
171
+ onClick={(e) => {
172
+ e.preventDefault()
173
+ setIsCopyingOptions('child')
174
+ }}>
175
+ {__('Copy From Child Theme', 'blc')}
176
+ </button>
177
+ </section>
178
+ </div>
179
+ )}
180
+
181
+ {!ct_customizer_localizations.is_parent_theme && (
182
+ <div className="ct-control" data-design="block">
183
+ <header></header>
184
+
185
+ <section>
186
+ <button
187
+ className="button"
188
+ onClick={(e) => {
189
+ e.preventDefault()
190
+ setIsCopyingOptions('parent')
191
+ }}>
192
+ {__('Copy From Parent Theme', 'blc')}
193
+ </button>
194
+ </section>
195
+ </div>
196
+ )}
197
+ </Fragment>
198
+ )}
199
+
200
+ <Overlay
201
+ items={isCopyingOptions}
202
+ className="ct-admin-modal ct-import-export-modal"
203
+ onDismiss={() => setIsCopyingOptions(false)}
204
+ render={() => (
205
+ <div className="ct-modal-content">
206
+ <svg width="40" height="40" viewBox="0 0 66 66">
207
+ <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"/>
208
+ </svg>
209
+
210
+ <h2 className="ct-modal-title">
211
+ {isCopyingOptions === 'parent' &&
212
+ __(
213
+ 'Copy From Parent Theme', 'blc'
214
+ )}
215
+
216
+ {isCopyingOptions === 'child' &&
217
+ __(
218
+ 'Copy From Child Theme', 'blc'
219
+ )}
220
+ </h2>
221
+ <p>
222
+ {isCopyingOptions === 'parent' &&
223
+ __(
224
+ 'You are about to copy all the settings from your parent theme into the child theme. Are you sure you want to continue?',
225
+ 'blc'
226
+ )}
227
+
228
+ {isCopyingOptions === 'child' &&
229
+ __(
230
+ 'You are about to copy all the settings from your child theme into the parent theme. Are you sure you want to continue?',
231
+ 'blc'
232
+ )}
233
+ </p>
234
+
235
+ <div className="ct-modal-actions">
236
+ <button
237
+ onClick={(e) => {
238
+ e.preventDefault()
239
+ e.stopPropagation()
240
+ setIsCopyingOptions(false)
241
+ }}
242
+ className="ct-button">
243
+ {__('Cancel', 'blc')}
244
+ </button>
245
+
246
+ <button
247
+ className="ct-button-primary"
248
+ onClick={(e) => {
249
+ e.preventDefault()
250
+ const body = new FormData()
251
+
252
+ body.append(
253
+ 'action',
254
+ 'blocksy_customizer_copy_options'
255
+ )
256
+ body.append('wp_customize', 'on')
257
+ body.append('strategy', isCopyingOptions)
258
+
259
+ try {
260
+ fetch(window.ajaxurl, {
261
+ method: 'POST',
262
+ body,
263
+ }).then((response) => {
264
+ if (response.status === 200) {
265
+ response
266
+ .json()
267
+ .then(
268
+ ({ success, data }) => {
269
+ location.reload()
270
+ }
271
+ )
272
+ }
273
+ })
274
+ } catch (e) {}
275
+ }}>
276
+ {__('Yes, I am sure', 'blc')}
277
+ </button>
278
+ </div>
279
+ </div>
280
+ )}
281
+ />
282
+ </div>
283
+ )
284
+ }
285
+
286
+ export default CustomizerOptionsManager
static/sass/options.scss CHANGED
@@ -1,5 +1,6 @@
1
  @import 'options/display-conditions';
2
  @import 'options/animated-checkbox';
 
3
 
4
  .toplevel_page_ct-dashboard {
5
 
1
  @import 'options/display-conditions';
2
  @import 'options/animated-checkbox';
3
+ @import 'options/import-export';
4
 
5
  .toplevel_page_ct-dashboard {
6
 
static/sass/options/import-export.scss ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .ct-import-export {
2
+
3
+ input[type="file"] {
4
+ display: none;
5
+ }
6
+
7
+ .button {
8
+ width: 100%;
9
+
10
+ &:not(:last-child) {
11
+ margin-bottom: 20px;
12
+ }
13
+ }
14
+ }