Gutenberg Blocks – ACF Blocks Suite - Version 2.6.6

Version Description

  • Improved: Templates Library
  • Fixed: Bugs
Download this release

Release Info

Developer munirkamal
Plugin Icon 128x128 Gutenberg Blocks – ACF Blocks Suite
Version 2.6.6
Comparing to
See all releases

Code changes from version 2.6.5 to 2.6.6

Files changed (38) hide show
  1. acf-blocks.php +1 -1
  2. acf-json/index.php +2 -2
  3. acfblocks-templates/free/acfb-accordion.php +72 -72
  4. acfblocks-templates/free/acfb-business-hours.php +205 -205
  5. acfblocks-templates/free/acfb-clicktotweet.php +73 -73
  6. acfblocks-templates/free/acfb-counternumber.php +53 -53
  7. acfblocks-templates/free/acfb-divider.php +155 -155
  8. acfblocks-templates/free/acfb-facebook-page.php +45 -45
  9. acfblocks-templates/free/acfb-fb-like-button.php +27 -27
  10. acfblocks-templates/free/acfb-image-slider.php +104 -104
  11. acfblocks-templates/free/acfb-multibuttons.php +75 -75
  12. acfblocks-templates/free/acfb-photocollage.php +90 -90
  13. acfblocks-templates/free/acfb-posts.php +263 -263
  14. acfblocks-templates/free/acfb-pricelist.php +115 -115
  15. acfblocks-templates/free/acfb-pricingbox.php +151 -151
  16. acfblocks-templates/free/acfb-progressbar.php +61 -61
  17. acfblocks-templates/free/acfb-random-image.php +49 -49
  18. acfblocks-templates/free/acfb-scrollable-image.php +42 -42
  19. acfblocks-templates/free/acfb-socialsharing.php +113 -113
  20. acfblocks-templates/free/acfb-starrating.php +63 -63
  21. acfblocks-templates/free/acfb-tabs.php +79 -79
  22. acfblocks-templates/free/acfb-team.php +127 -127
  23. acfblocks-templates/free/acfb-toggle.php +56 -56
  24. admin/admin-script.js +34 -34
  25. admin/admin-styles.css +158 -158
  26. css/acfblocks.css +3258 -3258
  27. css/animated-headline.css +1207 -1207
  28. extendify-sdk/app/Admin.php +7 -2
  29. extendify-sdk/extendify-sdk.php +1 -0
  30. extendify-sdk/public/build/extendify-sdk.js +1 -1
  31. extendify-sdk/readme.txt +1 -1
  32. extendify-sdk/src/buttons.js +21 -13
  33. extendify-sdk/src/components/Beacon.js +75 -0
  34. extendify-sdk/src/components/SidebarSingle.js +1 -1
  35. extendify-sdk/src/layout/MainWindow.js +5 -14
  36. extendify-sdk/src/layout/Toolbar.js +1 -5
  37. free-acf-blocks.php +435 -435
  38. freemius/includes/class-freemius.php +0 -4834
acf-blocks.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: ACF Blocks Suite
5
  * Plugin URI: https://acfblocks.com/
6
  * Description: Supercharge your Gutenberg editor with high quality beautiful WordPress blocks. Ready-to-use ACF Blocks!
7
- * Version: 2.6.5
8
  * Author: munirkamal
9
  * Author URI: https://munirkamal.wordpress.com
10
  * License: GPL2
4
  * Plugin Name: ACF Blocks Suite
5
  * Plugin URI: https://acfblocks.com/
6
  * Description: Supercharge your Gutenberg editor with high quality beautiful WordPress blocks. Ready-to-use ACF Blocks!
7
+ * Version: 2.6.6
8
  * Author: munirkamal
9
  * Author URI: https://munirkamal.wordpress.com
10
  * License: GPL2
acf-json/index.php CHANGED
@@ -1,3 +1,3 @@
1
- <?php
2
- // Silence is golden.
3
  ?>
1
+ <?php
2
+ // Silence is golden.
3
  ?>
acfblocks-templates/free/acfb-accordion.php CHANGED
@@ -1,73 +1,73 @@
1
- <?php
2
- echo parse_link(
3
- array(
4
- get_field('acfb_accordion_title_typo'),
5
- get_field('acfb_accordion_content_content')
6
- )
7
- );
8
-
9
- $acfb_accordion_padding = acfb_padding_name('acfb_accordion_padding');
10
- $acfb_accordion_margin = acfb_margin_name('acfb_accordion_margin');
11
- $acfb_accordion_title_typo = acfb_ffaimly_name('acfb_accordion_title_typo');
12
- $acfb_accordion_content_content = acfb_ffaimly_name('acfb_accordion_content_content');
13
-
14
-
15
- $uid = $block['id'];
16
- $uid_accordion = str_replace("block","accordion",$uid);
17
-
18
- $className = 'acfb_accordion_block';
19
- if( !empty($block['className']) ) {
20
- $className .= ' ' . $block['className'];
21
- }
22
- if( !empty($block['align']) ) {
23
- $className .= ' align' . $block['align'];
24
- }
25
-
26
- ?>
27
-
28
- <div class="<?php echo $uid; ?> <?php echo esc_attr($className); ?>">
29
- <style>
30
- .<?php echo $uid; ?> {
31
- <?php echo get_padding_field($acfb_accordion_padding); ?>
32
- <?php echo get_margin_field($acfb_accordion_margin); ?>
33
- }
34
-
35
- .<?php echo $uid; ?> .acfb_accordion .acfb_accordion_title {
36
- background: <?php the_field('acfb_accordion_title_background'); ?>;
37
- color: <?php the_field('acfb_accordion_title_color'); ?>;
38
- <?php echo get_typo_field($acfb_accordion_title_typo); ?>
39
- text-align: <?php the_field('acfb_accordion_title_alignment'); ?>;
40
- }
41
-
42
- .<?php echo $uid; ?> .acfb_accordion .acfb_accordion_title:hover{
43
- background: <?php the_field('acfb_accordion_title_hover_background'); ?>;
44
- color: <?php the_field('acfb_accordion_title_hover_color'); ?>;
45
- }
46
-
47
- .<?php echo $uid; ?> .acfb_accordion .acfb_accordion_content {
48
- background: <?php the_field('acfb_accordion_content_background'); ?>;
49
- color: <?php the_field('acfb_accordion_content_color'); ?>;
50
- <?php echo get_typo_field($acfb_accordion_content_content); ?>
51
- }
52
- </style>
53
-
54
-
55
- <?php if( have_rows('acfb_add_accordion') ): ?>
56
-
57
- <div class="acfb_accordion">
58
-
59
- <?php while( have_rows('acfb_add_accordion') ): the_row(); ?>
60
- <a href="#<?php echo $uid_accordion; ?>-<?php echo get_row_index(); ?>" class="first acfb_accordion_title"> <?php the_sub_field('acfb_accordion_title'); ?></a>
61
- <div id="<?php echo $uid_accordion; ?>-<?php echo get_row_index(); ?>" class="acfb_accordion_content">
62
- <div class="acfb_accordion_content_inner">
63
- <?php the_sub_field('acfb_accordion_content'); ?>
64
- </div>
65
- </div>
66
- <?php endwhile; ?>
67
-
68
- </div>
69
-
70
- <?php endif; ?>
71
-
72
-
73
  </div><!-- Uid -->
1
+ <?php
2
+ echo parse_link(
3
+ array(
4
+ get_field('acfb_accordion_title_typo'),
5
+ get_field('acfb_accordion_content_content')
6
+ )
7
+ );
8
+
9
+ $acfb_accordion_padding = acfb_padding_name('acfb_accordion_padding');
10
+ $acfb_accordion_margin = acfb_margin_name('acfb_accordion_margin');
11
+ $acfb_accordion_title_typo = acfb_ffaimly_name('acfb_accordion_title_typo');
12
+ $acfb_accordion_content_content = acfb_ffaimly_name('acfb_accordion_content_content');
13
+
14
+
15
+ $uid = $block['id'];
16
+ $uid_accordion = str_replace("block","accordion",$uid);
17
+
18
+ $className = 'acfb_accordion_block';
19
+ if( !empty($block['className']) ) {
20
+ $className .= ' ' . $block['className'];
21
+ }
22
+ if( !empty($block['align']) ) {
23
+ $className .= ' align' . $block['align'];
24
+ }
25
+
26
+ ?>
27
+
28
+ <div class="<?php echo $uid; ?> <?php echo esc_attr($className); ?>">
29
+ <style>
30
+ .<?php echo $uid; ?> {
31
+ <?php echo get_padding_field($acfb_accordion_padding); ?>
32
+ <?php echo get_margin_field($acfb_accordion_margin); ?>
33
+ }
34
+
35
+ .<?php echo $uid; ?> .acfb_accordion .acfb_accordion_title {
36
+ background: <?php the_field('acfb_accordion_title_background'); ?>;
37
+ color: <?php the_field('acfb_accordion_title_color'); ?>;
38
+ <?php echo get_typo_field($acfb_accordion_title_typo); ?>
39
+ text-align: <?php the_field('acfb_accordion_title_alignment'); ?>;
40
+ }
41
+
42
+ .<?php echo $uid; ?> .acfb_accordion .acfb_accordion_title:hover{
43
+ background: <?php the_field('acfb_accordion_title_hover_background'); ?>;
44
+ color: <?php the_field('acfb_accordion_title_hover_color'); ?>;
45
+ }
46
+
47
+ .<?php echo $uid; ?> .acfb_accordion .acfb_accordion_content {
48
+ background: <?php the_field('acfb_accordion_content_background'); ?>;
49
+ color: <?php the_field('acfb_accordion_content_color'); ?>;
50
+ <?php echo get_typo_field($acfb_accordion_content_content); ?>
51
+ }
52
+ </style>
53
+
54
+
55
+ <?php if( have_rows('acfb_add_accordion') ): ?>
56
+
57
+ <div class="acfb_accordion">
58
+
59
+ <?php while( have_rows('acfb_add_accordion') ): the_row(); ?>
60
+ <a href="#<?php echo $uid_accordion; ?>-<?php echo get_row_index(); ?>" class="first acfb_accordion_title"> <?php the_sub_field('acfb_accordion_title'); ?></a>
61
+ <div id="<?php echo $uid_accordion; ?>-<?php echo get_row_index(); ?>" class="acfb_accordion_content">
62
+ <div class="acfb_accordion_content_inner">
63
+ <?php the_sub_field('acfb_accordion_content'); ?>
64
+ </div>
65
+ </div>
66
+ <?php endwhile; ?>
67
+
68
+ </div>
69
+
70
+ <?php endif; ?>
71
+
72
+
73
  </div><!-- Uid -->
acfblocks-templates/free/acfb-business-hours.php CHANGED
@@ -1,206 +1,206 @@
1
- <?php
2
- echo parse_link(
3
- array(
4
- get_field('acfb_bh_text_typo')
5
- )
6
- );
7
-
8
-
9
- $acfb_bh_inner_padding = acfb_padding_name('acfb_bh_inner_padding');
10
- $acfb_bh_padding = acfb_padding_name('acfb_bh_padding');
11
- $acfb_bh_margin = acfb_margin_name('acfb_bh_margin');
12
- $acfb_bh_text_typo = acfb_ffaimly_name('acfb_bh_text_typo');
13
-
14
-
15
- $uid = $block['id'];
16
-
17
- $className = 'acfb_business_hours';
18
- if( !empty($block['className']) ) {
19
- $className .= ' ' . $block['className'];
20
- }
21
- if( !empty($block['align']) ) {
22
- $className .= ' align' . $block['align'];
23
- }
24
-
25
- ?>
26
- <div class="<?php echo $uid; ?> <?php echo esc_attr($className); ?>">
27
- <style type="text/css">
28
- .<?php echo $uid; ?> {
29
- <?php echo get_padding_field($acfb_bh_padding); ?>
30
- <?php echo get_margin_field($acfb_bh_margin); ?>
31
- }
32
-
33
-
34
- .<?php echo $uid; ?> .acfb_bh_wrapper{
35
- background: <?php the_field('acfb_bh_background_color'); ?>;
36
- padding-top: <?php echo $acfb_bh_inner_padding['padding_top']; ?>px;
37
- padding-bottom: <?php echo $acfb_bh_inner_padding['padding_bottom']; ?>px;
38
- padding-left: <?php echo $acfb_bh_inner_padding['padding_left']; ?>px;
39
- padding-right: <?php echo $acfb_bh_inner_padding['padding_right']; ?>px;
40
- }
41
-
42
- .<?php echo $uid; ?> .acfb_bh_wrapper .acfb_bh_op_time .acfb_bh_day,
43
- .<?php echo $uid; ?> .acfb_bh_wrapper .acfb_bh_op_time .acfb_bh_time_wrapper .acfb_bh_open_time,
44
- .<?php echo $uid; ?> .acfb_bh_wrapper .acfb_bh_op_time .acfb_bh_time_wrapper .acfb_bh_seprator,
45
- .<?php echo $uid; ?> .acfb_bh_wrapper .acfb_bh_op_time .acfb_bh_time_wrapper .acfb_bh_close_time{
46
- color: <?php the_field('acfb_bh_oh_color'); ?>;
47
- }
48
-
49
-
50
- .<?php echo $uid; ?> .acfb_bh_wrapper .acfb_bh_cl_time .acfb_bh_day,
51
- .<?php echo $uid; ?> .acfb_bh_wrapper .acfb_bh_cl_time .acfb_bh_close_wrapper{
52
- color: <?php the_field('acfb_bh_ch_color'); ?>;
53
- }
54
-
55
-
56
- .<?php echo $uid; ?> .acfb_bh_wrapper .acfb_bh_item{
57
- border-bottom: 1px solid <?php the_field('acfb_bh_border_color'); ?>;
58
- <?php echo get_typo_field($acfb_bh_text_typo); ?>
59
- }
60
-
61
- </style>
62
-
63
- <?php
64
-
65
- $acfb_bh_mon_oc = '';
66
- if(get_field("acfb_bh_monday") == 'true'){
67
- $acfb_bh_mon_oc = "acfb_bh_op_time";
68
- } else{
69
- $acfb_bh_mon_oc = "acfb_bh_cl_time";
70
- }
71
-
72
- if(get_field("acfb_bh_tuesday") == 'true'){
73
- $acfb_bh_tue_oc = "acfb_bh_op_time";
74
- } else{
75
- $acfb_bh_tue_oc = "acfb_bh_cl_time";
76
- }
77
-
78
- if(get_field("acfb_bh_wednesday") == 'true'){
79
- $acfb_bh_wed_oc = "acfb_bh_op_time";
80
- } else{
81
- $acfb_bh_wed_oc = "acfb_bh_cl_time";
82
- }
83
-
84
- if(get_field("acfb_bh_thursday") == 'true'){
85
- $acfb_bh_thu_oc = "acfb_bh_op_time";
86
- } else{
87
- $acfb_bh_thu_oc = "acfb_bh_cl_time";
88
- }
89
-
90
- if(get_field("acfb_bh_friday") == 'true'){
91
- $acfb_bh_fri_oc = "acfb_bh_op_time";
92
- } else{
93
- $acfb_bh_fri_oc = "acfb_bh_cl_time";
94
- }
95
-
96
- if(get_field("acfb_bh_saturday") == 'true'){
97
- $acfb_bh_sat_oc = "acfb_bh_op_time";
98
- } else{
99
- $acfb_bh_sat_oc = "acfb_bh_cl_time";
100
- }
101
-
102
- if(get_field("acfb_bh_sunday") == 'true'){
103
- $acfb_bh_sun_oc = "acfb_bh_op_time";
104
- } else{
105
- $acfb_bh_sun_oc = "acfb_bh_cl_time";
106
- }
107
- ?>
108
-
109
- <div class="acfb_bh_wrapper">
110
- <ul>
111
-
112
- <li class="acfb_bh_item <?php echo $acfb_bh_mon_oc; ?>">
113
- <span class="acfb_bh_day">Monday</span>
114
- <?php if( get_field('acfb_bh_monday') == 'ture' ): ?>
115
- <span class="acfb_bh_time_wrapper">
116
- <span class="acfb_bh_open_time"><?php the_field('acfb_bh_monday_oh'); ?></span>
117
- <span class="acfb_bh_seprator"> - </span>
118
- <span class="acfb_bh_close_time"><?php the_field('acfb_bh_monday_ch'); ?></span>
119
- </span>
120
- <?php else: ?>
121
- <span class="acfb_bh_close_wrapper">Closed</span>
122
- <?php endif; ?>
123
- </li>
124
-
125
- <li class="acfb_bh_item <?php echo $acfb_bh_tue_oc; ?>">
126
- <span class="acfb_bh_day">Tuesday</span>
127
- <?php if( get_field('acfb_bh_tuesday') == 'ture' ): ?>
128
- <span class="acfb_bh_time_wrapper">
129
- <span class="acfb_bh_open_time"><?php the_field('acfb_bh_tuesday_oh'); ?></span>
130
- <span class="acfb_bh_seprator"> - </span>
131
- <span class="acfb_bh_close_time"><?php the_field('acfb_bh_tuesday_ch'); ?></span>
132
- </span>
133
- <?php else: ?>
134
- <span class="acfb_bh_close_wrapper">Closed</span>
135
- <?php endif; ?>
136
- </li>
137
-
138
- <li class="acfb_bh_item <?php echo $acfb_bh_wed_oc; ?>">
139
- <span class="acfb_bh_day">Wednesday</span>
140
- <?php if( get_field('acfb_bh_wednesday') == 'ture' ): ?>
141
- <span class="acfb_bh_time_wrapper">
142
- <span class="acfb_bh_open_time"><?php the_field('acfb_bh_wednesday_oh'); ?></span>
143
- <span class="acfb_bh_seprator"> - </span>
144
- <span class="acfb_bh_close_time"><?php the_field('acfb_bh_wednesday_ch'); ?></span>
145
- </span>
146
- <?php else: ?>
147
- <span class="acfb_bh_close_wrapper">Closed</span>
148
- <?php endif; ?>
149
- </li>
150
-
151
- <li class="acfb_bh_item <?php echo $acfb_bh_thu_oc; ?>">
152
- <span class="acfb_bh_day">Thursday</span>
153
- <?php if( get_field('acfb_bh_thursday') == 'ture' ): ?>
154
- <span class="acfb_bh_time_wrapper">
155
- <span class="acfb_bh_open_time"><?php the_field('acfb_bh_thursday_oh'); ?></span>
156
- <span class="acfb_bh_seprator"> - </span>
157
- <span class="acfb_bh_close_time"><?php the_field('acfb_bh_thursday_ch'); ?></span>
158
- </span>
159
- <?php else: ?>
160
- <span class="acfb_bh_close_wrapper">Closed</span>
161
- <?php endif; ?>
162
- </li>
163
-
164
- <li class="acfb_bh_item <?php echo $acfb_bh_fri_oc; ?>">
165
- <span class="acfb_bh_day">Friday</span>
166
- <?php if( get_field('acfb_bh_friday') == 'ture' ): ?>
167
- <span class="acfb_bh_time_wrapper">
168
- <span class="acfb_bh_open_time"><?php the_field('acfb_bh_friday_oh'); ?></span>
169
- <span class="acfb_bh_seprator"> - </span>
170
- <span class="acfb_bh_close_time"><?php the_field('acfb_bh_friday_ch'); ?></span>
171
- </span>
172
- <?php else: ?>
173
- <span class="acfb_bh_close_wrapper">Closed</span>
174
- <?php endif; ?>
175
- </li>
176
-
177
- <li class="acfb_bh_item <?php echo $acfb_bh_sat_oc; ?>">
178
- <span class="acfb_bh_day">Saturday</span>
179
- <?php if( get_field('acfb_bh_saturday') == 'ture' ): ?>
180
- <span class="acfb_bh_time_wrapper">
181
- <span class="acfb_bh_open_time"><?php the_field('acfb_bh_saturday_oh'); ?></span>
182
- <span class="acfb_bh_seprator"> - </span>
183
- <span class="acfb_bh_close_time"><?php the_field('acfb_bh_saturday_ch'); ?></span>
184
- </span>
185
- <?php else: ?>
186
- <span class="acfb_bh_close_wrapper">Closed</span>
187
- <?php endif; ?>
188
- </li>
189
-
190
- <li class="acfb_bh_item <?php echo $acfb_bh_sun_oc; ?>">
191
- <span class="acfb_bh_day">Sunday</span>
192
- <?php if( get_field('acfb_bh_sunday') == 'ture' ): ?>
193
- <span class="acfb_bh_time_wrapper">
194
- <span class="acfb_bh_open_time"><?php the_field('acfb_bh_sunday_oh'); ?></span>
195
- <span class="acfb_bh_seprator"> - </span>
196
- <span class="acfb_bh_close_time"><?php the_field('acfb_bh_sunday_ch'); ?></span>
197
- </span>
198
- <?php else: ?>
199
- <span class="acfb_bh_close_wrapper">Closed</span>
200
- <?php endif; ?>
201
- </li>
202
-
203
- </ul>
204
- </div>
205
-
206
  </div><!-- Uid -->
1
+ <?php
2
+ echo parse_link(
3
+ array(
4
+ get_field('acfb_bh_text_typo')
5
+ )
6
+ );
7
+
8
+
9
+ $acfb_bh_inner_padding = acfb_padding_name('acfb_bh_inner_padding');
10
+ $acfb_bh_padding = acfb_padding_name('acfb_bh_padding');
11
+ $acfb_bh_margin = acfb_margin_name('acfb_bh_margin');
12
+ $acfb_bh_text_typo = acfb_ffaimly_name('acfb_bh_text_typo');
13
+
14
+
15
+ $uid = $block['id'];
16
+
17
+ $className = 'acfb_business_hours';
18
+ if( !empty($block['className']) ) {
19
+ $className .= ' ' . $block['className'];
20
+ }
21
+ if( !empty($block['align']) ) {
22
+ $className .= ' align' . $block['align'];
23
+ }
24
+
25
+ ?>
26
+ <div class="<?php echo $uid; ?> <?php echo esc_attr($className); ?>">
27
+ <style type="text/css">
28
+ .<?php echo $uid; ?> {
29
+ <?php echo get_padding_field($acfb_bh_padding); ?>
30
+ <?php echo get_margin_field($acfb_bh_margin); ?>
31
+ }
32
+
33
+
34
+ .<?php echo $uid; ?> .acfb_bh_wrapper{
35
+ background: <?php the_field('acfb_bh_background_color'); ?>;
36
+ padding-top: <?php echo $acfb_bh_inner_padding['padding_top']; ?>px;
37
+ padding-bottom: <?php echo $acfb_bh_inner_padding['padding_bottom']; ?>px;
38
+ padding-left: <?php echo $acfb_bh_inner_padding['padding_left']; ?>px;
39
+ padding-right: <?php echo $acfb_bh_inner_padding['padding_right']; ?>px;
40
+ }
41
+
42
+ .<?php echo $uid; ?> .acfb_bh_wrapper .acfb_bh_op_time .acfb_bh_day,
43
+ .<?php echo $uid; ?> .acfb_bh_wrapper .acfb_bh_op_time .acfb_bh_time_wrapper .acfb_bh_open_time,
44
+ .<?php echo $uid; ?> .acfb_bh_wrapper .acfb_bh_op_time .acfb_bh_time_wrapper .acfb_bh_seprator,
45
+ .<?php echo $uid; ?> .acfb_bh_wrapper .acfb_bh_op_time .acfb_bh_time_wrapper .acfb_bh_close_time{
46
+ color: <?php the_field('acfb_bh_oh_color'); ?>;
47
+ }
48
+
49
+
50
+ .<?php echo $uid; ?> .acfb_bh_wrapper .acfb_bh_cl_time .acfb_bh_day,
51
+ .<?php echo $uid; ?> .acfb_bh_wrapper .acfb_bh_cl_time .acfb_bh_close_wrapper{
52
+ color: <?php the_field('acfb_bh_ch_color'); ?>;
53
+ }
54
+
55
+
56
+ .<?php echo $uid; ?> .acfb_bh_wrapper .acfb_bh_item{
57
+ border-bottom: 1px solid <?php the_field('acfb_bh_border_color'); ?>;
58
+ <?php echo get_typo_field($acfb_bh_text_typo); ?>
59
+ }
60
+
61
+ </style>
62
+
63
+ <?php
64
+
65
+ $acfb_bh_mon_oc = '';
66
+ if(get_field("acfb_bh_monday") == 'true'){
67
+ $acfb_bh_mon_oc = "acfb_bh_op_time";
68
+ } else{
69
+ $acfb_bh_mon_oc = "acfb_bh_cl_time";
70
+ }
71
+
72
+ if(get_field("acfb_bh_tuesday") == 'true'){
73
+ $acfb_bh_tue_oc = "acfb_bh_op_time";
74
+ } else{
75
+ $acfb_bh_tue_oc = "acfb_bh_cl_time";
76
+ }
77
+
78
+ if(get_field("acfb_bh_wednesday") == 'true'){
79
+ $acfb_bh_wed_oc = "acfb_bh_op_time";
80
+ } else{
81
+ $acfb_bh_wed_oc = "acfb_bh_cl_time";
82
+ }
83
+
84
+ if(get_field("acfb_bh_thursday") == 'true'){
85
+ $acfb_bh_thu_oc = "acfb_bh_op_time";
86
+ } else{
87
+ $acfb_bh_thu_oc = "acfb_bh_cl_time";
88
+ }
89
+
90
+ if(get_field("acfb_bh_friday") == 'true'){
91
+ $acfb_bh_fri_oc = "acfb_bh_op_time";
92
+ } else{
93
+ $acfb_bh_fri_oc = "acfb_bh_cl_time";
94
+ }
95
+
96
+ if(get_field("acfb_bh_saturday") == 'true'){
97
+ $acfb_bh_sat_oc = "acfb_bh_op_time";
98
+ } else{
99
+ $acfb_bh_sat_oc = "acfb_bh_cl_time";
100
+ }
101
+
102
+ if(get_field("acfb_bh_sunday") == 'true'){
103
+ $acfb_bh_sun_oc = "acfb_bh_op_time";
104
+ } else{
105
+ $acfb_bh_sun_oc = "acfb_bh_cl_time";
106
+ }
107
+ ?>
108
+
109
+ <div class="acfb_bh_wrapper">
110
+ <ul>
111
+
112
+ <li class="acfb_bh_item <?php echo $acfb_bh_mon_oc; ?>">
113
+ <span class="acfb_bh_day">Monday</span>
114
+ <?php if( get_field('acfb_bh_monday') == 'ture' ): ?>
115
+ <span class="acfb_bh_time_wrapper">
116
+ <span class="acfb_bh_open_time"><?php the_field('acfb_bh_monday_oh'); ?></span>
117
+ <span class="acfb_bh_seprator"> - </span>
118
+ <span class="acfb_bh_close_time"><?php the_field('acfb_bh_monday_ch'); ?></span>
119
+ </span>
120
+ <?php else: ?>
121
+ <span class="acfb_bh_close_wrapper">Closed</span>
122
+ <?php endif; ?>
123
+ </li>
124
+
125
+ <li class="acfb_bh_item <?php echo $acfb_bh_tue_oc; ?>">
126
+ <span class="acfb_bh_day">Tuesday</span>
127
+ <?php if( get_field('acfb_bh_tuesday') == 'ture' ): ?>
128
+ <span class="acfb_bh_time_wrapper">
129
+ <span class="acfb_bh_open_time"><?php the_field('acfb_bh_tuesday_oh'); ?></span>
130
+ <span class="acfb_bh_seprator"> - </span>
131
+ <span class="acfb_bh_close_time"><?php the_field('acfb_bh_tuesday_ch'); ?></span>
132
+ </span>
133
+ <?php else: ?>
134
+ <span class="acfb_bh_close_wrapper">Closed</span>
135
+ <?php endif; ?>
136
+ </li>
137
+
138
+ <li class="acfb_bh_item <?php echo $acfb_bh_wed_oc; ?>">
139
+ <span class="acfb_bh_day">Wednesday</span>
140
+ <?php if( get_field('acfb_bh_wednesday') == 'ture' ): ?>
141
+ <span class="acfb_bh_time_wrapper">
142
+ <span class="acfb_bh_open_time"><?php the_field('acfb_bh_wednesday_oh'); ?></span>
143
+ <span class="acfb_bh_seprator"> - </span>
144
+ <span class="acfb_bh_close_time"><?php the_field('acfb_bh_wednesday_ch'); ?></span>
145
+ </span>
146
+ <?php else: ?>
147
+ <span class="acfb_bh_close_wrapper">Closed</span>
148
+ <?php endif; ?>
149
+ </li>
150
+
151
+ <li class="acfb_bh_item <?php echo $acfb_bh_thu_oc; ?>">
152
+ <span class="acfb_bh_day">Thursday</span>
153
+ <?php if( get_field('acfb_bh_thursday') == 'ture' ): ?>
154
+ <span class="acfb_bh_time_wrapper">
155
+ <span class="acfb_bh_open_time"><?php the_field('acfb_bh_thursday_oh'); ?></span>
156
+ <span class="acfb_bh_seprator"> - </span>
157
+ <span class="acfb_bh_close_time"><?php the_field('acfb_bh_thursday_ch'); ?></span>
158
+ </span>
159
+ <?php else: ?>
160
+ <span class="acfb_bh_close_wrapper">Closed</span>
161
+ <?php endif; ?>
162
+ </li>
163
+
164
+ <li class="acfb_bh_item <?php echo $acfb_bh_fri_oc; ?>">
165
+ <span class="acfb_bh_day">Friday</span>
166
+ <?php if( get_field('acfb_bh_friday') == 'ture' ): ?>
167
+ <span class="acfb_bh_time_wrapper">
168
+ <span class="acfb_bh_open_time"><?php the_field('acfb_bh_friday_oh'); ?></span>
169
+ <span class="acfb_bh_seprator"> - </span>
170
+ <span class="acfb_bh_close_time"><?php the_field('acfb_bh_friday_ch'); ?></span>
171
+ </span>
172
+ <?php else: ?>
173
+ <span class="acfb_bh_close_wrapper">Closed</span>
174
+ <?php endif; ?>
175
+ </li>
176
+
177
+ <li class="acfb_bh_item <?php echo $acfb_bh_sat_oc; ?>">
178
+ <span class="acfb_bh_day">Saturday</span>
179
+ <?php if( get_field('acfb_bh_saturday') == 'ture' ): ?>
180
+ <span class="acfb_bh_time_wrapper">
181
+ <span class="acfb_bh_open_time"><?php the_field('acfb_bh_saturday_oh'); ?></span>
182
+ <span class="acfb_bh_seprator"> - </span>
183
+ <span class="acfb_bh_close_time"><?php the_field('acfb_bh_saturday_ch'); ?></span>
184
+ </span>
185
+ <?php else: ?>
186
+ <span class="acfb_bh_close_wrapper">Closed</span>
187
+ <?php endif; ?>
188
+ </li>
189
+
190
+ <li class="acfb_bh_item <?php echo $acfb_bh_sun_oc; ?>">
191
+ <span class="acfb_bh_day">Sunday</span>
192
+ <?php if( get_field('acfb_bh_sunday') == 'ture' ): ?>
193
+ <span class="acfb_bh_time_wrapper">
194
+ <span class="acfb_bh_open_time"><?php the_field('acfb_bh_sunday_oh'); ?></span>
195
+ <span class="acfb_bh_seprator"> - </span>
196
+ <span class="acfb_bh_close_time"><?php the_field('acfb_bh_sunday_ch'); ?></span>
197
+ </span>
198
+ <?php else: ?>
199
+ <span class="acfb_bh_close_wrapper">Closed</span>
200
+ <?php endif; ?>
201
+ </li>
202
+
203
+ </ul>
204
+ </div>
205
+
206
  </div><!-- Uid -->
acfblocks-templates/free/acfb-clicktotweet.php CHANGED
@@ -1,74 +1,74 @@
1
- <?php
2
- echo parse_link(
3
- array(
4
- get_field('acfb_click_to_tweet_text_typo'),
5
- get_field('acfb_click_to_tweet_button_typo')
6
- )
7
- );
8
-
9
-
10
- $acfb_click_to_inner_padding = acfb_padding_name('acfb_click_to_inner_padding');
11
- $acfb_click_to_tweet_padding = acfb_padding_name('acfb_click_to_tweet_padding');
12
- $acfb_click_to_tweet_margin = acfb_margin_name('acfb_click_to_tweet_margin');
13
- $acfb_click_to_tweet_text_typo = acfb_ffaimly_name('acfb_click_to_tweet_text_typo');
14
- $acfb_click_to_tweet_button_typo = acfb_ffaimly_name('acfb_click_to_tweet_button_typo');
15
-
16
- $uid = $block['id'];
17
-
18
- $className = 'acfb_click_to_tweet_block';
19
- if( !empty($block['className']) ) {
20
- $className .= ' ' . $block['className'];
21
- }
22
- if( !empty($block['align']) ) {
23
- $className .= ' align' . $block['align'];
24
- }
25
-
26
- ?>
27
- <div class="<?php echo $uid; ?> <?php echo esc_attr($className); ?>">
28
- <style type="text/css">
29
- .<?php echo $uid; ?> {
30
- <?php echo get_padding_field($acfb_click_to_tweet_padding); ?>
31
- <?php echo get_margin_field($acfb_click_to_tweet_margin); ?>
32
- }
33
-
34
- .<?php echo $uid; ?> .acfb_click_to_tweet {
35
- background-color: <?php the_field('acfb_click_to_tweet_bg_color'); ?>;
36
- padding-top: <?php echo $acfb_click_to_inner_padding['padding_top']; ?>px;
37
- padding-bottom: <?php echo $acfb_click_to_inner_padding['padding_bottom']; ?>px;
38
- padding-left: <?php echo $acfb_click_to_inner_padding['padding_left']; ?>px;
39
- padding-right: <?php echo $acfb_click_to_inner_padding['padding_right']; ?>px;
40
- }
41
-
42
- .<?php echo $uid; ?> .acfb_click_to_tweet a {
43
- color: <?php the_field('acfb_click_to_tweet_text_color'); ?> !important;
44
- <?php echo get_typo_field($acfb_click_to_tweet_text_typo); ?>
45
- }
46
-
47
- .<?php echo $uid; ?> .acfb_click_to_tweet a:hover, .<?php echo $uid; ?> .acfb_click_to_tweet:hover a:after{
48
- color: <?php the_field('acfb_click_to_tweet_button_hover_color'); ?>;
49
- }
50
-
51
- .<?php echo $uid; ?> .acfb_click_to_tweet a:after {
52
- content: '<?php the_field('acfb_click_to_tweet_button_text'); ?>';
53
- color: <?php the_field('acfb_click_to_tweet_button_color'); ?>;
54
- <?php echo get_typo_field($acfb_click_to_tweet_button_typo); ?>
55
- }
56
-
57
- </style>
58
-
59
- <?php
60
- $acfb_by_line = '';
61
- if(get_field('acfb_click_to_tweet_handler')){
62
- $acfb_by_line = 'by: @' . get_field('acfb_click_to_tweet_handler');
63
- }
64
- ?>
65
-
66
-
67
- <div class="acfb_click_to_tweet">
68
- <a onclick="window.open(&quot;https://twitter.com/share?url=&quot; +
69
- document.querySelector(&quot;link[rel='canonical']&quot;).href + &quot;&amp;text=&quot; + encodeURIComponent(this.innerText) + &quot; - <?php echo $acfb_by_line; ?> &quot;, &quot;sharer&quot;, &quot;; toolbar=0, status=0, width=626, height=436&quot;); return false;" rel="nofollow" title="Share to Twitter">
70
- <?php the_field('acfb_click_to_tweet_content'); ?>
71
- </a>
72
- </div>
73
-
74
  </div><!-- Uid -->
1
+ <?php
2
+ echo parse_link(
3
+ array(
4
+ get_field('acfb_click_to_tweet_text_typo'),
5
+ get_field('acfb_click_to_tweet_button_typo')
6
+ )
7
+ );
8
+
9
+
10
+ $acfb_click_to_inner_padding = acfb_padding_name('acfb_click_to_inner_padding');
11
+ $acfb_click_to_tweet_padding = acfb_padding_name('acfb_click_to_tweet_padding');
12
+ $acfb_click_to_tweet_margin = acfb_margin_name('acfb_click_to_tweet_margin');
13
+ $acfb_click_to_tweet_text_typo = acfb_ffaimly_name('acfb_click_to_tweet_text_typo');
14
+ $acfb_click_to_tweet_button_typo = acfb_ffaimly_name('acfb_click_to_tweet_button_typo');
15
+
16
+ $uid = $block['id'];
17
+
18
+ $className = 'acfb_click_to_tweet_block';
19
+ if( !empty($block['className']) ) {
20
+ $className .= ' ' . $block['className'];
21
+ }
22
+ if( !empty($block['align']) ) {
23
+ $className .= ' align' . $block['align'];
24
+ }
25
+
26
+ ?>
27
+ <div class="<?php echo $uid; ?> <?php echo esc_attr($className); ?>">
28
+ <style type="text/css">
29
+ .<?php echo $uid; ?> {
30
+ <?php echo get_padding_field($acfb_click_to_tweet_padding); ?>
31
+ <?php echo get_margin_field($acfb_click_to_tweet_margin); ?>
32
+ }
33
+
34
+ .<?php echo $uid; ?> .acfb_click_to_tweet {
35
+ background-color: <?php the_field('acfb_click_to_tweet_bg_color'); ?>;
36
+ padding-top: <?php echo $acfb_click_to_inner_padding['padding_top']; ?>px;
37
+ padding-bottom: <?php echo $acfb_click_to_inner_padding['padding_bottom']; ?>px;
38
+ padding-left: <?php echo $acfb_click_to_inner_padding['padding_left']; ?>px;
39
+ padding-right: <?php echo $acfb_click_to_inner_padding['padding_right']; ?>px;
40
+ }
41
+
42
+ .<?php echo $uid; ?> .acfb_click_to_tweet a {
43
+ color: <?php the_field('acfb_click_to_tweet_text_color'); ?> !important;
44
+ <?php echo get_typo_field($acfb_click_to_tweet_text_typo); ?>
45
+ }
46
+
47
+ .<?php echo $uid; ?> .acfb_click_to_tweet a:hover, .<?php echo $uid; ?> .acfb_click_to_tweet:hover a:after{
48
+ color: <?php the_field('acfb_click_to_tweet_button_hover_color'); ?>;
49
+ }
50
+
51
+ .<?php echo $uid; ?> .acfb_click_to_tweet a:after {
52
+ content: '<?php the_field('acfb_click_to_tweet_button_text'); ?>';
53
+ color: <?php the_field('acfb_click_to_tweet_button_color'); ?>;
54
+ <?php echo get_typo_field($acfb_click_to_tweet_button_typo); ?>
55
+ }
56
+
57
+ </style>
58
+
59
+ <?php
60
+ $acfb_by_line = '';
61
+ if(get_field('acfb_click_to_tweet_handler')){
62
+ $acfb_by_line = 'by: @' . get_field('acfb_click_to_tweet_handler');
63
+ }
64
+ ?>
65
+
66
+
67
+ <div class="acfb_click_to_tweet">
68
+ <a onclick="window.open(&quot;https://twitter.com/share?url=&quot; +
69
+ document.querySelector(&quot;link[rel='canonical']&quot;).href + &quot;&amp;text=&quot; + encodeURIComponent(this.innerText) + &quot; - <?php echo $acfb_by_line; ?> &quot;, &quot;sharer&quot;, &quot;; toolbar=0, status=0, width=626, height=436&quot;); return false;" rel="nofollow" title="Share to Twitter">
70
+ <?php the_field('acfb_click_to_tweet_content'); ?>
71
+ </a>
72
+ </div>
73
+
74
  </div><!-- Uid -->
acfblocks-templates/free/acfb-counternumber.php CHANGED
@@ -1,54 +1,54 @@
1
- <?php
2
- echo parse_link(
3
- array(
4
- get_field('acfb_counter_number_typo'),
5
- get_field('acfb_counter_title_typo')
6
- )
7
- );
8
-
9
-
10
- $acfb_counter_number_padding = acfb_padding_name('acfb_counter_number_padding');
11
- $acfb_counter_number_margin = acfb_margin_name('acfb_counter_number_margin');
12
- $acfb_counter_number_typo = acfb_ffaimly_name('acfb_counter_number_typo');
13
- $acfb_counter_title_typo = acfb_ffaimly_name('acfb_counter_title_typo');
14
-
15
-
16
- $uid = $block['id'];
17
-
18
- $className = 'acfb_counter_number_block';
19
- if( !empty($block['className']) ) {
20
- $className .= ' ' . $block['className'];
21
- }
22
- if( !empty($block['align']) ) {
23
- $className .= ' align' . $block['align'];
24
- }
25
-
26
- ?>
27
- <div class="<?php echo $uid; ?> <?php echo esc_attr($className); ?>">
28
- <style type="text/css">
29
- .<?php echo $uid; ?> {
30
- <?php echo get_padding_field($acfb_counter_number_padding); ?>
31
- <?php echo get_margin_field($acfb_counter_number_margin); ?>
32
- }
33
-
34
- .<?php echo $uid; ?> .acfb_counter_number_wrapper{
35
- color: <?php the_field('acfb_counter_number_color'); ?>;
36
- <?php echo get_typo_field($acfb_counter_number_typo); ?>
37
- }
38
-
39
- .<?php echo $uid; ?> .acfb_counter .acfb_counter_title{
40
- color: <?php the_field('acfb_counter_number_title_color'); ?>;
41
- <?php echo get_typo_field($acfb_counter_title_typo); ?>
42
- }
43
- </style>
44
-
45
- <div class="acfb_counter">
46
- <div class="acfb_counter_number_wrapper">
47
- <span class="acfb_counter_number_prefix"><?php the_field('acfb_counter_number_prefix'); ?></span>
48
- <span class="acfb_counter_number"><?php the_field('acfb_counter_number'); ?></span>
49
- <span class="acfb_counter_number_suffix"><?php the_field('acfb_counter_number_suffix'); ?></span>
50
- </div>
51
- <div class="acfb_counter_title"><?php the_field('acfb_counter_number_title'); ?></div>
52
- </div>
53
-
54
  </div><!-- Uid -->
1
+ <?php
2
+ echo parse_link(
3
+ array(
4
+ get_field('acfb_counter_number_typo'),
5
+ get_field('acfb_counter_title_typo')
6
+ )
7
+ );
8
+
9
+
10
+ $acfb_counter_number_padding = acfb_padding_name('acfb_counter_number_padding');
11
+ $acfb_counter_number_margin = acfb_margin_name('acfb_counter_number_margin');
12
+ $acfb_counter_number_typo = acfb_ffaimly_name('acfb_counter_number_typo');
13
+ $acfb_counter_title_typo = acfb_ffaimly_name('acfb_counter_title_typo');
14
+
15
+
16
+ $uid = $block['id'];
17
+
18
+ $className = 'acfb_counter_number_block';
19
+ if( !empty($block['className']) ) {
20
+ $className .= ' ' . $block['className'];
21
+ }
22
+ if( !empty($block['align']) ) {
23
+ $className .= ' align' . $block['align'];
24
+ }
25
+
26
+ ?>
27
+ <div class="<?php echo $uid; ?> <?php echo esc_attr($className); ?>">
28
+ <style type="text/css">
29
+ .<?php echo $uid; ?> {
30
+ <?php echo get_padding_field($acfb_counter_number_padding); ?>
31
+ <?php echo get_margin_field($acfb_counter_number_margin); ?>
32
+ }
33
+
34
+ .<?php echo $uid; ?> .acfb_counter_number_wrapper{
35
+ color: <?php the_field('acfb_counter_number_color'); ?>;
36
+ <?php echo get_typo_field($acfb_counter_number_typo); ?>
37
+ }
38
+
39
+ .<?php echo $uid; ?> .acfb_counter .acfb_counter_title{
40
+ color: <?php the_field('acfb_counter_number_title_color'); ?>;
41
+ <?php echo get_typo_field($acfb_counter_title_typo); ?>
42
+ }
43
+ </style>
44
+
45
+ <div class="acfb_counter">
46
+ <div class="acfb_counter_number_wrapper">
47
+ <span class="acfb_counter_number_prefix"><?php the_field('acfb_counter_number_prefix'); ?></span>
48
+ <span class="acfb_counter_number"><?php the_field('acfb_counter_number'); ?></span>
49
+ <span class="acfb_counter_number_suffix"><?php the_field('acfb_counter_number_suffix'); ?></span>
50
+ </div>
51
+ <div class="acfb_counter_title"><?php the_field('acfb_counter_number_title'); ?></div>
52
+ </div>
53
+
54
  </div><!-- Uid -->
acfblocks-templates/free/acfb-divider.php CHANGED
@@ -1,156 +1,156 @@
1
- <?php
2
- $uid = $block['id'];
3
-
4
- $className = 'acfb_divider_block';
5
- if( !empty($block['className']) ) {
6
- $className .= ' ' . $block['className'];
7
- }
8
- if( !empty($block['align']) ) {
9
- $className .= ' align' . $block['align'];
10
- }
11
-
12
- echo parse_link(
13
- array(
14
- get_field('acfb_divider_text_typo')
15
- )
16
- );
17
-
18
- $acfb_divider_padding = acfb_padding_name('acfb_divider_padding');
19
- $acfb_divider_margin = acfb_margin_name('acfb_divider_margin');
20
- $acfb_divider_text_typo = acfb_ffaimly_name('acfb_divider_text_typo');
21
-
22
-
23
-
24
-
25
- $acfb_divider_color = get_field('acfb_divider_color');
26
- $acfb_dc = str_replace('#' , "" , get_field('acfb_divider_color'));
27
-
28
- $acfb_divider_fancy_styles = get_field('acfb_divider_fancy_styles');
29
- $acfb_fancy_divider = '';
30
- if($acfb_divider_fancy_styles === 'curly'){
31
- $acfb_fancy_divider = "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none' overflow='visible' height='100%25' viewBox='0 0 24 24' stroke='%23$acfb_dc' stroke-width='1' fill='none' stroke-linecap='square' stroke-miterlimit='10'%3E%3Cpath d='M0,21c3.3,0,8.3-0.9,15.7-7.1c6.6-5.4,4.4-9.3,2.4-10.3c-3.4-1.8-7.7,1.3-7.3,8.8C11.2,20,17.1,21,24,21'/%3E%3C/svg%3E";
32
- } elseif($acfb_divider_fancy_styles === 'curved'){
33
- $acfb_fancy_divider = "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none' overflow='visible' height='100%25' viewBox='0 0 24 24' stroke='%23$acfb_dc' stroke-width='1' fill='none' stroke-linecap='square' stroke-miterlimit='10'%3E%3Cpath d='M0,6c6,0,6,13,12,13S18,6,24,6'/%3E%3C/svg%3E";
34
-
35
- } elseif($acfb_divider_fancy_styles === 'slashes'){
36
- $acfb_fancy_divider = "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none' overflow='visible' height='100%25' viewBox='0 0 20 16' stroke='%23$acfb_dc' stroke-width='1' fill='none' stroke-linecap='square' stroke-miterlimit='10'%3E%3Cg transform='translate(-12.000000, 0)'%3E%3Cpath d='M28,0L10,18'/%3E%3Cpath d='M18,0L0,18'/%3E%3Cpath d='M48,0L30,18'/%3E%3Cpath d='M38,0L20,18'/%3E%3C/g%3E%3C/svg%3E";
37
- } elseif($acfb_divider_fancy_styles === 'squared'){
38
- $acfb_fancy_divider = "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none' overflow='visible' height='100%25' viewBox='0 0 24 24' stroke='%23$acfb_dc' stroke-width='1' fill='none' stroke-linecap='square' stroke-miterlimit='10'%3E%3Cpolyline points='0,6 6,6 6,18 18,18 18,6 24,6 '/%3E%3C/svg%3E";
39
- } elseif($acfb_divider_fancy_styles === 'wavy'){
40
- $acfb_fancy_divider = "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none' overflow='visible' height='100%25' viewBox='0 0 24 24' stroke='%23$acfb_dc' stroke-width='1' fill='none' stroke-linecap='square' stroke-miterlimit='10'%3E%3Cpath d='M0,6c6,0,0.9,11.1,6.9,11.1S18,6,24,6'/%3E%3C/svg%3E";
41
- } elseif($acfb_divider_fancy_styles === 'tree'){
42
- $acfb_fancy_divider = "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='xMidYMid meet' overflow='visible' height='100%25' viewBox='0 0 126 26' fill='%23$acfb_dc' stroke='none'%3E%3Cpath d='M111.9,18.3v3.4H109v-3.4H111.9z M90.8,18.3v3.4H88v-3.4H90.8z M69.8,18.3v3.4h-2.9v-3.4H69.8z M48.8,18.3v3.4h-2.9v-3.4H48.8z M27.7,18.3v3.4h-2.9v-3.4H27.7z M6.7,18.3v3.4H3.8v-3.4H6.7z M46.4,4l4.3,4.8l-1.8,0l3.5,4.4l-2.2-0.1l3,3.3l-11,0.4l3.6-3.8l-2.9-0.1l3.1-4.2l-1.9,0L46.4,4z M111.4,4l2.4,4.8l-1.8,0l3.5,4.4l-2.5-0.1l3.3,3.3h-11l3.1-3.4l-2.5-0.1l3.1-4.2l-1.9,0L111.4,4z M89.9,4l2.9,4.8l-1.9,0l3.2,4.2l-2.5,0l3.5,3.5l-11-0.4l3-3.1l-2.4,0L88,8.8l-1.9,0L89.9,4z M68.6,4l3,4.4l-1.9,0.1l3.4,4.1l-2.7,0.1l3.8,3.7H63.8l2.9-3.6l-2.9,0.1L67,8.7l-2,0.1L68.6,4z M26.5,4l3,4.4l-1.9,0.1l3.7,4.7l-2.5-0.1l3.3,3.3H21l3.1-3.4l-2.5-0.1l3.2-4.3l-2,0.1L26.5,4z M4.9,4l3.7,4.8l-1.5,0l3.1,4.2L7.6,13l3.4,3.4H0l3-3.3l-2.3,0.1l3.5-4.4l-2.3,0L4.9,4z'/%3E%3C/svg%3E";
43
- } elseif($acfb_divider_fancy_styles === 'zigzag'){
44
- $acfb_fancy_divider = "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none' overflow='visible' height='100%25' viewBox='0 0 24 24' stroke='%23$acfb_dc' stroke-width='1' fill='none' stroke-linecap='square' stroke-miterlimit='10'%3E%3Cpolyline points='0,18 12,6 24,18 '/%3E%3C/svg%3E";
45
- } elseif($acfb_divider_fancy_styles === 'rhombus'){
46
- $acfb_fancy_divider = "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none' overflow='visible' height='100%25' viewBox='0 0 24 24' fill='%23$acfb_dc' stroke='none'%3E%3Cpath d='M12.7,2.3c-0.4-0.4-1.1-0.4-1.5,0l-8,9.1c-0.3,0.4-0.3,0.9,0,1.2l8,9.1c0.4,0.4,1.1,0.4,1.5,0l8-9.1c0.3-0.4,0.3-0.9,0-1.2L12.7,2.3z'/%3E%3C/svg%3E";
47
- } elseif($acfb_divider_fancy_styles === 'parallelogram'){
48
- $acfb_fancy_divider = "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none' overflow='visible' height='100%25' viewBox='0 0 24 24' fill='%23$acfb_dc' stroke='none'%3E%3Cpolygon points='9.4,2 24,2 14.6,21.6 0,21.6'/%3E%3C/svg%3E";
49
- } elseif($acfb_divider_fancy_styles === 'x'){
50
- $acfb_fancy_divider = "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='xMidYMid meet' overflow='visible' height='100%25' viewBox='0 0 126 26' fill='%23$acfb_dc' stroke='none'%3E%3Cpath d='M10.7,6l2.5,2.6l-4,4.3l4,5.4l-2.5,1.9l-4.5-5.2l-3.9,4.2L0.7,17L4,13.1L0,8.6l2.3-1.3l3.9,3.9L10.7,6z M23.9,6.6l4.2,4.5L32,7.2l2.3,1.3l-4,4.5l3.2,3.9L32,19.1l-3.9-3.3l-4.5,4.3l-2.5-1.9l4.4-5.1l-4.2-3.9L23.9,6.6zM73.5,6L76,8.6l-4,4.3l4,5.4l-2.5,1.9l-4.5-5.2l-3.9,4.2L63.5,17l4.1-4.7L63.5,8l2.3-1.3l4.1,3.6L73.5,6z M94,6l2.5,2.6l-4,4.3l4,5.4L94,20.1l-3.9-5l-3.9,4.2L84,17l3.2-3.9L84,8.6l2.3-1.3l3.2,3.9L94,6z M106.9,6l4.5,5.1l3.9-3.9l2.3,1.3l-4,4.5l3.2,3.9l-1.6,2.1l-3.9-4.2l-4.5,5.2l-2.5-1.9l4-5.4l-4-4.3L106.9,6z M53.1,6l2.5,2.6l-4,4.3l4,4.6l-2.5,1.9l-4.5-4.5l-3.5,4.5L43.1,17l3.2-3.9l-4-4.5l2.3-1.3l3.9,3.9L53.1,6z'/%3E%3C/svg%3E";
51
- } else{
52
- $acfb_fancy_divider = "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='xMidYMid meet' overflow='visible' height='100%25' viewBox='0 0 120 26' fill='%23$acfb_dc' stroke='none'%3E%3Cpolygon points='0,14.4 0,21 11.5,12.4 21.3,20 30.4,11.1 40.3,20 51,12.4 60.6,20 69.6,11.1 79.3,20 90.1,12.4 99.6,20 109.7,11.1 120,21 120,14.4 109.7,5 99.6,13 90.1,5 79.3,14.5 71,5.7 60.6,12.4 51,5 40.3,14.5 31.1,5 21.3,13 11.5,5 '/%3E%3C/svg%3E";
53
- }
54
-
55
-
56
- $acfb_divider_image = null;
57
- if(get_field('acfb_divider_image')){
58
- $acfb_divider_image = get_field('acfb_divider_image');
59
- } else{
60
- $acfb_divider_image = plugins_url() . '/acf-blocks/img/placeholder-image.jpg';
61
- }
62
-
63
- ?>
64
- <div class="<?php echo $uid; ?> <?php echo esc_attr($className); ?>">
65
- <style type="text/css">
66
- .<?php echo $uid; ?>{
67
- <?php echo get_padding_field($acfb_divider_padding); ?>
68
- <?php echo get_margin_field($acfb_divider_margin); ?>
69
- }
70
-
71
- .<?php echo $uid; ?> .acfb_divider{
72
- display: -webkit-box;
73
- display: -webkit-flex;
74
- display: -ms-flexbox;
75
- display: flex;
76
- direction: ltr;
77
- align-items: center;
78
- }
79
-
80
- .<?php echo $uid; ?> .acfb_divider::before{
81
- <?php if(get_field('acfb_divider_image_sf') === 'simple'): ?>
82
- border-top-style: <?php the_field('acfb_divider_simple_styles'); ?>;
83
- border-top-color: <?php echo $acfb_divider_color; ?>;
84
- border-top-width: <?php the_field('acfb_simple_divider_bw') ?>px;
85
- <?php else: ?>
86
- background: url("<?php echo $acfb_fancy_divider ?>");
87
- height: <?php the_field('acfb_fancy_divider_height') ?>px;
88
- <?php if(get_field("acfb_divider_fancy_styles") !== "tree" && get_field("acfb_divider_fancy_styles") !== "x"): ?>
89
- background-size: 20px 100%;
90
- <?php endif; ?>
91
- <?php endif; ?>
92
- <?php if(get_field('acfb_divider_alignment') !== 'left'): ?>
93
- content: "";
94
- <?php endif; ?>
95
- display: block;
96
- -webkit-box-flex: 1;
97
- -webkit-flex-grow: 1;
98
- -ms-flex-positive: 1;
99
- flex-grow: 1;
100
- }
101
-
102
- .<?php echo $uid; ?> .acfb_divider .acfb_divider_element{
103
- width: <?php the_field('acfb_divider_element_width'); ?>%;
104
- margin-left: <?php the_field('acfb_divider_element_spacing'); ?>px;
105
- margin-right: <?php the_field('acfb_divider_element_spacing'); ?>px;
106
- text-align: center;
107
- <?php
108
- if(get_field('acfb_select_divider_style') === 'text'){
109
- echo get_typo_field($acfb_divider_text_typo);
110
- echo "color:" . get_field('acfb_divider_text_color');
111
- }
112
- ?>
113
- }
114
-
115
- <?php if(get_field('acfb_select_divider_style') === 'image'): ?>
116
- .acfb_divider .acfb_divider_element img{
117
- width: <?php the_field('acfb_divider_image_width'); ?>%;
118
- }
119
- <?php endif; ?>
120
-
121
- .<?php echo $uid; ?> .acfb_divider::after{
122
- <?php if(get_field('acfb_divider_image_sf') === 'simple'): ?>
123
- border-top-style: <?php the_field('acfb_divider_simple_styles'); ?>;
124
- border-top-color: <?php echo $acfb_divider_color; ?>;
125
- border-top-width: <?php the_field('acfb_simple_divider_bw') ?>px;
126
- <?php else: ?>
127
- background: url("<?php echo $acfb_fancy_divider ?>");
128
- height: <?php the_field('acfb_fancy_divider_height') ?>px;
129
- <?php if(get_field("acfb_divider_fancy_styles") !== "tree" && get_field("acfb_divider_fancy_styles") !== "x"): ?>
130
- background-size: 20px 100%;
131
- <?php endif; ?>
132
- <?php endif; ?>
133
- <?php if(get_field('acfb_divider_alignment') !== 'right'): ?>
134
- content: "";
135
- <?php endif; ?>
136
- display: block;
137
- -webkit-box-flex: 1;
138
- -webkit-flex-grow: 1;
139
- -ms-flex-positive: 1;
140
- flex-grow: 1;
141
- }
142
- </style>
143
-
144
- <div class="acfb_divider">
145
- <div class="acfb_divider_element">
146
- <?php
147
- if(get_field('acfb_select_divider_style') === 'text'){
148
- the_field('acfb_divider_text');
149
- } else{
150
- echo "<img src='". $acfb_divider_image ."'>";
151
- }
152
- ?>
153
- </div>
154
- </div>
155
-
156
  </div><!-- Uid -->
1
+ <?php
2
+ $uid = $block['id'];
3
+
4
+ $className = 'acfb_divider_block';
5
+ if( !empty($block['className']) ) {
6
+ $className .= ' ' . $block['className'];
7
+ }
8
+ if( !empty($block['align']) ) {
9
+ $className .= ' align' . $block['align'];
10
+ }
11
+
12
+ echo parse_link(
13
+ array(
14
+ get_field('acfb_divider_text_typo')
15
+ )
16
+ );
17
+
18
+ $acfb_divider_padding = acfb_padding_name('acfb_divider_padding');
19
+ $acfb_divider_margin = acfb_margin_name('acfb_divider_margin');
20
+ $acfb_divider_text_typo = acfb_ffaimly_name('acfb_divider_text_typo');
21
+
22
+
23
+
24
+
25
+ $acfb_divider_color = get_field('acfb_divider_color');
26
+ $acfb_dc = str_replace('#' , "" , get_field('acfb_divider_color'));
27
+
28
+ $acfb_divider_fancy_styles = get_field('acfb_divider_fancy_styles');
29
+ $acfb_fancy_divider = '';
30
+ if($acfb_divider_fancy_styles === 'curly'){
31
+ $acfb_fancy_divider = "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none' overflow='visible' height='100%25' viewBox='0 0 24 24' stroke='%23$acfb_dc' stroke-width='1' fill='none' stroke-linecap='square' stroke-miterlimit='10'%3E%3Cpath d='M0,21c3.3,0,8.3-0.9,15.7-7.1c6.6-5.4,4.4-9.3,2.4-10.3c-3.4-1.8-7.7,1.3-7.3,8.8C11.2,20,17.1,21,24,21'/%3E%3C/svg%3E";
32
+ } elseif($acfb_divider_fancy_styles === 'curved'){
33
+ $acfb_fancy_divider = "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none' overflow='visible' height='100%25' viewBox='0 0 24 24' stroke='%23$acfb_dc' stroke-width='1' fill='none' stroke-linecap='square' stroke-miterlimit='10'%3E%3Cpath d='M0,6c6,0,6,13,12,13S18,6,24,6'/%3E%3C/svg%3E";
34
+
35
+ } elseif($acfb_divider_fancy_styles === 'slashes'){
36
+ $acfb_fancy_divider = "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none' overflow='visible' height='100%25' viewBox='0 0 20 16' stroke='%23$acfb_dc' stroke-width='1' fill='none' stroke-linecap='square' stroke-miterlimit='10'%3E%3Cg transform='translate(-12.000000, 0)'%3E%3Cpath d='M28,0L10,18'/%3E%3Cpath d='M18,0L0,18'/%3E%3Cpath d='M48,0L30,18'/%3E%3Cpath d='M38,0L20,18'/%3E%3C/g%3E%3C/svg%3E";
37
+ } elseif($acfb_divider_fancy_styles === 'squared'){
38
+ $acfb_fancy_divider = "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none' overflow='visible' height='100%25' viewBox='0 0 24 24' stroke='%23$acfb_dc' stroke-width='1' fill='none' stroke-linecap='square' stroke-miterlimit='10'%3E%3Cpolyline points='0,6 6,6 6,18 18,18 18,6 24,6 '/%3E%3C/svg%3E";
39
+ } elseif($acfb_divider_fancy_styles === 'wavy'){
40
+ $acfb_fancy_divider = "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none' overflow='visible' height='100%25' viewBox='0 0 24 24' stroke='%23$acfb_dc' stroke-width='1' fill='none' stroke-linecap='square' stroke-miterlimit='10'%3E%3Cpath d='M0,6c6,0,0.9,11.1,6.9,11.1S18,6,24,6'/%3E%3C/svg%3E";
41
+ } elseif($acfb_divider_fancy_styles === 'tree'){
42
+ $acfb_fancy_divider = "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='xMidYMid meet' overflow='visible' height='100%25' viewBox='0 0 126 26' fill='%23$acfb_dc' stroke='none'%3E%3Cpath d='M111.9,18.3v3.4H109v-3.4H111.9z M90.8,18.3v3.4H88v-3.4H90.8z M69.8,18.3v3.4h-2.9v-3.4H69.8z M48.8,18.3v3.4h-2.9v-3.4H48.8z M27.7,18.3v3.4h-2.9v-3.4H27.7z M6.7,18.3v3.4H3.8v-3.4H6.7z M46.4,4l4.3,4.8l-1.8,0l3.5,4.4l-2.2-0.1l3,3.3l-11,0.4l3.6-3.8l-2.9-0.1l3.1-4.2l-1.9,0L46.4,4z M111.4,4l2.4,4.8l-1.8,0l3.5,4.4l-2.5-0.1l3.3,3.3h-11l3.1-3.4l-2.5-0.1l3.1-4.2l-1.9,0L111.4,4z M89.9,4l2.9,4.8l-1.9,0l3.2,4.2l-2.5,0l3.5,3.5l-11-0.4l3-3.1l-2.4,0L88,8.8l-1.9,0L89.9,4z M68.6,4l3,4.4l-1.9,0.1l3.4,4.1l-2.7,0.1l3.8,3.7H63.8l2.9-3.6l-2.9,0.1L67,8.7l-2,0.1L68.6,4z M26.5,4l3,4.4l-1.9,0.1l3.7,4.7l-2.5-0.1l3.3,3.3H21l3.1-3.4l-2.5-0.1l3.2-4.3l-2,0.1L26.5,4z M4.9,4l3.7,4.8l-1.5,0l3.1,4.2L7.6,13l3.4,3.4H0l3-3.3l-2.3,0.1l3.5-4.4l-2.3,0L4.9,4z'/%3E%3C/svg%3E";
43
+ } elseif($acfb_divider_fancy_styles === 'zigzag'){
44
+ $acfb_fancy_divider = "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none' overflow='visible' height='100%25' viewBox='0 0 24 24' stroke='%23$acfb_dc' stroke-width='1' fill='none' stroke-linecap='square' stroke-miterlimit='10'%3E%3Cpolyline points='0,18 12,6 24,18 '/%3E%3C/svg%3E";
45
+ } elseif($acfb_divider_fancy_styles === 'rhombus'){
46
+ $acfb_fancy_divider = "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none' overflow='visible' height='100%25' viewBox='0 0 24 24' fill='%23$acfb_dc' stroke='none'%3E%3Cpath d='M12.7,2.3c-0.4-0.4-1.1-0.4-1.5,0l-8,9.1c-0.3,0.4-0.3,0.9,0,1.2l8,9.1c0.4,0.4,1.1,0.4,1.5,0l8-9.1c0.3-0.4,0.3-0.9,0-1.2L12.7,2.3z'/%3E%3C/svg%3E";
47
+ } elseif($acfb_divider_fancy_styles === 'parallelogram'){
48
+ $acfb_fancy_divider = "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none' overflow='visible' height='100%25' viewBox='0 0 24 24' fill='%23$acfb_dc' stroke='none'%3E%3Cpolygon points='9.4,2 24,2 14.6,21.6 0,21.6'/%3E%3C/svg%3E";
49
+ } elseif($acfb_divider_fancy_styles === 'x'){
50
+ $acfb_fancy_divider = "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='xMidYMid meet' overflow='visible' height='100%25' viewBox='0 0 126 26' fill='%23$acfb_dc' stroke='none'%3E%3Cpath d='M10.7,6l2.5,2.6l-4,4.3l4,5.4l-2.5,1.9l-4.5-5.2l-3.9,4.2L0.7,17L4,13.1L0,8.6l2.3-1.3l3.9,3.9L10.7,6z M23.9,6.6l4.2,4.5L32,7.2l2.3,1.3l-4,4.5l3.2,3.9L32,19.1l-3.9-3.3l-4.5,4.3l-2.5-1.9l4.4-5.1l-4.2-3.9L23.9,6.6zM73.5,6L76,8.6l-4,4.3l4,5.4l-2.5,1.9l-4.5-5.2l-3.9,4.2L63.5,17l4.1-4.7L63.5,8l2.3-1.3l4.1,3.6L73.5,6z M94,6l2.5,2.6l-4,4.3l4,5.4L94,20.1l-3.9-5l-3.9,4.2L84,17l3.2-3.9L84,8.6l2.3-1.3l3.2,3.9L94,6z M106.9,6l4.5,5.1l3.9-3.9l2.3,1.3l-4,4.5l3.2,3.9l-1.6,2.1l-3.9-4.2l-4.5,5.2l-2.5-1.9l4-5.4l-4-4.3L106.9,6z M53.1,6l2.5,2.6l-4,4.3l4,4.6l-2.5,1.9l-4.5-4.5l-3.5,4.5L43.1,17l3.2-3.9l-4-4.5l2.3-1.3l3.9,3.9L53.1,6z'/%3E%3C/svg%3E";
51
+ } else{
52
+ $acfb_fancy_divider = "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='xMidYMid meet' overflow='visible' height='100%25' viewBox='0 0 120 26' fill='%23$acfb_dc' stroke='none'%3E%3Cpolygon points='0,14.4 0,21 11.5,12.4 21.3,20 30.4,11.1 40.3,20 51,12.4 60.6,20 69.6,11.1 79.3,20 90.1,12.4 99.6,20 109.7,11.1 120,21 120,14.4 109.7,5 99.6,13 90.1,5 79.3,14.5 71,5.7 60.6,12.4 51,5 40.3,14.5 31.1,5 21.3,13 11.5,5 '/%3E%3C/svg%3E";
53
+ }
54
+
55
+
56
+ $acfb_divider_image = null;
57
+ if(get_field('acfb_divider_image')){
58
+ $acfb_divider_image = get_field('acfb_divider_image');
59
+ } else{
60
+ $acfb_divider_image = plugins_url() . '/acf-blocks/img/placeholder-image.jpg';
61
+ }
62
+
63
+ ?>
64
+ <div class="<?php echo $uid; ?> <?php echo esc_attr($className); ?>">
65
+ <style type="text/css">
66
+ .<?php echo $uid; ?>{
67
+ <?php echo get_padding_field($acfb_divider_padding); ?>
68
+ <?php echo get_margin_field($acfb_divider_margin); ?>
69
+ }
70
+
71
+ .<?php echo $uid; ?> .acfb_divider{
72
+ display: -webkit-box;
73
+ display: -webkit-flex;
74
+ display: -ms-flexbox;
75
+ display: flex;
76
+ direction: ltr;
77
+ align-items: center;
78
+ }
79
+
80
+ .<?php echo $uid; ?> .acfb_divider::before{
81
+ <?php if(get_field('acfb_divider_image_sf') === 'simple'): ?>
82
+ border-top-style: <?php the_field('acfb_divider_simple_styles'); ?>;
83
+ border-top-color: <?php echo $acfb_divider_color; ?>;
84
+ border-top-width: <?php the_field('acfb_simple_divider_bw') ?>px;
85
+ <?php else: ?>
86
+ background: url("<?php echo $acfb_fancy_divider ?>");
87
+ height: <?php the_field('acfb_fancy_divider_height') ?>px;
88
+ <?php if(get_field("acfb_divider_fancy_styles") !== "tree" && get_field("acfb_divider_fancy_styles") !== "x"): ?>
89
+ background-size: 20px 100%;
90
+ <?php endif; ?>
91
+ <?php endif; ?>
92
+ <?php if(get_field('acfb_divider_alignment') !== 'left'): ?>
93
+ content: "";
94
+ <?php endif; ?>
95
+ display: block;
96
+ -webkit-box-flex: 1;
97
+ -webkit-flex-grow: 1;
98
+ -ms-flex-positive: 1;
99
+ flex-grow: 1;
100
+ }
101
+
102
+ .<?php echo $uid; ?> .acfb_divider .acfb_divider_element{
103
+ width: <?php the_field('acfb_divider_element_width'); ?>%;
104
+ margin-left: <?php the_field('acfb_divider_element_spacing'); ?>px;
105
+ margin-right: <?php the_field('acfb_divider_element_spacing'); ?>px;
106
+ text-align: center;
107
+ <?php
108
+ if(get_field('acfb_select_divider_style') === 'text'){
109
+ echo get_typo_field($acfb_divider_text_typo);
110
+ echo "color:" . get_field('acfb_divider_text_color');
111
+ }
112
+ ?>
113
+ }
114
+
115
+ <?php if(get_field('acfb_select_divider_style') === 'image'): ?>
116
+ .acfb_divider .acfb_divider_element img{
117
+ width: <?php the_field('acfb_divider_image_width'); ?>%;
118
+ }
119
+ <?php endif; ?>
120
+
121
+ .<?php echo $uid; ?> .acfb_divider::after{
122
+ <?php if(get_field('acfb_divider_image_sf') === 'simple'): ?>
123
+ border-top-style: <?php the_field('acfb_divider_simple_styles'); ?>;
124
+ border-top-color: <?php echo $acfb_divider_color; ?>;
125
+ border-top-width: <?php the_field('acfb_simple_divider_bw') ?>px;
126
+ <?php else: ?>
127
+ background: url("<?php echo $acfb_fancy_divider ?>");
128
+ height: <?php the_field('acfb_fancy_divider_height') ?>px;
129
+ <?php if(get_field("acfb_divider_fancy_styles") !== "tree" && get_field("acfb_divider_fancy_styles") !== "x"): ?>
130
+ background-size: 20px 100%;
131
+ <?php endif; ?>
132
+ <?php endif; ?>
133
+ <?php if(get_field('acfb_divider_alignment') !== 'right'): ?>
134
+ content: "";
135
+ <?php endif; ?>
136
+ display: block;
137
+ -webkit-box-flex: 1;
138
+ -webkit-flex-grow: 1;
139
+ -ms-flex-positive: 1;
140
+ flex-grow: 1;
141
+ }
142
+ </style>
143
+
144
+ <div class="acfb_divider">
145
+ <div class="acfb_divider_element">
146
+ <?php
147
+ if(get_field('acfb_select_divider_style') === 'text'){
148
+ the_field('acfb_divider_text');
149
+ } else{
150
+ echo "<img src='". $acfb_divider_image ."'>";
151
+ }
152
+ ?>
153
+ </div>
154
+ </div>
155
+
156
  </div><!-- Uid -->
acfblocks-templates/free/acfb-facebook-page.php CHANGED
@@ -1,46 +1,46 @@
1
- <?php
2
- $acfb_fb_page_margin = acfb_margin_name('acfb_fb_page_margin');
3
- $acfb_fb_page_padding = acfb_padding_name('acfb_fb_page_padding');
4
- $acfb_fb_timeline_tab = '';
5
- $acfb_fb_events_tab = '';
6
- $acfb_fb_messages_tab = '';
7
-
8
-
9
- if(get_field('acfb_fb_timeline_tab') == 'true'){
10
- $acfb_fb_timeline_tab = 'timeline';
11
- }
12
-
13
- if(get_field('acfb_fb_events_tab') == 'true'){
14
- $acfb_fb_events_tab = 'events';
15
- }
16
-
17
- if(get_field('acfb_fb_messages_tab') == 'true'){
18
- $acfb_fb_messages_tab = 'messages';
19
- }
20
-
21
-
22
- $uid = $block['id'];
23
-
24
- $className = 'acfb_facebook_page_block';
25
- if( !empty($block['className']) ) {
26
- $className .= ' ' . $block['className'];
27
- }
28
- if( !empty($block['align']) ) {
29
- $className .= ' align' . $block['align'];
30
- }
31
- ?>
32
-
33
- <div class="<?php echo $uid; ?> <?php echo esc_attr($className); ?>">
34
- <style type="text/css">
35
- .<?php echo $uid; ?> {
36
- <?php echo get_margin_field($acfb_fb_page_margin); ?>
37
- <?php echo get_padding_field($acfb_fb_page_padding); ?>
38
- }
39
- </style>
40
-
41
-
42
- <div class="acfb_fb_page_wrap" style="width: 100%;">
43
- <iframe src="https://www.facebook.com/plugins/page.php?href=https%3A%2F%2Fwww.facebook.com%2F<?php the_field('acfb_fb_page_id'); ?>%2F&tabs=<?php echo $acfb_fb_timeline_tab; ?>,<?php echo $acfb_fb_events_tab; ?>,<?php echo $acfb_fb_messages_tab; ?>&width=<?php the_field('acfb_fb_page_width'); ?>&height=<?php the_field('acfb_fb_page_height'); ?>&small_header=<?php the_field('acfb_fb_small_header'); ?>&adapt_container_width=true&hide_cover=<?php the_field('acfb_fb_cover_photo'); ?>&hide_cta=<?php the_field('acfb_fb_cta_button'); ?>&show_facepile=<?php the_field('acfb_fb_profile_photos'); ?>&appId" width="<?php the_field('acfb_fb_page_width'); ?>" height="<?php the_field('acfb_fb_page_height'); ?>" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowTransparency="true" allow="encrypted-media"></iframe>
44
- </div>
45
-
46
  </div><!-- Uid -->
1
+ <?php
2
+ $acfb_fb_page_margin = acfb_margin_name('acfb_fb_page_margin');
3
+ $acfb_fb_page_padding = acfb_padding_name('acfb_fb_page_padding');
4
+ $acfb_fb_timeline_tab = '';
5
+ $acfb_fb_events_tab = '';
6
+ $acfb_fb_messages_tab = '';
7
+
8
+
9
+ if(get_field('acfb_fb_timeline_tab') == 'true'){
10
+ $acfb_fb_timeline_tab = 'timeline';
11
+ }
12
+
13
+ if(get_field('acfb_fb_events_tab') == 'true'){
14
+ $acfb_fb_events_tab = 'events';
15
+ }
16
+
17
+ if(get_field('acfb_fb_messages_tab') == 'true'){
18
+ $acfb_fb_messages_tab = 'messages';
19
+ }
20
+
21
+
22
+ $uid = $block['id'];
23
+
24
+ $className = 'acfb_facebook_page_block';
25
+ if( !empty($block['className']) ) {
26
+ $className .= ' ' . $block['className'];
27
+ }
28
+ if( !empty($block['align']) ) {
29
+ $className .= ' align' . $block['align'];
30
+ }
31
+ ?>
32
+
33
+ <div class="<?php echo $uid; ?> <?php echo esc_attr($className); ?>">
34
+ <style type="text/css">
35
+ .<?php echo $uid; ?> {
36
+ <?php echo get_margin_field($acfb_fb_page_margin); ?>
37
+ <?php echo get_padding_field($acfb_fb_page_padding); ?>
38
+ }
39
+ </style>
40
+
41
+
42
+ <div class="acfb_fb_page_wrap" style="width: 100%;">
43
+ <iframe src="https://www.facebook.com/plugins/page.php?href=https%3A%2F%2Fwww.facebook.com%2F<?php the_field('acfb_fb_page_id'); ?>%2F&tabs=<?php echo $acfb_fb_timeline_tab; ?>,<?php echo $acfb_fb_events_tab; ?>,<?php echo $acfb_fb_messages_tab; ?>&width=<?php the_field('acfb_fb_page_width'); ?>&height=<?php the_field('acfb_fb_page_height'); ?>&small_header=<?php the_field('acfb_fb_small_header'); ?>&adapt_container_width=true&hide_cover=<?php the_field('acfb_fb_cover_photo'); ?>&hide_cta=<?php the_field('acfb_fb_cta_button'); ?>&show_facepile=<?php the_field('acfb_fb_profile_photos'); ?>&appId" width="<?php the_field('acfb_fb_page_width'); ?>" height="<?php the_field('acfb_fb_page_height'); ?>" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowTransparency="true" allow="encrypted-media"></iframe>
44
+ </div>
45
+
46
  </div><!-- Uid -->
acfblocks-templates/free/acfb-fb-like-button.php CHANGED
@@ -1,28 +1,28 @@
1
- <?php
2
- $uid = $block['id'];
3
-
4
- $className = 'acfb_fb_like_button_block';
5
- if( !empty($block['className']) ) {
6
- $className .= ' ' . $block['className'];
7
- }
8
- if( !empty($block['align']) ) {
9
- $className .= ' align' . $block['align'];
10
- }
11
-
12
- $acfb_flb_margin = acfb_margin_name('acfb_flb_margin');
13
- $acfb_flb_padding = acfb_padding_name('acfb_flb_padding');
14
- ?>
15
- <div class="<?php echo $uid; ?> <?php echo esc_attr($className); ?>">
16
- <style type="text/css">
17
- .<?php echo $uid; ?> {
18
- <?php echo get_margin_field($acfb_flb_margin); ?>
19
- <?php echo get_padding_field($acfb_flb_padding); ?>
20
- }
21
- </style>
22
-
23
-
24
- <div class="acfb_fb_button_container">
25
- <iframe src="https://www.facebook.com/plugins/like.php?href=https%3A%2F%2Fwww.facebook.com%2F<?php the_field("acfb_flb_link"); ?>&layout=<?php the_field("acfb_flb_layout"); ?>&action=<?php the_field("acfb_flb_type"); ?>&size=<?php the_field("acfb_flb_size"); ?>&share=<?php the_field("acfb_flb_share_button"); ?>&appId" width="100%" height="<?php the_field("acfb_flb_height"); ?>" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowTransparency="true" allow="encrypted-media"></iframe>
26
- </div>
27
-
28
  </div><!-- Uid -->
1
+ <?php
2
+ $uid = $block['id'];
3
+
4
+ $className = 'acfb_fb_like_button_block';
5
+ if( !empty($block['className']) ) {
6
+ $className .= ' ' . $block['className'];
7
+ }
8
+ if( !empty($block['align']) ) {
9
+ $className .= ' align' . $block['align'];
10
+ }
11
+
12
+ $acfb_flb_margin = acfb_margin_name('acfb_flb_margin');
13
+ $acfb_flb_padding = acfb_padding_name('acfb_flb_padding');
14
+ ?>
15
+ <div class="<?php echo $uid; ?> <?php echo esc_attr($className); ?>">
16
+ <style type="text/css">
17
+ .<?php echo $uid; ?> {
18
+ <?php echo get_margin_field($acfb_flb_margin); ?>
19
+ <?php echo get_padding_field($acfb_flb_padding); ?>
20
+ }
21
+ </style>
22
+
23
+
24
+ <div class="acfb_fb_button_container">
25
+ <iframe src="https://www.facebook.com/plugins/like.php?href=https%3A%2F%2Fwww.facebook.com%2F<?php the_field("acfb_flb_link"); ?>&layout=<?php the_field("acfb_flb_layout"); ?>&action=<?php the_field("acfb_flb_type"); ?>&size=<?php the_field("acfb_flb_size"); ?>&share=<?php the_field("acfb_flb_share_button"); ?>&appId" width="100%" height="<?php the_field("acfb_flb_height"); ?>" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowTransparency="true" allow="encrypted-media"></iframe>
26
+ </div>
27
+
28
  </div><!-- Uid -->
acfblocks-templates/free/acfb-image-slider.php CHANGED
@@ -1,105 +1,105 @@
1
- <?php
2
- echo parse_link(
3
- array(
4
- get_field('acfb_slider_caption_typo')
5
- )
6
- );
7
-
8
-
9
- $acfb_slider_padding = acfb_padding_name('acfb_slider_padding');
10
- $acfb_slider_margin = acfb_margin_name('acfb_slider_margin');
11
- $acfb_slider_caption_typo = acfb_ffaimly_name('acfb_slider_caption_typo');
12
-
13
-
14
- $uid = $block['id'];
15
- $acfb_slider_images = get_field('acfb_slider_images');
16
- $acfb_slide_placeholder = plugins_url() . '/acf-blocks/img/placeholder-image.jpg';
17
-
18
- $className = 'acfb_slider_block';
19
- if( !empty($block['className']) ) {
20
- $className .= ' ' . $block['className'];
21
- }
22
- if( !empty($block['align']) ) {
23
- $className .= ' align' . $block['align'];
24
- }
25
-
26
- ?>
27
-
28
- <div class="<?php echo $uid; ?> <?php echo esc_attr($className); ?>">
29
- <style type="text/css">
30
- .<?php echo $uid; ?> {
31
- <?php echo get_padding_field($acfb_slider_padding); ?>
32
- <?php echo get_margin_field($acfb_slider_margin); ?>
33
- }
34
-
35
-
36
- .<?php echo $uid; ?> .swiper-container .swiper-wrapper .swiper-slide{
37
- <?php if(get_field('acfb_slider_caption') == 'true'): ?>
38
- display: flex;
39
- justify-content: <?php the_field("acfb_slider_caption_horizontal_position"); ?>;
40
- <?php endif; ?>
41
- height: <?php the_field('acfb_slider_height'); ?>px !important;
42
- }
43
-
44
- .<?php echo $uid; ?> .swiper-container .swiper-wrapper .swiper-slide .acfb_caption{
45
- background-color: <?php the_field("acfb_slider_caption_background"); ?>;
46
- <?php echo get_typo_field($acfb_slider_caption_typo); ?>
47
- color: <?php the_field("acfb_slider_caption_color"); ?>;
48
- align-self: <?php the_field("acfb_slider_caption_vertical_position"); ?>;
49
- }
50
-
51
- .<?php echo $uid; ?> .swiper-container .swiper-wrapper .swiper-slide img{
52
- <?php if(get_field("acfb_slider_height")): ?>
53
- -ms-flex: 1;
54
- flex: 1;
55
- width: 100%;
56
- height: 100%;
57
- -o-object-fit: cover;
58
- object-fit: cover;
59
- <?php endif; ?>
60
- }
61
- </style>
62
-
63
- <div class="swiper-container" data-slidesperview="<?php the_field("acfb_slides_per_view"); ?>" data-delay="<?php the_field("acfb_slider_delay"); ?>" data-effect="<?php the_field("acfb_slider_transition_effect"); ?>" data-centerslide="<?php the_field("acfb_slider_center_slide"); ?>" data-gutter="<?php the_field("acfb_slider_gutter_space"); ?>" data-autoplay="<?php the_field("acfb_slider_autoplay"); ?>" data-autoheight="<?php the_field("acfb_slider_auto_height"); ?>">
64
- <div class="swiper-wrapper">
65
-
66
- <?php if($acfb_slider_images): ?>
67
-
68
- <?php foreach( $acfb_slider_images as $acfb_slide_image ): ?>
69
- <div class="swiper-slide">
70
- <img src="<?php echo $acfb_slide_image['url']; ?>"/>
71
- <?php if(get_field('acfb_slider_caption') == 'true' && $acfb_slide_image['caption']): ?>
72
- <span class="acfb_caption"><?php echo $acfb_slide_image['caption']; ?></span>
73
- <?php endif; ?>
74
- </div>
75
- <?php endforeach; ?>
76
-
77
- <?php else: ?>
78
-
79
- <?php for ($acfb_slide_count = 0 ; $acfb_slide_count < 6; $acfb_slide_count++): ?>
80
- <div class="swiper-slide">
81
- <img src="<?php echo $acfb_slide_placeholder; ?>"/>
82
- <?php if(get_field('acfb_slider_caption') == 'true'): ?>
83
- <span class="acfb_caption">Caption</span>
84
- <?php endif; ?>
85
- </div>
86
- <?php endfor; ?>
87
-
88
- <?php endif; ?>
89
-
90
- </div>
91
- <?php if(get_field("acfb_slider_dot_control") == 'true'): ?><div class="swiper-pagination"></div><?php endif; ?>
92
- <?php if(get_field("acfb_slider_arrow_control") == 'true'): ?>
93
- <div class="acfb-button-prev"><svg enable-background="new 0 0 477.175 477.175" version="1.1" viewBox="0 0 477.18 477.18" xml:space="preserve" xmlns="http://www.w3.org/2000/svg">
94
- <path d="m145.19 238.58 215.5-215.5c5.3-5.3 5.3-13.8 0-19.1s-13.8-5.3-19.1 0l-225.1 225.1c-5.3 5.3-5.3 13.8 0 19.1l225.1 225c2.6 2.6 6.1 4 9.5 4s6.9-1.3 9.5-4c5.3-5.3 5.3-13.8 0-19.1l-215.4-215.5z"/>
95
- </svg>
96
- </div>
97
- <div class="acfb-button-next">
98
- <svg enable-background="new 0 0 477.175 477.175" version="1.1" viewBox="0 0 477.18 477.18" xml:space="preserve" xmlns="http://www.w3.org/2000/svg">
99
- <path d="m360.73 229.08-225.1-225.1c-5.3-5.3-13.8-5.3-19.1 0s-5.3 13.8 0 19.1l215.5 215.5-215.5 215.5c-5.3 5.3-5.3 13.8 0 19.1 2.6 2.6 6.1 4 9.5 4s6.9-1.3 9.5-4l225.1-225.1c5.3-5.2 5.3-13.8 0.1-19z"/>
100
- </svg>
101
- </div>
102
- <?php endif; ?>
103
- </div>
104
-
105
  </div><!-- Uid -->
1
+ <?php
2
+ echo parse_link(
3
+ array(
4
+ get_field('acfb_slider_caption_typo')
5
+ )
6
+ );
7
+
8
+
9
+ $acfb_slider_padding = acfb_padding_name('acfb_slider_padding');
10
+ $acfb_slider_margin = acfb_margin_name('acfb_slider_margin');
11
+ $acfb_slider_caption_typo = acfb_ffaimly_name('acfb_slider_caption_typo');
12
+
13
+
14
+ $uid = $block['id'];
15
+ $acfb_slider_images = get_field('acfb_slider_images');
16
+ $acfb_slide_placeholder = plugins_url() . '/acf-blocks/img/placeholder-image.jpg';
17
+
18
+ $className = 'acfb_slider_block';
19
+ if( !empty($block['className']) ) {
20
+ $className .= ' ' . $block['className'];
21
+ }
22
+ if( !empty($block['align']) ) {
23
+ $className .= ' align' . $block['align'];
24
+ }
25
+
26
+ ?>
27
+
28
+ <div class="<?php echo $uid; ?> <?php echo esc_attr($className); ?>">
29
+ <style type="text/css">
30
+ .<?php echo $uid; ?> {
31
+ <?php echo get_padding_field($acfb_slider_padding); ?>
32
+ <?php echo get_margin_field($acfb_slider_margin); ?>
33
+ }
34
+
35
+
36
+ .<?php echo $uid; ?> .swiper-container .swiper-wrapper .swiper-slide{
37
+ <?php if(get_field('acfb_slider_caption') == 'true'): ?>
38
+ display: flex;
39
+ justify-content: <?php the_field("acfb_slider_caption_horizontal_position"); ?>;
40
+ <?php endif; ?>
41
+ height: <?php the_field('acfb_slider_height'); ?>px !important;
42
+ }
43
+
44
+ .<?php echo $uid; ?> .swiper-container .swiper-wrapper .swiper-slide .acfb_caption{
45
+ background-color: <?php the_field("acfb_slider_caption_background"); ?>;
46
+ <?php echo get_typo_field($acfb_slider_caption_typo); ?>
47
+ color: <?php the_field("acfb_slider_caption_color"); ?>;
48
+ align-self: <?php the_field("acfb_slider_caption_vertical_position"); ?>;
49
+ }
50
+
51
+ .<?php echo $uid; ?> .swiper-container .swiper-wrapper .swiper-slide img{
52
+ <?php if(get_field("acfb_slider_height")): ?>
53
+ -ms-flex: 1;
54
+ flex: 1;
55
+ width: 100%;
56
+ height: 100%;
57
+ -o-object-fit: cover;
58
+ object-fit: cover;
59
+ <?php endif; ?>
60
+ }
61
+ </style>
62
+
63
+ <div class="swiper-container" data-slidesperview="<?php the_field("acfb_slides_per_view"); ?>" data-delay="<?php the_field("acfb_slider_delay"); ?>" data-effect="<?php the_field("acfb_slider_transition_effect"); ?>" data-centerslide="<?php the_field("acfb_slider_center_slide"); ?>" data-gutter="<?php the_field("acfb_slider_gutter_space"); ?>" data-autoplay="<?php the_field("acfb_slider_autoplay"); ?>" data-autoheight="<?php the_field("acfb_slider_auto_height"); ?>">
64
+ <div class="swiper-wrapper">
65
+
66
+ <?php if($acfb_slider_images): ?>
67
+
68
+ <?php foreach( $acfb_slider_images as $acfb_slide_image ): ?>
69
+ <div class="swiper-slide">
70
+ <img src="<?php echo $acfb_slide_image['url']; ?>"/>
71
+ <?php if(get_field('acfb_slider_caption') == 'true' && $acfb_slide_image['caption']): ?>
72
+ <span class="acfb_caption"><?php echo $acfb_slide_image['caption']; ?></span>
73
+ <?php endif; ?>
74
+ </div>
75
+ <?php endforeach; ?>
76
+
77
+ <?php else: ?>
78
+
79
+ <?php for ($acfb_slide_count = 0 ; $acfb_slide_count < 6; $acfb_slide_count++): ?>
80
+ <div class="swiper-slide">
81
+ <img src="<?php echo $acfb_slide_placeholder; ?>"/>
82
+ <?php if(get_field('acfb_slider_caption') == 'true'): ?>
83
+ <span class="acfb_caption">Caption</span>
84
+ <?php endif; ?>
85
+ </div>
86
+ <?php endfor; ?>
87
+
88
+ <?php endif; ?>
89
+
90
+ </div>
91
+ <?php if(get_field("acfb_slider_dot_control") == 'true'): ?><div class="swiper-pagination"></div><?php endif; ?>
92
+ <?php if(get_field("acfb_slider_arrow_control") == 'true'): ?>
93
+ <div class="acfb-button-prev"><svg enable-background="new 0 0 477.175 477.175" version="1.1" viewBox="0 0 477.18 477.18" xml:space="preserve" xmlns="http://www.w3.org/2000/svg">
94
+ <path d="m145.19 238.58 215.5-215.5c5.3-5.3 5.3-13.8 0-19.1s-13.8-5.3-19.1 0l-225.1 225.1c-5.3 5.3-5.3 13.8 0 19.1l225.1 225c2.6 2.6 6.1 4 9.5 4s6.9-1.3 9.5-4c5.3-5.3 5.3-13.8 0-19.1l-215.4-215.5z"/>
95
+ </svg>
96
+ </div>
97
+ <div class="acfb-button-next">
98
+ <svg enable-background="new 0 0 477.175 477.175" version="1.1" viewBox="0 0 477.18 477.18" xml:space="preserve" xmlns="http://www.w3.org/2000/svg">
99
+ <path d="m360.73 229.08-225.1-225.1c-5.3-5.3-13.8-5.3-19.1 0s-5.3 13.8 0 19.1l215.5 215.5-215.5 215.5c-5.3 5.3-5.3 13.8 0 19.1 2.6 2.6 6.1 4 9.5 4s6.9-1.3 9.5-4l225.1-225.1c5.3-5.2 5.3-13.8 0.1-19z"/>
100
+ </svg>
101
+ </div>
102
+ <?php endif; ?>
103
+ </div>
104
+
105
  </div><!-- Uid -->
acfblocks-templates/free/acfb-multibuttons.php CHANGED
@@ -1,76 +1,76 @@
1
- <?php
2
- echo parse_link(
3
- array(
4
- get_field('acfb_multibutton_text_typo')
5
- )
6
- );
7
-
8
-
9
- $acfb_multibutton_button_padding = acfb_padding_name('acfb_multibutton_button_padding');
10
- $acfb_multibutton_padding = acfb_padding_name('acfb_multibutton_padding');
11
- $acfb_multibutton_margin = acfb_margin_name('acfb_multibutton_margin');
12
- $acfb_multibutton_text_typo = acfb_ffaimly_name('acfb_multibutton_text_typo');
13
-
14
-
15
- $uid = $block['id'];
16
-
17
- $className = 'acfb_multibuttons_block';
18
- if( !empty($block['className']) ) {
19
- $className .= ' ' . $block['className'];
20
- }
21
- if( !empty($block['align']) ) {
22
- $className .= ' align' . $block['align'];
23
- }
24
-
25
- ?>
26
- <div class="<?php echo $uid; ?> <?php echo esc_attr($className); ?>">
27
- <style type="text/css">
28
- .<?php echo $uid; ?> {
29
- <?php echo get_padding_field($acfb_multibutton_padding); ?>
30
- <?php echo get_margin_field($acfb_multibutton_margin); ?>
31
- }
32
-
33
- .<?php echo $uid; ?> .acfb_multibuttons_wrap {
34
- justify-content: <?php the_field('acfb_multibutton_alignment'); ?>;
35
- }
36
-
37
- .<?php echo $uid; ?> .acfb_multibuttons_wrap .acfb_button{
38
- <?php echo get_typo_field($acfb_multibutton_text_typo); ?>
39
- border-radius: <?php the_field('acfb_multibutton_border_radius'); ?>px;
40
- margin-right: <?php the_field('acfb_multibutton_gutter_space'); ?>px;
41
- padding-top: <?php echo $acfb_multibutton_button_padding['padding_top']; ?>px;
42
- padding-bottom: <?php echo $acfb_multibutton_button_padding['padding_bottom']; ?>px;
43
- padding-left: <?php echo $acfb_multibutton_button_padding['padding_left']; ?>px;
44
- padding-right: <?php echo $acfb_multibutton_button_padding['padding_right']; ?>px;
45
- }
46
- </style>
47
-
48
- <div class="acfb_multibuttons_wrap">
49
- <?php
50
- if( have_rows('acfb_multi_buttons') ):
51
- while ( have_rows('acfb_multi_buttons') ) : the_row(); ?>
52
-
53
- <style type="text/css">
54
- .<?php echo $uid; ?> .acfb_multibuttons_wrap .acfb_order_<?php echo get_row_index(); ?>{
55
- background-color: <?php the_sub_field('acfb_multibutton_background_color'); ?>;
56
- color: <?php the_sub_field('acfb_multibutton_text_color'); ?> !important;
57
- }
58
-
59
- .<?php echo $uid; ?> .acfb_multibuttons_wrap .acfb_order_<?php echo get_row_index(); ?>:hover{
60
- background-color: <?php the_sub_field('acfb_multibutton_background_hover_color'); ?>;
61
- color: <?php the_sub_field('acfb_multibutton_text_hover_color'); ?> !important;
62
- }
63
-
64
- </style>
65
-
66
- <a href="<?php the_sub_field('acfb_multibutton_url'); ?>" class="acfb_button acfb_order_<?php echo get_row_index(); ?>">
67
- <?php the_sub_field('acfb_multibutton_text'); ?>
68
- </a>
69
-
70
- <?php
71
- endwhile;
72
- endif;
73
- ?>
74
-
75
- </div>
76
  </div><!-- Uid -->
1
+ <?php
2
+ echo parse_link(
3
+ array(
4
+ get_field('acfb_multibutton_text_typo')
5
+ )
6
+ );
7
+
8
+
9
+ $acfb_multibutton_button_padding = acfb_padding_name('acfb_multibutton_button_padding');
10
+ $acfb_multibutton_padding = acfb_padding_name('acfb_multibutton_padding');
11
+ $acfb_multibutton_margin = acfb_margin_name('acfb_multibutton_margin');
12
+ $acfb_multibutton_text_typo = acfb_ffaimly_name('acfb_multibutton_text_typo');
13
+
14
+
15
+ $uid = $block['id'];
16
+
17
+ $className = 'acfb_multibuttons_block';
18
+ if( !empty($block['className']) ) {
19
+ $className .= ' ' . $block['className'];
20
+ }
21
+ if( !empty($block['align']) ) {
22
+ $className .= ' align' . $block['align'];
23
+ }
24
+
25
+ ?>
26
+ <div class="<?php echo $uid; ?> <?php echo esc_attr($className); ?>">
27
+ <style type="text/css">
28
+ .<?php echo $uid; ?> {
29
+ <?php echo get_padding_field($acfb_multibutton_padding); ?>
30
+ <?php echo get_margin_field($acfb_multibutton_margin); ?>
31
+ }
32
+
33
+ .<?php echo $uid; ?> .acfb_multibuttons_wrap {
34
+ justify-content: <?php the_field('acfb_multibutton_alignment'); ?>;
35
+ }
36
+
37
+ .<?php echo $uid; ?> .acfb_multibuttons_wrap .acfb_button{
38
+ <?php echo get_typo_field($acfb_multibutton_text_typo); ?>
39
+ border-radius: <?php the_field('acfb_multibutton_border_radius'); ?>px;
40
+ margin-right: <?php the_field('acfb_multibutton_gutter_space'); ?>px;
41
+ padding-top: <?php echo $acfb_multibutton_button_padding['padding_top']; ?>px;
42
+ padding-bottom: <?php echo $acfb_multibutton_button_padding['padding_bottom']; ?>px;
43
+ padding-left: <?php echo $acfb_multibutton_button_padding['padding_left']; ?>px;
44
+ padding-right: <?php echo $acfb_multibutton_button_padding['padding_right']; ?>px;
45
+ }
46
+ </style>
47
+
48
+ <div class="acfb_multibuttons_wrap">
49
+ <?php
50
+ if( have_rows('acfb_multi_buttons') ):
51
+ while ( have_rows('acfb_multi_buttons') ) : the_row(); ?>
52
+
53
+ <style type="text/css">
54
+ .<?php echo $uid; ?> .acfb_multibuttons_wrap .acfb_order_<?php echo get_row_index(); ?>{
55
+ background-color: <?php the_sub_field('acfb_multibutton_background_color'); ?>;
56
+ color: <?php the_sub_field('acfb_multibutton_text_color'); ?> !important;
57
+ }
58
+
59
+ .<?php echo $uid; ?> .acfb_multibuttons_wrap .acfb_order_<?php echo get_row_index(); ?>:hover{
60
+ background-color: <?php the_sub_field('acfb_multibutton_background_hover_color'); ?>;
61
+ color: <?php the_sub_field('acfb_multibutton_text_hover_color'); ?> !important;
62
+ }
63
+
64
+ </style>
65
+
66
+ <a href="<?php the_sub_field('acfb_multibutton_url'); ?>" class="acfb_button acfb_order_<?php echo get_row_index(); ?>">
67
+ <?php the_sub_field('acfb_multibutton_text'); ?>
68
+ </a>
69
+
70
+ <?php
71
+ endwhile;
72
+ endif;
73
+ ?>
74
+
75
+ </div>
76
  </div><!-- Uid -->
acfblocks-templates/free/acfb-photocollage.php CHANGED
@@ -1,91 +1,91 @@
1
- <?php
2
- $acfb_photo_collage_padding = acfb_padding_name('acfb_photo_collage_padding');
3
- $acfb_photo_collage_margin = acfb_margin_name('acfb_photo_collage_margin');
4
-
5
- $uid = $block['id'];
6
-
7
- $className = 'acfb_photo_collage_block';
8
- if( !empty($block['className']) ) {
9
- $className .= ' ' . $block['className'];
10
- }
11
- if( !empty($block['align']) ) {
12
- $className .= ' align' . $block['align'];
13
- }
14
-
15
- $images_field = get_field('acfb_photo_collage_images');
16
- $images0 = null;
17
- $images1 = null;
18
- $images2 = null;
19
- $images3 = null;
20
-
21
-
22
- if($images_field){
23
- $images0 = $images_field['0']['url'];
24
- } else{
25
- $images0 = plugins_url() . '/acf-blocks/img/placeholder-image.jpg';
26
- }
27
-
28
- if ( $images_field && count($images_field) > 1 ) {
29
- $images1 = $images_field['1']['url'];
30
- } else{
31
- $images1 = plugins_url() . '/acf-blocks/img/placeholder-image.jpg';
32
- }
33
-
34
- if ( $images_field && count($images_field) > 2 ) {
35
- $images2 = $images_field['2']['url'];
36
- } else{
37
- $images2 = plugins_url() . '/acf-blocks/img/placeholder-image.jpg';
38
- }
39
-
40
- if ( $images_field && count($images_field) > 3 ) {
41
- $images3 = $images_field['3']['url'];
42
- } else{
43
- $images3 = plugins_url() . '/acf-blocks/img/placeholder-image.jpg';
44
- }
45
-
46
- ?>
47
-
48
-
49
- <div class="<?php echo $uid; ?> <?php echo esc_attr($className); ?>">
50
- <style type="text/css">
51
- .<?php echo $uid; ?>{
52
- <?php echo get_padding_field($acfb_photo_collage_padding); ?>
53
- <?php echo get_margin_field($acfb_photo_collage_margin); ?>
54
- }
55
-
56
-
57
- .<?php echo $uid; ?> .acfb_photo_collage{
58
- width: <?php the_field('acfb_photo_collage_layout_width'); ?>%;
59
- height: <?php the_field('acfb_photo_collage_layout_height'); ?>px;
60
- grid-gap: <?php the_field('acfb_photo_collage_layout_gutter_space'); ?>px;
61
- }
62
- </style>
63
-
64
-
65
- <?php if(get_field('select_grid') == '2'): ?>
66
-
67
- <div class="acfb_two-grid-style-<?php the_field('2_grid_layouts');?> acfb_collage_<?php the_field('select_grid');?> acfb_photo_collage">
68
- <div class="acfb_one" style="background-image: url('<?php echo $images0; ?>');"></div>
69
- <div class="acfb_two" style="background-image: url('<?php echo $images1; ?>');"></div>
70
- </div>
71
-
72
- <?php elseif( get_field('select_grid') == '3' ): ?>
73
-
74
- <div class="acfb_three-grid-style-<?php the_field('3_grid_layouts');?> acfb_collage_<?php the_field('select_grid');?> acfb_photo_collage">
75
- <div class="acfb_one" style="background-image: url('<?php echo $images0; ?>');"></div>
76
- <div class="acfb_two" style="background-image: url('<?php echo $images1; ?>');"></div>
77
- <div class="acfb_three" style="background-image: url('<?php echo $images2; ?>');"></div>
78
- </div>
79
-
80
- <?php elseif( get_field('select_grid') == '4' ): ?>
81
-
82
- <div class="acfb_four-grid-style-<?php the_field('4_grid_layouts');?> acfb_collage_<?php the_field('select_grid');?> acfb_photo_collage">
83
- <div class="acfb_one" style="background-image: url('<?php echo $images0; ?>');"></div>
84
- <div class="acfb_two" style="background-image: url('<?php echo $images1; ?>');"></div>
85
- <div class="acfb_three" style="background-image: url('<?php echo $images2; ?>');"></div>
86
- <div class="acfb_four" style="background-image: url('<?php echo $images3; ?>');"></div>
87
- </div>
88
-
89
- <?php endif; ?>
90
-
91
  </div><!-- Uid -->
1
+ <?php
2
+ $acfb_photo_collage_padding = acfb_padding_name('acfb_photo_collage_padding');
3
+ $acfb_photo_collage_margin = acfb_margin_name('acfb_photo_collage_margin');
4
+
5
+ $uid = $block['id'];
6
+
7
+ $className = 'acfb_photo_collage_block';
8
+ if( !empty($block['className']) ) {
9
+ $className .= ' ' . $block['className'];
10
+ }
11
+ if( !empty($block['align']) ) {
12
+ $className .= ' align' . $block['align'];
13
+ }
14
+
15
+ $images_field = get_field('acfb_photo_collage_images');
16
+ $images0 = null;
17
+ $images1 = null;
18
+ $images2 = null;
19
+ $images3 = null;
20
+
21
+
22
+ if($images_field){
23
+ $images0 = $images_field['0']['url'];
24
+ } else{
25
+ $images0 = plugins_url() . '/acf-blocks/img/placeholder-image.jpg';
26
+ }
27
+
28
+ if ( $images_field && count($images_field) > 1 ) {
29
+ $images1 = $images_field['1']['url'];
30
+ } else{
31
+ $images1 = plugins_url() . '/acf-blocks/img/placeholder-image.jpg';
32
+ }
33
+
34
+ if ( $images_field && count($images_field) > 2 ) {
35
+ $images2 = $images_field['2']['url'];
36
+ } else{
37
+ $images2 = plugins_url() . '/acf-blocks/img/placeholder-image.jpg';
38
+ }
39
+
40
+ if ( $images_field && count($images_field) > 3 ) {
41
+ $images3 = $images_field['3']['url'];
42
+ } else{
43
+ $images3 = plugins_url() . '/acf-blocks/img/placeholder-image.jpg';
44
+ }
45
+
46
+ ?>
47
+
48
+
49
+ <div class="<?php echo $uid; ?> <?php echo esc_attr($className); ?>">
50
+ <style type="text/css">
51
+ .<?php echo $uid; ?>{
52
+ <?php echo get_padding_field($acfb_photo_collage_padding); ?>
53
+ <?php echo get_margin_field($acfb_photo_collage_margin); ?>
54
+ }
55
+
56
+
57
+ .<?php echo $uid; ?> .acfb_photo_collage{
58
+ width: <?php the_field('acfb_photo_collage_layout_width'); ?>%;
59
+ height: <?php the_field('acfb_photo_collage_layout_height'); ?>px;
60
+ grid-gap: <?php the_field('acfb_photo_collage_layout_gutter_space'); ?>px;
61
+ }
62
+ </style>
63
+
64
+
65
+ <?php if(get_field('select_grid') == '2'): ?>
66
+
67
+ <div class="acfb_two-grid-style-<?php the_field('2_grid_layouts');?> acfb_collage_<?php the_field('select_grid');?> acfb_photo_collage">
68
+ <div class="acfb_one" style="background-image: url('<?php echo $images0; ?>');"></div>
69
+ <div class="acfb_two" style="background-image: url('<?php echo $images1; ?>');"></div>
70
+ </div>
71
+
72
+ <?php elseif( get_field('select_grid') == '3' ): ?>
73
+
74
+ <div class="acfb_three-grid-style-<?php the_field('3_grid_layouts');?> acfb_collage_<?php the_field('select_grid');?> acfb_photo_collage">
75
+ <div class="acfb_one" style="background-image: url('<?php echo $images0; ?>');"></div>
76
+ <div class="acfb_two" style="background-image: url('<?php echo $images1; ?>');"></div>
77
+ <div class="acfb_three" style="background-image: url('<?php echo $images2; ?>');"></div>
78
+ </div>
79
+
80
+ <?php elseif( get_field('select_grid') == '4' ): ?>
81
+
82
+ <div class="acfb_four-grid-style-<?php the_field('4_grid_layouts');?> acfb_collage_<?php the_field('select_grid');?> acfb_photo_collage">
83
+ <div class="acfb_one" style="background-image: url('<?php echo $images0; ?>');"></div>
84
+ <div class="acfb_two" style="background-image: url('<?php echo $images1; ?>');"></div>
85
+ <div class="acfb_three" style="background-image: url('<?php echo $images2; ?>');"></div>
86
+ <div class="acfb_four" style="background-image: url('<?php echo $images3; ?>');"></div>
87
+ </div>
88
+
89
+ <?php endif; ?>
90
+
91
  </div><!-- Uid -->
acfblocks-templates/free/acfb-posts.php CHANGED
@@ -1,264 +1,264 @@
1
- <?php
2
- echo parse_link(
3
- array(
4
- get_field('acfb_post_title_typo'),
5
- get_field('acfb_post_meta_typo'),
6
- get_field('acfb_post_excerpt_typo'),
7
- get_field('acfb_post_button_typo')
8
- )
9
- );
10
-
11
- $acfb_post_button_padding = acfb_padding_name('acfb_post_button_padding');
12
- $acfb_post_padding = acfb_padding_name('acfb_post_padding');
13
- $acfb_post_margin = acfb_margin_name('acfb_post_margin');
14
- $acfb_post_title_typo = acfb_ffaimly_name('acfb_post_title_typo');
15
- $acfb_post_meta_typo = acfb_ffaimly_name('acfb_post_meta_typo');
16
- $acfb_post_excerpt_typo = acfb_ffaimly_name('acfb_post_excerpt_typo');
17
- $acfb_post_button_typo = acfb_ffaimly_name('acfb_post_button_typo');
18
-
19
-
20
- $uid = $block['id'];
21
-
22
- $className = 'acfb_posts_block';
23
- if( !empty($block['className']) ) {
24
- $className .= ' ' . $block['className'];
25
- }
26
- if( !empty($block['align']) ) {
27
- $className .= ' align' . $block['align'];
28
- }
29
-
30
- ?>
31
-
32
- <div class="<?php echo $uid; ?> <?php echo esc_attr($className); ?>">
33
-
34
- <?php
35
- $acfb_posts_layout = get_field('acfb_posts_layout');
36
- $acfb_number_of_posts = get_field('acfb_number_of_posts');
37
- $acfb_posts_columns = get_field('acfb_posts_columns');
38
- $acfb_post_excerpt_length = get_field('acfb_post_excerpt_length');
39
- $acfb_post_title_html_tag = get_field('acfb_post_title_html_tag');
40
- ?>
41
- <style type="text/css">
42
- .<?php echo $uid; ?> {
43
- <?php echo get_padding_field($acfb_post_padding); ?>
44
- <?php echo get_margin_field($acfb_post_margin); ?>
45
- }
46
-
47
- .<?php echo $uid; ?> .acfb_post {
48
- background: <?php the_field('acfb_post_background_color'); ?>;
49
- }
50
-
51
- <?php if( get_field('acfb_post_title_custom_typography') == '1' ): ?>
52
- .<?php echo $uid; ?> .acfb_post .acfb_post_title a{
53
- <?php echo get_typo_field($acfb_post_title_typo); ?>
54
- }
55
- <?php endif; ?>
56
-
57
- <?php if( get_field('acfb_post_title_custom_color') == '1' ): ?>
58
- .<?php echo $uid; ?> .acfb_post .acfb_post_title a{
59
- color: <?php the_field('acfb_post_title_color'); ?> !important;
60
- }
61
-
62
- .<?php echo $uid; ?> .acfb_post .acfb_post_title a:hover{
63
- color: <?php the_field('acfb_post_title_hover_color'); ?> !important;
64
- }
65
- <?php endif; ?>
66
-
67
-
68
- <?php if( get_field('acfb_post_meta_custom_typography') == '1' ): ?>
69
- .<?php echo $uid; ?> .acfb_post .acfb_post_meta{
70
- <?php echo get_typo_field($acfb_post_meta_typo); ?>
71
- }
72
- <?php endif; ?>
73
-
74
- <?php if( get_field('acfb_post_meta_custom_color') == '1' ): ?>
75
- .<?php echo $uid; ?> .acfb_post .acfb_post_meta{
76
- color: <?php the_field('acfb_post_meta_color'); ?>;
77
- }
78
- <?php endif; ?>
79
-
80
- <?php if( get_field('acfb_post_excerpt_custom_typography') == '1' ): ?>
81
- .<?php echo $uid; ?> .acfb_post .acfb_post_excerpt{
82
- <?php echo get_typo_field($acfb_post_excerpt_typo); ?>
83
- }
84
- <?php endif; ?>
85
-
86
- <?php if( get_field('acfb_post_excerpt_custom_color') == '1' ): ?>
87
- .<?php echo $uid; ?> .acfb_post .acfb_post_excerpt{
88
- color: <?php the_field('acfb_post_excerpt_color'); ?>;
89
- }
90
- <?php endif; ?>
91
-
92
-
93
- <?php if( get_field('acfb_post_button_custom_typography') == '1' ): ?>
94
- .<?php echo $uid; ?> .acfb_post .acfb_post_button a{
95
- <?php echo get_typo_field($acfb_post_button_typo); ?>
96
- }
97
- <?php endif; ?>
98
-
99
- <?php if( get_field('acfb_post_button_custom_color') == '1' ): ?>
100
- .<?php echo $uid; ?> .acfb_post .acfb_post_button a{
101
- background-color: <?php the_field('acfb_post_button_background_color'); ?>;
102
- color: <?php the_field('acfb_post_button_text_color'); ?> !important;
103
- padding-top: <?php echo $acfb_post_button_padding['padding_top']; ?>px;
104
- padding-bottom: <?php echo $acfb_post_button_padding['padding_bottom']; ?>px;
105
- padding-left: <?php echo $acfb_post_button_padding['padding_left']; ?>px;
106
- padding-right: <?php echo $acfb_post_button_padding['padding_right']; ?>px;
107
- }
108
-
109
- .<?php echo $uid; ?> .acfb_post .acfb_post_button a:hover{
110
- background-color: <?php the_field('acfb_post_button_background_hover_color'); ?>;
111
- color: <?php the_field('acfb_post_button_text_hover_color'); ?> !important;
112
- }
113
- <?php endif; ?>
114
- </style>
115
-
116
-
117
- <?php
118
-
119
- $acfb_grid_col = '';
120
- if($acfb_posts_layout == 'grid'){
121
- $acfb_grid_col = "acfb_post_" . $acfb_posts_columns;
122
- }
123
-
124
- $acfb_cat = get_field( 'acfb_category_filters' );
125
-
126
- $acfb_cat_names = array();
127
- if(is_array($acfb_cat)){
128
- foreach($acfb_cat as $catskey => $catsval){
129
- $acfb_cat_names[] = $catsval;
130
- }
131
- }
132
-
133
- $args = array(
134
- 'post_type' => 'post',
135
- 'post_status' => 'publish',
136
- 'posts_per_page' => $acfb_number_of_posts,
137
- 'cat' => $acfb_cat_names,
138
- );
139
-
140
-
141
- // the query
142
- $the_query = new WP_Query( $args ); ?>
143
-
144
- <?php if ( $the_query->have_posts() ) : ?>
145
-
146
- <div class="acfb_post_<?php echo $acfb_posts_layout; ?> <?php echo $acfb_grid_col; ?>">
147
-
148
- <?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
149
-
150
- <?php
151
- $acfb_thumb = '';
152
- if ( has_post_thumbnail() ){
153
- $acfb_thumb = 'thumb';
154
- } else {
155
- $acfb_thumb = 'no_thumb';
156
- }
157
- ?>
158
-
159
- <div class="acfb_post <?php echo $acfb_thumb; ?>">
160
-
161
- <?php
162
- if($acfb_posts_layout == 'list'){ ?>
163
-
164
- <!-- List -->
165
- <div class="acfb_post_list_thumbnail">
166
- <?php the_post_thumbnail(); ?>
167
- </div>
168
- <div class="acfb_post_list_content">
169
- <?php
170
- if( have_rows('acfb_post_list_elements') ):
171
-
172
- while ( have_rows('acfb_post_list_elements') ) : the_row(); ?>
173
-
174
- <?php if( get_row_layout() == 'post_list_title' ): ?>
175
- <div class="acfb_post_title">
176
- <<?php echo $acfb_post_title_html_tag; ?>><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></<?php echo $acfb_post_title_html_tag; ?>>
177
- </div>
178
- <?php endif; ?>
179
-
180
- <?php if( get_row_layout() == 'post_list_meta_data' ): ?>
181
- <div class="acfb_post_meta">
182
- <span class="acfb_post_author"><?php the_author(); ?></span> -
183
- <span class="acfb_post_date"><?php the_time('F jS, Y') ?></span>
184
- </div>
185
- <?php endif; ?>
186
-
187
- <?php if( get_row_layout() == 'post_list_content' ): ?>
188
- <div class="acfb_post_excerpt">
189
- <?php echo acfb_excerpt($acfb_post_excerpt_length); ?>
190
- </div>
191
- <?php endif; ?>
192
-
193
- <?php if( get_row_layout() == 'post_list_read_more_button' ): ?>
194
- <div class="acfb_post_button">
195
- <a href="<?php the_permalink(); ?>" class="acfb_post_btn">Read More</a>
196
- </div>
197
- <?php endif; ?>
198
-
199
-
200
- <?php
201
- endwhile;
202
- endif;
203
- ?>
204
- </div>
205
-
206
- <?php } elseif ($acfb_posts_layout == 'grid') { ?>
207
-
208
- <!-- Grid -->
209
- <?php
210
- if( have_rows('acfb_post_grid_elements') ):
211
-
212
- while ( have_rows('acfb_post_grid_elements') ) : the_row(); ?>
213
-
214
- <?php if( get_row_layout() == 'post_grid_image' ): ?>
215
- <div class="acfb_post_thumbnail">
216
- <?php the_post_thumbnail(); ?>
217
- </div>
218
- <?php endif; ?>
219
-
220
- <?php if( get_row_layout() == 'post_grid_title' ): ?>
221
- <div class="acfb_post_title">
222
- <<?php echo $acfb_post_title_html_tag; ?>><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></<?php echo $acfb_post_title_html_tag; ?>>
223
- </div>
224
- <?php endif; ?>
225
-
226
- <?php if( get_row_layout() == 'post_grid_meta_data' ): ?>
227
- <div class="acfb_post_meta">
228
- <span class="acfb_post_author"><?php the_author(); ?></span> -
229
- <span class="acfb_post_date"><?php the_time('F jS, Y') ?></span>
230
- </div>
231
- <?php endif; ?>
232
-
233
- <?php if( get_row_layout() == 'post_grid_content' ): ?>
234
- <div class="acfb_post_excerpt">
235
- <?php echo acfb_excerpt($acfb_post_excerpt_length); ?>
236
- </div>
237
- <?php endif; ?>
238
-
239
- <?php if( get_row_layout() == 'post_grid_read_more_button' ): ?>
240
- <div class="acfb_post_button">
241
- <a href="<?php the_permalink(); ?>" class="acfb_post_btn">Read More</a>
242
- </div>
243
- <?php endif; ?>
244
-
245
-
246
- <?php
247
- endwhile;
248
- endif;
249
- ?>
250
-
251
- <?php } ?>
252
-
253
- </div>
254
- <?php endwhile; ?>
255
-
256
- </div>
257
-
258
- <?php wp_reset_postdata(); ?>
259
-
260
- <?php else : ?>
261
- <p><?php esc_html_e( 'Sorry, no posts matched your criteria.' ); ?></p>
262
- <?php endif; ?>
263
-
264
  </div><!-- Uid -->
1
+ <?php
2
+ echo parse_link(
3
+ array(
4
+ get_field('acfb_post_title_typo'),
5
+ get_field('acfb_post_meta_typo'),
6
+ get_field('acfb_post_excerpt_typo'),
7
+ get_field('acfb_post_button_typo')
8
+ )
9
+ );
10
+
11
+ $acfb_post_button_padding = acfb_padding_name('acfb_post_button_padding');
12
+ $acfb_post_padding = acfb_padding_name('acfb_post_padding');
13
+ $acfb_post_margin = acfb_margin_name('acfb_post_margin');
14
+ $acfb_post_title_typo = acfb_ffaimly_name('acfb_post_title_typo');
15
+ $acfb_post_meta_typo = acfb_ffaimly_name('acfb_post_meta_typo');
16
+ $acfb_post_excerpt_typo = acfb_ffaimly_name('acfb_post_excerpt_typo');
17
+ $acfb_post_button_typo = acfb_ffaimly_name('acfb_post_button_typo');
18
+
19
+
20
+ $uid = $block['id'];
21
+
22
+ $className = 'acfb_posts_block';
23
+ if( !empty($block['className']) ) {
24
+ $className .= ' ' . $block['className'];
25
+ }
26
+ if( !empty($block['align']) ) {
27
+ $className .= ' align' . $block['align'];
28
+ }
29
+
30
+ ?>
31
+
32
+ <div class="<?php echo $uid; ?> <?php echo esc_attr($className); ?>">
33
+
34
+ <?php
35
+ $acfb_posts_layout = get_field('acfb_posts_layout');
36
+ $acfb_number_of_posts = get_field('acfb_number_of_posts');
37
+ $acfb_posts_columns = get_field('acfb_posts_columns');
38
+ $acfb_post_excerpt_length = get_field('acfb_post_excerpt_length');
39
+ $acfb_post_title_html_tag = get_field('acfb_post_title_html_tag');
40
+ ?>
41
+ <style type="text/css">
42
+ .<?php echo $uid; ?> {
43
+ <?php echo get_padding_field($acfb_post_padding); ?>
44
+ <?php echo get_margin_field($acfb_post_margin); ?>
45
+ }
46
+
47
+ .<?php echo $uid; ?> .acfb_post {
48
+ background: <?php the_field('acfb_post_background_color'); ?>;
49
+ }
50
+
51
+ <?php if( get_field('acfb_post_title_custom_typography') == '1' ): ?>
52
+ .<?php echo $uid; ?> .acfb_post .acfb_post_title a{
53
+ <?php echo get_typo_field($acfb_post_title_typo); ?>
54
+ }
55
+ <?php endif; ?>
56
+
57
+ <?php if( get_field('acfb_post_title_custom_color') == '1' ): ?>
58
+ .<?php echo $uid; ?> .acfb_post .acfb_post_title a{
59
+ color: <?php the_field('acfb_post_title_color'); ?> !important;
60
+ }
61
+
62
+ .<?php echo $uid; ?> .acfb_post .acfb_post_title a:hover{
63
+ color: <?php the_field('acfb_post_title_hover_color'); ?> !important;
64
+ }
65
+ <?php endif; ?>
66
+
67
+
68
+ <?php if( get_field('acfb_post_meta_custom_typography') == '1' ): ?>
69
+ .<?php echo $uid; ?> .acfb_post .acfb_post_meta{
70
+ <?php echo get_typo_field($acfb_post_meta_typo); ?>
71
+ }
72
+ <?php endif; ?>
73
+
74
+ <?php if( get_field('acfb_post_meta_custom_color') == '1' ): ?>
75
+ .<?php echo $uid; ?> .acfb_post .acfb_post_meta{
76
+ color: <?php the_field('acfb_post_meta_color'); ?>;
77
+ }
78
+ <?php endif; ?>
79
+
80
+ <?php if( get_field('acfb_post_excerpt_custom_typography') == '1' ): ?>
81
+ .<?php echo $uid; ?> .acfb_post .acfb_post_excerpt{
82
+ <?php echo get_typo_field($acfb_post_excerpt_typo); ?>
83
+ }
84
+ <?php endif; ?>
85
+
86
+ <?php if( get_field('acfb_post_excerpt_custom_color') == '1' ): ?>
87
+ .<?php echo $uid; ?> .acfb_post .acfb_post_excerpt{
88
+ color: <?php the_field('acfb_post_excerpt_color'); ?>;
89
+ }
90
+ <?php endif; ?>
91
+
92
+
93
+ <?php if( get_field('acfb_post_button_custom_typography') == '1' ): ?>
94
+ .<?php echo $uid; ?> .acfb_post .acfb_post_button a{
95
+ <?php echo get_typo_field($acfb_post_button_typo); ?>
96
+ }
97
+ <?php endif; ?>
98
+
99
+ <?php if( get_field('acfb_post_button_custom_color') == '1' ): ?>
100
+ .<?php echo $uid; ?> .acfb_post .acfb_post_button a{
101
+ background-color: <?php the_field('acfb_post_button_background_color'); ?>;
102
+ color: <?php the_field('acfb_post_button_text_color'); ?> !important;
103
+ padding-top: <?php echo $acfb_post_button_padding['padding_top']; ?>px;
104
+ padding-bottom: <?php echo $acfb_post_button_padding['padding_bottom']; ?>px;
105
+ padding-left: <?php echo $acfb_post_button_padding['padding_left']; ?>px;
106
+ padding-right: <?php echo $acfb_post_button_padding['padding_right']; ?>px;
107
+ }
108
+
109
+ .<?php echo $uid; ?> .acfb_post .acfb_post_button a:hover{
110
+ background-color: <?php the_field('acfb_post_button_background_hover_color'); ?>;
111
+ color: <?php the_field('acfb_post_button_text_hover_color'); ?> !important;
112
+ }
113
+ <?php endif; ?>
114
+ </style>
115
+
116
+
117
+ <?php
118
+
119
+ $acfb_grid_col = '';
120
+ if($acfb_posts_layout == 'grid'){
121
+ $acfb_grid_col = "acfb_post_" . $acfb_posts_columns;
122
+ }
123
+
124
+ $acfb_cat = get_field( 'acfb_category_filters' );
125
+
126
+ $acfb_cat_names = array();
127
+ if(is_array($acfb_cat)){
128
+ foreach($acfb_cat as $catskey => $catsval){
129
+ $acfb_cat_names[] = $catsval;
130
+ }
131
+ }
132
+
133
+ $args = array(
134
+ 'post_type' => 'post',
135
+ 'post_status' => 'publish',
136
+ 'posts_per_page' => $acfb_number_of_posts,
137
+ 'cat' => $acfb_cat_names,
138
+ );
139
+
140
+
141
+ // the query
142
+ $the_query = new WP_Query( $args ); ?>
143
+
144
+ <?php if ( $the_query->have_posts() ) : ?>
145
+
146
+ <div class="acfb_post_<?php echo $acfb_posts_layout; ?> <?php echo $acfb_grid_col; ?>">
147
+
148
+ <?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
149
+
150
+ <?php
151
+ $acfb_thumb = '';
152
+ if ( has_post_thumbnail() ){
153
+ $acfb_thumb = 'thumb';
154
+ } else {
155
+ $acfb_thumb = 'no_thumb';
156
+ }
157
+ ?>
158
+
159
+ <div class="acfb_post <?php echo $acfb_thumb; ?>">
160
+
161
+ <?php
162
+ if($acfb_posts_layout == 'list'){ ?>
163
+
164
+ <!-- List -->
165
+ <div class="acfb_post_list_thumbnail">
166
+ <?php the_post_thumbnail(); ?>
167
+ </div>
168
+ <div class="acfb_post_list_content">
169
+ <?php
170
+ if( have_rows('acfb_post_list_elements') ):
171
+
172
+ while ( have_rows('acfb_post_list_elements') ) : the_row(); ?>
173
+
174
+ <?php if( get_row_layout() == 'post_list_title' ): ?>
175
+ <div class="acfb_post_title">
176
+ <<?php echo $acfb_post_title_html_tag; ?>><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></<?php echo $acfb_post_title_html_tag; ?>>
177
+ </div>
178
+ <?php endif; ?>
179
+
180
+ <?php if( get_row_layout() == 'post_list_meta_data' ): ?>
181
+ <div class="acfb_post_meta">
182
+ <span class="acfb_post_author"><?php the_author(); ?></span> -
183
+ <span class="acfb_post_date"><?php the_time('F jS, Y') ?></span>
184
+ </div>
185
+ <?php endif; ?>
186
+
187
+ <?php if( get_row_layout() == 'post_list_content' ): ?>
188
+ <div class="acfb_post_excerpt">
189
+ <?php echo acfb_excerpt($acfb_post_excerpt_length); ?>
190
+ </div>
191
+ <?php endif; ?>
192
+
193
+ <?php if( get_row_layout() == 'post_list_read_more_button' ): ?>
194
+ <div class="acfb_post_button">
195
+ <a href="<?php the_permalink(); ?>" class="acfb_post_btn">Read More</a>
196
+ </div>
197
+ <?php endif; ?>
198
+
199
+
200
+ <?php
201
+ endwhile;
202
+ endif;
203
+ ?>
204
+ </div>
205
+
206
+ <?php } elseif ($acfb_posts_layout == 'grid') { ?>
207
+
208
+ <!-- Grid -->
209
+ <?php
210
+ if( have_rows('acfb_post_grid_elements') ):
211
+
212
+ while ( have_rows('acfb_post_grid_elements') ) : the_row(); ?>
213
+
214
+ <?php if( get_row_layout() == 'post_grid_image' ): ?>
215
+ <div class="acfb_post_thumbnail">
216
+ <?php the_post_thumbnail(); ?>
217
+ </div>
218
+ <?php endif; ?>
219
+
220
+ <?php if( get_row_layout() == 'post_grid_title' ): ?>
221
+ <div class="acfb_post_title">
222
+ <<?php echo $acfb_post_title_html_tag; ?>><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></<?php echo $acfb_post_title_html_tag; ?>>
223
+ </div>
224
+ <?php endif; ?>
225
+
226
+ <?php if( get_row_layout() == 'post_grid_meta_data' ): ?>
227
+ <div class="acfb_post_meta">
228
+ <span class="acfb_post_author"><?php the_author(); ?></span> -
229
+ <span class="acfb_post_date"><?php the_time('F jS, Y') ?></span>
230
+ </div>
231
+ <?php endif; ?>
232
+
233
+ <?php if( get_row_layout() == 'post_grid_content' ): ?>
234
+ <div class="acfb_post_excerpt">
235
+ <?php echo acfb_excerpt($acfb_post_excerpt_length); ?>
236
+ </div>
237
+ <?php endif; ?>
238
+
239
+ <?php if( get_row_layout() == 'post_grid_read_more_button' ): ?>
240
+ <div class="acfb_post_button">
241
+ <a href="<?php the_permalink(); ?>" class="acfb_post_btn">Read More</a>
242
+ </div>
243
+ <?php endif; ?>
244
+
245
+
246
+ <?php
247
+ endwhile;
248
+ endif;
249
+ ?>
250
+
251
+ <?php } ?>
252
+
253
+ </div>
254
+ <?php endwhile; ?>
255
+
256
+ </div>
257
+
258
+ <?php wp_reset_postdata(); ?>
259
+
260
+ <?php else : ?>
261
+ <p><?php esc_html_e( 'Sorry, no posts matched your criteria.' ); ?></p>
262
+ <?php endif; ?>
263
+
264
  </div><!-- Uid -->
acfblocks-templates/free/acfb-pricelist.php CHANGED
@@ -1,116 +1,116 @@
1
- <?php
2
- echo parse_link(
3
- array(
4
- get_field('acfb_price_list_title_typo'),
5
- get_field('acfb_price_list_description_typo')
6
- )
7
- );
8
-
9
-
10
- $acfb_price_list_padding = acfb_padding_name('acfb_price_list_padding');
11
- $acfb_price_list_margin = acfb_margin_name('acfb_price_list_margin');
12
- $acfb_price_list_title_typo = acfb_ffaimly_name('acfb_price_list_title_typo');
13
- $acfb_price_list_description_typo = acfb_ffaimly_name('acfb_price_list_description_typo');
14
-
15
- $uid = $block['id'];
16
-
17
- $className = 'acfb_price_list_block';
18
- if( !empty($block['className']) ) {
19
- $className .= ' ' . $block['className'];
20
- }
21
- if( !empty($block['align']) ) {
22
- $className .= ' align' . $block['align'];
23
- }
24
-
25
- ?>
26
- <div class="<?php echo $uid; ?> <?php echo esc_attr($className); ?>">
27
- <style type="text/css">
28
- .<?php echo $uid; ?> {
29
- <?php echo get_padding_field($acfb_price_list_padding); ?>
30
- <?php echo get_margin_field($acfb_price_list_margin); ?>
31
- }
32
-
33
- <?php if(get_field('acfb_price_list_image_position') == 'acfb_price_list_image_top'): ?>
34
- .<?php echo $uid; ?> .acfb_price_list_wrap .acfb_price_list_item{
35
- grid-template-areas: 'acfbPli' 'acfbPlt';
36
- }
37
-
38
- .<?php echo $uid; ?> .acfb_price_list_wrap .acfb_price_list_item .acfb_price_list_text{
39
- margin-top: 10px;
40
- }
41
-
42
- .<?php echo $uid; ?> .acfb_price_list_wrap .acfb_price_list_item .acfb_price_list_text .acfb_price_list_header{
43
- grid-template-areas: 'acfbPlTitle acfbPlSep acfbPlPrice';
44
- }
45
-
46
- <?php elseif(get_field('acfb_price_list_image_position') == 'acfb_price_list_image_left'): ?>
47
- .<?php echo $uid; ?> .acfb_price_list_wrap .acfb_price_list_item{
48
- grid-template-columns: 20% auto;
49
- grid-template-areas: 'acfbPli acfbPlt';
50
- }
51
-
52
- .<?php echo $uid; ?> .acfb_price_list_wrap .acfb_price_list_item .acfb_price_list_text .acfb_price_list_header{
53
- grid-template-areas: 'acfbPlTitle acfbPlSep acfbPlPrice';
54
- }
55
-
56
- <?php elseif(get_field('acfb_price_list_image_position') == 'acfb_price_list_image_right'): ?>
57
- .<?php echo $uid; ?> .acfb_price_list_wrap .acfb_price_list_item{
58
- grid-template-columns: auto 20%;
59
- grid-template-areas: 'acfbPlt acfbPli';
60
- }
61
-
62
- .<?php echo $uid; ?> .acfb_price_list_wrap .acfb_price_list_item .acfb_price_list_text .acfb_price_list_header{
63
- grid-template-areas: 'acfbPlPrice acfbPlSep acfbPlTitle';
64
- }
65
-
66
- .<?php echo $uid; ?> .acfb_price_list_wrap .acfb_price_list_item .acfb_price_list_text{
67
- text-align: right;
68
- }
69
- <?php endif; ?>
70
-
71
- .<?php echo $uid; ?> .acfb_price_list_wrap .acfb_price_list_item .acfb_price_list_text .acfb_price_list_header{
72
- color: <?php the_field('acfb_price_list_title_&_price_color'); ?>;
73
- <?php echo get_typo_field($acfb_price_list_title_typo); ?>
74
- }
75
-
76
- .<?php echo $uid; ?> .acfb_price_list_wrap .acfb_price_list_item .acfb_price_list_text .acfb_price_list_header .acfb_price_list_separator {
77
- border-bottom-style: <?php the_field('acfb_price_list_separator_styles'); ?>;
78
- border-bottom-width: <?php the_field('acfb_price_list_separator_size'); ?>px;
79
- border-bottom-color: <?php the_field('acfb_price_list_separator_color'); ?>;
80
-
81
- }
82
-
83
- .<?php echo $uid; ?> .acfb_price_list_wrap .acfb_price_list_item .acfb_price_list_text p.acfb_price_list_description {
84
- color: <?php the_field('acfb_price_list_description_color'); ?>;
85
- <?php echo get_typo_field($acfb_price_list_description_typo); ?>
86
- }
87
-
88
- </style>
89
-
90
-
91
- <?php
92
- $acfb_image = '';
93
- if(!get_field('acfb_price_list_image')){
94
- $acfb_image = plugins_url() . '/acf-blocks/img/placeholder-image.jpg';
95
- } else{
96
- $acfb_image = get_field('acfb_price_list_image');
97
- }
98
- ?>
99
-
100
- <div class="acfb_price_list_wrap">
101
- <a href="<?php the_field('acfb_price_list_link'); ?>" class="acfb_price_list_item">
102
- <div class="acfb_price_list_image">
103
- <img src="<?php echo $acfb_image; ?>" alt="<?php the_field('acfb_price_list_image_alt'); ?>">
104
- </div>
105
- <div class="acfb_price_list_text">
106
- <div class="acfb_price_list_header">
107
- <span class="acfb_price_list_title"><?php the_field('acfb_price_list_title'); ?></span>
108
- <span class="acfb_price_list_separator"></span>
109
- <span class="acfb_price_list_price"><?php the_field('acfb_price_list_price_prefix'); ?><?php the_field('acfb_price_list_price'); ?></span>
110
- </div>
111
- <p class="acfb_price_list_description"><?php the_field('acfb_price_list_description'); ?></p>
112
- </div>
113
- </a>
114
- </div>
115
-
116
  </div><!-- Uid -->
1
+ <?php
2
+ echo parse_link(
3
+ array(
4
+ get_field('acfb_price_list_title_typo'),
5
+ get_field('acfb_price_list_description_typo')
6
+ )
7
+ );
8
+
9
+
10
+ $acfb_price_list_padding = acfb_padding_name('acfb_price_list_padding');
11
+ $acfb_price_list_margin = acfb_margin_name('acfb_price_list_margin');
12
+ $acfb_price_list_title_typo = acfb_ffaimly_name('acfb_price_list_title_typo');
13
+ $acfb_price_list_description_typo = acfb_ffaimly_name('acfb_price_list_description_typo');
14
+
15
+ $uid = $block['id'];
16
+
17
+ $className = 'acfb_price_list_block';
18
+ if( !empty($block['className']) ) {
19
+ $className .= ' ' . $block['className'];
20
+ }
21
+ if( !empty($block['align']) ) {
22
+ $className .= ' align' . $block['align'];
23
+ }
24
+
25
+ ?>
26
+ <div class="<?php echo $uid; ?> <?php echo esc_attr($className); ?>">
27
+ <style type="text/css">
28
+ .<?php echo $uid; ?> {
29
+ <?php echo get_padding_field($acfb_price_list_padding); ?>
30
+ <?php echo get_margin_field($acfb_price_list_margin); ?>
31
+ }
32
+
33
+ <?php if(get_field('acfb_price_list_image_position') == 'acfb_price_list_image_top'): ?>
34
+ .<?php echo $uid; ?> .acfb_price_list_wrap .acfb_price_list_item{
35
+ grid-template-areas: 'acfbPli' 'acfbPlt';
36
+ }
37
+
38
+ .<?php echo $uid; ?> .acfb_price_list_wrap .acfb_price_list_item .acfb_price_list_text{
39
+ margin-top: 10px;
40
+ }
41
+
42
+ .<?php echo $uid; ?> .acfb_price_list_wrap .acfb_price_list_item .acfb_price_list_text .acfb_price_list_header{
43
+ grid-template-areas: 'acfbPlTitle acfbPlSep acfbPlPrice';
44
+ }
45
+
46
+ <?php elseif(get_field('acfb_price_list_image_position') == 'acfb_price_list_image_left'): ?>
47
+ .<?php echo $uid; ?> .acfb_price_list_wrap .acfb_price_list_item{
48
+ grid-template-columns: 20% auto;
49
+ grid-template-areas: 'acfbPli acfbPlt';
50
+ }
51
+
52
+ .<?php echo $uid; ?> .acfb_price_list_wrap .acfb_price_list_item .acfb_price_list_text .acfb_price_list_header{
53
+ grid-template-areas: 'acfbPlTitle acfbPlSep acfbPlPrice';
54
+ }
55
+
56
+ <?php elseif(get_field('acfb_price_list_image_position') == 'acfb_price_list_image_right'): ?>
57
+ .<?php echo $uid; ?> .acfb_price_list_wrap .acfb_price_list_item{
58
+ grid-template-columns: auto 20%;
59
+ grid-template-areas: 'acfbPlt acfbPli';
60
+ }
61
+
62
+ .<?php echo $uid; ?> .acfb_price_list_wrap .acfb_price_list_item .acfb_price_list_text .acfb_price_list_header{
63
+ grid-template-areas: 'acfbPlPrice acfbPlSep acfbPlTitle';
64
+ }
65
+
66
+ .<?php echo $uid; ?> .acfb_price_list_wrap .acfb_price_list_item .acfb_price_list_text{
67
+ text-align: right;
68
+ }
69
+ <?php endif; ?>
70
+
71
+ .<?php echo $uid; ?> .acfb_price_list_wrap .acfb_price_list_item .acfb_price_list_text .acfb_price_list_header{
72
+ color: <?php the_field('acfb_price_list_title_&_price_color'); ?>;
73
+ <?php echo get_typo_field($acfb_price_list_title_typo); ?>
74
+ }
75
+
76
+ .<?php echo $uid; ?> .acfb_price_list_wrap .acfb_price_list_item .acfb_price_list_text .acfb_price_list_header .acfb_price_list_separator {
77
+ border-bottom-style: <?php the_field('acfb_price_list_separator_styles'); ?>;
78
+ border-bottom-width: <?php the_field('acfb_price_list_separator_size'); ?>px;
79
+ border-bottom-color: <?php the_field('acfb_price_list_separator_color'); ?>;
80
+
81
+ }
82
+
83
+ .<?php echo $uid; ?> .acfb_price_list_wrap .acfb_price_list_item .acfb_price_list_text p.acfb_price_list_description {
84
+ color: <?php the_field('acfb_price_list_description_color'); ?>;
85
+ <?php echo get_typo_field($acfb_price_list_description_typo); ?>
86
+ }
87
+
88
+ </style>
89
+
90
+
91
+ <?php
92
+ $acfb_image = '';
93
+ if(!get_field('acfb_price_list_image')){
94
+ $acfb_image = plugins_url() . '/acf-blocks/img/placeholder-image.jpg';
95
+ } else{
96
+ $acfb_image = get_field('acfb_price_list_image');
97
+ }
98
+ ?>
99
+
100
+ <div class="acfb_price_list_wrap">
101
+ <a href="<?php the_field('acfb_price_list_link'); ?>" class="acfb_price_list_item">
102
+ <div class="acfb_price_list_image">
103
+ <img src="<?php echo $acfb_image; ?>" alt="<?php the_field('acfb_price_list_image_alt'); ?>">
104
+ </div>
105
+ <div class="acfb_price_list_text">
106
+ <div class="acfb_price_list_header">
107
+ <span class="acfb_price_list_title"><?php the_field('acfb_price_list_title'); ?></span>
108
+ <span class="acfb_price_list_separator"></span>
109
+ <span class="acfb_price_list_price"><?php the_field('acfb_price_list_price_prefix'); ?><?php the_field('acfb_price_list_price'); ?></span>
110
+ </div>
111
+ <p class="acfb_price_list_description"><?php the_field('acfb_price_list_description'); ?></p>
112
+ </div>
113
+ </a>
114
+ </div>
115
+
116
  </div><!-- Uid -->
acfblocks-templates/free/acfb-pricingbox.php CHANGED
@@ -1,152 +1,152 @@
1
- <?php
2
- echo parse_link(
3
- array(
4
- get_field('acfb_pricingbox_title_typo'),
5
- get_field('acfb_pricingbox_prefix_typo'),
6
- get_field('acfb_pricingbox_price_typo'),
7
- get_field('acfb_pricingbox_suffix_typo'),
8
- get_field('acfb_pricingbox_subtext_typo'),
9
- get_field('acfb_pricingbox_button_typo'),
10
- get_field('acfb_pricingbox_description_typo')
11
- )
12
- );
13
-
14
-
15
- $acfb_pricingbox_inner_padding = acfb_padding_name('acfb_pricingbox_inner_padding');
16
- $acfb_pricingbox_inner_button_padding = acfb_padding_name('acfb_pricingbox_inner_button_padding');
17
- $acfb_pricingbox_padding = acfb_padding_name('acfb_pricingbox_padding');
18
- $acfb_pricingbox_margin = acfb_margin_name('acfb_pricingbox_margin');
19
- $acfb_pricingbox_title_typo = acfb_ffaimly_name('acfb_pricingbox_title_typo');
20
- $acfb_pricingbox_prefix_typo = acfb_ffaimly_name('acfb_pricingbox_prefix_typo');
21
- $acfb_pricingbox_price_typo = acfb_ffaimly_name('acfb_pricingbox_price_typo');
22
- $acfb_pricingbox_suffix_typo = acfb_ffaimly_name('acfb_pricingbox_suffix_typo');
23
- $acfb_pricingbox_subtext_typo = acfb_ffaimly_name('acfb_pricingbox_subtext_typo');
24
- $acfb_pricingbox_button_typo = acfb_ffaimly_name('acfb_pricingbox_button_typo');
25
- $acfb_pricingbox_description_typo = acfb_ffaimly_name('acfb_pricingbox_description_typo');
26
-
27
-
28
- $uid = $block['id'];
29
-
30
- $className = 'acfb_pricing_table_block';
31
- if( !empty($block['className']) ) {
32
- $className .= ' ' . $block['className'];
33
- }
34
- if( !empty($block['align']) ) {
35
- $className .= ' align' . $block['align'];
36
- }
37
-
38
- ?>
39
- <div class="<?php echo $uid; ?> <?php echo esc_attr($className); ?>">
40
- <style type="text/css">
41
- .<?php echo $uid; ?> {
42
- <?php echo get_padding_field($acfb_pricingbox_padding); ?>
43
- <?php echo get_margin_field($acfb_pricingbox_margin); ?>
44
- }
45
-
46
- .<?php echo $uid; ?> .acfb_pricing_table_wrap{
47
- background-color: <?php the_field('acfb_pricingbox_background_color'); ?>;
48
- padding-top: <?php echo $acfb_pricingbox_inner_padding['padding_top']; ?>px;
49
- padding-bottom: <?php echo $acfb_pricingbox_inner_padding['padding_bottom']; ?>px;
50
- padding-left: <?php echo $acfb_pricingbox_inner_padding['padding_left']; ?>px;
51
- padding-right: <?php echo $acfb_pricingbox_inner_padding['padding_right']; ?>px;
52
- }
53
-
54
- .<?php echo $uid; ?> .acfb_pricing_table_wrap img{
55
- width: <?php the_field('acfb_pricingbox_image_size'); ?>%;
56
- }
57
-
58
- .<?php echo $uid; ?> h3.acfb_pricing_box_title{
59
- color: <?php the_field('acfb_pricingbox_title_color'); ?>;
60
- <?php echo get_typo_field($acfb_pricingbox_title_typo); ?>
61
- }
62
-
63
- .<?php echo $uid; ?> .acfb_pricing_box_price_line .acfb_pricing_box_price_prefix{
64
- color: <?php the_field('acfb_pricingbox_prefix_color'); ?>;
65
- <?php echo get_typo_field($acfb_pricingbox_prefix_typo); ?>
66
- }
67
-
68
- .<?php echo $uid; ?> .acfb_pricing_box_price_line .acfb_pricing_box_price{
69
- color: <?php the_field('acfb_pricingbox_price_color'); ?>;
70
- <?php echo get_typo_field($acfb_pricingbox_price_typo); ?>
71
- }
72
-
73
- .<?php echo $uid; ?> .acfb_pricing_box_price_line .acfb_pricing_box_price_suffix{
74
- color: <?php the_field('acfb_pricingbox_suffix_color'); ?>;
75
- <?php echo get_typo_field($acfb_pricingbox_suffix_typo); ?>
76
- }
77
-
78
- .<?php echo $uid; ?> .acfb_pricing_box_subprice{
79
- color: <?php the_field('acfb_pricingbox_subtext_color'); ?>;
80
- <?php echo get_typo_field($acfb_pricingbox_subtext_typo); ?>
81
- }
82
-
83
- .<?php echo $uid; ?> .acfb_pricing_box_button a{
84
- background-color: <?php the_field('acfb_pricingbox_button_background_color'); ?>;
85
- color: <?php the_field('acfb_pricingbox_button_text_color'); ?> !important;
86
- <?php echo get_typo_field($acfb_pricingbox_button_typo); ?>
87
- padding-top: <?php echo $acfb_pricingbox_inner_button_padding['padding_top']; ?>px;
88
- padding-bottom: <?php echo $acfb_pricingbox_inner_button_padding['padding_bottom']; ?>px;
89
- padding-left: <?php echo $acfb_pricingbox_inner_button_padding['padding_left']; ?>px;
90
- padding-right: <?php echo $acfb_pricingbox_inner_button_padding['padding_right']; ?>px;
91
- }
92
-
93
- .<?php echo $uid; ?> .acfb_pricing_box_button a:hover{
94
- background-color: <?php the_field('acfb_pricingbox_button_background_hover_color'); ?>;
95
- color: <?php the_field('acfb_pricingbox_button_text_hover_color'); ?> !important;
96
- }
97
-
98
- .<?php echo $uid; ?> .acfb_pricing_table_wrap .acfb_pricing_box_description{
99
- color: <?php the_field('acfb_pricingbox_description_color'); ?>;
100
- <?php echo get_typo_field($acfb_pricingbox_description_typo); ?>
101
- }
102
- </style>
103
-
104
- <div class="acfb_pricing_table_wrap">
105
-
106
- <?php if(get_field('acfb_pricingbox_image')): ?>
107
- <img src="<?php the_field('acfb_pricingbox_image'); ?>" alt="<?php the_field('acfb_pricingbox_image_alt'); ?>" class="acfb_pricing_table_imgicon">
108
- <?php endif; ?>
109
-
110
- <?php if(get_field('acfb_pricingbox_title')): ?>
111
- <h3 class="acfb_pricing_box_title"><?php the_field('acfb_pricingbox_title'); ?></h3>
112
- <?php endif; ?>
113
-
114
- <?php if(get_field('acfb_pricingbox_price_prefix') || get_field('acfb_pricingbox_price') || get_field('acfb_pricingbox_price_suffix') || get_field('acfb_pricingbox_sub_text') ): ?>
115
- <div class="acfb_pricing_box_price_wrapper">
116
-
117
- <?php if(get_field('acfb_pricingbox_price_prefix') || get_field('acfb_pricingbox_price') || get_field('acfb_pricingbox_price_suffix')): ?>
118
- <div class="acfb_pricing_box_price_line">
119
- <?php if(get_field('acfb_pricingbox_price_prefix')): ?>
120
- <span class="acfb_pricing_box_price_prefix"><?php the_field('acfb_pricingbox_price_prefix'); ?></span>
121
- <?php endif; ?>
122
-
123
- <?php if(get_field('acfb_pricingbox_price')): ?>
124
- <span class="acfb_pricing_box_price"><?php the_field('acfb_pricingbox_price'); ?></span>
125
- <?php endif; ?>
126
-
127
- <?php if(get_field('acfb_pricingbox_price_suffix')): ?>
128
- <span class="acfb_pricing_box_price_suffix"><?php the_field('acfb_pricingbox_price_suffix'); ?></span>
129
- <?php endif; ?>
130
- </div>
131
- <?php endif; ?>
132
-
133
- <?php if(get_field('acfb_pricingbox_sub_text')): ?>
134
- <span class="acfb_pricing_box_subprice"><?php the_field('acfb_pricingbox_sub_text'); ?></span>
135
- <?php endif; ?>
136
- </div>
137
-
138
- <?php endif; ?>
139
-
140
- <?php if(get_field('acfb_pricingbox_description')): ?>
141
- <p class="acfb_pricing_box_description"><?php the_field('acfb_pricingbox_description'); ?></p>
142
- <?php endif; ?>
143
-
144
- <?php if(get_field('acfb_pricingbox_button_text')): ?>
145
- <div class="acfb_pricing_box_button">
146
- <a href="<?php the_field('acfb_pricingbox_button_url'); ?>"><?php the_field('acfb_pricingbox_button_text'); ?></a>
147
- </div>
148
- <?php endif; ?>
149
-
150
- </div>
151
-
152
  </div><!-- Uid -->
1
+ <?php
2
+ echo parse_link(
3
+ array(
4
+ get_field('acfb_pricingbox_title_typo'),
5
+ get_field('acfb_pricingbox_prefix_typo'),
6
+ get_field('acfb_pricingbox_price_typo'),
7
+ get_field('acfb_pricingbox_suffix_typo'),
8
+ get_field('acfb_pricingbox_subtext_typo'),
9
+ get_field('acfb_pricingbox_button_typo'),
10
+ get_field('acfb_pricingbox_description_typo')
11
+ )
12
+ );
13
+
14
+
15
+ $acfb_pricingbox_inner_padding = acfb_padding_name('acfb_pricingbox_inner_padding');
16
+ $acfb_pricingbox_inner_button_padding = acfb_padding_name('acfb_pricingbox_inner_button_padding');
17
+ $acfb_pricingbox_padding = acfb_padding_name('acfb_pricingbox_padding');
18
+ $acfb_pricingbox_margin = acfb_margin_name('acfb_pricingbox_margin');
19
+ $acfb_pricingbox_title_typo = acfb_ffaimly_name('acfb_pricingbox_title_typo');
20
+ $acfb_pricingbox_prefix_typo = acfb_ffaimly_name('acfb_pricingbox_prefix_typo');
21
+ $acfb_pricingbox_price_typo = acfb_ffaimly_name('acfb_pricingbox_price_typo');
22
+ $acfb_pricingbox_suffix_typo = acfb_ffaimly_name('acfb_pricingbox_suffix_typo');
23
+ $acfb_pricingbox_subtext_typo = acfb_ffaimly_name('acfb_pricingbox_subtext_typo');
24
+ $acfb_pricingbox_button_typo = acfb_ffaimly_name('acfb_pricingbox_button_typo');
25
+ $acfb_pricingbox_description_typo = acfb_ffaimly_name('acfb_pricingbox_description_typo');
26
+
27
+
28
+ $uid = $block['id'];
29
+
30
+ $className = 'acfb_pricing_table_block';
31
+ if( !empty($block['className']) ) {
32
+ $className .= ' ' . $block['className'];
33
+ }
34
+ if( !empty($block['align']) ) {
35
+ $className .= ' align' . $block['align'];
36
+ }
37
+
38
+ ?>
39
+ <div class="<?php echo $uid; ?> <?php echo esc_attr($className); ?>">
40
+ <style type="text/css">
41
+ .<?php echo $uid; ?> {
42
+ <?php echo get_padding_field($acfb_pricingbox_padding); ?>
43
+ <?php echo get_margin_field($acfb_pricingbox_margin); ?>
44
+ }
45
+
46
+ .<?php echo $uid; ?> .acfb_pricing_table_wrap{
47
+ background-color: <?php the_field('acfb_pricingbox_background_color'); ?>;
48
+ padding-top: <?php echo $acfb_pricingbox_inner_padding['padding_top']; ?>px;
49
+ padding-bottom: <?php echo $acfb_pricingbox_inner_padding['padding_bottom']; ?>px;
50
+ padding-left: <?php echo $acfb_pricingbox_inner_padding['padding_left']; ?>px;
51
+ padding-right: <?php echo $acfb_pricingbox_inner_padding['padding_right']; ?>px;
52
+ }
53
+
54
+ .<?php echo $uid; ?> .acfb_pricing_table_wrap img{
55
+ width: <?php the_field('acfb_pricingbox_image_size'); ?>%;
56
+ }
57
+
58
+ .<?php echo $uid; ?> h3.acfb_pricing_box_title{
59
+ color: <?php the_field('acfb_pricingbox_title_color'); ?>;
60
+ <?php echo get_typo_field($acfb_pricingbox_title_typo); ?>
61
+ }
62
+
63
+ .<?php echo $uid; ?> .acfb_pricing_box_price_line .acfb_pricing_box_price_prefix{
64
+ color: <?php the_field('acfb_pricingbox_prefix_color'); ?>;
65
+ <?php echo get_typo_field($acfb_pricingbox_prefix_typo); ?>
66
+ }
67
+
68
+ .<?php echo $uid; ?> .acfb_pricing_box_price_line .acfb_pricing_box_price{
69
+ color: <?php the_field('acfb_pricingbox_price_color'); ?>;
70
+ <?php echo get_typo_field($acfb_pricingbox_price_typo); ?>
71
+ }
72
+
73
+ .<?php echo $uid; ?> .acfb_pricing_box_price_line .acfb_pricing_box_price_suffix{
74
+ color: <?php the_field('acfb_pricingbox_suffix_color'); ?>;
75
+ <?php echo get_typo_field($acfb_pricingbox_suffix_typo); ?>
76
+ }
77
+
78
+ .<?php echo $uid; ?> .acfb_pricing_box_subprice{
79
+ color: <?php the_field('acfb_pricingbox_subtext_color'); ?>;
80
+ <?php echo get_typo_field($acfb_pricingbox_subtext_typo); ?>
81
+ }
82
+
83
+ .<?php echo $uid; ?> .acfb_pricing_box_button a{
84
+ background-color: <?php the_field('acfb_pricingbox_button_background_color'); ?>;
85
+ color: <?php the_field('acfb_pricingbox_button_text_color'); ?> !important;
86
+ <?php echo get_typo_field($acfb_pricingbox_button_typo); ?>
87
+ padding-top: <?php echo $acfb_pricingbox_inner_button_padding['padding_top']; ?>px;
88
+ padding-bottom: <?php echo $acfb_pricingbox_inner_button_padding['padding_bottom']; ?>px;
89
+ padding-left: <?php echo $acfb_pricingbox_inner_button_padding['padding_left']; ?>px;
90
+ padding-right: <?php echo $acfb_pricingbox_inner_button_padding['padding_right']; ?>px;
91
+ }
92
+
93
+ .<?php echo $uid; ?> .acfb_pricing_box_button a:hover{
94
+ background-color: <?php the_field('acfb_pricingbox_button_background_hover_color'); ?>;
95
+ color: <?php the_field('acfb_pricingbox_button_text_hover_color'); ?> !important;
96
+ }
97
+
98
+ .<?php echo $uid; ?> .acfb_pricing_table_wrap .acfb_pricing_box_description{
99
+ color: <?php the_field('acfb_pricingbox_description_color'); ?>;
100
+ <?php echo get_typo_field($acfb_pricingbox_description_typo); ?>
101
+ }
102
+ </style>
103
+
104
+ <div class="acfb_pricing_table_wrap">
105
+
106
+ <?php if(get_field('acfb_pricingbox_image')): ?>
107
+ <img src="<?php the_field('acfb_pricingbox_image'); ?>" alt="<?php the_field('acfb_pricingbox_image_alt'); ?>" class="acfb_pricing_table_imgicon">
108
+ <?php endif; ?>
109
+
110
+ <?php if(get_field('acfb_pricingbox_title')): ?>
111
+ <h3 class="acfb_pricing_box_title"><?php the_field('acfb_pricingbox_title'); ?></h3>
112
+ <?php endif; ?>
113
+
114
+ <?php if(get_field('acfb_pricingbox_price_prefix') || get_field('acfb_pricingbox_price') || get_field('acfb_pricingbox_price_suffix') || get_field('acfb_pricingbox_sub_text') ): ?>
115
+ <div class="acfb_pricing_box_price_wrapper">
116
+
117
+ <?php if(get_field('acfb_pricingbox_price_prefix') || get_field('acfb_pricingbox_price') || get_field('acfb_pricingbox_price_suffix')): ?>
118
+ <div class="acfb_pricing_box_price_line">
119
+ <?php if(get_field('acfb_pricingbox_price_prefix')): ?>
120
+ <span class="acfb_pricing_box_price_prefix"><?php the_field('acfb_pricingbox_price_prefix'); ?></span>
121
+ <?php endif; ?>
122
+
123
+ <?php if(get_field('acfb_pricingbox_price')): ?>
124
+ <span class="acfb_pricing_box_price"><?php the_field('acfb_pricingbox_price'); ?></span>
125
+ <?php endif; ?>
126
+
127
+ <?php if(get_field('acfb_pricingbox_price_suffix')): ?>
128
+ <span class="acfb_pricing_box_price_suffix"><?php the_field('acfb_pricingbox_price_suffix'); ?></span>
129
+ <?php endif; ?>
130
+ </div>
131
+ <?php endif; ?>
132
+
133
+ <?php if(get_field('acfb_pricingbox_sub_text')): ?>
134
+ <span class="acfb_pricing_box_subprice"><?php the_field('acfb_pricingbox_sub_text'); ?></span>
135
+ <?php endif; ?>
136
+ </div>
137
+
138
+ <?php endif; ?>
139
+
140
+ <?php if(get_field('acfb_pricingbox_description')): ?>
141
+ <p class="acfb_pricing_box_description"><?php the_field('acfb_pricingbox_description'); ?></p>
142
+ <?php endif; ?>
143
+
144
+ <?php if(get_field('acfb_pricingbox_button_text')): ?>
145
+ <div class="acfb_pricing_box_button">
146
+ <a href="<?php the_field('acfb_pricingbox_button_url'); ?>"><?php the_field('acfb_pricingbox_button_text'); ?></a>
147
+ </div>
148
+ <?php endif; ?>
149
+
150
+ </div>
151
+
152
  </div><!-- Uid -->
acfblocks-templates/free/acfb-progressbar.php CHANGED
@@ -1,62 +1,62 @@
1
- <?php
2
- echo parse_link(
3
- array(
4
- get_field('acfb_progressbar_text_typo'),
5
- get_field('acfb_progressbar_title_typo')
6
- )
7
- );
8
-
9
-
10
- $acfb_progressbar_padding = acfb_padding_name('acfb_progressbar_padding');
11
- $acfb_progressbar_margin = acfb_margin_name('acfb_progressbar_margin');
12
- $acfb_progressbar_text_typo = acfb_ffaimly_name('acfb_progressbar_text_typo');
13
- $acfb_progressbar_title_typo = acfb_ffaimly_name('acfb_progressbar_title_typo');
14
-
15
-
16
- $uid = $block['id'];
17
-
18
- $className = 'acfb_progress_bar_block';
19
- if( !empty($block['className']) ) {
20
- $className .= ' ' . $block['className'];
21
- }
22
- if( !empty($block['align']) ) {
23
- $className .= ' align' . $block['align'];
24
- }
25
-
26
- ?>
27
- <div class="<?php echo $uid; ?> <?php echo esc_attr($className); ?>">
28
- <style type="text/css">
29
- .<?php echo $uid; ?> {
30
- <?php echo get_padding_field($acfb_progressbar_padding); ?>
31
- <?php echo get_margin_field($acfb_progressbar_margin); ?>
32
- }
33
-
34
- .<?php echo $uid; ?> .acfb_progress_wrapper .acfb_inner_wrap{
35
- background-color: <?php the_field('acfb_progressbar_unactive_bg_color'); ?>;
36
- color: <?php the_field('acfb_progressbar_text_color'); ?>;
37
- }
38
-
39
- .<?php echo $uid; ?> .acfb_progress_wrapper .acfb_progress_bar_title{
40
- color: <?php the_field('acfb_progressbar_title_color'); ?>;
41
- <?php echo get_typo_field($acfb_progressbar_title_typo); ?>
42
- }
43
-
44
- .<?php echo $uid; ?> .acfb_progress_wrapper .acfb_progress_bar{
45
- background-color: <?php the_field('acfb_progressbar_bg_color'); ?>;
46
- <?php echo get_typo_field($acfb_progressbar_text_typo); ?>
47
- }
48
- </style>
49
-
50
- <div class="acfb_progress_wrapper">
51
- <span class="acfb_progress_bar_title"><?php the_field('acfb_progressbar_title'); ?></span>
52
- <div class="acfb_inner_wrap">
53
- <div class="acfb_progress_bar" style="width: <?php the_field('acfb_progressbar_percentage'); ?>%;">
54
- <span class="acfb_progress_text"><?php the_field('acfb_progressbar_inner_text'); ?></span>
55
- <?php if( '1' == get_field('acfb_progressbar_display_percentage') ): ?>
56
- <span class="acfb_progress_percentage"><?php the_field('acfb_progressbar_percentage'); ?>%</span>
57
- <?php endif; ?>
58
- </div>
59
- </div>
60
- </div>
61
-
62
  </div><!-- Uid -->
1
+ <?php
2
+ echo parse_link(
3
+ array(
4
+ get_field('acfb_progressbar_text_typo'),
5
+ get_field('acfb_progressbar_title_typo')
6
+ )
7
+ );
8
+
9
+
10
+ $acfb_progressbar_padding = acfb_padding_name('acfb_progressbar_padding');
11
+ $acfb_progressbar_margin = acfb_margin_name('acfb_progressbar_margin');
12
+ $acfb_progressbar_text_typo = acfb_ffaimly_name('acfb_progressbar_text_typo');
13
+ $acfb_progressbar_title_typo = acfb_ffaimly_name('acfb_progressbar_title_typo');
14
+
15
+
16
+ $uid = $block['id'];
17
+
18
+ $className = 'acfb_progress_bar_block';
19
+ if( !empty($block['className']) ) {
20
+ $className .= ' ' . $block['className'];
21
+ }
22
+ if( !empty($block['align']) ) {
23
+ $className .= ' align' . $block['align'];
24
+ }
25
+
26
+ ?>
27
+ <div class="<?php echo $uid; ?> <?php echo esc_attr($className); ?>">
28
+ <style type="text/css">
29
+ .<?php echo $uid; ?> {
30
+ <?php echo get_padding_field($acfb_progressbar_padding); ?>
31
+ <?php echo get_margin_field($acfb_progressbar_margin); ?>
32
+ }
33
+
34
+ .<?php echo $uid; ?> .acfb_progress_wrapper .acfb_inner_wrap{
35
+ background-color: <?php the_field('acfb_progressbar_unactive_bg_color'); ?>;
36
+ color: <?php the_field('acfb_progressbar_text_color'); ?>;
37
+ }
38
+
39
+ .<?php echo $uid; ?> .acfb_progress_wrapper .acfb_progress_bar_title{
40
+ color: <?php the_field('acfb_progressbar_title_color'); ?>;
41
+ <?php echo get_typo_field($acfb_progressbar_title_typo); ?>
42
+ }
43
+
44
+ .<?php echo $uid; ?> .acfb_progress_wrapper .acfb_progress_bar{
45
+ background-color: <?php the_field('acfb_progressbar_bg_color'); ?>;
46
+ <?php echo get_typo_field($acfb_progressbar_text_typo); ?>
47
+ }
48
+ </style>
49
+
50
+ <div class="acfb_progress_wrapper">
51
+ <span class="acfb_progress_bar_title"><?php the_field('acfb_progressbar_title'); ?></span>
52
+ <div class="acfb_inner_wrap">
53
+ <div class="acfb_progress_bar" style="width: <?php the_field('acfb_progressbar_percentage'); ?>%;">
54
+ <span class="acfb_progress_text"><?php the_field('acfb_progressbar_inner_text'); ?></span>
55
+ <?php if( '1' == get_field('acfb_progressbar_display_percentage') ): ?>
56
+ <span class="acfb_progress_percentage"><?php the_field('acfb_progressbar_percentage'); ?>%</span>
57
+ <?php endif; ?>
58
+ </div>
59
+ </div>
60
+ </div>
61
+
62
  </div><!-- Uid -->
acfblocks-templates/free/acfb-random-image.php CHANGED
@@ -1,50 +1,50 @@
1
- <?php
2
- $uid = $block['id'];
3
-
4
- $className = 'acfb_random_image_block';
5
- if( !empty($block['className']) ) {
6
- $className .= ' ' . $block['className'];
7
- }
8
- if( !empty($block['align']) ) {
9
- $className .= ' align' . $block['align'];
10
- }
11
-
12
- $placeholders = [
13
- 'https://p111.p2.n0.cdn.getcloudapp.com/items/RBuWl6Bk/Image%202020-10-16%20at%205.07.13%20PM.jpg',
14
- 'https://p111.p2.n0.cdn.getcloudapp.com/items/2Nujq1bx/Image%202020-10-16%20at%205.07.37%20PM.jpg',
15
- 'https://p111.p2.n0.cdn.getcloudapp.com/items/JrugDAyd/Image%202020-10-16%20at%205.07.31%20PM.jpg',
16
- 'https://p111.p2.n0.cdn.getcloudapp.com/items/ApuLz6eb/Image%202020-10-16%20at%205.07.23%20PM.jpgg',
17
- ];
18
-
19
- $acfb_random_image_margin = acfb_padding_name('acfb_random_image_margin');
20
- $acfb_random_image_padding = acfb_margin_name('acfb_random_image_padding');
21
- $acfb_random_image_gallery = get_field('acfb_random_images');
22
-
23
- $final_random_image_gallery = is_array($acfb_random_image_gallery) ? $acfb_random_image_gallery : $placeholders;
24
-
25
-
26
-
27
- ?>
28
- <div class="<?php echo $uid; ?> <?php echo esc_attr($className); ?>">
29
- <style type="text/css">
30
- .<?php echo $uid; ?>{
31
- <?php echo get_padding_field($acfb_random_image_padding); ?>
32
- <?php echo get_margin_field($acfb_random_image_margin); ?>
33
- }
34
-
35
- .<?php echo $uid; ?> .acfb_random_image{
36
- display: flex;
37
- justify-content: <?php the_field('acfb_random_image_alignment'); ?>;
38
- }
39
-
40
- .<?php echo $uid; ?> .acfb_random_image img{
41
- width: <?php the_field("acfb_random_image_width"); ?>%;
42
- }
43
-
44
- </style>
45
-
46
- <div class="acfb_random_image">
47
- <img src="" class="acfb_ri" data-random-image="<?php echo implode(',', $final_random_image_gallery); ?>" />
48
- </div>
49
-
50
  </div><!-- Uid -->
1
+ <?php
2
+ $uid = $block['id'];
3
+
4
+ $className = 'acfb_random_image_block';
5
+ if( !empty($block['className']) ) {
6
+ $className .= ' ' . $block['className'];
7
+ }
8
+ if( !empty($block['align']) ) {
9
+ $className .= ' align' . $block['align'];
10
+ }
11
+
12
+ $placeholders = [
13
+ 'https://p111.p2.n0.cdn.getcloudapp.com/items/RBuWl6Bk/Image%202020-10-16%20at%205.07.13%20PM.jpg',
14
+ 'https://p111.p2.n0.cdn.getcloudapp.com/items/2Nujq1bx/Image%202020-10-16%20at%205.07.37%20PM.jpg',
15
+ 'https://p111.p2.n0.cdn.getcloudapp.com/items/JrugDAyd/Image%202020-10-16%20at%205.07.31%20PM.jpg',
16
+ 'https://p111.p2.n0.cdn.getcloudapp.com/items/ApuLz6eb/Image%202020-10-16%20at%205.07.23%20PM.jpgg',
17
+ ];
18
+
19
+ $acfb_random_image_margin = acfb_padding_name('acfb_random_image_margin');
20
+ $acfb_random_image_padding = acfb_margin_name('acfb_random_image_padding');
21
+ $acfb_random_image_gallery = get_field('acfb_random_images');
22
+
23
+ $final_random_image_gallery = is_array($acfb_random_image_gallery) ? $acfb_random_image_gallery : $placeholders;
24
+
25
+
26
+
27
+ ?>
28
+ <div class="<?php echo $uid; ?> <?php echo esc_attr($className); ?>">
29
+ <style type="text/css">
30
+ .<?php echo $uid; ?>{
31
+ <?php echo get_padding_field($acfb_random_image_padding); ?>
32
+ <?php echo get_margin_field($acfb_random_image_margin); ?>
33
+ }
34
+
35
+ .<?php echo $uid; ?> .acfb_random_image{
36
+ display: flex;
37
+ justify-content: <?php the_field('acfb_random_image_alignment'); ?>;
38
+ }
39
+
40
+ .<?php echo $uid; ?> .acfb_random_image img{
41
+ width: <?php the_field("acfb_random_image_width"); ?>%;
42
+ }
43
+
44
+ </style>
45
+
46
+ <div class="acfb_random_image">
47
+ <img src="" class="acfb_ri" data-random-image="<?php echo implode(',', $final_random_image_gallery); ?>" />
48
+ </div>
49
+
50
  </div><!-- Uid -->
acfblocks-templates/free/acfb-scrollable-image.php CHANGED
@@ -1,43 +1,43 @@
1
- <?php
2
- $acfb_scrollable_image_padding = acfb_padding_name('acfb_scrollable_image_padding');
3
- $acfb_scrollable_image_margin = acfb_margin_name('acfb_scrollable_image_margin');
4
-
5
- $uid = $block['id'];
6
-
7
- $className = 'acfb_scrollable_image_block';
8
- if( !empty($block['className']) ) {
9
- $className .= ' ' . $block['className'];
10
- }
11
- if( !empty($block['align']) ) {
12
- $className .= ' align' . $block['align'];
13
- }
14
-
15
- ?>
16
- <div class="<?php echo $uid; ?> <?php echo esc_attr($className); ?>">
17
- <style type="text/css">
18
- .<?php echo $uid; ?>{
19
- <?php echo get_padding_field($acfb_scrollable_image_padding); ?>
20
- <?php echo get_margin_field($acfb_scrollable_image_margin); ?>
21
- }
22
-
23
- .<?php echo $uid; ?> .acfb_scrollable_image{
24
- min-height: <?php the_field('acfb_scrollable_image_height'); ?>px;
25
- }
26
-
27
- .<?php echo $uid; ?> .acfb_scrollable_image:hover{
28
- transition: background-position <?php the_field('acfb_scrollable_image_hover_scroll_speed'); ?>s linear 0s;
29
- }
30
- </style>
31
-
32
- <?php
33
- $acfb_image = '';
34
- if(!get_field('acfb_scrollable_image')){
35
- $acfb_image = plugins_url() . '/acf-blocks/img/placeholder-vertical.jpg';
36
- } else{
37
- $acfb_image = get_field('acfb_scrollable_image');
38
- }
39
- ?>
40
-
41
- <div class="acfb_scrollable_image" style="background-image: url('<?php echo $acfb_image; ?>')"></div>
42
-
43
  </div><!-- Uid -->
1
+ <?php
2
+ $acfb_scrollable_image_padding = acfb_padding_name('acfb_scrollable_image_padding');
3
+ $acfb_scrollable_image_margin = acfb_margin_name('acfb_scrollable_image_margin');
4
+
5
+ $uid = $block['id'];
6
+
7
+ $className = 'acfb_scrollable_image_block';
8
+ if( !empty($block['className']) ) {
9
+ $className .= ' ' . $block['className'];
10
+ }
11
+ if( !empty($block['align']) ) {
12
+ $className .= ' align' . $block['align'];
13
+ }
14
+
15
+ ?>
16
+ <div class="<?php echo $uid; ?> <?php echo esc_attr($className); ?>">
17
+ <style type="text/css">
18
+ .<?php echo $uid; ?>{
19
+ <?php echo get_padding_field($acfb_scrollable_image_padding); ?>
20
+ <?php echo get_margin_field($acfb_scrollable_image_margin); ?>
21
+ }
22
+
23
+ .<?php echo $uid; ?> .acfb_scrollable_image{
24
+ min-height: <?php the_field('acfb_scrollable_image_height'); ?>px;
25
+ }
26
+
27
+ .<?php echo $uid; ?> .acfb_scrollable_image:hover{
28
+ transition: background-position <?php the_field('acfb_scrollable_image_hover_scroll_speed'); ?>s linear 0s;
29
+ }
30
+ </style>
31
+
32
+ <?php
33
+ $acfb_image = '';
34
+ if(!get_field('acfb_scrollable_image')){
35
+ $acfb_image = plugins_url() . '/acf-blocks/img/placeholder-vertical.jpg';
36
+ } else{
37
+ $acfb_image = get_field('acfb_scrollable_image');
38
+ }
39
+ ?>
40
+
41
+ <div class="acfb_scrollable_image" style="background-image: url('<?php echo $acfb_image; ?>')"></div>
42
+
43
  </div><!-- Uid -->
acfblocks-templates/free/acfb-socialsharing.php CHANGED
@@ -1,114 +1,114 @@
1
- <?php
2
- echo parse_link(
3
- array(
4
- get_field('acfb_social_button_text_typo')
5
- )
6
- );
7
-
8
-
9
- $acfb_social_button_padding = acfb_padding_name('acfb_social_button_padding');
10
- $acfb_social_button_inner_padding = acfb_padding_name('acfb_social_button_inner_padding');
11
- $acfb_social_button_margin = acfb_margin_name('acfb_social_button_margin');
12
- $acfb_social_button_text_typo = acfb_ffaimly_name('acfb_social_button_text_typo');
13
-
14
-
15
- $uid = $block['id'];
16
- $acfb_permalink = get_permalink();
17
- $acfb_pagetitle = get_the_title();
18
-
19
- $className = 'acfb_social_sharing_main_block';
20
- if( !empty($block['className']) ) {
21
- $className .= ' ' . $block['className'];
22
- }
23
- if( !empty($block['align']) ) {
24
- $className .= ' align' . $block['align'];
25
- }
26
-
27
- $acfb_socialLinks = array();
28
- $acfb_socialNames = array();
29
- $acfb_socialpaths = array();
30
- array_push($acfb_socialLinks,"https://facebook.com/sharer/sharer.php?u={$acfb_permalink}","https://twitter.com/intent/tweet/?text={$acfb_pagetitle}&amp;url={$acfb_permalink}","mailto:?subject={$acfb_pagetitle}&amp;body={$acfb_permalink}","https://pinterest.com/pin/create/button/?url={$acfb_permalink}&amp;media=http%3A%2F%2Fsharingbuttons.io&amp;description={$acfb_pagetitle}.","https://www.linkedin.com/shareArticle?mini=true&amp;url={$acfb_permalink}&amp;title={$acfb_pagetitle}&amp;summary={$acfb_pagetitle}&amp;source={$acfb_permalink}","https://reddit.com/submit/?url={$acfb_permalink}&amp;resubmit=true&amp;title={$acfb_pagetitle}","https://www.xing.com/app/user?op=share;url={$acfb_permalink};title={$acfb_pagetitle}","whatsapp://send?text={$acfb_pagetitle}.{$acfb_permalink}","https://news.ycombinator.com/submitlink?u={$acfb_permalink}&amp;t={$acfb_pagetitle}","http://vk.com/share.php?title={$acfb_pagetitle}&amp;url={$acfb_permalink}","https://telegram.me/share/url?text={$acfb_pagetitle}&amp;url={$acfb_permalink}");
31
- array_push($acfb_socialNames , "Facebook","Twitter","Email","Pinterest","Linked In","Reddit","Xing","Whatsapp","Hacker News","Vk","Telegram");
32
- array_push($acfb_socialpaths , '<path fill="white" d="M18.77 7.46H14.5v-1.9c0-.9.6-1.1 1-1.1h3V.5h-4.33C10.24.5 9.5 3.44 9.5 5.32v2.15h-3v4h3v12h5v-12h3.85l.42-4z"/>' , '<path fill="white" d="M23.44 4.83c-.8.37-1.5.38-2.22.02.93-.56.98-.96 1.32-2.02-.88.52-1.86.9-2.9 1.1-.82-.88-2-1.43-3.3-1.43-2.5 0-4.55 2.04-4.55 4.54 0 .36.03.7.1 1.04-3.77-.2-7.12-2-9.36-4.75-.4.67-.6 1.45-.6 2.3 0 1.56.8 2.95 2 3.77-.74-.03-1.44-.23-2.05-.57v.06c0 2.2 1.56 4.03 3.64 4.44-.67.2-1.37.2-2.06.08.58 1.8 2.26 3.12 4.25 3.16C5.78 18.1 3.37 18.74 1 18.46c2 1.3 4.4 2.04 6.97 2.04 8.35 0 12.92-6.92 12.92-12.93 0-.2 0-.4-.02-.6.9-.63 1.96-1.22 2.56-2.14z"/>' , '<path fill="white" d="M22 4H2C.9 4 0 4.9 0 6v12c0 1.1.9 2 2 2h20c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM7.25 14.43l-3.5 2c-.08.05-.17.07-.25.07-.17 0-.34-.1-.43-.25-.14-.24-.06-.55.18-.68l3.5-2c.24-.14.55-.06.68.18.14.24.06.55-.18.68zm4.75.07c-.1 0-.2-.03-.27-.08l-8.5-5.5c-.23-.15-.3-.46-.15-.7.15-.22.46-.3.7-.14L12 13.4l8.23-5.32c.23-.15.54-.08.7.15.14.23.07.54-.16.7l-8.5 5.5c-.08.04-.17.07-.27.07zm8.93 1.75c-.1.16-.26.25-.43.25-.08 0-.17-.02-.25-.07l-3.5-2c-.24-.13-.32-.44-.18-.68s.44-.32.68-.18l3.5 2c.24.13.32.44.18.68z"/>' , '<path fill="white" d="M12.14.5C5.86.5 2.7 5 2.7 8.75c0 2.27.86 4.3 2.7 5.05.3.12.57 0 .66-.33l.27-1.06c.1-.32.06-.44-.2-.73-.52-.62-.86-1.44-.86-2.6 0-3.33 2.5-6.32 6.5-6.32 3.55 0 5.5 2.17 5.5 5.07 0 3.8-1.7 7.02-4.2 7.02-1.37 0-2.4-1.14-2.07-2.54.4-1.68 1.16-3.48 1.16-4.7 0-1.07-.58-1.98-1.78-1.98-1.4 0-2.55 1.47-2.55 3.42 0 1.25.43 2.1.43 2.1l-1.7 7.2c-.5 2.13-.08 4.75-.04 5 .02.17.22.2.3.1.14-.18 1.82-2.26 2.4-4.33.16-.58.93-3.63.93-3.63.45.88 1.8 1.65 3.22 1.65 4.25 0 7.13-3.87 7.13-9.05C20.5 4.15 17.18.5 12.14.5z"/>' , '<path fill="white" d="M6.5 21.5h-5v-13h5v13zM4 6.5C2.5 6.5 1.5 5.3 1.5 4s1-2.4 2.5-2.4c1.6 0 2.5 1 2.6 2.5 0 1.4-1 2.5-2.6 2.5zm11.5 6c-1 0-2 1-2 2v7h-5v-13h5V10s1.6-1.5 4-1.5c3 0 5 2.2 5 6.3v6.7h-5v-7c0-1-1-2-2-2z"/>' , '<path fill="white" d="M24 11.5c0-1.65-1.35-3-3-3-.96 0-1.86.48-2.42 1.24-1.64-1-3.75-1.64-6.07-1.72.08-1.1.4-3.05 1.52-3.7.72-.4 1.73-.24 3 .5C17.2 6.3 18.46 7.5 20 7.5c1.65 0 3-1.35 3-3s-1.35-3-3-3c-1.38 0-2.54.94-2.88 2.22-1.43-.72-2.64-.8-3.6-.25-1.64.94-1.95 3.47-2 4.55-2.33.08-4.45.7-6.1 1.72C4.86 8.98 3.96 8.5 3 8.5c-1.65 0-3 1.35-3 3 0 1.32.84 2.44 2.05 2.84-.03.22-.05.44-.05.66 0 3.86 4.5 7 10 7s10-3.14 10-7c0-.22-.02-.44-.05-.66 1.2-.4 2.05-1.54 2.05-2.84zM2.3 13.37C1.5 13.07 1 12.35 1 11.5c0-1.1.9-2 2-2 .64 0 1.22.32 1.6.82-1.1.85-1.92 1.9-2.3 3.05zm3.7.13c0-1.1.9-2 2-2s2 .9 2 2-.9 2-2 2-2-.9-2-2zm9.8 4.8c-1.08.63-2.42.96-3.8.96-1.4 0-2.74-.34-3.8-.95-.24-.13-.32-.44-.2-.68.15-.24.46-.32.7-.18 1.83 1.06 4.76 1.06 6.6 0 .23-.13.53-.05.67.2.14.23.06.54-.18.67zm.2-2.8c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm5.7-2.13c-.38-1.16-1.2-2.2-2.3-3.05.38-.5.97-.82 1.6-.82 1.1 0 2 .9 2 2 0 .84-.53 1.57-1.3 1.87z"/>' , '<path fill="white" d="M10.2 9.7l-3-5.4C7.2 4 7 4 6.8 4h-5c-.3 0-.4 0-.5.2v.5L4 10 .4 16v.5c0 .2.2.3.4.3h5c.3 0 .4 0 .5-.2l4-6.6v-.5zM24 .2l-.5-.2H18s-.2 0-.3.3l-8 14v.4l5.2 9c0 .2 0 .3.3.3h5.4s.3 0 .4-.2c.2-.2.2-.4 0-.5l-5-8.8L24 .7V.2z"/>' ,'<path fill="white" d="M20.1 3.9C17.9 1.7 15 .5 12 .5 5.8.5.7 5.6.7 11.9c0 2 .5 3.9 1.5 5.6L.6 23.4l6-1.6c1.6.9 3.5 1.3 5.4 1.3 6.3 0 11.4-5.1 11.4-11.4-.1-2.8-1.2-5.7-3.3-7.8zM12 21.4c-1.7 0-3.3-.5-4.8-1.3l-.4-.2-3.5 1 1-3.4L4 17c-1-1.5-1.4-3.2-1.4-5.1 0-5.2 4.2-9.4 9.4-9.4 2.5 0 4.9 1 6.7 2.8 1.8 1.8 2.8 4.2 2.8 6.7-.1 5.2-4.3 9.4-9.5 9.4zm5.1-7.1c-.3-.1-1.7-.9-1.9-1-.3-.1-.5-.1-.7.1-.2.3-.8 1-.9 1.1-.2.2-.3.2-.6.1s-1.2-.5-2.3-1.4c-.9-.8-1.4-1.7-1.6-2-.2-.3 0-.5.1-.6s.3-.3.4-.5c.2-.1.3-.3.4-.5.1-.2 0-.4 0-.5C10 9 9.3 7.6 9 7c-.1-.4-.4-.3-.5-.3h-.6s-.4.1-.7.3c-.3.3-1 1-1 2.4s1 2.8 1.1 3c.1.2 2 3.1 4.9 4.3.7.3 1.2.5 1.6.6.7.2 1.3.2 1.8.1.6-.1 1.7-.7 1.9-1.3.2-.7.2-1.2.2-1.3-.1-.3-.3-.4-.6-.5z"/>' ,'<path fill="white" d="M60.94 82.314L17 0h20.08l25.85 52.093c.397.927.86 1.888 1.39 2.883.53.994.995 2.02 1.393 3.08.265.4.463.764.596 1.095.13.334.262.63.395.898.662 1.325 1.26 2.618 1.79 3.877.53 1.26.993 2.42 1.39 3.48 1.06-2.254 2.22-4.673 3.48-7.258 1.26-2.585 2.552-5.27 3.877-8.052L103.49 0h18.69L77.84 83.308v53.087h-16.9v-54.08z"></path>' ,'<path fill="white" d="M21.547 7h-3.29a.743.743 0 0 0-.655.392s-1.312 2.416-1.734 3.23C14.734 12.813 14 12.126 14 11.11V7.603A1.104 1.104 0 0 0 12.896 6.5h-2.474a1.982 1.982 0 0 0-1.75.813s1.255-.204 1.255 1.49c0 .42.022 1.626.04 2.64a.73.73 0 0 1-1.272.503 21.54 21.54 0 0 1-2.498-4.543.693.693 0 0 0-.63-.403h-2.99a.508.508 0 0 0-.48.685C3.005 10.175 6.918 18 11.38 18h1.878a.742.742 0 0 0 .742-.742v-1.135a.73.73 0 0 1 1.23-.53l2.247 2.112a1.09 1.09 0 0 0 .746.295h2.953c1.424 0 1.424-.988.647-1.753-.546-.538-2.518-2.617-2.518-2.617a1.02 1.02 0 0 1-.078-1.323c.637-.84 1.68-2.212 2.122-2.8.603-.804 1.697-2.507.197-2.507z"/>','<path fill="white" d="M.707 8.475C.275 8.64 0 9.508 0 9.508s.284.867.718 1.03l5.09 1.897 1.986 6.38a1.102 1.102 0 0 0 1.75.527l2.96-2.41a.405.405 0 0 1 .494-.013l5.34 3.87a1.1 1.1 0 0 0 1.046.135 1.1 1.1 0 0 0 .682-.803l3.91-18.795A1.102 1.102 0 0 0 22.5.075L.706 8.475z"/>');
33
-
34
- for ($j = 0 ; $j < count($acfb_socialLinks) ; $j++) {
35
- $acfb_socialLinks[$j] = str_replace(" " , "%20" , $acfb_socialLinks[$j]);
36
- }
37
-
38
- $acfb_target = "";
39
- if(is_admin()){
40
- $acfb_target = 'editor';
41
- }
42
-
43
- ?>
44
-
45
-
46
- <style>
47
- .<?php echo $uid; ?>{
48
- <?php echo get_padding_field($acfb_social_button_padding); ?>
49
- <?php echo get_margin_field($acfb_social_button_margin); ?>
50
- }
51
-
52
- .<?php echo $uid; ?> a.acfb_btn_styling {
53
- <?php echo get_typo_field($acfb_social_button_text_typo); ?>
54
- border-radius: <?php the_field("acfb_rounded_corners"); ?>% !important;
55
- background-color:<?php the_field("acfb_background_color"); ?> !important;
56
-
57
- padding-top: <?php echo $acfb_social_button_inner_padding['padding_top']; ?>px;
58
- padding-bottom: <?php echo $acfb_social_button_inner_padding['padding_bottom']; ?>px;
59
- padding-left: <?php echo $acfb_social_button_inner_padding['padding_left']; ?>px;
60
- padding-right: <?php echo $acfb_social_button_inner_padding['padding_right']; ?>px;
61
-
62
- }
63
-
64
- .<?php echo $uid; ?> a > span {
65
- color: <?php the_field("acfb_text_color"); ?> !important;
66
- }
67
-
68
- .<?php echo $uid; ?> svg > path {
69
- fill: <?php the_field("acfb_text_color"); ?>;
70
- }
71
- .<?php echo $uid; ?>.aligncenter {
72
- justify-content: center !important;
73
- }
74
- </style>
75
-
76
-
77
- <div class="<?php echo $uid; ?> <?php echo esc_attr($className); ?>">
78
- <?php
79
- if (get_field("acfb_social_network")) {
80
- for ($i = 1 ; $i < 12 ; $i++) {
81
- $acfb_socialSpans ='';
82
- $afb_socialIcon = '';
83
- $acfb_viewbox = "0 0 24 24";
84
- if (get_field('acfb_button_label') !== 'i') {
85
- $acfb_socialSpans = '<span>'.ucfirst($acfb_socialNames[$i - 1]).'</span>';
86
- }
87
- if (get_field('acfb_button_label') !== 'b') {
88
- $afb_socialIcon = '<svg class="acfb_'.str_replace(' ' , '' , strtolower($acfb_socialNames[$i - 1])).'" viewBox="0 0 24 24">
89
- '.$acfb_socialpaths[$i - 1].'
90
- </svg>';
91
- }
92
- if (in_array($i , get_field("acfb_social_network"))) {
93
- if ($i === 9 && get_field("acfb_button_label") === 'i') {
94
- $afb_socialIcon = '<svg class="acfb_'.str_replace(' ' , '' , strtolower($acfb_socialNames[$i - 1])).'" viewBox="0 0 140 140">
95
- '.$acfb_socialpaths[$i - 1].'
96
- </svg>';
97
- }else if ($i === 9 && get_field("acfb_button_label") === 'b') {
98
- $afb_socialIcon = '';
99
- }else if ($i === 9 && get_field("acfb_button_label") === 'bi') {
100
- $afb_socialIcon = '<svg class="acfb_'.str_replace(' ' , '' , strtolower($acfb_socialNames[$i - 1])).'" viewBox="0 0 140 140">
101
- '.$acfb_socialpaths[$i - 1].'
102
- </svg>';
103
- }
104
- echo
105
- '
106
- <a target='.($acfb_target !== "editor" ? "_target" : "_self").' href='.($acfb_target !== "editor" ? $acfb_socialLinks[$i - 1] : "#").' class="acfb_btn_styling acfb_social_'.str_replace(' ' , '' , strtolower($acfb_socialNames[$i - 1])).'_main">
107
- '.$afb_socialIcon.'
108
- '.$acfb_socialSpans.'
109
- </a>';
110
- }
111
- }
112
- }
113
- ?>
114
  </div>
1
+ <?php
2
+ echo parse_link(
3
+ array(
4
+ get_field('acfb_social_button_text_typo')
5
+ )
6
+ );
7
+
8
+
9
+ $acfb_social_button_padding = acfb_padding_name('acfb_social_button_padding');
10
+ $acfb_social_button_inner_padding = acfb_padding_name('acfb_social_button_inner_padding');
11
+ $acfb_social_button_margin = acfb_margin_name('acfb_social_button_margin');
12
+ $acfb_social_button_text_typo = acfb_ffaimly_name('acfb_social_button_text_typo');
13
+
14
+
15
+ $uid = $block['id'];
16
+ $acfb_permalink = get_permalink();
17
+ $acfb_pagetitle = get_the_title();
18
+
19
+ $className = 'acfb_social_sharing_main_block';
20
+ if( !empty($block['className']) ) {
21
+ $className .= ' ' . $block['className'];
22
+ }
23
+ if( !empty($block['align']) ) {
24
+ $className .= ' align' . $block['align'];
25
+ }
26
+
27
+ $acfb_socialLinks = array();
28
+ $acfb_socialNames = array();
29
+ $acfb_socialpaths = array();
30
+ array_push($acfb_socialLinks,"https://facebook.com/sharer/sharer.php?u={$acfb_permalink}","https://twitter.com/intent/tweet/?text={$acfb_pagetitle}&amp;url={$acfb_permalink}","mailto:?subject={$acfb_pagetitle}&amp;body={$acfb_permalink}","https://pinterest.com/pin/create/button/?url={$acfb_permalink}&amp;media=http%3A%2F%2Fsharingbuttons.io&amp;description={$acfb_pagetitle}.","https://www.linkedin.com/shareArticle?mini=true&amp;url={$acfb_permalink}&amp;title={$acfb_pagetitle}&amp;summary={$acfb_pagetitle}&amp;source={$acfb_permalink}","https://reddit.com/submit/?url={$acfb_permalink}&amp;resubmit=true&amp;title={$acfb_pagetitle}","https://www.xing.com/app/user?op=share;url={$acfb_permalink};title={$acfb_pagetitle}","whatsapp://send?text={$acfb_pagetitle}.{$acfb_permalink}","https://news.ycombinator.com/submitlink?u={$acfb_permalink}&amp;t={$acfb_pagetitle}","http://vk.com/share.php?title={$acfb_pagetitle}&amp;url={$acfb_permalink}","https://telegram.me/share/url?text={$acfb_pagetitle}&amp;url={$acfb_permalink}");
31
+ array_push($acfb_socialNames , "Facebook","Twitter","Email","Pinterest","Linked In","Reddit","Xing","Whatsapp","Hacker News","Vk","Telegram");
32
+ array_push($acfb_socialpaths , '<path fill="white" d="M18.77 7.46H14.5v-1.9c0-.9.6-1.1 1-1.1h3V.5h-4.33C10.24.5 9.5 3.44 9.5 5.32v2.15h-3v4h3v12h5v-12h3.85l.42-4z"/>' , '<path fill="white" d="M23.44 4.83c-.8.37-1.5.38-2.22.02.93-.56.98-.96 1.32-2.02-.88.52-1.86.9-2.9 1.1-.82-.88-2-1.43-3.3-1.43-2.5 0-4.55 2.04-4.55 4.54 0 .36.03.7.1 1.04-3.77-.2-7.12-2-9.36-4.75-.4.67-.6 1.45-.6 2.3 0 1.56.8 2.95 2 3.77-.74-.03-1.44-.23-2.05-.57v.06c0 2.2 1.56 4.03 3.64 4.44-.67.2-1.37.2-2.06.08.58 1.8 2.26 3.12 4.25 3.16C5.78 18.1 3.37 18.74 1 18.46c2 1.3 4.4 2.04 6.97 2.04 8.35 0 12.92-6.92 12.92-12.93 0-.2 0-.4-.02-.6.9-.63 1.96-1.22 2.56-2.14z"/>' , '<path fill="white" d="M22 4H2C.9 4 0 4.9 0 6v12c0 1.1.9 2 2 2h20c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM7.25 14.43l-3.5 2c-.08.05-.17.07-.25.07-.17 0-.34-.1-.43-.25-.14-.24-.06-.55.18-.68l3.5-2c.24-.14.55-.06.68.18.14.24.06.55-.18.68zm4.75.07c-.1 0-.2-.03-.27-.08l-8.5-5.5c-.23-.15-.3-.46-.15-.7.15-.22.46-.3.7-.14L12 13.4l8.23-5.32c.23-.15.54-.08.7.15.14.23.07.54-.16.7l-8.5 5.5c-.08.04-.17.07-.27.07zm8.93 1.75c-.1.16-.26.25-.43.25-.08 0-.17-.02-.25-.07l-3.5-2c-.24-.13-.32-.44-.18-.68s.44-.32.68-.18l3.5 2c.24.13.32.44.18.68z"/>' , '<path fill="white" d="M12.14.5C5.86.5 2.7 5 2.7 8.75c0 2.27.86 4.3 2.7 5.05.3.12.57 0 .66-.33l.27-1.06c.1-.32.06-.44-.2-.73-.52-.62-.86-1.44-.86-2.6 0-3.33 2.5-6.32 6.5-6.32 3.55 0 5.5 2.17 5.5 5.07 0 3.8-1.7 7.02-4.2 7.02-1.37 0-2.4-1.14-2.07-2.54.4-1.68 1.16-3.48 1.16-4.7 0-1.07-.58-1.98-1.78-1.98-1.4 0-2.55 1.47-2.55 3.42 0 1.25.43 2.1.43 2.1l-1.7 7.2c-.5 2.13-.08 4.75-.04 5 .02.17.22.2.3.1.14-.18 1.82-2.26 2.4-4.33.16-.58.93-3.63.93-3.63.45.88 1.8 1.65 3.22 1.65 4.25 0 7.13-3.87 7.13-9.05C20.5 4.15 17.18.5 12.14.5z"/>' , '<path fill="white" d="M6.5 21.5h-5v-13h5v13zM4 6.5C2.5 6.5 1.5 5.3 1.5 4s1-2.4 2.5-2.4c1.6 0 2.5 1 2.6 2.5 0 1.4-1 2.5-2.6 2.5zm11.5 6c-1 0-2 1-2 2v7h-5v-13h5V10s1.6-1.5 4-1.5c3 0 5 2.2 5 6.3v6.7h-5v-7c0-1-1-2-2-2z"/>' , '<path fill="white" d="M24 11.5c0-1.65-1.35-3-3-3-.96 0-1.86.48-2.42 1.24-1.64-1-3.75-1.64-6.07-1.72.08-1.1.4-3.05 1.52-3.7.72-.4 1.73-.24 3 .5C17.2 6.3 18.46 7.5 20 7.5c1.65 0 3-1.35 3-3s-1.35-3-3-3c-1.38 0-2.54.94-2.88 2.22-1.43-.72-2.64-.8-3.6-.25-1.64.94-1.95 3.47-2 4.55-2.33.08-4.45.7-6.1 1.72C4.86 8.98 3.96 8.5 3 8.5c-1.65 0-3 1.35-3 3 0 1.32.84 2.44 2.05 2.84-.03.22-.05.44-.05.66 0 3.86 4.5 7 10 7s10-3.14 10-7c0-.22-.02-.44-.05-.66 1.2-.4 2.05-1.54 2.05-2.84zM2.3 13.37C1.5 13.07 1 12.35 1 11.5c0-1.1.9-2 2-2 .64 0 1.22.32 1.6.82-1.1.85-1.92 1.9-2.3 3.05zm3.7.13c0-1.1.9-2 2-2s2 .9 2 2-.9 2-2 2-2-.9-2-2zm9.8 4.8c-1.08.63-2.42.96-3.8.96-1.4 0-2.74-.34-3.8-.95-.24-.13-.32-.44-.2-.68.15-.24.46-.32.7-.18 1.83 1.06 4.76 1.06 6.6 0 .23-.13.53-.05.67.2.14.23.06.54-.18.67zm.2-2.8c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm5.7-2.13c-.38-1.16-1.2-2.2-2.3-3.05.38-.5.97-.82 1.6-.82 1.1 0 2 .9 2 2 0 .84-.53 1.57-1.3 1.87z"/>' , '<path fill="white" d="M10.2 9.7l-3-5.4C7.2 4 7 4 6.8 4h-5c-.3 0-.4 0-.5.2v.5L4 10 .4 16v.5c0 .2.2.3.4.3h5c.3 0 .4 0 .5-.2l4-6.6v-.5zM24 .2l-.5-.2H18s-.2 0-.3.3l-8 14v.4l5.2 9c0 .2 0 .3.3.3h5.4s.3 0 .4-.2c.2-.2.2-.4 0-.5l-5-8.8L24 .7V.2z"/>' ,'<path fill="white" d="M20.1 3.9C17.9 1.7 15 .5 12 .5 5.8.5.7 5.6.7 11.9c0 2 .5 3.9 1.5 5.6L.6 23.4l6-1.6c1.6.9 3.5 1.3 5.4 1.3 6.3 0 11.4-5.1 11.4-11.4-.1-2.8-1.2-5.7-3.3-7.8zM12 21.4c-1.7 0-3.3-.5-4.8-1.3l-.4-.2-3.5 1 1-3.4L4 17c-1-1.5-1.4-3.2-1.4-5.1 0-5.2 4.2-9.4 9.4-9.4 2.5 0 4.9 1 6.7 2.8 1.8 1.8 2.8 4.2 2.8 6.7-.1 5.2-4.3 9.4-9.5 9.4zm5.1-7.1c-.3-.1-1.7-.9-1.9-1-.3-.1-.5-.1-.7.1-.2.3-.8 1-.9 1.1-.2.2-.3.2-.6.1s-1.2-.5-2.3-1.4c-.9-.8-1.4-1.7-1.6-2-.2-.3 0-.5.1-.6s.3-.3.4-.5c.2-.1.3-.3.4-.5.1-.2 0-.4 0-.5C10 9 9.3 7.6 9 7c-.1-.4-.4-.3-.5-.3h-.6s-.4.1-.7.3c-.3.3-1 1-1 2.4s1 2.8 1.1 3c.1.2 2 3.1 4.9 4.3.7.3 1.2.5 1.6.6.7.2 1.3.2 1.8.1.6-.1 1.7-.7 1.9-1.3.2-.7.2-1.2.2-1.3-.1-.3-.3-.4-.6-.5z"/>' ,'<path fill="white" d="M60.94 82.314L17 0h20.08l25.85 52.093c.397.927.86 1.888 1.39 2.883.53.994.995 2.02 1.393 3.08.265.4.463.764.596 1.095.13.334.262.63.395.898.662 1.325 1.26 2.618 1.79 3.877.53 1.26.993 2.42 1.39 3.48 1.06-2.254 2.22-4.673 3.48-7.258 1.26-2.585 2.552-5.27 3.877-8.052L103.49 0h18.69L77.84 83.308v53.087h-16.9v-54.08z"></path>' ,'<path fill="white" d="M21.547 7h-3.29a.743.743 0 0 0-.655.392s-1.312 2.416-1.734 3.23C14.734 12.813 14 12.126 14 11.11V7.603A1.104 1.104 0 0 0 12.896 6.5h-2.474a1.982 1.982 0 0 0-1.75.813s1.255-.204 1.255 1.49c0 .42.022 1.626.04 2.64a.73.73 0 0 1-1.272.503 21.54 21.54 0 0 1-2.498-4.543.693.693 0 0 0-.63-.403h-2.99a.508.508 0 0 0-.48.685C3.005 10.175 6.918 18 11.38 18h1.878a.742.742 0 0 0 .742-.742v-1.135a.73.73 0 0 1 1.23-.53l2.247 2.112a1.09 1.09 0 0 0 .746.295h2.953c1.424 0 1.424-.988.647-1.753-.546-.538-2.518-2.617-2.518-2.617a1.02 1.02 0 0 1-.078-1.323c.637-.84 1.68-2.212 2.122-2.8.603-.804 1.697-2.507.197-2.507z"/>','<path fill="white" d="M.707 8.475C.275 8.64 0 9.508 0 9.508s.284.867.718 1.03l5.09 1.897 1.986 6.38a1.102 1.102 0 0 0 1.75.527l2.96-2.41a.405.405 0 0 1 .494-.013l5.34 3.87a1.1 1.1 0 0 0 1.046.135 1.1 1.1 0 0 0 .682-.803l3.91-18.795A1.102 1.102 0 0 0 22.5.075L.706 8.475z"/>');
33
+
34
+ for ($j = 0 ; $j < count($acfb_socialLinks) ; $j++) {
35
+ $acfb_socialLinks[$j] = str_replace(" " , "%20" , $acfb_socialLinks[$j]);
36
+ }
37
+
38
+ $acfb_target = "";
39
+ if(is_admin()){
40
+ $acfb_target = 'editor';
41
+ }
42
+
43
+ ?>
44
+
45
+
46
+ <style>
47
+ .<?php echo $uid; ?>{
48
+ <?php echo get_padding_field($acfb_social_button_padding); ?>
49
+ <?php echo get_margin_field($acfb_social_button_margin); ?>
50
+ }
51
+
52
+ .<?php echo $uid; ?> a.acfb_btn_styling {
53
+ <?php echo get_typo_field($acfb_social_button_text_typo); ?>
54
+ border-radius: <?php the_field("acfb_rounded_corners"); ?>% !important;
55
+ background-color:<?php the_field("acfb_background_color"); ?> !important;
56
+
57
+ padding-top: <?php echo $acfb_social_button_inner_padding['padding_top']; ?>px;
58
+ padding-bottom: <?php echo $acfb_social_button_inner_padding['padding_bottom']; ?>px;
59
+ padding-left: <?php echo $acfb_social_button_inner_padding['padding_left']; ?>px;
60
+ padding-right: <?php echo $acfb_social_button_inner_padding['padding_right']; ?>px;
61
+
62
+ }
63
+
64
+ .<?php echo $uid; ?> a > span {
65
+ color: <?php the_field("acfb_text_color"); ?> !important;
66
+ }
67
+
68
+ .<?php echo $uid; ?> svg > path {
69
+ fill: <?php the_field("acfb_text_color"); ?>;
70
+ }
71
+ .<?php echo $uid; ?>.aligncenter {
72
+ justify-content: center !important;
73
+ }
74
+ </style>
75
+
76
+
77
+ <div class="<?php echo $uid; ?> <?php echo esc_attr($className); ?>">
78
+ <?php
79
+ if (get_field("acfb_social_network")) {
80
+ for ($i = 1 ; $i < 12 ; $i++) {
81
+ $acfb_socialSpans ='';
82
+ $afb_socialIcon = '';
83
+ $acfb_viewbox = "0 0 24 24";
84
+ if (get_field('acfb_button_label') !== 'i') {
85
+ $acfb_socialSpans = '<span>'.ucfirst($acfb_socialNames[$i - 1]).'</span>';
86
+ }
87
+ if (get_field('acfb_button_label') !== 'b') {
88
+ $afb_socialIcon = '<svg class="acfb_'.str_replace(' ' , '' , strtolower($acfb_socialNames[$i - 1])).'" viewBox="0 0 24 24">
89
+ '.$acfb_socialpaths[$i - 1].'
90
+ </svg>';
91
+ }
92
+ if (in_array($i , get_field("acfb_social_network"))) {
93
+ if ($i === 9 && get_field("acfb_button_label") === 'i') {
94
+ $afb_socialIcon = '<svg class="acfb_'.str_replace(' ' , '' , strtolower($acfb_socialNames[$i - 1])).'" viewBox="0 0 140 140">
95
+ '.$acfb_socialpaths[$i - 1].'
96
+ </svg>';
97
+ }else if ($i === 9 && get_field("acfb_button_label") === 'b') {
98
+ $afb_socialIcon = '';
99
+ }else if ($i === 9 && get_field("acfb_button_label") === 'bi') {
100
+ $afb_socialIcon = '<svg class="acfb_'.str_replace(' ' , '' , strtolower($acfb_socialNames[$i - 1])).'" viewBox="0 0 140 140">
101
+ '.$acfb_socialpaths[$i - 1].'
102
+ </svg>';
103
+ }
104
+ echo
105
+ '
106
+ <a target='.($acfb_target !== "editor" ? "_target" : "_self").' href='.($acfb_target !== "editor" ? $acfb_socialLinks[$i - 1] : "#").' class="acfb_btn_styling acfb_social_'.str_replace(' ' , '' , strtolower($acfb_socialNames[$i - 1])).'_main">
107
+ '.$afb_socialIcon.'
108
+ '.$acfb_socialSpans.'
109
+ </a>';
110
+ }
111
+ }
112
+ }
113
+ ?>
114
  </div>
acfblocks-templates/free/acfb-starrating.php CHANGED
@@ -1,64 +1,64 @@
1
- <?php
2
- echo parse_link(
3
- array(
4
- get_field('acfb_rating_before_text_typo')
5
- )
6
- );
7
-
8
- $acfb_rating_padding = acfb_padding_name('acfb_rating_padding');
9
- $acfb_rating_margin = acfb_margin_name('acfb_rating_margin');
10
- $acfb_rating_before_text_typo = acfb_ffaimly_name('acfb_rating_before_text_typo');
11
-
12
-
13
- $uid = $block['id'];
14
-
15
- $className = 'acfb_star_rating_block';
16
- if( !empty($block['className']) ) {
17
- $className .= ' ' . $block['className'];
18
- }
19
- if( !empty($block['align']) ) {
20
- $className .= ' align' . $block['align'];
21
- }
22
-
23
- ?>
24
- <div class="<?php echo $uid; ?> <?php echo esc_attr($className); ?>">
25
- <style type="text/css">
26
- .<?php echo $uid; ?>{
27
- <?php echo get_padding_field($acfb_rating_padding); ?>
28
- <?php echo get_margin_field($acfb_rating_margin); ?>
29
- }
30
-
31
- .<?php echo $uid; ?> .acfb_star_rating{
32
- justify-content: <?php the_field('acfb_rating_alignment'); ?>;
33
- }
34
-
35
- .<?php echo $uid; ?> .acfb_star_rating .acfb_before{
36
- <?php echo get_typo_field($acfb_rating_before_text_typo); ?>
37
- color: <?php the_field('acfb_rating_before_text_color'); ?>;
38
- margin-right: <?php the_field('acfb_rating_before_text_gap'); ?>px;
39
- }
40
-
41
- .<?php echo $uid; ?> .acfb_star_rating .acfb_star:nth-child(-n+<?php the_field('acfb_rating'); ?>) {
42
- color: <?php the_field('acfb_marked_star_color'); ?>;
43
- }
44
-
45
- .<?php echo $uid; ?> .acfb_star_rating .acfb_star{
46
- font-size: <?php the_field('acfb_star_icon_size'); ?>px;
47
- color: <?php the_field('acfb_unmarked_star_color'); ?>;
48
- }
49
- </style>
50
-
51
- <div class="acfb_star_rating">
52
- <div class="acfb_before">
53
- <?php the_field('acfb_rating_before_text'); ?>
54
- </div>
55
- <div class="acfb_stars">
56
- <span class="acfb_star"></span>
57
- <span class="acfb_star"></span>
58
- <span class="acfb_star"></span>
59
- <span class="acfb_star"></span>
60
- <span class="acfb_star"></span>
61
- </div>
62
- </div>
63
-
64
  </div><!-- Uid -->
1
+ <?php
2
+ echo parse_link(
3
+ array(
4
+ get_field('acfb_rating_before_text_typo')
5
+ )
6
+ );
7
+
8
+ $acfb_rating_padding = acfb_padding_name('acfb_rating_padding');
9
+ $acfb_rating_margin = acfb_margin_name('acfb_rating_margin');
10
+ $acfb_rating_before_text_typo = acfb_ffaimly_name('acfb_rating_before_text_typo');
11
+
12
+
13
+ $uid = $block['id'];
14
+
15
+ $className = 'acfb_star_rating_block';
16
+ if( !empty($block['className']) ) {
17
+ $className .= ' ' . $block['className'];
18
+ }
19
+ if( !empty($block['align']) ) {
20
+ $className .= ' align' . $block['align'];
21
+ }
22
+
23
+ ?>
24
+ <div class="<?php echo $uid; ?> <?php echo esc_attr($className); ?>">
25
+ <style type="text/css">
26
+ .<?php echo $uid; ?>{
27
+ <?php echo get_padding_field($acfb_rating_padding); ?>
28
+ <?php echo get_margin_field($acfb_rating_margin); ?>
29
+ }
30
+
31
+ .<?php echo $uid; ?> .acfb_star_rating{
32
+ justify-content: <?php the_field('acfb_rating_alignment'); ?>;
33
+ }
34
+
35
+ .<?php echo $uid; ?> .acfb_star_rating .acfb_before{
36
+ <?php echo get_typo_field($acfb_rating_before_text_typo); ?>
37
+ color: <?php the_field('acfb_rating_before_text_color'); ?>;
38
+ margin-right: <?php the_field('acfb_rating_before_text_gap'); ?>px;
39
+ }
40
+
41
+ .<?php echo $uid; ?> .acfb_star_rating .acfb_star:nth-child(-n+<?php the_field('acfb_rating'); ?>) {
42
+ color: <?php the_field('acfb_marked_star_color'); ?>;
43
+ }
44
+
45
+ .<?php echo $uid; ?> .acfb_star_rating .acfb_star{
46
+ font-size: <?php the_field('acfb_star_icon_size'); ?>px;
47
+ color: <?php the_field('acfb_unmarked_star_color'); ?>;
48
+ }
49
+ </style>
50
+
51
+ <div class="acfb_star_rating">
52
+ <div class="acfb_before">
53
+ <?php the_field('acfb_rating_before_text'); ?>
54
+ </div>
55
+ <div class="acfb_stars">
56
+ <span class="acfb_star"></span>
57
+ <span class="acfb_star"></span>
58
+ <span class="acfb_star"></span>
59
+ <span class="acfb_star"></span>
60
+ <span class="acfb_star"></span>
61
+ </div>
62
+ </div>
63
+
64
  </div><!-- Uid -->
acfblocks-templates/free/acfb-tabs.php CHANGED
@@ -1,80 +1,80 @@
1
- <?php
2
- echo parse_link(
3
- array(
4
- get_field('acfb_tab_title_typo'),
5
- get_field('acfb_tab_content_typo')
6
- )
7
- );
8
-
9
- $acfb_tab_content_padding = acfb_padding_name('acfb_tab_content_padding');
10
- $acfb_tab_padding = acfb_padding_name('acfb_tab_padding');
11
- $acfb_tab_margin = acfb_margin_name('acfb_tab_margin');
12
- $acfb_tab_title_typo = acfb_ffaimly_name('acfb_tab_title_typo');
13
- $acfb_tab_content_typo = acfb_ffaimly_name('acfb_tab_content_typo');
14
-
15
-
16
- $uid = $block['id'];
17
- $uid_tab = str_replace("block","tab",$uid);
18
-
19
- $className = 'acfb_tabs_block';
20
- if( !empty($block['className']) ) {
21
- $className .= ' ' . $block['className'];
22
- }
23
- if( !empty($block['align']) ) {
24
- $className .= ' align' . $block['align'];
25
- }
26
- ?>
27
-
28
- <div class="<?php echo $uid; ?> <?php echo esc_attr($className); ?>">
29
- <style>
30
-
31
- .<?php echo $uid; ?> {
32
- <?php echo get_padding_field($acfb_tab_padding); ?>
33
- <?php echo get_margin_field($acfb_tab_margin); ?>
34
- }
35
-
36
- .<?php echo $uid; ?> ul li{
37
- background: <?php the_field('acfb_tab_title_background'); ?>;
38
- }
39
-
40
- .<?php echo $uid; ?> ul li a {
41
- <?php echo get_typo_field($acfb_tab_title_typo); ?>
42
- color: <?php the_field('acfb_tab_title_color'); ?>;
43
- }
44
-
45
- .<?php echo $uid; ?> ul li.active {
46
- background: <?php the_field('acfb_tab_title_active_background'); ?>;
47
- }
48
-
49
- .<?php echo $uid; ?> ul li.active a {
50
- color: <?php the_field('acfb_tab_title_active_color'); ?>;
51
- }
52
-
53
- .<?php echo $uid; ?> .acfb_tab_content{
54
- background: <?php the_field('acfb_tab_content_background'); ?>;
55
- color: <?php the_field('acfb_tab_content_color'); ?>;
56
- <?php echo get_typo_field($acfb_tab_content_typo); ?>
57
- padding-top: <?php echo $acfb_tab_content_padding['padding_top']; ?>px;
58
- padding-bottom: <?php echo $acfb_tab_content_padding['padding_bottom']; ?>px;
59
- padding-left: <?php echo $acfb_tab_content_padding['padding_left']; ?>px;
60
- padding-right: <?php echo $acfb_tab_content_padding['padding_right']; ?>px;
61
- }
62
- </style>
63
-
64
- <?php if( have_rows('acfb_add_tab') ): ?>
65
- <ul>
66
- <?php while( have_rows('acfb_add_tab') ): the_row(); ?>
67
- <li>
68
- <a href="#<?php echo $uid_tab; ?>-<?php echo get_row_index(); ?>" class=" acfb_tab_title"><?php the_sub_field('acfb_tab_title'); ?></a>
69
- </li>
70
- <?php endwhile; ?>
71
- </ul>
72
-
73
- <?php while( have_rows('acfb_add_tab') ): the_row(); ?>
74
- <div id="<?php echo $uid_tab; ?>-<?php echo get_row_index(); ?>" class="acfb_tab_content">
75
- <?php the_sub_field('acfb_tab_content'); ?>
76
- </div>
77
- <?php endwhile; ?>
78
- <?php endif; ?>
79
-
80
  </div><!-- Uid -->
1
+ <?php
2
+ echo parse_link(
3
+ array(
4
+ get_field('acfb_tab_title_typo'),
5
+ get_field('acfb_tab_content_typo')
6
+ )
7
+ );
8
+
9
+ $acfb_tab_content_padding = acfb_padding_name('acfb_tab_content_padding');
10
+ $acfb_tab_padding = acfb_padding_name('acfb_tab_padding');
11
+ $acfb_tab_margin = acfb_margin_name('acfb_tab_margin');
12
+ $acfb_tab_title_typo = acfb_ffaimly_name('acfb_tab_title_typo');
13
+ $acfb_tab_content_typo = acfb_ffaimly_name('acfb_tab_content_typo');
14
+
15
+
16
+ $uid = $block['id'];
17
+ $uid_tab = str_replace("block","tab",$uid);
18
+
19
+ $className = 'acfb_tabs_block';
20
+ if( !empty($block['className']) ) {
21
+ $className .= ' ' . $block['className'];
22
+ }
23
+ if( !empty($block['align']) ) {
24
+ $className .= ' align' . $block['align'];
25
+ }
26
+ ?>
27
+
28
+ <div class="<?php echo $uid; ?> <?php echo esc_attr($className); ?>">
29
+ <style>
30
+
31
+ .<?php echo $uid; ?> {
32
+ <?php echo get_padding_field($acfb_tab_padding); ?>
33
+ <?php echo get_margin_field($acfb_tab_margin); ?>
34
+ }
35
+
36
+ .<?php echo $uid; ?> ul li{
37
+ background: <?php the_field('acfb_tab_title_background'); ?>;
38
+ }
39
+
40
+ .<?php echo $uid; ?> ul li a {
41
+ <?php echo get_typo_field($acfb_tab_title_typo); ?>
42
+ color: <?php the_field('acfb_tab_title_color'); ?>;
43
+ }
44
+
45
+ .<?php echo $uid; ?> ul li.active {
46
+ background: <?php the_field('acfb_tab_title_active_background'); ?>;
47
+ }
48
+
49
+ .<?php echo $uid; ?> ul li.active a {
50
+ color: <?php the_field('acfb_tab_title_active_color'); ?>;
51
+ }
52
+
53
+ .<?php echo $uid; ?> .acfb_tab_content{
54
+ background: <?php the_field('acfb_tab_content_background'); ?>;
55
+ color: <?php the_field('acfb_tab_content_color'); ?>;
56
+ <?php echo get_typo_field($acfb_tab_content_typo); ?>
57
+ padding-top: <?php echo $acfb_tab_content_padding['padding_top']; ?>px;
58
+ padding-bottom: <?php echo $acfb_tab_content_padding['padding_bottom']; ?>px;
59
+ padding-left: <?php echo $acfb_tab_content_padding['padding_left']; ?>px;
60
+ padding-right: <?php echo $acfb_tab_content_padding['padding_right']; ?>px;
61
+ }
62
+ </style>
63
+
64
+ <?php if( have_rows('acfb_add_tab') ): ?>
65
+ <ul>
66
+ <?php while( have_rows('acfb_add_tab') ): the_row(); ?>
67
+ <li>
68
+ <a href="#<?php echo $uid_tab; ?>-<?php echo get_row_index(); ?>" class=" acfb_tab_title"><?php the_sub_field('acfb_tab_title'); ?></a>
69
+ </li>
70
+ <?php endwhile; ?>
71
+ </ul>
72
+
73
+ <?php while( have_rows('acfb_add_tab') ): the_row(); ?>
74
+ <div id="<?php echo $uid_tab; ?>-<?php echo get_row_index(); ?>" class="acfb_tab_content">
75
+ <?php the_sub_field('acfb_tab_content'); ?>
76
+ </div>
77
+ <?php endwhile; ?>
78
+ <?php endif; ?>
79
+
80
  </div><!-- Uid -->
acfblocks-templates/free/acfb-team.php CHANGED
@@ -1,128 +1,128 @@
1
- <?php
2
- echo parse_link(
3
- array(
4
- get_field('acfb_team_name_typo'),
5
- get_field('acfb_team_position_typo'),
6
- get_field('acfb_team_description_typo')
7
- )
8
- );
9
-
10
- $acfb_team_inner_padding = acfb_padding_name('acfb_team_inner_padding');
11
- $acfb_team_padding = acfb_padding_name('acfb_team_padding');
12
- $acfb_team_margin = acfb_margin_name('acfb_team_margin');
13
- $acfb_team_name_typo = acfb_ffaimly_name('acfb_team_name_typo');
14
- $acfb_team_position_typo = acfb_ffaimly_name('acfb_team_position_typo');
15
- $acfb_team_description_typo = acfb_ffaimly_name('acfb_team_description_typo');
16
-
17
-
18
- $uid = $block['id'];
19
-
20
- $className = 'acfb_team_block';
21
- if( !empty($block['className']) ) {
22
- $className .= ' ' . $block['className'];
23
- }
24
- if( !empty($block['align']) ) {
25
- $className .= ' align' . $block['align'];
26
- }
27
- ?>
28
- <div class="<?php echo $uid; ?> <?php echo esc_attr($className); ?>">
29
- <style type="text/css">
30
- .<?php echo $uid; ?>{
31
- <?php echo get_padding_field($acfb_team_padding); ?>
32
- <?php echo get_margin_field($acfb_team_margin); ?>
33
- }
34
-
35
- .<?php echo $uid; ?> .acfb_team_wrap{
36
- background: <?php the_field('acfb_team_background_color'); ?>;
37
- padding-top: <?php echo $acfb_team_inner_padding['padding_top']; ?>px;
38
- padding-bottom: <?php echo $acfb_team_inner_padding['padding_bottom']; ?>px;
39
- padding-left: <?php echo $acfb_team_inner_padding['padding_left']; ?>px;
40
- padding-right: <?php echo $acfb_team_inner_padding['padding_right']; ?>px;
41
- }
42
-
43
- .<?php echo $uid; ?> .acfb_team_wrap.acfb_team_top{
44
- <?php if(get_field('acfb_team_ha') == 'flex-start'): ?>
45
- text-align: left;
46
- justify-items: flex-start;
47
- <?php endif; ?>
48
-
49
- <?php if(get_field('acfb_team_ha') == 'center'): ?>
50
- text-align: center;
51
- justify-items: center;
52
- <?php endif; ?>
53
-
54
- <?php if(get_field('acfb_team_ha') == 'flex-end'): ?>
55
- text-align: right;
56
- justify-items: flex-end;
57
- <?php endif; ?>
58
-
59
- }
60
-
61
- <?php if(get_field('acfb_team_image_position') == 'left' ): ?>
62
- .<?php echo $uid; ?> .acfb_team_wrap.acfb_team_left{
63
- align-items: <?php the_field('acfb_team_image_v_alignment'); ?>;
64
- }
65
- <?php endif; ?>
66
-
67
-
68
- .<?php echo $uid; ?> .acfb_team_wrap .acfb_team_avatar{
69
- width: <?php the_field('acfb_team_image_size'); ?>px;
70
- height: <?php the_field('acfb_team_image_size'); ?>px;
71
- }
72
-
73
- .<?php echo $uid; ?> .acfb_team_wrap .acfb_team_avatar img{
74
- border-radius: <?php the_field('acfb_team_image_radius'); ?>%;
75
- }
76
-
77
- .<?php echo $uid; ?> .acfb_team_wrap .acfb_team_info .acfb_team_name{
78
- color: <?php the_field('acfb_team_name_color'); ?>;
79
- <?php echo get_typo_field($acfb_team_name_typo); ?>
80
- }
81
-
82
- .<?php echo $uid; ?> .acfb_team_wrap .acfb_team_info .acfb_team_position{
83
- color: <?php the_field('acfb_team_position_color'); ?>;
84
- <?php echo get_typo_field($acfb_team_position_typo); ?>
85
- }
86
-
87
- .<?php echo $uid; ?> .acfb_team_wrap .acfb_team_info .acfb_team_description{
88
- color: <?php the_field('acfb_team_description_color'); ?>;
89
- <?php echo get_typo_field($acfb_team_description_typo); ?>
90
- }
91
-
92
- </style>
93
-
94
-
95
- <?php
96
- $acfb_image = '';
97
- if(!get_field('acfb_team_image')){
98
- $acfb_image = plugins_url() . '/acf-blocks/img/placeholder-image.jpg';
99
- } else{
100
- $acfb_image = get_field('acfb_team_image');
101
- }
102
- ?>
103
-
104
- <div class="acfb_team_wrap acfb_team_<?php the_field('acfb_team_image_position') ?>">
105
- <div class="acfb_team_avatar">
106
- <img src="<?php echo $acfb_image; ?>" alt="<?php the_field('acfb_team_image_alt'); ?>">
107
- </div>
108
- <div class="acfb_team_info">
109
-
110
- <?php if(get_field('acfb_team_name')): ?>
111
- <h4 class="acfb_team_name"><?php the_field('acfb_team_name'); ?></h4>
112
- <?php endif; ?>
113
-
114
- <?php if(get_field('acfb_team_position')): ?>
115
- <span class="acfb_team_position"><?php the_field('acfb_team_position'); ?></span>
116
- <?php endif; ?>
117
-
118
- <?php if(get_field('acfb_team_description')): ?>
119
- <p class="acfb_team_description">
120
- <?php the_field('acfb_team_description'); ?>
121
- </p>
122
- <?php endif; ?>
123
-
124
- </div>
125
- </div>
126
-
127
-
128
  </div><!-- Uid -->
1
+ <?php
2
+ echo parse_link(
3
+ array(
4
+ get_field('acfb_team_name_typo'),
5
+ get_field('acfb_team_position_typo'),
6
+ get_field('acfb_team_description_typo')
7
+ )
8
+ );
9
+
10
+ $acfb_team_inner_padding = acfb_padding_name('acfb_team_inner_padding');
11
+ $acfb_team_padding = acfb_padding_name('acfb_team_padding');
12
+ $acfb_team_margin = acfb_margin_name('acfb_team_margin');
13
+ $acfb_team_name_typo = acfb_ffaimly_name('acfb_team_name_typo');
14
+ $acfb_team_position_typo = acfb_ffaimly_name('acfb_team_position_typo');
15
+ $acfb_team_description_typo = acfb_ffaimly_name('acfb_team_description_typo');
16
+
17
+
18
+ $uid = $block['id'];
19
+
20
+ $className = 'acfb_team_block';
21
+ if( !empty($block['className']) ) {
22
+ $className .= ' ' . $block['className'];
23
+ }
24
+ if( !empty($block['align']) ) {
25
+ $className .= ' align' . $block['align'];
26
+ }
27
+ ?>
28
+ <div class="<?php echo $uid; ?> <?php echo esc_attr($className); ?>">
29
+ <style type="text/css">
30
+ .<?php echo $uid; ?>{
31
+ <?php echo get_padding_field($acfb_team_padding); ?>
32
+ <?php echo get_margin_field($acfb_team_margin); ?>
33
+ }
34
+
35
+ .<?php echo $uid; ?> .acfb_team_wrap{
36
+ background: <?php the_field('acfb_team_background_color'); ?>;
37
+ padding-top: <?php echo $acfb_team_inner_padding['padding_top']; ?>px;
38
+ padding-bottom: <?php echo $acfb_team_inner_padding['padding_bottom']; ?>px;
39
+ padding-left: <?php echo $acfb_team_inner_padding['padding_left']; ?>px;
40
+ padding-right: <?php echo $acfb_team_inner_padding['padding_right']; ?>px;
41
+ }
42
+
43
+ .<?php echo $uid; ?> .acfb_team_wrap.acfb_team_top{
44
+ <?php if(get_field('acfb_team_ha') == 'flex-start'): ?>
45
+ text-align: left;
46
+ justify-items: flex-start;
47
+ <?php endif; ?>
48
+
49
+ <?php if(get_field('acfb_team_ha') == 'center'): ?>
50
+ text-align: center;
51
+ justify-items: center;
52
+ <?php endif; ?>
53
+
54
+ <?php if(get_field('acfb_team_ha') == 'flex-end'): ?>
55
+ text-align: right;
56
+ justify-items: flex-end;
57
+ <?php endif; ?>
58
+
59
+ }
60
+
61
+ <?php if(get_field('acfb_team_image_position') == 'left' ): ?>
62
+ .<?php echo $uid; ?> .acfb_team_wrap.acfb_team_left{
63
+ align-items: <?php the_field('acfb_team_image_v_alignment'); ?>;
64
+ }
65
+ <?php endif; ?>
66
+
67
+
68
+ .<?php echo $uid; ?> .acfb_team_wrap .acfb_team_avatar{
69
+ width: <?php the_field('acfb_team_image_size'); ?>px;
70
+ height: <?php the_field('acfb_team_image_size'); ?>px;
71
+ }
72
+
73
+ .<?php echo $uid; ?> .acfb_team_wrap .acfb_team_avatar img{
74
+ border-radius: <?php the_field('acfb_team_image_radius'); ?>%;
75
+ }
76
+
77
+ .<?php echo $uid; ?> .acfb_team_wrap .acfb_team_info .acfb_team_name{
78
+ color: <?php the_field('acfb_team_name_color'); ?>;
79
+ <?php echo get_typo_field($acfb_team_name_typo); ?>
80
+ }
81
+
82
+ .<?php echo $uid; ?> .acfb_team_wrap .acfb_team_info .acfb_team_position{
83
+ color: <?php the_field('acfb_team_position_color'); ?>;
84
+ <?php echo get_typo_field($acfb_team_position_typo); ?>
85
+ }
86
+
87
+ .<?php echo $uid; ?> .acfb_team_wrap .acfb_team_info .acfb_team_description{
88
+ color: <?php the_field('acfb_team_description_color'); ?>;
89
+ <?php echo get_typo_field($acfb_team_description_typo); ?>
90
+ }
91
+
92
+ </style>
93
+
94
+
95
+ <?php
96
+ $acfb_image = '';
97
+ if(!get_field('acfb_team_image')){
98
+ $acfb_image = plugins_url() . '/acf-blocks/img/placeholder-image.jpg';
99
+ } else{
100
+ $acfb_image = get_field('acfb_team_image');
101
+ }
102
+ ?>
103
+
104
+ <div class="acfb_team_wrap acfb_team_<?php the_field('acfb_team_image_position') ?>">
105
+ <div class="acfb_team_avatar">
106
+ <img src="<?php echo $acfb_image; ?>" alt="<?php the_field('acfb_team_image_alt'); ?>">
107
+ </div>
108
+ <div class="acfb_team_info">
109
+
110
+ <?php if(get_field('acfb_team_name')): ?>
111
+ <h4 class="acfb_team_name"><?php the_field('acfb_team_name'); ?></h4>
112
+ <?php endif; ?>
113
+
114
+ <?php if(get_field('acfb_team_position')): ?>
115
+ <span class="acfb_team_position"><?php the_field('acfb_team_position'); ?></span>
116
+ <?php endif; ?>
117
+
118
+ <?php if(get_field('acfb_team_description')): ?>
119
+ <p class="acfb_team_description">
120
+ <?php the_field('acfb_team_description'); ?>
121
+ </p>
122
+ <?php endif; ?>
123
+
124
+ </div>
125
+ </div>
126
+
127
+
128
  </div><!-- Uid -->
acfblocks-templates/free/acfb-toggle.php CHANGED
@@ -1,57 +1,57 @@
1
- <?php
2
- echo parse_link(
3
- array(
4
- get_field('acfb_toggle_title_typo'),
5
- get_field('acfb_toggle_content_typo')
6
- )
7
- );
8
-
9
-
10
- $acfb_toggle_padding = acfb_padding_name('acfb_toggle_padding');
11
- $acfb_toggle_margin = acfb_margin_name('acfb_toggle_margin');
12
- $acfb_toggle_title_typo = acfb_ffaimly_name('acfb_toggle_title_typo');
13
- $acfb_toggle_content_typo = acfb_ffaimly_name('acfb_toggle_content_typo');
14
-
15
-
16
- $uid = $block['id'];
17
-
18
- $className = 'acfb_toggle_block';
19
- if( !empty($block['className']) ) {
20
- $className .= ' ' . $block['className'];
21
- }
22
- if( !empty($block['align']) ) {
23
- $className .= ' align' . $block['align'];
24
- }
25
-
26
- ?>
27
-
28
- <div class="<?php echo $uid; ?> <?php echo esc_attr($className); ?>">
29
- <style>
30
- .<?php echo $uid; ?> {
31
- <?php echo get_padding_field($acfb_toggle_padding); ?>
32
- <?php echo get_margin_field($acfb_toggle_margin); ?>
33
- }
34
- .<?php echo $uid; ?> .acfb_toggle_title{
35
- background: <?php the_field('acfb_toggle_title_background'); ?>;
36
- color: <?php the_field('acfb_toggle_title_color'); ?>;
37
- <?php echo get_typo_field($acfb_toggle_title_typo); ?>
38
- text-align: <?php the_field('acfb_toogle_title_alignment'); ?>;
39
- }
40
-
41
- .<?php echo $uid; ?> .acfb_toggle_title:hover{
42
- background: <?php the_field('acfb_toggle_title_hover_background'); ?>;
43
- color: <?php the_field('acfb_toggle_title_hover_color'); ?>;
44
- }
45
-
46
- .<?php echo $uid; ?> .acfb_toggle_content {
47
- background: <?php the_field('acfb_toggle_content_background'); ?>;
48
- color: <?php the_field('acfb_toggle_content_color'); ?>;
49
- <?php echo get_typo_field($acfb_toggle_content_typo); ?>
50
- }
51
- </style>
52
-
53
- <button class="acfb_toggle_title"><?php the_field('acfb_toggle_title'); ?></button>
54
- <div class="acfb_toggle_content"><?php the_field('acfb_toggle_content'); ?></div>
55
-
56
-
57
  </div><!-- Uid -->
1
+ <?php
2
+ echo parse_link(
3
+ array(
4
+ get_field('acfb_toggle_title_typo'),
5
+ get_field('acfb_toggle_content_typo')
6
+ )
7
+ );
8
+
9
+
10
+ $acfb_toggle_padding = acfb_padding_name('acfb_toggle_padding');
11
+ $acfb_toggle_margin = acfb_margin_name('acfb_toggle_margin');
12
+ $acfb_toggle_title_typo = acfb_ffaimly_name('acfb_toggle_title_typo');
13
+ $acfb_toggle_content_typo = acfb_ffaimly_name('acfb_toggle_content_typo');
14
+
15
+
16
+ $uid = $block['id'];
17
+
18
+ $className = 'acfb_toggle_block';
19
+ if( !empty($block['className']) ) {
20
+ $className .= ' ' . $block['className'];
21
+ }
22
+ if( !empty($block['align']) ) {
23
+ $className .= ' align' . $block['align'];
24
+ }
25
+
26
+ ?>
27
+
28
+ <div class="<?php echo $uid; ?> <?php echo esc_attr($className); ?>">
29
+ <style>
30
+ .<?php echo $uid; ?> {
31
+ <?php echo get_padding_field($acfb_toggle_padding); ?>
32
+ <?php echo get_margin_field($acfb_toggle_margin); ?>
33
+ }
34
+ .<?php echo $uid; ?> .acfb_toggle_title{
35
+ background: <?php the_field('acfb_toggle_title_background'); ?>;
36
+ color: <?php the_field('acfb_toggle_title_color'); ?>;
37
+ <?php echo get_typo_field($acfb_toggle_title_typo); ?>
38
+ text-align: <?php the_field('acfb_toogle_title_alignment'); ?>;
39
+ }
40
+
41
+ .<?php echo $uid; ?> .acfb_toggle_title:hover{
42
+ background: <?php the_field('acfb_toggle_title_hover_background'); ?>;
43
+ color: <?php the_field('acfb_toggle_title_hover_color'); ?>;
44
+ }
45
+
46
+ .<?php echo $uid; ?> .acfb_toggle_content {
47
+ background: <?php the_field('acfb_toggle_content_background'); ?>;
48
+ color: <?php the_field('acfb_toggle_content_color'); ?>;
49
+ <?php echo get_typo_field($acfb_toggle_content_typo); ?>
50
+ }
51
+ </style>
52
+
53
+ <button class="acfb_toggle_title"><?php the_field('acfb_toggle_title'); ?></button>
54
+ <div class="acfb_toggle_content"><?php the_field('acfb_toggle_content'); ?></div>
55
+
56
+
57
  </div><!-- Uid -->
admin/admin-script.js CHANGED
@@ -1,34 +1,34 @@
1
- (function($){
2
- $().ready(function(){
3
- $(document).on('click' , '.acf-range-wrap', function() {
4
-
5
- let range = $(this).find('input[type="range"]');
6
- let number = $(this).find('input[type="number"]');
7
-
8
- // console.log(range);
9
-
10
-
11
- range.change(function() {
12
-
13
- // console.log($(this).val());
14
- number.val($(this).val());
15
- });
16
-
17
- });
18
- $(document).on('input', '.acfb-checkbox-true-false', function() {
19
- const v = $(this).val();
20
- v === '0' ? $(this).val('1') : $(this).val('0');
21
- const field = $(this).parents('.acfb_cs_field_root').find('.acfb_cs_field_main');
22
- v !== '1' ? field.show() : field.hide();
23
- });
24
-
25
- $(document).on('click', '.acf-label', function() {
26
-
27
- $(this).parent().find('.acfb-checkbox-true-false')[0].click();
28
-
29
- });
30
-
31
-
32
- });
33
- })(jQuery);
34
-
1
+ (function($){
2
+ $().ready(function(){
3
+ $(document).on('click' , '.acf-range-wrap', function() {
4
+
5
+ let range = $(this).find('input[type="range"]');
6
+ let number = $(this).find('input[type="number"]');
7
+
8
+ // console.log(range);
9
+
10
+
11
+ range.change(function() {
12
+
13
+ // console.log($(this).val());
14
+ number.val($(this).val());
15
+ });
16
+
17
+ });
18
+ $(document).on('input', '.acfb-checkbox-true-false', function() {
19
+ const v = $(this).val();
20
+ v === '0' ? $(this).val('1') : $(this).val('0');
21
+ const field = $(this).parents('.acfb_cs_field_root').find('.acfb_cs_field_main');
22
+ v !== '1' ? field.show() : field.hide();
23
+ });
24
+
25
+ $(document).on('click', '.acf-label', function() {
26
+
27
+ $(this).parent().find('.acfb-checkbox-true-false')[0].click();
28
+
29
+ });
30
+
31
+
32
+ });
33
+ })(jQuery);
34
+
admin/admin-styles.css CHANGED
@@ -1,159 +1,159 @@
1
- .settings_page_editorskit-getting-started #wpcontent {
2
- padding-left: 0
3
- }
4
-
5
- .acfb-settings-wrap {
6
- color: #111
7
- }
8
-
9
- .acfb-settings-wrap .components-panel {
10
- min-height: 100vh
11
- }
12
-
13
- .acfb-settings-wrap .components-panel .components-panel__header {
14
- border: 0;
15
- padding: 0;
16
- display: block;
17
- height: auto
18
- }
19
-
20
- .acfb-settings-wrap .components-panel .components-panel__header h2 {
21
- font-size: 45px;
22
- line-height: 1;
23
- font-weight: 300;
24
- padding-bottom: 10px;
25
- margin: 0;
26
- text-align: center;
27
- }
28
-
29
- .acfb-settings-wrap .components-panel .components-panel__header code {
30
- margin-left: 5px;
31
- border-radius: 2px;
32
- font-size: 11px;
33
- font-weight: 400;
34
- font-family: inherit;
35
- background-color: #e5e5e5;
36
- color: #000;
37
- opacity: .7
38
- }
39
-
40
- .acfb-settings-wrap .components-panel .components-panel__header p {
41
- color: #333;
42
- font-size: 18px;
43
- margin-bottom: 50px;
44
- text-align: center;
45
- width: 80%;
46
- margin: 20px auto 40px auto;
47
- }
48
-
49
- .acfb-settings-wrap .components-panel .components-panel__header .acfb-panel__header-hint {
50
- font-size: 12px;
51
- opacity: .4;
52
- margin: 0 0 40px;
53
- padding: 0
54
- }
55
-
56
- .acfb-settings-wrap .components-panel .components-panel__header iframe{
57
- display: block;
58
- margin: auto;
59
- }
60
-
61
- .acfb-settings-wrap .components-panel .components-panel__body {
62
- padding: 25px 50px 50px
63
- }
64
-
65
- .acfb_admin_call_to {
66
- background: #ffffff;
67
- margin: 50px;
68
- padding: 50px;
69
- font-size: 18px;
70
- line-height: 1.5;
71
- text-align: center;
72
- color: #444
73
- }
74
-
75
- @media screen and (max-width:768px) {
76
- .acfb_admin_call_to {
77
- margin-left: 0;
78
- margin-right: 0
79
- }
80
- }
81
-
82
-
83
- .acfb_admin_button{
84
- padding: 20px 30px;
85
- background: #23282d;
86
- color: white;
87
- font-family: inherit;
88
- text-decoration: none;
89
- width: max-content;
90
- margin: 20px auto 0 auto;
91
- display: block;
92
- font-size: 22px;
93
- border-radius: 100px;
94
- }
95
-
96
- .acfb_admin_button:hover{
97
- background: #1d2125;
98
- color: white;
99
- }
100
-
101
-
102
- .acfb_admin_templib{
103
- background-image: linear-gradient(rgba(0,0,0,0.61), rgba(0,0,0,0.61)), url("../img/temp-lib.png");
104
- background-size: cover;
105
- min-height: 300px;
106
- padding: 30px 30px;
107
- margin: 50px;
108
- }
109
-
110
- .acfb_admin_templib h1, .acfb_admin_templib p{
111
- color: #ffffff !important;
112
- padding: 0;
113
- width: 100% !important;
114
- }
115
-
116
- .acfb_admin_templib h1{
117
- font-size: 25px;
118
- font-weight: 400;
119
- font-family: 'Poppins', sans-serif;
120
- }
121
-
122
- .acfb_admin_templib p{
123
- font-size: 15px !important;
124
- font-family: 'Poppins', sans-serif;
125
- width: 465px !important;
126
- display: block;
127
- margin: 5px 0 30px 0 !important;
128
- text-align: left !important;
129
- }
130
-
131
- .acfb_admin_templib_button a{
132
- background-color: #4dd6be;
133
- color: #000000;
134
- font-family: 'Poppins', sans-serif;
135
- font-weight: 600;
136
- border-radius: 100px;
137
- text-transform: uppercase;
138
- font-size: 16px;
139
- letter-spacing: 3px;
140
- padding: 15px 20px;
141
- text-decoration: none;
142
- }
143
-
144
- .acfb_admin_templib_button a:first-child{
145
- margin-right: 10px;
146
- }
147
-
148
- .acfb_admin_templib_button a:hover{
149
- background-color: #48c9b1;
150
- }
151
-
152
-
153
-
154
-
155
- .acfb_button_group_svg{
156
- width: 20px;
157
- height: 20px;
158
- display: flex;
159
  }
1
+ .settings_page_editorskit-getting-started #wpcontent {
2
+ padding-left: 0
3
+ }
4
+
5
+ .acfb-settings-wrap {
6
+ color: #111
7
+ }
8
+
9
+ .acfb-settings-wrap .components-panel {
10
+ min-height: 100vh
11
+ }
12
+
13
+ .acfb-settings-wrap .components-panel .components-panel__header {
14
+ border: 0;
15
+ padding: 0;
16
+ display: block;
17
+ height: auto
18
+ }
19
+
20
+ .acfb-settings-wrap .components-panel .components-panel__header h2 {
21
+ font-size: 45px;
22
+ line-height: 1;
23
+ font-weight: 300;
24
+ padding-bottom: 10px;
25
+ margin: 0;
26
+ text-align: center;
27
+ }
28
+
29
+ .acfb-settings-wrap .components-panel .components-panel__header code {
30
+ margin-left: 5px;
31
+ border-radius: 2px;
32
+ font-size: 11px;
33
+ font-weight: 400;
34
+ font-family: inherit;
35
+ background-color: #e5e5e5;
36
+ color: #000;
37
+ opacity: .7
38
+ }
39
+
40
+ .acfb-settings-wrap .components-panel .components-panel__header p {
41
+ color: #333;
42
+ font-size: 18px;
43
+ margin-bottom: 50px;
44
+ text-align: center;
45
+ width: 80%;
46
+ margin: 20px auto 40px auto;
47
+ }
48
+
49
+ .acfb-settings-wrap .components-panel .components-panel__header .acfb-panel__header-hint {
50
+ font-size: 12px;
51
+ opacity: .4;
52
+ margin: 0 0 40px;
53
+ padding: 0
54
+ }
55
+
56
+ .acfb-settings-wrap .components-panel .components-panel__header iframe{
57
+ display: block;
58
+ margin: auto;
59
+ }
60
+
61
+ .acfb-settings-wrap .components-panel .components-panel__body {
62
+ padding: 25px 50px 50px
63
+ }
64
+
65
+ .acfb_admin_call_to {
66
+ background: #ffffff;
67
+ margin: 50px;
68
+ padding: 50px;
69
+ font-size: 18px;
70
+ line-height: 1.5;
71
+ text-align: center;
72
+ color: #444
73
+ }
74
+
75
+ @media screen and (max-width:768px) {
76
+ .acfb_admin_call_to {
77
+ margin-left: 0;
78
+ margin-right: 0
79
+ }
80
+ }
81
+
82
+
83
+ .acfb_admin_button{
84
+ padding: 20px 30px;
85
+ background: #23282d;
86
+ color: white;
87
+ font-family: inherit;
88
+ text-decoration: none;
89
+ width: max-content;
90
+ margin: 20px auto 0 auto;
91
+ display: block;
92
+ font-size: 22px;
93
+ border-radius: 100px;
94
+ }
95
+
96
+ .acfb_admin_button:hover{
97
+ background: #1d2125;
98
+ color: white;
99
+ }
100
+
101
+
102
+ .acfb_admin_templib{
103
+ background-image: linear-gradient(rgba(0,0,0,0.61), rgba(0,0,0,0.61)), url("../img/temp-lib.png");
104
+ background-size: cover;
105
+ min-height: 300px;
106
+ padding: 30px 30px;
107
+ margin: 50px;
108
+ }
109
+
110
+ .acfb_admin_templib h1, .acfb_admin_templib p{
111
+ color: #ffffff !important;
112
+ padding: 0;
113
+ width: 100% !important;
114
+ }
115
+
116
+ .acfb_admin_templib h1{
117
+ font-size: 25px;
118
+ font-weight: 400;
119
+ font-family: 'Poppins', sans-serif;
120
+ }
121
+
122
+ .acfb_admin_templib p{
123
+ font-size: 15px !important;
124
+ font-family: 'Poppins', sans-serif;
125
+ width: 465px !important;
126
+ display: block;
127
+ margin: 5px 0 30px 0 !important;
128
+ text-align: left !important;
129
+ }
130
+
131
+ .acfb_admin_templib_button a{
132
+ background-color: #4dd6be;
133
+ color: #000000;
134
+ font-family: 'Poppins', sans-serif;
135
+ font-weight: 600;
136
+ border-radius: 100px;
137
+ text-transform: uppercase;
138
+ font-size: 16px;
139
+ letter-spacing: 3px;
140
+ padding: 15px 20px;
141
+ text-decoration: none;
142
+ }
143
+
144
+ .acfb_admin_templib_button a:first-child{
145
+ margin-right: 10px;
146
+ }
147
+
148
+ .acfb_admin_templib_button a:hover{
149
+ background-color: #48c9b1;
150
+ }
151
+
152
+
153
+
154
+
155
+ .acfb_button_group_svg{
156
+ width: 20px;
157
+ height: 20px;
158
+ display: flex;
159
  }
css/acfblocks.css CHANGED
@@ -1,3259 +1,3259 @@
1
- /************ Testimonial CSS ************/
2
- .acfb_testimonial_wrap {
3
- padding: 5%;
4
- border-radius: 5px;
5
- }
6
-
7
- .acfb_testimonial_wrap .acfb_testimonial_bio {
8
- display: flex;
9
- align-items: center;
10
- margin-top: 20px;
11
- }
12
-
13
- .acfb_testimonial_wrap .acfb_testimonial_bio .acfb_testimonial_avatar_wrap {
14
- border-radius: 100%;
15
- margin-right: 15px;
16
- }
17
-
18
- .acfb_testimonial_wrap .acfb_testimonial_bio .acfb_testimonial_avatar {
19
- object-fit: cover;
20
- height: 100%;
21
- width: 100%;
22
- position: relative;
23
- z-index: 10;
24
- border-radius: 100%;
25
- z-index: 5;
26
- }
27
-
28
- .acfb_testimonial_wrap .acfb_testimonial_bio .acfb_testimonial_name {
29
- font-weight: 700;
30
- line-height: 1.2;
31
- margin: 0;
32
- padding: 0;
33
- }
34
-
35
- /************ Team CSS ************/
36
- .acfb_team_wrap.acfb_team_top {
37
- display: grid;
38
- grid-template-columns: 100%;
39
- }
40
-
41
- .acfb_team_wrap.acfb_team_left {
42
- display: grid;
43
- grid-gap: 25px;
44
- grid-template-columns: auto auto;
45
- }
46
-
47
- .acfb_team_wrap.acfb_team_left .acfb_team_info{
48
- margin-top: 0 !important;
49
- }
50
-
51
- .acfb_team_wrap {
52
- padding: 60px 35px;
53
- }
54
-
55
- .acfb_team_wrap .acfb_team_avatar img {
56
- object-fit: cover;
57
- height: 100%;
58
- width: 100%;
59
- }
60
- .acfb_team_wrap .acfb_team_info {
61
- margin-top: 20px;
62
- }
63
-
64
- .acfb_team_wrap .acfb_team_info .acfb_team_position{
65
- margin-bottom: 10px;
66
- display: block;
67
- }
68
-
69
- /************ Star Rating CSS ************/
70
- .acfb_star_rating {
71
- display: flex;
72
- align-items: center;
73
- }
74
-
75
- .acfb_star_rating .acfb_star:before {
76
- content: "\f155";
77
- font-family: dashicons;
78
- }
79
-
80
- /************ Progress Bar CSS ************/
81
- .acfb_progress_wrapper .acfb_progress_bar_title {
82
- display: block;
83
- margin-bottom: 5px;
84
- }
85
-
86
- .acfb_progress_wrapper .acfb_inner_wrap {
87
- position: relative;
88
- }
89
-
90
- .acfb_progress_wrapper .acfb_progress_bar {
91
- display: -webkit-box;
92
- display: -webkit-flex;
93
- display: -ms-flexbox;
94
- display: flex;
95
- padding: 7px 15px;
96
- }
97
-
98
- .acfb_progress_wrapper .acfb_progress_bar .acfb_progress_text {
99
- -webkit-box-flex: 1;
100
- -webkit-flex-grow: 1;
101
- -ms-flex-positive: 1;
102
- flex-grow: 1;
103
- white-space: nowrap;
104
- overflow: hidden;
105
- -o-text-overflow: ellipsis;
106
- text-overflow: ellipsis;
107
- }
108
-
109
- /************ Pricing Box CSS ************/
110
- .acfb_pricing_table_wrap {
111
- font-family: Lato, sans-serif;
112
- text-align: center;
113
- padding: 60px 35px;
114
- border-radius: 12px;
115
- }
116
-
117
- .acfb_pricing_table_wrap .acfb_pricing_table_imgicon{
118
- margin-bottom: 15px;
119
- }
120
-
121
- .acfb_pricing_table_wrap .acfb_pricing_box_title {
122
- font-weight: 700;
123
- }
124
- .acfb_pricing_table_wrap .acfb_pricing_box_price_wrapper {
125
- margin: 20px 0;
126
- }
127
- .acfb_pricing_table_wrap .acfb_pricing_box_price_line {
128
- display: flex;
129
- justify-content: center;
130
- }
131
- .acfb_pricing_table_wrap
132
- .acfb_pricing_box_price_line
133
- .acfb_pricing_box_price_prefix {
134
- align-self: flex-start;
135
- }
136
- .acfb_pricing_table_wrap .acfb_pricing_box_price_line .acfb_pricing_box_price {
137
- line-height: 100% !important;
138
- }
139
- .acfb_pricing_table_wrap
140
- .acfb_pricing_box_price_line
141
- .acfb_pricing_box_price_suffix {
142
- align-self: flex-end;
143
- }
144
- .acfb_pricing_table_wrap .acfb_pricing_box_subprice {
145
- text-transform: uppercase;
146
- line-height: 100% !important;
147
- }
148
- .acfb_pricing_table_wrap .acfb_pricing_box_button a {
149
- border-radius: 7px;
150
- align-items: center;
151
- font-weight: 600;
152
- cursor: pointer;
153
- padding: 10px 25px;
154
- display: inline-block;
155
- margin: 15px 0;
156
- text-decoration: none;
157
- }
158
-
159
- /************ Price List CSS ************/
160
- .acfb_price_list_wrap .acfb_price_list_item {
161
- display: grid;
162
- grid-column-gap: 15px;
163
- text-decoration: none;
164
- }
165
-
166
- .acfb_price_list_wrap .acfb_price_list_item .acfb_price_list_image{
167
- grid-area: acfbPli;
168
- }
169
-
170
- .acfb_price_list_wrap .acfb_price_list_item .acfb_price_list_text{
171
- grid-area: acfbPlt;
172
- }
173
-
174
- .acfb_price_list_wrap .acfb_price_list_item .acfb_price_list_image img{
175
- width: 100%;
176
- }
177
-
178
- .acfb_price_list_wrap .acfb_price_list_item .acfb_price_list_text .acfb_price_list_header .acfb_price_list_title{grid-area: acfbPlTitle;}
179
- .acfb_price_list_wrap .acfb_price_list_item .acfb_price_list_text .acfb_price_list_header .acfb_price_list_separator{grid-area: acfbPlSep;}
180
- .acfb_price_list_wrap .acfb_price_list_item .acfb_price_list_text .acfb_price_list_header .acfb_price_list_price{grid-area: acfbPlPrice;}
181
-
182
- .acfb_price_list_wrap
183
- .acfb_price_list_item
184
- .acfb_price_list_text
185
- .acfb_price_list_header {
186
- display: grid;
187
- grid-template-columns: max-content auto max-content;
188
- align-items: center;
189
- grid-gap: 15px;
190
- font-weight: 600;
191
- }
192
-
193
- .acfb_price_list_wrap
194
- .acfb_price_list_item
195
- .acfb_price_list_text
196
- p.acfb_price_list_description {
197
- margin-top: 10px;
198
- }
199
-
200
- /************ Multi Button CSS ************/
201
- .acfb_multibuttons_wrap {
202
- display: flex;
203
- flex-direction: row;
204
- }
205
- .acfb_multibuttons_wrap .acfb_button {
206
- padding: 15px 20px;
207
- display: inline-block;
208
- text-decoration: none;
209
- margin-bottom: 5px;
210
- }
211
-
212
- .acfb_multibuttons_wrap .acfb_button:last-child{
213
- margin-right: 0;
214
- }
215
-
216
- /************ Counter Number CSS ************/
217
- .acfb_counter_number_wrapper {
218
- display: -webkit-box;
219
- display: -webkit-flex;
220
- display: -ms-flexbox;
221
- display: flex;
222
- font-weight: 600;
223
- line-height: 1;
224
- }
225
-
226
- .acfb_counter_number_wrapper .acfb_counter_number_prefix {
227
- text-align: right;
228
- }
229
-
230
- .acfb_counter_number_wrapper .acfb_counter_number_suffix {
231
- text-align: left;
232
- }
233
-
234
- .acfb_counter_number_wrapper .acfb_counter_number_prefix,
235
- .acfb_counter_number_wrapper .acfb_counter_number_suffix {
236
- -webkit-box-flex: 1;
237
- -webkit-flex-grow: 1;
238
- -ms-flex-positive: 1;
239
- flex-grow: 1;
240
- white-space: pre-wrap;
241
- }
242
-
243
- .acfb_counter .acfb_counter_title {
244
- text-align: center;
245
- font-weight: 400;
246
- line-height: 2.5;
247
- }
248
-
249
- /************ Click To Tweet CSS ************/
250
- .acfb_click_to_tweet {
251
- display: block;
252
- -moz-border-radius: 4px;
253
- border-radius: 4px;
254
- padding: 15px 30px;
255
- text-align: left;
256
- }
257
-
258
- .acfb_click_to_tweet a {
259
- display: block;
260
- text-decoration: none;
261
- text-transform: none;
262
- cursor: pointer;
263
- line-height: 140%;
264
- letter-spacing: 0.05em;
265
- }
266
-
267
- .acfb_click_to_tweet a:hover,
268
- .acfb_click_to_tweet:hover a:after {
269
- text-decoration: none;
270
- }
271
-
272
- .acfb_click_to_tweet a:before {
273
- content: "";
274
- display: inline-block;
275
- width: 50px;
276
- height: 50px;
277
- vertical-align: bottom;
278
- background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10,7L8,11H11V17H5V11L7,7H10M18,7L16,11H19V17H13V11L15,7H18Z' fill='%23666'/%3E%3C/svg%3E")
279
- no-repeat right center;
280
- }
281
-
282
- .acfb_click_to_tweet a:after {
283
- margin-top: 20px;
284
- padding-right: 25px;
285
- position: relative;
286
- display: block;
287
- text-transform: uppercase;
288
- text-align: right;
289
- text-decoration: none;
290
- transition: all 0.5s ease;
291
- line-height: 20px;
292
- background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M22.46,6C21.69,6.35 20.86,6.58 20,6.69C20.88,6.16 21.56,5.32 21.88,4.31C21.05,4.81 20.13,5.16 19.16,5.36C18.37,4.5 17.26,4 16,4C13.65,4 11.73,5.92 11.73,8.29C11.73,8.63 11.77,8.96 11.84,9.27C8.28,9.09 5.11,7.38 3,4.79C2.63,5.42 2.42,6.16 2.42,6.94C2.42,8.43 3.17,9.75 4.33,10.5C3.62,10.5 2.96,10.3 2.38,10C2.38,10 2.38,10 2.38,10.03C2.38,12.11 3.86,13.85 5.82,14.24C5.46,14.34 5.08,14.39 4.69,14.39C4.42,14.39 4.15,14.36 3.89,14.31C4.43,16 6,17.26 7.89,17.29C6.43,18.45 4.58,19.13 2.56,19.13C2.22,19.13 1.88,19.11 1.54,19.07C3.44,20.29 5.7,21 8.12,21C16,21 20.33,14.46 20.33,8.79C20.33,8.6 20.33,8.42 20.32,8.23C21.16,7.63 21.88,6.87 22.46,6Z' fill='%2300abf0'/%3E%3C/svg%3E")
293
- no-repeat right center;
294
- }
295
-
296
- /************ Posts CSS ************/
297
-
298
- .acfb_posts_block {
299
- }
300
-
301
- .acfb_posts_block .acfb_post {
302
- padding: 20px;
303
- }
304
-
305
- .acfb_posts_block .acfb_post_grid {
306
- display: grid;
307
- grid-gap: 10px;
308
- }
309
-
310
- .acfb_posts_block .acfb_post_grid .acfb_post {
311
- overflow: hidden;
312
- }
313
-
314
- .acfb_posts_block .acfb_post_grid .acfb_post .acfb_post_thumbnail img,
315
- .acfb_posts_block .acfb_post_list .acfb_post .acfb_post_list_thumbnail img{
316
- width: 100%;
317
- height: auto;
318
- }
319
-
320
- .acfb_posts_block .acfb_post_list .acfb_post {
321
- display: grid;
322
- grid-gap: 20px;
323
- grid-template-columns: 50% 50%;
324
- margin-bottom: 10px;
325
- }
326
-
327
- .acfb_posts_block .acfb_post_list .acfb_post.no_thumb {
328
- grid-template-columns: 1fr;
329
- }
330
-
331
- .acfb_posts_block .acfb_post .acfb_post_thumbnail,
332
- .acfb_posts_block .acfb_post .acfb_post_title,
333
- .acfb_posts_block .acfb_post .acfb_post_meta,
334
- .acfb_posts_block .acfb_post .acfb_post_excerpt,
335
- .acfb_posts_block .acfb_post .acfb_post_button {
336
- margin-bottom: 15px;
337
- }
338
-
339
- .acfb_posts_block .acfb_post .acfb_post_title h1,
340
- .acfb_posts_block .acfb_post .acfb_post_title h2,
341
- .acfb_posts_block .acfb_post .acfb_post_title h3,
342
- .acfb_posts_block .acfb_post .acfb_post_title h4,
343
- .acfb_posts_block .acfb_post .acfb_post_title h5,
344
- .acfb_posts_block .acfb_post .acfb_post_title h6 {
345
- margin: 0;
346
- }
347
-
348
- .acfb_posts_block .acfb_post div:nth-last-of-type(1) {
349
- margin-bottom: 0;
350
- }
351
-
352
- .acfb_posts_block .acfb_post_2 {
353
- grid-template-columns: 1fr 1fr;
354
- }
355
-
356
- .acfb_posts_block .acfb_post_3 {
357
- grid-template-columns: 1fr 1fr 1fr;
358
- }
359
-
360
- .acfb_posts_block .acfb_post_4 {
361
- grid-template-columns: 1fr 1fr 1fr 1fr;
362
- }
363
-
364
- .acfb_posts_block .acfb_post_5 {
365
- grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
366
- }
367
-
368
- .acfb_posts_block .acfb_post_6 {
369
- grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr;
370
- }
371
-
372
- .acfb_posts_block .acfb_post .acfb_post_btn {
373
- text-decoration: none;
374
- display: inline-block;
375
- }
376
-
377
- @media only screen and (max-width: 767px) {
378
- .acfb_posts_block .acfb_post_2,
379
- .acfb_posts_block .acfb_post_3,
380
- .acfb_posts_block .acfb_post_4,
381
- .acfb_posts_block .acfb_post_5,
382
- .acfb_posts_block .acfb_post_6 {
383
- grid-template-columns: 1fr;
384
- }
385
-
386
- .acfb_posts_block .acfb_post_list .acfb_post {
387
- grid-template-columns: 1fr;
388
- }
389
- }
390
-
391
- /************ Photo Collage CSS ************/
392
-
393
- /* Two Gird Style 1*/
394
- .acfb_two-grid-style-one {
395
- display: grid;
396
- grid-template-columns: 1fr 1fr;
397
- grid-template-rows: 1fr;
398
- grid-template-areas: "one two";
399
- }
400
-
401
- /* Two Gird Style 2*/
402
- .acfb_two-grid-style-two {
403
- display: grid;
404
- grid-template-columns: 1fr;
405
- grid-template-rows: 1fr 1fr;
406
- grid-template-areas: "one" "two";
407
- }
408
-
409
- .acfb_collage_2 .acfb_one {
410
- grid-area: one;
411
- background-size: cover;
412
- background-position: center;
413
- }
414
- .acfb_collage_2 .acfb_two {
415
- grid-area: two;
416
- background-size: cover;
417
- background-position: center;
418
- }
419
-
420
- /* Three Gird Style 1*/
421
- .acfb_three-grid-style-one {
422
- display: grid;
423
- grid-template-columns: 1fr 1fr;
424
- grid-template-rows: 1fr 1fr;
425
- grid-template-areas: "one one" "two three";
426
- }
427
-
428
- /* Three Gird Style 2*/
429
- .acfb_three-grid-style-two {
430
- display: grid;
431
- grid-template-columns: 1fr 1fr;
432
- grid-template-rows: 1fr 1fr;
433
- grid-template-areas: "one two" "three three";
434
- }
435
-
436
- /* Three Gird Style 3 */
437
- .acfb_three-grid-style-three {
438
- display: grid;
439
- grid-template-columns: 1fr 1fr;
440
- grid-template-rows: 1fr 1fr;
441
- grid-template-areas: "one two" "one three";
442
- }
443
-
444
- /* Three Gird Style 4 */
445
- .acfb_three-grid-style-four {
446
- display: grid;
447
- grid-template-columns: 1fr 1fr;
448
- grid-template-rows: 1fr 1fr;
449
- grid-template-areas: "two one" "three one";
450
- }
451
-
452
- /* Three Gird Style 5 */
453
- .acfb_three-grid-style-five {
454
- display: grid;
455
- grid-template-columns: 1fr 1fr;
456
- grid-template-rows: 1fr 1fr 1fr;
457
- grid-template-areas: "one one" "two two" "three three";
458
- }
459
-
460
- /* Three Gird Style 6 */
461
- .acfb_three-grid-style-six {
462
- display: grid;
463
- grid-template-columns: 1fr 1fr 1fr;
464
- grid-template-rows: 1fr 1fr;
465
- grid-template-areas: "one two three" "one two three";
466
- }
467
-
468
- .acfb_collage_3 .acfb_one {
469
- grid-area: one;
470
- background-size: cover;
471
- background-position: center;
472
- }
473
- .acfb_collage_3 .acfb_two {
474
- grid-area: two;
475
- background-size: cover;
476
- background-position: center;
477
- }
478
- .acfb_collage_3 .acfb_three {
479
- grid-area: three;
480
- background-size: cover;
481
- background-position: center;
482
- }
483
-
484
- /* Four Gird Style 1 */
485
- .acfb_four-grid-style-one {
486
- display: grid;
487
- grid-template-columns: 1fr 1fr;
488
- grid-template-rows: 1fr 1fr 1fr 1fr;
489
- grid-template-areas: "one one" "two two" "three three" "four four";
490
- }
491
-
492
- /* Four Gird Style 2 */
493
- .acfb_four-grid-style-two {
494
- display: grid;
495
- grid-template-columns: 1fr 1fr 1fr 1fr;
496
- grid-template-rows: 1fr 1fr;
497
- grid-template-areas: "one two three four" "one two three four";
498
- }
499
-
500
- /* Four Gird Style 3 */
501
- .acfb_four-grid-style-three {
502
- display: grid;
503
- grid-template-columns: 1fr 1fr 1fr;
504
- grid-template-rows: 1fr 1fr;
505
- grid-template-areas: "one one one" "two three four";
506
- }
507
-
508
- /* Four Gird Style 4 */
509
- .acfb_four-grid-style-four {
510
- display: grid;
511
- grid-template-columns: 1fr 1fr 1fr;
512
- grid-template-rows: 1fr 1fr;
513
- grid-template-areas: "one two three" "four four four";
514
- }
515
-
516
- /* Four Gird Style 5 */
517
- .acfb_four-grid-style-five {
518
- display: grid;
519
- grid-template-columns: 1fr 1fr;
520
- grid-template-rows: 1fr 1fr 1fr;
521
- grid-template-areas: "one two" "one three" "one four";
522
- }
523
-
524
- /* Four Gird Style 6 */
525
- .acfb_four-grid-style-six {
526
- display: grid;
527
- grid-template-columns: 1fr 1fr;
528
- grid-template-rows: 1fr 1fr 1fr;
529
- grid-template-areas: "one four" "two four" "three four";
530
- }
531
-
532
- /* Four Gird Style 7 */
533
- .acfb_four-grid-style-seven {
534
- display: grid;
535
- grid-template-columns: 1fr 1fr 1fr;
536
- grid-template-rows: 1fr 1fr;
537
- grid-template-areas: "one one two" "three four four";
538
- }
539
-
540
- /* Four Gird Style 8 */
541
- .acfb_four-grid-style-eight {
542
- display: grid;
543
- grid-template-columns: 1fr 1fr 1fr;
544
- grid-template-rows: 1fr 1fr;
545
- grid-template-areas: "one two two" "three three four";
546
- }
547
-
548
- /* Four Gird Style 9 */
549
- .acfb_four-grid-style-nine {
550
- display: grid;
551
- grid-template-columns: 1fr 1fr;
552
- grid-template-rows: 1fr 1fr 1fr;
553
- grid-template-areas: "one three" "one four" "two four";
554
- }
555
-
556
- /* Four Gird Style 10 */
557
- .acfb_four-grid-style-ten {
558
- display: grid;
559
- grid-template-columns: 1fr 1fr;
560
- grid-template-rows: 1fr 1fr 1fr;
561
- grid-template-areas: "one three" "two three" "two four";
562
- }
563
-
564
- /* Four Gird Style 11 */
565
- .acfb_four-grid-style-eleven {
566
- display: grid;
567
- grid-template-columns: 1fr 1fr;
568
- grid-template-rows: 1fr 1fr 1fr;
569
- grid-template-areas: "one two" "three three" "four four";
570
- }
571
-
572
- /* Four Gird Style 12 */
573
- .acfb_four-grid-style-twelve {
574
- display: grid;
575
- grid-template-columns: 1fr 1fr;
576
- grid-template-rows: 1fr 1fr 1fr;
577
- grid-template-areas: "one one" "two three" "four four";
578
- }
579
-
580
- /* Four Gird Style 13 */
581
- .acfb_four-grid-style-thirteen {
582
- display: grid;
583
- grid-template-columns: 1fr 1fr;
584
- grid-template-rows: 1fr 1fr 1fr;
585
- grid-template-areas: "one one" "two two" "three four";
586
- }
587
-
588
- /* Four Gird Style 14 */
589
- .acfb_four-grid-style-fourteen {
590
- display: grid;
591
- grid-template-columns: 1fr 1fr 1fr;
592
- grid-template-rows: 1fr 1fr;
593
- grid-template-areas: "one three four" "two three four";
594
- }
595
-
596
- /* Four Gird Style 15 */
597
- .acfb_four-grid-style-fifteen {
598
- display: grid;
599
- grid-template-columns: 1fr 1fr;
600
- grid-template-rows: 1fr 1fr;
601
- grid-template-areas: "one three" "two four";
602
- }
603
-
604
- .acfb_collage_4 .acfb_one {
605
- grid-area: one;
606
- background-size: cover;
607
- background-position: center;
608
- }
609
- .acfb_collage_4 .acfb_two {
610
- grid-area: two;
611
- background-size: cover;
612
- background-position: center;
613
- }
614
- .acfb_collage_4 .acfb_three {
615
- grid-area: three;
616
- background-size: cover;
617
- background-position: center;
618
- }
619
- .acfb_collage_4 .acfb_four {
620
- grid-area: four;
621
- background-size: cover;
622
- background-position: center;
623
- }
624
-
625
- .acfb_radio_image .acf-input .acf-radio-list:before,
626
- .acfb_radio_image .acf-input .acf-radio-list:after {
627
- content: none;
628
- }
629
-
630
- .acfb_radio_image .acf-input .acf-radio-list {
631
- display: grid;
632
- grid-template-columns: 1fr 1fr 1fr 1fr;
633
- grid-gap: 10px;
634
- }
635
-
636
- .acfb_radio_image .acf-input .acf-radio-list li input {
637
- display: none;
638
- }
639
-
640
- .acfb_radio_image .acf-input .acf-radio-list li .selected img {
641
- border: 2px solid #48a8f4;
642
- }
643
-
644
- .acfb_svg_icon {
645
- fill: none;
646
- stroke: #555d66;
647
- stroke-linecap: round;
648
- stroke-linejoin: round;
649
- stroke-width: 2px;
650
- }
651
-
652
-
653
- /************ Social Sharing CSS ************/
654
-
655
- .acfb_social_sharing_main_block a:hover {
656
- opacity: 0.9 !important;
657
- }
658
-
659
- .acfb_social_networks ul.acf-checkbox-list li {
660
- width: calc(100% / 7.7);
661
- display: inline-block;
662
- }
663
-
664
- .acfb_social_networks ul.acf-checkbox-list li img.acfb_social_icons {
665
- width: 100%;
666
- }
667
-
668
- .acfb_social_networks ul.acf-checkbox-list:nth-child(n + 11) {
669
- width: 100%;
670
- display: flex;
671
- flex-direction: row;
672
- }
673
-
674
- .acfb_social_networks ul.acf-radio-list li input[type="checkbox"],
675
- .acfb_social_networks ul.acf-radio-list li input[type="radio"],
676
- .acfb_social_networks ul.acf-checkbox-list li input[type="checkbox"],
677
- .acfb_social_networks ul.acf-checkbox-list li input[type="radio"] {
678
- display: none;
679
- visibility: hidden;
680
- }
681
-
682
-
683
- .acfb_social_sharing_main_block a {
684
- padding: 10px;
685
- font-size: 16px;
686
- border-radius: 2px;
687
- border: 0;
688
- color: white;
689
- outline: 0;
690
- text-decoration: none !important;
691
- text-align: center;
692
- margin: 5px 3px;
693
- }
694
-
695
- .acfb_social_sharing_main_block a > span {
696
- cursor: pointer;
697
- }
698
-
699
- .acfb_social_networks .acf-checkbox-list label:not(.selected) svg {
700
- background: white !important;
701
- }
702
-
703
- .acfb_social_networks .acf-checkbox-list label:not(.selected) svg path {
704
- fill: #555d66;
705
- }
706
-
707
- .acfb_social_sharing_main_block {
708
- display: flex;
709
- flex-direction: row;
710
- flex-wrap: wrap;
711
- }
712
-
713
- svg.acfb_facebook,
714
- svg.acfb_twitter,
715
- svg.acfb_pinterest,
716
- svg.acfb_hackernews,
717
- svg.acfb_email,
718
- svg.acfb_linkedin,
719
- svg.acfb_reddit,
720
- svg.acfb_xing,
721
- svg.acfb_whatsapp,
722
- svg.acfb_vk,
723
- svg.acfb_telegram {
724
- width: 20px;
725
- }
726
-
727
- .acfb_social_facebook_main span,
728
- .acfb_social_twitter_main span,
729
- .acfb_social_pinterest_main span,
730
- .acfb_social_hackernews_main span,
731
- .acfb_social_email_main span,
732
- .acfb_social_linkedin_main span,
733
- .acfb_social_reddit_main span,
734
- .acfb_social_xing_main span,
735
- .acfb_social_whatsapp_main span,
736
- .acfb_social_vk_main span,
737
- .acfb_social_telegram_main span {
738
- vertical-align: top !important;
739
- color: white;
740
- }
741
-
742
- .acfb_social_facebook_main {
743
- background: #3b5998 !important;
744
- }
745
-
746
- .acfb_social_twitter_main {
747
- background-color: #38a1f3 !important;
748
- }
749
-
750
- .acfb_social_email_main {
751
- background-color: #777 !important;
752
- }
753
-
754
- .acfb_social_pinterest_main {
755
- background-color: #c8232c !important;
756
- }
757
-
758
- .acfb_social_linkedin_main {
759
- background-color: #0077b5 !important;
760
- }
761
-
762
- .acfb_social_reddit_main {
763
- background-color: #ff4500 !important;
764
- }
765
-
766
- .acfb_social_xing_main {
767
- background-color: #1a7576 !important;
768
- }
769
- .acfb_social_whatsapp_main {
770
- background-color: #25d366 !important;
771
- }
772
-
773
- .acfb_social_hackernews_main {
774
- background-color: #f60 !important;
775
- }
776
-
777
- .acfb_social_vk_main {
778
- background-color: #507299 !important;
779
- }
780
-
781
- .acfb_social_telegram_main {
782
- background-color: #54a9eb !important;
783
- }
784
-
785
- svg.acfb_social_icons {
786
- background: grey;
787
- padding: 5px 5px;
788
- margin: 0px 4px;
789
- }
790
-
791
- svg.acfb_social_icons path {
792
- fill: white;
793
- }
794
-
795
- .acfb_social_sharing_main_block svg {
796
- vertical-align: sub;
797
- }
798
-
799
-
800
- /************ Image Slider CSS ************/
801
- .acfb_slider_block{}
802
-
803
- .acfb_slider_block .swiper-container{}
804
-
805
- .acfb_slider_block .swiper-container .swiper-wrapper{}
806
-
807
- .acfb_slider_block .swiper-container .swiper-wrapper .swiper-slide{
808
- position: relative;
809
- }
810
-
811
- .acfb_slider_block .swiper-container .swiper-wrapper .swiper-slide img{
812
- align-self: center;
813
- }
814
-
815
- .acfb_slider_block .swiper-container .swiper-wrapper .swiper-slide .acfb_caption{
816
- position: absolute;
817
- padding: 10px;
818
- }
819
-
820
- .acfb_slider_block .swiper-container .acfb-button-next, .acfb_slider_block .swiper-container .acfb-button-prev{
821
- position: absolute;
822
- top: 50%;
823
- width: 58px;
824
- margin-top: -22px;
825
- z-index: 10;
826
- cursor: pointer;
827
- background: rgba(255, 255, 255, 0.7);
828
- padding: 15px;
829
- border-radius: 5px;
830
- line-height: 1;
831
- }
832
-
833
- .acfb_slider_block .swiper-container .acfb-button-next path, .acfb_slider_block .swiper-container .acfb-button-prev path{
834
- fill: #191e23;
835
- }
836
-
837
- .acfb_slider_block .swiper-container .acfb-button-next{
838
- right: 10px;
839
- left: auto;
840
- }
841
-
842
- .acfb_slider_block .swiper-container .acfb-button-prev{
843
- left: 10px;
844
- right: auto;
845
- }
846
-
847
- .acfb_slider_block .swiper-container .swiper-pagination .swiper-pagination-bullet-active{
848
- background: #191e23 !important;
849
- }
850
-
851
- /************ Tab CSS ************/
852
- .acfb_tabs_block ul {
853
- overflow: hidden;
854
- margin:0 !important;
855
- padding:0 !important;
856
- }
857
-
858
- .acfb_tabs_block ul li{
859
- float:left;
860
- display:inline-block;
861
- }
862
-
863
- .acfb_tabs_block ul li:last-child {
864
- border-right:none;
865
- }
866
-
867
- .acfb_tabs_block ul li:first-child {
868
- padding-left:0;
869
- }
870
-
871
- .acfb_tabs_block ul li a {
872
- text-align:center;
873
- display:block;
874
- text-decoration: none;
875
- padding: 15px 20px;
876
- line-height: 16px;
877
- outline: none;
878
- cursor: pointer;
879
- }
880
-
881
- .acfb_tabs_block .acfb_tab_content{
882
- padding: 20px;
883
- }
884
-
885
-
886
- /************ Toggle CSS ************/
887
- .acfb_toggle_block .acfb_toggle_title{
888
- width: 100%;
889
- border: none;
890
- padding: 10px 20px;
891
- outline: none;
892
- cursor: pointer;
893
- }
894
-
895
- .acfb_toggle_block .acfb_toggle_title:hover{
896
- width: 100%;
897
- border: none;
898
- }
899
-
900
- .acfb_toggle_block .acfb_toggle_content {
901
- display:none;
902
- padding: 25px;
903
- }
904
-
905
-
906
- /************ Accordion CSS ************/
907
- .acfb_accordion_block .acfb_accordion .acfb_accordion_title{
908
- display: block;
909
- font-weight: 600;
910
- padding: 10px 20px;
911
- outline: none;
912
- }
913
-
914
- .acfb_accordion_block .acfb_accordion .acfb_accordion_title:focus{
915
- box-shadow: none;
916
- }
917
-
918
- .acfb_accordion_block .acfb_accordion .acfb_accordion_content{
919
- display:none;
920
- padding: 25px;
921
- }
922
-
923
- .acfb_accordion_block .acfb_accordion .acfb_accordion_content .acfb_accordion_content_inner{
924
- display: flex;
925
- }
926
-
927
-
928
- /************ Scrollable Image CSS ************/
929
- .acfb_scrollable_image{
930
- transition: background-position 1.5s ease-out 0.5s;
931
- background-position: top center;
932
- background-repeat: no-repeat;
933
- background-size: 100%;
934
- }
935
-
936
- .acfb_scrollable_image:hover{
937
- background-position: bottom center!important;
938
- }
939
-
940
-
941
-
942
-
943
- /************ Flip Box CSS ************/
944
-
945
- /* Flip Box Flip */
946
- .acfb_flip_box_block .acfb_box_inner h3{margin: 10px;}
947
- .acfb_flip_box_block .acfb_box_inner p{margin: 0 0 0 10px; }
948
- .acfb_flip_box_block .acfb_box_inner .acfb_flipbox_back a{
949
- cursor: pointer;
950
- padding: 10px 25px;
951
- display: inline-block;
952
- margin: 15px 0 0 0;
953
- text-decoration: none;
954
- }
955
-
956
- .acfb_flip .acfb_box_inner{
957
- -webkit-perspective: 1000px;
958
- perspective: 1000px;
959
- -webkit-transform-style: preserve-3d;
960
- transform-style: preserve-3d;
961
- position: relative;
962
- -webkit-box-sizing: border-box;
963
- box-sizing: border-box;
964
- }
965
-
966
- .acfb_flip .acfb_box_inner .acfb_flipbox_front, .acfb_flip .acfb_box_inner .acfb_flipbox_back{
967
- -webkit-transform-style: preserve-3d;
968
- transform-style: preserve-3d;
969
- -webkit-backface-visibility: hidden;
970
- backface-visibility: hidden;
971
- position: absolute;
972
- width: 100%;
973
- height: 100%;
974
- -webkit-transition: all .6s ease-in-out;
975
- -o-transition: all .6s ease-in-out;
976
- transition: all .6s ease-in-out;
977
- }
978
-
979
- .acfb_flip .acfb_box_inner .acfb_flipbox_front{
980
- -webkit-transform: none;
981
- -ms-transform: none;
982
- transform: none;
983
- z-index: 1;
984
- }
985
-
986
- /* Flip Left */
987
- .acfb_flip.acfb_left .acfb_box_inner:hover .acfb_flipbox_front{
988
- -webkit-transform: rotateX(0) rotateY(-180deg);
989
- transform: rotateX(0) rotateY(-180deg);
990
- }
991
-
992
- .acfb_flip.acfb_left .acfb_box_inner .acfb_flipbox_back{
993
- -webkit-transform: rotateX(0) rotateY(180deg);
994
- transform: rotateX(0) rotateY(180deg);
995
- }
996
-
997
- /* Flip Right */
998
- .acfb_flip.acfb_right .acfb_box_inner:hover .acfb_flipbox_front{
999
- -webkit-transform: rotateX(0) rotateY(180deg);
1000
- transform: rotateX(0) rotateY(180deg);
1001
- }
1002
- .acfb_flip.acfb_right .acfb_box_inner .acfb_flipbox_back{
1003
- -webkit-transform: rotateX(0) rotateY(-180deg);
1004
- transform: rotateX(0) rotateY(-180deg);
1005
- }
1006
-
1007
- /* Flip Up */
1008
- .acfb_flip.acfb_up .acfb_box_inner:hover .acfb_flipbox_front{
1009
- -webkit-transform: rotateX(180deg) rotateY(0);
1010
- transform: rotateX(180deg) rotateY(0);
1011
- }
1012
- .acfb_flip.acfb_up .acfb_box_inner .acfb_flipbox_back{
1013
- -webkit-transform: rotateX(-180deg) rotateY(0);
1014
- transform: rotateX(-180deg) rotateY(0);
1015
- }
1016
-
1017
- /* Flip Down */
1018
- .acfb_flip.acfb_down .acfb_box_inner:hover .acfb_flipbox_front{
1019
- -webkit-transform: rotateX(-180deg) rotateY(0);
1020
- transform: rotateX(-180deg) rotateY(0);
1021
- }
1022
- .acfb_flip.acfb_down .acfb_box_inner .acfb_flipbox_back{
1023
- -webkit-transform: rotateX(180deg) rotateY(0);
1024
- transform: rotateX(180deg) rotateY(0);
1025
- }
1026
-
1027
- .acfb_flip .acfb_box_inner:hover .acfb_flipbox_back{
1028
- -webkit-transform: none;
1029
- -ms-transform: none;
1030
- transform: none;
1031
- }
1032
-
1033
- /* Flip Box Slide */
1034
- .acfb_slide .acfb_box_inner{
1035
- overflow: hidden;
1036
- position: relative;
1037
- perspective: 1000px;
1038
- transform-style: preserve-3d;
1039
- }
1040
-
1041
- .acfb_slide .acfb_box_inner .acfb_flipbox_front, .acfb_slide .acfb_box_inner .acfb_flipbox_back{
1042
- position: absolute;
1043
- width: 100%;
1044
- height: 100%;
1045
- transition: all 0.6s ease-in-out 0s;
1046
- }
1047
-
1048
-
1049
- /* Slide Left */
1050
- .acfb_slide.acfb_left .acfb_box_inner .acfb_flipbox_back{
1051
- transform: translateX(100%) translateY(0px);
1052
- }
1053
-
1054
- /* Slide Right */
1055
- .acfb_slide.acfb_right .acfb_box_inner .acfb_flipbox_back{
1056
- transform: translateX(-100%) translateY(0px);
1057
- }
1058
-
1059
- /* Slide Up */
1060
- .acfb_slide.acfb_up .acfb_box_inner .acfb_flipbox_back{
1061
- transform: translateX(0px) translateY(100%);
1062
- }
1063
-
1064
- /* Slide Down */
1065
- .acfb_slide.acfb_down .acfb_box_inner .acfb_flipbox_back{
1066
- transform: translateX(0px) translateY(-100%);
1067
- }
1068
-
1069
- .acfb_slide .acfb_box_inner:hover .acfb_flipbox_back{
1070
- transform: none;
1071
- }
1072
-
1073
- /* Flip Box Push */
1074
- .acfb_push{
1075
- overflow: hidden;
1076
- }
1077
-
1078
- .acfb_push .acfb_box_inner{
1079
- overflow: hidden;
1080
- position: relative;
1081
- perspective: 1000px;
1082
- transform-style: preserve-3d;
1083
- }
1084
-
1085
- .acfb_push .acfb_box_inner .acfb_flipbox_front, .acfb_push .acfb_box_inner .acfb_flipbox_back{
1086
- position: absolute;
1087
- width: 100%;
1088
- height: 100%;
1089
- transition: all 0.6s ease-in-out 0s;
1090
- }
1091
-
1092
- .acfb_push .acfb_box_inner .acfb_flipbox_front{
1093
- transform: none;
1094
- }
1095
-
1096
- /* Slide Left */
1097
- .acfb_push.acfb_left .acfb_box_inner .acfb_flipbox_back{
1098
- transform: translateX(100%) translateY(0px);
1099
- }
1100
-
1101
- .acfb_push.acfb_left .acfb_box_inner:hover .acfb_flipbox_front{
1102
- transform: translateX(-100%) translateY(0px);
1103
- }
1104
-
1105
- /* Slide Right */
1106
- .acfb_push.acfb_right .acfb_box_inner .acfb_flipbox_back{
1107
- transform: translateX(-100%) translateY(0px);
1108
- }
1109
-
1110
- .acfb_push.acfb_right .acfb_box_inner:hover .acfb_flipbox_front{
1111
- transform: translateX(100%) translateY(0px);
1112
- }
1113
-
1114
- /* Slide Up */
1115
- .acfb_push.acfb_up .acfb_box_inner .acfb_flipbox_back{
1116
- transform: translateX(0px) translateY(100%);
1117
- }
1118
-
1119
- .acfb_push.acfb_up .acfb_box_inner:hover .acfb_flipbox_front{
1120
- transform: translateX(0px) translateY(-100%);
1121
- }
1122
-
1123
- /* Slide Down */
1124
- .acfb_push.acfb_down .acfb_box_inner .acfb_flipbox_back{
1125
- transform: translateX(0px) translateY(-100%);
1126
- }
1127
-
1128
- .acfb_push.acfb_down .acfb_box_inner:hover .acfb_flipbox_front{
1129
- transform: translateX(0px) translateY(100%);
1130
- }
1131
-
1132
- .acfb_push .acfb_box_inner:hover .acfb_flipbox_back{
1133
- transform: none;
1134
- }
1135
-
1136
-
1137
- /************ Timeline CSS ************/
1138
- .acfb_timeline .acfb_timeline_inner .acfb_timeline_content .acfb_timeline_image,
1139
- .acfb_timeline .acfb_timeline_inner .acfb_timeline_content .acfb_timeline_date,
1140
- .acfb_timeline .acfb_timeline_inner .acfb_timeline_content .acfb_timeline_title,
1141
- .acfb_timeline .acfb_timeline_inner .acfb_timeline_content .acfb_timeline_desc,
1142
- .acfb_timeline .acfb_timeline_inner .acfb_timeline_content .acfb_timeline_button{
1143
- margin: 10px 0;
1144
- }
1145
- .acfb_timeline .acfb_timeline_inner .acfb_timeline_content .acfb_timeline_desc p{margin: 0;}
1146
-
1147
-
1148
- .acfb_timeline .acfb_timeline_button{
1149
- cursor: pointer;
1150
- padding: 10px 25px;
1151
- display: inline-block;
1152
- margin: 15px 0;
1153
- text-decoration: none;
1154
- }
1155
-
1156
-
1157
- /* Left Timeline*/
1158
- .acfb_left_timeline{
1159
- position: relative;
1160
- }
1161
-
1162
- .acfb_left_timeline::after{
1163
- content: '';
1164
- position: absolute;
1165
- width: 4px;
1166
- top: 0;
1167
- bottom: 0;
1168
- left: 0%;
1169
- margin-left: -2px;
1170
- }
1171
-
1172
- .acfb_left_timeline .acfb_timeline_inner{
1173
- position: relative;
1174
- width: 100%;
1175
- }
1176
-
1177
- .acfb_left_timeline .acfb_timeline_inner::after{
1178
- content: '';
1179
- position: absolute;
1180
- width: 25px;
1181
- height: 25px;
1182
- right: -12px;
1183
- top: 15px;
1184
- border-radius: 50%;
1185
- z-index: 1;
1186
- }
1187
-
1188
- .acfb_left_timeline .acfb_timeline_inner .acfb_timeline_content{
1189
- padding: 20px 30px;
1190
- position: relative;
1191
- display: flex;
1192
- flex-direction: column;
1193
- align-items: flex-start;
1194
- }
1195
-
1196
-
1197
- .acfb_left_timeline .acfb_timeline_inner{
1198
- left: 0%;
1199
- padding: 10px 0px 10px 40px;
1200
- text-align: left;
1201
- }
1202
-
1203
- .acfb_left_timeline .acfb_timeline_inner::before{
1204
- content: " ";
1205
- height: 0;
1206
- position: absolute;
1207
- top: 22px;
1208
- width: 0;
1209
- z-index: 1;
1210
- left: 30px;
1211
- border: medium solid #f3f4f5;
1212
- border-width: 10px 10px 10px 0;
1213
- }
1214
-
1215
- .acfb_left_timeline .acfb_timeline_inner::after{
1216
- left: -12px;
1217
- }
1218
-
1219
- /* Center Timeline*/
1220
- .acfb_center_timeline{
1221
- position: relative;
1222
- }
1223
-
1224
- .acfb_center_timeline::after{
1225
- content: '';
1226
- position: absolute;
1227
- width: 4px;
1228
- top: 0;
1229
- bottom: 0;
1230
- left: 50%;
1231
- margin-left: -2px;
1232
- }
1233
-
1234
- .acfb_center_timeline .acfb_timeline_inner{
1235
- position: relative;
1236
- width: 50%;
1237
- }
1238
-
1239
- .acfb_center_timeline .acfb_timeline_inner::after{
1240
- content: '';
1241
- position: absolute;
1242
- width: 25px;
1243
- height: 25px;
1244
- right: -12px;
1245
- top: 15px;
1246
- border-radius: 50%;
1247
- z-index: 1;
1248
- }
1249
-
1250
- .acfb_center_timeline .acfb_timeline_inner .acfb_timeline_content{
1251
- position: relative;
1252
- }
1253
-
1254
- .acfb_center_timeline .acfb_timeline_inner:nth-child(odd){
1255
- left: 0;
1256
- padding: 10px 40px 10px 0px;
1257
- }
1258
-
1259
- .acfb_center_timeline .acfb_timeline_inner:nth-child(odd) .acfb_timeline_content{
1260
- text-align: right;
1261
- display: flex;
1262
- flex-direction: column;
1263
- align-items: flex-end;
1264
- }
1265
-
1266
- .acfb_center_timeline .acfb_timeline_inner:nth-child(odd)::before{
1267
- content: " ";
1268
- height: 0;
1269
- position: absolute;
1270
- top: 22px;
1271
- width: 0;
1272
- z-index: 1;
1273
- right: 30px;
1274
- border: medium solid #f3f4f5;
1275
- border-width: 10px 0 10px 10px;
1276
- }
1277
-
1278
- .acfb_center_timeline .acfb_timeline_inner:nth-child(even){
1279
- left: 50%;
1280
- padding: 10px 0px 10px 40px;
1281
- text-align: left;
1282
- }
1283
-
1284
- .acfb_center_timeline .acfb_timeline_inner:nth-child(even) .acfb_timeline_content{
1285
- text-align: left;
1286
- display: flex;
1287
- flex-direction: column;
1288
- align-items: flex-start;
1289
- }
1290
-
1291
- .acfb_center_timeline .acfb_timeline_inner:nth-child(even)::before{
1292
- content: " ";
1293
- height: 0;
1294
- position: absolute;
1295
- top: 22px;
1296
- width: 0;
1297
- z-index: 1;
1298
- left: 30px;
1299
- border: medium solid #f3f4f5;
1300
- border-width: 10px 10px 10px 0;
1301
- }
1302
-
1303
- .acfb_center_timeline .acfb_timeline_inner:nth-child(even)::after{
1304
- left: -12px;
1305
- }
1306
-
1307
- @media screen and (max-width: 767px) {
1308
- .acfb_center_timeline .acfb_timeline_inner .acfb_timeline_content{
1309
- text-align: left;
1310
- }
1311
-
1312
- .acfb_center_timeline .acfb_timeline_inner{
1313
- width: 100%;
1314
- }
1315
-
1316
- .acfb_center_timeline::after, .acfb_center_timeline .acfb_timeline_inner:nth-child(even){
1317
- left: 0;
1318
- }
1319
-
1320
- .acfb_center_timeline .acfb_timeline_inner:nth-child(odd), .acfb_center_timeline .acfb_timeline_inner:nth-child(even){
1321
- padding: 10px 0px 10px 40px;
1322
- }
1323
-
1324
- .acfb_center_timeline .acfb_timeline_inner::after{
1325
- left: -12px;
1326
- }
1327
-
1328
- .acfb_center_timeline .acfb_timeline_inner:nth-child(odd)::before{
1329
- left: 30px;
1330
- border-width: 10px 10px 10px 0px;
1331
- }
1332
- }
1333
-
1334
- /* Right Timeline*/
1335
- .acfb_right_timeline{
1336
- position: relative;
1337
- }
1338
-
1339
- .acfb_right_timeline::after{
1340
- content: '';
1341
- position: absolute;
1342
- width: 4px;
1343
- top: 0;
1344
- bottom: 0;
1345
- right: 0%;
1346
- margin-right: -1px;
1347
- }
1348
-
1349
- .acfb_right_timeline .acfb_timeline_inner{
1350
- position: relative;
1351
- }
1352
-
1353
- .acfb_right_timeline .acfb_timeline_inner::after{
1354
- content: '';
1355
- position: absolute;
1356
- width: 25px;
1357
- height: 25px;
1358
- right: -12px;
1359
- top: 15px;
1360
- border-radius: 50%;
1361
- z-index: 1;
1362
- }
1363
-
1364
- .acfb_right_timeline .acfb_timeline_inner .acfb_timeline_content{
1365
- padding: 20px 30px;
1366
- position: relative;
1367
- display: flex;
1368
- flex-direction: column;
1369
- align-items: flex-end;
1370
- }
1371
-
1372
- .acfb_right_timeline .acfb_timeline_inner{
1373
- left: 0;
1374
- padding: 10px 40px 10px 0px;
1375
- text-align: right;
1376
- }
1377
-
1378
- .acfb_right_timeline .acfb_timeline_inner::before{
1379
- content: " ";
1380
- height: 0;
1381
- position: absolute;
1382
- top: 22px;
1383
- width: 0;
1384
- z-index: 1;
1385
- right: 30px;
1386
- border: medium solid #f3f4f5;
1387
- border-width: 10px 0 10px 10px;
1388
- }
1389
-
1390
-
1391
-
1392
-
1393
-
1394
-
1395
-
1396
-
1397
-
1398
-
1399
-
1400
- /************ Image Accordion CSS ************/
1401
- .acfb_image_accordion{
1402
- display: -webkit-box;
1403
- display: -webkit-flex;
1404
- display: -ms-flexbox;
1405
- display: flex;
1406
- }
1407
-
1408
- .acfb_image_accordion_item{
1409
- cursor: pointer;
1410
- -webkit-background-size: cover;
1411
- background-size: cover;
1412
- background-position: center;
1413
- background-repeat: no-repeat;
1414
- position: relative;
1415
- -webkit-box-flex: 1;
1416
- -webkit-flex: 1;
1417
- -ms-flex: 1;
1418
- flex: 1;
1419
- text-decoration: none;
1420
- -webkit-transition: -webkit-box-flex .4s,-webkit-flex .4s;
1421
- transition: -webkit-box-flex .4s,-webkit-flex .4s;
1422
- -o-transition: flex .4s;
1423
- transition: flex .4s;
1424
- transition: flex .4s,-webkit-box-flex .4s,-webkit-flex .4s,-ms-flex .4s;
1425
- overflow: hidden;
1426
- }
1427
-
1428
-
1429
- .acfb_image_accordion_overlay{
1430
- display: -webkit-box;
1431
- display: -webkit-flex;
1432
- display: -ms-flexbox;
1433
- display: flex;
1434
- -webkit-box-align: center;
1435
- -webkit-align-items: center;
1436
- -ms-flex-align: center;
1437
- /*align-items: center;*/
1438
- -webkit-box-pack: center;
1439
- -webkit-justify-content: center;
1440
- -ms-flex-pack: center;
1441
- /*justify-content: center;*/
1442
- position: absolute;
1443
- top: 0;
1444
- right: 0;
1445
- bottom: 0;
1446
- left: 0;
1447
- -webkit-transition: background-color .4s;
1448
- -o-transition: background-color .4s;
1449
- transition: background-color .4s;
1450
- }
1451
-
1452
- .acfb_image_accordion_overlay .acfb_image_accordion_wrap{
1453
- z-index: 1;
1454
- /* display: flex;
1455
- flex-direction: column;
1456
- align-items: center;*/
1457
- visibility: hidden;
1458
- }
1459
-
1460
- ./*acfb_image_accordion_content{
1461
- text-align: center;
1462
- }*/
1463
-
1464
- .acfb_image_accordion_content .acfb_image_accordion_title{
1465
- margin: 0 !important;
1466
- }
1467
-
1468
- .acfb_image_accordion_wrap *{
1469
- visibility: hidden;
1470
- opacity: 0;
1471
- -webkit-transform-style: preserve-3d;
1472
- transform-style: preserve-3d;
1473
- }
1474
-
1475
- .acfb_image_accordion_title{
1476
- -webkit-transform: translate3d(0,-60px,0);
1477
- transform: translate3d(0,-60px,0);
1478
- margin: 0;
1479
- }
1480
-
1481
- .acfb_image_accordion_description{
1482
- -webkit-transform: translate3d(0,60px,0);
1483
- transform: translate3d(0,60px,0);
1484
- margin: 10px 0 15px 0;
1485
- }
1486
-
1487
- .acfb_image_accordion_content .acfb_image_accordion_button{
1488
- cursor: pointer;
1489
- padding: 10px 25px;
1490
- display: inline-block;
1491
- text-decoration: none;
1492
- -webkit-transform: translate3d(0,60px,0);
1493
- transform: translate3d(0,60px,0);
1494
- }
1495
-
1496
-
1497
- .acfb_image_accordion_active .acfb_image_accordion_wrap{
1498
- visibility: visible;
1499
- }
1500
-
1501
-
1502
- .acfb_image_accordion_active .acfb_image_accordion_wrap *{
1503
- opacity: 1;
1504
- visibility: visible;
1505
- transform: none;
1506
- transition: all .3s .3s;
1507
- }
1508
-
1509
-
1510
- @media screen and (max-width: 767px) {
1511
- .acfb_image_accordion {
1512
- flex-direction: column !important;
1513
- }
1514
-
1515
- .acfb_image_accordion .acfb_image_accordion_item{
1516
- margin: 0 0 10px 0 !important;
1517
- }
1518
-
1519
- .acfb_image_accordion .acfb_image_accordion_item:last-child{
1520
- margin-bottom: 0 !important;
1521
- }
1522
- }
1523
-
1524
-
1525
-
1526
-
1527
-
1528
-
1529
-
1530
-
1531
-
1532
-
1533
-
1534
-
1535
-
1536
- /************ Call to Action CSS ************/
1537
- .acfb_call_to_action_block .acfb_cta_skin_classic .acfb_cta{
1538
- -ms-flex-wrap: wrap;
1539
- flex-wrap: wrap;
1540
- }
1541
-
1542
- .acfb_call_to_action_block .acfb_cta_skin_cover .acfb_cta{
1543
- display: block;
1544
- }
1545
-
1546
- .acfb_call_to_action_block .acfb_cta{
1547
- position: relative;
1548
- display: -webkit-box;
1549
- display: -ms-flexbox;
1550
- display: flex;
1551
- -webkit-transition: .5s;
1552
- -o-transition: .5s;
1553
- transition: .5s;
1554
- overflow: hidden;
1555
- }
1556
-
1557
- .acfb_call_to_action_block .acfb_cta_skin_classic .acfb_cta_bg_wrapper{
1558
- position: relative;
1559
- min-height: 200px;
1560
- width: 100%;
1561
- }
1562
-
1563
- .acfb_call_to_action_block .acfb_cta_skin_cover .acfb_cta_bg_wrapper{
1564
- position: absolute;
1565
- top: 0;
1566
- left: 0;
1567
- right: 0;
1568
- bottom: 0;
1569
- -webkit-transition: all .4s;
1570
- -o-transition: all .4s;
1571
- transition: all .4s;
1572
- width: 100%;
1573
- }
1574
-
1575
- .acfb_call_to_action_block .acfb_cta_bg_wrapper{
1576
- z-index: 1;
1577
- overflow: hidden;
1578
- }
1579
-
1580
- .acfb_call_to_action_block .acfb_cta_bg{
1581
- transition-duration: 1500ms;
1582
- -webkit-background-size: cover;
1583
- background-size: cover;
1584
- background-position: 50%;
1585
- z-index: 1;
1586
- will-change: transform;
1587
- position: absolute;
1588
- top: 0;
1589
- left: 0;
1590
- right: 0;
1591
- bottom: 0;
1592
- -webkit-transition: all .4s;
1593
- -o-transition: all .4s;
1594
- transition: all .4s;
1595
- }
1596
-
1597
- .acfb_call_to_action_block .acfb_cta_bg_overlay{
1598
- transition-duration: 1500ms;
1599
- z-index: 2;
1600
- position: absolute;
1601
- top: 0;
1602
- left: 0;
1603
- right: 0;
1604
- bottom: 0;
1605
- -webkit-transition: all .4s;
1606
- -o-transition: all .4s;
1607
- transition: all .4s;
1608
- }
1609
-
1610
- .acfb_call_to_action_block .acfb_cta_skin_classic .acfb_cta_content{
1611
- -webkit-transition: all .4s;
1612
- -o-transition: all .4s;
1613
- transition: all .4s;
1614
- width: 100%;
1615
- }
1616
-
1617
- .acfb_call_to_action_block .acfb_cta_content{
1618
- position: relative;
1619
- -webkit-transition: .5s;
1620
- -o-transition: .5s;
1621
- transition: .5s;
1622
- color: black;
1623
- z-index: 1;
1624
- overflow: hidden;
1625
- display: -webkit-box;
1626
- display: -ms-flexbox;
1627
- display: flex;
1628
- -ms-flex-wrap: wrap;
1629
- flex-wrap: wrap;
1630
- -webkit-box-align: center;
1631
- -ms-flex-align: center;
1632
- -ms-flex-line-pack: center;
1633
- /*align-content: center;*/
1634
- width: 100%;
1635
- flex-direction: column;
1636
- }
1637
-
1638
- .acfb_call_to_action_block .acfb_cta_button{
1639
- cursor: pointer;
1640
- padding: 10px 25px;
1641
- display: inline-block;
1642
- text-decoration: none;
1643
- }
1644
-
1645
- .acfb_call_to_action_block .acfb_cta_ribbon_wrap{
1646
- position: absolute;
1647
- z-index: 1;
1648
- top: 0;
1649
- left: auto;
1650
- right: 0;
1651
- -webkit-transform: rotate(90deg);
1652
- -ms-transform: rotate(90deg);
1653
- transform: rotate(90deg);
1654
- width: 150px;
1655
- overflow: hidden;
1656
- height: 150px;
1657
- }
1658
-
1659
- .acfb_call_to_action_block .acfb_cta_ribbon_left{
1660
- -webkit-transform: rotate(0);
1661
- -ms-transform: rotate(0);
1662
- transform: rotate(0);
1663
- left: 0;
1664
- right: auto;
1665
- }
1666
-
1667
- .acfb_call_to_action_block .acfb_cta_ribbon_right{
1668
- -webkit-transform: rotate(90deg);
1669
- -ms-transform: rotate(90deg);
1670
- transform: rotate(90deg);
1671
- left: auto;
1672
- right: 0;
1673
- }
1674
-
1675
- .acfb_call_to_action_block .acfb_cta_ribbon{
1676
- font-weight: 500;
1677
- text-align: center;
1678
- left: 0;
1679
- width: 200%;
1680
- -webkit-transform: translateY(-50%) translateX(-50%) translateX(35px) rotate(-45deg);
1681
- -ms-transform: translateY(-50%) translateX(-50%) translateX(35px) rotate(-45deg);
1682
- transform: translateY(-50%) translateX(-50%) translateX(35px) rotate(-45deg);
1683
- margin-top: 35px;
1684
- font-size: 13px;
1685
- line-height: 2;
1686
- font-weight: 800;
1687
- text-transform: uppercase;
1688
- }
1689
-
1690
-
1691
- .acfb_call_to_action_block .acfb_cta_image_left .acfb_cta{
1692
- -webkit-box-orient: horizontal;
1693
- -webkit-box-direction: normal;
1694
- -ms-flex-direction: row;
1695
- flex-direction: row;
1696
- }
1697
-
1698
- .acfb_call_to_action_block .acfb_cta_image_right .acfb_cta{
1699
- -webkit-box-orient: horizontal;
1700
- -webkit-box-direction: reverse;
1701
- flex-direction: row-reverse;
1702
- }
1703
-
1704
- .acfb_call_to_action_block .acfb_cta_image_left .acfb_cta, .acfb_call_to_action_block .acfb_cta_image_right .acfb_cta{
1705
- -ms-flex-wrap: nowrap;
1706
- flex-wrap: nowrap;
1707
- }
1708
-
1709
- .acfb_call_to_action_block .acfb_cta_image_left .acfb_cta_bg_wrapper, .acfb_call_to_action_block .acfb_cta_image_right .acfb_cta_bg_wrapper{
1710
- width: auto;
1711
- min-width: 50%;
1712
- }
1713
-
1714
- .acfb_call_to_action_block:hover .acfb_cta_bg{
1715
- -webkit-transform: scale(1.2);
1716
- -ms-transform: scale(1.2);
1717
- transform: scale(1.2);
1718
- }
1719
-
1720
- .acfb_call_to_action_block .acfb_cta_item{
1721
- transition-duration: 1000ms;
1722
- }
1723
-
1724
- .acfb_call_to_action_block .acfb_cta_skin_cover .acfb_cta_content{
1725
- /*pointer-events: none;*/
1726
- }
1727
-
1728
- .acfb_call_to_action_block .acfb_cta_skin_cover .acfb_cta_content:hover .acfb_cta_item{
1729
- -webkit-transform: scale(1.1);
1730
- -ms-transform: scale(1.1);
1731
- transform: scale(1.1);
1732
- }
1733
-
1734
- .acfb_call_to_action_block .acfb_cta_item, .acfb_call_to_action_block .acfb_cta_item p{
1735
- margin: 0 0 10px 0;
1736
- display: inline-block;
1737
- }
1738
-
1739
-
1740
-
1741
-
1742
-
1743
-
1744
-
1745
-
1746
-
1747
-
1748
-
1749
-
1750
-
1751
-
1752
-
1753
-
1754
-
1755
-
1756
- /************ Before After Image CSS ************/
1757
-
1758
-
1759
-
1760
-
1761
-
1762
-
1763
-
1764
-
1765
-
1766
-
1767
-
1768
-
1769
- /************ Image Hotspot CSS ************/
1770
- .acfb_ih_wrapper{
1771
- position: relative;
1772
- }
1773
-
1774
- .acfb_ih_wrapper .acfb_ih_image{
1775
- width: 100%;
1776
- }
1777
-
1778
- .acfb_ih_item {
1779
- position: absolute;
1780
- }
1781
-
1782
- .acfb_ih_item .acfb_ih_tooltip h4{
1783
- margin: 0;
1784
- }
1785
-
1786
- .acfb_ih_item .acfb_ih_tooltip p{
1787
- margin: 10px 0;
1788
- }
1789
-
1790
- .acfb_ih_item:hover, .acfb_ih_item:active {
1791
- z-index: 999;
1792
- }
1793
- .acfb_ih_item:hover .acfb_ih_tooltip, .acfb_ih_item:active .acfb_ih_tooltip {
1794
- display: block;
1795
- }
1796
-
1797
- .acfb_ih_item:hover .acfb_ih_pointer:after, .acfb_ih_item:active .acfb_ih_pointer:after {
1798
- border-color: transparent;
1799
- }
1800
- .acfb_ih_pointer {
1801
- padding: 0px;
1802
- border-radius: 100%;
1803
- box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
1804
- z-index: 999;
1805
- cursor: pointer;
1806
- }
1807
- .acfb_ih_pointer:after {
1808
- position: absolute;
1809
- top: 50%;
1810
- left: 50%;
1811
- transform: translate(-50%, -50%) scale(1, 1);
1812
- pointer-events: none;
1813
- content: "";
1814
- display: block;
1815
- border-radius: 100%;
1816
- opacity: 0;
1817
- transition: border-color 1s linear;
1818
- animation: button-pulse 4s linear infinite;
1819
- }
1820
- .acfb_ih_tooltip {
1821
- position: absolute;
1822
- padding: 15px;
1823
- background-color: white;
1824
- box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
1825
- z-index: -1;
1826
- display: none;
1827
- transition: opacity 0.1s linear;
1828
- }
1829
- .acfb_ih_tooltip h4, .acfb_ih_tooltip p, .acfb_ih_tooltip img {
1830
- margin: 0 0 10px 0;
1831
- }
1832
-
1833
- .acfb_ih_tooltip a {
1834
- cursor: pointer;
1835
- padding: 10px 25px;
1836
- display: inline-block;
1837
- text-decoration: none;
1838
- }
1839
-
1840
- .acfb_ih_tooltip:after{
1841
- height: 20px;
1842
- width: 20px;
1843
- -webkit-transform: rotate(45deg);
1844
- transform: rotate(45deg);
1845
- content: "";
1846
- display: block;
1847
- position: absolute;
1848
- background-size: cover;
1849
- }
1850
-
1851
- /* Tooltip Positions */
1852
- .acfb_ih_top {
1853
- -webkit-transform: translate(-50%,0px);
1854
- transform: translate(-50%,0px);
1855
- margin: 0 -400px 10px 0;
1856
- bottom: 110%;
1857
- left: 50%;
1858
- }
1859
-
1860
- .acfb_ih_top:after{
1861
- bottom: -10px;
1862
- left: 50%;
1863
- margin-left: -12px;
1864
- }
1865
-
1866
-
1867
- .acfb_ih_bottom {
1868
- -webkit-transform: translate(-50%,0px);
1869
- transform: translate(-50%,0px);
1870
- margin: 10px -400px 0 0;
1871
- top: 110%;
1872
- left: 50%;
1873
- }
1874
-
1875
- .acfb_ih_bottom:after{
1876
- top: -10px;
1877
- left: 50%;
1878
- margin-left: -12px;
1879
- }
1880
-
1881
-
1882
- .acfb_ih_left {
1883
- -webkit-transform: translate(0px,-50%);
1884
- transform: translate(0px,-50%);
1885
- margin: 0 10px 0 -400px;
1886
- top: 50%;
1887
- right: 110%;
1888
- }
1889
-
1890
- .acfb_ih_left:after{
1891
- top: 50%;
1892
- right: -10px;
1893
- margin-top: -8px;
1894
- }
1895
-
1896
-
1897
- .acfb_ih_right {
1898
- -webkit-transform: translate(0px,-50%);
1899
- transform: translate(0px,-50%);
1900
- margin: 0 -400px 0 10px;
1901
- top: 50%;
1902
- left: 110%;
1903
- }
1904
-
1905
- .acfb_ih_right:after{
1906
- top: 50%;
1907
- left: -10px;
1908
- margin-top: -8px;
1909
- }
1910
-
1911
-
1912
-
1913
-
1914
-
1915
- @keyframes button-pulse {
1916
- 0% {
1917
- transform: translate(-50%, -50%) scale(1, 1);
1918
- opacity: 0;
1919
- }
1920
- 20% {
1921
- transform: translate(-50%, -50%) scale(1.5, 1.5);
1922
- opacity: 0.9;
1923
- }
1924
- 50% {
1925
- transform: translate(-50%, -50%) scale(2, 2);
1926
- opacity: 0;
1927
- }
1928
- 100% {
1929
- transform: translate(-50%, -50%) scale(2, 2);
1930
- opacity: 0;
1931
- }
1932
- }
1933
-
1934
-
1935
-
1936
-
1937
-
1938
-
1939
- /************ Devices CSS ************/
1940
- /* Laptop Device */
1941
- .acfb_device_block{
1942
- display: flex;
1943
- }
1944
-
1945
- .acfb_device_type_laptop .acfb_device{
1946
- position: relative;
1947
- }
1948
-
1949
- .acfb_device_type_laptop .acfb_device_body svg{
1950
- display: block;
1951
- transform: rotate(0deg);
1952
- }
1953
-
1954
- .acfb_device_type_laptop .acfb_device_media{
1955
- position: absolute;
1956
- top: 6%;
1957
- width: 76%;
1958
- height: 84%;
1959
- left: 50%;
1960
- transition: all 0.3s cubic-bezier(.42,0,.2,1);
1961
- border-radius: 3px;
1962
- transform: translateX(-50%);
1963
- /*background: rgba(255,255,255,.2);*/
1964
- overflow: hidden;
1965
- display: -ms-flexbox;
1966
- display: flex;
1967
- border-radius: 3px;
1968
- transition: all 0.3s cubic-bezier(.42,0,.2,1);
1969
- z-index: 2;
1970
- align-items: flex-start;
1971
- flex-direction: row;
1972
- }
1973
-
1974
-
1975
- .acfb_device_type_laptop .acfb_device_media img{
1976
- width: 100%;
1977
- height: 100%;
1978
- object-fit: cover;
1979
- }
1980
-
1981
-
1982
- /* Tablet Device */
1983
- .acfb_device_type_tablet .acfb_device{
1984
- position: relative;
1985
- }
1986
-
1987
- .acfb_device_type_tablet .acfb_device_body svg{
1988
- display: block;
1989
- transform: rotate(0deg);
1990
- transition: all 0.3s cubic-bezier(.42,0,.2,1);
1991
- }
1992
-
1993
- .acfb_device_type_tablet .acfb_device_media{
1994
- position: absolute;
1995
- top: 7%;
1996
- left: 50%;
1997
- bottom: 38%;
1998
- transition: all 0.3s cubic-bezier(.42,0,.2,1);
1999
- transform: translateX(-50%);
2000
- width: 90.69767%;
2001
- height: 84%;
2002
- background: rgba(255,255,255,.2);
2003
- overflow: hidden;
2004
- display: -ms-flexbox;
2005
- display: flex;
2006
- border-radius: 3px;
2007
- transition: all 0.3s cubic-bezier(.42,0,.2,1);
2008
- z-index: 2;
2009
- align-items: flex-start;
2010
- flex-direction: row;
2011
- }
2012
-
2013
- .acfb_device_type_tablet .acfb_device_media img{
2014
- width: 100%;
2015
- height: 100%;
2016
- object-fit: cover;
2017
- }
2018
-
2019
-
2020
- /* Mobile Device */
2021
- .acfb_device_type_mobile .acfb_device{
2022
- position: relative;
2023
- }
2024
-
2025
- .acfb_device_type_mobile .acfb_device_body svg{
2026
- display: block;
2027
- transform: rotate(0deg);
2028
- }
2029
-
2030
- .acfb_device_type_mobile .acfb_device_media{
2031
- position: absolute;
2032
- left: 50%;
2033
- transition: all 0.3s cubic-bezier(.42,0,.2,1);
2034
- border-radius: 3px;
2035
- transform: translateX(-50%);
2036
- background: rgba(255,255,255,.2);
2037
- overflow: hidden;
2038
- display: -ms-flexbox;
2039
- display: flex;
2040
- border-radius: 3px;
2041
- transition: all 0.3s cubic-bezier(.42,0,.2,1);
2042
- z-index: 2;
2043
- align-items: flex-start;
2044
- flex-direction: row;
2045
- top: 11.7%;
2046
- bottom: 12%;
2047
- width: 88.80866%;
2048
- transform: translateX(-50%);
2049
- }
2050
-
2051
- .acfb_device_type_mobile .acfb_device_media img{
2052
- width: 100%;
2053
- height: 100%;
2054
- object-fit: cover;
2055
- }
2056
-
2057
-
2058
-
2059
-
2060
- /************ Shape Divider CSS ************/
2061
- .acfb_shape_divider_block .acfb_shape_divider{
2062
- overflow: hidden;
2063
- }
2064
-
2065
- .acfb_shape_divider_block .acfb_shape_divider svg{
2066
- display: block;
2067
- position: relative;
2068
- /* left: 0%;
2069
- -webkit-transform: translateX(-50%);
2070
- -ms-transform: translateX(-50%);
2071
- transform: translateX(-50%);*/
2072
- }
2073
-
2074
- .acfb_shape_divider_block .acfb_shape_divider{
2075
- bottom: -1px;
2076
- }
2077
-
2078
- /*.acfb_shape_divider_block .acfb_shape_divider svg{
2079
- transform: translateX(-50%) rotateY(180deg);
2080
- }*/
2081
-
2082
- .acfb_shape_divider_block .acfb_shape_top{
2083
- transform: rotateX(-180deg);
2084
- }
2085
-
2086
-
2087
-
2088
-
2089
-
2090
- /************ Post Ticker CSS ************/
2091
- .acfb_post_ticker{
2092
- display: flex;
2093
- overflow: hidden;
2094
- }
2095
-
2096
- .acfb_post_ticker .acfb_post_ticker_heading{
2097
- display: flex;
2098
- flex-direction: row;
2099
- flex-shrink: 0;
2100
- align-items: center;
2101
- padding: 10px 15px;
2102
- position: relative;
2103
- }
2104
-
2105
- .acfb_post_ticker .acfb_post_ticker_heading:after {
2106
- content: '';
2107
- position: absolute;
2108
- right: -20px;
2109
- border: 10px solid transparent;
2110
- top: 50%;
2111
- transform: translateY(-50%);
2112
- }
2113
-
2114
- .acfb_post_ticker .acfb_post_ticker_wrap{
2115
- display: flex;
2116
- align-items: center;
2117
- overflow: hidden;
2118
- padding: 10px 15px;
2119
- }
2120
-
2121
- .acfb_post_ticker .acfb_post_ticker_wrap .acfb_ptt{
2122
- text-decoration: none;
2123
- }
2124
-
2125
- /*
2126
- .acfb_post_ticker .acfb_post_ticker_wrap .swiper-container{
2127
- display: grid;
2128
- grid-template-columns: 90% 10%;
2129
- }
2130
-
2131
- .acfb_post_ticker .acfb_post_ticker_wrap .acfb_post_ticker_navigation{
2132
- align-items: center;
2133
- padding-left: 10px;
2134
- padding-right: 10px;
2135
- justify-content: center;
2136
- position: relative;
2137
- }
2138
-
2139
- .acfb_post_ticker .swiper-container .acfb-ticker-button-next, .acfb_post_ticker .swiper-container .acfb-ticker-button-prev{
2140
- position: absolute;
2141
- width: 20px;
2142
- z-index: 10;
2143
- cursor: pointer;
2144
- }
2145
-
2146
- .acfb_post_ticker .swiper-container .acfb-ticker-button-next{
2147
- right: 0;
2148
- }
2149
-
2150
- .acfb_post_ticker .swiper-container .acfb-ticker-button-prev{
2151
- left: 0;
2152
- }
2153
- */
2154
-
2155
-
2156
- /************ Post Tiled CSS ************/
2157
- .acfb_posts_tiled_block .acfb_post_tiled_item .acfb_post_tiled_title,
2158
- .acfb_posts_tiled_block .acfb_post_tiled_item .acfb_post_tiled_meta,
2159
- .acfb_posts_tiled_block .acfb_post_tiled_item .acfb_post_tiled_excerpt,
2160
- .acfb_posts_tiled_block .acfb_post_tiled_item .acfb_post_tiled_button {
2161
- margin-bottom: 15px;
2162
- }
2163
-
2164
- .acfb_posts_tiled_block .acfb_post_tiled_item .acfb_post_tiled_title h1,
2165
- .acfb_posts_tiled_block .acfb_post_tiled_item .acfb_post_tiled_title h2,
2166
- .acfb_posts_tiled_block .acfb_post_tiled_item .acfb_post_tiled_title h3,
2167
- .acfb_posts_tiled_block .acfb_post_tiled_item .acfb_post_tiled_title h4,
2168
- .acfb_posts_tiled_block .acfb_post_tiled_item .acfb_post_tiled_title h5,
2169
- .acfb_posts_tiled_block .acfb_post_tiled_item .acfb_post_tiled_title h6 {
2170
- margin: 0;
2171
- }
2172
-
2173
- .acfb_posts_tiled_block .acfb_post_tiled_item div:nth-last-of-type(1) {
2174
- margin-bottom: 0;
2175
- }
2176
-
2177
-
2178
- .acfb_posts_tiled_block .acfb_post_tiled_grid {
2179
- display: grid;
2180
- grid-gap: 10px;
2181
- }
2182
-
2183
- .acfb_posts_tiled_block .acfb_post_tiled_grid .acfb_post_tiled_item .acfb_post_tiled_item_inner{
2184
- background-size: cover !important;
2185
- background-position: center !important;
2186
- display: grid;
2187
- }
2188
-
2189
-
2190
- .acfb_posts_tiled_block .acfb_post_tiled_2 {
2191
- grid-template-columns: 1fr 1fr;
2192
- }
2193
-
2194
- .acfb_posts_tiled_block .acfb_post_tiled_3 {
2195
- grid-template-columns: 1fr 1fr 1fr;
2196
- }
2197
-
2198
- .acfb_posts_tiled_block .acfb_post_tiled_4 {
2199
- grid-template-columns: 1fr 1fr 1fr 1fr;
2200
- }
2201
-
2202
- .acfb_posts_tiled_block .acfb_post_tiled_5 {
2203
- grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
2204
- }
2205
-
2206
- .acfb_posts_tiled_block .acfb_post_tiled_6 {
2207
- grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr;
2208
- }
2209
-
2210
- .acfb_posts_tiled_block .acfb_post_tiled_collage .acfb_post_tiled_item .acfb_post_tiled_item_inner{
2211
- background-size: cover !important;
2212
- background-position: center !important;
2213
- padding: 15px;
2214
- display: grid;
2215
- height: 100%;
2216
- }
2217
-
2218
- .acfb_posts_tiled_block .acfb_post_collage_three_grid_style_one{
2219
- display: grid;
2220
- grid-gap: 10px;
2221
- grid-template-columns: 1fr 1fr;
2222
- grid-template-rows: 1fr 1fr;
2223
- grid-template-areas: "one two" "one three";
2224
- }
2225
-
2226
- .acfb_posts_tiled_block .acfb_post_collage_three_grid_style_one .acfb_post_tiled_item_1{ grid-area: one; }
2227
- .acfb_posts_tiled_block .acfb_post_collage_three_grid_style_one .acfb_post_tiled_item_2{ grid-area: two; }
2228
- .acfb_posts_tiled_block .acfb_post_collage_three_grid_style_one .acfb_post_tiled_item_3{ grid-area: three; }
2229
-
2230
- .acfb_posts_tiled_block .acfb_post_collage_four_grid_style_one{
2231
- display: grid;
2232
- grid-gap: 10px;
2233
- grid-template-columns: 1fr 1fr 1fr 1fr;
2234
- grid-template-rows: 1fr 1fr 1fr 1fr;
2235
- grid-template-areas: "one one two two" "one one two two" "one one three four" "one one three four";
2236
- }
2237
-
2238
- .acfb_posts_tiled_block .acfb_post_collage_four_grid_style_one .acfb_post_tiled_item_1{ grid-area: one; }
2239
- .acfb_posts_tiled_block .acfb_post_collage_four_grid_style_one .acfb_post_tiled_item_2{ grid-area: two; }
2240
- .acfb_posts_tiled_block .acfb_post_collage_four_grid_style_one .acfb_post_tiled_item_3{ grid-area: three; }
2241
- .acfb_posts_tiled_block .acfb_post_collage_four_grid_style_one .acfb_post_tiled_item_4{ grid-area: four; }
2242
-
2243
-
2244
- .acfb_posts_tiled_block .acfb_post_collage_four_grid_style_two{
2245
- display: grid;
2246
- grid-gap: 10px;
2247
- grid-template-columns: 1fr 1fr 1fr 1fr;
2248
- grid-template-rows: 1fr 1fr 1fr 1fr;
2249
- grid-template-areas: "one one two three" "one one two three" "one one two four" "one one two four";
2250
- }
2251
-
2252
- .acfb_posts_tiled_block .acfb_post_collage_four_grid_style_two .acfb_post_tiled_item_1{ grid-area: one; }
2253
- .acfb_posts_tiled_block .acfb_post_collage_four_grid_style_two .acfb_post_tiled_item_2{ grid-area: two; }
2254
- .acfb_posts_tiled_block .acfb_post_collage_four_grid_style_two .acfb_post_tiled_item_3{ grid-area: three; }
2255
- .acfb_posts_tiled_block .acfb_post_collage_four_grid_style_two .acfb_post_tiled_item_4{ grid-area: four; }
2256
-
2257
-
2258
-
2259
-
2260
- .acfb_posts_tiled_block .acfb_post_collage_five_grid_style_one{
2261
- display: grid;
2262
- grid-gap: 10px;
2263
- grid-template-columns: 1fr 1fr 1fr;
2264
- grid-template-rows: 1fr 1fr;
2265
- grid-template-areas: "one three four" "two three five";
2266
- }
2267
-
2268
- .acfb_posts_tiled_block .acfb_post_collage_five_grid_style_one .acfb_post_tiled_item_1{ grid-area: one; }
2269
- .acfb_posts_tiled_block .acfb_post_collage_five_grid_style_one .acfb_post_tiled_item_2{ grid-area: two; }
2270
- .acfb_posts_tiled_block .acfb_post_collage_five_grid_style_one .acfb_post_tiled_item_3{ grid-area: three; }
2271
- .acfb_posts_tiled_block .acfb_post_collage_five_grid_style_one .acfb_post_tiled_item_4{ grid-area: four; }
2272
- .acfb_posts_tiled_block .acfb_post_collage_five_grid_style_one .acfb_post_tiled_item_5{ grid-area: five; }
2273
-
2274
-
2275
-
2276
- .acfb_posts_tiled_block .acfb_post_collage_five_grid_style_two{
2277
- display: grid;
2278
- grid-gap: 10px;
2279
- grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr;
2280
- grid-template-rows: 1fr 1fr;
2281
- grid-template-areas: "one one one two two two" "three three four four five five";
2282
- }
2283
-
2284
- .acfb_posts_tiled_block .acfb_post_collage_five_grid_style_two .acfb_post_tiled_item_1{ grid-area: one; }
2285
- .acfb_posts_tiled_block .acfb_post_collage_five_grid_style_two .acfb_post_tiled_item_2{ grid-area: two; }
2286
- .acfb_posts_tiled_block .acfb_post_collage_five_grid_style_two .acfb_post_tiled_item_3{ grid-area: three; }
2287
- .acfb_posts_tiled_block .acfb_post_collage_five_grid_style_two .acfb_post_tiled_item_4{ grid-area: four; }
2288
- .acfb_posts_tiled_block .acfb_post_collage_five_grid_style_two .acfb_post_tiled_item_5{ grid-area: five; }
2289
-
2290
-
2291
-
2292
-
2293
- .acfb_posts_tiled_block .acfb_post_collage_five_grid_style_three{
2294
- display: grid;
2295
- grid-gap: 10px;
2296
- grid-template-columns: 1fr 1fr 1fr 1fr;
2297
- grid-template-rows: 1fr 1fr;
2298
- grid-template-areas: "one one two three" "one one four five";
2299
- }
2300
-
2301
- .acfb_posts_tiled_block .acfb_post_collage_five_grid_style_three .acfb_post_tiled_item_1{ grid-area: one; }
2302
- .acfb_posts_tiled_block .acfb_post_collage_five_grid_style_three .acfb_post_tiled_item_2{ grid-area: two; }
2303
- .acfb_posts_tiled_block .acfb_post_collage_five_grid_style_three .acfb_post_tiled_item_3{ grid-area: three; }
2304
- .acfb_posts_tiled_block .acfb_post_collage_five_grid_style_three .acfb_post_tiled_item_4{ grid-area: four; }
2305
- .acfb_posts_tiled_block .acfb_post_collage_five_grid_style_three .acfb_post_tiled_item_5{ grid-area: five; }
2306
-
2307
-
2308
-
2309
-
2310
- @media screen and (max-width: 767px) {
2311
- .acfb_posts_tiled_block .acfb_post_tiled_grid{
2312
- grid-template-columns: 100%;
2313
- }
2314
-
2315
- .acfb_posts_tiled_block .acfb_post_collage_three_grid_style_one{
2316
- grid-template-columns: 1fr;
2317
- grid-template-rows: 1fr;
2318
- grid-template-areas:
2319
- "one"
2320
- "two"
2321
- "three";
2322
- }
2323
-
2324
- .acfb_posts_tiled_block .acfb_post_collage_four_grid_style_one,
2325
- .acfb_posts_tiled_block .acfb_post_collage_four_grid_style_two{
2326
- grid-template-columns: 1fr;
2327
- grid-template-rows: 1fr;
2328
- grid-template-areas:
2329
- "one"
2330
- "two"
2331
- "three"
2332
- "four";
2333
- }
2334
-
2335
- .acfb_posts_tiled_block .acfb_post_collage_five_grid_style_one,
2336
- .acfb_posts_tiled_block .acfb_post_collage_five_grid_style_two,
2337
- .acfb_posts_tiled_block .acfb_post_collage_five_grid_style_three{
2338
- grid-template-columns: 1fr;
2339
- grid-template-rows: 1fr;
2340
- grid-template-areas:
2341
- "one"
2342
- "two"
2343
- "three"
2344
- "four"
2345
- "five";
2346
- }
2347
-
2348
-
2349
- }
2350
-
2351
-
2352
-
2353
-
2354
-
2355
-
2356
-
2357
-
2358
-
2359
- /************ Post Timeline CSS ************/
2360
- .acfb_post_timeline_block .acfb_post_timeline .acfb_post_timeline_content img{
2361
- height: auto;
2362
- }
2363
-
2364
- .acfb_post_timeline_block .acfb_post_timeline_thumbnail,
2365
- .acfb_post_timeline_block .acfb_post_timeline_title,
2366
- .acfb_post_timeline_block .acfb_post_timeline_meta,
2367
- .acfb_post_timeline_block .acfb_post_timeline_excerpt,
2368
- .acfb_post_timeline_block .acfb_post_timeline_button {
2369
- margin: 10px 0 !important;
2370
- }
2371
-
2372
- .acfb_post_timeline_block .acfb_post_timeline_title h1,
2373
- .acfb_post_timeline_block .acfb_post_timeline_title h2,
2374
- .acfb_post_timeline_block .acfb_post_timeline_title h3,
2375
- .acfb_post_timeline_block .acfb_post_timeline_title h4,
2376
- .acfb_post_timeline_block .acfb_post_timeline_title h5,
2377
- .acfb_post_timeline_block .acfb_post_timeline_title h6 {
2378
- margin: 0;
2379
- }
2380
-
2381
-
2382
- .acfb_post_timeline_center .acfb_post_timeline_inner:nth-child(odd) .acfb_posts_opposite_elements{
2383
- position: absolute;
2384
- right: -100%;
2385
- top: 0;
2386
- width: 100%;
2387
- padding: 10px 0px 10px 40px;
2388
- text-align: left;
2389
- }
2390
-
2391
-
2392
- .acfb_post_timeline_center .acfb_post_timeline_inner:nth-child(odd) .acfb_posts_opposite_elements .acfb_posts_opposite_elements_inner::before{
2393
- content: " ";
2394
- height: 0;
2395
- position: absolute;
2396
- top: 22px;
2397
- width: 0;
2398
- z-index: 1;
2399
- left: 30px;
2400
- border-style: solid;
2401
- border-width: 10px 10px 10px 0;
2402
- }
2403
-
2404
- .acfb_post_timeline_center .acfb_post_timeline_inner:nth-child(even) .acfb_posts_opposite_elements{
2405
- position: absolute;
2406
- left: -100%;
2407
- top: 0;
2408
- width: 100%;
2409
- padding: 10px 40px 10px 0px;
2410
- text-align: right;
2411
- }
2412
-
2413
- .acfb_post_timeline_center .acfb_post_timeline_inner:nth-child(even) .acfb_posts_opposite_elements .acfb_posts_opposite_elements_inner::before{
2414
- content: " ";
2415
- height: 0;
2416
- position: absolute;
2417
- top: 22px;
2418
- width: 0;
2419
- z-index: 1;
2420
- right: 30px;
2421
- border-style: solid;
2422
- border-width: 10px 0 10px 10px;
2423
- }
2424
-
2425
- .acfb_post_timeline_center .acfb_post_timeline_inner .acfb_posts_opposite_elements .acfb_posts_opposite_elements_inner{
2426
- padding: 20px 30px;
2427
- }
2428
-
2429
- .acfb_post_timeline_center {
2430
- position: relative;
2431
- }
2432
-
2433
- .acfb_post_timeline_center::after {
2434
- background: #e0e0e0;
2435
- }
2436
-
2437
- .acfb_post_timeline_center::after {
2438
- content: '';
2439
- position: absolute;
2440
- width: 6px;
2441
- top: 0;
2442
- bottom: 0;
2443
- left: 50%;
2444
- margin-left: -3px;
2445
- }
2446
-
2447
- .acfb_post_timeline_center .acfb_post_timeline_inner {
2448
- position: relative;
2449
- width: 50%;
2450
- }
2451
-
2452
- .acfb_post_timeline_center .acfb_post_timeline_inner:nth-child(odd) {
2453
- left: 0;
2454
- padding: 10px 40px 10px 0px;
2455
- text-align: right;
2456
- }
2457
-
2458
-
2459
- .acfb_post_timeline_center .acfb_post_timeline_inner:nth-child(even) {
2460
- left: 50%;
2461
- padding: 10px 0px 10px 40px;
2462
- text-align: left;
2463
- }
2464
-
2465
- .acfb_post_timeline_center .acfb_post_timeline_inner:nth-child(odd)::before{
2466
- content: " ";
2467
- height: 0;
2468
- position: absolute;
2469
- top: 22px;
2470
- width: 0;
2471
- z-index: 1;
2472
- right: 30px;
2473
- border-style: solid;
2474
- border-width: 10px 0 10px 10px;
2475
- }
2476
-
2477
- .acfb_post_timeline_center .acfb_post_timeline_inner:nth-child(even)::after {
2478
- left: -12px;
2479
- }
2480
-
2481
- .acfb_post_timeline_center .acfb_post_timeline_inner:nth-child(even)::before {
2482
- content: " ";
2483
- height: 0;
2484
- position: absolute;
2485
- top: 22px;
2486
- width: 0;
2487
- z-index: 1;
2488
- left: 30px;
2489
- border-style: solid;
2490
- border-width: 10px 10px 10px 0;
2491
- }
2492
-
2493
- .acfb_post_timeline_center .acfb_post_timeline_inner::after{
2494
- content: '';
2495
- position: absolute;
2496
- width: 25px;
2497
- height: 25px;
2498
- right: -12px;
2499
- top: 15px;
2500
- border-radius: 50%;
2501
- z-index: 1;
2502
- background: #f3f4f5;
2503
- border: 4px solid #191e23;
2504
- }
2505
-
2506
- .acfb_post_timeline_center .acfb_post_timeline_inner .acfb_post_timeline_content{
2507
- padding: 20px 30px;
2508
- position: relative;
2509
- }
2510
-
2511
-
2512
-
2513
-
2514
- /*********** Left Post Timeline ************/
2515
- .acfb_post_timeline_left .acfb_post_timeline_inner .acfb_posts_opposite_elements{
2516
- padding-bottom: 10px;
2517
- }
2518
-
2519
- .acfb_post_timeline_left .acfb_post_timeline_inner .acfb_posts_opposite_elements .acfb_posts_opposite_elements_inner::before{
2520
- content: " ";
2521
- height: 0;
2522
- position: absolute;
2523
- top: 22px;
2524
- width: 0;
2525
- z-index: 1;
2526
- left: 30px;
2527
- border-style: solid;
2528
- border-width: 10px 10px 10px 0;
2529
- }
2530
-
2531
- .acfb_post_timeline_left .acfb_post_timeline_inner .acfb_posts_opposite_elements .acfb_posts_opposite_elements_inner{
2532
- padding: 20px 30px;
2533
- }
2534
-
2535
- .acfb_post_timeline_left {
2536
- position: relative;
2537
- }
2538
-
2539
- .acfb_post_timeline_left::after {
2540
- content: '';
2541
- position: absolute;
2542
- width: 6px;
2543
- top: 0;
2544
- bottom: 0;
2545
- margin-left: -3px;
2546
- }
2547
-
2548
- .acfb_post_timeline_left .acfb_post_timeline_inner {
2549
- position: relative;
2550
- left: 0;
2551
- padding: 10px 0px 10px 40px;
2552
- text-align: left;
2553
- display: flex;
2554
- flex-direction: column-reverse;
2555
- }
2556
-
2557
- .acfb_post_timeline_left .acfb_post_timeline_inner::after {
2558
- left: -12px;
2559
- }
2560
-
2561
- .acfb_post_timeline_left .acfb_post_timeline_inner::before {
2562
- content: " ";
2563
- height: 0;
2564
- position: absolute;
2565
- top: 22px;
2566
- width: 0;
2567
- z-index: 1;
2568
- left: 30px;
2569
- border-style: solid;
2570
- border-width: 10px 10px 10px 0;
2571
- }
2572
-
2573
- .acfb_post_timeline_left .acfb_post_timeline_inner::after{
2574
- content: '';
2575
- position: absolute;
2576
- width: 25px;
2577
- height: 25px;
2578
- right: -12px;
2579
- top: 15px;
2580
- border-radius: 50%;
2581
- z-index: 1;
2582
- border: 4px solid #191e23;
2583
- }
2584
-
2585
- .acfb_post_timeline_left .acfb_post_timeline_inner .acfb_post_timeline_content{
2586
- padding: 20px 30px;
2587
- position: relative;
2588
- }
2589
-
2590
-
2591
-
2592
-
2593
- /*********** Right Post Timeline ************/
2594
- .acfb_post_timeline_right .acfb_post_timeline_inner .acfb_posts_opposite_elements{
2595
- padding-bottom: 10px;
2596
- }
2597
-
2598
- .acfb_post_timeline_right .acfb_post_timeline_inner .acfb_posts_opposite_elements .acfb_posts_opposite_elements_inner::before{
2599
- content: " ";
2600
- height: 0;
2601
- position: absolute;
2602
- top: 22px;
2603
- width: 0;
2604
- z-index: 1;
2605
- right: 30px;
2606
- border-style: solid;
2607
- border-width: 10px 0 10px 10px;
2608
- }
2609
-
2610
- .acfb_post_timeline_right .acfb_post_timeline_inner .acfb_posts_opposite_elements .acfb_posts_opposite_elements_inner{
2611
- padding: 20px 30px;
2612
- }
2613
-
2614
- .acfb_post_timeline_right {
2615
- position: relative;
2616
- }
2617
-
2618
- .acfb_post_timeline_right::after {
2619
- content: '';
2620
- position: absolute;
2621
- width: 6px;
2622
- top: 0;
2623
- right: 0;
2624
- bottom: 0;
2625
- margin-right: -3px;
2626
- }
2627
-
2628
- .acfb_post_timeline_right .acfb_post_timeline_inner {
2629
- position: relative;
2630
- left: 0;
2631
- padding: 10px 40px 10px 0px;
2632
- text-align: right;
2633
- display: flex;
2634
- flex-direction: column-reverse;
2635
- }
2636
-
2637
- .acfb_post_timeline_right .acfb_post_timeline_inner::after {
2638
- right: -12px;
2639
- }
2640
-
2641
- .acfb_post_timeline_right .acfb_post_timeline_inner::before {
2642
- content: " ";
2643
- height: 0;
2644
- position: absolute;
2645
- top: 22px;
2646
- width: 0;
2647
- z-index: 1;
2648
- right: 30px;
2649
- border-style: solid;
2650
- border-width: 10px 0 10px 10px;
2651
- }
2652
-
2653
- .acfb_post_timeline_right .acfb_post_timeline_inner::after{
2654
- content: '';
2655
- position: absolute;
2656
- width: 25px;
2657
- height: 25px;
2658
- top: 15px;
2659
- border-radius: 50%;
2660
- z-index: 1;
2661
- border: 4px solid #191e23;
2662
- }
2663
-
2664
- .acfb_post_timeline_right .acfb_post_timeline_inner .acfb_post_timeline_content{
2665
- padding: 20px 30px;
2666
- position: relative;
2667
- }
2668
-
2669
-
2670
-
2671
- @media screen and (max-width: 767px) {
2672
- .acfb_post_timeline_center .acfb_post_timeline_inner{
2673
- width: 100%;
2674
- }
2675
-
2676
- .acfb_post_timeline_center::after, .acfb_post_timeline_center .acfb_post_timeline_inner:nth-child(even){
2677
- left: 0;
2678
- }
2679
-
2680
- .acfb_post_timeline_center .acfb_post_timeline_inner:nth-child(odd), .acfb_post_timeline_center .acfb_post_timeline_inner:nth-child(even){
2681
- padding: 10px 0px 10px 40px;
2682
- text-align: left !important;
2683
- }
2684
-
2685
- .acfb_post_timeline_center .acfb_post_timeline_inner::after{
2686
- left: -12px;
2687
- }
2688
-
2689
- .acfb_post_timeline_center .acfb_post_timeline_inner:nth-child(odd)::before{
2690
- left: 30px;
2691
- border-width: 10px 10px 10px 0px;
2692
- }
2693
-
2694
-
2695
- .acfb_post_timeline_center .acfb_post_timeline_inner{
2696
- display: flex;
2697
- flex-direction: column-reverse;
2698
- }
2699
-
2700
- .acfb_post_timeline_center .acfb_post_timeline_inner:nth-child(odd) .acfb_posts_opposite_elements{
2701
- position: relative;
2702
- right: 0;
2703
- top: 0;
2704
- width: 100%;
2705
- }
2706
-
2707
- .acfb_post_timeline_center .acfb_post_timeline_inner:nth-child(even) .acfb_posts_opposite_elements{
2708
- position: relative;
2709
- left: 0;
2710
- top: 0;
2711
- width: 100%;
2712
- }
2713
-
2714
- .acfb_post_timeline_center .acfb_post_timeline_inner:nth-child(odd) .acfb_posts_opposite_elements,
2715
- .acfb_post_timeline_center .acfb_post_timeline_inner:nth-child(even) .acfb_posts_opposite_elements{
2716
- padding: 0px 0px 10px 0px;
2717
- text-align: left !important;
2718
- }
2719
-
2720
-
2721
- .acfb_post_timeline_center .acfb_post_timeline_inner .acfb_posts_opposite_elements .acfb_posts_opposite_elements_inner::before{
2722
- content: none !important;
2723
- }
2724
-
2725
- }
2726
-
2727
-
2728
-
2729
-
2730
- /************ Post Slider CSS ************/
2731
- .acfb_posts_slider_block .acfb_post_slider_tiled{
2732
- background-size: cover !important;
2733
- background-repeat: no-repeat !important;
2734
- background-position: center !important;
2735
- display: grid;
2736
- }
2737
-
2738
- .acfb_posts_slider_block .acfb_post_slider_card{
2739
- display: grid;
2740
- }
2741
-
2742
- .acfb_posts_slider_block .acfb_post_slider_thumbnail,
2743
- .acfb_posts_slider_block .acfb_post_slider_title,
2744
- .acfb_posts_slider_block .acfb_post_slider_meta,
2745
- .acfb_posts_slider_block .acfb_post_slider_excerpt,
2746
- .acfb_posts_slider_block .acfb_post_slider_button {
2747
- margin-bottom: 15px !important;
2748
- }
2749
-
2750
- .acfb_posts_slider_block .acfb_post_slider_title h1,
2751
- .acfb_posts_slider_block .acfb_post_slider_title h2,
2752
- .acfb_posts_slider_block .acfb_post_slider_title h3,
2753
- .acfb_posts_slider_block .acfb_post_slider_title h4,
2754
- .acfb_posts_slider_block .acfb_post_slider_title h5,
2755
- .acfb_posts_slider_block .acfb_post_slider_title h6 {
2756
- margin: 0;
2757
- }
2758
-
2759
-
2760
- .acfb_posts_slider_block .acfb_post_slider_button a{
2761
- display: block;
2762
- }
2763
-
2764
- .acfb_posts_slider_block .swiper-container .acfb_button_next, .acfb_posts_slider_block .swiper-container .acfb_button_prev{
2765
- position: absolute;
2766
- top: 50%;
2767
- width: 58px;
2768
- margin-top: -22px;
2769
- z-index: 10;
2770
- cursor: pointer;
2771
- padding: 15px;
2772
- border-radius: 5px;
2773
- line-height: 1;
2774
- }
2775
-
2776
- .acfb_posts_slider_block .swiper-container .acfb_button_next{
2777
- right: 10px;
2778
- left: auto;
2779
- }
2780
-
2781
- .acfb_posts_slider_block .swiper-container .acfb_button_prev{
2782
- left: 10px;
2783
- right: auto;
2784
- }
2785
-
2786
- .acfb_posts_slider_block .acfb_post_slider_card.acfb_post_slider_item{
2787
- padding: 15px;
2788
- }
2789
-
2790
- .acfb_posts_slider_block .acfb_post_slider_card.acfb_post_slider_item .acfb_post_slider_thumbnail img{
2791
- width: 100%;
2792
- height: auto;
2793
- }
2794
-
2795
-
2796
-
2797
-
2798
- /************ Business Hours CSS ************/
2799
- .acfb_bh_wrapper{}
2800
-
2801
- .acfb_bh_wrapper ul{
2802
- list-style-type: none;
2803
- padding: 0 !important;
2804
- margin: 0 !important;
2805
- }
2806
-
2807
- .acfb_bh_wrapper ul li{
2808
- padding: 10px 0;
2809
- display: -webkit-box;
2810
- display: -webkit-flex;
2811
- display: -ms-flexbox;
2812
- display: flex;
2813
- justify-content: space-between;
2814
- }
2815
-
2816
- .acfb_bh_wrapper ul li:last-child{
2817
- border-bottom: none !important;
2818
- }
2819
-
2820
-
2821
-
2822
- /************ Dual Button CSS ************/
2823
- .acfb_db_wrapper{
2824
- display: -webkit-box;
2825
- display: -ms-flexbox;
2826
- display: flex;
2827
- }
2828
- .acfb_db_wrapper .acfb_db_one{
2829
- position: relative;
2830
- }
2831
-
2832
- .acfb_db_wrapper .acfb_db{
2833
- display: -webkit-box;
2834
- display: -ms-flexbox;
2835
- display: flex;
2836
- flex-grow: 1;
2837
- justify-content: center;
2838
- text-decoration: none !important;
2839
- }
2840
- .acfb_db_wrapper .acfb_db_seprator{
2841
- position: absolute;
2842
- top: 50%;
2843
- right: -18px;
2844
- font-size: 16px;
2845
- transform: translateY(-50%);
2846
- z-index: 9999999;
2847
- width: 35px;
2848
- height: 35px;
2849
- display: -webkit-box;
2850
- display: -ms-flexbox;
2851
- display: flex;
2852
- -webkit-box-align: center;
2853
- -ms-flex-align: center;
2854
- align-items: center;
2855
- -webkit-box-pack: center;
2856
- -ms-flex-pack: center;
2857
- justify-content: center;
2858
- }
2859
-
2860
- .acfb_db_wrapper .acfb_db_seprator span{
2861
- display: flex;
2862
- align-items: center;
2863
- }
2864
-
2865
- .acfb_db_wrapper .acfb_db_seprator img{
2866
- padding: 5px;
2867
- width: 100%;
2868
- }
2869
-
2870
-
2871
- @media only screen and (max-width: 767px) {
2872
- .acfb_db_wrapper{
2873
- flex-direction: column;
2874
- }
2875
-
2876
- .acfb_db_wrapper .acfb_db{
2877
- justify-content: center;
2878
- padding-top: 15px !important;
2879
- padding-bottom: 15px !important;
2880
- }
2881
-
2882
- .acfb_db_wrapper .acfb_db_seprator{
2883
- transform: none;
2884
- top: calc(100% - 17.5px);
2885
- left: calc(50% - 17.5px);
2886
- }
2887
-
2888
-
2889
- }
2890
-
2891
- .acfb_db_radius .acf-fields{
2892
- display: grid;
2893
- grid-template-columns: 50% 50%;
2894
- overflow: hidden;
2895
- }
2896
-
2897
- .acfb_db_radius .acf-fields input[type=range]{
2898
- width: 100%;
2899
- margin-bottom: 5px;
2900
- }
2901
-
2902
- .acfb_db_radius .acf-fields input[type=number]{
2903
- margin-left: 0;
2904
- }
2905
-
2906
-
2907
- /************ Highlighted Headline CSS ************/
2908
- .acfb_highlighted_headline .acfb_animated_wrapper {
2909
- overflow: visible;
2910
- position: relative;
2911
- }
2912
-
2913
- .acfb_highlighted_headline .acfb_animated_wrapper .acfb_animated_text {
2914
- z-index:1;
2915
- position:relative;
2916
- }
2917
-
2918
- .acfb_highlighted_headline .acfb_animated_wrapper svg {
2919
- position: absolute;
2920
- top: 50%;
2921
- left: 50%;
2922
- width: calc( 100% + 0px);
2923
- height: calc( 100% + 20px);
2924
- -webkit-transform: translate(-50%, -50%);
2925
- -ms-transform: translate(-50%, -50%);
2926
- transform: translate(-50%, -50%);
2927
- overflow: visible;
2928
- }
2929
-
2930
- .acfb_highlighted_headline .acfb_animated_wrapper svg path {
2931
- stroke-width: 9;
2932
- fill: none;
2933
- stroke-dasharray: 1500;
2934
- stroke-dashoffset: 1500;
2935
- -webkit-animation-name : acfb-hh-dash;
2936
- animation-name : acfb-hh-dash;
2937
- -webkit-animation-iteration-count: infinite;
2938
- animation-iteration-count: infinite;
2939
- -webkit-animation-duration: 10s;
2940
- animation-duration: 10s;
2941
- }
2942
-
2943
- .acfb_highlighted_headline .acfb_animated_wrapper svg path:nth-of-type(2) {
2944
- -webkit-animation-delay: 0.6s;
2945
- animation-delay: 0.6s;
2946
- }
2947
-
2948
- @-webkit-keyframes acfb-hh-dash {
2949
- 0% { stroke-dashoffset: 1500; }
2950
- 15% { stroke-dashoffset: 0; }
2951
- 85% { opacity: 1; }
2952
- 90% { stroke-dashoffset: 0; opacity: 0; }
2953
- 100% { stroke-dashoffset: 1500; opacity: 0; }
2954
- }
2955
-
2956
- @keyframes acfb-hh-dash {
2957
- 0% { stroke-dashoffset: 1500; }
2958
- 15% { stroke-dashoffset: 0; }
2959
- 85% { opacity: 1; }
2960
- 90% { stroke-dashoffset: 0; opacity: 0; }
2961
- 100% { stroke-dashoffset: 1500; opacity: 0; }
2962
- }
2963
-
2964
-
2965
-
2966
-
2967
- /************ Tilt Image CSS ************/
2968
- .acfb_tilt_card {
2969
- position: relative;
2970
- transform-style: preserve-3d;
2971
- }
2972
-
2973
-
2974
- .acfb_tilt_card .acfb_tilt_title,
2975
- .acfb_tilt_card .acfb_tilt_content,
2976
- .acfb_tilt_card .acfb_tilt_content_img,
2977
- .acfb_tilt_card .acfb_tilt_btn {
2978
- transform: translateZ(20px);
2979
- }
2980
-
2981
- .acfb_tilt_card .acfb_tilt_title {
2982
- position: relative;
2983
- z-index: 2;
2984
- margin:0 0 10px 0 !important;
2985
- }
2986
-
2987
- .acfb_tilt_card .acfb_tilt_content_img{
2988
- margin:0 0 10px 0 !important;
2989
- }
2990
-
2991
- .acfb_tilt_card .acfb_tilt_content{
2992
- margin:0 0 15px 0 !important;
2993
- }
2994
-
2995
- .acfb_tilt_card .acfb_tilt_btn {
2996
- padding: 10px 25px;
2997
- }
2998
-
2999
- .acfb_tilt_card .acfb_tilt_bg {
3000
- position: absolute;
3001
- z-index: -1;
3002
- top: 0;
3003
- left: 0;
3004
- height: 100%;
3005
- width: 100%;
3006
- background-size: cover !important;
3007
- background-position: center !important;
3008
- }
3009
-
3010
-
3011
- /************ Acf Data Display CSS ************/
3012
- .acfb_meta_display .acfb_meta_display_gallery{
3013
- display: grid;
3014
- grid-gap: 10px;
3015
- align-items: center;
3016
- justify-items: center;
3017
- width: 100%;
3018
- }
3019
-
3020
- .acfb_meta_display .acfb_meta_display_gallery_2{
3021
- grid-template-columns: repeat(2, calc(50% - 10px));
3022
- }
3023
-
3024
- .acfb_meta_display .acfb_meta_display_gallery_3{
3025
- grid-template-columns: repeat(3, calc(33.33% - 10px));
3026
- }
3027
-
3028
- .acfb_meta_display .acfb_meta_display_gallery_4{
3029
- grid-template-columns: repeat(4, calc(25% - 10px));
3030
- }
3031
-
3032
- .acfb_meta_display .acfb_meta_display_gallery_5{
3033
- grid-template-columns: repeat(5, calc(20% - 10px));
3034
- }
3035
-
3036
-
3037
- /************ Content Toggle CSS ************/
3038
-
3039
- .acfb_ct_content_wrap.one .block-editor-block-list__layout [data-type="acf/acfb-content-toggle-child"]:nth-child(2){
3040
- display: none;
3041
- }
3042
-
3043
- .acfb_ct_content_wrap.two .block-editor-block-list__layout [data-type="acf/acfb-content-toggle-child"]:nth-child(1) {
3044
- display: none;
3045
- }
3046
-
3047
-
3048
- .acfb_ct_btn_wrap{
3049
- display: flex;
3050
- justify-content: center;
3051
- align-items: center;
3052
- }
3053
-
3054
- .acfb_ct_btn_wrap h3{
3055
- margin-bottom: 0;
3056
- }
3057
-
3058
- .acfb_ct_btn_wrap .acfb_ct_switch {
3059
- position: relative;
3060
- display: inline-block;
3061
- width: 60px;
3062
- height: 34px;
3063
- margin: 0 10px;
3064
- }
3065
-
3066
- .acfb_ct_btn_wrap .acfb_ct_switch input {
3067
- opacity: 0;
3068
- width: 0;
3069
- height: 0;
3070
- }
3071
-
3072
- .acfb_ct_btn_wrap .acfb_ct_slider {
3073
- position: absolute;
3074
- cursor: pointer;
3075
- top: 0;
3076
- left: 0;
3077
- right: 0;
3078
- bottom: 0;
3079
- background-color: #ccc;
3080
- -webkit-transition: .4s;
3081
- transition: .4s;
3082
- border-radius: 34px;
3083
- }
3084
-
3085
- .acfb_ct_btn_wrap .acfb_ct_slider:before {
3086
- position: absolute;
3087
- content: "";
3088
- height: 26px;
3089
- width: 26px;
3090
- left: 4px;
3091
- bottom: 4px;
3092
- background-color: white;
3093
- -webkit-transition: .4s;
3094
- transition: .4s;
3095
- border-radius: 50%;
3096
- }
3097
-
3098
- .acfb_ct_btn_wrap input:checked + .acfb_ct_slider {
3099
- background-color: #2196F3;
3100
- }
3101
-
3102
- .acfb_ct_btn_wrap input:focus + .acfb_ct_slider {
3103
- box-shadow: 0 0 1px #2196F3;
3104
- }
3105
-
3106
- .acfb_ct_btn_wrap input:checked + .acfb_ct_slider:before {
3107
- -webkit-transform: translateX(26px);
3108
- -ms-transform: translateX(26px);
3109
- transform: translateX(26px);
3110
- }
3111
-
3112
-
3113
- .acfb_ct_content_two {
3114
- display: none;
3115
- }
3116
-
3117
-
3118
-
3119
- .editor-block-list-item-acf-acfb-flipbox .editor-block-types-list__item-title::after,
3120
- .editor-block-list-item-acf-acfb-flipbox .block-editor-block-types-list__item-title::after,
3121
-
3122
- .editor-block-list-item-acf-acfb-content-timeline .editor-block-types-list__item-title::after,
3123
- .editor-block-list-item-acf-acfb-content-timeline .block-editor-block-types-list__item-title::after,
3124
-
3125
- .editor-block-list-item-acf-acfb-image-accordion .editor-block-types-list__item-title::after,
3126
- .editor-block-list-item-acf-acfb-image-accordion .block-editor-block-types-list__item-title::after,
3127
-
3128
- .editor-block-list-item-acf-acfb-call-to-action .editor-block-types-list__item-title::after,
3129
- .editor-block-list-item-acf-acfb-call-to-action .block-editor-block-types-list__item-title::after,
3130
-
3131
- .editor-block-list-item-acf-acfb-image-hotspot .editor-block-types-list__item-title::after,
3132
- .editor-block-list-item-acf-acfb-image-hotspot .block-editor-block-types-list__item-title::after,
3133
-
3134
- .editor-block-list-item-acf-acfb-gallery .editor-block-types-list__item-title::after,
3135
- .editor-block-list-item-acf-acfb-gallery .block-editor-block-types-list__item-title::after,
3136
-
3137
- .editor-block-list-item-acf-acfb-device .editor-block-types-list__item-title::after,
3138
- .editor-block-list-item-acf-acfb-device .block-editor-block-types-list__item-title::after,
3139
-
3140
- .editor-block-list-item-acf-acfb-shape-divider .editor-block-types-list__item-title::after,
3141
- .editor-block-list-item-acf-acfb-shape-divider .block-editor-block-types-list__item-title::after,
3142
-
3143
- .editor-block-list-item-acf-acfb-post-ticker .editor-block-types-list__item-title::after,
3144
- .editor-block-list-item-acf-acfb-post-ticker .block-editor-block-types-list__item-title::after,
3145
-
3146
- .editor-block-list-item-acf-acfb-post-slider .editor-block-types-list__item-title::after,
3147
- .editor-block-list-item-acf-acfb-post-slider .block-editor-block-types-list__item-title::after,
3148
-
3149
- .editor-block-list-item-acf-acfb-post-tiled .editor-block-types-list__item-title::after,
3150
- .editor-block-list-item-acf-acfb-post-tiled .block-editor-block-types-list__item-title::after,
3151
-
3152
- .editor-block-list-item-acf-acfb-post-timeline .editor-block-types-list__item-title::after,
3153
- .editor-block-list-item-acf-acfb-post-timeline .block-editor-block-types-list__item-title::after,
3154
-
3155
- .editor-block-list-item-acf-acfb-before-after-image .editor-block-types-list__item-title::after,
3156
- .editor-block-list-item-acf-acfb-before-after-image .block-editor-block-types-list__item-title::after,
3157
-
3158
- .editor-block-list-item-acf-acfb-content-toggle .editor-block-types-list__item-title::after,
3159
- .editor-block-list-item-acf-acfb-content-toggle .block-editor-block-types-list__item-title::after,
3160
-
3161
- .editor-block-list-item-acf-acfb-animated-headline .editor-block-types-list__item-title::after,
3162
- .editor-block-list-item-acf-acfb-animated-headline .block-editor-block-types-list__item-title::after,
3163
-
3164
- .editor-block-list-item-acf-acfb-steps .editor-block-types-list__item-title::after,
3165
- .editor-block-list-item-acf-acfb-steps .block-editor-block-types-list__item-title::after,
3166
-
3167
- .editor-block-list-item-acf-acfb-highlighted-headline .editor-block-types-list__item-title::after,
3168
- .editor-block-list-item-acf-acfb-highlighted-headline .block-editor-block-types-list__item-title::after,
3169
-
3170
- .editor-block-list-item-acf-acfb-dual-button .editor-block-types-list__item-title::after,
3171
- .editor-block-list-item-acf-acfb-dual-button .block-editor-block-types-list__item-title::after,
3172
-
3173
- .editor-block-list-item-acf-acfb-tilt-card .editor-block-types-list__item-title::after,
3174
- .editor-block-list-item-acf-acfb-tilt-card .block-editor-block-types-list__item-title::after,
3175
-
3176
- .editor-block-list-item-acf-acfb-lottie .editor-block-types-list__item-title::after,
3177
- .editor-block-list-item-acf-acfb-lottie .block-editor-block-types-list__item-title::after{
3178
- content: " PRO";
3179
- color: #ffffff;
3180
- font-weight: bold;
3181
- background: #06c2a4;
3182
- padding: 2px 5px;
3183
- margin-left: 2px;
3184
- display: inline-block;
3185
- border-radius: 100px;
3186
- font-size: 10px;
3187
- }
3188
-
3189
-
3190
- [data-name="acfb_timeline_image"] .acf-label,
3191
- [data-name="acfb_timeline_date"] .acf-label,
3192
- [data-name="acfb_timeline_title"] .acf-label,
3193
- [data-name="acfb_timeline_content"] .acf-label,
3194
- [data-name="acfb_timeline_button"] .acf-label {
3195
- display: none;
3196
- }
3197
-
3198
-
3199
- div[data-type~="typography"], div[data-type~="padding"], div[data-type~="margin"]{
3200
- padding: 10px !important;
3201
- border: 1px solid #c5c5c5 !important;
3202
- }
3203
-
3204
-
3205
- div[data-type~="typography"] .acf-field-range .acf-range-wrap{
3206
- display: grid;
3207
- grid-template-columns: 50% 30% 20%;
3208
- }
3209
-
3210
-
3211
-
3212
- .acf-field-padding .acfb-padding,
3213
- .acf-field-margin .acfb-margin{
3214
- display: grid;
3215
- grid-template-columns: 50% 50%;
3216
- justify-items: center;
3217
-
3218
- }
3219
-
3220
- .acf-field-padding .acfb-padding .acf-range-wrap input,
3221
- .acf-field-margin .acfb-margin .acf-range-wrap input{
3222
- margin-left: 0;
3223
- }
3224
-
3225
- .acfb_pannel_eye{
3226
- position: absolute;
3227
- top: -22px;
3228
- right: 0;
3229
- }
3230
-
3231
- .acfb_pannel_eye svg{
3232
- width: 17px;
3233
- height: 19px;
3234
- }
3235
-
3236
-
3237
- .acfb-checkbox-true-false[type=checkbox]{
3238
- display:none;
3239
- }
3240
-
3241
- .acfb-checkbox-true-false[type=checkbox] + label{
3242
- height: 16px;
3243
- width: 16px;
3244
- fill: #444;
3245
- }
3246
-
3247
- .acfb-checkbox-true-false[type=checkbox]:checked + label{
3248
- height: 16px;
3249
- width: 16px;
3250
- fill: #444;
3251
- }
3252
-
3253
- .acfb_eye_svg{
3254
- position: absolute;
3255
- top: -21px;
3256
- right: 0;
3257
- width: 15px;
3258
- height: 15px;
3259
  }
1
+ /************ Testimonial CSS ************/
2
+ .acfb_testimonial_wrap {
3
+ padding: 5%;
4
+ border-radius: 5px;
5
+ }
6
+
7
+ .acfb_testimonial_wrap .acfb_testimonial_bio {
8
+ display: flex;
9
+ align-items: center;
10
+ margin-top: 20px;
11
+ }
12
+
13
+ .acfb_testimonial_wrap .acfb_testimonial_bio .acfb_testimonial_avatar_wrap {
14
+ border-radius: 100%;
15
+ margin-right: 15px;
16
+ }
17
+
18
+ .acfb_testimonial_wrap .acfb_testimonial_bio .acfb_testimonial_avatar {
19
+ object-fit: cover;
20
+ height: 100%;
21
+ width: 100%;
22
+ position: relative;
23
+ z-index: 10;
24
+ border-radius: 100%;
25
+ z-index: 5;
26
+ }
27
+
28
+ .acfb_testimonial_wrap .acfb_testimonial_bio .acfb_testimonial_name {
29
+ font-weight: 700;
30
+ line-height: 1.2;
31
+ margin: 0;
32
+ padding: 0;
33
+ }
34
+
35
+ /************ Team CSS ************/
36
+ .acfb_team_wrap.acfb_team_top {
37
+ display: grid;
38
+ grid-template-columns: 100%;
39
+ }
40
+
41
+ .acfb_team_wrap.acfb_team_left {
42
+ display: grid;
43
+ grid-gap: 25px;
44
+ grid-template-columns: auto auto;
45
+ }
46
+
47
+ .acfb_team_wrap.acfb_team_left .acfb_team_info{
48
+ margin-top: 0 !important;
49
+ }
50
+
51
+ .acfb_team_wrap {
52
+ padding: 60px 35px;
53
+ }
54
+
55
+ .acfb_team_wrap .acfb_team_avatar img {
56
+ object-fit: cover;
57
+ height: 100%;
58
+ width: 100%;
59
+ }
60
+ .acfb_team_wrap .acfb_team_info {
61
+ margin-top: 20px;
62
+ }
63
+
64
+ .acfb_team_wrap .acfb_team_info .acfb_team_position{
65
+ margin-bottom: 10px;
66
+ display: block;
67
+ }
68
+
69
+ /************ Star Rating CSS ************/
70
+ .acfb_star_rating {
71
+ display: flex;
72
+ align-items: center;
73
+ }
74
+
75
+ .acfb_star_rating .acfb_star:before {
76
+ content: "\f155";
77
+ font-family: dashicons;
78
+ }
79
+
80
+ /************ Progress Bar CSS ************/
81
+ .acfb_progress_wrapper .acfb_progress_bar_title {
82
+ display: block;
83
+ margin-bottom: 5px;
84
+ }
85
+
86
+ .acfb_progress_wrapper .acfb_inner_wrap {
87
+ position: relative;
88
+ }
89
+
90
+ .acfb_progress_wrapper .acfb_progress_bar {
91
+ display: -webkit-box;
92
+ display: -webkit-flex;
93
+ display: -ms-flexbox;
94
+ display: flex;
95
+ padding: 7px 15px;
96
+ }
97
+
98
+ .acfb_progress_wrapper .acfb_progress_bar .acfb_progress_text {
99
+ -webkit-box-flex: 1;
100
+ -webkit-flex-grow: 1;
101
+ -ms-flex-positive: 1;
102
+ flex-grow: 1;
103
+ white-space: nowrap;
104
+ overflow: hidden;
105
+ -o-text-overflow: ellipsis;
106
+ text-overflow: ellipsis;
107
+ }
108
+
109
+ /************ Pricing Box CSS ************/
110
+ .acfb_pricing_table_wrap {
111
+ font-family: Lato, sans-serif;
112
+ text-align: center;
113
+ padding: 60px 35px;
114
+ border-radius: 12px;
115
+ }
116
+
117
+ .acfb_pricing_table_wrap .acfb_pricing_table_imgicon{
118
+ margin-bottom: 15px;
119
+ }
120
+
121
+ .acfb_pricing_table_wrap .acfb_pricing_box_title {
122
+ font-weight: 700;
123
+ }
124
+ .acfb_pricing_table_wrap .acfb_pricing_box_price_wrapper {
125
+ margin: 20px 0;
126
+ }
127
+ .acfb_pricing_table_wrap .acfb_pricing_box_price_line {
128
+ display: flex;
129
+ justify-content: center;
130
+ }
131
+ .acfb_pricing_table_wrap
132
+ .acfb_pricing_box_price_line
133
+ .acfb_pricing_box_price_prefix {
134
+ align-self: flex-start;
135
+ }
136
+ .acfb_pricing_table_wrap .acfb_pricing_box_price_line .acfb_pricing_box_price {
137
+ line-height: 100% !important;
138
+ }
139
+ .acfb_pricing_table_wrap
140
+ .acfb_pricing_box_price_line
141
+ .acfb_pricing_box_price_suffix {
142
+ align-self: flex-end;
143
+ }
144
+ .acfb_pricing_table_wrap .acfb_pricing_box_subprice {
145
+ text-transform: uppercase;
146
+ line-height: 100% !important;
147
+ }
148
+ .acfb_pricing_table_wrap .acfb_pricing_box_button a {
149
+ border-radius: 7px;
150
+ align-items: center;
151
+ font-weight: 600;
152
+ cursor: pointer;
153
+ padding: 10px 25px;
154
+ display: inline-block;
155
+ margin: 15px 0;
156
+ text-decoration: none;
157
+ }
158
+
159
+ /************ Price List CSS ************/
160
+ .acfb_price_list_wrap .acfb_price_list_item {
161
+ display: grid;
162
+ grid-column-gap: 15px;
163
+ text-decoration: none;
164
+ }
165
+
166
+ .acfb_price_list_wrap .acfb_price_list_item .acfb_price_list_image{
167
+ grid-area: acfbPli;
168
+ }
169
+
170
+ .acfb_price_list_wrap .acfb_price_list_item .acfb_price_list_text{
171
+ grid-area: acfbPlt;
172
+ }
173
+
174
+ .acfb_price_list_wrap .acfb_price_list_item .acfb_price_list_image img{
175
+ width: 100%;
176
+ }
177
+
178
+ .acfb_price_list_wrap .acfb_price_list_item .acfb_price_list_text .acfb_price_list_header .acfb_price_list_title{grid-area: acfbPlTitle;}
179
+ .acfb_price_list_wrap .acfb_price_list_item .acfb_price_list_text .acfb_price_list_header .acfb_price_list_separator{grid-area: acfbPlSep;}
180
+ .acfb_price_list_wrap .acfb_price_list_item .acfb_price_list_text .acfb_price_list_header .acfb_price_list_price{grid-area: acfbPlPrice;}
181
+
182
+ .acfb_price_list_wrap
183
+ .acfb_price_list_item
184
+ .acfb_price_list_text
185
+ .acfb_price_list_header {
186
+ display: grid;
187
+ grid-template-columns: max-content auto max-content;
188
+ align-items: center;
189
+ grid-gap: 15px;
190
+ font-weight: 600;
191
+ }
192
+
193
+ .acfb_price_list_wrap
194
+ .acfb_price_list_item
195
+ .acfb_price_list_text
196
+ p.acfb_price_list_description {
197
+ margin-top: 10px;
198
+ }
199
+
200
+ /************ Multi Button CSS ************/
201
+ .acfb_multibuttons_wrap {
202
+ display: flex;
203
+ flex-direction: row;
204
+ }
205
+ .acfb_multibuttons_wrap .acfb_button {
206
+ padding: 15px 20px;
207
+ display: inline-block;
208
+ text-decoration: none;
209
+ margin-bottom: 5px;
210
+ }
211
+
212
+ .acfb_multibuttons_wrap .acfb_button:last-child{
213
+ margin-right: 0;
214
+ }
215
+
216
+ /************ Counter Number CSS ************/
217
+ .acfb_counter_number_wrapper {
218
+ display: -webkit-box;
219
+ display: -webkit-flex;
220
+ display: -ms-flexbox;
221
+ display: flex;
222
+ font-weight: 600;
223
+ line-height: 1;
224
+ }
225
+
226
+ .acfb_counter_number_wrapper .acfb_counter_number_prefix {
227
+ text-align: right;
228
+ }
229
+
230
+ .acfb_counter_number_wrapper .acfb_counter_number_suffix {
231
+ text-align: left;
232
+ }
233
+
234
+ .acfb_counter_number_wrapper .acfb_counter_number_prefix,
235
+ .acfb_counter_number_wrapper .acfb_counter_number_suffix {
236
+ -webkit-box-flex: 1;
237
+ -webkit-flex-grow: 1;
238
+ -ms-flex-positive: 1;
239
+ flex-grow: 1;
240
+ white-space: pre-wrap;
241
+ }
242
+
243
+ .acfb_counter .acfb_counter_title {
244
+ text-align: center;
245
+ font-weight: 400;
246
+ line-height: 2.5;
247
+ }
248
+
249
+ /************ Click To Tweet CSS ************/
250
+ .acfb_click_to_tweet {
251
+ display: block;
252
+ -moz-border-radius: 4px;
253
+ border-radius: 4px;
254
+ padding: 15px 30px;
255
+ text-align: left;
256
+ }
257
+
258
+ .acfb_click_to_tweet a {
259
+ display: block;
260
+ text-decoration: none;
261
+ text-transform: none;
262
+ cursor: pointer;
263
+ line-height: 140%;
264
+ letter-spacing: 0.05em;
265
+ }
266
+
267
+ .acfb_click_to_tweet a:hover,
268
+ .acfb_click_to_tweet:hover a:after {
269
+ text-decoration: none;
270
+ }
271
+
272
+ .acfb_click_to_tweet a:before {
273
+ content: "";
274
+ display: inline-block;
275
+ width: 50px;
276
+ height: 50px;
277
+ vertical-align: bottom;
278
+ background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10,7L8,11H11V17H5V11L7,7H10M18,7L16,11H19V17H13V11L15,7H18Z' fill='%23666'/%3E%3C/svg%3E")
279
+ no-repeat right center;
280
+ }
281
+
282
+ .acfb_click_to_tweet a:after {
283
+ margin-top: 20px;
284
+ padding-right: 25px;
285
+ position: relative;
286
+ display: block;
287
+ text-transform: uppercase;
288
+ text-align: right;
289
+ text-decoration: none;
290
+ transition: all 0.5s ease;
291
+ line-height: 20px;
292
+ background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M22.46,6C21.69,6.35 20.86,6.58 20,6.69C20.88,6.16 21.56,5.32 21.88,4.31C21.05,4.81 20.13,5.16 19.16,5.36C18.37,4.5 17.26,4 16,4C13.65,4 11.73,5.92 11.73,8.29C11.73,8.63 11.77,8.96 11.84,9.27C8.28,9.09 5.11,7.38 3,4.79C2.63,5.42 2.42,6.16 2.42,6.94C2.42,8.43 3.17,9.75 4.33,10.5C3.62,10.5 2.96,10.3 2.38,10C2.38,10 2.38,10 2.38,10.03C2.38,12.11 3.86,13.85 5.82,14.24C5.46,14.34 5.08,14.39 4.69,14.39C4.42,14.39 4.15,14.36 3.89,14.31C4.43,16 6,17.26 7.89,17.29C6.43,18.45 4.58,19.13 2.56,19.13C2.22,19.13 1.88,19.11 1.54,19.07C3.44,20.29 5.7,21 8.12,21C16,21 20.33,14.46 20.33,8.79C20.33,8.6 20.33,8.42 20.32,8.23C21.16,7.63 21.88,6.87 22.46,6Z' fill='%2300abf0'/%3E%3C/svg%3E")
293
+ no-repeat right center;
294
+ }
295
+
296
+ /************ Posts CSS ************/
297
+
298
+ .acfb_posts_block {
299
+ }
300
+
301
+ .acfb_posts_block .acfb_post {
302
+ padding: 20px;
303
+ }
304
+
305
+ .acfb_posts_block .acfb_post_grid {
306
+ display: grid;
307
+ grid-gap: 10px;
308
+ }
309
+
310
+ .acfb_posts_block .acfb_post_grid .acfb_post {
311
+ overflow: hidden;
312
+ }
313
+
314
+ .acfb_posts_block .acfb_post_grid .acfb_post .acfb_post_thumbnail img,
315
+ .acfb_posts_block .acfb_post_list .acfb_post .acfb_post_list_thumbnail img{
316
+ width: 100%;
317
+ height: auto;
318
+ }
319
+
320
+ .acfb_posts_block .acfb_post_list .acfb_post {
321
+ display: grid;
322
+ grid-gap: 20px;
323
+ grid-template-columns: 50% 50%;
324
+ margin-bottom: 10px;
325
+ }
326
+
327
+ .acfb_posts_block .acfb_post_list .acfb_post.no_thumb {
328
+ grid-template-columns: 1fr;
329
+ }
330
+
331
+ .acfb_posts_block .acfb_post .acfb_post_thumbnail,
332
+ .acfb_posts_block .acfb_post .acfb_post_title,
333
+ .acfb_posts_block .acfb_post .acfb_post_meta,
334
+ .acfb_posts_block .acfb_post .acfb_post_excerpt,
335
+ .acfb_posts_block .acfb_post .acfb_post_button {
336
+ margin-bottom: 15px;
337
+ }
338
+
339
+ .acfb_posts_block .acfb_post .acfb_post_title h1,
340
+ .acfb_posts_block .acfb_post .acfb_post_title h2,
341
+ .acfb_posts_block .acfb_post .acfb_post_title h3,
342
+ .acfb_posts_block .acfb_post .acfb_post_title h4,
343
+ .acfb_posts_block .acfb_post .acfb_post_title h5,
344
+ .acfb_posts_block .acfb_post .acfb_post_title h6 {
345
+ margin: 0;
346
+ }
347
+
348
+ .acfb_posts_block .acfb_post div:nth-last-of-type(1) {
349
+ margin-bottom: 0;
350
+ }
351
+
352
+ .acfb_posts_block .acfb_post_2 {
353
+ grid-template-columns: 1fr 1fr;
354
+ }
355
+
356
+ .acfb_posts_block .acfb_post_3 {
357
+ grid-template-columns: 1fr 1fr 1fr;
358
+ }
359
+
360
+ .acfb_posts_block .acfb_post_4 {
361
+ grid-template-columns: 1fr 1fr 1fr 1fr;
362
+ }
363
+
364
+ .acfb_posts_block .acfb_post_5 {
365
+ grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
366
+ }
367
+
368
+ .acfb_posts_block .acfb_post_6 {
369
+ grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr;
370
+ }
371
+
372
+ .acfb_posts_block .acfb_post .acfb_post_btn {
373
+ text-decoration: none;
374
+ display: inline-block;
375
+ }
376
+
377
+ @media only screen and (max-width: 767px) {
378
+ .acfb_posts_block .acfb_post_2,
379
+ .acfb_posts_block .acfb_post_3,
380
+ .acfb_posts_block .acfb_post_4,
381
+ .acfb_posts_block .acfb_post_5,
382
+ .acfb_posts_block .acfb_post_6 {
383
+ grid-template-columns: 1fr;
384
+ }
385
+
386
+ .acfb_posts_block .acfb_post_list .acfb_post {
387
+ grid-template-columns: 1fr;
388
+ }
389
+ }
390
+
391
+ /************ Photo Collage CSS ************/
392
+
393
+ /* Two Gird Style 1*/
394
+ .acfb_two-grid-style-one {
395
+ display: grid;
396
+ grid-template-columns: 1fr 1fr;
397
+ grid-template-rows: 1fr;
398
+ grid-template-areas: "one two";
399
+ }
400
+
401
+ /* Two Gird Style 2*/
402
+ .acfb_two-grid-style-two {
403
+ display: grid;
404
+ grid-template-columns: 1fr;
405
+ grid-template-rows: 1fr 1fr;
406
+ grid-template-areas: "one" "two";
407
+ }
408
+
409
+ .acfb_collage_2 .acfb_one {
410
+ grid-area: one;
411
+ background-size: cover;
412
+ background-position: center;
413
+ }
414
+ .acfb_collage_2 .acfb_two {
415
+ grid-area: two;
416
+ background-size: cover;
417
+ background-position: center;
418
+ }
419
+
420
+ /* Three Gird Style 1*/
421
+ .acfb_three-grid-style-one {
422
+ display: grid;
423
+ grid-template-columns: 1fr 1fr;
424
+ grid-template-rows: 1fr 1fr;
425
+ grid-template-areas: "one one" "two three";
426
+ }
427
+
428
+ /* Three Gird Style 2*/
429
+ .acfb_three-grid-style-two {
430
+ display: grid;
431
+ grid-template-columns: 1fr 1fr;
432
+ grid-template-rows: 1fr 1fr;
433
+ grid-template-areas: "one two" "three three";
434
+ }
435
+
436
+ /* Three Gird Style 3 */
437
+ .acfb_three-grid-style-three {
438
+ display: grid;
439
+ grid-template-columns: 1fr 1fr;
440
+ grid-template-rows: 1fr 1fr;
441
+ grid-template-areas: "one two" "one three";
442
+ }
443
+
444
+ /* Three Gird Style 4 */
445
+ .acfb_three-grid-style-four {
446
+ display: grid;
447
+ grid-template-columns: 1fr 1fr;
448
+ grid-template-rows: 1fr 1fr;
449
+ grid-template-areas: "two one" "three one";
450
+ }
451
+
452
+ /* Three Gird Style 5 */
453
+ .acfb_three-grid-style-five {
454
+ display: grid;
455
+ grid-template-columns: 1fr 1fr;
456
+ grid-template-rows: 1fr 1fr 1fr;
457
+ grid-template-areas: "one one" "two two" "three three";
458
+ }
459
+
460
+ /* Three Gird Style 6 */
461
+ .acfb_three-grid-style-six {
462
+ display: grid;
463
+ grid-template-columns: 1fr 1fr 1fr;
464
+ grid-template-rows: 1fr 1fr;
465
+ grid-template-areas: "one two three" "one two three";
466
+ }
467
+
468
+ .acfb_collage_3 .acfb_one {
469
+ grid-area: one;
470
+ background-size: cover;
471
+ background-position: center;
472
+ }
473
+ .acfb_collage_3 .acfb_two {
474
+ grid-area: two;
475
+ background-size: cover;
476
+ background-position: center;
477
+ }
478
+ .acfb_collage_3 .acfb_three {
479
+ grid-area: three;
480
+ background-size: cover;
481
+ background-position: center;
482
+ }
483
+
484
+ /* Four Gird Style 1 */
485
+ .acfb_four-grid-style-one {
486
+ display: grid;
487
+ grid-template-columns: 1fr 1fr;
488
+ grid-template-rows: 1fr 1fr 1fr 1fr;
489
+ grid-template-areas: "one one" "two two" "three three" "four four";
490
+ }
491
+
492
+ /* Four Gird Style 2 */
493
+ .acfb_four-grid-style-two {
494
+ display: grid;
495
+ grid-template-columns: 1fr 1fr 1fr 1fr;
496
+ grid-template-rows: 1fr 1fr;
497
+ grid-template-areas: "one two three four" "one two three four";
498
+ }
499
+
500
+ /* Four Gird Style 3 */
501
+ .acfb_four-grid-style-three {
502
+ display: grid;
503
+ grid-template-columns: 1fr 1fr 1fr;
504
+ grid-template-rows: 1fr 1fr;
505
+ grid-template-areas: "one one one" "two three four";
506
+ }
507
+
508
+ /* Four Gird Style 4 */
509
+ .acfb_four-grid-style-four {
510
+ display: grid;
511
+ grid-template-columns: 1fr 1fr 1fr;
512
+ grid-template-rows: 1fr 1fr;
513
+ grid-template-areas: "one two three" "four four four";
514
+ }
515
+
516
+ /* Four Gird Style 5 */
517
+ .acfb_four-grid-style-five {
518
+ display: grid;
519
+ grid-template-columns: 1fr 1fr;
520
+ grid-template-rows: 1fr 1fr 1fr;
521
+ grid-template-areas: "one two" "one three" "one four";
522
+ }
523
+
524
+ /* Four Gird Style 6 */
525
+ .acfb_four-grid-style-six {
526
+ display: grid;
527
+ grid-template-columns: 1fr 1fr;
528
+ grid-template-rows: 1fr 1fr 1fr;
529
+ grid-template-areas: "one four" "two four" "three four";
530
+ }
531
+
532
+ /* Four Gird Style 7 */
533
+ .acfb_four-grid-style-seven {
534
+ display: grid;
535
+ grid-template-columns: 1fr 1fr 1fr;
536
+ grid-template-rows: 1fr 1fr;
537
+ grid-template-areas: "one one two" "three four four";
538
+ }
539
+
540
+ /* Four Gird Style 8 */
541
+ .acfb_four-grid-style-eight {
542
+ display: grid;
543
+ grid-template-columns: 1fr 1fr 1fr;
544
+ grid-template-rows: 1fr 1fr;
545
+ grid-template-areas: "one two two" "three three four";
546
+ }
547
+
548
+ /* Four Gird Style 9 */
549
+ .acfb_four-grid-style-nine {
550
+ display: grid;
551
+ grid-template-columns: 1fr 1fr;
552
+ grid-template-rows: 1fr 1fr 1fr;
553
+ grid-template-areas: "one three" "one four" "two four";
554
+ }
555
+
556
+ /* Four Gird Style 10 */
557
+ .acfb_four-grid-style-ten {
558
+ display: grid;
559
+ grid-template-columns: 1fr 1fr;
560
+ grid-template-rows: 1fr 1fr 1fr;
561
+ grid-template-areas: "one three" "two three" "two four";
562
+ }
563
+
564
+ /* Four Gird Style 11 */
565
+ .acfb_four-grid-style-eleven {
566
+ display: grid;
567
+ grid-template-columns: 1fr 1fr;
568
+ grid-template-rows: 1fr 1fr 1fr;
569
+ grid-template-areas: "one two" "three three" "four four";
570
+ }
571
+
572
+ /* Four Gird Style 12 */
573
+ .acfb_four-grid-style-twelve {
574
+ display: grid;
575
+ grid-template-columns: 1fr 1fr;
576
+ grid-template-rows: 1fr 1fr 1fr;
577
+ grid-template-areas: "one one" "two three" "four four";
578
+ }
579
+
580
+ /* Four Gird Style 13 */
581
+ .acfb_four-grid-style-thirteen {
582
+ display: grid;
583
+ grid-template-columns: 1fr 1fr;
584
+ grid-template-rows: 1fr 1fr 1fr;
585
+ grid-template-areas: "one one" "two two" "three four";
586
+ }
587
+
588
+ /* Four Gird Style 14 */
589
+ .acfb_four-grid-style-fourteen {
590
+ display: grid;
591
+ grid-template-columns: 1fr 1fr 1fr;
592
+ grid-template-rows: 1fr 1fr;
593
+ grid-template-areas: "one three four" "two three four";
594
+ }
595
+
596
+ /* Four Gird Style 15 */
597
+ .acfb_four-grid-style-fifteen {
598
+ display: grid;
599
+ grid-template-columns: 1fr 1fr;
600
+ grid-template-rows: 1fr 1fr;
601
+ grid-template-areas: "one three" "two four";
602
+ }
603
+
604
+ .acfb_collage_4 .acfb_one {
605
+ grid-area: one;
606
+ background-size: cover;
607
+ background-position: center;
608
+ }
609
+ .acfb_collage_4 .acfb_two {
610
+ grid-area: two;
611
+ background-size: cover;
612
+ background-position: center;
613
+ }
614
+ .acfb_collage_4 .acfb_three {
615
+ grid-area: three;
616
+ background-size: cover;
617
+ background-position: center;
618
+ }
619
+ .acfb_collage_4 .acfb_four {
620
+ grid-area: four;
621
+ background-size: cover;
622
+ background-position: center;
623
+ }
624
+
625
+ .acfb_radio_image .acf-input .acf-radio-list:before,
626
+ .acfb_radio_image .acf-input .acf-radio-list:after {
627
+ content: none;
628
+ }
629
+
630
+ .acfb_radio_image .acf-input .acf-radio-list {
631
+ display: grid;
632
+ grid-template-columns: 1fr 1fr 1fr 1fr;
633
+ grid-gap: 10px;
634
+ }
635
+
636
+ .acfb_radio_image .acf-input .acf-radio-list li input {
637
+ display: none;
638
+ }
639
+
640
+ .acfb_radio_image .acf-input .acf-radio-list li .selected img {
641
+ border: 2px solid #48a8f4;
642
+ }
643
+
644
+ .acfb_svg_icon {
645
+ fill: none;
646
+ stroke: #555d66;
647
+ stroke-linecap: round;
648
+ stroke-linejoin: round;
649
+ stroke-width: 2px;
650
+ }
651
+
652
+
653
+ /************ Social Sharing CSS ************/
654
+
655
+ .acfb_social_sharing_main_block a:hover {
656
+ opacity: 0.9 !important;
657
+ }
658
+
659
+ .acfb_social_networks ul.acf-checkbox-list li {
660
+ width: calc(100% / 7.7);
661
+ display: inline-block;
662
+ }
663
+
664
+ .acfb_social_networks ul.acf-checkbox-list li img.acfb_social_icons {
665
+ width: 100%;
666
+ }
667
+
668
+ .acfb_social_networks ul.acf-checkbox-list:nth-child(n + 11) {
669
+ width: 100%;
670
+ display: flex;
671
+ flex-direction: row;
672
+ }
673
+
674
+ .acfb_social_networks ul.acf-radio-list li input[type="checkbox"],
675
+ .acfb_social_networks ul.acf-radio-list li input[type="radio"],
676
+ .acfb_social_networks ul.acf-checkbox-list li input[type="checkbox"],
677
+ .acfb_social_networks ul.acf-checkbox-list li input[type="radio"] {
678
+ display: none;
679
+ visibility: hidden;
680
+ }
681
+
682
+
683
+ .acfb_social_sharing_main_block a {
684
+ padding: 10px;
685
+ font-size: 16px;
686
+ border-radius: 2px;
687
+ border: 0;
688
+ color: white;
689
+ outline: 0;
690
+ text-decoration: none !important;
691
+ text-align: center;
692
+ margin: 5px 3px;
693
+ }
694
+
695
+ .acfb_social_sharing_main_block a > span {
696
+ cursor: pointer;
697
+ }
698
+
699
+ .acfb_social_networks .acf-checkbox-list label:not(.selected) svg {
700
+ background: white !important;
701
+ }
702
+
703
+ .acfb_social_networks .acf-checkbox-list label:not(.selected) svg path {
704
+ fill: #555d66;
705
+ }
706
+
707
+ .acfb_social_sharing_main_block {
708
+ display: flex;
709
+ flex-direction: row;
710
+ flex-wrap: wrap;
711
+ }
712
+
713
+ svg.acfb_facebook,
714
+ svg.acfb_twitter,
715
+ svg.acfb_pinterest,
716
+ svg.acfb_hackernews,
717
+ svg.acfb_email,
718
+ svg.acfb_linkedin,
719
+ svg.acfb_reddit,
720
+ svg.acfb_xing,
721
+ svg.acfb_whatsapp,
722
+ svg.acfb_vk,
723
+ svg.acfb_telegram {
724
+ width: 20px;
725
+ }
726
+
727
+ .acfb_social_facebook_main span,
728
+ .acfb_social_twitter_main span,
729
+ .acfb_social_pinterest_main span,
730
+ .acfb_social_hackernews_main span,
731
+ .acfb_social_email_main span,
732
+ .acfb_social_linkedin_main span,
733
+ .acfb_social_reddit_main span,
734
+ .acfb_social_xing_main span,
735
+ .acfb_social_whatsapp_main span,
736
+ .acfb_social_vk_main span,
737
+ .acfb_social_telegram_main span {
738
+ vertical-align: top !important;
739
+ color: white;
740
+ }
741
+
742
+ .acfb_social_facebook_main {
743
+ background: #3b5998 !important;
744
+ }
745
+
746
+ .acfb_social_twitter_main {
747
+ background-color: #38a1f3 !important;
748
+ }
749
+
750
+ .acfb_social_email_main {
751
+ background-color: #777 !important;
752
+ }
753
+
754
+ .acfb_social_pinterest_main {
755
+ background-color: #c8232c !important;
756
+ }
757
+
758
+ .acfb_social_linkedin_main {
759
+ background-color: #0077b5 !important;
760
+ }
761
+
762
+ .acfb_social_reddit_main {
763
+ background-color: #ff4500 !important;
764
+ }
765
+
766
+ .acfb_social_xing_main {
767
+ background-color: #1a7576 !important;
768
+ }
769
+ .acfb_social_whatsapp_main {
770
+ background-color: #25d366 !important;
771
+ }
772
+
773
+ .acfb_social_hackernews_main {
774
+ background-color: #f60 !important;
775
+ }
776
+
777
+ .acfb_social_vk_main {
778
+ background-color: #507299 !important;
779
+ }
780
+
781
+ .acfb_social_telegram_main {
782
+ background-color: #54a9eb !important;
783
+ }
784
+
785
+ svg.acfb_social_icons {
786
+ background: grey;
787
+ padding: 5px 5px;
788
+ margin: 0px 4px;
789
+ }
790
+
791
+ svg.acfb_social_icons path {
792
+ fill: white;
793
+ }
794
+
795
+ .acfb_social_sharing_main_block svg {
796
+ vertical-align: sub;
797
+ }
798
+
799
+
800
+ /************ Image Slider CSS ************/
801
+ .acfb_slider_block{}
802
+
803
+ .acfb_slider_block .swiper-container{}
804
+
805
+ .acfb_slider_block .swiper-container .swiper-wrapper{}
806
+
807
+ .acfb_slider_block .swiper-container .swiper-wrapper .swiper-slide{
808
+ position: relative;
809
+ }
810
+
811
+ .acfb_slider_block .swiper-container .swiper-wrapper .swiper-slide img{
812
+ align-self: center;
813
+ }
814
+
815
+ .acfb_slider_block .swiper-container .swiper-wrapper .swiper-slide .acfb_caption{
816
+ position: absolute;
817
+ padding: 10px;
818
+ }
819
+
820
+ .acfb_slider_block .swiper-container .acfb-button-next, .acfb_slider_block .swiper-container .acfb-button-prev{
821
+ position: absolute;
822
+ top: 50%;
823
+ width: 58px;
824
+ margin-top: -22px;
825
+ z-index: 10;
826
+ cursor: pointer;
827
+ background: rgba(255, 255, 255, 0.7);
828
+ padding: 15px;
829
+ border-radius: 5px;
830
+ line-height: 1;
831
+ }
832
+
833
+ .acfb_slider_block .swiper-container .acfb-button-next path, .acfb_slider_block .swiper-container .acfb-button-prev path{
834
+ fill: #191e23;
835
+ }
836
+
837
+ .acfb_slider_block .swiper-container .acfb-button-next{
838
+ right: 10px;
839
+ left: auto;
840
+ }
841
+
842
+ .acfb_slider_block .swiper-container .acfb-button-prev{
843
+ left: 10px;
844
+ right: auto;
845
+ }
846
+
847
+ .acfb_slider_block .swiper-container .swiper-pagination .swiper-pagination-bullet-active{
848
+ background: #191e23 !important;
849
+ }
850
+
851
+ /************ Tab CSS ************/
852
+ .acfb_tabs_block ul {
853
+ overflow: hidden;
854
+ margin:0 !important;
855
+ padding:0 !important;
856
+ }
857
+
858
+ .acfb_tabs_block ul li{
859
+ float:left;
860
+ display:inline-block;
861
+ }
862
+
863
+ .acfb_tabs_block ul li:last-child {
864
+ border-right:none;
865
+ }
866
+
867
+ .acfb_tabs_block ul li:first-child {
868
+ padding-left:0;
869
+ }
870
+
871
+ .acfb_tabs_block ul li a {
872
+ text-align:center;
873
+ display:block;
874
+ text-decoration: none;
875
+ padding: 15px 20px;
876
+ line-height: 16px;
877
+ outline: none;
878
+ cursor: pointer;
879
+ }
880
+
881
+ .acfb_tabs_block .acfb_tab_content{
882
+ padding: 20px;
883
+ }
884
+
885
+
886
+ /************ Toggle CSS ************/
887
+ .acfb_toggle_block .acfb_toggle_title{
888
+ width: 100%;
889
+ border: none;
890
+ padding: 10px 20px;
891
+ outline: none;
892
+ cursor: pointer;
893
+ }
894
+
895
+ .acfb_toggle_block .acfb_toggle_title:hover{
896
+ width: 100%;
897
+ border: none;
898
+ }
899
+
900
+ .acfb_toggle_block .acfb_toggle_content {
901
+ display:none;
902
+ padding: 25px;
903
+ }
904
+
905
+
906
+ /************ Accordion CSS ************/
907
+ .acfb_accordion_block .acfb_accordion .acfb_accordion_title{
908
+ display: block;
909
+ font-weight: 600;
910
+ padding: 10px 20px;
911
+ outline: none;
912
+ }
913
+
914
+ .acfb_accordion_block .acfb_accordion .acfb_accordion_title:focus{
915
+ box-shadow: none;
916
+ }
917
+
918
+ .acfb_accordion_block .acfb_accordion .acfb_accordion_content{
919
+ display:none;
920
+ padding: 25px;
921
+ }
922
+
923
+ .acfb_accordion_block .acfb_accordion .acfb_accordion_content .acfb_accordion_content_inner{
924
+ display: flex;
925
+ }
926
+
927
+
928
+ /************ Scrollable Image CSS ************/
929
+ .acfb_scrollable_image{
930
+ transition: background-position 1.5s ease-out 0.5s;
931
+ background-position: top center;
932
+ background-repeat: no-repeat;
933
+ background-size: 100%;
934
+ }
935
+
936
+ .acfb_scrollable_image:hover{
937
+ background-position: bottom center!important;
938
+ }
939
+
940
+
941
+
942
+
943
+ /************ Flip Box CSS ************/
944
+
945
+ /* Flip Box Flip */
946
+ .acfb_flip_box_block .acfb_box_inner h3{margin: 10px;}
947
+ .acfb_flip_box_block .acfb_box_inner p{margin: 0 0 0 10px; }
948
+ .acfb_flip_box_block .acfb_box_inner .acfb_flipbox_back a{
949
+ cursor: pointer;
950
+ padding: 10px 25px;
951
+ display: inline-block;
952
+ margin: 15px 0 0 0;
953
+ text-decoration: none;
954
+ }
955
+
956
+ .acfb_flip .acfb_box_inner{
957
+ -webkit-perspective: 1000px;
958
+ perspective: 1000px;
959
+ -webkit-transform-style: preserve-3d;
960
+ transform-style: preserve-3d;
961
+ position: relative;
962
+ -webkit-box-sizing: border-box;
963
+ box-sizing: border-box;
964
+ }
965
+
966
+ .acfb_flip .acfb_box_inner .acfb_flipbox_front, .acfb_flip .acfb_box_inner .acfb_flipbox_back{
967
+ -webkit-transform-style: preserve-3d;
968
+ transform-style: preserve-3d;
969
+ -webkit-backface-visibility: hidden;
970
+ backface-visibility: hidden;
971
+ position: absolute;
972
+ width: 100%;
973
+ height: 100%;
974
+ -webkit-transition: all .6s ease-in-out;
975
+ -o-transition: all .6s ease-in-out;
976
+ transition: all .6s ease-in-out;
977
+ }
978
+
979
+ .acfb_flip .acfb_box_inner .acfb_flipbox_front{
980
+ -webkit-transform: none;
981
+ -ms-transform: none;
982
+ transform: none;
983
+ z-index: 1;
984
+ }
985
+
986
+ /* Flip Left */
987
+ .acfb_flip.acfb_left .acfb_box_inner:hover .acfb_flipbox_front{
988
+ -webkit-transform: rotateX(0) rotateY(-180deg);
989
+ transform: rotateX(0) rotateY(-180deg);
990
+ }
991
+
992
+ .acfb_flip.acfb_left .acfb_box_inner .acfb_flipbox_back{
993
+ -webkit-transform: rotateX(0) rotateY(180deg);
994
+ transform: rotateX(0) rotateY(180deg);
995
+ }
996
+
997
+ /* Flip Right */
998
+ .acfb_flip.acfb_right .acfb_box_inner:hover .acfb_flipbox_front{
999
+ -webkit-transform: rotateX(0) rotateY(180deg);
1000
+ transform: rotateX(0) rotateY(180deg);
1001
+ }
1002
+ .acfb_flip.acfb_right .acfb_box_inner .acfb_flipbox_back{
1003
+ -webkit-transform: rotateX(0) rotateY(-180deg);
1004
+ transform: rotateX(0) rotateY(-180deg);
1005
+ }
1006
+
1007
+ /* Flip Up */
1008
+ .acfb_flip.acfb_up .acfb_box_inner:hover .acfb_flipbox_front{
1009
+ -webkit-transform: rotateX(180deg) rotateY(0);
1010
+ transform: rotateX(180deg) rotateY(0);
1011
+ }
1012
+ .acfb_flip.acfb_up .acfb_box_inner .acfb_flipbox_back{
1013
+ -webkit-transform: rotateX(-180deg) rotateY(0);
1014
+ transform: rotateX(-180deg) rotateY(0);
1015
+ }
1016
+
1017
+ /* Flip Down */
1018
+ .acfb_flip.acfb_down .acfb_box_inner:hover .acfb_flipbox_front{
1019
+ -webkit-transform: rotateX(-180deg) rotateY(0);
1020
+ transform: rotateX(-180deg) rotateY(0);
1021
+ }
1022
+ .acfb_flip.acfb_down .acfb_box_inner .acfb_flipbox_back{
1023
+ -webkit-transform: rotateX(180deg) rotateY(0);
1024
+ transform: rotateX(180deg) rotateY(0);
1025
+ }
1026
+
1027
+ .acfb_flip .acfb_box_inner:hover .acfb_flipbox_back{
1028
+ -webkit-transform: none;
1029
+ -ms-transform: none;
1030
+ transform: none;
1031
+ }
1032
+
1033
+ /* Flip Box Slide */
1034
+ .acfb_slide .acfb_box_inner{
1035
+ overflow: hidden;
1036
+ position: relative;
1037
+ perspective: 1000px;
1038
+ transform-style: preserve-3d;
1039
+ }
1040
+
1041
+ .acfb_slide .acfb_box_inner .acfb_flipbox_front, .acfb_slide .acfb_box_inner .acfb_flipbox_back{
1042
+ position: absolute;
1043
+ width: 100%;
1044
+ height: 100%;
1045
+ transition: all 0.6s ease-in-out 0s;
1046
+ }
1047
+
1048
+
1049
+ /* Slide Left */
1050
+ .acfb_slide.acfb_left .acfb_box_inner .acfb_flipbox_back{
1051
+ transform: translateX(100%) translateY(0px);
1052
+ }
1053
+
1054
+ /* Slide Right */
1055
+ .acfb_slide.acfb_right .acfb_box_inner .acfb_flipbox_back{
1056
+ transform: translateX(-100%) translateY(0px);
1057
+ }
1058
+
1059
+ /* Slide Up */
1060
+ .acfb_slide.acfb_up .acfb_box_inner .acfb_flipbox_back{
1061
+ transform: translateX(0px) translateY(100%);
1062
+ }
1063
+
1064
+ /* Slide Down */
1065
+ .acfb_slide.acfb_down .acfb_box_inner .acfb_flipbox_back{
1066
+ transform: translateX(0px) translateY(-100%);
1067
+ }
1068
+
1069
+ .acfb_slide .acfb_box_inner:hover .acfb_flipbox_back{
1070
+ transform: none;
1071
+ }
1072
+
1073
+ /* Flip Box Push */
1074
+ .acfb_push{
1075
+ overflow: hidden;
1076
+ }
1077
+
1078
+ .acfb_push .acfb_box_inner{
1079
+ overflow: hidden;
1080
+ position: relative;
1081
+ perspective: 1000px;
1082
+ transform-style: preserve-3d;
1083
+ }
1084
+
1085
+ .acfb_push .acfb_box_inner .acfb_flipbox_front, .acfb_push .acfb_box_inner .acfb_flipbox_back{
1086
+ position: absolute;
1087
+ width: 100%;
1088
+ height: 100%;
1089
+ transition: all 0.6s ease-in-out 0s;
1090
+ }
1091
+
1092
+ .acfb_push .acfb_box_inner .acfb_flipbox_front{
1093
+ transform: none;
1094
+ }
1095
+
1096
+ /* Slide Left */
1097
+ .acfb_push.acfb_left .acfb_box_inner .acfb_flipbox_back{
1098
+ transform: translateX(100%) translateY(0px);
1099
+ }
1100
+
1101
+ .acfb_push.acfb_left .acfb_box_inner:hover .acfb_flipbox_front{
1102
+ transform: translateX(-100%) translateY(0px);
1103
+ }
1104
+
1105
+ /* Slide Right */
1106
+ .acfb_push.acfb_right .acfb_box_inner .acfb_flipbox_back{
1107
+ transform: translateX(-100%) translateY(0px);
1108
+ }
1109
+
1110
+ .acfb_push.acfb_right .acfb_box_inner:hover .acfb_flipbox_front{
1111
+ transform: translateX(100%) translateY(0px);
1112
+ }
1113
+
1114
+ /* Slide Up */
1115
+ .acfb_push.acfb_up .acfb_box_inner .acfb_flipbox_back{
1116
+ transform: translateX(0px) translateY(100%);
1117
+ }
1118
+
1119
+ .acfb_push.acfb_up .acfb_box_inner:hover .acfb_flipbox_front{
1120
+ transform: translateX(0px) translateY(-100%);
1121
+ }
1122
+
1123
+ /* Slide Down */
1124
+ .acfb_push.acfb_down .acfb_box_inner .acfb_flipbox_back{
1125
+ transform: translateX(0px) translateY(-100%);
1126
+ }
1127
+
1128
+ .acfb_push.acfb_down .acfb_box_inner:hover .acfb_flipbox_front{
1129
+ transform: translateX(0px) translateY(100%);
1130
+ }
1131
+
1132
+ .acfb_push .acfb_box_inner:hover .acfb_flipbox_back{
1133
+ transform: none;
1134
+ }
1135
+
1136
+
1137
+ /************ Timeline CSS ************/
1138
+ .acfb_timeline .acfb_timeline_inner .acfb_timeline_content .acfb_timeline_image,
1139
+ .acfb_timeline .acfb_timeline_inner .acfb_timeline_content .acfb_timeline_date,
1140
+ .acfb_timeline .acfb_timeline_inner .acfb_timeline_content .acfb_timeline_title,
1141
+ .acfb_timeline .acfb_timeline_inner .acfb_timeline_content .acfb_timeline_desc,
1142
+ .acfb_timeline .acfb_timeline_inner .acfb_timeline_content .acfb_timeline_button{
1143
+ margin: 10px 0;
1144
+ }
1145
+ .acfb_timeline .acfb_timeline_inner .acfb_timeline_content .acfb_timeline_desc p{margin: 0;}
1146
+
1147
+
1148
+ .acfb_timeline .acfb_timeline_button{
1149
+ cursor: pointer;
1150
+ padding: 10px 25px;
1151
+ display: inline-block;
1152
+ margin: 15px 0;
1153
+ text-decoration: none;
1154
+ }
1155
+
1156
+
1157
+ /* Left Timeline*/
1158
+ .acfb_left_timeline{
1159
+ position: relative;
1160
+ }
1161
+
1162
+ .acfb_left_timeline::after{
1163
+ content: '';
1164
+ position: absolute;
1165
+ width: 4px;
1166
+ top: 0;
1167
+ bottom: 0;
1168
+ left: 0%;
1169
+ margin-left: -2px;
1170
+ }
1171
+
1172
+ .acfb_left_timeline .acfb_timeline_inner{
1173
+ position: relative;
1174
+ width: 100%;
1175
+ }
1176
+
1177
+ .acfb_left_timeline .acfb_timeline_inner::after{
1178
+ content: '';
1179
+ position: absolute;
1180
+ width: 25px;
1181
+ height: 25px;
1182
+ right: -12px;
1183
+ top: 15px;
1184
+ border-radius: 50%;
1185
+ z-index: 1;
1186
+ }
1187
+
1188
+ .acfb_left_timeline .acfb_timeline_inner .acfb_timeline_content{
1189
+ padding: 20px 30px;
1190
+ position: relative;
1191
+ display: flex;
1192
+ flex-direction: column;
1193
+ align-items: flex-start;
1194
+ }
1195
+
1196
+
1197
+ .acfb_left_timeline .acfb_timeline_inner{
1198
+ left: 0%;
1199
+ padding: 10px 0px 10px 40px;
1200
+ text-align: left;
1201
+ }
1202
+
1203
+ .acfb_left_timeline .acfb_timeline_inner::before{
1204
+ content: " ";
1205
+ height: 0;
1206
+ position: absolute;
1207
+ top: 22px;
1208
+ width: 0;
1209
+ z-index: 1;
1210
+ left: 30px;
1211
+ border: medium solid #f3f4f5;
1212
+ border-width: 10px 10px 10px 0;
1213
+ }
1214
+
1215
+ .acfb_left_timeline .acfb_timeline_inner::after{
1216
+ left: -12px;
1217
+ }
1218
+
1219
+ /* Center Timeline*/
1220
+ .acfb_center_timeline{
1221
+ position: relative;
1222
+ }
1223
+
1224
+ .acfb_center_timeline::after{
1225
+ content: '';
1226
+ position: absolute;
1227
+ width: 4px;
1228
+ top: 0;
1229
+ bottom: 0;
1230
+ left: 50%;
1231
+ margin-left: -2px;
1232
+ }
1233
+
1234
+ .acfb_center_timeline .acfb_timeline_inner{
1235
+ position: relative;
1236
+ width: 50%;
1237
+ }
1238
+
1239
+ .acfb_center_timeline .acfb_timeline_inner::after{
1240
+ content: '';
1241
+ position: absolute;
1242
+ width: 25px;
1243
+ height: 25px;
1244
+ right: -12px;
1245
+ top: 15px;
1246
+ border-radius: 50%;
1247
+ z-index: 1;
1248
+ }
1249
+
1250
+ .acfb_center_timeline .acfb_timeline_inner .acfb_timeline_content{
1251
+ position: relative;
1252
+ }
1253
+
1254
+ .acfb_center_timeline .acfb_timeline_inner:nth-child(odd){
1255
+ left: 0;
1256
+ padding: 10px 40px 10px 0px;
1257
+ }
1258
+
1259
+ .acfb_center_timeline .acfb_timeline_inner:nth-child(odd) .acfb_timeline_content{
1260
+ text-align: right;
1261
+ display: flex;
1262
+ flex-direction: column;
1263
+ align-items: flex-end;
1264
+ }
1265
+
1266
+ .acfb_center_timeline .acfb_timeline_inner:nth-child(odd)::before{
1267
+ content: " ";
1268
+ height: 0;
1269
+ position: absolute;
1270
+ top: 22px;
1271
+ width: 0;
1272
+ z-index: 1;
1273
+ right: 30px;
1274
+ border: medium solid #f3f4f5;
1275
+ border-width: 10px 0 10px 10px;
1276
+ }
1277
+
1278
+ .acfb_center_timeline .acfb_timeline_inner:nth-child(even){
1279
+ left: 50%;
1280
+ padding: 10px 0px 10px 40px;
1281
+ text-align: left;
1282
+ }
1283
+
1284
+ .acfb_center_timeline .acfb_timeline_inner:nth-child(even) .acfb_timeline_content{
1285
+ text-align: left;
1286
+ display: flex;
1287
+ flex-direction: column;
1288
+ align-items: flex-start;
1289
+ }
1290
+
1291
+ .acfb_center_timeline .acfb_timeline_inner:nth-child(even)::before{
1292
+ content: " ";
1293
+ height: 0;
1294
+ position: absolute;
1295
+ top: 22px;
1296
+ width: 0;
1297
+ z-index: 1;
1298
+ left: 30px;
1299
+ border: medium solid #f3f4f5;
1300
+ border-width: 10px 10px 10px 0;
1301
+ }
1302
+
1303
+ .acfb_center_timeline .acfb_timeline_inner:nth-child(even)::after{
1304
+ left: -12px;
1305
+ }
1306
+
1307
+ @media screen and (max-width: 767px) {
1308
+ .acfb_center_timeline .acfb_timeline_inner .acfb_timeline_content{
1309
+ text-align: left;
1310
+ }
1311
+
1312
+ .acfb_center_timeline .acfb_timeline_inner{
1313
+ width: 100%;
1314
+ }
1315
+
1316
+ .acfb_center_timeline::after, .acfb_center_timeline .acfb_timeline_inner:nth-child(even){
1317
+ left: 0;
1318
+ }
1319
+
1320
+ .acfb_center_timeline .acfb_timeline_inner:nth-child(odd), .acfb_center_timeline .acfb_timeline_inner:nth-child(even){
1321
+ padding: 10px 0px 10px 40px;
1322
+ }
1323
+
1324
+ .acfb_center_timeline .acfb_timeline_inner::after{
1325
+ left: -12px;
1326
+ }
1327
+
1328
+ .acfb_center_timeline .acfb_timeline_inner:nth-child(odd)::before{
1329
+ left: 30px;
1330
+ border-width: 10px 10px 10px 0px;
1331
+ }
1332
+ }
1333
+
1334
+ /* Right Timeline*/
1335
+ .acfb_right_timeline{
1336
+ position: relative;
1337
+ }
1338
+
1339
+ .acfb_right_timeline::after{
1340
+ content: '';
1341
+ position: absolute;
1342
+ width: 4px;
1343
+ top: 0;
1344
+ bottom: 0;
1345
+ right: 0%;
1346
+ margin-right: -1px;
1347
+ }
1348
+
1349
+ .acfb_right_timeline .acfb_timeline_inner{
1350
+ position: relative;
1351
+ }
1352
+
1353
+ .acfb_right_timeline .acfb_timeline_inner::after{
1354
+ content: '';
1355
+ position: absolute;
1356
+ width: 25px;
1357
+ height: 25px;
1358
+ right: -12px;
1359
+ top: 15px;
1360
+ border-radius: 50%;
1361
+ z-index: 1;
1362
+ }
1363
+
1364
+ .acfb_right_timeline .acfb_timeline_inner .acfb_timeline_content{
1365
+ padding: 20px 30px;
1366
+ position: relative;
1367
+ display: flex;
1368
+ flex-direction: column;
1369
+ align-items: flex-end;
1370
+ }
1371
+
1372
+ .acfb_right_timeline .acfb_timeline_inner{
1373
+ left: 0;
1374
+ padding: 10px 40px 10px 0px;
1375
+ text-align: right;
1376
+ }
1377
+
1378
+ .acfb_right_timeline .acfb_timeline_inner::before{
1379
+ content: " ";
1380
+ height: 0;
1381
+ position: absolute;
1382
+ top: 22px;
1383
+ width: 0;
1384
+ z-index: 1;
1385
+ right: 30px;
1386
+ border: medium solid #f3f4f5;
1387
+ border-width: 10px 0 10px 10px;
1388
+ }
1389
+
1390
+
1391
+
1392
+
1393
+
1394
+
1395
+
1396
+
1397
+
1398
+
1399
+
1400
+ /************ Image Accordion CSS ************/
1401
+ .acfb_image_accordion{
1402
+ display: -webkit-box;
1403
+ display: -webkit-flex;
1404
+ display: -ms-flexbox;
1405
+ display: flex;
1406
+ }
1407
+
1408
+ .acfb_image_accordion_item{
1409
+ cursor: pointer;
1410
+ -webkit-background-size: cover;
1411
+ background-size: cover;
1412
+ background-position: center;
1413
+ background-repeat: no-repeat;
1414
+ position: relative;
1415
+ -webkit-box-flex: 1;
1416
+ -webkit-flex: 1;
1417
+ -ms-flex: 1;
1418
+ flex: 1;
1419
+ text-decoration: none;
1420
+ -webkit-transition: -webkit-box-flex .4s,-webkit-flex .4s;
1421
+ transition: -webkit-box-flex .4s,-webkit-flex .4s;
1422
+ -o-transition: flex .4s;
1423
+ transition: flex .4s;
1424
+ transition: flex .4s,-webkit-box-flex .4s,-webkit-flex .4s,-ms-flex .4s;
1425
+ overflow: hidden;
1426
+ }
1427
+
1428
+
1429
+ .acfb_image_accordion_overlay{
1430
+ display: -webkit-box;
1431
+ display: -webkit-flex;
1432
+ display: -ms-flexbox;
1433
+ display: flex;
1434
+ -webkit-box-align: center;
1435
+ -webkit-align-items: center;
1436
+ -ms-flex-align: center;
1437
+ /*align-items: center;*/
1438
+ -webkit-box-pack: center;
1439
+ -webkit-justify-content: center;
1440
+ -ms-flex-pack: center;
1441
+ /*justify-content: center;*/
1442
+ position: absolute;
1443
+ top: 0;
1444
+ right: 0;
1445
+ bottom: 0;
1446
+ left: 0;
1447
+ -webkit-transition: background-color .4s;
1448
+ -o-transition: background-color .4s;
1449
+ transition: background-color .4s;
1450
+ }
1451
+
1452
+ .acfb_image_accordion_overlay .acfb_image_accordion_wrap{
1453
+ z-index: 1;
1454
+ /* display: flex;
1455
+ flex-direction: column;
1456
+ align-items: center;*/
1457
+ visibility: hidden;
1458
+ }
1459
+
1460
+ ./*acfb_image_accordion_content{
1461
+ text-align: center;
1462
+ }*/
1463
+
1464
+ .acfb_image_accordion_content .acfb_image_accordion_title{
1465
+ margin: 0 !important;
1466
+ }
1467
+
1468
+ .acfb_image_accordion_wrap *{
1469
+ visibility: hidden;
1470
+ opacity: 0;
1471
+ -webkit-transform-style: preserve-3d;
1472
+ transform-style: preserve-3d;
1473
+ }
1474
+
1475
+ .acfb_image_accordion_title{
1476
+ -webkit-transform: translate3d(0,-60px,0);
1477
+ transform: translate3d(0,-60px,0);
1478
+ margin: 0;
1479
+ }
1480
+
1481
+ .acfb_image_accordion_description{
1482
+ -webkit-transform: translate3d(0,60px,0);
1483
+ transform: translate3d(0,60px,0);
1484
+ margin: 10px 0 15px 0;
1485
+ }
1486
+
1487
+ .acfb_image_accordion_content .acfb_image_accordion_button{
1488
+ cursor: pointer;
1489
+ padding: 10px 25px;
1490
+ display: inline-block;
1491
+ text-decoration: none;
1492
+ -webkit-transform: translate3d(0,60px,0);
1493
+ transform: translate3d(0,60px,0);
1494
+ }
1495
+
1496
+
1497
+ .acfb_image_accordion_active .acfb_image_accordion_wrap{
1498
+ visibility: visible;
1499
+ }
1500
+
1501
+
1502
+ .acfb_image_accordion_active .acfb_image_accordion_wrap *{
1503
+ opacity: 1;
1504
+ visibility: visible;
1505
+ transform: none;
1506
+ transition: all .3s .3s;
1507
+ }
1508
+
1509
+
1510
+ @media screen and (max-width: 767px) {
1511
+ .acfb_image_accordion {
1512
+ flex-direction: column !important;
1513
+ }
1514
+
1515
+ .acfb_image_accordion .acfb_image_accordion_item{
1516
+ margin: 0 0 10px 0 !important;
1517
+ }
1518
+
1519
+ .acfb_image_accordion .acfb_image_accordion_item:last-child{
1520
+ margin-bottom: 0 !important;
1521
+ }
1522
+ }
1523
+
1524
+
1525
+
1526
+
1527
+
1528
+
1529
+
1530
+
1531
+
1532
+
1533
+
1534
+
1535
+
1536
+ /************ Call to Action CSS ************/
1537
+ .acfb_call_to_action_block .acfb_cta_skin_classic .acfb_cta{
1538
+ -ms-flex-wrap: wrap;
1539
+ flex-wrap: wrap;
1540
+ }
1541
+
1542
+ .acfb_call_to_action_block .acfb_cta_skin_cover .acfb_cta{
1543
+ display: block;
1544
+ }
1545
+
1546
+ .acfb_call_to_action_block .acfb_cta{
1547
+ position: relative;
1548
+ display: -webkit-box;
1549
+ display: -ms-flexbox;
1550
+ display: flex;
1551
+ -webkit-transition: .5s;
1552
+ -o-transition: .5s;
1553
+ transition: .5s;
1554
+ overflow: hidden;
1555
+ }
1556
+
1557
+ .acfb_call_to_action_block .acfb_cta_skin_classic .acfb_cta_bg_wrapper{
1558
+ position: relative;
1559
+ min-height: 200px;
1560
+ width: 100%;
1561
+ }
1562
+
1563
+ .acfb_call_to_action_block .acfb_cta_skin_cover .acfb_cta_bg_wrapper{
1564
+ position: absolute;
1565
+ top: 0;
1566
+ left: 0;
1567
+ right: 0;
1568
+ bottom: 0;
1569
+ -webkit-transition: all .4s;
1570
+ -o-transition: all .4s;
1571
+ transition: all .4s;
1572
+ width: 100%;
1573
+ }
1574
+
1575
+ .acfb_call_to_action_block .acfb_cta_bg_wrapper{
1576
+ z-index: 1;
1577
+ overflow: hidden;
1578
+ }
1579
+
1580
+ .acfb_call_to_action_block .acfb_cta_bg{
1581
+ transition-duration: 1500ms;
1582
+ -webkit-background-size: cover;
1583
+ background-size: cover;
1584
+ background-position: 50%;
1585
+ z-index: 1;
1586
+ will-change: transform;
1587
+ position: absolute;
1588
+ top: 0;
1589
+ left: 0;
1590
+ right: 0;
1591
+ bottom: 0;
1592
+ -webkit-transition: all .4s;
1593
+ -o-transition: all .4s;
1594
+ transition: all .4s;
1595
+ }
1596
+
1597
+ .acfb_call_to_action_block .acfb_cta_bg_overlay{
1598
+ transition-duration: 1500ms;
1599
+ z-index: 2;
1600
+ position: absolute;
1601
+ top: 0;
1602
+ left: 0;
1603
+ right: 0;
1604
+ bottom: 0;
1605
+ -webkit-transition: all .4s;
1606
+ -o-transition: all .4s;
1607
+ transition: all .4s;
1608
+ }
1609
+
1610
+ .acfb_call_to_action_block .acfb_cta_skin_classic .acfb_cta_content{
1611
+ -webkit-transition: all .4s;
1612
+ -o-transition: all .4s;
1613
+ transition: all .4s;
1614
+ width: 100%;
1615
+ }
1616
+
1617
+ .acfb_call_to_action_block .acfb_cta_content{
1618
+ position: relative;
1619
+ -webkit-transition: .5s;
1620
+ -o-transition: .5s;
1621
+ transition: .5s;
1622
+ color: black;
1623
+ z-index: 1;
1624
+ overflow: hidden;
1625
+ display: -webkit-box;
1626
+ display: -ms-flexbox;
1627
+ display: flex;
1628
+ -ms-flex-wrap: wrap;
1629
+ flex-wrap: wrap;
1630
+ -webkit-box-align: center;
1631
+ -ms-flex-align: center;
1632
+ -ms-flex-line-pack: center;
1633
+ /*align-content: center;*/
1634
+ width: 100%;
1635
+ flex-direction: column;
1636
+ }
1637
+
1638
+ .acfb_call_to_action_block .acfb_cta_button{
1639
+ cursor: pointer;
1640
+ padding: 10px 25px;
1641
+ display: inline-block;
1642
+ text-decoration: none;
1643
+ }
1644
+
1645
+ .acfb_call_to_action_block .acfb_cta_ribbon_wrap{
1646
+ position: absolute;
1647
+ z-index: 1;
1648
+ top: 0;
1649
+ left: auto;
1650
+ right: 0;
1651
+ -webkit-transform: rotate(90deg);
1652
+ -ms-transform: rotate(90deg);
1653
+ transform: rotate(90deg);
1654
+ width: 150px;
1655
+ overflow: hidden;
1656
+ height: 150px;
1657
+ }
1658
+
1659
+ .acfb_call_to_action_block .acfb_cta_ribbon_left{
1660
+ -webkit-transform: rotate(0);
1661
+ -ms-transform: rotate(0);
1662
+ transform: rotate(0);
1663
+ left: 0;
1664
+ right: auto;
1665
+ }
1666
+
1667
+ .acfb_call_to_action_block .acfb_cta_ribbon_right{
1668
+ -webkit-transform: rotate(90deg);
1669
+ -ms-transform: rotate(90deg);
1670
+ transform: rotate(90deg);
1671
+ left: auto;
1672
+ right: 0;
1673
+ }
1674
+
1675
+ .acfb_call_to_action_block .acfb_cta_ribbon{
1676
+ font-weight: 500;
1677
+ text-align: center;
1678
+ left: 0;
1679
+ width: 200%;
1680
+ -webkit-transform: translateY(-50%) translateX(-50%) translateX(35px) rotate(-45deg);
1681
+ -ms-transform: translateY(-50%) translateX(-50%) translateX(35px) rotate(-45deg);
1682
+ transform: translateY(-50%) translateX(-50%) translateX(35px) rotate(-45deg);
1683
+ margin-top: 35px;
1684
+ font-size: 13px;
1685
+ line-height: 2;
1686
+ font-weight: 800;
1687
+ text-transform: uppercase;
1688
+ }
1689
+
1690
+
1691
+ .acfb_call_to_action_block .acfb_cta_image_left .acfb_cta{
1692
+ -webkit-box-orient: horizontal;
1693
+ -webkit-box-direction: normal;
1694
+ -ms-flex-direction: row;
1695
+ flex-direction: row;
1696
+ }
1697
+
1698
+ .acfb_call_to_action_block .acfb_cta_image_right .acfb_cta{
1699
+ -webkit-box-orient: horizontal;
1700
+ -webkit-box-direction: reverse;
1701
+ flex-direction: row-reverse;
1702
+ }
1703
+
1704
+ .acfb_call_to_action_block .acfb_cta_image_left .acfb_cta, .acfb_call_to_action_block .acfb_cta_image_right .acfb_cta{
1705
+ -ms-flex-wrap: nowrap;
1706
+ flex-wrap: nowrap;
1707
+ }
1708
+
1709
+ .acfb_call_to_action_block .acfb_cta_image_left .acfb_cta_bg_wrapper, .acfb_call_to_action_block .acfb_cta_image_right .acfb_cta_bg_wrapper{
1710
+ width: auto;
1711
+ min-width: 50%;
1712
+ }
1713
+
1714
+ .acfb_call_to_action_block:hover .acfb_cta_bg{
1715
+ -webkit-transform: scale(1.2);
1716
+ -ms-transform: scale(1.2);
1717
+ transform: scale(1.2);
1718
+ }
1719
+
1720
+ .acfb_call_to_action_block .acfb_cta_item{
1721
+ transition-duration: 1000ms;
1722
+ }
1723
+
1724
+ .acfb_call_to_action_block .acfb_cta_skin_cover .acfb_cta_content{
1725
+ /*pointer-events: none;*/
1726
+ }
1727
+
1728
+ .acfb_call_to_action_block .acfb_cta_skin_cover .acfb_cta_content:hover .acfb_cta_item{
1729
+ -webkit-transform: scale(1.1);
1730
+ -ms-transform: scale(1.1);
1731
+ transform: scale(1.1);
1732
+ }
1733
+
1734
+ .acfb_call_to_action_block .acfb_cta_item, .acfb_call_to_action_block .acfb_cta_item p{
1735
+ margin: 0 0 10px 0;
1736
+ display: inline-block;
1737
+ }
1738
+
1739
+
1740
+
1741
+
1742
+
1743
+
1744
+
1745
+
1746
+
1747
+
1748
+
1749
+
1750
+
1751
+
1752
+
1753
+
1754
+
1755
+
1756
+ /************ Before After Image CSS ************/
1757
+
1758
+
1759
+
1760
+
1761
+
1762
+
1763
+
1764
+
1765
+
1766
+
1767
+
1768
+
1769
+ /************ Image Hotspot CSS ************/
1770
+ .acfb_ih_wrapper{
1771
+ position: relative;
1772
+ }
1773
+
1774
+ .acfb_ih_wrapper .acfb_ih_image{
1775
+ width: 100%;
1776
+ }
1777
+
1778
+ .acfb_ih_item {
1779
+ position: absolute;
1780
+ }
1781
+
1782
+ .acfb_ih_item .acfb_ih_tooltip h4{
1783
+ margin: 0;
1784
+ }
1785
+
1786
+ .acfb_ih_item .acfb_ih_tooltip p{
1787
+ margin: 10px 0;
1788
+ }
1789
+
1790
+ .acfb_ih_item:hover, .acfb_ih_item:active {
1791
+ z-index: 999;
1792
+ }
1793
+ .acfb_ih_item:hover .acfb_ih_tooltip, .acfb_ih_item:active .acfb_ih_tooltip {
1794
+ display: block;
1795
+ }
1796
+
1797
+ .acfb_ih_item:hover .acfb_ih_pointer:after, .acfb_ih_item:active .acfb_ih_pointer:after {
1798
+ border-color: transparent;
1799
+ }
1800
+ .acfb_ih_pointer {
1801
+ padding: 0px;
1802
+ border-radius: 100%;
1803
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
1804
+ z-index: 999;
1805
+ cursor: pointer;
1806
+ }
1807
+ .acfb_ih_pointer:after {
1808
+ position: absolute;
1809
+ top: 50%;
1810
+ left: 50%;
1811
+ transform: translate(-50%, -50%) scale(1, 1);
1812
+ pointer-events: none;
1813
+ content: "";
1814
+ display: block;
1815
+ border-radius: 100%;
1816
+ opacity: 0;
1817
+ transition: border-color 1s linear;
1818
+ animation: button-pulse 4s linear infinite;
1819
+ }
1820
+ .acfb_ih_tooltip {
1821
+ position: absolute;
1822
+ padding: 15px;
1823
+ background-color: white;
1824
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
1825
+ z-index: -1;
1826
+ display: none;
1827
+ transition: opacity 0.1s linear;
1828
+ }
1829
+ .acfb_ih_tooltip h4, .acfb_ih_tooltip p, .acfb_ih_tooltip img {
1830
+ margin: 0 0 10px 0;
1831
+ }
1832
+
1833
+ .acfb_ih_tooltip a {
1834
+ cursor: pointer;
1835
+ padding: 10px 25px;
1836
+ display: inline-block;
1837
+ text-decoration: none;
1838
+ }
1839
+
1840
+ .acfb_ih_tooltip:after{
1841
+ height: 20px;
1842
+ width: 20px;
1843
+ -webkit-transform: rotate(45deg);
1844
+ transform: rotate(45deg);
1845
+ content: "";
1846
+ display: block;
1847
+ position: absolute;
1848
+ background-size: cover;
1849
+ }
1850
+
1851
+ /* Tooltip Positions */
1852
+ .acfb_ih_top {
1853
+ -webkit-transform: translate(-50%,0px);
1854
+ transform: translate(-50%,0px);
1855
+ margin: 0 -400px 10px 0;
1856
+ bottom: 110%;
1857
+ left: 50%;
1858
+ }
1859
+
1860
+ .acfb_ih_top:after{
1861
+ bottom: -10px;
1862
+ left: 50%;
1863
+ margin-left: -12px;
1864
+ }
1865
+
1866
+
1867
+ .acfb_ih_bottom {
1868
+ -webkit-transform: translate(-50%,0px);
1869
+ transform: translate(-50%,0px);
1870
+ margin: 10px -400px 0 0;
1871
+ top: 110%;
1872
+ left: 50%;
1873
+ }
1874
+
1875
+ .acfb_ih_bottom:after{
1876
+ top: -10px;
1877
+ left: 50%;
1878
+ margin-left: -12px;
1879
+ }
1880
+
1881
+
1882
+ .acfb_ih_left {
1883
+ -webkit-transform: translate(0px,-50%);
1884
+ transform: translate(0px,-50%);
1885
+ margin: 0 10px 0 -400px;
1886
+ top: 50%;
1887
+ right: 110%;
1888
+ }
1889
+
1890
+ .acfb_ih_left:after{
1891
+ top: 50%;
1892
+ right: -10px;
1893
+ margin-top: -8px;
1894
+ }
1895
+
1896
+
1897
+ .acfb_ih_right {
1898
+ -webkit-transform: translate(0px,-50%);
1899
+ transform: translate(0px,-50%);
1900
+ margin: 0 -400px 0 10px;
1901
+ top: 50%;
1902
+ left: 110%;
1903
+ }
1904
+
1905
+ .acfb_ih_right:after{
1906
+ top: 50%;
1907
+ left: -10px;
1908
+ margin-top: -8px;
1909
+ }
1910
+
1911
+
1912
+
1913
+
1914
+
1915
+ @keyframes button-pulse {
1916
+ 0% {
1917
+ transform: translate(-50%, -50%) scale(1, 1);
1918
+ opacity: 0;
1919
+ }
1920
+ 20% {
1921
+ transform: translate(-50%, -50%) scale(1.5, 1.5);
1922
+ opacity: 0.9;
1923
+ }
1924
+ 50% {
1925
+ transform: translate(-50%, -50%) scale(2, 2);
1926
+ opacity: 0;
1927
+ }
1928
+ 100% {
1929
+ transform: translate(-50%, -50%) scale(2, 2);
1930
+ opacity: 0;
1931
+ }
1932
+ }
1933
+
1934
+
1935
+
1936
+
1937
+
1938
+
1939
+ /************ Devices CSS ************/
1940
+ /* Laptop Device */
1941
+ .acfb_device_block{
1942
+ display: flex;
1943
+ }
1944
+
1945
+ .acfb_device_type_laptop .acfb_device{
1946
+ position: relative;
1947
+ }
1948
+
1949
+ .acfb_device_type_laptop .acfb_device_body svg{
1950
+ display: block;
1951
+ transform: rotate(0deg);
1952
+ }
1953
+
1954
+ .acfb_device_type_laptop .acfb_device_media{
1955
+ position: absolute;
1956
+ top: 6%;
1957
+ width: 76%;
1958
+ height: 84%;
1959
+ left: 50%;
1960
+ transition: all 0.3s cubic-bezier(.42,0,.2,1);
1961
+ border-radius: 3px;
1962
+ transform: translateX(-50%);
1963
+ /*background: rgba(255,255,255,.2);*/
1964
+ overflow: hidden;
1965
+ display: -ms-flexbox;
1966
+ display: flex;
1967
+ border-radius: 3px;
1968
+ transition: all 0.3s cubic-bezier(.42,0,.2,1);
1969
+ z-index: 2;
1970
+ align-items: flex-start;
1971
+ flex-direction: row;
1972
+ }
1973
+
1974
+
1975
+ .acfb_device_type_laptop .acfb_device_media img{
1976
+ width: 100%;
1977
+ height: 100%;
1978
+ object-fit: cover;
1979
+ }
1980
+
1981
+
1982
+ /* Tablet Device */
1983
+ .acfb_device_type_tablet .acfb_device{
1984
+ position: relative;
1985
+ }
1986
+
1987
+ .acfb_device_type_tablet .acfb_device_body svg{
1988
+ display: block;
1989
+ transform: rotate(0deg);
1990
+ transition: all 0.3s cubic-bezier(.42,0,.2,1);
1991
+ }
1992
+
1993
+ .acfb_device_type_tablet .acfb_device_media{
1994
+ position: absolute;
1995
+ top: 7%;
1996
+ left: 50%;
1997
+ bottom: 38%;
1998
+ transition: all 0.3s cubic-bezier(.42,0,.2,1);
1999
+ transform: translateX(-50%);
2000
+ width: 90.69767%;
2001
+ height: 84%;
2002
+ background: rgba(255,255,255,.2);
2003
+ overflow: hidden;
2004
+ display: -ms-flexbox;
2005
+ display: flex;
2006
+ border-radius: 3px;
2007
+ transition: all 0.3s cubic-bezier(.42,0,.2,1);
2008
+ z-index: 2;
2009
+ align-items: flex-start;
2010
+ flex-direction: row;
2011
+ }
2012
+
2013
+ .acfb_device_type_tablet .acfb_device_media img{
2014
+ width: 100%;
2015
+ height: 100%;
2016
+ object-fit: cover;
2017
+ }
2018
+
2019
+
2020
+ /* Mobile Device */
2021
+ .acfb_device_type_mobile .acfb_device{
2022
+ position: relative;
2023
+ }
2024
+
2025
+ .acfb_device_type_mobile .acfb_device_body svg{
2026
+ display: block;
2027
+ transform: rotate(0deg);
2028
+ }
2029
+
2030
+ .acfb_device_type_mobile .acfb_device_media{
2031
+ position: absolute;
2032
+ left: 50%;
2033
+ transition: all 0.3s cubic-bezier(.42,0,.2,1);
2034
+ border-radius: 3px;
2035
+ transform: translateX(-50%);
2036
+ background: rgba(255,255,255,.2);
2037
+ overflow: hidden;
2038
+ display: -ms-flexbox;
2039
+ display: flex;
2040
+ border-radius: 3px;
2041
+ transition: all 0.3s cubic-bezier(.42,0,.2,1);
2042
+ z-index: 2;
2043
+ align-items: flex-start;
2044
+ flex-direction: row;
2045
+ top: 11.7%;
2046
+ bottom: 12%;
2047
+ width: 88.80866%;
2048
+ transform: translateX(-50%);
2049
+ }
2050
+
2051
+ .acfb_device_type_mobile .acfb_device_media img{
2052
+ width: 100%;
2053
+ height: 100%;
2054
+ object-fit: cover;
2055
+ }
2056
+
2057
+
2058
+
2059
+
2060
+ /************ Shape Divider CSS ************/
2061
+ .acfb_shape_divider_block .acfb_shape_divider{
2062
+ overflow: hidden;
2063
+ }
2064
+
2065
+ .acfb_shape_divider_block .acfb_shape_divider svg{
2066
+ display: block;
2067
+ position: relative;
2068
+ /* left: 0%;
2069
+ -webkit-transform: translateX(-50%);
2070
+ -ms-transform: translateX(-50%);
2071
+ transform: translateX(-50%);*/
2072
+ }
2073
+
2074
+ .acfb_shape_divider_block .acfb_shape_divider{
2075
+ bottom: -1px;
2076
+ }
2077
+
2078
+ /*.acfb_shape_divider_block .acfb_shape_divider svg{
2079
+ transform: translateX(-50%) rotateY(180deg);
2080
+ }*/
2081
+
2082
+ .acfb_shape_divider_block .acfb_shape_top{
2083
+ transform: rotateX(-180deg);
2084
+ }
2085
+
2086
+
2087
+
2088
+
2089
+
2090
+ /************ Post Ticker CSS ************/
2091
+ .acfb_post_ticker{
2092
+ display: flex;
2093
+ overflow: hidden;
2094
+ }
2095
+
2096
+ .acfb_post_ticker .acfb_post_ticker_heading{
2097
+ display: flex;
2098
+ flex-direction: row;
2099
+ flex-shrink: 0;
2100
+ align-items: center;
2101
+ padding: 10px 15px;
2102
+ position: relative;
2103
+ }
2104
+
2105
+ .acfb_post_ticker .acfb_post_ticker_heading:after {
2106
+ content: '';
2107
+ position: absolute;
2108
+ right: -20px;
2109
+ border: 10px solid transparent;
2110
+ top: 50%;
2111
+ transform: translateY(-50%);
2112
+ }
2113
+
2114
+ .acfb_post_ticker .acfb_post_ticker_wrap{
2115
+ display: flex;
2116
+ align-items: center;
2117
+ overflow: hidden;
2118
+ padding: 10px 15px;
2119
+ }
2120
+
2121
+ .acfb_post_ticker .acfb_post_ticker_wrap .acfb_ptt{
2122
+ text-decoration: none;
2123
+ }
2124
+
2125
+ /*
2126
+ .acfb_post_ticker .acfb_post_ticker_wrap .swiper-container{
2127
+ display: grid;
2128
+ grid-template-columns: 90% 10%;
2129
+ }
2130
+
2131
+ .acfb_post_ticker .acfb_post_ticker_wrap .acfb_post_ticker_navigation{
2132
+ align-items: center;
2133
+ padding-left: 10px;
2134
+ padding-right: 10px;
2135
+ justify-content: center;
2136
+ position: relative;
2137
+ }
2138
+
2139
+ .acfb_post_ticker .swiper-container .acfb-ticker-button-next, .acfb_post_ticker .swiper-container .acfb-ticker-button-prev{
2140
+ position: absolute;
2141
+ width: 20px;
2142
+ z-index: 10;
2143
+ cursor: pointer;
2144
+ }
2145
+
2146
+ .acfb_post_ticker .swiper-container .acfb-ticker-button-next{
2147
+ right: 0;
2148
+ }
2149
+
2150
+ .acfb_post_ticker .swiper-container .acfb-ticker-button-prev{
2151
+ left: 0;
2152
+ }
2153
+ */
2154
+
2155
+
2156
+ /************ Post Tiled CSS ************/
2157
+ .acfb_posts_tiled_block .acfb_post_tiled_item .acfb_post_tiled_title,
2158
+ .acfb_posts_tiled_block .acfb_post_tiled_item .acfb_post_tiled_meta,
2159
+ .acfb_posts_tiled_block .acfb_post_tiled_item .acfb_post_tiled_excerpt,
2160
+ .acfb_posts_tiled_block .acfb_post_tiled_item .acfb_post_tiled_button {
2161
+ margin-bottom: 15px;
2162
+ }
2163
+
2164
+ .acfb_posts_tiled_block .acfb_post_tiled_item .acfb_post_tiled_title h1,
2165
+ .acfb_posts_tiled_block .acfb_post_tiled_item .acfb_post_tiled_title h2,
2166
+ .acfb_posts_tiled_block .acfb_post_tiled_item .acfb_post_tiled_title h3,
2167
+ .acfb_posts_tiled_block .acfb_post_tiled_item .acfb_post_tiled_title h4,
2168
+ .acfb_posts_tiled_block .acfb_post_tiled_item .acfb_post_tiled_title h5,
2169
+ .acfb_posts_tiled_block .acfb_post_tiled_item .acfb_post_tiled_title h6 {
2170
+ margin: 0;
2171
+ }
2172
+
2173
+ .acfb_posts_tiled_block .acfb_post_tiled_item div:nth-last-of-type(1) {
2174
+ margin-bottom: 0;
2175
+ }
2176
+
2177
+
2178
+ .acfb_posts_tiled_block .acfb_post_tiled_grid {
2179
+ display: grid;
2180
+ grid-gap: 10px;
2181
+ }
2182
+
2183
+ .acfb_posts_tiled_block .acfb_post_tiled_grid .acfb_post_tiled_item .acfb_post_tiled_item_inner{
2184
+ background-size: cover !important;
2185
+ background-position: center !important;
2186
+ display: grid;
2187
+ }
2188
+
2189
+
2190
+ .acfb_posts_tiled_block .acfb_post_tiled_2 {
2191
+ grid-template-columns: 1fr 1fr;
2192
+ }
2193
+
2194
+ .acfb_posts_tiled_block .acfb_post_tiled_3 {
2195
+ grid-template-columns: 1fr 1fr 1fr;
2196
+ }
2197
+
2198
+ .acfb_posts_tiled_block .acfb_post_tiled_4 {
2199
+ grid-template-columns: 1fr 1fr 1fr 1fr;
2200
+ }
2201
+
2202
+ .acfb_posts_tiled_block .acfb_post_tiled_5 {
2203
+ grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
2204
+ }
2205
+
2206
+ .acfb_posts_tiled_block .acfb_post_tiled_6 {
2207
+ grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr;
2208
+ }
2209
+
2210
+ .acfb_posts_tiled_block .acfb_post_tiled_collage .acfb_post_tiled_item .acfb_post_tiled_item_inner{
2211
+ background-size: cover !important;
2212
+ background-position: center !important;
2213
+ padding: 15px;
2214
+ display: grid;
2215
+ height: 100%;
2216
+ }
2217
+
2218
+ .acfb_posts_tiled_block .acfb_post_collage_three_grid_style_one{
2219
+ display: grid;
2220
+ grid-gap: 10px;
2221
+ grid-template-columns: 1fr 1fr;
2222
+ grid-template-rows: 1fr 1fr;
2223
+ grid-template-areas: "one two" "one three";
2224
+ }
2225
+
2226
+ .acfb_posts_tiled_block .acfb_post_collage_three_grid_style_one .acfb_post_tiled_item_1{ grid-area: one; }
2227
+ .acfb_posts_tiled_block .acfb_post_collage_three_grid_style_one .acfb_post_tiled_item_2{ grid-area: two; }
2228
+ .acfb_posts_tiled_block .acfb_post_collage_three_grid_style_one .acfb_post_tiled_item_3{ grid-area: three; }
2229
+
2230
+ .acfb_posts_tiled_block .acfb_post_collage_four_grid_style_one{
2231
+ display: grid;
2232
+ grid-gap: 10px;
2233
+ grid-template-columns: 1fr 1fr 1fr 1fr;
2234
+ grid-template-rows: 1fr 1fr 1fr 1fr;
2235
+ grid-template-areas: "one one two two" "one one two two" "one one three four" "one one three four";
2236
+ }
2237
+
2238
+ .acfb_posts_tiled_block .acfb_post_collage_four_grid_style_one .acfb_post_tiled_item_1{ grid-area: one; }
2239
+ .acfb_posts_tiled_block .acfb_post_collage_four_grid_style_one .acfb_post_tiled_item_2{ grid-area: two; }
2240
+ .acfb_posts_tiled_block .acfb_post_collage_four_grid_style_one .acfb_post_tiled_item_3{ grid-area: three; }
2241
+ .acfb_posts_tiled_block .acfb_post_collage_four_grid_style_one .acfb_post_tiled_item_4{ grid-area: four; }
2242
+
2243
+
2244
+ .acfb_posts_tiled_block .acfb_post_collage_four_grid_style_two{
2245
+ display: grid;
2246
+ grid-gap: 10px;
2247
+ grid-template-columns: 1fr 1fr 1fr 1fr;
2248
+ grid-template-rows: 1fr 1fr 1fr 1fr;
2249
+ grid-template-areas: "one one two three" "one one two three" "one one two four" "one one two four";
2250
+ }
2251
+
2252
+ .acfb_posts_tiled_block .acfb_post_collage_four_grid_style_two .acfb_post_tiled_item_1{ grid-area: one; }
2253
+ .acfb_posts_tiled_block .acfb_post_collage_four_grid_style_two .acfb_post_tiled_item_2{ grid-area: two; }
2254
+ .acfb_posts_tiled_block .acfb_post_collage_four_grid_style_two .acfb_post_tiled_item_3{ grid-area: three; }
2255
+ .acfb_posts_tiled_block .acfb_post_collage_four_grid_style_two .acfb_post_tiled_item_4{ grid-area: four; }
2256
+
2257
+
2258
+
2259
+
2260
+ .acfb_posts_tiled_block .acfb_post_collage_five_grid_style_one{
2261
+ display: grid;
2262
+ grid-gap: 10px;
2263
+ grid-template-columns: 1fr 1fr 1fr;
2264
+ grid-template-rows: 1fr 1fr;
2265
+ grid-template-areas: "one three four" "two three five";
2266
+ }
2267
+
2268
+ .acfb_posts_tiled_block .acfb_post_collage_five_grid_style_one .acfb_post_tiled_item_1{ grid-area: one; }
2269
+ .acfb_posts_tiled_block .acfb_post_collage_five_grid_style_one .acfb_post_tiled_item_2{ grid-area: two; }
2270
+ .acfb_posts_tiled_block .acfb_post_collage_five_grid_style_one .acfb_post_tiled_item_3{ grid-area: three; }
2271
+ .acfb_posts_tiled_block .acfb_post_collage_five_grid_style_one .acfb_post_tiled_item_4{ grid-area: four; }
2272
+ .acfb_posts_tiled_block .acfb_post_collage_five_grid_style_one .acfb_post_tiled_item_5{ grid-area: five; }
2273
+
2274
+
2275
+
2276
+ .acfb_posts_tiled_block .acfb_post_collage_five_grid_style_two{
2277
+ display: grid;
2278
+ grid-gap: 10px;
2279
+ grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr;
2280
+ grid-template-rows: 1fr 1fr;
2281
+ grid-template-areas: "one one one two two two" "three three four four five five";
2282
+ }
2283
+
2284
+ .acfb_posts_tiled_block .acfb_post_collage_five_grid_style_two .acfb_post_tiled_item_1{ grid-area: one; }
2285
+ .acfb_posts_tiled_block .acfb_post_collage_five_grid_style_two .acfb_post_tiled_item_2{ grid-area: two; }
2286
+ .acfb_posts_tiled_block .acfb_post_collage_five_grid_style_two .acfb_post_tiled_item_3{ grid-area: three; }
2287
+ .acfb_posts_tiled_block .acfb_post_collage_five_grid_style_two .acfb_post_tiled_item_4{ grid-area: four; }
2288
+ .acfb_posts_tiled_block .acfb_post_collage_five_grid_style_two .acfb_post_tiled_item_5{ grid-area: five; }
2289
+
2290
+
2291
+
2292
+
2293
+ .acfb_posts_tiled_block .acfb_post_collage_five_grid_style_three{
2294
+ display: grid;
2295
+ grid-gap: 10px;
2296
+ grid-template-columns: 1fr 1fr 1fr 1fr;
2297
+ grid-template-rows: 1fr 1fr;
2298
+ grid-template-areas: "one one two three" "one one four five";
2299
+ }
2300
+
2301
+ .acfb_posts_tiled_block .acfb_post_collage_five_grid_style_three .acfb_post_tiled_item_1{ grid-area: one; }
2302
+ .acfb_posts_tiled_block .acfb_post_collage_five_grid_style_three .acfb_post_tiled_item_2{ grid-area: two; }
2303
+ .acfb_posts_tiled_block .acfb_post_collage_five_grid_style_three .acfb_post_tiled_item_3{ grid-area: three; }
2304
+ .acfb_posts_tiled_block .acfb_post_collage_five_grid_style_three .acfb_post_tiled_item_4{ grid-area: four; }
2305
+ .acfb_posts_tiled_block .acfb_post_collage_five_grid_style_three .acfb_post_tiled_item_5{ grid-area: five; }
2306
+
2307
+
2308
+
2309
+
2310
+ @media screen and (max-width: 767px) {
2311
+ .acfb_posts_tiled_block .acfb_post_tiled_grid{
2312
+ grid-template-columns: 100%;
2313
+ }
2314
+
2315
+ .acfb_posts_tiled_block .acfb_post_collage_three_grid_style_one{
2316
+ grid-template-columns: 1fr;
2317
+ grid-template-rows: 1fr;
2318
+ grid-template-areas:
2319
+ "one"
2320
+ "two"
2321
+ "three";
2322
+ }
2323
+
2324
+ .acfb_posts_tiled_block .acfb_post_collage_four_grid_style_one,
2325
+ .acfb_posts_tiled_block .acfb_post_collage_four_grid_style_two{
2326
+ grid-template-columns: 1fr;
2327
+ grid-template-rows: 1fr;
2328
+ grid-template-areas:
2329
+ "one"
2330
+ "two"
2331
+ "three"
2332
+ "four";
2333
+ }
2334
+
2335
+ .acfb_posts_tiled_block .acfb_post_collage_five_grid_style_one,
2336
+ .acfb_posts_tiled_block .acfb_post_collage_five_grid_style_two,
2337
+ .acfb_posts_tiled_block .acfb_post_collage_five_grid_style_three{
2338
+ grid-template-columns: 1fr;
2339
+ grid-template-rows: 1fr;
2340
+ grid-template-areas:
2341
+ "one"
2342
+ "two"
2343
+ "three"
2344
+ "four"
2345
+ "five";
2346
+ }
2347
+
2348
+
2349
+ }
2350
+
2351
+
2352
+
2353
+
2354
+
2355
+
2356
+
2357
+
2358
+
2359
+ /************ Post Timeline CSS ************/
2360
+ .acfb_post_timeline_block .acfb_post_timeline .acfb_post_timeline_content img{
2361
+ height: auto;
2362
+ }
2363
+
2364
+ .acfb_post_timeline_block .acfb_post_timeline_thumbnail,
2365
+ .acfb_post_timeline_block .acfb_post_timeline_title,
2366
+ .acfb_post_timeline_block .acfb_post_timeline_meta,
2367
+ .acfb_post_timeline_block .acfb_post_timeline_excerpt,
2368
+ .acfb_post_timeline_block .acfb_post_timeline_button {
2369
+ margin: 10px 0 !important;
2370
+ }
2371
+
2372
+ .acfb_post_timeline_block .acfb_post_timeline_title h1,
2373
+ .acfb_post_timeline_block .acfb_post_timeline_title h2,
2374
+ .acfb_post_timeline_block .acfb_post_timeline_title h3,
2375
+ .acfb_post_timeline_block .acfb_post_timeline_title h4,
2376
+ .acfb_post_timeline_block .acfb_post_timeline_title h5,
2377
+ .acfb_post_timeline_block .acfb_post_timeline_title h6 {
2378
+ margin: 0;
2379
+ }
2380
+
2381
+
2382
+ .acfb_post_timeline_center .acfb_post_timeline_inner:nth-child(odd) .acfb_posts_opposite_elements{
2383
+ position: absolute;
2384
+ right: -100%;
2385
+ top: 0;
2386
+ width: 100%;
2387
+ padding: 10px 0px 10px 40px;
2388
+ text-align: left;
2389
+ }
2390
+
2391
+
2392
+ .acfb_post_timeline_center .acfb_post_timeline_inner:nth-child(odd) .acfb_posts_opposite_elements .acfb_posts_opposite_elements_inner::before{
2393
+ content: " ";
2394
+ height: 0;
2395
+ position: absolute;
2396
+ top: 22px;
2397
+ width: 0;
2398
+ z-index: 1;
2399
+ left: 30px;
2400
+ border-style: solid;
2401
+ border-width: 10px 10px 10px 0;
2402
+ }
2403
+
2404
+ .acfb_post_timeline_center .acfb_post_timeline_inner:nth-child(even) .acfb_posts_opposite_elements{
2405
+ position: absolute;
2406
+ left: -100%;
2407
+ top: 0;
2408
+ width: 100%;
2409
+ padding: 10px 40px 10px 0px;
2410
+ text-align: right;
2411
+ }
2412
+
2413
+ .acfb_post_timeline_center .acfb_post_timeline_inner:nth-child(even) .acfb_posts_opposite_elements .acfb_posts_opposite_elements_inner::before{
2414
+ content: " ";
2415
+ height: 0;
2416
+ position: absolute;
2417
+ top: 22px;
2418
+ width: 0;
2419
+ z-index: 1;
2420
+ right: 30px;
2421
+ border-style: solid;
2422
+ border-width: 10px 0 10px 10px;
2423
+ }
2424
+
2425
+ .acfb_post_timeline_center .acfb_post_timeline_inner .acfb_posts_opposite_elements .acfb_posts_opposite_elements_inner{
2426
+ padding: 20px 30px;
2427
+ }
2428
+
2429
+ .acfb_post_timeline_center {
2430
+ position: relative;
2431
+ }
2432
+
2433
+ .acfb_post_timeline_center::after {
2434
+ background: #e0e0e0;
2435
+ }
2436
+
2437
+ .acfb_post_timeline_center::after {
2438
+ content: '';
2439
+ position: absolute;
2440
+ width: 6px;
2441
+ top: 0;
2442
+ bottom: 0;
2443
+ left: 50%;
2444
+ margin-left: -3px;
2445
+ }
2446
+
2447
+ .acfb_post_timeline_center .acfb_post_timeline_inner {
2448
+ position: relative;
2449
+ width: 50%;
2450
+ }
2451
+
2452
+ .acfb_post_timeline_center .acfb_post_timeline_inner:nth-child(odd) {
2453
+ left: 0;
2454
+ padding: 10px 40px 10px 0px;
2455
+ text-align: right;
2456
+ }
2457
+
2458
+
2459
+ .acfb_post_timeline_center .acfb_post_timeline_inner:nth-child(even) {
2460
+ left: 50%;
2461
+ padding: 10px 0px 10px 40px;
2462
+ text-align: left;
2463
+ }
2464
+
2465
+ .acfb_post_timeline_center .acfb_post_timeline_inner:nth-child(odd)::before{
2466
+ content: " ";
2467
+ height: 0;
2468
+ position: absolute;
2469
+ top: 22px;
2470
+ width: 0;
2471
+ z-index: 1;
2472
+ right: 30px;
2473
+ border-style: solid;
2474
+ border-width: 10px 0 10px 10px;
2475
+ }
2476
+
2477
+ .acfb_post_timeline_center .acfb_post_timeline_inner:nth-child(even)::after {
2478
+ left: -12px;
2479
+ }
2480
+
2481
+ .acfb_post_timeline_center .acfb_post_timeline_inner:nth-child(even)::before {
2482
+ content: " ";
2483
+ height: 0;
2484
+ position: absolute;
2485
+ top: 22px;
2486
+ width: 0;
2487
+ z-index: 1;
2488
+ left: 30px;
2489
+ border-style: solid;
2490
+ border-width: 10px 10px 10px 0;
2491
+ }
2492
+
2493
+ .acfb_post_timeline_center .acfb_post_timeline_inner::after{
2494
+ content: '';
2495
+ position: absolute;
2496
+ width: 25px;
2497
+ height: 25px;
2498
+ right: -12px;
2499
+ top: 15px;
2500
+ border-radius: 50%;
2501
+ z-index: 1;
2502
+ background: #f3f4f5;
2503
+ border: 4px solid #191e23;
2504
+ }
2505
+
2506
+ .acfb_post_timeline_center .acfb_post_timeline_inner .acfb_post_timeline_content{
2507
+ padding: 20px 30px;
2508
+ position: relative;
2509
+ }
2510
+
2511
+
2512
+
2513
+
2514
+ /*********** Left Post Timeline ************/
2515
+ .acfb_post_timeline_left .acfb_post_timeline_inner .acfb_posts_opposite_elements{
2516
+ padding-bottom: 10px;
2517
+ }
2518
+
2519
+ .acfb_post_timeline_left .acfb_post_timeline_inner .acfb_posts_opposite_elements .acfb_posts_opposite_elements_inner::before{
2520
+ content: " ";
2521
+ height: 0;
2522
+ position: absolute;
2523
+ top: 22px;
2524
+ width: 0;
2525
+ z-index: 1;
2526
+ left: 30px;
2527
+ border-style: solid;
2528
+ border-width: 10px 10px 10px 0;
2529
+ }
2530
+
2531
+ .acfb_post_timeline_left .acfb_post_timeline_inner .acfb_posts_opposite_elements .acfb_posts_opposite_elements_inner{
2532
+ padding: 20px 30px;
2533
+ }
2534
+
2535
+ .acfb_post_timeline_left {
2536
+ position: relative;
2537
+ }
2538
+
2539
+ .acfb_post_timeline_left::after {
2540
+ content: '';
2541
+ position: absolute;
2542
+ width: 6px;
2543
+ top: 0;
2544
+ bottom: 0;
2545
+ margin-left: -3px;
2546
+ }
2547
+
2548
+ .acfb_post_timeline_left .acfb_post_timeline_inner {
2549
+ position: relative;
2550
+ left: 0;
2551
+ padding: 10px 0px 10px 40px;
2552
+ text-align: left;
2553
+ display: flex;
2554
+ flex-direction: column-reverse;
2555
+ }
2556
+
2557
+ .acfb_post_timeline_left .acfb_post_timeline_inner::after {
2558
+ left: -12px;
2559
+ }
2560
+
2561
+ .acfb_post_timeline_left .acfb_post_timeline_inner::before {
2562
+ content: " ";
2563
+ height: 0;
2564
+ position: absolute;
2565
+ top: 22px;
2566
+ width: 0;
2567
+ z-index: 1;
2568
+ left: 30px;
2569
+ border-style: solid;
2570
+ border-width: 10px 10px 10px 0;
2571
+ }
2572
+
2573
+ .acfb_post_timeline_left .acfb_post_timeline_inner::after{
2574
+ content: '';
2575
+ position: absolute;
2576
+ width: 25px;
2577
+ height: 25px;
2578
+ right: -12px;
2579
+ top: 15px;
2580
+ border-radius: 50%;
2581
+ z-index: 1;
2582
+ border: 4px solid #191e23;
2583
+ }
2584
+
2585
+ .acfb_post_timeline_left .acfb_post_timeline_inner .acfb_post_timeline_content{
2586
+ padding: 20px 30px;
2587
+ position: relative;
2588
+ }
2589
+
2590
+
2591
+
2592
+
2593
+ /*********** Right Post Timeline ************/
2594
+ .acfb_post_timeline_right .acfb_post_timeline_inner .acfb_posts_opposite_elements{
2595
+ padding-bottom: 10px;
2596
+ }
2597
+
2598
+ .acfb_post_timeline_right .acfb_post_timeline_inner .acfb_posts_opposite_elements .acfb_posts_opposite_elements_inner::before{
2599
+ content: " ";
2600
+ height: 0;
2601
+ position: absolute;
2602
+ top: 22px;
2603
+ width: 0;
2604
+ z-index: 1;
2605
+ right: 30px;
2606
+ border-style: solid;
2607
+ border-width: 10px 0 10px 10px;
2608
+ }
2609
+
2610
+ .acfb_post_timeline_right .acfb_post_timeline_inner .acfb_posts_opposite_elements .acfb_posts_opposite_elements_inner{
2611
+ padding: 20px 30px;
2612
+ }
2613
+
2614
+ .acfb_post_timeline_right {
2615
+ position: relative;
2616
+ }
2617
+
2618
+ .acfb_post_timeline_right::after {
2619
+ content: '';
2620
+ position: absolute;
2621
+ width: 6px;
2622
+ top: 0;
2623
+ right: 0;
2624
+ bottom: 0;
2625
+ margin-right: -3px;
2626
+ }
2627
+
2628
+ .acfb_post_timeline_right .acfb_post_timeline_inner {
2629
+ position: relative;
2630
+ left: 0;
2631
+ padding: 10px 40px 10px 0px;
2632
+ text-align: right;
2633
+ display: flex;
2634
+ flex-direction: column-reverse;
2635
+ }
2636
+
2637
+ .acfb_post_timeline_right .acfb_post_timeline_inner::after {
2638
+ right: -12px;
2639
+ }
2640
+
2641
+ .acfb_post_timeline_right .acfb_post_timeline_inner::before {
2642
+ content: " ";
2643
+ height: 0;
2644
+ position: absolute;
2645
+ top: 22px;
2646
+ width: 0;
2647
+ z-index: 1;
2648
+ right: 30px;
2649
+ border-style: solid;
2650
+ border-width: 10px 0 10px 10px;
2651
+ }
2652
+
2653
+ .acfb_post_timeline_right .acfb_post_timeline_inner::after{
2654
+ content: '';
2655
+ position: absolute;
2656
+ width: 25px;
2657
+ height: 25px;
2658
+ top: 15px;
2659
+ border-radius: 50%;
2660
+ z-index: 1;
2661
+ border: 4px solid #191e23;
2662
+ }
2663
+
2664
+ .acfb_post_timeline_right .acfb_post_timeline_inner .acfb_post_timeline_content{
2665
+ padding: 20px 30px;
2666
+ position: relative;
2667
+ }
2668
+
2669
+
2670
+
2671
+ @media screen and (max-width: 767px) {
2672
+ .acfb_post_timeline_center .acfb_post_timeline_inner{
2673
+ width: 100%;
2674
+ }
2675
+
2676
+ .acfb_post_timeline_center::after, .acfb_post_timeline_center .acfb_post_timeline_inner:nth-child(even){
2677
+ left: 0;
2678
+ }
2679
+
2680
+ .acfb_post_timeline_center .acfb_post_timeline_inner:nth-child(odd), .acfb_post_timeline_center .acfb_post_timeline_inner:nth-child(even){
2681
+ padding: 10px 0px 10px 40px;
2682
+ text-align: left !important;
2683
+ }
2684
+
2685
+ .acfb_post_timeline_center .acfb_post_timeline_inner::after{
2686
+ left: -12px;
2687
+ }
2688
+
2689
+ .acfb_post_timeline_center .acfb_post_timeline_inner:nth-child(odd)::before{
2690
+ left: 30px;
2691
+ border-width: 10px 10px 10px 0px;
2692
+ }
2693
+
2694
+
2695
+ .acfb_post_timeline_center .acfb_post_timeline_inner{
2696
+ display: flex;
2697
+ flex-direction: column-reverse;
2698
+ }
2699
+
2700
+ .acfb_post_timeline_center .acfb_post_timeline_inner:nth-child(odd) .acfb_posts_opposite_elements{
2701
+ position: relative;
2702
+ right: 0;
2703
+ top: 0;
2704
+ width: 100%;
2705
+ }
2706
+
2707
+ .acfb_post_timeline_center .acfb_post_timeline_inner:nth-child(even) .acfb_posts_opposite_elements{
2708
+ position: relative;
2709
+ left: 0;
2710
+ top: 0;
2711
+ width: 100%;
2712
+ }
2713
+
2714
+ .acfb_post_timeline_center .acfb_post_timeline_inner:nth-child(odd) .acfb_posts_opposite_elements,
2715
+ .acfb_post_timeline_center .acfb_post_timeline_inner:nth-child(even) .acfb_posts_opposite_elements{
2716
+ padding: 0px 0px 10px 0px;
2717
+ text-align: left !important;
2718
+ }
2719
+
2720
+
2721
+ .acfb_post_timeline_center .acfb_post_timeline_inner .acfb_posts_opposite_elements .acfb_posts_opposite_elements_inner::before{
2722
+ content: none !important;
2723
+ }
2724
+
2725
+ }
2726
+
2727
+
2728
+
2729
+
2730
+ /************ Post Slider CSS ************/
2731
+ .acfb_posts_slider_block .acfb_post_slider_tiled{
2732
+ background-size: cover !important;
2733
+ background-repeat: no-repeat !important;
2734
+ background-position: center !important;
2735
+ display: grid;
2736
+ }
2737
+
2738
+ .acfb_posts_slider_block .acfb_post_slider_card{
2739
+ display: grid;
2740
+ }
2741
+
2742
+ .acfb_posts_slider_block .acfb_post_slider_thumbnail,
2743
+ .acfb_posts_slider_block .acfb_post_slider_title,
2744
+ .acfb_posts_slider_block .acfb_post_slider_meta,
2745
+ .acfb_posts_slider_block .acfb_post_slider_excerpt,
2746
+ .acfb_posts_slider_block .acfb_post_slider_button {
2747
+ margin-bottom: 15px !important;
2748
+ }
2749
+
2750
+ .acfb_posts_slider_block .acfb_post_slider_title h1,
2751
+ .acfb_posts_slider_block .acfb_post_slider_title h2,
2752
+ .acfb_posts_slider_block .acfb_post_slider_title h3,
2753
+ .acfb_posts_slider_block .acfb_post_slider_title h4,
2754
+ .acfb_posts_slider_block .acfb_post_slider_title h5,
2755
+ .acfb_posts_slider_block .acfb_post_slider_title h6 {
2756
+ margin: 0;
2757
+ }
2758
+
2759
+
2760
+ .acfb_posts_slider_block .acfb_post_slider_button a{
2761
+ display: block;
2762
+ }
2763
+
2764
+ .acfb_posts_slider_block .swiper-container .acfb_button_next, .acfb_posts_slider_block .swiper-container .acfb_button_prev{
2765
+ position: absolute;
2766
+ top: 50%;
2767
+ width: 58px;
2768
+ margin-top: -22px;
2769
+ z-index: 10;
2770
+ cursor: pointer;
2771
+ padding: 15px;
2772
+ border-radius: 5px;
2773
+ line-height: 1;
2774
+ }
2775
+
2776
+ .acfb_posts_slider_block .swiper-container .acfb_button_next{
2777
+ right: 10px;
2778
+ left: auto;
2779
+ }
2780
+
2781
+ .acfb_posts_slider_block .swiper-container .acfb_button_prev{
2782
+ left: 10px;
2783
+ right: auto;
2784
+ }
2785
+
2786
+ .acfb_posts_slider_block .acfb_post_slider_card.acfb_post_slider_item{
2787
+ padding: 15px;
2788
+ }
2789
+
2790
+ .acfb_posts_slider_block .acfb_post_slider_card.acfb_post_slider_item .acfb_post_slider_thumbnail img{
2791
+ width: 100%;
2792
+ height: auto;
2793
+ }
2794
+
2795
+
2796
+
2797
+
2798
+ /************ Business Hours CSS ************/
2799
+ .acfb_bh_wrapper{}
2800
+
2801
+ .acfb_bh_wrapper ul{
2802
+ list-style-type: none;
2803
+ padding: 0 !important;
2804
+ margin: 0 !important;
2805
+ }
2806
+
2807
+ .acfb_bh_wrapper ul li{
2808
+ padding: 10px 0;
2809
+ display: -webkit-box;
2810
+ display: -webkit-flex;
2811
+ display: -ms-flexbox;
2812
+ display: flex;
2813
+ justify-content: space-between;
2814
+ }
2815
+
2816
+ .acfb_bh_wrapper ul li:last-child{
2817
+ border-bottom: none !important;
2818
+ }
2819
+
2820
+
2821
+
2822
+ /************ Dual Button CSS ************/
2823
+ .acfb_db_wrapper{
2824
+ display: -webkit-box;
2825
+ display: -ms-flexbox;
2826
+ display: flex;
2827
+ }
2828
+ .acfb_db_wrapper .acfb_db_one{
2829
+ position: relative;
2830
+ }
2831
+
2832
+ .acfb_db_wrapper .acfb_db{
2833
+ display: -webkit-box;
2834
+ display: -ms-flexbox;
2835
+ display: flex;
2836
+ flex-grow: 1;
2837
+ justify-content: center;
2838
+ text-decoration: none !important;
2839
+ }
2840
+ .acfb_db_wrapper .acfb_db_seprator{
2841
+ position: absolute;
2842
+ top: 50%;
2843
+ right: -18px;
2844
+ font-size: 16px;
2845
+ transform: translateY(-50%);
2846
+ z-index: 9999999;
2847
+ width: 35px;
2848
+ height: 35px;
2849
+ display: -webkit-box;
2850
+ display: -ms-flexbox;
2851
+ display: flex;
2852
+ -webkit-box-align: center;
2853
+ -ms-flex-align: center;
2854
+ align-items: center;
2855
+ -webkit-box-pack: center;
2856
+ -ms-flex-pack: center;
2857
+ justify-content: center;
2858
+ }
2859
+
2860
+ .acfb_db_wrapper .acfb_db_seprator span{
2861
+ display: flex;
2862
+ align-items: center;
2863
+ }
2864
+
2865
+ .acfb_db_wrapper .acfb_db_seprator img{
2866
+ padding: 5px;
2867
+ width: 100%;
2868
+ }
2869
+
2870
+
2871
+ @media only screen and (max-width: 767px) {
2872
+ .acfb_db_wrapper{
2873
+ flex-direction: column;
2874
+ }
2875
+
2876
+ .acfb_db_wrapper .acfb_db{
2877
+ justify-content: center;
2878
+ padding-top: 15px !important;
2879
+ padding-bottom: 15px !important;
2880
+ }
2881
+
2882
+ .acfb_db_wrapper .acfb_db_seprator{
2883
+ transform: none;
2884
+ top: calc(100% - 17.5px);
2885
+ left: calc(50% - 17.5px);
2886
+ }
2887
+
2888
+
2889
+ }
2890
+
2891
+ .acfb_db_radius .acf-fields{
2892
+ display: grid;
2893
+ grid-template-columns: 50% 50%;
2894
+ overflow: hidden;
2895
+ }
2896
+
2897
+ .acfb_db_radius .acf-fields input[type=range]{
2898
+ width: 100%;
2899
+ margin-bottom: 5px;
2900
+ }
2901
+
2902
+ .acfb_db_radius .acf-fields input[type=number]{
2903
+ margin-left: 0;
2904
+ }
2905
+
2906
+
2907
+ /************ Highlighted Headline CSS ************/
2908
+ .acfb_highlighted_headline .acfb_animated_wrapper {
2909
+ overflow: visible;
2910
+ position: relative;
2911
+ }
2912
+
2913
+ .acfb_highlighted_headline .acfb_animated_wrapper .acfb_animated_text {
2914
+ z-index:1;
2915
+ position:relative;
2916
+ }
2917
+
2918
+ .acfb_highlighted_headline .acfb_animated_wrapper svg {
2919
+ position: absolute;
2920
+ top: 50%;
2921
+ left: 50%;
2922
+ width: calc( 100% + 0px);
2923
+ height: calc( 100% + 20px);
2924
+ -webkit-transform: translate(-50%, -50%);
2925
+ -ms-transform: translate(-50%, -50%);
2926
+ transform: translate(-50%, -50%);
2927
+ overflow: visible;
2928
+ }
2929
+
2930
+ .acfb_highlighted_headline .acfb_animated_wrapper svg path {
2931
+ stroke-width: 9;
2932
+ fill: none;
2933
+ stroke-dasharray: 1500;
2934
+ stroke-dashoffset: 1500;
2935
+ -webkit-animation-name : acfb-hh-dash;
2936
+ animation-name : acfb-hh-dash;
2937
+ -webkit-animation-iteration-count: infinite;
2938
+ animation-iteration-count: infinite;
2939
+ -webkit-animation-duration: 10s;
2940
+ animation-duration: 10s;
2941
+ }
2942
+
2943
+ .acfb_highlighted_headline .acfb_animated_wrapper svg path:nth-of-type(2) {
2944
+ -webkit-animation-delay: 0.6s;
2945
+ animation-delay: 0.6s;
2946
+ }
2947
+
2948
+ @-webkit-keyframes acfb-hh-dash {
2949
+ 0% { stroke-dashoffset: 1500; }
2950
+ 15% { stroke-dashoffset: 0; }
2951
+ 85% { opacity: 1; }
2952
+ 90% { stroke-dashoffset: 0; opacity: 0; }
2953
+ 100% { stroke-dashoffset: 1500; opacity: 0; }
2954
+ }
2955
+
2956
+ @keyframes acfb-hh-dash {
2957
+ 0% { stroke-dashoffset: 1500; }
2958
+ 15% { stroke-dashoffset: 0; }
2959
+ 85% { opacity: 1; }
2960
+ 90% { stroke-dashoffset: 0; opacity: 0; }
2961
+ 100% { stroke-dashoffset: 1500; opacity: 0; }
2962
+ }
2963
+
2964
+
2965
+
2966
+
2967
+ /************ Tilt Image CSS ************/
2968
+ .acfb_tilt_card {
2969
+ position: relative;
2970
+ transform-style: preserve-3d;
2971
+ }
2972
+
2973
+
2974
+ .acfb_tilt_card .acfb_tilt_title,
2975
+ .acfb_tilt_card .acfb_tilt_content,
2976
+ .acfb_tilt_card .acfb_tilt_content_img,
2977
+ .acfb_tilt_card .acfb_tilt_btn {
2978
+ transform: translateZ(20px);
2979
+ }
2980
+
2981
+ .acfb_tilt_card .acfb_tilt_title {
2982
+ position: relative;
2983
+ z-index: 2;
2984
+ margin:0 0 10px 0 !important;
2985
+ }
2986
+
2987
+ .acfb_tilt_card .acfb_tilt_content_img{
2988
+ margin:0 0 10px 0 !important;
2989
+ }
2990
+
2991
+ .acfb_tilt_card .acfb_tilt_content{
2992
+ margin:0 0 15px 0 !important;
2993
+ }
2994
+
2995
+ .acfb_tilt_card .acfb_tilt_btn {
2996
+ padding: 10px 25px;
2997
+ }
2998
+
2999
+ .acfb_tilt_card .acfb_tilt_bg {
3000
+ position: absolute;
3001
+ z-index: -1;
3002
+ top: 0;
3003
+ left: 0;
3004
+ height: 100%;
3005
+ width: 100%;
3006
+ background-size: cover !important;
3007
+ background-position: center !important;
3008
+ }
3009
+
3010
+
3011
+ /************ Acf Data Display CSS ************/
3012
+ .acfb_meta_display .acfb_meta_display_gallery{
3013
+ display: grid;
3014
+ grid-gap: 10px;
3015
+ align-items: center;
3016
+ justify-items: center;
3017
+ width: 100%;
3018
+ }
3019
+
3020
+ .acfb_meta_display .acfb_meta_display_gallery_2{
3021
+ grid-template-columns: repeat(2, calc(50% - 10px));
3022
+ }
3023
+
3024
+ .acfb_meta_display .acfb_meta_display_gallery_3{
3025
+ grid-template-columns: repeat(3, calc(33.33% - 10px));
3026
+ }
3027
+
3028
+ .acfb_meta_display .acfb_meta_display_gallery_4{
3029
+ grid-template-columns: repeat(4, calc(25% - 10px));
3030
+ }
3031
+
3032
+ .acfb_meta_display .acfb_meta_display_gallery_5{
3033
+ grid-template-columns: repeat(5, calc(20% - 10px));
3034
+ }
3035
+
3036
+
3037
+ /************ Content Toggle CSS ************/
3038
+
3039
+ .acfb_ct_content_wrap.one .block-editor-block-list__layout [data-type="acf/acfb-content-toggle-child"]:nth-child(2){
3040
+ display: none;
3041
+ }
3042
+
3043
+ .acfb_ct_content_wrap.two .block-editor-block-list__layout [data-type="acf/acfb-content-toggle-child"]:nth-child(1) {
3044
+ display: none;
3045
+ }
3046
+
3047
+
3048
+ .acfb_ct_btn_wrap{
3049
+ display: flex;
3050
+ justify-content: center;
3051
+ align-items: center;
3052
+ }
3053
+
3054
+ .acfb_ct_btn_wrap h3{
3055
+ margin-bottom: 0;
3056
+ }
3057
+
3058
+ .acfb_ct_btn_wrap .acfb_ct_switch {
3059
+ position: relative;
3060
+ display: inline-block;
3061
+ width: 60px;
3062
+ height: 34px;
3063
+ margin: 0 10px;
3064
+ }
3065
+
3066
+ .acfb_ct_btn_wrap .acfb_ct_switch input {
3067
+ opacity: 0;
3068
+ width: 0;
3069
+ height: 0;
3070
+ }
3071
+
3072
+ .acfb_ct_btn_wrap .acfb_ct_slider {
3073
+ position: absolute;
3074
+ cursor: pointer;
3075
+ top: 0;
3076
+ left: 0;
3077
+ right: 0;
3078
+ bottom: 0;
3079
+ background-color: #ccc;
3080
+ -webkit-transition: .4s;
3081
+ transition: .4s;
3082
+ border-radius: 34px;
3083
+ }
3084
+
3085
+ .acfb_ct_btn_wrap .acfb_ct_slider:before {
3086
+ position: absolute;
3087
+ content: "";
3088
+ height: 26px;
3089
+ width: 26px;
3090
+ left: 4px;
3091
+ bottom: 4px;
3092
+ background-color: white;
3093
+ -webkit-transition: .4s;
3094
+ transition: .4s;
3095
+ border-radius: 50%;
3096
+ }
3097
+
3098
+ .acfb_ct_btn_wrap input:checked + .acfb_ct_slider {
3099
+ background-color: #2196F3;
3100
+ }
3101
+
3102
+ .acfb_ct_btn_wrap input:focus + .acfb_ct_slider {
3103
+ box-shadow: 0 0 1px #2196F3;
3104
+ }
3105
+
3106
+ .acfb_ct_btn_wrap input:checked + .acfb_ct_slider:before {
3107
+ -webkit-transform: translateX(26px);
3108
+ -ms-transform: translateX(26px);
3109
+ transform: translateX(26px);
3110
+ }
3111
+
3112
+
3113
+ .acfb_ct_content_two {
3114
+ display: none;
3115
+ }
3116
+
3117
+
3118
+
3119
+ .editor-block-list-item-acf-acfb-flipbox .editor-block-types-list__item-title::after,
3120
+ .editor-block-list-item-acf-acfb-flipbox .block-editor-block-types-list__item-title::after,
3121
+
3122
+ .editor-block-list-item-acf-acfb-content-timeline .editor-block-types-list__item-title::after,
3123
+ .editor-block-list-item-acf-acfb-content-timeline .block-editor-block-types-list__item-title::after,
3124
+
3125
+ .editor-block-list-item-acf-acfb-image-accordion .editor-block-types-list__item-title::after,
3126
+ .editor-block-list-item-acf-acfb-image-accordion .block-editor-block-types-list__item-title::after,
3127
+
3128
+ .editor-block-list-item-acf-acfb-call-to-action .editor-block-types-list__item-title::after,
3129
+ .editor-block-list-item-acf-acfb-call-to-action .block-editor-block-types-list__item-title::after,
3130
+
3131
+ .editor-block-list-item-acf-acfb-image-hotspot .editor-block-types-list__item-title::after,
3132
+ .editor-block-list-item-acf-acfb-image-hotspot .block-editor-block-types-list__item-title::after,
3133
+
3134
+ .editor-block-list-item-acf-acfb-gallery .editor-block-types-list__item-title::after,
3135
+ .editor-block-list-item-acf-acfb-gallery .block-editor-block-types-list__item-title::after,
3136
+
3137
+ .editor-block-list-item-acf-acfb-device .editor-block-types-list__item-title::after,
3138
+ .editor-block-list-item-acf-acfb-device .block-editor-block-types-list__item-title::after,
3139
+
3140
+ .editor-block-list-item-acf-acfb-shape-divider .editor-block-types-list__item-title::after,
3141
+ .editor-block-list-item-acf-acfb-shape-divider .block-editor-block-types-list__item-title::after,
3142
+
3143
+ .editor-block-list-item-acf-acfb-post-ticker .editor-block-types-list__item-title::after,
3144
+ .editor-block-list-item-acf-acfb-post-ticker .block-editor-block-types-list__item-title::after,
3145
+
3146
+ .editor-block-list-item-acf-acfb-post-slider .editor-block-types-list__item-title::after,
3147
+ .editor-block-list-item-acf-acfb-post-slider .block-editor-block-types-list__item-title::after,
3148
+
3149
+ .editor-block-list-item-acf-acfb-post-tiled .editor-block-types-list__item-title::after,
3150
+ .editor-block-list-item-acf-acfb-post-tiled .block-editor-block-types-list__item-title::after,
3151
+
3152
+ .editor-block-list-item-acf-acfb-post-timeline .editor-block-types-list__item-title::after,
3153
+ .editor-block-list-item-acf-acfb-post-timeline .block-editor-block-types-list__item-title::after,
3154
+
3155
+ .editor-block-list-item-acf-acfb-before-after-image .editor-block-types-list__item-title::after,
3156
+ .editor-block-list-item-acf-acfb-before-after-image .block-editor-block-types-list__item-title::after,
3157
+
3158
+ .editor-block-list-item-acf-acfb-content-toggle .editor-block-types-list__item-title::after,
3159
+ .editor-block-list-item-acf-acfb-content-toggle .block-editor-block-types-list__item-title::after,
3160
+
3161
+ .editor-block-list-item-acf-acfb-animated-headline .editor-block-types-list__item-title::after,
3162
+ .editor-block-list-item-acf-acfb-animated-headline .block-editor-block-types-list__item-title::after,
3163
+
3164
+ .editor-block-list-item-acf-acfb-steps .editor-block-types-list__item-title::after,
3165
+ .editor-block-list-item-acf-acfb-steps .block-editor-block-types-list__item-title::after,
3166
+
3167
+ .editor-block-list-item-acf-acfb-highlighted-headline .editor-block-types-list__item-title::after,
3168
+ .editor-block-list-item-acf-acfb-highlighted-headline .block-editor-block-types-list__item-title::after,
3169
+
3170
+ .editor-block-list-item-acf-acfb-dual-button .editor-block-types-list__item-title::after,
3171
+ .editor-block-list-item-acf-acfb-dual-button .block-editor-block-types-list__item-title::after,
3172
+
3173
+ .editor-block-list-item-acf-acfb-tilt-card .editor-block-types-list__item-title::after,
3174
+ .editor-block-list-item-acf-acfb-tilt-card .block-editor-block-types-list__item-title::after,
3175
+
3176
+ .editor-block-list-item-acf-acfb-lottie .editor-block-types-list__item-title::after,
3177
+ .editor-block-list-item-acf-acfb-lottie .block-editor-block-types-list__item-title::after{
3178
+ content: " PRO";
3179
+ color: #ffffff;
3180
+ font-weight: bold;
3181
+ background: #06c2a4;
3182
+ padding: 2px 5px;
3183
+ margin-left: 2px;
3184
+ display: inline-block;
3185
+ border-radius: 100px;
3186
+ font-size: 10px;
3187
+ }
3188
+
3189
+
3190
+ [data-name="acfb_timeline_image"] .acf-label,
3191
+ [data-name="acfb_timeline_date"] .acf-label,
3192
+ [data-name="acfb_timeline_title"] .acf-label,
3193
+ [data-name="acfb_timeline_content"] .acf-label,
3194
+ [data-name="acfb_timeline_button"] .acf-label {
3195
+ display: none;
3196
+ }
3197
+
3198
+
3199
+ div[data-type~="typography"], div[data-type~="padding"], div[data-type~="margin"]{
3200
+ padding: 10px !important;
3201
+ border: 1px solid #c5c5c5 !important;
3202
+ }
3203
+
3204
+
3205
+ div[data-type~="typography"] .acf-field-range .acf-range-wrap{
3206
+ display: grid;
3207
+ grid-template-columns: 50% 30% 20%;
3208
+ }
3209
+
3210
+
3211
+
3212
+ .acf-field-padding .acfb-padding,
3213
+ .acf-field-margin .acfb-margin{
3214
+ display: grid;
3215
+ grid-template-columns: 50% 50%;
3216
+ justify-items: center;
3217
+
3218
+ }
3219
+
3220
+ .acf-field-padding .acfb-padding .acf-range-wrap input,
3221
+ .acf-field-margin .acfb-margin .acf-range-wrap input{
3222
+ margin-left: 0;
3223
+ }
3224
+
3225
+ .acfb_pannel_eye{
3226
+ position: absolute;
3227
+ top: -22px;
3228
+ right: 0;
3229
+ }
3230
+
3231
+ .acfb_pannel_eye svg{
3232
+ width: 17px;
3233
+ height: 19px;
3234
+ }
3235
+
3236
+
3237
+ .acfb-checkbox-true-false[type=checkbox]{
3238
+ display:none;
3239
+ }
3240
+
3241
+ .acfb-checkbox-true-false[type=checkbox] + label{
3242
+ height: 16px;
3243
+ width: 16px;
3244
+ fill: #444;
3245
+ }
3246
+
3247
+ .acfb-checkbox-true-false[type=checkbox]:checked + label{
3248
+ height: 16px;
3249
+ width: 16px;
3250
+ fill: #444;
3251
+ }
3252
+
3253
+ .acfb_eye_svg{
3254
+ position: absolute;
3255
+ top: -21px;
3256
+ right: 0;
3257
+ width: 15px;
3258
+ height: 15px;
3259
  }
css/animated-headline.css CHANGED
@@ -1,1207 +1,1207 @@
1
- .cd-title {
2
- position: relative;
3
- height: 160px;
4
- line-height: 230px;
5
- text-align: center;
6
- }
7
- .cd-title h1 {
8
- font-size: 2.4rem;
9
- font-weight: 700;
10
- }
11
- @media only screen and (min-width: 768px) {
12
- .cd-title {
13
- line-height: 250px;
14
- }
15
- }
16
- @media only screen and (min-width: 1170px) {
17
- .cd-title {
18
- height: 200px;
19
- line-height: 300px;
20
- }
21
- .cd-title h1 {
22
- font-size: 3rem;
23
- }
24
- }
25
- .cd-intro {
26
- /*width: 90%;*/
27
- /*max-width: 768px;*/
28
- /*text-align: center;*/
29
- }
30
- .cd-intro {
31
- /*margin: 4em auto;*/
32
- }
33
- @media only screen and (min-width: 768px) {
34
- .cd-intro {
35
- /*margin: 5em auto;*/
36
- }
37
- }
38
- @media only screen and (min-width: 1170px) {
39
- .cd-intro {
40
- /*margin: 6em auto;*/
41
- }
42
- }
43
- .cd-headline {
44
- font-size: 3rem;
45
- line-height: 1.2;
46
- }
47
- @media only screen and (min-width: 768px) {
48
- .cd-headline {
49
- font-size: 4.4rem;
50
- font-weight: 300;
51
- }
52
- }
53
- @media only screen and (min-width: 1170px) {
54
- .cd-headline {
55
- font-size: 6rem;
56
- }
57
- }
58
- .cd-words-wrapper {
59
- display: inline-block;
60
- position: relative;
61
- text-align: left;
62
- }
63
- .cd-words-wrapper b {
64
- display: inline-block;
65
- position: absolute;
66
- white-space: nowrap;
67
- left: 0;
68
- top: 0;
69
- }
70
- .cd-words-wrapper b.is-visible {
71
- position: relative;
72
- }
73
- .no-js .cd-words-wrapper b {
74
- opacity: 0;
75
- }
76
- .no-js .cd-words-wrapper b.is-visible {
77
- opacity: 1;
78
- }
79
- /* --------------------------------
80
-
81
- xrotate-1
82
-
83
- -------------------------------- */
84
- .cd-headline.rotate-1 .cd-words-wrapper {
85
- -webkit-perspective: 300px;
86
- -moz-perspective: 300px;
87
- perspective: 300px;
88
- }
89
- .cd-headline.rotate-1 b {
90
- opacity: 0;
91
- -webkit-transform-origin: 50% 100%;
92
- -moz-transform-origin: 50% 100%;
93
- -ms-transform-origin: 50% 100%;
94
- -o-transform-origin: 50% 100%;
95
- transform-origin: 50% 100%;
96
- -webkit-transform: rotateX(180deg);
97
- -moz-transform: rotateX(180deg);
98
- -ms-transform: rotateX(180deg);
99
- -o-transform: rotateX(180deg);
100
- transform: rotateX(180deg);
101
- }
102
- .cd-headline.rotate-1 b.is-visible {
103
- opacity: 1;
104
- -webkit-transform: rotateX(0deg);
105
- -moz-transform: rotateX(0deg);
106
- -ms-transform: rotateX(0deg);
107
- -o-transform: rotateX(0deg);
108
- transform: rotateX(0deg);
109
- -webkit-animation: cd-rotate-1-in 1.2s;
110
- -moz-animation: cd-rotate-1-in 1.2s;
111
- animation: cd-rotate-1-in 1.2s;
112
- }
113
- .cd-headline.rotate-1 b.is-hidden {
114
- -webkit-transform: rotateX(180deg);
115
- -moz-transform: rotateX(180deg);
116
- -ms-transform: rotateX(180deg);
117
- -o-transform: rotateX(180deg);
118
- transform: rotateX(180deg);
119
- -webkit-animation: cd-rotate-1-out 1.2s;
120
- -moz-animation: cd-rotate-1-out 1.2s;
121
- animation: cd-rotate-1-out 1.2s;
122
- }
123
- @-webkit-keyframes cd-rotate-1-in {
124
- 0% {
125
- -webkit-transform: rotateX(180deg);
126
- opacity: 0;
127
- }
128
- 35% {
129
- -webkit-transform: rotateX(120deg);
130
- opacity: 0;
131
- }
132
- 65% {
133
- opacity: 0;
134
- }
135
- 100% {
136
- -webkit-transform: rotateX(360deg);
137
- opacity: 1;
138
- }
139
- }
140
- @-moz-keyframes cd-rotate-1-in {
141
- 0% {
142
- -moz-transform: rotateX(180deg);
143
- opacity: 0;
144
- }
145
- 35% {
146
- -moz-transform: rotateX(120deg);
147
- opacity: 0;
148
- }
149
- 65% {
150
- opacity: 0;
151
- }
152
- 100% {
153
- -moz-transform: rotateX(360deg);
154
- opacity: 1;
155
- }
156
- }
157
- @keyframes cd-rotate-1-in {
158
- 0% {
159
- -webkit-transform: rotateX(180deg);
160
- -moz-transform: rotateX(180deg);
161
- -ms-transform: rotateX(180deg);
162
- -o-transform: rotateX(180deg);
163
- transform: rotateX(180deg);
164
- opacity: 0;
165
- }
166
- 35% {
167
- -webkit-transform: rotateX(120deg);
168
- -moz-transform: rotateX(120deg);
169
- -ms-transform: rotateX(120deg);
170
- -o-transform: rotateX(120deg);
171
- transform: rotateX(120deg);
172
- opacity: 0;
173
- }
174
- 65% {
175
- opacity: 0;
176
- }
177
- 100% {
178
- -webkit-transform: rotateX(360deg);
179
- -moz-transform: rotateX(360deg);
180
- -ms-transform: rotateX(360deg);
181
- -o-transform: rotateX(360deg);
182
- transform: rotateX(360deg);
183
- opacity: 1;
184
- }
185
- }
186
- @-webkit-keyframes cd-rotate-1-out {
187
- 0% {
188
- -webkit-transform: rotateX(0deg);
189
- opacity: 1;
190
- }
191
- 35% {
192
- -webkit-transform: rotateX(-40deg);
193
- opacity: 1;
194
- }
195
- 65% {
196
- opacity: 0;
197
- }
198
- 100% {
199
- -webkit-transform: rotateX(180deg);
200
- opacity: 0;
201
- }
202
- }
203
- @-moz-keyframes cd-rotate-1-out {
204
- 0% {
205
- -moz-transform: rotateX(0deg);
206
- opacity: 1;
207
- }
208
- 35% {
209
- -moz-transform: rotateX(-40deg);
210
- opacity: 1;
211
- }
212
- 65% {
213
- opacity: 0;
214
- }
215
- 100% {
216
- -moz-transform: rotateX(180deg);
217
- opacity: 0;
218
- }
219
- }
220
- @keyframes cd-rotate-1-out {
221
- 0% {
222
- -webkit-transform: rotateX(0deg);
223
- -moz-transform: rotateX(0deg);
224
- -ms-transform: rotateX(0deg);
225
- -o-transform: rotateX(0deg);
226
- transform: rotateX(0deg);
227
- opacity: 1;
228
- }
229
- 35% {
230
- -webkit-transform: rotateX(-40deg);
231
- -moz-transform: rotateX(-40deg);
232
- -ms-transform: rotateX(-40deg);
233
- -o-transform: rotateX(-40deg);
234
- transform: rotateX(-40deg);
235
- opacity: 1;
236
- }
237
- 65% {
238
- opacity: 0;
239
- }
240
- 100% {
241
- -webkit-transform: rotateX(180deg);
242
- -moz-transform: rotateX(180deg);
243
- -ms-transform: rotateX(180deg);
244
- -o-transform: rotateX(180deg);
245
- transform: rotateX(180deg);
246
- opacity: 0;
247
- }
248
- }
249
- /* --------------------------------
250
-
251
- xtype
252
-
253
- -------------------------------- */
254
- .cd-headline.type .cd-words-wrapper {
255
- vertical-align: top;
256
- overflow: hidden;
257
- }
258
- .cd-headline.type .cd-words-wrapper::after {
259
- /* vertical bar */
260
- content:'';
261
- position: absolute;
262
- right: 0;
263
- top: 50%;
264
- bottom: auto;
265
- -webkit-transform: translateY(-50%);
266
- -moz-transform: translateY(-50%);
267
- -ms-transform: translateY(-50%);
268
- -o-transform: translateY(-50%);
269
- transform: translateY(-50%);
270
- height: 90%;
271
- width: 1px;
272
- background-color: #aebcb9;
273
- }
274
- .cd-headline.type .cd-words-wrapper.waiting::after {
275
- -webkit-animation: cd-pulse 1s infinite;
276
- -moz-animation: cd-pulse 1s infinite;
277
- animation: cd-pulse 1s infinite;
278
- }
279
- .cd-headline.type .cd-words-wrapper.selected {
280
- background-color: #aebcb9;
281
- }
282
- .cd-headline.type .cd-words-wrapper.selected::after {
283
- visibility: hidden;
284
- }
285
- .cd-headline.type .cd-words-wrapper.selected b {
286
- color: #0d0d0d;
287
- }
288
- .cd-headline.type b {
289
- visibility: hidden;
290
- }
291
- .cd-headline.type b.is-visible {
292
- visibility: visible;
293
- }
294
- .cd-headline.type i {
295
- position: absolute;
296
- visibility: hidden;
297
- }
298
- .cd-headline.type i.in {
299
- position: relative;
300
- visibility: visible;
301
- }
302
- @-webkit-keyframes cd-pulse {
303
- 0% {
304
- -webkit-transform: translateY(-50%) scale(1);
305
- opacity: 1;
306
- }
307
- 40% {
308
- -webkit-transform: translateY(-50%) scale(0.9);
309
- opacity: 0;
310
- }
311
- 100% {
312
- -webkit-transform: translateY(-50%) scale(0);
313
- opacity: 0;
314
- }
315
- }
316
- @-moz-keyframes cd-pulse {
317
- 0% {
318
- -moz-transform: translateY(-50%) scale(1);
319
- opacity: 1;
320
- }
321
- 40% {
322
- -moz-transform: translateY(-50%) scale(0.9);
323
- opacity: 0;
324
- }
325
- 100% {
326
- -moz-transform: translateY(-50%) scale(0);
327
- opacity: 0;
328
- }
329
- }
330
- @keyframes cd-pulse {
331
- 0% {
332
- -webkit-transform: translateY(-50%) scale(1);
333
- -moz-transform: translateY(-50%) scale(1);
334
- -ms-transform: translateY(-50%) scale(1);
335
- -o-transform: translateY(-50%) scale(1);
336
- transform: translateY(-50%) scale(1);
337
- opacity: 1;
338
- }
339
- 40% {
340
- -webkit-transform: translateY(-50%) scale(0.9);
341
- -moz-transform: translateY(-50%) scale(0.9);
342
- -ms-transform: translateY(-50%) scale(0.9);
343
- -o-transform: translateY(-50%) scale(0.9);
344
- transform: translateY(-50%) scale(0.9);
345
- opacity: 0;
346
- }
347
- 100% {
348
- -webkit-transform: translateY(-50%) scale(0);
349
- -moz-transform: translateY(-50%) scale(0);
350
- -ms-transform: translateY(-50%) scale(0);
351
- -o-transform: translateY(-50%) scale(0);
352
- transform: translateY(-50%) scale(0);
353
- opacity: 0;
354
- }
355
- }
356
- /* --------------------------------
357
-
358
- xrotate-2
359
-
360
- -------------------------------- */
361
- .cd-headline.rotate-2 .cd-words-wrapper {
362
- -webkit-perspective: 300px;
363
- -moz-perspective: 300px;
364
- perspective: 300px;
365
- }
366
- .cd-headline.rotate-2 i, .cd-headline.rotate-2 em {
367
- display: inline-block;
368
- -webkit-backface-visibility: hidden;
369
- backface-visibility: hidden;
370
- }
371
- .cd-headline.rotate-2 i {
372
- -webkit-transform-style: preserve-3d;
373
- -moz-transform-style: preserve-3d;
374
- -ms-transform-style: preserve-3d;
375
- -o-transform-style: preserve-3d;
376
- transform-style: preserve-3d;
377
- -webkit-transform: translateZ(-20px) rotateX(90deg);
378
- -moz-transform: translateZ(-20px) rotateX(90deg);
379
- -ms-transform: translateZ(-20px) rotateX(90deg);
380
- -o-transform: translateZ(-20px) rotateX(90deg);
381
- transform: translateZ(-20px) rotateX(90deg);
382
- opacity: 0;
383
- }
384
- .is-visible .cd-headline.rotate-2 i {
385
- opacity: 1;
386
- }
387
- .cd-headline.rotate-2 i.in {
388
- -webkit-animation: cd-rotate-2-in 0.4s forwards;
389
- -moz-animation: cd-rotate-2-in 0.4s forwards;
390
- animation: cd-rotate-2-in 0.4s forwards;
391
- }
392
- .cd-headline.rotate-2 i.out {
393
- -webkit-animation: cd-rotate-2-out 0.4s forwards;
394
- -moz-animation: cd-rotate-2-out 0.4s forwards;
395
- animation: cd-rotate-2-out 0.4s forwards;
396
- }
397
- .cd-headline.rotate-2 em {
398
- -webkit-transform: translateZ(20px);
399
- -moz-transform: translateZ(20px);
400
- -ms-transform: translateZ(20px);
401
- -o-transform: translateZ(20px);
402
- transform: translateZ(20px);
403
- }
404
- .no-csstransitions .cd-headline.rotate-2 i {
405
- -webkit-transform: rotateX(0deg);
406
- -moz-transform: rotateX(0deg);
407
- -ms-transform: rotateX(0deg);
408
- -o-transform: rotateX(0deg);
409
- transform: rotateX(0deg);
410
- opacity: 0;
411
- }
412
- .no-csstransitions .cd-headline.rotate-2 i em {
413
- -webkit-transform: scale(1);
414
- -moz-transform: scale(1);
415
- -ms-transform: scale(1);
416
- -o-transform: scale(1);
417
- transform: scale(1);
418
- }
419
- .no-csstransitions .cd-headline.rotate-2 .is-visible i {
420
- opacity: 1;
421
- }
422
- @-webkit-keyframes cd-rotate-2-in {
423
- 0% {
424
- opacity: 0;
425
- -webkit-transform: translateZ(-20px) rotateX(90deg);
426
- }
427
- 60% {
428
- opacity: 1;
429
- -webkit-transform: translateZ(-20px) rotateX(-10deg);
430
- }
431
- 100% {
432
- opacity: 1;
433
- -webkit-transform: translateZ(-20px) rotateX(0deg);
434
- }
435
- }
436
- @-moz-keyframes cd-rotate-2-in {
437
- 0% {
438
- opacity: 0;
439
- -moz-transform: translateZ(-20px) rotateX(90deg);
440
- }
441
- 60% {
442
- opacity: 1;
443
- -moz-transform: translateZ(-20px) rotateX(-10deg);
444
- }
445
- 100% {
446
- opacity: 1;
447
- -moz-transform: translateZ(-20px) rotateX(0deg);
448
- }
449
- }
450
- @keyframes cd-rotate-2-in {
451
- 0% {
452
- opacity: 0;
453
- -webkit-transform: translateZ(-20px) rotateX(90deg);
454
- -moz-transform: translateZ(-20px) rotateX(90deg);
455
- -ms-transform: translateZ(-20px) rotateX(90deg);
456
- -o-transform: translateZ(-20px) rotateX(90deg);
457
- transform: translateZ(-20px) rotateX(90deg);
458
- }
459
- 60% {
460
- opacity: 1;
461
- -webkit-transform: translateZ(-20px) rotateX(-10deg);
462
- -moz-transform: translateZ(-20px) rotateX(-10deg);
463
- -ms-transform: translateZ(-20px) rotateX(-10deg);
464
- -o-transform: translateZ(-20px) rotateX(-10deg);
465
- transform: translateZ(-20px) rotateX(-10deg);
466
- }
467
- 100% {
468
- opacity: 1;
469
- -webkit-transform: translateZ(-20px) rotateX(0deg);
470
- -moz-transform: translateZ(-20px) rotateX(0deg);
471
- -ms-transform: translateZ(-20px) rotateX(0deg);
472
- -o-transform: translateZ(-20px) rotateX(0deg);
473
- transform: translateZ(-20px) rotateX(0deg);
474
- }
475
- }
476
- @-webkit-keyframes cd-rotate-2-out {
477
- 0% {
478
- opacity: 1;
479
- -webkit-transform: translateZ(-20px) rotateX(0);
480
- }
481
- 60% {
482
- opacity: 0;
483
- -webkit-transform: translateZ(-20px) rotateX(-100deg);
484
- }
485
- 100% {
486
- opacity: 0;
487
- -webkit-transform: translateZ(-20px) rotateX(-90deg);
488
- }
489
- }
490
- @-moz-keyframes cd-rotate-2-out {
491
- 0% {
492
- opacity: 1;
493
- -moz-transform: translateZ(-20px) rotateX(0);
494
- }
495
- 60% {
496
- opacity: 0;
497
- -moz-transform: translateZ(-20px) rotateX(-100deg);
498
- }
499
- 100% {
500
- opacity: 0;
501
- -moz-transform: translateZ(-20px) rotateX(-90deg);
502
- }
503
- }
504
- @keyframes cd-rotate-2-out {
505
- 0% {
506
- opacity: 1;
507
- -webkit-transform: translateZ(-20px) rotateX(0);
508
- -moz-transform: translateZ(-20px) rotateX(0);
509
- -ms-transform: translateZ(-20px) rotateX(0);
510
- -o-transform: translateZ(-20px) rotateX(0);
511
- transform: translateZ(-20px) rotateX(0);
512
- }
513
- 60% {
514
- opacity: 0;
515
- -webkit-transform: translateZ(-20px) rotateX(-100deg);
516
- -moz-transform: translateZ(-20px) rotateX(-100deg);
517
- -ms-transform: translateZ(-20px) rotateX(-100deg);
518
- -o-transform: translateZ(-20px) rotateX(-100deg);
519
- transform: translateZ(-20px) rotateX(-100deg);
520
- }
521
- 100% {
522
- opacity: 0;
523
- -webkit-transform: translateZ(-20px) rotateX(-90deg);
524
- -moz-transform: translateZ(-20px) rotateX(-90deg);
525
- -ms-transform: translateZ(-20px) rotateX(-90deg);
526
- -o-transform: translateZ(-20px) rotateX(-90deg);
527
- transform: translateZ(-20px) rotateX(-90deg);
528
- }
529
- }
530
- /* --------------------------------
531
-
532
- xloading-bar
533
-
534
- -------------------------------- */
535
- .cd-headline.loading-bar span {
536
- display: inline-block;
537
- padding: .2em 0;
538
- }
539
- .cd-headline.loading-bar .cd-words-wrapper {
540
- overflow: hidden;
541
- vertical-align: top;
542
- }
543
- .cd-headline.loading-bar .cd-words-wrapper::after {
544
- /* loading bar */
545
- content:'';
546
- position: absolute;
547
- left: 0;
548
- bottom: 0;
549
- height: 3px;
550
- width: 0;
551
- z-index: 2;
552
- -webkit-transition: width 0.3s -0.1s;
553
- -moz-transition: width 0.3s -0.1s;
554
- transition: width 0.3s -0.1s;
555
- }
556
- .cd-headline.loading-bar .cd-words-wrapper.is-loading::after {
557
- width: 100%;
558
- -webkit-transition: width 3s;
559
- -moz-transition: width 3s;
560
- transition: width 3s;
561
- }
562
- .cd-headline.loading-bar b {
563
- top: .2em;
564
- opacity: 0;
565
- -webkit-transition: opacity 0.3s;
566
- -moz-transition: opacity 0.3s;
567
- transition: opacity 0.3s;
568
- }
569
- .cd-headline.loading-bar b.is-visible {
570
- opacity: 1;
571
- top: 0;
572
- }
573
- /* --------------------------------
574
-
575
- xslide
576
-
577
- -------------------------------- */
578
- .cd-headline.slide span {
579
- display: inline-block;
580
- padding: .2em 0;
581
- }
582
- .cd-headline.slide .cd-words-wrapper {
583
- overflow: hidden;
584
- vertical-align: top;
585
- }
586
- .cd-headline.slide b {
587
- opacity: 0;
588
- top: .2em;
589
- }
590
- .cd-headline.slide b.is-visible {
591
- top: 0;
592
- opacity: 1;
593
- -webkit-animation: slide-in 0.6s;
594
- -moz-animation: slide-in 0.6s;
595
- animation: slide-in 0.6s;
596
- }
597
- .cd-headline.slide b.is-hidden {
598
- -webkit-animation: slide-out 0.6s;
599
- -moz-animation: slide-out 0.6s;
600
- animation: slide-out 0.6s;
601
- }
602
- @-webkit-keyframes slide-in {
603
- 0% {
604
- opacity: 0;
605
- -webkit-transform: translateY(-100%);
606
- }
607
- 60% {
608
- opacity: 1;
609
- -webkit-transform: translateY(20%);
610
- }
611
- 100% {
612
- opacity: 1;
613
- -webkit-transform: translateY(0);
614
- }
615
- }
616
- @-moz-keyframes slide-in {
617
- 0% {
618
- opacity: 0;
619
- -moz-transform: translateY(-100%);
620
- }
621
- 60% {
622
- opacity: 1;
623
- -moz-transform: translateY(20%);
624
- }
625
- 100% {
626
- opacity: 1;
627
- -moz-transform: translateY(0);
628
- }
629
- }
630
- @keyframes slide-in {
631
- 0% {
632
- opacity: 0;
633
- -webkit-transform: translateY(-100%);
634
- -moz-transform: translateY(-100%);
635
- -ms-transform: translateY(-100%);
636
- -o-transform: translateY(-100%);
637
- transform: translateY(-100%);
638
- }
639
- 60% {
640
- opacity: 1;
641
- -webkit-transform: translateY(20%);
642
- -moz-transform: translateY(20%);
643
- -ms-transform: translateY(20%);
644
- -o-transform: translateY(20%);
645
- transform: translateY(20%);
646
- }
647
- 100% {
648
- opacity: 1;
649
- -webkit-transform: translateY(0);
650
- -moz-transform: translateY(0);
651
- -ms-transform: translateY(0);
652
- -o-transform: translateY(0);
653
- transform: translateY(0);
654
- }
655
- }
656
- @-webkit-keyframes slide-out {
657
- 0% {
658
- opacity: 1;
659
- -webkit-transform: translateY(0);
660
- }
661
- 60% {
662
- opacity: 0;
663
- -webkit-transform: translateY(120%);
664
- }
665
- 100% {
666
- opacity: 0;
667
- -webkit-transform: translateY(100%);
668
- }
669
- }
670
- @-moz-keyframes slide-out {
671
- 0% {
672
- opacity: 1;
673
- -moz-transform: translateY(0);
674
- }
675
- 60% {
676
- opacity: 0;
677
- -moz-transform: translateY(120%);
678
- }
679
- 100% {
680
- opacity: 0;
681
- -moz-transform: translateY(100%);
682
- }
683
- }
684
- @keyframes slide-out {
685
- 0% {
686
- opacity: 1;
687
- -webkit-transform: translateY(0);
688
- -moz-transform: translateY(0);
689
- -ms-transform: translateY(0);
690
- -o-transform: translateY(0);
691
- transform: translateY(0);
692
- }
693
- 60% {
694
- opacity: 0;
695
- -webkit-transform: translateY(120%);
696
- -moz-transform: translateY(120%);
697
- -ms-transform: translateY(120%);
698
- -o-transform: translateY(120%);
699
- transform: translateY(120%);
700
- }
701
- 100% {
702
- opacity: 0;
703
- -webkit-transform: translateY(100%);
704
- -moz-transform: translateY(100%);
705
- -ms-transform: translateY(100%);
706
- -o-transform: translateY(100%);
707
- transform: translateY(100%);
708
- }
709
- }
710
- /* --------------------------------
711
-
712
- xclip
713
-
714
- -------------------------------- */
715
- .cd-headline.clip span {
716
- display: inline-block;
717
- padding: .2em 0;
718
- }
719
- .cd-headline.clip .cd-words-wrapper {
720
- overflow: hidden;
721
- vertical-align: top;
722
- }
723
- .cd-headline.clip .cd-words-wrapper::after {
724
- /* line */
725
- content:'';
726
- position: absolute;
727
- top: 0;
728
- right: 0;
729
- width: 2px;
730
- height: 100%;
731
- background-color: #aebcb9;
732
- }
733
- .cd-headline.clip b {
734
- opacity: 0;
735
- }
736
- .cd-headline.clip b.is-visible {
737
- opacity: 1;
738
- }
739
- /* --------------------------------
740
-
741
- xzoom
742
-
743
- -------------------------------- */
744
- .cd-headline.zoom .cd-words-wrapper {
745
- -webkit-perspective: 300px;
746
- -moz-perspective: 300px;
747
- perspective: 300px;
748
- }
749
- .cd-headline.zoom b {
750
- opacity: 0;
751
- }
752
- .cd-headline.zoom b.is-visible {
753
- opacity: 1;
754
- -webkit-animation: zoom-in 0.8s;
755
- -moz-animation: zoom-in 0.8s;
756
- animation: zoom-in 0.8s;
757
- }
758
- .cd-headline.zoom b.is-hidden {
759
- -webkit-animation: zoom-out 0.8s;
760
- -moz-animation: zoom-out 0.8s;
761
- animation: zoom-out 0.8s;
762
- }
763
- @-webkit-keyframes zoom-in {
764
- 0% {
765
- opacity: 0;
766
- -webkit-transform: translateZ(100px);
767
- }
768
- 100% {
769
- opacity: 1;
770
- -webkit-transform: translateZ(0);
771
- }
772
- }
773
- @-moz-keyframes zoom-in {
774
- 0% {
775
- opacity: 0;
776
- -moz-transform: translateZ(100px);
777
- }
778
- 100% {
779
- opacity: 1;
780
- -moz-transform: translateZ(0);
781
- }
782
- }
783
- @keyframes zoom-in {
784
- 0% {
785
- opacity: 0;
786
- -webkit-transform: translateZ(100px);
787
- -moz-transform: translateZ(100px);
788
- -ms-transform: translateZ(100px);
789
- -o-transform: translateZ(100px);
790
- transform: translateZ(100px);
791
- }
792
- 100% {
793
- opacity: 1;
794
- -webkit-transform: translateZ(0);
795
- -moz-transform: translateZ(0);
796
- -ms-transform: translateZ(0);
797
- -o-transform: translateZ(0);
798
- transform: translateZ(0);
799
- }
800
- }
801
- @-webkit-keyframes zoom-out {
802
- 0% {
803
- opacity: 1;
804
- -webkit-transform: translateZ(0);
805
- }
806
- 100% {
807
- opacity: 0;
808
- -webkit-transform: translateZ(-100px);
809
- }
810
- }
811
- @-moz-keyframes zoom-out {
812
- 0% {
813
- opacity: 1;
814
- -moz-transform: translateZ(0);
815
- }
816
- 100% {
817
- opacity: 0;
818
- -moz-transform: translateZ(-100px);
819
- }
820
- }
821
- @keyframes zoom-out {
822
- 0% {
823
- opacity: 1;
824
- -webkit-transform: translateZ(0);
825
- -moz-transform: translateZ(0);
826
- -ms-transform: translateZ(0);
827
- -o-transform: translateZ(0);
828
- transform: translateZ(0);
829
- }
830
- 100% {
831
- opacity: 0;
832
- -webkit-transform: translateZ(-100px);
833
- -moz-transform: translateZ(-100px);
834
- -ms-transform: translateZ(-100px);
835
- -o-transform: translateZ(-100px);
836
- transform: translateZ(-100px);
837
- }
838
- }
839
- /* --------------------------------
840
-
841
- xrotate-3
842
-
843
- -------------------------------- */
844
- .cd-headline.rotate-3 .cd-words-wrapper {
845
- -webkit-perspective: 300px;
846
- -moz-perspective: 300px;
847
- perspective: 300px;
848
- }
849
- .cd-headline.rotate-3 i {
850
- display: inline-block;
851
- -webkit-transform: rotateY(180deg);
852
- -moz-transform: rotateY(180deg);
853
- -ms-transform: rotateY(180deg);
854
- -o-transform: rotateY(180deg);
855
- transform: rotateY(180deg);
856
- -webkit-backface-visibility: hidden;
857
- backface-visibility: hidden;
858
- }
859
- .is-visible .cd-headline.rotate-3 i {
860
- -webkit-transform: rotateY(0deg);
861
- -moz-transform: rotateY(0deg);
862
- -ms-transform: rotateY(0deg);
863
- -o-transform: rotateY(0deg);
864
- transform: rotateY(0deg);
865
- }
866
- .cd-headline.rotate-3 i.in {
867
- -webkit-animation: cd-rotate-3-in 0.6s forwards;
868
- -moz-animation: cd-rotate-3-in 0.6s forwards;
869
- animation: cd-rotate-3-in 0.6s forwards;
870
- }
871
- .cd-headline.rotate-3 i.out {
872
- -webkit-animation: cd-rotate-3-out 0.6s forwards;
873
- -moz-animation: cd-rotate-3-out 0.6s forwards;
874
- animation: cd-rotate-3-out 0.6s forwards;
875
- }
876
- .no-csstransitions .cd-headline.rotate-3 i {
877
- -webkit-transform: rotateY(0deg);
878
- -moz-transform: rotateY(0deg);
879
- -ms-transform: rotateY(0deg);
880
- -o-transform: rotateY(0deg);
881
- transform: rotateY(0deg);
882
- opacity: 0;
883
- }
884
- .no-csstransitions .cd-headline.rotate-3 .is-visible i {
885
- opacity: 1;
886
- }
887
- @-webkit-keyframes cd-rotate-3-in {
888
- 0% {
889
- -webkit-transform: rotateY(180deg);
890
- }
891
- 100% {
892
- -webkit-transform: rotateY(0deg);
893
- }
894
- }
895
- @-moz-keyframes cd-rotate-3-in {
896
- 0% {
897
- -moz-transform: rotateY(180deg);
898
- }
899
- 100% {
900
- -moz-transform: rotateY(0deg);
901
- }
902
- }
903
- @keyframes cd-rotate-3-in {
904
- 0% {
905
- -webkit-transform: rotateY(180deg);
906
- -moz-transform: rotateY(180deg);
907
- -ms-transform: rotateY(180deg);
908
- -o-transform: rotateY(180deg);
909
- transform: rotateY(180deg);
910
- }
911
- 100% {
912
- -webkit-transform: rotateY(0deg);
913
- -moz-transform: rotateY(0deg);
914
- -ms-transform: rotateY(0deg);
915
- -o-transform: rotateY(0deg);
916
- transform: rotateY(0deg);
917
- }
918
- }
919
- @-webkit-keyframes cd-rotate-3-out {
920
- 0% {
921
- -webkit-transform: rotateY(0);
922
- }
923
- 100% {
924
- -webkit-transform: rotateY(-180deg);
925
- }
926
- }
927
- @-moz-keyframes cd-rotate-3-out {
928
- 0% {
929
- -moz-transform: rotateY(0);
930
- }
931
- 100% {
932
- -moz-transform: rotateY(-180deg);
933
- }
934
- }
935
- @keyframes cd-rotate-3-out {
936
- 0% {
937
- -webkit-transform: rotateY(0);
938
- -moz-transform: rotateY(0);
939
- -ms-transform: rotateY(0);
940
- -o-transform: rotateY(0);
941
- transform: rotateY(0);
942
- }
943
- 100% {
944
- -webkit-transform: rotateY(-180deg);
945
- -moz-transform: rotateY(-180deg);
946
- -ms-transform: rotateY(-180deg);
947
- -o-transform: rotateY(-180deg);
948
- transform: rotateY(-180deg);
949
- }
950
- }
951
- /* --------------------------------
952
-
953
- xscale
954
-
955
- -------------------------------- */
956
- .cd-headline.scale i {
957
- display: inline-block;
958
- opacity: 0;
959
- -webkit-transform: scale(0);
960
- -moz-transform: scale(0);
961
- -ms-transform: scale(0);
962
- -o-transform: scale(0);
963
- transform: scale(0);
964
- }
965
- .is-visible .cd-headline.scale i {
966
- opacity: 1;
967
- }
968
- .cd-headline.scale i.in {
969
- -webkit-animation: scale-up 0.6s forwards;
970
- -moz-animation: scale-up 0.6s forwards;
971
- animation: scale-up 0.6s forwards;
972
- }
973
- .cd-headline.scale i.out {
974
- -webkit-animation: scale-down 0.6s forwards;
975
- -moz-animation: scale-down 0.6s forwards;
976
- animation: scale-down 0.6s forwards;
977
- }
978
- .no-csstransitions .cd-headline.scale i {
979
- -webkit-transform: scale(1);
980
- -moz-transform: scale(1);
981
- -ms-transform: scale(1);
982
- -o-transform: scale(1);
983
- transform: scale(1);
984
- opacity: 0;
985
- }
986
- .no-csstransitions .cd-headline.scale .is-visible i {
987
- opacity: 1;
988
- }
989
- @-webkit-keyframes scale-up {
990
- 0% {
991
- -webkit-transform: scale(0);
992
- opacity: 0;
993
- }
994
- 60% {
995
- -webkit-transform: scale(1.2);
996
- opacity: 1;
997
- }
998
- 100% {
999
- -webkit-transform: scale(1);
1000
- opacity: 1;
1001
- }
1002
- }
1003
- @-moz-keyframes scale-up {
1004
- 0% {
1005
- -moz-transform: scale(0);
1006
- opacity: 0;
1007
- }
1008
- 60% {
1009
- -moz-transform: scale(1.2);
1010
- opacity: 1;
1011
- }
1012
- 100% {
1013
- -moz-transform: scale(1);
1014
- opacity: 1;
1015
- }
1016
- }
1017
- @keyframes scale-up {
1018
- 0% {
1019
- -webkit-transform: scale(0);
1020
- -moz-transform: scale(0);
1021
- -ms-transform: scale(0);
1022
- -o-transform: scale(0);
1023
- transform: scale(0);
1024
- opacity: 0;
1025
- }
1026
- 60% {
1027
- -webkit-transform: scale(1.2);
1028
- -moz-transform: scale(1.2);
1029
- -ms-transform: scale(1.2);
1030
- -o-transform: scale(1.2);
1031
- transform: scale(1.2);
1032
- opacity: 1;
1033
- }
1034
- 100% {
1035
- -webkit-transform: scale(1);
1036
- -moz-transform: scale(1);
1037
- -ms-transform: scale(1);
1038
- -o-transform: scale(1);
1039
- transform: scale(1);
1040
- opacity: 1;
1041
- }
1042
- }
1043
- @-webkit-keyframes scale-down {
1044
- 0% {
1045
- -webkit-transform: scale(1);
1046
- opacity: 1;
1047
- }
1048
- 60% {
1049
- -webkit-transform: scale(0);
1050
- opacity: 0;
1051
- }
1052
- }
1053
- @-moz-keyframes scale-down {
1054
- 0% {
1055
- -moz-transform: scale(1);
1056
- opacity: 1;
1057
- }
1058
- 60% {
1059
- -moz-transform: scale(0);
1060
- opacity: 0;
1061
- }
1062
- }
1063
- @keyframes scale-down {
1064
- 0% {
1065
- -webkit-transform: scale(1);
1066
- -moz-transform: scale(1);
1067
- -ms-transform: scale(1);
1068
- -o-transform: scale(1);
1069
- transform: scale(1);
1070
- opacity: 1;
1071
- }
1072
- 60% {
1073
- -webkit-transform: scale(0);
1074
- -moz-transform: scale(0);
1075
- -ms-transform: scale(0);
1076
- -o-transform: scale(0);
1077
- transform: scale(0);
1078
- opacity: 0;
1079
- }
1080
- }
1081
- /* --------------------------------
1082
-
1083
- xpush
1084
-
1085
- -------------------------------- */
1086
- .cd-headline.push b {
1087
- opacity: 0;
1088
- }
1089
- .cd-headline.push b.is-visible {
1090
- opacity: 1;
1091
- -webkit-animation: push-in 0.6s;
1092
- -moz-animation: push-in 0.6s;
1093
- animation: push-in 0.6s;
1094
- }
1095
- .cd-headline.push b.is-hidden {
1096
- -webkit-animation: push-out 0.6s;
1097
- -moz-animation: push-out 0.6s;
1098
- animation: push-out 0.6s;
1099
- }
1100
- @-webkit-keyframes push-in {
1101
- 0% {
1102
- opacity: 0;
1103
- -webkit-transform: translateX(-100%);
1104
- }
1105
- 60% {
1106
- opacity: 1;
1107
- -webkit-transform: translateX(10%);
1108
- }
1109
- 100% {
1110
- opacity: 1;
1111
- -webkit-transform: translateX(0);
1112
- }
1113
- }
1114
- @-moz-keyframes push-in {
1115
- 0% {
1116
- opacity: 0;
1117
- -moz-transform: translateX(-100%);
1118
- }
1119
- 60% {
1120
- opacity: 1;
1121
- -moz-transform: translateX(10%);
1122
- }
1123
- 100% {
1124
- opacity: 1;
1125
- -moz-transform: translateX(0);
1126
- }
1127
- }
1128
- @keyframes push-in {
1129
- 0% {
1130
- opacity: 0;
1131
- -webkit-transform: translateX(-100%);
1132
- -moz-transform: translateX(-100%);
1133
- -ms-transform: translateX(-100%);
1134
- -o-transform: translateX(-100%);
1135
- transform: translateX(-100%);
1136
- }
1137
- 60% {
1138
- opacity: 1;
1139
- -webkit-transform: translateX(10%);
1140
- -moz-transform: translateX(10%);
1141
- -ms-transform: translateX(10%);
1142
- -o-transform: translateX(10%);
1143
- transform: translateX(10%);
1144
- }
1145
- 100% {
1146
- opacity: 1;
1147
- -webkit-transform: translateX(0);
1148
- -moz-transform: translateX(0);
1149
- -ms-transform: translateX(0);
1150
- -o-transform: translateX(0);
1151
- transform: translateX(0);
1152
- }
1153
- }
1154
- @-webkit-keyframes push-out {
1155
- 0% {
1156
- opacity: 1;
1157
- -webkit-transform: translateX(0);
1158
- }
1159
- 60% {
1160
- opacity: 0;
1161
- -webkit-transform: translateX(110%);
1162
- }
1163
- 100% {
1164
- opacity: 0;
1165
- -webkit-transform: translateX(100%);
1166
- }
1167
- }
1168
- @-moz-keyframes push-out {
1169
- 0% {
1170
- opacity: 1;
1171
- -moz-transform: translateX(0);
1172
- }
1173
- 60% {
1174
- opacity: 0;
1175
- -moz-transform: translateX(110%);
1176
- }
1177
- 100% {
1178
- opacity: 0;
1179
- -moz-transform: translateX(100%);
1180
- }
1181
- }
1182
- @keyframes push-out {
1183
- 0% {
1184
- opacity: 1;
1185
- -webkit-transform: translateX(0);
1186
- -moz-transform: translateX(0);
1187
- -ms-transform: translateX(0);
1188
- -o-transform: translateX(0);
1189
- transform: translateX(0);
1190
- }
1191
- 60% {
1192
- opacity: 0;
1193
- -webkit-transform: translateX(110%);
1194
- -moz-transform: translateX(110%);
1195
- -ms-transform: translateX(110%);
1196
- -o-transform: translateX(110%);
1197
- transform: translateX(110%);
1198
- }
1199
- 100% {
1200
- opacity: 0;
1201
- -webkit-transform: translateX(100%);
1202
- -moz-transform: translateX(100%);
1203
- -ms-transform: translateX(100%);
1204
- -o-transform: translateX(100%);
1205
- transform: translateX(100%);
1206
- }
1207
- }
1
+ .cd-title {
2
+ position: relative;
3
+ height: 160px;
4
+ line-height: 230px;
5
+ text-align: center;
6
+ }
7
+ .cd-title h1 {
8
+ font-size: 2.4rem;
9
+ font-weight: 700;
10
+ }
11
+ @media only screen and (min-width: 768px) {
12
+ .cd-title {
13
+ line-height: 250px;
14
+ }
15
+ }
16
+ @media only screen and (min-width: 1170px) {
17
+ .cd-title {
18
+ height: 200px;
19
+ line-height: 300px;
20
+ }
21
+ .cd-title h1 {
22
+ font-size: 3rem;
23
+ }
24
+ }
25
+ .cd-intro {
26
+ /*width: 90%;*/
27
+ /*max-width: 768px;*/
28
+ /*text-align: center;*/
29
+ }
30
+ .cd-intro {
31
+ /*margin: 4em auto;*/
32
+ }
33
+ @media only screen and (min-width: 768px) {
34
+ .cd-intro {
35
+ /*margin: 5em auto;*/
36
+ }
37
+ }
38
+ @media only screen and (min-width: 1170px) {
39
+ .cd-intro {
40
+ /*margin: 6em auto;*/
41
+ }
42
+ }
43
+ .cd-headline {
44
+ font-size: 3rem;
45
+ line-height: 1.2;
46
+ }
47
+ @media only screen and (min-width: 768px) {
48
+ .cd-headline {
49
+ font-size: 4.4rem;
50
+ font-weight: 300;
51
+ }
52
+ }
53
+ @media only screen and (min-width: 1170px) {
54
+ .cd-headline {
55
+ font-size: 6rem;
56
+ }
57
+ }
58
+ .cd-words-wrapper {
59
+ display: inline-block;
60
+ position: relative;
61
+ text-align: left;
62
+ }
63
+ .cd-words-wrapper b {
64
+ display: inline-block;
65
+ position: absolute;
66
+ white-space: nowrap;
67
+ left: 0;
68
+ top: 0;
69
+ }
70
+ .cd-words-wrapper b.is-visible {
71
+ position: relative;
72
+ }
73
+ .no-js .cd-words-wrapper b {
74
+ opacity: 0;
75
+ }
76
+ .no-js .cd-words-wrapper b.is-visible {
77
+ opacity: 1;
78
+ }
79
+ /* --------------------------------
80
+
81
+ xrotate-1
82
+
83
+ -------------------------------- */
84
+ .cd-headline.rotate-1 .cd-words-wrapper {
85
+ -webkit-perspective: 300px;
86
+ -moz-perspective: 300px;
87
+ perspective: 300px;
88
+ }
89
+ .cd-headline.rotate-1 b {
90
+ opacity: 0;
91
+ -webkit-transform-origin: 50% 100%;
92
+ -moz-transform-origin: 50% 100%;
93
+ -ms-transform-origin: 50% 100%;
94
+ -o-transform-origin: 50% 100%;
95
+ transform-origin: 50% 100%;
96
+ -webkit-transform: rotateX(180deg);
97
+ -moz-transform: rotateX(180deg);
98
+ -ms-transform: rotateX(180deg);
99
+ -o-transform: rotateX(180deg);
100
+ transform: rotateX(180deg);
101
+ }
102
+ .cd-headline.rotate-1 b.is-visible {
103
+ opacity: 1;
104
+ -webkit-transform: rotateX(0deg);
105
+ -moz-transform: rotateX(0deg);
106
+ -ms-transform: rotateX(0deg);
107
+ -o-transform: rotateX(0deg);
108
+ transform: rotateX(0deg);
109
+ -webkit-animation: cd-rotate-1-in 1.2s;
110
+ -moz-animation: cd-rotate-1-in 1.2s;
111
+ animation: cd-rotate-1-in 1.2s;
112
+ }
113
+ .cd-headline.rotate-1 b.is-hidden {
114
+ -webkit-transform: rotateX(180deg);
115
+ -moz-transform: rotateX(180deg);
116
+ -ms-transform: rotateX(180deg);
117
+ -o-transform: rotateX(180deg);
118
+ transform: rotateX(180deg);
119
+ -webkit-animation: cd-rotate-1-out 1.2s;
120
+ -moz-animation: cd-rotate-1-out 1.2s;
121
+ animation: cd-rotate-1-out 1.2s;
122
+ }
123
+ @-webkit-keyframes cd-rotate-1-in {
124
+ 0% {
125
+ -webkit-transform: rotateX(180deg);
126
+ opacity: 0;
127
+ }
128
+ 35% {
129
+ -webkit-transform: rotateX(120deg);
130
+ opacity: 0;
131
+ }
132
+ 65% {
133
+ opacity: 0;
134
+ }
135
+ 100% {
136
+ -webkit-transform: rotateX(360deg);
137
+ opacity: 1;
138
+ }
139
+ }
140
+ @-moz-keyframes cd-rotate-1-in {
141
+ 0% {
142
+ -moz-transform: rotateX(180deg);
143
+ opacity: 0;
144
+ }
145
+ 35% {
146
+ -moz-transform: rotateX(120deg);
147
+ opacity: 0;
148
+ }
149
+ 65% {
150
+ opacity: 0;
151
+ }
152
+ 100% {
153
+ -moz-transform: rotateX(360deg);
154
+ opacity: 1;
155
+ }
156
+ }
157
+ @keyframes cd-rotate-1-in {
158
+ 0% {
159
+ -webkit-transform: rotateX(180deg);
160
+ -moz-transform: rotateX(180deg);
161
+ -ms-transform: rotateX(180deg);
162
+ -o-transform: rotateX(180deg);
163
+ transform: rotateX(180deg);
164
+ opacity: 0;
165
+ }
166
+ 35% {
167
+ -webkit-transform: rotateX(120deg);
168
+ -moz-transform: rotateX(120deg);
169
+ -ms-transform: rotateX(120deg);
170
+ -o-transform: rotateX(120deg);
171
+ transform: rotateX(120deg);
172
+ opacity: 0;
173
+ }
174
+ 65% {
175
+ opacity: 0;
176
+ }
177
+ 100% {
178
+ -webkit-transform: rotateX(360deg);
179
+ -moz-transform: rotateX(360deg);
180
+ -ms-transform: rotateX(360deg);
181
+ -o-transform: rotateX(360deg);
182
+ transform: rotateX(360deg);
183
+ opacity: 1;
184
+ }
185
+ }
186
+ @-webkit-keyframes cd-rotate-1-out {
187
+ 0% {
188
+ -webkit-transform: rotateX(0deg);
189
+ opacity: 1;
190
+ }
191
+ 35% {
192
+ -webkit-transform: rotateX(-40deg);
193
+ opacity: 1;
194
+ }
195
+ 65% {
196
+ opacity: 0;
197
+ }
198
+ 100% {
199
+ -webkit-transform: rotateX(180deg);
200
+ opacity: 0;
201
+ }
202
+ }
203
+ @-moz-keyframes cd-rotate-1-out {
204
+ 0% {
205
+ -moz-transform: rotateX(0deg);
206
+ opacity: 1;
207
+ }
208
+ 35% {
209
+ -moz-transform: rotateX(-40deg);
210
+ opacity: 1;
211
+ }
212
+ 65% {
213
+ opacity: 0;
214
+ }
215
+ 100% {
216
+ -moz-transform: rotateX(180deg);
217
+ opacity: 0;
218
+ }
219
+ }
220
+ @keyframes cd-rotate-1-out {
221
+ 0% {
222
+ -webkit-transform: rotateX(0deg);
223
+ -moz-transform: rotateX(0deg);
224
+ -ms-transform: rotateX(0deg);
225
+ -o-transform: rotateX(0deg);
226
+ transform: rotateX(0deg);
227
+ opacity: 1;
228
+ }
229
+ 35% {
230
+ -webkit-transform: rotateX(-40deg);
231
+ -moz-transform: rotateX(-40deg);
232
+ -ms-transform: rotateX(-40deg);
233
+ -o-transform: rotateX(-40deg);
234
+ transform: rotateX(-40deg);
235
+ opacity: 1;
236
+ }
237
+ 65% {
238
+ opacity: 0;
239
+ }
240
+ 100% {
241
+ -webkit-transform: rotateX(180deg);
242
+ -moz-transform: rotateX(180deg);
243
+ -ms-transform: rotateX(180deg);
244
+ -o-transform: rotateX(180deg);
245
+ transform: rotateX(180deg);
246
+ opacity: 0;
247
+ }
248
+ }
249
+ /* --------------------------------
250
+
251
+ xtype
252
+
253
+ -------------------------------- */
254
+ .cd-headline.type .cd-words-wrapper {
255
+ vertical-align: top;
256
+ overflow: hidden;
257
+ }
258
+ .cd-headline.type .cd-words-wrapper::after {
259
+ /* vertical bar */
260
+ content:'';
261
+ position: absolute;
262
+ right: 0;
263
+ top: 50%;
264
+ bottom: auto;
265
+ -webkit-transform: translateY(-50%);
266
+ -moz-transform: translateY(-50%);
267
+ -ms-transform: translateY(-50%);
268
+ -o-transform: translateY(-50%);
269
+ transform: translateY(-50%);
270
+ height: 90%;
271
+ width: 1px;
272
+ background-color: #aebcb9;
273
+ }
274
+ .cd-headline.type .cd-words-wrapper.waiting::after {
275
+ -webkit-animation: cd-pulse 1s infinite;
276
+ -moz-animation: cd-pulse 1s infinite;
277
+ animation: cd-pulse 1s infinite;
278
+ }
279
+ .cd-headline.type .cd-words-wrapper.selected {
280
+ background-color: #aebcb9;
281
+ }
282
+ .cd-headline.type .cd-words-wrapper.selected::after {
283
+ visibility: hidden;
284
+ }
285
+ .cd-headline.type .cd-words-wrapper.selected b {
286
+ color: #0d0d0d;
287
+ }
288
+ .cd-headline.type b {
289
+ visibility: hidden;
290
+ }
291
+ .cd-headline.type b.is-visible {
292
+ visibility: visible;
293
+ }
294
+ .cd-headline.type i {
295
+ position: absolute;
296
+ visibility: hidden;
297
+ }
298
+ .cd-headline.type i.in {
299
+ position: relative;
300
+ visibility: visible;
301
+ }
302
+ @-webkit-keyframes cd-pulse {
303
+ 0% {
304
+ -webkit-transform: translateY(-50%) scale(1);
305
+ opacity: 1;
306
+ }
307
+ 40% {
308
+ -webkit-transform: translateY(-50%) scale(0.9);
309
+ opacity: 0;
310
+ }
311
+ 100% {
312
+ -webkit-transform: translateY(-50%) scale(0);
313
+ opacity: 0;
314
+ }
315
+ }
316
+ @-moz-keyframes cd-pulse {
317
+ 0% {
318
+ -moz-transform: translateY(-50%) scale(1);
319
+ opacity: 1;
320
+ }
321
+ 40% {
322
+ -moz-transform: translateY(-50%) scale(0.9);
323
+ opacity: 0;
324
+ }
325
+ 100% {
326
+ -moz-transform: translateY(-50%) scale(0);
327
+ opacity: 0;
328
+ }
329
+ }
330
+ @keyframes cd-pulse {
331
+ 0% {
332
+ -webkit-transform: translateY(-50%) scale(1);
333
+ -moz-transform: translateY(-50%) scale(1);
334
+ -ms-transform: translateY(-50%) scale(1);
335
+ -o-transform: translateY(-50%) scale(1);
336
+ transform: translateY(-50%) scale(1);
337
+ opacity: 1;
338
+ }
339
+ 40% {
340
+ -webkit-transform: translateY(-50%) scale(0.9);
341
+ -moz-transform: translateY(-50%) scale(0.9);
342
+ -ms-transform: translateY(-50%) scale(0.9);
343
+ -o-transform: translateY(-50%) scale(0.9);
344
+ transform: translateY(-50%) scale(0.9);
345
+ opacity: 0;
346
+ }
347
+ 100% {
348
+ -webkit-transform: translateY(-50%) scale(0);
349
+ -moz-transform: translateY(-50%) scale(0);
350
+ -ms-transform: translateY(-50%) scale(0);
351
+ -o-transform: translateY(-50%) scale(0);
352
+ transform: translateY(-50%) scale(0);
353
+ opacity: 0;
354
+ }
355
+ }
356
+ /* --------------------------------
357
+
358
+ xrotate-2
359
+
360
+ -------------------------------- */
361
+ .cd-headline.rotate-2 .cd-words-wrapper {
362
+ -webkit-perspective: 300px;
363
+ -moz-perspective: 300px;
364
+ perspective: 300px;
365
+ }
366
+ .cd-headline.rotate-2 i, .cd-headline.rotate-2 em {
367
+ display: inline-block;
368
+ -webkit-backface-visibility: hidden;
369
+ backface-visibility: hidden;
370
+ }
371
+ .cd-headline.rotate-2 i {
372
+ -webkit-transform-style: preserve-3d;
373
+ -moz-transform-style: preserve-3d;
374
+ -ms-transform-style: preserve-3d;
375
+ -o-transform-style: preserve-3d;
376
+ transform-style: preserve-3d;
377
+ -webkit-transform: translateZ(-20px) rotateX(90deg);
378
+ -moz-transform: translateZ(-20px) rotateX(90deg);
379
+ -ms-transform: translateZ(-20px) rotateX(90deg);
380
+ -o-transform: translateZ(-20px) rotateX(90deg);
381
+ transform: translateZ(-20px) rotateX(90deg);
382
+ opacity: 0;
383
+ }
384
+ .is-visible .cd-headline.rotate-2 i {
385
+ opacity: 1;
386
+ }
387
+ .cd-headline.rotate-2 i.in {
388
+ -webkit-animation: cd-rotate-2-in 0.4s forwards;
389
+ -moz-animation: cd-rotate-2-in 0.4s forwards;
390
+ animation: cd-rotate-2-in 0.4s forwards;
391
+ }
392
+ .cd-headline.rotate-2 i.out {
393
+ -webkit-animation: cd-rotate-2-out 0.4s forwards;
394
+ -moz-animation: cd-rotate-2-out 0.4s forwards;
395
+ animation: cd-rotate-2-out 0.4s forwards;
396
+ }
397
+ .cd-headline.rotate-2 em {
398
+ -webkit-transform: translateZ(20px);
399
+ -moz-transform: translateZ(20px);
400
+ -ms-transform: translateZ(20px);
401
+ -o-transform: translateZ(20px);
402
+ transform: translateZ(20px);
403
+ }
404
+ .no-csstransitions .cd-headline.rotate-2 i {
405
+ -webkit-transform: rotateX(0deg);
406
+ -moz-transform: rotateX(0deg);
407
+ -ms-transform: rotateX(0deg);
408
+ -o-transform: rotateX(0deg);
409
+ transform: rotateX(0deg);
410
+ opacity: 0;
411
+ }
412
+ .no-csstransitions .cd-headline.rotate-2 i em {
413
+ -webkit-transform: scale(1);
414
+ -moz-transform: scale(1);
415
+ -ms-transform: scale(1);
416
+ -o-transform: scale(1);
417
+ transform: scale(1);
418
+ }
419
+ .no-csstransitions .cd-headline.rotate-2 .is-visible i {
420
+ opacity: 1;
421
+ }
422
+ @-webkit-keyframes cd-rotate-2-in {
423
+ 0% {
424
+ opacity: 0;
425
+ -webkit-transform: translateZ(-20px) rotateX(90deg);
426
+ }
427
+ 60% {
428
+ opacity: 1;
429
+ -webkit-transform: translateZ(-20px) rotateX(-10deg);
430
+ }
431
+ 100% {
432
+ opacity: 1;
433
+ -webkit-transform: translateZ(-20px) rotateX(0deg);
434
+ }
435
+ }
436
+ @-moz-keyframes cd-rotate-2-in {
437
+ 0% {
438
+ opacity: 0;
439
+ -moz-transform: translateZ(-20px) rotateX(90deg);
440
+ }
441
+ 60% {
442
+ opacity: 1;
443
+ -moz-transform: translateZ(-20px) rotateX(-10deg);
444
+ }
445
+ 100% {
446
+ opacity: 1;
447
+ -moz-transform: translateZ(-20px) rotateX(0deg);
448
+ }
449
+ }
450
+ @keyframes cd-rotate-2-in {
451
+ 0% {
452
+ opacity: 0;
453
+ -webkit-transform: translateZ(-20px) rotateX(90deg);
454
+ -moz-transform: translateZ(-20px) rotateX(90deg);
455
+ -ms-transform: translateZ(-20px) rotateX(90deg);
456
+ -o-transform: translateZ(-20px) rotateX(90deg);
457
+ transform: translateZ(-20px) rotateX(90deg);
458
+ }
459
+ 60% {
460
+ opacity: 1;
461
+ -webkit-transform: translateZ(-20px) rotateX(-10deg);
462
+ -moz-transform: translateZ(-20px) rotateX(-10deg);
463
+ -ms-transform: translateZ(-20px) rotateX(-10deg);
464
+ -o-transform: translateZ(-20px) rotateX(-10deg);
465
+ transform: translateZ(-20px) rotateX(-10deg);
466
+ }
467
+ 100% {
468
+ opacity: 1;
469
+ -webkit-transform: translateZ(-20px) rotateX(0deg);
470
+ -moz-transform: translateZ(-20px) rotateX(0deg);
471
+ -ms-transform: translateZ(-20px) rotateX(0deg);
472
+ -o-transform: translateZ(-20px) rotateX(0deg);
473
+ transform: translateZ(-20px) rotateX(0deg);
474
+ }
475
+ }
476
+ @-webkit-keyframes cd-rotate-2-out {
477
+ 0% {
478
+ opacity: 1;
479
+ -webkit-transform: translateZ(-20px) rotateX(0);
480
+ }
481
+ 60% {
482
+ opacity: 0;
483
+ -webkit-transform: translateZ(-20px) rotateX(-100deg);
484
+ }
485
+ 100% {
486
+ opacity: 0;
487
+ -webkit-transform: translateZ(-20px) rotateX(-90deg);
488
+ }
489
+ }
490
+ @-moz-keyframes cd-rotate-2-out {
491
+ 0% {
492
+ opacity: 1;
493
+ -moz-transform: translateZ(-20px) rotateX(0);
494
+ }
495
+ 60% {
496
+ opacity: 0;
497
+ -moz-transform: translateZ(-20px) rotateX(-100deg);
498
+ }
499
+ 100% {
500
+ opacity: 0;
501
+ -moz-transform: translateZ(-20px) rotateX(-90deg);
502
+ }
503
+ }
504
+ @keyframes cd-rotate-2-out {
505
+ 0% {
506
+ opacity: 1;
507
+ -webkit-transform: translateZ(-20px) rotateX(0);
508
+ -moz-transform: translateZ(-20px) rotateX(0);
509
+ -ms-transform: translateZ(-20px) rotateX(0);
510
+ -o-transform: translateZ(-20px) rotateX(0);
511
+ transform: translateZ(-20px) rotateX(0);
512
+ }
513
+ 60% {
514
+ opacity: 0;
515
+ -webkit-transform: translateZ(-20px) rotateX(-100deg);
516
+ -moz-transform: translateZ(-20px) rotateX(-100deg);
517
+ -ms-transform: translateZ(-20px) rotateX(-100deg);
518
+ -o-transform: translateZ(-20px) rotateX(-100deg);
519
+ transform: translateZ(-20px) rotateX(-100deg);
520
+ }
521
+ 100% {
522
+ opacity: 0;
523
+ -webkit-transform: translateZ(-20px) rotateX(-90deg);
524
+ -moz-transform: translateZ(-20px) rotateX(-90deg);
525
+ -ms-transform: translateZ(-20px) rotateX(-90deg);
526
+ -o-transform: translateZ(-20px) rotateX(-90deg);
527
+ transform: translateZ(-20px) rotateX(-90deg);
528
+ }
529
+ }
530
+ /* --------------------------------
531
+
532
+ xloading-bar
533
+
534
+ -------------------------------- */
535
+ .cd-headline.loading-bar span {
536
+ display: inline-block;
537
+ padding: .2em 0;
538
+ }
539
+ .cd-headline.loading-bar .cd-words-wrapper {
540
+ overflow: hidden;
541
+ vertical-align: top;
542
+ }
543
+ .cd-headline.loading-bar .cd-words-wrapper::after {
544
+ /* loading bar */
545
+ content:'';
546
+ position: absolute;
547
+ left: 0;
548
+ bottom: 0;
549
+ height: 3px;
550
+ width: 0;
551
+ z-index: 2;
552
+ -webkit-transition: width 0.3s -0.1s;
553
+ -moz-transition: width 0.3s -0.1s;
554
+ transition: width 0.3s -0.1s;
555
+ }
556
+ .cd-headline.loading-bar .cd-words-wrapper.is-loading::after {
557
+ width: 100%;
558
+ -webkit-transition: width 3s;
559
+ -moz-transition: width 3s;
560
+ transition: width 3s;
561
+ }
562
+ .cd-headline.loading-bar b {
563
+ top: .2em;
564
+ opacity: 0;
565
+ -webkit-transition: opacity 0.3s;
566
+ -moz-transition: opacity 0.3s;
567
+ transition: opacity 0.3s;
568
+ }
569
+ .cd-headline.loading-bar b.is-visible {
570
+ opacity: 1;
571
+ top: 0;
572
+ }
573
+ /* --------------------------------
574
+
575
+ xslide
576
+
577
+ -------------------------------- */
578
+ .cd-headline.slide span {
579
+ display: inline-block;
580
+ padding: .2em 0;
581
+ }
582
+ .cd-headline.slide .cd-words-wrapper {
583
+ overflow: hidden;
584
+ vertical-align: top;
585
+ }
586
+ .cd-headline.slide b {
587
+ opacity: 0;
588
+ top: .2em;
589
+ }
590
+ .cd-headline.slide b.is-visible {
591
+ top: 0;
592
+ opacity: 1;
593
+ -webkit-animation: slide-in 0.6s;
594
+ -moz-animation: slide-in 0.6s;
595
+ animation: slide-in 0.6s;
596
+ }
597
+ .cd-headline.slide b.is-hidden {
598
+ -webkit-animation: slide-out 0.6s;
599
+ -moz-animation: slide-out 0.6s;
600
+ animation: slide-out 0.6s;
601
+ }
602
+ @-webkit-keyframes slide-in {
603
+ 0% {
604
+ opacity: 0;
605
+ -webkit-transform: translateY(-100%);
606
+ }
607
+ 60% {
608
+ opacity: 1;
609
+ -webkit-transform: translateY(20%);
610
+ }
611
+ 100% {
612
+ opacity: 1;
613
+ -webkit-transform: translateY(0);
614
+ }
615
+ }
616
+ @-moz-keyframes slide-in {
617
+ 0% {
618
+ opacity: 0;
619
+ -moz-transform: translateY(-100%);
620
+ }
621
+ 60% {
622
+ opacity: 1;
623
+ -moz-transform: translateY(20%);
624
+ }
625
+ 100% {
626
+ opacity: 1;
627
+ -moz-transform: translateY(0);
628
+ }
629
+ }
630
+ @keyframes slide-in {
631
+ 0% {
632
+ opacity: 0;
633
+ -webkit-transform: translateY(-100%);
634
+ -moz-transform: translateY(-100%);
635
+ -ms-transform: translateY(-100%);
636
+ -o-transform: translateY(-100%);
637
+ transform: translateY(-100%);
638
+ }
639
+ 60% {
640
+ opacity: 1;
641
+ -webkit-transform: translateY(20%);
642
+ -moz-transform: translateY(20%);
643
+ -ms-transform: translateY(20%);
644
+ -o-transform: translateY(20%);
645
+ transform: translateY(20%);
646
+ }
647
+ 100% {
648
+ opacity: 1;
649
+ -webkit-transform: translateY(0);
650
+ -moz-transform: translateY(0);
651
+ -ms-transform: translateY(0);
652
+ -o-transform: translateY(0);
653
+ transform: translateY(0);
654
+ }
655
+ }
656
+ @-webkit-keyframes slide-out {
657
+ 0% {
658
+ opacity: 1;
659
+ -webkit-transform: translateY(0);
660
+ }
661
+ 60% {
662
+ opacity: 0;
663
+ -webkit-transform: translateY(120%);
664
+ }
665
+ 100% {
666
+ opacity: 0;
667
+ -webkit-transform: translateY(100%);
668
+ }
669
+ }
670
+ @-moz-keyframes slide-out {
671
+ 0% {
672
+ opacity: 1;
673
+ -moz-transform: translateY(0);
674
+ }
675
+ 60% {
676
+ opacity: 0;
677
+ -moz-transform: translateY(120%);
678
+ }
679
+ 100% {
680
+ opacity: 0;
681
+ -moz-transform: translateY(100%);
682
+ }
683
+ }
684
+ @keyframes slide-out {
685
+ 0% {
686
+ opacity: 1;
687
+ -webkit-transform: translateY(0);
688
+ -moz-transform: translateY(0);
689
+ -ms-transform: translateY(0);
690
+ -o-transform: translateY(0);
691
+ transform: translateY(0);
692
+ }
693
+ 60% {
694
+ opacity: 0;
695
+ -webkit-transform: translateY(120%);
696
+ -moz-transform: translateY(120%);
697
+ -ms-transform: translateY(120%);
698
+ -o-transform: translateY(120%);
699
+ transform: translateY(120%);
700
+ }
701
+ 100% {
702
+ opacity: 0;
703
+ -webkit-transform: translateY(100%);
704
+ -moz-transform: translateY(100%);
705
+ -ms-transform: translateY(100%);
706
+ -o-transform: translateY(100%);
707
+ transform: translateY(100%);
708
+ }
709
+ }
710
+ /* --------------------------------
711
+
712
+ xclip
713
+
714
+ -------------------------------- */
715
+ .cd-headline.clip span {
716
+ display: inline-block;
717
+ padding: .2em 0;
718
+ }
719
+ .cd-headline.clip .cd-words-wrapper {
720
+ overflow: hidden;
721
+ vertical-align: top;
722
+ }
723
+ .cd-headline.clip .cd-words-wrapper::after {
724
+ /* line */
725
+ content:'';
726
+ position: absolute;
727
+ top: 0;
728
+ right: 0;
729
+ width: 2px;
730
+ height: 100%;
731
+ background-color: #aebcb9;
732
+ }
733
+ .cd-headline.clip b {
734
+ opacity: 0;
735
+ }
736
+ .cd-headline.clip b.is-visible {
737
+ opacity: 1;
738
+ }
739
+ /* --------------------------------
740
+
741
+ xzoom
742
+
743
+ -------------------------------- */
744
+ .cd-headline.zoom .cd-words-wrapper {
745
+ -webkit-perspective: 300px;
746
+ -moz-perspective: 300px;
747
+ perspective: 300px;
748
+ }
749
+ .cd-headline.zoom b {
750
+ opacity: 0;
751
+ }
752
+ .cd-headline.zoom b.is-visible {
753
+ opacity: 1;
754
+ -webkit-animation: zoom-in 0.8s;
755
+ -moz-animation: zoom-in 0.8s;
756
+ animation: zoom-in 0.8s;
757
+ }
758
+ .cd-headline.zoom b.is-hidden {
759
+ -webkit-animation: zoom-out 0.8s;
760
+ -moz-animation: zoom-out 0.8s;
761
+ animation: zoom-out 0.8s;
762
+ }
763
+ @-webkit-keyframes zoom-in {
764
+ 0% {
765
+ opacity: 0;
766
+ -webkit-transform: translateZ(100px);
767
+ }
768
+ 100% {
769
+ opacity: 1;
770
+ -webkit-transform: translateZ(0);
771
+ }
772
+ }
773
+ @-moz-keyframes zoom-in {
774
+ 0% {
775
+ opacity: 0;
776
+ -moz-transform: translateZ(100px);
777
+ }
778
+ 100% {
779
+ opacity: 1;
780
+ -moz-transform: translateZ(0);
781
+ }
782
+ }
783
+ @keyframes zoom-in {
784
+ 0% {
785
+ opacity: 0;
786
+ -webkit-transform: translateZ(100px);
787
+ -moz-transform: translateZ(100px);
788
+ -ms-transform: translateZ(100px);
789
+ -o-transform: translateZ(100px);
790
+ transform: translateZ(100px);
791
+ }
792
+ 100% {
793
+ opacity: 1;
794
+ -webkit-transform: translateZ(0);
795
+ -moz-transform: translateZ(0);
796
+ -ms-transform: translateZ(0);
797
+ -o-transform: translateZ(0);
798
+ transform: translateZ(0);
799
+ }
800
+ }
801
+ @-webkit-keyframes zoom-out {
802
+ 0% {
803
+ opacity: 1;
804
+ -webkit-transform: translateZ(0);
805
+ }
806
+ 100% {
807
+ opacity: 0;
808
+ -webkit-transform: translateZ(-100px);
809
+ }
810
+ }
811
+ @-moz-keyframes zoom-out {
812
+ 0% {
813
+ opacity: 1;
814
+ -moz-transform: translateZ(0);
815
+ }
816
+ 100% {
817
+ opacity: 0;
818
+ -moz-transform: translateZ(-100px);
819
+ }
820
+ }
821
+ @keyframes zoom-out {
822
+ 0% {
823
+ opacity: 1;
824
+ -webkit-transform: translateZ(0);
825
+ -moz-transform: translateZ(0);
826
+ -ms-transform: translateZ(0);
827
+ -o-transform: translateZ(0);
828
+ transform: translateZ(0);
829
+ }
830
+ 100% {
831
+ opacity: 0;
832
+ -webkit-transform: translateZ(-100px);
833
+ -moz-transform: translateZ(-100px);
834
+ -ms-transform: translateZ(-100px);
835
+ -o-transform: translateZ(-100px);
836
+ transform: translateZ(-100px);
837
+ }
838
+ }
839
+ /* --------------------------------
840
+
841
+ xrotate-3
842
+
843
+ -------------------------------- */
844
+ .cd-headline.rotate-3 .cd-words-wrapper {
845
+ -webkit-perspective: 300px;
846
+ -moz-perspective: 300px;
847
+ perspective: 300px;
848
+ }
849
+ .cd-headline.rotate-3 i {
850
+ display: inline-block;
851
+ -webkit-transform: rotateY(180deg);
852
+ -moz-transform: rotateY(180deg);
853
+ -ms-transform: rotateY(180deg);
854
+ -o-transform: rotateY(180deg);
855
+ transform: rotateY(180deg);
856
+ -webkit-backface-visibility: hidden;
857
+ backface-visibility: hidden;
858
+ }
859
+ .is-visible .cd-headline.rotate-3 i {
860
+ -webkit-transform: rotateY(0deg);
861
+ -moz-transform: rotateY(0deg);
862
+ -ms-transform: rotateY(0deg);
863
+ -o-transform: rotateY(0deg);
864
+ transform: rotateY(0deg);
865
+ }
866
+ .cd-headline.rotate-3 i.in {
867
+ -webkit-animation: cd-rotate-3-in 0.6s forwards;
868
+ -moz-animation: cd-rotate-3-in 0.6s forwards;
869
+ animation: cd-rotate-3-in 0.6s forwards;
870
+ }
871
+ .cd-headline.rotate-3 i.out {
872
+ -webkit-animation: cd-rotate-3-out 0.6s forwards;
873
+ -moz-animation: cd-rotate-3-out 0.6s forwards;
874
+ animation: cd-rotate-3-out 0.6s forwards;
875
+ }
876
+ .no-csstransitions .cd-headline.rotate-3 i {
877
+ -webkit-transform: rotateY(0deg);
878
+ -moz-transform: rotateY(0deg);
879
+ -ms-transform: rotateY(0deg);
880
+ -o-transform: rotateY(0deg);
881
+ transform: rotateY(0deg);
882
+ opacity: 0;
883
+ }
884
+ .no-csstransitions .cd-headline.rotate-3 .is-visible i {
885
+ opacity: 1;
886
+ }
887
+ @-webkit-keyframes cd-rotate-3-in {
888
+ 0% {
889
+ -webkit-transform: rotateY(180deg);
890
+ }
891
+ 100% {
892
+ -webkit-transform: rotateY(0deg);
893
+ }
894
+ }
895
+ @-moz-keyframes cd-rotate-3-in {
896
+ 0% {
897
+ -moz-transform: rotateY(180deg);
898
+ }
899
+ 100% {
900
+ -moz-transform: rotateY(0deg);
901
+ }
902
+ }
903
+ @keyframes cd-rotate-3-in {
904
+ 0% {
905
+ -webkit-transform: rotateY(180deg);
906
+ -moz-transform: rotateY(180deg);
907
+ -ms-transform: rotateY(180deg);
908
+ -o-transform: rotateY(180deg);
909
+ transform: rotateY(180deg);
910
+ }
911
+ 100% {
912
+ -webkit-transform: rotateY(0deg);
913
+ -moz-transform: rotateY(0deg);
914
+ -ms-transform: rotateY(0deg);
915
+ -o-transform: rotateY(0deg);
916
+ transform: rotateY(0deg);
917
+ }
918
+ }
919
+ @-webkit-keyframes cd-rotate-3-out {
920
+ 0% {
921
+ -webkit-transform: rotateY(0);
922
+ }
923
+ 100% {
924
+ -webkit-transform: rotateY(-180deg);
925
+ }
926
+ }
927
+ @-moz-keyframes cd-rotate-3-out {
928
+ 0% {
929
+ -moz-transform: rotateY(0);
930
+ }
931
+ 100% {
932
+ -moz-transform: rotateY(-180deg);
933
+ }
934
+ }
935
+ @keyframes cd-rotate-3-out {
936
+ 0% {
937
+ -webkit-transform: rotateY(0);
938
+ -moz-transform: rotateY(0);
939
+ -ms-transform: rotateY(0);
940
+ -o-transform: rotateY(0);
941
+ transform: rotateY(0);
942
+ }
943
+ 100% {
944
+ -webkit-transform: rotateY(-180deg);
945
+ -moz-transform: rotateY(-180deg);
946
+ -ms-transform: rotateY(-180deg);
947
+ -o-transform: rotateY(-180deg);
948
+ transform: rotateY(-180deg);
949
+ }
950
+ }
951
+ /* --------------------------------
952
+
953
+ xscale
954
+
955
+ -------------------------------- */
956
+ .cd-headline.scale i {
957
+ display: inline-block;
958
+ opacity: 0;
959
+ -webkit-transform: scale(0);
960
+ -moz-transform: scale(0);
961
+ -ms-transform: scale(0);
962
+ -o-transform: scale(0);
963
+ transform: scale(0);
964
+ }
965
+ .is-visible .cd-headline.scale i {
966
+ opacity: 1;
967
+ }
968
+ .cd-headline.scale i.in {
969
+ -webkit-animation: scale-up 0.6s forwards;
970
+ -moz-animation: scale-up 0.6s forwards;
971
+ animation: scale-up 0.6s forwards;
972
+ }
973
+ .cd-headline.scale i.out {
974
+ -webkit-animation: scale-down 0.6s forwards;
975
+ -moz-animation: scale-down 0.6s forwards;
976
+ animation: scale-down 0.6s forwards;
977
+ }
978
+ .no-csstransitions .cd-headline.scale i {
979
+ -webkit-transform: scale(1);
980
+ -moz-transform: scale(1);
981
+ -ms-transform: scale(1);
982
+ -o-transform: scale(1);
983
+ transform: scale(1);
984
+ opacity: 0;
985
+ }
986
+ .no-csstransitions .cd-headline.scale .is-visible i {
987
+ opacity: 1;
988
+ }
989
+ @-webkit-keyframes scale-up {
990
+ 0% {
991
+ -webkit-transform: scale(0);
992
+ opacity: 0;
993
+ }
994
+ 60% {
995
+ -webkit-transform: scale(1.2);
996
+ opacity: 1;
997
+ }
998
+ 100% {
999
+ -webkit-transform: scale(1);
1000
+ opacity: 1;
1001
+ }
1002
+ }
1003
+ @-moz-keyframes scale-up {
1004
+ 0% {
1005
+ -moz-transform: scale(0);
1006
+ opacity: 0;
1007
+ }
1008
+ 60% {
1009
+ -moz-transform: scale(1.2);
1010
+ opacity: 1;
1011
+ }
1012
+ 100% {
1013
+ -moz-transform: scale(1);
1014
+ opacity: 1;
1015
+ }
1016
+ }
1017
+ @keyframes scale-up {
1018
+ 0% {
1019
+ -webkit-transform: scale(0);
1020
+ -moz-transform: scale(0);
1021
+ -ms-transform: scale(0);
1022
+ -o-transform: scale(0);
1023
+ transform: scale(0);
1024
+ opacity: 0;
1025
+ }
1026
+ 60% {
1027
+ -webkit-transform: scale(1.2);
1028
+ -moz-transform: scale(1.2);
1029
+ -ms-transform: scale(1.2);
1030
+ -o-transform: scale(1.2);
1031
+ transform: scale(1.2);
1032
+ opacity: 1;
1033
+ }
1034
+ 100% {
1035
+ -webkit-transform: scale(1);
1036
+ -moz-transform: scale(1);
1037
+ -ms-transform: scale(1);
1038
+ -o-transform: scale(1);
1039
+ transform: scale(1);
1040
+ opacity: 1;
1041
+ }
1042
+ }
1043
+ @-webkit-keyframes scale-down {
1044
+ 0% {
1045
+ -webkit-transform: scale(1);
1046
+ opacity: 1;
1047
+ }
1048
+ 60% {
1049
+ -webkit-transform: scale(0);
1050
+ opacity: 0;
1051
+ }
1052
+ }
1053
+ @-moz-keyframes scale-down {
1054
+ 0% {
1055
+ -moz-transform: scale(1);
1056
+ opacity: 1;
1057
+ }
1058
+ 60% {
1059
+ -moz-transform: scale(0);
1060
+ opacity: 0;
1061
+ }
1062
+ }
1063
+ @keyframes scale-down {
1064
+ 0% {
1065
+ -webkit-transform: scale(1);
1066
+ -moz-transform: scale(1);
1067
+ -ms-transform: scale(1);
1068
+ -o-transform: scale(1);
1069
+ transform: scale(1);
1070
+ opacity: 1;
1071
+ }
1072
+ 60% {
1073
+ -webkit-transform: scale(0);
1074
+ -moz-transform: scale(0);
1075
+ -ms-transform: scale(0);
1076
+ -o-transform: scale(0);
1077
+ transform: scale(0);
1078
+ opacity: 0;
1079
+ }
1080
+ }
1081
+ /* --------------------------------
1082
+
1083
+ xpush
1084
+
1085
+ -------------------------------- */
1086
+ .cd-headline.push b {
1087
+ opacity: 0;
1088
+ }
1089
+ .cd-headline.push b.is-visible {
1090
+ opacity: 1;
1091
+ -webkit-animation: push-in 0.6s;
1092
+ -moz-animation: push-in 0.6s;
1093
+ animation: push-in 0.6s;
1094
+ }
1095
+ .cd-headline.push b.is-hidden {
1096
+ -webkit-animation: push-out 0.6s;
1097
+ -moz-animation: push-out 0.6s;
1098
+ animation: push-out 0.6s;
1099
+ }
1100
+ @-webkit-keyframes push-in {
1101
+ 0% {
1102
+ opacity: 0;
1103
+ -webkit-transform: translateX(-100%);
1104
+ }
1105
+ 60% {
1106
+ opacity: 1;
1107
+ -webkit-transform: translateX(10%);
1108
+ }
1109
+ 100% {
1110
+ opacity: 1;
1111
+ -webkit-transform: translateX(0);
1112
+ }
1113
+ }
1114
+ @-moz-keyframes push-in {
1115
+ 0% {
1116
+ opacity: 0;
1117
+ -moz-transform: translateX(-100%);
1118
+ }
1119
+ 60% {
1120
+ opacity: 1;
1121
+ -moz-transform: translateX(10%);
1122
+ }
1123
+ 100% {
1124
+ opacity: 1;
1125
+ -moz-transform: translateX(0);
1126
+ }
1127
+ }
1128
+ @keyframes push-in {
1129
+ 0% {
1130
+ opacity: 0;
1131
+ -webkit-transform: translateX(-100%);
1132
+ -moz-transform: translateX(-100%);
1133
+ -ms-transform: translateX(-100%);
1134
+ -o-transform: translateX(-100%);
1135
+ transform: translateX(-100%);
1136
+ }
1137
+ 60% {
1138
+ opacity: 1;
1139
+ -webkit-transform: translateX(10%);
1140
+ -moz-transform: translateX(10%);
1141
+ -ms-transform: translateX(10%);
1142
+ -o-transform: translateX(10%);
1143
+ transform: translateX(10%);
1144
+ }
1145
+ 100% {
1146
+ opacity: 1;
1147
+ -webkit-transform: translateX(0);
1148
+ -moz-transform: translateX(0);
1149
+ -ms-transform: translateX(0);
1150
+ -o-transform: translateX(0);
1151
+ transform: translateX(0);
1152
+ }
1153
+ }
1154
+ @-webkit-keyframes push-out {
1155
+ 0% {
1156
+ opacity: 1;
1157
+ -webkit-transform: translateX(0);
1158
+ }
1159
+ 60% {
1160
+ opacity: 0;
1161
+ -webkit-transform: translateX(110%);
1162
+ }
1163
+ 100% {
1164
+ opacity: 0;
1165
+ -webkit-transform: translateX(100%);
1166
+ }
1167
+ }
1168
+ @-moz-keyframes push-out {
1169
+ 0% {
1170
+ opacity: 1;
1171
+ -moz-transform: translateX(0);
1172
+ }
1173
+ 60% {
1174
+ opacity: 0;
1175
+ -moz-transform: translateX(110%);
1176
+ }
1177
+ 100% {
1178
+ opacity: 0;
1179
+ -moz-transform: translateX(100%);
1180
+ }
1181
+ }
1182
+ @keyframes push-out {
1183
+ 0% {
1184
+ opacity: 1;
1185
+ -webkit-transform: translateX(0);
1186
+ -moz-transform: translateX(0);
1187
+ -ms-transform: translateX(0);
1188
+ -o-transform: translateX(0);
1189
+ transform: translateX(0);
1190
+ }
1191
+ 60% {
1192
+ opacity: 0;
1193
+ -webkit-transform: translateX(110%);
1194
+ -moz-transform: translateX(110%);
1195
+ -ms-transform: translateX(110%);
1196
+ -o-transform: translateX(110%);
1197
+ transform: translateX(110%);
1198
+ }
1199
+ 100% {
1200
+ opacity: 0;
1201
+ -webkit-transform: translateX(100%);
1202
+ -moz-transform: translateX(100%);
1203
+ -ms-transform: translateX(100%);
1204
+ -o-transform: translateX(100%);
1205
+ transform: translateX(100%);
1206
+ }
1207
+ }
extendify-sdk/app/Admin.php CHANGED
@@ -6,6 +6,7 @@
6
  namespace Extendify\ExtendifySdk;
7
 
8
  use Extendify\ExtendifySdk\App;
 
9
 
10
  /**
11
  * This class handles any file loading for the admin area.
@@ -62,8 +63,11 @@ class Admin
62
  */
63
  public function checkItsGutenbergPost($hook = '')
64
  {
65
- // TODO: Maybe there's a better check here so we can show on other pages too.
66
- return $hook && in_array($hook, ['post.php', 'post-new.php'], true);
 
 
 
67
  }
68
 
69
  /**
@@ -94,6 +98,7 @@ class Admin
94
  [
95
  'root' => \esc_url_raw(rest_url(APP::$slug . '/' . APP::$apiVersion)),
96
  'nonce' => \wp_create_nonce('wp_rest'),
 
97
  ]
98
  );
99
  \wp_enqueue_script(App::$slug . '-scripts');
6
  namespace Extendify\ExtendifySdk;
7
 
8
  use Extendify\ExtendifySdk\App;
9
+ use Extendify\ExtendifySdk\User;
10
 
11
  /**
12
  * This class handles any file loading for the admin area.
63
  */
64
  public function checkItsGutenbergPost($hook = '')
65
  {
66
+ if (isset($GLOBALS['typenow']) && use_block_editor_for_post_type($GLOBALS['typenow'])) {
67
+ return $hook && in_array($hook, ['post.php', 'post-new.php'], true);
68
+ }
69
+
70
+ return false;
71
  }
72
 
73
  /**
98
  [
99
  'root' => \esc_url_raw(rest_url(APP::$slug . '/' . APP::$apiVersion)),
100
  'nonce' => \wp_create_nonce('wp_rest'),
101
+ 'user' => json_decode(User::data('extendifysdk_user_data'), true),
102
  ]
103
  );
104
  \wp_enqueue_script(App::$slug . '-scripts');
extendify-sdk/extendify-sdk.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  if (!defined('ABSPATH')) {
3
  exit;
4
  }
1
  <?php
2
+
3
  if (!defined('ABSPATH')) {
4
  exit;
5
  }
extendify-sdk/public/build/extendify-sdk.js CHANGED
@@ -1,2 +1,2 @@
1
  /*! For license information please see extendify-sdk.js.LICENSE.txt */
2
- (()=>{var e,t={135:(e,t,n)=>{e.exports=n(248)},206:(e,t,n)=>{e.exports=n(57)},387:(e,t,n)=>{"use strict";var r=n(485),o=n(570),i=n(940),a=n(581),u=n(574),s=n(845),c=n(338),l=n(524);e.exports=function(e){return new Promise((function(t,n){var f=e.data,d=e.headers;r.isFormData(f)&&delete d["Content-Type"];var p=new XMLHttpRequest;if(e.auth){var m=e.auth.username||"",v=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";d.Authorization="Basic "+btoa(m+":"+v)}var h=u(e.baseURL,e.url);if(p.open(e.method.toUpperCase(),a(h,e.params,e.paramsSerializer),!0),p.timeout=e.timeout,p.onreadystatechange=function(){if(p&&4===p.readyState&&(0!==p.status||p.responseURL&&0===p.responseURL.indexOf("file:"))){var r="getAllResponseHeaders"in p?s(p.getAllResponseHeaders()):null,i={data:e.responseType&&"text"!==e.responseType?p.response:p.responseText,status:p.status,statusText:p.statusText,headers:r,config:e,request:p};o(t,n,i),p=null}},p.onabort=function(){p&&(n(l("Request aborted",e,"ECONNABORTED",p)),p=null)},p.onerror=function(){n(l("Network Error",e,null,p)),p=null},p.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(l(t,e,"ECONNABORTED",p)),p=null},r.isStandardBrowserEnv()){var y=(e.withCredentials||c(h))&&e.xsrfCookieName?i.read(e.xsrfCookieName):void 0;y&&(d[e.xsrfHeaderName]=y)}if("setRequestHeader"in p&&r.forEach(d,(function(e,t){void 0===f&&"content-type"===t.toLowerCase()?delete d[t]:p.setRequestHeader(t,e)})),r.isUndefined(e.withCredentials)||(p.withCredentials=!!e.withCredentials),e.responseType)try{p.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&p.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&p.upload&&p.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){p&&(p.abort(),n(e),p=null)})),f||(f=null),p.send(f)}))}},57:(e,t,n)=>{"use strict";var r=n(485),o=n(875),i=n(29),a=n(941);function u(e){var t=new i(e),n=o(i.prototype.request,t);return r.extend(n,i.prototype,t),r.extend(n,t),n}var s=u(n(141));s.Axios=i,s.create=function(e){return u(a(s.defaults,e))},s.Cancel=n(132),s.CancelToken=n(603),s.isCancel=n(475),s.all=function(e){return Promise.all(e)},s.spread=n(739),s.isAxiosError=n(835),e.exports=s,e.exports.default=s},132:e=>{"use strict";function t(e){this.message=e}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,e.exports=t},603:(e,t,n)=>{"use strict";var r=n(132);function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;e((function(e){n.reason||(n.reason=new r(e),t(n.reason))}))}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var e;return{token:new o((function(t){e=t})),cancel:e}},e.exports=o},475:e=>{"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},29:(e,t,n)=>{"use strict";var r=n(485),o=n(581),i=n(96),a=n(9),u=n(941);function s(e){this.defaults=e,this.interceptors={request:new i,response:new i}}s.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=u(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=[a,void 0],n=Promise.resolve(e);for(this.interceptors.request.forEach((function(e){t.unshift(e.fulfilled,e.rejected)})),this.interceptors.response.forEach((function(e){t.push(e.fulfilled,e.rejected)}));t.length;)n=n.then(t.shift(),t.shift());return n},s.prototype.getUri=function(e){return e=u(this.defaults,e),o(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(e){s.prototype[e]=function(t,n){return this.request(u(n||{},{method:e,url:t,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(e){s.prototype[e]=function(t,n,r){return this.request(u(r||{},{method:e,url:t,data:n}))}})),e.exports=s},96:(e,t,n)=>{"use strict";var r=n(485);function o(){this.handlers=[]}o.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=o},574:(e,t,n)=>{"use strict";var r=n(642),o=n(288);e.exports=function(e,t){return e&&!r(t)?o(e,t):t}},524:(e,t,n)=>{"use strict";var r=n(953);e.exports=function(e,t,n,o,i){var a=new Error(e);return r(a,t,n,o,i)}},9:(e,t,n)=>{"use strict";var r=n(485),o=n(212),i=n(475),a=n(141);function u(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return u(e),e.headers=e.headers||{},e.data=o(e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||a.adapter)(e).then((function(t){return u(e),t.data=o(t.data,t.headers,e.transformResponse),t}),(function(t){return i(t)||(u(e),t&&t.response&&(t.response.data=o(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},953:e=>{"use strict";e.exports=function(e,t,n,r,o){return e.config=t,n&&(e.code=n),e.request=r,e.response=o,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},941:(e,t,n)=>{"use strict";var r=n(485);e.exports=function(e,t){t=t||{};var n={},o=["url","method","data"],i=["headers","auth","proxy","params"],a=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],u=["validateStatus"];function s(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function c(o){r.isUndefined(t[o])?r.isUndefined(e[o])||(n[o]=s(void 0,e[o])):n[o]=s(e[o],t[o])}r.forEach(o,(function(e){r.isUndefined(t[e])||(n[e]=s(void 0,t[e]))})),r.forEach(i,c),r.forEach(a,(function(o){r.isUndefined(t[o])?r.isUndefined(e[o])||(n[o]=s(void 0,e[o])):n[o]=s(void 0,t[o])})),r.forEach(u,(function(r){r in t?n[r]=s(e[r],t[r]):r in e&&(n[r]=s(void 0,e[r]))}));var l=o.concat(i).concat(a).concat(u),f=Object.keys(e).concat(Object.keys(t)).filter((function(e){return-1===l.indexOf(e)}));return r.forEach(f,c),n}},570:(e,t,n)=>{"use strict";var r=n(524);e.exports=function(e,t,n){var o=n.config.validateStatus;n.status&&o&&!o(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},212:(e,t,n)=>{"use strict";var r=n(485);e.exports=function(e,t,n){return r.forEach(n,(function(n){e=n(e,t)})),e}},141:(e,t,n)=>{"use strict";var r=n(61),o=n(485),i=n(446),a={"Content-Type":"application/x-www-form-urlencoded"};function u(e,t){!o.isUndefined(e)&&o.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var s,c={adapter:(("undefined"!=typeof XMLHttpRequest||void 0!==r&&"[object process]"===Object.prototype.toString.call(r))&&(s=n(387)),s),transformRequest:[function(e,t){return i(t,"Accept"),i(t,"Content-Type"),o.isFormData(e)||o.isArrayBuffer(e)||o.isBuffer(e)||o.isStream(e)||o.isFile(e)||o.isBlob(e)?e:o.isArrayBufferView(e)?e.buffer:o.isURLSearchParams(e)?(u(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):o.isObject(e)?(u(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300}};c.headers={common:{Accept:"application/json, text/plain, */*"}},o.forEach(["delete","get","head"],(function(e){c.headers[e]={}})),o.forEach(["post","put","patch"],(function(e){c.headers[e]=o.merge(a)})),e.exports=c},875:e=>{"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}}},581:(e,t,n)=>{"use strict";var r=n(485);function o(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var i;if(n)i=n(t);else if(r.isURLSearchParams(t))i=t.toString();else{var a=[];r.forEach(t,(function(e,t){null!=e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,(function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),a.push(o(t)+"="+o(e))})))})),i=a.join("&")}if(i){var u=e.indexOf("#");-1!==u&&(e=e.slice(0,u)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}},288:e=>{"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},940:(e,t,n)=>{"use strict";var r=n(485);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,o,i,a){var u=[];u.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&u.push("expires="+new Date(n).toGMTString()),r.isString(o)&&u.push("path="+o),r.isString(i)&&u.push("domain="+i),!0===a&&u.push("secure"),document.cookie=u.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},642:e=>{"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},835:e=>{"use strict";e.exports=function(e){return"object"==typeof e&&!0===e.isAxiosError}},338:(e,t,n)=>{"use strict";var r=n(485);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function o(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=o(window.location.href),function(t){var n=r.isString(t)?o(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},446:(e,t,n)=>{"use strict";var r=n(485);e.exports=function(e,t){r.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))}},845:(e,t,n)=>{"use strict";var r=n(485),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,i,a={};return e?(r.forEach(e.split("\n"),(function(e){if(i=e.indexOf(":"),t=r.trim(e.substr(0,i)).toLowerCase(),n=r.trim(e.substr(i+1)),t){if(a[t]&&o.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([n]):a[t]?a[t]+", "+n:n}})),a):a}},739:e=>{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},485:(e,t,n)=>{"use strict";var r=n(875),o=Object.prototype.toString;function i(e){return"[object Array]"===o.call(e)}function a(e){return void 0===e}function u(e){return null!==e&&"object"==typeof e}function s(e){if("[object Object]"!==o.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function c(e){return"[object Function]"===o.call(e)}function l(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),i(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}e.exports={isArray:i,isArrayBuffer:function(e){return"[object ArrayBuffer]"===o.call(e)},isBuffer:function(e){return null!==e&&!a(e)&&null!==e.constructor&&!a(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:u,isPlainObject:s,isUndefined:a,isDate:function(e){return"[object Date]"===o.call(e)},isFile:function(e){return"[object File]"===o.call(e)},isBlob:function(e){return"[object Blob]"===o.call(e)},isFunction:c,isStream:function(e){return u(e)&&c(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:l,merge:function e(){var t={};function n(n,r){s(t[r])&&s(n)?t[r]=e(t[r],n):s(n)?t[r]=e({},n):i(n)?t[r]=n.slice():t[r]=n}for(var r=0,o=arguments.length;r<o;r++)l(arguments[r],n);return t},extend:function(e,t,n){return l(t,(function(t,o){e[o]=n&&"function"==typeof t?r(t,n):t})),e},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}}},473:(e,t,n)=>{"use strict";const r=wp.element;var o=n(804),i=n.n(o);function a(e){let t;const n=new Set,r=(e,r)=>{const o="function"==typeof e?e(t):e;if(o!==t){const e=t;t=r?o:Object.assign({},t,o),n.forEach((n=>n(t,e)))}},o=()=>t,i={setState:r,getState:o,subscribe:(e,r,i)=>r||i?((e,r=o,i=Object.is)=>{let a=r(t);function u(){const n=r(t);if(!i(a,n)){const t=a;e(a=n,t)}}return n.add(u),()=>n.delete(u)})(e,r,i):(n.add(e),()=>n.delete(e)),destroy:()=>n.clear()};return t=e(r,o,i),i}const u="undefined"==typeof window||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent)?o.useEffect:o.useLayoutEffect;const s=function(e){const t="function"==typeof e?a(e):e,n=(e=t.getState,n=Object.is)=>{const[,r]=(0,o.useReducer)((e=>e+1),0),i=t.getState(),a=(0,o.useRef)(i),s=(0,o.useRef)(e),c=(0,o.useRef)(n),l=(0,o.useRef)(!1),f=(0,o.useRef)();let d;void 0===f.current&&(f.current=e(i));let p=!1;(a.current!==i||s.current!==e||c.current!==n||l.current)&&(d=e(i),p=!n(f.current,d)),u((()=>{p&&(f.current=d),a.current=i,s.current=e,c.current=n,l.current=!1}));const m=(0,o.useRef)(i);return u((()=>{const e=()=>{try{const e=t.getState(),n=s.current(e);c.current(f.current,n)||(a.current=e,f.current=n,r())}catch(e){l.current=!0,r()}},n=t.subscribe(e);return t.getState()!==m.current&&e(),n}),[]),p?d:f.current};return Object.assign(n,t),n[Symbol.iterator]=function*(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4"),yield n,yield t},n};var c="pattern",l=12;function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function 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}function p(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=window.wp.blocks.createBlock;return e.map((function(e){var n=f(Array.isArray(e)?e:[e.name,e.attributes,e.innerBlocks],3),r=n[0],o=n[1],i=n[2];return t(r,o,p(void 0===i?[]:i))}))}function m(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?m(Object(n),!0).forEach((function(t){h(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y(e){return function(e){if(Array.isArray(e))return b(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return b(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return b(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function 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 g=s((function(e,t){return{templates:[],fetchToken:null,activeTemplate:{},activeTemplateBlocks:{},taxonomyDefaultState:{},searchParams:{taxonomies:{},type:c,search:""},nextPage:"",removeTemplates:function(){return e({nextPage:"",templates:[]})},appendTemplates:function(n){return e({templates:y(new Map([].concat(y(t().templates),y(n)).map((function(e){return[e.id,e]}))).values())})},setupDefaultTaxonomies:function(n){var r=Object.keys(n).reduce((function(e,n){return e[n]=function(e){return function(e,t){return"pattern"===e&&"tax_categories"===t?"Default":""}(t().searchParams.type,e)}(n),e}),{}),o={};o.taxonomies=r,e({taxonomyDefaultState:r,searchParams:v({},Object.assign(t().searchParams,o))})},setActive:function(t){var n;if(e({activeTemplate:t}),null!=t&&null!==(n=t.fields)&&void 0!==n&&n.code){var r=window.wp.blocks.parse;e({activeTemplateBlocks:p(r(t.fields.code))})}},resetTaxonomies:function(){var e={tax_categories:"pattern"===t().searchParams.type?"Default":""};t().updateSearchParams({taxonomies:Object.assign(t().taxonomyDefaultState,e)})},updateTaxonomies:function(e){var n={};n.taxonomies=Object.assign({},t().searchParams.taxonomies,e),t().updateSearchParams(n)},updateSearchParams:function(n){null!=n&&n.taxonomies&&!Object.keys(n.taxonomies).length&&(n.taxonomies=t().taxonomyDefaultState),e({templates:[],nextPage:"",searchParams:v({},Object.assign(t().searchParams,n))})}}})),x=s((function(e){return{open:!1,currentPage:"content",setOpen:function(t){e({open:t}),t&&g.getState().removeTemplates()}}})),w=n(135),S=n.n(w),k=Object.defineProperty,j=Object.prototype.hasOwnProperty,O=Object.getOwnPropertySymbols,C=Object.prototype.propertyIsEnumerable,E=(e,t,n)=>t in e?k(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,P=(e,t)=>{for(var n in t||(t={}))j.call(t,n)&&E(e,n,t[n]);if(O)for(var n of O(t))C.call(t,n)&&E(e,n,t[n]);return e};const I=(e,t)=>(n,r,o)=>{const{name:i,getStorage:a=(()=>localStorage),serialize:u=JSON.stringify,deserialize:s=JSON.parse,blacklist:c,whitelist:l,onRehydrateStorage:f,version:d=0,migrate:p}=t||{};let m;try{m=a()}catch(e){}if(!m)return e(((...e)=>{console.warn(`Persist middleware: unable to update ${i}, the given storage is currently unavailable.`),n(...e)}),r,o);const v=async()=>{const e=P({},r());return l&&Object.keys(e).forEach((t=>{!l.includes(t)&&delete e[t]})),c&&c.forEach((t=>delete e[t])),null==m?void 0:m.setItem(i,await u({state:e,version:d}))},h=o.setState;return o.setState=(e,t)=>{h(e,t),v()},(async()=>{const e=(null==f?void 0:f(r()))||void 0;try{const e=await m.getItem(i);if(e){const t=await s(e);if(t.version!==d){const e=await(null==p?void 0:p(t.state,t.version));e&&(n(e),await v())}else n(t.state)}}catch(t){return void(null==e||e(void 0,t))}null==e||e(r(),void 0)})(),e(((...e)=>{n(...e),v()}),r,o)};var N=n(206),T=n.n(N)().create({baseURL:window.extendifySdkData.root,headers:{"X-WP-Nonce":window.extendifySdkData.nonce,"X-Requested-With":"XMLHttpRequest","X-Extendify":!0}});function _(e){return Object.prototype.hasOwnProperty.call(e,"data")?e.data:e}T.interceptors.response.use((function(e){return function(e){return Object.prototype.hasOwnProperty.call(e,"soft_error")&&window.dispatchEvent(new CustomEvent("extendify-sdk::softerror-encountered",{detail:e.soft_error,bubbles:!0})),e}(_(e))}),(function(e){return function(e){if(e.response)return console.error(e.response),Promise.reject(_(e.response))}(e)})),T.interceptors.request.use((function(e){return function(e){return e.headers["X-Extendify-Dev-Mode"]=window.location.search.indexOf("DEVMODE")>-1,e.headers["X-Extendify-Local-Mode"]=window.location.search.indexOf("LOCALMODE")>-1,e}(function(e){return e.data&&(e.data.remaining_imports=G.getState().remainingImports(),e.data.entry_point=G.getState().entryPoint,e.data.total_imports=G.getState().imports),e}(e))}),(function(e){return e}));var R=function(){return T.get("user")},A=function(e){return T.get("user-meta",{params:{key:e}})},L=function(e,t){var n=new FormData;return n.append("email",e),n.append("key",t),T.post("login",n,{headers:{"Content-Type":"multipart/form-data"}})},D=function(e){var t=new FormData;return t.append("data",JSON.stringify(e)),T.post("user",t,{headers:{"Content-Type":"multipart/form-data"}})};function F(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)}function M(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){F(i,r,o,a,u,"next",e)}function u(e){F(i,r,o,a,u,"throw",e)}a(void 0)}))}}var B,U,V={getItem:(U=M(S().mark((function e(){return S().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,R();case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)}))),function(){return U.apply(this,arguments)}),setItem:(B=M(S().mark((function e(t,n){return S().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",D(n));case 1:case"end":return e.stop()}}),e)}))),function(e,t){return B.apply(this,arguments)})},G=s(I((function(e,t){return{apiKey:"",imports:0,uuid:"",email:"",allowedImports:0,entryPoint:"not-set",enabled:!0,incrementImports:function(){return e({imports:t().imports+1})},canImport:function(){return!!t().apiKey||Number(t().imports)<Number(t().allowedImports)},remainingImports:function(){if(t().apiKey)return"unlimited";var e=Number(t().allowedImports)-Number(t().imports);return e>0?e:0}}}),{name:"extendify-user",getStorage:function(){return V}}));const H=ReactDOM;function q(){return(q=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function W(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}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}function z(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(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}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function $(e,t){if(e in t){for(var n=t[e],r=arguments.length,o=new Array(r>2?r-2:0),i=2;i<r;i++)o[i-2]=arguments[i];return"function"==typeof n?n.apply(void 0,o):n}var a=new Error('Tried to handle "'+e+'" but there is no handler defined. Only defined handlers are: '+Object.keys(t).map((function(e){return'"'+e+'"'})).join(", ")+".");throw Error.captureStackTrace&&Error.captureStackTrace(a,$),a}var Q,Y,J;function X(e){var t=e.props,n=e.slot,r=e.defaultTag,o=e.features,i=e.visible,a=void 0===i||i,u=e.name;if(a)return Z(t,n,r,u);var s=null!=o?o:Q.None;if(s&Q.Static){var c=t.static,l=void 0!==c&&c,f=W(t,["static"]);if(l)return Z(f,n,r,u)}if(s&Q.RenderStrategy){var d,p=t.unmount,m=void 0===p||p,v=W(t,["unmount"]);return $(m?Y.Unmount:Y.Hidden,((d={})[Y.Unmount]=function(){return null},d[Y.Hidden]=function(){return Z(q({},v,{hidden:!0,style:{display:"none"}}),n,r,u)},d))}return Z(t,n,r,u)}function Z(e,t,n,r){var i;void 0===t&&(t={});var a=te(e,["unmount","static"]),u=a.as,s=void 0===u?n:u,c=a.children,l=a.refName,f=void 0===l?"ref":l,d=W(a,["as","children","refName"]),p=void 0!==e.ref?((i={})[f]=e.ref,i):{},m="function"==typeof c?c(t):c;if(d.className&&"function"==typeof d.className&&(d.className=d.className(t)),s===o.Fragment&&Object.keys(d).length>0){if(!(0,o.isValidElement)(m)||Array.isArray(m)&&m.length>1)throw new Error(['Passing props on "Fragment"!',"","The current component <"+r+' /> is rendering a "Fragment".',"However we need to passthrough the following props:",Object.keys(d).map((function(e){return" - "+e})).join("\n"),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map((function(e){return" - "+e})).join("\n")].join("\n"));return(0,o.cloneElement)(m,Object.assign({},function(e,t,n){for(var r,o=Object.assign({},e),i=function(){var n,i=r.value;void 0!==e[i]&&void 0!==t[i]&&Object.assign(o,((n={})[i]=function(n){n.defaultPrevented||e[i](n),n.defaultPrevented||t[i](n)},n))},a=z(n);!(r=a()).done;)i();return o}(function(e){var t=Object.assign({},e);for(var n in t)void 0===t[n]&&delete t[n];return t}(te(d,["ref"])),m.props,["onClick"]),p))}return(0,o.createElement)(s,Object.assign({},te(d,["ref"]),s!==o.Fragment&&p),m)}function ee(e){var t;return Object.assign((0,o.forwardRef)(e),{displayName:null!=(t=e.displayName)?t:e.name})}function te(e,t){void 0===t&&(t=[]);for(var n,r=Object.assign({},e),o=z(t);!(n=o()).done;){var i=n.value;i in r&&delete r[i]}return r}function ne(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=(0,o.useRef)(t);return(0,o.useEffect)((function(){r.current=t}),[t]),(0,o.useCallback)((function(e){for(var t,n=z(r.current);!(t=n()).done;){var o=t.value;null!=o&&("function"==typeof o?o(e):o.current=e)}}),[r])}function re(e){for(var t,n,r=e.parentElement,o=null;r&&!(r instanceof HTMLFieldSetElement);)r instanceof HTMLLegendElement&&(o=r),r=r.parentElement;var i=null!=(t=""===(null==(n=r)?void 0:n.getAttribute("disabled")))&&t;return(!i||!function(e){if(!e)return!1;var t=e.previousElementSibling;for(;null!==t;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}(o))&&i}!function(e){e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static"}(Q||(Q={})),function(e){e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden"}(Y||(Y={})),function(e){e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab"}(J||(J={}));var oe="undefined"!=typeof window?o.useLayoutEffect:o.useEffect,ie={serverHandoffComplete:!1};function ae(){var e=(0,o.useState)(ie.serverHandoffComplete),t=e[0],n=e[1];return(0,o.useEffect)((function(){!0!==t&&n(!0)}),[t]),(0,o.useEffect)((function(){!1===ie.serverHandoffComplete&&(ie.serverHandoffComplete=!0)}),[]),t}var ue=0;function se(){return++ue}function ce(){var e=ae(),t=(0,o.useState)(e?se:null),n=t[0],r=t[1];return oe((function(){null===n&&r(se())}),[n]),null!=n?""+n:void 0}var le,fe,de,pe,me,ve=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map((function(e){return e+":not([tabindex='-1'])"})).join(",");function he(e){return void 0===e&&(e=document.body),null==e?[]:Array.from(e.querySelectorAll(ve))}function ye(e,t){var n;return void 0===t&&(t=pe.Strict),e!==document.body&&$(t,((n={})[pe.Strict]=function(){return e.matches(ve)},n[pe.Loose]=function(){for(var t=e;null!==t;){if(t.matches(ve))return!0;t=t.parentElement}return!1},n))}function be(e){null==e||e.focus({preventScroll:!0})}function ge(e,t){var n=Array.isArray(e)?e:he(e),r=document.activeElement,o=function(){if(t&(le.First|le.Next))return de.Next;if(t&(le.Previous|le.Last))return de.Previous;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")}(),i=function(){if(t&le.First)return 0;if(t&le.Previous)return Math.max(0,n.indexOf(r))-1;if(t&le.Next)return Math.max(0,n.indexOf(r))+1;if(t&le.Last)return n.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")}(),a=t&le.NoScroll?{preventScroll:!0}:{},u=0,s=n.length,c=void 0;do{var l;if(u>=s||u+s<=0)return fe.Error;var f=i+u;if(t&le.WrapAround)f=(f+s)%s;else{if(f<0)return fe.Underflow;if(f>=s)return fe.Overflow}null==(l=c=n[f])||l.focus(a),u+=o}while(c!==document.activeElement);return c.hasAttribute("tabindex")||c.setAttribute("tabindex","0"),fe.Success}function xe(e,t,n){var r=(0,o.useRef)(t);r.current=t,(0,o.useEffect)((function(){function t(e){r.current.call(window,e)}return window.addEventListener(e,t,n),function(){return window.removeEventListener(e,t,n)}}),[e,n])}function we(){var e=(0,o.useRef)(!1);return(0,o.useEffect)((function(){return e.current=!0,function(){e.current=!1}}),[]),e}function Se(e,t,n){void 0===t&&(t=me.All);var r=void 0===n?{}:n,i=r.initialFocus,a=r.containers,u=(0,o.useRef)("undefined"!=typeof window?document.activeElement:null),s=(0,o.useRef)(null),c=we(),l=Boolean(t&me.RestoreFocus),f=Boolean(t&me.InitialFocus);(0,o.useEffect)((function(){l&&(u.current=document.activeElement)}),[l]),(0,o.useEffect)((function(){if(l)return function(){be(u.current),u.current=null}}),[l]),(0,o.useEffect)((function(){if(f&&e.current){var t=document.activeElement;if(null==i?void 0:i.current){if((null==i?void 0:i.current)===t)return void(s.current=t)}else if(e.current.contains(t))return void(s.current=t);if(null==i?void 0:i.current)be(i.current);else if(ge(e.current,le.First)===fe.Error)throw new Error("There are no focusable elements inside the <FocusTrap />");s.current=document.activeElement}}),[e,i,f]),xe("keydown",(function(n){t&me.TabLock&&e.current&&n.key===J.Tab&&(n.preventDefault(),ge(e.current,(n.shiftKey?le.Previous:le.Next)|le.WrapAround)===fe.Success&&(s.current=document.activeElement))})),xe("focus",(function(n){if(t&me.FocusLock){var r=new Set(null==a?void 0:a.current);if(r.add(e),r.size){var o=s.current;if(o&&c.current){var i=n.target;i&&i instanceof HTMLElement?!function(e,t){for(var n,r=z(e);!(n=r()).done;){var o;if(null==(o=n.value.current)?void 0:o.contains(t))return!0}return!1}(r,i)?(n.preventDefault(),n.stopPropagation(),be(o)):(s.current=i,be(i)):be(s.current)}}}}),!0)}!function(e){e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll"}(le||(le={})),function(e){e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow"}(fe||(fe={})),function(e){e[e.Previous=-1]="Previous",e[e.Next=1]="Next"}(de||(de={})),function(e){e[e.Strict=0]="Strict",e[e.Loose=1]="Loose"}(pe||(pe={})),function(e){e[e.None=1]="None",e[e.InitialFocus=2]="InitialFocus",e[e.TabLock=4]="TabLock",e[e.FocusLock=8]="FocusLock",e[e.RestoreFocus=16]="RestoreFocus",e[e.All=30]="All"}(me||(me={}));var ke=new Set,je=new Map;function Oe(e){e.setAttribute("aria-hidden","true"),e.inert=!0}function Ce(e){var t=je.get(e);t&&(null===t["aria-hidden"]?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",t["aria-hidden"]),e.inert=t.inert)}var Ee=(0,o.createContext)(!1);function Pe(e){return i().createElement(Ee.Provider,{value:e.force},e.children)}function Ie(){var e=(0,o.useContext)(Ee),t=(0,o.useContext)(Re),n=(0,o.useState)((function(){if(!e&&null!==t)return null;if("undefined"==typeof window)return null;var n=document.getElementById("headlessui-portal-root");if(n)return n;var r=document.createElement("div");return r.setAttribute("id","headlessui-portal-root"),document.body.appendChild(r)})),r=n[0],i=n[1];return(0,o.useEffect)((function(){e||null!==t&&i(t.current)}),[t,i,e]),r}var Ne=o.Fragment;function Te(e){var t=e,n=Ie(),r=(0,o.useState)((function(){return"undefined"==typeof window?null:document.createElement("div")}))[0],i=ae();return oe((function(){if(n&&r)return n.appendChild(r),function(){var e;n&&(r&&(n.removeChild(r),n.childNodes.length<=0&&(null==(e=n.parentElement)||e.removeChild(n))))}}),[n,r]),i&&n&&r?(0,H.createPortal)(X({props:t,defaultTag:Ne,name:"Portal"}),r):null}var _e=o.Fragment,Re=(0,o.createContext)(null);Te.Group=function(e){var t=e.target,n=W(e,["target"]);return i().createElement(Re.Provider,{value:t},X({props:n,defaultTag:_e,name:"Popover.Group"}))};var Ae=(0,o.createContext)(null);function Le(){var e=(0,o.useContext)(Ae);if(null===e){var t=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,Le),t}return e}function De(){var e=(0,o.useState)([]),t=e[0],n=e[1];return[t.length>0?t.join(" "):void 0,(0,o.useMemo)((function(){return function(e){var t=(0,o.useCallback)((function(e){return n((function(t){return[].concat(t,[e])})),function(){return n((function(t){var n=t.slice(),r=n.indexOf(e);return-1!==r&&n.splice(r,1),n}))}}),[]),r=(0,o.useMemo)((function(){return{register:t,slot:e.slot,name:e.name,props:e.props}}),[t,e.slot,e.name,e.props]);return i().createElement(Ae.Provider,{value:r},e.children)}}),[n])]}function Fe(e){var t=Le(),n="headlessui-description-"+ce();oe((function(){return t.register(n)}),[n,t.register]);var r=e,o=q({},t.props,{id:n});return X({props:q({},r,o),slot:t.slot||{},defaultTag:"p",name:t.name||"Description"})}var Me,Be=(0,o.createContext)(null);function Ue(){return(0,o.useContext)(Be)}function Ve(e){var t=e.value,n=e.children;return i().createElement(Be.Provider,{value:t},n)}Be.displayName="OpenClosedContext",function(e){e[e.Open=0]="Open",e[e.Closed=1]="Closed"}(Me||(Me={}));var Ge,He,qe,We,Ke=(0,o.createContext)((function(){}));function ze(e){var t=e.children,n=e.onUpdate,r=e.type,a=e.element,u=(0,o.useContext)(Ke),s=(0,o.useCallback)((function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];null==n||n.apply(void 0,t),u.apply(void 0,t)}),[u,n]);return oe((function(){return s(Ge.Add,r,a),function(){return s(Ge.Remove,r,a)}}),[s,r,a]),i().createElement(Ke.Provider,{value:s},t)}Ke.displayName="StackContext",function(e){e[e.Add=0]="Add",e[e.Remove=1]="Remove"}(Ge||(Ge={})),function(e){e[e.Open=0]="Open",e[e.Closed=1]="Closed"}(qe||(qe={})),function(e){e[e.SetTitleId=0]="SetTitleId"}(We||(We={}));var $e=((He={})[We.SetTitleId]=function(e,t){return e.titleId===t.id?e:q({},e,{titleId:t.id})},He),Qe=(0,o.createContext)(null);function Ye(e){var t=(0,o.useContext)(Qe);if(null===t){var n=new Error("<"+e+" /> is missing a parent <"+ot.displayName+" /> component.");throw Error.captureStackTrace&&Error.captureStackTrace(n,Ye),n}return t}function Je(e,t){return $(t.type,$e,e,t)}Qe.displayName="DialogContext";var Xe=Q.RenderStrategy|Q.Static,Ze=ee((function(e,t){var n,r=e.open,a=e.onClose,u=e.initialFocus,s=W(e,["open","onClose","initialFocus"]),c=(0,o.useState)(0),l=c[0],f=c[1],d=Ue();void 0===r&&null!==d&&(r=$(d,((n={})[Me.Open]=!0,n[Me.Closed]=!1,n)));var p=(0,o.useRef)(new Set),m=(0,o.useRef)(null),v=ne(m,t),h=e.hasOwnProperty("open")||null!==d,y=e.hasOwnProperty("onClose");if(!h&&!y)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!h)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!y)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if("boolean"!=typeof r)throw new Error("You provided an `open` prop to the `Dialog`, but the value is not a boolean. Received: "+r);if("function"!=typeof a)throw new Error("You provided an `onClose` prop to the `Dialog`, but the value is not a function. Received: "+a);var b=r?qe.Open:qe.Closed,g=null!==d?d===Me.Open:b===qe.Open,x=(0,o.useReducer)(Je,{titleId:null,descriptionId:null}),w=x[0],S=x[1],k=(0,o.useCallback)((function(){return a(!1)}),[a]),j=(0,o.useCallback)((function(e){return S({type:We.SetTitleId,id:e})}),[S]),O=ae()&&b===qe.Open,C=l>1,E=null!==(0,o.useContext)(Qe);Se(m,O?$(C?"parent":"leaf",{parent:me.RestoreFocus,leaf:me.All}):me.None,{initialFocus:u,containers:p}),function(e,t){void 0===t&&(t=!0),oe((function(){if(t&&e.current){var n=e.current;ke.add(n);for(var r,o=z(je.keys());!(r=o()).done;){var i=r.value;i.contains(n)&&(Ce(i),je.delete(i))}return document.querySelectorAll("body > *").forEach((function(e){if(e instanceof HTMLElement){for(var t,n=z(ke);!(t=n()).done;){var r=t.value;if(e.contains(r))return}1===ke.size&&(je.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),Oe(e))}})),function(){if(ke.delete(n),ke.size>0)document.querySelectorAll("body > *").forEach((function(e){if(e instanceof HTMLElement&&!je.has(e)){for(var t,n=z(ke);!(t=n()).done;){var r=t.value;if(e.contains(r))return}je.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),Oe(e)}}));else for(var e,t=z(je.keys());!(e=t()).done;){var r=e.value;Ce(r),je.delete(r)}}}}),[t])}(m,!!C&&O),xe("mousedown",(function(e){var t,n=e.target;b===qe.Open&&(C||(null==(t=m.current)?void 0:t.contains(n))||k())})),(0,o.useEffect)((function(){if(b===qe.Open&&!E){var e=document.documentElement.style.overflow,t=document.documentElement.style.paddingRight,n=window.innerWidth-document.documentElement.clientWidth;return document.documentElement.style.overflow="hidden",document.documentElement.style.paddingRight=n+"px",function(){document.documentElement.style.overflow=e,document.documentElement.style.paddingRight=t}}}),[b,E]),(0,o.useEffect)((function(){if(b===qe.Open&&m.current){var e=new IntersectionObserver((function(e){for(var t,n=z(e);!(t=n()).done;){var r=t.value;0===r.boundingClientRect.x&&0===r.boundingClientRect.y&&0===r.boundingClientRect.width&&0===r.boundingClientRect.height&&k()}}));return e.observe(m.current),function(){return e.disconnect()}}}),[b,m,k]);var P=De(),I=P[0],N=P[1],T="headlessui-dialog-"+ce(),_=(0,o.useMemo)((function(){return[{dialogState:b,close:k,setTitleId:j},w]}),[b,w,k,j]),R=(0,o.useMemo)((function(){return{open:b===qe.Open}}),[b]),A={ref:v,id:T,role:"dialog","aria-modal":b===qe.Open||void 0,"aria-labelledby":w.titleId,"aria-describedby":I,onClick:function(e){e.stopPropagation()},onKeyDown:function(e){e.key===J.Escape&&b===qe.Open&&(C||(e.preventDefault(),e.stopPropagation(),k()))}},L=s;return i().createElement(ze,{type:"Dialog",element:m,onUpdate:(0,o.useCallback)((function(e,t,n){var r;"Dialog"===t&&$(e,((r={})[Ge.Add]=function(){p.current.add(n),f((function(e){return e+1}))},r[Ge.Remove]=function(){p.current.add(n),f((function(e){return e-1}))},r))}),[])},i().createElement(Pe,{force:!0},i().createElement(Te,null,i().createElement(Qe.Provider,{value:_},i().createElement(Te.Group,{target:m},i().createElement(Pe,{force:!1},i().createElement(N,{slot:R,name:"Dialog.Description"},X({props:q({},L,A),slot:R,defaultTag:"div",features:Xe,visible:g,name:"Dialog"}))))))))})),et=ee((function e(t,n){var r=Ye([ot.displayName,e.name].join("."))[0],i=r.dialogState,a=r.close,u=ne(n),s="headlessui-dialog-overlay-"+ce(),c=(0,o.useCallback)((function(e){if(re(e.currentTarget))return e.preventDefault();e.preventDefault(),e.stopPropagation(),a()}),[a]),l=(0,o.useMemo)((function(){return{open:i===qe.Open}}),[i]);return X({props:q({},t,{ref:u,id:s,"aria-hidden":!0,onClick:c}),slot:l,defaultTag:"div",name:"Dialog.Overlay"})}));var tt,nt,rt,ot=Object.assign(Ze,{Overlay:et,Title:function e(t){var n=Ye([ot.displayName,e.name].join("."))[0],r=n.dialogState,i=n.setTitleId,a="headlessui-dialog-title-"+ce();(0,o.useEffect)((function(){return i(a),function(){return i(null)}}),[a,i]);var u=(0,o.useMemo)((function(){return{open:r===qe.Open}}),[r]);return X({props:q({},t,{id:a}),slot:u,defaultTag:"h2",name:"Dialog.Title"})},Description:Fe});!function(e){e[e.Open=0]="Open",e[e.Closed=1]="Closed"}(nt||(nt={})),function(e){e[e.ToggleDisclosure=0]="ToggleDisclosure",e[e.SetButtonId=1]="SetButtonId",e[e.SetPanelId=2]="SetPanelId",e[e.LinkPanel=3]="LinkPanel",e[e.UnlinkPanel=4]="UnlinkPanel"}(rt||(rt={}));var it=((tt={})[rt.ToggleDisclosure]=function(e){var t;return q({},e,{disclosureState:$(e.disclosureState,(t={},t[nt.Open]=nt.Closed,t[nt.Closed]=nt.Open,t))})},tt[rt.LinkPanel]=function(e){return!0===e.linkedPanel?e:q({},e,{linkedPanel:!0})},tt[rt.UnlinkPanel]=function(e){return!1===e.linkedPanel?e:q({},e,{linkedPanel:!1})},tt[rt.SetButtonId]=function(e,t){return e.buttonId===t.buttonId?e:q({},e,{buttonId:t.buttonId})},tt[rt.SetPanelId]=function(e,t){return e.panelId===t.panelId?e:q({},e,{panelId:t.panelId})},tt),at=(0,o.createContext)(null);function ut(e){var t=(0,o.useContext)(at);if(null===t){var n=new Error("<"+e+" /> is missing a parent <"+lt.name+" /> component.");throw Error.captureStackTrace&&Error.captureStackTrace(n,ut),n}return t}function st(e,t){return $(t.type,it,e,t)}at.displayName="DisclosureContext";var ct=o.Fragment;function lt(e){var t,n=e.defaultOpen,r=void 0!==n&&n,a=W(e,["defaultOpen"]),u="headlessui-disclosure-button-"+ce(),s="headlessui-disclosure-panel-"+ce(),c=(0,o.useReducer)(st,{disclosureState:r?nt.Open:nt.Closed,linkedPanel:!1,buttonId:u,panelId:s}),l=c[0].disclosureState,f=c[1];(0,o.useEffect)((function(){return f({type:rt.SetButtonId,buttonId:u})}),[u,f]),(0,o.useEffect)((function(){return f({type:rt.SetPanelId,panelId:s})}),[s,f]);var d=(0,o.useMemo)((function(){return{open:l===nt.Open}}),[l]);return i().createElement(at.Provider,{value:c},i().createElement(Ve,{value:$(l,(t={},t[nt.Open]=Me.Open,t[nt.Closed]=Me.Closed,t))},X({props:a,slot:d,defaultTag:ct,name:"Disclosure"})))}var ft=ee((function e(t,n){var r=ut([lt.name,e.name].join(".")),i=r[0],a=r[1],u=ne(n),s=(0,o.useCallback)((function(e){switch(e.key){case J.Space:case J.Enter:e.preventDefault(),e.stopPropagation(),a({type:rt.ToggleDisclosure})}}),[a]),c=(0,o.useCallback)((function(e){switch(e.key){case J.Space:e.preventDefault()}}),[]),l=(0,o.useCallback)((function(e){re(e.currentTarget)||t.disabled||a({type:rt.ToggleDisclosure})}),[a,t.disabled]),f=(0,o.useMemo)((function(){return{open:i.disclosureState===nt.Open}}),[i]);return X({props:q({},t,{ref:u,id:i.buttonId,type:"button","aria-expanded":i.disclosureState===nt.Open||void 0,"aria-controls":i.linkedPanel?i.panelId:void 0,onKeyDown:s,onKeyUp:c,onClick:l}),slot:f,defaultTag:"button",name:"Disclosure.Button"})})),dt=Q.RenderStrategy|Q.Static,pt=ee((function e(t,n){var r=ut([lt.name,e.name].join(".")),i=r[0],a=r[1],u=ne(n,(function(){i.linkedPanel||a({type:rt.LinkPanel})})),s=Ue(),c=null!==s?s===Me.Open:i.disclosureState===nt.Open;(0,o.useEffect)((function(){return function(){return a({type:rt.UnlinkPanel})}}),[a]),(0,o.useEffect)((function(){var e;i.disclosureState!==nt.Closed||null!=(e=t.unmount)&&!e||a({type:rt.UnlinkPanel})}),[i.disclosureState,t.unmount,a]);var l=(0,o.useMemo)((function(){return{open:i.disclosureState===nt.Open}}),[i]),f={ref:u,id:i.panelId};return X({props:q({},t,f),slot:l,defaultTag:"div",features:dt,visible:c,name:"Disclosure.Panel"})}));lt.Button=ft,lt.Panel=pt;var mt,vt,ht,yt;function bt(){var e=[],t={requestAnimationFrame:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(){var e=requestAnimationFrame.apply(void 0,arguments);t.add((function(){return cancelAnimationFrame(e)}))})),nextFrame:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t.requestAnimationFrame((function(){t.requestAnimationFrame.apply(t,n)}))},setTimeout:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(){var e=setTimeout.apply(void 0,arguments);t.add((function(){return clearTimeout(e)}))})),add:function(t){e.push(t)},dispose:function(){for(var t,n=z(e.splice(0));!(t=n()).done;){var r=t.value;r()}}};return t}function gt(){var e=(0,o.useState)(bt)[0];return(0,o.useEffect)((function(){return function(){return e.dispose()}}),[e]),e}function xt(e,t){var n=(0,o.useState)(e),r=n[0],i=n[1],a=(0,o.useRef)(e);return oe((function(){a.current=e}),[e]),oe((function(){return i(a.current)}),[a,i].concat(t)),r}function wt(e,t){var n=t.resolveItems();if(n.length<=0)return null;var r=t.resolveActiveIndex(),o=null!=r?r:-1,i=function(){switch(e.focus){case mt.First:return n.findIndex((function(e){return!t.resolveDisabled(e)}));case mt.Previous:var r=n.slice().reverse().findIndex((function(e,n,r){return!(-1!==o&&r.length-n-1>=o)&&!t.resolveDisabled(e)}));return-1===r?r:n.length-1-r;case mt.Next:return n.findIndex((function(e,n){return!(n<=o)&&!t.resolveDisabled(e)}));case mt.Last:var i=n.slice().reverse().findIndex((function(e){return!t.resolveDisabled(e)}));return-1===i?i:n.length-1-i;case mt.Specific:return n.findIndex((function(n){return t.resolveId(n)===e.id}));case mt.Nothing:return null;default:!function(e){throw new Error("Unexpected object: "+e)}(e)}}();return-1===i?r:i}!function(e){e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing"}(mt||(mt={})),function(e){e[e.Open=0]="Open",e[e.Closed=1]="Closed"}(ht||(ht={})),function(e){e[e.OpenListbox=0]="OpenListbox",e[e.CloseListbox=1]="CloseListbox",e[e.SetDisabled=2]="SetDisabled",e[e.GoToOption=3]="GoToOption",e[e.Search=4]="Search",e[e.ClearSearch=5]="ClearSearch",e[e.RegisterOption=6]="RegisterOption",e[e.UnregisterOption=7]="UnregisterOption"}(yt||(yt={}));var St=((vt={})[yt.CloseListbox]=function(e){return e.disabled||e.listboxState===ht.Closed?e:q({},e,{activeOptionIndex:null,listboxState:ht.Closed})},vt[yt.OpenListbox]=function(e){return e.disabled||e.listboxState===ht.Open?e:q({},e,{listboxState:ht.Open})},vt[yt.SetDisabled]=function(e,t){return e.disabled===t.disabled?e:q({},e,{disabled:t.disabled})},vt[yt.GoToOption]=function(e,t){if(e.disabled)return e;if(e.listboxState===ht.Closed)return e;var n=wt(t,{resolveItems:function(){return e.options},resolveActiveIndex:function(){return e.activeOptionIndex},resolveId:function(e){return e.id},resolveDisabled:function(e){return e.dataRef.current.disabled}});return""===e.searchQuery&&e.activeOptionIndex===n?e:q({},e,{searchQuery:"",activeOptionIndex:n})},vt[yt.Search]=function(e,t){if(e.disabled)return e;if(e.listboxState===ht.Closed)return e;var n=e.searchQuery+t.value.toLowerCase(),r=e.options.findIndex((function(e){var t;return!e.dataRef.current.disabled&&(null==(t=e.dataRef.current.textValue)?void 0:t.startsWith(n))}));return-1===r||r===e.activeOptionIndex?q({},e,{searchQuery:n}):q({},e,{searchQuery:n,activeOptionIndex:r})},vt[yt.ClearSearch]=function(e){return e.disabled||e.listboxState===ht.Closed||""===e.searchQuery?e:q({},e,{searchQuery:""})},vt[yt.RegisterOption]=function(e,t){return q({},e,{options:[].concat(e.options,[{id:t.id,dataRef:t.dataRef}])})},vt[yt.UnregisterOption]=function(e,t){var n=e.options.slice(),r=null!==e.activeOptionIndex?n[e.activeOptionIndex]:null,o=n.findIndex((function(e){return e.id===t.id}));return-1!==o&&n.splice(o,1),q({},e,{options:n,activeOptionIndex:o===e.activeOptionIndex||null===r?null:n.indexOf(r)})},vt),kt=(0,o.createContext)(null);function jt(e){var t=(0,o.useContext)(kt);if(null===t){var n=new Error("<"+e+" /> is missing a parent <"+Et.name+" /> component.");throw Error.captureStackTrace&&Error.captureStackTrace(n,jt),n}return t}function Ot(e,t){return $(t.type,St,e,t)}kt.displayName="ListboxContext";var Ct=o.Fragment;function Et(e){var t,n=e.value,r=e.onChange,a=e.disabled,u=void 0!==a&&a,s=W(e,["value","onChange","disabled"]),c=(0,o.useReducer)(Ot,{listboxState:ht.Closed,propsRef:{current:{value:n,onChange:r}},labelRef:(0,o.createRef)(),buttonRef:(0,o.createRef)(),optionsRef:(0,o.createRef)(),disabled:u,options:[],searchQuery:"",activeOptionIndex:null}),l=c[0],f=l.listboxState,d=l.propsRef,p=l.optionsRef,m=l.buttonRef,v=c[1];oe((function(){d.current.value=n}),[n,d]),oe((function(){d.current.onChange=r}),[r,d]),oe((function(){return v({type:yt.SetDisabled,disabled:u})}),[u]),xe("mousedown",(function(e){var t,n,r,o=e.target;f===ht.Open&&((null==(t=m.current)?void 0:t.contains(o))||(null==(n=p.current)?void 0:n.contains(o))||(v({type:yt.CloseListbox}),ye(o,pe.Loose)||(e.preventDefault(),null==(r=m.current)||r.focus())))}));var h=(0,o.useMemo)((function(){return{open:f===ht.Open,disabled:u}}),[f,u]);return i().createElement(kt.Provider,{value:c},i().createElement(Ve,{value:$(f,(t={},t[ht.Open]=Me.Open,t[ht.Closed]=Me.Closed,t))},X({props:s,slot:h,defaultTag:Ct,name:"Listbox"})))}var Pt=ee((function e(t,n){var r,i=jt([Et.name,e.name].join(".")),a=i[0],u=i[1],s=ne(a.buttonRef,n),c="headlessui-listbox-button-"+ce(),l=gt(),f=(0,o.useCallback)((function(e){switch(e.key){case J.Space:case J.Enter:case J.ArrowDown:e.preventDefault(),u({type:yt.OpenListbox}),l.nextFrame((function(){a.propsRef.current.value||u({type:yt.GoToOption,focus:mt.First})}));break;case J.ArrowUp:e.preventDefault(),u({type:yt.OpenListbox}),l.nextFrame((function(){a.propsRef.current.value||u({type:yt.GoToOption,focus:mt.Last})}))}}),[u,a,l]),d=(0,o.useCallback)((function(e){switch(e.key){case J.Space:e.preventDefault()}}),[]),p=(0,o.useCallback)((function(e){if(re(e.currentTarget))return e.preventDefault();a.listboxState===ht.Open?(u({type:yt.CloseListbox}),l.nextFrame((function(){var e;return null==(e=a.buttonRef.current)?void 0:e.focus({preventScroll:!0})}))):(e.preventDefault(),u({type:yt.OpenListbox}))}),[u,l,a]),m=xt((function(){if(a.labelRef.current)return[a.labelRef.current.id,c].join(" ")}),[a.labelRef.current,c]),v=(0,o.useMemo)((function(){return{open:a.listboxState===ht.Open,disabled:a.disabled}}),[a]);return X({props:q({},t,{ref:s,id:c,type:"button","aria-haspopup":!0,"aria-controls":null==(r=a.optionsRef.current)?void 0:r.id,"aria-expanded":a.listboxState===ht.Open||void 0,"aria-labelledby":m,disabled:a.disabled,onKeyDown:f,onKeyUp:d,onClick:p}),slot:v,defaultTag:"button",name:"Listbox.Button"})}));var It,Nt,Tt,_t=Q.RenderStrategy|Q.Static,Rt=ee((function e(t,n){var r,i=jt([Et.name,e.name].join(".")),a=i[0],u=i[1],s=ne(a.optionsRef,n),c="headlessui-listbox-options-"+ce(),l=gt(),f=gt(),d=Ue(),p=null!==d?d===Me.Open:a.listboxState===ht.Open;oe((function(){var e=a.optionsRef.current;e&&a.listboxState===ht.Open&&e!==document.activeElement&&e.focus({preventScroll:!0})}),[a.listboxState,a.optionsRef]);var m=(0,o.useCallback)((function(e){switch(f.dispose(),e.key){case J.Space:if(""!==a.searchQuery)return e.preventDefault(),e.stopPropagation(),u({type:yt.Search,value:e.key});case J.Enter:if(e.preventDefault(),e.stopPropagation(),u({type:yt.CloseListbox}),null!==a.activeOptionIndex){var t=a.options[a.activeOptionIndex].dataRef;a.propsRef.current.onChange(t.current.value)}bt().nextFrame((function(){var e;return null==(e=a.buttonRef.current)?void 0:e.focus({preventScroll:!0})}));break;case J.ArrowDown:return e.preventDefault(),e.stopPropagation(),u({type:yt.GoToOption,focus:mt.Next});case J.ArrowUp:return e.preventDefault(),e.stopPropagation(),u({type:yt.GoToOption,focus:mt.Previous});case J.Home:case J.PageUp:return e.preventDefault(),e.stopPropagation(),u({type:yt.GoToOption,focus:mt.First});case J.End:case J.PageDown:return e.preventDefault(),e.stopPropagation(),u({type:yt.GoToOption,focus:mt.Last});case J.Escape:return e.preventDefault(),e.stopPropagation(),u({type:yt.CloseListbox}),l.nextFrame((function(){var e;return null==(e=a.buttonRef.current)?void 0:e.focus({preventScroll:!0})}));case J.Tab:e.preventDefault(),e.stopPropagation();break;default:1===e.key.length&&(u({type:yt.Search,value:e.key}),f.setTimeout((function(){return u({type:yt.ClearSearch})}),350))}}),[l,u,f,a]),v=xt((function(){var e,t,n;return null!=(e=null==(t=a.labelRef.current)?void 0:t.id)?e:null==(n=a.buttonRef.current)?void 0:n.id}),[a.labelRef.current,a.buttonRef.current]),h=(0,o.useMemo)((function(){return{open:a.listboxState===ht.Open}}),[a]);return X({props:q({},t,{"aria-activedescendant":null===a.activeOptionIndex||null==(r=a.options[a.activeOptionIndex])?void 0:r.id,"aria-labelledby":v,id:c,onKeyDown:m,role:"listbox",tabIndex:0,ref:s}),slot:h,defaultTag:"ul",features:_t,visible:p,name:"Listbox.Options"})}));function At(e){var t=e.container,n=e.accept,r=e.walk,i=e.enabled,a=void 0===i||i,u=(0,o.useRef)(n),s=(0,o.useRef)(r);(0,o.useEffect)((function(){u.current=n,s.current=r}),[n,r]),oe((function(){if(t&&a)for(var e=u.current,n=s.current,r=Object.assign((function(t){return e(t)}),{acceptNode:e}),o=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,r,!1);o.nextNode();)n(o.currentNode)}),[t,a,u,s])}Et.Button=Pt,Et.Label=function e(t){var n=jt([Et.name,e.name].join("."))[0],r="headlessui-listbox-label-"+ce(),i=(0,o.useCallback)((function(){var e;return null==(e=n.buttonRef.current)?void 0:e.focus({preventScroll:!0})}),[n.buttonRef]),a=(0,o.useMemo)((function(){return{open:n.listboxState===ht.Open,disabled:n.disabled}}),[n]);return X({props:q({},t,{ref:n.labelRef,id:r,onClick:i}),slot:a,defaultTag:"label",name:"Listbox.Label"})},Et.Options=Rt,Et.Option=function e(t){var n=t.disabled,r=void 0!==n&&n,i=t.value,a=W(t,["disabled","value"]),u=jt([Et.name,e.name].join(".")),s=u[0],c=u[1],l="headlessui-listbox-option-"+ce(),f=null!==s.activeOptionIndex&&s.options[s.activeOptionIndex].id===l,d=s.propsRef.current.value===i,p=(0,o.useRef)({disabled:r,value:i});oe((function(){p.current.disabled=r}),[p,r]),oe((function(){p.current.value=i}),[p,i]),oe((function(){var e,t;p.current.textValue=null==(e=document.getElementById(l))||null==(t=e.textContent)?void 0:t.toLowerCase()}),[p,l]);var m=(0,o.useCallback)((function(){return s.propsRef.current.onChange(i)}),[s.propsRef,i]);oe((function(){return c({type:yt.RegisterOption,id:l,dataRef:p}),function(){return c({type:yt.UnregisterOption,id:l})}}),[p,l]),oe((function(){var e;s.listboxState===ht.Open&&d&&(c({type:yt.GoToOption,focus:mt.Specific,id:l}),null==(e=document.getElementById(l))||null==e.focus||e.focus())}),[s.listboxState]),oe((function(){if(s.listboxState===ht.Open&&f){var e=bt();return e.nextFrame((function(){var e;return null==(e=document.getElementById(l))||null==e.scrollIntoView?void 0:e.scrollIntoView({block:"nearest"})})),e.dispose}}),[l,f,s.listboxState]);var v=(0,o.useCallback)((function(e){if(r)return e.preventDefault();m(),c({type:yt.CloseListbox}),bt().nextFrame((function(){var e;return null==(e=s.buttonRef.current)?void 0:e.focus({preventScroll:!0})}))}),[c,s.buttonRef,r,m]),h=(0,o.useCallback)((function(){if(r)return c({type:yt.GoToOption,focus:mt.Nothing});c({type:yt.GoToOption,focus:mt.Specific,id:l})}),[r,l,c]),y=(0,o.useCallback)((function(){r||f||c({type:yt.GoToOption,focus:mt.Specific,id:l})}),[r,f,l,c]),b=(0,o.useCallback)((function(){r||f&&c({type:yt.GoToOption,focus:mt.Nothing})}),[r,f,c]),g=(0,o.useMemo)((function(){return{active:f,selected:d,disabled:r}}),[f,d,r]);return X({props:q({},a,{id:l,role:"option",tabIndex:-1,"aria-disabled":!0===r||void 0,"aria-selected":!0===d||void 0,onClick:v,onFocus:h,onPointerMove:y,onMouseMove:y,onPointerLeave:b,onMouseLeave:b}),slot:g,defaultTag:"li",name:"Listbox.Option"})},function(e){e[e.Open=0]="Open",e[e.Closed=1]="Closed"}(Nt||(Nt={})),function(e){e[e.OpenMenu=0]="OpenMenu",e[e.CloseMenu=1]="CloseMenu",e[e.GoToItem=2]="GoToItem",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterItem=5]="RegisterItem",e[e.UnregisterItem=6]="UnregisterItem"}(Tt||(Tt={}));var Lt=((It={})[Tt.CloseMenu]=function(e){return e.menuState===Nt.Closed?e:q({},e,{activeItemIndex:null,menuState:Nt.Closed})},It[Tt.OpenMenu]=function(e){return e.menuState===Nt.Open?e:q({},e,{menuState:Nt.Open})},It[Tt.GoToItem]=function(e,t){var n=wt(t,{resolveItems:function(){return e.items},resolveActiveIndex:function(){return e.activeItemIndex},resolveId:function(e){return e.id},resolveDisabled:function(e){return e.dataRef.current.disabled}});return""===e.searchQuery&&e.activeItemIndex===n?e:q({},e,{searchQuery:"",activeItemIndex:n})},It[Tt.Search]=function(e,t){var n=e.searchQuery+t.value.toLowerCase(),r=e.items.findIndex((function(e){var t;return(null==(t=e.dataRef.current.textValue)?void 0:t.startsWith(n))&&!e.dataRef.current.disabled}));return-1===r||r===e.activeItemIndex?q({},e,{searchQuery:n}):q({},e,{searchQuery:n,activeItemIndex:r})},It[Tt.ClearSearch]=function(e){return""===e.searchQuery?e:q({},e,{searchQuery:""})},It[Tt.RegisterItem]=function(e,t){return q({},e,{items:[].concat(e.items,[{id:t.id,dataRef:t.dataRef}])})},It[Tt.UnregisterItem]=function(e,t){var n=e.items.slice(),r=null!==e.activeItemIndex?n[e.activeItemIndex]:null,o=n.findIndex((function(e){return e.id===t.id}));return-1!==o&&n.splice(o,1),q({},e,{items:n,activeItemIndex:o===e.activeItemIndex||null===r?null:n.indexOf(r)})},It),Dt=(0,o.createContext)(null);function Ft(e){var t=(0,o.useContext)(Dt);if(null===t){var n=new Error("<"+e+" /> is missing a parent <"+Ut.name+" /> component.");throw Error.captureStackTrace&&Error.captureStackTrace(n,Ft),n}return t}function Mt(e,t){return $(t.type,Lt,e,t)}Dt.displayName="MenuContext";var Bt=o.Fragment;function Ut(e){var t,n=(0,o.useReducer)(Mt,{menuState:Nt.Closed,buttonRef:(0,o.createRef)(),itemsRef:(0,o.createRef)(),items:[],searchQuery:"",activeItemIndex:null}),r=n[0],a=r.menuState,u=r.itemsRef,s=r.buttonRef,c=n[1];xe("mousedown",(function(e){var t,n,r,o=e.target;a===Nt.Open&&((null==(t=s.current)?void 0:t.contains(o))||(null==(n=u.current)?void 0:n.contains(o))||(c({type:Tt.CloseMenu}),ye(o,pe.Loose)||(e.preventDefault(),null==(r=s.current)||r.focus())))}));var l=(0,o.useMemo)((function(){return{open:a===Nt.Open}}),[a]);return i().createElement(Dt.Provider,{value:n},i().createElement(Ve,{value:$(a,(t={},t[Nt.Open]=Me.Open,t[Nt.Closed]=Me.Closed,t))},X({props:e,slot:l,defaultTag:Bt,name:"Menu"})))}var Vt,Gt,Ht,qt=ee((function e(t,n){var r,i=Ft([Ut.name,e.name].join(".")),a=i[0],u=i[1],s=ne(a.buttonRef,n),c="headlessui-menu-button-"+ce(),l=gt(),f=(0,o.useCallback)((function(e){switch(e.key){case J.Space:case J.Enter:case J.ArrowDown:e.preventDefault(),e.stopPropagation(),u({type:Tt.OpenMenu}),l.nextFrame((function(){return u({type:Tt.GoToItem,focus:mt.First})}));break;case J.ArrowUp:e.preventDefault(),e.stopPropagation(),u({type:Tt.OpenMenu}),l.nextFrame((function(){return u({type:Tt.GoToItem,focus:mt.Last})}))}}),[u,l]),d=(0,o.useCallback)((function(e){switch(e.key){case J.Space:e.preventDefault()}}),[]),p=(0,o.useCallback)((function(e){if(re(e.currentTarget))return e.preventDefault();t.disabled||(a.menuState===Nt.Open?(u({type:Tt.CloseMenu}),l.nextFrame((function(){var e;return null==(e=a.buttonRef.current)?void 0:e.focus({preventScroll:!0})}))):(e.preventDefault(),e.stopPropagation(),u({type:Tt.OpenMenu})))}),[u,l,a,t.disabled]),m=(0,o.useMemo)((function(){return{open:a.menuState===Nt.Open}}),[a]);return X({props:q({},t,{ref:s,id:c,type:"button","aria-haspopup":!0,"aria-controls":null==(r=a.itemsRef.current)?void 0:r.id,"aria-expanded":a.menuState===Nt.Open||void 0,onKeyDown:f,onKeyUp:d,onClick:p}),slot:m,defaultTag:"button",name:"Menu.Button"})})),Wt=Q.RenderStrategy|Q.Static,Kt=ee((function e(t,n){var r,i,a=Ft([Ut.name,e.name].join(".")),u=a[0],s=a[1],c=ne(u.itemsRef,n),l="headlessui-menu-items-"+ce(),f=gt(),d=Ue(),p=null!==d?d===Me.Open:u.menuState===Nt.Open;(0,o.useEffect)((function(){var e=u.itemsRef.current;e&&u.menuState===Nt.Open&&e!==document.activeElement&&e.focus({preventScroll:!0})}),[u.menuState,u.itemsRef]),At({container:u.itemsRef.current,enabled:u.menuState===Nt.Open,accept:function(e){return"menuitem"===e.getAttribute("role")?NodeFilter.FILTER_REJECT:e.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk:function(e){e.setAttribute("role","none")}});var m=(0,o.useCallback)((function(e){switch(f.dispose(),e.key){case J.Space:if(""!==u.searchQuery)return e.preventDefault(),e.stopPropagation(),s({type:Tt.Search,value:e.key});case J.Enter:if(e.preventDefault(),e.stopPropagation(),s({type:Tt.CloseMenu}),null!==u.activeItemIndex){var t,n=u.items[u.activeItemIndex].id;null==(t=document.getElementById(n))||t.click()}bt().nextFrame((function(){var e;return null==(e=u.buttonRef.current)?void 0:e.focus({preventScroll:!0})}));break;case J.ArrowDown:return e.preventDefault(),e.stopPropagation(),s({type:Tt.GoToItem,focus:mt.Next});case J.ArrowUp:return e.preventDefault(),e.stopPropagation(),s({type:Tt.GoToItem,focus:mt.Previous});case J.Home:case J.PageUp:return e.preventDefault(),e.stopPropagation(),s({type:Tt.GoToItem,focus:mt.First});case J.End:case J.PageDown:return e.preventDefault(),e.stopPropagation(),s({type:Tt.GoToItem,focus:mt.Last});case J.Escape:e.preventDefault(),e.stopPropagation(),s({type:Tt.CloseMenu}),bt().nextFrame((function(){var e;return null==(e=u.buttonRef.current)?void 0:e.focus({preventScroll:!0})}));break;case J.Tab:e.preventDefault(),e.stopPropagation();break;default:1===e.key.length&&(s({type:Tt.Search,value:e.key}),f.setTimeout((function(){return s({type:Tt.ClearSearch})}),350))}}),[s,f,u]),v=(0,o.useCallback)((function(e){switch(e.key){case J.Space:e.preventDefault()}}),[]),h=(0,o.useMemo)((function(){return{open:u.menuState===Nt.Open}}),[u]);return X({props:q({},t,{"aria-activedescendant":null===u.activeItemIndex||null==(r=u.items[u.activeItemIndex])?void 0:r.id,"aria-labelledby":null==(i=u.buttonRef.current)?void 0:i.id,id:l,onKeyDown:m,onKeyUp:v,role:"menu",tabIndex:0,ref:c}),slot:h,defaultTag:"div",features:Wt,visible:p,name:"Menu.Items"})})),zt=o.Fragment;Ut.Button=qt,Ut.Items=Kt,Ut.Item=function e(t){var n=t.disabled,r=void 0!==n&&n,i=t.onClick,a=W(t,["disabled","onClick"]),u=Ft([Ut.name,e.name].join(".")),s=u[0],c=u[1],l="headlessui-menu-item-"+ce(),f=null!==s.activeItemIndex&&s.items[s.activeItemIndex].id===l;oe((function(){if(s.menuState===Nt.Open&&f){var e=bt();return e.nextFrame((function(){var e;return null==(e=document.getElementById(l))||null==e.scrollIntoView?void 0:e.scrollIntoView({block:"nearest"})})),e.dispose}}),[l,f,s.menuState]);var d=(0,o.useRef)({disabled:r});oe((function(){d.current.disabled=r}),[d,r]),oe((function(){var e,t;d.current.textValue=null==(e=document.getElementById(l))||null==(t=e.textContent)?void 0:t.toLowerCase()}),[d,l]),oe((function(){return c({type:Tt.RegisterItem,id:l,dataRef:d}),function(){return c({type:Tt.UnregisterItem,id:l})}}),[d,l]);var p=(0,o.useCallback)((function(e){return r?e.preventDefault():(c({type:Tt.CloseMenu}),bt().nextFrame((function(){var e;return null==(e=s.buttonRef.current)?void 0:e.focus({preventScroll:!0})})),i?i(e):void 0)}),[c,s.buttonRef,r,i]),m=(0,o.useCallback)((function(){if(r)return c({type:Tt.GoToItem,focus:mt.Nothing});c({type:Tt.GoToItem,focus:mt.Specific,id:l})}),[r,l,c]),v=(0,o.useCallback)((function(){r||f||c({type:Tt.GoToItem,focus:mt.Specific,id:l})}),[r,f,l,c]),h=(0,o.useCallback)((function(){r||f&&c({type:Tt.GoToItem,focus:mt.Nothing})}),[r,f,c]),y=(0,o.useMemo)((function(){return{active:f,disabled:r}}),[f,r]);return X({props:q({},a,{id:l,role:"menuitem",tabIndex:-1,"aria-disabled":!0===r||void 0,onClick:p,onFocus:m,onPointerMove:v,onMouseMove:v,onPointerLeave:h,onMouseLeave:h}),slot:y,defaultTag:zt,name:"Menu.Item"})},function(e){e[e.Open=0]="Open",e[e.Closed=1]="Closed"}(Gt||(Gt={})),function(e){e[e.TogglePopover=0]="TogglePopover",e[e.ClosePopover=1]="ClosePopover",e[e.SetButton=2]="SetButton",e[e.SetButtonId=3]="SetButtonId",e[e.SetPanel=4]="SetPanel",e[e.SetPanelId=5]="SetPanelId"}(Ht||(Ht={}));var $t=((Vt={})[Ht.TogglePopover]=function(e){var t;return q({},e,{popoverState:$(e.popoverState,(t={},t[Gt.Open]=Gt.Closed,t[Gt.Closed]=Gt.Open,t))})},Vt[Ht.ClosePopover]=function(e){return e.popoverState===Gt.Closed?e:q({},e,{popoverState:Gt.Closed})},Vt[Ht.SetButton]=function(e,t){return e.button===t.button?e:q({},e,{button:t.button})},Vt[Ht.SetButtonId]=function(e,t){return e.buttonId===t.buttonId?e:q({},e,{buttonId:t.buttonId})},Vt[Ht.SetPanel]=function(e,t){return e.panel===t.panel?e:q({},e,{panel:t.panel})},Vt[Ht.SetPanelId]=function(e,t){return e.panelId===t.panelId?e:q({},e,{panelId:t.panelId})},Vt),Qt=(0,o.createContext)(null);function Yt(e){var t=(0,o.useContext)(Qt);if(null===t){var n=new Error("<"+e+" /> is missing a parent <"+tn.name+" /> component.");throw Error.captureStackTrace&&Error.captureStackTrace(n,Yt),n}return t}Qt.displayName="PopoverContext";var Jt=(0,o.createContext)(null);function Xt(){return(0,o.useContext)(Jt)}Jt.displayName="PopoverGroupContext";var Zt=(0,o.createContext)(null);function en(e,t){return $(t.type,$t,e,t)}Zt.displayName="PopoverPanelContext";function tn(e){var t,n="headlessui-popover-button-"+ce(),r="headlessui-popover-panel-"+ce(),a=(0,o.useReducer)(en,{popoverState:Gt.Closed,button:null,buttonId:n,panel:null,panelId:r}),u=a[0],s=u.popoverState,c=u.button,l=u.panel,f=a[1];(0,o.useEffect)((function(){return f({type:Ht.SetButtonId,buttonId:n})}),[n,f]),(0,o.useEffect)((function(){return f({type:Ht.SetPanelId,panelId:r})}),[r,f]);var d=(0,o.useMemo)((function(){return{buttonId:n,panelId:r,close:function(){return f({type:Ht.ClosePopover})}}}),[n,r,f]),p=Xt(),m=null==p?void 0:p.registerPopover,v=(0,o.useCallback)((function(){var e;return null!=(e=null==p?void 0:p.isFocusWithinPopoverGroup())?e:(null==c?void 0:c.contains(document.activeElement))||(null==l?void 0:l.contains(document.activeElement))}),[p,c,l]);(0,o.useEffect)((function(){return null==m?void 0:m(d)}),[m,d]),xe("focus",(function(){s===Gt.Open&&(v()||c&&l&&f({type:Ht.ClosePopover}))}),!0),xe("mousedown",(function(e){var t=e.target;s===Gt.Open&&((null==c?void 0:c.contains(t))||(null==l?void 0:l.contains(t))||(f({type:Ht.ClosePopover}),ye(t,pe.Loose)||(e.preventDefault(),null==c||c.focus())))}));var h=(0,o.useMemo)((function(){return{open:s===Gt.Open}}),[s]);return i().createElement(Qt.Provider,{value:a},i().createElement(Ve,{value:$(s,(t={},t[Gt.Open]=Me.Open,t[Gt.Closed]=Me.Closed,t))},X({props:e,slot:h,defaultTag:"div",name:"Popover"})))}var nn=ee((function e(t,n){var r=Yt([tn.name,e.name].join(".")),i=r[0],a=r[1],u=(0,o.useRef)(null),s=Xt(),c=null==s?void 0:s.closeOthers,l=(0,o.useContext)(Zt),f=null!==l&&l===i.panelId,d=ne(u,n,f?null:function(e){return a({type:Ht.SetButton,button:e})}),p=(0,o.useRef)(null),m=(0,o.useRef)("undefined"==typeof window?null:document.activeElement);xe("focus",(function(){m.current=p.current,p.current=document.activeElement}),!0);var v=(0,o.useCallback)((function(e){var t;if(f){if(i.popoverState===Gt.Closed)return;switch(e.key){case J.Space:case J.Enter:e.preventDefault(),e.stopPropagation(),a({type:Ht.ClosePopover}),null==(t=i.button)||t.focus()}}else switch(e.key){case J.Space:case J.Enter:e.preventDefault(),e.stopPropagation(),i.popoverState===Gt.Closed&&(null==c||c(i.buttonId)),a({type:Ht.TogglePopover});break;case J.Escape:if(i.popoverState!==Gt.Open)return null==c?void 0:c(i.buttonId);if(!u.current)return;if(!u.current.contains(document.activeElement))return;a({type:Ht.ClosePopover});break;case J.Tab:if(i.popoverState!==Gt.Open)return;if(!i.panel)return;if(!i.button)return;if(e.shiftKey){var n;if(!m.current)return;if(null==(n=i.button)?void 0:n.contains(m.current))return;if(i.panel.contains(m.current))return;var r=he(),o=r.indexOf(m.current);if(r.indexOf(i.button)>o)return;e.preventDefault(),e.stopPropagation(),ge(i.panel,le.Last)}else e.preventDefault(),e.stopPropagation(),ge(i.panel,le.First)}}),[a,i.popoverState,i.buttonId,i.button,i.panel,u,c,f]),h=(0,o.useCallback)((function(e){var t;if(!f&&(e.key===J.Space&&e.preventDefault(),i.popoverState===Gt.Open&&i.panel&&i.button))switch(e.key){case J.Tab:if(!m.current)return;if(null==(t=i.button)?void 0:t.contains(m.current))return;if(i.panel.contains(m.current))return;var n=he(),r=n.indexOf(m.current);if(n.indexOf(i.button)>r)return;e.preventDefault(),e.stopPropagation(),ge(i.panel,le.Last)}}),[i.popoverState,i.panel,i.button,f]),y=(0,o.useCallback)((function(e){var n,r;re(e.currentTarget)||(t.disabled||(f?(a({type:Ht.ClosePopover}),null==(n=i.button)||n.focus()):(i.popoverState===Gt.Closed&&(null==c||c(i.buttonId)),null==(r=i.button)||r.focus(),a({type:Ht.TogglePopover}))))}),[a,i.button,i.popoverState,i.buttonId,t.disabled,c,f]),b=(0,o.useMemo)((function(){return{open:i.popoverState===Gt.Open}}),[i]);return X({props:q({},t,f?{type:"button",onKeyDown:v,onClick:y}:{ref:d,id:i.buttonId,type:"button","aria-expanded":i.popoverState===Gt.Open||void 0,"aria-controls":i.panel?i.panelId:void 0,onKeyDown:v,onKeyUp:h,onClick:y}),slot:b,defaultTag:"button",name:"Popover.Button"})})),rn=Q.RenderStrategy|Q.Static,on=ee((function e(t,n){var r=Yt([tn.name,e.name].join(".")),i=r[0].popoverState,a=r[1],u=ne(n),s="headlessui-popover-overlay-"+ce(),c=Ue(),l=null!==c?c===Me.Open:i===Gt.Open,f=(0,o.useCallback)((function(e){if(re(e.currentTarget))return e.preventDefault();a({type:Ht.ClosePopover})}),[a]),d=(0,o.useMemo)((function(){return{open:i===Gt.Open}}),[i]);return X({props:q({},t,{ref:u,id:s,"aria-hidden":!0,onClick:f}),slot:d,defaultTag:"div",features:rn,visible:l,name:"Popover.Overlay"})})),an=Q.RenderStrategy|Q.Static,un=ee((function e(t,n){var r=t.focus,a=void 0!==r&&r,u=W(t,["focus"]),s=Yt([tn.name,e.name].join(".")),c=s[0],l=s[1],f=(0,o.useRef)(null),d=ne(f,n,(function(e){l({type:Ht.SetPanel,panel:e})})),p=Ue(),m=null!==p?p===Me.Open:c.popoverState===Gt.Open,v=(0,o.useCallback)((function(e){var t;switch(e.key){case J.Escape:if(c.popoverState!==Gt.Open)return;if(!f.current)return;if(!f.current.contains(document.activeElement))return;e.preventDefault(),l({type:Ht.ClosePopover}),null==(t=c.button)||t.focus()}}),[c,f,l]);(0,o.useEffect)((function(){return function(){return l({type:Ht.SetPanel,panel:null})}}),[l]),(0,o.useEffect)((function(){var e;c.popoverState!==Gt.Closed||null!=(e=t.unmount)&&!e||l({type:Ht.SetPanel,panel:null})}),[c.popoverState,t.unmount,l]),(0,o.useEffect)((function(){if(a&&c.popoverState===Gt.Open&&f.current){var e=document.activeElement;f.current.contains(e)||ge(f.current,le.First)}}),[a,f,c.popoverState]),xe("keydown",(function(e){if(c.popoverState===Gt.Open&&f.current&&e.key===J.Tab&&document.activeElement&&f.current&&f.current.contains(document.activeElement)){e.preventDefault();var t,n=ge(f.current,e.shiftKey?le.Previous:le.Next);if(n===fe.Underflow)return null==(t=c.button)?void 0:t.focus();if(n===fe.Overflow){if(!c.button)return;var r=he(),o=r.indexOf(c.button);ge(r.splice(o+1).filter((function(e){var t;return!(null==(t=f.current)?void 0:t.contains(e))})),le.First)===fe.Error&&ge(document.body,le.First)}}})),xe("focus",(function(){var e;a&&c.popoverState===Gt.Open&&f.current&&((null==(e=f.current)?void 0:e.contains(document.activeElement))||l({type:Ht.ClosePopover}))}),!0);var h=(0,o.useMemo)((function(){return{open:c.popoverState===Gt.Open}}),[c]),y={ref:d,id:c.panelId,onKeyDown:v};return i().createElement(Zt.Provider,{value:c.panelId},X({props:q({},u,y),slot:h,defaultTag:"div",features:an,visible:m,name:"Popover.Panel"}))}));tn.Button=nn,tn.Overlay=on,tn.Panel=un,tn.Group=function(e){var t=(0,o.useRef)(null),n=(0,o.useState)([]),r=n[0],a=n[1],u=(0,o.useCallback)((function(e){a((function(t){var n=t.indexOf(e);if(-1!==n){var r=t.slice();return r.splice(n,1),r}return t}))}),[a]),s=(0,o.useCallback)((function(e){return a((function(t){return[].concat(t,[e])})),function(){return u(e)}}),[a,u]),c=(0,o.useCallback)((function(){var e,n=document.activeElement;return!!(null==(e=t.current)?void 0:e.contains(n))||r.some((function(e){var t,r;return(null==(t=document.getElementById(e.buttonId))?void 0:t.contains(n))||(null==(r=document.getElementById(e.panelId))?void 0:r.contains(n))}))}),[t,r]),l=(0,o.useCallback)((function(e){for(var t,n=z(r);!(t=n()).done;){var o=t.value;o.buttonId!==e&&o.close()}}),[r]),f=(0,o.useMemo)((function(){return{registerPopover:s,unregisterPopover:u,isFocusWithinPopoverGroup:c,closeOthers:l}}),[s,u,c,l]),d=(0,o.useMemo)((function(){return{}}),[]),p={ref:t},m=e;return i().createElement(Jt.Provider,{value:f},X({props:q({},m,p),slot:d,defaultTag:"div",name:"Popover.Group"}))};var sn=(0,o.createContext)(null);function cn(){var e=(0,o.useContext)(sn);if(null===e){var t=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,cn),t}return e}function ln(){var e=(0,o.useState)([]),t=e[0],n=e[1];return[t.length>0?t.join(" "):void 0,(0,o.useMemo)((function(){return function(e){var t=(0,o.useCallback)((function(e){return n((function(t){return[].concat(t,[e])})),function(){return n((function(t){var n=t.slice(),r=n.indexOf(e);return-1!==r&&n.splice(r,1),n}))}}),[]),r=(0,o.useMemo)((function(){return{register:t,slot:e.slot,name:e.name,props:e.props}}),[t,e.slot,e.name,e.props]);return i().createElement(sn.Provider,{value:r},e.children)}}),[n])]}var fn,dn;function pn(e){var t=e.passive,n=void 0!==t&&t,r=W(e,["passive"]),o=cn(),i="headlessui-label-"+ce();oe((function(){return o.register(i)}),[i,o.register]);var a=q({},o.props,{id:i}),u=q({},r,a);return n&&delete u.onClick,X({props:u,slot:o.slot||{},defaultTag:"label",name:o.name||"Label"})}!function(e){e[e.RegisterOption=0]="RegisterOption",e[e.UnregisterOption=1]="UnregisterOption"}(dn||(dn={}));var mn=((fn={})[dn.RegisterOption]=function(e,t){return q({},e,{options:[].concat(e.options,[{id:t.id,element:t.element,propsRef:t.propsRef}])})},fn[dn.UnregisterOption]=function(e,t){var n=e.options.slice(),r=e.options.findIndex((function(e){return e.id===t.id}));return-1===r?e:(n.splice(r,1),q({},e,{options:n}))},fn),vn=(0,o.createContext)(null);function hn(e){var t=(0,o.useContext)(vn);if(null===t){var n=new Error("<"+e+" /> is missing a parent <"+gn.name+" /> component.");throw Error.captureStackTrace&&Error.captureStackTrace(n,hn),n}return t}function yn(e,t){return $(t.type,mn,e,t)}vn.displayName="RadioGroupContext";var bn;function gn(e){var t=e.value,n=e.onChange,r=e.disabled,a=void 0!==r&&r,u=W(e,["value","onChange","disabled"]),s=(0,o.useReducer)(yn,{options:[]}),c=s[0].options,l=s[1],f=ln(),d=f[0],p=f[1],m=De(),v=m[0],h=m[1],y="headlessui-radiogroup-"+ce(),b=(0,o.useRef)(null),g=(0,o.useMemo)((function(){return c.find((function(e){return!e.propsRef.current.disabled}))}),[c]),x=(0,o.useMemo)((function(){return c.some((function(e){return e.propsRef.current.value===t}))}),[c,t]),w=(0,o.useCallback)((function(e){var r;if(a)return!1;if(e===t)return!1;var o=null==(r=c.find((function(t){return t.propsRef.current.value===e})))?void 0:r.propsRef.current;return!(null==o?void 0:o.disabled)&&(n(e),!0)}),[n,t,a,c]);At({container:b.current,accept:function(e){return"radio"===e.getAttribute("role")?NodeFilter.FILTER_REJECT:e.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk:function(e){e.setAttribute("role","none")}});var S=(0,o.useCallback)((function(e){if(b.current){var t=c.filter((function(e){return!1===e.propsRef.current.disabled})).map((function(e){return e.element.current}));switch(e.key){case J.ArrowLeft:case J.ArrowUp:if(e.preventDefault(),e.stopPropagation(),ge(t,le.Previous|le.WrapAround)===fe.Success){var n=c.find((function(e){return e.element.current===document.activeElement}));n&&w(n.propsRef.current.value)}break;case J.ArrowRight:case J.ArrowDown:if(e.preventDefault(),e.stopPropagation(),ge(t,le.Next|le.WrapAround)===fe.Success){var r=c.find((function(e){return e.element.current===document.activeElement}));r&&w(r.propsRef.current.value)}break;case J.Space:e.preventDefault(),e.stopPropagation();var o=c.find((function(e){return e.element.current===document.activeElement}));o&&w(o.propsRef.current.value)}}}),[b,c,w]),k=(0,o.useCallback)((function(e){return l(q({type:dn.RegisterOption},e)),function(){return l({type:dn.UnregisterOption,id:e.id})}}),[l]),j=(0,o.useMemo)((function(){return{registerOption:k,firstOption:g,containsCheckedOption:x,change:w,disabled:a,value:t}}),[k,g,x,w,a,t]),O={ref:b,id:y,role:"radiogroup","aria-labelledby":d,"aria-describedby":v,onKeyDown:S};return i().createElement(h,{name:"RadioGroup.Description"},i().createElement(p,{name:"RadioGroup.Label"},i().createElement(vn.Provider,{value:j},X({props:q({},u,O),defaultTag:"div",name:"RadioGroup"}))))}!function(e){e[e.Empty=1]="Empty",e[e.Active=2]="Active"}(bn||(bn={}));gn.Option=function e(t){var n=(0,o.useRef)(null),r="headlessui-radiogroup-option-"+ce(),a=ln(),u=a[0],s=a[1],c=De(),l=c[0],f=c[1],d=function(e){void 0===e&&(e=0);var t=(0,o.useState)(e),n=t[0],r=t[1];return{addFlag:(0,o.useCallback)((function(e){return r((function(t){return t|e}))}),[r]),hasFlag:(0,o.useCallback)((function(e){return Boolean(n&e)}),[n]),removeFlag:(0,o.useCallback)((function(e){return r((function(t){return t&~e}))}),[r]),toggleFlag:(0,o.useCallback)((function(e){return r((function(t){return t^e}))}),[r])}}(bn.Empty),p=d.addFlag,m=d.removeFlag,v=d.hasFlag,h=t.value,y=t.disabled,b=void 0!==y&&y,g=W(t,["value","disabled"]),x=(0,o.useRef)({value:h,disabled:b});oe((function(){x.current.value=h}),[h,x]),oe((function(){x.current.disabled=b}),[b,x]);var w=hn([gn.name,e.name].join(".")),S=w.registerOption,k=w.disabled,j=w.change,O=w.firstOption,C=w.containsCheckedOption,E=w.value;oe((function(){return S({id:r,element:n,propsRef:x})}),[r,S,n,t]);var P=(0,o.useCallback)((function(){var e;j(h)&&(p(bn.Active),null==(e=n.current)||e.focus())}),[p,j,h]),I=(0,o.useCallback)((function(){return p(bn.Active)}),[p]),N=(0,o.useCallback)((function(){return m(bn.Active)}),[m]),T=(null==O?void 0:O.id)===r,_=k||b,R=E===h,A={ref:n,id:r,role:"radio","aria-checked":R?"true":"false","aria-labelledby":u,"aria-describedby":l,tabIndex:_?-1:R||!C&&T?0:-1,onClick:_?void 0:P,onFocus:_?void 0:I,onBlur:_?void 0:N},L=(0,o.useMemo)((function(){return{checked:R,disabled:_,active:v(bn.Active)}}),[R,_,v]);return i().createElement(f,{name:"RadioGroup.Description"},i().createElement(s,{name:"RadioGroup.Label"},X({props:q({},g,A),slot:L,defaultTag:"div",name:"RadioGroup.Option"})))},gn.Label=pn,gn.Description=Fe;var xn=(0,o.createContext)(null);xn.displayName="GroupContext";var wn=o.Fragment;var Sn;function kn(e){var t=e.checked,n=e.onChange,r=W(e,["checked","onChange"]),i="headlessui-switch-"+ce(),a=(0,o.useContext)(xn),u=(0,o.useCallback)((function(){return n(!t)}),[n,t]),s=(0,o.useCallback)((function(e){if(re(e.currentTarget))return e.preventDefault();e.preventDefault(),u()}),[u]),c=(0,o.useCallback)((function(e){e.key!==J.Tab&&e.preventDefault(),e.key===J.Space&&u()}),[u]),l=(0,o.useCallback)((function(e){return e.preventDefault()}),[]),f=(0,o.useMemo)((function(){return{checked:t}}),[t]),d={id:i,ref:null===a?void 0:a.setSwitch,role:"switch",tabIndex:0,"aria-checked":t,"aria-labelledby":null==a?void 0:a.labelledby,"aria-describedby":null==a?void 0:a.describedby,onClick:s,onKeyUp:c,onKeyPress:l};return"button"===r.as&&Object.assign(d,{type:"button"}),X({props:q({},r,d),slot:f,defaultTag:"button",name:"Switch"})}function jn(){var e=(0,o.useRef)(!0);return(0,o.useEffect)((function(){e.current=!1}),[]),e.current}function On(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e&&r.length>0&&(t=e.classList).add.apply(t,r)}function Cn(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e&&r.length>0&&(t=e.classList).remove.apply(t,r)}function En(e,t,n,r,o){var i=bt(),a=void 0!==o?function(e){var t={called:!1};return function(){if(!t.called)return t.called=!0,e.apply(void 0,arguments)}}(o):function(){};return On.apply(void 0,[e].concat(t,n)),i.nextFrame((function(){Cn.apply(void 0,[e].concat(n)),On.apply(void 0,[e].concat(r)),i.add(function(e,t){var n=bt();if(!e)return n.dispose;var r=getComputedStyle(e),o=[r.transitionDuration,r.transitionDelay].map((function(e){var t=e.split(",").filter(Boolean).map((function(e){return e.includes("ms")?parseFloat(e):1e3*parseFloat(e)})).sort((function(e,t){return t-e}))[0];return void 0===t?0:t})),i=o[0],a=o[1];return 0!==i?n.setTimeout((function(){t(Sn.Finished)}),i+a):t(Sn.Finished),n.add((function(){return t(Sn.Cancelled)})),n.dispose}(e,(function(n){return Cn.apply(void 0,[e].concat(r,t)),a(n)})))})),i.add((function(){return Cn.apply(void 0,[e].concat(t,n,r))})),i.add((function(){return a(Sn.Cancelled)})),i.dispose}function Pn(e){return void 0===e&&(e=""),(0,o.useMemo)((function(){return e.split(" ").filter((function(e){return e.trim().length>1}))}),[e])}kn.Group=function(e){var t=(0,o.useState)(null),n=t[0],r=t[1],a=ln(),u=a[0],s=a[1],c=De(),l=c[0],f=c[1],d=(0,o.useMemo)((function(){return{switch:n,setSwitch:r,labelledby:u,describedby:l}}),[n,r,u,l]);return i().createElement(f,{name:"Switch.Description"},i().createElement(s,{name:"Switch.Label",props:{onClick:function(){n&&(n.click(),n.focus({preventScroll:!0}))}}},i().createElement(xn.Provider,{value:d},X({props:e,defaultTag:wn,name:"Switch.Group"}))))},kn.Label=pn,kn.Description=Fe,function(e){e.Finished="finished",e.Cancelled="cancelled"}(Sn||(Sn={}));var In,Nn=(0,o.createContext)(null);Nn.displayName="TransitionContext",function(e){e.Visible="visible",e.Hidden="hidden"}(In||(In={}));var Tn=(0,o.createContext)(null);function _n(e){return"children"in e?_n(e.children):e.current.filter((function(e){return e.state===In.Visible})).length>0}function Rn(e){var t=(0,o.useRef)(e),n=(0,o.useRef)([]),r=we();(0,o.useEffect)((function(){t.current=e}),[e]);var i=(0,o.useCallback)((function(e,o){var i;void 0===o&&(o=Y.Hidden);var a=n.current.findIndex((function(t){return t.id===e}));-1!==a&&($(o,((i={})[Y.Unmount]=function(){n.current.splice(a,1)},i[Y.Hidden]=function(){n.current[a].state=In.Hidden},i)),!_n(n)&&r.current&&(null==t.current||t.current()))}),[t,r,n]),a=(0,o.useCallback)((function(e){var t=n.current.find((function(t){return t.id===e}));return t?t.state!==In.Visible&&(t.state=In.Visible):n.current.push({id:e,state:In.Visible}),function(){return i(e,Y.Unmount)}}),[n,i]);return(0,o.useMemo)((function(){return{children:n,register:a,unregister:i}}),[a,i,n])}function An(){}Tn.displayName="NestingContext";var Ln=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function Dn(e){for(var t,n={},r=z(Ln);!(t=r()).done;){var o,i=t.value;n[i]=null!=(o=e[i])?o:An}return n}var Fn=Q.RenderStrategy;function Mn(e){var t,n=e.beforeEnter,r=e.afterEnter,a=e.beforeLeave,u=e.afterLeave,s=e.enter,c=e.enterFrom,l=e.enterTo,f=e.leave,d=e.leaveFrom,p=e.leaveTo,m=W(e,["beforeEnter","afterEnter","beforeLeave","afterLeave","enter","enterFrom","enterTo","leave","leaveFrom","leaveTo"]),v=(0,o.useRef)(null),h=(0,o.useState)(In.Visible),y=h[0],b=h[1],g=m.unmount?Y.Unmount:Y.Hidden,x=function(){var e=(0,o.useContext)(Nn);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),w=x.show,S=x.appear,k=function(){var e=(0,o.useContext)(Tn);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),j=k.register,O=k.unregister,C=jn(),E=ce(),P=(0,o.useRef)(!1),I=Rn((function(){P.current||(b(In.Hidden),O(E),D.current.afterLeave())}));oe((function(){if(E)return j(E)}),[j,E]),oe((function(){var e;g===Y.Hidden&&E&&(w&&y!==In.Visible?b(In.Visible):$(y,((e={})[In.Hidden]=function(){return O(E)},e[In.Visible]=function(){return j(E)},e)))}),[y,E,j,O,w,g]);var N=Pn(s),T=Pn(c),_=Pn(l),R=Pn(f),A=Pn(d),L=Pn(p),D=function(e){var t=(0,o.useRef)(Dn(e));return(0,o.useEffect)((function(){t.current=Dn(e)}),[e]),t}({beforeEnter:n,afterEnter:r,beforeLeave:a,afterLeave:u}),F=ae();(0,o.useEffect)((function(){if(F&&y===In.Visible&&null===v.current)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}),[v,y,F]);var M=C&&!S;oe((function(){var e=v.current;if(e&&!M)return P.current=!0,w&&D.current.beforeEnter(),w||D.current.beforeLeave(),w?En(e,N,T,_,(function(e){P.current=!1,e===Sn.Finished&&D.current.afterEnter()})):En(e,R,A,L,(function(e){P.current=!1,e===Sn.Finished&&(_n(I)||(b(In.Hidden),O(E),D.current.afterLeave()))}))}),[D,E,P,O,I,v,M,w,N,T,_,R,A,L]);var B={ref:v},U=m;return i().createElement(Tn.Provider,{value:I},i().createElement(Ve,{value:$(y,(t={},t[In.Visible]=Me.Open,t[In.Hidden]=Me.Closed,t))},X({props:q({},U,B),defaultTag:"div",features:Fn,visible:y===In.Visible,name:"Transition.Child"})))}function Bn(e){var t,n=e.show,r=e.appear,a=void 0!==r&&r,u=e.unmount,s=W(e,["show","appear","unmount"]),c=Ue();void 0===n&&null!==c&&(n=$(c,((t={})[Me.Open]=!0,t[Me.Closed]=!1,t)));if(![!0,!1].includes(n))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");var l=(0,o.useState)(n?In.Visible:In.Hidden),f=l[0],d=l[1],p=Rn((function(){d(In.Hidden)})),m=jn(),v=(0,o.useMemo)((function(){return{show:n,appear:a||!m}}),[n,a,m]);(0,o.useEffect)((function(){n?d(In.Visible):_n(p)||d(In.Hidden)}),[n,p]);var h={unmount:u};return i().createElement(Tn.Provider,{value:p},i().createElement(Nn.Provider,{value:v},X({props:q({},h,{as:o.Fragment,children:i().createElement(Mn,Object.assign({},h,s))}),defaultTag:o.Fragment,features:Fn,visible:f===In.Visible,name:"Transition"})))}Bn.Child=Mn,Bn.Root=Bn;const Un=wp.i18n;var Vn=n(246);function Gn(e){var t=e.className,n=e.hideLibrary,r=e.initialFocus,o=G((function(e){return e.remainingImports})),i=G((function(e){return e.apiKey})),a=G((function(e){return e.allowedImports}));return(0,Vn.jsx)("div",{className:t,children:(0,Vn.jsxs)("div",{className:"flex justify-between items-center px-6 sm:px-12 h-full",children:[(0,Vn.jsxs)("div",{className:"flex space-x-12 h-full",children:[(0,Vn.jsxs)("div",{className:"font-bold flex items-center space-x-1.5 lg:w-72",children:[(0,Vn.jsxs)("svg",{className:"",width:"30",height:"30",viewBox:"0 0 103 103",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Vn.jsx)("rect",{y:"25.75",width:"70.8125",height:"77.25",fill:"#000000"}),(0,Vn.jsx)("rect",{x:"45.0625",width:"57.9375",height:"57.9375",fill:"#37C2A2"})]}),(0,Vn.jsx)("span",{className:"text-sm transform translate-y-0.5 whitespace-nowrap",children:(0,Un.__)("Extendify Library","extendify-sdk")})]}),!i.length&&(0,Vn.jsx)(Vn.Fragment,{children:(0,Vn.jsxs)("div",{className:"items-center ml-8 h-full hidden md:flex",children:[(0,Vn.jsxs)("div",{className:"h-full flex items-center px-6 border-l border-r border-gray-300 bg-extendify-lightest",children:[(0,Vn.jsx)("a",{className:"button-extendify-main inline lg:hidden",target:"_blank",href:"https://extendify.com",rel:"noreferrer",children:(0,Un.__)("Sign up","extendify-sdk")}),(0,Vn.jsx)("a",{className:"button-extendify-main hidden lg:block",target:"_blank",href:"https://extendify.com",rel:"noreferrer",children:(0,Un.__)("Sign up today to get unlimited beta access","extendify-sdk")})]}),(0,Vn.jsx)("div",{className:"m-0 p-0 px-6 text-sm bg-gray-50 border-r border-gray-300 h-full flex items-center",children:(0,Un.sprintf)((0,Un.__)("Imports left: %s / %s"),o(),Number(a))})]})})]}),(0,Vn.jsx)("div",{className:"space-x-2 transform sm:translate-x-8",children:(0,Vn.jsxs)("button",{ref:r,type:"button",className:"components-button has-icon",onClick:function(){return n()},children:[(0,Vn.jsx)("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",size:"24",role:"img","aria-hidden":"true",focusable:"false",children:(0,Vn.jsx)("path",{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"})}),(0,Vn.jsx)("span",{className:"sr-only",children:(0,Un.__)("Close library","extendify-sdk")})]})})]})})}const Hn=wp.blockEditor,qn=lodash;var Wn=function(){return T.get("taxonomies")};const Kn=wp.components;var zn=n(42),$n=n.n(zn);function Qn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Yn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Jn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Jn(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Jn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Xn(e){var t=Yn(e.taxonomy,2),n=t[0],o=t[1],i=e.open,a=g((function(e){return e.updateTaxonomies})),u=g((function(e){return e.resetTaxonomies})),s=g((function(e){return e.searchParams})),c=Yn((0,r.useState)({}),2),l=c[0],f=c[1],d=Yn((0,r.useState)({}),2),p=d[0],m=d[1],v=(0,r.useRef)(),h=(0,r.useRef)(),y=(0,r.useRef)(),b=(0,r.useRef)(!0),x=function(e){var t;return(null==s?void 0:s.taxonomies[n])===e.term||(null===(t=e.children)||void 0===t?void 0:t.filter((function(e){return e.term===(null==s?void 0:s.taxonomies[n])})).length)>0},w=function(e){var t;return Object.prototype.hasOwnProperty.call(e,"children")?e.children.filter((function(e){return null==e?void 0:e.type.includes(s.type)})).length:null==e||null===(t=e.type)||void 0===t?void 0:t.includes(s.type)};if((0,r.useEffect)((function(){b.current?b.current=!1:(f({}),u())}),[s.type,u]),(0,r.useEffect)((function(){Object.keys(l).length?setTimeout((function(){requestAnimationFrame((function(){m(v.current.clientHeight),y.current.focus()}))}),200):m("auto")}),[l]),!Object.keys(o).length||!Object.values(o).filter((function(e){return w(e)})).length)return"";var S=n.replace("tax_","").replace("_"," ").replace(/\b\w/g,(function(e){return e.toUpperCase()}));return(0,Vn.jsx)(Kn.PanelBody,{title:S,initialOpen:i,children:(0,Vn.jsx)(Kn.PanelRow,{children:(0,Vn.jsxs)("div",{className:"overflow-hidden w-full relative",style:{height:p},children:[(0,Vn.jsxs)("ul",{className:$n()("p-1 m-0 w-full transform transition duration-200",{"-translate-x-full":Object.keys(l).length}),children:[(0,Vn.jsx)("li",{className:"m-0",children:(0,Vn.jsx)("button",{type:"button",className:"text-left cursor-pointer w-full flex justify-between items-center py-1.5 m-0 leading-none hover:text-wp-theme-500 bg-transparent transition duration-200 button-focus",ref:h,onClick:function(){a(Qn({},n,"pattern"===s.type&&"tax_categories"===n?"Default":""))},children:(0,Vn.jsx)("span",{className:$n()({"text-wp-theme-500":!s.taxonomies[n].length||"Default"===(null==s?void 0:s.taxonomies[n])}),children:"pattern"===s.type&&"tax_categories"===n?(0,Un.__)("Default","extendify-sdk"):(0,Un.__)("All","extendify-sdk")})})}),Object.values(o).filter((function(e){return w(e)})).sort((function(e,t){return e.term.localeCompare(t.term)})).map((function(e){return(0,Vn.jsx)("li",{className:"m-0 w-full",children:(0,Vn.jsxs)("button",{type:"button",className:"text-left cursor-pointer w-full flex justify-between items-center py-1.5 m-0 leading-none bg-transparent hover:text-wp-theme-500 transition duration-200 button-focus",onClick:function(){Object.prototype.hasOwnProperty.call(e,"children")?f(e):a(Qn({},n,e.term))},children:[(0,Vn.jsx)("span",{className:$n()({"text-wp-theme-500":x(e)}),children:e.term}),Object.prototype.hasOwnProperty.call(e,"children")&&(0,Vn.jsx)("span",{className:"text-black",children:(0,Vn.jsx)("svg",{width:"8",height:"14",viewBox:"0 0 8 14",className:"stroke-current",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,Vn.jsx)("path",{d:"M1 12.5L6 6.99998L1 1.5",strokeWidth:"1.5"})})})]})},e.term)}))]}),(0,Vn.jsxs)("ul",{ref:v,className:$n()("p-1 m-0 w-full transform transition duration-200 absolute top-0 right-0",{"translate-x-full":!Object.keys(l).length}),children:[Object.values(l).length>0&&(0,Vn.jsx)("li",{className:"m-0",children:(0,Vn.jsxs)("button",{type:"button",className:"text-left cursor-pointer font-bold flex space-x-4 items-center py-2 pr-4 m-0leading-none hover:text-wp-theme-500 bg-transparent transition duration-200 button-focus",ref:y,onClick:function(){f({}),h.current.focus()},children:[(0,Vn.jsx)("svg",{className:"stroke-current transform rotate-180",width:"8",height:"14",viewBox:"0 0 8 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,Vn.jsx)("path",{d:"M1 12.5L6 6.99998L1 1.5",strokeWidth:"1.5"})}),(0,Vn.jsx)("span",{children:l.term})]})}),Object.values(l).length&&Object.values(l.children).filter((function(e){return w(e)})).sort((function(e,t){return e.term.localeCompare(t.term)})).map((function(e){return(0,Vn.jsx)("li",{className:"m-0 pl-6 w-full flex justify-between items-center",children:(0,Vn.jsx)("button",{type:"button",className:"text-left cursor-pointer w-full flex justify-between items-center py-1.5 m-0 leading-none bg-transparent hover:text-wp-theme-500 transition duration-200 button-focus",onClick:function(){a(Qn({},n,e.term))},children:(0,Vn.jsx)("span",{className:$n()({"text-wp-theme-500":x(e)}),children:e.term})})},e.term)}))]})]})})})}function Zn(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)}function er(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Zn(i,r,o,a,u,"next",e)}function u(e){Zn(i,r,o,a,u,"throw",e)}a(void 0)}))}}function tr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return nr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return nr(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function nr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function rr(){var e,t=g((function(e){return e.updateSearchParams})),n=g((function(e){return e.setupDefaultTaxonomies})),o=g((function(e){return e.searchParams})),i=(0,qn.debounce)((function(e){return t({taxonomies:{},search:e})}),500),a=tr((0,r.useState)(null!==(e=null==o?void 0:o.search)&&void 0!==e?e:""),2),u=a[0],s=a[1],c=tr((0,r.useState)({}),2),l=c[0],f=c[1],d=(0,r.useCallback)(er(S().mark((function e(){var t;return S().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Wn();case 2:t=e.sent,t=Object.keys(t).filter((function(e){return e.startsWith("tax_")})).reduce((function(e,n){return e[n]=t[n],e}),{}),n(t),f(t);case 6:case"end":return e.stop()}}),e)}))),[n]);return(0,r.useEffect)((function(){d()}),[d]),(0,Vn.jsxs)(Vn.Fragment,{children:[(0,Vn.jsx)("div",{className:"pt-1 -mt-1 mb-1 bg-white",children:(0,Vn.jsx)(Hn.__experimentalSearchForm,{placeholder:(0,Un.__)("What are you looking for?","extendify-sdk"),onChange:function(e){g.setState({nextPage:""}),s(e),i(e)},value:u,className:"sm:ml-px sm:mr-1 sm:mb-6 px-6 sm:p-0 sm:px-0",autoComplete:"off"})}),(0,Vn.jsx)("div",{className:"flex-grow hidden overflow-y-auto pb-32 pr-2 sm:block",children:(0,Vn.jsx)(Kn.Panel,{children:Object.entries(l).map((function(e,t){return(0,Vn.jsx)(Xn,{open:!1,taxonomy:e},t)}))})})]})}function or(e){var t=e.taxonomies,n=e.search,r=e.type,o=[],i=Object.entries(t).filter((function(e){return Boolean(e[1].length)})).map((function(e){return"".concat(e[0],' = "').concat(e[1],'"')})).join(", ");return i.length&&o.push(i),n.length&&o.push('OR(FIND(LOWER("'.concat(n,'"), LOWER(title))!= 0, FIND(LOWER("').concat(n,'"), LOWER({tax_categories})) != 0)')),r.length&&o.push('{type}="'.concat(r,'"')),o.length?"AND(".concat(o.join(", "),")").replace(/\r?\n|\r/g,""):""}function ir(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)}var ar=0,ur=function(e,t){return(n=S().mark((function n(){var r,o,i;return S().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return ar++,o=N.CancelToken.source(),null!==(r=g.getState().fetchToken)&&void 0!==r&&r.cancel&&g.getState().fetchToken.cancel(),g.setState({fetchToken:o}),n.next=6,T.post("templates",{filterByFormula:or(e),pageSize:l,categories:e.taxonomies,search:e.search,type:e.type,offset:t,initial:1===ar,request_count:ar},{cancelToken:o.token});case 6:return i=n.sent,g.setState({fetchToken:null}),n.abrupt("return",i);case 9:case"end":return n.stop()}}),n)})),function(){var e=this,t=arguments;return new Promise((function(r,o){var i=n.apply(e,t);function a(e){ir(i,r,o,a,u,"next",e)}function u(e){ir(i,r,o,a,u,"throw",e)}a(void 0)}))})();var n},sr=function(e){var t;return T.post("templates/".concat(e.id),{template_id:e.id,maybe_import:!0,pageSize:l,template_name:null===(t=e.fields)||void 0===t?void 0:t.title})},cr=function(e){var t;return T.post("templates/".concat(e.id),{template_id:e.id,single:!0,pageSize:l,template_name:null===(t=e.fields)||void 0===t?void 0:t.title})},lr=function(e){var t;return T.post("templates/".concat(e.id),{template_id:e.id,imported:!0,pageSize:l,template_name:null===(t=e.fields)||void 0===t?void 0:t.title})};function fr(){return(fr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var dr=new Map,pr=new WeakMap,mr=0;function vr(e){return Object.keys(e).sort().filter((function(t){return void 0!==e[t]})).map((function(t){return t+"_"+("root"===t?(n=e.root)?(pr.has(n)||(mr+=1,pr.set(n,mr.toString())),pr.get(n)):"0":e[t]);var n})).toString()}function hr(e,t,n){if(void 0===n&&(n={}),!e)return function(){};var r=function(e){var t=vr(e),n=dr.get(t);if(!n){var r,o=new Map,i=new IntersectionObserver((function(t){t.forEach((function(t){var n,i=t.isIntersecting&&r.some((function(e){return t.intersectionRatio>=e}));e.trackVisibility&&void 0===t.isVisible&&(t.isVisible=i),null==(n=o.get(t.target))||n.forEach((function(e){e(i,t)}))}))}),e);r=i.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),n={id:t,observer:i,elements:o},dr.set(t,n)}return n}(n),o=r.id,i=r.observer,a=r.elements,u=a.get(e)||[];return a.has(e)||a.set(e,u),u.push(t),i.observe(e),function(){u.splice(u.indexOf(t),1),0===u.length&&(a.delete(e),i.unobserve(e)),0===a.size&&(i.disconnect(),dr.delete(o))}}function yr(e){return"function"!=typeof e.children}var br=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).node=null,n._unobserveCb=null,n.handleNode=function(e){n.node&&(n.unobserve(),e||n.props.triggerOnce||n.props.skip||n.setState({inView:!!n.props.initialInView,entry:void 0})),n.node=e||null,n.observeNode()},n.handleChange=function(e,t){e&&n.props.triggerOnce&&n.unobserve(),yr(n.props)||n.setState({inView:e,entry:t}),n.props.onChange&&n.props.onChange(e,t)},n.state={inView:!!t.initialInView,entry:void 0},n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentDidUpdate=function(e){e.rootMargin===this.props.rootMargin&&e.root===this.props.root&&e.threshold===this.props.threshold&&e.skip===this.props.skip&&e.trackVisibility===this.props.trackVisibility&&e.delay===this.props.delay||(this.unobserve(),this.observeNode())},i.componentWillUnmount=function(){this.unobserve(),this.node=null},i.observeNode=function(){if(this.node&&!this.props.skip){var e=this.props,t=e.threshold,n=e.root,r=e.rootMargin,o=e.trackVisibility,i=e.delay;this._unobserveCb=hr(this.node,this.handleChange,{threshold:t,root:n,rootMargin:r,trackVisibility:o,delay:i})}},i.unobserve=function(){this._unobserveCb&&(this._unobserveCb(),this._unobserveCb=null)},i.render=function(){if(!yr(this.props)){var e=this.state,t=e.inView,n=e.entry;return this.props.children({inView:t,entry:n,ref:this.handleNode})}var r=this.props,i=r.children,a=r.as,u=r.tag,s=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(r,["children","as","tag","triggerOnce","threshold","root","rootMargin","onChange","skip","trackVisibility","delay","initialInView"]);return(0,o.createElement)(a||u||"div",fr({ref:this.handleNode},s),i)},r}(o.Component);br.displayName="InView",br.defaultProps={threshold:0,triggerOnce:!1,initialInView:!1};function gr(e){return function(e){if(Array.isArray(e))return jr(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||kr(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 xr(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)}function wr(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){xr(i,r,o,a,u,"next",e)}function u(e){xr(i,r,o,a,u,"throw",e)}a(void 0)}))}}function Sr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(e,t)||kr(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 kr(e,t){if(e){if("string"==typeof e)return jr(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)?jr(e,t):void 0}}function jr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Or(e){var t=e.templates,n=g((function(e){return e.setActive})),i=g((function(e){return e.activeTemplate})),a=g((function(e){return e.appendTemplates})),u=Sr((0,r.useState)(""),2),s=u[0],c=u[1],l=Sr((0,r.useState)(!1),2),f=l[0],d=l[1],p=Sr((0,r.useState)([]),2),m=p[0],v=p[1],h=Sr(function(e){var t=void 0===e?{}:e,n=t.threshold,r=t.delay,i=t.trackVisibility,a=t.rootMargin,u=t.root,s=t.triggerOnce,c=t.skip,l=t.initialInView,f=(0,o.useRef)(),d=(0,o.useState)({inView:!!l}),p=d[0],m=d[1],v=(0,o.useCallback)((function(e){void 0!==f.current&&(f.current(),f.current=void 0),c||e&&(f.current=hr(e,(function(e,t){m({inView:e,entry:t}),t.isIntersecting&&s&&f.current&&(f.current(),f.current=void 0)}),{root:u,rootMargin:a,threshold:n,trackVisibility:i,delay:r}))}),[Array.isArray(n)?n.toString():n,u,a,s,c,i,r]);(0,o.useEffect)((function(){f.current||!p.entry||s||c||m({inView:!!l})}));var h=[v,p.inView,p.entry];return h.ref=h[0],h.inView=h[1],h.entry=h[2],h}(),2),y=h[0],b=h[1],x=g((function(e){return e.updateSearchParams})),w=g((function(e){return e.searchParams})),k=(0,r.useRef)(g.getState().nextPage),j=(0,r.useRef)(g.getState().searchParams);(0,r.useEffect)((function(){return g.subscribe((function(e){return k.current=e}),(function(e){return e.nextPage}))}),[]),(0,r.useEffect)((function(){return g.subscribe((function(e){return j.current=e}),(function(e){return e.searchParams}))}),[]);var O=(0,r.useCallback)(wr(S().mark((function e(){var t,n;return S().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c(""),d(!1),e.next=4,ur(j.current,k.current).catch((function(e){console.error(e),c(e&&e.message?e.message:(0,Un.__)("Unknown error occured. Check browser console or contact support.","extendify-sdk"))}));case 4:null!=(n=e.sent)&&null!==(t=n.error)&&void 0!==t&&t.length&&c(null==n?void 0:n.error),null!=n&&n.records&&w===j.current&&(a(n.records),d(n.records.length<=0),g.setState({nextPage:n.offset}));case 7:case"end":return e.stop()}}),e)}))),[w,a]);return(0,r.useEffect)((function(){Object.keys(j.current.taxonomies).length&&(v([]),O())}),[O,j]),(0,r.useEffect)((function(){b&&O()}),[b,O]),s.length?(0,Vn.jsxs)("div",{className:"text-left",children:[(0,Vn.jsx)("h2",{className:"text-left",children:(0,Un.__)("Server error","extendify-sdk")}),(0,Vn.jsx)("code",{className:"block max-w-xl p-4 mb-4",style:{minHeight:"10rem"},children:s}),(0,Vn.jsx)(Kn.Button,{isTertiary:!0,onClick:function(){v([]),x({taxonomies:{},search:""}),O()},children:(0,Un.__)("Press here to reload experience")})]}):f?null!=w&&w.search.length?(0,Vn.jsx)("h2",{className:"text-left",children:(0,Un.sprintf)((0,Un.__)("No results for %s.","extendify-sdk"),null==w?void 0:w.search)}):(0,Vn.jsx)("h2",{className:"text-left",children:(0,Un.__)("No results found.","extendify-sdk")}):t.length?(0,Vn.jsxs)(Vn.Fragment,{children:[(0,Vn.jsx)("ul",{className:"flex-grow gap-6 grid xl:grid-cols-2 2xl:grid-cols-3 pb-32 m-0",children:t.map((function(e,t){var r,o,a,u,s,c,l,f,d;return(0,Vn.jsxs)("li",{className:"flex flex-col justify-between group overflow-hidden max-w-lg",children:[(0,Vn.jsx)("div",{className:"flex justify-items-center flex-grow h-80 border-gray-200 bg-white border border-b-0 group-hover:border-wp-theme-500 transition duration-150 cursor-pointer",onClick:function(){return n(e)},children:(0,Vn.jsx)("img",{role:"button",className:"max-w-full block m-auto object-cover",onLoad:function(){return v([].concat(gr(m),[t]))},src:null!==(r=null==e||null===(o=e.fields)||void 0===o||null===(a=o.screenshot[0])||void 0===a||null===(u=a.thumbnails)||void 0===u||null===(s=u.large)||void 0===s?void 0:s.url)&&void 0!==r?r:null==e||null===(c=e.fields)||void 0===c||null===(l=c.screenshot[0])||void 0===l?void 0:l.url})}),(0,Vn.jsx)("span",{role:"img","aria-hidden":"true",className:"h-px w-full bg-gray-200 border group-hover:bg-transparent border-t-0 border-b-0 border-gray-200 group-hover:border-wp-theme-500 transition duration-150"}),(0,Vn.jsxs)("div",{className:"bg-transparent text-left bg-white flex items-center justify-between p-4 border border-t-0 border-transparent group-hover:border-wp-theme-500 transition duration-150 cursor-pointer",role:"button",onClick:function(){return n(e)},children:[(0,Vn.jsxs)("div",{children:[(0,Vn.jsx)("h4",{className:"m-0 font-bold",children:e.fields.title}),(0,Vn.jsx)("p",{className:"m-0",children:null==e||null===(f=e.fields)||void 0===f||null===(d=f.tax_categories)||void 0===d?void 0:d.filter((function(e){return"default"!==e.toLowerCase()})).join(", ")})]}),(0,Vn.jsx)(Kn.Button,{isSecondary:!0,tabIndex:Object.keys(i).length?"-1":"0",className:"sm:opacity-0 group-hover:opacity-100 transition duration-150 focus:opacity-100",onClick:function(t){t.stopPropagation(),n(e)},children:(0,Un.__)("View","extendify-sdk")})]})]},e.id)}))}),g.getState().nextPage&&!!m.length&&m.length===t.length&&(0,Vn.jsxs)(Vn.Fragment,{children:[(0,Vn.jsx)("div",{className:"-translate-y-full flex flex-col h-80 items-end justify-end my-2 relative transform z-0 text",ref:y,style:{zIndex:-1}}),(0,Vn.jsx)("div",{className:"my-4",children:(0,Vn.jsx)(Kn.Spinner,{})})]})]}):(0,Vn.jsx)("div",{className:"flex items-center justify-center w-full sm:mt-64",children:(0,Vn.jsx)(Kn.Spinner,{})})}var Cr=function(){return T.get("plugins")},Er=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=new FormData;return t.append("plugins",JSON.stringify(e)),T.post("plugins",t,{headers:{"Content-Type":"multipart/form-data"}})},Pr=function(){return T.get("active-plugins")};function Ir(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)}function Nr(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Ir(i,r,o,a,u,"next",e)}function u(e){Ir(i,r,o,a,u,"throw",e)}a(void 0)}))}}function Tr(e){return _r.apply(this,arguments)}function _r(){return(_r=Nr(S().mark((function e(t){var n,r,o,i;return S().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((r=(r=null!==(n=(0,qn.get)(t,"fields.required_plugins"))&&void 0!==n?n:[]).filter((function(e){return"editorplus"!==e}))).length){e.next=4;break}return e.abrupt("return",!1);case 4:return e.t0=Object,e.next=7,Cr();case 7:return e.t1=e.sent,o=e.t0.keys.call(e.t0,e.t1),i=!!r.length&&r.filter((function(e){return!o.some((function(t){return t.includes(e)}))})),e.abrupt("return",i.length);case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Rr(e){return Ar.apply(this,arguments)}function Ar(){return(Ar=Nr(S().mark((function e(t){var n,r,o,i;return S().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((r=(r=null!==(n=(0,qn.get)(t,"fields.required_plugins"))&&void 0!==n?n:[]).filter((function(e){return"editorplus"!==e}))).length){e.next=4;break}return e.abrupt("return",!1);case 4:return e.t0=Object,e.next=7,Pr();case 7:if(e.t1=e.sent,o=e.t0.values.call(e.t0,e.t1),!(i=!!r.length&&r.filter((function(e){return!o.some((function(t){return t.includes(e)}))})))){e.next=15;break}return e.next=13,Tr(t);case 13:if(!e.sent){e.next=15;break}return e.abrupt("return",!1);case 15:return e.abrupt("return",i.length);case 16:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Lr=s(I((function(e){return{wantedTemplate:{},importOnLoad:!1,setWanted:function(t){return e({wantedTemplate:t})},removeWanted:function(){return e({wantedTemplate:{}})}}}),{name:"extendify-wanted-template"}));function Dr(e){var t=e.msg;return(0,Vn.jsxs)(Kn.Modal,{style:{maxWidth:"500px"},title:(0,Un.__)("Error installing plugins","extendify-sdk"),isDismissible:!1,children:[(0,Un.__)("You have encountered an error that we cannot recover from. Please try again.","extendify-sdk"),(0,Vn.jsx)("br",{}),(0,Vn.jsx)(Kn.Notice,{isDismissible:!1,status:"error",children:t}),(0,Vn.jsx)(Kn.Button,{isPrimary:!0,onClick:function(){return(0,r.render)((0,Vn.jsx)(Kr,{}),document.getElementById("extendify-root"))},children:(0,Un.__)("Go back","extendify-sdk")})]})}const Fr=wp.data;function Mr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Br(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Br(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Br(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ur(){var e=Mr((0,r.useState)(!1),2),t=e[0],n=e[1],o=function(){location.reload()};return(0,(0,Fr.select)("core/editor").isEditedPostDirty)()?(0,Vn.jsxs)(Kn.Modal,{title:(0,Un.__)("Reload required","extendify-sdk"),isDismissible:!1,children:[(0,Vn.jsx)("p",{style:{maxWidth:"400px"},children:(0,Un.__)("Just one more thing! We need to reload the page to continue.","extendify-sdk")}),(0,Vn.jsxs)(Kn.ButtonGroup,{children:[(0,Vn.jsx)(Kn.Button,{isPrimary:!0,onClick:o,disabled:t,children:(0,Un.__)("Reload page","extendify-sdk")}),(0,Vn.jsx)(Kn.Button,{isSecondary:!0,onClick:function(){n(!0),(0,Fr.dispatch)("core/editor").savePost(),n(!1)},isBusy:t,style:{margin:"0 4px"},children:(0,Un.__)("Save changes","extendify-sdk")})]})]}):(o(),null)}function Vr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Gr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Gr(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Gr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Hr(){var e,t=Vr((0,r.useState)(""),2),n=t[0],o=t[1],i=Lr((function(e){return e.wantedTemplate}));return Er(null==i||null===(e=i.fields)||void 0===e?void 0:e.required_plugins.filter((function(e){return"editorplus"!==e}))).then((function(){Lr.setState({importOnLoad:!0}),(0,r.render)((0,Vn.jsx)(Ur,{}),document.getElementById("extendify-root"))})).catch((function(e){var t=e.message;o(t)})),n?(0,Vn.jsx)(Dr,{msg:n}):(0,Vn.jsx)(Kn.Modal,{title:(0,Un.__)("Installing plugins","extendify-sdk"),isDismissible:!1,children:(0,Vn.jsx)(Kn.Button,{style:{width:"100%"},disabled:!0,isPrimary:!0,isBusy:!0,onClick:function(){},children:(0,Un.__)("Installing...","extendify-sdk")})})}var qr=function(e){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"broken-event",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"open";G.setState({entryPoint:e}),window.dispatchEvent(new CustomEvent("extendify-sdk::".concat(t,"-library"),{detail:e,bubbles:!0}))}(e,"open")};function Wr(e){switch(e){case"editorplus":return"Editor Plus";case"ml-slider":return"MetaSlider"}return e}function Kr(e){var t,n,o,i,a,u,s,c=Lr((function(e){return e.wantedTemplate})),l=function(){e.forceOpen||(0,r.render)((0,Vn.jsx)(Fo,{show:!0}),document.getElementById("extendify-root"))},f=(null==c||null===(t=c.fields)||void 0===t?void 0:t.required_plugins)||[];return(0,Vn.jsxs)(Kn.Modal,{title:null!==(n=e.title)&&void 0!==n?n:(0,Un.__)("Install required plugins","extendify-sdk"),closeButtonLabel:(0,Un.__)("No thanks, take me back","extendify-sdk"),onRequestClose:l,children:[(0,Vn.jsx)("p",{style:{maxWidth:"400px"},children:null!==(o=e.message)&&void 0!==o?o:(0,Un.__)((0,Un.sprintf)("There is just one more step. This %s requires the following to be automatically installed and activated:",null!==(i=null==c||null===(a=c.fields)||void 0===a?void 0:a.type)&&void 0!==i?i:"template"),"extendify-sdk")}),(null===(u=e.message)||void 0===u?void 0:u.length)>0||(0,Vn.jsx)("ul",{children:f.filter((function(e){return"editorplus"!==e})).map((function(e){return(0,Vn.jsx)("li",{children:Wr(e)},e)}))}),(0,Vn.jsxs)(Kn.ButtonGroup,{children:[(0,Vn.jsx)(Kn.Button,{isPrimary:!0,onClick:function(){return(0,r.render)((0,Vn.jsx)(Hr,{}),document.getElementById("extendify-root"))},children:null!==(s=e.buttonLabel)&&void 0!==s?s:(0,Un.__)("Install Plugins","extendify-sdk")}),e.forceOpen||(0,Vn.jsx)(Kn.Button,{isTertiary:!0,onClick:l,style:{boxShadow:"none",margin:"0 4px"},children:(0,Un.__)("No thanks, take me back","extendify-sdk")})]})]})}function zr(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)}function $r(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){zr(i,r,o,a,u,"next",e)}function u(e){zr(i,r,o,a,u,"throw",e)}a(void 0)}))}}var Qr=function(){var e=$r(S().mark((function e(t){return S().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Tr(t);case 2:return e.t0=!e.sent,e.t1=function(){return $r(S().mark((function e(){return S().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})))()},e.t2=function(){return $r(S().mark((function e(){return S().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(){(0,r.render)((0,Vn.jsx)(Kr,{}),document.getElementById("extendify-root"))})));case 1:case"end":return e.stop()}}),e)})))()},e.abrupt("return",{id:"hasRequiredPlugins",pass:e.t0,allow:e.t1,deny:e.t2});case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();function Yr(e){var t=e.msg;return(0,Vn.jsxs)(Kn.Modal,{style:{maxWidth:"500px"},title:(0,Un.__)("Error Activating plugins","extendify-sdk"),isDismissible:!1,children:[(0,Un.__)("You have encountered an error that we cannot recover from. Please try again.","extendify-sdk"),(0,Vn.jsx)("br",{}),(0,Vn.jsx)(Kn.Notice,{isDismissible:!1,status:"error",children:t}),(0,Vn.jsx)(Kn.Button,{isPrimary:!0,onClick:function(){(0,r.render)((0,Vn.jsx)(no,{}),document.getElementById("extendify-root"))},children:(0,Un.__)("Go back","extendify-sdk")})]})}function Jr(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)}function Xr(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Jr(i,r,o,a,u,"next",e)}function u(e){Jr(i,r,o,a,u,"throw",e)}a(void 0)}))}}function Zr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return eo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return eo(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function eo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function to(){var e,t=Zr((0,r.useState)(""),2),n=t[0],o=t[1],i=Lr((function(e){return e.wantedTemplate}));return Er(null==i||null===(e=i.fields)||void 0===e?void 0:e.required_plugins.filter((function(e){return"editorplus"!==e}))).then((function(){Lr.setState({importOnLoad:!0})})).then(Xr(S().mark((function e(){return S().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,new Promise((function(e){return setTimeout(e,1e3)}));case 2:(0,r.render)((0,Vn.jsx)(Ur,{}),document.getElementById("extendify-root"));case 3:case"end":return e.stop()}}),e)})))).catch((function(e){var t=e.response;o(t.data.message)})),n?(0,Vn.jsx)(Yr,{msg:n}):(0,Vn.jsx)(Kn.Modal,{title:(0,Un.__)("Activating plugins","extendify-sdk"),isDismissible:!1,children:(0,Vn.jsx)(Kn.Button,{style:{width:"100%"},disabled:!0,isPrimary:!0,isBusy:!0,onClick:function(){},children:(0,Un.__)("Activating...","extendify-sdk")})})}function no(e){var t,n,o,i,a=Lr((function(e){return e.wantedTemplate})),u=function(){return(0,r.render)((0,Vn.jsx)(Fo,{show:!0}),document.getElementById("extendify-root"))},s=(null==a||null===(t=a.fields)||void 0===t?void 0:t.required_plugins)||[];return(0,Vn.jsxs)(Kn.Modal,{title:(0,Un.__)("Activate required plugins","extendify-sdk"),closeButtonLabel:(0,Un.__)("No thanks, return to library","extendify-sdk"),onRequestClose:u,children:[(0,Vn.jsx)("p",{style:{maxWidth:"400px"},children:null!==(n=e.message)&&void 0!==n?n:(0,Un.__)((0,Un.sprintf)("There is just one more step. This %s requires the following plugins to be installed and activated:",null!==(o=null==a||null===(i=a.fields)||void 0===i?void 0:i.type)&&void 0!==o?o:"template"),"extendify-sdk")}),(0,Vn.jsx)("ul",{children:s.filter((function(e){return"editorplus"!==e})).map((function(e){return(0,Vn.jsx)("li",{children:Wr(e)},e)}))}),(0,Vn.jsxs)(Kn.ButtonGroup,{children:[(0,Vn.jsx)(Kn.Button,{isPrimary:!0,onClick:function(){return(0,r.render)((0,Vn.jsx)(to,{}),document.getElementById("extendify-root"))},children:(0,Un.__)("Activate Plugins","extendify-sdk")}),e.showClose&&(0,Vn.jsx)(Kn.Button,{isTertiary:!0,onClick:u,style:{boxShadow:"none",margin:"0 4px"},children:(0,Un.__)("No thanks, return to library","extendify-sdk")})]})]})}function ro(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)}function oo(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){ro(i,r,o,a,u,"next",e)}function u(e){ro(i,r,o,a,u,"throw",e)}a(void 0)}))}}var io=function(){var e=oo(S().mark((function e(t){return S().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Rr(t);case 2:return e.t0=!e.sent,e.t1=function(){return oo(S().mark((function e(){return S().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})))()},e.t2=function(){return oo(S().mark((function e(){return S().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(){(0,r.render)((0,Vn.jsx)(no,{showClose:!0}),document.getElementById("extendify-root"))})));case 1:case"end":return e.stop()}}),e)})))()},e.abrupt("return",{id:"hasPluginsActivated",pass:e.t0,allow:e.t1,deny:e.t2});case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();function ao(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return uo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return uo(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function uo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function so(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)}function co(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){so(i,r,o,a,u,"next",e)}function u(e){so(i,r,o,a,u,"throw",e)}a(void 0)}))}}function lo(e){return function(){return new fo(e.apply(this,arguments))}}function fo(e){var t,n;function r(t,n){try{var i=e[t](n),a=i.value,u=a instanceof po;Promise.resolve(u?a.wrapped:a).then((function(e){u?r("return"===t?"return":"next",e):o(i.done?"return":"normal",e)}),(function(e){r("throw",e)}))}catch(e){o("throw",e)}}function o(e,o){switch(e){case"return":t.resolve({value:o,done:!0});break;case"throw":t.reject(o);break;default:t.resolve({value:o,done:!1})}(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(e,o){return new Promise((function(i,a){var u={key:e,arg:o,resolve:i,reject:a,next:null};n?n=n.next=u:(t=n=u,r(e,o))}))},"function"!=typeof e.return&&(this.return=void 0)}function po(e){this.wrapped=e}fo.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},fo.prototype.next=function(e){return this._invoke("next",e)},fo.prototype.throw=function(e){return this._invoke("throw",e)},fo.prototype.return=function(e){return this._invoke("return",e)};function mo(){return(mo=co(S().mark((function e(t){var n;return S().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=vo(t);case 1:return e.next=4,n.next();case 4:if(!e.sent.done){e.next=7;break}return e.abrupt("break",9);case 7:e.next=1;break;case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function vo(e){return ho.apply(this,arguments)}function ho(){return(ho=lo(S().mark((function e(t){var n,r,o;return S().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=ao(t),e.prev=1,n.s();case 3:if((r=n.n()).done){e.next=9;break}return o=r.value,e.next=7,o();case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),n.e(e.t0);case 14:return e.prev=14,n.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,null,[[1,11,14,17]])})))).apply(this,arguments)}function yo(e,t){return(0,(0,Fr.dispatch)("core/block-editor").insertBlocks)(e).then((function(){window.dispatchEvent(new CustomEvent("extendify-sdk::template-inserted",{detail:{template:t},bubbles:!0}))}))}function bo(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return go(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return go(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function go(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 xo=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return{hasRequiredPlugins:Qr,hasPluginsActivated:io,stack:[],check:function(t){var n=this;return co(S().mark((function r(){var o,i,a;return S().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:o=ao(e),r.prev=1,a=S().mark((function e(){var r,o;return S().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=i.value,e.next=3,n["".concat(r)](t);case 3:o=e.sent,setTimeout((function(){n.stack.push(o.pass?o.allow:o.deny)}),0);case 5:case"end":return e.stop()}}),e)})),o.s();case 4:if((i=o.n()).done){r.next=8;break}return r.delegateYield(a(),"t0",6);case 6:r.next=4;break;case 8:r.next=13;break;case 10:r.prev=10,r.t1=r.catch(1),o.e(r.t1);case 13:return r.prev=13,o.f(),r.finish(13);case 16:case"end":return r.stop()}}),r,null,[[1,10,13,16]])})))()},reset:function(){this.stack=[]}}}(["hasRequiredPlugins","hasPluginsActivated"]);function wo(e){var t=e.template,n=g((function(e){return e.activeTemplateBlocks})),o=G((function(e){return e.canImport})),i=G((function(e){return e.apiKey})),a=x((function(e){return e.setOpen})),u=bo((0,r.useState)(!1),2),s=u[0],c=u[1],l=bo((0,r.useState)(!1),2),f=l[0],d=l[1],p=Lr((function(e){return e.setWanted})),m=function(){(function(e){return mo.apply(this,arguments)})(xo.stack).then((function(){setTimeout((function(){yo(n,t).then((function(){return a(!1)}))}),100)}))};(0,r.useEffect)((function(){return xo.check(t).then((function(){return d(!0)})),function(){return xo.reset()&&d(!1)}}),[t]),(0,r.useEffect)((function(){s&&sr(t)}),[s,t]);return f&&Object.keys(n).length?i||o()?s?(0,Vn.jsx)("button",{type:"button",disabled:!0,className:"components-button is-secondary text-lg sm:text-2xl h-auto py-1.5 px-3 sm:py-2.5 sm:px-5",onClick:function(){},children:(0,Un.__)("Importing...","extendify-sdk")}):(0,Vn.jsx)("button",{type:"button",className:"components-button is-primary text-lg sm:text-2xl h-auto py-1.5 px-3 sm:py-2.5 sm:px-5",onClick:function(){return c(!0),p(t),void m()},children:(0,Un.sprintf)((0,Un.__)("Add %s","extendify-sdk"),t.fields.type)}):(0,Vn.jsx)("a",{className:"button-extendify-main text-lg sm:text-2xl py-1.5 px-3 sm:py-2.5 sm:px-5",target:"_blank",href:"https://extendify.com",rel:"noreferrer",children:(0,Un.__)("Sign up now","extendify-sdk")}):""}function So(e){var t,n,o,i,a,u,s,c=e.template,l=c.fields.tax_categories,f=G((function(e){return e.apiKey}));return(0,r.useEffect)((function(){cr(c)}),[c]),(0,Vn.jsxs)("div",{className:"flex flex-col min-h-screen bg-white sm:min-h-0 items-start overflow-y-auto h-full sm:pr-8 lg:pl-px lg:-ml-px",children:[(0,Vn.jsxs)("div",{className:"flex flex-col lg:flex-row items-start justify-start lg:items-center lg:justify-between w-full max-w-screen-xl",children:[(0,Vn.jsxs)("div",{className:"text-left m-0 sm:mb-6 p-6 sm:p-0",children:[(0,Vn.jsx)("h1",{className:"leading-tight text-left mb-2.5 sm:text-3xl font-normal",children:c.fields.title}),(0,Vn.jsx)(Kn.ExternalLink,{href:c.fields.url,children:(0,Un.__)("Demo","extendify-sdk")})]}),(0,Vn.jsx)("div",{className:$n()({"inline-flex absolute sm:static sm:top-auto right-0 m-6 sm:m-0 sm:my-6 space-x-3":!0,"top-16 mt-5":!f.length,"top-0":f.length>0}),children:(0,Vn.jsx)(wo,{template:c})})]}),(0,Vn.jsx)("div",{className:"max-w-screen-xl sm:w-full sm:m-0 sm:mb-12 m-6 border border-gray-300 m-46",children:(0,Vn.jsx)("img",{className:"max-w-full w-full",src:null!==(t=null==c||null===(n=c.fields)||void 0===n||null===(o=n.screenshot[0])||void 0===o||null===(i=o.thumbnails)||void 0===i||null===(a=i.full)||void 0===a?void 0:a.url)&&void 0!==t?t:null==c||null===(u=c.fields)||void 0===u||null===(s=u.screenshot[0])||void 0===s?void 0:s.url})}),(0,Vn.jsxs)("div",{className:"text-xs text-left p-6 w-full block sm:hidden",children:[(0,Vn.jsx)("h3",{className:"m-0 mb-6",children:(0,Un.__)("Categories","extendify-sdk")}),(0,Vn.jsx)("ul",{className:"text-sm",children:l.map((function(e){return(0,Vn.jsx)("li",{className:"inline-block mr-2 px-4 py-2 bg-gray-100",children:e},e)}))})]})]})}function ko(){return 0===G((function(e){return e.apiKey})).length?(0,Vn.jsx)("button",{className:"components-button",onClick:function(){return x.setState({currentPage:"login"})},children:(0,Un.__)("Log into account","extendify-sdk")}):(0,Vn.jsx)("button",{className:"components-button",onClick:function(){return G.setState({apiKey:""})},children:(0,Un.__)("Log out","extendify-sdk")})}function jo(e){var t=e.children;return(0,Vn.jsxs)(Vn.Fragment,{children:[(0,Vn.jsxs)("aside",{className:"flex-shrink-0 sm:pl-12 py-0 sm:py-6 relative",children:[(0,Vn.jsx)("div",{className:"sm:w-56 lg:w-72 sticky flex flex-col h-full",children:t[0]}),(0,Vn.jsxs)("div",{className:"hidden sm:flex flex-col absolute bottom-0 bg-white p-4 w-72 text-left space-y-4",children:[(0,Vn.jsx)("div",{children:(0,Vn.jsx)(Kn.Button,{isSecondary:!0,target:"_blank",href:"https://extendify.com/feedback",children:(0,Un.__)("Send us your feedback","extendify-sdk")})}),(0,Vn.jsx)("div",{className:"border-t border-gray-300",children:(0,Vn.jsx)(ko,{})})]})]}),(0,Vn.jsx)("main",{id:"extendify-templates",tabIndex:"0",className:"w-full smp:l-12 sm:pt-6 h-full",children:t[1]})]})}function Oo(){var e=g((function(e){return e.updateSearchParams})),t=g((function(e){return e.searchParams})),n=function(t){return e({type:t})};return(0,Vn.jsxs)("div",{className:"text-left w-full bg-white px-6 sm:px-0 pb-4 sm:pb-6 mt-px border-b sm:border-0",children:[(0,Vn.jsx)("h4",{className:"sr-only",children:(0,Un.__)("Type select","extendify-sdk")}),(0,Vn.jsxs)("button",{type:"button",className:$n()({"cursor-pointer p-3.5 space-x-2 inline-flex items-center border border-black button-focus":!0,"bg-gray-900 text-white":"pattern"===t.type,"bg-transparent text-black":"pattern"!==t.type}),onClick:function(){return n("pattern")},children:[(0,Vn.jsx)("svg",{width:"17",height:"13",viewBox:"0 0 17 13",className:"fill-current",xmlns:"http://www.w3.org/2000/svg",children:(0,Vn.jsx)("path",{d:"M1 13H16C16.55 13 17 12.55 17 12V8C17 7.45 16.55 7 16 7H1C0.45 7 0 7.45 0 8V12C0 12.55 0.45 13 1 13ZM0 1V5C0 5.55 0.45 6 1 6H16C16.55 6 17 5.55 17 5V1C17 0.45 16.55 0 16 0H1C0.45 0 0 0.45 0 1Z"})}),(0,Vn.jsx)("span",{className:"",children:(0,Un.__)("Patterns","extendify-sdk")})]}),(0,Vn.jsxs)("button",{type:"button",className:$n()({"cursor-pointer p-3.5 px-4 space-x-2 inline-flex items-center border border-black focus:ring-2 focus:ring-wp-theme-500 ring-offset-1 outline-none -ml-px":!0,"bg-gray-900 text-white":"template"===t.type,"bg-transparent text-black":"template"!==t.type}),onClick:function(){return n("template")},children:[(0,Vn.jsx)("svg",{width:"17",height:"13",viewBox:"0 0 17 13",className:"fill-current",xmlns:"http://www.w3.org/2000/svg",children:(0,Vn.jsx)("path",{d:"M7 13H10C10.55 13 11 12.55 11 12V8C11 7.45 10.55 7 10 7H7C6.45 7 6 7.45 6 8V12C6 12.55 6.45 13 7 13ZM1 13H4C4.55 13 5 12.55 5 12V1C5 0.45 4.55 0 4 0H1C0.45 0 0 0.45 0 1V12C0 12.55 0.45 13 1 13ZM13 13H16C16.55 13 17 12.55 17 12V8C17 7.45 16.55 7 16 7H13C12.45 7 12 7.45 12 8V12C12 12.55 12.45 13 13 13ZM6 1V5C6 5.55 6.45 6 7 6H16C16.55 6 17 5.55 17 5V1C17 0.45 16.55 0 16 0H7C6.45 0 6 0.45 6 1Z"})}),(0,Vn.jsx)("span",{className:"",children:(0,Un.__)("Page templates","extendify-sdk")})]})]})}function Co(e){var t=e.template,n=g((function(e){return e.setActive})),o=(0,r.useRef)(null),i=t.fields,a=i.tax_categories,u=i.required_plugins,s=G((function(e){return e.apiKey}));return(0,r.useEffect)((function(){o.current.focus()}),[]),(0,Vn.jsxs)("div",{className:"flex flex-col items-start justify-start",children:[!s.length&&(0,Vn.jsxs)("div",{className:"h-full flex sm:hidden w-full p-4 justify-between border items-center border-gray-300 bg-extendify-lightest",children:[(0,Vn.jsx)("a",{className:"button-extendify-main",target:"_blank",href:"https://extendify.com",rel:"noreferrer",children:(0,Un.__)("Sign up today to get unlimited beta access","extendify-sdk")}),(0,Vn.jsx)("button",{className:"components-button",onClick:function(){return x.setState({currentPage:"login"})},children:(0,Un.__)("Log in","extendify-sdk")})]}),(0,Vn.jsx)("div",{className:"p-6 sm:p-0",children:(0,Vn.jsxs)("button",{ref:o,type:"button",className:"cursor-pointer text-black bg-transparent font-medium flex items-center p-3 transform -translate-x-3 button-focus",onClick:function(){return n({})},children:[(0,Vn.jsx)("svg",{className:"fill-current",width:"8",height:"12",viewBox:"0 0 8 12",xmlns:"http://www.w3.org/2000/svg",children:(0,Vn.jsx)("path",{d:"M6.70998 9.88047L2.82998 6.00047L6.70998 2.12047C7.09998 1.73047 7.09998 1.10047 6.70998 0.710469C6.31998 0.320469 5.68998 0.320469 5.29998 0.710469L0.70998 5.30047C0.31998 5.69047 0.31998 6.32047 0.70998 6.71047L5.29998 11.3005C5.68998 11.6905 6.31998 11.6905 6.70998 11.3005C7.08998 10.9105 7.09998 10.2705 6.70998 9.88047Z"})}),(0,Vn.jsx)("span",{className:"ml-4",children:(0,Un.__)("Go back","extendify-sdk")})]})}),(0,Vn.jsxs)("div",{className:"text-left pt-14 divide-y w-full hidden sm:block",children:[(0,Vn.jsxs)("div",{className:"w-full py-6",children:[(0,Vn.jsx)("h3",{className:"m-0 mb-6",children:(0,Un.__)("Categories","extendify-sdk")}),(0,Vn.jsx)("ul",{className:"text-sm m-0",children:a.map((function(e){return(0,Vn.jsx)("li",{className:"inline-block mr-2 px-4 py-2 bg-gray-100",children:e},e)}))})]}),u.filter((function(e){return"editorplus"!==e})).length>0&&(0,Vn.jsxs)("div",{className:"pt-4 w-full",children:[(0,Vn.jsx)("h3",{className:"m-0 mb-6",children:(0,Un.__)("Required Plugins","extendify-sdk")}),(0,Vn.jsx)("ul",{className:"text-sm",children:u.filter((function(e){return"editorplus"!==e})).map((function(e){return(0,Vn.jsx)("li",{className:"inline-block mr-2 px-4 py-2 bg-extendify-light",children:Wr(e)},e)}))})]}),(0,Vn.jsx)("div",{className:"py-6",children:(0,Vn.jsx)("a",{href:"https://extendify.com/what-happens-when-a-template-is-added",rel:"noreferrer",target:"_blank",children:(0,Un.__)("What happens when a template is added?","extendify-sdk")})})]})]})}function Eo(){var e=g((function(e){return e.searchParams}));return(0,Vn.jsx)("div",{className:"hidden sm:flex items-start flex-col lg:flex-row -mt-2 lg:-mx-2 mb-4 lg:divide-x-2 lg:leading-none",children:Object.entries(e.taxonomies).map((function(t){return"template"===e.type&&"tax_pattern_types"===t[0]||"pattern"===e.type&&"tax_page_types"===t[0]?"":(0,Vn.jsxs)("div",{className:"lg:px-2 text-left",children:[(0,Vn.jsx)("span",{className:"font-bold",children:(n=t[0],n.replace("tax_","").replace("_"," ").replace(/\b\w/g,(function(e){return e.toUpperCase()})))}),": ",(0,Vn.jsx)("span",{children:t[1]?t[1]:"All"})]},t[0]);var n}))})}function Po(e){var t=e.className,n=e.initialFocus,r=g((function(e){return e.templates})),o=g((function(e){return e.activeTemplate}));return(0,Vn.jsxs)("div",{className:t,children:[(0,Vn.jsx)("a",{href:"#extendify-templates",className:"sr-only focus:not-sr-only focus:text-blue-500",children:(0,Un.__)("Skip to content","extendify-sdk")}),(0,Vn.jsxs)("div",{className:"sm:flex sm:space-x-12 relative bg-white mx-auto max-w-screen-4xl h-full",children:[!!Object.keys(o).length&&(0,Vn.jsx)("div",{className:"absolute bg-white sm:flex inset-0 z-50 sm:space-x-12",children:(0,Vn.jsxs)(jo,{children:[(0,Vn.jsx)(Co,{template:o}),(0,Vn.jsx)(So,{template:o})]})}),(0,Vn.jsxs)(jo,{children:[(0,Vn.jsx)(rr,{initialFocus:n}),(0,Vn.jsxs)(Vn.Fragment,{children:[(0,Vn.jsx)(Oo,{}),(0,Vn.jsx)(Eo,{}),(0,Vn.jsx)("div",{className:"relative h-full z-30 bg-white",children:(0,Vn.jsx)("div",{className:"absolute z-20 inset-0 lg:static h-screen lg:h-full overflow-y-auto pt-4 sm:pt-0 px-6 sm:pl-0 sm:pr-8",children:(0,Vn.jsx)(Or,{templates:r})})})]})]})]})]})}function Io(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)}function No(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return To(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return To(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function To(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _o(){var e=No((0,r.useState)(G.getState().apiKey),2),t=e[0],n=e[1],o=No((0,r.useState)(G.getState().email),2),i=o[0],a=o[1],u=No((0,r.useState)(""),2),s=u[0],c=u[1],l=No((0,r.useState)("info"),2),f=l[0],d=l[1],p=No((0,r.useState)(""),2),m=p[0],v=p[1];(0,r.useEffect)((function(){return function(){return d("info")}}),[]);var h=function(){var e,n=(e=S().mark((function e(n){var r,o,a,u,s,l;return S().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n.preventDefault(),c(""),r=i.length?i:m,e.next=5,L(r,t);case 5:if(o=e.sent,a=o.token,u=o.error,s=o.exception,void 0===(l=o.message)){e.next=13;break}return d("error"),e.abrupt("return",c(l.length?l:"Error: Are you interacting with the wrong server?"));case 13:if(!u&&!s){e.next=16;break}return d("error"),e.abrupt("return",c(u.length?u:s));case 16:if(a&&"string"==typeof a){e.next=19;break}return d("error"),e.abrupt("return",c((0,Un.__)("Something went wrong","extendify-sdk")));case 19:return d("success"),c("Success!"),e.next=23,new Promise((function(e){return setTimeout(e,1500)}));case 23:G.setState({apiKey:a}),x.setState({currentPage:"content"});case 25:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Io(i,r,o,a,u,"next",e)}function u(e){Io(i,r,o,a,u,"throw",e)}a(void 0)}))});return function(e){return n.apply(this,arguments)}}();return(0,r.useEffect)((function(){i||A("user_email").then((function(e){return v(e)}))}),[i]),(0,Vn.jsxs)("section",{className:"w-96 text-left md:-mt-32",children:[(0,Vn.jsx)("h1",{className:"border-b border-gray-900 mb-12 pb-4",children:(0,Un.__)("Welcome","extendify-sdk")}),s&&(0,Vn.jsx)("div",{className:$n()({"border-b pb-6 mb-6 -mt-6":!0,"border-gray-900 text-gray-900":"info"===f,"border-wp-alert-red text-wp-alert-red":"error"===f,"border-extendify-main text-extendify-main":"success"===f}),children:s}),(0,Vn.jsxs)("form",{onSubmit:h,className:" space-y-6",children:[(0,Vn.jsxs)("div",{className:"flex items-center",children:[(0,Vn.jsx)("label",{htmlFor:"extendifysdk-login-email",className:"w-32 font-bold",children:(0,Un.__)("Email:","extendify-sdk")}),(0,Vn.jsx)("input",{id:"extendifysdk-login-email",name:"extendifysdk-login-email",type:"email",className:"border px-2 w-full",placeholder:"Email",value:i.length?i:m,onChange:function(e){return a(e.target.value)}})]}),(0,Vn.jsxs)("div",{className:"flex items-center",children:[(0,Vn.jsx)("label",{htmlFor:"extendifysdk-login-license",className:"w-32 font-bold",children:(0,Un.__)("License:","extendify-sdk")}),(0,Vn.jsx)("input",{id:"extendifysdk-login-license",name:"extendifysdk-login-email",type:"text",className:"border px-2 w-full",placeholder:"License key",value:t,onChange:function(e){return n(e.target.value)}})]}),(0,Vn.jsx)("div",{className:"flex justify-end",children:(0,Vn.jsx)("button",{type:"submit",className:"button-extendify-main p-3 px-4",children:(0,Un.__)("Sign in","extendify-sdk")})})]})]})}function Ro(e){var t=e.className;return(0,Vn.jsxs)("div",{className:t,children:[(0,Vn.jsx)("a",{href:"#extendify-templates",className:"sr-only focus:not-sr-only focus:text-blue-500",children:(0,Un.__)("Skip to content","extendify-sdk")}),(0,Vn.jsx)("div",{className:"flex sm:space-x-12 relative mx-auto max-w-screen-4xl h-full",children:(0,Vn.jsxs)("div",{className:"absolute flex inset-0 items-center justify-center z-20 sm:space-x-12",children:[(0,Vn.jsx)("div",{className:"pl-12 py-6 absolute top-0 left-0",children:(0,Vn.jsxs)("button",{type:"button",className:"cursor-pointer text-black bg-transparent font-medium flex items-center p-3 transform -translate-x-3 button-focus",onClick:function(){return x.setState({currentPage:"content"})},children:[(0,Vn.jsx)("svg",{className:"fill-current",width:"8",height:"12",viewBox:"0 0 8 12",xmlns:"http://www.w3.org/2000/svg",children:(0,Vn.jsx)("path",{d:"M6.70998 9.88047L2.82998 6.00047L6.70998 2.12047C7.09998 1.73047 7.09998 1.10047 6.70998 0.710469C6.31998 0.320469 5.68998 0.320469 5.29998 0.710469L0.70998 5.30047C0.31998 5.69047 0.31998 6.32047 0.70998 6.71047L5.29998 11.3005C5.68998 11.6905 6.31998 11.6905 6.70998 11.3005C7.08998 10.9105 7.09998 10.2705 6.70998 9.88047Z"})}),(0,Vn.jsx)("span",{className:"ml-4",children:(0,Un.__)("Go back","extendify-sdk")})]})}),(0,Vn.jsx)("div",{className:"flex justify-center",children:(0,Vn.jsx)(_o,{})})]})})]})}function Ao(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Lo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Lo(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Lo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Do(){var e=Ao((0,r.useState)(!1),2),t=e[0],n=e[1],o=(0,r.useRef)(null),i=x((function(e){return e.open})),a=x((function(e){return e.setOpen})),u=x((function(e){return e.currentPage}));return(0,Vn.jsx)(Bn.Root,{show:i,as:r.Fragment,children:(0,Vn.jsx)(ot,{as:"div",static:!0,className:"extendify-sdk",initialFocus:o,onClose:function(){},children:(0,Vn.jsx)("div",{className:"h-screen w-screen sm:h-auto sm:w-auto fixed z-high inset-0 overflow-y-auto",children:(0,Vn.jsxs)("div",{className:"flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0",children:[(0,Vn.jsx)(Bn.Child,{as:r.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",children:(0,Vn.jsx)(ot.Overlay,{className:"fixed inset-0 bg-black bg-opacity-30 transition-opacity"})}),(0,Vn.jsx)(Bn.Child,{as:r.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 translate-y-4 sm:translate-y-5",enterTo:"opacity-100 translate-y-0",children:(0,Vn.jsx)("div",{className:$n()({"fixed lg:absolute inset-0 lg:overflow-hidden transform transition-all":!0,"lg:pt-5 lg:p-10":!t}),children:(0,Vn.jsxs)("div",{className:$n()({"bg-white h-full flex flex-col items-center relative shadow-xl":!0,"max-w-screen-4xl mx-auto":!t}),children:[(0,Vn.jsx)(Gn,{className:"w-full h-16 border-solid border-0 border-b border-gray-300 flex-shrink-0",toggleFullScreen:function(){return n(!t)},initialFocus:o,hideLibrary:function(){return a(!1)}}),"content"===u&&(0,Vn.jsx)(Po,{className:"w-full flex-grow overflow-hidden"}),"login"===u&&(0,Vn.jsx)(Ro,{className:"w-full flex-grow overflow-hidden bg-extendify-light"})]})})})]})})})})}function Fo(e){var t=e.show,n=void 0!==t&&t,o=x((function(e){return e.setOpen})),i=(0,r.useCallback)((function(){return o(!0)}),[o]),a=(0,r.useCallback)((function(){o(!1)}),[o]);return(0,r.useEffect)((function(){n&&o(!0)}),[n,o]),(0,r.useEffect)((function(){return window.localStorage.getItem("etfy_library__key")&&G.setState({apiKey:"any-key-will-work-during-beta"}),function(){return window.localStorage.removeItem("etfy_library__key")}}),[]),(0,r.useEffect)((function(){return window.addEventListener("extendify-sdk::open-library",i),window.addEventListener("extendify-sdk::close-library",a),function(){window.removeEventListener("extendify-sdk::open-library",i),window.removeEventListener("extendify-sdk::close-library",a)}}),[a,i]),(0,Vn.jsx)(Do,{})}const Mo=wp.plugins,Bo=wp.editPost;var Uo=function(e){var t,n;qr(null===(t=e.target.closest("[data-extendify-identifier]"))||void 0===t||null===(n=t.dataset)||void 0===n?void 0:n.extendifyIdentifier)},Vo=(0,Vn.jsx)("div",{id:"extendify-templates-inserter",children:(0,Vn.jsxs)("button",{style:"background:#D9F1EE;color:#1e1e1e;border:1px solid #949494;font-weight:bold;font-size:14px;padding:8px;margin-right:8px",type:"button","data-extendify-identifier":"main-button",id:"extendify-templates-inserter-btn",className:"components-button",children:[(0,Vn.jsxs)("svg",{style:"margin-right:0.5rem",width:"20",height:"20",viewBox:"0 0 103 103",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Vn.jsx)("rect",{y:"25.75",width:"70.8125",height:"77.25",fill:"#000000"}),(0,Vn.jsx)("rect",{x:"45.0625",width:"57.9375",height:"57.9375",fill:"#37C2A2"})]}),(0,Un.__)("Library","extendify-sdk")]})});window._wpLoadBlockEditor&&window.wp.data.subscribe((function(){setTimeout((function(){G.getState().enabled&&(document.getElementById("extendify-templates-inserter-btn")||document.querySelector(".edit-post-header-toolbar")&&(document.querySelector(".edit-post-header-toolbar").insertAdjacentHTML("beforeend",(0,r.renderToString)(Vo)),document.getElementById("extendify-templates-inserter-btn").addEventListener("click",Uo)))}),0)})),window._wpLoadBlockEditor&&window.wp.data.subscribe((function(){setTimeout((function(){if(G.getState().enabled&&document.querySelector("[id$=patterns-view]")&&!document.getElementById("extendify-cta-button")){var e=(0,Vn.jsx)("div",{children:(0,Vn.jsx)("button",{id:"extendify-cta-button",style:"margin:1rem 1rem 0","data-extendify-identifier":"patterns-cta",className:"components-button is-secondary",children:(0,Un.__)("Discover more patterns in Extendify Library","extendify-sdk")})});document.querySelector("[id$=patterns-view]").insertAdjacentHTML("afterbegin",(0,r.renderToString)(e)),document.getElementById("extendify-cta-button").addEventListener("click",Uo)}}),0)}));window._wpLoadBlockEditor&&(0,Mo.registerPlugin)("extendify-temps-more-menu-trigger",{render:function(){return G.getState().enabled&&(0,Vn.jsx)(Bo.PluginSidebarMoreMenuItem,{"data-extendify-identifier":"sidebar-button",onClick:Uo,icon:(0,Vn.jsx)("span",{className:"components-menu-items__item-icon",children:(0,Vn.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 103 103",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Vn.jsx)("rect",{y:"25.75",width:"70.8125",height:"77.25",fill:"#000000"}),(0,Vn.jsx)("rect",{x:"45.0625",width:"57.9375",height:"57.9375",fill:"#37C2A2"})]})}),children:(0,Un.__)("Library","extendify-sdk")})}});window._wpLoadBlockEditor&&(0,Mo.registerPlugin)("extendify-settings-enable-disable",{render:function(){return(0,Vn.jsx)(Bo.PluginSidebarMoreMenuItem,{onClick:function(){G.setState({enabled:!G.getState().enabled}),requestAnimationFrame((function(){return location.reload()}))},icon:(0,Vn.jsx)(Vn.Fragment,{}),children:G.getState().enabled?(0,Un.__)("Disable Extendify","extendify-sdk"):(0,Un.__)("Enable Extendify","extendify-sdk")})}}),[{register:function(){var e=(0,Fr.dispatch)("core/notices").createNotice,t=G.getState().incrementImports;window.addEventListener("extendify-sdk::template-inserted",(function(n){e("info",(0,Un.__)("Template Added"),{isDismissible:!0,type:"snackbar"}),setTimeout((function(){var e;t(),lr(null===(e=n.detail)||void 0===e?void 0:e.template)}),0)}))}},{register:function(){var e=this;window.addEventListener("extendify-sdk::softerror-encountered",(function(t){e[(0,qn.camelCase)(t.detail.type)](t.detail)}))},versionOutdated:function(e){(0,r.render)((0,Vn.jsx)(Kr,{title:e.data.title,message:e.data.message,buttonLabel:e.data.buttonLabel,forceOpen:!0}),document.getElementById("extendify-root"))}}].forEach((function(e){return e.register()})),window._wpLoadBlockEditor&&window.wp.domReady((function(){var e=document.createElement("div");if(e.id="extendify-root",document.body.append(e),(0,r.render)((0,Vn.jsx)(Fo,{}),e),Lr.getState().importOnLoad){var t=Lr.getState().wantedTemplate;setTimeout((function(){!function(e){if(!e)throw Error("Template not found");yo(p((0,window.wp.blocks.parse)((0,qn.get)(e,"fields.code"))),e)}(t)}),0)}Lr.setState({importOnLoad:!1,wantedTemplate:{}})}))},42:(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 i=typeof n;if("string"===i||"number"===i)e.push(n);else if(Array.isArray(n)){if(n.length){var a=o.apply(null,n);a&&e.push(a)}}else if("object"===i)if(n.toString===Object.prototype.toString)for(var u in n)r.call(n,u)&&n[u]&&e.push(u);else e.push(n.toString())}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},716:()=>{},525:e=>{"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,i){for(var a,u,s=o(e),c=1;c<arguments.length;c++){for(var l in a=Object(arguments[c]))n.call(a,l)&&(s[l]=a[l]);if(t){u=t(a);for(var f=0;f<u.length;f++)r.call(a,u[f])&&(s[u[f]]=a[u[f]])}}return s}},61:e=>{var t,n,r=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{n="function"==typeof clearTimeout?clearTimeout:i}catch(e){n=i}}();var u,s=[],c=!1,l=-1;function f(){c&&u&&(c=!1,u.length?s=u.concat(s):l=-1,s.length&&d())}function d(){if(!c){var e=a(f);c=!0;for(var t=s.length;t;){for(u=s,s=[];++l<t;)u&&u[l].run();l=-1,t=s.length}u=null,c=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===i||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function m(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];s.push(new p(e,t)),1!==s.length||c||a(d)},p.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=m,r.addListener=m,r.once=m,r.off=m,r.removeListener=m,r.removeAllListeners=m,r.emit=m,r.prependListener=m,r.prependOnceListener=m,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},426:(e,t,n)=>{"use strict";n(525);var r=n(804),o=60103;if(t.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var i=Symbol.for;o=i("react.element"),t.Fragment=i("react.fragment")}var a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u=Object.prototype.hasOwnProperty,s={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,i={},c=null,l=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(l=t.ref),t)u.call(t,r)&&!s.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:o,type:e,key:c,ref:l,props:i,_owner:a.current}}t.jsx=c,t.jsxs=c},246:(e,t,n)=>{"use strict";e.exports=n(426)},248:e=>{var t=function(e){"use strict";var t,n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function c(e,t,n,r){var o=t&&t.prototype instanceof h?t:h,i=Object.create(o.prototype),a=new P(r||[]);return i._invoke=function(e,t,n){var r=f;return function(o,i){if(r===p)throw new Error("Generator is already running");if(r===m){if("throw"===o)throw i;return N()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var u=O(a,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=p;var s=l(e,t,n);if("normal"===s.type){if(r=n.done?m:d,s.arg===v)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r=m,n.method="throw",n.arg=s.arg)}}}(e,n,a),i}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var f="suspendedStart",d="suspendedYield",p="executing",m="completed",v={};function h(){}function y(){}function b(){}var g={};g[i]=function(){return this};var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==n&&r.call(w,i)&&(g=w);var S=b.prototype=h.prototype=Object.create(g);function k(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function n(o,i,a,u){var s=l(e[o],e,i);if("throw"!==s.type){var c=s.arg,f=c.value;return f&&"object"==typeof f&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,a,u)}),(function(e){n("throw",e,a,u)})):t.resolve(f).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,u)}))}u(s.arg)}var o;this._invoke=function(e,r){function i(){return new t((function(t,o){n(e,r,t,o)}))}return o=o?o.then(i,i):i()}}function O(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,O(e,n),"throw"===n.method))return v;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var o=l(r,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var i=o.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,v):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(e){if(e){var n=e[i];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return a.next=a}}return{next:N}}function N(){return{value:t,done:!0}}return y.prototype=S.constructor=b,b.constructor=y,y.displayName=s(b,u,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,s(e,u,"GeneratorFunction")),e.prototype=Object.create(S),e},e.awrap=function(e){return{__await:e}},k(j.prototype),j.prototype[a]=function(){return this},e.AsyncIterator=j,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new j(c(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},k(S),s(S,u,"Generator"),S[i]=function(){return this},S.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=I,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(E),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return u.type="throw",u.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),E(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;E(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:I(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),v}},e}(e.exports);try{regeneratorRuntime=t}catch(e){Function("r","regeneratorRuntime = r")(t)}},804:e=>{"use strict";e.exports=React}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,r),i.exports}r.m=t,e=[],r.O=(t,n,o,i)=>{if(!n){var a=1/0;for(c=0;c<e.length;c++){for(var[n,o,i]=e[c],u=!0,s=0;s<n.length;s++)(!1&i||a>=i)&&Object.keys(r.O).every((e=>r.O[e](n[s])))?n.splice(s--,1):(u=!1,i<a&&(a=i));u&&(e.splice(c--,1),t=o())}return t}i=i||0;for(var c=e.length;c>0&&e[c-1][2]>i;c--)e[c]=e[c-1];e[c]=[n,o,i]},r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={172:0,106:0};r.O.j=t=>0===e[t];var t=(t,n)=>{var o,i,[a,u,s]=n,c=0;for(o in u)r.o(u,o)&&(r.m[o]=u[o]);if(s)var l=s(r);for(t&&t(n);c<a.length;c++)i=a[c],r.o(e,i)&&e[i]&&e[i][0](),e[a[c]]=0;return r.O(l)},n=self.webpackChunk=self.webpackChunk||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})(),r.O(void 0,[106],(()=>r(473)));var o=r.O(void 0,[106],(()=>r(716)));o=r.O(o)})();
1
  /*! For license information please see extendify-sdk.js.LICENSE.txt */
2
+ (()=>{var e,t={135:(e,t,n)=>{e.exports=n(248)},206:(e,t,n)=>{e.exports=n(57)},387:(e,t,n)=>{"use strict";var r=n(485),o=n(570),i=n(940),a=n(581),u=n(574),s=n(845),c=n(338),l=n(524);e.exports=function(e){return new Promise((function(t,n){var f=e.data,d=e.headers;r.isFormData(f)&&delete d["Content-Type"];var p=new XMLHttpRequest;if(e.auth){var m=e.auth.username||"",v=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";d.Authorization="Basic "+btoa(m+":"+v)}var h=u(e.baseURL,e.url);if(p.open(e.method.toUpperCase(),a(h,e.params,e.paramsSerializer),!0),p.timeout=e.timeout,p.onreadystatechange=function(){if(p&&4===p.readyState&&(0!==p.status||p.responseURL&&0===p.responseURL.indexOf("file:"))){var r="getAllResponseHeaders"in p?s(p.getAllResponseHeaders()):null,i={data:e.responseType&&"text"!==e.responseType?p.response:p.responseText,status:p.status,statusText:p.statusText,headers:r,config:e,request:p};o(t,n,i),p=null}},p.onabort=function(){p&&(n(l("Request aborted",e,"ECONNABORTED",p)),p=null)},p.onerror=function(){n(l("Network Error",e,null,p)),p=null},p.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(l(t,e,"ECONNABORTED",p)),p=null},r.isStandardBrowserEnv()){var y=(e.withCredentials||c(h))&&e.xsrfCookieName?i.read(e.xsrfCookieName):void 0;y&&(d[e.xsrfHeaderName]=y)}if("setRequestHeader"in p&&r.forEach(d,(function(e,t){void 0===f&&"content-type"===t.toLowerCase()?delete d[t]:p.setRequestHeader(t,e)})),r.isUndefined(e.withCredentials)||(p.withCredentials=!!e.withCredentials),e.responseType)try{p.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&p.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&p.upload&&p.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){p&&(p.abort(),n(e),p=null)})),f||(f=null),p.send(f)}))}},57:(e,t,n)=>{"use strict";var r=n(485),o=n(875),i=n(29),a=n(941);function u(e){var t=new i(e),n=o(i.prototype.request,t);return r.extend(n,i.prototype,t),r.extend(n,t),n}var s=u(n(141));s.Axios=i,s.create=function(e){return u(a(s.defaults,e))},s.Cancel=n(132),s.CancelToken=n(603),s.isCancel=n(475),s.all=function(e){return Promise.all(e)},s.spread=n(739),s.isAxiosError=n(835),e.exports=s,e.exports.default=s},132:e=>{"use strict";function t(e){this.message=e}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,e.exports=t},603:(e,t,n)=>{"use strict";var r=n(132);function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;e((function(e){n.reason||(n.reason=new r(e),t(n.reason))}))}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var e;return{token:new o((function(t){e=t})),cancel:e}},e.exports=o},475:e=>{"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},29:(e,t,n)=>{"use strict";var r=n(485),o=n(581),i=n(96),a=n(9),u=n(941);function s(e){this.defaults=e,this.interceptors={request:new i,response:new i}}s.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=u(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=[a,void 0],n=Promise.resolve(e);for(this.interceptors.request.forEach((function(e){t.unshift(e.fulfilled,e.rejected)})),this.interceptors.response.forEach((function(e){t.push(e.fulfilled,e.rejected)}));t.length;)n=n.then(t.shift(),t.shift());return n},s.prototype.getUri=function(e){return e=u(this.defaults,e),o(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(e){s.prototype[e]=function(t,n){return this.request(u(n||{},{method:e,url:t,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(e){s.prototype[e]=function(t,n,r){return this.request(u(r||{},{method:e,url:t,data:n}))}})),e.exports=s},96:(e,t,n)=>{"use strict";var r=n(485);function o(){this.handlers=[]}o.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=o},574:(e,t,n)=>{"use strict";var r=n(642),o=n(288);e.exports=function(e,t){return e&&!r(t)?o(e,t):t}},524:(e,t,n)=>{"use strict";var r=n(953);e.exports=function(e,t,n,o,i){var a=new Error(e);return r(a,t,n,o,i)}},9:(e,t,n)=>{"use strict";var r=n(485),o=n(212),i=n(475),a=n(141);function u(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return u(e),e.headers=e.headers||{},e.data=o(e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||a.adapter)(e).then((function(t){return u(e),t.data=o(t.data,t.headers,e.transformResponse),t}),(function(t){return i(t)||(u(e),t&&t.response&&(t.response.data=o(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},953:e=>{"use strict";e.exports=function(e,t,n,r,o){return e.config=t,n&&(e.code=n),e.request=r,e.response=o,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},941:(e,t,n)=>{"use strict";var r=n(485);e.exports=function(e,t){t=t||{};var n={},o=["url","method","data"],i=["headers","auth","proxy","params"],a=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],u=["validateStatus"];function s(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function c(o){r.isUndefined(t[o])?r.isUndefined(e[o])||(n[o]=s(void 0,e[o])):n[o]=s(e[o],t[o])}r.forEach(o,(function(e){r.isUndefined(t[e])||(n[e]=s(void 0,t[e]))})),r.forEach(i,c),r.forEach(a,(function(o){r.isUndefined(t[o])?r.isUndefined(e[o])||(n[o]=s(void 0,e[o])):n[o]=s(void 0,t[o])})),r.forEach(u,(function(r){r in t?n[r]=s(e[r],t[r]):r in e&&(n[r]=s(void 0,e[r]))}));var l=o.concat(i).concat(a).concat(u),f=Object.keys(e).concat(Object.keys(t)).filter((function(e){return-1===l.indexOf(e)}));return r.forEach(f,c),n}},570:(e,t,n)=>{"use strict";var r=n(524);e.exports=function(e,t,n){var o=n.config.validateStatus;n.status&&o&&!o(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},212:(e,t,n)=>{"use strict";var r=n(485);e.exports=function(e,t,n){return r.forEach(n,(function(n){e=n(e,t)})),e}},141:(e,t,n)=>{"use strict";var r=n(61),o=n(485),i=n(446),a={"Content-Type":"application/x-www-form-urlencoded"};function u(e,t){!o.isUndefined(e)&&o.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var s,c={adapter:(("undefined"!=typeof XMLHttpRequest||void 0!==r&&"[object process]"===Object.prototype.toString.call(r))&&(s=n(387)),s),transformRequest:[function(e,t){return i(t,"Accept"),i(t,"Content-Type"),o.isFormData(e)||o.isArrayBuffer(e)||o.isBuffer(e)||o.isStream(e)||o.isFile(e)||o.isBlob(e)?e:o.isArrayBufferView(e)?e.buffer:o.isURLSearchParams(e)?(u(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):o.isObject(e)?(u(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300}};c.headers={common:{Accept:"application/json, text/plain, */*"}},o.forEach(["delete","get","head"],(function(e){c.headers[e]={}})),o.forEach(["post","put","patch"],(function(e){c.headers[e]=o.merge(a)})),e.exports=c},875:e=>{"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}}},581:(e,t,n)=>{"use strict";var r=n(485);function o(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var i;if(n)i=n(t);else if(r.isURLSearchParams(t))i=t.toString();else{var a=[];r.forEach(t,(function(e,t){null!=e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,(function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),a.push(o(t)+"="+o(e))})))})),i=a.join("&")}if(i){var u=e.indexOf("#");-1!==u&&(e=e.slice(0,u)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}},288:e=>{"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},940:(e,t,n)=>{"use strict";var r=n(485);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,o,i,a){var u=[];u.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&u.push("expires="+new Date(n).toGMTString()),r.isString(o)&&u.push("path="+o),r.isString(i)&&u.push("domain="+i),!0===a&&u.push("secure"),document.cookie=u.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},642:e=>{"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},835:e=>{"use strict";e.exports=function(e){return"object"==typeof e&&!0===e.isAxiosError}},338:(e,t,n)=>{"use strict";var r=n(485);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function o(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=o(window.location.href),function(t){var n=r.isString(t)?o(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},446:(e,t,n)=>{"use strict";var r=n(485);e.exports=function(e,t){r.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))}},845:(e,t,n)=>{"use strict";var r=n(485),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,i,a={};return e?(r.forEach(e.split("\n"),(function(e){if(i=e.indexOf(":"),t=r.trim(e.substr(0,i)).toLowerCase(),n=r.trim(e.substr(i+1)),t){if(a[t]&&o.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([n]):a[t]?a[t]+", "+n:n}})),a):a}},739:e=>{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},485:(e,t,n)=>{"use strict";var r=n(875),o=Object.prototype.toString;function i(e){return"[object Array]"===o.call(e)}function a(e){return void 0===e}function u(e){return null!==e&&"object"==typeof e}function s(e){if("[object Object]"!==o.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function c(e){return"[object Function]"===o.call(e)}function l(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),i(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}e.exports={isArray:i,isArrayBuffer:function(e){return"[object ArrayBuffer]"===o.call(e)},isBuffer:function(e){return null!==e&&!a(e)&&null!==e.constructor&&!a(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:u,isPlainObject:s,isUndefined:a,isDate:function(e){return"[object Date]"===o.call(e)},isFile:function(e){return"[object File]"===o.call(e)},isBlob:function(e){return"[object Blob]"===o.call(e)},isFunction:c,isStream:function(e){return u(e)&&c(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:l,merge:function e(){var t={};function n(n,r){s(t[r])&&s(n)?t[r]=e(t[r],n):s(n)?t[r]=e({},n):i(n)?t[r]=n.slice():t[r]=n}for(var r=0,o=arguments.length;r<o;r++)l(arguments[r],n);return t},extend:function(e,t,n){return l(t,(function(t,o){e[o]=n&&"function"==typeof t?r(t,n):t})),e},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}}},589:(e,t,n)=>{"use strict";const r=wp.element;var o=n(804),i=n.n(o);function a(e){let t;const n=new Set,r=(e,r)=>{const o="function"==typeof e?e(t):e;if(o!==t){const e=t;t=r?o:Object.assign({},t,o),n.forEach((n=>n(t,e)))}},o=()=>t,i={setState:r,getState:o,subscribe:(e,r,i)=>r||i?((e,r=o,i=Object.is)=>{let a=r(t);function u(){const n=r(t);if(!i(a,n)){const t=a;e(a=n,t)}}return n.add(u),()=>n.delete(u)})(e,r,i):(n.add(e),()=>n.delete(e)),destroy:()=>n.clear()};return t=e(r,o,i),i}const u="undefined"==typeof window||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent)?o.useEffect:o.useLayoutEffect;const s=function(e){const t="function"==typeof e?a(e):e,n=(e=t.getState,n=Object.is)=>{const[,r]=(0,o.useReducer)((e=>e+1),0),i=t.getState(),a=(0,o.useRef)(i),s=(0,o.useRef)(e),c=(0,o.useRef)(n),l=(0,o.useRef)(!1),f=(0,o.useRef)();let d;void 0===f.current&&(f.current=e(i));let p=!1;(a.current!==i||s.current!==e||c.current!==n||l.current)&&(d=e(i),p=!n(f.current,d)),u((()=>{p&&(f.current=d),a.current=i,s.current=e,c.current=n,l.current=!1}));const m=(0,o.useRef)(i);return u((()=>{const e=()=>{try{const e=t.getState(),n=s.current(e);c.current(f.current,n)||(a.current=e,f.current=n,r())}catch(e){l.current=!0,r()}},n=t.subscribe(e);return t.getState()!==m.current&&e(),n}),[]),p?d:f.current};return Object.assign(n,t),n[Symbol.iterator]=function*(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4"),yield n,yield t},n};var c="pattern",l=12;function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function 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}function p(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=window.wp.blocks.createBlock;return e.map((function(e){var n=f(Array.isArray(e)?e:[e.name,e.attributes,e.innerBlocks],3),r=n[0],o=n[1],i=n[2];return t(r,o,p(void 0===i?[]:i))}))}function m(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?m(Object(n),!0).forEach((function(t){h(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y(e){return function(e){if(Array.isArray(e))return b(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return b(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return b(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function 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 x=s((function(e,t){return{templates:[],fetchToken:null,activeTemplate:{},activeTemplateBlocks:{},taxonomyDefaultState:{},searchParams:{taxonomies:{},type:c,search:""},nextPage:"",removeTemplates:function(){return e({nextPage:"",templates:[]})},appendTemplates:function(n){return e({templates:y(new Map([].concat(y(t().templates),y(n)).map((function(e){return[e.id,e]}))).values())})},setupDefaultTaxonomies:function(n){var r=Object.keys(n).reduce((function(e,n){return e[n]=function(e){return function(e,t){return"pattern"===e&&"tax_categories"===t?"Default":""}(t().searchParams.type,e)}(n),e}),{}),o={};o.taxonomies=r,e({taxonomyDefaultState:r,searchParams:v({},Object.assign(t().searchParams,o))})},setActive:function(t){var n;if(e({activeTemplate:t}),null!=t&&null!==(n=t.fields)&&void 0!==n&&n.code){var r=window.wp.blocks.parse;e({activeTemplateBlocks:p(r(t.fields.code))})}},resetTaxonomies:function(){var e={tax_categories:"pattern"===t().searchParams.type?"Default":""};t().updateSearchParams({taxonomies:Object.assign(t().taxonomyDefaultState,e)})},updateTaxonomies:function(e){var n={};n.taxonomies=Object.assign({},t().searchParams.taxonomies,e),t().updateSearchParams(n)},updateSearchParams:function(n){null!=n&&n.taxonomies&&!Object.keys(n.taxonomies).length&&(n.taxonomies=t().taxonomyDefaultState),e({templates:[],nextPage:"",searchParams:v({},Object.assign(t().searchParams,n))})}}})),g=s((function(e){return{open:!1,currentPage:"content",setOpen:function(t){e({open:t}),t&&x.getState().removeTemplates()}}})),w=n(135),k=n.n(w),S=Object.defineProperty,j=Object.prototype.hasOwnProperty,O=Object.getOwnPropertySymbols,C=Object.prototype.propertyIsEnumerable,E=(e,t,n)=>t in e?S(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,P=(e,t)=>{for(var n in t||(t={}))j.call(t,n)&&E(e,n,t[n]);if(O)for(var n of O(t))C.call(t,n)&&E(e,n,t[n]);return e};const I=(e,t)=>(n,r,o)=>{const{name:i,getStorage:a=(()=>localStorage),serialize:u=JSON.stringify,deserialize:s=JSON.parse,blacklist:c,whitelist:l,onRehydrateStorage:f,version:d=0,migrate:p}=t||{};let m;try{m=a()}catch(e){}if(!m)return e(((...e)=>{console.warn(`Persist middleware: unable to update ${i}, the given storage is currently unavailable.`),n(...e)}),r,o);const v=async()=>{const e=P({},r());return l&&Object.keys(e).forEach((t=>{!l.includes(t)&&delete e[t]})),c&&c.forEach((t=>delete e[t])),null==m?void 0:m.setItem(i,await u({state:e,version:d}))},h=o.setState;return o.setState=(e,t)=>{h(e,t),v()},(async()=>{const e=(null==f?void 0:f(r()))||void 0;try{const e=await m.getItem(i);if(e){const t=await s(e);if(t.version!==d){const e=await(null==p?void 0:p(t.state,t.version));e&&(n(e),await v())}else n(t.state)}}catch(t){return void(null==e||e(void 0,t))}null==e||e(r(),void 0)})(),e(((...e)=>{n(...e),v()}),r,o)};var N=n(206),T=n.n(N)().create({baseURL:window.extendifySdkData.root,headers:{"X-WP-Nonce":window.extendifySdkData.nonce,"X-Requested-With":"XMLHttpRequest","X-Extendify":!0}});function _(e){return Object.prototype.hasOwnProperty.call(e,"data")?e.data:e}T.interceptors.response.use((function(e){return function(e){return Object.prototype.hasOwnProperty.call(e,"soft_error")&&window.dispatchEvent(new CustomEvent("extendify-sdk::softerror-encountered",{detail:e.soft_error,bubbles:!0})),e}(_(e))}),(function(e){return function(e){if(e.response)return console.error(e.response),Promise.reject(_(e.response))}(e)})),T.interceptors.request.use((function(e){return function(e){return e.headers["X-Extendify-Dev-Mode"]=window.location.search.indexOf("DEVMODE")>-1,e.headers["X-Extendify-Local-Mode"]=window.location.search.indexOf("LOCALMODE")>-1,e}(function(e){return e.data&&(e.data.remaining_imports=G.getState().remainingImports(),e.data.entry_point=G.getState().entryPoint,e.data.total_imports=G.getState().imports),e}(e))}),(function(e){return e}));var R=function(){return T.get("user")},A=function(e){return T.get("user-meta",{params:{key:e}})},L=function(e,t){var n=new FormData;return n.append("email",e),n.append("key",t),T.post("login",n,{headers:{"Content-Type":"multipart/form-data"}})},D=function(e){var t=new FormData;return t.append("data",JSON.stringify(e)),T.post("user",t,{headers:{"Content-Type":"multipart/form-data"}})};function F(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)}function M(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){F(i,r,o,a,u,"next",e)}function u(e){F(i,r,o,a,u,"throw",e)}a(void 0)}))}}var B,U,V={getItem:(U=M(k().mark((function e(){return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,R();case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)}))),function(){return U.apply(this,arguments)}),setItem:(B=M(k().mark((function e(t,n){return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",D(n));case 1:case"end":return e.stop()}}),e)}))),function(e,t){return B.apply(this,arguments)})},G=s(I((function(e,t){return{apiKey:"",imports:0,uuid:"",email:"",allowedImports:0,entryPoint:"not-set",enabled:!0,incrementImports:function(){return e({imports:t().imports+1})},canImport:function(){return!!t().apiKey||Number(t().imports)<Number(t().allowedImports)},remainingImports:function(){if(t().apiKey)return"unlimited";var e=Number(t().allowedImports)-Number(t().imports);return e>0?e:0}}}),{name:"extendify-user",getStorage:function(){return V}}));const H=ReactDOM;function q(){return(q=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function W(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}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}function z(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(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}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function $(e,t){if(e in t){for(var n=t[e],r=arguments.length,o=new Array(r>2?r-2:0),i=2;i<r;i++)o[i-2]=arguments[i];return"function"==typeof n?n.apply(void 0,o):n}var a=new Error('Tried to handle "'+e+'" but there is no handler defined. Only defined handlers are: '+Object.keys(t).map((function(e){return'"'+e+'"'})).join(", ")+".");throw Error.captureStackTrace&&Error.captureStackTrace(a,$),a}var Q,Y,J;function X(e){var t=e.props,n=e.slot,r=e.defaultTag,o=e.features,i=e.visible,a=void 0===i||i,u=e.name;if(a)return Z(t,n,r,u);var s=null!=o?o:Q.None;if(s&Q.Static){var c=t.static,l=void 0!==c&&c,f=W(t,["static"]);if(l)return Z(f,n,r,u)}if(s&Q.RenderStrategy){var d,p=t.unmount,m=void 0===p||p,v=W(t,["unmount"]);return $(m?Y.Unmount:Y.Hidden,((d={})[Y.Unmount]=function(){return null},d[Y.Hidden]=function(){return Z(q({},v,{hidden:!0,style:{display:"none"}}),n,r,u)},d))}return Z(t,n,r,u)}function Z(e,t,n,r){var i;void 0===t&&(t={});var a=te(e,["unmount","static"]),u=a.as,s=void 0===u?n:u,c=a.children,l=a.refName,f=void 0===l?"ref":l,d=W(a,["as","children","refName"]),p=void 0!==e.ref?((i={})[f]=e.ref,i):{},m="function"==typeof c?c(t):c;if(d.className&&"function"==typeof d.className&&(d.className=d.className(t)),s===o.Fragment&&Object.keys(d).length>0){if(!(0,o.isValidElement)(m)||Array.isArray(m)&&m.length>1)throw new Error(['Passing props on "Fragment"!',"","The current component <"+r+' /> is rendering a "Fragment".',"However we need to passthrough the following props:",Object.keys(d).map((function(e){return" - "+e})).join("\n"),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map((function(e){return" - "+e})).join("\n")].join("\n"));return(0,o.cloneElement)(m,Object.assign({},function(e,t,n){for(var r,o=Object.assign({},e),i=function(){var n,i=r.value;void 0!==e[i]&&void 0!==t[i]&&Object.assign(o,((n={})[i]=function(n){n.defaultPrevented||e[i](n),n.defaultPrevented||t[i](n)},n))},a=z(n);!(r=a()).done;)i();return o}(function(e){var t=Object.assign({},e);for(var n in t)void 0===t[n]&&delete t[n];return t}(te(d,["ref"])),m.props,["onClick"]),p))}return(0,o.createElement)(s,Object.assign({},te(d,["ref"]),s!==o.Fragment&&p),m)}function ee(e){var t;return Object.assign((0,o.forwardRef)(e),{displayName:null!=(t=e.displayName)?t:e.name})}function te(e,t){void 0===t&&(t=[]);for(var n,r=Object.assign({},e),o=z(t);!(n=o()).done;){var i=n.value;i in r&&delete r[i]}return r}function ne(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=(0,o.useRef)(t);return(0,o.useEffect)((function(){r.current=t}),[t]),(0,o.useCallback)((function(e){for(var t,n=z(r.current);!(t=n()).done;){var o=t.value;null!=o&&("function"==typeof o?o(e):o.current=e)}}),[r])}function re(e){for(var t,n,r=e.parentElement,o=null;r&&!(r instanceof HTMLFieldSetElement);)r instanceof HTMLLegendElement&&(o=r),r=r.parentElement;var i=null!=(t=""===(null==(n=r)?void 0:n.getAttribute("disabled")))&&t;return(!i||!function(e){if(!e)return!1;var t=e.previousElementSibling;for(;null!==t;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}(o))&&i}!function(e){e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static"}(Q||(Q={})),function(e){e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden"}(Y||(Y={})),function(e){e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab"}(J||(J={}));var oe="undefined"!=typeof window?o.useLayoutEffect:o.useEffect,ie={serverHandoffComplete:!1};function ae(){var e=(0,o.useState)(ie.serverHandoffComplete),t=e[0],n=e[1];return(0,o.useEffect)((function(){!0!==t&&n(!0)}),[t]),(0,o.useEffect)((function(){!1===ie.serverHandoffComplete&&(ie.serverHandoffComplete=!0)}),[]),t}var ue=0;function se(){return++ue}function ce(){var e=ae(),t=(0,o.useState)(e?se:null),n=t[0],r=t[1];return oe((function(){null===n&&r(se())}),[n]),null!=n?""+n:void 0}var le,fe,de,pe,me,ve=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map((function(e){return e+":not([tabindex='-1'])"})).join(",");function he(e){return void 0===e&&(e=document.body),null==e?[]:Array.from(e.querySelectorAll(ve))}function ye(e,t){var n;return void 0===t&&(t=pe.Strict),e!==document.body&&$(t,((n={})[pe.Strict]=function(){return e.matches(ve)},n[pe.Loose]=function(){for(var t=e;null!==t;){if(t.matches(ve))return!0;t=t.parentElement}return!1},n))}function be(e){null==e||e.focus({preventScroll:!0})}function xe(e,t){var n=Array.isArray(e)?e:he(e),r=document.activeElement,o=function(){if(t&(le.First|le.Next))return de.Next;if(t&(le.Previous|le.Last))return de.Previous;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")}(),i=function(){if(t&le.First)return 0;if(t&le.Previous)return Math.max(0,n.indexOf(r))-1;if(t&le.Next)return Math.max(0,n.indexOf(r))+1;if(t&le.Last)return n.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")}(),a=t&le.NoScroll?{preventScroll:!0}:{},u=0,s=n.length,c=void 0;do{var l;if(u>=s||u+s<=0)return fe.Error;var f=i+u;if(t&le.WrapAround)f=(f+s)%s;else{if(f<0)return fe.Underflow;if(f>=s)return fe.Overflow}null==(l=c=n[f])||l.focus(a),u+=o}while(c!==document.activeElement);return c.hasAttribute("tabindex")||c.setAttribute("tabindex","0"),fe.Success}function ge(e,t,n){var r=(0,o.useRef)(t);r.current=t,(0,o.useEffect)((function(){function t(e){r.current.call(window,e)}return window.addEventListener(e,t,n),function(){return window.removeEventListener(e,t,n)}}),[e,n])}function we(){var e=(0,o.useRef)(!1);return(0,o.useEffect)((function(){return e.current=!0,function(){e.current=!1}}),[]),e}function ke(e,t,n){void 0===t&&(t=me.All);var r=void 0===n?{}:n,i=r.initialFocus,a=r.containers,u=(0,o.useRef)("undefined"!=typeof window?document.activeElement:null),s=(0,o.useRef)(null),c=we(),l=Boolean(t&me.RestoreFocus),f=Boolean(t&me.InitialFocus);(0,o.useEffect)((function(){l&&(u.current=document.activeElement)}),[l]),(0,o.useEffect)((function(){if(l)return function(){be(u.current),u.current=null}}),[l]),(0,o.useEffect)((function(){if(f&&e.current){var t=document.activeElement;if(null==i?void 0:i.current){if((null==i?void 0:i.current)===t)return void(s.current=t)}else if(e.current.contains(t))return void(s.current=t);if(null==i?void 0:i.current)be(i.current);else if(xe(e.current,le.First)===fe.Error)throw new Error("There are no focusable elements inside the <FocusTrap />");s.current=document.activeElement}}),[e,i,f]),ge("keydown",(function(n){t&me.TabLock&&e.current&&n.key===J.Tab&&(n.preventDefault(),xe(e.current,(n.shiftKey?le.Previous:le.Next)|le.WrapAround)===fe.Success&&(s.current=document.activeElement))})),ge("focus",(function(n){if(t&me.FocusLock){var r=new Set(null==a?void 0:a.current);if(r.add(e),r.size){var o=s.current;if(o&&c.current){var i=n.target;i&&i instanceof HTMLElement?!function(e,t){for(var n,r=z(e);!(n=r()).done;){var o;if(null==(o=n.value.current)?void 0:o.contains(t))return!0}return!1}(r,i)?(n.preventDefault(),n.stopPropagation(),be(o)):(s.current=i,be(i)):be(s.current)}}}}),!0)}!function(e){e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll"}(le||(le={})),function(e){e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow"}(fe||(fe={})),function(e){e[e.Previous=-1]="Previous",e[e.Next=1]="Next"}(de||(de={})),function(e){e[e.Strict=0]="Strict",e[e.Loose=1]="Loose"}(pe||(pe={})),function(e){e[e.None=1]="None",e[e.InitialFocus=2]="InitialFocus",e[e.TabLock=4]="TabLock",e[e.FocusLock=8]="FocusLock",e[e.RestoreFocus=16]="RestoreFocus",e[e.All=30]="All"}(me||(me={}));var Se=new Set,je=new Map;function Oe(e){e.setAttribute("aria-hidden","true"),e.inert=!0}function Ce(e){var t=je.get(e);t&&(null===t["aria-hidden"]?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",t["aria-hidden"]),e.inert=t.inert)}var Ee=(0,o.createContext)(!1);function Pe(e){return i().createElement(Ee.Provider,{value:e.force},e.children)}function Ie(){var e=(0,o.useContext)(Ee),t=(0,o.useContext)(Re),n=(0,o.useState)((function(){if(!e&&null!==t)return null;if("undefined"==typeof window)return null;var n=document.getElementById("headlessui-portal-root");if(n)return n;var r=document.createElement("div");return r.setAttribute("id","headlessui-portal-root"),document.body.appendChild(r)})),r=n[0],i=n[1];return(0,o.useEffect)((function(){e||null!==t&&i(t.current)}),[t,i,e]),r}var Ne=o.Fragment;function Te(e){var t=e,n=Ie(),r=(0,o.useState)((function(){return"undefined"==typeof window?null:document.createElement("div")}))[0],i=ae();return oe((function(){if(n&&r)return n.appendChild(r),function(){var e;n&&(r&&(n.removeChild(r),n.childNodes.length<=0&&(null==(e=n.parentElement)||e.removeChild(n))))}}),[n,r]),i&&n&&r?(0,H.createPortal)(X({props:t,defaultTag:Ne,name:"Portal"}),r):null}var _e=o.Fragment,Re=(0,o.createContext)(null);Te.Group=function(e){var t=e.target,n=W(e,["target"]);return i().createElement(Re.Provider,{value:t},X({props:n,defaultTag:_e,name:"Popover.Group"}))};var Ae=(0,o.createContext)(null);function Le(){var e=(0,o.useContext)(Ae);if(null===e){var t=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,Le),t}return e}function De(){var e=(0,o.useState)([]),t=e[0],n=e[1];return[t.length>0?t.join(" "):void 0,(0,o.useMemo)((function(){return function(e){var t=(0,o.useCallback)((function(e){return n((function(t){return[].concat(t,[e])})),function(){return n((function(t){var n=t.slice(),r=n.indexOf(e);return-1!==r&&n.splice(r,1),n}))}}),[]),r=(0,o.useMemo)((function(){return{register:t,slot:e.slot,name:e.name,props:e.props}}),[t,e.slot,e.name,e.props]);return i().createElement(Ae.Provider,{value:r},e.children)}}),[n])]}function Fe(e){var t=Le(),n="headlessui-description-"+ce();oe((function(){return t.register(n)}),[n,t.register]);var r=e,o=q({},t.props,{id:n});return X({props:q({},r,o),slot:t.slot||{},defaultTag:"p",name:t.name||"Description"})}var Me,Be=(0,o.createContext)(null);function Ue(){return(0,o.useContext)(Be)}function Ve(e){var t=e.value,n=e.children;return i().createElement(Be.Provider,{value:t},n)}Be.displayName="OpenClosedContext",function(e){e[e.Open=0]="Open",e[e.Closed=1]="Closed"}(Me||(Me={}));var Ge,He,qe,We,Ke=(0,o.createContext)((function(){}));function ze(e){var t=e.children,n=e.onUpdate,r=e.type,a=e.element,u=(0,o.useContext)(Ke),s=(0,o.useCallback)((function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];null==n||n.apply(void 0,t),u.apply(void 0,t)}),[u,n]);return oe((function(){return s(Ge.Add,r,a),function(){return s(Ge.Remove,r,a)}}),[s,r,a]),i().createElement(Ke.Provider,{value:s},t)}Ke.displayName="StackContext",function(e){e[e.Add=0]="Add",e[e.Remove=1]="Remove"}(Ge||(Ge={})),function(e){e[e.Open=0]="Open",e[e.Closed=1]="Closed"}(qe||(qe={})),function(e){e[e.SetTitleId=0]="SetTitleId"}(We||(We={}));var $e=((He={})[We.SetTitleId]=function(e,t){return e.titleId===t.id?e:q({},e,{titleId:t.id})},He),Qe=(0,o.createContext)(null);function Ye(e){var t=(0,o.useContext)(Qe);if(null===t){var n=new Error("<"+e+" /> is missing a parent <"+ot.displayName+" /> component.");throw Error.captureStackTrace&&Error.captureStackTrace(n,Ye),n}return t}function Je(e,t){return $(t.type,$e,e,t)}Qe.displayName="DialogContext";var Xe=Q.RenderStrategy|Q.Static,Ze=ee((function(e,t){var n,r=e.open,a=e.onClose,u=e.initialFocus,s=W(e,["open","onClose","initialFocus"]),c=(0,o.useState)(0),l=c[0],f=c[1],d=Ue();void 0===r&&null!==d&&(r=$(d,((n={})[Me.Open]=!0,n[Me.Closed]=!1,n)));var p=(0,o.useRef)(new Set),m=(0,o.useRef)(null),v=ne(m,t),h=e.hasOwnProperty("open")||null!==d,y=e.hasOwnProperty("onClose");if(!h&&!y)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!h)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!y)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if("boolean"!=typeof r)throw new Error("You provided an `open` prop to the `Dialog`, but the value is not a boolean. Received: "+r);if("function"!=typeof a)throw new Error("You provided an `onClose` prop to the `Dialog`, but the value is not a function. Received: "+a);var b=r?qe.Open:qe.Closed,x=null!==d?d===Me.Open:b===qe.Open,g=(0,o.useReducer)(Je,{titleId:null,descriptionId:null}),w=g[0],k=g[1],S=(0,o.useCallback)((function(){return a(!1)}),[a]),j=(0,o.useCallback)((function(e){return k({type:We.SetTitleId,id:e})}),[k]),O=ae()&&b===qe.Open,C=l>1,E=null!==(0,o.useContext)(Qe);ke(m,O?$(C?"parent":"leaf",{parent:me.RestoreFocus,leaf:me.All}):me.None,{initialFocus:u,containers:p}),function(e,t){void 0===t&&(t=!0),oe((function(){if(t&&e.current){var n=e.current;Se.add(n);for(var r,o=z(je.keys());!(r=o()).done;){var i=r.value;i.contains(n)&&(Ce(i),je.delete(i))}return document.querySelectorAll("body > *").forEach((function(e){if(e instanceof HTMLElement){for(var t,n=z(Se);!(t=n()).done;){var r=t.value;if(e.contains(r))return}1===Se.size&&(je.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),Oe(e))}})),function(){if(Se.delete(n),Se.size>0)document.querySelectorAll("body > *").forEach((function(e){if(e instanceof HTMLElement&&!je.has(e)){for(var t,n=z(Se);!(t=n()).done;){var r=t.value;if(e.contains(r))return}je.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),Oe(e)}}));else for(var e,t=z(je.keys());!(e=t()).done;){var r=e.value;Ce(r),je.delete(r)}}}}),[t])}(m,!!C&&O),ge("mousedown",(function(e){var t,n=e.target;b===qe.Open&&(C||(null==(t=m.current)?void 0:t.contains(n))||S())})),(0,o.useEffect)((function(){if(b===qe.Open&&!E){var e=document.documentElement.style.overflow,t=document.documentElement.style.paddingRight,n=window.innerWidth-document.documentElement.clientWidth;return document.documentElement.style.overflow="hidden",document.documentElement.style.paddingRight=n+"px",function(){document.documentElement.style.overflow=e,document.documentElement.style.paddingRight=t}}}),[b,E]),(0,o.useEffect)((function(){if(b===qe.Open&&m.current){var e=new IntersectionObserver((function(e){for(var t,n=z(e);!(t=n()).done;){var r=t.value;0===r.boundingClientRect.x&&0===r.boundingClientRect.y&&0===r.boundingClientRect.width&&0===r.boundingClientRect.height&&S()}}));return e.observe(m.current),function(){return e.disconnect()}}}),[b,m,S]);var P=De(),I=P[0],N=P[1],T="headlessui-dialog-"+ce(),_=(0,o.useMemo)((function(){return[{dialogState:b,close:S,setTitleId:j},w]}),[b,w,S,j]),R=(0,o.useMemo)((function(){return{open:b===qe.Open}}),[b]),A={ref:v,id:T,role:"dialog","aria-modal":b===qe.Open||void 0,"aria-labelledby":w.titleId,"aria-describedby":I,onClick:function(e){e.stopPropagation()},onKeyDown:function(e){e.key===J.Escape&&b===qe.Open&&(C||(e.preventDefault(),e.stopPropagation(),S()))}},L=s;return i().createElement(ze,{type:"Dialog",element:m,onUpdate:(0,o.useCallback)((function(e,t,n){var r;"Dialog"===t&&$(e,((r={})[Ge.Add]=function(){p.current.add(n),f((function(e){return e+1}))},r[Ge.Remove]=function(){p.current.add(n),f((function(e){return e-1}))},r))}),[])},i().createElement(Pe,{force:!0},i().createElement(Te,null,i().createElement(Qe.Provider,{value:_},i().createElement(Te.Group,{target:m},i().createElement(Pe,{force:!1},i().createElement(N,{slot:R,name:"Dialog.Description"},X({props:q({},L,A),slot:R,defaultTag:"div",features:Xe,visible:x,name:"Dialog"}))))))))})),et=ee((function e(t,n){var r=Ye([ot.displayName,e.name].join("."))[0],i=r.dialogState,a=r.close,u=ne(n),s="headlessui-dialog-overlay-"+ce(),c=(0,o.useCallback)((function(e){if(re(e.currentTarget))return e.preventDefault();e.preventDefault(),e.stopPropagation(),a()}),[a]),l=(0,o.useMemo)((function(){return{open:i===qe.Open}}),[i]);return X({props:q({},t,{ref:u,id:s,"aria-hidden":!0,onClick:c}),slot:l,defaultTag:"div",name:"Dialog.Overlay"})}));var tt,nt,rt,ot=Object.assign(Ze,{Overlay:et,Title:function e(t){var n=Ye([ot.displayName,e.name].join("."))[0],r=n.dialogState,i=n.setTitleId,a="headlessui-dialog-title-"+ce();(0,o.useEffect)((function(){return i(a),function(){return i(null)}}),[a,i]);var u=(0,o.useMemo)((function(){return{open:r===qe.Open}}),[r]);return X({props:q({},t,{id:a}),slot:u,defaultTag:"h2",name:"Dialog.Title"})},Description:Fe});!function(e){e[e.Open=0]="Open",e[e.Closed=1]="Closed"}(nt||(nt={})),function(e){e[e.ToggleDisclosure=0]="ToggleDisclosure",e[e.SetButtonId=1]="SetButtonId",e[e.SetPanelId=2]="SetPanelId",e[e.LinkPanel=3]="LinkPanel",e[e.UnlinkPanel=4]="UnlinkPanel"}(rt||(rt={}));var it=((tt={})[rt.ToggleDisclosure]=function(e){var t;return q({},e,{disclosureState:$(e.disclosureState,(t={},t[nt.Open]=nt.Closed,t[nt.Closed]=nt.Open,t))})},tt[rt.LinkPanel]=function(e){return!0===e.linkedPanel?e:q({},e,{linkedPanel:!0})},tt[rt.UnlinkPanel]=function(e){return!1===e.linkedPanel?e:q({},e,{linkedPanel:!1})},tt[rt.SetButtonId]=function(e,t){return e.buttonId===t.buttonId?e:q({},e,{buttonId:t.buttonId})},tt[rt.SetPanelId]=function(e,t){return e.panelId===t.panelId?e:q({},e,{panelId:t.panelId})},tt),at=(0,o.createContext)(null);function ut(e){var t=(0,o.useContext)(at);if(null===t){var n=new Error("<"+e+" /> is missing a parent <"+lt.name+" /> component.");throw Error.captureStackTrace&&Error.captureStackTrace(n,ut),n}return t}function st(e,t){return $(t.type,it,e,t)}at.displayName="DisclosureContext";var ct=o.Fragment;function lt(e){var t,n=e.defaultOpen,r=void 0!==n&&n,a=W(e,["defaultOpen"]),u="headlessui-disclosure-button-"+ce(),s="headlessui-disclosure-panel-"+ce(),c=(0,o.useReducer)(st,{disclosureState:r?nt.Open:nt.Closed,linkedPanel:!1,buttonId:u,panelId:s}),l=c[0].disclosureState,f=c[1];(0,o.useEffect)((function(){return f({type:rt.SetButtonId,buttonId:u})}),[u,f]),(0,o.useEffect)((function(){return f({type:rt.SetPanelId,panelId:s})}),[s,f]);var d=(0,o.useMemo)((function(){return{open:l===nt.Open}}),[l]);return i().createElement(at.Provider,{value:c},i().createElement(Ve,{value:$(l,(t={},t[nt.Open]=Me.Open,t[nt.Closed]=Me.Closed,t))},X({props:a,slot:d,defaultTag:ct,name:"Disclosure"})))}var ft=ee((function e(t,n){var r=ut([lt.name,e.name].join(".")),i=r[0],a=r[1],u=ne(n),s=(0,o.useCallback)((function(e){switch(e.key){case J.Space:case J.Enter:e.preventDefault(),e.stopPropagation(),a({type:rt.ToggleDisclosure})}}),[a]),c=(0,o.useCallback)((function(e){switch(e.key){case J.Space:e.preventDefault()}}),[]),l=(0,o.useCallback)((function(e){re(e.currentTarget)||t.disabled||a({type:rt.ToggleDisclosure})}),[a,t.disabled]),f=(0,o.useMemo)((function(){return{open:i.disclosureState===nt.Open}}),[i]);return X({props:q({},t,{ref:u,id:i.buttonId,type:"button","aria-expanded":i.disclosureState===nt.Open||void 0,"aria-controls":i.linkedPanel?i.panelId:void 0,onKeyDown:s,onKeyUp:c,onClick:l}),slot:f,defaultTag:"button",name:"Disclosure.Button"})})),dt=Q.RenderStrategy|Q.Static,pt=ee((function e(t,n){var r=ut([lt.name,e.name].join(".")),i=r[0],a=r[1],u=ne(n,(function(){i.linkedPanel||a({type:rt.LinkPanel})})),s=Ue(),c=null!==s?s===Me.Open:i.disclosureState===nt.Open;(0,o.useEffect)((function(){return function(){return a({type:rt.UnlinkPanel})}}),[a]),(0,o.useEffect)((function(){var e;i.disclosureState!==nt.Closed||null!=(e=t.unmount)&&!e||a({type:rt.UnlinkPanel})}),[i.disclosureState,t.unmount,a]);var l=(0,o.useMemo)((function(){return{open:i.disclosureState===nt.Open}}),[i]),f={ref:u,id:i.panelId};return X({props:q({},t,f),slot:l,defaultTag:"div",features:dt,visible:c,name:"Disclosure.Panel"})}));lt.Button=ft,lt.Panel=pt;var mt,vt,ht,yt;function bt(){var e=[],t={requestAnimationFrame:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(){var e=requestAnimationFrame.apply(void 0,arguments);t.add((function(){return cancelAnimationFrame(e)}))})),nextFrame:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t.requestAnimationFrame((function(){t.requestAnimationFrame.apply(t,n)}))},setTimeout:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(){var e=setTimeout.apply(void 0,arguments);t.add((function(){return clearTimeout(e)}))})),add:function(t){e.push(t)},dispose:function(){for(var t,n=z(e.splice(0));!(t=n()).done;){var r=t.value;r()}}};return t}function xt(){var e=(0,o.useState)(bt)[0];return(0,o.useEffect)((function(){return function(){return e.dispose()}}),[e]),e}function gt(e,t){var n=(0,o.useState)(e),r=n[0],i=n[1],a=(0,o.useRef)(e);return oe((function(){a.current=e}),[e]),oe((function(){return i(a.current)}),[a,i].concat(t)),r}function wt(e,t){var n=t.resolveItems();if(n.length<=0)return null;var r=t.resolveActiveIndex(),o=null!=r?r:-1,i=function(){switch(e.focus){case mt.First:return n.findIndex((function(e){return!t.resolveDisabled(e)}));case mt.Previous:var r=n.slice().reverse().findIndex((function(e,n,r){return!(-1!==o&&r.length-n-1>=o)&&!t.resolveDisabled(e)}));return-1===r?r:n.length-1-r;case mt.Next:return n.findIndex((function(e,n){return!(n<=o)&&!t.resolveDisabled(e)}));case mt.Last:var i=n.slice().reverse().findIndex((function(e){return!t.resolveDisabled(e)}));return-1===i?i:n.length-1-i;case mt.Specific:return n.findIndex((function(n){return t.resolveId(n)===e.id}));case mt.Nothing:return null;default:!function(e){throw new Error("Unexpected object: "+e)}(e)}}();return-1===i?r:i}!function(e){e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing"}(mt||(mt={})),function(e){e[e.Open=0]="Open",e[e.Closed=1]="Closed"}(ht||(ht={})),function(e){e[e.OpenListbox=0]="OpenListbox",e[e.CloseListbox=1]="CloseListbox",e[e.SetDisabled=2]="SetDisabled",e[e.GoToOption=3]="GoToOption",e[e.Search=4]="Search",e[e.ClearSearch=5]="ClearSearch",e[e.RegisterOption=6]="RegisterOption",e[e.UnregisterOption=7]="UnregisterOption"}(yt||(yt={}));var kt=((vt={})[yt.CloseListbox]=function(e){return e.disabled||e.listboxState===ht.Closed?e:q({},e,{activeOptionIndex:null,listboxState:ht.Closed})},vt[yt.OpenListbox]=function(e){return e.disabled||e.listboxState===ht.Open?e:q({},e,{listboxState:ht.Open})},vt[yt.SetDisabled]=function(e,t){return e.disabled===t.disabled?e:q({},e,{disabled:t.disabled})},vt[yt.GoToOption]=function(e,t){if(e.disabled)return e;if(e.listboxState===ht.Closed)return e;var n=wt(t,{resolveItems:function(){return e.options},resolveActiveIndex:function(){return e.activeOptionIndex},resolveId:function(e){return e.id},resolveDisabled:function(e){return e.dataRef.current.disabled}});return""===e.searchQuery&&e.activeOptionIndex===n?e:q({},e,{searchQuery:"",activeOptionIndex:n})},vt[yt.Search]=function(e,t){if(e.disabled)return e;if(e.listboxState===ht.Closed)return e;var n=e.searchQuery+t.value.toLowerCase(),r=e.options.findIndex((function(e){var t;return!e.dataRef.current.disabled&&(null==(t=e.dataRef.current.textValue)?void 0:t.startsWith(n))}));return-1===r||r===e.activeOptionIndex?q({},e,{searchQuery:n}):q({},e,{searchQuery:n,activeOptionIndex:r})},vt[yt.ClearSearch]=function(e){return e.disabled||e.listboxState===ht.Closed||""===e.searchQuery?e:q({},e,{searchQuery:""})},vt[yt.RegisterOption]=function(e,t){return q({},e,{options:[].concat(e.options,[{id:t.id,dataRef:t.dataRef}])})},vt[yt.UnregisterOption]=function(e,t){var n=e.options.slice(),r=null!==e.activeOptionIndex?n[e.activeOptionIndex]:null,o=n.findIndex((function(e){return e.id===t.id}));return-1!==o&&n.splice(o,1),q({},e,{options:n,activeOptionIndex:o===e.activeOptionIndex||null===r?null:n.indexOf(r)})},vt),St=(0,o.createContext)(null);function jt(e){var t=(0,o.useContext)(St);if(null===t){var n=new Error("<"+e+" /> is missing a parent <"+Et.name+" /> component.");throw Error.captureStackTrace&&Error.captureStackTrace(n,jt),n}return t}function Ot(e,t){return $(t.type,kt,e,t)}St.displayName="ListboxContext";var Ct=o.Fragment;function Et(e){var t,n=e.value,r=e.onChange,a=e.disabled,u=void 0!==a&&a,s=W(e,["value","onChange","disabled"]),c=(0,o.useReducer)(Ot,{listboxState:ht.Closed,propsRef:{current:{value:n,onChange:r}},labelRef:(0,o.createRef)(),buttonRef:(0,o.createRef)(),optionsRef:(0,o.createRef)(),disabled:u,options:[],searchQuery:"",activeOptionIndex:null}),l=c[0],f=l.listboxState,d=l.propsRef,p=l.optionsRef,m=l.buttonRef,v=c[1];oe((function(){d.current.value=n}),[n,d]),oe((function(){d.current.onChange=r}),[r,d]),oe((function(){return v({type:yt.SetDisabled,disabled:u})}),[u]),ge("mousedown",(function(e){var t,n,r,o=e.target;f===ht.Open&&((null==(t=m.current)?void 0:t.contains(o))||(null==(n=p.current)?void 0:n.contains(o))||(v({type:yt.CloseListbox}),ye(o,pe.Loose)||(e.preventDefault(),null==(r=m.current)||r.focus())))}));var h=(0,o.useMemo)((function(){return{open:f===ht.Open,disabled:u}}),[f,u]);return i().createElement(St.Provider,{value:c},i().createElement(Ve,{value:$(f,(t={},t[ht.Open]=Me.Open,t[ht.Closed]=Me.Closed,t))},X({props:s,slot:h,defaultTag:Ct,name:"Listbox"})))}var Pt=ee((function e(t,n){var r,i=jt([Et.name,e.name].join(".")),a=i[0],u=i[1],s=ne(a.buttonRef,n),c="headlessui-listbox-button-"+ce(),l=xt(),f=(0,o.useCallback)((function(e){switch(e.key){case J.Space:case J.Enter:case J.ArrowDown:e.preventDefault(),u({type:yt.OpenListbox}),l.nextFrame((function(){a.propsRef.current.value||u({type:yt.GoToOption,focus:mt.First})}));break;case J.ArrowUp:e.preventDefault(),u({type:yt.OpenListbox}),l.nextFrame((function(){a.propsRef.current.value||u({type:yt.GoToOption,focus:mt.Last})}))}}),[u,a,l]),d=(0,o.useCallback)((function(e){switch(e.key){case J.Space:e.preventDefault()}}),[]),p=(0,o.useCallback)((function(e){if(re(e.currentTarget))return e.preventDefault();a.listboxState===ht.Open?(u({type:yt.CloseListbox}),l.nextFrame((function(){var e;return null==(e=a.buttonRef.current)?void 0:e.focus({preventScroll:!0})}))):(e.preventDefault(),u({type:yt.OpenListbox}))}),[u,l,a]),m=gt((function(){if(a.labelRef.current)return[a.labelRef.current.id,c].join(" ")}),[a.labelRef.current,c]),v=(0,o.useMemo)((function(){return{open:a.listboxState===ht.Open,disabled:a.disabled}}),[a]);return X({props:q({},t,{ref:s,id:c,type:"button","aria-haspopup":!0,"aria-controls":null==(r=a.optionsRef.current)?void 0:r.id,"aria-expanded":a.listboxState===ht.Open||void 0,"aria-labelledby":m,disabled:a.disabled,onKeyDown:f,onKeyUp:d,onClick:p}),slot:v,defaultTag:"button",name:"Listbox.Button"})}));var It,Nt,Tt,_t=Q.RenderStrategy|Q.Static,Rt=ee((function e(t,n){var r,i=jt([Et.name,e.name].join(".")),a=i[0],u=i[1],s=ne(a.optionsRef,n),c="headlessui-listbox-options-"+ce(),l=xt(),f=xt(),d=Ue(),p=null!==d?d===Me.Open:a.listboxState===ht.Open;oe((function(){var e=a.optionsRef.current;e&&a.listboxState===ht.Open&&e!==document.activeElement&&e.focus({preventScroll:!0})}),[a.listboxState,a.optionsRef]);var m=(0,o.useCallback)((function(e){switch(f.dispose(),e.key){case J.Space:if(""!==a.searchQuery)return e.preventDefault(),e.stopPropagation(),u({type:yt.Search,value:e.key});case J.Enter:if(e.preventDefault(),e.stopPropagation(),u({type:yt.CloseListbox}),null!==a.activeOptionIndex){var t=a.options[a.activeOptionIndex].dataRef;a.propsRef.current.onChange(t.current.value)}bt().nextFrame((function(){var e;return null==(e=a.buttonRef.current)?void 0:e.focus({preventScroll:!0})}));break;case J.ArrowDown:return e.preventDefault(),e.stopPropagation(),u({type:yt.GoToOption,focus:mt.Next});case J.ArrowUp:return e.preventDefault(),e.stopPropagation(),u({type:yt.GoToOption,focus:mt.Previous});case J.Home:case J.PageUp:return e.preventDefault(),e.stopPropagation(),u({type:yt.GoToOption,focus:mt.First});case J.End:case J.PageDown:return e.preventDefault(),e.stopPropagation(),u({type:yt.GoToOption,focus:mt.Last});case J.Escape:return e.preventDefault(),e.stopPropagation(),u({type:yt.CloseListbox}),l.nextFrame((function(){var e;return null==(e=a.buttonRef.current)?void 0:e.focus({preventScroll:!0})}));case J.Tab:e.preventDefault(),e.stopPropagation();break;default:1===e.key.length&&(u({type:yt.Search,value:e.key}),f.setTimeout((function(){return u({type:yt.ClearSearch})}),350))}}),[l,u,f,a]),v=gt((function(){var e,t,n;return null!=(e=null==(t=a.labelRef.current)?void 0:t.id)?e:null==(n=a.buttonRef.current)?void 0:n.id}),[a.labelRef.current,a.buttonRef.current]),h=(0,o.useMemo)((function(){return{open:a.listboxState===ht.Open}}),[a]);return X({props:q({},t,{"aria-activedescendant":null===a.activeOptionIndex||null==(r=a.options[a.activeOptionIndex])?void 0:r.id,"aria-labelledby":v,id:c,onKeyDown:m,role:"listbox",tabIndex:0,ref:s}),slot:h,defaultTag:"ul",features:_t,visible:p,name:"Listbox.Options"})}));function At(e){var t=e.container,n=e.accept,r=e.walk,i=e.enabled,a=void 0===i||i,u=(0,o.useRef)(n),s=(0,o.useRef)(r);(0,o.useEffect)((function(){u.current=n,s.current=r}),[n,r]),oe((function(){if(t&&a)for(var e=u.current,n=s.current,r=Object.assign((function(t){return e(t)}),{acceptNode:e}),o=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,r,!1);o.nextNode();)n(o.currentNode)}),[t,a,u,s])}Et.Button=Pt,Et.Label=function e(t){var n=jt([Et.name,e.name].join("."))[0],r="headlessui-listbox-label-"+ce(),i=(0,o.useCallback)((function(){var e;return null==(e=n.buttonRef.current)?void 0:e.focus({preventScroll:!0})}),[n.buttonRef]),a=(0,o.useMemo)((function(){return{open:n.listboxState===ht.Open,disabled:n.disabled}}),[n]);return X({props:q({},t,{ref:n.labelRef,id:r,onClick:i}),slot:a,defaultTag:"label",name:"Listbox.Label"})},Et.Options=Rt,Et.Option=function e(t){var n=t.disabled,r=void 0!==n&&n,i=t.value,a=W(t,["disabled","value"]),u=jt([Et.name,e.name].join(".")),s=u[0],c=u[1],l="headlessui-listbox-option-"+ce(),f=null!==s.activeOptionIndex&&s.options[s.activeOptionIndex].id===l,d=s.propsRef.current.value===i,p=(0,o.useRef)({disabled:r,value:i});oe((function(){p.current.disabled=r}),[p,r]),oe((function(){p.current.value=i}),[p,i]),oe((function(){var e,t;p.current.textValue=null==(e=document.getElementById(l))||null==(t=e.textContent)?void 0:t.toLowerCase()}),[p,l]);var m=(0,o.useCallback)((function(){return s.propsRef.current.onChange(i)}),[s.propsRef,i]);oe((function(){return c({type:yt.RegisterOption,id:l,dataRef:p}),function(){return c({type:yt.UnregisterOption,id:l})}}),[p,l]),oe((function(){var e;s.listboxState===ht.Open&&d&&(c({type:yt.GoToOption,focus:mt.Specific,id:l}),null==(e=document.getElementById(l))||null==e.focus||e.focus())}),[s.listboxState]),oe((function(){if(s.listboxState===ht.Open&&f){var e=bt();return e.nextFrame((function(){var e;return null==(e=document.getElementById(l))||null==e.scrollIntoView?void 0:e.scrollIntoView({block:"nearest"})})),e.dispose}}),[l,f,s.listboxState]);var v=(0,o.useCallback)((function(e){if(r)return e.preventDefault();m(),c({type:yt.CloseListbox}),bt().nextFrame((function(){var e;return null==(e=s.buttonRef.current)?void 0:e.focus({preventScroll:!0})}))}),[c,s.buttonRef,r,m]),h=(0,o.useCallback)((function(){if(r)return c({type:yt.GoToOption,focus:mt.Nothing});c({type:yt.GoToOption,focus:mt.Specific,id:l})}),[r,l,c]),y=(0,o.useCallback)((function(){r||f||c({type:yt.GoToOption,focus:mt.Specific,id:l})}),[r,f,l,c]),b=(0,o.useCallback)((function(){r||f&&c({type:yt.GoToOption,focus:mt.Nothing})}),[r,f,c]),x=(0,o.useMemo)((function(){return{active:f,selected:d,disabled:r}}),[f,d,r]);return X({props:q({},a,{id:l,role:"option",tabIndex:-1,"aria-disabled":!0===r||void 0,"aria-selected":!0===d||void 0,onClick:v,onFocus:h,onPointerMove:y,onMouseMove:y,onPointerLeave:b,onMouseLeave:b}),slot:x,defaultTag:"li",name:"Listbox.Option"})},function(e){e[e.Open=0]="Open",e[e.Closed=1]="Closed"}(Nt||(Nt={})),function(e){e[e.OpenMenu=0]="OpenMenu",e[e.CloseMenu=1]="CloseMenu",e[e.GoToItem=2]="GoToItem",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterItem=5]="RegisterItem",e[e.UnregisterItem=6]="UnregisterItem"}(Tt||(Tt={}));var Lt=((It={})[Tt.CloseMenu]=function(e){return e.menuState===Nt.Closed?e:q({},e,{activeItemIndex:null,menuState:Nt.Closed})},It[Tt.OpenMenu]=function(e){return e.menuState===Nt.Open?e:q({},e,{menuState:Nt.Open})},It[Tt.GoToItem]=function(e,t){var n=wt(t,{resolveItems:function(){return e.items},resolveActiveIndex:function(){return e.activeItemIndex},resolveId:function(e){return e.id},resolveDisabled:function(e){return e.dataRef.current.disabled}});return""===e.searchQuery&&e.activeItemIndex===n?e:q({},e,{searchQuery:"",activeItemIndex:n})},It[Tt.Search]=function(e,t){var n=e.searchQuery+t.value.toLowerCase(),r=e.items.findIndex((function(e){var t;return(null==(t=e.dataRef.current.textValue)?void 0:t.startsWith(n))&&!e.dataRef.current.disabled}));return-1===r||r===e.activeItemIndex?q({},e,{searchQuery:n}):q({},e,{searchQuery:n,activeItemIndex:r})},It[Tt.ClearSearch]=function(e){return""===e.searchQuery?e:q({},e,{searchQuery:""})},It[Tt.RegisterItem]=function(e,t){return q({},e,{items:[].concat(e.items,[{id:t.id,dataRef:t.dataRef}])})},It[Tt.UnregisterItem]=function(e,t){var n=e.items.slice(),r=null!==e.activeItemIndex?n[e.activeItemIndex]:null,o=n.findIndex((function(e){return e.id===t.id}));return-1!==o&&n.splice(o,1),q({},e,{items:n,activeItemIndex:o===e.activeItemIndex||null===r?null:n.indexOf(r)})},It),Dt=(0,o.createContext)(null);function Ft(e){var t=(0,o.useContext)(Dt);if(null===t){var n=new Error("<"+e+" /> is missing a parent <"+Ut.name+" /> component.");throw Error.captureStackTrace&&Error.captureStackTrace(n,Ft),n}return t}function Mt(e,t){return $(t.type,Lt,e,t)}Dt.displayName="MenuContext";var Bt=o.Fragment;function Ut(e){var t,n=(0,o.useReducer)(Mt,{menuState:Nt.Closed,buttonRef:(0,o.createRef)(),itemsRef:(0,o.createRef)(),items:[],searchQuery:"",activeItemIndex:null}),r=n[0],a=r.menuState,u=r.itemsRef,s=r.buttonRef,c=n[1];ge("mousedown",(function(e){var t,n,r,o=e.target;a===Nt.Open&&((null==(t=s.current)?void 0:t.contains(o))||(null==(n=u.current)?void 0:n.contains(o))||(c({type:Tt.CloseMenu}),ye(o,pe.Loose)||(e.preventDefault(),null==(r=s.current)||r.focus())))}));var l=(0,o.useMemo)((function(){return{open:a===Nt.Open}}),[a]);return i().createElement(Dt.Provider,{value:n},i().createElement(Ve,{value:$(a,(t={},t[Nt.Open]=Me.Open,t[Nt.Closed]=Me.Closed,t))},X({props:e,slot:l,defaultTag:Bt,name:"Menu"})))}var Vt,Gt,Ht,qt=ee((function e(t,n){var r,i=Ft([Ut.name,e.name].join(".")),a=i[0],u=i[1],s=ne(a.buttonRef,n),c="headlessui-menu-button-"+ce(),l=xt(),f=(0,o.useCallback)((function(e){switch(e.key){case J.Space:case J.Enter:case J.ArrowDown:e.preventDefault(),e.stopPropagation(),u({type:Tt.OpenMenu}),l.nextFrame((function(){return u({type:Tt.GoToItem,focus:mt.First})}));break;case J.ArrowUp:e.preventDefault(),e.stopPropagation(),u({type:Tt.OpenMenu}),l.nextFrame((function(){return u({type:Tt.GoToItem,focus:mt.Last})}))}}),[u,l]),d=(0,o.useCallback)((function(e){switch(e.key){case J.Space:e.preventDefault()}}),[]),p=(0,o.useCallback)((function(e){if(re(e.currentTarget))return e.preventDefault();t.disabled||(a.menuState===Nt.Open?(u({type:Tt.CloseMenu}),l.nextFrame((function(){var e;return null==(e=a.buttonRef.current)?void 0:e.focus({preventScroll:!0})}))):(e.preventDefault(),e.stopPropagation(),u({type:Tt.OpenMenu})))}),[u,l,a,t.disabled]),m=(0,o.useMemo)((function(){return{open:a.menuState===Nt.Open}}),[a]);return X({props:q({},t,{ref:s,id:c,type:"button","aria-haspopup":!0,"aria-controls":null==(r=a.itemsRef.current)?void 0:r.id,"aria-expanded":a.menuState===Nt.Open||void 0,onKeyDown:f,onKeyUp:d,onClick:p}),slot:m,defaultTag:"button",name:"Menu.Button"})})),Wt=Q.RenderStrategy|Q.Static,Kt=ee((function e(t,n){var r,i,a=Ft([Ut.name,e.name].join(".")),u=a[0],s=a[1],c=ne(u.itemsRef,n),l="headlessui-menu-items-"+ce(),f=xt(),d=Ue(),p=null!==d?d===Me.Open:u.menuState===Nt.Open;(0,o.useEffect)((function(){var e=u.itemsRef.current;e&&u.menuState===Nt.Open&&e!==document.activeElement&&e.focus({preventScroll:!0})}),[u.menuState,u.itemsRef]),At({container:u.itemsRef.current,enabled:u.menuState===Nt.Open,accept:function(e){return"menuitem"===e.getAttribute("role")?NodeFilter.FILTER_REJECT:e.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk:function(e){e.setAttribute("role","none")}});var m=(0,o.useCallback)((function(e){switch(f.dispose(),e.key){case J.Space:if(""!==u.searchQuery)return e.preventDefault(),e.stopPropagation(),s({type:Tt.Search,value:e.key});case J.Enter:if(e.preventDefault(),e.stopPropagation(),s({type:Tt.CloseMenu}),null!==u.activeItemIndex){var t,n=u.items[u.activeItemIndex].id;null==(t=document.getElementById(n))||t.click()}bt().nextFrame((function(){var e;return null==(e=u.buttonRef.current)?void 0:e.focus({preventScroll:!0})}));break;case J.ArrowDown:return e.preventDefault(),e.stopPropagation(),s({type:Tt.GoToItem,focus:mt.Next});case J.ArrowUp:return e.preventDefault(),e.stopPropagation(),s({type:Tt.GoToItem,focus:mt.Previous});case J.Home:case J.PageUp:return e.preventDefault(),e.stopPropagation(),s({type:Tt.GoToItem,focus:mt.First});case J.End:case J.PageDown:return e.preventDefault(),e.stopPropagation(),s({type:Tt.GoToItem,focus:mt.Last});case J.Escape:e.preventDefault(),e.stopPropagation(),s({type:Tt.CloseMenu}),bt().nextFrame((function(){var e;return null==(e=u.buttonRef.current)?void 0:e.focus({preventScroll:!0})}));break;case J.Tab:e.preventDefault(),e.stopPropagation();break;default:1===e.key.length&&(s({type:Tt.Search,value:e.key}),f.setTimeout((function(){return s({type:Tt.ClearSearch})}),350))}}),[s,f,u]),v=(0,o.useCallback)((function(e){switch(e.key){case J.Space:e.preventDefault()}}),[]),h=(0,o.useMemo)((function(){return{open:u.menuState===Nt.Open}}),[u]);return X({props:q({},t,{"aria-activedescendant":null===u.activeItemIndex||null==(r=u.items[u.activeItemIndex])?void 0:r.id,"aria-labelledby":null==(i=u.buttonRef.current)?void 0:i.id,id:l,onKeyDown:m,onKeyUp:v,role:"menu",tabIndex:0,ref:c}),slot:h,defaultTag:"div",features:Wt,visible:p,name:"Menu.Items"})})),zt=o.Fragment;Ut.Button=qt,Ut.Items=Kt,Ut.Item=function e(t){var n=t.disabled,r=void 0!==n&&n,i=t.onClick,a=W(t,["disabled","onClick"]),u=Ft([Ut.name,e.name].join(".")),s=u[0],c=u[1],l="headlessui-menu-item-"+ce(),f=null!==s.activeItemIndex&&s.items[s.activeItemIndex].id===l;oe((function(){if(s.menuState===Nt.Open&&f){var e=bt();return e.nextFrame((function(){var e;return null==(e=document.getElementById(l))||null==e.scrollIntoView?void 0:e.scrollIntoView({block:"nearest"})})),e.dispose}}),[l,f,s.menuState]);var d=(0,o.useRef)({disabled:r});oe((function(){d.current.disabled=r}),[d,r]),oe((function(){var e,t;d.current.textValue=null==(e=document.getElementById(l))||null==(t=e.textContent)?void 0:t.toLowerCase()}),[d,l]),oe((function(){return c({type:Tt.RegisterItem,id:l,dataRef:d}),function(){return c({type:Tt.UnregisterItem,id:l})}}),[d,l]);var p=(0,o.useCallback)((function(e){return r?e.preventDefault():(c({type:Tt.CloseMenu}),bt().nextFrame((function(){var e;return null==(e=s.buttonRef.current)?void 0:e.focus({preventScroll:!0})})),i?i(e):void 0)}),[c,s.buttonRef,r,i]),m=(0,o.useCallback)((function(){if(r)return c({type:Tt.GoToItem,focus:mt.Nothing});c({type:Tt.GoToItem,focus:mt.Specific,id:l})}),[r,l,c]),v=(0,o.useCallback)((function(){r||f||c({type:Tt.GoToItem,focus:mt.Specific,id:l})}),[r,f,l,c]),h=(0,o.useCallback)((function(){r||f&&c({type:Tt.GoToItem,focus:mt.Nothing})}),[r,f,c]),y=(0,o.useMemo)((function(){return{active:f,disabled:r}}),[f,r]);return X({props:q({},a,{id:l,role:"menuitem",tabIndex:-1,"aria-disabled":!0===r||void 0,onClick:p,onFocus:m,onPointerMove:v,onMouseMove:v,onPointerLeave:h,onMouseLeave:h}),slot:y,defaultTag:zt,name:"Menu.Item"})},function(e){e[e.Open=0]="Open",e[e.Closed=1]="Closed"}(Gt||(Gt={})),function(e){e[e.TogglePopover=0]="TogglePopover",e[e.ClosePopover=1]="ClosePopover",e[e.SetButton=2]="SetButton",e[e.SetButtonId=3]="SetButtonId",e[e.SetPanel=4]="SetPanel",e[e.SetPanelId=5]="SetPanelId"}(Ht||(Ht={}));var $t=((Vt={})[Ht.TogglePopover]=function(e){var t;return q({},e,{popoverState:$(e.popoverState,(t={},t[Gt.Open]=Gt.Closed,t[Gt.Closed]=Gt.Open,t))})},Vt[Ht.ClosePopover]=function(e){return e.popoverState===Gt.Closed?e:q({},e,{popoverState:Gt.Closed})},Vt[Ht.SetButton]=function(e,t){return e.button===t.button?e:q({},e,{button:t.button})},Vt[Ht.SetButtonId]=function(e,t){return e.buttonId===t.buttonId?e:q({},e,{buttonId:t.buttonId})},Vt[Ht.SetPanel]=function(e,t){return e.panel===t.panel?e:q({},e,{panel:t.panel})},Vt[Ht.SetPanelId]=function(e,t){return e.panelId===t.panelId?e:q({},e,{panelId:t.panelId})},Vt),Qt=(0,o.createContext)(null);function Yt(e){var t=(0,o.useContext)(Qt);if(null===t){var n=new Error("<"+e+" /> is missing a parent <"+tn.name+" /> component.");throw Error.captureStackTrace&&Error.captureStackTrace(n,Yt),n}return t}Qt.displayName="PopoverContext";var Jt=(0,o.createContext)(null);function Xt(){return(0,o.useContext)(Jt)}Jt.displayName="PopoverGroupContext";var Zt=(0,o.createContext)(null);function en(e,t){return $(t.type,$t,e,t)}Zt.displayName="PopoverPanelContext";function tn(e){var t,n="headlessui-popover-button-"+ce(),r="headlessui-popover-panel-"+ce(),a=(0,o.useReducer)(en,{popoverState:Gt.Closed,button:null,buttonId:n,panel:null,panelId:r}),u=a[0],s=u.popoverState,c=u.button,l=u.panel,f=a[1];(0,o.useEffect)((function(){return f({type:Ht.SetButtonId,buttonId:n})}),[n,f]),(0,o.useEffect)((function(){return f({type:Ht.SetPanelId,panelId:r})}),[r,f]);var d=(0,o.useMemo)((function(){return{buttonId:n,panelId:r,close:function(){return f({type:Ht.ClosePopover})}}}),[n,r,f]),p=Xt(),m=null==p?void 0:p.registerPopover,v=(0,o.useCallback)((function(){var e;return null!=(e=null==p?void 0:p.isFocusWithinPopoverGroup())?e:(null==c?void 0:c.contains(document.activeElement))||(null==l?void 0:l.contains(document.activeElement))}),[p,c,l]);(0,o.useEffect)((function(){return null==m?void 0:m(d)}),[m,d]),ge("focus",(function(){s===Gt.Open&&(v()||c&&l&&f({type:Ht.ClosePopover}))}),!0),ge("mousedown",(function(e){var t=e.target;s===Gt.Open&&((null==c?void 0:c.contains(t))||(null==l?void 0:l.contains(t))||(f({type:Ht.ClosePopover}),ye(t,pe.Loose)||(e.preventDefault(),null==c||c.focus())))}));var h=(0,o.useMemo)((function(){return{open:s===Gt.Open}}),[s]);return i().createElement(Qt.Provider,{value:a},i().createElement(Ve,{value:$(s,(t={},t[Gt.Open]=Me.Open,t[Gt.Closed]=Me.Closed,t))},X({props:e,slot:h,defaultTag:"div",name:"Popover"})))}var nn=ee((function e(t,n){var r=Yt([tn.name,e.name].join(".")),i=r[0],a=r[1],u=(0,o.useRef)(null),s=Xt(),c=null==s?void 0:s.closeOthers,l=(0,o.useContext)(Zt),f=null!==l&&l===i.panelId,d=ne(u,n,f?null:function(e){return a({type:Ht.SetButton,button:e})}),p=(0,o.useRef)(null),m=(0,o.useRef)("undefined"==typeof window?null:document.activeElement);ge("focus",(function(){m.current=p.current,p.current=document.activeElement}),!0);var v=(0,o.useCallback)((function(e){var t;if(f){if(i.popoverState===Gt.Closed)return;switch(e.key){case J.Space:case J.Enter:e.preventDefault(),e.stopPropagation(),a({type:Ht.ClosePopover}),null==(t=i.button)||t.focus()}}else switch(e.key){case J.Space:case J.Enter:e.preventDefault(),e.stopPropagation(),i.popoverState===Gt.Closed&&(null==c||c(i.buttonId)),a({type:Ht.TogglePopover});break;case J.Escape:if(i.popoverState!==Gt.Open)return null==c?void 0:c(i.buttonId);if(!u.current)return;if(!u.current.contains(document.activeElement))return;a({type:Ht.ClosePopover});break;case J.Tab:if(i.popoverState!==Gt.Open)return;if(!i.panel)return;if(!i.button)return;if(e.shiftKey){var n;if(!m.current)return;if(null==(n=i.button)?void 0:n.contains(m.current))return;if(i.panel.contains(m.current))return;var r=he(),o=r.indexOf(m.current);if(r.indexOf(i.button)>o)return;e.preventDefault(),e.stopPropagation(),xe(i.panel,le.Last)}else e.preventDefault(),e.stopPropagation(),xe(i.panel,le.First)}}),[a,i.popoverState,i.buttonId,i.button,i.panel,u,c,f]),h=(0,o.useCallback)((function(e){var t;if(!f&&(e.key===J.Space&&e.preventDefault(),i.popoverState===Gt.Open&&i.panel&&i.button))switch(e.key){case J.Tab:if(!m.current)return;if(null==(t=i.button)?void 0:t.contains(m.current))return;if(i.panel.contains(m.current))return;var n=he(),r=n.indexOf(m.current);if(n.indexOf(i.button)>r)return;e.preventDefault(),e.stopPropagation(),xe(i.panel,le.Last)}}),[i.popoverState,i.panel,i.button,f]),y=(0,o.useCallback)((function(e){var n,r;re(e.currentTarget)||(t.disabled||(f?(a({type:Ht.ClosePopover}),null==(n=i.button)||n.focus()):(i.popoverState===Gt.Closed&&(null==c||c(i.buttonId)),null==(r=i.button)||r.focus(),a({type:Ht.TogglePopover}))))}),[a,i.button,i.popoverState,i.buttonId,t.disabled,c,f]),b=(0,o.useMemo)((function(){return{open:i.popoverState===Gt.Open}}),[i]);return X({props:q({},t,f?{type:"button",onKeyDown:v,onClick:y}:{ref:d,id:i.buttonId,type:"button","aria-expanded":i.popoverState===Gt.Open||void 0,"aria-controls":i.panel?i.panelId:void 0,onKeyDown:v,onKeyUp:h,onClick:y}),slot:b,defaultTag:"button",name:"Popover.Button"})})),rn=Q.RenderStrategy|Q.Static,on=ee((function e(t,n){var r=Yt([tn.name,e.name].join(".")),i=r[0].popoverState,a=r[1],u=ne(n),s="headlessui-popover-overlay-"+ce(),c=Ue(),l=null!==c?c===Me.Open:i===Gt.Open,f=(0,o.useCallback)((function(e){if(re(e.currentTarget))return e.preventDefault();a({type:Ht.ClosePopover})}),[a]),d=(0,o.useMemo)((function(){return{open:i===Gt.Open}}),[i]);return X({props:q({},t,{ref:u,id:s,"aria-hidden":!0,onClick:f}),slot:d,defaultTag:"div",features:rn,visible:l,name:"Popover.Overlay"})})),an=Q.RenderStrategy|Q.Static,un=ee((function e(t,n){var r=t.focus,a=void 0!==r&&r,u=W(t,["focus"]),s=Yt([tn.name,e.name].join(".")),c=s[0],l=s[1],f=(0,o.useRef)(null),d=ne(f,n,(function(e){l({type:Ht.SetPanel,panel:e})})),p=Ue(),m=null!==p?p===Me.Open:c.popoverState===Gt.Open,v=(0,o.useCallback)((function(e){var t;switch(e.key){case J.Escape:if(c.popoverState!==Gt.Open)return;if(!f.current)return;if(!f.current.contains(document.activeElement))return;e.preventDefault(),l({type:Ht.ClosePopover}),null==(t=c.button)||t.focus()}}),[c,f,l]);(0,o.useEffect)((function(){return function(){return l({type:Ht.SetPanel,panel:null})}}),[l]),(0,o.useEffect)((function(){var e;c.popoverState!==Gt.Closed||null!=(e=t.unmount)&&!e||l({type:Ht.SetPanel,panel:null})}),[c.popoverState,t.unmount,l]),(0,o.useEffect)((function(){if(a&&c.popoverState===Gt.Open&&f.current){var e=document.activeElement;f.current.contains(e)||xe(f.current,le.First)}}),[a,f,c.popoverState]),ge("keydown",(function(e){if(c.popoverState===Gt.Open&&f.current&&e.key===J.Tab&&document.activeElement&&f.current&&f.current.contains(document.activeElement)){e.preventDefault();var t,n=xe(f.current,e.shiftKey?le.Previous:le.Next);if(n===fe.Underflow)return null==(t=c.button)?void 0:t.focus();if(n===fe.Overflow){if(!c.button)return;var r=he(),o=r.indexOf(c.button);xe(r.splice(o+1).filter((function(e){var t;return!(null==(t=f.current)?void 0:t.contains(e))})),le.First)===fe.Error&&xe(document.body,le.First)}}})),ge("focus",(function(){var e;a&&c.popoverState===Gt.Open&&f.current&&((null==(e=f.current)?void 0:e.contains(document.activeElement))||l({type:Ht.ClosePopover}))}),!0);var h=(0,o.useMemo)((function(){return{open:c.popoverState===Gt.Open}}),[c]),y={ref:d,id:c.panelId,onKeyDown:v};return i().createElement(Zt.Provider,{value:c.panelId},X({props:q({},u,y),slot:h,defaultTag:"div",features:an,visible:m,name:"Popover.Panel"}))}));tn.Button=nn,tn.Overlay=on,tn.Panel=un,tn.Group=function(e){var t=(0,o.useRef)(null),n=(0,o.useState)([]),r=n[0],a=n[1],u=(0,o.useCallback)((function(e){a((function(t){var n=t.indexOf(e);if(-1!==n){var r=t.slice();return r.splice(n,1),r}return t}))}),[a]),s=(0,o.useCallback)((function(e){return a((function(t){return[].concat(t,[e])})),function(){return u(e)}}),[a,u]),c=(0,o.useCallback)((function(){var e,n=document.activeElement;return!!(null==(e=t.current)?void 0:e.contains(n))||r.some((function(e){var t,r;return(null==(t=document.getElementById(e.buttonId))?void 0:t.contains(n))||(null==(r=document.getElementById(e.panelId))?void 0:r.contains(n))}))}),[t,r]),l=(0,o.useCallback)((function(e){for(var t,n=z(r);!(t=n()).done;){var o=t.value;o.buttonId!==e&&o.close()}}),[r]),f=(0,o.useMemo)((function(){return{registerPopover:s,unregisterPopover:u,isFocusWithinPopoverGroup:c,closeOthers:l}}),[s,u,c,l]),d=(0,o.useMemo)((function(){return{}}),[]),p={ref:t},m=e;return i().createElement(Jt.Provider,{value:f},X({props:q({},m,p),slot:d,defaultTag:"div",name:"Popover.Group"}))};var sn=(0,o.createContext)(null);function cn(){var e=(0,o.useContext)(sn);if(null===e){var t=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,cn),t}return e}function ln(){var e=(0,o.useState)([]),t=e[0],n=e[1];return[t.length>0?t.join(" "):void 0,(0,o.useMemo)((function(){return function(e){var t=(0,o.useCallback)((function(e){return n((function(t){return[].concat(t,[e])})),function(){return n((function(t){var n=t.slice(),r=n.indexOf(e);return-1!==r&&n.splice(r,1),n}))}}),[]),r=(0,o.useMemo)((function(){return{register:t,slot:e.slot,name:e.name,props:e.props}}),[t,e.slot,e.name,e.props]);return i().createElement(sn.Provider,{value:r},e.children)}}),[n])]}var fn,dn;function pn(e){var t=e.passive,n=void 0!==t&&t,r=W(e,["passive"]),o=cn(),i="headlessui-label-"+ce();oe((function(){return o.register(i)}),[i,o.register]);var a=q({},o.props,{id:i}),u=q({},r,a);return n&&delete u.onClick,X({props:u,slot:o.slot||{},defaultTag:"label",name:o.name||"Label"})}!function(e){e[e.RegisterOption=0]="RegisterOption",e[e.UnregisterOption=1]="UnregisterOption"}(dn||(dn={}));var mn=((fn={})[dn.RegisterOption]=function(e,t){return q({},e,{options:[].concat(e.options,[{id:t.id,element:t.element,propsRef:t.propsRef}])})},fn[dn.UnregisterOption]=function(e,t){var n=e.options.slice(),r=e.options.findIndex((function(e){return e.id===t.id}));return-1===r?e:(n.splice(r,1),q({},e,{options:n}))},fn),vn=(0,o.createContext)(null);function hn(e){var t=(0,o.useContext)(vn);if(null===t){var n=new Error("<"+e+" /> is missing a parent <"+xn.name+" /> component.");throw Error.captureStackTrace&&Error.captureStackTrace(n,hn),n}return t}function yn(e,t){return $(t.type,mn,e,t)}vn.displayName="RadioGroupContext";var bn;function xn(e){var t=e.value,n=e.onChange,r=e.disabled,a=void 0!==r&&r,u=W(e,["value","onChange","disabled"]),s=(0,o.useReducer)(yn,{options:[]}),c=s[0].options,l=s[1],f=ln(),d=f[0],p=f[1],m=De(),v=m[0],h=m[1],y="headlessui-radiogroup-"+ce(),b=(0,o.useRef)(null),x=(0,o.useMemo)((function(){return c.find((function(e){return!e.propsRef.current.disabled}))}),[c]),g=(0,o.useMemo)((function(){return c.some((function(e){return e.propsRef.current.value===t}))}),[c,t]),w=(0,o.useCallback)((function(e){var r;if(a)return!1;if(e===t)return!1;var o=null==(r=c.find((function(t){return t.propsRef.current.value===e})))?void 0:r.propsRef.current;return!(null==o?void 0:o.disabled)&&(n(e),!0)}),[n,t,a,c]);At({container:b.current,accept:function(e){return"radio"===e.getAttribute("role")?NodeFilter.FILTER_REJECT:e.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk:function(e){e.setAttribute("role","none")}});var k=(0,o.useCallback)((function(e){if(b.current){var t=c.filter((function(e){return!1===e.propsRef.current.disabled})).map((function(e){return e.element.current}));switch(e.key){case J.ArrowLeft:case J.ArrowUp:if(e.preventDefault(),e.stopPropagation(),xe(t,le.Previous|le.WrapAround)===fe.Success){var n=c.find((function(e){return e.element.current===document.activeElement}));n&&w(n.propsRef.current.value)}break;case J.ArrowRight:case J.ArrowDown:if(e.preventDefault(),e.stopPropagation(),xe(t,le.Next|le.WrapAround)===fe.Success){var r=c.find((function(e){return e.element.current===document.activeElement}));r&&w(r.propsRef.current.value)}break;case J.Space:e.preventDefault(),e.stopPropagation();var o=c.find((function(e){return e.element.current===document.activeElement}));o&&w(o.propsRef.current.value)}}}),[b,c,w]),S=(0,o.useCallback)((function(e){return l(q({type:dn.RegisterOption},e)),function(){return l({type:dn.UnregisterOption,id:e.id})}}),[l]),j=(0,o.useMemo)((function(){return{registerOption:S,firstOption:x,containsCheckedOption:g,change:w,disabled:a,value:t}}),[S,x,g,w,a,t]),O={ref:b,id:y,role:"radiogroup","aria-labelledby":d,"aria-describedby":v,onKeyDown:k};return i().createElement(h,{name:"RadioGroup.Description"},i().createElement(p,{name:"RadioGroup.Label"},i().createElement(vn.Provider,{value:j},X({props:q({},u,O),defaultTag:"div",name:"RadioGroup"}))))}!function(e){e[e.Empty=1]="Empty",e[e.Active=2]="Active"}(bn||(bn={}));xn.Option=function e(t){var n=(0,o.useRef)(null),r="headlessui-radiogroup-option-"+ce(),a=ln(),u=a[0],s=a[1],c=De(),l=c[0],f=c[1],d=function(e){void 0===e&&(e=0);var t=(0,o.useState)(e),n=t[0],r=t[1];return{addFlag:(0,o.useCallback)((function(e){return r((function(t){return t|e}))}),[r]),hasFlag:(0,o.useCallback)((function(e){return Boolean(n&e)}),[n]),removeFlag:(0,o.useCallback)((function(e){return r((function(t){return t&~e}))}),[r]),toggleFlag:(0,o.useCallback)((function(e){return r((function(t){return t^e}))}),[r])}}(bn.Empty),p=d.addFlag,m=d.removeFlag,v=d.hasFlag,h=t.value,y=t.disabled,b=void 0!==y&&y,x=W(t,["value","disabled"]),g=(0,o.useRef)({value:h,disabled:b});oe((function(){g.current.value=h}),[h,g]),oe((function(){g.current.disabled=b}),[b,g]);var w=hn([xn.name,e.name].join(".")),k=w.registerOption,S=w.disabled,j=w.change,O=w.firstOption,C=w.containsCheckedOption,E=w.value;oe((function(){return k({id:r,element:n,propsRef:g})}),[r,k,n,t]);var P=(0,o.useCallback)((function(){var e;j(h)&&(p(bn.Active),null==(e=n.current)||e.focus())}),[p,j,h]),I=(0,o.useCallback)((function(){return p(bn.Active)}),[p]),N=(0,o.useCallback)((function(){return m(bn.Active)}),[m]),T=(null==O?void 0:O.id)===r,_=S||b,R=E===h,A={ref:n,id:r,role:"radio","aria-checked":R?"true":"false","aria-labelledby":u,"aria-describedby":l,tabIndex:_?-1:R||!C&&T?0:-1,onClick:_?void 0:P,onFocus:_?void 0:I,onBlur:_?void 0:N},L=(0,o.useMemo)((function(){return{checked:R,disabled:_,active:v(bn.Active)}}),[R,_,v]);return i().createElement(f,{name:"RadioGroup.Description"},i().createElement(s,{name:"RadioGroup.Label"},X({props:q({},x,A),slot:L,defaultTag:"div",name:"RadioGroup.Option"})))},xn.Label=pn,xn.Description=Fe;var gn=(0,o.createContext)(null);gn.displayName="GroupContext";var wn=o.Fragment;var kn;function Sn(e){var t=e.checked,n=e.onChange,r=W(e,["checked","onChange"]),i="headlessui-switch-"+ce(),a=(0,o.useContext)(gn),u=(0,o.useCallback)((function(){return n(!t)}),[n,t]),s=(0,o.useCallback)((function(e){if(re(e.currentTarget))return e.preventDefault();e.preventDefault(),u()}),[u]),c=(0,o.useCallback)((function(e){e.key!==J.Tab&&e.preventDefault(),e.key===J.Space&&u()}),[u]),l=(0,o.useCallback)((function(e){return e.preventDefault()}),[]),f=(0,o.useMemo)((function(){return{checked:t}}),[t]),d={id:i,ref:null===a?void 0:a.setSwitch,role:"switch",tabIndex:0,"aria-checked":t,"aria-labelledby":null==a?void 0:a.labelledby,"aria-describedby":null==a?void 0:a.describedby,onClick:s,onKeyUp:c,onKeyPress:l};return"button"===r.as&&Object.assign(d,{type:"button"}),X({props:q({},r,d),slot:f,defaultTag:"button",name:"Switch"})}function jn(){var e=(0,o.useRef)(!0);return(0,o.useEffect)((function(){e.current=!1}),[]),e.current}function On(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e&&r.length>0&&(t=e.classList).add.apply(t,r)}function Cn(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e&&r.length>0&&(t=e.classList).remove.apply(t,r)}function En(e,t,n,r,o){var i=bt(),a=void 0!==o?function(e){var t={called:!1};return function(){if(!t.called)return t.called=!0,e.apply(void 0,arguments)}}(o):function(){};return On.apply(void 0,[e].concat(t,n)),i.nextFrame((function(){Cn.apply(void 0,[e].concat(n)),On.apply(void 0,[e].concat(r)),i.add(function(e,t){var n=bt();if(!e)return n.dispose;var r=getComputedStyle(e),o=[r.transitionDuration,r.transitionDelay].map((function(e){var t=e.split(",").filter(Boolean).map((function(e){return e.includes("ms")?parseFloat(e):1e3*parseFloat(e)})).sort((function(e,t){return t-e}))[0];return void 0===t?0:t})),i=o[0],a=o[1];return 0!==i?n.setTimeout((function(){t(kn.Finished)}),i+a):t(kn.Finished),n.add((function(){return t(kn.Cancelled)})),n.dispose}(e,(function(n){return Cn.apply(void 0,[e].concat(r,t)),a(n)})))})),i.add((function(){return Cn.apply(void 0,[e].concat(t,n,r))})),i.add((function(){return a(kn.Cancelled)})),i.dispose}function Pn(e){return void 0===e&&(e=""),(0,o.useMemo)((function(){return e.split(" ").filter((function(e){return e.trim().length>1}))}),[e])}Sn.Group=function(e){var t=(0,o.useState)(null),n=t[0],r=t[1],a=ln(),u=a[0],s=a[1],c=De(),l=c[0],f=c[1],d=(0,o.useMemo)((function(){return{switch:n,setSwitch:r,labelledby:u,describedby:l}}),[n,r,u,l]);return i().createElement(f,{name:"Switch.Description"},i().createElement(s,{name:"Switch.Label",props:{onClick:function(){n&&(n.click(),n.focus({preventScroll:!0}))}}},i().createElement(gn.Provider,{value:d},X({props:e,defaultTag:wn,name:"Switch.Group"}))))},Sn.Label=pn,Sn.Description=Fe,function(e){e.Finished="finished",e.Cancelled="cancelled"}(kn||(kn={}));var In,Nn=(0,o.createContext)(null);Nn.displayName="TransitionContext",function(e){e.Visible="visible",e.Hidden="hidden"}(In||(In={}));var Tn=(0,o.createContext)(null);function _n(e){return"children"in e?_n(e.children):e.current.filter((function(e){return e.state===In.Visible})).length>0}function Rn(e){var t=(0,o.useRef)(e),n=(0,o.useRef)([]),r=we();(0,o.useEffect)((function(){t.current=e}),[e]);var i=(0,o.useCallback)((function(e,o){var i;void 0===o&&(o=Y.Hidden);var a=n.current.findIndex((function(t){return t.id===e}));-1!==a&&($(o,((i={})[Y.Unmount]=function(){n.current.splice(a,1)},i[Y.Hidden]=function(){n.current[a].state=In.Hidden},i)),!_n(n)&&r.current&&(null==t.current||t.current()))}),[t,r,n]),a=(0,o.useCallback)((function(e){var t=n.current.find((function(t){return t.id===e}));return t?t.state!==In.Visible&&(t.state=In.Visible):n.current.push({id:e,state:In.Visible}),function(){return i(e,Y.Unmount)}}),[n,i]);return(0,o.useMemo)((function(){return{children:n,register:a,unregister:i}}),[a,i,n])}function An(){}Tn.displayName="NestingContext";var Ln=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function Dn(e){for(var t,n={},r=z(Ln);!(t=r()).done;){var o,i=t.value;n[i]=null!=(o=e[i])?o:An}return n}var Fn=Q.RenderStrategy;function Mn(e){var t,n=e.beforeEnter,r=e.afterEnter,a=e.beforeLeave,u=e.afterLeave,s=e.enter,c=e.enterFrom,l=e.enterTo,f=e.leave,d=e.leaveFrom,p=e.leaveTo,m=W(e,["beforeEnter","afterEnter","beforeLeave","afterLeave","enter","enterFrom","enterTo","leave","leaveFrom","leaveTo"]),v=(0,o.useRef)(null),h=(0,o.useState)(In.Visible),y=h[0],b=h[1],x=m.unmount?Y.Unmount:Y.Hidden,g=function(){var e=(0,o.useContext)(Nn);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),w=g.show,k=g.appear,S=function(){var e=(0,o.useContext)(Tn);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),j=S.register,O=S.unregister,C=jn(),E=ce(),P=(0,o.useRef)(!1),I=Rn((function(){P.current||(b(In.Hidden),O(E),D.current.afterLeave())}));oe((function(){if(E)return j(E)}),[j,E]),oe((function(){var e;x===Y.Hidden&&E&&(w&&y!==In.Visible?b(In.Visible):$(y,((e={})[In.Hidden]=function(){return O(E)},e[In.Visible]=function(){return j(E)},e)))}),[y,E,j,O,w,x]);var N=Pn(s),T=Pn(c),_=Pn(l),R=Pn(f),A=Pn(d),L=Pn(p),D=function(e){var t=(0,o.useRef)(Dn(e));return(0,o.useEffect)((function(){t.current=Dn(e)}),[e]),t}({beforeEnter:n,afterEnter:r,beforeLeave:a,afterLeave:u}),F=ae();(0,o.useEffect)((function(){if(F&&y===In.Visible&&null===v.current)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}),[v,y,F]);var M=C&&!k;oe((function(){var e=v.current;if(e&&!M)return P.current=!0,w&&D.current.beforeEnter(),w||D.current.beforeLeave(),w?En(e,N,T,_,(function(e){P.current=!1,e===kn.Finished&&D.current.afterEnter()})):En(e,R,A,L,(function(e){P.current=!1,e===kn.Finished&&(_n(I)||(b(In.Hidden),O(E),D.current.afterLeave()))}))}),[D,E,P,O,I,v,M,w,N,T,_,R,A,L]);var B={ref:v},U=m;return i().createElement(Tn.Provider,{value:I},i().createElement(Ve,{value:$(y,(t={},t[In.Visible]=Me.Open,t[In.Hidden]=Me.Closed,t))},X({props:q({},U,B),defaultTag:"div",features:Fn,visible:y===In.Visible,name:"Transition.Child"})))}function Bn(e){var t,n=e.show,r=e.appear,a=void 0!==r&&r,u=e.unmount,s=W(e,["show","appear","unmount"]),c=Ue();void 0===n&&null!==c&&(n=$(c,((t={})[Me.Open]=!0,t[Me.Closed]=!1,t)));if(![!0,!1].includes(n))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");var l=(0,o.useState)(n?In.Visible:In.Hidden),f=l[0],d=l[1],p=Rn((function(){d(In.Hidden)})),m=jn(),v=(0,o.useMemo)((function(){return{show:n,appear:a||!m}}),[n,a,m]);(0,o.useEffect)((function(){n?d(In.Visible):_n(p)||d(In.Hidden)}),[n,p]);var h={unmount:u};return i().createElement(Tn.Provider,{value:p},i().createElement(Nn.Provider,{value:v},X({props:q({},h,{as:o.Fragment,children:i().createElement(Mn,Object.assign({},h,s))}),defaultTag:o.Fragment,features:Fn,visible:f===In.Visible,name:"Transition"})))}Bn.Child=Mn,Bn.Root=Bn;const Un=wp.i18n;var Vn=n(246);function Gn(e){var t=e.className,n=e.hideLibrary,r=e.initialFocus,o=G((function(e){return e.remainingImports})),i=G((function(e){return e.apiKey})),a=G((function(e){return e.allowedImports}));return(0,Vn.jsx)("div",{className:t,children:(0,Vn.jsxs)("div",{className:"flex justify-between items-center px-6 sm:px-12 h-full",children:[(0,Vn.jsxs)("div",{className:"flex space-x-12 h-full",children:[(0,Vn.jsxs)("div",{className:"font-bold flex items-center space-x-1.5 lg:w-72",children:[(0,Vn.jsxs)("svg",{className:"",width:"30",height:"30",viewBox:"0 0 103 103",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Vn.jsx)("rect",{y:"25.75",width:"70.8125",height:"77.25",fill:"#000000"}),(0,Vn.jsx)("rect",{x:"45.0625",width:"57.9375",height:"57.9375",fill:"#37C2A2"})]}),(0,Vn.jsx)("span",{className:"text-sm transform translate-y-0.5 whitespace-nowrap",children:(0,Un.__)("Extendify Library","extendify-sdk")})]}),!i.length&&(0,Vn.jsx)(Vn.Fragment,{children:(0,Vn.jsxs)("div",{className:"items-center ml-8 h-full hidden md:flex",children:[(0,Vn.jsxs)("div",{className:"h-full flex items-center px-6 border-l border-r border-gray-300 bg-extendify-lightest",children:[(0,Vn.jsx)("a",{className:"button-extendify-main inline lg:hidden",target:"_blank",href:"https://extendify.com",rel:"noreferrer",children:(0,Un.__)("Sign up","extendify-sdk")}),(0,Vn.jsx)("a",{className:"button-extendify-main hidden lg:block",target:"_blank",href:"https://extendify.com",rel:"noreferrer",children:(0,Un.__)("Sign up today to get unlimited access","extendify-sdk")})]}),(0,Vn.jsx)("div",{className:"m-0 p-0 px-6 text-sm bg-gray-50 border-r border-gray-300 h-full flex items-center",children:(0,Un.sprintf)((0,Un.__)("Imports left: %s / %s"),o(),Number(a))})]})})]}),(0,Vn.jsx)("div",{className:"space-x-2 transform sm:translate-x-8",children:(0,Vn.jsxs)("button",{ref:r,type:"button",className:"components-button has-icon",onClick:function(){return n()},children:[(0,Vn.jsx)("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",size:"24",role:"img","aria-hidden":"true",focusable:"false",children:(0,Vn.jsx)("path",{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"})}),(0,Vn.jsx)("span",{className:"sr-only",children:(0,Un.__)("Close library","extendify-sdk")})]})})]})})}const Hn=wp.blockEditor,qn=lodash;var Wn=function(){return T.get("taxonomies")};const Kn=wp.components;var zn=n(42),$n=n.n(zn);function Qn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Yn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Jn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Jn(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Jn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Xn(e){var t=Yn(e.taxonomy,2),n=t[0],o=t[1],i=e.open,a=x((function(e){return e.updateTaxonomies})),u=x((function(e){return e.resetTaxonomies})),s=x((function(e){return e.searchParams})),c=Yn((0,r.useState)({}),2),l=c[0],f=c[1],d=Yn((0,r.useState)({}),2),p=d[0],m=d[1],v=(0,r.useRef)(),h=(0,r.useRef)(),y=(0,r.useRef)(),b=(0,r.useRef)(!0),g=function(e){var t;return(null==s?void 0:s.taxonomies[n])===e.term||(null===(t=e.children)||void 0===t?void 0:t.filter((function(e){return e.term===(null==s?void 0:s.taxonomies[n])})).length)>0},w=function(e){var t;return Object.prototype.hasOwnProperty.call(e,"children")?e.children.filter((function(e){return null==e?void 0:e.type.includes(s.type)})).length:null==e||null===(t=e.type)||void 0===t?void 0:t.includes(s.type)};if((0,r.useEffect)((function(){b.current?b.current=!1:(f({}),u())}),[s.type,u]),(0,r.useEffect)((function(){Object.keys(l).length?setTimeout((function(){requestAnimationFrame((function(){m(v.current.clientHeight),y.current.focus()}))}),200):m("auto")}),[l]),!Object.keys(o).length||!Object.values(o).filter((function(e){return w(e)})).length)return"";var k=n.replace("tax_","").replace("_"," ").replace(/\b\w/g,(function(e){return e.toUpperCase()}));return(0,Vn.jsx)(Kn.PanelBody,{title:k,initialOpen:i,children:(0,Vn.jsx)(Kn.PanelRow,{children:(0,Vn.jsxs)("div",{className:"overflow-hidden w-full relative",style:{height:p},children:[(0,Vn.jsxs)("ul",{className:$n()("p-1 m-0 w-full transform transition duration-200",{"-translate-x-full":Object.keys(l).length}),children:[(0,Vn.jsx)("li",{className:"m-0",children:(0,Vn.jsx)("button",{type:"button",className:"text-left cursor-pointer w-full flex justify-between items-center py-1.5 m-0 leading-none hover:text-wp-theme-500 bg-transparent transition duration-200 button-focus",ref:h,onClick:function(){a(Qn({},n,"pattern"===s.type&&"tax_categories"===n?"Default":""))},children:(0,Vn.jsx)("span",{className:$n()({"text-wp-theme-500":!s.taxonomies[n].length||"Default"===(null==s?void 0:s.taxonomies[n])}),children:"pattern"===s.type&&"tax_categories"===n?(0,Un.__)("Default","extendify-sdk"):(0,Un.__)("All","extendify-sdk")})})}),Object.values(o).filter((function(e){return w(e)})).sort((function(e,t){return e.term.localeCompare(t.term)})).map((function(e){return(0,Vn.jsx)("li",{className:"m-0 w-full",children:(0,Vn.jsxs)("button",{type:"button",className:"text-left cursor-pointer w-full flex justify-between items-center py-1.5 m-0 leading-none bg-transparent hover:text-wp-theme-500 transition duration-200 button-focus",onClick:function(){Object.prototype.hasOwnProperty.call(e,"children")?f(e):a(Qn({},n,e.term))},children:[(0,Vn.jsx)("span",{className:$n()({"text-wp-theme-500":g(e)}),children:e.term}),Object.prototype.hasOwnProperty.call(e,"children")&&(0,Vn.jsx)("span",{className:"text-black",children:(0,Vn.jsx)("svg",{width:"8",height:"14",viewBox:"0 0 8 14",className:"stroke-current",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,Vn.jsx)("path",{d:"M1 12.5L6 6.99998L1 1.5",strokeWidth:"1.5"})})})]})},e.term)}))]}),(0,Vn.jsxs)("ul",{ref:v,className:$n()("p-1 m-0 w-full transform transition duration-200 absolute top-0 right-0",{"translate-x-full":!Object.keys(l).length}),children:[Object.values(l).length>0&&(0,Vn.jsx)("li",{className:"m-0",children:(0,Vn.jsxs)("button",{type:"button",className:"text-left cursor-pointer font-bold flex space-x-4 items-center py-2 pr-4 m-0leading-none hover:text-wp-theme-500 bg-transparent transition duration-200 button-focus",ref:y,onClick:function(){f({}),h.current.focus()},children:[(0,Vn.jsx)("svg",{className:"stroke-current transform rotate-180",width:"8",height:"14",viewBox:"0 0 8 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,Vn.jsx)("path",{d:"M1 12.5L6 6.99998L1 1.5",strokeWidth:"1.5"})}),(0,Vn.jsx)("span",{children:l.term})]})}),Object.values(l).length&&Object.values(l.children).filter((function(e){return w(e)})).sort((function(e,t){return e.term.localeCompare(t.term)})).map((function(e){return(0,Vn.jsx)("li",{className:"m-0 pl-6 w-full flex justify-between items-center",children:(0,Vn.jsx)("button",{type:"button",className:"text-left cursor-pointer w-full flex justify-between items-center py-1.5 m-0 leading-none bg-transparent hover:text-wp-theme-500 transition duration-200 button-focus",onClick:function(){a(Qn({},n,e.term))},children:(0,Vn.jsx)("span",{className:$n()({"text-wp-theme-500":g(e)}),children:e.term})})},e.term)}))]})]})})})}function Zn(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)}function er(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Zn(i,r,o,a,u,"next",e)}function u(e){Zn(i,r,o,a,u,"throw",e)}a(void 0)}))}}function tr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return nr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return nr(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function nr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function rr(){var e,t=x((function(e){return e.updateSearchParams})),n=x((function(e){return e.setupDefaultTaxonomies})),o=x((function(e){return e.searchParams})),i=(0,qn.debounce)((function(e){return t({taxonomies:{},search:e})}),500),a=tr((0,r.useState)(null!==(e=null==o?void 0:o.search)&&void 0!==e?e:""),2),u=a[0],s=a[1],c=tr((0,r.useState)({}),2),l=c[0],f=c[1],d=(0,r.useCallback)(er(k().mark((function e(){var t;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Wn();case 2:t=e.sent,t=Object.keys(t).filter((function(e){return e.startsWith("tax_")})).reduce((function(e,n){return e[n]=t[n],e}),{}),n(t),f(t);case 6:case"end":return e.stop()}}),e)}))),[n]);return(0,r.useEffect)((function(){d()}),[d]),(0,Vn.jsxs)(Vn.Fragment,{children:[(0,Vn.jsx)("div",{className:"pt-1 -mt-1 mb-1 bg-white",children:(0,Vn.jsx)(Hn.__experimentalSearchForm,{placeholder:(0,Un.__)("What are you looking for?","extendify-sdk"),onChange:function(e){x.setState({nextPage:""}),s(e),i(e)},value:u,className:"sm:ml-px sm:mr-1 sm:mb-6 px-6 sm:p-0 sm:px-0",autoComplete:"off"})}),(0,Vn.jsx)("div",{className:"flex-grow hidden overflow-y-auto pb-32 pr-2 sm:block",children:(0,Vn.jsx)(Kn.Panel,{children:Object.entries(l).map((function(e,t){return(0,Vn.jsx)(Xn,{open:!1,taxonomy:e},t)}))})})]})}function or(e){var t=e.taxonomies,n=e.search,r=e.type,o=[],i=Object.entries(t).filter((function(e){return Boolean(e[1].length)})).map((function(e){return"".concat(e[0],' = "').concat(e[1],'"')})).join(", ");return i.length&&o.push(i),n.length&&o.push('OR(FIND(LOWER("'.concat(n,'"), LOWER(title))!= 0, FIND(LOWER("').concat(n,'"), LOWER({tax_categories})) != 0)')),r.length&&o.push('{type}="'.concat(r,'"')),o.length?"AND(".concat(o.join(", "),")").replace(/\r?\n|\r/g,""):""}function ir(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)}var ar=0,ur=function(e,t){return(n=k().mark((function n(){var r,o,i;return k().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return ar++,o=N.CancelToken.source(),null!==(r=x.getState().fetchToken)&&void 0!==r&&r.cancel&&x.getState().fetchToken.cancel(),x.setState({fetchToken:o}),n.next=6,T.post("templates",{filterByFormula:or(e),pageSize:l,categories:e.taxonomies,search:e.search,type:e.type,offset:t,initial:1===ar,request_count:ar},{cancelToken:o.token});case 6:return i=n.sent,x.setState({fetchToken:null}),n.abrupt("return",i);case 9:case"end":return n.stop()}}),n)})),function(){var e=this,t=arguments;return new Promise((function(r,o){var i=n.apply(e,t);function a(e){ir(i,r,o,a,u,"next",e)}function u(e){ir(i,r,o,a,u,"throw",e)}a(void 0)}))})();var n},sr=function(e){var t;return T.post("templates/".concat(e.id),{template_id:e.id,maybe_import:!0,pageSize:l,template_name:null===(t=e.fields)||void 0===t?void 0:t.title})},cr=function(e){var t;return T.post("templates/".concat(e.id),{template_id:e.id,single:!0,pageSize:l,template_name:null===(t=e.fields)||void 0===t?void 0:t.title})},lr=function(e){var t;return T.post("templates/".concat(e.id),{template_id:e.id,imported:!0,pageSize:l,template_name:null===(t=e.fields)||void 0===t?void 0:t.title})};function fr(){return(fr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var dr=new Map,pr=new WeakMap,mr=0;function vr(e){return Object.keys(e).sort().filter((function(t){return void 0!==e[t]})).map((function(t){return t+"_"+("root"===t?(n=e.root)?(pr.has(n)||(mr+=1,pr.set(n,mr.toString())),pr.get(n)):"0":e[t]);var n})).toString()}function hr(e,t,n){if(void 0===n&&(n={}),!e)return function(){};var r=function(e){var t=vr(e),n=dr.get(t);if(!n){var r,o=new Map,i=new IntersectionObserver((function(t){t.forEach((function(t){var n,i=t.isIntersecting&&r.some((function(e){return t.intersectionRatio>=e}));e.trackVisibility&&void 0===t.isVisible&&(t.isVisible=i),null==(n=o.get(t.target))||n.forEach((function(e){e(i,t)}))}))}),e);r=i.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),n={id:t,observer:i,elements:o},dr.set(t,n)}return n}(n),o=r.id,i=r.observer,a=r.elements,u=a.get(e)||[];return a.has(e)||a.set(e,u),u.push(t),i.observe(e),function(){u.splice(u.indexOf(t),1),0===u.length&&(a.delete(e),i.unobserve(e)),0===a.size&&(i.disconnect(),dr.delete(o))}}function yr(e){return"function"!=typeof e.children}var br=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).node=null,n._unobserveCb=null,n.handleNode=function(e){n.node&&(n.unobserve(),e||n.props.triggerOnce||n.props.skip||n.setState({inView:!!n.props.initialInView,entry:void 0})),n.node=e||null,n.observeNode()},n.handleChange=function(e,t){e&&n.props.triggerOnce&&n.unobserve(),yr(n.props)||n.setState({inView:e,entry:t}),n.props.onChange&&n.props.onChange(e,t)},n.state={inView:!!t.initialInView,entry:void 0},n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentDidUpdate=function(e){e.rootMargin===this.props.rootMargin&&e.root===this.props.root&&e.threshold===this.props.threshold&&e.skip===this.props.skip&&e.trackVisibility===this.props.trackVisibility&&e.delay===this.props.delay||(this.unobserve(),this.observeNode())},i.componentWillUnmount=function(){this.unobserve(),this.node=null},i.observeNode=function(){if(this.node&&!this.props.skip){var e=this.props,t=e.threshold,n=e.root,r=e.rootMargin,o=e.trackVisibility,i=e.delay;this._unobserveCb=hr(this.node,this.handleChange,{threshold:t,root:n,rootMargin:r,trackVisibility:o,delay:i})}},i.unobserve=function(){this._unobserveCb&&(this._unobserveCb(),this._unobserveCb=null)},i.render=function(){if(!yr(this.props)){var e=this.state,t=e.inView,n=e.entry;return this.props.children({inView:t,entry:n,ref:this.handleNode})}var r=this.props,i=r.children,a=r.as,u=r.tag,s=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(r,["children","as","tag","triggerOnce","threshold","root","rootMargin","onChange","skip","trackVisibility","delay","initialInView"]);return(0,o.createElement)(a||u||"div",fr({ref:this.handleNode},s),i)},r}(o.Component);br.displayName="InView",br.defaultProps={threshold:0,triggerOnce:!1,initialInView:!1};function xr(e){return function(e){if(Array.isArray(e))return jr(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Sr(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 gr(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)}function wr(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){gr(i,r,o,a,u,"next",e)}function u(e){gr(i,r,o,a,u,"throw",e)}a(void 0)}))}}function kr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(e,t)||Sr(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 Sr(e,t){if(e){if("string"==typeof e)return jr(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)?jr(e,t):void 0}}function jr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Or(e){var t=e.templates,n=x((function(e){return e.setActive})),i=x((function(e){return e.activeTemplate})),a=x((function(e){return e.appendTemplates})),u=kr((0,r.useState)(""),2),s=u[0],c=u[1],l=kr((0,r.useState)(!1),2),f=l[0],d=l[1],p=kr((0,r.useState)([]),2),m=p[0],v=p[1],h=kr(function(e){var t=void 0===e?{}:e,n=t.threshold,r=t.delay,i=t.trackVisibility,a=t.rootMargin,u=t.root,s=t.triggerOnce,c=t.skip,l=t.initialInView,f=(0,o.useRef)(),d=(0,o.useState)({inView:!!l}),p=d[0],m=d[1],v=(0,o.useCallback)((function(e){void 0!==f.current&&(f.current(),f.current=void 0),c||e&&(f.current=hr(e,(function(e,t){m({inView:e,entry:t}),t.isIntersecting&&s&&f.current&&(f.current(),f.current=void 0)}),{root:u,rootMargin:a,threshold:n,trackVisibility:i,delay:r}))}),[Array.isArray(n)?n.toString():n,u,a,s,c,i,r]);(0,o.useEffect)((function(){f.current||!p.entry||s||c||m({inView:!!l})}));var h=[v,p.inView,p.entry];return h.ref=h[0],h.inView=h[1],h.entry=h[2],h}(),2),y=h[0],b=h[1],g=x((function(e){return e.updateSearchParams})),w=x((function(e){return e.searchParams})),S=(0,r.useRef)(x.getState().nextPage),j=(0,r.useRef)(x.getState().searchParams);(0,r.useEffect)((function(){return x.subscribe((function(e){return S.current=e}),(function(e){return e.nextPage}))}),[]),(0,r.useEffect)((function(){return x.subscribe((function(e){return j.current=e}),(function(e){return e.searchParams}))}),[]);var O=(0,r.useCallback)(wr(k().mark((function e(){var t,n;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c(""),d(!1),e.next=4,ur(j.current,S.current).catch((function(e){console.error(e),c(e&&e.message?e.message:(0,Un.__)("Unknown error occured. Check browser console or contact support.","extendify-sdk"))}));case 4:null!=(n=e.sent)&&null!==(t=n.error)&&void 0!==t&&t.length&&c(null==n?void 0:n.error),null!=n&&n.records&&w===j.current&&(a(n.records),d(n.records.length<=0),x.setState({nextPage:n.offset}));case 7:case"end":return e.stop()}}),e)}))),[w,a]);return(0,r.useEffect)((function(){Object.keys(j.current.taxonomies).length&&(v([]),O())}),[O,j]),(0,r.useEffect)((function(){b&&O()}),[b,O]),s.length?(0,Vn.jsxs)("div",{className:"text-left",children:[(0,Vn.jsx)("h2",{className:"text-left",children:(0,Un.__)("Server error","extendify-sdk")}),(0,Vn.jsx)("code",{className:"block max-w-xl p-4 mb-4",style:{minHeight:"10rem"},children:s}),(0,Vn.jsx)(Kn.Button,{isTertiary:!0,onClick:function(){v([]),g({taxonomies:{},search:""}),O()},children:(0,Un.__)("Press here to reload experience")})]}):f?null!=w&&w.search.length?(0,Vn.jsx)("h2",{className:"text-left",children:(0,Un.sprintf)((0,Un.__)("No results for %s.","extendify-sdk"),null==w?void 0:w.search)}):(0,Vn.jsx)("h2",{className:"text-left",children:(0,Un.__)("No results found.","extendify-sdk")}):t.length?(0,Vn.jsxs)(Vn.Fragment,{children:[(0,Vn.jsx)("ul",{className:"flex-grow gap-6 grid xl:grid-cols-2 2xl:grid-cols-3 pb-32 m-0",children:t.map((function(e,t){var r,o,a,u,s,c,l,f,d;return(0,Vn.jsxs)("li",{className:"flex flex-col justify-between group overflow-hidden max-w-lg",children:[(0,Vn.jsx)("div",{className:"flex justify-items-center flex-grow h-80 border-gray-200 bg-white border border-b-0 group-hover:border-wp-theme-500 transition duration-150 cursor-pointer",onClick:function(){return n(e)},children:(0,Vn.jsx)("img",{role:"button",className:"max-w-full block m-auto object-cover",onLoad:function(){return v([].concat(xr(m),[t]))},src:null!==(r=null==e||null===(o=e.fields)||void 0===o||null===(a=o.screenshot[0])||void 0===a||null===(u=a.thumbnails)||void 0===u||null===(s=u.large)||void 0===s?void 0:s.url)&&void 0!==r?r:null==e||null===(c=e.fields)||void 0===c||null===(l=c.screenshot[0])||void 0===l?void 0:l.url})}),(0,Vn.jsx)("span",{role:"img","aria-hidden":"true",className:"h-px w-full bg-gray-200 border group-hover:bg-transparent border-t-0 border-b-0 border-gray-200 group-hover:border-wp-theme-500 transition duration-150"}),(0,Vn.jsxs)("div",{className:"bg-transparent text-left bg-white flex items-center justify-between p-4 border border-t-0 border-transparent group-hover:border-wp-theme-500 transition duration-150 cursor-pointer",role:"button",onClick:function(){return n(e)},children:[(0,Vn.jsxs)("div",{children:[(0,Vn.jsx)("h4",{className:"m-0 font-bold",children:e.fields.title}),(0,Vn.jsx)("p",{className:"m-0",children:null==e||null===(f=e.fields)||void 0===f||null===(d=f.tax_categories)||void 0===d?void 0:d.filter((function(e){return"default"!==e.toLowerCase()})).join(", ")})]}),(0,Vn.jsx)(Kn.Button,{isSecondary:!0,tabIndex:Object.keys(i).length?"-1":"0",className:"sm:opacity-0 group-hover:opacity-100 transition duration-150 focus:opacity-100",onClick:function(t){t.stopPropagation(),n(e)},children:(0,Un.__)("View","extendify-sdk")})]})]},e.id)}))}),x.getState().nextPage&&!!m.length&&m.length===t.length&&(0,Vn.jsxs)(Vn.Fragment,{children:[(0,Vn.jsx)("div",{className:"-translate-y-full flex flex-col h-80 items-end justify-end my-2 relative transform z-0 text",ref:y,style:{zIndex:-1}}),(0,Vn.jsx)("div",{className:"my-4",children:(0,Vn.jsx)(Kn.Spinner,{})})]})]}):(0,Vn.jsx)("div",{className:"flex items-center justify-center w-full sm:mt-64",children:(0,Vn.jsx)(Kn.Spinner,{})})}var Cr=function(){return T.get("plugins")},Er=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=new FormData;return t.append("plugins",JSON.stringify(e)),T.post("plugins",t,{headers:{"Content-Type":"multipart/form-data"}})},Pr=function(){return T.get("active-plugins")};function Ir(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)}function Nr(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Ir(i,r,o,a,u,"next",e)}function u(e){Ir(i,r,o,a,u,"throw",e)}a(void 0)}))}}function Tr(e){return _r.apply(this,arguments)}function _r(){return(_r=Nr(k().mark((function e(t){var n,r,o,i;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((r=(r=null!==(n=(0,qn.get)(t,"fields.required_plugins"))&&void 0!==n?n:[]).filter((function(e){return"editorplus"!==e}))).length){e.next=4;break}return e.abrupt("return",!1);case 4:return e.t0=Object,e.next=7,Cr();case 7:return e.t1=e.sent,o=e.t0.keys.call(e.t0,e.t1),i=!!r.length&&r.filter((function(e){return!o.some((function(t){return t.includes(e)}))})),e.abrupt("return",i.length);case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Rr(e){return Ar.apply(this,arguments)}function Ar(){return(Ar=Nr(k().mark((function e(t){var n,r,o,i;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((r=(r=null!==(n=(0,qn.get)(t,"fields.required_plugins"))&&void 0!==n?n:[]).filter((function(e){return"editorplus"!==e}))).length){e.next=4;break}return e.abrupt("return",!1);case 4:return e.t0=Object,e.next=7,Pr();case 7:if(e.t1=e.sent,o=e.t0.values.call(e.t0,e.t1),!(i=!!r.length&&r.filter((function(e){return!o.some((function(t){return t.includes(e)}))})))){e.next=15;break}return e.next=13,Tr(t);case 13:if(!e.sent){e.next=15;break}return e.abrupt("return",!1);case 15:return e.abrupt("return",i.length);case 16:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Lr=s(I((function(e){return{wantedTemplate:{},importOnLoad:!1,setWanted:function(t){return e({wantedTemplate:t})},removeWanted:function(){return e({wantedTemplate:{}})}}}),{name:"extendify-wanted-template"}));function Dr(e){var t=e.msg;return(0,Vn.jsxs)(Kn.Modal,{style:{maxWidth:"500px"},title:(0,Un.__)("Error installing plugins","extendify-sdk"),isDismissible:!1,children:[(0,Un.__)("You have encountered an error that we cannot recover from. Please try again.","extendify-sdk"),(0,Vn.jsx)("br",{}),(0,Vn.jsx)(Kn.Notice,{isDismissible:!1,status:"error",children:t}),(0,Vn.jsx)(Kn.Button,{isPrimary:!0,onClick:function(){return(0,r.render)((0,Vn.jsx)(Kr,{}),document.getElementById("extendify-root"))},children:(0,Un.__)("Go back","extendify-sdk")})]})}const Fr=wp.data;function Mr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Br(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Br(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Br(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ur(){var e=Mr((0,r.useState)(!1),2),t=e[0],n=e[1],o=function(){location.reload()};return(0,(0,Fr.select)("core/editor").isEditedPostDirty)()?(0,Vn.jsxs)(Kn.Modal,{title:(0,Un.__)("Reload required","extendify-sdk"),isDismissible:!1,children:[(0,Vn.jsx)("p",{style:{maxWidth:"400px"},children:(0,Un.__)("Just one more thing! We need to reload the page to continue.","extendify-sdk")}),(0,Vn.jsxs)(Kn.ButtonGroup,{children:[(0,Vn.jsx)(Kn.Button,{isPrimary:!0,onClick:o,disabled:t,children:(0,Un.__)("Reload page","extendify-sdk")}),(0,Vn.jsx)(Kn.Button,{isSecondary:!0,onClick:function(){n(!0),(0,Fr.dispatch)("core/editor").savePost(),n(!1)},isBusy:t,style:{margin:"0 4px"},children:(0,Un.__)("Save changes","extendify-sdk")})]})]}):(o(),null)}function Vr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Gr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Gr(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Gr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Hr(){var e,t=Vr((0,r.useState)(""),2),n=t[0],o=t[1],i=Lr((function(e){return e.wantedTemplate}));return Er(null==i||null===(e=i.fields)||void 0===e?void 0:e.required_plugins.filter((function(e){return"editorplus"!==e}))).then((function(){Lr.setState({importOnLoad:!0}),(0,r.render)((0,Vn.jsx)(Ur,{}),document.getElementById("extendify-root"))})).catch((function(e){var t=e.message;o(t)})),n?(0,Vn.jsx)(Dr,{msg:n}):(0,Vn.jsx)(Kn.Modal,{title:(0,Un.__)("Installing plugins","extendify-sdk"),isDismissible:!1,children:(0,Vn.jsx)(Kn.Button,{style:{width:"100%"},disabled:!0,isPrimary:!0,isBusy:!0,onClick:function(){},children:(0,Un.__)("Installing...","extendify-sdk")})})}var qr=function(e){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"broken-event",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"open";G.setState({entryPoint:e}),window.dispatchEvent(new CustomEvent("extendify-sdk::".concat(t,"-library"),{detail:e,bubbles:!0}))}(e,"open")};function Wr(e){switch(e){case"editorplus":return"Editor Plus";case"ml-slider":return"MetaSlider"}return e}function Kr(e){var t,n,o,i,a,u,s,c=Lr((function(e){return e.wantedTemplate})),l=function(){e.forceOpen||(0,r.render)((0,Vn.jsx)(Do,{show:!0}),document.getElementById("extendify-root"))},f=(null==c||null===(t=c.fields)||void 0===t?void 0:t.required_plugins)||[];return(0,Vn.jsxs)(Kn.Modal,{title:null!==(n=e.title)&&void 0!==n?n:(0,Un.__)("Install required plugins","extendify-sdk"),closeButtonLabel:(0,Un.__)("No thanks, take me back","extendify-sdk"),onRequestClose:l,children:[(0,Vn.jsx)("p",{style:{maxWidth:"400px"},children:null!==(o=e.message)&&void 0!==o?o:(0,Un.__)((0,Un.sprintf)("There is just one more step. This %s requires the following to be automatically installed and activated:",null!==(i=null==c||null===(a=c.fields)||void 0===a?void 0:a.type)&&void 0!==i?i:"template"),"extendify-sdk")}),(null===(u=e.message)||void 0===u?void 0:u.length)>0||(0,Vn.jsx)("ul",{children:f.filter((function(e){return"editorplus"!==e})).map((function(e){return(0,Vn.jsx)("li",{children:Wr(e)},e)}))}),(0,Vn.jsxs)(Kn.ButtonGroup,{children:[(0,Vn.jsx)(Kn.Button,{isPrimary:!0,onClick:function(){return(0,r.render)((0,Vn.jsx)(Hr,{}),document.getElementById("extendify-root"))},children:null!==(s=e.buttonLabel)&&void 0!==s?s:(0,Un.__)("Install Plugins","extendify-sdk")}),e.forceOpen||(0,Vn.jsx)(Kn.Button,{isTertiary:!0,onClick:l,style:{boxShadow:"none",margin:"0 4px"},children:(0,Un.__)("No thanks, take me back","extendify-sdk")})]})]})}function zr(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)}function $r(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){zr(i,r,o,a,u,"next",e)}function u(e){zr(i,r,o,a,u,"throw",e)}a(void 0)}))}}var Qr=function(){var e=$r(k().mark((function e(t){return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Tr(t);case 2:return e.t0=!e.sent,e.t1=function(){return $r(k().mark((function e(){return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})))()},e.t2=function(){return $r(k().mark((function e(){return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(){(0,r.render)((0,Vn.jsx)(Kr,{}),document.getElementById("extendify-root"))})));case 1:case"end":return e.stop()}}),e)})))()},e.abrupt("return",{id:"hasRequiredPlugins",pass:e.t0,allow:e.t1,deny:e.t2});case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();function Yr(e){var t=e.msg;return(0,Vn.jsxs)(Kn.Modal,{style:{maxWidth:"500px"},title:(0,Un.__)("Error Activating plugins","extendify-sdk"),isDismissible:!1,children:[(0,Un.__)("You have encountered an error that we cannot recover from. Please try again.","extendify-sdk"),(0,Vn.jsx)("br",{}),(0,Vn.jsx)(Kn.Notice,{isDismissible:!1,status:"error",children:t}),(0,Vn.jsx)(Kn.Button,{isPrimary:!0,onClick:function(){(0,r.render)((0,Vn.jsx)(no,{}),document.getElementById("extendify-root"))},children:(0,Un.__)("Go back","extendify-sdk")})]})}function Jr(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)}function Xr(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Jr(i,r,o,a,u,"next",e)}function u(e){Jr(i,r,o,a,u,"throw",e)}a(void 0)}))}}function Zr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return eo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return eo(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function eo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function to(){var e,t=Zr((0,r.useState)(""),2),n=t[0],o=t[1],i=Lr((function(e){return e.wantedTemplate}));return Er(null==i||null===(e=i.fields)||void 0===e?void 0:e.required_plugins.filter((function(e){return"editorplus"!==e}))).then((function(){Lr.setState({importOnLoad:!0})})).then(Xr(k().mark((function e(){return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,new Promise((function(e){return setTimeout(e,1e3)}));case 2:(0,r.render)((0,Vn.jsx)(Ur,{}),document.getElementById("extendify-root"));case 3:case"end":return e.stop()}}),e)})))).catch((function(e){var t=e.response;o(t.data.message)})),n?(0,Vn.jsx)(Yr,{msg:n}):(0,Vn.jsx)(Kn.Modal,{title:(0,Un.__)("Activating plugins","extendify-sdk"),isDismissible:!1,children:(0,Vn.jsx)(Kn.Button,{style:{width:"100%"},disabled:!0,isPrimary:!0,isBusy:!0,onClick:function(){},children:(0,Un.__)("Activating...","extendify-sdk")})})}function no(e){var t,n,o,i,a=Lr((function(e){return e.wantedTemplate})),u=function(){return(0,r.render)((0,Vn.jsx)(Do,{show:!0}),document.getElementById("extendify-root"))},s=(null==a||null===(t=a.fields)||void 0===t?void 0:t.required_plugins)||[];return(0,Vn.jsxs)(Kn.Modal,{title:(0,Un.__)("Activate required plugins","extendify-sdk"),closeButtonLabel:(0,Un.__)("No thanks, return to library","extendify-sdk"),onRequestClose:u,children:[(0,Vn.jsx)("p",{style:{maxWidth:"400px"},children:null!==(n=e.message)&&void 0!==n?n:(0,Un.__)((0,Un.sprintf)("There is just one more step. This %s requires the following plugins to be installed and activated:",null!==(o=null==a||null===(i=a.fields)||void 0===i?void 0:i.type)&&void 0!==o?o:"template"),"extendify-sdk")}),(0,Vn.jsx)("ul",{children:s.filter((function(e){return"editorplus"!==e})).map((function(e){return(0,Vn.jsx)("li",{children:Wr(e)},e)}))}),(0,Vn.jsxs)(Kn.ButtonGroup,{children:[(0,Vn.jsx)(Kn.Button,{isPrimary:!0,onClick:function(){return(0,r.render)((0,Vn.jsx)(to,{}),document.getElementById("extendify-root"))},children:(0,Un.__)("Activate Plugins","extendify-sdk")}),e.showClose&&(0,Vn.jsx)(Kn.Button,{isTertiary:!0,onClick:u,style:{boxShadow:"none",margin:"0 4px"},children:(0,Un.__)("No thanks, return to library","extendify-sdk")})]})]})}function ro(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)}function oo(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){ro(i,r,o,a,u,"next",e)}function u(e){ro(i,r,o,a,u,"throw",e)}a(void 0)}))}}var io=function(){var e=oo(k().mark((function e(t){return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Rr(t);case 2:return e.t0=!e.sent,e.t1=function(){return oo(k().mark((function e(){return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})))()},e.t2=function(){return oo(k().mark((function e(){return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(){(0,r.render)((0,Vn.jsx)(no,{showClose:!0}),document.getElementById("extendify-root"))})));case 1:case"end":return e.stop()}}),e)})))()},e.abrupt("return",{id:"hasPluginsActivated",pass:e.t0,allow:e.t1,deny:e.t2});case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();function ao(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return uo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return uo(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function uo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function so(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)}function co(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){so(i,r,o,a,u,"next",e)}function u(e){so(i,r,o,a,u,"throw",e)}a(void 0)}))}}function lo(e){return function(){return new fo(e.apply(this,arguments))}}function fo(e){var t,n;function r(t,n){try{var i=e[t](n),a=i.value,u=a instanceof po;Promise.resolve(u?a.wrapped:a).then((function(e){u?r("return"===t?"return":"next",e):o(i.done?"return":"normal",e)}),(function(e){r("throw",e)}))}catch(e){o("throw",e)}}function o(e,o){switch(e){case"return":t.resolve({value:o,done:!0});break;case"throw":t.reject(o);break;default:t.resolve({value:o,done:!1})}(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(e,o){return new Promise((function(i,a){var u={key:e,arg:o,resolve:i,reject:a,next:null};n?n=n.next=u:(t=n=u,r(e,o))}))},"function"!=typeof e.return&&(this.return=void 0)}function po(e){this.wrapped=e}fo.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},fo.prototype.next=function(e){return this._invoke("next",e)},fo.prototype.throw=function(e){return this._invoke("throw",e)},fo.prototype.return=function(e){return this._invoke("return",e)};function mo(){return(mo=co(k().mark((function e(t){var n;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=vo(t);case 1:return e.next=4,n.next();case 4:if(!e.sent.done){e.next=7;break}return e.abrupt("break",9);case 7:e.next=1;break;case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function vo(e){return ho.apply(this,arguments)}function ho(){return(ho=lo(k().mark((function e(t){var n,r,o;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=ao(t),e.prev=1,n.s();case 3:if((r=n.n()).done){e.next=9;break}return o=r.value,e.next=7,o();case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),n.e(e.t0);case 14:return e.prev=14,n.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,null,[[1,11,14,17]])})))).apply(this,arguments)}function yo(e,t){return(0,(0,Fr.dispatch)("core/block-editor").insertBlocks)(e).then((function(){window.dispatchEvent(new CustomEvent("extendify-sdk::template-inserted",{detail:{template:t},bubbles:!0}))}))}function bo(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return xo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return xo(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function xo(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 go=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return{hasRequiredPlugins:Qr,hasPluginsActivated:io,stack:[],check:function(t){var n=this;return co(k().mark((function r(){var o,i,a;return k().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:o=ao(e),r.prev=1,a=k().mark((function e(){var r,o;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=i.value,e.next=3,n["".concat(r)](t);case 3:o=e.sent,setTimeout((function(){n.stack.push(o.pass?o.allow:o.deny)}),0);case 5:case"end":return e.stop()}}),e)})),o.s();case 4:if((i=o.n()).done){r.next=8;break}return r.delegateYield(a(),"t0",6);case 6:r.next=4;break;case 8:r.next=13;break;case 10:r.prev=10,r.t1=r.catch(1),o.e(r.t1);case 13:return r.prev=13,o.f(),r.finish(13);case 16:case"end":return r.stop()}}),r,null,[[1,10,13,16]])})))()},reset:function(){this.stack=[]}}}(["hasRequiredPlugins","hasPluginsActivated"]);function wo(e){var t=e.template,n=x((function(e){return e.activeTemplateBlocks})),o=G((function(e){return e.canImport})),i=G((function(e){return e.apiKey})),a=g((function(e){return e.setOpen})),u=bo((0,r.useState)(!1),2),s=u[0],c=u[1],l=bo((0,r.useState)(!1),2),f=l[0],d=l[1],p=Lr((function(e){return e.setWanted})),m=function(){(function(e){return mo.apply(this,arguments)})(go.stack).then((function(){setTimeout((function(){yo(n,t).then((function(){return a(!1)}))}),100)}))};(0,r.useEffect)((function(){return go.check(t).then((function(){return d(!0)})),function(){return go.reset()&&d(!1)}}),[t]),(0,r.useEffect)((function(){s&&sr(t)}),[s,t]);return f&&Object.keys(n).length?i||o()?s?(0,Vn.jsx)("button",{type:"button",disabled:!0,className:"components-button is-secondary text-lg sm:text-2xl h-auto py-1.5 px-3 sm:py-2.5 sm:px-5",onClick:function(){},children:(0,Un.__)("Importing...","extendify-sdk")}):(0,Vn.jsx)("button",{type:"button",className:"components-button is-primary text-lg sm:text-2xl h-auto py-1.5 px-3 sm:py-2.5 sm:px-5",onClick:function(){return c(!0),p(t),void m()},children:(0,Un.sprintf)((0,Un.__)("Add %s","extendify-sdk"),t.fields.type)}):(0,Vn.jsx)("a",{className:"button-extendify-main text-lg sm:text-2xl py-1.5 px-3 sm:py-2.5 sm:px-5",target:"_blank",href:"https://extendify.com",rel:"noreferrer",children:(0,Un.__)("Sign up now","extendify-sdk")}):""}function ko(e){var t,n,o,i,a,u,s,c=e.template,l=c.fields.tax_categories,f=G((function(e){return e.apiKey}));return(0,r.useEffect)((function(){cr(c)}),[c]),(0,Vn.jsxs)("div",{className:"flex flex-col min-h-screen bg-white sm:min-h-0 items-start overflow-y-auto h-full sm:pr-8 lg:pl-px lg:-ml-px",children:[(0,Vn.jsxs)("div",{className:"flex flex-col lg:flex-row items-start justify-start lg:items-center lg:justify-between w-full max-w-screen-xl",children:[(0,Vn.jsxs)("div",{className:"text-left m-0 sm:mb-6 p-6 sm:p-0",children:[(0,Vn.jsx)("h1",{className:"leading-tight text-left mb-2.5 sm:text-3xl font-normal",children:c.fields.title}),(0,Vn.jsx)(Kn.ExternalLink,{href:c.fields.url,children:(0,Un.__)("Demo","extendify-sdk")})]}),(0,Vn.jsx)("div",{className:$n()({"inline-flex absolute sm:static sm:top-auto right-0 m-6 sm:m-0 sm:my-6 space-x-3":!0,"top-16 mt-5":!f.length,"top-0":f.length>0}),children:(0,Vn.jsx)(wo,{template:c})})]}),(0,Vn.jsx)("div",{className:"max-w-screen-xl sm:w-full sm:m-0 sm:mb-12 m-6 border border-gray-300 m-46",children:(0,Vn.jsx)("img",{className:"max-w-full w-full",src:null!==(t=null==c||null===(n=c.fields)||void 0===n||null===(o=n.screenshot[0])||void 0===o||null===(i=o.thumbnails)||void 0===i||null===(a=i.full)||void 0===a?void 0:a.url)&&void 0!==t?t:null==c||null===(u=c.fields)||void 0===u||null===(s=u.screenshot[0])||void 0===s?void 0:s.url})}),(0,Vn.jsxs)("div",{className:"text-xs text-left p-6 w-full block sm:hidden",children:[(0,Vn.jsx)("h3",{className:"m-0 mb-6",children:(0,Un.__)("Categories","extendify-sdk")}),(0,Vn.jsx)("ul",{className:"text-sm",children:l.map((function(e){return(0,Vn.jsx)("li",{className:"inline-block mr-2 px-4 py-2 bg-gray-100",children:e},e)}))})]})]})}function So(){return 0===G((function(e){return e.apiKey})).length?(0,Vn.jsx)("button",{className:"components-button",onClick:function(){return g.setState({currentPage:"login"})},children:(0,Un.__)("Log into account","extendify-sdk")}):(0,Vn.jsx)("button",{className:"components-button",onClick:function(){return G.setState({apiKey:""})},children:(0,Un.__)("Log out","extendify-sdk")})}function jo(e){var t=e.children;return(0,Vn.jsxs)(Vn.Fragment,{children:[(0,Vn.jsxs)("aside",{className:"flex-shrink-0 sm:pl-12 py-0 sm:py-6 relative",children:[(0,Vn.jsx)("div",{className:"sm:w-56 lg:w-72 sticky flex flex-col h-full",children:t[0]}),(0,Vn.jsxs)("div",{className:"hidden sm:flex flex-col absolute bottom-0 bg-white p-4 w-72 text-left space-y-4",children:[(0,Vn.jsx)("div",{children:(0,Vn.jsx)(Kn.Button,{isSecondary:!0,target:"_blank",href:"https://extendify.com/feedback",children:(0,Un.__)("Send us your feedback","extendify-sdk")})}),(0,Vn.jsx)("div",{className:"border-t border-gray-300",children:(0,Vn.jsx)(So,{})})]})]}),(0,Vn.jsx)("main",{id:"extendify-templates",tabIndex:"0",className:"w-full smp:l-12 sm:pt-6 h-full",children:t[1]})]})}function Oo(){var e=x((function(e){return e.updateSearchParams})),t=x((function(e){return e.searchParams})),n=function(t){return e({type:t})};return(0,Vn.jsxs)("div",{className:"text-left w-full bg-white px-6 sm:px-0 pb-4 sm:pb-6 mt-px border-b sm:border-0",children:[(0,Vn.jsx)("h4",{className:"sr-only",children:(0,Un.__)("Type select","extendify-sdk")}),(0,Vn.jsxs)("button",{type:"button",className:$n()({"cursor-pointer p-3.5 space-x-2 inline-flex items-center border border-black button-focus":!0,"bg-gray-900 text-white":"pattern"===t.type,"bg-transparent text-black":"pattern"!==t.type}),onClick:function(){return n("pattern")},children:[(0,Vn.jsx)("svg",{width:"17",height:"13",viewBox:"0 0 17 13",className:"fill-current",xmlns:"http://www.w3.org/2000/svg",children:(0,Vn.jsx)("path",{d:"M1 13H16C16.55 13 17 12.55 17 12V8C17 7.45 16.55 7 16 7H1C0.45 7 0 7.45 0 8V12C0 12.55 0.45 13 1 13ZM0 1V5C0 5.55 0.45 6 1 6H16C16.55 6 17 5.55 17 5V1C17 0.45 16.55 0 16 0H1C0.45 0 0 0.45 0 1Z"})}),(0,Vn.jsx)("span",{className:"",children:(0,Un.__)("Patterns","extendify-sdk")})]}),(0,Vn.jsxs)("button",{type:"button",className:$n()({"cursor-pointer p-3.5 px-4 space-x-2 inline-flex items-center border border-black focus:ring-2 focus:ring-wp-theme-500 ring-offset-1 outline-none -ml-px":!0,"bg-gray-900 text-white":"template"===t.type,"bg-transparent text-black":"template"!==t.type}),onClick:function(){return n("template")},children:[(0,Vn.jsx)("svg",{width:"17",height:"13",viewBox:"0 0 17 13",className:"fill-current",xmlns:"http://www.w3.org/2000/svg",children:(0,Vn.jsx)("path",{d:"M7 13H10C10.55 13 11 12.55 11 12V8C11 7.45 10.55 7 10 7H7C6.45 7 6 7.45 6 8V12C6 12.55 6.45 13 7 13ZM1 13H4C4.55 13 5 12.55 5 12V1C5 0.45 4.55 0 4 0H1C0.45 0 0 0.45 0 1V12C0 12.55 0.45 13 1 13ZM13 13H16C16.55 13 17 12.55 17 12V8C17 7.45 16.55 7 16 7H13C12.45 7 12 7.45 12 8V12C12 12.55 12.45 13 13 13ZM6 1V5C6 5.55 6.45 6 7 6H16C16.55 6 17 5.55 17 5V1C17 0.45 16.55 0 16 0H7C6.45 0 6 0.45 6 1Z"})}),(0,Vn.jsx)("span",{className:"",children:(0,Un.__)("Page templates","extendify-sdk")})]})]})}function Co(e){var t=e.template,n=x((function(e){return e.setActive})),o=(0,r.useRef)(null),i=t.fields,a=i.tax_categories,u=i.required_plugins,s=G((function(e){return e.apiKey}));return(0,r.useEffect)((function(){o.current.focus()}),[]),(0,Vn.jsxs)("div",{className:"flex flex-col items-start justify-start",children:[!s.length&&(0,Vn.jsxs)("div",{className:"h-full flex sm:hidden w-full p-4 justify-between border items-center border-gray-300 bg-extendify-lightest",children:[(0,Vn.jsx)("a",{className:"button-extendify-main",target:"_blank",href:"https://extendify.com",rel:"noreferrer",children:(0,Un.__)("Sign up today to get unlimited access","extendify-sdk")}),(0,Vn.jsx)("button",{className:"components-button",onClick:function(){return g.setState({currentPage:"login"})},children:(0,Un.__)("Log in","extendify-sdk")})]}),(0,Vn.jsx)("div",{className:"p-6 sm:p-0",children:(0,Vn.jsxs)("button",{ref:o,type:"button",className:"cursor-pointer text-black bg-transparent font-medium flex items-center p-3 transform -translate-x-3 button-focus",onClick:function(){return n({})},children:[(0,Vn.jsx)("svg",{className:"fill-current",width:"8",height:"12",viewBox:"0 0 8 12",xmlns:"http://www.w3.org/2000/svg",children:(0,Vn.jsx)("path",{d:"M6.70998 9.88047L2.82998 6.00047L6.70998 2.12047C7.09998 1.73047 7.09998 1.10047 6.70998 0.710469C6.31998 0.320469 5.68998 0.320469 5.29998 0.710469L0.70998 5.30047C0.31998 5.69047 0.31998 6.32047 0.70998 6.71047L5.29998 11.3005C5.68998 11.6905 6.31998 11.6905 6.70998 11.3005C7.08998 10.9105 7.09998 10.2705 6.70998 9.88047Z"})}),(0,Vn.jsx)("span",{className:"ml-4",children:(0,Un.__)("Go back","extendify-sdk")})]})}),(0,Vn.jsxs)("div",{className:"text-left pt-14 divide-y w-full hidden sm:block",children:[(0,Vn.jsxs)("div",{className:"w-full py-6",children:[(0,Vn.jsx)("h3",{className:"m-0 mb-6",children:(0,Un.__)("Categories","extendify-sdk")}),(0,Vn.jsx)("ul",{className:"text-sm m-0",children:a.map((function(e){return(0,Vn.jsx)("li",{className:"inline-block mr-2 px-4 py-2 bg-gray-100",children:e},e)}))})]}),u.filter((function(e){return"editorplus"!==e})).length>0&&(0,Vn.jsxs)("div",{className:"pt-4 w-full",children:[(0,Vn.jsx)("h3",{className:"m-0 mb-6",children:(0,Un.__)("Required Plugins","extendify-sdk")}),(0,Vn.jsx)("ul",{className:"text-sm",children:u.filter((function(e){return"editorplus"!==e})).map((function(e){return(0,Vn.jsx)("li",{className:"inline-block mr-2 px-4 py-2 bg-extendify-light",children:Wr(e)},e)}))})]}),(0,Vn.jsx)("div",{className:"py-6",children:(0,Vn.jsx)("a",{href:"https://extendify.com/what-happens-when-a-template-is-added",rel:"noreferrer",target:"_blank",children:(0,Un.__)("What happens when a template is added?","extendify-sdk")})})]})]})}function Eo(){var e=x((function(e){return e.searchParams}));return(0,Vn.jsx)("div",{className:"hidden sm:flex items-start flex-col lg:flex-row -mt-2 lg:-mx-2 mb-4 lg:divide-x-2 lg:leading-none",children:Object.entries(e.taxonomies).map((function(t){return"template"===e.type&&"tax_pattern_types"===t[0]||"pattern"===e.type&&"tax_page_types"===t[0]?"":(0,Vn.jsxs)("div",{className:"lg:px-2 text-left",children:[(0,Vn.jsx)("span",{className:"font-bold",children:(n=t[0],n.replace("tax_","").replace("_"," ").replace(/\b\w/g,(function(e){return e.toUpperCase()})))}),": ",(0,Vn.jsx)("span",{children:t[1]?t[1]:"All"})]},t[0]);var n}))})}function Po(e){var t=e.className,n=e.initialFocus,r=x((function(e){return e.templates})),o=x((function(e){return e.activeTemplate}));return(0,Vn.jsxs)("div",{className:t,children:[(0,Vn.jsx)("a",{href:"#extendify-templates",className:"sr-only focus:not-sr-only focus:text-blue-500",children:(0,Un.__)("Skip to content","extendify-sdk")}),(0,Vn.jsxs)("div",{className:"sm:flex sm:space-x-12 relative bg-white mx-auto max-w-screen-4xl h-full",children:[!!Object.keys(o).length&&(0,Vn.jsx)("div",{className:"absolute bg-white sm:flex inset-0 z-50 sm:space-x-12",children:(0,Vn.jsxs)(jo,{children:[(0,Vn.jsx)(Co,{template:o}),(0,Vn.jsx)(ko,{template:o})]})}),(0,Vn.jsxs)(jo,{children:[(0,Vn.jsx)(rr,{initialFocus:n}),(0,Vn.jsxs)(Vn.Fragment,{children:[(0,Vn.jsx)(Oo,{}),(0,Vn.jsx)(Eo,{}),(0,Vn.jsx)("div",{className:"relative h-full z-30 bg-white",children:(0,Vn.jsx)("div",{className:"absolute z-20 inset-0 lg:static h-screen lg:h-full overflow-y-auto pt-4 sm:pt-0 px-6 sm:pl-0 sm:pr-8",children:(0,Vn.jsx)(Or,{templates:r})})})]})]})]})]})}function Io(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)}function No(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return To(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return To(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function To(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _o(){var e=No((0,r.useState)(G.getState().apiKey),2),t=e[0],n=e[1],o=No((0,r.useState)(G.getState().email),2),i=o[0],a=o[1],u=No((0,r.useState)(""),2),s=u[0],c=u[1],l=No((0,r.useState)("info"),2),f=l[0],d=l[1],p=No((0,r.useState)(""),2),m=p[0],v=p[1];(0,r.useEffect)((function(){return function(){return d("info")}}),[]);var h=function(){var e,n=(e=k().mark((function e(n){var r,o,a,u,s,l;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n.preventDefault(),c(""),r=i.length?i:m,e.next=5,L(r,t);case 5:if(o=e.sent,a=o.token,u=o.error,s=o.exception,void 0===(l=o.message)){e.next=13;break}return d("error"),e.abrupt("return",c(l.length?l:"Error: Are you interacting with the wrong server?"));case 13:if(!u&&!s){e.next=16;break}return d("error"),e.abrupt("return",c(u.length?u:s));case 16:if(a&&"string"==typeof a){e.next=19;break}return d("error"),e.abrupt("return",c((0,Un.__)("Something went wrong","extendify-sdk")));case 19:return d("success"),c("Success!"),e.next=23,new Promise((function(e){return setTimeout(e,1500)}));case 23:G.setState({apiKey:a}),g.setState({currentPage:"content"});case 25:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Io(i,r,o,a,u,"next",e)}function u(e){Io(i,r,o,a,u,"throw",e)}a(void 0)}))});return function(e){return n.apply(this,arguments)}}();return(0,r.useEffect)((function(){i||A("user_email").then((function(e){return v(e)}))}),[i]),(0,Vn.jsxs)("section",{className:"w-96 text-left md:-mt-32",children:[(0,Vn.jsx)("h1",{className:"border-b border-gray-900 mb-12 pb-4",children:(0,Un.__)("Welcome","extendify-sdk")}),s&&(0,Vn.jsx)("div",{className:$n()({"border-b pb-6 mb-6 -mt-6":!0,"border-gray-900 text-gray-900":"info"===f,"border-wp-alert-red text-wp-alert-red":"error"===f,"border-extendify-main text-extendify-main":"success"===f}),children:s}),(0,Vn.jsxs)("form",{onSubmit:h,className:" space-y-6",children:[(0,Vn.jsxs)("div",{className:"flex items-center",children:[(0,Vn.jsx)("label",{htmlFor:"extendifysdk-login-email",className:"w-32 font-bold",children:(0,Un.__)("Email:","extendify-sdk")}),(0,Vn.jsx)("input",{id:"extendifysdk-login-email",name:"extendifysdk-login-email",type:"email",className:"border px-2 w-full",placeholder:"Email",value:i.length?i:m,onChange:function(e){return a(e.target.value)}})]}),(0,Vn.jsxs)("div",{className:"flex items-center",children:[(0,Vn.jsx)("label",{htmlFor:"extendifysdk-login-license",className:"w-32 font-bold",children:(0,Un.__)("License:","extendify-sdk")}),(0,Vn.jsx)("input",{id:"extendifysdk-login-license",name:"extendifysdk-login-email",type:"text",className:"border px-2 w-full",placeholder:"License key",value:t,onChange:function(e){return n(e.target.value)}})]}),(0,Vn.jsx)("div",{className:"flex justify-end",children:(0,Vn.jsx)("button",{type:"submit",className:"button-extendify-main p-3 px-4",children:(0,Un.__)("Sign in","extendify-sdk")})})]})]})}function Ro(e){var t=e.className;return(0,Vn.jsxs)("div",{className:t,children:[(0,Vn.jsx)("a",{href:"#extendify-templates",className:"sr-only focus:not-sr-only focus:text-blue-500",children:(0,Un.__)("Skip to content","extendify-sdk")}),(0,Vn.jsx)("div",{className:"flex sm:space-x-12 relative mx-auto max-w-screen-4xl h-full",children:(0,Vn.jsxs)("div",{className:"absolute flex inset-0 items-center justify-center z-20 sm:space-x-12",children:[(0,Vn.jsx)("div",{className:"pl-12 py-6 absolute top-0 left-0",children:(0,Vn.jsxs)("button",{type:"button",className:"cursor-pointer text-black bg-transparent font-medium flex items-center p-3 transform -translate-x-3 button-focus",onClick:function(){return g.setState({currentPage:"content"})},children:[(0,Vn.jsx)("svg",{className:"fill-current",width:"8",height:"12",viewBox:"0 0 8 12",xmlns:"http://www.w3.org/2000/svg",children:(0,Vn.jsx)("path",{d:"M6.70998 9.88047L2.82998 6.00047L6.70998 2.12047C7.09998 1.73047 7.09998 1.10047 6.70998 0.710469C6.31998 0.320469 5.68998 0.320469 5.29998 0.710469L0.70998 5.30047C0.31998 5.69047 0.31998 6.32047 0.70998 6.71047L5.29998 11.3005C5.68998 11.6905 6.31998 11.6905 6.70998 11.3005C7.08998 10.9105 7.09998 10.2705 6.70998 9.88047Z"})}),(0,Vn.jsx)("span",{className:"ml-4",children:(0,Un.__)("Go back","extendify-sdk")})]})}),(0,Vn.jsx)("div",{className:"flex justify-center",children:(0,Vn.jsx)(_o,{})})]})})]})}function Ao(e){var t=e.show,n=function(){var e=document.getElementById("beacon-container");e&&(e.style.position="relative",e.style.zIndex=Number.MAX_SAFE_INTEGER,e.style.display="block")},o=function(){var e=document.getElementById("beacon-container");e&&(e.style.display="none",window.Beacon("close"))};return(0,r.useEffect)((function(){if(t)return window.Beacon?(n(),function(){return o()}):(function(e,t,n){function r(){var e,n=t.getElementsByTagName("script")[0],r=t.createElement("script");r.async=!0,r.src="https://beacon-v2.helpscout.net",null===(e=n.parentNode)||void 0===e||e.insertBefore(r,n)}if(e.Beacon=n=function(t,n,r){e.Beacon.readyQueue.push({method:t,options:n,data:r})},n.readyQueue=[],"complete"===t.readyState)return r();e.attachEvent?e.attachEvent("onload",r):e.addEventListener("load",r,!1)}(window,document,window.Beacon||function(){}),window.Beacon("init","2b8c11c0-5afc-4cb9-bee0-a5cb76b2fc91"),window.Beacon("on","ready",n),function(){window.Beacon("off","ready",n),o()})}),[t]),(0,Vn.jsx)(Vn.Fragment,{})}function Lo(){var e=(0,r.useRef)(null),t=g((function(e){return e.open})),n=g((function(e){return e.setOpen})),o=g((function(e){return e.currentPage}));return(0,Vn.jsx)(Bn.Root,{show:t,as:r.Fragment,children:(0,Vn.jsx)(ot,{as:"div",static:!0,className:"extendify-sdk",initialFocus:e,onClose:function(){},children:(0,Vn.jsx)("div",{className:"h-screen w-screen sm:h-auto sm:w-auto fixed z-high inset-0 overflow-y-auto",children:(0,Vn.jsxs)("div",{className:"flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0",children:[(0,Vn.jsx)(Bn.Child,{as:r.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",children:(0,Vn.jsx)(ot.Overlay,{className:"fixed inset-0 bg-black bg-opacity-30 transition-opacity"})}),(0,Vn.jsx)(Bn.Child,{as:r.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 translate-y-4 sm:translate-y-5",enterTo:"opacity-100 translate-y-0",children:(0,Vn.jsxs)("div",{className:"fixed lg:absolute inset-0 lg:overflow-hidden transform transition-all lg:pt-5 lg:p-10",children:[(0,Vn.jsxs)("div",{className:"bg-white h-full flex flex-col items-center relative shadow-xl max-w-screen-4xl mx-auto",children:[(0,Vn.jsx)(Gn,{className:"w-full h-16 border-solid border-0 border-b border-gray-300 flex-shrink-0",initialFocus:e,hideLibrary:function(){return n(!1)}}),"content"===o&&(0,Vn.jsx)(Po,{className:"w-full flex-grow overflow-hidden"}),"login"===o&&(0,Vn.jsx)(Ro,{className:"w-full flex-grow overflow-hidden bg-extendify-light"})]}),(0,Vn.jsx)(Ao,{show:t})]})})]})})})})}function Do(e){var t=e.show,n=void 0!==t&&t,o=g((function(e){return e.setOpen})),i=(0,r.useCallback)((function(){return o(!0)}),[o]),a=(0,r.useCallback)((function(){o(!1)}),[o]);return(0,r.useEffect)((function(){n&&o(!0)}),[n,o]),(0,r.useEffect)((function(){return window.localStorage.getItem("etfy_library__key")&&G.setState({apiKey:"any-key-will-work-during-beta"}),function(){return window.localStorage.removeItem("etfy_library__key")}}),[]),(0,r.useEffect)((function(){return window.addEventListener("extendify-sdk::open-library",i),window.addEventListener("extendify-sdk::close-library",a),function(){window.removeEventListener("extendify-sdk::open-library",i),window.removeEventListener("extendify-sdk::close-library",a)}}),[a,i]),(0,Vn.jsx)(Lo,{})}const Fo=wp.plugins,Mo=wp.editPost;function Bo(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)}function Uo(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Bo(i,r,o,a,u,"next",e)}function u(e){Bo(i,r,o,a,u,"throw",e)}a(void 0)}))}}var Vo=function(e){var t,n;qr(null===(t=e.target.closest("[data-extendify-identifier]"))||void 0===t||null===(n=t.dataset)||void 0===n?void 0:n.extendifyIdentifier)},Go=function(){var e,t,n;return null===window.extendifySdkData.user||(null===(e=window.extendifySdkData)||void 0===e||null===(t=e.user)||void 0===t||null===(n=t.state)||void 0===n?void 0:n.enabled)},Ho=(0,Vn.jsx)("div",{id:"extendify-templates-inserter",children:(0,Vn.jsxs)("button",{style:"background:#D9F1EE;color:#1e1e1e;border:1px solid #949494;font-weight:bold;font-size:14px;padding:8px;margin-right:8px",type:"button","data-extendify-identifier":"main-button",id:"extendify-templates-inserter-btn",className:"components-button",children:[(0,Vn.jsxs)("svg",{style:"margin-right:0.5rem",width:"20",height:"20",viewBox:"0 0 103 103",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Vn.jsx)("rect",{y:"25.75",width:"70.8125",height:"77.25",fill:"#000000"}),(0,Vn.jsx)("rect",{x:"45.0625",width:"57.9375",height:"57.9375",fill:"#37C2A2"})]}),(0,Un.__)("Library","extendify-sdk")]})});window._wpLoadBlockEditor&&window.wp.data.subscribe((function(){setTimeout((function(){Go()&&(document.getElementById("extendify-templates-inserter-btn")||document.querySelector(".edit-post-header-toolbar")&&(document.querySelector(".edit-post-header-toolbar").insertAdjacentHTML("beforeend",(0,r.renderToString)(Ho)),document.getElementById("extendify-templates-inserter-btn").addEventListener("click",Vo)))}),0)})),window._wpLoadBlockEditor&&window.wp.data.subscribe((function(){setTimeout((function(){if(Go()&&document.querySelector("[id$=patterns-view]")&&!document.getElementById("extendify-cta-button")){var e=(0,Vn.jsx)("div",{children:(0,Vn.jsx)("button",{id:"extendify-cta-button",style:"margin:1rem 1rem 0","data-extendify-identifier":"patterns-cta",className:"components-button is-secondary",children:(0,Un.__)("Discover more patterns in Extendify Library","extendify-sdk")})});document.querySelector("[id$=patterns-view]").insertAdjacentHTML("afterbegin",(0,r.renderToString)(e)),document.getElementById("extendify-cta-button").addEventListener("click",Vo)}}),0)}));window._wpLoadBlockEditor&&Go()&&(0,Fo.registerPlugin)("extendify-temps-more-menu-trigger",{render:function(){return(0,Vn.jsx)(Mo.PluginSidebarMoreMenuItem,{"data-extendify-identifier":"sidebar-button",onClick:Vo,icon:(0,Vn.jsx)("span",{className:"components-menu-items__item-icon",children:(0,Vn.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 103 103",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Vn.jsx)("rect",{y:"25.75",width:"70.8125",height:"77.25",fill:"#000000"}),(0,Vn.jsx)("rect",{x:"45.0625",width:"57.9375",height:"57.9375",fill:"#37C2A2"})]})}),children:(0,Un.__)("Library","extendify-sdk")})}});window._wpLoadBlockEditor&&(0,Fo.registerPlugin)("extendify-settings-enable-disable",{render:function(){return(0,Vn.jsx)(Mo.PluginSidebarMoreMenuItem,{onClick:Uo(k().mark((function e(){var t;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,R();case 2:return t=e.sent,(t=JSON.parse(t)).state.enabled=!Go(),e.next=7,D(JSON.stringify(Object.assign({},t)));case 7:location.reload();case 8:case"end":return e.stop()}}),e)}))),icon:(0,Vn.jsx)(Vn.Fragment,{}),children:Go()?(0,Un.__)("Disable Extendify","extendify-sdk"):(0,Un.__)("Enable Extendify","extendify-sdk")})}}),[{register:function(){var e=(0,Fr.dispatch)("core/notices").createNotice,t=G.getState().incrementImports;window.addEventListener("extendify-sdk::template-inserted",(function(n){e("info",(0,Un.__)("Template Added"),{isDismissible:!0,type:"snackbar"}),setTimeout((function(){var e;t(),lr(null===(e=n.detail)||void 0===e?void 0:e.template)}),0)}))}},{register:function(){var e=this;window.addEventListener("extendify-sdk::softerror-encountered",(function(t){e[(0,qn.camelCase)(t.detail.type)](t.detail)}))},versionOutdated:function(e){(0,r.render)((0,Vn.jsx)(Kr,{title:e.data.title,message:e.data.message,buttonLabel:e.data.buttonLabel,forceOpen:!0}),document.getElementById("extendify-root"))}}].forEach((function(e){return e.register()})),window._wpLoadBlockEditor&&window.wp.domReady((function(){var e=document.createElement("div");if(e.id="extendify-root",document.body.append(e),(0,r.render)((0,Vn.jsx)(Do,{}),e),Lr.getState().importOnLoad){var t=Lr.getState().wantedTemplate;setTimeout((function(){!function(e){if(!e)throw Error("Template not found");yo(p((0,window.wp.blocks.parse)((0,qn.get)(e,"fields.code"))),e)}(t)}),0)}Lr.setState({importOnLoad:!1,wantedTemplate:{}})}))},42:(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 i=typeof n;if("string"===i||"number"===i)e.push(n);else if(Array.isArray(n)){if(n.length){var a=o.apply(null,n);a&&e.push(a)}}else if("object"===i)if(n.toString===Object.prototype.toString)for(var u in n)r.call(n,u)&&n[u]&&e.push(u);else e.push(n.toString())}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},716:()=>{},525:e=>{"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,i){for(var a,u,s=o(e),c=1;c<arguments.length;c++){for(var l in a=Object(arguments[c]))n.call(a,l)&&(s[l]=a[l]);if(t){u=t(a);for(var f=0;f<u.length;f++)r.call(a,u[f])&&(s[u[f]]=a[u[f]])}}return s}},61:e=>{var t,n,r=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{n="function"==typeof clearTimeout?clearTimeout:i}catch(e){n=i}}();var u,s=[],c=!1,l=-1;function f(){c&&u&&(c=!1,u.length?s=u.concat(s):l=-1,s.length&&d())}function d(){if(!c){var e=a(f);c=!0;for(var t=s.length;t;){for(u=s,s=[];++l<t;)u&&u[l].run();l=-1,t=s.length}u=null,c=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===i||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function m(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];s.push(new p(e,t)),1!==s.length||c||a(d)},p.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=m,r.addListener=m,r.once=m,r.off=m,r.removeListener=m,r.removeAllListeners=m,r.emit=m,r.prependListener=m,r.prependOnceListener=m,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},426:(e,t,n)=>{"use strict";n(525);var r=n(804),o=60103;if(t.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var i=Symbol.for;o=i("react.element"),t.Fragment=i("react.fragment")}var a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u=Object.prototype.hasOwnProperty,s={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,i={},c=null,l=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(l=t.ref),t)u.call(t,r)&&!s.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:o,type:e,key:c,ref:l,props:i,_owner:a.current}}t.jsx=c,t.jsxs=c},246:(e,t,n)=>{"use strict";e.exports=n(426)},248:e=>{var t=function(e){"use strict";var t,n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function c(e,t,n,r){var o=t&&t.prototype instanceof h?t:h,i=Object.create(o.prototype),a=new P(r||[]);return i._invoke=function(e,t,n){var r=f;return function(o,i){if(r===p)throw new Error("Generator is already running");if(r===m){if("throw"===o)throw i;return N()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var u=O(a,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=p;var s=l(e,t,n);if("normal"===s.type){if(r=n.done?m:d,s.arg===v)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r=m,n.method="throw",n.arg=s.arg)}}}(e,n,a),i}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var f="suspendedStart",d="suspendedYield",p="executing",m="completed",v={};function h(){}function y(){}function b(){}var x={};x[i]=function(){return this};var g=Object.getPrototypeOf,w=g&&g(g(I([])));w&&w!==n&&r.call(w,i)&&(x=w);var k=b.prototype=h.prototype=Object.create(x);function S(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function n(o,i,a,u){var s=l(e[o],e,i);if("throw"!==s.type){var c=s.arg,f=c.value;return f&&"object"==typeof f&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,a,u)}),(function(e){n("throw",e,a,u)})):t.resolve(f).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,u)}))}u(s.arg)}var o;this._invoke=function(e,r){function i(){return new t((function(t,o){n(e,r,t,o)}))}return o=o?o.then(i,i):i()}}function O(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,O(e,n),"throw"===n.method))return v;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var o=l(r,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var i=o.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,v):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(e){if(e){var n=e[i];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return a.next=a}}return{next:N}}function N(){return{value:t,done:!0}}return y.prototype=k.constructor=b,b.constructor=y,y.displayName=s(b,u,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,s(e,u,"GeneratorFunction")),e.prototype=Object.create(k),e},e.awrap=function(e){return{__await:e}},S(j.prototype),j.prototype[a]=function(){return this},e.AsyncIterator=j,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new j(c(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},S(k),s(k,u,"Generator"),k[i]=function(){return this},k.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=I,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(E),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return u.type="throw",u.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),E(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;E(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:I(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),v}},e}(e.exports);try{regeneratorRuntime=t}catch(e){Function("r","regeneratorRuntime = r")(t)}},804:e=>{"use strict";e.exports=React}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,r),i.exports}r.m=t,e=[],r.O=(t,n,o,i)=>{if(!n){var a=1/0;for(c=0;c<e.length;c++){for(var[n,o,i]=e[c],u=!0,s=0;s<n.length;s++)(!1&i||a>=i)&&Object.keys(r.O).every((e=>r.O[e](n[s])))?n.splice(s--,1):(u=!1,i<a&&(a=i));u&&(e.splice(c--,1),t=o())}return t}i=i||0;for(var c=e.length;c>0&&e[c-1][2]>i;c--)e[c]=e[c-1];e[c]=[n,o,i]},r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={172:0,106:0};r.O.j=t=>0===e[t];var t=(t,n)=>{var o,i,[a,u,s]=n,c=0;for(o in u)r.o(u,o)&&(r.m[o]=u[o]);if(s)var l=s(r);for(t&&t(n);c<a.length;c++)i=a[c],r.o(e,i)&&e[i]&&e[i][0](),e[a[c]]=0;return r.O(l)},n=self.webpackChunk=self.webpackChunk||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})(),r.O(void 0,[106],(()=>r(589)));var o=r.O(void 0,[106],(()=>r(716)));o=r.O(o)})();
extendify-sdk/readme.txt CHANGED
@@ -1,5 +1,5 @@
1
  === Extendify Sdk ===
2
  Requires at least: 5.4
3
- Stable tag: 3.6
4
  Requires PHP: 5.6
5
  Tested up to: 5.7.0
1
  === Extendify Sdk ===
2
  Requires at least: 5.4
3
+ Stable tag: 4.1
4
  Requires PHP: 5.6
5
  Tested up to: 5.7.0
extendify-sdk/src/buttons.js CHANGED
@@ -2,13 +2,16 @@ import { __ } from '@wordpress/i18n'
2
  import { renderToString } from '@wordpress/element'
3
  import { registerPlugin } from '@wordpress/plugins'
4
  import { openModal } from './util/general'
5
- import { useUserStore } from './state/User'
6
  import { PluginSidebarMoreMenuItem } from '@wordpress/edit-post'
 
7
 
8
  const openLibrary = (event) => {
9
  openModal(event.target.closest('[data-extendify-identifier]')?.dataset?.extendifyIdentifier)
10
  }
11
 
 
 
 
12
  const mainButton = <div id="extendify-templates-inserter">
13
  <button
14
  style="background:#D9F1EE;color:#1e1e1e;border:1px solid #949494;font-weight:bold;font-size:14px;padding:8px;margin-right:8px"
@@ -27,7 +30,8 @@ const mainButton = <div id="extendify-templates-inserter">
27
  // Add the MAIN button when Gutenberg is available and ready
28
  window._wpLoadBlockEditor && window.wp.data.subscribe(() => {
29
  setTimeout(() => {
30
- if (!useUserStore.getState().enabled) {
 
31
  return
32
  }
33
  if (document.getElementById('extendify-templates-inserter-btn')) {
@@ -44,7 +48,8 @@ window._wpLoadBlockEditor && window.wp.data.subscribe(() => {
44
  // The CTA button inside patterns
45
  window._wpLoadBlockEditor && window.wp.data.subscribe(() => {
46
  setTimeout(() => {
47
- if (!useUserStore.getState().enabled) {
 
48
  return
49
  }
50
  if (!document.querySelector('[id$=patterns-view]')) {
@@ -68,7 +73,7 @@ window._wpLoadBlockEditor && window.wp.data.subscribe(() => {
68
  })
69
 
70
  // The right dropdown side menu
71
- const SideMenuButton = () => useUserStore.getState().enabled && <PluginSidebarMoreMenuItem
72
  data-extendify-identifier="sidebar-button"
73
  onClick={openLibrary}
74
  icon={
@@ -82,26 +87,29 @@ const SideMenuButton = () => useUserStore.getState().enabled && <PluginSidebarMo
82
  >
83
  {__('Library', 'extendify-sdk')}
84
  </PluginSidebarMoreMenuItem>
85
- window._wpLoadBlockEditor && registerPlugin('extendify-temps-more-menu-trigger', {
86
  render: SideMenuButton,
87
  })
88
 
89
- // Everything above this line will be enabled or disabled based on the
90
- // users "enabled" state, which is controlled by another button here
91
  const LibraryEnableDisable = () => <PluginSidebarMoreMenuItem
92
- onClick={() => {
93
- useUserStore.setState({
94
- enabled: !useUserStore.getState().enabled,
95
- })
96
- requestAnimationFrame(() => location.reload())
 
 
 
97
  }}
98
  icon={<></>}
99
  >
100
- {useUserStore.getState().enabled
101
  ? __('Disable Extendify', 'extendify-sdk')
102
  : __('Enable Extendify', 'extendify-sdk')}
103
  </PluginSidebarMoreMenuItem>
104
 
 
105
  window._wpLoadBlockEditor && registerPlugin('extendify-settings-enable-disable', {
106
  render: LibraryEnableDisable,
107
  })
2
  import { renderToString } from '@wordpress/element'
3
  import { registerPlugin } from '@wordpress/plugins'
4
  import { openModal } from './util/general'
 
5
  import { PluginSidebarMoreMenuItem } from '@wordpress/edit-post'
6
+ import { User } from './api/User'
7
 
8
  const openLibrary = (event) => {
9
  openModal(event.target.closest('[data-extendify-identifier]')?.dataset?.extendifyIdentifier)
10
  }
11
 
12
+ // This returns true if the user object is null (Library never opened), or if it's enabled in the user settings
13
+ const isLibraryEnabled = () => window.extendifySdkData.user === null || window.extendifySdkData?.user?.state?.enabled
14
+
15
  const mainButton = <div id="extendify-templates-inserter">
16
  <button
17
  style="background:#D9F1EE;color:#1e1e1e;border:1px solid #949494;font-weight:bold;font-size:14px;padding:8px;margin-right:8px"
30
  // Add the MAIN button when Gutenberg is available and ready
31
  window._wpLoadBlockEditor && window.wp.data.subscribe(() => {
32
  setTimeout(() => {
33
+ // Redundant extra check added because of a bug where the above check wasn't working
34
+ if (!isLibraryEnabled()) {
35
  return
36
  }
37
  if (document.getElementById('extendify-templates-inserter-btn')) {
48
  // The CTA button inside patterns
49
  window._wpLoadBlockEditor && window.wp.data.subscribe(() => {
50
  setTimeout(() => {
51
+ // Redundant extra check added because of a bug where the above check wasn't working
52
+ if (!isLibraryEnabled()) {
53
  return
54
  }
55
  if (!document.querySelector('[id$=patterns-view]')) {
73
  })
74
 
75
  // The right dropdown side menu
76
+ const SideMenuButton = () => <PluginSidebarMoreMenuItem
77
  data-extendify-identifier="sidebar-button"
78
  onClick={openLibrary}
79
  icon={
87
  >
88
  {__('Library', 'extendify-sdk')}
89
  </PluginSidebarMoreMenuItem>
90
+ window._wpLoadBlockEditor && isLibraryEnabled() && registerPlugin('extendify-temps-more-menu-trigger', {
91
  render: SideMenuButton,
92
  })
93
 
94
+ // This will add a button to enable or disable the library button
 
95
  const LibraryEnableDisable = () => <PluginSidebarMoreMenuItem
96
+ onClick={async () => {
97
+ // This works even when the Library hasn't been opened yet
98
+ // because User.getData() will build a barebones User object
99
+ let userData = await User.getData()
100
+ userData = JSON.parse(userData)
101
+ userData.state.enabled = !isLibraryEnabled()
102
+ await User.setData(JSON.stringify(Object.assign({}, userData)))
103
+ location.reload()
104
  }}
105
  icon={<></>}
106
  >
107
+ {isLibraryEnabled()
108
  ? __('Disable Extendify', 'extendify-sdk')
109
  : __('Enable Extendify', 'extendify-sdk')}
110
  </PluginSidebarMoreMenuItem>
111
 
112
+ // Load this button always, which is used to enable or disable
113
  window._wpLoadBlockEditor && registerPlugin('extendify-settings-enable-disable', {
114
  render: LibraryEnableDisable,
115
  })
extendify-sdk/src/components/Beacon.js ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { useEffect } from '@wordpress/element'
2
+
3
+ export default function Beacon({ show }) {
4
+
5
+ const showBeacon = () => {
6
+ const container = document.getElementById('beacon-container')
7
+ if (container) {
8
+ container.style.position = 'relative'
9
+ container.style.zIndex = Number.MAX_SAFE_INTEGER
10
+ container.style.display = 'block'
11
+ }
12
+ }
13
+
14
+ const hideBeacon = () => {
15
+ const container = document.getElementById('beacon-container')
16
+ if (container) {
17
+ container.style.display = 'none'
18
+ window.Beacon('close')
19
+ }
20
+ }
21
+
22
+ useEffect(() => {
23
+ if (!show) {
24
+ return
25
+ }
26
+
27
+ if (window.Beacon) {
28
+ showBeacon()
29
+ return () => hideBeacon()
30
+ }
31
+
32
+ // Code direct from HS
33
+ (function (
34
+ e, t, n,
35
+ ) {
36
+ function a() {
37
+ const e = t.getElementsByTagName('script')[0],
38
+ n = t.createElement('script')
39
+ ;(n.async = !0), (n.src = 'https://beacon-v2.helpscout.net'), e.parentNode?.insertBefore(n, e)
40
+ }
41
+ if (
42
+ ((e.Beacon = n = function (
43
+ t, n, a,
44
+ ) {
45
+ e.Beacon.readyQueue.push({
46
+ method: t, options: n, data: a,
47
+ })
48
+ }),
49
+ (n.readyQueue = []),
50
+ 'complete' === t.readyState)
51
+ )
52
+ return a()
53
+ e.attachEvent
54
+ ? e.attachEvent('onload', a)
55
+ : e.addEventListener(
56
+ 'load', a, !1,
57
+ )
58
+ })(
59
+ window, document, window.Beacon || function () {},
60
+ )
61
+
62
+ window.Beacon('init', '2b8c11c0-5afc-4cb9-bee0-a5cb76b2fc91')
63
+ window.Beacon(
64
+ 'on', 'ready', showBeacon,
65
+ )
66
+ return () => {
67
+ window.Beacon(
68
+ 'off', 'ready', showBeacon,
69
+ )
70
+ hideBeacon()
71
+ }
72
+ }, [show])
73
+
74
+ return <></>
75
+ }
extendify-sdk/src/components/SidebarSingle.js CHANGED
@@ -22,7 +22,7 @@ export default function SidebarSingle({ template }) {
22
  target="_blank"
23
  href="https://extendify.com"
24
  rel="noreferrer">
25
- {__('Sign up today to get unlimited beta access', 'extendify-sdk')}
26
  </a>
27
  <button
28
  className="components-button"
22
  target="_blank"
23
  href="https://extendify.com"
24
  rel="noreferrer">
25
+ {__('Sign up today to get unlimited access', 'extendify-sdk')}
26
  </a>
27
  <button
28
  className="components-button"
extendify-sdk/src/layout/MainWindow.js CHANGED
@@ -1,15 +1,12 @@
1
- import {
2
- Fragment, useRef, useState,
3
- } from '@wordpress/element'
4
  import { Dialog, Transition } from '@headlessui/react'
5
  import Toolbar from './Toolbar'
6
  import Content from './Content'
7
  import Login from './Login'
8
- import classNames from 'classnames'
9
  import { useGlobalStore } from '../state/GlobalState'
10
 
11
  export default function MainWindow() {
12
- const [fullScreen, setFullScreen] = useState(false)
13
  const initialFocus = useRef(null)
14
  const open = useGlobalStore(state => state.open)
15
  const setOpen = useGlobalStore(state => state.setOpen)
@@ -40,17 +37,10 @@ export default function MainWindow() {
40
  enterFrom="opacity-0 translate-y-4 sm:translate-y-5"
41
  enterTo="opacity-100 translate-y-0"
42
  >
43
- <div className={classNames({
44
- 'fixed lg:absolute inset-0 lg:overflow-hidden transform transition-all': true,
45
- 'lg:pt-5 lg:p-10': !fullScreen,
46
- })}>
47
- <div className={classNames({
48
- 'bg-white h-full flex flex-col items-center relative shadow-xl': true,
49
- 'max-w-screen-4xl mx-auto': !fullScreen,
50
- })}>
51
  <Toolbar
52
  className="w-full h-16 border-solid border-0 border-b border-gray-300 flex-shrink-0"
53
- toggleFullScreen={() => setFullScreen(!fullScreen)}
54
  initialFocus={initialFocus}
55
  hideLibrary={() => setOpen(false)}/>
56
  {currentPage === 'content' &&
@@ -60,6 +50,7 @@ export default function MainWindow() {
60
  <Login className="w-full flex-grow overflow-hidden bg-extendify-light"/>
61
  }
62
  </div>
 
63
  </div>
64
  </Transition.Child>
65
  </div>
1
+ import { Fragment, useRef } from '@wordpress/element'
 
 
2
  import { Dialog, Transition } from '@headlessui/react'
3
  import Toolbar from './Toolbar'
4
  import Content from './Content'
5
  import Login from './Login'
6
+ import Beacon from '../components/Beacon'
7
  import { useGlobalStore } from '../state/GlobalState'
8
 
9
  export default function MainWindow() {
 
10
  const initialFocus = useRef(null)
11
  const open = useGlobalStore(state => state.open)
12
  const setOpen = useGlobalStore(state => state.setOpen)
37
  enterFrom="opacity-0 translate-y-4 sm:translate-y-5"
38
  enterTo="opacity-100 translate-y-0"
39
  >
40
+ <div className="fixed lg:absolute inset-0 lg:overflow-hidden transform transition-all lg:pt-5 lg:p-10">
41
+ <div className="bg-white h-full flex flex-col items-center relative shadow-xl max-w-screen-4xl mx-auto">
 
 
 
 
 
 
42
  <Toolbar
43
  className="w-full h-16 border-solid border-0 border-b border-gray-300 flex-shrink-0"
 
44
  initialFocus={initialFocus}
45
  hideLibrary={() => setOpen(false)}/>
46
  {currentPage === 'content' &&
50
  <Login className="w-full flex-grow overflow-hidden bg-extendify-light"/>
51
  }
52
  </div>
53
+ <Beacon show={open}/>
54
  </div>
55
  </Transition.Child>
56
  </div>
extendify-sdk/src/layout/Toolbar.js CHANGED
@@ -33,7 +33,7 @@ export default function Toolbar({ className, hideLibrary, initialFocus }) {
33
  target="_blank"
34
  href="https://extendify.com"
35
  rel="noreferrer">
36
- {__('Sign up today to get unlimited beta access', 'extendify-sdk')}
37
  </a>
38
  </div>
39
  <div className="m-0 p-0 px-6 text-sm bg-gray-50 border-r border-gray-300 h-full flex items-center">
@@ -45,10 +45,6 @@ export default function Toolbar({ className, hideLibrary, initialFocus }) {
45
  </>}
46
  </div>
47
  <div className="space-x-2 transform sm:translate-x-8">
48
- {/* <button type="button" className="components-button has-icon" onClick={() => toggleFullScreen()}>
49
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" size="24" role="img" aria-hidden="true" focusable="false"><path d="M4.2 9h1.5V5.8H9V4.2H4.2V9zm14 9.2H15v1.5h4.8V15h-1.5v3.2zM15 4.2v1.5h3.2V9h1.5V4.2H15zM5.8 15H4.2v4.8H9v-1.5H5.8V15z"></path></svg>
50
- <span className="sr-only">{__('Toggle fullscreen', 'extendify-sdk')}</span>
51
- </button> */}
52
  <button ref={initialFocus} type="button" className="components-button has-icon" onClick={() => hideLibrary()}>
53
  <svg width="24" height="24" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" size="24" role="img" aria-hidden="true" focusable="false"><path d="M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"></path></svg>
54
  <span className="sr-only">{__('Close library', 'extendify-sdk')}</span>
33
  target="_blank"
34
  href="https://extendify.com"
35
  rel="noreferrer">
36
+ {__('Sign up today to get unlimited access', 'extendify-sdk')}
37
  </a>
38
  </div>
39
  <div className="m-0 p-0 px-6 text-sm bg-gray-50 border-r border-gray-300 h-full flex items-center">
45
  </>}
46
  </div>
47
  <div className="space-x-2 transform sm:translate-x-8">
 
 
 
 
48
  <button ref={initialFocus} type="button" className="components-button has-icon" onClick={() => hideLibrary()}>
49
  <svg width="24" height="24" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" size="24" role="img" aria-hidden="true" focusable="false"><path d="M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"></path></svg>
50
  <span className="sr-only">{__('Close library', 'extendify-sdk')}</span>
free-acf-blocks.php CHANGED
@@ -1,436 +1,436 @@
1
- <?php
2
- // Register Blocks
3
- add_action('acf/init', 'acfb_blocks_free');
4
- function acfb_blocks_free() {
5
-
6
- // check function exists.
7
- if( function_exists('acf_register_block_type') ) {
8
-
9
- // register a testimonial block.
10
- acf_register_block_type(array(
11
- 'name' => 'acfb-testimonial',
12
- 'mode' => 'preview',
13
- 'title' => __('Testimonial'),
14
- 'description' => __('Let others know what your clients or customers say about you.'),
15
- 'render_callback' => 'acf_blocks_template',
16
- 'category' => 'acfb-blocks',
17
- 'icon' => '<svg viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"></defs><title/><g data-name="22-chat" id="_22-chat"><polygon class="acfb_svg_icon" points="31 3 1 3 1 23 8 23 14 29 14 23 31 23 31 3"/><line class="acfb_svg_icon" x1="7" x2="25" y1="9" y2="9"/><line class="acfb_svg_icon" x1="7" x2="25" y1="13" y2="13"/><line class="acfb_svg_icon" x1="7" x2="25" y1="17" y2="17"/></g></svg>',
18
- 'enqueue_assets' => function(){
19
- wp_enqueue_style( 'acfb-blocks-css', plugin_dir_url( __FILE__ ) . 'css/acfblocks.css' );
20
- },
21
- ));
22
-
23
- // register a team block.
24
- acf_register_block_type(array(
25
- 'name' => 'acfb-team',
26
- 'mode' => 'preview',
27
- 'title' => __('Team'),
28
- 'description' => __('Introduce your team to your site visitors in style.'),
29
- 'render_callback' => 'acf_blocks_template',
30
- 'category' => 'acfb-blocks',
31
- 'icon' => '<svg viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"><title/><g data-name="79-users" id="_79-users"><circle class="acfb_svg_icon" cx="16" cy="13" r="5"/><path class="acfb_svg_icon" d="M23,28A7,7,0,0,0,9,28Z"/><path class="acfb_svg_icon" d="M24,14a5,5,0,1,0-4-8"/><path class="acfb_svg_icon" d="M25,24h6a7,7,0,0,0-7-7"/><path class="acfb_svg_icon" d="M12,6a5,5,0,1,0-4,8"/><path class="acfb_svg_icon" d="M8,17a7,7,0,0,0-7,7H7"/></g></svg>',
32
- 'enqueue_assets' => function(){
33
- wp_enqueue_style( 'acfb-blocks-css', plugin_dir_url( __FILE__ ) . 'css/acfblocks.css' );
34
- },
35
- ));
36
-
37
- // register a multi buttons block.
38
- acf_register_block_type(array(
39
- 'name' => 'acfb-multibuttons',
40
- 'mode' => 'preview',
41
- 'title' => __('Multi Buttons'),
42
- 'description' => __('Display multiple buttons inline with ease.'),
43
- 'render_callback' => 'acf_blocks_template',
44
- 'category' => 'acfb-blocks',
45
- 'icon' => '<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title/><g data-name="36.option-memu" id="_36.option-memu"><rect class="acfb_svg_icon" height="4" width="4" x="1" y="10"/><rect class="acfb_svg_icon" height="4" width="4" x="10" y="10"/><rect class="acfb_svg_icon" height="4" width="4" x="19" y="10"/></g></svg>',
46
- 'enqueue_assets' => function(){
47
- wp_enqueue_style( 'acfb-blocks-css', plugin_dir_url( __FILE__ ) . 'css/acfblocks.css' );
48
- },
49
- ));
50
-
51
- // register a pricing box block.
52
- acf_register_block_type(array(
53
- 'name' => 'acfb-pricingbox',
54
- 'mode' => 'preview',
55
- 'title' => __('Pricing Box'),
56
- 'description' => __('Display your plans and offers in style.'),
57
- 'render_callback' => 'acf_blocks_template',
58
- 'category' => 'acfb-blocks',
59
- 'icon' => '<svg height="512pt" viewBox="0 -47 512 512" width="512pt" xmlns="http://www.w3.org/2000/svg"><path d="m85.332031 145.859375v-43.800781c9.648438 2.433594 16.574219 10.882812 17.066407 20.820312 0 4.714844 3.820312 8.535156 8.535156 8.535156 4.710937 0 8.53125-3.820312 8.53125-8.535156-.652344-19.355468-14.988282-35.507812-34.132813-38.460937v-7.617188c0-4.714843-3.820312-8.535156-8.53125-8.535156-4.714843 0-8.535156 3.820313-8.535156 8.535156v7.617188c-19.140625 2.949219-33.476563 19.105469-34.132813 38.460937.65625 19.359375 14.992188 35.511719 34.132813 38.460938v43.804687c-9.648437-2.433593-16.574219-10.886719-17.066406-20.824219 0-4.714843-3.820313-8.535156-8.53125-8.535156-4.714844 0-8.535157 3.820313-8.535157 8.535156.65625 19.359376 14.992188 35.511719 34.132813 38.460938v7.617188c0 4.714843 3.820313 8.535156 8.535156 8.535156 4.710938 0 8.53125-3.820313 8.53125-8.535156v-7.617188c19.144531-2.949219 33.480469-19.101562 34.132813-38.460938-.652344-19.359374-14.988282-35.511718-34.132813-38.460937zm-34.132812-22.980469c.496093-9.9375 7.421875-18.386718 17.066406-20.820312v41.644531c-9.644531-2.4375-16.570313-10.886719-17.066406-20.824219zm34.132812 82.265625v-41.644531c9.925781 1.988281 17.066407 10.703125 17.066407 20.824219 0 10.121093-7.140626 18.835937-17.066407 20.824219zm0 0"/><path d="m298.667969 109.226562c0 4.714844 3.820312 8.535157 8.53125 8.535157 4.714843 0 8.535156-3.820313 8.535156-8.535157 0-26.597656-22.304687-48.613281-51.199219-52.300781v-14.257812c0-4.714844-3.824218-8.535157-8.535156-8.535157s-8.535156 3.820313-8.535156 8.535157v14.257812c-28.894532 3.6875-51.199219 25.703125-51.199219 52.300781 0 26.597657 22.304687 48.617188 51.199219 52.308594v71.554688c-18.386719-1.878906-32.773438-16.683594-34.132813-35.117188 0-4.710937-3.820312-8.53125-8.53125-8.53125-4.714843 0-8.535156 3.820313-8.535156 8.53125 0 26.597656 22.304687 48.613282 51.199219 52.300782v14.261718c0 4.710938 3.824218 8.53125 8.535156 8.53125s8.535156-3.820312 8.535156-8.53125v-14.257812c28.894532-3.691406 51.199219-25.703125 51.199219-52.300782 0-26.601562-22.304687-48.617187-51.199219-52.304687v-71.558594c18.386719 1.875 32.773438 16.679688 34.132813 35.113281zm-85.335938 0c1.359375-18.433593 15.746094-33.234374 34.132813-35.113281v70.230469c-18.386719-1.878906-32.773438-16.683594-34.132813-35.117188zm85.335938 88.746094c-1.359375 18.433594-15.746094 33.234375-34.132813 35.113282v-70.230469c18.386719 1.882812 32.773438 16.683593 34.132813 35.117187zm0 0"/><path d="m426.667969 161.339844v43.804687c-9.648438-2.433593-16.574219-10.882812-17.066407-20.820312 0-4.710938-3.820312-8.535157-8.535156-8.535157-4.710937 0-8.53125 3.824219-8.53125 8.535157.652344 19.359375 14.988282 35.511719 34.132813 38.460937v7.613282c0 4.714843 3.820312 8.535156 8.53125 8.535156 4.714843 0 8.535156-3.820313 8.535156-8.535156v-7.617188c19.140625-2.949219 33.476563-19.101562 34.132813-38.460938-.65625-19.359374-14.992188-35.511718-34.132813-38.460937v-43.800781c9.648437 2.433594 16.574219 10.882812 17.066406 20.820312 0 4.714844 3.820313 8.535156 8.53125 8.535156 4.714844 0 8.535157-3.820312 8.535157-8.535156-.65625-19.355468-14.992188-35.507812-34.132813-38.460937v-7.617188c0-4.714843-3.820313-8.535156-8.535156-8.535156-4.710938 0-8.53125 3.820313-8.53125 8.535156v7.617188c-19.144531 2.949219-33.480469 19.105469-34.132813 38.460937.652344 19.359375 14.988282 35.511719 34.132813 38.460938zm34.132812 22.980468c-.492187 9.9375-7.417969 18.386719-17.066406 20.820313v-41.640625c9.648437 2.433594 16.574219 10.882812 17.066406 20.820312zm-34.132812-82.261718v41.644531c-9.648438-2.4375-16.574219-10.886719-17.066407-20.824219.492188-9.9375 7.417969-18.386718 17.066407-20.820312zm0 0"/><path d="m494.933594 25.601562h-128v-8.535156c-.011719-9.421875-7.644532-17.0546872-17.066406-17.066406h-187.734376c-9.421874.0117188-17.054687 7.644531-17.066406 17.066406v8.535156h-128c-9.421875.007813-17.0546872 7.644532-17.066406 17.066407v221.867187c.0117188 9.417969 7.644531 17.054688 17.066406 17.066406h128v8.53125c.011719 9.421876 7.644532 17.054688 17.066406 17.066407h187.734376c9.421874-.011719 17.054687-7.644531 17.066406-17.066407v-8.53125h128c9.421875-.011718 17.054687-7.648437 17.066406-17.066406v-221.867187c-.011719-9.421875-7.644531-17.058594-17.066406-17.066407zm-477.867188 238.933594v-221.867187h128v221.867187zm145.066406 25.597656v-273.066406h187.734376v17.066406l.007812 238.894532-.007812.039062.007812.039063v17.027343zm332.800782-25.597656h-128v-221.867187h128zm0 0"/><path d="m222.382812 362.15625c-5-4.992188-13.097656-4.992188-18.097656 0l-34.132812 34.128906c-3.660156 3.660156-4.757813 9.164063-2.777344 13.945313 1.984375 4.78125 6.648438 7.902343 11.824219 7.902343h68.265625c5.175781-.003906 9.839844-3.121093 11.820312-7.902343 1.980469-4.777344.886719-10.28125-2.769531-13.941407zm-32.882812 38.910156 23.832031-23.832031 23.835938 23.832031zm0 0"/><path d="m341.332031 358.398438h-68.265625c-5.175781.003906-9.835937 3.121093-11.816406 7.902343s-.890625 10.285157 2.765625 13.945313l34.136719 34.132812c5 4.988282 13.097656 4.988282 18.097656 0l34.132812-34.128906c3.660157-3.660156 4.753907-9.164062 2.773438-13.949219-1.980469-4.78125-6.648438-7.898437-11.824219-7.902343zm-34.132812 40.902343-23.832031-23.835937h47.667968zm0 0"/><path d="m119.464844 298.667969h-85.332032c-4.710937 0-8.53125 3.820312-8.53125 8.53125 0 4.714843 3.820313 8.535156 8.53125 8.535156h85.332032c4.714844 0 8.535156-3.820313 8.535156-8.535156 0-4.710938-3.820312-8.53125-8.535156-8.53125zm0 0"/><path d="m315.734375 341.332031c4.710937 0 8.53125-3.820312 8.53125-8.53125 0-4.714843-3.820313-8.535156-8.53125-8.535156h-119.46875c-4.710937 0-8.53125 3.820313-8.53125 8.535156 0 4.710938 3.820313 8.53125 8.53125 8.53125zm0 0"/><path d="m477.867188 298.667969h-85.332032c-4.714844 0-8.535156 3.820312-8.535156 8.53125 0 4.714843 3.820312 8.535156 8.535156 8.535156h85.332032c4.710937 0 8.53125-3.820313 8.53125-8.535156 0-4.710938-3.820313-8.53125-8.53125-8.53125zm0 0"/></svg>',
60
- 'enqueue_assets' => function(){
61
- wp_enqueue_style( 'acfb-blocks-css', plugin_dir_url( __FILE__ ) . 'css/acfblocks.css' );
62
- },
63
- ));
64
-
65
- // register a Star Rating block.
66
- acf_register_block_type(array(
67
- 'name' => 'acfb-starrating',
68
- 'mode' => 'preview',
69
- 'title' => __('Star Rating'),
70
- 'description' => __('Add start ratings anywhere easily.'),
71
- 'render_callback' => 'acf_blocks_template',
72
- 'category' => 'acfb-blocks',
73
- 'icon' => '<svg id="Outlined" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"><title/><g id="Fill"><path d="M28.61,11.67H20l-2.66-8.2a1.39,1.39,0,0,0-2.64,0L12,11.67H3.39a1.39,1.39,0,0,0-.82,2.51l7,5.07L6.89,27.46a1.39,1.39,0,0,0,1.32,1.82A1.43,1.43,0,0,0,9,29l7-5.07L23,29a1.43,1.43,0,0,0,.81.27,1.39,1.39,0,0,0,1.32-1.82l-2.66-8.21,7-5.07A1.39,1.39,0,0,0,28.61,11.67Zm-7.34,6-1.17.86.44,1.38,2.09,6.41-5.45-4L16,21.46l-1.18.86-5.45,4,2.09-6.41.44-1.38-1.17-.86-5.45-4h8.19l.45-1.38L16,5.89l2.08,6.4.45,1.38h8.19Z"/></g></svg>',
74
- 'enqueue_assets' => function(){
75
- wp_enqueue_style( 'acfb-blocks-css', plugin_dir_url( __FILE__ ) . 'css/acfblocks.css' );
76
- },
77
- ));
78
-
79
- // register a Progress Bar block.
80
- acf_register_block_type(array(
81
- 'name' => 'acfb-progressbar',
82
- 'mode' => 'preview',
83
- 'title' => __('Progress Bar'),
84
- 'description' => __('Show your progress using percentage defined progress bars.'),
85
- 'render_callback' => 'acf_blocks_template',
86
- 'category' => 'acfb-blocks',
87
- 'icon' => '<svg width="455.14px" height="455.14px" enable-background="new 0 0 455.138 455.139" version="1.1" viewBox="0 0 455.138 455.139" xml:space="preserve" xmlns="http://www.w3.org/2000/svg">
88
- <path d="m0 141.65v171.83h455.14v-171.83h-455.14zm432.72 149.42h-410.31v-127h410.31v127h-5e-3zm-328.43-19.606h-59.766v-89.652h59.767v89.652zm89.653 0h-59.765v-89.652h59.765v89.652zm93.387 0h-59.768v-89.652h59.768v89.652z"/>
89
- </svg>',
90
- 'enqueue_assets' => function(){
91
- wp_enqueue_style( 'acfb-blocks-css', plugin_dir_url( __FILE__ ) . 'css/acfblocks.css' );
92
- },
93
- ));
94
-
95
- // register a Counter Number block.
96
- acf_register_block_type(array(
97
- 'name' => 'acfb-counternumber',
98
- 'mode' => 'preview',
99
- 'title' => __('Counter Number'),
100
- 'description' => __('Display stats with animated counter numbers.'),
101
- 'render_callback' => 'acf_blocks_template',
102
- 'category' => 'acfb-blocks',
103
- 'icon' => '<svg id="Outlined" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"><title/><g id="Fill"><path d="M16.71,22.29l-1.42,1.42L17.59,26H16A10,10,0,0,1,8.93,8.93L7.51,7.51A12,12,0,0,0,16,28h1.59l-2.3,2.29,1.42,1.42L20,28.41a2,2,0,0,0,0-2.82Z"/><path d="M16,4H14.41l2.3-2.29L15.29.29,12,3.59a2,2,0,0,0,0,2.82l3.29,3.3,1.42-1.42L14.41,6H16a10,10,0,0,1,7.07,17.07l1.42,1.42A12,12,0,0,0,16,4Z"/></g></svg>',
104
- 'enqueue_assets' => function(){
105
- wp_enqueue_style( 'acfb-blocks-css', plugin_dir_url( __FILE__ ) . 'css/acfblocks.css' );
106
- wp_enqueue_script( 'acfb-blocks-js', plugin_dir_url( __FILE__ ) . 'js/frontend.js', array('jquery'), '', false );
107
- },
108
- ));
109
-
110
- // register a Price List block.
111
- acf_register_block_type(array(
112
- 'name' => 'acfb-pricelist',
113
- 'mode' => 'preview',
114
- 'title' => __('Price List'),
115
- 'description' => __('Display price list for any product easily.'),
116
- 'render_callback' => 'acf_blocks_template',
117
- 'category' => 'acfb-blocks',
118
- 'icon' => '<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title/><g data-name="6.list-menu" id="_6.list-menu"><line class="acfb_svg_icon" x1="1" x2="4" y1="6" y2="6"/><line class="acfb_svg_icon" x1="1" x2="4" y1="12" y2="12"/><line class="acfb_svg_icon" x1="1" x2="4" y1="18" y2="18"/><line class="acfb_svg_icon" x1="8" x2="23" y1="6" y2="6"/><line class="acfb_svg_icon" x1="8" x2="23" y1="12" y2="12"/><line class="acfb_svg_icon" x1="8" x2="23" y1="18" y2="18"/></g></svg>',
119
- 'enqueue_assets' => function(){
120
- wp_enqueue_style( 'acfb-blocks-css', plugin_dir_url( __FILE__ ) . 'css/acfblocks.css' );
121
- },
122
- ));
123
-
124
- // register a Click To Tweet block.
125
- acf_register_block_type(array(
126
- 'name' => 'acfb-clicktotweet',
127
- 'mode' => 'preview',
128
- 'title' => __('Click To Tweet'),
129
- 'description' => __('Add a tweet-able quote to let your reader tweet with 1-click.'),
130
- 'render_callback' => 'acf_blocks_template',
131
- 'category' => 'acfb-blocks',
132
- 'icon' => '<svg enable-background="new 0 0 511.271 511.271" version="1.1" viewBox="0 0 511.271 511.271" xml:space="preserve" xmlns="http://www.w3.org/2000/svg">
133
- <path d="m508.34 94.243c-2.603-2.603-6.942-3.471-10.414-2.603l-17.356 6.075c10.414-12.149 17.356-25.166 21.695-37.315 1.736-4.339 0.868-7.81-1.736-10.414-2.603-2.603-6.942-3.471-10.414-1.736-24.298 10.414-45.125 19.092-62.481 24.298 0 0.868-0.868 0-1.736 0-13.885-7.81-47.729-25.166-72.027-25.166-61.614 0.868-111.08 52.936-111.08 116.28v3.471c-90.251-17.356-139.72-43.39-193.52-99.797l-8.676-8.678-5.207 10.414c-29.505 56.407-8.678 107.61 25.166 142.32-15.62-2.603-26.034-7.81-35.58-15.62-3.471-2.603-7.81-3.471-12.149-0.868-3.471 1.736-5.207 6.942-4.339 11.281 12.149 40.786 42.522 73.763 75.498 93.722-15.62 0-28.637-1.736-41.654-10.414-3.471-1.736-8.678-1.736-12.149 0.868s-5.207 6.942-3.471 11.281c15.62 44.258 45.993 67.688 94.59 73.763-25.166 14.753-58.142 26.902-109.34 27.77-5.207 0-9.546 3.471-11.281 7.81-1.736 5.207 0 9.546 3.471 13.017 31.241 25.166 100.66 39.919 186.58 39.919 152.73 0 277.7-136.24 277.7-303.73v-2.603c19.092-9.546 34.712-27.77 42.522-52.936 0.867-3.472-1e-3 -7.811-2.604-10.414zm-52.068 49.464l-5.207 1.736v14.753c0 157.94-117.15 286.37-260.34 286.37-78.97 0-131.9-13.017-160.54-26.902 59.878-4.339 94.59-23.431 121.49-44.258l21.695-15.62h-26.034c-49.464 0-79.837-13.885-97.193-46.861 15.62 5.207 32.108 5.207 50.332 4.339 6.942-0.868 13.885-0.868 20.827-0.868l2.603-17.356c-32.976-9.546-72.027-39.051-91.119-78.969 17.356 7.81 36.447 9.546 53.803 9.546h26.902l-21.694-15.621c-18.224-13.017-72.027-59.01-45.993-124.96 55.539 54.671 108.48 79.837 203.93 97.193l10.414 1.736v-24.298c0-53.803 41.654-98.061 93.722-98.929 19.959-0.868 52.936 17.356 62.481 22.563 5.207 2.603 10.414 3.471 15.62 1.736 13.017-4.339 28.637-10.414 45.993-17.356-7.81 13.017-18.224 25.166-32.108 36.448-3.471 2.603-4.339 7.81-2.603 12.149s6.942 6.075 11.281 4.339l33.844-11.281c-6.075 11.28-15.621 24.297-32.109 30.371z"/>
134
- </svg>',
135
- 'enqueue_assets' => function(){
136
- wp_enqueue_style( 'acfb-blocks-css', plugin_dir_url( __FILE__ ) . 'css/acfblocks.css' );
137
- },
138
- ));
139
-
140
-
141
- // register a Post block.
142
- acf_register_block_type(array(
143
- 'name' => 'acfb-posts',
144
- 'mode' => 'preview',
145
- 'title' => __('Posts'),
146
- 'description' => __('Display a grid or list of your blog posts.'),
147
- 'render_callback' => 'acf_blocks_template',
148
- 'category' => 'acfb-blocks',
149
- 'icon' => '<svg enable-background="new 0 0 512 512" version="1.1" viewBox="0 0 512 512" xml:space="preserve" xmlns="http://www.w3.org/2000/svg">
150
- <path d="M0,30v452h512V30H0z M482,452H30V120h452V452z M482,90H30V60h452V90z"/>
151
- <path d="M271,160v252h181V160H271z M422,382H301V190h121V382z"/>
152
- <rect x="60" y="160" width="181" height="30"/>
153
- <rect x="60" y="220" width="121" height="30"/>
154
- <rect x="60" y="300" width="181" height="30"/>
155
- <rect x="60" y="360" width="121" height="30"/>
156
- </svg>',
157
- 'enqueue_assets' => function(){
158
- wp_enqueue_style( 'acfb-blocks-css', plugin_dir_url( __FILE__ ) . 'css/acfblocks.css' );
159
- },
160
- ));
161
-
162
- // register a Photo Collage block.
163
- acf_register_block(array(
164
- 'name' => 'acfb-photocollage',
165
- 'mode' => 'preview',
166
- 'title' => __('Photo Collage'),
167
- 'description' => __('Display beautiful photo collage using pre-made templates.'),
168
- 'render_callback' => 'acf_blocks_template',
169
- 'category' => 'acfb-blocks',
170
- 'icon' => '<svg enable-background="new 0 0 140.637 140.637" version="1.1" viewBox="0 0 140.64 140.64" xml:space="preserve" xmlns="http://www.w3.org/2000/svg">
171
- <path d="m138.14 140.61h-135.64c-1.381 0-2.5-1.119-2.5-2.5v-135.59c0-1.381 1.119-2.5 2.5-2.5h135.64c1.381 0 2.5 1.119 2.5 2.5v135.59c0 1.381-1.119 2.5-2.5 2.5zm-50.637-5h48.091v-17.599h-48.091v17.599zm-53.138 0h48.138v-17.599h-48.138v17.599zm-29.362 0h24.362v-17.599h-24.362v17.599zm106.27-22.599h24.317v-17.598h-24.317v17.598zm-26.273 0h21.273v-17.598h-48.136v17.599h26.863zm-53.138 0h21.274v-17.598h-48.136v17.599h26.862zm76.911-22.598h26.817v-17.599h-48.09v17.598h21.273zm-53.136 0h26.863v-17.599h-48.138v17.598h21.275zm-50.637 0h24.362v-17.599h-24.362v17.599zm106.27-22.599h24.317v-17.598h-24.317v17.598zm-26.273 0h21.273v-17.598h-48.136v17.599h26.863zm-53.138 0h21.274v-17.598h-48.136v17.599h26.862zm76.911-22.598h26.817v-17.599h-48.09v17.599h21.273zm-53.136 0h26.863v-17.599h-48.138v17.599h21.275zm-50.637 0h24.362v-17.599h-24.362v17.599zm106.27-22.599h24.317v-17.598h-24.317v17.598zm-26.273 0h21.273v-17.598h-48.136v17.598h26.863zm-53.138 0h21.274v-17.598h-48.136v17.598h26.862z"/>
172
- </svg>',
173
- 'enqueue_assets' => function(){
174
- wp_enqueue_style( 'acfb-blocks-css', plugin_dir_url( __FILE__ ) . 'css/acfblocks.css' );
175
- },
176
- ));
177
-
178
- // register a Social Sharing Block.
179
- acf_register_block(array(
180
- 'name' => 'acfb-socialsharing',
181
- 'mode' => 'preview',
182
- 'title' => __('Social Sharing'),
183
- 'description' => __('Super fast and customizable Social Media Sharing Buttons for WordPress. No JavaScript. No tracking.'),
184
- 'render_callback' => 'acf_blocks_template',
185
- 'category' => 'acfb-blocks',
186
- 'icon' => '<svg enable-background="new 0 0 481.6 481.6" version="1.1" viewBox="0 0 481.6 481.6" xml:space="preserve" xmlns="http://www.w3.org/2000/svg">
187
- <path d="m381.6 309.4c-27.7 0-52.4 13.2-68.2 33.6l-132.3-73.9c3.1-8.9 4.8-18.5 4.8-28.4 0-10-1.7-19.5-4.9-28.5l132.2-73.8c15.7 20.5 40.5 33.8 68.3 33.8 47.4 0 86.1-38.6 86.1-86.1s-38.6-86.1-86.1-86.1-86.1 38.6-86.1 86.1c0 10 1.7 19.6 4.9 28.5l-132.1 73.8c-15.7-20.6-40.5-33.8-68.3-33.8-47.4 0-86.1 38.6-86.1 86.1s38.7 86.1 86.2 86.1c27.8 0 52.6-13.3 68.4-33.9l132.2 73.9c-3.2 9-5 18.7-5 28.7 0 47.4 38.6 86.1 86.1 86.1s86.1-38.6 86.1-86.1-38.7-86.1-86.2-86.1zm0-282.3c32.6 0 59.1 26.5 59.1 59.1s-26.5 59.1-59.1 59.1-59.1-26.5-59.1-59.1 26.6-59.1 59.1-59.1zm-281.6 272.7c-32.6 0-59.1-26.5-59.1-59.1s26.5-59.1 59.1-59.1 59.1 26.5 59.1 59.1-26.6 59.1-59.1 59.1zm281.6 154.7c-32.6 0-59.1-26.5-59.1-59.1s26.5-59.1 59.1-59.1 59.1 26.5 59.1 59.1-26.5 59.1-59.1 59.1z"/>
188
- </svg>',
189
- 'enqueue_assets' => function(){
190
- wp_enqueue_style( 'acfb-blocks-css', plugin_dir_url( __FILE__ ) . 'css/acfblocks.css' );
191
- },
192
- ));
193
-
194
- //Register a Image Slider Block
195
- acf_register_block(array(
196
- 'name' => 'acfb-image-slider',
197
- 'mode' => 'preview',
198
- 'title' => __('Image Slider'),
199
- 'description' => __('Display your images as a slider or carousel.'),
200
- 'render_callback' => 'acf_blocks_template',
201
- 'category' => 'acfb-blocks',
202
- 'icon' => '<svg width="682pt" height="682pt" viewBox="-21 -91 682.66669 682" xmlns="http://www.w3.org/2000/svg">
203
- <path d="m639.98 7.5312c-0.33594-6.6172-5.7969-11.863-12.484-11.863h-615c-6.6875 0-12.148 5.2461-12.484 11.863-0.015625 0.21484-0.015625 0.42578-0.015625 0.64062v474.99c0 6.9062 5.6016 12.508 12.5 12.508h615c6.8984 0 12.5-5.6016 12.5-12.508v-474.99c0-0.21484 0-0.42578-0.015625-0.64062zm-24.984 463.12h-590v-367.46h590zm0-392.46h-590v-57.668h590z"/>
204
- <path d="m213.75 62.723h-100c-6.9062 0-12.5-5.5977-12.5-12.5 0-6.9102 5.5938-12.504 12.5-12.504h100c6.9062 0 12.5 5.5938 12.5 12.504 0 6.9023-5.5938 12.5-12.5 12.5z"/>
205
- <path d="m63.773 62.723c-6.9023 0-12.504-5.5977-12.504-12.5 0-6.9102 5.5898-12.504 12.496-12.504h0.007813c6.9062 0 12.5 5.5938 12.5 12.504 0 6.9023-5.5938 12.5-12.5 12.5z"/>
206
- <path d="m558.75 176.72h-50v-11.258c0-13.789-11.211-25.004-25-25.004h-327.5c-13.789 0-25 11.215-25 25.004v11.258h-50c-13.789 0-25 11.215-25 25.004v127.54c0 13.793 11.211 25.008 25 25.008h50v11.258c0 13.789 11.211 25.004 25 25.004h327.5c13.789 0 25-11.215 25-25.004v-11.258h50c13.789 0 25-11.215 25-25.008v-127.54c0-13.789-11.211-25.004-25-25.004zm-427.5 152.54h-50v-127.54h50l0.015625 127.54s0 0-0.015625 0zm352.52 36.266s0 0-0.015625 0h-327.5v-200.07h327.5v36.266l0.015625 127.89zm74.984-36.266h-50v-127.54h50l0.015625 127.54s0 0-0.015625 0z"/>
207
- <path d="m230.8 314.23c-3.125 0-6.2539-1.168-8.6836-3.5117l-37.5-36.227c-2.4375-2.3555-3.8164-5.6055-3.8164-8.9922 0-3.3945 1.3789-6.6406 3.8164-9l37.5-36.227c4.9727-4.793 12.879-4.6562 17.68 0.30859 4.793 4.9727 4.6562 12.887-0.30859 17.68l-28.195 27.238 28.195 27.23c4.9648 4.8008 5.1016 12.715 0.30859 17.68-2.457 2.5391-5.7266 3.8203-8.9961 3.8203z"/>
208
- <path d="m410.45 314.23c-3.2695 0-6.5391-1.2812-8.9961-3.8203-4.793-4.9648-4.6562-12.883 0.30859-17.68l28.195-27.234-28.195-27.234c-4.9648-4.793-5.1016-12.715-0.30859-17.68 4.8008-4.9648 12.711-5.1016 17.68-0.30859l37.5 36.227c2.4375 2.3594 3.8164 5.6055 3.8164 8.9961 0 3.3906-1.3789 6.6406-3.8164 8.9961l-37.5 36.227c-2.4297 2.3438-5.5586 3.5117-8.6836 3.5117z"/>
209
- <path d="m320.02 435.65c-6.9023 0-12.504-5.5977-12.504-12.5 0-6.9062 5.5898-12.508 12.496-12.508h0.007813c6.9062 0 12.5 5.6016 12.5 12.508 0 6.9023-5.5938 12.5-12.5 12.5z"/>
210
- <path d="m370.02 435.65c-6.9023 0-12.504-5.5977-12.504-12.5 0-6.9062 5.5898-12.508 12.496-12.508h0.007813c6.9062 0 12.5 5.6016 12.5 12.508 0 6.9023-5.5938 12.5-12.5 12.5z"/>
211
- <path d="m270.02 435.65c-6.9023 0-12.504-5.5977-12.504-12.5 0-6.9062 5.5898-12.508 12.496-12.508h0.007813c6.9062 0 12.5 5.6016 12.5 12.508 0 6.9023-5.5938 12.5-12.5 12.5z"/>
212
- </svg>',
213
- 'enqueue_assets' => function(){
214
- wp_enqueue_style( 'acfb-image-slider-css', plugin_dir_url( __FILE__ ) . 'css/swiper.min.css' );
215
- wp_enqueue_script('jQuery');
216
- wp_enqueue_script( 'acfb-image-slider-swiper-js' ,plugin_dir_url( __FILE__ ) . 'js/swiper.min.js', array('jquery'), '', true );
217
-
218
- wp_enqueue_style( 'acfb-blocks-css', plugin_dir_url( __FILE__ ) . 'css/acfblocks.css' );
219
-
220
- wp_enqueue_script( 'acfb-image-slider-custom' ,plugin_dir_url( __FILE__ ) . 'js/image-slider.js', array('jquery'), '', true );
221
- },
222
- ));
223
-
224
-
225
- // register a Tabs Block.
226
- acf_register_block(array(
227
- 'name' => 'acfb-tabs',
228
- 'mode' => 'preview',
229
- 'title' => __('Tabs'),
230
- 'description' => __('Add tabbed content in your posts/pages.'),
231
- 'render_callback' => 'acf_blocks_template',
232
- 'category' => 'acfb-blocks',
233
- 'icon' => '<svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M861.29152 933.87264H162.70848c-40.08448 0-72.58112-32.49664-72.58112-72.58624V162.70848c0-40.08448 32.49664-72.58112 72.58112-72.58112h203.10016V222.72h568.06912v638.58176c-0.00512 40.07936-32.49664 72.57088-72.58624 72.57088z m5.74976-644.3264H156.95872v524.05248c0 34.12992 27.66336 61.7984 61.7984 61.7984h586.48064c34.12992 0 61.7984-27.66848 61.7984-61.7984V289.54624z m-200.49408-199.41888h194.74432c40.0896 0 72.58624 32.49664 72.58624 72.58112v34.944h-267.33056V90.12736z m-275.67616 0h250.61888v107.52512H390.87104V90.12736z"/></svg>',
234
- 'enqueue_assets' => function(){
235
- wp_enqueue_style( 'acfb-blocks-css', plugin_dir_url( __FILE__ ) . 'css/acfblocks.css' );
236
- wp_enqueue_script( 'acfb-tabs-js', plugin_dir_url( __FILE__ ) . 'js/tabs.js', array('jquery'), '', true );
237
- },
238
- ));
239
-
240
- // register a Toggle Block.
241
- acf_register_block(array(
242
- 'name' => 'acfb-toggle',
243
- 'mode' => 'preview',
244
- 'title' => __('Toggle'),
245
- 'description' => __('Add toggleable content in your pages/posts.'),
246
- 'render_callback' => 'acf_blocks_template',
247
- 'category' => 'acfb-blocks',
248
- 'icon' => '<svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M0 0l0 1024 1024 0 0-1024-1024 0zM963.764706 60.235294l0 542.117647-903.529412 0 0-542.117647 903.529412 0zM963.764706 662.588235l0 120.470588-903.529412 0 0-120.470588 903.529412 0zM60.235294 963.764706l0-120.470588 903.529412 0 0 120.470588-903.529412 0z" /></svg>',
249
- 'enqueue_assets' => function(){
250
- wp_enqueue_style( 'acfb-blocks-css', plugin_dir_url( __FILE__ ) . 'css/acfblocks.css' );
251
- wp_enqueue_script( 'acfb-toggle-js', plugin_dir_url( __FILE__ ) . 'js/toggle.js', array('jquery'), '', true );
252
- },
253
- ));
254
-
255
- // register a Accordion Block.
256
- acf_register_block(array(
257
- 'name' => 'acfb-accordion',
258
- 'mode' => 'preview',
259
- 'title' => __('Accordion'),
260
- 'description' => __('Add accordion content in your pages/posts.'),
261
- 'render_callback' => 'acf_blocks_template',
262
- 'category' => 'acfb-blocks',
263
- 'icon' => '<svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M0 0v180.705882h1024V0H0z m963.764706 120.470588H60.235294V60.235294h903.529412v60.235294zM0 783.058824h1024V240.941176H0v542.117648z m60.235294-481.882353h903.529412v421.647058H60.235294V301.176471zM0 1024h1024v-180.705882H0v180.705882z m60.235294-120.470588h903.529412v60.235294H60.235294v-60.235294z" /></svg>',
264
- 'enqueue_assets' => function(){
265
- wp_enqueue_style( 'acfb-blocks-css', plugin_dir_url( __FILE__ ) . 'css/acfblocks.css' );
266
- wp_enqueue_script( 'acfb-accordion-js', plugin_dir_url( __FILE__ ) . 'js/accordion.js', array('jquery'), '', true );
267
- },
268
- ));
269
-
270
- // register a Scrollable Image Block.
271
- acf_register_block(array(
272
- 'name' => 'acfb-scrollable-image',
273
- 'mode' => 'preview',
274
- 'title' => __('Scrollable Image'),
275
- 'description' => __('Add Scrollable Image in your pages/posts.'),
276
- 'render_callback' => 'acf_blocks_template',
277
- 'category' => 'acfb-blocks',
278
- 'icon' => '<svg height="512pt" viewBox="-90 0 512 512" width="512pt" xmlns="http://www.w3.org/2000/svg"><path d="m166.238281 430.144531-89.769531-94.898437 29.058594-27.488282 60.632812 64.097657 60.273438-64.058594 29.132812 27.410156zm165.761719-38.144531v-272c0-66.167969-53.832031-120-120-120h-92c-66.167969 0-120 53.832031-120 120v272c0 66.167969 53.832031 120 120 120h92c66.167969 0 120-53.832031 120-120zm-120-352c44.113281 0 80 35.886719 80 80v272c0 44.113281-35.886719 80-80 80h-92c-44.113281 0-80-35.886719-80-80v-272c0-44.113281 35.886719-80 80-80zm-46 41c-11.046875 0-20 8.953125-20 20s8.953125 20 20 20 20-8.953125 20-20-8.953125-20-20-20zm0 80c-11.046875 0-20 8.953125-20 20s8.953125 20 20 20 20-8.953125 20-20-8.953125-20-20-20zm0 80c-11.046875 0-20 8.953125-20 20s8.953125 20 20 20 20-8.953125 20-20-8.953125-20-20-20zm0 0"/></svg>',
279
- 'enqueue_assets' => function(){
280
- wp_enqueue_style( 'acfb-blocks-css', plugin_dir_url( __FILE__ ) . 'css/acfblocks.css' );
281
- },
282
- ));
283
-
284
-
285
- // register a Business Hours Block.
286
- acf_register_block(array(
287
- 'name' => 'acfb-business-hours',
288
- 'mode' => 'preview',
289
- 'title' => __('Business Hours'),
290
- 'description' => __('Add Business Hours in your pages/posts.'),
291
- 'render_callback' => 'acf_blocks_template',
292
- 'category' => 'acfb-blocks',
293
- 'icon' => '<svg enable-background="new 0 0 512 512" version="1.1" viewBox="0 0 512 512" xml:space="preserve" xmlns="http://www.w3.org/2000/svg">
294
- <circle cx="386" cy="210" r="20"/>
295
- <path d="m432 40h-26v-20c0-11.046-8.954-20-20-20s-20 8.954-20 20v20h-91v-20c0-11.046-8.954-20-20-20s-20 8.954-20 20v20h-90v-20c0-11.046-8.954-20-20-20s-20 8.954-20 20v20h-25c-44.112 0-80 35.888-80 80v312c0 44.112 35.888 80 80 80h153c11.046 0 20-8.954 20-20s-8.954-20-20-20h-153c-22.056 0-40-17.944-40-40v-312c0-22.056 17.944-40 40-40h25v20c0 11.046 8.954 20 20 20s20-8.954 20-20v-20h90v20c0 11.046 8.954 20 20 20s20-8.954 20-20v-20h91v20c0 11.046 8.954 20 20 20s20-8.954 20-20v-20h26c22.056 0 40 17.944 40 40v114c0 11.046 8.954 20 20 20s20-8.954 20-20v-114c0-44.112-35.888-80-80-80z"/>
296
- <path d="m391 270c-66.72 0-121 54.28-121 121s54.28 121 121 121 121-54.28 121-121-54.28-121-121-121zm0 202c-44.663 0-81-36.336-81-81s36.337-81 81-81 81 36.336 81 81-36.337 81-81 81z"/>
297
- <path d="m420 371h-9v-21c0-11.046-8.954-20-20-20s-20 8.954-20 20v41c0 11.046 8.954 20 20 20h29c11.046 0 20-8.954 20-20s-8.954-20-20-20z"/>
298
- <circle cx="299" cy="210" r="20"/>
299
- <circle cx="212" cy="297" r="20"/>
300
- <circle cx="125" cy="210" r="20"/>
301
- <circle cx="125" cy="297" r="20"/>
302
- <circle cx="125" cy="384" r="20"/>
303
- <circle cx="212" cy="384" r="20"/>
304
- <circle cx="212" cy="210" r="20"/>
305
- </svg>',
306
- 'enqueue_assets' => function(){
307
- wp_enqueue_style( 'acfb-blocks-css', plugin_dir_url( __FILE__ ) . 'css/acfblocks.css' );
308
- },
309
- ));
310
-
311
-
312
- // register a Facebook Page Block.
313
- acf_register_block(array(
314
- 'name' => 'acfb-facebook-page',
315
- 'mode' => 'preview',
316
- 'title' => __('Facebook Page'),
317
- 'description' => __('Add Facebook Page in your pages/posts.'),
318
- 'render_callback' => 'acf_blocks_template',
319
- 'category' => 'acfb-blocks',
320
- 'icon' => '<svg width="100" height="100" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
321
- <g clip-path="url(#clip0)">
322
- <rect width="100" height="100" fill="url(#pattern0)"/>
323
- <rect x="61" y="-5" width="42" height="43.5273" rx="21" fill="white"/>
324
- <rect x="61.7635" y="-3.47278" width="41.2364" height="41.2364" fill="url(#pattern1)"/>
325
- </g>
326
- <defs>
327
- <pattern id="pattern0" patternContentUnits="objectBoundingBox" width="1" height="1">
328
- <use xlink:href="#image0" transform="scale(0.01)"/>
329
- </pattern>
330
- <pattern id="pattern1" patternContentUnits="objectBoundingBox" width="1" height="1">
331
- <use xlink:href="#image1" transform="scale(0.01)"/>
332
- </pattern>
333
- <clipPath id="clip0">
334
- <rect width="100" height="100" fill="white"/>
335
- </clipPath>
336
- <image id="image0" width="100" height="100" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAABmJLR0QA/wD/AP+gvaeTAAAEMElEQVR4nO2du2sVQRSHvxijjZoHEgu1Ed+iplELxUKj4KNQIZ1CfCCIXUT/CRNbUXyW4hOxVUvxVRgVsTWxSES88dHcoLGYK96YvXvX3Zk9527OB9MsnDNn5sfuzM6Z2QXDMAzDMAzDP02B/HYAa4HOQP6lGQUGgS/SgdRjOXAbGAcmCl7GgVvAMi89F4CdwFfkOyrvMgZ0e+g/ryxneopRLcrSzL3okTvId4p0uZm5F/EzqHcAI8BMD74amXFgARkH+hkeAlmPiQHQAqzL6sSHIB0efBSF+Vkd+BDEh4+ikLkvrDOVYYIowwRRhgmiDBNEGSaIMkwQZZggypBe8hgCLgPvgZ/CsTQDK4BjwCLhWDLRQ7rV0VdAq0C89WjDZQPTtKkna+WSj6w+XB5BGyXglFTlkoI8F6y7Hs+kKpYURPNzerFUxZKCnBasux5npCqWFKQXuAqswc1wpGnGxXIdOCQVhPS0t7dSjAr2YqgME0QZJogyTBBlmCDKMEGUYYIowwRRhgmiDBNEGSaIMkwQZUgvLv7JqQ8DG4AjuG39cYxXbJ4CPzzGYjl1pubUtwDlGJsysDloa4Rz6j5IK8j2Gv4uxNicD9WIf9gRE0NhNznUyqnH5bNfhAjkP2MIisacelw+O69nu+XUK7QBR2NsjgPtYcKZhFhO3Qdpx5AJ/ubU5+E+PPA6gc0g7qD+HM/tqM6pp21PQw/qRSwNPagbEZggyjBBlGGCKMMEUYb04iLAW9ziYhfu4y1JGAFe4n9xcSWw2qNPEdJOe8eAXVV+ZgH9CezOUn9FOAu7Sf/tr4Z+DzkR4asJeBxj85Bw34ms5mRMDIV9D7kXcW2ixvVqm4kw4Uzidg51RKJxUI+7A/K4O0DweISkIAcirjUB+2Js9pGPKPtzqCMYaceQr8CeKj+zgXMJ7AZwE4BQ7AW+pWxT5jFEcto7F3gAvMPl1rtI9uHlPuAgbtr73WM8zcCqShFDw3tImk7oZPKUuTBoHNSnNSaIMkwQZZggyjBBlCEtyBXcxoJW3Oa01wlsqjc5NHksMyuxXPPRMEnSvhheivDVCnyIsRkmn21AV2NiKOzi4kDEtTHcXVOLi+TzV5v+HOqIRFKQjzWuD6Ww8c1wTvVMQVKQjTWub4qx2RAikAhqxdYQpB1DBnFbR6vZSvz/q8q4IwshaSfZDsrCLS6uBd7gBvch3J1xuE5MLcAj3KD7hDA59WPAQo9+c8e2khZklmVEYIIowwRRhgmiDBNEGSaIMkwQZZggyvAhyC8PPopC5r7wIchnDz6KwqesDnxsy2wDRgl7RKARUPNz4hJw34OfRucu+STPErEMl+2TXtyTKiVgSeZe9Ew301OUErDNQ/8FYSlwk/hvXhWllIEbeL4zQp21aMcloJIe4mw0RnAZz5J0IIZhGIZhGEYSfgOAPc5a5UN6DQAAAABJRU5ErkJggg=="/>
337
- <image id="image1" width="100" height="100" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAABmJLR0QA/wD/AP+gvaeTAAAFwElEQVR4nO2dW2gdRRjHfybGxFOFaiVGWzVa0CBSbFFQiZWmFa212IeiCFbqBS/1TSzog0K9PKgo1isFn+KlD4pS9EFsqiCRQhUqhrZGmyaaUo1ak6hpqDE9PnxHMCUx883OnJndMz8Y9mVm9z/f/+zOzmXnQCKRSCQSiUQikUgkEol4OCG0AEOagcXARf9JzcAc4LTKEWAMGK4ch4BvgW+AXmA38EtVVVsQqyEl4FqgA1gGXEJ2rWWgB/gU+ATYDoxnPGehqQPagS3AKBJAn2kU6ARWA/VVqF9uaAI2AAfwb8JMqQ+4H2j0XNeoKQEPAYcIZ8Tx6RDwYEVbTbEa6Ce8ATOlQWCtt9pHRCvwAeEDbpq2Aef6CEQMrAF+I3yQtWkUuNlDPILRCGwmfGCzpi0UoNGfB+wkfDBdpW7gdKcRqiJnA18TPoiu017gHIdxqgptwA+ED56v9D0yfJML5gMDhA+a73QQOM9NyPwxD7mlQwerWmkPEbcpjRSrATdNnxPp29fLhA9OqLTZQfwAd8Pva4F3HJ3LFePALmTgcBjplI4hg5knV45zKscW5M3pAuBUi2uVkRi8l1m1A1qBEcL/SsvIpNTTyDD+SRZ12ZTh2sNE0sjHMDY1DjxK9lHaLIaUkbGvoNxEeDMGgEWO6pPVkDJwoyMtakqE72/0Awsc1smFIQeQNsqKOnvtbCDsM3McmVc5GFDDdJwP3FvtizYRfqZvo4d6ubhDysiPxKpvYnuH3AmcZVnWBYPAiwGvPxvzgfU2BW0MqUPmwkPyEnA0sIbZ2IhFP8/GkGuQ52QojgFvBry+KQuBq7WFTrS40DqLMi7ZDfxoUe46ZKlPG7LqcTqs345mYB3wmeNzTqEE/E7Yxvw5C92PB9I6gnuTpxBDR3C9UvPKwHpXacRq25AOZX4f9CvzP+ZFhTmqmGkNWabM74NhRd4FwBW+hBjizZBmZBV6aEYVedu9qTBnEXCGaWaNIYuJ4/OFEUXehd5UmFOHxM44symxrLI4osgby3y3cezyaIiGptACKngx5EILIQnBOHYaQ1oshCQE49hpDLGZ/E8IxrFLhlQHL4acYiEkIRgboulXHMVuaY0plyILtGdD01MvoZu568TPIoW/THVoht/H8GvIKLpgm3AEXb/F1zzPH6YZNY+sMQsheaIefz37P00zagwxdjmntOKvI+nFkEELIXmizeO5TdpGQGfIfgshecLn0JBx7DSG9FkIyRM+DTGOncaQfRZC8oTPR1avj5POBSbxN/fc6kO0giH81GsSiZ0RmjtkBPl+sIjMZealQVnpQTGppl2X1Y2/adxbgcMG+V5HFsuZ0A5cbJDP53fn3R7PzSrCLwNqUOh9JQK9KxV61atOPsb98EaRGQF2aApoDZkAPlSWqWXeRwYWjbFZbP2GRZlaZau2gI0h25E3h8T/swfo0hay/WDnNctytcQLSKOuwtaQTnKwKXFAfgbesiloa8gY8KRl2VpgEwE2aW4AviP1Q45PvUqNU8jyWfQE8EiG8kXlYSQ2VmQxBOBdItlwJRK2IX0Pa7IaAvAAstNOrfMrDjYMcGHIT4gptc59yBB+NDxP7Tbqzyo0VY164CNqz5Au7D4vnxYXj6x/mQRuo7iTWNOxD7gF+NvVCV0aAtKwdeBpDjky9gMrMJtUM8a1ISAN2/XIZsNFZQBYjuyI5BQfhoAIvhLZBqNo9ABLUSx+0+DLEJD9SJYiDX1R6ELm6XO9irMBeAZZmJDXt6xjyKuts7epGFiO3DV5M2QIuMGqxjmgBXib/BiyFTjTsq65YgXyahyrIXuJY6OdqtIA3IUsRI7FkD7gHuU1CkcDcAfwJeEM+Qq4nYI12i5YAryK9Ph9G3IY2UxziSPthaYeuAp4CvgCWWyW1ZAJ5N8SnkD6EuluyEAjcDkyAaT5I+E1wN3AZcSzEU0ikUgkEolEIpFIJBKJ3PAPKXuAONOCAmsAAAAASUVORK5CYII="/>
338
- </defs>
339
- </svg>',
340
- 'enqueue_assets' => function(){
341
- wp_enqueue_style( 'acfb-blocks-css', plugin_dir_url( __FILE__ ) . 'css/acfblocks.css' );
342
- },
343
- ));
344
-
345
- // register a Acf Meta Display Block.
346
- acf_register_block(array(
347
- 'name' => 'acfb-meta-display',
348
- 'mode' => 'preview',
349
- 'title' => __('Acf Meta Display'),
350
- 'description' => __('Add Acf Meta Display in your pages/posts.'),
351
- 'render_callback' => 'acf_blocks_template',
352
- 'category' => 'acfb-blocks',
353
- 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" id="Layer_1" data-name="Layer 1" viewBox="0 0 512 512"><title>Location</title><path d="M360,153a8,8,0,0,0-8-8H161a8,8,0,0,0-8,8V290a8,8,0,0,0,8,8H352a8,8,0,0,0,8-8Zm-17,8v71.566l-44.125-31.419a7.842,7.842,0,0,0-10.118.823l-36.029,35.466-41.684-20.33a7.527,7.527,0,0,0-7.277.271L169,237.681V161ZM169,256.178l39.122-22.822L240.793,249.2,208.19,281H169ZM231.016,281l64.07-63.062L343,252.173V281Z"/><path d="M245.8,220.424a22.96,22.96,0,1,0-22.96-22.96A22.986,22.986,0,0,0,245.8,220.424Zm0-29.92a6.96,6.96,0,1,1-6.96,6.96A6.968,6.968,0,0,1,245.8,190.5Z"/><path d="M256,9.677c-116.861,0-211.935,91.049-211.935,202.964,0,35.921,11.076,73.539,32.917,111.811,17.261,30.246,41.272,61,71.365,91.4,51.023,51.547,101.231,83.863,103.344,85.213a8,8,0,0,0,8.618,0c2.113-1.35,52.321-33.666,103.344-85.213,30.093-30.4,54.1-61.152,71.365-91.4,21.841-38.272,32.917-75.89,32.917-111.811C467.935,100.726,372.861,9.677,256,9.677Zm165.2,306.7c-16.532,29-39.646,58.609-68.7,87.994A677.751,677.751,0,0,1,256,484.72a677.751,677.751,0,0,1-96.5-80.347c-29.056-29.385-52.17-58.991-68.7-87.994C70.405,280.6,60.065,245.7,60.065,212.641c0-103.092,87.9-186.964,195.935-186.964s195.935,83.872,195.935,186.964C451.935,245.7,441.6,280.6,421.2,316.379Z"/><path d="M256,61.121c-86.511,0-156.893,70.382-156.893,156.893S169.489,374.907,256,374.907s156.893-70.382,156.893-156.893S342.511,61.121,256,61.121Zm0,297.786c-77.688,0-140.893-63.2-140.893-140.893S178.312,77.121,256,77.121s140.893,63.205,140.893,140.893S333.688,358.907,256,358.907Z"/></svg>',
354
- 'enqueue_assets' => function(){
355
- wp_enqueue_style( 'acfb-blocks-css', plugin_dir_url( __FILE__ ) . 'css/acfblocks.css' );
356
- },
357
- ));
358
-
359
- add_action('acf/input/admin_enqueue_scripts', function () {
360
- wp_enqueue_script('acfb-data-js', plugin_dir_url(__FILE__) . 'js/acfdata.js', uniqid(), false);
361
- });
362
-
363
-
364
- // register a Fb Like Button.
365
- acf_register_block(array(
366
- 'name' => 'acfb-fb-like-button',
367
- 'mode' => 'preview',
368
- 'title' => __('Fb Like Button'),
369
- 'description' => __('Add Fb Like Button in your pages/posts.'),
370
- 'render_callback' => 'acf_blocks_template',
371
- 'category' => 'acfb-blocks',
372
- 'icon' => '<svg enable-background="new 0 0 512 512" version="1.1" viewBox="0 0 512 512" xml:space="preserve" xmlns="http://www.w3.org/2000/svg">
373
- <path d="m512 304c0-12.821-5.099-24.768-13.888-33.579 9.963-10.901 15.04-25.515 13.653-40.725-2.496-27.115-26.923-48.363-55.637-48.363h-131.78c6.528-19.819 16.981-56.149 16.981-85.333 0-46.272-39.317-85.333-64-85.333-22.144 0-37.995 12.48-38.656 12.992-2.539 2.027-4.011 5.099-4.011 8.341v72.341l-61.461 133.1-2.539 1.301v-4.075c0-5.888-4.779-10.667-10.667-10.667h-106.67c-29.418 1e-3 -53.333 23.916-53.333 53.334v170.67c0 29.419 23.915 53.333 53.333 53.333h64c23.061 0 42.773-14.72 50.197-35.264 17.75 9.131 41.643 13.931 56.47 13.931h195.82c23.232 0 43.563-15.659 48.341-37.248 2.453-11.136 1.024-22.336-3.84-32.064 15.744-7.915 26.347-24.192 26.347-42.688 0-7.552-1.728-14.784-4.992-21.312 15.744-7.936 26.325-24.192 26.325-42.688zm-44.992 26.325c-4.117 0.491-7.595 3.285-8.917 7.232-1.301 3.947-0.213 8.277 2.816 11.136 5.419 5.099 8.427 11.968 8.427 19.307 0 13.461-10.176 24.768-23.637 26.325-4.117 0.491-7.595 3.285-8.917 7.232-1.301 3.947-0.213 8.277 2.816 11.136 7.019 6.613 9.835 15.893 7.723 25.451-2.624 11.904-14.187 20.523-27.499 20.523h-195.82c-17.323 0-46.379-8.128-56.448-18.219-3.051-3.029-7.659-3.925-11.627-2.304-3.989 1.643-6.592 5.547-6.592 9.856 0 17.643-14.357 32-32 32h-64c-17.643 0-32-14.357-32-32v-170.67c0-17.643 14.357-32 32-32h96v10.667c0 3.691 1.92 7.125 5.077 9.088 3.115 1.877 7.04 2.069 10.368 0.448l21.333-10.667c2.155-1.067 3.883-2.859 4.907-5.056l64-138.67c0.64-1.408 0.981-2.944 0.981-4.48v-68.885c4.438-2.453 12.14-5.781 21.334-5.781 11.691 0 42.667 29.056 42.667 64 0 37.547-20.437 91.669-20.629 92.203-1.237 3.264-0.811 6.955 1.173 9.856 2.005 2.88 5.291 4.608 8.789 4.608h146.8c17.792 0 32.896 12.736 34.389 28.992 1.131 12.16-4.715 23.723-15.189 30.187-3.264 2.005-5.205 5.632-5.056 9.493s2.368 7.317 5.781 9.088c9.024 4.587 14.613 13.632 14.613 23.573 1e-3 13.461-10.175 24.768-23.658 26.325z"/><path d="m160 245.33c-5.888 0-10.667 4.779-10.667 10.667v192c0 5.888 4.779 10.667 10.667 10.667s10.667-4.779 10.667-10.667v-192c0-5.888-4.779-10.667-10.667-10.667z"/></svg>',
374
- 'enqueue_assets' => function(){
375
- wp_enqueue_style( 'acfb-blocks-css', plugin_dir_url( __FILE__ ) . 'css/acfblocks.css' );
376
- },
377
- ));
378
-
379
- // register a Divider
380
- acf_register_block(array(
381
- 'name' => 'acfb-divider',
382
- 'mode' => 'preview',
383
- 'title' => __('Divider'),
384
- 'description' => __('Add Divider in your pages/posts.'),
385
- 'render_callback' => 'acf_blocks_template',
386
- 'category' => 'acfb-blocks',
387
- 'icon' => '<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
388
- width="100.000000pt" height="100.000000pt" viewBox="0 0 100.000000 100.000000"
389
- preserveAspectRatio="xMidYMid meet">
390
- <metadata>
391
- Created by potrace 1.16, written by Peter Selinger 2001-2019
392
- </metadata>
393
- <g transform="translate(0.000000,100.000000) scale(0.100000,-0.100000)"
394
- fill="#000000" stroke="none">
395
- <path d="M190 675 l0 -235 305 0 305 0 0 235 0 235 -305 0 -305 0 0 -235z
396
- m580 55 c0 -82 -2 -150 -5 -150 -3 0 -26 20 -51 45 -53 53 -77 56 -119 15 -28
397
- -27 -33 -29 -45 -15 -24 29 -54 17 -120 -50 -53 -52 -71 -64 -97 -65 -22 0
398
- -33 -5 -33 -15 0 -12 36 -15 238 -18 l237 -2 -280 -1 c-154 0 -263 1 -242 3
399
- 50 6 52 33 2 33 l-35 0 0 185 0 185 275 0 275 0 0 -150z m-11 -186 c7 4 11 -1
400
- 11 -13 0 -20 -5 -21 -127 -21 l-126 0 64 65 63 65 52 -51 c29 -28 57 -48 63
401
- -45z"/>
402
- <path d="M346 853 c-3 -3 -6 -18 -7 -32 0 -26 0 -26 -9 -3 -11 27 -40 29 -40
403
- 2 0 -12 -5 -17 -14 -14 -19 7 -30 -14 -17 -30 9 -10 8 -15 -4 -20 -24 -9 -18
404
- -26 9 -26 15 0 26 7 29 18 4 13 5 12 6 -4 1 -15 -6 -24 -24 -28 -14 -4 -25
405
- -13 -25 -21 0 -18 36 -20 47 -2 6 10 15 10 43 0 19 -6 27 -12 18 -12 -23 -1
406
- -25 -51 -3 -51 8 0 15 8 15 17 0 13 3 14 12 5 18 -18 28 -15 28 8 0 14 7 20
407
- 21 20 14 0 19 5 17 18 -2 10 -12 17 -25 16 -12 0 -20 3 -17 8 3 4 16 8 30 8
408
- 15 0 24 6 24 15 0 8 -8 15 -17 15 -15 0 -15 2 -4 9 18 12 6 45 -14 37 -10 -4
409
- -15 1 -15 14 0 23 -10 26 -28 8 -9 -9 -12 -8 -12 4 0 19 -14 31 -24 21z"/>
410
- <path d="M0 260 l0 -70 500 0 500 0 0 70 0 70 -500 0 -500 0 0 -70z m960 0 l0
411
- -30 -460 0 -460 0 0 30 0 30 460 0 460 0 0 -30z"/>
412
- </g>
413
- </svg>',
414
- 'enqueue_assets' => function(){
415
- wp_enqueue_style( 'acfb-blocks-css', plugin_dir_url( __FILE__ ) . 'css/acfblocks.css' );
416
- },
417
- ));
418
-
419
- // register a Random Image
420
- acf_register_block(array(
421
- 'name' => 'acfb-random-image',
422
- 'mode' => 'preview',
423
- 'title' => __('Random Image'),
424
- 'description' => __('Add Random Image in your pages/posts.'),
425
- 'render_callback' => 'acf_blocks_template',
426
- 'category' => 'acfb-blocks',
427
- 'icon' => '<svg viewBox="0 -21 511.98744 511" xmlns="http://www.w3.org/2000/svg"><path d="m377.652344 469.828125c-4.03125 0-8.148438-.511719-12.226563-1.578125l-329.898437-88.34375c-25.449219-7.019531-40.617188-33.34375-33.960938-58.773438l36.265625-139.070312c2.21875-8.535156 10.945313-13.71875 19.519531-11.433594 8.535157 2.21875 13.675782 10.964844 11.4375 19.519532l-36.269531 139.09375c-2.238281 8.574218 2.859375 17.425781 11.394531 19.773437l329.707032 88.300781c8.46875 2.238282 17.214844-2.796875 19.433594-11.222656l11.261718-45.441406c2.136719-8.574219 10.796875-13.78125 19.371094-11.6875 8.578125 2.132812 13.804688 10.792968 11.691406 19.367187l-11.304687 45.65625c-5.699219 21.609375-25.152344 35.839844-46.421875 35.839844zm0 0"/><path d="m463.988281 341.828125h-330.667969c-26.472656 0-48-21.527344-48-48v-245.335937c0-26.472657 21.527344-48 48-48h330.667969c26.472657 0 48 21.527343 48 48v245.335937c0 26.472656-21.527343 48-48 48zm-330.667969-309.335937c-8.832031 0-16 7.167968-16 16v245.335937c0 8.832031 7.167969 16 16 16h330.667969c8.832031 0 16-7.167969 16-16v-245.335937c0-8.832032-7.167969-16-16-16zm0 0"/><path d="m191.988281 149.828125c-23.53125 0-42.667969-19.136719-42.667969-42.667969s19.136719-42.667968 42.667969-42.667968 42.664063 19.136718 42.664063 42.667968-19.132813 42.667969-42.664063 42.667969zm0-53.335937c-5.890625 0-10.667969 4.78125-10.667969 10.667968 0 5.886719 4.777344 10.667969 10.667969 10.667969 5.886719 0 10.664063-4.78125 10.664063-10.667969 0-5.886718-4.777344-10.667968-10.664063-10.667968zm0 0"/><path d="m101.746094 320.066406c-4.09375 0-8.191406-1.558594-11.304688-4.691406-6.25-6.25-6.25-16.386719 0-22.636719l96.425782-96.425781c14.59375-14.59375 38.335937-14.59375 52.90625 0l25.792968 25.792969 79.230469-95.105469c7.082031-8.492188 17.472656-13.398438 28.503906-13.460938 11.859375-.660156 21.460938 4.734376 28.605469 13.121094l106.199219 123.902344c5.757812 6.699219 4.96875 16.8125-1.730469 22.570312-6.71875 5.761719-16.808594 4.972657-22.570312-1.726562l-106.238282-123.945312c-1.410156-1.6875-3.136718-1.601563-4.097656-1.902344-.914062 0-2.6875.277344-4.09375 1.941406l-90.453125 108.589844c-2.882813 3.453125-7.082031 5.546875-11.5625 5.738281-4.566406.253906-8.875-1.496094-12.035156-4.671875l-38.183594-38.1875c-2.710937-2.710938-4.949219-2.710938-7.660156 0l-96.425781 96.40625c-3.117188 3.132812-7.210938 4.691406-11.308594 4.691406zm0 0"/></svg>',
428
- 'enqueue_assets' => function(){
429
- wp_enqueue_style( 'acfb-blocks-css', plugin_dir_url( __FILE__ ) . 'css/acfblocks.css' );
430
- wp_enqueue_script( 'acfb-random-image-js', plugin_dir_url( __FILE__ ) . 'js/random-image.js', array('jquery'), '', true );
431
- },
432
- ));
433
-
434
- }
435
-
436
  }
1
+ <?php
2
+ // Register Blocks
3
+ add_action('acf/init', 'acfb_blocks_free');
4
+ function acfb_blocks_free() {
5
+
6
+ // check function exists.
7
+ if( function_exists('acf_register_block_type') ) {
8
+
9
+ // register a testimonial block.
10
+ acf_register_block_type(array(
11
+ 'name' => 'acfb-testimonial',
12
+ 'mode' => 'preview',
13
+ 'title' => __('Testimonial'),
14
+ 'description' => __('Let others know what your clients or customers say about you.'),
15
+ 'render_callback' => 'acf_blocks_template',
16
+ 'category' => 'acfb-blocks',
17
+ 'icon' => '<svg viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"></defs><title/><g data-name="22-chat" id="_22-chat"><polygon class="acfb_svg_icon" points="31 3 1 3 1 23 8 23 14 29 14 23 31 23 31 3"/><line class="acfb_svg_icon" x1="7" x2="25" y1="9" y2="9"/><line class="acfb_svg_icon" x1="7" x2="25" y1="13" y2="13"/><line class="acfb_svg_icon" x1="7" x2="25" y1="17" y2="17"/></g></svg>',
18
+ 'enqueue_assets' => function(){
19
+ wp_enqueue_style( 'acfb-blocks-css', plugin_dir_url( __FILE__ ) . 'css/acfblocks.css' );
20
+ },
21
+ ));
22
+
23
+ // register a team block.
24
+ acf_register_block_type(array(
25
+ 'name' => 'acfb-team',
26
+ 'mode' => 'preview',
27
+ 'title' => __('Team'),
28
+ 'description' => __('Introduce your team to your site visitors in style.'),
29
+ 'render_callback' => 'acf_blocks_template',
30
+ 'category' => 'acfb-blocks',
31
+ 'icon' => '<svg viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"><title/><g data-name="79-users" id="_79-users"><circle class="acfb_svg_icon" cx="16" cy="13" r="5"/><path class="acfb_svg_icon" d="M23,28A7,7,0,0,0,9,28Z"/><path class="acfb_svg_icon" d="M24,14a5,5,0,1,0-4-8"/><path class="acfb_svg_icon" d="M25,24h6a7,7,0,0,0-7-7"/><path class="acfb_svg_icon" d="M12,6a5,5,0,1,0-4,8"/><path class="acfb_svg_icon" d="M8,17a7,7,0,0,0-7,7H7"/></g></svg>',
32
+ 'enqueue_assets' => function(){
33
+ wp_enqueue_style( 'acfb-blocks-css', plugin_dir_url( __FILE__ ) . 'css/acfblocks.css' );
34
+ },
35
+ ));
36
+
37
+ // register a multi buttons block.
38
+ acf_register_block_type(array(
39
+ 'name' => 'acfb-multibuttons',
40
+ 'mode' => 'preview',
41
+ 'title' => __('Multi Buttons'),
42
+ 'description' => __('Display multiple buttons inline with ease.'),
43
+ 'render_callback' => 'acf_blocks_template',
44
+ 'category' => 'acfb-blocks',
45
+ 'icon' => '<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title/><g data-name="36.option-memu" id="_36.option-memu"><rect class="acfb_svg_icon" height="4" width="4" x="1" y="10"/><rect class="acfb_svg_icon" height="4" width="4" x="10" y="10"/><rect class="acfb_svg_icon" height="4" width="4" x="19" y="10"/></g></svg>',
46
+ 'enqueue_assets' => function(){
47
+ wp_enqueue_style( 'acfb-blocks-css', plugin_dir_url( __FILE__ ) . 'css/acfblocks.css' );
48
+ },
49
+ ));
50
+
51
+ // register a pricing box block.
52
+ acf_register_block_type(array(
53
+ 'name' => 'acfb-pricingbox',
54
+ 'mode' => 'preview',
55
+ 'title' => __('Pricing Box'),
56
+ 'description' => __('Display your plans and offers in style.'),
57
+ 'render_callback' => 'acf_blocks_template',
58
+ 'category' => 'acfb-blocks',
59
+ 'icon' => '<svg height="512pt" viewBox="0 -47 512 512" width="512pt" xmlns="http://www.w3.org/2000/svg"><path d="m85.332031 145.859375v-43.800781c9.648438 2.433594 16.574219 10.882812 17.066407 20.820312 0 4.714844 3.820312 8.535156 8.535156 8.535156 4.710937 0 8.53125-3.820312 8.53125-8.535156-.652344-19.355468-14.988282-35.507812-34.132813-38.460937v-7.617188c0-4.714843-3.820312-8.535156-8.53125-8.535156-4.714843 0-8.535156 3.820313-8.535156 8.535156v7.617188c-19.140625 2.949219-33.476563 19.105469-34.132813 38.460937.65625 19.359375 14.992188 35.511719 34.132813 38.460938v43.804687c-9.648437-2.433593-16.574219-10.886719-17.066406-20.824219 0-4.714843-3.820313-8.535156-8.53125-8.535156-4.714844 0-8.535157 3.820313-8.535157 8.535156.65625 19.359376 14.992188 35.511719 34.132813 38.460938v7.617188c0 4.714843 3.820313 8.535156 8.535156 8.535156 4.710938 0 8.53125-3.820313 8.53125-8.535156v-7.617188c19.144531-2.949219 33.480469-19.101562 34.132813-38.460938-.652344-19.359374-14.988282-35.511718-34.132813-38.460937zm-34.132812-22.980469c.496093-9.9375 7.421875-18.386718 17.066406-20.820312v41.644531c-9.644531-2.4375-16.570313-10.886719-17.066406-20.824219zm34.132812 82.265625v-41.644531c9.925781 1.988281 17.066407 10.703125 17.066407 20.824219 0 10.121093-7.140626 18.835937-17.066407 20.824219zm0 0"/><path d="m298.667969 109.226562c0 4.714844 3.820312 8.535157 8.53125 8.535157 4.714843 0 8.535156-3.820313 8.535156-8.535157 0-26.597656-22.304687-48.613281-51.199219-52.300781v-14.257812c0-4.714844-3.824218-8.535157-8.535156-8.535157s-8.535156 3.820313-8.535156 8.535157v14.257812c-28.894532 3.6875-51.199219 25.703125-51.199219 52.300781 0 26.597657 22.304687 48.617188 51.199219 52.308594v71.554688c-18.386719-1.878906-32.773438-16.683594-34.132813-35.117188 0-4.710937-3.820312-8.53125-8.53125-8.53125-4.714843 0-8.535156 3.820313-8.535156 8.53125 0 26.597656 22.304687 48.613282 51.199219 52.300782v14.261718c0 4.710938 3.824218 8.53125 8.535156 8.53125s8.535156-3.820312 8.535156-8.53125v-14.257812c28.894532-3.691406 51.199219-25.703125 51.199219-52.300782 0-26.601562-22.304687-48.617187-51.199219-52.304687v-71.558594c18.386719 1.875 32.773438 16.679688 34.132813 35.113281zm-85.335938 0c1.359375-18.433593 15.746094-33.234374 34.132813-35.113281v70.230469c-18.386719-1.878906-32.773438-16.683594-34.132813-35.117188zm85.335938 88.746094c-1.359375 18.433594-15.746094 33.234375-34.132813 35.113282v-70.230469c18.386719 1.882812 32.773438 16.683593 34.132813 35.117187zm0 0"/><path d="m426.667969 161.339844v43.804687c-9.648438-2.433593-16.574219-10.882812-17.066407-20.820312 0-4.710938-3.820312-8.535157-8.535156-8.535157-4.710937 0-8.53125 3.824219-8.53125 8.535157.652344 19.359375 14.988282 35.511719 34.132813 38.460937v7.613282c0 4.714843 3.820312 8.535156 8.53125 8.535156 4.714843 0 8.535156-3.820313 8.535156-8.535156v-7.617188c19.140625-2.949219 33.476563-19.101562 34.132813-38.460938-.65625-19.359374-14.992188-35.511718-34.132813-38.460937v-43.800781c9.648437 2.433594 16.574219 10.882812 17.066406 20.820312 0 4.714844 3.820313 8.535156 8.53125 8.535156 4.714844 0 8.535157-3.820312 8.535157-8.535156-.65625-19.355468-14.992188-35.507812-34.132813-38.460937v-7.617188c0-4.714843-3.820313-8.535156-8.535156-8.535156-4.710938 0-8.53125 3.820313-8.53125 8.535156v7.617188c-19.144531 2.949219-33.480469 19.105469-34.132813 38.460937.652344 19.359375 14.988282 35.511719 34.132813 38.460938zm34.132812 22.980468c-.492187 9.9375-7.417969 18.386719-17.066406 20.820313v-41.640625c9.648437 2.433594 16.574219 10.882812 17.066406 20.820312zm-34.132812-82.261718v41.644531c-9.648438-2.4375-16.574219-10.886719-17.066407-20.824219.492188-9.9375 7.417969-18.386718 17.066407-20.820312zm0 0"/><path d="m494.933594 25.601562h-128v-8.535156c-.011719-9.421875-7.644532-17.0546872-17.066406-17.066406h-187.734376c-9.421874.0117188-17.054687 7.644531-17.066406 17.066406v8.535156h-128c-9.421875.007813-17.0546872 7.644532-17.066406 17.066407v221.867187c.0117188 9.417969 7.644531 17.054688 17.066406 17.066406h128v8.53125c.011719 9.421876 7.644532 17.054688 17.066406 17.066407h187.734376c9.421874-.011719 17.054687-7.644531 17.066406-17.066407v-8.53125h128c9.421875-.011718 17.054687-7.648437 17.066406-17.066406v-221.867187c-.011719-9.421875-7.644531-17.058594-17.066406-17.066407zm-477.867188 238.933594v-221.867187h128v221.867187zm145.066406 25.597656v-273.066406h187.734376v17.066406l.007812 238.894532-.007812.039062.007812.039063v17.027343zm332.800782-25.597656h-128v-221.867187h128zm0 0"/><path d="m222.382812 362.15625c-5-4.992188-13.097656-4.992188-18.097656 0l-34.132812 34.128906c-3.660156 3.660156-4.757813 9.164063-2.777344 13.945313 1.984375 4.78125 6.648438 7.902343 11.824219 7.902343h68.265625c5.175781-.003906 9.839844-3.121093 11.820312-7.902343 1.980469-4.777344.886719-10.28125-2.769531-13.941407zm-32.882812 38.910156 23.832031-23.832031 23.835938 23.832031zm0 0"/><path d="m341.332031 358.398438h-68.265625c-5.175781.003906-9.835937 3.121093-11.816406 7.902343s-.890625 10.285157 2.765625 13.945313l34.136719 34.132812c5 4.988282 13.097656 4.988282 18.097656 0l34.132812-34.128906c3.660157-3.660156 4.753907-9.164062 2.773438-13.949219-1.980469-4.78125-6.648438-7.898437-11.824219-7.902343zm-34.132812 40.902343-23.832031-23.835937h47.667968zm0 0"/><path d="m119.464844 298.667969h-85.332032c-4.710937 0-8.53125 3.820312-8.53125 8.53125 0 4.714843 3.820313 8.535156 8.53125 8.535156h85.332032c4.714844 0 8.535156-3.820313 8.535156-8.535156 0-4.710938-3.820312-8.53125-8.535156-8.53125zm0 0"/><path d="m315.734375 341.332031c4.710937 0 8.53125-3.820312 8.53125-8.53125 0-4.714843-3.820313-8.535156-8.53125-8.535156h-119.46875c-4.710937 0-8.53125 3.820313-8.53125 8.535156 0 4.710938 3.820313 8.53125 8.53125 8.53125zm0 0"/><path d="m477.867188 298.667969h-85.332032c-4.714844 0-8.535156 3.820312-8.535156 8.53125 0 4.714843 3.820312 8.535156 8.535156 8.535156h85.332032c4.710937 0 8.53125-3.820313 8.53125-8.535156 0-4.710938-3.820313-8.53125-8.53125-8.53125zm0 0"/></svg>',
60
+ 'enqueue_assets' => function(){
61
+ wp_enqueue_style( 'acfb-blocks-css', plugin_dir_url( __FILE__ ) . 'css/acfblocks.css' );
62
+ },
63
+ ));
64
+
65
+ // register a Star Rating block.
66
+ acf_register_block_type(array(
67
+ 'name' => 'acfb-starrating',
68
+ 'mode' => 'preview',
69
+ 'title' => __('Star Rating'),
70
+ 'description' => __('Add start ratings anywhere easily.'),
71
+ 'render_callback' => 'acf_blocks_template',
72
+ 'category' => 'acfb-blocks',
73
+ 'icon' => '<svg id="Outlined" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"><title/><g id="Fill"><path d="M28.61,11.67H20l-2.66-8.2a1.39,1.39,0,0,0-2.64,0L12,11.67H3.39a1.39,1.39,0,0,0-.82,2.51l7,5.07L6.89,27.46a1.39,1.39,0,0,0,1.32,1.82A1.43,1.43,0,0,0,9,29l7-5.07L23,29a1.43,1.43,0,0,0,.81.27,1.39,1.39,0,0,0,1.32-1.82l-2.66-8.21,7-5.07A1.39,1.39,0,0,0,28.61,11.67Zm-7.34,6-1.17.86.44,1.38,2.09,6.41-5.45-4L16,21.46l-1.18.86-5.45,4,2.09-6.41.44-1.38-1.17-.86-5.45-4h8.19l.45-1.38L16,5.89l2.08,6.4.45,1.38h8.19Z"/></g></svg>',
74
+ 'enqueue_assets' => function(){
75
+ wp_enqueue_style( 'acfb-blocks-css', plugin_dir_url( __FILE__ ) . 'css/acfblocks.css' );
76
+ },
77
+ ));
78
+
79
+ // register a Progress Bar block.
80
+ acf_register_block_type(array(
81
+ 'name' => 'acfb-progressbar',
82
+ 'mode' => 'preview',
83
+ 'title' => __('Progress Bar'),
84
+ 'description' => __('Show your progress using percentage defined progress bars.'),
85
+ 'render_callback' => 'acf_blocks_template',
86
+ 'category' => 'acfb-blocks',
87
+ 'icon' => '<svg width="455.14px" height="455.14px" enable-background="new 0 0 455.138 455.139" version="1.1" viewBox="0 0 455.138 455.139" xml:space="preserve" xmlns="http://www.w3.org/2000/svg">
88
+ <path d="m0 141.65v171.83h455.14v-171.83h-455.14zm432.72 149.42h-410.31v-127h410.31v127h-5e-3zm-328.43-19.606h-59.766v-89.652h59.767v89.652zm89.653 0h-59.765v-89.652h59.765v89.652zm93.387 0h-59.768v-89.652h59.768v89.652z"/>
89
+ </svg>',
90
+ 'enqueue_assets' => function(){
91
+ wp_enqueue_style( 'acfb-blocks-css', plugin_dir_url( __FILE__ ) . 'css/acfblocks.css' );
92
+ },
93
+ ));
94
+
95
+ // register a Counter Number block.
96
+ acf_register_block_type(array(
97
+ 'name' => 'acfb-counternumber',
98
+ 'mode' => 'preview',
99
+ 'title' => __('Counter Number'),
100
+ 'description' => __('Display stats with animated counter numbers.'),
101
+ 'render_callback' => 'acf_blocks_template',
102
+ 'category' => 'acfb-blocks',
103
+ 'icon' => '<svg id="Outlined" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"><title/><g id="Fill"><path d="M16.71,22.29l-1.42,1.42L17.59,26H16A10,10,0,0,1,8.93,8.93L7.51,7.51A12,12,0,0,0,16,28h1.59l-2.3,2.29,1.42,1.42L20,28.41a2,2,0,0,0,0-2.82Z"/><path d="M16,4H14.41l2.3-2.29L15.29.29,12,3.59a2,2,0,0,0,0,2.82l3.29,3.3,1.42-1.42L14.41,6H16a10,10,0,0,1,7.07,17.07l1.42,1.42A12,12,0,0,0,16,4Z"/></g></svg>',
104
+ 'enqueue_assets' => function(){
105
+ wp_enqueue_style( 'acfb-blocks-css', plugin_dir_url( __FILE__ ) . 'css/acfblocks.css' );
106
+ wp_enqueue_script( 'acfb-blocks-js', plugin_dir_url( __FILE__ ) . 'js/frontend.js', array('jquery'), '', false );
107
+ },
108
+ ));
109
+
110
+ // register a Price List block.
111
+ acf_register_block_type(array(
112
+ 'name' => 'acfb-pricelist',
113
+ 'mode' => 'preview',
114
+ 'title' => __('Price List'),
115
+ 'description' => __('Display price list for any product easily.'),
116
+ 'render_callback' => 'acf_blocks_template',
117
+ 'category' => 'acfb-blocks',
118
+ 'icon' => '<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title/><g data-name="6.list-menu" id="_6.list-menu"><line class="acfb_svg_icon" x1="1" x2="4" y1="6" y2="6"/><line class="acfb_svg_icon" x1="1" x2="4" y1="12" y2="12"/><line class="acfb_svg_icon" x1="1" x2="4" y1="18" y2="18"/><line class="acfb_svg_icon" x1="8" x2="23" y1="6" y2="6"/><line class="acfb_svg_icon" x1="8" x2="23" y1="12" y2="12"/><line class="acfb_svg_icon" x1="8" x2="23" y1="18" y2="18"/></g></svg>',
119
+ 'enqueue_assets' => function(){
120
+ wp_enqueue_style( 'acfb-blocks-css', plugin_dir_url( __FILE__ ) . 'css/acfblocks.css' );
121
+ },
122
+ ));
123
+
124
+ // register a Click To Tweet block.
125
+ acf_register_block_type(array(
126
+ 'name' => 'acfb-clicktotweet',
127
+ 'mode' => 'preview',
128
+ 'title' => __('Click To Tweet'),
129
+ 'description' => __('Add a tweet-able quote to let your reader tweet with 1-click.'),
130
+ 'render_callback' => 'acf_blocks_template',
131
+ 'category' => 'acfb-blocks',
132
+ 'icon' => '<svg enable-background="new 0 0 511.271 511.271" version="1.1" viewBox="0 0 511.271 511.271" xml:space="preserve" xmlns="http://www.w3.org/2000/svg">
133
+ <path d="m508.34 94.243c-2.603-2.603-6.942-3.471-10.414-2.603l-17.356 6.075c10.414-12.149 17.356-25.166 21.695-37.315 1.736-4.339 0.868-7.81-1.736-10.414-2.603-2.603-6.942-3.471-10.414-1.736-24.298 10.414-45.125 19.092-62.481 24.298 0 0.868-0.868 0-1.736 0-13.885-7.81-47.729-25.166-72.027-25.166-61.614 0.868-111.08 52.936-111.08 116.28v3.471c-90.251-17.356-139.72-43.39-193.52-99.797l-8.676-8.678-5.207 10.414c-29.505 56.407-8.678 107.61 25.166 142.32-15.62-2.603-26.034-7.81-35.58-15.62-3.471-2.603-7.81-3.471-12.149-0.868-3.471 1.736-5.207 6.942-4.339 11.281 12.149 40.786 42.522 73.763 75.498 93.722-15.62 0-28.637-1.736-41.654-10.414-3.471-1.736-8.678-1.736-12.149 0.868s-5.207 6.942-3.471 11.281c15.62 44.258 45.993 67.688 94.59 73.763-25.166 14.753-58.142 26.902-109.34 27.77-5.207 0-9.546 3.471-11.281 7.81-1.736 5.207 0 9.546 3.471 13.017 31.241 25.166 100.66 39.919 186.58 39.919 152.73 0 277.7-136.24 277.7-303.73v-2.603c19.092-9.546 34.712-27.77 42.522-52.936 0.867-3.472-1e-3 -7.811-2.604-10.414zm-52.068 49.464l-5.207 1.736v14.753c0 157.94-117.15 286.37-260.34 286.37-78.97 0-131.9-13.017-160.54-26.902 59.878-4.339 94.59-23.431 121.49-44.258l21.695-15.62h-26.034c-49.464 0-79.837-13.885-97.193-46.861 15.62 5.207 32.108 5.207 50.332 4.339 6.942-0.868 13.885-0.868 20.827-0.868l2.603-17.356c-32.976-9.546-72.027-39.051-91.119-78.969 17.356 7.81 36.447 9.546 53.803 9.546h26.902l-21.694-15.621c-18.224-13.017-72.027-59.01-45.993-124.96 55.539 54.671 108.48 79.837 203.93 97.193l10.414 1.736v-24.298c0-53.803 41.654-98.061 93.722-98.929 19.959-0.868 52.936 17.356 62.481 22.563 5.207 2.603 10.414 3.471 15.62 1.736 13.017-4.339 28.637-10.414 45.993-17.356-7.81 13.017-18.224 25.166-32.108 36.448-3.471 2.603-4.339 7.81-2.603 12.149s6.942 6.075 11.281 4.339l33.844-11.281c-6.075 11.28-15.621 24.297-32.109 30.371z"/>
134
+ </svg>',
135
+ 'enqueue_assets' => function(){
136
+ wp_enqueue_style( 'acfb-blocks-css', plugin_dir_url( __FILE__ ) . 'css/acfblocks.css' );
137
+ },
138
+ ));
139
+
140
+
141
+ // register a Post block.
142
+ acf_register_block_type(array(
143
+ 'name' => 'acfb-posts',
144
+ 'mode' => 'preview',
145
+ 'title' => __('Posts'),
146
+ 'description' => __('Display a grid or list of your blog posts.'),
147
+ 'render_callback' => 'acf_blocks_template',
148
+ 'category' => 'acfb-blocks',
149
+ 'icon' => '<svg enable-background="new 0 0 512 512" version="1.1" viewBox="0 0 512 512" xml:space="preserve" xmlns="http://www.w3.org/2000/svg">
150
+ <path d="M0,30v452h512V30H0z M482,452H30V120h452V452z M482,90H30V60h452V90z"/>
151
+ <path d="M271,160v252h181V160H271z M422,382H301V190h121V382z"/>
152
+ <rect x="60" y="160" width="181" height="30"/>
153
+ <rect x="60" y="220" width="121" height="30"/>
154
+ <rect x="60" y="300" width="181" height="30"/>
155
+ <rect x="60" y="360" width="121" height="30"/>
156
+ </svg>',
157
+ 'enqueue_assets' => function(){
158
+ wp_enqueue_style( 'acfb-blocks-css', plugin_dir_url( __FILE__ ) . 'css/acfblocks.css' );
159
+ },
160
+ ));
161
+
162
+ // register a Photo Collage block.
163
+ acf_register_block(array(
164
+ 'name' => 'acfb-photocollage',
165
+ 'mode' => 'preview',
166
+ 'title' => __('Photo Collage'),
167
+ 'description' => __('Display beautiful photo collage using pre-made templates.'),
168
+ 'render_callback' => 'acf_blocks_template',
169
+ 'category' => 'acfb-blocks',
170
+ 'icon' => '<svg enable-background="new 0 0 140.637 140.637" version="1.1" viewBox="0 0 140.64 140.64" xml:space="preserve" xmlns="http://www.w3.org/2000/svg">
171
+ <path d="m138.14 140.61h-135.64c-1.381 0-2.5-1.119-2.5-2.5v-135.59c0-1.381 1.119-2.5 2.5-2.5h135.64c1.381 0 2.5 1.119 2.5 2.5v135.59c0 1.381-1.119 2.5-2.5 2.5zm-50.637-5h48.091v-17.599h-48.091v17.599zm-53.138 0h48.138v-17.599h-48.138v17.599zm-29.362 0h24.362v-17.599h-24.362v17.599zm106.27-22.599h24.317v-17.598h-24.317v17.598zm-26.273 0h21.273v-17.598h-48.136v17.599h26.863zm-53.138 0h21.274v-17.598h-48.136v17.599h26.862zm76.911-22.598h26.817v-17.599h-48.09v17.598h21.273zm-53.136 0h26.863v-17.599h-48.138v17.598h21.275zm-50.637 0h24.362v-17.599h-24.362v17.599zm106.27-22.599h24.317v-17.598h-24.317v17.598zm-26.273 0h21.273v-17.598h-48.136v17.599h26.863zm-53.138 0h21.274v-17.598h-48.136v17.599h26.862zm76.911-22.598h26.817v-17.599h-48.09v17.599h21.273zm-53.136 0h26.863v-17.599h-48.138v17.599h21.275zm-50.637 0h24.362v-17.599h-24.362v17.599zm106.27-22.599h24.317v-17.598h-24.317v17.598zm-26.273 0h21.273v-17.598h-48.136v17.598h26.863zm-53.138 0h21.274v-17.598h-48.136v17.598h26.862z"/>
172
+ </svg>',
173
+ 'enqueue_assets' => function(){
174
+ wp_enqueue_style( 'acfb-blocks-css', plugin_dir_url( __FILE__ ) . 'css/acfblocks.css' );
175
+ },
176
+ ));
177
+
178
+ // register a Social Sharing Block.
179
+ acf_register_block(array(
180
+ 'name' => 'acfb-socialsharing',
181
+ 'mode' => 'preview',
182
+ 'title' => __('Social Sharing'),
183
+ 'description' => __('Super fast and customizable Social Media Sharing Buttons for WordPress. No JavaScript. No tracking.'),
184
+ 'render_callback' => 'acf_blocks_template',
185
+ 'category' => 'acfb-blocks',
186
+ 'icon' => '<svg enable-background="new 0 0 481.6 481.6" version="1.1" viewBox="0 0 481.6 481.6" xml:space="preserve" xmlns="http://www.w3.org/2000/svg">
187
+ <path d="m381.6 309.4c-27.7 0-52.4 13.2-68.2 33.6l-132.3-73.9c3.1-8.9 4.8-18.5 4.8-28.4 0-10-1.7-19.5-4.9-28.5l132.2-73.8c15.7 20.5 40.5 33.8 68.3 33.8 47.4 0 86.1-38.6 86.1-86.1s-38.6-86.1-86.1-86.1-86.1 38.6-86.1 86.1c0 10 1.7 19.6 4.9 28.5l-132.1 73.8c-15.7-20.6-40.5-33.8-68.3-33.8-47.4 0-86.1 38.6-86.1 86.1s38.7 86.1 86.2 86.1c27.8 0 52.6-13.3 68.4-33.9l132.2 73.9c-3.2 9-5 18.7-5 28.7 0 47.4 38.6 86.1 86.1 86.1s86.1-38.6 86.1-86.1-38.7-86.1-86.2-86.1zm0-282.3c32.6 0 59.1 26.5 59.1 59.1s-26.5 59.1-59.1 59.1-59.1-26.5-59.1-59.1 26.6-59.1 59.1-59.1zm-281.6 272.7c-32.6 0-59.1-26.5-59.1-59.1s26.5-59.1 59.1-59.1 59.1 26.5 59.1 59.1-26.6 59.1-59.1 59.1zm281.6 154.7c-32.6 0-59.1-26.5-59.1-59.1s26.5-59.1 59.1-59.1 59.1 26.5 59.1 59.1-26.5 59.1-59.1 59.1z"/>
188
+ </svg>',
189
+ 'enqueue_assets' => function(){
190
+ wp_enqueue_style( 'acfb-blocks-css', plugin_dir_url( __FILE__ ) . 'css/acfblocks.css' );
191
+ },
192
+ ));
193
+
194
+ //Register a Image Slider Block
195
+ acf_register_block(array(
196
+ 'name' => 'acfb-image-slider',
197
+ 'mode' => 'preview',
198
+ 'title' => __('Image Slider'),
199
+ 'description' => __('Display your images as a slider or carousel.'),
200
+ 'render_callback' => 'acf_blocks_template',
201
+ 'category' => 'acfb-blocks',
202
+ 'icon' => '<svg width="682pt" height="682pt" viewBox="-21 -91 682.66669 682" xmlns="http://www.w3.org/2000/svg">
203
+ <path d="m639.98 7.5312c-0.33594-6.6172-5.7969-11.863-12.484-11.863h-615c-6.6875 0-12.148 5.2461-12.484 11.863-0.015625 0.21484-0.015625 0.42578-0.015625 0.64062v474.99c0 6.9062 5.6016 12.508 12.5 12.508h615c6.8984 0 12.5-5.6016 12.5-12.508v-474.99c0-0.21484 0-0.42578-0.015625-0.64062zm-24.984 463.12h-590v-367.46h590zm0-392.46h-590v-57.668h590z"/>
204
+ <path d="m213.75 62.723h-100c-6.9062 0-12.5-5.5977-12.5-12.5 0-6.9102 5.5938-12.504 12.5-12.504h100c6.9062 0 12.5 5.5938 12.5 12.504 0 6.9023-5.5938 12.5-12.5 12.5z"/>
205
+ <path d="m63.773 62.723c-6.9023 0-12.504-5.5977-12.504-12.5 0-6.9102 5.5898-12.504 12.496-12.504h0.007813c6.9062 0 12.5 5.5938 12.5 12.504 0 6.9023-5.5938 12.5-12.5 12.5z"/>
206
+ <path d="m558.75 176.72h-50v-11.258c0-13.789-11.211-25.004-25-25.004h-327.5c-13.789 0-25 11.215-25 25.004v11.258h-50c-13.789 0-25 11.215-25 25.004v127.54c0 13.793 11.211 25.008 25 25.008h50v11.258c0 13.789 11.211 25.004 25 25.004h327.5c13.789 0 25-11.215 25-25.004v-11.258h50c13.789 0 25-11.215 25-25.008v-127.54c0-13.789-11.211-25.004-25-25.004zm-427.5 152.54h-50v-127.54h50l0.015625 127.54s0 0-0.015625 0zm352.52 36.266s0 0-0.015625 0h-327.5v-200.07h327.5v36.266l0.015625 127.89zm74.984-36.266h-50v-127.54h50l0.015625 127.54s0 0-0.015625 0z"/>
207
+ <path d="m230.8 314.23c-3.125 0-6.2539-1.168-8.6836-3.5117l-37.5-36.227c-2.4375-2.3555-3.8164-5.6055-3.8164-8.9922 0-3.3945 1.3789-6.6406 3.8164-9l37.5-36.227c4.9727-4.793 12.879-4.6562 17.68 0.30859 4.793 4.9727 4.6562 12.887-0.30859 17.68l-28.195 27.238 28.195 27.23c4.9648 4.8008 5.1016 12.715 0.30859 17.68-2.457 2.5391-5.7266 3.8203-8.9961 3.8203z"/>
208
+ <path d="m410.45 314.23c-3.2695 0-6.5391-1.2812-8.9961-3.8203-4.793-4.9648-4.6562-12.883 0.30859-17.68l28.195-27.234-28.195-27.234c-4.9648-4.793-5.1016-12.715-0.30859-17.68 4.8008-4.9648 12.711-5.1016 17.68-0.30859l37.5 36.227c2.4375 2.3594 3.8164 5.6055 3.8164 8.9961 0 3.3906-1.3789 6.6406-3.8164 8.9961l-37.5 36.227c-2.4297 2.3438-5.5586 3.5117-8.6836 3.5117z"/>
209
+ <path d="m320.02 435.65c-6.9023 0-12.504-5.5977-12.504-12.5 0-6.9062 5.5898-12.508 12.496-12.508h0.007813c6.9062 0 12.5 5.6016 12.5 12.508 0 6.9023-5.5938 12.5-12.5 12.5z"/>
210
+ <path d="m370.02 435.65c-6.9023 0-12.504-5.5977-12.504-12.5 0-6.9062 5.5898-12.508 12.496-12.508h0.007813c6.9062 0 12.5 5.6016 12.5 12.508 0 6.9023-5.5938 12.5-12.5 12.5z"/>
211
+ <path d="m270.02 435.65c-6.9023 0-12.504-5.5977-12.504-12.5 0-6.9062 5.5898-12.508 12.496-12.508h0.007813c6.9062 0 12.5 5.6016 12.5 12.508 0 6.9023-5.5938 12.5-12.5 12.5z"/>
212
+ </svg>',
213
+ 'enqueue_assets' => function(){
214
+ wp_enqueue_style( 'acfb-image-slider-css', plugin_dir_url( __FILE__ ) . 'css/swiper.min.css' );
215
+ wp_enqueue_script('jQuery');
216
+ wp_enqueue_script( 'acfb-image-slider-swiper-js' ,plugin_dir_url( __FILE__ ) . 'js/swiper.min.js', array('jquery'), '', true );
217
+
218
+ wp_enqueue_style( 'acfb-blocks-css', plugin_dir_url( __FILE__ ) . 'css/acfblocks.css' );
219
+
220
+ wp_enqueue_script( 'acfb-image-slider-custom' ,plugin_dir_url( __FILE__ ) . 'js/image-slider.js', array('jquery'), '', true );
221
+ },
222
+ ));
223
+
224
+
225
+ // register a Tabs Block.
226
+ acf_register_block(array(
227
+ 'name' => 'acfb-tabs',
228
+ 'mode' => 'preview',
229
+ 'title' => __('Tabs'),
230
+ 'description' => __('Add tabbed content in your posts/pages.'),
231
+ 'render_callback' => 'acf_blocks_template',
232
+ 'category' => 'acfb-blocks',
233
+ 'icon' => '<svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M861.29152 933.87264H162.70848c-40.08448 0-72.58112-32.49664-72.58112-72.58624V162.70848c0-40.08448 32.49664-72.58112 72.58112-72.58112h203.10016V222.72h568.06912v638.58176c-0.00512 40.07936-32.49664 72.57088-72.58624 72.57088z m5.74976-644.3264H156.95872v524.05248c0 34.12992 27.66336 61.7984 61.7984 61.7984h586.48064c34.12992 0 61.7984-27.66848 61.7984-61.7984V289.54624z m-200.49408-199.41888h194.74432c40.0896 0 72.58624 32.49664 72.58624 72.58112v34.944h-267.33056V90.12736z m-275.67616 0h250.61888v107.52512H390.87104V90.12736z"/></svg>',
234
+ 'enqueue_assets' => function(){
235
+ wp_enqueue_style( 'acfb-blocks-css', plugin_dir_url( __FILE__ ) . 'css/acfblocks.css' );
236
+ wp_enqueue_script( 'acfb-tabs-js', plugin_dir_url( __FILE__ ) . 'js/tabs.js', array('jquery'), '', true );
237
+ },
238
+ ));
239
+
240
+ // register a Toggle Block.
241
+ acf_register_block(array(
242
+ 'name' => 'acfb-toggle',
243
+ 'mode' => 'preview',
244
+ 'title' => __('Toggle'),
245
+ 'description' => __('Add toggleable content in your pages/posts.'),
246
+ 'render_callback' => 'acf_blocks_template',
247
+ 'category' => 'acfb-blocks',
248
+ 'icon' => '<svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M0 0l0 1024 1024 0 0-1024-1024 0zM963.764706 60.235294l0 542.117647-903.529412 0 0-542.117647 903.529412 0zM963.764706 662.588235l0 120.470588-903.529412 0 0-120.470588 903.529412 0zM60.235294 963.764706l0-120.470588 903.529412 0 0 120.470588-903.529412 0z" /></svg>',
249
+ 'enqueue_assets' => function(){
250
+ wp_enqueue_style( 'acfb-blocks-css', plugin_dir_url( __FILE__ ) . 'css/acfblocks.css' );
251
+ wp_enqueue_script( 'acfb-toggle-js', plugin_dir_url( __FILE__ ) . 'js/toggle.js', array('jquery'), '', true );
252
+ },
253
+ ));
254
+
255
+ // register a Accordion Block.
256
+ acf_register_block(array(
257
+ 'name' => 'acfb-accordion',
258
+ 'mode' => 'preview',
259
+ 'title' => __('Accordion'),
260
+ 'description' => __('Add accordion content in your pages/posts.'),
261
+ 'render_callback' => 'acf_blocks_template',
262
+ 'category' => 'acfb-blocks',
263
+ 'icon' => '<svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M0 0v180.705882h1024V0H0z m963.764706 120.470588H60.235294V60.235294h903.529412v60.235294zM0 783.058824h1024V240.941176H0v542.117648z m60.235294-481.882353h903.529412v421.647058H60.235294V301.176471zM0 1024h1024v-180.705882H0v180.705882z m60.235294-120.470588h903.529412v60.235294H60.235294v-60.235294z" /></svg>',
264
+ 'enqueue_assets' => function(){
265
+ wp_enqueue_style( 'acfb-blocks-css', plugin_dir_url( __FILE__ ) . 'css/acfblocks.css' );
266
+ wp_enqueue_script( 'acfb-accordion-js', plugin_dir_url( __FILE__ ) . 'js/accordion.js', array('jquery'), '', true );
267
+ },
268
+ ));
269
+
270
+ // register a Scrollable Image Block.
271
+ acf_register_block(array(
272
+ 'name' => 'acfb-scrollable-image',
273
+ 'mode' => 'preview',
274
+ 'title' => __('Scrollable Image'),
275
+ 'description' => __('Add Scrollable Image in your pages/posts.'),
276
+ 'render_callback' => 'acf_blocks_template',
277
+ 'category' => 'acfb-blocks',
278
+ 'icon' => '<svg height="512pt" viewBox="-90 0 512 512" width="512pt" xmlns="http://www.w3.org/2000/svg"><path d="m166.238281 430.144531-89.769531-94.898437 29.058594-27.488282 60.632812 64.097657 60.273438-64.058594 29.132812 27.410156zm165.761719-38.144531v-272c0-66.167969-53.832031-120-120-120h-92c-66.167969 0-120 53.832031-120 120v272c0 66.167969 53.832031 120 120 120h92c66.167969 0 120-53.832031 120-120zm-120-352c44.113281 0 80 35.886719 80 80v272c0 44.113281-35.886719 80-80 80h-92c-44.113281 0-80-35.886719-80-80v-272c0-44.113281 35.886719-80 80-80zm-46 41c-11.046875 0-20 8.953125-20 20s8.953125 20 20 20 20-8.953125 20-20-8.953125-20-20-20zm0 80c-11.046875 0-20 8.953125-20 20s8.953125 20 20 20 20-8.953125 20-20-8.953125-20-20-20zm0 80c-11.046875 0-20 8.953125-20 20s8.953125 20 20 20 20-8.953125 20-20-8.953125-20-20-20zm0 0"/></svg>',
279
+ 'enqueue_assets' => function(){
280
+ wp_enqueue_style( 'acfb-blocks-css', plugin_dir_url( __FILE__ ) . 'css/acfblocks.css' );
281
+ },
282
+ ));
283
+
284
+
285
+ // register a Business Hours Block.
286
+ acf_register_block(array(
287
+ 'name' => 'acfb-business-hours',
288
+ 'mode' => 'preview',
289
+ 'title' => __('Business Hours'),
290
+ 'description' => __('Add Business Hours in your pages/posts.'),
291
+ 'render_callback' => 'acf_blocks_template',
292
+ 'category' => 'acfb-blocks',
293
+ 'icon' => '<svg enable-background="new 0 0 512 512" version="1.1" viewBox="0 0 512 512" xml:space="preserve" xmlns="http://www.w3.org/2000/svg">
294
+ <circle cx="386" cy="210" r="20"/>
295
+ <path d="m432 40h-26v-20c0-11.046-8.954-20-20-20s-20 8.954-20 20v20h-91v-20c0-11.046-8.954-20-20-20s-20 8.954-20 20v20h-90v-20c0-11.046-8.954-20-20-20s-20 8.954-20 20v20h-25c-44.112 0-80 35.888-80 80v312c0 44.112 35.888 80 80 80h153c11.046 0 20-8.954 20-20s-8.954-20-20-20h-153c-22.056 0-40-17.944-40-40v-312c0-22.056 17.944-40 40-40h25v20c0 11.046 8.954 20 20 20s20-8.954 20-20v-20h90v20c0 11.046 8.954 20 20 20s20-8.954 20-20v-20h91v20c0 11.046 8.954 20 20 20s20-8.954 20-20v-20h26c22.056 0 40 17.944 40 40v114c0 11.046 8.954 20 20 20s20-8.954 20-20v-114c0-44.112-35.888-80-80-80z"/>
296
+ <path d="m391 270c-66.72 0-121 54.28-121 121s54.28 121 121 121 121-54.28 121-121-54.28-121-121-121zm0 202c-44.663 0-81-36.336-81-81s36.337-81 81-81 81 36.336 81 81-36.337 81-81 81z"/>
297
+ <path d="m420 371h-9v-21c0-11.046-8.954-20-20-20s-20 8.954-20 20v41c0 11.046 8.954 20 20 20h29c11.046 0 20-8.954 20-20s-8.954-20-20-20z"/>
298
+ <circle cx="299" cy="210" r="20"/>
299
+ <circle cx="212" cy="297" r="20"/>
300
+ <circle cx="125" cy="210" r="20"/>
301
+ <circle cx="125" cy="297" r="20"/>
302
+ <circle cx="125" cy="384" r="20"/>
303
+ <circle cx="212" cy="384" r="20"/>
304
+ <circle cx="212" cy="210" r="20"/>
305
+ </svg>',
306
+ 'enqueue_assets' => function(){
307
+ wp_enqueue_style( 'acfb-blocks-css', plugin_dir_url( __FILE__ ) . 'css/acfblocks.css' );
308
+ },
309
+ ));
310
+
311
+
312
+ // register a Facebook Page Block.
313
+ acf_register_block(array(
314
+ 'name' => 'acfb-facebook-page',
315
+ 'mode' => 'preview',
316
+ 'title' => __('Facebook Page'),
317
+ 'description' => __('Add Facebook Page in your pages/posts.'),
318
+ 'render_callback' => 'acf_blocks_template',
319
+ 'category' => 'acfb-blocks',
320
+ 'icon' => '<svg width="100" height="100" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
321
+ <g clip-path="url(#clip0)">
322
+ <rect width="100" height="100" fill="url(#pattern0)"/>
323
+ <rect x="61" y="-5" width="42" height="43.5273" rx="21" fill="white"/>
324
+ <rect x="61.7635" y="-3.47278" width="41.2364" height="41.2364" fill="url(#pattern1)"/>
325
+ </g>
326
+ <defs>
327
+ <pattern id="pattern0" patternContentUnits="objectBoundingBox" width="1" height="1">
328
+ <use xlink:href="#image0" transform="scale(0.01)"/>
329
+ </pattern>
330
+ <pattern id="pattern1" patternContentUnits="objectBoundingBox" width="1" height="1">
331
+ <use xlink:href="#image1" transform="scale(0.01)"/>
332
+ </pattern>
333
+ <clipPath id="clip0">
334
+ <rect width="100" height="100" fill="white"/>
335
+ </clipPath>
336
+ <image id="image0" width="100" height="100" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAABmJLR0QA/wD/AP+gvaeTAAAEMElEQVR4nO2du2sVQRSHvxijjZoHEgu1Ed+iplELxUKj4KNQIZ1CfCCIXUT/CRNbUXyW4hOxVUvxVRgVsTWxSES88dHcoLGYK96YvXvX3Zk9527OB9MsnDNn5sfuzM6Z2QXDMAzDMAzDP02B/HYAa4HOQP6lGQUGgS/SgdRjOXAbGAcmCl7GgVvAMi89F4CdwFfkOyrvMgZ0e+g/ryxneopRLcrSzL3okTvId4p0uZm5F/EzqHcAI8BMD74amXFgARkH+hkeAlmPiQHQAqzL6sSHIB0efBSF+Vkd+BDEh4+ikLkvrDOVYYIowwRRhgmiDBNEGSaIMkwQZZggypBe8hgCLgPvgZ/CsTQDK4BjwCLhWDLRQ7rV0VdAq0C89WjDZQPTtKkna+WSj6w+XB5BGyXglFTlkoI8F6y7Hs+kKpYURPNzerFUxZKCnBasux5npCqWFKQXuAqswc1wpGnGxXIdOCQVhPS0t7dSjAr2YqgME0QZJogyTBBlmCDKMEGUYYIowwRRhgmiDBNEGSaIMkwQZUgvLv7JqQ8DG4AjuG39cYxXbJ4CPzzGYjl1pubUtwDlGJsysDloa4Rz6j5IK8j2Gv4uxNicD9WIf9gRE0NhNznUyqnH5bNfhAjkP2MIisacelw+O69nu+XUK7QBR2NsjgPtYcKZhFhO3Qdpx5AJ/ubU5+E+PPA6gc0g7qD+HM/tqM6pp21PQw/qRSwNPagbEZggyjBBlGGCKMMEUYb04iLAW9ziYhfu4y1JGAFe4n9xcSWw2qNPEdJOe8eAXVV+ZgH9CezOUn9FOAu7Sf/tr4Z+DzkR4asJeBxj85Bw34ms5mRMDIV9D7kXcW2ixvVqm4kw4Uzidg51RKJxUI+7A/K4O0DweISkIAcirjUB+2Js9pGPKPtzqCMYaceQr8CeKj+zgXMJ7AZwE4BQ7AW+pWxT5jFEcto7F3gAvMPl1rtI9uHlPuAgbtr73WM8zcCqShFDw3tImk7oZPKUuTBoHNSnNSaIMkwQZZggyjBBlCEtyBXcxoJW3Oa01wlsqjc5NHksMyuxXPPRMEnSvhheivDVCnyIsRkmn21AV2NiKOzi4kDEtTHcXVOLi+TzV5v+HOqIRFKQjzWuD6Ww8c1wTvVMQVKQjTWub4qx2RAikAhqxdYQpB1DBnFbR6vZSvz/q8q4IwshaSfZDsrCLS6uBd7gBvch3J1xuE5MLcAj3KD7hDA59WPAQo9+c8e2khZklmVEYIIowwRRhgmiDBNEGSaIMkwQZZggyvAhyC8PPopC5r7wIchnDz6KwqesDnxsy2wDRgl7RKARUPNz4hJw34OfRucu+STPErEMl+2TXtyTKiVgSeZe9Ew301OUErDNQ/8FYSlwk/hvXhWllIEbeL4zQp21aMcloJIe4mw0RnAZz5J0IIZhGIZhGEYSfgOAPc5a5UN6DQAAAABJRU5ErkJggg=="/>
337
+ <image id="image1" width="100" height="100" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAABmJLR0QA/wD/AP+gvaeTAAAFwElEQVR4nO2dW2gdRRjHfybGxFOFaiVGWzVa0CBSbFFQiZWmFa212IeiCFbqBS/1TSzog0K9PKgo1isFn+KlD4pS9EFsqiCRQhUqhrZGmyaaUo1ak6hpqDE9PnxHMCUx883OnJndMz8Y9mVm9z/f/+zOzmXnQCKRSCQSiUQikUgkEol4OCG0AEOagcXARf9JzcAc4LTKEWAMGK4ch4BvgW+AXmA38EtVVVsQqyEl4FqgA1gGXEJ2rWWgB/gU+ATYDoxnPGehqQPagS3AKBJAn2kU6ARWA/VVqF9uaAI2AAfwb8JMqQ+4H2j0XNeoKQEPAYcIZ8Tx6RDwYEVbTbEa6Ce8ATOlQWCtt9pHRCvwAeEDbpq2Aef6CEQMrAF+I3yQtWkUuNlDPILRCGwmfGCzpi0UoNGfB+wkfDBdpW7gdKcRqiJnA18TPoiu017gHIdxqgptwA+ED56v9D0yfJML5gMDhA+a73QQOM9NyPwxD7mlQwerWmkPEbcpjRSrATdNnxPp29fLhA9OqLTZQfwAd8Pva4F3HJ3LFePALmTgcBjplI4hg5knV45zKscW5M3pAuBUi2uVkRi8l1m1A1qBEcL/SsvIpNTTyDD+SRZ12ZTh2sNE0sjHMDY1DjxK9lHaLIaUkbGvoNxEeDMGgEWO6pPVkDJwoyMtakqE72/0Awsc1smFIQeQNsqKOnvtbCDsM3McmVc5GFDDdJwP3FvtizYRfqZvo4d6ubhDysiPxKpvYnuH3AmcZVnWBYPAiwGvPxvzgfU2BW0MqUPmwkPyEnA0sIbZ2IhFP8/GkGuQ52QojgFvBry+KQuBq7WFTrS40DqLMi7ZDfxoUe46ZKlPG7LqcTqs345mYB3wmeNzTqEE/E7Yxvw5C92PB9I6gnuTpxBDR3C9UvPKwHpXacRq25AOZX4f9CvzP+ZFhTmqmGkNWabM74NhRd4FwBW+hBjizZBmZBV6aEYVedu9qTBnEXCGaWaNIYuJ4/OFEUXehd5UmFOHxM44symxrLI4osgby3y3cezyaIiGptACKngx5EILIQnBOHYaQ1oshCQE49hpDLGZ/E8IxrFLhlQHL4acYiEkIRgboulXHMVuaY0plyILtGdD01MvoZu568TPIoW/THVoht/H8GvIKLpgm3AEXb/F1zzPH6YZNY+sMQsheaIefz37P00zagwxdjmntOKvI+nFkEELIXmizeO5TdpGQGfIfgshecLn0JBx7DSG9FkIyRM+DTGOncaQfRZC8oTPR1avj5POBSbxN/fc6kO0giH81GsSiZ0RmjtkBPl+sIjMZealQVnpQTGppl2X1Y2/adxbgcMG+V5HFsuZ0A5cbJDP53fn3R7PzSrCLwNqUOh9JQK9KxV61atOPsb98EaRGQF2aApoDZkAPlSWqWXeRwYWjbFZbP2GRZlaZau2gI0h25E3h8T/swfo0hay/WDnNctytcQLSKOuwtaQTnKwKXFAfgbesiloa8gY8KRl2VpgEwE2aW4AviP1Q45PvUqNU8jyWfQE8EiG8kXlYSQ2VmQxBOBdItlwJRK2IX0Pa7IaAvAAstNOrfMrDjYMcGHIT4gptc59yBB+NDxP7Tbqzyo0VY164CNqz5Au7D4vnxYXj6x/mQRuo7iTWNOxD7gF+NvVCV0aAtKwdeBpDjky9gMrMJtUM8a1ISAN2/XIZsNFZQBYjuyI5BQfhoAIvhLZBqNo9ABLUSx+0+DLEJD9SJYiDX1R6ELm6XO9irMBeAZZmJDXt6xjyKuts7epGFiO3DV5M2QIuMGqxjmgBXib/BiyFTjTsq65YgXyahyrIXuJY6OdqtIA3IUsRI7FkD7gHuU1CkcDcAfwJeEM+Qq4nYI12i5YAryK9Ph9G3IY2UxziSPthaYeuAp4CvgCWWyW1ZAJ5N8SnkD6EuluyEAjcDkyAaT5I+E1wN3AZcSzEU0ikUgkEolEIpFIJBKJ3PAPKXuAONOCAmsAAAAASUVORK5CYII="/>
338
+ </defs>
339
+ </svg>',
340
+ 'enqueue_assets' => function(){
341
+ wp_enqueue_style( 'acfb-blocks-css', plugin_dir_url( __FILE__ ) . 'css/acfblocks.css' );
342
+ },
343
+ ));
344
+
345
+ // register a Acf Meta Display Block.
346
+ acf_register_block(array(
347
+ 'name' => 'acfb-meta-display',
348
+ 'mode' => 'preview',
349
+ 'title' => __('Acf Meta Display'),
350
+ 'description' => __('Add Acf Meta Display in your pages/posts.'),
351
+ 'render_callback' => 'acf_blocks_template',
352
+ 'category' => 'acfb-blocks',
353
+ 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" id="Layer_1" data-name="Layer 1" viewBox="0 0 512 512"><title>Location</title><path d="M360,153a8,8,0,0,0-8-8H161a8,8,0,0,0-8,8V290a8,8,0,0,0,8,8H352a8,8,0,0,0,8-8Zm-17,8v71.566l-44.125-31.419a7.842,7.842,0,0,0-10.118.823l-36.029,35.466-41.684-20.33a7.527,7.527,0,0,0-7.277.271L169,237.681V161ZM169,256.178l39.122-22.822L240.793,249.2,208.19,281H169ZM231.016,281l64.07-63.062L343,252.173V281Z"/><path d="M245.8,220.424a22.96,22.96,0,1,0-22.96-22.96A22.986,22.986,0,0,0,245.8,220.424Zm0-29.92a6.96,6.96,0,1,1-6.96,6.96A6.968,6.968,0,0,1,245.8,190.5Z"/><path d="M256,9.677c-116.861,0-211.935,91.049-211.935,202.964,0,35.921,11.076,73.539,32.917,111.811,17.261,30.246,41.272,61,71.365,91.4,51.023,51.547,101.231,83.863,103.344,85.213a8,8,0,0,0,8.618,0c2.113-1.35,52.321-33.666,103.344-85.213,30.093-30.4,54.1-61.152,71.365-91.4,21.841-38.272,32.917-75.89,32.917-111.811C467.935,100.726,372.861,9.677,256,9.677Zm165.2,306.7c-16.532,29-39.646,58.609-68.7,87.994A677.751,677.751,0,0,1,256,484.72a677.751,677.751,0,0,1-96.5-80.347c-29.056-29.385-52.17-58.991-68.7-87.994C70.405,280.6,60.065,245.7,60.065,212.641c0-103.092,87.9-186.964,195.935-186.964s195.935,83.872,195.935,186.964C451.935,245.7,441.6,280.6,421.2,316.379Z"/><path d="M256,61.121c-86.511,0-156.893,70.382-156.893,156.893S169.489,374.907,256,374.907s156.893-70.382,156.893-156.893S342.511,61.121,256,61.121Zm0,297.786c-77.688,0-140.893-63.2-140.893-140.893S178.312,77.121,256,77.121s140.893,63.205,140.893,140.893S333.688,358.907,256,358.907Z"/></svg>',
354
+ 'enqueue_assets' => function(){
355
+ wp_enqueue_style( 'acfb-blocks-css', plugin_dir_url( __FILE__ ) . 'css/acfblocks.css' );
356
+ },
357
+ ));
358
+
359
+ add_action('acf/input/admin_enqueue_scripts', function () {
360
+ wp_enqueue_script('acfb-data-js', plugin_dir_url(__FILE__) . 'js/acfdata.js', uniqid(), false);
361
+ });
362
+
363
+
364
+ // register a Fb Like Button.
365
+ acf_register_block(array(
366
+ 'name' => 'acfb-fb-like-button',
367
+ 'mode' => 'preview',
368
+ 'title' => __('Fb Like Button'),
369
+ 'description' => __('Add Fb Like Button in your pages/posts.'),
370
+ 'render_callback' => 'acf_blocks_template',
371
+ 'category' => 'acfb-blocks',
372
+ 'icon' => '<svg enable-background="new 0 0 512 512" version="1.1" viewBox="0 0 512 512" xml:space="preserve" xmlns="http://www.w3.org/2000/svg">
373
+ <path d="m512 304c0-12.821-5.099-24.768-13.888-33.579 9.963-10.901 15.04-25.515 13.653-40.725-2.496-27.115-26.923-48.363-55.637-48.363h-131.78c6.528-19.819 16.981-56.149 16.981-85.333 0-46.272-39.317-85.333-64-85.333-22.144 0-37.995 12.48-38.656 12.992-2.539 2.027-4.011 5.099-4.011 8.341v72.341l-61.461 133.1-2.539 1.301v-4.075c0-5.888-4.779-10.667-10.667-10.667h-106.67c-29.418 1e-3 -53.333 23.916-53.333 53.334v170.67c0 29.419 23.915 53.333 53.333 53.333h64c23.061 0 42.773-14.72 50.197-35.264 17.75 9.131 41.643 13.931 56.47 13.931h195.82c23.232 0 43.563-15.659 48.341-37.248 2.453-11.136 1.024-22.336-3.84-32.064 15.744-7.915 26.347-24.192 26.347-42.688 0-7.552-1.728-14.784-4.992-21.312 15.744-7.936 26.325-24.192 26.325-42.688zm-44.992 26.325c-4.117 0.491-7.595 3.285-8.917 7.232-1.301 3.947-0.213 8.277 2.816 11.136 5.419 5.099 8.427 11.968 8.427 19.307 0 13.461-10.176 24.768-23.637 26.325-4.117 0.491-7.595 3.285-8.917 7.232-1.301 3.947-0.213 8.277 2.816 11.136 7.019 6.613 9.835 15.893 7.723 25.451-2.624 11.904-14.187 20.523-27.499 20.523h-195.82c-17.323 0-46.379-8.128-56.448-18.219-3.051-3.029-7.659-3.925-11.627-2.304-3.989 1.643-6.592 5.547-6.592 9.856 0 17.643-14.357 32-32 32h-64c-17.643 0-32-14.357-32-32v-170.67c0-17.643 14.357-32 32-32h96v10.667c0 3.691 1.92 7.125 5.077 9.088 3.115 1.877 7.04 2.069 10.368 0.448l21.333-10.667c2.155-1.067 3.883-2.859 4.907-5.056l64-138.67c0.64-1.408 0.981-2.944 0.981-4.48v-68.885c4.438-2.453 12.14-5.781 21.334-5.781 11.691 0 42.667 29.056 42.667 64 0 37.547-20.437 91.669-20.629 92.203-1.237 3.264-0.811 6.955 1.173 9.856 2.005 2.88 5.291 4.608 8.789 4.608h146.8c17.792 0 32.896 12.736 34.389 28.992 1.131 12.16-4.715 23.723-15.189 30.187-3.264 2.005-5.205 5.632-5.056 9.493s2.368 7.317 5.781 9.088c9.024 4.587 14.613 13.632 14.613 23.573 1e-3 13.461-10.175 24.768-23.658 26.325z"/><path d="m160 245.33c-5.888 0-10.667 4.779-10.667 10.667v192c0 5.888 4.779 10.667 10.667 10.667s10.667-4.779 10.667-10.667v-192c0-5.888-4.779-10.667-10.667-10.667z"/></svg>',
374
+ 'enqueue_assets' => function(){
375
+ wp_enqueue_style( 'acfb-blocks-css', plugin_dir_url( __FILE__ ) . 'css/acfblocks.css' );
376
+ },
377
+ ));
378
+
379
+ // register a Divider
380
+ acf_register_block(array(
381
+ 'name' => 'acfb-divider',
382
+ 'mode' => 'preview',
383
+ 'title' => __('Divider'),
384
+ 'description' => __('Add Divider in your pages/posts.'),
385
+ 'render_callback' => 'acf_blocks_template',
386
+ 'category' => 'acfb-blocks',
387
+ 'icon' => '<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
388
+ width="100.000000pt" height="100.000000pt" viewBox="0 0 100.000000 100.000000"
389
+ preserveAspectRatio="xMidYMid meet">
390
+ <metadata>
391
+ Created by potrace 1.16, written by Peter Selinger 2001-2019
392
+ </metadata>
393
+ <g transform="translate(0.000000,100.000000) scale(0.100000,-0.100000)"
394
+ fill="#000000" stroke="none">
395
+ <path d="M190 675 l0 -235 305 0 305 0 0 235 0 235 -305 0 -305 0 0 -235z
396
+ m580 55 c0 -82 -2 -150 -5 -150 -3 0 -26 20 -51 45 -53 53 -77 56 -119 15 -28
397
+ -27 -33 -29 -45 -15 -24 29 -54 17 -120 -50 -53 -52 -71 -64 -97 -65 -22 0
398
+ -33 -5 -33 -15 0 -12 36 -15 238 -18 l237 -2 -280 -1 c-154 0 -263 1 -242 3
399
+ 50 6 52 33 2 33 l-35 0 0 185 0 185 275 0 275 0 0 -150z m-11 -186 c7 4 11 -1
400
+ 11 -13 0 -20 -5 -21 -127 -21 l-126 0 64 65 63 65 52 -51 c29 -28 57 -48 63
401
+ -45z"/>
402
+ <path d="M346 853 c-3 -3 -6 -18 -7 -32 0 -26 0 -26 -9 -3 -11 27 -40 29 -40
403
+ 2 0 -12 -5 -17 -14 -14 -19 7 -30 -14 -17 -30 9 -10 8 -15 -4 -20 -24 -9 -18
404
+ -26 9 -26 15 0 26 7 29 18 4 13 5 12 6 -4 1 -15 -6 -24 -24 -28 -14 -4 -25
405
+ -13 -25 -21 0 -18 36 -20 47 -2 6 10 15 10 43 0 19 -6 27 -12 18 -12 -23 -1
406
+ -25 -51 -3 -51 8 0 15 8 15 17 0 13 3 14 12 5 18 -18 28 -15 28 8 0 14 7 20
407
+ 21 20 14 0 19 5 17 18 -2 10 -12 17 -25 16 -12 0 -20 3 -17 8 3 4 16 8 30 8
408
+ 15 0 24 6 24 15 0 8 -8 15 -17 15 -15 0 -15 2 -4 9 18 12 6 45 -14 37 -10 -4
409
+ -15 1 -15 14 0 23 -10 26 -28 8 -9 -9 -12 -8 -12 4 0 19 -14 31 -24 21z"/>
410
+ <path d="M0 260 l0 -70 500 0 500 0 0 70 0 70 -500 0 -500 0 0 -70z m960 0 l0
411
+ -30 -460 0 -460 0 0 30 0 30 460 0 460 0 0 -30z"/>
412
+ </g>
413
+ </svg>',
414
+ 'enqueue_assets' => function(){
415
+ wp_enqueue_style( 'acfb-blocks-css', plugin_dir_url( __FILE__ ) . 'css/acfblocks.css' );
416
+ },
417
+ ));
418
+
419
+ // register a Random Image
420
+ acf_register_block(array(
421
+ 'name' => 'acfb-random-image',
422
+ 'mode' => 'preview',
423
+ 'title' => __('Random Image'),
424
+ 'description' => __('Add Random Image in your pages/posts.'),
425
+ 'render_callback' => 'acf_blocks_template',
426
+ 'category' => 'acfb-blocks',
427
+ 'icon' => '<svg viewBox="0 -21 511.98744 511" xmlns="http://www.w3.org/2000/svg"><path d="m377.652344 469.828125c-4.03125 0-8.148438-.511719-12.226563-1.578125l-329.898437-88.34375c-25.449219-7.019531-40.617188-33.34375-33.960938-58.773438l36.265625-139.070312c2.21875-8.535156 10.945313-13.71875 19.519531-11.433594 8.535157 2.21875 13.675782 10.964844 11.4375 19.519532l-36.269531 139.09375c-2.238281 8.574218 2.859375 17.425781 11.394531 19.773437l329.707032 88.300781c8.46875 2.238282 17.214844-2.796875 19.433594-11.222656l11.261718-45.441406c2.136719-8.574219 10.796875-13.78125 19.371094-11.6875 8.578125 2.132812 13.804688 10.792968 11.691406 19.367187l-11.304687 45.65625c-5.699219 21.609375-25.152344 35.839844-46.421875 35.839844zm0 0"/><path d="m463.988281 341.828125h-330.667969c-26.472656 0-48-21.527344-48-48v-245.335937c0-26.472657 21.527344-48 48-48h330.667969c26.472657 0 48 21.527343 48 48v245.335937c0 26.472656-21.527343 48-48 48zm-330.667969-309.335937c-8.832031 0-16 7.167968-16 16v245.335937c0 8.832031 7.167969 16 16 16h330.667969c8.832031 0 16-7.167969 16-16v-245.335937c0-8.832032-7.167969-16-16-16zm0 0"/><path d="m191.988281 149.828125c-23.53125 0-42.667969-19.136719-42.667969-42.667969s19.136719-42.667968 42.667969-42.667968 42.664063 19.136718 42.664063 42.667968-19.132813 42.667969-42.664063 42.667969zm0-53.335937c-5.890625 0-10.667969 4.78125-10.667969 10.667968 0 5.886719 4.777344 10.667969 10.667969 10.667969 5.886719 0 10.664063-4.78125 10.664063-10.667969 0-5.886718-4.777344-10.667968-10.664063-10.667968zm0 0"/><path d="m101.746094 320.066406c-4.09375 0-8.191406-1.558594-11.304688-4.691406-6.25-6.25-6.25-16.386719 0-22.636719l96.425782-96.425781c14.59375-14.59375 38.335937-14.59375 52.90625 0l25.792968 25.792969 79.230469-95.105469c7.082031-8.492188 17.472656-13.398438 28.503906-13.460938 11.859375-.660156 21.460938 4.734376 28.605469 13.121094l106.199219 123.902344c5.757812 6.699219 4.96875 16.8125-1.730469 22.570312-6.71875 5.761719-16.808594 4.972657-22.570312-1.726562l-106.238282-123.945312c-1.410156-1.6875-3.136718-1.601563-4.097656-1.902344-.914062 0-2.6875.277344-4.09375 1.941406l-90.453125 108.589844c-2.882813 3.453125-7.082031 5.546875-11.5625 5.738281-4.566406.253906-8.875-1.496094-12.035156-4.671875l-38.183594-38.1875c-2.710937-2.710938-4.949219-2.710938-7.660156 0l-96.425781 96.40625c-3.117188 3.132812-7.210938 4.691406-11.308594 4.691406zm0 0"/></svg>',
428
+ 'enqueue_assets' => function(){
429
+ wp_enqueue_style( 'acfb-blocks-css', plugin_dir_url( __FILE__ ) . 'css/acfblocks.css' );
430
+ wp_enqueue_script( 'acfb-random-image-js', plugin_dir_url( __FILE__ ) . 'js/random-image.js', array('jquery'), '', true );
431
+ },
432
+ ));
433
+
434
+ }
435
+
436
  }
freemius/includes/class-freemius.php CHANGED
@@ -1,25326 +1,25326 @@
1
- <?php
2
- /**
3
- * @package Freemius
4
- * @copyright Copyright (c) 2015, Freemius, Inc.
5
- * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
- * @since 1.0.3
7
- */
8
- if ( ! defined( 'ABSPATH' ) ) {
9
- exit;
10
- }
11
-
12
- // "final class"
13
- class Freemius extends Freemius_Abstract {
14
- /**
15
- * SDK Version
16
- *
17
- * @var string
18
- */
19
- public $version = WP_FS__SDK_VERSION;
20
-
21
- #region Plugin Info
22
-
23
- /**
24
- * @since 1.0.1
25
- *
26
- * @var string
27
- */
28
- private $_slug;
29
-
30
- /**
31
- * @since 1.0.0
32
- *
33
- * @var string
34
- */
35
- private $_plugin_basename;
36
- /**
37
- * @since 2.2.1
38
- *
39
- * @var string
40
- */
41
- private $_premium_plugin_basename;
42
- /**
43
- * @since 1.0.0
44
- *
45
- * @var string
46
- */
47
- private $_free_plugin_basename;
48
- /**
49
- * @since 1.0.0
50
- *
51
- * @var string
52
- */
53
- private $_plugin_dir_path;
54
- /**
55
- * @since 1.0.0
56
- *
57
- * @var string
58
- */
59
- private $_plugin_dir_name;
60
- /**
61
- * @since 1.0.0
62
- *
63
- * @var string
64
- */
65
- private $_plugin_main_file_path;
66
- /**
67
- * @var string[]
68
- */
69
- private $_plugin_data;
70
- /**
71
- * @since 1.0.9
72
- *
73
- * @var string
74
- */
75
- private $_plugin_name;
76
- /**
77
- * @since 1.2.2
78
- *
79
- * @var string
80
- */
81
- private $_module_type;
82
-
83
- #endregion Plugin Info
84
-
85
- /**
86
- * @since 1.0.9
87
- *
88
- * @var bool If false, don't turn Freemius on.
89
- */
90
- private $_is_on;
91
-
92
- /**
93
- * @since 1.1.3
94
- *
95
- * @var bool If false, don't turn Freemius on.
96
- */
97
- private $_is_anonymous;
98
-
99
- /**
100
- * @since 1.0.9
101
- * @var bool If false, issues with connectivity to Freemius API.
102
- */
103
- private $_has_api_connection;
104
-
105
- /**
106
- * @since 1.0.9
107
- * @since 2.0.0 Default to true since we need the property during the instance construction, prior to the dynamic_init() execution.
108
- * @var bool Hints the SDK if plugin can support anonymous mode (if skip connect is visible).
109
- */
110
- private $_enable_anonymous = true;
111
-
112
- /**
113
- * @since 1.1.7.5
114
- * @var bool Hints the SDK if plugin should run in anonymous mode (only adds feedback form).
115
- */
116
- private $_anonymous_mode;
117
-
118
- /**
119
- * @since 1.1.9
120
- * @var bool Hints the SDK if plugin have any free plans.
121
- */
122
- private $_is_premium_only;
123
-
124
- /**
125
- * @since 1.2.1.6
126
- * @var bool Hints the SDK if plugin have premium code version at all.
127
- */
128
- private $_has_premium_version;
129
-
130
- /**
131
- * @since 1.2.1.6
132
- * @var bool Hints the SDK if plugin should ignore pending mode by simulating a skip.
133
- */
134
- private $_ignore_pending_mode;
135
-
136
- /**
137
- * @since 1.0.8
138
- * @var bool Hints the SDK if the plugin has any paid plans.
139
- */
140
- private $_has_paid_plans;
141
-
142
- /**
143
- * @since 1.2.1.5
144
- * @var int Hints the SDK if the plugin offers a trial period. If negative, no trial, if zero - has a trial but
145
- * without a specified period, if positive - the number of trial days.
146
- */
147
- private $_trial_days = - 1;
148
-
149
- /**
150
- * @since 1.2.1.5
151
- * @var bool Hints the SDK if the trial requires a payment method or not.
152
- */
153
- private $_is_trial_require_payment = false;
154
-
155
- /**
156
- * @since 1.0.7
157
- * @var bool Hints the SDK if the plugin is WordPress.org compliant.
158
- */
159
- private $_is_org_compliant;
160
-
161
- /**
162
- * @since 1.0.7
163
- * @var bool Hints the SDK if the plugin is has add-ons.
164
- */
165
- private $_has_addons;
166
-
167
- /**
168
- * @since 2.4.5
169
- * @var string Navigation type: 'menu' or 'tabs'.
170
- */
171
- private $_navigation;
172
-
173
- const NAVIGATION_MENU = 'menu';
174
- const NAVIGATION_TABS = 'tabs';
175
-
176
- /**
177
- * @since 1.1.6
178
- * @var string[]bool.
179
- */
180
- private $_permissions;
181
-
182
- /**
183
- * @var FS_Storage
184
- */
185
- private $_storage;
186
-
187
- /**
188
- * @since 1.2.2.7
189
- * @var FS_Cache_Manager
190
- */
191
- private $_cache;
192
-
193
- /**
194
- * @since 1.0.0
195
- *
196
- * @var FS_Logger
197
- */
198
- private $_logger;
199
- /**
200
- * @since 1.0.4
201
- *
202
- * @var FS_Plugin
203
- */
204
- private $_plugin = false;
205
- /**
206
- * @since 1.0.4
207
- *
208
- * @var FS_Plugin|false
209
- */
210
- private $_parent_plugin = false;
211
- /**
212
- * @since 1.1.1
213
- *
214
- * @var Freemius
215
- */
216
- private $_parent = false;
217
- /**
218
- * @since 1.0.1
219
- *
220
- * @var FS_User
221
- */
222
- private $_user = false;
223
- /**
224
- * @since 1.0.1
225
- *
226
- * @var FS_Site
227
- */
228
- private $_site = false;
229
- /**
230
- * @since 1.0.1
231
- *
232
- * @var FS_Plugin_License
233
- */
234
- private $_license;
235
- /**
236
- * @since 1.0.2
237
- *
238
- * @var FS_Plugin_Plan[]
239
- */
240
- private $_plans = false;
241
- /**
242
- * @var FS_Plugin_License[]
243
- * @since 1.0.5
244
- */
245
- private $_licenses = false;
246
-
247
- /**
248
- * @since 1.0.1
249
- *
250
- * @var FS_Admin_Menu_Manager
251
- */
252
- private $_menu;
253
-
254
- /**
255
- * @var FS_Admin_Notices
256
- */
257
- private $_admin_notices;
258
-
259
- /**
260
- * @since 1.1.6
261
- *
262
- * @var FS_Admin_Notices
263
- */
264
- private static $_global_admin_notices;
265
-
266
- /**
267
- * @var FS_Logger
268
- * @since 1.0.0
269
- */
270
- private static $_static_logger;
271
-
272
- /**
273
- * @var FS_Options
274
- * @since 1.0.2
275
- */
276
- private static $_accounts;
277
-
278
- /**
279
- * @since 1.2.2
280
- *
281
- * @var number
282
- */
283
- private $_module_id;
284
-
285
- /**
286
- * @var Freemius[]
287
- */
288
- private static $_instances = array();
289
-
290
- /**
291
- * @since 1.2.3
292
- *
293
- * @var FS_Affiliate
294
- */
295
- private $affiliate = null;
296
-
297
- /**
298
- * @since 1.2.3
299
- *
300
- * @var FS_AffiliateTerms
301
- */
302
- private $plugin_affiliate_terms = null;
303
-
304
- /**
305
- * @since 1.2.3
306
- *
307
- * @var FS_AffiliateTerms
308
- */
309
- private $custom_affiliate_terms = null;
310
-
311
- /**
312
- * @since 2.0.0
313
- *
314
- * @var bool
315
- */
316
- private $_is_multisite_integrated;
317
-
318
- /**
319
- * @since 2.0.0
320
- *
321
- * @var bool True if the current request is for a network admin screen and the plugin is network active.
322
- */
323
- private $_is_network_active;
324
-
325
- /**
326
- * @since 2.0.0
327
- *
328
- * @var int|null The original blog ID the plugin was loaded with.
329
- */
330
- private $_blog_id = null;
331
-
332
- /**
333
- * @since 2.0.0
334
- *
335
- * @var int|null The current execution context. When true, run on network context. When int, run on the specified blog context.
336
- */
337
- private $_context_is_network_or_blog_id = null;
338
-
339
- /**
340
- * @since 2.0.0
341
- *
342
- * @var string
343
- */
344
- private $_dynamically_added_top_level_page_hook_name = '';
345
-
346
- /**
347
- * @author Leo Fajardo (@leorw)
348
- * @since 2.3.1
349
- *
350
- * @var bool
351
- */
352
- private $is_whitelabeled;
353
-
354
- /**
355
- * @author Leo Fajardo (@leorw)
356
- * @since 2.4.0
357
- *
358
- * @var bool
359
- */
360
- private $_is_bundle_license_auto_activation_enabled = false;
361
-
362
- #region Uninstall Reasons IDs
363
-
364
- const REASON_NO_LONGER_NEEDED = 1;
365
- const REASON_FOUND_A_BETTER_PLUGIN = 2;
366
- const REASON_NEEDED_FOR_A_SHORT_PERIOD = 3;
367
- const REASON_BROKE_MY_SITE = 4;
368
- const REASON_SUDDENLY_STOPPED_WORKING = 5;
369
- const REASON_CANT_PAY_ANYMORE = 6;
370
- const REASON_OTHER = 7;
371
- const REASON_DIDNT_WORK = 8;
372
- const REASON_DONT_LIKE_TO_SHARE_MY_INFORMATION = 9;
373
- const REASON_COULDNT_MAKE_IT_WORK = 10;
374
- const REASON_GREAT_BUT_NEED_SPECIFIC_FEATURE = 11;
375
- const REASON_NOT_WORKING = 12;
376
- const REASON_NOT_WHAT_I_WAS_LOOKING_FOR = 13;
377
- const REASON_DIDNT_WORK_AS_EXPECTED = 14;
378
- const REASON_TEMPORARY_DEACTIVATION = 15;
379
-
380
- /**
381
- * @author Leo Fajardo (@leorw)
382
- * @since 2.3.1
383
- *
384
- * @var boolean|null
385
- */
386
- private $_use_external_pricing = null;
387
-
388
- #endregion
389
-
390
- /* Ctor
391
- ------------------------------------------------------------------------------------------------------------------*/
392
-
393
- /**
394
- * Main singleton instance.
395
- *
396
- * @author Vova Feldman (@svovaf)
397
- * @since 1.0.0
398
- *
399
- * @param number $module_id
400
- * @param string|bool $slug
401
- * @param bool $is_init Since 1.2.1 Is initiation sequence.
402
- */
403
- private function __construct( $module_id, $slug = false, $is_init = false ) {
404
- if ( $is_init && is_numeric( $module_id ) && is_string( $slug ) ) {
405
- $this->store_id_slug_type_path_map( $module_id, $slug );
406
- }
407
-
408
- $this->_module_id = $module_id;
409
- $this->_slug = $this->get_slug();
410
- $this->_module_type = $this->get_module_type();
411
-
412
- $this->_blog_id = is_multisite() ? get_current_blog_id() : null;
413
-
414
- $this->_storage = FS_Storage::instance( $this->_module_type, $this->_slug );
415
-
416
- $this->_cache = FS_Cache_Manager::get_manager( WP_FS___OPTION_PREFIX . "cache_{$module_id}" );
417
-
418
- $this->_logger = FS_Logger::get_logger( WP_FS__SLUG . '_' . $this->get_unique_affix(), WP_FS__DEBUG_SDK, WP_FS__ECHO_DEBUG_SDK );
419
-
420
- $this->_plugin_main_file_path = $this->_find_caller_plugin_file( $is_init );
421
- $this->_plugin_dir_path = plugin_dir_path( $this->_plugin_main_file_path );
422
- $this->_plugin_basename = $this->get_plugin_basename();
423
- $this->_free_plugin_basename = str_replace( '-premium/', '/', $this->_plugin_basename );
424
-
425
- $this->_is_multisite_integrated = (
426
- defined( "WP_FS__PRODUCT_{$module_id}_MULTISITE" ) &&
427
- ( true === constant( "WP_FS__PRODUCT_{$module_id}_MULTISITE" ) )
428
- );
429
-
430
- $this->_is_network_active = (
431
- is_multisite() &&
432
- $this->_is_multisite_integrated &&
433
- // Themes are always network activated, but the ACTUAL activation is per site.
434
- $this->is_plugin() &&
435
- (
436
- is_plugin_active_for_network( $this->_plugin_basename ) ||
437
- // Plugin network level activation or uninstall.
438
- ( fs_is_network_admin() && is_plugin_inactive( $this->_plugin_basename ) )
439
- )
440
- );
441
-
442
- $this->_storage->set_network_active(
443
- $this->_is_network_active,
444
- $this->is_delegated_connection()
445
- );
446
-
447
- if ( ! isset( $this->_storage->is_network_activated ) ) {
448
- $this->_storage->is_network_activated = $this->_is_network_active;
449
- }
450
-
451
- if ( $this->_storage->is_network_activated != $this->_is_network_active ) {
452
- // Update last activation level.
453
- $this->_storage->is_network_activated = $this->_is_network_active;
454
-
455
- $this->maybe_adjust_storage();
456
- }
457
-
458
- #region Migration
459
-
460
- if ( is_multisite() ) {
461
- /**
462
- * If the install_timestamp exists on the site level but doesn't exist on the
463
- * network level storage, it means that we need to process the storage with migration.
464
- *
465
- * The code in this `if` scope will only be executed once and only for the first site that will execute it because once we migrate the storage data, install_timestamp will be already set in the network level storage.
466
- *
467
- * @author Vova Feldman (@svovaf)
468
- * @since 2.0.0
469
- */
470
- if ( false === $this->_storage->get( 'install_timestamp', false, true ) &&
471
- false !== $this->_storage->get( 'install_timestamp', false, false )
472
- ) {
473
- // Initiate storage migration.
474
- $this->_storage->migrate_to_network();
475
-
476
- // Migrate module cache to network level storage.
477
- $this->_cache->migrate_to_network();
478
- }
479
- }
480
-
481
- #endregion
482
-
483
- $base_name_split = explode( '/', $this->_plugin_basename );
484
- $this->_plugin_dir_name = $base_name_split[0];
485
-
486
- if ( $this->_logger->is_on() ) {
487
- $this->_logger->info( 'plugin_main_file_path = ' . $this->_plugin_main_file_path );
488
- $this->_logger->info( 'plugin_dir_path = ' . $this->_plugin_dir_path );
489
- $this->_logger->info( 'plugin_basename = ' . $this->_plugin_basename );
490
- $this->_logger->info( 'free_plugin_basename = ' . $this->_free_plugin_basename );
491
- $this->_logger->info( 'plugin_dir_name = ' . $this->_plugin_dir_name );
492
- }
493
-
494
- // Remember link between file to slug.
495
- $this->store_file_slug_map();
496
-
497
- // Store plugin's initial install timestamp.
498
- if ( ! isset( $this->_storage->install_timestamp ) ) {
499
- $this->_storage->install_timestamp = WP_FS__SCRIPT_START_TIME;
500
- }
501
-
502
- if ( ! is_object( $this->_plugin ) ) {
503
- $this->_plugin = FS_Plugin_Manager::instance( $this->_module_id )->get();
504
- }
505
-
506
- $this->_admin_notices = FS_Admin_Notices::instance(
507
- $this->_slug . ( $this->is_theme() ? ':theme' : '' ),
508
- /**
509
- * Ensure that the admin notice will always have a title by using the stored plugin title if available and
510
- * retrieving the title via the "get_plugin_name" method if there is no stored plugin title available.
511
- *
512
- * @author Leo Fajardo (@leorw)
513
- * @since 1.2.2
514
- */
515
- ( is_object( $this->_plugin ) ? $this->_plugin->title : $this->get_plugin_name() ),
516
- $this->get_unique_affix()
517
- );
518
-
519
- if ( 'true' === fs_request_get( 'fs_clear_api_cache' ) ||
520
- fs_request_is_action( 'restart_freemius' )
521
- ) {
522
- FS_Api::clear_cache();
523
- $this->_cache->clear();
524
- }
525
-
526
- $this->register_constructor_hooks();
527
-
528
- /**
529
- * Starting from version 2.0.0, `FS_Site` entities no longer have the `plan` property and have `plan_id`
530
- * instead. This should be called before calling `_load_account()`, otherwise, `$this->_site` will not be
531
- * loaded in `_load_account` for versions of SDK starting from 2.0.0.
532
- *
533
- * @author Leo Fajardo (@leorw)
534
- */
535
- self::migrate_install_plan_to_plan_id( $this->_storage );
536
-
537
- $this->_load_account();
538
-
539
- $this->_version_updates_handler();
540
- }
541
-
542
- /**
543
- * @author Leo Fajardo (@leorw)
544
- * @since 2.3.0
545
- */
546
- private function maybe_adjust_storage() {
547
- $install_timestamp = null;
548
- $prev_is_premium = null;
549
-
550
- $options_to_update = array();
551
-
552
- $is_network_admin = fs_is_network_admin();
553
-
554
- $network_install_timestamp = $this->_storage->get( 'install_timestamp', null, true );
555
-
556
- if ( ! $is_network_admin ) {
557
- if ( is_null( $network_install_timestamp ) ) {
558
- // Plugin was not network-activated before.
559
- return;
560
- }
561
-
562
- if ( is_null( $this->_storage->get( 'install_timestamp', null, false ) ) ) {
563
- // Set the `install_timestamp` only if it's not yet set.
564
- $install_timestamp = $network_install_timestamp;
565
- }
566
-
567
- $prev_is_premium = $this->_storage->get( 'prev_is_premium', null, true );
568
- } else {
569
- $current_wp_user = self::_get_current_wp_user();
570
- $current_fs_user = self::_get_user_by_email( $current_wp_user->user_email );
571
- $network_user_info = array();
572
-
573
- $skips_count = 0;
574
-
575
- $sites = self::get_sites();
576
- $sites_count = count( $sites );
577
-
578
- $blog_id_2_install_map = array();
579
-
580
- $is_first_non_ignored_blog = true;
581
-
582
- foreach ( $sites as $site ) {
583
- $blog_id = self::get_site_blog_id( $site );
584
-
585
- $blog_install_timestamp = $this->_storage->get( 'install_timestamp', null, $blog_id );
586
-
587
- if ( is_null( $blog_install_timestamp ) ) {
588
- // Plugin has not been installed on this blog.
589
- continue;
590
- }
591
-
592
- $is_earlier_install = (
593
- ! is_null( $install_timestamp ) &&
594
- $blog_install_timestamp < $install_timestamp
595
- );
596
-
597
- $install = $this->get_install_by_blog_id( $blog_id );
598
-
599
- $update_network_user_info = false;
600
-
601
- if ( ! is_object( $install ) ) {
602
- if ( ! $this->_storage->get( 'is_anonymous', false, $blog_id ) ) {
603
- // The opt-in decision (whether to skip or opt in) is yet to be made.
604
- continue;
605
- }
606
-
607
- $skips_count ++;
608
- } else {
609
- $blog_id_2_install_map[ $blog_id ] = $install;
610
-
611
- if ( empty( $network_user_info ) ) {
612
- // Set the network user info for the 1st time. Choose any user information whether or not it is for the current WP user.
613
- $update_network_user_info = true;
614
- }
615
-
616
- if ( ! $update_network_user_info &&
617
- is_object( $current_fs_user ) &&
618
- $network_user_info['user_id'] != $current_fs_user->id &&
619
- $install->user_id == $current_fs_user->id
620
- ) {
621
- // If an install that is owned by the current WP user is found, use its user information instead.
622
- $update_network_user_info = true;
623
- }
624
-
625
- if ( ! $update_network_user_info &&
626
- $is_earlier_install &&
627
- ( ! is_object( $current_fs_user ) || $current_fs_user->id == $install->user_id )
628
- ) {
629
- // Update to the earliest install info if there's no install found so far that is owned by the current WP user; OR only if the found install is owned by the current WP user.
630
- $update_network_user_info = true;
631
- }
632
- }
633
-
634
- if ( $update_network_user_info ) {
635
- $network_user_info = array(
636
- 'user_id' => $install->user_id,
637
- 'blog_id' => $blog_id
638
- );
639
- }
640
-
641
- $site_prev_is_premium = $this->_storage->get( 'prev_is_premium', null, $blog_id );
642
-
643
- if ( $is_first_non_ignored_blog ) {
644
- $prev_is_premium = $site_prev_is_premium;
645
-
646
- if ( is_null( $network_install_timestamp ) ) {
647
- $install_timestamp = $blog_install_timestamp;
648
- }
649
-
650
- $is_first_non_ignored_blog = false;
651
-
652
- continue;
653
- }
654
-
655
- if ( ! is_null( $prev_is_premium ) && $prev_is_premium !== $site_prev_is_premium ) {
656
- // If a different `$site_prev_is_premium` value is found, do not include the option in the collection of options to update.
657
- $prev_is_premium = null;
658
- }
659
-
660
- if ( $is_earlier_install ) {
661
- // If an earlier install timestamp is found.
662
- $install_timestamp = $blog_install_timestamp;
663
- }
664
- }
665
-
666
- $installs_count = count( $blog_id_2_install_map );
667
-
668
- if ( $sites_count === ( $installs_count + $skips_count ) ) {
669
- if ( ! empty( $network_user_info ) ) {
670
- $options_to_update['network_user_id'] = $network_user_info['user_id'];
671
- $options_to_update['network_install_blog_id'] = $network_user_info['blog_id'];
672
-
673
- foreach ( $blog_id_2_install_map as $blog_id => $install ) {
674
- if ( $install->user_id == $network_user_info['user_id'] ) {
675
- continue;
676
- }
677
-
678
- $this->_storage->store( 'is_delegated_connection', true, $blog_id );
679
- }
680
- }
681
-
682
- if ( $sites_count === $skips_count ) {
683
- /**
684
- * Assume network-level skipping as the intended action if all actions identified were only
685
- * skipping of the connection (i.e., no opt-ins and delegated connections so far).
686
- */
687
- $options_to_update['is_anonymous_ms'] = true;
688
- } else if ( $sites_count === $installs_count ) {
689
- /**
690
- * Assume network-level opt-in as the intended action if all actions identified were only opt-ins
691
- * (i.e., no delegation and skipping of the connections so far).
692
- */
693
- $options_to_update['is_network_connected'] = true;
694
- }
695
- }
696
- }
697
-
698
- if ( ! is_null( $install_timestamp ) ) {
699
- $options_to_update['install_timestamp'] = $install_timestamp;
700
- }
701
-
702
- if ( ! is_null( $prev_is_premium ) ) {
703
- $options_to_update['prev_is_premium'] = $prev_is_premium;
704
- }
705
-
706
- if ( ! empty( $options_to_update ) ) {
707
- $this->adjust_storage( $options_to_update, $is_network_admin );
708
- }
709
- }
710
-
711
- /**
712
- * @author Leo Fajardo (@leorw)
713
- * @since 2.3.0
714
- *
715
- * @param array $options
716
- * @param bool $is_network_admin
717
- */
718
- private function adjust_storage( $options, $is_network_admin ) {
719
- foreach ( $options as $name => $value ) {
720
- $this->_storage->store( $name, $value, $is_network_admin ? true : null );
721
- }
722
- }
723
-
724
- /**
725
- * Checks whether this module has a settings menu.
726
- *
727
- * @author Leo Fajardo (@leorw)
728
- * @since 1.2.2
729
- *
730
- * @return bool
731
- */
732
- function has_settings_menu() {
733
- return ( $this->_is_network_active && fs_is_network_admin() ) ?
734
- $this->_menu->has_network_menu() :
735
- $this->_menu->has_menu();
736
- }
737
-
738
- /**
739
- * If `true` the opt-in should be shown as a modal dialog box on the themes.php page. WordPress.org themes guidelines prohibit from redirecting the user from the themes.php page after activating a theme.
740
- *
741
- * @author Vova Feldman (@svovaf)
742
- * @since 2.4.5
743
- *
744
- * @return bool
745
- */
746
- function show_opt_in_on_themes_page() {
747
- if ( ! $this->is_free_wp_org_theme() ) {
748
- return false;
749
- }
750
-
751
- if ( ! $this->has_settings_menu() ) {
752
- return true;
753
- }
754
-
755
- return $this->show_settings_with_tabs();
756
- }
757
-
758
- /**
759
- * If `true` the opt-in should be shown on the product's main setting page.
760
- *
761
- * @author Vova Feldman (@svovaf)
762
- * @since 2.4.5
763
- *
764
- * @return bool
765
- *
766
- * @uses show_opt_in_on_themes_page();
767
- */
768
- function show_opt_in_on_setting_page() {
769
- return ! $this->show_opt_in_on_themes_page();
770
- }
771
-
772
- /**
773
- * If `true` the settings should be shown using tabs.
774
- *
775
- * @author Vova Feldman (@svovaf)
776
- * @since 2.4.5
777
- *
778
- * @return bool
779
- */
780
- function show_settings_with_tabs() {
781
- return ( self::NAVIGATION_TABS === $this->_navigation );
782
- }
783
-
784
- /**
785
- * Check if the context module is free wp.org theme.
786
- *
787
- * This method is helpful because:
788
- * 1. wp.org themes are limited to a single submenu item,
789
- * and sub-submenu items are most likely not allowed (never verified).
790
- * 2. wp.org themes are not allowed to redirect the user
791
- * after the theme activation, therefore, the agreed UX
792
- * is showing the opt-in as a modal dialog box after
793
- * activation (approved by @otto42, @emiluzelac, @greenshady, @grapplerulrich).
794
- *
795
- * @author Vova Feldman (@svovaf)
796
- * @since 1.2.2.7
797
- *
798
- * @return bool
799
- */
800
- function is_free_wp_org_theme() {
801
- return (
802
- $this->is_theme() &&
803
- $this->is_org_repo_compliant() &&
804
- ! $this->is_premium()
805
- );
806
- }
807
-
808
- /**
809
- * Checks whether this a submenu item is visible.
810
- *
811
- * @author Vova Feldman (@svovaf)
812
- * @since 1.2.2.6
813
- * @since 1.2.2.7 Even if the menu item was specified to be hidden, when it is the context page, then show the submenu item so the user will have the right context page.
814
- *
815
- * @param string $slug
816
- * @param bool $is_tabs_visibility_check This is used to decide if the associated tab should be shown or hidden.
817
- *
818
- * @return bool
819
- */
820
- function is_submenu_item_visible( $slug, $is_tabs_visibility_check = false ) {
821
- if ( $this->is_admin_page( $slug ) ) {
822
- /**
823
- * It is the current context page, so show the submenu item
824
- * so the user will have the right context page, even if it
825
- * was set to hidden.
826
- */
827
- return true;
828
- }
829
-
830
- if ( ! $this->has_settings_menu() ) {
831
- // No menu settings at all.
832
- return false;
833
- }
834
-
835
- if (
836
- ! $is_tabs_visibility_check &&
837
- $this->is_org_repo_compliant() &&
838
- $this->show_settings_with_tabs()
839
- ) {
840
- /**
841
- * wp.org themes are limited to a single submenu item, and
842
- * sub-submenu items are most likely not allowed (never verified).
843
- */
844
- return false;
845
- }
846
-
847
- return $this->_menu->is_submenu_item_visible( $slug );
848
- }
849
-
850
- /**
851
- * Check if a Freemius page should be accessible via the UI.
852
- *
853
- * @author Vova Feldman (@svovaf)
854
- * @since 1.2.2.7
855
- *
856
- * @param string $slug
857
- *
858
- * @return bool
859
- */
860
- function is_page_visible( $slug ) {
861
- if ( $this->is_admin_page( $slug ) ) {
862
- return true;
863
- }
864
-
865
- return $this->_menu->is_submenu_item_visible( $slug, true, true );
866
- }
867
-
868
- /**
869
- * @author Vova Feldman (@svovaf)
870
- * @since 1.0.9
871
- */
872
- private function _version_updates_handler() {
873
- if ( ! isset( $this->_storage->sdk_version ) || $this->_storage->sdk_version != $this->version ) {
874
- // Freemius version upgrade mode.
875
- $this->_storage->sdk_last_version = $this->_storage->sdk_version;
876
- $this->_storage->sdk_version = $this->version;
877
-
878
- if ( empty( $this->_storage->sdk_last_version ) ||
879
- version_compare( $this->_storage->sdk_last_version, $this->version, '<' )
880
- ) {
881
- $this->_storage->sdk_upgrade_mode = true;
882
- $this->_storage->sdk_downgrade_mode = false;
883
- } else {
884
- $this->_storage->sdk_downgrade_mode = true;
885
- $this->_storage->sdk_upgrade_mode = false;
886
-
887
- }
888
-
889
- $this->do_action( 'sdk_version_update', $this->_storage->sdk_last_version, $this->version );
890
- }
891
-
892
- $plugin_version = $this->get_plugin_version();
893
- if ( ! isset( $this->_storage->plugin_version ) || $this->_storage->plugin_version != $plugin_version ) {
894
- // Plugin version upgrade mode.
895
- $this->_storage->plugin_last_version = $this->_storage->plugin_version;
896
- $this->_storage->plugin_version = $plugin_version;
897
-
898
- if ( empty( $this->_storage->plugin_last_version ) ||
899
- version_compare( $this->_storage->plugin_last_version, $plugin_version, '<' )
900
- ) {
901
- $this->_storage->plugin_upgrade_mode = true;
902
- $this->_storage->plugin_downgrade_mode = false;
903
- } else {
904
- $this->_storage->plugin_downgrade_mode = true;
905
- $this->_storage->plugin_upgrade_mode = false;
906
- }
907
-
908
- if ( ! empty( $this->_storage->plugin_last_version ) ) {
909
- // Different version of the plugin was installed before, therefore it's an update.
910
- $this->_storage->is_plugin_new_install = false;
911
- }
912
-
913
- $this->do_action( 'plugin_version_update', $this->_storage->plugin_last_version, $plugin_version );
914
- }
915
- }
916
-
917
- #--------------------------------------------------------------------------------
918
- #region Data Migration on SDK Update
919
- #--------------------------------------------------------------------------------
920
-
921
- /**
922
- * @author Vova Feldman (@svovaf)
923
- * @since 1.1.5
924
- *
925
- * @param string $sdk_prev_version
926
- * @param string $sdk_version
927
- */
928
- function _sdk_version_update( $sdk_prev_version, $sdk_version ) {
929
- /**
930
- * @since 1.1.7.3 Fixed unwanted connectivity test cleanup.
931
- */
932
- if ( empty( $sdk_prev_version ) ) {
933
- return;
934
- }
935
-
936
- if ( version_compare( $sdk_prev_version, '2.1.0', '<' ) &&
937
- version_compare( $sdk_version, '2.1.0', '>=' )
938
- ) {
939
- $this->_storage->handle_gdpr_admin_notice = true;
940
- }
941
-
942
- if ( version_compare( $sdk_prev_version, '2.0.0', '<' ) &&
943
- version_compare( $sdk_version, '2.0.0', '>=' )
944
- ) {
945
- $this->migrate_to_subscriptions_collection();
946
-
947
- $this->consolidate_licenses();
948
-
949
- // Clear trial_plan since it's now loaded from the plans collection when needed.
950
- $this->_storage->remove( 'trial_plan', true, false );
951
- }
952
-
953
- if ( version_compare( $sdk_prev_version, '1.2.3', '<' ) &&
954
- version_compare( $sdk_version, '1.2.3', '>=' )
955
- ) {
956
- /**
957
- * Starting from version 1.2.3, paths are stored as relative instead of absolute and some of them can be
958
- * invalid.
959
- *
960
- * @author Leo Fajardo (@leorw)
961
- */
962
- $this->remove_invalid_paths();
963
- }
964
-
965
- if ( version_compare( $sdk_prev_version, '1.1.5', '<' ) &&
966
- version_compare( $sdk_version, '1.1.5', '>=' )
967
- ) {
968
- // On version 1.1.5 merged connectivity and is_on data.
969
- if ( isset( $this->_storage->connectivity_test ) ) {
970
- if ( ! isset( $this->_storage->is_on ) ) {
971
- unset( $this->_storage->connectivity_test );
972
- } else {
973
- $connectivity_data = $this->_storage->connectivity_test;
974
- $connectivity_data['is_active'] = $this->_storage->is_on['is_active'];
975
- $connectivity_data['timestamp'] = $this->_storage->is_on['timestamp'];
976
-
977
- // Override.
978
- $this->_storage->connectivity_test = $connectivity_data;
979
-
980
- // Remove previous structure.
981
- unset( $this->_storage->is_on );
982
- }
983
-
984
- }
985
- }
986
-
987
- if (
988
- version_compare( $sdk_prev_version, '2.2.1', '<' ) &&
989
- version_compare( $sdk_version, '2.2.1', '>=' )
990
- ) {
991
- /**
992
- * Clear the file cache without storing the previous path since it could be a wrong path. For example,
993
- * in the versions of the SDK lower than 2.2.1, it's possible for the path of an add-on to be the same
994
- * as the parent plugin's when the add-on was auto-installed since the relevant method names were not
995
- * skipped in the logic that determines the right path in the `get_caller_main_file_and_type` method
996
- * (e.g. `try_activate_plugin`). Since it was an auto-installation, the caller was the parent plugin
997
- * and so its path was used. In case the stored path is wrong, clearing the cache will resolve issues
998
- * related to data mix-up between plugins (e.g. titles and versions of an add-on and its parent plugin).
999
- *
1000
- * @author Leo Fajardo (@leorw)
1001
- * @since 2.2.1
1002
- */
1003
- $this->clear_module_main_file_cache( false );
1004
- }
1005
- }
1006
-
1007
- /**
1008
- * @author Leo Fajardo (@leorw)
1009
- * @since 2.0.0
1010
- *
1011
- * @param \FS_Storage $storage
1012
- * @param bool|int|null $blog_id
1013
- */
1014
- private static function migrate_install_plan_to_plan_id( FS_Storage $storage, $blog_id = null ) {
1015
- if ( empty( $storage->sdk_version ) ) {
1016
- // New installation of the plugin, no need to upgrade.
1017
- return;
1018
- }
1019
-
1020
- if ( ! version_compare( $storage->sdk_version, '2.0.0', '<' ) ) {
1021
- // Previous version is >= 2.0.0, so no need to migrate.
1022
- return;
1023
- }
1024
-
1025
- // Alias.
1026
- $module_type = $storage->get_module_type();
1027
- $module_slug = $storage->get_module_slug();
1028
-
1029
- $installs = self::get_all_sites( $module_type, $blog_id );
1030
- $install = isset( $installs[ $module_slug ] ) ? $installs[ $module_slug ] : null;
1031
-
1032
- if ( ! is_object( $install ) ) {
1033
- return;
1034
- }
1035
-
1036
- if ( isset( $install->plan ) && is_object( $install->plan ) ) {
1037
- if ( isset( $install->plan->id ) && ! empty( $install->plan->id ) ) {
1038
- $install->plan_id = self::_decrypt( $install->plan->id );
1039
- }
1040
-
1041
- unset( $install->plan );
1042
-
1043
- $installs[ $module_slug ] = clone $install;
1044
-
1045
- self::set_account_option_by_module(
1046
- $module_type,
1047
- 'sites',
1048
- $installs,
1049
- true,
1050
- $blog_id
1051
- );
1052
- }
1053
- }
1054
-
1055
- /**
1056
- * @author Leo Fajardo (@leorw)
1057
- * @since 2.0.0
1058
- */
1059
- private function migrate_to_subscriptions_collection() {
1060
- if ( ! is_object( $this->_site ) ) {
1061
- return;
1062
- }
1063
-
1064
- if ( isset( $this->_storage->subscription ) && is_object( $this->_storage->subscription ) ) {
1065
- $this->_storage->subscriptions = array( fs_get_entity( $this->_storage->subscription, FS_Subscription::get_class_name() ) );
1066
- }
1067
- }
1068
-
1069
- /**
1070
- * @author Leo Fajardo (@leorw)
1071
- * @since 2.0.0
1072
- */
1073
- private function consolidate_licenses() {
1074
- $plugin_licenses = self::get_account_option( 'licenses', WP_FS__MODULE_TYPE_PLUGIN );
1075
- if ( isset( $plugin_licenses[ $this->_slug ] ) ) {
1076
- $plugin_licenses = $plugin_licenses[ $this->_slug ];
1077
- } else {
1078
- $plugin_licenses = array();
1079
- }
1080
-
1081
- $theme_licenses = self::get_account_option( 'licenses', WP_FS__MODULE_TYPE_THEME );
1082
- if ( isset( $theme_licenses[ $this->_slug ] ) ) {
1083
- $theme_licenses = $theme_licenses[ $this->_slug ];
1084
- } else {
1085
- $theme_licenses = array();
1086
- }
1087
-
1088
- if ( empty( $plugin_licenses ) && empty( $theme_licenses ) ) {
1089
- return;
1090
- }
1091
-
1092
- $all_licenses = array();
1093
- $user_id_license_ids_map = array();
1094
-
1095
- foreach ( $plugin_licenses as $user_id => $user_licenses ) {
1096
- if ( is_array( $user_licenses ) ) {
1097
- if ( ! isset( $user_license_ids[ $user_id ] ) ) {
1098
- $user_id_license_ids_map[ $user_id ] = array();
1099
- }
1100
-
1101
- foreach ( $user_licenses as $user_license ) {
1102
- $all_licenses[] = $user_license;
1103
- $user_id_license_ids_map[ $user_id ][] = $user_license->id;
1104
- }
1105
- }
1106
- }
1107
-
1108
- foreach ( $theme_licenses as $user_id => $user_licenses ) {
1109
- if ( is_array( $user_licenses ) ) {
1110
- if ( ! isset( $user_license_ids[ $user_id ] ) ) {
1111
- $user_id_license_ids_map[ $user_id ] = array();
1112
- }
1113
-
1114
- foreach ( $user_licenses as $user_license ) {
1115
- $all_licenses[] = $user_license;
1116
- $user_id_license_ids_map[ $user_id ][] = $user_license->id;
1117
- }
1118
- }
1119
- }
1120
-
1121
- self::store_user_id_license_ids_map(
1122
- $user_id_license_ids_map,
1123
- $this->_module_id
1124
- );
1125
-
1126
- $this->_store_licenses( true, $this->_module_id, $all_licenses );
1127
- }
1128
-
1129
- /**
1130
- * Remove invalid paths.
1131
- *
1132
- * @author Leo Fajardo (@leorw)
1133
- * @since 1.2.3
1134
- */
1135
- private function remove_invalid_paths() {
1136
- // Remove invalid path that is still associated with the current slug if there's any.
1137
- $file_slug_map = self::$_accounts->get_option( 'file_slug_map', array() );
1138
- foreach ( $file_slug_map as $plugin_basename => $slug ) {
1139
- if ( $slug === $this->_slug &&
1140
- $plugin_basename !== $this->_plugin_basename &&
1141
- ! file_exists( $this->get_absolute_path( $plugin_basename ) )
1142
- ) {
1143
- unset( $file_slug_map[ $plugin_basename ] );
1144
- self::$_accounts->set_option( 'file_slug_map', $file_slug_map, true );
1145
-
1146
- break;
1147
- }
1148
- }
1149
- }
1150
-
1151
- /**
1152
- * @author Vova Feldman (@svovaf)
1153
- * @since 1.2.2.7
1154
- *
1155
- * @param string $plugin_prev_version
1156
- * @param string $plugin_version
1157
- */
1158
- function _after_version_update( $plugin_prev_version, $plugin_version ) {
1159
- if ( $this->is_theme() ) {
1160
- // Expire the cache of the previous tabs since the theme may
1161
- // have setting updates.
1162
- $this->_cache->expire( 'tabs' );
1163
- $this->_cache->expire( 'tabs_stylesheets' );
1164
- }
1165
- }
1166
-
1167
- /**
1168
- * A special migration logic for the $_accounts, executed for all the plugins in the system:
1169
- * - Moves some data to the network level storage.
1170
- * - If the plugin's connection was skipped for all sites, set the plugin as if it was network skipped.
1171
- * - If the plugin's connection was ignored for all sites, don't do anything in terms of the network connection.
1172
- * - If the plugin was connected to all sites by the same super-admin, set the plugin as if was network opted-in for all sites.
1173
- * - If there's at least one site that was connected by a super-admin, find the "main super-admin" (the one that installed the majority of the plugin installs) and set the plugin as if was network activated with the main super-admin, set all the sites that were skipped or opted-in with a different user to delegated mode. Then, prompt the currently logged super-admin to choose what to do with the ignored sites.
1174
- * - If there are any sites in the network which the connection decision was not yet taken for, set this plugin into network activation mode so a super-admin can choose what to do with the rest of the sites.
1175
- *
1176
- * @author Vova Feldman (@svovaf)
1177
- * @since 2.0.0
1178
- */
1179
- private static function migrate_accounts_to_network() {
1180
- $sites = self::get_sites();
1181
- $sites_count = count( $sites );
1182
- $connection_status = array();
1183
- $plugin_slugs = array();
1184
- foreach ( $sites as $site ) {
1185
- $blog_id = self::get_site_blog_id( $site );
1186
-
1187
- self::$_accounts->migrate_to_network( $blog_id );
1188
-
1189
- /**
1190
- * Build a list of all Freemius powered plugins slugs.
1191
- */
1192
- $id_slug_type_path_map = self::$_accounts->get_option( 'id_slug_type_path_map', array(), $blog_id );
1193
- foreach ( $id_slug_type_path_map as $module_id => $data ) {
1194
- if ( WP_FS__MODULE_TYPE_PLUGIN === $data['type'] ) {
1195
- $plugin_slugs[ $data['slug'] ] = true;
1196
- }
1197
- }
1198
-
1199
- $installs = self::get_account_option( 'sites', WP_FS__MODULE_TYPE_PLUGIN, $blog_id );
1200
-
1201
- if ( is_array( $installs ) ) {
1202
- foreach ( $installs as $slug => $install ) {
1203
- if ( ! isset( $connection_status[ $slug ] ) ) {
1204
- $connection_status[ $slug ] = array();
1205
- }
1206
-
1207
- if ( is_object( $install ) &&
1208
- FS_Site::is_valid_id( $install->id ) &&
1209
- FS_User::is_valid_id( $install->user_id )
1210
- ) {
1211
- $connection_status[ $slug ][ $blog_id ] = $install->user_id;
1212
- }
1213
- }
1214
- }
1215
- }
1216
-
1217
- foreach ( $plugin_slugs as $slug => $true ) {
1218
- if ( ! isset( $connection_status[ $slug ] ) ) {
1219
- $connection_status[ $slug ] = array();
1220
- }
1221
-
1222
- foreach ( $sites as $site ) {
1223
- $blog_id = self::get_site_blog_id( $site );
1224
-
1225
- if ( isset( $connection_status[ $slug ][ $blog_id ] ) ) {
1226
- continue;
1227
- }
1228
-
1229
- $storage = FS_Storage::instance( WP_FS__MODULE_TYPE_PLUGIN, $slug );
1230
-
1231
- $is_anonymous = $storage->get( 'is_anonymous', null, $blog_id );
1232
-
1233
- if ( ! is_null( $is_anonymous ) ) {
1234
- // Since 1.1.3 is_anonymous is an array.
1235
- if ( is_array( $is_anonymous ) && isset( $is_anonymous['is'] ) ) {
1236
- $is_anonymous = $is_anonymous['is'];
1237
- }
1238
-
1239
- if ( is_bool( $is_anonymous ) && true === $is_anonymous ) {
1240
- $connection_status[ $slug ][ $blog_id ] = 'skipped';
1241
- }
1242
- }
1243
-
1244
- if ( ! isset( $connection_status[ $slug ][ $blog_id ] ) ) {
1245
- $connection_status[ $slug ][ $blog_id ] = 'ignored';
1246
- }
1247
- }
1248
- }
1249
-
1250
- $super_admins = array();
1251
-
1252
- foreach ( $connection_status as $slug => $blogs_status ) {
1253
- $skips = 0;
1254
- $ignores = 0;
1255
- $connections = 0;
1256
- $opted_in_users = array();
1257
- $opted_in_super_admins = array();
1258
-
1259
- $storage = FS_Storage::instance( WP_FS__MODULE_TYPE_PLUGIN, $slug );
1260
-
1261
- foreach ( $blogs_status as $blog_id => $status_or_user_id ) {
1262
- if ( 'skipped' === $status_or_user_id ) {
1263
- $skips ++;
1264
- } else if ( 'ignored' === $status_or_user_id ) {
1265
- $ignores ++;
1266
- } else if ( FS_User::is_valid_id( $status_or_user_id ) ) {
1267
- $connections ++;
1268
-
1269
- if ( ! isset( $opted_in_users[ $status_or_user_id ] ) ) {
1270
- $opted_in_users[ $status_or_user_id ] = array();
1271
- }
1272
-
1273
- $opted_in_users[ $status_or_user_id ][] = $blog_id;
1274
-
1275
- if ( isset( $super_admins[ $status_or_user_id ] ) ||
1276
- self::is_super_admin( $status_or_user_id )
1277
- ) {
1278
- // Cache super-admin data.
1279
- $super_admins[ $status_or_user_id ] = true;
1280
-
1281
- // Remember opted-in super-admins for the plugin.
1282
- $opted_in_super_admins[ $status_or_user_id ] = true;
1283
- }
1284
- }
1285
- }
1286
-
1287
- $main_super_admin_user_id = null;
1288
- $all_migrated = false;
1289
- if ( $sites_count == $skips ) {
1290
- // All sites were skipped -> network skip by copying the anonymous mode from any of the sites.
1291
- $storage->is_anonymous_ms = $storage->is_anonymous;
1292
-
1293
- $all_migrated = true;
1294
- } else if ( $sites_count == $ignores ) {
1295
- // Don't do anything, still in activation mode.
1296
-
1297
- $all_migrated = true;
1298
- } else if ( 0 < count( $opted_in_super_admins ) ) {
1299
- // Find the super-admin with the majority of installs.
1300
- $max_installs_by_super_admin = 0;
1301
- foreach ( $opted_in_super_admins as $user_id => $true ) {
1302
- $installs_count = count( $opted_in_users[ $user_id ] );
1303
-
1304
- if ( $installs_count > $max_installs_by_super_admin ) {
1305
- $max_installs_by_super_admin = $installs_count;
1306
- $main_super_admin_user_id = $user_id;
1307
- }
1308
- }
1309
-
1310
- if ( $sites_count == $connections && 1 == count( $opted_in_super_admins ) ) {
1311
- // Super-admin opted-in for all sites in the network.
1312
- $storage->is_network_connected = true;
1313
-
1314
- $all_migrated = true;
1315
- }
1316
-
1317
- // Store network user.
1318
- $storage->network_user_id = $main_super_admin_user_id;
1319
-
1320
- $storage->network_install_blog_id = ( $sites_count == $connections ) ?
1321
- // Since all sites are opted-in, associating with the main site.
1322
- get_current_blog_id() :
1323
- // Associating with the 1st found opted-in site.
1324
- $opted_in_users[ $main_super_admin_user_id ][0];
1325
-
1326
- /**
1327
- * Make sure we migrate the plan ID of the network install, otherwise, if after the migration
1328
- * the 1st page that will be loaded is the network level WP Admin and $storage->network_install_blog_id
1329
- * is different than the main site of the network, the $this->_site will not be set since the plan_id
1330
- * will be empty.
1331
- */
1332
- $storage->migrate_to_network();
1333
- self::migrate_install_plan_to_plan_id( $storage, $storage->network_install_blog_id );
1334
- } else {
1335
- // At least one opt-in. All the opt-in were created by a non-super-admin.
1336
- if ( 0 == $ignores ) {
1337
- // All sites were opted-in or skipped, all by non-super-admin. So delegate all.
1338
- $storage->store( 'is_delegated_connection', true, true );
1339
-
1340
- $all_migrated = true;
1341
- }
1342
- }
1343
-
1344
- if ( ! $all_migrated ) {
1345
- /**
1346
- * Delegate all sites that were:
1347
- * 1) Opted-in by a user that is NOT the main-super-admin.
1348
- * 2) Skipped and non of the sites was opted-in by a super-admin. If any site was opted-in by a super-admin, there will be a main-super-admin, and we consider the skip as if it was done by that user.
1349
- */
1350
- foreach ( $blogs_status as $blog_id => $status_or_user_id ) {
1351
- if ( $status_or_user_id == $main_super_admin_user_id ) {
1352
- continue;
1353
- }
1354
-
1355
- if ( FS_User::is_valid_id( $status_or_user_id ) ||
1356
- ( 'skipped' === $status_or_user_id && is_null( $main_super_admin_user_id ) )
1357
- ) {
1358
- $storage->store( 'is_delegated_connection', true, $blog_id );
1359
- }
1360
- }
1361
- }
1362
-
1363
-
1364
- if ( ( $connections + $skips > 0 ) ) {
1365
- if ( $ignores > 0 ) {
1366
- /**
1367
- * If admin already opted-in or skipped in any of the network sites, and also
1368
- * have sites which the connection decision was not yet taken, set this plugin
1369
- * into network activation mode so the super-admin can choose what to do with
1370
- * the rest of the sites.
1371
- */
1372
- self::set_network_upgrade_mode( $storage );
1373
- }
1374
- }
1375
- }
1376
- }
1377
-
1378
- /**
1379
- * Set a module into network upgrade mode.
1380
- *
1381
- * @author Vova Feldman (@svovaf)
1382
- * @since 2.0.0
1383
- *
1384
- * @param \FS_Storage $storage
1385
- *
1386
- * @return bool
1387
- */
1388
- private static function set_network_upgrade_mode( FS_Storage $storage ) {
1389
- return $storage->is_network_activation = true;
1390
- }
1391
-
1392
- /**
1393
- * Will return true after upgrading to the SDK with the network level integration,
1394
- * when the super-admin involvement is required regarding the rest of the sites.
1395
- *
1396
- * @author Vova Feldman (@svovaf)
1397
- * @since 2.0.0
1398
- *
1399
- * @return bool
1400
- */
1401
- function is_network_upgrade_mode() {
1402
- return $this->_storage->get( 'is_network_activation' );
1403
- }
1404
-
1405
- /**
1406
- * Clear flag after the upgrade mode completion.
1407
- *
1408
- * @author Vova Feldman (@svovaf)
1409
- * @since 2.0.0
1410
- *
1411
- * @return bool True if network activation was on and now completed.
1412
- */
1413
- private function network_upgrade_mode_completed() {
1414
- if ( fs_is_network_admin() && $this->is_network_upgrade_mode() ) {
1415
- $this->_storage->remove( 'is_network_activation' );
1416
-
1417
- return true;
1418
- }
1419
-
1420
- return false;
1421
- }
1422
-
1423
- #endregion
1424
-
1425
- /**
1426
- * This action is connected to the 'plugins_loaded' hook and helps to determine
1427
- * if this is a new plugin installation or a plugin update.
1428
- *
1429
- * There are 3 different use-cases:
1430
- * 1) New plugin installation right with Freemius:
1431
- * 1.1 _activate_plugin_event_hook() will be executed first
1432
- * 1.2 Since $this->_storage->is_plugin_new_install is not set,
1433
- * and $this->_storage->plugin_last_version is not set,
1434
- * $this->_storage->is_plugin_new_install will be set to TRUE.
1435
- * 1.3 When _plugins_loaded() will be executed, $this->_storage->is_plugin_new_install will
1436
- * be already set to TRUE.
1437
- *
1438
- * 2) Plugin update, didn't have Freemius before, and now have the SDK:
1439
- * 2.1 _activate_plugin_event_hook() will not be executed, because
1440
- * the activation hook do NOT fires on updates since WP 3.1.
1441
- * 2.2 When _plugins_loaded() will be executed, $this->_storage->is_plugin_new_install will
1442
- * be empty, therefore, it will be set to FALSE.
1443
- *
1444
- * 3) Plugin update, had Freemius in prev version as well:
1445
- * 3.1 _version_updates_handler() will be executed 1st, since FS was installed
1446
- * before, $this->_storage->plugin_last_version will NOT be empty,
1447
- * therefore, $this->_storage->is_plugin_new_install will be set to FALSE.
1448
- * 3.2 When _plugins_loaded() will be executed, $this->_storage->is_plugin_new_install is
1449
- * already set, therefore, it will not be modified.
1450
- *
1451
- * Use-case #3 is backward compatible, #3.1 will be executed since 1.0.9.
1452
- *
1453
- * NOTE:
1454
- * The only fallback of this mechanism is if an admin updates a plugin based on use-case #2,
1455
- * and then, the next immediate PageView is the plugin's main settings page, it will not
1456
- * show the opt-in right away. The reason it will happen is because Freemius execution
1457
- * will be turned off till the plugin is fully loaded at least once
1458
- * (till $this->_storage->was_plugin_loaded is TRUE).
1459
- *
1460
- * @author Vova Feldman (@svovaf)
1461
- * @since 1.1.9
1462
- *
1463
- */
1464
- function _plugins_loaded() {
1465
- // Update flag that plugin was loaded with Freemius at least once.
1466
- $this->_storage->was_plugin_loaded = true;
1467
-
1468
- /**
1469
- * Bug fix - only set to false when it's a plugin, due to the
1470
- * execution sequence of the theme hooks and our methods, if
1471
- * this will be set for themes, Freemius will always assume
1472
- * it's a theme update.
1473
- *
1474
- * @author Vova Feldman (@svovaf)
1475
- * @since 1.2.2.2
1476
- */
1477
- if ( $this->is_plugin() &&
1478
- ! isset( $this->_storage->is_plugin_new_install )
1479
- ) {
1480
- $this->_storage->is_plugin_new_install = (
1481
- ! is_plugin_active( $this->_plugin_basename ) &&
1482
- empty( $this->_storage->plugin_last_version )
1483
- );
1484
- }
1485
- }
1486
-
1487
- /**
1488
- * Add special parameter to WP admin AJAX calls so when we
1489
- * process AJAX calls we can identify its source properly.
1490
- *
1491
- * @author Leo Fajardo (@leorw)
1492
- * @since 2.0.0
1493
- */
1494
- static function _enrich_ajax_url() {
1495
- $admin_param = is_network_admin() ?
1496
- '_fs_network_admin' :
1497
- '_fs_blog_admin';
1498
- ?>
1499
- <script type="text/javascript">
1500
- (function ($) {
1501
- $(document).ajaxSend(function (event, jqxhr, settings) {
1502
- if (settings.url &&
1503
- -1 < settings.url.indexOf('admin-ajax.php') &&
1504
- ! ( settings.url.indexOf( '<?php echo $admin_param ?>' ) > 0 )
1505
- ) {
1506
- if (
1507
- 'string' === typeof settings.data &&
1508
- settings.data.indexOf( 'action=heartbeat' ) > 0
1509
- ) {
1510
- return;
1511
- }
1512
-
1513
- if (settings.url.indexOf('?') > 0) {
1514
- settings.url += '&';
1515
- } else {
1516
- settings.url += '?';
1517
- }
1518
-
1519
- settings.url += '<?php echo $admin_param ?>=true';
1520
- }
1521
- });
1522
- })(jQuery);
1523
- </script>
1524
- <?php
1525
- }
1526
-
1527
- /**
1528
- * Opens the support forum subemenu item in a new browser page.
1529
- *
1530
- * @author Vova Feldman (@svovaf)
1531
- * @since 2.1.4
1532
- */
1533
- static function _open_support_forum_in_new_page() {
1534
- ?>
1535
- <script type="text/javascript">
1536
- (function ($) {
1537
- $('.fs-submenu-item.wp-support-forum').parent().attr( { target: '_blank', rel: 'noopener noreferrer' } );
1538
- })(jQuery);
1539
- </script>
1540
- <?php
1541
- }
1542
-
1543
- /**
1544
- * @author Vova Feldman (@svovaf)
1545
- * @since 1.0.9
1546
- */
1547
- private function register_constructor_hooks() {
1548
- $this->_logger->entrance();
1549
-
1550
- if ( is_admin() ) {
1551
- add_action( 'admin_init', array( &$this, '_hook_action_links_and_register_account_hooks' ) );
1552
-
1553
- if ( $this->is_plugin() ) {
1554
- if ( self::is_plugin_install_page() && true !== fs_request_get_bool( 'fs_allow_updater_and_dialog' ) ) {
1555
- /**
1556
- * Unless the `fs_allow_updater_and_dialog` URL param exists and its value is `true`, make
1557
- * Freemius-related updates unavailable on the "Add Plugins" admin page (/plugin-install.php)
1558
- * so that they won't interfere with the .org plugins' functionalities on that page (e.g.
1559
- * updating of a .org plugin).
1560
- */
1561
- add_filter( 'site_transient_update_plugins', array( 'Freemius', '_remove_fs_updates_from_plugin_install_page' ), 10, 2 );
1562
- } else if ( self::is_plugins_page() || self::is_updates_page() ) {
1563
- /**
1564
- * On the "Plugins" and "Updates" admin pages, if there are premium or non–org-compliant plugins, modify their details dialog URLs (add a Freemius-specific param) so that the SDK can determine if the plugin information dialog should show information from Freemius.
1565
- *
1566
- * @author Leo Fajardo (@leorw)
1567
- * @since 2.2.3
1568
- */
1569
- add_action( 'admin_footer', array( 'Freemius', '_prepend_fs_allow_updater_and_dialog_flag_url_param' ) );
1570
- }
1571
-
1572
- $plugin_dir = dirname( $this->_plugin_dir_path ) . '/';
1573
-
1574
- /**
1575
- * @since 1.2.2
1576
- *
1577
- * Hook to both free and premium version activations to support
1578
- * auto deactivation on the other version activation.
1579
- */
1580
- register_activation_hook(
1581
- $plugin_dir . $this->_free_plugin_basename,
1582
- array( &$this, '_activate_plugin_event_hook' )
1583
- );
1584
-
1585
- register_activation_hook(
1586
- $plugin_dir . $this->premium_plugin_basename(),
1587
- array( &$this, '_activate_plugin_event_hook' )
1588
- );
1589
- } else {
1590
- add_action( 'after_switch_theme', array( &$this, '_activate_theme_event_hook' ), 10, 2 );
1591
-
1592
- add_action( 'admin_footer', array( &$this, '_style_premium_theme' ) );
1593
- }
1594
-
1595
- /**
1596
- * Part of the mechanism to identify new plugin install vs. plugin update.
1597
- *
1598
- * @author Vova Feldman (@svovaf)
1599
- * @since 1.1.9
1600
- */
1601
- if ( empty( $this->_storage->was_plugin_loaded ) ) {
1602
- /**
1603
- * During the plugin activation (not theme), 'plugins_loaded' will be already executed
1604
- * when the logic gets here since the activation logic first add the activate plugins,
1605
- * then triggers 'plugins_loaded', and only then include the code of the plugin that
1606
- * is activated. Which means that _plugins_loaded() will NOT be executed during the
1607
- * plugin activation, and that IS intentional.
1608
- *
1609
- * @author Vova Feldman (@svovaf)
1610
- */
1611
- if ( $this->is_plugin() &&
1612
- $this->is_activation_mode( false ) &&
1613
- 0 == did_action( 'plugins_loaded' )
1614
- ) {
1615
- add_action( 'plugins_loaded', array( &$this, '_plugins_loaded' ) );
1616
- } else {
1617
- // If was activated before, then it was already loaded before.
1618
- $this->_plugins_loaded();
1619
- }
1620
- }
1621
-
1622
- if ( ! self::is_ajax() ) {
1623
- if ( ! $this->is_addon() ) {
1624
- add_action( 'init', array( &$this, '_add_default_submenu_items' ), WP_FS__LOWEST_PRIORITY );
1625
- }
1626
- }
1627
-
1628
- if ( $this->_storage->handle_gdpr_admin_notice ) {
1629
- add_action( 'init', array( &$this, '_maybe_show_gdpr_admin_notice' ) );
1630
- }
1631
-
1632
- add_action( 'init', array( &$this, '_maybe_add_gdpr_optin_ajax_handler') );
1633
- add_action( 'init', array( &$this, '_maybe_add_pricing_ajax_handler' ) );
1634
- }
1635
-
1636
- if ( $this->is_plugin() ) {
1637
- if ( $this->_is_network_active ) {
1638
- add_action( 'wpmu_new_blog', array( $this, '_after_new_blog_callback' ), 10, 6 );
1639
- }
1640
-
1641
- register_deactivation_hook( $this->_plugin_main_file_path, array( &$this, '_deactivate_plugin_hook' ) );
1642
- }
1643
-
1644
- if ( is_multisite() ) {
1645
- add_action( 'deactivate_blog', array( &$this, '_after_site_deactivated_callback' ) );
1646
- add_action( 'archive_blog', array( &$this, '_after_site_deactivated_callback' ) );
1647
- add_action( 'make_spam_blog', array( &$this, '_after_site_deactivated_callback' ) );
1648
- add_action( 'deleted_blog', array( &$this, '_after_site_deleted_callback' ), 10, 2 );
1649
-
1650
- add_action( 'activate_blog', array( &$this, '_after_site_reactivated_callback' ) );
1651
- add_action( 'unarchive_blog', array( &$this, '_after_site_reactivated_callback' ) );
1652
- add_action( 'make_ham_blog', array( &$this, '_after_site_reactivated_callback' ) );
1653
- }
1654
-
1655
- if ( $this->is_theme() &&
1656
- self::is_customizer() &&
1657
- $this->apply_filters( 'show_customizer_upsell', true )
1658
- ) {
1659
- // Register customizer upsell.
1660
- add_action( 'customize_register', array( &$this, '_customizer_register' ) );
1661
- }
1662
-
1663
- add_action( 'admin_init', array( &$this, '_redirect_on_clicked_menu_link' ), WP_FS__LOWEST_PRIORITY );
1664
-
1665
- if ( $this->is_theme() && ! $this->is_migration() ) {
1666
- add_action( 'admin_init', array( &$this, '_add_tracking_links' ) );
1667
- }
1668
-
1669
- add_action( 'admin_init', array( &$this, '_add_license_activation' ) );
1670
- add_action( 'admin_init', array( &$this, '_add_premium_version_upgrade_selection' ) );
1671
- add_action( 'admin_init', array( &$this, '_add_beta_mode_update_handler' ) );
1672
- add_action( 'admin_init', array( &$this, '_add_user_change_option' ) );
1673
-
1674
- $this->add_ajax_action( 'update_billing', array( &$this, '_update_billing_ajax_action' ) );
1675
- $this->add_ajax_action( 'start_trial', array( &$this, '_start_trial_ajax_action' ) );
1676
- $this->add_ajax_action( 'set_data_debug_mode', array( &$this, '_set_data_debug_mode' ) );
1677
- $this->add_ajax_action( 'toggle_whitelabel_mode', array( &$this, '_toggle_whitelabel_mode_ajax_handler' ) );
1678
-
1679
- if ( $this->_is_network_active && fs_is_network_admin() ) {
1680
- $this->add_ajax_action( 'network_activate', array( &$this, '_network_activate_ajax_action' ) );
1681
- }
1682
-
1683
- $this->add_ajax_action( 'install_premium_version', array(
1684
- &$this,
1685
- '_install_premium_version_ajax_action'
1686
- ) );
1687
-
1688
- $this->add_ajax_action( 'submit_affiliate_application', array( &$this, '_submit_affiliate_application' ) );
1689
-
1690
- $this->add_action( 'after_plans_sync', array( &$this, '_check_for_trial_plans' ) );
1691
-
1692
- $this->add_action( 'sdk_version_update', array( &$this, '_sdk_version_update' ), WP_FS__DEFAULT_PRIORITY, 2 );
1693
-
1694
- $this->add_action(
1695
- 'plugin_version_update',
1696
- array( &$this, '_after_version_update' ),
1697
- WP_FS__DEFAULT_PRIORITY,
1698
- 2
1699
- );
1700
- $this->add_filter( 'after_code_type_change', array( &$this, '_after_code_type_change' ) );
1701
-
1702
- add_action( 'admin_init', array( &$this, '_add_trial_notice' ) );
1703
- add_action( 'admin_init', array( &$this, '_add_affiliate_program_notice' ) );
1704
- add_action( 'admin_enqueue_scripts', array( &$this, '_enqueue_common_css' ) );
1705
-
1706
- /**
1707
- * Handle request to reset anonymous mode for `get_reconnect_url()`.
1708
- *
1709
- * @author Vova Feldman (@svovaf)
1710
- * @since 1.2.1.5
1711
- */
1712
- if ( fs_request_is_action( 'reset_anonymous_mode' ) &&
1713
- $this->get_unique_affix() === fs_request_get( 'fs_unique_affix' )
1714
- ) {
1715
- add_action( 'admin_init', array( &$this, 'connect_again' ) );
1716
- }
1717
- }
1718
-
1719
- /**
1720
- * Register the required hooks right after the settings parse is completed.
1721
- *
1722
- * @author Vova Feldman (@svovaf)
1723
- * @since 2.3.1
1724
- */
1725
- private function register_after_settings_parse_hooks() {
1726
- if ( is_admin() &&
1727
- $this->is_theme() &&
1728
- $this->is_premium() &&
1729
- ! $this->has_active_valid_license()
1730
- ) {
1731
- $this->add_ajax_action(
1732
- 'delete_theme_update_data',
1733
- array( &$this, '_delete_theme_update_data_action' )
1734
- );
1735
- }
1736
-
1737
- if ( $this->show_settings_with_tabs() ) {
1738
- /**
1739
- * Include the required hooks to capture the theme settings' page tabs
1740
- * and cache them.
1741
- *
1742
- * @author Vova Feldman (@svovaf)
1743
- * @since 1.2.2.7
1744
- */
1745
- if ( ! $this->_cache->has_valid( 'tabs' ) ) {
1746
- add_action( 'admin_footer', array( &$this, '_tabs_capture' ) );
1747
- // Add license activation AJAX callback.
1748
- $this->add_ajax_action( 'store_tabs', array( &$this, '_store_tabs_ajax_action' ) );
1749
-
1750
- add_action( 'admin_enqueue_scripts', array( &$this, '_store_tabs_styles' ), 9999999 );
1751
- }
1752
-
1753
- add_action(
1754
- 'admin_footer',
1755
- array( &$this, '_add_freemius_tabs' ),
1756
- /**
1757
- * The tabs JS code must be executed after the tabs capture logic (_tabs_capture()).
1758
- * That's why the priority is 11 while the tabs capture logic is added
1759
- * with priority 10.
1760
- *
1761
- * @author Vova Feldman (@svovaf)
1762
- */
1763
- 11
1764
- );
1765
- }
1766
-
1767
- if ( ! self::is_ajax() ) {
1768
- if ( ! $this->is_addon() || $this->is_only_premium() ) {
1769
- add_action(
1770
- ( $this->_is_network_active && fs_is_network_admin() ? 'network_' : '' ) . 'admin_menu',
1771
- array( &$this, '_prepare_admin_menu' ),
1772
- WP_FS__LOWEST_PRIORITY
1773
- );
1774
- }
1775
- }
1776
- }
1777
-
1778
- /**
1779
- * Makes Freemius-related updates unavailable on the "Add Plugins" admin page (/plugin-install.php) so that
1780
- * they won't interfere with the .org plugins' functionalities on that page (e.g. updating of a .org plugin).
1781
- *
1782
- * @author Leo Fajardo (@leorw)
1783
- * @since 2.2.3
1784
- *
1785
- * @param object $updates
1786
- * @param string|null $transient
1787
- *
1788
- * @return object
1789
- */
1790
- static function _remove_fs_updates_from_plugin_install_page( $updates, $transient = null ) {
1791
- if ( is_object( $updates ) && isset( $updates->response ) ) {
1792
- foreach ( $updates->response as $file => $plugin ) {
1793
- if ( isset( $plugin->package ) && false !== strpos( $plugin->package, 'api.freemius' ) ) {
1794
- unset( $updates->response[ $file ] );
1795
- }
1796
- }
1797
- }
1798
-
1799
- return $updates;
1800
- }
1801
-
1802
- /**
1803
- * Prepends the `fs_allow_updater_and_dialog` param to the plugin information URLs to tell the SDK to handle
1804
- * the information that is shown on the plugin details dialog that is shown when the relevant link is clicked.
1805
- *
1806
- * @author Leo Fajardo (@leorw)
1807
- * @since 2.2.3
1808
- *
1809
- * @return string
1810
- */
1811
- static function _prepend_fs_allow_updater_and_dialog_flag_url_param() {
1812
- $slug_basename_map = array();
1813
- foreach ( self::$_instances as $instance ) {
1814
- if ( ! $instance->is_plugin() ) {
1815
- continue;
1816
- }
1817
-
1818
- $slug_basename_map[ $instance->get_slug() ] = $instance->premium_plugin_basename();
1819
- }
1820
- ?>
1821
- <script type="text/javascript">
1822
- (function( $ ) {
1823
- var slugBasenameMap = <?php echo json_encode( $slug_basename_map ) ?>;
1824
- for ( var slug in slugBasenameMap ) {
1825
- var basename = slugBasenameMap[ slug ];
1826
-
1827
- // Try to get the plugin rows if on the "Plugins" page.
1828
- var $pluginRows = $( '.wp-list-table.plugins tr[data-plugin="' + basename + '"]');
1829
-
1830
- if ( 0 === $pluginRows.length ) {
1831
- // Try to get the plugin rows if on the "Updates" page.
1832
- var $pluginCheckbox = $( '#update-plugins-table input[type="checkbox"][value="' + basename + '"]' );
1833
- if ( 0 !== $pluginCheckbox.length ) {
1834
- $pluginRows = $pluginCheckbox.parents( 'tr:first' );
1835
- }
1836
- }
1837
-
1838
- if ( 0 === $pluginRows.length ) {
1839
- // No plugin rows found.
1840
- continue;
1841
- }
1842
-
1843
- // Find the "View details" links and add the `fs_allow_updater_and_dialog` param to the URL.
1844
- $pluginRows.find( 'a[href*="plugin-install.php?tab=plugin-information"]' ).each(function() {
1845
- var $this = $( this ),
1846
- href = $this.attr( 'href' ).replace( '?tab=', '?fs_allow_updater_and_dialog=true&tab=');
1847
-
1848
- $this.attr( 'href', href );
1849
- });
1850
- }
1851
- })( jQuery );
1852
- </script>
1853
- <?php
1854
- }
1855
-
1856
- /**
1857
- * @author Leo Fajardo (@leorw)
1858
- * @since 2.3.0
1859
- */
1860
- static function _maybe_add_beta_label_styles() {
1861
- $has_any_beta_version = false;
1862
-
1863
- foreach ( self::$_instances as $instance ) {
1864
- if ( $instance->is_beta() ) {
1865
- $has_any_beta_version = true;
1866
- break;
1867
- }
1868
- }
1869
-
1870
- if ( $has_any_beta_version ) {
1871
- fs_enqueue_local_style( 'fs_plugins', '/admin/plugins.css' );
1872
- }
1873
- }
1874
-
1875
- /**
1876
- * @author Leo Fajardo (@leorw)
1877
- * @since 2.3.0
1878
- */
1879
- static function _maybe_add_beta_label_to_plugins_and_handle_confirmation() {
1880
- $beta_data = array();
1881
-
1882
- foreach ( self::$_instances as $instance ) {
1883
- if ( ! $instance->is_premium() ) {
1884
- continue;
1885
- }
1886
-
1887
- /**
1888
- * If there's an available beta version update, a confirmation message will be shown when the
1889
- * "Update now" link on the "Plugins" or "Themes" page is clicked.
1890
- */
1891
- $has_beta_update = $instance->has_beta_update();
1892
-
1893
- $is_beta = (
1894
- // The "Beta" label is added separately for themes.
1895
- $instance->is_plugin() &&
1896
- $instance->is_beta()
1897
- );
1898
-
1899
- if ( ! $is_beta && ! $has_beta_update ) {
1900
- continue;
1901
- }
1902
-
1903
- $beta_data[ $instance->get_plugin_basename() ] = array( 'is_installed_version_beta' => $is_beta );
1904
-
1905
- if ( ! $has_beta_update ) {
1906
- continue;
1907
- }
1908
-
1909
- $beta_data[ $instance->get_plugin_basename() ]['beta_version_update_confirmation_message'] = sprintf(
1910
- '%s %s',
1911
- sprintf(
1912
- fs_esc_attr_inline(
1913
- 'An update to a Beta version will replace your installed version of %s with the latest Beta release - use with caution, and not on production sites. You have been warned.',
1914
- 'beta-version-update-caution',
1915
- $instance->get_slug()
1916
- ),
1917
- $instance->get_plugin_title()
1918
- ),
1919
- fs_esc_attr_inline( 'Would you like to proceed with the update?', 'update-confirmation', $instance->get_slug() )
1920
- );
1921
- }
1922
-
1923
- if ( empty( $beta_data ) ) {
1924
- return;
1925
- }
1926
- ?>
1927
- <script type="text/javascript">
1928
- ( function( $ ) {
1929
- var betaData = <?php echo json_encode( $beta_data ) ?>;
1930
-
1931
- for ( var pluginBasename in betaData ) {
1932
- if ( ! betaData.hasOwnProperty( pluginBasename ) ) {
1933
- continue;
1934
- }
1935
-
1936
- if ( ! betaData[ pluginBasename ].is_installed_version_beta ) {
1937
- continue;
1938
- }
1939
-
1940
- var $parentContainer = $( '.wp-list-table.plugins tr[data-plugin="' + pluginBasename + '"]' );
1941
- if ( 0 === $parentContainer.length ) {
1942
- continue;
1943
- }
1944
-
1945
- $parentContainer.find( '.plugin-title > strong:first-child').append(
1946
- '<span class="fs-tag fs-info"><?php fs_esc_js_echo_inline( 'Beta', 'beta' ) ?></span>'
1947
- );
1948
- }
1949
-
1950
- setTimeout( function() {
1951
- // Wait a little bit before adding the event handler, otherwise, it will be overridden by the core WP logic.
1952
- $( '.plugins .update-message .update-link, .themes .theme .update-message' ).on( 'click', function() {
1953
- var $parentContainer = $( this ).parents( 'tr:first' );
1954
- pluginBasename = ( 0 !== $parentContainer.length ) ?
1955
- $parentContainer.data( 'plugin' ) :
1956
- $( this ).parents( '.theme:first' ).data( 'slug' );
1957
-
1958
- if (
1959
- betaData[ pluginBasename ] &&
1960
- betaData[ pluginBasename ].beta_version_update_confirmation_message &&
1961
- ! confirm( betaData[ pluginBasename ].beta_version_update_confirmation_message )
1962
- ) {
1963
- return false;
1964
- }
1965
- } );
1966
- }, 20 );
1967
- } )( jQuery );
1968
- </script>
1969
- <?php
1970
- }
1971
-
1972
- /**
1973
- * Keeping the uninstall hook registered for free or premium plugin version may result to a fatal error that
1974
- * could happen when a user tries to uninstall either version while one of them is still active. Uninstalling a
1975
- * plugin will trigger inclusion of the free or premium version and if one of them is active during the
1976
- * uninstallation, a fatal error may occur in case the plugin's class or functions are already defined.
1977
- *
1978
- * @author Leo Fajardo (@leorw)
1979
- *
1980
- * @since 1.2.0
1981
- */
1982
- private function unregister_uninstall_hook() {
1983
- $uninstallable_plugins = (array) get_option( 'uninstall_plugins' );
1984
- unset( $uninstallable_plugins[ $this->_free_plugin_basename ] );
1985
- unset( $uninstallable_plugins[ $this->premium_plugin_basename() ] );
1986
-
1987
- update_option( 'uninstall_plugins', $uninstallable_plugins );
1988
- }
1989
-
1990
- /**
1991
- * @since 1.2.0 Invalidate module's main file cache, otherwise, FS_Plugin_Updater will not fetch updates.
1992
- *
1993
- * @param bool $store_prev_path
1994
- */
1995
- private function clear_module_main_file_cache( $store_prev_path = true ) {
1996
- if ( ! isset( $this->_storage->plugin_main_file ) ||
1997
- empty( $this->_storage->plugin_main_file->path )
1998
- ) {
1999
- return;
2000
- }
2001
-
2002
- if ( ! $store_prev_path ) {
2003
- /**
2004
- * Storing the previous path is not needed when clearing the cache after an SDK version update since
2005
- * the main purpose of the cache clearing in that event is to correct a wrong plugin main file path
2006
- * which causes data mix-up between plugins (e.g. titles and versions of an add-on and its parent plugin).
2007
- *
2008
- * @author Leo Fajardo (@leorw)
2009
- * @since 2.2.1
2010
- */
2011
- unset( $this->_storage->plugin_main_file->path );
2012
- } else {
2013
- $plugin_main_file = clone $this->_storage->plugin_main_file;
2014
-
2015
- // Store cached path (2nd layer cache).
2016
- $plugin_main_file->prev_path = $plugin_main_file->path;
2017
-
2018
- // Clear cached path.
2019
- unset( $plugin_main_file->path );
2020
-
2021
- $this->_storage->plugin_main_file = $plugin_main_file;
2022
- }
2023
-
2024
- /**
2025
- * Clear global cached path.
2026
- *
2027
- * @author Leo Fajardo (@leorw)
2028
- * @since 1.2.2
2029
- */
2030
- $id_slug_type_path_map = self::$_accounts->get_option( 'id_slug_type_path_map' );
2031
- unset( $id_slug_type_path_map[ $this->_module_id ]['path'] );
2032
- self::$_accounts->set_option( 'id_slug_type_path_map', $id_slug_type_path_map, true );
2033
- }
2034
-
2035
- /**
2036
- * @author Leo Fajardo (@leorw)
2037
- * @since 2.0.0
2038
- */
2039
- function _hook_action_links_and_register_account_hooks() {
2040
- if ( $this->is_migration() ) {
2041
- return;
2042
- }
2043
-
2044
- $this->_add_tracking_links();
2045
-
2046
- if ( self::is_plugins_page() && $this->is_plugin() ) {
2047
- $this->hook_plugin_action_links();
2048
- }
2049
-
2050
- $this->_register_account_hooks();
2051
- }
2052
-
2053
- /**
2054
- * @author Vova Feldman (@svovaf)
2055
- * @since 1.0.9
2056
- */
2057
- private function _register_account_hooks() {
2058
- if ( ! is_admin() ) {
2059
- return;
2060
- }
2061
-
2062
- /**
2063
- * Always show the deactivation feedback form since we added
2064
- * automatic free version deactivation upon premium code activation.
2065
- *
2066
- * @since 1.2.1.6
2067
- */
2068
- $this->add_ajax_action(
2069
- 'submit_uninstall_reason',
2070
- array( &$this, '_submit_uninstall_reason_action' )
2071
- );
2072
-
2073
- $this->add_ajax_action(
2074
- 'cancel_subscription_or_trial',
2075
- array( &$this, 'cancel_subscription_or_trial_ajax_action' )
2076
- );
2077
-
2078
- if ( ! $this->is_addon() || $this->is_parent_plugin_installed() ) {
2079
- if ( ( $this->is_plugin() && self::is_plugins_page() ) ||
2080
- ( $this->is_theme() && self::is_themes_page() )
2081
- ) {
2082
- add_action( 'admin_footer', array( &$this, '_add_deactivation_feedback_dialog_box' ) );
2083
- }
2084
- }
2085
- }
2086
-
2087
- /**
2088
- * Leverage backtrace to find caller plugin file path.
2089
- *
2090
- * @author Vova Feldman (@svovaf)
2091
- * @since 1.0.6
2092
- *
2093
- * @param bool $is_init Is initiation sequence.
2094
- *
2095
- * @return string
2096
- */
2097
- private function _find_caller_plugin_file( $is_init = false ) {
2098
- // Try to load the cached value of the file path.
2099
- if ( isset( $this->_storage->plugin_main_file ) ) {
2100
- $plugin_main_file = $this->_storage->plugin_main_file;
2101
- if ( ! empty( $plugin_main_file->path ) ) {
2102
- $absolute_path = $this->get_absolute_path( $plugin_main_file->path );
2103
- if ( file_exists( $absolute_path ) ) {
2104
- return $absolute_path;
2105
- }
2106
- }
2107
- }
2108
-
2109
- /**
2110
- * @since 1.2.1
2111
- *
2112
- * `clear_module_main_file_cache()` is clearing the plugin's cached path on
2113
- * deactivation. Therefore, if any plugin/theme was initiating `Freemius`
2114
- * with that plugin's slug, it was overriding the empty plugin path with a wrong path.
2115
- *
2116
- * So, we've added a special mechanism with a 2nd layer of cache that uses `prev_path`
2117
- * when the class instantiator isn't the module.
2118
- */
2119
- if ( ! $is_init ) {
2120
- // Fetch prev path cache.
2121
- if ( isset( $this->_storage->plugin_main_file ) &&
2122
- ! empty( $this->_storage->plugin_main_file->prev_path )
2123
- ) {
2124
- $absolute_path = $this->get_absolute_path( $this->_storage->plugin_main_file->prev_path );
2125
- if ( file_exists( $absolute_path ) ) {
2126
- return $absolute_path;
2127
- }
2128
- }
2129
-
2130
- wp_die(
2131
- $this->get_text_inline( 'Freemius SDK couldn\'t find the plugin\'s main file. Please contact sdk@freemius.com with the current error.', 'failed-finding-main-path' ) .
2132
- " Module: {$this->_slug}; SDK: " . WP_FS__SDK_VERSION . ";",
2133
- $this->get_text_inline( 'Error', 'error' ),
2134
- array( 'back_link' => true )
2135
- );
2136
- }
2137
-
2138
- /**
2139
- * @since 1.2.1
2140
- *
2141
- * Only the original instantiator that calls dynamic_init can modify the module's path.
2142
- */
2143
- // Find caller module.
2144
- $id_slug_type_path_map = self::$_accounts->get_option( 'id_slug_type_path_map', array() );
2145
- $this->_storage->plugin_main_file = (object) array(
2146
- 'path' => $id_slug_type_path_map[ $this->_module_id ]['path'],
2147
- );
2148
-
2149
- return $this->get_absolute_path( $id_slug_type_path_map[ $this->_module_id ]['path'] );
2150
- }
2151
-
2152
- /**
2153
- * @author Leo Fajardo (@leorw)
2154
- * @since 1.2.3
2155
- *
2156
- * @param string $path
2157
- *
2158
- * @return string
2159
- */
2160
- private function get_relative_path( $path ) {
2161
- $module_root_dir = $this->get_module_root_dir_path();
2162
- if ( 0 === strpos( $path, $module_root_dir ) ) {
2163
- $path = substr( $path, strlen( $module_root_dir ) );
2164
- }
2165
-
2166
- return $path;
2167
- }
2168
-
2169
- /**
2170
- * @author Leo Fajardo (@leorw)
2171
- * @since 1.2.3
2172
- *
2173
- * @param string $path
2174
- * @param string|bool $module_type
2175
- *
2176
- * @return string
2177
- */
2178
- private function get_absolute_path( $path, $module_type = false ) {
2179
- $module_root_dir = $this->get_module_root_dir_path( $module_type );
2180
- if ( 0 !== strpos( $path, $module_root_dir ) ) {
2181
- $path = fs_normalize_path( $module_root_dir . $path );
2182
- }
2183
-
2184
- return $path;
2185
- }
2186
-
2187
- /**
2188
- * @author Leo Fajardo (@leorw)
2189
- * @since 1.2.3
2190
- *
2191
- * @param string|bool $module_type
2192
- *
2193
- * @return string
2194
- */
2195
- private function get_module_root_dir_path( $module_type = false ) {
2196
- $is_plugin = empty( $module_type ) ?
2197
- $this->is_plugin() :
2198
- ( WP_FS__MODULE_TYPE_PLUGIN === $module_type );
2199
-
2200
- return fs_normalize_path( trailingslashit( $is_plugin ?
2201
- WP_PLUGIN_DIR :
2202
- get_theme_root( get_stylesheet() ) ) );
2203
- }
2204
-
2205
- /**
2206
- * @author Leo Fajardo (@leorw)
2207
- *
2208
- * @param number $module_id
2209
- * @param string $slug
2210
- *
2211
- * @since 1.2.2
2212
- */
2213
- private function store_id_slug_type_path_map( $module_id, $slug ) {
2214
- $id_slug_type_path_map = self::$_accounts->get_option( 'id_slug_type_path_map', array() );
2215
-
2216
- $store_option = false;
2217
-
2218
- if ( ! isset( $id_slug_type_path_map[ $module_id ] ) ) {
2219
- $id_slug_type_path_map[ $module_id ] = array(
2220
- 'slug' => $slug
2221
- );
2222
-
2223
- $store_option = true;
2224
- } else if (
2225
- isset( $id_slug_type_path_map[ $module_id ]['slug'] ) &&
2226
- $slug !== $id_slug_type_path_map[ $module_id ]['slug']
2227
- ) {
2228
- $id_slug_type_path_map[ $module_id ]['slug'] = $slug;
2229
- $store_option = true;
2230
- }
2231
-
2232
- if ( empty( $id_slug_type_path_map[ $module_id ]['path'] ) ||
2233
- /**
2234
- * This verification is for cases when suddenly the same module
2235
- * is installed but with a different folder name.
2236
- *
2237
- * @author Vova Feldman (@svovaf)
2238
- * @since 1.2.3
2239
- */
2240
- ! file_exists( $this->get_absolute_path(
2241
- $id_slug_type_path_map[ $module_id ]['path'],
2242
- $id_slug_type_path_map[ $module_id ]['type']
2243
- ) )
2244
- ) {
2245
- $caller_main_file_and_type = $this->get_caller_main_file_and_type();
2246
-
2247
- $id_slug_type_path_map[ $module_id ]['type'] = $caller_main_file_and_type->module_type;
2248
- $id_slug_type_path_map[ $module_id ]['path'] = $caller_main_file_and_type->path;
2249
-
2250
- $store_option = true;
2251
- }
2252
-
2253
- if ( $store_option ) {
2254
- self::$_accounts->set_option( 'id_slug_type_path_map', $id_slug_type_path_map, true );
2255
- }
2256
- }
2257
-
2258
- /**
2259
- * Identifies the caller type: plugin or theme.
2260
- *
2261
- * @author Leo Fajardo (@leorw)
2262
- * @since 1.2.2
2263
- *
2264
- * @author Vova Feldman (@svovaf)
2265
- * @since 1.2.2.3 Find the earliest module in the call stack that calls to the SDK. This fix is for cases when
2266
- * add-ons are relying on loading the SDK from the parent module, and also allows themes including the
2267
- * SDK an internal file instead of directly from functions.php.
2268
- * @since 1.2.1.7 Knows how to handle cases when an add-on includes the parent module logic.
2269
- */
2270
- private function get_caller_main_file_and_type() {
2271
- self::require_plugin_essentials();
2272
-
2273
- $all_plugins = fs_get_plugins( true );
2274
- $all_plugins_paths = array();
2275
-
2276
- // Get active plugin's main files real full names (might be symlinks).
2277
- foreach ( $all_plugins as $relative_path => $data ) {
2278
- if ( false === strpos( fs_normalize_path( $relative_path ), '/' ) ) {
2279
- /**
2280
- * Ignore plugins that don't have a folder (e.g. Hello Dolly) since they
2281
- * can't really include the SDK.
2282
- *
2283
- * @author Vova Feldman
2284
- * @since 1.2.1.7
2285
- */
2286
- continue;
2287
- }
2288
-
2289
- $all_plugins_paths[] = fs_normalize_path( realpath( WP_PLUGIN_DIR . '/' . $relative_path ) );
2290
- }
2291
-
2292
- $caller_file_candidate = false;
2293
- $caller_map = array();
2294
- $module_type = WP_FS__MODULE_TYPE_PLUGIN;
2295
- $themes_dir = fs_normalize_path( get_theme_root( get_stylesheet() ) );
2296
- $plugin_dir_to_skip = false;
2297
-
2298
- for ( $i = 1, $bt = debug_backtrace(), $len = count( $bt ); $i < $len; $i ++ ) {
2299
- if ( empty( $bt[ $i ]['file'] ) ) {
2300
- continue;
2301
- }
2302
-
2303
- if ( $i > 1 && ! empty( $bt[ $i - 1 ]['file'] ) && $bt[ $i ]['file'] === $bt[ $i - 1 ]['file'] ) {
2304
- // If file same as the prev file in the stack, skip it.
2305
- continue;
2306
- }
2307
-
2308
- if ( ! empty( $bt[ $i ]['function'] ) && in_array( $bt[ $i ]['function'], array(
2309
- 'do_action',
2310
- 'apply_filter',
2311
- // The string split is stupid, but otherwise, theme check
2312
- // throws info notices.
2313
- 'requir' . 'e_once',
2314
- 'requir' . 'e',
2315
- 'includ' . 'e_once',
2316
- 'includ' . 'e',
2317
- 'install_and_activate_plugin',
2318
- 'try_activate_plugin',
2319
- 'activate_plugin'
2320
- ) )
2321
- ) {
2322
- if ( 'activate_plugin' === $bt[ $i ]['function'] ) {
2323
- /**
2324
- * Store the directory of the activator plugin so that any other file that starts with it
2325
- * cannot be mistakenly chosen as a candidate caller file.
2326
- *
2327
- * @author Leo Fajardo
2328
- *
2329
- * @since 2.3.0
2330
- */
2331
- $caller_file_path = fs_normalize_path( $bt[ $i ]['file'] );
2332
-
2333
- foreach ( $all_plugins_paths as $plugin_path ) {
2334
- $plugin_dir = fs_normalize_path( dirname( $plugin_path ) . '/' );
2335
- if ( false !== strpos( $caller_file_path, $plugin_dir ) ) {
2336
- $plugin_dir_to_skip = $plugin_dir;
2337
-
2338
- break;
2339
- }
2340
- }
2341
- }
2342
-
2343
- // Ignore call stack hooks and files inclusion.
2344
- continue;
2345
- }
2346
-
2347
- $caller_file_path = fs_normalize_path( $bt[ $i ]['file'] );
2348
-
2349
- if ( ! empty( $plugin_dir_to_skip ) ) {
2350
- /**
2351
- * Skip if it's an activator plugin file to avoid mistakenly choosing it as a candidate caller file.
2352
- *
2353
- * @author Leo Fajardo
2354
- *
2355
- * @since 2.3.0
2356
- */
2357
- if ( 0 === strpos( $caller_file_path, $plugin_dir_to_skip ) ) {
2358
- continue;
2359
- }
2360
- }
2361
-
2362
- if ( 'functions.php' === basename( $caller_file_path ) ) {
2363
- /**
2364
- * 1. Assumes that theme's starting execution file is functions.php.
2365
- * 2. This complex logic fixes symlink issues (e.g. with Vargant).
2366
- *
2367
- * @author Vova Feldman (@svovaf)
2368
- * @since 1.2.2.5
2369
- */
2370
-
2371
- if ( $caller_file_path == fs_normalize_path( realpath( trailingslashit( $themes_dir ) . basename( dirname( $caller_file_path ) ) . '/' . basename( $caller_file_path ) ) ) ) {
2372
- $module_type = WP_FS__MODULE_TYPE_THEME;
2373
-
2374
- /**
2375
- * Relative path of the theme, e.g.:
2376
- * `my-theme/functions.php`
2377
- *
2378
- * @author Leo Fajardo (@leorw)
2379
- */
2380
- $caller_file_candidate = basename( dirname( $caller_file_path ) ) .
2381
- '/' .
2382
- basename( $caller_file_path );
2383
-
2384
- continue;
2385
- }
2386
- }
2387
-
2388
- $caller_file_hash = md5( $caller_file_path );
2389
-
2390
- if ( ! isset( $caller_map[ $caller_file_hash ] ) ) {
2391
- foreach ( $all_plugins_paths as $plugin_path ) {
2392
- if ( empty( $plugin_path ) ) {
2393
- continue;
2394
- }
2395
-
2396
- if ( false !== strpos( $caller_file_path, fs_normalize_path( dirname( $plugin_path ) . '/' ) ) ) {
2397
- $caller_map[ $caller_file_hash ] = fs_normalize_path( $plugin_path );
2398
- break;
2399
- }
2400
- }
2401
- }
2402
-
2403
- if ( isset( $caller_map[ $caller_file_hash ] ) ) {
2404
- $module_type = WP_FS__MODULE_TYPE_PLUGIN;
2405
- $caller_file_candidate = plugin_basename( $caller_map[ $caller_file_hash ] );
2406
- }
2407
- }
2408
-
2409
- return (object) array(
2410
- 'module_type' => $module_type,
2411
- 'path' => $caller_file_candidate
2412
- );
2413
- }
2414
-
2415
- #----------------------------------------------------------------------------------
2416
- #region Deactivation Feedback Form
2417
- #----------------------------------------------------------------------------------
2418
-
2419
- /**
2420
- * Displays a confirmation and feedback dialog box when the user clicks on the "Deactivate" link on the plugins
2421
- * page.
2422
- *
2423
- * @author Vova Feldman (@svovaf)
2424
- * @author Leo Fajardo (@leorw)
2425
- *
2426
- * @since 1.1.2
2427
- */
2428
- function _add_deactivation_feedback_dialog_box() {
2429
- $subscription_cancellation_dialog_box_template_params = $this->apply_filters( 'show_deactivation_subscription_cancellation', true ) ?
2430
- $this->_get_subscription_cancellation_dialog_box_template_params() :
2431
- array();
2432
-
2433
- /**
2434
- * @since 2.3.0 Developers can optionally hide the deactivation feedback form using the 'show_deactivation_feedback_form' filter.
2435
- */
2436
- $show_deactivation_feedback_form = true;
2437
- if ( $this->has_filter( 'show_deactivation_feedback_form' ) ) {
2438
- $show_deactivation_feedback_form = $this->apply_filters( 'show_deactivation_feedback_form', true );
2439
- } else if ( $this->is_addon() ) {
2440
- /**
2441
- * If the add-on's 'show_deactivation_feedback_form' is not set, try to inherit the value from the parent.
2442
- */
2443
- $show_deactivation_feedback_form = $this->get_parent_instance()->apply_filters( 'show_deactivation_feedback_form', true );
2444
- }
2445
-
2446
- $uninstall_confirmation_message = $this->apply_filters( 'uninstall_confirmation_message', '' );
2447
-
2448
- if (
2449
- empty( $subscription_cancellation_dialog_box_template_params ) &&
2450
- ! $show_deactivation_feedback_form &&
2451
- empty( $uninstall_confirmation_message )
2452
- ) {
2453
- return;
2454
- }
2455
-
2456
- $vars = array( 'id' => $this->_module_id );
2457
-
2458
- if ( $show_deactivation_feedback_form ) {
2459
- /* Check the type of user:
2460
- * 1. Long-term (long-term)
2461
- * 2. Non-registered and non-anonymous short-term (non-registered-and-non-anonymous-short-term).
2462
- * 3. Short-term (short-term)
2463
- */
2464
- $is_long_term_user = true;
2465
-
2466
- // Check if the site is at least 2 days old.
2467
- $time_installed = $this->_storage->install_timestamp;
2468
-
2469
- // Difference in seconds.
2470
- $date_diff = time() - $time_installed;
2471
-
2472
- // Convert seconds to days.
2473
- $date_diff_days = floor( $date_diff / ( 60 * 60 * 24 ) );
2474
-
2475
- if ( $date_diff_days < 2 ) {
2476
- $is_long_term_user = false;
2477
- }
2478
-
2479
- $is_long_term_user = $this->apply_filters( 'is_long_term_user', $is_long_term_user );
2480
-
2481
- if ( $is_long_term_user ) {
2482
- $user_type = 'long-term';
2483
- } else {
2484
- if ( ! $this->is_registered() && ! $this->is_anonymous() ) {
2485
- $user_type = 'non-registered-and-non-anonymous-short-term';
2486
- } else {
2487
- $user_type = 'short-term';
2488
- }
2489
- }
2490
-
2491
- $uninstall_reasons = $this->_get_uninstall_reasons( $user_type );
2492
-
2493
- $vars['reasons'] = $uninstall_reasons;
2494
- }
2495
-
2496
- $vars['subscription_cancellation_dialog_box_template_params'] = &$subscription_cancellation_dialog_box_template_params;
2497
- $vars['show_deactivation_feedback_form'] = $show_deactivation_feedback_form;
2498
- $vars['uninstall_confirmation_message'] = $uninstall_confirmation_message;
2499
-
2500
- /**
2501
- * Load the HTML template for the deactivation feedback dialog box.
2502
- *
2503
- * @todo Deactivation form core functions should be loaded only once! Otherwise, when there are multiple Freemius powered plugins the same code is loaded multiple times. The only thing that should be loaded differently is the various deactivation reasons object based on the state of the plugin.
2504
- */
2505
- fs_require_template( 'forms/deactivation/form.php', $vars );
2506
- }
2507
-
2508
- /**
2509
- * @author Leo Fajardo (@leorw)
2510
- * @since 1.1.2
2511
- *
2512
- * @param string $user_type
2513
- *
2514
- * @return array The uninstall reasons for the specified user type.
2515
- */
2516
- function _get_uninstall_reasons( $user_type = 'long-term' ) {
2517
- $module_type = $this->_module_type;
2518
-
2519
- $internal_message_template_var = array(
2520
- 'id' => $this->_module_id
2521
- );
2522
-
2523
- $plan = $this->get_plan();
2524
-
2525
- if ( $this->is_registered() && is_object( $plan ) && $plan->has_technical_support() ) {
2526
- $contact_support_template = fs_get_template( 'forms/deactivation/contact.php', $internal_message_template_var );
2527
- } else {
2528
- $contact_support_template = '';
2529
- }
2530
-
2531
- $reason_found_better_plugin = array(
2532
- 'id' => self::REASON_FOUND_A_BETTER_PLUGIN,
2533
- 'text' => sprintf( $this->get_text_inline( 'I found a better %s', 'reason-found-a-better-plugin' ), $module_type ),
2534
- 'input_type' => 'textfield',
2535
- 'input_placeholder' => sprintf( $this->get_text_inline( "What's the %s's name?", 'placeholder-plugin-name' ), $module_type ),
2536
- );
2537
-
2538
- $reason_temporary_deactivation = array(
2539
- 'id' => self::REASON_TEMPORARY_DEACTIVATION,
2540
- 'text' => sprintf(
2541
- $this->get_text_inline( "It's a temporary %s. I'm just debugging an issue.", 'reason-temporary-x' ),
2542
- strtolower( $this->is_plugin() ?
2543
- $this->get_text_inline( 'Deactivation', 'deactivation' ) :
2544
- $this->get_text_inline( 'Theme Switch', 'theme-switch' )
2545
- )
2546
- ),
2547
- 'input_type' => '',
2548
- 'input_placeholder' => ''
2549
- );
2550
-
2551
- $reason_other = array(
2552
- 'id' => self::REASON_OTHER,
2553
- 'text' => $this->get_text_inline( 'Other', 'reason-other' ),
2554
- 'input_type' => 'textfield',
2555
- 'input_placeholder' => ''
2556
- );
2557
-
2558
- $long_term_user_reasons = array(
2559
- array(
2560
- 'id' => self::REASON_NO_LONGER_NEEDED,
2561
- 'text' => sprintf( $this->get_text_inline( 'I no longer need the %s', 'reason-no-longer-needed' ), $module_type ),
2562
- 'input_type' => '',
2563
- 'input_placeholder' => ''
2564
- ),
2565
- $reason_found_better_plugin,
2566
- array(
2567
- 'id' => self::REASON_NEEDED_FOR_A_SHORT_PERIOD,
2568
- 'text' => sprintf( $this->get_text_inline( 'I only needed the %s for a short period', 'reason-needed-for-a-short-period' ), $module_type ),
2569
- 'input_type' => '',
2570
- 'input_placeholder' => ''
2571
- ),
2572
- array(
2573
- 'id' => self::REASON_BROKE_MY_SITE,
2574
- 'text' => sprintf( $this->get_text_inline( 'The %s broke my site', 'reason-broke-my-site' ), $module_type ),
2575
- 'input_type' => '',
2576
- 'input_placeholder' => '',
2577
- 'internal_message' => $contact_support_template
2578
- ),
2579
- array(
2580
- 'id' => self::REASON_SUDDENLY_STOPPED_WORKING,
2581
- 'text' => sprintf( $this->get_text_inline( 'The %s suddenly stopped working', 'reason-suddenly-stopped-working' ), $module_type ),
2582
- 'input_type' => '',
2583
- 'input_placeholder' => '',
2584
- 'internal_message' => $contact_support_template
2585
- )
2586
- );
2587
-
2588
- if ( $this->is_paying() ) {
2589
- $long_term_user_reasons[] = array(
2590
- 'id' => self::REASON_CANT_PAY_ANYMORE,
2591
- 'text' => $this->get_text_inline( "I can't pay for it anymore", 'reason-cant-pay-anymore' ),
2592
- 'input_type' => 'textfield',
2593
- 'input_placeholder' => $this->get_text_inline( 'What price would you feel comfortable paying?', 'placeholder-comfortable-price' )
2594
- );
2595
- }
2596
-
2597
- $reason_dont_share_info = array(
2598
- 'id' => self::REASON_DONT_LIKE_TO_SHARE_MY_INFORMATION,
2599
- 'text' => $this->get_text_inline( "I don't like to share my information with you", 'reason-dont-like-to-share-my-information' ),
2600
- 'input_type' => '',
2601
- 'input_placeholder' => ''
2602
- );
2603
-
2604
- /**
2605
- * If the current user has selected the "don't share data" reason in the deactivation feedback modal, inform the
2606
- * user by showing additional message that he doesn't have to share data and can just choose to skip the opt-in
2607
- * (the Skip button is included in the message to show). This message will only be shown if anonymous mode is
2608
- * enabled and the user's account is currently not in pending activation state (similar to the way the Skip
2609
- * button in the opt-in form is shown/hidden).
2610
- */
2611
- if ( $this->is_enable_anonymous() && ! $this->is_pending_activation() ) {
2612
- $reason_dont_share_info['internal_message'] = fs_get_template( 'forms/deactivation/retry-skip.php', $internal_message_template_var );
2613
- }
2614
-
2615
- $uninstall_reasons = array(
2616
- 'long-term' => $long_term_user_reasons,
2617
- 'non-registered-and-non-anonymous-short-term' => array(
2618
- array(
2619
- 'id' => self::REASON_DIDNT_WORK,
2620
- 'text' => sprintf( $this->get_text_inline( "The %s didn't work", 'reason-didnt-work' ), $module_type ),
2621
- 'input_type' => '',
2622
- 'input_placeholder' => ''
2623
- ),
2624
- $reason_dont_share_info,
2625
- $reason_found_better_plugin
2626
- ),
2627
- 'short-term' => array(
2628
- array(
2629
- 'id' => self::REASON_COULDNT_MAKE_IT_WORK,
2630
- 'text' => $this->get_text_inline( "I couldn't understand how to make it work", 'reason-couldnt-make-it-work' ),
2631
- 'input_type' => '',
2632
- 'input_placeholder' => '',
2633
- 'internal_message' => $contact_support_template
2634
- ),
2635
- $reason_found_better_plugin,
2636
- array(
2637
- 'id' => self::REASON_GREAT_BUT_NEED_SPECIFIC_FEATURE,
2638
- 'text' => sprintf( $this->get_text_inline( "The %s is great, but I need specific feature that you don't support", 'reason-great-but-need-specific-feature' ), $module_type ),
2639
- 'input_type' => 'textarea',
2640
- 'input_placeholder' => $this->get_text_inline( 'What feature?', 'placeholder-feature' )
2641
- ),
2642
- array(
2643
- 'id' => self::REASON_NOT_WORKING,
2644
- 'text' => sprintf( $this->get_text_inline( 'The %s is not working', 'reason-not-working' ), $module_type ),
2645
- 'input_type' => 'textarea',
2646
- 'input_placeholder' => $this->get_text_inline( "Kindly share what didn't work so we can fix it for future users...", 'placeholder-share-what-didnt-work' )
2647
- ),
2648
- array(
2649
- 'id' => self::REASON_NOT_WHAT_I_WAS_LOOKING_FOR,
2650
- 'text' => $this->get_text_inline( "It's not what I was looking for", 'reason-not-what-i-was-looking-for' ),
2651
- 'input_type' => 'textarea',
2652
- 'input_placeholder' => $this->get_text_inline( "What you've been looking for?", 'placeholder-what-youve-been-looking-for' )
2653
- ),
2654
- array(
2655
- 'id' => self::REASON_DIDNT_WORK_AS_EXPECTED,
2656
- 'text' => sprintf( $this->get_text_inline( "The %s didn't work as expected", 'reason-didnt-work-as-expected' ), $module_type ),
2657
- 'input_type' => 'textarea',
2658
- 'input_placeholder' => $this->get_text_inline( 'What did you expect?', 'placeholder-what-did-you-expect' )
2659
- )
2660
- )
2661
- );
2662
-
2663
- // Randomize the reasons for the current user type.
2664
- shuffle( $uninstall_reasons[ $user_type ] );
2665
-
2666
- // Keep the following reasons as the last items in the list.
2667
- $uninstall_reasons[ $user_type ][] = $reason_temporary_deactivation;
2668
- $uninstall_reasons[ $user_type ][] = $reason_other;
2669
-
2670
- $uninstall_reasons = $this->apply_filters( 'uninstall_reasons', $uninstall_reasons );
2671
-
2672
- return $uninstall_reasons[ $user_type ];
2673
- }
2674
-
2675
- /**
2676
- * Called after the user has submitted his reason for deactivating the plugin.
2677
- *
2678
- * @author Leo Fajardo (@leorw)
2679
- * @since 1.1.2
2680
- */
2681
- function _submit_uninstall_reason_action() {
2682
- $this->_logger->entrance();
2683
-
2684
- $this->check_ajax_referer( 'submit_uninstall_reason' );
2685
-
2686
- $reason_id = fs_request_get( 'reason_id' );
2687
-
2688
- // Check if the given reason ID is an unsigned integer.
2689
- if ( ! ctype_digit( $reason_id ) ) {
2690
- exit;
2691
- }
2692
-
2693
- $reason_info = trim( fs_request_get( 'reason_info', '' ) );
2694
- if ( ! empty( $reason_info ) ) {
2695
- $reason_info = substr( $reason_info, 0, 128 );
2696
- }
2697
-
2698
- $reason = (object) array(
2699
- 'id' => $reason_id,
2700
- 'info' => $reason_info,
2701
- 'is_anonymous' => fs_request_get_bool( 'is_anonymous' )
2702
- );
2703
-
2704
- $this->_storage->store( 'uninstall_reason', $reason );
2705
-
2706
- /**
2707
- * If the module type is "theme", trigger the uninstall event here (on theme deactivation) since themes do
2708
- * not support uninstall hook.
2709
- *
2710
- * @author Leo Fajardo (@leorw)
2711
- * @since 1.2.2
2712
- */
2713
- if ( $this->is_theme() ) {
2714
- if ( $this->is_premium() && ! $this->has_active_valid_license() ) {
2715
- FS_Plugin_Updater::instance( $this )->delete_update_data();
2716
- }
2717
-
2718
- $this->_uninstall_plugin_event( false );
2719
- $this->remove_sdk_reference();
2720
- }
2721
-
2722
- // Print '1' for successful operation.
2723
- echo 1;
2724
- exit;
2725
- }
2726
-
2727
- /**
2728
- * @author Leo Fajardo (@leorw)
2729
- * @since 2.1.4
2730
- */
2731
- function cancel_subscription_or_trial_ajax_action() {
2732
- $this->_logger->entrance();
2733
-
2734
- $this->check_ajax_referer( 'cancel_subscription_or_trial' );
2735
-
2736
- $result = $this->cancel_subscription_or_trial( fs_request_get( 'plugin_id', $this->get_id() ), false );
2737
-
2738
- if ( $this->is_api_error( $result ) ) {
2739
- $this->shoot_ajax_failure( $result->error->message );
2740
- }
2741
-
2742
- $this->shoot_ajax_success();
2743
- }
2744
-
2745
- /**
2746
- * @author Leo Fajardo (@leorw)
2747
- * @since 2.1.4
2748
- *
2749
- * @param number $plugin_id
2750
- *
2751
- * @return object
2752
- */
2753
- private function cancel_subscription_or_trial( $plugin_id ) {
2754
- $fs = null;
2755
- if ( $plugin_id == $this->get_id() ) {
2756
- $fs = $this;
2757
- } else if ( $this->is_addon_activated( $plugin_id ) ) {
2758
- $fs = self::get_instance_by_id( $plugin_id );
2759
- }
2760
-
2761
- $result = null;
2762
-
2763
- if ( ! is_null( $fs ) ) {
2764
- $result = $fs->is_paid_trial() ?
2765
- $fs->_cancel_trial() :
2766
- $fs->_downgrade_site();
2767
- }
2768
-
2769
- return $result;
2770
- }
2771
-
2772
- /**
2773
- * @author Leo Fajardo (@leorw)
2774
- * @since 2.0.2
2775
- */
2776
- function _delete_theme_update_data_action() {
2777
- FS_Plugin_Updater::instance( $this )->delete_update_data();
2778
- }
2779
-
2780
- #endregion
2781
-
2782
- #----------------------------------------------------------------------------------
2783
- #region Instance
2784
- #----------------------------------------------------------------------------------
2785
-
2786
- /**
2787
- * Main singleton instance.
2788
- *
2789
- * @author Vova Feldman (@svovaf)
2790
- * @since 1.0.0
2791
- *
2792
- * @param number $module_id
2793
- * @param string|bool $slug
2794
- * @param bool $is_init Is initiation sequence.
2795
- *
2796
- * @return Freemius|false
2797
- */
2798
- static function instance( $module_id, $slug = false, $is_init = false ) {
2799
- if ( empty( $module_id ) ) {
2800
- return false;
2801
- }
2802
-
2803
- /**
2804
- * Load the essential static data prior to initiating FS_Plugin_Manager since there's an essential MS network migration logic that needs to be executed prior to the initiation.
2805
- */
2806
- self::_load_required_static();
2807
-
2808
- if ( ! is_numeric( $module_id ) ) {
2809
- if ( ! $is_init && true === $slug ) {
2810
- $is_init = true;
2811
- }
2812
-
2813
- $slug = $module_id;
2814
-
2815
- $module = FS_Plugin_Manager::instance( $slug )->get();
2816
-
2817
- if ( is_object( $module ) ) {
2818
- $module_id = $module->id;
2819
- }
2820
- }
2821
-
2822
- $key = 'm_' . $module_id;
2823
-
2824
- if ( ! isset( self::$_instances[ $key ] ) ) {
2825
- self::$_instances[ $key ] = new Freemius( $module_id, $slug, $is_init );
2826
- }
2827
-
2828
- return self::$_instances[ $key ];
2829
- }
2830
-
2831
- /**
2832
- * @author Vova Feldman (@svovaf)
2833
- * @since 1.0.6
2834
- *
2835
- * @param number $addon_id
2836
- *
2837
- * @return bool
2838
- */
2839
- private static function has_instance( $addon_id ) {
2840
- return isset( self::$_instances[ 'm_' . $addon_id ] );
2841
- }
2842
-
2843
- /**
2844
- * @author Leo Fajardo (@leorw)
2845
- * @since 1.2.2
2846
- *
2847
- * @param string|number $id_or_slug
2848
- * @param string $module_type
2849
- *
2850
- * @return number|false
2851
- */
2852
- private static function get_module_id( $id_or_slug, $module_type = WP_FS__MODULE_TYPE_PLUGIN ) {
2853
- if ( is_numeric( $id_or_slug ) ) {
2854
- return $id_or_slug;
2855
- }
2856
-
2857
- foreach ( self::$_instances as $instance ) {
2858
- // Also check the module type since there can be a plugin and a theme with the same slug.
2859
- if ( ( $module_type === $instance->get_module_type() ) && ( $id_or_slug === $instance->get_slug() ) ) {
2860
- return $instance->get_id();
2861
- }
2862
- }
2863
-
2864
- return false;
2865
- }
2866
-
2867
- /**
2868
- * @author Vova Feldman (@svovaf)
2869
- * @since 1.0.6
2870
- *
2871
- * @param number $id
2872
- *
2873
- * @return false|Freemius
2874
- */
2875
- static function get_instance_by_id( $id ) {
2876
- return isset ( self::$_instances[ 'm_' . $id ] ) ?
2877
- self::$_instances[ 'm_' . $id ] :
2878
- false;
2879
- }
2880
-
2881
- /**
2882
- *
2883
- * @author Vova Feldman (@svovaf)
2884
- * @since 1.0.1
2885
- *
2886
- * @param string $plugin_file
2887
- * @param string $module_type
2888
- *
2889
- * @return false|Freemius
2890
- */
2891
- static function get_instance_by_file( $plugin_file, $module_type = WP_FS__MODULE_TYPE_PLUGIN ) {
2892
- $slug = self::find_slug_by_basename( $plugin_file );
2893
-
2894
- return ( false !== $slug ) ?
2895
- self::instance( self::get_module_id( $slug, $module_type ) ) :
2896
- false;
2897
- }
2898
-
2899
- /**
2900
- * @author Vova Feldman (@svovaf)
2901
- * @since 1.0.6
2902
- *
2903
- * @return false|Freemius
2904
- */
2905
- function get_parent_instance() {
2906
- return self::get_instance_by_id( $this->_plugin->parent_plugin_id );
2907
- }
2908
-
2909
- /**
2910
- * @author Vova Feldman (@svovaf)
2911
- * @since 1.0.6
2912
- *
2913
- * @param string|number $id_or_slug
2914
- *
2915
- * @return false|Freemius
2916
- */
2917
- function get_addon_instance( $id_or_slug ) {
2918
- $addon_id = self::get_module_id( $id_or_slug );
2919
-
2920
- return self::instance( $addon_id );
2921
- }
2922
-
2923
- #endregion ------------------------------------------------------------------
2924
-
2925
- /**
2926
- * @author Vova Feldman (@svovaf)
2927
- * @since 1.0.6
2928
- *
2929
- * @return bool
2930
- */
2931
- function is_parent_plugin_installed() {
2932
- $is_active = self::has_instance( $this->_plugin->parent_plugin_id );
2933
-
2934
- if ( $is_active ) {
2935
- return true;
2936
- }
2937
-
2938
- /**
2939
- * Parent module might be a theme. If that's the case, the add-on's FS
2940
- * instance will be loaded prior to the theme's FS instance, therefore,
2941
- * we need to check if it's active with a "look ahead".
2942
- *
2943
- * @author Vova Feldman
2944
- * @since 1.2.2.3
2945
- */
2946
- global $fs_active_plugins;
2947
- if ( is_object( $fs_active_plugins ) && is_array( $fs_active_plugins->plugins ) ) {
2948
- $active_theme = wp_get_theme();
2949
-
2950
- foreach ( $fs_active_plugins->plugins as $sdk => $module ) {
2951
- if ( WP_FS__MODULE_TYPE_THEME === $module->type ) {
2952
- if ( $module->plugin_path == $active_theme->get_stylesheet() ) {
2953
- // Parent module is a theme and it's currently active.
2954
- return true;
2955
- }
2956
- }
2957
- }
2958
- }
2959
-
2960
- return false;
2961
- }
2962
-
2963
- /**
2964
- * Check if add-on parent plugin in activation mode.
2965
- *
2966
- * @author Vova Feldman (@svovaf)
2967
- * @since 1.0.7
2968
- *
2969
- * @return bool
2970
- */
2971
- function is_parent_in_activation() {
2972
- $parent_fs = $this->get_parent_instance();
2973
- if ( ! is_object( $parent_fs ) ) {
2974
- return false;
2975
- }
2976
-
2977
- return ( $parent_fs->is_activation_mode() );
2978
- }
2979
-
2980
- /**
2981
- * Is plugin in activation mode.
2982
- *
2983
- * @author Vova Feldman (@svovaf)
2984
- * @since 1.0.7
2985
- *
2986
- * @param bool $and_on
2987
- *
2988
- * @return bool
2989
- */
2990
- function is_activation_mode( $and_on = true ) {
2991
- return fs_is_network_admin() ?
2992
- $this->is_network_activation_mode( $and_on ) :
2993
- $this->is_site_activation_mode( $and_on );
2994
- }
2995
-
2996
- /**
2997
- * Is plugin in activation mode.
2998
- *
2999
- * @author Vova Feldman (@svovaf)
3000
- * @since 1.0.7
3001
- *
3002
- * @param bool $and_on
3003
- *
3004
- * @return bool
3005
- */
3006
- function is_site_activation_mode( $and_on = true ) {
3007
- return (
3008
- ( $this->is_on() || ! $and_on ) &&
3009
- (
3010
- ( $this->is_premium() && true === $this->_storage->require_license_activation ) ||
3011
- (
3012
- ( ! $this->is_registered() ||
3013
- ( $this->is_only_premium() && ! $this->has_features_enabled_license() ) ) &&
3014
- ( ! $this->is_enable_anonymous() ||
3015
- ( ! $this->is_anonymous() && ! $this->is_pending_activation() ) )
3016
- )
3017
- )
3018
- );
3019
- }
3020
-
3021
- /**
3022
- * Checks if the SDK in network activation mode.
3023
- *
3024
- * @author Leo Fajardo (@leorw)
3025
- * @since 2.0.0
3026
- *
3027
- * @param bool $and_on
3028
- *
3029
- * @return bool
3030
- */
3031
- private function is_network_activation_mode( $and_on = true ) {
3032
- if ( ! $this->_is_network_active ) {
3033
- // Not network activated.
3034
- return false;
3035
- }
3036
-
3037
- if ( $this->is_network_upgrade_mode() ) {
3038
- // Special flag to enforce network activation mode to decide what to do with the sites that are not yet opted-in nor skipped.
3039
- return true;
3040
- }
3041
-
3042
- if ( ! $this->is_site_activation_mode( $and_on ) ) {
3043
- // Whether the context is single site or the network, if the plugin is no longer in activation mode then it is not in network activation mode as well.
3044
- return false;
3045
- }
3046
-
3047
- if ( $this->is_network_delegated_connection() ) {
3048
- // Super-admin delegated the connection to the site admins -> not activation mode.
3049
- return false;
3050
- }
3051
-
3052
- if ( $this->is_network_anonymous() && true !== $this->_storage->require_license_activation ) {
3053
- // Super-admin skipped the connection network wide -> not activation mode.
3054
- return false;
3055
- }
3056
-
3057
- if ( $this->is_network_registered() ) {
3058
- // Super-admin connected at least one site -> not activation mode.
3059
- return false;
3060
- }
3061
-
3062
- return true;
3063
- }
3064
-
3065
- /**
3066
- * Check if current page is the opt-in/pending-activation page.
3067
- *
3068
- * @author Vova Feldman (@svovaf)
3069
- * @since 1.2.1.7
3070
- *
3071
- * @return bool
3072
- */
3073
- function is_activation_page() {
3074
- if ( $this->_menu->is_activation_page( $this->show_opt_in_on_themes_page() ) ) {
3075
- return true;
3076
- }
3077
-
3078
- if ( ! $this->is_activation_mode() ) {
3079
- return false;
3080
- }
3081
-
3082
- // Check if current page is matching the activation page.
3083
- return $this->is_matching_url( $this->get_activation_url() );
3084
- }
3085
-
3086
- /**
3087
- * Check if URL path's are matching and that all querystring
3088
- * arguments of the $sub_url exist in the $url with the same values.
3089
- *
3090
- * WARNING:
3091
- * 1. This method doesn't check if the sub/domain are matching.
3092
- * 2. Ignore case sensitivity.
3093
- *
3094
- * @author Vova Feldman (@svovaf)
3095
- * @since 1.2.1.7
3096
- *
3097
- * @param string $sub_url
3098
- * @param string $url If argument is not set, check if the sub_url matching the current's page URL.
3099
- *
3100
- * @return bool
3101
- */
3102
- private function is_matching_url( $sub_url, $url = '' ) {
3103
- if ( empty( $url ) ) {
3104
- $url = $_SERVER['REQUEST_URI'];
3105
- }
3106
-
3107
- $url = strtolower( $url );
3108
- $sub_url = strtolower( $sub_url );
3109
-
3110
- if ( parse_url( $sub_url, PHP_URL_PATH ) !== parse_url( $url, PHP_URL_PATH ) ) {
3111
- // Different path - DO NOT OVERRIDE PAGE.
3112
- return false;
3113
- }
3114
-
3115
- $url_params = array();
3116
- parse_str( parse_url( $url, PHP_URL_QUERY ), $url_params );
3117
-
3118
- $sub_url_params = array();
3119
- parse_str( parse_url( $sub_url, PHP_URL_QUERY ), $sub_url_params );
3120
-
3121
- foreach ( $sub_url_params as $key => $val ) {
3122
- if ( ! isset( $url_params[ $key ] ) || $val != $url_params[ $key ] ) {
3123
- // Not matching query string - DO NOT OVERRIDE PAGE.
3124
- return false;
3125
- }
3126
- }
3127
-
3128
- return true;
3129
- }
3130
-
3131
- /**
3132
- * Get the basenames of all active plugins for specific blog. Including network activated plugins.
3133
- *
3134
- * @author Vova Feldman (@svovaf)
3135
- * @since 2.0.0
3136
- *
3137
- * @param int $blog_id
3138
- *
3139
- * @return string[]
3140
- */
3141
- private static function get_active_plugins_basenames( $blog_id = 0 ) {
3142
- if ( is_multisite() && $blog_id > 0 ) {
3143
- $active_basenames = get_blog_option( $blog_id, 'active_plugins' );
3144
- } else {
3145
- $active_basenames = get_option( 'active_plugins' );
3146
- }
3147
-
3148
- if ( ! is_array( $active_basenames ) ) {
3149
- $active_basenames = array();
3150
- }
3151
-
3152
- if ( is_multisite() ) {
3153
- $network_active_basenames = get_site_option( 'active_sitewide_plugins' );
3154
-
3155
- if ( is_array( $network_active_basenames ) && ! empty( $network_active_basenames ) ) {
3156
- $active_basenames = array_merge( $active_basenames, array_keys( $network_active_basenames ) );
3157
- }
3158
- }
3159
-
3160
- return $active_basenames;
3161
- }
3162
-
3163
- /**
3164
- * @author Leo Fajardo (@leorw)
3165
- * @since 2.3.0
3166
- *
3167
- * @param int $blog_id
3168
- *
3169
- * @return array
3170
- */
3171
- static function get_active_plugins_directories_map( $blog_id = 0 ) {
3172
- $active_basenames = self::get_active_plugins_basenames( $blog_id );
3173
-
3174
- $map = array();
3175
-
3176
- foreach ( $active_basenames as $active_basename ) {
3177
- $active_basename = fs_normalize_path( $active_basename );
3178
-
3179
- if ( false === strpos( $active_basename, '/' ) ) {
3180
- continue;
3181
- }
3182
-
3183
- $map[ dirname( $active_basename ) ] = true;
3184
- }
3185
-
3186
- return $map;
3187
- }
3188
-
3189
- /**
3190
- * Get collection of all active plugins. Including network activated plugins.
3191
- *
3192
- * @author Vova Feldman (@svovaf)
3193
- * @since 1.0.9
3194
- *
3195
- * @param int $blog_id Since 2.0.0
3196
- *
3197
- * @return array[string]array
3198
- */
3199
- private static function get_active_plugins( $blog_id = 0 ) {
3200
- self::require_plugin_essentials();
3201
-
3202
- $active_plugin = array();
3203
- $all_plugins = fs_get_plugins();
3204
- $active_plugins_basenames = self::get_active_plugins_basenames( $blog_id );
3205
-
3206
- foreach ( $active_plugins_basenames as $plugin_basename ) {
3207
- $active_plugin[ $plugin_basename ] = $all_plugins[ $plugin_basename ];
3208
- }
3209
-
3210
- return $active_plugin;
3211
- }
3212
-
3213
- /**
3214
- * Get collection of all site active plugins for a specified blog.
3215
- *
3216
- * @author Vova Feldman (@svovaf)
3217
- * @since 2.0.0
3218
- *
3219
- * @param int $blog_id
3220
- *
3221
- * @return array[string]array
3222
- */
3223
- private static function get_site_active_plugins( $blog_id = 0 ) {
3224
- $active_basenames = ( is_multisite() && $blog_id > 0 ) ?
3225
- get_blog_option( $blog_id, 'active_plugins' ) :
3226
- get_option( 'active_plugins' );
3227
-
3228
- $active = array();
3229
-
3230
- if ( ! is_array( $active_basenames ) ) {
3231
- return $active;
3232
- }
3233
-
3234
- foreach ( $active_basenames as $basename ) {
3235
- $active[ $basename ] = array(
3236
- 'is_active' => true,
3237
- 'Version' => '1.0', // Dummy version.
3238
- 'slug' => self::get_plugin_slug( $basename ),
3239
- );
3240
- }
3241
-
3242
- return $active;
3243
- }
3244
-
3245
- /**
3246
- * Get collection of all plugins with their activation status for a specified blog.
3247
- *
3248
- * @author Vova Feldman (@svovaf)
3249
- * @since 1.1.8
3250
- *
3251
- * @param int $blog_id Since 2.0.0
3252
- *
3253
- * @return array Key is the plugin file path and the value is an array of the plugin data.
3254
- */
3255
- private static function get_all_plugins( $blog_id = 0 ) {
3256
- self::require_plugin_essentials();
3257
-
3258
- $all_plugins = fs_get_plugins();
3259
-
3260
- $active_plugins_basenames = self::get_active_plugins_basenames( $blog_id );
3261
-
3262
- foreach ( $all_plugins as $basename => &$data ) {
3263
- // By default set to inactive (next foreach update the active plugins).
3264
- $data['is_active'] = false;
3265
- // Enrich with plugin slug.
3266
- $data['slug'] = self::get_plugin_slug( $basename );
3267
- }
3268
-
3269
- // Flag active plugins.
3270
- foreach ( $active_plugins_basenames as $basename ) {
3271
- if ( isset( $all_plugins[ $basename ] ) ) {
3272
- $all_plugins[ $basename ]['is_active'] = true;
3273
- }
3274
- }
3275
-
3276
- return $all_plugins;
3277
- }
3278
-
3279
- /**
3280
- * Get collection of all plugins and if they are network level activated.
3281
- *
3282
- * @author Vova Feldman (@svovaf)
3283
- * @since 2.0.0
3284
- *
3285
- * @return array Key is the plugin basename and the value is an array of the plugin data.
3286
- */
3287
- private static function get_network_plugins() {
3288
- self::require_plugin_essentials();
3289
-
3290
- $all_plugins = fs_get_plugins();
3291
-
3292
- $network_active_basenames = is_multisite() ?
3293
- get_site_option( 'active_sitewide_plugins' ) :
3294
- array();
3295
-
3296
- foreach ( $all_plugins as $basename => &$data ) {
3297
- // By default set to inactive (next foreach update the active plugins).
3298
- $data['is_active'] = false;
3299
- // Enrich with plugin slug.
3300
- $data['slug'] = self::get_plugin_slug( $basename );
3301
- }
3302
-
3303
- // Flag active plugins.
3304
- foreach ( $network_active_basenames as $basename ) {
3305
- if ( isset( $all_plugins[ $basename ] ) ) {
3306
- $all_plugins[ $basename ]['is_active'] = true;
3307
- }
3308
- }
3309
-
3310
- return $all_plugins;
3311
- }
3312
-
3313
- /**
3314
- * Cached result of get_site_transient( 'update_plugins' )
3315
- *
3316
- * @author Vova Feldman (@svovaf)
3317
- * @since 1.1.8
3318
- *
3319
- * @var object
3320
- */
3321
- private static $_plugins_info;
3322
-
3323
- /**
3324
- * Helper function to get specified plugin's slug.
3325
- *
3326
- * @author Vova Feldman (@svovaf)
3327
- * @since 1.1.8
3328
- *
3329
- * @param $basename
3330
- *
3331
- * @return string
3332
- */
3333
- private static function get_plugin_slug( $basename ) {
3334
- if ( ! isset( self::$_plugins_info ) ) {
3335
- self::$_plugins_info = get_site_transient( 'update_plugins' );
3336
- }
3337
-
3338
- $slug = '';
3339
-
3340
- if ( is_object( self::$_plugins_info ) ) {
3341
- if ( isset( self::$_plugins_info->no_update ) &&
3342
- isset( self::$_plugins_info->no_update[ $basename ] ) &&
3343
- ! empty( self::$_plugins_info->no_update[ $basename ]->slug )
3344
- ) {
3345
- $slug = self::$_plugins_info->no_update[ $basename ]->slug;
3346
- } else if ( isset( self::$_plugins_info->response ) &&
3347
- isset( self::$_plugins_info->response[ $basename ] ) &&
3348
- ! empty( self::$_plugins_info->response[ $basename ]->slug )
3349
- ) {
3350
- $slug = self::$_plugins_info->response[ $basename ]->slug;
3351
- }
3352
- }
3353
-
3354
- if ( empty( $slug ) ) {
3355
- // Try to find slug from FS data.
3356
- $slug = self::find_slug_by_basename( $basename );
3357
- }
3358
-
3359
- if ( empty( $slug ) ) {
3360
- // Fallback to plugin's folder name.
3361
- $slug = dirname( $basename );
3362
- }
3363
-
3364
- return $slug;
3365
- }
3366
-
3367
- private static $_statics_loaded = false;
3368
-
3369
- /**
3370
- * Load static resources.
3371
- *
3372
- * @author Vova Feldman (@svovaf)
3373
- * @since 1.0.1
3374
- */
3375
- private static function _load_required_static() {
3376
- if ( self::$_statics_loaded ) {
3377
- return;
3378
- }
3379
-
3380
- self::$_static_logger = FS_Logger::get_logger( WP_FS__SLUG, WP_FS__DEBUG_SDK, WP_FS__ECHO_DEBUG_SDK );
3381
-
3382
- self::$_static_logger->entrance();
3383
-
3384
- self::$_accounts = FS_Options::instance( WP_FS__ACCOUNTS_OPTION_NAME, true );
3385
-
3386
- if ( is_multisite() ) {
3387
- $has_skipped_migration = (
3388
- // 'id_slug_type_path_map' - was never stored on older versions, therefore, not exists on the site level.
3389
- null === self::$_accounts->get_option( 'id_slug_type_path_map', null, false ) &&
3390
- // 'file_slug_map' stored on the site level, so it was running an SDK version before it was integrated with MS-network.
3391
- null !== self::$_accounts->get_option( 'file_slug_map', null, false )
3392
- );
3393
-
3394
- /**
3395
- * If the file_slug_map exists on the site level but doesn't exist on the
3396
- * network level storage, it means that we need to process the storage with migration.
3397
- *
3398
- * The code in this `if` scope will only be executed once and only for the first site that will execute it because once we migrate the storage data, file_slug_map will be already set in the network level storage.
3399
- *
3400
- * @author Vova Feldman (@svovaf)
3401
- * @since 2.0.0
3402
- */
3403
- if (
3404
- ( $has_skipped_migration && true !== self::$_accounts->get_option( 'ms_migration_complete', false, true ) ) ||
3405
- ( null === self::$_accounts->get_option( 'file_slug_map', null, true ) &&
3406
- null !== self::$_accounts->get_option( 'file_slug_map', null, false ) )
3407
- ) {
3408
- self::migrate_options_to_network();
3409
- }
3410
- }
3411
-
3412
- self::$_global_admin_notices = FS_Admin_Notices::instance( 'global' );
3413
-
3414
- if ( ! WP_FS__DEMO_MODE ) {
3415
- add_action( ( fs_is_network_admin() ? 'network_' : '' ) . 'admin_menu', array(
3416
- 'Freemius',
3417
- '_add_debug_section'
3418
- ) );
3419
- }
3420
-
3421
- add_action( "wp_ajax_fs_toggle_debug_mode", array( 'Freemius', '_toggle_debug_mode' ) );
3422
-
3423
- self::add_ajax_action_static( 'get_debug_log', array( 'Freemius', '_get_debug_log' ) );
3424
-
3425
- self::add_ajax_action_static( 'get_db_option', array( 'Freemius', '_get_db_option' ) );
3426
-
3427
- self::add_ajax_action_static( 'set_db_option', array( 'Freemius', '_set_db_option' ) );
3428
-
3429
- if ( 0 == did_action( 'plugins_loaded' ) ) {
3430
- add_action( 'plugins_loaded', array( 'Freemius', '_load_textdomain' ), 1 );
3431
- }
3432
-
3433
- add_action( 'admin_footer', array( 'Freemius', '_enrich_ajax_url' ) );
3434
- add_action( 'admin_footer', array( 'Freemius', '_open_support_forum_in_new_page' ) );
3435
-
3436
- if ( self::is_plugins_page() || self::is_themes_page() ) {
3437
- add_action( 'admin_print_footer_scripts', array( 'Freemius', '_maybe_add_beta_label_styles' ), 9 );
3438
-
3439
- /**
3440
- * Specifically use this hook so that the JS event handlers will work properly on the "Themes"
3441
- * page.
3442
- *
3443
- * @author Leo Fajardo (@leorw)
3444
- * @since 2.3.0
3445
- */
3446
- add_action( 'admin_footer-' . self::get_current_page(), array( 'Freemius', '_maybe_add_beta_label_to_plugins_and_handle_confirmation') );
3447
- }
3448
-
3449
- self::$_statics_loaded = true;
3450
- }
3451
-
3452
- /**
3453
- * @author Leo Fajardo (@leorw)
3454
- *
3455
- * @since 2.1.3
3456
- */
3457
- private static function migrate_options_to_network() {
3458
- self::migrate_accounts_to_network();
3459
-
3460
- // Migrate API options from site level to network level.
3461
- $api_network_options = FS_Option_Manager::get_manager( WP_FS__OPTIONS_OPTION_NAME, true, true );
3462
- $api_network_options->migrate_to_network();
3463
-
3464
- // Migrate API cache to network level storage.
3465
- FS_Cache_Manager::get_manager( WP_FS__API_CACHE_OPTION_NAME )->migrate_to_network();
3466
-
3467
- self::$_accounts->set_option( 'ms_migration_complete', true, true );
3468
- }
3469
-
3470
- #----------------------------------------------------------------------------------
3471
- #region Localization
3472
- #----------------------------------------------------------------------------------
3473
-
3474
- /**
3475
- * Load framework's text domain.
3476
- *
3477
- * @author Vova Feldman (@svovaf)
3478
- * @since 1.2.1
3479
- */
3480
- static function _load_textdomain() {
3481
- if ( ! is_admin() ) {
3482
- return;
3483
- }
3484
-
3485
- global $fs_active_plugins;
3486
-
3487
- // Works both for plugins and themes.
3488
- load_plugin_textdomain(
3489
- 'freemius',
3490
- false,
3491
- $fs_active_plugins->newest->sdk_path . '/languages/'
3492
- );
3493
- }
3494
-
3495
- #endregion
3496
-
3497
- #----------------------------------------------------------------------------------
3498
- #region Debugging
3499
- #----------------------------------------------------------------------------------
3500
-
3501
- /**
3502
- * @author Vova Feldman (@svovaf)
3503
- * @since 1.0.8
3504
- */
3505
- static function _add_debug_section() {
3506
- if ( ! is_super_admin() ) {
3507
- // Add debug page only for super-admins.
3508
- return;
3509
- }
3510
-
3511
- self::$_static_logger->entrance();
3512
-
3513
- $title = sprintf( '%s [v.%s]', fs_text_inline( 'Freemius Debug' ), WP_FS__SDK_VERSION );
3514
-
3515
- if ( WP_FS__DEV_MODE ) {
3516
- // Add top-level debug menu item.
3517
- $hook = FS_Admin_Menu_Manager::add_page(
3518
- $title,
3519
- $title,
3520
- 'manage_options',
3521
- 'freemius',
3522
- array( 'Freemius', '_debug_page_render' )
3523
- );
3524
- } else {
3525
- // Add hidden debug page.
3526
- $hook = FS_Admin_Menu_Manager::add_subpage(
3527
- null,
3528
- $title,
3529
- $title,
3530
- 'manage_options',
3531
- 'freemius',
3532
- array( 'Freemius', '_debug_page_render' )
3533
- );
3534
- }
3535
-
3536
- if ( ! empty( $hook ) ) {
3537
- add_action( "load-$hook", array( 'Freemius', '_debug_page_actions' ) );
3538
- }
3539
- }
3540
-
3541
- /**
3542
- * @author Vova Feldman (@svovaf)
3543
- * @since 1.1.7.3
3544
- */
3545
- static function _toggle_debug_mode() {
3546
- if ( ! is_super_admin() ) {
3547
- return;
3548
- }
3549
-
3550
- $is_on = fs_request_get( 'is_on', false, 'post' );
3551
-
3552
- if ( fs_request_is_post() && in_array( $is_on, array( 0, 1 ) ) ) {
3553
- update_option( 'fs_debug_mode', $is_on );
3554
-
3555
- // Turn on/off storage logging.
3556
- FS_Logger::_set_storage_logging( ( 1 == $is_on ) );
3557
- }
3558
-
3559
- exit;
3560
- }
3561
-
3562
- /**
3563
- * @author Vova Feldman (@svovaf)
3564
- * @since 1.2.1.6
3565
- */
3566
- static function _get_debug_log() {
3567
- $logs = FS_Logger::load_db_logs(
3568
- fs_request_get( 'filters', false, 'post' ),
3569
- ! empty( $_POST['limit'] ) && is_numeric( $_POST['limit'] ) ? $_POST['limit'] : 200,
3570
- ! empty( $_POST['offset'] ) && is_numeric( $_POST['offset'] ) ? $_POST['offset'] : 0
3571
- );
3572
-
3573
- self::shoot_ajax_success( $logs );
3574
- }
3575
-
3576
- /**
3577
- * @author Vova Feldman (@svovaf)
3578
- * @since 1.2.1.7
3579
- */
3580
- static function _get_db_option() {
3581
- check_admin_referer( 'fs_get_db_option' );
3582
-
3583
- $option_name = fs_request_get( 'option_name' );
3584
-
3585
- if ( ! is_super_admin() ||
3586
- ! fs_starts_with( $option_name, 'fs_' )
3587
- ) {
3588
- self::shoot_ajax_failure();
3589
- }
3590
-
3591
- $value = get_option( $option_name );
3592
-
3593
- $result = array(
3594
- 'name' => $option_name,
3595
- );
3596
-
3597
- if ( false !== $value ) {
3598
- if ( ! is_string( $value ) ) {
3599
- $value = json_encode( $value );
3600
- }
3601
-
3602
- $result['value'] = $value;
3603
- }
3604
-
3605
- self::shoot_ajax_success( $result );
3606
- }
3607
-
3608
- /**
3609
- * @author Vova Feldman (@svovaf)
3610
- * @since 1.2.1.7
3611
- */
3612
- static function _set_db_option() {
3613
- check_admin_referer( 'fs_set_db_option' );
3614
-
3615
- $option_name = fs_request_get( 'option_name' );
3616
-
3617
- if ( ! is_super_admin() ||
3618
- ! fs_starts_with( $option_name, 'fs_' )
3619
- ) {
3620
- self::shoot_ajax_failure();
3621
- }
3622
-
3623
- $option_value = fs_request_get( 'option_value' );
3624
-
3625
- if ( ! empty( $option_value ) ) {
3626
- update_option( $option_name, $option_value );
3627
- }
3628
-
3629
- self::shoot_ajax_success();
3630
- }
3631
-
3632
- /**
3633
- * @author Vova Feldman (@svovaf)
3634
- * @since 1.0.8
3635
- */
3636
- static function _debug_page_actions() {
3637
- self::_clean_admin_content_section();
3638
-
3639
- if ( fs_request_is_action( 'restart_freemius' ) ) {
3640
- check_admin_referer( 'restart_freemius' );
3641
-
3642
- if ( ! is_multisite() ) {
3643
- // Clear accounts data.
3644
- self::$_accounts->clear( null, true );
3645
- } else {
3646
- $sites = self::get_sites();
3647
- foreach ( $sites as $site ) {
3648
- $blog_id = self::get_site_blog_id( $site );
3649
- self::$_accounts->clear( $blog_id, true );
3650
- }
3651
-
3652
- // Clear network level storage.
3653
- self::$_accounts->clear( true, true );
3654
- }
3655
-
3656
- // Clear SDK reference cache.
3657
- delete_option( 'fs_active_plugins' );
3658
- } else if ( fs_request_is_action( 'clear_updates_data' ) ) {
3659
- check_admin_referer( 'clear_updates_data' );
3660
-
3661
- if ( ! is_multisite() ) {
3662
- set_site_transient( 'update_plugins', null );
3663
- set_site_transient( 'update_themes', null );
3664
- } else {
3665
- $current_blog_id = get_current_blog_id();
3666
-
3667
- $sites = self::get_sites();
3668
- foreach ( $sites as $site ) {
3669
- switch_to_blog( self::get_site_blog_id( $site ) );
3670
-
3671
- set_site_transient( 'update_plugins', null );
3672
- set_site_transient( 'update_themes', null );
3673
- }
3674
-
3675
- switch_to_blog( $current_blog_id );
3676
- }
3677
- } else if ( fs_request_is_action( 'simulate_trial' ) ) {
3678
- check_admin_referer( 'simulate_trial' );
3679
-
3680
- $fs = freemius( fs_request_get( 'module_id' ) );
3681
-
3682
- // Update SDK install to at least 24 hours before.
3683
- $fs->_storage->install_timestamp = ( time() - WP_FS__TIME_24_HOURS_IN_SEC );
3684
- // Unset the trial shown timestamp.
3685
- unset( $fs->_storage->trial_promotion_shown );
3686
- } else if ( fs_request_is_action( 'simulate_network_upgrade' ) ) {
3687
- check_admin_referer( 'simulate_network_upgrade' );
3688
-
3689
- $fs = freemius( fs_request_get( 'module_id' ) );
3690
-
3691
- self::set_network_upgrade_mode( $fs->_storage );
3692
- } else if ( fs_request_is_action( 'delete_install' ) ) {
3693
- check_admin_referer( 'delete_install' );
3694
-
3695
- self::_delete_site_by_slug(
3696
- fs_request_get( 'slug' ),
3697
- fs_request_get( 'module_type' ),
3698
- true,
3699
- fs_request_get( 'blog_id', null )
3700
- );
3701
- } else if ( fs_request_is_action( 'delete_user' ) ) {
3702
- check_admin_referer( 'delete_user' );
3703
-
3704
- self::delete_user( fs_request_get( 'user_id' ) );
3705
- } else if ( fs_request_is_action( 'download_logs' ) ) {
3706
- check_admin_referer( 'download_logs' );
3707
-
3708
- $download_url = FS_Logger::download_db_logs(
3709
- fs_request_get( 'filters', false, 'post' )
3710
- );
3711
-
3712
- if ( false === $download_url ) {
3713
- wp_die( 'Oops... there was an error while generating the logs download file. Please try again and if it doesn\'t work contact support@freemius.com.' );
3714
- }
3715
-
3716
- fs_redirect( $download_url );
3717
- } else if ( fs_request_is_action( 'migrate_options_to_network' ) ) {
3718
- check_admin_referer( 'migrate_options_to_network' );
3719
-
3720
- self::migrate_options_to_network();
3721
- }
3722
- }
3723
-
3724
- /**
3725
- * @author Vova Feldman (@svovaf)
3726
- * @since 1.0.8
3727
- */
3728
- static function _debug_page_render() {
3729
- self::$_static_logger->entrance();
3730
-
3731
- if ( ! is_multisite() ) {
3732
- $all_plugins_installs = self::get_all_sites( WP_FS__MODULE_TYPE_PLUGIN );
3733
- $all_themes_installs = self::get_all_sites( WP_FS__MODULE_TYPE_THEME );
3734
- } else {
3735
- $sites = self::get_sites();
3736
-
3737
- $all_plugins_installs = array();
3738
- $all_themes_installs = array();
3739
-
3740
- foreach ( $sites as $site ) {
3741
- $blog_id = self::get_site_blog_id( $site );
3742
-
3743
- $plugins_installs = self::get_all_sites( WP_FS__MODULE_TYPE_PLUGIN, $blog_id );
3744
-
3745
- foreach ( $plugins_installs as $slug => $install ) {
3746
- if ( ! isset( $all_plugins_installs[ $slug ] ) ) {
3747
- $all_plugins_installs[ $slug ] = array();
3748
- }
3749
-
3750
- $install->blog_id = $blog_id;
3751
-
3752
- $all_plugins_installs[ $slug ][] = $install;
3753
- }
3754
-
3755
- $themes_installs = self::get_all_sites( WP_FS__MODULE_TYPE_THEME, $blog_id );
3756
-
3757
- foreach ( $themes_installs as $slug => $install ) {
3758
- if ( ! isset( $all_themes_installs[ $slug ] ) ) {
3759
- $all_themes_installs[ $slug ] = array();
3760
- }
3761
-
3762
- $install->blog_id = $blog_id;
3763
-
3764
- $all_themes_installs[ $slug ][] = $install;
3765
- }
3766
- }
3767
- }
3768
-
3769
- $licenses_by_module_type = self::get_all_licenses_by_module_type();
3770
-
3771
- $vars = array(
3772
- 'plugin_sites' => $all_plugins_installs,
3773
- 'theme_sites' => $all_themes_installs,
3774
- 'users' => self::get_all_users(),
3775
- 'addons' => self::get_all_addons(),
3776
- 'account_addons' => self::get_all_account_addons(),
3777
- 'plugin_licenses' => $licenses_by_module_type[ WP_FS__MODULE_TYPE_PLUGIN ],
3778
- 'theme_licenses' => $licenses_by_module_type[ WP_FS__MODULE_TYPE_THEME ]
3779
- );
3780
-
3781
- fs_enqueue_local_style( 'fs_debug', '/admin/debug.css' );
3782
- fs_require_once_template( 'debug.php', $vars );
3783
- }
3784
-
3785
- #endregion
3786
-
3787
- #----------------------------------------------------------------------------------
3788
- #region Connectivity Issues
3789
- #----------------------------------------------------------------------------------
3790
-
3791
- /**
3792
- * Check if Freemius should be turned on for the current plugin install.
3793
- *
3794
- * Note:
3795
- * $this->_is_on is updated in has_api_connectivity()
3796
- *
3797
- * @author Vova Feldman (@svovaf)
3798
- * @since 1.0.9
3799
- *
3800
- * @return bool
3801
- */
3802
- function is_on() {
3803
- self::$_static_logger->entrance();
3804
-
3805
- if ( isset( $this->_is_on ) ) {
3806
- return $this->_is_on;
3807
- }
3808
-
3809
- // If already installed or pending then sure it's on :)
3810
- if ( $this->is_registered() || $this->is_pending_activation() ) {
3811
- $this->_is_on = true;
3812
-
3813
- return true;
3814
- }
3815
-
3816
- return false;
3817
- }
3818
-
3819
- /**
3820
- * @author Vova Feldman (@svovaf)
3821
- * @since 1.1.7.3
3822
- *
3823
- * @param bool $flush_if_no_connectivity
3824
- *
3825
- * @return bool
3826
- */
3827
- private function should_run_connectivity_test( $flush_if_no_connectivity = false ) {
3828
- if ( ! isset( $this->_storage->connectivity_test ) ) {
3829
- // Connectivity test was never executed, or cache was cleared.
3830
- return true;
3831
- }
3832
-
3833
- if ( WP_FS__PING_API_ON_IP_OR_HOST_CHANGES ) {
3834
- if ( WP_FS__IS_HTTP_REQUEST ) {
3835
- if ( $_SERVER['HTTP_HOST'] != $this->_storage->connectivity_test['host'] ) {
3836
- // Domain changed.
3837
- return true;
3838
- }
3839
-
3840
- if ( WP_FS__REMOTE_ADDR != $this->_storage->connectivity_test['server_ip'] ) {
3841
- // Server IP changed.
3842
- return true;
3843
- }
3844
- }
3845
- }
3846
-
3847
- if ( $this->_storage->connectivity_test['is_connected'] &&
3848
- $this->_storage->connectivity_test['is_active']
3849
- ) {
3850
- // API connected and Freemius is active - no need to run connectivity check.
3851
- return false;
3852
- }
3853
-
3854
- if ( $flush_if_no_connectivity ) {
3855
- /**
3856
- * If explicitly asked to flush when no connectivity - do it only
3857
- * if at least 10 sec passed from the last API connectivity test.
3858
- */
3859
- return ( isset( $this->_storage->connectivity_test['timestamp'] ) &&
3860
- ( WP_FS__SCRIPT_START_TIME - $this->_storage->connectivity_test['timestamp'] ) > 10 );
3861
- }
3862
-
3863
- /**
3864
- * @since 1.1.7 Don't check for connectivity on plugin downgrade.
3865
- */
3866
- $version = $this->get_plugin_version();
3867
- if ( version_compare( $version, $this->_storage->connectivity_test['version'], '>' ) ) {
3868
- // If it's a plugin version upgrade and Freemius is off or no connectivity, run connectivity test.
3869
- return true;
3870
- }
3871
-
3872
- return false;
3873
- }
3874
-
3875
- /**
3876
- * @author Vova Feldman (@svovaf)
3877
- * @since 1.1.7.4
3878
- *
3879
- * @param int|null $blog_id Since 2.0.0.
3880
- * @param bool $is_gdpr_test Since 2.0.2. Perform only the GDPR test.
3881
- *
3882
- * @return object|false
3883
- */
3884
- private function ping( $blog_id = null, $is_gdpr_test = false ) {
3885
- if ( WP_FS__SIMULATE_NO_API_CONNECTIVITY ) {
3886
- return false;
3887
- }
3888
-
3889
- $version = $this->get_plugin_version();
3890
-
3891
- $is_update = $this->apply_filters( 'is_plugin_update', $this->is_plugin_update() );
3892
-
3893
- return $this->get_api_plugin_scope()->ping(
3894
- $this->get_anonymous_id( $blog_id ),
3895
- array(
3896
- 'is_update' => json_encode( $is_update ),
3897
- 'version' => $version,
3898
- 'sdk' => $this->version,
3899
- 'is_admin' => json_encode( is_admin() ),
3900
- 'is_ajax' => json_encode( self::is_ajax() ),
3901
- 'is_cron' => json_encode( self::is_cron() ),
3902
- 'is_gdpr_test' => $is_gdpr_test,
3903
- 'is_http' => json_encode( WP_FS__IS_HTTP_REQUEST ),
3904
- )
3905
- );
3906
- }
3907
-
3908
- /**
3909
- * Check if there's any connectivity issue to Freemius API.
3910
- *
3911
- * @author Vova Feldman (@svovaf)
3912
- * @since 1.0.9
3913
- *
3914
- * @param bool $flush_if_no_connectivity
3915
- *
3916
- * @return bool
3917
- */
3918
- function has_api_connectivity( $flush_if_no_connectivity = false ) {
3919
- $this->_logger->entrance();
3920
-
3921
- if ( isset( $this->_has_api_connection ) && ( $this->_has_api_connection || ! $flush_if_no_connectivity ) ) {
3922
- return $this->_has_api_connection;
3923
- }
3924
-
3925
- if ( WP_FS__SIMULATE_NO_API_CONNECTIVITY &&
3926
- isset( $this->_storage->connectivity_test ) &&
3927
- true === $this->_storage->connectivity_test['is_connected']
3928
- ) {
3929
- unset( $this->_storage->connectivity_test );
3930
- }
3931
-
3932
- if ( ! $this->should_run_connectivity_test( $flush_if_no_connectivity ) ) {
3933
- $this->_has_api_connection = $this->_storage->connectivity_test['is_connected'];
3934
- /**
3935
- * @since 1.1.6 During dev mode, if there's connectivity - turn Freemius on regardless the configuration.
3936
- *
3937
- * @since 1.2.1.5 If the user running the premium version then ignore the 'is_active' flag and turn Freemius on to enable license key activation.
3938
- */
3939
- $this->_is_on = $this->_storage->connectivity_test['is_active'] ||
3940
- $this->is_premium() ||
3941
- ( WP_FS__DEV_MODE && $this->_has_api_connection && ! WP_FS__SIMULATE_FREEMIUS_OFF );
3942
-
3943
- return $this->_has_api_connection;
3944
- }
3945
-
3946
- $pong = $this->ping();
3947
- $is_connected = $this->get_api_plugin_scope()->is_valid_ping( $pong );
3948
-
3949
- if ( ! $is_connected ) {
3950
- // API failure.
3951
- $this->_add_connectivity_issue_message( $pong );
3952
- }
3953
-
3954
- if ( $is_connected ) {
3955
- FS_GDPR_Manager::instance()->store_is_required( $pong->is_gdpr_required );
3956
- }
3957
-
3958
- $this->store_connectivity_info( $pong, $is_connected );
3959
-
3960
- return $this->_has_api_connection;
3961
- }
3962
-
3963
- /**
3964
- * @author Vova Feldman (@svovaf)
3965
- * @since 1.1.7.4
3966
- *
3967
- * @param object $pong
3968
- * @param bool $is_connected
3969
- */
3970
- private function store_connectivity_info( $pong, $is_connected ) {
3971
- $this->_logger->entrance();
3972
-
3973
- $version = $this->get_plugin_version();
3974
-
3975
- if ( ! $is_connected || WP_FS__SIMULATE_FREEMIUS_OFF ) {
3976
- $is_active = false;
3977
- } else {
3978
- $is_active = ( isset( $pong->is_active ) && true == $pong->is_active );
3979
- }
3980
-
3981
- $is_active = $this->apply_filters(
3982
- 'is_on',
3983
- $is_active,
3984
- $this->is_plugin_update(),
3985
- $version
3986
- );
3987
-
3988
- $this->_storage->connectivity_test = array(
3989
- 'is_connected' => $is_connected,
3990
- 'host' => $_SERVER['HTTP_HOST'],
3991
- 'server_ip' => WP_FS__REMOTE_ADDR,
3992
- 'is_active' => $is_active,
3993
- 'timestamp' => WP_FS__SCRIPT_START_TIME,
3994
- // Last version with connectivity attempt.
3995
- 'version' => $version,
3996
- );
3997
-
3998
- $this->_has_api_connection = $is_connected;
3999
- $this->_is_on = $is_active || ( WP_FS__DEV_MODE && $is_connected && ! WP_FS__SIMULATE_FREEMIUS_OFF );
4000
- }
4001
-
4002
- /**
4003
- * Force turning Freemius on.
4004
- *
4005
- * @author Vova Feldman (@svovaf)
4006
- * @since 1.1.8.1
4007
- *
4008
- * @return bool TRUE if successfully turned on.
4009
- */
4010
- private function turn_on() {
4011
- $this->_logger->entrance();
4012
-
4013
- if ( $this->is_on() || ! isset( $this->_storage->connectivity_test['is_active'] ) ) {
4014
- return false;
4015
- }
4016
-
4017
- $updated_connectivity = $this->_storage->connectivity_test;
4018
- $updated_connectivity['is_active'] = true;
4019
- $updated_connectivity['timestamp'] = WP_FS__SCRIPT_START_TIME;
4020
- $this->_storage->connectivity_test = $updated_connectivity;
4021
-
4022
- $this->_is_on = true;
4023
-
4024
- return true;
4025
- }
4026
-
4027
- /**
4028
- * Anonymous and unique site identifier (Hash).
4029
- *
4030
- * @author Vova Feldman (@svovaf)
4031
- * @since 1.1.0
4032
- *
4033
- * @param null|int $blog_id Since 2.0.0
4034
- *
4035
- * @return string
4036
- */
4037
- function get_anonymous_id( $blog_id = null ) {
4038
- $unique_id = self::$_accounts->get_option( 'unique_id', null, $blog_id );
4039
-
4040
- if ( empty( $unique_id ) || ! is_string( $unique_id ) ) {
4041
- $key = fs_strip_url_protocol( get_site_url( $blog_id ) );
4042
-
4043
- $secure_auth = SECURE_AUTH_KEY;
4044
- if ( empty( $secure_auth ) ||
4045
- false !== strpos( $secure_auth, ' ' ) ||
4046
- 'put your unique phrase here' === $secure_auth
4047
- ) {
4048
- // Protect against default auth key.
4049
- $secure_auth = md5( microtime() );
4050
- }
4051
-
4052
- /**
4053
- * Base the unique identifier on the WP secure authentication key. Which
4054
- * turns the key into a secret anonymous identifier. This will help us
4055
- * to avoid duplicate installs generation on the backend upon opt-in.
4056
- *
4057
- * @author Vova Feldman (@svovaf)
4058
- * @since 1.2.3
4059
- */
4060
- $unique_id = md5( $key . $secure_auth );
4061
-
4062
- self::$_accounts->set_option( 'unique_id', $unique_id, true, $blog_id );
4063
- }
4064
-
4065
- $this->_logger->departure( $unique_id );
4066
-
4067
- return $unique_id;
4068
- }
4069
-
4070
- /**
4071
- * @author Vova Feldman (@svovaf)
4072
- * @since 1.1.7.4
4073
- *
4074
- * @return \WP_User
4075
- */
4076
- static function _get_current_wp_user() {
4077
- self::require_pluggable_essentials();
4078
- self::wp_cookie_constants();
4079
-
4080
- return wp_get_current_user();
4081
- }
4082
-
4083
- /**
4084
- * Define cookie constants which are required by Freemius::_get_current_wp_user() since
4085
- * it uses wp_get_current_user() which needs the cookie constants set. When a plugin
4086
- * is network activated the cookie constants are only configured after the network
4087
- * plugins activation, therefore, if we don't define those constants WP will throw
4088
- * PHP warnings/notices.
4089
- *
4090
- * @author Vova Feldman (@svovaf)
4091
- * @since 2.1.1
4092
- */
4093
- private static function wp_cookie_constants() {
4094
- if ( defined( 'LOGGED_IN_COOKIE' ) &&
4095
- ( defined( 'AUTH_COOKIE' ) || defined( 'SECURE_AUTH_COOKIE' ) )
4096
- ) {
4097
- return;
4098
- }
4099
-
4100
- /**
4101
- * Used to guarantee unique hash cookies
4102
- *
4103
- * @since 1.5.0
4104
- */
4105
- if ( ! defined( 'COOKIEHASH' ) ) {
4106
- $siteurl = get_site_option( 'siteurl' );
4107
- if ( $siteurl ) {
4108
- define( 'COOKIEHASH', md5( $siteurl ) );
4109
- } else {
4110
- define( 'COOKIEHASH', '' );
4111
- }
4112
- }
4113
-
4114
- if ( ! defined( 'LOGGED_IN_COOKIE' ) ) {
4115
- define( 'LOGGED_IN_COOKIE', 'wordpress_logged_in_' . COOKIEHASH );
4116
- }
4117
-
4118
- /**
4119
- * @since 2.5.0
4120
- */
4121
- if ( ! defined( 'AUTH_COOKIE' ) ) {
4122
- define( 'AUTH_COOKIE', 'wordpress_' . COOKIEHASH );
4123
- }
4124
-
4125
- /**
4126
- * @since 2.6.0
4127
- */
4128
- if ( ! defined( 'SECURE_AUTH_COOKIE' ) ) {
4129
- define( 'SECURE_AUTH_COOKIE', 'wordpress_sec_' . COOKIEHASH );
4130
- }
4131
- }
4132
-
4133
- /**
4134
- * @author Vova Feldman (@svovaf)
4135
- * @since 2.1.0
4136
- *
4137
- * @return int
4138
- */
4139
- static function get_current_wp_user_id() {
4140
- $wp_user = self::_get_current_wp_user();
4141
-
4142
- return $wp_user->ID;
4143
- }
4144
-
4145
- /**
4146
- * @author Vova Feldman (@svovaf)
4147
- * @since 1.2.1.7
4148
- *
4149
- * @param string $email
4150
- *
4151
- * @return bool
4152
- */
4153
- static function is_valid_email( $email ) {
4154
- if ( false === filter_var( $email, FILTER_VALIDATE_EMAIL ) ) {
4155
- return false;
4156
- }
4157
-
4158
- $parts = explode( '@', $email );
4159
-
4160
- if ( 2 !== count( $parts ) || empty( $parts[1] ) ) {
4161
- return false;
4162
- }
4163
-
4164
- $blacklist = array(
4165
- 'admin.',
4166
- 'webmaster.',
4167
- 'localhost.',
4168
- 'dev.',
4169
- 'development.',
4170
- 'test.',
4171
- 'stage.',
4172
- 'staging.',
4173
- );
4174
-
4175
- // Make sure domain is not one of the blacklisted.
4176
- foreach ( $blacklist as $invalid ) {
4177
- if ( 0 === strpos( $parts[1], $invalid ) ) {
4178
- return false;
4179
- }
4180
- }
4181
-
4182
- // Get the UTF encoded domain name.
4183
- $domain = idn_to_ascii( $parts[1] ) . '.';
4184
-
4185
- return ( checkdnsrr( $domain, 'MX' ) || checkdnsrr( $domain, 'A' ) );
4186
- }
4187
-
4188
- /**
4189
- * Generate API connectivity issue message.
4190
- *
4191
- * @author Vova Feldman (@svovaf)
4192
- * @since 1.0.9
4193
- *
4194
- * @param mixed $api_result
4195
- * @param bool $is_first_failure
4196
- */
4197
- function _add_connectivity_issue_message( $api_result, $is_first_failure = true ) {
4198
- if ( ! $this->is_premium() && $this->_enable_anonymous ) {
4199
- // Don't add message if it's the free version and can run anonymously.
4200
- return;
4201
- }
4202
-
4203
- if ( ! function_exists( 'wp_nonce_url' ) ) {
4204
- require_once ABSPATH . 'wp-includes/functions.php';
4205
- }
4206
-
4207
- $current_user = self::_get_current_wp_user();
4208
- // $admin_email = get_option( 'admin_email' );
4209
- $admin_email = $current_user->user_email;
4210
-
4211
- // Aliases.
4212
- $deactivate_plugin_title = $this->esc_html_inline( 'That\'s exhausting, please deactivate', 'deactivate-plugin-title' );
4213
- $deactivate_plugin_desc = $this->esc_html_inline( 'We feel your frustration and sincerely apologize for the inconvenience. Hope to see you again in the future.', 'deactivate-plugin-desc' );
4214
- $install_previous_title = $this->esc_html_inline( 'Let\'s try your previous version', 'install-previous-title' );
4215
- $install_previous_desc = $this->esc_html_inline( 'Uninstall this version and install the previous one.', 'install-previous-desc' );
4216
- $fix_issue_title = $this->esc_html_inline( 'Yes - I\'m giving you a chance to fix it', 'fix-issue-title' );
4217
- $fix_issue_desc = $this->esc_html_inline( 'We will do our best to whitelist your server and resolve this issue ASAP. You will get a follow-up email to %s once we have an update.', 'fix-issue-desc' );
4218
- /* translators: %s: product title (e.g. "Awesome Plugin" requires an access to...) */
4219
- $x_requires_access_to_api = $this->esc_html_inline( '%s requires an access to our API.', 'x-requires-access-to-api' );
4220
- $sysadmin_title = $this->esc_html_inline( 'I\'m a system administrator', 'sysadmin-title' );
4221
- $happy_to_resolve_issue_asap = $this->esc_html_inline( 'We are sure it\'s an issue on our side and more than happy to resolve it for you ASAP if you give us a chance.', 'happy-to-resolve-issue-asap' );
4222
-
4223
- $message = false;
4224
- if ( is_object( $api_result ) &&
4225
- isset( $api_result->error ) &&
4226
- isset( $api_result->error->code )
4227
- ) {
4228
- switch ( $api_result->error->code ) {
4229
- case 'curl_missing':
4230
- $missing_methods = '';
4231
- if ( is_array( $api_result->missing_methods ) &&
4232
- ! empty( $api_result->missing_methods )
4233
- ) {
4234
- foreach ( $api_result->missing_methods as $m ) {
4235
- if ( 'curl_version' === $m ) {
4236
- continue;
4237
- }
4238
-
4239
- if ( ! empty( $missing_methods ) ) {
4240
- $missing_methods .= ', ';
4241
- }
4242
-
4243
- $missing_methods .= sprintf( '<code>%s</code>', $m );
4244
- }
4245
-
4246
- if ( ! empty( $missing_methods ) ) {
4247
- $missing_methods = sprintf(
4248
- '<br><br><b>%s</b> %s',
4249
- $this->esc_html_inline( 'Disabled method(s):', 'curl-disabled-methods' ),
4250
- $missing_methods
4251
- );
4252
- }
4253
- }
4254
-
4255
- $message = sprintf(
4256
- $x_requires_access_to_api . ' ' .
4257
- $this->esc_html_inline( 'We use PHP cURL library for the API calls, which is a very common library and usually installed and activated out of the box. Unfortunately, cURL is not activated (or disabled) on your server.', 'curl-missing-message' ) . ' ' .
4258
- $missing_methods .
4259
- ' %s',
4260
- '<b>' . $this->get_plugin_name() . '</b>',
4261
- sprintf(
4262
- '<ol id="fs_firewall_issue_options"><li>%s</li><li>%s</li><li>%s</li></ol>',
4263
- sprintf(
4264
- '<a class="fs-resolve" data-type="curl" href="#"><b>%s</b></a>%s',
4265
- $this->get_text_inline( 'I don\'t know what is cURL or how to install it, help me!', 'curl-missing-no-clue-title' ),
4266
- ' - ' . sprintf(
4267
- $this->get_text_inline( 'We\'ll make sure to contact your hosting company and resolve the issue. You will get a follow-up email to %s once we have an update.', 'curl-missing-no-clue-desc' ),
4268
- '<a href="mailto:' . $admin_email . '">' . $admin_email . '</a>'
4269
- )
4270
- ),
4271
- sprintf(
4272
- '<b>%s</b> - %s',
4273
- $sysadmin_title,
4274
- esc_html( sprintf( $this->get_text_inline( 'Great, please install cURL and enable it in your php.ini file. In addition, search for the \'disable_functions\' directive in your php.ini file and remove any disabled methods starting with \'curl_\'. To make sure it was successfully activated, use \'phpinfo()\'. Once activated, deactivate the %s and reactivate it back again.', 'curl-missing-sysadmin-desc' ), $this->get_module_label( true ) ) )
4275
- ),
4276
- sprintf(
4277
- '<a href="%s"><b>%s</b></a> - %s',
4278
- wp_nonce_url( 'plugins.php?action=deactivate&amp;plugin=' . $this->_plugin_basename . '&amp;plugin_status=all&amp;paged=1&amp;s=', 'deactivate-plugin_' . $this->_plugin_basename ),
4279
- $deactivate_plugin_title,
4280
- $deactivate_plugin_desc
4281
- )
4282
- )
4283
- );
4284
- break;
4285
- case 'cloudflare_ddos_protection':
4286
- $message = sprintf(
4287
- $x_requires_access_to_api . ' ' .
4288
- $this->esc_html_inline( 'From unknown reason, CloudFlare, the firewall we use, blocks the connection.', 'cloudflare-blocks-connection-message' ) . ' ' .
4289
- $happy_to_resolve_issue_asap .
4290
- ' %s',
4291
- '<b>' . $this->get_plugin_name() . '</b>',
4292
- sprintf(
4293
- '<ol id="fs_firewall_issue_options"><li>%s</li><li>%s</li><li>%s</li></ol>',
4294
- sprintf(
4295
- '<a class="fs-resolve" data-type="cloudflare" href="#"><b>%s</b></a>%s',
4296
- $fix_issue_title,
4297
- ' - ' . sprintf(
4298
- $fix_issue_desc,
4299
- '<a href="mailto:' . $admin_email . '">' . $admin_email . '</a>'
4300
- )
4301
- ),
4302
- sprintf(
4303
- '<a href="%s" target="_blank" rel="noopener noreferrer"><b>%s</b></a> - %s',
4304
- sprintf( 'https://wordpress.org/plugins/%s/download/', $this->_slug ),
4305
- $install_previous_title,
4306
- $install_previous_desc
4307
- ),
4308
- sprintf(
4309
- '<a href="%s"><b>%s</b></a> - %s',
4310
- wp_nonce_url( 'plugins.php?action=deactivate&amp;plugin=' . $this->_plugin_basename . '&amp;plugin_status=all&amp;paged=1&amp;s=' . '', 'deactivate-plugin_' . $this->_plugin_basename ),
4311
- $deactivate_plugin_title,
4312
- $deactivate_plugin_desc
4313
- )
4314
- )
4315
- );
4316
- break;
4317
- case 'squid_cache_block':
4318
- $message = sprintf(
4319
- $x_requires_access_to_api . ' ' .
4320
- $this->esc_html_inline( 'It looks like your server is using Squid ACL (access control lists), which blocks the connection.', 'squid-blocks-connection-message' ) .
4321
- ' %s',
4322
- '<b>' . $this->get_plugin_name() . '</b>',
4323
- sprintf(
4324
- '<ol id="fs_firewall_issue_options"><li>%s</li><li>%s</li><li>%s</li></ol>',
4325
- sprintf(
4326
- '<a class="fs-resolve" data-type="squid" href="#"><b>%s</b></a> - %s',
4327
- $this->esc_html_inline( 'I don\'t know what is Squid or ACL, help me!', 'squid-no-clue-title' ),
4328
- sprintf(
4329
- $this->esc_html_inline( 'We\'ll make sure to contact your hosting company and resolve the issue. You will get a follow-up email to %s once we have an update.', 'squid-no-clue-desc' ),
4330
- '<a href="mailto:' . $admin_email . '">' . $admin_email . '</a>'
4331
- )
4332
- ),
4333
- sprintf(
4334
- '<b>%s</b> - %s',
4335
- $sysadmin_title,
4336
- sprintf(
4337
- $this->esc_html_inline( 'Great, please whitelist the following domains: %s. Once you are done, deactivate the %s and activate it again.', 'squid-sysadmin-desc' ),
4338
- // We use a filter since the plugin might require additional API connectivity.
4339
- '<b>' . implode( ', ', $this->apply_filters( 'api_domains', array(
4340
- 'api.freemius.com',
4341
- 'wp.freemius.com'
4342
- ) ) ) . '</b>',
4343
- $this->_module_type
4344
- )
4345
- ),
4346
- sprintf(
4347
- '<a href="%s"><b>%s</b></a> - %s',
4348
- wp_nonce_url( 'plugins.php?action=deactivate&amp;plugin=' . $this->_plugin_basename . '&amp;plugin_status=all&amp;paged=1&amp;s=', 'deactivate-plugin_' . $this->_plugin_basename ),
4349
- $deactivate_plugin_title,
4350
- $deactivate_plugin_desc
4351
- )
4352
- )
4353
- );
4354
- break;
4355
- // default:
4356
- // $message = $this->get_text_inline( 'connectivity-test-fails-message' );
4357
- // break;
4358
- }
4359
- }
4360
-
4361
- $message_id = 'failed_connect_api';
4362
- $type = 'error';
4363
-
4364
- $connectivity_test_fails_message = $this->esc_html_inline( 'From unknown reason, the API connectivity test failed.', 'connectivity-test-fails-message' );
4365
-
4366
- if ( false === $message ) {
4367
- if ( $is_first_failure ) {
4368
- // First attempt failed.
4369
- $message = sprintf(
4370
- $x_requires_access_to_api . ' ' .
4371
- $connectivity_test_fails_message . ' ' .
4372
- $this->esc_html_inline( 'It\'s probably a temporary issue on our end. Just to be sure, with your permission, would it be o.k to run another connectivity test?', 'connectivity-test-maybe-temporary' ) . '<br><br>' .
4373
- '%s',
4374
- '<b>' . $this->get_plugin_name() . '</b>',
4375
- sprintf(
4376
- '<div id="fs_firewall_issue_options">%s %s</div>',
4377
- sprintf(
4378
- '<a class="button button-primary fs-resolve" data-type="retry_ping" href="#">%s</a>',
4379
- $this->get_text_inline( 'Yes - do your thing', 'yes-do-your-thing' )
4380
- ),
4381
- sprintf(
4382
- '<a href="%s" class="button">%s</a>',
4383
- wp_nonce_url( 'plugins.php?action=deactivate&amp;plugin=' . $this->_plugin_basename . '&amp;plugin_status=all&amp;paged=1&amp;s=', 'deactivate-plugin_' . $this->_plugin_basename ),
4384
- $this->get_text_inline( 'No - just deactivate', 'no-deactivate' )
4385
- )
4386
- )
4387
- );
4388
-
4389
- $message_id = 'failed_connect_api_first';
4390
- $type = 'promotion';
4391
- } else {
4392
- // Second connectivity attempt failed.
4393
- $message = sprintf(
4394
- $x_requires_access_to_api . ' ' .
4395
- $connectivity_test_fails_message . ' ' .
4396
- $happy_to_resolve_issue_asap .
4397
- ' %s',
4398
- '<b>' . $this->get_plugin_name() . '</b>',
4399
- sprintf(
4400
- '<ol id="fs_firewall_issue_options"><li>%s</li><li>%s</li><li>%s</li></ol>',
4401
- sprintf(
4402
- '<a class="fs-resolve" data-type="general" href="#"><b>%s</b></a>%s',
4403
- $fix_issue_title,
4404
- ' - ' . sprintf(
4405
- $fix_issue_desc,
4406
- '<a href="mailto:' . $admin_email . '">' . $admin_email . '</a>'
4407
- )
4408
- ),
4409
- sprintf(
4410
- '<a href="%s" target="_blank" rel="noopener noreferrer"><b>%s</b></a> - %s',
4411
- sprintf( 'https://wordpress.org/plugins/%s/download/', $this->_slug ),
4412
- $install_previous_title,
4413
- $install_previous_desc
4414
- ),
4415
- sprintf(
4416
- '<a href="%s"><b>%s</b></a> - %s',
4417
- wp_nonce_url( 'plugins.php?action=deactivate&amp;plugin=' . $this->_plugin_basename . '&amp;plugin_status=all&amp;paged=1&amp;s=', 'deactivate-plugin_' . $this->_plugin_basename ),
4418
- $deactivate_plugin_title,
4419
- $deactivate_plugin_desc
4420
- )
4421
- )
4422
- );
4423
- }
4424
- }
4425
-
4426
- $this->_admin_notices->add_sticky(
4427
- $message,
4428
- $message_id,
4429
- $this->get_text_x_inline( 'Oops', 'exclamation', 'oops' ) . '...',
4430
- $type
4431
- );
4432
- }
4433
-
4434
- /**
4435
- * Handle user request to resolve connectivity issue.
4436
- * This method will send an email to Freemius API technical staff for resolution.
4437
- * The email will contain server's info and installed plugins (might be caching issue).
4438
- *
4439
- * @author Vova Feldman (@svovaf)
4440
- * @since 1.0.9
4441
- */
4442
- function _email_about_firewall_issue() {
4443
- $this->_admin_notices->remove_sticky( 'failed_connect_api' );
4444
-
4445
- $pong = $this->ping();
4446
-
4447
- $is_connected = $this->get_api_plugin_scope()->is_valid_ping( $pong );
4448
-
4449
- if ( $is_connected ) {
4450
- FS_GDPR_Manager::instance()->store_is_required( $pong->is_gdpr_required );
4451
-
4452
- $this->store_connectivity_info( $pong, $is_connected );
4453
-
4454
- echo $this->get_after_plugin_activation_redirect_url();
4455
- exit;
4456
- }
4457
-
4458
- $current_user = self::_get_current_wp_user();
4459
- $admin_email = $current_user->user_email;
4460
-
4461
- $error_type = fs_request_get( 'error_type', 'general' );
4462
-
4463
- switch ( $error_type ) {
4464
- case 'squid':
4465
- $title = 'Squid ACL Blocking Issue';
4466
- break;
4467
- case 'cloudflare':
4468
- $title = 'CloudFlare Blocking Issue';
4469
- break;
4470
- default:
4471
- $title = 'API Connectivity Issue';
4472
- break;
4473
- }
4474
-
4475
- $custom_email_sections = array();
4476
-
4477
- // Add 'API Error' custom email section.
4478
- $custom_email_sections['api_error'] = array(
4479
- 'title' => 'API Error',
4480
- 'rows' => array(
4481
- 'ping' => array(
4482
- 'API Error',
4483
- is_string( $pong ) ? htmlentities( $pong ) : json_encode( $pong )
4484
- ),
4485
- )
4486
- );
4487
-
4488
- // Send email with technical details to resolve API connectivity issues.
4489
- $this->send_email(
4490
- 'api@freemius.com', // recipient
4491
- $title . ' [' . $this->get_plugin_name() . ']', // subject
4492
- $custom_email_sections,
4493
- array( "Reply-To: $admin_email <$admin_email>" ) // headers
4494
- );
4495
-
4496
- $this->_admin_notices->add_sticky(
4497
- sprintf(
4498
- $this->get_text_inline( 'Thank for giving us the chance to fix it! A message was just sent to our technical staff. We will get back to you as soon as we have an update to %s. Appreciate your patience.', 'fix-request-sent-message' ),
4499
- '<a href="mailto:' . $admin_email . '">' . $admin_email . '</a>'
4500
- ),
4501
- 'server_details_sent'
4502
- );
4503
-
4504
- // Action was taken, tell that API connectivity troubleshooting should be off now.
4505
-
4506
- echo "1";
4507
- exit;
4508
- }
4509
-
4510
- /**
4511
- * Handle connectivity test retry approved by the user.
4512
- *
4513
- * @author Vova Feldman (@svovaf)
4514
- * @since 1.1.7.4
4515
- */
4516
- function _retry_connectivity_test() {
4517
- $this->_admin_notices->remove_sticky( 'failed_connect_api_first' );
4518
-
4519
- $pong = $this->ping();
4520
-
4521
- $is_connected = $this->get_api_plugin_scope()->is_valid_ping( $pong );
4522
-
4523
- if ( $is_connected ) {
4524
- FS_GDPR_Manager::instance()->store_is_required( $pong->is_gdpr_required );
4525
-
4526
- $this->store_connectivity_info( $pong, $is_connected );
4527
-
4528
- echo $this->get_after_plugin_activation_redirect_url();
4529
- } else {
4530
- // Add connectivity issue message after 2nd failed attempt.
4531
- $this->_add_connectivity_issue_message( $pong, false );
4532
-
4533
- echo "1";
4534
- }
4535
-
4536
- exit;
4537
- }
4538
-
4539
- static function _add_firewall_issues_javascript() {
4540
- $params = array();
4541
- fs_require_once_template( 'firewall-issues-js.php', $params );
4542
- }
4543
-
4544
- #endregion
4545
-
4546
- #----------------------------------------------------------------------------------
4547
- #region Email
4548
- #----------------------------------------------------------------------------------
4549
-
4550
- /**
4551
- * Generates and sends an HTML email with customizable sections.
4552
- *
4553
- * @author Leo Fajardo (@leorw)
4554
- * @since 1.1.2
4555
- *
4556
- * @param string $to_address
4557
- * @param string $subject
4558
- * @param array $sections
4559
- * @param array $headers
4560
- *
4561
- * @return bool Whether the email contents were sent successfully.
4562
- */
4563
- private function send_email(
4564
- $to_address,
4565
- $subject,
4566
- $sections = array(),
4567
- $headers = array()
4568
- ) {
4569
- $default_sections = $this->get_email_sections();
4570
-
4571
- // Insert new sections or replace the default email sections.
4572
- if ( is_array( $sections ) && ! empty( $sections ) ) {
4573
- foreach ( $sections as $section_id => $custom_section ) {
4574
- if ( ! isset( $default_sections[ $section_id ] ) ) {
4575
- // If the section does not exist, add it.
4576
- $default_sections[ $section_id ] = $custom_section;
4577
- } else {
4578
- // If the section already exists, override it.
4579
- $current_section = $default_sections[ $section_id ];
4580
-
4581
- // Replace the current section's title if a custom section title exists.
4582
- if ( isset( $custom_section['title'] ) ) {
4583
- $current_section['title'] = $custom_section['title'];
4584
- }
4585
-
4586
- // Insert new rows under the current section or replace the default rows.
4587
- if ( isset( $custom_section['rows'] ) && is_array( $custom_section['rows'] ) && ! empty( $custom_section['rows'] ) ) {
4588
- foreach ( $custom_section['rows'] as $row_id => $row ) {
4589
- $current_section['rows'][ $row_id ] = $row;
4590
- }
4591
- }
4592
-
4593
- $default_sections[ $section_id ] = $current_section;
4594
- }
4595
- }
4596
- }
4597
-
4598
- $vars = array( 'sections' => $default_sections );
4599
- $message = fs_get_template( 'email.php', $vars );
4600
-
4601
- // Set the type of email to HTML.
4602
- $headers[] = 'Content-type: text/html; charset=UTF-8';
4603
-
4604
- $header_string = implode( "\r\n", $headers );
4605
-
4606
- return wp_mail(
4607
- $to_address,
4608
- $subject,
4609
- $message,
4610
- $header_string
4611
- );
4612
- }
4613
-
4614
- /**
4615
- * Generates the data for the sections of the email content.
4616
- *
4617
- * @author Leo Fajardo (@leorw)
4618
- * @since 1.1.2
4619
- *
4620
- * @return array
4621
- */
4622
- private function get_email_sections() {
4623
- // Retrieve the current user's information so that we can get the user's email, first name, and last name below.
4624
- $current_user = self::_get_current_wp_user();
4625
-
4626
- // Retrieve the cURL version information so that we can get the version number below.
4627
- $curl_version_information = curl_version();
4628
-
4629
- $active_plugin = self::get_active_plugins();
4630
-
4631
- // Generate the list of active plugins separated by new line.
4632
- $active_plugin_string = '';
4633
- foreach ( $active_plugin as $plugin ) {
4634
- $active_plugin_string .= sprintf(
4635
- '<a href="%s">%s</a> [v%s]<br>',
4636
- $plugin['PluginURI'],
4637
- $plugin['Name'],
4638
- $plugin['Version']
4639
- );
4640
- }
4641
-
4642
- $server_ip = WP_FS__REMOTE_ADDR;
4643
-
4644
- // Add PHP info for deeper investigation.
4645
- ob_start();
4646
- phpinfo();
4647
- $php_info = ob_get_clean();
4648
-
4649
- $api_domain = substr( FS_API__ADDRESS, strpos( FS_API__ADDRESS, ':' ) + 3 );
4650
-
4651
- // Generate the default email sections.
4652
- $sections = array(
4653
- 'sdk' => array(
4654
- 'title' => 'SDK',
4655
- 'rows' => array(
4656
- 'fs_version' => array( 'FS Version', $this->version ),
4657
- 'curl_version' => array( 'cURL Version', $curl_version_information['version'] )
4658
- )
4659
- ),
4660
- 'plugin' => array(
4661
- 'title' => ucfirst( $this->get_module_type() ),
4662
- 'rows' => array(
4663
- 'name' => array( 'Name', $this->get_plugin_name() ),
4664
- 'version' => array( 'Version', $this->get_plugin_version() )
4665
- )
4666
- ),
4667
- 'api' => array(
4668
- 'title' => 'API Subdomain',
4669
- 'rows' => array(
4670
- 'dns' => array(
4671
- 'DNS_CNAME',
4672
- function_exists( 'dns_get_record' ) ?
4673
- var_export( dns_get_record( $api_domain, DNS_CNAME ), true ) :
4674
- 'dns_get_record() disabled/blocked'
4675
- ),
4676
- 'ip' => array(
4677
- 'IP',
4678
- function_exists( 'gethostbyname' ) ?
4679
- gethostbyname( $api_domain ) :
4680
- 'gethostbyname() disabled/blocked'
4681
- ),
4682
- ),
4683
- ),
4684
- 'site' => array(
4685
- 'title' => 'Site',
4686
- 'rows' => array(
4687
- 'unique_id' => array( 'Unique ID', $this->get_anonymous_id() ),
4688
- 'address' => array( 'Address', site_url() ),
4689
- 'host' => array(
4690
- 'HTTP_HOST',
4691
- ( ! empty( $_SERVER['HTTP_HOST'] ) ? $_SERVER['HTTP_HOST'] : '' )
4692
- ),
4693
- 'hosting' => array(
4694
- 'Hosting Company' => fs_request_has( 'hosting_company' ) ?
4695
- fs_request_get( 'hosting_company' ) :
4696
- 'Unknown',
4697
- ),
4698
- 'server_addr' => array(
4699
- 'SERVER_ADDR',
4700
- '<a href="http://www.projecthoneypot.org/ip_' . $server_ip . '">' . $server_ip . '</a>'
4701
- )
4702
- )
4703
- ),
4704
- 'user' => array(
4705
- 'title' => 'User',
4706
- 'rows' => array(
4707
- 'email' => array( 'Email', $current_user->user_email ),
4708
- 'first' => array( 'First', $current_user->user_firstname ),
4709
- 'last' => array( 'Last', $current_user->user_lastname )
4710
- )
4711
- ),
4712
- 'plugins' => array(
4713
- 'title' => 'Plugins',
4714
- 'rows' => array(
4715
- 'active_plugins' => array( 'Active Plugins', $active_plugin_string )
4716
- )
4717
- ),
4718
- 'php_info' => array(
4719
- 'title' => 'PHP Info',
4720
- 'rows' => array(
4721
- 'info' => array( $php_info )
4722
- ),
4723
- )
4724
- );
4725
-
4726
- // Allow the sections to be modified by other code.
4727
- $sections = $this->apply_filters( 'email_template_sections', $sections );
4728
-
4729
- return $sections;
4730
- }
4731
-
4732
- #endregion
4733
-
4734
- #----------------------------------------------------------------------------------
4735
- #region Initialization
4736
- #----------------------------------------------------------------------------------
4737
-
4738
- /**
4739
- * Init plugin's Freemius instance.
4740
- *
4741
- * @author Vova Feldman (@svovaf)
4742
- * @since 1.0.1
4743
- *
4744
- * @param number $id
4745
- * @param string $public_key
4746
- * @param bool $is_live
4747
- * @param bool $is_premium
4748
- */
4749
- function init( $id, $public_key, $is_live = true, $is_premium = true ) {
4750
- $this->_logger->entrance();
4751
-
4752
- $this->dynamic_init( array(
4753
- 'id' => $id,
4754
- 'public_key' => $public_key,
4755
- 'is_live' => $is_live,
4756
- 'is_premium' => $is_premium,
4757
- ) );
4758
- }
4759
-
4760
- /**
4761
- * Dynamic initiator, originally created to support initiation
4762
- * with parent_id for add-ons.
4763
- *
4764
- * @author Vova Feldman (@svovaf)
4765
- * @since 1.0.6
4766
- *
4767
- * @param array $plugin_info
4768
- *
4769
- * @throws Freemius_Exception
4770
- */
4771
- function dynamic_init( array $plugin_info ) {
4772
- $this->_logger->entrance();
4773
-
4774
- $this->parse_settings( $plugin_info );
4775
-
4776
- $this->register_after_settings_parse_hooks();
4777
-
4778
- if ( $this->should_stop_execution() ) {
4779
- return;
4780
- }
4781
-
4782
- if ( ! $this->is_registered() ) {
4783
- if ( $this->is_anonymous() ) {
4784
- // If user skipped, no need to test connectivity.
4785
- $this->_has_api_connection = true;
4786
- $this->_is_on = true;
4787
- } else {
4788
- if ( ! $this->has_api_connectivity() ) {
4789
- if ( $this->_admin_notices->has_sticky( 'failed_connect_api_first' ) ||
4790
- $this->_admin_notices->has_sticky( 'failed_connect_api' )
4791
- ) {
4792
- if ( ! $this->_enable_anonymous || $this->is_premium() ) {
4793
- // If anonymous mode is disabled, add firewall admin-notice message.
4794
- add_action( 'admin_footer', array( 'Freemius', '_add_firewall_issues_javascript' ) );
4795
-
4796
- $ajax_action_suffix = $this->_slug . ( $this->is_theme() ? ':theme' : '' );
4797
- add_action( "wp_ajax_fs_resolve_firewall_issues_{$ajax_action_suffix}", array(
4798
- &$this,
4799
- '_email_about_firewall_issue'
4800
- ) );
4801
-
4802
- add_action( "wp_ajax_fs_retry_connectivity_test_{$ajax_action_suffix}", array(
4803
- &$this,
4804
- '_retry_connectivity_test'
4805
- ) );
4806
-
4807
- /**
4808
- * Currently the admin notice manager relies on the module's type and slug. The new AJAX actions manager uses module IDs, hence, consider to replace the if block above with the commented code below after adjusting the admin notices manager to work with module IDs.
4809
- *
4810
- * @author Vova Feldman (@svovaf)
4811
- * @since 2.0.0
4812
- */
4813
- /*$this->add_ajax_action( 'resolve_firewall_issues', array(
4814
- &$this,
4815
- '_email_about_firewall_issue'
4816
- ) );
4817
-
4818
- $this->add_ajax_action( 'retry_connectivity_test', array(
4819
- &$this,
4820
- '_retry_connectivity_test'
4821
- ) );*/
4822
- }
4823
- }
4824
-
4825
- return;
4826
- } else {
4827
- $this->_admin_notices->remove_sticky( array(
4828
- 'failed_connect_api_first',
4829
- 'failed_connect_api',
4830
- ) );
4831
-
4832
- if ( $this->_anonymous_mode ) {
4833
- // Simulate anonymous mode.
4834
-