Version Description
Download this release
Release Info
Developer | creativethemeshq |
Plugin | Blocksy Companion |
Version | 1.8.43 |
Comparing to | |
See all releases |
Code changes from version 1.8.42 to 1.8.43
- blocksy-companion.php +1 -1
- framework/extensions/cookies-consent/static/bundle/main.min.css +1 -1
- framework/extensions/newsletter-subscribe/static/bundle/main.min.css +1 -1
- framework/extensions/product-reviews/static/bundle/main-admin.min.css +1 -1
- framework/extensions/product-reviews/static/bundle/main.min.css +1 -1
- framework/extensions/trending/static/bundle/main.min.css +1 -1
- framework/extensions/widgets/static/bundle/main.min.css +1 -1
- framework/features/conditions-manager.php +9 -1
- languages/blocksy-companion.pot +96 -95
- readme.txt +5 -1
- static/bundle/account-lazy.min.css +2 -2
- static/bundle/dashboard.js +1 -1
- static/bundle/dashboard.min.css +1 -1
- static/bundle/options.js +1 -1
- static/bundle/options.min.css +1 -1
- static/bundle/sticky.js +1 -1
- static/js/frontend/sticky.js +30 -14
- static/js/frontend/sticky/auto-hide.js +172 -83
- static/js/frontend/sticky/shrink-utils.js +10 -0
- static/js/options/ConditionsManager.js +45 -1
- static/js/screens/SiteExport.js +12 -14
- static/sass/account-lazy.scss +3 -2
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.8.
|
7 |
Author: CreativeThemes
|
8 |
Author URI: https://creativethemes.com
|
9 |
Text Domain: blocksy-companion
|
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.8.43
|
7 |
Author: CreativeThemes
|
8 |
Author URI: https://creativethemes.com
|
9 |
Text Domain: blocksy-companion
|
framework/extensions/cookies-consent/static/bundle/main.min.css
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
/**
|
2 |
-
* - v1.8.
|
3 |
*
|
4 |
* Copyright (c) 2022
|
5 |
* Licensed GPLv2+
|
1 |
/**
|
2 |
+
* - v1.8.43
|
3 |
*
|
4 |
* Copyright (c) 2022
|
5 |
* Licensed GPLv2+
|
framework/extensions/newsletter-subscribe/static/bundle/main.min.css
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
/**
|
2 |
-
* - v1.8.
|
3 |
*
|
4 |
* Copyright (c) 2022
|
5 |
* Licensed GPLv2+
|
1 |
/**
|
2 |
+
* - v1.8.43
|
3 |
*
|
4 |
* Copyright (c) 2022
|
5 |
* Licensed GPLv2+
|
framework/extensions/product-reviews/static/bundle/main-admin.min.css
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
/**
|
2 |
-
* - v1.8.
|
3 |
*
|
4 |
* Copyright (c) 2022
|
5 |
* Licensed GPLv2+
|
1 |
/**
|
2 |
+
* - v1.8.43
|
3 |
*
|
4 |
* Copyright (c) 2022
|
5 |
* Licensed GPLv2+
|
framework/extensions/product-reviews/static/bundle/main.min.css
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
/**
|
2 |
-
* - v1.8.
|
3 |
*
|
4 |
* Copyright (c) 2022
|
5 |
* Licensed GPLv2+
|
1 |
/**
|
2 |
+
* - v1.8.43
|
3 |
*
|
4 |
* Copyright (c) 2022
|
5 |
* Licensed GPLv2+
|
framework/extensions/trending/static/bundle/main.min.css
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
/**
|
2 |
-
* - v1.8.
|
3 |
*
|
4 |
* Copyright (c) 2022
|
5 |
* Licensed GPLv2+
|
1 |
/**
|
2 |
+
* - v1.8.43
|
3 |
*
|
4 |
* Copyright (c) 2022
|
5 |
* Licensed GPLv2+
|
framework/extensions/widgets/static/bundle/main.min.css
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
/**
|
2 |
-
* - v1.8.
|
3 |
*
|
4 |
* Copyright (c) 2022
|
5 |
* Licensed GPLv2+
|
1 |
/**
|
2 |
+
* - v1.8.43
|
3 |
*
|
4 |
* Copyright (c) 2022
|
5 |
* Licensed GPLv2+
|
framework/features/conditions-manager.php
CHANGED
@@ -127,6 +127,14 @@ class ConditionsManager {
|
|
127 |
}
|
128 |
|
129 |
if ($rule['rule'] === 'author') {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
130 |
return is_author();
|
131 |
}
|
132 |
|
@@ -722,7 +730,7 @@ class ConditionsManager {
|
|
722 |
|
723 |
[
|
724 |
'id' => 'author',
|
725 |
-
'title' => __('Author', 'blocksy-companion')
|
726 |
],
|
727 |
],
|
728 |
];
|
127 |
}
|
128 |
|
129 |
if ($rule['rule'] === 'author') {
|
130 |
+
if (
|
131 |
+
isset($rule['payload'])
|
132 |
+
&&
|
133 |
+
isset($rule['payload']['user_id'])
|
134 |
+
) {
|
135 |
+
return is_author($rule['payload']['user_id']);
|
136 |
+
}
|
137 |
+
|
138 |
return is_author();
|
139 |
}
|
140 |
|
730 |
|
731 |
[
|
732 |
'id' => 'author',
|
733 |
+
'title' => __('Author Archives', 'blocksy-companion')
|
734 |
],
|
735 |
],
|
736 |
];
|
languages/blocksy-companion.pot
CHANGED
@@ -7,7 +7,7 @@ msgstr ""
|
|
7 |
"MIME-Version: 1.0\n"
|
8 |
"Content-Type: text/plain; charset=UTF-8\n"
|
9 |
"Content-Transfer-Encoding: 8bit\n"
|
10 |
-
"POT-Creation-Date: 2022-07-
|
11 |
"Project-Id-Version: undefined\n"
|
12 |
"X-Poedit-Basepath: ..\n"
|
13 |
"X-Poedit-KeywordsList: __;_e;_ex:1,2c;_n:1,2;_n_noop:1,2;_nx:1,2,4c;"
|
@@ -236,29 +236,29 @@ msgstr ""
|
|
236 |
msgid "Register For This Site"
|
237 |
msgstr ""
|
238 |
|
239 |
-
#: framework/features/conditions-manager.php:
|
240 |
msgid "Entire Website"
|
241 |
msgstr ""
|
242 |
|
243 |
-
#: framework/features/conditions-manager.php:
|
244 |
-
#: framework/features/conditions-manager.php:
|
245 |
-
#: framework/features/conditions-manager.php:
|
246 |
msgid "Basic"
|
247 |
msgstr ""
|
248 |
|
249 |
-
#: framework/features/conditions-manager.php:
|
250 |
-
#: framework/features/conditions-manager.php:
|
251 |
msgid "Singulars"
|
252 |
msgstr ""
|
253 |
|
254 |
-
#: framework/features/conditions-manager.php:
|
255 |
-
#: framework/features/conditions-manager.php:
|
256 |
msgid "Archives"
|
257 |
msgstr ""
|
258 |
|
259 |
-
#: framework/features/conditions-manager.php:
|
260 |
-
#: framework/features/conditions-manager.php:
|
261 |
-
#: framework/features/conditions-manager.php:
|
262 |
#: framework/extensions/trending/customizer.php:4,
|
263 |
#: framework/extensions/widgets/widgets/ct-posts/options.php:11,
|
264 |
#: framework/extensions/widgets/widgets/ct-posts/options.php:98,
|
@@ -268,8 +268,8 @@ msgstr ""
|
|
268 |
msgid "Posts"
|
269 |
msgstr ""
|
270 |
|
271 |
-
#: framework/features/conditions-manager.php:
|
272 |
-
#: framework/features/conditions-manager.php:
|
273 |
#: framework/premium/features/content-blocks/hooks-manager.php:408,
|
274 |
#: framework/premium/features/content-blocks/hooks-manager.php:416,
|
275 |
#: framework/premium/features/content-blocks/hooks-manager.php:424,
|
@@ -279,143 +279,143 @@ msgstr ""
|
|
279 |
msgid "Single Post"
|
280 |
msgstr ""
|
281 |
|
282 |
-
#: framework/features/conditions-manager.php:
|
283 |
-
#: framework/features/conditions-manager.php:
|
284 |
msgid "All Post Archives"
|
285 |
msgstr ""
|
286 |
|
287 |
-
#: framework/features/conditions-manager.php:
|
288 |
-
#: framework/features/conditions-manager.php:
|
289 |
msgid "Post Categories"
|
290 |
msgstr ""
|
291 |
|
292 |
-
#: framework/features/conditions-manager.php:
|
293 |
-
#: framework/features/conditions-manager.php:
|
294 |
msgid "Post Tags"
|
295 |
msgstr ""
|
296 |
|
297 |
-
#: framework/features/conditions-manager.php:
|
298 |
#: framework/extensions/widgets/widgets/ct-posts/options.php:12,
|
299 |
#: framework/premium/features/premium-header/items/search-input/options.php:5
|
300 |
msgid "Pages"
|
301 |
msgstr ""
|
302 |
|
303 |
-
#: framework/features/conditions-manager.php:
|
304 |
msgid "Single Page"
|
305 |
msgstr ""
|
306 |
|
307 |
-
#: framework/features/conditions-manager.php:
|
308 |
msgid "%s Single"
|
309 |
msgstr ""
|
310 |
|
311 |
-
#: framework/features/conditions-manager.php:
|
312 |
msgid "%s Archive"
|
313 |
msgstr ""
|
314 |
|
315 |
-
#: framework/features/conditions-manager.php:
|
316 |
msgid "%s %s Taxonomy"
|
317 |
msgstr ""
|
318 |
|
319 |
-
#: framework/features/conditions-manager.php:
|
320 |
msgid "Post ID"
|
321 |
msgstr ""
|
322 |
|
323 |
-
#: framework/features/conditions-manager.php:
|
324 |
msgid "Page ID"
|
325 |
msgstr ""
|
326 |
|
327 |
-
#: framework/features/conditions-manager.php:
|
328 |
#: static/js/options/ConditionsManager/PostIdPicker.js:76
|
329 |
msgid "Custom Post Type ID"
|
330 |
msgstr ""
|
331 |
|
332 |
-
#: framework/features/conditions-manager.php:
|
333 |
msgid "Post with Taxonomy ID"
|
334 |
msgstr ""
|
335 |
|
336 |
-
#: framework/features/conditions-manager.php:
|
337 |
msgid "Taxonomy ID"
|
338 |
msgstr ""
|
339 |
|
340 |
-
#: framework/features/conditions-manager.php:
|
341 |
msgid "Specific"
|
342 |
msgstr ""
|
343 |
|
344 |
-
#: framework/features/conditions-manager.php:
|
345 |
msgid "Other Pages"
|
346 |
msgstr ""
|
347 |
|
348 |
-
#: framework/features/conditions-manager.php:
|
349 |
msgid "404"
|
350 |
msgstr ""
|
351 |
|
352 |
-
#: framework/features/conditions-manager.php:
|
353 |
#: framework/premium/features/premium-header/items/search-input/options.php:45,
|
354 |
#: framework/premium/features/premium-header/items/search-input/view.php:95
|
355 |
msgid "Search"
|
356 |
msgstr ""
|
357 |
|
358 |
-
#: framework/features/conditions-manager.php:
|
359 |
msgid "Blog"
|
360 |
msgstr ""
|
361 |
|
362 |
-
#: framework/features/conditions-manager.php:
|
363 |
msgid "Front Page"
|
364 |
msgstr ""
|
365 |
|
366 |
-
#: framework/features/conditions-manager.php:
|
367 |
msgid "Privacy Policy Page"
|
368 |
msgstr ""
|
369 |
|
370 |
-
#: framework/features/conditions-manager.php:
|
371 |
-
msgid "Author"
|
372 |
msgstr ""
|
373 |
|
374 |
-
#: framework/features/conditions-manager.php:
|
375 |
msgid "WooCommerce"
|
376 |
msgstr ""
|
377 |
|
378 |
-
#: framework/features/conditions-manager.php:
|
379 |
msgid "Shop Home"
|
380 |
msgstr ""
|
381 |
|
382 |
-
#: framework/features/conditions-manager.php:
|
383 |
msgid "Single Product"
|
384 |
msgstr ""
|
385 |
|
386 |
-
#: framework/features/conditions-manager.php:
|
387 |
msgid "Product Archives"
|
388 |
msgstr ""
|
389 |
|
390 |
-
#: framework/features/conditions-manager.php:
|
391 |
msgid "Product Categories"
|
392 |
msgstr ""
|
393 |
|
394 |
-
#: framework/features/conditions-manager.php:
|
395 |
msgid "Product Tags"
|
396 |
msgstr ""
|
397 |
|
398 |
-
#: framework/features/conditions-manager.php:
|
399 |
msgid "Custom Post Types"
|
400 |
msgstr ""
|
401 |
|
402 |
-
#: framework/features/conditions-manager.php:
|
403 |
msgid "User Auth"
|
404 |
msgstr ""
|
405 |
|
406 |
-
#: framework/features/conditions-manager.php:
|
407 |
msgid "User Logged In"
|
408 |
msgstr ""
|
409 |
|
410 |
-
#: framework/features/conditions-manager.php:
|
411 |
msgid "User Logged Out"
|
412 |
msgstr ""
|
413 |
|
414 |
-
#: framework/features/conditions-manager.php:
|
415 |
msgid "User Roles"
|
416 |
msgstr ""
|
417 |
|
418 |
-
#: framework/features/conditions-manager.php:
|
419 |
#: framework/premium/features/content-blocks/options/404.php:19,
|
420 |
#: framework/premium/features/content-blocks/options/header.php:19,
|
421 |
#: framework/premium/features/content-blocks/options/hook.php:24,
|
@@ -423,38 +423,38 @@ msgstr ""
|
|
423 |
msgid "Other"
|
424 |
msgstr ""
|
425 |
|
426 |
-
#: framework/features/conditions-manager.php:
|
427 |
msgid "Post Author"
|
428 |
msgstr ""
|
429 |
|
430 |
-
#: framework/features/conditions-manager.php:
|
431 |
#: framework/premium/features/premium-header/items/language-switcher/config.php:14
|
432 |
msgid "Languages"
|
433 |
msgstr ""
|
434 |
|
435 |
-
#: framework/features/conditions-manager.php:
|
436 |
msgid "Current Language"
|
437 |
msgstr ""
|
438 |
|
439 |
-
#: framework/features/conditions-manager.php:
|
440 |
msgid "bbPress"
|
441 |
msgstr ""
|
442 |
|
443 |
-
#: framework/features/conditions-manager.php:
|
444 |
msgid "Profile"
|
445 |
msgstr ""
|
446 |
|
447 |
-
#: framework/features/conditions-manager.php:
|
448 |
-
#: static/js/options/ConditionsManager.js:
|
449 |
msgid "Include"
|
450 |
msgstr ""
|
451 |
|
452 |
-
#: framework/features/conditions-manager.php:
|
453 |
-
#: static/js/options/ConditionsManager.js:
|
454 |
msgid "Exclude"
|
455 |
msgstr ""
|
456 |
|
457 |
-
#: framework/features/conditions-manager.php:
|
458 |
msgid "Language"
|
459 |
msgstr ""
|
460 |
|
@@ -2136,7 +2136,8 @@ msgid ""
|
|
2136 |
msgstr ""
|
2137 |
|
2138 |
#: framework/premium/extensions/code-snippets/extension.php:31,
|
2139 |
-
#: framework/premium/extensions/code-snippets/extension.php:78
|
|
|
2140 |
msgid "Header scripts"
|
2141 |
msgstr ""
|
2142 |
|
@@ -2152,10 +2153,6 @@ msgstr ""
|
|
2152 |
msgid "Footer scripts"
|
2153 |
msgstr ""
|
2154 |
|
2155 |
-
#: framework/premium/extensions/code-snippets/extension.php:123
|
2156 |
-
msgid "Header scripts2"
|
2157 |
-
msgstr ""
|
2158 |
-
|
2159 |
#: framework/premium/extensions/code-snippets/readme.php:4
|
2160 |
msgid ""
|
2161 |
"After activating the Custom Code Snippets extension you will have two ways "
|
@@ -2798,47 +2795,47 @@ msgstr ""
|
|
2798 |
msgid "Thumbnails Arrows Visibility"
|
2799 |
msgstr ""
|
2800 |
|
2801 |
-
#: framework/premium/extensions/woocommerce-extra/extension.php:
|
2802 |
msgid "Icons Spacing"
|
2803 |
msgstr ""
|
2804 |
|
2805 |
-
#: framework/premium/extensions/woocommerce-extra/extension.php:
|
2806 |
msgid "WooCommerce Offcanvas Filters"
|
2807 |
msgstr ""
|
2808 |
|
2809 |
-
#: framework/premium/extensions/woocommerce-extra/extension.php:
|
2810 |
msgid "Add widgets here."
|
2811 |
msgstr ""
|
2812 |
|
2813 |
-
#: framework/premium/extensions/woocommerce-extra/extension.php:
|
2814 |
msgid "Available Filters"
|
2815 |
msgstr ""
|
2816 |
|
2817 |
-
#: framework/premium/extensions/woocommerce-extra/extension.php:
|
2818 |
msgid "Close filters modal"
|
2819 |
msgstr ""
|
2820 |
|
2821 |
-
#: framework/premium/extensions/woocommerce-extra/extension.php:
|
2822 |
msgid "Quick view title before"
|
2823 |
msgstr ""
|
2824 |
|
2825 |
-
#: framework/premium/extensions/woocommerce-extra/extension.php:
|
2826 |
msgid "Quick view title after"
|
2827 |
msgstr ""
|
2828 |
|
2829 |
-
#: framework/premium/extensions/woocommerce-extra/extension.php:
|
2830 |
msgid "Quick view price before"
|
2831 |
msgstr ""
|
2832 |
|
2833 |
-
#: framework/premium/extensions/woocommerce-extra/extension.php:
|
2834 |
msgid "Quick view price after"
|
2835 |
msgstr ""
|
2836 |
|
2837 |
-
#: framework/premium/extensions/woocommerce-extra/extension.php:
|
2838 |
msgid "Quick view summary before"
|
2839 |
msgstr ""
|
2840 |
|
2841 |
-
#: framework/premium/extensions/woocommerce-extra/extension.php:
|
2842 |
msgid "Quick view summary after"
|
2843 |
msgstr ""
|
2844 |
|
@@ -5134,7 +5131,7 @@ msgstr ""
|
|
5134 |
#: framework/extensions/newsletter-subscribe/admin-static/js/ListPicker.js:14
|
5135 |
#: framework/extensions/newsletter-subscribe/admin-static/js/ListPicker/Implementation.js:63
|
5136 |
#: framework/extensions/newsletter-subscribe/dashboard-static/js/EditCredentials.js:213
|
5137 |
-
#: static/js/screens/SiteExport.js:
|
5138 |
msgid "Loading..."
|
5139 |
msgstr ""
|
5140 |
|
@@ -5332,7 +5329,7 @@ msgid "Choose"
|
|
5332 |
msgstr ""
|
5333 |
|
5334 |
#: framework/premium/extensions/custom-fonts/dashboard-static/js/Uploader.js:174
|
5335 |
-
#: static/js/options/ConditionsManager.js:
|
5336 |
msgid "Select variation"
|
5337 |
msgstr ""
|
5338 |
|
@@ -5665,7 +5662,7 @@ msgid ""
|
|
5665 |
msgstr ""
|
5666 |
|
5667 |
#: framework/premium/static/js/footer/PanelsManager.js:211
|
5668 |
-
#: framework/premium/static/js/hooks/CodeEditor.js:
|
5669 |
#: static/js/header/PanelsManager.js:216
|
5670 |
#: static/js/options/CustomizerOptionsManager.js:422
|
5671 |
msgid "Cancel"
|
@@ -5708,29 +5705,29 @@ msgstr ""
|
|
5708 |
msgid "Header name"
|
5709 |
msgstr ""
|
5710 |
|
5711 |
-
#: framework/premium/static/js/hooks/CodeEditor.js:
|
5712 |
msgid "Use code editor"
|
5713 |
msgstr ""
|
5714 |
|
5715 |
-
#: framework/premium/static/js/hooks/CodeEditor.js:
|
5716 |
msgid "Exit code editor"
|
5717 |
msgstr ""
|
5718 |
|
5719 |
-
#: framework/premium/static/js/hooks/CodeEditor.js:
|
5720 |
msgid "Heads up!"
|
5721 |
msgstr ""
|
5722 |
|
5723 |
-
#: framework/premium/static/js/hooks/CodeEditor.js:
|
5724 |
msgid ""
|
5725 |
"Enabling & disabling the code editor will erase everything from your post "
|
5726 |
"editor and this action is irreversible."
|
5727 |
msgstr ""
|
5728 |
|
5729 |
-
#: framework/premium/static/js/hooks/CodeEditor.js:
|
5730 |
msgid "Are you sure you want to continue?"
|
5731 |
msgstr ""
|
5732 |
|
5733 |
-
#: framework/premium/static/js/hooks/CodeEditor.js:
|
5734 |
msgid "Yes, continue"
|
5735 |
msgstr ""
|
5736 |
|
@@ -5961,31 +5958,35 @@ msgid ""
|
|
5961 |
"features and future updates."
|
5962 |
msgstr ""
|
5963 |
|
5964 |
-
#: static/js/options/ConditionsManager.js:
|
5965 |
msgid "Select rule"
|
5966 |
msgstr ""
|
5967 |
|
5968 |
-
#: static/js/options/ConditionsManager.js:
|
5969 |
msgid "Select taxonomy"
|
5970 |
msgstr ""
|
5971 |
|
5972 |
-
#: static/js/options/ConditionsManager.js:
|
5973 |
msgid "Select language"
|
5974 |
msgstr ""
|
5975 |
|
5976 |
-
#: static/js/options/ConditionsManager.js:
|
|
|
|
|
|
|
|
|
5977 |
msgid "Select user"
|
5978 |
msgstr ""
|
5979 |
|
5980 |
-
#: static/js/options/ConditionsManager.js:
|
5981 |
-
msgid "
|
5982 |
msgstr ""
|
5983 |
|
5984 |
-
#: static/js/options/ConditionsManager.js:
|
5985 |
msgid "Add Display Condition"
|
5986 |
msgstr ""
|
5987 |
|
5988 |
-
#: static/js/options/ConditionsManager.js:
|
5989 |
msgid "Add User Condition"
|
5990 |
msgstr ""
|
5991 |
|
@@ -6391,7 +6392,7 @@ msgstr ""
|
|
6391 |
msgid "Builder"
|
6392 |
msgstr ""
|
6393 |
|
6394 |
-
#: static/js/screens/SiteExport.js:
|
6395 |
msgid "Export site"
|
6396 |
msgstr ""
|
6397 |
|
7 |
"MIME-Version: 1.0\n"
|
8 |
"Content-Type: text/plain; charset=UTF-8\n"
|
9 |
"Content-Transfer-Encoding: 8bit\n"
|
10 |
+
"POT-Creation-Date: 2022-07-26 15:56+0000\n"
|
11 |
"Project-Id-Version: undefined\n"
|
12 |
"X-Poedit-Basepath: ..\n"
|
13 |
"X-Poedit-KeywordsList: __;_e;_ex:1,2c;_n:1,2;_n_noop:1,2;_nx:1,2,4c;"
|
236 |
msgid "Register For This Site"
|
237 |
msgstr ""
|
238 |
|
239 |
+
#: framework/features/conditions-manager.php:494
|
240 |
msgid "Entire Website"
|
241 |
msgstr ""
|
242 |
|
243 |
+
#: framework/features/conditions-manager.php:502,
|
244 |
+
#: framework/features/conditions-manager.php:544,
|
245 |
+
#: framework/features/conditions-manager.php:576
|
246 |
msgid "Basic"
|
247 |
msgstr ""
|
248 |
|
249 |
+
#: framework/features/conditions-manager.php:506,
|
250 |
+
#: framework/features/conditions-manager.php:580
|
251 |
msgid "Singulars"
|
252 |
msgstr ""
|
253 |
|
254 |
+
#: framework/features/conditions-manager.php:511,
|
255 |
+
#: framework/features/conditions-manager.php:548
|
256 |
msgid "Archives"
|
257 |
msgstr ""
|
258 |
|
259 |
+
#: framework/features/conditions-manager.php:517,
|
260 |
+
#: framework/features/conditions-manager.php:554,
|
261 |
+
#: framework/features/conditions-manager.php:586,
|
262 |
#: framework/extensions/trending/customizer.php:4,
|
263 |
#: framework/extensions/widgets/widgets/ct-posts/options.php:11,
|
264 |
#: framework/extensions/widgets/widgets/ct-posts/options.php:98,
|
268 |
msgid "Posts"
|
269 |
msgstr ""
|
270 |
|
271 |
+
#: framework/features/conditions-manager.php:521,
|
272 |
+
#: framework/features/conditions-manager.php:590,
|
273 |
#: framework/premium/features/content-blocks/hooks-manager.php:408,
|
274 |
#: framework/premium/features/content-blocks/hooks-manager.php:416,
|
275 |
#: framework/premium/features/content-blocks/hooks-manager.php:424,
|
279 |
msgid "Single Post"
|
280 |
msgstr ""
|
281 |
|
282 |
+
#: framework/features/conditions-manager.php:526,
|
283 |
+
#: framework/features/conditions-manager.php:558
|
284 |
msgid "All Post Archives"
|
285 |
msgstr ""
|
286 |
|
287 |
+
#: framework/features/conditions-manager.php:531,
|
288 |
+
#: framework/features/conditions-manager.php:563
|
289 |
msgid "Post Categories"
|
290 |
msgstr ""
|
291 |
|
292 |
+
#: framework/features/conditions-manager.php:536,
|
293 |
+
#: framework/features/conditions-manager.php:568
|
294 |
msgid "Post Tags"
|
295 |
msgstr ""
|
296 |
|
297 |
+
#: framework/features/conditions-manager.php:598,
|
298 |
#: framework/extensions/widgets/widgets/ct-posts/options.php:12,
|
299 |
#: framework/premium/features/premium-header/items/search-input/options.php:5
|
300 |
msgid "Pages"
|
301 |
msgstr ""
|
302 |
|
303 |
+
#: framework/features/conditions-manager.php:602
|
304 |
msgid "Single Page"
|
305 |
msgstr ""
|
306 |
|
307 |
+
#: framework/features/conditions-manager.php:629
|
308 |
msgid "%s Single"
|
309 |
msgstr ""
|
310 |
|
311 |
+
#: framework/features/conditions-manager.php:639
|
312 |
msgid "%s Archive"
|
313 |
msgstr ""
|
314 |
|
315 |
+
#: framework/features/conditions-manager.php:652
|
316 |
msgid "%s %s Taxonomy"
|
317 |
msgstr ""
|
318 |
|
319 |
+
#: framework/features/conditions-manager.php:667
|
320 |
msgid "Post ID"
|
321 |
msgstr ""
|
322 |
|
323 |
+
#: framework/features/conditions-manager.php:672
|
324 |
msgid "Page ID"
|
325 |
msgstr ""
|
326 |
|
327 |
+
#: framework/features/conditions-manager.php:677
|
328 |
#: static/js/options/ConditionsManager/PostIdPicker.js:76
|
329 |
msgid "Custom Post Type ID"
|
330 |
msgstr ""
|
331 |
|
332 |
+
#: framework/features/conditions-manager.php:682
|
333 |
msgid "Post with Taxonomy ID"
|
334 |
msgstr ""
|
335 |
|
336 |
+
#: framework/features/conditions-manager.php:687
|
337 |
msgid "Taxonomy ID"
|
338 |
msgstr ""
|
339 |
|
340 |
+
#: framework/features/conditions-manager.php:691
|
341 |
msgid "Specific"
|
342 |
msgstr ""
|
343 |
|
344 |
+
#: framework/features/conditions-manager.php:697
|
345 |
msgid "Other Pages"
|
346 |
msgstr ""
|
347 |
|
348 |
+
#: framework/features/conditions-manager.php:701
|
349 |
msgid "404"
|
350 |
msgstr ""
|
351 |
|
352 |
+
#: framework/features/conditions-manager.php:706,
|
353 |
#: framework/premium/features/premium-header/items/search-input/options.php:45,
|
354 |
#: framework/premium/features/premium-header/items/search-input/view.php:95
|
355 |
msgid "Search"
|
356 |
msgstr ""
|
357 |
|
358 |
+
#: framework/features/conditions-manager.php:711
|
359 |
msgid "Blog"
|
360 |
msgstr ""
|
361 |
|
362 |
+
#: framework/features/conditions-manager.php:716
|
363 |
msgid "Front Page"
|
364 |
msgstr ""
|
365 |
|
366 |
+
#: framework/features/conditions-manager.php:721
|
367 |
msgid "Privacy Policy Page"
|
368 |
msgstr ""
|
369 |
|
370 |
+
#: framework/features/conditions-manager.php:733
|
371 |
+
msgid "Author Archives"
|
372 |
msgstr ""
|
373 |
|
374 |
+
#: framework/features/conditions-manager.php:743
|
375 |
msgid "WooCommerce"
|
376 |
msgstr ""
|
377 |
|
378 |
+
#: framework/features/conditions-manager.php:747
|
379 |
msgid "Shop Home"
|
380 |
msgstr ""
|
381 |
|
382 |
+
#: framework/features/conditions-manager.php:752
|
383 |
msgid "Single Product"
|
384 |
msgstr ""
|
385 |
|
386 |
+
#: framework/features/conditions-manager.php:757
|
387 |
msgid "Product Archives"
|
388 |
msgstr ""
|
389 |
|
390 |
+
#: framework/features/conditions-manager.php:762
|
391 |
msgid "Product Categories"
|
392 |
msgstr ""
|
393 |
|
394 |
+
#: framework/features/conditions-manager.php:767
|
395 |
msgid "Product Tags"
|
396 |
msgstr ""
|
397 |
|
398 |
+
#: framework/features/conditions-manager.php:775
|
399 |
msgid "Custom Post Types"
|
400 |
msgstr ""
|
401 |
|
402 |
+
#: framework/features/conditions-manager.php:784
|
403 |
msgid "User Auth"
|
404 |
msgstr ""
|
405 |
|
406 |
+
#: framework/features/conditions-manager.php:788
|
407 |
msgid "User Logged In"
|
408 |
msgstr ""
|
409 |
|
410 |
+
#: framework/features/conditions-manager.php:793
|
411 |
msgid "User Logged Out"
|
412 |
msgstr ""
|
413 |
|
414 |
+
#: framework/features/conditions-manager.php:799
|
415 |
msgid "User Roles"
|
416 |
msgstr ""
|
417 |
|
418 |
+
#: framework/features/conditions-manager.php:804,
|
419 |
#: framework/premium/features/content-blocks/options/404.php:19,
|
420 |
#: framework/premium/features/content-blocks/options/header.php:19,
|
421 |
#: framework/premium/features/content-blocks/options/hook.php:24,
|
423 |
msgid "Other"
|
424 |
msgstr ""
|
425 |
|
426 |
+
#: framework/features/conditions-manager.php:808
|
427 |
msgid "Post Author"
|
428 |
msgstr ""
|
429 |
|
430 |
+
#: framework/features/conditions-manager.php:820,
|
431 |
#: framework/premium/features/premium-header/items/language-switcher/config.php:14
|
432 |
msgid "Languages"
|
433 |
msgstr ""
|
434 |
|
435 |
+
#: framework/features/conditions-manager.php:824
|
436 |
msgid "Current Language"
|
437 |
msgstr ""
|
438 |
|
439 |
+
#: framework/features/conditions-manager.php:832
|
440 |
msgid "bbPress"
|
441 |
msgstr ""
|
442 |
|
443 |
+
#: framework/features/conditions-manager.php:836
|
444 |
msgid "Profile"
|
445 |
msgstr ""
|
446 |
|
447 |
+
#: framework/features/conditions-manager.php:848
|
448 |
+
#: static/js/options/ConditionsManager.js:105
|
449 |
msgid "Include"
|
450 |
msgstr ""
|
451 |
|
452 |
+
#: framework/features/conditions-manager.php:848
|
453 |
+
#: static/js/options/ConditionsManager.js:106
|
454 |
msgid "Exclude"
|
455 |
msgstr ""
|
456 |
|
457 |
+
#: framework/features/conditions-manager.php:901
|
458 |
msgid "Language"
|
459 |
msgstr ""
|
460 |
|
2136 |
msgstr ""
|
2137 |
|
2138 |
#: framework/premium/extensions/code-snippets/extension.php:31,
|
2139 |
+
#: framework/premium/extensions/code-snippets/extension.php:78,
|
2140 |
+
#: framework/premium/extensions/code-snippets/extension.php:123
|
2141 |
msgid "Header scripts"
|
2142 |
msgstr ""
|
2143 |
|
2153 |
msgid "Footer scripts"
|
2154 |
msgstr ""
|
2155 |
|
|
|
|
|
|
|
|
|
2156 |
#: framework/premium/extensions/code-snippets/readme.php:4
|
2157 |
msgid ""
|
2158 |
"After activating the Custom Code Snippets extension you will have two ways "
|
2795 |
msgid "Thumbnails Arrows Visibility"
|
2796 |
msgstr ""
|
2797 |
|
2798 |
+
#: framework/premium/extensions/woocommerce-extra/extension.php:391
|
2799 |
msgid "Icons Spacing"
|
2800 |
msgstr ""
|
2801 |
|
2802 |
+
#: framework/premium/extensions/woocommerce-extra/extension.php:439
|
2803 |
msgid "WooCommerce Offcanvas Filters"
|
2804 |
msgstr ""
|
2805 |
|
2806 |
+
#: framework/premium/extensions/woocommerce-extra/extension.php:441
|
2807 |
msgid "Add widgets here."
|
2808 |
msgstr ""
|
2809 |
|
2810 |
+
#: framework/premium/extensions/woocommerce-extra/extension.php:714
|
2811 |
msgid "Available Filters"
|
2812 |
msgstr ""
|
2813 |
|
2814 |
+
#: framework/premium/extensions/woocommerce-extra/extension.php:715
|
2815 |
msgid "Close filters modal"
|
2816 |
msgstr ""
|
2817 |
|
2818 |
+
#: framework/premium/extensions/woocommerce-extra/extension.php:808
|
2819 |
msgid "Quick view title before"
|
2820 |
msgstr ""
|
2821 |
|
2822 |
+
#: framework/premium/extensions/woocommerce-extra/extension.php:813
|
2823 |
msgid "Quick view title after"
|
2824 |
msgstr ""
|
2825 |
|
2826 |
+
#: framework/premium/extensions/woocommerce-extra/extension.php:818
|
2827 |
msgid "Quick view price before"
|
2828 |
msgstr ""
|
2829 |
|
2830 |
+
#: framework/premium/extensions/woocommerce-extra/extension.php:823
|
2831 |
msgid "Quick view price after"
|
2832 |
msgstr ""
|
2833 |
|
2834 |
+
#: framework/premium/extensions/woocommerce-extra/extension.php:828
|
2835 |
msgid "Quick view summary before"
|
2836 |
msgstr ""
|
2837 |
|
2838 |
+
#: framework/premium/extensions/woocommerce-extra/extension.php:833
|
2839 |
msgid "Quick view summary after"
|
2840 |
msgstr ""
|
2841 |
|
5131 |
#: framework/extensions/newsletter-subscribe/admin-static/js/ListPicker.js:14
|
5132 |
#: framework/extensions/newsletter-subscribe/admin-static/js/ListPicker/Implementation.js:63
|
5133 |
#: framework/extensions/newsletter-subscribe/dashboard-static/js/EditCredentials.js:213
|
5134 |
+
#: static/js/screens/SiteExport.js:170
|
5135 |
msgid "Loading..."
|
5136 |
msgstr ""
|
5137 |
|
5329 |
msgstr ""
|
5330 |
|
5331 |
#: framework/premium/extensions/custom-fonts/dashboard-static/js/Uploader.js:174
|
5332 |
+
#: static/js/options/ConditionsManager.js:100
|
5333 |
msgid "Select variation"
|
5334 |
msgstr ""
|
5335 |
|
5662 |
msgstr ""
|
5663 |
|
5664 |
#: framework/premium/static/js/footer/PanelsManager.js:211
|
5665 |
+
#: framework/premium/static/js/hooks/CodeEditor.js:203
|
5666 |
#: static/js/header/PanelsManager.js:216
|
5667 |
#: static/js/options/CustomizerOptionsManager.js:422
|
5668 |
msgid "Cancel"
|
5705 |
msgid "Header name"
|
5706 |
msgstr ""
|
5707 |
|
5708 |
+
#: framework/premium/static/js/hooks/CodeEditor.js:164
|
5709 |
msgid "Use code editor"
|
5710 |
msgstr ""
|
5711 |
|
5712 |
+
#: framework/premium/static/js/hooks/CodeEditor.js:167
|
5713 |
msgid "Exit code editor"
|
5714 |
msgstr ""
|
5715 |
|
5716 |
+
#: framework/premium/static/js/hooks/CodeEditor.js:179
|
5717 |
msgid "Heads up!"
|
5718 |
msgstr ""
|
5719 |
|
5720 |
+
#: framework/premium/static/js/hooks/CodeEditor.js:181
|
5721 |
msgid ""
|
5722 |
"Enabling & disabling the code editor will erase everything from your post "
|
5723 |
"editor and this action is irreversible."
|
5724 |
msgstr ""
|
5725 |
|
5726 |
+
#: framework/premium/static/js/hooks/CodeEditor.js:188
|
5727 |
msgid "Are you sure you want to continue?"
|
5728 |
msgstr ""
|
5729 |
|
5730 |
+
#: framework/premium/static/js/hooks/CodeEditor.js:252
|
5731 |
msgid "Yes, continue"
|
5732 |
msgstr ""
|
5733 |
|
5958 |
"features and future updates."
|
5959 |
msgstr ""
|
5960 |
|
5961 |
+
#: static/js/options/ConditionsManager.js:128
|
5962 |
msgid "Select rule"
|
5963 |
msgstr ""
|
5964 |
|
5965 |
+
#: static/js/options/ConditionsManager.js:185
|
5966 |
msgid "Select taxonomy"
|
5967 |
msgstr ""
|
5968 |
|
5969 |
+
#: static/js/options/ConditionsManager.js:222
|
5970 |
msgid "Select language"
|
5971 |
msgstr ""
|
5972 |
|
5973 |
+
#: static/js/options/ConditionsManager.js:263
|
5974 |
+
msgid "Current user"
|
5975 |
+
msgstr ""
|
5976 |
+
|
5977 |
+
#: static/js/options/ConditionsManager.js:299
|
5978 |
msgid "Select user"
|
5979 |
msgstr ""
|
5980 |
|
5981 |
+
#: static/js/options/ConditionsManager.js:306
|
5982 |
+
msgid "All authors"
|
5983 |
msgstr ""
|
5984 |
|
5985 |
+
#: static/js/options/ConditionsManager.js:369
|
5986 |
msgid "Add Display Condition"
|
5987 |
msgstr ""
|
5988 |
|
5989 |
+
#: static/js/options/ConditionsManager.js:388
|
5990 |
msgid "Add User Condition"
|
5991 |
msgstr ""
|
5992 |
|
6392 |
msgid "Builder"
|
6393 |
msgstr ""
|
6394 |
|
6395 |
+
#: static/js/screens/SiteExport.js:171
|
6396 |
msgid "Export site"
|
6397 |
msgstr ""
|
6398 |
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Requires PHP: 7.0
|
|
5 |
Tested up to: 6.0
|
6 |
License: GPLv2 or later
|
7 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
8 |
-
Stable tag: 1.8.
|
9 |
|
10 |
== Description ==
|
11 |
|
@@ -23,6 +23,10 @@ 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.8.42: 2022-07-14
|
27 |
- Fix: Account modal breaks if dismissed previously
|
28 |
|
5 |
Tested up to: 6.0
|
6 |
License: GPLv2 or later
|
7 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
8 |
+
Stable tag: 1.8.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.8.43: 2022-07-26
|
27 |
+
- Improvement: Allow picking individual author archives in conditions module
|
28 |
+
- Improvement: Account modal incorrect overflow on smaller screens
|
29 |
+
|
30 |
1.8.42: 2022-07-14
|
31 |
- Fix: Account modal breaks if dismissed previously
|
32 |
|
static/bundle/account-lazy.min.css
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
/**
|
2 |
-
* - v1.8.
|
3 |
*
|
4 |
* Copyright (c) 2022
|
5 |
* Licensed GPLv2+
|
6 |
*/
|
7 |
|
8 |
-
#account-modal{
|
1 |
/**
|
2 |
+
* - v1.8.43
|
3 |
*
|
4 |
* Copyright (c) 2022
|
5 |
* Licensed GPLv2+
|
6 |
*/
|
7 |
|
8 |
+
#account-modal{background-color:rgba(18,21,25,.6)}.ct-account-form{width:100%;margin:auto;color:var(--color);background-color:#fff;--linkInitialColor: var(--color);border-radius:3px;box-shadow:var(--box-shadow, 0px 0px 70px rgba(0, 0, 0, 0.35));--content-spacing: 1em}@media(max-width: 479.98px){.ct-account-form{max-width:88vw}}@media(min-width: 480px){.ct-account-form{max-width:480px}}.ct-account-form>ul{display:flex}.ct-account-form>ul li{width:50%;display:flex;align-items:center;justify-content:center;position:relative;height:60px;font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.03em;cursor:pointer;border-bottom:1px solid rgba(0,0,0,.1);transition:opacity .1s ease,background .1s ease}.ct-account-form>ul li.active{border-bottom-color:rgba(0,0,0,0)}.ct-account-form>ul li:not(.active){opacity:.5;background:rgba(0,0,0,.04)}.ct-account-form>ul li:not(.active):hover{opacity:.8}.ct-account-form>ul li:first-child{border-right:1px solid rgba(0,0,0,.1)}@media(max-width: 479.98px){.ct-account-form .ct-account-panel{padding:40px 30px}}@media(min-width: 480px){.ct-account-form .ct-account-panel{padding:60px 70px}}.ct-account-form .ct-account-panel:not(.active){display:none}.ct-account-form form>*{--content-spacing: 20px}.ct-account-form form>*:last-of-type{margin-bottom:0}.ct-account-form label{display:block;--fontSize: 14px}.ct-account-form .ct-button{width:100%}.ct-account-form .ct-button svg{margin-inline-start:10px}.ct-account-form .ct-button:not(.ct-loading) svg{display:none}.ct-account-form .col-2{display:flex;justify-content:space-between}.ct-account-form #reg_passmail,.ct-account-form .ct-back-to-login{font-size:14px;text-align:center}.ct-account-form .ct-back-to-login{display:block;margin-top:20px}.ct-account-form .login-remember{font-size:14px}.ct-account-form .login-remember span{display:flex}.ct-account-form .login-remember input{--top: 3px}.ct-account-form #reg_passmail{opacity:.7}.ct-account-form [class*=ct-form-notification]{font-size:14px;margin-bottom:25px;border-radius:3px;padding:10px 15px;background:rgba(0,0,0,.04)}.ct-account-form [class*=ct-form-notification] a{color:inherit}.ct-account-form [class*=ct-form-notification] a:not(:hover){text-decoration:underline}.ct-account-form .ct-form-notification-error{color:rgba(255,255,255,.95);background:rgba(218,0,28,.7)}@media(prefers-reduced-motion: no-preference){.ct-account-form.ct-error{animation:shake .82s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;transform:translate3d(0, 0, 0);-webkit-backface-visibility:hidden;backface-visibility:hidden;perspective:1000px}}.ct-account-form div.g-recaptcha,.ct-account-form .anr_captcha_field{margin:var(--content-spacing) 0 !important}#wfls-prompt-overlay-blocksy{margin-bottom:var(--content-spacing)}#wfls-prompt-overlay-blocksy #wfls-prompt-wrapper input+label{margin-top:var(--content-spacing)}#wfls-prompt-overlay-blocksy~*:not(.login-submit){display:none}
|
static/bundle/dashboard.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
/*! For license information please see dashboard.js.LICENSE.txt */
|
2 |
-
!function(){var e={184:function(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var a=typeof n;if("string"===a||"number"===a)e.push(n);else if(Array.isArray(n)&&n.length){var i=o.apply(null,n);i&&e.push(i)}else if("object"===a)for(var c in n)r.call(n,c)&&n[c]&&e.push(c)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},162:function(e,t,n){var r;void 0===(r=function(){"use strict";function t(e,t,n){var r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){i(r.response,t,n)},r.onerror=function(){console.error("could not download file")},r.send()}function 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 a="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof n.g&&n.g.global===n.g?n.g:void 0,i=a.saveAs||("object"!=typeof window||window!==a?function(){}:"download"in HTMLAnchorElement.prototype?function(e,n,i){var c=a.URL||a.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,i):o(l,l.target="_blank")):(l.href=c.createObjectURL(e),setTimeout((function(){c.revokeObjectURL(l.href)}),4e4),setTimeout((function(){o(l)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,n,a){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,a),n);else if(r(e))t(e,n,a);else{var i=document.createElement("a");i.href=e,i.target="_blank",setTimeout((function(){o(i)}))}}: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 i="application/octet-stream"===e.type,c=/constructor/i.test(a.HTMLElement)||a.safari,l=/CriOS\/[\d]+/.test(navigator.userAgent);if((l||i&&c)&&"object"==typeof FileReader){var s=new FileReader;s.onloadend=function(){var e=s.result;e=l?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),o?o.location.href=e:location=e,o=null},s.readAsDataURL(e)}else{var u=a.URL||a.webkitURL,m=u.createObjectURL(e);o?o.location=m:location.href=m,o=null,setTimeout((function(){u.revokeObjectURL(m)}),4e4)}});a.saveAs=i.saveAs=i,e.exports=i}.apply(t,[]))||(e.exports=r)},172:function(e,t,n){var r,o,a=n(760),i=n(529),c=(o=[],{activateTrap:function(e){if(o.length>0){var t=o[o.length-1];t!==e&&t.pause()}var n=o.indexOf(e);-1===n||o.splice(n,1),o.push(e)},deactivateTrap:function(e){var t=o.indexOf(e);-1!==t&&o.splice(t,1),o.length>0&&o[o.length-1].unpause()}});function l(e){return setTimeout(e,0)}e.exports=function(e,t){var n=document,o="string"==typeof e?n.querySelector(e):e,s=i({returnFocusOnDeactivate:!0,escapeDeactivates:!0},t),u={firstTabbableNode:null,lastTabbableNode:null,nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1},m={activate:function(e){if(!u.active){E(),u.active=!0,u.paused=!1,u.nodeFocusedBeforeActivation=n.activeElement;var t=e&&e.onActivate?e.onActivate:s.onActivate;return t&&t(),d(),m}},deactivate:p,pause:function(){!u.paused&&u.active&&(u.paused=!0,f())},unpause:function(){u.paused&&u.active&&(u.paused=!1,E(),d())}};return m;function p(e){if(u.active){clearTimeout(r),f(),u.active=!1,u.paused=!1,c.deactivateTrap(m);var t=e&&void 0!==e.onDeactivate?e.onDeactivate:s.onDeactivate;return t&&t(),(e&&void 0!==e.returnFocus?e.returnFocus:s.returnFocusOnDeactivate)&&l((function(){var e;w((e=u.nodeFocusedBeforeActivation,h("setReturnFocus")||e))})),m}}function d(){if(u.active)return c.activateTrap(m),r=l((function(){w(y())})),n.addEventListener("focusin",v,!0),n.addEventListener("mousedown",b,{capture:!0,passive:!1}),n.addEventListener("touchstart",b,{capture:!0,passive:!1}),n.addEventListener("click",_,{capture:!0,passive:!1}),n.addEventListener("keydown",g,{capture:!0,passive:!1}),m}function f(){if(u.active)return n.removeEventListener("focusin",v,!0),n.removeEventListener("mousedown",b,!0),n.removeEventListener("touchstart",b,!0),n.removeEventListener("click",_,!0),n.removeEventListener("keydown",g,!0),m}function h(e){var t=s[e],r=t;if(!t)return null;if("string"==typeof t&&!(r=n.querySelector(t)))throw new Error("`"+e+"` refers to no known node");if("function"==typeof t&&!(r=t()))throw new Error("`"+e+"` did not return a node");return r}function y(){var e;if(!(e=null!==h("initialFocus")?h("initialFocus"):o.contains(n.activeElement)?n.activeElement:u.firstTabbableNode||h("fallbackFocus")))throw new Error("Your focus-trap needs to have at least one focusable element");return e}function b(e){o.contains(e.target)||(s.clickOutsideDeactivates?p({returnFocus:!a.isFocusable(e.target)}):s.allowOutsideClick&&s.allowOutsideClick(e)||e.preventDefault())}function v(e){o.contains(e.target)||e.target instanceof Document||(e.stopImmediatePropagation(),w(u.mostRecentlyFocusedNode||y()))}function g(e){if(!1!==s.escapeDeactivates&&function(e){return"Escape"===e.key||"Esc"===e.key||27===e.keyCode}(e))return e.preventDefault(),void p();(function(e){return"Tab"===e.key||9===e.keyCode})(e)&&function(e){if(E(),e.shiftKey&&e.target===u.firstTabbableNode)return e.preventDefault(),void w(u.lastTabbableNode);e.shiftKey||e.target!==u.lastTabbableNode||(e.preventDefault(),w(u.firstTabbableNode))}(e)}function _(e){s.clickOutsideDeactivates||o.contains(e.target)||s.allowOutsideClick&&s.allowOutsideClick(e)||(e.preventDefault(),e.stopImmediatePropagation())}function E(){var e=a(o);u.firstTabbableNode=e[0]||y(),u.lastTabbableNode=e[e.length-1]||y()}function w(e){e!==n.activeElement&&(e&&e.focus?(e.focus(),u.mostRecentlyFocusedNode=e,function(e){return e.tagName&&"input"===e.tagName.toLowerCase()&&"function"==typeof e.select}(e)&&e.select()):w(y()))}}},703:function(e,t,n){"use strict";var r=n(414);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,a,i){if(i!==r){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:o};return n.PropTypes=n,n}},697:function(e,t,n){e.exports=n(703)()},414:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},760:function(e){var t=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'],n=t.join(","),r="undefined"==typeof Element?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector;function o(e,t){t=t||{};var o,i,c,u=[],m=[],p=e.querySelectorAll(n);for(t.includeContainer&&r.call(e,n)&&(p=Array.prototype.slice.apply(p)).unshift(e),o=0;o<p.length;o++)a(i=p[o])&&(0===(c=l(i))?u.push(i):m.push({documentOrder:o,tabIndex:c,node:i}));return m.sort(s).map((function(e){return e.node})).concat(u)}function a(e){return!(!i(e)||function(e){return function(e){return u(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t=function(e){for(var t=0;t<e.length;t++)if(e[t].checked)return e[t]}(e.ownerDocument.querySelectorAll('input[type="radio"][name="'+e.name+'"]'));return!t||t===e}(e)}(e)||l(e)<0)}function i(e){return!(e.disabled||function(e){return u(e)&&"hidden"===e.type}(e)||function(e){return null===e.offsetParent||"hidden"===getComputedStyle(e).visibility}(e))}o.isTabbable=function(e){if(!e)throw new Error("No node provided");return!1!==r.call(e,n)&&a(e)},o.isFocusable=function(e){if(!e)throw new Error("No node provided");return!1!==r.call(e,c)&&i(e)};var c=t.concat("iframe").join(",");function l(e){var t=parseInt(e.getAttribute("tabindex"),10);return isNaN(t)?function(e){return"true"===e.contentEditable}(e)?0:e.tabIndex:t}function s(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex}function u(e){return"INPUT"===e.tagName}e.exports=o},529:function(e){e.exports=function(){for(var e={},n=0;n<arguments.length;n++){var r=arguments[n];for(var o in r)t.call(r,o)&&(e[o]=r[o])}return e};var t=Object.prototype.hasOwnProperty}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var a=t[r]={exports:{}};return e[r].call(a.exports,a,a.exports,n),a.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){"use strict";var e=window.wp.element,t=window.ctEvents,r=n.n(t),o=window.wp.i18n,a=n(184),i=n.n(a),c=window.React,l=n.n(c);function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}n(697);var m=function(e){return e.initialState,e.getInitialState,e.refs,e.getRefs,e.didMount,e.didUpdate,e.willUnmount,e.getSnapshotBeforeUpdate,e.shouldUpdate,e.render,function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["initialState","getInitialState","refs","getRefs","didMount","didUpdate","willUnmount","getSnapshotBeforeUpdate","shouldUpdate","render"])},p=function(e){function t(){var n,r;s(this,t);for(var o=arguments.length,a=Array(o),i=0;i<o;i++)a[i]=arguments[i];return n=r=u(this,e.call.apply(e,[this].concat(a))),d.call(r),u(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.getArgs=function(){var e=this.state,t=this.props,n=this._setState,r=this._forceUpdate,o=this._refs;return{state:e,props:m(t),refs:o,setState:n,forceUpdate:r}},t.prototype.componentDidMount=function(){this.props.didMount&&this.props.didMount(this.getArgs())},t.prototype.shouldComponentUpdate=function(e,t){return!this.props.shouldUpdate||this.props.shouldUpdate({props:this.props,state:this.state,nextProps:m(e),nextState:t})},t.prototype.componentWillUnmount=function(){this.props.willUnmount&&this.props.willUnmount({state:this.state,props:m(this.props),refs:this._refs})},t.prototype.componentDidUpdate=function(e,t,n){this.props.didUpdate&&this.props.didUpdate(Object.assign(this.getArgs(),{prevProps:m(e),prevState:t}),n)},t.prototype.getSnapshotBeforeUpdate=function(e,t){return this.props.getSnapshotBeforeUpdate?this.props.getSnapshotBeforeUpdate(Object.assign(this.getArgs(),{prevProps:m(e),prevState:t})):null},t.prototype.render=function(){var e=this.props,t=e.children,n=e.render;return n?n(this.getArgs()):"function"==typeof t?t(this.getArgs()):t||null},t}(l().Component);p.defaultProps={getInitialState:function(){},getRefs:function(){return{}}};var d=function(){var e=this;this.state=this.props.initialState||this.props.getInitialState(this.props),this._refs=this.props.refs||this.props.getRefs(this.getArgs()),this._setState=function(){return e.setState.apply(e,arguments)},this._forceUpdate=function(){return e.forceUpdate.apply(e,arguments)}},f=p,h=function(t){var n=t.children,r=t.container,o=void 0===r?document.body:r,a=t.type,i=void 0===a?"reach-portal":a;return(0,e.createElement)(f,{getRefs:function(){return{node:null}},didMount:function(e){var t=e.refs,n=e.forceUpdate,r=o.hasOwnProperty("current")?o.current:o;t.node=document.createElement(i),r.appendChild(t.node),n()},willUnmount:function(e){var t=e.refs.node,n=o.hasOwnProperty("current")?o.current:o;n&&n.removeChild(t)},render:function(t){var r=t.refs.node;return r?(0,e.createPortal)(n,r):null}})},y=function(e,t){return function(n){if(e&&e(n),!n.defaultPrevented)return t(n)}},b=n(172),v=n.n(b);function g(){return g=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},g.apply(this,arguments)}function _(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var E=function(){},w=function(){},k=function(e){var t=e.refs;t.trap.deactivate(),t.disposeAriaHider()},O=React.createContext(),x=React.forwardRef((function(t,n){var r=t.container,o=t.isOpen,a=void 0===o||o,i=t.onDismiss,c=void 0===i?E:i,l=t.initialFocusRef,s=t.onClick,u=t.onKeyDown,m=_(t,["container","isOpen","onDismiss","initialFocusRef","onClick","onKeyDown"]);return(0,e.createElement)(f,{didMount:w},a?(0,e.createElement)(h,{container:r,"data-reach-dialog-wrapper":!0},(0,e.createElement)(f,{refs:{overlayNode:null,contentNode:null},didMount:function(e){!function(e,t){var n,r,o;e.disposeAriaHider=(n=e.overlayNode,r=[],o=[],Array.prototype.forEach.call(document.querySelectorAll("body > *"),(function(e){if(e!==n.parentNode){var t=e.getAttribute("aria-hidden");null!==t&&"false"!==t||(r.push(t),o.push(e),e.setAttribute("aria-hidden","true"))}})),function(){o.forEach((function(e,t){var n=r[t];null===n?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",n)}))}),e.trap=v()(e.overlayNode,{initialFocus:t?function(){return t.current}:void 0,fallbackFocus:e.contentNode,escapeDeactivates:!1,clickOutsideDeactivates:!1})}(e.refs,l)},willUnmount:k},(function(t){var r=t.refs;return(0,e.createElement)(O.Provider,{value:function(e){return r.contentNode=e}},(0,e.createElement)("div",g({"data-reach-dialog-overlay":!0,onClick:y(s,(function(e){e.stopPropagation(),c()})),onKeyDown:y(u,(function(e){"Escape"===e.key&&(e.stopPropagation(),c())})),ref:function(e){r.overlayNode=e,n&&n(e)}},m)))}))):null)}));x.propTypes={initialFocusRef:function(){}};var S=function(e){return e.stopPropagation()},C=React.forwardRef((function(t,n){var r=t.onClick,o=(t.onKeyDown,_(t,["onClick","onKeyDown"]));return(0,e.createElement)(O.Consumer,null,(function(t){return(0,e.createElement)("div",g({"aria-modal":"true","data-reach-dialog-content":!0,tabIndex:"-1",onClick:y(r,S),ref:function(e){t(e),n&&n(e)}},o))}))})),j=window.blocksyOptions,D=function(e){return!!e},P=function(t){var n=t.items,r=t.isVisible,o=void 0===r?D:r,a=t.render,c=t.className,l=t.onDismiss;return(0,e.createElement)(j.Transition,{items:n,onStart:function(){return document.body.classList[o(n)?"add":"remove"]("ct-dashboard-overlay-open")},config:{duration:200},from:{opacity:0,y:-10},enter:{opacity:1,y:0},leave:{opacity:0,y:10}},(function(t){return o(t)&&function(n){return(0,e.createElement)(x,{style:{opacity:n.opacity},container:document.querySelector("#wpbody"),onDismiss:function(){return l()}},(0,e.createElement)(C,{className:i()("ct-admin-modal",c),style:{transform:"translate3d(0px, ".concat(n.y,"px, 0px)")}},(0,e.createElement)("button",{className:"close-button",onClick:function(){return l()}},"×"),a(t,n)))}}))};function A(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var N=function(t){var n,r,o=(n=(0,e.useState)(!1),r=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,a=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}return n}}(n,r)||function(e,t){if(e){if("string"==typeof e)return A(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)?A(e,t):void 0}}(n,r)||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.")}()),a=o[0],i=o[1];return[function(){return i(!0)},(0,e.createElement)(P,{items:a,onDismiss:function(){return i(!1)},render:function(){return(0,e.createElement)("div",{className:"ct-modal-content",dangerouslySetInnerHTML:{__html:t.readme}})}})]},M=window.ctDashboardLocalizations.DashboardContext,z=(M.Provider,M.Consumer,M);function L(e,t,n,r,o,a,i){try{var c=e[a](i),l=c.value}catch(e){return void n(e)}c.done?t(l):Promise.resolve(l).then(r,o)}function T(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){L(a,r,o,i,c,"next",e)}function c(e){L(a,r,o,i,c,"throw",e)}i(void 0)}))}}function I(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,a=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}return n}}(e,t)||function(e,t){if(e){if("string"==typeof e)return B(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)?B(e,t):void 0}}(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){(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 R=function(){return ctDashboardLocalizations.plugin_data.hide_support_section?null:(0,e.createElement)("div",{className:"ct-support-container"},(0,e.createElement)("h2",null,(0,o.__)("Need help or advice?","blocksy-companion")),(0,e.createElement)("p",null,(0,o.__)("Got a question or need help with the theme? You can always submit a support ticket or ask for help in our friendly Facebook community.","blocksy-companion")),(0,e.createElement)("a",{href:ctDashboardLocalizations.support_url,className:"ct-button","data-hover":"blue",target:"_blank"},(0,o.__)("Submit a Support Ticket","blocksy-companion")),(0,e.createElement)("a",{href:"https://www.facebook.com/groups/blocksy.community",className:"ct-button","data-hover":"blue",target:"_blank"},(0,o.__)("Join Facebook Community","blocksy-companion")))};function F(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 U(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?F(Object(n),!0).forEach((function(t){V(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function V(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function H(e,t,n,r,o,a,i){try{var c=e[a](i),l=c.value}catch(e){return void n(e)}c.done?t(l):Promise.resolve(l).then(r,o)}function q(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,a=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}return n}}(e,t)||function(e,t){if(e){if("string"==typeof e)return W(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)?W(e,t):void 0}}(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 W(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var G=null,Z=function(t){var n=t.extension,r=t.onExtsSync,a=q(N(n),2),c=a[0],l=a[1],s=q(function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},r=I((0,e.useState)(!1),2),a=r[0],i=r[1],c=I((0,e.useState)(!1),2),l=c[0],s=c[1],u=(0,e.useContext)(z),m=(u.Link,u.history),p=ctDashboardLocalizations.plugin_data.is_pro,d=function(){var e=T(regeneratorRuntime.mark((function e(){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(p||!t.config.pro){e.next=3;break}return s(!0),e.abrupt("return");case 3:return(r=new FormData).append("ext",t.name),r.append("action",t.__object?"blocksy_extension_deactivate":"blocksy_extension_activate"),i(!0),e.prev=7,e.next=10,fetch(ctDashboardLocalizations.ajax_url,{method:"POST",body:r});case 10:t.config.require_refresh&&location.reload(),n(),e.next=16;break;case 14:e.prev=14,e.t0=e.catch(7);case 16:i(!1);case 17:case"end":return e.stop()}}),e,null,[[7,14]])})));return function(){return e.apply(this,arguments)}}();return[a,d,!p&&t.config.pro?(0,e.createElement)(P,{items:l,className:"ct-onboarding-modal",onDismiss:function(){return s(!1)},render:function(){return(0,e.createElement)("div",{className:"ct-modal-content"},(0,e.createElement)("svg",{width:"55",height:"55",viewBox:"0 0 40.5 48.3"},(0,e.createElement)("path",{fill:"#2d82c8",d:"M33.4 29.4l7.1 12.3-7.4.6-4 6-7.3-12.9"}),(0,e.createElement)("path",{d:"M33.5 29.6L26 42.7l-4.2-7.3 11.6-6 .1.2zM0 41.7l7.5.6 3.9 6 7.2-12.4-11-7.3L0 41.7z",fill:"#2271b1"}),(0,e.createElement)("path",{d:"M39.5 18.7c0 1.6-2.4 2.8-2.7 4.3-.4 1.5 1 3.8.2 5.1-.8 1.3-3.4 1.2-4.5 2.3-1.1 1.1-1 3.7-2.3 4.5-1.3.8-3.6-.6-5.1-.2-1.5.4-2.7 2.7-4.3 2.7S18 35 16.5 34.7c-1.5-.4-3.8 1-5.1.2s-1.2-3.4-2.3-4.5-3.7-1-4.5-2.3.6-3.6.2-5.1-2.7-2.7-2.7-4.3 2.4-2.8 2.7-4.3c.4-1.5-1-3.8-.2-5.1C5.4 8 8.1 8.1 9.1 7c1.1-1.1 1-3.7 2.3-4.5s3.6.6 5.1.2C18 2.4 19.2 0 20.8 0c1.6 0 2.8 2.4 4.3 2.7 1.5.4 3.8-1 5.1-.2 1.3.8 1.2 3.4 2.3 4.5 1.1 1.1 3.7 1 4.5 2.3s-.6 3.6-.2 5.1c.3 1.5 2.7 2.7 2.7 4.3z",fill:"#599fd9"}),(0,e.createElement)("path",{d:"M23.6 7c-6.4-1.5-12.9 2.5-14.4 8.9-.7 3.1-.2 6.3 1.5 9.1 1.7 2.7 4.3 4.6 7.4 5.4.9.2 1.9.3 2.8.3 2.2 0 4.4-.6 6.3-1.8 2.7-1.7 4.6-4.3 5.4-7.5C34 15 30 8.5 23.6 7zm7 14c-.6 2.6-2.2 4.8-4.5 6.2-2.3 1.4-5 1.8-7.6 1.2-2.6-.6-4.8-2.2-6.2-4.5-1.4-2.3-1.8-5-1.2-7.6.6-2.6 2.2-4.8 4.5-6.2 1.6-1 3.4-1.5 5.2-1.5.8 0 1.5.1 2.3.3 5.4 1.3 8.7 6.7 7.5 12.1zm-8.2-4.5l3.7.5-2.7 2.7.7 3.7-3.4-1.8-3.3 1.8.6-3.7-2.7-2.7 3.8-.5 1.6-3.4 1.7 3.4z",fill:"#fff"})),(0,e.createElement)("h2",{className:"ct-modal-title"},"This is a Pro extension"),(0,e.createElement)("p",null,(0,o.__)("Upgrade to the Pro version and get instant access to all premium extensions, features and future updates.","blocksy-companion")),(0,e.createElement)("div",{className:"ct-modal-actions has-divider","data-buttons":"2"},(0,e.createElement)("a",{onClick:function(e){e.preventDefault(),s(!1),setTimeout((function(){m.navigate("/pro")}),300)},className:"button"},(0,o.__)("Free vs Pro","blocksy")),(0,e.createElement)("a",{href:"https://creativethemes.com/blocksy/pricing/",target:"_blank",className:"button button-primary"},(0,o.__)("Upgrade Now","blocksy-companion"))))}}):null]}(n,(function(){r()})),3),u=s[0],m=s[1],p=s[2];return(0,e.createElement)("li",{className:i()({active:!!n.__object})},(0,e.createElement)("h4",{className:"ct-extension-title"},n.config.name,u&&(0,e.createElement)("svg",{width:"15",height:"15",viewBox:"0 0 100 100"},(0,e.createElement)("g",{transform:"translate(50,50)"},(0,e.createElement)("g",{transform:"scale(1)"},(0,e.createElement)("circle",{cx:"0",cy:"0",r:"50",fill:"#687c93"}),(0,e.createElement)("circle",{cx:"0",cy:"-26",r:"12",fill:"#ffffff",transform:"rotate(161.634)"},(0,e.createElement)("animateTransform",{attributeName:"transform",type:"rotate",calcMode:"linear",values:"0 0 0;360 0 0",keyTimes:"0;1",dur:"1s",begin:"0s",repeatCount:"indefinite"})))))),n.config.description&&(0,e.createElement)("div",{className:"ct-extension-description"},n.config.description),(0,e.createElement)("div",{className:"ct-extension-actions"},(0,e.createElement)("button",{className:i()(n.__object?"ct-button":"ct-button-primary"),"data-hover":"white",disabled:u,onClick:function(){m()}},n.__object?(0,o.__)("Deactivate","blocksy-companion"):(0,o.__)("Activate","blocksy-companion")),n.readme&&(0,e.createElement)("button",{onClick:function(){return c()},className:"ct-minimal-button ct-instruction"},(0,e.createElement)("svg",{width:"16",height:"16",viewBox:"0 0 24 24"},(0,e.createElement)("path",{d:"M12,2C6.477,2,2,6.477,2,12s4.477,10,10,10s10-4.477,10-10S17.523,2,12,2z M12,17L12,17c-0.552,0-1-0.448-1-1v-4 c0-0.552,0.448-1,1-1h0c0.552,0,1,0.448,1,1v4C13,16.552,12.552,17,12,17z M12.5,9h-1C11.224,9,11,8.776,11,8.5v-1 C11,7.224,11.224,7,11.5,7h1C12.776,7,13,7.224,13,7.5v1C13,8.776,12.776,9,12.5,9z"}))),n.__object&&n.config&&n.config.buttons&&n.config.buttons.map((function(t,n){var r=t.text,o=t.url;return(0,e.createElement)("a",{href:o,className:"ct-button ct-config-btn",dataButton:"white"},r)}))),l,p)},$=function(){var t=q((0,e.useState)(!G),2),n=t[0],a=t[1],c=q((0,e.useState)(G||[]),2),l=c[0],s=c[1],u=q((0,e.useState)(!1),2),m=u[0],p=u[1],d=q((0,e.useState)("free"),2),f=d[0],h=d[1],y=function(){var e,t=(e=regeneratorRuntime.mark((function e(){var t,n,r,o,i,c,l,u,m,d=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=d.length>0&&void 0!==d[0]?d[0]:{},n=U({verbose:!1,extension:null,extAction:null},t),r=n.verbose,o=n.extension,i=n.extAction,r&&a(!0),p(!0),e.next=6,fetch("".concat(wp.ajax.settings.url,"?action=blocksy_extensions_status"),U({method:"POST"},o&&i?{body:JSON.stringify({extension:o,extAction:i})}:{}));case 6:if(200===(c=e.sent).status){e.next=9;break}return e.abrupt("return");case 9:return e.next=11,c.json();case 11:if(l=e.sent,u=l.success,m=l.data,u){e.next=16;break}return e.abrupt("return");case 16:if(p(!1),a(!1),s(m),G=m,!o){e.next=22;break}return e.abrupt("return",m[o]);case 22:return e.abrupt("return",m);case 23:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){H(a,r,o,i,c,"next",e)}function c(e){H(a,r,o,i,c,"throw",e)}i(void 0)}))});return function(){return t.apply(this,arguments)}}();(0,e.useEffect)((function(){y({verbose:!G});var e=function(){y()};return r().on("blocksy_exts_sync_exts",e),function(){r().off("blocksy_exts_sync_exts",e)}}),[]);var b=(0,e.useMemo)((function(){return Object.values(l).map((function(e,t){return U(U({},e),{},{name:Object.keys(l)[t]})})).find((function(e){return e.config.pro}))}),[l]),v=(0,e.useMemo)((function(){return Object.values(l).map((function(e,t){return U(U({},e),{},{name:Object.keys(l)[t]})})).filter((function(e){return!e.config.hidden})).filter((function(e){var t=e.config;return"free"===f?!t.pro:t.pro}))}),[f,l]);return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"ct-extensions-container"},(0,e.createElement)(j.Transition,{items:n,from:{opacity:0},enter:[{opacity:1}],leave:[{opacity:0}],initial:null,config:function(e,t){return"leave"===t?{duration:300}:{delay:300,duration:300}}},(function(t){return t?function(t){return(0,e.createElement)(j.animated.p,{style:t,className:"ct-loading-text"},(0,e.createElement)("span",null),(0,o.__)("Loading Extensions Status...","blocksy-companion"))}:function(t){return(0,e.createElement)(j.animated.div,{style:t},(0,e.createElement)(e.Fragment,null,b&&(0,e.createElement)("ul",{className:"ct-extensions-sourse"},["free","pro"].map((function(t){return(0,e.createElement)("li",{key:t,onClick:function(){return h(t)},className:i()({active:t===f})},{free:(0,o.__)("Free Extensions","blocksy-companion"),pro:(0,o.__)("Pro Extensions","blocksy-companion")}[t])}))),(0,e.createElement)("ul",{className:i()("ct-extensions-list",{"is-pro":"pro"===f})},v.map((function(t){var n={extension:Z};return r().trigger("ct:extensions:card",{CustomComponent:n,extension:t}),(0,e.createElement)(n.extension,{key:t.name,extension:t,extsSyncLoading:m,onExtsSync:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.extAction||(l[t.name].__object=!l[t.name].__object,s(l)),y(U(U({},e),{},{extension:t.name}))}})}))),(0,e.createElement)(R,null)))}}))))},K=function(t){var n=t.children,r=t.activated,o=t.checked,a=t.onChange;return(0,e.createElement)("div",{onClick:function(){return a()},className:i()("ct-checkbox-container",{activated:r})},n,(0,e.createElement)("span",{className:i()("ct-checkbox",{active:o})},(0,e.createElement)("svg",{width:"10",height:"8",viewBox:"0 0 11.2 9.1"},(0,e.createElement)("polyline",{class:"check",points:"1.2,4.8 4.4,7.9 9.9,1.2 "}))))};function J(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?J(Object(n),!0).forEach((function(t){X(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):J(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function X(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Q(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 ee=function(e){return{"stackable-ultimate-gutenberg-blocks":"Stackable – Gutenberg Blocks","wpforms-lite":"WPForms - Contact Form",woocommerce:"WooCommerce",elementor:"Elementor",brizy:"Brizy",getwid:"Getwid","simply-gallery-block":"SimpLy Gallery Block & Lightbox","recipe-card-blocks-by-wpzoom":"Recipe Card Blocks by WPZOOM","map-block-gutenberg":"Map Block for Google Maps","mb-custom-post-type":"MB Custom Post Types & Custom Taxonomies",leadin:"HubSpot","block-slider":"Block Slider"}},te=function(e){return(ee[e]||e).replace(/\b\w/,(function(e){return e.toUpperCase()}))},ne=function(t){var n,r,a=t.demoConfiguration,i=t.setDemoConfiguration,c=t.style,l=(0,e.useContext)(qe),s=l.currentDemo,u=l.demos_list,m=l.pluginsStatus,p=(l.setCurrentDemo,n=(s||"").split(":"),r=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,a=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}return n}}(n,r)||function(e,t){if(e){if("string"==typeof e)return Q(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)?Q(e,t):void 0}}(n,r)||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.")}()),d=p[0];return p[1],u.filter((function(e){return e.name===d||""})),(0,e.createElement)("div",{style:c},(0,e.createElement)("div",{className:"ct-demo-plugins"},(0,e.createElement)("i",{className:"ct-demo-icon"},(0,e.createElement)("svg",{width:"40",height:"40",viewBox:"0 0 40 40"},(0,e.createElement)("path",{fill:"#0C7AB3",d:"M20,0v7.6c0,0.3-0.2,0.5-0.5,0.5h-1.5c0,0,0,0,0,0c0,0,0,0-0.1,0c0,0,0,0-0.1,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c-0.5-0.7-1.3-1.1-2.1-1.1c-1.5,0-2.6,1.2-2.6,2.6c0,1.5,1.2,2.6,2.6,2.6c0.8,0,1.6-0.4,2.1-1.1c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0.1,0c0,0,0,0,0.1,0c0,0,0,0,0,0h1.5c0,0,0,0,0,0c0.3,0,0.5,0.2,0.5,0.5V20h8.1v-0.8c-0.8-0.7-1.3-1.7-1.3-2.8c0-2,1.7-3.7,3.7-3.7c2,0,3.7,1.7,3.7,3.7c0,1.1-0.5,2.1-1.3,2.8V20H40C40,9,31,0,20,0z"}),(0,e.createElement)("path",{fill:"#3497D3",d:"M20,40v-7.6c0-0.3,0.2-0.5,0.5-0.5h1.5c0,0,0,0,0,0c0,0,0,0,0.1,0c0,0,0,0,0.1,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0.5,0.7,1.3,1.1,2.1,1.1c1.5,0,2.6-1.2,2.6-2.6c0-1.5-1.2-2.6-2.6-2.6c-0.8,0-1.6,0.4-2.1,1.1c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0-0.1,0c0,0,0,0-0.1,0c0,0,0,0,0,0h-1.5c0,0,0,0,0,0c-0.3,0-0.5-0.2-0.5-0.5V20h-8.1v0.8c0.8,0.7,1.3,1.7,1.3,2.8c0,2-1.7,3.7-3.7,3.7c-2,0-3.7-1.7-3.7-3.7c0-1.1,0.5-2.1,1.3-2.8V20H0C0,31,9,40,20,40z"}))),(0,e.createElement)("h2",null,(0,o.__)("Install & Activate Plugins","blocksy-companion")),(0,e.createElement)("p",null,(0,o.__)("The following plugins are required for this starter site in order to work properly.","blocksy-companion")),a.plugins.map((function(t){var n=t.plugin,r=t.enabled;return(0,e.createElement)(e.Fragment,{key:n},!m[n]&&(0,e.createElement)(K,{key:n,checked:r,onChange:function(){return i(Y(Y({},a),{},{plugins:a.plugins.map((function(e){return e.plugin===n?Y(Y({},e),{},{enabled:!r}):e}))}))}},te(n)),m[n]&&(0,e.createElement)(K,{activated:!0,checked:!0,onChange:function(){}},te(n)))}))))},re=function(){var t=(0,e.useContext)(qe),n=t.currentlyInstalledDemo,r=t.demos_list,a=t.setCurrentDemo,c=t.demo_error,l=t.setInstallerBlockingReleased;return(0,e.useContext)(z).Link,(0,e.createElement)("ul",null,r.filter((function(e,t){return r.map((function(e){return e.name})).indexOf(e.name)===t})).map((function(t){return(0,e.createElement)("li",{key:t.name,className:i()("ct-single-demo",{"ct-is-pro":t.is_pro})},(0,e.createElement)("figure",null,(0,e.createElement)("img",{src:t.screenshot}),(0,e.createElement)("section",null,(0,e.createElement)("h3",null,(0,o.__)("Available for","blocksy-companion")),(0,e.createElement)("div",null,r.filter((function(e){return e.name===t.name||""})).sort((function(e,t){return e.builder<t.builder?-1:e.builder>t.builder?1:0})).map((function(t){var n=t.builder;return(0,e.createElement)("span",{key:n},te(n)||"Gutenberg")})))),t.is_pro&&(0,e.createElement)("a",{onClick:function(e){return e.preventDefault()},href:"#"},"PRO")),(0,e.createElement)("div",{className:"ct-demo-actions"},(0,e.createElement)("h4",null,t.name),(0,e.createElement)("div",null,(0,e.createElement)("a",{className:"ct-button",target:"_blank",href:t.url},(0,o.__)("Preview","blocksy-companion")),(0,e.createElement)("button",{className:"ct-button-primary",onClick:function(){l(!1),a(t.name)},disabled:!!c},n&&n.demo.indexOf(t.name)>-1?(0,o.__)("Modify","blocksy-companion"):(0,o.__)("Import","blocksy-companion")))))})))};function oe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,a=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}return n}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ae(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)?ae(e,t):void 0}}(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 ae(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 ie=function(t){var n=t.style,r=t.nextStep,a=((0,e.useContext)(z).is_child_theme,(0,e.useContext)(qe)),i=a.setCurrentlyInstalledDemo,c=a.setCurrentDemo,l=a.currentDemo,s=a.demos_list,u=oe((0,e.useState)(0),2),m=u[0],p=u[1],d=oe((0,e.useState)("idle"),2),f=d[0],h=d[1],y=oe((l||"").split(":"),2),b=y[0],v=(y[1],s.filter((function(e){return e.name===b}))),g={erase_content:{title:(0,o.__)("Erase content","blocksy-companion"),query_string:"action=blocksy_demo_erase_content&wp_customize=on"},deactivate_demo_plugins:{title:(0,o.__)("Deactivate demo plugins","blocksy-companion"),query_string:"action=blocksy_demo_deactivate_plugins&plugins=".concat(v[0].plugins.join(":"))},deregister_current_demo:{title:(0,o.__)("Erase content","blocksy-companion"),query_string:"action=blocksy_demo_deregister_current_demo"}},_=["erase_content","deactivate_demo_plugins","deregister_current_demo"],E=_[m],w=function(){var e=g[E],t=new EventSource("".concat(ctDashboardLocalizations.ajax_url,"?").concat(e.query_string));t.onmessage=function(e){if("complete"===JSON.parse(e.data).action){if(t&&t.close&&t.close(),m===_.length-1)return void h("done");p(Math.min(_.length-1,m+1))}}};return(0,e.useEffect)((function(){0!==m&&"done"!==f&&w()}),[E]),(0,e.createElement)("div",{className:"ct-modify-demo",style:n},(0,e.createElement)("i",{className:"ct-demo-icon"},(0,e.createElement)("svg",{width:"36",height:"36",viewBox:"0 0 40 40"},(0,e.createElement)("path",{d:"M5.71,40a1,1,0,0,1-1-1V21.59a1,1,0,0,1,1.91,0V39.05A1,1,0,0,1,5.71,40Zm1-31.83V1.07A1,1,0,0,0,5.71,0a1,1,0,0,0-1,1.07v7.1a1,1,0,0,0,1,1.07A1,1,0,0,0,6.67,8.17ZM21,39.05V34.29a1,1,0,1,0-1.9,0v4.76a1,1,0,1,0,1.9,0Zm0-18.14V1a1,1,0,1,0-1.9,0V20.91a1,1,0,1,0,1.9,0ZM35.24,39.05V26.35a1,1,0,0,0-1.91,0v12.7a1,1,0,0,0,1.91,0Zm0-26.25V1a1,1,0,1,0-1.91,0V12.8a1,1,0,1,0,1.91,0Z",transform:"translate(-0.71)",fill:"#dae3e8"}),(0,e.createElement)("path",{d:"M5.71,18.06a5,5,0,1,1,5-5A5,5,0,0,1,5.71,18.06ZM20,30.76a5,5,0,1,1,5-5A5,5,0,0,1,20,30.76Zm14.29-7.93a5,5,0,1,1,5-5A5,5,0,0,1,34.29,22.83Z",transform:"translate(-0.71)",fill:"#0c7ab3"}))),"idle"===f&&(0,e.createElement)("h2",null,(0,o.__)("This starter site is already installed","blocksy-companion")),"loading"===f&&(0,e.createElement)("h2",null,"Removing starter site..."),"done"===f&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",null,(0,o.__)("Starter Site Removed","blocksy-companion")),(0,e.createElement)("div",{className:"ct-modify-actions"},(0,e.createElement)("button",{className:"ct-demo-btn ct-dismiss",onClick:function(e){e.preventDefault(),c("".concat(b,":hide"))}},(0,o.__)("Dismiss","blocksy-companion")))),"idle"===f&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)("p",null,(0,o.__)("What steps do you want to perform next?","blocksy-companion")),(0,e.createElement)("div",{className:"ct-modify-actions"},(0,e.createElement)("button",{className:"ct-demo-btn demo-remove",onClick:function(e){h("loading"),e.preventDefault(),w(),i()}},(0,o.__)("Remove","blocksy-companion")),(0,e.createElement)("button",{className:"ct-demo-btn",onClick:function(e){e.preventDefault(),r()}},(0,o.__)("Reinstall","blocksy-companion")))))};function ce(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function le(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ce(Object(n),!0).forEach((function(t){se(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ce(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function se(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ue=function(t){var n=t.demoConfiguration,r=t.setDemoConfiguration,a=t.style,i=(0,e.useContext)(z),c=i.is_child_theme,l=i.child_theme_exists;return(0,e.createElement)("div",{className:"ct-demo-child",style:a},(0,e.createElement)("i",{className:"ct-demo-icon"},(0,e.createElement)("svg",{width:"40",height:"40",viewBox:"0 0 43 41.1"},(0,e.createElement)("path",{fill:"#DBE7EE",d:"M0,39.5c0,0.9,0.7,1.6,1.5,1.6h32.3c0.9,0,1.5-0.7,1.5-1.6V14H0V39.5z"}),(0,e.createElement)("path",{fill:"#BDC8D7",d:"M18.2,41.1h15.6c0.9,0,1.5-0.7,1.5-1.6V14H7.6L8,32.4L18.2,41.1z"}),(0,e.createElement)("path",{fill:"#BDC8D7",d:"M0,15.6V9.8c0-0.9,0.7-1.6,1.5-1.6h32.3c0.9,0,1.5,0.7,1.5,1.6v5.8H0z"}),(0,e.createElement)("path",{fill:"#3497D3",d:"M7.6,31.3c0,0.9,0.7,1.6,1.5,1.6h32.4c0.9,0,1.5-0.7,1.5-1.6V5.8H7.6V31.3z"}),(0,e.createElement)("path",{fill:"#0C7AB3",d:"M7.6,7.4V1.6C7.6,0.7,8.3,0,9.1,0h32.4C42.4,0,43,0.7,43,1.6v5.8H7.6z"}),(0,e.createElement)("rect",{x:"11.2",y:"11",fill:"#44ACDF",width:"16.8",height:"17.9"}),(0,e.createElement)("rect",{x:"31.5",y:"11",fill:"#44ACDF",width:"7.9",height:"17.9"}))),l?(0,e.createElement)("h2",null,(0,o.__)("Activate Child Theme","blocksy-companion")):(0,e.createElement)("h2",null,(0,o.__)("Install Child Theme","blocksy-companion")),!c&&(0,e.createElement)(e.Fragment,null,l?(0,e.createElement)("p",null,(0,o.__)("We strongly recommend to activate the child theme, this way you will have freedom to make changes without breaking the parent theme.","blocksy-companion")):(0,e.createElement)("p",null,(0,o.__)("We strongly recommend to install the child theme, this way you will have freedom to make changes without breaking the parent theme.","blocksy-companion")),(0,e.createElement)(K,{checked:n.child_theme,onChange:function(){return r(le(le({},n),{},{child_theme:!n.child_theme}))}},l?(0,o.__)("Activate Child Theme","blocksy-companion"):(0,o.__)("Install Child Theme","blocksy-companion"))),c&&(0,o.__)("You already have a child theme properly installed and activated. Move on.","blocksy-companion"),(0,e.createElement)("a",{href:"https://developer.wordpress.org/themes/advanced-topics/child-themes/",target:"_blank"},(0,o.__)("Learn more about child themes","blocksy-companion")))};function me(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function pe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?me(Object(n),!0).forEach((function(t){de(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):me(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function de(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fe(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 he=function(t){var n,r,a=t.demoConfiguration,c=t.setDemoConfiguration,l=t.style,s=(0,e.useContext)(qe),u=s.currentDemo,m=s.demos_list,p=(s.pluginsStatus,s.setCurrentDemo,n=(u||"").split(":"),r=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,a=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}return n}}(n,r)||function(e,t){if(e){if("string"==typeof e)return fe(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)?fe(e,t):void 0}}(n,r)||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.")}()),d=p[0],f=(p[1],m.filter((function(e){return e.name===d||""})));return(0,e.createElement)("div",{style:l},f.length>1&&(0,e.createElement)("div",{className:"ct-demo-builder"},(0,e.createElement)("i",{className:"ct-demo-icon"},(0,e.createElement)("svg",{width:"52",height:"40",viewBox:"0 0 52 40"},(0,e.createElement)("path",{fill:"#DBE7EE",d:"M0,38.1C0,39.1,0.9,40,1.8,40h39.3c1.1,0,1.8-0.9,1.8-1.9v-31H0V38.1z"}),(0,e.createElement)("path",{fill:"#CFDBE4",d:"M13.8,14.6v18.8h22.6V14.6H13.8zM34.8,31.9H15.4V16.1h19.4V31.9z"}),(0,e.createElement)("path",{fill:"#BDC8D7",d:"M13.1,15.3L13.1,15.3c0-0.8,0.6-1.4,1.4-1.4l0,0c0.8,0,1.4,0.6,1.4,1.4l0,0c0,0.8-0.6,1.4-1.4,1.4l0,0C13.7,16.8,13.1,16.1,13.1,15.3z M34.1,15.3L34.1,15.3c0-0.8,0.6-1.4,1.4-1.4l0,0c0.8,0,1.4,0.6,1.4,1.4l0,0c0,0.8-0.6,1.4-1.4,1.4l0,0C34.8,16.8,34.1,16.1,34.1,15.3z M13.1,32.7L13.1,32.7c0-0.8,0.6-1.4,1.4-1.4l0,0c0.8,0,1.4,0.6,1.4,1.4l0,0c0,0.8-0.6,1.4-1.4,1.4l0,0C13.7,34.1,13.1,33.5,13.1,32.7z M34.1,32.7L34.1,32.7c0-0.8,0.6-1.4,1.4-1.4l0,0c0.8,0,1.4,0.6,1.4,1.4l0,0c0,0.8-0.6,1.4-1.4,1.4l0,0C34.8,34.1,34.1,33.5,34.1,32.7z M23.3,15.3L23.3,15.3c0-0.8,0.6-1.4,1.4-1.4l0,0c0.8,0,1.4,0.6,1.4,1.4l0,0c0,0.8-0.6,1.4-1.4,1.4l0,0C24,16.8,23.3,16.1,23.3,15.3z M4.2,13.9h5.9v7.9H4.2V13.9zM4.2,23.3h5.9v2.9H4.2V23.3zM0,9V1.9C0,0.9,0.9,0,1.8,0h39.3c1.1,0,1.8,0.9,1.8,1.9V9H0z M42.9,35.4V10.9h-9.3v15.2L42.9,35.4zM7.2,27.6c-1.6,0-3,1.3-3,3c0,1.6,1.3,3,3,3s3-1.3,3-3C10.2,28.9,8.8,27.6,7.2,27.6z"}),(0,e.createElement)("path",{fill:"#0C7AB3",d:"M50,27.8H35.6c-1.1,0-2-0.9-2-2v-18c0-1.1,0.9-2,2-2H50c1.1,0,2,0.9,2,2v18C52,26.9,51.1,27.8,50,27.8z"}),(0,e.createElement)("path",{fill:"#44ACDF",d:"M49,17.5H36.8c-0.7,0-1.2-0.5-1.2-1.2V9.1c0-0.7,0.5-1.2,1.2-1.2H49c0.7,0,1.2,0.5,1.2,1.2v7.3C50.2,17,49.6,17.5,49,17.5z M50.2,20.4v-0.1c0-0.5-0.4-1-1-1H36.5c-0.5,0-1,0.4-1,1v0.1c0,0.5,0.4,1,1,1h12.7C49.7,21.4,50.2,20.9,50.2,20.4z M40.8,25.2h-4.3c-0.5,0-1-0.4-1-1v-0.1c0-0.5,0.4-1,1-1h4.3c0.5,0,1,0.4,1,1v0.1C41.7,24.8,41.3,25.2,40.8,25.2z M49.2,25.2h-4.3c-0.5,0-1-0.4-1-1v-0.1c0-0.5,0.4-1,1-1h4.3c0.5,0,1,0.4,1,1v0.1C50.2,24.8,49.7,25.2,49.2,25.2z"}),(0,e.createElement)("path",{fill:"#C8E6F4",d:"M47.4,11.2h-9.1c-0.2,0-0.5-0.2-0.5-0.4v0c0-0.2,0.2-0.4,0.5-0.4h9.1c0.2,0,0.5,0.2,0.5,0.4v0C47.8,11,47.6,11.2,47.4,11.2z M47.9,14.7L47.9,14.7c0-0.2-0.2-0.5-0.5-0.5h-9.1c-0.2,0-0.4,0.2-0.4,0.4v0c0,0.2,0.2,0.4,0.4,0.4h9.1C47.7,15.1,47.9,14.9,47.9,14.7z"}),(0,e.createElement)("path",{fill:"#FFFFFF",d:"M26.3,20.8h-2.9l-2.9,7.9H23l0.3-0.7h2.8l0.3,0.7h2.7L26.3,20.8z M23.9,25.8l0.8-2.2h0l0.8,2.2H23.9zM46.5,10.7c0,0.8-0.7,1.5-1.5,1.5s-1.5-0.7-1.5-1.5c0-0.8,0.7-1.5,1.5-1.5S46.5,9.9,46.5,10.7zM42.1,14.7c0,0.8-0.7,1.5-1.5,1.5s-1.5-0.7-1.5-1.5s0.7-1.5,1.5-1.5S42.1,13.9,42.1,14.7z"}))),(0,e.createElement)("h2",null,(0,o.__)("Choose Page Builder","blocksy-companion")),(0,e.createElement)("p",null,(0,o.__)("This starter site can be imported and used with one of these page builders. Please select your prefered one in order to continue.","blocksy-companion")),(0,e.createElement)("ul",{"data-count":f.length},f.sort((function(e,t){return e.builder<t.builder?-1:e.builder>t.builder?1:0})).map((function(t){var n=t.builder,r=t.plugins;return(0,e.createElement)("li",{className:i()({active:n===(null===a.builder?f[0].builder:a.builder)}),onClick:function(){return c(pe(pe({},a),{},{builder:n,plugins:r.map((function(e){return{plugin:e,enabled:!0}}))}))}},(0,e.createElement)("figure",null,(0,e.createElement)("span",{className:i()("ct-checkbox",{active:n===(null===a.builder?f[0].builder:a.builder)})},(0,e.createElement)("svg",{width:"10",height:"8",viewBox:"0 0 11.2 9.1"},(0,e.createElement)("polyline",{className:"check",points:"1.2,4.8 4.4,7.9 9.9,1.2 "}))),""===n&&(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 150 100"},(0,e.createElement)("path",{d:"M122.5 35.5c-1.7-1.1-4-.7-5.1 1C110.8 46.4 96.8 47 96 47h-.3c-17.4 0-24 14.8-24.3 15.4-.8 1.9.1 4 1.9 4.8.5.2 1 .3 1.5.3 1.4 0 2.7-.8 3.4-2.2.1-.1 4.6-10.3 16.3-11v19c-.5 4.1-2.4 7.3-5.8 9.7-3.6 2.5-8.3 3.8-14.1 3.8-7 0-12.7-2.4-16.9-7.2-4.3-4.8-6.4-11.5-6.4-20.2l.1-20.9c.3-7.7 2.4-13.8 6.4-18.2 4.3-4.8 9.9-7.2 16.9-7.2 5.8 0 10.6 1.3 14.1 3.8 3.6 2.5 5.6 5.9 5.9 10.3v.5c0 2.5 2.1 4.6 4.6 4.6 2.5 0 4.6-2.1 4.6-4.6v-.5c-.7-6.6-3.7-11.9-9.1-15.8-5.4-4-12.2-5.9-20.4-5.9-9.7 0-17.6 3.2-23.5 9.6-5.6 6-8.6 13.8-8.9 23.5 0 .7-.1 1.3-.1 2l.1 18.8h-.1c0 10.7 3 19.2 9 25.5 6 6.4 13.8 9.6 23.5 9.6 8.2 0 14.9-1.9 20.4-5.9 5-3.6 7.9-8.4 8.9-14.3l.2-21c6.1-1.5 14.4-4.8 19.6-12.7 1.3-1.7.8-4-1-5.1z"})),"brizy"===n&&(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 150 100"},(0,e.createElement)("path",{d:"M14.6 36.7L75 0l60.4 36.7L75 73.4 14.6 36.7zm21.7.9L75 61.2l38.8-23.6L75 14 36.3 37.6z",fill:"#181c25"}),(0,e.createElement)("path",{fill:"#a7b2dd",d:"M14.6 63.2l10.8-6.5L75 86.8l49.9-30 10.5 6.4L75 100z"})),"elementor"===n&&(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 150 100"},(0,e.createElement)("path",{d:"M32.5 7.6h17v84.9h-17V7.6zm34 84.9h51v-17h-51v17zm0-34h51v-17h-51v17zm0-51v17h51v-17h-51z"}))),(0,e.createElement)("div",{className:"builder-name"},te(n)||"Gutenberg"))})))))};function ye(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function be(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ye(Object(n),!0).forEach((function(t){ve(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ye(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ve(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ge=function(t){var n=t.demoConfiguration,r=t.setDemoConfiguration,a=(t.currentDemo,t.style);return(0,e.createElement)("div",{style:a},(0,e.createElement)("i",{className:"ct-demo-icon"},(0,e.createElement)("svg",{width:"40",height:"40",viewBox:"0 0 40 40"},(0,e.createElement)("path",{d:"M25,22.67a5,5,0,0,1-10,0H0V36a3.33,3.33,0,0,0,3.33,3.33H36.67A3.33,3.33,0,0,0,40,36V22.67Z",transform:"translate(0 -0.67)",fill:"#bdc8d7"}),(0,e.createElement)("rect",{x:"2.5",y:"14",width:"35",height:"3",rx:"1.5",fill:"#0c7ab3"}),(0,e.createElement)("rect",{x:"5",y:"7",width:"30",height:"3",rx:"1.5",fill:"#3497d3"}),(0,e.createElement)("rect",{x:"7.5",width:"25",height:"3",rx:"1.5",fill:"#44acdf"}))),(0,e.createElement)("h2",null,(0,o.__)("Import Content","blocksy-companion")),(0,e.createElement)("p",null,(0,o.__)("This will import posts, pages, comments, navigation menus, custom fields, terms and custom posts","blocksy-companion")),["options","widgets","content"].map((function(t){return(0,e.createElement)(K,{checked:n.content[t],onChange:function(){return r(be(be({},n),{},{content:be(be({},n.content),{},ve({},t,!n.content[t]))}))},key:t},t.split("_").map((function(e){return e.replace(/^\w/,(function(e){return e.toUpperCase()}))})).join(" "))})),(0,e.createElement)("div",{className:"ct-demo-erase"},(0,e.createElement)(K,{checked:n.content.erase_content,onChange:function(){return r(be(be({},n),{},{content:be(be({},n.content),{},{erase_content:!n.content.erase_content})}))}},(0,e.createElement)("div",null,(0,o.__)("Clean Install","blocksy-companion"),(0,e.createElement)("i",null,(0,o.__)("This option will remove the previous imported content and will perform a fresh and clean install.","blocksy-companion"))))))},_e=function(){var t=(0,e.useContext)(z),n=t.home_url,r=t.customizer_url;return(0,e.createElement)("div",{className:"ct-install-success"},(0,e.createElement)("h2",null,(0,o.__)("Starter Site Imported Successfully","blocksy-companion")),(0,e.createElement)("p",null,(0,o.__)("Now you can view your website or start customizing it","blocksy-companion")),(0,e.createElement)("div",null,(0,e.createElement)("a",{href:r,className:"ct-button"},(0,o.__)("Customize","blocksy-companion")),(0,e.createElement)("a",{href:n,target:"_blank",className:"ct-button-primary"},(0,o.__)("View site","blocksy-companion"))))},Ee=function(e,t){var n=e.action;if("complete"===n)return"";if("import_install_child"===n)return(0,o.__)("copying child theme sources","blocksy-companion");if("import_activate_child"===n)return(0,o.__)("activating child theme","blocksy-companion");if("install_plugin"===n)return(0,o.sprintf)((0,o.__)("installing plugin %s","blocksy-companion"),te(e.name)||e.name);if("activate_plugin"===n)return(0,o.sprintf)((0,o.__)("activating plugin %s","blocksy-companion"),te(e.name)||e.name);if("download_demo_widgets"===n)return(0,o.__)("downloading demo widgets","blocksy-companion");if("apply_demo_widgets"===n)return(0,o.__)("installing demo widgets","blocksy-companion");if("download_demo_options"===n)return(0,o.__)("downloading demo options","blocksy-companion");if("import_mods_images"===n)return(0,o.__)("importing images from customizer","blocksy-companion");if("import_customizer_options"===n)return(0,o.__)("import customizer options","blocksy-companion");if("activate_required_extensions"===n)return(0,o.__)("activating required extensions","blocksy-companion");if("erase_previous_posts"===n)return(0,o.__)("removing previously installed posts","blocksy-companion");if("erase_previous_terms"===n)return(0,o.__)("removing previously installed taxonomies","blocksy-companion");if("erase_default_pages"===n)return(0,o.__)("removing default WordPress pages","blocksy-companion");if("erase_customizer_settings"===n)return(0,o.__)("resetting customizer options","blocksy-companion");if("erase_widgets_data"===n)return(0,o.__)("resetting widgets","blocksy-companion");if("content_installer_progress"===n){if(!e.kind)return"";var r=t.content.preliminary_data["".concat(e.kind,"_count")],a=t.content["".concat(e.kind,"_count")];return"".concat(Math.min(a,r)," of ").concat(r," ").concat({users:(0,o.__)("users","blocksy-companion"),term:(0,o.__)("terms","blocksy-companion"),media:(0,o.__)("images","blocksy-companion"),post:(0,o.__)("posts","blocksy-companion"),comment:(0,o.__)("comments","blocksy-companion")}[e.kind])}return""};function we(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ke(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?we(Object(n),!0).forEach((function(t){Oe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):we(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Oe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,a=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}return n}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Se(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)?Se(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Se(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Ce=function(e){e.preventDefault(),e.returnValue=""},je=function(e){var t=e.demoConfiguration,n=e.pluginsStatus,r=e.is_child_theme,o=e.includeMetaSteps,a=[];return void 0!==o&&o&&a.push("register_current_demo"),t.child_theme&&(r||a.push("child_theme")),t.plugins.filter((function(e){var t=e.enabled,r=e.plugin;return!!t&&!n[r]})).length>0&&a.push("plugins"),t.content.erase_content&&a.push("erase_content"),t.content.options&&a.push("options"),t.content.widgets&&a.push("widgets"),t.content.content&&a.push("content"),a.push("install_finish"),a},De=function(t){var n=t.demoConfiguration,r=t.style,a=function(t){var n=(0,e.useContext)(qe),r=n.demos_list,a=n.currentDemo,i=(n.setCurrentDemo,n.setInstallerBlockingReleased),c=n.setCurrentlyInstalledDemo,l=n.pluginsStatus,s=(0,e.useContext)(z),u=(s.home_url,s.customizer_url,s.is_child_theme),m=(s.Link,xe((0,e.useState)(!1),2)),p=m[0],d=m[1],f=xe((0,e.useState)(0),2),h=f[0],y=f[1],b=xe((a||"").split(":"),2),v=b[0],g=(b[1],r.filter((function(e){return e.name===v})).sort((function(e,t){return e.builder<t.builder?-1:e.builder>t.builder?1:0}))),_=t.plugins.filter((function(e){var t=e.enabled,n=e.plugin;return t&&!l[n]})).map((function(e){return e.plugin})),E=xe((0,e.useState)({register_current_demo:{title:(0,o.__)("Register demo","blocksy-companion"),query_string:"action=blocksy_demo_register_current_demo&wp_customize=on&demo_name=".concat(a,":").concat(null===t.builder?g[0].builder:t.builder),expected_signals:1},child_theme:{title:(0,o.__)("Child theme","blocksy-companion"),query_string:"action=blocksy_demo_install_child_theme",expected_signals:3},plugins:{title:(0,o.__)("Required plugins","blocksy-companion"),query_string:"action=blocksy_demo_activate_plugins&plugins=".concat(_.join(":")),expected_signals:2*_.length+1},fake_step:{title:(0,o.__)("Fake Required plugins","blocksy-companion"),query_string:"action=blocksy_demo_fake_step",expected_signals:6},erase_content:{title:(0,o.__)("Erase content","blocksy-companion"),query_string:"action=blocksy_demo_erase_content&wp_customize=on",expected_signals:6},install_finish:{title:(0,o.__)("Final touches","blocksy-companion"),query_string:"action=blocksy_demo_install_finish&wp_customize=on",expected_signals:1},options:{title:(0,o.__)("Import options","blocksy-companion"),query_string:"action=blocksy_demo_install_options&wp_customize=on&demo_name=".concat(a,":").concat(null===t.builder?g[0].builder:t.builder),expected_signals:5},widgets:{title:(0,o.__)("Import widgets","blocksy-companion"),query_string:"action=blocksy_demo_install_widgets&wp_customize=on&demo_name=".concat(a,":").concat(null===t.builder?g[0].builder:t.builder),expected_signals:3},content:{title:(0,o.__)("Import content","blocksy-companion"),query_string:"action=blocksy_demo_install_content&wp_customize=on&demo_name=".concat(a,":").concat(null===t.builder?g[0].builder:t.builder),expected_signals:50}}),2),w=E[0],k=E[1],O=je({demoConfiguration:t,pluginsStatus:l,is_child_theme:u,includeMetaSteps:!0}),x=O[h],S=xe((0,e.useState)(0),2),C=S[0],j=S[1],D=xe((0,e.useState)(null),2),P=D[0],A=D[1],N=(0,e.useRef)(C),M=(0,e.useRef)(w);(0,e.useEffect)((function(){N.current=C,M.current=w}));var L=function(e){return"content"===e?1===O.length?100:50:O.indexOf("content")>-1?50/(O.length-1):100/O.length},T=O.reduce((function(e,t,n){return n>=h?e:e+L(t)}),0)+100*C/w[x].expected_signals*(L(x)/100),I=function(){var e=w[x],t=new EventSource("".concat(ctDashboardLocalizations.ajax_url,"?").concat(e.query_string));t.onmessage=function(e){var n=JSON.parse(e.data);if(j(N.current+1),"content_installer_progress"===n.action){var r=n.kind;r&&(A(n),k(ke(ke({},M.current),{},{content:ke(ke({},M.current.content),{},Oe({},"".concat(r,"_count"),M.current.content["".concat(r,"_count")]+1))})))}else A(n);if("get_content_preliminary_data"===n.action){var o=n.data,a=(o.comment_count,o.media_count,o.post_count,o.term_count,o.users,ke(ke({},n.data),{},{term_count:n.data.terms.length,post_count:n.data.posts.filter((function(e){return"attachment"!==e.post_type})).length,media_count:n.data.posts.filter((function(e){return"attachment"===e.post_type})).length,comment_count:n.data.posts.reduce((function(e,t){return e+(t.comments||[]).length}),0),users_count:Object.keys(n.data.authors).length}));k(ke(ke({},M.current),{},{content:ke(ke({},M.current.content),{},{preliminary_data:a,comment_count:0,media_count:0,post_count:0,term_count:0,users_count:0,expected_signals:a.comment_count+a.media_count+a.post_count+a.term_count+a.users_count+3})}))}if("complete"===n.action){if(t&&t.close&&t.close(),h===O.length-1)return d(!0),i(!0),void window.removeEventListener("beforeunload",Ce);A(null),j(0),y(Math.min(O.length-1,h+1))}}};return(0,e.useEffect)((function(){p||(A(null),j(0),"fake_step"===x?(console.log("here we go delay before fake_step"),setTimeout((function(){I()}),2e3)):I())}),[x]),(0,e.useEffect)((function(){return window.addEventListener("beforeunload",Ce),c({demo:"".concat(a,":").concat(t.builder)}),function(){window.removeEventListener("beforeunload",Ce)}}),[]),{isCompleted:p,stepName:x,stepsDescriptors:w,lastMessage:P,progress:T}}(n),i=a.isCompleted,c=a.stepName,l=a.stepsDescriptors,s=a.lastMessage,u=a.progress;return(0,e.createElement)("div",{className:"ct-demo-install",style:r},(0,e.createElement)(j.Transition,{initial:!0,items:i,from:{opacity:0},enter:[{opacity:1}],leave:[{opacity:0}],config:function(e,t){return"leave"===t?{duration:300}:{delay:300,duration:300}}},(function(t){return function(n){return(0,e.createElement)("div",{style:n},t?(0,e.createElement)(_e,null):(0,e.createElement)(e.Fragment,null,(0,e.createElement)("i",{className:"ct-demo-icon"},(0,e.createElement)("svg",{width:"40",height:"40",viewBox:"0 0 50 50"},(0,e.createElement)("path",{class:"g1",d:"M47,38.8c0.3-1,0.5-2,0.5-3.1c0-1.1-0.2-2.1-0.5-3.1l0.2-0.1l1.8-1.7l-1.8-3.1l-2.3,0.7l-0.2,0.1c-1.4-1.5-3.3-2.7-5.4-3.1V25l-0.6-2.4h-3.5L34.5,25v0.3c-2.1,0.5-4,1.6-5.4,3.1l-0.2-0.1l-2.3-0.7l-1.8,3.1l1.7,1.7l0.2,0.1c-0.3,1-0.5,2-0.5,3.1c0,1.1,0.2,2.1,0.5,3.1l-0.2,0.1l-1.8,1.7l1.8,3.1l2.3-0.7l0.2-0.1c1.4,1.5,3.3,2.7,5.4,3.1v0.3l0.6,2.4h3.5l0.6-2.4V46c2.1-0.5,4-1.6,5.4-3.1l0.2,0.1l2.3,0.7l1.8-3.1l-1.7-1.7L47,38.8z M36.9,41.5c-3.3,0-5.9-2.6-5.9-5.9s2.6-5.9,5.9-5.9s5.9,2.6,5.9,5.9S40.1,41.5,36.9,41.5z"}),(0,e.createElement)("path",{class:"g2",d:"M21.2,32.2c0.2-0.8,0.4-1.7,0.4-2.5c0-0.9-0.1-1.7-0.4-2.5l0.3-0.2l1.7-1.7l-1.8-3.1L19.1,23l-0.3,0.2c-1.2-1.2-2.7-2.1-4.4-2.5v-0.3l-0.6-2.4h-3.5l-0.6,2.4v0.3c-1.7,0.4-3.2,1.3-4.4,2.5L5.1,23l-2.3-0.7L1,25.4L2.7,27L3,27.2c-0.2,0.8-0.4,1.7-0.4,2.5c0,0.9,0.1,1.7,0.4,2.5l-0.3,0.1L1,34.1l1.8,3.1l2.3-0.7l0.3-0.1c1.2,1.2,2.7,2.1,4.4,2.5v0.3l0.6,2.4h3.5l0.6-2.4v-0.3c1.7-0.4,3.2-1.3,4.4-2.5l0.3,0.1l2.3,0.7l1.8-3.1l-1.7-1.7L21.2,32.2z M12.1,34.4c-2.6,0-4.7-2.1-4.7-4.7S9.5,25,12.1,25s4.7,2.1,4.7,4.7S14.7,34.4,12.1,34.4z"}),(0,e.createElement)("path",{class:"g3",d:"M37.7,15.7c0.2-0.8,0.4-1.7,0.4-2.5c0-0.9-0.1-1.7-0.4-2.5l0.3-0.2l1.7-1.7l-1.8-3.1l-2.3,0.7l-0.3,0.2c-1.2-1.2-2.7-2.1-4.4-2.5V3.8l-0.6-2.4h-3.5l-0.6,2.4v0.3c-1.7,0.4-3.2,1.3-4.4,2.5l-0.3-0.2l-2.3-0.7l-1.8,3.1l1.7,1.7l0.3,0.2c-0.2,0.8-0.4,1.7-0.4,2.5c0,0.9,0.1,1.7,0.4,2.5l-0.3,0.1l-1.7,1.7l1.8,3.1l2.3-0.7l0.3-0.1c1.2,1.2,2.7,2.1,4.4,2.5v0.3l0.6,2.4h3.5l0.6-2.4v-0.3c1.7-0.4,3.2-1.3,4.4-2.5l0.3,0.1l2.3,0.7l1.8-3.1L38,15.9L37.7,15.7z M28.6,17.9c-2.6,0-4.7-2.1-4.7-4.7s2.1-4.7,4.7-4.7s4.7,2.1,4.7,4.7S31.2,17.9,28.6,17.9z"}))),(0,e.createElement)("h2",null,(0,o.__)("Installing","blocksy-companion"),"..."),(0,e.createElement)("p",null,(0,o.__)("Please be patient and don't refresh this page, the import process may take a while, this also depends on your server.","blocksy-companion")),(0,e.createElement)("div",{className:"ct-progress-info"},l[c].title,s&&Ee(s,l)?": ".concat(Ee(s,l)):"",(0,e.createElement)("span",null,Math.round(u),"%")),(0,e.createElement)("div",{style:{"--progress":"".concat(u,"%")},className:"ct-installer-progress"},(0,e.createElement)("div",null))))}})))};function Pe(e){return function(e){if(Array.isArray(e))return Me(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Ne(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 Ae(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,a=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}return n}}(e,t)||Ne(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 Ne(e,t){if(e){if("string"==typeof e)return Me(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)?Me(e,t):void 0}}function Me(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ze=function(t){t.location,t.navigate;var n=Ae((0,e.useState)(!0),2),r=(n[0],n[1],(0,e.useContext)(qe)),a=r.installerBlockingReleased,c=r.demos_list,l=r.currentDemo,s=r.pluginsStatus,u=r.currentlyInstalledDemo,m=r.setCurrentDemo,p=(0,e.useContext)(z).is_child_theme,d=Ae((0,e.useState)(u),2),f=d[0],h=d[1],y=Ae((0,e.useState)({builder:"",child_theme:!1,plugins:[],content:{options:!0,widgets:!0,content:!0,erase_content:!0}}),2),b=y[0],v=y[1],g=Ae((0,e.useState)(0),2),_=g[0],E=g[1],w=Ae((l||"").split(":"),2),k=w[0],O=(w[1],["modify_demo","child_theme","builder","plugins","content","installer"].filter((function(e){if(!l)return!1;if("modify_demo"===e){if(!f)return!1;if(-1===f.demo.indexOf(k))return!1}if("child_theme"===e&&p)return!1;var t=c.filter((function(e){return e.name===k})).sort((function(e,t){return e.builder<t.builder?-1:e.builder>t.builder?1:0}));return("plugins"!==e||0!==t.reduce((function(e,t){return[].concat(Pe(e),Pe(t.plugins||[]))}),[]).filter((function(e){return!s[e]})).length)&&("builder"!==e||t.length>1)}))),x=O[_];return(0,e.useEffect)((function(){if(k&&!(l.indexOf(":hide")>-1)){var e=c.filter((function(e){return e.name===k})).sort((function(e,t){return e.builder<t.builder?-1:e.builder>t.builder?1:0}));E(0),h(u),v({builder:1===e.length?e[0].builder:null,child_theme:!1,plugins:e[0].plugins.map((function(e){return{plugin:e,enabled:!0}})),content:{options:!0,widgets:!0,content:!0,erase_content:!0}})}}),[l]),(0,e.createElement)(P,{items:l,isVisible:function(e){return e&&-1===e.indexOf(":hide")},className:i()("ct-demo-modal",{"ct-demo-installer":"installer"===x||"modify_demo"===x}),onDismiss:function(){("installer"!==x||a)&&m("".concat(k,":hide"))},render:function(){return(0,e.createElement)("div",{className:"ct-modal-content ct-demo-step-container"},(0,e.createElement)("div",{className:"ct-current-step"},(0,e.createElement)(j.Transition,{items:x,from:{opacity:0},enter:{opacity:1},leave:{opacity:0},initial:!1,config:function(e,t){return"leave"===t?{duration:150}:{delay:150,duration:150}}},(function(t){return function(n){return(0,e.createElement)(e.Fragment,null,"modify_demo"===t&&(0,e.createElement)(ie,{demoConfiguration:b,nextStep:function(){E(Math.min(_+1,O.length-1))},style:n}),"child_theme"===t&&(0,e.createElement)(ue,{style:n,demoConfiguration:b,setDemoConfiguration:v}),"plugins"===t&&(0,e.createElement)(ne,{demoConfiguration:b,style:n,setDemoConfiguration:v}),"builder"===t&&(0,e.createElement)(he,{style:n,demoConfiguration:b,setDemoConfiguration:v}),"content"===t&&(0,e.createElement)(ge,{style:n,demoConfiguration:b,setDemoConfiguration:v}),"installer"===t&&(0,e.createElement)(De,{style:n,demoConfiguration:b}))}}))),"installer"!==x&&"modify_demo"!==x&&(0,e.createElement)("div",{className:"ct-demo-step-controls"},_>0&&(0,e.createElement)("button",{className:"ct-demo-btn demo-back-btn",onClick:function(){E(Math.max(_-1,0))}},(0,o.__)("Back","blocksy-companion")),O.length>2&&(0,e.createElement)("ul",{className:"ct-steps-pills"},O.map((function(t,n){return n===O.length-1?null:(0,e.createElement)("li",{className:i()({active:t===x}),key:t},n+1)}))),(0,e.createElement)("button",{className:"ct-demo-btn demo-main-btn",disabled:"content"===x&&0===je({demoConfiguration:b,pluginsStatus:s,is_child_theme:p}).length,onClick:function(){E(Math.min(_+1,O.length-1))}},"content"===x?(0,o.__)("Install","blocksy-companion"):(0,o.__)("Next","blocksy-companion"))))}})},Le=n(162),Te=n.n(Le);function Ie(e,t,n,r,o,a,i){try{var c=e[a](i),l=c.value}catch(e){return void n(e)}c.done?t(l):Promise.resolve(l).then(r,o)}function Be(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,a=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}return n}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Re(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)?Re(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Re(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Fe=function(){var t=Be((0,e.useState)(!1),2),n=t[0],r=t[1],a=Be((0,e.useState)(!1),2),i=a[0],c=a[1],l=Be((0,e.useState)(""),2),s=l[0],u=l[1],m=Be((0,e.useState)(""),2),p=m[0],d=m[1],f=Be((0,e.useState)(""),2),h=f[0],y=f[1],b=Be((0,e.useState)(""),2),v=b[0],g=b[1],_=Be((0,e.useState)(!1),2),E=_[0],w=_[1],k=function(){var e,t=(e=regeneratorRuntime.mark((function e(){var t,n,o,a,i,c;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r(!0),(t=new FormData).append("action","blocksy_demo_export"),t.append("name",s),t.append("is_pro",E),t.append("url",v),t.append("builder",p),t.append("plugins",h),t.append("wp_customize","on"),e.prev=9,e.next=12,fetch(ctDashboardLocalizations.ajax_url,{method:"POST",body:t});case 12:if(200!==(n=e.sent).status){e.next=20;break}return e.next=16,n.json();case 16:o=e.sent,a=o.success,i=o.data,a&&(c=new Blob([JSON.stringify(i.demo)],{type:"text/plain;charset=utf-8"}),Te().saveAs(c,"".concat(s,".json")));case 20:e.next=24;break;case 22:e.prev=22,e.t0=e.catch(9);case 24:r(!1);case 25:case"end":return e.stop()}}),e,null,[[9,22]])})),function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){Ie(a,r,o,i,c,"next",e)}function c(e){Ie(a,r,o,i,c,"throw",e)}i(void 0)}))});return function(){return t.apply(this,arguments)}}();return ct_localizations.is_dev_mode?(0,e.createElement)("div",{className:"ct-export"},(0,e.createElement)("button",{className:"ct-button",onClick:function(e){c(!0)}},(0,o.__)("Site export")),(0,e.createElement)(P,{items:i,className:"ct-site-export-modal",onDismiss:function(){return c(!1)},render:function(){return(0,e.createElement)("div",{className:"ct-site-export"},(0,e.createElement)("label",null,(0,o.__)("Name","blocksy-companion"),(0,e.createElement)("input",{type:"text",placeholder:(0,o.__)("Name","blocksy-companion"),value:s,onChange:function(e){var t=e.target.value;return u(t)}})),(0,e.createElement)("label",null,(0,o.__)("Preview URL","blocksy-companion"),(0,e.createElement)("input",{type:"text",placeholder:(0,o.__)("Preview URL","blocksy-companion"),value:v,onChange:function(e){var t=e.target.value;return g(t)}})),(0,e.createElement)("label",null,(0,o.__)("PRO","blocksy-companion"),(0,e.createElement)("input",{type:"checkbox",value:E,onChange:function(e){return e.target.value,w(!E)}})),(0,e.createElement)("label",null,(0,o.__)("Builder","blocksy-companion"),(0,e.createElement)("input",{type:"text",placeholder:(0,o.__)("Builder","blocksy-companion"),value:p,onChange:function(e){var t=e.target.value;return d(t)}})),(0,e.createElement)("h3",null,"Required plugins"),(0,e.createElement)("div",{className:"ct-bundled-plugins-list ct-modal-scroll"},Object.keys({"stackable-ultimate-gutenberg-blocks":"Stackable – Gutenberg Blocks","wpforms-lite":"WPForms - Contact Form",woocommerce:"WooCommerce",elementor:"Elementor",brizy:"Brizy",getwid:"Getwid","simply-gallery-block":"SimpLy Gallery Block & Lightbox","recipe-card-blocks-by-wpzoom":"Recipe Card Blocks by WPZOOM","map-block-gutenberg":"Map Block for Google Maps","mb-custom-post-type":"MB Custom Post Types & Custom Taxonomies",leadin:"HubSpot","block-slider":"Block Slider"}).map((function(t){return(0,e.createElement)("label",{tabindex:"0",onClick:function(e){e.preventDefault();var n=h.split(",");n.includes(t)?n.splice(n.indexOf(t),1):n.push(t),y(n.join(","))}},(0,e.createElement)("span",null,{"stackable-ultimate-gutenberg-blocks":"Stackable – Gutenberg Blocks","wpforms-lite":"WPForms - Contact Form",woocommerce:"WooCommerce",elementor:"Elementor",brizy:"Brizy",getwid:"Getwid","simply-gallery-block":"SimpLy Gallery Block & Lightbox","recipe-card-blocks-by-wpzoom":"Recipe Card Blocks by WPZOOM","map-block-gutenberg":"Map Block for Google Maps","mb-custom-post-type":"MB Custom Post Types & Custom Taxonomies",leadin:"HubSpot","block-slider":"Block Slider"}[t]),(0,e.createElement)("input",{type:"checkbox",checked:h.indexOf(t)>-1,onChange:function(e){e.target.checked}}))}))),(0,e.createElement)("button",{className:"ct-button",disabled:n,onClick:function(){return k()}},n?(0,o.__)("Loading...","blocksy-companion"):(0,o.__)("Export site","blocksy-companion")))}})):null};function Ue(e,t,n,r,o,a,i){try{var c=e[a](i),l=c.value}catch(e){return void n(e)}c.done?t(l):Promise.resolve(l).then(r,o)}function Ve(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,a=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}return n}}(e,t)||function(e,t){if(e){if("string"==typeof e)return He(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)?He(e,t):void 0}}(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 He(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 qe=(0,e.createContext)({demos:[]}),We=null,Ge=null,Ze=function(t){t.children,t.path,t.location;var n=Ve((0,e.useState)(!We),2),r=n[0],a=n[1],i=Ve((0,e.useState)(We||[]),2),c=i[0],l=i[1],s=Ve((0,e.useState)(Ge||{}),2),u=s[0],m=s[1],p=Ve((0,e.useState)(null),2),d=p[0],f=p[1],h=Ve((0,e.useState)(null),2),y=h[0],b=h[1],v=Ve((0,e.useState)(!1),2),g=v[0],_=v[1],E=Ve((0,e.useState)({builder:""}),2),w=(E[0],E[1],Ve((0,e.useState)(!1),2)),k=w[0],O=w[1],x=function(){var e,t=(e=regeneratorRuntime.mark((function e(){var t,n,r,o,i,c=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c.length>0&&void 0!==c[0]&&c[0]&&a(!0),(t=new FormData).append("action","blocksy_demo_list"),e.prev=4,e.next=7,fetch(ctDashboardLocalizations.ajax_url,{method:"POST",body:t});case 7:if(200!==(n=e.sent).status){e.next=15;break}return e.next=11,n.json();case 11:r=e.sent,o=r.success,i=r.data,o&&(l(i.demos),m(i.active_plugins),b(i.current_installed_demo),_(i.demo_error),Ge=i.active_plugins,We=i.demos,i.demo_error);case 15:e.next=19;break;case 17:e.prev=17,e.t0=e.catch(4);case 19:a(!1);case 20:case"end":return e.stop()}}),e,null,[[4,17]])})),function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){Ue(a,r,o,i,c,"next",e)}function c(e){Ue(a,r,o,i,c,"throw",e)}i(void 0)}))});return function(){return t.apply(this,arguments)}}();return(0,e.useEffect)((function(){x(!We)}),[]),(0,e.createElement)("div",{className:"ct-demos-list-container"},g&&(0,e.createElement)("div",{className:"ct-demo-notification",dangerouslySetInnerHTML:{__html:g}}),(0,e.createElement)(j.Transition,{items:r,from:{opacity:0},enter:[{opacity:1}],leave:[{opacity:0}],config:function(e,t){return"leave"===t?{duration:300}:{delay:300,duration:300}}},(function(t){return t?function(t){return(0,e.createElement)(j.animated.p,{style:t,className:"ct-loading-text"},(0,e.createElement)("span",null),(0,o.__)("Loading Starter Sites...","blocksy-companion"))}:0===c.length?function(t){return(0,e.createElement)(j.animated.div,{style:t},(0,e.createElement)("div",{className:"ct-demo-notification",dangerouslySetInnerHTML:{__html:(0,o.__)("The connection to our <b>demo.creativethemes.com</b> server didn't worked. This connection is required for importing the starter sites from our demo content server. All you have to do is to contact your hosting provider and ask them to white list our demo server address.","blocksy-companion")}}),(0,e.createElement)(R,null))}:function(t){return(0,e.createElement)(j.animated.div,{style:t},(0,e.createElement)(e.Fragment,null,(0,e.createElement)(qe.Provider,{value:{demo_error:g,demos_list:c.filter((function(e){return!e.dev||ct_localizations.is_dev_mode})),currentDemo:d,pluginsStatus:u,installerBlockingReleased:k,setInstallerBlockingReleased:O,setCurrentDemo:f,currentlyInstalledDemo:y,setCurrentlyInstalledDemo:b}},(0,e.createElement)(re,null),(0,e.createElement)(ze,null),(0,e.createElement)(Fe,null)),(0,e.createElement)(R,null)))}})))};function $e(e,t,n,r,o,a,i){try{var c=e[a](i),l=c.value}catch(e){return void n(e)}c.done?t(l):Promise.resolve(l).then(r,o)}var Ke=function(){var t=function(){var e,t=(e=regeneratorRuntime.mark((function e(){var t,n,r,o,a,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(t=new FormData).append("action","blocksy_fs_connect_again"),e.prev=2,e.next=5,fetch(ctDashboardLocalizations.ajax_url,{method:"POST",body:t});case 5:if(200!==(n=e.sent).status){e.next=13;break}return e.next=9,n.json();case 9:r=e.sent,o=r.success,r.data,o&&((a=document.createElement("div")).innerHTML=ctDashboardLocalizations.plugin_data.connect_template,i=a.querySelector("form"),document.body.appendChild(i),i.submit());case 13:e.next=17;break;case 15:e.prev=15,e.t0=e.catch(2);case 17:case"end":return e.stop()}}),e,null,[[2,15]])})),function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){$e(a,r,o,i,c,"next",e)}function c(e){$e(a,r,o,i,c,"throw",e)}i(void 0)}))});return function(){return t.apply(this,arguments)}}();return(0,e.createElement)("div",{className:"ct-freemius-optin-message"},(0,e.createElement)("i",null,(0,e.createElement)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},(0,e.createElement)("path",{d:"M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"}),(0,e.createElement)("path",{d:"M13.73 21a2 2 0 0 1-3.46 0"}))),(0,e.createElement)("h2",null,(0,o.__)("Stay Updated","blocksy-companion")),(0,e.createElement)("p",null,(0,o.__)("Never miss an important update - opt in to our security & feature updates notifications, and non-sensitive diagnostic tracking.","blocksy-companion")),(0,e.createElement)("button",{className:"ct-button-primary",onClick:function(e){e.preventDefault(),t()}},(0,o.__)("Allow & Continue","blocksy-companion")))};r().on("ct:dashboard:routes",(function(t){t.push({Component:function(){return(0,e.createElement)($,null)},path:"/extensions"}),"yes"===ctDashboardLocalizations.plugin_data.has_demo_install&&t.push({Component:function(t){return(0,e.createElement)(Ze,t)},path:"/demos"})})),r().on("ct:dashboard:navigation-links",(function(e){"yes"===ctDashboardLocalizations.plugin_data.has_demo_install&&e.push({text:(0,o.__)("Starter Sites","blocksy-companion"),path:"demos",getProps:function(e){var t=e.isPartiallyCurrent;return e.isCurrent,t?{"aria-current":"page"}:{}}}),e.push({text:(0,o.__)("Extensions","blocksy-companion"),path:"/extensions"})})),r().on("ct:dashboard:home:before",(function(t){ctDashboardLocalizations.plugin_data.is_anonymous&&(t.content=(0,e.createElement)(Ke,null))})),r().on("ct:dashboard:heading:after",(function(t){ctDashboardLocalizations.plugin_data.is_pro&&(t.content=(0,e.createElement)("span",null,"PRO"))}))}()}();
|
1 |
/*! For license information please see dashboard.js.LICENSE.txt */
|
2 |
+
!function(){var e={184:function(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var a=typeof n;if("string"===a||"number"===a)e.push(n);else if(Array.isArray(n)&&n.length){var i=o.apply(null,n);i&&e.push(i)}else if("object"===a)for(var c in n)r.call(n,c)&&n[c]&&e.push(c)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},162:function(e,t,n){var r;void 0===(r=function(){"use strict";function t(e,t,n){var r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){i(r.response,t,n)},r.onerror=function(){console.error("could not download file")},r.send()}function 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 a="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof n.g&&n.g.global===n.g?n.g:void 0,i=a.saveAs||("object"!=typeof window||window!==a?function(){}:"download"in HTMLAnchorElement.prototype?function(e,n,i){var c=a.URL||a.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,i):o(l,l.target="_blank")):(l.href=c.createObjectURL(e),setTimeout((function(){c.revokeObjectURL(l.href)}),4e4),setTimeout((function(){o(l)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,n,a){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,a),n);else if(r(e))t(e,n,a);else{var i=document.createElement("a");i.href=e,i.target="_blank",setTimeout((function(){o(i)}))}}: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 i="application/octet-stream"===e.type,c=/constructor/i.test(a.HTMLElement)||a.safari,l=/CriOS\/[\d]+/.test(navigator.userAgent);if((l||i&&c)&&"object"==typeof FileReader){var s=new FileReader;s.onloadend=function(){var e=s.result;e=l?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),o?o.location.href=e:location=e,o=null},s.readAsDataURL(e)}else{var u=a.URL||a.webkitURL,m=u.createObjectURL(e);o?o.location=m:location.href=m,o=null,setTimeout((function(){u.revokeObjectURL(m)}),4e4)}});a.saveAs=i.saveAs=i,e.exports=i}.apply(t,[]))||(e.exports=r)},172:function(e,t,n){var r,o,a=n(760),i=n(529),c=(o=[],{activateTrap:function(e){if(o.length>0){var t=o[o.length-1];t!==e&&t.pause()}var n=o.indexOf(e);-1===n||o.splice(n,1),o.push(e)},deactivateTrap:function(e){var t=o.indexOf(e);-1!==t&&o.splice(t,1),o.length>0&&o[o.length-1].unpause()}});function l(e){return setTimeout(e,0)}e.exports=function(e,t){var n=document,o="string"==typeof e?n.querySelector(e):e,s=i({returnFocusOnDeactivate:!0,escapeDeactivates:!0},t),u={firstTabbableNode:null,lastTabbableNode:null,nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1},m={activate:function(e){if(!u.active){E(),u.active=!0,u.paused=!1,u.nodeFocusedBeforeActivation=n.activeElement;var t=e&&e.onActivate?e.onActivate:s.onActivate;return t&&t(),p(),m}},deactivate:d,pause:function(){!u.paused&&u.active&&(u.paused=!0,f())},unpause:function(){u.paused&&u.active&&(u.paused=!1,E(),p())}};return m;function d(e){if(u.active){clearTimeout(r),f(),u.active=!1,u.paused=!1,c.deactivateTrap(m);var t=e&&void 0!==e.onDeactivate?e.onDeactivate:s.onDeactivate;return t&&t(),(e&&void 0!==e.returnFocus?e.returnFocus:s.returnFocusOnDeactivate)&&l((function(){var e;w((e=u.nodeFocusedBeforeActivation,y("setReturnFocus")||e))})),m}}function p(){if(u.active)return c.activateTrap(m),r=l((function(){w(b())})),n.addEventListener("focusin",v,!0),n.addEventListener("mousedown",h,{capture:!0,passive:!1}),n.addEventListener("touchstart",h,{capture:!0,passive:!1}),n.addEventListener("click",_,{capture:!0,passive:!1}),n.addEventListener("keydown",g,{capture:!0,passive:!1}),m}function f(){if(u.active)return n.removeEventListener("focusin",v,!0),n.removeEventListener("mousedown",h,!0),n.removeEventListener("touchstart",h,!0),n.removeEventListener("click",_,!0),n.removeEventListener("keydown",g,!0),m}function y(e){var t=s[e],r=t;if(!t)return null;if("string"==typeof t&&!(r=n.querySelector(t)))throw new Error("`"+e+"` refers to no known node");if("function"==typeof t&&!(r=t()))throw new Error("`"+e+"` did not return a node");return r}function b(){var e;if(!(e=null!==y("initialFocus")?y("initialFocus"):o.contains(n.activeElement)?n.activeElement:u.firstTabbableNode||y("fallbackFocus")))throw new Error("Your focus-trap needs to have at least one focusable element");return e}function h(e){o.contains(e.target)||(s.clickOutsideDeactivates?d({returnFocus:!a.isFocusable(e.target)}):s.allowOutsideClick&&s.allowOutsideClick(e)||e.preventDefault())}function v(e){o.contains(e.target)||e.target instanceof Document||(e.stopImmediatePropagation(),w(u.mostRecentlyFocusedNode||b()))}function g(e){if(!1!==s.escapeDeactivates&&function(e){return"Escape"===e.key||"Esc"===e.key||27===e.keyCode}(e))return e.preventDefault(),void d();(function(e){return"Tab"===e.key||9===e.keyCode})(e)&&function(e){if(E(),e.shiftKey&&e.target===u.firstTabbableNode)return e.preventDefault(),void w(u.lastTabbableNode);e.shiftKey||e.target!==u.lastTabbableNode||(e.preventDefault(),w(u.firstTabbableNode))}(e)}function _(e){s.clickOutsideDeactivates||o.contains(e.target)||s.allowOutsideClick&&s.allowOutsideClick(e)||(e.preventDefault(),e.stopImmediatePropagation())}function E(){var e=a(o);u.firstTabbableNode=e[0]||b(),u.lastTabbableNode=e[e.length-1]||b()}function w(e){e!==n.activeElement&&(e&&e.focus?(e.focus(),u.mostRecentlyFocusedNode=e,function(e){return e.tagName&&"input"===e.tagName.toLowerCase()&&"function"==typeof e.select}(e)&&e.select()):w(b()))}}},703:function(e,t,n){"use strict";var r=n(414);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,a,i){if(i!==r){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:o};return n.PropTypes=n,n}},697:function(e,t,n){e.exports=n(703)()},414:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},760:function(e){var t=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'],n=t.join(","),r="undefined"==typeof Element?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector;function o(e,t){t=t||{};var o,i,c,u=[],m=[],d=e.querySelectorAll(n);for(t.includeContainer&&r.call(e,n)&&(d=Array.prototype.slice.apply(d)).unshift(e),o=0;o<d.length;o++)a(i=d[o])&&(0===(c=l(i))?u.push(i):m.push({documentOrder:o,tabIndex:c,node:i}));return m.sort(s).map((function(e){return e.node})).concat(u)}function a(e){return!(!i(e)||function(e){return function(e){return u(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t=function(e){for(var t=0;t<e.length;t++)if(e[t].checked)return e[t]}(e.ownerDocument.querySelectorAll('input[type="radio"][name="'+e.name+'"]'));return!t||t===e}(e)}(e)||l(e)<0)}function i(e){return!(e.disabled||function(e){return u(e)&&"hidden"===e.type}(e)||function(e){return null===e.offsetParent||"hidden"===getComputedStyle(e).visibility}(e))}o.isTabbable=function(e){if(!e)throw new Error("No node provided");return!1!==r.call(e,n)&&a(e)},o.isFocusable=function(e){if(!e)throw new Error("No node provided");return!1!==r.call(e,c)&&i(e)};var c=t.concat("iframe").join(",");function l(e){var t=parseInt(e.getAttribute("tabindex"),10);return isNaN(t)?function(e){return"true"===e.contentEditable}(e)?0:e.tabIndex:t}function s(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex}function u(e){return"INPUT"===e.tagName}e.exports=o},529:function(e){e.exports=function(){for(var e={},n=0;n<arguments.length;n++){var r=arguments[n];for(var o in r)t.call(r,o)&&(e[o]=r[o])}return e};var t=Object.prototype.hasOwnProperty}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var a=t[r]={exports:{}};return e[r].call(a.exports,a,a.exports,n),a.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){"use strict";var e=window.wp.element,t=window.ctEvents,r=n.n(t),o=window.wp.i18n,a=n(184),i=n.n(a),c=window.React,l=n.n(c);function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}n(697);var m=function(e){return e.initialState,e.getInitialState,e.refs,e.getRefs,e.didMount,e.didUpdate,e.willUnmount,e.getSnapshotBeforeUpdate,e.shouldUpdate,e.render,function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["initialState","getInitialState","refs","getRefs","didMount","didUpdate","willUnmount","getSnapshotBeforeUpdate","shouldUpdate","render"])},d=function(e){function t(){var n,r;s(this,t);for(var o=arguments.length,a=Array(o),i=0;i<o;i++)a[i]=arguments[i];return n=r=u(this,e.call.apply(e,[this].concat(a))),p.call(r),u(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.getArgs=function(){var e=this.state,t=this.props,n=this._setState,r=this._forceUpdate,o=this._refs;return{state:e,props:m(t),refs:o,setState:n,forceUpdate:r}},t.prototype.componentDidMount=function(){this.props.didMount&&this.props.didMount(this.getArgs())},t.prototype.shouldComponentUpdate=function(e,t){return!this.props.shouldUpdate||this.props.shouldUpdate({props:this.props,state:this.state,nextProps:m(e),nextState:t})},t.prototype.componentWillUnmount=function(){this.props.willUnmount&&this.props.willUnmount({state:this.state,props:m(this.props),refs:this._refs})},t.prototype.componentDidUpdate=function(e,t,n){this.props.didUpdate&&this.props.didUpdate(Object.assign(this.getArgs(),{prevProps:m(e),prevState:t}),n)},t.prototype.getSnapshotBeforeUpdate=function(e,t){return this.props.getSnapshotBeforeUpdate?this.props.getSnapshotBeforeUpdate(Object.assign(this.getArgs(),{prevProps:m(e),prevState:t})):null},t.prototype.render=function(){var e=this.props,t=e.children,n=e.render;return n?n(this.getArgs()):"function"==typeof t?t(this.getArgs()):t||null},t}(l().Component);d.defaultProps={getInitialState:function(){},getRefs:function(){return{}}};var p=function(){var e=this;this.state=this.props.initialState||this.props.getInitialState(this.props),this._refs=this.props.refs||this.props.getRefs(this.getArgs()),this._setState=function(){return e.setState.apply(e,arguments)},this._forceUpdate=function(){return e.forceUpdate.apply(e,arguments)}},f=d,y=function(t){var n=t.children,r=t.container,o=void 0===r?document.body:r,a=t.type,i=void 0===a?"reach-portal":a;return(0,e.createElement)(f,{getRefs:function(){return{node:null}},didMount:function(e){var t=e.refs,n=e.forceUpdate,r=o.hasOwnProperty("current")?o.current:o;t.node=document.createElement(i),r.appendChild(t.node),n()},willUnmount:function(e){var t=e.refs.node,n=o.hasOwnProperty("current")?o.current:o;n&&n.removeChild(t)},render:function(t){var r=t.refs.node;return r?(0,e.createPortal)(n,r):null}})},b=function(e,t){return function(n){if(e&&e(n),!n.defaultPrevented)return t(n)}},h=n(172),v=n.n(h);function g(){return g=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},g.apply(this,arguments)}function _(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var E=function(){},w=function(){},k=function(e){var t=e.refs;t.trap.deactivate(),t.disposeAriaHider()},O=React.createContext(),x=React.forwardRef((function(t,n){var r=t.container,o=t.isOpen,a=void 0===o||o,i=t.onDismiss,c=void 0===i?E:i,l=t.initialFocusRef,s=t.onClick,u=t.onKeyDown,m=_(t,["container","isOpen","onDismiss","initialFocusRef","onClick","onKeyDown"]);return(0,e.createElement)(f,{didMount:w},a?(0,e.createElement)(y,{container:r,"data-reach-dialog-wrapper":!0},(0,e.createElement)(f,{refs:{overlayNode:null,contentNode:null},didMount:function(e){!function(e,t){var n,r,o;e.disposeAriaHider=(n=e.overlayNode,r=[],o=[],Array.prototype.forEach.call(document.querySelectorAll("body > *"),(function(e){if(e!==n.parentNode){var t=e.getAttribute("aria-hidden");null!==t&&"false"!==t||(r.push(t),o.push(e),e.setAttribute("aria-hidden","true"))}})),function(){o.forEach((function(e,t){var n=r[t];null===n?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",n)}))}),e.trap=v()(e.overlayNode,{initialFocus:t?function(){return t.current}:void 0,fallbackFocus:e.contentNode,escapeDeactivates:!1,clickOutsideDeactivates:!1})}(e.refs,l)},willUnmount:k},(function(t){var r=t.refs;return(0,e.createElement)(O.Provider,{value:function(e){return r.contentNode=e}},(0,e.createElement)("div",g({"data-reach-dialog-overlay":!0,onClick:b(s,(function(e){e.stopPropagation(),c()})),onKeyDown:b(u,(function(e){"Escape"===e.key&&(e.stopPropagation(),c())})),ref:function(e){r.overlayNode=e,n&&n(e)}},m)))}))):null)}));x.propTypes={initialFocusRef:function(){}};var S=function(e){return e.stopPropagation()},C=React.forwardRef((function(t,n){var r=t.onClick,o=(t.onKeyDown,_(t,["onClick","onKeyDown"]));return(0,e.createElement)(O.Consumer,null,(function(t){return(0,e.createElement)("div",g({"aria-modal":"true","data-reach-dialog-content":!0,tabIndex:"-1",onClick:b(r,S),ref:function(e){t(e),n&&n(e)}},o))}))})),j=window.blocksyOptions,D=function(e){return!!e},P=function(t){var n=t.items,r=t.isVisible,o=void 0===r?D:r,a=t.render,c=t.className,l=t.onDismiss;return(0,e.createElement)(j.Transition,{items:n,onStart:function(){return document.body.classList[o(n)?"add":"remove"]("ct-dashboard-overlay-open")},config:{duration:200},from:{opacity:0,y:-10},enter:{opacity:1,y:0},leave:{opacity:0,y:10}},(function(t){return o(t)&&function(n){return(0,e.createElement)(x,{style:{opacity:n.opacity},container:document.querySelector("#wpbody"),onDismiss:function(){return l()}},(0,e.createElement)(C,{className:i()("ct-admin-modal",c),style:{transform:"translate3d(0px, ".concat(n.y,"px, 0px)")}},(0,e.createElement)("button",{className:"close-button",onClick:function(){return l()}},"×"),a(t,n)))}}))};function A(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var N=function(t){var n,r,o=(n=(0,e.useState)(!1),r=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,a=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}return n}}(n,r)||function(e,t){if(e){if("string"==typeof e)return A(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)?A(e,t):void 0}}(n,r)||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.")}()),a=o[0],i=o[1];return[function(){return i(!0)},(0,e.createElement)(P,{items:a,onDismiss:function(){return i(!1)},render:function(){return(0,e.createElement)("div",{className:"ct-modal-content",dangerouslySetInnerHTML:{__html:t.readme}})}})]},M=window.ctDashboardLocalizations.DashboardContext,z=(M.Provider,M.Consumer,M);function L(e,t,n,r,o,a,i){try{var c=e[a](i),l=c.value}catch(e){return void n(e)}c.done?t(l):Promise.resolve(l).then(r,o)}function T(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){L(a,r,o,i,c,"next",e)}function c(e){L(a,r,o,i,c,"throw",e)}i(void 0)}))}}function I(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,a=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}return n}}(e,t)||function(e,t){if(e){if("string"==typeof e)return B(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)?B(e,t):void 0}}(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){(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 R=function(){return ctDashboardLocalizations.plugin_data.hide_support_section?null:(0,e.createElement)("div",{className:"ct-support-container"},(0,e.createElement)("h2",null,(0,o.__)("Need help or advice?","blocksy-companion")),(0,e.createElement)("p",null,(0,o.__)("Got a question or need help with the theme? You can always submit a support ticket or ask for help in our friendly Facebook community.","blocksy-companion")),(0,e.createElement)("a",{href:ctDashboardLocalizations.support_url,className:"ct-button","data-hover":"blue",target:"_blank"},(0,o.__)("Submit a Support Ticket","blocksy-companion")),(0,e.createElement)("a",{href:"https://www.facebook.com/groups/blocksy.community",className:"ct-button","data-hover":"blue",target:"_blank"},(0,o.__)("Join Facebook Community","blocksy-companion")))};function F(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 U(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?F(Object(n),!0).forEach((function(t){V(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function V(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function H(e,t,n,r,o,a,i){try{var c=e[a](i),l=c.value}catch(e){return void n(e)}c.done?t(l):Promise.resolve(l).then(r,o)}function q(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,a=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}return n}}(e,t)||function(e,t){if(e){if("string"==typeof e)return W(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)?W(e,t):void 0}}(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 W(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var G=null,Z=function(t){var n=t.extension,r=t.onExtsSync,a=q(N(n),2),c=a[0],l=a[1],s=q(function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},r=I((0,e.useState)(!1),2),a=r[0],i=r[1],c=I((0,e.useState)(!1),2),l=c[0],s=c[1],u=(0,e.useContext)(z),m=(u.Link,u.history),d=ctDashboardLocalizations.plugin_data.is_pro,p=function(){var e=T(regeneratorRuntime.mark((function e(){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(d||!t.config.pro){e.next=3;break}return s(!0),e.abrupt("return");case 3:return(r=new FormData).append("ext",t.name),r.append("action",t.__object?"blocksy_extension_deactivate":"blocksy_extension_activate"),i(!0),e.prev=7,e.next=10,fetch(ctDashboardLocalizations.ajax_url,{method:"POST",body:r});case 10:t.config.require_refresh&&location.reload(),n(),e.next=16;break;case 14:e.prev=14,e.t0=e.catch(7);case 16:i(!1);case 17:case"end":return e.stop()}}),e,null,[[7,14]])})));return function(){return e.apply(this,arguments)}}();return[a,p,!d&&t.config.pro?(0,e.createElement)(P,{items:l,className:"ct-onboarding-modal",onDismiss:function(){return s(!1)},render:function(){return(0,e.createElement)("div",{className:"ct-modal-content"},(0,e.createElement)("svg",{width:"55",height:"55",viewBox:"0 0 40.5 48.3"},(0,e.createElement)("path",{fill:"#2d82c8",d:"M33.4 29.4l7.1 12.3-7.4.6-4 6-7.3-12.9"}),(0,e.createElement)("path",{d:"M33.5 29.6L26 42.7l-4.2-7.3 11.6-6 .1.2zM0 41.7l7.5.6 3.9 6 7.2-12.4-11-7.3L0 41.7z",fill:"#2271b1"}),(0,e.createElement)("path",{d:"M39.5 18.7c0 1.6-2.4 2.8-2.7 4.3-.4 1.5 1 3.8.2 5.1-.8 1.3-3.4 1.2-4.5 2.3-1.1 1.1-1 3.7-2.3 4.5-1.3.8-3.6-.6-5.1-.2-1.5.4-2.7 2.7-4.3 2.7S18 35 16.5 34.7c-1.5-.4-3.8 1-5.1.2s-1.2-3.4-2.3-4.5-3.7-1-4.5-2.3.6-3.6.2-5.1-2.7-2.7-2.7-4.3 2.4-2.8 2.7-4.3c.4-1.5-1-3.8-.2-5.1C5.4 8 8.1 8.1 9.1 7c1.1-1.1 1-3.7 2.3-4.5s3.6.6 5.1.2C18 2.4 19.2 0 20.8 0c1.6 0 2.8 2.4 4.3 2.7 1.5.4 3.8-1 5.1-.2 1.3.8 1.2 3.4 2.3 4.5 1.1 1.1 3.7 1 4.5 2.3s-.6 3.6-.2 5.1c.3 1.5 2.7 2.7 2.7 4.3z",fill:"#599fd9"}),(0,e.createElement)("path",{d:"M23.6 7c-6.4-1.5-12.9 2.5-14.4 8.9-.7 3.1-.2 6.3 1.5 9.1 1.7 2.7 4.3 4.6 7.4 5.4.9.2 1.9.3 2.8.3 2.2 0 4.4-.6 6.3-1.8 2.7-1.7 4.6-4.3 5.4-7.5C34 15 30 8.5 23.6 7zm7 14c-.6 2.6-2.2 4.8-4.5 6.2-2.3 1.4-5 1.8-7.6 1.2-2.6-.6-4.8-2.2-6.2-4.5-1.4-2.3-1.8-5-1.2-7.6.6-2.6 2.2-4.8 4.5-6.2 1.6-1 3.4-1.5 5.2-1.5.8 0 1.5.1 2.3.3 5.4 1.3 8.7 6.7 7.5 12.1zm-8.2-4.5l3.7.5-2.7 2.7.7 3.7-3.4-1.8-3.3 1.8.6-3.7-2.7-2.7 3.8-.5 1.6-3.4 1.7 3.4z",fill:"#fff"})),(0,e.createElement)("h2",{className:"ct-modal-title"},"This is a Pro extension"),(0,e.createElement)("p",null,(0,o.__)("Upgrade to the Pro version and get instant access to all premium extensions, features and future updates.","blocksy-companion")),(0,e.createElement)("div",{className:"ct-modal-actions has-divider","data-buttons":"2"},(0,e.createElement)("a",{onClick:function(e){e.preventDefault(),s(!1),setTimeout((function(){m.navigate("/pro")}),300)},className:"button"},(0,o.__)("Free vs Pro","blocksy")),(0,e.createElement)("a",{href:"https://creativethemes.com/blocksy/pricing/",target:"_blank",className:"button button-primary"},(0,o.__)("Upgrade Now","blocksy-companion"))))}}):null]}(n,(function(){r()})),3),u=s[0],m=s[1],d=s[2];return(0,e.createElement)("li",{className:i()({active:!!n.__object})},(0,e.createElement)("h4",{className:"ct-extension-title"},n.config.name,u&&(0,e.createElement)("svg",{width:"15",height:"15",viewBox:"0 0 100 100"},(0,e.createElement)("g",{transform:"translate(50,50)"},(0,e.createElement)("g",{transform:"scale(1)"},(0,e.createElement)("circle",{cx:"0",cy:"0",r:"50",fill:"#687c93"}),(0,e.createElement)("circle",{cx:"0",cy:"-26",r:"12",fill:"#ffffff",transform:"rotate(161.634)"},(0,e.createElement)("animateTransform",{attributeName:"transform",type:"rotate",calcMode:"linear",values:"0 0 0;360 0 0",keyTimes:"0;1",dur:"1s",begin:"0s",repeatCount:"indefinite"})))))),n.config.description&&(0,e.createElement)("div",{className:"ct-extension-description"},n.config.description),(0,e.createElement)("div",{className:"ct-extension-actions"},(0,e.createElement)("button",{className:i()(n.__object?"ct-button":"ct-button-primary"),"data-hover":"white",disabled:u,onClick:function(){m()}},n.__object?(0,o.__)("Deactivate","blocksy-companion"):(0,o.__)("Activate","blocksy-companion")),n.readme&&(0,e.createElement)("button",{onClick:function(){return c()},className:"ct-minimal-button ct-instruction"},(0,e.createElement)("svg",{width:"16",height:"16",viewBox:"0 0 24 24"},(0,e.createElement)("path",{d:"M12,2C6.477,2,2,6.477,2,12s4.477,10,10,10s10-4.477,10-10S17.523,2,12,2z M12,17L12,17c-0.552,0-1-0.448-1-1v-4 c0-0.552,0.448-1,1-1h0c0.552,0,1,0.448,1,1v4C13,16.552,12.552,17,12,17z M12.5,9h-1C11.224,9,11,8.776,11,8.5v-1 C11,7.224,11.224,7,11.5,7h1C12.776,7,13,7.224,13,7.5v1C13,8.776,12.776,9,12.5,9z"}))),n.__object&&n.config&&n.config.buttons&&n.config.buttons.map((function(t,n){var r=t.text,o=t.url;return(0,e.createElement)("a",{href:o,className:"ct-button ct-config-btn",dataButton:"white"},r)}))),l,d)},$=function(){var t=q((0,e.useState)(!G),2),n=t[0],a=t[1],c=q((0,e.useState)(G||[]),2),l=c[0],s=c[1],u=q((0,e.useState)(!1),2),m=u[0],d=u[1],p=q((0,e.useState)("free"),2),f=p[0],y=p[1],b=function(){var e,t=(e=regeneratorRuntime.mark((function e(){var t,n,r,o,i,c,l,u,m,p=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=p.length>0&&void 0!==p[0]?p[0]:{},n=U({verbose:!1,extension:null,extAction:null},t),r=n.verbose,o=n.extension,i=n.extAction,r&&a(!0),d(!0),e.next=6,fetch("".concat(wp.ajax.settings.url,"?action=blocksy_extensions_status"),U({method:"POST"},o&&i?{body:JSON.stringify({extension:o,extAction:i})}:{}));case 6:if(200===(c=e.sent).status){e.next=9;break}return e.abrupt("return");case 9:return e.next=11,c.json();case 11:if(l=e.sent,u=l.success,m=l.data,u){e.next=16;break}return e.abrupt("return");case 16:if(d(!1),a(!1),s(m),G=m,!o){e.next=22;break}return e.abrupt("return",m[o]);case 22:return e.abrupt("return",m);case 23:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){H(a,r,o,i,c,"next",e)}function c(e){H(a,r,o,i,c,"throw",e)}i(void 0)}))});return function(){return t.apply(this,arguments)}}();(0,e.useEffect)((function(){b({verbose:!G});var e=function(){b()};return r().on("blocksy_exts_sync_exts",e),function(){r().off("blocksy_exts_sync_exts",e)}}),[]);var h=(0,e.useMemo)((function(){return Object.values(l).map((function(e,t){return U(U({},e),{},{name:Object.keys(l)[t]})})).find((function(e){return e.config.pro}))}),[l]),v=(0,e.useMemo)((function(){return Object.values(l).map((function(e,t){return U(U({},e),{},{name:Object.keys(l)[t]})})).filter((function(e){return!e.config.hidden})).filter((function(e){var t=e.config;return"free"===f?!t.pro:t.pro}))}),[f,l]);return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"ct-extensions-container"},(0,e.createElement)(j.Transition,{items:n,from:{opacity:0},enter:[{opacity:1}],leave:[{opacity:0}],initial:null,config:function(e,t){return"leave"===t?{duration:300}:{delay:300,duration:300}}},(function(t){return t?function(t){return(0,e.createElement)(j.animated.p,{style:t,className:"ct-loading-text"},(0,e.createElement)("span",null),(0,o.__)("Loading Extensions Status...","blocksy-companion"))}:function(t){return(0,e.createElement)(j.animated.div,{style:t},(0,e.createElement)(e.Fragment,null,h&&(0,e.createElement)("ul",{className:"ct-extensions-sourse"},["free","pro"].map((function(t){return(0,e.createElement)("li",{key:t,onClick:function(){return y(t)},className:i()({active:t===f})},{free:(0,o.__)("Free Extensions","blocksy-companion"),pro:(0,o.__)("Pro Extensions","blocksy-companion")}[t])}))),(0,e.createElement)("ul",{className:i()("ct-extensions-list",{"is-pro":"pro"===f})},v.map((function(t){var n={extension:Z};return r().trigger("ct:extensions:card",{CustomComponent:n,extension:t}),(0,e.createElement)(n.extension,{key:t.name,extension:t,extsSyncLoading:m,onExtsSync:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.extAction||(l[t.name].__object=!l[t.name].__object,s(l)),b(U(U({},e),{},{extension:t.name}))}})}))),(0,e.createElement)(R,null)))}}))))},K=function(t){var n=t.children,r=t.activated,o=t.checked,a=t.onChange;return(0,e.createElement)("div",{onClick:function(){return a()},className:i()("ct-checkbox-container",{activated:r})},n,(0,e.createElement)("span",{className:i()("ct-checkbox",{active:o})},(0,e.createElement)("svg",{width:"10",height:"8",viewBox:"0 0 11.2 9.1"},(0,e.createElement)("polyline",{class:"check",points:"1.2,4.8 4.4,7.9 9.9,1.2 "}))))};function J(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?J(Object(n),!0).forEach((function(t){X(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):J(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function X(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Q(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 ee=function(e){return{"stackable-ultimate-gutenberg-blocks":"Stackable – Gutenberg Blocks","wpforms-lite":"WPForms - Contact Form",woocommerce:"WooCommerce",elementor:"Elementor",brizy:"Brizy",getwid:"Getwid","simply-gallery-block":"SimpLy Gallery Block & Lightbox","recipe-card-blocks-by-wpzoom":"Recipe Card Blocks by WPZOOM","map-block-gutenberg":"Map Block for Google Maps","mb-custom-post-type":"MB Custom Post Types & Custom Taxonomies",leadin:"HubSpot","block-slider":"Block Slider"}},te=function(e){return(ee[e]||e).replace(/\b\w/,(function(e){return e.toUpperCase()}))},ne=function(t){var n,r,a=t.demoConfiguration,i=t.setDemoConfiguration,c=t.style,l=(0,e.useContext)(We),s=l.currentDemo,u=l.demos_list,m=l.pluginsStatus,d=(l.setCurrentDemo,n=(s||"").split(":"),r=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,a=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}return n}}(n,r)||function(e,t){if(e){if("string"==typeof e)return Q(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)?Q(e,t):void 0}}(n,r)||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.")}()),p=d[0];return d[1],u.filter((function(e){return e.name===p||""})),(0,e.createElement)("div",{style:c},(0,e.createElement)("div",{className:"ct-demo-plugins"},(0,e.createElement)("i",{className:"ct-demo-icon"},(0,e.createElement)("svg",{width:"40",height:"40",viewBox:"0 0 40 40"},(0,e.createElement)("path",{fill:"#0C7AB3",d:"M20,0v7.6c0,0.3-0.2,0.5-0.5,0.5h-1.5c0,0,0,0,0,0c0,0,0,0-0.1,0c0,0,0,0-0.1,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c-0.5-0.7-1.3-1.1-2.1-1.1c-1.5,0-2.6,1.2-2.6,2.6c0,1.5,1.2,2.6,2.6,2.6c0.8,0,1.6-0.4,2.1-1.1c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0.1,0c0,0,0,0,0.1,0c0,0,0,0,0,0h1.5c0,0,0,0,0,0c0.3,0,0.5,0.2,0.5,0.5V20h8.1v-0.8c-0.8-0.7-1.3-1.7-1.3-2.8c0-2,1.7-3.7,3.7-3.7c2,0,3.7,1.7,3.7,3.7c0,1.1-0.5,2.1-1.3,2.8V20H40C40,9,31,0,20,0z"}),(0,e.createElement)("path",{fill:"#3497D3",d:"M20,40v-7.6c0-0.3,0.2-0.5,0.5-0.5h1.5c0,0,0,0,0,0c0,0,0,0,0.1,0c0,0,0,0,0.1,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0.5,0.7,1.3,1.1,2.1,1.1c1.5,0,2.6-1.2,2.6-2.6c0-1.5-1.2-2.6-2.6-2.6c-0.8,0-1.6,0.4-2.1,1.1c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0-0.1,0c0,0,0,0-0.1,0c0,0,0,0,0,0h-1.5c0,0,0,0,0,0c-0.3,0-0.5-0.2-0.5-0.5V20h-8.1v0.8c0.8,0.7,1.3,1.7,1.3,2.8c0,2-1.7,3.7-3.7,3.7c-2,0-3.7-1.7-3.7-3.7c0-1.1,0.5-2.1,1.3-2.8V20H0C0,31,9,40,20,40z"}))),(0,e.createElement)("h2",null,(0,o.__)("Install & Activate Plugins","blocksy-companion")),(0,e.createElement)("p",null,(0,o.__)("The following plugins are required for this starter site in order to work properly.","blocksy-companion")),a.plugins.map((function(t){var n=t.plugin,r=t.enabled;return(0,e.createElement)(e.Fragment,{key:n},!m[n]&&(0,e.createElement)(K,{key:n,checked:r,onChange:function(){return i(Y(Y({},a),{},{plugins:a.plugins.map((function(e){return e.plugin===n?Y(Y({},e),{},{enabled:!r}):e}))}))}},te(n)),m[n]&&(0,e.createElement)(K,{activated:!0,checked:!0,onChange:function(){}},te(n)))}))))},re=function(){var t=(0,e.useContext)(We),n=t.currentlyInstalledDemo,r=t.demos_list,a=t.setCurrentDemo,c=t.demo_error,l=t.setInstallerBlockingReleased;return(0,e.useContext)(z).Link,(0,e.createElement)("ul",null,r.filter((function(e,t){return r.map((function(e){return e.name})).indexOf(e.name)===t})).map((function(t){return(0,e.createElement)("li",{key:t.name,className:i()("ct-single-demo",{"ct-is-pro":t.is_pro})},(0,e.createElement)("figure",null,(0,e.createElement)("img",{src:t.screenshot}),(0,e.createElement)("section",null,(0,e.createElement)("h3",null,(0,o.__)("Available for","blocksy-companion")),(0,e.createElement)("div",null,r.filter((function(e){return e.name===t.name||""})).sort((function(e,t){return e.builder<t.builder?-1:e.builder>t.builder?1:0})).map((function(t){var n=t.builder;return(0,e.createElement)("span",{key:n},te(n)||"Gutenberg")})))),t.is_pro&&(0,e.createElement)("a",{onClick:function(e){return e.preventDefault()},href:"#"},"PRO")),(0,e.createElement)("div",{className:"ct-demo-actions"},(0,e.createElement)("h4",null,t.name),(0,e.createElement)("div",null,(0,e.createElement)("a",{className:"ct-button",target:"_blank",href:t.url},(0,o.__)("Preview","blocksy-companion")),(0,e.createElement)("button",{className:"ct-button-primary",onClick:function(){l(!1),a(t.name)},disabled:!!c},n&&n.demo.indexOf(t.name)>-1?(0,o.__)("Modify","blocksy-companion"):(0,o.__)("Import","blocksy-companion")))))})))};function oe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,a=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}return n}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ae(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)?ae(e,t):void 0}}(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 ae(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 ie=function(t){var n=t.style,r=t.nextStep,a=((0,e.useContext)(z).is_child_theme,(0,e.useContext)(We)),i=a.setCurrentlyInstalledDemo,c=a.setCurrentDemo,l=a.currentDemo,s=a.demos_list,u=oe((0,e.useState)(0),2),m=u[0],d=u[1],p=oe((0,e.useState)("idle"),2),f=p[0],y=p[1],b=oe((l||"").split(":"),2),h=b[0],v=(b[1],s.filter((function(e){return e.name===h}))),g={erase_content:{title:(0,o.__)("Erase content","blocksy-companion"),query_string:"action=blocksy_demo_erase_content&wp_customize=on"},deactivate_demo_plugins:{title:(0,o.__)("Deactivate demo plugins","blocksy-companion"),query_string:"action=blocksy_demo_deactivate_plugins&plugins=".concat(v[0].plugins.join(":"))},deregister_current_demo:{title:(0,o.__)("Erase content","blocksy-companion"),query_string:"action=blocksy_demo_deregister_current_demo"}},_=["erase_content","deactivate_demo_plugins","deregister_current_demo"],E=_[m],w=function(){var e=g[E],t=new EventSource("".concat(ctDashboardLocalizations.ajax_url,"?").concat(e.query_string));t.onmessage=function(e){if("complete"===JSON.parse(e.data).action){if(t&&t.close&&t.close(),m===_.length-1)return void y("done");d(Math.min(_.length-1,m+1))}}};return(0,e.useEffect)((function(){0!==m&&"done"!==f&&w()}),[E]),(0,e.createElement)("div",{className:"ct-modify-demo",style:n},(0,e.createElement)("i",{className:"ct-demo-icon"},(0,e.createElement)("svg",{width:"36",height:"36",viewBox:"0 0 40 40"},(0,e.createElement)("path",{d:"M5.71,40a1,1,0,0,1-1-1V21.59a1,1,0,0,1,1.91,0V39.05A1,1,0,0,1,5.71,40Zm1-31.83V1.07A1,1,0,0,0,5.71,0a1,1,0,0,0-1,1.07v7.1a1,1,0,0,0,1,1.07A1,1,0,0,0,6.67,8.17ZM21,39.05V34.29a1,1,0,1,0-1.9,0v4.76a1,1,0,1,0,1.9,0Zm0-18.14V1a1,1,0,1,0-1.9,0V20.91a1,1,0,1,0,1.9,0ZM35.24,39.05V26.35a1,1,0,0,0-1.91,0v12.7a1,1,0,0,0,1.91,0Zm0-26.25V1a1,1,0,1,0-1.91,0V12.8a1,1,0,1,0,1.91,0Z",transform:"translate(-0.71)",fill:"#dae3e8"}),(0,e.createElement)("path",{d:"M5.71,18.06a5,5,0,1,1,5-5A5,5,0,0,1,5.71,18.06ZM20,30.76a5,5,0,1,1,5-5A5,5,0,0,1,20,30.76Zm14.29-7.93a5,5,0,1,1,5-5A5,5,0,0,1,34.29,22.83Z",transform:"translate(-0.71)",fill:"#0c7ab3"}))),"idle"===f&&(0,e.createElement)("h2",null,(0,o.__)("This starter site is already installed","blocksy-companion")),"loading"===f&&(0,e.createElement)("h2",null,"Removing starter site..."),"done"===f&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",null,(0,o.__)("Starter Site Removed","blocksy-companion")),(0,e.createElement)("div",{className:"ct-modify-actions"},(0,e.createElement)("button",{className:"ct-demo-btn ct-dismiss",onClick:function(e){e.preventDefault(),c("".concat(h,":hide"))}},(0,o.__)("Dismiss","blocksy-companion")))),"idle"===f&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)("p",null,(0,o.__)("What steps do you want to perform next?","blocksy-companion")),(0,e.createElement)("div",{className:"ct-modify-actions"},(0,e.createElement)("button",{className:"ct-demo-btn demo-remove",onClick:function(e){y("loading"),e.preventDefault(),w(),i()}},(0,o.__)("Remove","blocksy-companion")),(0,e.createElement)("button",{className:"ct-demo-btn",onClick:function(e){e.preventDefault(),r()}},(0,o.__)("Reinstall","blocksy-companion")))))};function ce(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function le(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ce(Object(n),!0).forEach((function(t){se(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ce(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function se(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ue=function(t){var n=t.demoConfiguration,r=t.setDemoConfiguration,a=t.style,i=(0,e.useContext)(z),c=i.is_child_theme,l=i.child_theme_exists;return(0,e.createElement)("div",{className:"ct-demo-child",style:a},(0,e.createElement)("i",{className:"ct-demo-icon"},(0,e.createElement)("svg",{width:"40",height:"40",viewBox:"0 0 43 41.1"},(0,e.createElement)("path",{fill:"#DBE7EE",d:"M0,39.5c0,0.9,0.7,1.6,1.5,1.6h32.3c0.9,0,1.5-0.7,1.5-1.6V14H0V39.5z"}),(0,e.createElement)("path",{fill:"#BDC8D7",d:"M18.2,41.1h15.6c0.9,0,1.5-0.7,1.5-1.6V14H7.6L8,32.4L18.2,41.1z"}),(0,e.createElement)("path",{fill:"#BDC8D7",d:"M0,15.6V9.8c0-0.9,0.7-1.6,1.5-1.6h32.3c0.9,0,1.5,0.7,1.5,1.6v5.8H0z"}),(0,e.createElement)("path",{fill:"#3497D3",d:"M7.6,31.3c0,0.9,0.7,1.6,1.5,1.6h32.4c0.9,0,1.5-0.7,1.5-1.6V5.8H7.6V31.3z"}),(0,e.createElement)("path",{fill:"#0C7AB3",d:"M7.6,7.4V1.6C7.6,0.7,8.3,0,9.1,0h32.4C42.4,0,43,0.7,43,1.6v5.8H7.6z"}),(0,e.createElement)("rect",{x:"11.2",y:"11",fill:"#44ACDF",width:"16.8",height:"17.9"}),(0,e.createElement)("rect",{x:"31.5",y:"11",fill:"#44ACDF",width:"7.9",height:"17.9"}))),l?(0,e.createElement)("h2",null,(0,o.__)("Activate Child Theme","blocksy-companion")):(0,e.createElement)("h2",null,(0,o.__)("Install Child Theme","blocksy-companion")),!c&&(0,e.createElement)(e.Fragment,null,l?(0,e.createElement)("p",null,(0,o.__)("We strongly recommend to activate the child theme, this way you will have freedom to make changes without breaking the parent theme.","blocksy-companion")):(0,e.createElement)("p",null,(0,o.__)("We strongly recommend to install the child theme, this way you will have freedom to make changes without breaking the parent theme.","blocksy-companion")),(0,e.createElement)(K,{checked:n.child_theme,onChange:function(){return r(le(le({},n),{},{child_theme:!n.child_theme}))}},l?(0,o.__)("Activate Child Theme","blocksy-companion"):(0,o.__)("Install Child Theme","blocksy-companion"))),c&&(0,o.__)("You already have a child theme properly installed and activated. Move on.","blocksy-companion"),(0,e.createElement)("a",{href:"https://developer.wordpress.org/themes/advanced-topics/child-themes/",target:"_blank"},(0,o.__)("Learn more about child themes","blocksy-companion")))};function me(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function de(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?me(Object(n),!0).forEach((function(t){pe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):me(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function pe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ye=function(t){var n,r,a=t.demoConfiguration,c=t.setDemoConfiguration,l=t.style,s=(0,e.useContext)(We),u=s.currentDemo,m=s.demos_list,d=(s.pluginsStatus,s.setCurrentDemo,n=(u||"").split(":"),r=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,a=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}return n}}(n,r)||function(e,t){if(e){if("string"==typeof e)return fe(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)?fe(e,t):void 0}}(n,r)||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.")}()),p=d[0],f=(d[1],m.filter((function(e){return e.name===p||""})));return(0,e.createElement)("div",{style:l},f.length>1&&(0,e.createElement)("div",{className:"ct-demo-builder"},(0,e.createElement)("i",{className:"ct-demo-icon"},(0,e.createElement)("svg",{width:"52",height:"40",viewBox:"0 0 52 40"},(0,e.createElement)("path",{fill:"#DBE7EE",d:"M0,38.1C0,39.1,0.9,40,1.8,40h39.3c1.1,0,1.8-0.9,1.8-1.9v-31H0V38.1z"}),(0,e.createElement)("path",{fill:"#CFDBE4",d:"M13.8,14.6v18.8h22.6V14.6H13.8zM34.8,31.9H15.4V16.1h19.4V31.9z"}),(0,e.createElement)("path",{fill:"#BDC8D7",d:"M13.1,15.3L13.1,15.3c0-0.8,0.6-1.4,1.4-1.4l0,0c0.8,0,1.4,0.6,1.4,1.4l0,0c0,0.8-0.6,1.4-1.4,1.4l0,0C13.7,16.8,13.1,16.1,13.1,15.3z M34.1,15.3L34.1,15.3c0-0.8,0.6-1.4,1.4-1.4l0,0c0.8,0,1.4,0.6,1.4,1.4l0,0c0,0.8-0.6,1.4-1.4,1.4l0,0C34.8,16.8,34.1,16.1,34.1,15.3z M13.1,32.7L13.1,32.7c0-0.8,0.6-1.4,1.4-1.4l0,0c0.8,0,1.4,0.6,1.4,1.4l0,0c0,0.8-0.6,1.4-1.4,1.4l0,0C13.7,34.1,13.1,33.5,13.1,32.7z M34.1,32.7L34.1,32.7c0-0.8,0.6-1.4,1.4-1.4l0,0c0.8,0,1.4,0.6,1.4,1.4l0,0c0,0.8-0.6,1.4-1.4,1.4l0,0C34.8,34.1,34.1,33.5,34.1,32.7z M23.3,15.3L23.3,15.3c0-0.8,0.6-1.4,1.4-1.4l0,0c0.8,0,1.4,0.6,1.4,1.4l0,0c0,0.8-0.6,1.4-1.4,1.4l0,0C24,16.8,23.3,16.1,23.3,15.3z M4.2,13.9h5.9v7.9H4.2V13.9zM4.2,23.3h5.9v2.9H4.2V23.3zM0,9V1.9C0,0.9,0.9,0,1.8,0h39.3c1.1,0,1.8,0.9,1.8,1.9V9H0z M42.9,35.4V10.9h-9.3v15.2L42.9,35.4zM7.2,27.6c-1.6,0-3,1.3-3,3c0,1.6,1.3,3,3,3s3-1.3,3-3C10.2,28.9,8.8,27.6,7.2,27.6z"}),(0,e.createElement)("path",{fill:"#0C7AB3",d:"M50,27.8H35.6c-1.1,0-2-0.9-2-2v-18c0-1.1,0.9-2,2-2H50c1.1,0,2,0.9,2,2v18C52,26.9,51.1,27.8,50,27.8z"}),(0,e.createElement)("path",{fill:"#44ACDF",d:"M49,17.5H36.8c-0.7,0-1.2-0.5-1.2-1.2V9.1c0-0.7,0.5-1.2,1.2-1.2H49c0.7,0,1.2,0.5,1.2,1.2v7.3C50.2,17,49.6,17.5,49,17.5z M50.2,20.4v-0.1c0-0.5-0.4-1-1-1H36.5c-0.5,0-1,0.4-1,1v0.1c0,0.5,0.4,1,1,1h12.7C49.7,21.4,50.2,20.9,50.2,20.4z M40.8,25.2h-4.3c-0.5,0-1-0.4-1-1v-0.1c0-0.5,0.4-1,1-1h4.3c0.5,0,1,0.4,1,1v0.1C41.7,24.8,41.3,25.2,40.8,25.2z M49.2,25.2h-4.3c-0.5,0-1-0.4-1-1v-0.1c0-0.5,0.4-1,1-1h4.3c0.5,0,1,0.4,1,1v0.1C50.2,24.8,49.7,25.2,49.2,25.2z"}),(0,e.createElement)("path",{fill:"#C8E6F4",d:"M47.4,11.2h-9.1c-0.2,0-0.5-0.2-0.5-0.4v0c0-0.2,0.2-0.4,0.5-0.4h9.1c0.2,0,0.5,0.2,0.5,0.4v0C47.8,11,47.6,11.2,47.4,11.2z M47.9,14.7L47.9,14.7c0-0.2-0.2-0.5-0.5-0.5h-9.1c-0.2,0-0.4,0.2-0.4,0.4v0c0,0.2,0.2,0.4,0.4,0.4h9.1C47.7,15.1,47.9,14.9,47.9,14.7z"}),(0,e.createElement)("path",{fill:"#FFFFFF",d:"M26.3,20.8h-2.9l-2.9,7.9H23l0.3-0.7h2.8l0.3,0.7h2.7L26.3,20.8z M23.9,25.8l0.8-2.2h0l0.8,2.2H23.9zM46.5,10.7c0,0.8-0.7,1.5-1.5,1.5s-1.5-0.7-1.5-1.5c0-0.8,0.7-1.5,1.5-1.5S46.5,9.9,46.5,10.7zM42.1,14.7c0,0.8-0.7,1.5-1.5,1.5s-1.5-0.7-1.5-1.5s0.7-1.5,1.5-1.5S42.1,13.9,42.1,14.7z"}))),(0,e.createElement)("h2",null,(0,o.__)("Choose Page Builder","blocksy-companion")),(0,e.createElement)("p",null,(0,o.__)("This starter site can be imported and used with one of these page builders. Please select your prefered one in order to continue.","blocksy-companion")),(0,e.createElement)("ul",{"data-count":f.length},f.sort((function(e,t){return e.builder<t.builder?-1:e.builder>t.builder?1:0})).map((function(t){var n=t.builder,r=t.plugins;return(0,e.createElement)("li",{className:i()({active:n===(null===a.builder?f[0].builder:a.builder)}),onClick:function(){return c(de(de({},a),{},{builder:n,plugins:r.map((function(e){return{plugin:e,enabled:!0}}))}))}},(0,e.createElement)("figure",null,(0,e.createElement)("span",{className:i()("ct-checkbox",{active:n===(null===a.builder?f[0].builder:a.builder)})},(0,e.createElement)("svg",{width:"10",height:"8",viewBox:"0 0 11.2 9.1"},(0,e.createElement)("polyline",{className:"check",points:"1.2,4.8 4.4,7.9 9.9,1.2 "}))),""===n&&(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 150 100"},(0,e.createElement)("path",{d:"M122.5 35.5c-1.7-1.1-4-.7-5.1 1C110.8 46.4 96.8 47 96 47h-.3c-17.4 0-24 14.8-24.3 15.4-.8 1.9.1 4 1.9 4.8.5.2 1 .3 1.5.3 1.4 0 2.7-.8 3.4-2.2.1-.1 4.6-10.3 16.3-11v19c-.5 4.1-2.4 7.3-5.8 9.7-3.6 2.5-8.3 3.8-14.1 3.8-7 0-12.7-2.4-16.9-7.2-4.3-4.8-6.4-11.5-6.4-20.2l.1-20.9c.3-7.7 2.4-13.8 6.4-18.2 4.3-4.8 9.9-7.2 16.9-7.2 5.8 0 10.6 1.3 14.1 3.8 3.6 2.5 5.6 5.9 5.9 10.3v.5c0 2.5 2.1 4.6 4.6 4.6 2.5 0 4.6-2.1 4.6-4.6v-.5c-.7-6.6-3.7-11.9-9.1-15.8-5.4-4-12.2-5.9-20.4-5.9-9.7 0-17.6 3.2-23.5 9.6-5.6 6-8.6 13.8-8.9 23.5 0 .7-.1 1.3-.1 2l.1 18.8h-.1c0 10.7 3 19.2 9 25.5 6 6.4 13.8 9.6 23.5 9.6 8.2 0 14.9-1.9 20.4-5.9 5-3.6 7.9-8.4 8.9-14.3l.2-21c6.1-1.5 14.4-4.8 19.6-12.7 1.3-1.7.8-4-1-5.1z"})),"brizy"===n&&(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 150 100"},(0,e.createElement)("path",{d:"M14.6 36.7L75 0l60.4 36.7L75 73.4 14.6 36.7zm21.7.9L75 61.2l38.8-23.6L75 14 36.3 37.6z",fill:"#181c25"}),(0,e.createElement)("path",{fill:"#a7b2dd",d:"M14.6 63.2l10.8-6.5L75 86.8l49.9-30 10.5 6.4L75 100z"})),"elementor"===n&&(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 150 100"},(0,e.createElement)("path",{d:"M32.5 7.6h17v84.9h-17V7.6zm34 84.9h51v-17h-51v17zm0-34h51v-17h-51v17zm0-51v17h51v-17h-51z"}))),(0,e.createElement)("div",{className:"builder-name"},te(n)||"Gutenberg"))})))))};function be(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 he(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?be(Object(n),!0).forEach((function(t){ve(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):be(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ve(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ge=function(t){var n=t.demoConfiguration,r=t.setDemoConfiguration,a=(t.currentDemo,t.style);return(0,e.createElement)("div",{style:a},(0,e.createElement)("i",{className:"ct-demo-icon"},(0,e.createElement)("svg",{width:"40",height:"40",viewBox:"0 0 40 40"},(0,e.createElement)("path",{d:"M25,22.67a5,5,0,0,1-10,0H0V36a3.33,3.33,0,0,0,3.33,3.33H36.67A3.33,3.33,0,0,0,40,36V22.67Z",transform:"translate(0 -0.67)",fill:"#bdc8d7"}),(0,e.createElement)("rect",{x:"2.5",y:"14",width:"35",height:"3",rx:"1.5",fill:"#0c7ab3"}),(0,e.createElement)("rect",{x:"5",y:"7",width:"30",height:"3",rx:"1.5",fill:"#3497d3"}),(0,e.createElement)("rect",{x:"7.5",width:"25",height:"3",rx:"1.5",fill:"#44acdf"}))),(0,e.createElement)("h2",null,(0,o.__)("Import Content","blocksy-companion")),(0,e.createElement)("p",null,(0,o.__)("This will import posts, pages, comments, navigation menus, custom fields, terms and custom posts","blocksy-companion")),["options","widgets","content"].map((function(t){return(0,e.createElement)(K,{checked:n.content[t],onChange:function(){return r(he(he({},n),{},{content:he(he({},n.content),{},ve({},t,!n.content[t]))}))},key:t},t.split("_").map((function(e){return e.replace(/^\w/,(function(e){return e.toUpperCase()}))})).join(" "))})),(0,e.createElement)("div",{className:"ct-demo-erase"},(0,e.createElement)(K,{checked:n.content.erase_content,onChange:function(){return r(he(he({},n),{},{content:he(he({},n.content),{},{erase_content:!n.content.erase_content})}))}},(0,e.createElement)("div",null,(0,o.__)("Clean Install","blocksy-companion"),(0,e.createElement)("i",null,(0,o.__)("This option will remove the previous imported content and will perform a fresh and clean install.","blocksy-companion"))))))},_e=function(){var t=(0,e.useContext)(z),n=t.home_url,r=t.customizer_url;return(0,e.createElement)("div",{className:"ct-install-success"},(0,e.createElement)("h2",null,(0,o.__)("Starter Site Imported Successfully","blocksy-companion")),(0,e.createElement)("p",null,(0,o.__)("Now you can view your website or start customizing it","blocksy-companion")),(0,e.createElement)("div",null,(0,e.createElement)("a",{href:r,className:"ct-button"},(0,o.__)("Customize","blocksy-companion")),(0,e.createElement)("a",{href:n,target:"_blank",className:"ct-button-primary"},(0,o.__)("View site","blocksy-companion"))))},Ee=function(e,t){var n=e.action;if("complete"===n)return"";if("import_install_child"===n)return(0,o.__)("copying child theme sources","blocksy-companion");if("import_activate_child"===n)return(0,o.__)("activating child theme","blocksy-companion");if("install_plugin"===n)return(0,o.sprintf)((0,o.__)("installing plugin %s","blocksy-companion"),te(e.name)||e.name);if("activate_plugin"===n)return(0,o.sprintf)((0,o.__)("activating plugin %s","blocksy-companion"),te(e.name)||e.name);if("download_demo_widgets"===n)return(0,o.__)("downloading demo widgets","blocksy-companion");if("apply_demo_widgets"===n)return(0,o.__)("installing demo widgets","blocksy-companion");if("download_demo_options"===n)return(0,o.__)("downloading demo options","blocksy-companion");if("import_mods_images"===n)return(0,o.__)("importing images from customizer","blocksy-companion");if("import_customizer_options"===n)return(0,o.__)("import customizer options","blocksy-companion");if("activate_required_extensions"===n)return(0,o.__)("activating required extensions","blocksy-companion");if("erase_previous_posts"===n)return(0,o.__)("removing previously installed posts","blocksy-companion");if("erase_previous_terms"===n)return(0,o.__)("removing previously installed taxonomies","blocksy-companion");if("erase_default_pages"===n)return(0,o.__)("removing default WordPress pages","blocksy-companion");if("erase_customizer_settings"===n)return(0,o.__)("resetting customizer options","blocksy-companion");if("erase_widgets_data"===n)return(0,o.__)("resetting widgets","blocksy-companion");if("content_installer_progress"===n){if(!e.kind)return"";var r=t.content.preliminary_data["".concat(e.kind,"_count")],a=t.content["".concat(e.kind,"_count")];return"".concat(Math.min(a,r)," of ").concat(r," ").concat({users:(0,o.__)("users","blocksy-companion"),term:(0,o.__)("terms","blocksy-companion"),media:(0,o.__)("images","blocksy-companion"),post:(0,o.__)("posts","blocksy-companion"),comment:(0,o.__)("comments","blocksy-companion")}[e.kind])}return""};function we(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ke(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?we(Object(n),!0).forEach((function(t){Oe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):we(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Oe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,a=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}return n}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Se(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)?Se(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Se(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Ce=function(e){e.preventDefault(),e.returnValue=""},je=function(e){var t=e.demoConfiguration,n=e.pluginsStatus,r=e.is_child_theme,o=e.includeMetaSteps,a=[];return void 0!==o&&o&&a.push("register_current_demo"),t.child_theme&&(r||a.push("child_theme")),t.plugins.filter((function(e){var t=e.enabled,r=e.plugin;return!!t&&!n[r]})).length>0&&a.push("plugins"),t.content.erase_content&&a.push("erase_content"),t.content.options&&a.push("options"),t.content.widgets&&a.push("widgets"),t.content.content&&a.push("content"),a.push("install_finish"),a},De=function(t){var n=t.demoConfiguration,r=t.style,a=function(t){var n=(0,e.useContext)(We),r=n.demos_list,a=n.currentDemo,i=(n.setCurrentDemo,n.setInstallerBlockingReleased),c=n.setCurrentlyInstalledDemo,l=n.pluginsStatus,s=(0,e.useContext)(z),u=(s.home_url,s.customizer_url,s.is_child_theme),m=(s.Link,xe((0,e.useState)(!1),2)),d=m[0],p=m[1],f=xe((0,e.useState)(0),2),y=f[0],b=f[1],h=xe((a||"").split(":"),2),v=h[0],g=(h[1],r.filter((function(e){return e.name===v})).sort((function(e,t){return e.builder<t.builder?-1:e.builder>t.builder?1:0}))),_=t.plugins.filter((function(e){var t=e.enabled,n=e.plugin;return t&&!l[n]})).map((function(e){return e.plugin})),E=xe((0,e.useState)({register_current_demo:{title:(0,o.__)("Register demo","blocksy-companion"),query_string:"action=blocksy_demo_register_current_demo&wp_customize=on&demo_name=".concat(a,":").concat(null===t.builder?g[0].builder:t.builder),expected_signals:1},child_theme:{title:(0,o.__)("Child theme","blocksy-companion"),query_string:"action=blocksy_demo_install_child_theme",expected_signals:3},plugins:{title:(0,o.__)("Required plugins","blocksy-companion"),query_string:"action=blocksy_demo_activate_plugins&plugins=".concat(_.join(":")),expected_signals:2*_.length+1},fake_step:{title:(0,o.__)("Fake Required plugins","blocksy-companion"),query_string:"action=blocksy_demo_fake_step",expected_signals:6},erase_content:{title:(0,o.__)("Erase content","blocksy-companion"),query_string:"action=blocksy_demo_erase_content&wp_customize=on",expected_signals:6},install_finish:{title:(0,o.__)("Final touches","blocksy-companion"),query_string:"action=blocksy_demo_install_finish&wp_customize=on",expected_signals:1},options:{title:(0,o.__)("Import options","blocksy-companion"),query_string:"action=blocksy_demo_install_options&wp_customize=on&demo_name=".concat(a,":").concat(null===t.builder?g[0].builder:t.builder),expected_signals:5},widgets:{title:(0,o.__)("Import widgets","blocksy-companion"),query_string:"action=blocksy_demo_install_widgets&wp_customize=on&demo_name=".concat(a,":").concat(null===t.builder?g[0].builder:t.builder),expected_signals:3},content:{title:(0,o.__)("Import content","blocksy-companion"),query_string:"action=blocksy_demo_install_content&wp_customize=on&demo_name=".concat(a,":").concat(null===t.builder?g[0].builder:t.builder),expected_signals:50}}),2),w=E[0],k=E[1],O=je({demoConfiguration:t,pluginsStatus:l,is_child_theme:u,includeMetaSteps:!0}),x=O[y],S=xe((0,e.useState)(0),2),C=S[0],j=S[1],D=xe((0,e.useState)(null),2),P=D[0],A=D[1],N=(0,e.useRef)(C),M=(0,e.useRef)(w);(0,e.useEffect)((function(){N.current=C,M.current=w}));var L=function(e){return"content"===e?1===O.length?100:50:O.indexOf("content")>-1?50/(O.length-1):100/O.length},T=O.reduce((function(e,t,n){return n>=y?e:e+L(t)}),0)+100*C/w[x].expected_signals*(L(x)/100),I=function(){var e=w[x],t=new EventSource("".concat(ctDashboardLocalizations.ajax_url,"?").concat(e.query_string));t.onmessage=function(e){var n=JSON.parse(e.data);if(j(N.current+1),"content_installer_progress"===n.action){var r=n.kind;r&&(A(n),k(ke(ke({},M.current),{},{content:ke(ke({},M.current.content),{},Oe({},"".concat(r,"_count"),M.current.content["".concat(r,"_count")]+1))})))}else A(n);if("get_content_preliminary_data"===n.action){var o=n.data,a=(o.comment_count,o.media_count,o.post_count,o.term_count,o.users,ke(ke({},n.data),{},{term_count:n.data.terms.length,post_count:n.data.posts.filter((function(e){return"attachment"!==e.post_type})).length,media_count:n.data.posts.filter((function(e){return"attachment"===e.post_type})).length,comment_count:n.data.posts.reduce((function(e,t){return e+(t.comments||[]).length}),0),users_count:Object.keys(n.data.authors).length}));k(ke(ke({},M.current),{},{content:ke(ke({},M.current.content),{},{preliminary_data:a,comment_count:0,media_count:0,post_count:0,term_count:0,users_count:0,expected_signals:a.comment_count+a.media_count+a.post_count+a.term_count+a.users_count+3})}))}if("complete"===n.action){if(t&&t.close&&t.close(),y===O.length-1)return p(!0),i(!0),void window.removeEventListener("beforeunload",Ce);A(null),j(0),b(Math.min(O.length-1,y+1))}}};return(0,e.useEffect)((function(){d||(A(null),j(0),"fake_step"===x?(console.log("here we go delay before fake_step"),setTimeout((function(){I()}),2e3)):I())}),[x]),(0,e.useEffect)((function(){return window.addEventListener("beforeunload",Ce),c({demo:"".concat(a,":").concat(t.builder)}),function(){window.removeEventListener("beforeunload",Ce)}}),[]),{isCompleted:d,stepName:x,stepsDescriptors:w,lastMessage:P,progress:T}}(n),i=a.isCompleted,c=a.stepName,l=a.stepsDescriptors,s=a.lastMessage,u=a.progress;return(0,e.createElement)("div",{className:"ct-demo-install",style:r},(0,e.createElement)(j.Transition,{initial:!0,items:i,from:{opacity:0},enter:[{opacity:1}],leave:[{opacity:0}],config:function(e,t){return"leave"===t?{duration:300}:{delay:300,duration:300}}},(function(t){return function(n){return(0,e.createElement)("div",{style:n},t?(0,e.createElement)(_e,null):(0,e.createElement)(e.Fragment,null,(0,e.createElement)("i",{className:"ct-demo-icon"},(0,e.createElement)("svg",{width:"40",height:"40",viewBox:"0 0 50 50"},(0,e.createElement)("path",{class:"g1",d:"M47,38.8c0.3-1,0.5-2,0.5-3.1c0-1.1-0.2-2.1-0.5-3.1l0.2-0.1l1.8-1.7l-1.8-3.1l-2.3,0.7l-0.2,0.1c-1.4-1.5-3.3-2.7-5.4-3.1V25l-0.6-2.4h-3.5L34.5,25v0.3c-2.1,0.5-4,1.6-5.4,3.1l-0.2-0.1l-2.3-0.7l-1.8,3.1l1.7,1.7l0.2,0.1c-0.3,1-0.5,2-0.5,3.1c0,1.1,0.2,2.1,0.5,3.1l-0.2,0.1l-1.8,1.7l1.8,3.1l2.3-0.7l0.2-0.1c1.4,1.5,3.3,2.7,5.4,3.1v0.3l0.6,2.4h3.5l0.6-2.4V46c2.1-0.5,4-1.6,5.4-3.1l0.2,0.1l2.3,0.7l1.8-3.1l-1.7-1.7L47,38.8z M36.9,41.5c-3.3,0-5.9-2.6-5.9-5.9s2.6-5.9,5.9-5.9s5.9,2.6,5.9,5.9S40.1,41.5,36.9,41.5z"}),(0,e.createElement)("path",{class:"g2",d:"M21.2,32.2c0.2-0.8,0.4-1.7,0.4-2.5c0-0.9-0.1-1.7-0.4-2.5l0.3-0.2l1.7-1.7l-1.8-3.1L19.1,23l-0.3,0.2c-1.2-1.2-2.7-2.1-4.4-2.5v-0.3l-0.6-2.4h-3.5l-0.6,2.4v0.3c-1.7,0.4-3.2,1.3-4.4,2.5L5.1,23l-2.3-0.7L1,25.4L2.7,27L3,27.2c-0.2,0.8-0.4,1.7-0.4,2.5c0,0.9,0.1,1.7,0.4,2.5l-0.3,0.1L1,34.1l1.8,3.1l2.3-0.7l0.3-0.1c1.2,1.2,2.7,2.1,4.4,2.5v0.3l0.6,2.4h3.5l0.6-2.4v-0.3c1.7-0.4,3.2-1.3,4.4-2.5l0.3,0.1l2.3,0.7l1.8-3.1l-1.7-1.7L21.2,32.2z M12.1,34.4c-2.6,0-4.7-2.1-4.7-4.7S9.5,25,12.1,25s4.7,2.1,4.7,4.7S14.7,34.4,12.1,34.4z"}),(0,e.createElement)("path",{class:"g3",d:"M37.7,15.7c0.2-0.8,0.4-1.7,0.4-2.5c0-0.9-0.1-1.7-0.4-2.5l0.3-0.2l1.7-1.7l-1.8-3.1l-2.3,0.7l-0.3,0.2c-1.2-1.2-2.7-2.1-4.4-2.5V3.8l-0.6-2.4h-3.5l-0.6,2.4v0.3c-1.7,0.4-3.2,1.3-4.4,2.5l-0.3-0.2l-2.3-0.7l-1.8,3.1l1.7,1.7l0.3,0.2c-0.2,0.8-0.4,1.7-0.4,2.5c0,0.9,0.1,1.7,0.4,2.5l-0.3,0.1l-1.7,1.7l1.8,3.1l2.3-0.7l0.3-0.1c1.2,1.2,2.7,2.1,4.4,2.5v0.3l0.6,2.4h3.5l0.6-2.4v-0.3c1.7-0.4,3.2-1.3,4.4-2.5l0.3,0.1l2.3,0.7l1.8-3.1L38,15.9L37.7,15.7z M28.6,17.9c-2.6,0-4.7-2.1-4.7-4.7s2.1-4.7,4.7-4.7s4.7,2.1,4.7,4.7S31.2,17.9,28.6,17.9z"}))),(0,e.createElement)("h2",null,(0,o.__)("Installing","blocksy-companion"),"..."),(0,e.createElement)("p",null,(0,o.__)("Please be patient and don't refresh this page, the import process may take a while, this also depends on your server.","blocksy-companion")),(0,e.createElement)("div",{className:"ct-progress-info"},l[c].title,s&&Ee(s,l)?": ".concat(Ee(s,l)):"",(0,e.createElement)("span",null,Math.round(u),"%")),(0,e.createElement)("div",{style:{"--progress":"".concat(u,"%")},className:"ct-installer-progress"},(0,e.createElement)("div",null))))}})))};function Pe(e){return function(e){if(Array.isArray(e))return Me(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Ne(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 Ae(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,a=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}return n}}(e,t)||Ne(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 Ne(e,t){if(e){if("string"==typeof e)return Me(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)?Me(e,t):void 0}}function Me(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ze=function(t){t.location,t.navigate;var n=Ae((0,e.useState)(!0),2),r=(n[0],n[1],(0,e.useContext)(We)),a=r.installerBlockingReleased,c=r.demos_list,l=r.currentDemo,s=r.pluginsStatus,u=r.currentlyInstalledDemo,m=r.setCurrentDemo,d=(0,e.useContext)(z).is_child_theme,p=Ae((0,e.useState)(u),2),f=p[0],y=p[1],b=Ae((0,e.useState)({builder:"",child_theme:!1,plugins:[],content:{options:!0,widgets:!0,content:!0,erase_content:!0}}),2),h=b[0],v=b[1],g=Ae((0,e.useState)(0),2),_=g[0],E=g[1],w=Ae((l||"").split(":"),2),k=w[0],O=(w[1],["modify_demo","child_theme","builder","plugins","content","installer"].filter((function(e){if(!l)return!1;if("modify_demo"===e){if(!f)return!1;if(-1===f.demo.indexOf(k))return!1}if("child_theme"===e&&d)return!1;var t=c.filter((function(e){return e.name===k})).sort((function(e,t){return e.builder<t.builder?-1:e.builder>t.builder?1:0}));return("plugins"!==e||0!==t.reduce((function(e,t){return[].concat(Pe(e),Pe(t.plugins||[]))}),[]).filter((function(e){return!s[e]})).length)&&("builder"!==e||t.length>1)}))),x=O[_];return(0,e.useEffect)((function(){if(k&&!(l.indexOf(":hide")>-1)){var e=c.filter((function(e){return e.name===k})).sort((function(e,t){return e.builder<t.builder?-1:e.builder>t.builder?1:0}));E(0),y(u),v({builder:1===e.length?e[0].builder:null,child_theme:!1,plugins:e[0].plugins.map((function(e){return{plugin:e,enabled:!0}})),content:{options:!0,widgets:!0,content:!0,erase_content:!0}})}}),[l]),(0,e.createElement)(P,{items:l,isVisible:function(e){return e&&-1===e.indexOf(":hide")},className:i()("ct-demo-modal",{"ct-demo-installer":"installer"===x||"modify_demo"===x}),onDismiss:function(){("installer"!==x||a)&&m("".concat(k,":hide"))},render:function(){return(0,e.createElement)("div",{className:"ct-modal-content ct-demo-step-container"},(0,e.createElement)("div",{className:"ct-current-step"},(0,e.createElement)(j.Transition,{items:x,from:{opacity:0},enter:{opacity:1},leave:{opacity:0},initial:!1,config:function(e,t){return"leave"===t?{duration:150}:{delay:150,duration:150}}},(function(t){return function(n){return(0,e.createElement)(e.Fragment,null,"modify_demo"===t&&(0,e.createElement)(ie,{demoConfiguration:h,nextStep:function(){E(Math.min(_+1,O.length-1))},style:n}),"child_theme"===t&&(0,e.createElement)(ue,{style:n,demoConfiguration:h,setDemoConfiguration:v}),"plugins"===t&&(0,e.createElement)(ne,{demoConfiguration:h,style:n,setDemoConfiguration:v}),"builder"===t&&(0,e.createElement)(ye,{style:n,demoConfiguration:h,setDemoConfiguration:v}),"content"===t&&(0,e.createElement)(ge,{style:n,demoConfiguration:h,setDemoConfiguration:v}),"installer"===t&&(0,e.createElement)(De,{style:n,demoConfiguration:h}))}}))),"installer"!==x&&"modify_demo"!==x&&(0,e.createElement)("div",{className:"ct-demo-step-controls"},_>0&&(0,e.createElement)("button",{className:"ct-demo-btn demo-back-btn",onClick:function(){E(Math.max(_-1,0))}},(0,o.__)("Back","blocksy-companion")),O.length>2&&(0,e.createElement)("ul",{className:"ct-steps-pills"},O.map((function(t,n){return n===O.length-1?null:(0,e.createElement)("li",{className:i()({active:t===x}),key:t},n+1)}))),(0,e.createElement)("button",{className:"ct-demo-btn demo-main-btn",disabled:"content"===x&&0===je({demoConfiguration:h,pluginsStatus:s,is_child_theme:d}).length,onClick:function(){E(Math.min(_+1,O.length-1))}},"content"===x?(0,o.__)("Install","blocksy-companion"):(0,o.__)("Next","blocksy-companion"))))}})},Le=n(162),Te=n.n(Le);function Ie(e,t,n,r,o,a,i){try{var c=e[a](i),l=c.value}catch(e){return void n(e)}c.done?t(l):Promise.resolve(l).then(r,o)}function Be(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,a=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}return n}}(e,t)||Re(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Re(e,t){if(e){if("string"==typeof e)return Fe(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)?Fe(e,t):void 0}}function Fe(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 Ue=function(){var t=Be((0,e.useState)(!1),2),n=t[0],r=t[1],a=Be((0,e.useState)(!1),2),i=a[0],c=a[1],l=Be((0,e.useState)(""),2),s=l[0],u=l[1],m=Be((0,e.useState)(""),2),d=m[0],p=m[1],f=Be((0,e.useState)([]),2),y=f[0],b=f[1],h=Be((0,e.useState)(""),2),v=h[0],g=h[1],_=Be((0,e.useState)(!1),2),E=_[0],w=_[1],k=function(){var e,t=(e=regeneratorRuntime.mark((function e(){var t,n,o,a,i,c;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r(!0),(t=new FormData).append("action","blocksy_demo_export"),t.append("name",s),t.append("is_pro",E),t.append("url",v),t.append("builder",d),t.append("plugins",y.join(",")),t.append("wp_customize","on"),e.prev=9,e.next=12,fetch(ctDashboardLocalizations.ajax_url,{method:"POST",body:t});case 12:if(200!==(n=e.sent).status){e.next=20;break}return e.next=16,n.json();case 16:o=e.sent,a=o.success,i=o.data,a&&(c=new Blob([JSON.stringify(i.demo)],{type:"text/plain;charset=utf-8"}),Te().saveAs(c,"".concat(s,".json")));case 20:e.next=24;break;case 22:e.prev=22,e.t0=e.catch(9);case 24:r(!1);case 25:case"end":return e.stop()}}),e,null,[[9,22]])})),function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){Ie(a,r,o,i,c,"next",e)}function c(e){Ie(a,r,o,i,c,"throw",e)}i(void 0)}))});return function(){return t.apply(this,arguments)}}();return ct_localizations.is_dev_mode?(0,e.createElement)("div",{className:"ct-export"},(0,e.createElement)("button",{className:"ct-button",onClick:function(e){c(!0)}},(0,o.__)("Site export")),(0,e.createElement)(P,{items:i,className:"ct-site-export-modal",onDismiss:function(){return c(!1)},render:function(){return(0,e.createElement)("div",{className:"ct-site-export"},(0,e.createElement)("label",null,(0,o.__)("Name","blocksy-companion"),(0,e.createElement)("input",{type:"text",placeholder:(0,o.__)("Name","blocksy-companion"),value:s,onChange:function(e){var t=e.target.value;return u(t)}})),(0,e.createElement)("label",null,(0,o.__)("Preview URL","blocksy-companion"),(0,e.createElement)("input",{type:"text",placeholder:(0,o.__)("Preview URL","blocksy-companion"),value:v,onChange:function(e){var t=e.target.value;return g(t)}})),(0,e.createElement)("label",null,(0,o.__)("PRO","blocksy-companion"),(0,e.createElement)("input",{type:"checkbox",value:E,onChange:function(e){return e.target.value,w(!E)}})),(0,e.createElement)("label",null,(0,o.__)("Builder","blocksy-companion"),(0,e.createElement)("input",{type:"text",placeholder:(0,o.__)("Builder","blocksy-companion"),value:d,onChange:function(e){var t=e.target.value;return p(t)}})),(0,e.createElement)("h3",null,"Required plugins"),(0,e.createElement)("div",{className:"ct-bundled-plugins-list ct-modal-scroll"},Object.keys({"stackable-ultimate-gutenberg-blocks":"Stackable – Gutenberg Blocks","wpforms-lite":"WPForms - Contact Form",woocommerce:"WooCommerce",elementor:"Elementor",brizy:"Brizy",getwid:"Getwid","simply-gallery-block":"SimpLy Gallery Block & Lightbox","recipe-card-blocks-by-wpzoom":"Recipe Card Blocks by WPZOOM","map-block-gutenberg":"Map Block for Google Maps","mb-custom-post-type":"MB Custom Post Types & Custom Taxonomies",leadin:"HubSpot","block-slider":"Block Slider"}).map((function(t){return(0,e.createElement)("label",{tabindex:"0",onClick:function(e){e.preventDefault(),b((function(e){return e.includes(t)?e.filter((function(e){return e!==t})):[].concat(function(e){if(Array.isArray(e))return Fe(e)}(n=e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(n)||Re(n)||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.")}(),[t]);var n}))}},(0,e.createElement)("span",null,{"stackable-ultimate-gutenberg-blocks":"Stackable – Gutenberg Blocks","wpforms-lite":"WPForms - Contact Form",woocommerce:"WooCommerce",elementor:"Elementor",brizy:"Brizy",getwid:"Getwid","simply-gallery-block":"SimpLy Gallery Block & Lightbox","recipe-card-blocks-by-wpzoom":"Recipe Card Blocks by WPZOOM","map-block-gutenberg":"Map Block for Google Maps","mb-custom-post-type":"MB Custom Post Types & Custom Taxonomies",leadin:"HubSpot","block-slider":"Block Slider"}[t]),(0,e.createElement)("input",{type:"checkbox",checked:y.indexOf(t)>-1,onChange:function(e){e.target.checked}}))}))),(0,e.createElement)("button",{className:"ct-button",disabled:n,onClick:function(){return k()}},n?(0,o.__)("Loading...","blocksy-companion"):(0,o.__)("Export site","blocksy-companion")))}})):null};function Ve(e,t,n,r,o,a,i){try{var c=e[a](i),l=c.value}catch(e){return void n(e)}c.done?t(l):Promise.resolve(l).then(r,o)}function He(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,a=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}return n}}(e,t)||function(e,t){if(e){if("string"==typeof e)return qe(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)?qe(e,t):void 0}}(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 qe(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 We=(0,e.createContext)({demos:[]}),Ge=null,Ze=null,$e=function(t){t.children,t.path,t.location;var n=He((0,e.useState)(!Ge),2),r=n[0],a=n[1],i=He((0,e.useState)(Ge||[]),2),c=i[0],l=i[1],s=He((0,e.useState)(Ze||{}),2),u=s[0],m=s[1],d=He((0,e.useState)(null),2),p=d[0],f=d[1],y=He((0,e.useState)(null),2),b=y[0],h=y[1],v=He((0,e.useState)(!1),2),g=v[0],_=v[1],E=He((0,e.useState)({builder:""}),2),w=(E[0],E[1],He((0,e.useState)(!1),2)),k=w[0],O=w[1],x=function(){var e,t=(e=regeneratorRuntime.mark((function e(){var t,n,r,o,i,c=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c.length>0&&void 0!==c[0]&&c[0]&&a(!0),(t=new FormData).append("action","blocksy_demo_list"),e.prev=4,e.next=7,fetch(ctDashboardLocalizations.ajax_url,{method:"POST",body:t});case 7:if(200!==(n=e.sent).status){e.next=15;break}return e.next=11,n.json();case 11:r=e.sent,o=r.success,i=r.data,o&&(l(i.demos),m(i.active_plugins),h(i.current_installed_demo),_(i.demo_error),Ze=i.active_plugins,Ge=i.demos,i.demo_error);case 15:e.next=19;break;case 17:e.prev=17,e.t0=e.catch(4);case 19:a(!1);case 20:case"end":return e.stop()}}),e,null,[[4,17]])})),function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){Ve(a,r,o,i,c,"next",e)}function c(e){Ve(a,r,o,i,c,"throw",e)}i(void 0)}))});return function(){return t.apply(this,arguments)}}();return(0,e.useEffect)((function(){x(!Ge)}),[]),(0,e.createElement)("div",{className:"ct-demos-list-container"},g&&(0,e.createElement)("div",{className:"ct-demo-notification",dangerouslySetInnerHTML:{__html:g}}),(0,e.createElement)(j.Transition,{items:r,from:{opacity:0},enter:[{opacity:1}],leave:[{opacity:0}],config:function(e,t){return"leave"===t?{duration:300}:{delay:300,duration:300}}},(function(t){return t?function(t){return(0,e.createElement)(j.animated.p,{style:t,className:"ct-loading-text"},(0,e.createElement)("span",null),(0,o.__)("Loading Starter Sites...","blocksy-companion"))}:0===c.length?function(t){return(0,e.createElement)(j.animated.div,{style:t},(0,e.createElement)("div",{className:"ct-demo-notification",dangerouslySetInnerHTML:{__html:(0,o.__)("The connection to our <b>demo.creativethemes.com</b> server didn't worked. This connection is required for importing the starter sites from our demo content server. All you have to do is to contact your hosting provider and ask them to white list our demo server address.","blocksy-companion")}}),(0,e.createElement)(R,null))}:function(t){return(0,e.createElement)(j.animated.div,{style:t},(0,e.createElement)(e.Fragment,null,(0,e.createElement)(We.Provider,{value:{demo_error:g,demos_list:c.filter((function(e){return!e.dev||ct_localizations.is_dev_mode})),currentDemo:p,pluginsStatus:u,installerBlockingReleased:k,setInstallerBlockingReleased:O,setCurrentDemo:f,currentlyInstalledDemo:b,setCurrentlyInstalledDemo:h}},(0,e.createElement)(re,null),(0,e.createElement)(ze,null),(0,e.createElement)(Ue,null)),(0,e.createElement)(R,null)))}})))};function Ke(e,t,n,r,o,a,i){try{var c=e[a](i),l=c.value}catch(e){return void n(e)}c.done?t(l):Promise.resolve(l).then(r,o)}var Je=function(){var t=function(){var e,t=(e=regeneratorRuntime.mark((function e(){var t,n,r,o,a,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(t=new FormData).append("action","blocksy_fs_connect_again"),e.prev=2,e.next=5,fetch(ctDashboardLocalizations.ajax_url,{method:"POST",body:t});case 5:if(200!==(n=e.sent).status){e.next=13;break}return e.next=9,n.json();case 9:r=e.sent,o=r.success,r.data,o&&((a=document.createElement("div")).innerHTML=ctDashboardLocalizations.plugin_data.connect_template,i=a.querySelector("form"),document.body.appendChild(i),i.submit());case 13:e.next=17;break;case 15:e.prev=15,e.t0=e.catch(2);case 17:case"end":return e.stop()}}),e,null,[[2,15]])})),function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){Ke(a,r,o,i,c,"next",e)}function c(e){Ke(a,r,o,i,c,"throw",e)}i(void 0)}))});return function(){return t.apply(this,arguments)}}();return(0,e.createElement)("div",{className:"ct-freemius-optin-message"},(0,e.createElement)("i",null,(0,e.createElement)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},(0,e.createElement)("path",{d:"M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"}),(0,e.createElement)("path",{d:"M13.73 21a2 2 0 0 1-3.46 0"}))),(0,e.createElement)("h2",null,(0,o.__)("Stay Updated","blocksy-companion")),(0,e.createElement)("p",null,(0,o.__)("Never miss an important update - opt in to our security & feature updates notifications, and non-sensitive diagnostic tracking.","blocksy-companion")),(0,e.createElement)("button",{className:"ct-button-primary",onClick:function(e){e.preventDefault(),t()}},(0,o.__)("Allow & Continue","blocksy-companion")))};r().on("ct:dashboard:routes",(function(t){t.push({Component:function(){return(0,e.createElement)($,null)},path:"/extensions"}),"yes"===ctDashboardLocalizations.plugin_data.has_demo_install&&t.push({Component:function(t){return(0,e.createElement)($e,t)},path:"/demos"})})),r().on("ct:dashboard:navigation-links",(function(e){"yes"===ctDashboardLocalizations.plugin_data.has_demo_install&&e.push({text:(0,o.__)("Starter Sites","blocksy-companion"),path:"demos",getProps:function(e){var t=e.isPartiallyCurrent;return e.isCurrent,t?{"aria-current":"page"}:{}}}),e.push({text:(0,o.__)("Extensions","blocksy-companion"),path:"/extensions"})})),r().on("ct:dashboard:home:before",(function(t){ctDashboardLocalizations.plugin_data.is_anonymous&&(t.content=(0,e.createElement)(Je,null))})),r().on("ct:dashboard:heading:after",(function(t){ctDashboardLocalizations.plugin_data.is_pro&&(t.content=(0,e.createElement)("span",null,"PRO"))}))}()}();
|
static/bundle/dashboard.min.css
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
/**
|
2 |
-
* - v1.8.
|
3 |
*
|
4 |
* Copyright (c) 2022
|
5 |
* Licensed GPLv2+
|
1 |
/**
|
2 |
+
* - v1.8.43
|
3 |
*
|
4 |
* Copyright (c) 2022
|
5 |
* Licensed GPLv2+
|
static/bundle/options.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
/*! For license information please see options.js.LICENSE.txt */
|
2 |
-
!function(){var e={785:function(e,t,n){function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}var o="object"===("undefined"==typeof window?"undefined":r(window))&&window.window===window?window:"object"===("undefined"==typeof self?"undefined":r(self))&&self.self===self?self:"object"===(void 0===n.g?"undefined":r(n.g))&&n.g.global===n.g?n.g:this;function a(e,t,n){var r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){l(r.response,t,n)},r.onerror=function(){console.error("could not download file")},r.send()}function i(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return t.status>=200&&t.status<=299}function c(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(n){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var l="object"!==("undefined"==typeof window?"undefined":r(window))||window!==o?function(){}:"download"in HTMLAnchorElement.prototype?function(e,t,n){var r=o.URL||o.webkitURL,l=document.createElement("a");t=t||e.name||"download",l.download=t,l.rel="noopener","string"==typeof e?(l.href=e,l.origin!==location.origin?i(l.href)?a(e,t,n):c(l,l.target="_blank"):c(l)):(l.href=r.createObjectURL(e),setTimeout((function(){r.revokeObjectURL(l.href)}),4e4),setTimeout((function(){c(l)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,t,n){if(t=t||e.name||"download","string"==typeof e)if(i(e))a(e,t,n);else{var o=document.createElement("a");o.href=e,o.target="_blank",setTimeout((function(){c(o)}))}else navigator.msSaveOrOpenBlob(function(e,t){return void 0===t?t={autoBom:!1}:"object"!==r(t)&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob([String.fromCharCode(65279),e],{type:e.type}):e}(e,n),t)}:function(e,t,n,i){if((i=i||open("","_blank"))&&(i.document.title=i.document.body.innerText="downloading..."),"string"==typeof e)return a(e,t,n);var c="application/octet-stream"===e.type,l=/constructor/i.test(o.HTMLElement)||o.safari,u=/CriOS\/[\d]+/.test(navigator.userAgent);if((u||c&&l)&&"object"===("undefined"==typeof FileReader?"undefined":r(FileReader))){var s=new FileReader;s.onloadend=function(){var e=s.result;e=u?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),i?i.location.href=e:location=e,i=null},s.readAsDataURL(e)}else{var p=o.URL||o.webkitURL,d=p.createObjectURL(e);i?i.location=d:location.href=d,i=null,setTimeout((function(){p.revokeObjectURL(d)}),4e4)}};e.exports=l},184:function(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var a=typeof n;if("string"===a||"number"===a)e.push(n);else if(Array.isArray(n)&&n.length){var i=o.apply(null,n);i&&e.push(i)}else if("object"===a)for(var c in n)r.call(n,c)&&n[c]&&e.push(c)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},496:function(e){for(var t=self.crypto||self.msCrypto,n="-_",r=36;r--;)n+=r.toString(36);for(r=36;r---10;)n+=r.toString(36).toUpperCase();e.exports=function(e){var o="",a=t.getRandomValues(new Uint8Array(e||21));for(r=e||21;r--;)o+=n[63&a[r]];return o}},539:function(e,t){var n,r,o;!function(a,i){"use strict";r=[],void 0===(o="function"==typeof(n=function(){return function(e){var t,n=0,r=[],o=0,a=function(){var t=e.indexOf(":",n),r=e.substring(n,t);return n=t+2,parseInt(r,10)},i=function(){var t=e.indexOf(";",n),r=e.substring(n,t);return n=t+1,parseInt(r,10)},c=function(t='"'){for(var r,o,i=a(),c=0,l=0;l<i;)(r=e.charCodeAt(n+c++))<=127?l++:l+=r>2047?3:2;return e.charAt(n+c)!==t&&(c+=e.indexOf('"',n+c)-n-c),o=e.substring(n,n+c),n+=c+2,o},l=function(){var t=e.charAt(n);return n+=2,t},u=function(){var e=l();switch(e){case"i":return i();case"s":return c();default:throw new Error("Unknown key type '"+e+"' at position "+(n-2))}},s=function(e,t){var r,o,a;if("\0"===e.charAt(0)){if((a=e.indexOf("\0",1))>0)return r=e.substring(1,a),o=e.substr(a+1),"*"===r||t===r?o:r+"::"+o;var i="Expected two <NUL> characters in non-public property name '"+e+"' at position "+(n-e.length-2);throw new Error(i)}return e};return(t=function(){var p,d,f=l();switch(f){case"i":return d=i(),r[o++]=d,d;case"d":return function(){var t=e.indexOf(";",n),a=e.substring(n,t);return n=t+1,a=parseFloat(a),r[o++]=a,a}();case"b":return function(){var t=e.indexOf(";",n),a=e.substring(n,t);return n=t+1,a="1"===a,r[o++]=a,a}();case"s":return function(){var e=c();return r[o++]=e,e}();case"a":return function(){var e,i,c,l,s,p=a(),d=[],f={},m=d,y=o++;r[y]=m;try{for(c=0;c<p;c++)if(e=u(),i=t(),m===d&&e+""==c+"")d.push(i);else{if(m!==f){for(l=0,s=d.length;l<s;l++)f[l]=d[l];m=f,r[y]=m}f[e]=i}}catch(e){throw e.state=m,e}return n++,m}();case"O":return function(){var e,i,l,p,d={},f=o++,m=c();r[f]=d,e=a();try{for(p=0;p<e;p++)i=s(u(),m),l=t(),d[i]=l}catch(e){throw e.state=d,e}return n++,d}();case"C":return{__PHP_Incomplete_Class_Name:c(),serialized:c("}")};case"r":return function(){var e=i(),t=r[e-1];return r[o++]=t,t}();case"R":return p=i(),r[p-1];case"N":return r[o++]=null,null;default:throw new Error("Unknown type '"+f+"' at position "+(n-2))}})()}})?n.apply(t,r):n)||(e.exports=o)}()},459:function(e,t,n){var r=n(967);function o(e,t,n,r,a){var i=new Error(n,r,a);return i.name="UseFetchError",i.status=e,i.statusText=t,Object.setPrototypeOf(i,Object.getPrototypeOf(this)),Error.captureStackTrace&&Error.captureStackTrace(i,o),i}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 a=(n&&n.depends||t&&t.depends||[]).reduce((function(e,t){return e||!t}),!1);return r(!a&&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||{})}},967:function(e,t,n){var r=n(313),o=n(923);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]}},923:function(e){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 a=Object.keys(r),i=0;i<a.length;i++){var c=a[i];t=t.concat([c]).concat(e(r[c]))}else t=t.concat(r)}return t}},616:function(e,t,n){var r=n(496);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}},382:function(e,t,n){var r=n(313);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]}},313:function(e){"use strict";e.exports=window.React}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var a=t[r]={exports:{}};return e[r].call(a.exports,a,a.exports,n),a.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){"use strict";var e=window.wp.element,t=window.wp.components,r=window.wp.i18n,o=window.blocksyOptions,a=n(184),i=n.n(a);function c(e){return function(e){if(Array.isArray(e))return d(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||p(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){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 u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p(e,t){if(e){if("string"==typeof e)return d(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)?d(e,t):void 0}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var f=function(e){return e.filter((function(e,t,n){return n.findIndex((function(t){return t.ID===e.ID}))===t}))},m=[],y=function(t){var n,a,i=t.condition,l=t.onChange,s=(n=(0,e.useState)(m),a=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,a=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}return n}}(n,a)||p(n,a)||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.")}()),d=s[0],y=s[1],b=(0,e.useMemo)((function(){return{post_ids:"post",page_ids:"page",custom_post_type_ids:"ct_cpt"}[i.rule]}),[i.rule]),h=(0,e.useMemo)((function(){return(i.payload||{}).post_id||""}),[i.payload&&i.payload.post_id]),v=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";fetch("".concat(wp.ajax.settings.url,"?action=blocksy_conditions_get_all_posts"),{headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(u(u({post_type:b},e?{search_query:e}:{}),h?{alsoInclude:h}:{})),method:"POST"}).then((function(e){return e.json()})).then((function(e){var t=e.data.posts;y((function(e){return f([].concat(c(e),c(t)))})),m=f([].concat(c(m),c(t)))}))};return(0,e.useEffect)((function(){v()}),[b]),(0,e.createElement)(o.Select,{option:{appendToBody:!0,defaultToFirstItem:!1,searchPlaceholder:(0,r.__)("Type to search by ID or title...","blocksy-companion"),placeholder:"post_ids"===i.rule?(0,r.__)("Select post","blocksy-companion"):"page_ids"===i.rule?(0,r.__)("Select page","blocksy-companion"):(0,r.__)("Custom Post Type ID","blocksy-companion"),choices:c(d.filter((function(e){var t=e.post_type;return"ct_cpt"===b?"post"!==t&&"page"!==t:b===t})).map((function(e){return{key:e.ID,value:e.post_title}}))),search:!0},value:h,onChange:function(e){return l(e)},onInputValueChange:function(e){d.find((function(t){return t.post_title===e}))||v(e)}})};function b(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,a=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}return n}}(e,t)||E(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 h(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 v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){_(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function g(e){return function(e){if(Array.isArray(e))return w(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||E(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 E(e,t){if(e){if("string"==typeof e)return w(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)?w(e,t):void 0}}function w(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=[],k=[],j=[],S=function(t){var n=t.value,a=t.onChange,c=t.filter,l=void 0===c?"all":c,u=blocksy_admin.all_condition_rules;"singular"===l&&(u=blocksy_admin.singular_condition_rules),"archive"===l&&(u=blocksy_admin.archive_condition_rules);var s=u.reduce((function(e,t){var n=t.rules,r=t.title;return[].concat(g(e),g(n.map((function(e){return v(v({},e),{},{group:r})}))))}),[]).reduce((function(e,t){var n=t.title,r=t.id,o=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,["title","id"]);return[].concat(g(e),[v({key:r,value:n},o)])}),[]),p=b((0,e.useState)(O),2),d=p[0],f=p[1],m=b((0,e.useState)(k),2),h=m[0],_=m[1],E=b((0,e.useState)(j),2),w=E[0],S=E[1],C=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||"current_language"===e.rule||"user_post_author_id"===e.rule};return(0,e.useEffect)((function(){fetch("".concat(wp.ajax.settings.url,"?action=blocksy_conditions_get_all_taxonomies"),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST"}).then((function(e){return e.json()})).then((function(e){var t=e.data,n=t.taxonomies,r=t.languages,o=t.users;f(n),O=n,_(r),k=r,S(o),j=o}))}),[]),(0,e.createElement)("div",{className:"ct-display-conditions"},n.map((function(t,c){return(0,e.createElement)("div",{className:i()("ct-condition-group",{"ct-cols-3":C(t),"ct-cols-2":!C(t)}),key:c},(0,e.createElement)(o.Select,{key:"first",option:{inputClassName:"ct-condition-type",selectInputStart:function(){return(0,e.createElement)("span",{className:"ct-".concat(t.type)})},placeholder:(0,r.__)("Select variation","blocksy-companion"),choices:{include:(0,r.__)("Include","blocksy-companion"),exclude:(0,r.__)("Exclude","blocksy-companion")}},value:t.type,onChange:function(e){a(n.map((function(n,r){return v({},r===c?v(v({},t),{},{type:e}):n)})))}}),(0,e.createElement)(o.Select,{key:"second",option:{appendToBody:!0,placeholder:(0,r.__)("Select rule","blocksy-companion"),choices:"user"===t.category?s.filter((function(e){return 0===e.key.indexOf("user_")})):s.filter((function(e){return-1===e.key.indexOf("user_")})),search:!0},value:t.rule,onChange:function(e){a(n.map((function(n,r){return v({},r===c?v(v({},t),{},{rule:e}):n)})))}}),("post_ids"===t.rule||"custom_post_type_ids"===t.rule||"page_ids"===t.rule)&&(0,e.createElement)(y,{condition:t,onChange:function(e){a(n.map((function(n,r){return v({},r===c?v(v({},t),{},{payload:v(v({},t.payload),{},{post_id:e})}):n)})))}}),("taxonomy_ids"===t.rule||"post_with_taxonomy_ids"===t.rule)&&(0,e.createElement)(o.Select,{option:{appendToBody:!0,defaultToFirstItem:!1,placeholder:(0,r.__)("Select taxonomy","blocksy-companion"),choices:d.map((function(e){return v({key:e.id,value:e.name},e.group?{group:e.group}:{})})),search:!0},value:(t.payload||{}).taxonomy_id||"",onChange:function(e){a(n.map((function(n,r){return v({},r===c?v(v({},t),{},{payload:v(v({},t.payload),{},{taxonomy_id:e})}):n)})))}}),"current_language"===t.rule&&(0,e.createElement)(o.Select,{option:{appendToBody:!0,defaultToFirstItem:!1,placeholder:(0,r.__)("Select language","blocksy-companion"),choices:h.map((function(e){return{key:e.id,value:e.name}})),search:!0},value:(t.payload||{}).language||"",onChange:function(e){a(n.map((function(n,r){return v({},r===c?v(v({},t),{},{payload:v(v({},t.payload),{},{language:e})}):n)})))}}),"user_post_author_id"===t.rule&&(0,e.createElement)(o.Select,{option:{appendToBody:!0,defaultToFirstItem:!1,placeholder:(0,r.__)("Select user","blocksy-companion"),choices:[{key:"current_user",value:(0,r.__)("Current user","blocksy-companion")}].concat(g(w.map((function(e){return{key:e.id,value:e.name}})))),search:!0},value:(t.payload||{}).user_id||"",onChange:function(e){a(n.map((function(n,r){return v({},r===c?v(v({},t),{},{payload:v(v({},t.payload),{},{user_id:e})}):n)})))}}),(0,e.createElement)("button",{type:"button",onClick:function(e){e.preventDefault();var t=g(n);t.splice(c,1),a(t)}},"×"))})),(0,e.createElement)("div",{className:"ct-conditions-actions"},(0,e.createElement)("button",{type:"button",className:"button add-condition",onClick:function(e){e.preventDefault(),a([].concat(g(n),[{type:"include",rule:u[0].rules[0].id,payload:{}}]))}},(0,r.__)("Add Display Condition","blocksy-companion")),(0,e.createElement)("button",{type:"button",className:"button add-condition",onClick:function(e){e.preventDefault(),a([].concat(g(n),[{type:"include",rule:"user_logged_in",payload:{},category:"user"}]))}},(0,r.__)("Add User Condition","blocksy-companion"))))};function C(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,a=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}return n}}(e,t)||function(e,t){if(e){if("string"==typeof e)return x(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)?x(e,t):void 0}}(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 A=function(t){var n=t.option,a=n.display,i=void 0===a?"inline":a,c=n.filter,l=void 0===c?"all":c,u=n.modalTitle,s=void 0===u?(0,r.__)("Transparent Header Display Conditions","blocksy-companion"):u,p=n.modalDescription,d=void 0===p?(0,r.__)("Add one or more conditions to display the transparent header.","blocksy-companion"):p,f=t.value,m=t.onChange,y=C((0,e.useState)(!1),2),b=y[0],h=y[1],v=C((0,e.useState)(null),2),_=v[0],g=v[1];return"inline"===i?(0,e.createElement)(S,{filter:l,value:f,onChange:m}):(0,e.createElement)(e.Fragment,null,(0,e.createElement)("button",{className:"button-primary",style:{width:"100%"},onClick:function(e){e.preventDefault(),h(!0),g(null)}},(0,r.__)("Add/Edit Conditions","blocksy-companion")),(0,e.createElement)(o.Overlay,{items:b,className:"ct-admin-modal ct-builder-conditions-modal",onDismiss:function(){h(!1),g(null)},render:function(){return(0,e.createElement)("div",{className:"ct-modal-content"},(0,e.createElement)("h2",null,s),(0,e.createElement)("p",null,d),(0,e.createElement)("div",{className:"ct-modal-scroll"},(0,e.createElement)(S,{filter:l,value:_||f,onChange:function(e){g(e)}})),(0,e.createElement)("div",{className:"ct-modal-actions has-divider"},(0,e.createElement)("button",{className:"button-primary",disabled:!_,onClick:function(){m(_),h(!1)}},(0,r.__)("Save Conditions","blocksy-companion"))))}}))},N=n(785),P=n.n(N),T=n(539),D=n.n(T);function I(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,a=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}return n}}(e,t)||z(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 z(e,t){if(e){if("string"==typeof e)return L(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)?L(e,t):void 0}}function L(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var R=function(){var t=I((0,e.useState)(null),2),n=t[0],a=t[1],c=I((0,e.useState)(null),2),l=c[0],u=c[1],s=I((0,e.useState)(!1),2),p=s[0],d=s[1],f=I((0,e.useState)(!1),2),m=f[0],y=f[1],b=I((0,e.useState)(["options"]),2),h=b[0],v=b[1],_=(0,e.useRef)(),g=(0,e.useRef)();return(0,e.useEffect)((function(){var e=function(e){e.stopPropagation(),e.preventDefault(),e.dataTransfer.dropEffect="copy",d(!0)},t=function(e){e.stopPropagation(),e.preventDefault(),d(!1)},n=function(e){e.stopPropagation(),e.preventDefault(),d(!1);var t=Array.from(e.dataTransfer.files||[]);if(Array.from(e.dataTransfer.items||[]).length>0){var n=e.dataTransfer.items[0].getAsFile();a(n)}else t.length>0&&a(t[0])};return g.current.addEventListener("dragover",e,!1),g.current.addEventListener("dragleave",t,!1),g.current.addEventListener("drop",n,!1),function(){g.current.removeEventListener("dragover",e,!1),g.current.removeEventListener("dragleave",t,!1),g.current.removeEventListener("drop",n,!1)}}),[]),(0,e.createElement)("div",{className:"ct-import-export"},(0,e.createElement)("div",{className:"ct-title","data-type":"simple"},(0,e.createElement)("h3",null,(0,r.__)("Export Options","blocksy-companion")),(0,e.createElement)("div",{className:"ct-option-description"},(0,r.__)("Easily export the theme customizer settings.","blocksy-companion"))),(0,e.createElement)("div",{className:"ct-control","data-design":"block"},(0,e.createElement)("header",null),(0,e.createElement)("section",null,(0,e.createElement)("button",{className:"button",onClick:function(e){e.preventDefault(),y(!0)}},(0,r.__)("Export Customizations","blocksy-companion")))),(0,e.createElement)("div",{className:"ct-title","data-type":"simple"},(0,e.createElement)("h3",null,(0,r.__)("Import Options","blocksy-companion")),(0,e.createElement)("div",{className:"ct-option-description"},(0,r.__)("Easily import the theme customizer settings.","blocksy-companion"))),(0,e.createElement)("div",{className:"ct-control","data-design":"block"},(0,e.createElement)("header",null),(0,e.createElement)("section",null,(0,e.createElement)("div",{className:"ct-file-upload"},(0,e.createElement)("button",{type:"button",className:i()("button ct-upload-button",{active:p}),ref:g,onClick:function(){_.current.click()}},n?n.name:(0,r.__)("Click or drop to upload a file...","blocksy-companion")),(0,e.createElement)("input",{ref:_,type:"file",onChange:function(e){var t=I(e.target.files,1)[0];a(t)}}),(0,e.createElement)("button",{className:"button",onClick:function(e){if(e.preventDefault(),n){var t=new FileReader;t.readAsText(n,"UTF-8"),t.onload=function(e){try{fetch("".concat(window.ajaxurl,"?action=blocksy_customizer_import&wp_customize=on&nonce=").concat(ct_customizer_localizations.customizer_reset_none),{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(D()(e.target.result))}).then((function(e){200===e.status&&e.json().then((function(e){e.success,e.data,location.reload()}))}))}catch(e){}}}}},(0,r.__)("Import Customizations","blocksy-companion"))))),ct_customizer_localizations.has_child_theme&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"ct-title","data-type":"simple"},(0,e.createElement)("h3",null,(0,r.__)("Copy Options","blocksy-companion")),(0,e.createElement)("div",{className:"ct-option-description"},(0,r.__)("Copy and import your customizations from parent or child theme.","blocksy-companion"))),ct_customizer_localizations.is_parent_theme&&(0,e.createElement)("div",{className:"ct-control","data-design":"block"},(0,e.createElement)("header",null),(0,e.createElement)("section",null,(0,e.createElement)("button",{className:"button",onClick:function(e){e.preventDefault(),u("child")}},(0,r.__)("Copy From Child Theme","blocksy-companion")))),!ct_customizer_localizations.is_parent_theme&&(0,e.createElement)("div",{className:"ct-control","data-design":"block"},(0,e.createElement)("header",null),(0,e.createElement)("section",null,(0,e.createElement)("button",{className:"button",onClick:function(e){e.preventDefault(),u("parent")}},(0,r.__)("Copy From Parent Theme","blocksy-companion"))))),(0,e.createElement)(o.Overlay,{items:l,className:"ct-admin-modal ct-import-export-modal",onDismiss:function(){return u(!1)},render:function(){return(0,e.createElement)("div",{className:"ct-modal-content"},(0,e.createElement)("svg",{width:"35",height:"35",viewBox:"0 0 66 66"},(0,e.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"})),(0,e.createElement)("h2",{className:"ct-modal-title"},!ct_customizer_localizations.is_parent_theme&&(0,r.__)("Copy From Parent Theme","blocksy-companion"),ct_customizer_localizations.is_parent_theme&&(0,r.__)("Copy From Child Theme","blocksy-companion")),(0,e.createElement)("p",null,!ct_customizer_localizations.is_parent_theme&&(0,r.__)("You are about to copy all the settings from your parent theme into the child theme. Are you sure you want to continue?","blocksy-companion"),ct_customizer_localizations.is_parent_theme&&(0,r.__)("You are about to copy all the settings from your child theme into the parent theme. Are you sure you want to continue?","blocksy-companion")),(0,e.createElement)("div",{className:"ct-modal-actions has-divider","data-buttons":"2"},(0,e.createElement)("button",{onClick:function(e){e.preventDefault(),e.stopPropagation(),u(!1)},className:"button"},(0,r.__)("Cancel","blocksy-companion")),(0,e.createElement)("button",{className:"button button-primary",onClick:function(e){e.preventDefault();var t=new FormData;t.append("action","blocksy_customizer_copy_options"),t.append("wp_customize","on"),t.append("strategy",l);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){}}},(0,r.__)("Yes, I am sure","blocksy-companion"))))}}),(0,e.createElement)(o.Overlay,{items:m,className:"ct-admin-modal ct-export-modal",onDismiss:function(){return y(!1)},render:function(){return(0,e.createElement)("div",{className:"ct-modal-content"},(0,e.createElement)("h2",{className:"ct-modal-title"},(0,r.__)("Export Settings","blocksy-companion")),(0,e.createElement)("p",null,(0,r.__)("Choose what set of settings you want to export.","blocksy-companion")),(0,e.createElement)("div",{className:"ct-export-options"},["options","widgets"].map((function(t){return(0,e.createElement)("div",{className:"ct-checkbox-container",onClick:function(){1===h.length&&h[0]===t||v((function(e){return e.includes(t)?e.filter((function(e){return e!==t})):[].concat(function(e){if(Array.isArray(e))return L(e)}(n=e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(n)||z(n)||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.")}(),[t]);var n}))}},{options:(0,r.__)("Customizer settings","blocksy-companion"),widgets:(0,r.__)("Widgets settings","blocksy-companion")}[t],(0,e.createElement)("span",{className:i()("ct-checkbox",{active:h.includes(t)})},(0,e.createElement)("svg",{width:"10",height:"8",viewBox:"0 0 11.2 9.1"},(0,e.createElement)("polyline",{className:"check",points:"1.2,4.8 4.4,7.9 9.9,1.2 "}))))}))),(0,e.createElement)("div",{className:"ct-modal-actions has-divider","data-buttons":"2"},(0,e.createElement)("button",{onClick:function(e){e.preventDefault(),e.stopPropagation(),y(!1)},className:"button"},(0,r.__)("Cancel","blocksy-companion")),(0,e.createElement)("button",{className:"button button-primary",onClick:function(e){e.preventDefault();var t=new FormData;t.append("action","blocksy_customizer_export"),t.append("strategy",h.join(":")),t.append("wp_customize","on");try{fetch(window.ajaxurl,{method:"POST",body:t}).then((function(e){200===e.status&&e.json().then((function(e){var t=e.success,n=e.data;if(t){var r=new Blob([n.data],{type:"application/octet-stream;charset=utf-8"});P()(r,"".concat(n.site_url.replace("http://","").replace("https://","").replace(".","-").replace("/","-"),"-export.dat")),y(!1)}}))}))}catch(e){}}},(0,r.__)("Export","blocksy-companion"))))}}))},F=window.ctEvents,U=n.n(F),M=window.wp.hooks,B=n(459),H=n.n(B),V=n(616),$=n.n(V),G=n(382),J=n.n(G);function Y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function q(e,t,n,r,o,a,i){try{var c=e[a](i),l=c.value}catch(e){return void n(e)}c.done?t(l):Promise.resolve(l).then(r,o)}function W(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,a=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}return n}}(e,t)||X(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){if(e){if("string"==typeof e)return K(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?K(e,t):void 0}}function K(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Q=$()(),Z=function(t){t.forcedEdit;var n,a,i=t.headerId,c=W((0,e.useState)(!1),2),l=c[0],u=c[1],s=W((0,e.useState)(null),2),p=s[0],d=s[1],f=(0,e.useContext)(o.PlacementsDragDropContext),m=(f.builderValueCollection,f.builderValueDispatch,(0,e.useRef)()),y=J()(Q),b=H()("".concat(blocksy_admin.ajax_url,"?action=blocksy_header_get_all_conditions"),{method:"POST",formatter:(n=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)})),a=function(){var e=this,t=arguments;return new Promise((function(r,o){var a=n.apply(e,t);function i(e){q(a,r,o,i,c,"next",e)}function c(e){q(a,r,o,i,c,"throw",e)}i(void 0)}))},function(e){return a.apply(this,arguments)}),depends:[y]}),h=b.data,v=b.isLoading;return b.error,(0,e.createElement)(e.Fragment,null,(0,e.createElement)("button",{className:"button-primary",style:{width:"100%"},onClick:function(e){e.preventDefault(),e.stopPropagation(),v||u(!0)}},(0,r.__)("Add/Edit Conditions","blocksy-companion")),(0,e.createElement)(o.Overlay,{items:l,initialFocusRef:m,className:"ct-admin-modal ct-builder-conditions-modal",onDismiss:function(){u(!1),d(null)},render:function(){var t;return(0,e.createElement)("div",{className:"ct-modal-content",ref:m},(0,e.createElement)("h2",null,sprintf((0,r.__)("Display Conditions","blocksy-companion"))),(0,e.createElement)("p",null,(0,r.__)("Add one or more conditions in order to display your header.","blocksy-companion")),(0,e.createElement)("div",{className:"ct-modal-scroll"},(0,e.createElement)(o.OptionsPanel,{onChange:function(e,t){d((function(e){return[].concat(function(e){if(Array.isArray(e))return K(e)}(n=(e||h).filter((function(e){return e.id!==i})))||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(n)||X(n)||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.")}(),[{id:i,conditions:t}]);var n}))},options:{conditions:(t={type:"blocksy-display-condition",design:"none",value:[]},Y(t,"design","none"),Y(t,"label",!1),t)},value:{conditions:((p||h).find((function(e){return e.id===i}))||{conditions:[]}).conditions},hasRevertButton:!1})),(0,e.createElement)("div",{className:"ct-modal-actions has-divider"},(0,e.createElement)("button",{className:"button-primary",disabled:!p,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(p)}).then((function(e){return e.json()})).then((function(){Q(),u(!1)}))}},(0,r.__)("Save Conditions","blocksy-companion"))))}}))};function ee(){return ee=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},ee.apply(this,arguments)}function te(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ne(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?te(Object(n),!0).forEach((function(t){re(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):te(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function re(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ae=function(){var n,a,c=(n=(0,e.useState)(!1),a=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,a=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}return n}}(n,a)||function(e,t){if(e){if("string"==typeof e)return oe(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)?oe(e,t):void 0}}(n,a)||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.")}()),l=c[0],u=c[1],s=(ct_customizer_localizations.header_builder_data.secondary_items.header,ct_customizer_localizations.header_builder_data.header,(0,e.useContext)(o.PlacementsDragDropContext)),p=s.builderValueDispatch,d=s.builderValue,f=(s.option,s.builderValueCollection),m=s.panelsActions,y=(0,M.applyFilters)("blocksy.header.available-sections",null,f.sections)||f.sections.filter((function(e){var t=e.id;return"type-2"!==t&&"type-3"!==t&&-1===t.indexOf("ct-custom")}));return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("ul",{className:i()("ct-panels-manager")},y.map((function(t){var n=t.name,a=t.id,c=n||{"type-1":(0,r.__)("Global Header","blocksy")}[a]||a,l="builder_header_panel_".concat(a),s=ct_customizer_localizations.header_builder_data.header_data.header_options,f={label:c,"inner-options":ne(ne({},a.indexOf("ct-custom")>-1?{conditions_button:{label:(0,r.__)("Edit Conditions","blocksy-companion"),type:"jsx",design:"block",render:function(){return(0,e.createElement)(Z,{headerId:a})}},divider:{type:"ct-divider"}}:{}),s)};return(0,e.createElement)(o.PanelMetaWrapper,ee({id:l,key:a,option:f},m,{getActualOption:function(t){var n=t.open;return(0,e.createElement)(e.Fragment,null,a===d.id&&(0,e.createElement)(o.Panel,{id:l,getValues:function(){return ne({id:a},d.settings||{})},option:f,onChangeFor:function(e,t){p({type:"BUILDER_GLOBAL_SETTING_ON_CHANGE",payload:{optionId:e,optionValue:t,values:(0,o.getValueFromInput)(s,Array.isArray(d.settings)?{}:d.settings||{})}})},view:"simple"}),(0,e.createElement)("li",{className:i()({active:a===d.id,"ct-global":"type-1"===a}),onClick:function(){a===d.id?n():p({type:"PICK_BUILDER_SECTION",payload:{id:a}})}},(0,e.createElement)("span",{className:"ct-panel-name"},c),a.indexOf("ct-custom")>-1&&a!==d.id&&(0,e.createElement)("span",{className:"ct-remove-instance",onClick:function(e){e.preventDefault(),e.stopPropagation(),u(a)}},(0,e.createElement)("i",{className:"ct-tooltip-top"},(0,r.__)("Remove header","blocksy-companion")),(0,e.createElement)("svg",{width:"11px",height:"11px",viewBox:"0 0 24 24"},(0,e.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"})))))}}))}))),(0,e.createElement)(t.Slot,{name:"PlacementsBuilderPanelsManagerAfter"},(function(e){return 0===e.length?null:e})),(0,e.createElement)(o.Overlay,{items:l,className:"ct-admin-modal ct-reset-options",onDismiss:function(){return u(!1)},render:function(){return(0,e.createElement)("div",{className:"ct-modal-content"},(0,e.createElement)("h2",{className:"ct-modal-title"},(0,r.__)("Remove Header","blocksy-companion")),(0,e.createElement)("p",null,(0,r.__)("You are about to remove a custom header, are you sure you want to continue?","blocksy-companion")),(0,e.createElement)("div",{className:"ct-modal-actions has-divider","data-buttons":"2"},(0,e.createElement)("button",{onClick:function(e){e.preventDefault(),e.stopPropagation(),u(!1)},className:"button"},(0,r.__)("Cancel","blocksy-companion")),(0,e.createElement)("button",{className:"button button-primary",onClick:function(e){e.preventDefault(),p({type:"REMOVE_BUILDER_SECTION",payload:{id:l}}),u(!1)}},(0,r.__)("Confirm","blocksy-companion"))))}}))};U().on("blocksy:options:before-option",(function(n){if(n.option&&"ct-header-builder"===n.option.type){var r=n.content;n.content=(0,e.createElement)(e.Fragment,null,r,(0,e.createElement)(t.Fill,{name:"PlacementsBuilderPanelsManager"},(0,e.createElement)(ae,null)))}})),U().on("blocksy:options:register",(function(e){e["blocksy-display-condition"]=A,e["blocksy-customizer-options-manager"]=R}))}()}();
|
1 |
/*! For license information please see options.js.LICENSE.txt */
|
2 |
+
!function(){var e={785:function(e,t,n){function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}var o="object"===("undefined"==typeof window?"undefined":r(window))&&window.window===window?window:"object"===("undefined"==typeof self?"undefined":r(self))&&self.self===self?self:"object"===(void 0===n.g?"undefined":r(n.g))&&n.g.global===n.g?n.g:this;function a(e,t,n){var r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){l(r.response,t,n)},r.onerror=function(){console.error("could not download file")},r.send()}function i(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return t.status>=200&&t.status<=299}function c(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(n){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var l="object"!==("undefined"==typeof window?"undefined":r(window))||window!==o?function(){}:"download"in HTMLAnchorElement.prototype?function(e,t,n){var r=o.URL||o.webkitURL,l=document.createElement("a");t=t||e.name||"download",l.download=t,l.rel="noopener","string"==typeof e?(l.href=e,l.origin!==location.origin?i(l.href)?a(e,t,n):c(l,l.target="_blank"):c(l)):(l.href=r.createObjectURL(e),setTimeout((function(){r.revokeObjectURL(l.href)}),4e4),setTimeout((function(){c(l)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,t,n){if(t=t||e.name||"download","string"==typeof e)if(i(e))a(e,t,n);else{var o=document.createElement("a");o.href=e,o.target="_blank",setTimeout((function(){c(o)}))}else navigator.msSaveOrOpenBlob(function(e,t){return void 0===t?t={autoBom:!1}:"object"!==r(t)&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob([String.fromCharCode(65279),e],{type:e.type}):e}(e,n),t)}:function(e,t,n,i){if((i=i||open("","_blank"))&&(i.document.title=i.document.body.innerText="downloading..."),"string"==typeof e)return a(e,t,n);var c="application/octet-stream"===e.type,l=/constructor/i.test(o.HTMLElement)||o.safari,u=/CriOS\/[\d]+/.test(navigator.userAgent);if((u||c&&l)&&"object"===("undefined"==typeof FileReader?"undefined":r(FileReader))){var s=new FileReader;s.onloadend=function(){var e=s.result;e=u?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),i?i.location.href=e:location=e,i=null},s.readAsDataURL(e)}else{var p=o.URL||o.webkitURL,d=p.createObjectURL(e);i?i.location=d:location.href=d,i=null,setTimeout((function(){p.revokeObjectURL(d)}),4e4)}};e.exports=l},184:function(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var a=typeof n;if("string"===a||"number"===a)e.push(n);else if(Array.isArray(n)&&n.length){var i=o.apply(null,n);i&&e.push(i)}else if("object"===a)for(var c in n)r.call(n,c)&&n[c]&&e.push(c)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},496:function(e){for(var t=self.crypto||self.msCrypto,n="-_",r=36;r--;)n+=r.toString(36);for(r=36;r---10;)n+=r.toString(36).toUpperCase();e.exports=function(e){var o="",a=t.getRandomValues(new Uint8Array(e||21));for(r=e||21;r--;)o+=n[63&a[r]];return o}},539:function(e,t){var n,r,o;!function(a,i){"use strict";r=[],void 0===(o="function"==typeof(n=function(){return function(e){var t,n=0,r=[],o=0,a=function(){var t=e.indexOf(":",n),r=e.substring(n,t);return n=t+2,parseInt(r,10)},i=function(){var t=e.indexOf(";",n),r=e.substring(n,t);return n=t+1,parseInt(r,10)},c=function(t='"'){for(var r,o,i=a(),c=0,l=0;l<i;)(r=e.charCodeAt(n+c++))<=127?l++:l+=r>2047?3:2;return e.charAt(n+c)!==t&&(c+=e.indexOf('"',n+c)-n-c),o=e.substring(n,n+c),n+=c+2,o},l=function(){var t=e.charAt(n);return n+=2,t},u=function(){var e=l();switch(e){case"i":return i();case"s":return c();default:throw new Error("Unknown key type '"+e+"' at position "+(n-2))}},s=function(e,t){var r,o,a;if("\0"===e.charAt(0)){if((a=e.indexOf("\0",1))>0)return r=e.substring(1,a),o=e.substr(a+1),"*"===r||t===r?o:r+"::"+o;var i="Expected two <NUL> characters in non-public property name '"+e+"' at position "+(n-e.length-2);throw new Error(i)}return e};return(t=function(){var p,d,f=l();switch(f){case"i":return d=i(),r[o++]=d,d;case"d":return function(){var t=e.indexOf(";",n),a=e.substring(n,t);return n=t+1,a=parseFloat(a),r[o++]=a,a}();case"b":return function(){var t=e.indexOf(";",n),a=e.substring(n,t);return n=t+1,a="1"===a,r[o++]=a,a}();case"s":return function(){var e=c();return r[o++]=e,e}();case"a":return function(){var e,i,c,l,s,p=a(),d=[],f={},m=d,y=o++;r[y]=m;try{for(c=0;c<p;c++)if(e=u(),i=t(),m===d&&e+""==c+"")d.push(i);else{if(m!==f){for(l=0,s=d.length;l<s;l++)f[l]=d[l];m=f,r[y]=m}f[e]=i}}catch(e){throw e.state=m,e}return n++,m}();case"O":return function(){var e,i,l,p,d={},f=o++,m=c();r[f]=d,e=a();try{for(p=0;p<e;p++)i=s(u(),m),l=t(),d[i]=l}catch(e){throw e.state=d,e}return n++,d}();case"C":return{__PHP_Incomplete_Class_Name:c(),serialized:c("}")};case"r":return function(){var e=i(),t=r[e-1];return r[o++]=t,t}();case"R":return p=i(),r[p-1];case"N":return r[o++]=null,null;default:throw new Error("Unknown type '"+f+"' at position "+(n-2))}})()}})?n.apply(t,r):n)||(e.exports=o)}()},459:function(e,t,n){var r=n(967);function o(e,t,n,r,a){var i=new Error(n,r,a);return i.name="UseFetchError",i.status=e,i.statusText=t,Object.setPrototypeOf(i,Object.getPrototypeOf(this)),Error.captureStackTrace&&Error.captureStackTrace(i,o),i}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 a=(n&&n.depends||t&&t.depends||[]).reduce((function(e,t){return e||!t}),!1);return r(!a&&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||{})}},967:function(e,t,n){var r=n(313),o=n(923);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]}},923:function(e){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 a=Object.keys(r),i=0;i<a.length;i++){var c=a[i];t=t.concat([c]).concat(e(r[c]))}else t=t.concat(r)}return t}},616:function(e,t,n){var r=n(496);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}},382:function(e,t,n){var r=n(313);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]}},313:function(e){"use strict";e.exports=window.React}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var a=t[r]={exports:{}};return e[r].call(a.exports,a,a.exports,n),a.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){"use strict";var e=window.wp.element,t=window.wp.components,r=window.wp.i18n,o=window.blocksyOptions,a=n(184),i=n.n(a);function c(e){return function(e){if(Array.isArray(e))return d(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||p(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){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 u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p(e,t){if(e){if("string"==typeof e)return d(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)?d(e,t):void 0}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var f=function(e){return e.filter((function(e,t,n){return n.findIndex((function(t){return t.ID===e.ID}))===t}))},m=[],y=function(t){var n,a,i=t.condition,l=t.onChange,s=(n=(0,e.useState)(m),a=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,a=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}return n}}(n,a)||p(n,a)||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.")}()),d=s[0],y=s[1],b=(0,e.useMemo)((function(){return{post_ids:"post",page_ids:"page",custom_post_type_ids:"ct_cpt"}[i.rule]}),[i.rule]),h=(0,e.useMemo)((function(){return(i.payload||{}).post_id||""}),[i.payload&&i.payload.post_id]),v=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";fetch("".concat(wp.ajax.settings.url,"?action=blocksy_conditions_get_all_posts"),{headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(u(u({post_type:b},e?{search_query:e}:{}),h?{alsoInclude:h}:{})),method:"POST"}).then((function(e){return e.json()})).then((function(e){var t=e.data.posts;y((function(e){return f([].concat(c(e),c(t)))})),m=f([].concat(c(m),c(t)))}))};return(0,e.useEffect)((function(){v()}),[b]),(0,e.createElement)(o.Select,{option:{appendToBody:!0,defaultToFirstItem:!1,searchPlaceholder:(0,r.__)("Type to search by ID or title...","blocksy-companion"),placeholder:"post_ids"===i.rule?(0,r.__)("Select post","blocksy-companion"):"page_ids"===i.rule?(0,r.__)("Select page","blocksy-companion"):(0,r.__)("Custom Post Type ID","blocksy-companion"),choices:c(d.filter((function(e){var t=e.post_type;return"ct_cpt"===b?"post"!==t&&"page"!==t:b===t})).map((function(e){return{key:e.ID,value:e.post_title}}))),search:!0},value:h,onChange:function(e){return l(e)},onInputValueChange:function(e){d.find((function(t){return t.post_title===e}))||v(e)}})};function b(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,a=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}return n}}(e,t)||E(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 h(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 v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){_(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function g(e){return function(e){if(Array.isArray(e))return w(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||E(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 E(e,t){if(e){if("string"==typeof e)return w(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)?w(e,t):void 0}}function w(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=[],k=[],j=[],S=function(t){var n=t.value,a=t.onChange,c=t.filter,l=void 0===c?"all":c,u=blocksy_admin.all_condition_rules;"singular"===l&&(u=blocksy_admin.singular_condition_rules),"archive"===l&&(u=blocksy_admin.archive_condition_rules);var s=u.reduce((function(e,t){var n=t.rules,r=t.title;return[].concat(g(e),g(n.map((function(e){return v(v({},e),{},{group:r})}))))}),[]).reduce((function(e,t){var n=t.title,r=t.id,o=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,["title","id"]);return[].concat(g(e),[v({key:r,value:n},o)])}),[]),p=b((0,e.useState)(O),2),d=p[0],f=p[1],m=b((0,e.useState)(k),2),h=m[0],_=m[1],E=b((0,e.useState)(j),2),w=E[0],S=E[1],C=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||"current_language"===e.rule||"user_post_author_id"===e.rule||"author"===e.rule};return(0,e.useEffect)((function(){fetch("".concat(wp.ajax.settings.url,"?action=blocksy_conditions_get_all_taxonomies"),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST"}).then((function(e){return e.json()})).then((function(e){var t=e.data,n=t.taxonomies,r=t.languages,o=t.users;f(n),O=n,_(r),k=r,S(o),j=o}))}),[]),(0,e.createElement)("div",{className:"ct-display-conditions"},n.map((function(t,c){return(0,e.createElement)("div",{className:i()("ct-condition-group",{"ct-cols-3":C(t),"ct-cols-2":!C(t)}),key:c},(0,e.createElement)(o.Select,{key:"first",option:{inputClassName:"ct-condition-type",selectInputStart:function(){return(0,e.createElement)("span",{className:"ct-".concat(t.type)})},placeholder:(0,r.__)("Select variation","blocksy-companion"),choices:{include:(0,r.__)("Include","blocksy-companion"),exclude:(0,r.__)("Exclude","blocksy-companion")}},value:t.type,onChange:function(e){a(n.map((function(n,r){return v({},r===c?v(v({},t),{},{type:e}):n)})))}}),(0,e.createElement)(o.Select,{key:"second",option:{appendToBody:!0,placeholder:(0,r.__)("Select rule","blocksy-companion"),choices:"user"===t.category?s.filter((function(e){return 0===e.key.indexOf("user_")})):s.filter((function(e){return-1===e.key.indexOf("user_")})),search:!0},value:t.rule,onChange:function(e){a(n.map((function(n,r){return v({},r===c?v(v({},t),{},{rule:e}):n)})))}}),("post_ids"===t.rule||"custom_post_type_ids"===t.rule||"page_ids"===t.rule)&&(0,e.createElement)(y,{condition:t,onChange:function(e){a(n.map((function(n,r){return v({},r===c?v(v({},t),{},{payload:v(v({},t.payload),{},{post_id:e})}):n)})))}}),("taxonomy_ids"===t.rule||"post_with_taxonomy_ids"===t.rule)&&(0,e.createElement)(o.Select,{option:{appendToBody:!0,defaultToFirstItem:!1,placeholder:(0,r.__)("Select taxonomy","blocksy-companion"),choices:d.map((function(e){return v({key:e.id,value:e.name},e.group?{group:e.group}:{})})),search:!0},value:(t.payload||{}).taxonomy_id||"",onChange:function(e){a(n.map((function(n,r){return v({},r===c?v(v({},t),{},{payload:v(v({},t.payload),{},{taxonomy_id:e})}):n)})))}}),"current_language"===t.rule&&(0,e.createElement)(o.Select,{option:{appendToBody:!0,defaultToFirstItem:!1,placeholder:(0,r.__)("Select language","blocksy-companion"),choices:h.map((function(e){return{key:e.id,value:e.name}})),search:!0},value:(t.payload||{}).language||"",onChange:function(e){a(n.map((function(n,r){return v({},r===c?v(v({},t),{},{payload:v(v({},t.payload),{},{language:e})}):n)})))}}),"user_post_author_id"===t.rule&&(0,e.createElement)(o.Select,{option:{appendToBody:!0,defaultToFirstItem:!1,placeholder:(0,r.__)("Select user","blocksy-companion"),choices:[{key:"current_user",value:(0,r.__)("Current user","blocksy-companion")}].concat(g(w.map((function(e){return{key:e.id,value:e.name}})))),search:!0},value:(t.payload||{}).user_id||"",onChange:function(e){a(n.map((function(n,r){return v({},r===c?v(v({},t),{},{payload:v(v({},t.payload),{},{user_id:e})}):n)})))}}),"author"===t.rule&&(0,e.createElement)(o.Select,{option:{appendToBody:!0,placeholder:(0,r.__)("Select user","blocksy-companion"),choices:[{key:"all_users",value:(0,r.__)("All authors","blocksy-companion")}].concat(g(w.map((function(e){return{key:e.id,value:e.name}})))),search:!0},value:(t.payload||{}).user_id||"all_users",onChange:function(e){a(n.map((function(n,r){return v({},r===c?v(v({},t),{},{payload:v(v({},t.payload),{},{user_id:e})}):n)})))}}),(0,e.createElement)("button",{type:"button",onClick:function(e){e.preventDefault();var t=g(n);t.splice(c,1),a(t)}},"×"))})),(0,e.createElement)("div",{className:"ct-conditions-actions"},(0,e.createElement)("button",{type:"button",className:"button add-condition",onClick:function(e){e.preventDefault(),a([].concat(g(n),[{type:"include",rule:u[0].rules[0].id,payload:{}}]))}},(0,r.__)("Add Display Condition","blocksy-companion")),(0,e.createElement)("button",{type:"button",className:"button add-condition",onClick:function(e){e.preventDefault(),a([].concat(g(n),[{type:"include",rule:"user_logged_in",payload:{},category:"user"}]))}},(0,r.__)("Add User Condition","blocksy-companion"))))};function C(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,a=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}return n}}(e,t)||function(e,t){if(e){if("string"==typeof e)return x(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)?x(e,t):void 0}}(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 A=function(t){var n=t.option,a=n.display,i=void 0===a?"inline":a,c=n.filter,l=void 0===c?"all":c,u=n.modalTitle,s=void 0===u?(0,r.__)("Transparent Header Display Conditions","blocksy-companion"):u,p=n.modalDescription,d=void 0===p?(0,r.__)("Add one or more conditions to display the transparent header.","blocksy-companion"):p,f=t.value,m=t.onChange,y=C((0,e.useState)(!1),2),b=y[0],h=y[1],v=C((0,e.useState)(null),2),_=v[0],g=v[1];return"inline"===i?(0,e.createElement)(S,{filter:l,value:f,onChange:m}):(0,e.createElement)(e.Fragment,null,(0,e.createElement)("button",{className:"button-primary",style:{width:"100%"},onClick:function(e){e.preventDefault(),h(!0),g(null)}},(0,r.__)("Add/Edit Conditions","blocksy-companion")),(0,e.createElement)(o.Overlay,{items:b,className:"ct-admin-modal ct-builder-conditions-modal",onDismiss:function(){h(!1),g(null)},render:function(){return(0,e.createElement)("div",{className:"ct-modal-content"},(0,e.createElement)("h2",null,s),(0,e.createElement)("p",null,d),(0,e.createElement)("div",{className:"ct-modal-scroll"},(0,e.createElement)(S,{filter:l,value:_||f,onChange:function(e){g(e)}})),(0,e.createElement)("div",{className:"ct-modal-actions has-divider"},(0,e.createElement)("button",{className:"button-primary",disabled:!_,onClick:function(){m(_),h(!1)}},(0,r.__)("Save Conditions","blocksy-companion"))))}}))},N=n(785),P=n.n(N),T=n(539),D=n.n(T);function I(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,a=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}return n}}(e,t)||z(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 z(e,t){if(e){if("string"==typeof e)return L(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)?L(e,t):void 0}}function L(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var R=function(){var t=I((0,e.useState)(null),2),n=t[0],a=t[1],c=I((0,e.useState)(null),2),l=c[0],u=c[1],s=I((0,e.useState)(!1),2),p=s[0],d=s[1],f=I((0,e.useState)(!1),2),m=f[0],y=f[1],b=I((0,e.useState)(["options"]),2),h=b[0],v=b[1],_=(0,e.useRef)(),g=(0,e.useRef)();return(0,e.useEffect)((function(){var e=function(e){e.stopPropagation(),e.preventDefault(),e.dataTransfer.dropEffect="copy",d(!0)},t=function(e){e.stopPropagation(),e.preventDefault(),d(!1)},n=function(e){e.stopPropagation(),e.preventDefault(),d(!1);var t=Array.from(e.dataTransfer.files||[]);if(Array.from(e.dataTransfer.items||[]).length>0){var n=e.dataTransfer.items[0].getAsFile();a(n)}else t.length>0&&a(t[0])};return g.current.addEventListener("dragover",e,!1),g.current.addEventListener("dragleave",t,!1),g.current.addEventListener("drop",n,!1),function(){g.current.removeEventListener("dragover",e,!1),g.current.removeEventListener("dragleave",t,!1),g.current.removeEventListener("drop",n,!1)}}),[]),(0,e.createElement)("div",{className:"ct-import-export"},(0,e.createElement)("div",{className:"ct-title","data-type":"simple"},(0,e.createElement)("h3",null,(0,r.__)("Export Options","blocksy-companion")),(0,e.createElement)("div",{className:"ct-option-description"},(0,r.__)("Easily export the theme customizer settings.","blocksy-companion"))),(0,e.createElement)("div",{className:"ct-control","data-design":"block"},(0,e.createElement)("header",null),(0,e.createElement)("section",null,(0,e.createElement)("button",{className:"button",onClick:function(e){e.preventDefault(),y(!0)}},(0,r.__)("Export Customizations","blocksy-companion")))),(0,e.createElement)("div",{className:"ct-title","data-type":"simple"},(0,e.createElement)("h3",null,(0,r.__)("Import Options","blocksy-companion")),(0,e.createElement)("div",{className:"ct-option-description"},(0,r.__)("Easily import the theme customizer settings.","blocksy-companion"))),(0,e.createElement)("div",{className:"ct-control","data-design":"block"},(0,e.createElement)("header",null),(0,e.createElement)("section",null,(0,e.createElement)("div",{className:"ct-file-upload"},(0,e.createElement)("button",{type:"button",className:i()("button ct-upload-button",{active:p}),ref:g,onClick:function(){_.current.click()}},n?n.name:(0,r.__)("Click or drop to upload a file...","blocksy-companion")),(0,e.createElement)("input",{ref:_,type:"file",onChange:function(e){var t=I(e.target.files,1)[0];a(t)}}),(0,e.createElement)("button",{className:"button",onClick:function(e){if(e.preventDefault(),n){var t=new FileReader;t.readAsText(n,"UTF-8"),t.onload=function(e){try{fetch("".concat(window.ajaxurl,"?action=blocksy_customizer_import&wp_customize=on&nonce=").concat(ct_customizer_localizations.customizer_reset_none),{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(D()(e.target.result))}).then((function(e){200===e.status&&e.json().then((function(e){e.success,e.data,location.reload()}))}))}catch(e){}}}}},(0,r.__)("Import Customizations","blocksy-companion"))))),ct_customizer_localizations.has_child_theme&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"ct-title","data-type":"simple"},(0,e.createElement)("h3",null,(0,r.__)("Copy Options","blocksy-companion")),(0,e.createElement)("div",{className:"ct-option-description"},(0,r.__)("Copy and import your customizations from parent or child theme.","blocksy-companion"))),ct_customizer_localizations.is_parent_theme&&(0,e.createElement)("div",{className:"ct-control","data-design":"block"},(0,e.createElement)("header",null),(0,e.createElement)("section",null,(0,e.createElement)("button",{className:"button",onClick:function(e){e.preventDefault(),u("child")}},(0,r.__)("Copy From Child Theme","blocksy-companion")))),!ct_customizer_localizations.is_parent_theme&&(0,e.createElement)("div",{className:"ct-control","data-design":"block"},(0,e.createElement)("header",null),(0,e.createElement)("section",null,(0,e.createElement)("button",{className:"button",onClick:function(e){e.preventDefault(),u("parent")}},(0,r.__)("Copy From Parent Theme","blocksy-companion"))))),(0,e.createElement)(o.Overlay,{items:l,className:"ct-admin-modal ct-import-export-modal",onDismiss:function(){return u(!1)},render:function(){return(0,e.createElement)("div",{className:"ct-modal-content"},(0,e.createElement)("svg",{width:"35",height:"35",viewBox:"0 0 66 66"},(0,e.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"})),(0,e.createElement)("h2",{className:"ct-modal-title"},!ct_customizer_localizations.is_parent_theme&&(0,r.__)("Copy From Parent Theme","blocksy-companion"),ct_customizer_localizations.is_parent_theme&&(0,r.__)("Copy From Child Theme","blocksy-companion")),(0,e.createElement)("p",null,!ct_customizer_localizations.is_parent_theme&&(0,r.__)("You are about to copy all the settings from your parent theme into the child theme. Are you sure you want to continue?","blocksy-companion"),ct_customizer_localizations.is_parent_theme&&(0,r.__)("You are about to copy all the settings from your child theme into the parent theme. Are you sure you want to continue?","blocksy-companion")),(0,e.createElement)("div",{className:"ct-modal-actions has-divider","data-buttons":"2"},(0,e.createElement)("button",{onClick:function(e){e.preventDefault(),e.stopPropagation(),u(!1)},className:"button"},(0,r.__)("Cancel","blocksy-companion")),(0,e.createElement)("button",{className:"button button-primary",onClick:function(e){e.preventDefault();var t=new FormData;t.append("action","blocksy_customizer_copy_options"),t.append("wp_customize","on"),t.append("strategy",l);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){}}},(0,r.__)("Yes, I am sure","blocksy-companion"))))}}),(0,e.createElement)(o.Overlay,{items:m,className:"ct-admin-modal ct-export-modal",onDismiss:function(){return y(!1)},render:function(){return(0,e.createElement)("div",{className:"ct-modal-content"},(0,e.createElement)("h2",{className:"ct-modal-title"},(0,r.__)("Export Settings","blocksy-companion")),(0,e.createElement)("p",null,(0,r.__)("Choose what set of settings you want to export.","blocksy-companion")),(0,e.createElement)("div",{className:"ct-export-options"},["options","widgets"].map((function(t){return(0,e.createElement)("div",{className:"ct-checkbox-container",onClick:function(){1===h.length&&h[0]===t||v((function(e){return e.includes(t)?e.filter((function(e){return e!==t})):[].concat(function(e){if(Array.isArray(e))return L(e)}(n=e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(n)||z(n)||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.")}(),[t]);var n}))}},{options:(0,r.__)("Customizer settings","blocksy-companion"),widgets:(0,r.__)("Widgets settings","blocksy-companion")}[t],(0,e.createElement)("span",{className:i()("ct-checkbox",{active:h.includes(t)})},(0,e.createElement)("svg",{width:"10",height:"8",viewBox:"0 0 11.2 9.1"},(0,e.createElement)("polyline",{className:"check",points:"1.2,4.8 4.4,7.9 9.9,1.2 "}))))}))),(0,e.createElement)("div",{className:"ct-modal-actions has-divider","data-buttons":"2"},(0,e.createElement)("button",{onClick:function(e){e.preventDefault(),e.stopPropagation(),y(!1)},className:"button"},(0,r.__)("Cancel","blocksy-companion")),(0,e.createElement)("button",{className:"button button-primary",onClick:function(e){e.preventDefault();var t=new FormData;t.append("action","blocksy_customizer_export"),t.append("strategy",h.join(":")),t.append("wp_customize","on");try{fetch(window.ajaxurl,{method:"POST",body:t}).then((function(e){200===e.status&&e.json().then((function(e){var t=e.success,n=e.data;if(t){var r=new Blob([n.data],{type:"application/octet-stream;charset=utf-8"});P()(r,"".concat(n.site_url.replace("http://","").replace("https://","").replace(".","-").replace("/","-"),"-export.dat")),y(!1)}}))}))}catch(e){}}},(0,r.__)("Export","blocksy-companion"))))}}))},F=window.ctEvents,U=n.n(F),B=window.wp.hooks,M=n(459),H=n.n(M),V=n(616),$=n.n(V),G=n(382),J=n.n(G);function Y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function q(e,t,n,r,o,a,i){try{var c=e[a](i),l=c.value}catch(e){return void n(e)}c.done?t(l):Promise.resolve(l).then(r,o)}function W(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,a=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}return n}}(e,t)||X(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){if(e){if("string"==typeof e)return K(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?K(e,t):void 0}}function K(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Q=$()(),Z=function(t){t.forcedEdit;var n,a,i=t.headerId,c=W((0,e.useState)(!1),2),l=c[0],u=c[1],s=W((0,e.useState)(null),2),p=s[0],d=s[1],f=(0,e.useContext)(o.PlacementsDragDropContext),m=(f.builderValueCollection,f.builderValueDispatch,(0,e.useRef)()),y=J()(Q),b=H()("".concat(blocksy_admin.ajax_url,"?action=blocksy_header_get_all_conditions"),{method:"POST",formatter:(n=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)})),a=function(){var e=this,t=arguments;return new Promise((function(r,o){var a=n.apply(e,t);function i(e){q(a,r,o,i,c,"next",e)}function c(e){q(a,r,o,i,c,"throw",e)}i(void 0)}))},function(e){return a.apply(this,arguments)}),depends:[y]}),h=b.data,v=b.isLoading;return b.error,(0,e.createElement)(e.Fragment,null,(0,e.createElement)("button",{className:"button-primary",style:{width:"100%"},onClick:function(e){e.preventDefault(),e.stopPropagation(),v||u(!0)}},(0,r.__)("Add/Edit Conditions","blocksy-companion")),(0,e.createElement)(o.Overlay,{items:l,initialFocusRef:m,className:"ct-admin-modal ct-builder-conditions-modal",onDismiss:function(){u(!1),d(null)},render:function(){var t;return(0,e.createElement)("div",{className:"ct-modal-content",ref:m},(0,e.createElement)("h2",null,sprintf((0,r.__)("Display Conditions","blocksy-companion"))),(0,e.createElement)("p",null,(0,r.__)("Add one or more conditions in order to display your header.","blocksy-companion")),(0,e.createElement)("div",{className:"ct-modal-scroll"},(0,e.createElement)(o.OptionsPanel,{onChange:function(e,t){d((function(e){return[].concat(function(e){if(Array.isArray(e))return K(e)}(n=(e||h).filter((function(e){return e.id!==i})))||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(n)||X(n)||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.")}(),[{id:i,conditions:t}]);var n}))},options:{conditions:(t={type:"blocksy-display-condition",design:"none",value:[]},Y(t,"design","none"),Y(t,"label",!1),t)},value:{conditions:((p||h).find((function(e){return e.id===i}))||{conditions:[]}).conditions},hasRevertButton:!1})),(0,e.createElement)("div",{className:"ct-modal-actions has-divider"},(0,e.createElement)("button",{className:"button-primary",disabled:!p,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(p)}).then((function(e){return e.json()})).then((function(){Q(),u(!1)}))}},(0,r.__)("Save Conditions","blocksy-companion"))))}}))};function ee(){return ee=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},ee.apply(this,arguments)}function te(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ne(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?te(Object(n),!0).forEach((function(t){re(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):te(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function re(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ae=function(){var n,a,c=(n=(0,e.useState)(!1),a=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,a=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}return n}}(n,a)||function(e,t){if(e){if("string"==typeof e)return oe(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)?oe(e,t):void 0}}(n,a)||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.")}()),l=c[0],u=c[1],s=(ct_customizer_localizations.header_builder_data.secondary_items.header,ct_customizer_localizations.header_builder_data.header,(0,e.useContext)(o.PlacementsDragDropContext)),p=s.builderValueDispatch,d=s.builderValue,f=(s.option,s.builderValueCollection),m=s.panelsActions,y=(0,B.applyFilters)("blocksy.header.available-sections",null,f.sections)||f.sections.filter((function(e){var t=e.id;return"type-2"!==t&&"type-3"!==t&&-1===t.indexOf("ct-custom")}));return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("ul",{className:i()("ct-panels-manager")},y.map((function(t){var n=t.name,a=t.id,c=n||{"type-1":(0,r.__)("Global Header","blocksy")}[a]||a,l="builder_header_panel_".concat(a),s=ct_customizer_localizations.header_builder_data.header_data.header_options,f={label:c,"inner-options":ne(ne({},a.indexOf("ct-custom")>-1?{conditions_button:{label:(0,r.__)("Edit Conditions","blocksy-companion"),type:"jsx",design:"block",render:function(){return(0,e.createElement)(Z,{headerId:a})}},divider:{type:"ct-divider"}}:{}),s)};return(0,e.createElement)(o.PanelMetaWrapper,ee({id:l,key:a,option:f},m,{getActualOption:function(t){var n=t.open;return(0,e.createElement)(e.Fragment,null,a===d.id&&(0,e.createElement)(o.Panel,{id:l,getValues:function(){return ne({id:a},d.settings||{})},option:f,onChangeFor:function(e,t){p({type:"BUILDER_GLOBAL_SETTING_ON_CHANGE",payload:{optionId:e,optionValue:t,values:(0,o.getValueFromInput)(s,Array.isArray(d.settings)?{}:d.settings||{})}})},view:"simple"}),(0,e.createElement)("li",{className:i()({active:a===d.id,"ct-global":"type-1"===a}),onClick:function(){a===d.id?n():p({type:"PICK_BUILDER_SECTION",payload:{id:a}})}},(0,e.createElement)("span",{className:"ct-panel-name"},c),a.indexOf("ct-custom")>-1&&a!==d.id&&(0,e.createElement)("span",{className:"ct-remove-instance",onClick:function(e){e.preventDefault(),e.stopPropagation(),u(a)}},(0,e.createElement)("i",{className:"ct-tooltip-top"},(0,r.__)("Remove header","blocksy-companion")),(0,e.createElement)("svg",{width:"11px",height:"11px",viewBox:"0 0 24 24"},(0,e.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"})))))}}))}))),(0,e.createElement)(t.Slot,{name:"PlacementsBuilderPanelsManagerAfter"},(function(e){return 0===e.length?null:e})),(0,e.createElement)(o.Overlay,{items:l,className:"ct-admin-modal ct-reset-options",onDismiss:function(){return u(!1)},render:function(){return(0,e.createElement)("div",{className:"ct-modal-content"},(0,e.createElement)("h2",{className:"ct-modal-title"},(0,r.__)("Remove Header","blocksy-companion")),(0,e.createElement)("p",null,(0,r.__)("You are about to remove a custom header, are you sure you want to continue?","blocksy-companion")),(0,e.createElement)("div",{className:"ct-modal-actions has-divider","data-buttons":"2"},(0,e.createElement)("button",{onClick:function(e){e.preventDefault(),e.stopPropagation(),u(!1)},className:"button"},(0,r.__)("Cancel","blocksy-companion")),(0,e.createElement)("button",{className:"button button-primary",onClick:function(e){e.preventDefault(),p({type:"REMOVE_BUILDER_SECTION",payload:{id:l}}),u(!1)}},(0,r.__)("Confirm","blocksy-companion"))))}}))};U().on("blocksy:options:before-option",(function(n){if(n.option&&"ct-header-builder"===n.option.type){var r=n.content;n.content=(0,e.createElement)(e.Fragment,null,r,(0,e.createElement)(t.Fill,{name:"PlacementsBuilderPanelsManager"},(0,e.createElement)(ae,null)))}})),U().on("blocksy:options:register",(function(e){e["blocksy-display-condition"]=A,e["blocksy-customizer-options-manager"]=R}))}()}();
|
static/bundle/options.min.css
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
/**
|
2 |
-
* - v1.8.
|
3 |
*
|
4 |
* Copyright (c) 2022
|
5 |
* Licensed GPLv2+
|
1 |
/**
|
2 |
+
* - v1.8.43
|
3 |
*
|
4 |
* Copyright (c) 2022
|
5 |
* Licensed GPLv2+
|
static/bundle/sticky.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(){"use strict";var t={n:function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,{a:r}),r},d:function(e,r){for(var n in r)t.o(r,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},o:function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}},e=window.ctEvents,r=t.n(e),n=window.ctFrontend,i=function(t,e,r){return Math.max(t,Math.min(e,r))},o=function(t,e,r){return e[0]+(e[1]-e[0])/(t[1]-t[0])*(r-t[0])},a=function(t){if(t.blcInitialHeight)return t.blcInitialHeight;var e=t.firstElementChild;t.firstElementChild.firstElementChild&&(e=t.firstElementChild.firstElementChild);var r=e.getBoundingClientRect().height;return t.blcInitialHeight=r,r},s=function(t){var e=getComputedStyle(t),r=100;t.dataset.row.includes("middle")&&(r=e.getPropertyValue("--sticky-shrink"));var n=a(t);return r&&(n*=parseFloat(r)/100),n};function c(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=null,d=function(t){var e,r=t.stickyContainer,n=t.startPosition;(e=r.querySelectorAll('[data-row*="middle"]'),function(t){if(Array.isArray(t))return c(t)}(e)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(e)||function(t,e){if(t){if("string"==typeof t)return c(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(t,e):void 0}}(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.")}()).map((function(t){if(t.querySelector('[data-id="logo"] .site-logo-container')){var e=t.querySelector('[data-id="logo"] .site-logo-container'),r=function(t){var e=t.logo,r=t.row;if(l)return l;var n=parseFloat(getComputedStyle(e).getPropertyValue("--logo-max-height")||50),i=parseFloat(getComputedStyle(e).getPropertyValue("--logo-sticky-shrink").toString().replace(",",".")||1),o=a(r),c=s(r);return l={initialHeight:n,stickyShrink:i,rowInitialHeight:o,rowStickyHeight:c}}({logo:e,row:t}),c=r.initialHeight,d=r.stickyShrink,u=r.rowInitialHeight,y=r.rowStickyHeight,f=c*d;1!==d&&e.style.setProperty("--logo-shrink-height","".concat(o([n,n+Math.abs(u===y?c-f:u-y)],[1,d],i(n,n+Math.abs(u===y?c-f:u-y),scrollY))*c,"px"))}}))},u=null;function y(t){return function(t){if(Array.isArray(t))return f(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return f(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?f(t,e):void 0}}(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 f(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function m(t){return function(t){if(Array.isArray(t))return h(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return h(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?h(t,e):void 0}}(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 h(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 p=window.scrollY;function g(t){return function(t){if(Array.isArray(t))return w(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return w(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?w(t,e):void 0}}(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 w(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function k(t){return function(t){if(Array.isArray(t))return b(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return b(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?b(t,e):void 0}}(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 b(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 v=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}))},A=null,S=null,C=null;window.wp&&wp.customize&&wp.customize.selectiveRefresh&&wp.customize.selectiveRefresh.bind("partial-content-rendered",(function(t){setTimeout((function(){u=null,l=null,A=null,S=null,C=null,O=null,j()}),500)}));var O=null,j=function(){if(O!==scrollY){O=scrollY;var t=document.querySelector('[data-device="'.concat((0,n.getCurrentScreen)(),'"] [data-sticky]'));if(t){var e=A;null===e&&(e=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;if(e>0){var r=document.elementFromPoint(0,3);r&&function(t){for(var e=[];t&&t!==document;t=t.parentNode)e.push(t);return e}(r).map((function(t){return getComputedStyle(t).position})).indexOf("fixed")>-1&&(e-=r.getBoundingClientRect().height)}var n=t.parentNode,i=getComputedStyle(document.body),o=parseFloat(i.getPropertyValue("--header-sticky-offset")||0);if(o=o+parseFloat(i.getPropertyValue("--frame-size"))||0,1===n.parentNode.children.length||n.parentNode.children[0].classList.contains("ct-sticky-container"))return e>0?e-o:e;var a=Array.from(n.parentNode.children).reduce((function(t,e,r){return t.indexOf(0)>-1||!e.dataset.row?[].concat(k(t),[0]):[].concat(k(t),[e.classList.contains("ct-sticky-container")?0:e.getBoundingClientRect().height])}),[]).reduce((function(t,e){return t+e}),e);return a>0?a-o:a}(t),A=e);var r=C;r||(r=parseInt(t.getBoundingClientRect().height),C=parseInt(r),document.body.style.setProperty("--header-sticky-height-animated","".concat(k(t.querySelectorAll("[data-row]")).reduce((function(t,e){return t+s(e)}),0),"px")));var c=t.dataset.sticky.split(":").filter((function(t){return"yes"!==t&&"no"!==t&&"fixed"!==t})),l=e>0&&Math.abs(window.scrollY-e)<5||window.scrollY>e;c.indexOf("shrink")>-1&&(l=e>0?window.scrollY>=e:window.scrollY>0),setTimeout((function(){l&&-1===document.body.dataset.header.indexOf("shrink")&&(document.body.dataset.header="".concat(document.body.dataset.header,":shrink")),!l&&document.body.dataset.header.indexOf("shrink")>-1&&(document.body.dataset.header=document.body.dataset.header.replace(":shrink",""))}),300);var f=S;f||(f=S=Array.from(t.querySelectorAll("[data-row]")).reduce((function(t,e){return t+e.getBoundingClientRect().height}),0),t.parentNode.style.height="".concat(f,"px")),c.indexOf("shrink")>-1&&function(t){var e=t.containerInitialHeight,r=t.stickyContainer,n=t.isSticky,c=t.startPosition,l=t.stickyComponents;if(0===c&&0===window.scrollY&&(r.dataset.sticky=["fixed"].concat(y(l)).join(":")),n){if(l.indexOf("yes")>-1)return;-1===r.dataset.sticky.indexOf("yes")&&(v(r,"no"),r.dataset.sticky=["yes"].concat(y(l)).join(":")),d({stickyContainer:r,startPosition:c}),function(t){var e=t.stickyContainer,r=(t.containerInitialHeight,t.startPosition);e.querySelector('[data-row*="middle"]')&&[e.querySelector('[data-row*="middle"]')].map((function(t){var e=function(t){var e=t.row;if(u)return u;var r=a(e),n=s(e);return u={rowInitialHeight:r,rowStickyHeight:n}}({row:t}),n=e.rowInitialHeight,c=e.rowStickyHeight;n!==c&&t.style.setProperty("--shrink-height","".concat(o([r,r+Math.abs(n-c)],[n,c],i(r,r+Math.abs(n-c),scrollY)),"px"))}))}({stickyContainer:r,containerInitialHeight:e,startPosition:c})}else Array.from(r.querySelectorAll("[data-row]")).map((function(t){return t.removeAttribute("style")})),Array.from(r.querySelectorAll('[data-row*="middle"] .site-logo-container')).map((function(t){return t.removeAttribute("style")})),v(r,"yes"),0===c&&window.scrollY<=0?r.dataset.sticky=["fixed"].concat(y(l)).join(":"):r.dataset.sticky=l.join(":")}({stickyContainer:t,stickyContainerHeight:r,containerInitialHeight:f,isSticky:l,startPosition:e,stickyComponents:c}),c.indexOf("auto-hide")>-1&&function(t){var e=t.startPosition,r=t.stickyContainer,n=t.isSticky,i=t.stickyComponents;if(window.scrollY<e&&(p=window.scrollY),n&&window.scrollY-p==0&&document.body.style.setProperty("--header-sticky-height-animated","0px"),n&&window.scrollY-p<-5)-1===r.dataset.sticky.indexOf("yes")&&(r.dataset.sticky=["yes-start"].concat(m(i)).join(":"),requestAnimationFrame((function(){r.dataset.sticky=r.dataset.sticky.replace("yes-start","yes-end"),setTimeout((function(){r.dataset.sticky=r.dataset.sticky.replace("yes-end","yes")}),200)}))),v(r,"no"),document.body.removeAttribute("style");else{if(!n)return r.dataset.sticky=i.filter((function(t){return"yes-end"!==t})).join(":"),Array.from(r.querySelectorAll("[data-row]")).map((function(t){return t.removeAttribute("style")})),v(r,"yes"),document.body.style.setProperty("--header-sticky-height-animated","0px"),void(p=window.scrollY);-1===r.dataset.sticky.indexOf("yes-hide")&&r.dataset.sticky.indexOf("yes:")>-1&&window.scrollY-p>5&&(r.dataset.sticky=["yes-hide-start"].concat(m(i)).join(":"),document.body.style.setProperty("--header-sticky-height-animated","0px"),requestAnimationFrame((function(){r.dataset.sticky=r.dataset.sticky.replace("yes-hide-start","yes-hide-end"),setTimeout((function(){r.dataset.sticky=i.join(":"),Array.from(r.querySelectorAll("[data-row]")).map((function(t){return t.removeAttribute("style")})),v(r,"yes")}),200)})))}p=window.scrollY}({stickyContainer:t,isSticky:l,startPosition:e,stickyComponents:c}),(c.indexOf("slide")>-1||c.indexOf("fade")>-1)&&function(t){var e=t.stickyContainer,r=t.startPosition,n=t.stickyComponents;t.isSticky?(-1===e.dataset.sticky.indexOf("yes")&&(e.dataset.sticky=["yes-start"].concat(g(n)).join(":"),setTimeout((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)}),1)),v(e,"no")):-1===e.dataset.sticky.indexOf("yes-hide")&&e.dataset.sticky.indexOf("yes:")>-1&&(Math.abs(window.scrollY-r)>10?(e.dataset.sticky=n.join(":"),setTimeout((function(){Array.from(e.querySelectorAll("[data-row]")).map((function(t){return t.removeAttribute("style")}))}),300),v(e,"yes")):(e.dataset.sticky=["yes-hide-start"].concat(g(n)).join(":"),requestAnimationFrame((function(){e.dataset.sticky=e.dataset.sticky.replace("yes-hide-start","yes-hide-end"),setTimeout((function(){e.dataset.sticky=n.join(":"),setTimeout((function(){Array.from(e.querySelectorAll("[data-row]")).map((function(t){return t.removeAttribute("style")}))}),300),v(e,"yes")}),200)}))))}({stickyContainer:t,isSticky:l,startPosition:e,stickyComponents:c})}}},x=function(){document.querySelector("header [data-sticky]")&&(window.addEventListener("resize",(function(t){j(t),r().trigger("ct:header:update")}),!1),window.addEventListener("orientationchange",(function(t){j(t),r().trigger("ct:header:update")})),window.addEventListener("scroll",j,!1),window.addEventListener("load",j,!1),j())};document.body.className.indexOf("e-preview")>-1?setTimeout((function(){x()}),500):x(),(0,n.registerDynamicChunk)("blocksy_sticky_header",{mount:function(t){}})}();
|
1 |
+
!function(){"use strict";var t={n:function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,{a:n}),n},d:function(e,n){for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}},e=window.ctEvents,n=t.n(e),r=window.ctFrontend,o=function(t,e,n){return Math.max(t,Math.min(e,n))},i=function(t,e,n){return e[0]+(e[1]-e[0])/(t[1]-t[0])*(n-t[0])},a=function(t){if(t.blcInitialHeight)return t.blcInitialHeight;var e=t.firstElementChild;t.firstElementChild.firstElementChild&&(e=t.firstElementChild.firstElementChild);var n=e.getBoundingClientRect().height;return t.blcInitialHeight=n,n},c=function(t){var e=getComputedStyle(t),n=100;t.dataset.row.includes("middle")&&(n=e.getPropertyValue("--sticky-shrink"));var r=a(t);return n&&(r*=parseFloat(n)/100),r},s=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){return 0},e=document.querySelector(".ct-floating-bar");e&&e.style.setProperty("--header-sticky-height-animated",t())};function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var l=null,d=function(t){var e,n=t.stickyContainer,r=t.startPosition;(e=n.querySelectorAll('[data-row*="middle"]'),function(t){if(Array.isArray(t))return u(t)}(e)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(e)||function(t,e){if(t){if("string"==typeof t)return u(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(t,e):void 0}}(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.")}()).map((function(t){if(t.querySelector('[data-id="logo"] .site-logo-container')){var e=t.querySelector('[data-id="logo"] .site-logo-container'),n=function(t){var e=t.logo,n=t.row;if(l)return l;var r=parseFloat(getComputedStyle(e).getPropertyValue("--logo-max-height")||50),o=parseFloat(getComputedStyle(e).getPropertyValue("--logo-sticky-shrink").toString().replace(",",".")||1),i=a(n),s=c(n);return l={initialHeight:r,stickyShrink:o,rowInitialHeight:i,rowStickyHeight:s}}({logo:e,row:t}),s=n.initialHeight,u=n.stickyShrink,d=n.rowInitialHeight,y=n.rowStickyHeight,f=s*u;1!==u&&e.style.setProperty("--logo-shrink-height","".concat(i([r,r+Math.abs(d===y?s-f:d-y)],[1,u],o(r,r+Math.abs(d===y?s-f:d-y),scrollY))*s,"px"))}}))},y=null,f=function(t){var e=t.stickyContainer,n=(t.containerInitialHeight,t.startPosition);e.querySelector('[data-row*="middle"]')&&[e.querySelector('[data-row*="middle"]')].map((function(t){var e=function(t){var e=t.row;if(y)return y;var n=a(e),r=c(e);return y={rowInitialHeight:n,rowStickyHeight:r}}({row:t}),r=e.rowInitialHeight,s=e.rowStickyHeight;r!==s&&t.style.setProperty("--shrink-height","".concat(i([n,n+Math.abs(r-s)],[r,s],o(n,n+Math.abs(r-s),scrollY)),"px"))}))};function h(t){return function(t){if(Array.isArray(t))return p(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return p(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(t,e):void 0}}(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 p(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function m(t){return function(t){if(Array.isArray(t))return g(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return g(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?g(t,e):void 0}}(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 g(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var w=null,k=function(t){var e=t.stickyContainer;if(w)return w;var n=m(e.querySelectorAll("[data-row]")).reduce((function(t,e){return t+c(e)}),0);return w={stickyContainerHeight:n}},v={up:{anchor:null,offset:100},down:{anchor:null,offset:0}};function b(t){return function(t){if(Array.isArray(t))return S(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return S(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?S(t,e):void 0}}(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 S(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function A(t){return function(t){if(Array.isArray(t))return C(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return C(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?C(t,e):void 0}}(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 C(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var x=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}))},O=null,j=null,I=null;window.wp&&wp.customize&&wp.customize.selectiveRefresh&&wp.customize.selectiveRefresh.bind("partial-content-rendered",(function(t){setTimeout((function(){y=null,l=null,O=null,j=null,I=null,H=null,P()}),500)}));var H=null,P=function(){if(H!==scrollY){var t=document.querySelector('[data-device="'.concat((0,r.getCurrentScreen)(),'"] [data-sticky]'));if(t){var e=O;scrollY<e&&(H=window.scrollY),null===e&&(e=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;if(e>0){var n=document.elementFromPoint(0,3);n&&function(t){for(var e=[];t&&t!==document;t=t.parentNode)e.push(t);return e}(n).map((function(t){return getComputedStyle(t).position})).indexOf("fixed")>-1&&(e-=n.getBoundingClientRect().height)}var r=t.parentNode,o=getComputedStyle(document.body),i=parseFloat(o.getPropertyValue("--header-sticky-offset")||0);if(i=i+parseFloat(o.getPropertyValue("--frame-size"))||0,1===r.parentNode.children.length||r.parentNode.children[0].classList.contains("ct-sticky-container"))return e>0?e-i:e;var a=Array.from(r.parentNode.children).reduce((function(t,e,n){return t.indexOf(0)>-1||!e.dataset.row?[].concat(A(t),[0]):[].concat(A(t),[e.classList.contains("ct-sticky-container")?0:e.getBoundingClientRect().height])}),[]).reduce((function(t,e){return t+e}),e);return a>0?a-i:a}(t),O=e);var n=I,i=t.dataset.sticky.split(":").filter((function(t){return"yes"!==t&&"no"!==t&&"fixed"!==t}));n||(n=parseInt(t.getBoundingClientRect().height),I=parseInt(n),s((function(){return-1===i.indexOf("auto-hide")?"".concat(A(t.querySelectorAll("[data-row]")).reduce((function(t,e){return t+c(e)}),0),"px"):"0px"})));var a=e>0&&Math.abs(window.scrollY-e)<5||window.scrollY>e;i.indexOf("shrink")>-1&&(a=e>0?window.scrollY>=e:window.scrollY>0),setTimeout((function(){a&&-1===document.body.dataset.header.indexOf("shrink")&&(document.body.dataset.header="".concat(document.body.dataset.header,":shrink")),!a&&document.body.dataset.header.indexOf("shrink")>-1&&(document.body.dataset.header=document.body.dataset.header.replace(":shrink",""))}),300);var u=j,l=scrollY;u||(u=j=Array.from(t.querySelectorAll("[data-row]")).reduce((function(t,e){return t+e.getBoundingClientRect().height}),0),t.parentNode.style.height="".concat(u,"px")),i.indexOf("shrink")>-1&&function(t){var e=t.containerInitialHeight,n=t.stickyContainer,r=t.isSticky,o=t.startPosition,i=t.stickyComponents;if(0===o&&0===window.scrollY&&(n.dataset.sticky=["fixed"].concat(h(i)).join(":")),r){if(i.indexOf("yes")>-1)return;-1===n.dataset.sticky.indexOf("yes")&&(x(n,"no"),n.dataset.sticky=["yes"].concat(h(i)).join(":")),d({stickyContainer:n,startPosition:o}),f({stickyContainer:n,containerInitialHeight:e,startPosition:o})}else Array.from(n.querySelectorAll("[data-row]")).map((function(t){return t.removeAttribute("style")})),Array.from(n.querySelectorAll('[data-row*="middle"] .site-logo-container')).map((function(t){return t.removeAttribute("style")})),x(n,"yes"),0===o&&window.scrollY<=0?n.dataset.sticky=["fixed"].concat(h(i)).join(":"):n.dataset.sticky=i.join(":")}({stickyContainer:t,stickyContainerHeight:n,containerInitialHeight:u,isSticky:a,startPosition:e,stickyComponents:i}),i.indexOf("auto-hide")>-1&&function(t){var e=t.currentScrollY,n=t.stickyContainer,r=t.containerInitialHeight,i=t.startPosition,a=t.isSticky;a&&e-t.prevScrollY==0&&s((function(){return"0px"}));var c=e<t.prevScrollY?"up":"down";"up"===c&&function(t){var e=t.containerInitialHeight,n=t.stickyContainer,r=t.stickyComponents,o=t.isSticky,i=t.prevScrollY,a=t.currentScrollY,c=k({stickyContainer:n}).stickyContainerHeight;o&&a-i==0&&s((function(){return"0px"})),!v.up.anchor&&a>2*e&&-1===n.dataset.sticky.indexOf("yes:")&&(v.up.anchor=a,n.dataset.sticky=["yes"].concat(m(r)).join(":"),x(n,"no"),document.body.removeAttribute("style")),!v.up.anchor&&v.down.anchor&&v.down.offset===c&&(v.up.anchor=a,v.down.anchor=null),o||(v.up.anchor=null,n.dataset.sticky=m(r).join(":"),x(n,"yes"),s((function(){return"0px"})))}(t),"down"===c&&function(t){var e=t.currentScrollY,n=t.stickyContainer,r=k({stickyContainer:n}).stickyContainerHeight;!v.down.anchor&&v.up.anchor&&0===v.up.offset&&(v.up.anchor=null,v.down.anchor=e),!v.down.anchor&&v.up.anchor&&v.up.offset===r&&(v.up.anchor=null,v.down.anchor=e-r)}(t),a?(d({stickyContainer:n,startPosition:i}),f({stickyContainer:n,containerInitialHeight:r,startPosition:i})):(Array.from(n.querySelectorAll("[data-row]")).map((function(t){return t.removeAttribute("style")})),Array.from(n.querySelectorAll('[data-row*="middle"] .site-logo-container')).map((function(t){return t.removeAttribute("style")}))),function(t){var e=t.currentScrollY,n=t.stickyContainer,r=null,i=k({stickyContainer:n}).stickyContainerHeight;v.down.anchor&&(v.down.offset=o(0,i,e-v.down.anchor),r=v.down.offset),!v.down.anchor&&v.up.anchor&&(v.up.offset=o(0,i,i-(v.up.anchor-e)),r=v.up.offset),null!==r&&(n.style.transform="translate3d(0px, ".concat(-1*Math.floor(r),"px, 0px)"),s((function(){return"".concat(i-r,"px")})))}(t)}({stickyContainer:t,isSticky:a,startPosition:e,stickyComponents:i,containerInitialHeight:u,stickyContainerHeight:n,currentScrollY:l,prevScrollY:H}),(i.indexOf("slide")>-1||i.indexOf("fade")>-1)&&function(t){var e=t.stickyContainer,n=t.startPosition,r=t.stickyComponents;t.isSticky?(-1===e.dataset.sticky.indexOf("yes")&&(e.dataset.sticky=["yes-start"].concat(b(r)).join(":"),setTimeout((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)}),1)),x(e,"no")):-1===e.dataset.sticky.indexOf("yes-hide")&&e.dataset.sticky.indexOf("yes:")>-1&&(Math.abs(window.scrollY-n)>10?(e.dataset.sticky=r.join(":"),setTimeout((function(){Array.from(e.querySelectorAll("[data-row]")).map((function(t){return t.removeAttribute("style")}))}),300),x(e,"yes")):(e.dataset.sticky=["yes-hide-start"].concat(b(r)).join(":"),requestAnimationFrame((function(){e.dataset.sticky=e.dataset.sticky.replace("yes-hide-start","yes-hide-end"),setTimeout((function(){e.dataset.sticky=r.join(":"),setTimeout((function(){Array.from(e.querySelectorAll("[data-row]")).map((function(t){return t.removeAttribute("style")}))}),300),x(e,"yes")}),200)}))))}({stickyContainer:t,isSticky:a,startPosition:e,stickyComponents:i}),H=l}}},Y=function(){document.querySelector("header [data-sticky]")&&(window.addEventListener("resize",(function(t){P(t),n().trigger("ct:header:update")}),!1),window.addEventListener("orientationchange",(function(t){P(t),n().trigger("ct:header:update")})),window.addEventListener("scroll",P,!1),window.addEventListener("load",P,!1),P())};document.body.className.indexOf("e-preview")>-1?setTimeout((function(){Y()}),500):Y(),(0,r.registerDynamicChunk)("blocksy_sticky_header",{mount:function(t){}})}();
|
static/js/frontend/sticky.js
CHANGED
@@ -5,7 +5,10 @@ import { computeShrink } from './sticky/shrink'
|
|
5 |
import { computeAutoHide } from './sticky/auto-hide'
|
6 |
import { computeFadeSlide } from './sticky/fade-slide'
|
7 |
|
8 |
-
import {
|
|
|
|
|
|
|
9 |
|
10 |
import { clearShrinkCache } from './sticky/shrink-handle-middle-row'
|
11 |
import { clearLogoShrinkCache } from './sticky/shrink-handle-logo'
|
@@ -132,8 +135,6 @@ const compute = () => {
|
|
132 |
return
|
133 |
}
|
134 |
|
135 |
-
prevScrollY = scrollY
|
136 |
-
|
137 |
const stickyContainer = document.querySelector(
|
138 |
`[data-device="${getCurrentScreen()}"] [data-sticky]`
|
139 |
)
|
@@ -144,6 +145,10 @@ const compute = () => {
|
|
144 |
|
145 |
let startPosition = cachedStartPosition
|
146 |
|
|
|
|
|
|
|
|
|
147 |
if (startPosition === null) {
|
148 |
startPosition = getStartPositionFor(stickyContainer)
|
149 |
cachedStartPosition = startPosition
|
@@ -151,25 +156,26 @@ const compute = () => {
|
|
151 |
|
152 |
let stickyContainerHeight = cachedStickyContainerHeight
|
153 |
|
|
|
|
|
|
|
|
|
154 |
if (!stickyContainerHeight) {
|
155 |
stickyContainerHeight = parseInt(
|
156 |
stickyContainer.getBoundingClientRect().height
|
157 |
)
|
158 |
cachedStickyContainerHeight = parseInt(stickyContainerHeight)
|
159 |
|
160 |
-
|
161 |
-
'
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
|
|
167 |
}
|
168 |
|
169 |
-
const stickyComponents = stickyContainer.dataset.sticky
|
170 |
-
.split(':')
|
171 |
-
.filter((c) => c !== 'yes' && c !== 'no' && c !== 'fixed')
|
172 |
-
|
173 |
let isSticky =
|
174 |
(startPosition > 0 && Math.abs(window.scrollY - startPosition) < 5) ||
|
175 |
window.scrollY > startPosition
|
@@ -196,6 +202,8 @@ const compute = () => {
|
|
196 |
|
197 |
let containerInitialHeight = cachedContainerInitialHeight
|
198 |
|
|
|
|
|
199 |
if (!containerInitialHeight) {
|
200 |
cachedContainerInitialHeight = Array.from(
|
201 |
stickyContainer.querySelectorAll('[data-row]')
|
@@ -224,6 +232,12 @@ const compute = () => {
|
|
224 |
isSticky,
|
225 |
startPosition,
|
226 |
stickyComponents,
|
|
|
|
|
|
|
|
|
|
|
|
|
227 |
})
|
228 |
}
|
229 |
|
@@ -238,6 +252,8 @@ const compute = () => {
|
|
238 |
stickyComponents,
|
239 |
})
|
240 |
}
|
|
|
|
|
241 |
}
|
242 |
|
243 |
export const mountStickyHeader = () => {
|
5 |
import { computeAutoHide } from './sticky/auto-hide'
|
6 |
import { computeFadeSlide } from './sticky/fade-slide'
|
7 |
|
8 |
+
import {
|
9 |
+
getRowStickyHeight,
|
10 |
+
maybeSetStickyHeightAnimated,
|
11 |
+
} from './sticky/shrink-utils'
|
12 |
|
13 |
import { clearShrinkCache } from './sticky/shrink-handle-middle-row'
|
14 |
import { clearLogoShrinkCache } from './sticky/shrink-handle-logo'
|
135 |
return
|
136 |
}
|
137 |
|
|
|
|
|
138 |
const stickyContainer = document.querySelector(
|
139 |
`[data-device="${getCurrentScreen()}"] [data-sticky]`
|
140 |
)
|
145 |
|
146 |
let startPosition = cachedStartPosition
|
147 |
|
148 |
+
if (scrollY < startPosition) {
|
149 |
+
prevScrollY = window.scrollY
|
150 |
+
}
|
151 |
+
|
152 |
if (startPosition === null) {
|
153 |
startPosition = getStartPositionFor(stickyContainer)
|
154 |
cachedStartPosition = startPosition
|
156 |
|
157 |
let stickyContainerHeight = cachedStickyContainerHeight
|
158 |
|
159 |
+
const stickyComponents = stickyContainer.dataset.sticky
|
160 |
+
.split(':')
|
161 |
+
.filter((c) => c !== 'yes' && c !== 'no' && c !== 'fixed')
|
162 |
+
|
163 |
if (!stickyContainerHeight) {
|
164 |
stickyContainerHeight = parseInt(
|
165 |
stickyContainer.getBoundingClientRect().height
|
166 |
)
|
167 |
cachedStickyContainerHeight = parseInt(stickyContainerHeight)
|
168 |
|
169 |
+
maybeSetStickyHeightAnimated(() => {
|
170 |
+
return stickyComponents.indexOf('auto-hide') === -1
|
171 |
+
? `${[...stickyContainer.querySelectorAll('[data-row]')].reduce(
|
172 |
+
(res, row) => res + getRowStickyHeight(row),
|
173 |
+
0
|
174 |
+
)}px`
|
175 |
+
: '0px'
|
176 |
+
})
|
177 |
}
|
178 |
|
|
|
|
|
|
|
|
|
179 |
let isSticky =
|
180 |
(startPosition > 0 && Math.abs(window.scrollY - startPosition) < 5) ||
|
181 |
window.scrollY > startPosition
|
202 |
|
203 |
let containerInitialHeight = cachedContainerInitialHeight
|
204 |
|
205 |
+
let currentScrollY = scrollY
|
206 |
+
|
207 |
if (!containerInitialHeight) {
|
208 |
cachedContainerInitialHeight = Array.from(
|
209 |
stickyContainer.querySelectorAll('[data-row]')
|
232 |
isSticky,
|
233 |
startPosition,
|
234 |
stickyComponents,
|
235 |
+
|
236 |
+
containerInitialHeight,
|
237 |
+
stickyContainerHeight,
|
238 |
+
|
239 |
+
currentScrollY,
|
240 |
+
prevScrollY,
|
241 |
})
|
242 |
}
|
243 |
|
252 |
stickyComponents,
|
253 |
})
|
254 |
}
|
255 |
+
|
256 |
+
prevScrollY = currentScrollY
|
257 |
}
|
258 |
|
259 |
export const mountStickyHeader = () => {
|
static/js/frontend/sticky/auto-hide.js
CHANGED
@@ -1,100 +1,189 @@
|
|
1 |
import { setTransparencyFor } from '../sticky'
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
|
3 |
-
|
|
|
4 |
|
5 |
-
|
6 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
stickyContainer,
|
8 |
-
isSticky,
|
9 |
stickyComponents,
|
|
|
|
|
|
|
10 |
}) => {
|
11 |
-
|
12 |
-
prevScrollY = window.scrollY
|
13 |
-
}
|
14 |
|
15 |
-
if (isSticky &&
|
16 |
-
|
17 |
-
'
|
18 |
-
|
19 |
-
)
|
20 |
}
|
21 |
|
22 |
-
if (
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
requestAnimationFrame(() => {
|
30 |
-
stickyContainer.dataset.sticky = stickyContainer.dataset.sticky.replace(
|
31 |
-
'yes-start',
|
32 |
-
'yes-end'
|
33 |
-
)
|
34 |
-
|
35 |
-
setTimeout(() => {
|
36 |
-
stickyContainer.dataset.sticky = stickyContainer.dataset.sticky.replace(
|
37 |
-
'yes-end',
|
38 |
-
'yes'
|
39 |
-
)
|
40 |
-
}, 200)
|
41 |
-
})
|
42 |
-
}
|
43 |
|
44 |
setTransparencyFor(stickyContainer, 'no')
|
45 |
document.body.removeAttribute('style')
|
46 |
-
}
|
47 |
-
if (!isSticky) {
|
48 |
-
stickyContainer.dataset.sticky = stickyComponents
|
49 |
-
.filter((c) => c !== 'yes-end')
|
50 |
-
.join(':')
|
51 |
-
|
52 |
-
Array.from(
|
53 |
-
stickyContainer.querySelectorAll('[data-row]')
|
54 |
-
).map((row) => row.removeAttribute('style'))
|
55 |
-
setTransparencyFor(stickyContainer, 'yes')
|
56 |
-
|
57 |
-
document.body.style.setProperty(
|
58 |
-
'--header-sticky-height-animated',
|
59 |
-
`0px`
|
60 |
-
)
|
61 |
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
document.body.style.setProperty(
|
77 |
-
'--header-sticky-height-animated',
|
78 |
-
`0px`
|
79 |
-
)
|
80 |
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
setTimeout(() => {
|
88 |
-
stickyContainer.dataset.sticky = stickyComponents.join(':')
|
89 |
-
|
90 |
-
Array.from(
|
91 |
-
stickyContainer.querySelectorAll('[data-row]')
|
92 |
-
).map((row) => row.removeAttribute('style'))
|
93 |
-
setTransparencyFor(stickyContainer, 'yes')
|
94 |
-
}, 200)
|
95 |
-
})
|
96 |
-
}
|
97 |
}
|
|
|
98 |
|
99 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
100 |
}
|
1 |
import { setTransparencyFor } from '../sticky'
|
2 |
+
import {
|
3 |
+
maybeSetStickyHeightAnimated,
|
4 |
+
getRowStickyHeight,
|
5 |
+
computeLinearScale,
|
6 |
+
clamp,
|
7 |
+
} from './shrink-utils'
|
8 |
|
9 |
+
import { shrinkHandleLogo } from './shrink-handle-logo'
|
10 |
+
import { shrinkHandleMiddleRow } from './shrink-handle-middle-row'
|
11 |
|
12 |
+
let cache = null
|
13 |
+
|
14 |
+
const getData = ({ stickyContainer }) => {
|
15 |
+
if (cache) {
|
16 |
+
return cache
|
17 |
+
}
|
18 |
+
|
19 |
+
let stickyContainerHeight = [
|
20 |
+
...stickyContainer.querySelectorAll('[data-row]'),
|
21 |
+
].reduce((res, row) => res + getRowStickyHeight(row), 0)
|
22 |
+
|
23 |
+
cache = {
|
24 |
+
stickyContainerHeight,
|
25 |
+
}
|
26 |
+
|
27 |
+
return cache
|
28 |
+
}
|
29 |
+
|
30 |
+
let payload = {
|
31 |
+
up: {
|
32 |
+
anchor: null,
|
33 |
+
offset: 100,
|
34 |
+
},
|
35 |
+
down: {
|
36 |
+
anchor: null,
|
37 |
+
offset: 0,
|
38 |
+
},
|
39 |
+
}
|
40 |
+
|
41 |
+
export const computeAutoHide = (args) => {
|
42 |
+
let {
|
43 |
+
currentScrollY,
|
44 |
+
stickyContainer,
|
45 |
+
containerInitialHeight,
|
46 |
+
startPosition,
|
47 |
+
isSticky,
|
48 |
+
} = args
|
49 |
+
|
50 |
+
if (isSticky && currentScrollY - args.prevScrollY === 0) {
|
51 |
+
maybeSetStickyHeightAnimated(() => {
|
52 |
+
return '0px'
|
53 |
+
})
|
54 |
+
}
|
55 |
+
|
56 |
+
let direction = currentScrollY < args.prevScrollY ? 'up' : 'down'
|
57 |
+
|
58 |
+
if (direction === 'up') {
|
59 |
+
processUpDirection(args)
|
60 |
+
}
|
61 |
+
|
62 |
+
if (direction === 'down') {
|
63 |
+
processDownDirection(args)
|
64 |
+
}
|
65 |
+
|
66 |
+
if (isSticky) {
|
67 |
+
shrinkHandleLogo({ stickyContainer, startPosition })
|
68 |
+
shrinkHandleMiddleRow({
|
69 |
+
stickyContainer,
|
70 |
+
containerInitialHeight,
|
71 |
+
startPosition,
|
72 |
+
})
|
73 |
+
} else {
|
74 |
+
Array.from(stickyContainer.querySelectorAll('[data-row]')).map((row) =>
|
75 |
+
row.removeAttribute('style')
|
76 |
+
)
|
77 |
+
Array.from(
|
78 |
+
stickyContainer.querySelectorAll(
|
79 |
+
'[data-row*="middle"] .site-logo-container'
|
80 |
+
)
|
81 |
+
).map((el) => el.removeAttribute('style'))
|
82 |
+
}
|
83 |
+
|
84 |
+
renderPayload(args)
|
85 |
+
}
|
86 |
+
|
87 |
+
const processUpDirection = ({
|
88 |
+
containerInitialHeight,
|
89 |
stickyContainer,
|
|
|
90 |
stickyComponents,
|
91 |
+
isSticky,
|
92 |
+
prevScrollY,
|
93 |
+
currentScrollY,
|
94 |
}) => {
|
95 |
+
let { stickyContainerHeight } = getData({ stickyContainer })
|
|
|
|
|
96 |
|
97 |
+
if (isSticky && currentScrollY - prevScrollY === 0) {
|
98 |
+
maybeSetStickyHeightAnimated(() => {
|
99 |
+
return '0px'
|
100 |
+
})
|
|
|
101 |
}
|
102 |
|
103 |
+
if (
|
104 |
+
!payload.up.anchor &&
|
105 |
+
currentScrollY > containerInitialHeight * 2 &&
|
106 |
+
stickyContainer.dataset.sticky.indexOf('yes:') === -1
|
107 |
+
) {
|
108 |
+
payload.up.anchor = currentScrollY
|
109 |
+
stickyContainer.dataset.sticky = ['yes', ...stickyComponents].join(':')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
110 |
|
111 |
setTransparencyFor(stickyContainer, 'no')
|
112 |
document.body.removeAttribute('style')
|
113 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
114 |
|
115 |
+
if (
|
116 |
+
!payload.up.anchor &&
|
117 |
+
payload.down.anchor &&
|
118 |
+
payload.down.offset === stickyContainerHeight
|
119 |
+
) {
|
120 |
+
payload.up.anchor = currentScrollY
|
121 |
+
payload.down.anchor = null
|
122 |
+
}
|
123 |
+
|
124 |
+
if (!isSticky) {
|
125 |
+
payload.up.anchor = null
|
126 |
+
|
127 |
+
stickyContainer.dataset.sticky = [...stickyComponents].join(':')
|
|
|
|
|
|
|
|
|
|
|
128 |
|
129 |
+
setTransparencyFor(stickyContainer, 'yes')
|
130 |
+
|
131 |
+
maybeSetStickyHeightAnimated(() => {
|
132 |
+
return '0px'
|
133 |
+
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
134 |
}
|
135 |
+
}
|
136 |
|
137 |
+
const processDownDirection = ({ currentScrollY, stickyContainer }) => {
|
138 |
+
let { stickyContainerHeight } = getData({ stickyContainer })
|
139 |
+
|
140 |
+
if (!payload.down.anchor && payload.up.anchor && payload.up.offset === 0) {
|
141 |
+
payload.up.anchor = null
|
142 |
+
payload.down.anchor = currentScrollY
|
143 |
+
}
|
144 |
+
|
145 |
+
if (
|
146 |
+
!payload.down.anchor &&
|
147 |
+
payload.up.anchor &&
|
148 |
+
payload.up.offset === stickyContainerHeight
|
149 |
+
) {
|
150 |
+
payload.up.anchor = null
|
151 |
+
payload.down.anchor = currentScrollY - stickyContainerHeight
|
152 |
+
}
|
153 |
+
}
|
154 |
+
|
155 |
+
const renderPayload = ({ currentScrollY, stickyContainer }) => {
|
156 |
+
let offset = null
|
157 |
+
|
158 |
+
let { stickyContainerHeight } = getData({ stickyContainer })
|
159 |
+
|
160 |
+
if (payload.down.anchor) {
|
161 |
+
payload.down.offset = clamp(
|
162 |
+
0,
|
163 |
+
stickyContainerHeight,
|
164 |
+
currentScrollY - payload.down.anchor
|
165 |
+
)
|
166 |
+
|
167 |
+
offset = payload.down.offset
|
168 |
+
}
|
169 |
+
|
170 |
+
if (!payload.down.anchor && payload.up.anchor) {
|
171 |
+
payload.up.offset = clamp(
|
172 |
+
0,
|
173 |
+
stickyContainerHeight,
|
174 |
+
stickyContainerHeight - (payload.up.anchor - currentScrollY)
|
175 |
+
)
|
176 |
+
|
177 |
+
offset = payload.up.offset
|
178 |
+
}
|
179 |
+
|
180 |
+
if (offset !== null) {
|
181 |
+
stickyContainer.style.transform = `translate3d(0px, ${
|
182 |
+
Math.floor(offset) * -1
|
183 |
+
}px, 0px)`
|
184 |
+
|
185 |
+
maybeSetStickyHeightAnimated(() => {
|
186 |
+
return `${stickyContainerHeight - offset}px`
|
187 |
+
})
|
188 |
+
}
|
189 |
}
|
static/js/frontend/sticky/shrink-utils.js
CHANGED
@@ -74,3 +74,13 @@ export const getRowStickyHeight = (el) => {
|
|
74 |
|
75 |
return rowStickyHeight
|
76 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
|
75 |
return rowStickyHeight
|
76 |
}
|
77 |
+
|
78 |
+
export const maybeSetStickyHeightAnimated = (cb = () => 0) => {
|
79 |
+
const maybeFloatingCart = document.querySelector('.ct-floating-bar')
|
80 |
+
|
81 |
+
if (!maybeFloatingCart) {
|
82 |
+
return
|
83 |
+
}
|
84 |
+
|
85 |
+
maybeFloatingCart.style.setProperty('--header-sticky-height-animated', cb())
|
86 |
+
}
|
static/js/options/ConditionsManager.js
CHANGED
@@ -54,7 +54,8 @@ const ConditionsManager = ({ value, onChange, filter = 'all' }) => {
|
|
54 |
condition.rule === 'taxonomy_ids' ||
|
55 |
condition.rule === 'post_with_taxonomy_ids' ||
|
56 |
condition.rule === 'current_language' ||
|
57 |
-
condition.rule === 'user_post_author_id'
|
|
|
58 |
|
59 |
useEffect(() => {
|
60 |
fetch(
|
@@ -291,6 +292,49 @@ const ConditionsManager = ({ value, onChange, filter = 'all' }) => {
|
|
291 |
/>
|
292 |
)}
|
293 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
294 |
<button
|
295 |
type="button"
|
296 |
onClick={(e) => {
|
54 |
condition.rule === 'taxonomy_ids' ||
|
55 |
condition.rule === 'post_with_taxonomy_ids' ||
|
56 |
condition.rule === 'current_language' ||
|
57 |
+
condition.rule === 'user_post_author_id' ||
|
58 |
+
condition.rule === 'author'
|
59 |
|
60 |
useEffect(() => {
|
61 |
fetch(
|
292 |
/>
|
293 |
)}
|
294 |
|
295 |
+
{condition.rule === 'author' && (
|
296 |
+
<Select
|
297 |
+
option={{
|
298 |
+
appendToBody: true,
|
299 |
+
placeholder: __(
|
300 |
+
'Select user',
|
301 |
+
'blocksy-companion'
|
302 |
+
),
|
303 |
+
choices: [
|
304 |
+
{
|
305 |
+
key: 'all_users',
|
306 |
+
value: __(
|
307 |
+
'All authors',
|
308 |
+
'blocksy-companion'
|
309 |
+
),
|
310 |
+
},
|
311 |
+
|
312 |
+
...allUsers.map((user) => ({
|
313 |
+
key: user.id,
|
314 |
+
value: user.name,
|
315 |
+
})),
|
316 |
+
],
|
317 |
+
search: true,
|
318 |
+
}}
|
319 |
+
value={(condition.payload || {}).user_id || 'all_users'}
|
320 |
+
onChange={(user_id) => {
|
321 |
+
onChange(
|
322 |
+
value.map((r, i) => ({
|
323 |
+
...(i === index
|
324 |
+
? {
|
325 |
+
...condition,
|
326 |
+
payload: {
|
327 |
+
...condition.payload,
|
328 |
+
user_id,
|
329 |
+
},
|
330 |
+
}
|
331 |
+
: r),
|
332 |
+
}))
|
333 |
+
)
|
334 |
+
}}
|
335 |
+
/>
|
336 |
+
)}
|
337 |
+
|
338 |
<button
|
339 |
type="button"
|
340 |
onClick={(e) => {
|
static/js/screens/SiteExport.js
CHANGED
@@ -20,7 +20,7 @@ const SiteExport = () => {
|
|
20 |
|
21 |
const [name, setName] = useState('')
|
22 |
const [builder, setBuilder] = useState('')
|
23 |
-
const [plugins, setPlugins] = useState(
|
24 |
const [url, setUrl] = useState('')
|
25 |
const [isPro, setIsPro] = useState(false)
|
26 |
|
@@ -34,7 +34,7 @@ const SiteExport = () => {
|
|
34 |
body.append('is_pro', isPro)
|
35 |
body.append('url', url)
|
36 |
body.append('builder', builder)
|
37 |
-
body.append('plugins', plugins)
|
38 |
body.append('wp_customize', 'on')
|
39 |
|
40 |
try {
|
@@ -138,18 +138,16 @@ const SiteExport = () => {
|
|
138 |
tabindex="0"
|
139 |
onClick={(e) => {
|
140 |
e.preventDefault()
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
}
|
151 |
-
|
152 |
-
setPlugins(newPlugins.join(','))
|
153 |
}}>
|
154 |
<span>{getPluginsMap()[plugin]}</span>
|
155 |
|
20 |
|
21 |
const [name, setName] = useState('')
|
22 |
const [builder, setBuilder] = useState('')
|
23 |
+
const [plugins, setPlugins] = useState([])
|
24 |
const [url, setUrl] = useState('')
|
25 |
const [isPro, setIsPro] = useState(false)
|
26 |
|
34 |
body.append('is_pro', isPro)
|
35 |
body.append('url', url)
|
36 |
body.append('builder', builder)
|
37 |
+
body.append('plugins', plugins.join(','))
|
38 |
body.append('wp_customize', 'on')
|
39 |
|
40 |
try {
|
138 |
tabindex="0"
|
139 |
onClick={(e) => {
|
140 |
e.preventDefault()
|
141 |
+
|
142 |
+
setPlugins((plugins) => {
|
143 |
+
if (plugins.includes(plugin)) {
|
144 |
+
return plugins.filter(
|
145 |
+
(p) => p !== plugin
|
146 |
+
)
|
147 |
+
}
|
148 |
+
|
149 |
+
return [...plugins, plugin]
|
150 |
+
})
|
|
|
|
|
151 |
}}>
|
152 |
<span>{getPluginsMap()[plugin]}</span>
|
153 |
|
static/sass/account-lazy.scss
CHANGED
@@ -2,14 +2,15 @@
|
|
2 |
|
3 |
// account modal
|
4 |
#account-modal {
|
5 |
-
--horizontal-alignment: center;
|
6 |
-
--vertical-alignment: center;
|
7 |
|
8 |
background-color: rgba(18, 21, 25, 0.6);
|
9 |
}
|
10 |
|
11 |
.ct-account-form {
|
12 |
width: 100%;
|
|
|
13 |
color: var(--color);
|
14 |
background-color: #fff;
|
15 |
--linkInitialColor: var(--color);
|
2 |
|
3 |
// account modal
|
4 |
#account-modal {
|
5 |
+
// --horizontal-alignment: center;
|
6 |
+
// --vertical-alignment: center;
|
7 |
|
8 |
background-color: rgba(18, 21, 25, 0.6);
|
9 |
}
|
10 |
|
11 |
.ct-account-form {
|
12 |
width: 100%;
|
13 |
+
margin: auto;
|
14 |
color: var(--color);
|
15 |
background-color: #fff;
|
16 |
--linkInitialColor: var(--color);
|